@cerberus-design/react 0.8.0-next-4b2aad4 → 0.8.1-next-956775c

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 (335) hide show
  1. package/build/legacy/aria-helpers/nav-menu.aria.cjs +36 -0
  2. package/build/legacy/aria-helpers/nav-menu.aria.cjs.map +1 -0
  3. package/build/legacy/aria-helpers/tabs.aria.cjs +100 -0
  4. package/build/legacy/aria-helpers/tabs.aria.cjs.map +1 -0
  5. package/build/legacy/aria-helpers/trap-focus.aria.cjs +54 -0
  6. package/build/legacy/aria-helpers/trap-focus.aria.cjs.map +1 -0
  7. package/build/legacy/components/Button.cjs +50 -0
  8. package/build/legacy/components/Button.cjs.map +1 -0
  9. package/build/legacy/components/Checkbox.cjs +157 -0
  10. package/build/legacy/components/Checkbox.cjs.map +1 -0
  11. package/build/legacy/components/Droppable.cjs +54 -0
  12. package/build/legacy/components/Droppable.cjs.map +1 -0
  13. package/build/legacy/components/FeatureFlag.cjs +63 -0
  14. package/build/legacy/components/FeatureFlag.cjs.map +1 -0
  15. package/build/legacy/components/FieldMessage.cjs +59 -0
  16. package/build/legacy/components/FieldMessage.cjs.map +1 -0
  17. package/build/legacy/components/FileStatus.cjs +390 -0
  18. package/build/legacy/components/FileStatus.cjs.map +1 -0
  19. package/build/legacy/components/FileUploader.cjs +159 -0
  20. package/build/legacy/components/FileUploader.cjs.map +1 -0
  21. package/build/legacy/components/IconButton.cjs +53 -0
  22. package/build/legacy/components/IconButton.cjs.map +1 -0
  23. package/build/legacy/components/Input.cjs +145 -0
  24. package/build/legacy/components/Input.cjs.map +1 -0
  25. package/build/legacy/components/Label.cjs +93 -0
  26. package/build/legacy/components/Label.cjs.map +1 -0
  27. package/build/legacy/components/Modal.cjs +45 -0
  28. package/build/legacy/components/Modal.cjs.map +1 -0
  29. package/build/legacy/components/ModalDescription.cjs +36 -0
  30. package/build/legacy/components/ModalDescription.cjs.map +1 -0
  31. package/build/legacy/components/ModalHeader.cjs +49 -0
  32. package/build/legacy/components/ModalHeader.cjs.map +1 -0
  33. package/build/legacy/components/ModalHeading.cjs +36 -0
  34. package/build/legacy/components/ModalHeading.cjs.map +1 -0
  35. package/build/legacy/components/ModalIcon.cjs +51 -0
  36. package/build/legacy/components/ModalIcon.cjs.map +1 -0
  37. package/build/legacy/components/NavMenuLink.cjs +81 -0
  38. package/build/legacy/components/NavMenuLink.cjs.map +1 -0
  39. package/build/legacy/components/NavMenuList.cjs +131 -0
  40. package/build/legacy/components/NavMenuList.cjs.map +1 -0
  41. package/build/legacy/components/NavMenuTrigger.cjs +128 -0
  42. package/build/legacy/components/NavMenuTrigger.cjs.map +1 -0
  43. package/build/legacy/components/Notification.cjs +181 -0
  44. package/build/legacy/components/Notification.cjs.map +1 -0
  45. package/build/legacy/components/NotificationDescription.cjs +44 -0
  46. package/build/legacy/components/NotificationDescription.cjs.map +1 -0
  47. package/build/legacy/components/NotificationHeading.cjs +38 -0
  48. package/build/legacy/components/NotificationHeading.cjs.map +1 -0
  49. package/build/legacy/components/Portal.cjs +35 -0
  50. package/build/legacy/components/Portal.cjs.map +1 -0
  51. package/build/legacy/components/ProgressBar.cjs +61 -0
  52. package/build/legacy/components/ProgressBar.cjs.map +1 -0
  53. package/build/legacy/components/Radio.cjs +68 -0
  54. package/build/legacy/components/Radio.cjs.map +1 -0
  55. package/build/legacy/components/Select.cjs +170 -0
  56. package/build/legacy/components/Select.cjs.map +1 -0
  57. package/build/legacy/components/Show.cjs +40 -0
  58. package/build/legacy/components/Show.cjs.map +1 -0
  59. package/build/legacy/components/Tab.cjs +135 -0
  60. package/build/legacy/components/Tab.cjs.map +1 -0
  61. package/build/legacy/components/TabList.cjs +68 -0
  62. package/build/legacy/components/TabList.cjs.map +1 -0
  63. package/build/legacy/components/TabPanel.cjs +76 -0
  64. package/build/legacy/components/TabPanel.cjs.map +1 -0
  65. package/build/legacy/components/Table.cjs +53 -0
  66. package/build/legacy/components/Table.cjs.map +1 -0
  67. package/build/legacy/components/Tag.cjs +91 -0
  68. package/build/legacy/components/Tag.cjs.map +1 -0
  69. package/build/legacy/components/Tbody.cjs +48 -0
  70. package/build/legacy/components/Tbody.cjs.map +1 -0
  71. package/build/legacy/components/Td.cjs +48 -0
  72. package/build/legacy/components/Td.cjs.map +1 -0
  73. package/build/legacy/components/Textarea.cjs +71 -0
  74. package/build/legacy/components/Textarea.cjs.map +1 -0
  75. package/build/legacy/components/Th.cjs +80 -0
  76. package/build/legacy/components/Th.cjs.map +1 -0
  77. package/build/legacy/components/Thead.cjs +36 -0
  78. package/build/legacy/components/Thead.cjs.map +1 -0
  79. package/build/legacy/components/Toggle.cjs +151 -0
  80. package/build/legacy/components/Toggle.cjs.map +1 -0
  81. package/build/legacy/config/cerbIcons.cjs +88 -0
  82. package/build/legacy/config/cerbIcons.cjs.map +1 -0
  83. package/build/legacy/config/defineIcons.cjs +110 -0
  84. package/build/legacy/config/defineIcons.cjs.map +1 -0
  85. package/build/legacy/config/icons/checkbox.icons.cjs +67 -0
  86. package/build/legacy/config/icons/checkbox.icons.cjs.map +1 -0
  87. package/build/legacy/context/confirm-modal.cjs +371 -0
  88. package/build/legacy/context/confirm-modal.cjs.map +1 -0
  89. package/build/legacy/context/feature-flags.cjs +48 -0
  90. package/build/legacy/context/feature-flags.cjs.map +1 -0
  91. package/build/legacy/context/field.cjs +55 -0
  92. package/build/legacy/context/field.cjs.map +1 -0
  93. package/build/legacy/context/navMenu.cjs +70 -0
  94. package/build/legacy/context/navMenu.cjs.map +1 -0
  95. package/build/legacy/context/notification-center.cjs +347 -0
  96. package/build/legacy/context/notification-center.cjs.map +1 -0
  97. package/build/legacy/context/prompt-modal.cjs +508 -0
  98. package/build/legacy/context/prompt-modal.cjs.map +1 -0
  99. package/build/legacy/context/tabs.cjs +78 -0
  100. package/build/legacy/context/tabs.cjs.map +1 -0
  101. package/build/legacy/context/theme.cjs +104 -0
  102. package/build/legacy/context/theme.cjs.map +1 -0
  103. package/build/legacy/hooks/useModal.cjs +50 -0
  104. package/build/legacy/hooks/useModal.cjs.map +1 -0
  105. package/build/legacy/hooks/useTheme.cjs +87 -0
  106. package/build/legacy/hooks/useTheme.cjs.map +1 -0
  107. package/build/legacy/hooks/useToggle.cjs +47 -0
  108. package/build/legacy/hooks/useToggle.cjs.map +1 -0
  109. package/build/legacy/index.cjs +2165 -0
  110. package/build/legacy/index.cjs.map +1 -0
  111. package/build/legacy/types.cjs +19 -0
  112. package/build/legacy/types.cjs.map +1 -0
  113. package/package.json +7 -7
  114. package/build/legacy/aria-helpers/nav-menu.aria.js +0 -7
  115. package/build/legacy/aria-helpers/nav-menu.aria.js.map +0 -1
  116. package/build/legacy/aria-helpers/tabs.aria.js +0 -9
  117. package/build/legacy/aria-helpers/tabs.aria.js.map +0 -1
  118. package/build/legacy/aria-helpers/trap-focus.aria.js +0 -7
  119. package/build/legacy/aria-helpers/trap-focus.aria.js.map +0 -1
  120. package/build/legacy/chunk-23UPROCG.js +0 -63
  121. package/build/legacy/chunk-23UPROCG.js.map +0 -1
  122. package/build/legacy/chunk-2FK7NR7Y.js +0 -50
  123. package/build/legacy/chunk-2FK7NR7Y.js.map +0 -1
  124. package/build/legacy/chunk-2UFNQM55.js +0 -21
  125. package/build/legacy/chunk-2UFNQM55.js.map +0 -1
  126. package/build/legacy/chunk-3C2DJSEE.js +0 -16
  127. package/build/legacy/chunk-3C2DJSEE.js.map +0 -1
  128. package/build/legacy/chunk-3GXISGPS.js +0 -47
  129. package/build/legacy/chunk-3GXISGPS.js.map +0 -1
  130. package/build/legacy/chunk-3RRNMPFC.js +0 -122
  131. package/build/legacy/chunk-3RRNMPFC.js.map +0 -1
  132. package/build/legacy/chunk-4CAT3FHV.js +0 -11
  133. package/build/legacy/chunk-4CAT3FHV.js.map +0 -1
  134. package/build/legacy/chunk-4FD33RTW.js +0 -56
  135. package/build/legacy/chunk-4FD33RTW.js.map +0 -1
  136. package/build/legacy/chunk-4M3EUP57.js +0 -22
  137. package/build/legacy/chunk-4M3EUP57.js.map +0 -1
  138. package/build/legacy/chunk-4M4LCQ43.js +0 -12
  139. package/build/legacy/chunk-4M4LCQ43.js.map +0 -1
  140. package/build/legacy/chunk-4O4QFF4S.js +0 -15
  141. package/build/legacy/chunk-4O4QFF4S.js.map +0 -1
  142. package/build/legacy/chunk-53QBTZZF.js +0 -42
  143. package/build/legacy/chunk-53QBTZZF.js.map +0 -1
  144. package/build/legacy/chunk-55J6XMHW.js +0 -1
  145. package/build/legacy/chunk-55J6XMHW.js.map +0 -1
  146. package/build/legacy/chunk-5WVXIAG2.js +0 -27
  147. package/build/legacy/chunk-5WVXIAG2.js.map +0 -1
  148. package/build/legacy/chunk-6DIGPXAD.js +0 -48
  149. package/build/legacy/chunk-6DIGPXAD.js.map +0 -1
  150. package/build/legacy/chunk-6F34A7NZ.js +0 -28
  151. package/build/legacy/chunk-6F34A7NZ.js.map +0 -1
  152. package/build/legacy/chunk-7NX4RGDB.js +0 -218
  153. package/build/legacy/chunk-7NX4RGDB.js.map +0 -1
  154. package/build/legacy/chunk-7VJOPJVX.js +0 -29
  155. package/build/legacy/chunk-7VJOPJVX.js.map +0 -1
  156. package/build/legacy/chunk-A5WYZVUR.js +0 -28
  157. package/build/legacy/chunk-A5WYZVUR.js.map +0 -1
  158. package/build/legacy/chunk-CP7OUC2Q.js +0 -42
  159. package/build/legacy/chunk-CP7OUC2Q.js.map +0 -1
  160. package/build/legacy/chunk-EVEEQRH6.js +0 -58
  161. package/build/legacy/chunk-EVEEQRH6.js.map +0 -1
  162. package/build/legacy/chunk-GKUDLVOV.js +0 -64
  163. package/build/legacy/chunk-GKUDLVOV.js.map +0 -1
  164. package/build/legacy/chunk-GUECLKHY.js +0 -43
  165. package/build/legacy/chunk-GUECLKHY.js.map +0 -1
  166. package/build/legacy/chunk-HW76XVA3.js +0 -22
  167. package/build/legacy/chunk-HW76XVA3.js.map +0 -1
  168. package/build/legacy/chunk-ID3XWGLY.js +0 -58
  169. package/build/legacy/chunk-ID3XWGLY.js.map +0 -1
  170. package/build/legacy/chunk-ISPTI4GC.js +0 -32
  171. package/build/legacy/chunk-ISPTI4GC.js.map +0 -1
  172. package/build/legacy/chunk-JB7IQ2BM.js +0 -12
  173. package/build/legacy/chunk-JB7IQ2BM.js.map +0 -1
  174. package/build/legacy/chunk-JF76VIL3.js +0 -12
  175. package/build/legacy/chunk-JF76VIL3.js.map +0 -1
  176. package/build/legacy/chunk-JHAI4ZHG.js +0 -76
  177. package/build/legacy/chunk-JHAI4ZHG.js.map +0 -1
  178. package/build/legacy/chunk-KESKDLX6.js +0 -30
  179. package/build/legacy/chunk-KESKDLX6.js.map +0 -1
  180. package/build/legacy/chunk-KF24CS4S.js +0 -58
  181. package/build/legacy/chunk-KF24CS4S.js.map +0 -1
  182. package/build/legacy/chunk-KJUCHZHV.js +0 -51
  183. package/build/legacy/chunk-KJUCHZHV.js.map +0 -1
  184. package/build/legacy/chunk-KUQZECNS.js +0 -155
  185. package/build/legacy/chunk-KUQZECNS.js.map +0 -1
  186. package/build/legacy/chunk-N3FUF4TB.js +0 -12
  187. package/build/legacy/chunk-N3FUF4TB.js.map +0 -1
  188. package/build/legacy/chunk-NE5NHILF.js +0 -47
  189. package/build/legacy/chunk-NE5NHILF.js.map +0 -1
  190. package/build/legacy/chunk-PH64POOB.js +0 -33
  191. package/build/legacy/chunk-PH64POOB.js.map +0 -1
  192. package/build/legacy/chunk-PJ3744I6.js +0 -24
  193. package/build/legacy/chunk-PJ3744I6.js.map +0 -1
  194. package/build/legacy/chunk-PMCYXRAH.js +0 -86
  195. package/build/legacy/chunk-PMCYXRAH.js.map +0 -1
  196. package/build/legacy/chunk-QU7UV5DB.js +0 -25
  197. package/build/legacy/chunk-QU7UV5DB.js.map +0 -1
  198. package/build/legacy/chunk-RHG26FYL.js +0 -68
  199. package/build/legacy/chunk-RHG26FYL.js.map +0 -1
  200. package/build/legacy/chunk-RPZAPUCF.js +0 -81
  201. package/build/legacy/chunk-RPZAPUCF.js.map +0 -1
  202. package/build/legacy/chunk-SCQVXJBT.js +0 -22
  203. package/build/legacy/chunk-SCQVXJBT.js.map +0 -1
  204. package/build/legacy/chunk-SLHX5K6I.js +0 -29
  205. package/build/legacy/chunk-SLHX5K6I.js.map +0 -1
  206. package/build/legacy/chunk-SXXWC6UD.js +0 -83
  207. package/build/legacy/chunk-SXXWC6UD.js.map +0 -1
  208. package/build/legacy/chunk-TCO46FK7.js +0 -36
  209. package/build/legacy/chunk-TCO46FK7.js.map +0 -1
  210. package/build/legacy/chunk-TJI2SJCZ.js +0 -208
  211. package/build/legacy/chunk-TJI2SJCZ.js.map +0 -1
  212. package/build/legacy/chunk-TYTEREKZ.js +0 -39
  213. package/build/legacy/chunk-TYTEREKZ.js.map +0 -1
  214. package/build/legacy/chunk-TZNYJ3G7.js +0 -25
  215. package/build/legacy/chunk-TZNYJ3G7.js.map +0 -1
  216. package/build/legacy/chunk-U72VPIZA.js +0 -32
  217. package/build/legacy/chunk-U72VPIZA.js.map +0 -1
  218. package/build/legacy/chunk-VCR5C6Q3.js +0 -29
  219. package/build/legacy/chunk-VCR5C6Q3.js.map +0 -1
  220. package/build/legacy/chunk-VGHVH2T3.js +0 -24
  221. package/build/legacy/chunk-VGHVH2T3.js.map +0 -1
  222. package/build/legacy/chunk-VULPMZUW.js +0 -18
  223. package/build/legacy/chunk-VULPMZUW.js.map +0 -1
  224. package/build/legacy/chunk-XREC5IJE.js +0 -24
  225. package/build/legacy/chunk-XREC5IJE.js.map +0 -1
  226. package/build/legacy/chunk-ZAU4JVLL.js +0 -33
  227. package/build/legacy/chunk-ZAU4JVLL.js.map +0 -1
  228. package/build/legacy/components/Button.js +0 -7
  229. package/build/legacy/components/Button.js.map +0 -1
  230. package/build/legacy/components/Checkbox.js +0 -13
  231. package/build/legacy/components/Checkbox.js.map +0 -1
  232. package/build/legacy/components/Droppable.js +0 -8
  233. package/build/legacy/components/Droppable.js.map +0 -1
  234. package/build/legacy/components/FeatureFlag.js +0 -10
  235. package/build/legacy/components/FeatureFlag.js.map +0 -1
  236. package/build/legacy/components/FieldMessage.js +0 -9
  237. package/build/legacy/components/FieldMessage.js.map +0 -1
  238. package/build/legacy/components/FileStatus.js +0 -17
  239. package/build/legacy/components/FileStatus.js.map +0 -1
  240. package/build/legacy/components/FileUploader.js +0 -12
  241. package/build/legacy/components/FileUploader.js.map +0 -1
  242. package/build/legacy/components/IconButton.js +0 -7
  243. package/build/legacy/components/IconButton.js.map +0 -1
  244. package/build/legacy/components/Input.js +0 -13
  245. package/build/legacy/components/Input.js.map +0 -1
  246. package/build/legacy/components/Label.js +0 -10
  247. package/build/legacy/components/Label.js.map +0 -1
  248. package/build/legacy/components/Modal.js +0 -7
  249. package/build/legacy/components/Modal.js.map +0 -1
  250. package/build/legacy/components/ModalDescription.js +0 -7
  251. package/build/legacy/components/ModalDescription.js.map +0 -1
  252. package/build/legacy/components/ModalHeader.js +0 -7
  253. package/build/legacy/components/ModalHeader.js.map +0 -1
  254. package/build/legacy/components/ModalHeading.js +0 -7
  255. package/build/legacy/components/ModalHeading.js.map +0 -1
  256. package/build/legacy/components/ModalIcon.js +0 -7
  257. package/build/legacy/components/ModalIcon.js.map +0 -1
  258. package/build/legacy/components/NavMenuLink.js +0 -8
  259. package/build/legacy/components/NavMenuLink.js.map +0 -1
  260. package/build/legacy/components/NavMenuList.js +0 -12
  261. package/build/legacy/components/NavMenuList.js.map +0 -1
  262. package/build/legacy/components/NavMenuTrigger.js +0 -11
  263. package/build/legacy/components/NavMenuTrigger.js.map +0 -1
  264. package/build/legacy/components/Notification.js +0 -12
  265. package/build/legacy/components/Notification.js.map +0 -1
  266. package/build/legacy/components/NotificationDescription.js +0 -7
  267. package/build/legacy/components/NotificationDescription.js.map +0 -1
  268. package/build/legacy/components/NotificationHeading.js +0 -7
  269. package/build/legacy/components/NotificationHeading.js.map +0 -1
  270. package/build/legacy/components/Portal.js +0 -7
  271. package/build/legacy/components/Portal.js.map +0 -1
  272. package/build/legacy/components/ProgressBar.js +0 -7
  273. package/build/legacy/components/ProgressBar.js.map +0 -1
  274. package/build/legacy/components/Radio.js +0 -9
  275. package/build/legacy/components/Radio.js.map +0 -1
  276. package/build/legacy/components/Select.js +0 -15
  277. package/build/legacy/components/Select.js.map +0 -1
  278. package/build/legacy/components/Show.js +0 -8
  279. package/build/legacy/components/Show.js.map +0 -1
  280. package/build/legacy/components/Tab.js +0 -10
  281. package/build/legacy/components/Tab.js.map +0 -1
  282. package/build/legacy/components/TabList.js +0 -9
  283. package/build/legacy/components/TabList.js.map +0 -1
  284. package/build/legacy/components/TabPanel.js +0 -10
  285. package/build/legacy/components/TabPanel.js.map +0 -1
  286. package/build/legacy/components/Table.js +0 -9
  287. package/build/legacy/components/Table.js.map +0 -1
  288. package/build/legacy/components/Tag.js +0 -8
  289. package/build/legacy/components/Tag.js.map +0 -1
  290. package/build/legacy/components/Tbody.js +0 -7
  291. package/build/legacy/components/Tbody.js.map +0 -1
  292. package/build/legacy/components/Td.js +0 -7
  293. package/build/legacy/components/Td.js.map +0 -1
  294. package/build/legacy/components/Textarea.js +0 -9
  295. package/build/legacy/components/Textarea.js.map +0 -1
  296. package/build/legacy/components/Th.js +0 -8
  297. package/build/legacy/components/Th.js.map +0 -1
  298. package/build/legacy/components/Thead.js +0 -7
  299. package/build/legacy/components/Thead.js.map +0 -1
  300. package/build/legacy/components/Toggle.js +0 -12
  301. package/build/legacy/components/Toggle.js.map +0 -1
  302. package/build/legacy/config/cerbIcons.js +0 -8
  303. package/build/legacy/config/cerbIcons.js.map +0 -1
  304. package/build/legacy/config/defineIcons.js +0 -11
  305. package/build/legacy/config/defineIcons.js.map +0 -1
  306. package/build/legacy/config/icons/checkbox.icons.js +0 -9
  307. package/build/legacy/config/icons/checkbox.icons.js.map +0 -1
  308. package/build/legacy/context/confirm-modal.js +0 -23
  309. package/build/legacy/context/confirm-modal.js.map +0 -1
  310. package/build/legacy/context/feature-flags.js +0 -10
  311. package/build/legacy/context/feature-flags.js.map +0 -1
  312. package/build/legacy/context/field.js +0 -10
  313. package/build/legacy/context/field.js.map +0 -1
  314. package/build/legacy/context/navMenu.js +0 -10
  315. package/build/legacy/context/navMenu.js.map +0 -1
  316. package/build/legacy/context/notification-center.js +0 -20
  317. package/build/legacy/context/notification-center.js.map +0 -1
  318. package/build/legacy/context/prompt-modal.js +0 -26
  319. package/build/legacy/context/prompt-modal.js.map +0 -1
  320. package/build/legacy/context/tabs.js +0 -12
  321. package/build/legacy/context/tabs.js.map +0 -1
  322. package/build/legacy/context/theme.js +0 -14
  323. package/build/legacy/context/theme.js.map +0 -1
  324. package/build/legacy/hooks/useModal.js +0 -8
  325. package/build/legacy/hooks/useModal.js.map +0 -1
  326. package/build/legacy/hooks/useTheme.js +0 -8
  327. package/build/legacy/hooks/useTheme.js.map +0 -1
  328. package/build/legacy/hooks/useToggle.js +0 -8
  329. package/build/legacy/hooks/useToggle.js.map +0 -1
  330. package/build/legacy/index.js +0 -247
  331. package/build/legacy/index.js.map +0 -1
  332. package/build/legacy/types.js +0 -2
  333. package/build/legacy/types.js.map +0 -1
  334. /package/build/legacy/{_tsup-dts-rollup.d.ts → _tsup-dts-rollup.d.cts} +0 -0
  335. /package/build/legacy/{noExternals.d.ts → noExternals.d.cts} +0 -0
@@ -0,0 +1,151 @@
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/Toggle.tsx
22
+ var Toggle_exports = {};
23
+ __export(Toggle_exports, {
24
+ Toggle: () => Toggle
25
+ });
26
+ module.exports = __toCommonJS(Toggle_exports);
27
+ var import_css = require("@cerberus/styled-system/css");
28
+ var import_patterns = require("@cerberus/styled-system/patterns");
29
+ var import_recipes = require("@cerberus/styled-system/recipes");
30
+
31
+ // src/config/cerbIcons.ts
32
+ var import_icons = require("@cerberus/icons");
33
+
34
+ // src/config/icons/checkbox.icons.tsx
35
+ var import_jsx_runtime = require("react/jsx-runtime");
36
+ function CheckmarkIcon(props) {
37
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
38
+ "svg",
39
+ {
40
+ "aria-hidden": "true",
41
+ xmlns: "http://www.w3.org/2000/svg",
42
+ fill: "none",
43
+ role: "img",
44
+ viewBox: "0 0 24 24",
45
+ ...props,
46
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
47
+ "path",
48
+ {
49
+ fill: "currentColor",
50
+ d: "M9.714 18 4 12.335l1.818-1.764 3.896 3.824L18.181 6 20 7.803 9.714 18Z"
51
+ }
52
+ )
53
+ }
54
+ );
55
+ }
56
+ function IndeterminateIcon(props) {
57
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
58
+ "svg",
59
+ {
60
+ "aria-hidden": "true",
61
+ xmlns: "http://www.w3.org/2000/svg",
62
+ role: "img",
63
+ fill: "none",
64
+ viewBox: "0 0 24 24",
65
+ ...props,
66
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { fill: "currentColor", d: "M4 11h16v2.667H4z" })
67
+ }
68
+ );
69
+ }
70
+
71
+ // src/config/cerbIcons.ts
72
+ var defaultIcons = {
73
+ checkbox: CheckmarkIcon,
74
+ close: import_icons.CloseFilled,
75
+ confirmModal: import_icons.Information,
76
+ delete: import_icons.TrashCan,
77
+ promptModal: import_icons.Information,
78
+ fileUploader: import_icons.CloudUpload,
79
+ indeterminate: IndeterminateIcon,
80
+ infoNotification: import_icons.InformationFilled,
81
+ successNotification: import_icons.CheckmarkFilled,
82
+ warningNotification: import_icons.WarningFilled,
83
+ dangerNotification: import_icons.ErrorFilled,
84
+ invalid: import_icons.WarningFilled,
85
+ invalidAlt: import_icons.Warning,
86
+ redo: import_icons.Restart,
87
+ selectArrow: import_icons.ChevronDown,
88
+ toggleChecked: import_icons.Checkmark
89
+ };
90
+
91
+ // src/config/defineIcons.ts
92
+ var $cerberusIcons = defaultIcons;
93
+
94
+ // src/context/field.tsx
95
+ var import_react = require("react");
96
+ var import_jsx_runtime2 = require("react/jsx-runtime");
97
+ var FieldContext = (0, import_react.createContext)(null);
98
+ function useFieldContext() {
99
+ const context = (0, import_react.useContext)(FieldContext);
100
+ if (!context) {
101
+ throw new Error("useFieldContext must be used within a Field Provider.");
102
+ }
103
+ return context;
104
+ }
105
+
106
+ // src/components/Toggle.tsx
107
+ var import_jsx_runtime3 = require("react/jsx-runtime");
108
+ function Toggle(props) {
109
+ const { size, describedBy, ...nativeProps } = props;
110
+ const styles = (0, import_recipes.toggle)({ size });
111
+ const { invalid, ...state } = useFieldContext();
112
+ const Icon = $cerberusIcons.toggleChecked;
113
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
114
+ "span",
115
+ {
116
+ className: (0, import_css.cx)("group", styles.track, (0, import_patterns.hstack)()),
117
+ "data-checked": props.checked || props.defaultChecked,
118
+ children: [
119
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
120
+ "input",
121
+ {
122
+ ...nativeProps,
123
+ ...state,
124
+ ...describedBy && { "aria-describedby": describedBy },
125
+ ...invalid && { "aria-invalid": true },
126
+ className: (0, import_css.cx)("peer", styles.input),
127
+ role: "switch",
128
+ type: "checkbox"
129
+ }
130
+ ),
131
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
132
+ "span",
133
+ {
134
+ className: (0, import_css.cx)(
135
+ styles.thumb,
136
+ (0, import_patterns.vstack)({
137
+ justify: "center"
138
+ })
139
+ ),
140
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Icon, {})
141
+ }
142
+ )
143
+ ]
144
+ }
145
+ );
146
+ }
147
+ // Annotate the CommonJS export names for ESM import in node:
148
+ 0 && (module.exports = {
149
+ Toggle
150
+ });
151
+ //# sourceMappingURL=Toggle.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/Toggle.tsx","../../../src/config/cerbIcons.ts","../../../src/config/icons/checkbox.icons.tsx","../../../src/config/defineIcons.ts","../../../src/context/field.tsx"],"sourcesContent":["'use client'\n\nimport { cx } from '@cerberus/styled-system/css'\nimport { hstack, vstack } from '@cerberus/styled-system/patterns'\nimport {\n toggle,\n type ToggleVariantProps,\n} from '@cerberus/styled-system/recipes'\nimport type { InputHTMLAttributes } from 'react'\nimport { $cerberusIcons } from '../config/defineIcons'\nimport { useFieldContext } from '../context/field'\n\nexport type ToggleBase = Omit<\n InputHTMLAttributes<HTMLInputElement>,\n 'size' | 'id' | 'value'\n> & {\n describedBy?: string\n id: string\n value: string\n}\nexport type ToggleProps = ToggleBase & ToggleVariantProps\n\nexport function Toggle(props: ToggleProps) {\n const { size, describedBy, ...nativeProps } = props\n const styles = toggle({ size })\n const { invalid, ...state } = useFieldContext()\n const Icon = $cerberusIcons.toggleChecked\n\n return (\n <span\n className={cx('group', styles.track, hstack())}\n data-checked={props.checked || props.defaultChecked}\n >\n <input\n {...nativeProps}\n {...state}\n {...(describedBy && { 'aria-describedby': describedBy })}\n {...(invalid && { 'aria-invalid': true })}\n className={cx('peer', styles.input)}\n role=\"switch\"\n type=\"checkbox\"\n />\n <span\n className={cx(\n styles.thumb,\n vstack({\n justify: 'center',\n }),\n )}\n >\n <Icon />\n </span>\n </span>\n )\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","'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;AAEA,iBAAmB;AACnB,sBAA+B;AAC/B,qBAGO;;;ACPP,mBAcO;;;ACQD;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,sDAAC,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;;;ACnB5B,mBAKO;AAyBH,IAAAA,sBAAA;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;;;AJfI,IAAAC,sBAAA;AAPG,SAAS,OAAO,OAAoB;AACzC,QAAM,EAAE,MAAM,aAAa,GAAG,YAAY,IAAI;AAC9C,QAAM,aAAS,uBAAO,EAAE,KAAK,CAAC;AAC9B,QAAM,EAAE,SAAS,GAAG,MAAM,IAAI,gBAAgB;AAC9C,QAAM,OAAO,eAAe;AAE5B,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAW,eAAG,SAAS,OAAO,WAAO,wBAAO,CAAC;AAAA,MAC7C,gBAAc,MAAM,WAAW,MAAM;AAAA,MAErC;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,YACvC,eAAW,eAAG,QAAQ,OAAO,KAAK;AAAA,YAClC,MAAK;AAAA,YACL,MAAK;AAAA;AAAA,QACP;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,eAAW;AAAA,cACT,OAAO;AAAA,kBACP,wBAAO;AAAA,gBACL,SAAS;AAAA,cACX,CAAC;AAAA,YACH;AAAA,YAEA,uDAAC,QAAK;AAAA;AAAA,QACR;AAAA;AAAA;AAAA,EACF;AAEJ;","names":["import_jsx_runtime","import_jsx_runtime"]}
@@ -0,0 +1,88 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/config/cerbIcons.ts
21
+ var cerbIcons_exports = {};
22
+ __export(cerbIcons_exports, {
23
+ defaultIcons: () => defaultIcons
24
+ });
25
+ module.exports = __toCommonJS(cerbIcons_exports);
26
+ var import_icons = require("@cerberus/icons");
27
+
28
+ // src/config/icons/checkbox.icons.tsx
29
+ var import_jsx_runtime = require("react/jsx-runtime");
30
+ function CheckmarkIcon(props) {
31
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
32
+ "svg",
33
+ {
34
+ "aria-hidden": "true",
35
+ xmlns: "http://www.w3.org/2000/svg",
36
+ fill: "none",
37
+ role: "img",
38
+ viewBox: "0 0 24 24",
39
+ ...props,
40
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
41
+ "path",
42
+ {
43
+ fill: "currentColor",
44
+ d: "M9.714 18 4 12.335l1.818-1.764 3.896 3.824L18.181 6 20 7.803 9.714 18Z"
45
+ }
46
+ )
47
+ }
48
+ );
49
+ }
50
+ function IndeterminateIcon(props) {
51
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
52
+ "svg",
53
+ {
54
+ "aria-hidden": "true",
55
+ xmlns: "http://www.w3.org/2000/svg",
56
+ role: "img",
57
+ fill: "none",
58
+ viewBox: "0 0 24 24",
59
+ ...props,
60
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { fill: "currentColor", d: "M4 11h16v2.667H4z" })
61
+ }
62
+ );
63
+ }
64
+
65
+ // src/config/cerbIcons.ts
66
+ var defaultIcons = {
67
+ checkbox: CheckmarkIcon,
68
+ close: import_icons.CloseFilled,
69
+ confirmModal: import_icons.Information,
70
+ delete: import_icons.TrashCan,
71
+ promptModal: import_icons.Information,
72
+ fileUploader: import_icons.CloudUpload,
73
+ indeterminate: IndeterminateIcon,
74
+ infoNotification: import_icons.InformationFilled,
75
+ successNotification: import_icons.CheckmarkFilled,
76
+ warningNotification: import_icons.WarningFilled,
77
+ dangerNotification: import_icons.ErrorFilled,
78
+ invalid: import_icons.WarningFilled,
79
+ invalidAlt: import_icons.Warning,
80
+ redo: import_icons.Restart,
81
+ selectArrow: import_icons.ChevronDown,
82
+ toggleChecked: import_icons.Checkmark
83
+ };
84
+ // Annotate the CommonJS export names for ESM import in node:
85
+ 0 && (module.exports = {
86
+ defaultIcons
87
+ });
88
+ //# sourceMappingURL=cerbIcons.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/config/cerbIcons.ts","../../../src/config/icons/checkbox.icons.tsx"],"sourcesContent":["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"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAcO;;;ACQD;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,sDAAC,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;","names":[]}
@@ -0,0 +1,110 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/config/defineIcons.ts
21
+ var defineIcons_exports = {};
22
+ __export(defineIcons_exports, {
23
+ $cerberusIcons: () => $cerberusIcons,
24
+ defineIcons: () => defineIcons
25
+ });
26
+ module.exports = __toCommonJS(defineIcons_exports);
27
+
28
+ // src/config/cerbIcons.ts
29
+ var import_icons = require("@cerberus/icons");
30
+
31
+ // src/config/icons/checkbox.icons.tsx
32
+ var import_jsx_runtime = require("react/jsx-runtime");
33
+ function CheckmarkIcon(props) {
34
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
35
+ "svg",
36
+ {
37
+ "aria-hidden": "true",
38
+ xmlns: "http://www.w3.org/2000/svg",
39
+ fill: "none",
40
+ role: "img",
41
+ viewBox: "0 0 24 24",
42
+ ...props,
43
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
44
+ "path",
45
+ {
46
+ fill: "currentColor",
47
+ d: "M9.714 18 4 12.335l1.818-1.764 3.896 3.824L18.181 6 20 7.803 9.714 18Z"
48
+ }
49
+ )
50
+ }
51
+ );
52
+ }
53
+ function IndeterminateIcon(props) {
54
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
55
+ "svg",
56
+ {
57
+ "aria-hidden": "true",
58
+ xmlns: "http://www.w3.org/2000/svg",
59
+ role: "img",
60
+ fill: "none",
61
+ viewBox: "0 0 24 24",
62
+ ...props,
63
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { fill: "currentColor", d: "M4 11h16v2.667H4z" })
64
+ }
65
+ );
66
+ }
67
+
68
+ // src/config/cerbIcons.ts
69
+ var defaultIcons = {
70
+ checkbox: CheckmarkIcon,
71
+ close: import_icons.CloseFilled,
72
+ confirmModal: import_icons.Information,
73
+ delete: import_icons.TrashCan,
74
+ promptModal: import_icons.Information,
75
+ fileUploader: import_icons.CloudUpload,
76
+ indeterminate: IndeterminateIcon,
77
+ infoNotification: import_icons.InformationFilled,
78
+ successNotification: import_icons.CheckmarkFilled,
79
+ warningNotification: import_icons.WarningFilled,
80
+ dangerNotification: import_icons.ErrorFilled,
81
+ invalid: import_icons.WarningFilled,
82
+ invalidAlt: import_icons.Warning,
83
+ redo: import_icons.Restart,
84
+ selectArrow: import_icons.ChevronDown,
85
+ toggleChecked: import_icons.Checkmark
86
+ };
87
+
88
+ // src/config/defineIcons.ts
89
+ function _validateIconsProperties(icons) {
90
+ if (!icons.invalid) {
91
+ throw new Error(
92
+ "The an invalid property must be defined in your custom icons library."
93
+ );
94
+ }
95
+ }
96
+ function defineIcons(icons) {
97
+ _validateIconsProperties(icons);
98
+ $cerberusIcons = {
99
+ ...defaultIcons,
100
+ ...icons
101
+ };
102
+ return $cerberusIcons;
103
+ }
104
+ var $cerberusIcons = defaultIcons;
105
+ // Annotate the CommonJS export names for ESM import in node:
106
+ 0 && (module.exports = {
107
+ $cerberusIcons,
108
+ defineIcons
109
+ });
110
+ //# sourceMappingURL=defineIcons.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/config/defineIcons.ts","../../../src/config/cerbIcons.ts","../../../src/config/icons/checkbox.icons.tsx"],"sourcesContent":["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","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"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,mBAcO;;;ACQD;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,sDAAC,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;;;ADtDA,SAAS,yBAAyB,OAAqB;AACrD,MAAI,CAAC,MAAM,SAAS;AAClB,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AAAA,EACF;AACF;AAEO,SAAS,YAAY,OAA6C;AACvE,2BAAyB,KAAK;AAC9B,mBAAiB;AAAA,IACf,GAAG;AAAA,IACH,GAAG;AAAA,EACL;AACA,SAAO;AACT;AAIO,IAAI,iBAAiB;","names":[]}
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/config/icons/checkbox.icons.tsx
21
+ var checkbox_icons_exports = {};
22
+ __export(checkbox_icons_exports, {
23
+ CheckmarkIcon: () => CheckmarkIcon,
24
+ IndeterminateIcon: () => IndeterminateIcon
25
+ });
26
+ module.exports = __toCommonJS(checkbox_icons_exports);
27
+ var import_jsx_runtime = require("react/jsx-runtime");
28
+ function CheckmarkIcon(props) {
29
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
30
+ "svg",
31
+ {
32
+ "aria-hidden": "true",
33
+ xmlns: "http://www.w3.org/2000/svg",
34
+ fill: "none",
35
+ role: "img",
36
+ viewBox: "0 0 24 24",
37
+ ...props,
38
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
39
+ "path",
40
+ {
41
+ fill: "currentColor",
42
+ d: "M9.714 18 4 12.335l1.818-1.764 3.896 3.824L18.181 6 20 7.803 9.714 18Z"
43
+ }
44
+ )
45
+ }
46
+ );
47
+ }
48
+ function IndeterminateIcon(props) {
49
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
50
+ "svg",
51
+ {
52
+ "aria-hidden": "true",
53
+ xmlns: "http://www.w3.org/2000/svg",
54
+ role: "img",
55
+ fill: "none",
56
+ viewBox: "0 0 24 24",
57
+ ...props,
58
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { fill: "currentColor", d: "M4 11h16v2.667H4z" })
59
+ }
60
+ );
61
+ }
62
+ // Annotate the CommonJS export names for ESM import in node:
63
+ 0 && (module.exports = {
64
+ CheckmarkIcon,
65
+ IndeterminateIcon
66
+ });
67
+ //# sourceMappingURL=checkbox.icons.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/config/icons/checkbox.icons.tsx"],"sourcesContent":["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"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAsBM;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,sDAAC,UAAK,MAAK,gBAAe,GAAE,qBAAoB;AAAA;AAAA,EAClD;AAEJ;","names":[]}