merge($this->getActionWrapperAttributes)
+ ->merge($this->actionWrapperAttributes)
->class([
- 'flex flex-cols py-2 space-x-2' => $this->isTailwind && ($this->getActionWrapperAttributes['default-styling'] ?? true),
- '' => $this->isTailwind && ($this->getActionWrapperAttributes['default-colors'] ?? true),
- 'd-flex flex-cols py-2 space-x-2' => $this->isBootstrap && ($this->getActionWrapperAttributes['default-styling'] ?? true),
- '' => $this->isBootstrap && ($this->getActionWrapperAttributes['default-colors'] ?? true),
+ 'flex flex-cols py-2 space-x-2' => $isTailwind && ($actionWrapperAttributes['default-styling'] ?? true),
+ '' => $isTailwind && ($actionWrapperAttributes['default-colors'] ?? true),
+ 'd-flex flex-cols py-2 space-x-2' => $isBootstrap && ($this->actionWrapperAttributes['default-styling'] ?? true),
+ '' => $isBootstrap && ($actionWrapperAttributes['default-colors'] ?? true),
'justify-start' => $this->getActionsPosition === 'left',
'justify-center' => $this->getActionsPosition === 'center',
'justify-end' => $this->getActionsPosition === 'right',
diff --git a/resources/views/components/includes/loading.blade.php b/resources/views/components/includes/loading.blade.php
index c4c5c31e9..6d7eaf7a3 100644
--- a/resources/views/components/includes/loading.blade.php
+++ b/resources/views/components/includes/loading.blade.php
@@ -1,4 +1,4 @@
-@aware(['tableName'])
+@aware(['tableName','isTailwind','isBootstrap'])
@props(['colCount' => 1])
@php
@@ -10,16 +10,16 @@
merge($loaderRow)
->class([
- 'hidden w-full text-center place-items-center align-middle' => $this->isTailwind && ($loaderRow['default'] ?? true),
- 'd-none w-100 text-center align-items-center' => $this->isBootstrap && ($loaderRow['default'] ?? true),
+ 'hidden w-full text-center place-items-center align-middle' => $isTailwind && ($loaderRow['default'] ?? true),
+ 'd-none w-100 text-center align-items-center' => $isBootstrap && ($loaderRow['default'] ?? true),
])
->except(['default','default-styling','default-colors'])
}}>
merge($loaderCell)
->class([
- 'py-4' => $this->isTailwind && ($loaderCell['default'] ?? true),
- 'py-4' => $this->isBootstrap && ($loaderCell['default'] ?? true),
+ 'py-4' => $isTailwind && ($loaderCell['default'] ?? true),
+ 'py-4' => $isBootstrap && ($loaderCell['default'] ?? true),
])
->except(['default','default-styling','default-colors', 'colspan','wire:key'])
}}>
@@ -30,8 +30,8 @@
merge($loaderIcon)
->class([
- 'lds-hourglass' => $this->isTailwind && ($loaderIcon['default'] ?? true),
- 'lds-hourglass' => $this->isBootstrap && ($loaderIcon['default'] ?? true),
+ 'lds-hourglass' => $isTailwind && ($loaderIcon['default'] ?? true),
+ 'lds-hourglass' => $isBootstrap && ($loaderIcon['default'] ?? true),
])
->except(['default','default-styling','default-colors'])
}}>
diff --git a/resources/views/components/pagination.blade.php b/resources/views/components/pagination.blade.php
index feab347e2..633b31b24 100644
--- a/resources/views/components/pagination.blade.php
+++ b/resources/views/components/pagination.blade.php
@@ -1,3 +1,5 @@
+@aware(['isTailwind','isBootstrap','isBootstrap4', 'isBootstrap5', 'localisationPath'])
+@props(['currentRows'])
@includeWhen(
$this->hasConfigurableAreaFor('before-pagination'),
$this->getConfigurableAreaFor('before-pagination'),
@@ -6,97 +8,97 @@
getPaginationWrapperAttributesBag() }}>
@if ($this->paginationVisibilityIsEnabled())
- @if ($this->isTailwind)
+ @if ($isTailwind)
- @if ($this->paginationIsEnabled && $this->isPaginationMethod('standard') && $this->getRows->lastPage() > 1 && $this->showPaginationDetails)
+ @if ($this->paginationIsEnabled && $this->isPaginationMethod('standard') && $currentRows->lastPage() > 1 && $this->showPaginationDetails)
@elseif ($this->paginationIsEnabled && $this->isPaginationMethod('simple') && $this->showPaginationDetails)
@elseif ($this->paginationIsEnabled && $this->isPaginationMethod('cursor'))
@else
@if($this->showPaginationDetails)
@endif
@endif
@if ($this->paginationIsEnabled)
- {{ $this->getRows->links('livewire-tables::specific.tailwind.'.(!$this->isPaginationMethod('standard') ? 'simple-' : '').'pagination') }}
+ {{ $currentRows->links('livewire-tables::specific.tailwind.'.(!$this->isPaginationMethod('standard') ? 'simple-' : '').'pagination') }}
@endif
@else
- @if ($this->paginationIsEnabled && $this->isPaginationMethod('standard') && $this->getRows->lastPage() > 1)
+ @if ($this->paginationIsEnabled && $this->isPaginationMethod('standard') && $currentRows->lastPage() > 1)
- {{ $this->getRows->links('livewire-tables::specific.bootstrap-4.pagination') }}
+ {{ $currentRows->links('livewire-tables::specific.bootstrap-4.pagination') }}
$this->isBootstrap4,
- "text-md-end" => $this->isBootstrap5,
+ "text-md-right" => $isBootstrap4,
+ "text-md-end" => $isBootstrap5,
])>
@if($this->showPaginationDetails)
- {{ __($this->getLocalisationPath.'Showing') }}
- {{ $this->getRows->count() ? $this->getRows->firstItem() : 0 }}
- {{ __($this->getLocalisationPath.'to') }}
- {{ $this->getRows->count() ? $this->getRows->lastItem() : 0 }}
- {{ __($this->getLocalisationPath.'of') }}
+ {{ __($localisationPath.'Showing') }}
+ {{ $currentRows->count() ? $currentRows->firstItem() : 0 }}
+ {{ __($localisationPath.'to') }}
+ {{ $currentRows->count() ? $currentRows->lastItem() : 0 }}
+ {{ __($localisationPath.'of') }}
- {{ __($this->getLocalisationPath.'results') }}
+ {{ __($localisationPath.'results') }}
@endif
@elseif ($this->paginationIsEnabled && $this->isPaginationMethod('simple'))
- {{ $this->getRows->links('livewire-tables::specific.bootstrap-4.simple-pagination') }}
+ {{ $currentRows->links('livewire-tables::specific.bootstrap-4.simple-pagination') }}
$this->isBootstrap4,
- "text-md-end" => $this->isBootstrap5,
+ "text-md-right" => $isBootstrap4,
+ "text-md-end" => $isBootstrap5,
])>
@if($this->showPaginationDetails)
- {{ __($this->getLocalisationPath.'Showing') }}
- {{ $this->getRows->count() ? $this->getRows->firstItem() : 0 }}
- {{ __($this->getLocalisationPath.'to') }}
- {{ $this->getRows->count() ? $this->getRows->lastItem() : 0 }}
+ {{ __($localisationPath.'Showing') }}
+ {{ $currentRows->count() ? $currentRows->firstItem() : 0 }}
+ {{ __($localisationPath.'to') }}
+ {{ $currentRows->count() ? $currentRows->lastItem() : 0 }}
@endif
@elseif ($this->paginationIsEnabled && $this->isPaginationMethod('cursor'))
- {{ $this->getRows->links('livewire-tables::specific.bootstrap-4.simple-pagination') }}
+ {{ $currentRows->links('livewire-tables::specific.bootstrap-4.simple-pagination') }}
@else
@if($this->showPaginationDetails)
- {{ __($this->getLocalisationPath.'Showing') }}
- {{ $this->getRows->count() }}
- {{ __($this->getLocalisationPath.'results') }}
+ {{ __($localisationPath.'Showing') }}
+ {{ $currentRows->count() }}
+ {{ __($localisationPath.'results') }}
@endif
diff --git a/resources/views/components/table/td/bulk-actions.blade.php b/resources/views/components/table/td/bulk-actions.blade.php
index df5338f7f..1b4049042 100644
--- a/resources/views/components/table/td/bulk-actions.blade.php
+++ b/resources/views/components/table/td/bulk-actions.blade.php
@@ -1,31 +1,21 @@
-@aware([ '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','default-styling','default-colors'])
- }}
+ :checkboxAttributes=$tdCheckboxAttributes
/>
diff --git a/resources/views/components/table/td/reorder.blade.php b/resources/views/components/table/td/reorder.blade.php
index cda94f5f5..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([ 'tableName'])
+@aware([ 'tableName', 'isTailwind', 'isBootstrap', 'isBootstrap4', 'isBootstrap5'])
@props(['rowID', 'rowIndex'])
-@php($theme = $this->getTheme())
-
|