@cerberus-design/react 0.9.2 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (321) hide show
  1. package/build/legacy/_tsup-dts-rollup.d.cts +811 -126
  2. package/build/legacy/aria-helpers/tabs.aria.cjs.map +1 -1
  3. package/build/legacy/components/Avatar.cjs.map +1 -1
  4. package/build/legacy/components/Button.cjs.map +1 -1
  5. package/build/legacy/components/Checkbox.cjs.map +1 -1
  6. package/build/legacy/components/CircularProgress.cjs +180 -0
  7. package/build/legacy/components/CircularProgress.cjs.map +1 -0
  8. package/build/legacy/components/Droppable.cjs.map +1 -1
  9. package/build/legacy/components/FeatureFlag.cjs.map +1 -1
  10. package/build/legacy/components/FieldMessage.cjs.map +1 -1
  11. package/build/legacy/components/FileStatus.cjs +75 -79
  12. package/build/legacy/components/FileStatus.cjs.map +1 -1
  13. package/build/legacy/components/FileUploader.cjs +1 -1
  14. package/build/legacy/components/FileUploader.cjs.map +1 -1
  15. package/build/legacy/components/IconButton.cjs.map +1 -1
  16. package/build/legacy/components/Input.cjs.map +1 -1
  17. package/build/legacy/components/Label.cjs.map +1 -1
  18. package/build/legacy/components/Modal.cjs.map +1 -1
  19. package/build/legacy/components/ModalDescription.cjs.map +1 -1
  20. package/build/legacy/components/ModalHeader.cjs.map +1 -1
  21. package/build/legacy/components/ModalHeading.cjs.map +1 -1
  22. package/build/legacy/components/NavMenuLink.cjs.map +1 -1
  23. package/build/legacy/components/NavMenuList.cjs.map +1 -1
  24. package/build/legacy/components/NavMenuTrigger.cjs.map +1 -1
  25. package/build/legacy/components/Notification.cjs.map +1 -1
  26. package/build/legacy/components/NotificationDescription.cjs.map +1 -1
  27. package/build/legacy/components/NotificationHeading.cjs.map +1 -1
  28. package/build/legacy/components/Portal.cjs.map +1 -1
  29. package/build/legacy/components/ProgressBar.cjs +1 -1
  30. package/build/legacy/components/ProgressBar.cjs.map +1 -1
  31. package/build/legacy/components/Radio.cjs.map +1 -1
  32. package/build/legacy/components/Select.cjs.map +1 -1
  33. package/build/legacy/components/Show.cjs.map +1 -1
  34. package/build/legacy/components/Spinner.cjs +104 -0
  35. package/build/legacy/components/Spinner.cjs.map +1 -0
  36. package/build/legacy/components/Tab.cjs.map +1 -1
  37. package/build/legacy/components/TabList.cjs.map +1 -1
  38. package/build/legacy/components/TabPanel.cjs.map +1 -1
  39. package/build/legacy/components/Table.cjs.map +1 -1
  40. package/build/legacy/components/Tag.cjs +70 -4
  41. package/build/legacy/components/Tag.cjs.map +1 -1
  42. package/build/legacy/components/Tbody.cjs.map +1 -1
  43. package/build/legacy/components/Td.cjs.map +1 -1
  44. package/build/legacy/components/Textarea.cjs.map +1 -1
  45. package/build/legacy/components/Th.cjs.map +1 -1
  46. package/build/legacy/components/Thead.cjs.map +1 -1
  47. package/build/legacy/components/Toggle.cjs.map +1 -1
  48. package/build/legacy/context/confirm-modal.cjs +2 -2
  49. package/build/legacy/context/confirm-modal.cjs.map +1 -1
  50. package/build/legacy/context/feature-flags.cjs.map +1 -1
  51. package/build/legacy/context/field.cjs.map +1 -1
  52. package/build/legacy/context/navMenu.cjs.map +1 -1
  53. package/build/legacy/context/notification-center.cjs +50 -10
  54. package/build/legacy/context/notification-center.cjs.map +1 -1
  55. package/build/legacy/context/prompt-modal.cjs +2 -2
  56. package/build/legacy/context/prompt-modal.cjs.map +1 -1
  57. package/build/legacy/context/tabs.cjs.map +1 -1
  58. package/build/legacy/context/theme.cjs +37 -23
  59. package/build/legacy/context/theme.cjs.map +1 -1
  60. package/build/legacy/hooks/useModal.cjs.map +1 -1
  61. package/build/legacy/hooks/useTheme.cjs +41 -32
  62. package/build/legacy/hooks/useTheme.cjs.map +1 -1
  63. package/build/legacy/hooks/useToggle.cjs.map +1 -1
  64. package/build/legacy/index.cjs +605 -316
  65. package/build/legacy/index.cjs.map +1 -1
  66. package/build/modern/_tsup-dts-rollup.d.ts +811 -126
  67. package/build/modern/aria-helpers/tabs.aria.js +2 -2
  68. package/build/modern/{chunk-DGJPW76I.js → chunk-2RPWSVRX.js} +13 -13
  69. package/build/modern/chunk-2RPWSVRX.js.map +1 -0
  70. package/build/modern/{chunk-JB7IQ2BM.js → chunk-2UXE5PDG.js} +1 -1
  71. package/build/modern/chunk-2UXE5PDG.js.map +1 -0
  72. package/build/modern/{chunk-4CAT3FHV.js → chunk-2VX52EEJ.js} +1 -1
  73. package/build/modern/chunk-2VX52EEJ.js.map +1 -0
  74. package/build/modern/chunk-3O6UTN3J.js +155 -0
  75. package/build/modern/chunk-3O6UTN3J.js.map +1 -0
  76. package/build/modern/{chunk-UN3OAW56.js → chunk-477G5ZEL.js} +2 -2
  77. package/build/modern/chunk-477G5ZEL.js.map +1 -0
  78. package/build/modern/{chunk-PMCYXRAH.js → chunk-5V5MBSM3.js} +3 -3
  79. package/build/modern/chunk-5V5MBSM3.js.map +1 -0
  80. package/build/modern/{chunk-3GXISGPS.js → chunk-7K6PZBHN.js} +2 -2
  81. package/build/modern/chunk-7K6PZBHN.js.map +1 -0
  82. package/build/modern/chunk-7SYJFI5E.js +80 -0
  83. package/build/modern/chunk-7SYJFI5E.js.map +1 -0
  84. package/build/modern/{chunk-ZCIJRM2X.js → chunk-AUAPBPGW.js} +5 -5
  85. package/build/modern/chunk-AUAPBPGW.js.map +1 -0
  86. package/build/modern/{chunk-A5WYZVUR.js → chunk-B4CVET74.js} +1 -1
  87. package/build/modern/chunk-B4CVET74.js.map +1 -0
  88. package/build/modern/{chunk-2UFNQM55.js → chunk-BE4EOU2P.js} +1 -1
  89. package/build/modern/{chunk-2UFNQM55.js.map → chunk-BE4EOU2P.js.map} +1 -1
  90. package/build/modern/{chunk-VULPMZUW.js → chunk-BIDE4IJG.js} +3 -3
  91. package/build/modern/chunk-BIDE4IJG.js.map +1 -0
  92. package/build/modern/{chunk-4O4QFF4S.js → chunk-BUVVRQLZ.js} +1 -1
  93. package/build/modern/chunk-BUVVRQLZ.js.map +1 -0
  94. package/build/modern/{chunk-4M3EUP57.js → chunk-CJFW36DZ.js} +1 -1
  95. package/build/modern/chunk-CJFW36DZ.js.map +1 -0
  96. package/build/modern/{chunk-T7TOXGZT.js → chunk-E6QFLLXH.js} +21 -21
  97. package/build/modern/chunk-E6QFLLXH.js.map +1 -0
  98. package/build/modern/chunk-EB37HRCN.js +31 -0
  99. package/build/modern/chunk-EB37HRCN.js.map +1 -0
  100. package/build/modern/chunk-EJOXOICK.js +75 -0
  101. package/build/modern/chunk-EJOXOICK.js.map +1 -0
  102. package/build/modern/{chunk-6F34A7NZ.js → chunk-EXGKZGML.js} +1 -1
  103. package/build/modern/chunk-EXGKZGML.js.map +1 -0
  104. package/build/modern/{chunk-ISPTI4GC.js → chunk-EZYCKM7R.js} +2 -2
  105. package/build/modern/chunk-EZYCKM7R.js.map +1 -0
  106. package/build/modern/{chunk-4YJOK7JJ.js → chunk-GMG3B34U.js} +2 -2
  107. package/build/modern/chunk-GMG3B34U.js.map +1 -0
  108. package/build/modern/{chunk-U72VPIZA.js → chunk-HHVQ6LCA.js} +3 -3
  109. package/build/modern/chunk-HHVQ6LCA.js.map +1 -0
  110. package/build/modern/{chunk-XREC5IJE.js → chunk-HPM2XRWT.js} +1 -1
  111. package/build/modern/chunk-HPM2XRWT.js.map +1 -0
  112. package/build/modern/{chunk-2FK7NR7Y.js → chunk-I35HMGJQ.js} +5 -5
  113. package/build/modern/chunk-I35HMGJQ.js.map +1 -0
  114. package/build/modern/{chunk-WWJRKSM5.js → chunk-ILZKQP6R.js} +16 -16
  115. package/build/modern/chunk-ILZKQP6R.js.map +1 -0
  116. package/build/modern/{chunk-GKUDLVOV.js → chunk-ITOIXNJS.js} +2 -2
  117. package/build/modern/{chunk-XOVQGPIE.js → chunk-JCGWTIR4.js} +4 -4
  118. package/build/modern/chunk-JCGWTIR4.js.map +1 -0
  119. package/build/modern/{chunk-TCO46FK7.js → chunk-JIJM6JFJ.js} +2 -2
  120. package/build/modern/chunk-JIJM6JFJ.js.map +1 -0
  121. package/build/modern/{chunk-VGHVH2T3.js → chunk-JWIJHSI6.js} +5 -3
  122. package/build/modern/chunk-JWIJHSI6.js.map +1 -0
  123. package/build/modern/{chunk-6DIGPXAD.js → chunk-KBBASJIY.js} +2 -2
  124. package/build/modern/chunk-KBBASJIY.js.map +1 -0
  125. package/build/modern/{chunk-SONHHNYQ.js → chunk-LFWAJ5DX.js} +3 -3
  126. package/build/modern/chunk-LFWAJ5DX.js.map +1 -0
  127. package/build/modern/{chunk-PH64POOB.js → chunk-LJYCFFX7.js} +2 -2
  128. package/build/modern/chunk-LJYCFFX7.js.map +1 -0
  129. package/build/modern/{chunk-O6WHVUEW.js → chunk-NUGDTZCL.js} +59 -19
  130. package/build/modern/chunk-NUGDTZCL.js.map +1 -0
  131. package/build/modern/{chunk-VRPAW76S.js → chunk-O6JYYVO7.js} +5 -5
  132. package/build/modern/chunk-O6JYYVO7.js.map +1 -0
  133. package/build/modern/{chunk-KJUCHZHV.js → chunk-O75QAT4Z.js} +1 -1
  134. package/build/modern/chunk-O75QAT4Z.js.map +1 -0
  135. package/build/modern/{chunk-C5HLLGME.js → chunk-OW62FLJ6.js} +1 -1
  136. package/build/modern/chunk-OW62FLJ6.js.map +1 -0
  137. package/build/modern/{chunk-RPZAPUCF.js → chunk-OWKN5IV7.js} +3 -3
  138. package/build/modern/chunk-OWKN5IV7.js.map +1 -0
  139. package/build/modern/{chunk-PJ3744I6.js → chunk-PKQTTFWA.js} +1 -1
  140. package/build/modern/chunk-PKQTTFWA.js.map +1 -0
  141. package/build/modern/{chunk-N3FUF4TB.js → chunk-PKY46RRA.js} +1 -1
  142. package/build/modern/chunk-PKY46RRA.js.map +1 -0
  143. package/build/modern/{chunk-4M4LCQ43.js → chunk-Q7BRMIBR.js} +1 -1
  144. package/build/modern/{chunk-4M4LCQ43.js.map → chunk-Q7BRMIBR.js.map} +1 -1
  145. package/build/modern/{chunk-QEA6N6TN.js → chunk-REO5GUNC.js} +1 -1
  146. package/build/modern/chunk-REO5GUNC.js.map +1 -0
  147. package/build/modern/{chunk-KF24CS4S.js → chunk-RIFQSCHT.js} +1 -1
  148. package/build/modern/chunk-RIFQSCHT.js.map +1 -0
  149. package/build/modern/{chunk-Z6IWNVPN.js → chunk-S7XGIQY6.js} +10 -4
  150. package/build/modern/chunk-S7XGIQY6.js.map +1 -0
  151. package/build/modern/{chunk-3C2DJSEE.js → chunk-SXIXDXG3.js} +1 -1
  152. package/build/modern/chunk-SXIXDXG3.js.map +1 -0
  153. package/build/modern/{chunk-7VJOPJVX.js → chunk-TKI2CKHH.js} +1 -1
  154. package/build/modern/chunk-TKI2CKHH.js.map +1 -0
  155. package/build/modern/{chunk-SLHX5K6I.js → chunk-UBJBMOG7.js} +4 -2
  156. package/build/modern/chunk-UBJBMOG7.js.map +1 -0
  157. package/build/modern/{chunk-ZAU4JVLL.js → chunk-UZDVOIW5.js} +1 -1
  158. package/build/modern/chunk-UZDVOIW5.js.map +1 -0
  159. package/build/modern/{chunk-QZ6NS6VN.js → chunk-VG46RHBJ.js} +1 -1
  160. package/build/modern/chunk-VG46RHBJ.js.map +1 -0
  161. package/build/modern/{chunk-QU7UV5DB.js → chunk-WLEX22KS.js} +1 -1
  162. package/build/modern/chunk-WLEX22KS.js.map +1 -0
  163. package/build/modern/{chunk-FMFKM2AB.js → chunk-WZOYPFUU.js} +5 -5
  164. package/build/modern/chunk-WZOYPFUU.js.map +1 -0
  165. package/build/modern/{chunk-HW76XVA3.js → chunk-XEW6TJJ4.js} +1 -1
  166. package/build/modern/chunk-XEW6TJJ4.js.map +1 -0
  167. package/build/modern/{chunk-TYTEREKZ.js → chunk-ZFK33MVD.js} +2 -2
  168. package/build/modern/chunk-ZFK33MVD.js.map +1 -0
  169. package/build/modern/components/Avatar.js +2 -2
  170. package/build/modern/components/Button.js +1 -1
  171. package/build/modern/components/Checkbox.js +3 -3
  172. package/build/modern/components/CircularProgress.js +8 -0
  173. package/build/modern/components/CircularProgress.js.map +1 -0
  174. package/build/modern/components/Droppable.js +1 -1
  175. package/build/modern/components/FeatureFlag.js +3 -3
  176. package/build/modern/components/FieldMessage.js +2 -2
  177. package/build/modern/components/FileStatus.js +7 -7
  178. package/build/modern/components/FileUploader.js +3 -3
  179. package/build/modern/components/IconButton.js +1 -1
  180. package/build/modern/components/Input.js +3 -3
  181. package/build/modern/components/Label.js +3 -3
  182. package/build/modern/components/Modal.js +1 -1
  183. package/build/modern/components/ModalDescription.js +1 -1
  184. package/build/modern/components/ModalHeader.js +1 -1
  185. package/build/modern/components/ModalHeading.js +1 -1
  186. package/build/modern/components/NavMenuLink.js +2 -2
  187. package/build/modern/components/NavMenuList.js +3 -3
  188. package/build/modern/components/NavMenuTrigger.js +3 -3
  189. package/build/modern/components/Notification.js +1 -1
  190. package/build/modern/components/NotificationDescription.js +1 -1
  191. package/build/modern/components/NotificationHeading.js +1 -1
  192. package/build/modern/components/Portal.js +1 -1
  193. package/build/modern/components/ProgressBar.js +1 -1
  194. package/build/modern/components/Radio.js +2 -2
  195. package/build/modern/components/Select.js +3 -3
  196. package/build/modern/components/Show.js +1 -1
  197. package/build/modern/components/Spinner.js +7 -0
  198. package/build/modern/components/Spinner.js.map +1 -0
  199. package/build/modern/components/Tab.js +3 -3
  200. package/build/modern/components/TabList.js +2 -2
  201. package/build/modern/components/TabPanel.js +3 -3
  202. package/build/modern/components/Table.js +1 -1
  203. package/build/modern/components/Tag.js +5 -2
  204. package/build/modern/components/Tbody.js +1 -1
  205. package/build/modern/components/Td.js +1 -1
  206. package/build/modern/components/Textarea.js +2 -2
  207. package/build/modern/components/Th.js +2 -2
  208. package/build/modern/components/Thead.js +1 -1
  209. package/build/modern/components/Toggle.js +2 -2
  210. package/build/modern/context/confirm-modal.js +10 -10
  211. package/build/modern/context/feature-flags.js +1 -1
  212. package/build/modern/context/field.js +1 -1
  213. package/build/modern/context/navMenu.js +1 -1
  214. package/build/modern/context/notification-center.js +7 -7
  215. package/build/modern/context/prompt-modal.js +13 -13
  216. package/build/modern/context/tabs.js +1 -1
  217. package/build/modern/context/theme.js +2 -5
  218. package/build/modern/hooks/useModal.js +1 -1
  219. package/build/modern/hooks/useTheme.js +5 -1
  220. package/build/modern/hooks/useToggle.js +1 -1
  221. package/build/modern/index.js +78 -68
  222. package/build/modern/index.js.map +1 -1
  223. package/package.json +3 -4
  224. package/src/components/Avatar.tsx +28 -1
  225. package/src/components/Button.tsx +1 -1
  226. package/src/components/Checkbox.tsx +11 -1
  227. package/src/components/CircularProgress.tsx +170 -0
  228. package/src/components/Droppable.tsx +13 -0
  229. package/src/components/FeatureFlag.tsx +7 -0
  230. package/src/components/FieldMessage.tsx +13 -6
  231. package/src/components/FileStatus.tsx +43 -16
  232. package/src/components/FileUploader.tsx +11 -1
  233. package/src/components/IconButton.tsx +15 -5
  234. package/src/components/Input.tsx +21 -4
  235. package/src/components/Label.tsx +13 -8
  236. package/src/components/Modal.tsx +8 -3
  237. package/src/components/ModalDescription.tsx +1 -0
  238. package/src/components/ModalHeader.tsx +1 -0
  239. package/src/components/ModalHeading.tsx +1 -0
  240. package/src/components/NavMenuLink.tsx +22 -0
  241. package/src/components/NavMenuList.tsx +37 -5
  242. package/src/components/NavMenuTrigger.tsx +13 -0
  243. package/src/components/Notification.tsx +13 -6
  244. package/src/components/NotificationDescription.tsx +8 -6
  245. package/src/components/NotificationHeading.tsx +8 -6
  246. package/src/components/Portal.tsx +9 -2
  247. package/src/components/ProgressBar.tsx +15 -5
  248. package/src/components/Radio.tsx +29 -0
  249. package/src/components/Select.tsx +17 -8
  250. package/src/components/Show.tsx +16 -5
  251. package/src/components/Spinner.tsx +82 -0
  252. package/src/components/Tab.tsx +13 -5
  253. package/src/components/TabList.tsx +5 -1
  254. package/src/components/TabPanel.tsx +7 -2
  255. package/src/components/Table.tsx +6 -3
  256. package/src/components/Tag.tsx +34 -7
  257. package/src/components/Tbody.tsx +7 -1
  258. package/src/components/Td.tsx +2 -1
  259. package/src/components/Textarea.tsx +9 -4
  260. package/src/components/Th.tsx +13 -1
  261. package/src/components/Thead.tsx +2 -1
  262. package/src/components/Toggle.tsx +35 -0
  263. package/src/context/confirm-modal.tsx +19 -2
  264. package/src/context/feature-flags.tsx +4 -1
  265. package/src/context/field.tsx +26 -0
  266. package/src/context/navMenu.tsx +25 -0
  267. package/src/context/notification-center.tsx +84 -12
  268. package/src/context/prompt-modal.tsx +41 -3
  269. package/src/context/tabs.tsx +31 -4
  270. package/src/context/theme.tsx +47 -10
  271. package/src/hooks/useModal.ts +14 -0
  272. package/src/hooks/useTheme.ts +66 -17
  273. package/src/hooks/useToggle.ts +22 -0
  274. package/src/index.ts +2 -0
  275. package/build/modern/chunk-2FK7NR7Y.js.map +0 -1
  276. package/build/modern/chunk-3C2DJSEE.js.map +0 -1
  277. package/build/modern/chunk-3GXISGPS.js.map +0 -1
  278. package/build/modern/chunk-4CAT3FHV.js.map +0 -1
  279. package/build/modern/chunk-4M3EUP57.js.map +0 -1
  280. package/build/modern/chunk-4O4QFF4S.js.map +0 -1
  281. package/build/modern/chunk-4YJOK7JJ.js.map +0 -1
  282. package/build/modern/chunk-6DIGPXAD.js.map +0 -1
  283. package/build/modern/chunk-6F34A7NZ.js.map +0 -1
  284. package/build/modern/chunk-7VJOPJVX.js.map +0 -1
  285. package/build/modern/chunk-A5WYZVUR.js.map +0 -1
  286. package/build/modern/chunk-C5HLLGME.js.map +0 -1
  287. package/build/modern/chunk-DGJPW76I.js.map +0 -1
  288. package/build/modern/chunk-FMFKM2AB.js.map +0 -1
  289. package/build/modern/chunk-HW76XVA3.js.map +0 -1
  290. package/build/modern/chunk-ISPTI4GC.js.map +0 -1
  291. package/build/modern/chunk-JB7IQ2BM.js.map +0 -1
  292. package/build/modern/chunk-KF24CS4S.js.map +0 -1
  293. package/build/modern/chunk-KJUCHZHV.js.map +0 -1
  294. package/build/modern/chunk-N3FUF4TB.js.map +0 -1
  295. package/build/modern/chunk-O6WHVUEW.js.map +0 -1
  296. package/build/modern/chunk-PH64POOB.js.map +0 -1
  297. package/build/modern/chunk-PJ3744I6.js.map +0 -1
  298. package/build/modern/chunk-PMCYXRAH.js.map +0 -1
  299. package/build/modern/chunk-QEA6N6TN.js.map +0 -1
  300. package/build/modern/chunk-QU7UV5DB.js.map +0 -1
  301. package/build/modern/chunk-QZ6NS6VN.js.map +0 -1
  302. package/build/modern/chunk-RPZAPUCF.js.map +0 -1
  303. package/build/modern/chunk-SLHX5K6I.js.map +0 -1
  304. package/build/modern/chunk-SONHHNYQ.js.map +0 -1
  305. package/build/modern/chunk-SXXWC6UD.js +0 -83
  306. package/build/modern/chunk-SXXWC6UD.js.map +0 -1
  307. package/build/modern/chunk-T7TOXGZT.js.map +0 -1
  308. package/build/modern/chunk-TCO46FK7.js.map +0 -1
  309. package/build/modern/chunk-TYTEREKZ.js.map +0 -1
  310. package/build/modern/chunk-U72VPIZA.js.map +0 -1
  311. package/build/modern/chunk-UN3OAW56.js.map +0 -1
  312. package/build/modern/chunk-VGHVH2T3.js.map +0 -1
  313. package/build/modern/chunk-VRPAW76S.js.map +0 -1
  314. package/build/modern/chunk-VULPMZUW.js.map +0 -1
  315. package/build/modern/chunk-WWJRKSM5.js.map +0 -1
  316. package/build/modern/chunk-XOVQGPIE.js.map +0 -1
  317. package/build/modern/chunk-XREC5IJE.js.map +0 -1
  318. package/build/modern/chunk-Z6IWNVPN.js.map +0 -1
  319. package/build/modern/chunk-ZAU4JVLL.js.map +0 -1
  320. package/build/modern/chunk-ZCIJRM2X.js.map +0 -1
  321. /package/build/modern/{chunk-GKUDLVOV.js.map → chunk-ITOIXNJS.js.map} +0 -0
@@ -1,164 +1,172 @@
1
+ import {
2
+ ThemeProvider,
3
+ useThemeContext
4
+ } from "./chunk-EB37HRCN.js";
5
+ import {
6
+ Toggle
7
+ } from "./chunk-GMG3B34U.js";
8
+ import {
9
+ ConfirmModal,
10
+ useConfirmModal
11
+ } from "./chunk-ILZKQP6R.js";
1
12
  import {
2
13
  NotificationCenter,
3
14
  useNotificationCenter
4
- } from "./chunk-O6WHVUEW.js";
15
+ } from "./chunk-NUGDTZCL.js";
5
16
  import {
6
17
  PromptModal,
7
18
  usePromptModal
8
- } from "./chunk-T7TOXGZT.js";
19
+ } from "./chunk-E6QFLLXH.js";
20
+ import {
21
+ TabPanel
22
+ } from "./chunk-HHVQ6LCA.js";
23
+ import {
24
+ Table,
25
+ Tr
26
+ } from "./chunk-B4CVET74.js";
9
27
  import {
10
28
  Tag
11
- } from "./chunk-Z6IWNVPN.js";
29
+ } from "./chunk-S7XGIQY6.js";
12
30
  import {
13
31
  Tbody
14
- } from "./chunk-PJ3744I6.js";
32
+ } from "./chunk-PKQTTFWA.js";
15
33
  import {
16
34
  Td
17
- } from "./chunk-XREC5IJE.js";
35
+ } from "./chunk-HPM2XRWT.js";
18
36
  import {
19
37
  Textarea
20
- } from "./chunk-TCO46FK7.js";
38
+ } from "./chunk-JIJM6JFJ.js";
21
39
  import {
22
40
  Th
23
- } from "./chunk-3GXISGPS.js";
41
+ } from "./chunk-7K6PZBHN.js";
24
42
  import {
25
43
  Thead
26
- } from "./chunk-N3FUF4TB.js";
44
+ } from "./chunk-PKY46RRA.js";
27
45
  import {
28
- Toggle
29
- } from "./chunk-4YJOK7JJ.js";
30
- import {
31
- ConfirmModal,
32
- useConfirmModal
33
- } from "./chunk-WWJRKSM5.js";
46
+ Portal
47
+ } from "./chunk-2VX52EEJ.js";
34
48
  import {
35
49
  Radio
36
- } from "./chunk-PH64POOB.js";
50
+ } from "./chunk-LJYCFFX7.js";
37
51
  import {
38
52
  Option,
39
53
  Select
40
- } from "./chunk-VRPAW76S.js";
54
+ } from "./chunk-O6JYYVO7.js";
55
+ import {
56
+ Spinner
57
+ } from "./chunk-7SYJFI5E.js";
41
58
  import {
42
59
  Tab
43
- } from "./chunk-SONHHNYQ.js";
60
+ } from "./chunk-LFWAJ5DX.js";
44
61
  import {
45
62
  TabList
46
- } from "./chunk-ISPTI4GC.js";
47
- import {
48
- TabPanel
49
- } from "./chunk-U72VPIZA.js";
63
+ } from "./chunk-EZYCKM7R.js";
50
64
  import {
51
- Table,
52
- Tr
53
- } from "./chunk-A5WYZVUR.js";
65
+ ModalHeader
66
+ } from "./chunk-WLEX22KS.js";
54
67
  import {
55
68
  ModalHeading
56
- } from "./chunk-JB7IQ2BM.js";
69
+ } from "./chunk-2UXE5PDG.js";
57
70
  import {
58
71
  NavMenuLink
59
- } from "./chunk-6DIGPXAD.js";
72
+ } from "./chunk-KBBASJIY.js";
60
73
  import {
61
74
  NavMenuList,
62
75
  getPosition
63
- } from "./chunk-PMCYXRAH.js";
76
+ } from "./chunk-5V5MBSM3.js";
64
77
  import {
65
78
  NavMenuTrigger
66
- } from "./chunk-RPZAPUCF.js";
79
+ } from "./chunk-OWKN5IV7.js";
67
80
  import {
68
81
  NavMenu,
69
82
  useNavMenuContext
70
- } from "./chunk-KJUCHZHV.js";
83
+ } from "./chunk-O75QAT4Z.js";
71
84
  import {
72
85
  Notification
73
- } from "./chunk-QZ6NS6VN.js";
86
+ } from "./chunk-VG46RHBJ.js";
74
87
  import {
75
88
  NotificationDescription
76
- } from "./chunk-HW76XVA3.js";
89
+ } from "./chunk-XEW6TJJ4.js";
77
90
  import {
78
91
  NotificationHeading
79
- } from "./chunk-3C2DJSEE.js";
80
- import {
81
- Portal
82
- } from "./chunk-4CAT3FHV.js";
92
+ } from "./chunk-SXIXDXG3.js";
83
93
  import {
84
94
  FileStatus,
85
95
  processStatus
86
- } from "./chunk-DGJPW76I.js";
96
+ } from "./chunk-2RPWSVRX.js";
87
97
  import {
88
98
  ProgressBar
89
- } from "./chunk-TYTEREKZ.js";
99
+ } from "./chunk-ZFK33MVD.js";
100
+ import {
101
+ FieldMessage
102
+ } from "./chunk-JWIJHSI6.js";
90
103
  import {
91
104
  FileUploader
92
- } from "./chunk-XOVQGPIE.js";
105
+ } from "./chunk-JCGWTIR4.js";
93
106
  import {
94
107
  IconButton
95
- } from "./chunk-SLHX5K6I.js";
108
+ } from "./chunk-UBJBMOG7.js";
96
109
  import {
97
110
  Input
98
- } from "./chunk-FMFKM2AB.js";
111
+ } from "./chunk-WZOYPFUU.js";
99
112
  import {
100
113
  Label
101
- } from "./chunk-2FK7NR7Y.js";
114
+ } from "./chunk-I35HMGJQ.js";
102
115
  import {
103
116
  Modal
104
- } from "./chunk-2UFNQM55.js";
117
+ } from "./chunk-BE4EOU2P.js";
105
118
  import {
106
119
  ModalDescription
107
- } from "./chunk-4M4LCQ43.js";
108
- import {
109
- ModalHeader
110
- } from "./chunk-QU7UV5DB.js";
120
+ } from "./chunk-Q7BRMIBR.js";
111
121
  import {
112
122
  MODE_KEY,
113
123
  THEME_KEY,
114
- ThemeProvider,
115
- useTheme,
116
- useThemeContext
117
- } from "./chunk-SXXWC6UD.js";
124
+ useTheme
125
+ } from "./chunk-EJOXOICK.js";
118
126
  import {
119
127
  useToggle
120
- } from "./chunk-QEA6N6TN.js";
128
+ } from "./chunk-REO5GUNC.js";
121
129
  import {
122
130
  Avatar
123
- } from "./chunk-UN3OAW56.js";
131
+ } from "./chunk-477G5ZEL.js";
124
132
  import {
125
133
  Button
126
- } from "./chunk-6F34A7NZ.js";
134
+ } from "./chunk-EXGKZGML.js";
127
135
  import {
128
136
  Checkbox
129
- } from "./chunk-ZCIJRM2X.js";
137
+ } from "./chunk-AUAPBPGW.js";
138
+ import {
139
+ Field,
140
+ useFieldContext
141
+ } from "./chunk-UZDVOIW5.js";
142
+ import {
143
+ CircularProgress
144
+ } from "./chunk-3O6UTN3J.js";
130
145
  import {
131
146
  Droppable
132
- } from "./chunk-7VJOPJVX.js";
147
+ } from "./chunk-TKI2CKHH.js";
133
148
  import {
134
149
  FeatureFlag
135
- } from "./chunk-VULPMZUW.js";
150
+ } from "./chunk-BIDE4IJG.js";
136
151
  import {
137
152
  FeatureFlags,
138
153
  useFeatureFlags
139
- } from "./chunk-4M3EUP57.js";
154
+ } from "./chunk-CJFW36DZ.js";
140
155
  import {
141
156
  Show
142
- } from "./chunk-4O4QFF4S.js";
143
- import {
144
- FieldMessage
145
- } from "./chunk-VGHVH2T3.js";
146
- import {
147
- Field,
148
- useFieldContext
149
- } from "./chunk-ZAU4JVLL.js";
157
+ } from "./chunk-BUVVRQLZ.js";
150
158
  import "./chunk-55J6XMHW.js";
151
159
  import {
152
160
  createNavTriggerProps
153
161
  } from "./chunk-JF76VIL3.js";
154
162
  import {
155
163
  useTabsKeyboardNavigation
156
- } from "./chunk-GKUDLVOV.js";
164
+ } from "./chunk-ITOIXNJS.js";
157
165
  import {
158
166
  Tabs,
159
167
  TabsContext,
160
168
  useTabsContext
161
- } from "./chunk-KF24CS4S.js";
169
+ } from "./chunk-RIFQSCHT.js";
162
170
  import {
163
171
  trapFocus
164
172
  } from "./chunk-JIZQFTW6.js";
@@ -170,7 +178,7 @@ import "./chunk-BDCFYW34.js";
170
178
  import "./chunk-CP7OUC2Q.js";
171
179
  import {
172
180
  useModal
173
- } from "./chunk-C5HLLGME.js";
181
+ } from "./chunk-OW62FLJ6.js";
174
182
 
175
183
  // src/index.ts
176
184
  export * from "@dnd-kit/core";
@@ -179,6 +187,7 @@ export {
179
187
  Avatar,
180
188
  Button,
181
189
  Checkbox,
190
+ CircularProgress,
182
191
  ConfirmModal,
183
192
  Droppable,
184
193
  FeatureFlag,
@@ -210,6 +219,7 @@ export {
210
219
  Radio,
211
220
  Select,
212
221
  Show,
222
+ Spinner,
213
223
  THEME_KEY,
214
224
  Tab,
215
225
  TabList,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.ts"],"sourcesContent":["/**\n * This module is the entry point for the Cerberus React package.\n * @module\n */\n\n// components\n\nexport * from './components/Avatar'\nexport * from './components/Button'\nexport * from './components/Checkbox'\nexport * from './components/Droppable'\nexport * from './components/FieldMessage'\nexport * from './components/FeatureFlag'\nexport * from './components/FileStatus'\nexport * from './components/FileUploader'\nexport * from './components/IconButton'\nexport * from './components/Input'\nexport * from './components/Label'\nexport * from './components/Modal'\nexport * from './components/ModalHeader'\nexport * from './components/ModalHeading'\nexport * from './components/ModalDescription'\nexport * from './components/NavMenuTrigger'\nexport * from './components/NavMenuList'\nexport * from './components/NavMenuLink'\nexport * from './components/Notification'\nexport * from './components/NotificationHeading'\nexport * from './components/NotificationDescription'\nexport * from './components/Portal'\nexport * from './components/ProgressBar'\nexport * from './components/Radio'\nexport * from './components/Select'\nexport * from './components/Tab'\nexport * from './components/TabList'\nexport * from './components/TabPanel'\nexport * from './components/Table'\nexport * from './components/Thead'\nexport * from './components/Th'\nexport * from './components/Td'\nexport * from './components/Tbody'\nexport * from './components/Tag'\nexport * from './components/Textarea'\nexport * from './components/Toggle'\nexport * from './components/Show'\n\n// context\n\nexport * from './context/confirm-modal'\nexport * from './context/feature-flags'\nexport * from './context/field'\nexport * from './context/navMenu'\nexport * from './context/notification-center'\nexport * from './context/prompt-modal'\nexport * from './context/tabs'\nexport * from './context/theme'\n\n// hooks\n\nexport * from './hooks/useModal'\nexport * from './hooks/useTheme'\nexport * from './hooks/useToggle'\n\n// aria-helpers\n\nexport * from './aria-helpers/nav-menu.aria'\nexport * from './aria-helpers/tabs.aria'\nexport * from './aria-helpers/trap-focus.aria'\n\n// utils\n\nexport * from './config/defineIcons'\n\n// shared types\n\nexport * from './types'\n\n// 3rd party\n\nexport * from '@dnd-kit/core'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8EA,cAAc;","names":[]}
1
+ {"version":3,"sources":["../../src/index.ts"],"sourcesContent":["/**\n * This module is the entry point for the Cerberus React package.\n * @module\n */\n\n// components\n\nexport * from './components/Avatar'\nexport * from './components/Button'\nexport * from './components/Checkbox'\nexport * from './components/CircularProgress'\nexport * from './components/Droppable'\nexport * from './components/FieldMessage'\nexport * from './components/FeatureFlag'\nexport * from './components/FileStatus'\nexport * from './components/FileUploader'\nexport * from './components/IconButton'\nexport * from './components/Input'\nexport * from './components/Label'\nexport * from './components/Modal'\nexport * from './components/ModalHeader'\nexport * from './components/ModalHeading'\nexport * from './components/ModalDescription'\nexport * from './components/NavMenuTrigger'\nexport * from './components/NavMenuList'\nexport * from './components/NavMenuLink'\nexport * from './components/Notification'\nexport * from './components/NotificationHeading'\nexport * from './components/NotificationDescription'\nexport * from './components/Portal'\nexport * from './components/ProgressBar'\nexport * from './components/Radio'\nexport * from './components/Select'\nexport * from './components/Spinner'\nexport * from './components/Tab'\nexport * from './components/TabList'\nexport * from './components/TabPanel'\nexport * from './components/Table'\nexport * from './components/Thead'\nexport * from './components/Th'\nexport * from './components/Td'\nexport * from './components/Tbody'\nexport * from './components/Tag'\nexport * from './components/Textarea'\nexport * from './components/Toggle'\nexport * from './components/Show'\n\n// context\n\nexport * from './context/confirm-modal'\nexport * from './context/feature-flags'\nexport * from './context/field'\nexport * from './context/navMenu'\nexport * from './context/notification-center'\nexport * from './context/prompt-modal'\nexport * from './context/tabs'\nexport * from './context/theme'\n\n// hooks\n\nexport * from './hooks/useModal'\nexport * from './hooks/useTheme'\nexport * from './hooks/useToggle'\n\n// aria-helpers\n\nexport * from './aria-helpers/nav-menu.aria'\nexport * from './aria-helpers/tabs.aria'\nexport * from './aria-helpers/trap-focus.aria'\n\n// utils\n\nexport * from './config/defineIcons'\n\n// shared types\n\nexport * from './types'\n\n// 3rd party\n\nexport * from '@dnd-kit/core'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgFA,cAAc;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cerberus-design/react",
3
- "version": "0.9.2",
3
+ "version": "0.10.0",
4
4
  "description": "The Cerberus Design React component library.",
5
5
  "browserslist": "> 0.25%, not dead",
6
6
  "sideEffects": false,
@@ -26,15 +26,14 @@
26
26
  "react-dom": "^18",
27
27
  "tsup": "^8.1.0",
28
28
  "@cerberus-design/configs": "0.0.0",
29
- "@cerberus-design/styled-system": "0.9.2"
29
+ "@cerberus-design/styled-system": "0.10.0"
30
30
  },
31
31
  "publishConfig": {
32
32
  "access": "public"
33
33
  },
34
34
  "files": [
35
35
  "build/**/*",
36
- "src/**/*",
37
- "index.ts"
36
+ "src/**/*"
38
37
  ],
39
38
  "keywords": [
40
39
  "panda-css",
@@ -14,19 +14,46 @@ import { Show } from './Show'
14
14
  */
15
15
 
16
16
  export type SharedAvatarProps = {
17
+ /**
18
+ * An optional icon to show when no src or ariaLabel is provided.
19
+ */
17
20
  icon?: ReactNode
21
+ /**
22
+ * The size of the avatar.
23
+ */
18
24
  width?: number
25
+ /**
26
+ * The size of the avatar.
27
+ */
19
28
  height?: number
20
29
  }
21
30
  export type AvatarImageProps = HtmlHTMLAttributes<HTMLImageElement> &
22
31
  SharedAvatarProps & {
32
+ /**
33
+ * The aria-label for the avatar needed for accessibility.
34
+ */
23
35
  ariaLabel: string
36
+ /**
37
+ * An optional element to replace the image. Recommended for Next.js Image component.
38
+ */
24
39
  as?: never
40
+ /**
41
+ * The source of the image.
42
+ */
25
43
  src: string
26
44
  }
27
45
  export type AvatarAsProps = SharedAvatarProps & {
46
+ /**
47
+ * An optional element to replace the image. Recommended for Next.js Image component.
48
+ */
28
49
  as: ReactNode
50
+ /**
51
+ * The aria-label for the avatar needed for accessibility.
52
+ */
29
53
  ariaLabel?: never
54
+ /**
55
+ * The source of the image.
56
+ */
30
57
  src?: never
31
58
  }
32
59
 
@@ -36,7 +63,7 @@ export type AvatarProps = (HtmlHTMLAttributes<HTMLDivElement> &
36
63
 
37
64
  /**
38
65
  * The Avatar component is used to represent a user or entity. It will show an image if src provided, otherwise it will show the ariaLabel of the ariaLabel. If the ariaLabel is empty, it will show a `defineIcons().avatar` icon.
39
- * @definition [Avatar docs](https://cerberus.digitalu.design/react/avatar)
66
+ * @see https://cerberus.digitalu.design/react/avatar
40
67
  * @example
41
68
  * ```tsx
42
69
  * <Avatar
@@ -15,7 +15,7 @@ export type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> &
15
15
 
16
16
  /**
17
17
  * A component that allows the user to perform actions
18
- * @description https://github.com/omnifed/cerberus/blob/main/packages/react/src/components/Button.tsx
18
+ * @see https://cerberus.digitalu.design/react/button
19
19
  */
20
20
  export function Button(props: ButtonProps): JSX.Element {
21
21
  const { palette, usage, shape, ...nativeProps } = props
@@ -18,8 +18,18 @@ import { $cerberusIcons } from '../config/defineIcons'
18
18
 
19
19
  export type CheckboxProps = CheckboxVariantProps &
20
20
  Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'id'> & {
21
+ /**
22
+ * The id of the FieldMessage element describing the Checkbox.
23
+ */
21
24
  describedBy?: string
25
+ /**
26
+ * The unique identifier for the checkbox. Required for accessibility.
27
+ */
22
28
  id: string
29
+ /**
30
+ * Used to display a mixed checked state.
31
+ * @description [ARIA Mixed State](https://www.w3.org/WAI/ARIA/apg/patterns/checkbox/examples/checkbox-mixed/)
32
+ */
23
33
  mixed?: boolean
24
34
  }
25
35
 
@@ -27,7 +37,7 @@ export type CheckboxProps = CheckboxVariantProps &
27
37
  * Checkbox component
28
38
  * @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)
29
39
  * @definition [ARIA Forms](https://www.a11yproject.com/checklist/#forms)
30
- * @definition [Checkbox docs](https://cerberus.digitalu.design/react/checkbox)
40
+ * @see https://cerberus.digitalu.design/react/checkbox
31
41
  * @example
32
42
  * ```tsx
33
43
  * <Field>
@@ -0,0 +1,170 @@
1
+ 'use client'
2
+
3
+ import { cq } from '@cerberus/styled-system/patterns'
4
+ import { css } from '@cerberus/styled-system/css'
5
+ import type { SVGProps } from 'react'
6
+
7
+ /**
8
+ * This module contains the CircularProgress component.
9
+ * @module
10
+ */
11
+
12
+ export interface CircularProgressProps extends SVGProps<SVGSVGElement> {
13
+ /**
14
+ * The current value of the CircularProgress
15
+ */
16
+ now: number
17
+ /**
18
+ * The title of the CircularProgress for a11y
19
+ */
20
+ title: string
21
+ /**
22
+ * What is shown below the now value (default: 'Done')
23
+ */
24
+ label?: string
25
+ }
26
+
27
+ /**
28
+ * The CircularProgress component is used to display a loading indicator.
29
+ * @param props - SVG element attributes
30
+ * @param props.now - The current value of the CircularProgress
31
+ * @param props.title - The title of the CircularProgress for a11y
32
+ * @param props.label - What is shown below the now value (default: 'Done')
33
+ * @see https://cerberus.digitalu.design/react/progress-indicators
34
+ * @example
35
+ * ```tsx
36
+ * <CircularProgress now={24} title="Course completion" label="done" />
37
+ * ```
38
+ */
39
+ export function CircularProgress(props: CircularProgressProps) {
40
+ const strokeW: number = 14
41
+ const radius = `calc(50% * (1 - ${strokeW}/100))`
42
+ const status: string = props.label ?? 'Done'
43
+ const now: number = props.now >= 100 ? 100 : props.now
44
+
45
+ return (
46
+ <div
47
+ aria-valuemin={0}
48
+ aria-valuemax={100}
49
+ aria-valuenow={now}
50
+ className={cq({
51
+ alignSelf: 'stretch',
52
+ flex: 1,
53
+ m: '4px',
54
+ position: 'relative',
55
+ })}
56
+ role="progressbar"
57
+ >
58
+ <svg
59
+ data-complete={now === 100}
60
+ className={css({
61
+ display: 'block',
62
+ rounded: 'full',
63
+ transition: 'all 0.5s ease',
64
+ })}
65
+ fill="none"
66
+ strokeLinecap="round"
67
+ strokeWidth={strokeW}
68
+ viewBox="0 0 100 100"
69
+ xmlns="http://www.w3.org/2000/svg"
70
+ >
71
+ <title>{props.title}</title>
72
+ <desc>{`${now}% ${status}`}</desc>
73
+ <mask id="progMask">
74
+ <rect fill="white" width="100%" height="100%" />
75
+ <circle
76
+ className={css({
77
+ stroke: 'page.bg.100',
78
+ })}
79
+ cx="50%"
80
+ cy="50%"
81
+ r={radius}
82
+ pathLength="100"
83
+ />
84
+ <circle
85
+ className={css({
86
+ transition: 'stroke-dashoffset 0.5s ease',
87
+ })}
88
+ cx="50%"
89
+ cy="50%"
90
+ r={radius}
91
+ pathLength="100"
92
+ stroke="black"
93
+ strokeDasharray="100"
94
+ strokeDashoffset={100 - now}
95
+ transform="rotate(-90 50 50)"
96
+ />
97
+ </mask>
98
+
99
+ {/* <circle
100
+ fill="var(--cerberus-colors-page-surface-initial)"
101
+ cx="50%"
102
+ cy="50%"
103
+ r={`calc(50% * (1.15 - ${strokeW}/100))`}
104
+ pathLength="100"
105
+ mask="url(#progMask)"
106
+ /> */}
107
+
108
+ <circle
109
+ className={css({
110
+ fill: 'page.surface.initial',
111
+ })}
112
+ cx="50%"
113
+ cy="50%"
114
+ r={`calc(50% * (1 - ${strokeW}/100))`}
115
+ pathLength="100"
116
+ />
117
+ <circle
118
+ className={css({
119
+ stroke: 'page.bg.100',
120
+ })}
121
+ cx="50%"
122
+ cy="50%"
123
+ r={radius}
124
+ pathLength="100"
125
+ />
126
+ <circle
127
+ data-complete={now === 100}
128
+ className={css({
129
+ stroke: 'action.bg.initial',
130
+ transition: 'stroke-dashoffset 0.5s ease',
131
+ '&:is([data-complete=true])': {
132
+ stroke: 'success.bg.initial',
133
+ },
134
+ })}
135
+ cx="50%"
136
+ cy="50%"
137
+ r={radius}
138
+ pathLength="100"
139
+ strokeDasharray="100"
140
+ strokeDashoffset={100 - now}
141
+ transform="rotate(-90 50 50)"
142
+ />
143
+
144
+ <g>
145
+ <text
146
+ className={css({
147
+ fill: 'page.text.initial',
148
+ fontFamily: 'mono',
149
+ textStyle: '1.25rem',
150
+ })}
151
+ x="35%"
152
+ y="50%"
153
+ >
154
+ {now}%
155
+ </text>
156
+ <text
157
+ className={css({
158
+ fill: 'page.text.100',
159
+ fontSize: '0.5rem',
160
+ })}
161
+ x="39%"
162
+ y="60%"
163
+ >
164
+ {status}
165
+ </text>
166
+ </g>
167
+ </svg>
168
+ </div>
169
+ )
170
+ }
@@ -6,9 +6,22 @@ import { useId, type HtmlHTMLAttributes, type PropsWithChildren } from 'react'
6
6
  export interface DroppableProps
7
7
  extends Omit<HtmlHTMLAttributes<HTMLDivElement>, 'id'>,
8
8
  UseDroppableArguments {
9
+ /**
10
+ * If the item has been dropped.
11
+ */
9
12
  dropped?: boolean
10
13
  }
11
14
 
15
+ /**
16
+ * A Cerberus component is used to define a drop target for draggable elements.
17
+ * @see https://dndkit.com/
18
+ * @example
19
+ * ```tsx
20
+ * <Droppable id="dropzone">
21
+ * <Draggable id="draggable">Drag me</Draggable>
22
+ * </Droppable>
23
+ * ```
24
+ */
12
25
  export function Droppable(props: PropsWithChildren<DroppableProps>) {
13
26
  const { dropped, id, disabled, data, resizeObserverConfig, ...nativeProps } =
14
27
  props
@@ -5,9 +5,16 @@ import { useFeatureFlags } from '../context/feature-flags'
5
5
  import { Show } from './Show'
6
6
 
7
7
  export interface FeatureFlagProps {
8
+ /**
9
+ * The name of the feature flag to check.
10
+ */
8
11
  flag: string
9
12
  }
10
13
 
14
+ /**
15
+ * A component that allows you to show or hide content based on a feature flag.
16
+ * @see https://cerberus.digitalu.design/react/feature-flags
17
+ */
11
18
  export function FeatureFlag(props: PropsWithChildren<FeatureFlagProps>) {
12
19
  const showContent = useFeatureFlags(props.flag)
13
20
  return <Show when={showContent}>{props.children}</Show>
@@ -1,25 +1,32 @@
1
1
  'use client'
2
2
 
3
3
  import type { HTMLAttributes } from 'react'
4
- import { cx, type RecipeVariantProps } from '@cerberus/styled-system/css'
5
- import { fieldMessage } from '@cerberus/styled-system/recipes'
4
+ import { cx } from '@cerberus/styled-system/css'
5
+ import {
6
+ fieldMessage,
7
+ type FieldMessageVariantProps,
8
+ } from '@cerberus/styled-system/recipes'
6
9
  import { useFieldContext } from '../context/field'
7
10
 
8
11
  /**
9
12
  * This module contains the FieldMessage component.
10
13
  * @module
11
14
  */
12
-
13
- export type FieldMessageRecipe = RecipeVariantProps<typeof fieldMessage>
14
15
  export interface FieldMessageBaseProps
15
16
  extends HTMLAttributes<HTMLParagraphElement> {
17
+ /**
18
+ * The id of the FieldMessage element describing the field. Required for accessibility. It is considered best practice to use the `help` or `error` prefix to help screen readers identify the type of message.
19
+ *
20
+ * @example For help messages: `help:field_id`
21
+ * @example For error messages: `error:field_id`
22
+ */
16
23
  id: string
17
24
  }
18
- export type FieldMessageProps = FieldMessageBaseProps & FieldMessageRecipe
25
+ export type FieldMessageProps = FieldMessageBaseProps & FieldMessageVariantProps
19
26
 
20
27
  /**
21
28
  * A component that provides feedback about the field.
22
- * @description [FieldMessage Docs](https://cerberus.digitalu.design/react/field-message)
29
+ * @see https://cerberus.digitalu.design/react/field-message
23
30
  * @example
24
31
  * ```tsx
25
32
  * <Field>