@cerberus-design/react 0.8.0 → 0.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (378) hide show
  1. package/build/legacy/{_tsup-dts-rollup.d.ts → _tsup-dts-rollup.d.cts} +207 -5
  2. package/build/legacy/aria-helpers/nav-menu.aria.cjs +36 -0
  3. package/build/legacy/aria-helpers/nav-menu.aria.cjs.map +1 -0
  4. package/build/legacy/aria-helpers/tabs.aria.cjs +100 -0
  5. package/build/legacy/aria-helpers/tabs.aria.cjs.map +1 -0
  6. package/build/legacy/aria-helpers/trap-focus.aria.cjs +54 -0
  7. package/build/legacy/aria-helpers/trap-focus.aria.cjs.map +1 -0
  8. package/build/legacy/components/Button.cjs +50 -0
  9. package/build/legacy/components/Button.cjs.map +1 -0
  10. package/build/legacy/components/Checkbox.cjs +157 -0
  11. package/build/legacy/components/Checkbox.cjs.map +1 -0
  12. package/build/legacy/components/Droppable.cjs +54 -0
  13. package/build/legacy/components/Droppable.cjs.map +1 -0
  14. package/build/legacy/components/FeatureFlag.cjs +63 -0
  15. package/build/legacy/components/FeatureFlag.cjs.map +1 -0
  16. package/build/legacy/components/FieldMessage.cjs +59 -0
  17. package/build/legacy/components/FieldMessage.cjs.map +1 -0
  18. package/build/legacy/components/FileStatus.cjs +390 -0
  19. package/build/legacy/components/FileStatus.cjs.map +1 -0
  20. package/build/legacy/components/FileUploader.cjs +159 -0
  21. package/build/legacy/components/FileUploader.cjs.map +1 -0
  22. package/build/legacy/components/IconButton.cjs +53 -0
  23. package/build/legacy/components/IconButton.cjs.map +1 -0
  24. package/build/legacy/components/Input.cjs +145 -0
  25. package/build/legacy/components/Input.cjs.map +1 -0
  26. package/build/legacy/components/Label.cjs +93 -0
  27. package/build/legacy/components/Label.cjs.map +1 -0
  28. package/build/legacy/components/Modal.cjs +45 -0
  29. package/build/legacy/components/Modal.cjs.map +1 -0
  30. package/build/legacy/components/ModalDescription.cjs +36 -0
  31. package/build/legacy/components/ModalDescription.cjs.map +1 -0
  32. package/build/legacy/components/ModalHeader.cjs +49 -0
  33. package/build/legacy/components/ModalHeader.cjs.map +1 -0
  34. package/build/legacy/components/ModalHeading.cjs +36 -0
  35. package/build/legacy/components/ModalHeading.cjs.map +1 -0
  36. package/build/legacy/components/ModalIcon.cjs +51 -0
  37. package/build/legacy/components/ModalIcon.cjs.map +1 -0
  38. package/build/legacy/components/NavMenuLink.cjs +81 -0
  39. package/build/legacy/components/NavMenuLink.cjs.map +1 -0
  40. package/build/legacy/components/NavMenuList.cjs +131 -0
  41. package/build/legacy/components/NavMenuList.cjs.map +1 -0
  42. package/build/legacy/components/NavMenuTrigger.cjs +128 -0
  43. package/build/legacy/components/NavMenuTrigger.cjs.map +1 -0
  44. package/build/legacy/components/Notification.cjs +181 -0
  45. package/build/legacy/components/Notification.cjs.map +1 -0
  46. package/build/legacy/components/NotificationDescription.cjs +44 -0
  47. package/build/legacy/components/NotificationDescription.cjs.map +1 -0
  48. package/build/legacy/components/NotificationHeading.cjs +38 -0
  49. package/build/legacy/components/NotificationHeading.cjs.map +1 -0
  50. package/build/legacy/components/Portal.cjs +35 -0
  51. package/build/legacy/components/Portal.cjs.map +1 -0
  52. package/build/legacy/components/ProgressBar.cjs +61 -0
  53. package/build/legacy/components/ProgressBar.cjs.map +1 -0
  54. package/build/legacy/components/Radio.cjs +68 -0
  55. package/build/legacy/components/Radio.cjs.map +1 -0
  56. package/build/legacy/components/Select.cjs +170 -0
  57. package/build/legacy/components/Select.cjs.map +1 -0
  58. package/build/legacy/components/Show.cjs +40 -0
  59. package/build/legacy/components/Show.cjs.map +1 -0
  60. package/build/legacy/components/Tab.cjs +135 -0
  61. package/build/legacy/components/Tab.cjs.map +1 -0
  62. package/build/legacy/components/TabList.cjs +68 -0
  63. package/build/legacy/components/TabList.cjs.map +1 -0
  64. package/build/legacy/components/TabPanel.cjs +76 -0
  65. package/build/legacy/components/TabPanel.cjs.map +1 -0
  66. package/build/legacy/components/Table.cjs +53 -0
  67. package/build/legacy/components/Table.cjs.map +1 -0
  68. package/build/legacy/components/Tag.cjs +91 -0
  69. package/build/legacy/components/Tag.cjs.map +1 -0
  70. package/build/legacy/components/Tbody.cjs +48 -0
  71. package/build/legacy/components/Tbody.cjs.map +1 -0
  72. package/build/legacy/components/Td.cjs +48 -0
  73. package/build/legacy/components/Td.cjs.map +1 -0
  74. package/build/legacy/components/Textarea.cjs +71 -0
  75. package/build/legacy/components/Textarea.cjs.map +1 -0
  76. package/build/legacy/components/Th.cjs +80 -0
  77. package/build/legacy/components/Th.cjs.map +1 -0
  78. package/build/legacy/components/Thead.cjs +36 -0
  79. package/build/legacy/components/Thead.cjs.map +1 -0
  80. package/build/legacy/components/Toggle.cjs +151 -0
  81. package/build/legacy/components/Toggle.cjs.map +1 -0
  82. package/build/legacy/config/cerbIcons.cjs +88 -0
  83. package/build/legacy/config/cerbIcons.cjs.map +1 -0
  84. package/build/legacy/config/defineIcons.cjs +110 -0
  85. package/build/legacy/config/defineIcons.cjs.map +1 -0
  86. package/build/legacy/config/icons/checkbox.icons.cjs +67 -0
  87. package/build/legacy/config/icons/checkbox.icons.cjs.map +1 -0
  88. package/build/legacy/context/confirm-modal.cjs +371 -0
  89. package/build/legacy/context/confirm-modal.cjs.map +1 -0
  90. package/build/legacy/context/feature-flags.cjs +48 -0
  91. package/build/legacy/context/feature-flags.cjs.map +1 -0
  92. package/build/legacy/context/field.cjs +55 -0
  93. package/build/legacy/context/field.cjs.map +1 -0
  94. package/build/legacy/context/navMenu.cjs +70 -0
  95. package/build/legacy/context/navMenu.cjs.map +1 -0
  96. package/build/legacy/context/notification-center.cjs +347 -0
  97. package/build/legacy/context/notification-center.cjs.map +1 -0
  98. package/build/legacy/context/prompt-modal.cjs +508 -0
  99. package/build/legacy/context/prompt-modal.cjs.map +1 -0
  100. package/build/legacy/context/tabs.cjs +78 -0
  101. package/build/legacy/context/tabs.cjs.map +1 -0
  102. package/build/legacy/context/theme.cjs +104 -0
  103. package/build/legacy/context/theme.cjs.map +1 -0
  104. package/build/legacy/hooks/useModal.cjs +50 -0
  105. package/build/legacy/hooks/useModal.cjs.map +1 -0
  106. package/build/legacy/hooks/useTheme.cjs +87 -0
  107. package/build/legacy/hooks/useTheme.cjs.map +1 -0
  108. package/build/legacy/hooks/useToggle.cjs +47 -0
  109. package/build/legacy/hooks/useToggle.cjs.map +1 -0
  110. package/build/legacy/index.cjs +2165 -0
  111. package/build/legacy/index.cjs.map +1 -0
  112. package/build/legacy/types.cjs +19 -0
  113. package/build/legacy/types.cjs.map +1 -0
  114. package/build/modern/_tsup-dts-rollup.d.ts +207 -5
  115. package/build/{legacy/chunk-JJGZRBIR.js → modern/chunk-2FK7NR7Y.js} +8 -7
  116. package/build/{legacy/chunk-JJGZRBIR.js.map → modern/chunk-2FK7NR7Y.js.map} +1 -1
  117. package/build/modern/chunk-4FD33RTW.js +56 -0
  118. package/build/modern/chunk-4FD33RTW.js.map +1 -0
  119. package/build/modern/{chunk-XB4ZRAH4.js → chunk-53QBTZZF.js} +5 -5
  120. package/build/modern/{chunk-BEYPMC73.js → chunk-5WVXIAG2.js} +2 -2
  121. package/build/modern/chunk-7NX4RGDB.js +218 -0
  122. package/build/modern/chunk-7NX4RGDB.js.map +1 -0
  123. package/build/modern/chunk-CP7OUC2Q.js +42 -0
  124. package/build/modern/chunk-CP7OUC2Q.js.map +1 -0
  125. package/build/modern/{chunk-4N2L357B.js → chunk-EJIMJWPB.js} +2 -2
  126. package/build/{legacy/chunk-GVNPFXKL.js → modern/chunk-GUECLKHY.js} +18 -1
  127. package/build/modern/chunk-GUECLKHY.js.map +1 -0
  128. package/build/modern/{chunk-Y5IY7O23.js → chunk-GZY6CH7D.js} +5 -5
  129. package/build/{legacy/chunk-IL5ELPTT.js → modern/chunk-ID3XWGLY.js} +2 -2
  130. package/build/modern/chunk-RHG26FYL.js +68 -0
  131. package/build/modern/chunk-RHG26FYL.js.map +1 -0
  132. package/build/modern/{chunk-LTDNZRUY.js → chunk-S6CMAXQF.js} +10 -10
  133. package/build/modern/{chunk-IOG6XIR5.js → chunk-TF3HRELU.js} +3 -3
  134. package/build/modern/{chunk-IOG6XIR5.js.map → chunk-TF3HRELU.js.map} +1 -1
  135. package/build/modern/chunk-TYTEREKZ.js +39 -0
  136. package/build/modern/chunk-TYTEREKZ.js.map +1 -0
  137. package/build/{legacy/chunk-JJP2TFTU.js → modern/chunk-VCR5C6Q3.js} +1 -1
  138. package/build/modern/chunk-VCR5C6Q3.js.map +1 -0
  139. package/build/modern/{chunk-QO2UXGW4.js → chunk-VPWBSZAR.js} +2 -2
  140. package/build/modern/components/Checkbox.js +13 -0
  141. package/build/modern/components/FileStatus.js +17 -0
  142. package/build/modern/components/FileUploader.js +4 -3
  143. package/build/modern/components/Input.js +5 -4
  144. package/build/modern/components/Label.js +2 -2
  145. package/build/modern/components/ModalIcon.js +1 -1
  146. package/build/modern/components/Notification.js +4 -3
  147. package/build/modern/components/ProgressBar.js +7 -0
  148. package/build/modern/components/Select.js +15 -0
  149. package/build/modern/components/Toggle.js +4 -3
  150. package/build/modern/config/cerbIcons.js +2 -1
  151. package/build/modern/config/defineIcons.js +3 -2
  152. package/build/modern/config/icons/checkbox.icons.js +9 -0
  153. package/build/modern/context/confirm-modal.js +5 -4
  154. package/build/modern/context/notification-center.js +5 -4
  155. package/build/modern/context/prompt-modal.js +8 -7
  156. package/build/modern/index.js +59 -38
  157. package/build/modern/index.js.map +1 -1
  158. package/package.json +6 -6
  159. package/src/components/Checkbox.tsx +76 -0
  160. package/src/components/FileStatus.tsx +246 -0
  161. package/src/components/FileUploader.tsx +1 -1
  162. package/src/components/Label.tsx +3 -2
  163. package/src/components/ModalIcon.tsx +2 -2
  164. package/src/components/ProgressBar.tsx +61 -0
  165. package/src/components/Select.tsx +96 -0
  166. package/src/config/cerbIcons.ts +20 -0
  167. package/src/config/icons/checkbox.icons.tsx +49 -0
  168. package/src/index.ts +4 -0
  169. package/build/legacy/aria-helpers/nav-menu.aria.js +0 -7
  170. package/build/legacy/aria-helpers/tabs.aria.js +0 -9
  171. package/build/legacy/aria-helpers/trap-focus.aria.js +0 -7
  172. package/build/legacy/chunk-2UFNQM55.js +0 -21
  173. package/build/legacy/chunk-2UFNQM55.js.map +0 -1
  174. package/build/legacy/chunk-2VPKILZ6.js +0 -122
  175. package/build/legacy/chunk-2VPKILZ6.js.map +0 -1
  176. package/build/legacy/chunk-3C2DJSEE.js +0 -16
  177. package/build/legacy/chunk-3C2DJSEE.js.map +0 -1
  178. package/build/legacy/chunk-3GXISGPS.js +0 -47
  179. package/build/legacy/chunk-3GXISGPS.js.map +0 -1
  180. package/build/legacy/chunk-4CAT3FHV.js +0 -11
  181. package/build/legacy/chunk-4CAT3FHV.js.map +0 -1
  182. package/build/legacy/chunk-4M3EUP57.js +0 -22
  183. package/build/legacy/chunk-4M3EUP57.js.map +0 -1
  184. package/build/legacy/chunk-4M4LCQ43.js +0 -12
  185. package/build/legacy/chunk-4M4LCQ43.js.map +0 -1
  186. package/build/legacy/chunk-4O4QFF4S.js +0 -15
  187. package/build/legacy/chunk-4O4QFF4S.js.map +0 -1
  188. package/build/legacy/chunk-55J6XMHW.js +0 -1
  189. package/build/legacy/chunk-6DIGPXAD.js +0 -48
  190. package/build/legacy/chunk-6DIGPXAD.js.map +0 -1
  191. package/build/legacy/chunk-6F34A7NZ.js +0 -28
  192. package/build/legacy/chunk-6F34A7NZ.js.map +0 -1
  193. package/build/legacy/chunk-7VJOPJVX.js +0 -29
  194. package/build/legacy/chunk-7VJOPJVX.js.map +0 -1
  195. package/build/legacy/chunk-A5WYZVUR.js +0 -28
  196. package/build/legacy/chunk-A5WYZVUR.js.map +0 -1
  197. package/build/legacy/chunk-AAKIOHAX.js +0 -155
  198. package/build/legacy/chunk-AAKIOHAX.js.map +0 -1
  199. package/build/legacy/chunk-BEYPMC73.js +0 -27
  200. package/build/legacy/chunk-EVEEQRH6.js +0 -58
  201. package/build/legacy/chunk-EVEEQRH6.js.map +0 -1
  202. package/build/legacy/chunk-GKUDLVOV.js +0 -64
  203. package/build/legacy/chunk-GKUDLVOV.js.map +0 -1
  204. package/build/legacy/chunk-GVNPFXKL.js.map +0 -1
  205. package/build/legacy/chunk-HW76XVA3.js +0 -22
  206. package/build/legacy/chunk-HW76XVA3.js.map +0 -1
  207. package/build/legacy/chunk-ISPTI4GC.js +0 -32
  208. package/build/legacy/chunk-ISPTI4GC.js.map +0 -1
  209. package/build/legacy/chunk-JB7IQ2BM.js +0 -12
  210. package/build/legacy/chunk-JB7IQ2BM.js.map +0 -1
  211. package/build/legacy/chunk-JF76VIL3.js +0 -12
  212. package/build/legacy/chunk-JF76VIL3.js.map +0 -1
  213. package/build/legacy/chunk-JJP2TFTU.js.map +0 -1
  214. package/build/legacy/chunk-KESKDLX6.js +0 -30
  215. package/build/legacy/chunk-KESKDLX6.js.map +0 -1
  216. package/build/legacy/chunk-KF24CS4S.js +0 -58
  217. package/build/legacy/chunk-KF24CS4S.js.map +0 -1
  218. package/build/legacy/chunk-KJUCHZHV.js +0 -51
  219. package/build/legacy/chunk-KJUCHZHV.js.map +0 -1
  220. package/build/legacy/chunk-L46XIE3D.js +0 -208
  221. package/build/legacy/chunk-L46XIE3D.js.map +0 -1
  222. package/build/legacy/chunk-LF2QFS5S.js +0 -76
  223. package/build/legacy/chunk-N3FUF4TB.js +0 -12
  224. package/build/legacy/chunk-N3FUF4TB.js.map +0 -1
  225. package/build/legacy/chunk-NE5NHILF.js +0 -47
  226. package/build/legacy/chunk-NE5NHILF.js.map +0 -1
  227. package/build/legacy/chunk-PH64POOB.js +0 -33
  228. package/build/legacy/chunk-PH64POOB.js.map +0 -1
  229. package/build/legacy/chunk-PJ3744I6.js +0 -24
  230. package/build/legacy/chunk-PJ3744I6.js.map +0 -1
  231. package/build/legacy/chunk-PMCYXRAH.js +0 -86
  232. package/build/legacy/chunk-PMCYXRAH.js.map +0 -1
  233. package/build/legacy/chunk-QU7UV5DB.js +0 -25
  234. package/build/legacy/chunk-QU7UV5DB.js.map +0 -1
  235. package/build/legacy/chunk-RPZAPUCF.js +0 -81
  236. package/build/legacy/chunk-RPZAPUCF.js.map +0 -1
  237. package/build/legacy/chunk-SCQVXJBT.js +0 -22
  238. package/build/legacy/chunk-SCQVXJBT.js.map +0 -1
  239. package/build/legacy/chunk-SLHX5K6I.js +0 -29
  240. package/build/legacy/chunk-SLHX5K6I.js.map +0 -1
  241. package/build/legacy/chunk-SMCEFK6Q.js +0 -63
  242. package/build/legacy/chunk-SMCEFK6Q.js.map +0 -1
  243. package/build/legacy/chunk-SXXWC6UD.js +0 -83
  244. package/build/legacy/chunk-SXXWC6UD.js.map +0 -1
  245. package/build/legacy/chunk-TCO46FK7.js +0 -36
  246. package/build/legacy/chunk-TCO46FK7.js.map +0 -1
  247. package/build/legacy/chunk-TZNYJ3G7.js +0 -25
  248. package/build/legacy/chunk-TZNYJ3G7.js.map +0 -1
  249. package/build/legacy/chunk-U72VPIZA.js +0 -32
  250. package/build/legacy/chunk-U72VPIZA.js.map +0 -1
  251. package/build/legacy/chunk-VGHVH2T3.js +0 -24
  252. package/build/legacy/chunk-VGHVH2T3.js.map +0 -1
  253. package/build/legacy/chunk-VULPMZUW.js +0 -18
  254. package/build/legacy/chunk-VULPMZUW.js.map +0 -1
  255. package/build/legacy/chunk-XB4ZRAH4.js +0 -42
  256. package/build/legacy/chunk-XREC5IJE.js +0 -24
  257. package/build/legacy/chunk-XREC5IJE.js.map +0 -1
  258. package/build/legacy/chunk-ZAU4JVLL.js +0 -33
  259. package/build/legacy/chunk-ZAU4JVLL.js.map +0 -1
  260. package/build/legacy/components/Button.js +0 -7
  261. package/build/legacy/components/Droppable.js +0 -8
  262. package/build/legacy/components/Droppable.js.map +0 -1
  263. package/build/legacy/components/FeatureFlag.js +0 -10
  264. package/build/legacy/components/FeatureFlag.js.map +0 -1
  265. package/build/legacy/components/FieldMessage.js +0 -9
  266. package/build/legacy/components/FieldMessage.js.map +0 -1
  267. package/build/legacy/components/FileUploader.js +0 -11
  268. package/build/legacy/components/FileUploader.js.map +0 -1
  269. package/build/legacy/components/IconButton.js +0 -7
  270. package/build/legacy/components/IconButton.js.map +0 -1
  271. package/build/legacy/components/Input.js +0 -12
  272. package/build/legacy/components/Input.js.map +0 -1
  273. package/build/legacy/components/Label.js +0 -10
  274. package/build/legacy/components/Label.js.map +0 -1
  275. package/build/legacy/components/Modal.js +0 -7
  276. package/build/legacy/components/Modal.js.map +0 -1
  277. package/build/legacy/components/ModalDescription.js +0 -7
  278. package/build/legacy/components/ModalDescription.js.map +0 -1
  279. package/build/legacy/components/ModalHeader.js +0 -7
  280. package/build/legacy/components/ModalHeader.js.map +0 -1
  281. package/build/legacy/components/ModalHeading.js +0 -7
  282. package/build/legacy/components/ModalHeading.js.map +0 -1
  283. package/build/legacy/components/ModalIcon.js +0 -7
  284. package/build/legacy/components/ModalIcon.js.map +0 -1
  285. package/build/legacy/components/NavMenuLink.js +0 -8
  286. package/build/legacy/components/NavMenuLink.js.map +0 -1
  287. package/build/legacy/components/NavMenuList.js +0 -12
  288. package/build/legacy/components/NavMenuList.js.map +0 -1
  289. package/build/legacy/components/NavMenuTrigger.js +0 -11
  290. package/build/legacy/components/NavMenuTrigger.js.map +0 -1
  291. package/build/legacy/components/Notification.js +0 -11
  292. package/build/legacy/components/Notification.js.map +0 -1
  293. package/build/legacy/components/NotificationDescription.js +0 -7
  294. package/build/legacy/components/NotificationDescription.js.map +0 -1
  295. package/build/legacy/components/NotificationHeading.js +0 -7
  296. package/build/legacy/components/NotificationHeading.js.map +0 -1
  297. package/build/legacy/components/Portal.js +0 -7
  298. package/build/legacy/components/Portal.js.map +0 -1
  299. package/build/legacy/components/Radio.js +0 -9
  300. package/build/legacy/components/Radio.js.map +0 -1
  301. package/build/legacy/components/Show.js +0 -8
  302. package/build/legacy/components/Show.js.map +0 -1
  303. package/build/legacy/components/Tab.js +0 -10
  304. package/build/legacy/components/Tab.js.map +0 -1
  305. package/build/legacy/components/TabList.js +0 -9
  306. package/build/legacy/components/TabList.js.map +0 -1
  307. package/build/legacy/components/TabPanel.js +0 -10
  308. package/build/legacy/components/TabPanel.js.map +0 -1
  309. package/build/legacy/components/Table.js +0 -9
  310. package/build/legacy/components/Table.js.map +0 -1
  311. package/build/legacy/components/Tag.js +0 -8
  312. package/build/legacy/components/Tag.js.map +0 -1
  313. package/build/legacy/components/Tbody.js +0 -7
  314. package/build/legacy/components/Tbody.js.map +0 -1
  315. package/build/legacy/components/Td.js +0 -7
  316. package/build/legacy/components/Td.js.map +0 -1
  317. package/build/legacy/components/Textarea.js +0 -9
  318. package/build/legacy/components/Textarea.js.map +0 -1
  319. package/build/legacy/components/Th.js +0 -8
  320. package/build/legacy/components/Th.js.map +0 -1
  321. package/build/legacy/components/Thead.js +0 -7
  322. package/build/legacy/components/Thead.js.map +0 -1
  323. package/build/legacy/components/Toggle.js +0 -11
  324. package/build/legacy/components/Toggle.js.map +0 -1
  325. package/build/legacy/config/cerbIcons.js +0 -7
  326. package/build/legacy/config/cerbIcons.js.map +0 -1
  327. package/build/legacy/config/defineIcons.js +0 -10
  328. package/build/legacy/config/defineIcons.js.map +0 -1
  329. package/build/legacy/context/confirm-modal.js +0 -22
  330. package/build/legacy/context/confirm-modal.js.map +0 -1
  331. package/build/legacy/context/feature-flags.js +0 -10
  332. package/build/legacy/context/feature-flags.js.map +0 -1
  333. package/build/legacy/context/field.js +0 -10
  334. package/build/legacy/context/field.js.map +0 -1
  335. package/build/legacy/context/navMenu.js +0 -10
  336. package/build/legacy/context/navMenu.js.map +0 -1
  337. package/build/legacy/context/notification-center.js +0 -19
  338. package/build/legacy/context/notification-center.js.map +0 -1
  339. package/build/legacy/context/prompt-modal.js +0 -25
  340. package/build/legacy/context/prompt-modal.js.map +0 -1
  341. package/build/legacy/context/tabs.js +0 -12
  342. package/build/legacy/context/tabs.js.map +0 -1
  343. package/build/legacy/context/theme.js +0 -14
  344. package/build/legacy/context/theme.js.map +0 -1
  345. package/build/legacy/hooks/useModal.js +0 -8
  346. package/build/legacy/hooks/useModal.js.map +0 -1
  347. package/build/legacy/hooks/useTheme.js +0 -8
  348. package/build/legacy/hooks/useTheme.js.map +0 -1
  349. package/build/legacy/hooks/useToggle.js +0 -8
  350. package/build/legacy/hooks/useToggle.js.map +0 -1
  351. package/build/legacy/index.js +0 -226
  352. package/build/legacy/index.js.map +0 -1
  353. package/build/legacy/types.js +0 -2
  354. package/build/legacy/types.js.map +0 -1
  355. package/build/modern/chunk-4N2L357B.js.map +0 -1
  356. package/build/modern/chunk-BEYPMC73.js.map +0 -1
  357. package/build/modern/chunk-GVNPFXKL.js +0 -26
  358. package/build/modern/chunk-GVNPFXKL.js.map +0 -1
  359. package/build/modern/chunk-IL5ELPTT.js +0 -58
  360. package/build/modern/chunk-IL5ELPTT.js.map +0 -1
  361. package/build/modern/chunk-JJGZRBIR.js +0 -49
  362. package/build/modern/chunk-JJGZRBIR.js.map +0 -1
  363. package/build/modern/chunk-JJP2TFTU.js +0 -29
  364. package/build/modern/chunk-JJP2TFTU.js.map +0 -1
  365. package/build/modern/chunk-XB4ZRAH4.js.map +0 -1
  366. /package/build/legacy/{noExternals.d.ts → noExternals.d.cts} +0 -0
  367. /package/build/{legacy/chunk-XB4ZRAH4.js.map → modern/chunk-53QBTZZF.js.map} +0 -0
  368. /package/build/{legacy/chunk-BEYPMC73.js.map → modern/chunk-5WVXIAG2.js.map} +0 -0
  369. /package/build/{legacy/chunk-LF2QFS5S.js.map → modern/chunk-EJIMJWPB.js.map} +0 -0
  370. /package/build/modern/{chunk-Y5IY7O23.js.map → chunk-GZY6CH7D.js.map} +0 -0
  371. /package/build/{legacy/chunk-IL5ELPTT.js.map → modern/chunk-ID3XWGLY.js.map} +0 -0
  372. /package/build/modern/{chunk-LTDNZRUY.js.map → chunk-S6CMAXQF.js.map} +0 -0
  373. /package/build/modern/{chunk-QO2UXGW4.js.map → chunk-VPWBSZAR.js.map} +0 -0
  374. /package/build/{legacy/aria-helpers/nav-menu.aria.js.map → modern/components/Checkbox.js.map} +0 -0
  375. /package/build/{legacy/aria-helpers/tabs.aria.js.map → modern/components/FileStatus.js.map} +0 -0
  376. /package/build/{legacy/aria-helpers/trap-focus.aria.js.map → modern/components/ProgressBar.js.map} +0 -0
  377. /package/build/{legacy/chunk-55J6XMHW.js.map → modern/components/Select.js.map} +0 -0
  378. /package/build/{legacy/components/Button.js.map → modern/config/icons/checkbox.icons.js.map} +0 -0
@@ -0,0 +1,246 @@
1
+ 'use client'
2
+
3
+ import {
4
+ useCallback,
5
+ useMemo,
6
+ type HTMLAttributes,
7
+ type MouseEvent,
8
+ } from 'react'
9
+ import { ProgressBar } from './ProgressBar'
10
+ import { IconButton } from './IconButton'
11
+ import {
12
+ fileStatus,
13
+ type FileStatusVariantProps,
14
+ } from '@cerberus/styled-system/recipes'
15
+ import { css, cx } from '@cerberus/styled-system/css'
16
+ import { circle, hstack, vstack } from '@cerberus/styled-system/patterns'
17
+ import { $cerberusIcons } from '../config/defineIcons'
18
+ import { FieldMessage } from './FieldMessage'
19
+ import { Field } from '../context/field'
20
+
21
+ /**
22
+ * This module contains the FileStatus component.
23
+ * @module
24
+ */
25
+
26
+ export type FileStatusKey = (typeof processStatus)[keyof typeof processStatus]
27
+ export type FileStatusActions = 'cancel' | 'retry' | 'delete'
28
+ export interface FileBaseStatusProps
29
+ extends Omit<HTMLAttributes<HTMLDivElement>, 'onClick'> {
30
+ file: string
31
+ now: number
32
+ status: processStatus
33
+ onClick: (status: FileStatusActions, e: MouseEvent<HTMLButtonElement>) => void
34
+ }
35
+ export type FileStatusProps = FileBaseStatusProps & FileStatusVariantProps
36
+
37
+ /**
38
+ * A helper object to represent the status of a file.
39
+ * @example
40
+ * ```tsx
41
+ * import { fileStatus } from '@cerberus/react'
42
+ * processStatus.TODO // 'todo'
43
+ * ```
44
+ */
45
+ export const enum processStatus {
46
+ TODO = 'todo',
47
+ PROCESSING = 'processing',
48
+ DONE = 'done',
49
+ ERROR = 'error',
50
+ }
51
+
52
+ /**
53
+ * This component displays the status of a file.
54
+ * @param props - {
55
+ * file: string,
56
+ * now: number,
57
+ * status: keyof typeof fileStatus,
58
+ * action: (status: FileStatusActions, e: MouseEvent<HTMLButtonElement>) => void
59
+ * }.
60
+ * @example
61
+ * ```tsx
62
+ * <FileStatus file="file.txt" now={0} status={processStatus.TODO} action={(status, e) => console.log(status, e)} />
63
+ * ```
64
+ */
65
+ export function FileStatus(props: FileStatusProps) {
66
+ const { file, now, status, onClick, ...nativeProps } = props
67
+ const actionLabel = useMemo(() => getStatusActionLabel(status), [status])
68
+ const palette = useMemo(() => getPalette(status), [status])
69
+ const modalIconPalette = useMemo(() => getModalIconPalette(status), [status])
70
+ const styles = useMemo(() => {
71
+ switch (status) {
72
+ case processStatus.TODO:
73
+ return fileStatus({ status: 'todo' })
74
+ case processStatus.PROCESSING:
75
+ return fileStatus({ status: 'processing' })
76
+ case processStatus.DONE:
77
+ return fileStatus({ status: 'done' })
78
+ case processStatus.ERROR:
79
+ return fileStatus({ status: 'error' })
80
+ default:
81
+ return fileStatus()
82
+ }
83
+ }, [status])
84
+
85
+ const handleClick = useCallback(
86
+ (e: MouseEvent<HTMLButtonElement>) => {
87
+ const actionStatus = getStatusActionLabel(
88
+ status,
89
+ ).toLocaleLowerCase() as FileStatusActions
90
+ onClick(actionStatus, e)
91
+ },
92
+ [onClick],
93
+ )
94
+
95
+ return (
96
+ <div
97
+ {...nativeProps}
98
+ className={cx(nativeProps.className, styles.root, hstack())}
99
+ >
100
+ <div
101
+ className={cx(
102
+ styles.icon,
103
+ circle({
104
+ size: '2rem',
105
+ }),
106
+ )}
107
+ >
108
+ <MatchFileStatusIcon status={status} />
109
+ </div>
110
+
111
+ <div
112
+ className={vstack({
113
+ alignItems: 'flex-start',
114
+ gap: '0.12rem',
115
+ w: 'full',
116
+ })}
117
+ >
118
+ <small
119
+ className={css({
120
+ color: 'page.text.initial',
121
+ textStyle: 'label-sm',
122
+ })}
123
+ >
124
+ {file}
125
+ </small>
126
+ <ProgressBar now={now} size="sm" />
127
+ <Field invalid={modalIconPalette === 'danger'}>
128
+ <FieldMessage
129
+ className={css({
130
+ color: 'page.text.100',
131
+ })}
132
+ id={`help:${file}`}
133
+ >
134
+ <MatchFileStatusText status={status} now={now} />
135
+ </FieldMessage>
136
+ </Field>
137
+ </div>
138
+
139
+ <IconButton
140
+ ariaLabel={actionLabel}
141
+ onClick={handleClick}
142
+ palette={palette}
143
+ size="sm"
144
+ >
145
+ <MatchStatusAction status={status} />
146
+ </IconButton>
147
+ </div>
148
+ )
149
+ }
150
+
151
+ interface FileStatusElProps {
152
+ status: FileStatusProps['status']
153
+ now?: number
154
+ }
155
+
156
+ function MatchFileStatusIcon(props: FileStatusElProps) {
157
+ const {
158
+ fileUploader: FileUploaderIcon,
159
+ invalidAlt: InvalidIcon,
160
+ successNotification: DoneIcon,
161
+ } = $cerberusIcons
162
+
163
+ switch (props.status) {
164
+ case processStatus.TODO:
165
+ case processStatus.PROCESSING:
166
+ return <FileUploaderIcon />
167
+ case processStatus.DONE:
168
+ return <DoneIcon />
169
+ case processStatus.ERROR:
170
+ return <InvalidIcon />
171
+ default:
172
+ throw new Error('Unknown status')
173
+ }
174
+ }
175
+
176
+ function MatchFileStatusText(props: FileStatusElProps) {
177
+ switch (props.status) {
178
+ case processStatus.TODO:
179
+ return 'Waiting to upload'
180
+ case processStatus.PROCESSING:
181
+ return `${props.now}% Complete`
182
+ case processStatus.DONE:
183
+ return 'File uploaded successfully'
184
+ case processStatus.ERROR:
185
+ return 'There was an error uploading the file'
186
+ default:
187
+ throw new Error('Invalid status')
188
+ }
189
+ }
190
+
191
+ function MatchStatusAction(props: FileStatusElProps) {
192
+ const { close: CloseIcon, redo: RedoIcon, delete: TrashIcon } = $cerberusIcons
193
+ switch (props.status) {
194
+ case processStatus.TODO:
195
+ case processStatus.PROCESSING:
196
+ return <CloseIcon />
197
+ case processStatus.ERROR:
198
+ return <RedoIcon />
199
+ case processStatus.DONE:
200
+ return <TrashIcon />
201
+ default:
202
+ throw new Error('Invalid status')
203
+ }
204
+ }
205
+
206
+ function getStatusActionLabel(status: FileStatusKey) {
207
+ switch (status) {
208
+ case processStatus.TODO:
209
+ case processStatus.PROCESSING:
210
+ return 'Cancel'
211
+ case processStatus.ERROR:
212
+ return 'Retry'
213
+ case processStatus.DONE:
214
+ return 'Delete'
215
+ default:
216
+ return ''
217
+ }
218
+ }
219
+
220
+ function getPalette(status: FileStatusKey) {
221
+ switch (status) {
222
+ case processStatus.TODO:
223
+ case processStatus.PROCESSING:
224
+ return 'danger'
225
+ case processStatus.ERROR:
226
+ return 'action'
227
+ case processStatus.DONE:
228
+ return 'danger'
229
+ default:
230
+ return 'action'
231
+ }
232
+ }
233
+
234
+ function getModalIconPalette(status: FileStatusKey) {
235
+ switch (status) {
236
+ case processStatus.TODO:
237
+ case processStatus.PROCESSING:
238
+ return 'action'
239
+ case processStatus.ERROR:
240
+ return 'danger'
241
+ case processStatus.DONE:
242
+ return 'success'
243
+ default:
244
+ return 'action'
245
+ }
246
+ }
@@ -43,7 +43,7 @@ export function FileUploader(props: FileUploaderProps) {
43
43
  <p className={styles.heading}>{props.heading}</p>
44
44
  </Show>
45
45
  Import {props.accept?.replace(',', ', ')} files
46
- <p className={styles.description}>Or click to upload</p>
46
+ <p className={styles.description}>Click to select files</p>
47
47
  <input
48
48
  {...props}
49
49
  className={cx(props.className, styles.input)}
@@ -38,12 +38,13 @@ export function Label(props: PropsWithChildren<LabelProps>) {
38
38
  return (
39
39
  <label
40
40
  {...nativeProps}
41
- data-disabled={disabled}
41
+ {...(disabled && { 'data-disabled': true })}
42
42
  className={cx(
43
43
  nativeProps.className,
44
44
  label({ size, usage }),
45
45
  hstack({
46
46
  justify: 'space-between',
47
+ w: 'full',
47
48
  }),
48
49
  )}
49
50
  >
@@ -51,7 +52,7 @@ export function Label(props: PropsWithChildren<LabelProps>) {
51
52
  <Show when={required}>
52
53
  <span
53
54
  className={css({
54
- color: 'page.text.100',
55
+ color: 'inherit',
55
56
  fontSize: 'inherit',
56
57
  })}
57
58
  >
@@ -6,8 +6,8 @@ import {
6
6
  } from '@cerberus/styled-system/recipes'
7
7
  import type { HTMLAttributes, PropsWithChildren } from 'react'
8
8
 
9
- export type ModalIconBaseProps = HTMLAttributes<HTMLDivElement>
10
- export type ModalIconProps = ModalIconBaseProps & ModalIconVariantProps
9
+ export type ModalIconProps = HTMLAttributes<HTMLDivElement> &
10
+ ModalIconVariantProps
11
11
 
12
12
  export function ModalIcon(props: PropsWithChildren<ModalIconProps>) {
13
13
  const { palette, ...nativeProps } = props
@@ -0,0 +1,61 @@
1
+ import { cx } from '@cerberus/styled-system/css'
2
+ import {
3
+ progressBar,
4
+ type ProgressBarVariantProps,
5
+ } from '@cerberus/styled-system/recipes'
6
+ import type { HTMLAttributes } from 'react'
7
+
8
+ /**
9
+ * This module contains the ProgressBar component.
10
+ * @module
11
+ */
12
+
13
+ export interface ProgressBarBaseProps extends HTMLAttributes<HTMLDivElement> {}
14
+ export type NonIndeterminateProgressBarProps = {
15
+ indeterminate?: never
16
+ now: number
17
+ }
18
+ export type IndeterminateProgressBarProps = {
19
+ indeterminate: true
20
+ now?: never
21
+ }
22
+ export type ProgressBarProps = ProgressBarBaseProps &
23
+ ProgressBarVariantProps &
24
+ (NonIndeterminateProgressBarProps | IndeterminateProgressBarProps)
25
+
26
+ /**
27
+ * The ProgressBar component is used to display the progress of a task.
28
+ * @param props - HTML div element attributes
29
+ * @param props.now - The current value of the progress bar
30
+ * @param props.indeterminate - Whether the progress bar is indeterminate
31
+ * @example
32
+ * ```tsx
33
+ * <ProgressBar value={75} />
34
+ * ```
35
+ */
36
+ export function ProgressBar(props: ProgressBarProps) {
37
+ const { indeterminate, size, usage, now, ...nativeProps } = props
38
+ const styles = progressBar({ size, usage })
39
+ const nowClamped = Math.min(100, Math.max(0, now || 0))
40
+ const width = {
41
+ width: indeterminate ? '50%' : `${nowClamped}%`,
42
+ }
43
+
44
+ return (
45
+ <div
46
+ {...nativeProps}
47
+ aria-valuemin={0}
48
+ aria-valuemax={100}
49
+ aria-valuenow={indeterminate ? 0 : nowClamped}
50
+ className={cx(nativeProps.className, styles.root)}
51
+ role="meter"
52
+ >
53
+ <div
54
+ {...(indeterminate && { 'data-indeterminate': true })}
55
+ data-complete={nowClamped === 100}
56
+ className={styles.bar}
57
+ style={width}
58
+ />
59
+ </div>
60
+ )
61
+ }
@@ -0,0 +1,96 @@
1
+ 'use client'
2
+
3
+ import { cx } from '@cerberus/styled-system/css'
4
+ import { hstack } from '@cerberus/styled-system/patterns'
5
+ import {
6
+ select,
7
+ type SelectVariantProps,
8
+ } from '@cerberus/styled-system/recipes'
9
+ import type { OptionHTMLAttributes, SelectHTMLAttributes } from 'react'
10
+ import { $cerberusIcons } from '../config/defineIcons'
11
+ import { useFieldContext } from '../context/field'
12
+ import { Show } from './Show'
13
+
14
+ /**
15
+ * This module contains the select components.
16
+ * @module
17
+ */
18
+
19
+ export type SelectProps = Omit<
20
+ SelectHTMLAttributes<HTMLSelectElement>,
21
+ 'size'
22
+ > &
23
+ SelectVariantProps & {
24
+ id: string
25
+ describedBy?: string
26
+ }
27
+
28
+ /**
29
+ * Select component
30
+ * props: SelectHTMLAttributes<HTMLSelectElement> & SelectVariantProps & { describedBy?: string }
31
+ * @example
32
+ * ```tsx
33
+ * <Select describedby="help:fruit" id="fruit">
34
+ * <Option value="">Choose option</Option>
35
+ * <Option value="one">Option 1</Option>
36
+ * <Option value="two">Option 2</Option>
37
+ * <Option value="three">Option 3</Option>
38
+ * </Select>
39
+ * ```
40
+ */
41
+ export function Select(props: SelectProps) {
42
+ const { describedBy, size, ...nativeProps } = props
43
+ const { invalid, ...fieldStates } = useFieldContext()
44
+ const { invalid: InvalidIcon, selectArrow: SelectArrow } = $cerberusIcons
45
+ const styles = select({
46
+ size,
47
+ })
48
+
49
+ return (
50
+ <div className={styles.root}>
51
+ <select
52
+ {...nativeProps}
53
+ {...fieldStates}
54
+ {...(describedBy && { 'aria-describedby': describedBy })}
55
+ {...(invalid && { 'aria-invalid': true })}
56
+ className={styles.input}
57
+ />
58
+ <span
59
+ className={cx(
60
+ styles.iconStack,
61
+ hstack({
62
+ gap: '2',
63
+ }),
64
+ )}
65
+ >
66
+ <Show when={invalid}>
67
+ <span
68
+ {...(invalid && { 'data-invalid': true })}
69
+ className={styles.stateIcon}
70
+ >
71
+ <InvalidIcon />
72
+ </span>
73
+ </Show>
74
+ <span className={styles.arrowIcon}>
75
+ <SelectArrow />
76
+ </span>
77
+ </span>
78
+ </div>
79
+ )
80
+ }
81
+
82
+ // We only export this component for consistency with the other components
83
+
84
+ export type OptionProps = OptionHTMLAttributes<HTMLOptionElement>
85
+
86
+ /**
87
+ * Option component
88
+ * props: OptionHTMLAttributes<HTMLOptionElement>
89
+ * @example
90
+ * ```tsx
91
+ * <Option value="one">Option 1</Option>
92
+ * ```
93
+ */
94
+ export function Option(props: OptionProps) {
95
+ return <option {...props} />
96
+ }
@@ -1,37 +1,57 @@
1
1
  import {
2
2
  Checkmark,
3
3
  CheckmarkFilled,
4
+ ChevronDown,
5
+ CloseFilled,
4
6
  CloudUpload,
5
7
  ErrorFilled,
6
8
  Information,
7
9
  InformationFilled,
10
+ Restart,
11
+ TrashCan,
12
+ Warning,
8
13
  WarningFilled,
9
14
  type CarbonIconType,
10
15
  } from '@cerberus/icons'
11
16
  import type { ElementType } from 'react'
17
+ import { CheckmarkIcon, IndeterminateIcon } from './icons/checkbox.icons'
12
18
 
13
19
  export type IconType = CarbonIconType | ElementType
14
20
 
15
21
  export interface DefinedIcons {
22
+ checkbox?: IconType
23
+ close?: IconType
16
24
  confirmModal?: IconType
25
+ delete?: IconType
17
26
  promptModal?: IconType
18
27
  fileUploader?: IconType
28
+ indeterminate?: IconType
19
29
  infoNotification?: IconType
20
30
  successNotification?: IconType
21
31
  warningNotification?: IconType
22
32
  dangerNotification?: IconType
23
33
  invalid: IconType
34
+ invalidAlt?: IconType
35
+ redo?: IconType
36
+ selectArrow?: IconType
24
37
  toggleChecked?: IconType
25
38
  }
26
39
 
27
40
  export const defaultIcons: DefinedIcons = {
41
+ checkbox: CheckmarkIcon,
42
+ close: CloseFilled,
28
43
  confirmModal: Information,
44
+ delete: TrashCan,
29
45
  promptModal: Information,
30
46
  fileUploader: CloudUpload,
47
+ indeterminate: IndeterminateIcon,
31
48
  infoNotification: InformationFilled,
32
49
  successNotification: CheckmarkFilled,
33
50
  warningNotification: WarningFilled,
34
51
  dangerNotification: ErrorFilled,
35
52
  invalid: WarningFilled,
53
+ invalidAlt: Warning,
54
+ redo: Restart,
55
+ selectArrow: ChevronDown,
36
56
  toggleChecked: Checkmark,
37
57
  }
@@ -0,0 +1,49 @@
1
+ import type { SVGProps } from 'react'
2
+
3
+ /**
4
+ * This module contains substitute icons for the Checkbox component.
5
+ * @module
6
+ */
7
+
8
+ interface CheckboxIconProps extends SVGProps<SVGSVGElement> {}
9
+
10
+ /**
11
+ * Checkmark icon for Checkbox component
12
+ */
13
+ export function CheckmarkIcon(props: CheckboxIconProps) {
14
+ return (
15
+ <svg
16
+ aria-hidden="true"
17
+ xmlns="http://www.w3.org/2000/svg"
18
+ fill="none"
19
+ role="img"
20
+ viewBox="0 0 24 24"
21
+ {...props}
22
+ >
23
+ <path
24
+ fill="currentColor"
25
+ d="M9.714 18 4 12.335l1.818-1.764 3.896 3.824L18.181 6 20 7.803 9.714 18Z"
26
+ />
27
+ </svg>
28
+ )
29
+ }
30
+
31
+ interface IndeterminateIconProps extends SVGProps<SVGSVGElement> {}
32
+
33
+ /**
34
+ * Indeterminate icon for Checkbox component
35
+ */
36
+ export function IndeterminateIcon(props: IndeterminateIconProps) {
37
+ return (
38
+ <svg
39
+ aria-hidden="true"
40
+ xmlns="http://www.w3.org/2000/svg"
41
+ role="img"
42
+ fill="none"
43
+ viewBox="0 0 24 24"
44
+ {...props}
45
+ >
46
+ <path fill="currentColor" d="M4 11h16v2.667H4z" />
47
+ </svg>
48
+ )
49
+ }
package/src/index.ts CHANGED
@@ -6,9 +6,11 @@
6
6
  // components
7
7
 
8
8
  export * from './components/Button'
9
+ export * from './components/Checkbox'
9
10
  export * from './components/Droppable'
10
11
  export * from './components/FieldMessage'
11
12
  export * from './components/FeatureFlag'
13
+ export * from './components/FileStatus'
12
14
  export * from './components/FileUploader'
13
15
  export * from './components/IconButton'
14
16
  export * from './components/Input'
@@ -25,7 +27,9 @@ export * from './components/Notification'
25
27
  export * from './components/NotificationHeading'
26
28
  export * from './components/NotificationDescription'
27
29
  export * from './components/Portal'
30
+ export * from './components/ProgressBar'
28
31
  export * from './components/Radio'
32
+ export * from './components/Select'
29
33
  export * from './components/Tab'
30
34
  export * from './components/TabList'
31
35
  export * from './components/TabPanel'
@@ -1,7 +0,0 @@
1
- import {
2
- createNavTriggerProps
3
- } from "../chunk-JF76VIL3.js";
4
- export {
5
- createNavTriggerProps
6
- };
7
- //# sourceMappingURL=nav-menu.aria.js.map
@@ -1,9 +0,0 @@
1
- "use client";
2
- import {
3
- useTabsKeyboardNavigation
4
- } from "../chunk-GKUDLVOV.js";
5
- import "../chunk-KF24CS4S.js";
6
- export {
7
- useTabsKeyboardNavigation
8
- };
9
- //# sourceMappingURL=tabs.aria.js.map
@@ -1,7 +0,0 @@
1
- import {
2
- trapFocus
3
- } from "../chunk-KESKDLX6.js";
4
- export {
5
- trapFocus
6
- };
7
- //# sourceMappingURL=trap-focus.aria.js.map
@@ -1,21 +0,0 @@
1
- // src/components/Modal.tsx
2
- import { cx } from "@cerberus/styled-system/css";
3
- import { modal } from "@cerberus/styled-system/recipes";
4
- import { forwardRef } from "react";
5
- import { jsx } from "react/jsx-runtime";
6
- function ModalEl(props, ref) {
7
- return /* @__PURE__ */ jsx(
8
- "dialog",
9
- {
10
- ...props,
11
- className: cx(props.className, modal().dialog),
12
- ref
13
- }
14
- );
15
- }
16
- var Modal = forwardRef(ModalEl);
17
-
18
- export {
19
- Modal
20
- };
21
- //# sourceMappingURL=chunk-2UFNQM55.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/components/Modal.tsx"],"sourcesContent":["import { cx } from '@cerberus/styled-system/css'\nimport { modal } from '@cerberus/styled-system/recipes'\nimport { forwardRef, type ForwardedRef, type HTMLAttributes } from 'react'\n\n/**\n * This module contains the Modal root component for a customizable modal.\n * @module\n */\n\n// Modal\n\nexport type ModalProps = HTMLAttributes<HTMLDialogElement>\n\nfunction ModalEl(props: ModalProps, ref: ForwardedRef<HTMLDialogElement>) {\n return (\n <dialog\n {...props}\n className={cx(props.className, modal().dialog)}\n ref={ref}\n />\n )\n}\n\n/**\n * The Modal component is the root element for a customizable modal.\n * @example\n * ```tsx\n * const { modalRef } = useModal()\n *\n * <Modal ref={modalRef}>\n * <ModalIcon icon={$cerberusIcons.alert} />\n * <h2>Modal Heading</h2>\n * <p>Modal description</p>\n * </Modal>\n * ```\n */\nexport const Modal = forwardRef(ModalEl)\n"],"mappings":";AAAA,SAAS,UAAU;AACnB,SAAS,aAAa;AACtB,SAAS,kBAA0D;AAa/D;AAFJ,SAAS,QAAQ,OAAmB,KAAsC;AACxE,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,WAAW,GAAG,MAAM,WAAW,MAAM,EAAE,MAAM;AAAA,MAC7C;AAAA;AAAA,EACF;AAEJ;AAeO,IAAM,QAAQ,WAAW,OAAO;","names":[]}