jenosize-ui 0.2.1 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (225) hide show
  1. package/README.md +183 -63
  2. package/THIRD-PARTY-NOTICES.md +15 -0
  3. package/dist/GradientPicker-CQm3GT7F.d.ts +144 -0
  4. package/dist/{PaymentInput-Dn5WVQVy.d.ts → PaymentInput-Cz5jFB3p.d.ts} +1 -1
  5. package/dist/{Select-Dt5ARIH8.d.ts → Select-CXOAMlk7.d.ts} +15 -1
  6. package/dist/{TagInput-BaBeve6L.d.ts → TagInput-CzIrONr-.d.ts} +1 -1
  7. package/dist/area-chart.d.ts +2 -2
  8. package/dist/area-chart.js +7 -6
  9. package/dist/at-least-one-BZ2dsck-.d.ts +18 -0
  10. package/dist/avatar.d.ts +1 -1
  11. package/dist/avatar.js +12 -11
  12. package/dist/badge.d.ts +1 -1
  13. package/dist/badge.js +6 -6
  14. package/dist/bar-chart.d.ts +2 -2
  15. package/dist/bar-chart.js +7 -6
  16. package/dist/breadcrumb.d.ts +1 -1
  17. package/dist/breadcrumb.js +4 -4
  18. package/dist/button.d.ts +1 -1
  19. package/dist/button.js +11 -10
  20. package/dist/calendar.d.ts +1 -1
  21. package/dist/calendar.js +16 -15
  22. package/dist/callout.d.ts +4 -2
  23. package/dist/callout.js +12 -11
  24. package/dist/card.d.ts +59 -3
  25. package/dist/card.js +4 -4
  26. package/dist/carousel.d.ts +169 -0
  27. package/dist/carousel.js +9 -0
  28. package/dist/catalog.json +11180 -0
  29. package/dist/checkbox.js +8 -7
  30. package/dist/{chunk-MVG5MABV.js → chunk-26XQU3TC.js} +8 -8
  31. package/dist/{chunk-X2X7Q7NW.js → chunk-2R3QWWOT.js} +3 -3
  32. package/dist/{chunk-AIARANKE.js → chunk-3JQKVC2K.js} +4 -4
  33. package/dist/chunk-3P3QZPHV.js +109 -0
  34. package/dist/{chunk-GLKFFA7N.js → chunk-44AWXIQK.js} +5 -5
  35. package/dist/{chunk-FWRHBMWT.js → chunk-4Y32RIC7.js} +5 -19
  36. package/dist/{chunk-5XPMY2LF.js → chunk-5ECTNYKU.js} +5 -5
  37. package/dist/{chunk-6B6BWTXC.js → chunk-5GBA6X6A.js} +5 -5
  38. package/dist/{chunk-UGKELBNC.js → chunk-5SGF47TZ.js} +9 -9
  39. package/dist/{chunk-POQTE7JI.js → chunk-5XSR757T.js} +7 -7
  40. package/dist/{chunk-GZMDZF2V.js → chunk-6FGLABYH.js} +3 -3
  41. package/dist/{chunk-MCQG4H6T.js → chunk-6T3QAO5K.js} +12 -4
  42. package/dist/{chunk-SKRR3ZMP.js → chunk-737A4YNC.js} +3 -3
  43. package/dist/{chunk-AFYXSZGW.js → chunk-7LSUUEAF.js} +7 -5
  44. package/dist/{chunk-7VLYQR4D.js → chunk-7OFGPDYJ.js} +3 -3
  45. package/dist/{chunk-54SIZR63.js → chunk-7UCKFULR.js} +7 -7
  46. package/dist/{chunk-LQURV7HQ.js → chunk-7ZA3QZRP.js} +4 -4
  47. package/dist/{chunk-X2VMIBK5.js → chunk-A4YPUS6C.js} +4 -4
  48. package/dist/{chunk-5ZEUTSCV.js → chunk-B4OVIE2X.js} +6 -6
  49. package/dist/{chunk-P6CON2R2.js → chunk-BH32X25C.js} +3 -3
  50. package/dist/{chunk-667ZHY3T.js → chunk-BJHLW25G.js} +85 -538
  51. package/dist/{chunk-ULGCGKOE.js → chunk-BKBINQJZ.js} +4 -4
  52. package/dist/{chunk-CFFWYXDW.js → chunk-BXQFBFT7.js} +5 -5
  53. package/dist/{chunk-I6WMNXC7.js → chunk-CQGMOPLG.js} +6 -6
  54. package/dist/{chunk-FNQJJO63.js → chunk-CUONE6LA.js} +4 -4
  55. package/dist/{chunk-FFMTYQXE.js → chunk-CVCS5G3E.js} +43 -21
  56. package/dist/{chunk-33TOK7ES.js → chunk-DCKVNHV5.js} +5 -5
  57. package/dist/{chunk-A323V6AI.js → chunk-DYRGHXT5.js} +3 -3
  58. package/dist/{chunk-T4ZFZTY6.js → chunk-EHML2DLR.js} +4 -4
  59. package/dist/{chunk-N3RVMBPX.js → chunk-EJKQGUUM.js} +4 -4
  60. package/dist/{chunk-E2YZ7IMT.js → chunk-ESDSTS5N.js} +6 -6
  61. package/dist/{chunk-LCG34A5T.js → chunk-EVINS473.js} +5 -3
  62. package/dist/chunk-EXRVOGJ5.js +325 -0
  63. package/dist/{chunk-YHBI52P2.js → chunk-GDW6NFYN.js} +3 -3
  64. package/dist/chunk-GOCO45FF.js +619 -0
  65. package/dist/{chunk-7ZM7SNCZ.js → chunk-GPHGPY6T.js} +3 -3
  66. package/dist/{chunk-PO2TYK3C.js → chunk-GWYDOZGQ.js} +3 -3
  67. package/dist/{chunk-LO22VQL5.js → chunk-HNNNJP3A.js} +4 -4
  68. package/dist/{chunk-ZZSNTCCL.js → chunk-IESEBPYA.js} +4 -4
  69. package/dist/{chunk-3H444OJA.js → chunk-JZ4HGFWK.js} +3 -3
  70. package/dist/chunk-KBQJIVUB.js +33 -0
  71. package/dist/{chunk-CKMWBVRR.js → chunk-KCM4KEZ2.js} +4 -4
  72. package/dist/{chunk-3QXLIZIX.js → chunk-KNGJ3CSB.js} +3 -3
  73. package/dist/{chunk-FH7Z7SGQ.js → chunk-KNW3IUWX.js} +12 -11
  74. package/dist/{chunk-KZP6B6B3.js → chunk-KTWTYK5U.js} +16 -5
  75. package/dist/{chunk-LYXPJERB.js → chunk-L7Z6XGBU.js} +5 -5
  76. package/dist/{chunk-ZHAT2XZ4.js → chunk-LLUWBQK6.js} +10 -10
  77. package/dist/{chunk-QHH6AUR3.js → chunk-MDKVYC6R.js} +7 -7
  78. package/dist/{chunk-22M75A3N.js → chunk-MS6DY4CE.js} +14 -11
  79. package/dist/{chunk-LLPWQDF7.js → chunk-MTOTPAYZ.js} +3 -3
  80. package/dist/{chunk-AZ7DKRBY.js → chunk-MVF7FA4D.js} +5 -5
  81. package/dist/{chunk-AIGYMTCU.js → chunk-MVUNB43J.js} +3 -3
  82. package/dist/{chunk-ZMFY7WAY.js → chunk-O24HHIQG.js} +41 -39
  83. package/dist/{chunk-NKG4N6HA.js → chunk-O5EHNNPS.js} +4 -4
  84. package/dist/{chunk-5DP7W5HX.js → chunk-OIPFTJS6.js} +3 -3
  85. package/dist/{chunk-U4WSJAYK.js → chunk-OXNIEIOY.js} +20 -20
  86. package/dist/chunk-P2BGR77C.js +344 -0
  87. package/dist/{chunk-CGHYXWTT.js → chunk-PFAFTLN3.js} +4 -4
  88. package/dist/{chunk-4RBIWI2Q.js → chunk-Q2KR7PSX.js} +3 -3
  89. package/dist/{chunk-7GUPNTAH.js → chunk-QSOLK2I2.js} +7 -7
  90. package/dist/chunk-QTWRR7IS.js +1129 -0
  91. package/dist/{chunk-OLLD2BZN.js → chunk-QZHAL4BL.js} +3 -3
  92. package/dist/{chunk-OACWA4TC.js → chunk-R25NHHYT.js} +6 -6
  93. package/dist/{chunk-QDKETK7D.js → chunk-S55JKMG7.js} +5 -5
  94. package/dist/{chunk-S5TEWPWW.js → chunk-S5LLA36K.js} +10 -10
  95. package/dist/{chunk-QDYE5LVT.js → chunk-SF3HCW4G.js} +45 -4
  96. package/dist/{chunk-KHGW72BM.js → chunk-SGMVB7HD.js} +3 -3
  97. package/dist/{chunk-FKVPAEJ6.js → chunk-SKJC2KYD.js} +4 -3
  98. package/dist/chunk-SKPKL47Y.js +5671 -0
  99. package/dist/{chunk-6MMBQVRO.js → chunk-TCTTZHUS.js} +9 -9
  100. package/dist/chunk-U5X3MLM5.js +67 -0
  101. package/dist/chunk-UHSGD4CD.js +364 -0
  102. package/dist/chunk-UJ4WEQHR.js +525 -0
  103. package/dist/{chunk-6H4LNWQ7.js → chunk-VDFWWWLL.js} +9 -4
  104. package/dist/{chunk-5KSD4WKN.js → chunk-VIKV25VP.js} +5 -5
  105. package/dist/chunk-WJB5GWAZ.js +20 -0
  106. package/dist/{chunk-HHYEAFCL.js → chunk-XAQQ4LYL.js} +11 -11
  107. package/dist/{chunk-4VGEJG4M.js → chunk-XCFFM2C7.js} +9 -9
  108. package/dist/chunk-XKTD3X6Z.js +183 -0
  109. package/dist/{chunk-GQRSABRN.js → chunk-XWXXKEG6.js} +4 -4
  110. package/dist/chunk-YGFTNICV.js +110 -0
  111. package/dist/{chunk-T5574MXM.js → chunk-YGJL7QS7.js} +8 -8
  112. package/dist/{chunk-SB3DG572.js → chunk-YKPTUANT.js} +6 -6
  113. package/dist/{chunk-YQYVGWIC.js → chunk-YQAYAJ2T.js} +33 -11
  114. package/dist/chunk-YXYZW6WU.js +998 -0
  115. package/dist/{chunk-IQNVSQRK.js → chunk-Z6NSOC6T.js} +5 -5
  116. package/dist/{chunk-BBKE4W3B.js → chunk-ZAWGG4H2.js} +7 -7
  117. package/dist/{chunk-BFVJHH7S.js → chunk-ZF362B2X.js} +5 -5
  118. package/dist/{chunk-RJTVCA62.js → chunk-ZJIY642R.js} +3 -3
  119. package/dist/color-input.d.ts +93 -0
  120. package/dist/color-input.js +35 -0
  121. package/dist/color-picker.d.ts +268 -0
  122. package/dist/color-picker.js +28 -0
  123. package/dist/color-value-DYzChVOW.d.ts +129 -0
  124. package/dist/combobox.d.ts +1 -1
  125. package/dist/combobox.js +13 -12
  126. package/dist/date-calendar.d.ts +49 -0
  127. package/dist/date-calendar.js +12 -0
  128. package/dist/date-input.d.ts +1 -1
  129. package/dist/date-input.js +11 -10
  130. package/dist/date-picker.d.ts +15 -131
  131. package/dist/date-picker.js +26 -22
  132. package/dist/date-types-DrDdF6WJ.d.ts +100 -0
  133. package/dist/dialog.d.ts +1 -1
  134. package/dist/dialog.js +10 -10
  135. package/dist/drawer.d.ts +1 -1
  136. package/dist/drawer.js +9 -9
  137. package/dist/dropdown-menu.d.ts +1 -1
  138. package/dist/dropdown-menu.js +6 -6
  139. package/dist/dropzone.d.ts +3 -3
  140. package/dist/dropzone.js +17 -16
  141. package/dist/form.d.ts +15 -5
  142. package/dist/form.js +75 -36
  143. package/dist/header-navigation.d.ts +2 -2
  144. package/dist/header-navigation.js +21 -20
  145. package/dist/helper.d.ts +1 -1
  146. package/dist/index.d.ts +25 -11
  147. package/dist/index.js +92 -79
  148. package/dist/indicator.js +4 -4
  149. package/dist/inline-banner.d.ts +68 -0
  150. package/dist/inline-banner.js +20 -0
  151. package/dist/input.d.ts +1 -1
  152. package/dist/input.js +10 -9
  153. package/dist/kanban-board.d.ts +2 -2
  154. package/dist/kanban-board.js +16 -15
  155. package/dist/labels-C992bt7G.d.ts +1160 -0
  156. package/dist/line-chart.d.ts +2 -2
  157. package/dist/line-chart.js +7 -6
  158. package/dist/mcp.js +231 -0
  159. package/dist/number-input.d.ts +1 -1
  160. package/dist/number-input.js +10 -9
  161. package/dist/pagination.d.ts +1 -1
  162. package/dist/pagination.js +14 -13
  163. package/dist/{card-D56VxyAe.d.ts → panel-CUGm_Mxy.d.ts} +9 -57
  164. package/dist/payment-input.d.ts +3 -3
  165. package/dist/payment-input.js +10 -9
  166. package/dist/picker-draft-BPV3MUPY.d.ts +9 -0
  167. package/dist/pie-chart.d.ts +2 -2
  168. package/dist/pie-chart.js +7 -6
  169. package/dist/popover.d.ts +65 -4
  170. package/dist/popover.js +9 -9
  171. package/dist/progress-steps.js +4 -4
  172. package/dist/progress.js +3 -3
  173. package/dist/provider.d.ts +1 -1
  174. package/dist/provider.js +3 -3
  175. package/dist/qr-code.d.ts +227 -0
  176. package/dist/qr-code.js +19 -0
  177. package/dist/radar-chart.d.ts +2 -2
  178. package/dist/radar-chart.js +7 -6
  179. package/dist/radial-chart.d.ts +2 -2
  180. package/dist/radial-chart.js +7 -6
  181. package/dist/radio.js +8 -7
  182. package/dist/rich-text-editor.d.ts +624 -0
  183. package/dist/rich-text-editor.js +51 -0
  184. package/dist/rich-text-highlight.d.ts +11 -0
  185. package/dist/rich-text-highlight.js +65 -0
  186. package/dist/rich-text-sanitize.d.ts +17 -0
  187. package/dist/rich-text-sanitize.js +176 -0
  188. package/dist/scroll-area.js +2 -2
  189. package/dist/select.d.ts +2 -2
  190. package/dist/select.js +17 -16
  191. package/dist/separator.js +2 -2
  192. package/dist/shared-CGf2D8ZX.d.ts +20 -0
  193. package/dist/sidebar-navigation.d.ts +76 -27
  194. package/dist/sidebar-navigation.js +16 -15
  195. package/dist/sidebar-state.d.ts +76 -0
  196. package/dist/sidebar-state.js +27 -0
  197. package/dist/skeleton.js +2 -2
  198. package/dist/slider.d.ts +321 -0
  199. package/dist/slider.js +13 -0
  200. package/dist/styles.css +1 -1
  201. package/dist/switch.d.ts +1 -1
  202. package/dist/switch.js +2 -2
  203. package/dist/table.d.ts +3 -19
  204. package/dist/table.js +34 -33
  205. package/dist/tabs.js +2 -2
  206. package/dist/tag-input.d.ts +3 -3
  207. package/dist/tag-input.js +13 -12
  208. package/dist/tag.d.ts +1 -1
  209. package/dist/tag.js +4 -4
  210. package/dist/textarea.js +8 -7
  211. package/dist/theme.css +965 -0
  212. package/dist/theme.js +12 -11
  213. package/dist/toast.d.ts +1 -1
  214. package/dist/toast.js +12 -11
  215. package/dist/tooltip.js +4 -3
  216. package/dist/tree.d.ts +1 -1
  217. package/dist/tree.js +6 -6
  218. package/dist/{types-DR9rAEy1.d.ts → types-DYFl0CEB.d.ts} +1 -1
  219. package/dist/{use-uploads-KaPqDklo.d.ts → use-uploads-2E7n0PWT.d.ts} +1 -1
  220. package/dist/verification-code-input.js +10 -9
  221. package/package.json +92 -8
  222. package/dist/chunk-BLIZ3CL3.js +0 -49
  223. package/dist/labels-DPrh0se9.d.ts +0 -627
  224. package/dist/panel-El4oI68p.d.ts +0 -9
  225. package/dist/shared-BYXJPnsN.d.ts +0 -11
@@ -1,5 +1,5 @@
1
- import { usePolarData, resolveMax } from './chunk-OLLD2BZN.js';
2
- import { DEFAULT_PALETTE, RADIAL_SIZE, ChartDataTable, formatNumber, ChartFrame, RadialBarChart, MARGIN, PolarAngleAxis, Tooltip, NO_ANIMATION, ChartTooltipContent, RadialBar, RADIAL_TRACK, POLAR_ROOT, POLAR_HOVER, ChartLegendContent } from './chunk-22M75A3N.js';
1
+ import { usePolarData, resolveMax } from './chunk-QZHAL4BL.js';
2
+ import { DEFAULT_PALETTE, RADIAL_SIZE, ChartDataTable, formatNumber, ChartFrame, RadialBarChart, MARGIN, PolarAngleAxis, Tooltip, NO_ANIMATION, ChartTooltipContent, RadialBar, RADIAL_TRACK, POLAR_ROOT, POLAR_HOVER, ChartLegendContent } from './chunk-MS6DY4CE.js';
3
3
  import { cn } from './chunk-ZSNJ6UA3.js';
4
4
  import { jsx, jsxs } from 'react/jsx-runtime';
5
5
 
@@ -73,5 +73,5 @@ function RadialChart({
73
73
  }
74
74
 
75
75
  export { RadialChart };
76
- //# sourceMappingURL=chunk-ULGCGKOE.js.map
77
- //# sourceMappingURL=chunk-ULGCGKOE.js.map
76
+ //# sourceMappingURL=chunk-BKBINQJZ.js.map
77
+ //# sourceMappingURL=chunk-BKBINQJZ.js.map
@@ -1,9 +1,9 @@
1
1
  import { useLinkElement } from './chunk-5AZKP4KZ.js';
2
2
  import { Slot } from './chunk-52IFGFTL.js';
3
- import { ChevronRightIcon, SlashIcon } from './chunk-BLIZ3CL3.js';
3
+ import { ChevronRightIcon, SlashIcon } from './chunk-YGFTNICV.js';
4
4
  import { cn } from './chunk-ZSNJ6UA3.js';
5
- import { useLabels } from './chunk-RJTVCA62.js';
6
- import { warnPositiveInt, devWarn } from './chunk-QDYE5LVT.js';
5
+ import { useLabels } from './chunk-ZJIY642R.js';
6
+ import { warnPositiveInt, devWarn } from './chunk-SF3HCW4G.js';
7
7
  import { useRender } from '@base-ui/react/use-render';
8
8
  import * as React from 'react';
9
9
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
@@ -122,5 +122,5 @@ function Breadcrumb(props) {
122
122
  Breadcrumb.displayName = "Breadcrumb";
123
123
 
124
124
  export { Breadcrumb };
125
- //# sourceMappingURL=chunk-CFFWYXDW.js.map
126
- //# sourceMappingURL=chunk-CFFWYXDW.js.map
125
+ //# sourceMappingURL=chunk-BXQFBFT7.js.map
126
+ //# sourceMappingURL=chunk-BXQFBFT7.js.map
@@ -1,7 +1,7 @@
1
- import { FieldShell } from './chunk-X2VMIBK5.js';
2
- import { useFieldValidity, FieldFrame } from './chunk-5KSD4WKN.js';
3
- import { useSeamlessSlot, warnSeamlessFieldChrome, SEAMLESS_BOX } from './chunk-7ZM7SNCZ.js';
4
- import { ChevronDownIcon } from './chunk-BLIZ3CL3.js';
1
+ import { FieldShell } from './chunk-A4YPUS6C.js';
2
+ import { useFieldValidity, FieldFrame } from './chunk-VIKV25VP.js';
3
+ import { useSeamlessSlot, warnSeamlessFieldChrome, SEAMLESS_BOX } from './chunk-GPHGPY6T.js';
4
+ import { ChevronDownIcon } from './chunk-YGFTNICV.js';
5
5
  import { cn } from './chunk-ZSNJ6UA3.js';
6
6
  import { Field } from '@base-ui/react/field';
7
7
  import 'react';
@@ -134,5 +134,5 @@ function NativeSelect(props) {
134
134
  }
135
135
 
136
136
  export { NativeSelect };
137
- //# sourceMappingURL=chunk-I6WMNXC7.js.map
138
- //# sourceMappingURL=chunk-I6WMNXC7.js.map
137
+ //# sourceMappingURL=chunk-CQGMOPLG.js.map
138
+ //# sourceMappingURL=chunk-CQGMOPLG.js.map
@@ -1,5 +1,5 @@
1
- import { Button } from './chunk-OACWA4TC.js';
2
- import { MoonIcon, SunIcon } from './chunk-BLIZ3CL3.js';
1
+ import { Button } from './chunk-R25NHHYT.js';
2
+ import { MoonIcon, SunIcon } from './chunk-YGFTNICV.js';
3
3
  import * as React from 'react';
4
4
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
5
5
 
@@ -132,5 +132,5 @@ function ThemeToggle({ size = "sm", className }) {
132
132
  }
133
133
 
134
134
  export { ThemeProvider, ThemeScript, ThemeToggle, buildThemeScript, useTheme };
135
- //# sourceMappingURL=chunk-FNQJJO63.js.map
136
- //# sourceMappingURL=chunk-FNQJJO63.js.map
135
+ //# sourceMappingURL=chunk-CUONE6LA.js.map
136
+ //# sourceMappingURL=chunk-CUONE6LA.js.map
@@ -1,18 +1,18 @@
1
- import { INTRINSIC_CELL, INTRINSIC_STACK, IntrinsicWidth } from './chunk-7S2TBALK.js';
2
- import { PopupScrollViewport } from './chunk-PO2TYK3C.js';
3
- import { Tag } from './chunk-LYXPJERB.js';
1
+ import { PopupScrollViewport } from './chunk-GWYDOZGQ.js';
4
2
  import { NO_RETURN_FOCUS } from './chunk-S7NNXWIN.js';
5
- import { ListboxFooter, MultiValueCount } from './chunk-4RBIWI2Q.js';
6
- import { useTagRow } from './chunk-6H4LNWQ7.js';
3
+ import { Tag } from './chunk-L7Z6XGBU.js';
4
+ import { ListboxFooter, MultiValueCount } from './chunk-Q2KR7PSX.js';
5
+ import { useTagRow } from './chunk-VDFWWWLL.js';
7
6
  import { buildOptionMap, mapOptions } from './chunk-7JBNLEJ7.js';
8
- import { FieldShell } from './chunk-X2VMIBK5.js';
9
- import { useFieldValidity, FieldFrame, SHELL_SIZE, BAR_SIZE, LISTBOX_PX_SM, CONTROL_ICON, SLOT_ICON } from './chunk-5KSD4WKN.js';
10
- import { warnSeamlessFieldChrome, useSeamlessSlot, SEAMLESS_CONTROL } from './chunk-7ZM7SNCZ.js';
7
+ import { INTRINSIC_CELL, INTRINSIC_STACK, IntrinsicWidth } from './chunk-7S2TBALK.js';
8
+ import { FieldShell } from './chunk-A4YPUS6C.js';
9
+ import { useFieldValidity, FieldFrame, SHELL_SIZE, BAR_SIZE, LISTBOX_PX_SM, CONTROL_ICON, SLOT_ICON } from './chunk-VIKV25VP.js';
10
+ import { warnSeamlessFieldChrome, useSeamlessSlot, SEAMLESS_CONTROL } from './chunk-GPHGPY6T.js';
11
11
  import { Slot } from './chunk-52IFGFTL.js';
12
12
  import { POPUP_MOTION } from './chunk-O4GRKO3I.js';
13
- import { ChevronDownIcon, CheckIcon } from './chunk-BLIZ3CL3.js';
13
+ import { ChevronDownIcon, CheckIcon } from './chunk-YGFTNICV.js';
14
14
  import { cn } from './chunk-ZSNJ6UA3.js';
15
- import { useLabels } from './chunk-RJTVCA62.js';
15
+ import { useLabels } from './chunk-ZJIY642R.js';
16
16
  import { Select as Select$1 } from '@base-ui/react/select';
17
17
  import * as React from 'react';
18
18
  import { jsxs, jsx } from 'react/jsx-runtime';
@@ -85,6 +85,16 @@ function SelectRoot(props) {
85
85
  // `rest` would be silently dropped. It belongs on the Field column like every other Field
86
86
  // control (AGENTS §4/§6) — one class hook, no second `triggerClassName`.
87
87
  className,
88
+ // Same trap, same reason, and it had actually bitten: an accessible NAME left in `rest` reaches
89
+ // `Select.Root`, which renders no DOM node, and vanishes. So `<Select seamless aria-label="…">` —
90
+ // the exact spelling the `seamless` prop's own TSDoc prescribes, because a seamless select has no
91
+ // `label` chrome to be named by — produced a trigger with NO accessible name at all. Its computed
92
+ // name fell back to its VALUE ("Heading 2"), so it announced its state instead of its purpose, and
93
+ // axe did not flag it: a combobox whose content is its value HAS a name, just the wrong one.
94
+ // Found in the browser on RichTextEditor's block-type select, which is a seamless Select in a
95
+ // toolbar and therefore the first caller to depend on this path.
96
+ "aria-label": ariaLabel,
97
+ "aria-labelledby": ariaLabelledBy,
88
98
  ...rest
89
99
  } = props;
90
100
  const { isInvalid, showError } = useFieldValidity(invalid, error);
@@ -102,6 +112,8 @@ function SelectRoot(props) {
102
112
  size,
103
113
  invalid: isInvalid,
104
114
  labelId,
115
+ ariaLabel,
116
+ ariaLabelledBy,
105
117
  multiple: isMulti,
106
118
  indicator,
107
119
  indicatorAlign: selectionIndicatorAlign,
@@ -111,7 +123,7 @@ function SelectRoot(props) {
111
123
  anchorRef,
112
124
  closeReasonRef
113
125
  }),
114
- [size, isInvalid, labelId, isMulti, indicator, selectionIndicatorAlign, optionMap, seamless, fullWidth]
126
+ [size, isInvalid, labelId, ariaLabel, ariaLabelledBy, isMulti, indicator, selectionIndicatorAlign, optionMap, seamless, fullWidth]
115
127
  );
116
128
  const tree = /* @__PURE__ */ jsx(
117
129
  Select$1.Root,
@@ -202,7 +214,7 @@ function SelectTrigger(props) {
202
214
  trailingAddon,
203
215
  ...rest
204
216
  } = props;
205
- const { size, invalid, labelId, multiple, optionMap, seamless, fullWidth, anchorRef } = useSelectContext();
217
+ const { size, invalid, labelId, ariaLabel, ariaLabelledBy, multiple, optionMap, seamless, fullWidth, anchorRef } = useSelectContext();
206
218
  const slot = useSeamlessSlot();
207
219
  const useRenderFn = multiple || optionMap.size > 0;
208
220
  const sizingCandidates = React.useMemo(() => {
@@ -243,13 +255,23 @@ function SelectTrigger(props) {
243
255
  // stays 400 (`text-placeholder`).
244
256
  /* @__PURE__ */ jsx(Select$1.Value, { className: cn(valueFill, "truncate text-left font-medium group-data-[placeholder]:font-normal"), placeholder })
245
257
  );
246
- const trigger = /* @__PURE__ */ jsxs(Select$1.Trigger, { "aria-invalid": invalid || void 0, "aria-labelledby": labelId, className: triggerClass, ...rest, children: [
247
- sized ? /* @__PURE__ */ jsxs("span", { className: INTRINSIC_STACK, children: [
248
- value,
249
- /* @__PURE__ */ jsx(IntrinsicWidth, { candidates: sizingCandidates, className: "font-medium" })
250
- ] }) : value,
251
- /* @__PURE__ */ jsx(Select$1.Icon, { className: cn("ml-2 inline-flex shrink-0 text-fg-quaternary", CHEVRON[size]), children: /* @__PURE__ */ jsx(ChevronDownIcon, {}) })
252
- ] });
258
+ const trigger = /* @__PURE__ */ jsxs(
259
+ Select$1.Trigger,
260
+ {
261
+ "aria-invalid": invalid || void 0,
262
+ "aria-label": ariaLabel,
263
+ "aria-labelledby": ariaLabelledBy ?? labelId,
264
+ className: triggerClass,
265
+ ...rest,
266
+ children: [
267
+ sized ? /* @__PURE__ */ jsxs("span", { className: INTRINSIC_STACK, children: [
268
+ value,
269
+ /* @__PURE__ */ jsx(IntrinsicWidth, { candidates: sizingCandidates, className: "font-medium" })
270
+ ] }) : value,
271
+ /* @__PURE__ */ jsx(Select$1.Icon, { className: cn("ml-2 inline-flex shrink-0 text-fg-quaternary", CHEVRON[size]), children: /* @__PURE__ */ jsx(ChevronDownIcon, {}) })
272
+ ]
273
+ }
274
+ );
253
275
  if (seamless) return trigger;
254
276
  return /* @__PURE__ */ jsx(
255
277
  FieldShell,
@@ -451,5 +473,5 @@ SelectGroupLabel.displayName = "SelectGroupLabel";
451
473
  var Select = SelectFlat;
452
474
 
453
475
  export { Select };
454
- //# sourceMappingURL=chunk-FFMTYQXE.js.map
455
- //# sourceMappingURL=chunk-FFMTYQXE.js.map
476
+ //# sourceMappingURL=chunk-CVCS5G3E.js.map
477
+ //# sourceMappingURL=chunk-CVCS5G3E.js.map
@@ -1,6 +1,6 @@
1
- import { FILL } from './chunk-MCQG4H6T.js';
1
+ import { FILL } from './chunk-6T3QAO5K.js';
2
2
  import { cn } from './chunk-ZSNJ6UA3.js';
3
- import { warnNeedsName, warnRange, devWarn } from './chunk-QDYE5LVT.js';
3
+ import { warnNeedsName, warnRange, devWarn } from './chunk-SF3HCW4G.js';
4
4
  import 'react';
5
5
  import { jsxs, jsx } from 'react/jsx-runtime';
6
6
 
@@ -9,7 +9,7 @@ var TRACK_SIZE = { sm: "h-1.5", md: "h-2" };
9
9
  var FILL_BASE = "size-full rounded-full transition-transform duration-75 ease-linear";
10
10
  var NOTCH = "absolute inset-y-0 w-1 -translate-x-1/2 bg-primary transition-[left] duration-75 ease-linear";
11
11
  var VALUE_TEXT = "shrink-0 text-sm font-medium text-tertiary tabular-nums";
12
- var BUBBLE = "absolute rounded-[10px] bg-primary_alt px-3 py-2 shadow-lg ring-1 ring-secondary_alt ring-inset";
12
+ var BUBBLE = "absolute rounded-lg bg-primary_alt px-2 py-1 shadow-lg ring-1 ring-secondary_alt ring-inset";
13
13
  var BUBBLE_TEXT = "text-xs font-semibold text-tertiary tabular-nums";
14
14
  var POSITION = {
15
15
  right: { wrap: "flex items-center gap-3" },
@@ -69,5 +69,5 @@ function Progress(props) {
69
69
  }
70
70
 
71
71
  export { Progress };
72
- //# sourceMappingURL=chunk-33TOK7ES.js.map
73
- //# sourceMappingURL=chunk-33TOK7ES.js.map
72
+ //# sourceMappingURL=chunk-DCKVNHV5.js.map
73
+ //# sourceMappingURL=chunk-DCKVNHV5.js.map
@@ -1,4 +1,4 @@
1
- import { useControllableOpen, DialogSurface } from './chunk-CKMWBVRR.js';
1
+ import { useControllableOpen, DialogSurface } from './chunk-KCM4KEZ2.js';
2
2
  import { EXPLICIT_CLOSE } from './chunk-S7NNXWIN.js';
3
3
  import { Dialog as Dialog$1 } from '@base-ui/react/dialog';
4
4
  import * as React from 'react';
@@ -68,5 +68,5 @@ function Dialog(props) {
68
68
  Dialog.displayName = "Dialog";
69
69
 
70
70
  export { Dialog };
71
- //# sourceMappingURL=chunk-A323V6AI.js.map
72
- //# sourceMappingURL=chunk-A323V6AI.js.map
71
+ //# sourceMappingURL=chunk-DYRGHXT5.js.map
72
+ //# sourceMappingURL=chunk-DYRGHXT5.js.map
@@ -1,5 +1,5 @@
1
- import { usePolarData } from './chunk-OLLD2BZN.js';
2
- import { DEFAULT_PALETTE, PIE_SIZE, PIE_DONUT, ChartDataTable, formatNumber, ChartFrame, PieChart, MARGIN, Tooltip, NO_ANIMATION, ChartTooltipContent, Pie, POLAR_ROOT, POLAR_HOVER, ChartLegendContent } from './chunk-22M75A3N.js';
1
+ import { usePolarData } from './chunk-QZHAL4BL.js';
2
+ import { DEFAULT_PALETTE, PIE_SIZE, PIE_DONUT, ChartDataTable, formatNumber, ChartFrame, PieChart, MARGIN, Tooltip, NO_ANIMATION, ChartTooltipContent, Pie, POLAR_ROOT, POLAR_HOVER, ChartLegendContent } from './chunk-MS6DY4CE.js';
3
3
  import { cn } from './chunk-ZSNJ6UA3.js';
4
4
  import { jsx, jsxs } from 'react/jsx-runtime';
5
5
 
@@ -58,5 +58,5 @@ function PieChart2({
58
58
  }
59
59
 
60
60
  export { PieChart2 as PieChart };
61
- //# sourceMappingURL=chunk-T4ZFZTY6.js.map
62
- //# sourceMappingURL=chunk-T4ZFZTY6.js.map
61
+ //# sourceMappingURL=chunk-EHML2DLR.js.map
62
+ //# sourceMappingURL=chunk-EHML2DLR.js.map
@@ -1,5 +1,5 @@
1
- import { FILL, SOLID } from './chunk-MCQG4H6T.js';
2
- import { SEAMLESS_DOT } from './chunk-7ZM7SNCZ.js';
1
+ import { FILL, SOLID } from './chunk-6T3QAO5K.js';
2
+ import { SEAMLESS_DOT } from './chunk-GPHGPY6T.js';
3
3
  import { cn } from './chunk-ZSNJ6UA3.js';
4
4
  import * as React from 'react';
5
5
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
@@ -108,5 +108,5 @@ function Indicator(props) {
108
108
  Indicator.displayName = "Indicator";
109
109
 
110
110
  export { Indicator };
111
- //# sourceMappingURL=chunk-N3RVMBPX.js.map
112
- //# sourceMappingURL=chunk-N3RVMBPX.js.map
111
+ //# sourceMappingURL=chunk-EJKQGUUM.js.map
112
+ //# sourceMappingURL=chunk-EJKQGUUM.js.map
@@ -1,10 +1,10 @@
1
- import { DEFAULT_FORMAT, parseFormat, fromISO, toISO, dispBounds, segValueText, getDisp, parsePastedDate, applyPastedDate, clamp, pad, displaySeg, setDisp, wrap } from './chunk-3QXLIZIX.js';
1
+ import { DEFAULT_FORMAT, parseFormat, fromISO, toISO, dispBounds, segValueText, getDisp, parsePastedDate, applyPastedDate, clamp, pad, displaySeg, setDisp, wrap } from './chunk-KNGJ3CSB.js';
2
2
  import { useLocaleConfig } from './chunk-YIHKQ63K.js';
3
3
  import { useControlScrollFade } from './chunk-7EUAMHMU.js';
4
- import { FieldShell } from './chunk-X2VMIBK5.js';
5
- import { useFieldValidity, FieldFrame } from './chunk-5KSD4WKN.js';
4
+ import { FieldShell } from './chunk-A4YPUS6C.js';
5
+ import { useFieldValidity, FieldFrame } from './chunk-VIKV25VP.js';
6
6
  import { cn } from './chunk-ZSNJ6UA3.js';
7
- import { useLabels } from './chunk-RJTVCA62.js';
7
+ import { useLabels } from './chunk-ZJIY642R.js';
8
8
  import { Field } from '@base-ui/react/field';
9
9
  import * as React from 'react';
10
10
  import { jsx, jsxs } from 'react/jsx-runtime';
@@ -309,5 +309,5 @@ function DateInput(props) {
309
309
  }
310
310
 
311
311
  export { DateInput };
312
- //# sourceMappingURL=chunk-E2YZ7IMT.js.map
313
- //# sourceMappingURL=chunk-E2YZ7IMT.js.map
312
+ //# sourceMappingURL=chunk-ESDSTS5N.js.map
313
+ //# sourceMappingURL=chunk-ESDSTS5N.js.map
@@ -1,4 +1,5 @@
1
1
  // src/lib/rule.ts
2
+ var RULE_TEXTURES = ["line", "dashed", "dot"];
2
3
  var RULE_TEXTURE = {
3
4
  line: {
4
5
  y: "[--rule-image:initial] [--rule-size:auto]",
@@ -29,6 +30,7 @@ var RULE_WEIGHT_AFTER = {
29
30
  dot: { y: "after:h-[3px]", x: "after:w-[3px]" },
30
31
  dashed: { y: "after:h-px", x: "after:w-px" }
31
32
  };
33
+ var RULE_WEIGHTS = ["hairline", "thick"];
32
34
  var RULE_WEIGHT_THICK = {
33
35
  line: { y: "h-0.5", x: "w-0.5" },
34
36
  dot: { y: "h-[5px]", x: "w-[5px]" },
@@ -93,6 +95,6 @@ function ruleEdge(texture, edge, tone = "default") {
93
95
  ].join(" ");
94
96
  }
95
97
 
96
- export { RULE_PAINT, RULE_TEXTURE, RULE_TONE, RULE_WEIGHT, ruleBox, ruleEdge, rulePaint };
97
- //# sourceMappingURL=chunk-LCG34A5T.js.map
98
- //# sourceMappingURL=chunk-LCG34A5T.js.map
98
+ export { RULE_PAINT, RULE_TEXTURE, RULE_TEXTURES, RULE_TONE, RULE_WEIGHT, RULE_WEIGHTS, ruleBox, ruleEdge, rulePaint };
99
+ //# sourceMappingURL=chunk-EVINS473.js.map
100
+ //# sourceMappingURL=chunk-EVINS473.js.map
@@ -0,0 +1,325 @@
1
+ import { useControllable } from './chunk-WJB5GWAZ.js';
2
+ import { COLOR_PICKER_LABELS, normalizeSwatch, emitPick, useResolvedColors, useColorState, swatchPaint, SwatchRow, ValueRow, useTrackDrag, SwatchDot, HUE_PAINT, THUMB, alphaPaint, TRACK, useRovingIndex, SWATCH_SELECTED, swatchMeta, trackKeyStep } from './chunk-QTWRR7IS.js';
3
+ import { COLOR_FORMATS, parseColor, BLACK, toHex, readableOn, hueColor, sameColor } from './chunk-UHSGD4CD.js';
4
+ import { Button } from './chunk-R25NHHYT.js';
5
+ import { PlusIcon } from './chunk-YGFTNICV.js';
6
+ import { cn } from './chunk-ZSNJ6UA3.js';
7
+ import { useLabels } from './chunk-ZJIY642R.js';
8
+ import { devWarn } from './chunk-SF3HCW4G.js';
9
+ import * as React3 from 'react';
10
+ import { jsxs, jsx } from 'react/jsx-runtime';
11
+
12
+ var READOUT = {
13
+ light: "text-fg-white",
14
+ dark: "text-primary"
15
+ };
16
+ function ColorSwatchPicker({
17
+ swatches,
18
+ value: valueProp,
19
+ defaultValue,
20
+ onValueChange,
21
+ formats = COLOR_FORMATS,
22
+ alpha = true,
23
+ preview = true,
24
+ swatchSize = "md",
25
+ labels,
26
+ className
27
+ }) {
28
+ const t = useLabels("colorPicker", COLOR_PICKER_LABELS, labels);
29
+ const root = React3.useRef(null);
30
+ const [format, setFormat] = React3.useState(() => formats[0] ?? "hex");
31
+ const items = React3.useMemo(() => swatches.map((s) => normalizeSwatch(s)), [swatches]);
32
+ const seed = defaultValue ?? items[0]?.color ?? "#000000";
33
+ const [color, setColor] = useControllable(valueProp, seed, void 0);
34
+ const emit = React3.useCallback(
35
+ (next, meta) => {
36
+ setColor(next);
37
+ emitPick(onValueChange, next, meta);
38
+ },
39
+ [onValueChange, setColor]
40
+ );
41
+ const { lookup, resolveNow } = useResolvedColors(
42
+ React3.useMemo(() => [...items.map((s) => s.color), color], [items, color]),
43
+ root
44
+ );
45
+ const view = lookup(color) ?? color;
46
+ const state = useColorState({ color: view, format, alpha, onColorChange: emit });
47
+ const rgba = parseColor(state.text, { quiet: true }) ?? BLACK;
48
+ const css = toHex(rgba);
49
+ const pick = (swatch) => {
50
+ const hex = swatch.literal ?? resolveNow(swatch.color);
51
+ if (hex === null) return;
52
+ state.setText(hex, swatchMeta(swatch));
53
+ };
54
+ return /* @__PURE__ */ jsxs("div", { ref: root, className: cn("flex flex-col", className), children: [
55
+ preview ? /* @__PURE__ */ jsx("div", { className: "px-1 pt-1", children: /* @__PURE__ */ jsx("div", { className: "flex h-32 w-full items-center justify-center rounded-xl ring-1 ring-on-color ring-inset", style: { background: swatchPaint(css) }, children: /* @__PURE__ */ jsxs("p", { className: cn("flex items-center gap-1 text-lg font-semibold", READOUT[readableOn(rgba)]), children: [
56
+ /* @__PURE__ */ jsx("span", { className: "opacity-50", children: "#" }),
57
+ css.slice(1)
58
+ ] }) }) }) : null,
59
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4 p-4", children: [
60
+ /* @__PURE__ */ jsx(
61
+ SwatchRow,
62
+ {
63
+ swatches: items,
64
+ resolve: lookup,
65
+ value: css,
66
+ size: swatchSize,
67
+ listLabel: t.swatches,
68
+ optionLabel: (c) => t.swatch({ color: c }),
69
+ onSelect: pick
70
+ }
71
+ ),
72
+ /* @__PURE__ */ jsx(
73
+ ValueRow,
74
+ {
75
+ t,
76
+ text: state.text,
77
+ onCommit: state.setText,
78
+ format,
79
+ onFormatChange: setFormat,
80
+ formats,
81
+ color: css,
82
+ alpha: alpha ? state.hsva.a : null,
83
+ onAlphaChange: (a) => state.setChannels({ a })
84
+ }
85
+ )
86
+ ] })
87
+ ] });
88
+ }
89
+ ColorSwatchPicker.displayName = "ColorSwatchPicker";
90
+ var CHANNEL = {
91
+ hue: {
92
+ max: 360,
93
+ step: 1 / 360,
94
+ largeStep: 10 / 360,
95
+ /** `w-9` fits `360°`, the widest string the channel can print. */
96
+ readoutWidth: "w-9"
97
+ },
98
+ alpha: {
99
+ max: 1,
100
+ step: 0.01,
101
+ largeStep: 0.1,
102
+ /** `w-10` fits `100%`. */
103
+ readoutWidth: "w-10"
104
+ }
105
+ };
106
+ var clamp01 = (n) => n < 0 ? 0 : Math.min(n, 1);
107
+ function ColorSlider({
108
+ channel,
109
+ value: valueProp,
110
+ defaultValue,
111
+ onValueChange,
112
+ baseColor,
113
+ swatch = true,
114
+ readout = true,
115
+ disabled = false,
116
+ labels,
117
+ className
118
+ }) {
119
+ const t = useLabels("colorPicker", COLOR_PICKER_LABELS, labels);
120
+ const cfg = CHANNEL[channel];
121
+ const [raw, setValue] = useControllable(valueProp, defaultValue ?? (channel === "alpha" ? 1 : 0), onValueChange);
122
+ const value = clamp01(raw / cfg.max) * cfg.max;
123
+ const base = React3.useMemo(() => {
124
+ if (channel !== "alpha") return BLACK;
125
+ if (baseColor === void 0) {
126
+ devWarn('ColorSlider: channel="alpha" needs a `baseColor` to fade \u2014 falling back to black.');
127
+ return BLACK;
128
+ }
129
+ return parseColor(baseColor) ?? BLACK;
130
+ }, [baseColor, channel]);
131
+ const setFraction = React3.useCallback(
132
+ (f) => setValue(Number((clamp01(f) * cfg.max).toFixed(channel === "hue" ? 0 : 2))),
133
+ [cfg.max, channel, setValue]
134
+ );
135
+ const { trackProps, dragging } = useTrackDrag({
136
+ disabled,
137
+ onDrag: (pt) => setFraction(pt.x)
138
+ });
139
+ const fraction = value / cfg.max;
140
+ const onKeyDown = (e) => {
141
+ if (disabled) return;
142
+ const move = trackKeyStep(e.key, { axis: "x", step: cfg.step, largeStep: cfg.largeStep });
143
+ if (move === null) return;
144
+ e.preventDefault();
145
+ setFraction("absolute" in move ? move.absolute === "min" ? 0 : 1 : fraction + move.dx);
146
+ };
147
+ const name = channel === "hue" ? t.hue : t.alpha;
148
+ const percent = `${Math.round(fraction * 100)}%`;
149
+ const degrees = String(Math.round(value));
150
+ const readoutText = channel === "hue" ? `${degrees}\xB0` : percent;
151
+ const chip = channel === "hue" ? hueColor(value) : toHex({ ...base, a: value });
152
+ return /* @__PURE__ */ jsxs("div", { className: cn("flex items-center gap-3", className), children: [
153
+ swatch ? /* @__PURE__ */ jsx(SwatchDot, { color: chip }) : null,
154
+ /* @__PURE__ */ jsx(
155
+ "div",
156
+ {
157
+ ...trackProps,
158
+ role: "group",
159
+ "aria-label": name,
160
+ className: cn(TRACK, trackProps.className, "flex-1", disabled && "pointer-events-none cursor-not-allowed opacity-50"),
161
+ style: { background: channel === "hue" ? HUE_PAINT : alphaPaint(base) },
162
+ children: /* @__PURE__ */ jsx(
163
+ "div",
164
+ {
165
+ role: "slider",
166
+ tabIndex: disabled ? -1 : 0,
167
+ "aria-label": name,
168
+ "aria-orientation": "horizontal",
169
+ "aria-valuemin": 0,
170
+ "aria-valuemax": cfg.max,
171
+ "aria-valuenow": channel === "hue" ? Math.round(value) : Math.round(value * 100),
172
+ "aria-valuetext": channel === "hue" ? t.hueValue({ degrees }) : t.alphaValue({ percent }),
173
+ "aria-disabled": disabled || void 0,
174
+ "data-dragging": dragging || void 0,
175
+ onKeyDown,
176
+ className: cn(THUMB, "top-1/2"),
177
+ style: { left: `${fraction * 100}%`, backgroundColor: chip }
178
+ }
179
+ )
180
+ }
181
+ ),
182
+ readout ? /* @__PURE__ */ jsx("span", { className: cn("shrink-0 text-right text-sm text-primary tabular-nums", cfg.readoutWidth), children: readoutText }) : null
183
+ ] });
184
+ }
185
+ ColorSlider.displayName = "ColorSlider";
186
+ function ColorPalettePicker({
187
+ palette = [],
188
+ value: valueProp,
189
+ defaultValue,
190
+ onValueChange,
191
+ formats = COLOR_FORMATS,
192
+ alpha = true,
193
+ swatches,
194
+ onAddSwatch,
195
+ addingSwatch = false,
196
+ labels,
197
+ className
198
+ }) {
199
+ const t = useLabels("colorPicker", COLOR_PICKER_LABELS, labels);
200
+ const root = React3.useRef(null);
201
+ const [format, setFormat] = React3.useState(() => formats[0] ?? "hex");
202
+ const [color, setColor] = useControllable(valueProp, defaultValue ?? "#000000", void 0);
203
+ const emit = React3.useCallback(
204
+ (next, meta) => {
205
+ setColor(next);
206
+ emitPick(onValueChange, next, meta);
207
+ },
208
+ [onValueChange, setColor]
209
+ );
210
+ const saved = React3.useMemo(() => (swatches ?? []).map((s) => normalizeSwatch(s)), [swatches]);
211
+ const { lookup, resolveNow } = useResolvedColors(
212
+ React3.useMemo(() => saved.map((s) => s.color), [saved]),
213
+ root
214
+ );
215
+ const state = useColorState({ color, format, alpha, onColorChange: emit });
216
+ const rgba = parseColor(state.text, { quiet: true }) ?? BLACK;
217
+ const css = toHex(rgba);
218
+ const columns = palette[0]?.length ?? 0;
219
+ const cells = React3.useMemo(() => palette.flatMap((row) => [...row]), [palette]);
220
+ const ragged = palette.findIndex((row) => row.length !== columns);
221
+ React3.useEffect(() => {
222
+ if (ragged !== -1) {
223
+ devWarn(
224
+ `<ColorPalettePicker> row ${ragged} has ${palette[ragged]?.length ?? 0} colors but row 0 has ${columns}. The grid is laid out against row 0, so a short row leaves holes. Make every row the same length.`
225
+ );
226
+ }
227
+ }, [ragged, columns, palette]);
228
+ const { itemProps } = useRovingIndex(cells.length, columns);
229
+ return /* @__PURE__ */ jsxs("div", { ref: root, className: cn("flex flex-col gap-4 p-4", className), children: [
230
+ cells.length === 0 ? /* @__PURE__ */ jsx("p", { className: "text-sm text-tertiary", children: t.emptyPalette }) : /* @__PURE__ */ jsx(
231
+ "div",
232
+ {
233
+ role: "listbox",
234
+ "aria-label": t.swatches,
235
+ className: "grid overflow-hidden rounded-lg ring-1 ring-on-color ring-inset",
236
+ style: { gridTemplateColumns: `repeat(${columns}, 1fr)` },
237
+ children: cells.map((cell, index) => {
238
+ const selected = sameColor(cell, css);
239
+ return /* @__PURE__ */ jsx(
240
+ "button",
241
+ {
242
+ type: "button",
243
+ role: "option",
244
+ "aria-selected": selected,
245
+ "aria-label": t.swatch({ color: cell }),
246
+ className: cn("relative aspect-square outline-none", selected && cn(SWATCH_SELECTED, "z-1")),
247
+ style: { "--swatch-color": cell },
248
+ onClick: () => state.setText(cell),
249
+ ...itemProps(index),
250
+ children: /* @__PURE__ */ jsx("span", { className: "block size-full", style: { background: swatchPaint(cell) } })
251
+ },
252
+ `${cell}-${index}`
253
+ );
254
+ })
255
+ }
256
+ ),
257
+ alpha ? /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
258
+ /* @__PURE__ */ jsx("p", { className: "text-sm font-semibold text-secondary", children: t.opacity }),
259
+ /* @__PURE__ */ jsx(
260
+ ColorSlider,
261
+ {
262
+ channel: "alpha",
263
+ baseColor: toHex({ ...rgba, a: 1 }),
264
+ value: state.hsva.a,
265
+ onValueChange: (a) => state.setChannels({ a }),
266
+ swatch: false,
267
+ readout: false,
268
+ labels
269
+ }
270
+ )
271
+ ] }) : null,
272
+ /* @__PURE__ */ jsx(
273
+ ValueRow,
274
+ {
275
+ t,
276
+ text: state.text,
277
+ onCommit: state.setText,
278
+ format,
279
+ onFormatChange: setFormat,
280
+ formats,
281
+ color: css,
282
+ alpha: alpha ? state.hsva.a : null,
283
+ onAlphaChange: (a) => state.setChannels({ a })
284
+ }
285
+ ),
286
+ swatches === void 0 ? null : /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-3", children: [
287
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
288
+ /* @__PURE__ */ jsx("p", { className: "flex-1 text-sm font-semibold text-secondary", children: t.saved }),
289
+ onAddSwatch === void 0 ? null : /* @__PURE__ */ jsx(
290
+ Button,
291
+ {
292
+ variant: "link",
293
+ color: "neutral",
294
+ size: "sm",
295
+ leading: /* @__PURE__ */ jsx(PlusIcon, {}),
296
+ loading: addingSwatch,
297
+ showTextWhileLoading: true,
298
+ "aria-label": t.addSwatch({ color: css }),
299
+ onClick: () => onAddSwatch(css),
300
+ children: t.add
301
+ }
302
+ )
303
+ ] }),
304
+ swatches.length === 0 ? /* @__PURE__ */ jsx("p", { className: "text-sm text-tertiary", children: t.emptyPalette }) : /* @__PURE__ */ jsx(
305
+ SwatchRow,
306
+ {
307
+ swatches: saved,
308
+ resolve: lookup,
309
+ value: css,
310
+ listLabel: t.saved,
311
+ optionLabel: (c) => t.swatch({ color: c }),
312
+ onSelect: (swatch) => {
313
+ const hex = swatch.literal ?? resolveNow(swatch.color);
314
+ if (hex !== null) state.setText(hex, swatchMeta(swatch));
315
+ }
316
+ }
317
+ )
318
+ ] })
319
+ ] });
320
+ }
321
+ ColorPalettePicker.displayName = "ColorPalettePicker";
322
+
323
+ export { ColorPalettePicker, ColorSlider, ColorSwatchPicker };
324
+ //# sourceMappingURL=chunk-EXRVOGJ5.js.map
325
+ //# sourceMappingURL=chunk-EXRVOGJ5.js.map
@@ -1,4 +1,4 @@
1
- import { Cartesian } from './chunk-5DP7W5HX.js';
1
+ import { Cartesian } from './chunk-OIPFTJS6.js';
2
2
  import { jsx } from 'react/jsx-runtime';
3
3
 
4
4
  function LineChart({ curve = "monotone", dashed = false, dots = false, ...rest }) {
@@ -6,5 +6,5 @@ function LineChart({ curve = "monotone", dashed = false, dots = false, ...rest }
6
6
  }
7
7
 
8
8
  export { LineChart };
9
- //# sourceMappingURL=chunk-YHBI52P2.js.map
10
- //# sourceMappingURL=chunk-YHBI52P2.js.map
9
+ //# sourceMappingURL=chunk-GDW6NFYN.js.map
10
+ //# sourceMappingURL=chunk-GDW6NFYN.js.map