mirror of
https://github.com/filamentphp/filament.git
synced 2026-09-24 15:42:09 +08:00
Merge branch 'develop' into main
This commit is contained in:
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
{
|
||||
"/js/filament.js": "/js/filament.js?id=a3029b69d87820f78653",
|
||||
"/css/filament.css": "/css/filament.css?id=daa5ea5fdc0044aa5d6b"
|
||||
"/css/filament.css": "/css/filament.css?id=c06c6e6ced8e564de515"
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
{!! $formComponent->name ? "{$formComponent->nameAttribute}=\"{$formComponent->name}\"" : null !!}
|
||||
type="checkbox"
|
||||
{!! $formComponent->required ? 'required' : null !!}
|
||||
class="rounded text-secondary-700 shadow-sm focus:border-secondary-700 focus:ring focus:ring-secondary-200 focus:ring-opacity-50 {{ $errors->has($formComponent->name) ? 'border-danger-600 ' : 'border-gray-300' }}"
|
||||
class="rounded text-blue-700 shadow-sm focus:border-blue-700 focus:ring focus:ring-blue-200 focus:ring-opacity-50 {{ $errors->has($formComponent->name) ? 'border-danger-600 ' : 'border-gray-300' }}"
|
||||
{!! Filament\format_attributes($formComponent->extraAttributes) !!}
|
||||
/>
|
||||
</x-slot>
|
||||
|
||||
@@ -367,7 +367,7 @@
|
||||
aria-label="{{ __($formComponent->placeholder) }}"
|
||||
@endunless
|
||||
type="button"
|
||||
class="bg-white relative w-full border rounded shadow-sm pl-3 pr-10 py-2 text-left cursor-default focus:border-secondary-300 focus:ring focus:ring-secondary-200 focus:ring-opacity-50 {{ $formComponent->disabled ? 'text-gray-500' : '' }} {{ $errors->has($formComponent->name) ? 'border-danger-600 motion-safe:animate-shake' : 'border-gray-300' }}"
|
||||
class="bg-white relative w-full border rounded shadow-sm pl-3 pr-10 py-2 text-left cursor-default focus:border-blue-300 focus:ring focus:ring-blue-200 focus:ring-opacity-50 {{ $formComponent->disabled ? 'text-gray-500' : '' }} {{ $errors->has($formComponent->name) ? 'border-danger-600 motion-safe:animate-shake' : 'border-gray-300' }}"
|
||||
>
|
||||
<input
|
||||
readonly
|
||||
@@ -452,10 +452,10 @@
|
||||
role="option"
|
||||
x-bind:aria-selected="focusedDate.date() === day"
|
||||
x-bind:class="{
|
||||
'bg-secondary-600 text-white': dayIsSelected(day),
|
||||
'bg-blue-600 text-white': dayIsSelected(day),
|
||||
'text-gray-700': ! dayIsSelected(day),
|
||||
'bg-secondary-50': dayIsToday(day) && ! dayIsSelected(day) && focusedDate.date() !== day && ! dayIsDisabled(day),
|
||||
'bg-secondary-200': focusedDate.date() === day && ! dayIsSelected(day),
|
||||
'bg-blue-50': dayIsToday(day) && ! dayIsSelected(day) && focusedDate.date() !== day && ! dayIsDisabled(day),
|
||||
'bg-blue-200': focusedDate.date() === day && ! dayIsSelected(day),
|
||||
'bg-gray-100': dayIsDisabled(day) && focusedDate.date() !== day,
|
||||
'cursor-pointer': ! dayIsDisabled(day),
|
||||
'cursor-not-allowed': dayIsDisabled(day),
|
||||
|
||||
@@ -227,7 +227,7 @@
|
||||
x-bind:aria-expanded="open"
|
||||
aria-haspopup="listbox"
|
||||
tabindex="1"
|
||||
class="bg-white relative w-full border rounded shadow-sm pl-3 pr-10 py-2 text-left cursor-default focus:border-secondary-300 focus:ring focus:ring-secondary-200 focus:ring-opacity-50 {{ $formComponent->disabled ? 'text-gray-500' : '' }} {{ $errors->has($formComponent->name) ? 'border-danger-600 motion-safe:animate-shake' : 'border-gray-300' }}"
|
||||
class="bg-white relative w-full border rounded shadow-sm pl-3 pr-10 py-2 text-left cursor-default focus:border-blue-300 focus:ring focus:ring-blue-200 focus:ring-opacity-50 {{ $formComponent->disabled ? 'text-gray-500' : '' }} {{ $errors->has($formComponent->name) ? 'border-danger-600 motion-safe:animate-shake' : 'border-gray-300' }}"
|
||||
>
|
||||
<span
|
||||
x-show="! open"
|
||||
@@ -277,7 +277,7 @@
|
||||
role="option"
|
||||
x-bind:aria-selected="focusedOptionIndex === index"
|
||||
x-bind:class="{
|
||||
'text-white bg-secondary-600': index === focusedOptionIndex,
|
||||
'text-white bg-blue-600': index === focusedOptionIndex,
|
||||
'text-gray-900': index !== focusedOptionIndex,
|
||||
}"
|
||||
class="relative py-2 pl-3 text-gray-900 cursor-default select-none pr-9"
|
||||
|
||||
@@ -220,7 +220,7 @@
|
||||
placeholder="{{ __($formComponent->placeholder) }}"
|
||||
toolbar="trix-toolbar-{{ $formComponent->id }}"
|
||||
x-ref="trix"
|
||||
class="block w-full prose placeholder-gray-400 placeholder-opacity-100 bg-white border-gray-300 rounded shadow-sm focus:border-secondary-300 focus:ring focus:ring-secondary-200 focus:ring-opacity-50 max-w-none"
|
||||
class="block w-full prose placeholder-gray-400 placeholder-opacity-100 bg-white border-gray-300 rounded shadow-sm focus:border-blue-300 focus:ring focus:ring-blue-200 focus:ring-opacity-50 max-w-none"
|
||||
{!! Filament\format_attributes($formComponent->extraAttributes) !!}
|
||||
/>
|
||||
@else
|
||||
|
||||
@@ -246,7 +246,7 @@
|
||||
aria-haspopup="listbox"
|
||||
tabindex="1"
|
||||
@endunless
|
||||
class="bg-white relative w-full border rounded shadow-sm pl-3 pr-10 py-2 text-left cursor-default focus:border-secondary-300 focus:ring focus:ring-secondary-200 focus:ring-opacity-50 {{ $formComponent->disabled ? 'text-gray-500' : '' }} {{ $errors->has($formComponent->name) ? 'border-danger-600 motion-safe:animate-shake' : 'border-gray-300' }}"
|
||||
class="bg-white relative w-full border rounded shadow-sm pl-3 pr-10 py-2 text-left cursor-default focus:border-blue-300 focus:ring focus:ring-blue-200 focus:ring-opacity-50 {{ $formComponent->disabled ? 'text-gray-500' : '' }} {{ $errors->has($formComponent->name) ? 'border-danger-600 motion-safe:animate-shake' : 'border-gray-300' }}"
|
||||
>
|
||||
<span
|
||||
x-show="! open"
|
||||
@@ -309,7 +309,7 @@
|
||||
role="option"
|
||||
x-bind:aria-selected="focusedOptionIndex === index"
|
||||
x-bind:class="{
|
||||
'text-white bg-secondary-600': index === focusedOptionIndex,
|
||||
'text-white bg-blue-600': index === focusedOptionIndex,
|
||||
'text-gray-900': index !== focusedOptionIndex,
|
||||
}"
|
||||
class="relative py-2 pl-3 text-gray-900 cursor-default select-none pr-9"
|
||||
@@ -327,9 +327,9 @@
|
||||
x-show="key === value"
|
||||
x-bind:class="{
|
||||
'text-white': index === focusedOptionIndex,
|
||||
'text-secondary-600': index !== focusedOptionIndex,
|
||||
'text-blue-600': index !== focusedOptionIndex,
|
||||
}"
|
||||
class="absolute inset-y-0 right-0 flex items-center pr-4 text-secondary-600"
|
||||
class="absolute inset-y-0 right-0 flex items-center pr-4 text-blue-600"
|
||||
>
|
||||
<svg class="w-5 h-5" viewBox="0 0 20 20" fill="currentColor">
|
||||
<path fill-rule="evenodd"
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
type="text"
|
||||
x-on:keydown.enter.stop.prevent="createTag()"
|
||||
x-model="newTag"
|
||||
class="block w-full placeholder-gray-400 placeholder-opacity-100 border-0 focus:placeholder-gray-500 focus:border-secondary-300 focus:ring focus:ring-secondary-200 focus:ring-opacity-50"
|
||||
class="block w-full placeholder-gray-400 focus:placeholder-gray-500 placeholder-opacity-100 focus:border-blue-300 focus:ring focus:ring-blue-200 focus:ring-opacity-50 border-0"
|
||||
x-bind:class="{ 'text-danger-700': hasError }"
|
||||
/>
|
||||
@endunless
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
{!! $formComponent->placeholder ? "placeholder=\"{$formComponent->placeholder}\"" : null !!}
|
||||
{!! $formComponent->required ? 'required' : null !!}
|
||||
{!! $formComponent->type ? "type=\"{$formComponent->type}\"" : null !!}
|
||||
class="block w-full rounded shadow-sm placeholder-gray-400 focus:placeholder-gray-500 placeholder-opacity-100 focus:border-secondary-300 focus:ring focus:ring-secondary-200 focus:ring-opacity-50 {{ $errors->has($formComponent->name) ? 'border-danger-600 motion-safe:animate-shake' : 'border-gray-300' }}"
|
||||
class="block w-full rounded shadow-sm placeholder-gray-400 focus:placeholder-gray-500 placeholder-opacity-100 focus:border-blue-300 focus:ring focus:ring-blue-200 focus:ring-opacity-50 {{ $errors->has($formComponent->name) ? 'border-danger-600 motion-safe:animate-shake' : 'border-gray-300' }}"
|
||||
{!! Filament\format_attributes($formComponent->extraAttributes) !!}
|
||||
/>
|
||||
</x-forms::field-group>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
{!! $formComponent->placeholder ? "placeholder=\"{$formComponent->placeholder}\"" : null !!}
|
||||
{!! $formComponent->required ? 'required' : null !!}
|
||||
{!! $formComponent->rows ? "rows=\"{$formComponent->rows}\"" : null !!}
|
||||
class="block w-full rounded shadow-sm placeholder-gray-400 focus:placeholder-gray-500 placeholder-opacity-100 focus:border-secondary-300 focus:ring focus:ring-secondary-200 focus:ring-opacity-50 {{ $errors->has($formComponent->name) ? 'border-danger-600 motion-safe:animate-shake' : 'border-gray-300' }}"
|
||||
class="block w-full rounded shadow-sm placeholder-gray-400 focus:placeholder-gray-500 placeholder-opacity-100 focus:border-blue-300 focus:ring focus:ring-blue-200 focus:ring-opacity-50 {{ $errors->has($formComponent->name) ? 'border-danger-600 motion-safe:animate-shake' : 'border-gray-300' }}"
|
||||
{!! Filament\format_attributes($formComponent->extraAttributes) !!}
|
||||
></textarea>
|
||||
</x-forms::field-group>
|
||||
|
||||
@@ -6,14 +6,14 @@
|
||||
<button
|
||||
wire:click="{{ $column->action }}('{{ $record->getKey() }}')"
|
||||
type="button"
|
||||
class="{{ $primaryClasses }} hover:underline hover:text-secondary-700 transition-colors duration-200"
|
||||
class="{{ $primaryClasses }} hover:underline hover:text-blue-700 transition-colors duration-200"
|
||||
>
|
||||
{{ $column->getValue($record) }}
|
||||
</button>
|
||||
@elseif ($column->url)
|
||||
<a
|
||||
href="{{ $column->getUrl($record) }}"
|
||||
class="{{ $primaryClasses }} hover:underline hover:text-secondary-700 transition-colors duration-200"
|
||||
class="{{ $primaryClasses }} hover:underline hover:text-blue-700 transition-colors duration-200"
|
||||
>
|
||||
{{ $column->getValue($record) }}
|
||||
</a>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
<div class="flex shadow-sm">
|
||||
@if ($table->isFilterable())
|
||||
<select wire:model="filter" class="text-sm flex-shrink-0 sm:text-base focus:border-secondary-300 focus:ring focus:ring-secondary-200 focus:ring-opacity-50 border-gray-300 {{ $table->isSearchable() ? 'rounded-l' : 'rounded' }}">
|
||||
<select wire:model="filter" class="text-sm flex-shrink-0 sm:text-base focus:border-blue-300 focus:ring focus:ring-blue-200 focus:ring-opacity-50 border-gray-300 {{ $table->isSearchable() ? 'rounded-l' : 'rounded' }}">
|
||||
<option>{{ __('tables::table.filter.placeholder') }}</option>
|
||||
|
||||
@foreach ($table->getVisibleFilters() as $filter)
|
||||
@@ -19,7 +19,7 @@
|
||||
type="search"
|
||||
wire:model="search"
|
||||
placeholder="{{ __('tables::table.search.placeholder') }}"
|
||||
class="text-sm sm:text-base pl-10 block w-full placeholder-gray-400 focus:placeholder-gray-500 placeholder-opacity-100 focus:border-secondary-300 focus:ring focus:ring-secondary-200 focus:ring-opacity-50 border-gray-300 {{ $table->isFilterable() ? 'rounded-r border-l-0' : 'rounded' }}"
|
||||
class="text-sm sm:text-base pl-10 block w-full placeholder-gray-400 focus:placeholder-gray-500 placeholder-opacity-100 focus:border-blue-300 focus:ring focus:ring-blue-200 focus:ring-opacity-50 border-gray-300 {{ $table->isFilterable() ? 'rounded-r border-l-0' : 'rounded' }}"
|
||||
/>
|
||||
|
||||
<div class="absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 pointer-events-none" aria-hidden="true">
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<div class="space-x-1">
|
||||
<select wire:model="recordsPerPage" id="records-per-page" class="text-sm md:text-base rounded shadow-sm focus:border-secondary-300 focus:ring focus:ring-secondary-200 focus:ring-opacity-50 border-gray-300">
|
||||
<select wire:model="recordsPerPage" id="records-per-page" class="text-sm md:text-base rounded shadow-sm focus:border-blue-300 focus:ring focus:ring-blue-200 focus:ring-opacity-50 border-gray-300">
|
||||
<option value="5">5</option>
|
||||
<option value="10">10</option>
|
||||
<option value="25">25</option>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
{{ $records->count() && $records->count() === count($selected) ? 'checked' : null }}
|
||||
wire:click="toggleSelectAll"
|
||||
type="checkbox"
|
||||
class="rounded text-secondary-700 shadow-sm focus:border-secondary-700 focus:ring focus:ring-secondary-200 focus:ring-opacity-50 border-gray-300"
|
||||
class="rounded text-blue-700 shadow-sm focus:border-blue-700 focus:ring focus:ring-blue-200 focus:ring-opacity-50 border-gray-300"
|
||||
/>
|
||||
</th>
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
{{ in_array($record->getKey(), $selected) ? 'checked' : null }}
|
||||
wire:click="toggleSelected('{{ $record->getKey() }}')"
|
||||
type="checkbox"
|
||||
class="rounded text-secondary-700 shadow-sm focus:border-secondary-700 focus:ring focus:ring-secondary-200 focus:ring-opacity-50 border-gray-300"
|
||||
class="rounded text-blue-700 shadow-sm focus:border-blue-700 focus:ring focus:ring-blue-200 focus:ring-opacity-50 border-gray-300"
|
||||
/>
|
||||
</td>
|
||||
|
||||
@@ -84,14 +84,14 @@
|
||||
<button
|
||||
wire:click="{{ $table->recordAction }}('{{ $record->getKey() }}')"
|
||||
type="button"
|
||||
class="hover:underline text-secondary-500 hover:text-secondary-700 transition-colors duration-200 font-medium"
|
||||
class="hover:underline text-blue-500 hover:text-blue-700 transition-colors duration-200 font-medium"
|
||||
>
|
||||
{{ __($table->recordButtonLabel) }}
|
||||
</button>
|
||||
@elseif ($table->recordUrl)
|
||||
<a
|
||||
href="{{ $table->getRecordUrl($record) }}"
|
||||
class="hover:underline text-secondary-500 hover:text-secondary-700 transition-colors duration-200 font-medium"
|
||||
class="hover:underline text-blue-500 hover:text-blue-700 transition-colors duration-200 font-medium"
|
||||
>
|
||||
{{ __($table->recordButtonLabel) }}
|
||||
</a>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
@layer utilities {
|
||||
.link {
|
||||
@apply underline transition-colors duration-200 text-secondary-500 hover:text-secondary-700;
|
||||
@apply underline transition-colors duration-200 text-blue-500 hover:text-blue-700;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
$colorClasses = [
|
||||
'danger' => 'border-transparent bg-danger-600 text-white hover:bg-danger-700 focus:ring-danger-200',
|
||||
'primary' => 'border-transparent bg-primary-600 text-white hover:bg-primary-700 focus:ring-primary-200',
|
||||
'secondary' => 'border-transparent bg-secondary-600 text-white hover:bg-secondary-700 focus:ring-secondary-200',
|
||||
'white' => 'border-gray-300 bg-white text-gray-800 hover:bg-gray-100 focus:ring-primary-200',
|
||||
][$color];
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<div class="p-4">
|
||||
<div class="flex items-start space-x-4">
|
||||
<div class="flex-grow flex items-center space-x-2">
|
||||
<x-heroicon-o-information-circle class="flex-shrink-0 w-5 h-5 text-secondary-500 stroke-current" />
|
||||
<x-heroicon-o-information-circle class="flex-shrink-0 w-5 h-5 text-blue-500 stroke-current" />
|
||||
|
||||
<div class="flex-grow">
|
||||
<p x-text="message" class="text-sm text-white"></p>
|
||||
|
||||
@@ -9,10 +9,10 @@
|
||||
@if (config('filament.widgets.default.account', true))
|
||||
<x-filament::card class="flex">
|
||||
<div class="flex items-center space-x-4">
|
||||
<x-filament-avatar :user="Auth::guard('filament')->user()" :size="160" class="flex-shrink-0 w-20 h-20 rounded-full" />
|
||||
<x-filament-avatar :user="\Filament\Filament::auth()->user()" :size="160" class="flex-shrink-0 w-20 h-20 rounded-full" />
|
||||
|
||||
<div class="space-y-1">
|
||||
<h2 class="text-2xl">{{ __('filament::dashboard.widgets.account.heading', ['name' => Auth::guard('filament')->user()->name]) }}</h2>
|
||||
<h2 class="text-2xl">{{ __('filament::dashboard.widgets.account.heading', ['name' => \Filament\Filament::auth()->user()->name]) }}</h2>
|
||||
<p class="text-sm"><a href="{{ route('filament.account') }}" class="link">{{ __('filament::dashboard.widgets.account.links.account.label') }}</a></p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -24,7 +24,7 @@
|
||||
<div class="flex items-center justify-between h-full">
|
||||
<div class="w-full space-y-6">
|
||||
<div class="flex items-center justify-between w-full space-x-4">
|
||||
<a href="https://filamentadmin.com" target="_blank" class="transition-colors duration-200 text-primary-700 hover:text-primary-900">
|
||||
<a href="https://filamentadmin.com" target="_blank" class="transition-colors duration-200 hover:text-primary-700">
|
||||
<x-filament::logo class="h-auto w-28" />
|
||||
</a>
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@ use Filament\Filament;
|
||||
use Filament\Forms\HasForm;
|
||||
use Filament\Resources\Forms\Form;
|
||||
use Filament\Resources\Pages\Page;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
|
||||
class EditAccount extends Page
|
||||
@@ -35,7 +34,7 @@ class EditAccount extends Page
|
||||
|
||||
public function mount()
|
||||
{
|
||||
$this->record = Auth::guard('filament')->user();
|
||||
$this->record = Filament::auth()->user();
|
||||
}
|
||||
|
||||
public function save()
|
||||
|
||||
+1
-2
@@ -21,8 +21,7 @@ module.exports = {
|
||||
mono: ['JetBrains Mono', ...defaultTheme.fontFamily.mono],
|
||||
},
|
||||
colors: {
|
||||
primary: colors.teal,
|
||||
secondary: colors.blue,
|
||||
primary: colors.lightBlue,
|
||||
success: colors.emerald,
|
||||
danger: colors.rose,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user