@womp/kookie-ui 0.17.0 → 0.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (569) hide show
  1. package/components.css +1397 -2626
  2. package/dist/cjs/components/_internal/base-button.d.ts.map +1 -1
  3. package/dist/cjs/components/_internal/base-button.js +1 -1
  4. package/dist/cjs/components/_internal/base-button.js.map +4 -4
  5. package/dist/cjs/components/_internal/base-checkbox.props.d.ts +1 -1
  6. package/dist/cjs/components/_internal/base-checkbox.props.js +1 -1
  7. package/dist/cjs/components/_internal/base-checkbox.props.js.map +2 -2
  8. package/dist/cjs/components/_internal/base-radio.props.d.ts +1 -1
  9. package/dist/cjs/components/_internal/base-radio.props.js +1 -1
  10. package/dist/cjs/components/_internal/base-radio.props.js.map +2 -2
  11. package/dist/cjs/components/_internal/pane-chrome.js +1 -1
  12. package/dist/cjs/components/_internal/pane-chrome.js.map +3 -3
  13. package/dist/cjs/components/_internal/shell-sidebar.js +1 -1
  14. package/dist/cjs/components/_internal/shell-sidebar.js.map +3 -3
  15. package/dist/cjs/components/accordion.d.ts.map +1 -1
  16. package/dist/cjs/components/accordion.js +1 -1
  17. package/dist/cjs/components/accordion.js.map +4 -4
  18. package/dist/cjs/components/alert-dialog.js +1 -1
  19. package/dist/cjs/components/alert-dialog.js.map +4 -4
  20. package/dist/cjs/components/badge.js +1 -1
  21. package/dist/cjs/components/badge.js.map +4 -4
  22. package/dist/cjs/components/badge.props.d.ts +1 -1
  23. package/dist/cjs/components/badge.props.js +1 -1
  24. package/dist/cjs/components/badge.props.js.map +1 -1
  25. package/dist/cjs/components/button.js +2 -2
  26. package/dist/cjs/components/button.js.map +4 -4
  27. package/dist/cjs/components/chatbar.d.ts.map +1 -1
  28. package/dist/cjs/components/chatbar.js +2 -2
  29. package/dist/cjs/components/chatbar.js.map +4 -4
  30. package/dist/cjs/components/checkbox-cards.js +1 -1
  31. package/dist/cjs/components/checkbox-cards.js.map +2 -2
  32. package/dist/cjs/components/checkbox-group.d.ts.map +1 -1
  33. package/dist/cjs/components/checkbox-group.js +1 -1
  34. package/dist/cjs/components/checkbox-group.js.map +4 -4
  35. package/dist/cjs/components/checkbox-group.props.d.ts +1 -1
  36. package/dist/cjs/components/checkbox-group.props.js +1 -1
  37. package/dist/cjs/components/checkbox-group.props.js.map +2 -2
  38. package/dist/cjs/components/checkbox.d.ts.map +1 -1
  39. package/dist/cjs/components/checkbox.js +1 -1
  40. package/dist/cjs/components/checkbox.js.map +4 -4
  41. package/dist/cjs/components/checkbox.props.js +1 -1
  42. package/dist/cjs/components/checkbox.props.js.map +2 -2
  43. package/dist/cjs/components/combobox.d.ts.map +1 -1
  44. package/dist/cjs/components/combobox.js +1 -1
  45. package/dist/cjs/components/combobox.js.map +4 -4
  46. package/dist/cjs/components/context-menu.d.ts.map +1 -1
  47. package/dist/cjs/components/context-menu.js +1 -1
  48. package/dist/cjs/components/context-menu.js.map +4 -4
  49. package/dist/cjs/components/data-list.d.ts.map +1 -1
  50. package/dist/cjs/components/data-list.js +1 -1
  51. package/dist/cjs/components/data-list.js.map +4 -4
  52. package/dist/cjs/components/dialog.js +1 -1
  53. package/dist/cjs/components/dialog.js.map +4 -4
  54. package/dist/cjs/components/dropdown-menu.d.ts.map +1 -1
  55. package/dist/cjs/components/dropdown-menu.js +1 -1
  56. package/dist/cjs/components/dropdown-menu.js.map +4 -4
  57. package/dist/cjs/components/hover-card.d.ts.map +1 -1
  58. package/dist/cjs/components/hover-card.js +1 -1
  59. package/dist/cjs/components/hover-card.js.map +4 -4
  60. package/dist/cjs/components/icon-button.js +2 -2
  61. package/dist/cjs/components/icon-button.js.map +4 -4
  62. package/dist/cjs/components/index.js +5 -5
  63. package/dist/cjs/components/index.js.map +4 -4
  64. package/dist/cjs/components/message-scroller.js +2 -2
  65. package/dist/cjs/components/message-scroller.js.map +4 -4
  66. package/dist/cjs/components/navbar.d.ts.map +1 -1
  67. package/dist/cjs/components/navbar.js +1 -1
  68. package/dist/cjs/components/navbar.js.map +4 -4
  69. package/dist/cjs/components/notice.d.ts +1 -1
  70. package/dist/cjs/components/notice.d.ts.map +1 -1
  71. package/dist/cjs/components/notice.js +2 -2
  72. package/dist/cjs/components/notice.js.map +4 -4
  73. package/dist/cjs/components/popover.d.ts.map +1 -1
  74. package/dist/cjs/components/popover.js +1 -1
  75. package/dist/cjs/components/popover.js.map +4 -4
  76. package/dist/cjs/components/progress.js +1 -1
  77. package/dist/cjs/components/progress.js.map +3 -3
  78. package/dist/cjs/components/progress.props.d.ts +0 -7
  79. package/dist/cjs/components/progress.props.d.ts.map +1 -1
  80. package/dist/cjs/components/progress.props.js +1 -1
  81. package/dist/cjs/components/progress.props.js.map +3 -3
  82. package/dist/cjs/components/radio-group.d.ts.map +1 -1
  83. package/dist/cjs/components/radio-group.js +1 -1
  84. package/dist/cjs/components/radio-group.js.map +4 -4
  85. package/dist/cjs/components/radio-group.props.d.ts +1 -1
  86. package/dist/cjs/components/radio-group.props.js +1 -1
  87. package/dist/cjs/components/radio-group.props.js.map +2 -2
  88. package/dist/cjs/components/radio.d.ts.map +1 -1
  89. package/dist/cjs/components/radio.js +1 -1
  90. package/dist/cjs/components/radio.js.map +4 -4
  91. package/dist/cjs/components/radio.props.js +1 -1
  92. package/dist/cjs/components/radio.props.js.map +2 -2
  93. package/dist/cjs/components/scroll-area.d.ts.map +1 -1
  94. package/dist/cjs/components/scroll-area.js +1 -1
  95. package/dist/cjs/components/scroll-area.js.map +3 -3
  96. package/dist/cjs/components/scroll-area.props.d.ts +0 -7
  97. package/dist/cjs/components/scroll-area.props.d.ts.map +1 -1
  98. package/dist/cjs/components/scroll-area.props.js +1 -1
  99. package/dist/cjs/components/scroll-area.props.js.map +3 -3
  100. package/dist/cjs/components/segmented-control.d.ts.map +1 -1
  101. package/dist/cjs/components/segmented-control.js +1 -1
  102. package/dist/cjs/components/segmented-control.js.map +4 -4
  103. package/dist/cjs/components/select.d.ts.map +1 -1
  104. package/dist/cjs/components/select.js +1 -1
  105. package/dist/cjs/components/select.js.map +4 -4
  106. package/dist/cjs/components/separator.js +1 -1
  107. package/dist/cjs/components/separator.js.map +3 -3
  108. package/dist/cjs/components/separator.props.d.ts +0 -7
  109. package/dist/cjs/components/separator.props.d.ts.map +1 -1
  110. package/dist/cjs/components/separator.props.js +1 -1
  111. package/dist/cjs/components/separator.props.js.map +3 -3
  112. package/dist/cjs/components/sheet.js +1 -1
  113. package/dist/cjs/components/sheet.js.map +4 -4
  114. package/dist/cjs/components/shell.d.ts +1 -1
  115. package/dist/cjs/components/shell.d.ts.map +1 -1
  116. package/dist/cjs/components/shell.js +1 -1
  117. package/dist/cjs/components/shell.js.map +4 -4
  118. package/dist/cjs/components/sidebar.js +1 -1
  119. package/dist/cjs/components/sidebar.js.map +4 -4
  120. package/dist/cjs/components/slider.d.ts.map +1 -1
  121. package/dist/cjs/components/slider.js +1 -1
  122. package/dist/cjs/components/slider.js.map +4 -4
  123. package/dist/cjs/components/spinner.js +1 -1
  124. package/dist/cjs/components/spinner.js.map +3 -3
  125. package/dist/cjs/components/spinner.props.d.ts +0 -7
  126. package/dist/cjs/components/spinner.props.d.ts.map +1 -1
  127. package/dist/cjs/components/spinner.props.js +1 -1
  128. package/dist/cjs/components/spinner.props.js.map +3 -3
  129. package/dist/cjs/components/switch.d.ts.map +1 -1
  130. package/dist/cjs/components/switch.js +1 -1
  131. package/dist/cjs/components/switch.js.map +4 -4
  132. package/dist/cjs/components/tab-nav.d.ts.map +1 -1
  133. package/dist/cjs/components/tab-nav.js +1 -1
  134. package/dist/cjs/components/tab-nav.js.map +4 -4
  135. package/dist/cjs/components/table.d.ts.map +1 -1
  136. package/dist/cjs/components/table.js +1 -1
  137. package/dist/cjs/components/table.js.map +4 -4
  138. package/dist/cjs/components/table.props.d.ts +1 -1
  139. package/dist/cjs/components/table.props.js +1 -1
  140. package/dist/cjs/components/table.props.js.map +2 -2
  141. package/dist/cjs/components/tabs.d.ts.map +1 -1
  142. package/dist/cjs/components/tabs.js +1 -1
  143. package/dist/cjs/components/tabs.js.map +4 -4
  144. package/dist/cjs/components/text-area.d.ts.map +1 -1
  145. package/dist/cjs/components/text-area.js +1 -1
  146. package/dist/cjs/components/text-area.js.map +4 -4
  147. package/dist/cjs/components/text-field.d.ts.map +1 -1
  148. package/dist/cjs/components/text-field.js +2 -2
  149. package/dist/cjs/components/text-field.js.map +4 -4
  150. package/dist/cjs/components/theme-panel.js +3 -3
  151. package/dist/cjs/components/theme-panel.js.map +4 -4
  152. package/dist/cjs/components/theme.d.ts +3 -0
  153. package/dist/cjs/components/theme.d.ts.map +1 -1
  154. package/dist/cjs/components/theme.js +1 -1
  155. package/dist/cjs/components/theme.js.map +4 -4
  156. package/dist/cjs/components/theme.props.d.ts +12 -0
  157. package/dist/cjs/components/theme.props.d.ts.map +1 -1
  158. package/dist/cjs/components/theme.props.js +1 -1
  159. package/dist/cjs/components/theme.props.js.map +3 -3
  160. package/dist/cjs/components/toggle-button.js +3 -3
  161. package/dist/cjs/components/toggle-button.js.map +4 -4
  162. package/dist/cjs/components/toggle-icon-button.js +3 -3
  163. package/dist/cjs/components/toggle-icon-button.js.map +4 -4
  164. package/dist/cjs/components/toolbar.d.ts.map +1 -1
  165. package/dist/cjs/components/toolbar.js +2 -2
  166. package/dist/cjs/components/toolbar.js.map +4 -4
  167. package/dist/cjs/components/tooltip.js +1 -1
  168. package/dist/cjs/components/tooltip.js.map +4 -4
  169. package/dist/cjs/helpers/index.d.ts +1 -0
  170. package/dist/cjs/helpers/index.d.ts.map +1 -1
  171. package/dist/cjs/helpers/index.js +3 -3
  172. package/dist/cjs/helpers/index.js.map +4 -4
  173. package/dist/cjs/helpers/map-prop-values.d.ts +1 -4
  174. package/dist/cjs/helpers/map-prop-values.d.ts.map +1 -1
  175. package/dist/cjs/helpers/map-prop-values.js +1 -1
  176. package/dist/cjs/helpers/map-prop-values.js.map +3 -3
  177. package/dist/cjs/helpers/theme-size.d.ts +41 -0
  178. package/dist/cjs/helpers/theme-size.d.ts.map +1 -0
  179. package/dist/cjs/helpers/theme-size.js +2 -0
  180. package/dist/cjs/helpers/theme-size.js.map +7 -0
  181. package/dist/cjs/index.js +7 -7
  182. package/dist/cjs/index.js.map +4 -4
  183. package/dist/cjs/props/index.js +1 -1
  184. package/dist/cjs/props/index.js.map +3 -3
  185. package/dist/esm/{chunk-XZ5XZS5O.js → chunk-35HNDWWM.js} +2 -2
  186. package/dist/esm/chunk-3YLYGKFB.js +2 -0
  187. package/dist/esm/chunk-3YLYGKFB.js.map +7 -0
  188. package/dist/esm/chunk-4DE3ONED.js +2 -0
  189. package/dist/esm/chunk-4DE3ONED.js.map +7 -0
  190. package/dist/esm/chunk-4M55YJMR.js +2 -0
  191. package/dist/esm/chunk-4M55YJMR.js.map +7 -0
  192. package/dist/esm/chunk-4YQXYWDQ.js +2 -0
  193. package/dist/esm/chunk-4YQXYWDQ.js.map +7 -0
  194. package/dist/esm/chunk-54KMG7NX.js +2 -0
  195. package/dist/esm/chunk-54KMG7NX.js.map +7 -0
  196. package/dist/esm/chunk-5R2WX2FU.js +2 -0
  197. package/dist/esm/chunk-5R2WX2FU.js.map +7 -0
  198. package/dist/esm/chunk-5VBJT2VY.js +2 -0
  199. package/dist/esm/chunk-5VBJT2VY.js.map +7 -0
  200. package/dist/esm/chunk-6AZV4VFW.js +2 -0
  201. package/dist/esm/chunk-6AZV4VFW.js.map +7 -0
  202. package/dist/esm/{chunk-YDRFILTX.js → chunk-6YWDEANN.js} +2 -2
  203. package/dist/esm/{chunk-MZQDDG5K.js → chunk-7FZPCM7W.js} +2 -2
  204. package/dist/esm/chunk-7J2QS2UT.js +5 -0
  205. package/dist/esm/chunk-7J2QS2UT.js.map +7 -0
  206. package/dist/esm/chunk-ABS275QZ.js +2 -0
  207. package/dist/esm/chunk-AKPAHQYE.js +2 -0
  208. package/dist/esm/chunk-AKPAHQYE.js.map +7 -0
  209. package/dist/esm/chunk-BN24ZBO7.js +2 -0
  210. package/dist/esm/chunk-BN24ZBO7.js.map +7 -0
  211. package/dist/esm/chunk-BZ6YBP2S.js +2 -0
  212. package/dist/esm/chunk-BZ6YBP2S.js.map +7 -0
  213. package/dist/esm/chunk-CHPZ3LNC.js +2 -0
  214. package/dist/esm/chunk-CHPZ3LNC.js.map +7 -0
  215. package/dist/esm/chunk-CRK34MWY.js +2 -0
  216. package/dist/esm/chunk-CRK34MWY.js.map +7 -0
  217. package/dist/esm/{chunk-YZABQ4LS.js → chunk-DFSW4QR4.js} +2 -2
  218. package/dist/esm/{chunk-SM27AC7E.js → chunk-DJFTDR6Y.js} +2 -2
  219. package/dist/esm/chunk-EA2XSEFH.js +2 -0
  220. package/dist/esm/chunk-EA2XSEFH.js.map +7 -0
  221. package/dist/esm/{chunk-CRYT55SY.js → chunk-EHUSLPWN.js} +2 -2
  222. package/dist/esm/chunk-ENSDQ3XQ.js +2 -0
  223. package/dist/esm/chunk-ENSDQ3XQ.js.map +7 -0
  224. package/dist/esm/chunk-F3XBIUXB.js +2 -0
  225. package/dist/esm/chunk-F3XBIUXB.js.map +7 -0
  226. package/dist/esm/chunk-GHD3TKCA.js +2 -0
  227. package/dist/esm/chunk-GHD3TKCA.js.map +7 -0
  228. package/dist/esm/chunk-GQBQHGEF.js +2 -0
  229. package/dist/esm/chunk-GQBQHGEF.js.map +7 -0
  230. package/dist/esm/{chunk-6XHM724Y.js → chunk-GTVFQXLJ.js} +2 -2
  231. package/dist/esm/chunk-HIEGLLY7.js +2 -0
  232. package/dist/esm/chunk-HIEGLLY7.js.map +7 -0
  233. package/dist/esm/chunk-HZYE46V2.js +2 -0
  234. package/dist/esm/chunk-HZYE46V2.js.map +7 -0
  235. package/dist/esm/chunk-IWT3Q2PD.js +2 -0
  236. package/dist/esm/chunk-IWT3Q2PD.js.map +7 -0
  237. package/dist/esm/chunk-JCRBBT4X.js +2 -0
  238. package/dist/esm/chunk-JCRBBT4X.js.map +7 -0
  239. package/dist/esm/chunk-KFQ4B5YC.js +2 -0
  240. package/dist/esm/chunk-KFQ4B5YC.js.map +7 -0
  241. package/dist/esm/{chunk-6HRBG5H2.js → chunk-KPPIW4OJ.js} +2 -2
  242. package/dist/esm/{chunk-6WFEMPCF.js → chunk-KRXCFIRK.js} +2 -2
  243. package/dist/esm/{chunk-5SQL4ZRC.js → chunk-KSZOVI57.js} +2 -2
  244. package/dist/esm/{chunk-5SQL4ZRC.js.map → chunk-KSZOVI57.js.map} +1 -1
  245. package/dist/esm/{chunk-COSHAOEK.js → chunk-MJEYJI5G.js} +2 -2
  246. package/dist/esm/chunk-MLXHD7YF.js +2 -0
  247. package/dist/esm/chunk-MLXHD7YF.js.map +7 -0
  248. package/dist/esm/{chunk-CG54MBMW.js → chunk-MPN33CKR.js} +2 -2
  249. package/dist/esm/chunk-MQDZBF4J.js +2 -0
  250. package/dist/esm/chunk-MQDZBF4J.js.map +7 -0
  251. package/dist/esm/{chunk-IGBEDJBC.js → chunk-NFVOEHZS.js} +2 -2
  252. package/dist/esm/{chunk-ORMCQAPS.js → chunk-PAQS6C2A.js} +2 -2
  253. package/dist/esm/chunk-PUVZFRTQ.js +2 -0
  254. package/dist/esm/chunk-PUVZFRTQ.js.map +7 -0
  255. package/dist/esm/chunk-QAUYOVVL.js +2 -0
  256. package/dist/esm/chunk-QAUYOVVL.js.map +7 -0
  257. package/dist/esm/chunk-RC7TBVLO.js +2 -0
  258. package/dist/esm/chunk-RC7TBVLO.js.map +7 -0
  259. package/dist/esm/chunk-STMTXK7U.js +2 -0
  260. package/dist/esm/chunk-STMTXK7U.js.map +7 -0
  261. package/dist/esm/chunk-U7PDXTRX.js +2 -0
  262. package/dist/esm/chunk-U7PDXTRX.js.map +7 -0
  263. package/dist/esm/chunk-UNRG6Z5I.js +2 -0
  264. package/dist/esm/chunk-UNRG6Z5I.js.map +7 -0
  265. package/dist/esm/chunk-UONSKZQT.js +2 -0
  266. package/dist/esm/chunk-UONSKZQT.js.map +7 -0
  267. package/dist/esm/{chunk-2IPVLV6B.js → chunk-UQZHW3EJ.js} +2 -2
  268. package/dist/esm/chunk-VIDXAECE.js +2 -0
  269. package/dist/esm/chunk-VIDXAECE.js.map +7 -0
  270. package/dist/esm/chunk-VLLJ7A6P.js +2 -0
  271. package/dist/esm/chunk-VLLJ7A6P.js.map +7 -0
  272. package/dist/esm/{chunk-DP3OWU5T.js → chunk-VT4AAF7Q.js} +2 -2
  273. package/dist/esm/chunk-XVKFQSLI.js +2 -0
  274. package/dist/esm/chunk-XVKFQSLI.js.map +7 -0
  275. package/dist/esm/{chunk-RFURPE7W.js → chunk-YF3MFME4.js} +2 -2
  276. package/dist/esm/{chunk-4STOJSJZ.js → chunk-YVMQWSHA.js} +2 -2
  277. package/dist/esm/{chunk-4STOJSJZ.js.map → chunk-YVMQWSHA.js.map} +2 -2
  278. package/dist/esm/chunk-ZCAI2PRH.js +2 -0
  279. package/dist/esm/chunk-ZCAI2PRH.js.map +7 -0
  280. package/dist/esm/{chunk-S53ZQNHK.js → chunk-ZFBLPW3X.js} +2 -2
  281. package/dist/esm/chunk-ZH2B7WEH.js +2 -0
  282. package/dist/esm/chunk-ZH2B7WEH.js.map +7 -0
  283. package/dist/esm/chunk-ZJZIV2JH.js +2 -0
  284. package/dist/esm/chunk-ZJZIV2JH.js.map +7 -0
  285. package/dist/esm/components/_internal/base-button.d.ts.map +1 -1
  286. package/dist/esm/components/_internal/base-button.js +1 -1
  287. package/dist/esm/components/_internal/base-checkbox.props.d.ts +1 -1
  288. package/dist/esm/components/_internal/base-checkbox.props.js +1 -1
  289. package/dist/esm/components/_internal/base-radio.props.d.ts +1 -1
  290. package/dist/esm/components/_internal/base-radio.props.js +1 -1
  291. package/dist/esm/components/_internal/pane-chrome.js +1 -1
  292. package/dist/esm/components/_internal/shell-sidebar.js +1 -1
  293. package/dist/esm/components/accordion.d.ts.map +1 -1
  294. package/dist/esm/components/accordion.js +1 -1
  295. package/dist/esm/components/alert-dialog.js +1 -1
  296. package/dist/esm/components/badge.js +1 -1
  297. package/dist/esm/components/badge.props.d.ts +1 -1
  298. package/dist/esm/components/badge.props.js +1 -1
  299. package/dist/esm/components/button.js +1 -1
  300. package/dist/esm/components/chatbar.d.ts.map +1 -1
  301. package/dist/esm/components/chatbar.js +1 -1
  302. package/dist/esm/components/checkbox-cards.js +1 -1
  303. package/dist/esm/components/checkbox-group.d.ts.map +1 -1
  304. package/dist/esm/components/checkbox-group.js +1 -1
  305. package/dist/esm/components/checkbox-group.props.d.ts +1 -1
  306. package/dist/esm/components/checkbox-group.props.js +1 -1
  307. package/dist/esm/components/checkbox.d.ts.map +1 -1
  308. package/dist/esm/components/checkbox.js +1 -1
  309. package/dist/esm/components/checkbox.props.js +1 -1
  310. package/dist/esm/components/combobox.d.ts.map +1 -1
  311. package/dist/esm/components/combobox.js +1 -1
  312. package/dist/esm/components/context-menu.d.ts.map +1 -1
  313. package/dist/esm/components/context-menu.js +1 -1
  314. package/dist/esm/components/data-list.d.ts.map +1 -1
  315. package/dist/esm/components/data-list.js +1 -1
  316. package/dist/esm/components/dialog.js +1 -1
  317. package/dist/esm/components/dropdown-menu.d.ts.map +1 -1
  318. package/dist/esm/components/dropdown-menu.js +1 -1
  319. package/dist/esm/components/hover-card.d.ts.map +1 -1
  320. package/dist/esm/components/hover-card.js +1 -1
  321. package/dist/esm/components/icon-button.js +1 -1
  322. package/dist/esm/components/index.js +1 -1
  323. package/dist/esm/components/message-scroller.js +1 -1
  324. package/dist/esm/components/navbar.d.ts.map +1 -1
  325. package/dist/esm/components/navbar.js +1 -1
  326. package/dist/esm/components/notice.d.ts +1 -1
  327. package/dist/esm/components/notice.d.ts.map +1 -1
  328. package/dist/esm/components/notice.js +1 -1
  329. package/dist/esm/components/popover.d.ts.map +1 -1
  330. package/dist/esm/components/popover.js +1 -1
  331. package/dist/esm/components/progress.js +1 -1
  332. package/dist/esm/components/progress.props.d.ts +0 -7
  333. package/dist/esm/components/progress.props.d.ts.map +1 -1
  334. package/dist/esm/components/progress.props.js +1 -1
  335. package/dist/esm/components/radio-group.d.ts.map +1 -1
  336. package/dist/esm/components/radio-group.js +1 -1
  337. package/dist/esm/components/radio-group.props.d.ts +1 -1
  338. package/dist/esm/components/radio-group.props.js +1 -1
  339. package/dist/esm/components/radio.d.ts.map +1 -1
  340. package/dist/esm/components/radio.js +1 -1
  341. package/dist/esm/components/radio.props.js +1 -1
  342. package/dist/esm/components/scroll-area.d.ts.map +1 -1
  343. package/dist/esm/components/scroll-area.js +1 -1
  344. package/dist/esm/components/scroll-area.props.d.ts +0 -7
  345. package/dist/esm/components/scroll-area.props.d.ts.map +1 -1
  346. package/dist/esm/components/scroll-area.props.js +1 -1
  347. package/dist/esm/components/segmented-control.d.ts.map +1 -1
  348. package/dist/esm/components/segmented-control.js +1 -1
  349. package/dist/esm/components/select.d.ts.map +1 -1
  350. package/dist/esm/components/select.js +1 -1
  351. package/dist/esm/components/separator.js +1 -1
  352. package/dist/esm/components/separator.props.d.ts +0 -7
  353. package/dist/esm/components/separator.props.d.ts.map +1 -1
  354. package/dist/esm/components/separator.props.js +1 -1
  355. package/dist/esm/components/sheet.js +1 -1
  356. package/dist/esm/components/shell.d.ts +1 -1
  357. package/dist/esm/components/shell.d.ts.map +1 -1
  358. package/dist/esm/components/shell.js +1 -1
  359. package/dist/esm/components/sidebar.js +1 -1
  360. package/dist/esm/components/slider.d.ts.map +1 -1
  361. package/dist/esm/components/slider.js +1 -1
  362. package/dist/esm/components/spinner.js +1 -1
  363. package/dist/esm/components/spinner.props.d.ts +0 -7
  364. package/dist/esm/components/spinner.props.d.ts.map +1 -1
  365. package/dist/esm/components/spinner.props.js +1 -1
  366. package/dist/esm/components/switch.d.ts.map +1 -1
  367. package/dist/esm/components/switch.js +1 -1
  368. package/dist/esm/components/tab-nav.d.ts.map +1 -1
  369. package/dist/esm/components/tab-nav.js +1 -1
  370. package/dist/esm/components/table.d.ts.map +1 -1
  371. package/dist/esm/components/table.js +1 -1
  372. package/dist/esm/components/table.props.d.ts +1 -1
  373. package/dist/esm/components/table.props.js +1 -1
  374. package/dist/esm/components/tabs.d.ts.map +1 -1
  375. package/dist/esm/components/tabs.js +1 -1
  376. package/dist/esm/components/text-area.d.ts.map +1 -1
  377. package/dist/esm/components/text-area.js +1 -1
  378. package/dist/esm/components/text-field.d.ts.map +1 -1
  379. package/dist/esm/components/text-field.js +1 -1
  380. package/dist/esm/components/theme-panel.js +1 -1
  381. package/dist/esm/components/theme.d.ts +3 -0
  382. package/dist/esm/components/theme.d.ts.map +1 -1
  383. package/dist/esm/components/theme.js +1 -1
  384. package/dist/esm/components/theme.props.d.ts +12 -0
  385. package/dist/esm/components/theme.props.d.ts.map +1 -1
  386. package/dist/esm/components/theme.props.js +1 -1
  387. package/dist/esm/components/toggle-button.js +1 -1
  388. package/dist/esm/components/toggle-icon-button.js +1 -1
  389. package/dist/esm/components/toolbar.d.ts.map +1 -1
  390. package/dist/esm/components/toolbar.js +1 -1
  391. package/dist/esm/components/tooltip.js +1 -1
  392. package/dist/esm/helpers/index.d.ts +1 -0
  393. package/dist/esm/helpers/index.d.ts.map +1 -1
  394. package/dist/esm/helpers/index.js +1 -1
  395. package/dist/esm/helpers/map-prop-values.d.ts +1 -4
  396. package/dist/esm/helpers/map-prop-values.d.ts.map +1 -1
  397. package/dist/esm/helpers/map-prop-values.js +1 -1
  398. package/dist/esm/helpers/theme-size.d.ts +41 -0
  399. package/dist/esm/helpers/theme-size.d.ts.map +1 -0
  400. package/dist/esm/helpers/theme-size.js +2 -0
  401. package/dist/esm/helpers/theme-size.js.map +7 -0
  402. package/dist/esm/index.js +1 -1
  403. package/dist/esm/props/index.js +1 -1
  404. package/layout/tokens.css +14 -0
  405. package/layout.css +14 -0
  406. package/package.json +1 -1
  407. package/src/components/_internal/base-button.css +114 -78
  408. package/src/components/_internal/base-button.tsx +48 -9
  409. package/src/components/_internal/base-checkbox.css +91 -8
  410. package/src/components/_internal/base-checkbox.props.ts +1 -1
  411. package/src/components/_internal/base-radio.css +68 -6
  412. package/src/components/_internal/base-radio.props.ts +1 -1
  413. package/src/components/_internal/base-tab-list.css +33 -25
  414. package/src/components/accordion.tsx +3 -1
  415. package/src/components/avatar.css +21 -15
  416. package/src/components/badge.css +14 -23
  417. package/src/components/badge.props.tsx +1 -1
  418. package/src/components/button.css +5 -175
  419. package/src/components/chatbar.tsx +9 -4
  420. package/src/components/checkbox-group.css +6 -11
  421. package/src/components/checkbox-group.tsx +3 -1
  422. package/src/components/checkbox.css +6 -11
  423. package/src/components/checkbox.tsx +3 -1
  424. package/src/components/combobox.tsx +3 -1
  425. package/src/components/context-menu.tsx +3 -1
  426. package/src/components/data-list.tsx +3 -1
  427. package/src/components/dropdown-menu.tsx +3 -1
  428. package/src/components/hover-card.tsx +3 -1
  429. package/src/components/icon-button.css +4 -152
  430. package/src/components/message-scroller.tsx +1 -1
  431. package/src/components/navbar.tsx +3 -1
  432. package/src/components/notice.tsx +7 -3
  433. package/src/components/popover.tsx +3 -1
  434. package/src/components/progress.css +4 -37
  435. package/src/components/progress.props.tsx +0 -3
  436. package/src/components/radio-group.props.tsx +1 -1
  437. package/src/components/radio-group.tsx +3 -1
  438. package/src/components/radio.tsx +3 -1
  439. package/src/components/scroll-area.css +2 -23
  440. package/src/components/scroll-area.props.tsx +0 -3
  441. package/src/components/scroll-area.tsx +2 -18
  442. package/src/components/segmented-control.css +34 -27
  443. package/src/components/segmented-control.tsx +3 -1
  444. package/src/components/select.css +76 -74
  445. package/src/components/select.tsx +4 -2
  446. package/src/components/separator.css +2 -23
  447. package/src/components/separator.props.tsx +0 -3
  448. package/src/components/shell.tsx +8 -2
  449. package/src/components/slider.css +19 -11
  450. package/src/components/slider.tsx +3 -1
  451. package/src/components/spinner.css +2 -23
  452. package/src/components/spinner.props.tsx +0 -4
  453. package/src/components/switch.css +51 -17
  454. package/src/components/switch.tsx +3 -1
  455. package/src/components/tab-nav.tsx +3 -1
  456. package/src/components/table.props.tsx +1 -1
  457. package/src/components/table.tsx +3 -1
  458. package/src/components/tabs.css +2 -1
  459. package/src/components/tabs.tsx +3 -1
  460. package/src/components/text-area.css +55 -107
  461. package/src/components/text-area.tsx +8 -6
  462. package/src/components/text-field.css +129 -127
  463. package/src/components/text-field.tsx +8 -6
  464. package/src/components/theme.props.tsx +10 -0
  465. package/src/components/theme.tsx +86 -71
  466. package/src/components/toolbar.tsx +3 -1
  467. package/src/helpers/index.ts +1 -0
  468. package/src/helpers/map-prop-values.ts +1 -18
  469. package/src/helpers/theme-size.ts +73 -0
  470. package/src/styles/tokens/constants.css +4 -0
  471. package/src/styles/tokens/space.css +16 -0
  472. package/styles.css +1428 -2641
  473. package/tokens/base.css +14 -0
  474. package/tokens.css +16 -0
  475. package/dist/esm/chunk-2HUAVZZL.js +0 -2
  476. package/dist/esm/chunk-2HUAVZZL.js.map +0 -7
  477. package/dist/esm/chunk-2XSRO44Q.js +0 -2
  478. package/dist/esm/chunk-2XSRO44Q.js.map +0 -7
  479. package/dist/esm/chunk-3KB2XWBE.js +0 -2
  480. package/dist/esm/chunk-3KB2XWBE.js.map +0 -7
  481. package/dist/esm/chunk-4D7OU2UA.js +0 -2
  482. package/dist/esm/chunk-4D7OU2UA.js.map +0 -7
  483. package/dist/esm/chunk-5GYIQIPW.js +0 -2
  484. package/dist/esm/chunk-5GYIQIPW.js.map +0 -7
  485. package/dist/esm/chunk-655TAWHX.js +0 -2
  486. package/dist/esm/chunk-655TAWHX.js.map +0 -7
  487. package/dist/esm/chunk-6VPYP3VN.js +0 -2
  488. package/dist/esm/chunk-6VPYP3VN.js.map +0 -7
  489. package/dist/esm/chunk-7BE6N3KY.js +0 -2
  490. package/dist/esm/chunk-7BE6N3KY.js.map +0 -7
  491. package/dist/esm/chunk-AHOUZS3V.js +0 -2
  492. package/dist/esm/chunk-AHOUZS3V.js.map +0 -7
  493. package/dist/esm/chunk-BALS3AVM.js +0 -2
  494. package/dist/esm/chunk-BALS3AVM.js.map +0 -7
  495. package/dist/esm/chunk-BOLRYGFQ.js +0 -2
  496. package/dist/esm/chunk-BOLRYGFQ.js.map +0 -7
  497. package/dist/esm/chunk-BUEYZEAY.js +0 -2
  498. package/dist/esm/chunk-BUEYZEAY.js.map +0 -7
  499. package/dist/esm/chunk-DKALDTCN.js +0 -2
  500. package/dist/esm/chunk-DKALDTCN.js.map +0 -7
  501. package/dist/esm/chunk-EJOVE3JH.js +0 -2
  502. package/dist/esm/chunk-EJOVE3JH.js.map +0 -7
  503. package/dist/esm/chunk-FPDLBLO3.js +0 -2
  504. package/dist/esm/chunk-FPDLBLO3.js.map +0 -7
  505. package/dist/esm/chunk-GOYI2U6F.js +0 -2
  506. package/dist/esm/chunk-GOYI2U6F.js.map +0 -7
  507. package/dist/esm/chunk-HKRQ3E3I.js +0 -2
  508. package/dist/esm/chunk-HKRQ3E3I.js.map +0 -7
  509. package/dist/esm/chunk-HSFQO4QM.js +0 -2
  510. package/dist/esm/chunk-HSFQO4QM.js.map +0 -7
  511. package/dist/esm/chunk-HVQ3SLQC.js +0 -2
  512. package/dist/esm/chunk-HVQ3SLQC.js.map +0 -7
  513. package/dist/esm/chunk-JCOALADA.js +0 -5
  514. package/dist/esm/chunk-JCOALADA.js.map +0 -7
  515. package/dist/esm/chunk-K7J23OPW.js +0 -2
  516. package/dist/esm/chunk-K7J23OPW.js.map +0 -7
  517. package/dist/esm/chunk-M55KFXYV.js +0 -2
  518. package/dist/esm/chunk-M55KFXYV.js.map +0 -7
  519. package/dist/esm/chunk-MGSHX5N5.js +0 -2
  520. package/dist/esm/chunk-MGSHX5N5.js.map +0 -7
  521. package/dist/esm/chunk-MJC4NKYG.js +0 -2
  522. package/dist/esm/chunk-MJC4NKYG.js.map +0 -7
  523. package/dist/esm/chunk-MOYLXCMW.js +0 -2
  524. package/dist/esm/chunk-MOYLXCMW.js.map +0 -7
  525. package/dist/esm/chunk-MVW2SY4F.js +0 -2
  526. package/dist/esm/chunk-MVW2SY4F.js.map +0 -7
  527. package/dist/esm/chunk-NOSR2XWD.js +0 -2
  528. package/dist/esm/chunk-NOSR2XWD.js.map +0 -7
  529. package/dist/esm/chunk-OMUUPPJO.js +0 -2
  530. package/dist/esm/chunk-OMUUPPJO.js.map +0 -7
  531. package/dist/esm/chunk-PNIVUG5D.js +0 -2
  532. package/dist/esm/chunk-PNIVUG5D.js.map +0 -7
  533. package/dist/esm/chunk-PSS45RHX.js +0 -2
  534. package/dist/esm/chunk-PSS45RHX.js.map +0 -7
  535. package/dist/esm/chunk-PYYI64XK.js +0 -2
  536. package/dist/esm/chunk-PYYI64XK.js.map +0 -7
  537. package/dist/esm/chunk-QJFAGWBO.js +0 -2
  538. package/dist/esm/chunk-QJFAGWBO.js.map +0 -7
  539. package/dist/esm/chunk-QWFFYUFH.js +0 -2
  540. package/dist/esm/chunk-QWFFYUFH.js.map +0 -7
  541. package/dist/esm/chunk-RVHKSNMJ.js +0 -2
  542. package/dist/esm/chunk-RVHKSNMJ.js.map +0 -7
  543. package/dist/esm/chunk-RYURXQLJ.js +0 -2
  544. package/dist/esm/chunk-RYURXQLJ.js.map +0 -7
  545. package/dist/esm/chunk-UA6FP7HS.js +0 -2
  546. package/dist/esm/chunk-V7UP4SLZ.js +0 -2
  547. package/dist/esm/chunk-V7UP4SLZ.js.map +0 -7
  548. package/dist/esm/chunk-X5KCVLKG.js +0 -2
  549. package/dist/esm/chunk-X5KCVLKG.js.map +0 -7
  550. package/dist/esm/chunk-XPRPYCII.js +0 -2
  551. package/dist/esm/chunk-XPRPYCII.js.map +0 -7
  552. /package/dist/esm/{chunk-XZ5XZS5O.js.map → chunk-35HNDWWM.js.map} +0 -0
  553. /package/dist/esm/{chunk-YDRFILTX.js.map → chunk-6YWDEANN.js.map} +0 -0
  554. /package/dist/esm/{chunk-MZQDDG5K.js.map → chunk-7FZPCM7W.js.map} +0 -0
  555. /package/dist/esm/{chunk-UA6FP7HS.js.map → chunk-ABS275QZ.js.map} +0 -0
  556. /package/dist/esm/{chunk-YZABQ4LS.js.map → chunk-DFSW4QR4.js.map} +0 -0
  557. /package/dist/esm/{chunk-SM27AC7E.js.map → chunk-DJFTDR6Y.js.map} +0 -0
  558. /package/dist/esm/{chunk-CRYT55SY.js.map → chunk-EHUSLPWN.js.map} +0 -0
  559. /package/dist/esm/{chunk-6XHM724Y.js.map → chunk-GTVFQXLJ.js.map} +0 -0
  560. /package/dist/esm/{chunk-6HRBG5H2.js.map → chunk-KPPIW4OJ.js.map} +0 -0
  561. /package/dist/esm/{chunk-6WFEMPCF.js.map → chunk-KRXCFIRK.js.map} +0 -0
  562. /package/dist/esm/{chunk-COSHAOEK.js.map → chunk-MJEYJI5G.js.map} +0 -0
  563. /package/dist/esm/{chunk-CG54MBMW.js.map → chunk-MPN33CKR.js.map} +0 -0
  564. /package/dist/esm/{chunk-IGBEDJBC.js.map → chunk-NFVOEHZS.js.map} +0 -0
  565. /package/dist/esm/{chunk-ORMCQAPS.js.map → chunk-PAQS6C2A.js.map} +0 -0
  566. /package/dist/esm/{chunk-2IPVLV6B.js.map → chunk-UQZHW3EJ.js.map} +0 -0
  567. /package/dist/esm/{chunk-DP3OWU5T.js.map → chunk-VT4AAF7Q.js.map} +0 -0
  568. /package/dist/esm/{chunk-RFURPE7W.js.map → chunk-YF3MFME4.js.map} +0 -0
  569. /package/dist/esm/{chunk-S53ZQNHK.js.map → chunk-ZFBLPW3X.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"accordion.d.ts","sourceRoot":"","sources":["../../../src/components/accordion.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,SAAS,IAAI,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAW3D,OAAO,KAAK,EACV,qBAAqB,EACrB,qBAAqB,EACrB,uBAAuB,EACvB,wBAAwB,EACxB,wBAAwB,EACzB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAIzF,UAAU,kBACR,SAAQ,qBAAqB,CAAC,OAAO,kBAAkB,CAAC,IAA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riptor;var U=Object.getOwnPropertyNames;var L=Object.getPrototypeOf,Y=Object.prototype.hasOwnProperty;var _=(o,e)=>{for(var t in e)R(o,t,{get:e[t],enumerable:!0})},S=(o,e,t,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of U(e))!Y.call(o,i)&&i!==t&&R(o,i,{get:()=>e[i],enumerable:!(s=M(e,i))||s.enumerable});return o};var v=(o,e,t)=>(t=o!=null?q(L(o)):{},S(e||!o||!o.__esModule?R(t,"default",{value:o,enumerable:!0}):t,o)),F=o=>S(R({},"__esModule",{value:!0}),o);var pe={};_(pe,{Content:()=>z,Header:()=>B,Item:()=>W,Root:()=>K,Trigger:()=>G});module.exports=F(pe);var f=v(require("react")),y=v(require("classnames")),P=require("radix-ui");var m={asChild:{type:"boolean"}};var J=["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 N={color:{type:"enum",values:J,default:void 0}};var Q=["none","small","medium","large","full"],x={radius:{type:"enum",values:Q,default:void 0}};var X=["1","2","3","4"],Z=["raised","soft","surface","outline","ghost"],w={...m,size:{type:"enum",className:"rt-r-size",values:X,default:"2",responsive:!0},variant:{type:"enum",className:"rt-variant",values:Z,default:"raised"},...N,...x,flush:{type:"boolean",default:!1}},O={...m},k={...m},V={...m},E={...m};var $=v(require("classnames"));var ee=[],oe=new Set;function te(o){let e=Object.assign({},...o),t=[],s=[],i=new Set;for(let p in e){let n=e[p],a=n.values??ee,c={key:p,type:n.type,default:n.default,hasDefault:n.default!==void 0,responsive:"responsive"in n,className:n.className,customProperties:n.customProperties,parseValue:n.parseValue,values:a,valueSet:a.length>0?new Set(a):oe,enumValueSet:n.type==="enum"?new Set([n.default,...a]):void 0};n.className?(t.push(c),i.add(p)):(c.hasDefault||n.type==="enum")&&s.push(c)}return{styling:t,passthrough:s,stylingKeys:i}}var re={children:new WeakMap};function j(o){let e=re;for(let t=0;t<o.length;t++){let s=o[t],i=e.children.get(s);i===void 0&&(i={children:new WeakMap},e.children.set(s,i)),e=i}return e.compiled??(e.compiled=te(o))}var ne=["initial","xs","sm","md","lg","xl"],C=new Set(ne);function b(o,e){return Object.prototype.hasOwnProperty.call(o,e)}var se=new Set(["initial","xs","sm","md","lg","xl"]);function u(o){if(typeof o!="object"||o===null)return!1;for(let e in o)if(se.has(e))return!0;return!1}function D(o,e,t){return e!==void 0?e.has(t):o.includes(t)}function I({className:o,customProperties:e,...t}){let s=h({allowArbitraryValues:!0,className:o,...t}),i=ie({customProperties:e,...t});return[s,i]}function h({allowArbitraryValues:o,value:e,className:t,propValues:s,propValueSet:i,parseValue:p=n=>n}){if(e){if(typeof e=="string")return D(s,i,e)?H(t,e,p):o?t:void 0;if(u(e)){let n=e,a=[];for(let c in n){if(!b(n,c)||!C.has(c))continue;let r=n[c];if(r!==void 0){if(D(s,i,r)){let l=H(t,r,p),d=c==="initial"?l:`${c}:${l}`;a.push(d)}else if(o){let l=c==="initial"?t:`${c}:${t}`;a.push(l)}}}return a.length>0?a.join(" "):""}if(o)return t}}function H(o,e,t){let s=o?"-":"",i=t(e),p=i?.startsWith("-"),n=p?"-":"",a=p?i?.substring(1):i;return`${n}${o}${s}${a}`}function ie({customProperties:o,value:e,propValues:t,propValueSet:s,parseValue:i=p=>p}){if(!e||typeof e=="string"&&D(t,s,e))return;let p;if(typeof e=="string"){let n=i(e);p={};for(let a of o)p[a]=n;return p}if(u(e)){let n=e;for(let a in n){if(!b(n,a)||!C.has(a))continue;let c=n[a];if(c===void 0||D(t,s,c))continue;let r=i(c);p??(p={});for(let l of o){let d=a==="initial"?l:`${l}-${a}`;p[d]=r}}}return p??{}}function A(...o){let e;for(let t of o)t&&(e===void 0&&(e={}),Object.assign(e,t));return e}function ae(o,e){let t=o.initial,s=!1;return e.hasDefault&&t===void 0&&(t=e.default,s=!0),e.enumValueSet!==void 0&&!e.enumValueSet.has(t)&&(t=e.default,s=!0),s?{...o,initial:t}:o}function g(o,...e){let{styling:t,passthrough:s,stylingKeys:i}=j(e),p={};for(let c in o)i.has(c)||(p[c]=o[c]);for(let c=0;c<s.length;c++){let r=s[c],l=p[r.key];if(l===void 0){r.hasDefault&&(p[r.key]=r.default);continue}r.enumValueSet!==void 0&&!r.enumValueSet.has(l)&&!u(l)&&(p[r.key]=r.default)}let n,a=[];for(let c=0;c<t.length;c++){let r=t[c],l=o[r.key];if(l===void 0&&r.hasDefault&&(l=r.default),r.enumValueSet!==void 0&&!r.enumValueSet.has(l)&&!u(l)&&(l=r.default),!!l){if(u(l)){if(!r.responsive)continue;l=ae(l,r)}if(r.type==="enum"){let d=h({allowArbitraryValues:!1,value:l,className:r.className,propValues:r.values,propValueSet:r.valueSet,parseValue:r.parseValue});d&&a.push(d);continue}if(r.type==="string"||r.type==="enum | string"){let[d,T]=I({className:r.className,customProperties:r.customProperties,propValues:r.type==="string"?[]:r.values,propValueSet:r.type==="string"?void 0:r.valueSet,parseValue:r.parseValue,value:l});T&&(n=A(n,T)),d&&a.push(d);continue}if(r.type==="boolean"){a.push(r.className);continue}}}return p.className=(0,$.default)(a.length>0?a.join(" "):void 0,o.className),p.style=A(n,o.style),p}var K=f.forwardRef((o,e)=>{let{className:t,flush:s,radius:i,color:p,...n}=g(o,w),a=n;a.type==="single"&&a.collapsible===void 0&&(a.collapsible=!0);let c=f.useCallback(r=>{if(a.type==="multiple"){let l=r.currentTarget.querySelectorAll("[data-radix-accordion-item]");r.key==="Home"?(r.preventDefault(),l[0]?.querySelector("[data-radix-accordion-trigger]")?.focus()):r.key==="End"&&(r.preventDefault(),l[l.length-1]?.querySelector("[data-radix-accordion-trigger]")?.focus())}},[a.type]);return f.createElement(P.Accordion.Root,{...a,ref:e,className:(0,y.default)("rt-AccordionRoot",t),"data-accent-color":p,"data-flush":s||void 0,"data-radius":i,onKeyDown:c})});K.displayName="Accordion.Root";var W=f.forwardRef((o,e)=>{let{className:t,...s}=g(o,O);return f.createElement(P.Accordion.Item,{...s,ref:e,className:(0,y.default)("rt-AccordionItem",t)})});W.displayName="Accordion.Item";var B=f.forwardRef((o,e)=>{let{className:t,...s}=g(o,k);return f.createElement(P.Accordion.Header,{...s,ref:e,className:(0,y.default)("rt-AccordionHeader",t)})});B.displayName="Accordion.Header";var G=f.forwardRef(({children:o,...e},t)=>{let{className:s,...i}=g(e,V),p=f.useRef(null);return f.createElement(P.Accordion.Trigger,{...i,ref:n=>{p.current=n,typeof t=="function"?t(n):t&&(t.current=n)},className:(0,y.default)("rt-AccordionTrigger",s)},o)});G.displayName="Accordion.Trigger";var z=f.forwardRef((o,e)=>{let{className:t,children:s,...i}=g(o,E);return f.createElement(P.Accordion.Content,{...i,ref:e,className:(0,y.default)("rt-AccordionContent",t),"aria-live":"polite"},f.createElement("div",{className:"rt-AccordionContentInner"},s))});z.displayName="Accordion.Content";
1
+ "use strict";var L=Object.create;var D=Object.defineProperty;var _=Object.getOwnPropertyDescriptor;var Y=Object.getOwnPropertyNames;var F=Object.getPrototypeOf,Z=Object.prototype.hasOwnProperty;var J=(o,e)=>{for(var t in e)D(o,t,{get:e[t],enumerable:!0})},x=(o,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Y(e))!Z.call(o,i)&&i!==t&&D(o,i,{get:()=>e[i],enumerable:!(r=_(e,i))||r.enumerable});return o};var v=(o,e,t)=>(t=o!=null?L(F(o)):{},x(e||!o||!o.__esModule?D(t,"default",{value:o,enumerable:!0}):t,o)),Q=o=>x(D({},"__esModule",{value:!0}),o);var ue={};J(ue,{Content:()=>q,Header:()=>M,Item:()=>G,Root:()=>B,Trigger:()=>U});module.exports=Q(ue);var f=v(require("react")),y=v(require("classnames")),P=require("radix-ui");var m={asChild:{type:"boolean"}};var X=["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 V={color:{type:"enum",values:X,default:void 0}};var ee=["none","small","medium","large","full"],w={radius:{type:"enum",values:ee,default:void 0}};var oe=["1","2","3","4"],te=["raised","soft","surface","outline","ghost"],S={...m,size:{type:"enum",className:"rt-r-size",values:oe,default:"2",responsive:!0},variant:{type:"enum",className:"rt-variant",values:te,default:"raised"},...V,...w,flush:{type:"boolean",default:!1}},k={...m},O={...m},E={...m},z={...m};var $=v(require("classnames"));var re=[],ne=new Set;function se(o){let e=Object.assign({},...o),t=[],r=[],i=new Set;for(let a in e){let s=e[a],l=s.values??re,p={key:a,type:s.type,default:s.default,hasDefault:s.default!==void 0,responsive:"responsive"in s,className:s.className,customProperties:s.customProperties,parseValue:s.parseValue,values:l,valueSet:l.length>0?new Set(l):ne,enumValueSet:s.type==="enum"?new Set([s.default,...l]):void 0};s.className?(t.push(p),i.add(a)):(p.hasDefault||s.type==="enum")&&r.push(p)}return{styling:t,passthrough:r,stylingKeys:i}}var ie={children:new WeakMap};function I(o){let e=ie;for(let t=0;t<o.length;t++){let r=o[t],i=e.children.get(r);i===void 0&&(i={children:new WeakMap},e.children.set(r,i)),e=i}return e.compiled??(e.compiled=se(o))}var ae=["initial","xs","sm","md","lg","xl"],T=new Set(ae);function b(o,e){return Object.prototype.hasOwnProperty.call(o,e)}var pe=new Set(["initial","xs","sm","md","lg","xl"]);function u(o){if(typeof o!="object"||o===null)return!1;for(let e in o)if(pe.has(e))return!0;return!1}function h(o,e,t){return e!==void 0?e.has(t):o.includes(t)}function H({className:o,customProperties:e,...t}){let r=A({allowArbitraryValues:!0,className:o,...t}),i=ce({customProperties:e,...t});return[r,i]}function A({allowArbitraryValues:o,value:e,className:t,propValues:r,propValueSet:i,parseValue:a=s=>s}){if(e){if(typeof e=="string")return h(r,i,e)?j(t,e,a):o?t:void 0;if(u(e)){let s=e,l=[];for(let p in s){if(!b(s,p)||!T.has(p))continue;let n=s[p];if(n!==void 0){if(h(r,i,n)){let c=j(t,n,a),d=p==="initial"?c:`${p}:${c}`;l.push(d)}else if(o){let c=p==="initial"?t:`${p}:${t}`;l.push(c)}}}return l.length>0?l.join(" "):""}if(o)return t}}function j(o,e,t){let r=o?"-":"",i=t(e),a=i?.startsWith("-"),s=a?"-":"",l=a?i?.substring(1):i;return`${s}${o}${r}${l}`}function ce({customProperties:o,value:e,propValues:t,propValueSet:r,parseValue:i=a=>a}){if(!e||typeof e=="string"&&h(t,r,e))return;let a;if(typeof e=="string"){let s=i(e);a={};for(let l of o)a[l]=s;return a}if(u(e)){let s=e;for(let l in s){if(!b(s,l)||!T.has(l))continue;let p=s[l];if(p===void 0||h(t,r,p))continue;let n=i(p);a??(a={});for(let c of o){let d=l==="initial"?c:`${c}-${l}`;a[d]=n}}}return a??{}}function N(...o){let e;for(let t of o)t&&(e===void 0&&(e={}),Object.assign(e,t));return e}function le(o,e){let t=o.initial,r=!1;return e.hasDefault&&t===void 0&&(t=e.default,r=!0),e.enumValueSet!==void 0&&!e.enumValueSet.has(t)&&(t=e.default,r=!0),r?{...o,initial:t}:o}function g(o,...e){let{styling:t,passthrough:r,stylingKeys:i}=I(e),a={};for(let p in o)i.has(p)||(a[p]=o[p]);for(let p=0;p<r.length;p++){let n=r[p],c=a[n.key];if(c===void 0){n.hasDefault&&(a[n.key]=n.default);continue}n.enumValueSet!==void 0&&!n.enumValueSet.has(c)&&!u(c)&&(a[n.key]=n.default)}let s,l=[];for(let p=0;p<t.length;p++){let n=t[p],c=o[n.key];if(c===void 0&&n.hasDefault&&(c=n.default),n.enumValueSet!==void 0&&!n.enumValueSet.has(c)&&!u(c)&&(c=n.default),!!c){if(u(c)){if(!n.responsive)continue;c=le(c,n)}if(n.type==="enum"){let d=A({allowArbitraryValues:!1,value:c,className:n.className,propValues:n.values,propValueSet:n.valueSet,parseValue:n.parseValue});d&&l.push(d);continue}if(n.type==="string"||n.type==="enum | string"){let[d,R]=H({className:n.className,customProperties:n.customProperties,propValues:n.type==="string"?[]:n.values,propValueSet:n.type==="string"?void 0:n.valueSet,parseValue:n.parseValue,value:c});R&&(s=N(s,R)),d&&l.push(d);continue}if(n.type==="boolean"){l.push(n.className);continue}}}return a.className=(0,$.default)(l.length>0?l.join(" "):void 0,o.className),a.style=N(s,o.style),a}var C=v(require("react")),fe="2",K=C.createContext(fe);K.displayName="ThemeSizeContext";function de(o,e){if(e.includes(o))return o;let t=Number(o),r=e[0],i=1/0;for(let a=0;a<e.length;a++){let s=Math.abs(Number(e[a])-t);s<i&&(i=s,r=e[a])}return r}function W(o,e){let t=C.useContext(K);if(o.size!==void 0)return o;let r=de(t,e.values);return r===e.default?o:{...o,size:r}}var B=f.forwardRef((o,e)=>{let t=W(o,S.size),{className:r,flush:i,radius:a,color:s,...l}=g(t,S),p=l;p.type==="single"&&p.collapsible===void 0&&(p.collapsible=!0);let n=f.useCallback(c=>{if(p.type==="multiple"){let d=c.currentTarget.querySelectorAll("[data-radix-accordion-item]");c.key==="Home"?(c.preventDefault(),d[0]?.querySelector("[data-radix-accordion-trigger]")?.focus()):c.key==="End"&&(c.preventDefault(),d[d.length-1]?.querySelector("[data-radix-accordion-trigger]")?.focus())}},[p.type]);return f.createElement(P.Accordion.Root,{...p,ref:e,className:(0,y.default)("rt-AccordionRoot",r),"data-accent-color":s,"data-flush":i||void 0,"data-radius":a,onKeyDown:n})});B.displayName="Accordion.Root";var G=f.forwardRef((o,e)=>{let{className:t,...r}=g(o,k);return f.createElement(P.Accordion.Item,{...r,ref:e,className:(0,y.default)("rt-AccordionItem",t)})});G.displayName="Accordion.Item";var M=f.forwardRef((o,e)=>{let{className:t,...r}=g(o,O);return f.createElement(P.Accordion.Header,{...r,ref:e,className:(0,y.default)("rt-AccordionHeader",t)})});M.displayName="Accordion.Header";var U=f.forwardRef(({children:o,...e},t)=>{let{className:r,...i}=g(e,E),a=f.useRef(null);return f.createElement(P.Accordion.Trigger,{...i,ref:s=>{a.current=s,typeof t=="function"?t(s):t&&(t.current=s)},className:(0,y.default)("rt-AccordionTrigger",r)},o)});U.displayName="Accordion.Trigger";var q=f.forwardRef((o,e)=>{let{className:t,children:r,...i}=g(o,z);return f.createElement(P.Accordion.Content,{...i,ref:e,className:(0,y.default)("rt-AccordionContent",t),"aria-live":"polite"},f.createElement("div",{className:"rt-AccordionContentInner"},r))});q.displayName="Accordion.Content";
2
2
  //# sourceMappingURL=accordion.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 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/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"],
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 { extractProps } from '../helpers/extract-props.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>;\ninterface AccordionRootProps\n extends ComponentPropsWithout<typeof AccordionPrimitive.Root, RemovedProps>,\n AccordionRootOwnProps {}\n\nconst AccordionRoot = React.forwardRef<AccordionRootElement, AccordionRootProps>(\n (props, forwardedRef) => {\n const { className, flush, radius, color, ...extractedRadixProps } =\n extractProps(props, accordionRootPropDefs);\n\n const radixProps = extractedRadixProps as React.ComponentPropsWithoutRef<\n typeof AccordionPrimitive.Root\n >;\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 // Handle Home/End key navigation for multi-item accordions\n const handleKeyDown = React.useCallback(\n (event: React.KeyboardEvent) => {\n if (radixProps.type === 'multiple') {\n const items = event.currentTarget.querySelectorAll('[data-radix-accordion-item]');\n\n if (event.key === 'Home') {\n event.preventDefault();\n const firstTrigger = items[0]?.querySelector(\n '[data-radix-accordion-trigger]',\n ) as HTMLElement;\n firstTrigger?.focus();\n } else if (event.key === 'End') {\n event.preventDefault();\n const lastTrigger = items[items.length - 1]?.querySelector(\n '[data-radix-accordion-trigger]',\n ) as HTMLElement;\n lastTrigger?.focus();\n }\n }\n },\n [radixProps.type],\n );\n\n return (\n <AccordionPrimitive.Root\n {...radixProps}\n ref={forwardedRef}\n className={classNames('rt-AccordionRoot', className)}\n data-accent-color={color}\n data-flush={flush || undefined}\n data-radius={radius}\n onKeyDown={handleKeyDown}\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('rt-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('rt-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 // Radix UI handles focus management automatically\n const triggerRef = React.useRef<HTMLButtonElement>(null);\n\n return (\n <AccordionPrimitive.Trigger\n {...triggerProps}\n ref={(node) => {\n triggerRef.current = node;\n if (typeof forwardedRef === 'function') {\n forwardedRef(node);\n } else if (forwardedRef) {\n forwardedRef.current = node;\n }\n }}\n className={classNames('rt-AccordionTrigger', className)}\n >\n {children}\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('rt-AccordionContent', className)}\n aria-live=\"polite\"\n >\n <div className=\"rt-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 (Badge, 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: 'rt-r-size', values: sizes, default: '2', responsive: true },\n variant: { type: 'enum', className: 'rt-variant', values: variants, default: 'raised' },\n ...colorPropDef,\n ...radiusPropDef,\n flush: { type: 'boolean', default: false },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n variant: PropDef<(typeof variants)[number]>;\n flush: PropDef<boolean>;\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 flush?: boolean;\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 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"],
5
- "mappings": "0jBAAA,IAAAA,GAAA,GAAAC,EAAAD,GAAA,aAAAE,EAAA,WAAAC,EAAA,SAAAC,EAAA,SAAAC,EAAA,YAAAC,IAAA,eAAAC,EAAAP,IAAA,IAAAQ,EAAuB,oBACvBC,EAAuB,yBACvBC,EAAgD,oBCAhD,IAAMC,EAAiB,CAKrB,QAAS,CACP,KAAM,SACR,CACF,ECPA,IAAMC,EA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AAS,EACvD,CAEJ,CACF,EACAgB,EAAgB,YAAc,mBAQ9B,IAAMG,EAAyB,aAC7B,CAAC,CAAE,SAAAC,EAAU,GAAGtB,CAAM,EAAGC,IAAiB,CACxC,GAAM,CAAE,UAAAC,EAAW,GAAGqB,CAAa,EAAIhB,EAAaP,EAAOwB,CAAwB,EAG7EC,EAAmB,SAA0B,IAAI,EAEvD,OACE,gBAAC,EAAAZ,UAAmB,QAAnB,CACE,GAAGU,EACJ,IAAMG,GAAS,CACbD,EAAW,QAAUC,EACjB,OAAOzB,GAAiB,WAC1BA,EAAayB,CAAI,EACRzB,IACTA,EAAa,QAAUyB,EAE3B,EACA,aAAW,EAAAZ,SAAW,sBAAuBZ,CAAS,GAErDoB,CACH,CAEJ,CACF,EACAD,EAAiB,YAAc,oBAQ/B,IAAMM,EAAyB,aAC7B,CAAC3B,EAAOC,IAAiB,CACvB,GAAM,CAAE,UAAAC,EAAW,SAAAoB,EAAU,GAAGM,CAAa,EAAIrB,EAAaP,EAAO6B,CAAwB,EAE7F,OACE,gBAAC,EAAAhB,UAAmB,QAAnB,CACE,GAAGe,EACJ,IAAK3B,EACL,aAAW,EAAAa,SAAW,sBAAuBZ,CAAS,EACtD,YAAU,UAEV,gBAAC,OAAI,UAAU,4BAA4BoB,CAAS,CACtD,CAEJ,CACF,EACAK,EAAiB,YAAc",
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_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", "AccordionRoot", "props", "forwardedRef", "className", "flush", "radius", "color", "extractedRadixProps", "extractProps", "accordionRootPropDefs", "radixProps", "handleKeyDown", "event", "items", "AccordionPrimitive", "classNames", "AccordionItem", "itemProps", "accordionItemPropDefs", "AccordionHeader", "headerProps", "accordionHeaderPropDefs", "AccordionTrigger", "children", "triggerProps", "accordionTriggerPropDefs", "triggerRef", "node", "AccordionContent", "contentProps", "accordionContentPropDefs"]
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/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/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 { extractProps } from '../helpers/extract-props.js';\nimport { useThemeSizeProps } from '../helpers/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>;\ninterface AccordionRootProps\n extends ComponentPropsWithout<typeof AccordionPrimitive.Root, RemovedProps>,\n AccordionRootOwnProps {}\n\nconst AccordionRoot = React.forwardRef<AccordionRootElement, AccordionRootProps>(\n (ownProps, forwardedRef) => {\n const props = useThemeSizeProps(ownProps, accordionRootPropDefs.size);\n const { className, flush, radius, color, ...extractedRadixProps } =\n extractProps(props, accordionRootPropDefs);\n\n const radixProps = extractedRadixProps as React.ComponentPropsWithoutRef<\n typeof AccordionPrimitive.Root\n >;\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 // Handle Home/End key navigation for multi-item accordions\n const handleKeyDown = React.useCallback(\n (event: React.KeyboardEvent) => {\n if (radixProps.type === 'multiple') {\n const items = event.currentTarget.querySelectorAll('[data-radix-accordion-item]');\n\n if (event.key === 'Home') {\n event.preventDefault();\n const firstTrigger = items[0]?.querySelector(\n '[data-radix-accordion-trigger]',\n ) as HTMLElement;\n firstTrigger?.focus();\n } else if (event.key === 'End') {\n event.preventDefault();\n const lastTrigger = items[items.length - 1]?.querySelector(\n '[data-radix-accordion-trigger]',\n ) as HTMLElement;\n lastTrigger?.focus();\n }\n }\n },\n [radixProps.type],\n );\n\n return (\n <AccordionPrimitive.Root\n {...radixProps}\n ref={forwardedRef}\n className={classNames('rt-AccordionRoot', className)}\n data-accent-color={color}\n data-flush={flush || undefined}\n data-radius={radius}\n onKeyDown={handleKeyDown}\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('rt-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('rt-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 // Radix UI handles focus management automatically\n const triggerRef = React.useRef<HTMLButtonElement>(null);\n\n return (\n <AccordionPrimitive.Trigger\n {...triggerProps}\n ref={(node) => {\n triggerRef.current = node;\n if (typeof forwardedRef === 'function') {\n forwardedRef(node);\n } else if (forwardedRef) {\n forwardedRef.current = node;\n }\n }}\n className={classNames('rt-AccordionTrigger', className)}\n >\n {children}\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('rt-AccordionContent', className)}\n aria-live=\"polite\"\n >\n <div className=\"rt-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 (Badge, 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: 'rt-r-size', values: sizes, default: '2', responsive: true },\n variant: { type: 'enum', className: 'rt-variant', values: variants, default: 'raised' },\n ...colorPropDef,\n ...radiusPropDef,\n flush: { type: 'boolean', default: false },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n variant: PropDef<(typeof variants)[number]>;\n flush: PropDef<boolean>;\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 flush?: boolean;\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 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\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 * 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 * 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\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, THEME_SIZE_DEFAULT, clampSize, useThemeSize, useThemeSizeProps };\nexport type { ThemeSize };\n"],
5
+ "mappings": "0jBAAA,IAAAA,GAAA,GAAAC,EAAAD,GAAA,aAAAE,EAAA,WAAAC,EAAA,SAAAC,EAAA,SAAAC,EAAA,YAAAC,IAAA,eAAAC,EAAAP,IAAA,IAAAQ,EAAuB,oBACvBC,EAAuB,yBACvBC,EAAgD,oBCAhD,IAAMC,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,GAAQ,CAAC,OAAQ,QAAS,SAAU,QAAS,MAAM,EAEnDC,EAAgB,CACpB,OAAQ,CACN,KAAM,OACN,OAAQD,GACR,QAAS,MACX,CACF,EC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ionRoot", "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_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", "THEME_SIZE_DEFAULT", "ThemeSizeContext", "clampSize", "size", "values", "n", "nearest", "distance", "i", "d", "useThemeSizeProps", "props", "propDef", "themeSize", "ThemeSizeContext", "size", "clampSize", "AccordionRoot", "ownProps", "forwardedRef", "props", "useThemeSizeProps", "accordionRootPropDefs", "className", "flush", "radius", "color", "extractedRadixProps", "extractProps", "radixProps", "handleKeyDown", "event", "items", "AccordionPrimitive", "classNames", "AccordionItem", "itemProps", "accordionItemPropDefs", "AccordionHeader", "headerProps", "accordionHeaderPropDefs", "AccordionTrigger", "children", "triggerProps", "accordionTriggerPropDefs", "triggerRef", "node", "AccordionContent", "contentProps", "accordionContentPropDefs"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";var ze=Object.create;var k=Object.defineProperty;var Be=Object.getOwnPropertyDescriptor;var Ie=Object.getOwnPropertyNames;var $e=Object.getPrototypeOf,Le=Object.prototype.hasOwnProperty;var Ke=(e,t)=>{for(var o in t)k(e,o,{get:t[o],enumerable:!0})},ce=(e,t,o,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Ie(t))!Le.call(e,s)&&s!==o&&k(e,s,{get:()=>t[s],enumerable:!(i=Be(t,s))||i.enumerable});return e};var h=(e,t,o)=>(o=e!=null?ze($e(e)):{},ce(t||!e||!e.__esModule?k(o,"default",{value:e,enumerable:!0}):o,e)),qe=e=>ce(k({},"__esModule",{value:!0}),e);var ht={};Ke(ht,{Action:()=>We,Cancel:()=>Oe,Content:()=>Ve,Description:()=>je,Root:()=>Ee,Title:()=>ke,Trigger:()=>He});module.exports=qe(ht);var f=h(require("react")),we=h(require("classnames")),P=require("radix-ui");var C={asChild:{type:"boolean"}};var j={width:{type:"string",className:"rt-r-w",customProperties:["--width"],responsive:!0},minWidth:{type:"string",className:"rt-r-min-w",customProperties:["--min-width"],responsive:!0},maxWidth:{type:"string",className:"rt-r-max-w",customProperties:["--max-width"],responsive:!0}};var ue={height:{type:"string",className:"rt-r-h",customProperties:["--height"],responsive:!0},minHeight:{type:"string",className:"rt-r-min-h",customProperties:["--min-height"],responsive:!0},maxHeight:{type:"string",className:"rt-r-max-h",customProperties:["--max-height"],responsive:!0}};var Ue=["1","2","3","4"],de={...C,align:{type:"enum",className:"rt-r-align",values:["start","center"],default:"center"},size:{type:"enum",className:"rt-r-size",values:Ue,default:"3",responsive:!0},width:j.width,minWidth:j.minWidth,maxWidth:{...j.maxWidth,default:"600px"},...ue};var ge={...de};var A=h(require("react")),Re=require("radix-ui");var X=["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"],ye=["auto","gray","mauve","slate","sage","olive","sand"],W={color:{type:"enum",values:X,default:void 0}};var Ye=["loud","medium","quiet"],O={emphasis:{type:"enum",className:"rt-emphasis",values:Ye,default:void 0}};var _e=["normal","start","end","both"],G={trim:{type:"enum",className:"rt-r-lt",values:_e,responsive:!0}};var Je=["left","center","right"],M={align:{type:"enum",className:"rt-r-ta",values:Je,responsive:!0}};var Qe=["wrap","nowrap","pretty","balance"],z={wrap:{type:"enum",className:"rt-r-tw",values:Qe,responsive:!0}};var B={truncate:{type:"boolean",className:"rt-truncate"}};var Xe=["sans","mono","serif"],I={font:{type:"enum",className:"rt-r-ff",values:Xe}};var Ze=["thin","extralight","light","regular","medium","semibold","bold","extrabold"],$={weight:{type:"enum",className:"rt-r-weight",values:Ze,responsive:!0}};var et=["h1","h2","h3","h4","h5","h6"],tt=["0","1","2","3","4","5","6","7","8","9","10","11","12"],Pe={as:{type:"enum",values:et,default:"h1"},...C,size:{type:"enum",className:"rt-r-size",values:tt,default:"6",responsive:!0},...I,...$,...M,...G,...B,...z,...W,...O};var ve=h(require("classnames"));var ot=[],rt=new Set;function nt(e){let t=Object.assign({},...e),o=[],i=[],s=new Set;for(let m in t){let n=t[m],p=n.values??ot,a={key:m,type:n.type,default:n.default,hasDefault:n.default!==void 0,responsive:"responsive"in n,className:n.className,customProperties:n.customProperties,parseValue:n.parseValue,values:p,valueSet:p.length>0?new Set(p):rt,enumValueSet:n.type==="enum"?new Set([n.default,...p]):void 0};n.className?(o.push(a),s.add(m)):(a.hasDefault||n.type==="enum")&&i.push(a)}return{styling:o,passthrough:i,stylingKeys:s}}var st={children:new WeakMap};function De(e){let t=st;for(let o=0;o<e.length;o++){let i=e[o],s=t.children.get(i);s===void 0&&(s={children:new WeakMap},t.children.set(i,s)),t=s}return t.compiled??(t.compiled=nt(e))}var at=["initial","xs","sm","md","lg","xl"],Z=new Set(at);function ee(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var it=new Set(["initial","xs","sm","md","lg","xl"]);function T(e){if(typeof e!="object"||e===null)return!1;for(let t in e)if(it.has(t))return!0;return!1}function L(e,t,o){return t!==void 0?t.has(o):e.includes(o)}function Ce({className:e,customProperties:t,...o}){let i=te({allowArbitraryValues:!0,className:e,...o}),s=pt({customProperties:t,...o});return[i,s]}function te({allowArbitraryValues:e,value:t,className:o,propValues:i,propValueSet:s,parseValue:m=n=>n}){if(t){if(typeof t=="string")return L(i,s,t)?he(o,t,m):e?o:void 0;if(T(t)){let n=t,p=[];for(let a in n){if(!ee(n,a)||!Z.has(a))continue;let r=n[a];if(r!==void 0){if(L(i,s,r)){let l=he(o,r,m),u=a==="initial"?l:`${a}:${l}`;p.push(u)}else if(e){let l=a==="initial"?o:`${a}:${o}`;p.push(l)}}}return p.length>0?p.join(" "):""}if(e)return o}}function he(e,t,o){let i=e?"-":"",s=o(t),m=s?.startsWith("-"),n=m?"-":"",p=m?s?.substring(1):s;return`${n}${e}${i}${p}`}function pt({customProperties:e,value:t,propValues:o,propValueSet:i,parseValue:s=m=>m}){if(!t||typeof t=="string"&&L(o,i,t))return;let m;if(typeof t=="string"){let n=s(t);m={};for(let p of e)m[p]=n;return m}if(T(t)){let n=t;for(let p in n){if(!ee(n,p)||!Z.has(p))continue;let a=n[p];if(a===void 0||L(o,i,a))continue;let r=s(a);m??(m={});for(let l of e){let u=p==="initial"?l:`${l}-${p}`;m[u]=r}}}return m??{}}function oe(...e){let t;for(let o of e)o&&(t===void 0&&(t={}),Object.assign(t,o));return t}function lt(e,t){let o=e.initial,i=!1;return t.hasDefault&&o===void 0&&(o=t.default,i=!0),t.enumValueSet!==void 0&&!t.enumValueSet.has(o)&&(o=t.default,i=!0),i?{...e,initial:o}:e}function x(e,...t){let{styling:o,passthrough:i,stylingKeys:s}=De(t),m={};for(let a in e)s.has(a)||(m[a]=e[a]);for(let a=0;a<i.length;a++){let r=i[a],l=m[r.key];if(l===void 0){r.hasDefault&&(m[r.key]=r.default);continue}r.enumValueSet!==void 0&&!r.enumValueSet.has(l)&&!T(l)&&(m[r.key]=r.default)}let n,p=[];for(let a=0;a<o.length;a++){let r=o[a],l=e[r.key];if(l===void 0&&r.hasDefault&&(l=r.default),r.enumValueSet!==void 0&&!r.enumValueSet.has(l)&&!T(l)&&(l=r.default),!!l){if(T(l)){if(!r.responsive)continue;l=lt(l,r)}if(r.type==="enum"){let u=te({allowArbitraryValues:!1,value:l,className:r.className,propValues:r.values,propValueSet:r.valueSet,parseValue:r.parseValue});u&&p.push(u);continue}if(r.type==="string"||r.type==="enum | string"){let[u,y]=Ce({className:r.className,customProperties:r.customProperties,propValues:r.type==="string"?[]:r.values,propValueSet:r.type==="string"?void 0:r.valueSet,parseValue:r.parseValue,value:l});y&&(n=oe(n,y)),u&&p.push(u);continue}if(r.type==="boolean"){p.push(r.className);continue}}}return m.className=(0,ve.default)(p.length>0?p.join(" "):void 0,e.className),m.style=oe(n,e.style),m}var b=["0","1","2","3","4","5","6","7","8","9","10","11","12","-1","-2","-3","-4","-5","-6","-7","-8","-9","-10","-11","-12"],K={m:{type:"enum | string",values:b,responsive:!0,className:"rt-r-m",customProperties:["--m"]},mx:{type:"enum | string",values:b,responsive:!0,className:"rt-r-mx",customProperties:["--ml","--mr"]},my:{type:"enum | string",values:b,responsive:!0,className:"rt-r-my",customProperties:["--mt","--mb"]},mt:{type:"enum | string",values:b,responsive:!0,className:"rt-r-mt",customProperties:["--mt"]},mr:{type:"enum | string",values:b,responsive:!0,className:"rt-r-mr",customProperties:["--mr"]},mb:{type:"enum | string",values:b,responsive:!0,className:"rt-r-mb",customProperties:["--mb"]},ml:{type:"enum | string",values:b,responsive:!0,className:"rt-r-ml",customProperties:["--ml"]}};var mt={...Pe,...K},re=A.memo(A.forwardRef((e,t)=>{let{children:o,className:i,asChild:s,as:m="h1",color:n,...p}=x(e,mt),a=i?`rt-Heading ${i}`:"rt-Heading";return s?A.createElement(Re.Slot.Root,{"data-accent-color":n,...p,ref:t,className:a},o):A.createElement(m,{"data-accent-color":n,...p,ref:t,className:a},o)}));re.displayName="Heading";var N=h(require("react")),xe=require("radix-ui");var ft=["span","div","label","p"],ct=["0","1","2","3","4","5","6","7","8","9","10","11","12"],Te={as:{type:"enum",values:ft,default:"span"},...C,size:{type:"enum",className:"rt-r-size",values:ct,responsive:!0},...I,...$,...M,...G,...B,...z,...W,...O};var ut={...Te,...K},ne=N.memo(N.forwardRef((e,t)=>{let{children:o,className:i,asChild:s,as:m="span",color:n,...p}=x(e,ut),a=i?`rt-Text ${i}`:"rt-Text";return s?N.createElement(xe.Slot.Root,{"data-accent-color":n,...p,ref:t,className:a},o):N.createElement(m,{"data-accent-color":n,...p,ref:t,className:a},o)}));ne.displayName="Text";var c=h(require("react")),Se=h(require("classnames")),F=require("radix-ui"),q=require("radix-ui/internal");function be(e){switch(e){case"tomato":case"red":case"ruby":case"crimson":case"pink":case"plum":case"purple":case"violet":return"mauve";case"iris":case"indigo":case"blue":case"sky":case"cyan":return"slate";case"teal":case"jade":case"mint":case"green":return"sage";case"grass":case"lime":return"olive";case"yellow":case"amber":case"orange":case"brown":case"gold":case"bronze":return"sand";case"gray":return"gray"}}var se=h(require("react"));function S(e){let[t,o]=se.useState(e),[i,s]=se.useState(e);return Object.is(e,i)||(s(e),o(e)),[t,o]}var Ae=["none","small","medium","large","full"];var dt=["inherit","light","dark"],Ne=["sans","mono","serif"],d={...C,hasBackground:{type:"boolean",default:!0},appearance:{type:"enum",values:dt,default:"inherit"},accentColor:{type:"enum",values:X,default:"gray"},grayColor:{type:"enum",values:ye,default:"gray"},radius:{type:"enum",values:Ae,default:"full"},fontFamily:{type:"enum",values:Ne,default:"sans"},headingFontFamily:{type:"enum",values:Ne}};var g=()=>{},Go={appearance:d.appearance.default,accentColor:d.accentColor.default,grayColor:d.grayColor.default,resolvedGrayColor:d.grayColor.default,radius:d.radius.default,fontFamily:d.fontFamily.default,headingFontFamily:void 0,onAppearanceChange:g,onAccentColorChange:g,onGrayColorChange:g,onRadiusChange:g,onFontFamilyChange:g,onHeadingFontFamilyChange:g},ae=c.createContext(void 0);var ie=c.forwardRef((e,t)=>{let o=c.useContext(ae),i=F.Direction.useDirection();return o===void 0?c.createElement(F.Tooltip.Provider,{delayDuration:200},c.createElement(F.Direction.Provider,{dir:i},c.createElement(Fe,{...e,ref:t}))):c.createElement(pe,{...e,ref:t})});ie.displayName="Theme";var Fe=c.forwardRef((e,t)=>{let{appearance:o=d.appearance.default,accentColor:i=d.accentColor.default,grayColor:s=d.grayColor.default,radius:m=d.radius.default,fontFamily:n=d.fontFamily.default,headingFontFamily:p,hasBackground:a=d.hasBackground.default,...r}=e,[l,u]=S(o),[y,v]=S(i),[R,D]=S(s),[H,V]=S(m),[w,_]=S(n),[E,J]=S(p);return c.createElement(pe,{...r,ref:t,isRoot:!0,hasBackground:a,appearance:l,accentColor:y,grayColor:R,radius:H,fontFamily:w,headingFontFamily:E,onAppearanceChange:u,onAccentColorChange:v,onGrayColorChange:D,onRadiusChange:V,onFontFamilyChange:_,onHeadingFontFamilyChange:J})});Fe.displayName="ThemeRoot";function gt(){if(typeof navigator>"u")return;let e=navigator.userAgent;if(e.includes("Win"))return"windows";if(e.includes("Mac"))return"macos";if(e.includes("Linux"))return"linux"}var pe=c.forwardRef((e,t)=>{let o=c.useContext(ae),{asChild:i,isRoot:s,hasBackground:m,appearance:n=e.appearance??o?.appearance??d.appearance.default,accentColor:p=e.accentColor??o?.accentColor??d.accentColor.default,grayColor:a=e.grayColor??o?.resolvedGrayColor??d.grayColor.default,radius:r=e.radius??o?.radius??d.radius.default,fontFamily:l=e.fontFamily??o?.fontFamily??d.fontFamily.default,headingFontFamily:u=e.headingFontFamily??o?.headingFontFamily,onAppearanceChange:y=g,onAccentColorChange:v=g,onGrayColorChange:R=g,onRadiusChange:D=g,onFontFamilyChange:H=g,onHeadingFontFamilyChange:V=g,...w}=e,_=i?F.Slot.Root:"div",E=a==="auto"?be(p):a,J=e.appearance==="light"||e.appearance==="dark",Ge=m===void 0?s||J:m,le=c.useRef(null),Me=(0,q.useComposedRefs)(t,le),me="data-os"in w;return(0,q.useLayoutEffect)(()=>{if(!s||me)return;let Q=le.current;if(!Q)return;let fe=gt();if(fe)return Q.setAttribute("data-os",fe),()=>Q.removeAttribute("data-os")},[s,me]),c.createElement(ae.Provider,{value:c.useMemo(()=>({appearance:n,accentColor:p,grayColor:a,resolvedGrayColor:E,radius:r,fontFamily:l,headingFontFamily:u,onAppearanceChange:y,onAccentColorChange:v,onGrayColorChange:R,onRadiusChange:D,onFontFamilyChange:H,onHeadingFontFamilyChange:V}),[n,p,a,E,r,l,u,y,v,R,D,H,V])},c.createElement(_,{"data-is-root-theme":s?"true":"false","data-accent-color":p,"data-gray-color":E,"data-has-background":Ge?"true":"false","data-radius":r,"data-font-family":l,"data-heading-font-family":u,ref:Me,...w,className:(0,Se.default)("radix-themes",{light:n==="light",dark:n==="dark"},w.className)}))});pe.displayName="ThemeImpl";var U=h(require("react")),Y=e=>{if(!U.isValidElement(e))throw Error(`Expected a single React Element child, but got: ${U.Children.toArray(e).map(o=>typeof o=="object"&&"type"in o&&typeof o.type=="string"?o.type:typeof o).join(", ")}`);return e};var Ee=e=>f.createElement(P.AlertDialog.Root,{...e});Ee.displayName="AlertDialog.Root";var He=f.forwardRef(({children:e,...t},o)=>f.createElement(P.AlertDialog.Trigger,{...t,ref:o,asChild:!0},Y(e)));He.displayName="AlertDialog.Trigger";var{align:yt,...Pt}=ge,Dt={align:yt},Ve=f.forwardRef(({align:e,...t},o)=>{let{className:i}=x({align:e},Dt),{className:s,forceMount:m,container:n,...p}=x(t,Pt),a=f.useRef(null),r=f.useMemo(()=>l=>{a.current=l,typeof o=="function"?o(l):o&&(o.current=l)},[o]);return f.useEffect(()=>{if(typeof window>"u")return;let l=a.current;if(!l)return;let u=l.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(u.length===0)return;let y=u[0],v=u[u.length-1],R=D=>{D.key==="Tab"&&(D.shiftKey?document.activeElement===y&&(D.preventDefault(),v.focus()):document.activeElement===v&&(D.preventDefault(),y.focus()))};return l.addEventListener("keydown",R),y.focus(),()=>{l.removeEventListener("keydown",R)}},[]),f.createElement(P.AlertDialog.Portal,{container:n,forceMount:m},f.createElement(ie,{asChild:!0},f.createElement(P.AlertDialog.Overlay,{className:"rt-BaseDialogOverlay rt-AlertDialogOverlay"},f.createElement("div",{className:"rt-BaseDialogScroll rt-AlertDialogScroll"},f.createElement("div",{className:`rt-BaseDialogScrollPadding rt-AlertDialogScrollPadding ${i}`},f.createElement(P.AlertDialog.Content,{...p,ref:r,className:(0,we.default)("rt-BaseDialogContent","rt-AlertDialogContent",s),tabIndex:-1,role:"alertdialog","aria-modal":"true","aria-describedby":"alert-dialog-description",onCloseAutoFocus:l=>{l.preventDefault(),document.body.style.pointerEvents=""}}),f.createElement("div",{"aria-live":"assertive","aria-atomic":"true",className:"rt-sr-only",id:"alert-dialog-announcement"}))))))});Ve.displayName="AlertDialog.Content";var ke=f.forwardRef((e,t)=>f.createElement(P.AlertDialog.Title,{asChild:!0},f.createElement(re,{size:"5",mb:"4",trim:"start",...e,asChild:!1,ref:t})));ke.displayName="AlertDialog.Title";var je=f.forwardRef((e,t)=>f.createElement(P.AlertDialog.Description,{asChild:!0},f.createElement(ne,{as:"p",size:"3",...e,asChild:!1,ref:t})));je.displayName="AlertDialog.Description";var We=f.forwardRef(({children:e,...t},o)=>f.createElement(P.AlertDialog.Action,{...t,ref:o,asChild:!0},Y(e)));We.displayName="AlertDialog.Action";var Oe=f.forwardRef(({children:e,...t},o)=>f.createElement(P.AlertDialog.Cancel,{...t,ref:o,asChild:!0},Y(e)));Oe.displayName="AlertDialog.Cancel";
1
+ "use strict";var Le=Object.create;var j=Object.defineProperty;var Ke=Object.getOwnPropertyDescriptor;var qe=Object.getOwnPropertyNames;var Ue=Object.getPrototypeOf,_e=Object.prototype.hasOwnProperty;var Ye=(e,t)=>{for(var o in t)j(e,o,{get:t[o],enumerable:!0})},Pe=(e,t,o,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of qe(t))!_e.call(e,s)&&s!==o&&j(e,s,{get:()=>t[s],enumerable:!(a=Ke(t,s))||a.enumerable});return e};var P=(e,t,o)=>(o=e!=null?Le(Ue(e)):{},Pe(t||!e||!e.__esModule?j(o,"default",{value:e,enumerable:!0}):o,e)),Ze=e=>Pe(j({},"__esModule",{value:!0}),e);var bt={};Ye(bt,{Action:()=>Be,Cancel:()=>Ie,Content:()=>Oe,Description:()=>Me,Root:()=>je,Title:()=>Ge,Trigger:()=>We});module.exports=Ze(bt);var f=P(require("react")),ke=P(require("classnames")),h=require("radix-ui");var C={asChild:{type:"boolean"}};var W={width:{type:"string",className:"rt-r-w",customProperties:["--width"],responsive:!0},minWidth:{type:"string",className:"rt-r-min-w",customProperties:["--min-width"],responsive:!0},maxWidth:{type:"string",className:"rt-r-max-w",customProperties:["--max-width"],responsive:!0}};var he={height:{type:"string",className:"rt-r-h",customProperties:["--height"],responsive:!0},minHeight:{type:"string",className:"rt-r-min-h",customProperties:["--min-height"],responsive:!0},maxHeight:{type:"string",className:"rt-r-max-h",customProperties:["--max-height"],responsive:!0}};var Je=["1","2","3","4"],De={...C,align:{type:"enum",className:"rt-r-align",values:["start","center"],default:"center"},size:{type:"enum",className:"rt-r-size",values:Je,default:"3",responsive:!0},width:W.width,minWidth:W.minWidth,maxWidth:{...W.maxWidth,default:"600px"},...he};var Ce={...De};var S=P(require("react")),Se=require("radix-ui");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"],ve=["auto","gray","mauve","slate","sage","olive","sand"],O={color:{type:"enum",values:te,default:void 0}};var Qe=["loud","medium","quiet"],G={emphasis:{type:"enum",className:"rt-emphasis",values:Qe,default:void 0}};var Xe=["normal","start","end","both"],M={trim:{type:"enum",className:"rt-r-lt",values:Xe,responsive:!0}};var et=["left","center","right"],B={align:{type:"enum",className:"rt-r-ta",values:et,responsive:!0}};var tt=["wrap","nowrap","pretty","balance"],I={wrap:{type:"enum",className:"rt-r-tw",values:tt,responsive:!0}};var $={truncate:{type:"boolean",className:"rt-truncate"}};var ot=["sans","mono","serif"],L={font:{type:"enum",className:"rt-r-ff",values:ot}};var rt=["thin","extralight","light","regular","medium","semibold","bold","extrabold"],K={weight:{type:"enum",className:"rt-r-weight",values:rt,responsive:!0}};var nt=["h1","h2","h3","h4","h5","h6"],st=["0","1","2","3","4","5","6","7","8","9","10","11","12"],Te={as:{type:"enum",values:nt,default:"h1"},...C,size:{type:"enum",className:"rt-r-size",values:st,default:"6",responsive:!0},...L,...K,...B,...M,...$,...I,...O,...G};var Ae=P(require("classnames"));var it=[],at=new Set;function pt(e){let t=Object.assign({},...e),o=[],a=[],s=new Set;for(let m in t){let n=t[m],p=n.values??it,i={key:m,type:n.type,default:n.default,hasDefault:n.default!==void 0,responsive:"responsive"in n,className:n.className,customProperties:n.customProperties,parseValue:n.parseValue,values:p,valueSet:p.length>0?new Set(p):at,enumValueSet:n.type==="enum"?new Set([n.default,...p]):void 0};n.className?(o.push(i),s.add(m)):(i.hasDefault||n.type==="enum")&&a.push(i)}return{styling:o,passthrough:a,stylingKeys:s}}var lt={children:new WeakMap};function Re(e){let t=lt;for(let o=0;o<e.length;o++){let a=e[o],s=t.children.get(a);s===void 0&&(s={children:new WeakMap},t.children.set(a,s)),t=s}return t.compiled??(t.compiled=pt(e))}var mt=["initial","xs","sm","md","lg","xl"],oe=new Set(mt);function re(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var ft=new Set(["initial","xs","sm","md","lg","xl"]);function x(e){if(typeof e!="object"||e===null)return!1;for(let t in e)if(ft.has(t))return!0;return!1}function q(e,t,o){return t!==void 0?t.has(o):e.includes(o)}function be({className:e,customProperties:t,...o}){let a=ne({allowArbitraryValues:!0,className:e,...o}),s=ct({customProperties:t,...o});return[a,s]}function ne({allowArbitraryValues:e,value:t,className:o,propValues:a,propValueSet:s,parseValue:m=n=>n}){if(t){if(typeof t=="string")return q(a,s,t)?xe(o,t,m):e?o:void 0;if(x(t)){let n=t,p=[];for(let i in n){if(!re(n,i)||!oe.has(i))continue;let r=n[i];if(r!==void 0){if(q(a,s,r)){let l=xe(o,r,m),d=i==="initial"?l:`${i}:${l}`;p.push(d)}else if(e){let l=i==="initial"?o:`${i}:${o}`;p.push(l)}}}return p.length>0?p.join(" "):""}if(e)return o}}function xe(e,t,o){let a=e?"-":"",s=o(t),m=s?.startsWith("-"),n=m?"-":"",p=m?s?.substring(1):s;return`${n}${e}${a}${p}`}function ct({customProperties:e,value:t,propValues:o,propValueSet:a,parseValue:s=m=>m}){if(!t||typeof t=="string"&&q(o,a,t))return;let m;if(typeof t=="string"){let n=s(t);m={};for(let p of e)m[p]=n;return m}if(x(t)){let n=t;for(let p in n){if(!re(n,p)||!oe.has(p))continue;let i=n[p];if(i===void 0||q(o,a,i))continue;let r=s(i);m??(m={});for(let l of e){let d=p==="initial"?l:`${l}-${p}`;m[d]=r}}}return m??{}}function se(...e){let t;for(let o of e)o&&(t===void 0&&(t={}),Object.assign(t,o));return t}function ut(e,t){let o=e.initial,a=!1;return t.hasDefault&&o===void 0&&(o=t.default,a=!0),t.enumValueSet!==void 0&&!t.enumValueSet.has(o)&&(o=t.default,a=!0),a?{...e,initial:o}:e}function b(e,...t){let{styling:o,passthrough:a,stylingKeys:s}=Re(t),m={};for(let i in e)s.has(i)||(m[i]=e[i]);for(let i=0;i<a.length;i++){let r=a[i],l=m[r.key];if(l===void 0){r.hasDefault&&(m[r.key]=r.default);continue}r.enumValueSet!==void 0&&!r.enumValueSet.has(l)&&!x(l)&&(m[r.key]=r.default)}let n,p=[];for(let i=0;i<o.length;i++){let r=o[i],l=e[r.key];if(l===void 0&&r.hasDefault&&(l=r.default),r.enumValueSet!==void 0&&!r.enumValueSet.has(l)&&!x(l)&&(l=r.default),!!l){if(x(l)){if(!r.responsive)continue;l=ut(l,r)}if(r.type==="enum"){let d=ne({allowArbitraryValues:!1,value:l,className:r.className,propValues:r.values,propValueSet:r.valueSet,parseValue:r.parseValue});d&&p.push(d);continue}if(r.type==="string"||r.type==="enum | string"){let[d,y]=be({className:r.className,customProperties:r.customProperties,propValues:r.type==="string"?[]:r.values,propValueSet:r.type==="string"?void 0:r.valueSet,parseValue:r.parseValue,value:l});y&&(n=se(n,y)),d&&p.push(d);continue}if(r.type==="boolean"){p.push(r.className);continue}}}return m.className=(0,Ae.default)(p.length>0?p.join(" "):void 0,e.className),m.style=se(n,e.style),m}var A=["0","1","2","3","4","5","6","7","8","9","10","11","12","-1","-2","-3","-4","-5","-6","-7","-8","-9","-10","-11","-12"],U={m:{type:"enum | string",values:A,responsive:!0,className:"rt-r-m",customProperties:["--m"]},mx:{type:"enum | string",values:A,responsive:!0,className:"rt-r-mx",customProperties:["--ml","--mr"]},my:{type:"enum | string",values:A,responsive:!0,className:"rt-r-my",customProperties:["--mt","--mb"]},mt:{type:"enum | string",values:A,responsive:!0,className:"rt-r-mt",customProperties:["--mt"]},mr:{type:"enum | string",values:A,responsive:!0,className:"rt-r-mr",customProperties:["--mr"]},mb:{type:"enum | string",values:A,responsive:!0,className:"rt-r-mb",customProperties:["--mb"]},ml:{type:"enum | string",values:A,responsive:!0,className:"rt-r-ml",customProperties:["--ml"]}};var dt={...Te,...U},ie=S.memo(S.forwardRef((e,t)=>{let{children:o,className:a,asChild:s,as:m="h1",color:n,...p}=b(e,dt),i=a?`rt-Heading ${a}`:"rt-Heading";return s?S.createElement(Se.Slot.Root,{"data-accent-color":n,...p,ref:t,className:i},o):S.createElement(m,{"data-accent-color":n,...p,ref:t,className:i},o)}));ie.displayName="Heading";var N=P(require("react")),Fe=require("radix-ui");var gt=["span","div","label","p"],yt=["0","1","2","3","4","5","6","7","8","9","10","11","12"],Ne={as:{type:"enum",values:gt,default:"span"},...C,size:{type:"enum",className:"rt-r-size",values:yt,responsive:!0},...L,...K,...B,...M,...$,...I,...O,...G};var Pt={...Ne,...U},ae=N.memo(N.forwardRef((e,t)=>{let{children:o,className:a,asChild:s,as:m="span",color:n,...p}=b(e,Pt),i=a?`rt-Text ${a}`:"rt-Text";return s?N.createElement(Fe.Slot.Root,{"data-accent-color":n,...p,ref:t,className:i},o):N.createElement(m,{"data-accent-color":n,...p,ref:t,className:i},o)}));ae.displayName="Text";var c=P(require("react")),ze=P(require("classnames")),F=require("radix-ui"),_=require("radix-ui/internal");function we(e){switch(e){case"tomato":case"red":case"ruby":case"crimson":case"pink":case"plum":case"purple":case"violet":return"mauve";case"iris":case"indigo":case"blue":case"sky":case"cyan":return"slate";case"teal":case"jade":case"mint":case"green":return"sage";case"grass":case"lime":return"olive";case"yellow":case"amber":case"orange":case"brown":case"gold":case"bronze":return"sand";case"gray":return"gray"}}var pe=P(require("react")),ht="2",le=pe.createContext(ht);le.displayName="ThemeSizeContext";var me=P(require("react"));function v(e){let[t,o]=me.useState(e),[a,s]=me.useState(e);return Object.is(e,a)||(s(e),o(e)),[t,o]}var Ee=["none","small","medium","large","full"];var Dt=["inherit","light","dark"],He=["sans","mono","serif"],Ct=["1","2","3","4"],u={...C,hasBackground:{type:"boolean",default:!0},appearance:{type:"enum",values:Dt,default:"inherit"},accentColor:{type:"enum",values:te,default:"gray"},grayColor:{type:"enum",values:ve,default:"gray"},radius:{type:"enum",values:Ee,default:"full"},fontFamily:{type:"enum",values:He,default:"sans"},headingFontFamily:{type:"enum",values:He},size:{type:"enum",values:Ct,default:"2"}};var g=()=>{},qo={appearance:u.appearance.default,accentColor:u.accentColor.default,grayColor:u.grayColor.default,resolvedGrayColor:u.grayColor.default,radius:u.radius.default,fontFamily:u.fontFamily.default,headingFontFamily:void 0,size:u.size.default,onAppearanceChange:g,onAccentColorChange:g,onGrayColorChange:g,onRadiusChange:g,onFontFamilyChange:g,onHeadingFontFamilyChange:g,onSizeChange:g},fe=c.createContext(void 0);var ce=c.forwardRef((e,t)=>{let o=c.useContext(fe),a=F.Direction.useDirection();return o===void 0?c.createElement(F.Tooltip.Provider,{delayDuration:200},c.createElement(F.Direction.Provider,{dir:a},c.createElement(Ve,{...e,ref:t}))):c.createElement(ue,{...e,ref:t})});ce.displayName="Theme";var Ve=c.forwardRef((e,t)=>{let{appearance:o=u.appearance.default,accentColor:a=u.accentColor.default,grayColor:s=u.grayColor.default,radius:m=u.radius.default,fontFamily:n=u.fontFamily.default,headingFontFamily:p,size:i=u.size.default,hasBackground:r=u.hasBackground.default,...l}=e,[d,y]=v(o),[T,R]=v(a),[D,H]=v(s),[z,V]=v(m),[k,w]=v(n),[J,E]=v(p),[Q,X]=v(i);return c.createElement(ue,{...l,ref:t,isRoot:!0,hasBackground:r,appearance:d,accentColor:T,grayColor:D,radius:z,fontFamily:k,headingFontFamily:J,size:Q,onAppearanceChange:y,onAccentColorChange:R,onGrayColorChange:H,onRadiusChange:V,onFontFamilyChange:w,onHeadingFontFamilyChange:E,onSizeChange:X})});Ve.displayName="ThemeRoot";function vt(){if(typeof navigator>"u")return;let e=navigator.userAgent;if(e.includes("Win"))return"windows";if(e.includes("Mac"))return"macos";if(e.includes("Linux"))return"linux"}var ue=c.forwardRef((e,t)=>{let o=c.useContext(fe),{asChild:a,isRoot:s,hasBackground:m,appearance:n=e.appearance??o?.appearance??u.appearance.default,accentColor:p=e.accentColor??o?.accentColor??u.accentColor.default,grayColor:i=e.grayColor??o?.resolvedGrayColor??u.grayColor.default,radius:r=e.radius??o?.radius??u.radius.default,fontFamily:l=e.fontFamily??o?.fontFamily??u.fontFamily.default,headingFontFamily:d=e.headingFontFamily??o?.headingFontFamily,size:y=e.size??o?.size??u.size.default,onAppearanceChange:T=g,onAccentColorChange:R=g,onGrayColorChange:D=g,onRadiusChange:H=g,onFontFamilyChange:z=g,onHeadingFontFamilyChange:V=g,onSizeChange:k=g,...w}=e,J=a?F.Slot.Root:"div",E=i==="auto"?we(p):i,Q=e.appearance==="light"||e.appearance==="dark",X=m===void 0?s||Q:m,de=c.useRef(null),$e=(0,_.useComposedRefs)(t,de),ge="data-os"in w;return(0,_.useLayoutEffect)(()=>{if(!s||ge)return;let ee=de.current;if(!ee)return;let ye=vt();if(ye)return ee.setAttribute("data-os",ye),()=>ee.removeAttribute("data-os")},[s,ge]),c.createElement(fe.Provider,{value:c.useMemo(()=>({appearance:n,accentColor:p,grayColor:i,resolvedGrayColor:E,radius:r,fontFamily:l,headingFontFamily:d,size:y,onAppearanceChange:T,onAccentColorChange:R,onGrayColorChange:D,onRadiusChange:H,onFontFamilyChange:z,onHeadingFontFamilyChange:V,onSizeChange:k}),[n,p,i,E,r,l,d,y,T,R,D,H,z,V,k])},c.createElement(le.Provider,{value:y},c.createElement(J,{"data-is-root-theme":s?"true":"false","data-accent-color":p,"data-gray-color":E,"data-has-background":X?"true":"false","data-radius":r,"data-font-family":l,"data-heading-font-family":d,ref:$e,...w,className:(0,ze.default)("radix-themes",{light:n==="light",dark:n==="dark"},w.className)})))});ue.displayName="ThemeImpl";var Y=P(require("react")),Z=e=>{if(!Y.isValidElement(e))throw Error(`Expected a single React Element child, but got: ${Y.Children.toArray(e).map(o=>typeof o=="object"&&"type"in o&&typeof o.type=="string"?o.type:typeof o).join(", ")}`);return e};var je=e=>f.createElement(h.AlertDialog.Root,{...e});je.displayName="AlertDialog.Root";var We=f.forwardRef(({children:e,...t},o)=>f.createElement(h.AlertDialog.Trigger,{...t,ref:o,asChild:!0},Z(e)));We.displayName="AlertDialog.Trigger";var{align:Tt,...Rt}=Ce,xt={align:Tt},Oe=f.forwardRef(({align:e,...t},o)=>{let{className:a}=b({align:e},xt),{className:s,forceMount:m,container:n,...p}=b(t,Rt),i=f.useRef(null),r=f.useMemo(()=>l=>{i.current=l,typeof o=="function"?o(l):o&&(o.current=l)},[o]);return f.useEffect(()=>{if(typeof window>"u")return;let l=i.current;if(!l)return;let d=l.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(d.length===0)return;let y=d[0],T=d[d.length-1],R=D=>{D.key==="Tab"&&(D.shiftKey?document.activeElement===y&&(D.preventDefault(),T.focus()):document.activeElement===T&&(D.preventDefault(),y.focus()))};return l.addEventListener("keydown",R),y.focus(),()=>{l.removeEventListener("keydown",R)}},[]),f.createElement(h.AlertDialog.Portal,{container:n,forceMount:m},f.createElement(ce,{asChild:!0},f.createElement(h.AlertDialog.Overlay,{className:"rt-BaseDialogOverlay rt-AlertDialogOverlay"},f.createElement("div",{className:"rt-BaseDialogScroll rt-AlertDialogScroll"},f.createElement("div",{className:`rt-BaseDialogScrollPadding rt-AlertDialogScrollPadding ${a}`},f.createElement(h.AlertDialog.Content,{...p,ref:r,className:(0,ke.default)("rt-BaseDialogContent","rt-AlertDialogContent",s),tabIndex:-1,role:"alertdialog","aria-modal":"true","aria-describedby":"alert-dialog-description",onCloseAutoFocus:l=>{l.preventDefault(),document.body.style.pointerEvents=""}}),f.createElement("div",{"aria-live":"assertive","aria-atomic":"true",className:"rt-sr-only",id:"alert-dialog-announcement"}))))))});Oe.displayName="AlertDialog.Content";var Ge=f.forwardRef((e,t)=>f.createElement(h.AlertDialog.Title,{asChild:!0},f.createElement(ie,{size:"5",mb:"4",trim:"start",...e,asChild:!1,ref:t})));Ge.displayName="AlertDialog.Title";var Me=f.forwardRef((e,t)=>f.createElement(h.AlertDialog.Description,{asChild:!0},f.createElement(ae,{as:"p",size:"3",...e,asChild:!1,ref:t})));Me.displayName="AlertDialog.Description";var Be=f.forwardRef(({children:e,...t},o)=>f.createElement(h.AlertDialog.Action,{...t,ref:o,asChild:!0},Z(e)));Be.displayName="AlertDialog.Action";var Ie=f.forwardRef(({children:e,...t},o)=>f.createElement(h.AlertDialog.Cancel,{...t,ref:o,asChild:!0},Z(e)));Ie.displayName="AlertDialog.Cancel";
2
2
  //# sourceMappingURL=alert-dialog.js.map