@php use Filament\Support\Enums\Alignment; use Filament\Support\Enums\FontFamily; use Filament\Support\Enums\FontWeight; use Filament\Support\Enums\IconPosition; use Filament\Tables\Columns\TextColumn\TextColumnSize; $alignment = $getAlignment(); $canWrap = $canWrap(); $descriptionAbove = $getDescriptionAbove(); $descriptionBelow = $getDescriptionBelow(); $iconPosition = $getIconPosition(); $isBadge = $isBadge(); $isBulleted = $isBulleted(); $isListWithLineBreaks = $isListWithLineBreaks(); $isLimitedListExpandable = $isLimitedListExpandable(); $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
merge($getExtraAttributes(), escape: false) ->class([ 'fi-ta-text grid w-full gap-y-1', 'px-3 py-4' => ! $isInline(), ]) }} > @if (count($arrayState)) @if (filled($descriptionAbove))

$canWrap, ]) > {{ $descriptionAbove }}

@endif <{{ $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) ?? $color; $itemIsCopyable = $isCopyable($state); $lineClamp = $getLineClamp($state); $size = $getSize($state); $weight = $getWeight($state); $iconClasses = \Illuminate\Support\Arr::toCssClasses([ 'fi-ta-text-item-icon h-5 w-5', 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: 'tables::columns.text-column.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: 'tables::columns.text-column.item.container', ) => $isBulleted && (! in_array($color, [null, 'gray'])), ]) > @if ($isBadge) {{ $formattedState }} @else
$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'])) @endif $url, 'whitespace-normal' => $canWrap, 'line-clamp-[--line-clamp]' => $lineClamp, match ($size) { TextColumnSize::ExtraSmall, 'xs' => 'text-xs', TextColumnSize::Small, 'sm', null => 'text-sm leading-6', TextColumnSize::Medium, 'base', 'md' => 'text-base', TextColumnSize::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: 'tables::columns.text-column.item.label', ) => ! in_array($color, [null, 'gray']), "--line-clamp: {$lineClamp}" => $lineClamp, ]) > {{ $formattedState }} @if ($icon && in_array($iconPosition, [IconPosition::After, 'after'])) @endif
@endif @endif @endforeach @if ($limitedArrayStateCount ?? 0) <{{ $isListWithLineBreaks ? 'li' : 'div' }}> @if ($isLimitedListExpandable) {{ trans_choice('filament-tables::table.columns.text.actions.expand_list', $limitedArrayStateCount) }} {{ trans_choice('filament-tables::table.columns.text.actions.collapse_list', $limitedArrayStateCount) }} @else {{ trans_choice('filament-tables::table.columns.text.more_list_items', $limitedArrayStateCount) }} @endif @endif @if (filled($descriptionBelow))

$canWrap, ]) > {{ $descriptionBelow }}

@endif @elseif (($placeholder = $getPlaceholder()) !== null) {{ $placeholder }} @endif