@proyecto-viviana/solidaria-components 0.3.2 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (398) hide show
  1. package/dist/ActionBar.js +184 -0
  2. package/dist/ActionBar.js.map +1 -0
  3. package/dist/ActionBar.jsx +128 -0
  4. package/dist/ActionBar.jsx.map +1 -0
  5. package/dist/ActionGroup.js +179 -0
  6. package/dist/ActionGroup.js.map +1 -0
  7. package/dist/ActionGroup.jsx +129 -0
  8. package/dist/ActionGroup.jsx.map +1 -0
  9. package/dist/Alert.js +111 -0
  10. package/dist/Alert.js.map +1 -0
  11. package/dist/Alert.jsx +82 -0
  12. package/dist/Alert.jsx.map +1 -0
  13. package/dist/Autocomplete.js +130 -0
  14. package/dist/Autocomplete.js.map +1 -0
  15. package/dist/Autocomplete.jsx +116 -0
  16. package/dist/Autocomplete.jsx.map +1 -0
  17. package/dist/Breadcrumbs.d.ts.map +1 -1
  18. package/dist/Breadcrumbs.js +334 -0
  19. package/dist/Breadcrumbs.js.map +1 -0
  20. package/dist/Breadcrumbs.jsx +266 -0
  21. package/dist/Breadcrumbs.jsx.map +1 -0
  22. package/dist/Button.d.ts.map +1 -1
  23. package/dist/Button.js +348 -0
  24. package/dist/Button.js.map +1 -0
  25. package/dist/Button.jsx +314 -0
  26. package/dist/Button.jsx.map +1 -0
  27. package/dist/Calendar.d.ts +4 -4
  28. package/dist/Calendar.d.ts.map +1 -1
  29. package/dist/Calendar.js +538 -0
  30. package/dist/Calendar.js.map +1 -0
  31. package/dist/Calendar.jsx +333 -0
  32. package/dist/Calendar.jsx.map +1 -0
  33. package/dist/CalendarPicker.d.ts +33 -0
  34. package/dist/CalendarPicker.d.ts.map +1 -0
  35. package/dist/CalendarPicker.js +44 -0
  36. package/dist/CalendarPicker.js.map +1 -0
  37. package/dist/CalendarPicker.jsx +44 -0
  38. package/dist/CalendarPicker.jsx.map +1 -0
  39. package/dist/Checkbox.d.ts +83 -4
  40. package/dist/Checkbox.d.ts.map +1 -1
  41. package/dist/Checkbox.js +923 -0
  42. package/dist/Checkbox.js.map +1 -0
  43. package/dist/Checkbox.jsx +707 -0
  44. package/dist/Checkbox.jsx.map +1 -0
  45. package/dist/Collection.d.ts.map +1 -1
  46. package/dist/Collection.js +202 -0
  47. package/dist/Collection.js.map +1 -0
  48. package/dist/Collection.jsx +152 -0
  49. package/dist/Collection.jsx.map +1 -0
  50. package/dist/Color.d.ts.map +1 -1
  51. package/dist/Color.js +1720 -0
  52. package/dist/Color.js.map +1 -0
  53. package/dist/Color.jsx +1344 -0
  54. package/dist/Color.jsx.map +1 -0
  55. package/dist/ColorEditor.js +208 -0
  56. package/dist/ColorEditor.js.map +1 -0
  57. package/dist/ColorEditor.jsx +120 -0
  58. package/dist/ColorEditor.jsx.map +1 -0
  59. package/dist/ComboBox.d.ts +4 -4
  60. package/dist/ComboBox.d.ts.map +1 -1
  61. package/dist/ComboBox.js +992 -0
  62. package/dist/ComboBox.js.map +1 -0
  63. package/dist/ComboBox.jsx +714 -0
  64. package/dist/ComboBox.jsx.map +1 -0
  65. package/dist/ContextualHelpTrigger.js +146 -0
  66. package/dist/ContextualHelpTrigger.js.map +1 -0
  67. package/dist/ContextualHelpTrigger.jsx +109 -0
  68. package/dist/ContextualHelpTrigger.jsx.map +1 -0
  69. package/dist/DateField.d.ts +3 -3
  70. package/dist/DateField.d.ts.map +1 -1
  71. package/dist/DateField.js +4 -0
  72. package/dist/DateField.jsx +4 -0
  73. package/dist/DateField2.js +499 -0
  74. package/dist/DateField2.js.map +1 -0
  75. package/dist/DateField2.jsx +317 -0
  76. package/dist/DateField2.jsx.map +1 -0
  77. package/dist/DatePicker.d.ts +4 -4
  78. package/dist/DatePicker.d.ts.map +1 -1
  79. package/dist/DatePicker.js +991 -0
  80. package/dist/DatePicker.js.map +1 -0
  81. package/dist/DatePicker.jsx +682 -0
  82. package/dist/DatePicker.jsx.map +1 -0
  83. package/dist/Dialog.d.ts.map +1 -1
  84. package/dist/Dialog.js +337 -0
  85. package/dist/Dialog.js.map +1 -0
  86. package/dist/Dialog.jsx +192 -0
  87. package/dist/Dialog.jsx.map +1 -0
  88. package/dist/Disclosure.d.ts.map +1 -1
  89. package/dist/Disclosure.js +328 -0
  90. package/dist/Disclosure.js.map +1 -0
  91. package/dist/Disclosure.jsx +230 -0
  92. package/dist/Disclosure.jsx.map +1 -0
  93. package/dist/DragAndDrop.d.ts.map +1 -1
  94. package/dist/DragAndDrop.js +176 -0
  95. package/dist/DragAndDrop.js.map +1 -0
  96. package/dist/DragAndDrop.jsx +160 -0
  97. package/dist/DragAndDrop.jsx.map +1 -0
  98. package/dist/DropZone.d.ts.map +1 -1
  99. package/dist/DropZone.js +189 -0
  100. package/dist/DropZone.js.map +1 -0
  101. package/dist/DropZone.jsx +144 -0
  102. package/dist/DropZone.jsx.map +1 -0
  103. package/dist/FieldError.js +66 -0
  104. package/dist/FieldError.js.map +1 -0
  105. package/dist/FieldError.jsx +47 -0
  106. package/dist/FieldError.jsx.map +1 -0
  107. package/dist/FileTrigger.js +79 -0
  108. package/dist/FileTrigger.js.map +1 -0
  109. package/dist/FileTrigger.jsx +49 -0
  110. package/dist/FileTrigger.jsx.map +1 -0
  111. package/dist/Focusable.js +70 -0
  112. package/dist/Focusable.js.map +1 -0
  113. package/dist/Focusable.jsx +69 -0
  114. package/dist/Focusable.jsx.map +1 -0
  115. package/dist/Form.js +99 -0
  116. package/dist/Form.js.map +1 -0
  117. package/dist/Form.jsx +73 -0
  118. package/dist/Form.jsx.map +1 -0
  119. package/dist/GridList.d.ts +34 -2
  120. package/dist/GridList.d.ts.map +1 -1
  121. package/dist/GridList.js +723 -0
  122. package/dist/GridList.js.map +1 -0
  123. package/dist/GridList.jsx +552 -0
  124. package/dist/GridList.jsx.map +1 -0
  125. package/dist/HiddenTimeInput.js +104 -0
  126. package/dist/HiddenTimeInput.js.map +1 -0
  127. package/dist/HiddenTimeInput.jsx +69 -0
  128. package/dist/HiddenTimeInput.jsx.map +1 -0
  129. package/dist/Icon.d.ts.map +1 -1
  130. package/dist/Icon.js +127 -0
  131. package/dist/Icon.js.map +1 -0
  132. package/dist/Icon.jsx +72 -0
  133. package/dist/Icon.jsx.map +1 -0
  134. package/dist/Keyboard.js +30 -0
  135. package/dist/Keyboard.js.map +1 -0
  136. package/dist/Keyboard.jsx +24 -0
  137. package/dist/Keyboard.jsx.map +1 -0
  138. package/dist/Landmark.js +134 -0
  139. package/dist/Landmark.js.map +1 -0
  140. package/dist/Landmark.jsx +118 -0
  141. package/dist/Landmark.jsx.map +1 -0
  142. package/dist/Link.d.ts.map +1 -1
  143. package/dist/Link.js +219 -0
  144. package/dist/Link.js.map +1 -0
  145. package/dist/Link.jsx +189 -0
  146. package/dist/Link.jsx.map +1 -0
  147. package/dist/ListBox.d.ts.map +1 -1
  148. package/dist/ListBox.js +670 -0
  149. package/dist/ListBox.js.map +1 -0
  150. package/dist/ListBox.jsx +508 -0
  151. package/dist/ListBox.jsx.map +1 -0
  152. package/dist/Menu.d.ts +27 -9
  153. package/dist/Menu.d.ts.map +1 -1
  154. package/dist/Menu.js +1254 -0
  155. package/dist/Menu.js.map +1 -0
  156. package/dist/Menu.jsx +1042 -0
  157. package/dist/Menu.jsx.map +1 -0
  158. package/dist/Meter.d.ts.map +1 -1
  159. package/dist/Meter.js +123 -0
  160. package/dist/Meter.js.map +1 -0
  161. package/dist/Meter.jsx +107 -0
  162. package/dist/Meter.jsx.map +1 -0
  163. package/dist/Modal.d.ts.map +1 -1
  164. package/dist/Modal.js +380 -0
  165. package/dist/Modal.js.map +1 -0
  166. package/dist/Modal.jsx +314 -0
  167. package/dist/Modal.jsx.map +1 -0
  168. package/dist/NumberField.d.ts +3 -3
  169. package/dist/NumberField.d.ts.map +1 -1
  170. package/dist/NumberField.js +573 -0
  171. package/dist/NumberField.js.map +1 -0
  172. package/dist/NumberField.jsx +443 -0
  173. package/dist/NumberField.jsx.map +1 -0
  174. package/dist/Popover.d.ts +10 -2
  175. package/dist/Popover.d.ts.map +1 -1
  176. package/dist/Popover.js +464 -0
  177. package/dist/Popover.js.map +1 -0
  178. package/dist/Popover.jsx +333 -0
  179. package/dist/Popover.jsx.map +1 -0
  180. package/dist/Pressable.js +69 -0
  181. package/dist/Pressable.js.map +1 -0
  182. package/dist/Pressable.jsx +68 -0
  183. package/dist/Pressable.jsx.map +1 -0
  184. package/dist/ProgressBar.d.ts.map +1 -1
  185. package/dist/ProgressBar.js +130 -0
  186. package/dist/ProgressBar.js.map +1 -0
  187. package/dist/ProgressBar.jsx +114 -0
  188. package/dist/ProgressBar.jsx.map +1 -0
  189. package/dist/RadioGroup.d.ts +82 -4
  190. package/dist/RadioGroup.d.ts.map +1 -1
  191. package/dist/RadioGroup.js +931 -0
  192. package/dist/RadioGroup.js.map +1 -0
  193. package/dist/RadioGroup.jsx +681 -0
  194. package/dist/RadioGroup.jsx.map +1 -0
  195. package/dist/RangeCalendar.d.ts.map +1 -1
  196. package/dist/RangeCalendar.js +410 -0
  197. package/dist/RangeCalendar.js.map +1 -0
  198. package/dist/RangeCalendar.jsx +253 -0
  199. package/dist/RangeCalendar.jsx.map +1 -0
  200. package/dist/RouterProvider.js +118 -0
  201. package/dist/RouterProvider.js.map +1 -0
  202. package/dist/RouterProvider.jsx +112 -0
  203. package/dist/RouterProvider.jsx.map +1 -0
  204. package/dist/SearchField.d.ts +2 -2
  205. package/dist/SearchField.d.ts.map +1 -1
  206. package/dist/SearchField.js +643 -0
  207. package/dist/SearchField.js.map +1 -0
  208. package/dist/SearchField.jsx +526 -0
  209. package/dist/SearchField.jsx.map +1 -0
  210. package/dist/Select.d.ts.map +1 -1
  211. package/dist/Select.js +1031 -0
  212. package/dist/Select.js.map +1 -0
  213. package/dist/Select.jsx +744 -0
  214. package/dist/Select.jsx.map +1 -0
  215. package/dist/SelectionIndicator.d.ts.map +1 -1
  216. package/dist/SelectionIndicator.js +86 -0
  217. package/dist/SelectionIndicator.js.map +1 -0
  218. package/dist/SelectionIndicator.jsx +50 -0
  219. package/dist/SelectionIndicator.jsx.map +1 -0
  220. package/dist/Separator.js +97 -0
  221. package/dist/Separator.js.map +1 -0
  222. package/dist/Separator.jsx +85 -0
  223. package/dist/Separator.jsx.map +1 -0
  224. package/dist/SharedElementTransition.d.ts.map +1 -1
  225. package/dist/SharedElementTransition.js +165 -0
  226. package/dist/SharedElementTransition.js.map +1 -0
  227. package/dist/SharedElementTransition.jsx +138 -0
  228. package/dist/SharedElementTransition.jsx.map +1 -0
  229. package/dist/Slider.d.ts +33 -1
  230. package/dist/Slider.d.ts.map +1 -1
  231. package/dist/Slider.js +515 -0
  232. package/dist/Slider.js.map +1 -0
  233. package/dist/Slider.jsx +403 -0
  234. package/dist/Slider.jsx.map +1 -0
  235. package/dist/StepList.js +198 -0
  236. package/dist/StepList.js.map +1 -0
  237. package/dist/StepList.jsx +141 -0
  238. package/dist/StepList.jsx.map +1 -0
  239. package/dist/Switch.d.ts +65 -2
  240. package/dist/Switch.d.ts.map +1 -1
  241. package/dist/Switch.js +534 -0
  242. package/dist/Switch.js.map +1 -0
  243. package/dist/Switch.jsx +393 -0
  244. package/dist/Switch.jsx.map +1 -0
  245. package/dist/Table.d.ts +48 -0
  246. package/dist/Table.d.ts.map +1 -1
  247. package/dist/Table.js +1759 -0
  248. package/dist/Table.js.map +1 -0
  249. package/dist/Table.jsx +1348 -0
  250. package/dist/Table.jsx.map +1 -0
  251. package/dist/Tabs.d.ts +0 -4
  252. package/dist/Tabs.d.ts.map +1 -1
  253. package/dist/Tabs.js +595 -0
  254. package/dist/Tabs.js.map +1 -0
  255. package/dist/Tabs.jsx +367 -0
  256. package/dist/Tabs.jsx.map +1 -0
  257. package/dist/TagGroup.d.ts.map +1 -1
  258. package/dist/TagGroup.js +378 -0
  259. package/dist/TagGroup.js.map +1 -0
  260. package/dist/TagGroup.jsx +270 -0
  261. package/dist/TagGroup.jsx.map +1 -0
  262. package/dist/Text.d.ts +18 -6
  263. package/dist/Text.d.ts.map +1 -1
  264. package/dist/Text.js +42 -0
  265. package/dist/Text.js.map +1 -0
  266. package/dist/Text.jsx +35 -0
  267. package/dist/Text.jsx.map +1 -0
  268. package/dist/TextField.d.ts +6 -6
  269. package/dist/TextField.d.ts.map +1 -1
  270. package/dist/TextField.js +436 -0
  271. package/dist/TextField.js.map +1 -0
  272. package/dist/TextField.jsx +403 -0
  273. package/dist/TextField.jsx.map +1 -0
  274. package/dist/TimeField.d.ts +3 -3
  275. package/dist/TimeField.d.ts.map +1 -1
  276. package/dist/TimeField.js +372 -0
  277. package/dist/TimeField.js.map +1 -0
  278. package/dist/TimeField.jsx +224 -0
  279. package/dist/TimeField.jsx.map +1 -0
  280. package/dist/Toast.d.ts +14 -0
  281. package/dist/Toast.d.ts.map +1 -1
  282. package/dist/Toast.js +551 -0
  283. package/dist/Toast.js.map +1 -0
  284. package/dist/Toast.jsx +361 -0
  285. package/dist/Toast.jsx.map +1 -0
  286. package/dist/ToggleButton.d.ts.map +1 -1
  287. package/dist/ToggleButton.js +123 -0
  288. package/dist/ToggleButton.js.map +1 -0
  289. package/dist/ToggleButton.jsx +88 -0
  290. package/dist/ToggleButton.jsx.map +1 -0
  291. package/dist/ToggleButtonGroup.d.ts.map +1 -1
  292. package/dist/ToggleButtonGroup.js +114 -0
  293. package/dist/ToggleButtonGroup.js.map +1 -0
  294. package/dist/ToggleButtonGroup.jsx +85 -0
  295. package/dist/ToggleButtonGroup.jsx.map +1 -0
  296. package/dist/Toolbar.js +112 -0
  297. package/dist/Toolbar.js.map +1 -0
  298. package/dist/Toolbar.jsx +92 -0
  299. package/dist/Toolbar.jsx.map +1 -0
  300. package/dist/Tooltip.d.ts.map +1 -1
  301. package/dist/Tooltip.js +539 -0
  302. package/dist/Tooltip.js.map +1 -0
  303. package/dist/Tooltip.jsx +465 -0
  304. package/dist/Tooltip.jsx.map +1 -0
  305. package/dist/Tree.d.ts +14 -2
  306. package/dist/Tree.d.ts.map +1 -1
  307. package/dist/Tree.js +1424 -0
  308. package/dist/Tree.js.map +1 -0
  309. package/dist/Tree.jsx +1172 -0
  310. package/dist/Tree.jsx.map +1 -0
  311. package/dist/Virtualizer.d.ts +16 -2
  312. package/dist/Virtualizer.d.ts.map +1 -1
  313. package/dist/Virtualizer.js +2 -0
  314. package/dist/Virtualizer.jsx +2 -0
  315. package/dist/Virtualizer2.js +751 -0
  316. package/dist/Virtualizer2.js.map +1 -0
  317. package/dist/Virtualizer2.jsx +730 -0
  318. package/dist/Virtualizer2.jsx.map +1 -0
  319. package/dist/VirtualizerLayouts.d.ts +18 -0
  320. package/dist/VirtualizerLayouts.d.ts.map +1 -1
  321. package/dist/VisuallyHidden.js +42 -0
  322. package/dist/VisuallyHidden.js.map +1 -0
  323. package/dist/VisuallyHidden.jsx +35 -0
  324. package/dist/VisuallyHidden.jsx.map +1 -0
  325. package/dist/contexts.js +33 -0
  326. package/dist/contexts.js.map +1 -0
  327. package/dist/contexts.jsx +33 -0
  328. package/dist/contexts.jsx.map +1 -0
  329. package/dist/index.d.ts +7 -6
  330. package/dist/index.d.ts.map +1 -1
  331. package/dist/index.js +70 -23932
  332. package/dist/index.jsx +70 -18337
  333. package/dist/useDragAndDrop.js +2 -0
  334. package/dist/useDragAndDrop.jsx +2 -0
  335. package/dist/useDragAndDrop2.js +395 -0
  336. package/dist/useDragAndDrop2.js.map +1 -0
  337. package/dist/useDragAndDrop2.jsx +395 -0
  338. package/dist/useDragAndDrop2.jsx.map +1 -0
  339. package/dist/utils.d.ts +83 -11
  340. package/dist/utils.d.ts.map +1 -1
  341. package/dist/utils.js +285 -0
  342. package/dist/utils.js.map +1 -0
  343. package/dist/utils.jsx +277 -0
  344. package/dist/utils.jsx.map +1 -0
  345. package/dist/virtualizer/Layout.js +144 -0
  346. package/dist/virtualizer/Layout.js.map +1 -0
  347. package/dist/virtualizer/Layout.jsx +144 -0
  348. package/dist/virtualizer/Layout.jsx.map +1 -0
  349. package/package.json +401 -4
  350. package/src/Breadcrumbs.tsx +3 -1
  351. package/src/Button.tsx +22 -2
  352. package/src/Calendar.tsx +27 -10
  353. package/src/CalendarPicker.tsx +73 -0
  354. package/src/Checkbox.tsx +539 -3
  355. package/src/Collection.tsx +9 -3
  356. package/src/Color.tsx +42 -14
  357. package/src/ComboBox.tsx +50 -6
  358. package/src/DateField.tsx +20 -2
  359. package/src/DatePicker.tsx +57 -5
  360. package/src/Dialog.tsx +13 -5
  361. package/src/Disclosure.tsx +3 -1
  362. package/src/DragAndDrop.tsx +3 -1
  363. package/src/DropZone.tsx +3 -1
  364. package/src/GridList.tsx +125 -24
  365. package/src/Icon.tsx +3 -1
  366. package/src/Link.tsx +3 -1
  367. package/src/ListBox.tsx +31 -4
  368. package/src/Menu.tsx +252 -128
  369. package/src/Meter.tsx +3 -1
  370. package/src/Modal.tsx +100 -52
  371. package/src/NumberField.tsx +51 -8
  372. package/src/Popover.tsx +40 -10
  373. package/src/ProgressBar.tsx +3 -1
  374. package/src/RadioGroup.tsx +468 -4
  375. package/src/RangeCalendar.tsx +3 -1
  376. package/src/SearchField.tsx +27 -3
  377. package/src/Select.tsx +22 -7
  378. package/src/SelectionIndicator.tsx +3 -1
  379. package/src/SharedElementTransition.tsx +3 -1
  380. package/src/Slider.tsx +159 -13
  381. package/src/Switch.tsx +395 -2
  382. package/src/Table.tsx +409 -95
  383. package/src/Tabs.tsx +16 -45
  384. package/src/TagGroup.tsx +3 -1
  385. package/src/Text.tsx +31 -10
  386. package/src/TextField.tsx +43 -5
  387. package/src/TimeField.tsx +20 -2
  388. package/src/Toast.tsx +79 -14
  389. package/src/ToggleButton.tsx +3 -1
  390. package/src/ToggleButtonGroup.tsx +3 -1
  391. package/src/Tooltip.tsx +3 -1
  392. package/src/Tree.tsx +77 -9
  393. package/src/Virtualizer.tsx +180 -31
  394. package/src/VirtualizerLayouts.ts +45 -10
  395. package/src/index.ts +50 -0
  396. package/src/utils.tsx +243 -27
  397. package/dist/index.js.map +0 -1
  398. package/dist/index.jsx.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Color.js","names":["JSX","createContext","createEffect","createMemo","createSignal","onCleanup","splitProps","untrack","useContext","Show","createColorSlider","createColorArea","createColorWheel","createColorField","createColorSwatch","createListBox","createOption","createFocusRing","createHover","mergeProps","AriaColorSliderOptions","AriaColorAreaOptions","AriaColorWheelOptions","AriaColorFieldOptions","createListState","createColorSliderState","createColorAreaState","createColorWheelState","createColorFieldState","normalizeColor","Color","ColorChannel","ColorFormat","ColorSpace","ColorSliderState","ColorAreaState","ColorWheelState","ColorFieldState","ListState","Key","RenderChildren","ClassNameOrFunction","StyleOrFunction","SlotProps","useRenderProps","filterDOMProps","ColorPickerChannelContextValue","value","onChange","color","ColorPickerStateContextValue","setColor","ColorSwatchPickerItemData","key","textValue","isDisabled","ColorSwatchPickerContextValue","state","registerItem","item","unregisterItem","ColorPickerContextInternal","ColorPickerStateContextInternal","ColorSwatchContextInternal","ColorSwatchPickerContextInternal","ColorSliderRenderProps","isDragging","channel","orientation","valueLabel","defaultStyle","CSSProperties","ColorSliderProps","Omit","defaultValue","onChangeEnd","colorSpace","label","Element","children","class","style","ColorSliderTrackRenderProps","ColorSliderTrackProps","ColorSliderLabelProps","ColorSliderOutputProps","renderProps","ColorSliderThumbRenderProps","isFocused","isFocusVisible","isHovered","ColorSliderThumbProps","ref","element","HTMLDivElement","ColorSliderContextValue","trackProps","HTMLAttributes","thumbProps","inputProps","InputHTMLAttributes","HTMLInputElement","outputProps","HTMLOutputElement","labelProps","LabelHTMLAttributes","HTMLLabelElement","trackRef","setTrackRef","el","setInputRef","ColorSliderContext","ColorSlider","props","pickerContext","local","stateProps","ariaProps","rest","inputRef","colorSliderAria","id","name","form","channelName","renderValues","getThumbValue","getThumbValueLabel","defaultClassName","domProps","Record","global","_$createComponent","Provider","_el$","_$getNextElement","_tmpl$","_$spread","_$mergeProps","data-disabled","undefined","data-dragging","data-orientation","slot","_$insert","renderChildren","_$runHydrationEvents","ColorSliderLabel","context","Error","_ref","_el$2","_tmpl$2","ColorSliderOutput","_el$3","_tmpl$3","ColorSliderTrack","cleanTrackProps","_trackStyle","mergedStyle","trackStyle","renderStyle","_el$4","_ref$","_$use","ColorSliderThumb","focusProps","hoverProps","getDisplayColor","cleanThumbProps","_thumbStyle","cleanFocusProps","cleanHoverProps","mergedInputProps","thumbStyle","_el$5","_tmpl$4","_el$6","firstChild","_el$7","nextSibling","_el$8","_co$","_$getNextMarker","_ref$2","data-focused","data-focus-visible","data-hovered","_ref$3","Track","Thumb","Label","Output","ColorAreaRenderProps","xChannel","yChannel","ColorAreaProps","ColorAreaGradientRenderProps","ColorAreaGradientProps","ColorAreaThumbRenderProps","ColorAreaThumbProps","ColorAreaContextValue","colorAreaProps","gradientProps","xInputProps","yInputProps","areaRef","setAreaRef","ColorAreaContext","ColorArea","colorAreaAria","xName","yName","childRenderValues","colorAreaChildren","cleanColorAreaProps","_areaStyle","areaStyle","_el$9","ColorAreaGradient","cleanGradientProps","_gradStyle","gradStyle","_el$0","ColorAreaThumb","xInputRef","yInputRef","mergedXInputProps","_value","mergedYInputProps","syncInputValue","input","nextValue","String","update","queueMicrotask","getXValue","getYValue","_el$1","_tmpl$5","_el$10","_el$11","_el$12","_el$13","_co$2","_ref$4","Gradient","ColorWheelRenderProps","hue","ColorWheelProps","ColorWheelTrackRenderProps","ColorWheelTrackProps","ColorWheelThumbRenderProps","ColorWheelThumbProps","ColorWheelContextValue","wheelRef","setWheelRef","ColorWheelContext","ColorWheel","colorWheelAria","outerRadius","innerRadius","getHue","position","_el$14","ColorWheelTrack","_el$15","ColorWheelThumb","_el$16","_el$17","_el$18","_el$19","_co$3","_ref$5","ColorFieldRenderProps","isReadOnly","isRequired","isInvalid","ColorFieldProps","colorFormat","description","errorMessage","ColorFieldInputRenderProps","ColorFieldInputProps","ColorFieldContextValue","descriptionProps","HTMLElement","errorMessageProps","setLabelElement","isPresent","ColorFieldContext","ColorField","hasRegisteredLabelElement","setHasRegisteredLabelElement","colorFieldAria","isWheelDisabled","validationBehavior","autoFocus","excludeFromTabOrder","placeholder","describedBy","invalid","ids","filter","Boolean","join","fieldInputProps","labelledBy","hiddenInputValue","Number","isNaN","numberValue","hasRenderedChildren","renderedChildren","_el$20","_tmpl$6","_el$22","_el$23","_co$4","_el$24","_el$25","_co$5","data-readonly","data-invalid","data-required","data-channel","when","_el$21","_$memo","_el$26","_tmpl$7","_$effect","_p$","_v$","_v$2","e","_$setAttribute","t","_$setProperty","ColorFieldInput","inputValue","cleanInputProps","_inputStyle","_el$27","_tmpl$8","Input","ColorSwatchRenderProps","colorValue","ColorSwatchProps","colorName","ColorSwatch","swatchContext","resolvedColor","swatchAria","toString","cleanSwatchProps","_swatchStyle","swatchProps","swatchStyle","_el$28","ColorSliderStateContext","ColorAreaStateContext","ColorWheelStateContext","ColorWheelTrackContext","ColorFieldStateContext","ColorSwatchContext","ColorPickerContext","ColorPickerStateContext","ColorSwatchPickerContext","ColorThumb","ColorPickerRenderProps","ColorPickerProps","ColorSwatchPickerRenderProps","selectedColor","layout","ColorSwatchPickerProps","ColorSwatchPickerItemRenderProps","isSelected","isPressed","ColorSwatchPickerItemProps","ColorPicker","internalColor","setInternalColor","nextColor","_el$29","_v$3","_v$4","_$className","_$style","ColorSwatchPicker","itemMap","setItemMap","Map","itemOrder","setItemOrder","selectedKey","isControlled","prev","next","set","includes","has","delete","itemKey","items","map","get","getKey","getTextValue","getDisabled","selectionMode","disallowEmptySelection","selectedKeys","onSelectionChange","keys","values","listBoxAria","shouldFocusWrap","resolveDirection","document","rootDir","dir","findNextEnabledKey","from","direction","collection","getAdjacent","getKeyAfter","getKeyBefore","getBoundary","getFirstKey","getLastKey","getBoundaryEnabledKey","getOptionElementForKey","listbox","keyString","optionElement","querySelectorAll","findGridKey","nextKey","current","shouldSkip","prevRect","DOMRect","itemRect","candidate","previousRect","getBoundingClientRect","isSameRow","y","x","getGridKeyBelow","getGridKeyAbove","getGridKeyRightOf","getGridKeyLeftOf","handleGridKeyDown","KeyboardEvent","currentTarget","focusedKey","initialKey","setFocusedKey","replaceSelection","preventDefault","stopPropagation","getListBoxKeyDown","listBoxProps","onKeyDown","EventHandler","onColorSwatchPickerKeyDown","within","cleanListBoxProps","_onKeyDown","restListBoxProps","restFocusProps","_el$30","data-layout","ColorSwatchPickerItem","locale","globalThis","navigator","language","getColorName","optionAria","cleanOptionProps","restOptionProps","optionProps","_el$31"],"sources":["../src/Color.tsx"],"sourcesContent":["/**\n * Color components for solidaria-components\n *\n * Pre-wired headless color picker components that combine state + aria hooks.\n * Port of react-aria-components color components.\n */\n\nimport {\n type JSX,\n createContext,\n createEffect,\n createMemo,\n createSignal,\n onCleanup,\n splitProps,\n untrack,\n useContext,\n Show,\n} from \"solid-js\";\nimport {\n createColorSlider,\n createColorArea,\n createColorWheel,\n createColorField,\n createColorSwatch,\n createListBox,\n createOption,\n createFocusRing,\n createHover,\n mergeProps,\n type AriaColorSliderOptions,\n type AriaColorAreaOptions,\n type AriaColorWheelOptions,\n type AriaColorFieldOptions,\n} from \"@proyecto-viviana/solidaria\";\nimport {\n createListState,\n createColorSliderState,\n createColorAreaState,\n createColorWheelState,\n createColorFieldState,\n normalizeColor,\n type Color,\n type ColorChannel,\n type ColorFormat,\n type ColorSpace,\n type ColorSliderState,\n type ColorAreaState,\n type ColorWheelState,\n type ColorFieldState,\n type ListState,\n type Key,\n} from \"@proyecto-viviana/solid-stately\";\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n filterDOMProps,\n} from \"./utils\";\n\ninterface ColorPickerChannelContextValue {\n value?: Color | string;\n onChange?: (color: Color) => void;\n}\n\ninterface ColorPickerStateContextValue {\n color: () => Color;\n setColor: (color: Color) => void;\n}\n\ninterface ColorSwatchPickerItemData {\n key: string;\n color: Color;\n textValue: string;\n isDisabled?: boolean;\n}\n\ninterface ColorSwatchPickerContextValue {\n state: ListState<ColorSwatchPickerItemData>;\n registerItem: (item: ColorSwatchPickerItemData) => void;\n unregisterItem: (key: string) => void;\n}\n\nconst ColorPickerContextInternal = createContext<ColorPickerChannelContextValue | null>(null);\nconst ColorPickerStateContextInternal = createContext<ColorPickerStateContextValue | null>(null);\nconst ColorSwatchContextInternal = createContext<{ color?: Color | string } | null>(null);\nconst ColorSwatchPickerContextInternal = createContext<ColorSwatchPickerContextValue | null>(null);\n\nexport interface ColorSliderRenderProps {\n /** Whether the slider is disabled. */\n isDisabled: boolean;\n /** Whether the slider is being dragged. */\n isDragging: boolean;\n /** The color channel being controlled. */\n channel: ColorChannel;\n /** The slider orientation. */\n orientation: \"horizontal\" | \"vertical\";\n /** The current value. */\n value: number;\n /** The formatted current value. */\n valueLabel: string;\n /** The current color. */\n color: Color;\n /** The default inline styles applied by the color slider hook. */\n defaultStyle: JSX.CSSProperties;\n}\n\nexport interface ColorSliderProps extends Omit<AriaColorSliderOptions, \"channel\">, SlotProps {\n /** The current color value (controlled). */\n value?: Color | string;\n /** The default color value (uncontrolled). */\n defaultValue?: Color | string;\n /** Handler called when the color changes. */\n onChange?: (color: Color) => void;\n /** Handler called when dragging ends. */\n onChangeEnd?: (color: Color) => void;\n /** Color space used for channel values. */\n colorSpace?: ColorSpace;\n /** The color channel to control. */\n channel: ColorChannel;\n /** A visible label for the slider. */\n label?: JSX.Element;\n /** The children of the component. */\n children?: RenderChildren<ColorSliderRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<ColorSliderRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<ColorSliderRenderProps>;\n}\n\nexport interface ColorSliderTrackRenderProps {\n /** Whether the slider is disabled. */\n isDisabled: boolean;\n /** Whether the slider is being dragged. */\n isDragging: boolean;\n /** The slider orientation. */\n orientation: \"horizontal\" | \"vertical\";\n /** The default inline styles applied by the color slider hook. */\n defaultStyle: JSX.CSSProperties;\n}\n\nexport interface ColorSliderTrackProps extends SlotProps {\n /** The children of the track. */\n children?: RenderChildren<ColorSliderTrackRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<ColorSliderTrackRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<ColorSliderTrackRenderProps>;\n}\n\nexport interface ColorSliderLabelProps extends SlotProps {\n /** The label contents. */\n children?: JSX.Element;\n /** The CSS className for the element. */\n class?: string;\n /** The inline style for the element. */\n style?: JSX.CSSProperties;\n}\n\nexport interface ColorSliderOutputProps extends SlotProps {\n /** The output contents. Defaults to the formatted slider value. */\n children?: JSX.Element | ((renderProps: ColorSliderRenderProps) => JSX.Element);\n /** The CSS className for the element. */\n class?: string;\n /** The inline style for the element. */\n style?: JSX.CSSProperties;\n}\n\nexport interface ColorSliderThumbRenderProps {\n /** Whether the slider is disabled. */\n isDisabled: boolean;\n /** Whether the thumb is being dragged. */\n isDragging: boolean;\n /** Whether the thumb is focused. */\n isFocused: boolean;\n /** Whether the thumb has keyboard focus. */\n isFocusVisible: boolean;\n /** Whether the thumb is hovered. */\n isHovered: boolean;\n /** The current display color. */\n color: Color;\n /** The default inline styles applied by the color slider hook. */\n defaultStyle: JSX.CSSProperties;\n}\n\nexport interface ColorSliderThumbProps extends SlotProps {\n /** The children of the thumb. */\n children?: RenderChildren<ColorSliderThumbRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<ColorSliderThumbRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<ColorSliderThumbRenderProps>;\n /** Ref callback for the thumb element. */\n ref?: (element: HTMLDivElement) => void;\n}\n\ninterface ColorSliderContextValue {\n state: ColorSliderState;\n trackProps: JSX.HTMLAttributes<HTMLDivElement>;\n thumbProps: JSX.HTMLAttributes<HTMLDivElement>;\n inputProps: JSX.InputHTMLAttributes<HTMLInputElement>;\n outputProps: JSX.HTMLAttributes<HTMLOutputElement>;\n labelProps: JSX.LabelHTMLAttributes<HTMLLabelElement>;\n trackRef: HTMLDivElement | undefined;\n setTrackRef: (el: HTMLDivElement) => void;\n setInputRef: (el: HTMLInputElement) => void;\n}\n\nexport const ColorSliderContext = createContext<ColorSliderContextValue | null>(null);\n\n/**\n * A color slider allows users to adjust a single color channel.\n */\nexport function ColorSlider(props: ColorSliderProps): JSX.Element {\n const pickerContext = useContext(ColorPickerContextInternal);\n const [local, stateProps, ariaProps, rest] = splitProps(\n props,\n [\"children\", \"class\", \"style\", \"slot\", \"label\"],\n [\"value\", \"defaultValue\", \"onChange\", \"onChangeEnd\", \"channel\", \"colorSpace\"],\n [\n \"id\",\n \"aria-label\",\n \"aria-labelledby\",\n \"aria-describedby\",\n \"aria-details\",\n \"isDisabled\",\n \"name\",\n \"form\",\n \"orientation\",\n \"channelName\",\n ],\n );\n\n // Create color slider state\n const state = createColorSliderState(() => ({\n value: stateProps.value ?? pickerContext?.value,\n defaultValue: stateProps.defaultValue,\n onChange: stateProps.onChange ?? pickerContext?.onChange,\n onChangeEnd: stateProps.onChangeEnd,\n channel: stateProps.channel,\n colorSpace: stateProps.colorSpace,\n orientation: ariaProps.orientation,\n isDisabled: ariaProps.isDisabled,\n }));\n\n let trackRef: HTMLDivElement | undefined;\n const setTrackRef = (el: HTMLDivElement) => {\n trackRef = el;\n };\n let inputRef: HTMLInputElement | undefined;\n const setInputRef = (el: HTMLInputElement) => {\n inputRef = el;\n };\n\n // Create color slider aria props\n const colorSliderAria = createColorSlider(\n () => ({\n id: ariaProps.id,\n channel: stateProps.channel,\n label: local.label,\n \"aria-label\": ariaProps[\"aria-label\"],\n \"aria-labelledby\": ariaProps[\"aria-labelledby\"],\n \"aria-describedby\": ariaProps[\"aria-describedby\"],\n \"aria-details\": ariaProps[\"aria-details\"],\n isDisabled: ariaProps.isDisabled,\n name: ariaProps.name,\n form: ariaProps.form,\n orientation: ariaProps.orientation,\n channelName: ariaProps.channelName,\n }),\n () => state,\n () => trackRef ?? null,\n () => inputRef ?? null,\n );\n\n const renderValues = createMemo<ColorSliderRenderProps>(() => ({\n isDisabled: state.isDisabled,\n isDragging: state.isDragging,\n channel: state.channel,\n orientation: state.orientation,\n value: state.getThumbValue(),\n valueLabel: state.getThumbValueLabel(),\n color: state.value,\n defaultStyle: (colorSliderAria.trackProps as { style?: JSX.CSSProperties }).style ?? {},\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-ColorSlider\",\n },\n renderValues,\n );\n\n const domProps = createMemo(() =>\n filterDOMProps(rest as Record<string, unknown>, { global: true }),\n );\n\n return (\n <ColorSliderContext.Provider\n value={{\n state,\n get trackProps() {\n return colorSliderAria.trackProps;\n },\n get thumbProps() {\n return colorSliderAria.thumbProps;\n },\n get inputProps() {\n return colorSliderAria.inputProps;\n },\n get outputProps() {\n return colorSliderAria.outputProps;\n },\n get labelProps() {\n return colorSliderAria.labelProps;\n },\n get trackRef() {\n return trackRef;\n },\n setTrackRef,\n setInputRef,\n }}\n >\n <div\n {...domProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-disabled={state.isDisabled || undefined}\n data-dragging={state.isDragging || undefined}\n data-orientation={state.orientation}\n slot={local.slot || undefined}\n >\n {renderProps.renderChildren()}\n </div>\n </ColorSliderContext.Provider>\n );\n}\n\n/**\n * The label element of a color slider.\n */\nexport function ColorSliderLabel(props: ColorSliderLabelProps): JSX.Element {\n const [local, domProps] = splitProps(props, [\"class\", \"slot\", \"children\"]);\n\n const context = useContext(ColorSliderContext);\n if (!context) {\n throw new Error(\"ColorSliderLabel must be used within a ColorSlider\");\n }\n\n const labelProps = () => {\n const { ref: _ref, ...rest } = context.labelProps as Record<string, unknown>;\n return rest;\n };\n\n return (\n <label {...domProps} {...labelProps()} class={local.class}>\n {local.children}\n </label>\n );\n}\n\n/**\n * The output element of a color slider.\n */\nexport function ColorSliderOutput(props: ColorSliderOutputProps): JSX.Element {\n const [local, domProps] = splitProps(props, [\"class\", \"slot\", \"children\"]);\n\n const context = useContext(ColorSliderContext);\n if (!context) {\n throw new Error(\"ColorSliderOutput must be used within a ColorSlider\");\n }\n\n const state = context.state;\n\n const renderValues = createMemo<ColorSliderRenderProps>(() => ({\n isDisabled: state.isDisabled,\n isDragging: state.isDragging,\n channel: state.channel,\n orientation: state.orientation,\n value: state.getThumbValue(),\n valueLabel: state.getThumbValueLabel(),\n color: state.value,\n defaultStyle: (context.trackProps as { style?: JSX.CSSProperties }).style ?? {},\n }));\n\n const children = () =>\n typeof local.children === \"function\"\n ? local.children(renderValues())\n : (local.children ?? renderValues().valueLabel);\n\n return (\n <output {...domProps} {...context.outputProps} class={local.class}>\n {children()}\n </output>\n );\n}\n\n/**\n * The track element of a color slider.\n */\nexport function ColorSliderTrack(props: ColorSliderTrackProps): JSX.Element {\n const [local, domProps] = splitProps(props, [\"class\", \"style\", \"slot\", \"children\"]);\n\n const context = useContext(ColorSliderContext);\n if (!context) {\n throw new Error(\"ColorSliderTrack must be used within a ColorSlider\");\n }\n\n const state = context.state;\n\n const renderValues = createMemo<ColorSliderTrackRenderProps>(() => ({\n isDisabled: state.isDisabled,\n isDragging: state.isDragging,\n orientation: state.orientation,\n defaultStyle: (context.trackProps as { style?: JSX.CSSProperties }).style ?? {},\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-ColorSlider-track\",\n },\n renderValues,\n );\n\n const cleanTrackProps = () => {\n const {\n ref: _ref,\n style: _trackStyle,\n ...rest\n } = context.trackProps as Record<string, unknown>;\n return rest;\n };\n\n const mergedStyle = () => {\n const trackStyle = (context.trackProps as { style?: Record<string, string> }).style || {};\n const renderStyle = renderProps.style() || {};\n return { ...trackStyle, ...renderStyle };\n };\n\n return (\n <div\n {...domProps}\n ref={context.setTrackRef}\n {...cleanTrackProps()}\n class={renderProps.class()}\n style={mergedStyle()}\n data-disabled={state.isDisabled || undefined}\n data-dragging={state.isDragging || undefined}\n data-orientation={state.orientation}\n >\n {renderProps.renderChildren()}\n </div>\n );\n}\n\n/**\n * The thumb element of a color slider.\n */\nexport function ColorSliderThumb(props: ColorSliderThumbProps): JSX.Element {\n const [local, domProps] = splitProps(props, [\"class\", \"style\", \"slot\", \"children\", \"ref\"]);\n\n const context = useContext(ColorSliderContext);\n if (!context) {\n throw new Error(\"ColorSliderThumb must be used within a ColorSlider\");\n }\n\n const state = context.state;\n\n const { isFocused, isFocusVisible, focusProps } = createFocusRing();\n\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return state.isDisabled;\n },\n });\n\n const renderValues = createMemo<ColorSliderThumbRenderProps>(() => ({\n isDisabled: state.isDisabled,\n isDragging: state.isDragging,\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible(),\n isHovered: isHovered(),\n color: state.getDisplayColor(),\n defaultStyle: (context.thumbProps as { style?: JSX.CSSProperties }).style ?? {},\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-ColorSlider-thumb\",\n },\n renderValues,\n );\n\n const cleanThumbProps = () => {\n const {\n ref: _ref,\n style: _thumbStyle,\n ...rest\n } = context.thumbProps 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 const mergedInputProps = () => {\n return mergeProps(\n context.inputProps as Record<string, unknown>,\n cleanFocusProps(),\n ) as JSX.InputHTMLAttributes<HTMLInputElement>;\n };\n\n const mergedStyle = () => {\n const thumbStyle = (context.thumbProps as { style?: Record<string, string> }).style || {};\n const renderStyle = renderProps.style() || {};\n return { ...thumbStyle, ...renderStyle };\n };\n\n return (\n <div\n {...domProps}\n {...cleanThumbProps()}\n {...cleanHoverProps()}\n ref={local.ref}\n class={renderProps.class()}\n style={mergedStyle()}\n data-disabled={state.isDisabled || undefined}\n data-dragging={state.isDragging || undefined}\n data-focused={isFocused() || undefined}\n data-focus-visible={isFocusVisible() || undefined}\n data-hovered={isHovered() || undefined}\n >\n <input ref={context.setInputRef} {...mergedInputProps()} />\n {renderProps.renderChildren()}\n </div>\n );\n}\n\nColorSlider.Track = ColorSliderTrack;\nColorSlider.Thumb = ColorSliderThumb;\nColorSlider.Label = ColorSliderLabel;\nColorSlider.Output = ColorSliderOutput;\n\nexport interface ColorAreaRenderProps {\n /** Whether the area is disabled. */\n isDisabled: boolean;\n /** Whether the area is being dragged. */\n isDragging: boolean;\n /** The X channel. */\n xChannel: ColorChannel;\n /** The Y channel. */\n yChannel: ColorChannel;\n /** The current color. */\n color: Color;\n /** The default inline styles applied by the color area hook. */\n defaultStyle: JSX.CSSProperties;\n}\n\nexport interface ColorAreaProps extends AriaColorAreaOptions, SlotProps {\n /** The current color value (controlled). */\n value?: Color | string;\n /** The default color value (uncontrolled). */\n defaultValue?: Color | string;\n /** Handler called when the color changes. */\n onChange?: (color: Color) => void;\n /** Handler called when dragging ends. */\n onChangeEnd?: (color: Color) => void;\n /** The X channel to control. */\n xChannel?: ColorChannel;\n /** The Y channel to control. */\n yChannel?: ColorChannel;\n /** The children of the component. */\n children?: RenderChildren<ColorAreaRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<ColorAreaRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<ColorAreaRenderProps>;\n}\n\nexport interface ColorAreaGradientRenderProps {\n /** Whether the area is disabled. */\n isDisabled: boolean;\n}\n\nexport interface ColorAreaGradientProps extends SlotProps {\n /** The children of the gradient. */\n children?: RenderChildren<ColorAreaGradientRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<ColorAreaGradientRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<ColorAreaGradientRenderProps>;\n}\n\nexport interface ColorAreaThumbRenderProps {\n /** Whether the area is disabled. */\n isDisabled: boolean;\n /** Whether the thumb is being dragged. */\n isDragging: boolean;\n /** The current display color. */\n color: Color;\n /** Whether the thumb is focused. */\n isFocused: boolean;\n /** Whether the thumb has keyboard focus. */\n isFocusVisible: boolean;\n /** Whether the thumb is hovered. */\n isHovered: boolean;\n}\n\nexport interface ColorAreaThumbProps extends SlotProps {\n /** The children of the thumb. */\n children?: RenderChildren<ColorAreaThumbRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<ColorAreaThumbRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<ColorAreaThumbRenderProps>;\n /** Ref callback for the thumb element. */\n ref?: (element: HTMLDivElement) => void;\n}\n\ninterface ColorAreaContextValue {\n state: ColorAreaState;\n colorAreaProps: JSX.HTMLAttributes<HTMLDivElement>;\n gradientProps: JSX.HTMLAttributes<HTMLDivElement>;\n thumbProps: JSX.HTMLAttributes<HTMLDivElement>;\n xInputProps: JSX.InputHTMLAttributes<HTMLInputElement>;\n yInputProps: JSX.InputHTMLAttributes<HTMLInputElement>;\n areaRef: HTMLDivElement | undefined;\n setAreaRef: (el: HTMLDivElement) => void;\n}\n\nexport const ColorAreaContext = createContext<ColorAreaContextValue | null>(null);\n\n/**\n * A color area allows users to select a color using a 2D gradient.\n */\nexport function ColorArea(props: ColorAreaProps): JSX.Element {\n const pickerContext = useContext(ColorPickerContextInternal);\n const [local, stateProps, ariaProps, rest] = splitProps(\n props,\n [\"children\", \"class\", \"style\", \"slot\"],\n [\"value\", \"defaultValue\", \"onChange\", \"onChangeEnd\", \"xChannel\", \"yChannel\", \"colorSpace\"],\n [\n \"id\",\n \"aria-label\",\n \"aria-labelledby\",\n \"aria-describedby\",\n \"aria-details\",\n \"isDisabled\",\n \"xName\",\n \"yName\",\n \"form\",\n ],\n );\n\n // Create color area state\n const state = createColorAreaState(() => ({\n value: stateProps.value ?? pickerContext?.value,\n defaultValue: stateProps.defaultValue,\n onChange: stateProps.onChange ?? pickerContext?.onChange,\n onChangeEnd: stateProps.onChangeEnd,\n xChannel: stateProps.xChannel,\n yChannel: stateProps.yChannel,\n colorSpace: stateProps.colorSpace,\n isDisabled: ariaProps.isDisabled,\n }));\n\n // Area ref\n let areaRef: HTMLDivElement | undefined;\n const setAreaRef = (el: HTMLDivElement) => {\n areaRef = el;\n };\n\n // Create color area aria props\n const colorAreaAria = createColorArea(\n () => ({\n id: ariaProps.id,\n \"aria-label\": ariaProps[\"aria-label\"],\n \"aria-labelledby\": ariaProps[\"aria-labelledby\"],\n \"aria-describedby\": ariaProps[\"aria-describedby\"],\n \"aria-details\": ariaProps[\"aria-details\"],\n isDisabled: ariaProps.isDisabled,\n xName: ariaProps.xName,\n yName: ariaProps.yName,\n form: ariaProps.form,\n }),\n () => state,\n () => areaRef ?? null,\n );\n\n const renderValues = createMemo<ColorAreaRenderProps>(() => ({\n isDisabled: state.isDisabled,\n isDragging: state.isDragging,\n xChannel: state.xChannel,\n yChannel: state.yChannel,\n color: state.value,\n defaultStyle: (colorAreaAria.colorAreaProps as { style?: JSX.CSSProperties }).style ?? {},\n }));\n\n const childRenderValues: ColorAreaRenderProps = {\n get isDisabled() {\n return state.isDisabled;\n },\n get isDragging() {\n return state.isDragging;\n },\n get xChannel() {\n return state.xChannel;\n },\n get yChannel() {\n return state.yChannel;\n },\n get color() {\n return state.value;\n },\n get defaultStyle() {\n return (colorAreaAria.colorAreaProps as { style?: JSX.CSSProperties }).style ?? {};\n },\n };\n\n const colorAreaChildren = () => {\n const children = props.children;\n return typeof children === \"function\" ? children(childRenderValues) : children;\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-ColorArea\",\n },\n renderValues,\n );\n\n const domProps = createMemo(() =>\n filterDOMProps(rest as Record<string, unknown>, { global: true }),\n );\n\n const cleanColorAreaProps = () => {\n const {\n ref: _ref,\n style: _areaStyle,\n ...rest\n } = colorAreaAria.colorAreaProps as Record<string, unknown>;\n return rest;\n };\n\n const mergedStyle = () => {\n const areaStyle =\n (colorAreaAria.colorAreaProps as { style?: Record<string, string> }).style || {};\n const renderStyle = renderProps.style() || {};\n return { ...areaStyle, ...renderStyle };\n };\n\n return (\n <ColorAreaContext.Provider\n value={{\n state,\n get colorAreaProps() {\n return colorAreaAria.colorAreaProps;\n },\n get gradientProps() {\n return colorAreaAria.gradientProps;\n },\n get thumbProps() {\n return colorAreaAria.thumbProps;\n },\n get xInputProps() {\n return colorAreaAria.xInputProps;\n },\n get yInputProps() {\n return colorAreaAria.yInputProps;\n },\n areaRef,\n setAreaRef,\n }}\n >\n <div\n ref={setAreaRef}\n {...domProps()}\n {...cleanColorAreaProps()}\n class={renderProps.class()}\n style={mergedStyle()}\n slot={local.slot ?? undefined}\n data-disabled={state.isDisabled || undefined}\n data-dragging={state.isDragging || undefined}\n >\n {colorAreaChildren()}\n </div>\n </ColorAreaContext.Provider>\n );\n}\n\n/**\n * The gradient background of a color area.\n */\nexport function ColorAreaGradient(props: ColorAreaGradientProps): JSX.Element {\n const [local, domProps] = splitProps(props, [\"class\", \"style\", \"slot\", \"children\"]);\n\n const context = useContext(ColorAreaContext);\n if (!context) {\n throw new Error(\"ColorAreaGradient must be used within a ColorArea\");\n }\n\n const { state } = context;\n\n const renderValues = createMemo<ColorAreaGradientRenderProps>(() => ({\n isDisabled: state.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-ColorArea-gradient\",\n },\n renderValues,\n );\n\n const cleanGradientProps = () => {\n const {\n ref: _ref,\n style: _gradStyle,\n ...rest\n } = context.gradientProps as Record<string, unknown>;\n return rest;\n };\n\n const mergedStyle = () => {\n const gradStyle = (context.gradientProps as { style?: Record<string, string> }).style || {};\n const renderStyle = renderProps.style() || {};\n return { ...gradStyle, ...renderStyle };\n };\n\n return (\n <div\n {...domProps}\n {...cleanGradientProps()}\n class={renderProps.class()}\n style={mergedStyle()}\n data-disabled={state.isDisabled || undefined}\n >\n {renderProps.renderChildren()}\n </div>\n );\n}\n\n/**\n * The thumb element of a color area.\n */\nexport function ColorAreaThumb(props: ColorAreaThumbProps): JSX.Element {\n const [local, domProps] = splitProps(props, [\"class\", \"style\", \"slot\", \"children\", \"ref\"]);\n\n const context = useContext(ColorAreaContext);\n if (!context) {\n throw new Error(\"ColorAreaThumb must be used within a ColorArea\");\n }\n\n const { state } = context;\n\n const { isFocused, isFocusVisible, focusProps } = createFocusRing();\n let xInputRef: HTMLInputElement | undefined;\n let yInputRef: HTMLInputElement | undefined;\n\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return state.isDisabled;\n },\n });\n\n const renderValues = createMemo<ColorAreaThumbRenderProps>(() => ({\n isDisabled: state.isDisabled,\n isDragging: state.isDragging,\n color: state.getDisplayColor(),\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible(),\n isHovered: isHovered(),\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-ColorArea-thumb\",\n },\n renderValues,\n );\n\n const cleanThumbProps = () => {\n const {\n ref: _ref,\n style: _thumbStyle,\n ...rest\n } = context.thumbProps 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 const mergedXInputProps = () => {\n const { value: _value, ...inputProps } = context.xInputProps as Record<string, unknown>;\n return mergeProps(inputProps, cleanFocusProps()) as JSX.InputHTMLAttributes<HTMLInputElement>;\n };\n const mergedYInputProps = () => {\n const { value: _value, ...inputProps } = context.yInputProps as Record<string, unknown>;\n return mergeProps(inputProps, cleanFocusProps()) as JSX.InputHTMLAttributes<HTMLInputElement>;\n };\n\n const mergedStyle = () => {\n const thumbStyle = (context.thumbProps as { style?: Record<string, string> }).style || {};\n const renderStyle = renderProps.style() || {};\n return { ...thumbStyle, ...renderStyle };\n };\n\n const syncInputValue = (input: HTMLInputElement | undefined, value: number) => {\n const nextValue = String(value);\n const update = () => {\n if (input && input.value !== nextValue) {\n input.value = nextValue;\n }\n };\n\n update();\n queueMicrotask(update);\n };\n\n createEffect(() => {\n syncInputValue(xInputRef, state.getXValue());\n });\n\n createEffect(() => {\n syncInputValue(yInputRef, state.getYValue());\n });\n\n return (\n <div\n {...domProps}\n ref={local.ref}\n {...cleanThumbProps()}\n {...cleanHoverProps()}\n class={renderProps.class()}\n style={mergedStyle()}\n data-disabled={state.isDisabled || undefined}\n data-dragging={state.isDragging || undefined}\n data-focused={isFocused() || undefined}\n data-focus-visible={isFocusVisible() || undefined}\n data-hovered={isHovered() || undefined}\n >\n <input\n {...mergedXInputProps()}\n ref={(el) => {\n xInputRef = el;\n syncInputValue(el, state.getXValue());\n }}\n />\n <input\n {...mergedYInputProps()}\n ref={(el) => {\n yInputRef = el;\n syncInputValue(el, state.getYValue());\n }}\n />\n {renderProps.renderChildren()}\n </div>\n );\n}\n\nColorArea.Gradient = ColorAreaGradient;\nColorArea.Thumb = ColorAreaThumb;\n\nexport interface ColorWheelRenderProps {\n /** Whether the wheel is disabled. */\n isDisabled: boolean;\n /** Whether the wheel is being dragged. */\n isDragging: boolean;\n /** The current hue value (0-360). */\n hue: number;\n /** The current color. */\n color: Color;\n /** The default inline styles applied by the color wheel hook. */\n defaultStyle: JSX.CSSProperties;\n}\n\nexport interface ColorWheelProps extends AriaColorWheelOptions, SlotProps {\n /** The current color value (controlled). */\n value?: Color | string;\n /** The default color value (uncontrolled). */\n defaultValue?: Color | string;\n /** Handler called when the color changes. */\n onChange?: (color: Color) => void;\n /** Handler called when dragging ends. */\n onChangeEnd?: (color: Color) => void;\n /** The children of the component. */\n children?: RenderChildren<ColorWheelRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<ColorWheelRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<ColorWheelRenderProps>;\n}\n\nexport interface ColorWheelTrackRenderProps {\n /** Whether the wheel is disabled. */\n isDisabled: boolean;\n /** Whether the wheel is being dragged. */\n isDragging: boolean;\n /** The default inline styles applied by the color wheel hook. */\n defaultStyle: JSX.CSSProperties;\n}\n\nexport interface ColorWheelTrackProps extends SlotProps {\n /** The children of the track. */\n children?: RenderChildren<ColorWheelTrackRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<ColorWheelTrackRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<ColorWheelTrackRenderProps>;\n}\n\nexport interface ColorWheelThumbRenderProps {\n /** Whether the wheel is disabled. */\n isDisabled: boolean;\n /** Whether the thumb is being dragged. */\n isDragging: boolean;\n /** The current display color. */\n color: Color;\n /** Whether the thumb is focused. */\n isFocused: boolean;\n /** Whether the thumb has keyboard focus. */\n isFocusVisible: boolean;\n /** Whether the thumb is hovered. */\n isHovered: boolean;\n /** The default inline styles applied by the color wheel hook. */\n defaultStyle: JSX.CSSProperties;\n}\n\nexport interface ColorWheelThumbProps extends SlotProps {\n /** The children of the thumb. */\n children?: RenderChildren<ColorWheelThumbRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<ColorWheelThumbRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<ColorWheelThumbRenderProps>;\n /** Ref callback for the thumb element. */\n ref?: (element: HTMLDivElement) => void;\n}\n\ninterface ColorWheelContextValue {\n state: ColorWheelState;\n trackProps: JSX.HTMLAttributes<HTMLDivElement>;\n thumbProps: JSX.HTMLAttributes<HTMLDivElement>;\n inputProps: JSX.InputHTMLAttributes<HTMLInputElement>;\n wheelRef: HTMLDivElement | undefined;\n setWheelRef: (el: HTMLDivElement) => void;\n}\n\nexport const ColorWheelContext = createContext<ColorWheelContextValue | null>(null);\n\n/**\n * A color wheel allows users to select a hue using a circular control.\n */\nexport function ColorWheel(props: ColorWheelProps): JSX.Element {\n const pickerContext = useContext(ColorPickerContextInternal);\n const [local, stateProps, ariaProps, rest] = splitProps(\n props,\n [\"children\", \"class\", \"style\", \"slot\"],\n [\"value\", \"defaultValue\", \"onChange\", \"onChangeEnd\"],\n [\n \"id\",\n \"aria-label\",\n \"aria-labelledby\",\n \"aria-describedby\",\n \"aria-details\",\n \"aria-errormessage\",\n \"isDisabled\",\n \"name\",\n \"form\",\n \"outerRadius\",\n \"innerRadius\",\n ],\n );\n\n // Create color wheel state\n const state = createColorWheelState(() => ({\n value: stateProps.value ?? pickerContext?.value,\n defaultValue: stateProps.defaultValue,\n onChange: stateProps.onChange ?? pickerContext?.onChange,\n onChangeEnd: stateProps.onChangeEnd,\n isDisabled: ariaProps.isDisabled,\n }));\n\n let wheelRef: HTMLDivElement | undefined;\n const setWheelRef = (el: HTMLDivElement) => {\n wheelRef = el;\n };\n\n // Create color wheel aria props\n const colorWheelAria = createColorWheel(\n () => ({\n id: ariaProps.id,\n \"aria-label\": ariaProps[\"aria-label\"],\n \"aria-labelledby\": ariaProps[\"aria-labelledby\"],\n \"aria-describedby\": ariaProps[\"aria-describedby\"],\n \"aria-details\": ariaProps[\"aria-details\"],\n \"aria-errormessage\": ariaProps[\"aria-errormessage\"],\n isDisabled: ariaProps.isDisabled,\n name: ariaProps.name,\n form: ariaProps.form,\n outerRadius: ariaProps.outerRadius,\n innerRadius: ariaProps.innerRadius,\n }),\n () => state,\n () => wheelRef ?? null,\n );\n\n const renderValues = createMemo<ColorWheelRenderProps>(() => ({\n isDisabled: state.isDisabled,\n isDragging: state.isDragging,\n hue: state.getHue(),\n color: state.value,\n defaultStyle: { position: \"relative\" },\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-ColorWheel\",\n },\n renderValues,\n );\n\n const domProps = createMemo(() =>\n filterDOMProps(rest as Record<string, unknown>, { global: true }),\n );\n\n return (\n <ColorWheelContext.Provider\n value={{\n state,\n get trackProps() {\n return colorWheelAria.trackProps;\n },\n get thumbProps() {\n return colorWheelAria.thumbProps;\n },\n get inputProps() {\n return colorWheelAria.inputProps;\n },\n get wheelRef() {\n return wheelRef;\n },\n setWheelRef,\n }}\n >\n <div\n ref={setWheelRef}\n {...domProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n slot={local.slot || undefined}\n data-disabled={state.isDisabled || undefined}\n data-dragging={state.isDragging || undefined}\n >\n {renderProps.renderChildren()}\n </div>\n </ColorWheelContext.Provider>\n );\n}\n\n/**\n * The track element of a color wheel.\n */\nexport function ColorWheelTrack(props: ColorWheelTrackProps): JSX.Element {\n const [local, domProps] = splitProps(props, [\"class\", \"style\", \"slot\", \"children\"]);\n\n const context = useContext(ColorWheelContext);\n if (!context) {\n throw new Error(\"ColorWheelTrack must be used within a ColorWheel\");\n }\n\n const state = context.state;\n\n const renderValues = createMemo<ColorWheelTrackRenderProps>(() => ({\n isDisabled: state.isDisabled,\n isDragging: state.isDragging,\n defaultStyle: (context.trackProps as { style?: JSX.CSSProperties }).style ?? {},\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-ColorWheel-track\",\n },\n renderValues,\n );\n\n const cleanTrackProps = () => {\n const {\n ref: _ref,\n style: _trackStyle,\n ...rest\n } = context.trackProps as Record<string, unknown>;\n return rest;\n };\n\n const mergedStyle = () => {\n const trackStyle = (context.trackProps as { style?: Record<string, string> }).style || {};\n const renderStyle = renderProps.style() || {};\n return { ...trackStyle, ...renderStyle };\n };\n\n return (\n <div\n {...domProps}\n {...cleanTrackProps()}\n class={renderProps.class()}\n style={mergedStyle()}\n data-disabled={state.isDisabled || undefined}\n data-dragging={state.isDragging || undefined}\n >\n {renderProps.renderChildren()}\n </div>\n );\n}\n\n/**\n * The thumb element of a color wheel.\n */\nexport function ColorWheelThumb(props: ColorWheelThumbProps): JSX.Element {\n const [local, domProps] = splitProps(props, [\"class\", \"style\", \"slot\", \"children\", \"ref\"]);\n\n const context = useContext(ColorWheelContext);\n if (!context) {\n throw new Error(\"ColorWheelThumb must be used within a ColorWheel\");\n }\n\n const state = context.state;\n\n const { isFocused, isFocusVisible, focusProps } = createFocusRing();\n\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return state.isDisabled;\n },\n });\n\n const renderValues = createMemo<ColorWheelThumbRenderProps>(() => ({\n isDisabled: state.isDisabled,\n isDragging: state.isDragging,\n color: state.getDisplayColor(),\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible(),\n isHovered: isHovered(),\n defaultStyle: (context.thumbProps as { style?: JSX.CSSProperties }).style ?? {},\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-ColorWheel-thumb\",\n },\n renderValues,\n );\n\n const cleanThumbProps = () => {\n const {\n ref: _ref,\n style: _thumbStyle,\n ...rest\n } = context.thumbProps 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 const mergedInputProps = () => {\n return mergeProps(\n context.inputProps as Record<string, unknown>,\n cleanFocusProps(),\n ) as JSX.InputHTMLAttributes<HTMLInputElement>;\n };\n\n const mergedStyle = () => {\n const thumbStyle = (context.thumbProps as { style?: Record<string, string> }).style || {};\n const renderStyle = renderProps.style() || {};\n return { ...thumbStyle, ...renderStyle };\n };\n\n return (\n <div\n {...domProps}\n ref={local.ref}\n {...cleanThumbProps()}\n {...cleanHoverProps()}\n class={renderProps.class()}\n style={mergedStyle()}\n data-disabled={state.isDisabled || undefined}\n data-dragging={state.isDragging || undefined}\n data-focused={isFocused() || undefined}\n data-focus-visible={isFocusVisible() || undefined}\n data-hovered={isHovered() || undefined}\n >\n <input {...mergedInputProps()} />\n {renderProps.renderChildren()}\n </div>\n );\n}\n\nColorWheel.Track = ColorWheelTrack;\nColorWheel.Thumb = ColorWheelThumb;\n\nexport interface ColorFieldRenderProps {\n /** Whether the field is disabled. */\n isDisabled: boolean;\n /** Whether the field is read-only. */\n isReadOnly: boolean;\n /** Whether the field is required. */\n isRequired: boolean;\n /** Whether the input value is invalid. */\n isInvalid: boolean;\n /** The current color value (null if invalid). */\n color: Color | null;\n /** The color channel being edited, or \"hex\" for full color mode. */\n channel: ColorChannel | \"hex\";\n}\n\nexport interface ColorFieldProps extends AriaColorFieldOptions, SlotProps {\n /** The current color value (controlled). */\n value?: Color | string | null;\n /** The default color value (uncontrolled). */\n defaultValue?: Color | string;\n /** Handler called when the color changes. */\n onChange?: (color: Color | null) => void;\n /** The color channel to edit (for single channel mode). */\n channel?: ColorChannel;\n /** The color space to use for channel mode. */\n colorSpace?: ColorSpace;\n /** The color format for parsing/displaying. */\n colorFormat?: ColorFormat;\n /** A visible label for the field. */\n label?: JSX.Element;\n /** Description text for the field. */\n description?: JSX.Element;\n /** Error message for the field. */\n errorMessage?: JSX.Element;\n /** The children of the component. */\n children?: RenderChildren<ColorFieldRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<ColorFieldRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<ColorFieldRenderProps>;\n}\n\nexport interface ColorFieldInputRenderProps {\n /** Whether the field is disabled. */\n isDisabled: boolean;\n /** Whether the field is read-only. */\n isReadOnly: boolean;\n /** Whether the input value is invalid. */\n isInvalid: boolean;\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}\n\nexport interface ColorFieldInputProps extends SlotProps {\n /** The children of the input (usually not used). */\n children?: RenderChildren<ColorFieldInputRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<ColorFieldInputRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<ColorFieldInputRenderProps>;\n /** Ref callback for the input element. */\n ref?: (element: HTMLInputElement) => void;\n}\n\ninterface ColorFieldContextValue {\n state: ColorFieldState;\n inputProps: JSX.InputHTMLAttributes<HTMLInputElement>;\n labelProps: JSX.LabelHTMLAttributes<HTMLLabelElement>;\n descriptionProps: JSX.HTMLAttributes<HTMLElement>;\n errorMessageProps: JSX.HTMLAttributes<HTMLElement>;\n setInputRef: (el: HTMLInputElement) => void;\n setLabelElement: (isPresent: boolean) => void;\n}\n\nexport const ColorFieldContext = createContext<ColorFieldContextValue | null>(null);\n\n/**\n * A color field allows users to enter a color value as text.\n */\nexport function ColorField(props: ColorFieldProps): JSX.Element {\n const pickerContext = useContext(ColorPickerContextInternal);\n const [local, stateProps, ariaProps, rest] = splitProps(\n props,\n [\"children\", \"class\", \"style\", \"slot\", \"label\", \"description\", \"errorMessage\"],\n [\"value\", \"defaultValue\", \"onChange\", \"channel\", \"colorSpace\", \"colorFormat\"],\n [\n \"id\",\n \"aria-label\",\n \"aria-labelledby\",\n \"aria-describedby\",\n \"aria-details\",\n \"aria-errormessage\",\n \"name\",\n \"form\",\n \"isWheelDisabled\",\n \"isDisabled\",\n \"isReadOnly\",\n \"isRequired\",\n \"isInvalid\",\n \"validationBehavior\",\n \"autoFocus\",\n \"excludeFromTabOrder\",\n \"placeholder\",\n ],\n );\n const [hasRegisteredLabelElement, setHasRegisteredLabelElement] = createSignal(false);\n\n // Create color field state\n const state = createColorFieldState(() => ({\n value: stateProps.value ?? pickerContext?.value,\n defaultValue: stateProps.defaultValue,\n onChange:\n stateProps.onChange ??\n ((color) => {\n if (color) {\n pickerContext?.onChange?.(color);\n }\n }),\n channel: stateProps.channel,\n colorSpace: stateProps.colorSpace,\n colorFormat: stateProps.colorFormat,\n isDisabled: ariaProps.isDisabled,\n isReadOnly: ariaProps.isReadOnly,\n isInvalid: ariaProps.isInvalid,\n isRequired: ariaProps.isRequired,\n }));\n\n // Input ref\n let inputRef: HTMLInputElement | undefined;\n const setInputRef = (el: HTMLInputElement) => {\n inputRef = el;\n };\n\n // Create color field aria props\n const colorFieldAria = createColorField(\n () => ({\n id: ariaProps.id,\n \"aria-label\": ariaProps[\"aria-label\"],\n \"aria-labelledby\": ariaProps[\"aria-labelledby\"],\n \"aria-describedby\": ariaProps[\"aria-describedby\"],\n \"aria-details\": ariaProps[\"aria-details\"],\n \"aria-errormessage\": ariaProps[\"aria-errormessage\"],\n name: ariaProps.name,\n form: ariaProps.form,\n isWheelDisabled: ariaProps.isWheelDisabled,\n isDisabled: ariaProps.isDisabled,\n isReadOnly: ariaProps.isReadOnly,\n isRequired: ariaProps.isRequired,\n isInvalid: ariaProps.isInvalid,\n validationBehavior: ariaProps.validationBehavior,\n autoFocus: ariaProps.autoFocus,\n excludeFromTabOrder: ariaProps.excludeFromTabOrder,\n placeholder: ariaProps.placeholder,\n channel: stateProps.channel,\n colorSpace: stateProps.colorSpace,\n }),\n () => state,\n () => inputRef ?? null,\n );\n\n const describedBy = () => {\n const invalid = ariaProps.isInvalid || state.isInvalid;\n const ids = [\n ariaProps[\"aria-describedby\"],\n local.description && !invalid ? colorFieldAria.descriptionProps.id : undefined,\n invalid && local.errorMessage ? colorFieldAria.errorMessageProps.id : undefined,\n ];\n return ids.filter(Boolean).join(\" \") || undefined;\n };\n\n const fieldInputProps = () => {\n const labelledBy =\n ariaProps[\"aria-labelledby\"] ??\n (!ariaProps[\"aria-label\"] && (local.label || hasRegisteredLabelElement())\n ? colorFieldAria.labelProps.id\n : undefined);\n return {\n ...colorFieldAria.inputProps,\n \"aria-label\": labelledBy ? undefined : colorFieldAria.inputProps[\"aria-label\"],\n \"aria-labelledby\": labelledBy,\n \"aria-describedby\": describedBy(),\n \"aria-errormessage\":\n (ariaProps.isInvalid || state.isInvalid) && local.errorMessage\n ? colorFieldAria.errorMessageProps.id\n : colorFieldAria.inputProps[\"aria-errormessage\"],\n } as JSX.InputHTMLAttributes<HTMLInputElement>;\n };\n\n const hiddenInputValue = createMemo(() =>\n Number.isNaN(state.numberValue) ? \"\" : String(state.numberValue),\n );\n\n const renderValues = createMemo<ColorFieldRenderProps>(() => ({\n isDisabled: state.isDisabled,\n isReadOnly: state.isReadOnly,\n isRequired: state.isRequired,\n isInvalid: state.isInvalid,\n color: state.value,\n channel: state.channel ?? \"hex\",\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-ColorField\",\n },\n renderValues,\n );\n\n const childRenderValues: ColorFieldRenderProps = {\n get isDisabled() {\n return state.isDisabled;\n },\n get isReadOnly() {\n return state.isReadOnly;\n },\n get isRequired() {\n return state.isRequired;\n },\n get isInvalid() {\n return state.isInvalid;\n },\n get color() {\n return state.value;\n },\n get channel() {\n return state.channel ?? \"hex\";\n },\n };\n\n let hasRenderedChildren = false;\n let renderedChildren: JSX.Element;\n const renderChildren = () => {\n if (!hasRenderedChildren) {\n const children = local.children;\n renderedChildren =\n typeof children === \"function\" ? untrack(() => children(childRenderValues)) : children;\n hasRenderedChildren = true;\n }\n return renderedChildren;\n };\n\n const domProps = createMemo(() =>\n filterDOMProps(rest as Record<string, unknown>, { global: true }),\n );\n\n return (\n <ColorFieldContext.Provider\n value={{\n state,\n get inputProps() {\n return fieldInputProps();\n },\n get labelProps() {\n return colorFieldAria.labelProps;\n },\n get descriptionProps() {\n return colorFieldAria.descriptionProps;\n },\n get errorMessageProps() {\n return colorFieldAria.errorMessageProps;\n },\n setInputRef,\n setLabelElement: setHasRegisteredLabelElement,\n }}\n >\n <>\n <div\n {...domProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n slot={local.slot ?? undefined}\n data-disabled={state.isDisabled || undefined}\n data-readonly={state.isReadOnly || undefined}\n data-invalid={state.isInvalid || undefined}\n data-required={state.isRequired || undefined}\n data-channel={state.channel ?? \"hex\"}\n >\n <Show when={local.label}>\n <label {...colorFieldAria.labelProps}>{local.label}</label>\n </Show>\n\n {renderChildren()}\n </div>\n <Show when={state.channel && ariaProps.name}>\n <input\n type=\"hidden\"\n name={ariaProps.name}\n form={ariaProps.form}\n value={hiddenInputValue()}\n />\n </Show>\n </>\n </ColorFieldContext.Provider>\n );\n}\n\n/**\n * The input element of a color field.\n */\nexport function ColorFieldInput(props: ColorFieldInputProps): JSX.Element {\n const [local, domProps] = splitProps(props, [\"class\", \"style\", \"slot\", \"children\", \"ref\"]);\n\n const context = useContext(ColorFieldContext);\n if (!context) {\n throw new Error(\"ColorFieldInput must be used within a ColorField\");\n }\n\n const state = context.state;\n const inputValue = createMemo(() => state.inputValue);\n\n const { isFocused, isFocusVisible, focusProps } = createFocusRing();\n\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return state.isDisabled;\n },\n });\n\n const renderValues = createMemo<ColorFieldInputRenderProps>(() => ({\n isDisabled: state.isDisabled,\n isReadOnly: state.isReadOnly,\n isInvalid: state.isInvalid,\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible(),\n isHovered: isHovered(),\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-ColorField-input\",\n },\n renderValues,\n );\n\n const cleanInputProps = () => {\n const {\n ref: _ref,\n style: _inputStyle,\n value: _value,\n ...rest\n } = 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 return (\n <input\n {...domProps}\n {...cleanInputProps()}\n {...cleanFocusProps()}\n {...cleanHoverProps()}\n ref={(el) => {\n context.setInputRef(el);\n local.ref?.(el);\n }}\n class={renderProps.class()}\n style={renderProps.style()}\n value={inputValue()}\n data-disabled={state.isDisabled || undefined}\n data-readonly={state.isReadOnly || undefined}\n data-invalid={state.isInvalid || undefined}\n data-focused={isFocused() || undefined}\n data-focus-visible={isFocusVisible() || undefined}\n data-hovered={isHovered() || undefined}\n />\n );\n}\n\nColorField.Input = ColorFieldInput;\n\nexport interface ColorSwatchRenderProps {\n /** The color being displayed. */\n color: Color;\n /** The color as a CSS string. */\n colorValue: string;\n}\n\nexport interface ColorSwatchProps extends SlotProps {\n /** The color to display. */\n color?: Color | string;\n /** Localized color name override. */\n colorName?: string;\n /** Accessible label for the swatch. */\n \"aria-label\"?: string;\n /** ID of element that labels the swatch. */\n \"aria-labelledby\"?: string;\n /** ID of element that describes the swatch. */\n \"aria-describedby\"?: string;\n /** ID of element that provides detailed information about the swatch. */\n \"aria-details\"?: string;\n /** The children of the component. */\n children?: RenderChildren<ColorSwatchRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<ColorSwatchRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<ColorSwatchRenderProps>;\n}\n\n/**\n * A color swatch displays a preview of a color.\n */\nexport function ColorSwatch(props: ColorSwatchProps): JSX.Element {\n const swatchContext = useContext(ColorSwatchContextInternal);\n const pickerContext = useContext(ColorPickerContextInternal);\n const [local, ariaProps, rest] = splitProps(\n props,\n [\"children\", \"class\", \"style\", \"slot\", \"color\", \"colorName\"],\n [\"aria-label\", \"aria-labelledby\", \"aria-describedby\", \"aria-details\"],\n );\n\n const resolvedColor = createMemo<Color | string>(() => {\n return local.color ?? swatchContext?.color ?? pickerContext?.value ?? \"#fff0\";\n });\n\n const swatchAria = createColorSwatch(() => ({\n id: (rest as Record<string, unknown>).id as string | undefined,\n slot: local.slot,\n color: resolvedColor(),\n colorName: local.colorName,\n \"aria-label\": ariaProps[\"aria-label\"],\n \"aria-labelledby\": ariaProps[\"aria-labelledby\"],\n \"aria-describedby\": ariaProps[\"aria-describedby\"],\n \"aria-details\": ariaProps[\"aria-details\"],\n }));\n\n const renderValues = createMemo<ColorSwatchRenderProps>(() => ({\n color: swatchAria.color,\n colorValue: swatchAria.color.toString(\"css\"),\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-ColorSwatch\",\n },\n renderValues,\n );\n\n const domProps = createMemo(() =>\n filterDOMProps(rest as Record<string, unknown>, { global: true }),\n );\n\n const cleanSwatchProps = () => {\n const {\n ref: _ref,\n style: _swatchStyle,\n ...rest\n } = swatchAria.swatchProps as Record<string, unknown>;\n return rest;\n };\n\n const mergedStyle = () => {\n const swatchStyle = (swatchAria.swatchProps as { style?: Record<string, string> }).style || {};\n const renderStyle = renderProps.style() || {};\n return { ...swatchStyle, ...renderStyle };\n };\n\n return (\n <div {...domProps()} {...cleanSwatchProps()} class={renderProps.class()} style={mergedStyle()}>\n {renderProps.renderChildren()}\n </div>\n );\n}\n\nexport const ColorSliderStateContext = ColorSliderContext;\nexport const ColorAreaStateContext = ColorAreaContext;\nexport const ColorWheelStateContext = ColorWheelContext;\nexport const ColorWheelTrackContext = ColorWheelContext;\nexport const ColorFieldStateContext = ColorFieldContext;\nexport const ColorSwatchContext = ColorSwatchContextInternal;\nexport const ColorPickerContext = ColorPickerContextInternal;\nexport const ColorPickerStateContext = ColorPickerStateContextInternal;\nexport const ColorSwatchPickerContext = ColorSwatchPickerContextInternal;\nexport const ColorThumb = ColorSliderThumb;\n\nexport interface ColorPickerRenderProps {\n /** The currently selected color. */\n color: Color;\n}\n\nexport interface ColorPickerProps extends SlotProps {\n /** The current color value (controlled). */\n value?: Color | string;\n /** The default color value (uncontrolled). */\n defaultValue?: Color | string;\n /** Handler called when the color changes. */\n onChange?: (color: Color) => void;\n /** The children of the color picker. */\n children?: RenderChildren<ColorPickerRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<ColorPickerRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<ColorPickerRenderProps>;\n}\n\nexport interface ColorSwatchPickerRenderProps {\n /** Whether the swatch picker has focus. */\n isFocused: boolean;\n /** Whether the swatch picker has keyboard focus. */\n isFocusVisible: boolean;\n /** The currently selected color. */\n selectedColor: Color;\n /** Item arrangement mode. */\n layout: \"grid\" | \"stack\";\n}\n\nexport interface ColorSwatchPickerProps extends SlotProps {\n /** The element's unique identifier. */\n id?: string;\n /** The current color value (controlled). */\n value?: Color | string;\n /** The default color value (uncontrolled). */\n defaultValue?: Color | string;\n /** Handler called when the selected color changes. */\n onChange?: (color: Color) => void;\n /** Accessible label for the swatch picker. */\n \"aria-label\"?: string;\n /** ID of element that labels the swatch picker. */\n \"aria-labelledby\"?: string;\n /** ID of element that describes the swatch picker. */\n \"aria-describedby\"?: string;\n /** ID of element that provides detailed information about the swatch picker. */\n \"aria-details\"?: string;\n /** Whether swatches are arranged as a grid or stack. */\n layout?: \"grid\" | \"stack\";\n /** The children (ColorSwatchPickerItem elements). */\n children?: JSX.Element;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<ColorSwatchPickerRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<ColorSwatchPickerRenderProps>;\n}\n\nexport interface ColorSwatchPickerItemRenderProps {\n /** Whether the item is selected. */\n isSelected: boolean;\n /** Whether the item is focused. */\n isFocused: boolean;\n /** Whether the item has keyboard focus. */\n isFocusVisible: boolean;\n /** Whether the item is pressed. */\n isPressed: boolean;\n /** Whether the item is disabled. */\n isDisabled: boolean;\n /** The color represented by the item. */\n color: Color;\n}\n\nexport interface ColorSwatchPickerItemProps extends SlotProps {\n /** The color represented by this swatch item. */\n color: Color | string;\n /** Whether this item is disabled. */\n isDisabled?: boolean;\n /** Accessible label for this item. */\n \"aria-label\"?: string;\n /** The children of the swatch item. */\n children?: RenderChildren<ColorSwatchPickerItemRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<ColorSwatchPickerItemRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<ColorSwatchPickerItemRenderProps>;\n}\n\nexport function ColorPicker(props: ColorPickerProps): JSX.Element {\n const [local] = splitProps(props, [\n \"value\",\n \"defaultValue\",\n \"onChange\",\n \"children\",\n \"class\",\n \"style\",\n \"slot\",\n ]);\n\n const [internalColor, setInternalColor] = createSignal<Color>(\n normalizeColor(local.defaultValue ?? \"#ff0000\"),\n );\n\n const color = createMemo<Color>(() => {\n if (local.value !== undefined) {\n return normalizeColor(local.value);\n }\n return internalColor();\n });\n\n const setColor = (nextColor: Color) => {\n if (local.value === undefined) {\n setInternalColor(nextColor);\n }\n local.onChange?.(nextColor);\n };\n\n const renderValues = createMemo<ColorPickerRenderProps>(() => ({\n color: color(),\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-ColorPicker\",\n },\n renderValues,\n );\n\n return (\n <ColorPickerStateContextInternal.Provider\n value={{\n color: () => color(),\n setColor,\n }}\n >\n <ColorPickerContextInternal.Provider\n value={{\n get value() {\n return color();\n },\n onChange: setColor,\n }}\n >\n <div class={renderProps.class()} style={renderProps.style()}>\n {renderProps.renderChildren()}\n </div>\n </ColorPickerContextInternal.Provider>\n </ColorPickerStateContextInternal.Provider>\n );\n}\n\nexport function ColorSwatchPicker(props: ColorSwatchPickerProps): JSX.Element {\n const pickerContext = useContext(ColorPickerContextInternal);\n const [local, rest] = splitProps(props, [\n \"value\",\n \"defaultValue\",\n \"onChange\",\n \"id\",\n \"aria-label\",\n \"aria-labelledby\",\n \"aria-describedby\",\n \"aria-details\",\n \"layout\",\n \"children\",\n \"class\",\n \"style\",\n \"slot\",\n ]);\n\n const [itemMap, setItemMap] = createSignal<Map<string, ColorSwatchPickerItemData>>(new Map());\n const [itemOrder, setItemOrder] = createSignal<string[]>([]);\n const [internalColor, setInternalColor] = createSignal<Color>(\n normalizeColor(local.defaultValue ?? pickerContext?.value ?? \"#ff0000\"),\n );\n\n const selectedColor = createMemo<Color>(() => {\n if (local.value !== undefined) {\n return normalizeColor(local.value);\n }\n if (pickerContext?.value !== undefined) {\n return normalizeColor(pickerContext.value);\n }\n return internalColor();\n });\n\n const selectedKey = createMemo(() => selectedColor().toString(\"hexa\"));\n const isControlled = createMemo(\n () => local.value !== undefined || pickerContext?.value !== undefined,\n );\n\n const registerItem = (item: ColorSwatchPickerItemData) => {\n setItemMap((prev) => {\n const next = new Map(prev);\n next.set(item.key, item);\n return next;\n });\n setItemOrder((prev) => (prev.includes(item.key) ? prev : [...prev, item.key]));\n };\n\n const unregisterItem = (key: string) => {\n setItemMap((prev) => {\n if (!prev.has(key)) return prev;\n const next = new Map(prev);\n next.delete(key);\n return next;\n });\n setItemOrder((prev) => prev.filter((itemKey) => itemKey !== key));\n };\n\n const items = createMemo(() => {\n const map = itemMap();\n return itemOrder()\n .map((key) => map.get(key))\n .filter((item): item is ColorSwatchPickerItemData => item != null);\n });\n\n const state = createListState<ColorSwatchPickerItemData>({\n get items() {\n return items();\n },\n get getKey() {\n return (item: ColorSwatchPickerItemData) => item.key;\n },\n get getTextValue() {\n return (item: ColorSwatchPickerItemData) => item.textValue;\n },\n get getDisabled() {\n return (item: ColorSwatchPickerItemData) => !!item.isDisabled;\n },\n selectionMode: \"single\",\n disallowEmptySelection: true,\n get selectedKeys() {\n return [selectedKey()];\n },\n onSelectionChange(keys) {\n if (keys === \"all\") return;\n const key = keys.values().next().value as string | undefined;\n if (!key) return;\n const item = itemMap().get(key);\n if (!item) return;\n if (!isControlled()) {\n setInternalColor(item.color);\n }\n (local.onChange ?? pickerContext?.onChange)?.(item.color);\n },\n });\n\n const listBoxAria = createListBox(\n () => ({\n id: local.id,\n \"aria-label\":\n local[\"aria-label\"] ?? (!local[\"aria-labelledby\"] ? \"Color swatch picker\" : undefined),\n \"aria-labelledby\": local[\"aria-labelledby\"],\n \"aria-describedby\": local[\"aria-describedby\"],\n \"aria-details\": local[\"aria-details\"],\n shouldFocusWrap: true,\n }),\n state,\n );\n\n const resolveDirection = (): \"ltr\" | \"rtl\" => {\n if (typeof document === \"undefined\") return \"ltr\";\n const rootDir = document.dir;\n return rootDir === \"rtl\" ? \"rtl\" : \"ltr\";\n };\n\n const findNextEnabledKey = (from: Key | null, direction: \"next\" | \"prev\") => {\n const collection = state.collection();\n const getAdjacent =\n direction === \"next\"\n ? (key: Key) => collection.getKeyAfter(key)\n : (key: Key) => collection.getKeyBefore(key);\n const getBoundary =\n direction === \"next\" ? () => collection.getFirstKey() : () => collection.getLastKey();\n\n let key = from != null ? getAdjacent(from) : getBoundary();\n while (key != null && state.isDisabled(key)) {\n key = getAdjacent(key);\n }\n\n return key;\n };\n\n const getBoundaryEnabledKey = (direction: \"next\" | \"prev\") => {\n const collection = state.collection();\n const getAdjacent =\n direction === \"next\"\n ? (key: Key) => collection.getKeyAfter(key)\n : (key: Key) => collection.getKeyBefore(key);\n const getBoundary =\n direction === \"next\" ? () => collection.getFirstKey() : () => collection.getLastKey();\n\n let key = getBoundary();\n while (key != null && state.isDisabled(key)) {\n key = getAdjacent(key);\n }\n\n return key;\n };\n\n const getOptionElementForKey = (\n listbox: HTMLElement | null,\n key: Key | null,\n ): HTMLElement | null => {\n if (!listbox || key == null) return null;\n const keyString = String(key);\n for (const optionElement of listbox.querySelectorAll<HTMLElement>('[role=\"option\"]')) {\n if (optionElement.id === keyString) {\n return optionElement;\n }\n }\n return null;\n };\n\n const findGridKey = (\n listbox: HTMLElement | null,\n key: Key,\n nextKey: (current: Key) => Key | null,\n shouldSkip: (prevRect: DOMRect, itemRect: DOMRect) => boolean,\n ): Key | null => {\n let candidate: Key | null = key;\n const previousRect = getOptionElementForKey(listbox, candidate)?.getBoundingClientRect();\n if (!previousRect) {\n return null;\n }\n\n while (candidate != null) {\n candidate = nextKey(candidate);\n if (candidate == null) {\n return null;\n }\n\n const itemRect = getOptionElementForKey(listbox, candidate)?.getBoundingClientRect();\n if (!itemRect) {\n return null;\n }\n\n if (!shouldSkip(previousRect, itemRect)) {\n return candidate;\n }\n }\n\n return null;\n };\n\n const isSameRow = (prevRect: DOMRect, itemRect: DOMRect) =>\n prevRect.y === itemRect.y || prevRect.x !== itemRect.x;\n const getGridKeyBelow = (listbox: HTMLElement | null, key: Key) =>\n findGridKey(listbox, key, (current) => findNextEnabledKey(current, \"next\"), isSameRow);\n const getGridKeyAbove = (listbox: HTMLElement | null, key: Key) =>\n findGridKey(listbox, key, (current) => findNextEnabledKey(current, \"prev\"), isSameRow);\n const getGridKeyRightOf = (key: Key) =>\n resolveDirection() === \"rtl\"\n ? findNextEnabledKey(key, \"prev\")\n : findNextEnabledKey(key, \"next\");\n const getGridKeyLeftOf = (key: Key) =>\n resolveDirection() === \"rtl\"\n ? findNextEnabledKey(key, \"next\")\n : findNextEnabledKey(key, \"prev\");\n\n const handleGridKeyDown = (e: KeyboardEvent): boolean => {\n if ((local.layout ?? \"grid\") !== \"grid\") return false;\n if (\n e.key !== \"ArrowRight\" &&\n e.key !== \"ArrowLeft\" &&\n e.key !== \"ArrowDown\" &&\n e.key !== \"ArrowUp\"\n ) {\n return false;\n }\n\n const listbox = e.currentTarget as HTMLElement | null;\n const focusedKey = state.focusedKey();\n const initialKey =\n focusedKey ??\n (e.key === \"ArrowUp\" || e.key === \"ArrowLeft\"\n ? getBoundaryEnabledKey(\"prev\")\n : getBoundaryEnabledKey(\"next\"));\n if (initialKey == null) return false;\n\n let nextKey: Key | null = null;\n switch (e.key) {\n case \"ArrowDown\":\n nextKey = getGridKeyBelow(listbox, initialKey) ?? getBoundaryEnabledKey(\"next\");\n break;\n case \"ArrowUp\":\n nextKey = getGridKeyAbove(listbox, initialKey) ?? getBoundaryEnabledKey(\"prev\");\n break;\n case \"ArrowRight\":\n nextKey =\n getGridKeyRightOf(initialKey) ??\n (resolveDirection() === \"rtl\"\n ? getBoundaryEnabledKey(\"prev\")\n : getBoundaryEnabledKey(\"next\"));\n break;\n case \"ArrowLeft\":\n nextKey =\n getGridKeyLeftOf(initialKey) ??\n (resolveDirection() === \"rtl\"\n ? getBoundaryEnabledKey(\"next\")\n : getBoundaryEnabledKey(\"prev\"));\n break;\n }\n\n if (nextKey == null) return false;\n\n state.setFocusedKey(nextKey);\n if (state.selectionMode() === \"single\") {\n state.replaceSelection(nextKey);\n }\n\n e.preventDefault();\n e.stopPropagation();\n return true;\n };\n\n const getListBoxKeyDown = () => {\n const props = listBoxAria.listBoxProps as Record<string, unknown>;\n return props.onKeyDown as JSX.EventHandler<HTMLDivElement, KeyboardEvent> | undefined;\n };\n\n const onColorSwatchPickerKeyDown: JSX.EventHandler<HTMLDivElement, KeyboardEvent> = (e) => {\n if (handleGridKeyDown(e)) {\n return;\n }\n getListBoxKeyDown()?.(e);\n };\n\n createEffect(() => {\n const key = selectedKey();\n if (key) {\n state.setFocusedKey(key);\n }\n });\n\n const { isFocused, isFocusVisible, focusProps } = createFocusRing({ within: true });\n const domProps = createMemo(() =>\n filterDOMProps(rest as Record<string, unknown>, { global: true }),\n );\n const renderValues = createMemo<ColorSwatchPickerRenderProps>(() => ({\n isFocused: state.isFocused() || isFocused(),\n isFocusVisible: isFocusVisible(),\n selectedColor: selectedColor(),\n layout: local.layout ?? \"grid\",\n }));\n\n const renderProps = useRenderProps(\n {\n class: local.class,\n style: local.style,\n defaultClassName: \"solidaria-ColorSwatchPicker\",\n },\n renderValues,\n );\n\n const cleanListBoxProps = () => {\n const {\n ref: _ref,\n onKeyDown: _onKeyDown,\n ...restListBoxProps\n } = listBoxAria.listBoxProps as Record<string, unknown>;\n return restListBoxProps;\n };\n const cleanFocusProps = () => {\n const { ref: _ref, ...restFocusProps } = focusProps as Record<string, unknown>;\n return restFocusProps;\n };\n\n return (\n <ColorSwatchPickerContextInternal.Provider\n value={{\n state,\n registerItem,\n unregisterItem,\n }}\n >\n <div\n {...mergeProps(domProps(), cleanListBoxProps(), cleanFocusProps(), {\n onKeyDown: onColorSwatchPickerKeyDown,\n })}\n class={renderProps.class()}\n style={renderProps.style()}\n slot={local.slot ?? undefined}\n data-focused={state.isFocused() || undefined}\n data-focus-visible={isFocusVisible() || undefined}\n data-layout={local.layout ?? \"grid\"}\n >\n {local.children}\n </div>\n </ColorSwatchPickerContextInternal.Provider>\n );\n}\n\nexport function ColorSwatchPickerItem(props: ColorSwatchPickerItemProps): JSX.Element {\n const context = useContext(ColorSwatchPickerContextInternal);\n if (!context) {\n throw new Error(\"ColorSwatchPickerItem must be used within a ColorSwatchPicker\");\n }\n\n const [local, ariaProps, rest] = splitProps(\n props,\n [\"children\", \"class\", \"style\", \"slot\", \"color\"],\n [\"isDisabled\", \"aria-label\"],\n );\n\n const color = createMemo(() => normalizeColor(local.color));\n const key = createMemo(() => color().toString(\"hexa\"));\n const textValue = createMemo(() => {\n const locale = globalThis.navigator?.language ?? \"en-US\";\n return color().getColorName(locale);\n });\n\n createEffect(() => {\n const itemKey = key();\n context.registerItem({\n key: itemKey,\n color: color(),\n textValue: textValue(),\n isDisabled: ariaProps.isDisabled,\n });\n onCleanup(() => context.unregisterItem(itemKey));\n });\n\n const optionAria = createOption(\n () => ({\n key: key(),\n isDisabled: ariaProps.isDisabled,\n \"aria-label\": ariaProps[\"aria-label\"] ?? textValue(),\n }),\n context.state,\n );\n\n const renderValues = createMemo<ColorSwatchPickerItemRenderProps>(() => ({\n isSelected: optionAria.isSelected(),\n isFocused: optionAria.isFocused(),\n isFocusVisible: optionAria.isFocusVisible(),\n isPressed: optionAria.isPressed(),\n isDisabled: optionAria.isDisabled(),\n color: color(),\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-ColorSwatchPickerItem\",\n },\n renderValues,\n );\n\n const domProps = createMemo(() =>\n filterDOMProps(rest as Record<string, unknown>, { global: true }),\n );\n const cleanOptionProps = () => {\n const { ref: _ref, ...restOptionProps } = optionAria.optionProps as Record<string, unknown>;\n return restOptionProps;\n };\n\n return (\n <div\n {...mergeProps(domProps(), cleanOptionProps())}\n class={renderProps.class()}\n style={renderProps.style()}\n >\n <ColorSwatchContextInternal.Provider value={{ color: color() }}>\n {renderProps.children ? renderProps.renderChildren() : <ColorSwatch />}\n </ColorSwatchContextInternal.Provider>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;AAqFA,MAAM6D,6BAA6B5D,cAAqD,IAAI;AAC5F,MAAM6D,kCAAkC7D,cAAmD,IAAI;AAC/F,MAAM8D,6BAA6B9D,cAAiD,IAAI;AACxF,MAAM+D,mCAAmC/D,cAAoD,IAAI;AA0HjG,MAAa8G,qBAAqB9G,cAA8C,IAAI;;;;AAKpF,SAAgB+G,YAAYC,OAAsC;CAChE,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