1+ @php use Illuminate\Database\Eloquent\ Model ; @endphp
2+ @php use Filament\Facades\ Filament ; @endphp
3+ @php use SolutionForest\FilamentTree\Components\ Tree ; @endphp
14@props ([
2- ' record' ,
3- ' containerKey' ,
5+ ' record' ,
6+ ' containerKey' ,
47 ' tree' ,
58 ' title' => null ,
69 ' icon' => null ,
710] )
811@php
9- /** @var $record \Illuminate\Database\Eloquent\ Model */
12+ /** @var $record Model */
1013 /** @var $containerKey string */
11- /** @var $tree \SolutionForest\FilamentTree\Components\ Tree */
14+ /** @var $tree Tree */
1215
1316 $recordKey = $tree -> getRecordKey ($record );
1417 $parentKey = $tree -> getParentKey ($record );
2023@endphp
2124
2225<li class =" filament-tree-row dd-item" data-id =" {{ $recordKey } }" >
23- <div wire:loading.remove.delay
24- wire:target =" {{ implode (' ,' , \ SolutionForest \ FilamentTree \ Components \ Tree:: LOADING_TARGETS ) } }"
26+ <div wire:loading.remove.delay
27+ wire:target =" {{ implode (' ,' , Tree:: LOADING_TARGETS ) } }"
2528 @class ([
26- ' bg-white rounded-lg border border-gray-300 dd-handle' ,
29+ ' bg-white rounded-lg border border-gray-300 dark:border-white/10 dd-handle h-10 ' ,
2730 ' mb-2' ,
2831 ' flex w-full items-center ' ,
29- ' dark:bg-gray-900' => \ Filament \ Facades \ Filament:: hasDarkMode (),
32+ ' dark:bg-gray-900' => Filament:: hasDarkMode (),
3033 ] )>
3134
32- <button type =" button" class =" h-full flex items-center bg-gray-50 rounded-lg border-r border-gray-300 px-px" >
33- <x-heroicon-o -ellipsis-vertical class =" text-gray-400 w-4 h-4 -mr-2" />
34- <x-heroicon-o -ellipsis-vertical class =" text-gray-400 w-4 h-4" />
35+ <button type =" button" class =" h-full flex items-center bg-gray-50 dark:bg-black/30 rounded-l- lg border-r border-gray-300 dark:border-white/10 px-px" >
36+ <x-heroicon-m -ellipsis-vertical class =" text-gray-400 dark:text-gray-500 w-4 h-4 -mr-2" />
37+ <x-heroicon-m -ellipsis-vertical class =" text-gray-400 dark:text-gray-500 w-4 h-4" />
3538 </button >
3639
37- <div class =" dd-content dd-nodrag ml-2 flex gap-1" >
38- < div class = " w-4 " >
39- @if ( $icon )
40- <x-dynamic-component :component =" $icon" class =" w-4 h-4" />
41- @endif
42- </ div >
40+ <div class =" dd-content dd-nodrag flex gap-1" >
41+ @if ( $icon )
42+ < div class = " w-4 " >
43+ <x-dynamic-component :component =" $icon" class =" w-4 h-4" />
44+ </ div >
45+ @endif
4346
44- <span >
47+ <span @class ([
48+ ' ml-4' => ! $icon ,
49+ ' font-semibold'
50+ ] )>
4551 {{ $title } }
4652 </span >
4753
4854 <div @class ([
4955 ' dd-item-btns' ,
5056 ' hidden' => ! count ($children ),
57+ ' flex items-center justify-center pl-3'
5158 ] )>
5259 <button data-action =" expand" @class ([' hidden' => ! $collapsed ] )>
53- <x-heroicon-o -chevron-down class =" text-gray-400 w-4 h-4 " />
60+ <x-heroicon-m -chevron-down class =" text-gray-400 dark:text-gray-400 w-5 h-5 " />
5461 </button >
5562 <button data-action =" collapse" @class ([' hidden' => $collapsed ] )>
56- <x-heroicon-o -chevron-up class =" text-gray-400 w-4 h-4 " />
63+ <x-heroicon-m -chevron-up class =" text-gray-400 dark:text-gray-400 w-5 h-5 " />
5764 </button >
5865 </div >
5966 </div >
6067
6168 @if (count ($actions ) )
6269 <div class =" dd-nodrag ml-auto px-2" >
63- <x-filament-tree::actions :actions =" $actions" :record =" $record" />
70+ <x-filament-tree::actions :actions =" $actions" :record =" $record" />
6471 </div >
6572 @endif
6673 </div >
6774 @if (count ($children ) )
6875 <x-filament-tree::tree .list :records =" $children" :containerKey =" $containerKey" :tree =" $tree" :collapsed =" $collapsed" />
6976 @endif
70- <div class =" rounded-lg border border-gray-300 mb-2 w-full px-4 py-4 animate-pulse hidden"
71- wire:loading.class.remove.delay =" hidden"
72- wire:target =" {{ implode (' ,' , \ SolutionForest \ FilamentTree \ Components \ Tree:: LOADING_TARGETS ) } }" >
77+ <div class =" rounded-lg border border-gray-300 mb-2 w-full px-4 py-4 animate-pulse hidden"
78+ wire:loading.class.remove.delay =" hidden"
79+ wire:target =" {{ implode (' ,' , Tree:: LOADING_TARGETS ) } }" >
7380 <div class =" h-4 bg-gray-300 rounded-md" ></div >
7481 </div >
75- </li >
82+ </li >
0 commit comments