@proyecto-viviana/solidaria-components 0.5.0 → 0.7.0-rc.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 (561) hide show
  1. package/LICENSE-APACHE-2.0 +201 -0
  2. package/NOTICE +91 -0
  3. package/README.md +4 -7
  4. package/dist/ActionBar.d.ts +2 -10
  5. package/dist/ActionBar.d.ts.map +1 -1
  6. package/dist/ActionBar.js +95 -59
  7. package/dist/ActionBar.js.map +1 -1
  8. package/dist/ActionBar.jsx +42 -15
  9. package/dist/ActionBar.jsx.map +1 -1
  10. package/dist/ActionGroup.d.ts +1 -12
  11. package/dist/ActionGroup.d.ts.map +1 -1
  12. package/dist/ActionGroup.js +66 -44
  13. package/dist/ActionGroup.js.map +1 -1
  14. package/dist/ActionGroup.jsx +25 -10
  15. package/dist/ActionGroup.jsx.map +1 -1
  16. package/dist/Alert.d.ts +4 -1
  17. package/dist/Alert.d.ts.map +1 -1
  18. package/dist/Alert.js +25 -17
  19. package/dist/Alert.js.map +1 -1
  20. package/dist/Alert.jsx +9 -5
  21. package/dist/Alert.jsx.map +1 -1
  22. package/dist/Autocomplete.d.ts +2 -9
  23. package/dist/Autocomplete.d.ts.map +1 -1
  24. package/dist/Autocomplete.js +18 -5
  25. package/dist/Autocomplete.js.map +1 -1
  26. package/dist/Autocomplete.jsx +20 -7
  27. package/dist/Autocomplete.jsx.map +1 -1
  28. package/dist/Breadcrumbs.d.ts +2 -7
  29. package/dist/Breadcrumbs.d.ts.map +1 -1
  30. package/dist/Breadcrumbs.js +71 -51
  31. package/dist/Breadcrumbs.js.map +1 -1
  32. package/dist/Breadcrumbs.jsx +25 -12
  33. package/dist/Breadcrumbs.jsx.map +1 -1
  34. package/dist/Button.d.ts +1 -7
  35. package/dist/Button.d.ts.map +1 -1
  36. package/dist/Button.js +125 -72
  37. package/dist/Button.js.map +1 -1
  38. package/dist/Button.jsx +105 -43
  39. package/dist/Button.jsx.map +1 -1
  40. package/dist/Calendar.d.ts +1 -7
  41. package/dist/Calendar.d.ts.map +1 -1
  42. package/dist/Calendar.js +297 -221
  43. package/dist/Calendar.js.map +1 -1
  44. package/dist/Calendar.jsx +52 -32
  45. package/dist/Calendar.jsx.map +1 -1
  46. package/dist/CalendarPicker.d.ts +1 -10
  47. package/dist/CalendarPicker.d.ts.map +1 -1
  48. package/dist/CalendarPicker.js +12 -0
  49. package/dist/CalendarPicker.js.map +1 -1
  50. package/dist/CalendarPicker.jsx +12 -0
  51. package/dist/CalendarPicker.jsx.map +1 -1
  52. package/dist/Checkbox.d.ts +2 -7
  53. package/dist/Checkbox.d.ts.map +1 -1
  54. package/dist/Checkbox.js +332 -270
  55. package/dist/Checkbox.js.map +1 -1
  56. package/dist/Checkbox.jsx +70 -77
  57. package/dist/Checkbox.jsx.map +1 -1
  58. package/dist/Collection.d.ts +33 -7
  59. package/dist/Collection.d.ts.map +1 -1
  60. package/dist/Collection.js +128 -74
  61. package/dist/Collection.js.map +1 -1
  62. package/dist/Collection.jsx +46 -7
  63. package/dist/Collection.jsx.map +1 -1
  64. package/dist/Color.d.ts +15 -20
  65. package/dist/Color.d.ts.map +1 -1
  66. package/dist/Color.js +572 -334
  67. package/dist/Color.js.map +1 -1
  68. package/dist/Color.jsx +205 -85
  69. package/dist/Color.jsx.map +1 -1
  70. package/dist/ColorEditor.d.ts +3 -1
  71. package/dist/ColorEditor.d.ts.map +1 -1
  72. package/dist/ColorEditor.js +147 -124
  73. package/dist/ColorEditor.js.map +1 -1
  74. package/dist/ColorEditor.jsx +4 -1
  75. package/dist/ColorEditor.jsx.map +1 -1
  76. package/dist/ComboBox.d.ts +31 -10
  77. package/dist/ComboBox.d.ts.map +1 -1
  78. package/dist/ComboBox.js +539 -274
  79. package/dist/ComboBox.js.map +1 -1
  80. package/dist/ComboBox.jsx +213 -70
  81. package/dist/ComboBox.jsx.map +1 -1
  82. package/dist/ContextualHelpTrigger.d.ts +1 -7
  83. package/dist/ContextualHelpTrigger.d.ts.map +1 -1
  84. package/dist/ContextualHelpTrigger.js +102 -72
  85. package/dist/ContextualHelpTrigger.js.map +1 -1
  86. package/dist/ContextualHelpTrigger.jsx +36 -16
  87. package/dist/ContextualHelpTrigger.jsx.map +1 -1
  88. package/dist/DateField.d.ts +2 -7
  89. package/dist/DateField.d.ts.map +1 -1
  90. package/dist/DateField.js +0 -2
  91. package/dist/DateField.jsx +0 -2
  92. package/dist/DateField2.js +194 -179
  93. package/dist/DateField2.js.map +1 -1
  94. package/dist/DateField2.jsx +58 -55
  95. package/dist/DateField2.jsx.map +1 -1
  96. package/dist/DatePicker.d.ts +7 -7
  97. package/dist/DatePicker.d.ts.map +1 -1
  98. package/dist/DatePicker.js +2 -2
  99. package/dist/DatePicker.jsx +2 -2
  100. package/dist/DatePicker2.js +357 -435
  101. package/dist/DatePicker2.js.map +1 -1
  102. package/dist/DatePicker2.jsx +109 -178
  103. package/dist/DatePicker2.jsx.map +1 -1
  104. package/dist/DateRangePickerContext.d.ts +7 -0
  105. package/dist/DateRangePickerContext.d.ts.map +1 -1
  106. package/dist/Dialog.d.ts +4 -9
  107. package/dist/Dialog.d.ts.map +1 -1
  108. package/dist/Dialog.js +168 -101
  109. package/dist/Dialog.js.map +1 -1
  110. package/dist/Dialog.jsx +75 -27
  111. package/dist/Dialog.jsx.map +1 -1
  112. package/dist/Disclosure.d.ts +1 -9
  113. package/dist/Disclosure.d.ts.map +1 -1
  114. package/dist/Disclosure.js +121 -79
  115. package/dist/Disclosure.js.map +1 -1
  116. package/dist/Disclosure.jsx +32 -19
  117. package/dist/Disclosure.jsx.map +1 -1
  118. package/dist/DragAndDrop.d.ts +9 -6
  119. package/dist/DragAndDrop.d.ts.map +1 -1
  120. package/dist/DragAndDrop.js +37 -22
  121. package/dist/DragAndDrop.js.map +1 -1
  122. package/dist/DragAndDrop.jsx +20 -4
  123. package/dist/DragAndDrop.jsx.map +1 -1
  124. package/dist/DragPreview.d.ts +1 -1
  125. package/dist/DragPreview.d.ts.map +1 -1
  126. package/dist/DropZone.d.ts +1 -7
  127. package/dist/DropZone.d.ts.map +1 -1
  128. package/dist/DropZone.js +74 -40
  129. package/dist/DropZone.js.map +1 -1
  130. package/dist/DropZone.jsx +24 -8
  131. package/dist/DropZone.jsx.map +1 -1
  132. package/dist/ElementTag.d.ts +9 -20
  133. package/dist/ElementTag.d.ts.map +1 -1
  134. package/dist/ElementTag.js +8 -210
  135. package/dist/ElementTag.js.map +1 -1
  136. package/dist/ElementTag.jsx +8 -57
  137. package/dist/ElementTag.jsx.map +1 -1
  138. package/dist/FieldError.d.ts +8 -7
  139. package/dist/FieldError.d.ts.map +1 -1
  140. package/dist/FieldError.js +33 -13
  141. package/dist/FieldError.js.map +1 -1
  142. package/dist/FieldError.jsx +20 -5
  143. package/dist/FieldError.jsx.map +1 -1
  144. package/dist/FileTrigger.d.ts +1 -7
  145. package/dist/FileTrigger.d.ts.map +1 -1
  146. package/dist/FileTrigger.js +30 -12
  147. package/dist/FileTrigger.js.map +1 -1
  148. package/dist/FileTrigger.jsx +15 -2
  149. package/dist/FileTrigger.jsx.map +1 -1
  150. package/dist/Focusable.d.ts +2 -8
  151. package/dist/Focusable.d.ts.map +1 -1
  152. package/dist/Focusable.js +23 -6
  153. package/dist/Focusable.js.map +1 -1
  154. package/dist/Focusable.jsx +22 -5
  155. package/dist/Focusable.jsx.map +1 -1
  156. package/dist/Form.d.ts +9 -8
  157. package/dist/Form.d.ts.map +1 -1
  158. package/dist/Form.js +66 -43
  159. package/dist/Form.js.map +1 -1
  160. package/dist/Form.jsx +36 -16
  161. package/dist/Form.jsx.map +1 -1
  162. package/dist/GridList.d.ts +5 -10
  163. package/dist/GridList.d.ts.map +1 -1
  164. package/dist/GridList.js +372 -243
  165. package/dist/GridList.js.map +1 -1
  166. package/dist/GridList.jsx +177 -99
  167. package/dist/GridList.jsx.map +1 -1
  168. package/dist/HiddenDateInput.d.ts +1 -7
  169. package/dist/HiddenDateInput.d.ts.map +1 -1
  170. package/dist/Icon.d.ts +4 -1
  171. package/dist/Icon.d.ts.map +1 -1
  172. package/dist/Icon.js +41 -37
  173. package/dist/Icon.js.map +1 -1
  174. package/dist/Icon.jsx +7 -3
  175. package/dist/Icon.jsx.map +1 -1
  176. package/dist/Keyboard.d.ts +1 -7
  177. package/dist/Keyboard.d.ts.map +1 -1
  178. package/dist/Keyboard.js +24 -11
  179. package/dist/Keyboard.js.map +1 -1
  180. package/dist/Keyboard.jsx +15 -2
  181. package/dist/Keyboard.jsx.map +1 -1
  182. package/dist/Label.d.ts +20 -0
  183. package/dist/Label.d.ts.map +1 -0
  184. package/dist/Label.js +60 -0
  185. package/dist/Label.js.map +1 -0
  186. package/dist/Label.jsx +47 -0
  187. package/dist/Label.jsx.map +1 -0
  188. package/dist/Landmark.d.ts +4 -1
  189. package/dist/Landmark.d.ts.map +1 -1
  190. package/dist/Landmark.js +10 -4
  191. package/dist/Landmark.js.map +1 -1
  192. package/dist/Landmark.jsx +5 -1
  193. package/dist/Landmark.jsx.map +1 -1
  194. package/dist/Link.d.ts +2 -7
  195. package/dist/Link.d.ts.map +1 -1
  196. package/dist/Link.js +56 -36
  197. package/dist/Link.js.map +1 -1
  198. package/dist/Link.jsx +52 -10
  199. package/dist/Link.jsx.map +1 -1
  200. package/dist/ListBox.d.ts +17 -13
  201. package/dist/ListBox.d.ts.map +1 -1
  202. package/dist/ListBox.js +647 -348
  203. package/dist/ListBox.js.map +1 -1
  204. package/dist/ListBox.jsx +339 -236
  205. package/dist/ListBox.jsx.map +1 -1
  206. package/dist/ListDropTargetDelegate.d.ts +3 -0
  207. package/dist/ListDropTargetDelegate.d.ts.map +1 -1
  208. package/dist/Menu.d.ts +39 -30
  209. package/dist/Menu.d.ts.map +1 -1
  210. package/dist/Menu.js +547 -368
  211. package/dist/Menu.js.map +1 -1
  212. package/dist/Menu.jsx +328 -230
  213. package/dist/Menu.jsx.map +1 -1
  214. package/dist/Meter.d.ts +6 -13
  215. package/dist/Meter.d.ts.map +1 -1
  216. package/dist/Meter.js +55 -18
  217. package/dist/Meter.js.map +1 -1
  218. package/dist/Meter.jsx +33 -8
  219. package/dist/Meter.jsx.map +1 -1
  220. package/dist/Modal.d.ts +1 -7
  221. package/dist/Modal.d.ts.map +1 -1
  222. package/dist/Modal.js +104 -56
  223. package/dist/Modal.js.map +1 -1
  224. package/dist/Modal.jsx +68 -38
  225. package/dist/Modal.jsx.map +1 -1
  226. package/dist/NumberField.d.ts +4 -7
  227. package/dist/NumberField.d.ts.map +1 -1
  228. package/dist/NumberField.js +243 -124
  229. package/dist/NumberField.js.map +1 -1
  230. package/dist/NumberField.jsx +115 -26
  231. package/dist/NumberField.jsx.map +1 -1
  232. package/dist/Popover.d.ts +15 -7
  233. package/dist/Popover.d.ts.map +1 -1
  234. package/dist/Popover.js +370 -181
  235. package/dist/Popover.js.map +1 -1
  236. package/dist/Popover.jsx +215 -82
  237. package/dist/Popover.jsx.map +1 -1
  238. package/dist/Pressable.d.ts +2 -8
  239. package/dist/Pressable.d.ts.map +1 -1
  240. package/dist/Pressable.js +23 -6
  241. package/dist/Pressable.js.map +1 -1
  242. package/dist/Pressable.jsx +22 -5
  243. package/dist/Pressable.jsx.map +1 -1
  244. package/dist/PreviewTrigger.d.ts +24 -0
  245. package/dist/PreviewTrigger.d.ts.map +1 -0
  246. package/dist/PreviewTrigger.js +128 -0
  247. package/dist/PreviewTrigger.js.map +1 -0
  248. package/dist/PreviewTrigger.jsx +117 -0
  249. package/dist/PreviewTrigger.jsx.map +1 -0
  250. package/dist/ProgressBar.d.ts +1 -7
  251. package/dist/ProgressBar.d.ts.map +1 -1
  252. package/dist/ProgressBar.js +34 -14
  253. package/dist/ProgressBar.js.map +1 -1
  254. package/dist/ProgressBar.jsx +17 -3
  255. package/dist/ProgressBar.jsx.map +1 -1
  256. package/dist/RadioGroup.d.ts +2 -7
  257. package/dist/RadioGroup.d.ts.map +1 -1
  258. package/dist/RadioGroup.js +388 -269
  259. package/dist/RadioGroup.js.map +1 -1
  260. package/dist/RadioGroup.jsx +110 -99
  261. package/dist/RadioGroup.jsx.map +1 -1
  262. package/dist/RangeCalendar.d.ts +3 -7
  263. package/dist/RangeCalendar.d.ts.map +1 -1
  264. package/dist/RangeCalendar.js +271 -202
  265. package/dist/RangeCalendar.js.map +1 -1
  266. package/dist/RangeCalendar.jsx +56 -37
  267. package/dist/RangeCalendar.jsx.map +1 -1
  268. package/dist/RouterProvider.d.ts +3 -9
  269. package/dist/RouterProvider.d.ts.map +1 -1
  270. package/dist/RouterProvider.js +15 -14
  271. package/dist/RouterProvider.js.map +1 -1
  272. package/dist/RouterProvider.jsx +14 -13
  273. package/dist/RouterProvider.jsx.map +1 -1
  274. package/dist/SearchField.d.ts +4 -7
  275. package/dist/SearchField.d.ts.map +1 -1
  276. package/dist/SearchField.js +191 -164
  277. package/dist/SearchField.js.map +1 -1
  278. package/dist/SearchField.jsx +69 -62
  279. package/dist/SearchField.jsx.map +1 -1
  280. package/dist/Select.d.ts +5 -10
  281. package/dist/Select.d.ts.map +1 -1
  282. package/dist/Select.js +565 -359
  283. package/dist/Select.js.map +1 -1
  284. package/dist/Select.jsx +281 -161
  285. package/dist/Select.jsx.map +1 -1
  286. package/dist/SelectionIndicator.d.ts +1 -4
  287. package/dist/SelectionIndicator.d.ts.map +1 -1
  288. package/dist/SelectionIndicator.js +29 -13
  289. package/dist/SelectionIndicator.js.map +1 -1
  290. package/dist/SelectionIndicator.jsx +18 -4
  291. package/dist/SelectionIndicator.jsx.map +1 -1
  292. package/dist/Separator.d.ts +1 -7
  293. package/dist/Separator.d.ts.map +1 -1
  294. package/dist/Separator.js +22 -6
  295. package/dist/Separator.js.map +1 -1
  296. package/dist/Separator.jsx +16 -3
  297. package/dist/Separator.jsx.map +1 -1
  298. package/dist/SharedElementTransition.d.ts +1 -10
  299. package/dist/SharedElementTransition.d.ts.map +1 -1
  300. package/dist/SharedElementTransition.js +68 -40
  301. package/dist/SharedElementTransition.js.map +1 -1
  302. package/dist/SharedElementTransition.jsx +49 -25
  303. package/dist/SharedElementTransition.jsx.map +1 -1
  304. package/dist/Slider.d.ts +2 -8
  305. package/dist/Slider.d.ts.map +1 -1
  306. package/dist/Slider.js +155 -97
  307. package/dist/Slider.js.map +1 -1
  308. package/dist/Slider.jsx +25 -12
  309. package/dist/Slider.jsx.map +1 -1
  310. package/dist/StepList.d.ts +1 -7
  311. package/dist/StepList.d.ts.map +1 -1
  312. package/dist/StepList.js +112 -68
  313. package/dist/StepList.js.map +1 -1
  314. package/dist/StepList.jsx +58 -20
  315. package/dist/StepList.jsx.map +1 -1
  316. package/dist/Switch.d.ts +2 -9
  317. package/dist/Switch.d.ts.map +1 -1
  318. package/dist/Switch.js +164 -114
  319. package/dist/Switch.js.map +1 -1
  320. package/dist/Switch.jsx +26 -13
  321. package/dist/Switch.jsx.map +1 -1
  322. package/dist/Table.d.ts +2 -1
  323. package/dist/Table.d.ts.map +1 -1
  324. package/dist/Table.js +689 -592
  325. package/dist/Table.js.map +1 -1
  326. package/dist/Table.jsx +317 -237
  327. package/dist/Table.jsx.map +1 -1
  328. package/dist/Tabs.d.ts +2 -7
  329. package/dist/Tabs.d.ts.map +1 -1
  330. package/dist/Tabs.js +278 -293
  331. package/dist/Tabs.js.map +1 -1
  332. package/dist/Tabs.jsx +68 -66
  333. package/dist/Tabs.jsx.map +1 -1
  334. package/dist/TagGroup.d.ts +4 -11
  335. package/dist/TagGroup.d.ts.map +1 -1
  336. package/dist/TagGroup.js +153 -115
  337. package/dist/TagGroup.js.map +1 -1
  338. package/dist/TagGroup.jsx +37 -24
  339. package/dist/TagGroup.jsx.map +1 -1
  340. package/dist/Text.d.ts +3 -3
  341. package/dist/Text.d.ts.map +1 -1
  342. package/dist/Text.js +24 -7
  343. package/dist/Text.js.map +1 -1
  344. package/dist/Text.jsx +17 -5
  345. package/dist/Text.jsx.map +1 -1
  346. package/dist/TextField.d.ts +3 -16
  347. package/dist/TextField.d.ts.map +1 -1
  348. package/dist/TextField.js +104 -129
  349. package/dist/TextField.js.map +1 -1
  350. package/dist/TextField.jsx +76 -102
  351. package/dist/TextField.jsx.map +1 -1
  352. package/dist/TimeField.d.ts +2 -15
  353. package/dist/TimeField.d.ts.map +1 -1
  354. package/dist/TimeField.js +86 -102
  355. package/dist/TimeField.js.map +1 -1
  356. package/dist/TimeField.jsx +32 -49
  357. package/dist/TimeField.jsx.map +1 -1
  358. package/dist/Toast.d.ts +10 -13
  359. package/dist/Toast.d.ts.map +1 -1
  360. package/dist/Toast.js +209 -108
  361. package/dist/Toast.js.map +1 -1
  362. package/dist/Toast.jsx +127 -22
  363. package/dist/Toast.jsx.map +1 -1
  364. package/dist/ToggleButton.d.ts +1 -7
  365. package/dist/ToggleButton.d.ts.map +1 -1
  366. package/dist/ToggleButton.js +57 -35
  367. package/dist/ToggleButton.js.map +1 -1
  368. package/dist/ToggleButton.jsx +26 -12
  369. package/dist/ToggleButton.jsx.map +1 -1
  370. package/dist/ToggleButtonGroup.d.ts +1 -7
  371. package/dist/ToggleButtonGroup.d.ts.map +1 -1
  372. package/dist/ToggleButtonGroup.js +59 -44
  373. package/dist/ToggleButtonGroup.js.map +1 -1
  374. package/dist/ToggleButtonGroup.jsx +25 -12
  375. package/dist/ToggleButtonGroup.jsx.map +1 -1
  376. package/dist/TokenField.d.ts +52 -0
  377. package/dist/TokenField.d.ts.map +1 -0
  378. package/dist/TokenField.js +301 -0
  379. package/dist/TokenField.js.map +1 -0
  380. package/dist/TokenField.jsx +197 -0
  381. package/dist/TokenField.jsx.map +1 -0
  382. package/dist/Toolbar.d.ts +2 -7
  383. package/dist/Toolbar.d.ts.map +1 -1
  384. package/dist/Toolbar.js +35 -16
  385. package/dist/Toolbar.js.map +1 -1
  386. package/dist/Toolbar.jsx +15 -2
  387. package/dist/Toolbar.jsx.map +1 -1
  388. package/dist/Tooltip.d.ts +2 -7
  389. package/dist/Tooltip.d.ts.map +1 -1
  390. package/dist/Tooltip.js +105 -68
  391. package/dist/Tooltip.js.map +1 -1
  392. package/dist/Tooltip.jsx +60 -36
  393. package/dist/Tooltip.jsx.map +1 -1
  394. package/dist/Tree.d.ts +8 -11
  395. package/dist/Tree.d.ts.map +1 -1
  396. package/dist/Tree.js +486 -339
  397. package/dist/Tree.js.map +1 -1
  398. package/dist/Tree.jsx +155 -107
  399. package/dist/Tree.jsx.map +1 -1
  400. package/dist/Virtualizer.d.ts +39 -9
  401. package/dist/Virtualizer.d.ts.map +1 -1
  402. package/dist/Virtualizer.js +2 -2
  403. package/dist/Virtualizer.jsx +2 -2
  404. package/dist/Virtualizer2.js +491 -136
  405. package/dist/Virtualizer2.js.map +1 -1
  406. package/dist/Virtualizer2.jsx +455 -122
  407. package/dist/Virtualizer2.jsx.map +1 -1
  408. package/dist/VirtualizerLayouts.d.ts +55 -2
  409. package/dist/VirtualizerLayouts.d.ts.map +1 -1
  410. package/dist/VisuallyHidden.d.ts +4 -3
  411. package/dist/VisuallyHidden.d.ts.map +1 -1
  412. package/dist/VisuallyHidden.js +18 -11
  413. package/dist/VisuallyHidden.js.map +1 -1
  414. package/dist/VisuallyHidden.jsx +15 -9
  415. package/dist/VisuallyHidden.jsx.map +1 -1
  416. package/dist/contexts.d.ts +25 -0
  417. package/dist/contexts.d.ts.map +1 -1
  418. package/dist/contexts.js +3 -0
  419. package/dist/contexts.js.map +1 -1
  420. package/dist/contexts.jsx +3 -0
  421. package/dist/contexts.jsx.map +1 -1
  422. package/dist/index.d.ts +11 -9
  423. package/dist/index.d.ts.map +1 -1
  424. package/dist/index.js +14 -11
  425. package/dist/index.jsx +14 -11
  426. package/dist/intl/index.d.ts +16 -0
  427. package/dist/intl/index.d.ts.map +1 -0
  428. package/dist/intl.js +212 -0
  429. package/dist/intl.js.map +1 -0
  430. package/dist/intl.jsx +212 -0
  431. package/dist/intl.jsx.map +1 -0
  432. package/dist/useDragAndDrop.d.ts +4 -2
  433. package/dist/useDragAndDrop.d.ts.map +1 -1
  434. package/dist/useDragAndDrop2.js +39 -21
  435. package/dist/useDragAndDrop2.js.map +1 -1
  436. package/dist/useDragAndDrop2.jsx +39 -21
  437. package/dist/useDragAndDrop2.jsx.map +1 -1
  438. package/dist/utils.d.ts +28 -9
  439. package/dist/utils.d.ts.map +1 -1
  440. package/dist/utils.js +96 -24
  441. package/dist/utils.js.map +1 -1
  442. package/dist/utils.jsx +81 -24
  443. package/dist/utils.jsx.map +1 -1
  444. package/dist/virtualizer/Layout.d.ts +9 -0
  445. package/dist/virtualizer/Layout.d.ts.map +1 -1
  446. package/dist/virtualizer/Layout.js +23 -2
  447. package/dist/virtualizer/Layout.js.map +1 -1
  448. package/dist/virtualizer/Layout.jsx +23 -2
  449. package/dist/virtualizer/Layout.jsx.map +1 -1
  450. package/package.json +29 -10
  451. package/src/ActionBar.tsx +50 -24
  452. package/src/ActionGroup.tsx +31 -19
  453. package/src/Alert.tsx +10 -4
  454. package/src/Autocomplete.tsx +24 -15
  455. package/src/Breadcrumbs.tsx +32 -16
  456. package/src/Button.tsx +182 -67
  457. package/src/Calendar.tsx +65 -47
  458. package/src/CalendarPicker.tsx +16 -1
  459. package/src/Checkbox.tsx +84 -116
  460. package/src/Collection.tsx +84 -3
  461. package/src/Color.tsx +282 -104
  462. package/src/ColorEditor.tsx +5 -1
  463. package/src/ComboBox.tsx +384 -109
  464. package/src/ContextualHelpTrigger.tsx +47 -41
  465. package/src/DateField.tsx +74 -106
  466. package/src/DatePicker.tsx +156 -352
  467. package/src/DateRangePickerContext.tsx +8 -0
  468. package/src/Dialog.tsx +105 -38
  469. package/src/Disclosure.tsx +29 -19
  470. package/src/DragAndDrop.tsx +43 -8
  471. package/src/DragPreview.tsx +20 -1
  472. package/src/DropZone.tsx +32 -18
  473. package/src/ElementTag.tsx +14 -104
  474. package/src/FieldError.tsx +39 -7
  475. package/src/FileTrigger.tsx +18 -3
  476. package/src/Focusable.tsx +27 -6
  477. package/src/Form.tsx +57 -11
  478. package/src/GridList.tsx +233 -141
  479. package/src/HiddenDateInput.tsx +19 -3
  480. package/src/Icon.tsx +8 -2
  481. package/src/Keyboard.tsx +18 -2
  482. package/src/Label.tsx +77 -0
  483. package/src/Landmark.tsx +6 -1
  484. package/src/Link.tsx +65 -19
  485. package/src/ListBox.tsx +645 -468
  486. package/src/ListDropTargetDelegate.ts +4 -0
  487. package/src/Menu.tsx +512 -349
  488. package/src/Meter.tsx +42 -8
  489. package/src/Modal.tsx +85 -42
  490. package/src/NumberField.tsx +161 -48
  491. package/src/Popover.tsx +424 -148
  492. package/src/Pressable.tsx +27 -6
  493. package/src/PreviewTrigger.tsx +171 -0
  494. package/src/ProgressBar.tsx +25 -3
  495. package/src/RadioGroup.tsx +230 -161
  496. package/src/RangeCalendar.tsx +75 -63
  497. package/src/RouterProvider.tsx +24 -14
  498. package/src/SearchField.tsx +118 -121
  499. package/src/Select.tsx +454 -274
  500. package/src/SelectionIndicator.tsx +21 -3
  501. package/src/Separator.tsx +17 -1
  502. package/src/SharedElementTransition.tsx +115 -97
  503. package/src/Slider.tsx +35 -17
  504. package/src/StepList.tsx +71 -32
  505. package/src/Switch.tsx +45 -29
  506. package/src/Table.tsx +446 -380
  507. package/src/Tabs.tsx +132 -155
  508. package/src/TagGroup.tsx +53 -40
  509. package/src/Text.tsx +23 -6
  510. package/src/TextField.tsx +118 -159
  511. package/src/TimeField.tsx +34 -95
  512. package/src/Toast.tsx +141 -67
  513. package/src/ToggleButton.tsx +33 -15
  514. package/src/ToggleButtonGroup.tsx +27 -9
  515. package/src/TokenField.tsx +379 -0
  516. package/src/Toolbar.tsx +19 -9
  517. package/src/Tooltip.tsx +126 -84
  518. package/src/Tree.tsx +233 -173
  519. package/src/Virtualizer.tsx +400 -138
  520. package/src/VirtualizerLayouts.ts +211 -26
  521. package/src/VisuallyHidden.tsx +22 -8
  522. package/src/contexts.ts +13 -0
  523. package/src/index.ts +32 -11
  524. package/src/intl/ar-AE.json +6 -0
  525. package/src/intl/bg-BG.json +6 -0
  526. package/src/intl/cs-CZ.json +6 -0
  527. package/src/intl/da-DK.json +6 -0
  528. package/src/intl/de-DE.json +6 -0
  529. package/src/intl/el-GR.json +6 -0
  530. package/src/intl/en-US.json +6 -0
  531. package/src/intl/es-ES.json +6 -0
  532. package/src/intl/et-EE.json +6 -0
  533. package/src/intl/fi-FI.json +6 -0
  534. package/src/intl/fr-FR.json +6 -0
  535. package/src/intl/he-IL.json +6 -0
  536. package/src/intl/hr-HR.json +6 -0
  537. package/src/intl/hu-HU.json +6 -0
  538. package/src/intl/index.ts +125 -0
  539. package/src/intl/it-IT.json +6 -0
  540. package/src/intl/ja-JP.json +6 -0
  541. package/src/intl/ko-KR.json +6 -0
  542. package/src/intl/lt-LT.json +6 -0
  543. package/src/intl/lv-LV.json +6 -0
  544. package/src/intl/nb-NO.json +6 -0
  545. package/src/intl/nl-NL.json +6 -0
  546. package/src/intl/pl-PL.json +6 -0
  547. package/src/intl/pt-BR.json +6 -0
  548. package/src/intl/pt-PT.json +6 -0
  549. package/src/intl/ro-RO.json +6 -0
  550. package/src/intl/ru-RU.json +6 -0
  551. package/src/intl/sk-SK.json +6 -0
  552. package/src/intl/sl-SI.json +6 -0
  553. package/src/intl/sr-SP.json +6 -0
  554. package/src/intl/sv-SE.json +6 -0
  555. package/src/intl/tr-TR.json +6 -0
  556. package/src/intl/uk-UA.json +6 -0
  557. package/src/intl/zh-CN.json +6 -0
  558. package/src/intl/zh-TW.json +6 -0
  559. package/src/useDragAndDrop.ts +30 -32
  560. package/src/utils.tsx +124 -68
  561. package/src/virtualizer/Layout.ts +29 -0
@@ -1 +1 @@
1
- {"version":3,"file":"DateField2.js","names":["createContext","useContext","createDateRangePicker","DateFieldState","DateValue","RangeCalendarState","DateRangePickerFieldContextValue","state","aria","labelProps","Record","inputProps","hiddenInputProps","descriptionProps","errorMessageProps","DateRangePickerContextValue","calendarState","startFieldState","endFieldState","startFieldContext","endFieldContext","overlayState","isOpen","open","close","toggle","triggerRef","HTMLElement","setTriggerRef","element","pickerAria","ReturnType","DateRangePickerContext","useDateRangePickerContext","context","Error","JSX","Context","createContext","createEffect","createMemo","createSignal","onCleanup","splitProps","useContext","Index","Show","createDateField","createDateSegment","createFocusRing","createHover","createVisuallyHidden","mergeProps","AriaDateFieldProps","parseDate","parseDateTime","toCalendarDate","toCalendarDateTime","toLocalTimeZone","createDateFieldState","access","DateFieldState","DateFieldStateProps","DateSegment","DateSegmentType","CalendarDate","DateValue","RenderChildren","ClassNameOrFunction","StyleOrFunction","SlotProps","useRenderProps","dataAttr","useIsHydrated","Provider","TextContext","FormContext","FormProps","DateRangePickerContext","DateRangePickerFieldContextValue","DateFieldRenderProps","isDisabled","isReadOnly","isRequired","isInvalid","DateFieldProps","Omit","T","children","Element","segment","class","style","locale","DateInputRenderProps","isFocused","DateInputProps","onPointerDownCapture","EventHandler","HTMLDivElement","PointerEvent","DateSegmentRenderProps","isHovered","isFocusVisible","isPlaceholder","type","text","DateSegmentProps","DateFieldContextValue","state","aria","labelProps","Record","inputProps","hiddenInputProps","descriptionProps","errorMessageProps","DateFieldContext","DateFieldStateContext","withFormValidationBehavior","props","P","formContext","validationBehavior","Proxy","get","target","property","receiver","localValue","Reflect","undefined","has","ownKeys","keys","Set","add","Array","from","getOwnPropertyDescriptor","descriptor","enumerable","configurable","useDateFieldContext","context","Error","useDateInputContext","slot","dateFieldContext","dateRangePickerContext","startFieldContext","endFieldContext","DateField","isHydrated","_$createComponent","when","fallback","_$getNextElement","_tmpl$","DateFieldInner","_$mergeProps","__formContext","DateFieldInnerProps","mergedProps","local","stateProps","rest","fieldRef","setFieldRef","validationInputRef","setValidationInputRef","HTMLInputElement","fieldAria","description","errorMessage","inputRef","renderValues","renderProps","defaultClassName","textSlots","slots","value","fieldProps","ref","_el$2","_tmpl$2","_$use","_$insert","values","_$effect","_p$","_v$","_v$2","_v$3","_v$4","_v$5","_v$6","e","_$className","t","_$style","a","_$setAttribute","o","i","n","RootHiddenDateInput","autoComplete","name","HIDDEN_DATE_SEGMENTS","HIDDEN_TIME_SEGMENTS","HIDDEN_GRANULARITY_MAP","hour","minute","second","RootHiddenDateInputProps","visuallyHiddenProps","position","top","left","granularity","inputStep","g","inputType","dateValue","toString","onChange","Event","event","targetString","currentTarget","targetValue","timeSegments","includes","slice","setSegment","setValue","_el$3","_tmpl$3","_el$4","firstChild","_$spread","addEventListener","_v$7","_v$8","_v$9","_v$0","_v$1","_$setProperty","_$runHydrationEvents","DateInput","setIsFocused","setInputRef","inputDivProps","onFocusIn","onFocusOut","element","handler","listener","capture","removeEventListener","_el$5","data-disabled","data-focused","each","segments","liveSegment","_t","key","PropertyKey","_el$6","_tmpl$4","InputHTMLAttributes","segmentRef","setSegmentRef","HTMLElement","segmentAria","focusProps","hoverProps","getChildren","renderChildren","segmentElementProps","segmentProps","_el$7","_tmpl$5","data-placeholder","data-invalid","data-readonly","data-type","data-hovered","data-focus-visible","DateFieldLabelProps","DateFieldLabel","_el$8","DateFieldDescriptionProps","DateFieldDescription","_el$9","DateFieldErrorMessageProps","DateFieldErrorMessage","_el$0"],"sources":["../src/DateRangePickerContext.tsx","../src/DateField.tsx"],"sourcesContent":["import { createContext, useContext } from \"solid-js\";\nimport { type createDateRangePicker } from \"@proyecto-viviana/solidaria\";\nimport {\n type DateFieldState,\n type DateValue,\n type RangeCalendarState,\n} from \"@proyecto-viviana/solid-stately\";\n\nexport interface DateRangePickerFieldContextValue {\n state: DateFieldState<DateValue>;\n aria: {\n labelProps: Record<string, unknown>;\n inputProps: Record<string, unknown>;\n /** Optional hidden validation <input> props (unused by the range fields). */\n hiddenInputProps?: Record<string, unknown>;\n descriptionProps: Record<string, unknown>;\n errorMessageProps: Record<string, unknown>;\n };\n}\n\nexport interface DateRangePickerContextValue {\n calendarState: RangeCalendarState<DateValue>;\n startFieldState: DateFieldState<DateValue>;\n endFieldState: DateFieldState<DateValue>;\n startFieldContext: DateRangePickerFieldContextValue;\n endFieldContext: DateRangePickerFieldContextValue;\n overlayState: {\n isOpen: boolean;\n open: () => void;\n close: () => void;\n toggle: () => void;\n };\n triggerRef: () => HTMLElement | null;\n setTriggerRef: (element: HTMLElement | null) => void;\n pickerAria: ReturnType<typeof createDateRangePicker>;\n}\n\nexport const DateRangePickerContext = createContext<DateRangePickerContextValue | null>(null);\n\nexport function useDateRangePickerContext(): DateRangePickerContextValue {\n const context = useContext(DateRangePickerContext);\n if (!context) {\n throw new Error(\"DateRangePicker components must be used within a DateRangePicker\");\n }\n return context;\n}\n","/**\n * DateField component for solidaria-components\n *\n * Pre-wired headless date field component with segment-based editing.\n * Port of react-aria-components/src/DateField.tsx\n */\n\nimport {\n type JSX,\n type Context,\n createContext,\n createEffect,\n createMemo,\n createSignal,\n onCleanup,\n splitProps,\n useContext,\n Index,\n Show,\n} from \"solid-js\";\nimport {\n createDateField,\n createDateSegment,\n createFocusRing,\n createHover,\n createVisuallyHidden,\n mergeProps,\n type AriaDateFieldProps,\n} from \"@proyecto-viviana/solidaria\";\nimport {\n parseDate,\n parseDateTime,\n toCalendarDate,\n toCalendarDateTime,\n toLocalTimeZone,\n} from \"@internationalized/date\";\nimport {\n createDateFieldState,\n access,\n type DateFieldState,\n type DateFieldStateProps,\n type DateSegment as DateSegmentType,\n type CalendarDate,\n type DateValue,\n} from \"@proyecto-viviana/solid-stately\";\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n dataAttr,\n useIsHydrated,\n Provider,\n} from \"./utils\";\nimport { TextContext } from \"./Text\";\nimport { FormContext, type FormProps } from \"./Form\";\nimport {\n DateRangePickerContext,\n type DateRangePickerFieldContextValue,\n} from \"./DateRangePickerContext\";\n\nexport interface DateFieldRenderProps {\n /** Whether the field is disabled. */\n isDisabled: boolean;\n /** Whether the field is read-only. */\n isReadOnly: boolean;\n /** Whether the field is required. */\n isRequired: boolean;\n /** Whether the field is invalid. */\n isInvalid: boolean;\n}\n\nexport interface DateFieldProps<T extends DateValue = DateValue>\n extends\n Omit<AriaDateFieldProps, \"id\" | \"isDisabled\" | \"isReadOnly\" | \"isRequired\">,\n Omit<DateFieldStateProps<T>, \"locale\">,\n SlotProps {\n /** The children of the component. */\n children?: JSX.Element | ((segment: DateSegmentType) => JSX.Element);\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<DateFieldRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<DateFieldRenderProps>;\n /** The locale to use for formatting. */\n locale?: string;\n}\n\nexport interface DateInputRenderProps {\n /** Whether the input is disabled. */\n isDisabled: boolean;\n /** Whether the input is focused. */\n isFocused: boolean;\n}\n\nexport interface DateInputProps extends SlotProps {\n /** The children of the component (render function receiving segments). */\n children?: (segment: DateSegmentType) => JSX.Element;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<DateInputRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<DateInputRenderProps>;\n /** Handler called during the pointer down capture phase. */\n onPointerDownCapture?: JSX.EventHandler<HTMLDivElement, PointerEvent>;\n}\n\nexport interface DateSegmentRenderProps {\n /** Whether the segment is hovered. */\n isHovered: boolean;\n /** Whether the segment is focused. */\n isFocused: boolean;\n /** Whether the segment is keyboard focused. */\n isFocusVisible: boolean;\n /** Whether the segment is a placeholder. */\n isPlaceholder: boolean;\n /** Whether the segment is read only. */\n isReadOnly: boolean;\n /** Whether the segment is disabled. */\n isDisabled: boolean;\n /** Whether the segment is invalid. */\n isInvalid: boolean;\n /** The segment type. */\n type: DateSegmentType[\"type\"];\n /** The text to display. */\n text: string;\n}\n\nexport interface DateSegmentProps extends SlotProps {\n /** The segment data. */\n segment: DateSegmentType;\n /** The children of the component. A function may be provided to receive render props. */\n children?: RenderChildren<DateSegmentRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<DateSegmentRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<DateSegmentRenderProps>;\n}\n\nexport interface DateFieldContextValue {\n state: DateFieldState<DateValue>;\n aria: {\n labelProps: Record<string, unknown>;\n inputProps: Record<string, unknown>;\n // The hidden validation <input> props (native type/required/onChange). Only\n // the standalone DateField provides these; DatePicker/DateRangePicker manage\n // their own hidden inputs, so this stays optional and its <input> is gated.\n hiddenInputProps?: Record<string, unknown>;\n descriptionProps: Record<string, unknown>;\n errorMessageProps: Record<string, unknown>;\n };\n}\n\nexport const DateFieldContext = createContext<DateFieldContextValue | null>(null);\nexport const DateFieldStateContext = createContext<DateFieldState<DateValue> | null>(null);\n\nfunction withFormValidationBehavior<P extends object>(props: P, formContext: FormProps | null): P {\n if (!formContext?.validationBehavior) {\n return props;\n }\n\n return new Proxy(props, {\n get(target, property, receiver) {\n const localValue = Reflect.get(target, property, receiver);\n if (property === \"validationBehavior\" && localValue === undefined) {\n return formContext.validationBehavior;\n }\n\n return localValue;\n },\n has(target, property) {\n return (\n Reflect.has(target, property) ||\n (property === \"validationBehavior\" && formContext.validationBehavior !== undefined)\n );\n },\n ownKeys(target) {\n const keys = new Set(Reflect.ownKeys(target));\n if (formContext.validationBehavior !== undefined) {\n keys.add(\"validationBehavior\");\n }\n\n return Array.from(keys);\n },\n getOwnPropertyDescriptor(target, property) {\n const descriptor = Reflect.getOwnPropertyDescriptor(target, property);\n if (descriptor) {\n return descriptor;\n }\n\n if (property === \"validationBehavior\" && formContext.validationBehavior !== undefined) {\n return {\n enumerable: true,\n configurable: true,\n get: () => formContext.validationBehavior,\n };\n }\n\n return undefined;\n },\n });\n}\n\nexport function useDateFieldContext(): DateFieldContextValue {\n const context = useContext(DateFieldContext);\n if (!context) {\n throw new Error(\"DateField components must be used within a DateField\");\n }\n return context;\n}\n\nfunction useDateInputContext(\n slot?: string,\n): DateFieldContextValue | DateRangePickerFieldContextValue {\n const dateFieldContext = useContext(DateFieldContext);\n if (dateFieldContext) {\n return dateFieldContext;\n }\n\n const dateRangePickerContext = useContext(DateRangePickerContext);\n if (dateRangePickerContext && slot === \"start\") {\n return dateRangePickerContext.startFieldContext;\n }\n if (dateRangePickerContext && slot === \"end\") {\n return dateRangePickerContext.endFieldContext;\n }\n\n throw new Error(\"DateInput components must be used within a DateField or DateRangePicker slot\");\n}\n\n/**\n * A date field allows users to enter and edit date values using a keyboard.\n *\n * @example\n * ```tsx\n * <DateField label=\"Date\">\n * <Label>Date</Label>\n * <DateInput>\n * {(segment) => <DateSegment segment={segment} />}\n * </DateInput>\n * </DateField>\n * ```\n */\nexport function DateField<T extends DateValue = CalendarDate>(\n props: DateFieldProps<T>,\n): JSX.Element {\n // Use hydration-safe pattern for client-only rendering\n const isHydrated = useIsHydrated();\n const formContext = useContext(FormContext);\n\n return (\n <Show\n when={isHydrated()}\n fallback={\n <div class=\"solidaria-DateField solidaria-DateField--placeholder\" aria-hidden=\"true\" />\n }\n >\n <DateFieldInner {...props} __formContext={formContext} />\n </Show>\n );\n}\n\ntype DateFieldInnerProps<T extends DateValue = DateValue> = DateFieldProps<T> & {\n __formContext?: FormProps | null;\n};\n\n/**\n * Internal DateField component that renders after client mount.\n */\nfunction DateFieldInner<T extends DateValue = CalendarDate>(\n props: DateFieldInnerProps<T>,\n): JSX.Element {\n const formContext = props.__formContext ?? useContext(FormContext);\n const mergedProps = withFormValidationBehavior(props, formContext);\n const [local, stateProps, rest] = splitProps(\n mergedProps,\n [\"children\", \"class\", \"style\", \"slot\", \"__formContext\"],\n [\n \"value\",\n \"defaultValue\",\n \"onChange\",\n \"minValue\",\n \"maxValue\",\n \"isInvalid\",\n \"isDisabled\",\n \"isReadOnly\",\n \"isRequired\",\n \"locale\",\n \"granularity\",\n \"hourCycle\",\n \"hideTimeZone\",\n \"placeholderValue\",\n \"shouldForceLeadingZeros\",\n \"validationState\",\n \"validationBehavior\",\n \"validate\",\n \"description\",\n \"errorMessage\",\n \"isDateUnavailable\",\n ],\n );\n\n const [fieldRef, setFieldRef] = createSignal<HTMLDivElement | null>(null);\n // Ref to the hidden validation <input> (the DateInput's `<Input>` sibling).\n // RAC's DateField creates this ref, passes it to useDateField, and threads it\n // onto the <Input> via InputContext so useFormReset/useFormValidation target\n // that element. We mirror that: create it here, hand it to createDateField\n // below, and attach it to the same input through the context getter.\n const [validationInputRef, setValidationInputRef] =\n createSignal<HTMLInputElement | null>(null);\n\n const state = createDateFieldState(stateProps);\n\n const fieldAria = createDateField(\n () => ({\n ...(rest as Record<string, unknown>),\n // RAC threads the same props into both useDateFieldState and useDateField;\n // these live in `stateProps` here, so forward them so the field hook can\n // build aria-disabled and the native validation <input> (type/required).\n // access() unwraps the MaybeAccessor state-prop declarations.\n isDisabled: access(stateProps.isDisabled),\n isReadOnly: access(stateProps.isReadOnly),\n isRequired: access(stateProps.isRequired),\n // Mirror RAC DateField: validationBehavior ?? formValidationBehavior ??\n // 'native'. withFormValidationBehavior already folds the form default into\n // stateProps.validationBehavior; the last `?? 'native'` is the standalone\n // default that flips the hidden input to type=\"text\".\n validationBehavior: stateProps.validationBehavior ?? \"native\",\n description: stateProps.description,\n errorMessage: stateProps.errorMessage,\n // Form-reset + native constraint validation are wired onto this input by\n // createDateField (see its createFormReset/createFormValidation calls),\n // exactly as RAC's useDateField wires them onto props.inputRef.\n inputRef: () => validationInputRef() ?? undefined,\n }),\n state as unknown as DateFieldState<DateValue>,\n fieldRef,\n );\n\n const renderValues = createMemo<DateFieldRenderProps>(() => ({\n isDisabled: state.isDisabled(),\n isReadOnly: state.isReadOnly(),\n isRequired: state.isRequired(),\n isInvalid: state.isInvalid(),\n }));\n\n const renderProps = useRenderProps(\n {\n class: local.class,\n style: local.style,\n defaultClassName: \"solidaria-DateField\",\n },\n renderValues,\n );\n\n const textSlots = {\n slots: {\n get description() {\n return fieldAria.descriptionProps;\n },\n get errorMessage() {\n return fieldAria.errorMessageProps;\n },\n },\n };\n\n return (\n <DateFieldStateContext.Provider value={state as unknown as DateFieldState<DateValue>}>\n <DateFieldContext.Provider\n value={{\n state: state as unknown as DateFieldState<DateValue>,\n // Read through getters so consumers see the LIVE memo values, not a\n // snapshot frozen at first render. `createDescription` appends the\n // value-description id via a deferred effect; the group's\n // aria-describedby only picks it up if the props stay reactive here.\n aria: {\n get labelProps() {\n return fieldAria.labelProps;\n },\n // The segment group props (role=\"group\", aria-labelledby, unicode-bidi\n // isolate style, arrow-key nav, focus-within handlers) are routed to the\n // DateInput element — mirroring RAC, where useDateField.fieldProps is\n // published through GroupContext and consumed by the DateInput <Group>.\n // The outer wrapper stays roleless.\n get inputProps() {\n return fieldAria.fieldProps;\n },\n // The REAL hidden validation input props (type/hidden/required/onChange\n // under native validation). Rendered as the DateInput's <input> sibling.\n // Thread the validation-input ref through here — mirroring RAC's\n // `[InputContext, {...inputProps, ref: inputRef}]` — so createDateField's\n // form-reset/validation wiring resolves to the mounted element.\n get hiddenInputProps() {\n return mergeProps(fieldAria.inputProps, { ref: setValidationInputRef });\n },\n get descriptionProps() {\n return fieldAria.descriptionProps;\n },\n get errorMessageProps() {\n return fieldAria.errorMessageProps;\n },\n },\n }}\n >\n <div\n ref={setFieldRef}\n class={renderProps.class()}\n style={renderProps.style()}\n data-disabled={dataAttr(state.isDisabled())}\n data-readonly={dataAttr(state.isReadOnly())}\n data-required={dataAttr(state.isRequired())}\n data-invalid={dataAttr(state.isInvalid())}\n >\n <Provider values={[[TextContext, textSlots]] as Array<[Context<unknown>, unknown]>}>\n {local.children as JSX.Element}\n </Provider>\n </div>\n {/*\n RAC renders <HiddenDateInput> UNCONDITIONALLY at the DateField root\n (react-aria-components DateField.mjs). It is NOT a validation input — it\n is a clipped, aria-hidden, tabIndex={-1} native date input that mirrors\n the value for browser autofill. Its `form=\"\"` detaches it from form\n submission (the DateInput's <Input> above is what submits), so it never\n double-counts in FormData. It renders regardless of `name` — hence no\n <Show> gate — which is why it appears in the focus trail as the trailing\n tabindex=\"-1\" element.\n */}\n <RootHiddenDateInput\n autoComplete={(rest as Record<string, unknown>).autoComplete as string | undefined}\n name={(rest as Record<string, unknown>).name as string | undefined}\n isDisabled={state.isDisabled()}\n state={state as unknown as DateFieldState<DateValue>}\n />\n </DateFieldContext.Provider>\n </DateFieldStateContext.Provider>\n );\n}\n\nconst HIDDEN_DATE_SEGMENTS: readonly string[] = [\"day\", \"month\", \"year\"];\nconst HIDDEN_TIME_SEGMENTS: readonly string[] = [\"hour\", \"minute\", \"second\"];\nconst HIDDEN_GRANULARITY_MAP: Record<string, number> = { hour: 1, minute: 2, second: 3 };\n\ninterface RootHiddenDateInputProps {\n autoComplete?: string;\n name?: string;\n isDisabled?: boolean;\n state: DateFieldState<DateValue>;\n}\n\n/**\n * The always-rendered hidden date input at the DateField root — a faithful port\n * of react-aria-components' HiddenDateInput (private/HiddenDateInput.mjs). It is\n * NOT a validation input: it is a clipped, aria-hidden, tabIndex={-1} native\n * date input that mirrors the current value for browser autofill. `form=\"\"`\n * detaches it from form submission (the DateInput's <Input> submits), so it\n * never double-counts in FormData. RAC renders it unconditionally, which is why\n * it appears as the trailing tabindex=\"-1\" element in the focus trail.\n */\nfunction RootHiddenDateInput(props: RootHiddenDateInputProps): JSX.Element {\n // RAC uses useVisuallyHidden with position:fixed/top:0/left:0 to keep the\n // clipped input from scrolling the page.\n const { visuallyHiddenProps } = createVisuallyHidden(() => ({\n style: { position: \"fixed\", top: \"0\", left: \"0\" },\n }));\n\n const granularity = () => props.state.granularity ?? \"day\";\n const inputStep = () => {\n const g = granularity();\n if (g === \"second\") return 1;\n if (g === \"hour\") return 3600;\n return 60;\n };\n const inputType = () => (granularity() === \"day\" ? \"date\" : \"datetime-local\");\n const dateValue = () => {\n const value = props.state.value();\n if (!value) return \"\";\n if (granularity() === \"day\") return toCalendarDate(value).toString();\n return toCalendarDateTime(\n \"timeZone\" in value ? toLocalTimeZone(value) : value,\n ).toString();\n };\n\n const onChange: JSX.EventHandler<HTMLInputElement, Event> = (event) => {\n const targetString = (event.currentTarget.value ?? \"\").toString();\n if (!targetString) return;\n try {\n const g = granularity();\n const targetValue = (g === \"day\" ? parseDate(targetString) : parseDateTime(targetString)) as\n unknown as Record<string, number>;\n let timeSegments = HIDDEN_TIME_SEGMENTS;\n if (HIDDEN_TIME_SEGMENTS.includes(g)) {\n timeSegments = HIDDEN_TIME_SEGMENTS.slice(0, HIDDEN_GRANULARITY_MAP[g]);\n }\n const state = props.state as unknown as {\n setSegment?: (type: string, value: number) => void;\n setValue: (value: unknown) => void;\n };\n // Only DateFieldState (not DatePickerState) exposes setSegment; validate\n // each parsed segment before committing the new value, mirroring RAC.\n if (typeof state.setSegment === \"function\") {\n for (const type in targetValue) {\n if (HIDDEN_DATE_SEGMENTS.includes(type)) state.setSegment(type, targetValue[type]);\n if (timeSegments.includes(type)) state.setSegment(type, targetValue[type]);\n }\n }\n state.setValue(targetValue);\n } catch {\n // ignore unparseable autofill values\n }\n };\n\n return (\n <div\n {...(visuallyHiddenProps() as unknown as Record<string, unknown>)}\n aria-hidden=\"true\"\n data-testid=\"hidden-dateinput-container\"\n >\n <input\n tabIndex={-1}\n autocomplete={props.autoComplete}\n disabled={props.isDisabled}\n type={inputType()}\n form=\"\"\n name={props.name}\n step={inputStep()}\n value={dateValue()}\n onChange={onChange}\n />\n </div>\n );\n}\n\n/**\n * The input area containing date segments.\n */\nexport function DateInput(props: DateInputProps): JSX.Element {\n const context = useDateInputContext(props.slot);\n const { state, aria } = context;\n const [isFocused, setIsFocused] = createSignal(false);\n const [inputRef, setInputRef] = createSignal<HTMLDivElement | null>(null);\n\n const renderValues = createMemo<DateInputRenderProps>(() => ({\n isDisabled: state.isDisabled(),\n isFocused: isFocused(),\n }));\n\n const renderProps = useRenderProps(\n {\n class: props.class,\n style: props.style,\n defaultClassName: \"solidaria-DateInput\",\n },\n renderValues,\n );\n\n // The group props (role=\"group\", aria-labelledby, unicode-bidi:isolate,\n // arrow-key nav, focus-within handlers) carry the field's own `style` and\n // focus handlers. Merge — not clobber — so the group keeps its unicode-bidi\n // isolation and the local isFocused signal chains onto the field's\n // focusWithin handlers. Solid onFocus/onBlur do not bubble, so track focus\n // via onFocusIn/onFocusOut.\n const inputDivProps = createMemo(() =>\n mergeProps(aria.inputProps, {\n onFocusIn: () => setIsFocused(true),\n onFocusOut: () => setIsFocused(false),\n style: renderProps.style(),\n }),\n );\n\n createEffect(() => {\n const element = inputRef();\n const handler = props.onPointerDownCapture;\n if (!element || !handler) return;\n\n const listener = (event: PointerEvent) =>\n (handler as unknown as (event: PointerEvent) => void)(event);\n element.addEventListener(\"pointerdown\", listener, { capture: true });\n onCleanup(() => element.removeEventListener(\"pointerdown\", listener, { capture: true }));\n });\n\n return (\n <DateFieldContext.Provider value={context as DateFieldContextValue}>\n <div\n ref={setInputRef}\n {...inputDivProps()}\n class={renderProps.class()}\n data-disabled={dataAttr(state.isDisabled())}\n data-focused={dataAttr(isFocused())}\n >\n {/*\n <Index> keys by position, not identity, so each DateSegment instance\n stays alive across keystrokes (state.segments() re-mints segment\n objects every edit). A stable Proxy forwards property reads to the\n live per-index accessor so the child stays reactive.\n */}\n <Index each={state.segments()}>\n {(segment) => {\n const liveSegment = new Proxy({} as DateSegmentType, {\n get: (_t, key) => (segment() as unknown as Record<PropertyKey, unknown>)[key],\n has: (_t, key) => key in (segment() as object),\n });\n return props.children?.(liveSegment);\n }}\n </Index>\n </div>\n {/*\n The hidden validation input, sibling of the group — mirrors RAC's\n DateInputInner `<><Group/><Input/></>`. Under native validation\n (default) `useDateField` publishes it as `type=\"text\" hidden required`\n so browser constraint validation fires; under aria validation it stays\n `type=\"hidden\"`. Both carry the ISO value string. Only the standalone\n DateField supplies these props; inside a DatePicker/DateRangePicker the\n field is presentation and its owner renders the hidden input instead.\n */}\n <Show when={aria.hiddenInputProps}>\n {(hiddenInputProps) => (\n <input {...(hiddenInputProps() as JSX.InputHTMLAttributes<HTMLInputElement>)} />\n )}\n </Show>\n </DateFieldContext.Provider>\n );\n}\n\n/**\n * A segment of a date field (year, month, day, etc.).\n */\nexport function DateSegment(props: DateSegmentProps): JSX.Element {\n const { state } = useDateFieldContext();\n const [segmentRef, setSegmentRef] = createSignal<HTMLElement | null>(null);\n\n const segmentAria = createDateSegment(\n {\n get segment() {\n return props.segment;\n },\n },\n state,\n segmentRef,\n );\n\n // Mirror upstream DateSegment: focus/focus-visible come from useFocusRing()\n // and hover from useHover({isDisabled: field disabled || literal segment}).\n // Literals never hover; the field being disabled suppresses hover entirely.\n const { isFocused, isFocusVisible, focusProps } = createFocusRing();\n const { isHovered, hoverProps } = createHover(() => ({\n isDisabled: state.isDisabled() || props.segment.type === \"literal\",\n }));\n\n const renderValues = createMemo<DateSegmentRenderProps>(() => ({\n isHovered: isHovered(),\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible(),\n isPlaceholder: props.segment.isPlaceholder,\n isReadOnly: state.isReadOnly(),\n isDisabled: state.isDisabled(),\n isInvalid: state.isInvalid(),\n type: props.segment.type,\n text: props.segment.text,\n }));\n\n const renderProps = useRenderProps(\n {\n get children() {\n return props.children;\n },\n class: props.class,\n style: props.style,\n defaultClassName: \"solidaria-DateSegment\",\n },\n renderValues,\n );\n\n // Determine children content - avoid Show for SSR hydration compatibility\n const getChildren = () => {\n if (typeof props.children === \"function\") {\n return renderProps.renderChildren();\n }\n return props.segment.text;\n };\n\n // Mirror upstream's `mergeProps(filterDOMProps(otherProps), segmentProps,\n // focusProps, hoverProps)`: the segment's behavior/style props (caretColor +\n // RTL direction) chain with the focus-ring and hover handlers so neither\n // clobbers the other.\n const segmentElementProps = createMemo(() =>\n mergeProps(\n segmentAria.segmentProps,\n focusProps as Record<string, unknown>,\n hoverProps as Record<string, unknown>,\n {\n style: renderProps.style(),\n },\n ),\n );\n\n return (\n <span\n ref={setSegmentRef}\n {...segmentElementProps()}\n class={renderProps.class()}\n data-placeholder={props.segment.isPlaceholder || undefined}\n data-invalid={state.isInvalid() || undefined}\n data-readonly={state.isReadOnly() || undefined}\n data-disabled={state.isDisabled() || undefined}\n data-type={props.segment.type}\n data-hovered={isHovered() || undefined}\n data-focused={isFocused() || undefined}\n data-focus-visible={isFocusVisible() || undefined}\n >\n {getChildren()}\n </span>\n );\n}\n\nexport interface DateFieldLabelProps {\n children?: JSX.Element;\n class?: string;\n}\n\nexport function DateFieldLabel(props: DateFieldLabelProps): JSX.Element {\n const { aria } = useDateFieldContext();\n return (\n <span {...aria.labelProps} class={props.class}>\n {props.children}\n </span>\n );\n}\n\nexport interface DateFieldDescriptionProps {\n children?: JSX.Element;\n class?: string;\n}\n\nexport function DateFieldDescription(props: DateFieldDescriptionProps): JSX.Element {\n const { aria } = useDateFieldContext();\n return (\n <span {...aria.descriptionProps} class={props.class}>\n {props.children}\n </span>\n );\n}\n\nexport interface DateFieldErrorMessageProps {\n children?: JSX.Element;\n class?: string;\n}\n\nexport function DateFieldErrorMessage(props: DateFieldErrorMessageProps): JSX.Element {\n const { aria } = useDateFieldContext();\n return (\n <span {...aria.errorMessageProps} class={props.class}>\n {props.children}\n </span>\n );\n}\n\nexport type { DateFieldState, DateSegmentType };\n"],"mappings":";;;;;;;;;AAqCA,MAAagC,yBAAyBhC,cAAkD,IAAI;AAE5F,SAAgBiC,4BAAyD;CACvE,MAAMC,UAAUjC,WAAW+B,sBAAsB;CACjD,IAAI,CAACE,SACH,MAAM,IAAIC,MAAM,kEAAkE;CAEpF,OAAOD;AACT;;;;;;;;;;AC2GA,MAAamF,mBAAmB/E,cAA4C,IAAI;AAChF,MAAagF,wBAAwBhF,cAAgD,IAAI;AAEzF,SAASiF,2BAA6CC,OAAUE,aAAkC;CAChG,IAAI,CAACA,aAAaC,oBAChB,OAAOH;CAGT,OAAO,IAAII,MAAMJ,OAAO;EACtBK,IAAIC,QAAQC,UAAUC,UAAU;GAC9B,MAAMC,aAAaC,QAAQL,IAAIC,QAAQC,UAAUC,QAAQ;GACzD,IAAID,aAAa,wBAAwBE,eAAeE,KAAAA,GACtD,OAAOT,YAAYC;GAGrB,OAAOM;EACT;EACAG,IAAIN,QAAQC,UAAU;GACpB,OACEG,QAAQE,IAAIN,QAAQC,QAAQ,KAC3BA,aAAa,wBAAwBL,YAAYC,uBAAuBQ,KAAAA;EAE7E;EACAE,QAAQP,QAAQ;GACd,MAAMQ,OAAO,IAAIC,IAAIL,QAAQG,QAAQP,MAAM,CAAC;GAC5C,IAAIJ,YAAYC,uBAAuBQ,KAAA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G,aAChDhL,MAAMhC,QAAQ;EAAAiK,mBAAA;EAAA,OAAA+C;CAAA,EAAA,CAAA;AAGrB;AAOA,SAAgBE,sBAAsBlL,OAAgD;CACpF,MAAM,EAAEV,SAASiC,oBAAoB;CACrC,cAAA;EAAA,IAAA4J,QAAA9I,eAAA+H,OAAA;EAAA3C,OAAA0D,OAAA3I,iBACYlD,KAAKM,mBAAiB,EAAA,KAAA,WAAA;GAAA,OAASI,MAAM7B;EAAK,EAAA,CAAA,GAAA,OAAA,IAAA;EAAAgG,OAAAgH,aACjDnL,MAAMhC,QAAQ;EAAAiK,mBAAA;EAAA,OAAAkD;CAAA,EAAA,CAAA;AAGrB"}
1
+ {"version":3,"file":"DateField2.js","names":["<DateFieldInner {...props} />","<DateFieldStateContext value={state as unknown as DateFieldState<DateValue>}>\n <DateFieldContext\n value={{\n state: state as unknown as DateFieldState<DateValue>,\n // Read through getters so consumers see the LIVE memo values, not a\n // snapshot frozen at first render. `createDescription` appends the\n // value-description id via a deferred effect; the group's\n // aria-describedby only picks it up if the props stay reactive here.\n aria: {\n get labelProps() {\n return fieldAria.labelProps;\n },\n // The segment group props (role=\"group\", aria-labelledby, unicode-bidi\n // isolate style, arrow-key nav, focus-within handlers) are routed to the\n // DateInput element — mirroring RAC, where useDateField.fieldProps is\n // published through GroupContext and consumed by the DateInput <Group>.\n // The outer wrapper stays roleless.\n get inputProps() {\n return fieldAria.fieldProps;\n },\n // The REAL hidden validation input props (type/hidden/required/onChange\n // under native validation). Rendered as the DateInput's <input> sibling.\n // Thread the validation-input ref through here — mirroring RAC's\n // `[InputContext, {...inputProps, ref: inputRef}]` — so createDateField's\n // form-reset/validation wiring resolves to the mounted element.\n get hiddenInputProps() {\n return mergeProps(fieldAria.inputProps, { ref: setValidationInputRef });\n },\n get descriptionProps() {\n return fieldAria.descriptionProps;\n },\n get errorMessageProps() {\n return fieldAria.errorMessageProps;\n },\n },\n }}\n >\n <div\n ref={setFieldRef}\n class={renderProps.class()}\n style={renderProps.style()}\n data-disabled={dataAttr(state.isDisabled())}\n data-readonly={dataAttr(state.isReadOnly())}\n data-required={dataAttr(state.isRequired())}\n data-invalid={dataAttr(state.isInvalid())}\n >\n <Provider values={[[TextContext, textSlots]] as Array<[Context<unknown>, unknown]>}>\n {local.children as JSX.Element}\n </Provider>\n </div>\n {/*\n RAC renders <HiddenDateInput> UNCONDITIONALLY at the DateField root\n (react-aria-components DateField.mjs). It is NOT a validation input — it\n is a clipped, aria-hidden, tabindex={-1} native date input that mirrors\n the value for browser autofill. Its `form=\"\"` detaches it from form\n submission (the DateInput's <Input> above is what submits), so it never\n double-counts in FormData. It renders regardless of `name` — hence no\n <Show> gate — which is why it appears in the focus trail as the trailing\n tabindex=\"-1\" element.\n */}\n <RootHiddenDateInput\n autoComplete={(rest as Record<string, unknown>).autoComplete as string | undefined}\n name={(rest as Record<string, unknown>).name as string | undefined}\n isDisabled={state.isDisabled()}\n state={state as unknown as DateFieldState<DateValue>}\n />\n </DateFieldContext>\n </DateFieldStateContext>","value={state as unknown as DateFieldState<DateValue>}","<DateFieldContext\n value={{\n state: state as unknown as DateFieldState<DateValue>,\n // Read through getters so consumers see the LIVE memo values, not a\n // snapshot frozen at first render. `createDescription` appends the\n // value-description id via a deferred effect; the group's\n // aria-describedby only picks it up if the props stay reactive here.\n aria: {\n get labelProps() {\n return fieldAria.labelProps;\n },\n // The segment group props (role=\"group\", aria-labelledby, unicode-bidi\n // isolate style, arrow-key nav, focus-within handlers) are routed to the\n // DateInput element — mirroring RAC, where useDateField.fieldProps is\n // published through GroupContext and consumed by the DateInput <Group>.\n // The outer wrapper stays roleless.\n get inputProps() {\n return fieldAria.fieldProps;\n },\n // The REAL hidden validation input props (type/hidden/required/onChange\n // under native validation). Rendered as the DateInput's <input> sibling.\n // Thread the validation-input ref through here — mirroring RAC's\n // `[InputContext, {...inputProps, ref: inputRef}]` — so createDateField's\n // form-reset/validation wiring resolves to the mounted element.\n get hiddenInputProps() {\n return mergeProps(fieldAria.inputProps, { ref: setValidationInputRef });\n },\n get descriptionProps() {\n return fieldAria.descriptionProps;\n },\n get errorMessageProps() {\n return fieldAria.errorMessageProps;\n },\n },\n }}\n >\n <div\n ref={setFieldRef}\n class={renderProps.class()}\n style={renderProps.style()}\n data-disabled={dataAttr(state.isDisabled())}\n data-readonly={dataAttr(state.isReadOnly())}\n data-required={dataAttr(state.isRequired())}\n data-invalid={dataAttr(state.isInvalid())}\n >\n <Provider values={[[TextContext, textSlots]] as Array<[Context<unknown>, unknown]>}>\n {local.children as JSX.Element}\n </Provider>\n </div>\n {/*\n RAC renders <HiddenDateInput> UNCONDITIONALLY at the DateField root\n (react-aria-components DateField.mjs). It is NOT a validation input — it\n is a clipped, aria-hidden, tabindex={-1} native date input that mirrors\n the value for browser autofill. Its `form=\"\"` detaches it from form\n submission (the DateInput's <Input> above is what submits), so it never\n double-counts in FormData. It renders regardless of `name` — hence no\n <Show> gate — which is why it appears in the focus trail as the trailing\n tabindex=\"-1\" element.\n */}\n <RootHiddenDateInput\n autoComplete={(rest as Record<string, unknown>).autoComplete as string | undefined}\n name={(rest as Record<string, unknown>).name as string | undefined}\n isDisabled={state.isDisabled()}\n state={state as unknown as DateFieldState<DateValue>}\n />\n </DateFieldContext>","value={{\n state: state as unknown as DateFieldState<DateValue>,\n // Read through getters so consumers see the LIVE memo values, not a\n // snapshot frozen at first render. `createDescription` appends the\n // value-description id via a deferred effect; the group's\n // aria-describedby only picks it up if the props stay reactive here.\n aria: {\n get labelProps() {\n return fieldAria.labelProps;\n },\n // The segment group props (role=\"group\", aria-labelledby, unicode-bidi\n // isolate style, arrow-key nav, focus-within handlers) are routed to the\n // DateInput element — mirroring RAC, where useDateField.fieldProps is\n // published through GroupContext and consumed by the DateInput <Group>.\n // The outer wrapper stays roleless.\n get inputProps() {\n return fieldAria.fieldProps;\n },\n // The REAL hidden validation input props (type/hidden/required/onChange\n // under native validation). Rendered as the DateInput's <input> sibling.\n // Thread the validation-input ref through here — mirroring RAC's\n // `[InputContext, {...inputProps, ref: inputRef}]` — so createDateField's\n // form-reset/validation wiring resolves to the mounted element.\n get hiddenInputProps() {\n return mergeProps(fieldAria.inputProps, { ref: setValidationInputRef });\n },\n get descriptionProps() {\n return fieldAria.descriptionProps;\n },\n get errorMessageProps() {\n return fieldAria.errorMessageProps;\n },\n },\n }}","ref={setFieldRef}","<Provider values={[[TextContext, textSlots]] as Array<[Context<unknown>, unknown]>}>\n {local.children as JSX.Element}\n </Provider>","values={[[TextContext, textSlots]] as Array<[Context<unknown>, unknown]>}","style={renderProps.style()}","data-disabled={dataAttr(state.isDisabled())}","data-readonly={dataAttr(state.isReadOnly())}","data-required={dataAttr(state.isRequired())}","data-invalid={dataAttr(state.isInvalid())}","<RootHiddenDateInput\n autoComplete={(rest as Record<string, unknown>).autoComplete as string | undefined}\n name={(rest as Record<string, unknown>).name as string | undefined}\n isDisabled={state.isDisabled()}\n state={state as unknown as DateFieldState<DateValue>}\n />","state={state as unknown as DateFieldState<DateValue>}","disabled={props.isDisabled}","type={inputType()}","name={props.name}","step={inputStep()}","value={dateValue()}","<div\n {...(visuallyHiddenProps() as unknown as Record<string, unknown>)}\n aria-hidden=\"true\"\n data-testid=\"hidden-dateinput-container\"\n >\n <input\n tabindex={-1}\n autocomplete={props.autoComplete}\n disabled={props.isDisabled}\n type={inputType()}\n form=\"\"\n name={props.name}\n step={inputStep()}\n value={dateValue()}\n onChange={onChange}\n />\n </div>","<DateFieldContext value={context as DateFieldContextValue}>\n <div\n ref={setInputRef}\n {...inputDivProps()}\n class={renderProps.class()}\n data-disabled={dataAttr(state.isDisabled())}\n data-focused={dataAttr(isFocused())}\n >\n {/*\n <For keyed={false}> keys by position, not identity, so each DateSegment\n instance stays alive across keystrokes (state.segments() re-mints\n segment objects every edit). A stable Proxy forwards property reads to\n the live per-index accessor so the child stays reactive.\n */}\n <For each={state.segments()} keyed={false}>\n {(segment) => {\n const liveSegment = new Proxy({} as DateSegmentType, {\n get: (_t, key) => (segment() as unknown as Record<PropertyKey, unknown>)[key],\n has: (_t, key) => key in (segment() as object),\n });\n return props.children?.(liveSegment);\n }}\n </For>\n </div>\n {/*\n The hidden validation input, sibling of the group — mirrors RAC's\n DateInputInner `<><Group/><Input/></>`. Under native validation\n (default) `useDateField` publishes it as `type=\"text\" hidden required`\n so browser constraint validation fires; under aria validation it stays\n `type=\"hidden\"`. Both carry the ISO value string. Only the standalone\n DateField supplies these props; inside a DatePicker/DateRangePicker the\n field is presentation and its owner renders the hidden input instead.\n */}\n <Show when={aria.hiddenInputProps}>\n {(hiddenInputProps) => (\n <input {...(hiddenInputProps() as JSX.InputHTMLAttributes<HTMLInputElement>)} />\n )}\n </Show>\n </DateFieldContext>","value={context as DateFieldContextValue}","ref={setInputRef}","<For each={state.segments()} keyed={false}>\n {(segment) => {\n const liveSegment = new Proxy({} as DateSegmentType, {\n get: (_t, key) => (segment() as unknown as Record<PropertyKey, unknown>)[key],\n has: (_t, key) => key in (segment() as object),\n });\n return props.children?.(liveSegment);\n }}\n </For>","keyed={false}","<Show when={aria.hiddenInputProps}>\n {(hiddenInputProps) => (\n <input {...(hiddenInputProps() as JSX.InputHTMLAttributes<HTMLInputElement>)} />\n )}\n </Show>","ref={setSegmentRef}","{getChildren()}","<span\n ref={setSegmentRef}\n {...segmentElementProps()}\n class={renderProps.class()}\n data-placeholder={dataAttr(props.segment.isPlaceholder)}\n data-invalid={dataAttr(state.isInvalid())}\n data-readonly={dataAttr(state.isReadOnly())}\n data-disabled={dataAttr(state.isDisabled())}\n data-type={props.segment.type}\n data-hovered={dataAttr(isHovered())}\n data-focused={dataAttr(isFocused())}\n data-focus-visible={dataAttr(isFocusVisible())}\n >\n {getChildren()}\n </span>","{props.children}","<span {...aria.labelProps} class={props.class}>\n {props.children}\n </span>","<span {...aria.descriptionProps} class={props.class}>\n {props.children}\n </span>","<span {...aria.errorMessageProps} class={props.class}>\n {props.children}\n </span>"],"sources":["../src/DateRangePickerContext.tsx","../src/DateField.tsx"],"sourcesContent":["/**\n * Local Solid context shared by the date-range picker fields.\n * The owning DatePicker module records the upstream component source.\n */\n\nimport { createContext, useContext } from \"solid-js\";\nimport { type createDateRangePicker } from \"@proyecto-viviana/solidaria\";\nimport {\n type DateFieldState,\n type DateValue,\n type RangeCalendarState,\n} from \"@proyecto-viviana/solid-stately\";\n\nexport interface DateRangePickerFieldContextValue {\n state: DateFieldState<DateValue>;\n aria: {\n labelProps: Record<string, unknown>;\n inputProps: Record<string, unknown>;\n /** Optional hidden validation <input> props (unused by the range fields). */\n hiddenInputProps?: Record<string, unknown>;\n descriptionProps: Record<string, unknown>;\n errorMessageProps: Record<string, unknown>;\n };\n}\n\nexport interface DateRangePickerContextValue {\n calendarState: RangeCalendarState<DateValue>;\n startFieldState: DateFieldState<DateValue>;\n endFieldState: DateFieldState<DateValue>;\n startFieldContext: DateRangePickerFieldContextValue;\n endFieldContext: DateRangePickerFieldContextValue;\n overlayState: {\n isOpen: boolean;\n open: () => void;\n close: () => void;\n toggle: () => void;\n };\n triggerRef: () => HTMLElement | null;\n setTriggerRef: (element: HTMLElement | null) => void;\n /** RAC Popover `triggerRef: groupRef` — the FieldGroup, not the calendar button. */\n groupRef: () => HTMLElement | null;\n setGroupRef: (element: HTMLElement | null) => void;\n pickerAria: ReturnType<typeof createDateRangePicker>;\n}\n\nexport const DateRangePickerContext = createContext<DateRangePickerContextValue | null>(null);\n\nexport function useDateRangePickerContext(): DateRangePickerContextValue {\n const context = useContext(DateRangePickerContext);\n if (!context) {\n throw new Error(\"DateRangePicker components must be used within a DateRangePicker\");\n }\n return context;\n}\n","/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/*\n * Copyright 2025 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n// Ported to SolidJS for Proyecto Viviana; based on packages/react-aria-components/src/DateField.tsx\n// Ported to SolidJS for Proyecto Viviana; based on packages/react-aria-components/src/HiddenDateInput.tsx\n\n/**\n * DateField component for solidaria-components\n *\n * Pre-wired headless date field component with segment-based editing.\n * Port of react-aria-components/src/DateField.tsx\n */\n\nimport {\n createContext,\n createEffect,\n createMemo,\n createSignal,\n onCleanup,\n useContext,\n For,\n Show,\n createTrackedEffect,\n} from \"solid-js\";\nimport type { Context } from \"solid-js\";\nimport type { JSX } from \"@solidjs/web\";\nimport {\n createDateField,\n createDateSegment,\n createFocusRing,\n createHover,\n createVisuallyHidden,\n mergeProps,\n type AriaDateFieldProps,\n} from \"@proyecto-viviana/solidaria\";\nimport {\n parseDate,\n parseDateTime,\n toCalendarDate,\n toCalendarDateTime,\n toLocalTimeZone,\n} from \"@internationalized/date\";\nimport {\n createDateFieldState,\n access,\n type DateFieldState,\n type DateFieldStateProps,\n type DateSegment as DateSegmentType,\n type CalendarDate,\n type DateValue,\n} from \"@proyecto-viviana/solid-stately\";\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n dataAttr,\n Provider,\n} from \"./utils\";\nimport { TextContext } from \"./Text\";\nimport { FormContext, resolveValidationBehavior, type FormProps } from \"./Form\";\nimport { splitProps } from \"@proyecto-viviana/solidaria/utils\";\nimport {\n DateRangePickerContext,\n type DateRangePickerFieldContextValue,\n} from \"./DateRangePickerContext\";\n\nexport interface DateFieldRenderProps {\n /** Whether the field is disabled. */\n isDisabled: boolean;\n /** Whether the field is read-only. */\n isReadOnly: boolean;\n /** Whether the field is required. */\n isRequired: boolean;\n /** Whether the field is invalid. */\n isInvalid: boolean;\n}\n\nexport interface DateFieldProps<T extends DateValue = DateValue>\n extends\n Omit<AriaDateFieldProps, \"id\" | \"isDisabled\" | \"isReadOnly\" | \"isRequired\">,\n Omit<DateFieldStateProps<T>, \"locale\">,\n SlotProps {\n /** The children of the component. */\n children?: JSX.Element | ((segment: DateSegmentType) => JSX.Element);\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<DateFieldRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<DateFieldRenderProps>;\n /** The locale to use for formatting. */\n locale?: string;\n}\n\nexport interface DateInputRenderProps {\n /** Whether the input is disabled. */\n isDisabled: boolean;\n /** Whether the input is focused. */\n isFocused: boolean;\n}\n\nexport interface DateInputProps extends SlotProps {\n /** The children of the component (render function receiving segments). */\n children?: (segment: DateSegmentType) => JSX.Element;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<DateInputRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<DateInputRenderProps>;\n /** Handler called during the pointer down capture phase. */\n onPointerDownCapture?: JSX.EventHandler<HTMLDivElement, PointerEvent>;\n}\n\nexport interface DateSegmentRenderProps {\n /** Whether the segment is hovered. */\n isHovered: boolean;\n /** Whether the segment is focused. */\n isFocused: boolean;\n /** Whether the segment is keyboard focused. */\n isFocusVisible: boolean;\n /** Whether the segment is a placeholder. */\n isPlaceholder: boolean;\n /** Whether the segment is read only. */\n isReadOnly: boolean;\n /** Whether the segment is disabled. */\n isDisabled: boolean;\n /** Whether the segment is invalid. */\n isInvalid: boolean;\n /** The segment type. */\n type: DateSegmentType[\"type\"];\n /** The text to display. */\n text: string;\n}\n\nexport interface DateSegmentProps extends SlotProps {\n /** The segment data. */\n segment: DateSegmentType;\n /** The children of the component. A function may be provided to receive render props. */\n children?: RenderChildren<DateSegmentRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<DateSegmentRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<DateSegmentRenderProps>;\n}\n\nexport interface DateFieldContextValue {\n state: DateFieldState<DateValue>;\n aria: {\n labelProps: Record<string, unknown>;\n inputProps: Record<string, unknown>;\n // The hidden validation <input> props (native type/required/onChange). Only\n // the standalone DateField provides these; DatePicker/DateRangePicker manage\n // their own hidden inputs, so this stays optional and its <input> is gated.\n hiddenInputProps?: Record<string, unknown>;\n descriptionProps: Record<string, unknown>;\n errorMessageProps: Record<string, unknown>;\n };\n}\n\nexport const DateFieldContext = createContext<DateFieldContextValue | null>(null);\nexport const DateFieldStateContext = createContext<DateFieldState<DateValue> | null>(null);\n\nexport function useDateFieldContext(): DateFieldContextValue {\n const context = useContext(DateFieldContext);\n if (!context) {\n throw new Error(\"DateField components must be used within a DateField\");\n }\n return context;\n}\n\nfunction useDateInputContext(\n slot?: string | JSX.RemoveAttribute,\n): DateFieldContextValue | DateRangePickerFieldContextValue {\n const dateFieldContext = useContext(DateFieldContext);\n if (dateFieldContext) {\n return dateFieldContext;\n }\n\n const dateRangePickerContext = useContext(DateRangePickerContext);\n if (dateRangePickerContext && slot === \"start\") {\n return dateRangePickerContext.startFieldContext;\n }\n if (dateRangePickerContext && slot === \"end\") {\n return dateRangePickerContext.endFieldContext;\n }\n\n throw new Error(\"DateInput components must be used within a DateField or DateRangePicker slot\");\n}\n\n/**\n * A date field allows users to enter and edit date values using a keyboard.\n *\n * @example\n * ```tsx\n * <DateField label=\"Date\">\n * <Label>Date</Label>\n * <DateInput>\n * {(segment) => <DateSegment segment={segment} />}\n * </DateInput>\n * </DateField>\n * ```\n */\nexport function DateField<T extends DateValue = CalendarDate>(\n props: DateFieldProps<T>,\n): JSX.Element {\n return <DateFieldInner {...props} />;\n}\n\ntype DateFieldInnerProps<T extends DateValue = DateValue> = DateFieldProps<T> & {\n __formContext?: FormProps | null;\n};\n\n/**\n * Internal DateField component that renders after client mount.\n */\nfunction DateFieldInner<T extends DateValue = CalendarDate>(\n props: DateFieldInnerProps<T>,\n): JSX.Element {\n const formContext = props.__formContext ?? useContext(FormContext);\n const [local, stateProps, rest] = splitProps(\n props,\n [\"children\", \"class\", \"style\", \"slot\", \"__formContext\"],\n [\n \"value\",\n \"defaultValue\",\n \"onChange\",\n \"minValue\",\n \"maxValue\",\n \"isInvalid\",\n \"isDisabled\",\n \"isReadOnly\",\n \"isRequired\",\n \"locale\",\n \"granularity\",\n \"hourCycle\",\n \"hideTimeZone\",\n \"placeholderValue\",\n \"shouldForceLeadingZeros\",\n \"validationState\",\n \"validationBehavior\",\n \"validate\",\n \"description\",\n \"errorMessage\",\n \"isDateUnavailable\",\n ],\n );\n\n const [fieldRef, setFieldRef] = createSignal<HTMLDivElement | null>(null);\n // Ref to the hidden validation <input> (the DateInput's `<Input>` sibling).\n // RAC's DateField creates this ref, passes it to useDateField, and threads it\n // onto the <Input> via InputContext so useFormReset/useFormValidation target\n // that element. We mirror that: create it here, hand it to createDateField\n // below, and attach it to the same input through the context getter.\n const [validationInputRef, setValidationInputRef] = createSignal<HTMLInputElement | null>(null);\n\n const state = createDateFieldState(stateProps);\n\n const fieldAria = createDateField(\n () => ({\n ...(rest as Record<string, unknown>),\n // RAC threads the same props into both useDateFieldState and useDateField;\n // these live in `stateProps` here, so forward them so the field hook can\n // build aria-disabled and the native validation <input> (type/required).\n // access() unwraps the MaybeAccessor state-prop declarations.\n isDisabled: access(stateProps.isDisabled),\n isReadOnly: access(stateProps.isReadOnly),\n isRequired: access(stateProps.isRequired),\n // Mirror RAC DateField: validationBehavior ?? formValidationBehavior ??\n // 'native'.\n validationBehavior: resolveValidationBehavior(stateProps.validationBehavior, formContext),\n description: stateProps.description,\n errorMessage: stateProps.errorMessage,\n // Form-reset + native constraint validation are wired onto this input by\n // createDateField (see its createFormReset/createFormValidation calls),\n // exactly as RAC's useDateField wires them onto props.inputRef.\n inputRef: () => validationInputRef() ?? undefined,\n }),\n state as unknown as DateFieldState<DateValue>,\n fieldRef,\n );\n\n const renderValues = createMemo<DateFieldRenderProps>(() => ({\n isDisabled: state.isDisabled(),\n isReadOnly: state.isReadOnly(),\n isRequired: state.isRequired(),\n isInvalid: state.isInvalid(),\n }));\n\n const renderProps = useRenderProps(\n {\n class: local.class,\n style: local.style,\n defaultClassName: \"solidaria-DateField\",\n },\n renderValues,\n );\n\n const textSlots = {\n slots: {\n get description() {\n return fieldAria.descriptionProps;\n },\n get errorMessage() {\n return fieldAria.errorMessageProps;\n },\n },\n };\n\n return (\n <DateFieldStateContext value={state as unknown as DateFieldState<DateValue>}>\n <DateFieldContext\n value={{\n state: state as unknown as DateFieldState<DateValue>,\n // Read through getters so consumers see the LIVE memo values, not a\n // snapshot frozen at first render. `createDescription` appends the\n // value-description id via a deferred effect; the group's\n // aria-describedby only picks it up if the props stay reactive here.\n aria: {\n get labelProps() {\n return fieldAria.labelProps;\n },\n // The segment group props (role=\"group\", aria-labelledby, unicode-bidi\n // isolate style, arrow-key nav, focus-within handlers) are routed to the\n // DateInput element — mirroring RAC, where useDateField.fieldProps is\n // published through GroupContext and consumed by the DateInput <Group>.\n // The outer wrapper stays roleless.\n get inputProps() {\n return fieldAria.fieldProps;\n },\n // The REAL hidden validation input props (type/hidden/required/onChange\n // under native validation). Rendered as the DateInput's <input> sibling.\n // Thread the validation-input ref through here — mirroring RAC's\n // `[InputContext, {...inputProps, ref: inputRef}]` — so createDateField's\n // form-reset/validation wiring resolves to the mounted element.\n get hiddenInputProps() {\n return mergeProps(fieldAria.inputProps, { ref: setValidationInputRef });\n },\n get descriptionProps() {\n return fieldAria.descriptionProps;\n },\n get errorMessageProps() {\n return fieldAria.errorMessageProps;\n },\n },\n }}\n >\n <div\n ref={setFieldRef}\n class={renderProps.class()}\n style={renderProps.style()}\n data-disabled={dataAttr(state.isDisabled())}\n data-readonly={dataAttr(state.isReadOnly())}\n data-required={dataAttr(state.isRequired())}\n data-invalid={dataAttr(state.isInvalid())}\n >\n <Provider values={[[TextContext, textSlots]] as Array<[Context<unknown>, unknown]>}>\n {local.children as JSX.Element}\n </Provider>\n </div>\n {/*\n RAC renders <HiddenDateInput> UNCONDITIONALLY at the DateField root\n (react-aria-components DateField.mjs). It is NOT a validation input — it\n is a clipped, aria-hidden, tabindex={-1} native date input that mirrors\n the value for browser autofill. Its `form=\"\"` detaches it from form\n submission (the DateInput's <Input> above is what submits), so it never\n double-counts in FormData. It renders regardless of `name` — hence no\n <Show> gate — which is why it appears in the focus trail as the trailing\n tabindex=\"-1\" element.\n */}\n <RootHiddenDateInput\n autoComplete={(rest as Record<string, unknown>).autoComplete as string | undefined}\n name={(rest as Record<string, unknown>).name as string | undefined}\n isDisabled={state.isDisabled()}\n state={state as unknown as DateFieldState<DateValue>}\n />\n </DateFieldContext>\n </DateFieldStateContext>\n );\n}\n\nconst HIDDEN_DATE_SEGMENTS: readonly string[] = [\"day\", \"month\", \"year\"];\nconst HIDDEN_TIME_SEGMENTS: readonly string[] = [\"hour\", \"minute\", \"second\"];\nconst HIDDEN_GRANULARITY_MAP: Record<string, number> = { hour: 1, minute: 2, second: 3 };\n\ninterface RootHiddenDateInputProps {\n autoComplete?: string;\n name?: string;\n isDisabled?: boolean;\n state: DateFieldState<DateValue>;\n}\n\n/**\n * The always-rendered hidden date input at the DateField root — a faithful port\n * of react-aria-components/src/HiddenDateInput.tsx. It is NOT a validation\n * input: it is a clipped, aria-hidden, tabindex={-1} native\n * date input that mirrors the current value for browser autofill. `form=\"\"`\n * detaches it from form submission (the DateInput's <Input> submits), so it\n * never double-counts in FormData. RAC renders it unconditionally, which is why\n * it appears as the trailing tabindex=\"-1\" element in the focus trail.\n */\nfunction RootHiddenDateInput(props: RootHiddenDateInputProps): JSX.Element {\n // RAC uses useVisuallyHidden with position:fixed/top:0/left:0 to keep the\n // clipped input from scrolling the page.\n const { visuallyHiddenProps } = createVisuallyHidden(() => ({\n style: { position: \"fixed\", top: \"0\", left: \"0\" },\n }));\n\n const granularity = () => props.state.granularity ?? \"day\";\n const inputStep = () => {\n const g = granularity();\n if (g === \"second\") return 1;\n if (g === \"hour\") return 3600;\n return 60;\n };\n const inputType = () => (granularity() === \"day\" ? \"date\" : \"datetime-local\");\n const dateValue = () => {\n const value = props.state.value();\n if (!value) return \"\";\n if (granularity() === \"day\") return toCalendarDate(value).toString();\n return toCalendarDateTime(\"timeZone\" in value ? toLocalTimeZone(value) : value).toString();\n };\n\n const onChange: JSX.EventHandler<HTMLInputElement, Event> = (event) => {\n const targetString = (event.currentTarget.value ?? \"\").toString();\n if (!targetString) return;\n try {\n const g = granularity();\n const targetValue = (g === \"day\"\n ? parseDate(targetString)\n : parseDateTime(targetString)) as unknown as Record<string, number>;\n let timeSegments = HIDDEN_TIME_SEGMENTS;\n if (HIDDEN_TIME_SEGMENTS.includes(g)) {\n timeSegments = HIDDEN_TIME_SEGMENTS.slice(0, HIDDEN_GRANULARITY_MAP[g]);\n }\n const state = props.state as unknown as {\n setSegment?: (type: string, value: number) => void;\n setValue: (value: unknown) => void;\n };\n // Only DateFieldState (not DatePickerState) exposes setSegment; validate\n // each parsed segment before committing the new value, mirroring RAC.\n if (typeof state.setSegment === \"function\") {\n for (const type in targetValue) {\n if (HIDDEN_DATE_SEGMENTS.includes(type)) state.setSegment(type, targetValue[type]);\n if (timeSegments.includes(type)) state.setSegment(type, targetValue[type]);\n }\n }\n state.setValue(targetValue);\n } catch {\n // ignore unparseable autofill values\n }\n };\n\n return (\n <div\n {...(visuallyHiddenProps() as unknown as Record<string, unknown>)}\n aria-hidden=\"true\"\n data-testid=\"hidden-dateinput-container\"\n >\n <input\n tabindex={-1}\n autocomplete={props.autoComplete}\n disabled={props.isDisabled}\n type={inputType()}\n form=\"\"\n name={props.name}\n step={inputStep()}\n value={dateValue()}\n onChange={onChange}\n />\n </div>\n );\n}\n\n/**\n * The input area containing date segments.\n */\nexport function DateInput(props: DateInputProps): JSX.Element {\n const context = useDateInputContext(props.slot);\n const { state, aria } = context;\n const [isFocused, setIsFocused] = createSignal(false);\n const [inputRef, setInputRef] = createSignal<HTMLDivElement | null>(null);\n\n const renderValues = createMemo<DateInputRenderProps>(() => ({\n isDisabled: state.isDisabled(),\n isFocused: isFocused(),\n }));\n\n const renderProps = useRenderProps(\n {\n class: props.class,\n style: props.style,\n defaultClassName: \"solidaria-DateInput\",\n },\n renderValues,\n );\n\n // The group props (role=\"group\", aria-labelledby, unicode-bidi:isolate,\n // arrow-key nav, focus-within handlers) carry the field's own `style` and\n // focus handlers. Merge — not clobber — so the group keeps its unicode-bidi\n // isolation and the local isFocused signal chains onto the field's\n // focusWithin handlers. Solid onFocus/onBlur do not bubble, so track focus\n // via onFocusIn/onFocusOut.\n const inputDivProps = createMemo(() =>\n mergeProps(aria.inputProps, {\n onFocusIn: () => setIsFocused(true),\n onFocusOut: () => setIsFocused(false),\n style: renderProps.style(),\n }),\n );\n\n createTrackedEffect(() => {\n const _s2Cleanups: Array<() => void> = [];\n\n const element = inputRef();\n const handler = props.onPointerDownCapture;\n if (!element || !handler) return;\n\n const listener = (event: PointerEvent) =>\n (handler as unknown as (event: PointerEvent) => void)(event);\n element.addEventListener(\"pointerdown\", listener, { capture: true });\n _s2Cleanups.push(() => element.removeEventListener(\"pointerdown\", listener, { capture: true }));\n\n return () => {\n for (const c of _s2Cleanups) c();\n };\n });\n\n return (\n <DateFieldContext value={context as DateFieldContextValue}>\n <div\n ref={setInputRef}\n {...inputDivProps()}\n class={renderProps.class()}\n data-disabled={dataAttr(state.isDisabled())}\n data-focused={dataAttr(isFocused())}\n >\n {/*\n <For keyed={false}> keys by position, not identity, so each DateSegment\n instance stays alive across keystrokes (state.segments() re-mints\n segment objects every edit). A stable Proxy forwards property reads to\n the live per-index accessor so the child stays reactive.\n */}\n <For each={state.segments()} keyed={false}>\n {(segment) => {\n const liveSegment = new Proxy({} as DateSegmentType, {\n get: (_t, key) => (segment() as unknown as Record<PropertyKey, unknown>)[key],\n has: (_t, key) => key in (segment() as object),\n });\n return props.children?.(liveSegment);\n }}\n </For>\n </div>\n {/*\n The hidden validation input, sibling of the group — mirrors RAC's\n DateInputInner `<><Group/><Input/></>`. Under native validation\n (default) `useDateField` publishes it as `type=\"text\" hidden required`\n so browser constraint validation fires; under aria validation it stays\n `type=\"hidden\"`. Both carry the ISO value string. Only the standalone\n DateField supplies these props; inside a DatePicker/DateRangePicker the\n field is presentation and its owner renders the hidden input instead.\n */}\n <Show when={aria.hiddenInputProps}>\n {(hiddenInputProps) => (\n <input {...(hiddenInputProps() as JSX.InputHTMLAttributes<HTMLInputElement>)} />\n )}\n </Show>\n </DateFieldContext>\n );\n}\n\n/**\n * A segment of a date field (year, month, day, etc.).\n */\nexport function DateSegment(props: DateSegmentProps): JSX.Element {\n const { state } = useDateFieldContext();\n const [segmentRef, setSegmentRef] = createSignal<HTMLElement | null>(null);\n\n const segmentAria = createDateSegment(\n {\n get segment() {\n return props.segment;\n },\n },\n state,\n segmentRef,\n );\n\n // Mirror upstream DateSegment: focus/focus-visible come from useFocusRing()\n // and hover from useHover({isDisabled: field disabled || literal segment}).\n // Literals never hover; the field being disabled suppresses hover entirely.\n const { isFocused, isFocusVisible, focusProps } = createFocusRing();\n const { isHovered, hoverProps } = createHover(() => ({\n isDisabled: state.isDisabled() || props.segment.type === \"literal\",\n }));\n\n const renderValues = createMemo<DateSegmentRenderProps>(() => ({\n isHovered: isHovered(),\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible(),\n isPlaceholder: props.segment.isPlaceholder,\n isReadOnly: state.isReadOnly(),\n isDisabled: state.isDisabled(),\n isInvalid: state.isInvalid(),\n type: props.segment.type,\n text: props.segment.text,\n }));\n\n const renderProps = useRenderProps(\n {\n get children() {\n return props.children;\n },\n class: props.class,\n style: props.style,\n defaultClassName: \"solidaria-DateSegment\",\n },\n renderValues,\n );\n\n // Determine children content - avoid Show for SSR hydration compatibility\n const getChildren = () => {\n if (typeof props.children === \"function\") {\n return renderProps.renderChildren();\n }\n return props.segment.text;\n };\n\n // Mirror upstream's `mergeProps(filterDOMProps(otherProps), segmentProps,\n // focusProps, hoverProps)`: the segment's behavior/style props (caretColor +\n // RTL direction) chain with the focus-ring and hover handlers so neither\n // clobbers the other.\n const segmentElementProps = createMemo(() =>\n mergeProps(\n segmentAria.segmentProps,\n focusProps as Record<string, unknown>,\n hoverProps as Record<string, unknown>,\n {\n style: renderProps.style(),\n },\n ),\n );\n\n return (\n <span\n ref={setSegmentRef}\n {...segmentElementProps()}\n class={renderProps.class()}\n data-placeholder={dataAttr(props.segment.isPlaceholder)}\n data-invalid={dataAttr(state.isInvalid())}\n data-readonly={dataAttr(state.isReadOnly())}\n data-disabled={dataAttr(state.isDisabled())}\n data-type={props.segment.type}\n data-hovered={dataAttr(isHovered())}\n data-focused={dataAttr(isFocused())}\n data-focus-visible={dataAttr(isFocusVisible())}\n >\n {getChildren()}\n </span>\n );\n}\n\nexport interface DateFieldLabelProps {\n children?: JSX.Element;\n class?: string;\n}\n\nexport function DateFieldLabel(props: DateFieldLabelProps): JSX.Element {\n const { aria } = useDateFieldContext();\n return (\n <span {...aria.labelProps} class={props.class}>\n {props.children}\n </span>\n );\n}\n\nexport interface DateFieldDescriptionProps {\n children?: JSX.Element;\n class?: string;\n}\n\nexport function DateFieldDescription(props: DateFieldDescriptionProps): JSX.Element {\n const { aria } = useDateFieldContext();\n return (\n <span {...aria.descriptionProps} class={props.class}>\n {props.children}\n </span>\n );\n}\n\nexport interface DateFieldErrorMessageProps {\n children?: JSX.Element;\n class?: string;\n}\n\nexport function DateFieldErrorMessage(props: DateFieldErrorMessageProps): JSX.Element {\n const { aria } = useDateFieldContext();\n return (\n <span {...aria.errorMessageProps} class={props.class}>\n {props.children}\n </span>\n );\n}\n\nexport type { DateFieldState, DateSegmentType };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6CA,MAAa,yBAAyB,cAAkD,IAAI;AAE5F,SAAgB,4BAAyD;CACvE,MA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B,eAAe,OAAyC;CACtE,MAAM,EAAE,SAAS,oBAAoB;CAEnC,IAAA,QAAA,eAAA,OAEM;CAFA,OAAA,OAAA,OAAA;EAAI,OAAA,KAAK;CAAU,GAAA,EAAE,IAAA,UAAA;EAAO,OAAA,MAAM;CAAK,EAAA,CAAA,GAAA,IAAA;CAA7C,OAAA,OACEC,YAAAA;EAAC,OAAA,MAAM;CAAQ,CAAA,CACX;CAFN,mBAEM;CAHR,OACEC;AAIJ;AAOA,SAAgB,qBAAqB,OAA+C;CAClF,MAAM,EAAE,SAAS,oBAAoB;CAEnC,IAAA,QAAA,eAAA,OAEM;CAFA,OAAA,OAAA,OAAA;EAAI,OAAA,KAAK;CAAgB,GAAA,EAAE,IAAA,UAAA;EAAO,OAAA,MAAM;CAAK,EAAA,CAAA,GAAA,IAAA;CAAnD,OAAA,OACED,YAAAA;EAAC,OAAA,MAAM;CAAQ,CAAA,CACX;CAFN,mBAEM;CAHR,OACEE;AAIJ;AAOA,SAAgB,sBAAsB,OAAgD;CACpF,MAAM,EAAE,SAAS,oBAAoB;CAEnC,IAAA,QAAA,eAAA,OAEM;CAFA,OAAA,OAAA,OAAA;EAAI,OAAA,KAAK;CAAiB,GAAA,EAAE,IAAA,UAAA;EAAO,OAAA,MAAM;CAAK,EAAA,CAAA,GAAA,IAAA;CAApD,OAAA,OACEF,YAAAA;EAAC,OAAA,MAAM;CAAQ,CAAA,CACX;CAFN,mBAEM;CAHR,OACEG;AAIJ"}
@@ -1,11 +1,40 @@
1
- import { Provider, dataAttr, useIsHydrated, useRenderProps } from "./utils.jsx";
1
+ /*
2
+ * Copyright 2022 Adobe. All rights reserved.
3
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ * you may not use this file except in compliance with the License. You may obtain a copy
5
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+ *
7
+ * Unless required by applicable law or agreed to in writing, software distributed under
8
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ * OF ANY KIND, either express or implied. See the License for the specific language
10
+ * governing permissions and limitations under the License.
11
+ */
12
+ /*
13
+ * Copyright 2025 Adobe. All rights reserved.
14
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
15
+ * you may not use this file except in compliance with the License. You may obtain a copy
16
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
17
+ *
18
+ * Unless required by applicable law or agreed to in writing, software distributed under
19
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
20
+ * OF ANY KIND, either express or implied. See the License for the specific language
21
+ * governing permissions and limitations under the License.
22
+ */
23
+ // Ported to SolidJS for Proyecto Viviana; based on packages/react-aria-components/src/DateField.tsx
24
+ // Ported to SolidJS for Proyecto Viviana; based on packages/react-aria-components/src/HiddenDateInput.tsx
25
+ import { Provider, dataAttr, useRenderProps } from "./utils.jsx";
2
26
  import { TextContext } from "./Text.jsx";
3
- import { FormContext } from "./Form.jsx";
4
- import { Index, Show, createContext, createEffect, createMemo, createSignal, onCleanup, splitProps, useContext } from "solid-js";
5
- import { createDateField, createDateSegment, createFocusRing, createHover, createVisuallyHidden, mergeProps as mergeProps$1 } from "@proyecto-viviana/solidaria";
27
+ import { FormContext, resolveValidationBehavior } from "./Form.jsx";
28
+ import { For, Show, createContext, createMemo, createSignal, createTrackedEffect, useContext } from "solid-js";
29
+ import { createDateField, createDateSegment, createFocusRing, createHover, createVisuallyHidden, mergeProps } from "@proyecto-viviana/solidaria";
30
+ import { splitProps } from "@proyecto-viviana/solidaria/utils";
6
31
  import { access, createDateFieldState } from "@proyecto-viviana/solid-stately";
7
32
  import { parseDate, parseDateTime, toCalendarDate, toCalendarDateTime, toLocalTimeZone } from "@internationalized/date";
8
33
  //#region src/DateRangePickerContext.tsx
34
+ /**
35
+ * Local Solid context shared by the date-range picker fields.
36
+ * The owning DatePicker module records the upstream component source.
37
+ */
9
38
  const DateRangePickerContext = createContext(null);
10
39
  function useDateRangePickerContext() {
11
40
  const context = useContext(DateRangePickerContext);
@@ -22,33 +51,6 @@ function useDateRangePickerContext() {
22
51
  */
23
52
  const DateFieldContext = createContext(null);
24
53
  const DateFieldStateContext = createContext(null);
25
- function withFormValidationBehavior(props, formContext) {
26
- if (!formContext?.validationBehavior) return props;
27
- return new Proxy(props, {
28
- get(target, property, receiver) {
29
- const localValue = Reflect.get(target, property, receiver);
30
- if (property === "validationBehavior" && localValue === void 0) return formContext.validationBehavior;
31
- return localValue;
32
- },
33
- has(target, property) {
34
- return Reflect.has(target, property) || property === "validationBehavior" && formContext.validationBehavior !== void 0;
35
- },
36
- ownKeys(target) {
37
- const keys = new Set(Reflect.ownKeys(target));
38
- if (formContext.validationBehavior !== void 0) keys.add("validationBehavior");
39
- return Array.from(keys);
40
- },
41
- getOwnPropertyDescriptor(target, property) {
42
- const descriptor = Reflect.getOwnPropertyDescriptor(target, property);
43
- if (descriptor) return descriptor;
44
- if (property === "validationBehavior" && formContext.validationBehavior !== void 0) return {
45
- enumerable: true,
46
- configurable: true,
47
- get: () => formContext.validationBehavior
48
- };
49
- }
50
- });
51
- }
52
54
  function useDateFieldContext() {
53
55
  const context = useContext(DateFieldContext);
54
56
  if (!context) throw new Error("DateField components must be used within a DateField");
@@ -76,17 +78,14 @@ function useDateInputContext(slot) {
76
78
  * ```
77
79
  */
78
80
  function DateField(props) {
79
- const isHydrated = useIsHydrated();
80
- const formContext = useContext(FormContext);
81
- return <Show when={isHydrated()} fallback={<div class="solidaria-DateField solidaria-DateField--placeholder" aria-hidden="true" />}>
82
- <DateFieldInner {...props} __formContext={formContext} />
83
- </Show>;
81
+ return <DateFieldInner {...props} />;
84
82
  }
85
83
  /**
86
84
  * Internal DateField component that renders after client mount.
87
85
  */
88
86
  function DateFieldInner(props) {
89
- const [local, stateProps, rest] = splitProps(withFormValidationBehavior(props, props.__formContext ?? useContext(FormContext)), [
87
+ const formContext = props.__formContext ?? useContext(FormContext);
88
+ const [local, stateProps, rest] = splitProps(props, [
90
89
  "children",
91
90
  "class",
92
91
  "style",
@@ -123,7 +122,7 @@ function DateFieldInner(props) {
123
122
  isDisabled: access(stateProps.isDisabled),
124
123
  isReadOnly: access(stateProps.isReadOnly),
125
124
  isRequired: access(stateProps.isRequired),
126
- validationBehavior: stateProps.validationBehavior ?? "native",
125
+ validationBehavior: resolveValidationBehavior(stateProps.validationBehavior, formContext),
127
126
  description: stateProps.description,
128
127
  errorMessage: stateProps.errorMessage,
129
128
  inputRef: () => validationInputRef() ?? void 0
@@ -147,8 +146,8 @@ function DateFieldInner(props) {
147
146
  return fieldAria.errorMessageProps;
148
147
  }
149
148
  } };
150
- return <DateFieldStateContext.Provider value={state}>
151
- <DateFieldContext.Provider value={{
149
+ return <DateFieldStateContext value={state}>
150
+ <DateFieldContext value={{
152
151
  state,
153
152
  aria: {
154
153
  get labelProps() {
@@ -158,7 +157,7 @@ function DateFieldInner(props) {
158
157
  return fieldAria.fieldProps;
159
158
  },
160
159
  get hiddenInputProps() {
161
- return mergeProps$1(fieldAria.inputProps, { ref: setValidationInputRef });
160
+ return mergeProps(fieldAria.inputProps, { ref: setValidationInputRef });
162
161
  },
163
162
  get descriptionProps() {
164
163
  return fieldAria.descriptionProps;
@@ -175,8 +174,8 @@ function DateFieldInner(props) {
175
174
  </div>
176
175
  {}
177
176
  <RootHiddenDateInput autoComplete={rest.autoComplete} name={rest.name} isDisabled={state.isDisabled()} state={state} />
178
- </DateFieldContext.Provider>
179
- </DateFieldStateContext.Provider>;
177
+ </DateFieldContext>
178
+ </DateFieldStateContext>;
180
179
  }
181
180
  const HIDDEN_DATE_SEGMENTS = [
182
181
  "day",
@@ -195,8 +194,8 @@ const HIDDEN_GRANULARITY_MAP = {
195
194
  };
196
195
  /**
197
196
  * The always-rendered hidden date input at the DateField root — a faithful port
198
- * of react-aria-components' HiddenDateInput (private/HiddenDateInput.mjs). It is
199
- * NOT a validation input: it is a clipped, aria-hidden, tabIndex={-1} native
197
+ * of react-aria-components/src/HiddenDateInput.tsx. It is NOT a validation
198
+ * input: it is a clipped, aria-hidden, tabindex={-1} native
200
199
  * date input that mirrors the current value for browser autofill. `form=""`
201
200
  * detaches it from form submission (the DateInput's <Input> submits), so it
202
201
  * never double-counts in FormData. RAC renders it unconditionally, which is why
@@ -239,7 +238,7 @@ function RootHiddenDateInput(props) {
239
238
  } catch {}
240
239
  };
241
240
  return <div {...visuallyHiddenProps()} aria-hidden="true" data-testid="hidden-dateinput-container">
242
- <input tabIndex={-1} autocomplete={props.autoComplete} disabled={props.isDisabled} type={inputType()} form="" name={props.name} step={inputStep()} value={dateValue()} onChange={onChange} />
241
+ <input tabindex={-1} autocomplete={props.autoComplete} disabled={props.isDisabled} type={inputType()} form="" name={props.name} step={inputStep()} value={dateValue()} onChange={onChange} />
243
242
  </div>;
244
243
  }
245
244
  /**
@@ -259,23 +258,27 @@ function DateInput(props) {
259
258
  style: props.style,
260
259
  defaultClassName: "solidaria-DateInput"
261
260
  }, renderValues);
262
- const inputDivProps = createMemo(() => mergeProps$1(aria.inputProps, {
261
+ const inputDivProps = createMemo(() => mergeProps(aria.inputProps, {
263
262
  onFocusIn: () => setIsFocused(true),
264
263
  onFocusOut: () => setIsFocused(false),
265
264
  style: renderProps.style()
266
265
  }));
267
- createEffect(() => {
266
+ createTrackedEffect(() => {
267
+ const _s2Cleanups = [];
268
268
  const element = inputRef();
269
269
  const handler = props.onPointerDownCapture;
270
270
  if (!element || !handler) return;
271
271
  const listener = (event) => handler(event);
272
272
  element.addEventListener("pointerdown", listener, { capture: true });
273
- onCleanup(() => element.removeEventListener("pointerdown", listener, { capture: true }));
273
+ _s2Cleanups.push(() => element.removeEventListener("pointerdown", listener, { capture: true }));
274
+ return () => {
275
+ for (const c of _s2Cleanups) c();
276
+ };
274
277
  });
275
- return <DateFieldContext.Provider value={context}>
278
+ return <DateFieldContext value={context}>
276
279
  <div ref={setInputRef} {...inputDivProps()} class={renderProps.class()} data-disabled={dataAttr(state.isDisabled())} data-focused={dataAttr(isFocused())}>
277
280
  {}
278
- <Index each={state.segments()}>
281
+ <For each={state.segments()} keyed={false}>
279
282
  {(segment) => {
280
283
  const liveSegment = new Proxy({}, {
281
284
  get: (_t, key) => segment()[key],
@@ -283,13 +286,13 @@ function DateInput(props) {
283
286
  });
284
287
  return props.children?.(liveSegment);
285
288
  }}
286
- </Index>
289
+ </For>
287
290
  </div>
288
291
  {}
289
292
  <Show when={aria.hiddenInputProps}>
290
293
  {(hiddenInputProps) => <input {...hiddenInputProps()} />}
291
294
  </Show>
292
- </DateFieldContext.Provider>;
295
+ </DateFieldContext>;
293
296
  }
294
297
  /**
295
298
  * A segment of a date field (year, month, day, etc.).
@@ -325,8 +328,8 @@ function DateSegment(props) {
325
328
  if (typeof props.children === "function") return renderProps.renderChildren();
326
329
  return props.segment.text;
327
330
  };
328
- const segmentElementProps = createMemo(() => mergeProps$1(segmentAria.segmentProps, focusProps, hoverProps, { style: renderProps.style() }));
329
- return <span ref={setSegmentRef} {...segmentElementProps()} class={renderProps.class()} data-placeholder={props.segment.isPlaceholder || void 0} data-invalid={state.isInvalid() || void 0} data-readonly={state.isReadOnly() || void 0} data-disabled={state.isDisabled() || void 0} data-type={props.segment.type} data-hovered={isHovered() || void 0} data-focused={isFocused() || void 0} data-focus-visible={isFocusVisible() || void 0}>
331
+ const segmentElementProps = createMemo(() => mergeProps(segmentAria.segmentProps, focusProps, hoverProps, { style: renderProps.style() }));
332
+ return <span ref={setSegmentRef} {...segmentElementProps()} class={renderProps.class()} data-placeholder={dataAttr(props.segment.isPlaceholder)} data-invalid={dataAttr(state.isInvalid())} data-readonly={dataAttr(state.isReadOnly())} data-disabled={dataAttr(state.isDisabled())} data-type={props.segment.type} data-hovered={dataAttr(isHovered())} data-focused={dataAttr(isFocused())} data-focus-visible={dataAttr(isFocusVisible())}>
330
333
  {getChildren()}
331
334
  </span>;
332
335
  }