[增添]添加了datasource的setting数据库以及默认值

This commit is contained in:
makotocc0107
2024-08-27 09:57:44 +08:00
parent d111dfaea4
commit 72eb990970
10955 changed files with 978898 additions and 0 deletions

View File

@@ -0,0 +1,54 @@
<div
{{
$attributes
->merge($getExtraAttributes(), escape: false)
->class(['fi-ta-icon-count-summary grid gap-y-1.5 px-3 py-4'])
}}
>
@if (filled($label = $getLabel()))
<p class="text-sm font-medium text-gray-950 dark:text-white">
{{ $label }}
</p>
@endif
@if ($state = $getState())
<div class="grid gap-y-1.5">
@foreach ($state as $color => $icons)
@php
$color = json_decode($color);
@endphp
@foreach ($icons as $icon => $count)
@if (filled($icon))
<div class="flex items-center justify-end gap-x-1.5">
<span
class="text-sm text-gray-500 dark:text-gray-400"
>
{{ $count }}
</span>
<x-filament::icon
:icon="$icon"
@class([
'fi-ta-icon-count-summary-icon h-6 w-6',
match ($color) {
'gray' => 'text-gray-400 dark:text-gray-500',
default => 'fi-color-custom text-custom-500 dark:text-custom-400',
},
is_string($color) ? 'fi-color-' . $color : null,
])
@style([
\Filament\Support\get_color_css_variables(
$color,
shades: [400, 500],
alias: 'tables::columns.summaries.icon-count.icon',
) => $color !== 'gray',
])
/>
</div>
@endif
@endforeach
@endforeach
</div>
@endif
</div>

View File

@@ -0,0 +1,31 @@
<div
{{
$attributes
->merge($getExtraAttributes(), escape: false)
->class(['fi-ta-range-summary grid gap-y-1 px-3 py-4'])
}}
>
@php
$state = $formatState($getState());
$from = $state[0] ?? null;
$to = $state[1] ?? null;
@endphp
@if (filled($label = $getLabel()))
<span class="text-sm font-medium text-gray-950 dark:text-white">
{{ $label }}
</span>
@endif
@if (filled($from) || filled($to))
<span class="text-sm text-gray-500 dark:text-gray-400">
{{ $from }}
@if (filled($from) && filled($to))
-
@endif
{{ $to }}
</span>
@endif
</div>

View File

@@ -0,0 +1,17 @@
<div
{{
$attributes
->merge($getExtraAttributes(), escape: false)
->class(['fi-ta-text-summary grid gap-y-1 px-3 py-4'])
}}
>
@if (filled($label = $getLabel()))
<span class="text-sm font-medium text-gray-950 dark:text-white">
{{ $label }}
</span>
@endif
<span class="text-sm text-gray-500 dark:text-gray-400">
{{ $formatState($getState()) }}
</span>
</div>

View File

@@ -0,0 +1,27 @@
<div
{{
$attributes
->merge($getExtraAttributes(), escape: false)
->class(['fi-ta-values-summary grid gap-y-1 px-3 py-4'])
}}
>
@if (filled($label = $getLabel()))
<span class="text-sm font-medium text-gray-950 dark:text-white">
{{ $label }}
</span>
@endif
@if ($state = $getState())
<ul
@class([
'list-inside list-disc' => $isBulleted(),
])
>
@foreach ($state as $stateItem)
<li class="text-sm text-gray-500 dark:text-gray-400">
{{ $formatState($stateItem) }}
</li>
@endforeach
</ul>
@endif
</div>