Skip to content

Commit 30441ec

Browse files
committed
Fixed UI
Removed calls to custom primary color Fixed screenreader text on all templates
1 parent c067e7b commit 30441ec

File tree

9 files changed

+21
-19
lines changed

9 files changed

+21
-19
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ All notable changes to `laravel-livewire-tables` will be documented in this file
88

99
- Added Bootstrap 5 theme
1010

11+
### Changed
12+
13+
- Removed calls to custom primary color with indigo
14+
1115
## [1.0.2] - 2021-04-17
1216

1317
### Changed

resources/views/bootstrap-4/includes/filter-pills.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class="badge badge-pill badge-info d-inline-flex align-items-center"
1515
wire:click.prevent="removeFilter('{{ $key }}')"
1616
class="text-white ml-2"
1717
>
18-
<span class="sr-only">@lang('Remove sort option')</span>
18+
<span class="sr-only">@lang('Remove filter option')</span>
1919
<svg style="width:.5em;height:.5em" stroke="currentColor" fill="none" viewBox="0 0 8 8">
2020
<path stroke-linecap="round" stroke-width="1.5" d="M1 1l6 6m0-6L1 7" />
2121
</svg>

resources/views/bootstrap-5/includes/filter-pills.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class="badge rounded-pill bg-info d-inline-flex align-items-center"
1515
wire:click.prevent="removeFilter('{{ $key }}')"
1616
class="text-white ms-2"
1717
>
18-
<span class="sr-only">@lang('Remove sort option')</span>
18+
<span class="visually-hidden">@lang('Remove filter option')</span>
1919
<svg style="width:.5em;height:.5em" stroke="currentColor" fill="none" viewBox="0 0 8 8">
2020
<path stroke-linecap="round" stroke-width="1.5" d="M1 1l6 6m0-6L1 7" />
2121
</svg>
@@ -27,7 +27,7 @@ class="text-white ms-2"
2727
<a
2828
href="#"
2929
wire:click.prevent="resetFilters"
30-
class="badge rounded-pill bg-light"
30+
class="badge rounded-pill bg-light text-dark text-decoration-none"
3131
>
3232
@lang('Clear')
3333
</a>

resources/views/bootstrap-5/includes/search.blade.php

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,11 @@ class="form-control"
88
>
99

1010
@if (isset($filters['search']) && strlen($filters['search']))
11-
<div class="input-group-append">
12-
<button wire:click="$set('filters.search', null)" class="btn btn-outline-secondary" type="button">
13-
<svg style="width:.75em;height:.75em" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
14-
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
15-
</svg>
16-
</button>
17-
</div>
11+
<button wire:click="$set('filters.search', null)" class="btn btn-outline-secondary" type="button">
12+
<svg style="width:.75em;height:.75em" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
13+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
14+
</svg>
15+
</button>
1816
@endif
1917
</div>
2018
@endif

resources/views/bootstrap-5/includes/sorting-pills.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class="badge rounded-pill bg-info d-inline-flex align-items-center"
1414
wire:click.prevent="removeSort('{{ $col }}')"
1515
class="text-white ms-2"
1616
>
17-
<span class="sr-only">@lang('Remove sort option')</span>
17+
<span class="visually-hidden">@lang('Remove sort option')</span>
1818
<svg style="width:.5em;height:.5em" stroke="currentColor" fill="none" viewBox="0 0 8 8">
1919
<path stroke-linecap="round" stroke-width="1.5" d="M1 1l6 6m0-6L1 7" />
2020
</svg>
@@ -25,7 +25,7 @@ class="text-white ms-2"
2525
<a
2626
href="#"
2727
wire:click.prevent="resetSorts"
28-
class="badge rounded-pill bg-light"
28+
class="badge rounded-pill bg-light text-dark text-decoration-none"
2929
>
3030
@lang('Clear')
3131
</a>

resources/views/tailwind/includes/bulk-actions.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class="relative inline-block text-left z-10 w-full md:w-auto"
1111
<button
1212
@click="open = !open"
1313
type="button"
14-
class="inline-flex justify-center w-full rounded-md border border-gray-300 px-4 py-2 bg-white text-sm leading-5 font-medium text-gray-700 hover:text-gray-500 focus:outline-none focus:border-primary-300 focus:shadow-outline-primary active:bg-gray-50 active:text-gray-800 transition ease-in-out duration-150"
14+
class="inline-flex justify-center w-full rounded-md border border-gray-300 px-4 py-2 bg-white text-sm leading-5 font-medium text-gray-700 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"
1515
id="options-menu"
1616
aria-haspopup="true"
1717
x-bind:aria-expanded="open"

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@
66
@if ($key !== 'search' && strlen($value))
77
<span
88
wire:key="filter-{{ $key }}"
9-
class="inline-flex items-center py-0.5 pl-2 pr-0.5 rounded-full text-xs font-medium bg-primary-100 text-primary-700"
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"
1010
>
1111
{{ $filterNames[$key] ?? ucwords(strtr($key, ['_' => ' ', '-' => ' '])) }}: {{ ucwords(strtr($value, ['_' => ' ', '-' => ' '])) }}
1212

1313
<button
1414
wire:click="removeFilter('{{ $key }}')"
1515
type="button"
16-
class="flex-shrink-0 ml-0.5 h-4 w-4 rounded-full inline-flex items-center justify-center text-primary-400 hover:bg-primary-200 hover:text-primary-500 focus:outline-none focus:bg-primary-500 focus:text-white"
16+
class="flex-shrink-0 ml-0.5 h-4 w-4 rounded-full inline-flex items-center justify-center text-indigo-400 hover:bg-indigo-200 hover:text-indigo-500 focus:outline-none focus:bg-indigo-500 focus:text-white"
1717
>
18-
<span class="sr-only">@lang('Remove sort option')</span>
18+
<span class="sr-only">@lang('Remove filter option')</span>
1919
<svg class="h-2 w-2" stroke="currentColor" fill="none" viewBox="0 0 8 8">
2020
<path stroke-linecap="round" stroke-width="1.5" d="M1 1l6 6m0-6L1 7" />
2121
</svg>

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
@foreach($sorts as $col => $dir)
66
<span
77
wire:key="sort-{{ $col }}"
8-
class="inline-flex items-center py-0.5 pl-2 pr-0.5 rounded-full text-xs font-medium bg-primary-100 text-primary-700"
8+
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"
99
>
1010
{{ $sortNames[$col] ?? ucwords(strtr($col, ['_' => ' ', '-' => ' '])) }}: {{ $dir === 'asc' ? 'A-Z' : 'Z-A' }}
1111

1212
<button
1313
wire:click="removeSort('{{ $col }}')"
1414
type="button"
15-
class="flex-shrink-0 ml-0.5 h-4 w-4 rounded-full inline-flex items-center justify-center text-primary-400 hover:bg-primary-200 hover:text-primary-500 focus:outline-none focus:bg-primary-500 focus:text-white"
15+
class="flex-shrink-0 ml-0.5 h-4 w-4 rounded-full inline-flex items-center justify-center text-indigo-400 hover:bg-indigo-200 hover:text-indigo-500 focus:outline-none focus:bg-indigo-500 focus:text-white"
1616
>
1717
<span class="sr-only">@lang('Remove sort option')</span>
1818
<svg class="h-2 w-2" stroke="currentColor" fill="none" viewBox="0 0 8 8">

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class="rounded-md shadow-sm border-cool-gray-300 block transition duration-150 e
2929

3030
<x-slot name="body">
3131
@if (count($bulkActions) && $selectPage && $rows->total() > $rows->count())
32-
<x-livewire-tables::table.row wire:key="row-message" class="bg-primary-50">
32+
<x-livewire-tables::table.row wire:key="row-message" class="bg-indigo-50">
3333
<x-livewire-tables::table.cell :colspan="count($bulkActions) ? count($columns) + 1 : count($columns)">
3434
@unless ($selectAll)
3535
<div>

0 commit comments

Comments
 (0)