Skip to content

Commit f62a927

Browse files
committed
Finish dark mode
1 parent f1ae8d7 commit f62a927

File tree

8 files changed

+127
-11
lines changed

8 files changed

+127
-11
lines changed

resources/views/tailwind/includes/filter-pills.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
@if ($key !== 'search' && strlen($value))
88
<span
99
wire:key="filter-pill-{{ $key }}"
10-
class="inline-flex items-center py-0.5 pl-2 pr-0.5 rounded-full text-xs font-medium bg-indigo-100 text-indigo-700"
10+
class="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"
1111
>
1212
{{ $filterNames[$key] ?? collect($this->columns())->pluck('text', 'column')->get($key, ucwords(strtr($key, ['_' => ' ', '-' => ' ']))) }}:
1313
@if(isset($customFilters[$key]) && method_exists($customFilters[$key], 'options'))
@@ -31,7 +31,7 @@ class="flex-shrink-0 ml-0.5 h-4 w-4 rounded-full inline-flex items-center justif
3131
@endforeach
3232

3333
<button class="focus:outline-none active:outline-none" wire:click.prevent="resetFilters">
34-
<span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-gray-100 text-gray-800">
34+
<span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-gray-100 text-gray-800 dark:bg-gray-200 dark:text-gray-900">
3535
@lang('Clear')
3636
</span>
3737
</button>

resources/views/tailwind/includes/filters.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class="inline-flex justify-center w-full rounded-md border border-gray-300 shado
1818
@lang('Filters')
1919

2020
@if (count($this->getFiltersWithoutSearch()))
21-
<span class="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">
21+
<span class="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">
2222
{{ count($this->getFiltersWithoutSearch()) }}
2323
</span>
2424
@endif

resources/views/tailwind/includes/offline.blade.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
@if ($offlineIndicator)
22
<div wire:offline.class.remove="hidden" class="hidden">
3-
<div class="rounded-md bg-red-50 p-4 mb-4">
3+
<div class="rounded-md bg-red-100 p-4 mb-4 dark:border-red-800 dark:bg-red-500">
44
<div class="flex">
55
<div class="flex-shrink-0">
6-
<svg class="h-5 w-5 text-red-400" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
6+
<svg class="h-5 w-5 text-red-400 dark:text-white" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
77
<path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z" clip-rule="evenodd" />
88
</svg>
99
</div>
1010
<div class="ml-3">
11-
<h3 class="text-sm font-medium text-red-800">
11+
<h3 class="text-sm font-medium text-red-800 dark:text-white">
1212
@lang('You are not connected to the internet.')
1313
</h3>
1414
</div>

resources/views/tailwind/includes/pagination.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@if ($showPagination)
22
<div class="p-6 md:p-0">
33
@if ($paginationEnabled && $rows->lastPage() > 1)
4-
{{ $rows->links() }}
4+
{{ $rows->links('livewire-tables::tailwind.includes.partials.pagination') }}
55
@else
66
<p class="text-sm text-gray-700 leading-5 dark:text-white">
77
@lang('Showing')
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
<div>
2+
@if ($paginator->hasPages())
3+
@php(isset($this->numberOfPaginatorsRendered[$paginator->getPageName()]) ? $this->numberOfPaginatorsRendered[$paginator->getPageName()]++ : $this->numberOfPaginatorsRendered[$paginator->getPageName()] = 1)
4+
5+
<nav role="navigation" aria-label="Pagination Navigation" class="flex items-center justify-between">
6+
<div class="flex justify-between flex-1 md:hidden">
7+
<span>
8+
@if ($paginator->onFirstPage())
9+
<span class="relative inline-flex items-center px-4 py-2 text-sm font-medium text-gray-500 bg-white border border-gray-300 cursor-default leading-5 rounded-md dark:bg-gray-700 dark:text-white dark:border-gray-600">
10+
{!! __('pagination.previous') !!}
11+
</span>
12+
@else
13+
<button wire:click="previousPage('{{ $paginator->getPageName() }}')" wire:loading.attr="disabled" dusk="previousPage{{ $paginator->getPageName() == 'page' ? '' : '.' . $paginator->getPageName() }}.before" class="relative inline-flex items-center px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 leading-5 rounded-md hover:text-gray-500 focus:outline-none focus:shadow-outline-blue focus:border-blue-300 active:bg-gray-100 active:text-gray-700 transition ease-in-out duration-150 dark:bg-gray-700 dark:text-white dark:ring-gray-600 dark:border-gray-600">
14+
{!! __('pagination.previous') !!}
15+
</button>
16+
@endif
17+
</span>
18+
19+
<span>
20+
@if ($paginator->hasMorePages())
21+
<button wire:click="nextPage('{{ $paginator->getPageName() }}')" wire:loading.attr="disabled" dusk="nextPage{{ $paginator->getPageName() == 'page' ? '' : '.' . $paginator->getPageName() }}.before" class="relative inline-flex items-center px-4 py-2 ml-3 text-sm font-medium text-gray-700 bg-white border border-gray-300 leading-5 rounded-md hover:text-gray-500 focus:outline-none focus:shadow-outline-blue focus:border-blue-300 active:bg-gray-100 active:text-gray-700 transition ease-in-out duration-150 dark:bg-gray-700 dark:text-white dark:ring-gray-600 dark:border-gray-600">
22+
{!! __('pagination.next') !!}
23+
</button>
24+
@else
25+
<span class="relative inline-flex items-center px-4 py-2 ml-3 text-sm font-medium text-gray-500 bg-white border border-gray-300 cursor-default leading-5 rounded-md dark:bg-gray-700 dark:text-white dark:border-gray-600">
26+
{!! __('pagination.next') !!}
27+
</span>
28+
@endif
29+
</span>
30+
</div>
31+
32+
<div class="hidden md:flex-1 md:flex md:items-center md:justify-between">
33+
<div>
34+
<p class="text-sm text-gray-700 leading-5 dark:text-white">
35+
<span>{!! __('Showing') !!}</span>
36+
<span class="font-medium">{{ $paginator->firstItem() }}</span>
37+
<span>{!! __('to') !!}</span>
38+
<span class="font-medium">{{ $paginator->lastItem() }}</span>
39+
<span>{!! __('of') !!}</span>
40+
<span class="font-medium">{{ $paginator->total() }}</span>
41+
<span>{!! __('results') !!}</span>
42+
</p>
43+
</div>
44+
45+
<div>
46+
<span class="relative z-0 inline-flex rounded-md shadow-sm">
47+
<span>
48+
{{-- Previous Page Link --}}
49+
@if ($paginator->onFirstPage())
50+
<span aria-disabled="true" aria-label="{{ __('pagination.previous') }}">
51+
<span class="relative inline-flex items-center px-2 py-2 text-sm font-medium text-gray-500 bg-white border border-gray-300 cursor-default rounded-l-md leading-5 dark:bg-gray-700 dark:text-white dark:border-gray-600" aria-hidden="true">
52+
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20">
53+
<path fill-rule="evenodd" d="M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z" clip-rule="evenodd" />
54+
</svg>
55+
</span>
56+
</span>
57+
@else
58+
<button wire:click="previousPage('{{ $paginator->getPageName() }}')" dusk="previousPage{{ $paginator->getPageName() == 'page' ? '' : '.' . $paginator->getPageName() }}.after" rel="prev" class="relative inline-flex items-center px-2 py-2 text-sm font-medium text-gray-500 bg-white border border-gray-300 rounded-l-md leading-5 hover:text-gray-400 focus:z-10 focus:outline-none focus:border-blue-300 focus:shadow-outline-blue active:bg-gray-100 active:text-gray-500 transition ease-in-out duration-150 dark:bg-gray-700 dark:text-white dark:ring-gray-600 dark:border-gray-600" aria-label="{{ __('pagination.previous') }}">
59+
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20">
60+
<path fill-rule="evenodd" d="M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z" clip-rule="evenodd" />
61+
</svg>
62+
</button>
63+
@endif
64+
</span>
65+
66+
{{-- Pagination Elements --}}
67+
@foreach ($elements as $element)
68+
{{-- "Three Dots" Separator --}}
69+
@if (is_string($element))
70+
<span aria-disabled="true">
71+
<span class="relative inline-flex items-center px-4 py-2 -ml-px text-sm font-medium text-gray-700 bg-white border border-gray-300 cursor-default leading-5 dark:bg-gray-700 dark:text-white dark:border-gray-600">{{ $element }}</span>
72+
</span>
73+
@endif
74+
75+
{{-- Array Of Links --}}
76+
@if (is_array($element))
77+
@foreach ($element as $page => $url)
78+
<span wire:key="paginator-{{ $paginator->getPageName() }}-{{ $this->numberOfPaginatorsRendered[$paginator->getPageName()] }}-page{{ $page }}">
79+
@if ($page == $paginator->currentPage())
80+
<span aria-current="page">
81+
<span class="relative inline-flex items-center px-4 py-2 -ml-px text-sm font-medium text-gray-500 bg-white border border-gray-300 cursor-default leading-5 dark:bg-gray-500 dark:text-white dark:border-gray-500">{{ $page }}</span>
82+
</span>
83+
@else
84+
<button wire:click="gotoPage({{ $page }}, '{{ $paginator->getPageName() }}')" class="relative inline-flex items-center px-4 py-2 -ml-px text-sm font-medium text-gray-700 bg-white border border-gray-300 leading-5 hover:text-gray-500 focus:z-10 focus:outline-none focus:border-blue-300 focus:shadow-outline-blue active:bg-gray-100 active:text-gray-700 transition ease-in-out duration-150 dark:bg-gray-700 dark:text-white dark:ring-gray-600 dark:border-gray-600" aria-label="{{ __('Go to page :page', ['page' => $page]) }}">
85+
{{ $page }}
86+
</button>
87+
@endif
88+
</span>
89+
@endforeach
90+
@endif
91+
@endforeach
92+
93+
<span>
94+
{{-- Next Page Link --}}
95+
@if ($paginator->hasMorePages())
96+
<button wire:click="nextPage('{{ $paginator->getPageName() }}')" dusk="nextPage{{ $paginator->getPageName() == 'page' ? '' : '.' . $paginator->getPageName() }}.after" rel="next" class="relative inline-flex items-center px-2 py-2 -ml-px text-sm font-medium text-gray-500 bg-white border border-gray-300 rounded-r-md leading-5 hover:text-gray-400 focus:z-10 focus:outline-none focus:border-blue-300 focus:shadow-outline-blue active:bg-gray-100 active:text-gray-500 transition ease-in-out duration-150 dark:bg-gray-700 dark:text-white dark:ring-gray-600 dark:border-gray-600" aria-label="{{ __('pagination.next') }}">
97+
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20">
98+
<path fill-rule="evenodd" d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" clip-rule="evenodd" />
99+
</svg>
100+
</button>
101+
@else
102+
<span aria-disabled="true" aria-label="{{ __('pagination.next') }}">
103+
<span class="relative inline-flex items-center px-2 py-2 -ml-px text-sm font-medium text-gray-500 bg-white border border-gray-300 cursor-default rounded-r-md leading-5 dark:bg-gray-700 dark:text-white dark:border-gray-600" aria-hidden="true">
104+
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20">
105+
<path fill-rule="evenodd" d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" clip-rule="evenodd" />
106+
</svg>
107+
</span>
108+
</span>
109+
@endif
110+
</span>
111+
</span>
112+
</div>
113+
</div>
114+
</nav>
115+
@endif
116+
</div>

resources/views/tailwind/includes/reorder.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<button
33
wire:click="{{ $reordering ? 'disableReordering' : 'enableReordering' }}"
44
type="button"
5-
class="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:outline-none focus:border-indigo-300 focus:shadow-outline-indigo active:bg-gray-50 active:text-gray-800 transition ease-in-out duration-150"
5+
class="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"
66
>
77
@if ($reordering)
88
@lang('Done Reordering')

resources/views/tailwind/includes/sorting-pills.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
@foreach($sorts as $col => $dir)
77
<span
88
wire:key="sorting-pill-{{ $col }}"
9-
class="inline-flex items-center py-0.5 pl-2 pr-0.5 rounded-full text-xs font-medium bg-indigo-100 text-indigo-700"
9+
class="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"
1010
>
1111
{{ $sortNames[$col] ?? collect($this->columns())->pluck('text', 'column')->get($col, ucwords(strtr($col, ['_' => ' ', '-' => ' ']))) }}: {{ $dir === 'asc' ? ($sortDirectionNames[$col]['asc'] ?? 'A-Z') : ($sortDirectionNames[$col]['desc'] ?? 'Z-A') }}
1212

@@ -27,7 +27,7 @@ class="flex-shrink-0 ml-0.5 h-4 w-4 rounded-full inline-flex items-center justif
2727
wire:click.prevent="resetSorts"
2828
class="focus:outline-none active:outline-none"
2929
>
30-
<span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-gray-100 text-gray-800">
30+
<span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-gray-100 text-gray-800 dark:bg-gray-200 dark:text-gray-900">
3131
@lang('Clear')
3232
</span>
3333
</button>

resources/views/tailwind/includes/table.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class="rounded border-gray-300 text-indigo-600 shadow-sm transition duration-150
4848

4949
@forelse ($rows as $index => $row)
5050
<x-livewire-tables::table.row
51-
wire:loading.class.delay="opacity-50"
51+
wire:loading.class.delay="opacity-50 dark:bg-gray-900 dark:opacity-60"
5252
wire:key="table-row-{{ $row->{$primaryKey} }}"
5353
wire:sortable.item="{{ $row->{$primaryKey} }}"
5454
:reordering="$reordering"

0 commit comments

Comments
 (0)