@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
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/context/prompt-modal.tsx"],"sourcesContent":["'use client'\n\nimport {\n createContext,\n useCallback,\n useContext,\n useMemo,\n useRef,\n useState,\n type ChangeEvent,\n type MouseEvent,\n type PropsWithChildren,\n} from 'react'\nimport { Portal } from '../components/Portal'\nimport { Button } from '../components/Button'\nimport { css } from '@cerberus/styled-system/css'\nimport { hstack, vstack } from '@cerberus/styled-system/patterns'\nimport { trapFocus } from '../aria-helpers/trap-focus.aria'\nimport { Input } from '../components/Input'\nimport { Field } from './field'\nimport { Label } from '../components/Label'\nimport { $cerberusIcons } from '../config/defineIcons'\nimport { ModalIcon } from '../components/ModalIcon'\nimport { Show } from '../components/Show'\nimport { useModal } from '../hooks/useModal'\nimport { Modal } from '../components/Modal'\nimport { ModalHeader } from '../components/ModalHeader'\nimport { ModalHeading } from '../components/ModalHeading'\nimport { ModalDescription } from '../components/ModalDescription'\n\n/**\n * This module provides a context and hook for the prompt modal.\n * @module\n */\n\nexport interface ShowPromptModalOptions {\n kind?: 'destructive' | 'non-destructive'\n heading: string\n description?: string\n key: string\n actionText: string\n cancelText: string\n}\nexport type PromptShowResult =\n | ((value: string | PromiseLike<string>) => void)\n | null\n\nexport interface PromptModalValue {\n show: (options: ShowPromptModalOptions) => Promise<string>\n}\n\nconst PromptModalContext = createContext<PromptModalValue | null>(null)\n\nexport interface PromptModalProviderProps {}\n\n/**\n * Provides a prompt modal to the app.\n * @example\n * ```tsx\n * // Wrap the Provider around the root of the feature.\n * <PromptModal>\n * <SomeFeatureSection />\n * </PromptModal>\n *\n * // Use the hook to show the prompt modal.\n * const prompt = usePromptModal()\n *\n * const handleClick = useCallback(async () => {\n * const accepted = await prompt.show({\n * kind: 'destructive',\n * heading: 'Delete channel?',\n * description:\n * 'This will permanently delete a channel on your account. There is no going back.',\n * key: CHANNEL_NAME,\n * actionText: 'Yes, delete channel',\n * cancelText: 'No, cancel',\n * })\n * // do something with accepted\n * }, [prompt])\n * ```\n */\nexport function PromptModal(\n props: PropsWithChildren<PromptModalProviderProps>,\n) {\n const { modalRef, show, close } = useModal()\n const resolveRef = useRef<PromptShowResult>(null)\n const [content, setContent] = useState<ShowPromptModalOptions | null>(null)\n const [inputValue, setInputValue] = useState<string>('')\n const focusTrap = trapFocus(modalRef)\n const PromptIcon = $cerberusIcons.promptModal\n\n const isValid = useMemo(\n () => inputValue === content?.key,\n [inputValue, content],\n )\n\n const palette = useMemo(\n () => (content?.kind === 'destructive' ? 'danger' : 'action'),\n [content],\n )\n\n const handleChange = useCallback(\n (e: ChangeEvent<HTMLInputElement>) => {\n setInputValue(e.currentTarget.value)\n },\n [content],\n )\n\n const handleChoice = useCallback(\n (e: MouseEvent<HTMLButtonElement>) => {\n const target = e.currentTarget as HTMLButtonElement\n if (target.value === 'true') {\n resolveRef.current?.(inputValue)\n }\n close()\n },\n [inputValue, close],\n )\n\n const handleShow = useCallback(\n (options: ShowPromptModalOptions) => {\n return new Promise<string>((resolve) => {\n setContent({ ...options, kind: options.kind || 'non-destructive' })\n show()\n resolveRef.current = resolve\n })\n },\n [show],\n )\n\n const value = useMemo(\n () => ({\n show: handleShow,\n }),\n [handleShow],\n )\n\n return (\n <PromptModalContext.Provider value={value}>\n {props.children}\n\n <Portal>\n <Modal onKeyDown={focusTrap} ref={modalRef}>\n <ModalHeader>\n <Show\n when={palette === 'danger'}\n fallback={\n <ModalIcon palette=\"action\">\n <PromptIcon size={24} />\n </ModalIcon>\n }\n >\n <ModalIcon palette=\"danger\">\n <PromptIcon size={24} />\n </ModalIcon>\n </Show>\n <ModalHeading>{content?.heading}</ModalHeading>\n <ModalDescription>{content?.description}</ModalDescription>\n </ModalHeader>\n\n <div\n className={vstack({\n alignItems: 'flex-start',\n mt: '4',\n mb: '8',\n })}\n >\n <Field invalid={!isValid}>\n <Label htmlFor=\"confirm\" size=\"md\">\n Type\n <strong\n className={css({\n textTransform: 'uppercase',\n })}\n >\n {content?.key}\n </strong>\n to confirm\n </Label>\n <Input\n id=\"confirm\"\n name=\"confirm\"\n onChange={handleChange}\n type=\"text\"\n />\n </Field>\n </div>\n\n <div\n className={hstack({\n justifyContent: 'stretch',\n gap: '4',\n })}\n >\n <Button\n autoFocus\n className={css({\n w: '1/2',\n })}\n disabled={!isValid}\n name=\"confirm\"\n onClick={handleChoice}\n palette={palette}\n value=\"true\"\n >\n {content?.actionText}\n </Button>\n <Button\n className={css({\n w: '1/2',\n })}\n name=\"cancel\"\n onClick={handleChoice}\n usage=\"outlined\"\n value=\"false\"\n >\n {content?.cancelText}\n </Button>\n </div>\n </Modal>\n </Portal>\n </PromptModalContext.Provider>\n )\n}\n\nexport function usePromptModal(): PromptModalValue {\n const context = useContext(PromptModalContext)\n if (context === null) {\n throw new Error('usePromptModal must be used within a PromptModal Provider')\n }\n return context\n}\n"],"mappings":"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","names":[]}
@@ -1,76 +0,0 @@
1
- import {
2
- trapFocus
3
- } from "./chunk-KESKDLX6.js";
4
- import {
5
- $cerberusIcons
6
- } from "./chunk-BEYPMC73.js";
7
-
8
- // src/components/Notification.tsx
9
- import { cx } from "@cerberus/styled-system/css";
10
- import { hstack, vstack } from "@cerberus/styled-system/patterns";
11
- import {
12
- notification
13
- } from "@cerberus/styled-system/recipes";
14
- import {
15
- useRef
16
- } from "react";
17
- import { Close } from "@cerberus/icons";
18
- import { jsx, jsxs } from "react/jsx-runtime";
19
- function MatchNotificationIcon(props) {
20
- const palette = props.palette || "info";
21
- const key = `${palette}Notification`;
22
- const Icon = $cerberusIcons[key];
23
- return /* @__PURE__ */ jsx(Icon, {});
24
- }
25
- function Notification(props) {
26
- const { children, palette, onClose, ...nativeProps } = props;
27
- const ref = useRef(null);
28
- const onKeyDown = trapFocus(ref);
29
- const styles = notification({ palette });
30
- return /* @__PURE__ */ jsxs(
31
- "dialog",
32
- {
33
- ...nativeProps,
34
- className: cx(
35
- nativeProps.className,
36
- hstack({
37
- position: "relative",
38
- gap: "4"
39
- }),
40
- styles.dialog
41
- ),
42
- onKeyDown,
43
- ref,
44
- role: "alert",
45
- children: [
46
- /* @__PURE__ */ jsx("span", { className: styles.icon, children: /* @__PURE__ */ jsx(MatchNotificationIcon, { palette }) }),
47
- /* @__PURE__ */ jsx(
48
- "div",
49
- {
50
- className: vstack({
51
- alignItems: "flex-start",
52
- gap: "0",
53
- py: "2"
54
- }),
55
- children
56
- }
57
- ),
58
- /* @__PURE__ */ jsx(
59
- "button",
60
- {
61
- "aria-label": "Close",
62
- className: styles.close,
63
- onClick: onClose,
64
- value: props.id,
65
- children: /* @__PURE__ */ jsx(Close, {})
66
- }
67
- )
68
- ]
69
- }
70
- );
71
- }
72
-
73
- export {
74
- Notification
75
- };
76
- //# sourceMappingURL=chunk-LF2QFS5S.js.map
@@ -1,12 +0,0 @@
1
- // src/components/Thead.tsx
2
- import { cx } from "@cerberus/styled-system/css";
3
- import { thead } from "@cerberus/styled-system/recipes";
4
- import { jsx } from "react/jsx-runtime";
5
- function Thead(props) {
6
- return /* @__PURE__ */ jsx("thead", { ...props, className: cx(props.className, thead()) });
7
- }
8
-
9
- export {
10
- Thead
11
- };
12
- //# sourceMappingURL=chunk-N3FUF4TB.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/components/Thead.tsx"],"sourcesContent":["import { cx } from '@cerberus/styled-system/css'\nimport { thead } from '@cerberus/styled-system/recipes'\nimport type { TableHTMLAttributes } from 'react'\n\n/**\n * This module contains the Thead component.\n * @module\n */\n\nexport type TheadProps = TableHTMLAttributes<HTMLTableSectionElement>\n\n/**\n * The Thead component is used to render a table header.\n * @definition [Table docs](https://cerberus.digitalu.design/react/table)\n * @example\n * ```tsx\n * <Thead>\n * {children}\n * </Thead>\n * ```\n */\nexport function Thead(props: TheadProps) {\n return <thead {...props} className={cx(props.className, thead())} />\n}\n"],"mappings":";AAAA,SAAS,UAAU;AACnB,SAAS,aAAa;AAqBb;AADF,SAAS,MAAM,OAAmB;AACvC,SAAO,oBAAC,WAAO,GAAG,OAAO,WAAW,GAAG,MAAM,WAAW,MAAM,CAAC,GAAG;AACpE;","names":[]}
@@ -1,47 +0,0 @@
1
- import {
2
- useTabsKeyboardNavigation
3
- } from "./chunk-GKUDLVOV.js";
4
- import {
5
- useTabsContext
6
- } from "./chunk-KF24CS4S.js";
7
-
8
- // src/components/Tab.tsx
9
- import {
10
- useMemo,
11
- useTransition
12
- } from "react";
13
- import { cx } from "@cerberus/styled-system/css";
14
- import { jsx } from "react/jsx-runtime";
15
- function Tab(props) {
16
- const { value, ...nativeProps } = props;
17
- const { active, onTabUpdate, styles } = useTabsContext();
18
- const [isPending, startTransition] = useTransition();
19
- const { ref } = useTabsKeyboardNavigation();
20
- const isActive = useMemo(() => active === value, [active, value]);
21
- function handleClick(e) {
22
- var _a;
23
- (_a = props.onClick) == null ? void 0 : _a.call(props, e);
24
- startTransition(() => onTabUpdate(e.currentTarget.value));
25
- }
26
- return /* @__PURE__ */ jsx(
27
- "button",
28
- {
29
- ...nativeProps,
30
- ...!isActive && { tabIndex: -1 },
31
- "aria-controls": `panel:${value}`,
32
- "aria-busy": isPending,
33
- "aria-selected": isActive,
34
- id: value,
35
- className: cx(nativeProps.className, styles.tab),
36
- onClick: handleClick,
37
- role: "tab",
38
- ref,
39
- value
40
- }
41
- );
42
- }
43
-
44
- export {
45
- Tab
46
- };
47
- //# sourceMappingURL=chunk-NE5NHILF.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/components/Tab.tsx"],"sourcesContent":["'use client'\n\nimport {\n useMemo,\n useTransition,\n type ButtonHTMLAttributes,\n type MouseEvent,\n} from 'react'\nimport { useTabsContext } from '../context/tabs'\nimport { cx } from '@cerberus/styled-system/css'\nimport { useTabsKeyboardNavigation } from '../aria-helpers/tabs.aria'\n\n/**\n * This module provides a Tab component.\n * @module\n */\nexport interface TabProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n value: string\n}\n\n/**\n * The Tab component provides a tab element to be used in a TabList.\n * @definition [ARIA Target Size](https://www.w3.org/WAI/WCAG21/Understanding/target-size.html#:~:text=Understanding%20SC%202.5.,%3ATarget%20Size%20(Level%20AAA)&text=The%20size%20of%20the%20target,Equivalent)\n * @definition [Tab docs](https://cerberus.digitalu.design/react/tabs)\n * @param value - the id of the tab that will be tracked as the active tab and used for aria attributes\n * @example\n * ```tsx\n * <Tab value=\"overview\">\n * Overview\n * </Tab>\n * ```\n */\nexport function Tab(props: TabProps) {\n const { value, ...nativeProps } = props\n const { active, onTabUpdate, styles } = useTabsContext()\n const [isPending, startTransition] = useTransition()\n const { ref } = useTabsKeyboardNavigation()\n const isActive = useMemo(() => active === value, [active, value])\n\n function handleClick(e: MouseEvent<HTMLButtonElement>) {\n props.onClick?.(e)\n startTransition(() => onTabUpdate(e.currentTarget.value))\n }\n\n return (\n <button\n {...nativeProps}\n {...(!isActive && { tabIndex: -1 })}\n aria-controls={`panel:${value}`}\n aria-busy={isPending}\n aria-selected={isActive}\n id={value}\n className={cx(nativeProps.className, styles.tab)}\n onClick={handleClick}\n role=\"tab\"\n ref={ref}\n value={value}\n />\n )\n}\n"],"mappings":";;;;;;;;AAEA;AAAA,EACE;AAAA,EACA;AAAA,OAGK;AAEP,SAAS,UAAU;AAoCf;AAbG,SAAS,IAAI,OAAiB;AACnC,QAAM,EAAE,OAAO,GAAG,YAAY,IAAI;AAClC,QAAM,EAAE,QAAQ,aAAa,OAAO,IAAI,eAAe;AACvD,QAAM,CAAC,WAAW,eAAe,IAAI,cAAc;AACnD,QAAM,EAAE,IAAI,IAAI,0BAA0B;AAC1C,QAAM,WAAW,QAAQ,MAAM,WAAW,OAAO,CAAC,QAAQ,KAAK,CAAC;AAEhE,WAAS,YAAY,GAAkC;AAvCzD;AAwCI,gBAAM,YAAN,+BAAgB;AAChB,oBAAgB,MAAM,YAAY,EAAE,cAAc,KAAK,CAAC;AAAA,EAC1D;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACH,GAAI,CAAC,YAAY,EAAE,UAAU,GAAG;AAAA,MACjC,iBAAe,SAAS,KAAK;AAAA,MAC7B,aAAW;AAAA,MACX,iBAAe;AAAA,MACf,IAAI;AAAA,MACJ,WAAW,GAAG,YAAY,WAAW,OAAO,GAAG;AAAA,MAC/C,SAAS;AAAA,MACT,MAAK;AAAA,MACL;AAAA,MACA;AAAA;AAAA,EACF;AAEJ;","names":[]}
@@ -1,33 +0,0 @@
1
- import {
2
- useFieldContext
3
- } from "./chunk-ZAU4JVLL.js";
4
-
5
- // src/components/Radio.tsx
6
- import { cx } from "@cerberus/styled-system/css";
7
- import { hstack } from "@cerberus/styled-system/patterns";
8
- import { radio } from "@cerberus/styled-system/recipes";
9
- import { jsx, jsxs } from "react/jsx-runtime";
10
- function Radio(props) {
11
- const { children, size, ...nativeProps } = props;
12
- const { invalid, ...state } = useFieldContext();
13
- const styles = radio({ size });
14
- return /* @__PURE__ */ jsxs("div", { className: cx("group", hstack(), styles.root), tabIndex: 0, children: [
15
- /* @__PURE__ */ jsx(
16
- "input",
17
- {
18
- ...nativeProps,
19
- ...state,
20
- ...invalid && { "aria-invalid": true },
21
- className: cx(nativeProps.className, styles.input),
22
- tabIndex: -1,
23
- type: "radio"
24
- }
25
- ),
26
- children
27
- ] });
28
- }
29
-
30
- export {
31
- Radio
32
- };
33
- //# sourceMappingURL=chunk-PH64POOB.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/components/Radio.tsx"],"sourcesContent":["'use client'\n\nimport { cx } from '@cerberus/styled-system/css'\nimport { hstack } from '@cerberus/styled-system/patterns'\nimport { radio } from '@cerberus/styled-system/recipes'\nimport type { RecipeVariantProps } from '@cerberus/styled-system/types'\nimport type { InputHTMLAttributes, PropsWithChildren } from 'react'\nimport { useFieldContext } from '../context/field'\n\nexport type RadioRecipe = RecipeVariantProps<typeof radio>\nexport interface RadioBaseProps\n extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'> {\n id: string\n}\nexport type RadioProps = RadioBaseProps & RadioRecipe\n\nexport function Radio(props: PropsWithChildren<RadioProps>) {\n const { children, size, ...nativeProps } = props\n const { invalid, ...state } = useFieldContext()\n const styles = radio({ size })\n\n return (\n <div className={cx('group', hstack(), styles.root)} tabIndex={0}>\n <input\n {...nativeProps}\n {...state}\n {...(invalid && { 'aria-invalid': true })}\n className={cx(nativeProps.className, styles.input)}\n tabIndex={-1}\n type=\"radio\"\n />\n {children}\n </div>\n )\n}\n"],"mappings":";;;;;AAEA,SAAS,UAAU;AACnB,SAAS,cAAc;AACvB,SAAS,aAAa;AAkBlB,SACE,KADF;AANG,SAAS,MAAM,OAAsC;AAC1D,QAAM,EAAE,UAAU,MAAM,GAAG,YAAY,IAAI;AAC3C,QAAM,EAAE,SAAS,GAAG,MAAM,IAAI,gBAAgB;AAC9C,QAAM,SAAS,MAAM,EAAE,KAAK,CAAC;AAE7B,SACE,qBAAC,SAAI,WAAW,GAAG,SAAS,OAAO,GAAG,OAAO,IAAI,GAAG,UAAU,GAC5D;AAAA;AAAA,MAAC;AAAA;AAAA,QACE,GAAG;AAAA,QACH,GAAG;AAAA,QACH,GAAI,WAAW,EAAE,gBAAgB,KAAK;AAAA,QACvC,WAAW,GAAG,YAAY,WAAW,OAAO,KAAK;AAAA,QACjD,UAAU;AAAA,QACV,MAAK;AAAA;AAAA,IACP;AAAA,IACC;AAAA,KACH;AAEJ;","names":[]}
@@ -1,24 +0,0 @@
1
- // src/components/Tbody.tsx
2
- import { tbody } from "@cerberus/styled-system/recipes";
3
- import { cx } from "@cerberus/styled-system/css";
4
- import { jsx } from "react/jsx-runtime";
5
- function Tbody(props) {
6
- const { decoration, ...nativeProps } = props;
7
- return /* @__PURE__ */ jsx(
8
- "tbody",
9
- {
10
- ...nativeProps,
11
- className: cx(
12
- nativeProps.className,
13
- tbody({
14
- decoration
15
- })
16
- )
17
- }
18
- );
19
- }
20
-
21
- export {
22
- Tbody
23
- };
24
- //# sourceMappingURL=chunk-PJ3744I6.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/components/Tbody.tsx"],"sourcesContent":["import { tbody, type TbodyVariantProps } from '@cerberus/styled-system/recipes'\nimport { cx } from '@cerberus/styled-system/css'\nimport type { TableHTMLAttributes } from 'react'\n\nexport type TbodyBaseProps = TableHTMLAttributes<HTMLTableSectionElement>\nexport type TbodyProps = TbodyBaseProps & TbodyVariantProps\n\n/**\n * The TBody component is used to render a table body.\n * @definition [Table docs](https://cerberus.digitalu.design/react/table)\n * @example\n * ```tsx\n * <TBody>\n * {children}\n * </TBody>\n * ```\n */\nexport function Tbody(props: TbodyProps) {\n const { decoration, ...nativeProps } = props\n return (\n <tbody\n {...nativeProps}\n className={cx(\n nativeProps.className,\n tbody({\n decoration,\n }),\n )}\n />\n )\n}\n"],"mappings":";AAAA,SAAS,aAAqC;AAC9C,SAAS,UAAU;AAmBf;AAHG,SAAS,MAAM,OAAmB;AACvC,QAAM,EAAE,YAAY,GAAG,YAAY,IAAI;AACvC,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,WAAW;AAAA,QACT,YAAY;AAAA,QACZ,MAAM;AAAA,UACJ;AAAA,QACF,CAAC;AAAA,MACH;AAAA;AAAA,EACF;AAEJ;","names":[]}
@@ -1,86 +0,0 @@
1
- import {
2
- useNavMenuContext
3
- } from "./chunk-KJUCHZHV.js";
4
- import {
5
- Show
6
- } from "./chunk-4O4QFF4S.js";
7
-
8
- // src/components/NavMenuList.tsx
9
- import { useMemo } from "react";
10
- import { cx } from "@cerberus/styled-system/css";
11
- import { vstack } from "@cerberus/styled-system/patterns";
12
- import { jsx } from "react/jsx-runtime";
13
- function getPosition(position) {
14
- const defaultPositions = {
15
- left: "auto",
16
- right: "auto",
17
- top: "auto",
18
- bottom: "auto"
19
- };
20
- switch (position) {
21
- case "right":
22
- return { ...defaultPositions, top: "0%", left: "105%" };
23
- case "left":
24
- return { ...defaultPositions, top: "0%", right: "105%" };
25
- case "bottom":
26
- return { ...defaultPositions, top: "110%" };
27
- case "top":
28
- return { ...defaultPositions, bottom: "110%" };
29
- default:
30
- return defaultPositions;
31
- }
32
- }
33
- var navListStyles = vstack({
34
- alignItems: "flex-start",
35
- bgColor: "page.surface.100",
36
- boxShadow: "lg",
37
- gap: "2",
38
- opacity: "0",
39
- p: "4",
40
- position: "absolute",
41
- rounded: "md",
42
- zIndex: "dropdown",
43
- _motionSafe: {
44
- animationName: "zoomIn",
45
- animationDelay: "100ms",
46
- animationDuration: "150ms",
47
- animationFillMode: "both",
48
- animationTimingFunction: "ease-in-out"
49
- },
50
- _positionBottom: {
51
- transformOrigin: "top left"
52
- },
53
- _positionTop: {
54
- transformOrigin: "bottom left"
55
- },
56
- _positionLeft: {
57
- transformOrigin: "top right"
58
- },
59
- _positionRight: {
60
- transformOrigin: "top left"
61
- }
62
- });
63
- function NavMenuList(props) {
64
- const { position, ...nativeProps } = props;
65
- const { menuRef, expanded } = useNavMenuContext();
66
- const locationStyles = useMemo(
67
- () => getPosition(position ?? "bottom"),
68
- [position]
69
- );
70
- return /* @__PURE__ */ jsx(Show, { when: expanded, children: /* @__PURE__ */ jsx(
71
- "ul",
72
- {
73
- ...nativeProps,
74
- "data-position": position ?? "bottom",
75
- className: cx(nativeProps.className, navListStyles),
76
- ref: menuRef,
77
- style: locationStyles
78
- }
79
- ) });
80
- }
81
-
82
- export {
83
- getPosition,
84
- NavMenuList
85
- };
86
- //# sourceMappingURL=chunk-PMCYXRAH.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/components/NavMenuList.tsx"],"sourcesContent":["'use client'\n\nimport { useMemo, type HTMLAttributes } from 'react'\nimport { cx } from '@cerberus/styled-system/css'\nimport { vstack } from '@cerberus/styled-system/patterns'\nimport { useNavMenuContext } from '../context/navMenu'\nimport type { Positions } from '../types'\nimport { Show } from './Show'\n\ninterface GetPositionResult {\n left: string\n right: string\n top: string\n bottom: string\n}\n\nexport function getPosition(position: Positions): GetPositionResult {\n const defaultPositions = {\n left: 'auto',\n right: 'auto',\n top: 'auto',\n bottom: 'auto',\n }\n switch (position) {\n case 'right':\n return { ...defaultPositions, top: '0%', left: '105%' }\n case 'left':\n return { ...defaultPositions, top: '0%', right: '105%' }\n case 'bottom':\n return { ...defaultPositions, top: '110%' }\n case 'top':\n return { ...defaultPositions, bottom: '110%' }\n default:\n return defaultPositions\n }\n}\n\nconst navListStyles = vstack({\n alignItems: 'flex-start',\n bgColor: 'page.surface.100',\n boxShadow: 'lg',\n gap: '2',\n opacity: '0',\n p: '4',\n position: 'absolute',\n rounded: 'md',\n zIndex: 'dropdown',\n _motionSafe: {\n animationName: 'zoomIn',\n animationDelay: '100ms',\n animationDuration: '150ms',\n animationFillMode: 'both',\n animationTimingFunction: 'ease-in-out',\n },\n _positionBottom: {\n transformOrigin: 'top left',\n },\n _positionTop: {\n transformOrigin: 'bottom left',\n },\n _positionLeft: {\n transformOrigin: 'top right',\n },\n _positionRight: {\n transformOrigin: 'top left',\n },\n})\n\nexport interface NavMenuListProps extends HTMLAttributes<HTMLUListElement> {\n id: string\n position?: Positions\n}\n\n/**\n * A component that allows the user to display a menu of navigation links.\n * @definition [Disclosure Nav](https://www.w3.org/WAI/ARIA/apg/patterns/disclosure/examples/disclosure-navigation/)\n * @definition [NavMenu Docs](https://cerberus.digitalu.design/react/nav-menu)\n *\n * @example\n * ```tsx\n * <NavMenuList id=\"nav-menu-list\" position=\"bottom\">\n * <NavMenuLink href=\"/home\">Home</NavMenuLink>\n * <NavMenuLink href=\"/about\">About</NavMenuLink>\n * </NavMenuList>\n * ```\n **/\nexport function NavMenuList(props: NavMenuListProps): JSX.Element {\n const { position, ...nativeProps } = props\n const { menuRef, expanded } = useNavMenuContext()\n const locationStyles = useMemo(\n () => getPosition(position ?? 'bottom'),\n [position],\n )\n\n return (\n <Show when={expanded}>\n <ul\n {...nativeProps}\n data-position={position ?? 'bottom'}\n className={cx(nativeProps.className, navListStyles)}\n ref={menuRef}\n style={locationStyles}\n />\n </Show>\n )\n}\n"],"mappings":";;;;;;;;AAEA,SAAS,eAAoC;AAC7C,SAAS,UAAU;AACnB,SAAS,cAAc;AA4FjB;AAhFC,SAAS,YAAY,UAAwC;AAClE,QAAM,mBAAmB;AAAA,IACvB,MAAM;AAAA,IACN,OAAO;AAAA,IACP,KAAK;AAAA,IACL,QAAQ;AAAA,EACV;AACA,UAAQ,UAAU;AAAA,IAChB,KAAK;AACH,aAAO,EAAE,GAAG,kBAAkB,KAAK,MAAM,MAAM,OAAO;AAAA,IACxD,KAAK;AACH,aAAO,EAAE,GAAG,kBAAkB,KAAK,MAAM,OAAO,OAAO;AAAA,IACzD,KAAK;AACH,aAAO,EAAE,GAAG,kBAAkB,KAAK,OAAO;AAAA,IAC5C,KAAK;AACH,aAAO,EAAE,GAAG,kBAAkB,QAAQ,OAAO;AAAA,IAC/C;AACE,aAAO;AAAA,EACX;AACF;AAEA,IAAM,gBAAgB,OAAO;AAAA,EAC3B,YAAY;AAAA,EACZ,SAAS;AAAA,EACT,WAAW;AAAA,EACX,KAAK;AAAA,EACL,SAAS;AAAA,EACT,GAAG;AAAA,EACH,UAAU;AAAA,EACV,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,aAAa;AAAA,IACX,eAAe;AAAA,IACf,gBAAgB;AAAA,IAChB,mBAAmB;AAAA,IACnB,mBAAmB;AAAA,IACnB,yBAAyB;AAAA,EAC3B;AAAA,EACA,iBAAiB;AAAA,IACf,iBAAiB;AAAA,EACnB;AAAA,EACA,cAAc;AAAA,IACZ,iBAAiB;AAAA,EACnB;AAAA,EACA,eAAe;AAAA,IACb,iBAAiB;AAAA,EACnB;AAAA,EACA,gBAAgB;AAAA,IACd,iBAAiB;AAAA,EACnB;AACF,CAAC;AAoBM,SAAS,YAAY,OAAsC;AAChE,QAAM,EAAE,UAAU,GAAG,YAAY,IAAI;AACrC,QAAM,EAAE,SAAS,SAAS,IAAI,kBAAkB;AAChD,QAAM,iBAAiB;AAAA,IACrB,MAAM,YAAY,YAAY,QAAQ;AAAA,IACtC,CAAC,QAAQ;AAAA,EACX;AAEA,SACE,oBAAC,QAAK,MAAM,UACV;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,iBAAe,YAAY;AAAA,MAC3B,WAAW,GAAG,YAAY,WAAW,aAAa;AAAA,MAClD,KAAK;AAAA,MACL,OAAO;AAAA;AAAA,EACT,GACF;AAEJ;","names":[]}
@@ -1,25 +0,0 @@
1
- // src/components/ModalHeader.tsx
2
- import { cx } from "@cerberus/styled-system/css";
3
- import { vstack } from "@cerberus/styled-system/patterns";
4
- import { jsx } from "react/jsx-runtime";
5
- function ModalHeader(props) {
6
- return /* @__PURE__ */ jsx(
7
- "div",
8
- {
9
- ...props,
10
- className: cx(
11
- props.className,
12
- vstack({
13
- alignItems: "flex-start",
14
- gap: "4",
15
- mb: "8"
16
- })
17
- )
18
- }
19
- );
20
- }
21
-
22
- export {
23
- ModalHeader
24
- };
25
- //# sourceMappingURL=chunk-QU7UV5DB.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/components/ModalHeader.tsx"],"sourcesContent":["import { cx } from '@cerberus/styled-system/css'\nimport { vstack } from '@cerberus/styled-system/patterns'\nimport type { HTMLAttributes } from 'react'\n\n/**\n * This module contains the ModalHeader component for a customizable modal.\n * @module\n */\n\nexport type ModalHeaderProps = HTMLAttributes<HTMLDivElement>\n\n/**\n * The ModalHeader component is a header element for a customizable modal.\n * @example\n * ```tsx\n * <Modal>\n * <ModalHeader>\n * <h2>Modal Heading</h2>\n * </ModalHeader>\n * </Modal>\n * ```\n */\nexport function ModalHeader(props: ModalHeaderProps) {\n return (\n <div\n {...props}\n className={cx(\n props.className,\n vstack({\n alignItems: 'flex-start',\n gap: '4',\n mb: '8',\n }),\n )}\n />\n )\n}\n"],"mappings":";AAAA,SAAS,UAAU;AACnB,SAAS,cAAc;AAuBnB;AAFG,SAAS,YAAY,OAAyB;AACnD,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,WAAW;AAAA,QACT,MAAM;AAAA,QACN,OAAO;AAAA,UACL,YAAY;AAAA,UACZ,KAAK;AAAA,UACL,IAAI;AAAA,QACN,CAAC;AAAA,MACH;AAAA;AAAA,EACF;AAEJ;","names":[]}
@@ -1,81 +0,0 @@
1
- import {
2
- useNavMenuContext
3
- } from "./chunk-KJUCHZHV.js";
4
- import {
5
- Show
6
- } from "./chunk-4O4QFF4S.js";
7
- import {
8
- createNavTriggerProps
9
- } from "./chunk-JF76VIL3.js";
10
-
11
- // src/components/NavMenuTrigger.tsx
12
- import {
13
- useCallback
14
- } from "react";
15
- import { cx } from "@cerberus/styled-system/css";
16
- import { button } from "@cerberus/styled-system/recipes";
17
- import { jsx } from "react/jsx-runtime";
18
- function NavMenuTrigger(props) {
19
- const {
20
- as,
21
- palette,
22
- usage,
23
- shape,
24
- controls,
25
- expanded: propsExpanded,
26
- onClick,
27
- ...nativeProps
28
- } = props;
29
- const { triggerRef, onToggle, expanded } = useNavMenuContext();
30
- const ariaProps = createNavTriggerProps({
31
- controls,
32
- expanded: propsExpanded ?? expanded
33
- });
34
- const hasAs = Boolean(as);
35
- const AsSub = as;
36
- const handleClick = useCallback(
37
- (e) => {
38
- if (onClick) return onClick(e);
39
- onToggle();
40
- },
41
- [onClick, onToggle]
42
- );
43
- return /* @__PURE__ */ jsx(
44
- Show,
45
- {
46
- when: hasAs,
47
- fallback: /* @__PURE__ */ jsx(
48
- "button",
49
- {
50
- ...nativeProps,
51
- ...ariaProps,
52
- className: cx(
53
- nativeProps.className,
54
- button({
55
- palette,
56
- usage,
57
- shape
58
- })
59
- ),
60
- onClick: handleClick,
61
- ref: triggerRef,
62
- children: props.children
63
- }
64
- ),
65
- children: hasAs && /* @__PURE__ */ jsx(
66
- AsSub,
67
- {
68
- ...nativeProps,
69
- ...ariaProps,
70
- onClick: handleClick,
71
- ref: triggerRef
72
- }
73
- )
74
- }
75
- );
76
- }
77
-
78
- export {
79
- NavMenuTrigger
80
- };
81
- //# sourceMappingURL=chunk-RPZAPUCF.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/components/NavMenuTrigger.tsx"],"sourcesContent":["'use client'\n\nimport {\n useCallback,\n type ButtonHTMLAttributes,\n type ElementType,\n type MouseEvent,\n} from 'react'\nimport { cx } from '@cerberus/styled-system/css'\nimport { button } from '@cerberus/styled-system/recipes'\nimport {\n createNavTriggerProps,\n type NavTriggerAriaValues,\n} from '../aria-helpers/nav-menu.aria'\nimport { useNavMenuContext } from '../context/navMenu'\nimport type { ButtonProps } from './Button'\nimport { Show } from './Show'\n\nexport interface NavMenuTriggerProps\n extends ButtonHTMLAttributes<HTMLButtonElement>,\n ButtonProps,\n NavTriggerAriaValues {\n as?: ElementType\n}\n\n/**\n * A component that allows the user to trigger a navigation menu.\n * @definition [NavMenu Docs](https://cerberus.digitalu.design/react/nav-menu)\n * @example\n * ```tsx\n * <NavMenu>\n * <NavMenuTrigger controls=\"nav-menu-list\">\n * Menu\n * </NavMenuTrigger>\n * </NavMenu>\n * ```\n */\nexport function NavMenuTrigger(props: NavMenuTriggerProps): JSX.Element {\n const {\n as,\n palette,\n usage,\n shape,\n controls,\n expanded: propsExpanded,\n onClick,\n ...nativeProps\n } = props\n const { triggerRef, onToggle, expanded } = useNavMenuContext()\n const ariaProps = createNavTriggerProps({\n controls,\n expanded: propsExpanded ?? expanded,\n })\n const hasAs = Boolean(as)\n const AsSub: ElementType = as!\n\n const handleClick = useCallback(\n (e: MouseEvent<HTMLButtonElement>) => {\n if (onClick) return onClick(e)\n onToggle()\n },\n [onClick, onToggle],\n )\n\n return (\n <Show\n when={hasAs}\n fallback={\n <button\n {...nativeProps}\n {...ariaProps}\n className={cx(\n nativeProps.className,\n button({\n palette,\n usage,\n shape,\n }),\n )}\n onClick={handleClick}\n ref={triggerRef}\n >\n {props.children}\n </button>\n }\n >\n {hasAs && (\n <AsSub\n {...nativeProps}\n {...ariaProps}\n onClick={handleClick}\n ref={triggerRef}\n />\n )}\n </Show>\n )\n}\n"],"mappings":";;;;;;;;;;;AAEA;AAAA,EACE;AAAA,OAIK;AACP,SAAS,UAAU;AACnB,SAAS,cAAc;AA2Df;AA/BD,SAAS,eAAe,OAAyC;AACtE,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,UAAU;AAAA,IACV;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AACJ,QAAM,EAAE,YAAY,UAAU,SAAS,IAAI,kBAAkB;AAC7D,QAAM,YAAY,sBAAsB;AAAA,IACtC;AAAA,IACA,UAAU,iBAAiB;AAAA,EAC7B,CAAC;AACD,QAAM,QAAQ,QAAQ,EAAE;AACxB,QAAM,QAAqB;AAE3B,QAAM,cAAc;AAAA,IAClB,CAAC,MAAqC;AACpC,UAAI,QAAS,QAAO,QAAQ,CAAC;AAC7B,eAAS;AAAA,IACX;AAAA,IACA,CAAC,SAAS,QAAQ;AAAA,EACpB;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAM;AAAA,MACN,UACE;AAAA,QAAC;AAAA;AAAA,UACE,GAAG;AAAA,UACH,GAAG;AAAA,UACJ,WAAW;AAAA,YACT,YAAY;AAAA,YACZ,OAAO;AAAA,cACL;AAAA,cACA;AAAA,cACA;AAAA,YACF,CAAC;AAAA,UACH;AAAA,UACA,SAAS;AAAA,UACT,KAAK;AAAA,UAEJ,gBAAM;AAAA;AAAA,MACT;AAAA,MAGD,mBACC;AAAA,QAAC;AAAA;AAAA,UACE,GAAG;AAAA,UACH,GAAG;AAAA,UACJ,SAAS;AAAA,UACT,KAAK;AAAA;AAAA,MACP;AAAA;AAAA,EAEJ;AAEJ;","names":[]}
@@ -1,22 +0,0 @@
1
- // src/hooks/useToggle.ts
2
- import { useCallback, useMemo, useState } from "react";
3
- function useToggle(options) {
4
- const [checked, setChecked] = useState((options == null ? void 0 : options.checked) ?? "");
5
- const onChange = options == null ? void 0 : options.onChange;
6
- const handleChange = useCallback(
7
- (e) => {
8
- const target = e.currentTarget;
9
- setChecked((prev) => {
10
- return prev === target.value ? "" : target.value;
11
- });
12
- onChange == null ? void 0 : onChange(e);
13
- },
14
- [onChange]
15
- );
16
- return useMemo(() => ({ checked, handleChange }), [checked, handleChange]);
17
- }
18
-
19
- export {
20
- useToggle
21
- };
22
- //# sourceMappingURL=chunk-SCQVXJBT.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/hooks/useToggle.ts"],"sourcesContent":["'use client'\n\nimport { useCallback, useMemo, useState, type ChangeEvent } from 'react'\n\nexport interface UseToggleOptions {\n checked?: string\n onChange?: (e: ChangeEvent<HTMLInputElement>) => void\n}\nexport interface ToggleHookReturn {\n checked: string\n handleChange: (e: ChangeEvent<HTMLInputElement>) => void\n}\n\nexport function useToggle(options?: UseToggleOptions): ToggleHookReturn {\n const [checked, setChecked] = useState<string>(options?.checked ?? '')\n const onChange = options?.onChange\n\n const handleChange = useCallback(\n (e: ChangeEvent<HTMLInputElement>) => {\n const target = e.currentTarget as HTMLInputElement\n setChecked((prev) => {\n return prev === target.value ? '' : target.value\n })\n onChange?.(e)\n },\n [onChange],\n )\n\n return useMemo(() => ({ checked, handleChange }), [checked, handleChange])\n}\n"],"mappings":";AAEA,SAAS,aAAa,SAAS,gBAAkC;AAW1D,SAAS,UAAU,SAA8C;AACtE,QAAM,CAAC,SAAS,UAAU,IAAI,UAAiB,mCAAS,YAAW,EAAE;AACrE,QAAM,WAAW,mCAAS;AAE1B,QAAM,eAAe;AAAA,IACnB,CAAC,MAAqC;AACpC,YAAM,SAAS,EAAE;AACjB,iBAAW,CAAC,SAAS;AACnB,eAAO,SAAS,OAAO,QAAQ,KAAK,OAAO;AAAA,MAC7C,CAAC;AACD,2CAAW;AAAA,IACb;AAAA,IACA,CAAC,QAAQ;AAAA,EACX;AAEA,SAAO,QAAQ,OAAO,EAAE,SAAS,aAAa,IAAI,CAAC,SAAS,YAAY,CAAC;AAC3E;","names":[]}
@@ -1,29 +0,0 @@
1
- // src/components/IconButton.tsx
2
- import { cx } from "@cerberus/styled-system/css";
3
- import { iconButton } from "@cerberus/styled-system/recipes";
4
- import { jsx } from "react/jsx-runtime";
5
- function IconButton(props) {
6
- const { ariaLabel, palette, usage, size, ...nativeProps } = props;
7
- return /* @__PURE__ */ jsx(
8
- "button",
9
- {
10
- ...nativeProps,
11
- "data-tooltip": true,
12
- "data-position": props.tooltipPosition ?? "top",
13
- "aria-label": ariaLabel ?? "Icon Button",
14
- className: cx(
15
- nativeProps.className,
16
- iconButton({
17
- palette,
18
- usage,
19
- size
20
- })
21
- )
22
- }
23
- );
24
- }
25
-
26
- export {
27
- IconButton
28
- };
29
- //# sourceMappingURL=chunk-SLHX5K6I.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/components/IconButton.tsx"],"sourcesContent":["import type { ButtonHTMLAttributes } from 'react'\nimport { cx, type RecipeVariantProps } from '@cerberus/styled-system/css'\nimport { iconButton } from '@cerberus/styled-system/recipes'\nimport type { Positions } from '../types'\n\n/**\n * This module contains the Icon Button component.\n * @module\n */\n\nexport interface IconButtonRawProps\n extends ButtonHTMLAttributes<HTMLButtonElement> {\n ariaLabel: string\n tooltipPosition?: Positions\n}\nexport type IconButtonRecipeProps = RecipeVariantProps<typeof iconButton>\nexport type IconButtonProps = IconButtonRawProps & IconButtonRecipeProps\n\n/**\n * A component that allows the user to perform actions using an icon\n * @description https://github.com/omnifed/cerberus/blob/main/packages/react/src/components/IconButton.tsx\n */\nexport function IconButton(props: IconButtonProps): JSX.Element {\n const { ariaLabel, palette, usage, size, ...nativeProps } = props\n return (\n <button\n {...nativeProps}\n data-tooltip\n data-position={props.tooltipPosition ?? 'top'}\n aria-label={ariaLabel ?? 'Icon Button'}\n className={cx(\n nativeProps.className,\n iconButton({\n palette,\n usage,\n size,\n }),\n )}\n />\n )\n}\n"],"mappings":";AACA,SAAS,UAAmC;AAC5C,SAAS,kBAAkB;AAuBvB;AAHG,SAAS,WAAW,OAAqC;AAC9D,QAAM,EAAE,WAAW,SAAS,OAAO,MAAM,GAAG,YAAY,IAAI;AAC5D,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,gBAAY;AAAA,MACZ,iBAAe,MAAM,mBAAmB;AAAA,MACxC,cAAY,aAAa;AAAA,MACzB,WAAW;AAAA,QACT,YAAY;AAAA,QACZ,WAAW;AAAA,UACT;AAAA,UACA;AAAA,UACA;AAAA,QACF,CAAC;AAAA,MACH;AAAA;AAAA,EACF;AAEJ;","names":[]}
@@ -1,63 +0,0 @@
1
- import {
2
- Show
3
- } from "./chunk-4O4QFF4S.js";
4
- import {
5
- $cerberusIcons
6
- } from "./chunk-BEYPMC73.js";
7
-
8
- // src/components/FileUploader.tsx
9
- import { cx } from "@cerberus/styled-system/css";
10
- import { circle, vstack } from "@cerberus/styled-system/patterns";
11
- import { fileUploader, modalIcon } from "@cerberus/styled-system/recipes";
12
- import { jsx, jsxs } from "react/jsx-runtime";
13
- function FileUploader(props) {
14
- var _a;
15
- const styles = fileUploader();
16
- const Icon = $cerberusIcons.fileUploader;
17
- return /* @__PURE__ */ jsxs(
18
- "div",
19
- {
20
- className: cx(
21
- vstack({
22
- justify: "center"
23
- }),
24
- styles.container
25
- ),
26
- children: [
27
- /* @__PURE__ */ jsx("span", { className: cx(styles.icon, modalIcon(), circle()), children: /* @__PURE__ */ jsx(Icon, {}) }),
28
- /* @__PURE__ */ jsxs(
29
- "label",
30
- {
31
- className: cx(
32
- vstack({
33
- justify: "center"
34
- }),
35
- styles.label
36
- ),
37
- htmlFor: props.name,
38
- children: [
39
- /* @__PURE__ */ jsx(Show, { when: Boolean(props.heading), children: /* @__PURE__ */ jsx("p", { className: styles.heading, children: props.heading }) }),
40
- "Import ",
41
- (_a = props.accept) == null ? void 0 : _a.replace(",", ", "),
42
- " files",
43
- /* @__PURE__ */ jsx("p", { className: styles.description, children: "Or click to upload" }),
44
- /* @__PURE__ */ jsx(
45
- "input",
46
- {
47
- ...props,
48
- className: cx(props.className, styles.input),
49
- type: "file"
50
- }
51
- )
52
- ]
53
- }
54
- )
55
- ]
56
- }
57
- );
58
- }
59
-
60
- export {
61
- FileUploader
62
- };
63
- //# sourceMappingURL=chunk-SMCEFK6Q.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/components/FileUploader.tsx"],"sourcesContent":["'use client'\n\nimport { cx } from '@cerberus/styled-system/css'\nimport { circle, vstack } from '@cerberus/styled-system/patterns'\nimport { type InputHTMLAttributes } from 'react'\nimport { Show } from './Show'\nimport { fileUploader, modalIcon } from '@cerberus/styled-system/recipes'\nimport { $cerberusIcons } from '../config/defineIcons'\n\nexport interface FileUploaderProps\n extends InputHTMLAttributes<HTMLInputElement> {\n heading?: string\n name: string\n}\n\nexport function FileUploader(props: FileUploaderProps) {\n const styles = fileUploader()\n const Icon = $cerberusIcons.fileUploader\n\n return (\n <div\n className={cx(\n vstack({\n justify: 'center',\n }),\n styles.container,\n )}\n >\n <span className={cx(styles.icon, modalIcon(), circle())}>\n <Icon />\n </span>\n\n <label\n className={cx(\n vstack({\n justify: 'center',\n }),\n styles.label,\n )}\n htmlFor={props.name}\n >\n <Show when={Boolean(props.heading)}>\n <p className={styles.heading}>{props.heading}</p>\n </Show>\n Import {props.accept?.replace(',', ', ')} files\n <p className={styles.description}>Or click to upload</p>\n <input\n {...props}\n className={cx(props.className, styles.input)}\n type=\"file\"\n />\n </label>\n </div>\n )\n}\n"],"mappings":";;;;;;;;AAEA,SAAS,UAAU;AACnB,SAAS,QAAQ,cAAc;AAG/B,SAAS,cAAc,iBAAiB;AAuBhC,cAGF,YAHE;AAdD,SAAS,aAAa,OAA0B;AAfvD;AAgBE,QAAM,SAAS,aAAa;AAC5B,QAAM,OAAO,eAAe;AAE5B,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW;AAAA,QACT,OAAO;AAAA,UACL,SAAS;AAAA,QACX,CAAC;AAAA,QACD,OAAO;AAAA,MACT;AAAA,MAEA;AAAA,4BAAC,UAAK,WAAW,GAAG,OAAO,MAAM,UAAU,GAAG,OAAO,CAAC,GACpD,8BAAC,QAAK,GACR;AAAA,QAEA;AAAA,UAAC;AAAA;AAAA,YACC,WAAW;AAAA,cACT,OAAO;AAAA,gBACL,SAAS;AAAA,cACX,CAAC;AAAA,cACD,OAAO;AAAA,YACT;AAAA,YACA,SAAS,MAAM;AAAA,YAEf;AAAA,kCAAC,QAAK,MAAM,QAAQ,MAAM,OAAO,GAC/B,8BAAC,OAAE,WAAW,OAAO,SAAU,gBAAM,SAAQ,GAC/C;AAAA,cAAO;AAAA,eACC,WAAM,WAAN,mBAAc,QAAQ,KAAK;AAAA,cAAM;AAAA,cACzC,oBAAC,OAAE,WAAW,OAAO,aAAa,gCAAkB;AAAA,cACpD;AAAA,gBAAC;AAAA;AAAA,kBACE,GAAG;AAAA,kBACJ,WAAW,GAAG,MAAM,WAAW,OAAO,KAAK;AAAA,kBAC3C,MAAK;AAAA;AAAA,cACP;AAAA;AAAA;AAAA,QACF;AAAA;AAAA;AAAA,EACF;AAEJ;","names":[]}