Skip to content

Commit

Permalink
Remove theme style attribute (#1664)
Browse files Browse the repository at this point in the history
  • Loading branch information
luanfreitasdev authored Sep 1, 2024
1 parent 60377d6 commit 608ec7e
Show file tree
Hide file tree
Showing 31 changed files with 24 additions and 80 deletions.
3 changes: 0 additions & 3 deletions resources/views/components/checkbox-all.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,13 @@
@if ($isCheckboxFixedOnResponsive) fixed @endif
scope="col"
class="{{ theme_style($theme, 'checkbox.th') }}"
style="{{ theme_style($theme, 'checkbox.th.1') }}"
wire:key="{{ md5('checkbox-all') }}"
>
<div
class="{{ theme_style($theme, 'checkbox.base') }}"
style="{{ theme_style($theme, 'checkbox.base.1') }}"
>
<label
class="{{ theme_style($theme, 'checkbox.label') }}"
style="{{ theme_style($theme, 'checkbox.label.1') }}"
>
<input
class="{{ theme_style($theme, 'checkbox.input') }}"
Expand Down
11 changes: 4 additions & 7 deletions resources/views/components/checkbox-row.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,14 @@
@if ($hide)
<td
class="{{ theme_style($theme, 'checkbox.th') }}"
style="{{ theme_style($theme, 'checkbox.th.1') }}"
>
</td>
@elseif($disable)
<td
class="{{ theme_style($theme, 'checkbox.th') }}"
style="{{ theme_style($theme, 'checkbox.th.1') }}"
>
<div class="{{ theme_style($theme, 'checkbox.base') }}" style="{{ theme_style($theme, 'checkbox.base.1') }}">
<label class="{{ theme_style($theme, 'checkbox.label') }}" style="{{ theme_style($theme, 'checkbox.label.1') }}">
<div class="{{ theme_style($theme, 'checkbox.base') }}">
<label class="{{ theme_style($theme, 'checkbox.label') }}">
<input
{{ $inputAttributes }}
disabled
Expand All @@ -45,10 +43,9 @@ class="{{ theme_style($theme, 'checkbox.th') }}"
@else
<td
class="{{ theme_style($theme, 'checkbox.th') }}"
style="{{ theme_style($theme, 'checkbox.th.1') }}"
>
<div class="{{ theme_style($theme, 'checkbox.base') }}" style="{{ theme_style($theme, 'checkbox.base.1') }}">
<label class="{{ theme_style($theme, 'checkbox.label') }}" style="{{ theme_style($theme, 'checkbox.label.1') }}">
<div class="{{ theme_style($theme, 'checkbox.base') }}">
<label class="{{ theme_style($theme, 'checkbox.label') }}">
<input
x-data="{}"
type="checkbox"
Expand Down
1 change: 0 additions & 1 deletion resources/views/components/cols.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ class="{{ theme_style($theme, 'table.header.th') . ' ' . data_get($column, 'head
>
<div
class="{{ theme_style($theme, 'cols.div') }}"
style="{{ theme_style($theme, 'cols.div.1') }}"
>
<span data-value>{!! data_get($column, 'title') !!}</span>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
@else
<div
class="{{ theme_style($theme, 'filterBoolean.base') }}"
style="{{ theme_style($theme, 'filterBoolean.base.1') }}"
>
<select
style="{{ data_get($column, 'headerStyle') }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
>
<div
class="{{ theme_style($theme, 'filterDatePicker.base') }}"
style="{{ theme_style($theme, 'filterDatePicker.base.1') }}"
>
<form autocomplete="off">
<input
Expand All @@ -43,8 +42,7 @@ class="{{ theme_style($theme, 'filterDatePicker.base') }}"
wire:model="filters.{{ $type }}.{{ $field }}.formatted"
autocomplete="off"
data-field="{{ $field }}"
style="{{ theme_style($theme, 'filterDatePicker.input') }} {{ data_get($column, 'headerStyle') }}"
class="{{ theme_style($theme, 'filterDatePicker.input.1') }} {{ data_get($column, 'headerClass') }}"
class="{{ theme_style($theme, 'filterDatePicker.input') }} {{ data_get($column, 'headerClass') }}"
type="text"
readonly
placeholder="{{ trans('livewire-powergrid::datatable.placeholders.select') }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
$defaultAttributes = $fieldClassName::getWireAttributes($field, $title);
$selectClasses = \Illuminate\Support\Arr::toCssClasses(['power_grid', theme_style($theme, 'filterInputText.select')]);
$inputClasses = \Illuminate\Support\Arr::toCssClasses(['power_grid', theme_style($theme, 'filterInputText.input')]);
$selectClasses = theme_style($theme, 'filterInputText.select');
$inputClasses = theme_style($theme, 'filterInputText.input');
$params = array_merge(
[
Expand All @@ -49,7 +49,6 @@
@else
<div
class="{{ theme_style($theme, 'filterInputText.base') }}"
style="{{ theme_style($theme, 'filterInputText.base.1') }}"
>
@if ($showSelectOptions)
<div class="relative">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,11 @@
@else
<div
class="{{ theme_style($theme, 'filterNumber.base') }}"
style="{{ theme_style($theme, 'filterNumber.base.1') }}"
>
<div>
<input
{{ $defaultAttributes['inputStartAttributes'] }}
@if ($inline) style="{{ theme_style($theme, 'filterNumber.input.1') }} {{ data_get($column, 'headerStyle') }}" @endif
@if ($inline) style="{{ data_get($column, 'headerStyle') }}" @endif
type="text"
class="{{ $filterClasses }}"
placeholder="{{ $placeholder['min'] ?? __('Min') }}"
Expand All @@ -45,7 +44,7 @@ class="{{ $filterClasses }}"
<div class="mt-1">
<input
{{ $defaultAttributes['inputEndAttributes'] }}
@if ($inline) style="{{ theme_style($theme, 'filterNumber.input.1') }} {{ data_get($column, 'headerStyle') }}" @endif
@if ($inline) style="{{ data_get($column, 'headerStyle') }}" @endif
type="text"
class="{{ $filterClasses }}"
placeholder="{{ $placeholder['max'] ?? __('Max') }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
@else
<div
class="{{ theme_style($theme, 'filterSelect.base') }}"
style="{{ theme_style($theme, 'filterNumber.base.1') }}"
>
<select
class="{{ $filterClasses }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ class="mt-50 pb-1 w-100 align-items-end px-1 d-flex flex-wrap justify-content-sm
<select
wire:model.live="setUp.footer.perPage"
class="form-select {{ theme_style($theme, 'footer.select') }}"
style="{{ theme_style($theme, 'footer.select.1') }}"
>
@foreach (data_get($setUp, 'footer.perPageValues') as $value)
<option value="{{ $value }}">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ class="col-12"
height="16"
fill="currentColor"
class="{{ theme_style($theme, 'searchBox.iconSearch') }}"
style="{{ theme_style($theme, 'searchBox.iconSearch.1') }}"
viewBox="0 0 16 16"
>
<path
Expand All @@ -23,7 +22,6 @@ class="{{ theme_style($theme, 'searchBox.iconSearch') }}"
wire:model.live.debounce.600ms="search"
type="text"
class="{{ theme_style($theme, 'searchBox.input') }}"
style="{{ theme_style($theme, 'searchBox.input.1') }}"
placeholder="{{ trans('livewire-powergrid::datatable.placeholders.search') }}"
>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<td
class="{{ theme_style($theme, 'table.body.td') }}"
style="{{ theme_style($theme, 'table.body.td.1') }}"
></td>
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
</div>
<div
class="{{ theme_style($theme, 'table.layout.div') }}"
style="{{ theme_style($theme, 'table.layout.div.1') }}"
>
@include($table)
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
placeholder="{{ html_entity_decode(data_get($row, $field), ENT_QUOTES, 'utf-8') }}"
contenteditable
class="pg-single-line {{ theme_style($theme, 'editable.input') }}"
style="{{ theme_style($theme, 'editable.input.1') }}"
@if (data_get($editable, 'saveOnMouseOut')) x-on:mousedown.outside="save()" @endif
x-on:keydown.enter="save()"
:id="`editable-` + dataField + `-` + id"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
@else
<div
@class([theme_style($theme, 'filterBoolean.base'), 'space-y-1' => !$inline])
style="{{ theme_style($theme, 'filterBoolean.base.1') }}"
>
@if (!$inline)
<label class="block text-sm font-semibold text-pg-primary-700 dark:text-pg-primary-300">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
>
<div
@class([theme_style($theme, 'filterDatePicker.base'), 'space-y-1' => !$inline])
style="{{ theme_style($theme, 'filterDatePicker.base.1') }}"
>
@if (!$inline)
<label class="block text-sm font-semibold text-pg-primary-700 dark:text-pg-primary-300">
Expand All @@ -50,8 +49,7 @@
wire:model="filters.{{ $type }}.{{ $field }}.formatted"
autocomplete="off"
data-field="{{ $field }}"
style="{{ theme_style($theme, 'filterDatePicker.input') }} {{ data_get($column, 'headerStyle') }}"
class="power_grid {{ theme_style($theme, 'filterDatePicker.input') }} {{ data_get($column, 'headerClass') }}"
class="{{ theme_style($theme, 'filterDatePicker.input') }} {{ data_get($column, 'headerClass') }}"
type="text"
readonly
placeholder="{{ trans('livewire-powergrid::datatable.placeholders.select') }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,8 @@
$defaultAttributes = $fieldClassName::getWireAttributes($field, $title);
$selectClasses = \Illuminate\Support\Arr::toCssClasses([
theme_style($theme, 'filterInputText.select'),
]);
$inputClasses = \Illuminate\Support\Arr::toCssClasses(['power_grid', theme_style($theme, 'filterInputText.input')]);
$selectClasses = theme_style($theme, 'filterInputText.select');
$inputClasses = theme_style($theme, 'filterInputText.input');
$params = array_merge(
[
Expand All @@ -51,7 +49,6 @@
@else
<div
@class([theme_style($theme, 'filterInputText.base'), 'space-y-1' => !$inline])
style="{{ theme_style($theme, 'filterInputText.base.1') }}"
>
@if (!$inline)
<label class="block text-sm font-semibold text-pg-primary-700 dark:text-pg-primary-300">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@
array_merge($filter, ['title' => data_get($column, 'title'), 'placeholder' => data_get($column, 'placeholder')])
);
$filterClasses = Arr::toCssClasses([
theme_style($theme, 'filterNumber.input'),
'power_grid',
]);
$filterClasses = theme_style($theme, 'filterNumber.input');
$placeholder = data_get($filter, 'placeholder');
Expand Down Expand Up @@ -50,7 +47,7 @@
<div @class(['pl-0 w-full sm:w-1/2' => !$inline])>
<input
{{ $defaultAttributes['inputStartAttributes'] }}
style="{{ theme_style($theme, 'filterInputText.input.1') }} {{ data_get($column, 'headerStyle') }}"
style="{{ data_get($column, 'headerStyle') }}"
type="text"
class="{{ $filterClasses }}"
placeholder="{{ $placeholder['min'] ?? __('Min') }}"
Expand All @@ -59,7 +56,7 @@ class="{{ $filterClasses }}"
<div @class(['pl-0 w-full sm:w-1/2' => !$inline, 'mt-1' => $inline])>
<input
{{ $defaultAttributes['inputEndAttributes'] }}
@if ($inline) style="{{ theme_style($theme, 'filterNumber.input') }} {{ data_get($column, 'headerStyle') }}" @endif
@if ($inline) style="{{ data_get($column, 'headerStyle') }}" @endif
type="text"
class="{{ $filterClasses }}"
placeholder="{{ $placeholder['max'] ?? __('Max') }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
@else
<div
@class([theme_style($theme, 'filterSelect.base'), 'space-y-1' => !$inline])
style="{{ theme_style($theme, 'filterSelect.base.1') }}"
>
@if (!$inline)
<label class="block text-sm font-semibold text-pg-primary-700 dark:text-pg-primary-300">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
<select
wire:model.live="setUp.footer.perPage"
class="{{ theme_style($theme, 'footer.select') }}"
style="{{ theme_style($theme, 'footer.select.1') }}"
>
@foreach (data_get($setUp, 'footer.perPageValues') as $value)
<option value="{{ $value }}">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,13 @@
<span class="p-1 focus:outline-none focus:shadow-outline">
<x-livewire-powergrid::icons.search
class="{{ theme_style($theme, 'searchBox.iconSearch') }}"
style="{{ theme_style($theme, 'searchBox.iconSearch.1') }}"
/>
</span>
</span>
<input
wire:model.live.debounce.700ms="search"
type="text"
class="{{ theme_style($theme, 'searchBox.input') }}"
style="{{ theme_style($theme, 'searchBox.input.1') }}"
placeholder="{{ trans('livewire-powergrid::datatable.placeholders.search') }}"
>
@if ($search)
Expand All @@ -24,7 +22,6 @@ class="absolute opacity-0 group-hover:opacity-100 transition-all inset-y-0 right
<a wire:click.prevent="$set('search','')">
<x-livewire-powergrid::icons.x
class="w-4 h-4 {{ theme_style($theme, 'searchBox.iconClose') }}"
style="{{ theme_style($theme, 'searchBox.iconClose.1') }}"
/>
</a>
</span>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<td
class="{{ theme_style($theme, 'table.body.td') }}"
style="{{ theme_style($theme, 'table.body.td') }}"
></td>
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@ class="flex flex-col"
<div
id="power-grid-table-container"
class="{{ theme_style($theme, 'table.layout.container') }}"
style="{{ theme_style($theme, 'table.layout.container.1') }}"
>
<div
id="power-grid-table-base"
class="{{ theme_style($theme, 'table.layout.base') }}"
style="{{ theme_style($theme, 'table.layout.base.1') }}"
>
@include(theme_style($theme, 'layout.header'), [
'enabledFilters' => $enabledFilters,
Expand Down Expand Up @@ -47,7 +45,6 @@ class="{{ theme_style($theme, 'table.layout.base') }}"
'overflow-hidden' => !$readyToLoad,
theme_style($theme, 'table.layout.div'),
])
style="{{ theme_style($theme, 'table.layout.div.1') }}"
>
@include($table)
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<td
class="{{ theme_style($theme, 'table.body.td') }}"
style="{{ theme_style($theme, 'table.body.td.1') }}"
>
<div
class="cursor-pointer"
Expand Down
1 change: 0 additions & 1 deletion resources/views/components/inputs/select.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
@if (filled($filter))
<div
class="{{ theme_style($theme, 'filterSelect.base') }}"
style="{{ theme_style($theme, 'filterSelect.base.1') }}"
>
@if (!$inline)
<label class="block text-sm font-medium text-gray-700 dark:text-gray-400">
Expand Down
9 changes: 3 additions & 6 deletions resources/views/components/radio-row.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,13 @@
@if ($hide)
<td
class="{{ theme_style($theme, 'radio.td') }}"
style="{{ theme_style($theme, 'radio.td.1') }}"
>
</td>
@elseif($disable)
<td
class="{{ theme_style($theme, 'radio.td') }}"
style="{{ theme_style($theme, 'radio.td.1') }}"
>
<div class="{{ theme_style($theme, 'radio.base') }}" style="{{ theme_style($theme, 'radio.base.1') }}">
<div class="{{ theme_style($theme, 'radio.base') }}">
<label class="{{ theme_style($theme, 'radio.label') }}">
<input
{{ $inputAttributes }}
Expand All @@ -43,10 +41,9 @@ class="{{ theme_style($theme, 'radio.td') }}"
@else
<td
class="{{ theme_style($theme, 'radio.th') }}"
style="{{ theme_style($theme, 'radio.th') }}"
>
<div class="{{ theme_style($theme, 'radio.base') }}" style="{{ theme_style($theme, 'radio.base.1') }}">
<label class="{{ theme_style($theme, 'radio.label') }}" style="{{ theme_style($theme, 'radio.label.1') }}">
<div class="{{ theme_style($theme, 'radio.base') }}">
<label class="{{ theme_style($theme, 'radio.label') }}">
<input
type="radio"
{{ $inputAttributes }}
Expand Down
4 changes: 0 additions & 4 deletions resources/views/components/table-base.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,21 @@
<table
id="table_base_{{ $tableName }}"
class="table power-grid-table {{ theme_style($theme, 'table.layout.table') }}"
style="{{ theme_style($theme, 'table.layout.table.1') }}"
>
<thead
class="{{ theme_style($theme, 'table.header.thead') }}"
style="{{ theme_style($theme, 'table.header.thead.1') }}"
>
{{ $header }}
</thead>
@if ($readyToLoad)
<tbody
class="{{ theme_style($theme, 'table.body.tbody') }}"
style="{{ theme_style($theme, 'table.body.tbody.1') }}"
>
{{ $body }}
</tbody>
@else
<tbody
class="{{ theme_style($theme, 'table.body.tbody') }}"
style="{{ theme_style($theme, 'table.body.tbody.1') }}"
>
{{ $loading }}
</tbody>
Expand Down
Loading

0 comments on commit 608ec7e

Please sign in to comment.