@womp/kookie-ui 0.36.0 → 0.37.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (285) 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/accordion.js +1 -1
  44. package/dist/cjs/components/accordion.js.map +1 -1
  45. package/dist/cjs/components/accordion.props.d.ts +4 -3
  46. package/dist/cjs/components/accordion.props.d.ts.map +1 -1
  47. package/dist/cjs/components/accordion.props.js +1 -1
  48. package/dist/cjs/components/accordion.props.js.map +1 -1
  49. package/dist/cjs/components/checkbox-group.js +1 -1
  50. package/dist/cjs/components/checkbox-group.js.map +3 -3
  51. package/dist/cjs/components/checkbox-group.primitive.d.ts +0 -10
  52. package/dist/cjs/components/checkbox-group.primitive.d.ts.map +1 -1
  53. package/dist/cjs/components/checkbox-group.primitive.js +1 -1
  54. package/dist/cjs/components/checkbox-group.primitive.js.map +3 -3
  55. package/dist/cjs/components/context-menu.d.ts +1 -5
  56. package/dist/cjs/components/context-menu.d.ts.map +1 -1
  57. package/dist/cjs/components/context-menu.js +1 -1
  58. package/dist/cjs/components/context-menu.js.map +3 -3
  59. package/dist/cjs/components/dropdown-menu.js +1 -1
  60. package/dist/cjs/components/dropdown-menu.js.map +2 -2
  61. package/dist/cjs/components/index.js +2 -2
  62. package/dist/cjs/components/index.js.map +4 -4
  63. package/dist/cjs/components/navigator.js.map +2 -2
  64. package/dist/cjs/components/schemas/index.d.ts +1 -1
  65. package/dist/cjs/components/schemas/index.d.ts.map +1 -1
  66. package/dist/cjs/components/schemas/index.js +1 -1
  67. package/dist/cjs/components/schemas/index.js.map +3 -3
  68. package/dist/cjs/components/schemas/shell.schema.d.ts +6 -112
  69. package/dist/cjs/components/schemas/shell.schema.d.ts.map +1 -1
  70. package/dist/cjs/components/schemas/shell.schema.js +1 -1
  71. package/dist/cjs/components/schemas/shell.schema.js.map +3 -3
  72. package/dist/cjs/components/separator.js +1 -1
  73. package/dist/cjs/components/separator.js.map +2 -2
  74. package/dist/cjs/components/shell.context.d.ts +1 -45
  75. package/dist/cjs/components/shell.context.d.ts.map +1 -1
  76. package/dist/cjs/components/shell.context.js +1 -1
  77. package/dist/cjs/components/shell.context.js.map +4 -4
  78. package/dist/cjs/components/shell.d.ts +7 -37
  79. package/dist/cjs/components/shell.d.ts.map +1 -1
  80. package/dist/cjs/components/shell.js +1 -1
  81. package/dist/cjs/components/shell.js.map +4 -4
  82. package/dist/cjs/components/shell.types.d.ts +6 -27
  83. package/dist/cjs/components/shell.types.d.ts.map +1 -1
  84. package/dist/cjs/components/shell.types.js +1 -1
  85. package/dist/cjs/components/shell.types.js.map +2 -2
  86. package/dist/cjs/components/sidebar.js +1 -1
  87. package/dist/cjs/components/sidebar.js.map +2 -2
  88. package/dist/cjs/components/toolbar.js +1 -1
  89. package/dist/cjs/components/toolbar.js.map +2 -2
  90. package/dist/cjs/hooks/use-breakpoint.js +1 -1
  91. package/dist/cjs/hooks/use-breakpoint.js.map +2 -2
  92. package/dist/cjs/index.js +4 -4
  93. package/dist/cjs/index.js.map +4 -4
  94. package/dist/cjs/props/index.js +1 -1
  95. package/dist/cjs/props/index.js.map +1 -1
  96. package/dist/esm/{chunk-5RLGDXOM.js → chunk-2K46JPUL.js} +2 -2
  97. package/dist/esm/chunk-3DBHPBG6.js +3 -0
  98. package/dist/esm/{chunk-ASBTPKH3.js.map → chunk-3DBHPBG6.js.map} +2 -2
  99. package/dist/esm/chunk-3K7E4XL3.js +3 -0
  100. package/dist/esm/chunk-3K7E4XL3.js.map +7 -0
  101. package/dist/esm/chunk-3LR7KMBE.js +3 -0
  102. package/dist/esm/chunk-3LR7KMBE.js.map +7 -0
  103. package/dist/esm/chunk-5U2LEJLU.js +3 -0
  104. package/dist/esm/chunk-5U2LEJLU.js.map +7 -0
  105. package/dist/esm/{chunk-IN6D33TU.js → chunk-5XO3PLDH.js} +2 -2
  106. package/dist/esm/{chunk-COLJWVN7.js → chunk-AQR42GKA.js} +2 -2
  107. package/dist/esm/{chunk-FTNZWAPB.js → chunk-ARPUPT4M.js} +2 -2
  108. package/dist/esm/{chunk-ISCZ57VL.js → chunk-DJGZ4K3V.js} +2 -2
  109. package/dist/esm/{chunk-PMXIQ5B4.js → chunk-FKCKELUB.js} +2 -2
  110. package/dist/esm/chunk-H7GH3DTF.js +3 -0
  111. package/dist/esm/chunk-H7GH3DTF.js.map +7 -0
  112. package/dist/esm/{chunk-E6MOZSYV.js → chunk-HNOT2HS4.js} +2 -2
  113. package/dist/esm/chunk-LBAC2X4U.js +3 -0
  114. package/dist/esm/{chunk-5BXCPANF.js.map → chunk-LBAC2X4U.js.map} +3 -3
  115. package/dist/esm/{chunk-MAA6LEE2.js → chunk-MDQ7ZHOS.js} +1 -1
  116. package/dist/esm/chunk-MDQ7ZHOS.js.map +7 -0
  117. package/dist/esm/chunk-MQA3BKF4.js +3 -0
  118. package/dist/esm/chunk-MQA3BKF4.js.map +7 -0
  119. package/dist/esm/chunk-MXNPCJPV.js +3 -0
  120. package/dist/esm/chunk-MXNPCJPV.js.map +7 -0
  121. package/dist/esm/chunk-QBVTI32A.js +2 -0
  122. package/dist/esm/chunk-QBVTI32A.js.map +7 -0
  123. package/dist/esm/{chunk-EB4AG3OL.js → chunk-REELD6CT.js} +2 -2
  124. package/dist/esm/chunk-RYXIRZQW.js +3 -0
  125. package/dist/esm/chunk-RYXIRZQW.js.map +7 -0
  126. package/dist/esm/chunk-S66WR5R7.js +3 -0
  127. package/dist/esm/{chunk-MXEOE4LA.js.map → chunk-S66WR5R7.js.map} +2 -2
  128. package/dist/esm/chunk-SECVO3CW.js +3 -0
  129. package/dist/esm/chunk-SECVO3CW.js.map +7 -0
  130. package/dist/esm/chunk-SHDZYFUN.js +3 -0
  131. package/dist/esm/chunk-SHDZYFUN.js.map +7 -0
  132. package/dist/esm/{chunk-3M5ZM67R.js → chunk-TCFBNE6A.js} +2 -2
  133. package/dist/esm/chunk-U7P64MXD.js +3 -0
  134. package/dist/esm/chunk-U7P64MXD.js.map +7 -0
  135. package/dist/esm/chunk-UFYQC5XY.js +3 -0
  136. package/dist/esm/chunk-UFYQC5XY.js.map +7 -0
  137. package/dist/esm/{chunk-G66WDIIV.js → chunk-WJKCXGVN.js} +2 -2
  138. package/dist/esm/chunk-XBDAE77C.js +3 -0
  139. package/dist/esm/chunk-XBDAE77C.js.map +7 -0
  140. package/dist/esm/{chunk-SIYOLE6P.js → chunk-YM47BXKK.js} +2 -2
  141. package/dist/esm/components/_internal/base-menu.utils.js +1 -1
  142. package/dist/esm/components/_internal/menu-context.js +1 -1
  143. package/dist/esm/components/_internal/pane-chrome.js +1 -1
  144. package/dist/esm/components/_internal/shell-bottom.d.ts +3 -3
  145. package/dist/esm/components/_internal/shell-bottom.d.ts.map +1 -1
  146. package/dist/esm/components/_internal/shell-bottom.js +1 -1
  147. package/dist/esm/components/_internal/shell-handles.d.ts.map +1 -1
  148. package/dist/esm/components/_internal/shell-handles.js +1 -1
  149. package/dist/esm/components/_internal/shell-inspector.d.ts +3 -3
  150. package/dist/esm/components/_internal/shell-inspector.d.ts.map +1 -1
  151. package/dist/esm/components/_internal/shell-inspector.js +1 -1
  152. package/dist/esm/components/_internal/shell-pane.d.ts +2 -7
  153. package/dist/esm/components/_internal/shell-pane.d.ts.map +1 -1
  154. package/dist/esm/components/_internal/shell-pane.js +1 -1
  155. package/dist/esm/components/_internal/shell-resizable.d.ts +3 -9
  156. package/dist/esm/components/_internal/shell-resizable.d.ts.map +1 -1
  157. package/dist/esm/components/_internal/shell-resizable.js +1 -1
  158. package/dist/esm/components/_internal/shell-resize.d.ts +0 -4
  159. package/dist/esm/components/_internal/shell-resize.d.ts.map +1 -1
  160. package/dist/esm/components/_internal/shell-resize.js +1 -1
  161. package/dist/esm/components/_internal/shell-rest.d.ts +1 -6
  162. package/dist/esm/components/_internal/shell-rest.d.ts.map +1 -1
  163. package/dist/esm/components/_internal/shell-rest.js +1 -1
  164. package/dist/esm/components/_internal/shell-sidebar.d.ts +3 -3
  165. package/dist/esm/components/_internal/shell-sidebar.d.ts.map +1 -1
  166. package/dist/esm/components/_internal/shell-sidebar.js +1 -1
  167. package/dist/esm/components/_internal/shell-store.d.ts +0 -10
  168. package/dist/esm/components/_internal/shell-store.d.ts.map +1 -1
  169. package/dist/esm/components/_internal/shell-store.js +1 -1
  170. package/dist/esm/components/accordion.js +1 -1
  171. package/dist/esm/components/accordion.props.d.ts +4 -3
  172. package/dist/esm/components/accordion.props.d.ts.map +1 -1
  173. package/dist/esm/components/accordion.props.js +1 -1
  174. package/dist/esm/components/checkbox-group.js +1 -1
  175. package/dist/esm/components/checkbox-group.primitive.d.ts +0 -10
  176. package/dist/esm/components/checkbox-group.primitive.d.ts.map +1 -1
  177. package/dist/esm/components/checkbox-group.primitive.js +1 -1
  178. package/dist/esm/components/context-menu.d.ts +1 -5
  179. package/dist/esm/components/context-menu.d.ts.map +1 -1
  180. package/dist/esm/components/context-menu.js +1 -1
  181. package/dist/esm/components/dropdown-menu.js +1 -1
  182. package/dist/esm/components/index.js +1 -1
  183. package/dist/esm/components/navigator.js +1 -1
  184. package/dist/esm/components/schemas/index.d.ts +1 -1
  185. package/dist/esm/components/schemas/index.d.ts.map +1 -1
  186. package/dist/esm/components/schemas/index.js +1 -1
  187. package/dist/esm/components/schemas/index.js.map +2 -2
  188. package/dist/esm/components/schemas/shell.schema.d.ts +6 -112
  189. package/dist/esm/components/schemas/shell.schema.d.ts.map +1 -1
  190. package/dist/esm/components/schemas/shell.schema.js +1 -1
  191. package/dist/esm/components/separator.js +1 -1
  192. package/dist/esm/components/shell.context.d.ts +1 -45
  193. package/dist/esm/components/shell.context.d.ts.map +1 -1
  194. package/dist/esm/components/shell.context.js +1 -1
  195. package/dist/esm/components/shell.d.ts +7 -37
  196. package/dist/esm/components/shell.d.ts.map +1 -1
  197. package/dist/esm/components/shell.js +1 -1
  198. package/dist/esm/components/shell.types.d.ts +6 -27
  199. package/dist/esm/components/shell.types.d.ts.map +1 -1
  200. package/dist/esm/components/shell.types.js +1 -1
  201. package/dist/esm/components/sidebar.js +1 -1
  202. package/dist/esm/components/toolbar.js +1 -1
  203. package/dist/esm/components/virtual-menu.js +1 -1
  204. package/dist/esm/hooks/use-breakpoint.js +1 -1
  205. package/dist/esm/index.js +1 -1
  206. package/dist/esm/props/index.js +1 -1
  207. package/package.json +1 -1
  208. package/schemas/index.json +13 -335
  209. package/schemas/shell-bottom.json +2 -63
  210. package/schemas/shell-inspector.json +2 -63
  211. package/schemas/shell-panel.json +2 -63
  212. package/schemas/shell-rail.json +2 -38
  213. package/schemas/shell-sidebar.json +5 -102
  214. package/schemas/shell-trigger.json +0 -6
  215. package/src/components/_internal/shell-bottom.tsx +6 -26
  216. package/src/components/_internal/shell-handles.tsx +2 -32
  217. package/src/components/_internal/shell-inspector.tsx +6 -26
  218. package/src/components/_internal/shell-pane.tsx +7 -56
  219. package/src/components/_internal/shell-resizable.tsx +6 -81
  220. package/src/components/_internal/shell-resize.tsx +0 -4
  221. package/src/components/_internal/shell-rest.ts +2 -11
  222. package/src/components/_internal/shell-sidebar.tsx +8 -30
  223. package/src/components/_internal/shell-store.tsx +1 -34
  224. package/src/components/accordion.props.tsx +2 -4
  225. package/src/components/checkbox-group.primitive.tsx +0 -12
  226. package/src/components/context-menu.tsx +1 -6
  227. package/src/components/schemas/index.ts +0 -1
  228. package/src/components/schemas/shell.schema.ts +3 -20
  229. package/src/components/shell.context.tsx +5 -112
  230. package/src/components/shell.css +1 -29
  231. package/src/components/shell.tsx +12 -97
  232. package/src/components/shell.types.ts +6 -28
  233. package/styles.css +0 -20
  234. package/dist/cjs/components/shell.hooks.d.ts +0 -10
  235. package/dist/cjs/components/shell.hooks.d.ts.map +0 -1
  236. package/dist/cjs/components/shell.hooks.js +0 -3
  237. package/dist/cjs/components/shell.hooks.js.map +0 -7
  238. package/dist/esm/chunk-2VSRZ4IT.js +0 -3
  239. package/dist/esm/chunk-2VSRZ4IT.js.map +0 -7
  240. package/dist/esm/chunk-2WFN4D52.js +0 -3
  241. package/dist/esm/chunk-2WFN4D52.js.map +0 -7
  242. package/dist/esm/chunk-4OJRLS5N.js +0 -3
  243. package/dist/esm/chunk-4OJRLS5N.js.map +0 -7
  244. package/dist/esm/chunk-4TTRPCGG.js +0 -3
  245. package/dist/esm/chunk-4TTRPCGG.js.map +0 -7
  246. package/dist/esm/chunk-5BXCPANF.js +0 -3
  247. package/dist/esm/chunk-ASBTPKH3.js +0 -3
  248. package/dist/esm/chunk-B447PNRD.js +0 -3
  249. package/dist/esm/chunk-B447PNRD.js.map +0 -7
  250. package/dist/esm/chunk-BJVXB3PN.js +0 -3
  251. package/dist/esm/chunk-BJVXB3PN.js.map +0 -7
  252. package/dist/esm/chunk-DNY4WWZF.js +0 -3
  253. package/dist/esm/chunk-DNY4WWZF.js.map +0 -7
  254. package/dist/esm/chunk-HQT32HQ6.js +0 -3
  255. package/dist/esm/chunk-HQT32HQ6.js.map +0 -7
  256. package/dist/esm/chunk-I77CYEBT.js +0 -2
  257. package/dist/esm/chunk-I77CYEBT.js.map +0 -7
  258. package/dist/esm/chunk-KGCGT4MJ.js +0 -3
  259. package/dist/esm/chunk-KGCGT4MJ.js.map +0 -7
  260. package/dist/esm/chunk-M26LLCQC.js +0 -3
  261. package/dist/esm/chunk-M26LLCQC.js.map +0 -7
  262. package/dist/esm/chunk-MAA6LEE2.js.map +0 -7
  263. package/dist/esm/chunk-MXEOE4LA.js +0 -3
  264. package/dist/esm/chunk-TS4QCDSI.js +0 -3
  265. package/dist/esm/chunk-TS4QCDSI.js.map +0 -7
  266. package/dist/esm/chunk-XOAOSRTH.js +0 -3
  267. package/dist/esm/chunk-XOAOSRTH.js.map +0 -7
  268. package/dist/esm/chunk-XUCR7L4G.js +0 -3
  269. package/dist/esm/chunk-XUCR7L4G.js.map +0 -7
  270. package/dist/esm/components/shell.hooks.d.ts +0 -10
  271. package/dist/esm/components/shell.hooks.d.ts.map +0 -1
  272. package/dist/esm/components/shell.hooks.js +0 -3
  273. package/dist/esm/components/shell.hooks.js.map +0 -7
  274. package/src/components/shell.hooks.ts +0 -20
  275. /package/dist/esm/{chunk-5RLGDXOM.js.map → chunk-2K46JPUL.js.map} +0 -0
  276. /package/dist/esm/{chunk-IN6D33TU.js.map → chunk-5XO3PLDH.js.map} +0 -0
  277. /package/dist/esm/{chunk-COLJWVN7.js.map → chunk-AQR42GKA.js.map} +0 -0
  278. /package/dist/esm/{chunk-FTNZWAPB.js.map → chunk-ARPUPT4M.js.map} +0 -0
  279. /package/dist/esm/{chunk-ISCZ57VL.js.map → chunk-DJGZ4K3V.js.map} +0 -0
  280. /package/dist/esm/{chunk-PMXIQ5B4.js.map → chunk-FKCKELUB.js.map} +0 -0
  281. /package/dist/esm/{chunk-E6MOZSYV.js.map → chunk-HNOT2HS4.js.map} +0 -0
  282. /package/dist/esm/{chunk-EB4AG3OL.js.map → chunk-REELD6CT.js.map} +0 -0
  283. /package/dist/esm/{chunk-3M5ZM67R.js.map → chunk-TCFBNE6A.js.map} +0 -0
  284. /package/dist/esm/{chunk-G66WDIIV.js.map → chunk-WJKCXGVN.js.map} +0 -0
  285. /package/dist/esm/{chunk-SIYOLE6P.js.map → chunk-YM47BXKK.js.map} +0 -0
@@ -70,22 +70,14 @@ export type ShellStore = {
70
70
  * it, would be a new identity on every read.
71
71
  */
72
72
  version: number;
73
- /** The pane a hovered Trigger is previewing, if any. Layout only. */
74
- peek: PaneName | null;
75
73
  };
76
74
  export declare function createShellStore(): ShellStore;
77
75
  export declare function notifyShellStore(store: ShellStore): void;
78
76
  export declare function subscribeShellStore(store: ShellStore, listener: () => void): () => void;
79
- export declare function setShellPeek(store: ShellStore, peek: PaneName | null): void;
80
77
  export declare const ShellStoreContext: React.Context<ShellStore | null>;
81
78
  export declare function useShellStore(part: string): ShellStore;
82
79
  /** One pane's registry entry. Re-renders only when that entry is replaced. */
83
80
  export declare function usePaneEntry(store: ShellStore, name: PaneName): PaneEntry | undefined;
84
- /**
85
- * Whether this pane is the one being previewed. A boolean per pane rather than
86
- * the peek target itself, so hovering one Trigger re-renders one pane, not all.
87
- */
88
- export declare function usePeeking(store: ShellStore, name: PaneName): boolean;
89
81
  export type FramePaneId = 'rail' | 'panel' | 'sidebar' | 'content' | 'inspector' | 'bottom';
90
82
  export declare const ShellFrameContext: React.Context<{
91
83
  registerOffFrame: (id: FramePaneId) => void;
@@ -93,7 +85,5 @@ export declare const ShellFrameContext: React.Context<{
93
85
  } | null>;
94
86
  /** Tells the Root a pane is off the frame (`flush={false}`); the Rail's card moves a floating Panel over. */
95
87
  export declare function useFrameRegistration(id: FramePaneId, flush: boolean): void;
96
- /** A deprecation warning, once per message per page load. Development only. */
97
- export declare function warnOnce(message: string): void;
98
88
  export {};
99
89
  //# sourceMappingURL=shell-store.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"shell-store.d.ts","sourceRoot":"","sources":["../../../../src/components/_internal/shell-store.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAIjF,MAAM,MAAM,KAAK,CAAC,CAAC,IAAI,MAAM,CAAC,UAAU,EAA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gB,YAAY,CAAC,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,GAAG,SAAS,GAAG,SAAS,CAIrF;AAID,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,CAAC;AAE5F,eAAO,MAAM,iBAAiB;sBACV,CAAC,EAAE,EAAE,WAAW,KAAK,IAAI;wBACvB,CAAC,EAAE,EAAE,WAAW,KAAK,IAAI;SAChC,CAAC;AAEhB,6GAA6G;AAC7G,wBAAgB,oBAAoB,CAAC,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,OAAO,QASnE"}
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- "use strict";"use client";var y=Object.create;var a=Object.defineProperty;var R=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var h=Object.getPrototypeOf,T=Object.prototype.hasOwnProperty;var v=(e,n)=>{for(var t in n)a(e,t,{get:n[t],enumerable:!0})},d=(e,n,t,o)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of g(n))!T.call(e,r)&&r!==t&&a(e,r,{get:()=>n[r],enumerable:!(o=R(n,r))||o.enumerable});return e};var E=(e,n,t)=>(t=e!=null?y(h(e)):{},d(n||!e||!e.__esModule?a(t,"default",{value:e,enumerable:!0}):t,e)),k=e=>d(a({},"__esModule",{value:!0}),e);var L={};v(L,{FIXED_TABLE:()=>O,ShellFrameContext:()=>b,ShellStoreContext:()=>P,constantOf:()=>m,createShellStore:()=>N,notifyShellStore:()=>S,setShellPeek:()=>z,subscribeShellStore:()=>l,tableAttributes:()=>C,tableOf:()=>f,useFrameRegistration:()=>M,usePaneEntry:()=>B,usePeeking:()=>I,useShellStore:()=>V,useStableKey:()=>w,warnOnce:()=>F});module.exports=k(L);var i=E(require("react")),x=require("radix-ui/internal");var s=["initial","xs","sm","md","lg","xl"];function u(e){return typeof e=="object"&&e!==null}function f(e,n){let t={},o=null;for(let r of s){if(e!==void 0&&!u(e)){t[r]=e;continue}let p=u(e)?e[r]:void 0;p!==void 0&&(o={value:p}),t[r]=o?o.value:n(r)}return t}function m(e){let n=e.initial;return s.every(t=>e[t]===n)?n:void 0}function C(e,n){let t=m(n);if(t!==void 0)return{[`data-${e}`]:t};let o={};for(let r of s)o[`data-${e}-${r}`]=n[r];return o}function w(e){return typeof e=="object"&&e!==null?JSON.stringify(e):String(e)}var O=f("fixed",()=>"fixed");function N(){return{entries:new Map,listeners:new Set,version:0,peek:null}}function S(e){e.version+=1;for(let n of e.listeners)n()}function l(e,n){return e.listeners.add(n),()=>{e.listeners.delete(n)}}function z(e,n){e.peek!==n&&(e.peek=n,S(e))}var P=i.createContext(null);function V(e){let n=i.useContext(P);if(!n)throw new Error(`${e} must be used within <Shell.Root>`);return n}function B(e,n){let t=i.useCallback(r=>l(e,r),[e]),o=i.useCallback(()=>e.entries.get(n),[e,n]);return i.useSyncExternalStore(t,o,()=>{})}function I(e,n){let t=i.useCallback(o=>l(e,o),[e]);return i.useSyncExternalStore(t,()=>e.peek===n,()=>!1)}var b=i.createContext(null);function M(e,n){let t=i.useContext(b);if(!t)throw new Error("Shell panes must be used within <Shell.Root>");let{registerOffFrame:o,unregisterOffFrame:r}=t;(0,x.useLayoutEffect)(()=>{if(!n)return o(e),()=>r(e)},[e,n,o,r])}var c=new Set;function F(e){}
2
+ "use strict";"use client";var P=Object.create;var a=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var R=Object.getPrototypeOf,g=Object.prototype.hasOwnProperty;var T=(e,t)=>{for(var n in t)a(e,n,{get:t[n],enumerable:!0})},p=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of y(t))!g.call(e,r)&&r!==n&&a(e,r,{get:()=>t[r],enumerable:!(o=b(t,r))||o.enumerable});return e};var h=(e,t,n)=>(n=e!=null?P(R(e)):{},p(t||!e||!e.__esModule?a(n,"default",{value:e,enumerable:!0}):n,e)),v=e=>p(a({},"__esModule",{value:!0}),e);var M={};T(M,{FIXED_TABLE:()=>O,ShellFrameContext:()=>S,ShellStoreContext:()=>m,constantOf:()=>x,createShellStore:()=>w,notifyShellStore:()=>k,subscribeShellStore:()=>f,tableAttributes:()=>C,tableOf:()=>c,useFrameRegistration:()=>I,usePaneEntry:()=>V,useShellStore:()=>B,useStableKey:()=>E});module.exports=v(M);var i=h(require("react")),u=require("radix-ui/internal");var s=["initial","xs","sm","md","lg","xl"];function d(e){return typeof e=="object"&&e!==null}function c(e,t){let n={},o=null;for(let r of s){if(e!==void 0&&!d(e)){n[r]=e;continue}let l=d(e)?e[r]:void 0;l!==void 0&&(o={value:l}),n[r]=o?o.value:t(r)}return n}function x(e){let t=e.initial;return s.every(n=>e[n]===t)?t:void 0}function C(e,t){let n=x(t);if(n!==void 0)return{[`data-${e}`]:n};let o={};for(let r of s)o[`data-${e}-${r}`]=t[r];return o}function E(e){return typeof e=="object"&&e!==null?JSON.stringify(e):String(e)}var O=c("fixed",()=>"fixed");function w(){return{entries:new Map,listeners:new Set,version:0}}function k(e){e.version+=1;for(let t of e.listeners)t()}function f(e,t){return e.listeners.add(t),()=>{e.listeners.delete(t)}}var m=i.createContext(null);function B(e){let t=i.useContext(m);if(!t)throw new Error(`${e} must be used within <Shell.Root>`);return t}function V(e,t){let n=i.useCallback(r=>f(e,r),[e]),o=i.useCallback(()=>e.entries.get(t),[e,t]);return i.useSyncExternalStore(n,o,()=>{})}var S=i.createContext(null);function I(e,t){let n=i.useContext(S);if(!n)throw new Error("Shell panes must be used within <Shell.Root>");let{registerOffFrame:o,unregisterOffFrame:r}=n;(0,u.useLayoutEffect)(()=>{if(!t)return o(e),()=>r(e)},[e,t,o,r])}
3
3
  //# sourceMappingURL=shell-store.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/components/_internal/shell-store.tsx", "../../../../src/components/shell.types.ts"],
4
- "sourcesContent": ["'use client';\n\n/**\n * The Shell's state model (0.8.0), ported from kookie-ui-v2's Shell.\n *\n * - State lives on the pane. Each pane holds `auto | open | closed`.\n * `auto` means untouched: the stylesheet decides what\n * it shows at each breakpoint, so first paint is right with no script, the\n * server and the client render the same markup, and no open-state callback\n * can fire on mount or on a resize.\n * - The one thing that crosses the Shell is a registry keyed by pane name.\n * Each pane registers what it is and how to drive it; a Trigger looks its\n * pane up, and the Root reads the set of live overlays. Nothing scans\n * children and nothing checks `displayName`.\n * - The responsive props are resolved into a table with one value per\n * breakpoint, from the props alone, with no window. The table is written to\n * the DOM as data attributes for the stylesheet, and read again in JS by the\n * mirror that sets `aria-expanded`. One table, two readers, so they agree by\n * construction.\n */\nimport * as React from 'react';\nimport { useLayoutEffect } from 'radix-ui/internal';\nimport { SHELL_BREAKPOINTS } from '../shell.types.js';\nimport type { Breakpoint, PaneName, PresentationValue } from '../shell.types.js';\n\n/* \u2500\u2500 Breakpoint tables \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\nexport type Table<T> = Record<Breakpoint, T>;\n\n/** What a pane shows: open or closed. */\nexport type PaneValue = 'open' | 'closed';\n\ntype ResponsiveInput<T> = T | Partial<Record<Breakpoint, T>> | undefined;\n\nfunction isMap<T>(value: ResponsiveInput<T>): value is Partial<Record<Breakpoint, T>> {\n return typeof value === 'object' && value !== null;\n}\n\n/**\n * A responsive value at every breakpoint. A breakpoint takes the largest key\n * at or below it, the same fallback `useResponsiveValue` used; a breakpoint\n * below every key takes `fallback`.\n */\nexport function tableOf<T>(value: ResponsiveInput<T>, fallback: (bp: Breakpoint) => T): Table<T> {\n const table = {} as Table<T>;\n let carried: { value: T } | null = null;\n for (const bp of SHELL_BREAKPOINTS) {\n if (value !== undefined && !isMap(value)) {\n table[bp] = value;\n continue;\n }\n const entry = isMap(value) ? value[bp] : undefined;\n if (entry !== undefined) carried = { value: entry };\n table[bp] = carried ? carried.value : fallback(bp);\n }\n return table;\n}\n\n/** The table's one value, when it has only one. */\nexport function constantOf<T>(table: Table<T>): T | undefined {\n const first = table.initial;\n return SHELL_BREAKPOINTS.every((bp) => table[bp] === first) ? first : undefined;\n}\n\n/**\n * The table as data attributes: `data-<name>` when it holds one value, one\n * `data-<name>-<bp>` per breakpoint when it holds several. The stylesheet has\n * a rule for each spelling.\n */\nexport function tableAttributes(name: string, table: Table<string>): Record<string, string> {\n const constant = constantOf(table);\n if (constant !== undefined) return { [`data-${name}`]: constant };\n const attributes: Record<string, string> = {};\n for (const bp of SHELL_BREAKPOINTS) attributes[`data-${name}-${bp}`] = table[bp];\n return attributes;\n}\n\n/**\n * A responsive prop object is usually an inline literal, a new identity every\n * render. Keying memoisation on its contents keeps the tables, and so the\n * registry entries, stable across renders that change nothing.\n */\nexport function useStableKey(value: unknown): string {\n return typeof value === 'object' && value !== null ? JSON.stringify(value) : String(value);\n}\n\nexport const FIXED_TABLE: Table<PresentationValue> = tableOf<PresentationValue>('fixed', () => 'fixed');\n\n/* \u2500\u2500 The registry \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\nexport type OpenChangeReason = 'toggle' | 'dismiss';\n\nexport type PaneEntry = {\n name: PaneName;\n id: string;\n el: HTMLElement | null;\n /** What the pane shows now; `undefined` while an untouched pane cannot know (before the breakpoint is known). */\n value: PaneValue | undefined;\n /** How the pane is presented now, when known. */\n presentation: PresentationValue | undefined;\n /** The pane's own presentation at every breakpoint. A Panel with none of its own follows the Rail's. */\n presentationTable: Table<PresentationValue>;\n /** Open and presented as an overlay: what the scrim and Escape close, and what containment exempts. */\n overlayLive: boolean;\n /** The pane's designed open width, for panes that sit beside it when floating. */\n size: number;\n setValue: (value: PaneValue, reason: OpenChangeReason) => void;\n toggle: (reason: OpenChangeReason) => void;\n};\n\nexport type ShellStore = {\n entries: Map<PaneName, PaneEntry>;\n listeners: Set<() => void>;\n /**\n * What a subscriber reads. useSyncExternalStore needs a value that is stable\n * between notifications, and a number is; the Map, or anything derived from\n * it, would be a new identity on every read.\n */\n version: number;\n /** The pane a hovered Trigger is previewing, if any. Layout only. */\n peek: PaneName | null;\n};\n\nexport function createShellStore(): ShellStore {\n return { entries: new Map(), listeners: new Set(), version: 0, peek: null };\n}\n\nexport function notifyShellStore(store: ShellStore) {\n store.version += 1;\n for (const listener of store.listeners) listener();\n}\n\nexport function subscribeShellStore(store: ShellStore, listener: () => void) {\n store.listeners.add(listener);\n return () => {\n store.listeners.delete(listener);\n };\n}\n\nexport function setShellPeek(store: ShellStore, peek: PaneName | null) {\n if (store.peek === peek) return;\n store.peek = peek;\n notifyShellStore(store);\n}\n\nexport const ShellStoreContext = React.createContext<ShellStore | null>(null);\n\nexport function useShellStore(part: string): ShellStore {\n const store = React.useContext(ShellStoreContext);\n if (!store) throw new Error(`${part} must be used within <Shell.Root>`);\n return store;\n}\n\n/** One pane's registry entry. Re-renders only when that entry is replaced. */\nexport function usePaneEntry(store: ShellStore, name: PaneName): PaneEntry | undefined {\n const subscribe = React.useCallback((listener: () => void) => subscribeShellStore(store, listener), [store]);\n const getSnapshot = React.useCallback(() => store.entries.get(name), [store, name]);\n return React.useSyncExternalStore(subscribe, getSnapshot, () => undefined);\n}\n\n/**\n * Whether this pane is the one being previewed. A boolean per pane rather than\n * the peek target itself, so hovering one Trigger re-renders one pane, not all.\n */\nexport function usePeeking(store: ShellStore, name: PaneName): boolean {\n const subscribe = React.useCallback((listener: () => void) => subscribeShellStore(store, listener), [store]);\n return React.useSyncExternalStore(\n subscribe,\n () => store.peek === name,\n () => false,\n );\n}\n\n/* \u2500\u2500 Off the frame \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\nexport type FramePaneId = 'rail' | 'panel' | 'sidebar' | 'content' | 'inspector' | 'bottom';\n\nexport const ShellFrameContext = React.createContext<{\n registerOffFrame: (id: FramePaneId) => void;\n unregisterOffFrame: (id: FramePaneId) => void;\n} | null>(null);\n\n/** Tells the Root a pane is off the frame (`flush={false}`); the Rail's card moves a floating Panel over. */\nexport function useFrameRegistration(id: FramePaneId, flush: boolean) {\n const ctx = React.useContext(ShellFrameContext);\n if (!ctx) throw new Error('Shell panes must be used within <Shell.Root>');\n const { registerOffFrame, unregisterOffFrame } = ctx;\n useLayoutEffect(() => {\n if (flush) return;\n registerOffFrame(id);\n return () => unregisterOffFrame(id);\n }, [id, flush, registerOffFrame, unregisterOffFrame]);\n}\n\n/* \u2500\u2500 Development warnings \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\nconst warned = new Set<string>();\n\n/** A deprecation warning, once per message per page load. Development only. */\nexport function warnOnce(message: string) {\n if (process.env.NODE_ENV === 'production') return;\n if (warned.has(message)) return;\n warned.add(message);\n console.warn(`[kookie-ui] ${message}`);\n}\n", "import type * as React from 'react';\n\nexport type PresentationValue = 'fixed' | 'overlay' | 'stacked';\n\nexport type ResponsivePresentation = PresentationValue | Partial<Record<'initial' | 'xs' | 'sm' | 'md' | 'lg' | 'xl', PresentationValue>>;\n\nexport type PaneMode = 'expanded' | 'collapsed';\nexport type SidebarMode = 'collapsed' | 'expanded';\n\nexport type ResponsiveMode = PaneMode | Partial<Record<'initial' | 'xs' | 'sm' | 'md' | 'lg' | 'xl', PaneMode>>;\n\nexport type ResponsiveSidebarMode = SidebarMode | Partial<Record<'initial' | 'xs' | 'sm' | 'md' | 'lg' | 'xl', SidebarMode>>;\n\nexport type Responsive<T> = T | Partial<Record<'initial' | 'xs' | 'sm' | 'md' | 'lg' | 'xl', T>>;\n\nexport type PaneSizePersistence = {\n load?: () => number | Promise<number | undefined> | undefined;\n save?: (size: number) => void | Promise<void>;\n};\n\n/**\n * Why a pane's open state changed. Since 0.8.0 only a user action is reported:\n * `toggle` for a Trigger, a handle double-click or a drag past\n * `collapseThreshold`, and `dismiss` for Escape or a press on the scrim.\n * `init`, `responsive`, `panel` and `left` are kept in the types for\n * compatibility and are never sent.\n */\nexport type PaneOpenChangeReason = 'toggle' | 'dismiss' | 'init' | 'responsive';\n\nexport interface PaneBaseProps extends React.ComponentPropsWithoutRef<'div'> {\n presentation?: ResponsivePresentation;\n expandedSize?: number;\n minSize?: number;\n maxSize?: number;\n resizable?: boolean;\n collapsible?: boolean;\n /** @deprecated Use `onOpenChange`. Still called when a user's toggle or a controlled prop changes whether the pane is shown; never on mount or when the window crosses a breakpoint. */\n onExpand?: () => void;\n /** @deprecated Use `onOpenChange`. Still called when a user's toggle or a controlled prop changes whether the pane is shown; never on mount or when the window crosses a breakpoint. */\n onCollapse?: () => void;\n onResize?: (size: number) => void;\n onResizeStart?: (size: number) => void;\n onResizeEnd?: (size: number) => void;\n /** @deprecated Removed in 1.0. Snap in your own `onSizeChange` and pass `size`. */\n snapPoints?: number[];\n /** @deprecated Removed in 1.0, with `snapPoints`. */\n snapTolerance?: number;\n /** @deprecated Removed in 1.0. Close the pane from your own `onResizeEnd`. */\n collapseThreshold?: number;\n /** @deprecated Removed in 1.0. Keep the size in your own state with `size`/`onSizeChange`. */\n paneId?: string;\n /** @deprecated Removed in 1.0. Keep the size in your own state with `size`/`onSizeChange`. */\n persistence?: PaneSizePersistence;\n}\n\nexport const _BREAKPOINTS = {\n xs: '(min-width: 520px)',\n sm: '(min-width: 768px)',\n md: '(min-width: 1024px)',\n lg: '(min-width: 1280px)',\n xl: '(min-width: 1640px)',\n} as const;\n\nexport type Breakpoint = 'initial' | keyof typeof _BREAKPOINTS;\n\n/** Every breakpoint, smallest first. The stylesheet's @media blocks follow this order. */\nexport const SHELL_BREAKPOINTS: readonly Breakpoint[] = ['initial', 'xs', 'sm', 'md', 'lg', 'xl'];\n\nexport type PaneTarget = 'left' | 'rail' | 'panel' | 'sidebar' | 'inspector' | 'bottom';\n\n/** The panes a Trigger can drive. `left` is the deprecated name for `rail`. */\nexport type PaneName = Exclude<PaneTarget, 'left'>;\n\n/**\n * CSS custom property key type for type-safe style objects.\n * Allows any string prefixed with '--'.\n */\nexport type CSSCustomProperty = `--${string}`;\n\n/**\n * Style object that supports CSS custom properties.\n */\nexport type CSSPropertiesWithVars = React.CSSProperties & {\n [key: CSSCustomProperty]: string | number | undefined;\n};\n"],
5
- "mappings": ";ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,iBAAAE,EAAA,sBAAAC,EAAA,sBAAAC,EAAA,eAAAC,EAAA,qBAAAC,EAAA,qBAAAC,EAAA,iBAAAC,EAAA,wBAAAC,EAAA,oBAAAC,EAAA,YAAAC,EAAA,yBAAAC,EAAA,iBAAAC,EAAA,eAAAC,EAAA,kBAAAC,EAAA,iBAAAC,EAAA,aAAAC,IAAA,eAAAC,EAA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E,EAAiBH,CAAE,EACZ,IAAMI,EAAmBJ,CAAE,CACpC,EAAG,CAACA,EAAIC,EAAOE,EAAkBC,CAAkB,CAAC,CACtD,CAIA,IAAMC,EAAS,IAAI,IAGZ,SAASC,EAASC,EAAiB,CAK1C",
6
- "names": ["shell_store_exports", "__export", "FIXED_TABLE", "ShellFrameContext", "ShellStoreContext", "constantOf", "createShellStore", "notifyShellStore", "setShellPeek", "subscribeShellStore", "tableAttributes", "tableOf", "useFrameRegistration", "usePaneEntry", "usePeeking", "useShellStore", "useStableKey", "warnOnce", "__toCommonJS", "React", "import_internal", "SHELL_BREAKPOINTS", "isMap", "value", "tableOf", "fallback", "table", "carried", "bp", "SHELL_BREAKPOINTS", "entry", "constantOf", "first", "tableAttributes", "name", "constant", "attributes", "useStableKey", "FIXED_TABLE", "createShellStore", "notifyShellStore", "store", "listener", "subscribeShellStore", "setShellPeek", "peek", "ShellStoreContext", "useShellStore", "part", "usePaneEntry", "subscribe", "getSnapshot", "usePeeking", "ShellFrameContext", "useFrameRegistration", "id", "flush", "ctx", "registerOffFrame", "unregisterOffFrame", "warned", "warnOnce", "message"]
4
+ "sourcesContent": ["'use client';\n\n/**\n * The Shell's state model (0.8.0), ported from kookie-ui-v2's Shell.\n *\n * - State lives on the pane. Each pane holds `auto | open | closed`.\n * `auto` means untouched: the stylesheet decides what\n * it shows at each breakpoint, so first paint is right with no script, the\n * server and the client render the same markup, and no open-state callback\n * can fire on mount or on a resize.\n * - The one thing that crosses the Shell is a registry keyed by pane name.\n * Each pane registers what it is and how to drive it; a Trigger looks its\n * pane up, and the Root reads the set of live overlays. Nothing scans\n * children and nothing checks `displayName`.\n * - The responsive props are resolved into a table with one value per\n * breakpoint, from the props alone, with no window. The table is written to\n * the DOM as data attributes for the stylesheet, and read again in JS by the\n * mirror that sets `aria-expanded`. One table, two readers, so they agree by\n * construction.\n */\nimport * as React from 'react';\nimport { useLayoutEffect } from 'radix-ui/internal';\nimport { SHELL_BREAKPOINTS } from '../shell.types.js';\nimport type { Breakpoint, PaneName, PresentationValue } from '../shell.types.js';\n\n/* \u2500\u2500 Breakpoint tables \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\nexport type Table<T> = Record<Breakpoint, T>;\n\n/** What a pane shows: open or closed. */\nexport type PaneValue = 'open' | 'closed';\n\ntype ResponsiveInput<T> = T | Partial<Record<Breakpoint, T>> | undefined;\n\nfunction isMap<T>(value: ResponsiveInput<T>): value is Partial<Record<Breakpoint, T>> {\n return typeof value === 'object' && value !== null;\n}\n\n/**\n * A responsive value at every breakpoint. A breakpoint takes the largest key\n * at or below it, the same fallback `useResponsiveValue` used; a breakpoint\n * below every key takes `fallback`.\n */\nexport function tableOf<T>(value: ResponsiveInput<T>, fallback: (bp: Breakpoint) => T): Table<T> {\n const table = {} as Table<T>;\n let carried: { value: T } | null = null;\n for (const bp of SHELL_BREAKPOINTS) {\n if (value !== undefined && !isMap(value)) {\n table[bp] = value;\n continue;\n }\n const entry = isMap(value) ? value[bp] : undefined;\n if (entry !== undefined) carried = { value: entry };\n table[bp] = carried ? carried.value : fallback(bp);\n }\n return table;\n}\n\n/** The table's one value, when it has only one. */\nexport function constantOf<T>(table: Table<T>): T | undefined {\n const first = table.initial;\n return SHELL_BREAKPOINTS.every((bp) => table[bp] === first) ? first : undefined;\n}\n\n/**\n * The table as data attributes: `data-<name>` when it holds one value, one\n * `data-<name>-<bp>` per breakpoint when it holds several. The stylesheet has\n * a rule for each spelling.\n */\nexport function tableAttributes(name: string, table: Table<string>): Record<string, string> {\n const constant = constantOf(table);\n if (constant !== undefined) return { [`data-${name}`]: constant };\n const attributes: Record<string, string> = {};\n for (const bp of SHELL_BREAKPOINTS) attributes[`data-${name}-${bp}`] = table[bp];\n return attributes;\n}\n\n/**\n * A responsive prop object is usually an inline literal, a new identity every\n * render. Keying memoisation on its contents keeps the tables, and so the\n * registry entries, stable across renders that change nothing.\n */\nexport function useStableKey(value: unknown): string {\n return typeof value === 'object' && value !== null ? JSON.stringify(value) : String(value);\n}\n\nexport const FIXED_TABLE: Table<PresentationValue> = tableOf<PresentationValue>('fixed', () => 'fixed');\n\n/* \u2500\u2500 The registry \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\nexport type OpenChangeReason = 'toggle' | 'dismiss';\n\nexport type PaneEntry = {\n name: PaneName;\n id: string;\n el: HTMLElement | null;\n /** What the pane shows now; `undefined` while an untouched pane cannot know (before the breakpoint is known). */\n value: PaneValue | undefined;\n /** How the pane is presented now, when known. */\n presentation: PresentationValue | undefined;\n /** The pane's own presentation at every breakpoint. A Panel with none of its own follows the Rail's. */\n presentationTable: Table<PresentationValue>;\n /** Open and presented as an overlay: what the scrim and Escape close, and what containment exempts. */\n overlayLive: boolean;\n /** The pane's designed open width, for panes that sit beside it when floating. */\n size: number;\n setValue: (value: PaneValue, reason: OpenChangeReason) => void;\n toggle: (reason: OpenChangeReason) => void;\n};\n\nexport type ShellStore = {\n entries: Map<PaneName, PaneEntry>;\n listeners: Set<() => void>;\n /**\n * What a subscriber reads. useSyncExternalStore needs a value that is stable\n * between notifications, and a number is; the Map, or anything derived from\n * it, would be a new identity on every read.\n */\n version: number;\n};\n\nexport function createShellStore(): ShellStore {\n return { entries: new Map(), listeners: new Set(), version: 0 };\n}\n\nexport function notifyShellStore(store: ShellStore) {\n store.version += 1;\n for (const listener of store.listeners) listener();\n}\n\nexport function subscribeShellStore(store: ShellStore, listener: () => void) {\n store.listeners.add(listener);\n return () => {\n store.listeners.delete(listener);\n };\n}\n\nexport const ShellStoreContext = React.createContext<ShellStore | null>(null);\n\nexport function useShellStore(part: string): ShellStore {\n const store = React.useContext(ShellStoreContext);\n if (!store) throw new Error(`${part} must be used within <Shell.Root>`);\n return store;\n}\n\n/** One pane's registry entry. Re-renders only when that entry is replaced. */\nexport function usePaneEntry(store: ShellStore, name: PaneName): PaneEntry | undefined {\n const subscribe = React.useCallback((listener: () => void) => subscribeShellStore(store, listener), [store]);\n const getSnapshot = React.useCallback(() => store.entries.get(name), [store, name]);\n return React.useSyncExternalStore(subscribe, getSnapshot, () => undefined);\n}\n\n/* \u2500\u2500 Off the frame \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\nexport type FramePaneId = 'rail' | 'panel' | 'sidebar' | 'content' | 'inspector' | 'bottom';\n\nexport const ShellFrameContext = React.createContext<{\n registerOffFrame: (id: FramePaneId) => void;\n unregisterOffFrame: (id: FramePaneId) => void;\n} | null>(null);\n\n/** Tells the Root a pane is off the frame (`flush={false}`); the Rail's card moves a floating Panel over. */\nexport function useFrameRegistration(id: FramePaneId, flush: boolean) {\n const ctx = React.useContext(ShellFrameContext);\n if (!ctx) throw new Error('Shell panes must be used within <Shell.Root>');\n const { registerOffFrame, unregisterOffFrame } = ctx;\n useLayoutEffect(() => {\n if (flush) return;\n registerOffFrame(id);\n return () => unregisterOffFrame(id);\n }, [id, flush, registerOffFrame, unregisterOffFrame]);\n}\n", "import type * as React from 'react';\n\nexport type PresentationValue = 'fixed' | 'overlay' | 'stacked';\n\nexport type ResponsivePresentation = PresentationValue | Partial<Record<'initial' | 'xs' | 'sm' | 'md' | 'lg' | 'xl', PresentationValue>>;\n\nexport type PaneMode = 'expanded' | 'collapsed';\nexport type SidebarMode = 'collapsed' | 'expanded';\n\nexport type ResponsiveMode = PaneMode | Partial<Record<'initial' | 'xs' | 'sm' | 'md' | 'lg' | 'xl', PaneMode>>;\n\nexport type ResponsiveSidebarMode = SidebarMode | Partial<Record<'initial' | 'xs' | 'sm' | 'md' | 'lg' | 'xl', SidebarMode>>;\n\nexport type Responsive<T> = T | Partial<Record<'initial' | 'xs' | 'sm' | 'md' | 'lg' | 'xl', T>>;\n\n/**\n * Why a pane's open state changed. Only a user action is reported: `toggle` for a Trigger or a\n * handle double-click, and `dismiss` for Escape or a press on the scrim.\n */\nexport type PaneOpenChangeReason = 'toggle' | 'dismiss';\n\nexport interface PaneBaseProps extends React.ComponentPropsWithoutRef<'div'> {\n presentation?: ResponsivePresentation;\n expandedSize?: number;\n minSize?: number;\n maxSize?: number;\n resizable?: boolean;\n collapsible?: boolean;\n onResize?: (size: number) => void;\n onResizeStart?: (size: number) => void;\n onResizeEnd?: (size: number) => void;\n}\n\nexport const _BREAKPOINTS = {\n xs: '(min-width: 520px)',\n sm: '(min-width: 768px)',\n md: '(min-width: 1024px)',\n lg: '(min-width: 1280px)',\n xl: '(min-width: 1640px)',\n} as const;\n\nexport type Breakpoint = 'initial' | keyof typeof _BREAKPOINTS;\n\n/** Every breakpoint, smallest first. The stylesheet's @media blocks follow this order. */\nexport const SHELL_BREAKPOINTS: readonly Breakpoint[] = ['initial', 'xs', 'sm', 'md', 'lg', 'xl'];\n\n/** The panes a Trigger can drive. */\nexport type PaneTarget = 'rail' | 'panel' | 'sidebar' | 'inspector' | 'bottom';\n\nexport type PaneName = PaneTarget;\n\n/**\n * CSS custom property key type for type-safe style objects.\n * Allows any string prefixed with '--'.\n */\nexport type CSSCustomProperty = `--${string}`;\n\n/**\n * Style object that supports CSS custom properties.\n */\nexport type CSSPropertiesWithVars = React.CSSProperties & {\n [key: CSSCustomProperty]: string | number | undefined;\n};\n"],
5
+ "mappings": ";ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,iBAAAE,EAAA,sBAAAC,EAAA,sBAAAC,EAAA,eAAAC,EAAA,qBAAAC,EAAA,qBAAAC,EAAA,wBAAAC,EAAA,oBAAAC,EAAA,YAAAC,EAAA,yBAAAC,EAAA,iBAAAC,EAAA,kBAAAC,EAAA,iBAAAC,IAAA,eAAAC,EAAAf,GAoBA,IAAAgB,EAAuB,oBACvBC,EAAgC,6BCuBzB,IAAMC,EAA2C,CAAC,UAAW,KAAM,KAAM,KAAM,KAAM,IAAI,EDVhG,SAASC,EAASC,EAAoE,CACpF,OAAO,OAAOA,GAAU,UAAYA,IAAU,IAChD,CAOO,SAASC,EAAWD,EAA2BE,EAA2C,CAC/F,IAAMC,EAAQ,CAAC,EACXC,EAA+B,KACnC,QAAWC,KAAMC,EAAmB,CAClC,GAAIN,IAAU,QAAa,CAACD,EAAMC,CAAK,EAAG,CACxCG,EAAME,CAAE,EAAIL,EACZ,QACF,CACA,IAAMO,EAAQR,EAAMC,CAAK,EAAIA,EAAMK,CAAE,EAAI,OACrCE,IAAU,SAAWH,EAAU,CAAE,MAAOG,CAAM,GAClDJ,EAAME,CAAE,EAAID,EAAUA,EAAQ,MAAQF,EAASG,CAAE,CACnD,CACA,OAAOF,CACT,CAGO,SAASK,EAAcL,EAAgC,CAC5D,IAAMM,EAAQN,EAAM,QACpB,OAAOG,EAAkB,MAAOD,GAAOF,EAAME,CAAE,IAAMI,CAAK,EAAIA,EAAQ,MACxE,CAOO,SAASC,EAAgBC,EAAcR,EAA8C,CAC1F,IAAMS,EAAWJ,EAAWL,CAAK,EACjC,GAAIS,IAAa,O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AAK,MAAM,IAAI,MAAM,8CAA8C,EACxE,GAAM,CAAE,iBAAAC,EAAkB,mBAAAC,CAAmB,EAAIF,KACjD,mBAAgB,IAAM,CACpB,GAAI,CAAAD,EACJ,OAAAE,EAAiBH,CAAE,EACZ,IAAMI,EAAmBJ,CAAE,CACpC,EAAG,CAACA,EAAIC,EAAOE,EAAkBC,CAAkB,CAAC,CACtD",
6
+ "names": ["shell_store_exports", "__export", "FIXED_TABLE", "ShellFrameContext", "ShellStoreContext", "constantOf", "createShellStore", "notifyShellStore", "subscribeShellStore", "tableAttributes", "tableOf", "useFrameRegistration", "usePaneEntry", "useShellStore", "useStableKey", "__toCommonJS", "React", "import_internal", "SHELL_BREAKPOINTS", "isMap", "value", "tableOf", "fallback", "table", "carried", "bp", "SHELL_BREAKPOINTS", "entry", "constantOf", "first", "tableAttributes", "name", "constant", "attributes", "useStableKey", "FIXED_TABLE", "createShellStore", "notifyShellStore", "store", "listener", "subscribeShellStore", "ShellStoreContext", "useShellStore", "part", "usePaneEntry", "subscribe", "getSnapshot", "ShellFrameContext", "useFrameRegistration", "id", "flush", "ctx", "registerOffFrame", "unregisterOffFrame"]
7
7
  }
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- "use strict";var J=Object.create;var R=Object.defineProperty;var Q=Object.getOwnPropertyDescriptor;var X=Object.getOwnPropertyNames;var ee=Object.getPrototypeOf,oe=Object.prototype.hasOwnProperty;var re=(o,e)=>{for(var r in e)R(o,r,{get:e[r],enumerable:!0})},I=(o,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of X(e))!oe.call(o,i)&&i!==r&&R(o,i,{get:()=>e[i],enumerable:!(n=Q(e,i))||n.enumerable});return o};var v=(o,e,r)=>(r=o!=null?J(ee(o)):{},I(e||!o||!o.__esModule?R(r,"default",{value:o,enumerable:!0}):r,o)),ne=o=>I(R({},"__esModule",{value:!0}),o);var Ae={};re(Ae,{Content:()=>Y,Header:()=>F,Item:()=>Z,Root:()=>_,Trigger:()=>q});module.exports=ne(Ae);var f=v(require("react")),y=v(require("classnames")),h=require("radix-ui");var g={asChild:{type:"boolean"}};var te=["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"];var E={color:{type:"enum",values:te,default:void 0}};var se=["none","small","medium","large","full"],V={radius:{type:"enum",values:se,default:void 0}};var ie=["1","2","3","4"],pe=["raised","soft","surface","outline","ghost"],S={...g,size:{type:"enum",className:"kui-r-size",values:ie,default:"2",responsive:!0},variant:{type:"enum",className:"kui-variant",values:pe,default:"raised"},...E,...V},O={...g},L={...g},z={...g},j={...g};var t=v(require("react")),ae=t.default.forwardRef((o,e)=>t.default.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...o,ref:e},t.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",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"})));ae.displayName="ThickDividerHorizontalIcon";var ce=t.default.forwardRef((o,e)=>t.default.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...o,ref:e},t.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",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"})));ce.displayName="ThickCheckIcon";var T=t.default.forwardRef((o,e)=>t.default.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...o,ref:e},t.default.createElement("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"})));T.displayName="ChevronDownIcon";var le=t.default.forwardRef((o,e)=>t.default.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...o,ref:e},t.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",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"})));le.displayName="ThickChevronRightIcon";var de=t.default.forwardRef((o,e)=>t.default.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...o,ref:e},t.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",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"})));de.displayName="ThickChevronLeftIcon";var fe=t.default.forwardRef((o,e)=>t.default.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...o,ref:e},t.default.createElement("circle",{cx:"4.5",cy:"4.5",r:"2"})));fe.displayName="ThickDotIcon";var ue=t.default.forwardRef((o,e)=>t.default.createElement("svg",{...o,ref:e,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"},t.default.createElement("path",{d:"M18 6 6 18"}),t.default.createElement("path",{d:"m6 6 12 12"})));ue.displayName="CloseIcon";var me=t.default.forwardRef((o,e)=>t.default.createElement("svg",{...o,ref:e,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"},t.default.createElement("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"})));me.displayName="PaperclipIcon";var ge=t.default.forwardRef((o,e)=>t.default.createElement("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"},t.default.createElement("path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"}),t.default.createElement("path",{d:"M14 2v4a2 2 0 0 0 2 2h4"})));ge.displayName="FileIcon";var Pe=t.default.forwardRef((o,e)=>t.default.createElement("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"},t.default.createElement("path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"}),t.default.createElement("path",{d:"M14 2v4a2 2 0 0 0 2 2h4"}),t.default.createElement("path",{d:"M10 9H8"}),t.default.createElement("path",{d:"M16 13H8"}),t.default.createElement("path",{d:"M16 17H8"})));Pe.displayName="FileTextIcon";var ye=t.default.forwardRef((o,e)=>t.default.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...o,ref:e},t.default.createElement("path",{d:"M5 12.75L9.5 17.25L19 7.25",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})));ye.displayName="TickIcon";var C=require("radix-ui"),je=C.Slot.Root,He=C.Slot.Root,H=C.Slot.Slottable;var $=v(require("classnames"));var he=[],ve=new Set;function Re(o){let e=Object.assign({},...o),r=[],n=[],i=new Set;for(let a in e){let p=e[a],c=p.values??he,l={key:a,type:p.type,default:p.default,hasDefault:p.default!==void 0,responsive:"responsive"in p,className:p.className,customProperties:p.customProperties,parseValue:p.parseValue,values:c,valueSet:c.length>0?new Set(c):ve,enumValueSet:p.type==="enum"?new Set([p.default,...c]):void 0};p.className?(r.push(l),i.add(a)):(l.hasDefault||p.type==="enum")&&n.push(l)}return{styling:r,passthrough:n,stylingKeys:i}}var Ce={children:new WeakMap};function M(o){let e=Ce;for(let r=0;r<o.length;r++){let n=o[r],i=e.children.get(n);i===void 0&&(i={children:new WeakMap},e.children.set(n,i)),e=i}return e.compiled??(e.compiled=Re(o))}var De=["initial","xs","sm","md","lg","xl"],x=new Set(De);function A(o,e){return Object.prototype.hasOwnProperty.call(o,e)}var we=new Set(["initial","xs","sm","md","lg","xl"]);function m(o){if(typeof o!="object"||o===null)return!1;for(let e in o)if(we.has(e))return!0;return!1}function D(o,e,r){return e!==void 0?e.has(r):o.includes(r)}function W({className:o,customProperties:e,...r}){let n=b({allowArbitraryValues:!0,className:o,...r}),i=Se({customProperties:e,...r});return[n,i]}function b({allowArbitraryValues:o,value:e,className:r,propValues:n,propValueSet:i,parseValue:a=p=>p}){if(e){if(typeof e=="string")return D(n,i,e)?B(r,e,a):o?r:void 0;if(m(e)){let p=e,c=[];for(let l in p){if(!A(p,l)||!x.has(l))continue;let s=p[l];if(s!==void 0){if(D(n,i,s)){let d=B(r,s,a),u=l==="initial"?d:`${l}:${d}`;c.push(u)}else if(o){let d=l==="initial"?r:`${l}:${r}`;c.push(d)}}}return c.length>0?c.join(" "):""}if(o)return r}}function B(o,e,r){let n=o?"-":"",i=r(e),a=i?.startsWith("-"),p=a?"-":"",c=a?i?.substring(1):i;return`${p}${o}${n}${c}`}function Se({customProperties:o,value:e,propValues:r,propValueSet:n,parseValue:i=a=>a}){if(!e||typeof e=="string"&&D(r,n,e))return;let a;if(typeof e=="string"){let p=i(e);a={};for(let c of o)a[c]=p;return a}if(m(e)){let p=e;for(let c in p){if(!A(p,c)||!x.has(c))continue;let l=p[c];if(l===void 0||D(r,n,l))continue;let s=i(l);a??(a={});for(let d of o){let u=c==="initial"?d:`${d}-${c}`;a[u]=s}}}return a??{}}function N(...o){let e;for(let r of o)r&&(e===void 0&&(e={}),Object.assign(e,r));return e}function Te(o,e){let r=o.initial,n=!1;return e.hasDefault&&r===void 0&&(r=e.default,n=!0),e.enumValueSet!==void 0&&!e.enumValueSet.has(r)&&(r=e.default,n=!0),n?{...o,initial:r}:o}function P(o,...e){let{styling:r,passthrough:n,stylingKeys:i}=M(e),a={};for(let l in o)i.has(l)||(a[l]=o[l]);for(let l=0;l<n.length;l++){let s=n[l],d=a[s.key];if(d===void 0){s.hasDefault&&(a[s.key]=s.default);continue}s.enumValueSet!==void 0&&!s.enumValueSet.has(d)&&!m(d)&&(a[s.key]=s.default)}let p,c=[];for(let l=0;l<r.length;l++){let s=r[l],d=o[s.key];if(d===void 0&&s.hasDefault&&(d=s.default),s.enumValueSet!==void 0&&!s.enumValueSet.has(d)&&!m(d)&&(d=s.default),!!d){if(m(d)){if(!s.responsive)continue;d=Te(d,s)}if(s.type==="enum"){let u=b({allowArbitraryValues:!1,value:d,className:s.className,propValues:s.values,propValueSet:s.valueSet,parseValue:s.parseValue});u&&c.push(u);continue}if(s.type==="string"||s.type==="enum | string"){let[u,k]=W({className:s.className,customProperties:s.customProperties,propValues:s.type==="string"?[]:s.values,propValueSet:s.type==="string"?void 0:s.valueSet,parseValue:s.parseValue,value:d});k&&(p=N(p,k)),u&&c.push(u);continue}if(s.type==="boolean"){c.push(s.className);continue}}}return a.className=(0,$.default)(c.length>0?c.join(" "):void 0,o.className),a.style=N(p,o.style),a}var w=v(require("react"));function K(o,e){if(e.includes(o))return o;let r=Number(o),n=e[0],i=1/0;for(let a=0;a<e.length;a++){let p=Math.abs(Number(e[a])-r);p<i&&(i=p,n=e[a])}return n}var G=w.createContext("2");G.displayName="ThemeSizeContext";function U(o,e){let r=w.useContext(G);if(o.size!==void 0)return o;let n=K(r,e.values);return n===e.default?o:{...o,size:n}}var _=f.forwardRef((o,e)=>{let r=U(o,S.size),{className:n,radius:i,color:a,...p}=P(r,S),c=p;return c.type==="single"&&c.collapsible===void 0&&(c.collapsible=!0),f.createElement(h.Accordion.Root,{...c,ref:e,className:(0,y.default)("kui-AccordionRoot",n),"data-accent-color":a,"data-radius":i})});_.displayName="Accordion.Root";var Z=f.forwardRef((o,e)=>{let{className:r,...n}=P(o,O);return f.createElement(h.Accordion.Item,{...n,ref:e,className:(0,y.default)("kui-AccordionItem",r)})});Z.displayName="Accordion.Item";var F=f.forwardRef((o,e)=>{let{className:r,...n}=P(o,L);return f.createElement(h.Accordion.Header,{...n,ref:e,className:(0,y.default)("kui-AccordionHeader",r)})});F.displayName="Accordion.Header";var q=f.forwardRef(({children:o,...e},r)=>{let{className:n,...i}=P(e,z);return f.createElement(h.Accordion.Trigger,{...i,ref:r,className:(0,y.default)("kui-AccordionTrigger",n)},f.createElement(H,null,o),f.createElement(T,{className:"kui-AccordionChevron","aria-hidden":!0}))});q.displayName="Accordion.Trigger";var Y=f.forwardRef((o,e)=>{let{className:r,children:n,...i}=P(o,j);return f.createElement(h.Accordion.Content,{...i,ref:e,className:(0,y.default)("kui-AccordionContent",r)},f.createElement("div",{className:"kui-AccordionContentInner"},n))});Y.displayName="Accordion.Content";
2
+ "use strict";var J=Object.create;var R=Object.defineProperty;var Q=Object.getOwnPropertyDescriptor;var X=Object.getOwnPropertyNames;var ee=Object.getPrototypeOf,oe=Object.prototype.hasOwnProperty;var re=(o,e)=>{for(var r in e)R(o,r,{get:e[r],enumerable:!0})},I=(o,e,r,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of X(e))!oe.call(o,i)&&i!==r&&R(o,i,{get:()=>e[i],enumerable:!(t=Q(e,i))||t.enumerable});return o};var v=(o,e,r)=>(r=o!=null?J(ee(o)):{},I(e||!o||!o.__esModule?R(r,"default",{value:o,enumerable:!0}):r,o)),te=o=>I(R({},"__esModule",{value:!0}),o);var Ae={};re(Ae,{Content:()=>Y,Header:()=>F,Item:()=>Z,Root:()=>_,Trigger:()=>q});module.exports=te(Ae);var f=v(require("react")),y=v(require("classnames")),h=require("radix-ui");var g={asChild:{type:"boolean"}};var ne=["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"];var E={color:{type:"enum",values:ne,default:void 0}};var se=["none","small","medium","large","full"],V={radius:{type:"enum",values:se,default:void 0}};var ie=["1","2","3","4"],pe=["raised","soft","surface","outline","ghost"],S={...g,size:{type:"enum",className:"kui-r-size",values:ie,default:"2",responsive:!0},variant:{type:"enum",className:"kui-variant",values:pe,default:"raised"},...E,...V},O={...g},L={...g},z={...g},j={...g};var n=v(require("react")),ae=n.default.forwardRef((o,e)=>n.default.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...o,ref:e},n.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",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"})));ae.displayName="ThickDividerHorizontalIcon";var ce=n.default.forwardRef((o,e)=>n.default.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...o,ref:e},n.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",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"})));ce.displayName="ThickCheckIcon";var T=n.default.forwardRef((o,e)=>n.default.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...o,ref:e},n.default.createElement("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"})));T.displayName="ChevronDownIcon";var le=n.default.forwardRef((o,e)=>n.default.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...o,ref:e},n.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",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"})));le.displayName="ThickChevronRightIcon";var de=n.default.forwardRef((o,e)=>n.default.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...o,ref:e},n.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",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"})));de.displayName="ThickChevronLeftIcon";var fe=n.default.forwardRef((o,e)=>n.default.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...o,ref:e},n.default.createElement("circle",{cx:"4.5",cy:"4.5",r:"2"})));fe.displayName="ThickDotIcon";var ue=n.default.forwardRef((o,e)=>n.default.createElement("svg",{...o,ref:e,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.default.createElement("path",{d:"M18 6 6 18"}),n.default.createElement("path",{d:"m6 6 12 12"})));ue.displayName="CloseIcon";var me=n.default.forwardRef((o,e)=>n.default.createElement("svg",{...o,ref:e,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.default.createElement("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"})));me.displayName="PaperclipIcon";var ge=n.default.forwardRef((o,e)=>n.default.createElement("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.default.createElement("path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"}),n.default.createElement("path",{d:"M14 2v4a2 2 0 0 0 2 2h4"})));ge.displayName="FileIcon";var Pe=n.default.forwardRef((o,e)=>n.default.createElement("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.default.createElement("path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"}),n.default.createElement("path",{d:"M14 2v4a2 2 0 0 0 2 2h4"}),n.default.createElement("path",{d:"M10 9H8"}),n.default.createElement("path",{d:"M16 13H8"}),n.default.createElement("path",{d:"M16 17H8"})));Pe.displayName="FileTextIcon";var ye=n.default.forwardRef((o,e)=>n.default.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...o,ref:e},n.default.createElement("path",{d:"M5 12.75L9.5 17.25L19 7.25",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})));ye.displayName="TickIcon";var C=require("radix-ui"),je=C.Slot.Root,He=C.Slot.Root,H=C.Slot.Slottable;var $=v(require("classnames"));var he=[],ve=new Set;function Re(o){let e=Object.assign({},...o),r=[],t=[],i=new Set;for(let a in e){let p=e[a],c=p.values??he,l={key:a,type:p.type,default:p.default,hasDefault:p.default!==void 0,responsive:"responsive"in p,className:p.className,customProperties:p.customProperties,parseValue:p.parseValue,values:c,valueSet:c.length>0?new Set(c):ve,enumValueSet:p.type==="enum"?new Set([p.default,...c]):void 0};p.className?(r.push(l),i.add(a)):(l.hasDefault||p.type==="enum")&&t.push(l)}return{styling:r,passthrough:t,stylingKeys:i}}var Ce={children:new WeakMap};function M(o){let e=Ce;for(let r=0;r<o.length;r++){let t=o[r],i=e.children.get(t);i===void 0&&(i={children:new WeakMap},e.children.set(t,i)),e=i}return e.compiled??(e.compiled=Re(o))}var De=["initial","xs","sm","md","lg","xl"],x=new Set(De);function A(o,e){return Object.prototype.hasOwnProperty.call(o,e)}var we=new Set(["initial","xs","sm","md","lg","xl"]);function m(o){if(typeof o!="object"||o===null)return!1;for(let e in o)if(we.has(e))return!0;return!1}function D(o,e,r){return e!==void 0?e.has(r):o.includes(r)}function W({className:o,customProperties:e,...r}){let t=b({allowArbitraryValues:!0,className:o,...r}),i=Se({customProperties:e,...r});return[t,i]}function b({allowArbitraryValues:o,value:e,className:r,propValues:t,propValueSet:i,parseValue:a=p=>p}){if(e){if(typeof e=="string")return D(t,i,e)?B(r,e,a):o?r:void 0;if(m(e)){let p=e,c=[];for(let l in p){if(!A(p,l)||!x.has(l))continue;let s=p[l];if(s!==void 0){if(D(t,i,s)){let d=B(r,s,a),u=l==="initial"?d:`${l}:${d}`;c.push(u)}else if(o){let d=l==="initial"?r:`${l}:${r}`;c.push(d)}}}return c.length>0?c.join(" "):""}if(o)return r}}function B(o,e,r){let t=o?"-":"",i=r(e),a=i?.startsWith("-"),p=a?"-":"",c=a?i?.substring(1):i;return`${p}${o}${t}${c}`}function Se({customProperties:o,value:e,propValues:r,propValueSet:t,parseValue:i=a=>a}){if(!e||typeof e=="string"&&D(r,t,e))return;let a;if(typeof e=="string"){let p=i(e);a={};for(let c of o)a[c]=p;return a}if(m(e)){let p=e;for(let c in p){if(!A(p,c)||!x.has(c))continue;let l=p[c];if(l===void 0||D(r,t,l))continue;let s=i(l);a??(a={});for(let d of o){let u=c==="initial"?d:`${d}-${c}`;a[u]=s}}}return a??{}}function N(...o){let e;for(let r of o)r&&(e===void 0&&(e={}),Object.assign(e,r));return e}function Te(o,e){let r=o.initial,t=!1;return e.hasDefault&&r===void 0&&(r=e.default,t=!0),e.enumValueSet!==void 0&&!e.enumValueSet.has(r)&&(r=e.default,t=!0),t?{...o,initial:r}:o}function P(o,...e){let{styling:r,passthrough:t,stylingKeys:i}=M(e),a={};for(let l in o)i.has(l)||(a[l]=o[l]);for(let l=0;l<t.length;l++){let s=t[l],d=a[s.key];if(d===void 0){s.hasDefault&&(a[s.key]=s.default);continue}s.enumValueSet!==void 0&&!s.enumValueSet.has(d)&&!m(d)&&(a[s.key]=s.default)}let p,c=[];for(let l=0;l<r.length;l++){let s=r[l],d=o[s.key];if(d===void 0&&s.hasDefault&&(d=s.default),s.enumValueSet!==void 0&&!s.enumValueSet.has(d)&&!m(d)&&(d=s.default),!!d){if(m(d)){if(!s.responsive)continue;d=Te(d,s)}if(s.type==="enum"){let u=b({allowArbitraryValues:!1,value:d,className:s.className,propValues:s.values,propValueSet:s.valueSet,parseValue:s.parseValue});u&&c.push(u);continue}if(s.type==="string"||s.type==="enum | string"){let[u,k]=W({className:s.className,customProperties:s.customProperties,propValues:s.type==="string"?[]:s.values,propValueSet:s.type==="string"?void 0:s.valueSet,parseValue:s.parseValue,value:d});k&&(p=N(p,k)),u&&c.push(u);continue}if(s.type==="boolean"){c.push(s.className);continue}}}return a.className=(0,$.default)(c.length>0?c.join(" "):void 0,o.className),a.style=N(p,o.style),a}var w=v(require("react"));function G(o,e){if(e.includes(o))return o;let r=Number(o),t=e[0],i=1/0;for(let a=0;a<e.length;a++){let p=Math.abs(Number(e[a])-r);p<i&&(i=p,t=e[a])}return t}var K=w.createContext("2");K.displayName="ThemeSizeContext";function U(o,e){let r=w.useContext(K);if(o.size!==void 0)return o;let t=G(r,e.values);return t===e.default?o:{...o,size:t}}var _=f.forwardRef((o,e)=>{let r=U(o,S.size),{className:t,radius:i,color:a,...p}=P(r,S),c=p;return c.type==="single"&&c.collapsible===void 0&&(c.collapsible=!0),f.createElement(h.Accordion.Root,{...c,ref:e,className:(0,y.default)("kui-AccordionRoot",t),"data-accent-color":a,"data-radius":i})});_.displayName="Accordion.Root";var Z=f.forwardRef((o,e)=>{let{className:r,...t}=P(o,O);return f.createElement(h.Accordion.Item,{...t,ref:e,className:(0,y.default)("kui-AccordionItem",r)})});Z.displayName="Accordion.Item";var F=f.forwardRef((o,e)=>{let{className:r,...t}=P(o,L);return f.createElement(h.Accordion.Header,{...t,ref:e,className:(0,y.default)("kui-AccordionHeader",r)})});F.displayName="Accordion.Header";var q=f.forwardRef(({children:o,...e},r)=>{let{className:t,...i}=P(e,z);return f.createElement(h.Accordion.Trigger,{...i,ref:r,className:(0,y.default)("kui-AccordionTrigger",t)},f.createElement(H,null,o),f.createElement(T,{className:"kui-AccordionChevron","aria-hidden":!0}))});q.displayName="Accordion.Trigger";var Y=f.forwardRef((o,e)=>{let{className:r,children:t,...i}=P(o,j);return f.createElement(h.Accordion.Content,{...i,ref:e,className:(0,y.default)("kui-AccordionContent",r)},f.createElement("div",{className:"kui-AccordionContentInner"},t))});Y.displayName="Accordion.Content";
3
3
  //# sourceMappingURL=accordion.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/accordion.tsx", "../../../src/props/as-child.prop.ts", "../../../src/props/color.prop.ts", "../../../src/props/radius.prop.ts", "../../../src/components/accordion.props.tsx", "../../../src/components/icons.tsx", "../../../src/components/slot.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/hooks/theme-size.ts", "../../../src/helpers/theme-size.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\nimport { Accordion as AccordionPrimitive } from 'radix-ui';\n\nimport {\n accordionRootPropDefs,\n accordionItemPropDefs,\n accordionHeaderPropDefs,\n accordionTriggerPropDefs,\n accordionContentPropDefs,\n} from './accordion.props.js';\nimport { ChevronDownIcon } from './icons.js';\nimport { Slottable } from './slot.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { useThemeSizeProps } from '../hooks/theme-size.js';\n\nimport type {\n AccordionRootOwnProps,\n AccordionItemOwnProps,\n AccordionHeaderOwnProps,\n AccordionTriggerOwnProps,\n AccordionContentOwnProps,\n} from './accordion.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\n// Root component\ntype AccordionRootElement = React.ElementRef<typeof AccordionPrimitive.Root>;\n// Radix's Root props are a union of single and multiple. Omit each member on its own, so\n// `defaultValue`, `value` and `collapsible` survive with the right type for each `type`.\ntype AccordionRootRadixProps =\n | Omit<AccordionPrimitive.AccordionSingleProps, 'asChild' | 'color'>\n | Omit<AccordionPrimitive.AccordionMultipleProps, 'asChild' | 'color'>;\n\ntype AccordionRootProps = AccordionRootRadixProps & AccordionRootOwnProps;\n\nconst AccordionRoot = React.forwardRef<AccordionRootElement, AccordionRootProps>(\n (ownProps, forwardedRef) => {\n const props = useThemeSizeProps(ownProps, accordionRootPropDefs.size);\n const { className, radius, color, ...extractedRadixProps } =\n extractProps(props, accordionRootPropDefs);\n\n const radixProps = extractedRadixProps as React.ComponentPropsWithoutRef<\n typeof AccordionPrimitive.Root\n >;\n\n // Ensure single accordions can collapse by default unless explicitly set\n if (radixProps.type === 'single' && radixProps.collapsible === undefined) {\n radixProps.collapsible = true;\n }\n\n return (\n <AccordionPrimitive.Root\n {...radixProps}\n ref={forwardedRef}\n className={classNames('kui-AccordionRoot', className)}\n data-accent-color={color}\n data-radius={radius}\n />\n );\n },\n);\nAccordionRoot.displayName = 'Accordion.Root';\n\n// Item component\ntype AccordionItemElement = React.ElementRef<typeof AccordionPrimitive.Item>;\ninterface AccordionItemProps\n extends ComponentPropsWithout<typeof AccordionPrimitive.Item, RemovedProps>,\n AccordionItemOwnProps {}\n\nconst AccordionItem = React.forwardRef<AccordionItemElement, AccordionItemProps>(\n (props, forwardedRef) => {\n const { className, ...itemProps } = extractProps(props, accordionItemPropDefs);\n\n return (\n <AccordionPrimitive.Item\n {...itemProps}\n ref={forwardedRef}\n className={classNames('kui-AccordionItem', className)}\n />\n );\n },\n);\nAccordionItem.displayName = 'Accordion.Item';\n\n// Header component\ntype AccordionHeaderElement = React.ElementRef<typeof AccordionPrimitive.Header>;\ninterface AccordionHeaderProps\n extends ComponentPropsWithout<typeof AccordionPrimitive.Header, RemovedProps>,\n AccordionHeaderOwnProps {}\n\nconst AccordionHeader = React.forwardRef<AccordionHeaderElement, AccordionHeaderProps>(\n (props, forwardedRef) => {\n const { className, ...headerProps } = extractProps(props, accordionHeaderPropDefs);\n\n return (\n <AccordionPrimitive.Header\n {...headerProps}\n ref={forwardedRef}\n className={classNames('kui-AccordionHeader', className)}\n />\n );\n },\n);\nAccordionHeader.displayName = 'Accordion.Header';\n\n// Trigger component\ntype AccordionTriggerElement = React.ElementRef<typeof AccordionPrimitive.Trigger>;\ninterface AccordionTriggerProps\n extends ComponentPropsWithout<typeof AccordionPrimitive.Trigger, RemovedProps>,\n AccordionTriggerOwnProps {}\n\nconst AccordionTrigger = React.forwardRef<AccordionTriggerElement, AccordionTriggerProps>(\n ({ children, ...props }, forwardedRef) => {\n const { className, ...triggerProps } = extractProps(props, accordionTriggerPropDefs);\n\n return (\n <AccordionPrimitive.Trigger\n {...triggerProps}\n ref={forwardedRef}\n className={classNames('kui-AccordionTrigger', className)}\n >\n <Slottable>{children}</Slottable>\n <ChevronDownIcon className=\"kui-AccordionChevron\" aria-hidden />\n </AccordionPrimitive.Trigger>\n );\n },\n);\nAccordionTrigger.displayName = 'Accordion.Trigger';\n\n// Content component\ntype AccordionContentElement = React.ElementRef<typeof AccordionPrimitive.Content>;\ninterface AccordionContentProps\n extends ComponentPropsWithout<typeof AccordionPrimitive.Content, RemovedProps>,\n AccordionContentOwnProps {}\n\nconst AccordionContent = React.forwardRef<AccordionContentElement, AccordionContentProps>(\n (props, forwardedRef) => {\n const { className, children, ...contentProps } = extractProps(props, accordionContentPropDefs);\n\n return (\n <AccordionPrimitive.Content\n {...contentProps}\n ref={forwardedRef}\n className={classNames('kui-AccordionContent', className)}\n >\n <div className=\"kui-AccordionContentInner\">{children}</div>\n </AccordionPrimitive.Content>\n );\n },\n);\nAccordionContent.displayName = 'Accordion.Content';\n\nexport {\n AccordionRoot as Root,\n AccordionItem as Item,\n AccordionHeader as Header,\n AccordionTrigger as Trigger,\n AccordionContent as Content,\n};\n\nexport type {\n AccordionRootProps as RootProps,\n AccordionItemProps as ItemProps,\n AccordionHeaderProps as HeaderProps,\n AccordionTriggerProps as TriggerProps,\n AccordionContentProps as ContentProps,\n};\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 type { PropDef } from './prop-def.js';\n\nconst radii = ['none', 'small', 'medium', 'large', 'full'] as const;\n\nconst radiusPropDef = {\n radius: {\n type: 'enum',\n values: radii,\n default: undefined,\n },\n} satisfies {\n radius: PropDef<(typeof radii)[number]>;\n};\n\nexport { radiusPropDef, radii };\n", "import { asChildPropDef } from '../props/as-child.prop.js';\nimport { colorPropDef } from '../props/color.prop.js';\nimport { radiusPropDef } from '../props/radius.prop.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst sizes = ['1', '2', '3', '4'] as const;\nconst variants = ['raised', 'soft', 'surface', 'outline', 'ghost'] as const;\n\nconst accordionRootPropDefs = {\n ...asChildPropDef,\n size: { type: 'enum', className: 'kui-r-size', values: sizes, default: '2', responsive: true },\n variant: { type: 'enum', className: 'kui-variant', values: variants, default: 'raised' },\n ...colorPropDef,\n ...radiusPropDef,\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n variant: PropDef<(typeof variants)[number]>;\n};\n\nconst accordionItemPropDefs = {\n ...asChildPropDef,\n} satisfies {\n asChild: PropDef<boolean>;\n};\n\nconst accordionHeaderPropDefs = {\n ...asChildPropDef,\n} satisfies {\n asChild: PropDef<boolean>;\n};\n\nconst accordionTriggerPropDefs = {\n ...asChildPropDef,\n} satisfies {\n asChild: PropDef<boolean>;\n};\n\nconst accordionContentPropDefs = {\n ...asChildPropDef,\n} satisfies {\n asChild: PropDef<boolean>;\n};\n\nexport {\n accordionRootPropDefs,\n accordionItemPropDefs,\n accordionHeaderPropDefs,\n accordionTriggerPropDefs,\n accordionContentPropDefs,\n};\n\nexport type AccordionRootOwnProps = {\n size?: (typeof sizes)[number];\n variant?: (typeof variants)[number];\n color?: string;\n radius?: string;\n};\n\nexport type AccordionItemOwnProps = {\n asChild?: boolean;\n};\n\nexport type AccordionHeaderOwnProps = {\n asChild?: boolean;\n};\n\nexport type AccordionTriggerOwnProps = {\n asChild?: boolean;\n};\n\nexport type AccordionContentOwnProps = {\n asChild?: boolean;\n};\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 { Slot as SlotPrimitive } from 'radix-ui';\nexport const Root = SlotPrimitive.Root;\nexport const Slot = SlotPrimitive.Root;\nexport const Slottable: typeof SlotPrimitive.Slottable = SlotPrimitive.Slottable;\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", "'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"],
4
+ "sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\nimport { Accordion as AccordionPrimitive } from 'radix-ui';\n\nimport {\n accordionRootPropDefs,\n accordionItemPropDefs,\n accordionHeaderPropDefs,\n accordionTriggerPropDefs,\n accordionContentPropDefs,\n} from './accordion.props.js';\nimport { ChevronDownIcon } from './icons.js';\nimport { Slottable } from './slot.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { useThemeSizeProps } from '../hooks/theme-size.js';\n\nimport type {\n AccordionRootOwnProps,\n AccordionItemOwnProps,\n AccordionHeaderOwnProps,\n AccordionTriggerOwnProps,\n AccordionContentOwnProps,\n} from './accordion.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\n// Root component\ntype AccordionRootElement = React.ElementRef<typeof AccordionPrimitive.Root>;\n// Radix's Root props are a union of single and multiple. Omit each member on its own, so\n// `defaultValue`, `value` and `collapsible` survive with the right type for each `type`.\ntype AccordionRootRadixProps =\n | Omit<AccordionPrimitive.AccordionSingleProps, 'asChild' | 'color'>\n | Omit<AccordionPrimitive.AccordionMultipleProps, 'asChild' | 'color'>;\n\ntype AccordionRootProps = AccordionRootRadixProps & AccordionRootOwnProps;\n\nconst AccordionRoot = React.forwardRef<AccordionRootElement, AccordionRootProps>(\n (ownProps, forwardedRef) => {\n const props = useThemeSizeProps(ownProps, accordionRootPropDefs.size);\n const { className, radius, color, ...extractedRadixProps } =\n extractProps(props, accordionRootPropDefs);\n\n const radixProps = extractedRadixProps as React.ComponentPropsWithoutRef<\n typeof AccordionPrimitive.Root\n >;\n\n // Ensure single accordions can collapse by default unless explicitly set\n if (radixProps.type === 'single' && radixProps.collapsible === undefined) {\n radixProps.collapsible = true;\n }\n\n return (\n <AccordionPrimitive.Root\n {...radixProps}\n ref={forwardedRef}\n className={classNames('kui-AccordionRoot', className)}\n data-accent-color={color}\n data-radius={radius}\n />\n );\n },\n);\nAccordionRoot.displayName = 'Accordion.Root';\n\n// Item component\ntype AccordionItemElement = React.ElementRef<typeof AccordionPrimitive.Item>;\ninterface AccordionItemProps\n extends ComponentPropsWithout<typeof AccordionPrimitive.Item, RemovedProps>,\n AccordionItemOwnProps {}\n\nconst AccordionItem = React.forwardRef<AccordionItemElement, AccordionItemProps>(\n (props, forwardedRef) => {\n const { className, ...itemProps } = extractProps(props, accordionItemPropDefs);\n\n return (\n <AccordionPrimitive.Item\n {...itemProps}\n ref={forwardedRef}\n className={classNames('kui-AccordionItem', className)}\n />\n );\n },\n);\nAccordionItem.displayName = 'Accordion.Item';\n\n// Header component\ntype AccordionHeaderElement = React.ElementRef<typeof AccordionPrimitive.Header>;\ninterface AccordionHeaderProps\n extends ComponentPropsWithout<typeof AccordionPrimitive.Header, RemovedProps>,\n AccordionHeaderOwnProps {}\n\nconst AccordionHeader = React.forwardRef<AccordionHeaderElement, AccordionHeaderProps>(\n (props, forwardedRef) => {\n const { className, ...headerProps } = extractProps(props, accordionHeaderPropDefs);\n\n return (\n <AccordionPrimitive.Header\n {...headerProps}\n ref={forwardedRef}\n className={classNames('kui-AccordionHeader', className)}\n />\n );\n },\n);\nAccordionHeader.displayName = 'Accordion.Header';\n\n// Trigger component\ntype AccordionTriggerElement = React.ElementRef<typeof AccordionPrimitive.Trigger>;\ninterface AccordionTriggerProps\n extends ComponentPropsWithout<typeof AccordionPrimitive.Trigger, RemovedProps>,\n AccordionTriggerOwnProps {}\n\nconst AccordionTrigger = React.forwardRef<AccordionTriggerElement, AccordionTriggerProps>(\n ({ children, ...props }, forwardedRef) => {\n const { className, ...triggerProps } = extractProps(props, accordionTriggerPropDefs);\n\n return (\n <AccordionPrimitive.Trigger\n {...triggerProps}\n ref={forwardedRef}\n className={classNames('kui-AccordionTrigger', className)}\n >\n <Slottable>{children}</Slottable>\n <ChevronDownIcon className=\"kui-AccordionChevron\" aria-hidden />\n </AccordionPrimitive.Trigger>\n );\n },\n);\nAccordionTrigger.displayName = 'Accordion.Trigger';\n\n// Content component\ntype AccordionContentElement = React.ElementRef<typeof AccordionPrimitive.Content>;\ninterface AccordionContentProps\n extends ComponentPropsWithout<typeof AccordionPrimitive.Content, RemovedProps>,\n AccordionContentOwnProps {}\n\nconst AccordionContent = React.forwardRef<AccordionContentElement, AccordionContentProps>(\n (props, forwardedRef) => {\n const { className, children, ...contentProps } = extractProps(props, accordionContentPropDefs);\n\n return (\n <AccordionPrimitive.Content\n {...contentProps}\n ref={forwardedRef}\n className={classNames('kui-AccordionContent', className)}\n >\n <div className=\"kui-AccordionContentInner\">{children}</div>\n </AccordionPrimitive.Content>\n );\n },\n);\nAccordionContent.displayName = 'Accordion.Content';\n\nexport {\n AccordionRoot as Root,\n AccordionItem as Item,\n AccordionHeader as Header,\n AccordionTrigger as Trigger,\n AccordionContent as Content,\n};\n\nexport type {\n AccordionRootProps as RootProps,\n AccordionItemProps as ItemProps,\n AccordionHeaderProps as HeaderProps,\n AccordionTriggerProps as TriggerProps,\n AccordionContentProps as ContentProps,\n};\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 type { PropDef } from './prop-def.js';\n\nconst radii = ['none', 'small', 'medium', 'large', 'full'] as const;\n\nconst radiusPropDef = {\n radius: {\n type: 'enum',\n values: radii,\n default: undefined,\n },\n} satisfies {\n radius: PropDef<(typeof radii)[number]>;\n};\n\nexport { radiusPropDef, radii };\n", "import { asChildPropDef } from '../props/as-child.prop.js';\nimport { colorPropDef } from '../props/color.prop.js';\nimport { radiusPropDef } from '../props/radius.prop.js';\n\nimport type { GetPropDefTypes, PropDef } from '../props/prop-def.js';\n\nconst sizes = ['1', '2', '3', '4'] as const;\nconst variants = ['raised', 'soft', 'surface', 'outline', 'ghost'] as const;\n\nconst accordionRootPropDefs = {\n ...asChildPropDef,\n size: { type: 'enum', className: 'kui-r-size', values: sizes, default: '2', responsive: true },\n variant: { type: 'enum', className: 'kui-variant', values: variants, default: 'raised' },\n ...colorPropDef,\n ...radiusPropDef,\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n variant: PropDef<(typeof variants)[number]>;\n};\n\nconst accordionItemPropDefs = {\n ...asChildPropDef,\n} satisfies {\n asChild: PropDef<boolean>;\n};\n\nconst accordionHeaderPropDefs = {\n ...asChildPropDef,\n} satisfies {\n asChild: PropDef<boolean>;\n};\n\nconst accordionTriggerPropDefs = {\n ...asChildPropDef,\n} satisfies {\n asChild: PropDef<boolean>;\n};\n\nconst accordionContentPropDefs = {\n ...asChildPropDef,\n} satisfies {\n asChild: PropDef<boolean>;\n};\n\nexport {\n accordionRootPropDefs,\n accordionItemPropDefs,\n accordionHeaderPropDefs,\n accordionTriggerPropDefs,\n accordionContentPropDefs,\n};\n\nexport type AccordionRootOwnProps = {\n size?: (typeof sizes)[number];\n variant?: (typeof variants)[number];\n} & GetPropDefTypes<typeof colorPropDef & typeof radiusPropDef>;\n\nexport type AccordionItemOwnProps = {\n asChild?: boolean;\n};\n\nexport type AccordionHeaderOwnProps = {\n asChild?: boolean;\n};\n\nexport type AccordionTriggerOwnProps = {\n asChild?: boolean;\n};\n\nexport type AccordionContentOwnProps = {\n asChild?: boolean;\n};\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 { Slot as SlotPrimitive } from 'radix-ui';\nexport const Root = SlotPrimitive.Root;\nexport const Slot = SlotPrimitive.Root;\nexport const Slottable: typeof SlotPrimitive.Slottable = SlotPrimitive.Slottable;\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", "'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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,EAAAW,SAAW,oBAAqBP,CAAS,EACtD,CAEJ,CACF,EACAQ,EAAc,YAAc,iBAQ5B,IAAMG,EAAwB,aAC5B,CAACd,EAAOD,IAAiB,CACvB,GAAM,CAAE,UAAAI,EAAW,GAAGY,CAAY,EAAIR,EAAaP,EAAOgB,CAAuB,EAEjF,OACE,gBAAC,EAAAP,UAAmB,OAAnB,CACE,GAAGM,EACJ,IAAKhB,EACL,aAAW,EAAAW,SAAW,sBAAuBP,CAAS,EACxD,CAEJ,CACF,EACAW,EAAgB,YAAc,mBAQ9B,IAAMG,EAAyB,aAC7B,CAAC,CAAE,SAAAC,EAAU,GAAGlB,CAAM,EAAGD,IAAiB,CACxC,GAAM,CAAE,UAAAI,EAAW,GAAGgB,CAAa,EAAIZ,EAAaP,EAAOoB,CAAwB,EAEnF,OACE,gBAAC,EAAAX,UAAmB,QAAnB,CACE,GAAGU,EACJ,IAAKpB,EACL,aAAW,EAAAW,SAAW,uBAAwBP,CAAS,GAEvD,gBAACkB,EAAA,KAAWH,CAAS,EACrB,gBAACI,EAAA,CAAgB,UAAU,uBAAuB,cAAW,GAAC,CAChE,CAEJ,CACF,EACAL,EAAiB,YAAc,oBAQ/B,IAAMM,EAAyB,aAC7B,CAACvB,EAAOD,IAAiB,CACvB,GAAM,CAAE,UAAAI,EAAW,SAAAe,EAAU,GAAGM,CAAa,EAAIjB,EAAaP,EAAOyB,CAAwB,EAE7F,OACE,gBAAC,EAAAhB,UAAmB,QAAnB,CACE,GAAGe,EACJ,IAAKzB,EACL,aAAW,EAAAW,SAAW,uBAAwBP,CAAS,GAEvD,gBAAC,OAAI,UAAU,6BAA6Be,CAAS,CACvD,CAEJ,CACF,EACAK,EAAiB,YAAc",
6
6
  "names": ["accordion_exports", "__export", "AccordionContent", "AccordionHeader", "AccordionItem", "AccordionRoot", "AccordionTrigger", "__toCommonJS", "React", "import_classnames", "import_radix_ui", "asChildPropDef", "accentColors", "colorPropDef", "accentColors", "radii", "radiusPropDef", "sizes", "variants", "accordionRootPropDefs", "asChildPropDef", "colorPropDef", "radiusPropDef", "accordionItemPropDefs", "accordionHeaderPropDefs", "accordionTriggerPropDefs", "accordionContentPropDefs", "import_react", "ThickDividerHorizontalIcon", "React", "props", "forwardedRef", "ThickCheckIcon", "ChevronDownIcon", "ThickChevronRightIcon", "ThickChevronLeftIcon", "ThickDotIcon", "CloseIcon", "React", "_props", "_forwardedRef", "PaperclipIcon", "props", "forwardedRef", "FileIcon", "FileTextIcon", "TickIcon", "import_radix_ui", "Root", "SlotPrimitive", "Slot", "Slottable", "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", "React", "clampSize", "size", "values", "n", "nearest", "distance", "i", "d", "ThemeSizeContext", "useThemeSizeProps", "props", "propDef", "themeSize", "ThemeSizeContext", "size", "clampSize", "AccordionRoot", "ownProps", "forwardedRef", "props", "useThemeSizeProps", "accordionRootPropDefs", "className", "radius", "color", "extractedRadixProps", "extractProps", "radixProps", "AccordionPrimitive", "classNames", "AccordionItem", "itemProps", "accordionItemPropDefs", "AccordionHeader", "headerProps", "accordionHeaderPropDefs", "AccordionTrigger", "children", "triggerProps", "accordionTriggerPropDefs", "Slottable", "ChevronDownIcon", "AccordionContent", "contentProps", "accordionContentPropDefs"]
7
7
  }
@@ -1,3 +1,6 @@
1
+ import { colorPropDef } from '../props/color.prop.js';
2
+ import { radiusPropDef } from '../props/radius.prop.js';
3
+ import type { GetPropDefTypes } from '../props/prop-def.js';
1
4
  declare const sizes: readonly ["1", "2", "3", "4"];
2
5
  declare const variants: readonly ["raised", "soft", "surface", "outline", "ghost"];
3
6
  declare const accordionRootPropDefs: {
@@ -52,9 +55,7 @@ export { accordionRootPropDefs, accordionItemPropDefs, accordionHeaderPropDefs,
52
55
  export type AccordionRootOwnProps = {
53
56
  size?: (typeof sizes)[number];
54
57
  variant?: (typeof variants)[number];
55
- color?: string;
56
- radius?: string;
57
- };
58
+ } & GetPropDefTypes<typeof colorPropDef & typeof radiusPropDef>;
58
59
  export type AccordionItemOwnProps = {
59
60
  asChild?: boolean;
60
61
  };
@@ -1 +1 @@
1
- {"version":3,"file":"accordion.props.d.ts","sourceRoot":"","sources":["../../../src/components/accordion.props.tsx"],"names":[],"mappings":"AAMA,QAAA,MAAM,KAAK,+BAAgC,CAAC;AAC5C,QAAA,MAAM,QAAQ,4DAA6D,CAAC;AAE5E,QAAA,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;CAS1B,CAAC;AAEF,QAAA,MAAM,qBAAqB;;;;CAI1B,CAAC;AAEF,QAAA,MAAM,uBAAuB;;;;CAI5B,CAAC;AAEF,QAAA,MAAM,wBAAwB;;;;CAI7B,CAAC;AAEF,QAAA,MAAM,wBAAwB;;;;CAI7B,CAAC;AAEF,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EACrB,uBAAuB,EACvB,wBAAwB,EACxB,wBAAwB,GACzB,CAAC;AAEF,MAAM,MAAM,qBAAqB,G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M,qBAAqB,GAAG;IAClC,IAAI,CAAC,EAAE,CAAC,OAAO,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC;IAC9B,OAAO,CAAC,EAAE,CAAC,OAAO,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC;CACrC,GAAG,eAAe,CAAC,OAAO,YAAY,GAAG,OAAO,aAAa,CAAC,CAAC;AAEhE,MAAM,MAAM,qBAAqB,GAAG;IAClC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG;IACpC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC"}
@@ -1,2 +1,2 @@
1
- "use strict";var a=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var d=(e,o)=>{for(var t in o)a(e,t,{get:o[t],enumerable:!0})},u=(e,o,t,n)=>{if(o&&typeof o=="object"||typeof o=="function")for(let s of f(o))!l.call(e,s)&&s!==t&&a(e,s,{get:()=>o[s],enumerable:!(n=c(o,s))||n.enumerable});return e};var m=e=>u(a({},"__esModule",{value:!0}),e);var z={};d(z,{accordionContentPropDefs:()=>x,accordionHeaderPropDefs:()=>v,accordionItemPropDefs:()=>g,accordionRootPropDefs:()=>C,accordionTriggerPropDefs:()=>h});module.exports=m(z);var r={asChild:{type:"boolean"}};var y=["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"];var i={color:{type:"enum",values:y,default:void 0}};var P=["none","small","medium","large","full"],p={radius:{type:"enum",values:P,default:void 0}};var D=["1","2","3","4"],b=["raised","soft","surface","outline","ghost"],C={...r,size:{type:"enum",className:"kui-r-size",values:D,default:"2",responsive:!0},variant:{type:"enum",className:"kui-variant",values:b,default:"raised"},...i,...p},g={...r},v={...r},h={...r},x={...r};
1
+ "use strict";var a=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var d=(e,o)=>{for(var t in o)a(e,t,{get:o[t],enumerable:!0})},u=(e,o,t,n)=>{if(o&&typeof o=="object"||typeof o=="function")for(let s of c(o))!l.call(e,s)&&s!==t&&a(e,s,{get:()=>o[s],enumerable:!(n=f(o,s))||n.enumerable});return e};var m=e=>u(a({},"__esModule",{value:!0}),e);var z={};d(z,{accordionContentPropDefs:()=>x,accordionHeaderPropDefs:()=>v,accordionItemPropDefs:()=>g,accordionRootPropDefs:()=>C,accordionTriggerPropDefs:()=>h});module.exports=m(z);var r={asChild:{type:"boolean"}};var y=["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"];var p={color:{type:"enum",values:y,default:void 0}};var P=["none","small","medium","large","full"],i={radius:{type:"enum",values:P,default:void 0}};var D=["1","2","3","4"],b=["raised","soft","surface","outline","ghost"],C={...r,size:{type:"enum",className:"kui-r-size",values:D,default:"2",responsive:!0},variant:{type:"enum",className:"kui-variant",values:b,default:"raised"},...p,...i},g={...r},v={...r},h={...r},x={...r};
2
2
  //# sourceMappingURL=accordion.props.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/accordion.props.tsx", "../../../src/props/as-child.prop.ts", "../../../src/props/color.prop.ts", "../../../src/props/radius.prop.ts"],
4
- "sourcesContent": ["import { asChildPropDef } from '../props/as-child.prop.js';\nimport { colorPropDef } from '../props/color.prop.js';\nimport { radiusPropDef } from '../props/radius.prop.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst sizes = ['1', '2', '3', '4'] as const;\nconst variants = ['raised', 'soft', 'surface', 'outline', 'ghost'] as const;\n\nconst accordionRootPropDefs = {\n ...asChildPropDef,\n size: { type: 'enum', className: 'kui-r-size', values: sizes, default: '2', responsive: true },\n variant: { type: 'enum', className: 'kui-variant', values: variants, default: 'raised' },\n ...colorPropDef,\n ...radiusPropDef,\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n variant: PropDef<(typeof variants)[number]>;\n};\n\nconst accordionItemPropDefs = {\n ...asChildPropDef,\n} satisfies {\n asChild: PropDef<boolean>;\n};\n\nconst accordionHeaderPropDefs = {\n ...asChildPropDef,\n} satisfies {\n asChild: PropDef<boolean>;\n};\n\nconst accordionTriggerPropDefs = {\n ...asChildPropDef,\n} satisfies {\n asChild: PropDef<boolean>;\n};\n\nconst accordionContentPropDefs = {\n ...asChildPropDef,\n} satisfies {\n asChild: PropDef<boolean>;\n};\n\nexport {\n accordionRootPropDefs,\n accordionItemPropDefs,\n accordionHeaderPropDefs,\n accordionTriggerPropDefs,\n accordionContentPropDefs,\n};\n\nexport type AccordionRootOwnProps = {\n size?: (typeof sizes)[number];\n variant?: (typeof variants)[number];\n color?: string;\n radius?: string;\n};\n\nexport type AccordionItemOwnProps = {\n asChild?: boolean;\n};\n\nexport type AccordionHeaderOwnProps = {\n asChild?: boolean;\n};\n\nexport type AccordionTriggerOwnProps = {\n asChild?: boolean;\n};\n\nexport type AccordionContentOwnProps = {\n asChild?: boolean;\n};\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 type { PropDef } from './prop-def.js';\n\nconst radii = ['none', 'small', 'medium', 'large', 'full'] as const;\n\nconst radiusPropDef = {\n radius: {\n type: 'enum',\n values: radii,\n default: undefined,\n },\n} satisfies {\n radius: PropDef<(typeof radii)[number]>;\n};\n\nexport { radiusPropDef, radii };\n"],
4
+ "sourcesContent": ["import { asChildPropDef } from '../props/as-child.prop.js';\nimport { colorPropDef } from '../props/color.prop.js';\nimport { radiusPropDef } from '../props/radius.prop.js';\n\nimport type { GetPropDefTypes, PropDef } from '../props/prop-def.js';\n\nconst sizes = ['1', '2', '3', '4'] as const;\nconst variants = ['raised', 'soft', 'surface', 'outline', 'ghost'] as const;\n\nconst accordionRootPropDefs = {\n ...asChildPropDef,\n size: { type: 'enum', className: 'kui-r-size', values: sizes, default: '2', responsive: true },\n variant: { type: 'enum', className: 'kui-variant', values: variants, default: 'raised' },\n ...colorPropDef,\n ...radiusPropDef,\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n variant: PropDef<(typeof variants)[number]>;\n};\n\nconst accordionItemPropDefs = {\n ...asChildPropDef,\n} satisfies {\n asChild: PropDef<boolean>;\n};\n\nconst accordionHeaderPropDefs = {\n ...asChildPropDef,\n} satisfies {\n asChild: PropDef<boolean>;\n};\n\nconst accordionTriggerPropDefs = {\n ...asChildPropDef,\n} satisfies {\n asChild: PropDef<boolean>;\n};\n\nconst accordionContentPropDefs = {\n ...asChildPropDef,\n} satisfies {\n asChild: PropDef<boolean>;\n};\n\nexport {\n accordionRootPropDefs,\n accordionItemPropDefs,\n accordionHeaderPropDefs,\n accordionTriggerPropDefs,\n accordionContentPropDefs,\n};\n\nexport type AccordionRootOwnProps = {\n size?: (typeof sizes)[number];\n variant?: (typeof variants)[number];\n} & GetPropDefTypes<typeof colorPropDef & typeof radiusPropDef>;\n\nexport type AccordionItemOwnProps = {\n asChild?: boolean;\n};\n\nexport type AccordionHeaderOwnProps = {\n asChild?: boolean;\n};\n\nexport type AccordionTriggerOwnProps = {\n asChild?: boolean;\n};\n\nexport type AccordionContentOwnProps = {\n asChild?: boolean;\n};\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 type { PropDef } from './prop-def.js';\n\nconst radii = ['none', 'small', 'medium', 'large', 'full'] as const;\n\nconst radiusPropDef = {\n radius: {\n type: 'enum',\n values: radii,\n default: undefined,\n },\n} satisfies {\n radius: PropDef<(typeof radii)[number]>;\n};\n\nexport { radiusPropDef, radii };\n"],
5
5
  "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,8BAAAE,EAAA,4BAAAC,EAAA,0BAAAC,EAAA,0BAAAC,EAAA,6BAAAC,IAAA,eAAAC,EAAAP,GCEA,IAAMQ,EAAiB,CAKrB,QAAS,CACP,KAAM,SACR,CACF,ECPA,IAAMC,EAAe,CAAC,OAAQ,OAAQ,SAAU,QAAS,SAAU,QAAS,SAAU,SAAU,MAAO,OAAQ,UAAW,OAAQ,OAAQ,SAAU,SAAU,OAAQ,SAAU,OAAQ,OAAQ,OAAQ,OAAQ,QAAS,QAAS,OAAQ,OAAQ,KAAK,EAIvP,IAAMC,EAAe,CACnB,MAAO,CACL,KAAM,OACN,OAAQC,EACR,QAAS,MACX,CACF,ECXA,IAAMC,EAAQ,CAAC,OAAQ,QAAS,SAAU,QAAS,MAAM,EAEnDC,EAAgB,CACpB,OAAQ,CACN,KAAM,OACN,OAAQD,EACR,QAAS,MACX,CACF,EHJA,IAAME,EAAQ,CAAC,IAAK,IAAK,IAAK,GAAG,EAC3BC,EAAW,CAAC,SAAU,OAAQ,UAAW,UAAW,OAAO,EAE3DC,EAAwB,CAC5B,GAAGC,EACH,KAAM,CAAE,KAAM,OAAQ,UAAW,aAAc,OAAQH,EAAO,QAAS,IAAK,WAAY,EAAK,EAC7F,QAAS,CAAE,KAAM,OAAQ,UAAW,cAAe,OAAQC,EAAU,QAAS,QAAS,EACvF,GAAGG,EACH,GAAGC,CACL,EAKMC,EAAwB,CAC5B,GAAGH,CACL,EAIMI,EAA0B,CAC9B,GAAGJ,CACL,EAIMK,EAA2B,CAC/B,GAAGL,CACL,EAIMM,EAA2B,CAC/B,GAAGN,CACL",
6
6
  "names": ["accordion_props_exports", "__export", "accordionContentPropDefs", "accordionHeaderPropDefs", "accordionItemPropDefs", "accordionRootPropDefs", "accordionTriggerPropDefs", "__toCommonJS", "asChildPropDef", "accentColors", "colorPropDef", "accentColors", "radii", "radiusPropDef", "sizes", "variants", "accordionRootPropDefs", "asChildPropDef", "colorPropDef", "radiusPropDef", "accordionItemPropDefs", "accordionHeaderPropDefs", "accordionTriggerPropDefs", "accordionContentPropDefs"]
7
7
  }