Skip to content

Commit 65906ec

Browse files
committed
Tweak Uppercase
1 parent e123e56 commit 65906ec

File tree

14 files changed

+64
-49
lines changed

14 files changed

+64
-49
lines changed

docs/filters/filter-pills.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ Bootstrap 4: none
7979

8080
Bootstrap 5: none
8181

82-
Tailwind: `text-xs font-medium capitalize`
82+
Tailwind: `text-xs font-medium`
8383

8484
Note that colors are handled via default-colours
8585

@@ -274,7 +274,7 @@ Bootstrap 4: `badge badge-pill badge-info d-inline-flex align-items-center`
274274

275275
Bootstrap 5: `badge rounded-pill bg-info d-inline-flex align-items-center`
276276

277-
Tailwind: `inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium leading-4 capitalize`
277+
Tailwind: `inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium leading-4`
278278

279279
```php
280280
SelectFilter::make('Active')

docs/sorting/available-methods.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ Bootstrap 4: `badge badge-pill badge-info d-inline-flex align-items-center`
172172

173173
Bootstrap 5: `badge rounded-pill bg-info d-inline-flex align-items-center`
174174

175-
Tailwind: `inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium leading-4 capitalize`
175+
Tailwind: `inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium leading-4`
176176

177177
```php
178178
public function configure(): void

resources/js/partials/core/table.min.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,16 @@ function table() {
2626
.replace('<!--[if ENDBLOCK]>','')
2727
.replace('<![endif]-->','')
2828
.trim();
29+
// Create a new DOMParser instance
30+
const parser = new DOMParser();
31+
// Parse the HTML string
32+
let doc = parser.parseFromString(localHtml, 'text/html');
33+
let body = doc.body;
34+
let query = body.getElementsByClassName('rowData')[0];
35+
if(query)
36+
{
37+
localHtml = query.innerHTML;
38+
}
2939
return localHtml;
3040
},
3141
removeHTMLTags(htmlString) {

resources/views/components/collapsed-columns/collapsed-columns.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
<div>
3030
@tableloop($collapsingColumnInfo['collapsingColumnDetails'] as $colIndex => $columnData)
3131
@php($key = $dataTableFingerprint . '_' . $rowIndex.'_'.$colIndex)
32-
<div wire:key="{{ $dataTableFingerprint }}-row-{{ $rowPk }}-collapsed-contents-{{ $colIndex }}" @class($columnData['classes'])
32+
<div wire:key="{{ $dataTableFingerprint }}-collapsed-contents-row-{{ $rowPk }}-{{ $colIndex }}" @class($columnData['classes'])
3333
x-data="{ value: '',
3434
init() {
3535
$watch('opening', val => {

resources/views/components/collapsed-columns/tr.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
<div>
3333
@tableloop($collapsingColumnInfo['collapsingColumnDetails'] as $colIndex => $columnData)
3434
@php($key = $dataTableFingerprint . '_' . $rowIndex.'_'.$colIndex)
35-
<div wire:key="{{ $dataTableFingerprint }}-row-{{ $rowPk }}-collapsed-contents-{{ $colIndex }}" @class($columnData['classes'])
35+
<div wire:key="{{ $dataTableFingerprint }}-collapsed-contents-row-{{ $rowPk }}-{{ $colIndex }}" @class($columnData['classes'])
3636
x-data="{ value: '',
3737
init() {
3838
$watch('opening', val => {

resources/views/components/reorder/th.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
{{
88
$attributes->merge($customThAttributes)
99
->class([
10-
'table-cell px-6 py-3 text-left text-xs font-medium whitespace-nowrap uppercase tracking-wider' => $isTailwind && (($customThAttributes['default-styling'] ?? true) || ($customThAttributes['default'] ?? true)),
10+
'table-cell px-6 py-3 text-left text-xs font-medium whitespace-nowrap tracking-wider' => $isTailwind && (($customThAttributes['default-styling'] ?? true) || ($customThAttributes['default'] ?? true)),
1111
'text-gray-500 dark:bg-gray-800 dark:text-gray-400' => $isTailwind && (($customThAttributes['default-colors'] ?? true) || ($customThAttributes['default'] ?? true)),
1212
13-
'tw4ph table-cell px-6 py-3 text-left text-xs font-medium whitespace-nowrap uppercase tracking-wider' => $isTailwind4 && (($customThAttributes['default-styling'] ?? true) || ($customThAttributes['default'] ?? true)),
13+
'tw4ph table-cell px-6 py-3 text-left text-xs font-medium whitespace-nowrap tracking-wider' => $isTailwind4 && (($customThAttributes['default-styling'] ?? true) || ($customThAttributes['default'] ?? true)),
1414
'tw4ph text-gray-500 dark:bg-gray-800 dark:text-gray-400' => $isTailwind4 && (($customThAttributes['default-colors'] ?? true) || ($customThAttributes['default'] ?? true)),
1515
1616
'laravel-livewire-tables-reorderingMinimised' => $isBootstrap && ($customThAttributes['default'] ?? true),

resources/views/components/table/table.blade.php

Lines changed: 30 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@aware(['dataTableFingerprint','primaryKey','isTailwind', 'isTailwind4', 'isBootstrap', 'localisationPath', 'coreTableAttributes', 'selectedVisibleColumns'])
1+
@aware(['dataTableFingerprint','primaryKey','isTailwind', 'isTailwind4', 'isBootstrap', 'localisationPath', 'coreTableAttributes', 'selectedVisibleColumns', 'selectedVisibleColumnsData'])
22
@props(['bulkActionsTdAttributes','bulkActionsTdCheckboxAttributes'])
33

44
<table {{ $attributes->merge($coreTableAttributes['table'])
@@ -24,17 +24,36 @@
2424
@else
2525
<x-livewire-tables::thead />
2626

27-
@php($currentRows = $this->getRows)
2827

29-
@if(count($currentRows) > 0)
30-
@tableloop ($currentRows as $rowIndex => $row)
31-
@php($rowPk = $row->{$primaryKey})
32-
<x-livewire-tables::tbody wire:key="{{ $dataTableFingerprint }}-row-wrap-{{ $rowPk }}" :$row :$rowIndex :$rowPk :tableRowDetails="$this->getTableRowDetails($row, $rowIndex)" />
33-
@endtableloop
34-
@else
35-
<x-livewire-tables::table.empty />
36-
@endif
37-
28+
@php($currentRows = $this->getRows)
29+
30+
@if(count($currentRows) > 0)
31+
@tableloop ($currentRows as $rowIndex => $row)
32+
@php($rowPk = $row->{$primaryKey})
33+
<x-livewire-tables::tbody wire:key="{{ $dataTableFingerprint }}-row-wrap-{{ $rowPk }}" :$rowIndex :$rowPk :tableRowDetails="$this->getTableRowDetails($row, $rowIndex)">
34+
35+
@tableloop($selectedVisibleColumns as $colIndex => $column)
36+
@php($columnTdArray = $selectedVisibleColumnsData[$column->setIndexes($rowIndex, $colIndex)->getHash()])
37+
<x-livewire-tables::table.td x-ref="{{ $dataTableFingerprint . '_' . $rowIndex . '_' . $colIndex }}"
38+
:$columnTdArray
39+
:customAttributes="$columnTdArray['hasTdAttributesCallback'] ? $this->getTdAttributes($column, $row, $colIndex, $rowIndex) : ['default' => true, 'default-colors' => true, 'default-styling' => true]"
40+
:$colIndex
41+
wire:key="{{ $dataTableFingerprint . '-table-td-'.$rowPk.'-'.$columnTdArray['slug'] }}"
42+
43+
>
44+
@if($columnTdArray['isHtml'])
45+
{!! $column->renderContents($row) !!}
46+
@else
47+
{{ $column->renderContents($row) }}
48+
@endif
49+
</x-livewire-tables::table.td>
50+
@endtableloop
51+
</x-livewire-tables::tbody>
52+
@endtableloop
53+
@else
54+
<x-livewire-tables::table.empty />
55+
@endif
56+
3857
<x-livewire-tables::tfoot />
3958

4059
@endif

resources/views/components/table/th/th.blade.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515
$attributes->merge($customThAttributes)
1616
->class($isTailwind ? [
1717
'text-gray-500 dark:bg-gray-800 dark:text-gray-400' => (($customThAttributes['default-colors'] ?? true) || ($customThAttributes['default'] ?? true)),
18-
'px-6 py-3 text-left text-xs font-medium whitespace-nowrap uppercase tracking-wider' => (($customThAttributes['default-styling'] ?? true) || ($customThAttributes['default'] ?? true)),
18+
'px-6 py-3 text-left text-xs font-medium whitespace-nowrap tracking-wider' => (($customThAttributes['default-styling'] ?? true) || ($customThAttributes['default'] ?? true)),
1919
] : [])
2020
->class($isTailwind4 ? [
2121
'tw4ph text-gray-500 dark:bg-gray-800 dark:text-gray-400' => (($customThAttributes['default-colors'] ?? true) || ($customThAttributes['default'] ?? true)),
22-
'tw4ph px-6 py-3 text-left text-xs font-medium whitespace-nowrap uppercase tracking-wider' => (($customThAttributes['default-styling'] ?? true) || ($customThAttributes['default'] ?? true)),
22+
'tw4ph px-6 py-3 text-left text-xs font-medium whitespace-nowrap tracking-wider' => (($customThAttributes['default-styling'] ?? true) || ($customThAttributes['default'] ?? true)),
2323
] : [])
2424
->class($isBootstrap ? [
2525
'' => ($customThAttributes['default'] ?? true),
@@ -37,7 +37,7 @@
3737
$attributes->merge($customSortButtonAttributes)
3838
->class([
3939
'text-gray-500 dark:text-gray-400' => (($customSortButtonAttributes['default-colors'] ?? true) || ($customSortButtonAttributes['default'] ?? true)),
40-
'flex items-center space-x-1 text-left text-xs leading-4 font-medium uppercase tracking-wider group focus:outline-none' => (($customSortButtonAttributes['default-styling'] ?? true) || ($customSortButtonAttributes['default'] ?? true)),
40+
'flex items-center space-x-1 text-left text-xs leading-4 font-medium tracking-wider group focus:outline-none' => (($customSortButtonAttributes['default-styling'] ?? true) || ($customSortButtonAttributes['default'] ?? true)),
4141
])
4242
->except(['default', 'default-colors', 'default-styling', 'wire:key'])
4343
}}>

resources/views/components/tbody/tbody.blade.php

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
@aware(['dataTableFingerprint', 'isTailwind', 'isTailwind4', 'isBootstrap', 'coreTableAttributes', 'currentlyReorderingStatus', 'showBulkActionsSections', 'showCollapsingColumnSections', 'selectedVisibleColumns', 'selectedVisibleColumns', 'hasDisplayLoadingPlaceholder', 'hasTdAttributes', 'defaultBodyTextAlign', 'selectedVisibleColumnsData'])
2-
@props(['row','rowIndex','rowPk', 'tableRowDetails'])
2+
@props(['rowIndex','rowPk', 'tableRowDetails'])
33

44
<tbody {{ $attributes->merge($coreTableAttributes['tbody'])
55
->merge($currentlyReorderingStatus ? [
@@ -41,23 +41,8 @@
4141
@endif
4242
@endif
4343

44+
{{ $slot }}
4445

45-
@tableloop($selectedVisibleColumns as $colIndex => $column)
46-
@php($columnTdArray = $selectedVisibleColumnsData[$column->setIndexes($rowIndex, $colIndex)->getHash()])
47-
<x-livewire-tables::table.td x-ref="{{ $dataTableFingerprint . '_' . $rowIndex . '_' . $colIndex }}"
48-
:$columnTdArray
49-
:customAttributes="$columnTdArray['hasTdAttributesCallback'] ? $this->getTdAttributes($column, $row, $colIndex, $rowIndex) : ['default' => true, 'default-colors' => true, 'default-styling' => true]"
50-
:$colIndex
51-
wire:key="{{ $dataTableFingerprint . '-table-td-'.$rowPk.'-'.$columnTdArray['slug'] }}"
52-
53-
>
54-
@if($columnTdArray['isHtml'])
55-
{!! $column->renderContents($row) !!}
56-
@else
57-
{{ $column->renderContents($row) }}
58-
@endif
59-
</x-livewire-tables::table.td>
60-
@endtableloop
6146
</x-livewire-tables::table.tr>
6247

6348
@if ($showCollapsingColumnSections)

resources/views/components/tools/filter-pills/pills-item.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
$attributes->merge($filterPillsItemAttributes)
1212
->class([
1313
'inline-flex items-center px-2.5 py-0.5 rounded-full leading-4' => $isTailwind && ($filterPillsItemAttributes['default-styling'] ?? true),
14-
'text-xs font-medium capitalize' => $isTailwind && ($filterPillsItemAttributes['default-text'] ?? ($filterPillsItemAttributes['default-styling'] ?? true)),
14+
'text-xs font-medium' => $isTailwind && ($filterPillsItemAttributes['default-text'] ?? ($filterPillsItemAttributes['default-styling'] ?? true)),
1515
'bg-indigo-100 text-indigo-800 dark:bg-indigo-200 dark:text-indigo-900' => $isTailwind && ($filterPillsItemAttributes['default-colors'] ?? true),
1616
1717
'tw4ph inline-flex items-center px-2.5 py-0.5 rounded-full leading-4' => $isTailwind4 && ($filterPillsItemAttributes['default-styling'] ?? true),
18-
'tw4ph text-xs font-medium capitalize' => $isTailwind4 && ($filterPillsItemAttributes['default-text'] ?? ($filterPillsItemAttributes['default-styling'] ?? true)),
18+
'tw4ph text-xs font-medium' => $isTailwind4 && ($filterPillsItemAttributes['default-text'] ?? ($filterPillsItemAttributes['default-styling'] ?? true)),
1919
'tw4ph bg-indigo-100 text-indigo-800 dark:bg-indigo-200 dark:text-indigo-900' => $isTailwind4 && ($filterPillsItemAttributes['default-colors'] ?? true),
2020
2121
'badge badge-pill badge-info d-inline-flex align-items-center' => $isBootstrap4 && ($filterPillsItemAttributes['default-styling'] ?? true),

0 commit comments

Comments
 (0)