@proyecto-viviana/solidaria 0.3.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (743) hide show
  1. package/dist/_chunk/DragManager.js +627 -0
  2. package/dist/_chunk/DragManager.js.map +1 -0
  3. package/dist/_chunk/DragManager.jsx +627 -0
  4. package/dist/_chunk/DragManager.jsx.map +1 -0
  5. package/dist/_chunk/FocusScope.js +400 -0
  6. package/dist/_chunk/FocusScope.js.map +1 -0
  7. package/dist/_chunk/FocusScope.jsx +375 -0
  8. package/dist/_chunk/FocusScope.jsx.map +1 -0
  9. package/dist/_chunk/actiongroup.js +141 -0
  10. package/dist/_chunk/actiongroup.js.map +1 -0
  11. package/dist/_chunk/actiongroup.jsx +141 -0
  12. package/dist/_chunk/actiongroup.jsx.map +1 -0
  13. package/dist/_chunk/announce.js +207 -0
  14. package/dist/_chunk/announce.js.map +1 -0
  15. package/dist/_chunk/announce.jsx +207 -0
  16. package/dist/_chunk/announce.jsx.map +1 -0
  17. package/dist/_chunk/ariaHideOutside.js +122 -0
  18. package/dist/_chunk/ariaHideOutside.js.map +1 -0
  19. package/dist/_chunk/ariaHideOutside.jsx +122 -0
  20. package/dist/_chunk/ariaHideOutside.jsx.map +1 -0
  21. package/dist/_chunk/autocomplete.js +244 -0
  22. package/dist/_chunk/autocomplete.js.map +1 -0
  23. package/dist/_chunk/autocomplete.jsx +244 -0
  24. package/dist/_chunk/autocomplete.jsx.map +1 -0
  25. package/dist/_chunk/breadcrumbs.js +121 -0
  26. package/dist/_chunk/breadcrumbs.js.map +1 -0
  27. package/dist/_chunk/breadcrumbs.jsx +121 -0
  28. package/dist/_chunk/breadcrumbs.jsx.map +1 -0
  29. package/dist/_chunk/button.js +275 -0
  30. package/dist/_chunk/button.js.map +1 -0
  31. package/dist/_chunk/button.jsx +275 -0
  32. package/dist/_chunk/button.jsx.map +1 -0
  33. package/dist/_chunk/calendar.js +1037 -0
  34. package/dist/_chunk/calendar.js.map +1 -0
  35. package/dist/_chunk/calendar.jsx +1037 -0
  36. package/dist/_chunk/calendar.jsx.map +1 -0
  37. package/dist/_chunk/checkbox.js +235 -0
  38. package/dist/_chunk/checkbox.js.map +1 -0
  39. package/dist/_chunk/checkbox.jsx +235 -0
  40. package/dist/_chunk/checkbox.jsx.map +1 -0
  41. package/dist/_chunk/color.js +1458 -0
  42. package/dist/_chunk/color.js.map +1 -0
  43. package/dist/_chunk/color.jsx +1458 -0
  44. package/dist/_chunk/color.jsx.map +1 -0
  45. package/dist/_chunk/combobox.js +1062 -0
  46. package/dist/_chunk/combobox.js.map +1 -0
  47. package/dist/_chunk/combobox.jsx +1062 -0
  48. package/dist/_chunk/combobox.jsx.map +1 -0
  49. package/dist/_chunk/constants.js +19 -0
  50. package/dist/_chunk/constants.js.map +1 -0
  51. package/dist/_chunk/constants.jsx +19 -0
  52. package/dist/_chunk/constants.jsx.map +1 -0
  53. package/dist/_chunk/createCollator.js +61 -0
  54. package/dist/_chunk/createCollator.js.map +1 -0
  55. package/dist/_chunk/createCollator.jsx +61 -0
  56. package/dist/_chunk/createCollator.jsx.map +1 -0
  57. package/dist/_chunk/createCollectionRowInteraction.js +133 -0
  58. package/dist/_chunk/createCollectionRowInteraction.js.map +1 -0
  59. package/dist/_chunk/createCollectionRowInteraction.jsx +133 -0
  60. package/dist/_chunk/createCollectionRowInteraction.jsx.map +1 -0
  61. package/dist/_chunk/createField.js +55 -0
  62. package/dist/_chunk/createField.js.map +1 -0
  63. package/dist/_chunk/createField.jsx +55 -0
  64. package/dist/_chunk/createField.jsx.map +1 -0
  65. package/dist/_chunk/createFocus.js +105 -0
  66. package/dist/_chunk/createFocus.js.map +1 -0
  67. package/dist/_chunk/createFocus.jsx +105 -0
  68. package/dist/_chunk/createFocus.jsx.map +1 -0
  69. package/dist/_chunk/createFocusRing.js +54 -0
  70. package/dist/_chunk/createFocusRing.js.map +1 -0
  71. package/dist/_chunk/createFocusRing.jsx +54 -0
  72. package/dist/_chunk/createFocusRing.jsx.map +1 -0
  73. package/dist/_chunk/createFocusWithin.js +120 -0
  74. package/dist/_chunk/createFocusWithin.js.map +1 -0
  75. package/dist/_chunk/createFocusWithin.jsx +120 -0
  76. package/dist/_chunk/createFocusWithin.jsx.map +1 -0
  77. package/dist/_chunk/createFocusable.js +131 -0
  78. package/dist/_chunk/createFocusable.js.map +1 -0
  79. package/dist/_chunk/createFocusable.jsx +131 -0
  80. package/dist/_chunk/createFocusable.jsx.map +1 -0
  81. package/dist/_chunk/createFormReset.js +39 -0
  82. package/dist/_chunk/createFormReset.js.map +1 -0
  83. package/dist/_chunk/createFormReset.jsx +39 -0
  84. package/dist/_chunk/createFormReset.jsx.map +1 -0
  85. package/dist/_chunk/createFormValidation.js +135 -0
  86. package/dist/_chunk/createFormValidation.js.map +1 -0
  87. package/dist/_chunk/createFormValidation.jsx +135 -0
  88. package/dist/_chunk/createFormValidation.jsx.map +1 -0
  89. package/dist/_chunk/createHover.js +131 -0
  90. package/dist/_chunk/createHover.js.map +1 -0
  91. package/dist/_chunk/createHover.jsx +131 -0
  92. package/dist/_chunk/createHover.jsx.map +1 -0
  93. package/dist/_chunk/createInteractionModality.js +268 -0
  94. package/dist/_chunk/createInteractionModality.js.map +1 -0
  95. package/dist/_chunk/createInteractionModality.jsx +268 -0
  96. package/dist/_chunk/createInteractionModality.jsx.map +1 -0
  97. package/dist/_chunk/createLabel.js +47 -0
  98. package/dist/_chunk/createLabel.js.map +1 -0
  99. package/dist/_chunk/createLabel.jsx +47 -0
  100. package/dist/_chunk/createLabel.jsx.map +1 -0
  101. package/dist/_chunk/createLabels.js +32 -0
  102. package/dist/_chunk/createLabels.js.map +1 -0
  103. package/dist/_chunk/createLabels.jsx +32 -0
  104. package/dist/_chunk/createLabels.jsx.map +1 -0
  105. package/dist/_chunk/createLandmark.js +198 -0
  106. package/dist/_chunk/createLandmark.js.map +1 -0
  107. package/dist/_chunk/createLandmark.jsx +198 -0
  108. package/dist/_chunk/createLandmark.jsx.map +1 -0
  109. package/dist/_chunk/createOverlay.js +327 -0
  110. package/dist/_chunk/createOverlay.js.map +1 -0
  111. package/dist/_chunk/createOverlay.jsx +327 -0
  112. package/dist/_chunk/createOverlay.jsx.map +1 -0
  113. package/dist/_chunk/createPress.js +526 -0
  114. package/dist/_chunk/createPress.js.map +1 -0
  115. package/dist/_chunk/createPress.jsx +526 -0
  116. package/dist/_chunk/createPress.jsx.map +1 -0
  117. package/dist/_chunk/createProgressBar.js +82 -0
  118. package/dist/_chunk/createProgressBar.js.map +1 -0
  119. package/dist/_chunk/createProgressBar.jsx +82 -0
  120. package/dist/_chunk/createProgressBar.jsx.map +1 -0
  121. package/dist/_chunk/createSelectableItem.js +302 -0
  122. package/dist/_chunk/createSelectableItem.js.map +1 -0
  123. package/dist/_chunk/createSelectableItem.jsx +302 -0
  124. package/dist/_chunk/createSelectableItem.jsx.map +1 -0
  125. package/dist/_chunk/createStringFormatter.js +61 -0
  126. package/dist/_chunk/createStringFormatter.js.map +1 -0
  127. package/dist/_chunk/createStringFormatter.jsx +61 -0
  128. package/dist/_chunk/createStringFormatter.jsx.map +1 -0
  129. package/dist/_chunk/createToggle.js +159 -0
  130. package/dist/_chunk/createToggle.js.map +1 -0
  131. package/dist/_chunk/createToggle.jsx +159 -0
  132. package/dist/_chunk/createToggle.jsx.map +1 -0
  133. package/dist/_chunk/createTypeSelect.js +125 -0
  134. package/dist/_chunk/createTypeSelect.js.map +1 -0
  135. package/dist/_chunk/createTypeSelect.jsx +125 -0
  136. package/dist/_chunk/createTypeSelect.jsx.map +1 -0
  137. package/dist/_chunk/datepicker.js +1706 -0
  138. package/dist/_chunk/datepicker.js.map +1 -0
  139. package/dist/_chunk/datepicker.jsx +1706 -0
  140. package/dist/_chunk/datepicker.jsx.map +1 -0
  141. package/dist/_chunk/dialog.js +62 -0
  142. package/dist/_chunk/dialog.js.map +1 -0
  143. package/dist/_chunk/dialog.jsx +62 -0
  144. package/dist/_chunk/dialog.jsx.map +1 -0
  145. package/dist/_chunk/disclosure.js +185 -0
  146. package/dist/_chunk/disclosure.js.map +1 -0
  147. package/dist/_chunk/disclosure.jsx +185 -0
  148. package/dist/_chunk/disclosure.jsx.map +1 -0
  149. package/dist/_chunk/dnd.js +2395 -0
  150. package/dist/_chunk/dnd.js.map +1 -0
  151. package/dist/_chunk/dnd.jsx +2395 -0
  152. package/dist/_chunk/dnd.jsx.map +1 -0
  153. package/dist/_chunk/env.js +87 -0
  154. package/dist/_chunk/env.js.map +1 -0
  155. package/dist/_chunk/env.jsx +87 -0
  156. package/dist/_chunk/env.jsx.map +1 -0
  157. package/dist/_chunk/filterDOMProps.js +82 -0
  158. package/dist/_chunk/filterDOMProps.js.map +1 -0
  159. package/dist/_chunk/filterDOMProps.jsx +82 -0
  160. package/dist/_chunk/filterDOMProps.jsx.map +1 -0
  161. package/dist/_chunk/focus.js +399 -0
  162. package/dist/_chunk/focus.js.map +1 -0
  163. package/dist/_chunk/focus.jsx +399 -0
  164. package/dist/_chunk/focus.jsx.map +1 -0
  165. package/dist/_chunk/focus2.js +631 -0
  166. package/dist/_chunk/focus2.js.map +1 -0
  167. package/dist/_chunk/focus2.jsx +631 -0
  168. package/dist/_chunk/focus2.jsx.map +1 -0
  169. package/dist/_chunk/grid.js +623 -0
  170. package/dist/_chunk/grid.js.map +1 -0
  171. package/dist/_chunk/grid.jsx +623 -0
  172. package/dist/_chunk/grid.jsx.map +1 -0
  173. package/dist/_chunk/gridlist.js +369 -0
  174. package/dist/_chunk/gridlist.js.map +1 -0
  175. package/dist/_chunk/gridlist.jsx +369 -0
  176. package/dist/_chunk/gridlist.jsx.map +1 -0
  177. package/dist/_chunk/i18n.js +199 -0
  178. package/dist/_chunk/i18n.js.map +1 -0
  179. package/dist/_chunk/i18n.jsx +199 -0
  180. package/dist/_chunk/i18n.jsx.map +1 -0
  181. package/dist/_chunk/interactions.js +331 -0
  182. package/dist/_chunk/interactions.js.map +1 -0
  183. package/dist/_chunk/interactions.jsx +325 -0
  184. package/dist/_chunk/interactions.jsx.map +1 -0
  185. package/dist/_chunk/link.js +97 -0
  186. package/dist/_chunk/link.js.map +1 -0
  187. package/dist/_chunk/link.jsx +97 -0
  188. package/dist/_chunk/link.jsx.map +1 -0
  189. package/dist/_chunk/listbox.js +356 -0
  190. package/dist/_chunk/listbox.js.map +1 -0
  191. package/dist/_chunk/listbox.jsx +356 -0
  192. package/dist/_chunk/listbox.jsx.map +1 -0
  193. package/dist/_chunk/locale.js +173 -0
  194. package/dist/_chunk/locale.js.map +1 -0
  195. package/dist/_chunk/locale.jsx +167 -0
  196. package/dist/_chunk/locale.jsx.map +1 -0
  197. package/dist/_chunk/menu.js +519 -0
  198. package/dist/_chunk/menu.js.map +1 -0
  199. package/dist/_chunk/menu.jsx +519 -0
  200. package/dist/_chunk/menu.jsx.map +1 -0
  201. package/dist/_chunk/meter.js +33 -0
  202. package/dist/_chunk/meter.js.map +1 -0
  203. package/dist/_chunk/meter.jsx +33 -0
  204. package/dist/_chunk/meter.jsx.map +1 -0
  205. package/dist/_chunk/numberfield.js +259 -0
  206. package/dist/_chunk/numberfield.js.map +1 -0
  207. package/dist/_chunk/numberfield.jsx +259 -0
  208. package/dist/_chunk/numberfield.jsx.map +1 -0
  209. package/dist/_chunk/overlays.js +186 -0
  210. package/dist/_chunk/overlays.js.map +1 -0
  211. package/dist/_chunk/overlays.jsx +162 -0
  212. package/dist/_chunk/overlays.jsx.map +1 -0
  213. package/dist/_chunk/popover.js +574 -0
  214. package/dist/_chunk/popover.js.map +1 -0
  215. package/dist/_chunk/popover.jsx +574 -0
  216. package/dist/_chunk/popover.jsx.map +1 -0
  217. package/dist/_chunk/radio.js +320 -0
  218. package/dist/_chunk/radio.js.map +1 -0
  219. package/dist/_chunk/radio.jsx +320 -0
  220. package/dist/_chunk/radio.jsx.map +1 -0
  221. package/dist/_chunk/reactivity.js +21 -0
  222. package/dist/_chunk/reactivity.js.map +1 -0
  223. package/dist/_chunk/reactivity.jsx +21 -0
  224. package/dist/_chunk/reactivity.jsx.map +1 -0
  225. package/dist/_chunk/searchfield.js +210 -0
  226. package/dist/_chunk/searchfield.js.map +1 -0
  227. package/dist/_chunk/searchfield.jsx +210 -0
  228. package/dist/_chunk/searchfield.jsx.map +1 -0
  229. package/dist/_chunk/select.js +406 -0
  230. package/dist/_chunk/select.js.map +1 -0
  231. package/dist/_chunk/select.jsx +397 -0
  232. package/dist/_chunk/select.jsx.map +1 -0
  233. package/dist/_chunk/selection.js +666 -0
  234. package/dist/_chunk/selection.js.map +1 -0
  235. package/dist/_chunk/selection.jsx +666 -0
  236. package/dist/_chunk/selection.jsx.map +1 -0
  237. package/dist/_chunk/separator.js +29 -0
  238. package/dist/_chunk/separator.js.map +1 -0
  239. package/dist/_chunk/separator.jsx +29 -0
  240. package/dist/_chunk/separator.jsx.map +1 -0
  241. package/dist/_chunk/slider.js +256 -0
  242. package/dist/_chunk/slider.js.map +1 -0
  243. package/dist/_chunk/slider.jsx +256 -0
  244. package/dist/_chunk/slider.jsx.map +1 -0
  245. package/dist/_chunk/spinbutton.js +153 -0
  246. package/dist/_chunk/spinbutton.js.map +1 -0
  247. package/dist/_chunk/spinbutton.jsx +153 -0
  248. package/dist/_chunk/spinbutton.jsx.map +1 -0
  249. package/dist/_chunk/steplist.js +66 -0
  250. package/dist/_chunk/steplist.js.map +1 -0
  251. package/dist/_chunk/steplist.jsx +66 -0
  252. package/dist/_chunk/steplist.jsx.map +1 -0
  253. package/dist/_chunk/switch.js +34 -0
  254. package/dist/_chunk/switch.js.map +1 -0
  255. package/dist/_chunk/switch.jsx +34 -0
  256. package/dist/_chunk/switch.jsx.map +1 -0
  257. package/dist/_chunk/table.js +1088 -0
  258. package/dist/_chunk/table.js.map +1 -0
  259. package/dist/_chunk/table.jsx +1088 -0
  260. package/dist/_chunk/table.jsx.map +1 -0
  261. package/dist/_chunk/tabs.js +263 -0
  262. package/dist/_chunk/tabs.js.map +1 -0
  263. package/dist/_chunk/tabs.jsx +263 -0
  264. package/dist/_chunk/tabs.jsx.map +1 -0
  265. package/dist/_chunk/tag.js +322 -0
  266. package/dist/_chunk/tag.js.map +1 -0
  267. package/dist/_chunk/tag.jsx +322 -0
  268. package/dist/_chunk/tag.jsx.map +1 -0
  269. package/dist/_chunk/textfield.js +110 -0
  270. package/dist/_chunk/textfield.js.map +1 -0
  271. package/dist/_chunk/textfield.jsx +110 -0
  272. package/dist/_chunk/textfield.jsx.map +1 -0
  273. package/dist/_chunk/toast.js +250 -0
  274. package/dist/_chunk/toast.js.map +1 -0
  275. package/dist/_chunk/toast.jsx +250 -0
  276. package/dist/_chunk/toast.jsx.map +1 -0
  277. package/dist/_chunk/toolbar.js +226 -0
  278. package/dist/_chunk/toolbar.js.map +1 -0
  279. package/dist/_chunk/toolbar.jsx +226 -0
  280. package/dist/_chunk/toolbar.jsx.map +1 -0
  281. package/dist/_chunk/tooltip.js +185 -0
  282. package/dist/_chunk/tooltip.js.map +1 -0
  283. package/dist/_chunk/tooltip.jsx +185 -0
  284. package/dist/_chunk/tooltip.jsx.map +1 -0
  285. package/dist/_chunk/tree.js +452 -0
  286. package/dist/_chunk/tree.js.map +1 -0
  287. package/dist/_chunk/tree.jsx +452 -0
  288. package/dist/_chunk/tree.jsx.map +1 -0
  289. package/dist/_chunk/utils.js +705 -0
  290. package/dist/_chunk/utils.js.map +1 -0
  291. package/dist/_chunk/utils.jsx +705 -0
  292. package/dist/_chunk/utils.jsx.map +1 -0
  293. package/dist/_chunk/visually-hidden.js +93 -0
  294. package/dist/_chunk/visually-hidden.js.map +1 -0
  295. package/dist/_chunk/visually-hidden.jsx +93 -0
  296. package/dist/_chunk/visually-hidden.jsx.map +1 -0
  297. package/dist/actiongroup/createActionGroup.d.ts.map +1 -1
  298. package/dist/actiongroup/index.js +2 -0
  299. package/dist/actiongroup/index.jsx +2 -0
  300. package/dist/autocomplete/createAutocomplete.d.ts +12 -7
  301. package/dist/autocomplete/createAutocomplete.d.ts.map +1 -1
  302. package/dist/autocomplete/index.js +2 -0
  303. package/dist/autocomplete/index.jsx +2 -0
  304. package/dist/breadcrumbs/createBreadcrumbs.d.ts.map +1 -1
  305. package/dist/breadcrumbs/index.js +2 -0
  306. package/dist/breadcrumbs/index.jsx +2 -0
  307. package/dist/button/createToggleButtonGroup.d.ts.map +1 -1
  308. package/dist/button/index.js +2 -0
  309. package/dist/button/index.jsx +2 -0
  310. package/dist/calendar/createCalendar.d.ts.map +1 -1
  311. package/dist/calendar/createCalendarCell.d.ts.map +1 -1
  312. package/dist/calendar/createCalendarGrid.d.ts.map +1 -1
  313. package/dist/calendar/createCalendarMonthPicker.d.ts +41 -0
  314. package/dist/calendar/createCalendarMonthPicker.d.ts.map +1 -0
  315. package/dist/calendar/createCalendarYearPicker.d.ts +49 -0
  316. package/dist/calendar/createCalendarYearPicker.d.ts.map +1 -0
  317. package/dist/calendar/createRangeCalendar.d.ts.map +1 -1
  318. package/dist/calendar/createRangeCalendarCell.d.ts.map +1 -1
  319. package/dist/calendar/index.d.ts +2 -0
  320. package/dist/calendar/index.d.ts.map +1 -1
  321. package/dist/calendar/index.js +2 -0
  322. package/dist/calendar/index.jsx +2 -0
  323. package/dist/calendar/intl/index.d.ts +1 -1
  324. package/dist/calendar/intl/index.d.ts.map +1 -1
  325. package/dist/calendar/utils.d.ts +4 -0
  326. package/dist/calendar/utils.d.ts.map +1 -1
  327. package/dist/checkbox/createCheckbox.d.ts +4 -0
  328. package/dist/checkbox/createCheckbox.d.ts.map +1 -1
  329. package/dist/checkbox/createCheckboxGroupItem.d.ts.map +1 -1
  330. package/dist/checkbox/index.js +2 -0
  331. package/dist/checkbox/index.jsx +2 -0
  332. package/dist/collections/index.js +160 -0
  333. package/dist/collections/index.js.map +1 -0
  334. package/dist/collections/index.jsx +160 -0
  335. package/dist/collections/index.jsx.map +1 -0
  336. package/dist/color/createColorArea.d.ts.map +1 -1
  337. package/dist/color/createColorField.d.ts.map +1 -1
  338. package/dist/color/createColorSlider.d.ts.map +1 -1
  339. package/dist/color/createColorSwatch.d.ts.map +1 -1
  340. package/dist/color/createColorWheel.d.ts.map +1 -1
  341. package/dist/color/index.js +2 -0
  342. package/dist/color/index.jsx +2 -0
  343. package/dist/color/intl/index.d.ts +30 -0
  344. package/dist/color/intl/index.d.ts.map +1 -0
  345. package/dist/combobox/createComboBox.d.ts.map +1 -1
  346. package/dist/combobox/index.js +2 -0
  347. package/dist/combobox/index.jsx +2 -0
  348. package/dist/combobox/intl/generated-locales.d.ts +16 -0
  349. package/dist/combobox/intl/generated-locales.d.ts.map +1 -0
  350. package/dist/combobox/intl/index.d.ts +2 -2
  351. package/dist/combobox/intl/index.d.ts.map +1 -1
  352. package/dist/datepicker/createDateField.d.ts +45 -23
  353. package/dist/datepicker/createDateField.d.ts.map +1 -1
  354. package/dist/datepicker/createDatePicker.d.ts +34 -6
  355. package/dist/datepicker/createDatePicker.d.ts.map +1 -1
  356. package/dist/datepicker/createDatePickerGroup.d.ts +13 -13
  357. package/dist/datepicker/createDatePickerGroup.d.ts.map +1 -1
  358. package/dist/datepicker/createDateRangePicker.d.ts +55 -7
  359. package/dist/datepicker/createDateRangePicker.d.ts.map +1 -1
  360. package/dist/datepicker/createDateSegment.d.ts +6 -15
  361. package/dist/datepicker/createDateSegment.d.ts.map +1 -1
  362. package/dist/datepicker/createDisplayNames.d.ts +17 -0
  363. package/dist/datepicker/createDisplayNames.d.ts.map +1 -0
  364. package/dist/datepicker/createTimeField.d.ts +12 -49
  365. package/dist/datepicker/createTimeField.d.ts.map +1 -1
  366. package/dist/datepicker/index.d.ts +3 -3
  367. package/dist/datepicker/index.d.ts.map +1 -1
  368. package/dist/datepicker/index.js +2 -0
  369. package/dist/datepicker/index.jsx +2 -0
  370. package/dist/datepicker/intl.d.ts +12 -0
  371. package/dist/datepicker/intl.d.ts.map +1 -0
  372. package/dist/dialog/index.js +2 -0
  373. package/dist/dialog/index.jsx +2 -0
  374. package/dist/disclosure/index.js +2 -0
  375. package/dist/disclosure/index.jsx +2 -0
  376. package/dist/dnd/DragManager.d.ts +86 -0
  377. package/dist/dnd/DragManager.d.ts.map +1 -0
  378. package/dist/dnd/DropTargetKeyboardNavigation.d.ts +42 -0
  379. package/dist/dnd/DropTargetKeyboardNavigation.d.ts.map +1 -0
  380. package/dist/dnd/createDrag.d.ts.map +1 -1
  381. package/dist/dnd/createDraggableCollection.d.ts.map +1 -1
  382. package/dist/dnd/createDraggableItem.d.ts +12 -7
  383. package/dist/dnd/createDraggableItem.d.ts.map +1 -1
  384. package/dist/dnd/createDroppableCollection.d.ts +7 -15
  385. package/dist/dnd/createDroppableCollection.d.ts.map +1 -1
  386. package/dist/dnd/index.d.ts +5 -1
  387. package/dist/dnd/index.d.ts.map +1 -1
  388. package/dist/dnd/index.js +3 -0
  389. package/dist/dnd/index.jsx +3 -0
  390. package/dist/dnd/intl/index.d.ts +39 -0
  391. package/dist/dnd/intl/index.d.ts.map +1 -0
  392. package/dist/dnd/utils.d.ts +7 -2
  393. package/dist/dnd/utils.d.ts.map +1 -1
  394. package/dist/focus/FocusScope.d.ts +7 -0
  395. package/dist/focus/FocusScope.d.ts.map +1 -1
  396. package/dist/focus/index.d.ts +2 -1
  397. package/dist/focus/index.d.ts.map +1 -1
  398. package/dist/focus/index.js +3 -0
  399. package/dist/focus/index.jsx +3 -0
  400. package/dist/focus/virtualFocus.d.ts +26 -0
  401. package/dist/focus/virtualFocus.d.ts.map +1 -0
  402. package/dist/form/createFormValidation.d.ts.map +1 -1
  403. package/dist/form/index.js +3 -0
  404. package/dist/form/index.jsx +3 -0
  405. package/dist/grid/index.js +2 -0
  406. package/dist/grid/index.jsx +2 -0
  407. package/dist/gridlist/createGridList.d.ts +7 -1
  408. package/dist/gridlist/createGridList.d.ts.map +1 -1
  409. package/dist/gridlist/createGridListItem.d.ts +1 -1
  410. package/dist/gridlist/createGridListItem.d.ts.map +1 -1
  411. package/dist/gridlist/createGridListSection.d.ts +15 -0
  412. package/dist/gridlist/createGridListSection.d.ts.map +1 -0
  413. package/dist/gridlist/index.d.ts +2 -1
  414. package/dist/gridlist/index.d.ts.map +1 -1
  415. package/dist/gridlist/index.js +2 -0
  416. package/dist/gridlist/index.jsx +2 -0
  417. package/dist/gridlist/types.d.ts +50 -0
  418. package/dist/gridlist/types.d.ts.map +1 -1
  419. package/dist/i18n/index.js +5 -0
  420. package/dist/i18n/index.jsx +5 -0
  421. package/dist/index.d.ts +10 -6
  422. package/dist/index.d.ts.map +1 -1
  423. package/dist/index.js +77 -18311
  424. package/dist/index.jsx +77 -18242
  425. package/dist/interactions/FocusableProvider.d.ts.map +1 -1
  426. package/dist/interactions/PressEvent.d.ts +11 -0
  427. package/dist/interactions/PressEvent.d.ts.map +1 -1
  428. package/dist/interactions/createFocus.d.ts.map +1 -1
  429. package/dist/interactions/createFocusWithin.d.ts.map +1 -1
  430. package/dist/interactions/createInteractionModality.d.ts +0 -1
  431. package/dist/interactions/createInteractionModality.d.ts.map +1 -1
  432. package/dist/interactions/createKeyboard.d.ts.map +1 -1
  433. package/dist/interactions/createPress.d.ts.map +1 -1
  434. package/dist/interactions/index.js +9 -0
  435. package/dist/interactions/index.jsx +9 -0
  436. package/dist/label/createLabels.d.ts.map +1 -1
  437. package/dist/label/index.js +4 -0
  438. package/dist/label/index.jsx +4 -0
  439. package/dist/landmark/index.js +2 -0
  440. package/dist/landmark/index.jsx +2 -0
  441. package/dist/link/index.js +2 -0
  442. package/dist/link/index.jsx +2 -0
  443. package/dist/listbox/createListBox.d.ts +37 -0
  444. package/dist/listbox/createListBox.d.ts.map +1 -1
  445. package/dist/listbox/createOption.d.ts +7 -1
  446. package/dist/listbox/createOption.d.ts.map +1 -1
  447. package/dist/listbox/index.js +2 -0
  448. package/dist/listbox/index.jsx +2 -0
  449. package/dist/live-announcer/index.js +2 -0
  450. package/dist/live-announcer/index.jsx +2 -0
  451. package/dist/menu/createMenu.d.ts +7 -4
  452. package/dist/menu/createMenu.d.ts.map +1 -1
  453. package/dist/menu/createMenuItem.d.ts +9 -1
  454. package/dist/menu/createMenuItem.d.ts.map +1 -1
  455. package/dist/menu/index.js +2 -0
  456. package/dist/menu/index.jsx +2 -0
  457. package/dist/meter/index.js +2 -0
  458. package/dist/meter/index.jsx +2 -0
  459. package/dist/numberfield/createNumberField.d.ts.map +1 -1
  460. package/dist/numberfield/index.js +2 -0
  461. package/dist/numberfield/index.jsx +2 -0
  462. package/dist/overlays/index.js +4 -0
  463. package/dist/overlays/index.jsx +4 -0
  464. package/dist/popover/calculatePosition.d.ts +2 -0
  465. package/dist/popover/calculatePosition.d.ts.map +1 -1
  466. package/dist/popover/createOverlayPosition.d.ts +8 -0
  467. package/dist/popover/createOverlayPosition.d.ts.map +1 -1
  468. package/dist/popover/index.js +2 -0
  469. package/dist/popover/index.jsx +2 -0
  470. package/dist/progress/index.js +2 -0
  471. package/dist/progress/index.jsx +2 -0
  472. package/dist/radio/createRadio.d.ts +2 -0
  473. package/dist/radio/createRadio.d.ts.map +1 -1
  474. package/dist/radio/index.js +2 -0
  475. package/dist/radio/index.jsx +2 -0
  476. package/dist/searchfield/index.js +2 -0
  477. package/dist/searchfield/index.jsx +2 -0
  478. package/dist/select/createSelect.d.ts +2 -0
  479. package/dist/select/createSelect.d.ts.map +1 -1
  480. package/dist/select/index.js +2 -0
  481. package/dist/select/index.jsx +2 -0
  482. package/dist/selection/DOMLayoutDelegate.d.ts +58 -0
  483. package/dist/selection/DOMLayoutDelegate.d.ts.map +1 -0
  484. package/dist/selection/ListKeyboardDelegate.d.ts +95 -0
  485. package/dist/selection/ListKeyboardDelegate.d.ts.map +1 -0
  486. package/dist/selection/constants.d.ts +15 -0
  487. package/dist/selection/constants.d.ts.map +1 -0
  488. package/dist/selection/createCollectionRowInteraction.d.ts +13 -0
  489. package/dist/selection/createCollectionRowInteraction.d.ts.map +1 -0
  490. package/dist/selection/createScrollIntoViewOnFocus.d.ts +31 -0
  491. package/dist/selection/createScrollIntoViewOnFocus.d.ts.map +1 -0
  492. package/dist/selection/createSelectableCollection.d.ts +69 -0
  493. package/dist/selection/createSelectableCollection.d.ts.map +1 -0
  494. package/dist/selection/createSelectableItem.d.ts +154 -0
  495. package/dist/selection/createSelectableItem.d.ts.map +1 -0
  496. package/dist/selection/createSelectableList.d.ts +43 -0
  497. package/dist/selection/createSelectableList.d.ts.map +1 -0
  498. package/dist/selection/createTypeSelect.d.ts.map +1 -1
  499. package/dist/selection/index.d.ts +9 -0
  500. package/dist/selection/index.d.ts.map +1 -1
  501. package/dist/selection/index.js +5 -0
  502. package/dist/selection/index.jsx +5 -0
  503. package/dist/selection/selectItem.d.ts +29 -0
  504. package/dist/selection/selectItem.d.ts.map +1 -0
  505. package/dist/selection/utils.d.ts +40 -0
  506. package/dist/selection/utils.d.ts.map +1 -0
  507. package/dist/separator/index.js +2 -0
  508. package/dist/separator/index.jsx +2 -0
  509. package/dist/slider/createSlider.d.ts.map +1 -1
  510. package/dist/slider/index.js +2 -0
  511. package/dist/slider/index.jsx +2 -0
  512. package/dist/spinbutton/createSpinButton.d.ts +41 -0
  513. package/dist/spinbutton/createSpinButton.d.ts.map +1 -0
  514. package/dist/spinbutton/index.d.ts +3 -0
  515. package/dist/spinbutton/index.d.ts.map +1 -0
  516. package/dist/spinbutton/index.js +2 -0
  517. package/dist/spinbutton/index.jsx +2 -0
  518. package/dist/spinbutton/intl.d.ts +5 -0
  519. package/dist/spinbutton/intl.d.ts.map +1 -0
  520. package/dist/ssr/index.d.ts +17 -0
  521. package/dist/ssr/index.d.ts.map +1 -1
  522. package/dist/ssr/index.js +299 -0
  523. package/dist/ssr/index.js.map +1 -0
  524. package/dist/ssr/index.jsx +292 -0
  525. package/dist/ssr/index.jsx.map +1 -0
  526. package/dist/steplist/index.js +2 -0
  527. package/dist/steplist/index.jsx +2 -0
  528. package/dist/switch/createSwitch.d.ts +4 -0
  529. package/dist/switch/createSwitch.d.ts.map +1 -1
  530. package/dist/switch/index.js +2 -0
  531. package/dist/switch/index.jsx +2 -0
  532. package/dist/table/createTable.d.ts.map +1 -1
  533. package/dist/table/createTableColumnHeader.d.ts.map +1 -1
  534. package/dist/table/createTableRow.d.ts +1 -1
  535. package/dist/table/createTableRow.d.ts.map +1 -1
  536. package/dist/table/createTableSelectAllCheckbox.d.ts.map +1 -1
  537. package/dist/table/createTableSelectionCheckbox.d.ts.map +1 -1
  538. package/dist/table/index.js +2 -0
  539. package/dist/table/index.jsx +2 -0
  540. package/dist/table/types.d.ts +35 -1
  541. package/dist/table/types.d.ts.map +1 -1
  542. package/dist/table/utils.d.ts +15 -0
  543. package/dist/table/utils.d.ts.map +1 -0
  544. package/dist/tabs/createTabs.d.ts +5 -3
  545. package/dist/tabs/createTabs.d.ts.map +1 -1
  546. package/dist/tabs/index.js +2 -0
  547. package/dist/tabs/index.jsx +2 -0
  548. package/dist/tag/createTag.d.ts +2 -0
  549. package/dist/tag/createTag.d.ts.map +1 -1
  550. package/dist/tag/createTagGroup.d.ts +7 -0
  551. package/dist/tag/createTagGroup.d.ts.map +1 -1
  552. package/dist/tag/index.js +2 -0
  553. package/dist/tag/index.jsx +2 -0
  554. package/dist/textfield/index.js +2 -0
  555. package/dist/textfield/index.jsx +2 -0
  556. package/dist/toast/createToast.d.ts.map +1 -1
  557. package/dist/toast/index.js +2 -0
  558. package/dist/toast/index.jsx +2 -0
  559. package/dist/toggle/createToggle.d.ts +4 -0
  560. package/dist/toggle/createToggle.d.ts.map +1 -1
  561. package/dist/toggle/index.js +3 -0
  562. package/dist/toggle/index.jsx +3 -0
  563. package/dist/toolbar/createToolbar.d.ts +1 -1
  564. package/dist/toolbar/createToolbar.d.ts.map +1 -1
  565. package/dist/toolbar/index.js +2 -0
  566. package/dist/toolbar/index.jsx +2 -0
  567. package/dist/tooltip/index.js +2 -0
  568. package/dist/tooltip/index.jsx +2 -0
  569. package/dist/tree/createTree.d.ts +5 -1
  570. package/dist/tree/createTree.d.ts.map +1 -1
  571. package/dist/tree/createTreeItem.d.ts +1 -1
  572. package/dist/tree/createTreeItem.d.ts.map +1 -1
  573. package/dist/tree/createTreeSelectionCheckbox.d.ts.map +1 -1
  574. package/dist/tree/index.js +2 -0
  575. package/dist/tree/index.jsx +2 -0
  576. package/dist/tree/types.d.ts +10 -0
  577. package/dist/tree/types.d.ts.map +1 -1
  578. package/dist/utils/animation.d.ts +60 -0
  579. package/dist/utils/animation.d.ts.map +1 -0
  580. package/dist/utils/dom.d.ts +49 -2
  581. package/dist/utils/dom.d.ts.map +1 -1
  582. package/dist/utils/index.d.ts +4 -1
  583. package/dist/utils/index.d.ts.map +1 -1
  584. package/dist/utils/index.js +6 -0
  585. package/dist/utils/index.jsx +6 -0
  586. package/dist/utils/keyboard.d.ts +17 -0
  587. package/dist/utils/keyboard.d.ts.map +1 -0
  588. package/dist/utils/mergeProps.d.ts.map +1 -1
  589. package/dist/utils/scrollIntoView.d.ts +30 -0
  590. package/dist/utils/scrollIntoView.d.ts.map +1 -0
  591. package/dist/visually-hidden/index.js +2 -0
  592. package/dist/visually-hidden/index.jsx +2 -0
  593. package/package.json +304 -3
  594. package/src/actiongroup/createActionGroup.ts +26 -109
  595. package/src/autocomplete/createAutocomplete.ts +202 -35
  596. package/src/breadcrumbs/createBreadcrumbs.ts +12 -4
  597. package/src/button/createToggleButtonGroup.ts +19 -14
  598. package/src/calendar/createCalendar.ts +5 -4
  599. package/src/calendar/createCalendarCell.ts +36 -5
  600. package/src/calendar/createCalendarGrid.ts +47 -12
  601. package/src/calendar/createCalendarMonthPicker.ts +105 -0
  602. package/src/calendar/createCalendarYearPicker.ts +144 -0
  603. package/src/calendar/createRangeCalendar.ts +27 -15
  604. package/src/calendar/createRangeCalendarCell.ts +17 -3
  605. package/src/calendar/index.ts +17 -0
  606. package/src/calendar/intl/index.ts +8 -0
  607. package/src/calendar/utils.ts +4 -0
  608. package/src/checkbox/createCheckbox.ts +10 -0
  609. package/src/checkbox/createCheckboxGroupItem.ts +12 -16
  610. package/src/color/createColorArea.ts +17 -10
  611. package/src/color/createColorField.ts +8 -1
  612. package/src/color/createColorSlider.ts +1 -2
  613. package/src/color/createColorSwatch.ts +4 -2
  614. package/src/color/createColorWheel.ts +0 -6
  615. package/src/color/intl/index.ts +316 -0
  616. package/src/combobox/createComboBox.ts +35 -4
  617. package/src/combobox/intl/generated-locales.ts +635 -0
  618. package/src/combobox/intl/index.ts +8 -2
  619. package/src/datepicker/createDateField.ts +228 -213
  620. package/src/datepicker/createDatePicker.ts +157 -146
  621. package/src/datepicker/createDatePickerGroup.ts +88 -82
  622. package/src/datepicker/createDateRangePicker.ts +230 -179
  623. package/src/datepicker/createDateSegment.ts +386 -384
  624. package/src/datepicker/createDisplayNames.ts +45 -0
  625. package/src/datepicker/createTimeField.ts +36 -129
  626. package/src/datepicker/index.ts +13 -14
  627. package/src/datepicker/intl.ts +633 -0
  628. package/src/dnd/DragManager.ts +693 -0
  629. package/src/dnd/DropTargetKeyboardNavigation.ts +337 -0
  630. package/src/dnd/createDrag.ts +31 -5
  631. package/src/dnd/createDraggableCollection.ts +33 -15
  632. package/src/dnd/createDraggableItem.ts +92 -5
  633. package/src/dnd/createDroppableCollection.ts +488 -371
  634. package/src/dnd/index.ts +11 -0
  635. package/src/dnd/intl/ar-AE.json +29 -0
  636. package/src/dnd/intl/bg-BG.json +29 -0
  637. package/src/dnd/intl/cs-CZ.json +29 -0
  638. package/src/dnd/intl/da-DK.json +29 -0
  639. package/src/dnd/intl/de-DE.json +29 -0
  640. package/src/dnd/intl/el-GR.json +29 -0
  641. package/src/dnd/intl/en-US.json +29 -0
  642. package/src/dnd/intl/es-ES.json +29 -0
  643. package/src/dnd/intl/et-EE.json +29 -0
  644. package/src/dnd/intl/fi-FI.json +29 -0
  645. package/src/dnd/intl/fr-FR.json +29 -0
  646. package/src/dnd/intl/he-IL.json +29 -0
  647. package/src/dnd/intl/hr-HR.json +29 -0
  648. package/src/dnd/intl/hu-HU.json +29 -0
  649. package/src/dnd/intl/index.ts +139 -0
  650. package/src/dnd/intl/it-IT.json +29 -0
  651. package/src/dnd/intl/ja-JP.json +29 -0
  652. package/src/dnd/intl/ko-KR.json +29 -0
  653. package/src/dnd/intl/lt-LT.json +29 -0
  654. package/src/dnd/intl/lv-LV.json +29 -0
  655. package/src/dnd/intl/nb-NO.json +29 -0
  656. package/src/dnd/intl/nl-NL.json +29 -0
  657. package/src/dnd/intl/pl-PL.json +29 -0
  658. package/src/dnd/intl/pt-BR.json +29 -0
  659. package/src/dnd/intl/pt-PT.json +29 -0
  660. package/src/dnd/intl/ro-RO.json +29 -0
  661. package/src/dnd/intl/ru-RU.json +29 -0
  662. package/src/dnd/intl/sk-SK.json +29 -0
  663. package/src/dnd/intl/sl-SI.json +29 -0
  664. package/src/dnd/intl/sr-SP.json +29 -0
  665. package/src/dnd/intl/sv-SE.json +29 -0
  666. package/src/dnd/intl/tr-TR.json +29 -0
  667. package/src/dnd/intl/uk-UA.json +29 -0
  668. package/src/dnd/intl/zh-CN.json +29 -0
  669. package/src/dnd/intl/zh-TW.json +29 -0
  670. package/src/dnd/utils.ts +63 -3
  671. package/src/focus/FocusScope.tsx +266 -24
  672. package/src/focus/index.ts +8 -0
  673. package/src/focus/virtualFocus.ts +55 -0
  674. package/src/form/createFormValidation.ts +8 -1
  675. package/src/gridlist/createGridList.ts +187 -48
  676. package/src/gridlist/createGridListItem.ts +87 -155
  677. package/src/gridlist/createGridListSection.ts +54 -0
  678. package/src/gridlist/index.ts +3 -0
  679. package/src/gridlist/types.ts +47 -0
  680. package/src/index.ts +51 -3
  681. package/src/interactions/FocusableProvider.tsx +11 -6
  682. package/src/interactions/PressEvent.ts +14 -0
  683. package/src/interactions/createFocus.ts +26 -21
  684. package/src/interactions/createFocusWithin.ts +23 -24
  685. package/src/interactions/createInteractionModality.ts +26 -15
  686. package/src/interactions/createKeyboard.ts +10 -0
  687. package/src/interactions/createPress.ts +29 -6
  688. package/src/label/createLabels.ts +7 -4
  689. package/src/listbox/createListBox.ts +203 -10
  690. package/src/listbox/createOption.ts +84 -74
  691. package/src/menu/createMenu.ts +93 -16
  692. package/src/menu/createMenuItem.ts +253 -41
  693. package/src/numberfield/createNumberField.ts +82 -14
  694. package/src/popover/calculatePosition.ts +19 -7
  695. package/src/popover/createOverlayPosition.ts +9 -0
  696. package/src/radio/createRadio.ts +19 -2
  697. package/src/select/createSelect.ts +41 -4
  698. package/src/selection/DOMLayoutDelegate.ts +102 -0
  699. package/src/selection/ListKeyboardDelegate.ts +398 -0
  700. package/src/selection/constants.ts +16 -0
  701. package/src/selection/createCollectionRowInteraction.ts +209 -0
  702. package/src/selection/createScrollIntoViewOnFocus.ts +65 -0
  703. package/src/selection/createSelectableCollection.ts +645 -0
  704. package/src/selection/createSelectableItem.ts +512 -0
  705. package/src/selection/createSelectableList.ts +93 -0
  706. package/src/selection/createTypeSelect.ts +112 -51
  707. package/src/selection/index.ts +31 -0
  708. package/src/selection/selectItem.ts +80 -0
  709. package/src/selection/utils.ts +82 -0
  710. package/src/slider/createSlider.ts +48 -1
  711. package/src/spinbutton/createSpinButton.ts +163 -0
  712. package/src/spinbutton/index.ts +10 -0
  713. package/src/spinbutton/intl.ts +115 -0
  714. package/src/ssr/index.tsx +31 -0
  715. package/src/switch/createSwitch.ts +10 -0
  716. package/src/table/createTable.ts +82 -27
  717. package/src/table/createTableColumnHeader.ts +10 -0
  718. package/src/table/createTableRow.ts +208 -203
  719. package/src/table/createTableSelectAllCheckbox.ts +3 -4
  720. package/src/table/createTableSelectionCheckbox.ts +24 -1
  721. package/src/table/types.ts +37 -1
  722. package/src/table/utils.ts +41 -0
  723. package/src/tabs/createTabs.ts +95 -24
  724. package/src/tag/createTag.ts +30 -36
  725. package/src/tag/createTagGroup.ts +92 -0
  726. package/src/toast/createToast.ts +1 -0
  727. package/src/toggle/createToggle.ts +20 -0
  728. package/src/toolbar/createToolbar.ts +43 -94
  729. package/src/tree/createTree.ts +165 -52
  730. package/src/tree/createTreeItem.ts +105 -120
  731. package/src/tree/createTreeSelectionCheckbox.ts +14 -1
  732. package/src/tree/types.ts +10 -0
  733. package/src/utils/animation.ts +243 -0
  734. package/src/utils/dom.ts +216 -25
  735. package/src/utils/index.ts +10 -0
  736. package/src/utils/keyboard.ts +25 -0
  737. package/src/utils/mergeProps.ts +8 -1
  738. package/src/utils/scrollIntoView.ts +181 -0
  739. package/dist/datepicker/createTimeSegment.d.ts +0 -29
  740. package/dist/datepicker/createTimeSegment.d.ts.map +0 -1
  741. package/dist/index.js.map +0 -1
  742. package/dist/index.jsx.map +0 -1
  743. package/src/datepicker/createTimeSegment.ts +0 -352
@@ -0,0 +1,1458 @@
1
+ import { t as filterDOMProps } from "./filterDOMProps.js";
2
+ import { n as focusWithoutScrolling } from "./focus.js";
3
+ import { i as useLocale } from "./locale.js";
4
+ import { n as createStringFormatter } from "./createStringFormatter.js";
5
+ import { createId as createId$1 } from "../ssr/index.js";
6
+ import { createEffect, createMemo, createSignal, onCleanup } from "solid-js";
7
+ import { normalizeColor, parseColor } from "@proyecto-viviana/solid-stately";
8
+ //#region src/color/createColorSlider.ts
9
+ /**
10
+ * createColorSlider hook.
11
+ *
12
+ * Provides ARIA attributes and keyboard handling for a color slider.
13
+ */
14
+ /**
15
+ * Creates ARIA props for a color slider.
16
+ */
17
+ function createColorSlider(props, state, trackRef, inputRef) {
18
+ const getProps = () => props();
19
+ const getState = () => state();
20
+ const locale = useLocale();
21
+ const isRTL = () => locale().direction === "rtl";
22
+ const trackId = createId$1();
23
+ const inputId = createId$1();
24
+ const labelId = createId$1();
25
+ let cleanupPointerDrag;
26
+ let cleanupMouseDrag;
27
+ const getInput = () => inputRef?.() ?? trackRef()?.querySelector("input[type=\"range\"]") ?? null;
28
+ const focusInput = () => {
29
+ focusWithoutScrolling(getInput());
30
+ queueMicrotask(() => focusWithoutScrolling(getInput()));
31
+ };
32
+ const channelName = createMemo(() => {
33
+ const p = getProps();
34
+ if (p.channelName) return p.channelName;
35
+ const s = getState();
36
+ return s.value.getChannelName(s.channel, locale().locale);
37
+ });
38
+ const orientation = () => getProps().orientation ?? "horizontal";
39
+ const hasVisibleLabel = () => getProps().label != null;
40
+ const trackElementId = () => getProps().id ?? trackId;
41
+ const trackLabelledBy = () => {
42
+ return getProps()["aria-labelledby"] ?? (hasVisibleLabel() ? labelId : void 0);
43
+ };
44
+ const inputLabelledBy = () => hasVisibleLabel() ? labelId : trackElementId();
45
+ const trackAriaLabel = () => {
46
+ const p = getProps();
47
+ if (p["aria-label"]) return p["aria-label"];
48
+ if (p["aria-labelledby"] || hasVisibleLabel()) return void 0;
49
+ return channelName();
50
+ };
51
+ const updateFromPointer = (clientX, clientY) => {
52
+ if (getProps().isDisabled || getState().isDisabled) return;
53
+ const track = trackRef();
54
+ if (!track) return;
55
+ const rect = track.getBoundingClientRect();
56
+ if (rect.width === 0 || rect.height === 0) return;
57
+ let percent;
58
+ if (orientation() === "vertical") percent = 1 - (clientY - rect.top) / rect.height;
59
+ else {
60
+ const physicalPercent = (clientX - rect.left) / rect.width;
61
+ percent = isRTL() ? 1 - physicalPercent : physicalPercent;
62
+ }
63
+ getState().setThumbPercent(Math.max(0, Math.min(1, percent)));
64
+ };
65
+ const endDrag = (target, pointerId) => {
66
+ const s = getState();
67
+ if (!s.isDragging) return;
68
+ s.setDragging(false);
69
+ focusInput();
70
+ if (pointerId == null) return;
71
+ try {
72
+ target?.releasePointerCapture?.(pointerId);
73
+ } catch {}
74
+ };
75
+ const installPointerDragListeners = () => {
76
+ if (typeof window === "undefined") return;
77
+ cleanupPointerDrag?.();
78
+ const onPointerMove = (e) => {
79
+ if (!getState().isDragging) return;
80
+ updateFromPointer(e.clientX, e.clientY);
81
+ };
82
+ const onPointerEnd = (e) => {
83
+ cleanupPointerDrag?.();
84
+ cleanupPointerDrag = void 0;
85
+ endDrag(trackRef(), e.pointerId);
86
+ };
87
+ window.addEventListener("pointermove", onPointerMove);
88
+ window.addEventListener("pointerup", onPointerEnd);
89
+ window.addEventListener("pointercancel", onPointerEnd);
90
+ cleanupPointerDrag = () => {
91
+ window.removeEventListener("pointermove", onPointerMove);
92
+ window.removeEventListener("pointerup", onPointerEnd);
93
+ window.removeEventListener("pointercancel", onPointerEnd);
94
+ };
95
+ };
96
+ const installMouseDragListeners = () => {
97
+ if (typeof window === "undefined") return;
98
+ cleanupMouseDrag?.();
99
+ const onMouseMove = (e) => {
100
+ if (!getState().isDragging) return;
101
+ updateFromPointer(e.clientX, e.clientY);
102
+ };
103
+ const onMouseEnd = () => {
104
+ cleanupMouseDrag?.();
105
+ cleanupMouseDrag = void 0;
106
+ endDrag(trackRef());
107
+ };
108
+ window.addEventListener("mousemove", onMouseMove);
109
+ window.addEventListener("mouseup", onMouseEnd);
110
+ cleanupMouseDrag = () => {
111
+ window.removeEventListener("mousemove", onMouseMove);
112
+ window.removeEventListener("mouseup", onMouseEnd);
113
+ };
114
+ };
115
+ onCleanup(() => {
116
+ cleanupPointerDrag?.();
117
+ cleanupMouseDrag?.();
118
+ });
119
+ const onTrackPointerDown = (e) => {
120
+ if (getProps().isDisabled || getState().isDisabled) return;
121
+ updateFromPointer(e.clientX, e.clientY);
122
+ focusInput();
123
+ getState().setDragging(true);
124
+ try {
125
+ e.currentTarget.setPointerCapture?.(e.pointerId);
126
+ } catch {}
127
+ installPointerDragListeners();
128
+ e.preventDefault();
129
+ };
130
+ const onTrackPointerMove = (e) => {
131
+ if (!getState().isDragging) return;
132
+ updateFromPointer(e.clientX, e.clientY);
133
+ };
134
+ const onTrackPointerUp = (e) => {
135
+ cleanupPointerDrag?.();
136
+ cleanupPointerDrag = void 0;
137
+ endDrag(e.currentTarget, e.pointerId);
138
+ };
139
+ const onTrackPointerCancel = (e) => {
140
+ cleanupPointerDrag?.();
141
+ cleanupPointerDrag = void 0;
142
+ endDrag(e.currentTarget, e.pointerId);
143
+ };
144
+ const onTrackMouseDown = (e) => {
145
+ if (getProps().isDisabled || getState().isDisabled) return;
146
+ updateFromPointer(e.clientX, e.clientY);
147
+ getState().setDragging(true);
148
+ installMouseDragListeners();
149
+ e.preventDefault();
150
+ };
151
+ const onTrackMouseMove = (e) => {
152
+ if (!getState().isDragging) return;
153
+ updateFromPointer(e.clientX, e.clientY);
154
+ };
155
+ const onTrackMouseUp = (e) => {
156
+ cleanupMouseDrag?.();
157
+ cleanupMouseDrag = void 0;
158
+ endDrag(e.currentTarget);
159
+ };
160
+ const onKeyDown = (e) => {
161
+ if (e.defaultPrevented) return;
162
+ if (getProps().isDisabled || getState().isDisabled) return;
163
+ const s = getState();
164
+ let handled = true;
165
+ switch (e.key) {
166
+ case "ArrowUp":
167
+ s.incrementThumb();
168
+ break;
169
+ case "ArrowDown":
170
+ s.decrementThumb();
171
+ break;
172
+ case "ArrowRight":
173
+ if (orientation() === "horizontal" && isRTL()) s.decrementThumb();
174
+ else s.incrementThumb();
175
+ break;
176
+ case "ArrowLeft":
177
+ if (orientation() === "horizontal" && isRTL()) s.incrementThumb();
178
+ else s.decrementThumb();
179
+ break;
180
+ case "PageUp":
181
+ s.incrementThumb(s.pageSize);
182
+ break;
183
+ case "PageDown":
184
+ s.decrementThumb(s.pageSize);
185
+ break;
186
+ case "Home":
187
+ s.setThumbValue(s.minValue);
188
+ break;
189
+ case "End":
190
+ s.setThumbValue(s.maxValue);
191
+ break;
192
+ default: handled = false;
193
+ }
194
+ if (handled) {
195
+ e.preventDefault();
196
+ e.stopPropagation();
197
+ }
198
+ };
199
+ const generateBackground = () => {
200
+ const s = getState();
201
+ const value = s.getDisplayColor();
202
+ const channel = s.channel;
203
+ const to = orientation() === "vertical" ? "top" : isRTL() ? "left" : "right";
204
+ switch (channel) {
205
+ case "hue": return `linear-gradient(to ${to}, ${[
206
+ 0,
207
+ 60,
208
+ 120,
209
+ 180,
210
+ 240,
211
+ 300,
212
+ 360
213
+ ].map((hue) => value.withChannelValue("hue", hue).toString("css")).join(", ")})`;
214
+ case "lightness": {
215
+ const min = s.minValue;
216
+ const max = s.maxValue;
217
+ return `linear-gradient(to ${to}, ${value.withChannelValue(channel, min).toString("css")}, ${value.withChannelValue(channel, (max - min) / 2).toString("css")}, ${value.withChannelValue(channel, max).toString("css")})`;
218
+ }
219
+ case "saturation":
220
+ case "brightness":
221
+ case "red":
222
+ case "green":
223
+ case "blue":
224
+ case "alpha": return `linear-gradient(to ${to}, ${value.withChannelValue(channel, s.minValue).toString("css")}, ${value.withChannelValue(channel, s.maxValue).toString("css")})`;
225
+ default: return;
226
+ }
227
+ };
228
+ const trackProps = createMemo(() => {
229
+ const s = getState();
230
+ getProps();
231
+ const bg = generateBackground();
232
+ return {
233
+ id: trackElementId(),
234
+ role: "group",
235
+ "aria-label": trackAriaLabel(),
236
+ "aria-labelledby": trackLabelledBy(),
237
+ onPointerDown: onTrackPointerDown,
238
+ onPointerMove: onTrackPointerMove,
239
+ onPointerUp: onTrackPointerUp,
240
+ onPointerCancel: onTrackPointerCancel,
241
+ onMouseDown: onTrackMouseDown,
242
+ onMouseMove: onTrackMouseMove,
243
+ onMouseUp: onTrackMouseUp,
244
+ style: {
245
+ position: "relative",
246
+ "touch-action": "none",
247
+ "forced-color-adjust": "none",
248
+ ...bg ? { background: bg } : {}
249
+ },
250
+ "data-disabled": s.isDisabled || void 0
251
+ };
252
+ });
253
+ const thumbProps = createMemo(() => {
254
+ const s = getState();
255
+ const p = getProps();
256
+ const percent = s.getThumbPercent();
257
+ const x = orientation() === "horizontal" ? isRTL() ? 1 - percent : percent : .5;
258
+ const y = orientation() === "horizontal" ? .5 : 1 - percent;
259
+ return {
260
+ onKeyDown,
261
+ style: {
262
+ position: "absolute",
263
+ left: `${x * 100}%`,
264
+ top: `${y * 100}%`,
265
+ transform: "translate(-50%, -50%)",
266
+ "touch-action": "none",
267
+ "forced-color-adjust": "none"
268
+ },
269
+ "data-dragging": s.isDragging || void 0,
270
+ "data-disabled": s.isDisabled || p.isDisabled || void 0
271
+ };
272
+ });
273
+ const ariaValueText = () => {
274
+ const s = getState();
275
+ const loc = locale().locale;
276
+ const displayColor = s.getDisplayColor();
277
+ let valueText = s.getThumbValueLabel();
278
+ if (s.channel === "hue") valueText += `, ${displayColor.getHueName(loc)}`;
279
+ else if (s.channel !== "alpha") valueText += `, ${displayColor.getColorName(loc)}`;
280
+ return valueText;
281
+ };
282
+ const inputProps = createMemo(() => {
283
+ const s = getState();
284
+ const p = getProps();
285
+ return {
286
+ type: "range",
287
+ id: inputId,
288
+ min: s.minValue,
289
+ max: s.maxValue,
290
+ step: s.step,
291
+ value: s.getThumbValue(),
292
+ name: p.name,
293
+ form: p.form,
294
+ disabled: s.isDisabled || p.isDisabled,
295
+ tabIndex: s.isDisabled || p.isDisabled ? void 0 : 0,
296
+ "aria-orientation": orientation(),
297
+ "aria-labelledby": inputLabelledBy(),
298
+ "aria-describedby": p["aria-describedby"] ?? "",
299
+ "aria-details": p["aria-details"] ?? "",
300
+ "aria-valuetext": ariaValueText(),
301
+ onKeyDown,
302
+ onInput: (e) => {
303
+ const target = e.target;
304
+ s.setThumbValue(parseFloat(target.value));
305
+ },
306
+ onChange: (e) => {
307
+ const target = e.target;
308
+ s.setThumbValue(parseFloat(target.value));
309
+ },
310
+ onFocus: () => {},
311
+ style: {
312
+ position: "absolute",
313
+ opacity: "0.0001",
314
+ width: "100%",
315
+ height: "100%",
316
+ padding: "0",
317
+ margin: "-1px",
318
+ overflow: "hidden",
319
+ clip: "rect(0, 0, 0, 0)",
320
+ "white-space": "nowrap",
321
+ border: "0",
322
+ "pointer-events": "none"
323
+ }
324
+ };
325
+ });
326
+ const outputProps = createMemo(() => {
327
+ return {
328
+ "aria-live": "off",
329
+ for: inputId
330
+ };
331
+ });
332
+ const labelProps = createMemo(() => {
333
+ return {
334
+ id: labelId,
335
+ onClick: () => {
336
+ if (typeof document !== "undefined") document.getElementById(inputId)?.focus();
337
+ }
338
+ };
339
+ });
340
+ return {
341
+ get trackProps() {
342
+ return trackProps();
343
+ },
344
+ get thumbProps() {
345
+ return thumbProps();
346
+ },
347
+ get inputProps() {
348
+ return inputProps();
349
+ },
350
+ get outputProps() {
351
+ return outputProps();
352
+ },
353
+ get labelProps() {
354
+ return labelProps();
355
+ }
356
+ };
357
+ }
358
+ //#endregion
359
+ //#region src/color/intl/index.ts
360
+ const colorIntlStrings = {
361
+ "ar-AE": {
362
+ colorPicker: "أداة انتقاء اللون",
363
+ twoDimensionalSlider: "مُنزلق 2D",
364
+ colorSwatch: "تغيير الألوان",
365
+ transparent: "شفاف",
366
+ colorNameAndValue: (args) => `${args?.name}: ${args?.value}`,
367
+ colorInputLabel: (args) => `${args?.label}, ${args?.channelLabel}`
368
+ },
369
+ "bg-BG": {
370
+ colorPicker: "Средство за избиране на цвят",
371
+ twoDimensionalSlider: "2D плъзгач",
372
+ colorSwatch: "цветна мостра",
373
+ transparent: "прозрачен",
374
+ colorNameAndValue: (args) => `${args?.name}: ${args?.value}`,
375
+ colorInputLabel: (args) => `${args?.label}, ${args?.channelLabel}`
376
+ },
377
+ "cs-CZ": {
378
+ colorPicker: "Výběr barvy",
379
+ twoDimensionalSlider: "2D posuvník",
380
+ colorSwatch: "barevný vzorek",
381
+ transparent: "průhledný",
382
+ colorNameAndValue: (args) => `${args?.name}: ${args?.value}`,
383
+ colorInputLabel: (args) => `${args?.label}, ${args?.channelLabel}`
384
+ },
385
+ "da-DK": {
386
+ colorPicker: "Farvevælger",
387
+ twoDimensionalSlider: "2D-skyder",
388
+ colorSwatch: "farveprøve",
389
+ transparent: "gennemsigtig",
390
+ colorNameAndValue: (args) => `${args?.name}: ${args?.value}`,
391
+ colorInputLabel: (args) => `${args?.label}, ${args?.channelLabel}`
392
+ },
393
+ "de-DE": {
394
+ colorPicker: "Farbwähler",
395
+ twoDimensionalSlider: "2D-Schieberegler",
396
+ colorSwatch: "Farbfeld",
397
+ transparent: "transparent",
398
+ colorNameAndValue: (args) => `${args?.name}: ${args?.value}`,
399
+ colorInputLabel: (args) => `${args?.label}, ${args?.channelLabel}`
400
+ },
401
+ "el-GR": {
402
+ colorPicker: "Επιλογέας χρωμάτων",
403
+ twoDimensionalSlider: "Ρυθμιστικό 2D",
404
+ colorSwatch: "χρωματικό δείγμα",
405
+ transparent: "διαφανές",
406
+ colorNameAndValue: (args) => `${args?.name}: ${args?.value}`,
407
+ colorInputLabel: (args) => `${args?.label}, ${args?.channelLabel}`
408
+ },
409
+ "en-US": {
410
+ colorPicker: "Color picker",
411
+ twoDimensionalSlider: "2D slider",
412
+ colorSwatch: "color swatch",
413
+ transparent: "transparent",
414
+ colorNameAndValue: (args) => `${args?.name}: ${args?.value}`,
415
+ colorInputLabel: (args) => `${args?.label}, ${args?.channelLabel}`
416
+ },
417
+ "es-ES": {
418
+ colorPicker: "Selector de color",
419
+ twoDimensionalSlider: "Regulador 2D",
420
+ colorSwatch: "muestra de color",
421
+ transparent: "transparente",
422
+ colorNameAndValue: (args) => `${args?.name}: ${args?.value}`,
423
+ colorInputLabel: (args) => `${args?.label}, ${args?.channelLabel}`
424
+ },
425
+ "et-EE": {
426
+ colorPicker: "Värvivalija",
427
+ twoDimensionalSlider: "2D-liugur",
428
+ colorSwatch: "värvinäidis",
429
+ transparent: "läbipaistev",
430
+ colorNameAndValue: (args) => `${args?.name}: ${args?.value}`,
431
+ colorInputLabel: (args) => `${args?.label}, ${args?.channelLabel}`
432
+ },
433
+ "fi-FI": {
434
+ colorPicker: "Värimuokkain",
435
+ twoDimensionalSlider: "2D-liukusäädin",
436
+ colorSwatch: "värimalli",
437
+ transparent: "läpinäkyvä",
438
+ colorNameAndValue: (args) => `${args?.name}: ${args?.value}`,
439
+ colorInputLabel: (args) => `${args?.label}, ${args?.channelLabel}`
440
+ },
441
+ "fr-FR": {
442
+ colorPicker: "Sélecteur de couleurs",
443
+ twoDimensionalSlider: "Curseur\xA02D",
444
+ colorSwatch: "Échantillon de couleurs",
445
+ transparent: "Transparent",
446
+ colorNameAndValue: (args) => `${args?.name} : ${args?.value}`,
447
+ colorInputLabel: (args) => `${args?.label}, ${args?.channelLabel}`
448
+ },
449
+ "he-IL": {
450
+ colorPicker: "בוחר הצבעים",
451
+ twoDimensionalSlider: "מחוון דו מימדי",
452
+ colorSwatch: "דוגמית צבע",
453
+ transparent: "שקוף",
454
+ colorNameAndValue: (args) => `${args?.name}: ${args?.value}`,
455
+ colorInputLabel: (args) => `${args?.label}, ${args?.channelLabel}`
456
+ },
457
+ "hr-HR": {
458
+ colorPicker: "Odabir boje",
459
+ twoDimensionalSlider: "2D klizač",
460
+ colorSwatch: "uzorak boje",
461
+ transparent: "transparentno",
462
+ colorNameAndValue: (args) => `${args?.name}: ${args?.value}`,
463
+ colorInputLabel: (args) => `${args?.label}, ${args?.channelLabel}`
464
+ },
465
+ "hu-HU": {
466
+ colorPicker: "Színválasztó",
467
+ twoDimensionalSlider: "2D-csúszka",
468
+ colorSwatch: "színtár",
469
+ transparent: "átlátszó",
470
+ colorNameAndValue: (args) => `${args?.name}: ${args?.value}`,
471
+ colorInputLabel: (args) => `${args?.label}, ${args?.channelLabel}`
472
+ },
473
+ "it-IT": {
474
+ colorPicker: "Selettore colore",
475
+ twoDimensionalSlider: "Cursore 2D",
476
+ colorSwatch: "campione di colore",
477
+ transparent: "trasparente",
478
+ colorNameAndValue: (args) => `${args?.name}: ${args?.value}`,
479
+ colorInputLabel: (args) => `${args?.label}, ${args?.channelLabel}`
480
+ },
481
+ "ja-JP": {
482
+ colorPicker: "カラーピッカー",
483
+ twoDimensionalSlider: "2D スライダー",
484
+ colorSwatch: "カラースウォッチ",
485
+ transparent: "透明",
486
+ colorNameAndValue: (args) => `${args?.name} : ${args?.value}`,
487
+ colorInputLabel: (args) => `${args?.label}、${args?.channelLabel}`
488
+ },
489
+ "ko-KR": {
490
+ colorPicker: "색상 피커",
491
+ twoDimensionalSlider: "2D 슬라이더",
492
+ colorSwatch: "색상 견본",
493
+ transparent: "투명도",
494
+ colorNameAndValue: (args) => `${args?.name}: ${args?.value}`,
495
+ colorInputLabel: (args) => `${args?.label}, ${args?.channelLabel}`
496
+ },
497
+ "lt-LT": {
498
+ colorPicker: "Spalvų parinkiklis",
499
+ twoDimensionalSlider: "2D slankiklis",
500
+ colorSwatch: "spalvų pavyzdys",
501
+ transparent: "skaidrus",
502
+ colorNameAndValue: (args) => `${args?.name}: ${args?.value}`,
503
+ colorInputLabel: (args) => `${args?.label}, ${args?.channelLabel}`
504
+ },
505
+ "lv-LV": {
506
+ colorPicker: "Krāsu atlasītājs",
507
+ twoDimensionalSlider: "2D slīdnis",
508
+ colorSwatch: "krāsu paraugs",
509
+ transparent: "caurspīdīgs",
510
+ colorNameAndValue: (args) => `${args?.name}: ${args?.value}`,
511
+ colorInputLabel: (args) => `${args?.label}, ${args?.channelLabel}`
512
+ },
513
+ "nb-NO": {
514
+ colorPicker: "Fargevelger",
515
+ twoDimensionalSlider: "2D-glidebryter",
516
+ colorSwatch: "fargekart",
517
+ transparent: "gjennomsiktig",
518
+ colorNameAndValue: (args) => `${args?.name}: ${args?.value}`,
519
+ colorInputLabel: (args) => `${args?.label}, ${args?.channelLabel}`
520
+ },
521
+ "nl-NL": {
522
+ colorPicker: "Kleurkiezer",
523
+ twoDimensionalSlider: "2D-schuifregelaar",
524
+ colorSwatch: "kleurstaal",
525
+ transparent: "transparant",
526
+ colorNameAndValue: (args) => `${args?.name}: ${args?.value}`,
527
+ colorInputLabel: (args) => `${args?.label}, ${args?.channelLabel}`
528
+ },
529
+ "pl-PL": {
530
+ colorPicker: "Próbnik kolorów",
531
+ twoDimensionalSlider: "Suwak 2D",
532
+ colorSwatch: "próbka koloru",
533
+ transparent: "przezroczysty",
534
+ colorNameAndValue: (args) => `${args?.name}: ${args?.value}`,
535
+ colorInputLabel: (args) => `${args?.label}, ${args?.channelLabel}`
536
+ },
537
+ "pt-BR": {
538
+ colorPicker: "Seletor de cores",
539
+ twoDimensionalSlider: "Controle deslizante 2D",
540
+ colorSwatch: "amostra de cores",
541
+ transparent: "transparente",
542
+ colorNameAndValue: (args) => `${args?.name}: ${args?.value}`,
543
+ colorInputLabel: (args) => `${args?.label}, ${args?.channelLabel}`
544
+ },
545
+ "pt-PT": {
546
+ colorPicker: "Seletor de cores",
547
+ twoDimensionalSlider: "Controle deslizante 2D",
548
+ colorSwatch: "amostra de cor",
549
+ transparent: "transparente",
550
+ colorNameAndValue: (args) => `${args?.name}: ${args?.value}`,
551
+ colorInputLabel: (args) => `${args?.label}, ${args?.channelLabel}`
552
+ },
553
+ "ro-RO": {
554
+ colorPicker: "Selector de culori",
555
+ twoDimensionalSlider: "Glisor 2D",
556
+ colorSwatch: "specimen de culoare",
557
+ transparent: "transparent",
558
+ colorNameAndValue: (args) => `${args?.name}: ${args?.value}`,
559
+ colorInputLabel: (args) => `${args?.label}, ${args?.channelLabel}`
560
+ },
561
+ "ru-RU": {
562
+ colorPicker: "Палитра цветов",
563
+ twoDimensionalSlider: "Ползунок 2D",
564
+ colorSwatch: "цветовой образец",
565
+ transparent: "прозрачный",
566
+ colorNameAndValue: (args) => `${args?.name}: ${args?.value}`,
567
+ colorInputLabel: (args) => `${args?.label}, ${args?.channelLabel}`
568
+ },
569
+ "sk-SK": {
570
+ colorPicker: "Výber farieb",
571
+ twoDimensionalSlider: "2D jazdec",
572
+ colorSwatch: "vzorkovník farieb",
573
+ transparent: "transparentný",
574
+ colorNameAndValue: (args) => `${args?.name}: ${args?.value}`,
575
+ colorInputLabel: (args) => `${args?.label}, ${args?.channelLabel}`
576
+ },
577
+ "sl-SI": {
578
+ colorPicker: "Izbirnik barv",
579
+ twoDimensionalSlider: "2D drsnik",
580
+ colorSwatch: "barvna paleta",
581
+ transparent: "prozorno",
582
+ colorNameAndValue: (args) => `${args?.name}: ${args?.value}`,
583
+ colorInputLabel: (args) => `${args?.label}, ${args?.channelLabel}`
584
+ },
585
+ "sr-SP": {
586
+ colorPicker: "Birač boja",
587
+ twoDimensionalSlider: "2D klizač",
588
+ colorSwatch: "Uzorak boje",
589
+ transparent: "providno",
590
+ colorNameAndValue: (args) => `${args?.name}: ${args?.value}`,
591
+ colorInputLabel: (args) => `${args?.label}, ${args?.channelLabel}`
592
+ },
593
+ "sv-SE": {
594
+ colorPicker: "Färgväljaren",
595
+ twoDimensionalSlider: "2D-reglage",
596
+ colorSwatch: "färgruta",
597
+ transparent: "genomskinlig",
598
+ colorNameAndValue: (args) => `${args?.name}: ${args?.value}`,
599
+ colorInputLabel: (args) => `${args?.label}, ${args?.channelLabel}`
600
+ },
601
+ "tr-TR": {
602
+ colorPicker: "Renk Seçici",
603
+ twoDimensionalSlider: "2D sürgü",
604
+ colorSwatch: "renk örneği",
605
+ transparent: "saydam",
606
+ colorNameAndValue: (args) => `${args?.name}: ${args?.value}`,
607
+ colorInputLabel: (args) => `${args?.label}, ${args?.channelLabel}`
608
+ },
609
+ "uk-UA": {
610
+ colorPicker: "Палітра кольорів",
611
+ twoDimensionalSlider: "Повзунок 2D",
612
+ colorSwatch: "зразок кольору",
613
+ transparent: "прозорий",
614
+ colorNameAndValue: (args) => `${args?.name}: ${args?.value}`,
615
+ colorInputLabel: (args) => `${args?.label}, ${args?.channelLabel}`
616
+ },
617
+ "zh-CN": {
618
+ colorPicker: "拾色器",
619
+ twoDimensionalSlider: "2D 滑块",
620
+ colorSwatch: "颜色色板",
621
+ transparent: "透明",
622
+ colorNameAndValue: (args) => `${args?.name}:${args?.value}`,
623
+ colorInputLabel: (args) => `${args?.label}、${args?.channelLabel}`
624
+ },
625
+ "zh-TW": {
626
+ colorPicker: "檢色器",
627
+ twoDimensionalSlider: "2D 滑桿",
628
+ colorSwatch: "色票",
629
+ transparent: "透明",
630
+ colorNameAndValue: (args) => `${args?.name}:${args?.value}`,
631
+ colorInputLabel: (args) => `${args?.label},${args?.channelLabel}`
632
+ }
633
+ };
634
+ /**
635
+ * Reactive color string formatter for the current locale. Mirrors upstream
636
+ * `useLocalizedStringFormatter(intlMessages, '@react-aria/color')`.
637
+ */
638
+ function createColorStringFormatter() {
639
+ return createStringFormatter(colorIntlStrings, "@react-aria/color");
640
+ }
641
+ //#endregion
642
+ //#region src/color/createColorArea.ts
643
+ /**
644
+ * createColorArea hook.
645
+ *
646
+ * Provides ARIA attributes and keyboard/pointer handling for a 2D color area.
647
+ */
648
+ /**
649
+ * Creates ARIA props for a color area.
650
+ */
651
+ function createColorArea(props, state, areaRef) {
652
+ const getProps = () => props();
653
+ const getState = () => state();
654
+ const locale = useLocale();
655
+ const stringFormatter = createColorStringFormatter();
656
+ const isRTL = () => locale().direction === "rtl";
657
+ const [focusedInput, setFocusedInput] = createSignal(null);
658
+ const [valueChangedViaKeyboard, setValueChangedViaKeyboard] = createSignal(false);
659
+ const [valueChangedViaInputChangeEvent, setValueChangedViaInputChangeEvent] = createSignal(false);
660
+ const colorAreaId = createId$1();
661
+ const xInputId = createId$1();
662
+ const yInputId = createId$1();
663
+ const colorPickerLabel = () => stringFormatter().format("colorPicker");
664
+ const colorInputLabel = () => {
665
+ const ariaLabel = getProps()["aria-label"];
666
+ return ariaLabel ? stringFormatter().format("colorInputLabel", {
667
+ label: ariaLabel,
668
+ channelLabel: colorPickerLabel()
669
+ }) : colorPickerLabel();
670
+ };
671
+ const colorAreaLabel = () => {
672
+ const ariaLabel = getProps()["aria-label"];
673
+ return ariaLabel ? `${ariaLabel}, ${colorPickerLabel()}` : void 0;
674
+ };
675
+ const formatChannelValueText = (channel) => {
676
+ const value = getState().getDisplayColor();
677
+ const loc = locale().locale;
678
+ return stringFormatter().format("colorNameAndValue", {
679
+ name: value.getChannelName(channel, loc),
680
+ value: value.formatChannelValue(channel, loc)
681
+ });
682
+ };
683
+ const getAriaValueTextForChannel = (channel) => {
684
+ const s = getState();
685
+ const value = s.getDisplayColor();
686
+ const loc = locale().locale;
687
+ if (valueChangedViaInputChangeEvent() || valueChangedViaKeyboard()) return `${formatChannelValueText(channel)}, ${value.getColorName(loc)}`;
688
+ const otherChannel = channel === s.yChannel ? s.xChannel : s.yChannel;
689
+ return [
690
+ formatChannelValueText(channel),
691
+ formatChannelValueText(otherChannel),
692
+ formatChannelValueText(s.zChannel)
693
+ ].join(", ") + `, ${value.getColorName(loc)}`;
694
+ };
695
+ const updateFromInput = (e, axis) => {
696
+ const target = e.target;
697
+ const nextValue = parseFloat(target.value);
698
+ setValueChangedViaInputChangeEvent(true);
699
+ if (axis === "x") getState().setXValue(nextValue);
700
+ else getState().setYValue(nextValue);
701
+ };
702
+ const getPositionFromEvent = (e) => {
703
+ const area = areaRef();
704
+ if (!area) return null;
705
+ const rect = area.getBoundingClientRect();
706
+ if (rect.width === 0 || rect.height === 0) return null;
707
+ const physicalX = Math.max(0, Math.min(1, (e.clientX - rect.left) / rect.width));
708
+ return {
709
+ x: isRTL() ? 1 - physicalX : physicalX,
710
+ y: Math.max(0, Math.min(1, (e.clientY - rect.top) / rect.height))
711
+ };
712
+ };
713
+ const onPointerDown = (e) => {
714
+ if (getProps().isDisabled || getState().isDisabled) return;
715
+ const pos = getPositionFromEvent(e);
716
+ if (!pos) return;
717
+ getState().setColorFromPoint(pos.x, pos.y);
718
+ getState().setDragging(true);
719
+ e.currentTarget.setPointerCapture?.(e.pointerId);
720
+ };
721
+ const onPointerMove = (e) => {
722
+ if (!getState().isDragging) return;
723
+ const pos = getPositionFromEvent(e);
724
+ if (!pos) return;
725
+ getState().setColorFromPoint(pos.x, pos.y);
726
+ };
727
+ const onPointerUp = (e) => {
728
+ if (getState().isDragging) {
729
+ getState().setDragging(false);
730
+ e.currentTarget.releasePointerCapture?.(e.pointerId);
731
+ }
732
+ };
733
+ const onKeyDown = (e) => {
734
+ if (getProps().isDisabled || getState().isDisabled) return;
735
+ const s = getState();
736
+ const xStep = e.shiftKey && s.xChannelPageStep > s.xChannelStep ? s.xChannelPageStep : s.xChannelStep;
737
+ const yStep = e.shiftKey && s.yChannelPageStep > s.yChannelStep ? s.yChannelPageStep : s.yChannelStep;
738
+ let focusedAxis = "x";
739
+ let handled = true;
740
+ switch (e.key) {
741
+ case "ArrowRight":
742
+ if (isRTL()) s.decrementX(xStep);
743
+ else s.incrementX(xStep);
744
+ break;
745
+ case "ArrowLeft":
746
+ if (isRTL()) s.incrementX(xStep);
747
+ else s.decrementX(xStep);
748
+ break;
749
+ case "ArrowUp":
750
+ s.incrementY(yStep);
751
+ focusedAxis = "y";
752
+ break;
753
+ case "ArrowDown":
754
+ s.decrementY(yStep);
755
+ focusedAxis = "y";
756
+ break;
757
+ case "PageUp":
758
+ s.incrementY(s.yChannelPageStep);
759
+ focusedAxis = "y";
760
+ break;
761
+ case "PageDown":
762
+ s.decrementY(s.yChannelPageStep);
763
+ focusedAxis = "y";
764
+ break;
765
+ case "Home":
766
+ if (isRTL()) s.incrementX(s.xChannelPageStep);
767
+ else s.decrementX(s.xChannelPageStep);
768
+ break;
769
+ case "End":
770
+ if (isRTL()) s.decrementX(s.xChannelPageStep);
771
+ else s.incrementX(s.xChannelPageStep);
772
+ break;
773
+ default: handled = false;
774
+ }
775
+ if (handled) {
776
+ setFocusedInput(focusedAxis);
777
+ setValueChangedViaKeyboard(true);
778
+ s.setDragging(true);
779
+ s.setDragging(false);
780
+ e.preventDefault();
781
+ e.stopPropagation();
782
+ }
783
+ };
784
+ const onFocusOut = (e) => {
785
+ const currentTarget = e.currentTarget;
786
+ const relatedTarget = e.relatedTarget;
787
+ if (!relatedTarget || !currentTarget.contains(relatedTarget)) {
788
+ setValueChangedViaKeyboard(false);
789
+ setValueChangedViaInputChangeEvent(false);
790
+ }
791
+ };
792
+ const colorAreaProps = createMemo(() => {
793
+ const s = getState();
794
+ const p = getProps();
795
+ return {
796
+ id: p.id ?? colorAreaId,
797
+ role: "group",
798
+ "aria-label": colorAreaLabel(),
799
+ "aria-labelledby": p["aria-labelledby"],
800
+ onPointerDown,
801
+ onPointerMove,
802
+ onPointerUp,
803
+ style: {
804
+ position: "relative",
805
+ "touch-action": "none",
806
+ "forced-color-adjust": "none",
807
+ ...generateGradient()
808
+ },
809
+ "data-disabled": s.isDisabled || p.isDisabled || void 0
810
+ };
811
+ });
812
+ function generateGradient() {
813
+ const s = getState();
814
+ const value = s.value;
815
+ const xCh = s.xChannel;
816
+ const yCh = s.yChannel;
817
+ const zCh = s.zChannel;
818
+ const zValue = value.getChannelValue(zCh);
819
+ const end = isRTL() ? "left" : "right";
820
+ const hue = (color) => [
821
+ 0,
822
+ 60,
823
+ 120,
824
+ 180,
825
+ 240,
826
+ 300,
827
+ 360
828
+ ].map((h) => color.withChannelValue("hue", h).toString("css")).join(", ");
829
+ const hslChannels = {
830
+ hue,
831
+ saturation: (color) => `${color.withChannelValue("saturation", 0).toString("css")}, transparent`,
832
+ lightness: () => "black, transparent, white"
833
+ };
834
+ const hsbChannels = {
835
+ hue,
836
+ saturation: (color) => `${color.withChannelValue("saturation", 0).toString("css")}, transparent`,
837
+ brightness: () => "black, transparent"
838
+ };
839
+ switch (value.getColorSpace()) {
840
+ case "rgb": {
841
+ const rgb = parseColor("rgb(0, 0, 0)");
842
+ return {
843
+ background: [
844
+ `linear-gradient(to ${end}, ${rgb.withChannelValue(xCh, 0).toString("css")}, ${rgb.withChannelValue(xCh, 255).toString("css")})`,
845
+ `linear-gradient(to top, ${rgb.withChannelValue(yCh, 0).toString("css")}, ${rgb.withChannelValue(yCh, 255).toString("css")})`,
846
+ rgb.withChannelValue(zCh, zValue).toString("css")
847
+ ].join(","),
848
+ "background-blend-mode": "screen"
849
+ };
850
+ }
851
+ case "hsl": {
852
+ const channels = value.getColorChannels();
853
+ const base = parseColor("hsl(0, 100%, 50%)").withChannelValue(zCh, zValue);
854
+ const bg = channels.filter((c) => c !== zCh).map((c) => `linear-gradient(to ${c === xCh ? end : "top"}, ${hslChannels[c]?.(base) ?? ""})`).reverse();
855
+ if (zCh === "hue") bg.push(base.toString("css"));
856
+ return { background: bg.join(", ") };
857
+ }
858
+ case "hsb": {
859
+ const channels = value.getColorChannels();
860
+ const base = parseColor("hsb(0, 100%, 100%)").withChannelValue(zCh, zValue);
861
+ const bg = channels.filter((c) => c !== zCh).map((c) => `linear-gradient(to ${c === xCh ? end : "top"}, ${hsbChannels[c]?.(base) ?? ""})`).reverse();
862
+ if (zCh === "hue") bg.push(base.toString("css"));
863
+ return { background: bg.join(", ") };
864
+ }
865
+ default: return {};
866
+ }
867
+ }
868
+ const gradientProps = createMemo(() => {
869
+ return {
870
+ role: "presentation",
871
+ style: {
872
+ width: "100%",
873
+ height: "100%",
874
+ "forced-color-adjust": "none",
875
+ ...generateGradient()
876
+ }
877
+ };
878
+ });
879
+ const thumbProps = createMemo(() => {
880
+ const s = getState();
881
+ const p = getProps();
882
+ const pos = s.getThumbPosition();
883
+ return {
884
+ role: "presentation",
885
+ style: {
886
+ position: "absolute",
887
+ left: `${(isRTL() ? 1 - pos.x : pos.x) * 100}%`,
888
+ top: `${pos.y * 100}%`,
889
+ transform: "translate(-50%, -50%)",
890
+ "touch-action": "none",
891
+ "forced-color-adjust": "none"
892
+ },
893
+ onKeyDown,
894
+ onFocusOut,
895
+ "data-dragging": s.isDragging || void 0,
896
+ "data-disabled": s.isDisabled || p.isDisabled || void 0
897
+ };
898
+ });
899
+ const xInputProps = createMemo(() => {
900
+ const s = getState();
901
+ const p = getProps();
902
+ const xRange = s.value.getChannelRange(s.xChannel);
903
+ return {
904
+ type: "range",
905
+ id: p.id ?? xInputId,
906
+ "aria-label": colorInputLabel(),
907
+ "aria-roledescription": stringFormatter().format("twoDimensionalSlider"),
908
+ "aria-valuetext": getAriaValueTextForChannel(s.xChannel),
909
+ "aria-orientation": "horizontal",
910
+ "aria-describedby": p["aria-describedby"],
911
+ "aria-details": p["aria-details"],
912
+ min: xRange.minValue,
913
+ max: xRange.maxValue,
914
+ step: xRange.step,
915
+ value: s.getXValue(),
916
+ name: p.xName,
917
+ form: p.form,
918
+ disabled: s.isDisabled || p.isDisabled,
919
+ "aria-hidden": !focusedInput() || focusedInput() === "x" || valueChangedViaKeyboard() ? void 0 : "true",
920
+ onFocus: () => setFocusedInput("x"),
921
+ onKeyDown,
922
+ onInput: (e) => updateFromInput(e, "x"),
923
+ onChange: (e) => updateFromInput(e, "x"),
924
+ tabIndex: !focusedInput() || focusedInput() === "x" ? void 0 : -1,
925
+ style: {
926
+ position: "absolute",
927
+ width: "1px",
928
+ height: "1px",
929
+ padding: "0",
930
+ margin: "-1px",
931
+ overflow: "hidden",
932
+ clip: "rect(0, 0, 0, 0)",
933
+ "white-space": "nowrap",
934
+ border: "0"
935
+ }
936
+ };
937
+ });
938
+ const yInputProps = createMemo(() => {
939
+ const s = getState();
940
+ const p = getProps();
941
+ const yRange = s.value.getChannelRange(s.yChannel);
942
+ return {
943
+ type: "range",
944
+ id: p.id ?? yInputId,
945
+ "aria-label": colorInputLabel(),
946
+ "aria-roledescription": stringFormatter().format("twoDimensionalSlider"),
947
+ "aria-valuetext": getAriaValueTextForChannel(s.yChannel),
948
+ "aria-orientation": "vertical",
949
+ "aria-describedby": p["aria-describedby"],
950
+ "aria-details": p["aria-details"],
951
+ min: yRange.minValue,
952
+ max: yRange.maxValue,
953
+ step: yRange.step,
954
+ value: s.getYValue(),
955
+ name: p.yName,
956
+ form: p.form,
957
+ disabled: s.isDisabled || p.isDisabled,
958
+ "aria-hidden": focusedInput() === "y" || valueChangedViaKeyboard() ? void 0 : "true",
959
+ onFocus: () => setFocusedInput("y"),
960
+ onKeyDown,
961
+ onInput: (e) => updateFromInput(e, "y"),
962
+ onChange: (e) => updateFromInput(e, "y"),
963
+ tabIndex: focusedInput() === "y" ? void 0 : -1,
964
+ style: {
965
+ position: "absolute",
966
+ width: "1px",
967
+ height: "1px",
968
+ padding: "0",
969
+ margin: "-1px",
970
+ overflow: "hidden",
971
+ clip: "rect(0, 0, 0, 0)",
972
+ "white-space": "nowrap",
973
+ border: "0"
974
+ }
975
+ };
976
+ });
977
+ return {
978
+ get colorAreaProps() {
979
+ return colorAreaProps();
980
+ },
981
+ get gradientProps() {
982
+ return gradientProps();
983
+ },
984
+ get thumbProps() {
985
+ return thumbProps();
986
+ },
987
+ get xInputProps() {
988
+ return xInputProps();
989
+ },
990
+ get yInputProps() {
991
+ return yInputProps();
992
+ }
993
+ };
994
+ }
995
+ //#endregion
996
+ //#region src/color/createColorWheel.ts
997
+ /**
998
+ * createColorWheel hook.
999
+ *
1000
+ * Provides ARIA attributes and keyboard/pointer handling for a circular hue selector.
1001
+ */
1002
+ /**
1003
+ * Creates ARIA props for a color wheel.
1004
+ */
1005
+ function createColorWheel(props, state, wheelRef) {
1006
+ const getProps = () => props();
1007
+ const getState = () => state();
1008
+ const locale = useLocale();
1009
+ const inputId = createId$1();
1010
+ let cleanupPointerDrag;
1011
+ let cleanupMouseDrag;
1012
+ let dragElement = null;
1013
+ const outerRadius = () => getProps().outerRadius ?? 100;
1014
+ const innerRadius = () => getProps().innerRadius ?? 74;
1015
+ const thumbRadius = () => (innerRadius() + outerRadius()) / 2;
1016
+ const getInput = () => wheelRef()?.querySelector("input[type=\"range\"]") ?? null;
1017
+ const focusInput = () => {
1018
+ focusWithoutScrolling(getInput());
1019
+ queueMicrotask(() => focusWithoutScrolling(getInput()));
1020
+ };
1021
+ const getPointFromEvent = (clientX, clientY, element) => {
1022
+ const wheel = element ?? dragElement ?? wheelRef();
1023
+ if (!wheel) return null;
1024
+ const rect = wheel.getBoundingClientRect();
1025
+ const centerX = rect.left + rect.width / 2;
1026
+ const centerY = rect.top + rect.height / 2;
1027
+ return {
1028
+ x: clientX - centerX,
1029
+ y: clientY - centerY
1030
+ };
1031
+ };
1032
+ const updateFromPoint = (clientX, clientY, requireTrackHit = false, element) => {
1033
+ if (getProps().isDisabled || getState().isDisabled) return false;
1034
+ const point = getPointFromEvent(clientX, clientY, element);
1035
+ if (!point) return false;
1036
+ const distance = Math.sqrt(point.x ** 2 + point.y ** 2);
1037
+ if (requireTrackHit && (distance <= innerRadius() || distance >= outerRadius())) return false;
1038
+ getState().setHueFromPoint(point.x, point.y, thumbRadius());
1039
+ return true;
1040
+ };
1041
+ const endDrag = () => {
1042
+ if (!getState().isDragging) return;
1043
+ getState().setDragging(false);
1044
+ dragElement = null;
1045
+ focusInput();
1046
+ };
1047
+ const installPointerDragListeners = () => {
1048
+ if (typeof window === "undefined") return;
1049
+ cleanupPointerDrag?.();
1050
+ const onPointerMove = (e) => {
1051
+ if (!getState().isDragging) return;
1052
+ updateFromPoint(e.clientX, e.clientY);
1053
+ };
1054
+ const onPointerEnd = () => {
1055
+ cleanupPointerDrag?.();
1056
+ cleanupPointerDrag = void 0;
1057
+ endDrag();
1058
+ };
1059
+ window.addEventListener("pointermove", onPointerMove);
1060
+ window.addEventListener("pointerup", onPointerEnd);
1061
+ window.addEventListener("pointercancel", onPointerEnd);
1062
+ cleanupPointerDrag = () => {
1063
+ window.removeEventListener("pointermove", onPointerMove);
1064
+ window.removeEventListener("pointerup", onPointerEnd);
1065
+ window.removeEventListener("pointercancel", onPointerEnd);
1066
+ };
1067
+ };
1068
+ const installMouseDragListeners = () => {
1069
+ if (typeof window === "undefined") return;
1070
+ cleanupMouseDrag?.();
1071
+ const onMouseMove = (e) => {
1072
+ if (!getState().isDragging) return;
1073
+ updateFromPoint(e.clientX, e.clientY);
1074
+ };
1075
+ const onMouseEnd = () => {
1076
+ cleanupMouseDrag?.();
1077
+ cleanupMouseDrag = void 0;
1078
+ endDrag();
1079
+ };
1080
+ window.addEventListener("mousemove", onMouseMove);
1081
+ window.addEventListener("mouseup", onMouseEnd);
1082
+ cleanupMouseDrag = () => {
1083
+ window.removeEventListener("mousemove", onMouseMove);
1084
+ window.removeEventListener("mouseup", onMouseEnd);
1085
+ };
1086
+ };
1087
+ onCleanup(() => {
1088
+ cleanupPointerDrag?.();
1089
+ cleanupMouseDrag?.();
1090
+ });
1091
+ const onTrackPointerDown = (e) => {
1092
+ dragElement = e.currentTarget;
1093
+ if (!updateFromPoint(e.clientX, e.clientY, true, dragElement)) {
1094
+ dragElement = null;
1095
+ return;
1096
+ }
1097
+ focusInput();
1098
+ getState().setDragging(true);
1099
+ installPointerDragListeners();
1100
+ e.preventDefault();
1101
+ };
1102
+ const onTrackMouseDown = (e) => {
1103
+ dragElement = e.currentTarget;
1104
+ if (!updateFromPoint(e.clientX, e.clientY, true, dragElement)) {
1105
+ dragElement = null;
1106
+ return;
1107
+ }
1108
+ focusInput();
1109
+ getState().setDragging(true);
1110
+ installMouseDragListeners();
1111
+ e.preventDefault();
1112
+ };
1113
+ const onThumbPointerDown = (e) => {
1114
+ if (getProps().isDisabled || getState().isDisabled) return;
1115
+ focusInput();
1116
+ getState().setDragging(true);
1117
+ installPointerDragListeners();
1118
+ e.preventDefault();
1119
+ e.stopPropagation();
1120
+ };
1121
+ const onThumbMouseDown = (e) => {
1122
+ if (getProps().isDisabled || getState().isDisabled) return;
1123
+ focusInput();
1124
+ getState().setDragging(true);
1125
+ installMouseDragListeners();
1126
+ e.preventDefault();
1127
+ e.stopPropagation();
1128
+ };
1129
+ const onKeyDown = (e) => {
1130
+ if (e.defaultPrevented) return;
1131
+ if (getProps().isDisabled || getState().isDisabled) return;
1132
+ const s = getState();
1133
+ let handled = true;
1134
+ switch (e.key) {
1135
+ case "ArrowRight":
1136
+ case "ArrowUp":
1137
+ s.increment();
1138
+ break;
1139
+ case "ArrowLeft":
1140
+ case "ArrowDown":
1141
+ s.decrement();
1142
+ break;
1143
+ case "PageUp":
1144
+ s.increment(s.pageStep);
1145
+ break;
1146
+ case "PageDown":
1147
+ s.decrement(s.pageStep);
1148
+ break;
1149
+ case "Home":
1150
+ s.setHue(0);
1151
+ break;
1152
+ case "End":
1153
+ s.setHue(359);
1154
+ break;
1155
+ default: handled = false;
1156
+ }
1157
+ if (handled) {
1158
+ s.setDragging(true);
1159
+ s.setDragging(false);
1160
+ e.preventDefault();
1161
+ e.stopPropagation();
1162
+ }
1163
+ };
1164
+ const conicGradient = `conic-gradient(from 90deg, hsl(0, 100%, 50%), hsl(30, 100%, 50%), hsl(60, 100%, 50%), hsl(90, 100%, 50%), hsl(120, 100%, 50%), hsl(150, 100%, 50%), hsl(180, 100%, 50%), hsl(210, 100%, 50%), hsl(240, 100%, 50%), hsl(270, 100%, 50%), hsl(300, 100%, 50%), hsl(330, 100%, 50%), hsl(360, 100%, 50%))`;
1165
+ const ringPath = () => {
1166
+ const outer = outerRadius();
1167
+ const inner = innerRadius();
1168
+ const circlePath = (radius) => [
1169
+ `M ${outer}, ${outer} m ${-radius}, 0`,
1170
+ `a ${radius}, ${radius}, 0, 1, 0, ${radius * 2}, 0`,
1171
+ `a ${radius}, ${radius}, 0, 1, 0 ${-radius * 2}, 0`
1172
+ ].join(" ");
1173
+ return `path(evenodd, "${circlePath(outer)} ${circlePath(inner)}")`;
1174
+ };
1175
+ const trackProps = createMemo(() => {
1176
+ const s = getState();
1177
+ const p = getProps();
1178
+ return {
1179
+ onPointerDown: onTrackPointerDown,
1180
+ onMouseDown: onTrackMouseDown,
1181
+ style: {
1182
+ position: "relative",
1183
+ "touch-action": "none",
1184
+ width: `${outerRadius() * 2}px`,
1185
+ height: `${outerRadius() * 2}px`,
1186
+ background: conicGradient,
1187
+ "clip-path": ringPath(),
1188
+ "forced-color-adjust": "none"
1189
+ },
1190
+ "data-disabled": s.isDisabled || p.isDisabled || void 0
1191
+ };
1192
+ });
1193
+ const thumbProps = createMemo(() => {
1194
+ const s = getState();
1195
+ const p = getProps();
1196
+ const position = s.getThumbPosition(thumbRadius());
1197
+ return {
1198
+ onPointerDown: onThumbPointerDown,
1199
+ onMouseDown: onThumbMouseDown,
1200
+ onKeyDown,
1201
+ style: {
1202
+ position: "absolute",
1203
+ left: `${outerRadius() + position.x}px`,
1204
+ top: `${outerRadius() + position.y}px`,
1205
+ transform: "translate(-50%, -50%)",
1206
+ "touch-action": "none",
1207
+ "forced-color-adjust": "none"
1208
+ },
1209
+ "data-dragging": s.isDragging || void 0,
1210
+ "data-disabled": s.isDisabled || p.isDisabled || void 0
1211
+ };
1212
+ });
1213
+ const inputProps = createMemo(() => {
1214
+ const s = getState();
1215
+ const p = getProps();
1216
+ return {
1217
+ type: "range",
1218
+ id: p.id ?? inputId,
1219
+ min: 0,
1220
+ max: 360,
1221
+ step: s.step,
1222
+ value: s.getHue(),
1223
+ name: p.name,
1224
+ form: p.form,
1225
+ disabled: s.isDisabled || p.isDisabled,
1226
+ "aria-label": p["aria-label"] ?? (p["aria-labelledby"] ? void 0 : s.value.getChannelName("hue", locale().locale)),
1227
+ "aria-labelledby": p["aria-labelledby"],
1228
+ "aria-describedby": p["aria-describedby"],
1229
+ "aria-details": p["aria-details"],
1230
+ "aria-errormessage": p["aria-errormessage"],
1231
+ "aria-valuetext": `${s.value.formatChannelValue("hue", locale().locale)}, ${s.value.getHueName(locale().locale)}`,
1232
+ onKeyDown,
1233
+ onInput: (e) => {
1234
+ const target = e.target;
1235
+ s.setHue(parseFloat(target.value));
1236
+ },
1237
+ onChange: (e) => {
1238
+ const target = e.target;
1239
+ s.setHue(parseFloat(target.value));
1240
+ },
1241
+ style: {
1242
+ position: "absolute",
1243
+ width: "100%",
1244
+ height: "100%",
1245
+ opacity: "0.0001",
1246
+ padding: "0",
1247
+ margin: "0",
1248
+ overflow: "hidden",
1249
+ clip: "rect(0, 0, 0, 0)",
1250
+ "white-space": "nowrap",
1251
+ border: "0",
1252
+ "pointer-events": "none"
1253
+ }
1254
+ };
1255
+ });
1256
+ return {
1257
+ get trackProps() {
1258
+ return trackProps();
1259
+ },
1260
+ get thumbProps() {
1261
+ return thumbProps();
1262
+ },
1263
+ get inputProps() {
1264
+ return inputProps();
1265
+ }
1266
+ };
1267
+ }
1268
+ //#endregion
1269
+ //#region src/color/createColorField.ts
1270
+ /**
1271
+ * createColorField hook.
1272
+ *
1273
+ * Provides ARIA attributes and keyboard handling for a color input field.
1274
+ */
1275
+ /**
1276
+ * Creates ARIA props for a color field.
1277
+ */
1278
+ function createColorField(props, state, inputRef) {
1279
+ const getProps = () => props();
1280
+ const getState = () => state();
1281
+ const generatedInputId = createId$1();
1282
+ const labelId = createId$1();
1283
+ const descriptionId = createId$1();
1284
+ const errorMessageId = createId$1();
1285
+ let didAutoFocus = false;
1286
+ createEffect(() => {
1287
+ const input = inputRef();
1288
+ if (!didAutoFocus && getProps().autoFocus && input) {
1289
+ didAutoFocus = true;
1290
+ input.focus();
1291
+ }
1292
+ });
1293
+ const isDisabled = () => getProps().isDisabled || getState().isDisabled;
1294
+ const isReadOnly = () => getProps().isReadOnly || getState().isReadOnly;
1295
+ const isInvalid = () => getProps().isInvalid || getState().isInvalid;
1296
+ const validationBehavior = () => getProps().validationBehavior ?? "native";
1297
+ const onKeyDown = (e) => {
1298
+ const s = getState();
1299
+ if (isDisabled() || isReadOnly()) return;
1300
+ let handled = true;
1301
+ switch (e.key) {
1302
+ case "ArrowUp":
1303
+ s.increment();
1304
+ break;
1305
+ case "ArrowDown":
1306
+ s.decrement();
1307
+ break;
1308
+ case "PageUp":
1309
+ s.incrementToMax();
1310
+ break;
1311
+ case "PageDown":
1312
+ s.decrementToMin();
1313
+ break;
1314
+ case "Home":
1315
+ s.decrementToMin();
1316
+ break;
1317
+ case "End":
1318
+ s.incrementToMax();
1319
+ break;
1320
+ default: handled = false;
1321
+ }
1322
+ if (handled) e.preventDefault();
1323
+ };
1324
+ const onWheel = (e) => {
1325
+ const p = getProps();
1326
+ const s = getState();
1327
+ if (p.isWheelDisabled || isDisabled() || isReadOnly() || document.activeElement !== inputRef()) return;
1328
+ if (e.deltaY < 0) s.increment();
1329
+ else if (e.deltaY > 0) s.decrement();
1330
+ else return;
1331
+ e.preventDefault();
1332
+ };
1333
+ const labelProps = createMemo(() => {
1334
+ return {
1335
+ id: labelId,
1336
+ for: getProps().id ?? generatedInputId
1337
+ };
1338
+ });
1339
+ const descriptionProps = createMemo(() => ({ id: descriptionId }));
1340
+ const errorMessageProps = createMemo(() => ({ id: getProps()["aria-errormessage"] ?? errorMessageId }));
1341
+ const inputProps = createMemo(() => {
1342
+ const s = getState();
1343
+ const p = getProps();
1344
+ const channelLabel = s.channel && s.colorValue ? s.colorValue.getChannelName(s.channel, "en-US") : void 0;
1345
+ const required = p.isRequired || s.isRequired;
1346
+ const invalid = isInvalid();
1347
+ const describedBy = p["aria-describedby"];
1348
+ return {
1349
+ id: p.id ?? generatedInputId,
1350
+ type: "text",
1351
+ value: s.inputValue,
1352
+ name: s.channel ? void 0 : p.name,
1353
+ form: s.channel ? void 0 : p.form,
1354
+ placeholder: p.placeholder,
1355
+ disabled: isDisabled(),
1356
+ readOnly: isReadOnly(),
1357
+ required: validationBehavior() === "native" ? required || void 0 : void 0,
1358
+ tabIndex: isDisabled() ? void 0 : p.excludeFromTabOrder ? -1 : 0,
1359
+ autoComplete: "off",
1360
+ autoCorrect: "off",
1361
+ spellCheck: "false",
1362
+ "aria-label": p["aria-label"] ?? channelLabel,
1363
+ "aria-labelledby": p["aria-labelledby"],
1364
+ "aria-describedby": describedBy,
1365
+ "aria-details": p["aria-details"],
1366
+ "aria-errormessage": invalid ? p["aria-errormessage"] ?? errorMessageId : void 0,
1367
+ "aria-invalid": invalid || void 0,
1368
+ "aria-required": validationBehavior() === "aria" && required ? true : void 0,
1369
+ role: s.channel ? void 0 : "textbox",
1370
+ "aria-valuenow": void 0,
1371
+ "aria-valuemin": void 0,
1372
+ "aria-valuemax": void 0,
1373
+ "aria-valuetext": void 0,
1374
+ onInput: (e) => {
1375
+ const target = e.target;
1376
+ if (s.validate(target.value)) s.setInputValue(target.value);
1377
+ else target.value = s.inputValue;
1378
+ },
1379
+ onChange: () => {
1380
+ s.commit();
1381
+ },
1382
+ onBlur: () => {
1383
+ s.commit();
1384
+ },
1385
+ onKeyDown,
1386
+ onWheel
1387
+ };
1388
+ });
1389
+ return {
1390
+ get labelProps() {
1391
+ return labelProps();
1392
+ },
1393
+ get inputProps() {
1394
+ return inputProps();
1395
+ },
1396
+ get descriptionProps() {
1397
+ return descriptionProps();
1398
+ },
1399
+ get errorMessageProps() {
1400
+ return errorMessageProps();
1401
+ }
1402
+ };
1403
+ }
1404
+ //#endregion
1405
+ //#region src/color/createColorSwatch.ts
1406
+ /**
1407
+ * createColorSwatch hook.
1408
+ *
1409
+ * Provides ARIA attributes for a color swatch display.
1410
+ */
1411
+ /**
1412
+ * Creates ARIA props for a color swatch.
1413
+ */
1414
+ function createColorSwatch(props) {
1415
+ const getProps = () => props();
1416
+ const locale = useLocale();
1417
+ const stringFormatter = createColorStringFormatter();
1418
+ const generatedId = createId$1();
1419
+ const id = () => getProps().id ?? generatedId;
1420
+ const color = createMemo(() => normalizeColor(getProps().color ?? "#fff0"));
1421
+ const colorName = createMemo(() => {
1422
+ const p = getProps();
1423
+ if (p.colorName) return p.colorName;
1424
+ const resolvedColor = color();
1425
+ if (resolvedColor.getChannelValue("alpha") === 0) return stringFormatter().format("transparent");
1426
+ return resolvedColor.getColorName(locale().locale);
1427
+ });
1428
+ const swatchProps = createMemo(() => {
1429
+ const p = getProps();
1430
+ const domProps = filterDOMProps(p, { labelable: true });
1431
+ const ariaLabel = [colorName(), p["aria-label"] || ""].filter(Boolean).join(", ");
1432
+ return {
1433
+ ...domProps,
1434
+ id: id(),
1435
+ slot: p.slot,
1436
+ role: "img",
1437
+ "aria-roledescription": stringFormatter().format("colorSwatch"),
1438
+ "aria-label": ariaLabel,
1439
+ "aria-labelledby": p["aria-labelledby"] ? `${id()} ${p["aria-labelledby"]}` : void 0,
1440
+ style: {
1441
+ "background-color": color().toString("css"),
1442
+ "forced-color-adjust": "none"
1443
+ }
1444
+ };
1445
+ });
1446
+ return {
1447
+ get swatchProps() {
1448
+ return swatchProps();
1449
+ },
1450
+ get color() {
1451
+ return color();
1452
+ }
1453
+ };
1454
+ }
1455
+ //#endregion
1456
+ export { createColorSlider as a, createColorArea as i, createColorField as n, createColorWheel as r, createColorSwatch as t };
1457
+
1458
+ //# sourceMappingURL=color.js.map