@proyecto-viviana/solidaria-components 0.5.1 → 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 -39
  159. package/dist/Form.js.map +1 -1
  160. package/dist/Form.jsx +36 -14
  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 +312 -209
  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 +27 -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 +69 -99
  466. package/src/DatePicker.tsx +146 -342
  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 +41 -12
  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 +587 -409
  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 -119
  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 +67 -46
  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 +32 -86
  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":"SearchField.js","names":["JSX","Context","createContext","createMemo","onCleanup","onMount","splitProps","useContext","Show","createSearchField","createFocusRing","createHover","createPress","mergeProps","AriaSearchFieldProps","createSearchFieldState","VALID_VALIDITY_STATE","SearchFieldState","ValidationResult","FormContext","FormProps","FieldErrorContext","FieldErrorContextValue","RenderChildren","ClassNameOrFunction","StyleOrFunction","SlotProps","useRenderProps","filterDOMProps","Provider","TextContext","useAutocompleteInput","SearchFieldRenderProps","isEmpty","isDisabled","isInvalid","isReadOnly","isRequired","value","SearchFieldProps","Omit","defaultValue","onChange","onSubmit","onClear","label","Element","children","class","style","ref","el","HTMLDivElement","SearchFieldInputRenderProps","isFocused","isFocusVisible","isHovered","SearchFieldInputProps","InputHTMLAttributes","HTMLInputElement","SearchFieldClearButtonRenderProps","isPressed","SearchFieldClearButtonProps","ButtonHTMLAttributes","HTMLButtonElement","SearchFieldContextValue","Partial","state","inputProps","clearButtonProps","tabIndex","disabled","onMouseDown","e","MouseEvent","onClick","labelProps","HTMLAttributes","HTMLElement","descriptionProps","errorMessageProps","setInputRef","slots","Record","SearchFieldContext","withFormValidationBehavior","props","formContext","validationBehavior","Proxy","get","target","property","receiver","localValue","Reflect","undefined","has","ownKeys","keys","Set","add","Array","from","getOwnPropertyDescriptor","descriptor","enumerable","configurable","eventWithCurrentTarget","event","Event","element","T","bind","clearDelegatedTextEntryHandlers","delegatedElement","$$input","$$change","SearchField","contextProps","contextSlotProps","slot","contextBaseProps","_state","_inputProps","_clearButtonProps","_labelProps","_descriptionProps","_errorMessageProps","_isDisabled","_isInvalid","_isRequired","_isReadOnly","_setInputRef","_slots","restContextProps","baseProps","autocompleteInput","autocompleteProps","onKeyDown","onFocus","onBlur","mergedProps","local","stateProps","ariaProps","rest","inputRef","searchFieldAria","aria-label","aria-labelledby","aria-describedby","description","errorMessage","placeholder","name","form","type","autoFocus","excludeFromTabOrder","autoComplete","inputMode","enterKeyHint","autoCorrect","autoCapitalize","spellCheck","maxLength","minLength","pattern","onFocusChange","onKeyUp","onCopy","onCut","onPaste","onCompositionStart","onCompositionEnd","onCompositionUpdate","onSelect","onBeforeInput","onInput","renderValues","renderProps","defaultClassName","childRenderValues","domProps","global","fieldValidation","validationErrors","validationDetails","customError","valid","fieldErrorContext","validation","contextValue","fieldChildren","textSlots","_$createComponent","_el$","_$getNextElement","_tmpl$","_ref$","_$use","_$spread","_$mergeProps","data-empty","data-disabled","data-invalid","data-required","data-readonly","_$insert","values","_$runHydrationEvents","SearchFieldLabel","CSSProperties","context","Error","cleanLabelProps","_ref","_el$2","_tmpl$2","SearchFieldInput","inputElement","focusProps","hoverProps","cleanInputProps","cleanFocusProps","cleanHoverProps","autocompleteInputAttrs","mergedInputProps","inputHandler","handler","EventHandler","InputEvent","currentTarget","stopPropagation","changeHandler","addEventListener","removeEventListener","_el$3","_tmpl$3","data-focused","data-focus-visible","data-hovered","SearchFieldClearButton","clear","pressProps","onPress","cleanPressProps","when","_el$4","_tmpl$4","data-pressed","renderChildren","Label","Input","ClearButton"],"sources":["../src/SearchField.tsx"],"sourcesContent":["/**\n * SearchField component for solidaria-components\n *\n * A pre-wired headless search field that combines state + aria hooks.\n * Port of react-aria-components/src/SearchField.tsx\n */\n\nimport {\n type JSX,\n type Context,\n createContext,\n createMemo,\n onCleanup,\n onMount,\n splitProps,\n useContext,\n Show,\n} from \"solid-js\";\nimport {\n createSearchField,\n createFocusRing,\n createHover,\n createPress,\n mergeProps,\n type AriaSearchFieldProps,\n} from \"@proyecto-viviana/solidaria\";\nimport {\n createSearchFieldState,\n VALID_VALIDITY_STATE,\n type SearchFieldState,\n type ValidationResult,\n} from \"@proyecto-viviana/solid-stately\";\nimport { FormContext, type FormProps } from \"./Form\";\nimport { FieldErrorContext, type FieldErrorContextValue } from \"./FieldError\";\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n filterDOMProps,\n Provider,\n} from \"./utils\";\nimport { TextContext } from \"./Text\";\nimport { useAutocompleteInput } from \"./Autocomplete\";\n\nexport interface SearchFieldRenderProps {\n /** Whether the search field is empty. */\n isEmpty: boolean;\n /** Whether the search field is disabled. */\n isDisabled: boolean;\n /** Whether the search field is invalid. */\n isInvalid: boolean;\n /** Whether the search field is read-only. */\n isReadOnly: boolean;\n /** Whether the search field is required. */\n isRequired: boolean;\n /** The current value. */\n value: string;\n}\n\nexport interface SearchFieldProps extends Omit<AriaSearchFieldProps, \"label\">, SlotProps {\n /** The current value (controlled). */\n value?: string;\n /** The default value (uncontrolled). */\n defaultValue?: string;\n /** Handler called when the value changes. */\n onChange?: (value: string) => void;\n /** Handler called when the user submits the search. */\n onSubmit?: (value: string) => void;\n /** Handler called when the field is cleared. */\n onClear?: () => void;\n /** A visible label for the search field. */\n label?: JSX.Element;\n /** The children of the component. */\n children?: RenderChildren<SearchFieldRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<SearchFieldRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<SearchFieldRenderProps>;\n /** Ref for the outer search field element. */\n ref?: (el: HTMLDivElement) => void;\n}\n\nexport interface SearchFieldInputRenderProps {\n /** Whether the input is focused. */\n isFocused: boolean;\n /** Whether the input has keyboard focus. */\n isFocusVisible: boolean;\n /** Whether the input is hovered. */\n isHovered: boolean;\n /** Whether the input is disabled. */\n isDisabled: boolean;\n /** Whether the input is invalid. */\n isInvalid: boolean;\n}\n\nexport interface SearchFieldInputProps\n extends SlotProps, Omit<JSX.InputHTMLAttributes<HTMLInputElement>, \"class\" | \"style\"> {\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<SearchFieldInputRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<SearchFieldInputRenderProps>;\n}\n\nexport interface SearchFieldClearButtonRenderProps {\n /** Whether the button is pressed. */\n isPressed: boolean;\n /** Whether the button is hovered. */\n isHovered: boolean;\n /** Whether the button is disabled. */\n isDisabled: boolean;\n}\n\nexport interface SearchFieldClearButtonProps\n extends\n SlotProps,\n Omit<JSX.ButtonHTMLAttributes<HTMLButtonElement>, \"class\" | \"style\" | \"children\"> {\n /** The children of the button. */\n children?: RenderChildren<SearchFieldClearButtonRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<SearchFieldClearButtonRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<SearchFieldClearButtonRenderProps>;\n}\n\ninterface SearchFieldContextValue extends Partial<SearchFieldProps> {\n state?: SearchFieldState;\n inputProps?: JSX.InputHTMLAttributes<HTMLInputElement>;\n clearButtonProps?: {\n \"aria-label\": string;\n tabIndex: number;\n disabled?: boolean;\n onMouseDown: (e: MouseEvent) => void;\n onClick: () => void;\n };\n labelProps?: JSX.HTMLAttributes<HTMLElement>;\n descriptionProps?: JSX.HTMLAttributes<HTMLElement>;\n errorMessageProps?: JSX.HTMLAttributes<HTMLElement>;\n isDisabled?: boolean;\n isInvalid?: boolean;\n isRequired?: boolean;\n isReadOnly?: boolean;\n setInputRef?: (el: HTMLInputElement) => void;\n slots?: Record<string, SearchFieldProps>;\n}\n\nexport const SearchFieldContext = createContext<SearchFieldContextValue | null>(null);\n\nfunction withFormValidationBehavior(\n props: SearchFieldProps,\n formContext: FormProps | null,\n): SearchFieldProps {\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\nfunction eventWithCurrentTarget<T extends HTMLElement>(event: Event, element: T): Event {\n return new Proxy(event, {\n get(target, property, receiver) {\n if (property === \"target\" || property === \"currentTarget\") {\n return element;\n }\n\n const value = Reflect.get(target, property, receiver);\n return typeof value === \"function\" ? value.bind(target) : value;\n },\n });\n}\n\nfunction clearDelegatedTextEntryHandlers(element: HTMLElement) {\n const delegatedElement = element as HTMLElement & {\n $$input?: unknown;\n $$change?: unknown;\n };\n delete delegatedElement.$$input;\n delete delegatedElement.$$change;\n}\n\n/**\n * A search field allows a user to enter and clear a search query.\n */\nexport function SearchField(props: SearchFieldProps): JSX.Element {\n const formContext = useContext(FormContext);\n const contextProps = useContext(SearchFieldContext);\n const contextSlotProps = contextProps?.slots?.[props.slot ?? \"default\"];\n const contextBaseProps = createMemo<SearchFieldProps>(() => {\n if (!contextProps) return {};\n const {\n state: _state,\n inputProps: _inputProps,\n clearButtonProps: _clearButtonProps,\n labelProps: _labelProps,\n descriptionProps: _descriptionProps,\n errorMessageProps: _errorMessageProps,\n isDisabled: _isDisabled,\n isInvalid: _isInvalid,\n isRequired: _isRequired,\n isReadOnly: _isReadOnly,\n setInputRef: _setInputRef,\n slots: _slots,\n ...restContextProps\n } = contextProps;\n return restContextProps as SearchFieldProps;\n });\n const baseProps = (\n contextProps ? mergeProps(contextBaseProps(), contextSlotProps ?? {}, props) : props\n ) as SearchFieldProps;\n\n // When rendered inside an <Autocomplete>, the FieldInputContext (AutocompleteContext)\n // controls the input's value and keyboard handling: value + onChange make the field's\n // state controlled by the shared autocomplete state (which drives the collection\n // filter), and onKeyDown/onFocus/onBlur chain the autocomplete's virtual-focus\n // navigation into the input. This mirrors RAC's\n // useContextProps(props, inputRef, FieldInputContext). The remaining passthroughs\n // (aria-activedescendant/aria-controls/aria-autocomplete) and the input-ref\n // registration are applied at the <input> in SearchFieldInput.\n const autocompleteInput = useAutocompleteInput();\n const autocompleteProps = autocompleteInput\n ? ({\n get value() {\n return autocompleteInput.inputProps.value();\n },\n onChange: autocompleteInput.inputProps.onChange,\n onKeyDown: autocompleteInput.inputProps\n .onKeyDown as unknown as SearchFieldProps[\"onKeyDown\"],\n onFocus: autocompleteInput.inputProps.onFocus as unknown as SearchFieldProps[\"onFocus\"],\n onBlur: autocompleteInput.inputProps.onBlur as unknown as SearchFieldProps[\"onBlur\"],\n } as Partial<SearchFieldProps>)\n : undefined;\n\n const mergedProps = withFormValidationBehavior(\n autocompleteProps ? (mergeProps(baseProps, autocompleteProps) as SearchFieldProps) : baseProps,\n formContext,\n );\n\n const [local, stateProps, ariaProps, rest] = splitProps(\n mergedProps,\n [\"children\", \"class\", \"style\", \"slot\", \"ref\"],\n [\"value\", \"defaultValue\", \"onChange\", \"onSubmit\", \"onClear\"],\n [\n \"label\",\n \"aria-label\",\n \"aria-labelledby\",\n \"aria-describedby\",\n \"isDisabled\",\n \"isReadOnly\",\n \"isRequired\",\n \"isInvalid\",\n \"description\",\n \"errorMessage\",\n \"id\",\n \"autoFocus\",\n \"excludeFromTabOrder\",\n \"name\",\n \"form\",\n \"validationBehavior\",\n \"type\",\n \"placeholder\",\n \"autoComplete\",\n \"inputMode\",\n \"enterKeyHint\",\n \"autoCorrect\",\n \"autoCapitalize\",\n \"spellCheck\",\n \"maxLength\",\n \"minLength\",\n \"pattern\",\n \"onFocus\",\n \"onBlur\",\n \"onFocusChange\",\n \"onKeyDown\",\n \"onKeyUp\",\n \"onCopy\",\n \"onCut\",\n \"onPaste\",\n \"onCompositionStart\",\n \"onCompositionEnd\",\n \"onCompositionUpdate\",\n \"onSelect\",\n \"onBeforeInput\",\n \"onInput\",\n ],\n );\n\n const state = createSearchFieldState({\n get value() {\n return stateProps.value;\n },\n get defaultValue() {\n return stateProps.defaultValue;\n },\n get onChange() {\n return stateProps.onChange;\n },\n });\n\n let inputRef: HTMLInputElement | undefined;\n const setInputRef = (el: HTMLInputElement) => {\n inputRef = el;\n };\n\n const searchFieldAria = createSearchField(\n {\n get isDisabled() {\n return ariaProps.isDisabled;\n },\n get isReadOnly() {\n return ariaProps.isReadOnly;\n },\n get isRequired() {\n return ariaProps.isRequired;\n },\n get isInvalid() {\n return ariaProps.isInvalid;\n },\n get label() {\n return ariaProps.label;\n },\n get \"aria-label\"() {\n return ariaProps[\"aria-label\"];\n },\n get \"aria-labelledby\"() {\n return ariaProps[\"aria-labelledby\"];\n },\n get \"aria-describedby\"() {\n return ariaProps[\"aria-describedby\"];\n },\n get description() {\n return ariaProps.description;\n },\n get errorMessage() {\n return ariaProps.errorMessage;\n },\n get placeholder() {\n return ariaProps.placeholder;\n },\n get name() {\n return ariaProps.name;\n },\n get form() {\n return ariaProps.form;\n },\n get validationBehavior() {\n return ariaProps.validationBehavior;\n },\n get type() {\n return ariaProps.type;\n },\n get autoFocus() {\n return ariaProps.autoFocus;\n },\n get excludeFromTabOrder() {\n return ariaProps.excludeFromTabOrder;\n },\n get autoComplete() {\n return ariaProps.autoComplete;\n },\n get inputMode() {\n return ariaProps.inputMode;\n },\n get enterKeyHint() {\n return ariaProps.enterKeyHint;\n },\n get autoCorrect() {\n return ariaProps.autoCorrect;\n },\n get autoCapitalize() {\n return ariaProps.autoCapitalize;\n },\n get spellCheck() {\n return ariaProps.spellCheck;\n },\n get maxLength() {\n return ariaProps.maxLength;\n },\n get minLength() {\n return ariaProps.minLength;\n },\n get pattern() {\n return ariaProps.pattern;\n },\n get onFocus() {\n return ariaProps.onFocus;\n },\n get onBlur() {\n return ariaProps.onBlur;\n },\n get onFocusChange() {\n return ariaProps.onFocusChange;\n },\n get onKeyDown() {\n return ariaProps.onKeyDown;\n },\n get onKeyUp() {\n return ariaProps.onKeyUp;\n },\n get onCopy() {\n return ariaProps.onCopy;\n },\n get onCut() {\n return ariaProps.onCut;\n },\n get onPaste() {\n return ariaProps.onPaste;\n },\n get onCompositionStart() {\n return ariaProps.onCompositionStart;\n },\n get onCompositionEnd() {\n return ariaProps.onCompositionEnd;\n },\n get onCompositionUpdate() {\n return ariaProps.onCompositionUpdate;\n },\n get onSelect() {\n return ariaProps.onSelect;\n },\n get onBeforeInput() {\n return ariaProps.onBeforeInput;\n },\n get onInput() {\n return ariaProps.onInput;\n },\n get onSubmit() {\n return stateProps.onSubmit;\n },\n get onClear() {\n return stateProps.onClear;\n },\n },\n state,\n () => inputRef ?? null,\n );\n\n const renderValues = createMemo<SearchFieldRenderProps>(() => ({\n isEmpty: state.value() === \"\",\n isDisabled: ariaProps.isDisabled ?? false,\n isInvalid: searchFieldAria.isInvalid ?? false,\n isRequired: ariaProps.isRequired ?? false,\n isReadOnly: ariaProps.isReadOnly ?? false,\n value: state.value(),\n }));\n\n const renderProps = useRenderProps(\n {\n get children() {\n return local.children;\n },\n class: local.class,\n style: local.style,\n defaultClassName: \"solidaria-SearchField\",\n },\n renderValues,\n );\n const childRenderValues: SearchFieldRenderProps = {\n get isEmpty() {\n return state.value() === \"\";\n },\n get isDisabled() {\n return ariaProps.isDisabled ?? false;\n },\n get isInvalid() {\n return searchFieldAria.isInvalid ?? false;\n },\n get isRequired() {\n return ariaProps.isRequired ?? false;\n },\n get isReadOnly() {\n return ariaProps.isReadOnly ?? false;\n },\n get value() {\n return state.value();\n },\n };\n\n const domProps = createMemo(() =>\n filterDOMProps(rest as Record<string, unknown>, { global: true }),\n );\n\n const fieldValidation = createMemo<ValidationResult>(() => {\n const isInvalid = searchFieldAria.isInvalid;\n const errorMessage = ariaProps.errorMessage;\n const validationErrors = isInvalid && typeof errorMessage === \"string\" ? [errorMessage] : [];\n\n return {\n isInvalid,\n validationErrors,\n validationDetails: isInvalid\n ? { ...VALID_VALIDITY_STATE, customError: true, valid: false }\n : VALID_VALIDITY_STATE,\n };\n });\n const fieldErrorContext: FieldErrorContextValue = {\n get validation() {\n return fieldValidation();\n },\n get errorMessageProps() {\n return searchFieldAria.errorMessageProps;\n },\n };\n const contextValue: SearchFieldContextValue = {\n state,\n get inputProps() {\n return searchFieldAria.inputProps;\n },\n get clearButtonProps() {\n return searchFieldAria.clearButtonProps;\n },\n get labelProps() {\n return searchFieldAria.labelProps as JSX.HTMLAttributes<HTMLElement>;\n },\n get descriptionProps() {\n return searchFieldAria.descriptionProps;\n },\n get errorMessageProps() {\n return searchFieldAria.errorMessageProps;\n },\n get isDisabled() {\n return ariaProps.isDisabled ?? false;\n },\n get isInvalid() {\n return searchFieldAria.isInvalid ?? false;\n },\n get isRequired() {\n return ariaProps.isRequired ?? false;\n },\n get isReadOnly() {\n return ariaProps.isReadOnly ?? false;\n },\n setInputRef,\n };\n const fieldChildren = () => {\n const children = local.children;\n return typeof children === \"function\" ? children(childRenderValues) : children;\n };\n // Provide the description / errorMessage props as `TextContext` slots (mirrors\n // react-aria-components' SearchField), so a `<Text slot=\"description\">` /\n // `<Text slot=\"errorMessage\">` child picks up the `id` its `aria-describedby`\n // references. Additive: existing consumers reading these off\n // `SearchFieldContext` are unaffected.\n const textSlots = {\n slots: {\n get description() {\n return searchFieldAria.descriptionProps;\n },\n get errorMessage() {\n return searchFieldAria.errorMessageProps;\n },\n },\n };\n\n return (\n <FieldErrorContext.Provider value={fieldErrorContext}>\n <SearchFieldContext.Provider value={contextValue}>\n <div\n {...domProps()}\n ref={local.ref}\n class={renderProps.class()}\n style={renderProps.style()}\n data-empty={state.value() === \"\" || undefined}\n data-disabled={ariaProps.isDisabled || undefined}\n data-invalid={searchFieldAria.isInvalid || undefined}\n data-required={ariaProps.isRequired || undefined}\n data-readonly={ariaProps.isReadOnly || undefined}\n >\n <Provider values={[[TextContext, textSlots]] as Array<[Context<unknown>, unknown]>}>\n {fieldChildren()}\n </Provider>\n </div>\n </SearchFieldContext.Provider>\n </FieldErrorContext.Provider>\n );\n}\n\n/**\n * The label for a search field.\n */\nexport function SearchFieldLabel(props: {\n children?: JSX.Element;\n class?: string;\n style?: JSX.CSSProperties;\n}): JSX.Element {\n const context = useContext(SearchFieldContext);\n if (!context) {\n throw new Error(\"SearchFieldLabel must be used within a SearchField\");\n }\n\n const cleanLabelProps = () => {\n const { ref: _ref, ...rest } = context.labelProps as Record<string, unknown>;\n return rest;\n };\n\n return (\n <label\n {...cleanLabelProps()}\n class={props.class ?? \"solidaria-SearchField-label\"}\n style={props.style}\n >\n {props.children}\n </label>\n );\n}\n\n/**\n * The input element for a search field.\n */\nexport function SearchFieldInput(props: SearchFieldInputProps): JSX.Element {\n const [local, domProps] = splitProps(props, [\"class\", \"style\", \"slot\"]);\n let inputElement: HTMLInputElement | undefined;\n\n const context = useContext(SearchFieldContext);\n if (!context) {\n throw new Error(\"SearchFieldInput must be used within a SearchField\");\n }\n\n // Inside an <Autocomplete>, expose the ARIA attributes that identify the\n // controlled collection and its virtually-focused option. value/onChange and the\n // keyboard handlers are already merged upstream in SearchField(); here we only add\n // the passthrough attributes that createTextField doesn't forward, and register the\n // input element as the autocomplete inputRef so the beforeinput + reverse-path\n // (aria-activedescendant mirror) listeners bind. Mirrors RAC's\n // [InputContext, {...inputProps, ref: inputRef}].\n const autocompleteInput = useAutocompleteInput();\n\n const { isFocused, isFocusVisible, focusProps } = createFocusRing();\n\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return context.isDisabled;\n },\n });\n\n const renderValues = createMemo<SearchFieldInputRenderProps>(() => ({\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible(),\n isHovered: isHovered(),\n isDisabled: !!context.isDisabled,\n isInvalid: !!context.isInvalid,\n }));\n\n const renderProps = useRenderProps(\n {\n class: local.class,\n style: local.style,\n defaultClassName: \"solidaria-SearchField-input\",\n },\n renderValues,\n );\n\n const cleanInputProps = () => {\n const { ref: _ref, ...rest } = context.inputProps as Record<string, unknown>;\n return rest;\n };\n const cleanFocusProps = () => {\n const { ref: _ref, ...rest } = focusProps as Record<string, unknown>;\n return rest;\n };\n const cleanHoverProps = () => {\n const { ref: _ref, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n\n const autocompleteInputAttrs = (): Record<string, unknown> => {\n if (!autocompleteInput) {\n return {};\n }\n const inputProps = autocompleteInput.inputProps;\n return {\n \"aria-controls\": inputProps[\"aria-controls\"],\n \"aria-autocomplete\": inputProps[\"aria-autocomplete\"],\n \"aria-activedescendant\": inputProps[\"aria-activedescendant\"](),\n };\n };\n\n const mergedInputProps = () =>\n ({\n ...domProps,\n ...cleanInputProps(),\n ...cleanFocusProps(),\n ...cleanHoverProps(),\n ...autocompleteInputAttrs(),\n }) as Record<string, unknown>;\n\n onMount(() => {\n const element = inputElement;\n if (!element) {\n return;\n }\n\n const inputHandler = (event: Event) => {\n const handler = mergedInputProps().onInput as\n | JSX.EventHandler<HTMLInputElement, InputEvent>\n | undefined;\n handler?.(\n eventWithCurrentTarget(event, element) as InputEvent & {\n currentTarget: HTMLInputElement;\n target: Element;\n },\n );\n clearDelegatedTextEntryHandlers(element);\n event.stopPropagation();\n };\n const changeHandler = (event: Event) => {\n const handler = mergedInputProps().onChange as\n | JSX.EventHandler<HTMLInputElement, Event>\n | undefined;\n handler?.(\n eventWithCurrentTarget(event, element) as Event & {\n currentTarget: HTMLInputElement;\n target: Element;\n },\n );\n clearDelegatedTextEntryHandlers(element);\n event.stopPropagation();\n };\n\n element.addEventListener(\"input\", inputHandler);\n element.addEventListener(\"change\", changeHandler);\n clearDelegatedTextEntryHandlers(element);\n onCleanup(() => {\n element.removeEventListener(\"input\", inputHandler);\n element.removeEventListener(\"change\", changeHandler);\n });\n });\n\n return (\n <input\n {...mergedInputProps()}\n ref={(element) => {\n inputElement = element;\n context.setInputRef?.(element);\n autocompleteInput?.inputRef(element);\n const ref = (domProps as { ref?: unknown }).ref;\n if (typeof ref === \"function\") {\n ref(element);\n }\n }}\n class={renderProps.class()}\n style={renderProps.style()}\n data-focused={isFocused() || undefined}\n data-focus-visible={isFocusVisible() || undefined}\n data-hovered={isHovered() || undefined}\n data-disabled={context.isDisabled || undefined}\n data-invalid={context.isInvalid || undefined}\n />\n );\n}\n\n/**\n * The clear button for a search field.\n */\nexport function SearchFieldClearButton(props: SearchFieldClearButtonProps): JSX.Element {\n const [local, domProps] = splitProps(props, [\"class\", \"style\", \"slot\", \"children\"]);\n\n const context = useContext(SearchFieldContext);\n if (!context) {\n throw new Error(\"SearchFieldClearButton must be used within a SearchField\");\n }\n\n const isDisabled = () => !!(context.isDisabled || context.isReadOnly);\n const isEmpty = () => (context.state?.value() ?? \"\") === \"\";\n const clear = () => {\n if (!isDisabled() && !isEmpty()) {\n context.clearButtonProps?.onClick();\n }\n };\n\n const { isPressed, pressProps } = createPress({\n get isDisabled() {\n return context.isDisabled || context.isReadOnly;\n },\n onClick: clear,\n onPress: clear,\n });\n\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return context.isDisabled || context.isReadOnly;\n },\n });\n\n const renderValues = createMemo<SearchFieldClearButtonRenderProps>(() => ({\n isPressed: isPressed(),\n isHovered: isHovered(),\n isDisabled: isDisabled(),\n }));\n\n const renderProps = useRenderProps(\n {\n get children() {\n return props.children;\n },\n class: local.class,\n style: local.style,\n defaultClassName: \"solidaria-SearchField-clear\",\n },\n renderValues,\n );\n\n const cleanPressProps = () => {\n const { ref: _ref, ...rest } = pressProps as Record<string, unknown>;\n return rest;\n };\n const cleanHoverProps = () => {\n const { ref: _ref, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n\n return (\n <Show when={!isEmpty()}>\n <button\n {...domProps}\n type=\"button\"\n aria-label={context.clearButtonProps?.[\"aria-label\"] ?? \"Clear search\"}\n tabIndex={context.clearButtonProps?.tabIndex ?? -1}\n disabled={context.clearButtonProps?.disabled}\n onMouseDown={context.clearButtonProps?.onMouseDown}\n {...cleanPressProps()}\n onPointerUp={clear}\n onMouseUp={clear}\n onClick={clear}\n {...cleanHoverProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-pressed={isPressed() || undefined}\n data-hovered={isHovered() || undefined}\n data-disabled={isDisabled() || undefined}\n >\n {renderProps.renderChildren()}\n </button>\n </Show>\n );\n}\n\nSearchField.Label = SearchFieldLabel;\nSearchField.Input = SearchFieldInput;\nSearchField.ClearButton = SearchFieldClearButton;\n"],"mappings":";;;;;;;;;;;;;;;;;AAmJA,MAAaoF,qBAAqBlF,cAA8C,IAAI;AAEpF,SAASmF,2BACPC,OACAC,aACkB;CAClB,IAAI,CAACA,aAAaC,oBAChB,OAAOF;CAGT,OAAO,IAAIG,MAAMH,OAAO;EACtBI,IAAIC,QAAQC,UAAUC,UAAU;GAC9B,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AAA+C,OAAA9C,WAEdnB,UAAQ;IAAA,QACP;IAAQ,KAAA,gBAAA;KAAA,OACD8B,QAAQjJ,mBAAmB,iBAAiB;IAAc;IAAA,IACtEC,WAAQ;KAAA,OAAEgJ,QAAQjJ,kBAAkBC,YAAY;IAAE;IAAA,IAClDC,WAAQ;KAAA,OAAE+I,QAAQjJ,kBAAkBE;IAAQ;IAAA,IAC5CC,cAAW;KAAA,OAAE8I,QAAQjJ,kBAAkBG;IAAW;GAAA,GAC9C+K,iBAAe;IAAA,eACNH;IAAK,aACPA;IAAK,WACPA;GAAK,GACVlB,iBAAe;IAAA,KAAA,WAAA;KAAA,OACZ7C,YAAYrI,MAAM;IAAC;IAAA,IAC1BC,QAAK;KAAA,OAAEoI,YAAYpI,MAAM;IAAC;IAAA,KAAA,kBAAA;KAAA,OACZY,UAAU,KAAKmC,KAAAA;IAAS;IAAA,KAAA,kBAAA;KAAA,OACxBxC,UAAU,KAAKwC,KAAAA;IAAS;IAAA,KAAA,mBAAA;KAAA,OACvB9D,WAAW,KAAK8D,KAAAA;IAAS;GAAA,CAAA,GAAA,OAAA,IAAA;GAAAiH,OAAAwC,aAEvCpE,YAAYuE,eAAe,CAAC;GAAAzC,mBAAA;GAAA,OAAAsC;EAAA;CAAA,CAAA;AAIrC;AAEAnI,YAAYuI,QAAQzC;AACpB9F,YAAYwI,QAAQlC;AACpBtG,YAAYyI,cAAcZ"}
1
+ {"version":3,"file":"SearchField.js","names":["<FieldErrorContext value={fieldErrorContext}>\n <LabelContext value={labelContextValue}>\n <SearchFieldContext value={contextValue}>\n <div\n {...domProps()}\n ref={local.ref}\n class={renderProps.class()}\n style={renderProps.style()}\n data-empty={dataAttr(state.value() === \"\")}\n data-disabled={dataAttr(ariaProps.isDisabled)}\n data-invalid={dataAttr(searchFieldAria.isInvalid)}\n data-required={dataAttr(ariaProps.isRequired)}\n data-readonly={dataAttr(ariaProps.isReadOnly)}\n >\n <Provider values={[[TextContext, textSlots]] as Array<[Context<unknown>, unknown]>}>\n {fieldChildren()}\n </Provider>\n </div>\n </SearchFieldContext>\n </LabelContext>\n </FieldErrorContext>","value={fieldErrorContext}","<LabelContext value={labelContextValue}>\n <SearchFieldContext value={contextValue}>\n <div\n {...domProps()}\n ref={local.ref}\n class={renderProps.class()}\n style={renderProps.style()}\n data-empty={dataAttr(state.value() === \"\")}\n data-disabled={dataAttr(ariaProps.isDisabled)}\n data-invalid={dataAttr(searchFieldAria.isInvalid)}\n data-required={dataAttr(ariaProps.isRequired)}\n data-readonly={dataAttr(ariaProps.isReadOnly)}\n >\n <Provider values={[[TextContext, textSlots]] as Array<[Context<unknown>, unknown]>}>\n {fieldChildren()}\n </Provider>\n </div>\n </SearchFieldContext>\n </LabelContext>","value={labelContextValue}","<SearchFieldContext value={contextValue}>\n <div\n {...domProps()}\n ref={local.ref}\n class={renderProps.class()}\n style={renderProps.style()}\n data-empty={dataAttr(state.value() === \"\")}\n data-disabled={dataAttr(ariaProps.isDisabled)}\n data-invalid={dataAttr(searchFieldAria.isInvalid)}\n data-required={dataAttr(ariaProps.isRequired)}\n data-readonly={dataAttr(ariaProps.isReadOnly)}\n >\n <Provider values={[[TextContext, textSlots]] as Array<[Context<unknown>, unknown]>}>\n {fieldChildren()}\n </Provider>\n </div>\n </SearchFieldContext>","value={contextValue}","ref={local.ref}","<Provider values={[[TextContext, textSlots]] as Array<[Context<unknown>, unknown]>}>\n {fieldChildren()}\n </Provider>","values={[[TextContext, textSlots]] as Array<[Context<unknown>, unknown]>}","<div\n {...domProps()}\n ref={local.ref}\n class={renderProps.class()}\n style={renderProps.style()}\n data-empty={dataAttr(state.value() === \"\")}\n data-disabled={dataAttr(ariaProps.isDisabled)}\n data-invalid={dataAttr(searchFieldAria.isInvalid)}\n data-required={dataAttr(ariaProps.isRequired)}\n data-readonly={dataAttr(ariaProps.isReadOnly)}\n >\n <Provider values={[[TextContext, textSlots]] as Array<[Context<unknown>, unknown]>}>\n {fieldChildren()}\n </Provider>\n </div>","ref={(el) => context.labelRef?.(el)}","{props.children}","<label\n {...cleanLabelProps()}\n ref={(el) => context.labelRef?.(el)}\n class={props.class ?? \"solidaria-SearchField-label\"}\n style={props.style}\n >\n {props.children}\n </label>","ref={(element) => {\n inputElement = element;\n context.setInputRef?.(element);\n autocompleteInput?.inputRef(element);\n assignRef(context.inputProps?.ref, element);\n assignRef((domProps as { ref?: unknown }).ref, element);\n }}","<input\n {...mergedInputProps()}\n ref={(element) => {\n inputElement = element;\n context.setInputRef?.(element);\n autocompleteInput?.inputRef(element);\n assignRef(context.inputProps?.ref, element);\n assignRef((domProps as { ref?: unknown }).ref, element);\n }}\n class={renderProps.class()}\n style={renderProps.style()}\n data-focused={dataAttr(isFocused())}\n data-focus-visible={dataAttr(isFocusVisible())}\n data-hovered={dataAttr(isHovered())}\n data-disabled={dataAttr(context.isDisabled)}\n data-invalid={dataAttr(context.isInvalid)}\n />","<Show when={!isEmpty()}>\n <button\n {...domProps}\n type=\"button\"\n aria-label={context.clearButtonProps?.[\"aria-label\"] ?? \"Clear search\"}\n tabindex={context.clearButtonProps?.tabIndex ?? -1}\n disabled={context.clearButtonProps?.disabled}\n onMouseDown={context.clearButtonProps?.onMouseDown}\n {...cleanPressProps()}\n onPointerUp={clear}\n onMouseUp={clear}\n onClick={clear}\n {...cleanHoverProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-pressed={dataAttr(isPressed())}\n data-hovered={dataAttr(isHovered())}\n data-disabled={dataAttr(isDisabled())}\n >\n {renderProps.renderChildren()}\n </button>\n </Show>","type=\"button\"","onPointerUp={clear}","onMouseUp={clear}","onClick={clear}","{renderProps.renderChildren()}","<button\n {...domProps}\n type=\"button\"\n aria-label={context.clearButtonProps?.[\"aria-label\"] ?? \"Clear search\"}\n tabindex={context.clearButtonProps?.tabIndex ?? -1}\n disabled={context.clearButtonProps?.disabled}\n onMouseDown={context.clearButtonProps?.onMouseDown}\n {...cleanPressProps()}\n onPointerUp={clear}\n onMouseUp={clear}\n onClick={clear}\n {...cleanHoverProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-pressed={dataAttr(isPressed())}\n data-hovered={dataAttr(isHovered())}\n data-disabled={dataAttr(isDisabled())}\n >\n {renderProps.renderChildren()}\n </button>"],"sources":["../src/SearchField.tsx"],"sourcesContent":["/*\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// Ported to SolidJS for Proyecto Viviana; based on packages/react-aria-components/src/SearchField.tsx\n\n/**\n * SearchField component for solidaria-components\n *\n * A pre-wired headless search field that combines state + aria hooks.\n * Port of react-aria-components/src/SearchField.tsx\n */\n\nimport { createContext, createMemo, onSettled, useContext, Show } from \"solid-js\";\nimport type { Context } from \"solid-js\";\nimport type { JSX } from \"@solidjs/web\";\nimport {\n createSearchField,\n createFocusRing,\n createHover,\n createPress,\n mergeProps,\n type AriaSearchFieldProps,\n} from \"@proyecto-viviana/solidaria\";\nimport {\n createSearchFieldState,\n type SearchFieldState,\n type ValidationResult,\n} from \"@proyecto-viviana/solid-stately\";\nimport { FormContext, resolveValidationBehavior } from \"./Form\";\nimport { FieldErrorContext, type FieldErrorContextValue } from \"./FieldError\";\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n filterDOMProps,\n Provider,\n useSlot,\n dataAttr,\n attrString,\n} from \"./utils\";\nimport { TextContext } from \"./Text\";\nimport { LabelContext, type LabelProps } from \"./Label\";\nimport { useAutocompleteInput } from \"./Autocomplete\";\nimport { assignRef, splitProps } from \"@proyecto-viviana/solidaria/utils\";\n\nexport interface SearchFieldRenderProps {\n /** Whether the search field is empty. */\n isEmpty: boolean;\n /** Whether the search field is disabled. */\n isDisabled: boolean;\n /** Whether the search field is invalid. */\n isInvalid: boolean;\n /** Whether the search field is read-only. */\n isReadOnly: boolean;\n /** Whether the search field is required. */\n isRequired: boolean;\n /** The current value. */\n value: string;\n}\n\nexport interface SearchFieldProps extends Omit<AriaSearchFieldProps, \"label\">, SlotProps {\n /** The current value (controlled). */\n value?: string;\n /** The default value (uncontrolled). */\n defaultValue?: string;\n /** Handler called when the value changes. */\n onChange?: (value: string) => void;\n /** Handler called when the user submits the search. */\n onSubmit?: (value: string) => void;\n /** Handler called when the field is cleared. */\n onClear?: () => void;\n /** A visible label for the search field. */\n label?: JSX.Element;\n /** The children of the component. */\n children?: RenderChildren<SearchFieldRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<SearchFieldRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<SearchFieldRenderProps>;\n /** Ref for the outer search field element. */\n ref?: (el: HTMLDivElement) => void;\n}\n\nexport interface SearchFieldInputRenderProps {\n /** Whether the input is focused. */\n isFocused: boolean;\n /** Whether the input has keyboard focus. */\n isFocusVisible: boolean;\n /** Whether the input is hovered. */\n isHovered: boolean;\n /** Whether the input is disabled. */\n isDisabled: boolean;\n /** Whether the input is invalid. */\n isInvalid: boolean;\n}\n\nexport interface SearchFieldInputProps\n extends SlotProps, Omit<JSX.InputHTMLAttributes<HTMLInputElement>, \"class\" | \"style\"> {\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<SearchFieldInputRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<SearchFieldInputRenderProps>;\n}\n\nexport interface SearchFieldClearButtonRenderProps {\n /** Whether the button is pressed. */\n isPressed: boolean;\n /** Whether the button is hovered. */\n isHovered: boolean;\n /** Whether the button is disabled. */\n isDisabled: boolean;\n}\n\nexport interface SearchFieldClearButtonProps\n extends\n SlotProps,\n Omit<JSX.ButtonHTMLAttributes<HTMLButtonElement>, \"class\" | \"style\" | \"children\"> {\n /** The children of the button. */\n children?: RenderChildren<SearchFieldClearButtonRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<SearchFieldClearButtonRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<SearchFieldClearButtonRenderProps>;\n}\n\ninterface SearchFieldContextValue extends Partial<SearchFieldProps> {\n state?: SearchFieldState;\n inputProps?: JSX.InputHTMLAttributes<HTMLInputElement>;\n clearButtonProps?: {\n \"aria-label\": string;\n tabIndex: number;\n disabled?: boolean;\n onMouseDown: (e: MouseEvent) => void;\n onClick: () => void;\n };\n labelProps?: JSX.HTMLAttributes<HTMLElement>;\n /** Slot probe for the rendered label, so `useLabel` knows a label exists. */\n labelRef?: (el: Element | null) => void;\n descriptionProps?: JSX.HTMLAttributes<HTMLElement>;\n errorMessageProps?: JSX.HTMLAttributes<HTMLElement>;\n isDisabled?: boolean;\n isInvalid?: boolean;\n isRequired?: boolean;\n isReadOnly?: boolean;\n setInputRef?: (el: HTMLInputElement) => void;\n slots?: Record<string, SearchFieldProps>;\n}\n\nexport const SearchFieldContext = createContext<SearchFieldContextValue | null>(null);\n\nfunction eventWithCurrentTarget<T extends HTMLElement>(event: Event, element: T): Event {\n return new Proxy(event, {\n get(target, property, receiver) {\n if (property === \"target\" || property === \"currentTarget\") {\n return element;\n }\n\n const value = Reflect.get(target, property, receiver);\n return typeof value === \"function\" ? value.bind(target) : value;\n },\n });\n}\n\nfunction clearDelegatedTextEntryHandlers(element: HTMLElement) {\n const delegatedElement = element as HTMLElement & {\n $$input?: unknown;\n $$change?: unknown;\n };\n delete delegatedElement.$$input;\n delete delegatedElement.$$change;\n}\n\n/**\n * A search field allows a user to enter and clear a search query.\n */\nexport function SearchField(props: SearchFieldProps): JSX.Element {\n const formContext = useContext(FormContext);\n const contextProps = useContext(SearchFieldContext);\n const contextSlotProps =\n contextProps?.slots?.[typeof props.slot === \"string\" ? props.slot : \"default\"];\n const contextBaseProps = createMemo<SearchFieldProps>(() => {\n if (!contextProps) return {};\n const {\n state: _state,\n inputProps: _inputProps,\n clearButtonProps: _clearButtonProps,\n labelProps: _labelProps,\n descriptionProps: _descriptionProps,\n errorMessageProps: _errorMessageProps,\n isDisabled: _isDisabled,\n isInvalid: _isInvalid,\n isRequired: _isRequired,\n isReadOnly: _isReadOnly,\n setInputRef: _setInputRef,\n slots: _slots,\n ...restContextProps\n } = contextProps;\n return restContextProps as SearchFieldProps;\n });\n const baseProps = (\n contextProps ? mergeProps(contextBaseProps(), contextSlotProps ?? {}, props) : props\n ) as SearchFieldProps;\n\n // When rendered inside an <Autocomplete>, the FieldInputContext (AutocompleteContext)\n // controls the input's value and keyboard handling: value + onChange make the field's\n // state controlled by the shared autocomplete state (which drives the collection\n // filter), and onKeyDown/onFocus/onBlur chain the autocomplete's virtual-focus\n // navigation into the input. This mirrors RAC's\n // useContextProps(props, inputRef, FieldInputContext). The remaining passthroughs\n // (aria-activedescendant/aria-controls/aria-autocomplete and the four native\n // input attrs) and the input-ref registration are applied last at the <input>\n // in SearchFieldInput so SearchField's undefined getters cannot wipe them.\n const autocompleteInput = useAutocompleteInput();\n const autocompleteProps = autocompleteInput\n ? ({\n get value() {\n return autocompleteInput.inputProps.value();\n },\n onChange: autocompleteInput.inputProps.onChange,\n onKeyDown: autocompleteInput.inputProps\n .onKeyDown as unknown as SearchFieldProps[\"onKeyDown\"],\n onFocus: autocompleteInput.inputProps.onFocus as unknown as SearchFieldProps[\"onFocus\"],\n onBlur: autocompleteInput.inputProps.onBlur as unknown as SearchFieldProps[\"onBlur\"],\n } as Partial<SearchFieldProps>)\n : undefined;\n\n const mergedProps = autocompleteProps\n ? (mergeProps(baseProps, autocompleteProps) as SearchFieldProps)\n : baseProps;\n\n const [local, stateProps, ariaProps, rest] = splitProps(\n mergedProps,\n [\"children\", \"class\", \"style\", \"slot\", \"ref\"],\n [\"value\", \"defaultValue\", \"onChange\", \"onSubmit\", \"onClear\"],\n [\n \"label\",\n \"aria-label\",\n \"aria-labelledby\",\n \"aria-describedby\",\n \"isDisabled\",\n \"isReadOnly\",\n \"isRequired\",\n \"isInvalid\",\n \"description\",\n \"errorMessage\",\n \"id\",\n \"autoFocus\",\n \"excludeFromTabOrder\",\n \"name\",\n \"form\",\n \"validationBehavior\",\n \"type\",\n \"placeholder\",\n \"autoComplete\",\n \"inputMode\",\n \"enterKeyHint\",\n \"autoCorrect\",\n \"autoCapitalize\",\n \"spellCheck\",\n \"maxLength\",\n \"minLength\",\n \"pattern\",\n \"onFocus\",\n \"onBlur\",\n \"onFocusChange\",\n \"onKeyDown\",\n \"onKeyUp\",\n \"onCopy\",\n \"onCut\",\n \"onPaste\",\n \"onCompositionStart\",\n \"onCompositionEnd\",\n \"onCompositionUpdate\",\n \"onSelect\",\n \"onBeforeInput\",\n \"onInput\",\n ],\n );\n\n const state = createSearchFieldState({\n get value() {\n return stateProps.value;\n },\n get defaultValue() {\n return stateProps.defaultValue;\n },\n get onChange() {\n return stateProps.onChange;\n },\n });\n\n let inputRef: HTMLInputElement | undefined;\n const setInputRef = (el: HTMLInputElement) => {\n inputRef = el;\n };\n\n const [labelRef, hasLabel] = useSlot(!ariaProps[\"aria-label\"] && !ariaProps[\"aria-labelledby\"]);\n\n const searchFieldAria = createSearchField(\n {\n get isDisabled() {\n return ariaProps.isDisabled;\n },\n get isReadOnly() {\n return ariaProps.isReadOnly;\n },\n get isRequired() {\n return ariaProps.isRequired;\n },\n get isInvalid() {\n return ariaProps.isInvalid;\n },\n // A slotted `<Label>` / `<SearchFieldLabel>` counts as a label, exactly\n // as RAC's `useSlot` does (`SearchField.tsx:117`). Without it `useLabel`\n // mints no `labelProps` and the input has no accessible name.\n get label() {\n return ariaProps.label ?? hasLabel();\n },\n get \"aria-label\"() {\n return ariaProps[\"aria-label\"];\n },\n get \"aria-labelledby\"() {\n return ariaProps[\"aria-labelledby\"];\n },\n get \"aria-describedby\"() {\n return ariaProps[\"aria-describedby\"];\n },\n get description() {\n return ariaProps.description;\n },\n get errorMessage() {\n return ariaProps.errorMessage;\n },\n get placeholder() {\n return ariaProps.placeholder;\n },\n get name() {\n return ariaProps.name;\n },\n get form() {\n return ariaProps.form;\n },\n get validationBehavior() {\n return resolveValidationBehavior(ariaProps.validationBehavior, formContext);\n },\n get type() {\n return ariaProps.type;\n },\n get autoFocus() {\n return ariaProps.autoFocus;\n },\n get excludeFromTabOrder() {\n return ariaProps.excludeFromTabOrder;\n },\n get autoComplete() {\n return ariaProps.autoComplete;\n },\n get inputMode() {\n return ariaProps.inputMode;\n },\n get enterKeyHint() {\n return ariaProps.enterKeyHint;\n },\n get autoCorrect() {\n return ariaProps.autoCorrect;\n },\n get autoCapitalize() {\n return ariaProps.autoCapitalize;\n },\n get spellCheck() {\n return ariaProps.spellCheck;\n },\n get maxLength() {\n return ariaProps.maxLength;\n },\n get minLength() {\n return ariaProps.minLength;\n },\n get pattern() {\n return ariaProps.pattern;\n },\n get onFocus() {\n return ariaProps.onFocus;\n },\n get onBlur() {\n return ariaProps.onBlur;\n },\n get onFocusChange() {\n return ariaProps.onFocusChange;\n },\n get onKeyDown() {\n return ariaProps.onKeyDown;\n },\n get onKeyUp() {\n return ariaProps.onKeyUp;\n },\n get onCopy() {\n return ariaProps.onCopy;\n },\n get onCut() {\n return ariaProps.onCut;\n },\n get onPaste() {\n return ariaProps.onPaste;\n },\n get onCompositionStart() {\n return ariaProps.onCompositionStart;\n },\n get onCompositionEnd() {\n return ariaProps.onCompositionEnd;\n },\n get onCompositionUpdate() {\n return ariaProps.onCompositionUpdate;\n },\n get onSelect() {\n return ariaProps.onSelect;\n },\n get onBeforeInput() {\n return ariaProps.onBeforeInput;\n },\n get onInput() {\n return ariaProps.onInput;\n },\n get onSubmit() {\n return stateProps.onSubmit;\n },\n get onClear() {\n return stateProps.onClear;\n },\n },\n state,\n () => inputRef ?? null,\n );\n\n const renderValues = createMemo<SearchFieldRenderProps>(() => ({\n isEmpty: state.value() === \"\",\n isDisabled: ariaProps.isDisabled ?? false,\n isInvalid: searchFieldAria.isInvalid ?? false,\n isRequired: ariaProps.isRequired ?? false,\n isReadOnly: ariaProps.isReadOnly ?? false,\n value: state.value(),\n }));\n\n const renderProps = useRenderProps(\n {\n get children() {\n return local.children;\n },\n class: local.class,\n style: local.style,\n defaultClassName: \"solidaria-SearchField\",\n },\n renderValues,\n );\n const childRenderValues: SearchFieldRenderProps = {\n get isEmpty() {\n return state.value() === \"\";\n },\n get isDisabled() {\n return ariaProps.isDisabled ?? false;\n },\n get isInvalid() {\n return searchFieldAria.isInvalid ?? false;\n },\n get isRequired() {\n return ariaProps.isRequired ?? false;\n },\n get isReadOnly() {\n return ariaProps.isReadOnly ?? false;\n },\n get value() {\n return state.value();\n },\n };\n\n const domProps = createMemo(() =>\n filterDOMProps(rest as Record<string, unknown>, { global: true }),\n );\n\n const fieldValidation = createMemo<ValidationResult>(() => {\n const isInvalid = searchFieldAria.isInvalid;\n const validationErrors = searchFieldAria.validationErrors;\n const errorMessage = ariaProps.errorMessage;\n return {\n isInvalid,\n validationErrors:\n isInvalid && validationErrors.length === 0 && typeof errorMessage === \"string\"\n ? [errorMessage]\n : validationErrors,\n validationDetails: searchFieldAria.validationDetails,\n };\n });\n const fieldErrorContext: FieldErrorContextValue = {\n get validation() {\n return fieldValidation();\n },\n get errorMessageProps() {\n return searchFieldAria.errorMessageProps;\n },\n };\n const contextValue: SearchFieldContextValue = {\n state,\n get inputProps() {\n return searchFieldAria.inputProps;\n },\n get clearButtonProps() {\n return searchFieldAria.clearButtonProps;\n },\n get labelProps() {\n return searchFieldAria.labelProps as JSX.HTMLAttributes<HTMLElement>;\n },\n labelRef,\n get descriptionProps() {\n return searchFieldAria.descriptionProps;\n },\n get errorMessageProps() {\n return searchFieldAria.errorMessageProps;\n },\n get isDisabled() {\n return ariaProps.isDisabled ?? false;\n },\n get isInvalid() {\n return searchFieldAria.isInvalid ?? false;\n },\n get isRequired() {\n return ariaProps.isRequired ?? false;\n },\n get isReadOnly() {\n return ariaProps.isReadOnly ?? false;\n },\n setInputRef,\n };\n const fieldChildren = () => {\n const children = local.children;\n return typeof children === \"function\" ? children(childRenderValues) : children;\n };\n // Provide the description / errorMessage props as `TextContext` slots (mirrors\n // react-aria-components' SearchField), so a `<Text slot=\"description\">` /\n // `<Text slot=\"errorMessage\">` child picks up the `id` its `aria-describedby`\n // references. Additive: existing consumers reading these off\n // `SearchFieldContext` are unaffected.\n const textSlots = {\n slots: {\n get description() {\n return searchFieldAria.descriptionProps;\n },\n get errorMessage() {\n return searchFieldAria.errorMessageProps;\n },\n },\n };\n\n // RAC exposes one shared `<Label>` through `LabelContext`; `SearchFieldLabel`\n // is a local convenience alias over the same wiring.\n const labelContextValue: LabelProps = {\n ref: labelRef,\n get id() {\n return (searchFieldAria.labelProps as JSX.LabelHTMLAttributes<HTMLLabelElement>).id;\n },\n get htmlFor() {\n const labelProps = searchFieldAria.labelProps as JSX.LabelHTMLAttributes<HTMLLabelElement> & {\n htmlFor?: string;\n };\n return attrString(labelProps.htmlFor ?? labelProps.for);\n },\n get for() {\n const labelProps = searchFieldAria.labelProps as JSX.LabelHTMLAttributes<HTMLLabelElement> & {\n htmlFor?: string;\n };\n return attrString(labelProps.htmlFor ?? labelProps.for);\n },\n };\n\n return (\n <FieldErrorContext value={fieldErrorContext}>\n <LabelContext value={labelContextValue}>\n <SearchFieldContext value={contextValue}>\n <div\n {...domProps()}\n ref={local.ref}\n class={renderProps.class()}\n style={renderProps.style()}\n data-empty={dataAttr(state.value() === \"\")}\n data-disabled={dataAttr(ariaProps.isDisabled)}\n data-invalid={dataAttr(searchFieldAria.isInvalid)}\n data-required={dataAttr(ariaProps.isRequired)}\n data-readonly={dataAttr(ariaProps.isReadOnly)}\n >\n <Provider values={[[TextContext, textSlots]] as Array<[Context<unknown>, unknown]>}>\n {fieldChildren()}\n </Provider>\n </div>\n </SearchFieldContext>\n </LabelContext>\n </FieldErrorContext>\n );\n}\n\n/**\n * The label for a search field.\n */\nexport function SearchFieldLabel(props: {\n children?: JSX.Element;\n class?: string;\n style?: JSX.CSSProperties;\n}): JSX.Element {\n const context = useContext(SearchFieldContext);\n if (!context) {\n throw new Error(\"SearchFieldLabel must be used within a SearchField\");\n }\n\n const cleanLabelProps = () => {\n const { ref: _ref, ...rest } = context.labelProps as Record<string, unknown>;\n return rest;\n };\n\n return (\n <label\n {...cleanLabelProps()}\n ref={(el) => context.labelRef?.(el)}\n class={props.class ?? \"solidaria-SearchField-label\"}\n style={props.style}\n >\n {props.children}\n </label>\n );\n}\n\n/**\n * The input element for a search field.\n */\nexport function SearchFieldInput(props: SearchFieldInputProps): JSX.Element {\n const [local, domProps] = splitProps(props, [\"class\", \"style\", \"slot\"]);\n let inputElement: HTMLInputElement | undefined;\n\n const context = useContext(SearchFieldContext);\n if (!context) {\n throw new Error(\"SearchFieldInput must be used within a SearchField\");\n }\n\n // Inside an <Autocomplete>, expose the ARIA attributes that identify the\n // controlled collection and its virtually-focused option, plus the four native\n // input attrs createAutocomplete already returns (autoComplete/autoCorrect/\n // spellCheck/enterKeyHint). value/onChange and the keyboard handlers are already\n // merged upstream in SearchField(); SearchField's split getters never receive\n // those Autocomplete values, so they must last-win here over undefined\n // createTextField copies. Register the input as the autocomplete inputRef so the\n // beforeinput + reverse-path (aria-activedescendant mirror) listeners bind.\n // Mirrors RAC's [InputContext, {...inputProps, ref: inputRef}].\n const autocompleteInput = useAutocompleteInput();\n\n const { isFocused, isFocusVisible, focusProps } = createFocusRing();\n\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return context.isDisabled;\n },\n });\n\n const renderValues = createMemo<SearchFieldInputRenderProps>(() => ({\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible(),\n isHovered: isHovered(),\n isDisabled: !!context.isDisabled,\n isInvalid: !!context.isInvalid,\n }));\n\n const renderProps = useRenderProps(\n {\n class: local.class,\n style: local.style,\n defaultClassName: \"solidaria-SearchField-input\",\n },\n renderValues,\n );\n\n const cleanInputProps = () => {\n const { ref: _ref, ...rest } = context.inputProps as Record<string, unknown>;\n return rest;\n };\n const cleanFocusProps = () => {\n const { ref: _ref, ...rest } = focusProps as Record<string, unknown>;\n return rest;\n };\n const cleanHoverProps = () => {\n const { ref: _ref, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n\n const autocompleteInputAttrs = (): Record<string, unknown> => {\n if (!autocompleteInput) {\n return {};\n }\n const inputProps = autocompleteInput.inputProps;\n return {\n \"aria-controls\": inputProps[\"aria-controls\"],\n \"aria-autocomplete\": inputProps[\"aria-autocomplete\"],\n \"aria-activedescendant\": inputProps[\"aria-activedescendant\"](),\n // Last-win over SearchField createTextField getters that return undefined\n // when Autocomplete did not merge these into ariaProps.\n autoComplete: inputProps.autoComplete,\n autoCorrect: inputProps.autoCorrect,\n spellCheck: inputProps.spellCheck,\n enterKeyHint: inputProps.enterKeyHint,\n };\n };\n\n const mergedInputProps = () =>\n ({\n ...domProps,\n ...cleanInputProps(),\n ...cleanFocusProps(),\n ...cleanHoverProps(),\n ...autocompleteInputAttrs(),\n }) as Record<string, unknown>;\n\n onSettled(() => {\n const element = inputElement;\n if (!element) {\n return;\n }\n\n const inputHandler = (event: Event) => {\n const handler = mergedInputProps().onInput as\n | JSX.EventHandler<HTMLInputElement, InputEvent>\n | undefined;\n handler?.(\n eventWithCurrentTarget(event, element) as InputEvent & {\n currentTarget: HTMLInputElement;\n target: Element;\n },\n );\n clearDelegatedTextEntryHandlers(element);\n event.stopPropagation();\n };\n const changeHandler = (event: Event) => {\n const handler = mergedInputProps().onChange as\n | JSX.EventHandler<HTMLInputElement, Event>\n | undefined;\n handler?.(\n eventWithCurrentTarget(event, element) as Event & {\n currentTarget: HTMLInputElement;\n target: Element;\n },\n );\n clearDelegatedTextEntryHandlers(element);\n event.stopPropagation();\n };\n\n element.addEventListener(\"input\", inputHandler);\n element.addEventListener(\"change\", changeHandler);\n clearDelegatedTextEntryHandlers(element);\n return () => {\n element.removeEventListener(\"input\", inputHandler);\n element.removeEventListener(\"change\", changeHandler);\n };\n });\n\n return (\n <input\n {...mergedInputProps()}\n ref={(element) => {\n inputElement = element;\n context.setInputRef?.(element);\n autocompleteInput?.inputRef(element);\n assignRef(context.inputProps?.ref, element);\n assignRef((domProps as { ref?: unknown }).ref, element);\n }}\n class={renderProps.class()}\n style={renderProps.style()}\n data-focused={dataAttr(isFocused())}\n data-focus-visible={dataAttr(isFocusVisible())}\n data-hovered={dataAttr(isHovered())}\n data-disabled={dataAttr(context.isDisabled)}\n data-invalid={dataAttr(context.isInvalid)}\n />\n );\n}\n\n/**\n * The clear button for a search field.\n */\nexport function SearchFieldClearButton(props: SearchFieldClearButtonProps): JSX.Element {\n const [local, domProps] = splitProps(props, [\"class\", \"style\", \"slot\", \"children\"]);\n\n const context = useContext(SearchFieldContext);\n if (!context) {\n throw new Error(\"SearchFieldClearButton must be used within a SearchField\");\n }\n\n const isDisabled = () => !!(context.isDisabled || context.isReadOnly);\n const isEmpty = () => (context.state?.value() ?? \"\") === \"\";\n const clear = () => {\n if (!isDisabled() && !isEmpty()) {\n context.clearButtonProps?.onClick();\n }\n };\n\n const { isPressed, pressProps } = createPress({\n get isDisabled() {\n return context.isDisabled || context.isReadOnly;\n },\n onClick: clear,\n onPress: clear,\n });\n\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return context.isDisabled || context.isReadOnly;\n },\n });\n\n const renderValues = createMemo<SearchFieldClearButtonRenderProps>(() => ({\n isPressed: isPressed(),\n isHovered: isHovered(),\n isDisabled: isDisabled(),\n }));\n\n const renderProps = useRenderProps(\n {\n get children() {\n return props.children;\n },\n class: local.class,\n style: local.style,\n defaultClassName: \"solidaria-SearchField-clear\",\n },\n renderValues,\n );\n\n const cleanPressProps = () => {\n const { ref: _ref, ...rest } = pressProps as Record<string, unknown>;\n return rest;\n };\n const cleanHoverProps = () => {\n const { ref: _ref, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n\n return (\n <Show when={!isEmpty()}>\n <button\n {...domProps}\n type=\"button\"\n aria-label={context.clearButtonProps?.[\"aria-label\"] ?? \"Clear search\"}\n tabindex={context.clearButtonProps?.tabIndex ?? -1}\n disabled={context.clearButtonProps?.disabled}\n onMouseDown={context.clearButtonProps?.onMouseDown}\n {...cleanPressProps()}\n onPointerUp={clear}\n onMouseUp={clear}\n onClick={clear}\n {...cleanHoverProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-pressed={dataAttr(isPressed())}\n data-hovered={dataAttr(isHovered())}\n data-disabled={dataAttr(isDisabled())}\n >\n {renderProps.renderChildren()}\n </button>\n </Show>\n );\n}\n\nSearchField.Label = SearchFieldLabel;\nSearchField.Input = SearchFieldInput;\nSearchField.ClearButton = SearchFieldClearButton;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+JA,MAAa,qBAAqB,cAA8C,IAAI;AAEpF,SAAS,uBAA8C,OAAc,SAAmB;CACtF,OAAO,IAAI,MAAM,OAAO,EACtB,IAAI,QAAQ,UAAU,UAAU;EAC9B,IAAI,aAAa,YAAY,aAAa,iBACxC,OAAO;EAGT,MAAM,QAAQ,QAAQ,IAAI,QAAQ,UAAU,QAAQ;EACpD,OAAO,OAAO,UAAU,aAAa,MAAM,KAAK,MAAM,IAAI;CAC5D,EACF,CAAC;AACH;AAEA,SAAS,gCAAgC,SAAsB;CAC7D,MAAM,mBAAmB;CAIzB,OAAO,iBAAiB;CACxB,OAAO,iBAAiB;AAC1B;;;;AAKA,SAAgB,YAAY,OAAsC;CAChE,MAAM,cAAc,WAAW,WAAW;CAC1C,MAAM,eAAe,WAAW,kBAAkB;CAClD,MAAM,mBACJ,cAAc,QAAQ,OAAO,MAAM,SAAS,WAAW,MAAM,OAAO;CACtE,MAAM,mBAAmB,iBAAmC;EAC1D,IAAI,CAAC,cAAc,OAAO,CAAC;EAC3B,MAAM,EACJ,OAAO,QACP,YAAY,aACZ,kBAAkB,mBAClB,YAAY,aACZ,kBAAkB,mBAClB,mBAAmB,oBACnB,YAAY,aACZ,WAAW,YACX,YAAY,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AAM,IAAA,OAAA;GAAM,OAAA,CAAC,QAAQ;EAAC;EAAtB,IAAA,WAAA;GACE,IAAA,QAAA,eAAA,OAmBQ;;IAlBF;IAMJ;KALAC,MAAAA;KACA,IAAA,eAAA;MAAY,OAAA,QAAQ,mBAAmB,iBAAiB;KAAc;KACtE,IAAA,WAAA;MAAU,OAAA,QAAQ,kBAAkB,YAAY;KAAE;KAClD,IAAA,WAAA;MAAU,OAAA,QAAQ,kBAAkB;KAAQ;KAC5C,IAAA,cAAA;MAAa,OAAA,QAAQ,kBAAkB;KAAW;IAC7B;IAAjB;IAIJ;KAHAC,aAAa;KACbC,WAAW;KACXC,SAAS;IACY;IAAjB;;KACJ,IAAA,UAAA;MAAO,OAAA,YAAY,MAAM;KAAC;KAC1B,IAAA,QAAA;MAAO,OAAA,YAAY,MAAM;KAAC;KAC1B,IAAA,iBAAA;MAAc,OAAA,SAAS,UAAU,CAAC;KAAC;KACnC,IAAA,iBAAA;MAAc,OAAA,SAAS,UAAU,CAAC;KAAC;KACnC,IAAA,kBAAA;MAAe,OAAA,SAAS,WAAW,CAAC;KAAC;;;GAhBvC,OAAA,OAkBEC,YAAAA;IAAC,OAAA,YAAY,eAAe;GAAC,CAAA,CACvB;GAnBR,mBAmBQ;GApBV,OACEC;EAoBI;;AAEV;AAEA,YAAY,QAAQ;AACpB,YAAY,QAAQ;AACpB,YAAY,cAAc"}
@@ -1,11 +1,25 @@
1
- import { Provider, filterDOMProps, useRenderProps } from "./utils.jsx";
2
- import { FieldErrorContext } from "./FieldError.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
+ // Ported to SolidJS for Proyecto Viviana; based on packages/react-aria-components/src/SearchField.tsx
13
+ import { Provider, attrString as attrString$1, dataAttr, filterDOMProps, useRenderProps, useSlot } from "./utils.jsx";
3
14
  import { TextContext } from "./Text.jsx";
4
- import { FormContext } from "./Form.jsx";
15
+ import { FieldErrorContext } from "./FieldError.jsx";
16
+ import { FormContext, resolveValidationBehavior } from "./Form.jsx";
17
+ import { n as LabelContext } from "./Label.jsx";
5
18
  import { useAutocompleteInput } from "./Autocomplete.jsx";
6
- import { Show, createContext, createMemo, onCleanup, onMount, splitProps, useContext } from "solid-js";
7
- import { createFocusRing, createHover, createPress, createSearchField, mergeProps as mergeProps$1 } from "@proyecto-viviana/solidaria";
8
- import { VALID_VALIDITY_STATE, createSearchFieldState } from "@proyecto-viviana/solid-stately";
19
+ import { Show, createContext, createMemo, onSettled, useContext } from "solid-js";
20
+ import { createFocusRing, createHover, createPress, createSearchField, mergeProps } from "@proyecto-viviana/solidaria";
21
+ import { assignRef, splitProps } from "@proyecto-viviana/solidaria/utils";
22
+ import { createSearchFieldState } from "@proyecto-viviana/solid-stately";
9
23
  //#region src/SearchField.tsx
10
24
  /**
11
25
  * SearchField component for solidaria-components
@@ -14,33 +28,6 @@ import { VALID_VALIDITY_STATE, createSearchFieldState } from "@proyecto-viviana/
14
28
  * Port of react-aria-components/src/SearchField.tsx
15
29
  */
16
30
  const SearchFieldContext = createContext(null);
17
- function withFormValidationBehavior(props, formContext) {
18
- if (!formContext?.validationBehavior) return props;
19
- return new Proxy(props, {
20
- get(target, property, receiver) {
21
- const localValue = Reflect.get(target, property, receiver);
22
- if (property === "validationBehavior" && localValue === void 0) return formContext.validationBehavior;
23
- return localValue;
24
- },
25
- has(target, property) {
26
- return Reflect.has(target, property) || property === "validationBehavior" && formContext.validationBehavior !== void 0;
27
- },
28
- ownKeys(target) {
29
- const keys = new Set(Reflect.ownKeys(target));
30
- if (formContext.validationBehavior !== void 0) keys.add("validationBehavior");
31
- return Array.from(keys);
32
- },
33
- getOwnPropertyDescriptor(target, property) {
34
- const descriptor = Reflect.getOwnPropertyDescriptor(target, property);
35
- if (descriptor) return descriptor;
36
- if (property === "validationBehavior" && formContext.validationBehavior !== void 0) return {
37
- enumerable: true,
38
- configurable: true,
39
- get: () => formContext.validationBehavior
40
- };
41
- }
42
- });
43
- }
44
31
  function eventWithCurrentTarget(event, element) {
45
32
  return new Proxy(event, { get(target, property, receiver) {
46
33
  if (property === "target" || property === "currentTarget") return element;
@@ -59,13 +46,13 @@ function clearDelegatedTextEntryHandlers(element) {
59
46
  function SearchField(props) {
60
47
  const formContext = useContext(FormContext);
61
48
  const contextProps = useContext(SearchFieldContext);
62
- const contextSlotProps = contextProps?.slots?.[props.slot ?? "default"];
49
+ const contextSlotProps = contextProps?.slots?.[typeof props.slot === "string" ? props.slot : "default"];
63
50
  const contextBaseProps = createMemo(() => {
64
51
  if (!contextProps) return {};
65
52
  const { state: _state, inputProps: _inputProps, clearButtonProps: _clearButtonProps, labelProps: _labelProps, descriptionProps: _descriptionProps, errorMessageProps: _errorMessageProps, isDisabled: _isDisabled, isInvalid: _isInvalid, isRequired: _isRequired, isReadOnly: _isReadOnly, setInputRef: _setInputRef, slots: _slots, ...restContextProps } = contextProps;
66
53
  return restContextProps;
67
54
  });
68
- const baseProps = contextProps ? mergeProps$1(contextBaseProps(), contextSlotProps ?? {}, props) : props;
55
+ const baseProps = contextProps ? mergeProps(contextBaseProps(), contextSlotProps ?? {}, props) : props;
69
56
  const autocompleteInput = useAutocompleteInput();
70
57
  const autocompleteProps = autocompleteInput ? {
71
58
  get value() {
@@ -76,7 +63,8 @@ function SearchField(props) {
76
63
  onFocus: autocompleteInput.inputProps.onFocus,
77
64
  onBlur: autocompleteInput.inputProps.onBlur
78
65
  } : void 0;
79
- const [local, stateProps, ariaProps, rest] = splitProps(withFormValidationBehavior(autocompleteProps ? mergeProps$1(baseProps, autocompleteProps) : baseProps, formContext), [
66
+ const mergedProps = autocompleteProps ? mergeProps(baseProps, autocompleteProps) : baseProps;
67
+ const [local, stateProps, ariaProps, rest] = splitProps(mergedProps, [
80
68
  "children",
81
69
  "class",
82
70
  "style",
@@ -146,6 +134,7 @@ function SearchField(props) {
146
134
  const setInputRef = (el) => {
147
135
  inputRef = el;
148
136
  };
137
+ const [labelRef, hasLabel] = useSlot(!ariaProps["aria-label"] && !ariaProps["aria-labelledby"]);
149
138
  const searchFieldAria = createSearchField({
150
139
  get isDisabled() {
151
140
  return ariaProps.isDisabled;
@@ -160,7 +149,7 @@ function SearchField(props) {
160
149
  return ariaProps.isInvalid;
161
150
  },
162
151
  get label() {
163
- return ariaProps.label;
152
+ return ariaProps.label ?? hasLabel();
164
153
  },
165
154
  get "aria-label"() {
166
155
  return ariaProps["aria-label"];
@@ -187,7 +176,7 @@ function SearchField(props) {
187
176
  return ariaProps.form;
188
177
  },
189
178
  get validationBehavior() {
190
- return ariaProps.validationBehavior;
179
+ return resolveValidationBehavior(ariaProps.validationBehavior, formContext);
191
180
  },
192
181
  get type() {
193
182
  return ariaProps.type;
@@ -313,15 +302,12 @@ function SearchField(props) {
313
302
  const domProps = createMemo(() => filterDOMProps(rest, { global: true }));
314
303
  const fieldValidation = createMemo(() => {
315
304
  const isInvalid = searchFieldAria.isInvalid;
305
+ const validationErrors = searchFieldAria.validationErrors;
316
306
  const errorMessage = ariaProps.errorMessage;
317
307
  return {
318
308
  isInvalid,
319
- validationErrors: isInvalid && typeof errorMessage === "string" ? [errorMessage] : [],
320
- validationDetails: isInvalid ? {
321
- ...VALID_VALIDITY_STATE,
322
- customError: true,
323
- valid: false
324
- } : VALID_VALIDITY_STATE
309
+ validationErrors: isInvalid && validationErrors.length === 0 && typeof errorMessage === "string" ? [errorMessage] : validationErrors,
310
+ validationDetails: searchFieldAria.validationDetails
325
311
  };
326
312
  });
327
313
  const fieldErrorContext = {
@@ -343,6 +329,7 @@ function SearchField(props) {
343
329
  get labelProps() {
344
330
  return searchFieldAria.labelProps;
345
331
  },
332
+ labelRef,
346
333
  get descriptionProps() {
347
334
  return searchFieldAria.descriptionProps;
348
335
  },
@@ -375,15 +362,31 @@ function SearchField(props) {
375
362
  return searchFieldAria.errorMessageProps;
376
363
  }
377
364
  } };
378
- return <FieldErrorContext.Provider value={fieldErrorContext}>
379
- <SearchFieldContext.Provider value={contextValue}>
380
- <div {...domProps()} ref={local.ref} class={renderProps.class()} style={renderProps.style()} data-empty={state.value() === "" || void 0} data-disabled={ariaProps.isDisabled || void 0} data-invalid={searchFieldAria.isInvalid || void 0} data-required={ariaProps.isRequired || void 0} data-readonly={ariaProps.isReadOnly || void 0}>
381
- <Provider values={[[TextContext, textSlots]]}>
382
- {fieldChildren()}
383
- </Provider>
384
- </div>
385
- </SearchFieldContext.Provider>
386
- </FieldErrorContext.Provider>;
365
+ const labelContextValue = {
366
+ ref: labelRef,
367
+ get id() {
368
+ return searchFieldAria.labelProps.id;
369
+ },
370
+ get htmlFor() {
371
+ const labelProps = searchFieldAria.labelProps;
372
+ return attrString$1(labelProps.htmlFor ?? labelProps.for);
373
+ },
374
+ get for() {
375
+ const labelProps = searchFieldAria.labelProps;
376
+ return attrString$1(labelProps.htmlFor ?? labelProps.for);
377
+ }
378
+ };
379
+ return <FieldErrorContext value={fieldErrorContext}>
380
+ <LabelContext value={labelContextValue}>
381
+ <SearchFieldContext value={contextValue}>
382
+ <div {...domProps()} ref={local.ref} class={renderProps.class()} style={renderProps.style()} data-empty={dataAttr(state.value() === "")} data-disabled={dataAttr(ariaProps.isDisabled)} data-invalid={dataAttr(searchFieldAria.isInvalid)} data-required={dataAttr(ariaProps.isRequired)} data-readonly={dataAttr(ariaProps.isReadOnly)}>
383
+ <Provider values={[[TextContext, textSlots]]}>
384
+ {fieldChildren()}
385
+ </Provider>
386
+ </div>
387
+ </SearchFieldContext>
388
+ </LabelContext>
389
+ </FieldErrorContext>;
387
390
  }
388
391
  /**
389
392
  * The label for a search field.
@@ -395,7 +398,7 @@ function SearchFieldLabel(props) {
395
398
  const { ref: _ref, ...rest } = context.labelProps;
396
399
  return rest;
397
400
  };
398
- return <label {...cleanLabelProps()} class={props.class ?? "solidaria-SearchField-label"} style={props.style}>
401
+ return <label {...cleanLabelProps()} ref={(el) => context.labelRef?.(el)} class={props.class ?? "solidaria-SearchField-label"} style={props.style}>
399
402
  {props.children}
400
403
  </label>;
401
404
  }
@@ -446,7 +449,11 @@ function SearchFieldInput(props) {
446
449
  return {
447
450
  "aria-controls": inputProps["aria-controls"],
448
451
  "aria-autocomplete": inputProps["aria-autocomplete"],
449
- "aria-activedescendant": inputProps["aria-activedescendant"]()
452
+ "aria-activedescendant": inputProps["aria-activedescendant"](),
453
+ autoComplete: inputProps.autoComplete,
454
+ autoCorrect: inputProps.autoCorrect,
455
+ spellCheck: inputProps.spellCheck,
456
+ enterKeyHint: inputProps.enterKeyHint
450
457
  };
451
458
  };
452
459
  const mergedInputProps = () => ({
@@ -456,7 +463,7 @@ function SearchFieldInput(props) {
456
463
  ...cleanHoverProps(),
457
464
  ...autocompleteInputAttrs()
458
465
  });
459
- onMount(() => {
466
+ onSettled(() => {
460
467
  const element = inputElement;
461
468
  if (!element) return;
462
469
  const inputHandler = (event) => {
@@ -474,18 +481,18 @@ function SearchFieldInput(props) {
474
481
  element.addEventListener("input", inputHandler);
475
482
  element.addEventListener("change", changeHandler);
476
483
  clearDelegatedTextEntryHandlers(element);
477
- onCleanup(() => {
484
+ return () => {
478
485
  element.removeEventListener("input", inputHandler);
479
486
  element.removeEventListener("change", changeHandler);
480
- });
487
+ };
481
488
  });
482
489
  return <input {...mergedInputProps()} ref={(element) => {
483
490
  inputElement = element;
484
491
  context.setInputRef?.(element);
485
492
  autocompleteInput?.inputRef(element);
486
- const ref = domProps.ref;
487
- if (typeof ref === "function") ref(element);
488
- }} class={renderProps.class()} style={renderProps.style()} data-focused={isFocused() || void 0} data-focus-visible={isFocusVisible() || void 0} data-hovered={isHovered() || void 0} data-disabled={context.isDisabled || void 0} data-invalid={context.isInvalid || void 0} />;
493
+ assignRef(context.inputProps?.ref, element);
494
+ assignRef(domProps.ref, element);
495
+ }} class={renderProps.class()} style={renderProps.style()} data-focused={dataAttr(isFocused())} data-focus-visible={dataAttr(isFocusVisible())} data-hovered={dataAttr(isHovered())} data-disabled={dataAttr(context.isDisabled)} data-invalid={dataAttr(context.isInvalid)} />;
489
496
  }
490
497
  /**
491
498
  * The clear button for a search field.
@@ -536,7 +543,7 @@ function SearchFieldClearButton(props) {
536
543
  return rest;
537
544
  };
538
545
  return <Show when={!isEmpty()}>
539
- <button {...domProps} type="button" aria-label={context.clearButtonProps?.["aria-label"] ?? "Clear search"} tabIndex={context.clearButtonProps?.tabIndex ?? -1} disabled={context.clearButtonProps?.disabled} onMouseDown={context.clearButtonProps?.onMouseDown} {...cleanPressProps()} onPointerUp={clear} onMouseUp={clear} onClick={clear} {...cleanHoverProps()} class={renderProps.class()} style={renderProps.style()} data-pressed={isPressed() || void 0} data-hovered={isHovered() || void 0} data-disabled={isDisabled() || void 0}>
546
+ <button {...domProps} type="button" aria-label={context.clearButtonProps?.["aria-label"] ?? "Clear search"} tabindex={context.clearButtonProps?.tabIndex ?? -1} disabled={context.clearButtonProps?.disabled} onMouseDown={context.clearButtonProps?.onMouseDown} {...cleanPressProps()} onPointerUp={clear} onMouseUp={clear} onClick={clear} {...cleanHoverProps()} class={renderProps.class()} style={renderProps.style()} data-pressed={dataAttr(isPressed())} data-hovered={dataAttr(isHovered())} data-disabled={dataAttr(isDisabled())}>
540
547
  {renderProps.renderChildren()}
541
548
  </button>
542
549
  </Show>;