@gemologic/sheen 0.1.0-rc.0 → 0.1.0-rc.2

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 (484) hide show
  1. package/README.md +11 -1
  2. package/THIRD_PARTY_NOTICES.md +18 -0
  3. package/dist/primitives/Accordion.js +1 -1
  4. package/dist/primitives/Collapsible.js +1 -1
  5. package/dist/primitives/Combobox.js +1 -1
  6. package/dist/primitives/CommandPalette.js +2 -2
  7. package/dist/primitives/ContextMenu.js +2 -2
  8. package/dist/primitives/Dialog.js +1 -1
  9. package/dist/primitives/DropdownMenu.js +2 -2
  10. package/dist/primitives/LinkTooltip.js +1 -1
  11. package/dist/primitives/Popover.js +1 -1
  12. package/dist/primitives/Select.js +1 -1
  13. package/dist/primitives/Tabs.js +1 -1
  14. package/dist/primitives/Tooltip.js +1 -1
  15. package/dist/primitives/tooltip-layer.js +1 -1
  16. package/dist/theme/ThemeProvider.js +30 -30
  17. package/dist/theme/intl.js +4 -4
  18. package/dist/utils/polymorphic.d.ts +1 -1
  19. package/dist/vite.d.ts +3 -0
  20. package/dist/vite.js +54 -0
  21. package/package.json +71 -5
  22. package/src/primitives/Accordion.tsx +1 -1
  23. package/src/primitives/Collapsible.tsx +1 -1
  24. package/src/primitives/Combobox.tsx +1 -1
  25. package/src/primitives/CommandPalette.tsx +2 -2
  26. package/src/primitives/ContextMenu.tsx +2 -2
  27. package/src/primitives/Dialog.tsx +1 -1
  28. package/src/primitives/DropdownMenu.tsx +2 -2
  29. package/src/primitives/LinkTooltip.tsx +1 -1
  30. package/src/primitives/Popover.tsx +1 -1
  31. package/src/primitives/Select.tsx +1 -1
  32. package/src/primitives/Tabs.tsx +1 -1
  33. package/src/primitives/Tooltip.tsx +1 -1
  34. package/src/primitives/tooltip-layer.tsx +1 -1
  35. package/src/theme/ThemeProvider.tsx +7 -3
  36. package/src/theme/intl.ts +4 -2
  37. package/src/utils/polymorphic.ts +1 -1
  38. package/src/vite.ts +51 -0
  39. package/vendor/cmdk-solid/LICENSE +14 -0
  40. package/vendor/cmdk-solid/chunk/5WIGIOAJ.jsx +98 -0
  41. package/vendor/cmdk-solid/chunk/IOVUHIGA.js +96 -0
  42. package/vendor/cmdk-solid/command-score.cjs +98 -0
  43. package/vendor/cmdk-solid/command-score.d.cts +4 -0
  44. package/vendor/cmdk-solid/command-score.d.ts +4 -0
  45. package/vendor/cmdk-solid/command-score.js +2 -0
  46. package/vendor/cmdk-solid/command-score.jsx +7 -0
  47. package/vendor/cmdk-solid/index.cjs +827 -0
  48. package/vendor/cmdk-solid/index.d.cts +184 -0
  49. package/vendor/cmdk-solid/index.d.ts +184 -0
  50. package/vendor/cmdk-solid/index.js +729 -0
  51. package/vendor/cmdk-solid/index.jsx +666 -0
  52. package/vendor/integrity.json +450 -0
  53. package/vendor/kobalte-core/LICENSE.md +21 -0
  54. package/vendor/kobalte-core/NOTICE.txt +231 -0
  55. package/vendor/kobalte-core/accordion/index.d.ts +10 -0
  56. package/vendor/kobalte-core/accordion/index.js +2 -0
  57. package/vendor/kobalte-core/accordion/index.jsx +33 -0
  58. package/vendor/kobalte-core/alert/index.d.ts +5 -0
  59. package/vendor/kobalte-core/alert/index.js +2 -0
  60. package/vendor/kobalte-core/alert/index.jsx +11 -0
  61. package/vendor/kobalte-core/alert-dialog/index.d.ts +10 -0
  62. package/vendor/kobalte-core/alert-dialog/index.js +3 -0
  63. package/vendor/kobalte-core/alert-dialog/index.jsx +40 -0
  64. package/vendor/kobalte-core/badge/index.d.ts +23 -0
  65. package/vendor/kobalte-core/badge/index.js +24 -0
  66. package/vendor/kobalte-core/badge/index.jsx +24 -0
  67. package/vendor/kobalte-core/breadcrumbs/index.d.ts +5 -0
  68. package/vendor/kobalte-core/breadcrumbs/index.js +2 -0
  69. package/vendor/kobalte-core/breadcrumbs/index.jsx +19 -0
  70. package/vendor/kobalte-core/button/index.d.ts +6 -0
  71. package/vendor/kobalte-core/button/index.js +2 -0
  72. package/vendor/kobalte-core/button/index.jsx +12 -0
  73. package/vendor/kobalte-core/button-root-da654b3e.d.ts +28 -0
  74. package/vendor/kobalte-core/checkbox/index.d.ts +8 -0
  75. package/vendor/kobalte-core/checkbox/index.js +2 -0
  76. package/vendor/kobalte-core/checkbox/index.jsx +35 -0
  77. package/vendor/kobalte-core/chunk/272QBW42.js +712 -0
  78. package/vendor/kobalte-core/chunk/27MLNS66.js +353 -0
  79. package/vendor/kobalte-core/chunk/2RVGL3MU.js +45 -0
  80. package/vendor/kobalte-core/chunk/2UV3VFID.jsx +431 -0
  81. package/vendor/kobalte-core/chunk/2X5XWQIS.js +19 -0
  82. package/vendor/kobalte-core/chunk/2YCOH52P.js +81 -0
  83. package/vendor/kobalte-core/chunk/3565MS4H.jsx +127 -0
  84. package/vendor/kobalte-core/chunk/3ARTUDH2.jsx +1633 -0
  85. package/vendor/kobalte-core/chunk/3D6FM2PJ.js +1001 -0
  86. package/vendor/kobalte-core/chunk/3DLZMX4Z.jsx +81 -0
  87. package/vendor/kobalte-core/chunk/3DZKSKAQ.jsx +366 -0
  88. package/vendor/kobalte-core/chunk/3JA5IX2L.jsx +52 -0
  89. package/vendor/kobalte-core/chunk/3NGA46QE.js +116 -0
  90. package/vendor/kobalte-core/chunk/3QQCO6IA.js +46 -0
  91. package/vendor/kobalte-core/chunk/3T74IGH6.js +860 -0
  92. package/vendor/kobalte-core/chunk/3XNSRO2W.jsx +226 -0
  93. package/vendor/kobalte-core/chunk/43XIKO67.js +99 -0
  94. package/vendor/kobalte-core/chunk/4VWIKJ7Q.jsx +842 -0
  95. package/vendor/kobalte-core/chunk/53Y5XP3B.js +61 -0
  96. package/vendor/kobalte-core/chunk/5WXHJDCZ.jsx +10 -0
  97. package/vendor/kobalte-core/chunk/5ZKAE4VZ.js +8 -0
  98. package/vendor/kobalte-core/chunk/66KLKSW3.js +36 -0
  99. package/vendor/kobalte-core/chunk/6TDKM7BK.jsx +815 -0
  100. package/vendor/kobalte-core/chunk/6Y7B2NEO.js +21 -0
  101. package/vendor/kobalte-core/chunk/7ABWW5DT.jsx +483 -0
  102. package/vendor/kobalte-core/chunk/7CVNMTYF.js +171 -0
  103. package/vendor/kobalte-core/chunk/7DPKSDZL.js +447 -0
  104. package/vendor/kobalte-core/chunk/7I44E2QD.js +190 -0
  105. package/vendor/kobalte-core/chunk/7LCANGHD.js +29 -0
  106. package/vendor/kobalte-core/chunk/7OVKXYPU.js +90 -0
  107. package/vendor/kobalte-core/chunk/7TPOQ36Z.js +202 -0
  108. package/vendor/kobalte-core/chunk/7ZHN3PYD.js +30 -0
  109. package/vendor/kobalte-core/chunk/ANN3A2QM.js +29 -0
  110. package/vendor/kobalte-core/chunk/AT6SKIG6.js +119 -0
  111. package/vendor/kobalte-core/chunk/AWVDBFMO.jsx +280 -0
  112. package/vendor/kobalte-core/chunk/B2CSS4CB.js +36 -0
  113. package/vendor/kobalte-core/chunk/BDJEWKR2.jsx +153 -0
  114. package/vendor/kobalte-core/chunk/BK63AFY4.js +348 -0
  115. package/vendor/kobalte-core/chunk/BLN63FDC.js +40 -0
  116. package/vendor/kobalte-core/chunk/BU4OFZP5.jsx +146 -0
  117. package/vendor/kobalte-core/chunk/CLZZ2KZC.js +152 -0
  118. package/vendor/kobalte-core/chunk/CODJDE4S.jsx +131 -0
  119. package/vendor/kobalte-core/chunk/CWAEFUDR.js +732 -0
  120. package/vendor/kobalte-core/chunk/DBKNBLZP.js +395 -0
  121. package/vendor/kobalte-core/chunk/DTAYBJDT.jsx +339 -0
  122. package/vendor/kobalte-core/chunk/DX4MAOJL.js +653 -0
  123. package/vendor/kobalte-core/chunk/E4R2EMM4.js +10 -0
  124. package/vendor/kobalte-core/chunk/E53DB7BS.jsx +34 -0
  125. package/vendor/kobalte-core/chunk/EHGSTO6V.jsx +138 -0
  126. package/vendor/kobalte-core/chunk/EJ5I5XML.jsx +1 -0
  127. package/vendor/kobalte-core/chunk/ET5T45DO.js +17 -0
  128. package/vendor/kobalte-core/chunk/EYO4IMPK.jsx +867 -0
  129. package/vendor/kobalte-core/chunk/FINWO3A5.jsx +21 -0
  130. package/vendor/kobalte-core/chunk/FKUFPCQ6.jsx +120 -0
  131. package/vendor/kobalte-core/chunk/FLVHQV4A.jsx +22 -0
  132. package/vendor/kobalte-core/chunk/FN6EICGO.jsx +44 -0
  133. package/vendor/kobalte-core/chunk/FOXVCQFV.jsx +48 -0
  134. package/vendor/kobalte-core/chunk/G3KI2B4X.js +228 -0
  135. package/vendor/kobalte-core/chunk/G4JQYERT.jsx +1 -0
  136. package/vendor/kobalte-core/chunk/GAVSAJBM.jsx +86 -0
  137. package/vendor/kobalte-core/chunk/GIRHAWVP.jsx +46 -0
  138. package/vendor/kobalte-core/chunk/GROIIANN.jsx +32 -0
  139. package/vendor/kobalte-core/chunk/GSF7SFRW.jsx +98 -0
  140. package/vendor/kobalte-core/chunk/GXANOQ5B.jsx +66 -0
  141. package/vendor/kobalte-core/chunk/H7BK6JF7.jsx +489 -0
  142. package/vendor/kobalte-core/chunk/HGKTPMYY.js +1332 -0
  143. package/vendor/kobalte-core/chunk/HWIPVJ7H.js +121 -0
  144. package/vendor/kobalte-core/chunk/I2LBZHJH.js +144 -0
  145. package/vendor/kobalte-core/chunk/ICNSTULC.js +33 -0
  146. package/vendor/kobalte-core/chunk/IGYOA2ZZ.jsx +33 -0
  147. package/vendor/kobalte-core/chunk/IN725QRS.js +175 -0
  148. package/vendor/kobalte-core/chunk/INFLGCRV.js +123 -0
  149. package/vendor/kobalte-core/chunk/JEP7F7FN.js +89 -0
  150. package/vendor/kobalte-core/chunk/JGNXQB3J.js +140 -0
  151. package/vendor/kobalte-core/chunk/JHMNWOLY.jsx +87 -0
  152. package/vendor/kobalte-core/chunk/JNCCF6MP.jsx +12 -0
  153. package/vendor/kobalte-core/chunk/K6ON3K7Z.js +93 -0
  154. package/vendor/kobalte-core/chunk/K6P57S75.js +23 -0
  155. package/vendor/kobalte-core/chunk/KEL2LLJM.jsx +244 -0
  156. package/vendor/kobalte-core/chunk/KQVCPTCE.js +316 -0
  157. package/vendor/kobalte-core/chunk/KR2RRKPK.jsx +197 -0
  158. package/vendor/kobalte-core/chunk/KVL5CS3M.jsx +37 -0
  159. package/vendor/kobalte-core/chunk/LP6E37CW.jsx +228 -0
  160. package/vendor/kobalte-core/chunk/LUHKRAPV.js +129 -0
  161. package/vendor/kobalte-core/chunk/LV6CC6HJ.js +226 -0
  162. package/vendor/kobalte-core/chunk/MUDPLHYE.js +56 -0
  163. package/vendor/kobalte-core/chunk/NEFPNRTI.jsx +426 -0
  164. package/vendor/kobalte-core/chunk/NY67XGGP.js +216 -0
  165. package/vendor/kobalte-core/chunk/OGE3DKII.jsx +413 -0
  166. package/vendor/kobalte-core/chunk/OK5BA5VH.jsx +533 -0
  167. package/vendor/kobalte-core/chunk/OPHDMVQK.jsx +217 -0
  168. package/vendor/kobalte-core/chunk/OPRD3XHK.js +207 -0
  169. package/vendor/kobalte-core/chunk/OU7DYFTQ.jsx +191 -0
  170. package/vendor/kobalte-core/chunk/OYES4GOP.jsx +21 -0
  171. package/vendor/kobalte-core/chunk/P6IXTWXS.jsx +197 -0
  172. package/vendor/kobalte-core/chunk/PBBM7A6R.jsx +113 -0
  173. package/vendor/kobalte-core/chunk/PKWJSNR5.js +474 -0
  174. package/vendor/kobalte-core/chunk/PTVG6YKC.js +148 -0
  175. package/vendor/kobalte-core/chunk/PTWD4LYA.jsx +537 -0
  176. package/vendor/kobalte-core/chunk/PYSNB6I6.jsx +324 -0
  177. package/vendor/kobalte-core/chunk/Q2T3QQUA.js +419 -0
  178. package/vendor/kobalte-core/chunk/QEMPLYZX.js +28 -0
  179. package/vendor/kobalte-core/chunk/QIRIOMOH.js +338 -0
  180. package/vendor/kobalte-core/chunk/QJIB6BDF.jsx +30 -0
  181. package/vendor/kobalte-core/chunk/QJK6CGTE.js +293 -0
  182. package/vendor/kobalte-core/chunk/R4V3527Z.js +130 -0
  183. package/vendor/kobalte-core/chunk/R5JXRO27.js +1 -0
  184. package/vendor/kobalte-core/chunk/RFN6X5VH.jsx +1058 -0
  185. package/vendor/kobalte-core/chunk/SD3NY4DU.js +344 -0
  186. package/vendor/kobalte-core/chunk/SLRA6PIF.jsx +263 -0
  187. package/vendor/kobalte-core/chunk/SOM3K36D.jsx +191 -0
  188. package/vendor/kobalte-core/chunk/STGRFJHZ.js +43 -0
  189. package/vendor/kobalte-core/chunk/T4C3DMHT.jsx +52 -0
  190. package/vendor/kobalte-core/chunk/TDH5Z2ZB.js +263 -0
  191. package/vendor/kobalte-core/chunk/TP2BLHDF.jsx +284 -0
  192. package/vendor/kobalte-core/chunk/TS4C47MF.js +22 -0
  193. package/vendor/kobalte-core/chunk/TSB6MOZK.jsx +242 -0
  194. package/vendor/kobalte-core/chunk/TVVHJCOX.js +204 -0
  195. package/vendor/kobalte-core/chunk/TY22MKYR.jsx +996 -0
  196. package/vendor/kobalte-core/chunk/UEEZAKDC.js +1 -0
  197. package/vendor/kobalte-core/chunk/UESR3MKV.jsx +743 -0
  198. package/vendor/kobalte-core/chunk/UGE6PPGT.jsx +220 -0
  199. package/vendor/kobalte-core/chunk/UKTBL2JL.jsx +88 -0
  200. package/vendor/kobalte-core/chunk/V25KEN4T.jsx +399 -0
  201. package/vendor/kobalte-core/chunk/VI7QYH27.jsx +33 -0
  202. package/vendor/kobalte-core/chunk/W4MWOWKG.js +310 -0
  203. package/vendor/kobalte-core/chunk/WAUM5GOD.jsx +68 -0
  204. package/vendor/kobalte-core/chunk/WHII6HHI.js +145 -0
  205. package/vendor/kobalte-core/chunk/WKVBAVXH.jsx +378 -0
  206. package/vendor/kobalte-core/chunk/WR5BIFYV.js +780 -0
  207. package/vendor/kobalte-core/chunk/XLBXJFYN.js +108 -0
  208. package/vendor/kobalte-core/chunk/XNF3WGZ2.jsx +176 -0
  209. package/vendor/kobalte-core/chunk/XOC6SOOC.jsx +53 -0
  210. package/vendor/kobalte-core/chunk/XTJD7L6B.jsx +101 -0
  211. package/vendor/kobalte-core/chunk/XUUROM4M.jsx +120 -0
  212. package/vendor/kobalte-core/chunk/YA7DCYMB.js +80 -0
  213. package/vendor/kobalte-core/chunk/YFEENJN5.jsx +41 -0
  214. package/vendor/kobalte-core/chunk/YGDQXQ2B.js +28 -0
  215. package/vendor/kobalte-core/chunk/YKGT7A57.js +85 -0
  216. package/vendor/kobalte-core/chunk/YPUNLYJC.js +268 -0
  217. package/vendor/kobalte-core/chunk/YSW4UOAR.js +40 -0
  218. package/vendor/kobalte-core/chunk/ZAGMEN2K.jsx +152 -0
  219. package/vendor/kobalte-core/chunk/ZG3NR5OC.jsx +120 -0
  220. package/vendor/kobalte-core/chunk/ZZYKR3VO.jsx +42 -0
  221. package/vendor/kobalte-core/collapsible/index.d.ts +7 -0
  222. package/vendor/kobalte-core/collapsible/index.js +2 -0
  223. package/vendor/kobalte-core/collapsible/index.jsx +23 -0
  224. package/vendor/kobalte-core/collapsible-trigger-6358fcd4.d.ts +84 -0
  225. package/vendor/kobalte-core/color-area/index.d.ts +189 -0
  226. package/vendor/kobalte-core/color-area/index.js +724 -0
  227. package/vendor/kobalte-core/color-area/index.jsx +777 -0
  228. package/vendor/kobalte-core/color-channel-field/index.d.ts +49 -0
  229. package/vendor/kobalte-core/color-channel-field/index.js +72 -0
  230. package/vendor/kobalte-core/color-channel-field/index.jsx +117 -0
  231. package/vendor/kobalte-core/color-field/index.d.ts +48 -0
  232. package/vendor/kobalte-core/color-field/index.js +114 -0
  233. package/vendor/kobalte-core/color-field/index.jsx +155 -0
  234. package/vendor/kobalte-core/color-mode/index.d.ts +78 -0
  235. package/vendor/kobalte-core/color-mode/index.js +2 -0
  236. package/vendor/kobalte-core/color-mode/index.jsx +28 -0
  237. package/vendor/kobalte-core/color-slider/index.d.ts +109 -0
  238. package/vendor/kobalte-core/color-slider/index.js +183 -0
  239. package/vendor/kobalte-core/color-slider/index.jsx +255 -0
  240. package/vendor/kobalte-core/color-swatch/index.d.ts +39 -0
  241. package/vendor/kobalte-core/color-swatch/index.js +48 -0
  242. package/vendor/kobalte-core/color-swatch/index.jsx +64 -0
  243. package/vendor/kobalte-core/color-wheel/index.d.ts +166 -0
  244. package/vendor/kobalte-core/color-wheel/index.js +620 -0
  245. package/vendor/kobalte-core/color-wheel/index.jsx +640 -0
  246. package/vendor/kobalte-core/colors/index.d.ts +15 -0
  247. package/vendor/kobalte-core/colors/index.js +2 -0
  248. package/vendor/kobalte-core/colors/index.jsx +17 -0
  249. package/vendor/kobalte-core/combobox/index.d.ts +20 -0
  250. package/vendor/kobalte-core/combobox/index.js +8 -0
  251. package/vendor/kobalte-core/combobox/index.jsx +80 -0
  252. package/vendor/kobalte-core/combobox-root-3702d1f6.d.ts +382 -0
  253. package/vendor/kobalte-core/context-menu/index.d.ts +15 -0
  254. package/vendor/kobalte-core/context-menu/index.js +5 -0
  255. package/vendor/kobalte-core/context-menu/index.jsx +75 -0
  256. package/vendor/kobalte-core/create-list-state-d9a0f1f2.d.ts +232 -0
  257. package/vendor/kobalte-core/dialog/index.d.ts +10 -0
  258. package/vendor/kobalte-core/dialog/index.js +2 -0
  259. package/vendor/kobalte-core/dialog/index.jsx +40 -0
  260. package/vendor/kobalte-core/dialog-trigger-f415bd9b.d.ts +184 -0
  261. package/vendor/kobalte-core/dismissable-layer/index.d.ts +51 -0
  262. package/vendor/kobalte-core/dismissable-layer/index.js +2 -0
  263. package/vendor/kobalte-core/dismissable-layer/index.jsx +12 -0
  264. package/vendor/kobalte-core/dropdown-menu/index.d.ts +18 -0
  265. package/vendor/kobalte-core/dropdown-menu/index.js +5 -0
  266. package/vendor/kobalte-core/dropdown-menu/index.jsx +73 -0
  267. package/vendor/kobalte-core/file-field/index.d.ts +221 -0
  268. package/vendor/kobalte-core/file-field/index.js +539 -0
  269. package/vendor/kobalte-core/file-field/index.jsx +564 -0
  270. package/vendor/kobalte-core/form-control-description-330657bc.d.ts +49 -0
  271. package/vendor/kobalte-core/form-control-error-message-9efcbea8.d.ts +25 -0
  272. package/vendor/kobalte-core/form-control-label-2a5ca7a3.d.ts +22 -0
  273. package/vendor/kobalte-core/hover-card/index.d.ts +11 -0
  274. package/vendor/kobalte-core/hover-card/index.js +3 -0
  275. package/vendor/kobalte-core/hover-card/index.jsx +33 -0
  276. package/vendor/kobalte-core/i18n/index.d.ts +81 -0
  277. package/vendor/kobalte-core/i18n/index.js +2 -0
  278. package/vendor/kobalte-core/i18n/index.jsx +28 -0
  279. package/vendor/kobalte-core/image/index.d.ts +5 -0
  280. package/vendor/kobalte-core/image/index.js +2 -0
  281. package/vendor/kobalte-core/image/index.jsx +17 -0
  282. package/vendor/kobalte-core/index-19a0ff67.d.ts +180 -0
  283. package/vendor/kobalte-core/index-1a4410b1.d.ts +184 -0
  284. package/vendor/kobalte-core/index-29c57b8d.d.ts +90 -0
  285. package/vendor/kobalte-core/index-2a97f0d5.d.ts +259 -0
  286. package/vendor/kobalte-core/index-339032c6.d.ts +24 -0
  287. package/vendor/kobalte-core/index-3a4165aa.d.ts +38 -0
  288. package/vendor/kobalte-core/index-45d19411.d.ts +181 -0
  289. package/vendor/kobalte-core/index-47114d4c.d.ts +153 -0
  290. package/vendor/kobalte-core/index-4933558f.d.ts +22 -0
  291. package/vendor/kobalte-core/index-4cb1a0c7.d.ts +178 -0
  292. package/vendor/kobalte-core/index-544033ad.d.ts +148 -0
  293. package/vendor/kobalte-core/index-5eae1bf9.d.ts +145 -0
  294. package/vendor/kobalte-core/index-64ed0578.d.ts +47 -0
  295. package/vendor/kobalte-core/index-68c6e688.d.ts +125 -0
  296. package/vendor/kobalte-core/index-71913923.d.ts +107 -0
  297. package/vendor/kobalte-core/index-774e18fb.d.ts +155 -0
  298. package/vendor/kobalte-core/index-78f1e72b.d.ts +22 -0
  299. package/vendor/kobalte-core/index-79050fd4.d.ts +22 -0
  300. package/vendor/kobalte-core/index-82a3d7cf.d.ts +76 -0
  301. package/vendor/kobalte-core/index-839e646d.d.ts +308 -0
  302. package/vendor/kobalte-core/index-8b78f50e.d.ts +96 -0
  303. package/vendor/kobalte-core/index-8dfcce13.d.ts +49 -0
  304. package/vendor/kobalte-core/index-929e4c7c.d.ts +109 -0
  305. package/vendor/kobalte-core/index-a6cbe732.d.ts +267 -0
  306. package/vendor/kobalte-core/index-a8504bc6.d.ts +105 -0
  307. package/vendor/kobalte-core/index-d652f235.d.ts +234 -0
  308. package/vendor/kobalte-core/index-d734f7ac.d.ts +120 -0
  309. package/vendor/kobalte-core/index-e3628d61.d.ts +405 -0
  310. package/vendor/kobalte-core/index-e8f9edc7.d.ts +484 -0
  311. package/vendor/kobalte-core/index-e96454a3.d.ts +113 -0
  312. package/vendor/kobalte-core/index-ed2fe8c4.d.ts +176 -0
  313. package/vendor/kobalte-core/index-f3e15e6a.d.ts +107 -0
  314. package/vendor/kobalte-core/index.d.ts +333 -0
  315. package/vendor/kobalte-core/index.js +56 -0
  316. package/vendor/kobalte-core/index.jsx +322 -0
  317. package/vendor/kobalte-core/link/index.d.ts +6 -0
  318. package/vendor/kobalte-core/link/index.js +2 -0
  319. package/vendor/kobalte-core/link/index.jsx +12 -0
  320. package/vendor/kobalte-core/link-root-bf54d4f3.d.ts +26 -0
  321. package/vendor/kobalte-core/listbox/index.d.ts +10 -0
  322. package/vendor/kobalte-core/listbox/index.js +2 -0
  323. package/vendor/kobalte-core/listbox/index.jsx +30 -0
  324. package/vendor/kobalte-core/listbox-item-indicator-b8390ce9.d.ts +27 -0
  325. package/vendor/kobalte-core/listbox-section-58338bda.d.ts +172 -0
  326. package/vendor/kobalte-core/menu/index.d.ts +41 -0
  327. package/vendor/kobalte-core/menu/index.js +2 -0
  328. package/vendor/kobalte-core/menu/index.jsx +72 -0
  329. package/vendor/kobalte-core/menu-sub-trigger-29a7ad75.d.ts +462 -0
  330. package/vendor/kobalte-core/menubar/index.d.ts +19 -0
  331. package/vendor/kobalte-core/menubar/index.js +6 -0
  332. package/vendor/kobalte-core/menubar/index.jsx +79 -0
  333. package/vendor/kobalte-core/menubar-context-c1a81ca0.d.ts +73 -0
  334. package/vendor/kobalte-core/meter/index.d.ts +15 -0
  335. package/vendor/kobalte-core/meter/index.js +2 -0
  336. package/vendor/kobalte-core/meter/index.jsx +23 -0
  337. package/vendor/kobalte-core/meter-value-label-797727cd.d.ts +117 -0
  338. package/vendor/kobalte-core/navigation-menu/index.d.ts +191 -0
  339. package/vendor/kobalte-core/navigation-menu/index.js +432 -0
  340. package/vendor/kobalte-core/navigation-menu/index.jsx +571 -0
  341. package/vendor/kobalte-core/number-field/index.d.ts +11 -0
  342. package/vendor/kobalte-core/number-field/index.js +5 -0
  343. package/vendor/kobalte-core/number-field/index.jsx +42 -0
  344. package/vendor/kobalte-core/number-field-root-3524531f.d.ts +128 -0
  345. package/vendor/kobalte-core/pagination/index.d.ts +6 -0
  346. package/vendor/kobalte-core/pagination/index.js +2 -0
  347. package/vendor/kobalte-core/pagination/index.jsx +26 -0
  348. package/vendor/kobalte-core/polymorphic/index.d.ts +29 -0
  349. package/vendor/kobalte-core/polymorphic/index.js +2 -0
  350. package/vendor/kobalte-core/polymorphic/index.jsx +8 -0
  351. package/vendor/kobalte-core/popover/index.d.ts +11 -0
  352. package/vendor/kobalte-core/popover/index.js +3 -0
  353. package/vendor/kobalte-core/popover/index.jsx +45 -0
  354. package/vendor/kobalte-core/popper/index.d.ts +42 -0
  355. package/vendor/kobalte-core/popper/index.js +2 -0
  356. package/vendor/kobalte-core/popper/index.jsx +20 -0
  357. package/vendor/kobalte-core/popper-arrow-89a19127.d.ts +24 -0
  358. package/vendor/kobalte-core/popper-root-c2da235c.d.ts +81 -0
  359. package/vendor/kobalte-core/primitives/create-collection/index.d.ts +16 -0
  360. package/vendor/kobalte-core/primitives/create-collection/index.js +3 -0
  361. package/vendor/kobalte-core/primitives/create-collection/index.jsx +12 -0
  362. package/vendor/kobalte-core/primitives/create-controllable-signal/index.d.ts +33 -0
  363. package/vendor/kobalte-core/primitives/create-controllable-signal/index.js +2 -0
  364. package/vendor/kobalte-core/primitives/create-controllable-signal/index.jsx +15 -0
  365. package/vendor/kobalte-core/primitives/create-disclosure-state/index.d.ts +31 -0
  366. package/vendor/kobalte-core/primitives/create-disclosure-state/index.js +2 -0
  367. package/vendor/kobalte-core/primitives/create-disclosure-state/index.jsx +10 -0
  368. package/vendor/kobalte-core/primitives/create-dom-collection/index.d.ts +32 -0
  369. package/vendor/kobalte-core/primitives/create-dom-collection/index.js +2 -0
  370. package/vendor/kobalte-core/primitives/create-dom-collection/index.jsx +17 -0
  371. package/vendor/kobalte-core/primitives/create-escape-key-down/index.d.ts +18 -0
  372. package/vendor/kobalte-core/primitives/create-escape-key-down/index.js +2 -0
  373. package/vendor/kobalte-core/primitives/create-escape-key-down/index.jsx +8 -0
  374. package/vendor/kobalte-core/primitives/create-focus-scope/index.d.ts +21 -0
  375. package/vendor/kobalte-core/primitives/create-focus-scope/index.js +2 -0
  376. package/vendor/kobalte-core/primitives/create-focus-scope/index.jsx +9 -0
  377. package/vendor/kobalte-core/primitives/create-form-reset-listener/index.d.ts +9 -0
  378. package/vendor/kobalte-core/primitives/create-form-reset-listener/index.js +2 -0
  379. package/vendor/kobalte-core/primitives/create-form-reset-listener/index.jsx +8 -0
  380. package/vendor/kobalte-core/primitives/create-hide-outside/index.d.ts +29 -0
  381. package/vendor/kobalte-core/primitives/create-hide-outside/index.js +2 -0
  382. package/vendor/kobalte-core/primitives/create-hide-outside/index.jsx +12 -0
  383. package/vendor/kobalte-core/primitives/create-interact-outside/index.d.ts +39 -0
  384. package/vendor/kobalte-core/primitives/create-interact-outside/index.js +2 -0
  385. package/vendor/kobalte-core/primitives/create-interact-outside/index.jsx +9 -0
  386. package/vendor/kobalte-core/primitives/create-register-id/index.d.ts +9 -0
  387. package/vendor/kobalte-core/primitives/create-register-id/index.js +2 -0
  388. package/vendor/kobalte-core/primitives/create-register-id/index.jsx +8 -0
  389. package/vendor/kobalte-core/primitives/create-size/index.d.ts +9 -0
  390. package/vendor/kobalte-core/primitives/create-size/index.js +2 -0
  391. package/vendor/kobalte-core/primitives/create-size/index.jsx +8 -0
  392. package/vendor/kobalte-core/primitives/create-tag-name/index.d.ts +15 -0
  393. package/vendor/kobalte-core/primitives/create-tag-name/index.js +2 -0
  394. package/vendor/kobalte-core/primitives/create-tag-name/index.jsx +9 -0
  395. package/vendor/kobalte-core/primitives/create-toggle-state/index.d.ts +33 -0
  396. package/vendor/kobalte-core/primitives/create-toggle-state/index.js +2 -0
  397. package/vendor/kobalte-core/primitives/create-toggle-state/index.jsx +10 -0
  398. package/vendor/kobalte-core/primitives/create-transition/index.d.ts +52 -0
  399. package/vendor/kobalte-core/primitives/create-transition/index.js +2 -0
  400. package/vendor/kobalte-core/primitives/create-transition/index.jsx +8 -0
  401. package/vendor/kobalte-core/progress/index.d.ts +6 -0
  402. package/vendor/kobalte-core/progress/index.js +2 -0
  403. package/vendor/kobalte-core/progress/index.jsx +24 -0
  404. package/vendor/kobalte-core/radio-group/index.d.ts +8 -0
  405. package/vendor/kobalte-core/radio-group/index.js +4 -0
  406. package/vendor/kobalte-core/radio-group/index.jsx +40 -0
  407. package/vendor/kobalte-core/radio-group-root-0af7f9b9.d.ts +195 -0
  408. package/vendor/kobalte-core/rating/index.d.ts +172 -0
  409. package/vendor/kobalte-core/rating/index.js +464 -0
  410. package/vendor/kobalte-core/rating/index.jsx +540 -0
  411. package/vendor/kobalte-core/search/index.d.ts +85 -0
  412. package/vendor/kobalte-core/search/index.js +177 -0
  413. package/vendor/kobalte-core/search/index.jsx +227 -0
  414. package/vendor/kobalte-core/segmented-control/index.d.ts +69 -0
  415. package/vendor/kobalte-core/segmented-control/index.js +162 -0
  416. package/vendor/kobalte-core/segmented-control/index.jsx +217 -0
  417. package/vendor/kobalte-core/select/index.d.ts +19 -0
  418. package/vendor/kobalte-core/select/index.js +6 -0
  419. package/vendor/kobalte-core/select/index.jsx +75 -0
  420. package/vendor/kobalte-core/separator/index.d.ts +6 -0
  421. package/vendor/kobalte-core/separator/index.js +2 -0
  422. package/vendor/kobalte-core/separator/index.jsx +12 -0
  423. package/vendor/kobalte-core/separator-root-cb685406.d.ts +25 -0
  424. package/vendor/kobalte-core/skeleton/index.d.ts +5 -0
  425. package/vendor/kobalte-core/skeleton/index.js +2 -0
  426. package/vendor/kobalte-core/skeleton/index.jsx +11 -0
  427. package/vendor/kobalte-core/slider/index.d.ts +11 -0
  428. package/vendor/kobalte-core/slider/index.js +5 -0
  429. package/vendor/kobalte-core/slider/index.jsx +43 -0
  430. package/vendor/kobalte-core/slider-value-label-2be90f59.d.ts +211 -0
  431. package/vendor/kobalte-core/spin-button/index.d.ts +10 -0
  432. package/vendor/kobalte-core/spin-button/index.js +2 -0
  433. package/vendor/kobalte-core/spin-button/index.jsx +12 -0
  434. package/vendor/kobalte-core/spin-button-root-3a44420a.d.ts +63 -0
  435. package/vendor/kobalte-core/switch/index.d.ts +8 -0
  436. package/vendor/kobalte-core/switch/index.js +2 -0
  437. package/vendor/kobalte-core/switch/index.jsx +35 -0
  438. package/vendor/kobalte-core/tabs/index.d.ts +8 -0
  439. package/vendor/kobalte-core/tabs/index.js +2 -0
  440. package/vendor/kobalte-core/tabs/index.jsx +27 -0
  441. package/vendor/kobalte-core/text-field/index.d.ts +9 -0
  442. package/vendor/kobalte-core/text-field/index.js +5 -0
  443. package/vendor/kobalte-core/text-field/index.jsx +34 -0
  444. package/vendor/kobalte-core/text-field-root-0b8dfa5a.d.ts +73 -0
  445. package/vendor/kobalte-core/time-field/index.d.ts +165 -0
  446. package/vendor/kobalte-core/time-field/index.js +818 -0
  447. package/vendor/kobalte-core/time-field/index.jsx +824 -0
  448. package/vendor/kobalte-core/toast/index.d.ts +6 -0
  449. package/vendor/kobalte-core/toast/index.js +2 -0
  450. package/vendor/kobalte-core/toast/index.jsx +33 -0
  451. package/vendor/kobalte-core/toggle-button/index.d.ts +7 -0
  452. package/vendor/kobalte-core/toggle-button/index.js +2 -0
  453. package/vendor/kobalte-core/toggle-button/index.jsx +16 -0
  454. package/vendor/kobalte-core/toggle-button-root-1cfacf95.d.ts +42 -0
  455. package/vendor/kobalte-core/toggle-group/index.d.ts +10 -0
  456. package/vendor/kobalte-core/toggle-group/index.js +2 -0
  457. package/vendor/kobalte-core/toggle-group/index.jsx +26 -0
  458. package/vendor/kobalte-core/tooltip/index.d.ts +10 -0
  459. package/vendor/kobalte-core/tooltip/index.js +3 -0
  460. package/vendor/kobalte-core/tooltip/index.jsx +32 -0
  461. package/vendor/kobalte-core/types-6adf33e1.d.ts +8 -0
  462. package/vendor/kobalte-core/types-877adc4a.d.ts +125 -0
  463. package/vendor/kobalte-core/types-f8ae18e5.d.ts +72 -0
  464. package/vendor/kobalte-core/utils-45fb8d63.d.ts +11 -0
  465. package/vendor/kobalte-utils/LICENSE.md +21 -0
  466. package/vendor/kobalte-utils/NOTICE.txt +231 -0
  467. package/vendor/kobalte-utils/index.cjs +878 -0
  468. package/vendor/kobalte-utils/index.d.cts +227 -0
  469. package/vendor/kobalte-utils/index.d.ts +227 -0
  470. package/vendor/kobalte-utils/index.js +791 -0
  471. package/vendor/origins.json +33 -0
  472. package/vendor/solid-web/LICENSE +21 -0
  473. package/vendor/solid-web/dev.cjs +896 -0
  474. package/vendor/solid-web/dev.js +784 -0
  475. package/vendor/solid-web/server.cjs +2 -0
  476. package/vendor/solid-web/server.js +2 -0
  477. package/vendor/solid-web/types/client.d.ts +93 -0
  478. package/vendor/solid-web/types/core.d.ts +2 -0
  479. package/vendor/solid-web/types/index.d.ts +50 -0
  480. package/vendor/solid-web/types/jsx.d.ts +1 -0
  481. package/vendor/solid-web/types/server-mock.d.ts +65 -0
  482. package/vendor/solid-web/types/server.d.ts +187 -0
  483. package/vendor/solid-web/web.cjs +885 -0
  484. package/vendor/solid-web/web.js +773 -0
@@ -0,0 +1,724 @@
1
+ // Vendored and modified by Gemologic Sheen from @kobalte/core@0.13.13; see package THIRD_PARTY_NOTICES.md.
2
+ import { parseColor, COLOR_INTL_TRANSLATIONS } from '../chunk/CWAEFUDR.js';
3
+ import { linearScale } from '../chunk/YSW4UOAR.js';
4
+ import { useLocale } from '../chunk/7TPOQ36Z.js';
5
+ import { FORM_CONTROL_FIELD_PROP_NAMES, createFormControlField } from '../chunk/K6P57S75.js';
6
+ import { FormControlLabel } from '../chunk/7ZHN3PYD.js';
7
+ export { FormControlLabel as Label } from '../chunk/7ZHN3PYD.js';
8
+ import { createFormResetListener } from '../chunk/ANN3A2QM.js';
9
+ import { FormControlErrorMessage } from '../chunk/ICNSTULC.js';
10
+ export { FormControlErrorMessage as ErrorMessage } from '../chunk/ICNSTULC.js';
11
+ import { FormControlDescription, useFormControlContext, FORM_CONTROL_PROP_NAMES, createFormControl, FormControlContext } from '../chunk/YKGT7A57.js';
12
+ export { FormControlDescription as Description } from '../chunk/YKGT7A57.js';
13
+ import { createControllableSignal } from '../chunk/BLN63FDC.js';
14
+ import { Polymorphic } from '../chunk/6Y7B2NEO.js';
15
+ import { createComponent, mergeProps, spread, memo, template } from 'solid-js/web';
16
+ import { mergeRefs, mergeDefaultProps, createGenerateId, access, callHandler, visuallyHiddenStyles, clamp, snapValueToStep } from "#sheen-kobalte-utils";
17
+ import { combineStyle } from '@solid-primitives/props';
18
+ import { createContext, useContext, splitProps, createSignal, createMemo, createUniqueId } from 'solid-js';
19
+
20
+ var ColorAreaContext = createContext();
21
+ function useColorAreaContext() {
22
+ const context = useContext(ColorAreaContext);
23
+ if (context === void 0) {
24
+ throw new Error("[kobalte]: `useColorAreaContext` must be used within a `ColorArea` component");
25
+ }
26
+ return context;
27
+ }
28
+
29
+ // src/color-area/color-area-background.tsx
30
+ function ColorAreaBackground(props) {
31
+ const context = useColorAreaContext();
32
+ const formControlContext = useFormControlContext();
33
+ const [local, others] = splitProps(props, ["style", "onPointerDown", "onPointerMove", "onPointerUp"]);
34
+ const {
35
+ direction
36
+ } = useLocale();
37
+ const [sRect, setRect] = createSignal();
38
+ const getValueFromPointer = (pointerPosition) => {
39
+ const rect = sRect() || context.backgroundRef().getBoundingClientRect();
40
+ const xInput = [0, rect.width];
41
+ const xOutput = [context.state.xMinValue(), context.state.xMaxValue()];
42
+ const yInput = [0, rect.height];
43
+ const yOutput = [context.state.yMinValue(), context.state.yMaxValue()];
44
+ const xValue = linearScale(xInput, xOutput);
45
+ const yValue = linearScale(yInput, yOutput);
46
+ setRect(rect);
47
+ return [xValue(pointerPosition.x - rect.left), yValue(pointerPosition.y - rect.top)];
48
+ };
49
+ let startPosition = {
50
+ x: 0,
51
+ y: 0
52
+ };
53
+ const onPointerDown = (e) => {
54
+ callHandler(e, local.onPointerDown);
55
+ const target = e.target;
56
+ target.setPointerCapture(e.pointerId);
57
+ e.preventDefault();
58
+ const value = getValueFromPointer({
59
+ x: e.clientX,
60
+ y: e.clientY
61
+ });
62
+ startPosition = {
63
+ x: e.clientX,
64
+ y: e.clientY
65
+ };
66
+ context.onDragStart?.(value);
67
+ };
68
+ const onPointerMove = (e) => {
69
+ callHandler(e, local.onPointerMove);
70
+ const target = e.target;
71
+ if (target.hasPointerCapture(e.pointerId)) {
72
+ context.onDrag?.({
73
+ deltaX: e.clientX - startPosition.x,
74
+ deltaY: e.clientY - startPosition.y
75
+ });
76
+ startPosition = {
77
+ x: e.clientX,
78
+ y: e.clientY
79
+ };
80
+ }
81
+ };
82
+ const onPointerUp = (e) => {
83
+ callHandler(e, local.onPointerUp);
84
+ const target = e.target;
85
+ if (target.hasPointerCapture(e.pointerId)) {
86
+ target.releasePointerCapture(e.pointerId);
87
+ setRect(void 0);
88
+ context.onDragEnd?.();
89
+ }
90
+ };
91
+ const backgroundStyles = createMemo(() => {
92
+ const end = direction() === "ltr" ? "right" : "left";
93
+ const zValue = context.state.value().getChannelValue(context.state.channels().zChannel);
94
+ switch (context.state.value().getColorSpace()) {
95
+ case "rgb": {
96
+ const rgb = parseColor("rgb(0, 0, 0)");
97
+ return {
98
+ background: [`linear-gradient(to ${end}, ${rgb.withChannelValue(context.state.channels().xChannel, 0)}, ${rgb.withChannelValue(context.state.channels().xChannel, 255)})`, `linear-gradient(to top, ${rgb.withChannelValue(context.state.channels().yChannel, 0)}, ${rgb.withChannelValue(context.state.channels().yChannel, 255)})`, rgb.withChannelValue(context.state.channels().zChannel, zValue)].join(","),
99
+ "background-blend-mode": "screen"
100
+ };
101
+ }
102
+ case "hsl": {
103
+ const value = parseColor("hsl(0, 100%, 50%)").withChannelValue(context.state.channels().zChannel, zValue);
104
+ const bg = context.state.value().getColorChannels().filter((c) => c !== context.state.channels().zChannel).map((c) => `linear-gradient(to ${c === context.state.channels().xChannel ? end : "top"}, ${hslChannels[c](value)})`).reverse();
105
+ if (context.state.channels().zChannel === "hue") {
106
+ bg.push(value.toString("css"));
107
+ }
108
+ return {
109
+ background: bg.join(", ")
110
+ };
111
+ }
112
+ case "hsb": {
113
+ const value = parseColor("hsb(0, 100%, 100%)").withChannelValue(context.state.channels().zChannel, zValue);
114
+ const bg = context.state.value().getColorChannels().filter((c) => c !== context.state.channels().zChannel).map((c) => `linear-gradient(to ${c === context.state.channels().xChannel ? end : "top"}, ${hsbChannels[c](value)})`).reverse();
115
+ if (context.state.channels().zChannel === "hue") {
116
+ bg.push(value.toString("css"));
117
+ }
118
+ return {
119
+ background: bg.join(", ")
120
+ };
121
+ }
122
+ }
123
+ });
124
+ return createComponent(Polymorphic, mergeProps({
125
+ as: "div",
126
+ ref(r$) {
127
+ const _ref$ = mergeRefs(context.setBackgroundRef, props.ref);
128
+ typeof _ref$ === "function" && _ref$(r$);
129
+ },
130
+ get style() {
131
+ return combineStyle({
132
+ "touch-action": "none",
133
+ "forced-color-adjust": "none",
134
+ ...backgroundStyles()
135
+ }, local.style);
136
+ },
137
+ onPointerDown,
138
+ onPointerMove,
139
+ onPointerUp
140
+ }, () => formControlContext.dataset(), others));
141
+ }
142
+ var hue = (color) => [0, 60, 120, 180, 240, 300, 360].map((hue2) => color.withChannelValue("hue", hue2).toString("css")).join(", ");
143
+ var saturation = (color) => `${color.withChannelValue("saturation", 0)}, transparent`;
144
+ var hslChannels = {
145
+ hue,
146
+ saturation,
147
+ lightness: () => "black, transparent, white"
148
+ };
149
+ var hsbChannels = {
150
+ hue,
151
+ saturation,
152
+ brightness: () => "black, transparent"
153
+ };
154
+ var _tmpl$ = /* @__PURE__ */ template(`<input type="range">`);
155
+ function ColorAreaHiddenInputBase(props) {
156
+ const formControlContext = useFormControlContext();
157
+ const context = useColorAreaContext();
158
+ const mergedProps = mergeDefaultProps({
159
+ id: context.generateId("input"),
160
+ orientation: "horizontal"
161
+ }, props);
162
+ const [local, formControlFieldProps, others] = splitProps(mergedProps, ["style", "orientation", "onChange", "onFocus", "onBlur"], FORM_CONTROL_FIELD_PROP_NAMES);
163
+ const {
164
+ fieldProps
165
+ } = createFormControlField(formControlFieldProps);
166
+ const isVertical = () => local.orientation === "vertical";
167
+ const ariaLabel = () => {
168
+ return [fieldProps.ariaLabel(), context.translations().colorPicker].filter(Boolean).join(", ");
169
+ };
170
+ const onChange = (e) => {
171
+ callHandler(e, local.onChange);
172
+ const target = e.target;
173
+ isVertical() ? context.state.setYValue(Number.parseFloat(target.value)) : context.state.setXValue(Number.parseFloat(target.value));
174
+ target.value = String(isVertical() ? context.state.yValue() : context.state.xValue()) ?? "";
175
+ };
176
+ const valueText = createMemo(() => {
177
+ const channel = isVertical() ? context.state.channels().yChannel : context.state.channels().xChannel;
178
+ return `${context.state.value().getChannelName(channel, COLOR_INTL_TRANSLATIONS)} ${context.state.value().formatChannelValue(channel)}, ${context.state.value().getColorName(COLOR_INTL_TRANSLATIONS)}`;
179
+ });
180
+ return (() => {
181
+ const _el$ = _tmpl$();
182
+ _el$.addEventListener("change", onChange);
183
+ spread(_el$, mergeProps({
184
+ get id() {
185
+ return fieldProps.id();
186
+ },
187
+ get name() {
188
+ return (isVertical() ? context.yName() : context.xName()) || formControlContext.name();
189
+ },
190
+ get tabIndex() {
191
+ return context.state.isDisabled() ? void 0 : -1;
192
+ },
193
+ get min() {
194
+ return memo(() => !!isVertical())() ? context.state.yMinValue() : context.state.xMinValue();
195
+ },
196
+ get max() {
197
+ return memo(() => !!isVertical())() ? context.state.yMaxValue() : context.state.xMaxValue();
198
+ },
199
+ get step() {
200
+ return memo(() => !!isVertical())() ? context.state.yStep() : context.state.xStep();
201
+ },
202
+ get value() {
203
+ return memo(() => !!isVertical())() ? context.state.yValue() : context.state.xValue();
204
+ },
205
+ get required() {
206
+ return formControlContext.isRequired();
207
+ },
208
+ get disabled() {
209
+ return formControlContext.isDisabled();
210
+ },
211
+ get readonly() {
212
+ return formControlContext.isReadOnly();
213
+ },
214
+ get style() {
215
+ return combineStyle({
216
+ ...visuallyHiddenStyles
217
+ }, local.style);
218
+ },
219
+ get ["aria-roledescription"]() {
220
+ return context.translations().twoDimensionalSlider;
221
+ },
222
+ get ["aria-valuetext"]() {
223
+ return valueText();
224
+ },
225
+ get ["aria-orientation"]() {
226
+ return local.orientation;
227
+ },
228
+ get ["aria-label"]() {
229
+ return ariaLabel();
230
+ },
231
+ get ["aria-labelledby"]() {
232
+ return fieldProps.ariaLabelledBy();
233
+ },
234
+ get ["aria-describedby"]() {
235
+ return fieldProps.ariaDescribedBy();
236
+ },
237
+ get ["aria-invalid"]() {
238
+ return formControlContext.validationState() === "invalid" || void 0;
239
+ },
240
+ get ["aria-required"]() {
241
+ return formControlContext.isRequired() || void 0;
242
+ },
243
+ get ["aria-disabled"]() {
244
+ return formControlContext.isDisabled() || void 0;
245
+ },
246
+ get ["aria-readonly"]() {
247
+ return formControlContext.isReadOnly() || void 0;
248
+ },
249
+ get ["data-orientation"]() {
250
+ return local.orientation;
251
+ }
252
+ }, () => formControlContext.dataset(), others), false, false);
253
+ return _el$;
254
+ })();
255
+ }
256
+
257
+ // src/color-area/color-area-hidden-input-x.tsx
258
+ function ColorAreaHiddenInputX(props) {
259
+ return createComponent(ColorAreaHiddenInputBase, props);
260
+ }
261
+ function ColorAreaHiddenInputY(props) {
262
+ return createComponent(ColorAreaHiddenInputBase, mergeProps({
263
+ orientation: "vertical"
264
+ }, props));
265
+ }
266
+
267
+ // src/color-area/color-area.intl.ts
268
+ var COLOR_AREA_INTL_TRANSLATIONS = {
269
+ colorPicker: "Color picker",
270
+ twoDimensionalSlider: "2D slider"
271
+ };
272
+ function createColorAreaState(props) {
273
+ const mergedProps = mergeDefaultProps(
274
+ {
275
+ isDisabled: () => false,
276
+ defaultValue: () => parseColor("hsl(0, 100%, 50%)")
277
+ },
278
+ props
279
+ );
280
+ const [value, setValue] = createControllableSignal({
281
+ value: mergedProps.value,
282
+ defaultValue: mergedProps.defaultValue,
283
+ onChange: (value2) => mergedProps.onChange?.(value2)
284
+ });
285
+ const color = createMemo(() => {
286
+ return mergedProps.colorSpace?.() ? value().toFormat(mergedProps.colorSpace()) : value();
287
+ });
288
+ const channels = createMemo(() => {
289
+ return color().getColorSpaceAxes({
290
+ xChannel: mergedProps.xChannel?.(),
291
+ yChannel: mergedProps.yChannel?.()
292
+ });
293
+ });
294
+ const xChannelRange = () => color().getChannelRange(channels().xChannel);
295
+ const yChannelRange = () => color().getChannelRange(channels().yChannel);
296
+ const xStep = () => xChannelRange().step;
297
+ const yStep = () => yChannelRange().step;
298
+ const xPageSize = () => xChannelRange().pageSize;
299
+ const yPageSize = () => yChannelRange().pageSize;
300
+ const xMaxValue = () => xChannelRange().maxValue;
301
+ const xMinValue = () => xChannelRange().minValue;
302
+ const yMaxValue = () => yChannelRange().maxValue;
303
+ const yMinValue = () => yChannelRange().minValue;
304
+ const [isDragging, setIsDragging] = createSignal(false);
305
+ const initialValue = color();
306
+ const resetValue = () => {
307
+ setValue(initialValue);
308
+ };
309
+ const xValue = () => color().getChannelValue(channels().xChannel);
310
+ const yValue = () => color().getChannelValue(channels().yChannel);
311
+ const setXValue = (value2) => {
312
+ if (value2 === xValue())
313
+ return;
314
+ setValue(color().withChannelValue(channels().xChannel, value2));
315
+ };
316
+ const setYValue = (value2) => {
317
+ if (value2 === yValue())
318
+ return;
319
+ setValue(color().withChannelValue(channels().yChannel, value2));
320
+ };
321
+ const incrementX = (stepSize = 1) => {
322
+ setXValue(
323
+ xValue() + stepSize > xMaxValue() ? xMaxValue() : snapValueToStep(
324
+ xValue() + stepSize,
325
+ xMinValue(),
326
+ xMaxValue(),
327
+ xStep()
328
+ )
329
+ );
330
+ };
331
+ const incrementY = (stepSize = 1) => {
332
+ setYValue(
333
+ yValue() + stepSize > yMaxValue() ? yMaxValue() : snapValueToStep(
334
+ yValue() + stepSize,
335
+ yMinValue(),
336
+ yMaxValue(),
337
+ yStep()
338
+ )
339
+ );
340
+ };
341
+ const decrementX = (stepSize = 1) => {
342
+ setXValue(
343
+ snapValueToStep(xValue() - stepSize, xMinValue(), xMaxValue(), xStep())
344
+ );
345
+ };
346
+ const decrementY = (stepSize = 1) => {
347
+ setYValue(
348
+ snapValueToStep(yValue() - stepSize, yMinValue(), yMaxValue(), yStep())
349
+ );
350
+ };
351
+ const getThumbPosition = () => {
352
+ const x = (xValue() - xMinValue()) / (xMaxValue() - xMinValue());
353
+ const y = (yMaxValue() - (yValue() - yMinValue())) / (yMaxValue() - yMinValue());
354
+ return { x, y };
355
+ };
356
+ const getValuePercent = () => {
357
+ const x = (xValue() - xMinValue()) / xMaxValue() - xMinValue();
358
+ const y = (yValue() - yMinValue()) / yMaxValue() - yMinValue();
359
+ return { x, y };
360
+ };
361
+ const updateValue = (value2) => {
362
+ if (mergedProps.isDisabled())
363
+ return;
364
+ const xSnappedValue = snapValueToStep(
365
+ value2.x,
366
+ xMinValue(),
367
+ xMaxValue(),
368
+ xStep()
369
+ );
370
+ const ySnappedValue = snapValueToStep(
371
+ value2.y,
372
+ yMinValue(),
373
+ yMaxValue(),
374
+ yStep()
375
+ );
376
+ if (xSnappedValue === xValue() && ySnappedValue === yValue())
377
+ return;
378
+ setValue(
379
+ color().withChannelValue(channels().xChannel, xSnappedValue).withChannelValue(channels().yChannel, ySnappedValue)
380
+ );
381
+ };
382
+ const setThumbPercent = (value2) => {
383
+ updateValue(getPercentValues(value2.x, value2.y));
384
+ };
385
+ const getRoundedValues = (value2) => {
386
+ const x = Math.round((value2.x - xMinValue()) / xStep()) * xStep() + xMinValue();
387
+ const y = Math.round((value2.y - yMinValue()) / yStep()) * yStep() + yMinValue();
388
+ return { x, y };
389
+ };
390
+ const getPercentValues = (xPercent, yPercent) => {
391
+ const x = xPercent * (xMaxValue() - xMinValue()) + xMinValue();
392
+ const y = yPercent * (yMaxValue() - yMinValue()) + yMinValue();
393
+ const roundedValues = getRoundedValues({ x, y });
394
+ return {
395
+ x: clamp(roundedValues.x, xMinValue(), xMaxValue()),
396
+ y: clamp(roundedValues.y, yMinValue(), yMaxValue())
397
+ };
398
+ };
399
+ const updateDragging = (dragging) => {
400
+ if (mergedProps.isDisabled())
401
+ return;
402
+ const wasDragging = isDragging();
403
+ setIsDragging(dragging);
404
+ if (wasDragging && !isDragging()) {
405
+ mergedProps.onChangeEnd?.(color());
406
+ }
407
+ };
408
+ return {
409
+ value: color,
410
+ xValue,
411
+ yValue,
412
+ xStep,
413
+ yStep,
414
+ xPageSize,
415
+ yPageSize,
416
+ xMaxValue,
417
+ yMaxValue,
418
+ xMinValue,
419
+ yMinValue,
420
+ setValue,
421
+ setXValue,
422
+ setYValue,
423
+ incrementX,
424
+ decrementX,
425
+ incrementY,
426
+ decrementY,
427
+ getThumbPosition,
428
+ isDragging,
429
+ setIsDragging: updateDragging,
430
+ channels,
431
+ resetValue,
432
+ setThumbPercent,
433
+ setThumbValue: updateValue,
434
+ getThumbPercent: getValuePercent,
435
+ isDisabled: mergedProps.isDisabled
436
+ };
437
+ }
438
+
439
+ // src/color-area/color-area-root.tsx
440
+ function ColorAreaRoot(props) {
441
+ let ref;
442
+ const defaultId = `colorarea-${createUniqueId()}`;
443
+ const mergedProps = mergeDefaultProps({
444
+ id: defaultId,
445
+ translations: COLOR_AREA_INTL_TRANSLATIONS,
446
+ disabled: false,
447
+ defaultValue: parseColor("hsl(0, 100%, 50%)")
448
+ }, props);
449
+ const [local, formControlProps, others] = splitProps(mergedProps, ["ref", "value", "defaultValue", "colorSpace", "xChannel", "yChannel", "onChange", "onChangeEnd", "translations", "xName", "yName", "disabled"], FORM_CONTROL_PROP_NAMES);
450
+ const {
451
+ formControlContext
452
+ } = createFormControl(formControlProps);
453
+ const {
454
+ direction
455
+ } = useLocale();
456
+ const [backgroundRef, setBackgroundRef] = createSignal();
457
+ const [thumbRef, setThumbRef] = createSignal();
458
+ const state = createColorAreaState({
459
+ value: () => local.value,
460
+ defaultValue: () => local.defaultValue,
461
+ onChange: local.onChange,
462
+ onChangeEnd: local.onChangeEnd,
463
+ colorSpace: () => local.colorSpace,
464
+ xChannel: () => local.xChannel,
465
+ yChannel: () => local.yChannel,
466
+ isDisabled: () => formControlContext.isDisabled() ?? false
467
+ });
468
+ createFormResetListener(() => ref, () => state.resetValue());
469
+ const isLTR = () => direction() === "ltr";
470
+ let currentPosition = null;
471
+ const onDragStart = (value) => {
472
+ state.setIsDragging(true);
473
+ state.setThumbValue({
474
+ x: value[0],
475
+ y: context.state.yMaxValue() - value[1]
476
+ });
477
+ currentPosition = null;
478
+ };
479
+ const onDrag = ({
480
+ deltaX,
481
+ deltaY
482
+ }) => {
483
+ const {
484
+ width,
485
+ height
486
+ } = backgroundRef().getBoundingClientRect();
487
+ if (currentPosition === null) {
488
+ currentPosition = {
489
+ x: state.getThumbPercent().x * width,
490
+ y: state.getThumbPercent().y * height
491
+ };
492
+ }
493
+ currentPosition.x += deltaX;
494
+ currentPosition.y += -deltaY;
495
+ const xPercent = clamp(currentPosition.x / width, 0, 1);
496
+ const yPercent = clamp(currentPosition.y / height, 0, 1);
497
+ state.setThumbPercent({
498
+ x: xPercent,
499
+ y: yPercent
500
+ });
501
+ local.onChange?.(state.value());
502
+ };
503
+ const onDragEnd = () => {
504
+ state.setIsDragging(false);
505
+ thumbRef()?.focus();
506
+ };
507
+ const getDisplayColor = () => {
508
+ return state.value().withChannelValue("alpha", 1);
509
+ };
510
+ const onHomeKeyDown = (event) => {
511
+ if (!formControlContext.isDisabled()) {
512
+ event.preventDefault();
513
+ event.stopPropagation();
514
+ if (!isLTR()) {
515
+ state.incrementX(state.xPageSize());
516
+ } else {
517
+ state.decrementX(state.xPageSize());
518
+ }
519
+ }
520
+ };
521
+ const onEndKeyDown = (event) => {
522
+ if (!formControlContext.isDisabled()) {
523
+ event.preventDefault();
524
+ event.stopPropagation();
525
+ if (!isLTR()) {
526
+ state.decrementX(state.xPageSize());
527
+ } else {
528
+ state.incrementX(state.xPageSize());
529
+ }
530
+ }
531
+ };
532
+ const onStepKeyDown = (event) => {
533
+ if (!formControlContext.isDisabled()) {
534
+ switch (event.key) {
535
+ case "Left":
536
+ case "ArrowLeft":
537
+ event.preventDefault();
538
+ event.stopPropagation();
539
+ if (!isLTR()) {
540
+ state.incrementX(event.shiftKey ? state.xPageSize() : state.xStep());
541
+ } else {
542
+ state.decrementX(event.shiftKey ? state.xPageSize() : state.xStep());
543
+ }
544
+ break;
545
+ case "Down":
546
+ case "ArrowDown":
547
+ event.preventDefault();
548
+ event.stopPropagation();
549
+ state.decrementY(event.shiftKey ? state.yPageSize() : state.yStep());
550
+ break;
551
+ case "Up":
552
+ case "ArrowUp":
553
+ event.preventDefault();
554
+ event.stopPropagation();
555
+ state.incrementY(event.shiftKey ? state.yPageSize() : state.yStep());
556
+ break;
557
+ case "Right":
558
+ case "ArrowRight":
559
+ event.preventDefault();
560
+ event.stopPropagation();
561
+ if (!isLTR()) {
562
+ state.decrementX(event.shiftKey ? state.xPageSize() : state.xStep());
563
+ } else {
564
+ state.incrementX(event.shiftKey ? state.xPageSize() : state.xStep());
565
+ }
566
+ break;
567
+ case "Home":
568
+ onHomeKeyDown(event);
569
+ break;
570
+ case "End":
571
+ onEndKeyDown(event);
572
+ break;
573
+ case "PageUp":
574
+ event.preventDefault();
575
+ event.stopPropagation();
576
+ state.incrementY(state.yPageSize());
577
+ break;
578
+ case "PageDown":
579
+ event.preventDefault();
580
+ event.stopPropagation();
581
+ state.decrementY(state.yPageSize());
582
+ break;
583
+ }
584
+ }
585
+ };
586
+ const context = {
587
+ state,
588
+ xName: () => local.xName,
589
+ yName: () => local.yName,
590
+ onDragStart,
591
+ onDrag,
592
+ onDragEnd,
593
+ translations: () => local.translations,
594
+ getDisplayColor,
595
+ onStepKeyDown,
596
+ backgroundRef,
597
+ setBackgroundRef,
598
+ thumbRef,
599
+ setThumbRef,
600
+ generateId: createGenerateId(() => access(formControlProps.id))
601
+ };
602
+ return createComponent(FormControlContext.Provider, {
603
+ value: formControlContext,
604
+ get children() {
605
+ return createComponent(ColorAreaContext.Provider, {
606
+ value: context,
607
+ get children() {
608
+ return createComponent(Polymorphic, mergeProps({
609
+ as: "div",
610
+ ref(r$) {
611
+ const _ref$ = mergeRefs((el) => ref = el, local.ref);
612
+ typeof _ref$ === "function" && _ref$(r$);
613
+ },
614
+ role: "group",
615
+ get id() {
616
+ return access(formControlProps.id);
617
+ }
618
+ }, () => formControlContext.dataset(), others));
619
+ }
620
+ });
621
+ }
622
+ });
623
+ }
624
+ function ColorAreaThumb(props) {
625
+ const context = useColorAreaContext();
626
+ const formControlContext = useFormControlContext();
627
+ const [local, others] = splitProps(props, ["style", "aria-label", "onKeyDown", "onPointerDown", "onPointerMove", "onPointerUp"]);
628
+ const ariaLabel = () => {
629
+ const xChannel = context.state.channels().xChannel;
630
+ const yChannel = context.state.channels().yChannel;
631
+ const xChannelName = `${context.state.value().getChannelName(xChannel, COLOR_INTL_TRANSLATIONS)} ${context.state.value().formatChannelValue(xChannel)}`;
632
+ const yChannelName = `${context.state.value().getChannelName(yChannel, COLOR_INTL_TRANSLATIONS)} ${context.state.value().formatChannelValue(yChannel)}`;
633
+ const colorName = context.state.value().getColorName(COLOR_INTL_TRANSLATIONS);
634
+ return local["aria-label"] ?? [xChannelName, yChannelName, colorName].join(", ");
635
+ };
636
+ const onKeyDown = (e) => {
637
+ callHandler(e, local.onKeyDown);
638
+ context.onStepKeyDown(e);
639
+ };
640
+ let startPosition = {
641
+ x: 0,
642
+ y: 0
643
+ };
644
+ const onPointerDown = (e) => {
645
+ callHandler(e, local.onPointerDown);
646
+ const target = e.currentTarget;
647
+ e.preventDefault();
648
+ e.stopPropagation();
649
+ target.setPointerCapture(e.pointerId);
650
+ target.focus();
651
+ startPosition = {
652
+ x: e.clientX,
653
+ y: e.clientY
654
+ };
655
+ context.onDragStart?.([context.state.xValue(), context.state.yMaxValue() - context.state.yValue()]);
656
+ };
657
+ const onPointerMove = (e) => {
658
+ e.stopPropagation();
659
+ callHandler(e, local.onPointerMove);
660
+ const target = e.currentTarget;
661
+ if (target.hasPointerCapture(e.pointerId)) {
662
+ const delta = {
663
+ deltaX: e.clientX - startPosition.x,
664
+ deltaY: e.clientY - startPosition.y
665
+ };
666
+ context.onDrag?.(delta);
667
+ startPosition = {
668
+ x: e.clientX,
669
+ y: e.clientY
670
+ };
671
+ }
672
+ };
673
+ const onPointerUp = (e) => {
674
+ e.stopPropagation();
675
+ callHandler(e, local.onPointerUp);
676
+ const target = e.currentTarget;
677
+ if (target.hasPointerCapture(e.pointerId)) {
678
+ target.releasePointerCapture(e.pointerId);
679
+ context.onDragEnd?.();
680
+ }
681
+ };
682
+ return createComponent(Polymorphic, mergeProps({
683
+ as: "span",
684
+ ref(r$) {
685
+ const _ref$ = mergeRefs(context.setThumbRef, props.ref);
686
+ typeof _ref$ === "function" && _ref$(r$);
687
+ },
688
+ role: "presentation",
689
+ get tabIndex() {
690
+ return context.state.isDisabled() ? void 0 : 0;
691
+ },
692
+ get style() {
693
+ return combineStyle({
694
+ position: "absolute",
695
+ left: `${context.state.getThumbPosition().x * 100}%`,
696
+ top: `${context.state.getThumbPosition().y * 100}%`,
697
+ transform: "translate(-50%, -50%)",
698
+ "forced-color-adjust": "none",
699
+ "touch-action": "none",
700
+ "--kb-color-current": context.state.value().toString()
701
+ }, local.style);
702
+ },
703
+ get ["aria-label"]() {
704
+ return ariaLabel();
705
+ },
706
+ onKeyDown,
707
+ onPointerDown,
708
+ onPointerMove,
709
+ onPointerUp
710
+ }, () => formControlContext.dataset(), others));
711
+ }
712
+
713
+ // src/color-area/index.tsx
714
+ var ColorArea = Object.assign(ColorAreaRoot, {
715
+ Description: FormControlDescription,
716
+ ErrorMessage: FormControlErrorMessage,
717
+ Label: FormControlLabel,
718
+ Background: ColorAreaBackground,
719
+ Thumb: ColorAreaThumb,
720
+ HiddenInputX: ColorAreaHiddenInputX,
721
+ HiddenInputY: ColorAreaHiddenInputY
722
+ });
723
+
724
+ export { ColorAreaBackground as Background, ColorArea, ColorAreaHiddenInputX as HiddenInputX, ColorAreaHiddenInputY as HiddenInputY, ColorAreaRoot as Root, ColorAreaThumb as Thumb, useColorAreaContext };