@womp/kookie-ui 0.36.0 → 0.37.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 (264) hide show
  1. package/components.css +0 -20
  2. package/dist/cjs/components/_internal/base-menu.utils.js +1 -1
  3. package/dist/cjs/components/_internal/base-menu.utils.js.map +2 -2
  4. package/dist/cjs/components/_internal/menu-context.js +1 -1
  5. package/dist/cjs/components/_internal/menu-context.js.map +2 -2
  6. package/dist/cjs/components/_internal/pane-chrome.js +1 -1
  7. package/dist/cjs/components/_internal/pane-chrome.js.map +2 -2
  8. package/dist/cjs/components/_internal/shell-bottom.d.ts +3 -3
  9. package/dist/cjs/components/_internal/shell-bottom.d.ts.map +1 -1
  10. package/dist/cjs/components/_internal/shell-bottom.js +1 -1
  11. package/dist/cjs/components/_internal/shell-bottom.js.map +3 -3
  12. package/dist/cjs/components/_internal/shell-handles.d.ts.map +1 -1
  13. package/dist/cjs/components/_internal/shell-handles.js +1 -1
  14. package/dist/cjs/components/_internal/shell-handles.js.map +3 -3
  15. package/dist/cjs/components/_internal/shell-inspector.d.ts +3 -3
  16. package/dist/cjs/components/_internal/shell-inspector.d.ts.map +1 -1
  17. package/dist/cjs/components/_internal/shell-inspector.js +1 -1
  18. package/dist/cjs/components/_internal/shell-inspector.js.map +3 -3
  19. package/dist/cjs/components/_internal/shell-pane.d.ts +2 -7
  20. package/dist/cjs/components/_internal/shell-pane.d.ts.map +1 -1
  21. package/dist/cjs/components/_internal/shell-pane.js +1 -1
  22. package/dist/cjs/components/_internal/shell-pane.js.map +3 -3
  23. package/dist/cjs/components/_internal/shell-resizable.d.ts +3 -9
  24. package/dist/cjs/components/_internal/shell-resizable.d.ts.map +1 -1
  25. package/dist/cjs/components/_internal/shell-resizable.js +1 -1
  26. package/dist/cjs/components/_internal/shell-resizable.js.map +3 -3
  27. package/dist/cjs/components/_internal/shell-resize.d.ts +0 -4
  28. package/dist/cjs/components/_internal/shell-resize.d.ts.map +1 -1
  29. package/dist/cjs/components/_internal/shell-resize.js +1 -1
  30. package/dist/cjs/components/_internal/shell-resize.js.map +2 -2
  31. package/dist/cjs/components/_internal/shell-rest.d.ts +1 -6
  32. package/dist/cjs/components/_internal/shell-rest.d.ts.map +1 -1
  33. package/dist/cjs/components/_internal/shell-rest.js +1 -1
  34. package/dist/cjs/components/_internal/shell-rest.js.map +3 -3
  35. package/dist/cjs/components/_internal/shell-sidebar.d.ts +3 -3
  36. package/dist/cjs/components/_internal/shell-sidebar.d.ts.map +1 -1
  37. package/dist/cjs/components/_internal/shell-sidebar.js +1 -1
  38. package/dist/cjs/components/_internal/shell-sidebar.js.map +3 -3
  39. package/dist/cjs/components/_internal/shell-store.d.ts +0 -10
  40. package/dist/cjs/components/_internal/shell-store.d.ts.map +1 -1
  41. package/dist/cjs/components/_internal/shell-store.js +1 -1
  42. package/dist/cjs/components/_internal/shell-store.js.map +3 -3
  43. package/dist/cjs/components/checkbox-group.js +1 -1
  44. package/dist/cjs/components/checkbox-group.js.map +3 -3
  45. package/dist/cjs/components/checkbox-group.primitive.d.ts +0 -10
  46. package/dist/cjs/components/checkbox-group.primitive.d.ts.map +1 -1
  47. package/dist/cjs/components/checkbox-group.primitive.js +1 -1
  48. package/dist/cjs/components/checkbox-group.primitive.js.map +3 -3
  49. package/dist/cjs/components/context-menu.d.ts +1 -5
  50. package/dist/cjs/components/context-menu.d.ts.map +1 -1
  51. package/dist/cjs/components/context-menu.js +1 -1
  52. package/dist/cjs/components/context-menu.js.map +3 -3
  53. package/dist/cjs/components/dropdown-menu.js +1 -1
  54. package/dist/cjs/components/dropdown-menu.js.map +2 -2
  55. package/dist/cjs/components/index.js +2 -2
  56. package/dist/cjs/components/index.js.map +4 -4
  57. package/dist/cjs/components/navigator.js.map +2 -2
  58. package/dist/cjs/components/schemas/index.d.ts +1 -1
  59. package/dist/cjs/components/schemas/index.d.ts.map +1 -1
  60. package/dist/cjs/components/schemas/index.js +1 -1
  61. package/dist/cjs/components/schemas/index.js.map +3 -3
  62. package/dist/cjs/components/schemas/shell.schema.d.ts +6 -112
  63. package/dist/cjs/components/schemas/shell.schema.d.ts.map +1 -1
  64. package/dist/cjs/components/schemas/shell.schema.js +1 -1
  65. package/dist/cjs/components/schemas/shell.schema.js.map +3 -3
  66. package/dist/cjs/components/separator.js +1 -1
  67. package/dist/cjs/components/separator.js.map +2 -2
  68. package/dist/cjs/components/shell.context.d.ts +1 -45
  69. package/dist/cjs/components/shell.context.d.ts.map +1 -1
  70. package/dist/cjs/components/shell.context.js +1 -1
  71. package/dist/cjs/components/shell.context.js.map +4 -4
  72. package/dist/cjs/components/shell.d.ts +7 -37
  73. package/dist/cjs/components/shell.d.ts.map +1 -1
  74. package/dist/cjs/components/shell.js +1 -1
  75. package/dist/cjs/components/shell.js.map +4 -4
  76. package/dist/cjs/components/shell.types.d.ts +6 -27
  77. package/dist/cjs/components/shell.types.d.ts.map +1 -1
  78. package/dist/cjs/components/shell.types.js +1 -1
  79. package/dist/cjs/components/shell.types.js.map +2 -2
  80. package/dist/cjs/components/sidebar.js +1 -1
  81. package/dist/cjs/components/sidebar.js.map +2 -2
  82. package/dist/cjs/components/toolbar.js +1 -1
  83. package/dist/cjs/components/toolbar.js.map +2 -2
  84. package/dist/cjs/hooks/use-breakpoint.js +1 -1
  85. package/dist/cjs/hooks/use-breakpoint.js.map +2 -2
  86. package/dist/cjs/index.js +4 -4
  87. package/dist/cjs/index.js.map +4 -4
  88. package/dist/esm/{chunk-5RLGDXOM.js → chunk-2K46JPUL.js} +2 -2
  89. package/dist/esm/chunk-3K7E4XL3.js +3 -0
  90. package/dist/esm/chunk-3K7E4XL3.js.map +7 -0
  91. package/dist/esm/chunk-3LR7KMBE.js +3 -0
  92. package/dist/esm/chunk-3LR7KMBE.js.map +7 -0
  93. package/dist/esm/chunk-5U2LEJLU.js +3 -0
  94. package/dist/esm/chunk-5U2LEJLU.js.map +7 -0
  95. package/dist/esm/{chunk-IN6D33TU.js → chunk-5XO3PLDH.js} +2 -2
  96. package/dist/esm/{chunk-COLJWVN7.js → chunk-AQR42GKA.js} +2 -2
  97. package/dist/esm/{chunk-FTNZWAPB.js → chunk-ARPUPT4M.js} +2 -2
  98. package/dist/esm/{chunk-ISCZ57VL.js → chunk-DJGZ4K3V.js} +2 -2
  99. package/dist/esm/{chunk-PMXIQ5B4.js → chunk-FKCKELUB.js} +2 -2
  100. package/dist/esm/chunk-H7GH3DTF.js +3 -0
  101. package/dist/esm/chunk-H7GH3DTF.js.map +7 -0
  102. package/dist/esm/{chunk-E6MOZSYV.js → chunk-HNOT2HS4.js} +2 -2
  103. package/dist/esm/chunk-LBAC2X4U.js +3 -0
  104. package/dist/esm/{chunk-5BXCPANF.js.map → chunk-LBAC2X4U.js.map} +3 -3
  105. package/dist/esm/{chunk-MAA6LEE2.js → chunk-MDQ7ZHOS.js} +1 -1
  106. package/dist/esm/chunk-MDQ7ZHOS.js.map +7 -0
  107. package/dist/esm/chunk-MQA3BKF4.js +3 -0
  108. package/dist/esm/chunk-MQA3BKF4.js.map +7 -0
  109. package/dist/esm/chunk-MXNPCJPV.js +3 -0
  110. package/dist/esm/chunk-MXNPCJPV.js.map +7 -0
  111. package/dist/esm/{chunk-EB4AG3OL.js → chunk-REELD6CT.js} +2 -2
  112. package/dist/esm/chunk-RYXIRZQW.js +3 -0
  113. package/dist/esm/chunk-RYXIRZQW.js.map +7 -0
  114. package/dist/esm/chunk-S66WR5R7.js +3 -0
  115. package/dist/esm/{chunk-MXEOE4LA.js.map → chunk-S66WR5R7.js.map} +2 -2
  116. package/dist/esm/chunk-SECVO3CW.js +3 -0
  117. package/dist/esm/chunk-SECVO3CW.js.map +7 -0
  118. package/dist/esm/chunk-SHDZYFUN.js +3 -0
  119. package/dist/esm/chunk-SHDZYFUN.js.map +7 -0
  120. package/dist/esm/{chunk-3M5ZM67R.js → chunk-TCFBNE6A.js} +2 -2
  121. package/dist/esm/chunk-U7P64MXD.js +3 -0
  122. package/dist/esm/chunk-U7P64MXD.js.map +7 -0
  123. package/dist/esm/chunk-UFYQC5XY.js +3 -0
  124. package/dist/esm/chunk-UFYQC5XY.js.map +7 -0
  125. package/dist/esm/{chunk-G66WDIIV.js → chunk-WJKCXGVN.js} +2 -2
  126. package/dist/esm/chunk-XBDAE77C.js +3 -0
  127. package/dist/esm/chunk-XBDAE77C.js.map +7 -0
  128. package/dist/esm/{chunk-SIYOLE6P.js → chunk-YM47BXKK.js} +2 -2
  129. package/dist/esm/components/_internal/base-menu.utils.js +1 -1
  130. package/dist/esm/components/_internal/menu-context.js +1 -1
  131. package/dist/esm/components/_internal/pane-chrome.js +1 -1
  132. package/dist/esm/components/_internal/shell-bottom.d.ts +3 -3
  133. package/dist/esm/components/_internal/shell-bottom.d.ts.map +1 -1
  134. package/dist/esm/components/_internal/shell-bottom.js +1 -1
  135. package/dist/esm/components/_internal/shell-handles.d.ts.map +1 -1
  136. package/dist/esm/components/_internal/shell-handles.js +1 -1
  137. package/dist/esm/components/_internal/shell-inspector.d.ts +3 -3
  138. package/dist/esm/components/_internal/shell-inspector.d.ts.map +1 -1
  139. package/dist/esm/components/_internal/shell-inspector.js +1 -1
  140. package/dist/esm/components/_internal/shell-pane.d.ts +2 -7
  141. package/dist/esm/components/_internal/shell-pane.d.ts.map +1 -1
  142. package/dist/esm/components/_internal/shell-pane.js +1 -1
  143. package/dist/esm/components/_internal/shell-resizable.d.ts +3 -9
  144. package/dist/esm/components/_internal/shell-resizable.d.ts.map +1 -1
  145. package/dist/esm/components/_internal/shell-resizable.js +1 -1
  146. package/dist/esm/components/_internal/shell-resize.d.ts +0 -4
  147. package/dist/esm/components/_internal/shell-resize.d.ts.map +1 -1
  148. package/dist/esm/components/_internal/shell-resize.js +1 -1
  149. package/dist/esm/components/_internal/shell-rest.d.ts +1 -6
  150. package/dist/esm/components/_internal/shell-rest.d.ts.map +1 -1
  151. package/dist/esm/components/_internal/shell-rest.js +1 -1
  152. package/dist/esm/components/_internal/shell-sidebar.d.ts +3 -3
  153. package/dist/esm/components/_internal/shell-sidebar.d.ts.map +1 -1
  154. package/dist/esm/components/_internal/shell-sidebar.js +1 -1
  155. package/dist/esm/components/_internal/shell-store.d.ts +0 -10
  156. package/dist/esm/components/_internal/shell-store.d.ts.map +1 -1
  157. package/dist/esm/components/_internal/shell-store.js +1 -1
  158. package/dist/esm/components/checkbox-group.js +1 -1
  159. package/dist/esm/components/checkbox-group.primitive.d.ts +0 -10
  160. package/dist/esm/components/checkbox-group.primitive.d.ts.map +1 -1
  161. package/dist/esm/components/checkbox-group.primitive.js +1 -1
  162. package/dist/esm/components/context-menu.d.ts +1 -5
  163. package/dist/esm/components/context-menu.d.ts.map +1 -1
  164. package/dist/esm/components/context-menu.js +1 -1
  165. package/dist/esm/components/dropdown-menu.js +1 -1
  166. package/dist/esm/components/index.js +1 -1
  167. package/dist/esm/components/navigator.js +1 -1
  168. package/dist/esm/components/schemas/index.d.ts +1 -1
  169. package/dist/esm/components/schemas/index.d.ts.map +1 -1
  170. package/dist/esm/components/schemas/index.js +1 -1
  171. package/dist/esm/components/schemas/index.js.map +2 -2
  172. package/dist/esm/components/schemas/shell.schema.d.ts +6 -112
  173. package/dist/esm/components/schemas/shell.schema.d.ts.map +1 -1
  174. package/dist/esm/components/schemas/shell.schema.js +1 -1
  175. package/dist/esm/components/separator.js +1 -1
  176. package/dist/esm/components/shell.context.d.ts +1 -45
  177. package/dist/esm/components/shell.context.d.ts.map +1 -1
  178. package/dist/esm/components/shell.context.js +1 -1
  179. package/dist/esm/components/shell.d.ts +7 -37
  180. package/dist/esm/components/shell.d.ts.map +1 -1
  181. package/dist/esm/components/shell.js +1 -1
  182. package/dist/esm/components/shell.types.d.ts +6 -27
  183. package/dist/esm/components/shell.types.d.ts.map +1 -1
  184. package/dist/esm/components/shell.types.js +1 -1
  185. package/dist/esm/components/sidebar.js +1 -1
  186. package/dist/esm/components/toolbar.js +1 -1
  187. package/dist/esm/components/virtual-menu.js +1 -1
  188. package/dist/esm/hooks/use-breakpoint.js +1 -1
  189. package/dist/esm/index.js +1 -1
  190. package/package.json +1 -1
  191. package/schemas/index.json +13 -335
  192. package/schemas/shell-bottom.json +2 -63
  193. package/schemas/shell-inspector.json +2 -63
  194. package/schemas/shell-panel.json +2 -63
  195. package/schemas/shell-rail.json +2 -38
  196. package/schemas/shell-sidebar.json +5 -102
  197. package/schemas/shell-trigger.json +0 -6
  198. package/src/components/_internal/shell-bottom.tsx +6 -26
  199. package/src/components/_internal/shell-handles.tsx +2 -32
  200. package/src/components/_internal/shell-inspector.tsx +6 -26
  201. package/src/components/_internal/shell-pane.tsx +7 -56
  202. package/src/components/_internal/shell-resizable.tsx +6 -81
  203. package/src/components/_internal/shell-resize.tsx +0 -4
  204. package/src/components/_internal/shell-rest.ts +2 -11
  205. package/src/components/_internal/shell-sidebar.tsx +8 -30
  206. package/src/components/_internal/shell-store.tsx +1 -34
  207. package/src/components/checkbox-group.primitive.tsx +0 -12
  208. package/src/components/context-menu.tsx +1 -6
  209. package/src/components/schemas/index.ts +0 -1
  210. package/src/components/schemas/shell.schema.ts +3 -20
  211. package/src/components/shell.context.tsx +5 -112
  212. package/src/components/shell.css +1 -29
  213. package/src/components/shell.tsx +12 -97
  214. package/src/components/shell.types.ts +6 -28
  215. package/styles.css +0 -20
  216. package/dist/cjs/components/shell.hooks.d.ts +0 -10
  217. package/dist/cjs/components/shell.hooks.d.ts.map +0 -1
  218. package/dist/cjs/components/shell.hooks.js +0 -3
  219. package/dist/cjs/components/shell.hooks.js.map +0 -7
  220. package/dist/esm/chunk-2VSRZ4IT.js +0 -3
  221. package/dist/esm/chunk-2VSRZ4IT.js.map +0 -7
  222. package/dist/esm/chunk-2WFN4D52.js +0 -3
  223. package/dist/esm/chunk-2WFN4D52.js.map +0 -7
  224. package/dist/esm/chunk-4OJRLS5N.js +0 -3
  225. package/dist/esm/chunk-4OJRLS5N.js.map +0 -7
  226. package/dist/esm/chunk-4TTRPCGG.js +0 -3
  227. package/dist/esm/chunk-4TTRPCGG.js.map +0 -7
  228. package/dist/esm/chunk-5BXCPANF.js +0 -3
  229. package/dist/esm/chunk-B447PNRD.js +0 -3
  230. package/dist/esm/chunk-B447PNRD.js.map +0 -7
  231. package/dist/esm/chunk-BJVXB3PN.js +0 -3
  232. package/dist/esm/chunk-BJVXB3PN.js.map +0 -7
  233. package/dist/esm/chunk-DNY4WWZF.js +0 -3
  234. package/dist/esm/chunk-DNY4WWZF.js.map +0 -7
  235. package/dist/esm/chunk-HQT32HQ6.js +0 -3
  236. package/dist/esm/chunk-HQT32HQ6.js.map +0 -7
  237. package/dist/esm/chunk-KGCGT4MJ.js +0 -3
  238. package/dist/esm/chunk-KGCGT4MJ.js.map +0 -7
  239. package/dist/esm/chunk-M26LLCQC.js +0 -3
  240. package/dist/esm/chunk-M26LLCQC.js.map +0 -7
  241. package/dist/esm/chunk-MAA6LEE2.js.map +0 -7
  242. package/dist/esm/chunk-MXEOE4LA.js +0 -3
  243. package/dist/esm/chunk-TS4QCDSI.js +0 -3
  244. package/dist/esm/chunk-TS4QCDSI.js.map +0 -7
  245. package/dist/esm/chunk-XOAOSRTH.js +0 -3
  246. package/dist/esm/chunk-XOAOSRTH.js.map +0 -7
  247. package/dist/esm/chunk-XUCR7L4G.js +0 -3
  248. package/dist/esm/chunk-XUCR7L4G.js.map +0 -7
  249. package/dist/esm/components/shell.hooks.d.ts +0 -10
  250. package/dist/esm/components/shell.hooks.d.ts.map +0 -1
  251. package/dist/esm/components/shell.hooks.js +0 -3
  252. package/dist/esm/components/shell.hooks.js.map +0 -7
  253. package/src/components/shell.hooks.ts +0 -20
  254. /package/dist/esm/{chunk-5RLGDXOM.js.map → chunk-2K46JPUL.js.map} +0 -0
  255. /package/dist/esm/{chunk-IN6D33TU.js.map → chunk-5XO3PLDH.js.map} +0 -0
  256. /package/dist/esm/{chunk-COLJWVN7.js.map → chunk-AQR42GKA.js.map} +0 -0
  257. /package/dist/esm/{chunk-FTNZWAPB.js.map → chunk-ARPUPT4M.js.map} +0 -0
  258. /package/dist/esm/{chunk-ISCZ57VL.js.map → chunk-DJGZ4K3V.js.map} +0 -0
  259. /package/dist/esm/{chunk-PMXIQ5B4.js.map → chunk-FKCKELUB.js.map} +0 -0
  260. /package/dist/esm/{chunk-E6MOZSYV.js.map → chunk-HNOT2HS4.js.map} +0 -0
  261. /package/dist/esm/{chunk-EB4AG3OL.js.map → chunk-REELD6CT.js.map} +0 -0
  262. /package/dist/esm/{chunk-3M5ZM67R.js.map → chunk-TCFBNE6A.js.map} +0 -0
  263. /package/dist/esm/{chunk-G66WDIIV.js.map → chunk-WJKCXGVN.js.map} +0 -0
  264. /package/dist/esm/{chunk-SIYOLE6P.js.map → chunk-YM47BXKK.js.map} +0 -0
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/checkbox-group.tsx", "../../../src/components/checkbox-group.primitive.tsx", "../../../src/props/as-child.prop.ts", "../../../src/props/color.prop.ts", "../../../src/components/_internal/base-checkbox.props.ts", "../../../src/components/checkbox-group.props.tsx", "../../../src/components/icons.tsx", "../../../src/components/text.tsx", "../../../src/helpers/extract-props.ts", "../../../src/helpers/compile-prop-defs.ts", "../../../src/props/prop-def.ts", "../../../src/helpers/has-own-property.ts", "../../../src/helpers/is-responsive-object.ts", "../../../src/helpers/get-responsive-styles.ts", "../../../src/helpers/merge-styles.ts", "../../../src/props/emphasis.prop.ts", "../../../src/props/leading-trim.prop.ts", "../../../src/props/text-align.prop.ts", "../../../src/props/text-wrap.prop.ts", "../../../src/props/truncate.prop.ts", "../../../src/props/font-family.prop.ts", "../../../src/props/weight.prop.ts", "../../../src/components/text.props.tsx", "../../../src/hooks/theme-size.ts", "../../../src/helpers/theme-size.ts"],
4
- "sourcesContent": ["'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { Context } from 'radix-ui/internal';\n\nimport * as CheckboxGroupPrimitive from './checkbox-group.primitive.js';\nimport { createCheckboxGroupScope } from './checkbox-group.primitive.js';\nimport { checkboxGroupRootPropDefs } from './checkbox-group.props.js';\nimport { ThickCheckIcon } from './icons.js';\nimport { Text } from './text.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { useThemeSize } from '../hooks/theme-size.js';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\nconst CHECKBOX_GROUP_NAME = 'CheckboxGroup';\n\ntype ScopedProps<P> = P & { __scopeCheckboxGroup?: Context.Scope };\nconst [createCheckboxGroupContext] = Context.createContextScope(CHECKBOX_GROUP_NAME, [\n createCheckboxGroupScope,\n]);\nconst useCheckboxGroupScope = createCheckboxGroupScope();\n\ntype CheckboxGroupRootOwnProps = GetPropDefTypes<typeof checkboxGroupRootPropDefs>;\ntype CheckboxGroupContextValue = CheckboxGroupRootOwnProps;\n\nconst [CheckboxGroupProvider, useCheckboxGroupContext] =\n createCheckboxGroupContext<CheckboxGroupContextValue>(CHECKBOX_GROUP_NAME);\n\ntype CheckboxGroupRootElement = React.ElementRef<typeof CheckboxGroupPrimitive.Root>;\ninterface CheckboxGroupRootProps\n extends ComponentPropsWithout<\n typeof CheckboxGroupPrimitive.Root,\n 'asChild' | 'color' | 'defaultChecked'\n >,\n CheckboxGroupRootOwnProps {}\nconst CheckboxGroupRoot = React.forwardRef<CheckboxGroupRootElement, CheckboxGroupRootProps>(\n (\n {\n color = checkboxGroupRootPropDefs.color.default,\n size: sizeProp,\n ...props\n }: ScopedProps<CheckboxGroupRootProps>,\n forwardedRef,\n ) => {\n const size = useThemeSize(sizeProp, checkboxGroupRootPropDefs.size);\n const { __scopeCheckboxGroup, className, ...rootProps } = props;\n const checkboxGroupScope = useCheckboxGroupScope(__scopeCheckboxGroup);\n return (\n <CheckboxGroupProvider\n scope={__scopeCheckboxGroup}\n color={color}\n size={size}\n >\n <CheckboxGroupPrimitive.Root\n {...checkboxGroupScope}\n {...rootProps}\n ref={forwardedRef}\n className={classNames('kui-CheckboxGroupRoot', className)}\n />\n </CheckboxGroupProvider>\n );\n },\n);\nCheckboxGroupRoot.displayName = 'CheckboxGroup.Root';\n\ntype CheckboxGroupItemElement = React.ElementRef<typeof CheckboxGroupPrimitive.Item>;\ninterface CheckboxGroupItemProps\n extends ComponentPropsWithout<typeof CheckboxGroupPrimitive.Item, RemovedProps> {}\nconst CheckboxGroupItem = React.forwardRef<CheckboxGroupItemElement, CheckboxGroupItemProps>(\n (_props: ScopedProps<CheckboxGroupItemProps>, forwardedRef) => {\n const { __scopeCheckboxGroup, children, className, style, ...props } = _props;\n const { size } = useCheckboxGroupContext('CheckboxGroupItem', __scopeCheckboxGroup);\n\n // Render `<Text as=\"label\">` if children\u00A0are provided, otherwise render\n // the solo checkbox to allow building out your custom layouts with it.\n if (children) {\n return (\n <Text\n as=\"label\"\n size={size}\n className={classNames('kui-CheckboxGroupItem', className)}\n style={style}\n >\n <CheckboxGroupItemCheckbox\n __scopeCheckboxGroup={__scopeCheckboxGroup}\n {...props}\n ref={forwardedRef}\n />\n {children && <span className=\"kui-CheckboxGroupItemInner\">{children}</span>}\n </Text>\n );\n }\n\n return (\n <CheckboxGroupItemCheckbox\n __scopeCheckboxGroup={__scopeCheckboxGroup}\n {...props}\n ref={forwardedRef}\n className={className}\n style={style}\n />\n );\n },\n);\nCheckboxGroupItem.displayName = 'CheckboxGroup.Item';\n\ntype CheckboxGroupItemCheckboxElement = React.ElementRef<typeof CheckboxGroupPrimitive.Item>;\ninterface CheckboxGroupItemCheckboxProps\n extends ComponentPropsWithout<typeof CheckboxGroupPrimitive.Item, RemovedProps> {}\nconst CheckboxGroupItemCheckbox = React.forwardRef<\n CheckboxGroupItemCheckboxElement,\n ScopedProps<CheckboxGroupItemCheckboxProps>\n>(({ __scopeCheckboxGroup, ...props }, forwardedRef) => {\n const context = useCheckboxGroupContext('CheckboxGroupItemCheckbox', __scopeCheckboxGroup);\n const checkboxGroupScope = useCheckboxGroupScope(__scopeCheckboxGroup);\n const { color, className } = extractProps(\n { ...props, ...context },\n checkboxGroupRootPropDefs,\n );\n return (\n <CheckboxGroupPrimitive.Item\n {...checkboxGroupScope}\n data-accent-color={color}\n {...props}\n ref={forwardedRef}\n className={classNames(\n 'kui-reset',\n 'kui-BaseCheckboxRoot',\n 'kui-CheckboxGroupItemCheckbox',\n className,\n )}\n >\n <CheckboxGroupPrimitive.Indicator\n {...checkboxGroupScope}\n asChild\n className=\"kui-BaseCheckboxIndicator\"\n >\n <ThickCheckIcon />\n </CheckboxGroupPrimitive.Indicator>\n </CheckboxGroupPrimitive.Item>\n );\n});\nCheckboxGroupItemCheckbox.displayName = 'CheckboxGroup.ItemCheckbox';\n\nexport { CheckboxGroupRoot as Root, CheckboxGroupItem as Item };\nexport type { CheckboxGroupRootProps as RootProps, CheckboxGroupItemProps as ItemProps };\n", "'use client';\n\nimport * as React from 'react';\nimport { Checkbox as CheckboxPrimitive, Direction } from 'radix-ui';\nimport { Context, Primitive, useControllableState } from 'radix-ui/internal';\n\nconst { useDirection } = Direction;\n\n/* -------------------------------------------------------------------------------------------------\n * CheckboxGroup\n * -----------------------------------------------------------------------------------------------*/\nconst CHECKBOX_GROUP_NAME = 'CheckboxGroup';\n\ntype ScopedProps<P> = P & { __scopeCheckboxGroup?: Context.Scope };\nconst [createCheckboxGroupContext, createCheckboxGroupScope] = Context.createContextScope(\n CHECKBOX_GROUP_NAME,\n [CheckboxPrimitive.createCheckboxScope],\n);\nconst useCheckboxScope = CheckboxPrimitive.createCheckboxScope();\n\ntype CheckboxGroupContextValue = {\n name?: string;\n required: boolean;\n disabled: boolean;\n value?: string[];\n onItemCheck(value: string): void;\n onItemUncheck(value: string): void;\n};\n\nconst [CheckboxGroupProvider, useCheckboxGroupContext] =\n createCheckboxGroupContext<CheckboxGroupContextValue>(CHECKBOX_GROUP_NAME);\n\ntype CheckboxGroupElement = React.ElementRef<typeof Primitive.div>;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;\ninterface CheckboxGroupProps extends PrimitiveDivProps {\n name?: CheckboxGroupContextValue['name'];\n required?: React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>['required'];\n disabled?: React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>['disabled'];\n dir?: 'ltr' | 'rtl';\n /**\n * @deprecated Has no effect. Each checkbox is its own tab stop, as with native checkboxes,\n * so there is no arrow-key navigation to orient.\n */\n orientation?: 'horizontal' | 'vertical';\n /**\n * @deprecated Has no effect. Each checkbox is its own tab stop, as with native checkboxes,\n * so there is no arrow-key navigation to loop.\n */\n loop?: boolean;\n defaultValue?: string[];\n value?: CheckboxGroupContextValue['value'];\n onValueChange?: (value: string[]) => void;\n}\n\nconst CheckboxGroup = React.forwardRef<CheckboxGroupElement, CheckboxGroupProps>(\n (props: ScopedProps<CheckboxGroupProps>, forwardedRef) => {\n const {\n __scopeCheckboxGroup,\n name,\n defaultValue,\n value: valueProp,\n required = false,\n disabled = false,\n orientation: _orientation,\n dir,\n loop: _loop,\n onValueChange,\n ...groupProps\n } = props;\n const direction = useDirection(dir);\n const [value = [], setValue] = useControllableState({\n prop: valueProp,\n defaultProp: defaultValue ?? [],\n onChange: onValueChange,\n });\n\n const handleItemCheck = React.useCallback(\n (itemValue: string) => setValue((prevValue = []) => [...prevValue, itemValue]),\n [setValue],\n );\n\n const handleItemUncheck = React.useCallback(\n (itemValue: string) =>\n setValue((prevValue = []) => prevValue.filter((value) => value !== itemValue)),\n [setValue],\n );\n\n return (\n <CheckboxGroupProvider\n scope={__scopeCheckboxGroup}\n name={name}\n required={required}\n disabled={disabled}\n value={value}\n onItemCheck={handleItemCheck}\n onItemUncheck={handleItemUncheck}\n >\n <Primitive.div\n role=\"group\"\n data-disabled={disabled ? '' : undefined}\n dir={direction}\n {...groupProps}\n ref={forwardedRef}\n />\n </CheckboxGroupProvider>\n );\n },\n);\n\nCheckboxGroup.displayName = CHECKBOX_GROUP_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * CheckboxGroupItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst ITEM_NAME = 'CheckboxGroupItem';\n\ntype CheckboxGroupItemElement = React.ElementRef<typeof CheckboxPrimitive.Root>;\ntype CheckboxProps = React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>;\ninterface CheckboxGroupItemProps\n extends Omit<CheckboxProps, 'checked' | 'defaultChecked' | 'onCheckedChange' | 'name'> {\n value: string;\n}\n\nconst CheckboxGroupItem = React.forwardRef<CheckboxGroupItemElement, CheckboxGroupItemProps>(\n (props: ScopedProps<CheckboxGroupItemProps>, forwardedRef) => {\n const { __scopeCheckboxGroup, disabled, ...itemProps } = props;\n const context = useCheckboxGroupContext(ITEM_NAME, __scopeCheckboxGroup);\n const isDisabled = context.disabled || disabled;\n const checkboxScope = useCheckboxScope(__scopeCheckboxGroup);\n const checked = context.value?.includes(itemProps.value);\n // A required group needs at least one box checked, not every box: the items are\n // required only while none is checked.\n const isRequired = context.required && (context.value?.length ?? 0) === 0;\n\n return (\n <CheckboxPrimitive.Root\n name={context.name}\n disabled={isDisabled}\n required={isRequired}\n checked={checked}\n {...checkboxScope}\n {...itemProps}\n ref={forwardedRef}\n onCheckedChange={(checked) => {\n if (checked) {\n context.onItemCheck(props.value);\n } else {\n context.onItemUncheck(props.value);\n }\n }}\n />\n );\n },\n);\n\nCheckboxGroupItem.displayName = ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * CheckboxGroupIndicator\n * -----------------------------------------------------------------------------------------------*/\n\nconst INDICATOR_NAME = 'CheckboxGroupIndicator';\n\ntype CheckboxGroupIndicatorElement = React.ElementRef<typeof CheckboxPrimitive.Indicator>;\ntype CheckboxIndicatorProps = React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Indicator>;\ninterface CheckboxGroupIndicatorProps extends CheckboxIndicatorProps {}\n\nconst CheckboxGroupIndicator = React.forwardRef<\n CheckboxGroupIndicatorElement,\n CheckboxGroupIndicatorProps\n>((props: ScopedProps<CheckboxGroupIndicatorProps>, forwardedRef) => {\n const { __scopeCheckboxGroup, ...indicatorProps } = props;\n const checkboxScope = useCheckboxScope(__scopeCheckboxGroup);\n return <CheckboxPrimitive.Indicator {...checkboxScope} {...indicatorProps} ref={forwardedRef} />;\n});\n\nCheckboxGroupIndicator.displayName = INDICATOR_NAME;\n\n/* ---------------------------------------------------------------------------------------------- */\n\nconst Root = CheckboxGroup;\nconst Item = CheckboxGroupItem;\nconst Indicator = CheckboxGroupIndicator;\n\nexport {\n createCheckboxGroupScope,\n //\n CheckboxGroup,\n CheckboxGroupItem,\n CheckboxGroupIndicator,\n //\n Root,\n Item,\n Indicator,\n};\nexport type { CheckboxGroupProps, CheckboxGroupItemProps, CheckboxGroupIndicatorProps };\n", "import type { PropDef } from './prop-def.js';\n\nconst asChildPropDef = {\n /**\n * Composes the component into its immediate child instead of rendering its own HTML element.\n * You\u2019ll have to provide a single React Element child.\n */\n asChild: {\n type: 'boolean',\n },\n} satisfies {\n asChild: PropDef<boolean>;\n};\n\nexport { asChildPropDef };\n", "import type { PropDef } from './prop-def.js';\n\n// prettier-ignore\nconst accentColors = ['gray', 'gold', 'bronze', 'brown', 'yellow', 'amber', 'orange', 'tomato', 'red', 'ruby', 'crimson', 'pink', 'plum', 'purple', 'violet', 'iris', 'indigo', 'blue', 'cyan', 'teal', 'jade', 'green', 'grass', 'lime', 'mint', 'sky'] as const;\n\nconst grayColors = ['auto', 'gray', 'mauve', 'slate', 'sage', 'olive', 'sand'] as const;\n\nconst colorPropDef = {\n color: {\n type: 'enum',\n values: accentColors,\n default: undefined as (typeof accentColors)[number] | undefined,\n },\n} satisfies {\n color: PropDef<(typeof accentColors)[number]>;\n};\n\n// 1. When used on components that compose Text, sets the color of the text to the current accent.\n// 2. Re-declares the accent role tokens (`--accent-ink`, `--accent-solid`, ...) that descendants read.\nconst accentColorPropDef = {\n color: {\n type: 'enum',\n values: accentColors,\n default: '' as (typeof accentColors)[number],\n },\n} satisfies {\n color: PropDef<(typeof accentColors)[number]>;\n};\n\n// For components whose colour comes from their content (Chip, Avatar, Code): they rest gray, and `color` picks a category when it means something.\nconst grayAccentColorPropDef = {\n color: {\n type: 'enum',\n values: accentColors,\n default: 'gray' as (typeof accentColors)[number],\n },\n} satisfies {\n color: PropDef<(typeof accentColors)[number]>;\n};\n\nexport {\n accentColorPropDef,\n grayAccentColorPropDef,\n colorPropDef,\n //\n accentColors,\n grayColors,\n};\n", "import { colorPropDef } from '../../props/color.prop.js';\n\nimport type { PropDef } from '../../props/prop-def.js';\n\nconst sizes = ['1', '2', '3', '4'] as const;\n\nconst baseCheckboxPropDefs = {\n size: { type: 'enum', className: 'kui-r-size', values: sizes, default: '2', responsive: true },\n ...colorPropDef,\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n};\n\nexport { baseCheckboxPropDefs };\n", "import { asChildPropDef } from '../props/as-child.prop.js';\nimport { baseCheckboxPropDefs } from './_internal/base-checkbox.props.js';\n\nconst checkboxGroupRootPropDefs = {\n ...asChildPropDef,\n ...baseCheckboxPropDefs,\n};\n\nexport { checkboxGroupRootPropDefs };\n", "import React from 'react';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\ntype IconElement = React.ElementRef<'svg'>;\ninterface IconProps extends ComponentPropsWithout<'svg', RemovedProps | 'children'> {}\n\nconst ThickDividerHorizontalIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {\n return (\n <svg width=\"9\" height=\"9\" viewBox=\"0 0 9 9\" fill=\"currentcolor\" xmlns=\"http://www.w3.org/2000/svg\" {...props} ref={forwardedRef}>\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M0.75 4.5C0.75 4.08579 1.08579 3.75 1.5 3.75H7.5C7.91421 3.75 8.25 4.08579 8.25 4.5C8.25 4.91421 7.91421 5.25 7.5 5.25H1.5C1.08579 5.25 0.75 4.91421 0.75 4.5Z\"\n />\n </svg>\n );\n});\n\nThickDividerHorizontalIcon.displayName = 'ThickDividerHorizontalIcon';\n\nconst ThickCheckIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {\n return (\n <svg width=\"9\" height=\"9\" viewBox=\"0 0 9 9\" fill=\"currentcolor\" xmlns=\"http://www.w3.org/2000/svg\" {...props} ref={forwardedRef}>\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M8.53547 0.62293C8.88226 0.849446 8.97976 1.3142 8.75325 1.66099L4.5083 8.1599C4.38833 8.34356 4.19397 8.4655 3.9764 8.49358C3.75883 8.52167 3.53987 8.45309 3.3772 8.30591L0.616113 5.80777C0.308959 5.52987 0.285246 5.05559 0.563148 4.74844C0.84105 4.44128 1.31533 4.41757 1.62249 4.69547L3.73256 6.60459L7.49741 0.840706C7.72393 0.493916 8.18868 0.396414 8.53547 0.62293Z\"\n />\n </svg>\n );\n});\nThickCheckIcon.displayName = 'ThickCheckIcon';\n\nconst ChevronDownIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {\n return (\n <svg width=\"9\" height=\"9\" viewBox=\"0 0 9 9\" fill=\"currentcolor\" xmlns=\"http://www.w3.org/2000/svg\" {...props} ref={forwardedRef}>\n <path d=\"M0.135232 3.15803C0.324102 2.95657 0.640521 2.94637 0.841971 3.13523L4.5 6.56464L8.158 3.13523C8.3595 2.94637 8.6759 2.95657 8.8648 3.15803C9.0536 3.35949 9.0434 3.67591 8.842 3.86477L4.84197 7.6148C4.64964 7.7951 4.35036 7.7951 4.15803 7.6148L0.158031 3.86477C-0.0434285 3.67591 -0.0536285 3.35949 0.135232 3.15803Z\" />\n </svg>\n );\n});\nChevronDownIcon.displayName = 'ChevronDownIcon';\n\nconst ThickChevronRightIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {\n return (\n <svg width=\"9\" height=\"9\" viewBox=\"0 0 9 9\" fill=\"currentcolor\" xmlns=\"http://www.w3.org/2000/svg\" {...props} ref={forwardedRef}>\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M3.23826 0.201711C3.54108 -0.0809141 4.01567 -0.0645489 4.29829 0.238264L7.79829 3.98826C8.06724 4.27642 8.06724 4.72359 7.79829 5.01174L4.29829 8.76174C4.01567 9.06455 3.54108 9.08092 3.23826 8.79829C2.93545 8.51567 2.91909 8.04108 3.20171 7.73826L6.22409 4.5L3.20171 1.26174C2.91909 0.958928 2.93545 0.484337 3.23826 0.201711Z\"\n />\n </svg>\n );\n});\nThickChevronRightIcon.displayName = 'ThickChevronRightIcon';\n\nconst ThickChevronLeftIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {\n return (\n <svg width=\"9\" height=\"9\" viewBox=\"0 0 9 9\" fill=\"currentcolor\" xmlns=\"http://www.w3.org/2000/svg\" {...props} ref={forwardedRef}>\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M5.76174 0.201711C5.45892 -0.0809141 4.98433 -0.0645489 4.70171 0.238264L1.20171 3.98826C0.932757 4.27642 0.932757 4.72359 1.20171 5.01174L4.70171 8.76174C4.98433 9.06455 5.45892 9.08092 5.76174 8.79829C6.06455 8.51567 6.08091 8.04108 5.79829 7.73826L2.77591 4.5L5.79829 1.26174C6.08091 0.958928 6.06455 0.484337 5.76174 0.201711Z\"\n />\n </svg>\n );\n});\nThickChevronLeftIcon.displayName = 'ThickChevronLeftIcon';\n\nconst ThickDotIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {\n return (\n <svg width=\"9\" height=\"9\" viewBox=\"0 0 9 9\" fill=\"currentcolor\" xmlns=\"http://www.w3.org/2000/svg\" {...props} ref={forwardedRef}>\n <circle cx=\"4.5\" cy=\"4.5\" r=\"2\" />\n </svg>\n );\n});\nThickDotIcon.displayName = 'ThickDotIcon';\n\nexport { ChevronDownIcon, ThickCheckIcon, ThickChevronLeftIcon, ThickChevronRightIcon, ThickDividerHorizontalIcon, ThickDotIcon };\nexport type { IconProps };\n\n// Additional minimal icons\nconst CloseIcon = React.forwardRef<IconElement, IconProps>((_props, _forwardedRef) => {\n return (\n <svg\n {..._props}\n ref={_forwardedRef}\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n );\n});\nCloseIcon.displayName = 'CloseIcon';\n\nconst PaperclipIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {\n return (\n <svg\n {...props}\n ref={forwardedRef}\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551\" />\n </svg>\n );\n});\nPaperclipIcon.displayName = 'PaperclipIcon';\n\nconst FileIcon = React.forwardRef<IconElement, IconProps>((_props, _forwardedRef) => {\n return (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n <path d=\"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z\" />\n <path d=\"M14 2v4a2 2 0 0 0 2 2h4\" />\n </svg>\n );\n});\nFileIcon.displayName = 'FileIcon';\n\nconst FileTextIcon = React.forwardRef<IconElement, IconProps>((_props, _forwardedRef) => {\n return (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n <path d=\"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z\" />\n <path d=\"M14 2v4a2 2 0 0 0 2 2h4\" />\n <path d=\"M10 9H8\" />\n <path d=\"M16 13H8\" />\n <path d=\"M16 17H8\" />\n </svg>\n );\n});\nFileTextIcon.displayName = 'FileTextIcon';\n\n/** The tick a button shows in place of its icon while `done`. Drawn on the 24 grid at the icon set's stroke. */\nconst TickIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {\n return (\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" {...props} ref={forwardedRef}>\n <path d=\"M5 12.75L9.5 17.25L19 7.25\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </svg>\n );\n});\nTickIcon.displayName = 'TickIcon';\n\nexport { CloseIcon, PaperclipIcon, FileIcon, FileTextIcon, TickIcon };\n", "import * as React from 'react';\nimport { Slot } from 'radix-ui';\n\nimport { extractProps } from '../helpers/extract-props.js';\nimport { textPropDefs } from './text.props.js';\n\nimport type { GetPropDefTypes } from '../props/prop-def.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\ntype TextElement = React.ElementRef<'span'>;\ntype TextOwnProps = GetPropDefTypes<typeof textPropDefs>;\ninterface CommonTextProps extends TextOwnProps {}\ntype TextSpanProps = { as?: 'span' } & ComponentPropsWithout<'span', RemovedProps>;\ntype TextDivProps = { as: 'div' } & ComponentPropsWithout<'div', RemovedProps>;\ntype TextLabelProps = { as: 'label' } & ComponentPropsWithout<'label', RemovedProps>;\ntype TextPProps = { as: 'p' } & ComponentPropsWithout<'p', RemovedProps>;\ntype TextProps = CommonTextProps & (TextSpanProps | TextDivProps | TextLabelProps | TextPProps);\n\n// Pre-merge prop definitions at module level to avoid per-render allocation\n\nconst Text = React.memo(\n React.forwardRef<TextElement, TextProps>((props, forwardedRef) => {\n const {\n children,\n className,\n asChild,\n as: Tag = 'span',\n color,\n ...textProps\n } = extractProps(props, textPropDefs);\n\n const combinedClassName = className ? `kui-Text ${className}` : 'kui-Text';\n\n if (asChild) {\n return (\n <Slot.Root\n data-accent-color={color}\n {...textProps}\n ref={forwardedRef}\n className={combinedClassName}\n >\n {children}\n </Slot.Root>\n );\n }\n\n return (\n <Tag\n data-accent-color={color}\n {...(textProps as React.HTMLAttributes<HTMLElement>)}\n ref={forwardedRef as any}\n className={combinedClassName}\n >\n {children}\n </Tag>\n );\n })\n);\nText.displayName = 'Text';\n\nexport { Text };\nexport type { TextProps };\n", "import classNames from 'classnames';\n\nimport { getCompiledPropDefs } from './compile-prop-defs.js';\nimport { getResponsiveClassNames, getResponsiveStyles } from './get-responsive-styles.js';\nimport { isResponsiveObject } from './is-responsive-object.js';\nimport { mergeStyles } from './merge-styles.js';\n\nimport type { CompiledPropDef } from './compile-prop-defs.js';\nimport type * as React from 'react';\nimport type { PropDef } from '../props/prop-def.js';\n\ntype PropDefsWithClassName<T> = T extends Record<string, PropDef> ? { [K in keyof T]: T[K] extends { className: string } ? K : never }[keyof T] : never;\n\ntype ResponsiveValue = Record<string, string | undefined>;\n\n/**\n * Fills in the `initial` breakpoint of a responsive value from the prop def's\n * default, and coerces an invalid `initial` enum value back to that default.\n *\n * Returns the value untouched when nothing needs changing, and a copy otherwise\n * \u2014 callers routinely hoist responsive objects to module scope, so mutating the\n * caller's object would corrupt it for every later render.\n */\nfunction normalizeResponsiveValue(value: ResponsiveValue, propDef: CompiledPropDef) {\n let initial = value.initial;\n let changed = false;\n\n if (propDef.hasDefault && initial === undefined) {\n initial = propDef.default as string | undefined;\n changed = true;\n }\n\n if (propDef.enumValueSet !== undefined && !propDef.enumValueSet.has(initial)) {\n initial = propDef.default as string | undefined;\n changed = true;\n }\n\n return changed ? { ...value, initial } : value;\n}\n\n/**\n * Takes props, checks them against prop defs that have a `className` on them,\n * adds necessary CSS classes and inline styles, and returns the props without\n * the corresponding prop defs that were used to formulate the new `className`\n * and `style` values. Also applies prop def defaults to every prop.\n */\nfunction extractProps<P extends { className?: string; style?: React.CSSProperties; [key: string]: any }, T extends Record<string, PropDef>[]>(\n props: P,\n ...propDefs: T\n): Omit<P & { className?: string; style?: React.CSSProperties }, PropDefsWithClassName<T[number]>> {\n const { styling, passthrough, stylingKeys } = getCompiledPropDefs(propDefs);\n\n // Copy the props that survive to the element rather than spreading and then\n // deleting the styling keys. Deleting off a spread demotes the object to\n // dictionary mode in V8, and this object is on the render path of every\n // component in the library.\n const extractedProps: Record<string, any> = {};\n for (const key in props) {\n if (stylingKeys.has(key)) continue;\n extractedProps[key] = props[key];\n }\n\n for (let i = 0; i < passthrough.length; i++) {\n const propDef = passthrough[i];\n const value = extractedProps[propDef.key];\n\n if (value === undefined) {\n if (propDef.hasDefault) extractedProps[propDef.key] = propDef.default;\n continue;\n }\n\n // Fall back to the default when the value is not a valid enum value\n if (propDef.enumValueSet !== undefined && !propDef.enumValueSet.has(value) && !isResponsiveObject(value)) {\n extractedProps[propDef.key] = propDef.default;\n }\n }\n\n let style: ReturnType<typeof mergeStyles>;\n const classes: string[] = [];\n\n for (let i = 0; i < styling.length; i++) {\n const propDef = styling[i];\n let value = props[propDef.key];\n\n // Apply prop def defaults\n if (value === undefined && propDef.hasDefault) {\n value = propDef.default;\n }\n\n // Apply the default value if the value is not a valid enum value\n if (propDef.enumValueSet !== undefined && !propDef.enumValueSet.has(value) && !isResponsiveObject(value)) {\n value = propDef.default;\n }\n\n if (!value) continue;\n\n if (isResponsiveObject(value)) {\n // Make sure we are not threading through responsive values for non-responsive prop defs\n if (!propDef.responsive) continue;\n value = normalizeResponsiveValue(value, propDef);\n }\n\n if (propDef.type === 'enum') {\n const propClassName = getResponsiveClassNames({\n allowArbitraryValues: false,\n value,\n className: propDef.className!,\n propValues: propDef.values,\n propValueSet: propDef.valueSet,\n parseValue: propDef.parseValue,\n });\n\n if (propClassName) classes.push(propClassName);\n continue;\n }\n\n if (propDef.type === 'string' || propDef.type === 'enum | string') {\n const [propClassNames, propCustomProperties] = getResponsiveStyles({\n className: propDef.className!,\n customProperties: propDef.customProperties!,\n // `string` prop defs have no enum values, so every value is arbitrary\n propValues: propDef.type === 'string' ? [] : propDef.values,\n propValueSet: propDef.type === 'string' ? undefined : propDef.valueSet,\n parseValue: propDef.parseValue,\n value,\n });\n\n if (propCustomProperties) style = mergeStyles(style, propCustomProperties);\n if (propClassNames) classes.push(propClassNames);\n continue;\n }\n\n if (propDef.type === 'boolean') {\n // TODO handle responsive boolean props\n classes.push(propDef.className!);\n continue;\n }\n }\n\n extractedProps.className = classNames(classes.length > 0 ? classes.join(' ') : undefined, props.className);\n extractedProps.style = mergeStyles(style, props.style);\n return extractedProps as ReturnType<typeof extractProps<P, T>>;\n}\n\nexport { extractProps };\n", "import type { PropDef } from '../props/prop-def.js';\n\n/**\n * A prop def pre-processed into the exact shape `extractProps` needs at render\n * time. Everything that can be derived from the static prop def \u2014 enum\n * membership sets, whether the def is responsive, whether it carries a default\n * \u2014 is computed once here instead of on every render.\n */\ninterface CompiledPropDef {\n key: string;\n type: PropDef['type'];\n default: unknown;\n hasDefault: boolean;\n responsive: boolean;\n className?: string;\n customProperties?: `--${string}`[];\n parseValue?: (value: string) => string | undefined;\n /** The prop def's own enum values, kept for the responsive class name helpers. */\n values: readonly string[];\n /** O(1) membership for `values`. */\n valueSet: ReadonlySet<string>;\n /**\n * `values` plus the default, used to coerce invalid enum values back to the\n * default. Only present for `type: 'enum'` \u2014 `'enum | string'` props accept\n * arbitrary strings and must not be coerced.\n */\n enumValueSet?: ReadonlySet<unknown>;\n}\n\ninterface CompiledPropDefs {\n /** Defs that contribute a class name and/or custom properties. */\n styling: CompiledPropDef[];\n /**\n * Defs that pass through to the element but still need a default applied or\n * an invalid enum value coerced. Defs that can do neither are omitted\n * entirely \u2014 they are already correct as passed.\n */\n passthrough: CompiledPropDef[];\n /** Keys consumed by `styling`, so they can be skipped when copying props. */\n stylingKeys: ReadonlySet<string>;\n}\n\nconst EMPTY_VALUES: readonly string[] = [];\nconst EMPTY_SET: ReadonlySet<string> = new Set();\n\nfunction compile(propDefs: readonly Record<string, PropDef>[]): CompiledPropDefs {\n const merged: Record<string, PropDef> = Object.assign({}, ...propDefs);\n const styling: CompiledPropDef[] = [];\n const passthrough: CompiledPropDef[] = [];\n const stylingKeys = new Set<string>();\n\n for (const key in merged) {\n // The PropDef union is narrowed per-field below; reading the optional\n // members off the union directly is what the runtime actually needs.\n const def = merged[key] as PropDef & {\n default?: unknown;\n values?: readonly string[];\n className?: string;\n customProperties?: `--${string}`[];\n parseValue?: (value: string) => string | undefined;\n responsive?: true;\n };\n\n const values = def.values ?? EMPTY_VALUES;\n const compiled: CompiledPropDef = {\n key,\n type: def.type,\n default: def.default,\n hasDefault: def.default !== undefined,\n responsive: 'responsive' in def,\n className: def.className,\n customProperties: def.customProperties,\n parseValue: def.parseValue,\n values,\n valueSet: values.length > 0 ? new Set(values) : EMPTY_SET,\n enumValueSet: def.type === 'enum' ? new Set<unknown>([def.default, ...values]) : undefined,\n };\n\n if (def.className) {\n styling.push(compiled);\n stylingKeys.add(key);\n } else if (compiled.hasDefault || def.type === 'enum') {\n // Anything else is copied through untouched, so there is nothing to do.\n passthrough.push(compiled);\n }\n }\n\n return { styling, passthrough, stylingKeys };\n}\n\ninterface CacheNode {\n children: WeakMap<object, CacheNode>;\n compiled?: CompiledPropDefs;\n}\n\nconst cacheRoot: CacheNode = { children: new WeakMap() };\n\n/**\n * Compiles a set of prop defs, memoized on the identity of the prop def objects\n * themselves. Components always pass the same module-level constants, so after\n * the first render of a given component this is a couple of WeakMap lookups\n * instead of merging 50-odd prop defs into a fresh object.\n */\nfunction getCompiledPropDefs(propDefs: readonly Record<string, PropDef>[]): CompiledPropDefs {\n let node = cacheRoot;\n\n for (let i = 0; i < propDefs.length; i++) {\n const propDef = propDefs[i];\n let child = node.children.get(propDef);\n if (child === undefined) {\n child = { children: new WeakMap() };\n node.children.set(propDef, child);\n }\n node = child;\n }\n\n return (node.compiled ??= compile(propDefs));\n}\n\nexport { getCompiledPropDefs };\nexport type { CompiledPropDef, CompiledPropDefs };\n", "import type React from 'react';\n\n// Creates a union type of string literals with strings, but retains intellisense for the literals.\n// Union<string, 'foo' | 'bar'> => string | Omit<string, 'foo' | 'bar'>\ntype Union<S = string, T extends string | number = string> = T | Omit<S, T>;\n\nconst breakpoints = ['initial', 'xs', 'sm', 'md', 'lg', 'xl'] as const;\nconst breakpointSet: Set<string> = new Set(breakpoints);\ntype Breakpoint = (typeof breakpoints)[number];\ntype Responsive<T> = T | Partial<Record<Breakpoint, T>>;\n\ntype BooleanPropDef = {\n type: 'boolean';\n default?: boolean;\n required?: boolean;\n className?: string;\n};\ntype StringPropDef = {\n type: 'string';\n default?: string;\n required?: boolean;\n};\ntype ReactNodePropDef = {\n type: 'ReactNode';\n default?: React.ReactNode;\n required?: boolean;\n};\ntype EnumPropDef<T> = {\n type: 'enum';\n values: readonly T[];\n default?: T;\n required?: boolean;\n};\ntype EnumOrStringPropDef<T> = {\n type: 'enum | string';\n values: readonly T[];\n default?: T | string;\n required?: boolean;\n};\n\ntype NonStylingPropDef = {\n className?: never;\n customProperties?: never;\n parseValue?: never;\n};\n\ntype StylingPropDef = {\n className: string;\n parseValue?: (value: string) => string | undefined;\n};\n\ntype ArbitraryStylingPropDef = {\n className: string;\n customProperties: `--${string}`[];\n parseValue?: (value: string) => string | undefined;\n};\n\ntype RegularPropDef<T> =\n | ReactNodePropDef\n | BooleanPropDef\n | (StringPropDef & ArbitraryStylingPropDef)\n | (StringPropDef & NonStylingPropDef)\n | (EnumPropDef<T> & StylingPropDef)\n | (EnumPropDef<T> & NonStylingPropDef)\n | (EnumOrStringPropDef<T> & ArbitraryStylingPropDef)\n | (EnumOrStringPropDef<T> & NonStylingPropDef);\ntype ResponsivePropDef<T = any> = RegularPropDef<T> & { responsive: true };\ntype PropDef<T = any> = RegularPropDef<T> | ResponsivePropDef<T>;\n\n// prettier-ignore\ntype GetPropDefType<Def> =\n Def extends BooleanPropDef ? (Def extends ResponsivePropDef ? Responsive<boolean> : boolean)\n : Def extends StringPropDef ? (Def extends ResponsivePropDef ? Responsive<string> : string)\n : Def extends ReactNodePropDef ? (Def extends ResponsivePropDef ? Responsive<React.ReactNode> : React.ReactNode)\n : Def extends EnumOrStringPropDef<infer Type> ?\n Def extends ResponsivePropDef<infer Type extends string> ? Responsive<Union<string, Type>> : Type\n : Def extends EnumPropDef<infer Type> ? (Def extends ResponsivePropDef<infer Type> ? Responsive<Type> : Type)\n : never;\n\ntype GetPropDefTypes<P> = {\n [K in keyof P]?: GetPropDefType<P[K]>;\n};\n\nexport { breakpoints, breakpointSet };\nexport type {\n PropDef,\n GetPropDefTypes,\n ResponsivePropDef,\n //\n Breakpoint,\n Responsive,\n Union,\n};\n", "/** A util to check whether the object has a key, while inferring the correct key type */\nfunction hasOwnProperty<K extends string | number | symbol>(\n obj: Record<K, unknown>,\n key: string | number | symbol\n): key is K {\n return Object.prototype.hasOwnProperty.call(obj, key);\n}\n\nexport { hasOwnProperty };\n", "import type { Responsive, Breakpoint } from '../props/prop-def.js';\n\n// Use a Set for O(1) lookup instead of array.includes() which is O(n)\nconst breakpointSet = new Set<string>(['initial', 'xs', 'sm', 'md', 'lg', 'xl']);\n\nexport function isResponsiveObject<Value extends string>(\n obj: Responsive<Value | Omit<string, Value>> | undefined\n): obj is Record<Breakpoint, string> {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n // Use for...in to avoid Object.keys() array allocation\n for (const key in obj) {\n if (breakpointSet.has(key)) {\n return true;\n }\n }\n return false;\n}\n", "import { breakpointSet } from '../props/prop-def.js';\nimport { hasOwnProperty } from './has-own-property.js';\nimport { isResponsiveObject } from './is-responsive-object.js';\n\nimport type { Responsive, Union } from '../props/prop-def.js';\n\n/**\n * Membership test against a prop def's enum values. Callers that already hold a\n * compiled prop def pass `propValueSet` for an O(1) lookup; the handful of call\n * sites that build options inline fall back to scanning the array.\n */\nfunction includesValue(propValues: string[] | readonly string[], propValueSet: ReadonlySet<string> | undefined, value: string): boolean {\n return propValueSet !== undefined ? propValueSet.has(value) : propValues.includes(value);\n}\n\ninterface GetResponsiveStylesOptions {\n className: string;\n customProperties: `--${string}`[];\n value: Responsive<Union> | Responsive<string> | undefined;\n propValues: string[] | readonly string[];\n propValueSet?: ReadonlySet<string>;\n parseValue?: (value: string) => string | undefined;\n}\n\nfunction getResponsiveStyles({ className, customProperties, ...args }: GetResponsiveStylesOptions) {\n const responsiveClassNames = getResponsiveClassNames({\n allowArbitraryValues: true,\n className,\n ...args,\n });\n\n const responsiveCustomProperties = getResponsiveCustomProperties({ customProperties, ...args });\n return [responsiveClassNames, responsiveCustomProperties] as const;\n}\n\ninterface GetResponsiveClassNamesOptions {\n allowArbitraryValues?: boolean;\n className: string;\n value: Responsive<Union> | Responsive<string> | undefined;\n propValues: string[] | readonly string[];\n propValueSet?: ReadonlySet<string>;\n parseValue?: (value: string) => string | undefined;\n}\n\nfunction getResponsiveClassNames({ allowArbitraryValues, value, className, propValues, propValueSet, parseValue = (value) => value }: GetResponsiveClassNamesOptions): string | undefined {\n if (!value) {\n return undefined;\n }\n\n if (typeof value === 'string') {\n if (includesValue(propValues, propValueSet, value)) {\n return getBaseClassName(className, value, parseValue);\n }\n return allowArbitraryValues ? className : undefined;\n }\n\n if (isResponsiveObject(value)) {\n const object = value;\n const classNames: string[] = [];\n\n for (const bp in object) {\n // Make sure we are not iterating over keys that aren't breakpoints\n if (!hasOwnProperty(object, bp) || !breakpointSet.has(bp)) {\n continue;\n }\n\n const value = object[bp];\n\n if (value !== undefined) {\n if (includesValue(propValues, propValueSet, value)) {\n const baseClassName = getBaseClassName(className, value, parseValue);\n const bpClassName = bp === 'initial' ? baseClassName : `${bp}:${baseClassName}`;\n classNames.push(bpClassName);\n } else if (allowArbitraryValues) {\n const bpClassName = bp === 'initial' ? className : `${bp}:${className}`;\n classNames.push(bpClassName);\n }\n }\n }\n\n return classNames.length > 0 ? classNames.join(' ') : '';\n }\n\n if (allowArbitraryValues) {\n return className;\n }\n}\n\nfunction getBaseClassName(className: string, value: string, parseValue: (value: string) => string | undefined): string {\n const delimiter = className ? '-' : '';\n const matchedValue = parseValue(value);\n const isNegative = matchedValue?.startsWith('-');\n const minus = isNegative ? '-' : '';\n const absoluteValue = isNegative ? matchedValue?.substring(1) : matchedValue;\n return `${minus}${className}${delimiter}${absoluteValue}`;\n}\n\ninterface GetResponsiveCustomPropertiesOptions {\n customProperties: `--${string}`[];\n value: Responsive<Union> | Responsive<string> | undefined;\n propValues: string[] | readonly string[];\n propValueSet?: ReadonlySet<string>;\n parseValue?: (value: string) => string | undefined;\n}\n\nfunction getResponsiveCustomProperties({ customProperties, value, propValues, propValueSet, parseValue = (value) => value }: GetResponsiveCustomPropertiesOptions) {\n // Don't generate custom properties if the value is not arbitrary\n if (!value || (typeof value === 'string' && includesValue(propValues, propValueSet, value))) {\n return undefined;\n }\n\n let styles: Record<string, string | undefined> | undefined;\n\n if (typeof value === 'string') {\n const parsed = parseValue(value);\n styles = {};\n for (const customProperty of customProperties) {\n styles[customProperty] = parsed;\n }\n return styles;\n }\n\n if (isResponsiveObject(value)) {\n const object = value;\n\n for (const bp in object) {\n // Make sure we are not iterating over keys that aren't breakpoints\n if (!hasOwnProperty(object, bp) || !breakpointSet.has(bp)) {\n continue;\n }\n\n const value = object[bp];\n\n // Don't generate a custom property if the value is not arbitrary\n if (value === undefined || includesValue(propValues, propValueSet, value)) {\n continue;\n }\n\n const parsed = parseValue(value);\n styles ??= {};\n for (const customProperty of customProperties) {\n const bpProperty = bp === 'initial' ? customProperty : `${customProperty}-${bp}`;\n styles[bpProperty] = parsed;\n }\n }\n }\n\n return styles ?? {};\n}\n\nexport { getResponsiveStyles, getResponsiveCustomProperties, getResponsiveClassNames };\n", "type InlineStyle =\n | React.CSSProperties\n | Record<string, string | number | null | undefined>\n | undefined;\n\n// Merges CSS styles like `classNames` merges CSS classes\n// Optimized to avoid object spread in loop - uses Object.assign for in-place mutation\nexport function mergeStyles(...styles: Array<InlineStyle>): InlineStyle {\n let result: Record<string, string | number | null | undefined> | undefined;\n\n for (const style of styles) {\n if (style) {\n if (result === undefined) {\n // First non-empty style - create result object\n result = {};\n }\n Object.assign(result, style);\n }\n }\n\n return result;\n}\n", "import type { PropDef } from './prop-def.js';\n\nconst emphases = ['loud', 'medium', 'quiet'] as const;\n\n// Text-first components only (Text, Heading, Blockquote, Code).\n// No colour + emphasis reads the gray ink ladder; colour + emphasis reads the accent ink ladder.\n// Components that need a different default spread this def and override `default`.\nconst emphasisPropDef = {\n emphasis: {\n type: 'enum',\n className: 'kui-emphasis',\n values: emphases,\n default: undefined,\n },\n} satisfies {\n emphasis: PropDef<(typeof emphases)[number]>;\n};\n\nexport { emphasisPropDef, emphases };\n", "import type { PropDef } from './prop-def.js';\n\nconst leadingTrimValues = ['normal', 'start', 'end', 'both'] as const;\n\nconst leadingTrimPropDef = {\n trim: {\n type: 'enum',\n className: 'kui-r-lt',\n values: leadingTrimValues,\n responsive: true,\n },\n} satisfies {\n trim: PropDef<(typeof leadingTrimValues)[number]>;\n};\n\nexport { leadingTrimPropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst textAlignValues = ['left', 'center', 'right'] as const;\n\nconst textAlignPropDef = {\n align: {\n type: 'enum',\n className: 'kui-r-ta',\n values: textAlignValues,\n responsive: true,\n },\n} satisfies {\n align: PropDef<(typeof textAlignValues)[number]>;\n};\n\nexport { textAlignPropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst textWrapValues = ['wrap', 'nowrap', 'pretty', 'balance'] as const;\n\nconst textWrapPropDef = {\n wrap: {\n type: 'enum',\n className: 'kui-r-tw',\n values: textWrapValues,\n responsive: true,\n },\n} satisfies {\n wrap: PropDef<(typeof textWrapValues)[number]>;\n};\n\nexport { textWrapPropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst truncatePropDef = {\n truncate: {\n type: 'boolean',\n className: 'kui-truncate',\n },\n} satisfies {\n truncate: PropDef<boolean>;\n};\n\nexport { truncatePropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst fontFamilies = ['sans', 'mono', 'serif'] as const;\n\nconst fontFamilyPropDef = {\n font: {\n type: 'enum',\n className: 'kui-r-ff',\n values: fontFamilies,\n },\n} satisfies {\n font: PropDef<(typeof fontFamilies)[number]>;\n};\n\nexport { fontFamilyPropDef };\n", "import type { PropDef } from './prop-def.js';\n\n/** v2's three weights (\u00A715). No bold: a larger size or stronger emphasis says importance. */\nconst weights = ['regular', 'medium', 'semibold'] as const;\n\nconst weightPropDef = {\n weight: {\n type: 'enum',\n className: 'kui-r-weight',\n values: weights,\n responsive: true,\n },\n} satisfies {\n weight: PropDef<(typeof weights)[number]>;\n};\n\nexport { weightPropDef };\n", "import { asChildPropDef } from '../props/as-child.prop.js';\nimport { colorPropDef } from '../props/color.prop.js';\nimport { emphasisPropDef } from '../props/emphasis.prop.js';\nimport { leadingTrimPropDef } from '../props/leading-trim.prop.js';\nimport { textAlignPropDef } from '../props/text-align.prop.js';\nimport { textWrapPropDef } from '../props/text-wrap.prop.js';\nimport { truncatePropDef } from '../props/truncate.prop.js';\nimport { fontFamilyPropDef } from '../props/font-family.prop.js';\nimport { weightPropDef } from '../props/weight.prop.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst as = ['span', 'div', 'label', 'p'] as const;\nconst sizes = ['1', '2', '3', '4', '5', '6', '7', '8', '9'] as const;\n\nconst textPropDefs = {\n as: { type: 'enum', values: as, default: 'span' },\n ...asChildPropDef,\n size: {\n type: 'enum',\n className: 'kui-r-size',\n values: sizes,\n responsive: true,\n },\n ...fontFamilyPropDef,\n ...weightPropDef,\n ...textAlignPropDef,\n ...leadingTrimPropDef,\n ...truncatePropDef,\n ...textWrapPropDef,\n ...colorPropDef,\n ...emphasisPropDef,\n} satisfies {\n as: PropDef<(typeof as)[number]>;\n size: PropDef<(typeof sizes)[number]>;\n};\n\nexport { textPropDefs };\n", "'use client';\n\nimport * as React from 'react';\n\nimport { THEME_SIZE_DEFAULT, clampSize } from '../helpers/theme-size.js';\nimport type { ThemeSize } from '../helpers/theme-size.js';\n\n/**\n * The app-wide size index, provided by `Theme` beside `ThemeContext`.\n *\n * It is its own context, holding one string, so a component that only needs\n * the size does not re-render when the accent colour or appearance changes.\n */\nconst ThemeSizeContext = React.createContext<ThemeSize>(THEME_SIZE_DEFAULT);\nThemeSizeContext.displayName = 'ThemeSizeContext';\n\ninterface SizePropDef {\n values: readonly string[];\n default?: string;\n}\n\n/**\n * The size a component on the 1-4 index takes: what the caller said, else the\n * nearest Theme's size, mapped into the component's range.\n */\nfunction useThemeSize<V>(explicit: V | undefined, propDef: SizePropDef): V {\n const themeSize = React.useContext(ThemeSizeContext);\n if (explicit !== undefined) return explicit;\n // The clamped value is one of `propDef.values`, which is what `V` ranges over.\n return clampSize(themeSize, propDef.values) as V;\n}\n\n/**\n * Fills `size` from the nearest Theme when the caller left it unset, so the\n * result can go straight into `extractProps`. An explicit size, responsive\n * object included, wins.\n *\n * Returns the same props object when there is nothing to fill: when a size is\n * set, or when the theme size resolves to the prop def's own default (the\n * common case, a Theme with no size), so `extractProps` applies it as before.\n */\nfunction useThemeSizeProps<P extends { size?: unknown }>(props: P, propDef: SizePropDef): P {\n const themeSize = React.useContext(ThemeSizeContext);\n if (props.size !== undefined) return props;\n const size = clampSize(themeSize, propDef.values);\n if (size === propDef.default) return props;\n return { ...props, size };\n}\n\nexport { ThemeSizeContext, useThemeSize, useThemeSizeProps };\n", "/**\n * The pure half of the theme size: the type, the default and the clamp. Server-safe.\n *\n * The context and the hooks that read it live in `hooks/theme-size.ts`, a client module, so there\n * is one `ThemeSizeContext` and importing `/helpers` from a server component does not call\n * `createContext`.\n */\n\ntype ThemeSize = '1' | '2' | '3' | '4';\n\n/** The rest of the 1-4 index when no Theme states a size. */\nconst THEME_SIZE_DEFAULT: ThemeSize = '2';\n\n/**\n * Maps the theme size onto a component's own range: the value itself when the\n * component has it, otherwise the nearest end of the range (`4` on a 1-3 scale\n * is `3`, on a 1-2 scale it is `2`).\n */\nfunction clampSize(size: ThemeSize, values: readonly string[]): string {\n if (values.includes(size)) return size;\n const n = Number(size);\n let nearest = values[0];\n let distance = Infinity;\n for (let i = 0; i < values.length; i++) {\n const d = Math.abs(Number(values[i]) - n);\n if (d < distance) {\n distance = d;\n nearest = values[i];\n }\n }\n return nearest;\n}\n\nexport { THEME_SIZE_DEFAULT, clampSize };\nexport type { ThemeSize };\n"],
5
- "mappings": ";mlBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,UAAAE,GAAA,SAAAC,KAAA,eAAAC,GAAAJ,IAEA,IAAAK,EAAuB,oBACvBC,EAAuB,yBACvBC,GAAwB,6BCFxB,IAAAC,EAAuB,oBACvBC,EAAyD,oBACzDC,EAAyD,6BAEnD,CAAE,aAAAC,EAAa,EAAI,YAKnBC,EAAsB,gBAGtB,CAACC,GAA4BC,CAAwB,EAAI,UAAQ,mBACrEF,EACA,CAAC,EAAAG,SAAkB,mBAAmB,CACxC,EACMC,EAAmB,EAAAD,SAAkB,oBAAoB,EAWzD,CAACE,GAAuBC,EAAuB,EACnDL,GAAsDD,CAAmB,EAwBrEO,EAAsB,aAC1B,CAACC,EAAwCC,IAAiB,CACxD,GAAM,CACJ,qBAAAC,EACA,KAAAC,EACA,aAAAC,EACA,MAAOC,EACP,SAAAC,EAAW,GACX,SAAAC,EAAW,GACX,YAAaC,EACb,IAAAC,EACA,KAAMC,EACN,cAAAC,EACA,GAAGC,CACL,EAAIZ,EACEa,GAAYtB,GAAakB,CAAG,EAC5B,CAACK,GAAQ,CAAC,EAAGC,CAAQ,KAAI,wBAAqB,CAClD,KAAMV,EACN,YAAaD,GAAgB,CAAC,EAC9B,SAAUO,CACZ,CAAC,EAEKK,GAAwB,cAC3BC,GAAsBF,EAAS,CAACG,EAAY,CAAC,IAAM,CAAC,GAAGA,EAAWD,CAAS,CAAC,EAC7E,CAAC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AAO,SAAW,wBAAyBJ,CAAS,EACxD,MAAOQ,GAEP,gBAACE,EAAA,CACC,qBAAsBX,EACrB,GAAGJ,EACJ,IAAKC,EACP,EACCW,GAAY,gBAAC,QAAK,UAAU,8BAA8BA,CAAS,CACtE,EAKF,gBAACG,EAAA,CACC,qBAAsBX,EACrB,GAAGJ,EACJ,IAAKC,EACL,UAAWI,EACX,MAAOQ,EACT,CAEJ,CACF,EACAH,GAAkB,YAAc,qBAKhC,IAAMK,EAAkC,aAGtC,CAAC,CAAE,qBAAAX,EAAsB,GAAGJ,CAAM,EAAGC,IAAiB,CACtD,IAAMe,EAAUrB,GAAwB,4BAA6BS,CAAoB,EACnFG,EAAqBd,GAAsBW,CAAoB,EAC/D,CAAE,MAAAP,EAAO,UAAAQ,CAAU,EAAIY,EAC3B,CAAE,GAAGjB,EAAO,GAAGgB,CAAQ,EACvBlB,CACF,EACA,OACE,gBAAwBoB,EAAvB,CACE,GAAGX,EACJ,oBAAmBV,EAClB,GAAGG,EACJ,IAAKC,EACL,aAAW,EAAAQ,SACT,YACA,uBACA,gCACAJ,CACF,GAEA,gBAAwBc,EAAvB,CACE,GAAGZ,EACJ,QAAO,GACP,UAAU,6BAEV,gBAACa,EAAA,IAAe,CAClB,CACF,CAEJ,CAAC,EACDL,EAA0B,YAAc",
6
- "names": ["checkbox_group_exports", "__export", "CheckboxGroupItem", "CheckboxGroupRoot", "__toCommonJS", "React", "import_classnames", "import_internal", "React", "import_radix_ui", "import_internal", "useDirection", "CHECKBOX_GROUP_NAME", "createCheckboxGroupContext", "createCheckboxGroupScope", "CheckboxPrimitive", "useCheckboxScope", "CheckboxGroupProvider", "useCheckboxGroupContext", "CheckboxGroup", "props", "forwardedRef", "__scopeCheckboxGroup", "name", "defaultValue", "valueProp", "required", "disabled", "_orientation", "dir", "_loop", "onValueChange", "groupProps", "direction", "value", "setValue", "handleItemCheck", "itemValue", "prevValue", "handleItemUncheck", "ITEM_NAME", "CheckboxGroupItem", "itemProps", "context", "isDisabled", "checkboxScope", "checked", "isRequired", "INDICATOR_NAME", "CheckboxGroupIndicator", "indicatorProps", "Root", "Item", "Indicator", "asChildPropDef", "accentColors", "colorPropDef", "accentColors", "sizes", "baseCheckboxPropDefs", "colorPropDef", "checkboxGroupRootPropDefs", "asChildPropDef", "baseCheckboxPropDefs", "import_react", "ThickDividerHorizontalIcon", "React", "props", "forwardedRef", "ThickCheckIcon", "ChevronDownIcon", "ThickChevronRightIcon", "ThickChevronLeftIcon", "ThickDotIcon", "CloseIcon", "React", "_props", "_forwardedRef", "PaperclipIcon", "props", "forwardedRef", "FileIcon", "FileTextIcon", "TickIcon", "React", "import_radix_ui", "import_classnames", "EMPTY_VALUES", "EMPTY_SET", "compile", "propDefs", "merged", "styling", "passthrough", "stylingKeys", "key", "def", "values", "compiled", "cacheRoot", "getCompiledPropDefs", "node", "i", "propDef", "child", "breakpoints", "breakpointSet", "hasOwnProperty", "obj", "key", "breakpointSet", "isResponsiveObject", "obj", "key", "includesValue", "propValues", "propValueSet", "value", "getResponsiveStyles", "className", "customProperties", "args", "responsiveClassNames", "getResponsiveClassNames", "responsiveCustomProperties", "getResponsiveCustomProperties", "allowArbitraryValues", "parseValue", "getBaseClassName", "isResponsiveObject", "object", "classNames", "bp", "hasOwnProperty", "breakpointSet", "baseClassName", "bpClassName", "delimiter", "matchedValue", "isNegative", "minus", "absoluteValue", "styles", "parsed", "customProperty", "bpProperty", "mergeStyles", "styles", "result", "style", "normalizeResponsiveValue", "value", "propDef", "initial", "changed", "extractProps", "props", "propDefs", "styling", "passthrough", "stylingKeys", "getCompiledPropDefs", "extractedProps", "key", "i", "isResponsiveObject", "style", "classes", "propClassName", "getResponsiveClassNames", "propClassNames", "propCustomProperties", "getResponsiveStyles", "mergeStyles", "classNames", "emphases", "emphasisPropDef", "leadingTrimValues", "leadingTrimPropDef", "textAlignValues", "textAlignPropDef", "textWrapValues", "textWrapPropDef", "truncatePropDef", "fontFamilies", "fontFamilyPropDef", "weights", "weightPropDef", "as", "sizes", "textPropDefs", "asChildPropDef", "fontFamilyPropDef", "weightPropDef", "textAlignPropDef", "leadingTrimPropDef", "truncatePropDef", "textWrapPropDef", "colorPropDef", "emphasisPropDef", "Text", "props", "forwardedRef", "children", "className", "asChild", "Tag", "color", "textProps", "extractProps", "textPropDefs", "combinedClassName", "React", "clampSize", "size", "values", "n", "nearest", "distance", "i", "d", "ThemeSizeContext", "useThemeSize", "explicit", "propDef", "themeSize", "clampSize", "CHECKBOX_GROUP_NAME", "createCheckboxGroupContext", "createCheckboxGroupScope", "useCheckboxGroupScope", "CheckboxGroupProvider", "useCheckboxGroupContext", "CheckboxGroupRoot", "color", "checkboxGroupRootPropDefs", "sizeProp", "props", "forwardedRef", "size", "useThemeSize", "__scopeCheckboxGroup", "className", "rootProps", "checkboxGroupScope", "Root", "classNames", "CheckboxGroupItem", "_props", "children", "style", "Text", "CheckboxGroupItemCheckbox", "context", "extractProps", "Item", "Indicator", "ThickCheckIcon"]
4
+ "sourcesContent": ["'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { Context } from 'radix-ui/internal';\n\nimport * as CheckboxGroupPrimitive from './checkbox-group.primitive.js';\nimport { createCheckboxGroupScope } from './checkbox-group.primitive.js';\nimport { checkboxGroupRootPropDefs } from './checkbox-group.props.js';\nimport { ThickCheckIcon } from './icons.js';\nimport { Text } from './text.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { useThemeSize } from '../hooks/theme-size.js';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\nconst CHECKBOX_GROUP_NAME = 'CheckboxGroup';\n\ntype ScopedProps<P> = P & { __scopeCheckboxGroup?: Context.Scope };\nconst [createCheckboxGroupContext] = Context.createContextScope(CHECKBOX_GROUP_NAME, [\n createCheckboxGroupScope,\n]);\nconst useCheckboxGroupScope = createCheckboxGroupScope();\n\ntype CheckboxGroupRootOwnProps = GetPropDefTypes<typeof checkboxGroupRootPropDefs>;\ntype CheckboxGroupContextValue = CheckboxGroupRootOwnProps;\n\nconst [CheckboxGroupProvider, useCheckboxGroupContext] =\n createCheckboxGroupContext<CheckboxGroupContextValue>(CHECKBOX_GROUP_NAME);\n\ntype CheckboxGroupRootElement = React.ElementRef<typeof CheckboxGroupPrimitive.Root>;\ninterface CheckboxGroupRootProps\n extends ComponentPropsWithout<\n typeof CheckboxGroupPrimitive.Root,\n 'asChild' | 'color' | 'defaultChecked'\n >,\n CheckboxGroupRootOwnProps {}\nconst CheckboxGroupRoot = React.forwardRef<CheckboxGroupRootElement, CheckboxGroupRootProps>(\n (\n {\n color = checkboxGroupRootPropDefs.color.default,\n size: sizeProp,\n ...props\n }: ScopedProps<CheckboxGroupRootProps>,\n forwardedRef,\n ) => {\n const size = useThemeSize(sizeProp, checkboxGroupRootPropDefs.size);\n const { __scopeCheckboxGroup, className, ...rootProps } = props;\n const checkboxGroupScope = useCheckboxGroupScope(__scopeCheckboxGroup);\n return (\n <CheckboxGroupProvider\n scope={__scopeCheckboxGroup}\n color={color}\n size={size}\n >\n <CheckboxGroupPrimitive.Root\n {...checkboxGroupScope}\n {...rootProps}\n ref={forwardedRef}\n className={classNames('kui-CheckboxGroupRoot', className)}\n />\n </CheckboxGroupProvider>\n );\n },\n);\nCheckboxGroupRoot.displayName = 'CheckboxGroup.Root';\n\ntype CheckboxGroupItemElement = React.ElementRef<typeof CheckboxGroupPrimitive.Item>;\ninterface CheckboxGroupItemProps\n extends ComponentPropsWithout<typeof CheckboxGroupPrimitive.Item, RemovedProps> {}\nconst CheckboxGroupItem = React.forwardRef<CheckboxGroupItemElement, CheckboxGroupItemProps>(\n (_props: ScopedProps<CheckboxGroupItemProps>, forwardedRef) => {\n const { __scopeCheckboxGroup, children, className, style, ...props } = _props;\n const { size } = useCheckboxGroupContext('CheckboxGroupItem', __scopeCheckboxGroup);\n\n // Render `<Text as=\"label\">` if children\u00A0are provided, otherwise render\n // the solo checkbox to allow building out your custom layouts with it.\n if (children) {\n return (\n <Text\n as=\"label\"\n size={size}\n className={classNames('kui-CheckboxGroupItem', className)}\n style={style}\n >\n <CheckboxGroupItemCheckbox\n __scopeCheckboxGroup={__scopeCheckboxGroup}\n {...props}\n ref={forwardedRef}\n />\n {children && <span className=\"kui-CheckboxGroupItemInner\">{children}</span>}\n </Text>\n );\n }\n\n return (\n <CheckboxGroupItemCheckbox\n __scopeCheckboxGroup={__scopeCheckboxGroup}\n {...props}\n ref={forwardedRef}\n className={className}\n style={style}\n />\n );\n },\n);\nCheckboxGroupItem.displayName = 'CheckboxGroup.Item';\n\ntype CheckboxGroupItemCheckboxElement = React.ElementRef<typeof CheckboxGroupPrimitive.Item>;\ninterface CheckboxGroupItemCheckboxProps\n extends ComponentPropsWithout<typeof CheckboxGroupPrimitive.Item, RemovedProps> {}\nconst CheckboxGroupItemCheckbox = React.forwardRef<\n CheckboxGroupItemCheckboxElement,\n ScopedProps<CheckboxGroupItemCheckboxProps>\n>(({ __scopeCheckboxGroup, ...props }, forwardedRef) => {\n const context = useCheckboxGroupContext('CheckboxGroupItemCheckbox', __scopeCheckboxGroup);\n const checkboxGroupScope = useCheckboxGroupScope(__scopeCheckboxGroup);\n const { color, className } = extractProps(\n { ...props, ...context },\n checkboxGroupRootPropDefs,\n );\n return (\n <CheckboxGroupPrimitive.Item\n {...checkboxGroupScope}\n data-accent-color={color}\n {...props}\n ref={forwardedRef}\n className={classNames(\n 'kui-reset',\n 'kui-BaseCheckboxRoot',\n 'kui-CheckboxGroupItemCheckbox',\n className,\n )}\n >\n <CheckboxGroupPrimitive.Indicator\n {...checkboxGroupScope}\n asChild\n className=\"kui-BaseCheckboxIndicator\"\n >\n <ThickCheckIcon />\n </CheckboxGroupPrimitive.Indicator>\n </CheckboxGroupPrimitive.Item>\n );\n});\nCheckboxGroupItemCheckbox.displayName = 'CheckboxGroup.ItemCheckbox';\n\nexport { CheckboxGroupRoot as Root, CheckboxGroupItem as Item };\nexport type { CheckboxGroupRootProps as RootProps, CheckboxGroupItemProps as ItemProps };\n", "'use client';\n\nimport * as React from 'react';\nimport { Checkbox as CheckboxPrimitive, Direction } from 'radix-ui';\nimport { Context, Primitive, useControllableState } from 'radix-ui/internal';\n\nconst { useDirection } = Direction;\n\n/* -------------------------------------------------------------------------------------------------\n * CheckboxGroup\n * -----------------------------------------------------------------------------------------------*/\nconst CHECKBOX_GROUP_NAME = 'CheckboxGroup';\n\ntype ScopedProps<P> = P & { __scopeCheckboxGroup?: Context.Scope };\nconst [createCheckboxGroupContext, createCheckboxGroupScope] = Context.createContextScope(\n CHECKBOX_GROUP_NAME,\n [CheckboxPrimitive.createCheckboxScope],\n);\nconst useCheckboxScope = CheckboxPrimitive.createCheckboxScope();\n\ntype CheckboxGroupContextValue = {\n name?: string;\n required: boolean;\n disabled: boolean;\n value?: string[];\n onItemCheck(value: string): void;\n onItemUncheck(value: string): void;\n};\n\nconst [CheckboxGroupProvider, useCheckboxGroupContext] =\n createCheckboxGroupContext<CheckboxGroupContextValue>(CHECKBOX_GROUP_NAME);\n\ntype CheckboxGroupElement = React.ElementRef<typeof Primitive.div>;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;\ninterface CheckboxGroupProps extends PrimitiveDivProps {\n name?: CheckboxGroupContextValue['name'];\n required?: React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>['required'];\n disabled?: React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>['disabled'];\n dir?: 'ltr' | 'rtl';\n defaultValue?: string[];\n value?: CheckboxGroupContextValue['value'];\n onValueChange?: (value: string[]) => void;\n}\n\nconst CheckboxGroup = React.forwardRef<CheckboxGroupElement, CheckboxGroupProps>(\n (props: ScopedProps<CheckboxGroupProps>, forwardedRef) => {\n const {\n __scopeCheckboxGroup,\n name,\n defaultValue,\n value: valueProp,\n required = false,\n disabled = false,\n dir,\n onValueChange,\n ...groupProps\n } = props;\n const direction = useDirection(dir);\n const [value = [], setValue] = useControllableState({\n prop: valueProp,\n defaultProp: defaultValue ?? [],\n onChange: onValueChange,\n });\n\n const handleItemCheck = React.useCallback(\n (itemValue: string) => setValue((prevValue = []) => [...prevValue, itemValue]),\n [setValue],\n );\n\n const handleItemUncheck = React.useCallback(\n (itemValue: string) =>\n setValue((prevValue = []) => prevValue.filter((value) => value !== itemValue)),\n [setValue],\n );\n\n return (\n <CheckboxGroupProvider\n scope={__scopeCheckboxGroup}\n name={name}\n required={required}\n disabled={disabled}\n value={value}\n onItemCheck={handleItemCheck}\n onItemUncheck={handleItemUncheck}\n >\n <Primitive.div\n role=\"group\"\n data-disabled={disabled ? '' : undefined}\n dir={direction}\n {...groupProps}\n ref={forwardedRef}\n />\n </CheckboxGroupProvider>\n );\n },\n);\n\nCheckboxGroup.displayName = CHECKBOX_GROUP_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * CheckboxGroupItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst ITEM_NAME = 'CheckboxGroupItem';\n\ntype CheckboxGroupItemElement = React.ElementRef<typeof CheckboxPrimitive.Root>;\ntype CheckboxProps = React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>;\ninterface CheckboxGroupItemProps\n extends Omit<CheckboxProps, 'checked' | 'defaultChecked' | 'onCheckedChange' | 'name'> {\n value: string;\n}\n\nconst CheckboxGroupItem = React.forwardRef<CheckboxGroupItemElement, CheckboxGroupItemProps>(\n (props: ScopedProps<CheckboxGroupItemProps>, forwardedRef) => {\n const { __scopeCheckboxGroup, disabled, ...itemProps } = props;\n const context = useCheckboxGroupContext(ITEM_NAME, __scopeCheckboxGroup);\n const isDisabled = context.disabled || disabled;\n const checkboxScope = useCheckboxScope(__scopeCheckboxGroup);\n const checked = context.value?.includes(itemProps.value);\n // A required group needs at least one box checked, not every box: the items are\n // required only while none is checked.\n const isRequired = context.required && (context.value?.length ?? 0) === 0;\n\n return (\n <CheckboxPrimitive.Root\n name={context.name}\n disabled={isDisabled}\n required={isRequired}\n checked={checked}\n {...checkboxScope}\n {...itemProps}\n ref={forwardedRef}\n onCheckedChange={(checked) => {\n if (checked) {\n context.onItemCheck(props.value);\n } else {\n context.onItemUncheck(props.value);\n }\n }}\n />\n );\n },\n);\n\nCheckboxGroupItem.displayName = ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * CheckboxGroupIndicator\n * -----------------------------------------------------------------------------------------------*/\n\nconst INDICATOR_NAME = 'CheckboxGroupIndicator';\n\ntype CheckboxGroupIndicatorElement = React.ElementRef<typeof CheckboxPrimitive.Indicator>;\ntype CheckboxIndicatorProps = React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Indicator>;\ninterface CheckboxGroupIndicatorProps extends CheckboxIndicatorProps {}\n\nconst CheckboxGroupIndicator = React.forwardRef<\n CheckboxGroupIndicatorElement,\n CheckboxGroupIndicatorProps\n>((props: ScopedProps<CheckboxGroupIndicatorProps>, forwardedRef) => {\n const { __scopeCheckboxGroup, ...indicatorProps } = props;\n const checkboxScope = useCheckboxScope(__scopeCheckboxGroup);\n return <CheckboxPrimitive.Indicator {...checkboxScope} {...indicatorProps} ref={forwardedRef} />;\n});\n\nCheckboxGroupIndicator.displayName = INDICATOR_NAME;\n\n/* ---------------------------------------------------------------------------------------------- */\n\nconst Root = CheckboxGroup;\nconst Item = CheckboxGroupItem;\nconst Indicator = CheckboxGroupIndicator;\n\nexport {\n createCheckboxGroupScope,\n //\n CheckboxGroup,\n CheckboxGroupItem,\n CheckboxGroupIndicator,\n //\n Root,\n Item,\n Indicator,\n};\nexport type { CheckboxGroupProps, CheckboxGroupItemProps, CheckboxGroupIndicatorProps };\n", "import type { PropDef } from './prop-def.js';\n\nconst asChildPropDef = {\n /**\n * Composes the component into its immediate child instead of rendering its own HTML element.\n * You\u2019ll have to provide a single React Element child.\n */\n asChild: {\n type: 'boolean',\n },\n} satisfies {\n asChild: PropDef<boolean>;\n};\n\nexport { asChildPropDef };\n", "import type { PropDef } from './prop-def.js';\n\n// prettier-ignore\nconst accentColors = ['gray', 'gold', 'bronze', 'brown', 'yellow', 'amber', 'orange', 'tomato', 'red', 'ruby', 'crimson', 'pink', 'plum', 'purple', 'violet', 'iris', 'indigo', 'blue', 'cyan', 'teal', 'jade', 'green', 'grass', 'lime', 'mint', 'sky'] as const;\n\nconst grayColors = ['auto', 'gray', 'mauve', 'slate', 'sage', 'olive', 'sand'] as const;\n\nconst colorPropDef = {\n color: {\n type: 'enum',\n values: accentColors,\n default: undefined as (typeof accentColors)[number] | undefined,\n },\n} satisfies {\n color: PropDef<(typeof accentColors)[number]>;\n};\n\n// 1. When used on components that compose Text, sets the color of the text to the current accent.\n// 2. Re-declares the accent role tokens (`--accent-ink`, `--accent-solid`, ...) that descendants read.\nconst accentColorPropDef = {\n color: {\n type: 'enum',\n values: accentColors,\n default: '' as (typeof accentColors)[number],\n },\n} satisfies {\n color: PropDef<(typeof accentColors)[number]>;\n};\n\n// For components whose colour comes from their content (Chip, Avatar, Code): they rest gray, and `color` picks a category when it means something.\nconst grayAccentColorPropDef = {\n color: {\n type: 'enum',\n values: accentColors,\n default: 'gray' as (typeof accentColors)[number],\n },\n} satisfies {\n color: PropDef<(typeof accentColors)[number]>;\n};\n\nexport {\n accentColorPropDef,\n grayAccentColorPropDef,\n colorPropDef,\n //\n accentColors,\n grayColors,\n};\n", "import { colorPropDef } from '../../props/color.prop.js';\n\nimport type { PropDef } from '../../props/prop-def.js';\n\nconst sizes = ['1', '2', '3', '4'] as const;\n\nconst baseCheckboxPropDefs = {\n size: { type: 'enum', className: 'kui-r-size', values: sizes, default: '2', responsive: true },\n ...colorPropDef,\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n};\n\nexport { baseCheckboxPropDefs };\n", "import { asChildPropDef } from '../props/as-child.prop.js';\nimport { baseCheckboxPropDefs } from './_internal/base-checkbox.props.js';\n\nconst checkboxGroupRootPropDefs = {\n ...asChildPropDef,\n ...baseCheckboxPropDefs,\n};\n\nexport { checkboxGroupRootPropDefs };\n", "import React from 'react';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\ntype IconElement = React.ElementRef<'svg'>;\ninterface IconProps extends ComponentPropsWithout<'svg', RemovedProps | 'children'> {}\n\nconst ThickDividerHorizontalIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {\n return (\n <svg width=\"9\" height=\"9\" viewBox=\"0 0 9 9\" fill=\"currentcolor\" xmlns=\"http://www.w3.org/2000/svg\" {...props} ref={forwardedRef}>\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M0.75 4.5C0.75 4.08579 1.08579 3.75 1.5 3.75H7.5C7.91421 3.75 8.25 4.08579 8.25 4.5C8.25 4.91421 7.91421 5.25 7.5 5.25H1.5C1.08579 5.25 0.75 4.91421 0.75 4.5Z\"\n />\n </svg>\n );\n});\n\nThickDividerHorizontalIcon.displayName = 'ThickDividerHorizontalIcon';\n\nconst ThickCheckIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {\n return (\n <svg width=\"9\" height=\"9\" viewBox=\"0 0 9 9\" fill=\"currentcolor\" xmlns=\"http://www.w3.org/2000/svg\" {...props} ref={forwardedRef}>\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M8.53547 0.62293C8.88226 0.849446 8.97976 1.3142 8.75325 1.66099L4.5083 8.1599C4.38833 8.34356 4.19397 8.4655 3.9764 8.49358C3.75883 8.52167 3.53987 8.45309 3.3772 8.30591L0.616113 5.80777C0.308959 5.52987 0.285246 5.05559 0.563148 4.74844C0.84105 4.44128 1.31533 4.41757 1.62249 4.69547L3.73256 6.60459L7.49741 0.840706C7.72393 0.493916 8.18868 0.396414 8.53547 0.62293Z\"\n />\n </svg>\n );\n});\nThickCheckIcon.displayName = 'ThickCheckIcon';\n\nconst ChevronDownIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {\n return (\n <svg width=\"9\" height=\"9\" viewBox=\"0 0 9 9\" fill=\"currentcolor\" xmlns=\"http://www.w3.org/2000/svg\" {...props} ref={forwardedRef}>\n <path d=\"M0.135232 3.15803C0.324102 2.95657 0.640521 2.94637 0.841971 3.13523L4.5 6.56464L8.158 3.13523C8.3595 2.94637 8.6759 2.95657 8.8648 3.15803C9.0536 3.35949 9.0434 3.67591 8.842 3.86477L4.84197 7.6148C4.64964 7.7951 4.35036 7.7951 4.15803 7.6148L0.158031 3.86477C-0.0434285 3.67591 -0.0536285 3.35949 0.135232 3.15803Z\" />\n </svg>\n );\n});\nChevronDownIcon.displayName = 'ChevronDownIcon';\n\nconst ThickChevronRightIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {\n return (\n <svg width=\"9\" height=\"9\" viewBox=\"0 0 9 9\" fill=\"currentcolor\" xmlns=\"http://www.w3.org/2000/svg\" {...props} ref={forwardedRef}>\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M3.23826 0.201711C3.54108 -0.0809141 4.01567 -0.0645489 4.29829 0.238264L7.79829 3.98826C8.06724 4.27642 8.06724 4.72359 7.79829 5.01174L4.29829 8.76174C4.01567 9.06455 3.54108 9.08092 3.23826 8.79829C2.93545 8.51567 2.91909 8.04108 3.20171 7.73826L6.22409 4.5L3.20171 1.26174C2.91909 0.958928 2.93545 0.484337 3.23826 0.201711Z\"\n />\n </svg>\n );\n});\nThickChevronRightIcon.displayName = 'ThickChevronRightIcon';\n\nconst ThickChevronLeftIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {\n return (\n <svg width=\"9\" height=\"9\" viewBox=\"0 0 9 9\" fill=\"currentcolor\" xmlns=\"http://www.w3.org/2000/svg\" {...props} ref={forwardedRef}>\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M5.76174 0.201711C5.45892 -0.0809141 4.98433 -0.0645489 4.70171 0.238264L1.20171 3.98826C0.932757 4.27642 0.932757 4.72359 1.20171 5.01174L4.70171 8.76174C4.98433 9.06455 5.45892 9.08092 5.76174 8.79829C6.06455 8.51567 6.08091 8.04108 5.79829 7.73826L2.77591 4.5L5.79829 1.26174C6.08091 0.958928 6.06455 0.484337 5.76174 0.201711Z\"\n />\n </svg>\n );\n});\nThickChevronLeftIcon.displayName = 'ThickChevronLeftIcon';\n\nconst ThickDotIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {\n return (\n <svg width=\"9\" height=\"9\" viewBox=\"0 0 9 9\" fill=\"currentcolor\" xmlns=\"http://www.w3.org/2000/svg\" {...props} ref={forwardedRef}>\n <circle cx=\"4.5\" cy=\"4.5\" r=\"2\" />\n </svg>\n );\n});\nThickDotIcon.displayName = 'ThickDotIcon';\n\nexport { ChevronDownIcon, ThickCheckIcon, ThickChevronLeftIcon, ThickChevronRightIcon, ThickDividerHorizontalIcon, ThickDotIcon };\nexport type { IconProps };\n\n// Additional minimal icons\nconst CloseIcon = React.forwardRef<IconElement, IconProps>((_props, _forwardedRef) => {\n return (\n <svg\n {..._props}\n ref={_forwardedRef}\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n );\n});\nCloseIcon.displayName = 'CloseIcon';\n\nconst PaperclipIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {\n return (\n <svg\n {...props}\n ref={forwardedRef}\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551\" />\n </svg>\n );\n});\nPaperclipIcon.displayName = 'PaperclipIcon';\n\nconst FileIcon = React.forwardRef<IconElement, IconProps>((_props, _forwardedRef) => {\n return (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n <path d=\"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z\" />\n <path d=\"M14 2v4a2 2 0 0 0 2 2h4\" />\n </svg>\n );\n});\nFileIcon.displayName = 'FileIcon';\n\nconst FileTextIcon = React.forwardRef<IconElement, IconProps>((_props, _forwardedRef) => {\n return (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n <path d=\"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z\" />\n <path d=\"M14 2v4a2 2 0 0 0 2 2h4\" />\n <path d=\"M10 9H8\" />\n <path d=\"M16 13H8\" />\n <path d=\"M16 17H8\" />\n </svg>\n );\n});\nFileTextIcon.displayName = 'FileTextIcon';\n\n/** The tick a button shows in place of its icon while `done`. Drawn on the 24 grid at the icon set's stroke. */\nconst TickIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {\n return (\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" {...props} ref={forwardedRef}>\n <path d=\"M5 12.75L9.5 17.25L19 7.25\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </svg>\n );\n});\nTickIcon.displayName = 'TickIcon';\n\nexport { CloseIcon, PaperclipIcon, FileIcon, FileTextIcon, TickIcon };\n", "import * as React from 'react';\nimport { Slot } from 'radix-ui';\n\nimport { extractProps } from '../helpers/extract-props.js';\nimport { textPropDefs } from './text.props.js';\n\nimport type { GetPropDefTypes } from '../props/prop-def.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\ntype TextElement = React.ElementRef<'span'>;\ntype TextOwnProps = GetPropDefTypes<typeof textPropDefs>;\ninterface CommonTextProps extends TextOwnProps {}\ntype TextSpanProps = { as?: 'span' } & ComponentPropsWithout<'span', RemovedProps>;\ntype TextDivProps = { as: 'div' } & ComponentPropsWithout<'div', RemovedProps>;\ntype TextLabelProps = { as: 'label' } & ComponentPropsWithout<'label', RemovedProps>;\ntype TextPProps = { as: 'p' } & ComponentPropsWithout<'p', RemovedProps>;\ntype TextProps = CommonTextProps & (TextSpanProps | TextDivProps | TextLabelProps | TextPProps);\n\n// Pre-merge prop definitions at module level to avoid per-render allocation\n\nconst Text = React.memo(\n React.forwardRef<TextElement, TextProps>((props, forwardedRef) => {\n const {\n children,\n className,\n asChild,\n as: Tag = 'span',\n color,\n ...textProps\n } = extractProps(props, textPropDefs);\n\n const combinedClassName = className ? `kui-Text ${className}` : 'kui-Text';\n\n if (asChild) {\n return (\n <Slot.Root\n data-accent-color={color}\n {...textProps}\n ref={forwardedRef}\n className={combinedClassName}\n >\n {children}\n </Slot.Root>\n );\n }\n\n return (\n <Tag\n data-accent-color={color}\n {...(textProps as React.HTMLAttributes<HTMLElement>)}\n ref={forwardedRef as any}\n className={combinedClassName}\n >\n {children}\n </Tag>\n );\n })\n);\nText.displayName = 'Text';\n\nexport { Text };\nexport type { TextProps };\n", "import classNames from 'classnames';\n\nimport { getCompiledPropDefs } from './compile-prop-defs.js';\nimport { getResponsiveClassNames, getResponsiveStyles } from './get-responsive-styles.js';\nimport { isResponsiveObject } from './is-responsive-object.js';\nimport { mergeStyles } from './merge-styles.js';\n\nimport type { CompiledPropDef } from './compile-prop-defs.js';\nimport type * as React from 'react';\nimport type { PropDef } from '../props/prop-def.js';\n\ntype PropDefsWithClassName<T> = T extends Record<string, PropDef> ? { [K in keyof T]: T[K] extends { className: string } ? K : never }[keyof T] : never;\n\ntype ResponsiveValue = Record<string, string | undefined>;\n\n/**\n * Fills in the `initial` breakpoint of a responsive value from the prop def's\n * default, and coerces an invalid `initial` enum value back to that default.\n *\n * Returns the value untouched when nothing needs changing, and a copy otherwise\n * \u2014 callers routinely hoist responsive objects to module scope, so mutating the\n * caller's object would corrupt it for every later render.\n */\nfunction normalizeResponsiveValue(value: ResponsiveValue, propDef: CompiledPropDef) {\n let initial = value.initial;\n let changed = false;\n\n if (propDef.hasDefault && initial === undefined) {\n initial = propDef.default as string | undefined;\n changed = true;\n }\n\n if (propDef.enumValueSet !== undefined && !propDef.enumValueSet.has(initial)) {\n initial = propDef.default as string | undefined;\n changed = true;\n }\n\n return changed ? { ...value, initial } : value;\n}\n\n/**\n * Takes props, checks them against prop defs that have a `className` on them,\n * adds necessary CSS classes and inline styles, and returns the props without\n * the corresponding prop defs that were used to formulate the new `className`\n * and `style` values. Also applies prop def defaults to every prop.\n */\nfunction extractProps<P extends { className?: string; style?: React.CSSProperties; [key: string]: any }, T extends Record<string, PropDef>[]>(\n props: P,\n ...propDefs: T\n): Omit<P & { className?: string; style?: React.CSSProperties }, PropDefsWithClassName<T[number]>> {\n const { styling, passthrough, stylingKeys } = getCompiledPropDefs(propDefs);\n\n // Copy the props that survive to the element rather than spreading and then\n // deleting the styling keys. Deleting off a spread demotes the object to\n // dictionary mode in V8, and this object is on the render path of every\n // component in the library.\n const extractedProps: Record<string, any> = {};\n for (const key in props) {\n if (stylingKeys.has(key)) continue;\n extractedProps[key] = props[key];\n }\n\n for (let i = 0; i < passthrough.length; i++) {\n const propDef = passthrough[i];\n const value = extractedProps[propDef.key];\n\n if (value === undefined) {\n if (propDef.hasDefault) extractedProps[propDef.key] = propDef.default;\n continue;\n }\n\n // Fall back to the default when the value is not a valid enum value\n if (propDef.enumValueSet !== undefined && !propDef.enumValueSet.has(value) && !isResponsiveObject(value)) {\n extractedProps[propDef.key] = propDef.default;\n }\n }\n\n let style: ReturnType<typeof mergeStyles>;\n const classes: string[] = [];\n\n for (let i = 0; i < styling.length; i++) {\n const propDef = styling[i];\n let value = props[propDef.key];\n\n // Apply prop def defaults\n if (value === undefined && propDef.hasDefault) {\n value = propDef.default;\n }\n\n // Apply the default value if the value is not a valid enum value\n if (propDef.enumValueSet !== undefined && !propDef.enumValueSet.has(value) && !isResponsiveObject(value)) {\n value = propDef.default;\n }\n\n if (!value) continue;\n\n if (isResponsiveObject(value)) {\n // Make sure we are not threading through responsive values for non-responsive prop defs\n if (!propDef.responsive) continue;\n value = normalizeResponsiveValue(value, propDef);\n }\n\n if (propDef.type === 'enum') {\n const propClassName = getResponsiveClassNames({\n allowArbitraryValues: false,\n value,\n className: propDef.className!,\n propValues: propDef.values,\n propValueSet: propDef.valueSet,\n parseValue: propDef.parseValue,\n });\n\n if (propClassName) classes.push(propClassName);\n continue;\n }\n\n if (propDef.type === 'string' || propDef.type === 'enum | string') {\n const [propClassNames, propCustomProperties] = getResponsiveStyles({\n className: propDef.className!,\n customProperties: propDef.customProperties!,\n // `string` prop defs have no enum values, so every value is arbitrary\n propValues: propDef.type === 'string' ? [] : propDef.values,\n propValueSet: propDef.type === 'string' ? undefined : propDef.valueSet,\n parseValue: propDef.parseValue,\n value,\n });\n\n if (propCustomProperties) style = mergeStyles(style, propCustomProperties);\n if (propClassNames) classes.push(propClassNames);\n continue;\n }\n\n if (propDef.type === 'boolean') {\n // TODO handle responsive boolean props\n classes.push(propDef.className!);\n continue;\n }\n }\n\n extractedProps.className = classNames(classes.length > 0 ? classes.join(' ') : undefined, props.className);\n extractedProps.style = mergeStyles(style, props.style);\n return extractedProps as ReturnType<typeof extractProps<P, T>>;\n}\n\nexport { extractProps };\n", "import type { PropDef } from '../props/prop-def.js';\n\n/**\n * A prop def pre-processed into the exact shape `extractProps` needs at render\n * time. Everything that can be derived from the static prop def \u2014 enum\n * membership sets, whether the def is responsive, whether it carries a default\n * \u2014 is computed once here instead of on every render.\n */\ninterface CompiledPropDef {\n key: string;\n type: PropDef['type'];\n default: unknown;\n hasDefault: boolean;\n responsive: boolean;\n className?: string;\n customProperties?: `--${string}`[];\n parseValue?: (value: string) => string | undefined;\n /** The prop def's own enum values, kept for the responsive class name helpers. */\n values: readonly string[];\n /** O(1) membership for `values`. */\n valueSet: ReadonlySet<string>;\n /**\n * `values` plus the default, used to coerce invalid enum values back to the\n * default. Only present for `type: 'enum'` \u2014 `'enum | string'` props accept\n * arbitrary strings and must not be coerced.\n */\n enumValueSet?: ReadonlySet<unknown>;\n}\n\ninterface CompiledPropDefs {\n /** Defs that contribute a class name and/or custom properties. */\n styling: CompiledPropDef[];\n /**\n * Defs that pass through to the element but still need a default applied or\n * an invalid enum value coerced. Defs that can do neither are omitted\n * entirely \u2014 they are already correct as passed.\n */\n passthrough: CompiledPropDef[];\n /** Keys consumed by `styling`, so they can be skipped when copying props. */\n stylingKeys: ReadonlySet<string>;\n}\n\nconst EMPTY_VALUES: readonly string[] = [];\nconst EMPTY_SET: ReadonlySet<string> = new Set();\n\nfunction compile(propDefs: readonly Record<string, PropDef>[]): CompiledPropDefs {\n const merged: Record<string, PropDef> = Object.assign({}, ...propDefs);\n const styling: CompiledPropDef[] = [];\n const passthrough: CompiledPropDef[] = [];\n const stylingKeys = new Set<string>();\n\n for (const key in merged) {\n // The PropDef union is narrowed per-field below; reading the optional\n // members off the union directly is what the runtime actually needs.\n const def = merged[key] as PropDef & {\n default?: unknown;\n values?: readonly string[];\n className?: string;\n customProperties?: `--${string}`[];\n parseValue?: (value: string) => string | undefined;\n responsive?: true;\n };\n\n const values = def.values ?? EMPTY_VALUES;\n const compiled: CompiledPropDef = {\n key,\n type: def.type,\n default: def.default,\n hasDefault: def.default !== undefined,\n responsive: 'responsive' in def,\n className: def.className,\n customProperties: def.customProperties,\n parseValue: def.parseValue,\n values,\n valueSet: values.length > 0 ? new Set(values) : EMPTY_SET,\n enumValueSet: def.type === 'enum' ? new Set<unknown>([def.default, ...values]) : undefined,\n };\n\n if (def.className) {\n styling.push(compiled);\n stylingKeys.add(key);\n } else if (compiled.hasDefault || def.type === 'enum') {\n // Anything else is copied through untouched, so there is nothing to do.\n passthrough.push(compiled);\n }\n }\n\n return { styling, passthrough, stylingKeys };\n}\n\ninterface CacheNode {\n children: WeakMap<object, CacheNode>;\n compiled?: CompiledPropDefs;\n}\n\nconst cacheRoot: CacheNode = { children: new WeakMap() };\n\n/**\n * Compiles a set of prop defs, memoized on the identity of the prop def objects\n * themselves. Components always pass the same module-level constants, so after\n * the first render of a given component this is a couple of WeakMap lookups\n * instead of merging 50-odd prop defs into a fresh object.\n */\nfunction getCompiledPropDefs(propDefs: readonly Record<string, PropDef>[]): CompiledPropDefs {\n let node = cacheRoot;\n\n for (let i = 0; i < propDefs.length; i++) {\n const propDef = propDefs[i];\n let child = node.children.get(propDef);\n if (child === undefined) {\n child = { children: new WeakMap() };\n node.children.set(propDef, child);\n }\n node = child;\n }\n\n return (node.compiled ??= compile(propDefs));\n}\n\nexport { getCompiledPropDefs };\nexport type { CompiledPropDef, CompiledPropDefs };\n", "import type React from 'react';\n\n// Creates a union type of string literals with strings, but retains intellisense for the literals.\n// Union<string, 'foo' | 'bar'> => string | Omit<string, 'foo' | 'bar'>\ntype Union<S = string, T extends string | number = string> = T | Omit<S, T>;\n\nconst breakpoints = ['initial', 'xs', 'sm', 'md', 'lg', 'xl'] as const;\nconst breakpointSet: Set<string> = new Set(breakpoints);\ntype Breakpoint = (typeof breakpoints)[number];\ntype Responsive<T> = T | Partial<Record<Breakpoint, T>>;\n\ntype BooleanPropDef = {\n type: 'boolean';\n default?: boolean;\n required?: boolean;\n className?: string;\n};\ntype StringPropDef = {\n type: 'string';\n default?: string;\n required?: boolean;\n};\ntype ReactNodePropDef = {\n type: 'ReactNode';\n default?: React.ReactNode;\n required?: boolean;\n};\ntype EnumPropDef<T> = {\n type: 'enum';\n values: readonly T[];\n default?: T;\n required?: boolean;\n};\ntype EnumOrStringPropDef<T> = {\n type: 'enum | string';\n values: readonly T[];\n default?: T | string;\n required?: boolean;\n};\n\ntype NonStylingPropDef = {\n className?: never;\n customProperties?: never;\n parseValue?: never;\n};\n\ntype StylingPropDef = {\n className: string;\n parseValue?: (value: string) => string | undefined;\n};\n\ntype ArbitraryStylingPropDef = {\n className: string;\n customProperties: `--${string}`[];\n parseValue?: (value: string) => string | undefined;\n};\n\ntype RegularPropDef<T> =\n | ReactNodePropDef\n | BooleanPropDef\n | (StringPropDef & ArbitraryStylingPropDef)\n | (StringPropDef & NonStylingPropDef)\n | (EnumPropDef<T> & StylingPropDef)\n | (EnumPropDef<T> & NonStylingPropDef)\n | (EnumOrStringPropDef<T> & ArbitraryStylingPropDef)\n | (EnumOrStringPropDef<T> & NonStylingPropDef);\ntype ResponsivePropDef<T = any> = RegularPropDef<T> & { responsive: true };\ntype PropDef<T = any> = RegularPropDef<T> | ResponsivePropDef<T>;\n\n// prettier-ignore\ntype GetPropDefType<Def> =\n Def extends BooleanPropDef ? (Def extends ResponsivePropDef ? Responsive<boolean> : boolean)\n : Def extends StringPropDef ? (Def extends ResponsivePropDef ? Responsive<string> : string)\n : Def extends ReactNodePropDef ? (Def extends ResponsivePropDef ? Responsive<React.ReactNode> : React.ReactNode)\n : Def extends EnumOrStringPropDef<infer Type> ?\n Def extends ResponsivePropDef<infer Type extends string> ? Responsive<Union<string, Type>> : Type\n : Def extends EnumPropDef<infer Type> ? (Def extends ResponsivePropDef<infer Type> ? Responsive<Type> : Type)\n : never;\n\ntype GetPropDefTypes<P> = {\n [K in keyof P]?: GetPropDefType<P[K]>;\n};\n\nexport { breakpoints, breakpointSet };\nexport type {\n PropDef,\n GetPropDefTypes,\n ResponsivePropDef,\n //\n Breakpoint,\n Responsive,\n Union,\n};\n", "/** A util to check whether the object has a key, while inferring the correct key type */\nfunction hasOwnProperty<K extends string | number | symbol>(\n obj: Record<K, unknown>,\n key: string | number | symbol\n): key is K {\n return Object.prototype.hasOwnProperty.call(obj, key);\n}\n\nexport { hasOwnProperty };\n", "import type { Responsive, Breakpoint } from '../props/prop-def.js';\n\n// Use a Set for O(1) lookup instead of array.includes() which is O(n)\nconst breakpointSet = new Set<string>(['initial', 'xs', 'sm', 'md', 'lg', 'xl']);\n\nexport function isResponsiveObject<Value extends string>(\n obj: Responsive<Value | Omit<string, Value>> | undefined\n): obj is Record<Breakpoint, string> {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n // Use for...in to avoid Object.keys() array allocation\n for (const key in obj) {\n if (breakpointSet.has(key)) {\n return true;\n }\n }\n return false;\n}\n", "import { breakpointSet } from '../props/prop-def.js';\nimport { hasOwnProperty } from './has-own-property.js';\nimport { isResponsiveObject } from './is-responsive-object.js';\n\nimport type { Responsive, Union } from '../props/prop-def.js';\n\n/**\n * Membership test against a prop def's enum values. Callers that already hold a\n * compiled prop def pass `propValueSet` for an O(1) lookup; the handful of call\n * sites that build options inline fall back to scanning the array.\n */\nfunction includesValue(propValues: string[] | readonly string[], propValueSet: ReadonlySet<string> | undefined, value: string): boolean {\n return propValueSet !== undefined ? propValueSet.has(value) : propValues.includes(value);\n}\n\ninterface GetResponsiveStylesOptions {\n className: string;\n customProperties: `--${string}`[];\n value: Responsive<Union> | Responsive<string> | undefined;\n propValues: string[] | readonly string[];\n propValueSet?: ReadonlySet<string>;\n parseValue?: (value: string) => string | undefined;\n}\n\nfunction getResponsiveStyles({ className, customProperties, ...args }: GetResponsiveStylesOptions) {\n const responsiveClassNames = getResponsiveClassNames({\n allowArbitraryValues: true,\n className,\n ...args,\n });\n\n const responsiveCustomProperties = getResponsiveCustomProperties({ customProperties, ...args });\n return [responsiveClassNames, responsiveCustomProperties] as const;\n}\n\ninterface GetResponsiveClassNamesOptions {\n allowArbitraryValues?: boolean;\n className: string;\n value: Responsive<Union> | Responsive<string> | undefined;\n propValues: string[] | readonly string[];\n propValueSet?: ReadonlySet<string>;\n parseValue?: (value: string) => string | undefined;\n}\n\nfunction getResponsiveClassNames({ allowArbitraryValues, value, className, propValues, propValueSet, parseValue = (value) => value }: GetResponsiveClassNamesOptions): string | undefined {\n if (!value) {\n return undefined;\n }\n\n if (typeof value === 'string') {\n if (includesValue(propValues, propValueSet, value)) {\n return getBaseClassName(className, value, parseValue);\n }\n return allowArbitraryValues ? className : undefined;\n }\n\n if (isResponsiveObject(value)) {\n const object = value;\n const classNames: string[] = [];\n\n for (const bp in object) {\n // Make sure we are not iterating over keys that aren't breakpoints\n if (!hasOwnProperty(object, bp) || !breakpointSet.has(bp)) {\n continue;\n }\n\n const value = object[bp];\n\n if (value !== undefined) {\n if (includesValue(propValues, propValueSet, value)) {\n const baseClassName = getBaseClassName(className, value, parseValue);\n const bpClassName = bp === 'initial' ? baseClassName : `${bp}:${baseClassName}`;\n classNames.push(bpClassName);\n } else if (allowArbitraryValues) {\n const bpClassName = bp === 'initial' ? className : `${bp}:${className}`;\n classNames.push(bpClassName);\n }\n }\n }\n\n return classNames.length > 0 ? classNames.join(' ') : '';\n }\n\n if (allowArbitraryValues) {\n return className;\n }\n}\n\nfunction getBaseClassName(className: string, value: string, parseValue: (value: string) => string | undefined): string {\n const delimiter = className ? '-' : '';\n const matchedValue = parseValue(value);\n const isNegative = matchedValue?.startsWith('-');\n const minus = isNegative ? '-' : '';\n const absoluteValue = isNegative ? matchedValue?.substring(1) : matchedValue;\n return `${minus}${className}${delimiter}${absoluteValue}`;\n}\n\ninterface GetResponsiveCustomPropertiesOptions {\n customProperties: `--${string}`[];\n value: Responsive<Union> | Responsive<string> | undefined;\n propValues: string[] | readonly string[];\n propValueSet?: ReadonlySet<string>;\n parseValue?: (value: string) => string | undefined;\n}\n\nfunction getResponsiveCustomProperties({ customProperties, value, propValues, propValueSet, parseValue = (value) => value }: GetResponsiveCustomPropertiesOptions) {\n // Don't generate custom properties if the value is not arbitrary\n if (!value || (typeof value === 'string' && includesValue(propValues, propValueSet, value))) {\n return undefined;\n }\n\n let styles: Record<string, string | undefined> | undefined;\n\n if (typeof value === 'string') {\n const parsed = parseValue(value);\n styles = {};\n for (const customProperty of customProperties) {\n styles[customProperty] = parsed;\n }\n return styles;\n }\n\n if (isResponsiveObject(value)) {\n const object = value;\n\n for (const bp in object) {\n // Make sure we are not iterating over keys that aren't breakpoints\n if (!hasOwnProperty(object, bp) || !breakpointSet.has(bp)) {\n continue;\n }\n\n const value = object[bp];\n\n // Don't generate a custom property if the value is not arbitrary\n if (value === undefined || includesValue(propValues, propValueSet, value)) {\n continue;\n }\n\n const parsed = parseValue(value);\n styles ??= {};\n for (const customProperty of customProperties) {\n const bpProperty = bp === 'initial' ? customProperty : `${customProperty}-${bp}`;\n styles[bpProperty] = parsed;\n }\n }\n }\n\n return styles ?? {};\n}\n\nexport { getResponsiveStyles, getResponsiveCustomProperties, getResponsiveClassNames };\n", "type InlineStyle =\n | React.CSSProperties\n | Record<string, string | number | null | undefined>\n | undefined;\n\n// Merges CSS styles like `classNames` merges CSS classes\n// Optimized to avoid object spread in loop - uses Object.assign for in-place mutation\nexport function mergeStyles(...styles: Array<InlineStyle>): InlineStyle {\n let result: Record<string, string | number | null | undefined> | undefined;\n\n for (const style of styles) {\n if (style) {\n if (result === undefined) {\n // First non-empty style - create result object\n result = {};\n }\n Object.assign(result, style);\n }\n }\n\n return result;\n}\n", "import type { PropDef } from './prop-def.js';\n\nconst emphases = ['loud', 'medium', 'quiet'] as const;\n\n// Text-first components only (Text, Heading, Blockquote, Code).\n// No colour + emphasis reads the gray ink ladder; colour + emphasis reads the accent ink ladder.\n// Components that need a different default spread this def and override `default`.\nconst emphasisPropDef = {\n emphasis: {\n type: 'enum',\n className: 'kui-emphasis',\n values: emphases,\n default: undefined,\n },\n} satisfies {\n emphasis: PropDef<(typeof emphases)[number]>;\n};\n\nexport { emphasisPropDef, emphases };\n", "import type { PropDef } from './prop-def.js';\n\nconst leadingTrimValues = ['normal', 'start', 'end', 'both'] as const;\n\nconst leadingTrimPropDef = {\n trim: {\n type: 'enum',\n className: 'kui-r-lt',\n values: leadingTrimValues,\n responsive: true,\n },\n} satisfies {\n trim: PropDef<(typeof leadingTrimValues)[number]>;\n};\n\nexport { leadingTrimPropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst textAlignValues = ['left', 'center', 'right'] as const;\n\nconst textAlignPropDef = {\n align: {\n type: 'enum',\n className: 'kui-r-ta',\n values: textAlignValues,\n responsive: true,\n },\n} satisfies {\n align: PropDef<(typeof textAlignValues)[number]>;\n};\n\nexport { textAlignPropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst textWrapValues = ['wrap', 'nowrap', 'pretty', 'balance'] as const;\n\nconst textWrapPropDef = {\n wrap: {\n type: 'enum',\n className: 'kui-r-tw',\n values: textWrapValues,\n responsive: true,\n },\n} satisfies {\n wrap: PropDef<(typeof textWrapValues)[number]>;\n};\n\nexport { textWrapPropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst truncatePropDef = {\n truncate: {\n type: 'boolean',\n className: 'kui-truncate',\n },\n} satisfies {\n truncate: PropDef<boolean>;\n};\n\nexport { truncatePropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst fontFamilies = ['sans', 'mono', 'serif'] as const;\n\nconst fontFamilyPropDef = {\n font: {\n type: 'enum',\n className: 'kui-r-ff',\n values: fontFamilies,\n },\n} satisfies {\n font: PropDef<(typeof fontFamilies)[number]>;\n};\n\nexport { fontFamilyPropDef };\n", "import type { PropDef } from './prop-def.js';\n\n/** v2's three weights (\u00A715). No bold: a larger size or stronger emphasis says importance. */\nconst weights = ['regular', 'medium', 'semibold'] as const;\n\nconst weightPropDef = {\n weight: {\n type: 'enum',\n className: 'kui-r-weight',\n values: weights,\n responsive: true,\n },\n} satisfies {\n weight: PropDef<(typeof weights)[number]>;\n};\n\nexport { weightPropDef };\n", "import { asChildPropDef } from '../props/as-child.prop.js';\nimport { colorPropDef } from '../props/color.prop.js';\nimport { emphasisPropDef } from '../props/emphasis.prop.js';\nimport { leadingTrimPropDef } from '../props/leading-trim.prop.js';\nimport { textAlignPropDef } from '../props/text-align.prop.js';\nimport { textWrapPropDef } from '../props/text-wrap.prop.js';\nimport { truncatePropDef } from '../props/truncate.prop.js';\nimport { fontFamilyPropDef } from '../props/font-family.prop.js';\nimport { weightPropDef } from '../props/weight.prop.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst as = ['span', 'div', 'label', 'p'] as const;\nconst sizes = ['1', '2', '3', '4', '5', '6', '7', '8', '9'] as const;\n\nconst textPropDefs = {\n as: { type: 'enum', values: as, default: 'span' },\n ...asChildPropDef,\n size: {\n type: 'enum',\n className: 'kui-r-size',\n values: sizes,\n responsive: true,\n },\n ...fontFamilyPropDef,\n ...weightPropDef,\n ...textAlignPropDef,\n ...leadingTrimPropDef,\n ...truncatePropDef,\n ...textWrapPropDef,\n ...colorPropDef,\n ...emphasisPropDef,\n} satisfies {\n as: PropDef<(typeof as)[number]>;\n size: PropDef<(typeof sizes)[number]>;\n};\n\nexport { textPropDefs };\n", "'use client';\n\nimport * as React from 'react';\n\nimport { THEME_SIZE_DEFAULT, clampSize } from '../helpers/theme-size.js';\nimport type { ThemeSize } from '../helpers/theme-size.js';\n\n/**\n * The app-wide size index, provided by `Theme` beside `ThemeContext`.\n *\n * It is its own context, holding one string, so a component that only needs\n * the size does not re-render when the accent colour or appearance changes.\n */\nconst ThemeSizeContext = React.createContext<ThemeSize>(THEME_SIZE_DEFAULT);\nThemeSizeContext.displayName = 'ThemeSizeContext';\n\ninterface SizePropDef {\n values: readonly string[];\n default?: string;\n}\n\n/**\n * The size a component on the 1-4 index takes: what the caller said, else the\n * nearest Theme's size, mapped into the component's range.\n */\nfunction useThemeSize<V>(explicit: V | undefined, propDef: SizePropDef): V {\n const themeSize = React.useContext(ThemeSizeContext);\n if (explicit !== undefined) return explicit;\n // The clamped value is one of `propDef.values`, which is what `V` ranges over.\n return clampSize(themeSize, propDef.values) as V;\n}\n\n/**\n * Fills `size` from the nearest Theme when the caller left it unset, so the\n * result can go straight into `extractProps`. An explicit size, responsive\n * object included, wins.\n *\n * Returns the same props object when there is nothing to fill: when a size is\n * set, or when the theme size resolves to the prop def's own default (the\n * common case, a Theme with no size), so `extractProps` applies it as before.\n */\nfunction useThemeSizeProps<P extends { size?: unknown }>(props: P, propDef: SizePropDef): P {\n const themeSize = React.useContext(ThemeSizeContext);\n if (props.size !== undefined) return props;\n const size = clampSize(themeSize, propDef.values);\n if (size === propDef.default) return props;\n return { ...props, size };\n}\n\nexport { ThemeSizeContext, useThemeSize, useThemeSizeProps };\n", "/**\n * The pure half of the theme size: the type, the default and the clamp. Server-safe.\n *\n * The context and the hooks that read it live in `hooks/theme-size.ts`, a client module, so there\n * is one `ThemeSizeContext` and importing `/helpers` from a server component does not call\n * `createContext`.\n */\n\ntype ThemeSize = '1' | '2' | '3' | '4';\n\n/** The rest of the 1-4 index when no Theme states a size. */\nconst THEME_SIZE_DEFAULT: ThemeSize = '2';\n\n/**\n * Maps the theme size onto a component's own range: the value itself when the\n * component has it, otherwise the nearest end of the range (`4` on a 1-3 scale\n * is `3`, on a 1-2 scale it is `2`).\n */\nfunction clampSize(size: ThemeSize, values: readonly string[]): string {\n if (values.includes(size)) return size;\n const n = Number(size);\n let nearest = values[0];\n let distance = Infinity;\n for (let i = 0; i < values.length; i++) {\n const d = Math.abs(Number(values[i]) - n);\n if (d < distance) {\n distance = d;\n nearest = values[i];\n }\n }\n return nearest;\n}\n\nexport { THEME_SIZE_DEFAULT, clampSize };\nexport type { ThemeSize };\n"],
5
+ "mappings": ";mlBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,UAAAE,GAAA,SAAAC,KAAA,eAAAC,GAAAJ,IAEA,IAAAK,EAAuB,oBACvBC,EAAuB,yBACvBC,GAAwB,6BCFxB,IAAAC,EAAuB,oBACvBC,EAAyD,oBACzDC,EAAyD,6BAEnD,CAAE,aAAAC,EAAa,EAAI,YAKnBC,EAAsB,gBAGtB,CAACC,GAA4BC,CAAwB,EAAI,UAAQ,mBACrEF,EACA,CAAC,EAAAG,SAAkB,mBAAmB,CAC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c,EAAvB,CACE,GAAGZ,EACJ,QAAO,GACP,UAAU,6BAEV,gBAACa,EAAA,IAAe,CAClB,CACF,CAEJ,CAAC,EACDL,EAA0B,YAAc",
6
+ "names": ["checkbox_group_exports", "__export", "CheckboxGroupItem", "CheckboxGroupRoot", "__toCommonJS", "React", "import_classnames", "import_internal", "React", "import_radix_ui", "import_internal", "useDirection", "CHECKBOX_GROUP_NAME", "createCheckboxGroupContext", "createCheckboxGroupScope", "CheckboxPrimitive", "useCheckboxScope", "CheckboxGroupProvider", "useCheckboxGroupContext", "CheckboxGroup", "props", "forwardedRef", "__scopeCheckboxGroup", "name", "defaultValue", "valueProp", "required", "disabled", "dir", "onValueChange", "groupProps", "direction", "value", "setValue", "handleItemCheck", "itemValue", "prevValue", "handleItemUncheck", "ITEM_NAME", "CheckboxGroupItem", "itemProps", "context", "isDisabled", "checkboxScope", "checked", "isRequired", "INDICATOR_NAME", "CheckboxGroupIndicator", "indicatorProps", "Root", "Item", "Indicator", "asChildPropDef", "accentColors", "colorPropDef", "accentColors", "sizes", "baseCheckboxPropDefs", "colorPropDef", "checkboxGroupRootPropDefs", "asChildPropDef", "baseCheckboxPropDefs", "import_react", "ThickDividerHorizontalIcon", "React", "props", "forwardedRef", "ThickCheckIcon", "ChevronDownIcon", "ThickChevronRightIcon", "ThickChevronLeftIcon", "ThickDotIcon", "CloseIcon", "React", "_props", "_forwardedRef", "PaperclipIcon", "props", "forwardedRef", "FileIcon", "FileTextIcon", "TickIcon", "React", "import_radix_ui", "import_classnames", "EMPTY_VALUES", "EMPTY_SET", "compile", "propDefs", "merged", "styling", "passthrough", "stylingKeys", "key", "def", "values", "compiled", "cacheRoot", "getCompiledPropDefs", "node", "i", "propDef", "child", "breakpoints", "breakpointSet", "hasOwnProperty", "obj", "key", "breakpointSet", "isResponsiveObject", "obj", "key", "includesValue", "propValues", "propValueSet", "value", "getResponsiveStyles", "className", "customProperties", "args", "responsiveClassNames", "getResponsiveClassNames", "responsiveCustomProperties", "getResponsiveCustomProperties", "allowArbitraryValues", "parseValue", "getBaseClassName", "isResponsiveObject", "object", "classNames", "bp", "hasOwnProperty", "breakpointSet", "baseClassName", "bpClassName", "delimiter", "matchedValue", "isNegative", "minus", "absoluteValue", "styles", "parsed", "customProperty", "bpProperty", "mergeStyles", "styles", "result", "style", "normalizeResponsiveValue", "value", "propDef", "initial", "changed", "extractProps", "props", "propDefs", "styling", "passthrough", "stylingKeys", "getCompiledPropDefs", "extractedProps", "key", "i", "isResponsiveObject", "style", "classes", "propClassName", "getResponsiveClassNames", "propClassNames", "propCustomProperties", "getResponsiveStyles", "mergeStyles", "classNames", "emphases", "emphasisPropDef", "leadingTrimValues", "leadingTrimPropDef", "textAlignValues", "textAlignPropDef", "textWrapValues", "textWrapPropDef", "truncatePropDef", "fontFamilies", "fontFamilyPropDef", "weights", "weightPropDef", "as", "sizes", "textPropDefs", "asChildPropDef", "fontFamilyPropDef", "weightPropDef", "textAlignPropDef", "leadingTrimPropDef", "truncatePropDef", "textWrapPropDef", "colorPropDef", "emphasisPropDef", "Text", "props", "forwardedRef", "children", "className", "asChild", "Tag", "color", "textProps", "extractProps", "textPropDefs", "combinedClassName", "React", "clampSize", "size", "values", "n", "nearest", "distance", "i", "d", "ThemeSizeContext", "useThemeSize", "explicit", "propDef", "themeSize", "clampSize", "CHECKBOX_GROUP_NAME", "createCheckboxGroupContext", "createCheckboxGroupScope", "useCheckboxGroupScope", "CheckboxGroupProvider", "useCheckboxGroupContext", "CheckboxGroupRoot", "color", "checkboxGroupRootPropDefs", "sizeProp", "props", "forwardedRef", "size", "useThemeSize", "__scopeCheckboxGroup", "className", "rootProps", "checkboxGroupScope", "Root", "classNames", "CheckboxGroupItem", "_props", "children", "style", "Text", "CheckboxGroupItemCheckbox", "context", "extractProps", "Item", "Indicator", "ThickCheckIcon"]
7
7
  }
@@ -16,16 +16,6 @@ interface CheckboxGroupProps extends PrimitiveDivProps {
16
16
  required?: React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>['required'];
17
17
  disabled?: React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>['disabled'];
18
18
  dir?: 'ltr' | 'rtl';
19
- /**
20
- * @deprecated Has no effect. Each checkbox is its own tab stop, as with native checkboxes,
21
- * so there is no arrow-key navigation to orient.
22
- */
23
- orientation?: 'horizontal' | 'vertical';
24
- /**
25
- * @deprecated Has no effect. Each checkbox is its own tab stop, as with native checkboxes,
26
- * so there is no arrow-key navigation to loop.
27
- */
28
- loop?: boolean;
29
19
  defaultValue?: string[];
30
20
  value?: CheckboxGroupContextValue['value'];
31
21
  onValueChange?: (value: string[]) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"checkbox-group.primitive.d.ts","sourceRoot":"","sources":["../../../src/components/checkbox-group.primitive.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,QAAQ,IAAI,iBAAiB,EAAa,MAAM,UAAU,CAAC;AACpE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAwB,MAAM,mBAAmB,CAAC;AAU7E,QAAA,MAAmC,wBAAwB,qBAG1D,CAAC;AAGF,KAAK,yBAAyB,GAAG;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACpC,CAAC;AAMF,KAAK,iBAAiB,GAAG,KAAK,CAAC,wBAAwB,CAAC,OAAO,SAAS,CAAC,GAAG,CAAC,CAAC;AAC9E,UAAU,kBAAmB,SAAQ,iBAAiB;IACpD,IAAI,CAAC,EAAE,yBAAyB,CAAC,MAAM,CAAC,CAAC;IACzC,QAAQ,CAAC,EAAE,KAAK,CAAC,wBAAwB,CAAC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AAE,MAAM,EAAE,KAAK,IAAI,CAAC;CAC3C;AAED,QAAA,MAAM,aAAa,2FAmDlB,CAAC;AAWF,KAAK,aAAa,GAAG,KAAK,CAAC,wBAAwB,CAAC,OAAO,iBAAiB,CAAC,IAAI,CAAC,CAAC;AACnF,UAAU,sBACR,SAAQ,IAAI,CAAC,aAAa,EAAE,SAAS,GAAG,gBAAgB,GAAG,iBAAiB,GAAG,MAAM,CAAC;IACtF,KAAK,EAAE,MAAM,CAAC;CACf;AAED,QAAA,MAAM,iBAAiB,kGA8BtB,CAAC;AAWF,KAAK,sBAAsB,GAAG,KAAK,CAAC,wBAAwB,CAAC,OAAO,iBAAiB,CAAC,SAAS,CAAC,CAAC;AACjG,UAAU,2BAA4B,SAAQ,sBAAsB;CAAG;AAEvE,QAAA,MAAM,sBAAsB,qGAO1B,CAAC;AAMH,QAAA,MAAM,IAAI,2FAAgB,CAAC;AAC3B,QAAA,MAAM,IAAI,kGAAoB,CAAC;AAC/B,QAAA,MAAM,SAAS,qGAAyB,CAAC;AAEzC,OAAO,EACL,wBAAwB,EAExB,aAAa,EACb,iBAAiB,EACjB,sBAAsB,EAEtB,IAAI,EACJ,IAAI,EACJ,SAAS,GACV,CAAC;AACF,YAAY,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,2BAA2B,EAAE,CAAC"}
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- "use strict";"use client";var N=Object.create;var C=Object.defineProperty;var D=Object.getOwnPropertyDescriptor;var U=Object.getOwnPropertyNames;var W=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty;var M=(e,o)=>{for(var t in o)C(e,t,{get:o[t],enumerable:!0})},G=(e,o,t,i)=>{if(o&&typeof o=="object"||typeof o=="function")for(let r of U(o))!A.call(e,r)&&r!==t&&C(e,r,{get:()=>o[r],enumerable:!(i=D(o,r))||i.enumerable});return e};var O=(e,o,t)=>(t=e!=null?N(W(e)):{},G(o||!e||!e.__esModule?C(t,"default",{value:e,enumerable:!0}):t,e)),w=e=>G(C({},"__esModule",{value:!0}),e);var L={};M(L,{CheckboxGroup:()=>x,CheckboxGroupIndicator:()=>P,CheckboxGroupItem:()=>m,Indicator:()=>J,Item:()=>F,Root:()=>j,createCheckboxGroupScope:()=>B});module.exports=w(L);var c=O(require("react")),a=require("radix-ui"),p=require("radix-ui/internal"),{useDirection:T}=a.Direction,k="CheckboxGroup",[z,B]=p.Context.createContextScope(k,[a.Checkbox.createCheckboxScope]),I=a.Checkbox.createCheckboxScope(),[H,K]=z(k),x=c.forwardRef((e,o)=>{let{__scopeCheckboxGroup:t,name:i,defaultValue:r,value:n,required:d=!1,disabled:s=!1,orientation:f,dir:h,loop:v,onValueChange:y,...g}=e,E=T(h),[_=[],u]=(0,p.useControllableState)({prop:n,defaultProp:r??[],onChange:y}),S=c.useCallback(l=>u((b=[])=>[...b,l]),[u]),V=c.useCallback(l=>u((b=[])=>b.filter(q=>q!==l)),[u]);return c.createElement(H,{scope:t,name:i,required:d,disabled:s,value:_,onItemCheck:S,onItemUncheck:V},c.createElement(p.Primitive.div,{role:"group","data-disabled":s?"":void 0,dir:E,...g,ref:o}))});x.displayName=k;var R="CheckboxGroupItem",m=c.forwardRef((e,o)=>{let{__scopeCheckboxGroup:t,disabled:i,...r}=e,n=K(R,t),d=n.disabled||i,s=I(t),f=n.value?.includes(r.value),h=n.required&&(n.value?.length??0)===0;return c.createElement(a.Checkbox.Root,{name:n.name,disabled:d,required:h,checked:f,...s,...r,ref:o,onCheckedChange:v=>{v?n.onItemCheck(e.value):n.onItemUncheck(e.value)}})});m.displayName=R;var X="CheckboxGroupIndicator",P=c.forwardRef((e,o)=>{let{__scopeCheckboxGroup:t,...i}=e,r=I(t);return c.createElement(a.Checkbox.Indicator,{...r,...i,ref:o})});P.displayName=X;var j=x,F=m,J=P;
2
+ "use strict";"use client";var V=Object.create;var C=Object.defineProperty;var q=Object.getOwnPropertyDescriptor;var N=Object.getOwnPropertyNames;var D=Object.getPrototypeOf,U=Object.prototype.hasOwnProperty;var W=(e,o)=>{for(var t in o)C(e,t,{get:o[t],enumerable:!0})},G=(e,o,t,i)=>{if(o&&typeof o=="object"||typeof o=="function")for(let r of N(o))!U.call(e,r)&&r!==t&&C(e,r,{get:()=>o[r],enumerable:!(i=q(o,r))||i.enumerable});return e};var A=(e,o,t)=>(t=e!=null?V(D(e)):{},G(o||!e||!e.__esModule?C(t,"default",{value:e,enumerable:!0}):t,e)),M=e=>G(C({},"__esModule",{value:!0}),e);var F={};W(F,{CheckboxGroup:()=>P,CheckboxGroupIndicator:()=>v,CheckboxGroupItem:()=>f,Indicator:()=>z,Item:()=>j,Root:()=>X,createCheckboxGroupScope:()=>T});module.exports=M(F);var c=A(require("react")),p=require("radix-ui"),a=require("radix-ui/internal"),{useDirection:O}=p.Direction,m="CheckboxGroup",[w,T]=a.Context.createContextScope(m,[p.Checkbox.createCheckboxScope]),I=p.Checkbox.createCheckboxScope(),[B,H]=w(m),P=c.forwardRef((e,o)=>{let{__scopeCheckboxGroup:t,name:i,defaultValue:r,value:n,required:d=!1,disabled:s=!1,dir:h,onValueChange:l,...k}=e,y=O(h),[g=[],u]=(0,a.useControllableState)({prop:n,defaultProp:r??[],onChange:l}),E=c.useCallback(b=>u((x=[])=>[...x,b]),[u]),S=c.useCallback(b=>u((x=[])=>x.filter(_=>_!==b)),[u]);return c.createElement(B,{scope:t,name:i,required:d,disabled:s,value:g,onItemCheck:E,onItemUncheck:S},c.createElement(a.Primitive.div,{role:"group","data-disabled":s?"":void 0,dir:y,...k,ref:o}))});P.displayName=m;var R="CheckboxGroupItem",f=c.forwardRef((e,o)=>{let{__scopeCheckboxGroup:t,disabled:i,...r}=e,n=H(R,t),d=n.disabled||i,s=I(t),h=n.value?.includes(r.value),l=n.required&&(n.value?.length??0)===0;return c.createElement(p.Checkbox.Root,{name:n.name,disabled:d,required:l,checked:h,...s,...r,ref:o,onCheckedChange:k=>{k?n.onItemCheck(e.value):n.onItemUncheck(e.value)}})});f.displayName=R;var K="CheckboxGroupIndicator",v=c.forwardRef((e,o)=>{let{__scopeCheckboxGroup:t,...i}=e,r=I(t);return c.createElement(p.Checkbox.Indicator,{...r,...i,ref:o})});v.displayName=K;var X=P,j=f,z=v;
3
3
  //# sourceMappingURL=checkbox-group.primitive.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/checkbox-group.primitive.tsx"],
4
- "sourcesContent": ["'use client';\n\nimport * as React from 'react';\nimport { Checkbox as CheckboxPrimitive, Direction } from 'radix-ui';\nimport { Context, Primitive, useControllableState } from 'radix-ui/internal';\n\nconst { useDirection } = Direction;\n\n/* -------------------------------------------------------------------------------------------------\n * CheckboxGroup\n * -----------------------------------------------------------------------------------------------*/\nconst CHECKBOX_GROUP_NAME = 'CheckboxGroup';\n\ntype ScopedProps<P> = P & { __scopeCheckboxGroup?: Context.Scope };\nconst [createCheckboxGroupContext, createCheckboxGroupScope] = Context.createContextScope(\n CHECKBOX_GROUP_NAME,\n [CheckboxPrimitive.createCheckboxScope],\n);\nconst useCheckboxScope = CheckboxPrimitive.createCheckboxScope();\n\ntype CheckboxGroupContextValue = {\n name?: string;\n required: boolean;\n disabled: boolean;\n value?: string[];\n onItemCheck(value: string): void;\n onItemUncheck(value: string): void;\n};\n\nconst [CheckboxGroupProvider, useCheckboxGroupContext] =\n createCheckboxGroupContext<CheckboxGroupContextValue>(CHECKBOX_GROUP_NAME);\n\ntype CheckboxGroupElement = React.ElementRef<typeof Primitive.div>;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;\ninterface CheckboxGroupProps extends PrimitiveDivProps {\n name?: CheckboxGroupContextValue['name'];\n required?: React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>['required'];\n disabled?: React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>['disabled'];\n dir?: 'ltr' | 'rtl';\n /**\n * @deprecated Has no effect. Each checkbox is its own tab stop, as with native checkboxes,\n * so there is no arrow-key navigation to orient.\n */\n orientation?: 'horizontal' | 'vertical';\n /**\n * @deprecated Has no effect. Each checkbox is its own tab stop, as with native checkboxes,\n * so there is no arrow-key navigation to loop.\n */\n loop?: boolean;\n defaultValue?: string[];\n value?: CheckboxGroupContextValue['value'];\n onValueChange?: (value: string[]) => void;\n}\n\nconst CheckboxGroup = React.forwardRef<CheckboxGroupElement, CheckboxGroupProps>(\n (props: ScopedProps<CheckboxGroupProps>, forwardedRef) => {\n const {\n __scopeCheckboxGroup,\n name,\n defaultValue,\n value: valueProp,\n required = false,\n disabled = false,\n orientation: _orientation,\n dir,\n loop: _loop,\n onValueChange,\n ...groupProps\n } = props;\n const direction = useDirection(dir);\n const [value = [], setValue] = useControllableState({\n prop: valueProp,\n defaultProp: defaultValue ?? [],\n onChange: onValueChange,\n });\n\n const handleItemCheck = React.useCallback(\n (itemValue: string) => setValue((prevValue = []) => [...prevValue, itemValue]),\n [setValue],\n );\n\n const handleItemUncheck = React.useCallback(\n (itemValue: string) =>\n setValue((prevValue = []) => prevValue.filter((value) => value !== itemValue)),\n [setValue],\n );\n\n return (\n <CheckboxGroupProvider\n scope={__scopeCheckboxGroup}\n name={name}\n required={required}\n disabled={disabled}\n value={value}\n onItemCheck={handleItemCheck}\n onItemUncheck={handleItemUncheck}\n >\n <Primitive.div\n role=\"group\"\n data-disabled={disabled ? '' : undefined}\n dir={direction}\n {...groupProps}\n ref={forwardedRef}\n />\n </CheckboxGroupProvider>\n );\n },\n);\n\nCheckboxGroup.displayName = CHECKBOX_GROUP_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * CheckboxGroupItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst ITEM_NAME = 'CheckboxGroupItem';\n\ntype CheckboxGroupItemElement = React.ElementRef<typeof CheckboxPrimitive.Root>;\ntype CheckboxProps = React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>;\ninterface CheckboxGroupItemProps\n extends Omit<CheckboxProps, 'checked' | 'defaultChecked' | 'onCheckedChange' | 'name'> {\n value: string;\n}\n\nconst CheckboxGroupItem = React.forwardRef<CheckboxGroupItemElement, CheckboxGroupItemProps>(\n (props: ScopedProps<CheckboxGroupItemProps>, forwardedRef) => {\n const { __scopeCheckboxGroup, disabled, ...itemProps } = props;\n const context = useCheckboxGroupContext(ITEM_NAME, __scopeCheckboxGroup);\n const isDisabled = context.disabled || disabled;\n const checkboxScope = useCheckboxScope(__scopeCheckboxGroup);\n const checked = context.value?.includes(itemProps.value);\n // A required group needs at least one box checked, not every box: the items are\n // required only while none is checked.\n const isRequired = context.required && (context.value?.length ?? 0) === 0;\n\n return (\n <CheckboxPrimitive.Root\n name={context.name}\n disabled={isDisabled}\n required={isRequired}\n checked={checked}\n {...checkboxScope}\n {...itemProps}\n ref={forwardedRef}\n onCheckedChange={(checked) => {\n if (checked) {\n context.onItemCheck(props.value);\n } else {\n context.onItemUncheck(props.value);\n }\n }}\n />\n );\n },\n);\n\nCheckboxGroupItem.displayName = ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * CheckboxGroupIndicator\n * -----------------------------------------------------------------------------------------------*/\n\nconst INDICATOR_NAME = 'CheckboxGroupIndicator';\n\ntype CheckboxGroupIndicatorElement = React.ElementRef<typeof CheckboxPrimitive.Indicator>;\ntype CheckboxIndicatorProps = React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Indicator>;\ninterface CheckboxGroupIndicatorProps extends CheckboxIndicatorProps {}\n\nconst CheckboxGroupIndicator = React.forwardRef<\n CheckboxGroupIndicatorElement,\n CheckboxGroupIndicatorProps\n>((props: ScopedProps<CheckboxGroupIndicatorProps>, forwardedRef) => {\n const { __scopeCheckboxGroup, ...indicatorProps } = props;\n const checkboxScope = useCheckboxScope(__scopeCheckboxGroup);\n return <CheckboxPrimitive.Indicator {...checkboxScope} {...indicatorProps} ref={forwardedRef} />;\n});\n\nCheckboxGroupIndicator.displayName = INDICATOR_NAME;\n\n/* ---------------------------------------------------------------------------------------------- */\n\nconst Root = CheckboxGroup;\nconst Item = CheckboxGroupItem;\nconst Indicator = CheckboxGroupIndicator;\n\nexport {\n createCheckboxGroupScope,\n //\n CheckboxGroup,\n CheckboxGroupItem,\n CheckboxGroupIndicator,\n //\n Root,\n Item,\n Indicator,\n};\nexport type { CheckboxGroupProps, CheckboxGroupItemProps, CheckboxGroupIndicatorProps };\n"],
5
- "mappings": ";ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,mBAAAE,EAAA,2BAAAC,EAAA,sBAAAC,EAAA,cAAAC,EAAA,SAAAC,EAAA,SAAAC,EAAA,6BAAAC,IAAA,eAAAC,EAAAT,GAEA,IAAAU,EAAuB,oBACvBC,EAAyD,oBACzDC,EAAyD,6BAEnD,CAAE,aAAAC,CAAa,EAAI,YAKnBC,EAAsB,gBAGtB,CAACC,EAA4BP,CAAwB,EAAI,UAAQ,mBACrEM,EACA,CAAC,EAAAE,SAAkB,mBAAmB,CACxC,EACMC,EAAmB,EAAAD,SAAkB,oBAAoB,EAWzD,CAACE,EAAuBC,CAAuB,EACnDJ,EAAsDD,CAAmB,EAwBrEZ,EAAsB,aAC1B,CAACkB,EAAwCC,IAAiB,CACxD,GAAM,CACJ,qBAAAC,EACA,KAAAC,EACA,aAAAC,EACA,MAAOC,EACP,SAAAC,EAAW,GACX,SAAAC,EAAW,GACX,YAAaC,EACb,IAAAC,EACA,KAAMC,EACN,cAAAC,EACA,GAAGC,CACL,EAAIZ,EACEa,EAAYpB,EAAagB,CAAG,EAC5B,CAACK,EAAQ,CAAC,EAAGC,CAAQ,KAAI,wBAAqB,CAClD,KAAMV,EACN,YAAaD,GAAgB,CAAC,EAC9B,SAAUO,CACZ,CAAC,EAEKK,EAAwB,cAC3BC,GAAsBF,EAAS,CAACG,EAAY,CAAC,IAAM,CAAC,GAAGA,EAAWD,CAAS,CAAC,EAC7E,CAACF,CAAQ,CACX,EAEMI,EAA0B,cAC7BF,GACCF,EAAS,CAACG,EAAY,CAAC,IAAMA,EAAU,OAAQJ,GAAUA,IA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AAOL,EACPI,EAAOF,EACPC,EAAYF",
6
- "names": ["checkbox_group_primitive_exports", "__export", "CheckboxGroup", "CheckboxGroupIndicator", "CheckboxGroupItem", "Indicator", "Item", "Root", "createCheckboxGroupScope", "__toCommonJS", "React", "import_radix_ui", "import_internal", "useDirection", "CHECKBOX_GROUP_NAME", "createCheckboxGroupContext", "CheckboxPrimitive", "useCheckboxScope", "CheckboxGroupProvider", "useCheckboxGroupContext", "props", "forwardedRef", "__scopeCheckboxGroup", "name", "defaultValue", "valueProp", "required", "disabled", "_orientation", "dir", "_loop", "onValueChange", "groupProps", "direction", "value", "setValue", "handleItemCheck", "itemValue", "prevValue", "handleItemUncheck", "ITEM_NAME", "itemProps", "context", "isDisabled", "checkboxScope", "checked", "isRequired", "INDICATOR_NAME", "indicatorProps"]
4
+ "sourcesContent": ["'use client';\n\nimport * as React from 'react';\nimport { Checkbox as CheckboxPrimitive, Direction } from 'radix-ui';\nimport { Context, Primitive, useControllableState } from 'radix-ui/internal';\n\nconst { useDirection } = Direction;\n\n/* -------------------------------------------------------------------------------------------------\n * CheckboxGroup\n * -----------------------------------------------------------------------------------------------*/\nconst CHECKBOX_GROUP_NAME = 'CheckboxGroup';\n\ntype ScopedProps<P> = P & { __scopeCheckboxGroup?: Context.Scope };\nconst [createCheckboxGroupContext, createCheckboxGroupScope] = Context.createContextScope(\n CHECKBOX_GROUP_NAME,\n [CheckboxPrimitive.createCheckboxScope],\n);\nconst useCheckboxScope = CheckboxPrimitive.createCheckboxScope();\n\ntype CheckboxGroupContextValue = {\n name?: string;\n required: boolean;\n disabled: boolean;\n value?: string[];\n onItemCheck(value: string): void;\n onItemUncheck(value: string): void;\n};\n\nconst [CheckboxGroupProvider, useCheckboxGroupContext] =\n createCheckboxGroupContext<CheckboxGroupContextValue>(CHECKBOX_GROUP_NAME);\n\ntype CheckboxGroupElement = React.ElementRef<typeof Primitive.div>;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;\ninterface CheckboxGroupProps extends PrimitiveDivProps {\n name?: CheckboxGroupContextValue['name'];\n required?: React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>['required'];\n disabled?: React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>['disabled'];\n dir?: 'ltr' | 'rtl';\n defaultValue?: string[];\n value?: CheckboxGroupContextValue['value'];\n onValueChange?: (value: string[]) => void;\n}\n\nconst CheckboxGroup = React.forwardRef<CheckboxGroupElement, CheckboxGroupProps>(\n (props: ScopedProps<CheckboxGroupProps>, forwardedRef) => {\n const {\n __scopeCheckboxGroup,\n name,\n defaultValue,\n value: valueProp,\n required = false,\n disabled = false,\n dir,\n onValueChange,\n ...groupProps\n } = props;\n const direction = useDirection(dir);\n const [value = [], setValue] = useControllableState({\n prop: valueProp,\n defaultProp: defaultValue ?? [],\n onChange: onValueChange,\n });\n\n const handleItemCheck = React.useCallback(\n (itemValue: string) => setValue((prevValue = []) => [...prevValue, itemValue]),\n [setValue],\n );\n\n const handleItemUncheck = React.useCallback(\n (itemValue: string) =>\n setValue((prevValue = []) => prevValue.filter((value) => value !== itemValue)),\n [setValue],\n );\n\n return (\n <CheckboxGroupProvider\n scope={__scopeCheckboxGroup}\n name={name}\n required={required}\n disabled={disabled}\n value={value}\n onItemCheck={handleItemCheck}\n onItemUncheck={handleItemUncheck}\n >\n <Primitive.div\n role=\"group\"\n data-disabled={disabled ? '' : undefined}\n dir={direction}\n {...groupProps}\n ref={forwardedRef}\n />\n </CheckboxGroupProvider>\n );\n },\n);\n\nCheckboxGroup.displayName = CHECKBOX_GROUP_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * CheckboxGroupItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst ITEM_NAME = 'CheckboxGroupItem';\n\ntype CheckboxGroupItemElement = React.ElementRef<typeof CheckboxPrimitive.Root>;\ntype CheckboxProps = React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>;\ninterface CheckboxGroupItemProps\n extends Omit<CheckboxProps, 'checked' | 'defaultChecked' | 'onCheckedChange' | 'name'> {\n value: string;\n}\n\nconst CheckboxGroupItem = React.forwardRef<CheckboxGroupItemElement, CheckboxGroupItemProps>(\n (props: ScopedProps<CheckboxGroupItemProps>, forwardedRef) => {\n const { __scopeCheckboxGroup, disabled, ...itemProps } = props;\n const context = useCheckboxGroupContext(ITEM_NAME, __scopeCheckboxGroup);\n const isDisabled = context.disabled || disabled;\n const checkboxScope = useCheckboxScope(__scopeCheckboxGroup);\n const checked = context.value?.includes(itemProps.value);\n // A required group needs at least one box checked, not every box: the items are\n // required only while none is checked.\n const isRequired = context.required && (context.value?.length ?? 0) === 0;\n\n return (\n <CheckboxPrimitive.Root\n name={context.name}\n disabled={isDisabled}\n required={isRequired}\n checked={checked}\n {...checkboxScope}\n {...itemProps}\n ref={forwardedRef}\n onCheckedChange={(checked) => {\n if (checked) {\n context.onItemCheck(props.value);\n } else {\n context.onItemUncheck(props.value);\n }\n }}\n />\n );\n },\n);\n\nCheckboxGroupItem.displayName = ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * CheckboxGroupIndicator\n * -----------------------------------------------------------------------------------------------*/\n\nconst INDICATOR_NAME = 'CheckboxGroupIndicator';\n\ntype CheckboxGroupIndicatorElement = React.ElementRef<typeof CheckboxPrimitive.Indicator>;\ntype CheckboxIndicatorProps = React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Indicator>;\ninterface CheckboxGroupIndicatorProps extends CheckboxIndicatorProps {}\n\nconst CheckboxGroupIndicator = React.forwardRef<\n CheckboxGroupIndicatorElement,\n CheckboxGroupIndicatorProps\n>((props: ScopedProps<CheckboxGroupIndicatorProps>, forwardedRef) => {\n const { __scopeCheckboxGroup, ...indicatorProps } = props;\n const checkboxScope = useCheckboxScope(__scopeCheckboxGroup);\n return <CheckboxPrimitive.Indicator {...checkboxScope} {...indicatorProps} ref={forwardedRef} />;\n});\n\nCheckboxGroupIndicator.displayName = INDICATOR_NAME;\n\n/* ---------------------------------------------------------------------------------------------- */\n\nconst Root = CheckboxGroup;\nconst Item = CheckboxGroupItem;\nconst Indicator = CheckboxGroupIndicator;\n\nexport {\n createCheckboxGroupScope,\n //\n CheckboxGroup,\n CheckboxGroupItem,\n CheckboxGroupIndicator,\n //\n Root,\n Item,\n Indicator,\n};\nexport type { CheckboxGroupProps, CheckboxGroupItemProps, CheckboxGroupIndicatorProps };\n"],
5
+ "mappings": ";ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,mBAAAE,EAAA,2BAAAC,EAAA,sBAAAC,EAAA,cAAAC,EAAA,SAAAC,EAAA,SAAAC,EAAA,6BAAAC,IAAA,eAAAC,EAAAT,GAEA,IAAAU,EAAuB,oBACvBC,EAAyD,oBACzDC,EAAyD,6BAEnD,CAAE,aAAAC,CAAa,EAAI,YAKnBC,EAAsB,gBAGtB,CAACC,EAA4BP,CAAwB,EAAI,UAAQ,mBACrEM,EACA,CAAC,EAAAE,SAAkB,mBAAmB,CACxC,EACMC,EAAmB,EAAAD,SAAkB,oBAAoB,EAWzD,CAACE,EAAuBC,CAAuB,EACnDJ,EAAsDD,CAAmB,EAcrEZ,EAAsB,aAC1B,CAACkB,EAAwCC,IAAiB,CACxD,GAAM,CACJ,qBAAAC,EACA,KAAAC,EACA,aAAAC,EACA,MAAOC,EACP,SAAAC,EAAW,GACX,SAAAC,EAAW,GACX,IAAAC,EACA,cAAAC,EACA,GAAGC,CACL,EAAIV,EACEW,EAAYlB,EAAae,CAAG,EAC5B,CAACI,EAAQ,CAAC,EAAGC,CAAQ,KAAI,wBAAqB,CAClD,KAAMR,EACN,YAAaD,GAAgB,CAAC,EAC9B,SAAUK,CACZ,CAAC,EAEKK,EAAwB,cAC3BC,GAAsBF,EAAS,CAACG,EAAY,CAAC,IAAM,CAAC,GAAGA,EAAWD,CAAS,CAAC,EAC7E,CAACF,CAAQ,CACX,EAEMI,EAA0B,cAC7BF,GACCF,EAAS,CAACG,EAAY,CAAC,IAAMA,EAAU,OAAQJ,G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tC,EAAOL,EACPI,EAAOF,EACPC,EAAYF",
6
+ "names": ["checkbox_group_primitive_exports", "__export", "CheckboxGroup", "CheckboxGroupIndicator", "CheckboxGroupItem", "Indicator", "Item", "Root", "createCheckboxGroupScope", "__toCommonJS", "React", "import_radix_ui", "import_internal", "useDirection", "CHECKBOX_GROUP_NAME", "createCheckboxGroupContext", "CheckboxPrimitive", "useCheckboxScope", "CheckboxGroupProvider", "useCheckboxGroupContext", "props", "forwardedRef", "__scopeCheckboxGroup", "name", "defaultValue", "valueProp", "required", "disabled", "dir", "onValueChange", "groupProps", "direction", "value", "setValue", "handleItemCheck", "itemValue", "prevValue", "handleItemUncheck", "ITEM_NAME", "itemProps", "context", "isDisabled", "checkboxScope", "checked", "isRequired", "INDICATOR_NAME", "indicatorProps"]
7
7
  }
@@ -2,7 +2,7 @@ import * as React from 'react';
2
2
  import { ContextMenu as ContextMenuPrimitive } from 'radix-ui';
3
3
  import { contextMenuContentPropDefs, contextMenuItemPropDefs, contextMenuCheckboxItemPropDefs, contextMenuRadioItemPropDefs } from './context-menu.props.js';
4
4
  import type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';
5
- import type { GetPropDefTypes, Responsive } from '../props/prop-def.js';
5
+ import type { GetPropDefTypes } from '../props/prop-def.js';
6
6
  interface ContextMenuRootProps extends React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Root> {
7
7
  }
8
8
  declare const ContextMenuRoot: React.FC<ContextMenuRootProps>;
@@ -18,10 +18,6 @@ interface ContextMenuContentProps extends ComponentPropsWithout<typeof ContextMe
18
18
  * Use this when rendering virtualized lists inside the context menu.
19
19
  */
20
20
  virtualized?: boolean;
21
- /**
22
- * @deprecated Has no effect. ContextMenu submenus always cascade.
23
- */
24
- submenuBehavior?: Responsive<'cascade' | 'drill-down'>;
25
21
  }
26
22
  declare const ContextMenuContent: React.ForwardRefExoticComponent<ContextMenuContentProps & React.RefAttributes<HTMLDivElement>>;
27
23
  interface ContextMenuLabelProps extends ComponentPropsWithout<typeof ContextMenuPrimitive.Label, RemovedProps> {
@@ -1 +1 @@
1
- {"version":3,"file":"context-menu.d.ts","sourceRoot":"","sources":["../../../src/components/context-menu.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,WAAW,IAAI,oBAAoB,EAAQ,MAAM,UAAU,CAAC;AAIrE,OAAO,EACL,0BAA0B,EAE1B,uBAAuB,EACvB,+BAA+B,EAC/B,4BAA4B,EAC7B,MAAM,yBAAyB,CAAC;AAqBjC,OAAO,KAAK,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AACzF,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAExE,UAAU,oBACR,SAAQ,KAAK,CAAC,wBAAwB,CAAC,OAAO,oBAAoB,CAAC,IAAI,CAAC;CAAG;AAC7E,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAoBnD,CAAC;AAIF,UAAU,uBACR,SAAQ,qBAAqB,CAAC,OAAO,oBAAoB,CAAC,OAAO,EAAE,YAAY,CAAC;CAAG;AACrF,QAAA,MAAM,kBAAkB,iGAMvB,CAAC;AAGF,qDAAqD;AACrD,KAAK,uBAAuB,GAAG,eAAe,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAQlF,UAAU,uBACR,SAAQ,qBAAqB,CAAC,OAAO,oBAAoB,CAAC,OAAO,EAAE,YAAY,CAAC,EAC9E,uBAAuB;IACzB,SAAS,CAAC,EAAE,KAAK,CAAC,wBAAwB,CAAC,OAAO,oBAAoB,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,CAAC;IAC5F;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,eAAe,CAAC,EAAE,UAAU,CAAC,SAAS,GAAG,YAAY,CAAC,CAAC;CACxD;AACD,QAAA,MAAM,kBAAkB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