@proyecto-viviana/solidaria-components 0.3.2 → 0.4.0

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 (398) hide show
  1. package/dist/ActionBar.js +184 -0
  2. package/dist/ActionBar.js.map +1 -0
  3. package/dist/ActionBar.jsx +128 -0
  4. package/dist/ActionBar.jsx.map +1 -0
  5. package/dist/ActionGroup.js +179 -0
  6. package/dist/ActionGroup.js.map +1 -0
  7. package/dist/ActionGroup.jsx +129 -0
  8. package/dist/ActionGroup.jsx.map +1 -0
  9. package/dist/Alert.js +111 -0
  10. package/dist/Alert.js.map +1 -0
  11. package/dist/Alert.jsx +82 -0
  12. package/dist/Alert.jsx.map +1 -0
  13. package/dist/Autocomplete.js +130 -0
  14. package/dist/Autocomplete.js.map +1 -0
  15. package/dist/Autocomplete.jsx +116 -0
  16. package/dist/Autocomplete.jsx.map +1 -0
  17. package/dist/Breadcrumbs.d.ts.map +1 -1
  18. package/dist/Breadcrumbs.js +334 -0
  19. package/dist/Breadcrumbs.js.map +1 -0
  20. package/dist/Breadcrumbs.jsx +266 -0
  21. package/dist/Breadcrumbs.jsx.map +1 -0
  22. package/dist/Button.d.ts.map +1 -1
  23. package/dist/Button.js +348 -0
  24. package/dist/Button.js.map +1 -0
  25. package/dist/Button.jsx +314 -0
  26. package/dist/Button.jsx.map +1 -0
  27. package/dist/Calendar.d.ts +4 -4
  28. package/dist/Calendar.d.ts.map +1 -1
  29. package/dist/Calendar.js +538 -0
  30. package/dist/Calendar.js.map +1 -0
  31. package/dist/Calendar.jsx +333 -0
  32. package/dist/Calendar.jsx.map +1 -0
  33. package/dist/CalendarPicker.d.ts +33 -0
  34. package/dist/CalendarPicker.d.ts.map +1 -0
  35. package/dist/CalendarPicker.js +44 -0
  36. package/dist/CalendarPicker.js.map +1 -0
  37. package/dist/CalendarPicker.jsx +44 -0
  38. package/dist/CalendarPicker.jsx.map +1 -0
  39. package/dist/Checkbox.d.ts +83 -4
  40. package/dist/Checkbox.d.ts.map +1 -1
  41. package/dist/Checkbox.js +923 -0
  42. package/dist/Checkbox.js.map +1 -0
  43. package/dist/Checkbox.jsx +707 -0
  44. package/dist/Checkbox.jsx.map +1 -0
  45. package/dist/Collection.d.ts.map +1 -1
  46. package/dist/Collection.js +202 -0
  47. package/dist/Collection.js.map +1 -0
  48. package/dist/Collection.jsx +152 -0
  49. package/dist/Collection.jsx.map +1 -0
  50. package/dist/Color.d.ts.map +1 -1
  51. package/dist/Color.js +1720 -0
  52. package/dist/Color.js.map +1 -0
  53. package/dist/Color.jsx +1344 -0
  54. package/dist/Color.jsx.map +1 -0
  55. package/dist/ColorEditor.js +208 -0
  56. package/dist/ColorEditor.js.map +1 -0
  57. package/dist/ColorEditor.jsx +120 -0
  58. package/dist/ColorEditor.jsx.map +1 -0
  59. package/dist/ComboBox.d.ts +4 -4
  60. package/dist/ComboBox.d.ts.map +1 -1
  61. package/dist/ComboBox.js +992 -0
  62. package/dist/ComboBox.js.map +1 -0
  63. package/dist/ComboBox.jsx +714 -0
  64. package/dist/ComboBox.jsx.map +1 -0
  65. package/dist/ContextualHelpTrigger.js +146 -0
  66. package/dist/ContextualHelpTrigger.js.map +1 -0
  67. package/dist/ContextualHelpTrigger.jsx +109 -0
  68. package/dist/ContextualHelpTrigger.jsx.map +1 -0
  69. package/dist/DateField.d.ts +3 -3
  70. package/dist/DateField.d.ts.map +1 -1
  71. package/dist/DateField.js +4 -0
  72. package/dist/DateField.jsx +4 -0
  73. package/dist/DateField2.js +499 -0
  74. package/dist/DateField2.js.map +1 -0
  75. package/dist/DateField2.jsx +317 -0
  76. package/dist/DateField2.jsx.map +1 -0
  77. package/dist/DatePicker.d.ts +4 -4
  78. package/dist/DatePicker.d.ts.map +1 -1
  79. package/dist/DatePicker.js +991 -0
  80. package/dist/DatePicker.js.map +1 -0
  81. package/dist/DatePicker.jsx +682 -0
  82. package/dist/DatePicker.jsx.map +1 -0
  83. package/dist/Dialog.d.ts.map +1 -1
  84. package/dist/Dialog.js +337 -0
  85. package/dist/Dialog.js.map +1 -0
  86. package/dist/Dialog.jsx +192 -0
  87. package/dist/Dialog.jsx.map +1 -0
  88. package/dist/Disclosure.d.ts.map +1 -1
  89. package/dist/Disclosure.js +328 -0
  90. package/dist/Disclosure.js.map +1 -0
  91. package/dist/Disclosure.jsx +230 -0
  92. package/dist/Disclosure.jsx.map +1 -0
  93. package/dist/DragAndDrop.d.ts.map +1 -1
  94. package/dist/DragAndDrop.js +176 -0
  95. package/dist/DragAndDrop.js.map +1 -0
  96. package/dist/DragAndDrop.jsx +160 -0
  97. package/dist/DragAndDrop.jsx.map +1 -0
  98. package/dist/DropZone.d.ts.map +1 -1
  99. package/dist/DropZone.js +189 -0
  100. package/dist/DropZone.js.map +1 -0
  101. package/dist/DropZone.jsx +144 -0
  102. package/dist/DropZone.jsx.map +1 -0
  103. package/dist/FieldError.js +66 -0
  104. package/dist/FieldError.js.map +1 -0
  105. package/dist/FieldError.jsx +47 -0
  106. package/dist/FieldError.jsx.map +1 -0
  107. package/dist/FileTrigger.js +79 -0
  108. package/dist/FileTrigger.js.map +1 -0
  109. package/dist/FileTrigger.jsx +49 -0
  110. package/dist/FileTrigger.jsx.map +1 -0
  111. package/dist/Focusable.js +70 -0
  112. package/dist/Focusable.js.map +1 -0
  113. package/dist/Focusable.jsx +69 -0
  114. package/dist/Focusable.jsx.map +1 -0
  115. package/dist/Form.js +99 -0
  116. package/dist/Form.js.map +1 -0
  117. package/dist/Form.jsx +73 -0
  118. package/dist/Form.jsx.map +1 -0
  119. package/dist/GridList.d.ts +34 -2
  120. package/dist/GridList.d.ts.map +1 -1
  121. package/dist/GridList.js +723 -0
  122. package/dist/GridList.js.map +1 -0
  123. package/dist/GridList.jsx +552 -0
  124. package/dist/GridList.jsx.map +1 -0
  125. package/dist/HiddenTimeInput.js +104 -0
  126. package/dist/HiddenTimeInput.js.map +1 -0
  127. package/dist/HiddenTimeInput.jsx +69 -0
  128. package/dist/HiddenTimeInput.jsx.map +1 -0
  129. package/dist/Icon.d.ts.map +1 -1
  130. package/dist/Icon.js +127 -0
  131. package/dist/Icon.js.map +1 -0
  132. package/dist/Icon.jsx +72 -0
  133. package/dist/Icon.jsx.map +1 -0
  134. package/dist/Keyboard.js +30 -0
  135. package/dist/Keyboard.js.map +1 -0
  136. package/dist/Keyboard.jsx +24 -0
  137. package/dist/Keyboard.jsx.map +1 -0
  138. package/dist/Landmark.js +134 -0
  139. package/dist/Landmark.js.map +1 -0
  140. package/dist/Landmark.jsx +118 -0
  141. package/dist/Landmark.jsx.map +1 -0
  142. package/dist/Link.d.ts.map +1 -1
  143. package/dist/Link.js +219 -0
  144. package/dist/Link.js.map +1 -0
  145. package/dist/Link.jsx +189 -0
  146. package/dist/Link.jsx.map +1 -0
  147. package/dist/ListBox.d.ts.map +1 -1
  148. package/dist/ListBox.js +670 -0
  149. package/dist/ListBox.js.map +1 -0
  150. package/dist/ListBox.jsx +508 -0
  151. package/dist/ListBox.jsx.map +1 -0
  152. package/dist/Menu.d.ts +27 -9
  153. package/dist/Menu.d.ts.map +1 -1
  154. package/dist/Menu.js +1254 -0
  155. package/dist/Menu.js.map +1 -0
  156. package/dist/Menu.jsx +1042 -0
  157. package/dist/Menu.jsx.map +1 -0
  158. package/dist/Meter.d.ts.map +1 -1
  159. package/dist/Meter.js +123 -0
  160. package/dist/Meter.js.map +1 -0
  161. package/dist/Meter.jsx +107 -0
  162. package/dist/Meter.jsx.map +1 -0
  163. package/dist/Modal.d.ts.map +1 -1
  164. package/dist/Modal.js +380 -0
  165. package/dist/Modal.js.map +1 -0
  166. package/dist/Modal.jsx +314 -0
  167. package/dist/Modal.jsx.map +1 -0
  168. package/dist/NumberField.d.ts +3 -3
  169. package/dist/NumberField.d.ts.map +1 -1
  170. package/dist/NumberField.js +573 -0
  171. package/dist/NumberField.js.map +1 -0
  172. package/dist/NumberField.jsx +443 -0
  173. package/dist/NumberField.jsx.map +1 -0
  174. package/dist/Popover.d.ts +10 -2
  175. package/dist/Popover.d.ts.map +1 -1
  176. package/dist/Popover.js +464 -0
  177. package/dist/Popover.js.map +1 -0
  178. package/dist/Popover.jsx +333 -0
  179. package/dist/Popover.jsx.map +1 -0
  180. package/dist/Pressable.js +69 -0
  181. package/dist/Pressable.js.map +1 -0
  182. package/dist/Pressable.jsx +68 -0
  183. package/dist/Pressable.jsx.map +1 -0
  184. package/dist/ProgressBar.d.ts.map +1 -1
  185. package/dist/ProgressBar.js +130 -0
  186. package/dist/ProgressBar.js.map +1 -0
  187. package/dist/ProgressBar.jsx +114 -0
  188. package/dist/ProgressBar.jsx.map +1 -0
  189. package/dist/RadioGroup.d.ts +82 -4
  190. package/dist/RadioGroup.d.ts.map +1 -1
  191. package/dist/RadioGroup.js +931 -0
  192. package/dist/RadioGroup.js.map +1 -0
  193. package/dist/RadioGroup.jsx +681 -0
  194. package/dist/RadioGroup.jsx.map +1 -0
  195. package/dist/RangeCalendar.d.ts.map +1 -1
  196. package/dist/RangeCalendar.js +410 -0
  197. package/dist/RangeCalendar.js.map +1 -0
  198. package/dist/RangeCalendar.jsx +253 -0
  199. package/dist/RangeCalendar.jsx.map +1 -0
  200. package/dist/RouterProvider.js +118 -0
  201. package/dist/RouterProvider.js.map +1 -0
  202. package/dist/RouterProvider.jsx +112 -0
  203. package/dist/RouterProvider.jsx.map +1 -0
  204. package/dist/SearchField.d.ts +2 -2
  205. package/dist/SearchField.d.ts.map +1 -1
  206. package/dist/SearchField.js +643 -0
  207. package/dist/SearchField.js.map +1 -0
  208. package/dist/SearchField.jsx +526 -0
  209. package/dist/SearchField.jsx.map +1 -0
  210. package/dist/Select.d.ts.map +1 -1
  211. package/dist/Select.js +1031 -0
  212. package/dist/Select.js.map +1 -0
  213. package/dist/Select.jsx +744 -0
  214. package/dist/Select.jsx.map +1 -0
  215. package/dist/SelectionIndicator.d.ts.map +1 -1
  216. package/dist/SelectionIndicator.js +86 -0
  217. package/dist/SelectionIndicator.js.map +1 -0
  218. package/dist/SelectionIndicator.jsx +50 -0
  219. package/dist/SelectionIndicator.jsx.map +1 -0
  220. package/dist/Separator.js +97 -0
  221. package/dist/Separator.js.map +1 -0
  222. package/dist/Separator.jsx +85 -0
  223. package/dist/Separator.jsx.map +1 -0
  224. package/dist/SharedElementTransition.d.ts.map +1 -1
  225. package/dist/SharedElementTransition.js +165 -0
  226. package/dist/SharedElementTransition.js.map +1 -0
  227. package/dist/SharedElementTransition.jsx +138 -0
  228. package/dist/SharedElementTransition.jsx.map +1 -0
  229. package/dist/Slider.d.ts +33 -1
  230. package/dist/Slider.d.ts.map +1 -1
  231. package/dist/Slider.js +515 -0
  232. package/dist/Slider.js.map +1 -0
  233. package/dist/Slider.jsx +403 -0
  234. package/dist/Slider.jsx.map +1 -0
  235. package/dist/StepList.js +198 -0
  236. package/dist/StepList.js.map +1 -0
  237. package/dist/StepList.jsx +141 -0
  238. package/dist/StepList.jsx.map +1 -0
  239. package/dist/Switch.d.ts +65 -2
  240. package/dist/Switch.d.ts.map +1 -1
  241. package/dist/Switch.js +534 -0
  242. package/dist/Switch.js.map +1 -0
  243. package/dist/Switch.jsx +393 -0
  244. package/dist/Switch.jsx.map +1 -0
  245. package/dist/Table.d.ts +48 -0
  246. package/dist/Table.d.ts.map +1 -1
  247. package/dist/Table.js +1759 -0
  248. package/dist/Table.js.map +1 -0
  249. package/dist/Table.jsx +1348 -0
  250. package/dist/Table.jsx.map +1 -0
  251. package/dist/Tabs.d.ts +0 -4
  252. package/dist/Tabs.d.ts.map +1 -1
  253. package/dist/Tabs.js +595 -0
  254. package/dist/Tabs.js.map +1 -0
  255. package/dist/Tabs.jsx +367 -0
  256. package/dist/Tabs.jsx.map +1 -0
  257. package/dist/TagGroup.d.ts.map +1 -1
  258. package/dist/TagGroup.js +378 -0
  259. package/dist/TagGroup.js.map +1 -0
  260. package/dist/TagGroup.jsx +270 -0
  261. package/dist/TagGroup.jsx.map +1 -0
  262. package/dist/Text.d.ts +18 -6
  263. package/dist/Text.d.ts.map +1 -1
  264. package/dist/Text.js +42 -0
  265. package/dist/Text.js.map +1 -0
  266. package/dist/Text.jsx +35 -0
  267. package/dist/Text.jsx.map +1 -0
  268. package/dist/TextField.d.ts +6 -6
  269. package/dist/TextField.d.ts.map +1 -1
  270. package/dist/TextField.js +436 -0
  271. package/dist/TextField.js.map +1 -0
  272. package/dist/TextField.jsx +403 -0
  273. package/dist/TextField.jsx.map +1 -0
  274. package/dist/TimeField.d.ts +3 -3
  275. package/dist/TimeField.d.ts.map +1 -1
  276. package/dist/TimeField.js +372 -0
  277. package/dist/TimeField.js.map +1 -0
  278. package/dist/TimeField.jsx +224 -0
  279. package/dist/TimeField.jsx.map +1 -0
  280. package/dist/Toast.d.ts +14 -0
  281. package/dist/Toast.d.ts.map +1 -1
  282. package/dist/Toast.js +551 -0
  283. package/dist/Toast.js.map +1 -0
  284. package/dist/Toast.jsx +361 -0
  285. package/dist/Toast.jsx.map +1 -0
  286. package/dist/ToggleButton.d.ts.map +1 -1
  287. package/dist/ToggleButton.js +123 -0
  288. package/dist/ToggleButton.js.map +1 -0
  289. package/dist/ToggleButton.jsx +88 -0
  290. package/dist/ToggleButton.jsx.map +1 -0
  291. package/dist/ToggleButtonGroup.d.ts.map +1 -1
  292. package/dist/ToggleButtonGroup.js +114 -0
  293. package/dist/ToggleButtonGroup.js.map +1 -0
  294. package/dist/ToggleButtonGroup.jsx +85 -0
  295. package/dist/ToggleButtonGroup.jsx.map +1 -0
  296. package/dist/Toolbar.js +112 -0
  297. package/dist/Toolbar.js.map +1 -0
  298. package/dist/Toolbar.jsx +92 -0
  299. package/dist/Toolbar.jsx.map +1 -0
  300. package/dist/Tooltip.d.ts.map +1 -1
  301. package/dist/Tooltip.js +539 -0
  302. package/dist/Tooltip.js.map +1 -0
  303. package/dist/Tooltip.jsx +465 -0
  304. package/dist/Tooltip.jsx.map +1 -0
  305. package/dist/Tree.d.ts +14 -2
  306. package/dist/Tree.d.ts.map +1 -1
  307. package/dist/Tree.js +1424 -0
  308. package/dist/Tree.js.map +1 -0
  309. package/dist/Tree.jsx +1172 -0
  310. package/dist/Tree.jsx.map +1 -0
  311. package/dist/Virtualizer.d.ts +16 -2
  312. package/dist/Virtualizer.d.ts.map +1 -1
  313. package/dist/Virtualizer.js +2 -0
  314. package/dist/Virtualizer.jsx +2 -0
  315. package/dist/Virtualizer2.js +751 -0
  316. package/dist/Virtualizer2.js.map +1 -0
  317. package/dist/Virtualizer2.jsx +730 -0
  318. package/dist/Virtualizer2.jsx.map +1 -0
  319. package/dist/VirtualizerLayouts.d.ts +18 -0
  320. package/dist/VirtualizerLayouts.d.ts.map +1 -1
  321. package/dist/VisuallyHidden.js +42 -0
  322. package/dist/VisuallyHidden.js.map +1 -0
  323. package/dist/VisuallyHidden.jsx +35 -0
  324. package/dist/VisuallyHidden.jsx.map +1 -0
  325. package/dist/contexts.js +33 -0
  326. package/dist/contexts.js.map +1 -0
  327. package/dist/contexts.jsx +33 -0
  328. package/dist/contexts.jsx.map +1 -0
  329. package/dist/index.d.ts +7 -6
  330. package/dist/index.d.ts.map +1 -1
  331. package/dist/index.js +70 -23932
  332. package/dist/index.jsx +70 -18337
  333. package/dist/useDragAndDrop.js +2 -0
  334. package/dist/useDragAndDrop.jsx +2 -0
  335. package/dist/useDragAndDrop2.js +395 -0
  336. package/dist/useDragAndDrop2.js.map +1 -0
  337. package/dist/useDragAndDrop2.jsx +395 -0
  338. package/dist/useDragAndDrop2.jsx.map +1 -0
  339. package/dist/utils.d.ts +83 -11
  340. package/dist/utils.d.ts.map +1 -1
  341. package/dist/utils.js +285 -0
  342. package/dist/utils.js.map +1 -0
  343. package/dist/utils.jsx +277 -0
  344. package/dist/utils.jsx.map +1 -0
  345. package/dist/virtualizer/Layout.js +144 -0
  346. package/dist/virtualizer/Layout.js.map +1 -0
  347. package/dist/virtualizer/Layout.jsx +144 -0
  348. package/dist/virtualizer/Layout.jsx.map +1 -0
  349. package/package.json +401 -4
  350. package/src/Breadcrumbs.tsx +3 -1
  351. package/src/Button.tsx +22 -2
  352. package/src/Calendar.tsx +27 -10
  353. package/src/CalendarPicker.tsx +73 -0
  354. package/src/Checkbox.tsx +539 -3
  355. package/src/Collection.tsx +9 -3
  356. package/src/Color.tsx +42 -14
  357. package/src/ComboBox.tsx +50 -6
  358. package/src/DateField.tsx +20 -2
  359. package/src/DatePicker.tsx +57 -5
  360. package/src/Dialog.tsx +13 -5
  361. package/src/Disclosure.tsx +3 -1
  362. package/src/DragAndDrop.tsx +3 -1
  363. package/src/DropZone.tsx +3 -1
  364. package/src/GridList.tsx +125 -24
  365. package/src/Icon.tsx +3 -1
  366. package/src/Link.tsx +3 -1
  367. package/src/ListBox.tsx +31 -4
  368. package/src/Menu.tsx +252 -128
  369. package/src/Meter.tsx +3 -1
  370. package/src/Modal.tsx +100 -52
  371. package/src/NumberField.tsx +51 -8
  372. package/src/Popover.tsx +40 -10
  373. package/src/ProgressBar.tsx +3 -1
  374. package/src/RadioGroup.tsx +468 -4
  375. package/src/RangeCalendar.tsx +3 -1
  376. package/src/SearchField.tsx +27 -3
  377. package/src/Select.tsx +22 -7
  378. package/src/SelectionIndicator.tsx +3 -1
  379. package/src/SharedElementTransition.tsx +3 -1
  380. package/src/Slider.tsx +159 -13
  381. package/src/Switch.tsx +395 -2
  382. package/src/Table.tsx +409 -95
  383. package/src/Tabs.tsx +16 -45
  384. package/src/TagGroup.tsx +3 -1
  385. package/src/Text.tsx +31 -10
  386. package/src/TextField.tsx +43 -5
  387. package/src/TimeField.tsx +20 -2
  388. package/src/Toast.tsx +79 -14
  389. package/src/ToggleButton.tsx +3 -1
  390. package/src/ToggleButtonGroup.tsx +3 -1
  391. package/src/Tooltip.tsx +3 -1
  392. package/src/Tree.tsx +77 -9
  393. package/src/Virtualizer.tsx +180 -31
  394. package/src/VirtualizerLayouts.ts +45 -10
  395. package/src/index.ts +50 -0
  396. package/src/utils.tsx +243 -27
  397. package/dist/index.js.map +0 -1
  398. package/dist/index.jsx.map +0 -1
package/src/Tabs.tsx CHANGED
@@ -102,10 +102,6 @@ export interface TabListRenderProps {
102
102
  orientation: TabOrientation;
103
103
  /** Whether the tab list is disabled. */
104
104
  isDisabled: boolean;
105
- /** Whether the tab list has focus. */
106
- isFocused: boolean;
107
- /** Whether the tab list has visible focus. */
108
- isFocusVisible: boolean;
109
105
  }
110
106
 
111
107
  export interface TabListProps<T> extends Omit<AriaTabListProps, "children">, SlotProps {
@@ -319,7 +315,9 @@ export function Tabs<T>(props: TabsProps<T>): JSX.Element {
319
315
  {
320
316
  class: local.class,
321
317
  style: local.style,
322
- children: props.children,
318
+ get children() {
319
+ return props.children;
320
+ },
323
321
  defaultClassName: "solidaria-Tabs",
324
322
  },
325
323
  renderValues,
@@ -437,13 +435,9 @@ function TabListInner<T>(props: {
437
435
  // Create tab list aria props
438
436
  const { tabListProps } = createTabList<T>(props.ariaProps as AriaTabListProps, state);
439
437
 
440
- const { isFocused, isFocusVisible, focusProps } = createFocusRing();
441
-
442
438
  const renderValues = createMemo<TabListRenderProps>(() => ({
443
439
  orientation: state.orientation(),
444
440
  isDisabled: state.isDisabled(),
445
- isFocused: state.isFocused() || isFocused(),
446
- isFocusVisible: isFocusVisible(),
447
441
  }));
448
442
 
449
443
  const renderProps = useRenderProps(
@@ -455,42 +449,16 @@ function TabListInner<T>(props: {
455
449
  renderValues,
456
450
  );
457
451
 
458
- // Helper to safely call event handlers that may be bound tuples
459
- const callHandler = <E extends Event>(
460
- handler: JSX.EventHandlerUnion<HTMLElement, E> | undefined,
461
- event: E,
462
- ) => {
463
- if (!handler) return;
464
- if (Array.isArray(handler)) {
465
- handler[1].call(handler[0], event);
466
- return;
467
- }
468
- if (typeof handler === "function") {
469
- (handler as (evt: E) => void)(event);
470
- return;
471
- }
472
- if (
473
- typeof handler === "object" &&
474
- "handleEvent" in handler &&
475
- typeof handler.handleEvent === "function"
476
- ) {
477
- (handler.handleEvent as (evt: E) => void)(event);
478
- }
479
- };
480
-
481
- // Combine event handlers
482
452
  const handleKeyDown = (e: KeyboardEvent) => {
483
453
  tabListProps.onKeyDown(e);
484
454
  };
485
455
 
486
456
  const handleFocus = (e: FocusEvent) => {
487
- tabListProps.onFocus(e);
488
- callHandler(focusProps.onFocus, e);
457
+ tabListProps.onFocusIn(e);
489
458
  };
490
459
 
491
460
  const handleBlur = (e: FocusEvent) => {
492
- tabListProps.onBlur(e);
493
- callHandler(focusProps.onBlur, e);
461
+ tabListProps.onFocusOut(e);
494
462
  };
495
463
 
496
464
  return (
@@ -503,10 +471,8 @@ function TabListInner<T>(props: {
503
471
  class={renderProps.class()}
504
472
  style={renderProps.style()}
505
473
  onKeyDown={handleKeyDown}
506
- onFocus={handleFocus}
507
- onBlur={handleBlur}
508
- data-focused={state.isFocused() || undefined}
509
- data-focus-visible={isFocusVisible() || undefined}
474
+ onFocusIn={handleFocus}
475
+ onFocusOut={handleBlur}
510
476
  data-orientation={state.orientation()}
511
477
  data-disabled={state.isDisabled() || undefined}
512
478
  >
@@ -611,7 +577,9 @@ function TabInner(props: {
611
577
 
612
578
  const renderProps = useRenderProps(
613
579
  {
614
- children: props.children,
580
+ get children() {
581
+ return props.children;
582
+ },
615
583
  class: props.local.class,
616
584
  style: props.local.style,
617
585
  defaultClassName: "solidaria-Tab",
@@ -634,7 +602,7 @@ function TabInner(props: {
634
602
  aria-controls={tabAria.isSelected() ? tabAria.tabProps["aria-controls"] : undefined}
635
603
  aria-label={tabAria.tabProps["aria-label"]}
636
604
  aria-labelledby={tabAria.tabProps["aria-labelledby"]}
637
- tabIndex={tabAria.isSelected() && !tabAria.isDisabled() ? 0 : -1}
605
+ tabIndex={tabAria.tabProps.tabIndex}
638
606
  class={renderProps.class()}
639
607
  style={renderProps.style()}
640
608
  onKeyDown={tabAria.tabProps.onKeyDown}
@@ -642,6 +610,7 @@ function TabInner(props: {
642
610
  onPointerDown={tabAria.tabProps.onPointerDown}
643
611
  onClick={tabAria.tabProps.onClick}
644
612
  onFocus={tabAria.tabProps.onFocus}
613
+ onBlur={tabAria.tabProps.onBlur}
645
614
  {...hoverProps}
646
615
  data-selected={tabAria.isSelected() || undefined}
647
616
  data-focused={tabAria.isFocused() || undefined}
@@ -650,7 +619,7 @@ function TabInner(props: {
650
619
  data-hovered={isHovered() || undefined}
651
620
  data-disabled={tabAria.isDisabled() || undefined}
652
621
  >
653
- {renderProps.renderChildren()}
622
+ {renderProps.renderChildrenStable()}
654
623
  </div>
655
624
  </SelectionIndicatorContext.Provider>
656
625
  );
@@ -750,7 +719,9 @@ export function TabPanel(props: TabPanelProps): JSX.Element {
750
719
 
751
720
  const renderProps = useRenderProps(
752
721
  {
753
- children: props.children,
722
+ get children() {
723
+ return props.children;
724
+ },
754
725
  class: local.class,
755
726
  style: local.style,
756
727
  defaultClassName: "solidaria-TabPanel",
package/src/TagGroup.tsx CHANGED
@@ -404,7 +404,9 @@ export function Tag(props: TagProps): JSX.Element {
404
404
 
405
405
  const renderProps = useRenderProps(
406
406
  {
407
- children: props.children,
407
+ get children() {
408
+ return props.children;
409
+ },
408
410
  class: local.class,
409
411
  style: local.style,
410
412
  defaultClassName: "solidaria-Tag",
package/src/Text.tsx CHANGED
@@ -1,18 +1,39 @@
1
- import { type JSX, createContext } from "solid-js";
2
- import type { SlotProps } from "./utils";
1
+ import { type JSX, createContext, splitProps } from "solid-js";
2
+ import { Dynamic } from "solid-js/web";
3
+ import { type ContextValue, type SlotProps, useContextProps, filterDOMProps } from "./utils";
3
4
 
4
- export interface TextProps extends SlotProps {
5
- children?: JSX.Element;
6
- class?: string;
7
- style?: JSX.CSSProperties;
5
+ export interface TextProps extends JSX.HTMLAttributes<HTMLElement>, SlotProps {
6
+ /** The element type to render as. @default 'span' */
7
+ elementType?: string;
8
8
  }
9
9
 
10
- export const TextContext = createContext<null>(null);
10
+ /**
11
+ * Slotted context for `Text`. A field provides description / errorMessage props
12
+ * (each carrying the `id` its `aria-describedby` references) under named slots,
13
+ * so a `<Text slot="description">` child picks up the right `id` without the field
14
+ * threading it manually. Mirrors react-aria-components' `TextContext` (default
15
+ * `{}` so an unprovided `Text` merges against an empty context and renders as-is).
16
+ */
17
+ export const TextContext = createContext<ContextValue<TextProps, HTMLElement>>({});
11
18
 
19
+ /**
20
+ * A piece of text, typically a label, description, or error message inside a
21
+ * field. Port of react-aria-components' `Text`: it consumes its slot from
22
+ * `TextContext` (via `useContextProps`) so a field can supply the `id` and other
23
+ * props for the matching slot, then renders them onto the element.
24
+ */
12
25
  export function Text(props: TextProps): JSX.Element {
26
+ const [merged] = useContextProps(props, undefined, TextContext);
27
+ // `slot` stays a logical prop (not a DOM attribute) and `ref`/`class`/`children`
28
+ // are rendered explicitly; everything else (notably the slotted `id`) is spread.
29
+ const [local, domProps] = splitProps(merged, ["elementType", "class", "children", "slot", "ref"]);
13
30
  return (
14
- <span class={props.class ?? "solidaria-Text"} style={props.style}>
15
- {props.children}
16
- </span>
31
+ <Dynamic
32
+ component={local.elementType ?? "span"}
33
+ class={local.class ?? "solidaria-Text"}
34
+ {...filterDOMProps(domProps, { global: true })}
35
+ >
36
+ {local.children}
37
+ </Dynamic>
17
38
  );
18
39
  }
package/src/TextField.tsx CHANGED
@@ -7,6 +7,7 @@
7
7
 
8
8
  import {
9
9
  type JSX,
10
+ type Context,
10
11
  createContext,
11
12
  useContext,
12
13
  createMemo,
@@ -38,7 +39,9 @@ import {
38
39
  type SlotProps,
39
40
  useRenderProps,
40
41
  filterDOMProps,
42
+ Provider,
41
43
  } from "./utils";
44
+ import { TextContext } from "./Text";
42
45
 
43
46
  export interface TextFieldRenderProps {
44
47
  /** Whether the text field is disabled. */
@@ -149,8 +152,21 @@ export interface LabelProps extends JSX.LabelHTMLAttributes<HTMLLabelElement> {
149
152
  export function Label(props: LabelProps): JSX.Element {
150
153
  const context = useContext(TextFieldContext);
151
154
 
155
+ const localDOMProps = () => {
156
+ const result: Record<string, unknown> = {};
157
+ const propsRecord = props as Record<string, unknown>;
158
+
159
+ for (const key in propsRecord) {
160
+ if (key !== "children") {
161
+ result[key] = propsRecord[key];
162
+ }
163
+ }
164
+ return result;
165
+ };
166
+
152
167
  // Merge context labelProps with local props (local props take precedence)
153
168
  const mergedProps = () => {
169
+ const localProps = localDOMProps();
154
170
  if (context) {
155
171
  const { ref: _ref, ...contextLabelProps } = (context.labelProps ?? {}) as Record<
156
172
  string,
@@ -159,14 +175,14 @@ export function Label(props: LabelProps): JSX.Element {
159
175
  const merged = {
160
176
  ...contextLabelProps,
161
177
  ...(context.inputId ? { for: context.inputId } : {}),
162
- ...props,
178
+ ...localProps,
163
179
  } as Record<string, unknown>;
164
180
  if (merged.class == null) {
165
181
  merged.class = "solidaria-Label";
166
182
  }
167
183
  return merged;
168
184
  }
169
- return props.class == null ? { ...props, class: "solidaria-Label" } : props;
185
+ return localProps.class == null ? { ...localProps, class: "solidaria-Label" } : localProps;
170
186
  };
171
187
 
172
188
  return <label {...mergedProps()}>{props.children}</label>;
@@ -481,7 +497,9 @@ export function TextField(props: TextFieldProps): JSX.Element {
481
497
 
482
498
  const renderProps = useRenderProps(
483
499
  {
484
- children: local.children,
500
+ get children() {
501
+ return local.children;
502
+ },
485
503
  class: local.class,
486
504
  style: local.style,
487
505
  defaultClassName: "solidaria-TextField",
@@ -586,6 +604,26 @@ export function TextField(props: TextFieldProps): JSX.Element {
586
604
  const children = local.children;
587
605
  return typeof children === "function" ? children(childRenderValues) : children;
588
606
  });
607
+ // Provide the description / errorMessage props as `TextContext` slots (mirrors
608
+ // react-aria-components' TextField), so a `<Text slot="description">` /
609
+ // `<Text slot="errorMessage">` child picks up the `id` its `aria-describedby`
610
+ // references. Additive: existing consumers reading these off `TextFieldContext`
611
+ // are unaffected.
612
+ const textSlots = {
613
+ slots: {
614
+ get description() {
615
+ return textFieldAria.descriptionProps as JSX.HTMLAttributes<HTMLElement>;
616
+ },
617
+ get errorMessage() {
618
+ return textFieldAria.errorMessageProps as JSX.HTMLAttributes<HTMLElement>;
619
+ },
620
+ },
621
+ };
622
+ const FieldChildrenSlotted = () => (
623
+ <Provider values={[[TextContext, textSlots]] as Array<[Context<unknown>, unknown]>}>
624
+ <FieldChildren />
625
+ </Provider>
626
+ );
589
627
  const rootProps = () =>
590
628
  ({
591
629
  ...domProps(),
@@ -604,7 +642,7 @@ export function TextField(props: TextFieldProps): JSX.Element {
604
642
  const customRootProps = () =>
605
643
  ({
606
644
  ...rootProps(),
607
- children: <FieldChildren />,
645
+ children: <FieldChildrenSlotted />,
608
646
  }) as JSX.HTMLAttributes<HTMLDivElement>;
609
647
 
610
648
  return (
@@ -614,7 +652,7 @@ export function TextField(props: TextFieldProps): JSX.Element {
614
652
  local.render(customRootProps(), renderValues())
615
653
  ) : (
616
654
  <div {...rootProps()}>
617
- <FieldChildren />
655
+ <FieldChildrenSlotted />
618
656
  </div>
619
657
  )}
620
658
  </TextFieldContext.Provider>
package/src/TimeField.tsx CHANGED
@@ -7,6 +7,7 @@
7
7
 
8
8
  import {
9
9
  type JSX,
10
+ type Context,
10
11
  createContext,
11
12
  createMemo,
12
13
  createSignal,
@@ -36,7 +37,9 @@ import {
36
37
  useRenderProps,
37
38
  dataAttr,
38
39
  useIsHydrated,
40
+ Provider,
39
41
  } from "./utils";
42
+ import { TextContext } from "./Text";
40
43
  import { HiddenTimeInput } from "./HiddenTimeInput";
41
44
  import { FormContext, type FormProps } from "./Form";
42
45
 
@@ -281,6 +284,17 @@ function TimeFieldInner<T extends TimeValue = TimeValue>(
281
284
  formContext?.validationBehavior ??
282
285
  "native";
283
286
 
287
+ const textSlots = {
288
+ slots: {
289
+ get description() {
290
+ return fieldAria.descriptionProps;
291
+ },
292
+ get errorMessage() {
293
+ return fieldAria.errorMessageProps;
294
+ },
295
+ },
296
+ };
297
+
284
298
  return (
285
299
  <TimeFieldStateContext.Provider value={state as unknown as TimeFieldState<TimeValue>}>
286
300
  <TimeFieldContext.Provider
@@ -304,7 +318,9 @@ function TimeFieldInner<T extends TimeValue = TimeValue>(
304
318
  data-required={dataAttr(state.isRequired())}
305
319
  data-invalid={dataAttr(state.isInvalid())}
306
320
  >
307
- {local.children as JSX.Element}
321
+ <Provider values={[[TextContext, textSlots]] as Array<[Context<unknown>, unknown]>}>
322
+ {local.children as JSX.Element}
323
+ </Provider>
308
324
  </div>
309
325
  <Show when={(rest as Record<string, unknown>).name}>
310
326
  <HiddenTimeInput
@@ -388,7 +404,9 @@ export function TimeSegment(props: TimeSegmentProps): JSX.Element {
388
404
 
389
405
  const renderProps = useRenderProps(
390
406
  {
391
- children: props.children,
407
+ get children() {
408
+ return props.children;
409
+ },
392
410
  class: props.class,
393
411
  style: props.style,
394
412
  defaultClassName: "solidaria-TimeSegment",
package/src/Toast.tsx CHANGED
@@ -131,6 +131,7 @@ export const ToastContext = createContext<ToastState<ToastContent> | null>(null)
131
131
  interface ToastAriaContextValue {
132
132
  titleProps: JSX.HTMLAttributes<HTMLElement>;
133
133
  descriptionProps: JSX.HTMLAttributes<HTMLElement>;
134
+ contentProps: JSX.HTMLAttributes<HTMLElement>;
134
135
  }
135
136
 
136
137
  const ToastAriaContext = createContext<ToastAriaContextValue | null>(null);
@@ -265,8 +266,6 @@ export function ToastRegion(props: ToastRegionProps): JSX.Element {
265
266
  },
266
267
  renderValues,
267
268
  );
268
- const renderedChildren = createMemo(() => renderProps.renderChildren());
269
-
270
269
  const domProps = createMemo(() =>
271
270
  filterDOMProps(rest as Record<string, unknown>, { global: true }),
272
271
  );
@@ -317,14 +316,19 @@ export function ToastRegion(props: ToastRegionProps): JSX.Element {
317
316
 
318
317
  const visibleToasts = () => state()?.visibleToasts() ?? [];
319
318
  const hasToasts = () => visibleToasts().length > 0;
319
+ const hasAuthoredRegionStyle = () => local.class != null || local.style != null;
320
320
 
321
321
  const regionContent = () => {
322
322
  if (!state()) return null;
323
323
 
324
- // Merge styles - placement styles are base, renderProps.style() overrides
325
324
  const mergedStyle = () => {
326
- const placement = placementStyles();
327
325
  const custom = renderProps.style();
326
+ // React Aria Components leaves ToastRegion unstyled. Keep this package's
327
+ // fallback placement only for bare regions so styled layers such as S2 can
328
+ // own fixed viewport geometry with their generated classes.
329
+ if (hasAuthoredRegionStyle()) return custom;
330
+
331
+ const placement = placementStyles();
328
332
  if (!custom) return placement;
329
333
  return { ...placement, ...custom } as JSX.CSSProperties;
330
334
  };
@@ -340,7 +344,7 @@ export function ToastRegion(props: ToastRegionProps): JSX.Element {
340
344
  style={mergedStyle()}
341
345
  data-placement={normalizedPlacement()}
342
346
  >
343
- {renderedChildren()}
347
+ {renderProps.renderChildren()}
344
348
  </div>
345
349
  );
346
350
  };
@@ -403,7 +407,9 @@ export function Toast(props: ToastProps): JSX.Element {
403
407
 
404
408
  const renderProps = useRenderProps(
405
409
  {
406
- children: props.children,
410
+ get children() {
411
+ return props.children;
412
+ },
407
413
  class: local.class,
408
414
  style: local.style,
409
415
  defaultClassName: "solidaria-Toast",
@@ -478,8 +484,10 @@ export function Toast(props: ToastProps): JSX.Element {
478
484
 
479
485
  const { ref: _ref, ...cleanToastProps } = toastAria.toastProps as Record<string, unknown>;
480
486
 
481
- // Ensure ARIA title/description IDs are present on rendered sub-components,
482
- // even when children are pre-composed outside the Toast provider owner.
487
+ // Ensure ARIA title/description IDs and the content live-region attributes are
488
+ // present on rendered sub-components, even when children are pre-composed outside
489
+ // the Toast provider owner (as DefaultToast does), where useContext can't reach
490
+ // this owner's ToastAriaContext.
483
491
  createEffect(() => {
484
492
  if (!toastRef) return;
485
493
 
@@ -487,6 +495,7 @@ export function Toast(props: ToastProps): JSX.Element {
487
495
  const descriptionId = (toastAria.descriptionProps as Record<string, unknown>).id as
488
496
  | string
489
497
  | undefined;
498
+ const contentProps = toastAria.contentProps as Record<string, unknown>;
490
499
 
491
500
  if (titleId) {
492
501
  const titleEl = toastRef.querySelector("[data-solidaria-toast-title]");
@@ -501,11 +510,27 @@ export function Toast(props: ToastProps): JSX.Element {
501
510
  descriptionEl.id = descriptionId;
502
511
  }
503
512
  }
513
+
514
+ // Wire the content area as a live region (role="alert" / aria-live="assertive")
515
+ // so the toast message is announced to screen readers when it appears.
516
+ const contentEl = toastRef.querySelector("[data-solidaria-toast-content]");
517
+ if (contentEl instanceof HTMLElement) {
518
+ const role = contentProps.role as string | undefined;
519
+ const ariaLive = contentProps["aria-live"] as string | undefined;
520
+ const ariaAtomic = contentProps["aria-atomic"] as string | undefined;
521
+ if (role) contentEl.setAttribute("role", role);
522
+ if (ariaLive) contentEl.setAttribute("aria-live", ariaLive);
523
+ if (ariaAtomic) contentEl.setAttribute("aria-atomic", ariaAtomic);
524
+ }
504
525
  });
505
526
 
506
527
  return (
507
528
  <ToastAriaContext.Provider
508
- value={{ titleProps: toastAria.titleProps, descriptionProps: toastAria.descriptionProps }}
529
+ value={{
530
+ titleProps: toastAria.titleProps,
531
+ descriptionProps: toastAria.descriptionProps,
532
+ contentProps: toastAria.contentProps,
533
+ }}
509
534
  >
510
535
  <div
511
536
  ref={toastRef}
@@ -537,10 +562,14 @@ export function ToastTitle(props: ToastTitleProps): JSX.Element {
537
562
  const context = useContext(ToastAriaContext);
538
563
  const { ref: _ref, ...ariaTitleProps } = (context?.titleProps ?? {}) as Record<string, unknown>;
539
564
 
565
+ // Upstream S2 Toast renders the title via `<Text slot="title">`, and RAC `Text`
566
+ // defaults to `elementType="span"` — so the title's text-node container is a
567
+ // `<span>`, not a `<div>`. Mirror that (the D7 contrast descriptor keys on the
568
+ // container tag name; a `<div>` here diverged on every variant × theme). (parity rule #1/#2)
540
569
  return (
541
- <div data-solidaria-toast-title="" {...ariaTitleProps} class={props.class} style={props.style}>
570
+ <span data-solidaria-toast-title="" {...ariaTitleProps} class={props.class} style={props.style}>
542
571
  {props.children}
543
- </div>
572
+ </span>
544
573
  );
545
574
  }
546
575
 
@@ -560,14 +589,50 @@ export function ToastDescription(props: ToastDescriptionProps): JSX.Element {
560
589
  unknown
561
590
  >;
562
591
 
592
+ // Match the title: upstream toast text is rendered in `<span>` elements (RAC
593
+ // `Text`). The port additionally supports a description (upstream S2 has only a
594
+ // title); keep it as a `<span>` sibling so its text-node container tag is faithful.
563
595
  return (
564
- <div
596
+ <span
565
597
  data-solidaria-toast-description=""
566
598
  {...ariaDescriptionProps}
567
599
  class={props.class}
568
600
  style={props.style}
569
601
  >
570
602
  {props.children}
603
+ </span>
604
+ );
605
+ }
606
+
607
+ export interface ToastContentProps {
608
+ children: JSX.Element;
609
+ class?: string;
610
+ style?: JSX.CSSProperties;
611
+ }
612
+
613
+ /**
614
+ * ToastContent wraps the toast message (title + description) in the live region
615
+ * announced to screen readers. It carries `role="alert"` / `aria-live="assertive"`
616
+ * from createToast's contentProps so the toast text is announced when it appears.
617
+ *
618
+ * It is rendered as a sibling of the close button (never wrapping it) so screen
619
+ * readers announce the message without reading the close button first.
620
+ */
621
+ export function ToastContent(props: ToastContentProps): JSX.Element {
622
+ const context = useContext(ToastAriaContext);
623
+ const { ref: _ref, ...ariaContentProps } = (context?.contentProps ?? {}) as Record<
624
+ string,
625
+ unknown
626
+ >;
627
+
628
+ return (
629
+ <div
630
+ data-solidaria-toast-content=""
631
+ {...ariaContentProps}
632
+ class={props.class}
633
+ style={props.style}
634
+ >
635
+ {props.children}
571
636
  </div>
572
637
  );
573
638
  }
@@ -633,7 +698,7 @@ export function DefaultToast(props: DefaultToastProps): JSX.Element {
633
698
  return (
634
699
  <Toast toast={props.toast}>
635
700
  <div style={{ display: "flex", "align-items": "flex-start", gap: "12px" }}>
636
- <div style={{ flex: 1 }}>
701
+ <ToastContent style={{ flex: 1 }}>
637
702
  <Show when={title()}>
638
703
  <ToastTitle style={{ "font-weight": "bold", "margin-bottom": "4px" }}>
639
704
  {title()}
@@ -647,7 +712,7 @@ export function DefaultToast(props: DefaultToastProps): JSX.Element {
647
712
  {actionLabel()}
648
713
  </button>
649
714
  </Show>
650
- </div>
715
+ </ToastContent>
651
716
  <ToastCloseButton toast={props.toast} />
652
717
  </div>
653
718
  </Toast>
@@ -118,7 +118,9 @@ export function ToggleButton(props: ToggleButtonProps): JSX.Element {
118
118
 
119
119
  const renderProps = useRenderProps(
120
120
  {
121
- children: local.children,
121
+ get children() {
122
+ return local.children;
123
+ },
122
124
  class: local.class,
123
125
  style: local.style,
124
126
  defaultClassName: "solidaria-ToggleButton",
@@ -95,7 +95,9 @@ export function ToggleButtonGroup(props: ToggleButtonGroupProps): JSX.Element {
95
95
 
96
96
  const renderProps = useRenderProps(
97
97
  {
98
- children: local.children,
98
+ get children() {
99
+ return local.children;
100
+ },
99
101
  class: local.class,
100
102
  style: local.style,
101
103
  defaultClassName: "solidaria-ToggleButtonGroup",
package/src/Tooltip.tsx CHANGED
@@ -574,7 +574,9 @@ function TooltipContent(
574
574
  {
575
575
  class: props.class,
576
576
  style: props.style,
577
- children: props.children,
577
+ get children() {
578
+ return props.children;
579
+ },
578
580
  defaultClassName: "solidaria-Tooltip",
579
581
  },
580
582
  values,