@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,157 @@
1
+ "use strict";
2
+ "use client";
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
+
21
+ // src/components/Checkbox.tsx
22
+ var Checkbox_exports = {};
23
+ __export(Checkbox_exports, {
24
+ Checkbox: () => Checkbox
25
+ });
26
+ module.exports = __toCommonJS(Checkbox_exports);
27
+ var import_recipes = require("@cerberus/styled-system/recipes");
28
+ var import_patterns = require("@cerberus/styled-system/patterns");
29
+ var import_css = require("@cerberus/styled-system/css");
30
+
31
+ // src/components/Show.tsx
32
+ var import_react = require("react");
33
+ function Show(props) {
34
+ const { when, children, fallback } = props;
35
+ const condition = (0, import_react.useMemo)(() => when ?? false, [when]);
36
+ return (0, import_react.useMemo)(() => {
37
+ if (condition) return children;
38
+ return fallback ?? null;
39
+ }, [condition, children, fallback]);
40
+ }
41
+
42
+ // src/context/field.tsx
43
+ var import_react2 = require("react");
44
+ var import_jsx_runtime = require("react/jsx-runtime");
45
+ var FieldContext = (0, import_react2.createContext)(null);
46
+ function useFieldContext() {
47
+ const context = (0, import_react2.useContext)(FieldContext);
48
+ if (!context) {
49
+ throw new Error("useFieldContext must be used within a Field Provider.");
50
+ }
51
+ return context;
52
+ }
53
+
54
+ // src/config/cerbIcons.ts
55
+ var import_icons = require("@cerberus/icons");
56
+
57
+ // src/config/icons/checkbox.icons.tsx
58
+ var import_jsx_runtime2 = require("react/jsx-runtime");
59
+ function CheckmarkIcon(props) {
60
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
61
+ "svg",
62
+ {
63
+ "aria-hidden": "true",
64
+ xmlns: "http://www.w3.org/2000/svg",
65
+ fill: "none",
66
+ role: "img",
67
+ viewBox: "0 0 24 24",
68
+ ...props,
69
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
70
+ "path",
71
+ {
72
+ fill: "currentColor",
73
+ d: "M9.714 18 4 12.335l1.818-1.764 3.896 3.824L18.181 6 20 7.803 9.714 18Z"
74
+ }
75
+ )
76
+ }
77
+ );
78
+ }
79
+ function IndeterminateIcon(props) {
80
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
81
+ "svg",
82
+ {
83
+ "aria-hidden": "true",
84
+ xmlns: "http://www.w3.org/2000/svg",
85
+ role: "img",
86
+ fill: "none",
87
+ viewBox: "0 0 24 24",
88
+ ...props,
89
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { fill: "currentColor", d: "M4 11h16v2.667H4z" })
90
+ }
91
+ );
92
+ }
93
+
94
+ // src/config/cerbIcons.ts
95
+ var defaultIcons = {
96
+ checkbox: CheckmarkIcon,
97
+ close: import_icons.CloseFilled,
98
+ confirmModal: import_icons.Information,
99
+ delete: import_icons.TrashCan,
100
+ promptModal: import_icons.Information,
101
+ fileUploader: import_icons.CloudUpload,
102
+ indeterminate: IndeterminateIcon,
103
+ infoNotification: import_icons.InformationFilled,
104
+ successNotification: import_icons.CheckmarkFilled,
105
+ warningNotification: import_icons.WarningFilled,
106
+ dangerNotification: import_icons.ErrorFilled,
107
+ invalid: import_icons.WarningFilled,
108
+ invalidAlt: import_icons.Warning,
109
+ redo: import_icons.Restart,
110
+ selectArrow: import_icons.ChevronDown,
111
+ toggleChecked: import_icons.Checkmark
112
+ };
113
+
114
+ // src/config/defineIcons.ts
115
+ var $cerberusIcons = defaultIcons;
116
+
117
+ // src/components/Checkbox.tsx
118
+ var import_jsx_runtime3 = require("react/jsx-runtime");
119
+ function Checkbox(props) {
120
+ const { describedBy, size, checked, mixed, ...nativeProps } = props;
121
+ const { invalid, ...fieldStates } = useFieldContext();
122
+ const styles = (0, import_recipes.checkbox)({ size });
123
+ const { checkbox: CheckIcon, indeterminate: IndeterminateIcon2 } = $cerberusIcons;
124
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
125
+ "div",
126
+ {
127
+ className: (0, import_css.cx)(
128
+ styles.root,
129
+ (0, import_patterns.vstack)({
130
+ gap: "0",
131
+ justify: "center"
132
+ })
133
+ ),
134
+ children: [
135
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
136
+ "input",
137
+ {
138
+ ...nativeProps,
139
+ ...fieldStates,
140
+ ...describedBy && { "aria-describedby": describedBy },
141
+ ...invalid && { "aria-invalid": true },
142
+ ...mixed && { "aria-checked": "mixed" },
143
+ className: (0, import_css.cx)("peer", nativeProps.className, styles.input),
144
+ type: "checkbox"
145
+ }
146
+ ),
147
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Show, { when: checked && !mixed, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: styles.icon, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(CheckIcon, {}) }) }),
148
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Show, { when: mixed, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: styles.icon, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(IndeterminateIcon2, {}) }) })
149
+ ]
150
+ }
151
+ );
152
+ }
153
+ // Annotate the CommonJS export names for ESM import in node:
154
+ 0 && (module.exports = {
155
+ Checkbox
156
+ });
157
+ //# sourceMappingURL=Checkbox.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/Checkbox.tsx","../../../src/components/Show.tsx","../../../src/context/field.tsx","../../../src/config/cerbIcons.ts","../../../src/config/icons/checkbox.icons.tsx","../../../src/config/defineIcons.ts"],"sourcesContent":["'use client'\n\nimport {\n checkbox,\n type CheckboxVariantProps,\n} from '@cerberus/styled-system/recipes'\nimport { vstack } from '@cerberus/styled-system/patterns'\nimport { cx } from '@cerberus/styled-system/css'\nimport type { InputHTMLAttributes } from 'react'\nimport { Show } from './Show'\nimport { useFieldContext } from '../context/field'\nimport { $cerberusIcons } from '../config/defineIcons'\n\n/**\n * This module contains the Checkbox component.\n * @module\n */\n\nexport type CheckboxProps = CheckboxVariantProps &\n Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'id'> & {\n describedBy?: string\n id: string\n mixed?: boolean\n }\n\n/**\n * Checkbox component\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 [ARIA Forms](https://www.a11yproject.com/checklist/#forms)\n * @definition [Checkbox docs](https://cerberus.digitalu.design/react/checkbox)\n * @example\n * ```tsx\n * <Field>\n * <Checkbox id=\"legal\" checked={checked.legal} onChange={handleChange} />\n * </Field>\n * ```\n */\nexport function Checkbox(props: CheckboxProps) {\n const { describedBy, size, checked, mixed, ...nativeProps } = props\n const { invalid, ...fieldStates } = useFieldContext()\n const styles = checkbox({ size })\n const { checkbox: CheckIcon, indeterminate: IndeterminateIcon } =\n $cerberusIcons\n\n return (\n <div\n className={cx(\n styles.root,\n vstack({\n gap: '0',\n justify: 'center',\n }),\n )}\n >\n <input\n {...nativeProps}\n {...fieldStates}\n {...(describedBy && { 'aria-describedby': describedBy })}\n {...(invalid && { 'aria-invalid': true })}\n {...(mixed && { 'aria-checked': 'mixed' })}\n className={cx('peer', nativeProps.className, styles.input)}\n type=\"checkbox\"\n />\n <Show when={checked && !mixed}>\n <span className={styles.icon}>\n <CheckIcon />\n </span>\n </Show>\n <Show when={mixed}>\n <span className={styles.icon}>\n <IndeterminateIcon />\n </span>\n </Show>\n </div>\n )\n}\n","'use client'\n\nimport { useMemo, type PropsWithChildren, type ReactNode } from 'react'\n\nexport interface ShowProps {\n when: boolean | null | undefined\n fallback?: ReactNode\n}\n\n/**\n * Conditionally render its children or an optional fallback component\n * based on the SolidJS component.\n * @definition [Show docs](https://cerberus.digitalu.design/react/show)\n * @example\n * ```tsx\n * <Show when={condition}>\n * <div>Content</div>\n * </Show>\n */\nexport function Show(props: PropsWithChildren<ShowProps>): ReactNode {\n const { when, children, fallback } = props\n const condition = useMemo(() => when ?? false, [when])\n\n return useMemo(() => {\n if (condition) return children\n return fallback ?? null\n }, [condition, children, fallback])\n}\n","'use client'\n\nimport {\n createContext,\n useContext,\n useMemo,\n type PropsWithChildren,\n} from 'react'\n\nexport interface FieldContextValue {\n disabled?: boolean\n readOnly?: boolean\n required?: boolean\n invalid?: boolean\n}\n\nconst FieldContext = createContext<FieldContextValue | null>(null)\n\nexport function Field(\n props: PropsWithChildren<FieldContextValue>,\n): JSX.Element {\n const value = useMemo(\n () => ({\n disabled: props.disabled,\n readOnly: props.readOnly,\n required: props.required,\n invalid: props.invalid,\n }),\n [props.disabled, props.readOnly, props.required, props.invalid],\n )\n\n return (\n <FieldContext.Provider value={value}>\n {props.children}\n </FieldContext.Provider>\n )\n}\n\nexport function useFieldContext(): FieldContextValue {\n const context = useContext(FieldContext)\n if (!context) {\n throw new Error('useFieldContext must be used within a Field Provider.')\n }\n return context\n}\n","import {\n Checkmark,\n CheckmarkFilled,\n ChevronDown,\n CloseFilled,\n CloudUpload,\n ErrorFilled,\n Information,\n InformationFilled,\n Restart,\n TrashCan,\n Warning,\n WarningFilled,\n type CarbonIconType,\n} from '@cerberus/icons'\nimport type { ElementType } from 'react'\nimport { CheckmarkIcon, IndeterminateIcon } from './icons/checkbox.icons'\n\nexport type IconType = CarbonIconType | ElementType\n\nexport interface DefinedIcons {\n checkbox?: IconType\n close?: IconType\n confirmModal?: IconType\n delete?: IconType\n promptModal?: IconType\n fileUploader?: IconType\n indeterminate?: IconType\n infoNotification?: IconType\n successNotification?: IconType\n warningNotification?: IconType\n dangerNotification?: IconType\n invalid: IconType\n invalidAlt?: IconType\n redo?: IconType\n selectArrow?: IconType\n toggleChecked?: IconType\n}\n\nexport const defaultIcons: DefinedIcons = {\n checkbox: CheckmarkIcon,\n close: CloseFilled,\n confirmModal: Information,\n delete: TrashCan,\n promptModal: Information,\n fileUploader: CloudUpload,\n indeterminate: IndeterminateIcon,\n infoNotification: InformationFilled,\n successNotification: CheckmarkFilled,\n warningNotification: WarningFilled,\n dangerNotification: ErrorFilled,\n invalid: WarningFilled,\n invalidAlt: Warning,\n redo: Restart,\n selectArrow: ChevronDown,\n toggleChecked: Checkmark,\n}\n","import type { SVGProps } from 'react'\n\n/**\n * This module contains substitute icons for the Checkbox component.\n * @module\n */\n\ninterface CheckboxIconProps extends SVGProps<SVGSVGElement> {}\n\n/**\n * Checkmark icon for Checkbox component\n */\nexport function CheckmarkIcon(props: CheckboxIconProps) {\n return (\n <svg\n aria-hidden=\"true\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n role=\"img\"\n viewBox=\"0 0 24 24\"\n {...props}\n >\n <path\n fill=\"currentColor\"\n d=\"M9.714 18 4 12.335l1.818-1.764 3.896 3.824L18.181 6 20 7.803 9.714 18Z\"\n />\n </svg>\n )\n}\n\ninterface IndeterminateIconProps extends SVGProps<SVGSVGElement> {}\n\n/**\n * Indeterminate icon for Checkbox component\n */\nexport function IndeterminateIcon(props: IndeterminateIconProps) {\n return (\n <svg\n aria-hidden=\"true\"\n xmlns=\"http://www.w3.org/2000/svg\"\n role=\"img\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n {...props}\n >\n <path fill=\"currentColor\" d=\"M4 11h16v2.667H4z\" />\n </svg>\n )\n}\n","import { defaultIcons, type DefinedIcons } from './cerbIcons'\n\nfunction _validateIconsProperties(icons: DefinedIcons) {\n if (!icons.invalid) {\n throw new Error(\n 'The an invalid property must be defined in your custom icons library.',\n )\n }\n}\n\nexport function defineIcons(icons: DefinedIcons): Required<DefinedIcons> {\n _validateIconsProperties(icons)\n $cerberusIcons = {\n ...defaultIcons,\n ...icons,\n } as Required<DefinedIcons>\n return $cerberusIcons\n}\n\n// Default icons\n\nexport let $cerberusIcons = defaultIcons as Required<DefinedIcons>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,qBAGO;AACP,sBAAuB;AACvB,iBAAmB;;;ACLnB,mBAAgE;AAiBzD,SAAS,KAAK,OAAgD;AACnE,QAAM,EAAE,MAAM,UAAU,SAAS,IAAI;AACrC,QAAM,gBAAY,sBAAQ,MAAM,QAAQ,OAAO,CAAC,IAAI,CAAC;AAErD,aAAO,sBAAQ,MAAM;AACnB,QAAI,UAAW,QAAO;AACtB,WAAO,YAAY;AAAA,EACrB,GAAG,CAAC,WAAW,UAAU,QAAQ,CAAC;AACpC;;;ACzBA,IAAAA,gBAKO;AAyBH;AAhBJ,IAAM,mBAAe,6BAAwC,IAAI;AAsB1D,SAAS,kBAAqC;AACnD,QAAM,cAAU,0BAAW,YAAY;AACvC,MAAI,CAAC,SAAS;AACZ,UAAM,IAAI,MAAM,uDAAuD;AAAA,EACzE;AACA,SAAO;AACT;;;AC5CA,mBAcO;;;ACQD,IAAAC,sBAAA;AAVC,SAAS,cAAc,OAA0B;AACtD,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAY;AAAA,MACZ,OAAM;AAAA,MACN,MAAK;AAAA,MACL,MAAK;AAAA,MACL,SAAQ;AAAA,MACP,GAAG;AAAA,MAEJ;AAAA,QAAC;AAAA;AAAA,UACC,MAAK;AAAA,UACL,GAAE;AAAA;AAAA,MACJ;AAAA;AAAA,EACF;AAEJ;AAOO,SAAS,kBAAkB,OAA+B;AAC/D,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAY;AAAA,MACZ,OAAM;AAAA,MACN,MAAK;AAAA,MACL,MAAK;AAAA,MACL,SAAQ;AAAA,MACP,GAAG;AAAA,MAEJ,uDAAC,UAAK,MAAK,gBAAe,GAAE,qBAAoB;AAAA;AAAA,EAClD;AAEJ;;;ADTO,IAAM,eAA6B;AAAA,EACxC,UAAU;AAAA,EACV,OAAO;AAAA,EACP,cAAc;AAAA,EACd,QAAQ;AAAA,EACR,aAAa;AAAA,EACb,cAAc;AAAA,EACd,eAAe;AAAA,EACf,kBAAkB;AAAA,EAClB,qBAAqB;AAAA,EACrB,qBAAqB;AAAA,EACrB,oBAAoB;AAAA,EACpB,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,MAAM;AAAA,EACN,aAAa;AAAA,EACb,eAAe;AACjB;;;AEnCO,IAAI,iBAAiB;;;ALwBxB,IAAAC,sBAAA;AARG,SAAS,SAAS,OAAsB;AAC7C,QAAM,EAAE,aAAa,MAAM,SAAS,OAAO,GAAG,YAAY,IAAI;AAC9D,QAAM,EAAE,SAAS,GAAG,YAAY,IAAI,gBAAgB;AACpD,QAAM,aAAS,yBAAS,EAAE,KAAK,CAAC;AAChC,QAAM,EAAE,UAAU,WAAW,eAAeC,mBAAkB,IAC5D;AAEF,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAW;AAAA,QACT,OAAO;AAAA,YACP,wBAAO;AAAA,UACL,KAAK;AAAA,UACL,SAAS;AAAA,QACX,CAAC;AAAA,MACH;AAAA,MAEA;AAAA;AAAA,UAAC;AAAA;AAAA,YACE,GAAG;AAAA,YACH,GAAG;AAAA,YACH,GAAI,eAAe,EAAE,oBAAoB,YAAY;AAAA,YACrD,GAAI,WAAW,EAAE,gBAAgB,KAAK;AAAA,YACtC,GAAI,SAAS,EAAE,gBAAgB,QAAQ;AAAA,YACxC,eAAW,eAAG,QAAQ,YAAY,WAAW,OAAO,KAAK;AAAA,YACzD,MAAK;AAAA;AAAA,QACP;AAAA,QACA,6CAAC,QAAK,MAAM,WAAW,CAAC,OACtB,uDAAC,UAAK,WAAW,OAAO,MACtB,uDAAC,aAAU,GACb,GACF;AAAA,QACA,6CAAC,QAAK,MAAM,OACV,uDAAC,UAAK,WAAW,OAAO,MACtB,uDAACA,oBAAA,EAAkB,GACrB,GACF;AAAA;AAAA;AAAA,EACF;AAEJ;","names":["import_react","import_jsx_runtime","import_jsx_runtime","IndeterminateIcon"]}
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ "use client";
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
+
21
+ // src/components/Droppable.tsx
22
+ var Droppable_exports = {};
23
+ __export(Droppable_exports, {
24
+ Droppable: () => Droppable
25
+ });
26
+ module.exports = __toCommonJS(Droppable_exports);
27
+ var import_core = require("@dnd-kit/core");
28
+ var import_react = require("react");
29
+ var import_jsx_runtime = require("react/jsx-runtime");
30
+ function Droppable(props) {
31
+ const { dropped, id, disabled, data, resizeObserverConfig, ...nativeProps } = props;
32
+ const uuid = (0, import_react.useId)();
33
+ const { isOver, setNodeRef } = (0, import_core.useDroppable)({
34
+ data,
35
+ disabled,
36
+ id: id || uuid,
37
+ resizeObserverConfig
38
+ });
39
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
40
+ "div",
41
+ {
42
+ ...nativeProps,
43
+ "data-over": isOver,
44
+ "data-dropped": dropped,
45
+ ref: setNodeRef,
46
+ children: props.children
47
+ }
48
+ );
49
+ }
50
+ // Annotate the CommonJS export names for ESM import in node:
51
+ 0 && (module.exports = {
52
+ Droppable
53
+ });
54
+ //# sourceMappingURL=Droppable.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/Droppable.tsx"],"sourcesContent":["'use client'\n\nimport { useDroppable, type UseDroppableArguments } from '@dnd-kit/core'\nimport { useId, type HtmlHTMLAttributes, type PropsWithChildren } from 'react'\n\nexport interface DroppableProps\n extends Omit<HtmlHTMLAttributes<HTMLDivElement>, 'id'>,\n UseDroppableArguments {\n dropped?: boolean\n}\n\nexport function Droppable(props: PropsWithChildren<DroppableProps>) {\n const { dropped, id, disabled, data, resizeObserverConfig, ...nativeProps } =\n props\n const uuid = useId()\n const { isOver, setNodeRef } = useDroppable({\n data,\n disabled,\n id: id || uuid,\n resizeObserverConfig,\n })\n\n return (\n <div\n {...nativeProps}\n data-over={isOver}\n data-dropped={dropped}\n ref={setNodeRef}\n >\n {props.children}\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,kBAAyD;AACzD,mBAAuE;AAoBnE;AAZG,SAAS,UAAU,OAA0C;AAClE,QAAM,EAAE,SAAS,IAAI,UAAU,MAAM,sBAAsB,GAAG,YAAY,IACxE;AACF,QAAM,WAAO,oBAAM;AACnB,QAAM,EAAE,QAAQ,WAAW,QAAI,0BAAa;AAAA,IAC1C;AAAA,IACA;AAAA,IACA,IAAI,MAAM;AAAA,IACV;AAAA,EACF,CAAC;AAED,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,aAAW;AAAA,MACX,gBAAc;AAAA,MACd,KAAK;AAAA,MAEJ,gBAAM;AAAA;AAAA,EACT;AAEJ;","names":[]}
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ "use client";
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
+
21
+ // src/components/FeatureFlag.tsx
22
+ var FeatureFlag_exports = {};
23
+ __export(FeatureFlag_exports, {
24
+ FeatureFlag: () => FeatureFlag
25
+ });
26
+ module.exports = __toCommonJS(FeatureFlag_exports);
27
+
28
+ // src/context/feature-flags.tsx
29
+ var import_react = require("react");
30
+ var import_jsx_runtime = require("react/jsx-runtime");
31
+ var FeatureFlagContext = (0, import_react.createContext)(null);
32
+ function useFeatureFlags(key) {
33
+ const context = (0, import_react.useContext)(FeatureFlagContext);
34
+ if (context === null) {
35
+ throw new Error(
36
+ "useFeatureFlag must be used within a FeatureFlags Provider"
37
+ );
38
+ }
39
+ return context[key] ?? false;
40
+ }
41
+
42
+ // src/components/Show.tsx
43
+ var import_react2 = require("react");
44
+ function Show(props) {
45
+ const { when, children, fallback } = props;
46
+ const condition = (0, import_react2.useMemo)(() => when ?? false, [when]);
47
+ return (0, import_react2.useMemo)(() => {
48
+ if (condition) return children;
49
+ return fallback ?? null;
50
+ }, [condition, children, fallback]);
51
+ }
52
+
53
+ // src/components/FeatureFlag.tsx
54
+ var import_jsx_runtime2 = require("react/jsx-runtime");
55
+ function FeatureFlag(props) {
56
+ const showContent = useFeatureFlags(props.flag);
57
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Show, { when: showContent, children: props.children });
58
+ }
59
+ // Annotate the CommonJS export names for ESM import in node:
60
+ 0 && (module.exports = {
61
+ FeatureFlag
62
+ });
63
+ //# sourceMappingURL=FeatureFlag.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/FeatureFlag.tsx","../../../src/context/feature-flags.tsx","../../../src/components/Show.tsx"],"sourcesContent":["'use client'\n\nimport type { PropsWithChildren } from 'react'\nimport { useFeatureFlags } from '../context/feature-flags'\nimport { Show } from './Show'\n\nexport interface FeatureFlagProps {\n flag: string\n}\n\nexport function FeatureFlag(props: PropsWithChildren<FeatureFlagProps>) {\n const showContent = useFeatureFlags(props.flag)\n return <Show when={showContent}>{props.children}</Show>\n}\n","'use client'\n\nimport { createContext, useContext, type PropsWithChildren } from 'react'\n\n/**\n * This module provides a context and hook for feature flags.\n * @module\n */\n\nexport interface FeatureFlagValue {\n [key: string]: boolean\n}\n\nconst FeatureFlagContext = createContext<FeatureFlagValue | null>(null)\n\nexport interface FeatureFlagProviderProps {\n flags: FeatureFlagValue\n}\n\n/**\n * Provides feature flags to the application.\n * @param flags - The flags data for the provider.\n * @example\n * ```tsx\n * // This should be a JSON file or a server response.\n * const flags = {\n * featureOne: true,\n * featureTwo: false\n * }\n *\n * // Wrap the Provider around the root of your application.\n * <FeatureFlags flags={flags}>\n * <FeatureFlag flag=\"featureOne\">\n * This is visible.\n * </FeatureFlag>\n * <FeatureFlag flag=\"featureTwo\">\n * This is hidden.\n * </FeatureFlag>\n * </FeatureFlags>\n * ```\n */\nexport function FeatureFlags(\n props: PropsWithChildren<FeatureFlagProviderProps>,\n) {\n return (\n <FeatureFlagContext.Provider value={props.flags}>\n {props.children}\n </FeatureFlagContext.Provider>\n )\n}\n\nexport function useFeatureFlags(key: string): boolean {\n const context = useContext(FeatureFlagContext)\n if (context === null) {\n throw new Error(\n 'useFeatureFlag must be used within a FeatureFlags Provider',\n )\n }\n return context[key] ?? false\n}\n","'use client'\n\nimport { useMemo, type PropsWithChildren, type ReactNode } from 'react'\n\nexport interface ShowProps {\n when: boolean | null | undefined\n fallback?: ReactNode\n}\n\n/**\n * Conditionally render its children or an optional fallback component\n * based on the SolidJS component.\n * @definition [Show docs](https://cerberus.digitalu.design/react/show)\n * @example\n * ```tsx\n * <Show when={condition}>\n * <div>Content</div>\n * </Show>\n */\nexport function Show(props: PropsWithChildren<ShowProps>): ReactNode {\n const { when, children, fallback } = props\n const condition = useMemo(() => when ?? false, [when])\n\n return useMemo(() => {\n if (condition) return children\n return fallback ?? null\n }, [condition, children, fallback])\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACEA,mBAAkE;AA2C9D;AAhCJ,IAAM,yBAAqB,4BAAuC,IAAI;AAsC/D,SAAS,gBAAgB,KAAsB;AACpD,QAAM,cAAU,yBAAW,kBAAkB;AAC7C,MAAI,YAAY,MAAM;AACpB,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AAAA,EACF;AACA,SAAO,QAAQ,GAAG,KAAK;AACzB;;;ACzDA,IAAAA,gBAAgE;AAiBzD,SAAS,KAAK,OAAgD;AACnE,QAAM,EAAE,MAAM,UAAU,SAAS,IAAI;AACrC,QAAM,gBAAY,uBAAQ,MAAM,QAAQ,OAAO,CAAC,IAAI,CAAC;AAErD,aAAO,uBAAQ,MAAM;AACnB,QAAI,UAAW,QAAO;AACtB,WAAO,YAAY;AAAA,EACrB,GAAG,CAAC,WAAW,UAAU,QAAQ,CAAC;AACpC;;;AFfS,IAAAC,sBAAA;AAFF,SAAS,YAAY,OAA4C;AACtE,QAAM,cAAc,gBAAgB,MAAM,IAAI;AAC9C,SAAO,6CAAC,QAAK,MAAM,aAAc,gBAAM,UAAS;AAClD;","names":["import_react","import_jsx_runtime"]}
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ "use client";
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
+
21
+ // src/components/FieldMessage.tsx
22
+ var FieldMessage_exports = {};
23
+ __export(FieldMessage_exports, {
24
+ FieldMessage: () => FieldMessage
25
+ });
26
+ module.exports = __toCommonJS(FieldMessage_exports);
27
+ var import_css = require("@cerberus/styled-system/css");
28
+ var import_recipes = require("@cerberus/styled-system/recipes");
29
+
30
+ // src/context/field.tsx
31
+ var import_react = require("react");
32
+ var import_jsx_runtime = require("react/jsx-runtime");
33
+ var FieldContext = (0, import_react.createContext)(null);
34
+ function useFieldContext() {
35
+ const context = (0, import_react.useContext)(FieldContext);
36
+ if (!context) {
37
+ throw new Error("useFieldContext must be used within a Field Provider.");
38
+ }
39
+ return context;
40
+ }
41
+
42
+ // src/components/FieldMessage.tsx
43
+ var import_jsx_runtime2 = require("react/jsx-runtime");
44
+ function FieldMessage(props) {
45
+ const { invalid } = useFieldContext();
46
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
47
+ "small",
48
+ {
49
+ ...props,
50
+ ...invalid && { "aria-invalid": true },
51
+ className: (0, import_css.cx)(props.className, (0, import_recipes.fieldMessage)())
52
+ }
53
+ );
54
+ }
55
+ // Annotate the CommonJS export names for ESM import in node:
56
+ 0 && (module.exports = {
57
+ FieldMessage
58
+ });
59
+ //# sourceMappingURL=FieldMessage.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/FieldMessage.tsx","../../../src/context/field.tsx"],"sourcesContent":["'use client'\n\nimport type { HTMLAttributes } from 'react'\nimport { cx, type RecipeVariantProps } from '@cerberus/styled-system/css'\nimport { fieldMessage } from '@cerberus/styled-system/recipes'\nimport { useFieldContext } from '../context/field'\n\n/**\n * This module contains the FieldMessage component.\n * @module\n */\n\nexport type FieldMessageRecipe = RecipeVariantProps<typeof fieldMessage>\nexport interface FieldMessageBaseProps\n extends HTMLAttributes<HTMLParagraphElement> {\n id: string\n}\nexport type FieldMessageProps = FieldMessageBaseProps & FieldMessageRecipe\n\n/**\n * A component that provides feedback about the field.\n * @description [FieldMessage Docs](https://cerberus.digitalu.design/react/field-message)\n * @example\n * ```tsx\n * <Field>\n * <Label htmlFor=\"first_name\">First Name</Label>\n * <Input aria-describedBy=\"help:first_name\" id=\"first_name\" type=\"text\" />\n * <FieldMessage id=\"help:first_name\">\n * This will only be used in your account information.\n * </FieldMessage>\n * </Field>\n * ```\n */\nexport function FieldMessage(props: FieldMessageProps) {\n const { invalid } = useFieldContext()\n return (\n <small\n {...props}\n {...(invalid && { 'aria-invalid': true })}\n className={cx(props.className, fieldMessage())}\n />\n )\n}\n","'use client'\n\nimport {\n createContext,\n useContext,\n useMemo,\n type PropsWithChildren,\n} from 'react'\n\nexport interface FieldContextValue {\n disabled?: boolean\n readOnly?: boolean\n required?: boolean\n invalid?: boolean\n}\n\nconst FieldContext = createContext<FieldContextValue | null>(null)\n\nexport function Field(\n props: PropsWithChildren<FieldContextValue>,\n): JSX.Element {\n const value = useMemo(\n () => ({\n disabled: props.disabled,\n readOnly: props.readOnly,\n required: props.required,\n invalid: props.invalid,\n }),\n [props.disabled, props.readOnly, props.required, props.invalid],\n )\n\n return (\n <FieldContext.Provider value={value}>\n {props.children}\n </FieldContext.Provider>\n )\n}\n\nexport function useFieldContext(): FieldContextValue {\n const context = useContext(FieldContext)\n if (!context) {\n throw new Error('useFieldContext must be used within a Field Provider.')\n }\n return context\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,iBAA4C;AAC5C,qBAA6B;;;ACF7B,mBAKO;AAyBH;AAhBJ,IAAM,mBAAe,4BAAwC,IAAI;AAsB1D,SAAS,kBAAqC;AACnD,QAAM,cAAU,yBAAW,YAAY;AACvC,MAAI,CAAC,SAAS;AACZ,UAAM,IAAI,MAAM,uDAAuD;AAAA,EACzE;AACA,SAAO;AACT;;;ADRI,IAAAA,sBAAA;AAHG,SAAS,aAAa,OAA0B;AACrD,QAAM,EAAE,QAAQ,IAAI,gBAAgB;AACpC,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACH,GAAI,WAAW,EAAE,gBAAgB,KAAK;AAAA,MACvC,eAAW,eAAG,MAAM,eAAW,6BAAa,CAAC;AAAA;AAAA,EAC/C;AAEJ;","names":["import_jsx_runtime"]}