@cerberus-design/react 0.14.2 → 0.15.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 (241) hide show
  1. package/build/legacy/_tsup-dts-rollup.d.cts +374 -80
  2. package/build/legacy/components/Accordion.cjs +4 -187
  3. package/build/legacy/components/Accordion.cjs.map +1 -1
  4. package/build/legacy/components/Accordion.client.cjs +64 -0
  5. package/build/legacy/components/Accordion.client.cjs.map +1 -0
  6. package/build/legacy/components/AccordionItemGroup.cjs +41 -185
  7. package/build/legacy/components/AccordionItemGroup.cjs.map +1 -1
  8. package/build/legacy/components/Admonition.cjs +89 -239
  9. package/build/legacy/components/Admonition.cjs.map +1 -1
  10. package/build/legacy/components/Admonition.client.cjs +219 -0
  11. package/build/legacy/components/Admonition.client.cjs.map +1 -0
  12. package/build/legacy/components/AnimatingUploadIcon.cjs.map +1 -1
  13. package/build/legacy/components/Avatar.cjs +23 -174
  14. package/build/legacy/components/Avatar.cjs.map +1 -1
  15. package/build/legacy/components/Checkbox.cjs +22 -168
  16. package/build/legacy/components/Checkbox.cjs.map +1 -1
  17. package/build/legacy/components/DatePicker.client.cjs +129 -272
  18. package/build/legacy/components/DatePicker.client.cjs.map +1 -1
  19. package/build/legacy/components/DatePicker.server.cjs +17 -271
  20. package/build/legacy/components/DatePicker.server.cjs.map +1 -1
  21. package/build/legacy/components/Dialog.cjs +86 -0
  22. package/build/legacy/components/Dialog.cjs.map +1 -0
  23. package/build/legacy/components/Dialog.client.cjs +95 -0
  24. package/build/legacy/components/Dialog.client.cjs.map +1 -0
  25. package/build/legacy/components/FileStatus.cjs +62 -212
  26. package/build/legacy/components/FileStatus.cjs.map +1 -1
  27. package/build/legacy/components/FileUploader.cjs +29 -180
  28. package/build/legacy/components/FileUploader.cjs.map +1 -1
  29. package/build/legacy/components/Input.cjs +20 -172
  30. package/build/legacy/components/Input.cjs.map +1 -1
  31. package/build/legacy/components/Modal.cjs.map +1 -1
  32. package/build/legacy/components/ModalDescription.cjs.map +1 -1
  33. package/build/legacy/components/ModalHeader.cjs.map +1 -1
  34. package/build/legacy/components/ModalHeading.cjs.map +1 -1
  35. package/build/legacy/components/Notification.cjs +26 -176
  36. package/build/legacy/components/Notification.cjs.map +1 -1
  37. package/build/legacy/components/Select.cjs +26 -178
  38. package/build/legacy/components/Select.cjs.map +1 -1
  39. package/build/legacy/components/Tag.cjs +16 -167
  40. package/build/legacy/components/Tag.cjs.map +1 -1
  41. package/build/legacy/components/Toggle.cjs +20 -172
  42. package/build/legacy/components/Toggle.cjs.map +1 -1
  43. package/build/legacy/config/defineIcons.cjs +3 -39
  44. package/build/legacy/config/defineIcons.cjs.map +1 -1
  45. package/build/legacy/config/{cerbIcons.cjs → index.cjs} +22 -29
  46. package/build/legacy/config/index.cjs.map +1 -0
  47. package/build/legacy/config/types.cjs +19 -0
  48. package/build/legacy/config/types.cjs.map +1 -0
  49. package/build/legacy/context/cerberus.cjs +46 -0
  50. package/build/legacy/context/cerberus.cjs.map +1 -0
  51. package/build/legacy/context/confirm-modal.cjs +105 -321
  52. package/build/legacy/context/confirm-modal.cjs.map +1 -1
  53. package/build/legacy/context/cta-modal.cjs +137 -336
  54. package/build/legacy/context/cta-modal.cjs.map +1 -1
  55. package/build/legacy/context/notification-center/store.cjs +66 -0
  56. package/build/legacy/context/notification-center/store.cjs.map +1 -0
  57. package/build/legacy/context/notification-center/types.cjs +19 -0
  58. package/build/legacy/context/notification-center/types.cjs.map +1 -0
  59. package/build/legacy/context/notification-center.cjs +142 -249
  60. package/build/legacy/context/notification-center.cjs.map +1 -1
  61. package/build/legacy/context/prompt-modal.cjs +185 -388
  62. package/build/legacy/context/prompt-modal.cjs.map +1 -1
  63. package/build/legacy/index.cjs +1577 -1456
  64. package/build/legacy/index.cjs.map +1 -1
  65. package/build/modern/_tsup-dts-rollup.d.ts +374 -80
  66. package/build/modern/{chunk-BVCXVZAF.js → chunk-25HMVHLT.js} +6 -5
  67. package/build/modern/chunk-25HMVHLT.js.map +1 -0
  68. package/build/modern/chunk-36N4527B.js +1 -0
  69. package/build/modern/chunk-5EWCH7AI.js +82 -0
  70. package/build/modern/chunk-5EWCH7AI.js.map +1 -0
  71. package/build/modern/chunk-5SNLQZYP.js +25 -0
  72. package/build/modern/chunk-5SNLQZYP.js.map +1 -0
  73. package/build/modern/chunk-6BN3XKQF.js +42 -0
  74. package/build/modern/chunk-6BN3XKQF.js.map +1 -0
  75. package/build/modern/{chunk-2UXE5PDG.js → chunk-7NN3SJ7W.js} +1 -1
  76. package/build/modern/chunk-7NN3SJ7W.js.map +1 -0
  77. package/build/modern/{chunk-KWJ5FKX7.js → chunk-BAWZBF5Q.js} +5 -3
  78. package/build/modern/chunk-BAWZBF5Q.js.map +1 -0
  79. package/build/modern/{chunk-6BH5J5GF.js → chunk-BHB56M7S.js} +31 -46
  80. package/build/modern/chunk-BHB56M7S.js.map +1 -0
  81. package/build/modern/{chunk-HKJMLWVP.js → chunk-EDARV2EI.js} +5 -4
  82. package/build/modern/chunk-EDARV2EI.js.map +1 -0
  83. package/build/modern/{chunk-5OVH3INN.js → chunk-FGCO27TC.js} +25 -53
  84. package/build/modern/chunk-FGCO27TC.js.map +1 -0
  85. package/build/modern/{chunk-PVIMOXSO.js → chunk-GCQMH4QA.js} +5 -4
  86. package/build/modern/chunk-GCQMH4QA.js.map +1 -0
  87. package/build/modern/chunk-GITT5645.js +20 -0
  88. package/build/modern/chunk-GITT5645.js.map +1 -0
  89. package/build/modern/{chunk-TJCFYL5W.js → chunk-IGHMP4WA.js} +1 -20
  90. package/build/modern/chunk-IGHMP4WA.js.map +1 -0
  91. package/build/modern/chunk-ISCJ542I.js +82 -0
  92. package/build/modern/chunk-ISCJ542I.js.map +1 -0
  93. package/build/modern/{chunk-HVKM54BA.js → chunk-IW3LIRDG.js} +1 -1
  94. package/build/modern/chunk-IW3LIRDG.js.map +1 -0
  95. package/build/modern/chunk-JAROS4Q3.js +180 -0
  96. package/build/modern/chunk-JAROS4Q3.js.map +1 -0
  97. package/build/modern/{chunk-BE4EOU2P.js → chunk-JIRW4XOJ.js} +1 -1
  98. package/build/modern/chunk-JIRW4XOJ.js.map +1 -0
  99. package/build/modern/chunk-KDDPAJMR.js +9 -0
  100. package/build/modern/chunk-KDDPAJMR.js.map +1 -0
  101. package/build/modern/{chunk-XOROL3JY.js → chunk-KKHL3ZO4.js} +5 -4
  102. package/build/modern/chunk-KKHL3ZO4.js.map +1 -0
  103. package/build/modern/{chunk-U36UZJGZ.js → chunk-MZ3UCDUL.js} +5 -4
  104. package/build/modern/chunk-MZ3UCDUL.js.map +1 -0
  105. package/build/modern/{chunk-T2JOPPGL.js → chunk-N24COMHJ.js} +11 -4
  106. package/build/modern/chunk-N24COMHJ.js.map +1 -0
  107. package/build/modern/chunk-NJSETNRL.js +68 -0
  108. package/build/modern/chunk-NJSETNRL.js.map +1 -0
  109. package/build/modern/{chunk-XY6WL55R.js → chunk-NUMM4TNC.js} +1 -1
  110. package/build/modern/chunk-NUMM4TNC.js.map +1 -0
  111. package/build/modern/{chunk-FXLLRVAM.js → chunk-O6LFWUHI.js} +8 -6
  112. package/build/modern/chunk-O6LFWUHI.js.map +1 -0
  113. package/build/modern/{chunk-JJZQGR7A.js → chunk-RDRD6ACD.js} +9 -6
  114. package/build/modern/chunk-RDRD6ACD.js.map +1 -0
  115. package/build/modern/{chunk-XXWR7UGH.js → chunk-SD3OVTHT.js} +75 -103
  116. package/build/modern/chunk-SD3OVTHT.js.map +1 -0
  117. package/build/modern/chunk-TFL56AYR.js +56 -0
  118. package/build/modern/chunk-TFL56AYR.js.map +1 -0
  119. package/build/modern/chunk-V3M3ZOQI.js +38 -0
  120. package/build/modern/chunk-V3M3ZOQI.js.map +1 -0
  121. package/build/modern/{chunk-QK7R2XJM.js → chunk-XQICKZH4.js} +6 -5
  122. package/build/modern/chunk-XQICKZH4.js.map +1 -0
  123. package/build/modern/chunk-XZGXRRSQ.js +31 -0
  124. package/build/modern/chunk-XZGXRRSQ.js.map +1 -0
  125. package/build/modern/{chunk-KPUYKHLW.js → chunk-YKKNWILF.js} +71 -15
  126. package/build/modern/chunk-YKKNWILF.js.map +1 -0
  127. package/build/modern/{chunk-Q7BRMIBR.js → chunk-ZL6ZITLA.js} +1 -1
  128. package/build/modern/chunk-ZL6ZITLA.js.map +1 -0
  129. package/build/modern/components/Accordion.client.js +9 -0
  130. package/build/modern/components/Accordion.client.js.map +1 -0
  131. package/build/modern/components/Accordion.js +1 -7
  132. package/build/modern/components/AccordionItemGroup.js +4 -6
  133. package/build/modern/components/Admonition.client.js +11 -0
  134. package/build/modern/components/Admonition.client.js.map +1 -0
  135. package/build/modern/components/Admonition.js +4 -6
  136. package/build/modern/components/AnimatingUploadIcon.js +1 -1
  137. package/build/modern/components/Avatar.js +3 -5
  138. package/build/modern/components/Checkbox.js +2 -5
  139. package/build/modern/components/DatePicker.client.js +8 -7
  140. package/build/modern/components/DatePicker.server.js +3 -13
  141. package/build/modern/components/Dialog.client.js +10 -0
  142. package/build/modern/components/Dialog.client.js.map +1 -0
  143. package/build/modern/components/Dialog.js +24 -0
  144. package/build/modern/components/Dialog.js.map +1 -0
  145. package/build/modern/components/FileStatus.js +3 -6
  146. package/build/modern/components/FileUploader.js +3 -6
  147. package/build/modern/components/Input.js +2 -5
  148. package/build/modern/components/Modal.js +1 -1
  149. package/build/modern/components/ModalDescription.js +1 -1
  150. package/build/modern/components/ModalHeader.js +1 -1
  151. package/build/modern/components/ModalHeading.js +1 -1
  152. package/build/modern/components/Notification.js +2 -5
  153. package/build/modern/components/Select.js +2 -5
  154. package/build/modern/components/Tag.js +3 -5
  155. package/build/modern/components/Toggle.js +2 -5
  156. package/build/modern/config/defineIcons.js +2 -5
  157. package/build/modern/config/index.js +14 -0
  158. package/build/modern/config/index.js.map +1 -0
  159. package/build/modern/config/types.js +2 -0
  160. package/build/modern/config/types.js.map +1 -0
  161. package/build/modern/context/cerberus.js +10 -0
  162. package/build/modern/context/cerberus.js.map +1 -0
  163. package/build/modern/context/confirm-modal.js +5 -13
  164. package/build/modern/context/cta-modal.js +7 -14
  165. package/build/modern/context/notification-center/store.js +15 -0
  166. package/build/modern/context/notification-center/store.js.map +1 -0
  167. package/build/modern/context/notification-center/types.js +1 -0
  168. package/build/modern/context/notification-center/types.js.map +1 -0
  169. package/build/modern/context/notification-center.js +5 -7
  170. package/build/modern/context/prompt-modal.js +8 -15
  171. package/build/modern/index.js +111 -75
  172. package/build/modern/index.js.map +1 -1
  173. package/package.json +4 -8
  174. package/src/components/Accordion.client.tsx +46 -0
  175. package/src/components/Accordion.tsx +0 -37
  176. package/src/components/AccordionItemGroup.tsx +1 -1
  177. package/src/components/Admonition.client.tsx +73 -0
  178. package/src/components/Admonition.tsx +1 -70
  179. package/src/components/AnimatingUploadIcon.tsx +3 -3
  180. package/src/components/Avatar.tsx +5 -2
  181. package/src/components/Checkbox.tsx +10 -3
  182. package/src/components/DatePicker.client.tsx +111 -15
  183. package/src/components/DatePicker.server.tsx +2 -75
  184. package/src/components/Dialog.client.tsx +39 -0
  185. package/src/components/Dialog.tsx +165 -0
  186. package/src/components/FileStatus.tsx +5 -3
  187. package/src/components/FileUploader.tsx +3 -2
  188. package/src/components/Input.tsx +4 -2
  189. package/src/components/Modal.tsx +1 -16
  190. package/src/components/ModalDescription.tsx +1 -8
  191. package/src/components/ModalHeader.tsx +1 -10
  192. package/src/components/ModalHeading.tsx +1 -8
  193. package/src/components/Notification.tsx +9 -4
  194. package/src/components/Select.tsx +5 -2
  195. package/src/components/Tag.tsx +5 -2
  196. package/src/components/Toggle.tsx +4 -3
  197. package/src/config/defineIcons.ts +28 -16
  198. package/src/config/index.ts +28 -0
  199. package/src/config/types.ts +42 -0
  200. package/src/context/cerberus.tsx +44 -0
  201. package/src/context/confirm-modal.tsx +44 -42
  202. package/src/context/cta-modal.tsx +25 -38
  203. package/src/context/notification-center/store.ts +88 -0
  204. package/src/context/notification-center/types.ts +28 -0
  205. package/src/context/notification-center.tsx +81 -46
  206. package/src/context/prompt-modal.tsx +101 -103
  207. package/src/index.ts +15 -8
  208. package/build/legacy/config/cerbIcons.cjs.map +0 -1
  209. package/build/modern/chunk-2UXE5PDG.js.map +0 -1
  210. package/build/modern/chunk-5OVH3INN.js.map +0 -1
  211. package/build/modern/chunk-6BH5J5GF.js.map +0 -1
  212. package/build/modern/chunk-BC5SZDYY.js +0 -132
  213. package/build/modern/chunk-BC5SZDYY.js.map +0 -1
  214. package/build/modern/chunk-BE4EOU2P.js.map +0 -1
  215. package/build/modern/chunk-BVCXVZAF.js.map +0 -1
  216. package/build/modern/chunk-CRII2HNX.js +0 -55
  217. package/build/modern/chunk-CRII2HNX.js.map +0 -1
  218. package/build/modern/chunk-CVTON5DQ.js +0 -162
  219. package/build/modern/chunk-CVTON5DQ.js.map +0 -1
  220. package/build/modern/chunk-FXLLRVAM.js.map +0 -1
  221. package/build/modern/chunk-HKJMLWVP.js.map +0 -1
  222. package/build/modern/chunk-HVKM54BA.js.map +0 -1
  223. package/build/modern/chunk-JJZQGR7A.js.map +0 -1
  224. package/build/modern/chunk-KPUYKHLW.js.map +0 -1
  225. package/build/modern/chunk-KWJ5FKX7.js.map +0 -1
  226. package/build/modern/chunk-PVIMOXSO.js.map +0 -1
  227. package/build/modern/chunk-Q7BRMIBR.js.map +0 -1
  228. package/build/modern/chunk-QK7R2XJM.js.map +0 -1
  229. package/build/modern/chunk-QMF5ZNDG.js +0 -27
  230. package/build/modern/chunk-QMF5ZNDG.js.map +0 -1
  231. package/build/modern/chunk-QQOWWMZ3.js +0 -138
  232. package/build/modern/chunk-QQOWWMZ3.js.map +0 -1
  233. package/build/modern/chunk-T2JOPPGL.js.map +0 -1
  234. package/build/modern/chunk-TJCFYL5W.js.map +0 -1
  235. package/build/modern/chunk-U36UZJGZ.js.map +0 -1
  236. package/build/modern/chunk-XOROL3JY.js.map +0 -1
  237. package/build/modern/chunk-XXWR7UGH.js.map +0 -1
  238. package/build/modern/chunk-XY6WL55R.js.map +0 -1
  239. package/build/modern/config/cerbIcons.js +0 -9
  240. package/src/config/cerbIcons.ts +0 -73
  241. /package/build/modern/{config/cerbIcons.js.map → chunk-36N4527B.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.ts","../../src/components/Accordion.tsx","../../src/config/cerbIcons.ts","../../src/config/icons/checkbox.icons.tsx","../../src/components/AnimatingUploadIcon.tsx","../../src/config/defineIcons.ts","../../src/components/Show.tsx","../../src/components/AccordionItemGroup.tsx","../../src/components/Admonition.tsx","../../src/components/Avatar.tsx","../../src/components/Button.tsx","../../src/components/Checkbox.tsx","../../src/context/field.tsx","../../src/components/CircularProgress.tsx","../../src/components/DatePicker.client.tsx","../../src/components/Portal.tsx","../../src/components/DatePicker.server.tsx","../../src/components/IconButton.tsx","../../src/components/Droppable.tsx","../../src/components/FieldMessage.tsx","../../src/context/feature-flags.tsx","../../src/components/FeatureFlag.tsx","../../src/components/Fieldset.tsx","../../src/components/FieldsetLabel.tsx","../../src/components/FileStatus.tsx","../../src/components/ProgressBar.tsx","../../src/components/FileUploader.tsx","../../src/components/Input.tsx","../../src/components/Label.tsx","../../src/components/Legend.tsx","../../src/components/Menu.tsx","../../src/components/Modal.tsx","../../src/components/ModalHeader.tsx","../../src/components/ModalHeading.tsx","../../src/components/ModalDescription.tsx","../../src/components/NavMenuTrigger.tsx","../../src/aria-helpers/nav-menu.aria.ts","../../src/context/navMenu.tsx","../../src/components/NavMenuList.tsx","../../src/components/NavMenuLink.tsx","../../src/components/Notification.tsx","../../src/aria-helpers/trap-focus.aria.ts","../../src/components/NotificationHeading.tsx","../../src/components/NotificationDescription.tsx","../../src/components/Radio.tsx","../../src/components/Select.tsx","../../src/components/Spinner.tsx","../../src/components/Tabs.client.tsx","../../src/context/tabs.tsx","../../src/utils/localStorage.ts","../../src/components/Table.tsx","../../src/components/Thead.tsx","../../src/components/Th.tsx","../../src/components/Td.tsx","../../src/components/Tbody.tsx","../../src/components/Tag.tsx","../../src/components/Text.tsx","../../src/components/Textarea.tsx","../../src/components/Toggle.tsx","../../src/components/Tooltip.tsx","../../src/context/confirm-modal.tsx","../../src/hooks/useModal.ts","../../src/context/cta-modal.tsx","../../src/context/notification-center.tsx","../../src/context/prompt-modal.tsx","../../src/context/theme.tsx","../../src/hooks/useTheme.ts","../../src/hooks/useDate.ts","../../src/hooks/useToggle.ts","../../src/hooks/useRootColors.ts","../../src/utils/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/Accordion'\nexport * from './components/AccordionItemGroup'\nexport * from './components/Admonition'\nexport * from './components/Avatar'\nexport * from './components/Button'\nexport * from './components/Checkbox'\nexport * from './components/CircularProgress'\nexport * from './components/DatePicker.client'\nexport * from './components/DatePicker.server'\nexport * from './components/Droppable'\nexport * from './components/FieldMessage'\nexport * from './components/FeatureFlag'\nexport * from './components/Fieldset'\nexport * from './components/FieldsetLabel'\nexport * from './components/FileStatus'\nexport * from './components/FileUploader'\nexport * from './components/IconButton'\nexport * from './components/Input'\nexport * from './components/Label'\nexport * from './components/Legend'\nexport * from './components/Menu'\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/Tabs.client'\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/Text'\nexport * from './components/Textarea'\nexport * from './components/Toggle'\nexport * from './components/Tooltip'\nexport * from './components/Show'\n\n// context\n\nexport * from './context/confirm-modal'\nexport * from './context/cta-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/useDate'\nexport * from './hooks/useModal'\nexport * from './hooks/useTheme'\nexport * from './hooks/useToggle'\nexport * from './hooks/useRootColors'\n\n// aria-helpers\n\nexport * from './aria-helpers/nav-menu.aria'\nexport * from './aria-helpers/trap-focus.aria'\n\n// utils\n\nexport * from './config/defineIcons'\nexport * from './utils/index'\n\n// shared types\n\nexport * from './types'\n\n// 3rd party\n\nexport * from '@dnd-kit/core'\n","import { Accordion as ArkAccordion } from '@ark-ui/react'\nimport { cx } from '@cerberus/styled-system/css'\nimport {\n accordion,\n type AccordionVariantProps,\n} from '@cerberus/styled-system/recipes'\nimport { $cerberusIcons } from '../config/defineIcons'\n\nexport type AccordionProps = ArkAccordion.RootProps & AccordionVariantProps\n\n/**\n * The context provider for the Accordion family.\n * @definition [Accordion docs](https://cerberus.digitalu.design/react/accordion)\n * @example\n * ```tsx\n * <Accordion>\n * <AccordionItemGroup heading=\"Item 1 heading\" value=\"one\">\n * This is the content\n * </AccordionItemGroup>\n * </Accordion>\n * ```\n */\nexport function Accordion(props: AccordionProps) {\n const { size, className, ...rootProps } = props\n const styles = accordion({ size })\n return (\n <ArkAccordion.Root\n collapsible\n className={cx(className, styles.root)}\n {...rootProps}\n />\n )\n}\n\ntype AccordionItemProps = ArkAccordion.ItemProps & AccordionVariantProps\n\n/**\n * The item for the Accordion component.\n * @definition [ARK docs](https://ark-ui.com/react/docs/components/accordion)\n * @definition [Accordion docs](https://cerberus.digitalu.design/react/accordion)\n * @example\n * ```tsx\n * <Accordion>\n * <AccordionItem value=\"one\">\n * <AccordionTrigger>\n * Accordion Item 1\n * <AccordionIndicator />\n * </AccordionTrigger>\n * <AccordionContent>Accordion Item 1 content</AccordionContent>\n * </AccordionItem>\n * </Accordion>\n * ```\n */\nexport function AccordionItem(props: AccordionItemProps) {\n const { size, ...itemProps } = props\n const styles = accordion({ size })\n return (\n <ArkAccordion.Item\n {...itemProps}\n className={cx(itemProps.className, styles.item)}\n />\n )\n}\n\nexport type AccordionItemTriggerProps = ArkAccordion.ItemTriggerProps &\n AccordionVariantProps\n\n/**\n * The trigger for the Accordion component.\n * @definition [ARK docs](https://ark-ui.com/react/docs/components/accordion)\n * @definition [Accordion docs](https://cerberus.digitalu.design/react/accordion)\n * @example\n * ```tsx\n * <Accordion>\n * <AccordionItem value=\"one\">\n * <AccordionTrigger>\n * Accordion Item 1\n * <AccordionIndicator />\n * </AccordionTrigger>\n * <AccordionContent>Accordion Item 1 content</AccordionContent>\n * </AccordionItem>\n * </Accordion>\n * ```\n */\nexport function AccordionItemTrigger(props: AccordionItemTriggerProps) {\n const { size, ...triggerProps } = props\n const styles = accordion({ size })\n return (\n <ArkAccordion.ItemTrigger\n {...triggerProps}\n className={cx(triggerProps.className, styles.itemTrigger)}\n />\n )\n}\n\nexport type AccordionItemIndicatorProps = ArkAccordion.ItemIndicatorProps &\n AccordionVariantProps\n\n/**\n * The indicator for the Accordion component.\n * @definition [ARK docs](https://ark-ui.com/react/docs/components/accordion)\n * @definition [Accordion docs](https://cerberus.digitalu.design/react/accordion)\n * @example\n * ```tsx\n * <Accordion>\n * <AccordionItem value=\"one\">\n * <AccordionTrigger>\n * Accordion Item 1\n * <AccordionIndicator />\n * </AccordionTrigger>\n * <AccordionContent>Accordion Item 1 content</AccordionContent>\n * </AccordionItem>\n * </Accordion>\n * ```\n * */\nexport function AccordionItemIndicator(props: AccordionItemIndicatorProps) {\n const { size, ...indicatorProps } = props\n const styles = accordion({ size })\n const iconSize = size === 'sm' ? 16 : '24'\n const { accordionIndicator: ChevronDown } = $cerberusIcons\n\n return (\n <ArkAccordion.ItemIndicator\n {...indicatorProps}\n className={cx(indicatorProps.className, styles.itemIndicator)}\n >\n <ChevronDown size={iconSize} />\n </ArkAccordion.ItemIndicator>\n )\n}\n\nexport type AccordionItemContentProps = ArkAccordion.ItemContentProps &\n AccordionVariantProps\n\n/**\n * The content for the Accordion component.\n * @definition [ARK docs](https://ark-ui.com/react/docs/components/accordion)\n * @definition [Accordion docs](https://cerberus.digitalu.design/react/accordion)\n * @example\n * ```tsx\n * <Accordion>\n * <AccordionItem value=\"one\">\n * <AccordionTrigger>\n * Accordion Item 1\n * <AccordionIndicator />\n * </AccordionTrigger>\n * <AccordionContent>Accordion Item 1 content</AccordionContent>\n * </AccordionItem>\n * </Accordion>\n * ```\n * */\nexport function AccordionItemContent(props: AccordionItemContentProps) {\n const { size, ...contentProps } = props\n const styles = accordion({ size })\n return (\n <ArkAccordion.ItemContent\n {...contentProps}\n className={cx(contentProps.className, styles.itemContent)}\n />\n )\n}\n","import {\n Calendar,\n Checkmark,\n CheckmarkOutline,\n ChevronDown,\n ChevronLeft,\n ChevronRight,\n Close,\n CloudUpload,\n Information,\n Restart,\n TrashCan,\n UserFilled,\n Warning,\n WarningAlt,\n WarningFilled,\n type CarbonIconType,\n} from '@cerberus/icons'\nimport type { ElementType } from 'react'\nimport { CheckmarkIcon, IndeterminateIcon } from './icons/checkbox.icons'\nimport { AnimatingUploadIcon } from '../components/AnimatingUploadIcon'\n\nexport type IconType = CarbonIconType | ElementType\n\nexport interface DefinedIcons {\n accordionIndicator?: IconType\n avatar?: IconType\n calendar?: IconType\n calendarPrev?: IconType\n calendarNext?: IconType\n checkbox?: IconType\n close?: IconType\n confirmModal?: IconType\n delete?: IconType\n promptModal?: IconType\n waitingFileUploader?: 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 accordionIndicator: ChevronDown,\n avatar: UserFilled,\n calendar: Calendar,\n calendarPrev: ChevronLeft,\n calendarNext: ChevronRight,\n checkbox: CheckmarkIcon,\n close: Close,\n confirmModal: Information,\n delete: TrashCan,\n promptModal: Information,\n waitingFileUploader: CloudUpload,\n fileUploader: AnimatingUploadIcon,\n indeterminate: IndeterminateIcon,\n infoNotification: Information,\n successNotification: CheckmarkOutline,\n warningNotification: WarningAlt,\n dangerNotification: WarningFilled,\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\nexport type CheckboxIconProps = 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\nexport type IndeterminateIconProps = 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 { type CarbonIconProps } from '@cerberus/icons'\n\n/**\n * This module contains an animating icon to use for the FileStatus component.\n * @module\n */\n\nexport type AnimatingUploadIconProps = CarbonIconProps\n\nexport function AnimatingUploadIcon(props: AnimatingUploadIconProps) {\n return (\n <svg\n aria-hidden=\"true\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width={props.size ?? '1em'}\n height={props.size ?? '1em'}\n viewBox=\"0 0 24 24\"\n >\n <g\n fill=\"none\"\n stroke=\"currentColor\"\n strokeLinecap=\"square\"\n strokeLinejoin=\"round\"\n strokeWidth={1.5}\n >\n <path\n data-name=\"animating-trail\"\n strokeDasharray=\"2 4\"\n strokeDashoffset={6}\n d=\"M12 21c-4.97 0 -9 -4.03 -9 -9c0 -4.97 4.03 -9 9 -9\"\n >\n <animate\n attributeName=\"stroke-dashoffset\"\n dur=\"0.45s\"\n repeatCount=\"indefinite\"\n values=\"6;0\"\n ></animate>\n </path>\n\n <path\n data-name=\"half-circle\"\n strokeDasharray={32}\n strokeDashoffset={32}\n d=\"M12 3c4.97 0 9 4.03 9 9c0 4.97 -4.03 9 -9 9\"\n >\n <animate\n fill=\"freeze\"\n attributeName=\"stroke-dashoffset\"\n begin=\"0.075s\"\n dur=\"0.3s\"\n values=\"32;0\"\n ></animate>\n </path>\n\n <svg\n aria-hidden=\"true\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"0.8em\"\n height=\"0.8em\"\n x=\"27%\"\n y=\"27%\"\n viewBox=\"0 0 24 24\"\n >\n <polygon\n fill=\"currentColor\"\n stroke=\"currentColor\"\n strokeWidth={0.8}\n opacity=\"1\"\n points=\"3.7,6.7 7.5,2.9 7.5,15 8.5,15 8.5,2.9 12.3,6.7 13,6 8,1 3,6 \"\n >\n <animate\n fill=\"freeze\"\n attributeName=\"opacity\"\n values=\"1;0;1\"\n dur=\"2s\"\n repeatCount=\"indefinite\"\n ></animate>\n </polygon>\n </svg>\n </g>\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 { useMemo, type PropsWithChildren, type ReactNode } from 'react'\n\n/**\n * This module contains the Show component.\n * @module\n */\n\nexport interface ShowProps {\n /**\n * The condition to render memoized children or the fallback content.\n */\n when: boolean | null | undefined\n /**\n * The children to render when the condition is false.\n */\n fallback?: ReactNode\n}\n\n/**\n * Conditionally render a memoized version of the children or optional fallback\n * content.\n * @see https://cerberus.digitalu.design/react/show\n * @example\n * ```tsx\n * <Show when={isLoggedIn} fallback={<Navigate to=\"/login\" />}>\n * <Dashboard />\n * </Show>\n */\nexport function Show(props: PropsWithChildren<ShowProps>): ReactNode {\n const { when, children, fallback } = props\n const condition = useMemo(() => when ?? false, [when])\n\n return useMemo(() => {\n if (condition) return children\n return fallback ?? null\n }, [condition, children, fallback])\n}\n","import { Accordion as ArkAccordion } from '@ark-ui/react'\nimport { type AccordionVariantProps } from '@cerberus/styled-system/recipes'\nimport type { PropsWithChildren } from 'react'\nimport { Show } from './Show'\nimport {\n AccordionItem,\n AccordionItemContent,\n AccordionItemIndicator,\n AccordionItemTrigger,\n} from './Accordion'\nimport { css } from '@cerberus/styled-system/css'\n\n/**\n * This module contains an abstraction of the AccordionItem components.\n * @module\n */\n\nexport interface AccordionItemGroupBaseProps extends ArkAccordion.ItemProps {\n /**\n * The heading of the accordion item to open and close the content.\n */\n heading: string\n /**\n * The position of the arrow indicator.\n */\n indicatorPosition?: 'start' | 'end'\n}\nexport type AccordionItemGroupProps = AccordionItemGroupBaseProps &\n AccordionVariantProps\n\n/**\n * A grouped item for the Accordion component.\n * @definition [ARK docs](https://ark-ui.com/react/docs/components/accordion)\n * @definition [Accordion docs](https://cerberus.digitalu.design/react/accordion)\n * @example\n * ```tsx\n * <Accordion>\n * <AccordionItemGroup heading=\"Accordion Item 1\" value=\"one\">\n * Accordion Item 1 content\n * </AccordionItemGroup>\n * </Accordion>\n * ```\n */\nexport function AccordionItemGroup(\n props: PropsWithChildren<AccordionItemGroupProps>,\n) {\n const {\n size,\n heading,\n children,\n indicatorPosition = 'end',\n ...itemProps\n } = props\n const triggerStyles =\n indicatorPosition === 'start'\n ? {\n gap: 'md',\n justifyContent: 'flex-start',\n }\n : undefined\n\n return (\n <AccordionItem {...itemProps}>\n <AccordionItemTrigger className={css(triggerStyles)} size={size}>\n <Show when={indicatorPosition === 'start'}>\n <AccordionItemIndicator size={size} />\n </Show>\n\n {heading}\n\n <Show when={indicatorPosition === 'end'}>\n <AccordionItemIndicator size={size} />\n </Show>\n </AccordionItemTrigger>\n\n <AccordionItemContent size={size}>{children}</AccordionItemContent>\n </AccordionItem>\n )\n}\n","import {\n admonition,\n type AdmonitionVariantProps,\n} from '@cerberus/styled-system/recipes'\nimport { cx } from '@cerberus/styled-system/css'\nimport { hstack } from '@cerberus/styled-system/patterns'\nimport { $cerberusIcons } from '../config/defineIcons'\nimport type { HTMLAttributes, ReactNode } from 'react'\nimport { Avatar } from './Avatar'\nimport { Show } from './Show'\n\n/**\n * This module provides a set of components for creating admonitions.\n * @module Admonition\n */\n\nexport type AdmonitionProps = HTMLAttributes<HTMLDivElement> &\n AdmonitionVariantProps & {\n /**\n * One off replacement for the icon.\n */\n icon?: ReactNode\n }\n\n/**\n * The `Admonition` component is used to create an admonition.\n * @example\n * ```tsx\n * <Admonition palette=\"page\">\n * <AdmonitionHeading palette=\"page\">Page</AdmonitionHeading>\n * <AdmonitionDescription palette=\"page\">\n * This is a page admonition.\n * </AdmonitionDescription>\n * </Admonition>\n * ```\n * @see https://cerberus.digitalu.design/react/admonition\n */\nexport function Admonition(props: AdmonitionProps) {\n const { children, palette = 'page', usage, icon, ...nativeProps } = props\n return (\n <aside\n {...nativeProps}\n className={cx(\n nativeProps.className,\n hstack({\n gap: 'md',\n w: 'full',\n }),\n admonition({ palette, usage }).root,\n )}\n >\n <Show when={Boolean(icon)} fallback={<MatchAvatar palette={palette} />}>\n {icon}\n </Show>\n <div>{children}</div>\n </aside>\n )\n}\n\nexport type AdmonitionHeadingProps = HTMLAttributes<HTMLParagraphElement> &\n AdmonitionVariantProps\n\n/**\n * The `AdmonitionHeading` component is used to create a heading within an\n * admonition.\n * @example\n * ```tsx\n * <Admonition palette=\"page\">\n * <AdmonitionHeading palette=\"page\">Page</AdmonitionHeading>\n * <AdmonitionDescription palette=\"page\">\n * This is a page admonition.\n * </AdmonitionDescription>\n * </Admonition>\n * ```\n * @see https://cerberus.digitalu.design/react/admonition\n */\nexport function AdmonitionHeading(props: AdmonitionHeadingProps) {\n const { palette, usage, ...nativeProps } = props\n return (\n <p\n {...nativeProps}\n className={cx(\n nativeProps.className,\n admonition({ palette, usage }).heading,\n )}\n />\n )\n}\n\nexport type AdmonitionDescriptionProps = HTMLAttributes<HTMLParagraphElement> &\n AdmonitionVariantProps\n\n/**\n * The `AdmonitionDescription` component is used to create a description within\n * an admonition.\n * @example\n * ```tsx\n * <Admonition palette=\"page\">\n * <AdmonitionHeading palette=\"page\">Page</AdmonitionHeading>\n * <AdmonitionDescription palette=\"page\">\n * This is a page admonition.\n * </AdmonitionDescription>\n * </Admonition>\n * ```\n * @see https://cerberus.digitalu.design/react/admonition\n */\nexport function AdmonitionDescription(props: AdmonitionDescriptionProps) {\n const { palette, usage, ...nativeProps } = props\n return (\n <p\n {...nativeProps}\n className={cx(\n nativeProps.className,\n admonition({ palette, usage }).description,\n )}\n />\n )\n}\n\n// Private components\n\ntype MatchAvatarProps = AdmonitionVariantProps\n\nfunction MatchAvatar(props: MatchAvatarProps) {\n const {\n infoNotification: InfoIcon,\n successNotification: SuccessIcon,\n warningNotification: WarningIcon,\n dangerNotification: DangerIcon,\n } = $cerberusIcons\n switch (props.palette) {\n case 'page':\n return (\n <Avatar\n gradient=\"charon-light\"\n ariaLabel=\"\"\n icon={<InfoIcon />}\n size=\"sm\"\n src=\"\"\n />\n )\n case 'info':\n return (\n <Avatar\n gradient=\"amphiaraus-dark\"\n ariaLabel=\"\"\n icon={<InfoIcon />}\n size=\"sm\"\n src=\"\"\n />\n )\n case 'success':\n return (\n <Avatar\n gradient=\"thanatos-dark\"\n ariaLabel=\"\"\n icon={<SuccessIcon />}\n size=\"sm\"\n src=\"\"\n />\n )\n case 'warning':\n return (\n <Avatar\n gradient=\"asphodel-light\"\n ariaLabel=\"\"\n icon={<WarningIcon />}\n size=\"sm\"\n src=\"\"\n />\n )\n case 'danger':\n return (\n <Avatar\n gradient=\"hades-light\"\n ariaLabel=\"\"\n icon={<DangerIcon />}\n size=\"sm\"\n src=\"\"\n />\n )\n\n default:\n throw new Error('Unsupported admonition palette')\n }\n}\n","import { css, cx } from '@cerberus/styled-system/css'\nimport { circle } from '@cerberus/styled-system/patterns'\nimport {\n avatar,\n type AvatarVariantProps,\n} from '@cerberus/styled-system/recipes'\nimport { $cerberusIcons } from '../config/defineIcons'\nimport type { HtmlHTMLAttributes, ReactNode } from 'react'\nimport { Show } from './Show'\n\n/**\n * This module contains the Avatar component.\n * @module\n */\n\nexport type SharedAvatarProps = {\n /**\n * An optional icon to show when no src or ariaLabel is provided.\n */\n icon?: ReactNode\n /**\n * The size of the avatar.\n */\n width?: number\n /**\n * The size of the avatar.\n */\n height?: number\n}\nexport type AvatarImageProps = HtmlHTMLAttributes<HTMLImageElement> &\n SharedAvatarProps & {\n /**\n * The aria-label for the avatar needed for accessibility.\n */\n ariaLabel: string\n /**\n * An optional element to replace the image. Recommended for Next.js Image component.\n */\n as?: never\n /**\n * The source of the image.\n */\n src: string\n }\nexport type AvatarAsProps = SharedAvatarProps & {\n /**\n * An optional element to replace the image. Recommended for Next.js Image component.\n */\n as: ReactNode\n /**\n * The aria-label for the avatar needed for accessibility.\n */\n ariaLabel?: never\n /**\n * The source of the image.\n */\n src?: never\n}\n\nexport type AvatarProps = (HtmlHTMLAttributes<HTMLDivElement> &\n AvatarVariantProps) &\n (AvatarImageProps | AvatarAsProps)\n\n/**\n * 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.\n * @see https://cerberus.digitalu.design/react/avatar\n * @example\n * ```tsx\n * <Avatar\n * ariaLabel=\"Protector Cerberus\"\n * src=\"https://cerberus.digitalu.design/logo.svg\"\n * />\n * ```\n */\nexport function Avatar(props: AvatarProps) {\n const {\n ariaLabel,\n as,\n gradient,\n size,\n src,\n width,\n height,\n icon,\n ...nativeProps\n } = props\n const { avatar: AvatarIcon } = $cerberusIcons\n const initials = (ariaLabel || '')\n .split(' ')\n .map((word) => word[0])\n .join('')\n .slice(0, 2)\n\n return (\n <div\n {...nativeProps}\n className={cx(\n nativeProps.className,\n avatar({ gradient, size }),\n circle(),\n )}\n >\n <Show\n when={Boolean(src) || Boolean(as)}\n fallback={\n <Show\n when={Boolean(initials)}\n fallback={\n <Show\n when={Boolean(icon)}\n fallback={\n <AvatarIcon\n size={iconSizeMap[size as keyof typeof iconSizeMap]}\n />\n }\n >\n {icon}\n </Show>\n }\n >\n {initials}\n </Show>\n }\n >\n <Show\n when={Boolean(as)}\n fallback={\n <img\n alt={props.ariaLabel}\n className={css({\n h: 'full',\n objectFit: 'cover',\n w: 'full',\n })}\n decoding=\"async\"\n loading=\"lazy\"\n src={src}\n height={height}\n width={width}\n />\n }\n >\n {as}\n </Show>\n </Show>\n </div>\n )\n}\n\nconst iconSizeMap = {\n xs: 16,\n sm: 16,\n md: 20,\n lg: 34,\n xl: 32,\n '2xl': 32,\n '3xl': 32,\n '4xl': 32,\n}\n","import type { ButtonHTMLAttributes } from 'react'\nimport { cx } from '@cerberus/styled-system/css'\nimport {\n button,\n type ButtonVariantProps,\n} from '@cerberus/styled-system/recipes'\n\n/**\n * This module contains the Button component.\n * @module\n */\n\nexport type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> &\n ButtonVariantProps\n\n/**\n * A component that allows the user to perform actions\n * @see https://cerberus.digitalu.design/react/button\n */\nexport function Button(props: ButtonProps): JSX.Element {\n const { palette, usage, shape, ...nativeProps } = props\n return (\n <button\n {...nativeProps}\n className={cx(\n nativeProps.className,\n button({\n palette,\n usage,\n shape,\n }),\n )}\n />\n )\n}\n","'use client'\n\nimport {\n checkbox,\n type CheckboxVariantProps,\n} from '@cerberus/styled-system/recipes'\nimport { vstack } from '@cerberus/styled-system/patterns'\nimport { cx } from '@cerberus/styled-system/css'\nimport type { InputHTMLAttributes } from 'react'\nimport { Show } from './Show'\nimport { useFieldContext } from '../context/field'\nimport { $cerberusIcons } from '../config/defineIcons'\n\n/**\n * This module contains the Checkbox component.\n * @module\n */\n\nexport type CheckboxProps = CheckboxVariantProps &\n Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'id'> & {\n /**\n * The id of the FieldMessage element describing the Checkbox.\n */\n describedBy?: string\n /**\n * The unique identifier for the checkbox. Required for accessibility.\n */\n id: string\n /**\n * Used to display a mixed checked state.\n * @description [ARIA Mixed State](https://www.w3.org/WAI/ARIA/apg/patterns/checkbox/examples/checkbox-mixed/)\n */\n mixed?: boolean\n }\n\n/**\n * Checkbox component\n * @definition [ARIA Target Size](https://www.w3.org/WAI/WCAG21/Understanding/target-size.html#:~:text=Understanding%20SC%202.5.,%3ATarget%20Size%20(Level%20AAA)&text=The%20size%20of%20the%20target,Equivalent)\n * @definition [ARIA Forms](https://www.a11yproject.com/checklist/#forms)\n * @see https://cerberus.digitalu.design/react/checkbox\n * @example\n * ```tsx\n * <Field>\n * <Checkbox id=\"legal\" checked={checked.legal} onChange={handleChange} />\n * </Field>\n * ```\n */\nexport function Checkbox(props: CheckboxProps) {\n const { describedBy, size, checked, mixed, ...nativeProps } = props\n const { invalid, ...fieldStates } = useFieldContext()\n const styles = checkbox({ size })\n const { checkbox: CheckIcon, indeterminate: IndeterminateIcon } =\n $cerberusIcons\n\n return (\n <div\n className={cx(\n styles.root,\n vstack({\n gap: '0',\n justify: 'center',\n }),\n )}\n >\n <input\n {...nativeProps}\n {...fieldStates}\n {...(describedBy && { 'aria-describedby': describedBy })}\n {...(invalid && { 'aria-invalid': true })}\n {...(mixed && { 'aria-checked': 'mixed' })}\n className={cx('peer', nativeProps.className, styles.input)}\n type=\"checkbox\"\n />\n <Show when={checked && !mixed}>\n <span className={styles.icon}>\n <CheckIcon />\n </span>\n </Show>\n <Show when={mixed}>\n <span className={styles.icon}>\n <IndeterminateIcon />\n </span>\n </Show>\n </div>\n )\n}\n","'use client'\n\nimport {\n createContext,\n useContext,\n useMemo,\n type PropsWithChildren,\n} from 'react'\n\n/**\n * This module provides a context and hook for the field.\n * @module Field\n */\n\nexport interface FieldContextValue {\n /**\n * Whether the field is disabled.\n * @description [Moz Input Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attributes)\n */\n disabled?: boolean\n /**\n * Whether the field is read-only.\n */\n readOnly?: boolean\n /**\n * Whether the field is required.\n */\n required?: boolean\n /**\n * Whether the field is invalid.\n */\n invalid?: boolean\n}\n\nconst FieldContext = createContext<FieldContextValue | null>(null)\n\n/**\n * Provides the field state for a all related components used within a group.\n * @see https://cerberus.digitalu.design/react/input\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\n/**\n * Used to access the field context.\n * @returns The field context.\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","'use client'\n\nimport { cq } from '@cerberus/styled-system/patterns'\nimport { css } from '@cerberus/styled-system/css'\nimport type { SVGProps } from 'react'\nimport { Show } from './Show'\n\n/**\n * This module contains the CircularProgress component.\n * @module\n */\n\nexport interface CircularProgressProps extends SVGProps<SVGSVGElement> {\n /**\n * A unique identifier for the progress bar. Required for accessibility.\n */\n id: string\n /**\n * A description label for the progress bar. Required for accessibility.\n */\n label: string\n /**\n * The current value of the CircularProgress\n */\n now: number\n /**\n * The title of the CircularProgress for a11y\n */\n title: string\n /**\n * What is shown below the now value (default: 'Done')\n */\n syntax?: string\n /**\n * The background style of the CircularProgress\n */\n bgStyle?: 'filled' | 'transparent'\n}\n\n/**\n * The CircularProgress component is used to display a loading indicator.\n * @param props - SVG element attributes\n * @param props.now - The current value of the CircularProgress\n * @param props.title - The title of the CircularProgress for a11y\n * @param props.label - What is shown below the now value (default: 'Done')\n * @see https://cerberus.digitalu.design/react/progress-indicators\n * @example\n * ```tsx\n * <CircularProgress now={24} title=\"Course completion\" label=\"done\" />\n * ```\n */\nexport function CircularProgress(props: CircularProgressProps) {\n const strokeW: number = 14\n const radius = `calc(50% * (1 - ${strokeW}/100))`\n const status: string = props.syntax ?? 'Done'\n const now: number = props.now >= 100 ? 100 : props.now\n const bgStyle: string = props.bgStyle ?? 'filled'\n\n return (\n <div\n id={props.id}\n aria-label={props.label}\n aria-valuemin={0}\n aria-valuemax={100}\n aria-valuenow={now}\n className={cq({\n alignSelf: 'stretch',\n flex: 1,\n m: '4px',\n position: 'relative',\n })}\n role=\"progressbar\"\n >\n <svg\n data-complete={now === 100}\n className={css({\n display: 'block',\n rounded: 'full',\n transition: 'all 0.5s ease',\n })}\n fill=\"none\"\n strokeLinecap=\"round\"\n strokeWidth={strokeW}\n viewBox=\"0 0 100 100\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <title>{props.title}</title>\n <desc>{`${now}% ${status}`}</desc>\n <defs>\n <linearGradient id=\"gradient\">\n <stop\n offset=\"0%\"\n stopColor=\"var(--cerberus-colors-data-viz-progress-start)\"\n />\n <stop\n offset=\"100%\"\n stopColor=\"var(--cerberus-colors-data-viz-progress-end)\"\n />\n </linearGradient>\n </defs>\n\n <Show when={bgStyle === 'filled'}>\n <circle\n className={css({\n fill: 'page.surface.initial',\n })}\n cx=\"50%\"\n cy=\"50%\"\n r={`calc(50% * (1 - ${strokeW}/100))`}\n pathLength=\"100\"\n />\n </Show>\n <circle\n className={css({\n stroke: 'page.bg.100',\n })}\n cx=\"50%\"\n cy=\"50%\"\n r={radius}\n pathLength=\"100\"\n />\n <circle\n data-complete={now === 100}\n className={css({\n stroke: 'url(#gradient)',\n transition: 'stroke-dashoffset, stroke 0.5s ease',\n _isComplete: {\n stroke: 'success.bg.initial',\n },\n })}\n cx=\"50%\"\n cy=\"50%\"\n fill=\"none\"\n r={radius}\n pathLength=\"100\"\n strokeDasharray=\"100\"\n strokeDashoffset={100 - now}\n transform=\"rotate(-90 50 50)\"\n />\n\n <g>\n <text\n className={css({\n fill: 'page.text.initial',\n fontFamily: 'mono',\n textStyle: '1.25rem',\n })}\n x=\"50%\"\n y=\"47%\"\n dominantBaseline=\"middle\"\n textAnchor=\"middle\"\n >\n {now}%\n </text>\n <text\n className={css({\n fill: 'page.text.100',\n fontSize: '0.5rem',\n fontWeight: 600,\n })}\n x=\"50%\"\n y=\"59%\"\n dominantBaseline=\"middle\"\n textAnchor=\"middle\"\n >\n {status}\n </text>\n </g>\n </svg>\n </div>\n )\n}\n","'use client'\n\nimport {\n DatePicker as ArkDP,\n type DatePickerContentProps,\n type DatePickerInputProps,\n type DatePickerRootProps,\n type DatePickerViewProps,\n // type DateValue,\n} from '@ark-ui/react'\nimport { Portal } from './Portal'\n// import { useCallback } from 'react'\nimport { datePicker } from '@cerberus/styled-system/recipes'\nimport { cx } from '@cerberus/styled-system/css'\nimport { useFieldContext } from '../context/field'\nimport {\n DatePickerTrigger,\n DatePickerView,\n DatePickerContext,\n DatePickerViewControlGroup,\n DatePickerTable,\n DatePickerTableHeader,\n DatePickerTableCellTrigger,\n DatePickerTableCell,\n} from './DatePicker.server'\n// import { formatISOToMilitary } from '../hooks/useDate'\n\n/**\n * This module contains the DatePicker client family components.\n * @module DatePicker:client\n */\n\n// We are not exposing this to the public API\nconst datePickerStyles = datePicker()\n\n/**\n * The main context provider for the DatePicker family components.\n * @definition [Date Picker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <Field>\n * <DatePicker name=\"start_date\">\n * <DatePickerLabel>Start date</DatePickerLabel>\n * <DatePickerInput />\n * <DatePickerCalendar />\n * </DatePicker>\n * </Field>\n * ```\n */\nexport function DatePicker(props: DatePickerRootProps) {\n const states = useFieldContext()\n\n // TODO: Remove this once the bug is fixed: https://github.com/chakra-ui/ark/issues/3112\n\n // There is a bug with the Root component that causes random date selection\n // onBlur after the first selection if the format prop is used.\n // const handleFormat = useCallback((value: DateValue) => {\n // return formatISOToMilitary(value.toString())\n // }, [])\n\n return (\n <ArkDP.Root\n {...props}\n {...states}\n positioning={{\n placement: 'bottom-start',\n }}\n />\n )\n}\n\n/**\n * The input component for the DatePicker.\n * @definition [Date Picker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <Field>\n * <DatePicker name=\"start_date\">\n * <DatePickerLabel>Start date</DatePickerLabel>\n * <DatePickerInput />\n * <DatePickerCalendar />\n * </DatePicker>\n * </Field>\n * ```\n */\nexport function DatePickerInput(props: DatePickerInputProps) {\n const { invalid, ...fieldStates } = useFieldContext()\n return (\n <ArkDP.Control className={datePickerStyles.control}>\n <DatePickerTrigger />\n <ArkDP.Input\n {...props}\n {...fieldStates}\n {...(invalid && { 'aria-invalid': true })}\n className={cx(props.className, datePickerStyles.input)}\n placeholder={props.placeholder ?? 'DD MMM YYYY'}\n maxLength={11}\n />\n </ArkDP.Control>\n )\n}\n\n/**\n * The input component for the DatePicker that uses ranges.\n * @definition [Date Picker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <Field>\n * <DatePicker name=\"start_date\" selection=\"range\">\n * <DatePickerLabel>Start date</DatePickerLabel>\n * <RangePickerInput />\n * <DatePickerCalendar />\n * </DatePicker>\n * </Field>\n * ```\n */\nexport function RangePickerInput(props: DatePickerInputProps) {\n const { invalid, ...fieldStates } = useFieldContext()\n return (\n <ArkDP.Control data-range className={datePickerStyles.control}>\n <DatePickerTrigger />\n <ArkDP.Input\n {...props}\n {...fieldStates}\n {...(invalid && { 'aria-invalid': true })}\n data-range-input\n className={cx(props.className, datePickerStyles.input)}\n placeholder={props.placeholder ?? 'DD MMM YYYY'}\n maxLength={11}\n index={0}\n />\n <ArkDP.Input\n {...props}\n {...fieldStates}\n {...(invalid && { 'aria-invalid': true })}\n data-range-input\n data-range-end-input\n className={cx(props.className, datePickerStyles.input)}\n placeholder={props.placeholder ?? 'DD MMM YYYY'}\n maxLength={11}\n index={1}\n />\n </ArkDP.Control>\n )\n}\n\n/**\n * The content component for the DatePicker which contains the calendar.\n * @definition [Date Picker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <Field>\n * <DatePicker name=\"start_date\">\n * <DatePickerLabel>Start date</DatePickerLabel>\n * <DatePickerInput />\n * <DatePickerCalendar />\n * </DatePicker>\n * </Field>\n * ```\n */\nexport function DatePickerContent(props: DatePickerContentProps) {\n const { children, ...contentProps } = props\n return (\n <Portal>\n <ArkDP.Positioner className={datePickerStyles.positioner}>\n <ArkDP.Content\n {...contentProps}\n className={cx(contentProps.className, datePickerStyles.content)}\n >\n {children}\n </ArkDP.Content>\n </ArkDP.Positioner>\n </Portal>\n )\n}\n\n/**\n * The day view component for the DatePicker.\n * @definition [Date Picker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <Field>\n * <DatePicker name=\"start_date\">\n * <DatePickerLabel>Start date</DatePickerLabel>\n * <DatePickerInput />\n * <DatePickerCalendar />\n * </DatePicker>\n * </Field>\n * ```\n */\nexport function DatePickerDayView(props: Omit<DatePickerViewProps, 'view'>) {\n function isToday(date: ArkDP.DateValue): boolean {\n const today = new Date()\n const formatted = today.toISOString().split('T')[0]\n const arkDate = `${date.year}-${String(date.month).padStart(2, '0')}-${String(date.day).padStart(2, '0')}`\n return formatted === arkDate\n }\n\n function isPastDay(date: ArkDP.DateValue): boolean {\n const today = new Date()\n const arkDate = `${date.year}-${String(date.month).padStart(2, '0')}-${String(date.day).padStart(2, '0')}`\n return new Date(arkDate) < today\n }\n\n function getDayValue(date: ArkDP.DateValue): 'today' | 'past' | 'future' {\n if (isToday(date)) return 'today'\n if (isPastDay(date)) return 'past'\n return 'future'\n }\n\n return (\n <DatePickerView {...props} view=\"day\">\n <DatePickerContext>\n {(datePicker) => (\n <>\n <DatePickerViewControlGroup />\n\n <DatePickerTable>\n <ArkDP.TableHead>\n <ArkDP.TableRow>\n {datePicker.weekDays.map((weekDay, id) => (\n <DatePickerTableHeader key={id}>\n {weekDay.narrow}\n </DatePickerTableHeader>\n ))}\n </ArkDP.TableRow>\n </ArkDP.TableHead>\n\n <ArkDP.TableBody>\n {datePicker.weeks.map((week, id) => (\n <ArkDP.TableRow key={id}>\n {week.map((day, id) => (\n <DatePickerTableCell key={id} value={day}>\n <DatePickerTableCellTrigger\n data-date={getDayValue(day)}\n >\n {day.day}\n </DatePickerTableCellTrigger>\n </DatePickerTableCell>\n ))}\n </ArkDP.TableRow>\n ))}\n </ArkDP.TableBody>\n </DatePickerTable>\n </>\n )}\n </DatePickerContext>\n </DatePickerView>\n )\n}\n\n/**\n * The month view component for the DatePicker.\n * @definition [Date Picker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <Field>\n * <DatePicker name=\"start_date\">\n * <DatePickerLabel>Start date</DatePickerLabel>\n * <DatePickerInput />\n * <DatePickerCalendar />\n * </DatePicker>\n * </Field>\n * ```\n */\nexport function DatePickerMonthView(props: Omit<DatePickerViewProps, 'view'>) {\n return (\n <ArkDP.View {...props} view=\"month\">\n <ArkDP.Context>\n {(datePicker) => (\n <>\n <DatePickerViewControlGroup />\n\n <DatePickerTable>\n <ArkDP.TableBody>\n {datePicker\n .getMonthsGrid({ columns: 4, format: 'short' })\n .map((months, id) => (\n <ArkDP.TableRow key={id}>\n {months.map((month, id) => (\n <DatePickerTableCell key={id} value={month.value}>\n <DatePickerTableCellTrigger>\n {month.label}\n </DatePickerTableCellTrigger>\n </DatePickerTableCell>\n ))}\n </ArkDP.TableRow>\n ))}\n </ArkDP.TableBody>\n </DatePickerTable>\n </>\n )}\n </ArkDP.Context>\n </ArkDP.View>\n )\n}\n\n/**\n * The year view component for the DatePicker.\n * @definition [Date Picker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <Field>\n * <DatePicker name=\"start_date\">\n * <DatePickerLabel>Start date</DatePickerLabel>\n * <DatePickerInput />\n * <DatePickerCalendar />\n * </DatePicker>\n * </Field>\n * ```\n */\nexport function DatePickerYearView(props: Omit<DatePickerViewProps, 'view'>) {\n return (\n <ArkDP.View {...props} view=\"year\">\n <ArkDP.Context>\n {(datePicker) => (\n <>\n <DatePickerViewControlGroup />\n\n <DatePickerTable>\n <ArkDP.TableBody>\n {datePicker.getYearsGrid({ columns: 4 }).map((years, id) => (\n <ArkDP.TableRow key={id}>\n {years.map((year, id) => (\n <DatePickerTableCell key={id} value={year.value}>\n <DatePickerTableCellTrigger>\n {year.label}\n </DatePickerTableCellTrigger>\n </DatePickerTableCell>\n ))}\n </ArkDP.TableRow>\n ))}\n </ArkDP.TableBody>\n </DatePickerTable>\n </>\n )}\n </ArkDP.Context>\n </ArkDP.View>\n )\n}\n\n/**\n * An abstraction of the DatePicker content components that contain the\n * different calendar views and controls.\n * @definition [Date Picker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <Field>\n * <DatePicker name=\"start_date\">\n * <DatePickerLabel>Start date</DatePickerLabel>\n * <DatePickerInput />\n * <DatePickerCalendar />\n * </DatePicker>\n * </Field>\n * ```\n */\nexport function DatePickerCalendar() {\n return (\n <DatePickerContent>\n <DatePickerDayView />\n <DatePickerMonthView />\n <DatePickerYearView />\n </DatePickerContent>\n )\n}\n","import {\n Portal as ArkPortal,\n type PortalProps as ArkPortalProps,\n} from '@ark-ui/react'\n\n/**\n * This module is the Portal component.\n * @module\n */\n\nexport type PortalProps = ArkPortalProps\n\n/**\n * The Portal component is used to render children into a DOM node that exists outside the DOM hierarchy of the parent component.\n * @see https://cerberus.digitalu.design/react/portal\n * @definition [React Portal Docs](https://react.dev/reference/react-dom/createPortal)\n * @example\n * ```tsx\n * 'use client'\n *\n * import { Portal } from '@cerberus/react'\n *\n * function SomeFeatureWithinSSRPage() {\n * return (\n * <Portal>\n * <div>Portal Content outside of the React VDom tree</div>\n * </Portal>\n * )\n * }\n */\nexport const Portal = ArkPortal\n","import {\n DatePicker as ArkDP,\n type DatePickerLabelProps,\n type DatePickerTableCellProps,\n type DatePickerTableCellTriggerProps,\n type DatePickerTableHeaderProps,\n type DatePickerTableProps,\n type DatePickerTriggerProps,\n type DatePickerViewControlProps,\n} from '@ark-ui/react'\nimport { css, cx } from '@cerberus/styled-system/css'\nimport { datePicker, iconButton, label } from '@cerberus/styled-system/recipes'\nimport { $cerberusIcons } from '../config/defineIcons'\nimport { IconButton } from './IconButton'\nimport { Button } from './Button'\n\n/**\n * This module contains the DatePicker server family components.\n * @module DatePicker\n */\n\n// We are not exposing this to the public API\nconst datePickerStyles = datePicker()\n\n/**\n * The label component for the DatePicker.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <DatePickerLabel>\n * <DatePickerLabel.Label>...</DatePickerLabel.Label>\n * </DatePickerLabel>\n * ```\n */\nexport function DatePickerLabel(props: DatePickerLabelProps) {\n const { className, ...arkProps } = props\n return (\n <ArkDP.Label\n {...arkProps}\n className={cx(\n className,\n label({\n size: 'sm',\n }),\n )}\n />\n )\n}\n\n/**\n * The trigger component for the DatePicker which opens the calendar.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <DatePickerTrigger />\n * ```\n */\nexport function DatePickerTrigger(props: DatePickerTriggerProps) {\n const { calendar: CalendarIcon } = $cerberusIcons\n return (\n <ArkDP.Trigger\n {...props}\n className={cx(\n props.className,\n iconButton({\n size: 'sm',\n usage: 'ghost',\n }),\n datePickerStyles.trigger,\n )}\n >\n <CalendarIcon />\n </ArkDP.Trigger>\n )\n}\n\n/**\n * The control component for the DatePicker which wraps the triggers to switch\n * between calendar views.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <DatePickerViewControl>\n * <PrevTrigger />\n * <ViewTrigger />\n * <NextTrigger />\n * </DatePickerViewControl>\n * ```\n */\nexport function DatePickerViewControl(props: DatePickerViewControlProps) {\n return (\n <ArkDP.Control\n {...props}\n className={cx(props.className, datePickerStyles.viewControl)}\n />\n )\n}\n\n/**\n * An abstraction of the DatePicker control that contains the prev, view, and\n * next triggers which control the calendar output.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <DatePickerViewControlGroup />\n * ```\n */\nexport function DatePickerViewControlGroup(props: DatePickerViewControlProps) {\n const { calendarPrev: PrevIcon, calendarNext: NextIcon } = $cerberusIcons\n return (\n <DatePickerViewControl {...props}>\n <ArkDP.PrevTrigger asChild>\n <IconButton ariaLabel=\"Previous\" size=\"sm\">\n <PrevIcon />\n </IconButton>\n </ArkDP.PrevTrigger>\n\n <ArkDP.ViewTrigger asChild>\n <Button\n className={css({\n h: '2rem',\n paddingInline: 'md',\n })}\n shape=\"rounded\"\n size=\"sm\"\n usage=\"ghost\"\n >\n <ArkDP.RangeText />\n </Button>\n </ArkDP.ViewTrigger>\n\n <ArkDP.NextTrigger asChild>\n <IconButton ariaLabel=\"Next\" size=\"sm\">\n <NextIcon />\n </IconButton>\n </ArkDP.NextTrigger>\n </DatePickerViewControl>\n )\n}\n\n/**\n * The table component for the DatePicker.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <DatePickerTable />\n * ```\n */\nexport function DatePickerTable(props: DatePickerTableProps) {\n return (\n <ArkDP.Table\n {...props}\n className={cx(props.className, datePickerStyles.table)}\n />\n )\n}\n\n/**\n * The header component for the DatePicker table.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <DatePickerTableHeader />\n * ```\n */\nexport function DatePickerTableHeader(props: DatePickerTableHeaderProps) {\n return (\n <ArkDP.TableHeader\n {...props}\n className={cx(props.className, datePickerStyles.tableHeader)}\n />\n )\n}\n\n/**\n * The cell component for the DatePicker table.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <DatePickerTableCell />\n * ```\n */\nexport function DatePickerTableCell(props: DatePickerTableCellProps) {\n return (\n <ArkDP.TableCell\n {...props}\n className={cx(props.className, datePickerStyles.tableCell)}\n />\n )\n}\n\n/**\n * The cell component for the DatePicker table.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <DatePickerTableCell />\n * ```\n */\nexport function DatePickerTableCellTrigger(\n props: DatePickerTableCellTriggerProps,\n) {\n return (\n <ArkDP.TableCellTrigger\n {...props}\n className={cx(props.className, datePickerStyles.tableCellTrigger)}\n />\n )\n}\n\n/**\n * The view container which wraps the control and content components.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <DatePickerView />\n * ```\n */\nexport const DatePickerView = ArkDP.View\n\n/**\n * The context component for the DatePicker which provides the DatePicker state.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <DatePickerContext />\n * ```\n */\nexport const DatePickerContext = ArkDP.Context\n","import type { ButtonHTMLAttributes } from 'react'\nimport { cx } from '@cerberus/styled-system/css'\nimport {\n iconButton,\n type IconButtonVariantProps,\n} from '@cerberus/styled-system/recipes'\n\n/**\n * This module contains the Icon Button component.\n * @module\n */\n\nexport interface IconButtonRawProps\n extends ButtonHTMLAttributes<HTMLButtonElement> {\n /**\n * The aria-label attribute for the icon button.\n */\n ariaLabel: string\n}\nexport type IconButtonProps = IconButtonRawProps & IconButtonVariantProps\n\n/**\n * A component that allows the user to perform actions using an icon\n * @see https://cerberus.digitalu.design/react/icon-button\n */\nexport function IconButton(props: IconButtonProps): JSX.Element {\n const { ariaLabel, palette, usage, size, ...nativeProps } = props\n return (\n <button\n {...nativeProps}\n aria-label={ariaLabel ?? 'Icon Button'}\n className={cx(\n nativeProps.className,\n iconButton({\n palette,\n usage,\n size,\n }),\n )}\n />\n )\n}\n","'use client'\n\nimport { useDroppable, type UseDroppableArguments } from '@dnd-kit/core'\nimport { useId, type HtmlHTMLAttributes, type PropsWithChildren } from 'react'\n\nexport interface DroppableProps\n extends Omit<HtmlHTMLAttributes<HTMLDivElement>, 'id'>,\n UseDroppableArguments {\n /**\n * If the item has been dropped.\n */\n dropped?: boolean\n}\n\n/**\n * A Cerberus component is used to define a drop target for draggable elements.\n * @see https://dndkit.com/\n * @example\n * ```tsx\n * <Droppable id=\"dropzone\">\n * <Draggable id=\"draggable\">Drag me</Draggable>\n * </Droppable>\n * ```\n */\nexport function Droppable(props: PropsWithChildren<DroppableProps>) {\n const { dropped, id, disabled, data, resizeObserverConfig, ...nativeProps } =\n props\n const uuid = useId()\n const { isOver, setNodeRef } = useDroppable({\n data,\n disabled,\n id: id || uuid,\n resizeObserverConfig,\n })\n\n return (\n <div\n {...nativeProps}\n data-over={isOver}\n data-dropped={dropped}\n ref={setNodeRef}\n >\n {props.children}\n </div>\n )\n}\n","'use client'\n\nimport type { HTMLAttributes } from 'react'\nimport { cx } from '@cerberus/styled-system/css'\nimport {\n fieldMessage,\n type FieldMessageVariantProps,\n} from '@cerberus/styled-system/recipes'\nimport { useFieldContext } from '../context/field'\n\n/**\n * This module contains the FieldMessage component.\n * @module\n */\nexport interface FieldMessageBaseProps\n extends HTMLAttributes<HTMLParagraphElement> {\n /**\n * 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.\n *\n * @example For help messages: `help:field_id`\n * @example For error messages: `error:field_id`\n */\n id: string\n}\nexport type FieldMessageProps = FieldMessageBaseProps & FieldMessageVariantProps\n\n/**\n * A component that provides feedback about the field.\n * @see https://cerberus.digitalu.design/react/field-message\n * @example\n * ```tsx\n * <Field>\n * <Label htmlFor=\"first_name\">First Name</Label>\n * <Input aria-describedBy=\"help:first_name\" id=\"first_name\" type=\"text\" />\n * <FieldMessage id=\"help:first_name\">\n * This will only be used in your account information.\n * </FieldMessage>\n * </Field>\n * ```\n */\nexport function FieldMessage(props: FieldMessageProps) {\n const { invalid } = useFieldContext()\n return (\n <small\n {...props}\n {...(invalid && { 'aria-invalid': true })}\n className={cx(props.className, fieldMessage())}\n />\n )\n}\n","'use client'\n\nimport { createContext, useContext, type PropsWithChildren } from 'react'\n\n/**\n * This module provides a context and hook for feature flags.\n * @module\n */\n\nexport interface FeatureFlagValue {\n [key: string]: boolean\n}\n\nconst FeatureFlagContext = createContext<FeatureFlagValue | null>(null)\n\nexport interface FeatureFlagProviderProps {\n flags: FeatureFlagValue\n}\n\n/**\n * Provides feature flags to the application.\n * @see https://cerberus.digitalu.design/react/feature-flags\n * @example\n * ```tsx\n * // This should be a JSON file or a server response.\n * const flags = {\n * featureOne: true,\n * featureTwo: false\n * }\n *\n * // Wrap the Provider around the root of your application.\n * <FeatureFlags flags={flags}>\n * <FeatureFlag flag=\"featureOne\">\n * This is visible.\n * </FeatureFlag>\n * <FeatureFlag flag=\"featureTwo\">\n * This is hidden.\n * </FeatureFlag>\n * </FeatureFlags>\n * ```\n */\nexport function FeatureFlags(\n props: PropsWithChildren<FeatureFlagProviderProps>,\n) {\n return (\n <FeatureFlagContext.Provider value={props.flags}>\n {props.children}\n </FeatureFlagContext.Provider>\n )\n}\n\n/**\n * Used to retrieve the context of the FeatureFlags provider.\n */\nexport function useFeatureFlags(key: string): boolean {\n const context = useContext(FeatureFlagContext)\n if (context === null) {\n throw new Error(\n 'useFeatureFlag must be used within a FeatureFlags Provider',\n )\n }\n return context[key] ?? false\n}\n","'use client'\n\nimport type { PropsWithChildren } from 'react'\nimport { useFeatureFlags } from '../context/feature-flags'\nimport { Show } from './Show'\n\nexport interface FeatureFlagProps {\n /**\n * The name of the feature flag to check.\n */\n flag: string\n}\n\n/**\n * A component that allows you to show or hide content based on a feature flag.\n * @see https://cerberus.digitalu.design/react/feature-flags\n */\nexport function FeatureFlag(props: PropsWithChildren<FeatureFlagProps>) {\n const showContent = useFeatureFlags(props.flag)\n return <Show when={showContent}>{props.children}</Show>\n}\n","'use client'\n\nimport { css, cx } from '@cerberus/styled-system/css'\nimport type { FieldsetHTMLAttributes } from 'react'\nimport { useFieldContext } from '../context/field'\n\n/**\n * This module contains the Fieldset component.\n * @module Fieldset\n */\n\nexport type FieldsetProps = FieldsetHTMLAttributes<HTMLFieldSetElement>\n\n/**\n * A component to group related elements in a form for accessibility.\n * @memberof Field\n * @see https://cerberus.digitalu.com/react/fieldset\n * @description [A11y Form Checklist](https://www.a11yproject.com/checklist/#forms)\n * @description [MDN Web Docs: Fieldset](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/fieldset)\n * @example\n * ```tsx\n * import { Fieldset, Legend, Field, Radio, Label } from '@cerberus/react'\n * import { Hstack } from '@cerberus/styled-system/jsx'\n *\n * function SomeForm() {\n * return (\n * <form>\n * <Fieldset>\n * <Legend>Do you like cats?</Legend>\n * <Hstack>\n * <Field>\n * <Radio id=\"yes\" name=\"cats\" value=\"yes\" />\n * <Label htmlFor=\"yes\">Yes</Label>\n * </Field>\n * </Hstack>\n * <Hstack>\n * <Field>\n * <Radio id=\"no\" name=\"cats\" value=\"no\" />\n * <Label htmlFor=\"no\">No</Label>\n * </Field>\n * </Hstack>\n * </Fieldset>\n * </form>\n * )\n * }\n */\nexport function Fieldset(props: FieldsetProps) {\n const { invalid, ...formState } = useFieldContext()\n\n return (\n <fieldset\n {...props}\n {...formState}\n {...(invalid && { 'aria-invalid': true })}\n className={cx(\n props.className,\n css({\n border: 'none',\n pt: 2,\n margin: 0,\n }),\n )}\n />\n )\n}\n","import { cx } from '@cerberus/styled-system/css'\nimport { label, type LabelVariantProps } from '@cerberus/styled-system/recipes'\nimport type { LabelProps } from './Label'\n\n/**\n * This module contains the FieldsetLabel component.\n * @module FieldsetLabel\n */\n\nexport type FieldsetLabelProps = LabelProps & LabelVariantProps\n\n/**\n * Used for labeling inputs that are children of a Fieldset group.\n * @memberof Fieldset\n * @see https://cerberus.digitalu.design/react/fieldset\n * @definition [ARIA Forms](https://www.a11yproject.com/checklist/#forms)\n * @example\n * ```tsx\n * import { Fieldset, Legend, Field, Radio, Label } from '@cerberus/react'\n * import { Hstack } from '@cerberus/styled-system/jsx'\n *\n * function SomeForm() {\n * return (\n * <form>\n * <Fieldset>\n * <Legend>Do you like cats?</Legend>\n * <Hstack>\n * <Field>\n * <Radio id=\"yes\" name=\"cats\" value=\"yes\" />\n * <FieldsetLabel htmlFor=\"yes\">Yes</FieldsetLabel>\n * </Field>\n * </Hstack>\n * <Hstack>\n * <Field>\n * <Radio id=\"no\" name=\"cats\" value=\"no\" />\n * <FieldsetLabel htmlFor=\"no\">No</FieldsetLabel>\n * </Field>\n * </Hstack>\n * </Fieldset>\n * </form>\n * )\n * }\n * ```\n */\nexport function FieldsetLabel(props: FieldsetLabelProps) {\n const { size, usage, ...nativeProps } = props\n return (\n <label\n {...nativeProps}\n className={cx(\n nativeProps.className,\n label({\n size,\n usage,\n }),\n )}\n />\n )\n}\n","'use client'\n\nimport {\n useCallback,\n useMemo,\n type HTMLAttributes,\n type MouseEvent,\n} from 'react'\nimport {\n fileStatus,\n type FileStatusVariantProps,\n} from '@cerberus/styled-system/recipes'\nimport { css, cx } from '@cerberus/styled-system/css'\nimport { hstack, vstack } from '@cerberus/styled-system/patterns'\nimport { $cerberusIcons } from '../config/defineIcons'\nimport { Field } from '../context/field'\nimport { FieldMessage } from './FieldMessage'\nimport { ProgressBar, type ProgressBarProps } from './ProgressBar'\nimport { IconButton } from './IconButton'\nimport { Avatar } from './Avatar'\n\n/**\n * This module contains the FileStatus component.\n * @module\n */\n\n/**\n * The available values of the fileStatus helper Object.\n * @example\n * ```tsx\n * import { fileStatus } from '@cerberus/react'\n * processStatus.TODO // 'todo'\n * ```\n */\nexport type FileStatusKey = (typeof processStatus)[keyof typeof processStatus]\n\n/**\n * The actions that can be performed on a file.\n */\nexport type FileStatusActions = 'cancel' | 'retry' | 'delete'\nexport interface FileBaseStatusProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'onClick'> {\n /**\n * A unique identifier for the file status. Required for accessibility.\n */\n id: string\n /**\n * The name of the file.\n */\n file: string\n /**\n * The percentage of the file that has been processed.\n */\n now: ProgressBarProps['now']\n /**\n * The status of the file.\n */\n status: processStatus\n /**\n * The action to perform on the file when a user clicks the\n * button located at the end of the status card.\n * @param status - The status of the file.\n * @param e - The event object.\n * @example\n * ```tsx\n * <FileStatus file=\"file.txt\" now={0} status={processStatus.TODO} action={(status, e) => console.log(status, e)} />\n * ```\n * @default () => {}\n */\n onClick: (status: FileStatusActions, e: MouseEvent<HTMLButtonElement>) => void\n}\nexport type FileStatusProps = FileBaseStatusProps & FileStatusVariantProps\n\n/**\n * A helper object to represent the status of a file.\n * @example\n * ```tsx\n * import { fileStatus } from '@cerberus/react'\n * processStatus.TODO // 'todo'\n * ```\n */\nexport const enum processStatus {\n TODO = 'todo',\n PROCESSING = 'processing',\n DONE = 'done',\n ERROR = 'error',\n}\n\n/**\n * A component that displays the status of a file during file processing.\n * @see https://cerberus.digitalu.design/react/file-uploader\n * @example\n * ```tsx\n * <FileStatus file=\"file.txt\" now={0} status={processStatus.TODO} action={(status, e) => console.log(status, e)} />\n * ```\n */\nexport function FileStatus(props: FileStatusProps) {\n const { file, now, status, onClick, ...nativeProps } = props\n const actionLabel = useMemo(() => getStatusActionLabel(status), [status])\n const palette = useMemo(() => getPalette(status), [status])\n const modalIconPalette = useMemo(() => getModalIconPalette(status), [status])\n const styles = useMemo(() => {\n switch (status) {\n case processStatus.TODO:\n return fileStatus({ status: 'todo' })\n case processStatus.PROCESSING:\n return fileStatus({ status: 'processing' })\n case processStatus.DONE:\n return fileStatus({ status: 'done' })\n case processStatus.ERROR:\n return fileStatus({ status: 'error' })\n default:\n return fileStatus()\n }\n }, [status])\n\n const handleClick = useCallback(\n (e: MouseEvent<HTMLButtonElement>) => {\n const actionStatus = getStatusActionLabel(\n status,\n ).toLocaleLowerCase() as FileStatusActions\n onClick(actionStatus, e)\n },\n [onClick],\n )\n\n return (\n <div\n {...nativeProps}\n className={cx(nativeProps.className, styles.root, hstack())}\n >\n <Avatar\n ariaLabel=\"\"\n gradient={modalIconPalette}\n icon={<MatchFileStatusIcon size={24} status={status} />}\n src=\"\"\n />\n\n <div\n className={vstack({\n alignItems: 'flex-start',\n gap: '0.12rem',\n w: 'full',\n })}\n >\n <small\n className={css({\n color: 'page.text.initial',\n textStyle: 'label-sm',\n })}\n >\n {file}\n </small>\n <ProgressBar\n id={props.id}\n label=\"File upload status\"\n now={now}\n size=\"sm\"\n />\n <Field invalid={modalIconPalette === 'hades-dark'}>\n <FieldMessage\n className={css({\n color: 'page.text.100',\n })}\n id={`help:${file}`}\n >\n <MatchFileStatusText status={status} now={now} />\n </FieldMessage>\n </Field>\n </div>\n\n <IconButton\n ariaLabel={actionLabel}\n onClick={handleClick}\n palette={palette}\n size=\"sm\"\n >\n <MatchStatusAction status={status} />\n </IconButton>\n </div>\n )\n}\n\ninterface FileStatusElProps {\n status: FileStatusProps['status']\n size?: 16 | 20 | 24 | 32\n now?: number\n}\n\nfunction MatchFileStatusIcon(props: FileStatusElProps) {\n const {\n waitingFileUploader: TodoIcon,\n fileUploader: FileUploaderIcon,\n invalidAlt: InvalidIcon,\n successNotification: DoneIcon,\n } = $cerberusIcons\n\n switch (props.status) {\n case processStatus.TODO:\n return <TodoIcon size={props.size} />\n case processStatus.PROCESSING:\n return <FileUploaderIcon size={props.size} />\n case processStatus.DONE:\n return <DoneIcon size={props.size} />\n case processStatus.ERROR:\n return <InvalidIcon size={props.size} />\n default:\n throw new Error('Unknown status')\n }\n}\n\nfunction MatchFileStatusText(props: FileStatusElProps) {\n switch (props.status) {\n case processStatus.TODO:\n return 'Waiting to upload'\n case processStatus.PROCESSING:\n return `${props.now}% Complete`\n case processStatus.DONE:\n return 'File uploaded successfully'\n case processStatus.ERROR:\n return 'There was an error uploading the file'\n default:\n throw new Error('Invalid status')\n }\n}\n\nfunction MatchStatusAction(props: FileStatusElProps) {\n const { close: CloseIcon, redo: RedoIcon, delete: TrashIcon } = $cerberusIcons\n switch (props.status) {\n case processStatus.TODO:\n case processStatus.PROCESSING:\n return <CloseIcon />\n case processStatus.ERROR:\n return <RedoIcon />\n case processStatus.DONE:\n return <TrashIcon />\n default:\n throw new Error('Invalid status')\n }\n}\n\nfunction getStatusActionLabel(status: FileStatusKey) {\n switch (status) {\n case processStatus.TODO:\n case processStatus.PROCESSING:\n return 'Cancel'\n case processStatus.ERROR:\n return 'Retry'\n case processStatus.DONE:\n return 'Delete'\n default:\n return ''\n }\n}\n\nfunction getPalette(status: FileStatusKey) {\n switch (status) {\n case processStatus.TODO:\n case processStatus.PROCESSING:\n return 'danger'\n case processStatus.ERROR:\n return 'action'\n case processStatus.DONE:\n return 'danger'\n default:\n return 'action'\n }\n}\n\nfunction getModalIconPalette(status: FileStatusKey) {\n switch (status) {\n case processStatus.TODO:\n case processStatus.PROCESSING:\n return 'charon-light'\n case processStatus.ERROR:\n return 'hades-dark'\n case processStatus.DONE:\n return 'thanatos-light'\n default:\n return 'charon-light'\n }\n}\n","import { cx } from '@cerberus/styled-system/css'\nimport {\n progressBar,\n type ProgressBarVariantProps,\n} from '@cerberus/styled-system/recipes'\nimport type { HTMLAttributes } from 'react'\n\n/**\n * This module contains the ProgressBar component.\n * @module\n */\n\nexport type ProgressBarBaseProps = HTMLAttributes<HTMLDivElement>\nexport type NonIndeterminateProgressBarProps = {\n /**\n * A unique identifier for the progress bar. Required for accessibility.\n */\n id: string\n /**\n * A description label for the progress bar. Required for accessibility.\n */\n label: string\n /**\n * The state of the progress bar.\n */\n indeterminate?: never\n /**\n * The current value of the progress bar.\n */\n now: number\n}\nexport type IndeterminateProgressBarProps = {\n /**\n * A unique identifier for the progress bar. Required for accessibility.\n */\n id: string\n /**\n * A description label for the progress bar. Required for accessibility.\n */\n label: string\n /**\n * The state of the progress bar.\n */\n indeterminate?: true\n /**\n * The current value of the progress bar.\n */\n now?: never\n}\nexport type ProgressBarProps = ProgressBarBaseProps &\n ProgressBarVariantProps &\n (NonIndeterminateProgressBarProps | IndeterminateProgressBarProps)\n\n/**\n * The ProgressBar component is used to display the progress of a task.\n * @see https://cerberus.digitalu.design/react/progress-indicators\n * @example\n * ```tsx\n * <ProgressBar value={75} />\n * ```\n */\nexport function ProgressBar(props: ProgressBarProps) {\n const { indeterminate, size, usage, now, label, ...nativeProps } = props\n const styles = progressBar({ size, usage })\n const nowClamped = Math.min(100, Math.max(0, now || 0))\n const width = {\n width: indeterminate ? '50%' : `${nowClamped}%`,\n }\n\n return (\n <div\n {...nativeProps}\n aria-label={label}\n aria-valuemin={0}\n aria-valuemax={100}\n aria-valuenow={indeterminate ? 0 : nowClamped}\n className={cx(nativeProps.className, styles.root)}\n role=\"progressbar\"\n >\n <div\n {...(indeterminate && { 'data-indeterminate': true })}\n data-complete={nowClamped === 100}\n className={styles.bar}\n style={width}\n />\n </div>\n )\n}\n","'use client'\n\nimport { cx } from '@cerberus/styled-system/css'\nimport { vstack } from '@cerberus/styled-system/patterns'\nimport { type InputHTMLAttributes } from 'react'\nimport { Show } from './Show'\nimport { fileUploader } from '@cerberus/styled-system/recipes'\nimport { $cerberusIcons } from '../config/defineIcons'\nimport { Avatar } from './Avatar'\n\nexport interface FileUploaderProps\n extends InputHTMLAttributes<HTMLInputElement> {\n /**\n * The optional heading to display in the FileUploader component.\n */\n heading?: string\n /**\n * The name of the file input element.\n */\n name: string\n /**\n * Disable the FileUploader component. Good for single-use file uploads.\n */\n disabled?: boolean\n}\n\n/**\n * A component that allows the user to upload files.\n * @see https://cerberus.digitalu.design/react/file-uploader\n */\nexport function FileUploader(props: FileUploaderProps) {\n const styles = fileUploader()\n const { waitingFileUploader: Icon } = $cerberusIcons\n\n return (\n <div\n {...(props.disabled ? { 'aria-disabled': true } : {})}\n className={cx(\n vstack({\n justify: 'center',\n }),\n styles.container,\n )}\n >\n <div className={styles.icon}>\n <Avatar\n gradient=\"charon-light\"\n ariaLabel=\"\"\n icon={<Icon />}\n size=\"md\"\n src=\"\"\n />\n </div>\n\n <label\n className={cx(\n vstack({\n justify: 'center',\n }),\n styles.label,\n )}\n htmlFor={props.name}\n >\n <Show when={Boolean(props.heading)}>\n <p className={styles.heading}>{props.heading}</p>\n </Show>\n Import {props.accept?.replace(',', ', ')} files\n <p className={styles.description}>Click to select files</p>\n <input\n {...props}\n className={cx(props.className, styles.input)}\n type=\"file\"\n />\n </label>\n </div>\n )\n}\n","'use client'\n\nimport type { InputHTMLAttributes, ReactNode } from 'react'\nimport { input, type InputVariantProps } from '@cerberus/styled-system/recipes'\nimport { cx } from '@cerberus/styled-system/css'\nimport { useFieldContext } from '../context/field'\nimport { $cerberusIcons } from '../config/defineIcons'\nimport { Show } from './Show'\n\nexport interface InputBaseProps\n extends Omit<InputHTMLAttributes<HTMLInputElement>, 'id' | 'size'> {\n /**\n * The id of the FieldMessage component used to describe the input. Required for accessibility.\n */\n describedBy?: string\n /**\n * The unique identifier for the input element. Required for accessibility.\n */\n id: string\n /**\n * An optional icon to display at the start of the input.\n */\n startIcon?: ReactNode\n /**\n * An optional icon to display at the end of the input.\n */\n endIcon?: ReactNode\n}\nexport type InputProps = InputBaseProps & InputVariantProps\n\n/**\n * A component that allows the user to input text. Must be wrapped in a Field\n * component to keep track of the state for entire group of elements related to\n * the field.\n * @see https://cerberus.digitalu.design/react/input\n */\nexport function Input(props: InputProps) {\n const { describedBy, size, startIcon, endIcon, ...nativeProps } = props\n const inputStyles = input({ size })\n const { invalid, ...fieldStates } = useFieldContext()\n const hasEndIcon = Boolean(endIcon)\n const { invalid: InvalidIcon } = $cerberusIcons\n\n return (\n <div className={inputStyles.root}>\n <Show when={Boolean(startIcon)}>\n <span className={inputStyles.startIcon}>{startIcon}</span>\n </Show>\n\n <input\n {...nativeProps}\n {...fieldStates}\n {...(describedBy && { 'aria-describedby': describedBy })}\n {...(invalid && { 'aria-invalid': true })}\n data-start-icon={Boolean(startIcon)}\n className={cx('peer', nativeProps.className, inputStyles.input)}\n />\n\n <Show when={invalid}>\n <InvalidIcon className={inputStyles.icon} />\n </Show>\n <Show when={hasEndIcon && !invalid}>\n <span className={inputStyles.icon}>{endIcon}</span>\n </Show>\n </div>\n )\n}\n","'use client'\n\nimport type { HTMLAttributes, PropsWithChildren } from 'react'\nimport { label, type LabelVariantProps } from '@cerberus/styled-system/recipes'\nimport { css, cx } from '@cerberus/styled-system/css'\nimport { hstack } from '@cerberus/styled-system/patterns'\nimport { useFieldContext } from '../context/field'\nimport { Show } from './Show'\n\n/**\n * This module contains the Label component.\n * @module\n */\nexport interface LabelBaseProps extends HTMLAttributes<HTMLLabelElement> {\n /**\n * The unique identifier for the input element. Required for accessibility.\n */\n htmlFor: string\n /**\n * Used to hide the label from the UI while keeping it accessible to screen readers. Typically used for global search inputs that have no visible label.\n */\n hidden?: boolean\n}\nexport type LabelProps = LabelBaseProps & LabelVariantProps\n\n/**\n * A a11y compliant label component.\n * @definition [ARIA Forms](https://www.a11yproject.com/checklist/#forms)\n * @see https://cerberus.digitalu.design/react/label\n * @example\n * ```tsx\n * <Field required>\n * <Label htmlFor=\"search\" hidden>Search everything</Label>\n * <Input id=\"search\" startIcon={Search} type=\"text\" />\n * </Field>\n * ```\n */\nexport function Label(props: PropsWithChildren<LabelProps>) {\n const { hidden, size, ...nativeProps } = props\n const { required, disabled } = useFieldContext()\n const usage = hidden ? 'hidden' : 'visible'\n\n return (\n <label\n {...nativeProps}\n {...(disabled && { 'data-disabled': true })}\n className={cx(\n nativeProps.className,\n label({ size, usage }),\n hstack({\n justify: 'space-between',\n w: 'full',\n }),\n )}\n >\n {props.children}\n <Show when={required}>\n <span\n className={css({\n color: 'page.text.100',\n fontSize: 'inherit',\n })}\n >\n (required)\n </span>\n </Show>\n </label>\n )\n}\n","'use client'\n\nimport { css, cx } from '@cerberus/styled-system/css'\nimport { type HTMLAttributes } from 'react'\nimport { useFieldContext } from '../context/field'\nimport { Show } from './Show'\nimport { label, type LabelVariantProps } from '@cerberus/styled-system/recipes'\nimport { hstack } from '@cerberus/styled-system/patterns'\n\n/**\n * This module contains the Fieldset component.\n * @module Fieldset\n */\n\nexport type LegendProps = HTMLAttributes<HTMLLegendElement> & LabelVariantProps\n\n/**\n * A component to provide a global label for a group of related elements in a form (for accessibility).\n * @memberof Fieldset\n * @see https://cerberus.digitalu.com/react/fieldset\n * @description [A11y Form Checklist](https://www.a11yproject.com/checklist/#forms)\n * @description [MDN Web Docs: Legend](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/legend)\n * @example\n * ```tsx\n * import { Fieldset, Legend, Field, Radio, Label } from '@cerberus/react'\n * import { Hstack } from '@cerberus/styled-system/jsx'\n *\n * function SomeForm() {\n * return (\n * <form>\n * <Fieldset>\n * <Legend>Do you like cats?</Legend>\n * <Hstack>\n * <Field>\n * <Radio id=\"yes\" name=\"cats\" value=\"yes\" />\n * <Label htmlFor=\"yes\">Yes</Label>\n * </Field>\n * </Hstack>\n * <Hstack>\n * <Field>\n * <Radio id=\"no\" name=\"cats\" value=\"no\" />\n * <Label htmlFor=\"no\">No</Label>\n * </Field>\n * </Hstack>\n * </Fieldset>\n * </form>\n * )\n * }\n * ```\n */\nexport function Legend(props: LegendProps) {\n const { size, ...nativeProps } = props\n const { invalid, ...formState } = useFieldContext()\n\n return (\n <legend\n {...nativeProps}\n {...formState}\n {...(invalid && { 'aria-invalid': true })}\n className={cx(\n nativeProps.className,\n hstack({\n justify: 'space-between',\n w: 'full',\n }),\n label({\n size,\n }),\n )}\n >\n {nativeProps.children}\n <Show when={formState.required}>\n <span\n className={css({\n color: 'page.text.100',\n fontSize: 'inherit',\n })}\n >\n (required)\n </span>\n </Show>\n </legend>\n )\n}\n","import { Menu as ArkMenu } from '@ark-ui/react'\nimport { menu } from '@cerberus/styled-system/recipes'\nimport { cx } from '@cerberus/styled-system/css'\n\n/**\n * This module contains the Menu component family.\n * @module Menu\n */\n\nconst menuStyles = menu()\n\n/**\n * The root Menu component which controls the menu.\n * @definition [Cerberus docs](https://cerberus.digitalu.design/react/menu)\n * @example\n * ```tsx\n * <Menu>\n * <MenuTrigger>Trigger</MenuTrigger>\n * </Menu>\n */\nexport const Menu = ArkMenu.Root\n\n/**\n * The MenuTrigger component opens/closes the Menu.\n * @definition [Cerberus docs](https://cerberus.digitalu.design/react/menu)\n * @example\n * ```tsx\n * <Menu>\n * <MenuTrigger>\n * <Button>Trigger</Button>\n * </MenuTrigger>\n * </Menu>\n */\nexport function MenuTrigger(props: ArkMenu.TriggerProps) {\n return <ArkMenu.Trigger {...props} asChild />\n}\n\n/**\n * The MenuContent component is the container for the menu items.\n * @definition [Cerberus docs](https://cerberus.digitalu.design/react/menu)\n * @example\n * ```tsx\n * <Menu>\n * <MenuTrigger>\n * <Button>Trigger</Button>\n * </MenuTrigger>\n * <MenuContent>\n * <MenuItem value=\"item_1\">Item 1</MenuItem>\n * <MenuItem value=\"item_2\">Item 2</MenuItem>\n * </MenuContent>\n * </Menu>\n */\nexport function MenuContent(props: ArkMenu.ContentProps) {\n return (\n <ArkMenu.Positioner>\n <ArkMenu.Content\n {...props}\n className={cx(props.className, menuStyles.content)}\n />\n </ArkMenu.Positioner>\n )\n}\n\n/**\n * The MenuItem component is a single item in the menu.\n * @definition [Cerberus docs](https://cerberus.digitalu.design/react/menu)\n * @example\n * ```tsx\n * <Menu>\n * <MenuTrigger>\n * <Button>Trigger</Button>\n * </MenuTrigger>\n * <MenuContent>\n * <MenuItem value=\"item_1\">Item 1</MenuItem>\n * <MenuItem value=\"item_2\">Item 2</MenuItem>\n * </MenuContent>\n * </Menu>\n */\nexport function MenuItem(props: ArkMenu.ItemProps) {\n return (\n <ArkMenu.Item {...props} className={cx(props.className, menuStyles.item)} />\n )\n}\n\n/**\n * The MenuItemGroup component is a group of menu items.\n * @definition [Cerberus docs](https://cerberus.digitalu.design/react/menu)\n * @example\n * ```tsx\n * <Menu>\n * <MenuTrigger>\n * <Button>Trigger</Button>\n * </MenuTrigger>\n * <MenuContent>\n * <MenuItemGroup>\n * <MenuItem value=\"item_1\">Item 1</MenuItem>\n * <MenuItem value=\"item_2\">Item 2</MenuItem>\n * </MenuItemGroup>\n * </MenuContent>\n * </Menu>\n */\nexport const MenuItemGroup = ArkMenu.ItemGroup\n\n/**\n * The MenuItemGroupLabel component is the label for a group of menu items.\n * @definition [Cerberus docs](https://cerberus.digitalu.design/react/menu)\n * @example\n * ```tsx\n * <Menu>\n * <MenuTrigger>\n * <Button>Trigger</Button>\n * </MenuTrigger>\n * <MenuContent>\n * <MenuItemGroup>\n * <MenuItemGroupLabel>Group Label</MenuItemGroupLabel>\n * <MenuItem value=\"item_1\">Item 1</MenuItem>\n * <MenuItem value=\"item_2\">Item 2</MenuItem>\n * </MenuItemGroup>\n * </MenuContent>\n * </Menu>\n */\nexport function MenuGroupLabel(props: ArkMenu.ItemGroupLabelProps) {\n return (\n <ArkMenu.ItemGroupLabel\n {...props}\n className={cx(props.className, menuStyles.itemGroupLabel)}\n />\n )\n}\n\n/**\n * The MenuSeparator component is a visual divider between menu items.\n * @definition [Cerberus docs](https://cerberus.digitalu.design/react/menu)\n * @example\n * ```tsx\n * <Menu>\n * <MenuTrigger>\n * <Button>Trigger</Button>\n * </MenuTrigger>\n * <MenuContent>\n * <MenuItemGroup>\n * <MenuGroupLabel>Group Label</MenuGroupLabel>\n * <MenuSeparator />\n * <MenuItem value=\"item_1\">Item 1</MenuItem>\n * <MenuItem value=\"item_2\">Item 2</MenuItem>\n * </MenuItemGroup>\n * </MenuContent>\n * </Menu>\n */\nexport function MenuSeparator(props: ArkMenu.SeparatorProps) {\n return (\n <ArkMenu.Separator\n {...props}\n className={cx(props.className, menuStyles.separator)}\n />\n )\n}\n\n/**\n * The MenuCheckboxItem component is a menu item with a checkbox.\n * @definition [Cerberus docs](https://cerberus.digitalu.design/react/menu)\n * @example\n * ```tsx\n * <Menu>\n * <MenuTrigger>\n * <Button>Trigger</Button>\n * </MenuTrigger>\n * <MenuContent>\n * <MenuCheckboxItem\n * checked={checked}\n * onCheckedChange={setChecked}\n * value=\"checked\"\n * >\n * <MenuItemIndicator>✅</MenuItemIndicator>\n * <MenuItemText>Check me</MenuItemText>\n * </MenuCheckboxItem>\n * </MenuContent>\n */\n// export function MenuCheckboxItem(props: ArkMenu.CheckboxItemProps) {\n// return (\n// <ArkMenu.CheckboxItem\n// {...props}\n// className={cx(props.className, menuStyles.item)}\n// />\n// )\n// }\n\n/**\n * The MenuItemText component is the text for a grouped menu item.\n * @definition [Cerberus docs](https://cerberus.digitalu.design/react/menu)\n * @example\n * ```tsx\n * <Menu>\n * <MenuTrigger>\n * <Button>Trigger</Button>\n * </MenuTrigger>\n * <MenuContent>\n * <MenuCheckboxItem\n * checked={checked}\n * onCheckedChange={setChecked}\n * value=\"checked\"\n * >\n * <MenuItemText>Item 1</MenuItemText>\n * </MenuCheckboxItem>\n * </MenuContent>\n * </Menu>\n */\n// export function MenuItemText(props: ArkMenu.ItemTextProps) {\n// return (\n// <ArkMenu.ItemText\n// {...props}\n// className={cx(props.className, menuStyles.itemText)}\n// />\n// )\n// }\n\n/**\n * The MenuItemIndicator component is the indicator for a grouped menu item.\n * @definition [Cerberus docs](https://cerberus.digitalu.design/react/menu)\n * @example\n * ```tsx\n * <Menu>\n * <MenuTrigger>\n * <Button>Trigger</Button>\n * </MenuTrigger>\n * <MenuContent>\n * <MenuCheckboxItem\n * checked={checked}\n * onCheckedChange={setChecked}\n * value=\"checked\"\n * >\n * <MenuItemIndicator>✅</MenuItemIndicator>\n * <MenuItemText>Check me</MenuItemText>\n * </MenuCheckboxItem>\n * </MenuContent>\n */\n// export function MenuItemIndicator(props: ArkMenu.ItemIndicatorProps) {\n// return (\n// <ArkMenu.ItemIndicator\n// {...props}\n// className={cx(props.className, menuStyles.itemIndicator)}\n// />\n// )\n// }\n","import { cx } from '@cerberus/styled-system/css'\nimport { modal } from '@cerberus/styled-system/recipes'\nimport { forwardRef, type ForwardedRef, type HTMLAttributes } from 'react'\n\n/**\n * This module contains the Modal root component for a customizable modal.\n * @module\n */\n\n// Modal\n\nexport type ModalProps = HTMLAttributes<HTMLDialogElement>\n\nfunction ModalEl(props: ModalProps, ref: ForwardedRef<HTMLDialogElement>) {\n return (\n <dialog\n {...props}\n className={cx(props.className, modal().dialog)}\n ref={ref}\n />\n )\n}\n\n/**\n * The Modal component is the root element for a customizable modal.\n * @see https://cerberus.digitalu.design/react/modal\n * @example\n * ```tsx\n * const { modalRef } = useModal()\n *\n * <Modal ref={modalRef}>\n * <Avatar icon={SomeIcon} />\n * <ModalHeader>\n * <ModalHeading>Modal Heading</ModalHeading>\n * <ModalDescription>Modal description</ModalDescription>\n * </ModalHeader>\n *\n * {props.children}\n * </Modal>\n * ```\n */\nexport const Modal = forwardRef(ModalEl)\n","import { cx } from '@cerberus/styled-system/css'\nimport { vstack } from '@cerberus/styled-system/patterns'\nimport type { HTMLAttributes } from 'react'\n\n/**\n * This module contains the ModalHeader component for a customizable modal.\n * @module\n */\n\nexport type ModalHeaderProps = HTMLAttributes<HTMLDivElement>\n\n/**\n * The ModalHeader component is a header element for a customizable modal.\n * @see https://cerberus.digitalu.design/react/modal\n * @example\n * ```tsx\n * <Modal>\n * <ModalHeader>\n * <h2>Modal Heading</h2>\n * </ModalHeader>\n * </Modal>\n * ```\n */\nexport function ModalHeader(props: ModalHeaderProps) {\n return (\n <div\n {...props}\n className={cx(\n props.className,\n vstack({\n alignItems: 'flex-start',\n gap: 'md',\n position: 'relative',\n }),\n )}\n />\n )\n}\n","import { cx } from '@cerberus/styled-system/css'\nimport { modal } from '@cerberus/styled-system/recipes'\nimport type { HTMLAttributes } from 'react'\n\n/**\n * This module contains the ModalHeading component for a customizable modal.\n * @module\n */\n\nexport type ModalHeadingProps = HTMLAttributes<HTMLParagraphElement>\n\n/**\n * The ModalHeading component is a heading element for a customizable modal.\n * @see https://cerberus.digitalu.design/react/modal\n * @example\n * ```tsx\n * <Modal>\n * <ModalHeading>Modal Heading</ModalHeading>\n * </Modal>\n * ```\n */\nexport function ModalHeading(props: ModalHeadingProps) {\n return <p {...props} className={cx(props.className, modal().heading)} />\n}\n","import { cx } from '@cerberus/styled-system/css'\nimport { modal } from '@cerberus/styled-system/recipes'\nimport type { HTMLAttributes } from 'react'\n\n/**\n * This module contains the ModalDescription component for a customizable modal.\n * @module\n */\n\nexport type ModalDescriptionProps = HTMLAttributes<HTMLParagraphElement>\n\n/**\n * The ModalDescription component is a heading element for a customizable modal.\n * @see https://cerberus.digitalu.design/react/modal\n * @example\n * ```tsx\n * <Modal>\n * <ModalDescription>Modal Heading</ModalDescription>\n * </Modal>\n * ```\n */\nexport function ModalDescription(props: ModalDescriptionProps) {\n return <p {...props} className={cx(props.className, modal().description)} />\n}\n","'use client'\n\nimport {\n useCallback,\n type ButtonHTMLAttributes,\n type ElementType,\n type MouseEvent,\n} from 'react'\nimport { cx } from '@cerberus/styled-system/css'\nimport { button } from '@cerberus/styled-system/recipes'\nimport {\n createNavTriggerProps,\n type NavTriggerAriaValues,\n} from '../aria-helpers/nav-menu.aria'\nimport { useNavMenuContext } from '../context/navMenu'\nimport type { ButtonProps } from './Button'\nimport { Show } from './Show'\n\n/**\n * This module contains the NavMenuTrigger component.\n * @module\n */\n\nexport interface NavMenuTriggerProps\n extends ButtonHTMLAttributes<HTMLButtonElement>,\n ButtonProps,\n NavTriggerAriaValues {\n /**\n * The element type to render as. Recommended to use for an IconButton trigger vs a standard Button.\n * @default 'button'\n * @example\n * ```tsx\n * <NavMenuTrigger as={IconButton} href=\"/home\" />\n * ```\n */\n as?: ElementType\n}\n\n/**\n * @deprecated use the {@link Menu} family instead\n */\nexport function NavMenuTrigger(props: NavMenuTriggerProps): JSX.Element {\n const {\n as,\n palette,\n usage,\n shape,\n controls,\n expanded: propsExpanded,\n onClick,\n ...nativeProps\n } = props\n const { triggerRef, onToggle, expanded } = useNavMenuContext()\n const ariaProps = createNavTriggerProps({\n controls,\n expanded: propsExpanded ?? expanded,\n })\n const hasAs = Boolean(as)\n const AsSub: ElementType = as!\n\n const handleClick = useCallback(\n (e: MouseEvent<HTMLButtonElement>) => {\n if (onClick) return onClick(e)\n onToggle()\n },\n [onClick, onToggle],\n )\n\n return (\n <Show\n when={hasAs}\n fallback={\n <button\n {...nativeProps}\n {...ariaProps}\n className={cx(\n nativeProps.className,\n button({\n palette,\n usage,\n shape,\n }),\n )}\n onClick={handleClick}\n ref={triggerRef}\n >\n {props.children}\n </button>\n }\n >\n {hasAs && (\n <AsSub\n {...nativeProps}\n {...ariaProps}\n onClick={handleClick}\n ref={triggerRef}\n />\n )}\n </Show>\n )\n}\n","export interface NavTriggerAriaValues {\n controls: string\n expanded?: boolean\n}\n\ninterface NavTriggerAriaReturn {\n ['aria-controls']: string\n ['aria-expanded']: boolean\n}\n\nexport function createNavTriggerProps(\n values: NavTriggerAriaValues,\n): NavTriggerAriaReturn {\n return {\n ['aria-controls']: values.controls,\n ['aria-expanded']: values.expanded ?? false,\n }\n}\n","'use client'\n\nimport { css } from '@cerberus/styled-system/css'\nimport {\n createContext,\n useCallback,\n useContext,\n useMemo,\n useRef,\n useState,\n type PropsWithChildren,\n type RefObject,\n} from 'react'\n\n/**\n * This module provides a context and hook for the nav menu.\n * @module NavMenu\n */\n\nexport type NavTriggerRef = RefObject<HTMLButtonElement>\nexport type NavMenuRef = RefObject<HTMLUListElement>\n\nexport interface NavMenuContextValue {\n /**\n * The ref for the trigger button.\n */\n triggerRef: NavTriggerRef | null\n /**\n * The ref for the menu.\n */\n menuRef: NavMenuRef | null\n /**\n * Whether the menu is expanded.\n */\n expanded: boolean\n /**\n * Called when the menu button is clicked.\n */\n onToggle: () => void\n}\n\nconst NavMenuContext = createContext<NavMenuContextValue | null>(null)\n\n/**\n * @deprecated use the {@link Menu} family instead\n */\nexport function NavMenu(props: PropsWithChildren): JSX.Element {\n const triggerRef = useRef<HTMLButtonElement>(null)\n const menuRef = useRef<HTMLUListElement>(null)\n const [expanded, setExpanded] = useState<boolean>(false)\n\n const handleToggle = useCallback(() => {\n setExpanded((prev) => !prev)\n }, [])\n\n const value = useMemo(\n () => ({\n triggerRef,\n menuRef,\n expanded,\n onToggle: handleToggle,\n }),\n [expanded, handleToggle],\n )\n\n return (\n <NavMenuContext.Provider value={value}>\n <nav\n className={css({\n position: 'relative',\n })}\n >\n {props.children}\n </nav>\n </NavMenuContext.Provider>\n )\n}\n\n/**\n * Used to access the nav menu context.\n * @returns The nav menu context.\n */\nexport function useNavMenuContext(): NavMenuContextValue {\n const context = useContext(NavMenuContext)\n if (!context) {\n throw new Error('useNavMenuContext must be used within a NavMenu.')\n }\n return context\n}\n","'use client'\n\nimport { useMemo, type HTMLAttributes } from 'react'\nimport { cx } from '@cerberus/styled-system/css'\nimport { vstack } from '@cerberus/styled-system/patterns'\nimport { useNavMenuContext } from '../context/navMenu'\nimport type { Positions } from '../types'\nimport { Show } from './Show'\n\n/**\n * This module contains the NavMenuList component.\n * @module\n */\n\ninterface GetPositionResult {\n /**\n * The left position of the element.\n */\n left: string\n /**\n * The right position of the element.\n */\n right: string\n /**\n * The top position of the element.\n */\n top: string\n /**\n * The bottom position of the element.\n */\n bottom: string\n}\n\n/**\n * @deprecated use the {@link Menu} family instead\n */\nexport function getPosition(position: Positions): GetPositionResult {\n const defaultPositions = {\n left: 'auto',\n right: 'auto',\n top: 'auto',\n bottom: 'auto',\n }\n switch (position) {\n case 'right':\n return { ...defaultPositions, top: '0%', left: '105%' }\n case 'left':\n return { ...defaultPositions, top: '0%', right: '105%' }\n case 'bottom':\n return { ...defaultPositions, top: '110%' }\n case 'top':\n return { ...defaultPositions, bottom: '110%' }\n default:\n return defaultPositions\n }\n}\n\nconst navListStyles = vstack({\n alignItems: 'flex-start',\n bgColor: 'page.surface.100',\n boxShadow: 'lg',\n gap: '2',\n opacity: '0',\n p: '4',\n position: 'absolute',\n rounded: 'md',\n zIndex: 'dropdown',\n _motionSafe: {\n animationName: 'zoomIn',\n animationDelay: '100ms',\n animationDuration: '150ms',\n animationFillMode: 'both',\n animationTimingFunction: 'ease-in-out',\n },\n _positionBottom: {\n transformOrigin: 'top left',\n },\n _positionTop: {\n transformOrigin: 'bottom left',\n },\n _positionLeft: {\n transformOrigin: 'top right',\n },\n _positionRight: {\n transformOrigin: 'top left',\n },\n})\n\nexport interface NavMenuListProps extends HTMLAttributes<HTMLUListElement> {\n /**\n * The unique identifier for the NavMenuList. Required for accessibility.\n */\n id: string\n /**\n * The position of the NavMenuList.\n * @type 'top' | 'right' | 'bottom' | 'left'\n * @default 'bottom'\n */\n position?: Positions\n}\n\n/**\n * A component that allows the user to display a menu of navigation links.\n * @definition [Disclosure Nav](https://www.w3.org/WAI/ARIA/apg/patterns/disclosure/examples/disclosure-navigation/)\n * @see https://cerberus.digitalu.design/react/nav-menu\n *\n * @example\n * ```tsx\n * <NavMenu>\n * <NavMenuList id=\"nav-menu-list\" position=\"bottom\">\n * <NavMenuLink href=\"/home\">Home</NavMenuLink>\n * <NavMenuLink href=\"/about\">About</NavMenuLink>\n * </NavMenuList>\n * </NavMenu>\n * ```\n **/\nexport function NavMenuList(props: NavMenuListProps): JSX.Element {\n const { position, ...nativeProps } = props\n const { menuRef, expanded } = useNavMenuContext()\n const locationStyles = useMemo(\n () => getPosition(position ?? 'bottom'),\n [position],\n )\n\n return (\n <Show when={expanded}>\n <ul\n {...nativeProps}\n data-position={position ?? 'bottom'}\n className={cx(nativeProps.className, navListStyles)}\n ref={menuRef}\n style={locationStyles}\n />\n </Show>\n )\n}\n","import type { AnchorHTMLAttributes, ElementType } from 'react'\nimport { css, cx } from '@cerberus/styled-system/css'\nimport { Show } from './Show'\n\n/**\n * This module contains the NavMenuLink component.\n * @module\n */\n\nexport interface NavMenuLinkProps\n extends AnchorHTMLAttributes<HTMLAnchorElement> {\n /**\n * The element type to render as. Recommended to use for Next apps with the\n * `Link` component.\n */\n as?: ElementType\n}\n\n/**\n * @deprecated use the {@link Menu} family instead\n */\nexport function NavMenuLink(props: NavMenuLinkProps): JSX.Element {\n const { as, ...nativeProps } = props\n const hasAs = Boolean(as)\n const AsSub: ElementType = as!\n\n return (\n <li\n className={css({\n w: 'full',\n })}\n >\n <Show\n when={hasAs}\n fallback={\n <a\n {...nativeProps}\n className={cx(\n nativeProps.className,\n css({\n color: 'action.navigation.initial',\n textStyle: 'link',\n _hover: {\n color: 'action.navigation.hover',\n },\n }),\n )}\n />\n }\n >\n {hasAs && <AsSub {...nativeProps} />}\n </Show>\n </li>\n )\n}\n","'use client'\n\nimport { cx } from '@cerberus/styled-system/css'\nimport { hstack, vstack } from '@cerberus/styled-system/patterns'\nimport {\n notification,\n type NotificationVariantProps,\n} from '@cerberus/styled-system/recipes'\nimport {\n useRef,\n type DialogHTMLAttributes,\n type PropsWithChildren,\n type MouseEvent,\n} from 'react'\nimport { $cerberusIcons } from '../config/defineIcons'\nimport { trapFocus } from '../aria-helpers/trap-focus.aria'\n\n/**\n * This module exports the Notification component.\n * @module\n */\n\nfunction MatchNotificationIcon(props: NotificationVariantProps) {\n const palette = (props.palette || 'info') as\n | 'info'\n | 'success'\n | 'warning'\n | 'danger'\n const key = `${palette}Notification` as keyof typeof $cerberusIcons\n const Icon = $cerberusIcons[key]\n return <Icon />\n}\n\nexport interface NotificationBaseProps\n extends Omit<DialogHTMLAttributes<HTMLDialogElement>, 'onClose'> {\n /**\n * The unique id of the notification. Required for the onClose callback.\n */\n id: string\n /**\n * Called when the close button is clicked.\n */\n onClose?: (e: MouseEvent<HTMLButtonElement>) => void\n}\nexport type NotificationProps = NotificationBaseProps & NotificationVariantProps\n\n/**\n * A static Notification component that displays a message to the user. This\n * is typically only used when not utilizing the NotificationCenter.\n * @see https://cerberus.digitalu.design/react/notification\n * @memberof module:NotificationCenter\n * @example\n * ```tsx\n * <Notification id=\"info:1\" open>\n * <NotificationHeading>Info Notification</NotificationHeading>\n * <NotificationDescription>\n * This is a description with a <a href=\"#\">link</a> in the message.\n * </NotificationDescription>\n * </Notification>\n * ```\n */\nexport function Notification(props: PropsWithChildren<NotificationProps>) {\n const { children, palette, onClose, ...nativeProps } = props\n const ref = useRef<HTMLDialogElement>(null)\n const onKeyDown = trapFocus(ref)\n const styles = notification({ palette })\n const { close: CloseIcon } = $cerberusIcons\n\n return (\n <dialog\n {...nativeProps}\n className={cx(\n nativeProps.className,\n hstack({\n position: 'relative',\n gap: '4',\n }),\n styles.dialog,\n )}\n onKeyDown={onKeyDown}\n ref={ref}\n >\n <span className={styles.icon}>\n <MatchNotificationIcon palette={palette} />\n </span>\n\n <div\n className={vstack({\n alignItems: 'flex-start',\n gap: '0',\n py: '2',\n })}\n >\n {children}\n </div>\n\n <button\n aria-label=\"Close\"\n className={styles.close}\n onClick={onClose}\n value={props.id}\n >\n <CloseIcon />\n </button>\n </dialog>\n )\n}\n","import type { KeyboardEvent, KeyboardEventHandler, RefObject } from 'react'\n\nexport function trapFocus(\n modalRef: RefObject<HTMLDialogElement>,\n): KeyboardEventHandler<HTMLDialogElement> {\n const focusableElements =\n 'button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])'\n const focusable = Array.from(\n modalRef.current?.querySelectorAll(focusableElements) ?? [],\n )\n const firstFocusable = focusable[0] as HTMLElement\n const lastFocusable = focusable[focusable.length - 1] as HTMLElement\n\n return function handleKeyDown(event: KeyboardEvent<HTMLDialogElement>) {\n if (event.key === 'Tab') {\n if (event.shiftKey) {\n if (document.activeElement === firstFocusable) {\n lastFocusable.focus()\n event.preventDefault()\n }\n } else {\n if (document.activeElement === lastFocusable) {\n firstFocusable.focus()\n event.preventDefault()\n }\n }\n }\n }\n}\n","import { cx } from '@cerberus/styled-system/css'\nimport {\n notification,\n type NotificationVariantProps,\n} from '@cerberus/styled-system/recipes'\nimport type { HTMLAttributes } from 'react'\n\n/**\n * This module exports the NotificationHeading component.\n * @module\n */\n\nexport type BaseNotificationHeadingProps = HTMLAttributes<HTMLParagraphElement>\nexport type NotificationHeadingProps = BaseNotificationHeadingProps &\n NotificationVariantProps\n\n/**\n * Used to render the heading of a notification.\n * @see https://cerberus.digitalu.design/react/notification\n * @memberof module:NotificationCenter\n * @param props - The anything a HTMLParagraphElement can accept.\n */\nexport function NotificationHeading(props: NotificationHeadingProps) {\n const { palette, ...nativeProps } = props\n const styles = notification({ palette })\n return (\n <p className={cx(nativeProps.className, styles.heading)} {...nativeProps} />\n )\n}\n","import { cx } from '@cerberus/styled-system/css'\nimport {\n notification,\n type NotificationVariantProps,\n} from '@cerberus/styled-system/recipes'\nimport type { HTMLAttributes } from 'react'\n\n/**\n * This module exports the NotificationDescription component.\n * @module\n */\n\nexport type BaseNotificationDescriptionProps =\n HTMLAttributes<HTMLParagraphElement>\nexport type NotificationDescriptionProps = BaseNotificationDescriptionProps &\n NotificationVariantProps\n\n/**\n * Used to render the description of a notification.\n * @see https://cerberus.digitalu.design/react/notification\n * @memberof module:NotificationCenter\n * @param props - The anything a HTMLParagraphElement can accept.\n */\nexport function NotificationDescription(props: NotificationDescriptionProps) {\n const { palette, ...nativeProps } = props\n const styles = notification({ palette })\n return (\n <p\n className={cx(nativeProps.className, styles.description)}\n {...nativeProps}\n />\n )\n}\n","'use client'\n\nimport { cx } from '@cerberus/styled-system/css'\nimport { hstack } from '@cerberus/styled-system/patterns'\nimport { radio } from '@cerberus/styled-system/recipes'\nimport type { RecipeVariantProps } from '@cerberus/styled-system/types'\nimport type { InputHTMLAttributes, PropsWithChildren } from 'react'\nimport { useFieldContext } from '../context/field'\n\n/**\n * This module contains the Radio component.\n * @module\n */\n\nexport type RadioRecipe = RecipeVariantProps<typeof radio>\nexport interface RadioBaseProps\n extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'> {\n /**\n * A unique identifier for the radio button. Required for accessibility.\n */\n id: string\n}\nexport type RadioProps = RadioBaseProps & RadioRecipe\n\n/**\n * The Radio component is used to allow users to select a single option from a list of options.\n * @see https://cerberus.digitalu.design/react/radio\n * @memberof module:Field\n * @example\n * ```tsx\n * <Field>\n * <fieldset name=\"fruit\">\n * <Radio id=\"radio-1\" name=\"fruit\" value=\"1\">\n * Option 1\n * </Radio>\n * <Radio id=\"radio-2\" name=\"fruit\" value=\"2\">\n * Option 2\n * </Radio>\n * <Radio id=\"radio-3\" name=\"fruit\" value=\"3\">\n * Option 3\n * </Radio>\n * </fieldset>\n * </Field>\n * ```\n */\nexport function Radio(props: PropsWithChildren<RadioProps>) {\n const { children, size, ...nativeProps } = props\n const { invalid, ...state } = useFieldContext()\n const styles = radio({ size })\n\n return (\n <div\n className={cx(\n 'group',\n hstack({\n gap: 'sm',\n }),\n styles.root,\n )}\n tabIndex={0}\n >\n <input\n {...nativeProps}\n {...state}\n {...(invalid && { 'aria-invalid': true })}\n className={cx(nativeProps.className, styles.input)}\n tabIndex={-1}\n type=\"radio\"\n />\n {children}\n </div>\n )\n}\n","'use client'\n\nimport { cx } from '@cerberus/styled-system/css'\nimport { hstack } from '@cerberus/styled-system/patterns'\nimport {\n select,\n type SelectVariantProps,\n} from '@cerberus/styled-system/recipes'\nimport type { OptionHTMLAttributes, SelectHTMLAttributes } from 'react'\nimport { $cerberusIcons } from '../config/defineIcons'\nimport { useFieldContext } from '../context/field'\nimport { Show } from './Show'\n\n/**\n * This module contains the select components.\n * @module\n */\n\nexport type SelectProps = Omit<\n SelectHTMLAttributes<HTMLSelectElement>,\n 'size'\n> &\n SelectVariantProps & {\n /**\n * The unique id of the select element. Required for accessibility.\n */\n id: string\n /**\n * The id of the FieldMessage that describes the select element.\n */\n describedBy?: string\n }\n\n/**\n * Used to allow users to select a single option from a list of options.\n * @see https://cerberus.digitalu.design/react/select\n * @memberof module:Field\n * @example\n * ```tsx\n * <Field>\n * <Select describedby=\"help:fruit\" id=\"fruit\">\n * <Option value=\"\">Choose option</Option>\n * <Option value=\"one\">Option 1</Option>\n * <Option value=\"two\">Option 2</Option>\n * <Option value=\"three\">Option 3</Option>\n * </Select>\n * </Field>\n * ```\n */\nexport function Select(props: SelectProps) {\n const { describedBy, size, ...nativeProps } = props\n const { invalid, ...fieldStates } = useFieldContext()\n const { invalid: InvalidIcon, selectArrow: SelectArrow } = $cerberusIcons\n const styles = select({\n size,\n })\n\n return (\n <div className={styles.root}>\n <select\n {...nativeProps}\n {...fieldStates}\n {...(describedBy && { 'aria-describedby': describedBy })}\n {...(invalid && { 'aria-invalid': true })}\n className={styles.input}\n />\n <span\n className={cx(\n styles.iconStack,\n hstack({\n gap: '2',\n }),\n )}\n >\n <Show when={invalid}>\n <span\n {...(invalid && { 'data-invalid': true })}\n className={styles.stateIcon}\n >\n <InvalidIcon />\n </span>\n </Show>\n <span className={styles.arrowIcon}>\n <SelectArrow />\n </span>\n </span>\n </div>\n )\n}\n\n// We only export this component for consistency with the other components\n\nexport type OptionProps = OptionHTMLAttributes<HTMLOptionElement>\n\n/**\n * Option component\n * props: OptionHTMLAttributes<HTMLOptionElement>\n * @example\n * ```tsx\n * <Option value=\"one\">Option 1</Option>\n * ```\n */\nexport function Option(props: OptionProps) {\n return <option {...props} />\n}\n","import type { SVGProps } from 'react'\n\n/**\n * This module contains the Spinner component.\n * @module\n */\n\nexport type SpinnerProps = SVGProps<SVGSVGElement> & {\n /**\n * The size of the spinner\n */\n size?: number | string\n}\n\n/**\n * The Spinner component is used to display a loading indicator. Typically used\n * in buttons, modals, and other components that require a loading state.\n * @see https://cerberus.digitalu.design/react/loading-states/\n * @example\n * ```tsx\n * <Button>\n * <Show when={loading} fallback={<>Save</>}>\n * Saving\n * <Spinner size={24} />\n * </Show>\n * </Button>\n * ```\n */\nexport function Spinner(props: SpinnerProps) {\n return (\n <svg\n aria-busy=\"true\"\n role=\"status\"\n xmlns=\"http://www.w3.org/2000/svg\"\n height={props.size}\n width={props.size}\n viewBox=\"0 0 24 24\"\n {...props}\n >\n <g\n fill=\"none\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n >\n <path\n strokeDasharray={16}\n strokeDashoffset={16}\n d=\"M12 3c4.97 0 9 4.03 9 9\"\n >\n <animate\n fill=\"freeze\"\n attributeName=\"stroke-dashoffset\"\n dur=\"0.15s\"\n values=\"16;0\"\n ></animate>\n <animateTransform\n attributeName=\"transform\"\n dur=\"0.75s\"\n repeatCount=\"indefinite\"\n type=\"rotate\"\n values=\"0 12 12;360 12 12\"\n ></animateTransform>\n </path>\n <path\n strokeDasharray={64}\n strokeDashoffset={64}\n strokeOpacity={0.3}\n d=\"M12 3c4.97 0 9 4.03 9 9c0 4.97 -4.03 9 -9 9c-4.97 0 -9 -4.03 -9 -9c0 -4.97 4.03 -9 9 -9Z\"\n >\n <animate\n fill=\"freeze\"\n attributeName=\"stroke-dashoffset\"\n dur=\"0.6s\"\n values=\"64;0\"\n ></animate>\n </path>\n </g>\n </svg>\n )\n}\n","'use client'\n\nimport { Tabs as ArkTabs } from '@ark-ui/react/tabs'\nimport { cx } from '@cerberus/styled-system/css'\nimport { useTabsContext } from '../context/tabs'\n\n/**\n * This module provides the Tabs family.\n * @module\n */\n\n/**\n * The tab list container for the Tabs group.\n * @definition [Tabs docs](https://cerberus.digitalu.design/react/tabs)\n * @example\n * ```tsx\n * <Tabs>\n * <TabList description=\"Profile settings\">\n * <Tab value=\"overview\">Overview</Tab>\n * </TabList>\n * <TabPanel tab=\"overview\">...</TabPanel>\n * </Tabs>\n * ```\n */\nexport function TabsList(props: ArkTabs.ListProps) {\n const { children, ...tabsProps } = props\n const { styles } = useTabsContext()\n\n return (\n <ArkTabs.List\n {...tabsProps}\n className={cx(tabsProps.className, styles.list)}\n >\n {children}\n <TabIndicator />\n </ArkTabs.List>\n )\n}\n\n/**\n * @deprecated Use `TabsList` instead.\n */\nexport const TabList = TabsList\n\n/**\n * The trigger for the Tabs group.\n * @definition [Tabs docs](https://cerberus.digitalu.design/react/tabs)\n * @example\n * ```tsx\n * <Tabs>\n * <TabList description=\"Profile settings\">\n * <Tab value=\"overview\">Overview</Tab>\n * </TabList>\n * <TabPanel tab=\"overview\">...</TabPanel>\n * </Tabs>\n * ```\n */\nexport function Tab(props: ArkTabs.TriggerProps) {\n const { styles } = useTabsContext()\n return (\n <ArkTabs.Trigger\n {...props}\n className={cx(props.className, styles.trigger)}\n />\n )\n}\n\n/**\n * The indicator for the Tabs group which shows the active tab.\n * @definition [Tabs docs](https://cerberus.digitalu.design/react/tabs)\n * @example\n * ```tsx\n * <Tabs>\n * <TabList description=\"Profile settings\">\n * <Tab value=\"overview\">Overview</Tab>\n * <TabsIndicator />\n * </TabList>\n * <TabPanel tab=\"overview\">...</TabPanel>\n * </Tabs>\n * ```\n */\nexport function TabIndicator(props: ArkTabs.IndicatorProps) {\n const { styles } = useTabsContext()\n return (\n <ArkTabs.Indicator\n {...props}\n className={cx(props.className, styles.indicator)}\n />\n )\n}\n\n/**\n * The content for the Tabs group.\n * @definition [Tabs docs](https://cerberus.digitalu.design/react/tabs)\n * @example\n * ```tsx\n * <Tabs>\n * <TabList description=\"Profile settings\">\n * <Tab value=\"overview\">Overview</Tab>\n * </TabList>\n * <TabPanel tab=\"overview\">...</TabPanel>\n * </Tabs>\n * ```\n */\nexport function TabPanel(props: ArkTabs.ContentProps) {\n const { styles } = useTabsContext()\n return (\n <ArkTabs.Content\n {...props}\n className={cx(props.className, styles.content)}\n />\n )\n}\n","'use client'\n\nimport { Tabs as ArkTabs } from '@ark-ui/react/tabs'\nimport { tabs, type TabsVariantProps } from '@cerberus/styled-system/recipes'\nimport type { Pretty } from '@cerberus/styled-system/types'\nimport {\n createContext,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useState,\n type PropsWithChildren,\n} from 'react'\nimport { getLocalStorage, setLocalStorage } from '../utils/localStorage'\n\n/**\n * This module provides a Tabs component and a hook to access its context.\n * @module Tabs\n */\n\nexport interface TabsContextValue {\n /**\n * The styles for the tabs.\n */\n styles: {\n list: Pretty<string>\n trigger: Pretty<string>\n content: Pretty<string>\n indicator: Pretty<string>\n }\n}\n\nexport const TabsContext = createContext<TabsContextValue | null>(null)\n\nexport interface TabsProviderBaseProps extends ArkTabs.RootProps {\n /**\n * A unique identifier for the Tabs component. Typically used when there are\n * multiple Tabs components on the same page and you want to uniquely cache\n * the active tab state.\n */\n uuid?: string\n /**\n * The default tab to display when the component is first rendered.\n */\n defaultValue?: string\n /**\n * Whether to cache the active tab state in local storage.\n */\n cache?: boolean\n}\n\nexport type TabsProviderProps = TabsProviderBaseProps & TabsVariantProps\n\n/**\n * The Tabs component provides a context to manage tab state.\n * @definition [Tabs docs](https://cerberus.digitalu.design/react/tabs)\n * @example\n * ```tsx\n * <Tabs cache>\n * <TabsList>\n * <Tab value=\"overview\">Overview</Tab>\n * <Tab value=\"guidelines\">Guidelines</Tab>\n * </TabsList>\n * <TabPanel value=\"overview\">Overview content</TabPanel>\n * <TabPanel value=\"guidelines\">Guidelines content</TabPanel>\n * </Tabs>\n * ```\n */\nexport function Tabs(props: PropsWithChildren<TabsProviderProps>): JSX.Element {\n const { cache, defaultValue, palette, uuid, ...arkProps } = props\n const [activeTab, setActiveTab] = useState<string | undefined>(() =>\n cache ? '' : defaultValue,\n )\n const styles = tabs({ palette })\n\n const cacheKey = useMemo(\n () => (uuid ? `cerberus-tabs-${uuid}` : 'cerberus-tabs'),\n [uuid],\n )\n\n const handleValueChange = useCallback(\n (details: { value: string }) => {\n if (cache) {\n setLocalStorage(cacheKey, details.value)\n }\n setActiveTab(details.value)\n },\n [cache],\n )\n\n useEffect(() => {\n if (cache && !activeTab) {\n const cachedTab = getLocalStorage(cacheKey, defaultValue ?? '')\n setActiveTab(cachedTab)\n }\n }, [cache, defaultValue, activeTab])\n\n const value = useMemo(\n () => ({\n active: activeTab,\n styles,\n }),\n [activeTab, palette, styles],\n )\n\n return (\n <TabsContext.Provider value={value}>\n <ArkTabs.Root\n {...arkProps}\n aria-busy={!activeTab}\n className={styles.root}\n defaultValue={defaultValue}\n onValueChange={handleValueChange}\n value={activeTab}\n >\n {props.children}\n </ArkTabs.Root>\n </TabsContext.Provider>\n )\n}\n\n/**\n * Used to access the tabs context.\n * @returns The tabs context.\n */\nexport function useTabsContext(): TabsContextValue {\n const context = useContext(TabsContext)\n if (!context) {\n throw new Error('useTabsContext must be used within a Tabs Provider.')\n }\n return context\n}\n","'use client'\n\n/**\n * A utility function to get a value from local storage.\n * @param key The key to get from local storage.\n * @param defaultValue The fallback value if the key is not found.\n * @returns key or defaultValue\n */\nexport function getLocalStorage<T extends string>(\n key: string,\n defaultValue: T,\n): T {\n const value = window.localStorage.getItem(key)\n if (value) {\n return value as T\n }\n return defaultValue\n}\n\n/**\n * A utility function to set a value in local storage.\n * @param key The key to set in local storage.\n * @param value The value to set in local storage.\n */\nexport function setLocalStorage<T>(key: string, value: T): void {\n const stringValue = typeof value === 'string' ? value : JSON.stringify(value)\n window.localStorage.setItem(key, stringValue)\n}\n","import { cx } from '@cerberus/styled-system/css'\nimport { table } from '@cerberus/styled-system/recipes'\nimport type { PropsWithChildren, TableHTMLAttributes } from 'react'\n\n/**\n * This module contains the table component.\n * @module\n */\n\nexport interface TableProps extends TableHTMLAttributes<HTMLTableElement> {\n /**\n * An easy to understand description of the table. Required for accessibility.\n */\n caption: string\n}\n\n/**\n * An accessible table component.\n * @definition [ARIA Table pattern](https://www.w3.org/WAI/ARIA/apg/patterns/table/)\n * @see https://cerberus.digitalu.design/react/table.\n * @example\n * ```tsx\n * <Table caption=\"Basic Table\">\n * {children}\n * </Table>\n * ```\n */\nexport function Table(props: PropsWithChildren<TableProps>) {\n const { caption, children, ...nativeProps } = props\n const styles = table()\n\n return (\n <div className={styles.container}>\n <table\n {...nativeProps}\n className={cx(nativeProps.className, styles.table)}\n >\n <caption className={styles.caption}>{caption}</caption>\n {children}\n </table>\n </div>\n )\n}\n\n// We only provide this for consistency with the rest of the components\n\nexport type TrProps = TableHTMLAttributes<HTMLTableRowElement>\n\n/**\n * The Tr component is used to render a table row.\n * @definition [Table docs](https://cerberus.digitalu.design/react/table)\n * @example\n * ```tsx\n * <Tr>\n * {children}\n * </Tr>\n * ```\n */\nexport function Tr(props: PropsWithChildren<TrProps>) {\n return <tr {...props} />\n}\n","import { cx } from '@cerberus/styled-system/css'\nimport { thead } from '@cerberus/styled-system/recipes'\n\n/**\n * This module contains the Thead component.\n * @module\n */\n\nexport type TheadProps = JSX.IntrinsicElements['thead']\n\n/**\n * The Thead component is used to render a table header.\n * @see https://cerberus.digitalu.design/react/table\n * @memberof module:Table\n * @example\n * ```tsx\n * <Thead>\n * {children}\n * </Thead>\n * ```\n */\nexport function Thead(props: TheadProps) {\n return <thead {...props} className={cx(props.className, thead())} />\n}\n","'use client'\n\nimport { css, cx } from '@cerberus/styled-system/css'\nimport { th, type ThVariantProps } from '@cerberus/styled-system/recipes'\nimport type { MouseEvent } from 'react'\nimport { Show } from './Show'\n\n/**\n * Th component for the Table component\n * @module\n */\n\nexport type ThBaseProps = JSX.IntrinsicElements['th'] & {\n /**\n * Converts the Th into a actionable button. Called when the user clicks on\n * the Th.\n */\n onClick?: (e: MouseEvent<HTMLButtonElement>) => void\n}\nexport type ThProps = ThBaseProps & ThVariantProps\n\n/**\n * Styles for the Th component\n * @see https://cerberus.digitalu.design/react/table\n * @memberof module:Table\n * @example\n * ```tsx\n * <Th>Header 1</Th>\n * ```\n * @example\n * ```tsx\n * <Th onClick={handleClick}>\n * Names\n * <SortIcon />\n * </Th>\n * ```\n */\nexport function Th(props: ThProps) {\n const { size, onClick, ...nativeProps } = props\n return (\n <Show\n when={Boolean(onClick)}\n fallback={\n <th\n {...nativeProps}\n className={cx(nativeProps.className, th({ size }))}\n />\n }\n >\n <th {...nativeProps}>\n <button\n className={cx(\n nativeProps.className,\n th({ size }),\n css({\n alignItems: 'center',\n display: 'inline-flex',\n justifyContent: 'space-between',\n userSelect: 'none',\n w: 'full',\n _hover: {\n bgColor: 'page.bg.100',\n },\n }),\n )}\n onClick={onClick}\n >\n {props.children}\n </button>\n </th>\n </Show>\n )\n}\n","import { cx } from '@cerberus/styled-system/css'\nimport { td, type TdVariantProps } from '@cerberus/styled-system/recipes'\n\n/**\n * Th component for the Td component\n * @module\n */\n\nexport type TdBaseProps = JSX.IntrinsicElements['td']\nexport type TdProps = TdBaseProps & TdVariantProps\n\n/**\n * Styles for the Th component\n * @see https://cerberus.digitalu.design/react/table\n * @memberof module:Table\n * @example\n * ```tsx\n * <Td>Data cell</Td>\n * ```\n */\nexport function Td(props: TdProps) {\n const { size, ...nativeProps } = props\n return (\n <td\n {...nativeProps}\n className={cx(\n nativeProps.className,\n td({\n size,\n }),\n )}\n />\n )\n}\n","import { tbody, type TbodyVariantProps } from '@cerberus/styled-system/recipes'\nimport { cx } from '@cerberus/styled-system/css'\n\n/**\n * This module provides a TBody component.\n * @module\n */\n\nexport type TbodyBaseProps = JSX.IntrinsicElements['tbody']\nexport type TbodyProps = TbodyBaseProps & TbodyVariantProps\n\n/**\n * The TBody component is used to render a table body.\n * @see https://cerberus.digitalu.design/react/table\n * @memberof module:Table\n * @example\n * ```tsx\n * <TBody>\n * {children}\n * </TBody>\n * ```\n */\nexport function Tbody(props: TbodyProps) {\n const { decoration, ...nativeProps } = props\n return (\n <tbody\n {...nativeProps}\n className={cx(\n nativeProps.className,\n tbody({\n decoration,\n }),\n )}\n />\n )\n}\n","import type {\n HTMLAttributes,\n MouseEventHandler,\n PropsWithChildren,\n} from 'react'\nimport { Show } from './Show'\nimport { css, cx } from '@cerberus/styled-system/css'\nimport {\n iconButton,\n tag,\n type TagVariantProps,\n} from '@cerberus/styled-system/recipes'\nimport { $cerberusIcons } from '../config/defineIcons'\n\n/**\n * This module contains the tag component.\n * @module\n */\n\nexport type StaticTagProps = HTMLAttributes<HTMLSpanElement> &\n TagVariantProps & {\n /**\n * The action to be performed when the tag is clicked. Not available when\n * the palette or gradient props are provided.\n */\n onClick?: never\n }\n\nexport type ClickableTagProps = HTMLAttributes<HTMLSpanElement> & {\n /**\n * The gradient to apply to the tag. Not available when the onClick prop is\n * provided.\n */\n gradient?: never\n /**\n * The palette to use for the tag. Not available when the onClick prop is\n * provided.\n */\n palette?: never\n /**\n * The action to be performed when the tag is clicked.\n */\n onClick: MouseEventHandler<HTMLSpanElement>\n /**\n * The shape of the tag. Not available when the onClick prop is provided.\n * @type 'pill' | 'rounded'\n * @default 'pill'\n */\n shape?: never\n /**\n * The usage of the tag. Not available when the onClick prop is provided.\n * @type 'filled' | 'outlined'\n * @default 'filled'\n */\n usage?: never\n}\n\nexport type TagProps = StaticTagProps | ClickableTagProps\n\n/**\n * The Tag component is used to display a meta descriptions.\n * @see https://cerberus.digitalu.design/react/tag\n * @example\n * ```tsx\n * <Tag>Tag</Tag>\n * ```\n */\nexport function Tag(props: PropsWithChildren<TagProps>): JSX.Element {\n const { shape: initShape, gradient, onClick, usage, ...nativeProps } = props\n const palette = props?.palette ?? 'page'\n const isClosable = Boolean(onClick)\n const shape = isClosable ? 'pill' : initShape\n const closableStyles = isClosable ? closableCss : ''\n const { close: Close } = $cerberusIcons\n\n return (\n <span\n {...nativeProps}\n className={cx(\n nativeProps.className,\n tag({\n gradient,\n palette,\n shape,\n usage,\n }),\n closableStyles,\n )}\n >\n {props.children}\n\n <Show when={isClosable}>\n <button\n aria-label=\"Close\"\n className={iconButton({\n palette: 'action',\n usage: 'filled',\n size: 'sm',\n })}\n onClick={onClick}\n >\n <Close />\n </button>\n </Show>\n </span>\n )\n}\n\nconst closableCss = css({\n bgColor: 'action.bg.active',\n color: 'action.text.initial',\n paddingInlineEnd: '0',\n})\n","import {\n Em,\n H1,\n H2,\n H3,\n H4,\n H5,\n H6,\n P,\n Small,\n Span,\n Strong,\n type PProps,\n} from '@cerberus/styled-system/jsx'\nimport { type HTMLAttributes, type PropsWithChildren } from 'react'\n\n/**\n * This module exports a component for rendering text utilizing the styled-system JSX utility.\n * @module @cerberus/react/Text\n */\n\nexport type Headings = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'\nexport type TextElements = 'p' | 'strong' | 'em' | 'small' | 'span'\n\n// For some reason we have to use the HTMLParagraphElement type here\n// or else TS will fail for non-style props like 'id' or 'className'\nexport interface TextProps\n extends PProps,\n HTMLAttributes<HTMLParagraphElement> {\n /**\n * The element to render as. Defaults to 'p'.\n */\n as?: TextElements | Headings\n}\n\n/**\n * A component for rendering text utilizing the styled-system JSX utility.\n * @definition [Text docs](https://cerberus.digitalu.design/react/text)\n * @example\n * ```tsx\n * <Text as=\"h1\" color=\"page.text.100\" textStyle={{\n * base: 'heading-md',\n * md: 'heading-lg',\n * }}>\n * Hello, world!\n * </Text>\n */\nexport function Text(props: PropsWithChildren<TextProps>) {\n const { as = 'p', ...pandaJSXProps } = props\n switch (as) {\n case 'h1':\n return <H1 {...pandaJSXProps} />\n case 'h2':\n return <H2 {...pandaJSXProps} />\n case 'h3':\n return <H3 {...pandaJSXProps} />\n case 'h4':\n return <H4 {...pandaJSXProps} />\n case 'h5':\n return <H5 {...pandaJSXProps} />\n case 'h6':\n return <H6 {...pandaJSXProps} />\n case 'strong':\n return <Strong {...pandaJSXProps} />\n case 'em':\n return <Em {...pandaJSXProps} />\n case 'small':\n return <Small {...pandaJSXProps} />\n case 'span':\n return <Span {...pandaJSXProps} />\n default:\n return <P {...pandaJSXProps} />\n }\n}\n","'use client'\n\nimport type { TextareaHTMLAttributes } from 'react'\nimport { css, cx } from '@cerberus/styled-system/css'\nimport { input, type InputVariantProps } from '@cerberus/styled-system/recipes'\nimport { useFieldContext } from '../context/field'\n\n/**\n * This module contains the Textarea component.\n * @module\n */\n\nexport interface TextareaBaseProps\n extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'id'> {\n /**\n * The ID of the FieldMessage that describes the textarea.\n */\n describedBy?: string\n /**\n * The unique id of the textarea.\n */\n id: string\n}\nexport type TextareaProps = InputVariantProps & TextareaBaseProps\n\n/**\n * A component that allows the user to input large blocks of text.\n * @see https://cerberus.digitalu.design/react/textarea\n */\nexport function Textarea(props: TextareaProps): JSX.Element {\n const { describedBy, ...nativeProps } = props\n const { invalid, ...fieldState } = useFieldContext()\n\n return (\n <textarea\n {...nativeProps}\n {...fieldState}\n {...(describedBy && { 'aria-describedby': describedBy })}\n {...(invalid && { 'aria-invalid': true })}\n className={cx(\n props.className,\n input().input,\n css({\n pxi: '2',\n py: '2',\n resize: 'vertical',\n }),\n )}\n rows={4}\n />\n )\n}\n","'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\n/**\n * This module provides a toggle component.\n * @module\n */\n\nexport type ToggleBase = Omit<\n InputHTMLAttributes<HTMLInputElement>,\n 'size' | 'id' | 'value'\n> & {\n /**\n * The FieldMessage providing context for the Toggle.\n */\n describedBy?: string\n /**\n * A unique identifier for the Toggle. Required for accessibility.\n */\n id: string\n /**\n * The value of the Toggle.\n */\n value: string\n}\nexport type ToggleProps = ToggleBase & ToggleVariantProps\n\n/**\n * The Toggle component is used to switch between two states. Optionally\n * combine with the `useToggle` hook.\n * @see https://cerberus.digitalu.design/react/toggle\n * @example\n * ```tsx\n * const { checked, handleChange } = useToggle({ checked: 'toggle' })\n *\n * <Hstack justify=\"space-between\" w=\"full\">\n * <Field>\n * <Label htmlFor=\"toggle\">Show notifications</Label>\n * <Toggle\n * checked={checked === 'toggle'}\n * id=\"toggle\"\n * onChange={handleChange}\n * value=\"toggle\"\n * />\n * </Field>\n * </Hstack>\n * ```\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 Tooltip as ArkTooltip,\n type TooltipContentProps,\n} from '@ark-ui/react/tooltip'\nimport { cx } from '@cerberus/styled-system/css'\nimport { tooltip } from '@cerberus/styled-system/recipes'\nimport type { ReactNode } from 'react'\n\n/**\n * This module contains the Tooltip component.\n * @module Tooltip\n */\n\nexport interface TooltipProps {\n /**\n * The text content to display in the tooltip.\n */\n content: ReactNode\n /**\n * The position of the tooltip relative to the trigger element.\n */\n position?: 'top' | 'right' | 'bottom' | 'left'\n}\n\n/**\n * The Tooltip component is used to provide additional information about an element when it is hovered over.\n * @definition [Tooltip docs](https://cerberus.digitalu.design/react/tooltip)\n * @example\n * ```tsx\n * <Tooltip content=\"This is a tooltip\">\n * <Information />\n * </Tooltip>\n */\nexport function Tooltip(props: TooltipProps & TooltipContentProps) {\n const { content, children, asChild, ...nativeProps } = props\n const styles = tooltip()\n const position = {\n placement: props.position || 'top',\n }\n\n return (\n <ArkTooltip.Root openDelay={400} positioning={position}>\n <ArkTooltip.Trigger className={styles.trigger} asChild={asChild}>\n {children}\n </ArkTooltip.Trigger>\n\n <ArkTooltip.Positioner>\n <ArkTooltip.Content\n {...nativeProps}\n className={cx(nativeProps.className, styles.content)}\n >\n <ArkTooltip.Arrow className={styles.arrow}>\n <ArkTooltip.ArrowTip className={styles.arrowTip} />\n </ArkTooltip.Arrow>\n\n {content}\n </ArkTooltip.Content>\n </ArkTooltip.Positioner>\n </ArkTooltip.Root>\n )\n}\n","'use client'\n\nimport {\n createContext,\n useCallback,\n useContext,\n useMemo,\n useRef,\n useState,\n type MouseEvent,\n type PropsWithChildren,\n type ReactNode,\n} from 'react'\nimport { Portal } from '../components/Portal'\nimport { Button } from '../components/Button'\nimport { css } from '@cerberus/styled-system/css'\nimport { hstack } from '@cerberus/styled-system/patterns'\nimport { $cerberusIcons } from '../config/defineIcons'\nimport { trapFocus } from '../aria-helpers/trap-focus.aria'\nimport { Show } from '../components/Show'\nimport { Modal } from '../components/Modal'\nimport { useModal } from '../hooks/useModal'\nimport { ModalHeader } from '../components/ModalHeader'\nimport { ModalHeading } from '../components/ModalHeading'\nimport { ModalDescription } from '../components/ModalDescription'\nimport { Avatar } from '../components/Avatar'\nimport { HStack, VStack } from '@cerberus/styled-system/jsx'\n\n/**\n * This module provides a context and hook for the confirm modal.\n * @module\n */\n\nexport interface BaseConfirmOptions {\n /**\n * The heading of the confirm modal.\n */\n heading: string\n /**\n * The text for the action button.\n */\n actionText: string\n /**\n * The text for the cancel button.\n */\n cancelText: string\n}\n\nexport interface DestructiveConfirmOptions extends BaseConfirmOptions {\n /**\n * The kind of confirm modal to show.\n */\n kind?: 'destructive'\n /**\n * The description of the confirm modal. Can only be a string for destructive confirm modals.\n */\n description?: string\n}\n\nexport interface NonDestructiveConfirmModalOptions extends BaseConfirmOptions {\n /**\n * The kind of confirm modal to show.\n * @default 'non-destructive'\n */\n kind?: 'non-destructive'\n /**\n * The description of the confirm modal. Can be a ReactNode for non-destructive kind if you need to display text links.\n * @example\n * ```tsx\n * description: <>Use a Fragment because we put the content within a Paragraph tag.</>\n */\n description?: ReactNode\n}\n\nexport type ShowConfirmModalOptions =\n | NonDestructiveConfirmModalOptions\n | DestructiveConfirmOptions\n\nexport type ShowResult =\n | ((value: boolean | PromiseLike<boolean>) => void)\n | null\n\nexport interface ConfirmModalValue {\n show: (options: ShowConfirmModalOptions) => Promise<boolean>\n}\n\nconst ConfirmModalContext = createContext<ConfirmModalValue | null>(null)\n\nexport type ConfirmModalProviderProps = PropsWithChildren<unknown>\n\n/**\n * Provides a confirm modal to the app.\n * @see https://cerberus.digitalu.design/react/confirm-modal\n * @example\n * ```tsx\n * // Wrap the Provider around the root of the feature.\n * <ConfirmModal>\n * <SomeFeatureSection />\n * </ConfirmModal>\n *\n * // Use the hook to show the confirm modal.\n * const confirm = useConfirmModal()\n *\n * const handleClick = useCallback(async () => {\n * const userConsent = await confirm.show({\n * heading: 'Add new payment method?',\n * description:\n * 'This will add a new payment method to your account to be billed for future purchases.',\n * actionText: 'Yes, add payment method',\n * cancelText: 'No, cancel',\n * })\n * setConsent(userConsent)\n * }, [confirm])\n * ```\n */\nexport function ConfirmModal(\n props: PropsWithChildren<ConfirmModalProviderProps>,\n) {\n const { modalRef, show, close } = useModal()\n const resolveRef = useRef<ShowResult>(null)\n const [content, setContent] = useState<ShowConfirmModalOptions | null>(null)\n const focusTrap = trapFocus(modalRef)\n const ConfirmIcon = $cerberusIcons.confirmModal\n const kind = content?.kind ?? 'non-destructive'\n\n const palette = useMemo(\n () => (kind === 'destructive' ? 'danger' : 'action'),\n [kind],\n )\n\n const handleChoice = useCallback(\n (e: MouseEvent<HTMLButtonElement>) => {\n const target = e.currentTarget as HTMLButtonElement\n if (target.value === 'true') {\n resolveRef.current?.(true)\n }\n resolveRef.current?.(false)\n close()\n },\n [close],\n )\n\n const handleShow = useCallback(\n (options: ShowConfirmModalOptions) => {\n return new Promise<boolean>((resolve) => {\n setContent({ ...options })\n show()\n resolveRef.current = resolve\n })\n },\n [show],\n )\n\n const value = useMemo(\n () => ({\n show: handleShow,\n }),\n [handleShow],\n )\n\n return (\n <ConfirmModalContext.Provider value={value}>\n {props.children}\n\n <Portal>\n <Modal onKeyDown={focusTrap} ref={modalRef}>\n <VStack gap=\"xl\" w=\"full\">\n <ModalHeader>\n <div\n className={hstack({\n justify: 'center',\n w: 'full',\n })}\n >\n <Show\n when={palette === 'danger'}\n fallback={\n <Avatar\n ariaLabel=\"\"\n gradient=\"charon-light\"\n icon={<ConfirmIcon size={24} />}\n src=\"\"\n />\n }\n >\n <Avatar\n ariaLabel=\"\"\n gradient=\"hades-dark\"\n icon={<ConfirmIcon size={24} />}\n src=\"\"\n />\n </Show>\n </div>\n <ModalHeading>{content?.heading}</ModalHeading>\n <ModalDescription>{content?.description}</ModalDescription>\n </ModalHeader>\n\n <HStack gap=\"4\" w=\"full\">\n <Button\n autoFocus\n className={css({\n w: '1/2',\n })}\n name=\"confirm\"\n onClick={handleChoice}\n palette={palette}\n value=\"true\"\n >\n {content?.actionText}\n </Button>\n <Button\n className={css({\n w: '1/2',\n })}\n name=\"cancel\"\n onClick={handleChoice}\n usage=\"outlined\"\n value=\"false\"\n >\n {content?.cancelText}\n </Button>\n </HStack>\n </VStack>\n </Modal>\n </Portal>\n </ConfirmModalContext.Provider>\n )\n}\n\nexport function useConfirmModal(): ConfirmModalValue {\n const context = useContext(ConfirmModalContext)\n if (context === null) {\n throw new Error(\n 'useConfirmModal must be used within a ConfirmModal Provider',\n )\n }\n return context\n}\n","'use client'\n\nimport { useCallback, useMemo, useRef, useState, type RefObject } from 'react'\n\n/**\n * This module provides a hook for using a custom modal.\n * @module\n */\n\nexport interface UseModalReturnValue {\n /**\n * The ref for the modal.\n */\n modalRef: RefObject<HTMLDialogElement>\n /**\n * Shows the modal.\n */\n show: () => void\n /**\n * Closes the modal.\n */\n close: () => void\n /**\n * Whether the modal is open based on the show and close methods.\n */\n isOpen: boolean\n}\n\n/**\n * Provides a hook for using a custom modal via the native dialog element\n * methods.\n *\n * Cerberus modals use the native dialog element. This hook\n * does not control the modal via React state but rather by calling the\n * native dialog element's `showModal` and `close` methods.\n *\n * @memberof module:Modal\n * @see https://cerberus.digitalu.design/react/modal\n * @description [Moz Dev Dialog Docs](https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement/showModal)\n */\nexport function useModal(): UseModalReturnValue {\n const modalRef = useRef<HTMLDialogElement | null>(null)\n const [isOpen, setIsOpen] = useState<boolean>(false)\n\n const show = useCallback(() => {\n modalRef.current?.showModal()\n setIsOpen(true)\n }, [])\n\n const close = useCallback(() => {\n modalRef.current?.close()\n setIsOpen(false)\n }, [])\n\n return useMemo(() => {\n return {\n modalRef,\n show,\n close,\n isOpen,\n }\n }, [modalRef, show, close, isOpen])\n}\n","'use client'\n\nimport {\n createContext,\n useCallback,\n useContext,\n useMemo,\n useState,\n type MouseEvent,\n type MouseEventHandler,\n type PropsWithChildren,\n type ReactNode,\n} from 'react'\nimport { Portal } from '../components/Portal'\nimport { Button } from '../components/Button'\nimport { $cerberusIcons } from '../config/defineIcons'\nimport { trapFocus } from '../aria-helpers/trap-focus.aria'\nimport { Show } from '../components/Show'\nimport { Modal } from '../components/Modal'\nimport { useModal } from '../hooks/useModal'\nimport { ModalHeader } from '../components/ModalHeader'\nimport { ModalHeading } from '../components/ModalHeading'\nimport { ModalDescription } from '../components/ModalDescription'\nimport { Avatar } from '../components/Avatar'\nimport { HStack } from '@cerberus/styled-system/jsx'\nimport { IconButton } from '../components/IconButton'\nimport { css } from '@cerberus/styled-system/css'\nimport { VStack } from '@cerberus/styled-system/jsx'\n\n/**\n * This module provides a context and hook for the cta modal.\n * @module\n */\n\nexport interface ShowCTAModalOptions {\n /**\n * The heading of the cta modal.\n */\n heading: string\n /**\n * The description of the cta modal.\n */\n description?: string\n /**\n * The icon used for the modal Avatar.\n */\n icon?: ReactNode\n /**\n * The actions for the cta modal. Max of 2 actions.\n */\n actions: {\n text: string\n onClick: MouseEventHandler<HTMLButtonElement>\n }[]\n}\n\nexport interface CTAModalValue {\n show: (options: ShowCTAModalOptions) => void\n}\n\nconst CTAModalContext = createContext<CTAModalValue | null>(null)\n\nexport type CTAModalProviderProps = PropsWithChildren<unknown>\n\n/**\n * Provides a CTA modal to the app.\n * @see https://cerberus.digitalu.design/react/cta-modal\n * @example\n * ```tsx\n * // Wrap the Provider around the root of the feature.\n * <CTAModal>\n * <SomeFeatureSection />\n * </CTAModal>\n *\n * // Use the hook to show the cta modal.\n * const cta = useCTAModal()\n *\n * const handleClick = useCallback(async () => {\n * const userConsent = await cta.show({\n * heading: 'Create or copy a Cohort',\n * description:\n * 'Create a new cohort or copy and existing one.',\n * icon: <Copy size={24} />,\n * actions: [\n * {\n * text: 'Create Cohort',\n * onClick: () => {},\n * {\n * text: 'Copy Cohort',\n * onClick: () => {}\n * }\n * })\n * setConsent(userConsent)\n * }, [cta])\n * ```\n */\nexport function CTAModal(props: PropsWithChildren<CTAModalProviderProps>) {\n const { modalRef, show, close } = useModal()\n const [content, setContent] = useState<ShowCTAModalOptions | null>(null)\n const focusTrap = trapFocus(modalRef)\n const FallbackIcon = $cerberusIcons.confirmModal\n const confirmIcon = content?.icon\n const { close: CloseIcon } = $cerberusIcons\n\n const handleShow = useCallback(\n (options: ShowCTAModalOptions) => {\n const maxActions = 2\n if (options.actions.length > maxActions) {\n throw new Error(\n `CTA Modal only supports a maximum of ${maxActions} actions.`,\n )\n }\n setContent({ ...options })\n show()\n },\n [show],\n )\n\n const handleActionClick = useCallback(\n (event: MouseEvent<HTMLButtonElement>) => {\n const index = event.currentTarget.getAttribute('data-index')\n const action = content?.actions[Number(index)]\n const { onClick } = action || {}\n onClick?.(event)\n close()\n },\n [content, close],\n )\n\n const value = useMemo(\n () => ({\n show: handleShow,\n }),\n [handleShow],\n )\n\n return (\n <CTAModalContext.Provider value={value}>\n {props.children}\n\n <Portal>\n <Modal onKeyDown={focusTrap} ref={modalRef}>\n <span\n className={css({\n padding: 'md',\n position: 'absolute',\n right: 0,\n top: 0,\n zIndex: 'decorator',\n })}\n >\n <IconButton ariaLabel=\"Close modal\" onClick={close}>\n <CloseIcon />\n </IconButton>\n </span>\n\n <VStack gap=\"xl\" w=\"full\">\n <ModalHeader>\n <VStack gap=\"lg\" w=\"full\">\n <Avatar\n ariaLabel=\"\"\n gradient=\"charon-light\"\n icon={\n <Show\n when={Boolean(confirmIcon)}\n fallback={<FallbackIcon size={24} />}\n >\n {confirmIcon}\n </Show>\n }\n src=\"\"\n />\n <ModalHeading>{content?.heading}</ModalHeading>\n <ModalDescription>{content?.description}</ModalDescription>\n </VStack>\n </ModalHeader>\n\n <HStack gap=\"md\" w=\"full\">\n <Show when={Boolean(content?.actions?.length)}>\n {content?.actions?.map((action, index) => (\n <Button\n data-index={index}\n className={css({\n w: '1/2',\n })}\n key={index}\n onClick={handleActionClick}\n shape=\"rounded\"\n usage=\"outlined\"\n >\n {action.text}\n </Button>\n ))}\n </Show>\n </HStack>\n </VStack>\n </Modal>\n </Portal>\n </CTAModalContext.Provider>\n )\n}\n\nexport function useCTAModal(): CTAModalValue {\n const context = useContext(CTAModalContext)\n if (context === null) {\n throw new Error('useCTAModal must be used within a CTAModal Provider')\n }\n return context\n}\n","'use client'\n\nimport {\n createContext,\n useCallback,\n useContext,\n useMemo,\n useState,\n type MouseEvent,\n type PropsWithChildren,\n type ReactNode,\n} from 'react'\nimport { Show } from '../components/Show'\nimport { NotificationHeading } from '../components/NotificationHeading'\nimport { NotificationDescription } from '../components/NotificationDescription'\nimport { Notification } from '../components/Notification'\nimport { animateIn, vstack } from '@cerberus/styled-system/patterns'\nimport { Portal, type PortalProps } from '../components/Portal'\nimport { notification } from '@cerberus/styled-system/recipes'\nimport { Button } from '../components/Button'\nimport { cx } from '@cerberus/styled-system/css'\n\n/**\n * This module provides a context and hook for notifications.\n * @module\n */\n\nexport interface NotifyOptions {\n /**\n * The palette of the notification.\n * @default 'info'\n */\n palette: 'info' | 'success' | 'warning' | 'danger'\n /**\n * The heading of the notification.\n */\n heading: string\n /**\n * The unique id of the notification.\n */\n id?: string\n /**\n * The description of the notification.\n */\n description?: ReactNode\n /**\n * The action to take when the notification is closed\n */\n onClose?: () => void\n}\n\nexport interface NotificationsValue {\n notify: (options: NotifyOptions) => void\n}\n\nconst NotificationsContext = createContext<NotificationsValue | null>(null)\n\nexport type NotificationsProviderProps = PortalProps\n\n/**\n * Provides a notification center to the app.\n * @see https://cerberus.digitalu.design/react/notification\n * @example\n * ```tsx\n * // Wrap the Provider around the root of the feature.\n * <Notifications>\n * <SomeFeatureSection />\n * </Notifications>\n *\n * // Use the hook to show a notification.\n * const notify = useNotifications()\n *\n * const handleClick = useCallback(() => {\n * notify({\n * palette: 'info',\n * heading: 'New feature!',\n * description: 'We have added a new feature to the app.',\n * })\n * }, [notify])\n * ```\n */\nexport function NotificationCenter(\n props: PropsWithChildren<NotificationsProviderProps>,\n) {\n const [activeNotifications, setActiveNotifications] = useState<\n NotifyOptions[]\n >([])\n const styles = notification()\n\n const handleNotify = useCallback((options: NotifyOptions) => {\n setActiveNotifications((prev) => {\n const id = `${options.palette}:${prev.length + 1}`\n return [...prev, { ...options, id }]\n })\n }, [])\n\n const handleClose = useCallback((e: MouseEvent<HTMLButtonElement>) => {\n const target = e.currentTarget as HTMLButtonElement\n setActiveNotifications((prev) => {\n const item = prev.find((option) => option.id === target.value)\n if (item?.onClose) item.onClose()\n return prev.filter((option) => option.id !== target.value)\n })\n }, [])\n\n const handleCloseAll = useCallback(() => {\n setActiveNotifications((prev) => {\n prev.forEach((item) => {\n if (item.onClose) item.onClose()\n })\n return []\n })\n }, [])\n\n const value = useMemo(\n () => ({\n notify: handleNotify,\n }),\n [handleNotify],\n )\n\n // For some reason, the vstack pattern alignItems is not registering here.\n // So we are forcing it with the style prop.\n\n return (\n <NotificationsContext.Provider value={value}>\n {props.children}\n\n <Show when={activeNotifications.length > 0}>\n <Portal container={props.container}>\n <div className={styles.center}>\n <Show when={activeNotifications.length >= 4}>\n <Button\n className={cx(styles.closeAll, animateIn())}\n onClick={handleCloseAll}\n palette=\"action\"\n shape=\"rounded\"\n size=\"sm\"\n usage=\"ghost\"\n >\n Close all\n </Button>\n </Show>\n\n <div\n className={vstack({\n alignItems: 'flex-end',\n gap: '4',\n })}\n style={{\n alignItems: 'flex-end',\n }}\n >\n {activeNotifications.map((option) => (\n <MatchNotification\n key={option.id}\n {...option}\n onClose={handleClose}\n />\n ))}\n </div>\n </div>\n </Portal>\n </Show>\n </NotificationsContext.Provider>\n )\n}\n\ninterface MatchNotificationProps extends Omit<NotifyOptions, 'onClose'> {\n onClose: (e: MouseEvent<HTMLButtonElement>) => void\n key: string | undefined\n}\n\nfunction MatchNotification(props: MatchNotificationProps) {\n const { palette, id, onClose, heading, description } = props\n\n switch (palette) {\n case 'success':\n return (\n <Notification\n id={id!}\n key={id}\n onClose={onClose}\n open\n palette=\"success\"\n >\n <NotificationHeading palette=\"success\">{heading}</NotificationHeading>\n <NotificationDescription palette=\"success\">\n {description}\n </NotificationDescription>\n </Notification>\n )\n\n case 'warning':\n return (\n <Notification\n id={id!}\n key={id}\n onClose={onClose}\n open\n palette=\"warning\"\n >\n <NotificationHeading palette=\"warning\">{heading}</NotificationHeading>\n <NotificationDescription palette=\"warning\">\n {description}\n </NotificationDescription>\n </Notification>\n )\n\n case 'danger':\n return (\n <Notification id={id!} key={id} onClose={onClose} open palette=\"danger\">\n <NotificationHeading palette=\"danger\">{heading}</NotificationHeading>\n <NotificationDescription palette=\"danger\">\n {description}\n </NotificationDescription>\n </Notification>\n )\n\n case 'info':\n default:\n return (\n <Notification id={id!} key={id} onClose={onClose} open palette=\"info\">\n <NotificationHeading palette=\"info\">{heading}</NotificationHeading>\n <NotificationDescription palette=\"info\">\n {description}\n </NotificationDescription>\n </Notification>\n )\n }\n}\n\n/**\n * The hook to use the NotificationCenter.\n * @returns The notify method to trigger a notification.\n * @example\n * ```tsx\n * const {notify} = useNotificationCenter()\n * notify({\n * palette: 'info',\n * heading: 'New feature',\n * description: 'We have added a new feature to the app.',\n * })\n * ```\n */\nexport function useNotificationCenter(): NotificationsValue {\n const context = useContext(NotificationsContext)\n if (!context) {\n throw new Error(\n 'useNotificationCenter must be used within a NotificationsProvider',\n )\n }\n return context\n}\n","'use client'\n\nimport {\n createContext,\n useCallback,\n useContext,\n useMemo,\n useRef,\n useState,\n type ChangeEvent,\n type MouseEvent,\n type PropsWithChildren,\n} from 'react'\nimport { Portal } from '../components/Portal'\nimport { Button } from '../components/Button'\nimport { css } from '@cerberus/styled-system/css'\nimport { hstack, vstack } from '@cerberus/styled-system/patterns'\nimport { trapFocus } from '../aria-helpers/trap-focus.aria'\nimport { Input } from '../components/Input'\nimport { Field } from './field'\nimport { Label } from '../components/Label'\nimport { $cerberusIcons } from '../config/defineIcons'\nimport { Show } from '../components/Show'\nimport { useModal } from '../hooks/useModal'\nimport { Modal } from '../components/Modal'\nimport { ModalHeader } from '../components/ModalHeader'\nimport { ModalHeading } from '../components/ModalHeading'\nimport { ModalDescription } from '../components/ModalDescription'\nimport { Avatar } from '../components/Avatar'\n\n/**\n * This module provides a context and hook for the prompt modal.\n * @module PromptModal\n */\n\nexport interface ShowPromptModalOptions {\n /**\n * The kind of prompt modal to show.\n * @default 'non-destructive'\n */\n kind?: 'destructive' | 'non-destructive'\n /**\n * The heading of the prompt modal.\n */\n heading: string\n /**\n * The description of the prompt modal.\n */\n description?: string\n /**\n * The key to confirm the action.\n */\n key: string\n /**\n * The text for the action button.\n */\n actionText: string\n /**\n * The text for the cancel button.\n */\n cancelText: string\n}\nexport type PromptShowResult =\n | ((value: string | PromiseLike<string>) => void)\n | null\n\nexport interface PromptModalValue {\n /**\n * The method to trigger the prompt modal.\n * @returns the value of the key if the action is confirmed.\n * @example\n * ```tsx\n * const accepted = await prompt.show({\n * kind: 'destructive',\n * heading: 'Delete channel?',\n * description:\n * 'This will permanently delete a channel on your account. There is no going back.',\n * key: CHANNEL_NAME,\n * actionText: 'Yes, delete channel',\n * cancelText: 'No, cancel',\n * })\n */\n show: (options: ShowPromptModalOptions) => Promise<string>\n}\n\nconst PromptModalContext = createContext<PromptModalValue | null>(null)\n\nexport type PromptModalProviderProps = PropsWithChildren<unknown>\n\n/**\n * Provides a prompt modal to the app.\n * @see https://cerberus.digitalu.design/react/prompt-modal\n * @example\n * ```tsx\n * // Wrap the Provider around the root of the feature.\n * <PromptModal>\n * <SomeFeatureSection />\n * </PromptModal>\n *\n * // Use the hook to show the prompt modal.\n * const prompt = usePromptModal()\n *\n * const handleClick = useCallback(async () => {\n * const accepted = await prompt.show({\n * kind: 'destructive',\n * heading: 'Delete channel?',\n * description:\n * 'This will permanently delete a channel on your account. There is no going back.',\n * key: CHANNEL_NAME,\n * actionText: 'Yes, delete channel',\n * cancelText: 'No, cancel',\n * })\n * // do something with accepted\n * }, [prompt])\n * ```\n */\nexport function PromptModal(\n props: PropsWithChildren<PromptModalProviderProps>,\n) {\n const { modalRef, show, close } = useModal()\n const resolveRef = useRef<PromptShowResult>(null)\n const [content, setContent] = useState<ShowPromptModalOptions | null>(null)\n const [inputValue, setInputValue] = useState<string>('')\n const focusTrap = trapFocus(modalRef)\n const PromptIcon = $cerberusIcons.promptModal\n\n const isValid = useMemo(\n () => inputValue === content?.key,\n [inputValue, content],\n )\n\n const palette = useMemo(\n () => (content?.kind === 'destructive' ? 'danger' : 'action'),\n [content],\n )\n\n const handleChange = useCallback(\n (e: ChangeEvent<HTMLInputElement>) => {\n setInputValue(e.currentTarget.value)\n },\n [content],\n )\n\n const handleChoice = useCallback(\n (e: MouseEvent<HTMLButtonElement>) => {\n const target = e.currentTarget as HTMLButtonElement\n if (target.value === 'true') {\n resolveRef.current?.(inputValue)\n }\n close()\n },\n [inputValue, close],\n )\n\n const handleShow = useCallback(\n (options: ShowPromptModalOptions) => {\n return new Promise<string>((resolve) => {\n setContent({ ...options, kind: options.kind || 'non-destructive' })\n show()\n resolveRef.current = resolve\n })\n },\n [show],\n )\n\n const value = useMemo(\n () => ({\n show: handleShow,\n }),\n [handleShow],\n )\n\n return (\n <PromptModalContext.Provider value={value}>\n {props.children}\n\n <Portal>\n <Modal onKeyDown={focusTrap} ref={modalRef}>\n <ModalHeader>\n <div\n className={hstack({\n justify: 'center',\n w: 'full',\n })}\n >\n <Show\n when={palette === 'danger'}\n fallback={\n <Avatar\n ariaLabel=\"\"\n gradient=\"charon-light\"\n icon={<PromptIcon size={24} />}\n src=\"\"\n />\n }\n >\n <Avatar\n ariaLabel=\"\"\n gradient=\"hades-dark\"\n icon={<PromptIcon size={24} />}\n src=\"\"\n />\n </Show>\n </div>\n <ModalHeading>{content?.heading}</ModalHeading>\n <ModalDescription>{content?.description}</ModalDescription>\n </ModalHeader>\n\n <div\n className={vstack({\n alignItems: 'flex-start',\n mt: '4',\n mb: '8',\n })}\n >\n <Field invalid={!isValid}>\n <Label\n className={css({\n gap: 1,\n justifyContent: 'flex-start',\n })}\n htmlFor=\"confirm\"\n size=\"md\"\n >\n Type\n <strong\n className={css({\n textTransform: 'uppercase',\n })}\n >\n {content?.key}\n </strong>\n to confirm\n </Label>\n <Input\n id=\"confirm\"\n name=\"confirm\"\n onChange={handleChange}\n type=\"text\"\n />\n </Field>\n </div>\n\n <div\n className={hstack({\n justifyContent: 'stretch',\n gap: '4',\n })}\n >\n <Button\n autoFocus\n className={css({\n w: '1/2',\n })}\n disabled={!isValid}\n name=\"confirm\"\n onClick={handleChoice}\n palette={palette}\n value=\"true\"\n >\n {content?.actionText}\n </Button>\n <Button\n className={css({\n w: '1/2',\n })}\n name=\"cancel\"\n onClick={handleChoice}\n usage=\"outlined\"\n value=\"false\"\n >\n {content?.cancelText}\n </Button>\n </div>\n </Modal>\n </Portal>\n </PromptModalContext.Provider>\n )\n}\n\n/**\n * Used to retrieve the context of the PromptModal provider.\n */\nexport function usePromptModal(): PromptModalValue {\n const context = useContext(PromptModalContext)\n if (context === null) {\n throw new Error('usePromptModal must be used within a PromptModal Provider')\n }\n return context\n}\n","'use client'\n\nimport { createContext, useContext, type PropsWithChildren } from 'react'\nimport { useTheme, type UseThemeOptions } from '../hooks/useTheme'\n\n/**\n * This module provides a context and hook for the theme.\n * @module Theme\n */\n\nexport type DefaultThemes = 'cerberus' | 'acheron'\nexport type CustomThemes<K extends string = DefaultThemes> = 'cerberus' | K\nexport type ColorModes = 'light' | 'dark' | 'system'\n\nexport interface ThemeContextValue<T extends string = DefaultThemes> {\n /**\n * The current theme.\n */\n theme: CustomThemes<T>\n /**\n * The current color mode.\n */\n mode: ColorModes\n /**\n * Called when the theme is updated.\n */\n updateTheme: (theme: T) => void\n /**\n * Called when the color mode is updated.\n */\n updateMode: (mode: ColorModes) => void\n}\n\nconst ThemeContext = createContext<ThemeContextValue<DefaultThemes> | null>(\n null,\n)\n\nexport interface ThemeProviderProps extends UseThemeOptions {\n /**\n * The default theme.\n */\n defaultTheme?: DefaultThemes\n /**\n * The default color mode.\n */\n defaultColorMode?: ColorModes\n}\n\n/**\n * A context provider that allows the user to set the theme and mode of the\n * application.\n * @see https://cerberus.digitalu.design/react/use-theme-context\n * @example\n * ```tsx\n * <ThemeProvider>\n * <App />\n * </ThemeProvider>\n * ```\n */\nexport function ThemeProvider(\n props: PropsWithChildren<ThemeProviderProps>,\n): JSX.Element {\n const state = useTheme(props.defaultTheme, props.defaultColorMode, {\n cache: props.cache,\n updateMode: props.updateMode,\n updateTheme: props.updateTheme,\n }) as ThemeContextValue<DefaultThemes>\n\n return (\n <ThemeContext.Provider value={state}>\n {props.children}\n </ThemeContext.Provider>\n )\n}\n\n/**\n * Used to access the theme context.\n */\nexport function useThemeContext(): ThemeContextValue<DefaultThemes> {\n const context = useContext(ThemeContext)\n if (!context) {\n throw new Error('useThemeContext must be used within a ThemeProvider')\n }\n return context\n}\n","'use client'\n\nimport {\n useCallback,\n useEffect,\n useLayoutEffect,\n useMemo,\n useState,\n} from 'react'\nimport {\n type ColorModes,\n type CustomThemes,\n type DefaultThemes,\n type ThemeContextValue,\n} from '../context/theme'\n\n/**\n * This module provides a hook for using the theme.\n * @module\n */\n\nexport const THEME_KEY = 'cerberus-theme'\nexport const MODE_KEY = 'cerberus-mode'\n\nexport interface UseThemeOptions<T extends string = DefaultThemes> {\n /**\n * Whether to cache the theme in local storage.\n */\n cache?: boolean\n /**\n * Called when the theme is updated.\n */\n updateTheme?: (theme: T) => void\n /**\n * Called when the color mode is updated.\n */\n updateMode?: (mode: ColorModes) => void\n}\n\n/**\n * Provides a hook for using the theme for a single instance of the application.\n * @see https://cerberus.digitalu.design/react/use-theme\n * @param defaultTheme The default theme.\n * @param defaultColorMode The default color mode.\n * @param options Additional options.\n */\nexport function useTheme<C extends string = DefaultThemes>(\n defaultTheme: CustomThemes<C> = 'cerberus',\n defaultColorMode: ColorModes = 'light',\n options: UseThemeOptions<C> = {},\n): ThemeContextValue<C> {\n const { updateMode, updateTheme, cache } = options\n const [theme, setTheme] = useState<CustomThemes<C>>(defaultTheme)\n const [colorMode, setColorMode] = useState<ColorModes>(defaultColorMode)\n\n const handleThemeChange = useCallback(\n (newTheme: C) => {\n setTheme(newTheme)\n updateTheme?.(newTheme)\n },\n [updateTheme],\n )\n\n const handleColorModeChange = useCallback(\n (newMode: ColorModes) => {\n setColorMode(newMode)\n updateMode?.(newMode)\n },\n [updateMode],\n )\n\n useLayoutEffect(() => {\n const theme = localStorage.getItem(THEME_KEY)\n if (theme) {\n setTheme(theme as CustomThemes<C>)\n }\n }, [])\n\n useLayoutEffect(() => {\n const mode = localStorage.getItem(MODE_KEY)\n if (mode) {\n setColorMode(mode as ColorModes)\n }\n }, [])\n\n useEffect(() => {\n const root = document.documentElement\n root.dataset.pandaTheme = theme\n\n if (cache) {\n localStorage.setItem(THEME_KEY, theme)\n }\n }, [theme, cache])\n\n useEffect(() => {\n const root = document.documentElement\n\n if (colorMode === 'system') {\n root.dataset.colorMode = window.matchMedia('(prefers-color-scheme: dark)')\n .matches\n ? 'dark'\n : 'light'\n } else {\n root.dataset.colorMode = colorMode\n }\n\n if (cache) {\n localStorage.setItem(MODE_KEY, colorMode)\n }\n }, [colorMode, cache])\n\n return useMemo(\n () => ({\n theme,\n mode: colorMode,\n updateTheme: handleThemeChange,\n updateMode: handleColorModeChange,\n }),\n [theme, colorMode, handleThemeChange, handleColorModeChange],\n )\n}\n","'use client'\n\nimport {\n useState,\n useCallback,\n ChangeEvent,\n useMemo,\n type InputHTMLAttributes,\n} from 'react'\n\nexport interface UseDateBase {\n /**\n * The format of the date input\n */\n format?: string\n /**\n * The callback to run when the date input changes\n */\n onChange?: InputHTMLAttributes<HTMLInputElement>['onChange']\n}\n\nexport interface UseDateOptions extends UseDateBase {\n /**\n * The initial value of the date input\n */\n initialValue?: string\n}\n\nexport interface UseDateReturn extends UseDateBase {\n /**\n * The ISO formatted date string\n */\n ISO: string\n /**\n * The value of the date input\n */\n value: string\n}\n\n/**\n * A hook for formatting and validating date inputs. The date format defaults to US Military format.\n * @example\n * ```tsx\n * const MyComponent = () => {\n * const date = useDate({ initialValue: '01 JAN 2024' })\n * return <input onChange={date.onChange} type=\"text\" value={date.value} />\n * }\n */\nexport function useDate(options?: UseDateOptions): UseDateReturn {\n const initialValue = options?.initialValue ?? ''\n const format = options?.format ?? DateFormats.USMilitary\n const onChange = options?.onChange\n const [value, setValue] = useState(initialValue)\n\n const handleChange = useCallback(\n (e: ChangeEvent<HTMLInputElement>) => {\n const newValue = formatMilitaryDate(e.currentTarget.value)\n if (onChange) onChange(e)\n setValue(newValue)\n },\n [onChange],\n )\n\n return useMemo(\n () => ({\n format,\n value,\n ISO: formatMilitaryToISO(value),\n onChange: handleChange,\n }),\n [format, value, handleChange],\n )\n}\n\n// helpers\n\n/**\n * Converts a string in US Military format to ISO format. Used within the `useDate` hook.\n * @param input The string to format\n * @returns The formatted string in ISO format (YYYY-MM-DD)\n */\nexport function formatMilitaryToISO(input: string) {\n const [day, month, year] = input.split(' ')\n const monthIndex = MONTHS.findIndex((m) => m.startsWith(month))\n const monthNum = monthIndex + 1\n return `${year ?? '0000'}-${monthNum.toString().padStart(2, '0')}-${day.padStart(\n 2,\n '0',\n )}`\n}\n\n/**\n * Converts a string to US Military format. Used within the `useDate` hook.\n * @param input The string to format\n * @returns The formatted string in US Military format (DD MMM YYYY)\n */\nexport function formatMilitaryDate(input: string): string {\n let formatted = input.toUpperCase().replace(/[^0-9A-Z]/g, '')\n let day = ''\n let month = ''\n let year = ''\n\n // Format day\n if (formatted.length >= 2) {\n day = formatted.replace(/[^0-9]/g, '').slice(0, 2)\n const dayNum = parseInt(day, 10)\n if (dayNum > 31) day = '31'\n else if (dayNum === 0) day = '01'\n formatted = formatted.slice(2)\n }\n\n // Format month\n if (formatted.length >= 3) {\n month = formatted.slice(0, 3)\n const monthIndex = MONTHS.findIndex((m) => m.startsWith(month))\n if (monthIndex !== -1) {\n month = MONTHS[monthIndex]\n } else {\n month = month.replace(/[^A-Z]/g, '')\n }\n formatted = formatted.slice(3)\n }\n\n // Format year\n if (formatted.length > 0) {\n year = formatted.slice(0, 4)\n }\n\n return [day, month, year].filter(Boolean).join(' ')\n}\n\n/**\n * Formats a date string to US Military format.\n * @param date The date string to format (i.e., '2024-01-01')\n * @returns The formatted date string in US Military format (DD MMM YYYY)\n */\nexport function formatISOToMilitary(date: string): string {\n const [year, month, day] = date.split('-')\n const monthIndex = parseInt(month, 10) - 1\n const monthStr = MONTHS[monthIndex]\n return `${day} ${monthStr} ${year}`\n}\n\n/**\n * Date formatting options\n * @example\n * ```tsx\n * const date = new Date()\n * const formatted = date.format(DateFormats.USMilitary)\n */\nexport const DateFormats = {\n get ISO() {\n return 'YYYY-MM-DD'\n },\n get USMilitary() {\n return 'DD MMM YYYY'\n },\n get Months() {\n return MONTHS\n },\n}\n\nconst MONTHS = [\n 'JAN',\n 'FEB',\n 'MAR',\n 'APR',\n 'MAY',\n 'JUN',\n 'JUL',\n 'AUG',\n 'SEP',\n 'OCT',\n 'NOV',\n 'DEC',\n]\n","'use client'\n\nimport { useCallback, useMemo, useState, type ChangeEvent } from 'react'\n\n/**\n * This module provides a hook for using a toggle.\n * @module useToggle\n */\n\nexport interface UseToggleOptions {\n /**\n * The initial checked state.\n */\n checked?: string\n /**\n * Called when the checked state changes.\n */\n onChange?: (e: ChangeEvent<HTMLInputElement>) => void\n}\nexport interface ToggleHookReturn {\n /**\n * The checked state.\n */\n checked: string\n /**\n * A custom handler to be called when the checked state changes.\n */\n handleChange: (e: ChangeEvent<HTMLInputElement>) => void\n}\n\n/**\n * Provides a hook for using a toggle.\n * @see https://cerberus.digitalu.design/react/use-toggle\n * @memberof module:Toggle\n */\nexport function useToggle(options?: UseToggleOptions): ToggleHookReturn {\n const [checked, setChecked] = useState<string>(options?.checked ?? '')\n const onChange = options?.onChange\n\n const handleChange = useCallback(\n (e: ChangeEvent<HTMLInputElement>) => {\n const target = e.currentTarget as HTMLInputElement\n setChecked((prev) => {\n return prev === target.value ? '' : target.value\n })\n onChange?.(e)\n },\n [onChange],\n )\n\n return useMemo(() => ({ checked, handleChange }), [checked, handleChange])\n}\n","'use client'\n\nimport { useCallback, useEffect, useMemo, useReducer } from 'react'\n\n/**\n * This module provides a hook to get Cerberus colors from the document root.\n * @module useRootColors\n */\n\nexport interface RootColorsResult {\n /**\n * A record of Cerberus colors where the key is the token name provided and the value is the color hex.\n */\n colors: Record<string, string>\n /**\n * A function to refetch the Cerberus colors from the document root. Useful when you need the latest colors after a theme/mode change.\n */\n refetch: () => Promise<void>\n}\n\n/**\n * This hook returns a record of Cerberus colors from the document root.\n * This is useful when you are working with a component that uses the `<canvas>`\n * element.\n * @param colors - An array of Cerberus tokens to get from the document root (i.e. `['dataViz.diverging.50', 'dataViz.diverging.200']`).\n * @returns A record of Cerberus colors where the key is the token name provided and the value is the color hex.\n */\nexport function useRootColors(colors: string[] = []): RootColorsResult {\n const [state, dispatch] = useReducer(rootColorsReducer, {})\n\n const handleRefetch = useCallback(() => {\n return new Promise<void>((resolve) => {\n dispatch(formatColors(colors))\n resolve()\n })\n }, [])\n\n useEffect(() => {\n if (Object.keys(state).length === colors.length) return\n dispatch(formatColors(colors))\n console.log('updating colors in root hook')\n }, [colors])\n\n // reducer is already memoized\n return useMemo(\n () => ({ colors: state, refetch: handleRefetch }),\n [state, handleRefetch],\n )\n}\n\nfunction formatColors(colors: string[]): Record<string, string> {\n const rootStyles = getComputedStyle(document.body)\n return colors.reduce(\n (acc, color) => {\n const formattedColor = color\n .replace(/([a-z])([A-Z])/g, '$1-$2')\n .toLowerCase()\n .replaceAll('.', '-')\n acc[color] = rootStyles\n .getPropertyValue(`--cerberus-colors-${formattedColor}`)\n .trim()\n return acc\n },\n {} as Record<string, string>,\n )\n}\n\nfunction rootColorsReducer(\n state: Record<string, string>,\n action: Record<string, string>,\n): Record<string, string> {\n return { ...state, ...action }\n}\n","/**\n * This module contains utility functions that are used across your app.\n * @module Utils\n */\n\n/**\n * Formats the count of notifications to be displayed in the notification badge.\n * @param count - The number of notifications.\n * @returns The formatted count of notifications.\n * @example\n * ```tsx\n * const count = formatNotifyCount(100)\n * console.log(count) // '99+'\n * ```\n */\nexport function formatNotifyCount(count: number): string {\n if (count > 99) return '99+'\n return count.toString()\n}\n\nexport * from './localStorage'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,mBAA0C;AAC1C,iBAAmB;AACnB,qBAGO;;;ACLP,mBAiBO;;;ACKD;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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AAC9D,QAAM,aAAa,iBAAiB,SAAS,IAAI;AACjD,SAAO,OAAO;AAAA,IACZ,CAAC,KAAK,UAAU;AACd,YAAM,iBAAiB,MACpB,QAAQ,mBAAmB,OAAO,EAClC,YAAY,EACZ,WAAW,KAAK,GAAG;AACtB,UAAI,KAAK,IAAI,WACV,iBAAiB,qBAAqB,cAAc,EAAE,EACtD,KAAK;AACR,aAAO;AAAA,IACT;AAAA,IACA,CAAC;AAAA,EACH;AACF;AAEA,SAAS,kBACP,OACA,QACwB;AACxB,SAAO,EAAE,GAAG,OAAO,GAAG,OAAO;AAC/B;;;ACzDO,SAAS,kBAAkB,OAAuB;AACvD,MAAI,QAAQ,GAAI,QAAO;AACvB,SAAO,MAAM,SAAS;AACxB;;;AtE0EA,wBAAc,0BA5Fd;","names":["import_jsx_runtime","import_jsx_runtime","ArkAccordion","ChevronDown","import_react","import_css","import_jsx_runtime","import_recipes","import_css","import_patterns","import_css","import_recipes","import_jsx_runtime","import_jsx_runtime","import_css","import_recipes","import_jsx_runtime","import_recipes","import_patterns","import_css","import_react","import_jsx_runtime","import_jsx_runtime","IndeterminateIcon","import_patterns","import_css","import_jsx_runtime","import_react","import_react","ArkPortal","import_recipes","import_css","import_react","import_css","import_recipes","import_css","import_recipes","import_jsx_runtime","import_jsx_runtime","ArkDP","import_jsx_runtime","datePickerStyles","ArkDP","datePicker","id","import_react","import_jsx_runtime","import_css","import_recipes","import_jsx_runtime","import_react","import_jsx_runtime","import_jsx_runtime","import_css","import_jsx_runtime","import_css","import_recipes","import_jsx_runtime","import_react","import_recipes","import_css","import_patterns","import_css","import_recipes","import_jsx_runtime","label","import_jsx_runtime","processStatus","import_css","import_patterns","import_recipes","import_jsx_runtime","import_recipes","import_css","import_jsx_runtime","import_recipes","import_css","import_patterns","import_jsx_runtime","import_css","import_recipes","import_patterns","import_jsx_runtime","import_react","import_recipes","import_css","import_jsx_runtime","ArkMenu","import_css","import_recipes","import_react","import_jsx_runtime","import_css","import_patterns","import_jsx_runtime","import_css","import_recipes","import_jsx_runtime","import_css","import_recipes","import_jsx_runtime","import_react","import_css","import_recipes","import_css","import_react","import_jsx_runtime","import_jsx_runtime","import_react","import_css","import_patterns","import_jsx_runtime","import_css","import_jsx_runtime","import_css","import_patterns","import_recipes","import_react","import_jsx_runtime","import_css","import_recipes","import_jsx_runtime","import_css","import_recipes","import_jsx_runtime","import_css","import_patterns","import_recipes","import_jsx_runtime","import_css","import_patterns","import_recipes","import_jsx_runtime","import_jsx_runtime","import_tabs","import_css","import_recipes","import_react","import_jsx_runtime","ArkTabs","import_jsx_runtime","ArkTabs","import_css","import_recipes","import_jsx_runtime","import_css","import_recipes","import_jsx_runtime","import_css","import_recipes","import_jsx_runtime","import_css","import_recipes","import_jsx_runtime","import_recipes","import_css","import_jsx_runtime","import_css","import_recipes","import_jsx_runtime","Close","import_jsx_runtime","import_css","import_recipes","import_jsx_runtime","import_css","import_patterns","import_recipes","import_jsx_runtime","import_css","import_recipes","import_jsx_runtime","ArkTooltip","import_react","import_css","import_patterns","import_react","import_jsx","import_jsx_runtime","import_react","import_jsx","import_css","import_jsx","import_jsx_runtime","import_react","import_patterns","import_recipes","import_css","import_jsx_runtime","import_react","import_css","import_patterns","import_jsx_runtime","import_react","import_react","theme","import_jsx_runtime","import_react","input","import_react","import_react"]}
1
+ {"version":3,"sources":["../../src/index.ts","../../src/components/Modal.tsx","../../src/components/ModalHeader.tsx","../../src/components/ModalHeading.tsx","../../src/components/ModalDescription.tsx","../../src/components/NavMenuTrigger.tsx","../../src/aria-helpers/nav-menu.aria.ts","../../src/context/navMenu.tsx","../../src/components/Show.tsx","../../src/components/NavMenuList.tsx","../../src/components/NavMenuLink.tsx","../../src/components/Accordion.tsx","../../src/components/Accordion.client.tsx","../../src/context/cerberus.tsx","../../src/components/AccordionItemGroup.tsx","../../src/components/Admonition.tsx","../../src/components/Avatar.tsx","../../src/components/Admonition.client.tsx","../../src/components/Button.tsx","../../src/components/Checkbox.tsx","../../src/context/field.tsx","../../src/components/CircularProgress.tsx","../../src/components/DatePicker.client.tsx","../../src/components/Portal.tsx","../../src/components/DatePicker.server.tsx","../../src/components/IconButton.tsx","../../src/components/Dialog.tsx","../../src/components/Dialog.client.tsx","../../src/components/Droppable.tsx","../../src/components/FieldMessage.tsx","../../src/context/feature-flags.tsx","../../src/components/FeatureFlag.tsx","../../src/components/Fieldset.tsx","../../src/components/FieldsetLabel.tsx","../../src/components/FileStatus.tsx","../../src/components/ProgressBar.tsx","../../src/components/FileUploader.tsx","../../src/components/Input.tsx","../../src/components/Label.tsx","../../src/components/Legend.tsx","../../src/components/Menu.tsx","../../src/components/Notification.tsx","../../src/aria-helpers/trap-focus.aria.ts","../../src/components/NotificationHeading.tsx","../../src/components/NotificationDescription.tsx","../../src/components/Radio.tsx","../../src/components/Select.tsx","../../src/components/Spinner.tsx","../../src/components/Tabs.client.tsx","../../src/context/tabs.tsx","../../src/utils/localStorage.ts","../../src/components/Table.tsx","../../src/components/Thead.tsx","../../src/components/Th.tsx","../../src/components/Td.tsx","../../src/components/Tbody.tsx","../../src/components/Tag.tsx","../../src/components/Text.tsx","../../src/components/Textarea.tsx","../../src/components/Toggle.tsx","../../src/components/Tooltip.tsx","../../src/context/confirm-modal.tsx","../../src/context/cta-modal.tsx","../../src/context/notification-center.tsx","../../src/context/notification-center/store.ts","../../src/context/prompt-modal.tsx","../../src/context/theme.tsx","../../src/hooks/useTheme.ts","../../src/hooks/useDate.ts","../../src/hooks/useModal.ts","../../src/hooks/useToggle.ts","../../src/hooks/useRootColors.ts","../../src/config/icons/checkbox.icons.tsx","../../src/components/AnimatingUploadIcon.tsx","../../src/config/defineIcons.ts","../../src/config/index.ts","../../src/utils/index.ts"],"sourcesContent":["/**\n * This module is the entry point for the Cerberus React package.\n * @module\n */\n\n// deprecated\n\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'\n\n// components\n\nexport * from './components/Accordion'\nexport * from './components/Accordion.client'\nexport * from './components/AccordionItemGroup'\nexport * from './components/Admonition'\nexport * from './components/Avatar'\nexport * from './components/Button'\nexport * from './components/Checkbox'\nexport * from './components/CircularProgress'\nexport * from './components/DatePicker.client'\nexport * from './components/DatePicker.server'\nexport * from './components/Dialog'\nexport * from './components/Dialog.client'\nexport * from './components/Droppable'\nexport * from './components/FieldMessage'\nexport * from './components/FeatureFlag'\nexport * from './components/Fieldset'\nexport * from './components/FieldsetLabel'\nexport * from './components/FileStatus'\nexport * from './components/FileUploader'\nexport * from './components/IconButton'\nexport * from './components/Input'\nexport * from './components/Label'\nexport * from './components/Legend'\nexport * from './components/Menu'\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/Tabs.client'\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/Text'\nexport * from './components/Textarea'\nexport * from './components/Toggle'\nexport * from './components/Tooltip'\nexport * from './components/Show'\n\n// context\n\nexport * from './context/cerberus'\nexport * from './context/confirm-modal'\nexport * from './context/cta-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/useDate'\nexport * from './hooks/useModal'\nexport * from './hooks/useTheme'\nexport * from './hooks/useToggle'\nexport * from './hooks/useRootColors'\n\n// aria-helpers\n\nexport * from './aria-helpers/nav-menu.aria'\nexport * from './aria-helpers/trap-focus.aria'\n\n// utils\n\nexport * from './config/index'\nexport * from './utils/index'\n\n// shared types\n\nexport * from './types'\n\n// 3rd party\n\nexport * from '@dnd-kit/core'\n","import { cx } from '@cerberus/styled-system/css'\nimport { modal } from '@cerberus/styled-system/recipes'\nimport { forwardRef, type ForwardedRef, type HTMLAttributes } from 'react'\n\n/**\n * This module contains the Modal root component for a customizable modal.\n * @module\n */\n\n// Modal\n\nexport type ModalProps = HTMLAttributes<HTMLDialogElement>\n\nfunction ModalEl(props: ModalProps, ref: ForwardedRef<HTMLDialogElement>) {\n return (\n <dialog\n {...props}\n className={cx(props.className, modal().dialog)}\n ref={ref}\n />\n )\n}\n\n/**\n * @deprecated use `Dialog` instead\n */\nexport const Modal = forwardRef(ModalEl)\n","import { cx } from '@cerberus/styled-system/css'\nimport { vstack } from '@cerberus/styled-system/patterns'\nimport type { HTMLAttributes } from 'react'\n\n/**\n * This module contains the ModalHeader component for a customizable modal.\n * @module\n */\n\nexport type ModalHeaderProps = HTMLAttributes<HTMLDivElement>\n\n/**\n * @deprecated there is no replacement for this component\n */\nexport function ModalHeader(props: ModalHeaderProps) {\n return (\n <div\n {...props}\n className={cx(\n props.className,\n vstack({\n alignItems: 'flex-start',\n gap: 'md',\n position: 'relative',\n }),\n )}\n />\n )\n}\n","import { cx } from '@cerberus/styled-system/css'\nimport { modal } from '@cerberus/styled-system/recipes'\nimport type { HTMLAttributes } from 'react'\n\n/**\n * This module contains the ModalHeading component for a customizable modal.\n * @module\n */\n\nexport type ModalHeadingProps = HTMLAttributes<HTMLParagraphElement>\n\n/**\n * @deprecated use `DialogHeading` instead\n */\nexport function ModalHeading(props: ModalHeadingProps) {\n return <p {...props} className={cx(props.className, modal().heading)} />\n}\n","import { cx } from '@cerberus/styled-system/css'\nimport { modal } from '@cerberus/styled-system/recipes'\nimport type { HTMLAttributes } from 'react'\n\n/**\n * This module contains the ModalDescription component for a customizable modal.\n * @module\n */\n\nexport type ModalDescriptionProps = HTMLAttributes<HTMLParagraphElement>\n\n/**\n * @deprecated use `DialogDescription` instead\n */\nexport function ModalDescription(props: ModalDescriptionProps) {\n return <p {...props} className={cx(props.className, modal().description)} />\n}\n","'use client'\n\nimport {\n useCallback,\n type ButtonHTMLAttributes,\n type ElementType,\n type MouseEvent,\n} from 'react'\nimport { cx } from '@cerberus/styled-system/css'\nimport { button } from '@cerberus/styled-system/recipes'\nimport {\n createNavTriggerProps,\n type NavTriggerAriaValues,\n} from '../aria-helpers/nav-menu.aria'\nimport { useNavMenuContext } from '../context/navMenu'\nimport type { ButtonProps } from './Button'\nimport { Show } from './Show'\n\n/**\n * This module contains the NavMenuTrigger component.\n * @module\n */\n\nexport interface NavMenuTriggerProps\n extends ButtonHTMLAttributes<HTMLButtonElement>,\n ButtonProps,\n NavTriggerAriaValues {\n /**\n * The element type to render as. Recommended to use for an IconButton trigger vs a standard Button.\n * @default 'button'\n * @example\n * ```tsx\n * <NavMenuTrigger as={IconButton} href=\"/home\" />\n * ```\n */\n as?: ElementType\n}\n\n/**\n * @deprecated use the {@link Menu} family instead\n */\nexport function NavMenuTrigger(props: NavMenuTriggerProps): JSX.Element {\n const {\n as,\n palette,\n usage,\n shape,\n controls,\n expanded: propsExpanded,\n onClick,\n ...nativeProps\n } = props\n const { triggerRef, onToggle, expanded } = useNavMenuContext()\n const ariaProps = createNavTriggerProps({\n controls,\n expanded: propsExpanded ?? expanded,\n })\n const hasAs = Boolean(as)\n const AsSub: ElementType = as!\n\n const handleClick = useCallback(\n (e: MouseEvent<HTMLButtonElement>) => {\n if (onClick) return onClick(e)\n onToggle()\n },\n [onClick, onToggle],\n )\n\n return (\n <Show\n when={hasAs}\n fallback={\n <button\n {...nativeProps}\n {...ariaProps}\n className={cx(\n nativeProps.className,\n button({\n palette,\n usage,\n shape,\n }),\n )}\n onClick={handleClick}\n ref={triggerRef}\n >\n {props.children}\n </button>\n }\n >\n {hasAs && (\n <AsSub\n {...nativeProps}\n {...ariaProps}\n onClick={handleClick}\n ref={triggerRef}\n />\n )}\n </Show>\n )\n}\n","export interface NavTriggerAriaValues {\n controls: string\n expanded?: boolean\n}\n\ninterface NavTriggerAriaReturn {\n ['aria-controls']: string\n ['aria-expanded']: boolean\n}\n\nexport function createNavTriggerProps(\n values: NavTriggerAriaValues,\n): NavTriggerAriaReturn {\n return {\n ['aria-controls']: values.controls,\n ['aria-expanded']: values.expanded ?? false,\n }\n}\n","'use client'\n\nimport { css } from '@cerberus/styled-system/css'\nimport {\n createContext,\n useCallback,\n useContext,\n useMemo,\n useRef,\n useState,\n type PropsWithChildren,\n type RefObject,\n} from 'react'\n\n/**\n * This module provides a context and hook for the nav menu.\n * @module NavMenu\n */\n\nexport type NavTriggerRef = RefObject<HTMLButtonElement>\nexport type NavMenuRef = RefObject<HTMLUListElement>\n\nexport interface NavMenuContextValue {\n /**\n * The ref for the trigger button.\n */\n triggerRef: NavTriggerRef | null\n /**\n * The ref for the menu.\n */\n menuRef: NavMenuRef | null\n /**\n * Whether the menu is expanded.\n */\n expanded: boolean\n /**\n * Called when the menu button is clicked.\n */\n onToggle: () => void\n}\n\nconst NavMenuContext = createContext<NavMenuContextValue | null>(null)\n\n/**\n * @deprecated use the {@link Menu} family instead\n */\nexport function NavMenu(props: PropsWithChildren): JSX.Element {\n const triggerRef = useRef<HTMLButtonElement>(null)\n const menuRef = useRef<HTMLUListElement>(null)\n const [expanded, setExpanded] = useState<boolean>(false)\n\n const handleToggle = useCallback(() => {\n setExpanded((prev) => !prev)\n }, [])\n\n const value = useMemo(\n () => ({\n triggerRef,\n menuRef,\n expanded,\n onToggle: handleToggle,\n }),\n [expanded, handleToggle],\n )\n\n return (\n <NavMenuContext.Provider value={value}>\n <nav\n className={css({\n position: 'relative',\n })}\n >\n {props.children}\n </nav>\n </NavMenuContext.Provider>\n )\n}\n\n/**\n * Used to access the nav menu context.\n * @returns The nav menu context.\n */\nexport function useNavMenuContext(): NavMenuContextValue {\n const context = useContext(NavMenuContext)\n if (!context) {\n throw new Error('useNavMenuContext must be used within a NavMenu.')\n }\n return context\n}\n","'use client'\n\nimport { useMemo, type PropsWithChildren, type ReactNode } from 'react'\n\n/**\n * This module contains the Show component.\n * @module\n */\n\nexport interface ShowProps {\n /**\n * The condition to render memoized children or the fallback content.\n */\n when: boolean | null | undefined\n /**\n * The children to render when the condition is false.\n */\n fallback?: ReactNode\n}\n\n/**\n * Conditionally render a memoized version of the children or optional fallback\n * content.\n * @see https://cerberus.digitalu.design/react/show\n * @example\n * ```tsx\n * <Show when={isLoggedIn} fallback={<Navigate to=\"/login\" />}>\n * <Dashboard />\n * </Show>\n */\nexport function Show(props: PropsWithChildren<ShowProps>): ReactNode {\n const { when, children, fallback } = props\n const condition = useMemo(() => when ?? false, [when])\n\n return useMemo(() => {\n if (condition) return children\n return fallback ?? null\n }, [condition, children, fallback])\n}\n","'use client'\n\nimport { useMemo, type HTMLAttributes } from 'react'\nimport { cx } from '@cerberus/styled-system/css'\nimport { vstack } from '@cerberus/styled-system/patterns'\nimport { useNavMenuContext } from '../context/navMenu'\nimport type { Positions } from '../types'\nimport { Show } from './Show'\n\n/**\n * This module contains the NavMenuList component.\n * @module\n */\n\ninterface GetPositionResult {\n /**\n * The left position of the element.\n */\n left: string\n /**\n * The right position of the element.\n */\n right: string\n /**\n * The top position of the element.\n */\n top: string\n /**\n * The bottom position of the element.\n */\n bottom: string\n}\n\n/**\n * @deprecated use the {@link Menu} family instead\n */\nexport function getPosition(position: Positions): GetPositionResult {\n const defaultPositions = {\n left: 'auto',\n right: 'auto',\n top: 'auto',\n bottom: 'auto',\n }\n switch (position) {\n case 'right':\n return { ...defaultPositions, top: '0%', left: '105%' }\n case 'left':\n return { ...defaultPositions, top: '0%', right: '105%' }\n case 'bottom':\n return { ...defaultPositions, top: '110%' }\n case 'top':\n return { ...defaultPositions, bottom: '110%' }\n default:\n return defaultPositions\n }\n}\n\nconst navListStyles = vstack({\n alignItems: 'flex-start',\n bgColor: 'page.surface.100',\n boxShadow: 'lg',\n gap: '2',\n opacity: '0',\n p: '4',\n position: 'absolute',\n rounded: 'md',\n zIndex: 'dropdown',\n _motionSafe: {\n animationName: 'zoomIn',\n animationDelay: '100ms',\n animationDuration: '150ms',\n animationFillMode: 'both',\n animationTimingFunction: 'ease-in-out',\n },\n _positionBottom: {\n transformOrigin: 'top left',\n },\n _positionTop: {\n transformOrigin: 'bottom left',\n },\n _positionLeft: {\n transformOrigin: 'top right',\n },\n _positionRight: {\n transformOrigin: 'top left',\n },\n})\n\nexport interface NavMenuListProps extends HTMLAttributes<HTMLUListElement> {\n /**\n * The unique identifier for the NavMenuList. Required for accessibility.\n */\n id: string\n /**\n * The position of the NavMenuList.\n * @type 'top' | 'right' | 'bottom' | 'left'\n * @default 'bottom'\n */\n position?: Positions\n}\n\n/**\n * A component that allows the user to display a menu of navigation links.\n * @definition [Disclosure Nav](https://www.w3.org/WAI/ARIA/apg/patterns/disclosure/examples/disclosure-navigation/)\n * @see https://cerberus.digitalu.design/react/nav-menu\n *\n * @example\n * ```tsx\n * <NavMenu>\n * <NavMenuList id=\"nav-menu-list\" position=\"bottom\">\n * <NavMenuLink href=\"/home\">Home</NavMenuLink>\n * <NavMenuLink href=\"/about\">About</NavMenuLink>\n * </NavMenuList>\n * </NavMenu>\n * ```\n **/\nexport function NavMenuList(props: NavMenuListProps): JSX.Element {\n const { position, ...nativeProps } = props\n const { menuRef, expanded } = useNavMenuContext()\n const locationStyles = useMemo(\n () => getPosition(position ?? 'bottom'),\n [position],\n )\n\n return (\n <Show when={expanded}>\n <ul\n {...nativeProps}\n data-position={position ?? 'bottom'}\n className={cx(nativeProps.className, navListStyles)}\n ref={menuRef}\n style={locationStyles}\n />\n </Show>\n )\n}\n","import type { AnchorHTMLAttributes, ElementType } from 'react'\nimport { css, cx } from '@cerberus/styled-system/css'\nimport { Show } from './Show'\n\n/**\n * This module contains the NavMenuLink component.\n * @module\n */\n\nexport interface NavMenuLinkProps\n extends AnchorHTMLAttributes<HTMLAnchorElement> {\n /**\n * The element type to render as. Recommended to use for Next apps with the\n * `Link` component.\n */\n as?: ElementType\n}\n\n/**\n * @deprecated use the {@link Menu} family instead\n */\nexport function NavMenuLink(props: NavMenuLinkProps): JSX.Element {\n const { as, ...nativeProps } = props\n const hasAs = Boolean(as)\n const AsSub: ElementType = as!\n\n return (\n <li\n className={css({\n w: 'full',\n })}\n >\n <Show\n when={hasAs}\n fallback={\n <a\n {...nativeProps}\n className={cx(\n nativeProps.className,\n css({\n color: 'action.navigation.initial',\n textStyle: 'link',\n _hover: {\n color: 'action.navigation.hover',\n },\n }),\n )}\n />\n }\n >\n {hasAs && <AsSub {...nativeProps} />}\n </Show>\n </li>\n )\n}\n","import { Accordion as ArkAccordion } from '@ark-ui/react'\nimport { cx } from '@cerberus/styled-system/css'\nimport {\n accordion,\n type AccordionVariantProps,\n} from '@cerberus/styled-system/recipes'\n\nexport type AccordionProps = ArkAccordion.RootProps & AccordionVariantProps\n\n/**\n * The context provider for the Accordion family.\n * @definition [Accordion docs](https://cerberus.digitalu.design/react/accordion)\n * @example\n * ```tsx\n * <Accordion>\n * <AccordionItemGroup heading=\"Item 1 heading\" value=\"one\">\n * This is the content\n * </AccordionItemGroup>\n * </Accordion>\n * ```\n */\nexport function Accordion(props: AccordionProps) {\n const { size, className, ...rootProps } = props\n const styles = accordion({ size })\n return (\n <ArkAccordion.Root\n collapsible\n className={cx(className, styles.root)}\n {...rootProps}\n />\n )\n}\n\ntype AccordionItemProps = ArkAccordion.ItemProps & AccordionVariantProps\n\n/**\n * The item for the Accordion component.\n * @definition [ARK docs](https://ark-ui.com/react/docs/components/accordion)\n * @definition [Accordion docs](https://cerberus.digitalu.design/react/accordion)\n * @example\n * ```tsx\n * <Accordion>\n * <AccordionItem value=\"one\">\n * <AccordionTrigger>\n * Accordion Item 1\n * <AccordionIndicator />\n * </AccordionTrigger>\n * <AccordionContent>Accordion Item 1 content</AccordionContent>\n * </AccordionItem>\n * </Accordion>\n * ```\n */\nexport function AccordionItem(props: AccordionItemProps) {\n const { size, ...itemProps } = props\n const styles = accordion({ size })\n return (\n <ArkAccordion.Item\n {...itemProps}\n className={cx(itemProps.className, styles.item)}\n />\n )\n}\n\nexport type AccordionItemTriggerProps = ArkAccordion.ItemTriggerProps &\n AccordionVariantProps\n\n/**\n * The trigger for the Accordion component.\n * @definition [ARK docs](https://ark-ui.com/react/docs/components/accordion)\n * @definition [Accordion docs](https://cerberus.digitalu.design/react/accordion)\n * @example\n * ```tsx\n * <Accordion>\n * <AccordionItem value=\"one\">\n * <AccordionTrigger>\n * Accordion Item 1\n * <AccordionIndicator />\n * </AccordionTrigger>\n * <AccordionContent>Accordion Item 1 content</AccordionContent>\n * </AccordionItem>\n * </Accordion>\n * ```\n */\nexport function AccordionItemTrigger(props: AccordionItemTriggerProps) {\n const { size, ...triggerProps } = props\n const styles = accordion({ size })\n return (\n <ArkAccordion.ItemTrigger\n {...triggerProps}\n className={cx(triggerProps.className, styles.itemTrigger)}\n />\n )\n}\n\nexport type AccordionItemContentProps = ArkAccordion.ItemContentProps &\n AccordionVariantProps\n\n/**\n * The content for the Accordion component.\n * @definition [ARK docs](https://ark-ui.com/react/docs/components/accordion)\n * @definition [Accordion docs](https://cerberus.digitalu.design/react/accordion)\n * @example\n * ```tsx\n * <Accordion>\n * <AccordionItem value=\"one\">\n * <AccordionTrigger>\n * Accordion Item 1\n * <AccordionIndicator />\n * </AccordionTrigger>\n * <AccordionContent>Accordion Item 1 content</AccordionContent>\n * </AccordionItem>\n * </Accordion>\n * ```\n * */\nexport function AccordionItemContent(props: AccordionItemContentProps) {\n const { size, ...contentProps } = props\n const styles = accordion({ size })\n return (\n <ArkAccordion.ItemContent\n {...contentProps}\n className={cx(contentProps.className, styles.itemContent)}\n />\n )\n}\n","'use client'\n\nimport { Accordion as ArkAccordion } from '@ark-ui/react'\nimport { cx } from '@cerberus/styled-system/css'\nimport {\n accordion,\n type AccordionVariantProps,\n} from '@cerberus/styled-system/recipes'\nimport { useCerberusContext } from '../context/cerberus'\n\nexport type AccordionItemIndicatorProps = ArkAccordion.ItemIndicatorProps &\n AccordionVariantProps\n\n/**\n * The indicator for the Accordion component.\n * @definition [ARK docs](https://ark-ui.com/react/docs/components/accordion)\n * @definition [Accordion docs](https://cerberus.digitalu.design/react/accordion)\n * @example\n * ```tsx\n * <Accordion>\n * <AccordionItem value=\"one\">\n * <AccordionTrigger>\n * Accordion Item 1\n * <AccordionIndicator />\n * </AccordionTrigger>\n * <AccordionContent>Accordion Item 1 content</AccordionContent>\n * </AccordionItem>\n * </Accordion>\n * ```\n * */\nexport function AccordionItemIndicator(props: AccordionItemIndicatorProps) {\n const { size, ...indicatorProps } = props\n const styles = accordion({ size })\n const iconSize = size === 'sm' ? 16 : '24'\n const { icons } = useCerberusContext()\n const ChevronDown = icons.accordionIndicator\n\n return (\n <ArkAccordion.ItemIndicator\n {...indicatorProps}\n className={cx(indicatorProps.className, styles.itemIndicator)}\n >\n <ChevronDown size={iconSize} />\n </ArkAccordion.ItemIndicator>\n )\n}\n","'use client'\n\nimport { createContext, useContext, type PropsWithChildren } from 'react'\nimport type { SystemConfig } from '../config'\n\n/**\n * This module contains the Cerberus configuration context and helpers.\n * @module context/cerberus\n */\n\ntype CerberusContextValue = SystemConfig\n\nconst CerberusContext = createContext<CerberusContextValue | null>(null)\n\ninterface CerberusProviderProps {\n config: SystemConfig\n}\n\n/**\n * Cerberus configuration provider.\n * @param props.config The Cerberus configuration created with\n * `makeSystemConfig` helper.\n */\nexport function CerberusProvider(\n props: PropsWithChildren<CerberusProviderProps>,\n) {\n return (\n <CerberusContext.Provider value={props.config}>\n {props.children}\n </CerberusContext.Provider>\n )\n}\n\n/**\n * Returns the Cerberus configuration context.\n * @returns The Cerberus configuration context.\n */\nexport function useCerberusContext() {\n const context = useContext(CerberusContext)\n if (!context) {\n throw new Error('useCerberus must be used within a CerberusProvider')\n }\n return context\n}\n","import { Accordion as ArkAccordion } from '@ark-ui/react'\nimport { type AccordionVariantProps } from '@cerberus/styled-system/recipes'\nimport type { PropsWithChildren } from 'react'\nimport { Show } from './Show'\nimport {\n AccordionItem,\n AccordionItemContent,\n AccordionItemTrigger,\n} from './Accordion'\nimport { css } from '@cerberus/styled-system/css'\nimport { AccordionItemIndicator } from './Accordion.client'\n\n/**\n * This module contains an abstraction of the AccordionItem components.\n * @module\n */\n\nexport interface AccordionItemGroupBaseProps extends ArkAccordion.ItemProps {\n /**\n * The heading of the accordion item to open and close the content.\n */\n heading: string\n /**\n * The position of the arrow indicator.\n */\n indicatorPosition?: 'start' | 'end'\n}\nexport type AccordionItemGroupProps = AccordionItemGroupBaseProps &\n AccordionVariantProps\n\n/**\n * A grouped item for the Accordion component.\n * @definition [ARK docs](https://ark-ui.com/react/docs/components/accordion)\n * @definition [Accordion docs](https://cerberus.digitalu.design/react/accordion)\n * @example\n * ```tsx\n * <Accordion>\n * <AccordionItemGroup heading=\"Accordion Item 1\" value=\"one\">\n * Accordion Item 1 content\n * </AccordionItemGroup>\n * </Accordion>\n * ```\n */\nexport function AccordionItemGroup(\n props: PropsWithChildren<AccordionItemGroupProps>,\n) {\n const {\n size,\n heading,\n children,\n indicatorPosition = 'end',\n ...itemProps\n } = props\n const triggerStyles =\n indicatorPosition === 'start'\n ? {\n gap: 'md',\n justifyContent: 'flex-start',\n }\n : undefined\n\n return (\n <AccordionItem {...itemProps}>\n <AccordionItemTrigger className={css(triggerStyles)} size={size}>\n <Show when={indicatorPosition === 'start'}>\n <AccordionItemIndicator size={size} />\n </Show>\n\n {heading}\n\n <Show when={indicatorPosition === 'end'}>\n <AccordionItemIndicator size={size} />\n </Show>\n </AccordionItemTrigger>\n\n <AccordionItemContent size={size}>{children}</AccordionItemContent>\n </AccordionItem>\n )\n}\n","import {\n admonition,\n type AdmonitionVariantProps,\n} from '@cerberus/styled-system/recipes'\nimport { cx } from '@cerberus/styled-system/css'\nimport { hstack } from '@cerberus/styled-system/patterns'\nimport type { HTMLAttributes, ReactNode } from 'react'\nimport { Show } from './Show'\nimport { MatchAvatar } from './Admonition.client'\n\n/**\n * This module provides a set of components for creating admonitions.\n * @module Admonition\n */\n\nexport type AdmonitionProps = HTMLAttributes<HTMLDivElement> &\n AdmonitionVariantProps & {\n /**\n * One off replacement for the icon.\n */\n icon?: ReactNode\n }\n\n/**\n * The `Admonition` component is used to create an admonition.\n * @example\n * ```tsx\n * <Admonition palette=\"page\">\n * <AdmonitionHeading palette=\"page\">Page</AdmonitionHeading>\n * <AdmonitionDescription palette=\"page\">\n * This is a page admonition.\n * </AdmonitionDescription>\n * </Admonition>\n * ```\n * @see https://cerberus.digitalu.design/react/admonition\n */\nexport function Admonition(props: AdmonitionProps) {\n const { children, palette = 'page', usage, icon, ...nativeProps } = props\n return (\n <aside\n {...nativeProps}\n className={cx(\n nativeProps.className,\n hstack({\n gap: 'md',\n w: 'full',\n }),\n admonition({ palette, usage }).root,\n )}\n >\n <Show when={Boolean(icon)} fallback={<MatchAvatar palette={palette} />}>\n {icon}\n </Show>\n <div>{children}</div>\n </aside>\n )\n}\n\nexport type AdmonitionHeadingProps = HTMLAttributes<HTMLParagraphElement> &\n AdmonitionVariantProps\n\n/**\n * The `AdmonitionHeading` component is used to create a heading within an\n * admonition.\n * @example\n * ```tsx\n * <Admonition palette=\"page\">\n * <AdmonitionHeading palette=\"page\">Page</AdmonitionHeading>\n * <AdmonitionDescription palette=\"page\">\n * This is a page admonition.\n * </AdmonitionDescription>\n * </Admonition>\n * ```\n * @see https://cerberus.digitalu.design/react/admonition\n */\nexport function AdmonitionHeading(props: AdmonitionHeadingProps) {\n const { palette, usage, ...nativeProps } = props\n return (\n <p\n {...nativeProps}\n className={cx(\n nativeProps.className,\n admonition({ palette, usage }).heading,\n )}\n />\n )\n}\n\nexport type AdmonitionDescriptionProps = HTMLAttributes<HTMLParagraphElement> &\n AdmonitionVariantProps\n\n/**\n * The `AdmonitionDescription` component is used to create a description within\n * an admonition.\n * @example\n * ```tsx\n * <Admonition palette=\"page\">\n * <AdmonitionHeading palette=\"page\">Page</AdmonitionHeading>\n * <AdmonitionDescription palette=\"page\">\n * This is a page admonition.\n * </AdmonitionDescription>\n * </Admonition>\n * ```\n * @see https://cerberus.digitalu.design/react/admonition\n */\nexport function AdmonitionDescription(props: AdmonitionDescriptionProps) {\n const { palette, usage, ...nativeProps } = props\n return (\n <p\n {...nativeProps}\n className={cx(\n nativeProps.className,\n admonition({ palette, usage }).description,\n )}\n />\n )\n}\n","'use client'\n\nimport { css, cx } from '@cerberus/styled-system/css'\nimport { circle } from '@cerberus/styled-system/patterns'\nimport {\n avatar,\n type AvatarVariantProps,\n} from '@cerberus/styled-system/recipes'\nimport type { HtmlHTMLAttributes, ReactNode } from 'react'\nimport { Show } from './Show'\nimport { useCerberusContext } from '../context/cerberus'\n\n/**\n * This module contains the Avatar component.\n * @module\n */\n\nexport type SharedAvatarProps = {\n /**\n * An optional icon to show when no src or ariaLabel is provided.\n */\n icon?: ReactNode\n /**\n * The size of the avatar.\n */\n width?: number\n /**\n * The size of the avatar.\n */\n height?: number\n}\nexport type AvatarImageProps = HtmlHTMLAttributes<HTMLImageElement> &\n SharedAvatarProps & {\n /**\n * The aria-label for the avatar needed for accessibility.\n */\n ariaLabel: string\n /**\n * An optional element to replace the image. Recommended for Next.js Image component.\n */\n as?: never\n /**\n * The source of the image.\n */\n src: string\n }\nexport type AvatarAsProps = SharedAvatarProps & {\n /**\n * An optional element to replace the image. Recommended for Next.js Image component.\n */\n as: ReactNode\n /**\n * The aria-label for the avatar needed for accessibility.\n */\n ariaLabel?: never\n /**\n * The source of the image.\n */\n src?: never\n}\n\nexport type AvatarProps = (HtmlHTMLAttributes<HTMLDivElement> &\n AvatarVariantProps) &\n (AvatarImageProps | AvatarAsProps)\n\n/**\n * 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.\n * @see https://cerberus.digitalu.design/react/avatar\n * @example\n * ```tsx\n * <Avatar\n * ariaLabel=\"Protector Cerberus\"\n * src=\"https://cerberus.digitalu.design/logo.svg\"\n * />\n * ```\n */\nexport function Avatar(props: AvatarProps) {\n const {\n ariaLabel,\n as,\n gradient,\n size,\n src,\n width,\n height,\n icon,\n ...nativeProps\n } = props\n const { icons } = useCerberusContext()\n const { avatar: AvatarIcon } = icons\n const initials = (ariaLabel || '')\n .split(' ')\n .map((word) => word[0])\n .join('')\n .slice(0, 2)\n\n return (\n <div\n {...nativeProps}\n className={cx(\n nativeProps.className,\n avatar({ gradient, size }),\n circle(),\n )}\n >\n <Show\n when={Boolean(src) || Boolean(as)}\n fallback={\n <Show\n when={Boolean(initials)}\n fallback={\n <Show\n when={Boolean(icon)}\n fallback={\n <AvatarIcon\n size={iconSizeMap[size as keyof typeof iconSizeMap]}\n />\n }\n >\n {icon}\n </Show>\n }\n >\n {initials}\n </Show>\n }\n >\n <Show\n when={Boolean(as)}\n fallback={\n <img\n alt={props.ariaLabel}\n className={css({\n h: 'full',\n objectFit: 'cover',\n w: 'full',\n })}\n decoding=\"async\"\n loading=\"lazy\"\n src={src}\n height={height}\n width={width}\n />\n }\n >\n {as}\n </Show>\n </Show>\n </div>\n )\n}\n\nconst iconSizeMap = {\n xs: 16,\n sm: 16,\n md: 20,\n lg: 34,\n xl: 32,\n '2xl': 32,\n '3xl': 32,\n '4xl': 32,\n}\n","'use client'\n\nimport type { AdmonitionVariantProps } from '@cerberus/styled-system/recipes'\nimport { useCerberusContext } from '../context/cerberus'\nimport { Avatar } from './Avatar'\n\ntype MatchAvatarProps = AdmonitionVariantProps\n\nexport function MatchAvatar(props: MatchAvatarProps) {\n const { icons } = useCerberusContext()\n const {\n infoNotification: InfoIcon,\n successNotification: SuccessIcon,\n warningNotification: WarningIcon,\n dangerNotification: DangerIcon,\n } = icons\n\n switch (props.palette) {\n case 'page':\n return (\n <Avatar\n gradient=\"charon-light\"\n ariaLabel=\"\"\n icon={<InfoIcon />}\n size=\"sm\"\n src=\"\"\n />\n )\n case 'info':\n return (\n <Avatar\n gradient=\"amphiaraus-dark\"\n ariaLabel=\"\"\n icon={<InfoIcon />}\n size=\"sm\"\n src=\"\"\n />\n )\n case 'success':\n return (\n <Avatar\n gradient=\"thanatos-dark\"\n ariaLabel=\"\"\n icon={<SuccessIcon />}\n size=\"sm\"\n src=\"\"\n />\n )\n case 'warning':\n return (\n <Avatar\n gradient=\"asphodel-light\"\n ariaLabel=\"\"\n icon={<WarningIcon />}\n size=\"sm\"\n src=\"\"\n />\n )\n case 'danger':\n return (\n <Avatar\n gradient=\"hades-light\"\n ariaLabel=\"\"\n icon={<DangerIcon />}\n size=\"sm\"\n src=\"\"\n />\n )\n\n default:\n throw new Error('Unsupported admonition palette')\n }\n}\n","import type { ButtonHTMLAttributes } from 'react'\nimport { cx } from '@cerberus/styled-system/css'\nimport {\n button,\n type ButtonVariantProps,\n} from '@cerberus/styled-system/recipes'\n\n/**\n * This module contains the Button component.\n * @module\n */\n\nexport type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> &\n ButtonVariantProps\n\n/**\n * A component that allows the user to perform actions\n * @see https://cerberus.digitalu.design/react/button\n */\nexport function Button(props: ButtonProps): JSX.Element {\n const { palette, usage, shape, ...nativeProps } = props\n return (\n <button\n {...nativeProps}\n className={cx(\n nativeProps.className,\n button({\n palette,\n usage,\n shape,\n }),\n )}\n />\n )\n}\n","'use client'\n\nimport {\n checkbox,\n type CheckboxVariantProps,\n} from '@cerberus/styled-system/recipes'\nimport { vstack } from '@cerberus/styled-system/patterns'\nimport { cx } from '@cerberus/styled-system/css'\nimport type { InputHTMLAttributes } from 'react'\nimport { Show } from './Show'\nimport { useFieldContext } from '../context/field'\nimport { useCerberusContext } from '../context/cerberus'\n\n/**\n * This module contains the Checkbox component.\n * @module\n */\n\nexport type CheckboxProps = CheckboxVariantProps &\n Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'id'> & {\n /**\n * The id of the FieldMessage element describing the Checkbox.\n */\n describedBy?: string\n /**\n * The unique identifier for the checkbox. Required for accessibility.\n */\n id: string\n /**\n * Used to display a mixed checked state.\n * @description [ARIA Mixed State](https://www.w3.org/WAI/ARIA/apg/patterns/checkbox/examples/checkbox-mixed/)\n */\n mixed?: boolean\n }\n\n/**\n * Checkbox component\n * @definition [ARIA Target Size](https://www.w3.org/WAI/WCAG21/Understanding/target-size.html#:~:text=Understanding%20SC%202.5.,%3ATarget%20Size%20(Level%20AAA)&text=The%20size%20of%20the%20target,Equivalent)\n * @definition [ARIA Forms](https://www.a11yproject.com/checklist/#forms)\n * @see https://cerberus.digitalu.design/react/checkbox\n * @example\n * ```tsx\n * <Field>\n * <Checkbox id=\"legal\" checked={checked.legal} onChange={handleChange} />\n * </Field>\n * ```\n */\nexport function Checkbox(props: CheckboxProps) {\n const { describedBy, size, checked, mixed, ...nativeProps } = props\n const { invalid, ...fieldStates } = useFieldContext()\n const styles = checkbox({ size })\n const { icons } = useCerberusContext()\n const { checkbox: CheckIcon, indeterminate: IndeterminateIcon } = icons\n\n if (!CheckIcon) {\n throw new Error('The CerberusProvider is missing the checkbox icon.')\n }\n if (!IndeterminateIcon) {\n throw new Error('The CerberusProvider is missing the indeterminate icon.')\n }\n\n return (\n <div\n className={cx(\n styles.root,\n vstack({\n gap: '0',\n justify: 'center',\n }),\n )}\n >\n <input\n {...nativeProps}\n {...fieldStates}\n {...(describedBy && { 'aria-describedby': describedBy })}\n {...(invalid && { 'aria-invalid': true })}\n {...(mixed && { 'aria-checked': 'mixed' })}\n className={cx('peer', nativeProps.className, styles.input)}\n type=\"checkbox\"\n />\n <Show when={checked && !mixed}>\n <span className={styles.icon}>\n <CheckIcon />\n </span>\n </Show>\n <Show when={mixed}>\n <span className={styles.icon}>\n <IndeterminateIcon />\n </span>\n </Show>\n </div>\n )\n}\n","'use client'\n\nimport {\n createContext,\n useContext,\n useMemo,\n type PropsWithChildren,\n} from 'react'\n\n/**\n * This module provides a context and hook for the field.\n * @module Field\n */\n\nexport interface FieldContextValue {\n /**\n * Whether the field is disabled.\n * @description [Moz Input Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attributes)\n */\n disabled?: boolean\n /**\n * Whether the field is read-only.\n */\n readOnly?: boolean\n /**\n * Whether the field is required.\n */\n required?: boolean\n /**\n * Whether the field is invalid.\n */\n invalid?: boolean\n}\n\nconst FieldContext = createContext<FieldContextValue | null>(null)\n\n/**\n * Provides the field state for a all related components used within a group.\n * @see https://cerberus.digitalu.design/react/input\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\n/**\n * Used to access the field context.\n * @returns The field context.\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","'use client'\n\nimport { cq } from '@cerberus/styled-system/patterns'\nimport { css } from '@cerberus/styled-system/css'\nimport type { SVGProps } from 'react'\nimport { Show } from './Show'\n\n/**\n * This module contains the CircularProgress component.\n * @module\n */\n\nexport interface CircularProgressProps extends SVGProps<SVGSVGElement> {\n /**\n * A unique identifier for the progress bar. Required for accessibility.\n */\n id: string\n /**\n * A description label for the progress bar. Required for accessibility.\n */\n label: string\n /**\n * The current value of the CircularProgress\n */\n now: number\n /**\n * The title of the CircularProgress for a11y\n */\n title: string\n /**\n * What is shown below the now value (default: 'Done')\n */\n syntax?: string\n /**\n * The background style of the CircularProgress\n */\n bgStyle?: 'filled' | 'transparent'\n}\n\n/**\n * The CircularProgress component is used to display a loading indicator.\n * @param props - SVG element attributes\n * @param props.now - The current value of the CircularProgress\n * @param props.title - The title of the CircularProgress for a11y\n * @param props.label - What is shown below the now value (default: 'Done')\n * @see https://cerberus.digitalu.design/react/progress-indicators\n * @example\n * ```tsx\n * <CircularProgress now={24} title=\"Course completion\" label=\"done\" />\n * ```\n */\nexport function CircularProgress(props: CircularProgressProps) {\n const strokeW: number = 14\n const radius = `calc(50% * (1 - ${strokeW}/100))`\n const status: string = props.syntax ?? 'Done'\n const now: number = props.now >= 100 ? 100 : props.now\n const bgStyle: string = props.bgStyle ?? 'filled'\n\n return (\n <div\n id={props.id}\n aria-label={props.label}\n aria-valuemin={0}\n aria-valuemax={100}\n aria-valuenow={now}\n className={cq({\n alignSelf: 'stretch',\n flex: 1,\n m: '4px',\n position: 'relative',\n })}\n role=\"progressbar\"\n >\n <svg\n data-complete={now === 100}\n className={css({\n display: 'block',\n rounded: 'full',\n transition: 'all 0.5s ease',\n })}\n fill=\"none\"\n strokeLinecap=\"round\"\n strokeWidth={strokeW}\n viewBox=\"0 0 100 100\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <title>{props.title}</title>\n <desc>{`${now}% ${status}`}</desc>\n <defs>\n <linearGradient id=\"gradient\">\n <stop\n offset=\"0%\"\n stopColor=\"var(--cerberus-colors-data-viz-progress-start)\"\n />\n <stop\n offset=\"100%\"\n stopColor=\"var(--cerberus-colors-data-viz-progress-end)\"\n />\n </linearGradient>\n </defs>\n\n <Show when={bgStyle === 'filled'}>\n <circle\n className={css({\n fill: 'page.surface.initial',\n })}\n cx=\"50%\"\n cy=\"50%\"\n r={`calc(50% * (1 - ${strokeW}/100))`}\n pathLength=\"100\"\n />\n </Show>\n <circle\n className={css({\n stroke: 'page.bg.100',\n })}\n cx=\"50%\"\n cy=\"50%\"\n r={radius}\n pathLength=\"100\"\n />\n <circle\n data-complete={now === 100}\n className={css({\n stroke: 'url(#gradient)',\n transition: 'stroke-dashoffset, stroke 0.5s ease',\n _isComplete: {\n stroke: 'success.bg.initial',\n },\n })}\n cx=\"50%\"\n cy=\"50%\"\n fill=\"none\"\n r={radius}\n pathLength=\"100\"\n strokeDasharray=\"100\"\n strokeDashoffset={100 - now}\n transform=\"rotate(-90 50 50)\"\n />\n\n <g>\n <text\n className={css({\n fill: 'page.text.initial',\n fontFamily: 'mono',\n textStyle: '1.25rem',\n })}\n x=\"50%\"\n y=\"47%\"\n dominantBaseline=\"middle\"\n textAnchor=\"middle\"\n >\n {now}%\n </text>\n <text\n className={css({\n fill: 'page.text.100',\n fontSize: '0.5rem',\n fontWeight: 600,\n })}\n x=\"50%\"\n y=\"59%\"\n dominantBaseline=\"middle\"\n textAnchor=\"middle\"\n >\n {status}\n </text>\n </g>\n </svg>\n </div>\n )\n}\n","'use client'\n\nimport {\n DatePicker as ArkDP,\n type DatePickerContentProps,\n type DatePickerInputProps,\n type DatePickerRootProps,\n type DatePickerTriggerProps,\n type DatePickerViewControlProps,\n type DatePickerViewProps,\n} from '@ark-ui/react'\nimport { Portal } from './Portal'\nimport { datePicker, iconButton } from '@cerberus/styled-system/recipes'\nimport { css, cx } from '@cerberus/styled-system/css'\nimport { useFieldContext } from '../context/field'\nimport {\n DatePickerView,\n DatePickerContext,\n DatePickerTable,\n DatePickerTableHeader,\n DatePickerTableCellTrigger,\n DatePickerTableCell,\n DatePickerViewControl,\n} from './DatePicker.server'\nimport { IconButton } from './IconButton'\nimport { Button } from './Button'\nimport { useCerberusContext } from '../context/cerberus'\nimport { useMemo, type InputHTMLAttributes } from 'react'\n\n/**\n * This module contains the DatePicker client family components.\n * @module DatePicker:client\n */\n\n// We are not exposing this to the public API\nconst datePickerStyles = datePicker()\n\n/**\n * The main context provider for the DatePicker family components.\n * @definition [Date Picker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <Field>\n * <DatePicker name=\"start_date\">\n * <DatePickerLabel>Start date</DatePickerLabel>\n * <DatePickerInput />\n * <DatePickerCalendar />\n * </DatePicker>\n * </Field>\n * ```\n */\nexport function DatePicker(props: DatePickerRootProps) {\n const states = useFieldContext()\n\n // TODO: Remove this once the bug is fixed: https://github.com/chakra-ui/ark/issues/3112\n\n // There is a bug with the Root component that causes random date selection\n // onBlur after the first selection if the format prop is used.\n // const handleFormat = useCallback((value: DateValue) => {\n // return formatISOToMilitary(value.toString())\n // }, [])\n\n return (\n <ArkDP.Root\n {...props}\n {...states}\n positioning={{\n placement: 'bottom-start',\n }}\n />\n )\n}\n\n/**\n * An abstraction of the DatePicker control that contains the prev, view, and\n * next triggers which control the calendar output.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <DatePickerViewControlGroup />\n * ```\n */\nexport function DatePickerViewControlGroup(props: DatePickerViewControlProps) {\n const { icons } = useCerberusContext()\n const { calendarPrev: PrevIcon, calendarNext: NextIcon } = icons\n return (\n <DatePickerViewControl {...props}>\n <ArkDP.PrevTrigger asChild>\n <IconButton ariaLabel=\"Previous\" size=\"sm\">\n <PrevIcon />\n </IconButton>\n </ArkDP.PrevTrigger>\n\n <ArkDP.ViewTrigger asChild>\n <Button\n className={css({\n h: '2rem',\n paddingInline: 'md',\n })}\n shape=\"rounded\"\n size=\"sm\"\n usage=\"ghost\"\n >\n <ArkDP.RangeText />\n </Button>\n </ArkDP.ViewTrigger>\n\n <ArkDP.NextTrigger asChild>\n <IconButton ariaLabel=\"Next\" size=\"sm\">\n <NextIcon />\n </IconButton>\n </ArkDP.NextTrigger>\n </DatePickerViewControl>\n )\n}\n\n/**\n * The trigger component for the DatePicker which opens the calendar.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <DatePickerTrigger />\n * ```\n */\nexport function DatePickerTrigger(props: DatePickerTriggerProps) {\n const { icons } = useCerberusContext()\n const { calendar: CalendarIcon } = icons\n return (\n <ArkDP.Trigger\n {...props}\n className={cx(\n props.className,\n iconButton({\n size: 'sm',\n usage: 'ghost',\n }),\n datePickerStyles.trigger,\n )}\n >\n <CalendarIcon />\n </ArkDP.Trigger>\n )\n}\n\n/**\n * The input component for the DatePicker.\n * @definition [Date Picker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <Field>\n * <DatePicker name=\"start_date\">\n * <DatePickerLabel>Start date</DatePickerLabel>\n * <DatePickerInput />\n * <DatePickerCalendar />\n * </DatePicker>\n * </Field>\n * ```\n */\nexport function DatePickerInput(props: DatePickerInputProps) {\n const { invalid, ...fieldStates } = useFieldContext()\n return (\n <ArkDP.Control className={datePickerStyles.control}>\n <DatePickerTrigger />\n <ArkDP.Input\n {...props}\n {...fieldStates}\n {...(invalid && { 'aria-invalid': true })}\n className={cx(props.className, datePickerStyles.input)}\n placeholder={props.placeholder ?? 'DD MMM YYYY'}\n maxLength={11}\n />\n </ArkDP.Control>\n )\n}\n\nexport interface RangePickerInputProps\n extends Omit<DatePickerInputProps, 'defaultValue'> {\n /**\n * The defaultValue to add for the inputs. The first item is the start date\n * and the second item is the end date.\n */\n defaultValue?: [\n InputHTMLAttributes<HTMLInputElement>['defaultValue'],\n InputHTMLAttributes<HTMLInputElement>['defaultValue'],\n ]\n}\n\n/**\n * The input component for the DatePicker that uses ranges.\n * @definition [Date Picker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <Field>\n * <DatePicker name=\"start_date\" selection=\"range\">\n * <DatePickerLabel>Start date</DatePickerLabel>\n * <RangePickerInput />\n * <DatePickerCalendar />\n * </DatePicker>\n * </Field>\n * ```\n */\nexport function RangePickerInput(props: RangePickerInputProps) {\n const { invalid, ...fieldStates } = useFieldContext()\n const { defaultValue, ...nativeProps } = props\n\n const startDate = useMemo(() => defaultValue?.[0], [defaultValue])\n const endDate = useMemo(() => defaultValue?.[1], [defaultValue])\n\n return (\n <ArkDP.Control data-range className={datePickerStyles.control}>\n <DatePickerTrigger />\n <ArkDP.Input\n {...nativeProps}\n {...fieldStates}\n {...(invalid && { 'aria-invalid': true })}\n data-range-input\n defaultValue={startDate}\n className={cx(props.className, datePickerStyles.input)}\n placeholder={props.placeholder ?? 'DD MMM YYYY'}\n maxLength={11}\n index={0}\n />\n <ArkDP.Input\n {...nativeProps}\n {...fieldStates}\n {...(invalid && { 'aria-invalid': true })}\n data-range-input\n defaultValue={endDate}\n data-range-end-input\n className={cx(props.className, datePickerStyles.input)}\n placeholder={props.placeholder ?? 'DD MMM YYYY'}\n maxLength={11}\n index={1}\n />\n </ArkDP.Control>\n )\n}\n\n/**\n * The content component for the DatePicker which contains the calendar.\n * @definition [Date Picker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <Field>\n * <DatePicker name=\"start_date\">\n * <DatePickerLabel>Start date</DatePickerLabel>\n * <DatePickerInput />\n * <DatePickerCalendar />\n * </DatePicker>\n * </Field>\n * ```\n */\nexport function DatePickerContent(\n props: DatePickerContentProps & {\n withModal?: boolean\n },\n) {\n const { children, withModal, ...contentProps } = props\n return (\n <Portal disabled={withModal ?? false}>\n <ArkDP.Positioner className={datePickerStyles.positioner}>\n <ArkDP.Content\n {...contentProps}\n className={cx(contentProps.className, datePickerStyles.content)}\n >\n {children}\n </ArkDP.Content>\n </ArkDP.Positioner>\n </Portal>\n )\n}\n\n/**\n * The day view component for the DatePicker.\n * @definition [Date Picker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <Field>\n * <DatePicker name=\"start_date\">\n * <DatePickerLabel>Start date</DatePickerLabel>\n * <DatePickerInput />\n * <DatePickerCalendar />\n * </DatePicker>\n * </Field>\n * ```\n */\nexport function DatePickerDayView(props: Omit<DatePickerViewProps, 'view'>) {\n function isToday(date: ArkDP.DateValue): boolean {\n const today = new Date()\n const formatted = today.toISOString().split('T')[0]\n const arkDate = `${date.year}-${String(date.month).padStart(2, '0')}-${String(date.day).padStart(2, '0')}`\n return formatted === arkDate\n }\n\n function isPastDay(date: ArkDP.DateValue): boolean {\n const today = new Date()\n const arkDate = `${date.year}-${String(date.month).padStart(2, '0')}-${String(date.day).padStart(2, '0')}`\n return new Date(arkDate) < today\n }\n\n function getDayValue(date: ArkDP.DateValue): 'today' | 'past' | 'future' {\n if (isToday(date)) return 'today'\n if (isPastDay(date)) return 'past'\n return 'future'\n }\n\n return (\n <DatePickerView {...props} view=\"day\">\n <DatePickerContext>\n {(datePicker) => (\n <>\n <DatePickerViewControlGroup />\n\n <DatePickerTable>\n <ArkDP.TableHead>\n <ArkDP.TableRow>\n {datePicker.weekDays.map((weekDay, id) => (\n <DatePickerTableHeader key={id}>\n {weekDay.narrow}\n </DatePickerTableHeader>\n ))}\n </ArkDP.TableRow>\n </ArkDP.TableHead>\n\n <ArkDP.TableBody>\n {datePicker.weeks.map((week, id) => (\n <ArkDP.TableRow key={id}>\n {week.map((day, id) => (\n <DatePickerTableCell key={id} value={day}>\n <DatePickerTableCellTrigger\n data-date={getDayValue(day)}\n >\n {day.day}\n </DatePickerTableCellTrigger>\n </DatePickerTableCell>\n ))}\n </ArkDP.TableRow>\n ))}\n </ArkDP.TableBody>\n </DatePickerTable>\n </>\n )}\n </DatePickerContext>\n </DatePickerView>\n )\n}\n\n/**\n * The month view component for the DatePicker.\n * @definition [Date Picker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <Field>\n * <DatePicker name=\"start_date\">\n * <DatePickerLabel>Start date</DatePickerLabel>\n * <DatePickerInput />\n * <DatePickerCalendar />\n * </DatePicker>\n * </Field>\n * ```\n */\nexport function DatePickerMonthView(props: Omit<DatePickerViewProps, 'view'>) {\n return (\n <ArkDP.View {...props} view=\"month\">\n <ArkDP.Context>\n {(datePicker) => (\n <>\n <DatePickerViewControlGroup />\n\n <DatePickerTable>\n <ArkDP.TableBody>\n {datePicker\n .getMonthsGrid({ columns: 4, format: 'short' })\n .map((months, id) => (\n <ArkDP.TableRow key={id}>\n {months.map((month, id) => (\n <DatePickerTableCell key={id} value={month.value}>\n <DatePickerTableCellTrigger>\n {month.label}\n </DatePickerTableCellTrigger>\n </DatePickerTableCell>\n ))}\n </ArkDP.TableRow>\n ))}\n </ArkDP.TableBody>\n </DatePickerTable>\n </>\n )}\n </ArkDP.Context>\n </ArkDP.View>\n )\n}\n\n/**\n * The year view component for the DatePicker.\n * @definition [Date Picker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <Field>\n * <DatePicker name=\"start_date\">\n * <DatePickerLabel>Start date</DatePickerLabel>\n * <DatePickerInput />\n * <DatePickerCalendar />\n * </DatePicker>\n * </Field>\n * ```\n */\nexport function DatePickerYearView(props: Omit<DatePickerViewProps, 'view'>) {\n return (\n <ArkDP.View {...props} view=\"year\">\n <ArkDP.Context>\n {(datePicker) => (\n <>\n <DatePickerViewControlGroup />\n\n <DatePickerTable>\n <ArkDP.TableBody>\n {datePicker.getYearsGrid({ columns: 4 }).map((years, id) => (\n <ArkDP.TableRow key={id}>\n {years.map((year, id) => (\n <DatePickerTableCell key={id} value={year.value}>\n <DatePickerTableCellTrigger>\n {year.label}\n </DatePickerTableCellTrigger>\n </DatePickerTableCell>\n ))}\n </ArkDP.TableRow>\n ))}\n </ArkDP.TableBody>\n </DatePickerTable>\n </>\n )}\n </ArkDP.Context>\n </ArkDP.View>\n )\n}\n\n/**\n * An abstraction of the DatePicker content components that contain the\n * different calendar views and controls.\n * @definition [Date Picker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <Field>\n * <DatePicker name=\"start_date\">\n * <DatePickerLabel>Start date</DatePickerLabel>\n * <DatePickerInput />\n * <DatePickerCalendar />\n * </DatePicker>\n * </Field>\n * ```\n */\nexport function DatePickerCalendar(props: { withModal?: boolean }) {\n return (\n <DatePickerContent withModal={props.withModal}>\n <DatePickerDayView />\n <DatePickerMonthView />\n <DatePickerYearView />\n </DatePickerContent>\n )\n}\n","import {\n Portal as ArkPortal,\n type PortalProps as ArkPortalProps,\n} from '@ark-ui/react'\n\n/**\n * This module is the Portal component.\n * @module\n */\n\nexport type PortalProps = ArkPortalProps\n\n/**\n * The Portal component is used to render children into a DOM node that exists outside the DOM hierarchy of the parent component.\n * @see https://cerberus.digitalu.design/react/portal\n * @definition [React Portal Docs](https://react.dev/reference/react-dom/createPortal)\n * @example\n * ```tsx\n * 'use client'\n *\n * import { Portal } from '@cerberus/react'\n *\n * function SomeFeatureWithinSSRPage() {\n * return (\n * <Portal>\n * <div>Portal Content outside of the React VDom tree</div>\n * </Portal>\n * )\n * }\n */\nexport const Portal = ArkPortal\n","import {\n DatePicker as ArkDP,\n type DatePickerLabelProps,\n type DatePickerTableCellProps,\n type DatePickerTableCellTriggerProps,\n type DatePickerTableHeaderProps,\n type DatePickerTableProps,\n type DatePickerViewControlProps,\n} from '@ark-ui/react'\nimport { cx } from '@cerberus/styled-system/css'\nimport { datePicker, label } from '@cerberus/styled-system/recipes'\n\n/**\n * This module contains the DatePicker server family components.\n * @module DatePicker\n */\n\n// We are not exposing this to the public API\nconst datePickerStyles = datePicker()\n\n/**\n * The label component for the DatePicker.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <DatePickerLabel>\n * <DatePickerLabel.Label>...</DatePickerLabel.Label>\n * </DatePickerLabel>\n * ```\n */\nexport function DatePickerLabel(props: DatePickerLabelProps) {\n const { className, ...arkProps } = props\n return (\n <ArkDP.Label\n {...arkProps}\n className={cx(\n className,\n label({\n size: 'sm',\n }),\n )}\n />\n )\n}\n\n/**\n * The control component for the DatePicker which wraps the triggers to switch\n * between calendar views.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <DatePickerViewControl>\n * <PrevTrigger />\n * <ViewTrigger />\n * <NextTrigger />\n * </DatePickerViewControl>\n * ```\n */\nexport function DatePickerViewControl(props: DatePickerViewControlProps) {\n return (\n <ArkDP.Control\n {...props}\n className={cx(props.className, datePickerStyles.viewControl)}\n />\n )\n}\n\n/**\n * The table component for the DatePicker.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <DatePickerTable />\n * ```\n */\nexport function DatePickerTable(props: DatePickerTableProps) {\n return (\n <ArkDP.Table\n {...props}\n className={cx(props.className, datePickerStyles.table)}\n />\n )\n}\n\n/**\n * The header component for the DatePicker table.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <DatePickerTableHeader />\n * ```\n */\nexport function DatePickerTableHeader(props: DatePickerTableHeaderProps) {\n return (\n <ArkDP.TableHeader\n {...props}\n className={cx(props.className, datePickerStyles.tableHeader)}\n />\n )\n}\n\n/**\n * The cell component for the DatePicker table.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <DatePickerTableCell />\n * ```\n */\nexport function DatePickerTableCell(props: DatePickerTableCellProps) {\n return (\n <ArkDP.TableCell\n {...props}\n className={cx(props.className, datePickerStyles.tableCell)}\n />\n )\n}\n\n/**\n * The cell component for the DatePicker table.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <DatePickerTableCell />\n * ```\n */\nexport function DatePickerTableCellTrigger(\n props: DatePickerTableCellTriggerProps,\n) {\n return (\n <ArkDP.TableCellTrigger\n {...props}\n className={cx(props.className, datePickerStyles.tableCellTrigger)}\n />\n )\n}\n\n/**\n * The view container which wraps the control and content components.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <DatePickerView />\n * ```\n */\nexport const DatePickerView = ArkDP.View\n\n/**\n * The context component for the DatePicker which provides the DatePicker state.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <DatePickerContext />\n * ```\n */\nexport const DatePickerContext = ArkDP.Context\n","import type { ButtonHTMLAttributes } from 'react'\nimport { cx } from '@cerberus/styled-system/css'\nimport {\n iconButton,\n type IconButtonVariantProps,\n} from '@cerberus/styled-system/recipes'\n\n/**\n * This module contains the Icon Button component.\n * @module\n */\n\nexport interface IconButtonRawProps\n extends ButtonHTMLAttributes<HTMLButtonElement> {\n /**\n * The aria-label attribute for the icon button.\n */\n ariaLabel: string\n}\nexport type IconButtonProps = IconButtonRawProps & IconButtonVariantProps\n\n/**\n * A component that allows the user to perform actions using an icon\n * @see https://cerberus.digitalu.design/react/icon-button\n */\nexport function IconButton(props: IconButtonProps): JSX.Element {\n const { ariaLabel, palette, usage, size, ...nativeProps } = props\n return (\n <button\n {...nativeProps}\n aria-label={ariaLabel ?? 'Icon Button'}\n className={cx(\n nativeProps.className,\n iconButton({\n palette,\n usage,\n size,\n }),\n )}\n />\n )\n}\n","import {\n Dialog as ArkDialog,\n type DialogContentProps as ArkDialogContentProps,\n type DialogRootProps,\n type DialogTitleProps,\n} from '@ark-ui/react'\nimport {\n dialog,\n type DialogVariantProps,\n} from '@cerberus/styled-system/recipes'\nimport { Portal } from './Portal'\nimport { cx } from '@cerberus/styled-system/css'\n\nexport type DialogProviderProps = DialogRootProps\n\n/**\n * The provider that controls the dialog components.\n * @definition [Dialog docs](https://cerberus.digitalu.design/react/dialog)\n * @example\n * ```tsx\n * <DialogProvider>\n * <DialogTrigger asChild>\n * <Button>Open Dialog</Button>\n * </DialogTrigger>\n * <Dialog>\n * <Text>Dialog Content</Text>\n * <DialogCloseTrigger>Close</DialogCloseTrigger>\n * </Dialog>\n * </DialogProvider>\n * ```\n */\nexport function DialogProvider(props: DialogProviderProps) {\n return <ArkDialog.Root {...props} />\n}\n\nexport interface DialogProps\n extends Omit<ArkDialogContentProps, 'size'>,\n DialogVariantProps {}\n\n/**\n * The content of the dialog. Must be used within the `DialogProvider` component.\n * @definition [Dialog docs](https://cerberus.digitalu.design/react/dialog)\n * @example\n * ```tsx\n * <DialogProvider>\n * <DialogTrigger asChild>\n * <Button>Open Dialog</Button>\n * </DialogTrigger>\n * <Dialog>\n * <Text>Dialog Content</Text>\n * </Dialog>\n * </DialogProvider>\n * ```\n */\nexport function Dialog(props: DialogProps) {\n const { size, ...contentProps } = props\n const styles = dialog({ size })\n return (\n <Portal>\n <DialogBackdrop className={styles.backdrop} />\n <DialogPositioner className={styles.positioner}>\n <DialogContent className={styles.content} {...contentProps} />\n </DialogPositioner>\n </Portal>\n )\n}\n\n/**\n * The heading of the dialog. Must be used within the `DialogContent` component.\n * @definition [Dialog docs](https://cerberus.digitalu.design/react/dialog)\n * @example\n * ```tsx\n * <DialogProvider>\n * <DialogTrigger asChild>\n * <Button>Open Dialog</Button>\n * </DialogTrigger>\n * <Dialog>\n * <DialogHeading>Dialog Title</DialogHeading>\n * <Text>Dialog Content</Text>\n * </Dialog>\n * </DialogProvider>\n * ```\n */\nexport function DialogHeading(props: DialogTitleProps) {\n const styles = dialog()\n return (\n <ArkDialog.Title {...props} className={cx(props.className, styles.title)} />\n )\n}\n\n/**\n * The description of the dialog. Must be used within the `DialogContent` component.\n * @definition [Dialog docs](https://cerberus.digitalu.design/react/dialog)\n * @example\n * ```tsx\n * <DialogProvider>\n * <DialogTrigger asChild>\n * <Button>Open Dialog</Button>\n * </DialogTrigger>\n * <Dialog>\n * <DialogHeading>Dialog Title</DialogHeading>\n * <DialogDescription>Dialog Description</DialogDescription>\n * </Dialog>\n * </DialogProvider>\n * ```\n */\nexport function DialogDescription(props: DialogTitleProps) {\n const styles = dialog()\n return (\n <ArkDialog.Description\n {...props}\n className={cx(props.className, styles.description)}\n />\n )\n}\n\n/**\n * The trigger that opens the dialog. Must be used within the `DialogProvider`\n * component.\n * @definition [Dialog docs](https://cerberus.digitalu.design/react/dialog)\n * @example\n * ```tsx\n * <DialogTrigger asChild>\n * <Button>Open Dialog</Button>\n * </DialogTrigger>\n * ```\n */\nexport const DialogTrigger = ArkDialog.Trigger\n\n/**\n * The trigger that closes the dialog. Must be used within the `DialogProvider`\n * component.\n * @definition [Dialog docs](https://cerberus.digitalu.design/react/dialog)\n * @example\n * ```tsx\n * <DialogProvider>\n * <DialogTrigger asChild>\n * <Button>Open Dialog</Button>\n * </DialogTrigger>\n * <Dialog>\n * <Text>Dialog Content</Text>\n * <DialogCloseTrigger>Close</DialogCloseTrigger>\n * </Dialog>\n * </DialogProvider>\n * ```\n */\nexport const DialogCloseTrigger = ArkDialog.CloseTrigger\n\n/**\n * The backdrop of the dialog. Must be used within the `DialogProvider`\n * component.\n */\nexport const DialogBackdrop = ArkDialog.Backdrop\n\n/**\n * The positioner of the dialog. Must be used within the `DialogProvider`\n * component.\n */\nexport const DialogPositioner = ArkDialog.Positioner\n\n/**\n * The content of the dialog. Must be used within the `DialogProvider`\n * component.\n */\nexport const DialogContent = ArkDialog.Content\n","'use client'\n\nimport {\n Dialog as ArkDialog,\n type DialogCloseTriggerProps,\n} from '@ark-ui/react'\nimport { dialog } from '@cerberus/styled-system/recipes'\nimport { cx } from '@cerberus/styled-system/css'\nimport { IconButton } from './IconButton'\nimport { useCerberusContext } from '../context/cerberus'\n\n/**\n * This module contains client-side components for the Dialog family.\n * @module @cerberus-design/react/dialog\n */\n\nexport function DialogCloseIconTrigger(props: DialogCloseTriggerProps) {\n const { icons } = useCerberusContext()\n const { close: CloseIcon } = icons\n\n const styles = dialog()\n\n return (\n <ArkDialog.CloseTrigger\n {...props}\n className={cx(props.className, styles.closeTrigger)}\n asChild\n >\n <IconButton\n ariaLabel=\"Close dialog\"\n palette=\"action\"\n size=\"lg\"\n usage=\"ghost\"\n >\n <CloseIcon />\n </IconButton>\n </ArkDialog.CloseTrigger>\n )\n}\n","'use client'\n\nimport { useDroppable, type UseDroppableArguments } from '@dnd-kit/core'\nimport { useId, type HtmlHTMLAttributes, type PropsWithChildren } from 'react'\n\nexport interface DroppableProps\n extends Omit<HtmlHTMLAttributes<HTMLDivElement>, 'id'>,\n UseDroppableArguments {\n /**\n * If the item has been dropped.\n */\n dropped?: boolean\n}\n\n/**\n * A Cerberus component is used to define a drop target for draggable elements.\n * @see https://dndkit.com/\n * @example\n * ```tsx\n * <Droppable id=\"dropzone\">\n * <Draggable id=\"draggable\">Drag me</Draggable>\n * </Droppable>\n * ```\n */\nexport function Droppable(props: PropsWithChildren<DroppableProps>) {\n const { dropped, id, disabled, data, resizeObserverConfig, ...nativeProps } =\n props\n const uuid = useId()\n const { isOver, setNodeRef } = useDroppable({\n data,\n disabled,\n id: id || uuid,\n resizeObserverConfig,\n })\n\n return (\n <div\n {...nativeProps}\n data-over={isOver}\n data-dropped={dropped}\n ref={setNodeRef}\n >\n {props.children}\n </div>\n )\n}\n","'use client'\n\nimport type { HTMLAttributes } from 'react'\nimport { cx } from '@cerberus/styled-system/css'\nimport {\n fieldMessage,\n type FieldMessageVariantProps,\n} from '@cerberus/styled-system/recipes'\nimport { useFieldContext } from '../context/field'\n\n/**\n * This module contains the FieldMessage component.\n * @module\n */\nexport interface FieldMessageBaseProps\n extends HTMLAttributes<HTMLParagraphElement> {\n /**\n * 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.\n *\n * @example For help messages: `help:field_id`\n * @example For error messages: `error:field_id`\n */\n id: string\n}\nexport type FieldMessageProps = FieldMessageBaseProps & FieldMessageVariantProps\n\n/**\n * A component that provides feedback about the field.\n * @see https://cerberus.digitalu.design/react/field-message\n * @example\n * ```tsx\n * <Field>\n * <Label htmlFor=\"first_name\">First Name</Label>\n * <Input aria-describedBy=\"help:first_name\" id=\"first_name\" type=\"text\" />\n * <FieldMessage id=\"help:first_name\">\n * This will only be used in your account information.\n * </FieldMessage>\n * </Field>\n * ```\n */\nexport function FieldMessage(props: FieldMessageProps) {\n const { invalid } = useFieldContext()\n return (\n <small\n {...props}\n {...(invalid && { 'aria-invalid': true })}\n className={cx(props.className, fieldMessage())}\n />\n )\n}\n","'use client'\n\nimport { createContext, useContext, type PropsWithChildren } from 'react'\n\n/**\n * This module provides a context and hook for feature flags.\n * @module\n */\n\nexport interface FeatureFlagValue {\n [key: string]: boolean\n}\n\nconst FeatureFlagContext = createContext<FeatureFlagValue | null>(null)\n\nexport interface FeatureFlagProviderProps {\n flags: FeatureFlagValue\n}\n\n/**\n * Provides feature flags to the application.\n * @see https://cerberus.digitalu.design/react/feature-flags\n * @example\n * ```tsx\n * // This should be a JSON file or a server response.\n * const flags = {\n * featureOne: true,\n * featureTwo: false\n * }\n *\n * // Wrap the Provider around the root of your application.\n * <FeatureFlags flags={flags}>\n * <FeatureFlag flag=\"featureOne\">\n * This is visible.\n * </FeatureFlag>\n * <FeatureFlag flag=\"featureTwo\">\n * This is hidden.\n * </FeatureFlag>\n * </FeatureFlags>\n * ```\n */\nexport function FeatureFlags(\n props: PropsWithChildren<FeatureFlagProviderProps>,\n) {\n return (\n <FeatureFlagContext.Provider value={props.flags}>\n {props.children}\n </FeatureFlagContext.Provider>\n )\n}\n\n/**\n * Used to retrieve the context of the FeatureFlags provider.\n */\nexport function useFeatureFlags(key: string): boolean {\n const context = useContext(FeatureFlagContext)\n if (context === null) {\n throw new Error(\n 'useFeatureFlag must be used within a FeatureFlags Provider',\n )\n }\n return context[key] ?? false\n}\n","'use client'\n\nimport type { PropsWithChildren } from 'react'\nimport { useFeatureFlags } from '../context/feature-flags'\nimport { Show } from './Show'\n\nexport interface FeatureFlagProps {\n /**\n * The name of the feature flag to check.\n */\n flag: string\n}\n\n/**\n * A component that allows you to show or hide content based on a feature flag.\n * @see https://cerberus.digitalu.design/react/feature-flags\n */\nexport function FeatureFlag(props: PropsWithChildren<FeatureFlagProps>) {\n const showContent = useFeatureFlags(props.flag)\n return <Show when={showContent}>{props.children}</Show>\n}\n","'use client'\n\nimport { css, cx } from '@cerberus/styled-system/css'\nimport type { FieldsetHTMLAttributes } from 'react'\nimport { useFieldContext } from '../context/field'\n\n/**\n * This module contains the Fieldset component.\n * @module Fieldset\n */\n\nexport type FieldsetProps = FieldsetHTMLAttributes<HTMLFieldSetElement>\n\n/**\n * A component to group related elements in a form for accessibility.\n * @memberof Field\n * @see https://cerberus.digitalu.com/react/fieldset\n * @description [A11y Form Checklist](https://www.a11yproject.com/checklist/#forms)\n * @description [MDN Web Docs: Fieldset](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/fieldset)\n * @example\n * ```tsx\n * import { Fieldset, Legend, Field, Radio, Label } from '@cerberus/react'\n * import { Hstack } from '@cerberus/styled-system/jsx'\n *\n * function SomeForm() {\n * return (\n * <form>\n * <Fieldset>\n * <Legend>Do you like cats?</Legend>\n * <Hstack>\n * <Field>\n * <Radio id=\"yes\" name=\"cats\" value=\"yes\" />\n * <Label htmlFor=\"yes\">Yes</Label>\n * </Field>\n * </Hstack>\n * <Hstack>\n * <Field>\n * <Radio id=\"no\" name=\"cats\" value=\"no\" />\n * <Label htmlFor=\"no\">No</Label>\n * </Field>\n * </Hstack>\n * </Fieldset>\n * </form>\n * )\n * }\n */\nexport function Fieldset(props: FieldsetProps) {\n const { invalid, ...formState } = useFieldContext()\n\n return (\n <fieldset\n {...props}\n {...formState}\n {...(invalid && { 'aria-invalid': true })}\n className={cx(\n props.className,\n css({\n border: 'none',\n pt: 2,\n margin: 0,\n }),\n )}\n />\n )\n}\n","import { cx } from '@cerberus/styled-system/css'\nimport { label, type LabelVariantProps } from '@cerberus/styled-system/recipes'\nimport type { LabelProps } from './Label'\n\n/**\n * This module contains the FieldsetLabel component.\n * @module FieldsetLabel\n */\n\nexport type FieldsetLabelProps = LabelProps & LabelVariantProps\n\n/**\n * Used for labeling inputs that are children of a Fieldset group.\n * @memberof Fieldset\n * @see https://cerberus.digitalu.design/react/fieldset\n * @definition [ARIA Forms](https://www.a11yproject.com/checklist/#forms)\n * @example\n * ```tsx\n * import { Fieldset, Legend, Field, Radio, Label } from '@cerberus/react'\n * import { Hstack } from '@cerberus/styled-system/jsx'\n *\n * function SomeForm() {\n * return (\n * <form>\n * <Fieldset>\n * <Legend>Do you like cats?</Legend>\n * <Hstack>\n * <Field>\n * <Radio id=\"yes\" name=\"cats\" value=\"yes\" />\n * <FieldsetLabel htmlFor=\"yes\">Yes</FieldsetLabel>\n * </Field>\n * </Hstack>\n * <Hstack>\n * <Field>\n * <Radio id=\"no\" name=\"cats\" value=\"no\" />\n * <FieldsetLabel htmlFor=\"no\">No</FieldsetLabel>\n * </Field>\n * </Hstack>\n * </Fieldset>\n * </form>\n * )\n * }\n * ```\n */\nexport function FieldsetLabel(props: FieldsetLabelProps) {\n const { size, usage, ...nativeProps } = props\n return (\n <label\n {...nativeProps}\n className={cx(\n nativeProps.className,\n label({\n size,\n usage,\n }),\n )}\n />\n )\n}\n","'use client'\n\nimport {\n useCallback,\n useMemo,\n type HTMLAttributes,\n type MouseEvent,\n} from 'react'\nimport {\n fileStatus,\n type FileStatusVariantProps,\n} from '@cerberus/styled-system/recipes'\nimport { css, cx } from '@cerberus/styled-system/css'\nimport { hstack, vstack } from '@cerberus/styled-system/patterns'\nimport { Field } from '../context/field'\nimport { useCerberusContext } from '../context/cerberus'\nimport { FieldMessage } from './FieldMessage'\nimport { ProgressBar, type ProgressBarProps } from './ProgressBar'\nimport { IconButton } from './IconButton'\nimport { Avatar } from './Avatar'\n\n/**\n * This module contains the FileStatus component.\n * @module\n */\n\n/**\n * The available values of the fileStatus helper Object.\n * @example\n * ```tsx\n * import { fileStatus } from '@cerberus/react'\n * processStatus.TODO // 'todo'\n * ```\n */\nexport type FileStatusKey = (typeof processStatus)[keyof typeof processStatus]\n\n/**\n * The actions that can be performed on a file.\n */\nexport type FileStatusActions = 'cancel' | 'retry' | 'delete'\nexport interface FileBaseStatusProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'onClick'> {\n /**\n * A unique identifier for the file status. Required for accessibility.\n */\n id: string\n /**\n * The name of the file.\n */\n file: string\n /**\n * The percentage of the file that has been processed.\n */\n now: ProgressBarProps['now']\n /**\n * The status of the file.\n */\n status: processStatus\n /**\n * The action to perform on the file when a user clicks the\n * button located at the end of the status card.\n * @param status - The status of the file.\n * @param e - The event object.\n * @example\n * ```tsx\n * <FileStatus file=\"file.txt\" now={0} status={processStatus.TODO} action={(status, e) => console.log(status, e)} />\n * ```\n * @default () => {}\n */\n onClick: (status: FileStatusActions, e: MouseEvent<HTMLButtonElement>) => void\n}\nexport type FileStatusProps = FileBaseStatusProps & FileStatusVariantProps\n\n/**\n * A helper object to represent the status of a file.\n * @example\n * ```tsx\n * import { fileStatus } from '@cerberus/react'\n * processStatus.TODO // 'todo'\n * ```\n */\nexport const enum processStatus {\n TODO = 'todo',\n PROCESSING = 'processing',\n DONE = 'done',\n ERROR = 'error',\n}\n\n/**\n * A component that displays the status of a file during file processing.\n * @see https://cerberus.digitalu.design/react/file-uploader\n * @example\n * ```tsx\n * <FileStatus file=\"file.txt\" now={0} status={processStatus.TODO} action={(status, e) => console.log(status, e)} />\n * ```\n */\nexport function FileStatus(props: FileStatusProps) {\n const { file, now, status, onClick, ...nativeProps } = props\n const actionLabel = useMemo(() => getStatusActionLabel(status), [status])\n const palette = useMemo(() => getPalette(status), [status])\n const modalIconPalette = useMemo(() => getModalIconPalette(status), [status])\n const styles = useMemo(() => {\n switch (status) {\n case processStatus.TODO:\n return fileStatus({ status: 'todo' })\n case processStatus.PROCESSING:\n return fileStatus({ status: 'processing' })\n case processStatus.DONE:\n return fileStatus({ status: 'done' })\n case processStatus.ERROR:\n return fileStatus({ status: 'error' })\n default:\n return fileStatus()\n }\n }, [status])\n\n const handleClick = useCallback(\n (e: MouseEvent<HTMLButtonElement>) => {\n const actionStatus = getStatusActionLabel(\n status,\n ).toLocaleLowerCase() as FileStatusActions\n onClick(actionStatus, e)\n },\n [onClick],\n )\n\n return (\n <div\n {...nativeProps}\n className={cx(nativeProps.className, styles.root, hstack())}\n >\n <Avatar\n ariaLabel=\"\"\n gradient={modalIconPalette}\n icon={<MatchFileStatusIcon size={24} status={status} />}\n src=\"\"\n />\n\n <div\n className={vstack({\n alignItems: 'flex-start',\n gap: '0.12rem',\n w: 'full',\n })}\n >\n <small\n className={css({\n color: 'page.text.initial',\n textStyle: 'label-sm',\n })}\n >\n {file}\n </small>\n <ProgressBar\n id={props.id}\n label=\"File upload status\"\n now={now}\n size=\"sm\"\n />\n <Field invalid={modalIconPalette === 'hades-dark'}>\n <FieldMessage\n className={css({\n color: 'page.text.100',\n })}\n id={`help:${file}`}\n >\n <MatchFileStatusText status={status} now={now} />\n </FieldMessage>\n </Field>\n </div>\n\n <IconButton\n ariaLabel={actionLabel}\n onClick={handleClick}\n palette={palette}\n size=\"sm\"\n >\n <MatchStatusAction status={status} />\n </IconButton>\n </div>\n )\n}\n\ninterface FileStatusElProps {\n status: FileStatusProps['status']\n size?: 16 | 20 | 24 | 32\n now?: number\n}\n\nfunction MatchFileStatusIcon(props: FileStatusElProps) {\n const { icons } = useCerberusContext()\n const {\n waitingFileUploader: TodoIcon,\n fileUploader: FileUploaderIcon,\n invalidAlt: InvalidIcon,\n successNotification: DoneIcon,\n } = icons\n\n switch (props.status) {\n case processStatus.TODO:\n return <TodoIcon size={props.size} />\n case processStatus.PROCESSING:\n return <FileUploaderIcon size={props.size} />\n case processStatus.DONE:\n return <DoneIcon size={props.size} />\n case processStatus.ERROR:\n return <InvalidIcon size={props.size} />\n default:\n throw new Error('Unknown status')\n }\n}\n\nfunction MatchFileStatusText(props: FileStatusElProps) {\n switch (props.status) {\n case processStatus.TODO:\n return 'Waiting to upload'\n case processStatus.PROCESSING:\n return `${props.now}% Complete`\n case processStatus.DONE:\n return 'File uploaded successfully'\n case processStatus.ERROR:\n return 'There was an error uploading the file'\n default:\n throw new Error('Invalid status')\n }\n}\n\nfunction MatchStatusAction(props: FileStatusElProps) {\n const { icons } = useCerberusContext()\n const { close: CloseIcon, redo: RedoIcon, delete: TrashIcon } = icons\n switch (props.status) {\n case processStatus.TODO:\n case processStatus.PROCESSING:\n return <CloseIcon />\n case processStatus.ERROR:\n return <RedoIcon />\n case processStatus.DONE:\n return <TrashIcon />\n default:\n throw new Error('Invalid status')\n }\n}\n\nfunction getStatusActionLabel(status: FileStatusKey) {\n switch (status) {\n case processStatus.TODO:\n case processStatus.PROCESSING:\n return 'Cancel'\n case processStatus.ERROR:\n return 'Retry'\n case processStatus.DONE:\n return 'Delete'\n default:\n return ''\n }\n}\n\nfunction getPalette(status: FileStatusKey) {\n switch (status) {\n case processStatus.TODO:\n case processStatus.PROCESSING:\n return 'danger'\n case processStatus.ERROR:\n return 'action'\n case processStatus.DONE:\n return 'danger'\n default:\n return 'action'\n }\n}\n\nfunction getModalIconPalette(status: FileStatusKey) {\n switch (status) {\n case processStatus.TODO:\n case processStatus.PROCESSING:\n return 'charon-light'\n case processStatus.ERROR:\n return 'hades-dark'\n case processStatus.DONE:\n return 'thanatos-light'\n default:\n return 'charon-light'\n }\n}\n","import { cx } from '@cerberus/styled-system/css'\nimport {\n progressBar,\n type ProgressBarVariantProps,\n} from '@cerberus/styled-system/recipes'\nimport type { HTMLAttributes } from 'react'\n\n/**\n * This module contains the ProgressBar component.\n * @module\n */\n\nexport type ProgressBarBaseProps = HTMLAttributes<HTMLDivElement>\nexport type NonIndeterminateProgressBarProps = {\n /**\n * A unique identifier for the progress bar. Required for accessibility.\n */\n id: string\n /**\n * A description label for the progress bar. Required for accessibility.\n */\n label: string\n /**\n * The state of the progress bar.\n */\n indeterminate?: never\n /**\n * The current value of the progress bar.\n */\n now: number\n}\nexport type IndeterminateProgressBarProps = {\n /**\n * A unique identifier for the progress bar. Required for accessibility.\n */\n id: string\n /**\n * A description label for the progress bar. Required for accessibility.\n */\n label: string\n /**\n * The state of the progress bar.\n */\n indeterminate?: true\n /**\n * The current value of the progress bar.\n */\n now?: never\n}\nexport type ProgressBarProps = ProgressBarBaseProps &\n ProgressBarVariantProps &\n (NonIndeterminateProgressBarProps | IndeterminateProgressBarProps)\n\n/**\n * The ProgressBar component is used to display the progress of a task.\n * @see https://cerberus.digitalu.design/react/progress-indicators\n * @example\n * ```tsx\n * <ProgressBar value={75} />\n * ```\n */\nexport function ProgressBar(props: ProgressBarProps) {\n const { indeterminate, size, usage, now, label, ...nativeProps } = props\n const styles = progressBar({ size, usage })\n const nowClamped = Math.min(100, Math.max(0, now || 0))\n const width = {\n width: indeterminate ? '50%' : `${nowClamped}%`,\n }\n\n return (\n <div\n {...nativeProps}\n aria-label={label}\n aria-valuemin={0}\n aria-valuemax={100}\n aria-valuenow={indeterminate ? 0 : nowClamped}\n className={cx(nativeProps.className, styles.root)}\n role=\"progressbar\"\n >\n <div\n {...(indeterminate && { 'data-indeterminate': true })}\n data-complete={nowClamped === 100}\n className={styles.bar}\n style={width}\n />\n </div>\n )\n}\n","'use client'\n\nimport { cx } from '@cerberus/styled-system/css'\nimport { vstack } from '@cerberus/styled-system/patterns'\nimport { type InputHTMLAttributes } from 'react'\nimport { Show } from './Show'\nimport { fileUploader } from '@cerberus/styled-system/recipes'\nimport { useCerberusContext } from '../context/cerberus'\nimport { Avatar } from './Avatar'\n\nexport interface FileUploaderProps\n extends InputHTMLAttributes<HTMLInputElement> {\n /**\n * The optional heading to display in the FileUploader component.\n */\n heading?: string\n /**\n * The name of the file input element.\n */\n name: string\n /**\n * Disable the FileUploader component. Good for single-use file uploads.\n */\n disabled?: boolean\n}\n\n/**\n * A component that allows the user to upload files.\n * @see https://cerberus.digitalu.design/react/file-uploader\n */\nexport function FileUploader(props: FileUploaderProps) {\n const { icons } = useCerberusContext()\n const styles = fileUploader()\n const { waitingFileUploader: Icon } = icons\n\n return (\n <div\n {...(props.disabled ? { 'aria-disabled': true } : {})}\n className={cx(\n vstack({\n justify: 'center',\n }),\n styles.container,\n )}\n >\n <div className={styles.icon}>\n <Avatar\n gradient=\"charon-light\"\n ariaLabel=\"\"\n icon={<Icon />}\n size=\"md\"\n src=\"\"\n />\n </div>\n\n <label\n className={cx(\n vstack({\n justify: 'center',\n }),\n styles.label,\n )}\n htmlFor={props.name}\n >\n <Show when={Boolean(props.heading)}>\n <p className={styles.heading}>{props.heading}</p>\n </Show>\n Import {props.accept?.replace(',', ', ')} files\n <p className={styles.description}>Click to select files</p>\n <input\n {...props}\n className={cx(props.className, styles.input)}\n type=\"file\"\n />\n </label>\n </div>\n )\n}\n","'use client'\n\nimport type { InputHTMLAttributes, ReactNode } from 'react'\nimport { input, type InputVariantProps } from '@cerberus/styled-system/recipes'\nimport { cx } from '@cerberus/styled-system/css'\nimport { useFieldContext } from '../context/field'\nimport { useCerberusContext } from '../context/cerberus'\nimport { Show } from './Show'\n\nexport interface InputBaseProps\n extends Omit<InputHTMLAttributes<HTMLInputElement>, 'id' | 'size'> {\n /**\n * The id of the FieldMessage component used to describe the input. Required for accessibility.\n */\n describedBy?: string\n /**\n * The unique identifier for the input element. Required for accessibility.\n */\n id: string\n /**\n * An optional icon to display at the start of the input.\n */\n startIcon?: ReactNode\n /**\n * An optional icon to display at the end of the input.\n */\n endIcon?: ReactNode\n}\nexport type InputProps = InputBaseProps & InputVariantProps\n\n/**\n * A component that allows the user to input text. Must be wrapped in a Field\n * component to keep track of the state for entire group of elements related to\n * the field.\n * @see https://cerberus.digitalu.design/react/input\n */\nexport function Input(props: InputProps) {\n const { describedBy, size, startIcon, endIcon, ...nativeProps } = props\n const inputStyles = input({ size })\n const { invalid, ...fieldStates } = useFieldContext()\n const hasEndIcon = Boolean(endIcon)\n\n const { icons } = useCerberusContext()\n const { invalid: InvalidIcon } = icons\n\n return (\n <div className={inputStyles.root}>\n <Show when={Boolean(startIcon)}>\n <span className={inputStyles.startIcon}>{startIcon}</span>\n </Show>\n\n <input\n {...nativeProps}\n {...fieldStates}\n {...(describedBy && { 'aria-describedby': describedBy })}\n {...(invalid && { 'aria-invalid': true })}\n data-start-icon={Boolean(startIcon)}\n className={cx('peer', nativeProps.className, inputStyles.input)}\n />\n\n <Show when={invalid}>\n <InvalidIcon className={inputStyles.icon} />\n </Show>\n <Show when={hasEndIcon && !invalid}>\n <span className={inputStyles.icon}>{endIcon}</span>\n </Show>\n </div>\n )\n}\n","'use client'\n\nimport type { HTMLAttributes, PropsWithChildren } from 'react'\nimport { label, type LabelVariantProps } from '@cerberus/styled-system/recipes'\nimport { css, cx } from '@cerberus/styled-system/css'\nimport { hstack } from '@cerberus/styled-system/patterns'\nimport { useFieldContext } from '../context/field'\nimport { Show } from './Show'\n\n/**\n * This module contains the Label component.\n * @module\n */\nexport interface LabelBaseProps extends HTMLAttributes<HTMLLabelElement> {\n /**\n * The unique identifier for the input element. Required for accessibility.\n */\n htmlFor: string\n /**\n * Used to hide the label from the UI while keeping it accessible to screen readers. Typically used for global search inputs that have no visible label.\n */\n hidden?: boolean\n}\nexport type LabelProps = LabelBaseProps & LabelVariantProps\n\n/**\n * A a11y compliant label component.\n * @definition [ARIA Forms](https://www.a11yproject.com/checklist/#forms)\n * @see https://cerberus.digitalu.design/react/label\n * @example\n * ```tsx\n * <Field required>\n * <Label htmlFor=\"search\" hidden>Search everything</Label>\n * <Input id=\"search\" startIcon={Search} type=\"text\" />\n * </Field>\n * ```\n */\nexport function Label(props: PropsWithChildren<LabelProps>) {\n const { hidden, size, ...nativeProps } = props\n const { required, disabled } = useFieldContext()\n const usage = hidden ? 'hidden' : 'visible'\n\n return (\n <label\n {...nativeProps}\n {...(disabled && { 'data-disabled': true })}\n className={cx(\n nativeProps.className,\n label({ size, usage }),\n hstack({\n justify: 'space-between',\n w: 'full',\n }),\n )}\n >\n {props.children}\n <Show when={required}>\n <span\n className={css({\n color: 'page.text.100',\n fontSize: 'inherit',\n })}\n >\n (required)\n </span>\n </Show>\n </label>\n )\n}\n","'use client'\n\nimport { css, cx } from '@cerberus/styled-system/css'\nimport { type HTMLAttributes } from 'react'\nimport { useFieldContext } from '../context/field'\nimport { Show } from './Show'\nimport { label, type LabelVariantProps } from '@cerberus/styled-system/recipes'\nimport { hstack } from '@cerberus/styled-system/patterns'\n\n/**\n * This module contains the Fieldset component.\n * @module Fieldset\n */\n\nexport type LegendProps = HTMLAttributes<HTMLLegendElement> & LabelVariantProps\n\n/**\n * A component to provide a global label for a group of related elements in a form (for accessibility).\n * @memberof Fieldset\n * @see https://cerberus.digitalu.com/react/fieldset\n * @description [A11y Form Checklist](https://www.a11yproject.com/checklist/#forms)\n * @description [MDN Web Docs: Legend](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/legend)\n * @example\n * ```tsx\n * import { Fieldset, Legend, Field, Radio, Label } from '@cerberus/react'\n * import { Hstack } from '@cerberus/styled-system/jsx'\n *\n * function SomeForm() {\n * return (\n * <form>\n * <Fieldset>\n * <Legend>Do you like cats?</Legend>\n * <Hstack>\n * <Field>\n * <Radio id=\"yes\" name=\"cats\" value=\"yes\" />\n * <Label htmlFor=\"yes\">Yes</Label>\n * </Field>\n * </Hstack>\n * <Hstack>\n * <Field>\n * <Radio id=\"no\" name=\"cats\" value=\"no\" />\n * <Label htmlFor=\"no\">No</Label>\n * </Field>\n * </Hstack>\n * </Fieldset>\n * </form>\n * )\n * }\n * ```\n */\nexport function Legend(props: LegendProps) {\n const { size, ...nativeProps } = props\n const { invalid, ...formState } = useFieldContext()\n\n return (\n <legend\n {...nativeProps}\n {...formState}\n {...(invalid && { 'aria-invalid': true })}\n className={cx(\n nativeProps.className,\n hstack({\n justify: 'space-between',\n w: 'full',\n }),\n label({\n size,\n }),\n )}\n >\n {nativeProps.children}\n <Show when={formState.required}>\n <span\n className={css({\n color: 'page.text.100',\n fontSize: 'inherit',\n })}\n >\n (required)\n </span>\n </Show>\n </legend>\n )\n}\n","import { Menu as ArkMenu } from '@ark-ui/react'\nimport { menu } from '@cerberus/styled-system/recipes'\nimport { cx } from '@cerberus/styled-system/css'\n\n/**\n * This module contains the Menu component family.\n * @module Menu\n */\n\nconst menuStyles = menu()\n\n/**\n * The root Menu component which controls the menu.\n * @definition [Cerberus docs](https://cerberus.digitalu.design/react/menu)\n * @example\n * ```tsx\n * <Menu>\n * <MenuTrigger>Trigger</MenuTrigger>\n * </Menu>\n */\nexport const Menu = ArkMenu.Root\n\n/**\n * The MenuTrigger component opens/closes the Menu.\n * @definition [Cerberus docs](https://cerberus.digitalu.design/react/menu)\n * @example\n * ```tsx\n * <Menu>\n * <MenuTrigger>\n * <Button>Trigger</Button>\n * </MenuTrigger>\n * </Menu>\n */\nexport function MenuTrigger(props: ArkMenu.TriggerProps) {\n return <ArkMenu.Trigger {...props} asChild />\n}\n\n/**\n * The MenuContent component is the container for the menu items.\n * @definition [Cerberus docs](https://cerberus.digitalu.design/react/menu)\n * @example\n * ```tsx\n * <Menu>\n * <MenuTrigger>\n * <Button>Trigger</Button>\n * </MenuTrigger>\n * <MenuContent>\n * <MenuItem value=\"item_1\">Item 1</MenuItem>\n * <MenuItem value=\"item_2\">Item 2</MenuItem>\n * </MenuContent>\n * </Menu>\n */\nexport function MenuContent(props: ArkMenu.ContentProps) {\n return (\n <ArkMenu.Positioner>\n <ArkMenu.Content\n {...props}\n className={cx(props.className, menuStyles.content)}\n />\n </ArkMenu.Positioner>\n )\n}\n\n/**\n * The MenuItem component is a single item in the menu.\n * @definition [Cerberus docs](https://cerberus.digitalu.design/react/menu)\n * @example\n * ```tsx\n * <Menu>\n * <MenuTrigger>\n * <Button>Trigger</Button>\n * </MenuTrigger>\n * <MenuContent>\n * <MenuItem value=\"item_1\">Item 1</MenuItem>\n * <MenuItem value=\"item_2\">Item 2</MenuItem>\n * </MenuContent>\n * </Menu>\n */\nexport function MenuItem(props: ArkMenu.ItemProps) {\n return (\n <ArkMenu.Item {...props} className={cx(props.className, menuStyles.item)} />\n )\n}\n\n/**\n * The MenuItemGroup component is a group of menu items.\n * @definition [Cerberus docs](https://cerberus.digitalu.design/react/menu)\n * @example\n * ```tsx\n * <Menu>\n * <MenuTrigger>\n * <Button>Trigger</Button>\n * </MenuTrigger>\n * <MenuContent>\n * <MenuItemGroup>\n * <MenuItem value=\"item_1\">Item 1</MenuItem>\n * <MenuItem value=\"item_2\">Item 2</MenuItem>\n * </MenuItemGroup>\n * </MenuContent>\n * </Menu>\n */\nexport const MenuItemGroup = ArkMenu.ItemGroup\n\n/**\n * The MenuItemGroupLabel component is the label for a group of menu items.\n * @definition [Cerberus docs](https://cerberus.digitalu.design/react/menu)\n * @example\n * ```tsx\n * <Menu>\n * <MenuTrigger>\n * <Button>Trigger</Button>\n * </MenuTrigger>\n * <MenuContent>\n * <MenuItemGroup>\n * <MenuItemGroupLabel>Group Label</MenuItemGroupLabel>\n * <MenuItem value=\"item_1\">Item 1</MenuItem>\n * <MenuItem value=\"item_2\">Item 2</MenuItem>\n * </MenuItemGroup>\n * </MenuContent>\n * </Menu>\n */\nexport function MenuGroupLabel(props: ArkMenu.ItemGroupLabelProps) {\n return (\n <ArkMenu.ItemGroupLabel\n {...props}\n className={cx(props.className, menuStyles.itemGroupLabel)}\n />\n )\n}\n\n/**\n * The MenuSeparator component is a visual divider between menu items.\n * @definition [Cerberus docs](https://cerberus.digitalu.design/react/menu)\n * @example\n * ```tsx\n * <Menu>\n * <MenuTrigger>\n * <Button>Trigger</Button>\n * </MenuTrigger>\n * <MenuContent>\n * <MenuItemGroup>\n * <MenuGroupLabel>Group Label</MenuGroupLabel>\n * <MenuSeparator />\n * <MenuItem value=\"item_1\">Item 1</MenuItem>\n * <MenuItem value=\"item_2\">Item 2</MenuItem>\n * </MenuItemGroup>\n * </MenuContent>\n * </Menu>\n */\nexport function MenuSeparator(props: ArkMenu.SeparatorProps) {\n return (\n <ArkMenu.Separator\n {...props}\n className={cx(props.className, menuStyles.separator)}\n />\n )\n}\n\n/**\n * The MenuCheckboxItem component is a menu item with a checkbox.\n * @definition [Cerberus docs](https://cerberus.digitalu.design/react/menu)\n * @example\n * ```tsx\n * <Menu>\n * <MenuTrigger>\n * <Button>Trigger</Button>\n * </MenuTrigger>\n * <MenuContent>\n * <MenuCheckboxItem\n * checked={checked}\n * onCheckedChange={setChecked}\n * value=\"checked\"\n * >\n * <MenuItemIndicator>✅</MenuItemIndicator>\n * <MenuItemText>Check me</MenuItemText>\n * </MenuCheckboxItem>\n * </MenuContent>\n */\n// export function MenuCheckboxItem(props: ArkMenu.CheckboxItemProps) {\n// return (\n// <ArkMenu.CheckboxItem\n// {...props}\n// className={cx(props.className, menuStyles.item)}\n// />\n// )\n// }\n\n/**\n * The MenuItemText component is the text for a grouped menu item.\n * @definition [Cerberus docs](https://cerberus.digitalu.design/react/menu)\n * @example\n * ```tsx\n * <Menu>\n * <MenuTrigger>\n * <Button>Trigger</Button>\n * </MenuTrigger>\n * <MenuContent>\n * <MenuCheckboxItem\n * checked={checked}\n * onCheckedChange={setChecked}\n * value=\"checked\"\n * >\n * <MenuItemText>Item 1</MenuItemText>\n * </MenuCheckboxItem>\n * </MenuContent>\n * </Menu>\n */\n// export function MenuItemText(props: ArkMenu.ItemTextProps) {\n// return (\n// <ArkMenu.ItemText\n// {...props}\n// className={cx(props.className, menuStyles.itemText)}\n// />\n// )\n// }\n\n/**\n * The MenuItemIndicator component is the indicator for a grouped menu item.\n * @definition [Cerberus docs](https://cerberus.digitalu.design/react/menu)\n * @example\n * ```tsx\n * <Menu>\n * <MenuTrigger>\n * <Button>Trigger</Button>\n * </MenuTrigger>\n * <MenuContent>\n * <MenuCheckboxItem\n * checked={checked}\n * onCheckedChange={setChecked}\n * value=\"checked\"\n * >\n * <MenuItemIndicator>✅</MenuItemIndicator>\n * <MenuItemText>Check me</MenuItemText>\n * </MenuCheckboxItem>\n * </MenuContent>\n */\n// export function MenuItemIndicator(props: ArkMenu.ItemIndicatorProps) {\n// return (\n// <ArkMenu.ItemIndicator\n// {...props}\n// className={cx(props.className, menuStyles.itemIndicator)}\n// />\n// )\n// }\n","'use client'\n\nimport { cx } from '@cerberus/styled-system/css'\nimport { hstack, vstack } from '@cerberus/styled-system/patterns'\nimport {\n notification,\n type NotificationVariantProps,\n} from '@cerberus/styled-system/recipes'\nimport {\n useRef,\n type DialogHTMLAttributes,\n type PropsWithChildren,\n type MouseEvent,\n} from 'react'\nimport { trapFocus } from '../aria-helpers/trap-focus.aria'\nimport { useCerberusContext } from '../context/cerberus'\n\n/**\n * This module exports the Notification component.\n * @module\n */\n\nfunction MatchNotificationIcon(props: NotificationVariantProps) {\n const { icons } = useCerberusContext()\n const palette = (props.palette || 'info') as\n | 'info'\n | 'success'\n | 'warning'\n | 'danger'\n const key = `${palette}Notification` as keyof typeof icons\n const Icon = icons[key]\n return <Icon />\n}\n\nexport interface NotificationBaseProps\n extends Omit<DialogHTMLAttributes<HTMLDialogElement>, 'onClose'> {\n /**\n * The unique id of the notification. Required for the onClose callback.\n */\n id: string\n /**\n * Called when the close button is clicked.\n */\n onClose?: (e: MouseEvent<HTMLButtonElement>) => void\n}\nexport type NotificationProps = NotificationBaseProps & NotificationVariantProps\n\n/**\n * A static Notification component that displays a message to the user. This\n * is typically only used when not utilizing the NotificationCenter.\n * @see https://cerberus.digitalu.design/react/notification\n * @memberof module:NotificationCenter\n * @example\n * ```tsx\n * <Notification id=\"info:1\" open>\n * <NotificationHeading>Info Notification</NotificationHeading>\n * <NotificationDescription>\n * This is a description with a <a href=\"#\">link</a> in the message.\n * </NotificationDescription>\n * </Notification>\n * ```\n */\nexport function Notification(props: PropsWithChildren<NotificationProps>) {\n const { children, palette, onClose, ...nativeProps } = props\n const ref = useRef<HTMLDialogElement>(null)\n\n const onKeyDown = trapFocus(ref)\n const styles = notification({ palette })\n\n const { icons } = useCerberusContext()\n const { close: CloseIcon } = icons\n\n return (\n <dialog\n {...nativeProps}\n data-placement=\"left\"\n className={cx(\n nativeProps.className,\n hstack({\n position: 'relative',\n gap: '4',\n }),\n styles.dialog,\n )}\n onKeyDown={onKeyDown}\n ref={ref}\n >\n <span className={styles.icon}>\n <MatchNotificationIcon palette={palette} />\n </span>\n\n <div\n className={vstack({\n alignItems: 'flex-start',\n gap: '0',\n py: '2',\n })}\n >\n {children}\n </div>\n\n <button\n aria-label=\"Close\"\n className={styles.close}\n onClick={onClose}\n value={props.id}\n >\n <CloseIcon />\n </button>\n </dialog>\n )\n}\n","import type { KeyboardEvent, KeyboardEventHandler, RefObject } from 'react'\n\nexport function trapFocus(\n modalRef: RefObject<HTMLDialogElement>,\n): KeyboardEventHandler<HTMLDialogElement> {\n const focusableElements =\n 'button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])'\n const focusable = Array.from(\n modalRef.current?.querySelectorAll(focusableElements) ?? [],\n )\n const firstFocusable = focusable[0] as HTMLElement\n const lastFocusable = focusable[focusable.length - 1] as HTMLElement\n\n return function handleKeyDown(event: KeyboardEvent<HTMLDialogElement>) {\n if (event.key === 'Tab') {\n if (event.shiftKey) {\n if (document.activeElement === firstFocusable) {\n lastFocusable.focus()\n event.preventDefault()\n }\n } else {\n if (document.activeElement === lastFocusable) {\n firstFocusable.focus()\n event.preventDefault()\n }\n }\n }\n }\n}\n","import { cx } from '@cerberus/styled-system/css'\nimport {\n notification,\n type NotificationVariantProps,\n} from '@cerberus/styled-system/recipes'\nimport type { HTMLAttributes } from 'react'\n\n/**\n * This module exports the NotificationHeading component.\n * @module\n */\n\nexport type BaseNotificationHeadingProps = HTMLAttributes<HTMLParagraphElement>\nexport type NotificationHeadingProps = BaseNotificationHeadingProps &\n NotificationVariantProps\n\n/**\n * Used to render the heading of a notification.\n * @see https://cerberus.digitalu.design/react/notification\n * @memberof module:NotificationCenter\n * @param props - The anything a HTMLParagraphElement can accept.\n */\nexport function NotificationHeading(props: NotificationHeadingProps) {\n const { palette, ...nativeProps } = props\n const styles = notification({ palette })\n return (\n <p className={cx(nativeProps.className, styles.heading)} {...nativeProps} />\n )\n}\n","import { cx } from '@cerberus/styled-system/css'\nimport {\n notification,\n type NotificationVariantProps,\n} from '@cerberus/styled-system/recipes'\nimport type { HTMLAttributes } from 'react'\n\n/**\n * This module exports the NotificationDescription component.\n * @module\n */\n\nexport type BaseNotificationDescriptionProps =\n HTMLAttributes<HTMLParagraphElement>\nexport type NotificationDescriptionProps = BaseNotificationDescriptionProps &\n NotificationVariantProps\n\n/**\n * Used to render the description of a notification.\n * @see https://cerberus.digitalu.design/react/notification\n * @memberof module:NotificationCenter\n * @param props - The anything a HTMLParagraphElement can accept.\n */\nexport function NotificationDescription(props: NotificationDescriptionProps) {\n const { palette, ...nativeProps } = props\n const styles = notification({ palette })\n return (\n <p\n className={cx(nativeProps.className, styles.description)}\n {...nativeProps}\n />\n )\n}\n","'use client'\n\nimport { cx } from '@cerberus/styled-system/css'\nimport { hstack } from '@cerberus/styled-system/patterns'\nimport { radio } from '@cerberus/styled-system/recipes'\nimport type { RecipeVariantProps } from '@cerberus/styled-system/types'\nimport type { InputHTMLAttributes, PropsWithChildren } from 'react'\nimport { useFieldContext } from '../context/field'\n\n/**\n * This module contains the Radio component.\n * @module\n */\n\nexport type RadioRecipe = RecipeVariantProps<typeof radio>\nexport interface RadioBaseProps\n extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'> {\n /**\n * A unique identifier for the radio button. Required for accessibility.\n */\n id: string\n}\nexport type RadioProps = RadioBaseProps & RadioRecipe\n\n/**\n * The Radio component is used to allow users to select a single option from a list of options.\n * @see https://cerberus.digitalu.design/react/radio\n * @memberof module:Field\n * @example\n * ```tsx\n * <Field>\n * <fieldset name=\"fruit\">\n * <Radio id=\"radio-1\" name=\"fruit\" value=\"1\">\n * Option 1\n * </Radio>\n * <Radio id=\"radio-2\" name=\"fruit\" value=\"2\">\n * Option 2\n * </Radio>\n * <Radio id=\"radio-3\" name=\"fruit\" value=\"3\">\n * Option 3\n * </Radio>\n * </fieldset>\n * </Field>\n * ```\n */\nexport function Radio(props: PropsWithChildren<RadioProps>) {\n const { children, size, ...nativeProps } = props\n const { invalid, ...state } = useFieldContext()\n const styles = radio({ size })\n\n return (\n <div\n className={cx(\n 'group',\n hstack({\n gap: 'sm',\n }),\n styles.root,\n )}\n tabIndex={0}\n >\n <input\n {...nativeProps}\n {...state}\n {...(invalid && { 'aria-invalid': true })}\n className={cx(nativeProps.className, styles.input)}\n tabIndex={-1}\n type=\"radio\"\n />\n {children}\n </div>\n )\n}\n","'use client'\n\nimport { cx } from '@cerberus/styled-system/css'\nimport { hstack } from '@cerberus/styled-system/patterns'\nimport {\n select,\n type SelectVariantProps,\n} from '@cerberus/styled-system/recipes'\nimport type { OptionHTMLAttributes, SelectHTMLAttributes } from 'react'\nimport { useFieldContext } from '../context/field'\nimport { useCerberusContext } from '../context/cerberus'\nimport { Show } from './Show'\n\n/**\n * This module contains the select components.\n * @module\n */\n\nexport type SelectProps = Omit<\n SelectHTMLAttributes<HTMLSelectElement>,\n 'size'\n> &\n SelectVariantProps & {\n /**\n * The unique id of the select element. Required for accessibility.\n */\n id: string\n /**\n * The id of the FieldMessage that describes the select element.\n */\n describedBy?: string\n }\n\n/**\n * Used to allow users to select a single option from a list of options.\n * @see https://cerberus.digitalu.design/react/select\n * @memberof module:Field\n * @example\n * ```tsx\n * <Field>\n * <Select describedby=\"help:fruit\" id=\"fruit\">\n * <Option value=\"\">Choose option</Option>\n * <Option value=\"one\">Option 1</Option>\n * <Option value=\"two\">Option 2</Option>\n * <Option value=\"three\">Option 3</Option>\n * </Select>\n * </Field>\n * ```\n */\nexport function Select(props: SelectProps) {\n const { describedBy, size, ...nativeProps } = props\n const { invalid, ...fieldStates } = useFieldContext()\n\n const { icons } = useCerberusContext()\n const { invalid: InvalidIcon, selectArrow: SelectArrow } = icons\n\n const styles = select({\n size,\n })\n\n return (\n <div className={styles.root}>\n <select\n {...nativeProps}\n {...fieldStates}\n {...(describedBy && { 'aria-describedby': describedBy })}\n {...(invalid && { 'aria-invalid': true })}\n className={styles.input}\n />\n <span\n className={cx(\n styles.iconStack,\n hstack({\n gap: '2',\n }),\n )}\n >\n <Show when={invalid}>\n <span\n {...(invalid && { 'data-invalid': true })}\n className={styles.stateIcon}\n >\n <InvalidIcon />\n </span>\n </Show>\n <span className={styles.arrowIcon}>\n <SelectArrow />\n </span>\n </span>\n </div>\n )\n}\n\n// We only export this component for consistency with the other components\n\nexport type OptionProps = OptionHTMLAttributes<HTMLOptionElement>\n\n/**\n * Option component\n * props: OptionHTMLAttributes<HTMLOptionElement>\n * @example\n * ```tsx\n * <Option value=\"one\">Option 1</Option>\n * ```\n */\nexport function Option(props: OptionProps) {\n return <option {...props} />\n}\n","import type { SVGProps } from 'react'\n\n/**\n * This module contains the Spinner component.\n * @module\n */\n\nexport type SpinnerProps = SVGProps<SVGSVGElement> & {\n /**\n * The size of the spinner\n */\n size?: number | string\n}\n\n/**\n * The Spinner component is used to display a loading indicator. Typically used\n * in buttons, modals, and other components that require a loading state.\n * @see https://cerberus.digitalu.design/react/loading-states/\n * @example\n * ```tsx\n * <Button>\n * <Show when={loading} fallback={<>Save</>}>\n * Saving\n * <Spinner size={24} />\n * </Show>\n * </Button>\n * ```\n */\nexport function Spinner(props: SpinnerProps) {\n return (\n <svg\n aria-busy=\"true\"\n role=\"status\"\n xmlns=\"http://www.w3.org/2000/svg\"\n height={props.size}\n width={props.size}\n viewBox=\"0 0 24 24\"\n {...props}\n >\n <g\n fill=\"none\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n >\n <path\n strokeDasharray={16}\n strokeDashoffset={16}\n d=\"M12 3c4.97 0 9 4.03 9 9\"\n >\n <animate\n fill=\"freeze\"\n attributeName=\"stroke-dashoffset\"\n dur=\"0.15s\"\n values=\"16;0\"\n ></animate>\n <animateTransform\n attributeName=\"transform\"\n dur=\"0.75s\"\n repeatCount=\"indefinite\"\n type=\"rotate\"\n values=\"0 12 12;360 12 12\"\n ></animateTransform>\n </path>\n <path\n strokeDasharray={64}\n strokeDashoffset={64}\n strokeOpacity={0.3}\n d=\"M12 3c4.97 0 9 4.03 9 9c0 4.97 -4.03 9 -9 9c-4.97 0 -9 -4.03 -9 -9c0 -4.97 4.03 -9 9 -9Z\"\n >\n <animate\n fill=\"freeze\"\n attributeName=\"stroke-dashoffset\"\n dur=\"0.6s\"\n values=\"64;0\"\n ></animate>\n </path>\n </g>\n </svg>\n )\n}\n","'use client'\n\nimport { Tabs as ArkTabs } from '@ark-ui/react/tabs'\nimport { cx } from '@cerberus/styled-system/css'\nimport { useTabsContext } from '../context/tabs'\n\n/**\n * This module provides the Tabs family.\n * @module\n */\n\n/**\n * The tab list container for the Tabs group.\n * @definition [Tabs docs](https://cerberus.digitalu.design/react/tabs)\n * @example\n * ```tsx\n * <Tabs>\n * <TabList description=\"Profile settings\">\n * <Tab value=\"overview\">Overview</Tab>\n * </TabList>\n * <TabPanel tab=\"overview\">...</TabPanel>\n * </Tabs>\n * ```\n */\nexport function TabsList(props: ArkTabs.ListProps) {\n const { children, ...tabsProps } = props\n const { styles } = useTabsContext()\n\n return (\n <ArkTabs.List\n {...tabsProps}\n className={cx(tabsProps.className, styles.list)}\n >\n {children}\n <TabIndicator />\n </ArkTabs.List>\n )\n}\n\n/**\n * @deprecated Use `TabsList` instead.\n */\nexport const TabList = TabsList\n\n/**\n * The trigger for the Tabs group.\n * @definition [Tabs docs](https://cerberus.digitalu.design/react/tabs)\n * @example\n * ```tsx\n * <Tabs>\n * <TabList description=\"Profile settings\">\n * <Tab value=\"overview\">Overview</Tab>\n * </TabList>\n * <TabPanel tab=\"overview\">...</TabPanel>\n * </Tabs>\n * ```\n */\nexport function Tab(props: ArkTabs.TriggerProps) {\n const { styles } = useTabsContext()\n return (\n <ArkTabs.Trigger\n {...props}\n className={cx(props.className, styles.trigger)}\n />\n )\n}\n\n/**\n * The indicator for the Tabs group which shows the active tab.\n * @definition [Tabs docs](https://cerberus.digitalu.design/react/tabs)\n * @example\n * ```tsx\n * <Tabs>\n * <TabList description=\"Profile settings\">\n * <Tab value=\"overview\">Overview</Tab>\n * <TabsIndicator />\n * </TabList>\n * <TabPanel tab=\"overview\">...</TabPanel>\n * </Tabs>\n * ```\n */\nexport function TabIndicator(props: ArkTabs.IndicatorProps) {\n const { styles } = useTabsContext()\n return (\n <ArkTabs.Indicator\n {...props}\n className={cx(props.className, styles.indicator)}\n />\n )\n}\n\n/**\n * The content for the Tabs group.\n * @definition [Tabs docs](https://cerberus.digitalu.design/react/tabs)\n * @example\n * ```tsx\n * <Tabs>\n * <TabList description=\"Profile settings\">\n * <Tab value=\"overview\">Overview</Tab>\n * </TabList>\n * <TabPanel tab=\"overview\">...</TabPanel>\n * </Tabs>\n * ```\n */\nexport function TabPanel(props: ArkTabs.ContentProps) {\n const { styles } = useTabsContext()\n return (\n <ArkTabs.Content\n {...props}\n className={cx(props.className, styles.content)}\n />\n )\n}\n","'use client'\n\nimport { Tabs as ArkTabs } from '@ark-ui/react/tabs'\nimport { tabs, type TabsVariantProps } from '@cerberus/styled-system/recipes'\nimport type { Pretty } from '@cerberus/styled-system/types'\nimport {\n createContext,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useState,\n type PropsWithChildren,\n} from 'react'\nimport { getLocalStorage, setLocalStorage } from '../utils/localStorage'\n\n/**\n * This module provides a Tabs component and a hook to access its context.\n * @module Tabs\n */\n\nexport interface TabsContextValue {\n /**\n * The styles for the tabs.\n */\n styles: {\n list: Pretty<string>\n trigger: Pretty<string>\n content: Pretty<string>\n indicator: Pretty<string>\n }\n}\n\nexport const TabsContext = createContext<TabsContextValue | null>(null)\n\nexport interface TabsProviderBaseProps extends ArkTabs.RootProps {\n /**\n * A unique identifier for the Tabs component. Typically used when there are\n * multiple Tabs components on the same page and you want to uniquely cache\n * the active tab state.\n */\n uuid?: string\n /**\n * The default tab to display when the component is first rendered.\n */\n defaultValue?: string\n /**\n * Whether to cache the active tab state in local storage.\n */\n cache?: boolean\n}\n\nexport type TabsProviderProps = TabsProviderBaseProps & TabsVariantProps\n\n/**\n * The Tabs component provides a context to manage tab state.\n * @definition [Tabs docs](https://cerberus.digitalu.design/react/tabs)\n * @example\n * ```tsx\n * <Tabs cache>\n * <TabsList>\n * <Tab value=\"overview\">Overview</Tab>\n * <Tab value=\"guidelines\">Guidelines</Tab>\n * </TabsList>\n * <TabPanel value=\"overview\">Overview content</TabPanel>\n * <TabPanel value=\"guidelines\">Guidelines content</TabPanel>\n * </Tabs>\n * ```\n */\nexport function Tabs(props: PropsWithChildren<TabsProviderProps>): JSX.Element {\n const { cache, defaultValue, palette, uuid, ...arkProps } = props\n const [activeTab, setActiveTab] = useState<string | undefined>(() =>\n cache ? '' : defaultValue,\n )\n const styles = tabs({ palette })\n\n const cacheKey = useMemo(\n () => (uuid ? `cerberus-tabs-${uuid}` : 'cerberus-tabs'),\n [uuid],\n )\n\n const handleValueChange = useCallback(\n (details: { value: string }) => {\n if (cache) {\n setLocalStorage(cacheKey, details.value)\n }\n setActiveTab(details.value)\n },\n [cache],\n )\n\n useEffect(() => {\n if (cache && !activeTab) {\n const cachedTab = getLocalStorage(cacheKey, defaultValue ?? '')\n setActiveTab(cachedTab)\n }\n }, [cache, defaultValue, activeTab])\n\n const value = useMemo(\n () => ({\n active: activeTab,\n styles,\n }),\n [activeTab, palette, styles],\n )\n\n return (\n <TabsContext.Provider value={value}>\n <ArkTabs.Root\n {...arkProps}\n aria-busy={!activeTab}\n className={styles.root}\n defaultValue={defaultValue}\n onValueChange={handleValueChange}\n value={activeTab}\n >\n {props.children}\n </ArkTabs.Root>\n </TabsContext.Provider>\n )\n}\n\n/**\n * Used to access the tabs context.\n * @returns The tabs context.\n */\nexport function useTabsContext(): TabsContextValue {\n const context = useContext(TabsContext)\n if (!context) {\n throw new Error('useTabsContext must be used within a Tabs Provider.')\n }\n return context\n}\n","'use client'\n\n/**\n * A utility function to get a value from local storage.\n * @param key The key to get from local storage.\n * @param defaultValue The fallback value if the key is not found.\n * @returns key or defaultValue\n */\nexport function getLocalStorage<T extends string>(\n key: string,\n defaultValue: T,\n): T {\n const value = window.localStorage.getItem(key)\n if (value) {\n return value as T\n }\n return defaultValue\n}\n\n/**\n * A utility function to set a value in local storage.\n * @param key The key to set in local storage.\n * @param value The value to set in local storage.\n */\nexport function setLocalStorage<T>(key: string, value: T): void {\n const stringValue = typeof value === 'string' ? value : JSON.stringify(value)\n window.localStorage.setItem(key, stringValue)\n}\n","import { cx } from '@cerberus/styled-system/css'\nimport { table } from '@cerberus/styled-system/recipes'\nimport type { PropsWithChildren, TableHTMLAttributes } from 'react'\n\n/**\n * This module contains the table component.\n * @module\n */\n\nexport interface TableProps extends TableHTMLAttributes<HTMLTableElement> {\n /**\n * An easy to understand description of the table. Required for accessibility.\n */\n caption: string\n}\n\n/**\n * An accessible table component.\n * @definition [ARIA Table pattern](https://www.w3.org/WAI/ARIA/apg/patterns/table/)\n * @see https://cerberus.digitalu.design/react/table.\n * @example\n * ```tsx\n * <Table caption=\"Basic Table\">\n * {children}\n * </Table>\n * ```\n */\nexport function Table(props: PropsWithChildren<TableProps>) {\n const { caption, children, ...nativeProps } = props\n const styles = table()\n\n return (\n <div className={styles.container}>\n <table\n {...nativeProps}\n className={cx(nativeProps.className, styles.table)}\n >\n <caption className={styles.caption}>{caption}</caption>\n {children}\n </table>\n </div>\n )\n}\n\n// We only provide this for consistency with the rest of the components\n\nexport type TrProps = TableHTMLAttributes<HTMLTableRowElement>\n\n/**\n * The Tr component is used to render a table row.\n * @definition [Table docs](https://cerberus.digitalu.design/react/table)\n * @example\n * ```tsx\n * <Tr>\n * {children}\n * </Tr>\n * ```\n */\nexport function Tr(props: PropsWithChildren<TrProps>) {\n return <tr {...props} />\n}\n","import { cx } from '@cerberus/styled-system/css'\nimport { thead } from '@cerberus/styled-system/recipes'\n\n/**\n * This module contains the Thead component.\n * @module\n */\n\nexport type TheadProps = JSX.IntrinsicElements['thead']\n\n/**\n * The Thead component is used to render a table header.\n * @see https://cerberus.digitalu.design/react/table\n * @memberof module:Table\n * @example\n * ```tsx\n * <Thead>\n * {children}\n * </Thead>\n * ```\n */\nexport function Thead(props: TheadProps) {\n return <thead {...props} className={cx(props.className, thead())} />\n}\n","'use client'\n\nimport { css, cx } from '@cerberus/styled-system/css'\nimport { th, type ThVariantProps } from '@cerberus/styled-system/recipes'\nimport type { MouseEvent } from 'react'\nimport { Show } from './Show'\n\n/**\n * Th component for the Table component\n * @module\n */\n\nexport type ThBaseProps = JSX.IntrinsicElements['th'] & {\n /**\n * Converts the Th into a actionable button. Called when the user clicks on\n * the Th.\n */\n onClick?: (e: MouseEvent<HTMLButtonElement>) => void\n}\nexport type ThProps = ThBaseProps & ThVariantProps\n\n/**\n * Styles for the Th component\n * @see https://cerberus.digitalu.design/react/table\n * @memberof module:Table\n * @example\n * ```tsx\n * <Th>Header 1</Th>\n * ```\n * @example\n * ```tsx\n * <Th onClick={handleClick}>\n * Names\n * <SortIcon />\n * </Th>\n * ```\n */\nexport function Th(props: ThProps) {\n const { size, onClick, ...nativeProps } = props\n return (\n <Show\n when={Boolean(onClick)}\n fallback={\n <th\n {...nativeProps}\n className={cx(nativeProps.className, th({ size }))}\n />\n }\n >\n <th {...nativeProps}>\n <button\n className={cx(\n nativeProps.className,\n th({ size }),\n css({\n alignItems: 'center',\n display: 'inline-flex',\n justifyContent: 'space-between',\n userSelect: 'none',\n w: 'full',\n _hover: {\n bgColor: 'page.bg.100',\n },\n }),\n )}\n onClick={onClick}\n >\n {props.children}\n </button>\n </th>\n </Show>\n )\n}\n","import { cx } from '@cerberus/styled-system/css'\nimport { td, type TdVariantProps } from '@cerberus/styled-system/recipes'\n\n/**\n * Th component for the Td component\n * @module\n */\n\nexport type TdBaseProps = JSX.IntrinsicElements['td']\nexport type TdProps = TdBaseProps & TdVariantProps\n\n/**\n * Styles for the Th component\n * @see https://cerberus.digitalu.design/react/table\n * @memberof module:Table\n * @example\n * ```tsx\n * <Td>Data cell</Td>\n * ```\n */\nexport function Td(props: TdProps) {\n const { size, ...nativeProps } = props\n return (\n <td\n {...nativeProps}\n className={cx(\n nativeProps.className,\n td({\n size,\n }),\n )}\n />\n )\n}\n","import { tbody, type TbodyVariantProps } from '@cerberus/styled-system/recipes'\nimport { cx } from '@cerberus/styled-system/css'\n\n/**\n * This module provides a TBody component.\n * @module\n */\n\nexport type TbodyBaseProps = JSX.IntrinsicElements['tbody']\nexport type TbodyProps = TbodyBaseProps & TbodyVariantProps\n\n/**\n * The TBody component is used to render a table body.\n * @see https://cerberus.digitalu.design/react/table\n * @memberof module:Table\n * @example\n * ```tsx\n * <TBody>\n * {children}\n * </TBody>\n * ```\n */\nexport function Tbody(props: TbodyProps) {\n const { decoration, ...nativeProps } = props\n return (\n <tbody\n {...nativeProps}\n className={cx(\n nativeProps.className,\n tbody({\n decoration,\n }),\n )}\n />\n )\n}\n","'use client'\n\nimport type {\n HTMLAttributes,\n MouseEventHandler,\n PropsWithChildren,\n} from 'react'\nimport { Show } from './Show'\nimport { css, cx } from '@cerberus/styled-system/css'\nimport {\n iconButton,\n tag,\n type TagVariantProps,\n} from '@cerberus/styled-system/recipes'\nimport { useCerberusContext } from '../context/cerberus'\n\n/**\n * This module contains the tag component.\n * @module\n */\n\nexport type StaticTagProps = HTMLAttributes<HTMLSpanElement> &\n TagVariantProps & {\n /**\n * The action to be performed when the tag is clicked. Not available when\n * the palette or gradient props are provided.\n */\n onClick?: never\n }\n\nexport type ClickableTagProps = HTMLAttributes<HTMLSpanElement> & {\n /**\n * The gradient to apply to the tag. Not available when the onClick prop is\n * provided.\n */\n gradient?: never\n /**\n * The palette to use for the tag. Not available when the onClick prop is\n * provided.\n */\n palette?: never\n /**\n * The action to be performed when the tag is clicked.\n */\n onClick: MouseEventHandler<HTMLSpanElement>\n /**\n * The shape of the tag. Not available when the onClick prop is provided.\n * @type 'pill' | 'rounded'\n * @default 'pill'\n */\n shape?: never\n /**\n * The usage of the tag. Not available when the onClick prop is provided.\n * @type 'filled' | 'outlined'\n * @default 'filled'\n */\n usage?: never\n}\n\nexport type TagProps = StaticTagProps | ClickableTagProps\n\n/**\n * The Tag component is used to display a meta descriptions.\n * @see https://cerberus.digitalu.design/react/tag\n * @example\n * ```tsx\n * <Tag>Tag</Tag>\n * ```\n */\nexport function Tag(props: PropsWithChildren<TagProps>): JSX.Element {\n const { shape: initShape, gradient, onClick, usage, ...nativeProps } = props\n const palette = props?.palette ?? 'page'\n const isClosable = Boolean(onClick)\n const shape = isClosable ? 'pill' : initShape\n const closableStyles = isClosable ? closableCss : ''\n const { icons } = useCerberusContext()\n const { close: Close } = icons\n\n return (\n <span\n {...nativeProps}\n className={cx(\n nativeProps.className,\n tag({\n gradient,\n palette,\n shape,\n usage,\n }),\n closableStyles,\n )}\n >\n {props.children}\n\n <Show when={isClosable}>\n <button\n aria-label=\"Close\"\n className={iconButton({\n palette: 'action',\n usage: 'filled',\n size: 'sm',\n })}\n onClick={onClick}\n >\n <Close />\n </button>\n </Show>\n </span>\n )\n}\n\nconst closableCss = css({\n bgColor: 'action.bg.active',\n color: 'action.text.initial',\n paddingInlineEnd: '0',\n})\n","import {\n Em,\n H1,\n H2,\n H3,\n H4,\n H5,\n H6,\n P,\n Small,\n Span,\n Strong,\n type PProps,\n} from '@cerberus/styled-system/jsx'\nimport { type HTMLAttributes, type PropsWithChildren } from 'react'\n\n/**\n * This module exports a component for rendering text utilizing the styled-system JSX utility.\n * @module @cerberus/react/Text\n */\n\nexport type Headings = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'\nexport type TextElements = 'p' | 'strong' | 'em' | 'small' | 'span'\n\n// For some reason we have to use the HTMLParagraphElement type here\n// or else TS will fail for non-style props like 'id' or 'className'\nexport interface TextProps\n extends PProps,\n HTMLAttributes<HTMLParagraphElement> {\n /**\n * The element to render as. Defaults to 'p'.\n */\n as?: TextElements | Headings\n}\n\n/**\n * A component for rendering text utilizing the styled-system JSX utility.\n * @definition [Text docs](https://cerberus.digitalu.design/react/text)\n * @example\n * ```tsx\n * <Text as=\"h1\" color=\"page.text.100\" textStyle={{\n * base: 'heading-md',\n * md: 'heading-lg',\n * }}>\n * Hello, world!\n * </Text>\n */\nexport function Text(props: PropsWithChildren<TextProps>) {\n const { as = 'p', ...pandaJSXProps } = props\n switch (as) {\n case 'h1':\n return <H1 {...pandaJSXProps} />\n case 'h2':\n return <H2 {...pandaJSXProps} />\n case 'h3':\n return <H3 {...pandaJSXProps} />\n case 'h4':\n return <H4 {...pandaJSXProps} />\n case 'h5':\n return <H5 {...pandaJSXProps} />\n case 'h6':\n return <H6 {...pandaJSXProps} />\n case 'strong':\n return <Strong {...pandaJSXProps} />\n case 'em':\n return <Em {...pandaJSXProps} />\n case 'small':\n return <Small {...pandaJSXProps} />\n case 'span':\n return <Span {...pandaJSXProps} />\n default:\n return <P {...pandaJSXProps} />\n }\n}\n","'use client'\n\nimport type { TextareaHTMLAttributes } from 'react'\nimport { css, cx } from '@cerberus/styled-system/css'\nimport { input, type InputVariantProps } from '@cerberus/styled-system/recipes'\nimport { useFieldContext } from '../context/field'\n\n/**\n * This module contains the Textarea component.\n * @module\n */\n\nexport interface TextareaBaseProps\n extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'id'> {\n /**\n * The ID of the FieldMessage that describes the textarea.\n */\n describedBy?: string\n /**\n * The unique id of the textarea.\n */\n id: string\n}\nexport type TextareaProps = InputVariantProps & TextareaBaseProps\n\n/**\n * A component that allows the user to input large blocks of text.\n * @see https://cerberus.digitalu.design/react/textarea\n */\nexport function Textarea(props: TextareaProps): JSX.Element {\n const { describedBy, ...nativeProps } = props\n const { invalid, ...fieldState } = useFieldContext()\n\n return (\n <textarea\n {...nativeProps}\n {...fieldState}\n {...(describedBy && { 'aria-describedby': describedBy })}\n {...(invalid && { 'aria-invalid': true })}\n className={cx(\n props.className,\n input().input,\n css({\n pxi: '2',\n py: '2',\n resize: 'vertical',\n }),\n )}\n rows={4}\n />\n )\n}\n","'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 { useFieldContext } from '../context/field'\nimport { useCerberusContext } from '../context/cerberus'\n\n/**\n * This module provides a toggle component.\n * @module\n */\n\nexport type ToggleBase = Omit<\n InputHTMLAttributes<HTMLInputElement>,\n 'size' | 'id' | 'value'\n> & {\n /**\n * The FieldMessage providing context for the Toggle.\n */\n describedBy?: string\n /**\n * A unique identifier for the Toggle. Required for accessibility.\n */\n id: string\n /**\n * The value of the Toggle.\n */\n value: string\n}\nexport type ToggleProps = ToggleBase & ToggleVariantProps\n\n/**\n * The Toggle component is used to switch between two states. Optionally\n * combine with the `useToggle` hook.\n * @see https://cerberus.digitalu.design/react/toggle\n * @example\n * ```tsx\n * const { checked, handleChange } = useToggle({ checked: 'toggle' })\n *\n * <Hstack justify=\"space-between\" w=\"full\">\n * <Field>\n * <Label htmlFor=\"toggle\">Show notifications</Label>\n * <Toggle\n * checked={checked === 'toggle'}\n * id=\"toggle\"\n * onChange={handleChange}\n * value=\"toggle\"\n * />\n * </Field>\n * </Hstack>\n * ```\n */\nexport function Toggle(props: ToggleProps) {\n const { size, describedBy, ...nativeProps } = props\n const styles = toggle({ size })\n const { invalid, ...state } = useFieldContext()\n const { icons } = useCerberusContext()\n const CheckedIcon = icons.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 <CheckedIcon />\n </span>\n </span>\n )\n}\n","import {\n Tooltip as ArkTooltip,\n type TooltipContentProps,\n} from '@ark-ui/react/tooltip'\nimport { cx } from '@cerberus/styled-system/css'\nimport { tooltip } from '@cerberus/styled-system/recipes'\nimport type { ReactNode } from 'react'\n\n/**\n * This module contains the Tooltip component.\n * @module Tooltip\n */\n\nexport interface TooltipProps {\n /**\n * The text content to display in the tooltip.\n */\n content: ReactNode\n /**\n * The position of the tooltip relative to the trigger element.\n */\n position?: 'top' | 'right' | 'bottom' | 'left'\n}\n\n/**\n * The Tooltip component is used to provide additional information about an element when it is hovered over.\n * @definition [Tooltip docs](https://cerberus.digitalu.design/react/tooltip)\n * @example\n * ```tsx\n * <Tooltip content=\"This is a tooltip\">\n * <Information />\n * </Tooltip>\n */\nexport function Tooltip(props: TooltipProps & TooltipContentProps) {\n const { content, children, asChild, ...nativeProps } = props\n const styles = tooltip()\n const position = {\n placement: props.position || 'top',\n }\n\n return (\n <ArkTooltip.Root openDelay={400} positioning={position}>\n <ArkTooltip.Trigger className={styles.trigger} asChild={asChild}>\n {children}\n </ArkTooltip.Trigger>\n\n <ArkTooltip.Positioner>\n <ArkTooltip.Content\n {...nativeProps}\n className={cx(nativeProps.className, styles.content)}\n >\n <ArkTooltip.Arrow className={styles.arrow}>\n <ArkTooltip.ArrowTip className={styles.arrowTip} />\n </ArkTooltip.Arrow>\n\n {content}\n </ArkTooltip.Content>\n </ArkTooltip.Positioner>\n </ArkTooltip.Root>\n )\n}\n","'use client'\n\nimport {\n createContext,\n useCallback,\n useContext,\n useMemo,\n useRef,\n useState,\n type MouseEvent,\n type PropsWithChildren,\n type ReactNode,\n} from 'react'\nimport { Button } from '../components/Button'\nimport { css } from '@cerberus/styled-system/css'\nimport { Show } from '../components/Show'\nimport { Avatar } from '../components/Avatar'\nimport { HStack, VStack } from '@cerberus/styled-system/jsx'\nimport { useCerberusContext } from './cerberus'\nimport {\n Dialog,\n DialogCloseTrigger,\n DialogDescription,\n DialogHeading,\n DialogProvider,\n} from '../components/Dialog'\n\n/**\n * This module provides a context and hook for the confirm modal.\n * @module\n */\n\nexport interface BaseConfirmOptions {\n /**\n * The heading of the confirm modal.\n */\n heading: string\n /**\n * The text for the action button.\n */\n actionText: string\n /**\n * The text for the cancel button.\n */\n cancelText: string\n}\n\nexport interface DestructiveConfirmOptions extends BaseConfirmOptions {\n /**\n * The kind of confirm modal to show.\n */\n kind?: 'destructive'\n /**\n * The description of the confirm modal. Can only be a string for destructive confirm modals.\n */\n description?: string\n}\n\nexport interface NonDestructiveConfirmModalOptions extends BaseConfirmOptions {\n /**\n * The kind of confirm modal to show.\n * @default 'non-destructive'\n */\n kind?: 'non-destructive'\n /**\n * The description of the confirm modal. Can be a ReactNode for non-destructive kind if you need to display text links.\n * @example\n * ```tsx\n * description: <>Use a Fragment because we put the content within a Paragraph tag.</>\n */\n description?: ReactNode\n}\n\nexport type ShowConfirmModalOptions =\n | NonDestructiveConfirmModalOptions\n | DestructiveConfirmOptions\n\nexport type ShowResult =\n | ((value: boolean | PromiseLike<boolean>) => void)\n | null\n\nexport interface ConfirmModalValue {\n show: (options: ShowConfirmModalOptions) => Promise<boolean>\n}\n\nconst ConfirmModalContext = createContext<ConfirmModalValue | null>(null)\n\nexport type ConfirmModalProviderProps = PropsWithChildren<unknown>\n\n/**\n * Provides a confirm modal to the app.\n * @see https://cerberus.digitalu.design/react/confirm-modal\n * @example\n * ```tsx\n * // Wrap the Provider around the root of the feature.\n * <ConfirmModal>\n * <SomeFeatureSection />\n * </ConfirmModal>\n *\n * // Use the hook to show the confirm modal.\n * const confirm = useConfirmModal()\n *\n * const handleClick = useCallback(async () => {\n * const userConsent = await confirm.show({\n * heading: 'Add new payment method?',\n * description:\n * 'This will add a new payment method to your account to be billed for future purchases.',\n * actionText: 'Yes, add payment method',\n * cancelText: 'No, cancel',\n * })\n * setConsent(userConsent)\n * }, [confirm])\n * ```\n */\nexport function ConfirmModal(\n props: PropsWithChildren<ConfirmModalProviderProps>,\n) {\n const [open, setOpen] = useState<boolean>(false)\n const [content, setContent] = useState<ShowConfirmModalOptions | null>(null)\n const resolveRef = useRef<ShowResult>(null)\n const kind = content?.kind ?? 'non-destructive'\n\n const { icons } = useCerberusContext()\n const { confirmModal: ConfirmIcon } = icons\n\n const palette = useMemo(\n () => (kind === 'destructive' ? 'danger' : 'action'),\n [kind],\n )\n\n const handleChoice = useCallback(\n (e: MouseEvent<HTMLButtonElement>) => {\n const target = e.currentTarget as HTMLButtonElement\n if (target.value === 'true') {\n resolveRef.current?.(true)\n }\n resolveRef.current?.(false)\n setOpen(false)\n },\n [setOpen],\n )\n\n const handleShow = useCallback(\n (options: ShowConfirmModalOptions) => {\n return new Promise<boolean>((resolve) => {\n setContent({ ...options })\n setOpen(true)\n resolveRef.current = resolve\n })\n },\n [setOpen, setContent],\n )\n\n const value = useMemo(\n () => ({\n show: handleShow,\n }),\n [handleShow],\n )\n\n return (\n <ConfirmModalContext.Provider value={value}>\n {props.children}\n\n <DialogProvider open={open} onOpenChange={(e) => setOpen(e.open)}>\n <Dialog size=\"sm\">\n <VStack gap=\"xl\" w=\"full\">\n <VStack alignItems=\"flex-start\" gap=\"md\" w=\"full\">\n <HStack\n alignSelf=\"center\"\n justify=\"center\"\n paddingBlockEnd=\"md\"\n w=\"full\"\n >\n <Show\n when={palette === 'danger'}\n fallback={\n <Avatar\n ariaLabel=\"\"\n gradient=\"charon-light\"\n icon={<ConfirmIcon size={24} />}\n src=\"\"\n />\n }\n >\n <Avatar\n ariaLabel=\"\"\n gradient=\"hades-dark\"\n icon={<ConfirmIcon size={24} />}\n src=\"\"\n />\n </Show>\n </HStack>\n <DialogHeading>{content?.heading}</DialogHeading>\n <DialogDescription>{content?.description}</DialogDescription>\n </VStack>\n\n <HStack gap=\"4\" w=\"full\">\n <Button\n autoFocus\n className={css({\n w: '1/2',\n })}\n name=\"confirm\"\n onClick={handleChoice}\n palette={palette}\n value=\"true\"\n >\n {content?.actionText}\n </Button>\n <DialogCloseTrigger asChild>\n <Button\n className={css({\n w: '1/2',\n })}\n name=\"cancel\"\n onClick={handleChoice}\n usage=\"outlined\"\n value=\"false\"\n >\n {content?.cancelText}\n </Button>\n </DialogCloseTrigger>\n </HStack>\n </VStack>\n </Dialog>\n </DialogProvider>\n </ConfirmModalContext.Provider>\n )\n}\n\nexport function useConfirmModal(): ConfirmModalValue {\n const context = useContext(ConfirmModalContext)\n if (context === null) {\n throw new Error(\n 'useConfirmModal must be used within a ConfirmModal Provider',\n )\n }\n return context\n}\n","'use client'\n\nimport {\n createContext,\n useCallback,\n useContext,\n useMemo,\n useState,\n type MouseEvent,\n type MouseEventHandler,\n type PropsWithChildren,\n type ReactNode,\n} from 'react'\nimport { Button } from '../components/Button'\nimport { Show } from '../components/Show'\nimport { Avatar } from '../components/Avatar'\nimport { useCerberusContext } from './cerberus'\nimport { HStack } from '@cerberus/styled-system/jsx'\nimport { css } from '@cerberus/styled-system/css'\nimport { VStack } from '@cerberus/styled-system/jsx'\nimport {\n Dialog,\n DialogDescription,\n DialogHeading,\n DialogProvider,\n} from '../components/Dialog'\nimport { DialogCloseIconTrigger } from '../components/Dialog.client'\n\n/**\n * This module provides a context and hook for the cta modal.\n * @module\n */\n\nexport interface ShowCTAModalOptions {\n /**\n * The heading of the cta modal.\n */\n heading: string\n /**\n * The description of the cta modal.\n */\n description?: string\n /**\n * The icon used for the modal Avatar.\n */\n icon?: ReactNode\n /**\n * The actions for the cta modal. Max of 2 actions.\n */\n actions: {\n text: string\n onClick: MouseEventHandler<HTMLButtonElement>\n }[]\n}\n\nexport interface CTAModalValue {\n show: (options: ShowCTAModalOptions) => void\n}\n\nconst CTAModalContext = createContext<CTAModalValue | null>(null)\n\nexport type CTAModalProviderProps = PropsWithChildren<unknown>\n\n/**\n * Provides a CTA modal to the app.\n * @see https://cerberus.digitalu.design/react/cta-modal\n * @example\n * ```tsx\n * // Wrap the Provider around the root of the feature.\n * <CTAModal>\n * <SomeFeatureSection />\n * </CTAModal>\n *\n * // Use the hook to show the cta modal.\n * const cta = useCTAModal()\n *\n * const handleClick = useCallback(async () => {\n * const userConsent = await cta.show({\n * heading: 'Create or copy a Cohort',\n * description:\n * 'Create a new cohort or copy and existing one.',\n * icon: <Copy size={24} />,\n * actions: [\n * {\n * text: 'Create Cohort',\n * onClick: () => {},\n * {\n * text: 'Copy Cohort',\n * onClick: () => {}\n * }\n * })\n * setConsent(userConsent)\n * }, [cta])\n * ```\n */\nexport function CTAModal(props: PropsWithChildren<CTAModalProviderProps>) {\n const [open, setOpen] = useState<boolean>(false)\n const [content, setContent] = useState<ShowCTAModalOptions | null>(null)\n const confirmIcon = content?.icon\n\n const { icons } = useCerberusContext()\n const { confirmModal: FallbackIcon } = icons\n\n const handleShow = useCallback(\n (options: ShowCTAModalOptions) => {\n const maxActions = 2\n if (options.actions.length > maxActions) {\n throw new Error(\n `CTA Modal only supports a maximum of ${maxActions} actions.`,\n )\n }\n setContent({ ...options })\n setOpen(true)\n },\n [setOpen],\n )\n\n const handleActionClick = useCallback(\n (event: MouseEvent<HTMLButtonElement>) => {\n const index = event.currentTarget.getAttribute('data-index')\n const action = content?.actions[Number(index)]\n const { onClick } = action || {}\n onClick?.(event)\n setOpen(false)\n },\n [content, setOpen],\n )\n\n const value = useMemo(\n () => ({\n show: handleShow,\n }),\n [handleShow],\n )\n\n return (\n <CTAModalContext.Provider value={value}>\n {props.children}\n\n <DialogProvider open={open} onOpenChange={(e) => setOpen(e.open)}>\n <Dialog size=\"sm\">\n <DialogCloseIconTrigger />\n\n <VStack gap=\"xl\" w=\"full\">\n <VStack alignItems=\"flex-start\" gap=\"md\" w=\"full\">\n <VStack gap=\"lg\" w=\"full\">\n <Avatar\n ariaLabel=\"\"\n gradient=\"charon-light\"\n icon={\n <Show\n when={Boolean(confirmIcon)}\n fallback={<FallbackIcon size={24} />}\n >\n {confirmIcon}\n </Show>\n }\n src=\"\"\n />\n <DialogHeading>{content?.heading}</DialogHeading>\n <DialogDescription>{content?.description}</DialogDescription>\n </VStack>\n </VStack>\n\n <HStack gap=\"md\" w=\"full\">\n <Show when={Boolean(content?.actions?.length)}>\n {content?.actions?.map((action, index) => (\n <Button\n data-index={index}\n className={css({\n w: '1/2',\n })}\n key={index}\n onClick={handleActionClick}\n shape=\"rounded\"\n usage=\"outlined\"\n >\n {action.text}\n </Button>\n ))}\n </Show>\n </HStack>\n </VStack>\n </Dialog>\n </DialogProvider>\n </CTAModalContext.Provider>\n )\n}\n\nexport function useCTAModal(): CTAModalValue {\n const context = useContext(CTAModalContext)\n if (context === null) {\n throw new Error('useCTAModal must be used within a CTAModal Provider')\n }\n return context\n}\n","'use client'\n\nimport {\n createContext,\n useCallback,\n useContext,\n useMemo,\n useReducer,\n type MouseEvent,\n type PropsWithChildren,\n type ReactNode,\n} from 'react'\nimport { Show } from '../components/Show'\nimport { NotificationHeading } from '../components/NotificationHeading'\nimport { NotificationDescription } from '../components/NotificationDescription'\nimport { Notification } from '../components/Notification'\nimport { animateIn, vstack } from '@cerberus/styled-system/patterns'\nimport { Portal, type PortalProps } from '../components/Portal'\nimport { notification } from '@cerberus/styled-system/recipes'\nimport { Button } from '../components/Button'\nimport { cx } from '@cerberus/styled-system/css'\nimport {\n addNotification,\n clearNotificationState,\n notificationCenterReducer,\n removeNotification,\n updateNotificationState,\n} from './notification-center/store'\n\n/**\n * This module provides a context and hook for notifications.\n * @module\n */\n\nexport interface NotifyOptions {\n /**\n * The palette of the notification.\n * @default 'info'\n */\n palette: 'info' | 'success' | 'warning' | 'danger'\n /**\n * The heading of the notification.\n */\n heading: string\n /**\n * The unique id of the notification.\n */\n id?: string\n /**\n * The description of the notification.\n */\n description?: ReactNode\n /**\n * The action to take when the notification is closed\n */\n onClose?: () => void\n}\n\nexport interface NotificationsValue {\n notify: (options: NotifyOptions) => void\n}\n\nconst NotificationsContext = createContext<NotificationsValue | null>(null)\n\nexport type NotificationsProviderProps = PortalProps & {\n /**\n * The duration in milliseconds to show the notification.\n * @default 6000\n */\n duration?: number\n}\n\n/**\n * Provides a notification center to the app.\n * @see https://cerberus.digitalu.design/react/notification\n * @example\n * ```tsx\n * // Wrap the Provider around the root of the feature.\n * <Notifications>\n * <SomeFeatureSection />\n * </Notifications>\n *\n * // Use the hook to show a notification.\n * const notify = useNotifications()\n *\n * const handleClick = useCallback(() => {\n * notify({\n * palette: 'info',\n * heading: 'New feature!',\n * description: 'We have added a new feature to the app.',\n * })\n * }, [notify])\n * ```\n */\nexport function NotificationCenter(\n props: PropsWithChildren<NotificationsProviderProps>,\n) {\n const [state, dispatch] = useReducer(notificationCenterReducer, [])\n const styles = notification()\n\n const timeout = useMemo<number>(\n () => props.duration || 6000,\n [props.duration],\n )\n\n const closeNotification = useCallback(\n (id: string) => {\n updateNotificationState(dispatch, {\n id,\n state: 'closed',\n })\n window.setTimeout(() => {\n removeNotification(dispatch, id)\n }, 150)\n },\n [dispatch],\n )\n\n const handleNotify = useCallback(\n (options: NotifyOptions) => {\n const id = `${options.palette}:${state.length + 1}`\n addNotification(dispatch, {\n ...options,\n id,\n state: 'open',\n })\n\n window.setTimeout(() => {\n closeNotification(id)\n }, timeout)\n },\n [dispatch, state, timeout, closeNotification],\n )\n\n const handleClose = useCallback(\n (e: MouseEvent<HTMLButtonElement>) => {\n const target = e.currentTarget as HTMLButtonElement\n closeNotification(target.value)\n },\n [closeNotification],\n )\n\n const handleCloseAll = useCallback(() => {\n state.forEach((item) => {\n if (item.onClose) item.onClose()\n })\n // we don't want to animate out for this one\n clearNotificationState(dispatch)\n }, [state, dispatch])\n\n const value = useMemo(\n () => ({\n notify: handleNotify,\n }),\n [handleNotify],\n )\n\n // For some reason, the vstack pattern alignItems is not registering here.\n // So we are forcing it with the style prop.\n\n return (\n <NotificationsContext.Provider value={value}>\n {props.children}\n\n <Show when={state.length > 0}>\n <Portal container={props.container}>\n <div className={styles.center}>\n <Show when={state.length >= 4}>\n <Button\n className={cx(styles.closeAll, animateIn())}\n onClick={handleCloseAll}\n palette=\"action\"\n shape=\"rounded\"\n size=\"sm\"\n usage=\"ghost\"\n >\n Close all\n </Button>\n </Show>\n\n <div\n className={vstack({\n alignItems: 'flex-end',\n gap: '4',\n })}\n style={{\n alignItems: 'flex-end',\n }}\n >\n {state.map((option) => (\n <MatchNotification\n key={option.id}\n {...option}\n onClose={handleClose}\n open={option.state}\n />\n ))}\n </div>\n </div>\n </Portal>\n </Show>\n </NotificationsContext.Provider>\n )\n}\n\ninterface MatchNotificationProps extends Omit<NotifyOptions, 'onClose'> {\n open: 'open' | 'closed'\n onClose: (e: MouseEvent<HTMLButtonElement>) => void\n key: string | undefined\n}\n\nfunction MatchNotification(props: MatchNotificationProps) {\n const { palette, id, onClose, heading, description, open } = props\n const sharedProps = useMemo(\n () => ({\n id: id!,\n open: true,\n onClose,\n 'data-state': open,\n }),\n [id, open, onClose],\n )\n\n switch (palette) {\n case 'success':\n return (\n <Notification {...sharedProps} palette=\"success\">\n <NotificationHeading palette=\"success\">{heading}</NotificationHeading>\n <NotificationDescription palette=\"success\">\n {description}\n </NotificationDescription>\n </Notification>\n )\n\n case 'warning':\n return (\n <Notification {...sharedProps} palette=\"warning\">\n <NotificationHeading palette=\"warning\">{heading}</NotificationHeading>\n <NotificationDescription palette=\"warning\">\n {description}\n </NotificationDescription>\n </Notification>\n )\n\n case 'danger':\n return (\n <Notification {...sharedProps} palette=\"danger\">\n <NotificationHeading palette=\"danger\">{heading}</NotificationHeading>\n <NotificationDescription palette=\"danger\">\n {description}\n </NotificationDescription>\n </Notification>\n )\n\n case 'info':\n default:\n return (\n <Notification {...sharedProps} palette=\"info\">\n <NotificationHeading palette=\"info\">{heading}</NotificationHeading>\n <NotificationDescription palette=\"info\">\n {description}\n </NotificationDescription>\n </Notification>\n )\n }\n}\n\n/**\n * The hook to use the NotificationCenter.\n * @returns The notify method to trigger a notification.\n * @example\n * ```tsx\n * const {notify} = useNotificationCenter()\n * notify({\n * palette: 'info',\n * heading: 'New feature',\n * description: 'We have added a new feature to the app.',\n * })\n * ```\n */\nexport function useNotificationCenter(): NotificationsValue {\n const context = useContext(NotificationsContext)\n if (!context) {\n throw new Error(\n 'useNotificationCenter must be used within a NotificationsProvider',\n )\n }\n return context\n}\n","import type { Dispatch } from 'react'\nimport type {\n AddNotifyAction,\n ClearNotifyAction,\n NotificationsStore,\n RemoveNotifyAction,\n UpdateNotifyAction,\n} from './types'\n\n/**\n * This module contains the reducer store and actions for the notification\n * center.\n * @module notification-center/store\n */\n\n/**\n * The reducer for the notification center.\n * @param state An array of notifications.\n * @param action An action to take on the notifications.\n * @returns The new state of the notifications.\n */\nexport function notificationCenterReducer(\n state: NotificationsStore,\n action:\n | AddNotifyAction\n | RemoveNotifyAction\n | UpdateNotifyAction\n | ClearNotifyAction,\n): NotificationsStore {\n switch (action.type) {\n case 'ADD_NOTIFICATION':\n return [...state, action.payload]\n case 'REMOVE_NOTIFICATION':\n return state.filter((n) => n.id !== action.payload.id)\n case 'UPDATE_NOTIFICATION':\n return state.map((n) =>\n n.id === action.payload.id ? { ...n, ...action.payload } : n,\n )\n case 'CLEAR_NOTIFICATIONS':\n return []\n default:\n return state\n }\n}\n\n/**\n * Adds a notification to the notification center.\n * @param dispatch The dispatch function.\n * @param options The notification options.\n */\nexport function addNotification(\n dispatch: Dispatch<AddNotifyAction>,\n options: AddNotifyAction['payload'],\n) {\n dispatch({ type: 'ADD_NOTIFICATION', payload: { ...options } })\n}\n\n/**\n * Removes a notification from the notification center.\n * @param dispatch The dispatch function.\n * @param id The id of the notification to remove.\n */\nexport function removeNotification(\n dispatch: Dispatch<RemoveNotifyAction>,\n id: RemoveNotifyAction['payload']['id'],\n) {\n dispatch({ type: 'REMOVE_NOTIFICATION', payload: { id } })\n}\n\n/**\n * Updates a notification in the notification center.\n * @param dispatch The dispatch function.\n * @param options The notification options.\n */\nexport function updateNotificationState(\n dispatch: Dispatch<UpdateNotifyAction>,\n options: UpdateNotifyAction['payload'],\n) {\n dispatch({ type: 'UPDATE_NOTIFICATION', payload: { ...options } })\n}\n\n/**\n * Clears the notification state.\n * @param dispatch The dispatch function.\n */\nexport function clearNotificationState(dispatch: Dispatch<ClearNotifyAction>) {\n dispatch({ type: 'CLEAR_NOTIFICATIONS' })\n}\n","'use client'\n\nimport {\n createContext,\n useCallback,\n useContext,\n useMemo,\n useRef,\n useState,\n type ChangeEvent,\n type MouseEvent,\n type PropsWithChildren,\n} from 'react'\nimport { Button } from '../components/Button'\nimport { css } from '@cerberus/styled-system/css'\nimport { hstack } from '@cerberus/styled-system/patterns'\nimport { Input } from '../components/Input'\nimport { Field } from './field'\nimport { Label } from '../components/Label'\nimport { Show } from '../components/Show'\nimport { Avatar } from '../components/Avatar'\nimport { Text } from '../components/Text'\nimport { useCerberusContext } from './cerberus'\nimport {\n Dialog,\n DialogDescription,\n DialogHeading,\n DialogProvider,\n} from '../components/Dialog'\nimport { HStack, VStack } from '@cerberus/styled-system/jsx'\nimport { DialogCloseTrigger } from '@ark-ui/react'\n\n/**\n * This module provides a context and hook for the prompt modal.\n * @module PromptModal\n */\n\nexport interface ShowPromptModalOptions {\n /**\n * The kind of prompt modal to show.\n * @default 'non-destructive'\n */\n kind?: 'destructive' | 'non-destructive'\n /**\n * The heading of the prompt modal.\n */\n heading: string\n /**\n * The description of the prompt modal.\n */\n description?: string\n /**\n * The key to confirm the action.\n */\n key: string\n /**\n * The text for the action button.\n */\n actionText: string\n /**\n * The text for the cancel button.\n */\n cancelText: string\n}\nexport type PromptShowResult =\n | ((value: string | PromiseLike<string>) => void)\n | null\n\nexport interface PromptModalValue {\n /**\n * The method to trigger the prompt modal.\n * @returns the value of the key if the action is confirmed.\n * @example\n * ```tsx\n * const accepted = await prompt.show({\n * kind: 'destructive',\n * heading: 'Delete channel?',\n * description:\n * 'This will permanently delete a channel on your account. There is no going back.',\n * key: CHANNEL_NAME,\n * actionText: 'Yes, delete channel',\n * cancelText: 'No, cancel',\n * })\n */\n show: (options: ShowPromptModalOptions) => Promise<string>\n}\n\nconst PromptModalContext = createContext<PromptModalValue | null>(null)\n\nexport type PromptModalProviderProps = PropsWithChildren<unknown>\n\n/**\n * Provides a prompt modal to the app.\n * @see https://cerberus.digitalu.design/react/prompt-modal\n * @example\n * ```tsx\n * // Wrap the Provider around the root of the feature.\n * <PromptModal>\n * <SomeFeatureSection />\n * </PromptModal>\n *\n * // Use the hook to show the prompt modal.\n * const prompt = usePromptModal()\n *\n * const handleClick = useCallback(async () => {\n * const accepted = await prompt.show({\n * kind: 'destructive',\n * heading: 'Delete channel?',\n * description:\n * 'This will permanently delete a channel on your account. There is no going back.',\n * key: CHANNEL_NAME,\n * actionText: 'Yes, delete channel',\n * cancelText: 'No, cancel',\n * })\n * // do something with accepted\n * }, [prompt])\n * ```\n */\nexport function PromptModal(\n props: PropsWithChildren<PromptModalProviderProps>,\n) {\n const resolveRef = useRef<PromptShowResult>(null)\n const [open, setOpen] = useState<boolean>(false)\n const [content, setContent] = useState<ShowPromptModalOptions | null>(null)\n const [inputValue, setInputValue] = useState<string>('')\n\n const { icons } = useCerberusContext()\n const { promptModal: PromptIcon } = icons\n\n const isValid = useMemo(\n () => inputValue === content?.key,\n [inputValue, content],\n )\n\n const palette = useMemo(\n () => (content?.kind === 'destructive' ? 'danger' : 'action'),\n [content],\n )\n\n const handleChange = useCallback(\n (e: ChangeEvent<HTMLInputElement>) => {\n setInputValue(e.currentTarget.value)\n },\n [content],\n )\n\n const handleChoice = useCallback(\n (e: MouseEvent<HTMLButtonElement>) => {\n const target = e.currentTarget as HTMLButtonElement\n if (target.value === 'true') {\n resolveRef.current?.(inputValue)\n }\n setOpen(false)\n },\n [inputValue, setOpen],\n )\n\n const handleShow = useCallback(\n (options: ShowPromptModalOptions) => {\n return new Promise<string>((resolve) => {\n setContent({ ...options, kind: options.kind || 'non-destructive' })\n setOpen(true)\n resolveRef.current = resolve\n })\n },\n [setOpen],\n )\n\n const value = useMemo(\n () => ({\n show: handleShow,\n }),\n [handleShow],\n )\n\n return (\n <PromptModalContext.Provider value={value}>\n {props.children}\n\n <DialogProvider open={open} onOpenChange={(e) => setOpen(e.open)}>\n <Dialog size=\"sm\">\n <VStack gap=\"xl\" w=\"full\">\n <VStack alignItems=\"flex-start\" gap=\"md\" w=\"full\">\n <HStack\n alignSelf=\"center\"\n justify=\"center\"\n paddingBlockEnd=\"md\"\n w=\"full\"\n >\n <Show\n when={palette === 'danger'}\n fallback={\n <Avatar\n ariaLabel=\"\"\n gradient=\"charon-light\"\n icon={<PromptIcon size={24} />}\n src=\"\"\n />\n }\n >\n <Avatar\n ariaLabel=\"\"\n gradient=\"hades-dark\"\n icon={<PromptIcon size={24} />}\n src=\"\"\n />\n </Show>\n </HStack>\n <DialogHeading>{content?.heading}</DialogHeading>\n <DialogDescription>{content?.description}</DialogDescription>\n </VStack>\n\n <VStack\n alignItems=\"flex-start\"\n marginBlockStart=\"md\"\n marginBlockEnd=\"lg\"\n w=\"full\"\n >\n <Field invalid={!isValid}>\n <Label\n className={hstack({\n gap: 'xs',\n justify: 'flex-start !important',\n })}\n htmlFor=\"confirm\"\n size=\"md\"\n >\n Type\n <Text as=\"strong\" textTransform=\"uppercase\">\n {content?.key}\n </Text>\n to confirm\n </Label>\n <Input\n id=\"confirm\"\n name=\"confirm\"\n onChange={handleChange}\n type=\"text\"\n />\n </Field>\n </VStack>\n\n <HStack gap=\"md\" justify=\"stretch\" w=\"full\">\n <Button\n autoFocus\n className={css({\n w: '1/2',\n })}\n disabled={!isValid}\n name=\"confirm\"\n onClick={handleChoice}\n palette={palette}\n value=\"true\"\n >\n {content?.actionText}\n </Button>\n\n <DialogCloseTrigger asChild>\n <Button\n className={css({\n w: '1/2',\n })}\n name=\"cancel\"\n onClick={handleChoice}\n usage=\"outlined\"\n value=\"false\"\n >\n {content?.cancelText}\n </Button>\n </DialogCloseTrigger>\n </HStack>\n </VStack>\n </Dialog>\n </DialogProvider>\n </PromptModalContext.Provider>\n )\n}\n\n/**\n * Used to retrieve the context of the PromptModal provider.\n */\nexport function usePromptModal(): PromptModalValue {\n const context = useContext(PromptModalContext)\n if (context === null) {\n throw new Error('usePromptModal must be used within a PromptModal Provider')\n }\n return context\n}\n","'use client'\n\nimport { createContext, useContext, type PropsWithChildren } from 'react'\nimport { useTheme, type UseThemeOptions } from '../hooks/useTheme'\n\n/**\n * This module provides a context and hook for the theme.\n * @module Theme\n */\n\nexport type DefaultThemes = 'cerberus' | 'acheron'\nexport type CustomThemes<K extends string = DefaultThemes> = 'cerberus' | K\nexport type ColorModes = 'light' | 'dark' | 'system'\n\nexport interface ThemeContextValue<T extends string = DefaultThemes> {\n /**\n * The current theme.\n */\n theme: CustomThemes<T>\n /**\n * The current color mode.\n */\n mode: ColorModes\n /**\n * Called when the theme is updated.\n */\n updateTheme: (theme: T) => void\n /**\n * Called when the color mode is updated.\n */\n updateMode: (mode: ColorModes) => void\n}\n\nconst ThemeContext = createContext<ThemeContextValue<DefaultThemes> | null>(\n null,\n)\n\nexport interface ThemeProviderProps extends UseThemeOptions {\n /**\n * The default theme.\n */\n defaultTheme?: DefaultThemes\n /**\n * The default color mode.\n */\n defaultColorMode?: ColorModes\n}\n\n/**\n * A context provider that allows the user to set the theme and mode of the\n * application.\n * @see https://cerberus.digitalu.design/react/use-theme-context\n * @example\n * ```tsx\n * <ThemeProvider>\n * <App />\n * </ThemeProvider>\n * ```\n */\nexport function ThemeProvider(\n props: PropsWithChildren<ThemeProviderProps>,\n): JSX.Element {\n const state = useTheme(props.defaultTheme, props.defaultColorMode, {\n cache: props.cache,\n updateMode: props.updateMode,\n updateTheme: props.updateTheme,\n }) as ThemeContextValue<DefaultThemes>\n\n return (\n <ThemeContext.Provider value={state}>\n {props.children}\n </ThemeContext.Provider>\n )\n}\n\n/**\n * Used to access the theme context.\n */\nexport function useThemeContext(): ThemeContextValue<DefaultThemes> {\n const context = useContext(ThemeContext)\n if (!context) {\n throw new Error('useThemeContext must be used within a ThemeProvider')\n }\n return context\n}\n","'use client'\n\nimport {\n useCallback,\n useEffect,\n useLayoutEffect,\n useMemo,\n useState,\n} from 'react'\nimport {\n type ColorModes,\n type CustomThemes,\n type DefaultThemes,\n type ThemeContextValue,\n} from '../context/theme'\n\n/**\n * This module provides a hook for using the theme.\n * @module\n */\n\nexport const THEME_KEY = 'cerberus-theme'\nexport const MODE_KEY = 'cerberus-mode'\n\nexport interface UseThemeOptions<T extends string = DefaultThemes> {\n /**\n * Whether to cache the theme in local storage.\n */\n cache?: boolean\n /**\n * Called when the theme is updated.\n */\n updateTheme?: (theme: T) => void\n /**\n * Called when the color mode is updated.\n */\n updateMode?: (mode: ColorModes) => void\n}\n\n/**\n * Provides a hook for using the theme for a single instance of the application.\n * @see https://cerberus.digitalu.design/react/use-theme\n * @param defaultTheme The default theme.\n * @param defaultColorMode The default color mode.\n * @param options Additional options.\n */\nexport function useTheme<C extends string = DefaultThemes>(\n defaultTheme: CustomThemes<C> = 'cerberus',\n defaultColorMode: ColorModes = 'light',\n options: UseThemeOptions<C> = {},\n): ThemeContextValue<C> {\n const { updateMode, updateTheme, cache } = options\n const [theme, setTheme] = useState<CustomThemes<C>>(defaultTheme)\n const [colorMode, setColorMode] = useState<ColorModes>(defaultColorMode)\n\n const handleThemeChange = useCallback(\n (newTheme: C) => {\n setTheme(newTheme)\n updateTheme?.(newTheme)\n },\n [updateTheme],\n )\n\n const handleColorModeChange = useCallback(\n (newMode: ColorModes) => {\n setColorMode(newMode)\n updateMode?.(newMode)\n },\n [updateMode],\n )\n\n useLayoutEffect(() => {\n const theme = localStorage.getItem(THEME_KEY)\n if (theme) {\n setTheme(theme as CustomThemes<C>)\n }\n }, [])\n\n useLayoutEffect(() => {\n const mode = localStorage.getItem(MODE_KEY)\n if (mode) {\n setColorMode(mode as ColorModes)\n }\n }, [])\n\n useEffect(() => {\n const root = document.documentElement\n root.dataset.pandaTheme = theme\n\n if (cache) {\n localStorage.setItem(THEME_KEY, theme)\n }\n }, [theme, cache])\n\n useEffect(() => {\n const root = document.documentElement\n\n if (colorMode === 'system') {\n root.dataset.colorMode = window.matchMedia('(prefers-color-scheme: dark)')\n .matches\n ? 'dark'\n : 'light'\n } else {\n root.dataset.colorMode = colorMode\n }\n\n if (cache) {\n localStorage.setItem(MODE_KEY, colorMode)\n }\n }, [colorMode, cache])\n\n return useMemo(\n () => ({\n theme,\n mode: colorMode,\n updateTheme: handleThemeChange,\n updateMode: handleColorModeChange,\n }),\n [theme, colorMode, handleThemeChange, handleColorModeChange],\n )\n}\n","'use client'\n\nimport {\n useState,\n useCallback,\n ChangeEvent,\n useMemo,\n type InputHTMLAttributes,\n} from 'react'\n\nexport interface UseDateBase {\n /**\n * The format of the date input\n */\n format?: string\n /**\n * The callback to run when the date input changes\n */\n onChange?: InputHTMLAttributes<HTMLInputElement>['onChange']\n}\n\nexport interface UseDateOptions extends UseDateBase {\n /**\n * The initial value of the date input\n */\n initialValue?: string\n}\n\nexport interface UseDateReturn extends UseDateBase {\n /**\n * The ISO formatted date string\n */\n ISO: string\n /**\n * The value of the date input\n */\n value: string\n}\n\n/**\n * A hook for formatting and validating date inputs. The date format defaults to US Military format.\n * @example\n * ```tsx\n * const MyComponent = () => {\n * const date = useDate({ initialValue: '01 JAN 2024' })\n * return <input onChange={date.onChange} type=\"text\" value={date.value} />\n * }\n */\nexport function useDate(options?: UseDateOptions): UseDateReturn {\n const initialValue = options?.initialValue ?? ''\n const format = options?.format ?? DateFormats.USMilitary\n const onChange = options?.onChange\n const [value, setValue] = useState(initialValue)\n\n const handleChange = useCallback(\n (e: ChangeEvent<HTMLInputElement>) => {\n const newValue = formatMilitaryDate(e.currentTarget.value)\n if (onChange) onChange(e)\n setValue(newValue)\n },\n [onChange],\n )\n\n return useMemo(\n () => ({\n format,\n value,\n ISO: formatMilitaryToISO(value),\n onChange: handleChange,\n }),\n [format, value, handleChange],\n )\n}\n\n// helpers\n\n/**\n * Converts a string in US Military format to ISO format. Used within the `useDate` hook.\n * @param input The string to format\n * @returns The formatted string in ISO format (YYYY-MM-DD)\n */\nexport function formatMilitaryToISO(input: string) {\n const [day, month, year] = input.split(' ')\n const monthIndex = MONTHS.findIndex((m) => m.startsWith(month))\n const monthNum = monthIndex + 1\n return `${year ?? '0000'}-${monthNum.toString().padStart(2, '0')}-${day.padStart(\n 2,\n '0',\n )}`\n}\n\n/**\n * Converts a string to US Military format. Used within the `useDate` hook.\n * @param input The string to format\n * @returns The formatted string in US Military format (DD MMM YYYY)\n */\nexport function formatMilitaryDate(input: string): string {\n let formatted = input.toUpperCase().replace(/[^0-9A-Z]/g, '')\n let day = ''\n let month = ''\n let year = ''\n\n // Format day\n if (formatted.length >= 2) {\n day = formatted.replace(/[^0-9]/g, '').slice(0, 2)\n const dayNum = parseInt(day, 10)\n if (dayNum > 31) day = '31'\n else if (dayNum === 0) day = '01'\n formatted = formatted.slice(2)\n }\n\n // Format month\n if (formatted.length >= 3) {\n month = formatted.slice(0, 3)\n const monthIndex = MONTHS.findIndex((m) => m.startsWith(month))\n if (monthIndex !== -1) {\n month = MONTHS[monthIndex]\n } else {\n month = month.replace(/[^A-Z]/g, '')\n }\n formatted = formatted.slice(3)\n }\n\n // Format year\n if (formatted.length > 0) {\n year = formatted.slice(0, 4)\n }\n\n return [day, month, year].filter(Boolean).join(' ')\n}\n\n/**\n * Formats a date string to US Military format.\n * @param date The date string to format (i.e., '2024-01-01')\n * @returns The formatted date string in US Military format (DD MMM YYYY)\n */\nexport function formatISOToMilitary(date: string): string {\n const [year, month, day] = date.split('-')\n const monthIndex = parseInt(month, 10) - 1\n const monthStr = MONTHS[monthIndex]\n return `${day} ${monthStr} ${year}`\n}\n\n/**\n * Date formatting options\n * @example\n * ```tsx\n * const date = new Date()\n * const formatted = date.format(DateFormats.USMilitary)\n */\nexport const DateFormats = {\n get ISO() {\n return 'YYYY-MM-DD'\n },\n get USMilitary() {\n return 'DD MMM YYYY'\n },\n get Months() {\n return MONTHS\n },\n}\n\nconst MONTHS = [\n 'JAN',\n 'FEB',\n 'MAR',\n 'APR',\n 'MAY',\n 'JUN',\n 'JUL',\n 'AUG',\n 'SEP',\n 'OCT',\n 'NOV',\n 'DEC',\n]\n","'use client'\n\nimport { useCallback, useMemo, useRef, useState, type RefObject } from 'react'\n\n/**\n * This module provides a hook for using a custom modal.\n * @module\n */\n\nexport interface UseModalReturnValue {\n /**\n * The ref for the modal.\n */\n modalRef: RefObject<HTMLDialogElement>\n /**\n * Shows the modal.\n */\n show: () => void\n /**\n * Closes the modal.\n */\n close: () => void\n /**\n * Whether the modal is open based on the show and close methods.\n */\n isOpen: boolean\n}\n\n/**\n * Provides a hook for using a custom modal via the native dialog element\n * methods.\n *\n * Cerberus modals use the native dialog element. This hook\n * does not control the modal via React state but rather by calling the\n * native dialog element's `showModal` and `close` methods.\n *\n * @memberof module:Modal\n * @see https://cerberus.digitalu.design/react/modal\n * @description [Moz Dev Dialog Docs](https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement/showModal)\n */\nexport function useModal(): UseModalReturnValue {\n const modalRef = useRef<HTMLDialogElement | null>(null)\n const [isOpen, setIsOpen] = useState<boolean>(false)\n\n const show = useCallback(() => {\n modalRef.current?.showModal()\n setIsOpen(true)\n }, [])\n\n const close = useCallback(() => {\n modalRef.current?.close()\n setIsOpen(false)\n }, [])\n\n return useMemo(() => {\n return {\n modalRef,\n show,\n close,\n isOpen,\n }\n }, [modalRef, show, close, isOpen])\n}\n","'use client'\n\nimport { useCallback, useMemo, useState, type ChangeEvent } from 'react'\n\n/**\n * This module provides a hook for using a toggle.\n * @module useToggle\n */\n\nexport interface UseToggleOptions {\n /**\n * The initial checked state.\n */\n checked?: string\n /**\n * Called when the checked state changes.\n */\n onChange?: (e: ChangeEvent<HTMLInputElement>) => void\n}\nexport interface ToggleHookReturn {\n /**\n * The checked state.\n */\n checked: string\n /**\n * A custom handler to be called when the checked state changes.\n */\n handleChange: (e: ChangeEvent<HTMLInputElement>) => void\n}\n\n/**\n * Provides a hook for using a toggle.\n * @see https://cerberus.digitalu.design/react/use-toggle\n * @memberof module:Toggle\n */\nexport function useToggle(options?: UseToggleOptions): ToggleHookReturn {\n const [checked, setChecked] = useState<string>(options?.checked ?? '')\n const onChange = options?.onChange\n\n const handleChange = useCallback(\n (e: ChangeEvent<HTMLInputElement>) => {\n const target = e.currentTarget as HTMLInputElement\n setChecked((prev) => {\n return prev === target.value ? '' : target.value\n })\n onChange?.(e)\n },\n [onChange],\n )\n\n return useMemo(() => ({ checked, handleChange }), [checked, handleChange])\n}\n","'use client'\n\nimport { useCallback, useEffect, useMemo, useReducer } from 'react'\n\n/**\n * This module provides a hook to get Cerberus colors from the document root.\n * @module useRootColors\n */\n\nexport interface RootColorsResult {\n /**\n * A record of Cerberus colors where the key is the token name provided and the value is the color hex.\n */\n colors: Record<string, string>\n /**\n * A function to refetch the Cerberus colors from the document root. Useful when you need the latest colors after a theme/mode change.\n */\n refetch: () => Promise<void>\n}\n\n/**\n * This hook returns a record of Cerberus colors from the document root.\n * This is useful when you are working with a component that uses the `<canvas>`\n * element.\n * @param colors - An array of Cerberus tokens to get from the document root (i.e. `['dataViz.diverging.50', 'dataViz.diverging.200']`).\n * @returns A record of Cerberus colors where the key is the token name provided and the value is the color hex.\n */\nexport function useRootColors(colors: string[] = []): RootColorsResult {\n const [state, dispatch] = useReducer(rootColorsReducer, {})\n\n const handleRefetch = useCallback(() => {\n return new Promise<void>((resolve) => {\n dispatch(formatColors(colors))\n resolve()\n })\n }, [])\n\n useEffect(() => {\n if (Object.keys(state).length === colors.length) return\n dispatch(formatColors(colors))\n console.log('updating colors in root hook')\n }, [colors])\n\n // reducer is already memoized\n return useMemo(\n () => ({ colors: state, refetch: handleRefetch }),\n [state, handleRefetch],\n )\n}\n\nfunction formatColors(colors: string[]): Record<string, string> {\n const rootStyles = getComputedStyle(document.body)\n return colors.reduce(\n (acc, color) => {\n const formattedColor = color\n .replace(/([a-z])([A-Z])/g, '$1-$2')\n .toLowerCase()\n .replaceAll('.', '-')\n acc[color] = rootStyles\n .getPropertyValue(`--cerberus-colors-${formattedColor}`)\n .trim()\n return acc\n },\n {} as Record<string, string>,\n )\n}\n\nfunction rootColorsReducer(\n state: Record<string, string>,\n action: Record<string, string>,\n): Record<string, string> {\n return { ...state, ...action }\n}\n","import type { SVGProps } from 'react'\n\n/**\n * This module contains substitute icons for the Checkbox component.\n * @module\n */\n\nexport type CheckboxIconProps = 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\nexport type IndeterminateIconProps = 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","/**\n * This module contains an animating icon to use for the FileStatus component.\n * @module\n */\n\nexport interface AnimatingUploadIconProps {\n size?: 16 | 20 | 24 | 32\n}\n\nexport function AnimatingUploadIcon(props: AnimatingUploadIconProps) {\n return (\n <svg\n aria-hidden=\"true\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width={props.size ?? '1em'}\n height={props.size ?? '1em'}\n viewBox=\"0 0 24 24\"\n >\n <g\n fill=\"none\"\n stroke=\"currentColor\"\n strokeLinecap=\"square\"\n strokeLinejoin=\"round\"\n strokeWidth={1.5}\n >\n <path\n data-name=\"animating-trail\"\n strokeDasharray=\"2 4\"\n strokeDashoffset={6}\n d=\"M12 21c-4.97 0 -9 -4.03 -9 -9c0 -4.97 4.03 -9 9 -9\"\n >\n <animate\n attributeName=\"stroke-dashoffset\"\n dur=\"0.45s\"\n repeatCount=\"indefinite\"\n values=\"6;0\"\n ></animate>\n </path>\n\n <path\n data-name=\"half-circle\"\n strokeDasharray={32}\n strokeDashoffset={32}\n d=\"M12 3c4.97 0 9 4.03 9 9c0 4.97 -4.03 9 -9 9\"\n >\n <animate\n fill=\"freeze\"\n attributeName=\"stroke-dashoffset\"\n begin=\"0.075s\"\n dur=\"0.3s\"\n values=\"32;0\"\n ></animate>\n </path>\n\n <svg\n aria-hidden=\"true\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"0.8em\"\n height=\"0.8em\"\n x=\"27%\"\n y=\"27%\"\n viewBox=\"0 0 24 24\"\n >\n <polygon\n fill=\"currentColor\"\n stroke=\"currentColor\"\n strokeWidth={0.8}\n opacity=\"1\"\n points=\"3.7,6.7 7.5,2.9 7.5,15 8.5,15 8.5,2.9 12.3,6.7 13,6 8,1 3,6 \"\n >\n <animate\n fill=\"freeze\"\n attributeName=\"opacity\"\n values=\"1;0;1\"\n dur=\"2s\"\n repeatCount=\"indefinite\"\n ></animate>\n </polygon>\n </svg>\n </g>\n </svg>\n )\n}\n","import { CheckmarkIcon, IndeterminateIcon } from './icons/checkbox.icons'\nimport { AnimatingUploadIcon } from '../components/AnimatingUploadIcon'\nimport type { DefinedIcons, IconType } from './types'\n\nconst defaultIcons: Pick<\n DefinedIcons,\n 'checkbox' | 'fileUploader' | 'indeterminate'\n> = {\n checkbox: CheckmarkIcon,\n fileUploader: AnimatingUploadIcon,\n indeterminate: IndeterminateIcon,\n}\n\n/**\n * Defines the icons that will be used in Cerberus React components via the\n * CerberusProvider.\n * @param icons The icons that will be used in Cerberus React components.\n * @returns Icons object compatible with the CerberusProvider SystemConfig.\n * @example\n * ```tsx\n * const icons = defineIcons({\n * accordionIndicator: MyAccordionIndicatorIcon,\n * ...\n * })\n * ```\n */\nexport function defineIcons<T extends IconType>(\n icons: DefinedIcons,\n): Required<DefinedIcons<T>> {\n return {\n ...defaultIcons,\n ...icons,\n } as Required<DefinedIcons<T>>\n}\n","import type { SystemConfig } from './types'\n\n/**\n * Create a system configuration object to be used on the CerberusProvider.\n * @param options The system configuration options you want to customize.\n * @returns A CerberusProvider-compatible system configuration object.\n * @example\n * ```tsx\n * const icons = defineIcons({\n * accordionIndicator: MyAccordionIndicatorIcon,\n * ...\n * })\n * const config = makeSystemConfig({\n * icons,\n * })\n *\n * // In your app\n * <CerberusProvider config={config}>\n * <App />\n * </CerberusProvider>\n * ```\n */\nexport function makeSystemConfig(options: SystemConfig): SystemConfig {\n return options\n}\n\nexport * from './defineIcons'\nexport * from './types'\n","/**\n * This module contains utility functions that are used across your app.\n * @module Utils\n */\n\n/**\n * Formats the count of notifications to be displayed in the notification badge.\n * @param count - The number of notifications.\n * @returns The formatted count of notifications.\n * @example\n * ```tsx\n * const count = formatNotifyCount(100)\n * console.log(count) // '99+'\n * ```\n */\nexport function formatNotifyCount(count: number): string {\n if (count > 99) return '99+'\n return count.toString()\n}\n\nexport * from './localStorage'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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AA,oBACZ,QAAO;AAAA;AAAA,gBACR;AAAA;AAAA,YACH;AAAA,YAEA;AAAA,cAAC;AAAA;AAAA,gBACC,aAAU;AAAA,gBACV,iBAAiB;AAAA,gBACjB,kBAAkB;AAAA,gBAClB,GAAE;AAAA,gBAEF;AAAA,kBAAC;AAAA;AAAA,oBACC,MAAK;AAAA,oBACL,eAAc;AAAA,oBACd,OAAM;AAAA,oBACN,KAAI;AAAA,oBACJ,QAAO;AAAA;AAAA,gBACR;AAAA;AAAA,YACH;AAAA,YAEA;AAAA,cAAC;AAAA;AAAA,gBACC,eAAY;AAAA,gBACZ,OAAM;AAAA,gBACN,OAAM;AAAA,gBACN,QAAO;AAAA,gBACP,GAAE;AAAA,gBACF,GAAE;AAAA,gBACF,SAAQ;AAAA,gBAER;AAAA,kBAAC;AAAA;AAAA,oBACC,MAAK;AAAA,oBACL,QAAO;AAAA,oBACP,aAAa;AAAA,oBACb,SAAQ;AAAA,oBACR,QAAO;AAAA,oBAEP;AAAA,sBAAC;AAAA;AAAA,wBACC,MAAK;AAAA,wBACL,eAAc;AAAA,wBACd,QAAO;AAAA,wBACP,KAAI;AAAA,wBACJ,aAAY;AAAA;AAAA,oBACb;AAAA;AAAA,gBACH;AAAA;AAAA,YACF;AAAA;AAAA;AAAA,MACF;AAAA;AAAA,EACF;AAEJ;;;AC9EA,IAAM,eAGF;AAAA,EACF,UAAU;AAAA,EACV,cAAc;AAAA,EACd,eAAe;AACjB;AAeO,SAAS,YACd,OAC2B;AAC3B,SAAO;AAAA,IACL,GAAG;AAAA,IACH,GAAG;AAAA,EACL;AACF;;;ACXO,SAAS,iBAAiB,SAAqC;AACpE,SAAO;AACT;;;ACTO,SAAS,kBAAkB,OAAuB;AACvD,MAAI,QAAQ,GAAI,QAAO;AACvB,SAAO,MAAM,SAAS;AACxB;;;A5EiFA,wBAAc,0BAnGd;","names":["import_css","import_jsx_runtime","import_css","import_recipes","import_jsx_runtime","import_css","import_recipes","import_jsx_runtime","import_react","import_css","import_recipes","import_css","import_react","import_jsx_runtime","import_react","import_jsx_runtime","import_react","import_css","import_patterns","import_jsx_runtime","import_css","import_jsx_runtime","import_react","import_css","import_recipes","import_jsx_runtime","ArkAccordion","import_react","import_css","import_recipes","import_react","import_jsx_runtime","import_jsx_runtime","ArkAccordion","import_css","import_jsx_runtime","import_recipes","import_css","import_patterns","import_css","import_patterns","import_recipes","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_css","import_recipes","import_jsx_runtime","import_recipes","import_patterns","import_css","import_react","import_jsx_runtime","import_jsx_runtime","IndeterminateIcon","import_patterns","import_css","import_jsx_runtime","import_react","import_react","ArkPortal","import_recipes","import_css","import_react","import_css","import_recipes","import_jsx_runtime","ArkDP","import_css","import_recipes","import_jsx_runtime","import_react","import_jsx_runtime","datePickerStyles","ArkDP","datePicker","id","import_react","import_recipes","import_css","import_jsx_runtime","ArkDialog","import_react","import_recipes","import_css","import_jsx_runtime","ArkDialog","import_react","import_jsx_runtime","import_css","import_recipes","import_jsx_runtime","import_react","import_jsx_runtime","import_jsx_runtime","import_css","import_jsx_runtime","import_css","import_recipes","import_jsx_runtime","import_react","import_recipes","import_css","import_patterns","import_css","import_recipes","import_jsx_runtime","label","import_jsx_runtime","processStatus","import_css","import_patterns","import_recipes","import_jsx_runtime","import_recipes","import_css","import_jsx_runtime","import_recipes","import_css","import_patterns","import_jsx_runtime","import_css","import_recipes","import_patterns","import_jsx_runtime","import_react","import_recipes","import_css","import_jsx_runtime","ArkMenu","import_css","import_patterns","import_recipes","import_react","import_jsx_runtime","import_css","import_recipes","import_jsx_runtime","import_css","import_recipes","import_jsx_runtime","import_css","import_patterns","import_recipes","import_jsx_runtime","import_css","import_patterns","import_recipes","import_jsx_runtime","import_jsx_runtime","import_tabs","import_css","import_recipes","import_react","import_jsx_runtime","ArkTabs","import_jsx_runtime","ArkTabs","import_css","import_recipes","import_jsx_runtime","import_css","import_recipes","import_jsx_runtime","import_css","import_recipes","import_jsx_runtime","import_css","import_recipes","import_jsx_runtime","import_recipes","import_css","import_jsx_runtime","import_css","import_recipes","import_jsx_runtime","import_jsx_runtime","import_css","import_recipes","import_jsx_runtime","import_css","import_patterns","import_recipes","import_jsx_runtime","import_css","import_recipes","import_jsx_runtime","ArkTooltip","import_react","import_css","import_jsx","import_jsx_runtime","import_react","import_jsx","import_css","import_jsx_runtime","import_react","import_patterns","import_recipes","import_css","import_jsx_runtime","import_react","import_css","import_patterns","import_jsx","import_react","import_jsx_runtime","import_react","import_react","theme","import_jsx_runtime","import_react","input","import_react","import_react","import_react","import_jsx_runtime","import_jsx_runtime"]}