@proyecto-viviana/solidaria-components 0.3.2 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (417) hide show
  1. package/dist/ActionBar.d.ts.map +1 -1
  2. package/dist/ActionBar.js +175 -0
  3. package/dist/ActionBar.js.map +1 -0
  4. package/dist/ActionBar.jsx +119 -0
  5. package/dist/ActionBar.jsx.map +1 -0
  6. package/dist/ActionGroup.d.ts.map +1 -1
  7. package/dist/ActionGroup.js +179 -0
  8. package/dist/ActionGroup.js.map +1 -0
  9. package/dist/ActionGroup.jsx +129 -0
  10. package/dist/ActionGroup.jsx.map +1 -0
  11. package/dist/Alert.js +111 -0
  12. package/dist/Alert.js.map +1 -0
  13. package/dist/Alert.jsx +82 -0
  14. package/dist/Alert.jsx.map +1 -0
  15. package/dist/Autocomplete.d.ts +2 -2
  16. package/dist/Autocomplete.d.ts.map +1 -1
  17. package/dist/Autocomplete.js +130 -0
  18. package/dist/Autocomplete.js.map +1 -0
  19. package/dist/Autocomplete.jsx +116 -0
  20. package/dist/Autocomplete.jsx.map +1 -0
  21. package/dist/Breadcrumbs.d.ts.map +1 -1
  22. package/dist/Breadcrumbs.js +333 -0
  23. package/dist/Breadcrumbs.js.map +1 -0
  24. package/dist/Breadcrumbs.jsx +261 -0
  25. package/dist/Breadcrumbs.jsx.map +1 -0
  26. package/dist/Button.d.ts.map +1 -1
  27. package/dist/Button.js +348 -0
  28. package/dist/Button.js.map +1 -0
  29. package/dist/Button.jsx +314 -0
  30. package/dist/Button.jsx.map +1 -0
  31. package/dist/Calendar.d.ts +4 -4
  32. package/dist/Calendar.d.ts.map +1 -1
  33. package/dist/Calendar.js +573 -0
  34. package/dist/Calendar.js.map +1 -0
  35. package/dist/Calendar.jsx +342 -0
  36. package/dist/Calendar.jsx.map +1 -0
  37. package/dist/CalendarPicker.d.ts +33 -0
  38. package/dist/CalendarPicker.d.ts.map +1 -0
  39. package/dist/CalendarPicker.js +44 -0
  40. package/dist/CalendarPicker.js.map +1 -0
  41. package/dist/CalendarPicker.jsx +44 -0
  42. package/dist/CalendarPicker.jsx.map +1 -0
  43. package/dist/Checkbox.d.ts +83 -4
  44. package/dist/Checkbox.d.ts.map +1 -1
  45. package/dist/Checkbox.js +923 -0
  46. package/dist/Checkbox.js.map +1 -0
  47. package/dist/Checkbox.jsx +707 -0
  48. package/dist/Checkbox.jsx.map +1 -0
  49. package/dist/Collection.d.ts.map +1 -1
  50. package/dist/Collection.js +202 -0
  51. package/dist/Collection.js.map +1 -0
  52. package/dist/Collection.jsx +152 -0
  53. package/dist/Collection.jsx.map +1 -0
  54. package/dist/Color.d.ts.map +1 -1
  55. package/dist/Color.js +1717 -0
  56. package/dist/Color.js.map +1 -0
  57. package/dist/Color.jsx +1340 -0
  58. package/dist/Color.jsx.map +1 -0
  59. package/dist/ColorEditor.js +208 -0
  60. package/dist/ColorEditor.js.map +1 -0
  61. package/dist/ColorEditor.jsx +120 -0
  62. package/dist/ColorEditor.jsx.map +1 -0
  63. package/dist/ComboBox.d.ts +8 -4
  64. package/dist/ComboBox.d.ts.map +1 -1
  65. package/dist/ComboBox.js +1000 -0
  66. package/dist/ComboBox.js.map +1 -0
  67. package/dist/ComboBox.jsx +724 -0
  68. package/dist/ComboBox.jsx.map +1 -0
  69. package/dist/ContextualHelpTrigger.js +146 -0
  70. package/dist/ContextualHelpTrigger.js.map +1 -0
  71. package/dist/ContextualHelpTrigger.jsx +109 -0
  72. package/dist/ContextualHelpTrigger.jsx.map +1 -0
  73. package/dist/DateField.d.ts +14 -5
  74. package/dist/DateField.d.ts.map +1 -1
  75. package/dist/DateField.js +4 -0
  76. package/dist/DateField.jsx +4 -0
  77. package/dist/DateField2.js +502 -0
  78. package/dist/DateField2.js.map +1 -0
  79. package/dist/DateField2.jsx +354 -0
  80. package/dist/DateField2.jsx.map +1 -0
  81. package/dist/DatePicker.d.ts +46 -7
  82. package/dist/DatePicker.d.ts.map +1 -1
  83. package/dist/DatePicker.js +7 -0
  84. package/dist/DatePicker.jsx +7 -0
  85. package/dist/DatePicker2.js +1171 -0
  86. package/dist/DatePicker2.js.map +1 -0
  87. package/dist/DatePicker2.jsx +820 -0
  88. package/dist/DatePicker2.jsx.map +1 -0
  89. package/dist/DateRangePickerContext.d.ts +2 -0
  90. package/dist/DateRangePickerContext.d.ts.map +1 -1
  91. package/dist/Dialog.d.ts.map +1 -1
  92. package/dist/Dialog.js +337 -0
  93. package/dist/Dialog.js.map +1 -0
  94. package/dist/Dialog.jsx +192 -0
  95. package/dist/Dialog.jsx.map +1 -0
  96. package/dist/Disclosure.d.ts.map +1 -1
  97. package/dist/Disclosure.js +331 -0
  98. package/dist/Disclosure.js.map +1 -0
  99. package/dist/Disclosure.jsx +230 -0
  100. package/dist/Disclosure.jsx.map +1 -0
  101. package/dist/DragAndDrop.d.ts.map +1 -1
  102. package/dist/DragAndDrop.js +176 -0
  103. package/dist/DragAndDrop.js.map +1 -0
  104. package/dist/DragAndDrop.jsx +160 -0
  105. package/dist/DragAndDrop.jsx.map +1 -0
  106. package/dist/DropZone.d.ts.map +1 -1
  107. package/dist/DropZone.js +189 -0
  108. package/dist/DropZone.js.map +1 -0
  109. package/dist/DropZone.jsx +144 -0
  110. package/dist/DropZone.jsx.map +1 -0
  111. package/dist/FieldError.js +66 -0
  112. package/dist/FieldError.js.map +1 -0
  113. package/dist/FieldError.jsx +47 -0
  114. package/dist/FieldError.jsx.map +1 -0
  115. package/dist/FileTrigger.js +79 -0
  116. package/dist/FileTrigger.js.map +1 -0
  117. package/dist/FileTrigger.jsx +49 -0
  118. package/dist/FileTrigger.jsx.map +1 -0
  119. package/dist/Focusable.js +70 -0
  120. package/dist/Focusable.js.map +1 -0
  121. package/dist/Focusable.jsx +69 -0
  122. package/dist/Focusable.jsx.map +1 -0
  123. package/dist/Form.js +99 -0
  124. package/dist/Form.js.map +1 -0
  125. package/dist/Form.jsx +73 -0
  126. package/dist/Form.jsx.map +1 -0
  127. package/dist/GridList.d.ts +34 -2
  128. package/dist/GridList.d.ts.map +1 -1
  129. package/dist/GridList.js +723 -0
  130. package/dist/GridList.js.map +1 -0
  131. package/dist/GridList.jsx +552 -0
  132. package/dist/GridList.jsx.map +1 -0
  133. package/dist/Icon.d.ts.map +1 -1
  134. package/dist/Icon.js +127 -0
  135. package/dist/Icon.js.map +1 -0
  136. package/dist/Icon.jsx +72 -0
  137. package/dist/Icon.jsx.map +1 -0
  138. package/dist/Keyboard.js +30 -0
  139. package/dist/Keyboard.js.map +1 -0
  140. package/dist/Keyboard.jsx +24 -0
  141. package/dist/Keyboard.jsx.map +1 -0
  142. package/dist/Landmark.js +134 -0
  143. package/dist/Landmark.js.map +1 -0
  144. package/dist/Landmark.jsx +118 -0
  145. package/dist/Landmark.jsx.map +1 -0
  146. package/dist/Link.d.ts.map +1 -1
  147. package/dist/Link.js +219 -0
  148. package/dist/Link.js.map +1 -0
  149. package/dist/Link.jsx +189 -0
  150. package/dist/Link.jsx.map +1 -0
  151. package/dist/ListBox.d.ts +2 -2
  152. package/dist/ListBox.d.ts.map +1 -1
  153. package/dist/ListBox.js +831 -0
  154. package/dist/ListBox.js.map +1 -0
  155. package/dist/ListBox.jsx +644 -0
  156. package/dist/ListBox.jsx.map +1 -0
  157. package/dist/Menu.d.ts +27 -9
  158. package/dist/Menu.d.ts.map +1 -1
  159. package/dist/Menu.js +1254 -0
  160. package/dist/Menu.js.map +1 -0
  161. package/dist/Menu.jsx +1042 -0
  162. package/dist/Menu.jsx.map +1 -0
  163. package/dist/Meter.d.ts.map +1 -1
  164. package/dist/Meter.js +123 -0
  165. package/dist/Meter.js.map +1 -0
  166. package/dist/Meter.jsx +107 -0
  167. package/dist/Meter.jsx.map +1 -0
  168. package/dist/Modal.d.ts.map +1 -1
  169. package/dist/Modal.js +382 -0
  170. package/dist/Modal.js.map +1 -0
  171. package/dist/Modal.jsx +314 -0
  172. package/dist/Modal.jsx.map +1 -0
  173. package/dist/NumberField.d.ts +3 -3
  174. package/dist/NumberField.d.ts.map +1 -1
  175. package/dist/NumberField.js +573 -0
  176. package/dist/NumberField.js.map +1 -0
  177. package/dist/NumberField.jsx +443 -0
  178. package/dist/NumberField.jsx.map +1 -0
  179. package/dist/Popover.d.ts +10 -2
  180. package/dist/Popover.d.ts.map +1 -1
  181. package/dist/Popover.js +471 -0
  182. package/dist/Popover.js.map +1 -0
  183. package/dist/Popover.jsx +354 -0
  184. package/dist/Popover.jsx.map +1 -0
  185. package/dist/Pressable.js +69 -0
  186. package/dist/Pressable.js.map +1 -0
  187. package/dist/Pressable.jsx +68 -0
  188. package/dist/Pressable.jsx.map +1 -0
  189. package/dist/ProgressBar.d.ts.map +1 -1
  190. package/dist/ProgressBar.js +130 -0
  191. package/dist/ProgressBar.js.map +1 -0
  192. package/dist/ProgressBar.jsx +114 -0
  193. package/dist/ProgressBar.jsx.map +1 -0
  194. package/dist/RadioGroup.d.ts +82 -4
  195. package/dist/RadioGroup.d.ts.map +1 -1
  196. package/dist/RadioGroup.js +931 -0
  197. package/dist/RadioGroup.js.map +1 -0
  198. package/dist/RadioGroup.jsx +681 -0
  199. package/dist/RadioGroup.jsx.map +1 -0
  200. package/dist/RangeCalendar.d.ts.map +1 -1
  201. package/dist/RangeCalendar.js +546 -0
  202. package/dist/RangeCalendar.js.map +1 -0
  203. package/dist/RangeCalendar.jsx +323 -0
  204. package/dist/RangeCalendar.jsx.map +1 -0
  205. package/dist/RouterProvider.js +118 -0
  206. package/dist/RouterProvider.js.map +1 -0
  207. package/dist/RouterProvider.jsx +112 -0
  208. package/dist/RouterProvider.jsx.map +1 -0
  209. package/dist/SearchField.d.ts +2 -2
  210. package/dist/SearchField.d.ts.map +1 -1
  211. package/dist/SearchField.js +667 -0
  212. package/dist/SearchField.js.map +1 -0
  213. package/dist/SearchField.jsx +550 -0
  214. package/dist/SearchField.jsx.map +1 -0
  215. package/dist/Select.d.ts +7 -0
  216. package/dist/Select.d.ts.map +1 -1
  217. package/dist/Select.js +1044 -0
  218. package/dist/Select.js.map +1 -0
  219. package/dist/Select.jsx +759 -0
  220. package/dist/Select.jsx.map +1 -0
  221. package/dist/SelectionIndicator.d.ts.map +1 -1
  222. package/dist/SelectionIndicator.js +86 -0
  223. package/dist/SelectionIndicator.js.map +1 -0
  224. package/dist/SelectionIndicator.jsx +50 -0
  225. package/dist/SelectionIndicator.jsx.map +1 -0
  226. package/dist/Separator.js +97 -0
  227. package/dist/Separator.js.map +1 -0
  228. package/dist/Separator.jsx +85 -0
  229. package/dist/Separator.jsx.map +1 -0
  230. package/dist/SharedElementTransition.d.ts.map +1 -1
  231. package/dist/SharedElementTransition.js +167 -0
  232. package/dist/SharedElementTransition.js.map +1 -0
  233. package/dist/SharedElementTransition.jsx +140 -0
  234. package/dist/SharedElementTransition.jsx.map +1 -0
  235. package/dist/Slider.d.ts +33 -1
  236. package/dist/Slider.d.ts.map +1 -1
  237. package/dist/Slider.js +515 -0
  238. package/dist/Slider.js.map +1 -0
  239. package/dist/Slider.jsx +403 -0
  240. package/dist/Slider.jsx.map +1 -0
  241. package/dist/StepList.d.ts.map +1 -1
  242. package/dist/StepList.js +191 -0
  243. package/dist/StepList.js.map +1 -0
  244. package/dist/StepList.jsx +136 -0
  245. package/dist/StepList.jsx.map +1 -0
  246. package/dist/Switch.d.ts +65 -2
  247. package/dist/Switch.d.ts.map +1 -1
  248. package/dist/Switch.js +534 -0
  249. package/dist/Switch.js.map +1 -0
  250. package/dist/Switch.jsx +393 -0
  251. package/dist/Switch.jsx.map +1 -0
  252. package/dist/Table.d.ts +50 -0
  253. package/dist/Table.d.ts.map +1 -1
  254. package/dist/Table.js +1766 -0
  255. package/dist/Table.js.map +1 -0
  256. package/dist/Table.jsx +1355 -0
  257. package/dist/Table.jsx.map +1 -0
  258. package/dist/Tabs.d.ts +0 -4
  259. package/dist/Tabs.d.ts.map +1 -1
  260. package/dist/Tabs.js +598 -0
  261. package/dist/Tabs.js.map +1 -0
  262. package/dist/Tabs.jsx +367 -0
  263. package/dist/Tabs.jsx.map +1 -0
  264. package/dist/TagGroup.d.ts +3 -1
  265. package/dist/TagGroup.d.ts.map +1 -1
  266. package/dist/TagGroup.js +382 -0
  267. package/dist/TagGroup.js.map +1 -0
  268. package/dist/TagGroup.jsx +273 -0
  269. package/dist/TagGroup.jsx.map +1 -0
  270. package/dist/Text.d.ts +18 -6
  271. package/dist/Text.d.ts.map +1 -1
  272. package/dist/Text.js +42 -0
  273. package/dist/Text.js.map +1 -0
  274. package/dist/Text.jsx +35 -0
  275. package/dist/Text.jsx.map +1 -0
  276. package/dist/TextField.d.ts +6 -6
  277. package/dist/TextField.d.ts.map +1 -1
  278. package/dist/TextField.js +439 -0
  279. package/dist/TextField.js.map +1 -0
  280. package/dist/TextField.jsx +406 -0
  281. package/dist/TextField.jsx.map +1 -0
  282. package/dist/TimeField.d.ts +17 -53
  283. package/dist/TimeField.d.ts.map +1 -1
  284. package/dist/TimeField.js +278 -0
  285. package/dist/TimeField.js.map +1 -0
  286. package/dist/TimeField.jsx +218 -0
  287. package/dist/TimeField.jsx.map +1 -0
  288. package/dist/Toast.d.ts +14 -0
  289. package/dist/Toast.d.ts.map +1 -1
  290. package/dist/Toast.js +551 -0
  291. package/dist/Toast.js.map +1 -0
  292. package/dist/Toast.jsx +361 -0
  293. package/dist/Toast.jsx.map +1 -0
  294. package/dist/ToggleButton.d.ts.map +1 -1
  295. package/dist/ToggleButton.js +123 -0
  296. package/dist/ToggleButton.js.map +1 -0
  297. package/dist/ToggleButton.jsx +88 -0
  298. package/dist/ToggleButton.jsx.map +1 -0
  299. package/dist/ToggleButtonGroup.d.ts.map +1 -1
  300. package/dist/ToggleButtonGroup.js +114 -0
  301. package/dist/ToggleButtonGroup.js.map +1 -0
  302. package/dist/ToggleButtonGroup.jsx +85 -0
  303. package/dist/ToggleButtonGroup.jsx.map +1 -0
  304. package/dist/Toolbar.js +112 -0
  305. package/dist/Toolbar.js.map +1 -0
  306. package/dist/Toolbar.jsx +92 -0
  307. package/dist/Toolbar.jsx.map +1 -0
  308. package/dist/Tooltip.d.ts.map +1 -1
  309. package/dist/Tooltip.js +539 -0
  310. package/dist/Tooltip.js.map +1 -0
  311. package/dist/Tooltip.jsx +465 -0
  312. package/dist/Tooltip.jsx.map +1 -0
  313. package/dist/Tree.d.ts +14 -2
  314. package/dist/Tree.d.ts.map +1 -1
  315. package/dist/Tree.js +1424 -0
  316. package/dist/Tree.js.map +1 -0
  317. package/dist/Tree.jsx +1172 -0
  318. package/dist/Tree.jsx.map +1 -0
  319. package/dist/Virtualizer.d.ts +16 -2
  320. package/dist/Virtualizer.d.ts.map +1 -1
  321. package/dist/Virtualizer.js +2 -0
  322. package/dist/Virtualizer.jsx +2 -0
  323. package/dist/Virtualizer2.js +751 -0
  324. package/dist/Virtualizer2.js.map +1 -0
  325. package/dist/Virtualizer2.jsx +730 -0
  326. package/dist/Virtualizer2.jsx.map +1 -0
  327. package/dist/VirtualizerLayouts.d.ts +18 -0
  328. package/dist/VirtualizerLayouts.d.ts.map +1 -1
  329. package/dist/VisuallyHidden.js +42 -0
  330. package/dist/VisuallyHidden.js.map +1 -0
  331. package/dist/VisuallyHidden.jsx +35 -0
  332. package/dist/VisuallyHidden.jsx.map +1 -0
  333. package/dist/contexts.js +33 -0
  334. package/dist/contexts.js.map +1 -0
  335. package/dist/contexts.jsx +33 -0
  336. package/dist/contexts.jsx.map +1 -0
  337. package/dist/index.d.ts +9 -9
  338. package/dist/index.d.ts.map +1 -1
  339. package/dist/index.js +69 -23932
  340. package/dist/index.jsx +69 -18337
  341. package/dist/useDragAndDrop.d.ts +0 -8
  342. package/dist/useDragAndDrop.d.ts.map +1 -1
  343. package/dist/useDragAndDrop.js +2 -0
  344. package/dist/useDragAndDrop.jsx +2 -0
  345. package/dist/useDragAndDrop2.js +399 -0
  346. package/dist/useDragAndDrop2.js.map +1 -0
  347. package/dist/useDragAndDrop2.jsx +399 -0
  348. package/dist/useDragAndDrop2.jsx.map +1 -0
  349. package/dist/utils.d.ts +84 -11
  350. package/dist/utils.d.ts.map +1 -1
  351. package/dist/utils.js +285 -0
  352. package/dist/utils.js.map +1 -0
  353. package/dist/utils.jsx +277 -0
  354. package/dist/utils.jsx.map +1 -0
  355. package/dist/virtualizer/Layout.js +144 -0
  356. package/dist/virtualizer/Layout.js.map +1 -0
  357. package/dist/virtualizer/Layout.jsx +144 -0
  358. package/dist/virtualizer/Layout.jsx.map +1 -0
  359. package/package.json +395 -4
  360. package/src/ActionBar.tsx +10 -12
  361. package/src/ActionGroup.tsx +5 -3
  362. package/src/Autocomplete.tsx +14 -9
  363. package/src/Breadcrumbs.tsx +58 -39
  364. package/src/Button.tsx +22 -2
  365. package/src/Calendar.tsx +57 -11
  366. package/src/CalendarPicker.tsx +73 -0
  367. package/src/Checkbox.tsx +539 -3
  368. package/src/Collection.tsx +9 -3
  369. package/src/Color.tsx +84 -41
  370. package/src/ComboBox.tsx +97 -21
  371. package/src/DateField.tsx +304 -53
  372. package/src/DatePicker.tsx +402 -62
  373. package/src/DateRangePickerContext.tsx +2 -0
  374. package/src/Dialog.tsx +13 -5
  375. package/src/Disclosure.tsx +7 -1
  376. package/src/DragAndDrop.tsx +3 -1
  377. package/src/DropZone.tsx +3 -1
  378. package/src/GridList.tsx +133 -26
  379. package/src/Icon.tsx +3 -1
  380. package/src/Link.tsx +3 -1
  381. package/src/ListBox.tsx +354 -25
  382. package/src/Menu.tsx +252 -128
  383. package/src/Meter.tsx +3 -1
  384. package/src/Modal.tsx +120 -56
  385. package/src/NumberField.tsx +51 -8
  386. package/src/Popover.tsx +68 -17
  387. package/src/ProgressBar.tsx +3 -1
  388. package/src/RadioGroup.tsx +468 -4
  389. package/src/RangeCalendar.tsx +123 -2
  390. package/src/SearchField.tsx +80 -4
  391. package/src/Select.tsx +122 -26
  392. package/src/SelectionIndicator.tsx +3 -1
  393. package/src/SharedElementTransition.tsx +95 -37
  394. package/src/Slider.tsx +159 -13
  395. package/src/StepList.tsx +0 -7
  396. package/src/Switch.tsx +395 -2
  397. package/src/Table.tsx +428 -99
  398. package/src/Tabs.tsx +17 -45
  399. package/src/TagGroup.tsx +29 -7
  400. package/src/Text.tsx +31 -10
  401. package/src/TextField.tsx +44 -6
  402. package/src/TimeField.tsx +127 -192
  403. package/src/Toast.tsx +79 -14
  404. package/src/ToggleButton.tsx +3 -1
  405. package/src/ToggleButtonGroup.tsx +3 -1
  406. package/src/Tooltip.tsx +3 -1
  407. package/src/Tree.tsx +91 -13
  408. package/src/Virtualizer.tsx +180 -31
  409. package/src/VirtualizerLayouts.ts +45 -10
  410. package/src/index.ts +51 -8
  411. package/src/useDragAndDrop.ts +8 -10
  412. package/src/utils.tsx +246 -30
  413. package/dist/HiddenTimeInput.d.ts +0 -25
  414. package/dist/HiddenTimeInput.d.ts.map +0 -1
  415. package/dist/index.js.map +0 -1
  416. package/dist/index.jsx.map +0 -1
  417. package/src/HiddenTimeInput.tsx +0 -133
@@ -11,6 +11,8 @@ export interface DateRangePickerFieldContextValue {
11
11
  aria: {
12
12
  labelProps: Record<string, unknown>;
13
13
  inputProps: Record<string, unknown>;
14
+ /** Optional hidden validation <input> props (unused by the range fields). */
15
+ hiddenInputProps?: Record<string, unknown>;
14
16
  descriptionProps: Record<string, unknown>;
15
17
  errorMessageProps: Record<string, unknown>;
16
18
  };
package/src/Dialog.tsx CHANGED
@@ -27,7 +27,9 @@ import {
27
27
  type OverlayTriggerState,
28
28
  } from "@proyecto-viviana/solid-stately";
29
29
  import { DialogTriggerContext, useOverlayTriggerState } from "./contexts";
30
+ import { ButtonContext } from "./Button";
30
31
  import {
32
+ DEFAULT_SLOT,
31
33
  type RenderChildren,
32
34
  type ClassNameOrFunction,
33
35
  type StyleOrFunction,
@@ -167,7 +169,7 @@ export function Dialog(props: DialogProps): JSX.Element {
167
169
  ["role", "aria-label", "aria-labelledby", "aria-describedby"],
168
170
  );
169
171
 
170
- let dialogRef!: HTMLDivElement;
172
+ let dialogRef!: HTMLElement;
171
173
 
172
174
  // Get trigger context for aria-labelledby fallback
173
175
  const triggerContext = useContext(DialogTriggerContext);
@@ -223,7 +225,9 @@ export function Dialog(props: DialogProps): JSX.Element {
223
225
 
224
226
  const renderProps = useRenderProps(
225
227
  {
226
- children: props.children,
228
+ get children() {
229
+ return props.children;
230
+ },
227
231
  class: local.class,
228
232
  style: local.style,
229
233
  defaultClassName: "solidaria-Dialog",
@@ -237,7 +241,7 @@ export function Dialog(props: DialogProps): JSX.Element {
237
241
 
238
242
  return (
239
243
  <DialogContext.Provider value={{ close, titleId: titleId() }}>
240
- <div
244
+ <section
241
245
  {...dialogProps()}
242
246
  {...domProps()}
243
247
  ref={dialogRef}
@@ -245,8 +249,12 @@ export function Dialog(props: DialogProps): JSX.Element {
245
249
  style={renderProps.style()}
246
250
  slot={local.slot}
247
251
  >
248
- {renderProps.renderChildren()}
249
- </div>
252
+ <ButtonContext.Provider
253
+ value={{ slots: { [DEFAULT_SLOT]: {}, close: { onPress: () => close() } } }}
254
+ >
255
+ {renderProps.renderChildren()}
256
+ </ButtonContext.Provider>
257
+ </section>
250
258
  </DialogContext.Provider>
251
259
  );
252
260
  }
@@ -406,6 +406,10 @@ export function DisclosureTrigger(props: DisclosureTriggerProps): JSX.Element {
406
406
  {...mergeProps(domProps() as Record<string, unknown>, getButtonProps(), cleanFocusProps())}
407
407
  ref={(el) => assignRef(local.ref, el)}
408
408
  type="button"
409
+ // Mirror react-aria's `useFocusable` (useFocusable.tsx:114-118): always emit
410
+ // an explicit tabIndex so the native trigger is a real, discoverable tab stop
411
+ // (Safari won't focus a native button otherwise). Disabled → attribute absent.
412
+ tabindex={isDisabled() ? undefined : 0}
409
413
  class={local.class}
410
414
  style={local.style}
411
415
  data-expanded={dataAttr(isExpanded())}
@@ -448,7 +452,9 @@ export function DisclosurePanel(props: DisclosurePanelProps): JSX.Element {
448
452
 
449
453
  const renderProps = useRenderProps(
450
454
  {
451
- children: props.children,
455
+ get children() {
456
+ return props.children;
457
+ },
452
458
  class: local.class,
453
459
  style: local.style,
454
460
  defaultClassName: "solidaria-DisclosurePanel",
@@ -58,7 +58,9 @@ function DefaultDropIndicator(props: DropIndicatorProps): JSX.Element {
58
58
 
59
59
  const renderProps = useRenderProps(
60
60
  {
61
- children: props.children,
61
+ get children() {
62
+ return props.children;
63
+ },
62
64
  class: props.class,
63
65
  style: props.style,
64
66
  defaultClassName: "solidaria-DropIndicator",
package/src/DropZone.tsx CHANGED
@@ -122,7 +122,9 @@ export function DropZone(props: DropZoneProps): JSX.Element {
122
122
 
123
123
  const renderProps = useRenderProps(
124
124
  {
125
- children: local.children,
125
+ get children() {
126
+ return local.children;
127
+ },
126
128
  class: local.class,
127
129
  style: local.style,
128
130
  defaultClassName: "solidaria-DropZone",
package/src/GridList.tsx CHANGED
@@ -24,10 +24,12 @@ import {
24
24
  createGridList,
25
25
  createGridListItem,
26
26
  createGridListSelectionCheckbox,
27
+ createGridListSection,
27
28
  createFocusRing,
28
29
  createHover,
29
30
  mergeProps,
30
31
  type AriaGridListProps,
32
+ type GridListSectionAria,
31
33
  } from "@proyecto-viviana/solidaria";
32
34
  import {
33
35
  createGridState,
@@ -50,11 +52,10 @@ import { type DragAndDropHooks } from "./useDragAndDrop";
50
52
  import {
51
53
  CollectionRendererContext,
52
54
  type CollectionRendererContextValue,
53
- Section,
54
55
  type SectionProps,
55
56
  useCollectionRenderer,
56
57
  } from "./Collection";
57
- import { useVirtualizerContext } from "./Virtualizer";
58
+ import { useVirtualizerContext, type Orientation } from "./Virtualizer";
58
59
  import {
59
60
  getNormalizedDropTargetKey,
60
61
  mergePersistedKeysIntoVirtualRange,
@@ -82,6 +83,12 @@ export interface GridListRenderProps {
82
83
  isDisabled: boolean;
83
84
  /** Whether the grid list is empty. */
84
85
  isEmpty: boolean;
86
+ /**
87
+ * The primary orientation of the items.
88
+ *
89
+ * @selector [data-orientation="vertical | horizontal"]
90
+ */
91
+ orientation: Orientation;
85
92
  }
86
93
 
87
94
  export interface GridListProps<T extends object>
@@ -100,12 +107,21 @@ export interface GridListProps<T extends object>
100
107
  selectionBehavior?: "replace" | "toggle";
101
108
  /** Keys of disabled items. */
102
109
  disabledKeys?: Iterable<Key>;
110
+ /** Whether disabled items can still receive focus. */
111
+ disabledBehavior?: "selection" | "all";
103
112
  /** Currently selected keys (controlled). */
104
113
  selectedKeys?: "all" | Iterable<Key>;
105
114
  /** Default selected keys (uncontrolled). */
106
115
  defaultSelectedKeys?: "all" | Iterable<Key>;
107
116
  /** Handler called when selection changes. */
108
117
  onSelectionChange?: (keys: "all" | Set<Key>) => void;
118
+ /**
119
+ * The primary orientation of the items. Usually this is the direction that the collection
120
+ * scrolls.
121
+ *
122
+ * @default 'vertical'
123
+ */
124
+ orientation?: Orientation;
109
125
  /** The children of the component. A function may be provided to render each item. */
110
126
  children: (item: T) => JSX.Element;
111
127
  /** The CSS className for the element. */
@@ -198,7 +214,12 @@ export const GridListContext = createContext<GridListContextValue<object> | null
198
214
  export const GridListStateContext = createContext<GridState<object, GridCollection<object>> | null>(
199
215
  null,
200
216
  );
201
- export const GridListHeaderContext = createContext<null>(null);
217
+ /** Carries the section header's outer (row) props to {@link GridListHeader}. */
218
+ export const GridListHeaderContext = createContext<GridListSectionAria["rowProps"] | null>(null);
219
+ /** Carries the section header's inner (rowheader) props to {@link GridListHeader}. */
220
+ export const GridListHeaderInnerContext = createContext<
221
+ GridListSectionAria["rowHeaderProps"] | null
222
+ >(null);
202
223
 
203
224
  function buildGridCollection<T extends object>(
204
225
  items: T[],
@@ -295,6 +316,7 @@ export function GridList<T extends object>(props: GridListProps<T>): JSX.Element
295
316
  "isLoading",
296
317
  "onLoadMore",
297
318
  "dragAndDropHooks",
319
+ "orientation",
298
320
  ],
299
321
  [
300
322
  "items",
@@ -302,6 +324,7 @@ export function GridList<T extends object>(props: GridListProps<T>): JSX.Element
302
324
  "getTextValue",
303
325
  "getDisabled",
304
326
  "disabledKeys",
327
+ "disabledBehavior",
305
328
  "selectionMode",
306
329
  "selectedKeys",
307
330
  "defaultSelectedKeys",
@@ -339,17 +362,34 @@ export function GridList<T extends object>(props: GridListProps<T>): JSX.Element
339
362
  return keys;
340
363
  });
341
364
 
365
+ const orientation = (): Orientation => local.orientation ?? "vertical";
366
+ const resolveDirection = (): "ltr" | "rtl" => {
367
+ const el = ref();
368
+ if (el && typeof window !== "undefined" && typeof window.getComputedStyle === "function") {
369
+ const dir = window.getComputedStyle(el).direction;
370
+ if (dir === "rtl") return "rtl";
371
+ }
372
+ return typeof document !== "undefined" && document.dir === "rtl" ? "rtl" : "ltr";
373
+ };
374
+
342
375
  const state = createGridState<T, GridCollection<T>>(() => ({
343
376
  collection: collection(),
344
377
  disabledKeys: allDisabledKeys(),
378
+ disabledBehavior: stateProps.disabledBehavior,
345
379
  selectionMode: stateProps.selectionMode,
346
- selectionBehavior: stateProps.selectionBehavior,
380
+ selectionBehavior: stateProps.selectionBehavior ?? "replace",
347
381
  selectedKeys: stateProps.selectedKeys,
348
382
  defaultSelectedKeys: stateProps.defaultSelectedKeys,
349
383
  onSelectionChange: stateProps.onSelectionChange,
350
384
  }));
351
385
 
352
- const { gridProps } = createGridList<T, GridCollection<T>>(
386
+ // Keep the aria object (do NOT destructure `gridProps`): its `gridProps` getter
387
+ // returns a memo that recomputes on state changes — chiefly the roving container
388
+ // `tabIndex`, which rolls to -1 once a row takes focus. Destructuring here would
389
+ // freeze the getter at its first value (tabIndex 0) and the roll would never
390
+ // reach the DOM. Read `gridListAria.gridProps` inside `cleanGridProps` instead,
391
+ // mirroring how ListBox consumes `listBoxAria.listBoxProps`.
392
+ const gridListAria = createGridList<T, GridCollection<T>>(
353
393
  () => ({
354
394
  id: ariaProps.id,
355
395
  "aria-label": ariaProps["aria-label"],
@@ -358,19 +398,22 @@ export function GridList<T extends object>(props: GridListProps<T>): JSX.Element
358
398
  isVirtualized: ariaProps.isVirtualized,
359
399
  onAction: ariaProps.onAction,
360
400
  isDisabled: ariaProps.isDisabled,
361
- selectionBehavior: stateProps.selectionBehavior,
401
+ selectionBehavior: state.selectionBehavior,
402
+ keyboardNavigationBehavior: ariaProps.keyboardNavigationBehavior,
403
+ orientation: orientation(),
404
+ direction: resolveDirection(),
362
405
  }),
363
406
  () => state,
364
407
  ref,
365
408
  );
366
409
 
367
410
  const { isFocused, isFocusVisible, focusProps } = createFocusRing();
368
-
369
411
  const renderValues = createMemo<GridListRenderProps>(() => ({
370
412
  isFocused: state.isFocused || isFocused(),
371
413
  isFocusVisible: isFocusVisible(),
372
414
  isDisabled: ariaProps.isDisabled ?? false,
373
415
  isEmpty: stateProps.items.length === 0,
416
+ orientation: orientation(),
374
417
  }));
375
418
 
376
419
  const renderProps = useRenderProps(
@@ -388,7 +431,7 @@ export function GridList<T extends object>(props: GridListProps<T>): JSX.Element
388
431
  });
389
432
 
390
433
  const cleanGridProps = () => {
391
- const { ref: _ref1, ...rest } = gridProps as Record<string, unknown>;
434
+ const { ref: _ref1, ...rest } = gridListAria.gridProps as Record<string, unknown>;
392
435
  return rest;
393
436
  };
394
437
  const cleanFocusProps = () => {
@@ -446,14 +489,6 @@ export function GridList<T extends object>(props: GridListProps<T>): JSX.Element
446
489
  const hooks = local.dragAndDropHooks;
447
490
  const activeDropState = dropState();
448
491
  if (!hooks?.useDroppableCollection || !activeDropState) return undefined;
449
- const resolveDirection = (): "ltr" | "rtl" => {
450
- const el = ref();
451
- if (el && typeof window !== "undefined" && typeof window.getComputedStyle === "function") {
452
- const dir = window.getComputedStyle(el).direction;
453
- if (dir === "rtl") return "rtl";
454
- }
455
- return typeof document !== "undefined" && document.dir === "rtl" ? "rtl" : "ltr";
456
- };
457
492
  const dropTargetDelegate =
458
493
  hooks.dropTargetDelegate ??
459
494
  parentCollectionRenderer?.dropTargetDelegate ??
@@ -461,7 +496,7 @@ export function GridList<T extends object>(props: GridListProps<T>): JSX.Element
461
496
  ? new hooks.ListDropTargetDelegate(
462
497
  () => state.collection,
463
498
  () => ref(),
464
- { layout: "grid", orientation: "vertical", direction: resolveDirection() },
499
+ { layout: "grid", orientation: orientation(), direction: resolveDirection() },
465
500
  )
466
501
  : undefined);
467
502
  if (!dropTargetDelegate) return undefined;
@@ -564,12 +599,16 @@ export function GridList<T extends object>(props: GridListProps<T>): JSX.Element
564
599
  if (!range) return stateProps.items;
565
600
  return stateProps.items.slice(range.start, range.end);
566
601
  });
602
+ // Spacers reserve the windowed-out extent along the virtualizer's primary axis,
603
+ // so a horizontal layout offsets along width rather than height.
604
+ const virtualSpacerStyle = (size: number): JSX.CSSProperties =>
605
+ virtualizer?.orientation === "horizontal" ? { width: `${size}px` } : { height: `${size}px` };
567
606
 
568
607
  const contextValue = createMemo<GridListContextValue<T>>(() => ({
569
608
  state,
570
609
  collection: collection(),
571
610
  isDisabled: ariaProps.isDisabled ?? false,
572
- selectionBehavior: stateProps.selectionBehavior ?? "replace",
611
+ selectionBehavior: state.selectionBehavior,
573
612
  dragAndDropHooks: local.dragAndDropHooks,
574
613
  dragState: dragState(),
575
614
  dropState: dropState(),
@@ -606,6 +645,7 @@ export function GridList<T extends object>(props: GridListProps<T>): JSX.Element
606
645
  data-disabled={ariaProps.isDisabled || undefined}
607
646
  data-empty={isEmpty() || undefined}
608
647
  data-drop-target={isRootDropTarget() || undefined}
648
+ data-orientation={orientation()}
609
649
  >
610
650
  <SharedElementTransition>
611
651
  {isEmpty() && local.renderEmptyState ? (
@@ -616,7 +656,7 @@ export function GridList<T extends object>(props: GridListProps<T>): JSX.Element
616
656
  <div
617
657
  role="presentation"
618
658
  aria-hidden="true"
619
- style={{ height: `${virtualRange()!.offsetTop}px` }}
659
+ style={virtualSpacerStyle(virtualRange()!.offsetTop)}
620
660
  data-virtualizer-spacer="top"
621
661
  />
622
662
  ) : null}
@@ -643,7 +683,7 @@ export function GridList<T extends object>(props: GridListProps<T>): JSX.Element
643
683
  <div
644
684
  role="presentation"
645
685
  aria-hidden="true"
646
- style={{ height: `${virtualRange()!.offsetBottom}px` }}
686
+ style={virtualSpacerStyle(virtualRange()!.offsetBottom)}
647
687
  data-virtualizer-spacer="bottom"
648
688
  />
649
689
  ) : null}
@@ -759,7 +799,9 @@ export function GridListItem<T extends object>(props: GridListItemProps<T>): JSX
759
799
 
760
800
  const renderProps = useRenderProps(
761
801
  {
762
- children: props.children,
802
+ get children() {
803
+ return props.children;
804
+ },
763
805
  class: local.class,
764
806
  style: local.style,
765
807
  defaultClassName: "solidaria-GridList-item",
@@ -796,6 +838,7 @@ export function GridListItem<T extends object>(props: GridListItemProps<T>): JSX
796
838
  )}
797
839
  class={renderProps.class()}
798
840
  style={renderProps.style()}
841
+ data-key={local.id}
799
842
  data-selected={isSelected() || undefined}
800
843
  data-focused={isFocused() || undefined}
801
844
  data-focus-visible={(isFocusVisible() && isFocused()) || undefined}
@@ -876,7 +919,9 @@ export function GridListLoadMoreItem(props: GridListLoadMoreItemProps): JSX.Elem
876
919
 
877
920
  const renderProps = useRenderProps(
878
921
  {
879
- children: props.children ?? (() => (isLoading() ? "Loading more..." : "Load more")),
922
+ get children() {
923
+ return props.children ?? (() => (isLoading() ? "Loading more..." : "Load more"));
924
+ },
880
925
  class: props.class,
881
926
  style: props.style,
882
927
  defaultClassName: "solidaria-GridList-loadMore",
@@ -905,19 +950,81 @@ export function GridListLoadMoreItem(props: GridListLoadMoreItemProps): JSX.Elem
905
950
  );
906
951
  }
907
952
 
953
+ /**
954
+ * The header of a {@link GridListSection}. Renders as `role="row"` wrapping a
955
+ * `role="rowheader"` whose id labels the section (mirrors upstream
956
+ * `GridListHeader`). The row/rowheader props are supplied by the enclosing
957
+ * section through context.
958
+ */
908
959
  export function GridListHeader(props: GridListHeaderProps): JSX.Element {
960
+ const rowProps = useContext(GridListHeaderContext);
961
+ const rowHeaderProps = useContext(GridListHeaderInnerContext);
909
962
  return (
910
- <div class={props.class ?? "solidaria-GridListHeader"} style={props.style}>
911
- {props.children}
963
+ <div
964
+ class={props.class ?? "solidaria-GridListHeader"}
965
+ style={props.style}
966
+ {...(rowProps ?? {})}
967
+ >
968
+ <div {...(rowHeaderProps ?? {})} style={{ display: "contents" }}>
969
+ {props.children}
970
+ </div>
912
971
  </div>
913
972
  );
914
973
  }
915
974
 
916
975
  /**
917
- * Section primitive alias for GridList composition parity.
976
+ * A section within a GridList. Renders as `role="rowgroup"` and supplies its
977
+ * optional {@link GridListHeader} with the row/rowheader props that wire up the
978
+ * section's `aria-labelledby` (mirrors upstream `GridListSection`).
918
979
  */
919
980
  export function GridListSection(props: GridListSectionProps): JSX.Element {
920
- return <Section {...props} />;
981
+ const [local, domProps] = splitProps(props, ["children", "class", "style", "slot", "ref"]);
982
+
983
+ const section = createGridListSection({
984
+ get "aria-label"() {
985
+ return (domProps as { "aria-label"?: string })["aria-label"];
986
+ },
987
+ });
988
+
989
+ // Mirror upstream: resolve class/style via renderProps but keep children out
990
+ // of it (upstream passes `children: undefined`/`values: undefined`). The real
991
+ // children must only be evaluated inside the header providers below, otherwise
992
+ // a child <GridListHeader> would be instantiated in this component's owner and
993
+ // read the contexts as null.
994
+ // The values callback runs during setup (useRenderProps resolves class/style
995
+ // synchronously), so it must not read `local.children` — doing so would
996
+ // instantiate the header children in this owner, outside the providers below,
997
+ // and break their context wiring. Mirror upstream's `values: undefined` with a
998
+ // constant: a rendered section primitive always wraps its item collection.
999
+ const renderProps = useRenderProps(
1000
+ {
1001
+ children: undefined,
1002
+ class: local.class,
1003
+ style: local.style,
1004
+ defaultClassName: "solidaria-GridListSection",
1005
+ },
1006
+ () => ({ hasChildren: true }),
1007
+ );
1008
+
1009
+ const filteredDomProps = createMemo(() => filterDOMProps(domProps, { global: true }));
1010
+
1011
+ return (
1012
+ <div
1013
+ ref={(el) => assignRef(local.ref, el)}
1014
+ {...filteredDomProps()}
1015
+ {...section.rowGroupProps}
1016
+ class={renderProps.class()}
1017
+ style={renderProps.style()}
1018
+ slot={local.slot}
1019
+ data-section
1020
+ >
1021
+ <GridListHeaderContext.Provider value={section.rowProps}>
1022
+ <GridListHeaderInnerContext.Provider value={section.rowHeaderProps}>
1023
+ {local.children}
1024
+ </GridListHeaderInnerContext.Provider>
1025
+ </GridListHeaderContext.Provider>
1026
+ </div>
1027
+ );
921
1028
  }
922
1029
 
923
1030
  GridList.Item = GridListItem;
package/src/Icon.tsx CHANGED
@@ -88,7 +88,9 @@ export function Icon(props: IconProps): JSX.Element {
88
88
 
89
89
  const renderProps = useRenderProps(
90
90
  {
91
- children: local.children,
91
+ get children() {
92
+ return local.children;
93
+ },
92
94
  class: local.class,
93
95
  style: local.style,
94
96
  defaultClassName: "solidaria-Icon",
package/src/Link.tsx CHANGED
@@ -210,7 +210,9 @@ export function Link(props: ParentProps<LinkProps>): JSX.Element {
210
210
 
211
211
  const renderProps = useRenderProps(
212
212
  {
213
- children: props.children,
213
+ get children() {
214
+ return props.children;
215
+ },
214
216
  class: local.class,
215
217
  style: local.style,
216
218
  defaultClassName: "solidaria-Link",