|
1 | | -@aware([ 'tableName','isTailwind','isBootstrap','isBootstrap4','isBootstrap5']) |
2 | | -@props([]) |
3 | | - |
4 | | -<div |
5 | | - @class([ |
6 | | - 'ml-0 ml-md-2 mb-3 mb-md-0' => $this->isBootstrap4, |
7 | | - 'ms-0 ms-md-2 mb-3 mb-md-0' => $this->isBootstrap5 && $this->searchIsEnabled(), |
8 | | - 'mb-3 mb-md-0' => $this->isBootstrap5 && !$this->searchIsEnabled(), |
9 | | - ]) |
10 | | -> |
11 | | - <div |
12 | | - @if ($this->isFilterLayoutPopover()) |
13 | | - x-data="{ filterPopoverOpen: false }" |
14 | | - x-on:keydown.escape.stop="if (!this.childElementOpen) { filterPopoverOpen = false }" |
15 | | - x-on:mousedown.away="if (!this.childElementOpen) { filterPopoverOpen = false }" |
16 | | - @endif |
17 | | - @class([ |
18 | | - 'btn-group d-block d-md-inline' => $this->isBootstrap, |
19 | | - 'relative block md:inline-block text-left' => $this->isTailwind, |
20 | | - ]) |
21 | | - > |
22 | | - <div> |
23 | | - <button |
24 | | - type="button" |
25 | | - @class([ |
26 | | - 'btn dropdown-toggle d-block w-100 d-md-inline' => $this->isBootstrap, |
27 | | - '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, |
28 | | - ]) |
29 | | - @if ($this->isFilterLayoutPopover()) x-on:click="filterPopoverOpen = !filterPopoverOpen" |
30 | | - aria-haspopup="true" |
31 | | - x-bind:aria-expanded="filterPopoverOpen" |
32 | | - aria-expanded="true" |
33 | | - @endif |
34 | | - @if ($this->isFilterLayoutSlideDown()) x-on:click="filtersOpen = !filtersOpen" @endif |
35 | | - > |
36 | | - {{ __($this->getLocalisationPath.'Filters') }} |
37 | | - |
38 | | - @if ($count = $this->getFilterBadgeCount()) |
39 | | - <span @class([ |
40 | | - 'badge badge-info' => $this->isBootstrap, |
41 | | - '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, |
42 | | - ])> |
43 | | - {{ $count }} |
44 | | - </span> |
45 | | - @endif |
46 | | - |
47 | | - @if($this->isTailwind) |
48 | | - <x-heroicon-o-funnel class="-mr-1 ml-2 h-5 w-5" /> |
49 | | - @else |
50 | | - <span @class([ |
51 | | - 'caret' => $this->isBootstrap, |
52 | | - ])></span> |
53 | | - @endif |
54 | | - |
55 | | - </button> |
56 | | - </div> |
57 | | - |
58 | | - @if ($this->isFilterLayoutPopover()) |
59 | | - <x-livewire-tables::tools.toolbar.items.filter-popover /> |
60 | | - @endif |
61 | | - |
62 | | - </div> |
63 | | -</div> |
| 1 | +@aware([ 'tableName','isTailwind','isBootstrap','isBootstrap4','isBootstrap5']) |
| 2 | +@props([]) |
| 3 | + |
| 4 | +<div |
| 5 | + @class([ |
| 6 | + 'ml-0 ml-md-2 mb-3 mb-md-0' => $this->isBootstrap4, |
| 7 | + 'ms-0 ms-md-2 mb-3 mb-md-0' => $this->isBootstrap5 && $this->searchIsEnabled(), |
| 8 | + 'mb-3 mb-md-0' => $this->isBootstrap5 && !$this->searchIsEnabled(), |
| 9 | + ]) |
| 10 | +> |
| 11 | + <div |
| 12 | + @if ($this->isFilterLayoutPopover()) |
| 13 | + x-data="{ filterPopoverOpen: false }" |
| 14 | + x-on:keydown.escape.stop="if (!this.childElementOpen) { filterPopoverOpen = false }" |
| 15 | + x-on:mousedown.away="if (!this.childElementOpen) { filterPopoverOpen = false }" |
| 16 | + @endif |
| 17 | + @class([ |
| 18 | + 'btn-group d-block d-md-inline' => $this->isBootstrap, |
| 19 | + 'relative block md:inline-block text-left' => $this->isTailwind, |
| 20 | + ]) |
| 21 | + > |
| 22 | + <div> |
| 23 | + <button |
| 24 | + type="button" |
| 25 | + {{ |
| 26 | + $attributes->merge($this->getFilterButtonAttributes()) |
| 27 | + ->class([ |
| 28 | + 'btn dropdown-toggle d-block w-100 d-md-inline' => $this->isBootstrap && $this->getFilterButtonAttributes()['default-styling'], |
| 29 | + '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->getFilterButtonAttributes()['default-styling'], |
| 30 | + '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->getFilterButtonAttributes()['default-colors'], |
| 31 | + ]) |
| 32 | + ->except(['default-styling', 'default-colors']) |
| 33 | + }} |
| 34 | + @if ($this->isFilterLayoutPopover()) x-on:click="filterPopoverOpen = !filterPopoverOpen" |
| 35 | + aria-haspopup="true" |
| 36 | + x-bind:aria-expanded="filterPopoverOpen" |
| 37 | + aria-expanded="true" |
| 38 | + @endif |
| 39 | + @if ($this->isFilterLayoutSlideDown()) x-on:click="filtersOpen = !filtersOpen" @endif |
| 40 | + > |
| 41 | + {{ __($this->getLocalisationPath.'Filters') }} |
| 42 | + |
| 43 | + @if ($count = $this->getFilterBadgeCount()) |
| 44 | + <span |
| 45 | + {{ |
| 46 | + $attributes->merge($this->getFilterButtonBadgeAttributes()) |
| 47 | + ->class([ |
| 48 | + 'badge badge-info' => $this->isBootstrap && $this->getFilterButtonBadgeAttributes()['default-styling'], |
| 49 | + 'ml-1 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium leading-4 capitalize' => $this->isTailwind && $this->getFilterButtonBadgeAttributes()['default-styling'], |
| 50 | + 'bg-indigo-100 text-indigo-800 dark:bg-indigo-200 dark:text-indigo-900' => $this->isTailwind && $this->getFilterButtonBadgeAttributes()['default-colors'], |
| 51 | + ]) |
| 52 | + ->except(['default-styling', 'default-colors']) |
| 53 | + }} |
| 54 | + > |
| 55 | + {{ $count }} |
| 56 | + </span> |
| 57 | + @endif |
| 58 | + |
| 59 | + @if($this->isTailwind) |
| 60 | + <x-heroicon-o-funnel class="-mr-1 ml-2 h-5 w-5" /> |
| 61 | + @else |
| 62 | + <span @class([ |
| 63 | + 'caret' => $this->isBootstrap, |
| 64 | + ])></span> |
| 65 | + @endif |
| 66 | + |
| 67 | + </button> |
| 68 | + </div> |
| 69 | + |
| 70 | + @if ($this->isFilterLayoutPopover()) |
| 71 | + <x-livewire-tables::tools.toolbar.items.filter-popover /> |
| 72 | + @endif |
| 73 | + |
| 74 | + </div> |
| 75 | +</div> |
0 commit comments