[增添]添加了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,38 @@
<?php
return [
'entries' => [
'text' => [
'actions' => [
'collapse_list' => 'عرض :count أقل',
'expand_list' => 'عرض :count أكثر',
],
'more_list_items' => 'و :count إضافية',
],
'key_value' => [
'columns' => [
'key' => [
'label' => 'المفتاح',
],
'value' => [
'label' => 'القيمة',
],
],
'placeholder' => 'لا توجد مدخلات',
],
],
];

View File

@@ -0,0 +1,9 @@
<?php
return [
'text_entry' => [
'more_list_items' => 'və :count daha',
],
];

View File

@@ -0,0 +1,38 @@
<?php
return [
'entries' => [
'text' => [
'actions' => [
'collapse_list' => 'Покажи :count по-малко',
'expand_list' => 'Покажи още :count',
],
'more_list_items' => 'и още :count',
],
'key_value' => [
'columns' => [
'key' => [
'label' => 'Ключ',
],
'value' => [
'label' => 'Стойност',
],
],
'placeholder' => 'Няма записи',
],
],
];

View File

@@ -0,0 +1,38 @@
<?php
return [
'entries' => [
'text' => [
'actions' => [
'collapse_list' => 'Mostrar-ne :count menys',
'expand_list' => 'Mostrar-ne :count més',
],
'more_list_items' => 'i :count més',
],
'key_value' => [
'columns' => [
'key' => [
'label' => 'Clau',
],
'value' => [
'label' => 'Valor',
],
],
'placeholder' => 'No hi ha entrades',
],
],
];

View File

@@ -0,0 +1,9 @@
<?php
return [
'text_entry' => [
'more_list_items' => 'وە :count ی زیاتر',
],
];

View File

@@ -0,0 +1,38 @@
<?php
return [
'entries' => [
'text' => [
'actions' => [
'collapse_list' => 'Vis :count mindre',
'expand_list' => 'Vis :count flere',
],
'more_list_items' => 'og :count flere',
],
'key_value' => [
'columns' => [
'key' => [
'label' => 'Nøgle',
],
'value' => [
'label' => 'Værdi',
],
],
'placeholder' => 'Ingen data',
],
],
];

View File

@@ -0,0 +1,38 @@
<?php
return [
'entries' => [
'text' => [
'actions' => [
'collapse_list' => 'Zeige :count weniger',
'expand_list' => 'Zeige :count weitere',
],
'more_list_items' => 'und :count mehr',
],
'key_value' => [
'columns' => [
'key' => [
'label' => 'Schlüssel',
],
'value' => [
'label' => 'Wert',
],
],
'placeholder' => 'Keine Einträge',
],
],
];

View File

@@ -0,0 +1,38 @@
<?php
return [
'entries' => [
'text' => [
'actions' => [
'collapse_list' => 'Show :count less',
'expand_list' => 'Show :count more',
],
'more_list_items' => 'and :count more',
],
'key_value' => [
'columns' => [
'key' => [
'label' => 'Key',
],
'value' => [
'label' => 'Value',
],
],
'placeholder' => 'No entries',
],
],
];

View File

@@ -0,0 +1,38 @@
<?php
return [
'entries' => [
'text' => [
'actions' => [
'collapse_list' => 'Mostrar :count menos',
'expand_list' => 'Mostrar :count más',
],
'more_list_items' => 'y :count más',
],
'key_value' => [
'columns' => [
'key' => [
'label' => 'Clave',
],
'value' => [
'label' => 'Valor',
],
],
'placeholder' => 'No hay entradas',
],
],
];

View File

@@ -0,0 +1,9 @@
<?php
return [
'text_entry' => [
'more_list_items' => 'و :count عدد دیگر',
],
];

View File

@@ -0,0 +1,38 @@
<?php
return [
'entries' => [
'text' => [
'actions' => [
'collapse_list' => 'Näytä :count vähemmän',
'expand_list' => 'Näytä :count lisää',
],
'more_list_items' => 'ja :count lisää',
],
'key_value' => [
'columns' => [
'key' => [
'label' => 'Avain',
],
'value' => [
'label' => 'Arvo',
],
],
'placeholder' => 'Ei tietueita',
],
],
];

View File

@@ -0,0 +1,38 @@
<?php
return [
'entries' => [
'text' => [
'actions' => [
'collapse_list' => 'Afficher :count de moins',
'expand_list' => 'Afficher :count de plus',
],
'more_list_items' => 'et :count de plus',
],
'key_value' => [
'columns' => [
'key' => [
'label' => 'Clé',
],
'value' => [
'label' => 'Valeur',
],
],
'placeholder' => 'Aucune entrée',
],
],
];

View File

@@ -0,0 +1,9 @@
<?php
return [
'text_entry' => [
'more_list_items' => 'i :count još',
],
];

View File

@@ -0,0 +1,38 @@
<?php
return [
'entries' => [
'text' => [
'actions' => [
'collapse_list' => ':count elemmel kevesebb mutatása',
'expand_list' => ':count elemmel több mutatása',
],
'more_list_items' => ':count és több',
],
'key_value' => [
'columns' => [
'key' => [
'label' => 'Kulcs',
],
'value' => [
'label' => 'Érték',
],
],
'placeholder' => 'Nincs megjeleníthető elem',
],
],
];

View File

@@ -0,0 +1,38 @@
<?php
return [
'entries' => [
'text' => [
'actions' => [
'collapse_list' => ':count件非表示',
'expand_list' => ':count件表示',
],
'more_list_items' => 'あと:count件あります',
],
'key_value' => [
'columns' => [
'key' => [
'label' => 'キー',
],
'value' => [
'label' => '値',
],
],
'placeholder' => 'エントリがありません',
],
],
];

View File

@@ -0,0 +1,38 @@
<?php
return [
'entries' => [
'text' => [
'actions' => [
'collapse_list' => 'បង្ហាញ :count តិច',
'expand_list' => 'បង្ហាញ :count ច្រើនទៀត',
],
'more_list_items' => 'និង :count ច្រើនទៀត',
],
'key_value' => [
'columns' => [
'key' => [
'label' => 'សោ',
],
'value' => [
'label' => 'តម្លៃ',
],
],
'placeholder' => 'គ្មានទិន្ន័យទេ',
],
],
];

View File

@@ -0,0 +1,38 @@
<?php
return [
'entries' => [
'text' => [
'actions' => [
'collapse_list' => ':count 개 더 접기',
'expand_list' => ':count 개 더 펼치기',
],
'more_list_items' => '그리고 :count 개 더',
],
'key_value' => [
'columns' => [
'key' => [
'label' => '키',
],
'value' => [
'label' => '값',
],
],
'placeholder' => '항목 없음',
],
],
];

View File

@@ -0,0 +1,9 @@
<?php
return [
'text_entry' => [
'more_list_items' => 'وە :count ی زیاتر',
],
];

View File

@@ -0,0 +1,38 @@
<?php
return [
'entries' => [
'text' => [
'actions' => [
'collapse_list' => 'Rodyti dar :count',
'expand_list' => 'Slėpti :count',
],
'more_list_items' => 'ir dar :count',
],
'key_value' => [
'columns' => [
'key' => [
'label' => 'Raktas',
],
'value' => [
'label' => 'Reikšmė',
],
],
'placeholder' => 'Nėra įrašų',
],
],
];

View File

@@ -0,0 +1,38 @@
<?php
return [
'entries' => [
'text' => [
'actions' => [
'collapse_list' => ':count minder tonen',
'expand_list' => ':count meer tonen',
],
'more_list_items' => 'en :count meer',
],
'key_value' => [
'columns' => [
'key' => [
'label' => 'Sleutel',
],
'value' => [
'label' => 'Waarde',
],
],
],
'placeholder' => 'Geen gegevens',
],
];

View File

@@ -0,0 +1,38 @@
<?php
return [
'entries' => [
'text' => [
'actions' => [
'collapse_list' => 'Vis :count mindre',
'expand_list' => 'Vis :count til',
],
'more_list_items' => 'og :count til',
],
'key_value' => [
'columns' => [
'key' => [
'label' => 'Nøkkel',
],
'value' => [
'label' => 'Verdi',
],
],
'placeholder' => 'Ingen oppføringer',
],
],
];

View File

@@ -0,0 +1,9 @@
<?php
return [
'text_entry' => [
'more_list_items' => 'र :count थप वस्तुहरू छन्',
],
];

View File

@@ -0,0 +1,38 @@
<?php
return [
'entries' => [
'text' => [
'actions' => [
'collapse_list' => 'Mostrar menos :count',
'expand_list' => 'Mostrar mais :count',
],
'more_list_items' => 'e mais :count',
],
'key_value' => [
'columns' => [
'key' => [
'label' => 'Chave',
],
'value' => [
'label' => 'Valor',
],
],
'placeholder' => 'Sem dados',
],
],
];

View File

@@ -0,0 +1,38 @@
<?php
return [
'entries' => [
'text' => [
'actions' => [
'collapse_list' => 'Mostrar menos :count',
'expand_list' => 'Mostrar mais :count',
],
'more_list_items' => 'e mais :count',
],
'key_value' => [
'columns' => [
'key' => [
'label' => 'Chave',
],
'value' => [
'label' => 'Valor',
],
],
'placeholder' => 'Sem dados',
],
],
];

View File

@@ -0,0 +1,38 @@
<?php
return [
'entries' => [
'text' => [
'actions' => [
'collapse_list' => 'Скрыть :count',
'expand_list' => 'Показать еще :count',
],
'more_list_items' => 'и еще :count',
],
'key_value' => [
'columns' => [
'key' => [
'label' => 'Ключ',
],
'value' => [
'label' => 'Значение',
],
],
'placeholder' => 'Нет записей',
],
],
];

View File

@@ -0,0 +1,38 @@
<?php
return [
'entries' => [
'text' => [
'actions' => [
'collapse_list' => 'Zobraziť o :count menej',
'expand_list' => 'Zobraziť o :count viac',
],
'more_list_items' => 'a o :count viac',
],
'key_value' => [
'columns' => [
'key' => [
'label' => 'Kľúč',
],
'value' => [
'label' => 'Hodnota',
],
],
'placeholder' => 'Žiadne záznamy',
],
],
];

View File

@@ -0,0 +1,38 @@
<?php
return [
'entries' => [
'text' => [
'actions' => [
'collapse_list' => 'Visa :count färre',
'expand_list' => 'Visa :count till',
],
'more_list_items' => 'och :count till',
],
'key_value' => [
'columns' => [
'key' => [
'label' => 'Namn',
],
'value' => [
'label' => 'Värde',
],
],
'placeholder' => 'Inga objekt',
],
],
];

View File

@@ -0,0 +1,38 @@
<?php
return [
'entries' => [
'text' => [
'actions' => [
'collapse_list' => 'แสดงให้น้อยกว่านี้ :count รายการ',
'expand_list' => 'แสดงอีก :count รายการ',
],
'more_list_items' => 'และอีก :count รายการ',
],
'key_value' => [
'columns' => [
'key' => [
'label' => 'คีย์',
],
'value' => [
'label' => 'ค่า',
],
],
'placeholder' => 'ไม่มีรายการ',
],
],
];

View File

@@ -0,0 +1,9 @@
<?php
return [
'text_entry' => [
'more_list_items' => 've :count daha',
],
];

View File

@@ -0,0 +1,38 @@
<?php
return [
'entries' => [
'text' => [
'actions' => [
'collapse_list' => 'Сховати :count',
'expand_list' => 'Показати ще :count',
],
'more_list_items' => 'ще :count',
],
'key_value' => [
'columns' => [
'key' => [
'label' => 'Ключ',
],
'value' => [
'label' => 'Значення',
],
],
'placeholder' => 'Немає записів',
],
],
];

View File

@@ -0,0 +1,38 @@
<?php
return [
'entries' => [
'text' => [
'actions' => [
'collapse_list' => ':countta kam ko\'rsatish',
'expand_list' => 'Yana :counttasini k\'rsatish',
],
'more_list_items' => 'va yana :countta',
],
'key_value' => [
'columns' => [
'key' => [
'label' => 'Kalit so\'zi',
],
'value' => [
'label' => 'Qiymati',
],
],
'placeholder' => 'Ma\'lumot yo\'q',
],
],
];

View File

@@ -0,0 +1,38 @@
<?php
return [
'entries' => [
'text' => [
'actions' => [
'collapse_list' => 'Hiển thị :count ít hơn',
'expand_list' => 'Hiển thị :count thêm',
],
'more_list_items' => 'và :count thêm',
],
'key_value' => [
'columns' => [
'key' => [
'label' => 'Khóa',
],
'value' => [
'label' => 'Giá trị',
],
],
'placeholder' => 'Không có mục',
],
],
];

View File

@@ -0,0 +1,9 @@
<?php
return [
'text_entry' => [
'more_list_items' => '还有 :count 条记录',
],
];

View File

@@ -0,0 +1,38 @@
<?php
return [
'entries' => [
'text' => [
'actions' => [
'collapse_list' => '少顯示 :count 筆',
'expand_list' => '多顯示 :count 筆',
],
'more_list_items' => '多 :count 筆',
],
'key_value' => [
'columns' => [
'key' => [
'label' => '索引',
],
'value' => [
'label' => '值',
],
],
'placeholder' => '無項目',
],
],
];

View File

@@ -0,0 +1,53 @@
@php
use Filament\Support\Enums\MaxWidth;
@endphp
<dl>
<x-filament::grid
:default="$getColumns('default')"
:sm="$getColumns('sm')"
:md="$getColumns('md')"
:lg="$getColumns('lg')"
:xl="$getColumns('xl')"
:two-xl="$getColumns('2xl')"
:attributes="
\Filament\Support\prepare_inherited_attributes($getExtraAttributeBag())
->class(['fi-fo-component-ctn gap-6'])
"
>
@foreach ($getComponents() as $infolistComponent)
<x-filament::grid.column
:default="$infolistComponent->getColumnSpan('default')"
:sm="$infolistComponent->getColumnSpan('sm')"
:md="$infolistComponent->getColumnSpan('md')"
:lg="$infolistComponent->getColumnSpan('lg')"
:xl="$infolistComponent->getColumnSpan('xl')"
:twoXl="$infolistComponent->getColumnSpan('2xl')"
:defaultStart="$infolistComponent->getColumnStart('default')"
:smStart="$infolistComponent->getColumnStart('sm')"
:mdStart="$infolistComponent->getColumnStart('md')"
:lgStart="$infolistComponent->getColumnStart('lg')"
:xlStart="$infolistComponent->getColumnStart('xl')"
:twoXlStart="$infolistComponent->getColumnStart('2xl')"
@class([
match ($maxWidth = $infolistComponent->getMaxWidth()) {
MaxWidth::ExtraSmall, 'xs' => 'max-w-xs',
MaxWidth::Small, 'sm' => 'max-w-sm',
MaxWidth::Medium, 'md' => 'max-w-md',
MaxWidth::Large, 'lg' => 'max-w-lg',
MaxWidth::ExtraLarge, 'xl' => 'max-w-xl',
MaxWidth::TwoExtraLarge, '2xl' => 'max-w-2xl',
MaxWidth::ThreeExtraLarge, '3xl' => 'max-w-3xl',
MaxWidth::FourExtraLarge, '4xl' => 'max-w-4xl',
MaxWidth::FiveExtraLarge, '5xl' => 'max-w-5xl',
MaxWidth::SixExtraLarge, '6xl' => 'max-w-6xl',
MaxWidth::SevenExtraLarge, '7xl' => 'max-w-7xl',
default => $maxWidth,
},
])
>
{{ $infolistComponent }}
</x-filament::grid.column>
@endforeach
</x-filament::grid>
</dl>

View File

@@ -0,0 +1,34 @@
@php
use Filament\Support\Enums\VerticalAlignment;
$verticalAlignment = $getVerticalAlignment();
if (! $verticalAlignment instanceof VerticalAlignment) {
$verticalAlignment = filled($verticalAlignment) ? (VerticalAlignment::tryFrom($verticalAlignment) ?? $verticalAlignment) : null;
}
@endphp
<div
{{
$attributes
->merge([
'id' => $getId(),
], escape: false)
->merge($getExtraAttributes(), escape: false)
->class([
'fi-in-actions flex h-full flex-col',
match ($verticalAlignment) {
VerticalAlignment::Start => 'justify-start',
VerticalAlignment::Center => 'justify-center',
VerticalAlignment::End => 'justify-end',
default => $verticalAlignment,
},
])
}}
>
<x-filament::actions
:actions="$getChildComponentContainer()->getComponents()"
:alignment="$getAlignment()"
:full-width="$isFullWidth()"
/>
</div>

View File

@@ -0,0 +1,5 @@
@foreach ($getActions() as $action)
@if ($action->isVisible())
{{ $action }}
@endif
@endforeach

View File

@@ -0,0 +1,52 @@
@props([
'prefixActions' => [],
'suffixActions' => [],
])
@php
$prefixActions = array_filter(
$prefixActions,
fn (\Filament\Infolists\Components\Actions\Action $prefixAction): bool => $prefixAction->isVisible(),
);
$suffixActions = array_filter(
$suffixActions,
fn (\Filament\Infolists\Components\Actions\Action $suffixAction): bool => $suffixAction->isVisible(),
);
$affixActionsClasses = 'flex items-center gap-3 self-stretch';
@endphp
<div
{{ $attributes->class(['fi-in-affixes flex']) }}
>
@if (count($prefixActions))
<div
@class([
$affixActionsClasses,
'pe-2',
])
>
@foreach ($prefixActions as $prefixAction)
{{ $prefixAction }}
@endforeach
</div>
@endif
<div class="min-w-0 flex-1">
{{ $slot }}
</div>
@if (count($suffixActions))
<div
@class([
$affixActionsClasses,
'ps-2',
])
>
@foreach ($suffixActions as $suffixAction)
{{ $suffixAction }}
@endforeach
</div>
@endif
</div>

View File

@@ -0,0 +1,56 @@
<x-dynamic-component :component="$getEntryWrapperView()" :entry="$entry">
@php
$arrayState = $getState();
if ($arrayState instanceof \Illuminate\Support\Collection) {
$arrayState = $arrayState->all();
}
$arrayState = \Illuminate\Support\Arr::wrap($arrayState);
@endphp
<div
{{
$attributes
->merge($getExtraAttributes(), escape: false)
->class([
'fi-in-color flex flex-wrap gap-1.5',
])
}}
>
@if (count($arrayState))
@foreach ($arrayState as $state)
@php
$itemIsCopyable = $isCopyable($state);
$copyableState = $getCopyableState($state) ?? $state;
$copyMessage = $getCopyMessage($state);
$copyMessageDuration = $getCopyMessageDuration($state);
@endphp
<div
@if ($itemIsCopyable)
x-data="{}"
x-on:click="
window.navigator.clipboard.writeText(@js($copyableState))
$tooltip(@js($copyMessage), {
theme: $store.theme,
timeout: @js($copyMessageDuration),
})
"
@endif
@class([
'fi-in-color-item h-6 w-6 rounded-md',
'cursor-pointer' => $itemIsCopyable,
])
@style([
"background-color: {$state}" => $state,
])
></div>
@endforeach
@elseif (($placeholder = $getPlaceholder()) !== null)
<x-filament-infolists::entries.placeholder>
{{ $placeholder }}
</x-filament-infolists::entries.placeholder>
@endif
</div>
</x-dynamic-component>

View File

@@ -0,0 +1,5 @@
<div
class="fi-in-placeholder text-sm leading-6 text-gray-400 dark:text-gray-500"
>
{{ $slot }}
</div>

View File

@@ -0,0 +1,5 @@
<div
{{ $attributes->class(['fi-in-entry-wrp-helper-text text-sm text-gray-500']) }}
>
{{ $slot }}
</div>

View File

@@ -0,0 +1,66 @@
@props([
'actions' => [],
'color' => 'gray',
'icon' => null,
'tooltip' => null,
])
<div
{{
$attributes->class([
'fi-in-entry-wrp-hint flex items-center gap-x-3 text-sm',
])
}}
>
@if (! \Filament\Support\is_slot_empty($slot))
<span
@class([
'fi-in-entry-wrp-hint-label',
match ($color) {
'gray' => 'text-gray-500',
default => 'fi-color-custom text-custom-600 dark:text-custom-400',
},
is_string($color) ? "fi-color-{$color}" : null,
])
@style([
\Filament\Support\get_color_css_variables(
$color,
shades: [400, 600],
alias: 'infolists::components.entry-wrapper.hint.label',
),
])
>
{{ $slot }}
</span>
@endif
@if ($icon)
<x-filament::icon
x-data="{}"
:icon="$icon"
:x-tooltip="filled($tooltip) ? '{ content: ' . \Illuminate\Support\Js::from($tooltip) . ', theme: $store.theme }' : null"
@class([
'fi-in-entry-wrp-hint-icon h-5 w-5',
match ($color) {
'gray' => 'text-gray-400 dark:text-gray-500',
default => 'text-custom-500 dark:text-custom-400',
},
])
@style([
\Filament\Support\get_color_css_variables(
$color,
shades: [400, 500],
alias: 'infolists::components.entry-wrapper.hint.icon',
),
])
/>
@endif
@if (count($actions))
<div class="fi-in-entry-wrp-hint-action flex items-center gap-3">
@foreach ($actions as $action)
{{ $action }}
@endforeach
</div>
@endif
</div>

View File

@@ -0,0 +1,161 @@
@props([
'action' => null,
'alignment' => null,
'entry' => null,
'hasInlineLabel' => null,
'helperText' => null,
'hint' => null,
'hintActions' => null,
'hintColor' => null,
'hintIcon' => null,
'hintIconTooltip' => null,
'id' => null,
'label' => null,
'labelPrefix' => null,
'labelSrOnly' => null,
'labelSuffix' => null,
'shouldOpenUrlInNewTab' => null,
'statePath' => null,
'tooltip' => null,
'url' => null,
])
@php
use Filament\Support\Enums\Alignment;
if ($entry) {
$action ??= $entry->getAction();
$alignment ??= $entry->getAlignment();
$hasInlineLabel ??= $entry->hasInlineLabel();
$helperText ??= $entry->getHelperText();
$hint ??= $entry->getHint();
$hintActions ??= $entry->getHintActions();
$hintColor ??= $entry->getHintColor();
$hintIcon ??= $entry->getHintIcon();
$hintIconTooltip ??= $entry->getHintIconTooltip();
$id ??= $entry->getId();
$label ??= $entry->getLabel();
$labelSrOnly ??= $entry->isLabelHidden();
$shouldOpenUrlInNewTab ??= $entry->shouldOpenUrlInNewTab();
$statePath ??= $entry->getStatePath();
$tooltip ??= $entry->getTooltip();
$url ??= $entry->getUrl();
}
if (! $alignment instanceof Alignment) {
$alignment = filled($alignment) ? (Alignment::tryFrom($alignment) ?? $alignment) : null;
}
$hintActions = array_filter(
$hintActions ?? [],
fn (\Filament\Infolists\Components\Actions\Action $hintAction): bool => $hintAction->isVisible(),
);
@endphp
<div
{{
$attributes
->merge($entry?->getExtraEntryWrapperAttributes() ?? [])
->class(['fi-in-entry-wrp'])
}}
>
@if ($label && $labelSrOnly)
<dt class="sr-only">
{{ $label }}
</dt>
@endif
<div
@class([
'grid gap-y-2',
'sm:grid-cols-3 sm:items-start sm:gap-x-4' => $hasInlineLabel,
])
>
@if (($label && (! $labelSrOnly)) || $labelPrefix || $labelSuffix || filled($hint) || $hintIcon)
<div class="flex items-center justify-between gap-x-3">
@if ($label && (! $labelSrOnly))
<x-filament-infolists::entry-wrapper.label
:prefix="$labelPrefix"
:suffix="$labelSuffix"
>
{{ $label }}
</x-filament-infolists::entry-wrapper.label>
@elseif ($labelPrefix)
{{ $labelPrefix }}
@elseif ($labelSuffix)
{{ $labelSuffix }}
@endif
@if (filled($hint) || $hintIcon || count($hintActions))
<x-filament-infolists::entry-wrapper.hint
:actions="$hintActions"
:color="$hintColor"
:icon="$hintIcon"
:tooltip="$hintIconTooltip"
>
{{ $hint }}
</x-filament-infolists::entry-wrapper.hint>
@endif
</div>
@endif
<div
@class([
'grid auto-cols-fr gap-y-2',
'sm:col-span-2' => $hasInlineLabel,
])
>
<dd
@if (filled($tooltip))
x-data="{}"
x-tooltip="{
content: @js($tooltip),
theme: $store.theme,
}"
@endif
@class([
match ($alignment) {
Alignment::Start => 'text-start',
Alignment::Center => 'text-center',
Alignment::End => 'text-end',
Alignment::Justify, Alignment::Between => 'text-justify',
Alignment::Left => 'text-left',
Alignment::Right => 'text-right',
default => $alignment,
},
])
>
@if ($url)
<a
{{ \Filament\Support\generate_href_html($url, $shouldOpenUrlInNewTab) }}
class="block"
>
{{ $slot }}
</a>
@elseif ($action)
@php
$wireClickAction = $action->getLivewireClickHandler();
@endphp
<button
type="button"
wire:click="{{ $wireClickAction }}"
wire:loading.attr="disabled"
wire:target="{{ $wireClickAction }}"
class="block"
>
{{ $slot }}
</button>
@else
{{ $slot }}
@endif
</dd>
@if (filled($helperText))
<x-filament-infolists::entry-wrapper.helper-text>
{{ $helperText }}
</x-filament-infolists::entry-wrapper.helper-text>
@endif
</div>
</div>
</div>

View File

@@ -0,0 +1,16 @@
@props([
'prefix' => null,
'suffix' => null,
])
<dt
{{ $attributes->class(['fi-in-entry-wrp-label inline-flex items-center gap-x-3']) }}
>
{{ $prefix }}
<span class="text-sm font-medium leading-6 text-gray-950 dark:text-white">
{{ $slot }}
</span>
{{ $suffix }}
</dt>

View File

@@ -0,0 +1,13 @@
<x-filament::fieldset
:label="$getLabel()"
:label-hidden="$isLabelHidden()"
:attributes="
\Filament\Support\prepare_inherited_attributes($attributes)
->merge([
'id' => $getId(),
], escape: false)
->merge($getExtraAttributes(), escape: false)
"
>
{{ $getChildComponentContainer() }}
</x-filament::fieldset>

View File

@@ -0,0 +1,11 @@
<div
{{
$attributes
->merge([
'id' => $getId(),
], escape: false)
->merge($getExtraAttributes(), escape: false)
}}
>
{{ $getChildComponentContainer() }}
</div>

View File

@@ -0,0 +1,11 @@
<div
{{
$attributes
->merge([
'id' => $getId(),
], escape: false)
->merge($getExtraAttributes(), escape: false)
}}
>
{{ $getChildComponentContainer() }}
</div>

View File

@@ -0,0 +1,68 @@
@php
use Filament\Infolists\Components\IconEntry\IconEntrySize;
@endphp
<x-dynamic-component :component="$getEntryWrapperView()" :entry="$entry">
@php
$arrayState = $getState();
if ($arrayState instanceof \Illuminate\Support\Collection) {
$arrayState = $arrayState->all();
}
$arrayState = \Illuminate\Support\Arr::wrap($arrayState);
@endphp
<div
{{
$attributes
->merge($getExtraAttributes(), escape: false)
->class([
'fi-in-icon flex flex-wrap gap-1.5',
])
}}
>
@if (count($arrayState))
@foreach ($arrayState as $state)
@if ($icon = $getIcon($state))
@php
$color = $getColor($state) ?? 'gray';
$size = $getSize($state) ?? IconEntrySize::Large;
@endphp
<x-filament::icon
:icon="$icon"
@class([
'fi-in-icon-item',
match ($size) {
IconEntrySize::ExtraSmall, 'xs' => 'fi-in-icon-item-size-xs h-3 w-3',
IconEntrySize::Small, 'sm' => 'fi-in-icon-item-size-sm h-4 w-4',
IconEntrySize::Medium, 'md' => 'fi-in-icon-item-size-md h-5 w-5',
IconEntrySize::Large, 'lg' => 'fi-in-icon-item-size-lg h-6 w-6',
IconEntrySize::ExtraLarge, 'xl' => 'fi-in-icon-item-size-xl h-7 w-7',
IconEntrySize::TwoExtraLarge, IconEntrySize::ExtraExtraLarge, '2xl' => 'fi-in-icon-item-size-2xl h-8 w-8',
default => $size,
},
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: 'infolists::components.icon-entry.item',
) => $color !== 'gray',
])
/>
@endif
@endforeach
@elseif (($placeholder = $getPlaceholder()) !== null)
<x-filament-infolists::entries.placeholder>
{{ $placeholder }}
</x-filament-infolists::entries.placeholder>
@endif
</div>
</x-dynamic-component>

View File

@@ -0,0 +1,141 @@
<x-dynamic-component :component="$getEntryWrapperView()" :entry="$entry">
@php
$state = $getState();
if ($state instanceof \Illuminate\Support\Collection) {
$state = $state->all();
}
$state = \Illuminate\Support\Arr::wrap($state);
$limit = $getLimit();
$limitedState = array_slice($state, 0, $limit);
$isCircular = $isCircular();
$isSquare = $isSquare();
$isStacked = $isStacked();
$overlap = $isStacked ? ($getOverlap() ?? 2) : null;
$ring = $isStacked ? ($getRing() ?? 2) : null;
$height = $getHeight() ?? ($isStacked ? '2.5rem' : '8rem');
$width = $getWidth() ?? (($isCircular || $isSquare) ? $height : null);
$stateCount = count($state);
$limitedStateCount = count($limitedState);
$defaultImageUrl = $getDefaultImageUrl();
if ((! $limitedStateCount) && filled($defaultImageUrl)) {
$limitedState = [null];
$limitedStateCount = 1;
}
$ringClasses = \Illuminate\Support\Arr::toCssClasses([
'ring-white dark:ring-gray-900',
match ($ring) {
0 => null,
1 => 'ring-1',
2 => 'ring-2',
3 => 'ring',
4 => 'ring-4',
default => $ring,
},
]);
$hasLimitedRemainingText = $hasLimitedRemainingText() && ($limitedStateCount < $stateCount);
$isLimitedRemainingTextSeparate = $isLimitedRemainingTextSeparate();
$limitedRemainingTextSizeClasses = match ($getLimitedRemainingTextSize()) {
'xs' => 'text-xs',
'sm', null => 'text-sm',
'base', 'md' => 'text-base',
'lg' => 'text-lg',
default => $size,
};
@endphp
<div
{{
$attributes
->merge($getExtraAttributes(), escape: false)
->class([
'fi-in-image flex items-center gap-x-2.5',
])
}}
>
@if ($limitedStateCount)
<div
@class([
'flex flex-wrap',
match ($overlap) {
0 => null,
1 => '-space-x-1',
2 => '-space-x-2',
3 => '-space-x-3',
4 => '-space-x-4',
5 => '-space-x-5',
6 => '-space-x-6',
7 => '-space-x-7',
8 => '-space-x-8',
default => 'gap-1.5',
},
])
>
@foreach ($limitedState as $stateItem)
<img
src="{{ filled($stateItem) ? $getImageUrl($stateItem) : $defaultImageUrl }}"
{{
$getExtraImgAttributeBag()
->class([
'max-w-none object-cover object-center',
'rounded-full' => $isCircular,
$ringClasses,
])
->style([
"height: {$height}" => $height,
"width: {$width}" => $width,
])
}}
/>
@endforeach
@if ($hasLimitedRemainingText && (! $isLimitedRemainingTextSeparate) && $isCircular)
<div
style="
@if ($height) height: {{ $height }}; @endif
@if ($width) width: {{ $width }}; @endif
"
@class([
'flex items-center justify-center bg-gray-100 font-medium text-gray-500 dark:bg-gray-800 dark:text-gray-400',
'rounded-full' => $isCircular,
$limitedRemainingTextSizeClasses,
$ringClasses,
])
@style([
"height: {$height}" => $height,
"width: {$width}" => $width,
])
>
<span class="-ms-0.5">
+{{ $stateCount - $limitedStateCount }}
</span>
</div>
@endif
</div>
@if ($hasLimitedRemainingText && ($isLimitedRemainingTextSeparate || (! $isCircular)))
<div
@class([
'font-medium text-gray-500 dark:text-gray-400',
$limitedRemainingTextSizeClasses,
])
>
+{{ $stateCount - $limitedStateCount }}
</div>
@endif
@elseif (($placeholder = $getPlaceholder()) !== null)
<x-filament-infolists::entries.placeholder>
{{ $placeholder }}
</x-filament-infolists::entries.placeholder>
@endif
</div>
</x-dynamic-component>

View File

@@ -0,0 +1,58 @@
<x-dynamic-component :component="$getEntryWrapperView()" :entry="$entry">
<div
{{
$attributes
->merge($getExtraAttributes(), escape: false)
->class(['fi-in-key-value w-full rounded-lg bg-white shadow-sm ring-1 ring-gray-950/5 dark:bg-white/5 dark:ring-white/10'])
}}
>
<table
class="w-full table-auto divide-y divide-gray-200 dark:divide-white/5"
>
<thead>
<tr>
<th
scope="col"
class="px-3 py-2 text-start text-sm font-medium text-gray-700 dark:text-gray-200"
>
{{ $getKeyLabel() }}
</th>
<th
scope="col"
class="px-3 py-2 text-start text-sm font-medium text-gray-700 dark:text-gray-200"
>
{{ $getValueLabel() }}
</th>
</tr>
</thead>
<tbody
class="divide-y divide-gray-200 font-mono text-base dark:divide-white/5 sm:text-sm sm:leading-6"
>
@forelse (($getState() ?? []) as $key => $value)
<tr
class="divide-x divide-gray-200 dark:divide-white/5 rtl:divide-x-reverse"
>
<td class="w-1/2 px-3 py-1.5">
{{ $key }}
</td>
<td class="w-1/2 px-3 py-1.5">
{{ $value }}
</td>
</tr>
@empty
<tr>
<td
colspan="2"
class="px-3 py-2 text-center font-sans text-sm text-gray-400 dark:text-gray-500"
>
{{ $getPlaceholder() }}
</td>
</tr>
@endforelse
</tbody>
</table>
</div>
</x-dynamic-component>

View File

@@ -0,0 +1,7 @@
<div>
@if (filled($key = $getKey()))
@livewire($getComponent(), $getComponentProperties(), key($key))
@else
@livewire($getComponent(), $getComponentProperties())
@endif
</div>

View File

@@ -0,0 +1,48 @@
@php
$isContained = $isContained();
@endphp
<x-dynamic-component :component="$getEntryWrapperView()" :entry="$entry">
<div
{{
$attributes
->merge([
'id' => $getId(),
], escape: false)
->merge($getExtraAttributes(), escape: false)
->class([
'fi-in-repeatable',
'fi-contained' => $isContained,
])
}}
>
@if (count($childComponentContainers = $getChildComponentContainers()))
<ul>
<x-filament::grid
:default="$getGridColumns('default')"
:sm="$getGridColumns('sm')"
:md="$getGridColumns('md')"
:lg="$getGridColumns('lg')"
:xl="$getGridColumns('xl')"
:two-xl="$getGridColumns('2xl')"
class="gap-4"
>
@foreach ($childComponentContainers as $container)
<li
@class([
'fi-in-repeatable-item block',
'rounded-xl bg-white p-4 shadow-sm ring-1 ring-gray-950/5 dark:bg-white/5 dark:ring-white/10' => $isContained,
])
>
{{ $container }}
</li>
@endforeach
</x-filament::grid>
</ul>
@elseif (($placeholder = $getPlaceholder()) !== null)
<x-filament-infolists::entries.placeholder>
{{ $placeholder }}
</x-filament-infolists::entries.placeholder>
@endif
</div>
</x-dynamic-component>

View File

@@ -0,0 +1,30 @@
@php
$isAside = $isAside();
@endphp
<x-filament::section
:aside="$isAside"
:collapsed="$isCollapsed()"
:collapsible="$isCollapsible() && (! $isAside)"
:compact="$isCompact()"
:content-before="$isContentBefore()"
:description="$getDescription()"
:footer-actions="$getFooterActions()"
:footer-actions-alignment="$getFooterActionsAlignment()"
:header-actions="$getHeaderActions()"
:heading="$getHeading()"
:icon="$getIcon()"
:icon-color="$getIconColor()"
:icon-size="$getIconSize()"
:persist-collapsed="$shouldPersistCollapsed()"
:attributes="
\Filament\Support\prepare_inherited_attributes($attributes)
->merge([
'id' => $getId(),
], escape: false)
->merge($getExtraAttributes(), escape: false)
->merge($getExtraAlpineAttributes(), escape: false)
"
>
{{ $getChildComponentContainer() }}
</x-filament::section>

View File

@@ -0,0 +1,63 @@
@php
use Filament\Support\Enums\VerticalAlignment;
$verticalAlignment = $getVerticalAlignment();
if (! $verticalAlignment instanceof VerticalAlignment) {
$verticalAlignment = filled($verticalAlignment) ? (VerticalAlignment::tryFrom($verticalAlignment) ?? $verticalAlignment) : null;
}
@endphp
<div
{{
$attributes
->merge($getExtraAttributes(), escape: false)
->class([
'fi-in-split flex gap-6',
match ($getFromBreakpoint()) {
'sm' => 'flex-col sm:flex-row ' . match ($verticalAlignment) {
VerticalAlignment::Center => 'sm:items-center',
VerticalAlignment::End => 'sm:items-end',
default => 'sm:items-start',
},
'md' => 'flex-col md:flex-row ' . match ($verticalAlignment) {
VerticalAlignment::Center => 'md:items-center',
VerticalAlignment::End => 'md:items-end',
default => 'md:items-start',
},
'lg' => 'flex-col lg:flex-row ' . match ($verticalAlignment) {
VerticalAlignment::Center => 'lg:items-center',
VerticalAlignment::End => 'lg:items-end',
default => 'lg:items-start',
},
'xl' => 'flex-col xl:flex-row ' . match ($verticalAlignment) {
VerticalAlignment::Center => 'xl:items-center',
VerticalAlignment::End => 'xl:items-end',
default => 'xl:items-start',
},
'2xl' => 'flex-col 2xl:flex-row ' . match ($verticalAlignment) {
VerticalAlignment::Center => '2xl:items-center',
VerticalAlignment::End => '2xl:items-end',
default => '2xl:items-start',
},
default => match ($verticalAlignment) {
VerticalAlignment::Center => 'items-center',
VerticalAlignment::End => 'items-end',
default => 'items-start',
},
},
])
}}
>
@foreach ($getChildComponentContainers() as $container)
@foreach ($container->getComponents() as $component)
<div
@class([
'w-full flex-1' => $component->canGrow(),
])
>
{{ $component }}
</div>
@endforeach
@endforeach
</div>

View File

@@ -0,0 +1,105 @@
@php
use Filament\Infolists\Components\Tabs\Tab;
$isContained = $isContained();
@endphp
<div
x-cloak
x-data="{
tab: @if ($isTabPersisted() && filled($persistenceId = $getId())) $persist(null).as('tabs-{{ $persistenceId }}') @else null @endif,
getTabs: function () {
if (! this.$refs.tabsData) {
return []
}
return JSON.parse(this.$refs.tabsData.value)
},
updateQueryString: function () {
if (! @js($isTabPersistedInQueryString())) {
return
}
const url = new URL(window.location.href)
url.searchParams.set(@js($getTabQueryStringKey()), this.tab)
history.pushState(null, document.title, url.toString())
},
}"
x-init="
$watch('tab', () => updateQueryString())
const tabs = getTabs()
if (! tab || ! tabs.includes(tab)) {
tab = tabs[@js($getActiveTab()) - 1]
}
Livewire.hook('commit', ({ component, commit, succeed, fail, respond }) => {
succeed(({ snapshot, effect }) => {
$nextTick(() => {
if (component.id !== @js($this->getId())) {
return
}
const tabs = getTabs()
if (! tabs.includes(tab)) {
tab = tabs[@js($getActiveTab()) - 1]
}
})
})
})
"
{{
$attributes
->merge([
'id' => $getId(),
], escape: false)
->merge($getExtraAttributes(), escape: false)
->merge($getExtraAlpineAttributes(), escape: false)
->class([
'fi-in-tabs flex flex-col',
'fi-contained rounded-xl bg-white shadow-sm ring-1 ring-gray-950/5 dark:bg-gray-900 dark:ring-white/10' => $isContained,
])
}}
>
<input
type="hidden"
value="{{
collect($getChildComponentContainer()->getComponents())
->filter(static fn (Tab $tab): bool => $tab->isVisible())
->map(static fn (Tab $tab) => $tab->getId())
->values()
->toJson()
}}"
x-ref="tabsData"
/>
<x-filament::tabs :contained="$isContained" :label="$getLabel()">
@foreach ($getChildComponentContainer()->getComponents() as $tab)
@php
$tabId = $tab->getId();
@endphp
<x-filament::tabs.item
:alpine-active="'tab === \'' . $tabId . '\''"
:badge="$tab->getBadge()"
:badge-color="$tab->getBadgeColor()"
:badge-icon="$tab->getBadgeIcon()"
:badge-icon-position="$tab->getBadgeIconPosition()"
:icon="$tab->getIcon()"
:icon-position="$tab->getIconPosition()"
:x-on:click="'tab = \'' . $tabId . '\''"
>
{{ $tab->getLabel() }}
</x-filament::tabs.item>
@endforeach
</x-filament::tabs>
@foreach ($getChildComponentContainer()->getComponents() as $tab)
{{ $tab }}
@endforeach
</div>

View File

@@ -0,0 +1,29 @@
@php
$id = $getId();
$isContained = $getContainer()->getParentComponent()->isContained();
$activeTabClasses = \Illuminate\Support\Arr::toCssClasses([
'fi-active',
'p-6' => $isContained,
'mt-6' => ! $isContained,
]);
$inactiveTabClasses = 'invisible absolute h-0 overflow-hidden p-0';
@endphp
<div
x-bind:class="tab === @js($id) ? @js($activeTabClasses) : @js($inactiveTabClasses)"
{{
$attributes
->merge([
'aria-labelledby' => $id,
'id' => $id,
'role' => 'tabpanel',
'tabindex' => '0',
], escape: false)
->merge($getExtraAttributes(), escape: false)
->class(['fi-in-tabs-tab outline-none'])
}}
>
{{ $getChildComponentContainer() }}
</div>

View File

@@ -0,0 +1,310 @@
@php
use Filament\Infolists\Components\TextEntry\TextEntrySize;
use Filament\Support\Enums\Alignment;
use Filament\Support\Enums\FontFamily;
use Filament\Support\Enums\FontWeight;
use Filament\Support\Enums\IconPosition;
@endphp
<x-dynamic-component :component="$getEntryWrapperView()" :entry="$entry">
@php
$alignment = $getAlignment();
$isBadge = $isBadge();
$isBulleted = $isBulleted();
$iconPosition = $getIconPosition();
$isListWithLineBreaks = $isListWithLineBreaks();
$isLimitedListExpandable = $isLimitedListExpandable();
$isProse = $isProse();
$isMarkdown = $isMarkdown();
$url = $getUrl();
if (! $alignment instanceof Alignment) {
$alignment = filled($alignment) ? (Alignment::tryFrom($alignment) ?? $alignment) : null;
}
$arrayState = $getState();
if ($arrayState instanceof \Illuminate\Support\Collection) {
$arrayState = $arrayState->all();
}
$listLimit = 1;
if (is_array($arrayState)) {
if ($listLimit = $getListLimit()) {
$limitedArrayStateCount = (count($arrayState) > $listLimit) ? (count($arrayState) - $listLimit) : 0;
if (! $isListWithLineBreaks) {
$arrayState = array_slice($arrayState, 0, $listLimit);
}
}
$listLimit ??= count($arrayState);
if ((! $isListWithLineBreaks) && (! $isBadge)) {
$arrayState = implode(
', ',
array_map(
fn ($value) => $value instanceof \Filament\Support\Contracts\HasLabel ? $value->getLabel() : $value,
$arrayState,
),
);
}
}
$arrayState = \Illuminate\Support\Arr::wrap($arrayState);
@endphp
<div
{{
$attributes
->merge($getExtraAttributes(), escape: false)
->class(['fi-in-text w-full'])
}}
>
@if ($arrayState)
<x-filament-infolists::affixes
:prefix-actions="$getPrefixActions()"
:suffix-actions="$getSuffixActions()"
>
<{{ $isListWithLineBreaks ? 'ul' : 'div' }}
@class([
'flex' => ! $isBulleted,
'flex-col' => (! $isBulleted) && $isListWithLineBreaks,
'list-inside list-disc' => $isBulleted,
'gap-1.5' => $isBadge,
'flex-wrap' => $isBadge && (! $isListWithLineBreaks),
match ($alignment) {
Alignment::Start => 'text-start',
Alignment::Center => 'text-center',
Alignment::End => 'text-end',
Alignment::Left => 'text-left',
Alignment::Right => 'text-right',
Alignment::Justify, Alignment::Between => 'text-justify',
default => $alignment,
},
match ($alignment) {
Alignment::Start, Alignment::Left => 'justify-start',
Alignment::Center => 'justify-center',
Alignment::End, Alignment::Right => 'justify-end',
Alignment::Between, Alignment::Justify => 'justify-between',
default => null,
} => $isBulleted || (! $isListWithLineBreaks),
match ($alignment) {
Alignment::Start, Alignment::Left => 'items-start',
Alignment::Center => 'items-center',
Alignment::End, Alignment::Right => 'items-end',
Alignment::Between, Alignment::Justify => 'items-stretch',
default => null,
} => $isListWithLineBreaks && (! $isBulleted),
])
@if ($isListWithLineBreaks && $isLimitedListExpandable)
x-data="{ isLimited: true }"
@endif
>
@foreach ($arrayState as $state)
@if (filled($formattedState = $formatState($state)) &&
(! ($isListWithLineBreaks && (! $isLimitedListExpandable) && ($loop->iteration > $listLimit))))
@php
$color = $getColor($state);
$copyableState = $getCopyableState($state) ?? $state;
$copyMessage = $getCopyMessage($state);
$copyMessageDuration = $getCopyMessageDuration($state);
$fontFamily = $getFontFamily($state);
$icon = $getIcon($state);
$iconColor = $getIconColor($state);
$itemIsCopyable = $isCopyable($state);
$lineClamp = $getLineClamp($state);
$size = $getSize($state);
$weight = $getWeight($state);
$proseClasses = \Illuminate\Support\Arr::toCssClasses([
'fi-in-text-item-prose prose max-w-none dark:prose-invert [&>*:first-child]:mt-0 [&>*:last-child]:mb-0',
'pt-2' => ! $isLabelHidden(),
match ($size) {
TextEntrySize::ExtraSmall, 'xs' => 'prose-xs',
TextEntrySize::Small, 'sm', null => 'prose-sm',
TextEntrySize::Medium, 'base', 'md' => 'prose-base',
TextEntrySize::Large, 'lg' => 'prose-lg',
default => $size,
},
]);
$iconClasses = \Illuminate\Support\Arr::toCssClasses([
'fi-in-text-item-icon h-5 w-5 shrink-0',
match ($iconColor) {
'gray', null => 'text-gray-400 dark:text-gray-500',
default => 'text-custom-500',
},
]);
$iconStyles = \Illuminate\Support\Arr::toCssStyles([
\Filament\Support\get_color_css_variables(
$iconColor,
shades: [500],
alias: 'infolists::components.text-entry.item.icon',
) => $iconColor !== 'gray',
]);
@endphp
<{{ $isListWithLineBreaks ? 'li' : 'div' }}
@if ($itemIsCopyable)
x-on:click="
window.navigator.clipboard.writeText(@js($copyableState))
$tooltip(@js($copyMessage), {
theme: $store.theme,
timeout: @js($copyMessageDuration),
})
"
@endif
@if ($isListWithLineBreaks && ($loop->iteration > $listLimit))
x-cloak
x-show="! isLimited"
x-transition
@endif
@class([
'flex' => ! $isBulleted,
'max-w-max' => ! ($isBulleted || $isBadge),
'w-max' => $isBadge,
'cursor-pointer' => $itemIsCopyable,
match ($color) {
null => 'text-gray-950 dark:text-white',
'gray' => 'text-gray-500 dark:text-gray-400',
default => 'text-custom-600 dark:text-custom-400',
} => $isBulleted,
])
@style([
\Filament\Support\get_color_css_variables(
$color,
shades: [400, 600],
alias: 'infolists::components.text-entry.item.container',
) => $isBulleted && (! in_array($color, [null, 'gray'])),
])
>
@if ($isBadge)
<x-filament::badge
:color="$color"
:icon="$icon"
:icon-position="$iconPosition"
>
{{ $formattedState }}
</x-filament::badge>
@else
<div
@class([
'fi-in-text-item inline-flex items-center gap-1.5',
'group/item' => $url,
match ($color) {
null, 'gray' => null,
default => 'fi-color-custom',
},
is_string($color) ? "fi-color-{$color}" : null,
])
>
@if ($icon && in_array($iconPosition, [IconPosition::Before, 'before']))
<x-filament::icon
:icon="$icon"
:class="$iconClasses"
:style="$iconStyles"
/>
@endif
<div
@class([
'group-hover/item:underline group-focus-visible/item:underline' => $url,
$proseClasses => $isProse || $isMarkdown,
'line-clamp-[--line-clamp]' => $lineClamp,
match ($size) {
TextEntrySize::ExtraSmall, 'xs' => 'text-xs',
TextEntrySize::Small, 'sm', null => 'text-sm leading-6',
TextEntrySize::Medium, 'base', 'md' => 'text-base',
TextEntrySize::Large, 'lg' => 'text-lg',
default => $size,
},
match ($color) {
null => 'text-gray-950 dark:text-white',
'gray' => 'text-gray-500 dark:text-gray-400',
default => 'text-custom-600 dark:text-custom-400',
},
match ($weight) {
FontWeight::Thin, 'thin' => 'font-thin',
FontWeight::ExtraLight, 'extralight' => 'font-extralight',
FontWeight::Light, 'light' => 'font-light',
FontWeight::Medium, 'medium' => 'font-medium',
FontWeight::SemiBold, 'semibold' => 'font-semibold',
FontWeight::Bold, 'bold' => 'font-bold',
FontWeight::ExtraBold, 'extrabold' => 'font-extrabold',
FontWeight::Black, 'black' => 'font-black',
default => $weight,
},
match ($fontFamily) {
FontFamily::Sans, 'sans' => 'font-sans',
FontFamily::Serif, 'serif' => 'font-serif',
FontFamily::Mono, 'mono' => 'font-mono',
default => $fontFamily,
},
])
@style([
\Filament\Support\get_color_css_variables(
$color,
shades: [400, 600],
alias: 'infolists::components.text-entry.item.label',
) => ! in_array($color, [null, 'gray']),
"--line-clamp: {$lineClamp}" => $lineClamp,
])
>
{{ $formattedState }}
</div>
@if ($icon && in_array($iconPosition, [IconPosition::After, 'after']))
<x-filament::icon
:icon="$icon"
:class="$iconClasses"
:style="$iconStyles"
/>
@endif
</div>
@endif
</{{ $isListWithLineBreaks ? 'li' : 'div' }}>
@endif
@endforeach
@if ($limitedArrayStateCount ?? 0)
<{{ $isListWithLineBreaks ? 'li' : 'div' }}>
@if ($isLimitedListExpandable)
<x-filament::link
color="gray"
tag="button"
x-on:click.prevent="isLimited = false"
x-show="isLimited"
>
{{ trans_choice('filament-infolists::components.entries.text.actions.expand_list', $limitedArrayStateCount) }}
</x-filament::link>
<x-filament::link
color="gray"
tag="button"
x-cloak
x-on:click.prevent="isLimited = true"
x-show="! isLimited"
>
{{ trans_choice('filament-infolists::components.entries.text.actions.collapse_list', $limitedArrayStateCount) }}
</x-filament::link>
@else
<span
class="text-sm text-gray-500 dark:text-gray-400"
>
{{ trans_choice('filament-infolists::components.entries.text.more_list_items', $limitedArrayStateCount) }}
</span>
@endif
</{{ $isListWithLineBreaks ? 'li' : 'div' }}>
@endif
</{{ $isListWithLineBreaks ? 'ul' : 'div' }}>
</x-filament-infolists::affixes>
@elseif (($placeholder = $getPlaceholder()) !== null)
<x-filament-infolists::entries.placeholder>
{{ $placeholder }}
</x-filament-infolists::entries.placeholder>
@endif
</div>
</x-dynamic-component>