- @if ($this->paginationVisibilityIsEnabled())
- @if ($this->paginationIsEnabled() && $this->isPaginationMethod('standard') && $this->getRows->lastPage() > 1)
+ @else
+ @if ($this->paginationIsEnabled && $this->isPaginationMethod('standard') && $currentRows->lastPage() > 1)
-@if ($this->hasConfigurableAreaFor('after-pagination'))
- @include($this->getConfigurableAreaFor('after-pagination'), $this->getParametersForConfigurableArea('after-pagination'))
-@endif
\ No newline at end of file
+@includeWhen(
+ $this->hasConfigurableAreaFor('after-pagination'),
+ $this->getConfigurableAreaFor('after-pagination'),
+ $this->getParametersForConfigurableArea('after-pagination')
+)
diff --git a/resources/views/components/table.blade.php b/resources/views/components/table.blade.php
index 0b92e6f39..a972275b0 100644
--- a/resources/views/components/table.blade.php
+++ b/resources/views/components/table.blade.php
@@ -1,4 +1,4 @@
-@aware(['component', 'tableName','isTailwind','isBootstrap'])
+@aware([ 'tableName','isTailwind','isBootstrap'])
@php
$customAttributes = [
@@ -13,19 +13,24 @@
@endif
diff --git a/resources/views/components/table/collapsed-columns.blade.php b/resources/views/components/table/collapsed-columns.blade.php
index ba21ee2ba..c46097a7f 100644
--- a/resources/views/components/table/collapsed-columns.blade.php
+++ b/resources/views/components/table/collapsed-columns.blade.php
@@ -1,75 +1,49 @@
-@aware(['component', 'tableName', 'primaryKey','isTailwind','isBootstrap'])
+@aware([ 'tableName', 'primaryKey','isTailwind','isBootstrap'])
@props(['row', 'rowIndex'])
-@php
- $customAttributes = $this->getTrAttributes($row, $rowIndex);
-@endphp
-
-@if ($this->collapsingColumnsAreEnabled() && $this->hasCollapsedColumns())
- @php
- $colspan = $this->getColspanCount();
- $columns = collect();
-
- if($this->shouldCollapseAlways())
- {
- $columns->push($this->getCollapsedAlwaysColumns());
- }
- if ($this->shouldCollapseOnMobile() && $this->shouldCollapseOnTablet()) {
- $columns->push($this->getCollapsedMobileColumns());
- $columns->push($this->getCollapsedTabletColumns());
- } elseif ($this->shouldCollapseOnTablet() && ! $this->shouldCollapseOnMobile()) {
- $columns->push($this->getCollapsedTabletColumns());
- } elseif ($this->shouldCollapseOnMobile() && ! $this->shouldCollapseOnTablet()) {
- $columns->push($this->getCollapsedMobileColumns());
- }
-
- $columns = $columns->collapse();
- @endphp
-
-
merge($customAttributes)
- ->class(['hidden bg-white dark:bg-gray-700 dark:text-white rappasoft-striped-row' => ($isTailwind && ($customAttributes['default'] ?? true) && $rowIndex % 2 === 0)])
- ->class(['hidden bg-gray-50 dark:bg-gray-800 dark:text-white rappasoft-striped-row' => ($isTailwind && ($customAttributes['default'] ?? true) && $rowIndex % 2 !== 0)])
- ->class(['d-none bg-light rappasoft-striped-row' => ($isBootstrap && $rowIndex % 2 === 0 && ($customAttributes['default'] ?? true))])
- ->class(['d-none bg-white rappasoft-striped-row' => ($isBootstrap && $rowIndex % 2 !== 0 && ($customAttributes['default'] ?? true))])
- ->except(['default'])
+ $attributes->merge([
+ 'wire:loading.class.delay' => 'opacity-50 dark:bg-gray-900 dark:opacity-60',
+ 'wire:key' => $tableName.'-row-'.$row->{$primaryKey}.'-collapsed-contents',
+ ])
+ ->merge($customAttributes)
+ ->class([
+ 'hidden bg-white dark:bg-gray-700 dark:text-white rappasoft-striped-row' => ($isTailwind && ($customAttributes['default'] ?? true) && $rowIndex % 2 === 0),
+ 'hidden bg-gray-50 dark:bg-gray-800 dark:text-white rappasoft-striped-row' => ($isTailwind && ($customAttributes['default'] ?? true) && $rowIndex % 2 !== 0),
+ 'd-none bg-light rappasoft-striped-row' => ($isBootstrap && $rowIndex % 2 === 0 && ($customAttributes['default'] ?? true)),
+ 'd-none bg-white rappasoft-striped-row' => ($isBootstrap && $rowIndex % 2 !== 0 && ($customAttributes['default'] ?? true)),
+ ])
+ ->except(['default','default-styling','default-colors'])
}}
-
>
- $isTailwind,
'text-start pt-3 p-2' => $isBootstrap,
- ])
- colspan="{{ $colspan }}"
- >
+ ])>
- @foreach($columns as $colIndex => $column)
- @continue($column->isHidden())
- @continue($this->columnSelectIsEnabled() && ! $this->columnSelectIsEnabledForColumn($column))
-
-
$isTailwind && $column->shouldCollapseAlways(),
- 'block mb-2 sm:hidden' => $isTailwind && !$column->shouldCollapseAlways() && !$column->shouldCollapseOnTablet() && !$column->shouldCollapseOnMobile(),
- 'block mb-2 md:hidden' => $isTailwind && !$column->shouldCollapseAlways() && !$column->shouldCollapseOnTablet() && $column->shouldCollapseOnMobile(),
- 'block mb-2 lg:hidden' => $isTailwind && !$column->shouldCollapseAlways() && ($column->shouldCollapseOnTablet() || $column->shouldCollapseOnMobile()),
-
- 'd-block mb-2' => $isBootstrap && $column->shouldCollapseAlways(),
- 'd-block mb-2 d-sm-none' => $isBootstrap && !$column->shouldCollapseAlways() && !$column->shouldCollapseOnTablet() && !$column->shouldCollapseOnMobile(),
- 'd-block mb-2 d-md-none' => $isBootstrap && !$column->shouldCollapseAlways() && !$column->shouldCollapseOnTablet() && $column->shouldCollapseOnMobile(),
- 'd-block mb-2 d-lg-none' => $isBootstrap && !$column->shouldCollapseAlways() && ($column->shouldCollapseOnTablet() || $column->shouldCollapseOnMobile()),
-
- ])
- >
- {{ $column->getTitle() }} : {{ $column->renderContents($row) }}
+ @foreach($this->getCollapsedColumnsForContent as $colIndex => $column)
+
+
$isTailwind,
+ 'sm:block' => $isTailwind && $column->shouldCollapseAlways(),
+ 'sm:block md:hidden' => $isTailwind && !$column->shouldCollapseAlways() && !$column->shouldCollapseOnTablet() && $column->shouldCollapseOnMobile(),
+ 'sm:block lg:hidden' => $isTailwind && !$column->shouldCollapseAlways() && ($column->shouldCollapseOnTablet() || $column->shouldCollapseOnMobile()),
+
+ 'd-block mb-2' => $isBootstrap,
+ 'd-sm-none' => $isBootstrap && !$column->shouldCollapseAlways() && !$column->shouldCollapseOnTablet() && !$column->shouldCollapseOnMobile(),
+ 'd-md-none' => $isBootstrap && !$column->shouldCollapseAlways() && !$column->shouldCollapseOnTablet() && $column->shouldCollapseOnMobile(),
+ 'd-lg-none' => $isBootstrap && !$column->shouldCollapseAlways() && ($column->shouldCollapseOnTablet() || $column->shouldCollapseOnMobile()),
+ ])>
+ {{ $column->getTitle() }} :
+ @if($column->isHtml())
+ {!! $column->setIndexes($rowIndex, $colIndex)->renderContents($row) !!}
+ @else
+ {{ $column->setIndexes($rowIndex, $colIndex)->renderContents($row) }}
+ @endif
@endforeach
diff --git a/resources/views/components/table/empty.blade.php b/resources/views/components/table/empty.blade.php
index a5f1b5d22..705f93d48 100644
--- a/resources/views/components/table/empty.blade.php
+++ b/resources/views/components/table/empty.blade.php
@@ -1,4 +1,4 @@
-@aware(['component','isTailwind','isBootstrap'])
+@aware(['isTailwind','isBootstrap'])
@php($attributes = $attributes->merge(['wire:key' => 'empty-message-'.$this->getId()]))
diff --git a/resources/views/components/table/td.blade.php b/resources/views/components/table/td.blade.php
index 926cd3ae2..9fae459d3 100644
--- a/resources/views/components/table/td.blade.php
+++ b/resources/views/components/table/td.blade.php
@@ -1,4 +1,4 @@
-@aware(['component', 'row', 'rowIndex', 'tableName', 'primaryKey','isTailwind','isBootstrap'])
+@aware([ 'row', 'rowIndex', 'tableName', 'primaryKey','isTailwind','isBootstrap'])
@props(['column', 'colIndex'])
@php
@@ -7,22 +7,24 @@
isClickable())
- @if($this->getTableRowUrlTarget($row) === "navigate") wire:navigate href="{{ $this->getTableRowUrl($row) }}"
+ @if($this->getTableRowUrlTarget($row) === 'navigate') wire:navigate href="{{ $this->getTableRowUrl($row) }}"
@else onclick="window.open('{{ $this->getTableRowUrl($row) }}', '{{ $this->getTableRowUrlTarget($row) ?? '_self' }}')"
@endif
@endif
{{
$attributes->merge($customAttributes)
- ->class(['px-6 py-4 whitespace-nowrap text-sm font-medium dark:text-white' => $isTailwind && ($customAttributes['default'] ?? true)])
- ->class(['hidden' => $isTailwind && $column && $column->shouldCollapseAlways()])
- ->class(['hidden md:table-cell' => $isTailwind && $column && $column->shouldCollapseOnMobile()])
- ->class(['hidden lg:table-cell' => $isTailwind && $column && $column->shouldCollapseOnTablet()])
- ->class(['' => $isBootstrap && ($customAttributes['default'] ?? true)])
- ->class(['d-none' => $isBootstrap && $column && $column->shouldCollapseAlways()])
- ->class(['d-none d-md-table-cell' => $isBootstrap && $column && $column->shouldCollapseOnMobile()])
- ->class(['d-none d-lg-table-cell' => $isBootstrap && $column && $column->shouldCollapseOnTablet()])
- ->class(['laravel-livewire-tables-cursor' => $isBootstrap && $column && $column->isClickable()])
- ->except('default')
+ ->class([
+ 'px-6 py-4 whitespace-nowrap text-sm font-medium dark:text-white' => $isTailwind && ($customAttributes['default'] ?? true),
+ 'hidden' => $isTailwind && $column && $column->shouldCollapseAlways(),
+ 'hidden md:table-cell' => $isTailwind && $column && $column->shouldCollapseOnMobile(),
+ 'hidden lg:table-cell' => $isTailwind && $column && $column->shouldCollapseOnTablet(),
+ '' => $isBootstrap && ($customAttributes['default'] ?? true),
+ 'd-none' => $isBootstrap && $column && $column->shouldCollapseAlways(),
+ 'd-none d-md-table-cell' => $isBootstrap && $column && $column->shouldCollapseOnMobile(),
+ 'd-none d-lg-table-cell' => $isBootstrap && $column && $column->shouldCollapseOnTablet(),
+ 'laravel-livewire-tables-cursor' => $isBootstrap && $column && $column->isClickable(),
+ ])
+ ->except(['default','default-styling','default-colors'])
}}
>
{{ $slot }}
diff --git a/resources/views/components/table/td/bulk-actions.blade.php b/resources/views/components/table/td/bulk-actions.blade.php
index 341ad650c..1b4049042 100644
--- a/resources/views/components/table/td/bulk-actions.blade.php
+++ b/resources/views/components/table/td/bulk-actions.blade.php
@@ -1,32 +1,21 @@
-@aware(['component', 'tableName','primaryKey'])
+@aware([ 'tableName','primaryKey', 'isTailwind', 'isBootstrap', 'isBootstrap4', 'isBootstrap5'])
@props(['row', 'rowIndex'])
@php
- $customAttributes = $this->getBulkActionsTdAttributes();
- $bulkActionsTdCheckboxAttributes = $this->getBulkActionsTdCheckboxAttributes();
- $theme = $this->getTheme();
+ $tdAttributes = $this->getBulkActionsTdAttributes;
+ $tdCheckboxAttributes = $this->getBulkActionsTdCheckboxAttributes;
@endphp
-@if ($this->bulkActionsAreEnabled() && $this->hasBulkActions())
-
+@if ($this->showBulkActionsSections())
+
$theme === 'tailwind',
- 'form-check' => $theme === 'bootstrap-5',
+ 'inline-flex rounded-md shadow-sm' => $isTailwind,
+ 'form-check' => $isBootstrap5,
])>
- merge($bulkActionsTdCheckboxAttributes)->class([
- 'rounded border-gray-300 text-indigo-600 shadow-sm transition duration-150 ease-in-out focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50 dark:bg-gray-900 dark:text-white dark:border-gray-600 dark:hover:bg-gray-600 dark:focus:bg-gray-600' => ($theme === 'tailwind') && ($bulkActionsTdCheckboxAttributes['default'] ?? true),
- 'form-check-input' => ($theme === 'bootstrap-5') && ($bulkActionsTdCheckboxAttributes['default'] ?? true),
- 'except' => 'default',
- ])
- }}
+ :checkboxAttributes=$tdCheckboxAttributes
/>
diff --git a/resources/views/components/table/td/collapsed-columns.blade.php b/resources/views/components/table/td/collapsed-columns.blade.php
index 29cb50feb..078c1e39b 100644
--- a/resources/views/components/table/td/collapsed-columns.blade.php
+++ b/resources/views/components/table/td/collapsed-columns.blade.php
@@ -1,82 +1,52 @@
-@aware(['component', 'tableName','isTailwind','isBootstrap'])
+@aware([ 'tableName','isTailwind','isBootstrap'])
@props(['rowIndex', 'hidden' => false])
-@if ($this->collapsingColumnsAreEnabled() && $this->hasCollapsedColumns())
- @if ($isTailwind)
- merge(['class' => 'p-3 table-cell text-center '])
- ->class(['sm:hidden' => !$this->shouldCollapseAlways() && !$this->shouldCollapseOnTablet()])
- ->class(['md:hidden' => !$this->shouldCollapseAlways() && !$this->shouldCollapseOnTablet() && $this->shouldCollapseOnMobile()])
- ->class(['lg:hidden' => !$this->shouldCollapseAlways() && ($this->shouldCollapseOnTablet() || $this->shouldCollapseOnMobile())])
- }}
- :class="currentlyReorderingStatus ? 'laravel-livewire-tables-reorderingMinimised' : ''"
- >
- @if (! $hidden)
-
- merge($this->getCollapsingColumnButtonExpandAttributes)
- ->class([
- 'h-6 w-6' => $this->getCollapsingColumnButtonExpandAttributes['default-styling'] ?? true,
- 'text-green-600' => $this->getCollapsingColumnButtonExpandAttributes['default-colors'] ?? true,
- ])
- ->except('default')
- }}
- />
- merge($this->getCollapsingColumnButtonCollapseAttributes)
- ->class([
- 'h-6 w-6' => $this->getCollapsingColumnButtonCollapseAttributes['default-styling'] ?? true,
- 'text-yellow-600' => $this->getCollapsingColumnButtonCollapseAttributes['default-colors'] ?? true,
- ])
- ->except('default')
- }}
- />
-
- @endif
-
- @elseif ($isBootstrap)
- class(['d-sm-none' => !$this->shouldCollapseAlways() && !$this->shouldCollapseOnTablet()])
- ->class(['d-md-none' => !$this->shouldCollapseAlways() && !$this->shouldCollapseOnTablet() && $this->shouldCollapseOnMobile()])
- ->class(['d-lg-none' => !$this->shouldCollapseAlways() && ($this->shouldCollapseOnTablet() || $this->shouldCollapseOnMobile())])
- }}
- :class="currentlyReorderingStatus ? 'laravel-livewire-tables-reorderingMinimised' : ''"
- >
- @if (! $hidden)
-
- merge($this->getCollapsingColumnButtonExpandAttributes)
- ->class([
- 'laravel-livewire-tables-btn-lg text-success' => $this->getCollapsingColumnButtonExpandAttributes['default-colors'] ?? true,
- ])
- ->except('default')
- }}
- />
- merge($this->getCollapsingColumnButtonExpandAttributes)
- ->class([
- 'laravel-livewire-tables-btn-lg text-warning' => $this->getCollapsingColumnButtonExpandAttributes['default-colors'] ?? true,
- ])
- ->except('default')
- }}
- />
-
- @endif
-
- @endif
+@if ($this->collapsingColumnsAreEnabled && $this->hasCollapsedColumns)
+ merge()
+ ->class([
+ 'p-3 table-cell text-center' => $isTailwind,
+ 'sm:hidden' => $isTailwind && !$this->shouldCollapseAlways() && !$this->shouldCollapseOnTablet(),
+ 'md:hidden' => $isTailwind && !$this->shouldCollapseAlways() && !$this->shouldCollapseOnTablet() && $this->shouldCollapseOnMobile(),
+ 'lg:hidden' => $isTailwind && !$this->shouldCollapseAlways() && ($this->shouldCollapseOnTablet() || $this->shouldCollapseOnMobile()),
+ 'd-sm-none' => $isBootstrap && !$this->shouldCollapseAlways() && !$this->shouldCollapseOnTablet(),
+ 'd-md-none' => $isBootstrap && !$this->shouldCollapseAlways() && !$this->shouldCollapseOnTablet() && $this->shouldCollapseOnMobile(),
+ 'd-lg-none' => $isBootstrap && !$this->shouldCollapseAlways() && ($this->shouldCollapseOnTablet() || $this->shouldCollapseOnMobile()),
+ ])
+ }}
+ :class="currentlyReorderingStatus ? 'laravel-livewire-tables-reorderingMinimised' : ''"
+ >
+ @if (! $hidden)
+ $isBootstrap
+ ])
+ >
+ merge($this->getCollapsingColumnButtonExpandAttributes)
+ ->class([
+ 'h-6 w-6' => $isTailwind && ($this->getCollapsingColumnButtonExpandAttributes['default-styling'] ?? true),
+ 'text-green-600' => $isTailwind && ($this->getCollapsingColumnButtonExpandAttributes['default-colors'] ?? true),
+ 'laravel-livewire-tables-btn-lg text-success' => $isBootstrap && ($this->getCollapsingColumnButtonExpandAttributes['default-colors'] ?? true)
+ ])
+ ->except(['default','default-styling','default-colors'])
+ }}
+ />
+ merge($this->getCollapsingColumnButtonCollapseAttributes)
+ ->class([
+ 'h-6 w-6' => $isTailwind && ($this->getCollapsingColumnButtonCollapseAttributes['default-styling'] ?? true),
+ 'text-yellow-600' => $isTailwind && ($this->getCollapsingColumnButtonCollapseAttributes['default-colors'] ?? true),
+ 'laravel-livewire-tables-btn-lg text-warning' => $isBootstrap && ($this->getCollapsingColumnButtonExpandAttributes['default-colors'] ?? true),
+ ])
+ ->except(['default','default-styling','default-colors'])
+ }}
+ />
+
+ @endif
+
@endif
diff --git a/resources/views/components/table/td/plain.blade.php b/resources/views/components/table/td/plain.blade.php
index 54c9efc67..d47872a03 100644
--- a/resources/views/components/table/td/plain.blade.php
+++ b/resources/views/components/table/td/plain.blade.php
@@ -1,25 +1,30 @@
-@aware(['component', 'rowIndex', 'rowID','isTailwind','isBootstrap'])
+@aware([ 'rowIndex', 'rowID','isTailwind','isBootstrap'])
@props(['column' => null, 'customAttributes' => [], 'displayMinimisedOnReorder' => false, 'hideUntilReorder' => false])
+
@if ($isTailwind)
merge($customAttributes)
- ->class(['px-6 py-4 whitespace-nowrap text-sm font-medium dark:text-white' => $customAttributes['default'] ?? true])
- ->class(['hidden' => $column && $column->shouldCollapseAlways()])
- ->class(['hidden md:table-cell' => $column && $column->shouldCollapseOnMobile()])
- ->class(['hidden lg:table-cell' => $column && $column->shouldCollapseOnTablet()])
- ->except('default')
+ ->class([
+ 'px-6 py-4 whitespace-nowrap text-sm font-medium dark:text-white' => $customAttributes['default'] ?? true,
+ 'hidden' => $column && $column->shouldCollapseAlways(),
+ 'hidden md:table-cell' => $column && $column->shouldCollapseOnMobile(),
+ 'hidden lg:table-cell' => $column && $column->shouldCollapseOnTablet(),
+ ])
+ ->except(['default','default-styling','default-colors'])
}} @if($hideUntilReorder) x-show="reorderDisplayColumn" @endif >
{{ $slot }}
@elseif ($isBootstrap)
merge($customAttributes)
- ->class(['' => $customAttributes['default'] ?? true])
- ->class(['d-none' => $column && $column->shouldCollapseAlways()])
- ->class(['d-none d-md-table-cell' => $column && $column->shouldCollapseOnMobile()])
- ->class(['d-none d-lg-table-cell' => $column && $column->shouldCollapseOnTablet()])
- ->except('default')
+ ->class([
+ '' => $customAttributes['default'] ?? true,
+ 'd-none' => $column && $column->shouldCollapseAlways(),
+ 'd-none d-md-table-cell' => $column && $column->shouldCollapseOnMobile(),
+ 'd-none d-lg-table-cell' => $column && $column->shouldCollapseOnTablet(),
+ ])
+ ->except(['default','default-styling','default-colors'])
}}>
{{ $slot }}
diff --git a/resources/views/components/table/td/reorder.blade.php b/resources/views/components/table/td/reorder.blade.php
index d47b4629e..6b8c9b7a5 100644
--- a/resources/views/components/table/td/reorder.blade.php
+++ b/resources/views/components/table/td/reorder.blade.php
@@ -1,8 +1,6 @@
-@aware(['component', 'tableName'])
+@aware([ 'tableName', 'isTailwind', 'isBootstrap', 'isBootstrap4', 'isBootstrap5'])
@props(['rowID', 'rowIndex'])
-@php($theme = $this->getTheme())
-
$theme === 'tailwind',
- 'd-inline' => $theme === 'bootstrap-4' || $theme === 'bootstrap-5',
+ 'inline w-4 h-4' => $isTailwind,
+ 'd-inline' => ($isBootstrap4 || $isBootstrap5),
])
@style([
- 'width:1em; height:1em;' => $theme === 'bootstrap-4' || $theme === 'bootstrap-5',
+ 'width:1em; height:1em;' => ($isBootstrap4 || $isBootstrap5),
])
>
diff --git a/resources/views/components/table/th.blade.php b/resources/views/components/table/th.blade.php
index 10436241f..3562f4cf6 100644
--- a/resources/views/components/table/th.blade.php
+++ b/resources/views/components/table/th.blade.php
@@ -1,90 +1,61 @@
-@aware(['component', 'tableName','isTailwind','isBootstrap'])
+@aware(['isTailwind','isBootstrap'])
@props(['column', 'index'])
@php
- $attributes = $attributes->merge(['wire:key' => $tableName . '-header-col-'.$column->getSlug()]);
- $customAttributes = $this->getThAttributes($column);
- $customSortButtonAttributes = $this->getThSortButtonAttributes($column);
- $direction = $column->hasField() ? $this->getSort($column->getColumnSelectName()) : $this->getSort($column->getSlug()) ?? null ;
+ $allThAttributes = $this->getAllThAttributes($column);
+ $customThAttributes = $allThAttributes['customAttributes'];
+ $customSortButtonAttributes = $allThAttributes['sortButtonAttributes'];
+ $customLabelAttributes = $allThAttributes['labelAttributes'];
+ $customIconAttributes = $this->getThSortIconAttributes($column);
+ $direction = $column->hasField() ? $this->getSort($column->getColumnSelectName()) : $this->getSort($column->getSlug()) ?? null;
@endphp
-@if ($isTailwind)
- merge($customAttributes)
- ->class(['px-6 py-3 text-left text-xs font-medium whitespace-nowrap text-gray-500 uppercase tracking-wider dark:bg-gray-800 dark:text-gray-400' => $customAttributes['default'] ?? true])
- ->class(['hidden' => $column->shouldCollapseAlways()])
- ->class(['hidden md:table-cell' => $column->shouldCollapseOnMobile()])
- ->class(['hidden lg:table-cell' => $column->shouldCollapseOnTablet()])
- ->except('default')
- }}
- >
- @if($column->getColumnLabelStatus())
- @unless ($this->sortingIsEnabled() && ($column->isSortable() || $column->getSortCallback()))
- {{ $column->getTitle() }}
- @else
- merge($customSortButtonAttributes)
- ->class(['flex items-center space-x-1 text-left text-xs leading-4 font-medium text-gray-500 uppercase tracking-wider group focus:outline-none dark:text-gray-400' => $customSortButtonAttributes['default'] ?? true])
- ->except(['default', 'wire:key'])
- }}
- >
- merge($customAttributes)
- ->class(['text-left text-xs font-medium whitespace-nowrap text-gray-500 uppercase tracking-wider dark:bg-gray-800 dark:text-gray-400' => $customAttributes['default'] ?? true])
- ->class(['hidden' => $column->shouldCollapseAlways()])
- ->class(['hidden md:table-cell' => $column->shouldCollapseOnMobile()])
- ->class(['hidden lg:table-cell' => $column->shouldCollapseOnTablet()])
- ->except('default')
- }}>{{ $column->getTitle() }}
+merge($customThAttributes)
+ ->class([
+ 'text-gray-500 dark:bg-gray-800 dark:text-gray-400' => $isTailwind && (($customThAttributes['default-colors'] ?? true) || ($customThAttributes['default'] ?? true)),
+ 'px-6 py-3 text-left text-xs font-medium whitespace-nowrap uppercase tracking-wider' => $isTailwind && (($customThAttributes['default-styling'] ?? true) || ($customThAttributes['default'] ?? true)),
+ 'hidden' => $isTailwind && $column->shouldCollapseAlways(),
+ 'hidden md:table-cell' => $isTailwind && $column->shouldCollapseOnMobile(),
+ 'hidden lg:table-cell' => $isTailwind && $column->shouldCollapseOnTablet(),
+ '' => $isBootstrap && ($customThAttributes['default'] ?? true),
+ 'd-none' => $isBootstrap && $column->shouldCollapseAlways(),
+ 'd-none d-md-table-cell' => $isBootstrap && $column->shouldCollapseOnMobile(),
+ 'd-none d-lg-table-cell' => $isBootstrap && $column->shouldCollapseOnTablet(),
+ ])
+ ->except(['default', 'default-colors', 'default-styling'])
+}}>
+ @if($column->getColumnLabelStatus())
+ @unless ($this->sortingIsEnabled() && ($column->isSortable() || $column->getSortCallback()))
+
+ @else
+ @if ($isTailwind)
-
- @if ($direction === 'asc')
-
-
- @elseif ($direction === 'desc')
-
-
- @else
-
- @endif
-
+ merge($customSortButtonAttributes)
+ ->class([
+ 'text-gray-500 dark:text-gray-400' => (($customSortButtonAttributes['default-colors'] ?? true) || ($customSortButtonAttributes['default'] ?? true)),
+ '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)),
+ ])
+ ->except(['default', 'default-colors', 'default-styling', 'wire:key'])
+ }}>
+
+
- @endunless
- @endif
-
-@elseif ($isBootstrap)
- merge($customAttributes)
- ->class(['' => $customAttributes['default'] ?? true])
- ->class(['d-none' => $column->shouldCollapseAlways()])
- ->class(['d-none d-md-table-cell' => $column->shouldCollapseOnMobile()])
- ->class(['d-none d-lg-table-cell' => $column->shouldCollapseOnTablet()])
- ->except('default')
- }}
- >
- @if($column->getColumnLabelStatus())
- @unless ($this->sortingIsEnabled() && ($column->isSortable() || $column->getSortCallback()))
- {{ $column->getTitle() }}
- @else
-
-
{{ $column->getTitle() }}
+ @elseif ($isBootstrap)
+
merge($customSortButtonAttributes)
+ ->class([
+ 'd-flex align-items-center laravel-livewire-tables-cursor' => (($customSortButtonAttributes['default-styling'] ?? true) || ($customSortButtonAttributes['default'] ?? true))
+ ])
+ ->except(['default', 'default-colors', 'default-styling', 'wire:key'])
+ }}>
+
+
-
- @if ($direction === 'asc')
-
- @elseif ($direction === 'desc')
-
- @else
-
- @endif
-
- @endunless
- @endif
-
-@endif
+ @endif
+
+ @endunless
+ @endif
+
diff --git a/resources/views/components/table/th/bulk-actions.blade.php b/resources/views/components/table/th/bulk-actions.blade.php
index b07a67f09..64bc3632c 100644
--- a/resources/views/components/table/th/bulk-actions.blade.php
+++ b/resources/views/components/table/th/bulk-actions.blade.php
@@ -1,19 +1,18 @@
-@aware(['component', 'tableName'])
+@aware(['tableName','isTailwind', 'isBootstrap'])
@php
- $customAttributes = $this->getBulkActionsThAttributes();
+ $customAttributes = $this->hasBulkActionsThAttributes ? $this->getBulkActionsThAttributes : $this->getAllThAttributes($this->getBulkActionsColumn())['customAttributes'];
$bulkActionsThCheckboxAttributes = $this->getBulkActionsThCheckboxAttributes();
- $theme = $this->getTheme();
@endphp
@if ($this->bulkActionsAreEnabled() && $this->hasBulkActions())
-
+
$theme === 'tailwind',
- 'form-check' => $theme === 'bootstrap-5',
+ 'inline-flex rounded-md shadow-sm' => $isTailwind,
+ 'form-check' => $isBootstrap,
])
>
merge($bulkActionsThCheckboxAttributes)->class([
- 'rounded border-gray-300 text-indigo-600 shadow-sm transition duration-150 ease-in-out focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50 dark:bg-gray-900 dark:text-white dark:border-gray-600 dark:hover:bg-gray-600 dark:focus:bg-gray-600' => ($theme === 'tailwind') && ($bulkActionsThCheckboxAttributes['default'] ?? true),
- 'form-check-input' => ($theme === 'bootstrap-5') && ($bulkActionsThCheckboxAttributes['default'] ?? true),
- 'except' => 'default',
- ])
+ 'border-gray-300 text-indigo-600 focus:border-indigo-300 focus:ring-indigo-200 dark:bg-gray-900 dark:text-white dark:border-gray-600 dark:hover:bg-gray-600 dark:focus:bg-gray-600' => $isTailwind && (($bulkActionsThCheckboxAttributes['default'] ?? true) || ($bulkActionsThCheckboxAttributes['default-colors'] ?? true)),
+ 'rounded shadow-sm transition duration-150 ease-in-out focus:ring focus:ring-opacity-50 ' => $isTailwind && (($bulkActionsThCheckboxAttributes['default'] ?? true) || ($bulkActionsThCheckboxAttributes['default-styling'] ?? true)),
+ 'form-check-input' => $isBootstrap && ($bulkActionsThCheckboxAttributes['default'] ?? true),
+ ])->except(['default','default-styling','default-colors'])
}}
/>
-@endif
+@endif
\ No newline at end of file
diff --git a/resources/views/components/table/th/collapsed-columns.blade.php b/resources/views/components/table/th/collapsed-columns.blade.php
index 4965c2dd2..e05021bd2 100644
--- a/resources/views/components/table/th/collapsed-columns.blade.php
+++ b/resources/views/components/table/th/collapsed-columns.blade.php
@@ -1,29 +1,16 @@
-@aware(['component', 'tableName','isTailwind','isBootstrap'])
-
-@if ($this->collapsingColumnsAreEnabled() && $this->hasCollapsedColumns())
- @if ($isTailwind)
- merge(['class' => 'table-cell dark:bg-gray-800 laravel-livewire-tables-reorderingMinimised'])
- ->class(['sm:hidden' => !$this->shouldCollapseOnTablet() && !$this->shouldCollapseAlways()])
- ->class(['md:hidden' => !$this->shouldCollapseOnMobile() && !$this->shouldCollapseOnTablet() && !$this->shouldCollapseAlways()])
- ->class(['lg:hidden' => !$this->shouldCollapseAlways()])
- }}
- :class="{ 'laravel-livewire-tables-reorderingMinimised': ! currentlyReorderingStatus }"
- >
- @elseif ($isBootstrap)
- merge(['class' => 'd-table-cell laravel-livewire-tables-reorderingMinimised'])
- ->class(['d-sm-none' => !$this->shouldCollapseOnTablet() && !$this->shouldCollapseAlways()])
- ->class(['d-md-none' => !$this->shouldCollapseOnMobile() && !$this->shouldCollapseOnTablet() && !$this->shouldCollapseAlways()])
- ->class(['d-lg-none' => !$this->shouldCollapseAlways()])
- }}
- :class="{ 'laravel-livewire-tables-reorderingMinimised': ! currentlyReorderingStatus }"
- >
- @endif
+@aware(['isTailwind', 'isBootstrap'])
+@if ($this->collapsingColumnsAreEnabled && $this->hasCollapsedColumns)
+ merge()
+ ->class([
+ 'table-cell dark:bg-gray-800 laravel-livewire-tables-reorderingMinimised' => $isTailwind,
+ 'sm:hidden' => $isTailwind && !$this->shouldCollapseOnTablet && !$this->shouldCollapseAlways,
+ 'md:hidden' => $isTailwind && !$this->shouldCollapseOnMobile && !$this->shouldCollapseOnTablet && !$this->shouldCollapseAlways,
+ 'lg:hidden' => $isTailwind && !$this->shouldCollapseAlways,
+ 'd-table-cell laravel-livewire-tables-reorderingMinimised' => $isBootstrap,
+ 'd-sm-none' => $isBootstrap && !$this->shouldCollapseOnTablet && !$this->shouldCollapseAlways,
+ 'd-md-none' => $isBootstrap && !$this->shouldCollapseOnMobile && !$this->shouldCollapseOnTablet && !$this->shouldCollapseAlways,
+ 'd-lg-none' => $isBootstrap && !$this->shouldCollapseAlways,
+ ])
+ }}>
@endif
diff --git a/resources/views/components/table/th/label.blade.php b/resources/views/components/table/th/label.blade.php
new file mode 100644
index 000000000..bafe25fdb
--- /dev/null
+++ b/resources/views/components/table/th/label.blade.php
@@ -0,0 +1,4 @@
+@props(['columnTitle' => '', 'customLabelAttributes' => ['default' => true]])
+except(['default', 'default-colors', 'default-styling']) }}>
+ {{ $columnTitle }}
+
diff --git a/resources/views/components/table/th/plain.blade.php b/resources/views/components/table/th/plain.blade.php
index c8d36ad32..929bf1630 100644
--- a/resources/views/components/table/th/plain.blade.php
+++ b/resources/views/components/table/th/plain.blade.php
@@ -1,14 +1,12 @@
-@aware(['component','isTailwind','isBootstrap'])
+@aware(['isTailwind', 'isBootstrap'])
@props(['displayMinimisedOnReorder' => false, 'hideUntilReorder' => false, 'customAttributes' => ['default' => true]])
-merge($customAttributes)->class([
- 'table-cell px-3 py-2 md:px-6 md:py-3 text-center md:text-left bg-gray-50 dark:bg-gray-800 laravel-livewire-tables-reorderingMinimised' => ($isTailwind) && ($customAttributes['default'] ?? true),
- 'laravel-livewire-tables-reorderingMinimised' => ($isBootstrap) && ($customAttributes['default'] ?? true),
- ])
- }}
- @if($hideUntilReorder) :class="!reorderDisplayColumn && 'w-0 p-0 hidden'" @endif
->
+ 'table-cell px-3 py-2 md:px-6 md:py-3 text-center md:text-left laravel-livewire-tables-reorderingMinimised' => $isTailwind && (($customAttributes['default-styling'] ?? true) || ($customAttributes['default'] ?? true)),
+ 'bg-gray-50 dark:bg-gray-800' => $isTailwind && (($customAttributes['default-colors'] ?? true) || ($customAttributes['default'] ?? true)),
+ 'laravel-livewire-tables-reorderingMinimised' => $isBootstrap && (($customAttributes['default-colors'] ?? true) || ($customAttributes['default'] ?? true)),
+ ])->except(['default','default-styling','default-colors'])
+}}>
{{ $slot }}
diff --git a/resources/views/components/table/th/reorder.blade.php b/resources/views/components/table/th/reorder.blade.php
index b0dc73845..a3b1f7e86 100644
--- a/resources/views/components/table/th/reorder.blade.php
+++ b/resources/views/components/table/th/reorder.blade.php
@@ -1,10 +1,16 @@
-@aware(['tableName','isTailwind','isBootstrap'])
+@php
+ $customThAttributes = $this->hasReorderThAttributes() ? $this->getReorderThAttributes() : $this->getAllThAttributes($this->getReorderColumn())['customAttributes'];
+@endphp
-merge($this->getReorderThAttributes())->class([
- 'table-cell px-3 py-2 md:px-6 md:py-3 text-center md:text-left bg-gray-50 dark:bg-gray-800 laravel-livewire-tables-reorderingMinimised' => ($isTailwind) && ($this->getReorderThAttributes['default'] ?? true),
- 'laravel-livewire-tables-reorderingMinimised' => ($isBootstrap) && ($this->getReorderThAttributes['default'] ?? true),
- ])
+merge($customThAttributes)
+ ->class([
+ 'table-cell px-6 py-3 text-left text-xs font-medium whitespace-nowrap uppercase tracking-wider' => $this->isTailwind && (($customThAttributes['default-styling'] ?? true) || ($customThAttributes['default'] ?? true)),
+ 'text-gray-500 dark:bg-gray-800 dark:text-gray-400' => $this->isTailwind && (($customThAttributes['default-colors'] ?? true) || ($customThAttributes['default'] ?? true)),
+ 'laravel-livewire-tables-reorderingMinimised' => $this->isBootstrap && ($customThAttributes['default'] ?? true),
+ ])
+ ->except(['default','default-styling','default-colors'])
}}
>
diff --git a/resources/views/components/table/th/sort-icons.blade.php b/resources/views/components/table/th/sort-icons.blade.php
new file mode 100644
index 000000000..26b077bbb
--- /dev/null
+++ b/resources/views/components/table/th/sort-icons.blade.php
@@ -0,0 +1,80 @@
+@aware(['isTailwind', 'isBootstrap'])
+@props(['direction' => 'none', 'customIconAttributes'])
+ $isTailwind,
+ 'relative d-flex align-items-center' => $isBootstrap
+ ])
+>
+
+ @if($isTailwind)
+ @switch($direction)
+ @case('asc')
+ merge($customIconAttributes)
+ ->class([
+ 'w-3 h-3' => $customIconAttributes['default-styling'] ?? ($customIconAttributes['default'] ?? true),
+ 'absolute opacity-100 group-hover:opacity-0',
+ ])
+ ->except(['default', 'default-colors', 'default-styling', 'wire:key']) }} />
+ merge($customIconAttributes)
+ ->class([
+ 'w-3 h-3' => $customIconAttributes['default-styling'] ?? ($customIconAttributes['default'] ?? true),
+ 'absolute opacity-0 group-hover:opacity-100',
+ ])
+ ->except(['default', 'default-colors', 'default-styling', 'wire:key']) }} />
+ @break
+ @case('desc')
+ merge($customIconAttributes)
+ ->class([
+ 'w-3 h-3' => $customIconAttributes['default-styling'] ?? ($customIconAttributes['default'] ?? true),
+ 'absolute opacity-100 group-hover:opacity-0',
+ ])
+ ->except(['default', 'default-colors', 'default-styling', 'wire:key']) }} />
+ merge($customIconAttributes)
+ ->class([
+ 'w-3 h-3' => $customIconAttributes['default-styling'] ?? ($customIconAttributes['default'] ?? true),
+ 'absolute opacity-0 group-hover:opacity-100',
+ ])
+ ->except(['default', 'default-colors', 'default-styling', 'wire:key']) }} />
+
+ @break
+ @default
+ merge($customIconAttributes)
+ ->class([
+ 'w-3 h-3' => $customIconAttributes['default-styling'] ?? ($customIconAttributes['default'] ?? true),
+ 'absolute opacity-100 group-hover:opacity-0',
+ ])
+ ->except(['default', 'default-colors', 'default-styling', 'wire:key']) }} />
+ merge($customIconAttributes)
+ ->class([
+ 'w-3 h-3' => $customIconAttributes['default-styling'] ?? ($customIconAttributes['default'] ?? true),
+ 'absolute opacity-0 group-hover:opacity-100',
+ ])
+ ->except(['default', 'default-colors', 'default-styling', 'wire:key']) }} />
+ @endswitch
+
+
+ @else
+ @switch($direction)
+ @case('asc')
+ merge($customIconAttributes)
+ ->class([
+ 'laravel-livewire-tables-btn-smaller ms-1' => $customIconAttributes['default-styling'] ?? ($customIconAttributes['default'] ?? true),
+ ])
+ ->except(['default', 'default-colors', 'default-styling', 'wire:key']) }} />
+ @break
+ @case('desc')
+ merge($customIconAttributes)
+ ->class([
+ 'laravel-livewire-tables-btn-smaller ms-1' => $customIconAttributes['default-styling'] ?? ($customIconAttributes['default'] ?? true),
+ ])
+ ->except(['default', 'default-colors', 'default-styling', 'wire:key']) }} />
+ @break
+ @default
+ merge($customIconAttributes)
+ ->class([
+ 'laravel-livewire-tables-btn-smaller ms-1' => $customIconAttributes['default-styling'] ?? ($customIconAttributes['default'] ?? true),
+ ])
+ ->except(['default', 'default-colors', 'default-styling', 'wire:key']) }} />
+ @endswitch
+ @endif
+
diff --git a/resources/views/components/table/tr.blade.php b/resources/views/components/table/tr.blade.php
index f043fbf8a..92ef2955e 100644
--- a/resources/views/components/table/tr.blade.php
+++ b/resources/views/components/table/tr.blade.php
@@ -1,4 +1,4 @@
-@aware(['component', 'tableName','primaryKey','isTailwind','isBootstrap'])
+@aware([ 'tableName','primaryKey','isTailwind','isBootstrap'])
@props(['row', 'rowIndex'])
@php
@@ -12,9 +12,9 @@
x-on:dragover.prevent.throttle.500ms="currentlyReorderingStatus && dragOverEvent(event)"
x-on:dragleave.prevent.throttle.500ms="currentlyReorderingStatus && dragLeaveEvent(event)"
@if($this->hasDisplayLoadingPlaceholder())
- wire:loading.remove
+ wire:loading.class.add="hidden d-none"
@else
- wire:loading.class.delay="opacity-50 dark:bg-gray-900 dark:opacity-60"
+ wire:loading.class.delay="opacity-50 dark:bg-gray-900 dark:opacity-60"
@endif
id="{{ $tableName }}-row-{{ $row->{$primaryKey} }}"
:draggable="currentlyReorderingStatus"
@@ -22,12 +22,14 @@
loopType="{{ ($rowIndex % 2 === 0) ? 'even' : 'odd' }}"
{{
$attributes->merge($customAttributes)
- ->class(['bg-white dark:bg-gray-700 dark:text-white rappasoft-striped-row' => ($isTailwind && ($customAttributes['default'] ?? true) && $rowIndex % 2 === 0)])
- ->class(['bg-gray-50 dark:bg-gray-800 dark:text-white rappasoft-striped-row' => ($isTailwind && ($customAttributes['default'] ?? true) && $rowIndex % 2 !== 0)])
- ->class(['cursor-pointer' => ($isTailwind && $this->hasTableRowUrl() && ($customAttributes['default'] ?? true))])
- ->class(['bg-light rappasoft-striped-row' => ($isBootstrap && $rowIndex % 2 === 0 && ($customAttributes['default'] ?? true))])
- ->class(['bg-white rappasoft-striped-row' => ($isBootstrap && $rowIndex % 2 !== 0 && ($customAttributes['default'] ?? true))])
- ->except(['default'])
+ ->class([
+ 'bg-white dark:bg-gray-700 dark:text-white rappasoft-striped-row' => ($isTailwind && ($customAttributes['default'] ?? true) && $rowIndex % 2 === 0),
+ 'bg-gray-50 dark:bg-gray-800 dark:text-white rappasoft-striped-row' => ($isTailwind && ($customAttributes['default'] ?? true) && $rowIndex % 2 !== 0),
+ 'cursor-pointer' => ($isTailwind && $this->hasTableRowUrl() && ($customAttributes['default'] ?? true)),
+ 'bg-light rappasoft-striped-row' => ($isBootstrap && $rowIndex % 2 === 0 && ($customAttributes['default'] ?? true)),
+ 'bg-white rappasoft-striped-row' => ($isBootstrap && $rowIndex % 2 !== 0 && ($customAttributes['default'] ?? true)),
+ ])
+ ->except(['default','default-styling','default-colors'])
}}
>
diff --git a/resources/views/components/table/tr/bulk-actions.blade.php b/resources/views/components/table/tr/bulk-actions.blade.php
index 73201debf..64a788d99 100644
--- a/resources/views/components/table/tr/bulk-actions.blade.php
+++ b/resources/views/components/table/tr/bulk-actions.blade.php
@@ -1,4 +1,4 @@
-@aware(['component', 'tableName','isTailwind','isBootstrap'])
+@aware([ 'tableName', 'isTailwind', 'isBootstrap', 'localisationPath'])
@if ($this->bulkActionsAreEnabled() && $this->hasBulkActions())
@php
@@ -7,134 +7,94 @@
$simplePagination = $this->isPaginationMethod('simple');
@endphp
- @if ($isTailwind)
-
-
-
-
-
- @lang('You are currently selecting all')
- @if(!$simplePagination) @endif
- @lang('rows').
-
+
$isTailwind,
+ ])
+ >
+
+
+
+
+ {{ __($localisationPath.'You are currently selecting all') }}
+ @if(!$simplePagination) @endif
+ {{ __($localisationPath.'rows') }}.
+
-
- @lang('Deselect All')
-
-
-
+ getBulkActionsRowButtonAttributesBag->class([
+ 'ml-1 underline text-sm leading-5 font-medium focus:outline-none focus:underline transition duration-150 ease-in-out' => $isTailwind && ($this->getBulkActionsRowButtonAttributes['default-styling'] ?? true),
+ 'text-blue-600 text-gray-700 focus:text-gray-800 dark:text-white dark:hover:text-gray-400' => $isTailwind && ($this->getBulkActionsRowButtonAttributes['default-colors'] ?? true),
+ 'btn btn-primary btn-sm' => $isBootstrap && ($this->getBulkActionsRowButtonAttributes['default-styling'] ?? true)
+ ])
+ }}
+ >
+ {{ __($localisationPath.'Deselect All') }}
+
+
+
-
-
-
- @lang('You have selected')
-
- @lang('rows, do you want to select all')
- @if(!$simplePagination) @endif
-
+
+
+
+ {{ __($localisationPath.'You have selected') }}
+
+ {{ __($localisationPath.'rows, do you want to select all') }}
+ @if(!$simplePagination) @endif
+
-
- @lang('Select All On Page')
-
+ getBulkActionsRowButtonAttributesBag->class([
+ 'ml-1 underline text-sm leading-5 font-medium focus:outline-none focus:underline transition duration-150 ease-in-out' => $isTailwind && ($this->getBulkActionsRowButtonAttributes['default-styling'] ?? true),
+ 'text-blue-600 text-gray-700 focus:text-gray-800 dark:text-white dark:hover:text-gray-400' => $isTailwind && ($this->getBulkActionsRowButtonAttributes['default-colors'] ?? true),
+ 'btn btn-primary btn-sm' => $isBootstrap && ($this->getBulkActionsRowButtonAttributes['default-styling'] ?? true)
+ ])
+ }}
-
- @lang('Select All')
-
+ >{{ __($localisationPath.'Select All On Page') }}
+
-
- @lang('Deselect All')
-
-
-
-
-
- @elseif ($isBootstrap)
-
-
-
-
-
- @lang('You are currently selecting all')
- @if(!$simplePagination) @endif
- @lang('rows').
-
+ getBulkActionsRowButtonAttributesBag->class([
+ 'ml-1 underline text-sm leading-5 font-medium focus:outline-none focus:underline transition duration-150 ease-in-out' => $isTailwind && ($this->getBulkActionsRowButtonAttributes['default-styling'] ?? true),
+ 'text-blue-600 text-gray-700 focus:text-gray-800 dark:text-white dark:hover:text-gray-400' => $isTailwind && ($this->getBulkActionsRowButtonAttributes['default-colors'] ?? true),
+ 'btn btn-primary btn-sm' => $isBootstrap && ($this->getBulkActionsRowButtonAttributes['default-styling'] ?? true)
+ ])
+ }}
+ >
+ {{ __($localisationPath.'Select All') }}
+
-
- @lang('Deselect All')
-
-
-
-
-
-
-
- @lang('You have selected')
-
- @lang('rows, do you want to select all')
- @if(!$simplePagination) @endif
-
-
-
- @lang('Select All On Page')
-
-
-
- @lang('Select All')
-
-
-
- @lang('Deselect All')
-
-
-
-
-
- @endif
+
getBulkActionsRowButtonAttributesBag->class([
+ 'ml-1 underline text-sm leading-5 font-medium focus:outline-none focus:underline transition duration-150 ease-in-out' => $isTailwind && ($this->getBulkActionsRowButtonAttributes['default-styling'] ?? true),
+ 'text-blue-600 text-gray-700 focus:text-gray-800 dark:text-white dark:hover:text-gray-400' => $isTailwind && ($this->getBulkActionsRowButtonAttributes['default-colors'] ?? true),
+ 'btn btn-primary btn-sm' => $isBootstrap && ($this->getBulkActionsRowButtonAttributes['default-styling'] ?? true)
+ ])
+ }}
+ >
+ {{ __($localisationPath.'Deselect All') }}
+
+
+
+
+
@endif
diff --git a/resources/views/components/table/tr/footer.blade.php b/resources/views/components/table/tr/footer.blade.php
index ba0ecc51e..d9681d779 100644
--- a/resources/views/components/table/tr/footer.blade.php
+++ b/resources/views/components/table/tr/footer.blade.php
@@ -1,4 +1,4 @@
-@aware(['component', 'tableName'])
+@aware([ 'tableName'])
[], 'displayMinimisedOnReorder' => true])
@if ($isTailwind)
merge($customAttributes)
- ->class(['bg-white dark:bg-gray-700 dark:text-white' => $customAttributes['default'] ?? true])
- ->class(['laravel-livewire-tables-reorderingMinimised'])
- ->except('default')
+ ->class([
+ 'laravel-livewire-tables-reorderingMinimised',
+ 'bg-white dark:bg-gray-700 dark:text-white' => ($customAttributes['default'] ?? true),
+ ])
+ ->except(['default','default-styling','default-colors'])
}}
>
{{ $slot }}
@@ -14,9 +16,11 @@
@elseif ($isBootstrap)
merge($customAttributes)
- ->class(['' => $customAttributes['default'] ?? true])
- ->class(['laravel-livewire-tables-reorderingMinimised'])
- ->except('default')
+ ->class([
+ 'laravel-livewire-tables-reorderingMinimised',
+ '' => $customAttributes['default'] ?? true,
+ ])
+ ->except(['default','default-styling','default-colors'])
}}
>
{{ $slot }}
diff --git a/resources/views/components/table/tr/secondary-header.blade.php b/resources/views/components/table/tr/secondary-header.blade.php
index a6a7cc5f3..6e3ca28c0 100644
--- a/resources/views/components/table/tr/secondary-header.blade.php
+++ b/resources/views/components/table/tr/secondary-header.blade.php
@@ -1,4 +1,4 @@
-@aware(['component', 'tableName'])
+@aware([ 'tableName'])
$isTailwind,
- 'd-flex flex-column ' => ($isBootstrap),
-])>
+merge($this->getToolsAttributes)
+ ->class([
+ 'flex-col' => $isTailwind && ($this->getToolsAttributes['default-styling'] ?? true),
+ 'd-flex flex-column' => $isBootstrap && ($this->getToolsAttributes['default-styling'] ?? true)
+ ])
+ ->except(['default','default-styling','default-colors'])
+ }}
+>
{{ $slot }}
diff --git a/resources/views/components/tools/filter-label.blade.php b/resources/views/components/tools/filter-label.blade.php
index 6ac6196ae..2274d74d4 100644
--- a/resources/views/components/tools/filter-label.blade.php
+++ b/resources/views/components/tools/filter-label.blade.php
@@ -1,25 +1,25 @@
-@aware(['component', 'tableName'])
+@aware([ 'tableName'])
@props(['filter', 'filterLayout' => 'popover', 'tableName' => 'table', 'isTailwind' => false, 'isBootstrap' => false, 'isBootstrap4' => false, 'isBootstrap5' => false, 'for' => null])
@php
- $customLabelAttributes = $filter->getFilterLabelAttributes();
+ $filterLabelAttributes = $filter->getFilterLabelAttributes();
+ $customLabelAttributes = $filter->getLabelAttributes();
@endphp
@if($filter->hasCustomFilterLabel() && !$filter->hasCustomPosition())
@include($filter->getCustomFilterLabel(),['filter' => $filter, 'filterLayout' => $filterLayout, 'tableName' => $tableName, 'isTailwind' => $isTailwind, 'isBootstrap' => $isBootstrap, 'isBootstrap4' => $isBootstrap4, 'isBootstrap5' => $isBootstrap5, 'customLabelAttributes' => $customLabelAttributes])
@elseif(!$filter->hasCustomPosition())
- merge($customLabelAttributes)
- ->class(['block text-sm font-medium leading-5 text-gray-700 dark:text-white' => $isTailwind && ($customLabelAttributes['default'] ?? true)])
- ->class(['d-block' => $isBootstrap && $filterLayout == 'slide-down' && ($customLabelAttributes['default'] ?? true)])
- ->class(['mb-2' => $isBootstrap && $filterLayout == 'popover' && ($customLabelAttributes['default'] ?? true)])
- ->except('default')
+ merge($customLabelAttributes)->merge($filterLabelAttributes)
+ ->class([
+ 'block text-sm font-medium leading-5' => $isTailwind && ($filterLabelAttributes['default-styling'] ?? ($filterLabelAttributes['default'] ?? true)),
+ 'text-gray-700 dark:text-white' => $isTailwind && ($filterLabelAttributes['default-colors'] ?? ($filterLabelAttributes['default'] ?? true)),
+ 'd-block' => $isBootstrap && $filterLayout === 'slide-down' && ($filterLabelAttributes['default-styling'] ?? ($filterLabelAttributes['default'] ?? true)),
+ 'mb-2' => $isBootstrap && $filterLayout === 'popover' && ($filterLabelAttributes['default-styling'] ?? ($filterLabelAttributes['default'] ?? true)),
+ ])
+ ->except(['default', 'default-colors', 'default-styling'])
}}
-
>
{{ $filter->getName() }}
-
@endif
diff --git a/resources/views/components/tools/filter-pills.blade.php b/resources/views/components/tools/filter-pills.blade.php
index 3644decaa..d046e891c 100644
--- a/resources/views/components/tools/filter-pills.blade.php
+++ b/resources/views/components/tools/filter-pills.blade.php
@@ -1,99 +1,30 @@
-@aware(['component', 'tableName','isTailwind','isBootstrap','isBootstrap4','isBootstrap5'])
-
-@if ($this->filtersAreEnabled() && $this->filterPillsAreEnabled() && $this->hasAppliedVisibleFiltersForPills())
-
-
$isTailwind,
- 'mb-3' => $isBootstrap,
- ]) x-cloak x-show="!currentlyReorderingStatus">
-
$isTailwind,
- '' => $isBootstrap,
- ])>
- @lang('Applied Filters'):
-
-
- @foreach($this->getAppliedFiltersWithValues() as $filterSelectName => $value)
- @php($filter = $this->getFilterByKey($filterSelectName))
-
- @continue(is_null($filter))
- @continue($filter->isHiddenFromPills())
-
- @if ($filter->hasCustomPillBlade())
- @include($filter->getCustomPillBlade(), ['filter' => $filter])
- @else
-
$isTailwind,
- 'badge badge-pill badge-info d-inline-flex align-items-center' => $isBootstrap4,
- 'badge rounded-pill bg-info d-inline-flex align-items-center' => $isBootstrap5,
- ])
- >
- {{ $filter->getFilterPillTitle() }}:
- @php( $filterPillValue = $filter->getFilterPillValue($value))
- @php( $separator = method_exists($filter, 'getPillsSeparator') ? $filter->getPillsSeparator() : ', ')
-
- @if(is_array($filterPillValue) && !empty($filterPillValue))
- @foreach($filterPillValue as $filterPillArrayValue)
- {{ $filterPillArrayValue }}{!! $separator !!}
- @endforeach
- @else
- {{ $filterPillValue }}
- @endif
-
- @if ($isTailwind)
-
- @lang('Remove filter option')
-
-
- @else
- ($isBootstrap),
- ])
- >
- $isBootstrap4,
- 'visually-hidden' => $isBootstrap5,
- ])>
- @lang('Remove filter option')
-
-
-
- @endif
-
- @endif
- @endforeach
-
- @if ($isTailwind)
-
-
- @lang('Clear')
-
-
- @else
-
$isBootstrap4,
- 'badge rounded-pill bg-light text-dark text-decoration-none' => $isBootstrap5,
- ])
- >
- @lang('Clear')
-
- @endif
-
-
-@endif
-
+@aware([ 'tableName','isTailwind','isBootstrap','isBootstrap4','isBootstrap5', 'localisationPath'])
+
+merge([
+
+ 'wire:loading.class' => $this->displayFilterPillsWhileLoading ? '' : 'invisible',
+ 'x-cloak',
+])
+->class([
+ 'mb-4 px-4 md:p-0' => $isTailwind,
+ 'mb-3' => $isBootstrap,
+])
+
+}}>
+ $isTailwind,
+ '' => $isBootstrap,
+ ])>
+ {{ __($localisationPath.'Applied Filters') }}:
+
+ @tableloop($this->getPillDataForFilter() as $filterKey => $filterPillData)
+
+ @if ($filterPillData->hasCustomPillBlade)
+ @include($filterPillData->getCustomPillBlade(), ['filter' => $this->getFilterByKey($filterKey), 'filterPillData' => $filterPillData])
+ @else
+
+ @endif
+ @endtableloop
+
+
+
\ No newline at end of file
diff --git a/resources/views/components/tools/filter-pills/buttons/reset-all.blade.php b/resources/views/components/tools/filter-pills/buttons/reset-all.blade.php
new file mode 100644
index 000000000..d718ac2d7
--- /dev/null
+++ b/resources/views/components/tools/filter-pills/buttons/reset-all.blade.php
@@ -0,0 +1,36 @@
+@aware(['isTailwind','isBootstrap','isBootstrap4','isBootstrap5', 'localisationPath'])
+@if ($isTailwind)
+
+ merge($this->getFilterPillsResetAllButtonAttributes)
+ ->class([
+ 'inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium' => ($this->getFilterPillsResetAllButtonAttributes['default-styling'] ?? true),
+ 'bg-gray-100 text-gray-800 dark:bg-gray-200 dark:text-gray-900' => ($this->getFilterPillsResetAllButtonAttributes['default-colors'] ?? true),
+ ])
+ ->except(['default-styling', 'default-colors'])
+ }}
+ >
+ {{ __($localisationPath.'Clear') }}
+
+
+@else
+ merge($this->getFilterPillsResetAllButtonAttributes)
+ ->class([
+ 'badge badge-pill badge-light' => $isBootstrap4 && ($this->getFilterPillsResetAllButtonAttributes['default-styling'] ?? true),
+ 'badge rounded-pill bg-light text-dark text-decoration-none' => $isBootstrap5 && ($this->getFilterPillsResetAllButtonAttribute['default-styling'] ?? true),
+ ])
+ ->except(['default-styling', 'default-colors'])
+ }}
+ >
+ {{ __($localisationPath.'Clear') }}
+
+@endif
diff --git a/resources/views/components/tools/filter-pills/buttons/reset-filter.blade.php b/resources/views/components/tools/filter-pills/buttons/reset-filter.blade.php
new file mode 100644
index 000000000..68b9a3691
--- /dev/null
+++ b/resources/views/components/tools/filter-pills/buttons/reset-filter.blade.php
@@ -0,0 +1,42 @@
+@aware(['tableName','isTailwind','isBootstrap','isBootstrap4','isBootstrap5', 'localisationPath'])
+@props(['filterKey', 'filterPillData'])
+
+@php
+
+ $filterButtonAttributes = $filterPillData->getCalculatedCustomResetButtonAttributes($filterKey,$this->getFilterPillsResetFilterButtonAttributes);
+
+@endphp
+@if ($isTailwind)
+ merge($filterButtonAttributes)
+ ->class([
+ 'flex-shrink-0 ml-0.5 h-4 w-4 rounded-full inline-flex items-center justify-center focus:outline-none' => $filterButtonAttributes['default-styling'],
+ 'text-indigo-400 hover:bg-indigo-200 hover:text-indigo-500 focus:bg-indigo-500 focus:text-white' => $filterButtonAttributes['default-colors'],
+ ])
+ ->except(['default', 'default-colors', 'default-styling', 'default-text'])
+ }}
+ >
+ {{ __($localisationPath.'Remove filter option') }}
+
+
+@else
+ merge($filterButtonAttributes)
+ ->class([
+ 'text-white ml-2' => $isBootstrap && $filterButtonAttributes['default-styling']
+ ])
+ ->except(['default', 'default-colors', 'default-styling', 'default-text'])
+ }}
+ >
+ $isBootstrap4,
+ 'visually-hidden' => $isBootstrap5,
+ ])>{{ __($localisationPath.'Remove filter option') }}
+
+
+
+@endif
diff --git a/resources/views/components/tools/filter-pills/pills-item.blade.php b/resources/views/components/tools/filter-pills/pills-item.blade.php
new file mode 100644
index 000000000..e82b6b3ed
--- /dev/null
+++ b/resources/views/components/tools/filter-pills/pills-item.blade.php
@@ -0,0 +1,28 @@
+@aware(['tableName','isTailwind','isBootstrap4','isBootstrap5'])
+@props([
+ 'filterKey',
+ 'filterPillData',
+ 'shouldWatch' => ($filterPillData->shouldWatchForEvents() ?? 0),
+ 'filterPillsItemAttributes' => $filterPillData->getFilterPillsItemAttributes(),
+ ])
+
+merge($filterPillsItemAttributes)
+ ->class([
+ 'inline-flex items-center px-2.5 py-0.5 rounded-full leading-4' => $isTailwind && ($filterPillsItemAttributes['default-styling'] ?? true),
+ 'text-xs font-medium capitalize' => $isTailwind && ($filterPillsItemAttributes['default-text'] ?? ($filterPillsItemAttributes['default-styling'] ?? true)),
+ 'bg-indigo-100 text-indigo-800 dark:bg-indigo-200 dark:text-indigo-900' => $isTailwind && ($filterPillsItemAttributes['default-colors'] ?? true),
+ 'badge badge-pill badge-info d-inline-flex align-items-center' => $isBootstrap4 && ($filterPillsItemAttributes['default-styling'] ?? true),
+ 'badge rounded-pill bg-info d-inline-flex align-items-center' => $isBootstrap5 && ($filterPillsItemAttributes['default-styling'] ?? true),
+ ])
+ ->except(['default', 'default-styling', 'default-colors'])
+ }}
+>
+
+
+ getFilterPillDisplayData() }}>
+
+
+
+
diff --git a/resources/views/components/tools/filters/boolean.blade.php b/resources/views/components/tools/filters/boolean.blade.php
index cfffe3a1f..9fb4fb79b 100644
--- a/resources/views/components/tools/filters/boolean.blade.php
+++ b/resources/views/components/tools/filters/boolean.blade.php
@@ -1,28 +1,39 @@
-@php($defaultValue = ($filter->hasFilterDefaultValue() ? (bool) $filter->getFilterDefaultValue() : false))
-
+@elseif($isBootstrap4)
+
+
+
+
+@else
+
+
+
+
+@endif
diff --git a/resources/views/components/tools/filters/date-range.blade.php b/resources/views/components/tools/filters/date-range.blade.php
index 4d233b1e4..f9cab0a75 100644
--- a/resources/views/components/tools/filters/date-range.blade.php
+++ b/resources/views/components/tools/filters/date-range.blade.php
@@ -23,6 +23,6 @@
'd-inline-block w-100 form-control' => $isBootstrap,
])
@if($filter->hasConfig('placeholder')) placeholder="{{ $filter->getConfig('placeholder') }}" @endif
- />
+ />
diff --git a/resources/views/components/tools/filters/date.blade.php b/resources/views/components/tools/filters/date.blade.php
index 6191a299e..b32b38bbb 100644
--- a/resources/views/components/tools/filters/date.blade.php
+++ b/resources/views/components/tools/filters/date.blade.php
@@ -1,20 +1,17 @@
$isTailwind,
- "mb-3 mb-md-0 input-group" => $isBootstrap,
+ 'rounded-md shadow-sm' => $isTailwind,
+ 'mb-3 mb-md-0 input-group' => $isBootstrap,
])>
- getWireMethod("filterComponents.".$filter->getKey()) }}
- wire:key="{{ $filter->generateWireKey($tableName, 'date') }}"
- id="{{ $tableName }}-filter-{{ $filter->getKey() }}@if($filter->hasCustomPosition())-{{ $filter->getCustomPosition() }}@endif"
- type="date"
- @if($filter->hasConfig('min')) min="{{ $filter->getConfig('min') }}" @endif
- @if($filter->hasConfig('max')) max="{{ $filter->getConfig('max') }}" @endif
- @if($filter->hasConfig('placeholder')) placeholder="{{ $filter->getConfig('placeholder') }}" @endif
- @class([
- "block w-full border-gray-300 rounded-md shadow-sm transition duration-150 ease-in-out focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50 dark:bg-gray-800 dark:text-white dark:border-gray-600" => $isTailwind,
- "form-control" => $isBootstrap,
- ])
- />
+ getWireMethod('filterComponents.'.$filter->getKey()) !!} {{
+ $filterInputAttributes->merge()
+ ->class([
+ 'block w-full rounded-md shadow-sm transition duration-150 ease-in-out focus:ring focus:ring-opacity-50' => $isTailwind && ($filterInputAttributes['default-styling'] ?? true),
+ 'border-gray-300 focus:border-indigo-300 focus:ring-indigo-200 dark:bg-gray-800 dark:text-white dark:border-gray-600' => $isTailwind && ($filterInputAttributes['default-colors'] ?? true),
+ 'form-control' => $isBootstrap,
+ ])
+ ->except(['default-styling','default-colors'])
+ }} />
-
\ No newline at end of file
+
diff --git a/resources/views/components/tools/filters/datetime.blade.php b/resources/views/components/tools/filters/datetime.blade.php
index 901cc8b11..74d80455a 100644
--- a/resources/views/components/tools/filters/datetime.blade.php
+++ b/resources/views/components/tools/filters/datetime.blade.php
@@ -2,20 +2,17 @@
$isTailwind,
- "mb-3 mb-md-0 input-group" => $isBootstrap,
+ 'rounded-md shadow-sm' => $isTailwind,
+ 'mb-3 mb-md-0 input-group' => $isBootstrap,
])>
- getWireMethod("filterComponents.".$filter->getKey()) }}
- wire:key="{{ $filter->generateWireKey($tableName, 'datetime') }}"
- id="{{ $tableName }}-filter-{{ $filter->getKey() }}@if($filter->hasCustomPosition())-{{ $filter->getCustomPosition() }}@endif"
- type="datetime-local"
- @if($filter->hasConfig('min')) min="{{ $filter->getConfig('min') }}" @endif
- @if($filter->hasConfig('max')) max="{{ $filter->getConfig('max') }}" @endif
- @if($filter->hasConfig('placeholder')) placeholder="{{ $filter->getConfig('placeholder') }}" @endif
- @class([
- "block w-full border-gray-300 rounded-md shadow-sm transition duration-150 ease-in-out focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50 dark:bg-gray-800 dark:text-white dark:border-gray-600" => $isTailwind,
- "form-control" => $isBootstrap,
- ])
- />
+ getWireMethod('filterComponents.'.$filter->getKey()) !!} {{
+ $filterInputAttributes->merge()
+ ->class([
+ 'block w-full rounded-md shadow-sm transition duration-150 ease-in-out focus:ring focus:ring-opacity-50' => $isTailwind && ($filterInputAttributes['default-styling'] ?? true),
+ 'border-gray-300 focus:border-indigo-300 focus:ring-indigo-200 dark:bg-gray-800 dark:text-white dark:border-gray-600' => $isTailwind && ($filterInputAttributes['default-colors'] ?? true),
+ 'form-control' => $isBootstrap,
+ ])
+ ->except(['default-styling','default-colors'])
+ }} />
-
\ No newline at end of file
+
diff --git a/resources/views/components/tools/filters/livewire-component-array-filter.blade.php b/resources/views/components/tools/filters/livewire-component-array-filter.blade.php
new file mode 100644
index 000000000..237d062fa
--- /dev/null
+++ b/resources/views/components/tools/filters/livewire-component-array-filter.blade.php
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/resources/views/components/tools/filters/livewire-component-filter.blade.php b/resources/views/components/tools/filters/livewire-component-filter.blade.php
index 89b407133..a430faf9f 100644
--- a/resources/views/components/tools/filters/livewire-component-filter.blade.php
+++ b/resources/views/components/tools/filters/livewire-component-filter.blade.php
@@ -1,5 +1,4 @@
-
-
+
diff --git a/resources/views/components/tools/filters/multi-select-dropdown.blade.php b/resources/views/components/tools/filters/multi-select-dropdown.blade.php
index 76cbc55c5..a0f1a580b 100644
--- a/resources/views/components/tools/filters/multi-select-dropdown.blade.php
+++ b/resources/views/components/tools/filters/multi-select-dropdown.blade.php
@@ -1,39 +1,23 @@
-
@if ($isTailwind)
-
- getWireMethod("filterComponents.".$filter->getKey()) }}
- wire:key="{{ $filter->generateWireKey($tableName, 'multiselectdropdown') }}"
- id="{{ $tableName }}-filter-{{ $filter->getKey() }}@if($filter->hasCustomPosition())-{{ $filter->getCustomPosition() }}@endif"
- class="block w-full transition duration-150 ease-in-out border-gray-300 rounded-md shadow-sm focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50 dark:bg-gray-800 dark:text-white dark:border-gray-600"
- >
- @if ($filter->getFirstOption() != "")
- isEmpty($this)) selected @endif value="all">{{ $filter->getFirstOption()}}
- @endif
- @foreach($filter->getOptions() as $key => $value)
- @if (is_iterable($value))
-
- @foreach ($value as $optionKey => $optionValue)
- {{ $optionValue }}
- @endforeach
-
- @else
- {{ $value }}
- @endif
- @endforeach
-
-
- @elseif ($isBootstrap)
+
+ @endif
getWireMethod("filterComponents.".$filter->getKey()) }}
- wire:key="{{ $filter->generateWireKey($tableName, 'multiselectdropdown') }}"
- id="{{ $tableName }}-filter-{{ $filter->getKey() }}@if($filter->hasCustomPosition())-{{ $filter->getCustomPosition() }}@endif"
- class="{{ $isBootstrap4 ? 'form-control' : 'form-select' }}"
- >
- @if ($filter->getFirstOption() != "")
+ {!! $filter->getWireMethod('filterComponents.'.$filter->getKey()) !!} {{
+ $filterInputAttributes->merge([
+ 'wire:key' => $filter->generateWireKey($tableName, 'multiselectdropdown'),
+ ])
+ ->class([
+ 'block w-full transition duration-150 ease-in-out rounded-md shadow-sm focus:ring focus:ring-opacity-50' => $isTailwind && ($filterInputAttributes['default-styling'] ?? true),
+ 'border-gray-300 focus:border-indigo-300 focus:ring-indigo-200 dark:bg-gray-800 dark:text-white dark:border-gray-600' => $isTailwind && ($filterInputAttributes['default-colors'] ?? true),
+ 'form-control' => $isBootstrap4 && ($filterInputAttributes['default-styling'] ?? true),
+ 'form-select' => $isBootstrap5 && ($filterInputAttributes['default-styling'] ?? true),
+ ])
+ ->except(['default-styling','default-colors'])
+ }}>
+ @if ($filter->getFirstOption() !== '')
isEmpty($this)) selected @endif value="all">{{ $filter->getFirstOption()}}
@endif
@foreach($filter->getOptions() as $key => $value)
@@ -48,5 +32,7 @@ class="{{ $isBootstrap4 ? 'form-control' : 'form-select' }}"
@endif
@endforeach
+ @if ($isTailwind)
+
@endif
-
\ No newline at end of file
+
diff --git a/resources/views/components/tools/filters/multi-select.blade.php b/resources/views/components/tools/filters/multi-select.blade.php
index 884a84441..6ee391a71 100644
--- a/resources/views/components/tools/filters/multi-select.blade.php
+++ b/resources/views/components/tools/filters/multi-select.blade.php
@@ -1,63 +1,58 @@
-
@if ($isTailwind)
-
-
\ No newline at end of file
+
diff --git a/resources/views/components/tools/filters/number-range.blade.php b/resources/views/components/tools/filters/number-range.blade.php
index 118b46006..ecdc29573 100644
--- a/resources/views/components/tools/filters/number-range.blade.php
+++ b/resources/views/components/tools/filters/number-range.blade.php
@@ -5,16 +5,17 @@
$suffix = $filter->hasConfig('suffix') ? '--suffix:"'. $filter->getConfig('suffix') .'";' : '';
$prefix = $filter->hasConfig('prefix') ? '--prefix:"'.$filter->getConfig('prefix').'";' : '';
@endphp
+
-
$isTailwind,
'mt-4 h-22 w-100 pb-4 pt-2 grid gap-10' => $isBootstrap,
])
wire:ignore
>
-
$isTailwind,
@@ -23,7 +24,7 @@
style=' --min:{{ $minRange }}; --max:{{ $maxRange }}; {{ $suffix . $prefix }}'
>
diff --git a/resources/views/components/tools/filters/number.blade.php b/resources/views/components/tools/filters/number.blade.php
index e31854848..0c8e766cb 100644
--- a/resources/views/components/tools/filters/number.blade.php
+++ b/resources/views/components/tools/filters/number.blade.php
@@ -1,22 +1,18 @@
-
$isTailwind,
- "mb-3 mb-md-0 input-group" => $isBootstrap,
+ 'rounded-md shadow-sm' => $isTailwind,
+ 'mb-3 mb-md-0 input-group' => $isBootstrap,
])>
- getWireMethod("filterComponents.".$filter->getKey()) }}
- wire:key="{{ $filter->generateWireKey($tableName, 'number') }}"
- id="{{ $tableName }}-filter-{{ $filter->getKey() }}@if($filter->hasCustomPosition())-{{ $filter->getCustomPosition() }}@endif"
- type="number"
- @if($filter->hasConfig('min')) min="{{ $filter->getConfig('min') }}" @endif
- @if($filter->hasConfig('max')) max="{{ $filter->getConfig('max') }}" @endif
- @if($filter->hasConfig('placeholder')) placeholder="{{ $filter->getConfig('placeholder') }}" @endif
- @class([
- "block w-full border-gray-300 rounded-md shadow-sm transition duration-150 ease-in-out focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50 dark:bg-gray-800 dark:text-white dark:border-gray-600" => $isTailwind,
- "form-control" => $isBootstrap,
- ])
- />
+ getWireMethod('filterComponents.'.$filter->getKey()) !!} {{
+ $filterInputAttributes->merge()
+ ->class([
+ 'block w-full rounded-md shadow-sm transition duration-150 ease-in-out focus:ring focus:ring-opacity-50' => $isTailwind && ($filterInputAttributes['default-styling'] ?? true),
+ 'border-gray-300 focus:border-indigo-300 focus:ring-indigo-200 dark:bg-gray-800 dark:text-white dark:border-gray-600' => $isTailwind && ($filterInputAttributes['default-colors'] ?? true),
+ 'form-control' => $isBootstrap,
+ ])
+ ->except(['default-styling','default-colors'])
+ }} />
-
\ No newline at end of file
+
diff --git a/resources/views/components/tools/filters/select.blade.php b/resources/views/components/tools/filters/select.blade.php
index 42fcdad08..9a0ca9683 100644
--- a/resources/views/components/tools/filters/select.blade.php
+++ b/resources/views/components/tools/filters/select.blade.php
@@ -5,15 +5,16 @@
'rounded-md shadow-sm' => $isTailwind,
'inline' => $isBootstrap,
])>
-
getWireMethod("filterComponents.".$filter->getKey()) }}
- wire:key="{{ $filter->generateWireKey($tableName, 'select') }}"
- id="{{ $tableName }}-filter-{{ $filter->getKey() }}@if($filter->hasCustomPosition())-{{ $filter->getCustomPosition() }}@endif"
- @class([
- 'block w-full border-gray-300 rounded-md shadow-sm transition duration-150 ease-in-out focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50 dark:bg-gray-800 dark:text-white dark:border-gray-600' => $isTailwind,
- 'form-control' => $isBootstrap4,
- 'form-select' => $isBootstrap5,
+ getWireMethod('filterComponents.'.$filter->getKey()) !!} {{
+ $filterInputAttributes->merge()
+ ->class([
+ 'block w-full transition duration-150 ease-in-out rounded-md shadow-sm focus:ring focus:ring-opacity-50' => $isTailwind && ($filterInputAttributes['default-styling'] ?? true),
+ 'border-gray-300 focus:border-indigo-300 focus:ring-indigo-200 dark:bg-gray-800 dark:text-white dark:border-gray-600' => $isTailwind && ($filterInputAttributes['default-colors'] ?? true),
+ 'form-control' => $isBootstrap4 && ($filterInputAttributes['default-styling'] ?? true),
+ 'form-select' => $isBootstrap5 && ($filterInputAttributes['default-styling'] ?? true),
])
- >
+ ->except(['default-styling','default-colors'])
+ }}>
@foreach($filter->getOptions() as $key => $value)
@if (is_iterable($value))
@@ -27,4 +28,4 @@
@endforeach
-
\ No newline at end of file
+
diff --git a/resources/views/components/tools/filters/text-field.blade.php b/resources/views/components/tools/filters/text-field.blade.php
index 11bc7af79..74d80455a 100644
--- a/resources/views/components/tools/filters/text-field.blade.php
+++ b/resources/views/components/tools/filters/text-field.blade.php
@@ -2,19 +2,17 @@
$isTailwind,
- "mb-3 mb-md-0 input-group" => $isBootstrap,
+ 'rounded-md shadow-sm' => $isTailwind,
+ 'mb-3 mb-md-0 input-group' => $isBootstrap,
])>
- getWireMethod("filterComponents.".$filter->getKey()) }}
- wire:key="{{ $filter->generateWireKey($tableName, 'text') }}"
- id="{{ $tableName }}-filter-{{ $filter->getKey() }}@if($filter->hasCustomPosition())-{{ $filter->getCustomPosition() }}@endif"
- type="text"
- @if($filter->hasConfig('placeholder')) placeholder="{{ $filter->getConfig('placeholder') }}" @endif
- @if($filter->hasConfig('maxlength')) maxlength="{{ $filter->getConfig('maxlength') }}" @endif
- @class([
- "block w-full border-gray-300 rounded-md shadow-sm transition duration-150 ease-in-out focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50 dark:bg-gray-800 dark:text-white dark:border-gray-600" => $isTailwind,
- "form-control" => $isBootstrap,
- ])
- />
+ getWireMethod('filterComponents.'.$filter->getKey()) !!} {{
+ $filterInputAttributes->merge()
+ ->class([
+ 'block w-full rounded-md shadow-sm transition duration-150 ease-in-out focus:ring focus:ring-opacity-50' => $isTailwind && ($filterInputAttributes['default-styling'] ?? true),
+ 'border-gray-300 focus:border-indigo-300 focus:ring-indigo-200 dark:bg-gray-800 dark:text-white dark:border-gray-600' => $isTailwind && ($filterInputAttributes['default-colors'] ?? true),
+ 'form-control' => $isBootstrap,
+ ])
+ ->except(['default-styling','default-colors'])
+ }} />
-
\ No newline at end of file
+
diff --git a/resources/views/components/tools/sorting-pills.blade.php b/resources/views/components/tools/sorting-pills.blade.php
index a57a6a97d..25a2bc973 100644
--- a/resources/views/components/tools/sorting-pills.blade.php
+++ b/resources/views/components/tools/sorting-pills.blade.php
@@ -1,30 +1,44 @@
-@aware(['component', 'tableName','isTailwind','isBootstrap','isBootstrap4','isBootstrap5'])
+@aware([ 'tableName','isTailwind','isBootstrap','isBootstrap4','isBootstrap5', 'localisationPath'])
-@if ($this->isTailwind)
+@if ($isTailwind)
@if ($this->sortingPillsAreEnabled() && $this->hasSorts())
- @lang('Applied Sorting'):
+ {{ __($localisationPath.'Applied Sorting') }}:
@foreach($this->getSorts() as $columnSelectName => $direction)
@php($column = $this->getColumnBySelectName($columnSelectName) ?? $this->getColumnBySlug($columnSelectName))
@continue(is_null($column))
@continue($column->isHidden())
- @continue($this->columnSelectIsEnabled() && ! $this->columnSelectIsEnabledForColumn($column))
+ @continue($this->columnSelectIsEnabled && ! $this->columnSelectIsEnabledForColumn($column))
merge($this->getSortingPillsItemAttributes())
+ ->class([
+ 'inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium leading-4 capitalize' => $this->getSortingPillsItemAttributes()['default-styling'],
+ 'bg-indigo-100 text-indigo-800 dark:bg-indigo-200 dark:text-indigo-900' => $this->getSortingPillsItemAttributes()['default-colors'],
+ ])
+ ->except(['default-styling', 'default-colors'])
+ }}
>
- {{ $column->getSortingPillTitle() }}: {{ $column->getSortingPillDirection($this, $direction) }}
+ {{ $column->getSortingPillTitle() }}: {{ $column->getSortingPillDirectionLabel($direction, $this->getDefaultSortingLabelAsc, $this->getDefaultSortingLabelDesc) }}
merge($this->getSortingPillsClearSortButtonAttributes())
+ ->class([
+ 'flex-shrink-0 ml-0.5 h-4 w-4 rounded-full inline-flex items-center justify-center focus:outline-none' => $this->getSortingPillsClearSortButtonAttributes()['default-styling'],
+ 'text-indigo-400 hover:bg-indigo-200 hover:text-indigo-500 focus:bg-indigo-500 focus:text-white' => $this->getSortingPillsClearSortButtonAttributes()['default-colors'],
+ ])
+ ->except(['default-styling', 'default-colors'])
+ }}
>
- @lang('Remove sort option')
+ {{ __($localisationPath.'Remove sort option') }}
@@ -34,38 +48,59 @@ class="flex-shrink-0 ml-0.5 h-4 w-4 rounded-full inline-flex items-center justif
wire:click.prevent="clearSorts"
class="focus:outline-none active:outline-none"
>
-
- @lang('Clear')
+ merge($this->getSortingPillsClearAllButtonAttributes())
+ ->class([
+ 'inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium' => $this->getSortingPillsClearAllButtonAttributes()['default-styling'],
+ 'bg-gray-100 text-gray-800 dark:bg-gray-200 dark:text-gray-900' => $this->getSortingPillsClearAllButtonAttributes()['default-colors'],
+ ])
+ ->except(['default-styling', 'default-colors'])
+ }}
+ >
+ {{ __($localisationPath.'Clear') }}
@endif
-@elseif ($this->isBootstrap4)
+@elseif ($isBootstrap4)
@if ($this->sortingPillsAreEnabled() && $this->hasSorts())
-
@lang('Applied Sorting'):
+
{{ __($localisationPath.'Applied Sorting') }}:
@foreach($this->getSorts() as $columnSelectName => $direction)
@php($column = $this->getColumnBySelectName($columnSelectName) ?? $this->getColumnBySlug($columnSelectName))
@continue(is_null($column))
@continue($column->isHidden())
- @continue($this->columnSelectIsEnabled() && ! $this->columnSelectIsEnabledForColumn($column))
+ @continue($this->columnSelectIsEnabled && ! $this->columnSelectIsEnabledForColumn($column))
merge($this->getSortingPillsItemAttributes())
+ ->class([
+ 'badge badge-pill badge-info d-inline-flex align-items-center' => $this->getSortingPillsItemAttributes()['default-styling'],
+ ])
+ ->except(['default-styling', 'default-colors'])
+ }}
>
- {{ $column->getSortingPillTitle() }}: {{ $column->getSortingPillDirection($this, $direction) }}
+ {{ $column->getSortingPillTitle() }}: {{ $column->getSortingPillDirectionLabel($direction, $this->getDefaultSortingLabelAsc, $this->getDefaultSortingLabelDesc) }}
merge($this->getSortingPillsClearSortButtonAttributes())
+ ->class([
+ 'text-white ml-2' => $this->getSortingPillsClearSortButtonAttributes()['default-styling'],
+ ])
+ ->except(['default-styling', 'default-colors'])
+ }}
>
- @lang('Remove sort option')
+ {{ __($localisationPath.'Remove sort option') }}
@@ -74,38 +109,56 @@ class="text-white ml-2"
merge($this->getSortingPillsClearAllButtonAttributes())
+ ->class([
+ 'badge badge-pill badge-light' => $this->getSortingPillsClearAllButtonAttributes()['default-styling'],
+ ])
+ ->except(['default-styling', 'default-colors'])
+ }}
>
- @lang('Clear')
+ {{ __($localisationPath.'Clear') }}
@endif
-@elseif ($this->isBootstrap5)
+@elseif ($isBootstrap5)
@if ($this->sortingPillsAreEnabled() && $this->hasSorts())
-
@lang('Applied Sorting'):
+
{{ __($localisationPath.'Applied Sorting') }}:
@foreach($this->getSorts() as $columnSelectName => $direction)
@php($column = $this->getColumnBySelectName($columnSelectName) ?? $this->getColumnBySlug($columnSelectName))
@continue(is_null($column))
@continue($column->isHidden())
- @continue($this->columnSelectIsEnabled() && ! $this->columnSelectIsEnabledForColumn($column))
+ @continue($this->columnSelectIsEnabled && ! $this->columnSelectIsEnabledForColumn($column))
merge($this->getSortingPillsItemAttributes())
+ ->class([
+ 'badge rounded-pill bg-info d-inline-flex align-items-center' => $this->getSortingPillsItemAttributes()['default-styling'],
+ ])
+ ->except(['default-styling', 'default-colors'])
+ }}
>
- {{ $column->getSortingPillTitle() }}: {{ $column->getSortingPillDirection($this, $direction) }}
+ {{ $column->getSortingPillTitle() }}: {{ $column->getSortingPillDirectionLabel($direction, $this->getDefaultSortingLabelAsc, $this->getDefaultSortingLabelDesc) }}
merge($this->getSortingPillsClearSortButtonAttributes())
+ ->class([
+ 'text-white ms-2' => $this->getSortingPillsClearSortButtonAttributes()['default-styling'],
+ ])
+ ->except(['default-styling', 'default-colors'])
+ }}
>
- @lang('Remove sort option')
+ {{ __($localisationPath.'Remove sort option') }}
@@ -114,9 +167,15 @@ class="text-white ms-2"
merge($this->getSortingPillsClearAllButtonAttributes())
+ ->class([
+ 'badge rounded-pill bg-light text-dark text-decoration-none' => $this->getSortingPillsClearAllButtonAttributes()['default-styling'],
+ ])
+ ->except(['default-styling', 'default-colors'])
+ }}
>
- @lang('Clear')
+ {{ __($localisationPath.'Clear') }}
@endif
diff --git a/resources/views/components/tools/toolbar.blade.php b/resources/views/components/tools/toolbar.blade.php
index 56cd2ec76..6f4a482fd 100644
--- a/resources/views/components/tools/toolbar.blade.php
+++ b/resources/views/components/tools/toolbar.blade.php
@@ -1,45 +1,51 @@
-@aware(['component', 'tableName','isTailwind','isBootstrap'])
+@aware([ 'tableName','isTailwind','isBootstrap'])
@props([])
+@php($toolBarAttributes = $this->getToolBarAttributesBag)
-@if ($this->hasConfigurableAreaFor('before-toolbar'))
- @include($this->getConfigurableAreaFor('before-toolbar'), $this->getParametersForConfigurableArea('before-toolbar'))
-@endif
-
-
$this->isBootstrap,
- 'md:flex md:justify-between mb-4 px-4 md:p-0' => $this->isTailwind,
- ])
+
merge()
+ ->class([
+ 'md:flex md:justify-between mb-4 px-4 md:p-0' => $isTailwind && ($toolBarAttributes['default-styling'] ?? true),
+ 'd-md-flex justify-content-between mb-3' => $isBootstrap && ($toolBarAttributes['default-styling'] ?? true),
+ ])
+ ->except(['default','default-styling','default-colors'])
+ }}
>
$this->isBootstrap,
- 'w-full mb-4 md:mb-0 md:w-2/4 md:flex space-y-4 md:space-y-0 md:space-x-2' => $this->isTailwind,
+ 'd-md-flex' => $isBootstrap,
+ 'w-full mb-4 md:mb-0 md:w-2/4 md:flex space-y-4 md:space-y-0 md:space-x-2' => $isTailwind,
])
>
@if ($this->hasConfigurableAreaFor('toolbar-left-start'))
$this->isBootstrap,
- 'flex rounded-md shadow-sm' => $this->isTailwind,
+ 'mb-3 mb-md-0 input-group' => $isBootstrap,
+ 'flex rounded-md shadow-sm' => $isTailwind,
])>
@include($this->getConfigurableAreaFor('toolbar-left-start'), $this->getParametersForConfigurableArea('toolbar-left-start'))
@endif
- @if ($this->reorderIsEnabled())
+ @if ($this->showReorderButton())
@endif
- @if ($this->searchIsEnabled() && $this->searchVisibilityIsEnabled())
+ @if ($this->showSearchField())
@endif
- @if ($this->filtersAreEnabled() && $this->filtersVisibilityIsEnabled() && $this->hasVisibleFilters())
+ @if ($this->showFiltersButton())
@endif
+ @if($this->showActionsInToolbarLeft())
+
+ @endif
+
@if ($this->hasConfigurableAreaFor('toolbar-left-end'))
$this->isBootstrap,
- 'flex rounded-md shadow-sm' => $this->isTailwind,
+ 'mb-3 mb-md-0 input-group' => $isBootstrap,
+ 'flex rounded-md shadow-sm' => $isTailwind,
])>
@include($this->getConfigurableAreaFor('toolbar-left-end'), $this->getParametersForConfigurableArea('toolbar-left-end'))
@@ -48,43 +54,29 @@
$this->isBootstrap,
- 'md:flex md:items-center space-y-4 md:space-y-0 md:space-x-2' => $this->isTailwind,
+ 'd-md-flex' => $isBootstrap,
+ 'md:flex md:items-center space-y-4 md:space-y-0 md:space-x-2' => $isTailwind,
])
>
- @if ($this->hasConfigurableAreaFor('toolbar-right-start'))
- @include($this->getConfigurableAreaFor('toolbar-right-start'), $this->getParametersForConfigurableArea('toolbar-right-start'))
+ @includeWhen($this->hasConfigurableAreaFor('toolbar-right-start'), $this->getConfigurableAreaFor('toolbar-right-start'), $this->getParametersForConfigurableArea('toolbar-right-start'))
+
+ @if($this->showActionsInToolbarRight())
+
@endif
@if ($this->showBulkActionsDropdownAlpine() && $this->shouldAlwaysHideBulkActionsDropdownOption != true)
@endif
- @if ($this->columnSelectIsEnabled())
+ @if ($this->columnSelectIsEnabled)
@endif
- @if ($this->paginationIsEnabled() && $this->perPageVisibilityIsEnabled())
+ @if ($this->showPaginationDropdown())
@endif
- @if ($this->hasConfigurableAreaFor('toolbar-right-end'))
- @include($this->getConfigurableAreaFor('toolbar-right-end'), $this->getParametersForConfigurableArea('toolbar-right-end'))
- @endif
+ @includeWhen($this->hasConfigurableAreaFor('toolbar-right-end'), $this->getConfigurableAreaFor('toolbar-right-end'), $this->getParametersForConfigurableArea('toolbar-right-end'))
-@if (
- $this->filtersAreEnabled() &&
- $this->filtersVisibilityIsEnabled() &&
- $this->hasVisibleFilters() &&
- $this->isFilterLayoutSlideDown()
-)
-
-@endif
-
-@if ($this->hasConfigurableAreaFor('after-toolbar'))
-
- @include($this->getConfigurableAreaFor('after-toolbar'), $this->getParametersForConfigurableArea('after-toolbar'))
-
-@endif
diff --git a/resources/views/components/tools/toolbar/items/bulk-actions.blade.php b/resources/views/components/tools/toolbar/items/bulk-actions.blade.php
index faabdf825..12ea6bb18 100644
--- a/resources/views/components/tools/toolbar/items/bulk-actions.blade.php
+++ b/resources/views/components/tools/toolbar/items/bulk-actions.blade.php
@@ -1,46 +1,47 @@
-@aware(['component', 'tableName','isTailwind','isBootstrap','isBootstrap4','isBootstrap5'])
+@aware([ 'tableName','isTailwind','isBootstrap','isBootstrap4','isBootstrap5', 'localisationPath'])
$this->isBootstrap,
- 'w-full md:w-auto mb-4 md:mb-0' => $this->isTailwind,
+ 'mb-3 mb-md-0' => $isBootstrap,
+ 'w-full md:w-auto mb-4 md:mb-0' => $isTailwind,
])
>
$this->isBootstrap,
- 'relative inline-block text-left z-10 w-full md:w-auto' => $this->isTailwind,
+ 'dropdown d-block d-md-inline' => $isBootstrap,
+ 'relative inline-block text-left z-10 w-full md:w-auto' => $isTailwind,
])
>
merge($this->getBulkActionsButtonAttributes)
->class([
- 'btn dropdown-toggle d-block d-md-inline' => $this->isBootstrap && $this->getBulkActionsButtonAttributes['default-styling'] ?? true,
- 'border-gray-300 bg-white text-gray-700 hover:bg-gray-50 focus:border-indigo-300 focus:ring-indigo-200 dark:bg-gray-700 dark:text-white dark:border-gray-600 dark:hover:bg-gray-600' => $this->isTailwind && $this->getBulkActionsButtonAttributes['default-colors'] ?? true,
- 'inline-flex justify-center w-full rounded-md border shadow-sm px-4 py-2 text-sm font-medium focus:ring focus:ring-opacity-50' => $this->isTailwind && $this->getBulkActionsButtonAttributes['default-styling'] ?? true,
+ 'btn dropdown-toggle d-block d-md-inline' => $isBootstrap && ($this->getBulkActionsButtonAttributes['default-styling'] ?? true),
+ 'border-gray-300 bg-white text-gray-700 hover:bg-gray-50 focus:border-indigo-300 focus:ring-indigo-200 dark:bg-gray-700 dark:text-white dark:border-gray-600 dark:hover:bg-gray-600' => $isTailwind && ($this->getBulkActionsButtonAttributes['default-colors'] ?? true),
+ 'inline-flex justify-center w-full rounded-md border shadow-sm px-4 py-2 text-sm font-medium focus:ring focus:ring-opacity-50' => $isTailwind && ($this->getBulkActionsButtonAttributes['default-styling'] ?? true),
])
- ->except('default')
+ ->except(['default','default-styling','default-colors'])
}}
type="button"
id="{{ $tableName }}-bulkActionsDropdown"
- @if($this->isTailwind)
+ @if($isTailwind)
x-on:click="open = !open"
@else
data-toggle="dropdown" data-bs-toggle="dropdown"
@endif
aria-haspopup="true" aria-expanded="false">
- @lang('Bulk Actions')
- @if($this->isTailwind)
+ {{ __($localisationPath.'Bulk Actions') }}
+
+ @if($isTailwind)
@endif
- @if($this->isTailwind)
+ @if($isTailwind)
@@ -76,10 +77,10 @@ class="origin-top-right absolute right-0 mt-2 w-full md:w-48 rounded-md shadow-l
{{
$attributes->merge($this->getBulkActionsMenuItemAttributes)
->class([
- 'text-gray-700 hover:bg-gray-100 hover:text-gray-900 focus:bg-gray-100 focus:text-gray-900 dark:text-white dark:hover:bg-gray-600' => $this->isTailwind && $this->getBulkActionsMenuItemAttributes['default-colors'] ?? true,
- 'block w-full px-4 py-2 text-sm leading-5 focus:outline-none flex items-center space-x-2' => $this->isTailwind && $this->getBulkActionsMenuItemAttributes['default-styling'] ?? true,
+ 'text-gray-700 hover:bg-gray-100 hover:text-gray-900 focus:bg-gray-100 focus:text-gray-900 dark:text-white dark:hover:bg-gray-600' => $isTailwind && ($this->getBulkActionsMenuItemAttributes['default-colors'] ?? true),
+ 'block w-full px-4 py-2 text-sm leading-5 focus:outline-none flex items-center space-x-2' => $isTailwind && ($this->getBulkActionsMenuItemAttributes['default-styling'] ?? true),
])
- ->except('default')
+ ->except(['default','default-styling','default-colors'])
}}
>
{{ $title }}
@@ -93,10 +94,10 @@ class="origin-top-right absolute right-0 mt-2 w-full md:w-48 rounded-md shadow-l
{{
$attributes->merge($this->getBulkActionsMenuAttributes)
->class([
- 'dropdown-menu dropdown-menu-right w-100' => $this->isBootstrap4 && $this->getBulkActionsMenuAttributes['default-styling'] ?? true,
- 'dropdown-menu dropdown-menu-end w-100' => $this->isBootstrap5 && $this->getBulkActionsMenuAttributes['default-styling'] ?? true,
+ 'dropdown-menu dropdown-menu-right w-100' => $isBootstrap4 && ($this->getBulkActionsMenuAttributes['default-styling'] ?? true),
+ 'dropdown-menu dropdown-menu-end w-100' => $isBootstrap5 && ($this->getBulkActionsMenuAttributes['default-styling'] ?? true),
])
- ->except('default')
+ ->except(['default','default-styling','default-colors'])
}}
aria-labelledby="{{ $tableName }}-bulkActionsDropdown"
>
@@ -111,9 +112,9 @@ class="origin-top-right absolute right-0 mt-2 w-full md:w-48 rounded-md shadow-l
{{
$attributes->merge($this->getBulkActionsMenuItemAttributes)
->class([
- 'dropdown-item' => $this->isBootstrap && $this->getBulkActionsMenuItemAttributes['default-styling'] ?? true,
+ 'dropdown-item' => $isBootstrap && ($this->getBulkActionsMenuItemAttributes['default-styling'] ?? true),
])
- ->except('default')
+ ->except(['default','default-styling','default-colors'])
}}
>
{{ $title }}
diff --git a/resources/views/components/tools/toolbar/items/column-select.blade.php b/resources/views/components/tools/toolbar/items/column-select.blade.php
index f6a954514..388b9171c 100644
--- a/resources/views/components/tools/toolbar/items/column-select.blade.php
+++ b/resources/views/components/tools/toolbar/items/column-select.blade.php
@@ -1,191 +1,229 @@
-@aware(['component', 'tableName','isTailwind','isBootstrap','isBootstrap4','isBootstrap5'])
-@if ($isTailwind)
-
-
-
-
-
- @lang('Columns')
-
-
-
-
-
-
-
-
-
-@elseif ($isBootstrap)
-
$component->getColumnSelectIsHiddenOnMobile() && $isBootstrap4,
- 'd-none d-md-block mb-3 mb-md-0 pl-0 pl-md-2' => $component->getColumnSelectIsHiddenOnTablet() && $isBootstrap4,
- 'd-none d-sm-block mb-3 mb-md-0 md-0 ms-md-2' => $component->getColumnSelectIsHiddenOnMobile() && $isBootstrap5,
- 'd-none d-md-block mb-3 mb-md-0 md-0 ms-md-2' => $component->getColumnSelectIsHiddenOnTablet() && $isBootstrap5,
- ])
->
-
$isBootstrap,
- ])
- wire:key="{{ $tableName }}-column-select-button"
- >
-
$isBootstrap,
- ])
- type="button" id="{{ $tableName }}-columnSelect" aria-haspopup="true"
- x-bind:aria-expanded="open"
- >
- @lang('Columns')
-
-
-
-
-
-
-@endif
+@aware([ 'tableName','isTailwind','isBootstrap','isBootstrap4','isBootstrap5', 'localisationPath'])
+@if ($isTailwind)
+
+
+
+
+ merge($this->getColumnSelectButtonAttributes())
+ ->class([
+ 'inline-flex justify-center px-4 py-2 w-full text-sm font-medium rounded-md border shadow-sm focus:ring focus:ring-opacity-50' => $this->getColumnSelectButtonAttributes()['default-styling'],
+ 'text-gray-700 bg-white border-gray-300 hover:bg-gray-50 focus:border-indigo-300 focus:ring-indigo-200 dark:bg-gray-700 dark:text-white dark:border-gray-600 dark:hover:bg-gray-600' => $this->getColumnSelectButtonAttributes()['default-colors'],
+ ])
+ ->except(['default-styling', 'default-colors'])
+ }}
+ aria-haspopup="true"
+ x-bind:aria-expanded="open"
+ aria-expanded="true"
+ >
+ {{ __($localisationPath.'Columns') }}
+
+
+
+
+
+
+
+
+
+@elseif ($isBootstrap)
+
$this->getColumnSelectIsHiddenOnMobile() && $isBootstrap4,
+ 'd-none d-md-block mb-3 mb-md-0 pl-0 pl-md-2' => $this->getColumnSelectIsHiddenOnTablet() && $isBootstrap4,
+ 'd-none d-sm-block mb-3 mb-md-0 md-0 ms-md-2' => $this->getColumnSelectIsHiddenOnMobile() && $isBootstrap5,
+ 'd-none d-md-block mb-3 mb-md-0 md-0 ms-md-2' => $this->getColumnSelectIsHiddenOnTablet() && $isBootstrap5,
+ ])
+ >
+
$isBootstrap,
+ ])
+ wire:key="{{ $tableName }}-column-select-button"
+ >
+
merge($this->getColumnSelectButtonAttributes())
+ ->class([
+ 'btn dropdown-toggle d-block w-100 d-md-inline' => $this->getColumnSelectButtonAttributes()['default-styling'],
+ ])
+ ->except(['default-styling', 'default-colors'])
+ }}
+ type="button" id="{{ $tableName }}-columnSelect" aria-haspopup="true"
+ x-bind:aria-expanded="open"
+ >
+ {{ __($localisationPath.'Columns') }}
+
+
+
+
+
+@endif
diff --git a/resources/views/components/tools/toolbar/items/filter-button.blade.php b/resources/views/components/tools/toolbar/items/filter-button.blade.php
index 64b5ba0de..9340e7691 100644
--- a/resources/views/components/tools/toolbar/items/filter-button.blade.php
+++ b/resources/views/components/tools/toolbar/items/filter-button.blade.php
@@ -1,11 +1,11 @@
-@aware(['component', 'tableName','isTailwind','isBootstrap','isBootstrap4','isBootstrap5'])
+@aware([ 'tableName','isTailwind','isBootstrap','isBootstrap4','isBootstrap5', 'localisationPath'])
@props([])
$this->isBootstrap4,
- 'ms-0 ms-md-2 mb-3 mb-md-0' => $this->isBootstrap5 && $this->searchIsEnabled(),
- 'mb-3 mb-md-0' => $this->isBootstrap5 && !$this->searchIsEnabled(),
+ 'ml-0 ml-md-2 mb-3 mb-md-0' => $isBootstrap4,
+ 'ms-0 ms-md-2 mb-3 mb-md-0' => $isBootstrap5 && $this->searchIsEnabled(),
+ 'mb-3 mb-md-0' => $isBootstrap5 && !$this->searchIsEnabled(),
])
>
$this->isBootstrap,
- 'relative block md:inline-block text-left' => $this->isTailwind,
+ 'btn-group d-block d-md-inline' => $isBootstrap,
+ 'relative block md:inline-block text-left' => $isTailwind,
])
>
$this->isBootstrap,
- 'inline-flex justify-center w-full rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-sm font-medium text-gray-700 hover:bg-gray-50 focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50 dark:bg-gray-700 dark:text-white dark:border-gray-600 dark:hover:bg-gray-600' => $this->isTailwind,
+ 'btn dropdown-toggle d-block w-100 d-md-inline' => $isBootstrap,
+ 'inline-flex justify-center w-full rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-sm font-medium text-gray-700 hover:bg-gray-50 focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50 dark:bg-gray-700 dark:text-white dark:border-gray-600 dark:hover:bg-gray-600' => $isTailwind,
])
@if ($this->isFilterLayoutPopover()) x-on:click="filterPopoverOpen = !filterPopoverOpen"
aria-haspopup="true"
@@ -33,22 +33,22 @@
@endif
@if ($this->isFilterLayoutSlideDown()) x-on:click="filtersOpen = !filtersOpen" @endif
>
- @lang('Filters')
+ {{ __($localisationPath.'Filters') }}
@if ($count = $this->getFilterBadgeCount())
$this->isBootstrap,
- 'ml-1 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium leading-4 bg-indigo-100 text-indigo-800 capitalize dark:bg-indigo-200 dark:text-indigo-900' => $this->isTailwind,
+ 'badge badge-info' => $isBootstrap,
+ 'ml-1 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium leading-4 bg-indigo-100 text-indigo-800 capitalize dark:bg-indigo-200 dark:text-indigo-900' => $isTailwind,
])>
{{ $count }}
@endif
- @if($this->isTailwind)
+ @if($isTailwind)
@else
$this->isBootstrap,
+ 'caret' => $isBootstrap,
])>
@endif
diff --git a/resources/views/components/tools/toolbar/items/filter-popover.blade.php b/resources/views/components/tools/toolbar/items/filter-popover.blade.php
index 3ef892130..2321f9f18 100644
--- a/resources/views/components/tools/toolbar/items/filter-popover.blade.php
+++ b/resources/views/components/tools/toolbar/items/filter-popover.blade.php
@@ -1,66 +1,51 @@
-@aware(['component', 'tableName','isBootstrap','isBootstrap4','isBootstrap5'])
+@aware(['tableName'])
@if($this->isBootstrap)
- $this->isBootstrap4,
- 'dropdown-menu w-100' => $this->isBootstrap5,
- ])
- x-bind:class="{ 'show': filterPopoverOpen }"
- role="menu"
- >
+ merge($this->getFilterPopoverAttributes)
+ ->merge(['role' => 'menu'])
+ ->class([
+ 'w-100' => $this->getFilterPopoverAttributes['default-width'] ?? true,
+ 'dropdown-menu mt-md-5' => $this->isBootstrap4,
+ 'dropdown-menu' => $this->isBootstrap5,
+ ]) }} x-bind:class="{ 'show': filterPopoverOpen }">
@foreach ($this->getVisibleFilters() as $filter)
- $this->isBootstrap,
- ])
- id="{{ $tableName }}-filter-{{ $filter->getKey() }}-wrapper"
- >
+
{{ $filter->setGenericDisplayData($this->getFilterGenericData)->render() }}
@endforeach
@if ($this->hasAppliedVisibleFiltersWithValuesThatCanBeCleared())
-
$this->isBootstrap,
- ])
- >
-
-
-
$this->isBootstrap4,
- 'dropdown-item text-center' => $this->isBootstrap5,
- ])
- >
- @lang('Clear')
-
+
+
@endif
@else
-
+
merge($this->getFilterPopoverAttributes)
+ ->merge([
+ 'role' => 'menu',
+ 'aria-orientation' => 'vertical',
+ 'aria-labelledby' => 'filters-menu',
+ 'x-transition:enter' => 'transition ease-out duration-100',
+ 'x-transition:enter-start' => 'transform opacity-0 scale-95',
+ 'x-transition:enter-end' => 'transform opacity-100 scale-100',
+ 'x-transition:leave' => 'transition ease-in duration-75',
+ 'x-transition:leave-start' => 'transform opacity-100 scale-100',
+ 'x-transition:leave-end' => 'transform opacity-0 scale-95',
+ ])
+ ->class([
+ 'w-full md:w-56' => $this->getFilterPopoverAttributes['default-width'] ?? true,
+ 'origin-top-left absolute left-0 mt-2 rounded-md shadow-lg ring-1 ring-opacity-5 divide-y focus:outline-none z-50' => $this->getFilterPopoverAttributes['default-styling'] ?? true,
+ 'bg-white divide-gray-100 ring-black dark:bg-gray-700 dark:text-white dark:divide-gray-600' => $this->getFilterPopoverAttributes['default-colors'] ?? true,
+ ])
+ ->except(['x-cloak', 'x-show', 'default','default-width', 'default-styling','default-colors'])
+ }}>
+
@foreach ($this->getVisibleFilters() as $filter)
-
+
{{ $filter->setGenericDisplayData($this->getFilterGenericData)->render() }}
@@ -68,14 +53,7 @@ class="block px-4 py-2 text-sm text-gray-700 space-y-1"
@if ($this->hasAppliedVisibleFiltersWithValuesThatCanBeCleared())
-
- @lang('Clear')
-
+
@endif
diff --git a/resources/views/components/tools/toolbar/items/filter-popover/clear-button.blade.php b/resources/views/components/tools/toolbar/items/filter-popover/clear-button.blade.php
new file mode 100644
index 000000000..4c2170878
--- /dev/null
+++ b/resources/views/components/tools/toolbar/items/filter-popover/clear-button.blade.php
@@ -0,0 +1,8 @@
+@aware(['isTailwind','isBootstrap4','isBootstrap5', 'localisationPath'])
+
$isTailwind,
+ 'dropdown-item btn text-center' => $isBootstrap4,
+ 'dropdown-item text-center' => $isBootstrap5,
+ ])>
+ {{ __($localisationPath.'Clear') }}
+
\ No newline at end of file
diff --git a/resources/views/components/tools/toolbar/items/filter-slidedown.blade.php b/resources/views/components/tools/toolbar/items/filter-slidedown.blade.php
index f33a45fe1..b82f68afc 100644
--- a/resources/views/components/tools/toolbar/items/filter-slidedown.blade.php
+++ b/resources/views/components/tools/toolbar/items/filter-slidedown.blade.php
@@ -1,60 +1,70 @@
-@aware(['component', 'tableName'])
+@aware([ 'tableName', 'isTailwind', 'isBootstrap'])
@props([])
-
$this->isBootstrap,
- ])
- @if($this->isTailwind)
- x-transition:enter="transition ease-out duration-100"
- x-transition:enter-start="transform opacity-0"
- x-transition:enter-end="transform opacity-100"
- x-transition:leave="transition ease-in duration-75"
- x-transition:leave-start="transform opacity-100"
- x-transition:leave-end="transform opacity-0"
- @endif
+
merge($this->getFilterSlidedownWrapperAttributes)
+ ->merge($isTailwind ? [
+ 'x-transition:enter' => 'transition ease-out duration-100',
+ 'x-transition:enter-start' => 'transform opacity-0',
+ 'x-transition:enter-end' => 'transform opacity-100',
+ 'x-transition:leave' => 'transition ease-in duration-75',
+ 'x-transition:leave-start' => 'transform opacity-100',
+ 'x-transition:leave-end' => 'transform opacity-0',
+ ] : [])
+ ->class([
+ 'container' => $isBootstrap && ($this->getFilterSlidedownWrapperAttributes['default'] ?? true),
+ ])
+ ->except(['default','default-colors','default-styling'])
+ }}
+
>
- @foreach ($this->getFiltersByRow() as $filterRowIndex => $filterRow)
-
$this->isBootstrap,
- 'grid grid-cols-12 gap-6 px-4 md:p-0 mb-6' => $this->isTailwind,
+ @foreach ($this->getFiltersByRow() as $filterRowIndex => $filtersInRow)
+ @php($defaultAttributes = $this->getFilterSlidedownRowAttributes($filterRowIndex))
+
merge($defaultAttributes)
+ ->merge([
+ 'row' => $filterRowIndex,
+ ])
+ ->class([
+ 'row col-12' => $isBootstrap && ($defaultAttributes['default-styling'] ?? true),
+ 'grid grid-cols-12 gap-6 px-4 py-2 mb-2' => $isTailwind && ($defaultAttributes['default-styling'] ?? true),
])
- row="{{ $filterRowIndex }}"
+ ->except(['default','default-colors','default-styling'])
+ }}
>
- @foreach ($filterRow as $filter)
+ @foreach ($filtersInRow as $filter)
- $this->isBootstrap,
- 'col-12 col-sm-9 col-md-6 col-lg-3' =>
- $this->isBootstrap &&
+ 'space-y-1 mb-4' =>
+ $isBootstrap,
+ 'col-12 col-sm-9 col-md-6 col-lg-3' =>
+ $isBootstrap &&
!$filter->hasFilterSlidedownColspan(),
'col-12 col-sm-6 col-md-6 col-lg-3' =>
- $this->isBootstrap &&
+ $isBootstrap &&
$filter->hasFilterSlidedownColspan() &&
- $filter->getFilterSlidedownColspan() == 2,
+ $filter->getFilterSlidedownColspan() === 2,
'col-12 col-sm-3 col-md-3 col-lg-3' =>
- $this->isBootstrap &&
+ $isBootstrap &&
$filter->hasFilterSlidedownColspan() &&
- $filter->getFilterSlidedownColspan() == 3,
+ $filter->getFilterSlidedownColspan() === 3,
'col-12 col-sm-1 col-md-1 col-lg-1' =>
- $this->isBootstrap &&
+ $isBootstrap &&
$filter->hasFilterSlidedownColspan() &&
- $filter->getFilterSlidedownColspan() == 4,
- 'space-y-1 col-span-12' =>
- $this->isTailwind,
- 'sm:col-span-6 md:col-span-4 lg:col-span-2' =>
- $this->isTailwind &&
+ $filter->getFilterSlidedownColspan() === 4,
+ 'space-y-1 col-span-12' =>
+ $isTailwind,
+ 'sm:col-span-6 md:col-span-4 lg:col-span-2' =>
+ $isTailwind &&
!$filter->hasFilterSlidedownColspan(),
'sm:col-span-12 md:col-span-8 lg:col-span-4' =>
- $this->isTailwind &&
+ $isTailwind &&
$filter->hasFilterSlidedownColspan() &&
- $filter->getFilterSlidedownColspan() == 2,
+ $filter->getFilterSlidedownColspan() === 2,
'sm:col-span-9 md:col-span-4 lg:col-span-3' =>
- $this->isTailwind &&
+ $isTailwind &&
$filter->hasFilterSlidedownColspan() &&
- $filter->getFilterSlidedownColspan() == 3,
+ $filter->getFilterSlidedownColspan() === 3,
])
id="{{ $tableName }}-filter-{{ $filter->getKey() }}-wrapper"
>
diff --git a/resources/views/components/tools/toolbar/items/pagination-dropdown.blade.php b/resources/views/components/tools/toolbar/items/pagination-dropdown.blade.php
index da39ef3d5..b913158da 100644
--- a/resources/views/components/tools/toolbar/items/pagination-dropdown.blade.php
+++ b/resources/views/components/tools/toolbar/items/pagination-dropdown.blade.php
@@ -1,27 +1,27 @@
-@aware(['component', 'tableName','isTailwind','isBootstrap','isBootstrap4','isBootstrap5'])
+@aware([ 'tableName','isTailwind','isBootstrap','isBootstrap4','isBootstrap5', 'localisationPath'])
$this->isBootstrap4,
- 'ms-0 ms-md-2' => $this->isBootstrap5,
+ 'ml-0 ml-md-2' => $isBootstrap4,
+ 'ms-0 ms-md-2' => $isBootstrap5,
])
>
merge($component->getPerPageFieldAttributes())
+ $attributes->merge($this->getPerPageFieldAttributes())
->class([
- 'form-control' => $this->isBootstrap4 && $component->getPerPageFieldAttributes()['default-styling'],
- 'form-select' => $this->isBootstrap5 && $component->getPerPageFieldAttributes()['default-styling'],
- 'block w-full rounded-md shadow-sm transition duration-150 ease-in-out sm:text-sm sm:leading-5 focus:ring focus:ring-opacity-50' => $this->isTailwind && $component->getPerPageFieldAttributes()['default-styling'],
- 'border-gray-300 focus:border-indigo-300 focus:ring-indigo-200 dark:bg-gray-700 dark:text-white dark:border-gray-600' => $this->isTailwind && $component->getPerPageFieldAttributes()['default-colors'],
+ 'form-control' => $isBootstrap4 && $this->getPerPageFieldAttributes()['default-styling'],
+ 'form-select' => $isBootstrap5 && $this->getPerPageFieldAttributes()['default-styling'],
+ 'block w-full rounded-md shadow-sm transition duration-150 ease-in-out sm:text-sm sm:leading-5 focus:ring focus:ring-opacity-50' => $isTailwind && $this->getPerPageFieldAttributes()['default-styling'],
+ 'border-gray-300 focus:border-indigo-300 focus:ring-indigo-200 dark:bg-gray-700 dark:text-white dark:border-gray-600' => $isTailwind && $this->getPerPageFieldAttributes()['default-colors'],
])
->except(['default','default-styling','default-colors'])
}}
>
- @foreach ($component->getPerPageAccepted() as $item)
+ @foreach ($this->getPerPageAccepted() as $item)
- {{ $item === -1 ? __('All') : $item }}
+ {{ $item === -1 ? __($localisationPath.'All') : $item }}
@endforeach
diff --git a/resources/views/components/tools/toolbar/items/reorder-buttons.blade.php b/resources/views/components/tools/toolbar/items/reorder-buttons.blade.php
index c0dc417f8..3f524167b 100644
--- a/resources/views/components/tools/toolbar/items/reorder-buttons.blade.php
+++ b/resources/views/components/tools/toolbar/items/reorder-buttons.blade.php
@@ -1,24 +1,24 @@
-@aware(['component', 'tableName','isTailwind','isBootstrap','isBootstrap4','isBootstrap5'])
+@aware(['tableName','isTailwind','isBootstrap','isBootstrap4','isBootstrap5','localisationPath'])
$this->isBootstrap4,
- 'me-0 me-md-2 mb-3 mb-md-0' => $this->isBootstrap5
+ 'mr-0 mr-md-2 mb-3 mb-md-0' => $isBootstrap4,
+ 'me-0 me-md-2 mb-3 mb-md-0' => $isBootstrap5
])
>
$this->isBootstrap,
- 'inline-flex justify-center items-center w-full md:w-auto px-4 py-2 border border-gray-300 shadow-sm text-sm font-medium rounded-md text-gray-700 bg-white hover:text-gray-500 focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50 active:bg-gray-50 active:text-gray-800 transition ease-in-out duration-150 dark:bg-gray-700 dark:text-white dark:border-gray-600 dark:hover:bg-gray-600' => $this->isTailwind
+ 'btn btn-default d-block d-md-inline' => $isBootstrap,
+ 'inline-flex justify-center items-center w-full md:w-auto px-4 py-2 border border-gray-300 shadow-sm text-sm font-medium rounded-md text-gray-700 bg-white hover:text-gray-500 focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50 active:bg-gray-50 active:text-gray-800 transition ease-in-out duration-150 dark:bg-gray-700 dark:text-white dark:border-gray-600 dark:hover:bg-gray-600' => $isTailwind
])
>
- @lang('Cancel')
+ {{ __($localisationPath.'cancel') }}
- @lang('Reorder')
+ {{ __($localisationPath.'Reorder') }}
@@ -28,12 +28,12 @@
type="button"
x-on:click="updateOrderedItems"
@class([
- 'btn btn-default d-block d-md-inline' => $this->isBootstrap && $this->currentlyReorderingStatus,
- 'inline-flex justify-center items-center w-full md:w-auto px-4 py-2 border border-gray-300 shadow-sm text-sm font-medium rounded-md text-gray-700 bg-white hover:text-gray-500 focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50 active:bg-gray-50 active:text-gray-800 transition ease-in-out duration-150 dark:bg-gray-700 dark:text-white dark:border-gray-600 dark:hover:bg-gray-600' => $this->isTailwind
+ 'btn btn-default d-block d-md-inline' => $isBootstrap && $this->currentlyReorderingStatus,
+ 'inline-flex justify-center items-center w-full md:w-auto px-4 py-2 border border-gray-300 shadow-sm text-sm font-medium rounded-md text-gray-700 bg-white hover:text-gray-500 focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50 active:bg-gray-50 active:text-gray-800 transition ease-in-out duration-150 dark:bg-gray-700 dark:text-white dark:border-gray-600 dark:hover:bg-gray-600' => $isTailwind
])
>
- @lang('Save')
+ {{ __($localisationPath.'save') }}
diff --git a/resources/views/components/tools/toolbar/items/search-field.blade.php b/resources/views/components/tools/toolbar/items/search-field.blade.php
index 48c791e1e..51795a70c 100644
--- a/resources/views/components/tools/toolbar/items/search-field.blade.php
+++ b/resources/views/components/tools/toolbar/items/search-field.blade.php
@@ -1,46 +1,20 @@
-@aware(['component', 'tableName','isTailwind', 'isBootstrap'])
+@aware(['isTailwind', 'isBootstrap'])
$this->isBootstrap,
- 'flex rounded-md shadow-sm' => $this->isTailwind,
+ 'mb-3 mb-md-0 input-group' => $isBootstrap,
+ 'rounded-md shadow-sm' => $isTailwind,
+ 'flex' => ($isTailwind && !$this->hasSearchIcon),
+ 'relative inline-flex flex-row' => $this->hasSearchIcon,
])>
-
getSearchOptions() }}="search"
- placeholder="{{ $this->getSearchPlaceholder() }}"
- type="text"
- {{
- $attributes->merge($this->getSearchFieldAttributes())
- ->class([
- 'block w-full border-gray-300 rounded-md shadow-sm transition duration-150 ease-in-out sm:text-sm sm:leading-5 dark:bg-gray-700 dark:text-white dark:border-gray-600 rounded-none rounded-l-md focus:ring-0 focus:border-gray-300' => $this->isTailwind && $this->hasSearch() && $this->getSearchFieldAttributes()['default'] ?? true,
- 'block w-full border-gray-300 rounded-md shadow-sm transition duration-150 ease-in-out sm:text-sm sm:leading-5 dark:bg-gray-700 dark:text-white dark:border-gray-600 rounded-md focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50' => $this->isTailwind && !$this->hasSearch() && $this->getSearchFieldAttributes()['default'] ?? true,
- 'form-control' => $this->isBootstrap && $this->getSearchFieldAttributes()['default'] ?? true,
- ])
- ->except('default')
- }}
- />
-
- @if ($this->hasSearch())
-
$this->isBootstrap,
- ])>
-
$this->isBootstrap,
- 'inline-flex h-full items-center px-3 text-gray-500 bg-gray-50 rounded-r-md border border-l-0 border-gray-300 cursor-pointer sm:text-sm dark:bg-gray-700 dark:text-white dark:border-gray-600 dark:hover:bg-gray-600' => $this->isTailwind,
- ])
- >
- @if($this->isTailwind)
-
- @else
-
- @endif
-
-
+ @if($this->hasSearchIcon)
+
@endif
+
+ @if ($this->hasSearch)
+
+ @endif
diff --git a/resources/views/components/tools/toolbar/items/search/icon.blade.php b/resources/views/components/tools/toolbar/items/search/icon.blade.php
new file mode 100644
index 000000000..f90022b50
--- /dev/null
+++ b/resources/views/components/tools/toolbar/items/search/icon.blade.php
@@ -0,0 +1,8 @@
+@props(['searchIcon','searchIconClasses','searchIconOtherAttributes'])
+
+
+ @svg($searchIcon, $searchIconClasses, $searchIconOtherAttributes)
+
+
diff --git a/resources/views/components/tools/toolbar/items/search/input.blade.php b/resources/views/components/tools/toolbar/items/search/input.blade.php
new file mode 100644
index 000000000..d3331cd14
--- /dev/null
+++ b/resources/views/components/tools/toolbar/items/search/input.blade.php
@@ -0,0 +1,20 @@
+@aware(['isTailwind', 'isBootstrap'])
+
getSearchOptions() }}="search"
+ placeholder="{{ $this->getSearchPlaceholder() }}"
+ type="text"
+ {{
+ $attributes->merge($this->getSearchFieldAttributes())
+ ->class([
+ 'rounded-md shadow-sm transition duration-150 ease-in-out sm:text-sm sm:leading-5 rounded-none rounded-l-md focus:ring-0 focus:border-gray-300' => $isTailwind && $this->hasSearch() && (($this->getSearchFieldAttributes()['default'] ?? true) || ($this->getSearchFieldAttributes()['default-styling'] ?? true)),
+ 'rounded-md shadow-sm transition duration-150 ease-in-out sm:text-sm sm:leading-5 rounded-md focus:ring focus:ring-opacity-50' => $isTailwind && !$this->hasSearch() && (($this->getSearchFieldAttributes()['default'] ?? true) || ($this->getSearchFieldAttributes()['default-styling'] ?? true)),
+ 'border-gray-300 dark:bg-gray-700 dark:text-white dark:border-gray-600 focus:border-gray-300' => $isTailwind && $this->hasSearch() && (($this->getSearchFieldAttributes()['default'] ?? true) || ($this->getSearchFieldAttributes()['default-colors'] ?? true)),
+ 'border-gray-300 dark:bg-gray-700 dark:text-white dark:border-gray-600 focus:border-indigo-300 focus:ring-indigo-200' => $isTailwind && !$this->hasSearch() && (($this->getSearchFieldAttributes()['default'] ?? true) || ($this->getSearchFieldAttributes()['default-colors'] ?? true)),
+ 'block w-full' => !$this->hasSearchIcon,
+ 'pl-8 pr-4' => $this->hasSearchIcon,
+ 'form-control' => $isBootstrap && $this->getSearchFieldAttributes()['default'] ?? true,
+ ])
+ ->except(['default','default-styling','default-colors'])
+ }}
+
+/>
\ No newline at end of file
diff --git a/resources/views/components/tools/toolbar/items/search/remove.blade.php b/resources/views/components/tools/toolbar/items/search/remove.blade.php
new file mode 100644
index 000000000..40ef7d8fe
--- /dev/null
+++ b/resources/views/components/tools/toolbar/items/search/remove.blade.php
@@ -0,0 +1,21 @@
+
+@aware(['isTailwind', 'isBootstrap'])
+
+
$isBootstrap,
+ ])>
+
$isBootstrap,
+ 'inline-flex h-full items-center px-3 text-gray-500 bg-gray-50 rounded-r-md border border-l-0 border-gray-300 cursor-pointer sm:text-sm dark:bg-gray-700 dark:text-white dark:border-gray-600 dark:hover:bg-gray-600' => $isTailwind,
+ ])
+ >
+ @if($isTailwind)
+
+ @else
+
+ @endif
+
+
diff --git a/resources/views/datatable.blade.php b/resources/views/datatable.blade.php
index 02cb79d0f..35e0f21d9 100644
--- a/resources/views/datatable.blade.php
+++ b/resources/views/datatable.blade.php
@@ -5,101 +5,158 @@
@php($isBootstrap = $this->isBootstrap)
@php($isBootstrap4 = $this->isBootstrap4)
@php($isBootstrap5 = $this->isBootstrap5)
+@php($localisationPath = $this->getLocalisationPath)
-
-
- @if(method_exists($this,'hasActions') && $this->hasActions())
-
- @endif
-
-
- @if ($this->hasConfigurableAreaFor('before-tools'))
- @include($this->getConfigurableAreaFor('before-tools'), $this->getParametersForConfigurableArea('before-tools'))
- @endif
-
-
- @if ($this->showSortPillsSection)
-
- @endif
- @if($this->showFilterPillsSection)
-
- @endif
-
-
-
-
-
-
- @if($this->getCurrentlyReorderingStatus)
-
- @endif
- @if($this->showBulkActionsSections)
-
+
+
+
getTopLevelAttributes() }}>
+
+ @includeWhen(
+ $this->hasConfigurableAreaFor('before-wrapper'),
+ $this->getConfigurableAreaFor('before-wrapper'),
+ $this->getParametersForConfigurableArea('before-wrapper')
+ )
+
+
+ @if($this->hasActions && !$this->showActionsInToolbar)
+
@endif
- @if ($this->showCollapsingColumnSections)
-
+
+ @includeWhen(
+ $this->hasConfigurableAreaFor('before-tools'),
+ $this->getConfigurableAreaFor('before-tools'),
+ $this->getParametersForConfigurableArea('before-tools')
+ )
+
+ @if($this->shouldShowTools)
+
+ @if ($this->showSortPillsSection)
+
+ @endif
+ @if($this->showFilterPillsSection)
+
+ @endif
+
+ @includeWhen(
+ $this->hasConfigurableAreaFor('before-toolbar'),
+ $this->getConfigurableAreaFor('before-toolbar'),
+ $this->getParametersForConfigurableArea('before-toolbar')
+ )
+
+ @if($this->shouldShowToolBar)
+
+ @endif
+ @if (
+ $this->filtersAreEnabled() &&
+ $this->filtersVisibilityIsEnabled() &&
+ $this->hasVisibleFilters() &&
+ $this->isFilterLayoutSlideDown()
+ )
+
+ @endif
+ @includeWhen(
+ $this->hasConfigurableAreaFor('after-toolbar'),
+ $this->getConfigurableAreaFor('after-toolbar'),
+ $this->getParametersForConfigurableArea('after-toolbar')
+ )
+
+
@endif
- @foreach($this->selectedVisibleColumns as $index => $column)
-
- @endforeach
-
+ @includeWhen(
+ $this->hasConfigurableAreaFor('after-tools'),
+ $this->getConfigurableAreaFor('after-tools'),
+ $this->getParametersForConfigurableArea('after-tools')
+ )
- @if($this->secondaryHeaderIsEnabled() && $this->hasColumnsWithSecondaryHeader())
-
- @endif
- @if($this->hasDisplayLoadingPlaceholder())
-
- @endif
+
+
+ @if($this->getCurrentlyReorderingStatus)
+
+ @endif
+ @if($this->showBulkActionsSections)
+
+ @endif
+ @if ($this->showCollapsingColumnSections)
+
+ @endif
- @if($this->showBulkActionsSections)
-
- @endif
+ @tableloop($this->selectedVisibleColumns as $index => $column)
+
+ @endtableloop
+
- @forelse ($this->getRows as $rowIndex => $row)
-
- @if($this->getCurrentlyReorderingStatus)
-
+ @if($this->secondaryHeaderIsEnabled() && $this->hasColumnsWithSecondaryHeader())
+
@endif
+ @if($this->hasDisplayLoadingPlaceholder())
+
+ @endif
+
@if($this->showBulkActionsSections)
-
+
@endif
- @if ($this->showCollapsingColumnSections)
-
+ @if(count($currentRows = $this->getRows) > 0)
+ @php($getCurrentlyReorderingStatus = $this->getCurrentlyReorderingStatus)
+ @php($showBulkActionsSections = $this->showBulkActionsSections)
+ @php($showCollapsingColumnSections = $this->showCollapsingColumnSections)
+ @php($selectedVisibleColumns = $this->selectedVisibleColumns)
+
+ @tableloop ($currentRows as $rowIndex => $row)
+
+ @if($getCurrentlyReorderingStatus)
+
+ @endif
+ @if($showBulkActionsSections)
+
+ @endif
+ @if ($showCollapsingColumnSections)
+
+ @endif
+
+ @tableloop($selectedVisibleColumns as $colIndex => $column)
+
+ @if($column->isHtml())
+ {!! $column->setIndexes($rowIndex, $colIndex)->renderContents($row) !!}
+ @else
+ {{ $column->setIndexes($rowIndex, $colIndex)->renderContents($row) }}
+ @endif
+
+ @endtableloop
+
+
+ @if ($showCollapsingColumnSections)
+
+ @endif
+ @endtableloop
+ @else
+
@endif
+
- @foreach($this->selectedVisibleColumns as $colIndex => $column)
-
- @if($column->isHtml())
- {!! $column->renderContents($row) !!}
+ @if ($this->footerIsEnabled() && $this->hasColumnsWithFooter())
+
+ @if ($this->useHeaderAsFooterIsEnabled())
+
@else
- {{ $column->renderContents($row) }}
+
@endif
-
- @endforeach
-
+
+ @endif
+
- @if ($this->showCollapsingColumnSections)
-
- @endif
- @empty
-
- @endforelse
+
- @if ($this->footerIsEnabled() && $this->hasColumnsWithFooter())
-
- @if ($this->useHeaderAsFooterIsEnabled())
-
- @else
-
- @endif
-
- @endif
-
+ @includeIf($customView)
+
-
+ @includeWhen(
+ $this->hasConfigurableAreaFor('after-wrapper'),
+ $this->getConfigurableAreaFor('after-wrapper'),
+ $this->getParametersForConfigurableArea('after-wrapper')
+ )
- @includeIf($customView)
-
+
+
diff --git a/resources/views/includes/actions/button.blade.php b/resources/views/includes/actions/button.blade.php
index e4a9b137c..565ad0d7c 100644
--- a/resources/views/includes/actions/button.blade.php
+++ b/resources/views/includes/actions/button.blade.php
@@ -1,10 +1,12 @@
merge()
- ->class(['justify-center text-center items-center inline-flex space-x-2 rounded-md border shadow-sm px-4 py-2 text-sm font-medium focus:ring focus:ring-opacity-50' => $isTailwind && $attributes['default-styling'] ?? true])
- ->class(['focus:border-indigo-300 focus:ring-indigo-200' => $isTailwind && $attributes['default-colors'] ?? true])
- ->class(['btn btn-sm btn-success' => $isBootstrap && $attributes['default-styling'] ?? true])
- ->class(['' => $isBootstrap && $attributes['default-colors'] ?? true])
- ->except(['default-styling', 'default-colors'])
- }}
+ ->class([
+ 'justify-center text-center items-center inline-flex space-x-2 rounded-md border shadow-sm px-4 py-2 text-sm font-medium focus:ring focus:ring-opacity-50' => $isTailwind && ($attributes['default-styling'] ?? true),
+ 'focus:border-indigo-300 focus:ring-indigo-200' => $isTailwind && ($attributes['default-colors'] ?? true),
+ 'btn btn-sm btn-success' => $isBootstrap && ($attributes['default-styling'] ?? true),
+ '' => $isBootstrap && ($attributes['default-colors'] ?? true),
+ ])
+ ->except(['default','default-styling','default-colors'])
+ }}
@if($action->hasWireAction())
{{ $action->getWireAction() }}="{{ $action->getWireActionParams() }}"
@endif
@@ -14,11 +16,13 @@
>
@if($action->hasIcon() && $action->getIconRight())
- {{ $action->getLabel() }}
+ getLabelAttributesBag() }}>{{ $action->getLabel() }}
getIconAttributes()
- ->class(["ms-1 ". $action->getIcon() => $isBootstrap])
- ->class(["ml-1 ". $action->getIcon() => $isTailwind])
- ->except('default-styling')
+ ->class([
+ 'ms-1 '. $action->getIcon() => $isBootstrap,
+ 'ml-1 '. $action->getIcon() => $isTailwind,
+ ])
+ ->except(['default','default-styling','default-colors'])
}}
>
@elseif($action->hasIcon() && !$action->getIconRight())
@@ -28,6 +32,8 @@
->except('default-styling')
}}
>
- {{ $action->getLabel() }}
+ getLabelAttributesBag() }}>{{ $action->getLabel() }}
+ @else
+ getLabelAttributesBag() }}>{{ $action->getLabel() }}
@endif
-
\ No newline at end of file
+
diff --git a/resources/views/includes/columns/boolean.blade.php b/resources/views/includes/columns/boolean.blade.php
index 1fb338512..1d10607c2 100644
--- a/resources/views/includes/columns/boolean.blade.php
+++ b/resources/views/includes/columns/boolean.blade.php
@@ -1,40 +1,27 @@
-@if ($isTailwind)
- @if ($status)
- @if ($type === 'icons')
- @if ($successValue === true)
-
- @else
-
- @endif
- @elseif ($type === 'yes-no')
- @if ($successValue === true)
- Yes
- @else
- No
- @endif
- @endif
- @else
- @if ($type === 'icons')
- @if ($successValue === false)
-
- @else
-
- @endif
- @elseif ($type === 'yes-no')
- @if ($successValue === false)
- Yes
- @else
- No
- @endif
- @endif
- @endif
-@elseif ($isBootstrap)
+@if($isToggleable && $toggleMethod !== '')
+
+@endif
@if ($status)
@if ($type === 'icons')
@if ($successValue === true)
-
- @else
-
+ $isTailwind,
+ 'd-inline-block text-success laravel-livewire-tables-btn-small' => $isBootstrap
+ ]
+ )
+ />
+ @else
+ $isTailwind,
+ 'd-inline-block text-danger laravel-livewire-tables-btn-small' => $isBootstrap
+ ]
+ )
+ />
@endif
@elseif ($type === 'yes-no')
@if ($successValue === true)
@@ -46,9 +33,21 @@
@else
@if ($type === 'icons')
@if ($successValue === false)
-
- @else
-
+ $isTailwind,
+ 'd-inline-block text-success laravel-livewire-tables-btn-small' => $isBootstrap
+ ]
+ )
+ />
+ @else
+ $isTailwind,
+ 'd-inline-block text-danger laravel-livewire-tables-btn-small' => $isBootstrap
+ ]
+ )
+ />
@endif
@elseif ($type === 'yes-no')
@if ($successValue === false)
@@ -58,4 +57,6 @@
@endif
@endif
@endif
+@if($isToggleable && $toggleMethod !== '')
+
@endif
diff --git a/resources/views/includes/columns/icon.blade.php b/resources/views/includes/columns/icon.blade.php
new file mode 100644
index 000000000..0f8298c03
--- /dev/null
+++ b/resources/views/includes/columns/icon.blade.php
@@ -0,0 +1,7 @@
+
+ @svg(
+ $icon,
+ $classes,
+ $attributes,
+ )
+
\ No newline at end of file
diff --git a/resources/views/includes/columns/increment.blade.php b/resources/views/includes/columns/increment.blade.php
new file mode 100644
index 000000000..5ede69f09
--- /dev/null
+++ b/resources/views/includes/columns/increment.blade.php
@@ -0,0 +1,2 @@
+@aware(['rowIndex'])
+{{ $rowIndex+1 }}
diff --git a/resources/views/includes/columns/wire-link.blade.php b/resources/views/includes/columns/wire-link.blade.php
index 191ba5f1d..dc8add95c 100644
--- a/resources/views/includes/columns/wire-link.blade.php
+++ b/resources/views/includes/columns/wire-link.blade.php
@@ -1,4 +1,4 @@
-arrayToAttributes($attributes) : '' !!}
@if($column->hasConfirmMessage())
wire:confirm="{{ $column->getConfirmMessage() }}"
diff --git a/resources/views/includes/debug.blade.php b/resources/views/includes/debug.blade.php
index fa3803f84..157b52a18 100644
--- a/resources/views/includes/debug.blade.php
+++ b/resources/views/includes/debug.blade.php
@@ -1,6 +1,7 @@
@if ($this->debugIsEnabled())
-
@lang('Debugging Values'):
+
{{ __($this->getLocalisationPath.'Debugging Values') }}:
+
@if (! app()->runningInConsole())
@dump((new \Rappasoft\LaravelLivewireTables\DataTransferObjects\DebuggableData($this))->toArray())
diff --git a/resources/views/includes/filter-pill.blade.php b/resources/views/includes/filter-pill.blade.php
new file mode 100644
index 000000000..c252e11f1
--- /dev/null
+++ b/resources/views/includes/filter-pill.blade.php
@@ -0,0 +1,21 @@
+@aware(['tableName','isTailwind','isBootstrap4','isBootstrap5'])
+
+
merge($filterPillsItemAttributes)
+ ->class([
+ 'inline-flex items-center px-2.5 py-0.5 rounded-full leading-4' => $isTailwind && ($filterPillsItemAttributes['default-styling'] ?? true),
+ 'text-xs font-medium capitalize' => $isTailwind && ($filterPillsItemAttributes['default-text'] ?? ($filterPillsItemAttributes['default-styling'] ?? true)),
+ 'bg-indigo-100 text-indigo-800 dark:bg-indigo-200 dark:text-indigo-900' => $isTailwind && ($filterPillsItemAttributes['default-colors'] ?? true),
+ 'badge badge-pill badge-info d-inline-flex align-items-center' => $isBootstrap4 && ($filterPillsItemAttributes['default-styling'] ?? true),
+ 'badge rounded-pill bg-info d-inline-flex align-items-center' => $isBootstrap5 && ($filterPillsItemAttributes['default-styling'] ?? true),
+ ])
+ ->except(['default', 'default-styling', 'default-colors'])
+}}
+>
+merge($pillTitleDisplayDataArray) }}> :
+merge($pillDisplayDataArray) }}>
+
+
+
+
diff --git a/resources/views/includes/offline.blade.php b/resources/views/includes/offline.blade.php
index ae59b9e70..aea11f8ec 100644
--- a/resources/views/includes/offline.blade.php
+++ b/resources/views/includes/offline.blade.php
@@ -1,6 +1,6 @@
-@aware(['isTailwind','isBootstrap'])
+@aware(['isTailwind','isBootstrap', 'localisationPath'])
@if ($this->offlineIndicatorIsEnabled())
- @if ($this->isTailwind)
+ @if ($isTailwind)
@@ -9,17 +9,18 @@
- @lang('You are not connected to the internet.')
+ {{ __($localisationPath.'You are not connected to the internet') }}.
- @elseif ($this->isBootstrap)
+ @elseif ($isBootstrap)
- @lang('You are not connected to the internet.')
+ {{ __($localisationPath.'You are not connected to the internet') }}.
+
@endif
diff --git a/resources/views/specific/bootstrap-4/pagination.blade.php b/resources/views/specific/bootstrap-4/pagination.blade.php
index 35f76cd59..2449323b6 100644
--- a/resources/views/specific/bootstrap-4/pagination.blade.php
+++ b/resources/views/specific/bootstrap-4/pagination.blade.php
@@ -3,7 +3,7 @@
@php(isset($this->numberOfPaginatorsRendered[$paginator->getPageName()]) ? $this->numberOfPaginatorsRendered[$paginator->getPageName()]++ : $this->numberOfPaginatorsRendered[$paginator->getPageName()] = 1)
-