@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
@@ -7,6 +7,7 @@
7
7
 
8
8
  import {
9
9
  type JSX,
10
+ type Context,
10
11
  createContext,
11
12
  createMemo,
12
13
  onCleanup,
@@ -38,7 +39,10 @@ import {
38
39
  type SlotProps,
39
40
  useRenderProps,
40
41
  filterDOMProps,
42
+ Provider,
41
43
  } from "./utils";
44
+ import { TextContext } from "./Text";
45
+ import { useAutocompleteInput } from "./Autocomplete";
42
46
 
43
47
  export interface SearchFieldRenderProps {
44
48
  /** Whether the search field is empty. */
@@ -244,7 +248,35 @@ export function SearchField(props: SearchFieldProps): JSX.Element {
244
248
  const baseProps = (
245
249
  contextProps ? mergeProps(contextBaseProps(), contextSlotProps ?? {}, props) : props
246
250
  ) as SearchFieldProps;
247
- const mergedProps = withFormValidationBehavior(baseProps, formContext);
251
+
252
+ // When rendered inside an <Autocomplete>, the FieldInputContext (AutocompleteContext)
253
+ // controls the input's value and keyboard handling: value + onChange make the field's
254
+ // state controlled by the shared autocomplete state (which drives the collection
255
+ // filter), and onKeyDown/onFocus/onBlur chain the autocomplete's virtual-focus
256
+ // navigation into the input. This mirrors RAC's
257
+ // useContextProps(props, inputRef, FieldInputContext). The remaining passthroughs
258
+ // (aria-activedescendant/aria-controls/aria-autocomplete) and the input-ref
259
+ // registration are applied at the <input> in SearchFieldInput.
260
+ const autocompleteInput = useAutocompleteInput();
261
+ const autocompleteProps = autocompleteInput
262
+ ? ({
263
+ get value() {
264
+ return autocompleteInput.inputProps.value();
265
+ },
266
+ onChange: autocompleteInput.inputProps.onChange,
267
+ onKeyDown: autocompleteInput.inputProps
268
+ .onKeyDown as unknown as SearchFieldProps["onKeyDown"],
269
+ onFocus: autocompleteInput.inputProps.onFocus as unknown as SearchFieldProps["onFocus"],
270
+ onBlur: autocompleteInput.inputProps.onBlur as unknown as SearchFieldProps["onBlur"],
271
+ } as Partial<SearchFieldProps>)
272
+ : undefined;
273
+
274
+ const mergedProps = withFormValidationBehavior(
275
+ autocompleteProps
276
+ ? (mergeProps(baseProps, autocompleteProps) as SearchFieldProps)
277
+ : baseProps,
278
+ formContext,
279
+ );
248
280
 
249
281
  const [local, stateProps, ariaProps, rest] = splitProps(
250
282
  mergedProps,
@@ -456,7 +488,9 @@ export function SearchField(props: SearchFieldProps): JSX.Element {
456
488
 
457
489
  const renderProps = useRenderProps(
458
490
  {
459
- children: local.children,
491
+ get children() {
492
+ return local.children;
493
+ },
460
494
  class: local.class,
461
495
  style: local.style,
462
496
  defaultClassName: "solidaria-SearchField",
@@ -544,6 +578,21 @@ export function SearchField(props: SearchFieldProps): JSX.Element {
544
578
  const children = local.children;
545
579
  return typeof children === "function" ? children(childRenderValues) : children;
546
580
  };
581
+ // Provide the description / errorMessage props as `TextContext` slots (mirrors
582
+ // react-aria-components' SearchField), so a `<Text slot="description">` /
583
+ // `<Text slot="errorMessage">` child picks up the `id` its `aria-describedby`
584
+ // references. Additive: existing consumers reading these off
585
+ // `SearchFieldContext` are unaffected.
586
+ const textSlots = {
587
+ slots: {
588
+ get description() {
589
+ return searchFieldAria.descriptionProps;
590
+ },
591
+ get errorMessage() {
592
+ return searchFieldAria.errorMessageProps;
593
+ },
594
+ },
595
+ };
547
596
 
548
597
  return (
549
598
  <FieldErrorContext.Provider value={fieldErrorContext}>
@@ -559,7 +608,9 @@ export function SearchField(props: SearchFieldProps): JSX.Element {
559
608
  data-required={ariaProps.isRequired || undefined}
560
609
  data-readonly={ariaProps.isReadOnly || undefined}
561
610
  >
562
- {fieldChildren()}
611
+ <Provider values={[[TextContext, textSlots]] as Array<[Context<unknown>, unknown]>}>
612
+ {fieldChildren()}
613
+ </Provider>
563
614
  </div>
564
615
  </SearchFieldContext.Provider>
565
616
  </FieldErrorContext.Provider>
@@ -607,6 +658,15 @@ export function SearchFieldInput(props: SearchFieldInputProps): JSX.Element {
607
658
  throw new Error("SearchFieldInput must be used within a SearchField");
608
659
  }
609
660
 
661
+ // Inside an <Autocomplete>, expose the ARIA attributes that identify the
662
+ // controlled collection and its virtually-focused option. value/onChange and the
663
+ // keyboard handlers are already merged upstream in SearchField(); here we only add
664
+ // the passthrough attributes that createTextField doesn't forward, and register the
665
+ // input element as the autocomplete inputRef so the beforeinput + reverse-path
666
+ // (aria-activedescendant mirror) listeners bind. Mirrors RAC's
667
+ // [InputContext, {...inputProps, ref: inputRef}].
668
+ const autocompleteInput = useAutocompleteInput();
669
+
610
670
  const { isFocused, isFocusVisible, focusProps } = createFocusRing();
611
671
 
612
672
  const { isHovered, hoverProps } = createHover({
@@ -645,12 +705,25 @@ export function SearchFieldInput(props: SearchFieldInputProps): JSX.Element {
645
705
  return rest;
646
706
  };
647
707
 
708
+ const autocompleteInputAttrs = (): Record<string, unknown> => {
709
+ if (!autocompleteInput) {
710
+ return {};
711
+ }
712
+ const inputProps = autocompleteInput.inputProps;
713
+ return {
714
+ "aria-controls": inputProps["aria-controls"],
715
+ "aria-autocomplete": inputProps["aria-autocomplete"],
716
+ "aria-activedescendant": inputProps["aria-activedescendant"](),
717
+ };
718
+ };
719
+
648
720
  const mergedInputProps = () =>
649
721
  ({
650
722
  ...domProps,
651
723
  ...cleanInputProps(),
652
724
  ...cleanFocusProps(),
653
725
  ...cleanHoverProps(),
726
+ ...autocompleteInputAttrs(),
654
727
  }) as Record<string, unknown>;
655
728
 
656
729
  onMount(() => {
@@ -701,6 +774,7 @@ export function SearchFieldInput(props: SearchFieldInputProps): JSX.Element {
701
774
  ref={(element) => {
702
775
  inputElement = element;
703
776
  context.setInputRef?.(element);
777
+ autocompleteInput?.inputRef(element);
704
778
  const ref = (domProps as { ref?: unknown }).ref;
705
779
  if (typeof ref === "function") {
706
780
  ref(element);
@@ -758,7 +832,9 @@ export function SearchFieldClearButton(props: SearchFieldClearButtonProps): JSX.
758
832
 
759
833
  const renderProps = useRenderProps(
760
834
  {
761
- children: props.children,
835
+ get children() {
836
+ return props.children;
837
+ },
762
838
  class: local.class,
763
839
  style: local.style,
764
840
  defaultClassName: "solidaria-SearchField-clear",
package/src/Select.tsx CHANGED
@@ -186,11 +186,15 @@ export interface SelectTriggerRenderProps {
186
186
  isFocusVisible: boolean;
187
187
  /** Whether the trigger is hovered. */
188
188
  isHovered: boolean;
189
+ /** Whether the trigger is pressed. */
190
+ isPressed: boolean;
189
191
  /** Whether the trigger is disabled. */
190
192
  isDisabled: boolean;
191
193
  }
192
194
 
193
195
  export interface SelectTriggerProps extends SlotProps {
196
+ /** A ref callback/object for the underlying trigger button element. */
197
+ ref?: RefLike<HTMLButtonElement>;
194
198
  /** The children of the trigger. A function may be provided to receive render props. */
195
199
  children?: RenderChildren<SelectTriggerRenderProps>;
196
200
  /** The CSS className for the element. */
@@ -241,6 +245,8 @@ export interface SelectOptionRenderProps {
241
245
  }
242
246
 
243
247
  export interface SelectOptionProps<T> extends Omit<AriaOptionProps, "children" | "key">, SlotProps {
248
+ /** A ref callback/object for the underlying option element. */
249
+ ref?: RefLike<HTMLDivElement>;
244
250
  /** The unique key for the option. */
245
251
  id: Key;
246
252
  /** The item value. */
@@ -269,6 +275,7 @@ interface SelectContextValue<T> {
269
275
  isOpen: Accessor<boolean>;
270
276
  isFocused: Accessor<boolean>;
271
277
  isFocusVisible: Accessor<boolean>;
278
+ isPressed: Accessor<boolean>;
272
279
  isDisabled: Accessor<boolean>;
273
280
  placeholder?: string;
274
281
  items: T[];
@@ -398,8 +405,16 @@ export function Select<T>(props: SelectProps<T>): JSX.Element {
398
405
  return clean as typeof ariaProps;
399
406
  });
400
407
 
401
- const { labelProps, triggerProps, valueProps, menuProps, isFocused, isFocusVisible, isOpen } =
402
- createSelect<T>(selectAriaProps, state);
408
+ const {
409
+ labelProps,
410
+ triggerProps,
411
+ valueProps,
412
+ menuProps,
413
+ isFocused,
414
+ isFocusVisible,
415
+ isOpen,
416
+ isPressed,
417
+ } = createSelect<T>(selectAriaProps, state);
403
418
 
404
419
  const { isHovered, hoverProps } = createHover({
405
420
  get isDisabled() {
@@ -579,6 +594,17 @@ export function Select<T>(props: SelectProps<T>): JSX.Element {
579
594
 
580
595
  return (
581
596
  <>
597
+ <Show when={ariaProps.label}>
598
+ <span {...cleanLabelProps()}>{ariaProps.label as JSX.Element}</span>
599
+ </Show>
600
+ {selectChildren}
601
+ {/*
602
+ The HiddenSelect (native `<select>` for form autofill/submission) renders
603
+ AFTER the trigger button, mirroring upstream RAC `Select` which emits
604
+ `{renderProps.children}` then `<HiddenSelect>` (Select.tsx:288-289). Order
605
+ matters for the DOM tab/focus trail: the visible button must precede the
606
+ form-only hidden control.
607
+ */}
582
608
  <div {...containerProps}>
583
609
  <select
584
610
  {...hiddenSelectProps}
@@ -652,10 +678,6 @@ export function Select<T>(props: SelectProps<T>): JSX.Element {
652
678
  />
653
679
  </Show>
654
680
  </div>
655
- <Show when={ariaProps.label}>
656
- <span {...cleanLabelProps()}>{ariaProps.label as JSX.Element}</span>
657
- </Show>
658
- {selectChildren}
659
681
  </>
660
682
  );
661
683
  };
@@ -711,6 +733,7 @@ export function Select<T>(props: SelectProps<T>): JSX.Element {
711
733
  isOpen,
712
734
  isFocused,
713
735
  isFocusVisible,
736
+ isPressed,
714
737
  isDisabled: resolveDisabled,
715
738
  placeholder: ariaProps.placeholder,
716
739
  items: stateProps.items,
@@ -731,17 +754,18 @@ export function Select<T>(props: SelectProps<T>): JSX.Element {
731
754
  * The trigger button for a select.
732
755
  */
733
756
  export function SelectTrigger(props: SelectTriggerProps): JSX.Element {
734
- const [local, domProps] = splitProps(props, ["class", "style", "slot", "children"]);
757
+ const [local, domProps] = splitProps(props, ["class", "style", "slot", "children", "ref"]);
735
758
 
736
759
  const context = useContext(SelectContext);
737
760
  if (!context) {
738
761
  throw new Error("SelectTrigger must be used within a Select");
739
762
  }
740
- const { isOpen, isFocused, isFocusVisible, state } = context;
763
+ const { isOpen, isFocused, isFocusVisible, isPressed, state } = context;
741
764
  let triggerRef: HTMLButtonElement | undefined;
742
765
  const setTriggerRef = (el: HTMLButtonElement) => {
743
766
  triggerRef = el;
744
767
  context.setTriggerRef(el);
768
+ assignRef(local.ref, el);
745
769
  };
746
770
 
747
771
  createEffect(() => {
@@ -761,12 +785,15 @@ export function SelectTrigger(props: SelectTriggerProps): JSX.Element {
761
785
  isFocused: isFocused(),
762
786
  isFocusVisible: isFocusVisible(),
763
787
  isHovered: isHovered(),
788
+ isPressed: isPressed(),
764
789
  isDisabled: state.isDisabled,
765
790
  }));
766
791
 
767
792
  const renderProps = useRenderProps(
768
793
  {
769
- children: props.children,
794
+ get children() {
795
+ return props.children;
796
+ },
770
797
  class: local.class,
771
798
  style: local.style,
772
799
  defaultClassName: "solidaria-Select-trigger",
@@ -871,7 +898,9 @@ export function SelectValue<T>(props: SelectValueProps<T>): JSX.Element {
871
898
 
872
899
  const renderProps = useRenderProps(
873
900
  {
874
- children: props.children ?? defaultSelectValueChildren,
901
+ get children() {
902
+ return props.children ?? defaultSelectValueChildren;
903
+ },
875
904
  class: local.class,
876
905
  style: local.style,
877
906
  defaultClassName: "solidaria-Select-value",
@@ -922,6 +951,14 @@ export function SelectListBox<T>(props: SelectListBoxProps<T>): JSX.Element {
922
951
  if (!isOpen()) {
923
952
  return;
924
953
  }
954
+ // On open the listbox takes collection focus. Upstream `useSelect` sets
955
+ // `menuProps.autoFocus = state.focusStrategy || true`, so the ListBox's
956
+ // `useSelectableCollection` auto-focuses on mount — setting the selection
957
+ // manager's `isFocused` true and focusing the selected option. Our
958
+ // `createListBox` reimplements keyboard nav inline (no `autoFocus` effect),
959
+ // so we set the manager focus here to match. Without it the selected option
960
+ // never paints its focus-visible background (`data-focused` stays unset).
961
+ state.selectionManager.setFocused(true);
925
962
  if (state.focusedKey() != null) {
926
963
  return;
927
964
  }
@@ -931,7 +968,7 @@ export function SelectListBox<T>(props: SelectListBoxProps<T>): JSX.Element {
931
968
  }
932
969
  });
933
970
 
934
- let listBoxRef: HTMLUListElement | undefined;
971
+ let listBoxRef: HTMLDivElement | undefined;
935
972
 
936
973
  createInteractOutside({
937
974
  ref: () => rootRef() ?? listBoxRef ?? null,
@@ -945,7 +982,14 @@ export function SelectListBox<T>(props: SelectListBoxProps<T>): JSX.Element {
945
982
  },
946
983
  });
947
984
 
948
- const { listBoxProps } = createListBox(
985
+ // Keep the hook result intact — destructuring `{ listBoxProps }` invokes the
986
+ // `get listBoxProps()` getter ONCE and freezes it (the Solid "destructuring a
987
+ // get-prop freezes reactivity" gotcha). The listbox `tabIndex` is computed from
988
+ // `focusedKey` (`focusedKey != null ? -1 : 0`); on open the effect above sets a
989
+ // focused key, so a frozen snapshot would leave the listbox tabbable (`0`) when
990
+ // upstream flips it to `-1`. Reading `listBoxHook.listBoxProps` per access keeps
991
+ // it reactive.
992
+ const listBoxHook = createListBox(
949
993
  {
950
994
  ...(menuProps as unknown as AriaListBoxProps),
951
995
  shouldSelectOnPressUp: true,
@@ -959,7 +1003,9 @@ export function SelectListBox<T>(props: SelectListBoxProps<T>): JSX.Element {
959
1003
  );
960
1004
 
961
1005
  const renderValues = createMemo<SelectListBoxRenderProps>(() => ({
962
- isFocused: state.isFocused(),
1006
+ // Focus within the listbox itself (the selection manager's focus state),
1007
+ // not the select-level trigger focus.
1008
+ isFocused: state.selectionManager.isFocused,
963
1009
  }));
964
1010
 
965
1011
  const renderProps = useRenderProps(
@@ -976,8 +1022,37 @@ export function SelectListBox<T>(props: SelectListBoxProps<T>): JSX.Element {
976
1022
  return rest;
977
1023
  };
978
1024
  const cleanListBoxProps = () => {
979
- const { ref: _ref2, ...rest } = listBoxProps as Record<string, unknown>;
980
- return rest;
1025
+ const {
1026
+ ref: _ref2,
1027
+ "aria-activedescendant": _activeDescendant,
1028
+ onFocus: _onFocus,
1029
+ ...rest
1030
+ } = listBoxHook.listBoxProps as Record<string, unknown>;
1031
+ // Faithful Select listbox focus model: the focused option receives REAL DOM
1032
+ // focus (the open effect above + `createSelectableItem`'s self-focus move
1033
+ // `document.activeElement` onto it), mirroring upstream `useSelect`. So the
1034
+ // listbox must (a) leave the tab sequence once an option is focused —
1035
+ // `useSelectableCollection` uses `tabIndex = focusedKey == null ? 0 : -1`
1036
+ // (useSelectableCollection.ts:687-690) — and (b) NOT expose
1037
+ // `aria-activedescendant`, which is the virtual-focus channel upstream Select
1038
+ // never uses. These are overridden here, not in the shared `createListBox`,
1039
+ // because the standalone `ListBox` keeps its container-focus model (focus
1040
+ // stays on the listbox, `aria-activedescendant` is its AT channel).
1041
+ //
1042
+ // We also drop `createListBox`'s container-focus TRAMPOLINE (`onFocus`): it
1043
+ // marshals the first key when the container is focused with `focusedKey ==
1044
+ // null`, which is exactly Select's deliberate click-open state (the open
1045
+ // effect sets `isFocused` true but leaves `focusedKey` null when nothing is
1046
+ // selected, so the first arrow enters the first item). Upstream's own
1047
+ // trampoline no-ops in this case because it guards on `manager.isFocused`
1048
+ // (already true); our shared guard uses `focusedKey == null` for the
1049
+ // standalone ListBox, so we strip it here to preserve Select's faithful
1050
+ // model. (Auto-selecting on focus under replace behavior would also toggle
1051
+ // the first item selected on open — the bug this override prevents.)
1052
+ return {
1053
+ ...rest,
1054
+ tabIndex: state.isDisabled ? undefined : state.focusedKey() != null ? -1 : 0,
1055
+ };
981
1056
  };
982
1057
 
983
1058
  const items = () => Array.from(state.collection());
@@ -997,20 +1072,25 @@ export function SelectListBox<T>(props: SelectListBoxProps<T>): JSX.Element {
997
1072
  });
998
1073
 
999
1074
  const listBox = () => (
1000
- <ul
1075
+ // Upstream RAC ListBox (and our own Menu.tsx) render a `<div role="listbox">`
1076
+ // over `<div role="option">` rows, NOT `<ul>`/`<li>` — the collection is
1077
+ // div-based for virtualization parity. `<ul>`/`<li>` here was a self-inflicted
1078
+ // structural divergence surfaced by the Picker recertification (D5/D6/D8 saw
1079
+ // `li[option]`/`ul[listbox]` where the React oracle sees `div`).
1080
+ <div
1001
1081
  ref={(el) => (listBoxRef = el)}
1002
1082
  {...domProps}
1003
1083
  {...cleanMenuProps()}
1004
1084
  {...cleanListBoxProps()}
1005
1085
  class={renderProps.class()}
1006
1086
  style={renderProps.style()}
1007
- data-focused={state.isFocused() || undefined}
1087
+ data-focused={state.selectionManager.isFocused || undefined}
1008
1088
  data-empty={state.collection().size === 0 || undefined}
1009
1089
  >
1010
1090
  {state.collection().size === 0 && local.renderEmptyState ? (
1011
- <li role="option" style={{ display: "contents" }} data-empty-state>
1091
+ <div role="option" style={{ display: "contents" }} data-empty-state>
1012
1092
  {local.renderEmptyState()}
1013
- </li>
1093
+ </div>
1014
1094
  ) : (
1015
1095
  <Show
1016
1096
  when={local.children}
@@ -1034,7 +1114,7 @@ export function SelectListBox<T>(props: SelectListBoxProps<T>): JSX.Element {
1034
1114
  {local.renderLoadMore?.()}
1035
1115
  </ListBoxLoadMoreItem>
1036
1116
  </Show>
1037
- </ul>
1117
+ </div>
1038
1118
  );
1039
1119
 
1040
1120
  return (
@@ -1064,6 +1144,7 @@ export function SelectOption<T>(props: SelectOptionProps<T>): JSX.Element {
1064
1144
  "id",
1065
1145
  "item",
1066
1146
  "textValue",
1147
+ "ref",
1067
1148
  ]);
1068
1149
 
1069
1150
  const context = useContext(SelectStateContext);
@@ -1072,6 +1153,11 @@ export function SelectOption<T>(props: SelectOptionProps<T>): JSX.Element {
1072
1153
  }
1073
1154
  const state = context as SelectState<T>;
1074
1155
  const selectContext = useContext(SelectContext) as SelectContextValue<T> | null;
1156
+ const [ref, setRefSignal] = createSignal<HTMLDivElement | null>(null);
1157
+ const setRef = (el: HTMLDivElement | null) => {
1158
+ setRefSignal(el);
1159
+ assignRef(local.ref, el as HTMLDivElement);
1160
+ };
1075
1161
 
1076
1162
  const optionAria = createOption<T>(
1077
1163
  {
@@ -1126,6 +1212,7 @@ export function SelectOption<T>(props: SelectOptionProps<T>): JSX.Element {
1126
1212
  }
1127
1213
  },
1128
1214
  },
1215
+ () => ref(),
1129
1216
  );
1130
1217
  const isOptionFocusVisible = () =>
1131
1218
  optionAria.isFocused() && (selectContext?.isFocusVisible() ?? optionAria.isFocusVisible());
@@ -1141,7 +1228,9 @@ export function SelectOption<T>(props: SelectOptionProps<T>): JSX.Element {
1141
1228
 
1142
1229
  const renderProps = useRenderProps(
1143
1230
  {
1144
- children: props.children,
1231
+ get children() {
1232
+ return props.children;
1233
+ },
1145
1234
  class: local.class,
1146
1235
  style: local.style,
1147
1236
  defaultClassName: "solidaria-Select-option",
@@ -1177,7 +1266,7 @@ export function SelectOption<T>(props: SelectOptionProps<T>): JSX.Element {
1177
1266
  selectOption();
1178
1267
  }
1179
1268
  });
1180
- }) as JSX.EventHandler<HTMLLIElement, MouseEvent>;
1269
+ }) as JSX.EventHandler<HTMLDivElement, MouseEvent>;
1181
1270
  return rest;
1182
1271
  };
1183
1272
  const selectOption = () => {
@@ -1199,7 +1288,10 @@ export function SelectOption<T>(props: SelectOptionProps<T>): JSX.Element {
1199
1288
 
1200
1289
  return (
1201
1290
  <SelectionIndicatorContext.Provider value={selectionIndicatorContext()}>
1202
- <li
1291
+ {/* `<div role="option">`, not `<li>` — see the SelectListBox note; upstream
1292
+ RAC options are div-based. */}
1293
+ <div
1294
+ ref={setRef}
1203
1295
  {...cleanOptionProps()}
1204
1296
  class={renderProps.class()}
1205
1297
  style={renderProps.style()}
@@ -1215,7 +1307,7 @@ export function SelectOption<T>(props: SelectOptionProps<T>): JSX.Element {
1215
1307
  ) : (
1216
1308
  renderProps.renderChildren()
1217
1309
  )}
1218
- </li>
1310
+ </div>
1219
1311
  </SelectionIndicatorContext.Provider>
1220
1312
  );
1221
1313
  }
@@ -1254,8 +1346,12 @@ function createSelectListStateAdapter<T>(state: SelectState<T>): ListState<T> {
1254
1346
 
1255
1347
  return {
1256
1348
  collection: state.collection,
1257
- isFocused: state.isFocused,
1258
- setFocused: state.setFocused,
1349
+ selectionManager: state.selectionManager,
1350
+ // Collection-level focus (the selection manager's), not the select-level
1351
+ // trigger focus — upstream listbox internals only ever read
1352
+ // state.selectionManager.isFocused.
1353
+ isFocused: () => state.selectionManager.isFocused,
1354
+ setFocused: (isFocused) => state.selectionManager.setFocused(isFocused),
1259
1355
  focusedKey: state.focusedKey,
1260
1356
  setFocusedKey: (key) => state.setFocusedKey(key ?? null),
1261
1357
  childFocusStrategy: () => null,
@@ -61,7 +61,9 @@ export function SelectionIndicator(props: SelectionIndicatorProps): JSX.Element
61
61
 
62
62
  const renderProps = useRenderProps(
63
63
  {
64
- children: local.children,
64
+ get children() {
65
+ return local.children;
66
+ },
65
67
  class: local.class,
66
68
  style: local.style,
67
69
  defaultClassName: "solidaria-SelectionIndicator",