@@ -9,13 +9,13 @@ trait HasBulkActionsStyling
99{
1010    protected  array  $ bulkActionsCheckboxAttributes
1111
12-     protected  array  $ bulkActionsThAttributes'default '  => true ];
12+     protected  array  $ bulkActionsThAttributes'default '  => null ,  ' default-colors '  =>  null ,  ' default-styling '  =>  null ];
1313
14-     protected  array  $ bulkActionsThCheckboxAttributes'default '  => true ];
14+     protected  array  $ bulkActionsThCheckboxAttributes'default '  => null ,  ' default-colors '  =>  null ,  ' default-styling '  =>  null ];
1515
16-     protected  array  $ bulkActionsTdAttributes'default '  => true ];
16+     protected  array  $ bulkActionsTdAttributes'default '  => null ,  ' default-colors '  =>  null ,  ' default-styling '  =>  null ];
1717
18-     protected  array  $ bulkActionsTdCheckboxAttributes'default '  => true ];
18+     protected  array  $ bulkActionsTdCheckboxAttributes'default '  => null ,  ' default-colors '  =>  null ,  ' default-styling '  =>  null ];
1919
2020    protected  array  $ bulkActionsButtonAttributes'default-colors '  => true , 'default-styling '  => true ];
2121
@@ -69,7 +69,7 @@ public function getBulkActionsMenuItemAttributes(): array
6969    #[Computed]
7070    public  function  getBulkActionsThAttributes (): array 
7171    {
72-         return  $ this getCustomAttributes ('bulkActionsThAttributes ' );
72+         return  $ this getCustomAttributesNew ('bulkActionsThAttributes ' ,  true ,  true );
7373
7474    }
7575
@@ -79,7 +79,7 @@ public function getBulkActionsThAttributes(): array
7979    #[Computed]
8080    public  function  hasBulkActionsThAttributes (): bool 
8181    {
82-         return  $ this getBulkActionsThAttributes () != ['default '  => true , 'default-colors '  => false , 'default-styling '  => false ];
82+         return  $ this getBulkActionsThAttributes () != ['default '  => true , 'default-colors '  => true , 'default-styling '  => true ];
8383    }
8484
8585    /** 
@@ -89,28 +89,38 @@ public function hasBulkActionsThAttributes(): bool
8989     */ 
9090    public  function  getBulkActionsThCheckboxAttributes (): array 
9191    {
92-         return  $ this getCustomAttributes ('bulkActionsThCheckboxAttributes ' );
92+         return  $ this getCustomAttributesNew ('bulkActionsThCheckboxAttributes ' , true , true );
93+ 
9394    }
9495
9596    /** 
9697     * Used to get attributes for the Bulk Actions TD 
9798     * 
9899     * @return array<mixed> 
99100     */ 
101+     #[Computed]
100102    public  function  getBulkActionsTdAttributes (): array 
101103    {
102-         return  $ this getCustomAttributes ('bulkActionsTdAttributes ' );
104+         return  $ this getCustomAttributesNew ('bulkActionsTdAttributes ' ,  true ,  true );
103105    }
104106
105107    /** 
106108     * Used to get attributes for the Bulk Actions TD 
107109     * 
108110     * @return array<mixed> 
109111     */ 
112+     #[Computed]
110113    public  function  getBulkActionsTdCheckboxAttributes (): array 
111114    {
112-         return  $ this getCustomAttributes ('bulkActionsTdCheckboxAttributes ' );
113- 
115+         return  array_merge (
116+             [
117+                 'x-show '  => '!currentlyReorderingStatus ' ,
118+                 'x-model '  => 'selectedItems ' ,
119+                 'wire:loading.attr.delay '  => 'disabled ' ,
120+                 'type '  => 'checkbox ' ,
121+             ],
122+             $ this getCustomAttributesNew ('bulkActionsTdCheckboxAttributes ' , true , true )
123+         );
114124    }
115125
116126    /** 
@@ -136,78 +146,63 @@ public function getBulkActionsRowButtonAttributesBag(): ComponentAttributeBag
136146     */ 
137147    public  function  setBulkActionsButtonAttributes (array  $ bulkActionsButtonAttributesself 
138148    {
139-         $ this setCustomAttributes ('bulkActionsButtonAttributes ' , $ bulkActionsButtonAttributes
140- 
141-         return  $ this 
149+         return  $ this setCustomAttributes ('bulkActionsButtonAttributes ' , $ bulkActionsButtonAttributes
142150    }
143151
144152    /** 
145153     * Used to set attributes for the Bulk Actions Menu 
146154     */ 
147155    public  function  setBulkActionsMenuAttributes (array  $ bulkActionsMenuAttributesself 
148156    {
149-         $ this setCustomAttributes ('bulkActionsMenuAttributes ' , $ bulkActionsMenuAttributes
150- 
151-         return  $ this 
157+         return  $ this setCustomAttributes ('bulkActionsMenuAttributes ' , $ bulkActionsMenuAttributes
152158    }
153159
154160    /** 
155161     * Used to set attributes for the Bulk Actions Menu Items 
156162     */ 
157163    public  function  setBulkActionsMenuItemAttributes (array  $ bulkActionsMenuItemAttributesself 
158164    {
159-         $ this setCustomAttributes ('bulkActionsMenuItemAttributes ' , $ bulkActionsMenuItemAttributes
160- 
161-         return  $ this 
165+         return  $ this setCustomAttributes ('bulkActionsMenuItemAttributes ' , $ bulkActionsMenuItemAttributes
162166    }
163167
164168    /** 
165169     * Used to set attributes for the Bulk Actions TD in the Row 
166170     */ 
167171    public  function  setBulkActionsTdAttributes (array  $ bulkActionsTdAttributesself 
168172    {
169-         $ this setCustomAttributes ('bulkActionsTdAttributes ' , $ bulkActionsTdAttributes
173+         return   $ this setCustomAttributesDefaults ('bulkActionsTdAttributes ' , $ bulkActionsTdAttributes
170174
171-         return  $ this 
172175    }
173176
174177    /** 
175178     * Used to set attributes for the Bulk Actions Checkbox in the Row 
176179     */ 
177180    public  function  setBulkActionsTdCheckboxAttributes (array  $ bulkActionsTdCheckboxAttributesself 
178181    {
179-         $ this setCustomAttributes ('bulkActionsTdCheckboxAttributes ' , $ bulkActionsTdCheckboxAttributes
180- 
181-         return  $ this 
182+         return  $ this setCustomAttributesDefaults ('bulkActionsTdCheckboxAttributes ' , $ bulkActionsTdCheckboxAttributes
182183    }
183184
184185    /** 
185186     * Used to set attributes for the <th> for Bulk Actions 
186187     */ 
187188    public  function  setBulkActionsThAttributes (array  $ bulkActionsThAttributesself 
188189    {
189-         $ this setCustomAttributes ('bulkActionsThAttributes ' , $ bulkActionsThAttributes
190- 
191-         return  $ this 
190+         return  $ this setCustomAttributesDefaults ('bulkActionsThAttributes ' , $ bulkActionsThAttributes
192191    }
193192
194193    /** 
195194     * Used to set attributes for the Bulk Actions Checkbox in the <th> 
196195     */ 
197196    public  function  setBulkActionsThCheckboxAttributes (array  $ bulkActionsThCheckboxAttributesself 
198197    {
199-         $ this setCustomAttributes ('bulkActionsThCheckboxAttributes ' , $ bulkActionsThCheckboxAttributes
200- 
201-         return  $ this 
198+         return  $ this setCustomAttributesDefaults ('bulkActionsThCheckboxAttributes ' , $ bulkActionsThCheckboxAttributes
202199    }
203200
204201    /** 
205202     * Used to set attributes for the Bulk Actions Row Buttons 
206203     */ 
207204    public  function  setBulkActionsRowButtonAttributes (array  $ bulkActionsRowButtonAttributesself 
208205    {
209-         $ this setCustomAttributes ('bulkActionsRowButtonAttributes ' , $ bulkActionsRowButtonAttributes
210- 
211-         return  $ this 
206+         return  $ this setCustomAttributes ('bulkActionsRowButtonAttributes ' , $ bulkActionsRowButtonAttributes
212207    }
213208}
0 commit comments