@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
@@ -21,7 +21,6 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
21
21
  // src/index.ts
22
22
  var src_exports = {};
23
23
  __export(src_exports, {
24
- $cerberusIcons: () => $cerberusIcons,
25
24
  Accordion: () => Accordion,
26
25
  AccordionItem: () => AccordionItem,
27
26
  AccordionItemContent: () => AccordionItemContent,
@@ -34,6 +33,7 @@ __export(src_exports, {
34
33
  Avatar: () => Avatar,
35
34
  Button: () => Button,
36
35
  CTAModal: () => CTAModal,
36
+ CerberusProvider: () => CerberusProvider,
37
37
  Checkbox: () => Checkbox,
38
38
  CircularProgress: () => CircularProgress,
39
39
  ConfirmModal: () => ConfirmModal,
@@ -55,6 +55,16 @@ __export(src_exports, {
55
55
  DatePickerViewControl: () => DatePickerViewControl,
56
56
  DatePickerViewControlGroup: () => DatePickerViewControlGroup,
57
57
  DatePickerYearView: () => DatePickerYearView,
58
+ Dialog: () => Dialog,
59
+ DialogBackdrop: () => DialogBackdrop,
60
+ DialogCloseIconTrigger: () => DialogCloseIconTrigger,
61
+ DialogCloseTrigger: () => DialogCloseTrigger,
62
+ DialogContent: () => DialogContent,
63
+ DialogDescription: () => DialogDescription,
64
+ DialogHeading: () => DialogHeading,
65
+ DialogPositioner: () => DialogPositioner,
66
+ DialogProvider: () => DialogProvider,
67
+ DialogTrigger: () => DialogTrigger,
58
68
  Droppable: () => Droppable,
59
69
  FeatureFlag: () => FeatureFlag,
60
70
  FeatureFlags: () => FeatureFlags,
@@ -125,10 +135,12 @@ __export(src_exports, {
125
135
  formatNotifyCount: () => formatNotifyCount,
126
136
  getLocalStorage: () => getLocalStorage,
127
137
  getPosition: () => getPosition,
138
+ makeSystemConfig: () => makeSystemConfig,
128
139
  processStatus: () => processStatus,
129
140
  setLocalStorage: () => setLocalStorage,
130
141
  trapFocus: () => trapFocus,
131
142
  useCTAModal: () => useCTAModal,
143
+ useCerberusContext: () => useCerberusContext,
132
144
  useConfirmModal: () => useConfirmModal,
133
145
  useDate: () => useDate,
134
146
  useFeatureFlags: () => useFeatureFlags,
@@ -145,335 +157,460 @@ __export(src_exports, {
145
157
  });
146
158
  module.exports = __toCommonJS(src_exports);
147
159
 
148
- // src/components/Accordion.tsx
149
- var import_react = require("@ark-ui/react");
160
+ // src/components/Modal.tsx
150
161
  var import_css = require("@cerberus/styled-system/css");
151
162
  var import_recipes = require("@cerberus/styled-system/recipes");
152
-
153
- // src/config/cerbIcons.ts
154
- var import_icons = require("@cerberus/icons");
155
-
156
- // src/config/icons/checkbox.icons.tsx
163
+ var import_react = require("react");
157
164
  var import_jsx_runtime = require("react/jsx-runtime");
158
- function CheckmarkIcon(props) {
159
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
160
- "svg",
161
- {
162
- "aria-hidden": "true",
163
- xmlns: "http://www.w3.org/2000/svg",
164
- fill: "none",
165
- role: "img",
166
- viewBox: "0 0 24 24",
167
- ...props,
168
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
169
- "path",
170
- {
171
- fill: "currentColor",
172
- d: "M9.714 18 4 12.335l1.818-1.764 3.896 3.824L18.181 6 20 7.803 9.714 18Z"
173
- }
174
- )
175
- }
176
- );
177
- }
178
- function IndeterminateIcon(props) {
165
+ function ModalEl(props, ref) {
179
166
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
180
- "svg",
167
+ "dialog",
181
168
  {
182
- "aria-hidden": "true",
183
- xmlns: "http://www.w3.org/2000/svg",
184
- role: "img",
185
- fill: "none",
186
- viewBox: "0 0 24 24",
187
169
  ...props,
188
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { fill: "currentColor", d: "M4 11h16v2.667H4z" })
170
+ className: (0, import_css.cx)(props.className, (0, import_recipes.modal)().dialog),
171
+ ref
189
172
  }
190
173
  );
191
174
  }
175
+ var Modal = (0, import_react.forwardRef)(ModalEl);
192
176
 
193
- // src/components/AnimatingUploadIcon.tsx
177
+ // src/components/ModalHeader.tsx
178
+ var import_css2 = require("@cerberus/styled-system/css");
179
+ var import_patterns = require("@cerberus/styled-system/patterns");
194
180
  var import_jsx_runtime2 = require("react/jsx-runtime");
195
- function AnimatingUploadIcon(props) {
181
+ function ModalHeader(props) {
196
182
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
197
- "svg",
183
+ "div",
198
184
  {
199
- "aria-hidden": "true",
200
- xmlns: "http://www.w3.org/2000/svg",
201
- width: props.size ?? "1em",
202
- height: props.size ?? "1em",
203
- viewBox: "0 0 24 24",
204
- children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
205
- "g",
206
- {
207
- fill: "none",
208
- stroke: "currentColor",
209
- strokeLinecap: "square",
210
- strokeLinejoin: "round",
211
- strokeWidth: 1.5,
212
- children: [
213
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
214
- "path",
215
- {
216
- "data-name": "animating-trail",
217
- strokeDasharray: "2 4",
218
- strokeDashoffset: 6,
219
- d: "M12 21c-4.97 0 -9 -4.03 -9 -9c0 -4.97 4.03 -9 9 -9",
220
- children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
221
- "animate",
222
- {
223
- attributeName: "stroke-dashoffset",
224
- dur: "0.45s",
225
- repeatCount: "indefinite",
226
- values: "6;0"
227
- }
228
- )
229
- }
230
- ),
231
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
232
- "path",
233
- {
234
- "data-name": "half-circle",
235
- strokeDasharray: 32,
236
- strokeDashoffset: 32,
237
- d: "M12 3c4.97 0 9 4.03 9 9c0 4.97 -4.03 9 -9 9",
238
- children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
239
- "animate",
240
- {
241
- fill: "freeze",
242
- attributeName: "stroke-dashoffset",
243
- begin: "0.075s",
244
- dur: "0.3s",
245
- values: "32;0"
246
- }
247
- )
248
- }
249
- ),
250
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
251
- "svg",
252
- {
253
- "aria-hidden": "true",
254
- xmlns: "http://www.w3.org/2000/svg",
255
- width: "0.8em",
256
- height: "0.8em",
257
- x: "27%",
258
- y: "27%",
259
- viewBox: "0 0 24 24",
260
- children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
261
- "polygon",
262
- {
263
- fill: "currentColor",
264
- stroke: "currentColor",
265
- strokeWidth: 0.8,
266
- opacity: "1",
267
- 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 ",
268
- children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
269
- "animate",
270
- {
271
- fill: "freeze",
272
- attributeName: "opacity",
273
- values: "1;0;1",
274
- dur: "2s",
275
- repeatCount: "indefinite"
276
- }
277
- )
278
- }
279
- )
280
- }
281
- )
282
- ]
283
- }
185
+ ...props,
186
+ className: (0, import_css2.cx)(
187
+ props.className,
188
+ (0, import_patterns.vstack)({
189
+ alignItems: "flex-start",
190
+ gap: "md",
191
+ position: "relative"
192
+ })
284
193
  )
285
194
  }
286
195
  );
287
196
  }
288
197
 
289
- // src/config/cerbIcons.ts
290
- var defaultIcons = {
291
- accordionIndicator: import_icons.ChevronDown,
292
- avatar: import_icons.UserFilled,
293
- calendar: import_icons.Calendar,
294
- calendarPrev: import_icons.ChevronLeft,
295
- calendarNext: import_icons.ChevronRight,
296
- checkbox: CheckmarkIcon,
297
- close: import_icons.Close,
298
- confirmModal: import_icons.Information,
299
- delete: import_icons.TrashCan,
300
- promptModal: import_icons.Information,
301
- waitingFileUploader: import_icons.CloudUpload,
302
- fileUploader: AnimatingUploadIcon,
303
- indeterminate: IndeterminateIcon,
304
- infoNotification: import_icons.Information,
305
- successNotification: import_icons.CheckmarkOutline,
306
- warningNotification: import_icons.WarningAlt,
307
- dangerNotification: import_icons.WarningFilled,
308
- invalid: import_icons.WarningFilled,
309
- invalidAlt: import_icons.Warning,
310
- redo: import_icons.Restart,
311
- selectArrow: import_icons.ChevronDown,
312
- toggleChecked: import_icons.Checkmark
313
- };
198
+ // src/components/ModalHeading.tsx
199
+ var import_css3 = require("@cerberus/styled-system/css");
200
+ var import_recipes2 = require("@cerberus/styled-system/recipes");
201
+ var import_jsx_runtime3 = require("react/jsx-runtime");
202
+ function ModalHeading(props) {
203
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { ...props, className: (0, import_css3.cx)(props.className, (0, import_recipes2.modal)().heading) });
204
+ }
314
205
 
315
- // src/config/defineIcons.ts
316
- function _validateIconsProperties(icons) {
317
- if (!icons.invalid) {
318
- throw new Error(
319
- "The an invalid property must be defined in your custom icons library."
320
- );
321
- }
206
+ // src/components/ModalDescription.tsx
207
+ var import_css4 = require("@cerberus/styled-system/css");
208
+ var import_recipes3 = require("@cerberus/styled-system/recipes");
209
+ var import_jsx_runtime4 = require("react/jsx-runtime");
210
+ function ModalDescription(props) {
211
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { ...props, className: (0, import_css4.cx)(props.className, (0, import_recipes3.modal)().description) });
322
212
  }
323
- function defineIcons(icons) {
324
- _validateIconsProperties(icons);
325
- $cerberusIcons = {
326
- ...defaultIcons,
327
- ...icons
213
+
214
+ // src/components/NavMenuTrigger.tsx
215
+ var import_react4 = require("react");
216
+ var import_css6 = require("@cerberus/styled-system/css");
217
+ var import_recipes4 = require("@cerberus/styled-system/recipes");
218
+
219
+ // src/aria-helpers/nav-menu.aria.ts
220
+ function createNavTriggerProps(values) {
221
+ return {
222
+ ["aria-controls"]: values.controls,
223
+ ["aria-expanded"]: values.expanded ?? false
328
224
  };
329
- return $cerberusIcons;
330
225
  }
331
- var $cerberusIcons = defaultIcons;
332
226
 
333
- // src/components/Accordion.tsx
334
- var import_jsx_runtime3 = require("react/jsx-runtime");
335
- function Accordion(props) {
336
- const { size, className, ...rootProps } = props;
337
- const styles = (0, import_recipes.accordion)({ size });
338
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
339
- import_react.Accordion.Root,
340
- {
341
- collapsible: true,
342
- className: (0, import_css.cx)(className, styles.root),
343
- ...rootProps
344
- }
345
- );
346
- }
347
- function AccordionItem(props) {
348
- const { size, ...itemProps } = props;
349
- const styles = (0, import_recipes.accordion)({ size });
350
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
351
- import_react.Accordion.Item,
352
- {
353
- ...itemProps,
354
- className: (0, import_css.cx)(itemProps.className, styles.item)
355
- }
356
- );
357
- }
358
- function AccordionItemTrigger(props) {
359
- const { size, ...triggerProps } = props;
360
- const styles = (0, import_recipes.accordion)({ size });
361
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
362
- import_react.Accordion.ItemTrigger,
363
- {
364
- ...triggerProps,
365
- className: (0, import_css.cx)(triggerProps.className, styles.itemTrigger)
366
- }
227
+ // src/context/navMenu.tsx
228
+ var import_css5 = require("@cerberus/styled-system/css");
229
+ var import_react2 = require("react");
230
+ var import_jsx_runtime5 = require("react/jsx-runtime");
231
+ var NavMenuContext = (0, import_react2.createContext)(null);
232
+ function NavMenu(props) {
233
+ const triggerRef = (0, import_react2.useRef)(null);
234
+ const menuRef = (0, import_react2.useRef)(null);
235
+ const [expanded, setExpanded] = (0, import_react2.useState)(false);
236
+ const handleToggle = (0, import_react2.useCallback)(() => {
237
+ setExpanded((prev) => !prev);
238
+ }, []);
239
+ const value = (0, import_react2.useMemo)(
240
+ () => ({
241
+ triggerRef,
242
+ menuRef,
243
+ expanded,
244
+ onToggle: handleToggle
245
+ }),
246
+ [expanded, handleToggle]
367
247
  );
368
- }
369
- function AccordionItemIndicator(props) {
370
- const { size, ...indicatorProps } = props;
371
- const styles = (0, import_recipes.accordion)({ size });
372
- const iconSize = size === "sm" ? 16 : "24";
373
- const { accordionIndicator: ChevronDown2 } = $cerberusIcons;
374
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
375
- import_react.Accordion.ItemIndicator,
248
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(NavMenuContext.Provider, { value, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
249
+ "nav",
376
250
  {
377
- ...indicatorProps,
378
- className: (0, import_css.cx)(indicatorProps.className, styles.itemIndicator),
379
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ChevronDown2, { size: iconSize })
251
+ className: (0, import_css5.css)({
252
+ position: "relative"
253
+ }),
254
+ children: props.children
380
255
  }
381
- );
256
+ ) });
382
257
  }
383
- function AccordionItemContent(props) {
384
- const { size, ...contentProps } = props;
385
- const styles = (0, import_recipes.accordion)({ size });
386
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
387
- import_react.Accordion.ItemContent,
388
- {
389
- ...contentProps,
390
- className: (0, import_css.cx)(contentProps.className, styles.itemContent)
391
- }
392
- );
258
+ function useNavMenuContext() {
259
+ const context = (0, import_react2.useContext)(NavMenuContext);
260
+ if (!context) {
261
+ throw new Error("useNavMenuContext must be used within a NavMenu.");
262
+ }
263
+ return context;
393
264
  }
394
265
 
395
266
  // src/components/Show.tsx
396
- var import_react2 = require("react");
267
+ var import_react3 = require("react");
397
268
  function Show(props) {
398
269
  const { when, children, fallback } = props;
399
- const condition = (0, import_react2.useMemo)(() => when ?? false, [when]);
400
- return (0, import_react2.useMemo)(() => {
270
+ const condition = (0, import_react3.useMemo)(() => when ?? false, [when]);
271
+ return (0, import_react3.useMemo)(() => {
401
272
  if (condition) return children;
402
273
  return fallback ?? null;
403
274
  }, [condition, children, fallback]);
404
275
  }
405
276
 
406
- // src/components/AccordionItemGroup.tsx
407
- var import_css2 = require("@cerberus/styled-system/css");
408
- var import_jsx_runtime4 = require("react/jsx-runtime");
409
- function AccordionItemGroup(props) {
410
- const {
411
- size,
412
- heading,
413
- children,
414
- indicatorPosition = "end",
415
- ...itemProps
416
- } = props;
417
- const triggerStyles = indicatorPosition === "start" ? {
418
- gap: "md",
419
- justifyContent: "flex-start"
420
- } : void 0;
421
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(AccordionItem, { ...itemProps, children: [
422
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(AccordionItemTrigger, { className: (0, import_css2.css)(triggerStyles), size, children: [
423
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Show, { when: indicatorPosition === "start", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(AccordionItemIndicator, { size }) }),
424
- heading,
425
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Show, { when: indicatorPosition === "end", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(AccordionItemIndicator, { size }) })
426
- ] }),
427
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(AccordionItemContent, { size, children })
428
- ] });
429
- }
430
-
431
- // src/components/Admonition.tsx
432
- var import_recipes3 = require("@cerberus/styled-system/recipes");
433
- var import_css4 = require("@cerberus/styled-system/css");
434
- var import_patterns2 = require("@cerberus/styled-system/patterns");
435
-
436
- // src/components/Avatar.tsx
437
- var import_css3 = require("@cerberus/styled-system/css");
438
- var import_patterns = require("@cerberus/styled-system/patterns");
439
- var import_recipes2 = require("@cerberus/styled-system/recipes");
440
- var import_jsx_runtime5 = require("react/jsx-runtime");
441
- function Avatar(props) {
277
+ // src/components/NavMenuTrigger.tsx
278
+ var import_jsx_runtime6 = require("react/jsx-runtime");
279
+ function NavMenuTrigger(props) {
442
280
  const {
443
- ariaLabel,
444
281
  as,
445
- gradient,
446
- size,
447
- src,
448
- width,
282
+ palette,
283
+ usage,
284
+ shape,
285
+ controls,
286
+ expanded: propsExpanded,
287
+ onClick,
288
+ ...nativeProps
289
+ } = props;
290
+ const { triggerRef, onToggle, expanded } = useNavMenuContext();
291
+ const ariaProps = createNavTriggerProps({
292
+ controls,
293
+ expanded: propsExpanded ?? expanded
294
+ });
295
+ const hasAs = Boolean(as);
296
+ const AsSub = as;
297
+ const handleClick = (0, import_react4.useCallback)(
298
+ (e) => {
299
+ if (onClick) return onClick(e);
300
+ onToggle();
301
+ },
302
+ [onClick, onToggle]
303
+ );
304
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
305
+ Show,
306
+ {
307
+ when: hasAs,
308
+ fallback: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
309
+ "button",
310
+ {
311
+ ...nativeProps,
312
+ ...ariaProps,
313
+ className: (0, import_css6.cx)(
314
+ nativeProps.className,
315
+ (0, import_recipes4.button)({
316
+ palette,
317
+ usage,
318
+ shape
319
+ })
320
+ ),
321
+ onClick: handleClick,
322
+ ref: triggerRef,
323
+ children: props.children
324
+ }
325
+ ),
326
+ children: hasAs && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
327
+ AsSub,
328
+ {
329
+ ...nativeProps,
330
+ ...ariaProps,
331
+ onClick: handleClick,
332
+ ref: triggerRef
333
+ }
334
+ )
335
+ }
336
+ );
337
+ }
338
+
339
+ // src/components/NavMenuList.tsx
340
+ var import_react5 = require("react");
341
+ var import_css7 = require("@cerberus/styled-system/css");
342
+ var import_patterns2 = require("@cerberus/styled-system/patterns");
343
+ var import_jsx_runtime7 = require("react/jsx-runtime");
344
+ function getPosition(position) {
345
+ const defaultPositions = {
346
+ left: "auto",
347
+ right: "auto",
348
+ top: "auto",
349
+ bottom: "auto"
350
+ };
351
+ switch (position) {
352
+ case "right":
353
+ return { ...defaultPositions, top: "0%", left: "105%" };
354
+ case "left":
355
+ return { ...defaultPositions, top: "0%", right: "105%" };
356
+ case "bottom":
357
+ return { ...defaultPositions, top: "110%" };
358
+ case "top":
359
+ return { ...defaultPositions, bottom: "110%" };
360
+ default:
361
+ return defaultPositions;
362
+ }
363
+ }
364
+ var navListStyles = (0, import_patterns2.vstack)({
365
+ alignItems: "flex-start",
366
+ bgColor: "page.surface.100",
367
+ boxShadow: "lg",
368
+ gap: "2",
369
+ opacity: "0",
370
+ p: "4",
371
+ position: "absolute",
372
+ rounded: "md",
373
+ zIndex: "dropdown",
374
+ _motionSafe: {
375
+ animationName: "zoomIn",
376
+ animationDelay: "100ms",
377
+ animationDuration: "150ms",
378
+ animationFillMode: "both",
379
+ animationTimingFunction: "ease-in-out"
380
+ },
381
+ _positionBottom: {
382
+ transformOrigin: "top left"
383
+ },
384
+ _positionTop: {
385
+ transformOrigin: "bottom left"
386
+ },
387
+ _positionLeft: {
388
+ transformOrigin: "top right"
389
+ },
390
+ _positionRight: {
391
+ transformOrigin: "top left"
392
+ }
393
+ });
394
+ function NavMenuList(props) {
395
+ const { position, ...nativeProps } = props;
396
+ const { menuRef, expanded } = useNavMenuContext();
397
+ const locationStyles = (0, import_react5.useMemo)(
398
+ () => getPosition(position ?? "bottom"),
399
+ [position]
400
+ );
401
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Show, { when: expanded, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
402
+ "ul",
403
+ {
404
+ ...nativeProps,
405
+ "data-position": position ?? "bottom",
406
+ className: (0, import_css7.cx)(nativeProps.className, navListStyles),
407
+ ref: menuRef,
408
+ style: locationStyles
409
+ }
410
+ ) });
411
+ }
412
+
413
+ // src/components/NavMenuLink.tsx
414
+ var import_css8 = require("@cerberus/styled-system/css");
415
+ var import_jsx_runtime8 = require("react/jsx-runtime");
416
+ function NavMenuLink(props) {
417
+ const { as, ...nativeProps } = props;
418
+ const hasAs = Boolean(as);
419
+ const AsSub = as;
420
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
421
+ "li",
422
+ {
423
+ className: (0, import_css8.css)({
424
+ w: "full"
425
+ }),
426
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
427
+ Show,
428
+ {
429
+ when: hasAs,
430
+ fallback: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
431
+ "a",
432
+ {
433
+ ...nativeProps,
434
+ className: (0, import_css8.cx)(
435
+ nativeProps.className,
436
+ (0, import_css8.css)({
437
+ color: "action.navigation.initial",
438
+ textStyle: "link",
439
+ _hover: {
440
+ color: "action.navigation.hover"
441
+ }
442
+ })
443
+ )
444
+ }
445
+ ),
446
+ children: hasAs && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(AsSub, { ...nativeProps })
447
+ }
448
+ )
449
+ }
450
+ );
451
+ }
452
+
453
+ // src/components/Accordion.tsx
454
+ var import_react6 = require("@ark-ui/react");
455
+ var import_css9 = require("@cerberus/styled-system/css");
456
+ var import_recipes5 = require("@cerberus/styled-system/recipes");
457
+ var import_jsx_runtime9 = require("react/jsx-runtime");
458
+ function Accordion(props) {
459
+ const { size, className, ...rootProps } = props;
460
+ const styles = (0, import_recipes5.accordion)({ size });
461
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
462
+ import_react6.Accordion.Root,
463
+ {
464
+ collapsible: true,
465
+ className: (0, import_css9.cx)(className, styles.root),
466
+ ...rootProps
467
+ }
468
+ );
469
+ }
470
+ function AccordionItem(props) {
471
+ const { size, ...itemProps } = props;
472
+ const styles = (0, import_recipes5.accordion)({ size });
473
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
474
+ import_react6.Accordion.Item,
475
+ {
476
+ ...itemProps,
477
+ className: (0, import_css9.cx)(itemProps.className, styles.item)
478
+ }
479
+ );
480
+ }
481
+ function AccordionItemTrigger(props) {
482
+ const { size, ...triggerProps } = props;
483
+ const styles = (0, import_recipes5.accordion)({ size });
484
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
485
+ import_react6.Accordion.ItemTrigger,
486
+ {
487
+ ...triggerProps,
488
+ className: (0, import_css9.cx)(triggerProps.className, styles.itemTrigger)
489
+ }
490
+ );
491
+ }
492
+ function AccordionItemContent(props) {
493
+ const { size, ...contentProps } = props;
494
+ const styles = (0, import_recipes5.accordion)({ size });
495
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
496
+ import_react6.Accordion.ItemContent,
497
+ {
498
+ ...contentProps,
499
+ className: (0, import_css9.cx)(contentProps.className, styles.itemContent)
500
+ }
501
+ );
502
+ }
503
+
504
+ // src/components/Accordion.client.tsx
505
+ var import_react8 = require("@ark-ui/react");
506
+ var import_css10 = require("@cerberus/styled-system/css");
507
+ var import_recipes6 = require("@cerberus/styled-system/recipes");
508
+
509
+ // src/context/cerberus.tsx
510
+ var import_react7 = require("react");
511
+ var import_jsx_runtime10 = require("react/jsx-runtime");
512
+ var CerberusContext = (0, import_react7.createContext)(null);
513
+ function CerberusProvider(props) {
514
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(CerberusContext.Provider, { value: props.config, children: props.children });
515
+ }
516
+ function useCerberusContext() {
517
+ const context = (0, import_react7.useContext)(CerberusContext);
518
+ if (!context) {
519
+ throw new Error("useCerberus must be used within a CerberusProvider");
520
+ }
521
+ return context;
522
+ }
523
+
524
+ // src/components/Accordion.client.tsx
525
+ var import_jsx_runtime11 = require("react/jsx-runtime");
526
+ function AccordionItemIndicator(props) {
527
+ const { size, ...indicatorProps } = props;
528
+ const styles = (0, import_recipes6.accordion)({ size });
529
+ const iconSize = size === "sm" ? 16 : "24";
530
+ const { icons } = useCerberusContext();
531
+ const ChevronDown = icons.accordionIndicator;
532
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
533
+ import_react8.Accordion.ItemIndicator,
534
+ {
535
+ ...indicatorProps,
536
+ className: (0, import_css10.cx)(indicatorProps.className, styles.itemIndicator),
537
+ children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ChevronDown, { size: iconSize })
538
+ }
539
+ );
540
+ }
541
+
542
+ // src/components/AccordionItemGroup.tsx
543
+ var import_css11 = require("@cerberus/styled-system/css");
544
+ var import_jsx_runtime12 = require("react/jsx-runtime");
545
+ function AccordionItemGroup(props) {
546
+ const {
547
+ size,
548
+ heading,
549
+ children,
550
+ indicatorPosition = "end",
551
+ ...itemProps
552
+ } = props;
553
+ const triggerStyles = indicatorPosition === "start" ? {
554
+ gap: "md",
555
+ justifyContent: "flex-start"
556
+ } : void 0;
557
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(AccordionItem, { ...itemProps, children: [
558
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(AccordionItemTrigger, { className: (0, import_css11.css)(triggerStyles), size, children: [
559
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Show, { when: indicatorPosition === "start", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(AccordionItemIndicator, { size }) }),
560
+ heading,
561
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Show, { when: indicatorPosition === "end", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(AccordionItemIndicator, { size }) })
562
+ ] }),
563
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(AccordionItemContent, { size, children })
564
+ ] });
565
+ }
566
+
567
+ // src/components/Admonition.tsx
568
+ var import_recipes8 = require("@cerberus/styled-system/recipes");
569
+ var import_css13 = require("@cerberus/styled-system/css");
570
+ var import_patterns4 = require("@cerberus/styled-system/patterns");
571
+
572
+ // src/components/Avatar.tsx
573
+ var import_css12 = require("@cerberus/styled-system/css");
574
+ var import_patterns3 = require("@cerberus/styled-system/patterns");
575
+ var import_recipes7 = require("@cerberus/styled-system/recipes");
576
+ var import_jsx_runtime13 = require("react/jsx-runtime");
577
+ function Avatar(props) {
578
+ const {
579
+ ariaLabel,
580
+ as,
581
+ gradient,
582
+ size,
583
+ src,
584
+ width,
449
585
  height,
450
586
  icon,
451
587
  ...nativeProps
452
588
  } = props;
453
- const { avatar: AvatarIcon } = $cerberusIcons;
589
+ const { icons } = useCerberusContext();
590
+ const { avatar: AvatarIcon } = icons;
454
591
  const initials = (ariaLabel || "").split(" ").map((word) => word[0]).join("").slice(0, 2);
455
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
592
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
456
593
  "div",
457
594
  {
458
595
  ...nativeProps,
459
- className: (0, import_css3.cx)(
596
+ className: (0, import_css12.cx)(
460
597
  nativeProps.className,
461
- (0, import_recipes2.avatar)({ gradient, size }),
462
- (0, import_patterns.circle)()
598
+ (0, import_recipes7.avatar)({ gradient, size }),
599
+ (0, import_patterns3.circle)()
463
600
  ),
464
- children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
601
+ children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
465
602
  Show,
466
603
  {
467
604
  when: Boolean(src) || Boolean(as),
468
- fallback: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
605
+ fallback: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
469
606
  Show,
470
607
  {
471
608
  when: Boolean(initials),
472
- fallback: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
609
+ fallback: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
473
610
  Show,
474
611
  {
475
612
  when: Boolean(icon),
476
- fallback: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
613
+ fallback: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
477
614
  AvatarIcon,
478
615
  {
479
616
  size: iconSizeMap[size]
@@ -485,15 +622,15 @@ function Avatar(props) {
485
622
  children: initials
486
623
  }
487
624
  ),
488
- children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
625
+ children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
489
626
  Show,
490
627
  {
491
628
  when: Boolean(as),
492
- fallback: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
629
+ fallback: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
493
630
  "img",
494
631
  {
495
632
  alt: props.ariaLabel,
496
- className: (0, import_css3.css)({
633
+ className: (0, import_css12.css)({
497
634
  h: "full",
498
635
  objectFit: "cover",
499
636
  w: "full"
@@ -524,114 +661,68 @@ var iconSizeMap = {
524
661
  "4xl": 32
525
662
  };
526
663
 
527
- // src/components/Admonition.tsx
528
- var import_jsx_runtime6 = require("react/jsx-runtime");
529
- function Admonition(props) {
530
- const { children, palette = "page", usage, icon, ...nativeProps } = props;
531
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
532
- "aside",
533
- {
534
- ...nativeProps,
535
- className: (0, import_css4.cx)(
536
- nativeProps.className,
537
- (0, import_patterns2.hstack)({
538
- gap: "md",
539
- w: "full"
540
- }),
541
- (0, import_recipes3.admonition)({ palette, usage }).root
542
- ),
543
- children: [
544
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Show, { when: Boolean(icon), fallback: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(MatchAvatar, { palette }), children: icon }),
545
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { children })
546
- ]
547
- }
548
- );
549
- }
550
- function AdmonitionHeading(props) {
551
- const { palette, usage, ...nativeProps } = props;
552
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
553
- "p",
554
- {
555
- ...nativeProps,
556
- className: (0, import_css4.cx)(
557
- nativeProps.className,
558
- (0, import_recipes3.admonition)({ palette, usage }).heading
559
- )
560
- }
561
- );
562
- }
563
- function AdmonitionDescription(props) {
564
- const { palette, usage, ...nativeProps } = props;
565
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
566
- "p",
567
- {
568
- ...nativeProps,
569
- className: (0, import_css4.cx)(
570
- nativeProps.className,
571
- (0, import_recipes3.admonition)({ palette, usage }).description
572
- )
573
- }
574
- );
575
- }
664
+ // src/components/Admonition.client.tsx
665
+ var import_jsx_runtime14 = require("react/jsx-runtime");
576
666
  function MatchAvatar(props) {
667
+ const { icons } = useCerberusContext();
577
668
  const {
578
669
  infoNotification: InfoIcon,
579
670
  successNotification: SuccessIcon,
580
671
  warningNotification: WarningIcon,
581
672
  dangerNotification: DangerIcon
582
- } = $cerberusIcons;
673
+ } = icons;
583
674
  switch (props.palette) {
584
675
  case "page":
585
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
676
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
586
677
  Avatar,
587
678
  {
588
679
  gradient: "charon-light",
589
680
  ariaLabel: "",
590
- icon: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(InfoIcon, {}),
681
+ icon: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(InfoIcon, {}),
591
682
  size: "sm",
592
683
  src: ""
593
684
  }
594
685
  );
595
686
  case "info":
596
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
687
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
597
688
  Avatar,
598
689
  {
599
690
  gradient: "amphiaraus-dark",
600
691
  ariaLabel: "",
601
- icon: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(InfoIcon, {}),
692
+ icon: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(InfoIcon, {}),
602
693
  size: "sm",
603
694
  src: ""
604
695
  }
605
696
  );
606
697
  case "success":
607
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
698
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
608
699
  Avatar,
609
700
  {
610
701
  gradient: "thanatos-dark",
611
702
  ariaLabel: "",
612
- icon: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SuccessIcon, {}),
703
+ icon: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(SuccessIcon, {}),
613
704
  size: "sm",
614
705
  src: ""
615
706
  }
616
707
  );
617
708
  case "warning":
618
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
709
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
619
710
  Avatar,
620
711
  {
621
712
  gradient: "asphodel-light",
622
713
  ariaLabel: "",
623
- icon: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(WarningIcon, {}),
714
+ icon: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(WarningIcon, {}),
624
715
  size: "sm",
625
716
  src: ""
626
717
  }
627
718
  );
628
719
  case "danger":
629
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
720
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
630
721
  Avatar,
631
722
  {
632
723
  gradient: "hades-light",
633
724
  ariaLabel: "",
634
- icon: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DangerIcon, {}),
725
+ icon: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DangerIcon, {}),
635
726
  size: "sm",
636
727
  src: ""
637
728
  }
@@ -641,19 +732,69 @@ function MatchAvatar(props) {
641
732
  }
642
733
  }
643
734
 
735
+ // src/components/Admonition.tsx
736
+ var import_jsx_runtime15 = require("react/jsx-runtime");
737
+ function Admonition(props) {
738
+ const { children, palette = "page", usage, icon, ...nativeProps } = props;
739
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
740
+ "aside",
741
+ {
742
+ ...nativeProps,
743
+ className: (0, import_css13.cx)(
744
+ nativeProps.className,
745
+ (0, import_patterns4.hstack)({
746
+ gap: "md",
747
+ w: "full"
748
+ }),
749
+ (0, import_recipes8.admonition)({ palette, usage }).root
750
+ ),
751
+ children: [
752
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Show, { when: Boolean(icon), fallback: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(MatchAvatar, { palette }), children: icon }),
753
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { children })
754
+ ]
755
+ }
756
+ );
757
+ }
758
+ function AdmonitionHeading(props) {
759
+ const { palette, usage, ...nativeProps } = props;
760
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
761
+ "p",
762
+ {
763
+ ...nativeProps,
764
+ className: (0, import_css13.cx)(
765
+ nativeProps.className,
766
+ (0, import_recipes8.admonition)({ palette, usage }).heading
767
+ )
768
+ }
769
+ );
770
+ }
771
+ function AdmonitionDescription(props) {
772
+ const { palette, usage, ...nativeProps } = props;
773
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
774
+ "p",
775
+ {
776
+ ...nativeProps,
777
+ className: (0, import_css13.cx)(
778
+ nativeProps.className,
779
+ (0, import_recipes8.admonition)({ palette, usage }).description
780
+ )
781
+ }
782
+ );
783
+ }
784
+
644
785
  // src/components/Button.tsx
645
- var import_css5 = require("@cerberus/styled-system/css");
646
- var import_recipes4 = require("@cerberus/styled-system/recipes");
647
- var import_jsx_runtime7 = require("react/jsx-runtime");
786
+ var import_css14 = require("@cerberus/styled-system/css");
787
+ var import_recipes9 = require("@cerberus/styled-system/recipes");
788
+ var import_jsx_runtime16 = require("react/jsx-runtime");
648
789
  function Button(props) {
649
790
  const { palette, usage, shape, ...nativeProps } = props;
650
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
791
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
651
792
  "button",
652
793
  {
653
794
  ...nativeProps,
654
- className: (0, import_css5.cx)(
795
+ className: (0, import_css14.cx)(
655
796
  nativeProps.className,
656
- (0, import_recipes4.button)({
797
+ (0, import_recipes9.button)({
657
798
  palette,
658
799
  usage,
659
800
  shape
@@ -664,16 +805,16 @@ function Button(props) {
664
805
  }
665
806
 
666
807
  // src/components/Checkbox.tsx
667
- var import_recipes5 = require("@cerberus/styled-system/recipes");
668
- var import_patterns3 = require("@cerberus/styled-system/patterns");
669
- var import_css6 = require("@cerberus/styled-system/css");
808
+ var import_recipes10 = require("@cerberus/styled-system/recipes");
809
+ var import_patterns5 = require("@cerberus/styled-system/patterns");
810
+ var import_css15 = require("@cerberus/styled-system/css");
670
811
 
671
812
  // src/context/field.tsx
672
- var import_react3 = require("react");
673
- var import_jsx_runtime8 = require("react/jsx-runtime");
674
- var FieldContext = (0, import_react3.createContext)(null);
813
+ var import_react9 = require("react");
814
+ var import_jsx_runtime17 = require("react/jsx-runtime");
815
+ var FieldContext = (0, import_react9.createContext)(null);
675
816
  function Field(props) {
676
- const value = (0, import_react3.useMemo)(
817
+ const value = (0, import_react9.useMemo)(
677
818
  () => ({
678
819
  disabled: props.disabled,
679
820
  readOnly: props.readOnly,
@@ -682,10 +823,10 @@ function Field(props) {
682
823
  }),
683
824
  [props.disabled, props.readOnly, props.required, props.invalid]
684
825
  );
685
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(FieldContext.Provider, { value, children: props.children });
826
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(FieldContext.Provider, { value, children: props.children });
686
827
  }
687
828
  function useFieldContext() {
688
- const context = (0, import_react3.useContext)(FieldContext);
829
+ const context = (0, import_react9.useContext)(FieldContext);
689
830
  if (!context) {
690
831
  throw new Error("useFieldContext must be used within a Field Provider.");
691
832
  }
@@ -693,24 +834,31 @@ function useFieldContext() {
693
834
  }
694
835
 
695
836
  // src/components/Checkbox.tsx
696
- var import_jsx_runtime9 = require("react/jsx-runtime");
837
+ var import_jsx_runtime18 = require("react/jsx-runtime");
697
838
  function Checkbox(props) {
698
839
  const { describedBy, size, checked, mixed, ...nativeProps } = props;
699
840
  const { invalid, ...fieldStates } = useFieldContext();
700
- const styles = (0, import_recipes5.checkbox)({ size });
701
- const { checkbox: CheckIcon, indeterminate: IndeterminateIcon2 } = $cerberusIcons;
702
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
841
+ const styles = (0, import_recipes10.checkbox)({ size });
842
+ const { icons } = useCerberusContext();
843
+ const { checkbox: CheckIcon, indeterminate: IndeterminateIcon2 } = icons;
844
+ if (!CheckIcon) {
845
+ throw new Error("The CerberusProvider is missing the checkbox icon.");
846
+ }
847
+ if (!IndeterminateIcon2) {
848
+ throw new Error("The CerberusProvider is missing the indeterminate icon.");
849
+ }
850
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
703
851
  "div",
704
852
  {
705
- className: (0, import_css6.cx)(
853
+ className: (0, import_css15.cx)(
706
854
  styles.root,
707
- (0, import_patterns3.vstack)({
855
+ (0, import_patterns5.vstack)({
708
856
  gap: "0",
709
857
  justify: "center"
710
858
  })
711
859
  ),
712
860
  children: [
713
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
861
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
714
862
  "input",
715
863
  {
716
864
  ...nativeProps,
@@ -718,28 +866,28 @@ function Checkbox(props) {
718
866
  ...describedBy && { "aria-describedby": describedBy },
719
867
  ...invalid && { "aria-invalid": true },
720
868
  ...mixed && { "aria-checked": "mixed" },
721
- className: (0, import_css6.cx)("peer", nativeProps.className, styles.input),
869
+ className: (0, import_css15.cx)("peer", nativeProps.className, styles.input),
722
870
  type: "checkbox"
723
871
  }
724
872
  ),
725
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Show, { when: checked && !mixed, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: styles.icon, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(CheckIcon, {}) }) }),
726
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Show, { when: mixed, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: styles.icon, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(IndeterminateIcon2, {}) }) })
873
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Show, { when: checked && !mixed, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: styles.icon, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(CheckIcon, {}) }) }),
874
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Show, { when: mixed, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: styles.icon, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(IndeterminateIcon2, {}) }) })
727
875
  ]
728
876
  }
729
877
  );
730
878
  }
731
879
 
732
880
  // src/components/CircularProgress.tsx
733
- var import_patterns4 = require("@cerberus/styled-system/patterns");
734
- var import_css7 = require("@cerberus/styled-system/css");
735
- var import_jsx_runtime10 = require("react/jsx-runtime");
881
+ var import_patterns6 = require("@cerberus/styled-system/patterns");
882
+ var import_css16 = require("@cerberus/styled-system/css");
883
+ var import_jsx_runtime19 = require("react/jsx-runtime");
736
884
  function CircularProgress(props) {
737
885
  const strokeW = 14;
738
886
  const radius = `calc(50% * (1 - ${strokeW}/100))`;
739
887
  const status = props.syntax ?? "Done";
740
888
  const now = props.now >= 100 ? 100 : props.now;
741
889
  const bgStyle = props.bgStyle ?? "filled";
742
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
890
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
743
891
  "div",
744
892
  {
745
893
  id: props.id,
@@ -747,18 +895,18 @@ function CircularProgress(props) {
747
895
  "aria-valuemin": 0,
748
896
  "aria-valuemax": 100,
749
897
  "aria-valuenow": now,
750
- className: (0, import_patterns4.cq)({
898
+ className: (0, import_patterns6.cq)({
751
899
  alignSelf: "stretch",
752
900
  flex: 1,
753
901
  m: "4px",
754
902
  position: "relative"
755
903
  }),
756
904
  role: "progressbar",
757
- children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
905
+ children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
758
906
  "svg",
759
907
  {
760
908
  "data-complete": now === 100,
761
- className: (0, import_css7.css)({
909
+ className: (0, import_css16.css)({
762
910
  display: "block",
763
911
  rounded: "full",
764
912
  transition: "all 0.5s ease"
@@ -769,17 +917,17 @@ function CircularProgress(props) {
769
917
  viewBox: "0 0 100 100",
770
918
  xmlns: "http://www.w3.org/2000/svg",
771
919
  children: [
772
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("title", { children: props.title }),
773
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("desc", { children: `${now}% ${status}` }),
774
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("linearGradient", { id: "gradient", children: [
775
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
920
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("title", { children: props.title }),
921
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("desc", { children: `${now}% ${status}` }),
922
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("linearGradient", { id: "gradient", children: [
923
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
776
924
  "stop",
777
925
  {
778
926
  offset: "0%",
779
927
  stopColor: "var(--cerberus-colors-data-viz-progress-start)"
780
928
  }
781
929
  ),
782
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
930
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
783
931
  "stop",
784
932
  {
785
933
  offset: "100%",
@@ -787,10 +935,10 @@ function CircularProgress(props) {
787
935
  }
788
936
  )
789
937
  ] }) }),
790
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Show, { when: bgStyle === "filled", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
938
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Show, { when: bgStyle === "filled", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
791
939
  "circle",
792
940
  {
793
- className: (0, import_css7.css)({
941
+ className: (0, import_css16.css)({
794
942
  fill: "page.surface.initial"
795
943
  }),
796
944
  cx: "50%",
@@ -799,10 +947,10 @@ function CircularProgress(props) {
799
947
  pathLength: "100"
800
948
  }
801
949
  ) }),
802
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
950
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
803
951
  "circle",
804
952
  {
805
- className: (0, import_css7.css)({
953
+ className: (0, import_css16.css)({
806
954
  stroke: "page.bg.100"
807
955
  }),
808
956
  cx: "50%",
@@ -811,11 +959,11 @@ function CircularProgress(props) {
811
959
  pathLength: "100"
812
960
  }
813
961
  ),
814
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
962
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
815
963
  "circle",
816
964
  {
817
965
  "data-complete": now === 100,
818
- className: (0, import_css7.css)({
966
+ className: (0, import_css16.css)({
819
967
  stroke: "url(#gradient)",
820
968
  transition: "stroke-dashoffset, stroke 0.5s ease",
821
969
  _isComplete: {
@@ -832,11 +980,11 @@ function CircularProgress(props) {
832
980
  transform: "rotate(-90 50 50)"
833
981
  }
834
982
  ),
835
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("g", { children: [
836
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
983
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("g", { children: [
984
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
837
985
  "text",
838
986
  {
839
- className: (0, import_css7.css)({
987
+ className: (0, import_css16.css)({
840
988
  fill: "page.text.initial",
841
989
  fontFamily: "mono",
842
990
  textStyle: "1.25rem"
@@ -851,10 +999,10 @@ function CircularProgress(props) {
851
999
  ]
852
1000
  }
853
1001
  ),
854
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1002
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
855
1003
  "text",
856
1004
  {
857
- className: (0, import_css7.css)({
1005
+ className: (0, import_css16.css)({
858
1006
  fill: "page.text.100",
859
1007
  fontSize: "0.5rem",
860
1008
  fontWeight: 600
@@ -875,155 +1023,116 @@ function CircularProgress(props) {
875
1023
  }
876
1024
 
877
1025
  // src/components/DatePicker.client.tsx
878
- var import_react6 = require("@ark-ui/react");
1026
+ var import_react12 = require("@ark-ui/react");
879
1027
 
880
1028
  // src/components/Portal.tsx
881
- var import_react4 = require("@ark-ui/react");
882
- var Portal = import_react4.Portal;
1029
+ var import_react10 = require("@ark-ui/react");
1030
+ var Portal = import_react10.Portal;
883
1031
 
884
1032
  // src/components/DatePicker.client.tsx
885
- var import_recipes8 = require("@cerberus/styled-system/recipes");
886
- var import_css10 = require("@cerberus/styled-system/css");
887
-
888
- // src/components/DatePicker.server.tsx
889
- var import_react5 = require("@ark-ui/react");
890
- var import_css9 = require("@cerberus/styled-system/css");
891
- var import_recipes7 = require("@cerberus/styled-system/recipes");
892
-
893
- // src/components/IconButton.tsx
894
- var import_css8 = require("@cerberus/styled-system/css");
895
- var import_recipes6 = require("@cerberus/styled-system/recipes");
896
- var import_jsx_runtime11 = require("react/jsx-runtime");
897
- function IconButton(props) {
898
- const { ariaLabel, palette, usage, size, ...nativeProps } = props;
899
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
900
- "button",
901
- {
902
- ...nativeProps,
903
- "aria-label": ariaLabel ?? "Icon Button",
904
- className: (0, import_css8.cx)(
905
- nativeProps.className,
906
- (0, import_recipes6.iconButton)({
907
- palette,
908
- usage,
909
- size
910
- })
911
- )
912
- }
913
- );
914
- }
1033
+ var import_recipes13 = require("@cerberus/styled-system/recipes");
1034
+ var import_css19 = require("@cerberus/styled-system/css");
915
1035
 
916
1036
  // src/components/DatePicker.server.tsx
917
- var import_jsx_runtime12 = require("react/jsx-runtime");
918
- var datePickerStyles = (0, import_recipes7.datePicker)();
1037
+ var import_react11 = require("@ark-ui/react");
1038
+ var import_css17 = require("@cerberus/styled-system/css");
1039
+ var import_recipes11 = require("@cerberus/styled-system/recipes");
1040
+ var import_jsx_runtime20 = require("react/jsx-runtime");
1041
+ var datePickerStyles = (0, import_recipes11.datePicker)();
919
1042
  function DatePickerLabel(props) {
920
1043
  const { className, ...arkProps } = props;
921
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
922
- import_react5.DatePicker.Label,
1044
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1045
+ import_react11.DatePicker.Label,
923
1046
  {
924
1047
  ...arkProps,
925
- className: (0, import_css9.cx)(
1048
+ className: (0, import_css17.cx)(
926
1049
  className,
927
- (0, import_recipes7.label)({
1050
+ (0, import_recipes11.label)({
928
1051
  size: "sm"
929
1052
  })
930
1053
  )
931
1054
  }
932
1055
  );
933
1056
  }
934
- function DatePickerTrigger(props) {
935
- const { calendar: CalendarIcon } = $cerberusIcons;
936
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
937
- import_react5.DatePicker.Trigger,
938
- {
939
- ...props,
940
- className: (0, import_css9.cx)(
941
- props.className,
942
- (0, import_recipes7.iconButton)({
943
- size: "sm",
944
- usage: "ghost"
945
- }),
946
- datePickerStyles.trigger
947
- ),
948
- children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(CalendarIcon, {})
949
- }
950
- );
951
- }
952
1057
  function DatePickerViewControl(props) {
953
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
954
- import_react5.DatePicker.Control,
1058
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1059
+ import_react11.DatePicker.Control,
955
1060
  {
956
1061
  ...props,
957
- className: (0, import_css9.cx)(props.className, datePickerStyles.viewControl)
1062
+ className: (0, import_css17.cx)(props.className, datePickerStyles.viewControl)
958
1063
  }
959
1064
  );
960
1065
  }
961
- function DatePickerViewControlGroup(props) {
962
- const { calendarPrev: PrevIcon, calendarNext: NextIcon } = $cerberusIcons;
963
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(DatePickerViewControl, { ...props, children: [
964
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react5.DatePicker.PrevTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(IconButton, { ariaLabel: "Previous", size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(PrevIcon, {}) }) }),
965
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react5.DatePicker.ViewTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
966
- Button,
967
- {
968
- className: (0, import_css9.css)({
969
- h: "2rem",
970
- paddingInline: "md"
971
- }),
972
- shape: "rounded",
973
- size: "sm",
974
- usage: "ghost",
975
- children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react5.DatePicker.RangeText, {})
976
- }
977
- ) }),
978
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react5.DatePicker.NextTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(IconButton, { ariaLabel: "Next", size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(NextIcon, {}) }) })
979
- ] });
980
- }
981
1066
  function DatePickerTable(props) {
982
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
983
- import_react5.DatePicker.Table,
1067
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1068
+ import_react11.DatePicker.Table,
984
1069
  {
985
1070
  ...props,
986
- className: (0, import_css9.cx)(props.className, datePickerStyles.table)
1071
+ className: (0, import_css17.cx)(props.className, datePickerStyles.table)
987
1072
  }
988
1073
  );
989
1074
  }
990
1075
  function DatePickerTableHeader(props) {
991
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
992
- import_react5.DatePicker.TableHeader,
1076
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1077
+ import_react11.DatePicker.TableHeader,
993
1078
  {
994
1079
  ...props,
995
- className: (0, import_css9.cx)(props.className, datePickerStyles.tableHeader)
1080
+ className: (0, import_css17.cx)(props.className, datePickerStyles.tableHeader)
996
1081
  }
997
1082
  );
998
1083
  }
999
1084
  function DatePickerTableCell(props) {
1000
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1001
- import_react5.DatePicker.TableCell,
1085
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1086
+ import_react11.DatePicker.TableCell,
1002
1087
  {
1003
1088
  ...props,
1004
- className: (0, import_css9.cx)(props.className, datePickerStyles.tableCell)
1089
+ className: (0, import_css17.cx)(props.className, datePickerStyles.tableCell)
1005
1090
  }
1006
1091
  );
1007
1092
  }
1008
1093
  function DatePickerTableCellTrigger(props) {
1009
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1010
- import_react5.DatePicker.TableCellTrigger,
1094
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1095
+ import_react11.DatePicker.TableCellTrigger,
1011
1096
  {
1012
1097
  ...props,
1013
- className: (0, import_css9.cx)(props.className, datePickerStyles.tableCellTrigger)
1098
+ className: (0, import_css17.cx)(props.className, datePickerStyles.tableCellTrigger)
1099
+ }
1100
+ );
1101
+ }
1102
+ var DatePickerView = import_react11.DatePicker.View;
1103
+ var DatePickerContext = import_react11.DatePicker.Context;
1104
+
1105
+ // src/components/IconButton.tsx
1106
+ var import_css18 = require("@cerberus/styled-system/css");
1107
+ var import_recipes12 = require("@cerberus/styled-system/recipes");
1108
+ var import_jsx_runtime21 = require("react/jsx-runtime");
1109
+ function IconButton(props) {
1110
+ const { ariaLabel, palette, usage, size, ...nativeProps } = props;
1111
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1112
+ "button",
1113
+ {
1114
+ ...nativeProps,
1115
+ "aria-label": ariaLabel ?? "Icon Button",
1116
+ className: (0, import_css18.cx)(
1117
+ nativeProps.className,
1118
+ (0, import_recipes12.iconButton)({
1119
+ palette,
1120
+ usage,
1121
+ size
1122
+ })
1123
+ )
1014
1124
  }
1015
1125
  );
1016
1126
  }
1017
- var DatePickerView = import_react5.DatePicker.View;
1018
- var DatePickerContext = import_react5.DatePicker.Context;
1019
1127
 
1020
1128
  // src/components/DatePicker.client.tsx
1021
- var import_jsx_runtime13 = require("react/jsx-runtime");
1022
- var datePickerStyles2 = (0, import_recipes8.datePicker)();
1129
+ var import_react13 = require("react");
1130
+ var import_jsx_runtime22 = require("react/jsx-runtime");
1131
+ var datePickerStyles2 = (0, import_recipes13.datePicker)();
1023
1132
  function DatePicker(props) {
1024
1133
  const states = useFieldContext();
1025
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1026
- import_react6.DatePicker.Root,
1134
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1135
+ import_react12.DatePicker.Root,
1027
1136
  {
1028
1137
  ...props,
1029
1138
  ...states,
@@ -1033,17 +1142,57 @@ function DatePicker(props) {
1033
1142
  }
1034
1143
  );
1035
1144
  }
1145
+ function DatePickerViewControlGroup(props) {
1146
+ const { icons } = useCerberusContext();
1147
+ const { calendarPrev: PrevIcon, calendarNext: NextIcon } = icons;
1148
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(DatePickerViewControl, { ...props, children: [
1149
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react12.DatePicker.PrevTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(IconButton, { ariaLabel: "Previous", size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(PrevIcon, {}) }) }),
1150
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react12.DatePicker.ViewTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1151
+ Button,
1152
+ {
1153
+ className: (0, import_css19.css)({
1154
+ h: "2rem",
1155
+ paddingInline: "md"
1156
+ }),
1157
+ shape: "rounded",
1158
+ size: "sm",
1159
+ usage: "ghost",
1160
+ children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react12.DatePicker.RangeText, {})
1161
+ }
1162
+ ) }),
1163
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react12.DatePicker.NextTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(IconButton, { ariaLabel: "Next", size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(NextIcon, {}) }) })
1164
+ ] });
1165
+ }
1166
+ function DatePickerTrigger(props) {
1167
+ const { icons } = useCerberusContext();
1168
+ const { calendar: CalendarIcon } = icons;
1169
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1170
+ import_react12.DatePicker.Trigger,
1171
+ {
1172
+ ...props,
1173
+ className: (0, import_css19.cx)(
1174
+ props.className,
1175
+ (0, import_recipes13.iconButton)({
1176
+ size: "sm",
1177
+ usage: "ghost"
1178
+ }),
1179
+ datePickerStyles2.trigger
1180
+ ),
1181
+ children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(CalendarIcon, {})
1182
+ }
1183
+ );
1184
+ }
1036
1185
  function DatePickerInput(props) {
1037
1186
  const { invalid, ...fieldStates } = useFieldContext();
1038
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react6.DatePicker.Control, { className: datePickerStyles2.control, children: [
1039
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DatePickerTrigger, {}),
1040
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1041
- import_react6.DatePicker.Input,
1187
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_react12.DatePicker.Control, { className: datePickerStyles2.control, children: [
1188
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(DatePickerTrigger, {}),
1189
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1190
+ import_react12.DatePicker.Input,
1042
1191
  {
1043
1192
  ...props,
1044
1193
  ...fieldStates,
1045
1194
  ...invalid && { "aria-invalid": true },
1046
- className: (0, import_css10.cx)(props.className, datePickerStyles2.input),
1195
+ className: (0, import_css19.cx)(props.className, datePickerStyles2.input),
1047
1196
  placeholder: props.placeholder ?? "DD MMM YYYY",
1048
1197
  maxLength: 11
1049
1198
  }
@@ -1052,30 +1201,35 @@ function DatePickerInput(props) {
1052
1201
  }
1053
1202
  function RangePickerInput(props) {
1054
1203
  const { invalid, ...fieldStates } = useFieldContext();
1055
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react6.DatePicker.Control, { "data-range": true, className: datePickerStyles2.control, children: [
1056
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DatePickerTrigger, {}),
1057
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1058
- import_react6.DatePicker.Input,
1204
+ const { defaultValue, ...nativeProps } = props;
1205
+ const startDate = (0, import_react13.useMemo)(() => defaultValue == null ? void 0 : defaultValue[0], [defaultValue]);
1206
+ const endDate = (0, import_react13.useMemo)(() => defaultValue == null ? void 0 : defaultValue[1], [defaultValue]);
1207
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_react12.DatePicker.Control, { "data-range": true, className: datePickerStyles2.control, children: [
1208
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(DatePickerTrigger, {}),
1209
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1210
+ import_react12.DatePicker.Input,
1059
1211
  {
1060
- ...props,
1212
+ ...nativeProps,
1061
1213
  ...fieldStates,
1062
1214
  ...invalid && { "aria-invalid": true },
1063
1215
  "data-range-input": true,
1064
- className: (0, import_css10.cx)(props.className, datePickerStyles2.input),
1216
+ defaultValue: startDate,
1217
+ className: (0, import_css19.cx)(props.className, datePickerStyles2.input),
1065
1218
  placeholder: props.placeholder ?? "DD MMM YYYY",
1066
1219
  maxLength: 11,
1067
1220
  index: 0
1068
1221
  }
1069
1222
  ),
1070
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1071
- import_react6.DatePicker.Input,
1223
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1224
+ import_react12.DatePicker.Input,
1072
1225
  {
1073
- ...props,
1226
+ ...nativeProps,
1074
1227
  ...fieldStates,
1075
1228
  ...invalid && { "aria-invalid": true },
1076
1229
  "data-range-input": true,
1230
+ defaultValue: endDate,
1077
1231
  "data-range-end-input": true,
1078
- className: (0, import_css10.cx)(props.className, datePickerStyles2.input),
1232
+ className: (0, import_css19.cx)(props.className, datePickerStyles2.input),
1079
1233
  placeholder: props.placeholder ?? "DD MMM YYYY",
1080
1234
  maxLength: 11,
1081
1235
  index: 1
@@ -1084,12 +1238,12 @@ function RangePickerInput(props) {
1084
1238
  ] });
1085
1239
  }
1086
1240
  function DatePickerContent(props) {
1087
- const { children, ...contentProps } = props;
1088
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react6.DatePicker.Positioner, { className: datePickerStyles2.positioner, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1089
- import_react6.DatePicker.Content,
1241
+ const { children, withModal, ...contentProps } = props;
1242
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Portal, { disabled: withModal ?? false, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react12.DatePicker.Positioner, { className: datePickerStyles2.positioner, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1243
+ import_react12.DatePicker.Content,
1090
1244
  {
1091
1245
  ...contentProps,
1092
- className: (0, import_css10.cx)(contentProps.className, datePickerStyles2.content),
1246
+ className: (0, import_css19.cx)(contentProps.className, datePickerStyles2.content),
1093
1247
  children
1094
1248
  }
1095
1249
  ) }) });
@@ -1111,11 +1265,11 @@ function DatePickerDayView(props) {
1111
1265
  if (isPastDay(date)) return "past";
1112
1266
  return "future";
1113
1267
  }
1114
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DatePickerView, { ...props, view: "day", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DatePickerContext, { children: (datePicker3) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
1115
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DatePickerViewControlGroup, {}),
1116
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(DatePickerTable, { children: [
1117
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react6.DatePicker.TableHead, { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react6.DatePicker.TableRow, { children: datePicker3.weekDays.map((weekDay, id) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DatePickerTableHeader, { children: weekDay.narrow }, id)) }) }),
1118
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react6.DatePicker.TableBody, { children: datePicker3.weeks.map((week, id) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react6.DatePicker.TableRow, { children: week.map((day, id2) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DatePickerTableCell, { value: day, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1268
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(DatePickerView, { ...props, view: "day", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(DatePickerContext, { children: (datePicker3) => /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
1269
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(DatePickerViewControlGroup, {}),
1270
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(DatePickerTable, { children: [
1271
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react12.DatePicker.TableHead, { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react12.DatePicker.TableRow, { children: datePicker3.weekDays.map((weekDay, id) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(DatePickerTableHeader, { children: weekDay.narrow }, id)) }) }),
1272
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react12.DatePicker.TableBody, { children: datePicker3.weeks.map((week, id) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react12.DatePicker.TableRow, { children: week.map((day, id2) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(DatePickerTableCell, { value: day, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1119
1273
  DatePickerTableCellTrigger,
1120
1274
  {
1121
1275
  "data-date": getDayValue(day),
@@ -1126,39 +1280,104 @@ function DatePickerDayView(props) {
1126
1280
  ] }) }) });
1127
1281
  }
1128
1282
  function DatePickerMonthView(props) {
1129
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react6.DatePicker.View, { ...props, view: "month", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react6.DatePicker.Context, { children: (datePicker3) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
1130
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DatePickerViewControlGroup, {}),
1131
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DatePickerTable, { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react6.DatePicker.TableBody, { children: datePicker3.getMonthsGrid({ columns: 4, format: "short" }).map((months, id) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react6.DatePicker.TableRow, { children: months.map((month, id2) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DatePickerTableCell, { value: month.value, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DatePickerTableCellTrigger, { children: month.label }) }, id2)) }, id)) }) })
1283
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react12.DatePicker.View, { ...props, view: "month", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react12.DatePicker.Context, { children: (datePicker3) => /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
1284
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(DatePickerViewControlGroup, {}),
1285
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(DatePickerTable, { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react12.DatePicker.TableBody, { children: datePicker3.getMonthsGrid({ columns: 4, format: "short" }).map((months, id) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react12.DatePicker.TableRow, { children: months.map((month, id2) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(DatePickerTableCell, { value: month.value, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(DatePickerTableCellTrigger, { children: month.label }) }, id2)) }, id)) }) })
1132
1286
  ] }) }) });
1133
1287
  }
1134
1288
  function DatePickerYearView(props) {
1135
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react6.DatePicker.View, { ...props, view: "year", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react6.DatePicker.Context, { children: (datePicker3) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
1136
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DatePickerViewControlGroup, {}),
1137
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DatePickerTable, { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react6.DatePicker.TableBody, { children: datePicker3.getYearsGrid({ columns: 4 }).map((years, id) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react6.DatePicker.TableRow, { children: years.map((year, id2) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DatePickerTableCell, { value: year.value, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DatePickerTableCellTrigger, { children: year.label }) }, id2)) }, id)) }) })
1289
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react12.DatePicker.View, { ...props, view: "year", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react12.DatePicker.Context, { children: (datePicker3) => /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
1290
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(DatePickerViewControlGroup, {}),
1291
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(DatePickerTable, { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react12.DatePicker.TableBody, { children: datePicker3.getYearsGrid({ columns: 4 }).map((years, id) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react12.DatePicker.TableRow, { children: years.map((year, id2) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(DatePickerTableCell, { value: year.value, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(DatePickerTableCellTrigger, { children: year.label }) }, id2)) }, id)) }) })
1138
1292
  ] }) }) });
1139
1293
  }
1140
- function DatePickerCalendar() {
1141
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(DatePickerContent, { children: [
1142
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DatePickerDayView, {}),
1143
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DatePickerMonthView, {}),
1144
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DatePickerYearView, {})
1294
+ function DatePickerCalendar(props) {
1295
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(DatePickerContent, { withModal: props.withModal, children: [
1296
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(DatePickerDayView, {}),
1297
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(DatePickerMonthView, {}),
1298
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(DatePickerYearView, {})
1145
1299
  ] });
1146
1300
  }
1147
1301
 
1302
+ // src/components/Dialog.tsx
1303
+ var import_react14 = require("@ark-ui/react");
1304
+ var import_recipes14 = require("@cerberus/styled-system/recipes");
1305
+ var import_css20 = require("@cerberus/styled-system/css");
1306
+ var import_jsx_runtime23 = require("react/jsx-runtime");
1307
+ function DialogProvider(props) {
1308
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react14.Dialog.Root, { ...props });
1309
+ }
1310
+ function Dialog(props) {
1311
+ const { size, ...contentProps } = props;
1312
+ const styles = (0, import_recipes14.dialog)({ size });
1313
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Portal, { children: [
1314
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(DialogBackdrop, { className: styles.backdrop }),
1315
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(DialogPositioner, { className: styles.positioner, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(DialogContent, { className: styles.content, ...contentProps }) })
1316
+ ] });
1317
+ }
1318
+ function DialogHeading(props) {
1319
+ const styles = (0, import_recipes14.dialog)();
1320
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react14.Dialog.Title, { ...props, className: (0, import_css20.cx)(props.className, styles.title) });
1321
+ }
1322
+ function DialogDescription(props) {
1323
+ const styles = (0, import_recipes14.dialog)();
1324
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1325
+ import_react14.Dialog.Description,
1326
+ {
1327
+ ...props,
1328
+ className: (0, import_css20.cx)(props.className, styles.description)
1329
+ }
1330
+ );
1331
+ }
1332
+ var DialogTrigger = import_react14.Dialog.Trigger;
1333
+ var DialogCloseTrigger = import_react14.Dialog.CloseTrigger;
1334
+ var DialogBackdrop = import_react14.Dialog.Backdrop;
1335
+ var DialogPositioner = import_react14.Dialog.Positioner;
1336
+ var DialogContent = import_react14.Dialog.Content;
1337
+
1338
+ // src/components/Dialog.client.tsx
1339
+ var import_react15 = require("@ark-ui/react");
1340
+ var import_recipes15 = require("@cerberus/styled-system/recipes");
1341
+ var import_css21 = require("@cerberus/styled-system/css");
1342
+ var import_jsx_runtime24 = require("react/jsx-runtime");
1343
+ function DialogCloseIconTrigger(props) {
1344
+ const { icons } = useCerberusContext();
1345
+ const { close: CloseIcon } = icons;
1346
+ const styles = (0, import_recipes15.dialog)();
1347
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1348
+ import_react15.Dialog.CloseTrigger,
1349
+ {
1350
+ ...props,
1351
+ className: (0, import_css21.cx)(props.className, styles.closeTrigger),
1352
+ asChild: true,
1353
+ children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1354
+ IconButton,
1355
+ {
1356
+ ariaLabel: "Close dialog",
1357
+ palette: "action",
1358
+ size: "lg",
1359
+ usage: "ghost",
1360
+ children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(CloseIcon, {})
1361
+ }
1362
+ )
1363
+ }
1364
+ );
1365
+ }
1366
+
1148
1367
  // src/components/Droppable.tsx
1149
1368
  var import_core = require("@dnd-kit/core");
1150
- var import_react7 = require("react");
1151
- var import_jsx_runtime14 = require("react/jsx-runtime");
1369
+ var import_react16 = require("react");
1370
+ var import_jsx_runtime25 = require("react/jsx-runtime");
1152
1371
  function Droppable(props) {
1153
1372
  const { dropped, id, disabled, data, resizeObserverConfig, ...nativeProps } = props;
1154
- const uuid = (0, import_react7.useId)();
1373
+ const uuid = (0, import_react16.useId)();
1155
1374
  const { isOver, setNodeRef } = (0, import_core.useDroppable)({
1156
1375
  data,
1157
1376
  disabled,
1158
1377
  id: id || uuid,
1159
1378
  resizeObserverConfig
1160
1379
  });
1161
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1380
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
1162
1381
  "div",
1163
1382
  {
1164
1383
  ...nativeProps,
@@ -1171,30 +1390,30 @@ function Droppable(props) {
1171
1390
  }
1172
1391
 
1173
1392
  // src/components/FieldMessage.tsx
1174
- var import_css11 = require("@cerberus/styled-system/css");
1175
- var import_recipes9 = require("@cerberus/styled-system/recipes");
1176
- var import_jsx_runtime15 = require("react/jsx-runtime");
1393
+ var import_css22 = require("@cerberus/styled-system/css");
1394
+ var import_recipes16 = require("@cerberus/styled-system/recipes");
1395
+ var import_jsx_runtime26 = require("react/jsx-runtime");
1177
1396
  function FieldMessage(props) {
1178
1397
  const { invalid } = useFieldContext();
1179
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1398
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
1180
1399
  "small",
1181
1400
  {
1182
1401
  ...props,
1183
1402
  ...invalid && { "aria-invalid": true },
1184
- className: (0, import_css11.cx)(props.className, (0, import_recipes9.fieldMessage)())
1403
+ className: (0, import_css22.cx)(props.className, (0, import_recipes16.fieldMessage)())
1185
1404
  }
1186
1405
  );
1187
1406
  }
1188
1407
 
1189
1408
  // src/context/feature-flags.tsx
1190
- var import_react8 = require("react");
1191
- var import_jsx_runtime16 = require("react/jsx-runtime");
1192
- var FeatureFlagContext = (0, import_react8.createContext)(null);
1409
+ var import_react17 = require("react");
1410
+ var import_jsx_runtime27 = require("react/jsx-runtime");
1411
+ var FeatureFlagContext = (0, import_react17.createContext)(null);
1193
1412
  function FeatureFlags(props) {
1194
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(FeatureFlagContext.Provider, { value: props.flags, children: props.children });
1413
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(FeatureFlagContext.Provider, { value: props.flags, children: props.children });
1195
1414
  }
1196
1415
  function useFeatureFlags(key) {
1197
- const context = (0, import_react8.useContext)(FeatureFlagContext);
1416
+ const context = (0, import_react17.useContext)(FeatureFlagContext);
1198
1417
  if (context === null) {
1199
1418
  throw new Error(
1200
1419
  "useFeatureFlag must be used within a FeatureFlags Provider"
@@ -1204,26 +1423,26 @@ function useFeatureFlags(key) {
1204
1423
  }
1205
1424
 
1206
1425
  // src/components/FeatureFlag.tsx
1207
- var import_jsx_runtime17 = require("react/jsx-runtime");
1426
+ var import_jsx_runtime28 = require("react/jsx-runtime");
1208
1427
  function FeatureFlag(props) {
1209
1428
  const showContent = useFeatureFlags(props.flag);
1210
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Show, { when: showContent, children: props.children });
1429
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Show, { when: showContent, children: props.children });
1211
1430
  }
1212
1431
 
1213
1432
  // src/components/Fieldset.tsx
1214
- var import_css12 = require("@cerberus/styled-system/css");
1215
- var import_jsx_runtime18 = require("react/jsx-runtime");
1433
+ var import_css23 = require("@cerberus/styled-system/css");
1434
+ var import_jsx_runtime29 = require("react/jsx-runtime");
1216
1435
  function Fieldset(props) {
1217
1436
  const { invalid, ...formState } = useFieldContext();
1218
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1437
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
1219
1438
  "fieldset",
1220
1439
  {
1221
1440
  ...props,
1222
1441
  ...formState,
1223
1442
  ...invalid && { "aria-invalid": true },
1224
- className: (0, import_css12.cx)(
1443
+ className: (0, import_css23.cx)(
1225
1444
  props.className,
1226
- (0, import_css12.css)({
1445
+ (0, import_css23.css)({
1227
1446
  border: "none",
1228
1447
  pt: 2,
1229
1448
  margin: 0
@@ -1234,18 +1453,18 @@ function Fieldset(props) {
1234
1453
  }
1235
1454
 
1236
1455
  // src/components/FieldsetLabel.tsx
1237
- var import_css13 = require("@cerberus/styled-system/css");
1238
- var import_recipes10 = require("@cerberus/styled-system/recipes");
1239
- var import_jsx_runtime19 = require("react/jsx-runtime");
1456
+ var import_css24 = require("@cerberus/styled-system/css");
1457
+ var import_recipes17 = require("@cerberus/styled-system/recipes");
1458
+ var import_jsx_runtime30 = require("react/jsx-runtime");
1240
1459
  function FieldsetLabel(props) {
1241
1460
  const { size, usage, ...nativeProps } = props;
1242
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1461
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
1243
1462
  "label",
1244
1463
  {
1245
1464
  ...nativeProps,
1246
- className: (0, import_css13.cx)(
1465
+ className: (0, import_css24.cx)(
1247
1466
  nativeProps.className,
1248
- (0, import_recipes10.label)({
1467
+ (0, import_recipes17.label)({
1249
1468
  size,
1250
1469
  usage
1251
1470
  })
@@ -1255,23 +1474,23 @@ function FieldsetLabel(props) {
1255
1474
  }
1256
1475
 
1257
1476
  // src/components/FileStatus.tsx
1258
- var import_react9 = require("react");
1259
- var import_recipes12 = require("@cerberus/styled-system/recipes");
1260
- var import_css15 = require("@cerberus/styled-system/css");
1261
- var import_patterns5 = require("@cerberus/styled-system/patterns");
1477
+ var import_react18 = require("react");
1478
+ var import_recipes19 = require("@cerberus/styled-system/recipes");
1479
+ var import_css26 = require("@cerberus/styled-system/css");
1480
+ var import_patterns7 = require("@cerberus/styled-system/patterns");
1262
1481
 
1263
1482
  // src/components/ProgressBar.tsx
1264
- var import_css14 = require("@cerberus/styled-system/css");
1265
- var import_recipes11 = require("@cerberus/styled-system/recipes");
1266
- var import_jsx_runtime20 = require("react/jsx-runtime");
1483
+ var import_css25 = require("@cerberus/styled-system/css");
1484
+ var import_recipes18 = require("@cerberus/styled-system/recipes");
1485
+ var import_jsx_runtime31 = require("react/jsx-runtime");
1267
1486
  function ProgressBar(props) {
1268
1487
  const { indeterminate, size, usage, now, label: label5, ...nativeProps } = props;
1269
- const styles = (0, import_recipes11.progressBar)({ size, usage });
1488
+ const styles = (0, import_recipes18.progressBar)({ size, usage });
1270
1489
  const nowClamped = Math.min(100, Math.max(0, now || 0));
1271
1490
  const width = {
1272
1491
  width: indeterminate ? "50%" : `${nowClamped}%`
1273
1492
  };
1274
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1493
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
1275
1494
  "div",
1276
1495
  {
1277
1496
  ...nativeProps,
@@ -1279,9 +1498,9 @@ function ProgressBar(props) {
1279
1498
  "aria-valuemin": 0,
1280
1499
  "aria-valuemax": 100,
1281
1500
  "aria-valuenow": indeterminate ? 0 : nowClamped,
1282
- className: (0, import_css14.cx)(nativeProps.className, styles.root),
1501
+ className: (0, import_css25.cx)(nativeProps.className, styles.root),
1283
1502
  role: "progressbar",
1284
- children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1503
+ children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
1285
1504
  "div",
1286
1505
  {
1287
1506
  ...indeterminate && { "data-indeterminate": true },
@@ -1295,7 +1514,7 @@ function ProgressBar(props) {
1295
1514
  }
1296
1515
 
1297
1516
  // src/components/FileStatus.tsx
1298
- var import_jsx_runtime21 = require("react/jsx-runtime");
1517
+ var import_jsx_runtime32 = require("react/jsx-runtime");
1299
1518
  var processStatus = /* @__PURE__ */ ((processStatus2) => {
1300
1519
  processStatus2["TODO"] = "todo";
1301
1520
  processStatus2["PROCESSING"] = "processing";
@@ -1305,24 +1524,24 @@ var processStatus = /* @__PURE__ */ ((processStatus2) => {
1305
1524
  })(processStatus || {});
1306
1525
  function FileStatus(props) {
1307
1526
  const { file, now, status, onClick, ...nativeProps } = props;
1308
- const actionLabel = (0, import_react9.useMemo)(() => getStatusActionLabel(status), [status]);
1309
- const palette = (0, import_react9.useMemo)(() => getPalette(status), [status]);
1310
- const modalIconPalette = (0, import_react9.useMemo)(() => getModalIconPalette(status), [status]);
1311
- const styles = (0, import_react9.useMemo)(() => {
1527
+ const actionLabel = (0, import_react18.useMemo)(() => getStatusActionLabel(status), [status]);
1528
+ const palette = (0, import_react18.useMemo)(() => getPalette(status), [status]);
1529
+ const modalIconPalette = (0, import_react18.useMemo)(() => getModalIconPalette(status), [status]);
1530
+ const styles = (0, import_react18.useMemo)(() => {
1312
1531
  switch (status) {
1313
1532
  case "todo" /* TODO */:
1314
- return (0, import_recipes12.fileStatus)({ status: "todo" });
1533
+ return (0, import_recipes19.fileStatus)({ status: "todo" });
1315
1534
  case "processing" /* PROCESSING */:
1316
- return (0, import_recipes12.fileStatus)({ status: "processing" });
1535
+ return (0, import_recipes19.fileStatus)({ status: "processing" });
1317
1536
  case "done" /* DONE */:
1318
- return (0, import_recipes12.fileStatus)({ status: "done" });
1537
+ return (0, import_recipes19.fileStatus)({ status: "done" });
1319
1538
  case "error" /* ERROR */:
1320
- return (0, import_recipes12.fileStatus)({ status: "error" });
1539
+ return (0, import_recipes19.fileStatus)({ status: "error" });
1321
1540
  default:
1322
- return (0, import_recipes12.fileStatus)();
1541
+ return (0, import_recipes19.fileStatus)();
1323
1542
  }
1324
1543
  }, [status]);
1325
- const handleClick = (0, import_react9.useCallback)(
1544
+ const handleClick = (0, import_react18.useCallback)(
1326
1545
  (e) => {
1327
1546
  const actionStatus = getStatusActionLabel(
1328
1547
  status
@@ -1331,41 +1550,41 @@ function FileStatus(props) {
1331
1550
  },
1332
1551
  [onClick]
1333
1552
  );
1334
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
1553
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
1335
1554
  "div",
1336
1555
  {
1337
1556
  ...nativeProps,
1338
- className: (0, import_css15.cx)(nativeProps.className, styles.root, (0, import_patterns5.hstack)()),
1557
+ className: (0, import_css26.cx)(nativeProps.className, styles.root, (0, import_patterns7.hstack)()),
1339
1558
  children: [
1340
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1559
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
1341
1560
  Avatar,
1342
1561
  {
1343
1562
  ariaLabel: "",
1344
1563
  gradient: modalIconPalette,
1345
- icon: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(MatchFileStatusIcon, { size: 24, status }),
1564
+ icon: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(MatchFileStatusIcon, { size: 24, status }),
1346
1565
  src: ""
1347
1566
  }
1348
1567
  ),
1349
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
1568
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
1350
1569
  "div",
1351
1570
  {
1352
- className: (0, import_patterns5.vstack)({
1571
+ className: (0, import_patterns7.vstack)({
1353
1572
  alignItems: "flex-start",
1354
1573
  gap: "0.12rem",
1355
1574
  w: "full"
1356
1575
  }),
1357
1576
  children: [
1358
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1577
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
1359
1578
  "small",
1360
1579
  {
1361
- className: (0, import_css15.css)({
1580
+ className: (0, import_css26.css)({
1362
1581
  color: "page.text.initial",
1363
1582
  textStyle: "label-sm"
1364
1583
  }),
1365
1584
  children: file
1366
1585
  }
1367
1586
  ),
1368
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1587
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
1369
1588
  ProgressBar,
1370
1589
  {
1371
1590
  id: props.id,
@@ -1374,27 +1593,27 @@ function FileStatus(props) {
1374
1593
  size: "sm"
1375
1594
  }
1376
1595
  ),
1377
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Field, { invalid: modalIconPalette === "hades-dark", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1596
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Field, { invalid: modalIconPalette === "hades-dark", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
1378
1597
  FieldMessage,
1379
1598
  {
1380
- className: (0, import_css15.css)({
1599
+ className: (0, import_css26.css)({
1381
1600
  color: "page.text.100"
1382
1601
  }),
1383
1602
  id: `help:${file}`,
1384
- children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(MatchFileStatusText, { status, now })
1603
+ children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(MatchFileStatusText, { status, now })
1385
1604
  }
1386
1605
  ) })
1387
1606
  ]
1388
1607
  }
1389
1608
  ),
1390
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1609
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
1391
1610
  IconButton,
1392
1611
  {
1393
1612
  ariaLabel: actionLabel,
1394
1613
  onClick: handleClick,
1395
1614
  palette,
1396
1615
  size: "sm",
1397
- children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(MatchStatusAction, { status })
1616
+ children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(MatchStatusAction, { status })
1398
1617
  }
1399
1618
  )
1400
1619
  ]
@@ -1402,21 +1621,22 @@ function FileStatus(props) {
1402
1621
  );
1403
1622
  }
1404
1623
  function MatchFileStatusIcon(props) {
1624
+ const { icons } = useCerberusContext();
1405
1625
  const {
1406
1626
  waitingFileUploader: TodoIcon,
1407
1627
  fileUploader: FileUploaderIcon,
1408
1628
  invalidAlt: InvalidIcon,
1409
1629
  successNotification: DoneIcon
1410
- } = $cerberusIcons;
1630
+ } = icons;
1411
1631
  switch (props.status) {
1412
1632
  case "todo" /* TODO */:
1413
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(TodoIcon, { size: props.size });
1633
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(TodoIcon, { size: props.size });
1414
1634
  case "processing" /* PROCESSING */:
1415
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(FileUploaderIcon, { size: props.size });
1635
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(FileUploaderIcon, { size: props.size });
1416
1636
  case "done" /* DONE */:
1417
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(DoneIcon, { size: props.size });
1637
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DoneIcon, { size: props.size });
1418
1638
  case "error" /* ERROR */:
1419
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(InvalidIcon, { size: props.size });
1639
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(InvalidIcon, { size: props.size });
1420
1640
  default:
1421
1641
  throw new Error("Unknown status");
1422
1642
  }
@@ -1436,15 +1656,16 @@ function MatchFileStatusText(props) {
1436
1656
  }
1437
1657
  }
1438
1658
  function MatchStatusAction(props) {
1439
- const { close: CloseIcon, redo: RedoIcon, delete: TrashIcon } = $cerberusIcons;
1659
+ const { icons } = useCerberusContext();
1660
+ const { close: CloseIcon, redo: RedoIcon, delete: TrashIcon } = icons;
1440
1661
  switch (props.status) {
1441
1662
  case "todo" /* TODO */:
1442
1663
  case "processing" /* PROCESSING */:
1443
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(CloseIcon, {});
1664
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(CloseIcon, {});
1444
1665
  case "error" /* ERROR */:
1445
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(RedoIcon, {});
1666
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(RedoIcon, {});
1446
1667
  case "done" /* DONE */:
1447
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(TrashIcon, {});
1668
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(TrashIcon, {});
1448
1669
  default:
1449
1670
  throw new Error("Invalid status");
1450
1671
  }
@@ -1490,56 +1711,57 @@ function getModalIconPalette(status) {
1490
1711
  }
1491
1712
 
1492
1713
  // src/components/FileUploader.tsx
1493
- var import_css16 = require("@cerberus/styled-system/css");
1494
- var import_patterns6 = require("@cerberus/styled-system/patterns");
1495
- var import_recipes13 = require("@cerberus/styled-system/recipes");
1496
- var import_jsx_runtime22 = require("react/jsx-runtime");
1714
+ var import_css27 = require("@cerberus/styled-system/css");
1715
+ var import_patterns8 = require("@cerberus/styled-system/patterns");
1716
+ var import_recipes20 = require("@cerberus/styled-system/recipes");
1717
+ var import_jsx_runtime33 = require("react/jsx-runtime");
1497
1718
  function FileUploader(props) {
1498
1719
  var _a;
1499
- const styles = (0, import_recipes13.fileUploader)();
1500
- const { waitingFileUploader: Icon } = $cerberusIcons;
1501
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
1720
+ const { icons } = useCerberusContext();
1721
+ const styles = (0, import_recipes20.fileUploader)();
1722
+ const { waitingFileUploader: Icon } = icons;
1723
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
1502
1724
  "div",
1503
1725
  {
1504
1726
  ...props.disabled ? { "aria-disabled": true } : {},
1505
- className: (0, import_css16.cx)(
1506
- (0, import_patterns6.vstack)({
1727
+ className: (0, import_css27.cx)(
1728
+ (0, import_patterns8.vstack)({
1507
1729
  justify: "center"
1508
1730
  }),
1509
1731
  styles.container
1510
1732
  ),
1511
1733
  children: [
1512
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: styles.icon, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1734
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: styles.icon, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
1513
1735
  Avatar,
1514
1736
  {
1515
1737
  gradient: "charon-light",
1516
1738
  ariaLabel: "",
1517
- icon: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Icon, {}),
1739
+ icon: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Icon, {}),
1518
1740
  size: "md",
1519
1741
  src: ""
1520
1742
  }
1521
1743
  ) }),
1522
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
1744
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
1523
1745
  "label",
1524
1746
  {
1525
- className: (0, import_css16.cx)(
1526
- (0, import_patterns6.vstack)({
1747
+ className: (0, import_css27.cx)(
1748
+ (0, import_patterns8.vstack)({
1527
1749
  justify: "center"
1528
1750
  }),
1529
1751
  styles.label
1530
1752
  ),
1531
1753
  htmlFor: props.name,
1532
1754
  children: [
1533
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Show, { when: Boolean(props.heading), children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: styles.heading, children: props.heading }) }),
1755
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Show, { when: Boolean(props.heading), children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: styles.heading, children: props.heading }) }),
1534
1756
  "Import ",
1535
1757
  (_a = props.accept) == null ? void 0 : _a.replace(",", ", "),
1536
1758
  " files",
1537
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: styles.description, children: "Click to select files" }),
1538
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1759
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: styles.description, children: "Click to select files" }),
1760
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
1539
1761
  "input",
1540
1762
  {
1541
1763
  ...props,
1542
- className: (0, import_css16.cx)(props.className, styles.input),
1764
+ className: (0, import_css27.cx)(props.className, styles.input),
1543
1765
  type: "file"
1544
1766
  }
1545
1767
  )
@@ -1552,18 +1774,19 @@ function FileUploader(props) {
1552
1774
  }
1553
1775
 
1554
1776
  // src/components/Input.tsx
1555
- var import_recipes14 = require("@cerberus/styled-system/recipes");
1556
- var import_css17 = require("@cerberus/styled-system/css");
1557
- var import_jsx_runtime23 = require("react/jsx-runtime");
1777
+ var import_recipes21 = require("@cerberus/styled-system/recipes");
1778
+ var import_css28 = require("@cerberus/styled-system/css");
1779
+ var import_jsx_runtime34 = require("react/jsx-runtime");
1558
1780
  function Input(props) {
1559
1781
  const { describedBy, size, startIcon, endIcon, ...nativeProps } = props;
1560
- const inputStyles = (0, import_recipes14.input)({ size });
1782
+ const inputStyles = (0, import_recipes21.input)({ size });
1561
1783
  const { invalid, ...fieldStates } = useFieldContext();
1562
1784
  const hasEndIcon = Boolean(endIcon);
1563
- const { invalid: InvalidIcon } = $cerberusIcons;
1564
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: inputStyles.root, children: [
1565
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Show, { when: Boolean(startIcon), children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: inputStyles.startIcon, children: startIcon }) }),
1566
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1785
+ const { icons } = useCerberusContext();
1786
+ const { invalid: InvalidIcon } = icons;
1787
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: inputStyles.root, children: [
1788
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Show, { when: Boolean(startIcon), children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: inputStyles.startIcon, children: startIcon }) }),
1789
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
1567
1790
  "input",
1568
1791
  {
1569
1792
  ...nativeProps,
@@ -1571,42 +1794,42 @@ function Input(props) {
1571
1794
  ...describedBy && { "aria-describedby": describedBy },
1572
1795
  ...invalid && { "aria-invalid": true },
1573
1796
  "data-start-icon": Boolean(startIcon),
1574
- className: (0, import_css17.cx)("peer", nativeProps.className, inputStyles.input)
1797
+ className: (0, import_css28.cx)("peer", nativeProps.className, inputStyles.input)
1575
1798
  }
1576
1799
  ),
1577
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Show, { when: invalid, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(InvalidIcon, { className: inputStyles.icon }) }),
1578
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Show, { when: hasEndIcon && !invalid, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: inputStyles.icon, children: endIcon }) })
1800
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Show, { when: invalid, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(InvalidIcon, { className: inputStyles.icon }) }),
1801
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Show, { when: hasEndIcon && !invalid, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: inputStyles.icon, children: endIcon }) })
1579
1802
  ] });
1580
1803
  }
1581
1804
 
1582
1805
  // src/components/Label.tsx
1583
- var import_recipes15 = require("@cerberus/styled-system/recipes");
1584
- var import_css18 = require("@cerberus/styled-system/css");
1585
- var import_patterns7 = require("@cerberus/styled-system/patterns");
1586
- var import_jsx_runtime24 = require("react/jsx-runtime");
1806
+ var import_recipes22 = require("@cerberus/styled-system/recipes");
1807
+ var import_css29 = require("@cerberus/styled-system/css");
1808
+ var import_patterns9 = require("@cerberus/styled-system/patterns");
1809
+ var import_jsx_runtime35 = require("react/jsx-runtime");
1587
1810
  function Label(props) {
1588
1811
  const { hidden, size, ...nativeProps } = props;
1589
1812
  const { required, disabled } = useFieldContext();
1590
1813
  const usage = hidden ? "hidden" : "visible";
1591
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
1814
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
1592
1815
  "label",
1593
1816
  {
1594
1817
  ...nativeProps,
1595
1818
  ...disabled && { "data-disabled": true },
1596
- className: (0, import_css18.cx)(
1819
+ className: (0, import_css29.cx)(
1597
1820
  nativeProps.className,
1598
- (0, import_recipes15.label)({ size, usage }),
1599
- (0, import_patterns7.hstack)({
1821
+ (0, import_recipes22.label)({ size, usage }),
1822
+ (0, import_patterns9.hstack)({
1600
1823
  justify: "space-between",
1601
1824
  w: "full"
1602
1825
  })
1603
1826
  ),
1604
1827
  children: [
1605
1828
  props.children,
1606
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Show, { when: required, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1829
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Show, { when: required, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
1607
1830
  "span",
1608
1831
  {
1609
- className: (0, import_css18.css)({
1832
+ className: (0, import_css29.css)({
1610
1833
  color: "page.text.100",
1611
1834
  fontSize: "inherit"
1612
1835
  }),
@@ -1619,375 +1842,93 @@ function Label(props) {
1619
1842
  }
1620
1843
 
1621
1844
  // src/components/Legend.tsx
1622
- var import_css19 = require("@cerberus/styled-system/css");
1623
- var import_recipes16 = require("@cerberus/styled-system/recipes");
1624
- var import_patterns8 = require("@cerberus/styled-system/patterns");
1625
- var import_jsx_runtime25 = require("react/jsx-runtime");
1626
- function Legend(props) {
1627
- const { size, ...nativeProps } = props;
1628
- const { invalid, ...formState } = useFieldContext();
1629
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
1630
- "legend",
1631
- {
1632
- ...nativeProps,
1633
- ...formState,
1634
- ...invalid && { "aria-invalid": true },
1635
- className: (0, import_css19.cx)(
1636
- nativeProps.className,
1637
- (0, import_patterns8.hstack)({
1638
- justify: "space-between",
1639
- w: "full"
1640
- }),
1641
- (0, import_recipes16.label)({
1642
- size
1643
- })
1644
- ),
1645
- children: [
1646
- nativeProps.children,
1647
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Show, { when: formState.required, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
1648
- "span",
1649
- {
1650
- className: (0, import_css19.css)({
1651
- color: "page.text.100",
1652
- fontSize: "inherit"
1653
- }),
1654
- children: "(required)"
1655
- }
1656
- ) })
1657
- ]
1658
- }
1659
- );
1660
- }
1661
-
1662
- // src/components/Menu.tsx
1663
- var import_react10 = require("@ark-ui/react");
1664
- var import_recipes17 = require("@cerberus/styled-system/recipes");
1665
- var import_css20 = require("@cerberus/styled-system/css");
1666
- var import_jsx_runtime26 = require("react/jsx-runtime");
1667
- var menuStyles = (0, import_recipes17.menu)();
1668
- var Menu = import_react10.Menu.Root;
1669
- function MenuTrigger(props) {
1670
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react10.Menu.Trigger, { ...props, asChild: true });
1671
- }
1672
- function MenuContent(props) {
1673
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react10.Menu.Positioner, { children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
1674
- import_react10.Menu.Content,
1675
- {
1676
- ...props,
1677
- className: (0, import_css20.cx)(props.className, menuStyles.content)
1678
- }
1679
- ) });
1680
- }
1681
- function MenuItem(props) {
1682
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react10.Menu.Item, { ...props, className: (0, import_css20.cx)(props.className, menuStyles.item) });
1683
- }
1684
- var MenuItemGroup = import_react10.Menu.ItemGroup;
1685
- function MenuGroupLabel(props) {
1686
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
1687
- import_react10.Menu.ItemGroupLabel,
1688
- {
1689
- ...props,
1690
- className: (0, import_css20.cx)(props.className, menuStyles.itemGroupLabel)
1691
- }
1692
- );
1693
- }
1694
- function MenuSeparator(props) {
1695
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
1696
- import_react10.Menu.Separator,
1697
- {
1698
- ...props,
1699
- className: (0, import_css20.cx)(props.className, menuStyles.separator)
1700
- }
1701
- );
1702
- }
1703
-
1704
- // src/components/Modal.tsx
1705
- var import_css21 = require("@cerberus/styled-system/css");
1706
- var import_recipes18 = require("@cerberus/styled-system/recipes");
1707
- var import_react11 = require("react");
1708
- var import_jsx_runtime27 = require("react/jsx-runtime");
1709
- function ModalEl(props, ref) {
1710
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
1711
- "dialog",
1712
- {
1713
- ...props,
1714
- className: (0, import_css21.cx)(props.className, (0, import_recipes18.modal)().dialog),
1715
- ref
1716
- }
1717
- );
1718
- }
1719
- var Modal = (0, import_react11.forwardRef)(ModalEl);
1720
-
1721
- // src/components/ModalHeader.tsx
1722
- var import_css22 = require("@cerberus/styled-system/css");
1723
- var import_patterns9 = require("@cerberus/styled-system/patterns");
1724
- var import_jsx_runtime28 = require("react/jsx-runtime");
1725
- function ModalHeader(props) {
1726
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
1727
- "div",
1728
- {
1729
- ...props,
1730
- className: (0, import_css22.cx)(
1731
- props.className,
1732
- (0, import_patterns9.vstack)({
1733
- alignItems: "flex-start",
1734
- gap: "md",
1735
- position: "relative"
1736
- })
1737
- )
1738
- }
1739
- );
1740
- }
1741
-
1742
- // src/components/ModalHeading.tsx
1743
- var import_css23 = require("@cerberus/styled-system/css");
1744
- var import_recipes19 = require("@cerberus/styled-system/recipes");
1745
- var import_jsx_runtime29 = require("react/jsx-runtime");
1746
- function ModalHeading(props) {
1747
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { ...props, className: (0, import_css23.cx)(props.className, (0, import_recipes19.modal)().heading) });
1748
- }
1749
-
1750
- // src/components/ModalDescription.tsx
1751
- var import_css24 = require("@cerberus/styled-system/css");
1752
- var import_recipes20 = require("@cerberus/styled-system/recipes");
1753
- var import_jsx_runtime30 = require("react/jsx-runtime");
1754
- function ModalDescription(props) {
1755
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { ...props, className: (0, import_css24.cx)(props.className, (0, import_recipes20.modal)().description) });
1756
- }
1757
-
1758
- // src/components/NavMenuTrigger.tsx
1759
- var import_react13 = require("react");
1760
- var import_css26 = require("@cerberus/styled-system/css");
1761
- var import_recipes21 = require("@cerberus/styled-system/recipes");
1762
-
1763
- // src/aria-helpers/nav-menu.aria.ts
1764
- function createNavTriggerProps(values) {
1765
- return {
1766
- ["aria-controls"]: values.controls,
1767
- ["aria-expanded"]: values.expanded ?? false
1768
- };
1769
- }
1770
-
1771
- // src/context/navMenu.tsx
1772
- var import_css25 = require("@cerberus/styled-system/css");
1773
- var import_react12 = require("react");
1774
- var import_jsx_runtime31 = require("react/jsx-runtime");
1775
- var NavMenuContext = (0, import_react12.createContext)(null);
1776
- function NavMenu(props) {
1777
- const triggerRef = (0, import_react12.useRef)(null);
1778
- const menuRef = (0, import_react12.useRef)(null);
1779
- const [expanded, setExpanded] = (0, import_react12.useState)(false);
1780
- const handleToggle = (0, import_react12.useCallback)(() => {
1781
- setExpanded((prev) => !prev);
1782
- }, []);
1783
- const value = (0, import_react12.useMemo)(
1784
- () => ({
1785
- triggerRef,
1786
- menuRef,
1787
- expanded,
1788
- onToggle: handleToggle
1789
- }),
1790
- [expanded, handleToggle]
1791
- );
1792
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(NavMenuContext.Provider, { value, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
1793
- "nav",
1794
- {
1795
- className: (0, import_css25.css)({
1796
- position: "relative"
1797
- }),
1798
- children: props.children
1799
- }
1800
- ) });
1801
- }
1802
- function useNavMenuContext() {
1803
- const context = (0, import_react12.useContext)(NavMenuContext);
1804
- if (!context) {
1805
- throw new Error("useNavMenuContext must be used within a NavMenu.");
1806
- }
1807
- return context;
1808
- }
1809
-
1810
- // src/components/NavMenuTrigger.tsx
1811
- var import_jsx_runtime32 = require("react/jsx-runtime");
1812
- function NavMenuTrigger(props) {
1813
- const {
1814
- as,
1815
- palette,
1816
- usage,
1817
- shape,
1818
- controls,
1819
- expanded: propsExpanded,
1820
- onClick,
1821
- ...nativeProps
1822
- } = props;
1823
- const { triggerRef, onToggle, expanded } = useNavMenuContext();
1824
- const ariaProps = createNavTriggerProps({
1825
- controls,
1826
- expanded: propsExpanded ?? expanded
1827
- });
1828
- const hasAs = Boolean(as);
1829
- const AsSub = as;
1830
- const handleClick = (0, import_react13.useCallback)(
1831
- (e) => {
1832
- if (onClick) return onClick(e);
1833
- onToggle();
1834
- },
1835
- [onClick, onToggle]
1836
- );
1837
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
1838
- Show,
1839
- {
1840
- when: hasAs,
1841
- fallback: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
1842
- "button",
1843
- {
1844
- ...nativeProps,
1845
- ...ariaProps,
1846
- className: (0, import_css26.cx)(
1847
- nativeProps.className,
1848
- (0, import_recipes21.button)({
1849
- palette,
1850
- usage,
1851
- shape
1852
- })
1853
- ),
1854
- onClick: handleClick,
1855
- ref: triggerRef,
1856
- children: props.children
1857
- }
1858
- ),
1859
- children: hasAs && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
1860
- AsSub,
1861
- {
1862
- ...nativeProps,
1863
- ...ariaProps,
1864
- onClick: handleClick,
1865
- ref: triggerRef
1866
- }
1867
- )
1868
- }
1869
- );
1870
- }
1871
-
1872
- // src/components/NavMenuList.tsx
1873
- var import_react14 = require("react");
1874
- var import_css27 = require("@cerberus/styled-system/css");
1845
+ var import_css30 = require("@cerberus/styled-system/css");
1846
+ var import_recipes23 = require("@cerberus/styled-system/recipes");
1875
1847
  var import_patterns10 = require("@cerberus/styled-system/patterns");
1876
- var import_jsx_runtime33 = require("react/jsx-runtime");
1877
- function getPosition(position) {
1878
- const defaultPositions = {
1879
- left: "auto",
1880
- right: "auto",
1881
- top: "auto",
1882
- bottom: "auto"
1883
- };
1884
- switch (position) {
1885
- case "right":
1886
- return { ...defaultPositions, top: "0%", left: "105%" };
1887
- case "left":
1888
- return { ...defaultPositions, top: "0%", right: "105%" };
1889
- case "bottom":
1890
- return { ...defaultPositions, top: "110%" };
1891
- case "top":
1892
- return { ...defaultPositions, bottom: "110%" };
1893
- default:
1894
- return defaultPositions;
1895
- }
1896
- }
1897
- var navListStyles = (0, import_patterns10.vstack)({
1898
- alignItems: "flex-start",
1899
- bgColor: "page.surface.100",
1900
- boxShadow: "lg",
1901
- gap: "2",
1902
- opacity: "0",
1903
- p: "4",
1904
- position: "absolute",
1905
- rounded: "md",
1906
- zIndex: "dropdown",
1907
- _motionSafe: {
1908
- animationName: "zoomIn",
1909
- animationDelay: "100ms",
1910
- animationDuration: "150ms",
1911
- animationFillMode: "both",
1912
- animationTimingFunction: "ease-in-out"
1913
- },
1914
- _positionBottom: {
1915
- transformOrigin: "top left"
1916
- },
1917
- _positionTop: {
1918
- transformOrigin: "bottom left"
1919
- },
1920
- _positionLeft: {
1921
- transformOrigin: "top right"
1922
- },
1923
- _positionRight: {
1924
- transformOrigin: "top left"
1925
- }
1926
- });
1927
- function NavMenuList(props) {
1928
- const { position, ...nativeProps } = props;
1929
- const { menuRef, expanded } = useNavMenuContext();
1930
- const locationStyles = (0, import_react14.useMemo)(
1931
- () => getPosition(position ?? "bottom"),
1932
- [position]
1933
- );
1934
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Show, { when: expanded, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
1935
- "ul",
1848
+ var import_jsx_runtime36 = require("react/jsx-runtime");
1849
+ function Legend(props) {
1850
+ const { size, ...nativeProps } = props;
1851
+ const { invalid, ...formState } = useFieldContext();
1852
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
1853
+ "legend",
1936
1854
  {
1937
1855
  ...nativeProps,
1938
- "data-position": position ?? "bottom",
1939
- className: (0, import_css27.cx)(nativeProps.className, navListStyles),
1940
- ref: menuRef,
1941
- style: locationStyles
1856
+ ...formState,
1857
+ ...invalid && { "aria-invalid": true },
1858
+ className: (0, import_css30.cx)(
1859
+ nativeProps.className,
1860
+ (0, import_patterns10.hstack)({
1861
+ justify: "space-between",
1862
+ w: "full"
1863
+ }),
1864
+ (0, import_recipes23.label)({
1865
+ size
1866
+ })
1867
+ ),
1868
+ children: [
1869
+ nativeProps.children,
1870
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Show, { when: formState.required, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
1871
+ "span",
1872
+ {
1873
+ className: (0, import_css30.css)({
1874
+ color: "page.text.100",
1875
+ fontSize: "inherit"
1876
+ }),
1877
+ children: "(required)"
1878
+ }
1879
+ ) })
1880
+ ]
1942
1881
  }
1943
- ) });
1882
+ );
1944
1883
  }
1945
1884
 
1946
- // src/components/NavMenuLink.tsx
1947
- var import_css28 = require("@cerberus/styled-system/css");
1948
- var import_jsx_runtime34 = require("react/jsx-runtime");
1949
- function NavMenuLink(props) {
1950
- const { as, ...nativeProps } = props;
1951
- const hasAs = Boolean(as);
1952
- const AsSub = as;
1953
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
1954
- "li",
1885
+ // src/components/Menu.tsx
1886
+ var import_react19 = require("@ark-ui/react");
1887
+ var import_recipes24 = require("@cerberus/styled-system/recipes");
1888
+ var import_css31 = require("@cerberus/styled-system/css");
1889
+ var import_jsx_runtime37 = require("react/jsx-runtime");
1890
+ var menuStyles = (0, import_recipes24.menu)();
1891
+ var Menu = import_react19.Menu.Root;
1892
+ function MenuTrigger(props) {
1893
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react19.Menu.Trigger, { ...props, asChild: true });
1894
+ }
1895
+ function MenuContent(props) {
1896
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react19.Menu.Positioner, { children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
1897
+ import_react19.Menu.Content,
1955
1898
  {
1956
- className: (0, import_css28.css)({
1957
- w: "full"
1958
- }),
1959
- children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
1960
- Show,
1961
- {
1962
- when: hasAs,
1963
- fallback: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
1964
- "a",
1965
- {
1966
- ...nativeProps,
1967
- className: (0, import_css28.cx)(
1968
- nativeProps.className,
1969
- (0, import_css28.css)({
1970
- color: "action.navigation.initial",
1971
- textStyle: "link",
1972
- _hover: {
1973
- color: "action.navigation.hover"
1974
- }
1975
- })
1976
- )
1977
- }
1978
- ),
1979
- children: hasAs && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(AsSub, { ...nativeProps })
1980
- }
1981
- )
1899
+ ...props,
1900
+ className: (0, import_css31.cx)(props.className, menuStyles.content)
1901
+ }
1902
+ ) });
1903
+ }
1904
+ function MenuItem(props) {
1905
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react19.Menu.Item, { ...props, className: (0, import_css31.cx)(props.className, menuStyles.item) });
1906
+ }
1907
+ var MenuItemGroup = import_react19.Menu.ItemGroup;
1908
+ function MenuGroupLabel(props) {
1909
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
1910
+ import_react19.Menu.ItemGroupLabel,
1911
+ {
1912
+ ...props,
1913
+ className: (0, import_css31.cx)(props.className, menuStyles.itemGroupLabel)
1914
+ }
1915
+ );
1916
+ }
1917
+ function MenuSeparator(props) {
1918
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
1919
+ import_react19.Menu.Separator,
1920
+ {
1921
+ ...props,
1922
+ className: (0, import_css31.cx)(props.className, menuStyles.separator)
1982
1923
  }
1983
1924
  );
1984
1925
  }
1985
1926
 
1986
1927
  // src/components/Notification.tsx
1987
- var import_css29 = require("@cerberus/styled-system/css");
1928
+ var import_css32 = require("@cerberus/styled-system/css");
1988
1929
  var import_patterns11 = require("@cerberus/styled-system/patterns");
1989
- var import_recipes22 = require("@cerberus/styled-system/recipes");
1990
- var import_react15 = require("react");
1930
+ var import_recipes25 = require("@cerberus/styled-system/recipes");
1931
+ var import_react20 = require("react");
1991
1932
 
1992
1933
  // src/aria-helpers/trap-focus.aria.ts
1993
1934
  function trapFocus(modalRef) {
@@ -2016,24 +1957,27 @@ function trapFocus(modalRef) {
2016
1957
  }
2017
1958
 
2018
1959
  // src/components/Notification.tsx
2019
- var import_jsx_runtime35 = require("react/jsx-runtime");
1960
+ var import_jsx_runtime38 = require("react/jsx-runtime");
2020
1961
  function MatchNotificationIcon(props) {
1962
+ const { icons } = useCerberusContext();
2021
1963
  const palette = props.palette || "info";
2022
1964
  const key = `${palette}Notification`;
2023
- const Icon = $cerberusIcons[key];
2024
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Icon, {});
1965
+ const Icon = icons[key];
1966
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Icon, {});
2025
1967
  }
2026
1968
  function Notification(props) {
2027
1969
  const { children, palette, onClose, ...nativeProps } = props;
2028
- const ref = (0, import_react15.useRef)(null);
1970
+ const ref = (0, import_react20.useRef)(null);
2029
1971
  const onKeyDown = trapFocus(ref);
2030
- const styles = (0, import_recipes22.notification)({ palette });
2031
- const { close: CloseIcon } = $cerberusIcons;
2032
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
1972
+ const styles = (0, import_recipes25.notification)({ palette });
1973
+ const { icons } = useCerberusContext();
1974
+ const { close: CloseIcon } = icons;
1975
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
2033
1976
  "dialog",
2034
1977
  {
2035
1978
  ...nativeProps,
2036
- className: (0, import_css29.cx)(
1979
+ "data-placement": "left",
1980
+ className: (0, import_css32.cx)(
2037
1981
  nativeProps.className,
2038
1982
  (0, import_patterns11.hstack)({
2039
1983
  position: "relative",
@@ -2044,8 +1988,8 @@ function Notification(props) {
2044
1988
  onKeyDown,
2045
1989
  ref,
2046
1990
  children: [
2047
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: styles.icon, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(MatchNotificationIcon, { palette }) }),
2048
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
1991
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: styles.icon, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(MatchNotificationIcon, { palette }) }),
1992
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
2049
1993
  "div",
2050
1994
  {
2051
1995
  className: (0, import_patterns11.vstack)({
@@ -2056,14 +2000,14 @@ function Notification(props) {
2056
2000
  children
2057
2001
  }
2058
2002
  ),
2059
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
2003
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
2060
2004
  "button",
2061
2005
  {
2062
2006
  "aria-label": "Close",
2063
2007
  className: styles.close,
2064
2008
  onClick: onClose,
2065
2009
  value: props.id,
2066
- children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(CloseIcon, {})
2010
+ children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(CloseIcon, {})
2067
2011
  }
2068
2012
  )
2069
2013
  ]
@@ -2072,44 +2016,44 @@ function Notification(props) {
2072
2016
  }
2073
2017
 
2074
2018
  // src/components/NotificationHeading.tsx
2075
- var import_css30 = require("@cerberus/styled-system/css");
2076
- var import_recipes23 = require("@cerberus/styled-system/recipes");
2077
- var import_jsx_runtime36 = require("react/jsx-runtime");
2019
+ var import_css33 = require("@cerberus/styled-system/css");
2020
+ var import_recipes26 = require("@cerberus/styled-system/recipes");
2021
+ var import_jsx_runtime39 = require("react/jsx-runtime");
2078
2022
  function NotificationHeading(props) {
2079
2023
  const { palette, ...nativeProps } = props;
2080
- const styles = (0, import_recipes23.notification)({ palette });
2081
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { className: (0, import_css30.cx)(nativeProps.className, styles.heading), ...nativeProps });
2024
+ const styles = (0, import_recipes26.notification)({ palette });
2025
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: (0, import_css33.cx)(nativeProps.className, styles.heading), ...nativeProps });
2082
2026
  }
2083
2027
 
2084
2028
  // src/components/NotificationDescription.tsx
2085
- var import_css31 = require("@cerberus/styled-system/css");
2086
- var import_recipes24 = require("@cerberus/styled-system/recipes");
2087
- var import_jsx_runtime37 = require("react/jsx-runtime");
2029
+ var import_css34 = require("@cerberus/styled-system/css");
2030
+ var import_recipes27 = require("@cerberus/styled-system/recipes");
2031
+ var import_jsx_runtime40 = require("react/jsx-runtime");
2088
2032
  function NotificationDescription(props) {
2089
2033
  const { palette, ...nativeProps } = props;
2090
- const styles = (0, import_recipes24.notification)({ palette });
2091
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
2034
+ const styles = (0, import_recipes27.notification)({ palette });
2035
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
2092
2036
  "p",
2093
2037
  {
2094
- className: (0, import_css31.cx)(nativeProps.className, styles.description),
2038
+ className: (0, import_css34.cx)(nativeProps.className, styles.description),
2095
2039
  ...nativeProps
2096
2040
  }
2097
2041
  );
2098
2042
  }
2099
2043
 
2100
2044
  // src/components/Radio.tsx
2101
- var import_css32 = require("@cerberus/styled-system/css");
2045
+ var import_css35 = require("@cerberus/styled-system/css");
2102
2046
  var import_patterns12 = require("@cerberus/styled-system/patterns");
2103
- var import_recipes25 = require("@cerberus/styled-system/recipes");
2104
- var import_jsx_runtime38 = require("react/jsx-runtime");
2047
+ var import_recipes28 = require("@cerberus/styled-system/recipes");
2048
+ var import_jsx_runtime41 = require("react/jsx-runtime");
2105
2049
  function Radio(props) {
2106
2050
  const { children, size, ...nativeProps } = props;
2107
2051
  const { invalid, ...state } = useFieldContext();
2108
- const styles = (0, import_recipes25.radio)({ size });
2109
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
2052
+ const styles = (0, import_recipes28.radio)({ size });
2053
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
2110
2054
  "div",
2111
2055
  {
2112
- className: (0, import_css32.cx)(
2056
+ className: (0, import_css35.cx)(
2113
2057
  "group",
2114
2058
  (0, import_patterns12.hstack)({
2115
2059
  gap: "sm"
@@ -2118,13 +2062,13 @@ function Radio(props) {
2118
2062
  ),
2119
2063
  tabIndex: 0,
2120
2064
  children: [
2121
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
2065
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
2122
2066
  "input",
2123
2067
  {
2124
2068
  ...nativeProps,
2125
2069
  ...state,
2126
2070
  ...invalid && { "aria-invalid": true },
2127
- className: (0, import_css32.cx)(nativeProps.className, styles.input),
2071
+ className: (0, import_css35.cx)(nativeProps.className, styles.input),
2128
2072
  tabIndex: -1,
2129
2073
  type: "radio"
2130
2074
  }
@@ -2136,19 +2080,20 @@ function Radio(props) {
2136
2080
  }
2137
2081
 
2138
2082
  // src/components/Select.tsx
2139
- var import_css33 = require("@cerberus/styled-system/css");
2083
+ var import_css36 = require("@cerberus/styled-system/css");
2140
2084
  var import_patterns13 = require("@cerberus/styled-system/patterns");
2141
- var import_recipes26 = require("@cerberus/styled-system/recipes");
2142
- var import_jsx_runtime39 = require("react/jsx-runtime");
2085
+ var import_recipes29 = require("@cerberus/styled-system/recipes");
2086
+ var import_jsx_runtime42 = require("react/jsx-runtime");
2143
2087
  function Select(props) {
2144
2088
  const { describedBy, size, ...nativeProps } = props;
2145
2089
  const { invalid, ...fieldStates } = useFieldContext();
2146
- const { invalid: InvalidIcon, selectArrow: SelectArrow } = $cerberusIcons;
2147
- const styles = (0, import_recipes26.select)({
2090
+ const { icons } = useCerberusContext();
2091
+ const { invalid: InvalidIcon, selectArrow: SelectArrow } = icons;
2092
+ const styles = (0, import_recipes29.select)({
2148
2093
  size
2149
2094
  });
2150
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: styles.root, children: [
2151
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
2095
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: styles.root, children: [
2096
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
2152
2097
  "select",
2153
2098
  {
2154
2099
  ...nativeProps,
@@ -2158,38 +2103,38 @@ function Select(props) {
2158
2103
  className: styles.input
2159
2104
  }
2160
2105
  ),
2161
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
2106
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
2162
2107
  "span",
2163
2108
  {
2164
- className: (0, import_css33.cx)(
2109
+ className: (0, import_css36.cx)(
2165
2110
  styles.iconStack,
2166
2111
  (0, import_patterns13.hstack)({
2167
2112
  gap: "2"
2168
2113
  })
2169
2114
  ),
2170
2115
  children: [
2171
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Show, { when: invalid, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
2116
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Show, { when: invalid, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
2172
2117
  "span",
2173
2118
  {
2174
2119
  ...invalid && { "data-invalid": true },
2175
2120
  className: styles.stateIcon,
2176
- children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(InvalidIcon, {})
2121
+ children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(InvalidIcon, {})
2177
2122
  }
2178
2123
  ) }),
2179
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: styles.arrowIcon, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(SelectArrow, {}) })
2124
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: styles.arrowIcon, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(SelectArrow, {}) })
2180
2125
  ]
2181
2126
  }
2182
2127
  )
2183
2128
  ] });
2184
2129
  }
2185
2130
  function Option(props) {
2186
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("option", { ...props });
2131
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("option", { ...props });
2187
2132
  }
2188
2133
 
2189
2134
  // src/components/Spinner.tsx
2190
- var import_jsx_runtime40 = require("react/jsx-runtime");
2135
+ var import_jsx_runtime43 = require("react/jsx-runtime");
2191
2136
  function Spinner(props) {
2192
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
2137
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
2193
2138
  "svg",
2194
2139
  {
2195
2140
  "aria-busy": "true",
@@ -2199,7 +2144,7 @@ function Spinner(props) {
2199
2144
  width: props.size,
2200
2145
  viewBox: "0 0 24 24",
2201
2146
  ...props,
2202
- children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
2147
+ children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
2203
2148
  "g",
2204
2149
  {
2205
2150
  fill: "none",
@@ -2208,14 +2153,14 @@ function Spinner(props) {
2208
2153
  strokeLinejoin: "round",
2209
2154
  strokeWidth: 2,
2210
2155
  children: [
2211
- /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
2156
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
2212
2157
  "path",
2213
2158
  {
2214
2159
  strokeDasharray: 16,
2215
2160
  strokeDashoffset: 16,
2216
2161
  d: "M12 3c4.97 0 9 4.03 9 9",
2217
2162
  children: [
2218
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
2163
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
2219
2164
  "animate",
2220
2165
  {
2221
2166
  fill: "freeze",
@@ -2224,7 +2169,7 @@ function Spinner(props) {
2224
2169
  values: "16;0"
2225
2170
  }
2226
2171
  ),
2227
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
2172
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
2228
2173
  "animateTransform",
2229
2174
  {
2230
2175
  attributeName: "transform",
@@ -2237,14 +2182,14 @@ function Spinner(props) {
2237
2182
  ]
2238
2183
  }
2239
2184
  ),
2240
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
2185
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
2241
2186
  "path",
2242
2187
  {
2243
2188
  strokeDasharray: 64,
2244
2189
  strokeDashoffset: 64,
2245
2190
  strokeOpacity: 0.3,
2246
2191
  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",
2247
- children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
2192
+ children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
2248
2193
  "animate",
2249
2194
  {
2250
2195
  fill: "freeze",
@@ -2264,12 +2209,12 @@ function Spinner(props) {
2264
2209
 
2265
2210
  // src/components/Tabs.client.tsx
2266
2211
  var import_tabs2 = require("@ark-ui/react/tabs");
2267
- var import_css34 = require("@cerberus/styled-system/css");
2212
+ var import_css37 = require("@cerberus/styled-system/css");
2268
2213
 
2269
2214
  // src/context/tabs.tsx
2270
2215
  var import_tabs = require("@ark-ui/react/tabs");
2271
- var import_recipes27 = require("@cerberus/styled-system/recipes");
2272
- var import_react16 = require("react");
2216
+ var import_recipes30 = require("@cerberus/styled-system/recipes");
2217
+ var import_react21 = require("react");
2273
2218
 
2274
2219
  // src/utils/localStorage.ts
2275
2220
  function getLocalStorage(key, defaultValue) {
@@ -2285,19 +2230,19 @@ function setLocalStorage(key, value) {
2285
2230
  }
2286
2231
 
2287
2232
  // src/context/tabs.tsx
2288
- var import_jsx_runtime41 = require("react/jsx-runtime");
2289
- var TabsContext = (0, import_react16.createContext)(null);
2233
+ var import_jsx_runtime44 = require("react/jsx-runtime");
2234
+ var TabsContext = (0, import_react21.createContext)(null);
2290
2235
  function Tabs(props) {
2291
2236
  const { cache, defaultValue, palette, uuid, ...arkProps } = props;
2292
- const [activeTab, setActiveTab] = (0, import_react16.useState)(
2237
+ const [activeTab, setActiveTab] = (0, import_react21.useState)(
2293
2238
  () => cache ? "" : defaultValue
2294
2239
  );
2295
- const styles = (0, import_recipes27.tabs)({ palette });
2296
- const cacheKey = (0, import_react16.useMemo)(
2240
+ const styles = (0, import_recipes30.tabs)({ palette });
2241
+ const cacheKey = (0, import_react21.useMemo)(
2297
2242
  () => uuid ? `cerberus-tabs-${uuid}` : "cerberus-tabs",
2298
2243
  [uuid]
2299
2244
  );
2300
- const handleValueChange = (0, import_react16.useCallback)(
2245
+ const handleValueChange = (0, import_react21.useCallback)(
2301
2246
  (details) => {
2302
2247
  if (cache) {
2303
2248
  setLocalStorage(cacheKey, details.value);
@@ -2306,20 +2251,20 @@ function Tabs(props) {
2306
2251
  },
2307
2252
  [cache]
2308
2253
  );
2309
- (0, import_react16.useEffect)(() => {
2254
+ (0, import_react21.useEffect)(() => {
2310
2255
  if (cache && !activeTab) {
2311
2256
  const cachedTab = getLocalStorage(cacheKey, defaultValue ?? "");
2312
2257
  setActiveTab(cachedTab);
2313
2258
  }
2314
2259
  }, [cache, defaultValue, activeTab]);
2315
- const value = (0, import_react16.useMemo)(
2260
+ const value = (0, import_react21.useMemo)(
2316
2261
  () => ({
2317
2262
  active: activeTab,
2318
2263
  styles
2319
2264
  }),
2320
2265
  [activeTab, palette, styles]
2321
2266
  );
2322
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(TabsContext.Provider, { value, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
2267
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(TabsContext.Provider, { value, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
2323
2268
  import_tabs.Tabs.Root,
2324
2269
  {
2325
2270
  ...arkProps,
@@ -2333,7 +2278,7 @@ function Tabs(props) {
2333
2278
  ) });
2334
2279
  }
2335
2280
  function useTabsContext() {
2336
- const context = (0, import_react16.useContext)(TabsContext);
2281
+ const context = (0, import_react21.useContext)(TabsContext);
2337
2282
  if (!context) {
2338
2283
  throw new Error("useTabsContext must be used within a Tabs Provider.");
2339
2284
  }
@@ -2341,18 +2286,18 @@ function useTabsContext() {
2341
2286
  }
2342
2287
 
2343
2288
  // src/components/Tabs.client.tsx
2344
- var import_jsx_runtime42 = require("react/jsx-runtime");
2289
+ var import_jsx_runtime45 = require("react/jsx-runtime");
2345
2290
  function TabsList(props) {
2346
2291
  const { children, ...tabsProps } = props;
2347
2292
  const { styles } = useTabsContext();
2348
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
2293
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
2349
2294
  import_tabs2.Tabs.List,
2350
2295
  {
2351
2296
  ...tabsProps,
2352
- className: (0, import_css34.cx)(tabsProps.className, styles.list),
2297
+ className: (0, import_css37.cx)(tabsProps.className, styles.list),
2353
2298
  children: [
2354
2299
  children,
2355
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(TabIndicator, {})
2300
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(TabIndicator, {})
2356
2301
  ]
2357
2302
  }
2358
2303
  );
@@ -2360,90 +2305,90 @@ function TabsList(props) {
2360
2305
  var TabList = TabsList;
2361
2306
  function Tab(props) {
2362
2307
  const { styles } = useTabsContext();
2363
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
2308
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
2364
2309
  import_tabs2.Tabs.Trigger,
2365
2310
  {
2366
2311
  ...props,
2367
- className: (0, import_css34.cx)(props.className, styles.trigger)
2312
+ className: (0, import_css37.cx)(props.className, styles.trigger)
2368
2313
  }
2369
2314
  );
2370
2315
  }
2371
2316
  function TabIndicator(props) {
2372
2317
  const { styles } = useTabsContext();
2373
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
2318
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
2374
2319
  import_tabs2.Tabs.Indicator,
2375
2320
  {
2376
2321
  ...props,
2377
- className: (0, import_css34.cx)(props.className, styles.indicator)
2322
+ className: (0, import_css37.cx)(props.className, styles.indicator)
2378
2323
  }
2379
2324
  );
2380
2325
  }
2381
2326
  function TabPanel(props) {
2382
2327
  const { styles } = useTabsContext();
2383
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
2328
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
2384
2329
  import_tabs2.Tabs.Content,
2385
2330
  {
2386
2331
  ...props,
2387
- className: (0, import_css34.cx)(props.className, styles.content)
2332
+ className: (0, import_css37.cx)(props.className, styles.content)
2388
2333
  }
2389
2334
  );
2390
2335
  }
2391
2336
 
2392
2337
  // src/components/Table.tsx
2393
- var import_css35 = require("@cerberus/styled-system/css");
2394
- var import_recipes28 = require("@cerberus/styled-system/recipes");
2395
- var import_jsx_runtime43 = require("react/jsx-runtime");
2338
+ var import_css38 = require("@cerberus/styled-system/css");
2339
+ var import_recipes31 = require("@cerberus/styled-system/recipes");
2340
+ var import_jsx_runtime46 = require("react/jsx-runtime");
2396
2341
  function Table(props) {
2397
2342
  const { caption, children, ...nativeProps } = props;
2398
- const styles = (0, import_recipes28.table)();
2399
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: styles.container, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
2343
+ const styles = (0, import_recipes31.table)();
2344
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: styles.container, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
2400
2345
  "table",
2401
2346
  {
2402
2347
  ...nativeProps,
2403
- className: (0, import_css35.cx)(nativeProps.className, styles.table),
2348
+ className: (0, import_css38.cx)(nativeProps.className, styles.table),
2404
2349
  children: [
2405
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("caption", { className: styles.caption, children: caption }),
2350
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("caption", { className: styles.caption, children: caption }),
2406
2351
  children
2407
2352
  ]
2408
2353
  }
2409
2354
  ) });
2410
2355
  }
2411
2356
  function Tr(props) {
2412
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("tr", { ...props });
2357
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("tr", { ...props });
2413
2358
  }
2414
2359
 
2415
2360
  // src/components/Thead.tsx
2416
- var import_css36 = require("@cerberus/styled-system/css");
2417
- var import_recipes29 = require("@cerberus/styled-system/recipes");
2418
- var import_jsx_runtime44 = require("react/jsx-runtime");
2361
+ var import_css39 = require("@cerberus/styled-system/css");
2362
+ var import_recipes32 = require("@cerberus/styled-system/recipes");
2363
+ var import_jsx_runtime47 = require("react/jsx-runtime");
2419
2364
  function Thead(props) {
2420
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("thead", { ...props, className: (0, import_css36.cx)(props.className, (0, import_recipes29.thead)()) });
2365
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("thead", { ...props, className: (0, import_css39.cx)(props.className, (0, import_recipes32.thead)()) });
2421
2366
  }
2422
2367
 
2423
2368
  // src/components/Th.tsx
2424
- var import_css37 = require("@cerberus/styled-system/css");
2425
- var import_recipes30 = require("@cerberus/styled-system/recipes");
2426
- var import_jsx_runtime45 = require("react/jsx-runtime");
2369
+ var import_css40 = require("@cerberus/styled-system/css");
2370
+ var import_recipes33 = require("@cerberus/styled-system/recipes");
2371
+ var import_jsx_runtime48 = require("react/jsx-runtime");
2427
2372
  function Th(props) {
2428
2373
  const { size, onClick, ...nativeProps } = props;
2429
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
2374
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
2430
2375
  Show,
2431
2376
  {
2432
2377
  when: Boolean(onClick),
2433
- fallback: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
2378
+ fallback: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
2434
2379
  "th",
2435
2380
  {
2436
2381
  ...nativeProps,
2437
- className: (0, import_css37.cx)(nativeProps.className, (0, import_recipes30.th)({ size }))
2382
+ className: (0, import_css40.cx)(nativeProps.className, (0, import_recipes33.th)({ size }))
2438
2383
  }
2439
2384
  ),
2440
- children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("th", { ...nativeProps, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
2385
+ children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("th", { ...nativeProps, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
2441
2386
  "button",
2442
2387
  {
2443
- className: (0, import_css37.cx)(
2388
+ className: (0, import_css40.cx)(
2444
2389
  nativeProps.className,
2445
- (0, import_recipes30.th)({ size }),
2446
- (0, import_css37.css)({
2390
+ (0, import_recipes33.th)({ size }),
2391
+ (0, import_css40.css)({
2447
2392
  alignItems: "center",
2448
2393
  display: "inline-flex",
2449
2394
  justifyContent: "space-between",
@@ -2463,18 +2408,18 @@ function Th(props) {
2463
2408
  }
2464
2409
 
2465
2410
  // src/components/Td.tsx
2466
- var import_css38 = require("@cerberus/styled-system/css");
2467
- var import_recipes31 = require("@cerberus/styled-system/recipes");
2468
- var import_jsx_runtime46 = require("react/jsx-runtime");
2411
+ var import_css41 = require("@cerberus/styled-system/css");
2412
+ var import_recipes34 = require("@cerberus/styled-system/recipes");
2413
+ var import_jsx_runtime49 = require("react/jsx-runtime");
2469
2414
  function Td(props) {
2470
2415
  const { size, ...nativeProps } = props;
2471
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
2416
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
2472
2417
  "td",
2473
2418
  {
2474
2419
  ...nativeProps,
2475
- className: (0, import_css38.cx)(
2420
+ className: (0, import_css41.cx)(
2476
2421
  nativeProps.className,
2477
- (0, import_recipes31.td)({
2422
+ (0, import_recipes34.td)({
2478
2423
  size
2479
2424
  })
2480
2425
  )
@@ -2483,18 +2428,18 @@ function Td(props) {
2483
2428
  }
2484
2429
 
2485
2430
  // src/components/Tbody.tsx
2486
- var import_recipes32 = require("@cerberus/styled-system/recipes");
2487
- var import_css39 = require("@cerberus/styled-system/css");
2488
- var import_jsx_runtime47 = require("react/jsx-runtime");
2431
+ var import_recipes35 = require("@cerberus/styled-system/recipes");
2432
+ var import_css42 = require("@cerberus/styled-system/css");
2433
+ var import_jsx_runtime50 = require("react/jsx-runtime");
2489
2434
  function Tbody(props) {
2490
2435
  const { decoration, ...nativeProps } = props;
2491
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
2436
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
2492
2437
  "tbody",
2493
2438
  {
2494
2439
  ...nativeProps,
2495
- className: (0, import_css39.cx)(
2440
+ className: (0, import_css42.cx)(
2496
2441
  nativeProps.className,
2497
- (0, import_recipes32.tbody)({
2442
+ (0, import_recipes35.tbody)({
2498
2443
  decoration
2499
2444
  })
2500
2445
  )
@@ -2503,23 +2448,24 @@ function Tbody(props) {
2503
2448
  }
2504
2449
 
2505
2450
  // src/components/Tag.tsx
2506
- var import_css40 = require("@cerberus/styled-system/css");
2507
- var import_recipes33 = require("@cerberus/styled-system/recipes");
2508
- var import_jsx_runtime48 = require("react/jsx-runtime");
2451
+ var import_css43 = require("@cerberus/styled-system/css");
2452
+ var import_recipes36 = require("@cerberus/styled-system/recipes");
2453
+ var import_jsx_runtime51 = require("react/jsx-runtime");
2509
2454
  function Tag(props) {
2510
2455
  const { shape: initShape, gradient, onClick, usage, ...nativeProps } = props;
2511
2456
  const palette = (props == null ? void 0 : props.palette) ?? "page";
2512
2457
  const isClosable = Boolean(onClick);
2513
2458
  const shape = isClosable ? "pill" : initShape;
2514
2459
  const closableStyles = isClosable ? closableCss : "";
2515
- const { close: Close2 } = $cerberusIcons;
2516
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
2460
+ const { icons } = useCerberusContext();
2461
+ const { close: Close } = icons;
2462
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
2517
2463
  "span",
2518
2464
  {
2519
2465
  ...nativeProps,
2520
- className: (0, import_css40.cx)(
2466
+ className: (0, import_css43.cx)(
2521
2467
  nativeProps.className,
2522
- (0, import_recipes33.tag)({
2468
+ (0, import_recipes36.tag)({
2523
2469
  gradient,
2524
2470
  palette,
2525
2471
  shape,
@@ -2529,24 +2475,24 @@ function Tag(props) {
2529
2475
  ),
2530
2476
  children: [
2531
2477
  props.children,
2532
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Show, { when: isClosable, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
2478
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Show, { when: isClosable, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
2533
2479
  "button",
2534
2480
  {
2535
2481
  "aria-label": "Close",
2536
- className: (0, import_recipes33.iconButton)({
2482
+ className: (0, import_recipes36.iconButton)({
2537
2483
  palette: "action",
2538
2484
  usage: "filled",
2539
2485
  size: "sm"
2540
2486
  }),
2541
2487
  onClick,
2542
- children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Close2, {})
2488
+ children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Close, {})
2543
2489
  }
2544
2490
  ) })
2545
2491
  ]
2546
2492
  }
2547
2493
  );
2548
2494
  }
2549
- var closableCss = (0, import_css40.css)({
2495
+ var closableCss = (0, import_css43.css)({
2550
2496
  bgColor: "action.bg.active",
2551
2497
  color: "action.text.initial",
2552
2498
  paddingInlineEnd: "0"
@@ -2554,53 +2500,53 @@ var closableCss = (0, import_css40.css)({
2554
2500
 
2555
2501
  // src/components/Text.tsx
2556
2502
  var import_jsx = require("@cerberus/styled-system/jsx");
2557
- var import_jsx_runtime49 = require("react/jsx-runtime");
2503
+ var import_jsx_runtime52 = require("react/jsx-runtime");
2558
2504
  function Text(props) {
2559
2505
  const { as = "p", ...pandaJSXProps } = props;
2560
2506
  switch (as) {
2561
2507
  case "h1":
2562
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_jsx.H1, { ...pandaJSXProps });
2508
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_jsx.H1, { ...pandaJSXProps });
2563
2509
  case "h2":
2564
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_jsx.H2, { ...pandaJSXProps });
2510
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_jsx.H2, { ...pandaJSXProps });
2565
2511
  case "h3":
2566
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_jsx.H3, { ...pandaJSXProps });
2512
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_jsx.H3, { ...pandaJSXProps });
2567
2513
  case "h4":
2568
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_jsx.H4, { ...pandaJSXProps });
2514
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_jsx.H4, { ...pandaJSXProps });
2569
2515
  case "h5":
2570
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_jsx.H5, { ...pandaJSXProps });
2516
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_jsx.H5, { ...pandaJSXProps });
2571
2517
  case "h6":
2572
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_jsx.H6, { ...pandaJSXProps });
2518
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_jsx.H6, { ...pandaJSXProps });
2573
2519
  case "strong":
2574
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_jsx.Strong, { ...pandaJSXProps });
2520
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_jsx.Strong, { ...pandaJSXProps });
2575
2521
  case "em":
2576
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_jsx.Em, { ...pandaJSXProps });
2522
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_jsx.Em, { ...pandaJSXProps });
2577
2523
  case "small":
2578
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_jsx.Small, { ...pandaJSXProps });
2524
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_jsx.Small, { ...pandaJSXProps });
2579
2525
  case "span":
2580
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_jsx.Span, { ...pandaJSXProps });
2526
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_jsx.Span, { ...pandaJSXProps });
2581
2527
  default:
2582
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_jsx.P, { ...pandaJSXProps });
2528
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_jsx.P, { ...pandaJSXProps });
2583
2529
  }
2584
2530
  }
2585
2531
 
2586
2532
  // src/components/Textarea.tsx
2587
- var import_css41 = require("@cerberus/styled-system/css");
2588
- var import_recipes34 = require("@cerberus/styled-system/recipes");
2589
- var import_jsx_runtime50 = require("react/jsx-runtime");
2533
+ var import_css44 = require("@cerberus/styled-system/css");
2534
+ var import_recipes37 = require("@cerberus/styled-system/recipes");
2535
+ var import_jsx_runtime53 = require("react/jsx-runtime");
2590
2536
  function Textarea(props) {
2591
2537
  const { describedBy, ...nativeProps } = props;
2592
2538
  const { invalid, ...fieldState } = useFieldContext();
2593
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
2539
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
2594
2540
  "textarea",
2595
2541
  {
2596
2542
  ...nativeProps,
2597
2543
  ...fieldState,
2598
2544
  ...describedBy && { "aria-describedby": describedBy },
2599
2545
  ...invalid && { "aria-invalid": true },
2600
- className: (0, import_css41.cx)(
2546
+ className: (0, import_css44.cx)(
2601
2547
  props.className,
2602
- (0, import_recipes34.input)().input,
2603
- (0, import_css41.css)({
2548
+ (0, import_recipes37.input)().input,
2549
+ (0, import_css44.css)({
2604
2550
  pxi: "2",
2605
2551
  py: "2",
2606
2552
  resize: "vertical"
@@ -2612,43 +2558,44 @@ function Textarea(props) {
2612
2558
  }
2613
2559
 
2614
2560
  // src/components/Toggle.tsx
2615
- var import_css42 = require("@cerberus/styled-system/css");
2561
+ var import_css45 = require("@cerberus/styled-system/css");
2616
2562
  var import_patterns14 = require("@cerberus/styled-system/patterns");
2617
- var import_recipes35 = require("@cerberus/styled-system/recipes");
2618
- var import_jsx_runtime51 = require("react/jsx-runtime");
2563
+ var import_recipes38 = require("@cerberus/styled-system/recipes");
2564
+ var import_jsx_runtime54 = require("react/jsx-runtime");
2619
2565
  function Toggle(props) {
2620
2566
  const { size, describedBy, ...nativeProps } = props;
2621
- const styles = (0, import_recipes35.toggle)({ size });
2567
+ const styles = (0, import_recipes38.toggle)({ size });
2622
2568
  const { invalid, ...state } = useFieldContext();
2623
- const Icon = $cerberusIcons.toggleChecked;
2624
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
2569
+ const { icons } = useCerberusContext();
2570
+ const CheckedIcon = icons.toggleChecked;
2571
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
2625
2572
  "span",
2626
2573
  {
2627
- className: (0, import_css42.cx)("group", styles.track, (0, import_patterns14.hstack)()),
2574
+ className: (0, import_css45.cx)("group", styles.track, (0, import_patterns14.hstack)()),
2628
2575
  "data-checked": props.checked || props.defaultChecked,
2629
2576
  children: [
2630
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
2577
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
2631
2578
  "input",
2632
2579
  {
2633
2580
  ...nativeProps,
2634
2581
  ...state,
2635
2582
  ...describedBy && { "aria-describedby": describedBy },
2636
2583
  ...invalid && { "aria-invalid": true },
2637
- className: (0, import_css42.cx)("peer", styles.input),
2584
+ className: (0, import_css45.cx)("peer", styles.input),
2638
2585
  role: "switch",
2639
2586
  type: "checkbox"
2640
2587
  }
2641
2588
  ),
2642
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
2589
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
2643
2590
  "span",
2644
2591
  {
2645
- className: (0, import_css42.cx)(
2592
+ className: (0, import_css45.cx)(
2646
2593
  styles.thumb,
2647
2594
  (0, import_patterns14.vstack)({
2648
2595
  justify: "center"
2649
2596
  })
2650
2597
  ),
2651
- children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Icon, {})
2598
+ children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(CheckedIcon, {})
2652
2599
  }
2653
2600
  )
2654
2601
  ]
@@ -2658,24 +2605,24 @@ function Toggle(props) {
2658
2605
 
2659
2606
  // src/components/Tooltip.tsx
2660
2607
  var import_tooltip = require("@ark-ui/react/tooltip");
2661
- var import_css43 = require("@cerberus/styled-system/css");
2662
- var import_recipes36 = require("@cerberus/styled-system/recipes");
2663
- var import_jsx_runtime52 = require("react/jsx-runtime");
2608
+ var import_css46 = require("@cerberus/styled-system/css");
2609
+ var import_recipes39 = require("@cerberus/styled-system/recipes");
2610
+ var import_jsx_runtime55 = require("react/jsx-runtime");
2664
2611
  function Tooltip(props) {
2665
2612
  const { content, children, asChild, ...nativeProps } = props;
2666
- const styles = (0, import_recipes36.tooltip)();
2613
+ const styles = (0, import_recipes39.tooltip)();
2667
2614
  const position = {
2668
2615
  placement: props.position || "top"
2669
2616
  };
2670
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_tooltip.Tooltip.Root, { openDelay: 400, positioning: position, children: [
2671
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_tooltip.Tooltip.Trigger, { className: styles.trigger, asChild, children }),
2672
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_tooltip.Tooltip.Positioner, { children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
2617
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_tooltip.Tooltip.Root, { openDelay: 400, positioning: position, children: [
2618
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_tooltip.Tooltip.Trigger, { className: styles.trigger, asChild, children }),
2619
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_tooltip.Tooltip.Positioner, { children: /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
2673
2620
  import_tooltip.Tooltip.Content,
2674
2621
  {
2675
2622
  ...nativeProps,
2676
- className: (0, import_css43.cx)(nativeProps.className, styles.content),
2623
+ className: (0, import_css46.cx)(nativeProps.className, styles.content),
2677
2624
  children: [
2678
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_tooltip.Tooltip.Arrow, { className: styles.arrow, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_tooltip.Tooltip.ArrowTip, { className: styles.arrowTip }) }),
2625
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_tooltip.Tooltip.Arrow, { className: styles.arrow, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_tooltip.Tooltip.ArrowTip, { className: styles.arrowTip }) }),
2679
2626
  content
2680
2627
  ]
2681
2628
  }
@@ -2684,51 +2631,23 @@ function Tooltip(props) {
2684
2631
  }
2685
2632
 
2686
2633
  // src/context/confirm-modal.tsx
2687
- var import_react18 = require("react");
2688
- var import_css44 = require("@cerberus/styled-system/css");
2689
- var import_patterns15 = require("@cerberus/styled-system/patterns");
2690
-
2691
- // src/hooks/useModal.ts
2692
- var import_react17 = require("react");
2693
- function useModal() {
2694
- const modalRef = (0, import_react17.useRef)(null);
2695
- const [isOpen, setIsOpen] = (0, import_react17.useState)(false);
2696
- const show = (0, import_react17.useCallback)(() => {
2697
- var _a;
2698
- (_a = modalRef.current) == null ? void 0 : _a.showModal();
2699
- setIsOpen(true);
2700
- }, []);
2701
- const close = (0, import_react17.useCallback)(() => {
2702
- var _a;
2703
- (_a = modalRef.current) == null ? void 0 : _a.close();
2704
- setIsOpen(false);
2705
- }, []);
2706
- return (0, import_react17.useMemo)(() => {
2707
- return {
2708
- modalRef,
2709
- show,
2710
- close,
2711
- isOpen
2712
- };
2713
- }, [modalRef, show, close, isOpen]);
2714
- }
2715
-
2716
- // src/context/confirm-modal.tsx
2634
+ var import_react22 = require("react");
2635
+ var import_css47 = require("@cerberus/styled-system/css");
2717
2636
  var import_jsx2 = require("@cerberus/styled-system/jsx");
2718
- var import_jsx_runtime53 = require("react/jsx-runtime");
2719
- var ConfirmModalContext = (0, import_react18.createContext)(null);
2637
+ var import_jsx_runtime56 = require("react/jsx-runtime");
2638
+ var ConfirmModalContext = (0, import_react22.createContext)(null);
2720
2639
  function ConfirmModal(props) {
2721
- const { modalRef, show, close } = useModal();
2722
- const resolveRef = (0, import_react18.useRef)(null);
2723
- const [content, setContent] = (0, import_react18.useState)(null);
2724
- const focusTrap = trapFocus(modalRef);
2725
- const ConfirmIcon = $cerberusIcons.confirmModal;
2640
+ const [open, setOpen] = (0, import_react22.useState)(false);
2641
+ const [content, setContent] = (0, import_react22.useState)(null);
2642
+ const resolveRef = (0, import_react22.useRef)(null);
2726
2643
  const kind = (content == null ? void 0 : content.kind) ?? "non-destructive";
2727
- const palette = (0, import_react18.useMemo)(
2644
+ const { icons } = useCerberusContext();
2645
+ const { confirmModal: ConfirmIcon } = icons;
2646
+ const palette = (0, import_react22.useMemo)(
2728
2647
  () => kind === "destructive" ? "danger" : "action",
2729
2648
  [kind]
2730
2649
  );
2731
- const handleChoice = (0, import_react18.useCallback)(
2650
+ const handleChoice = (0, import_react22.useCallback)(
2732
2651
  (e) => {
2733
2652
  var _a, _b;
2734
2653
  const target = e.currentTarget;
@@ -2736,56 +2655,56 @@ function ConfirmModal(props) {
2736
2655
  (_a = resolveRef.current) == null ? void 0 : _a.call(resolveRef, true);
2737
2656
  }
2738
2657
  (_b = resolveRef.current) == null ? void 0 : _b.call(resolveRef, false);
2739
- close();
2658
+ setOpen(false);
2740
2659
  },
2741
- [close]
2660
+ [setOpen]
2742
2661
  );
2743
- const handleShow = (0, import_react18.useCallback)(
2662
+ const handleShow = (0, import_react22.useCallback)(
2744
2663
  (options) => {
2745
2664
  return new Promise((resolve) => {
2746
2665
  setContent({ ...options });
2747
- show();
2666
+ setOpen(true);
2748
2667
  resolveRef.current = resolve;
2749
2668
  });
2750
2669
  },
2751
- [show]
2670
+ [setOpen, setContent]
2752
2671
  );
2753
- const value = (0, import_react18.useMemo)(
2672
+ const value = (0, import_react22.useMemo)(
2754
2673
  () => ({
2755
2674
  show: handleShow
2756
2675
  }),
2757
2676
  [handleShow]
2758
2677
  );
2759
- return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(ConfirmModalContext.Provider, { value, children: [
2678
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(ConfirmModalContext.Provider, { value, children: [
2760
2679
  props.children,
2761
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Modal, { onKeyDown: focusTrap, ref: modalRef, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_jsx2.VStack, { gap: "xl", w: "full", children: [
2762
- /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(ModalHeader, { children: [
2763
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
2764
- "div",
2680
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(DialogProvider, { open, onOpenChange: (e) => setOpen(e.open), children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Dialog, { size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_jsx2.VStack, { gap: "xl", w: "full", children: [
2681
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_jsx2.VStack, { alignItems: "flex-start", gap: "md", w: "full", children: [
2682
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
2683
+ import_jsx2.HStack,
2765
2684
  {
2766
- className: (0, import_patterns15.hstack)({
2767
- justify: "center",
2768
- w: "full"
2769
- }),
2770
- children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
2685
+ alignSelf: "center",
2686
+ justify: "center",
2687
+ paddingBlockEnd: "md",
2688
+ w: "full",
2689
+ children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
2771
2690
  Show,
2772
2691
  {
2773
2692
  when: palette === "danger",
2774
- fallback: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
2693
+ fallback: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
2775
2694
  Avatar,
2776
2695
  {
2777
2696
  ariaLabel: "",
2778
2697
  gradient: "charon-light",
2779
- icon: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(ConfirmIcon, { size: 24 }),
2698
+ icon: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(ConfirmIcon, { size: 24 }),
2780
2699
  src: ""
2781
2700
  }
2782
2701
  ),
2783
- children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
2702
+ children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
2784
2703
  Avatar,
2785
2704
  {
2786
2705
  ariaLabel: "",
2787
2706
  gradient: "hades-dark",
2788
- icon: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(ConfirmIcon, { size: 24 }),
2707
+ icon: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(ConfirmIcon, { size: 24 }),
2789
2708
  src: ""
2790
2709
  }
2791
2710
  )
@@ -2793,15 +2712,15 @@ function ConfirmModal(props) {
2793
2712
  )
2794
2713
  }
2795
2714
  ),
2796
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(ModalHeading, { children: content == null ? void 0 : content.heading }),
2797
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(ModalDescription, { children: content == null ? void 0 : content.description })
2715
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(DialogHeading, { children: content == null ? void 0 : content.heading }),
2716
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(DialogDescription, { children: content == null ? void 0 : content.description })
2798
2717
  ] }),
2799
- /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_jsx2.HStack, { gap: "4", w: "full", children: [
2800
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
2718
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_jsx2.HStack, { gap: "4", w: "full", children: [
2719
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
2801
2720
  Button,
2802
2721
  {
2803
2722
  autoFocus: true,
2804
- className: (0, import_css44.css)({
2723
+ className: (0, import_css47.css)({
2805
2724
  w: "1/2"
2806
2725
  }),
2807
2726
  name: "confirm",
@@ -2811,10 +2730,10 @@ function ConfirmModal(props) {
2811
2730
  children: content == null ? void 0 : content.actionText
2812
2731
  }
2813
2732
  ),
2814
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
2733
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(DialogCloseTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
2815
2734
  Button,
2816
2735
  {
2817
- className: (0, import_css44.css)({
2736
+ className: (0, import_css47.css)({
2818
2737
  w: "1/2"
2819
2738
  }),
2820
2739
  name: "cancel",
@@ -2823,13 +2742,13 @@ function ConfirmModal(props) {
2823
2742
  value: "false",
2824
2743
  children: content == null ? void 0 : content.cancelText
2825
2744
  }
2826
- )
2745
+ ) })
2827
2746
  ] })
2828
2747
  ] }) }) })
2829
2748
  ] });
2830
2749
  }
2831
2750
  function useConfirmModal() {
2832
- const context = (0, import_react18.useContext)(ConfirmModalContext);
2751
+ const context = (0, import_react22.useContext)(ConfirmModalContext);
2833
2752
  if (context === null) {
2834
2753
  throw new Error(
2835
2754
  "useConfirmModal must be used within a ConfirmModal Provider"
@@ -2839,21 +2758,20 @@ function useConfirmModal() {
2839
2758
  }
2840
2759
 
2841
2760
  // src/context/cta-modal.tsx
2842
- var import_react19 = require("react");
2761
+ var import_react23 = require("react");
2843
2762
  var import_jsx3 = require("@cerberus/styled-system/jsx");
2844
- var import_css45 = require("@cerberus/styled-system/css");
2763
+ var import_css48 = require("@cerberus/styled-system/css");
2845
2764
  var import_jsx4 = require("@cerberus/styled-system/jsx");
2846
- var import_jsx_runtime54 = require("react/jsx-runtime");
2847
- var CTAModalContext = (0, import_react19.createContext)(null);
2765
+ var import_jsx_runtime57 = require("react/jsx-runtime");
2766
+ var CTAModalContext = (0, import_react23.createContext)(null);
2848
2767
  function CTAModal(props) {
2849
2768
  var _a, _b;
2850
- const { modalRef, show, close } = useModal();
2851
- const [content, setContent] = (0, import_react19.useState)(null);
2852
- const focusTrap = trapFocus(modalRef);
2853
- const FallbackIcon = $cerberusIcons.confirmModal;
2769
+ const [open, setOpen] = (0, import_react23.useState)(false);
2770
+ const [content, setContent] = (0, import_react23.useState)(null);
2854
2771
  const confirmIcon = content == null ? void 0 : content.icon;
2855
- const { close: CloseIcon } = $cerberusIcons;
2856
- const handleShow = (0, import_react19.useCallback)(
2772
+ const { icons } = useCerberusContext();
2773
+ const { confirmModal: FallbackIcon } = icons;
2774
+ const handleShow = (0, import_react23.useCallback)(
2857
2775
  (options) => {
2858
2776
  const maxActions = 2;
2859
2777
  if (options.actions.length > maxActions) {
@@ -2862,68 +2780,56 @@ function CTAModal(props) {
2862
2780
  );
2863
2781
  }
2864
2782
  setContent({ ...options });
2865
- show();
2783
+ setOpen(true);
2866
2784
  },
2867
- [show]
2785
+ [setOpen]
2868
2786
  );
2869
- const handleActionClick = (0, import_react19.useCallback)(
2787
+ const handleActionClick = (0, import_react23.useCallback)(
2870
2788
  (event) => {
2871
2789
  const index = event.currentTarget.getAttribute("data-index");
2872
2790
  const action = content == null ? void 0 : content.actions[Number(index)];
2873
2791
  const { onClick } = action || {};
2874
2792
  onClick == null ? void 0 : onClick(event);
2875
- close();
2793
+ setOpen(false);
2876
2794
  },
2877
- [content, close]
2795
+ [content, setOpen]
2878
2796
  );
2879
- const value = (0, import_react19.useMemo)(
2797
+ const value = (0, import_react23.useMemo)(
2880
2798
  () => ({
2881
2799
  show: handleShow
2882
2800
  }),
2883
2801
  [handleShow]
2884
2802
  );
2885
- return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(CTAModalContext.Provider, { value, children: [
2803
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(CTAModalContext.Provider, { value, children: [
2886
2804
  props.children,
2887
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(Modal, { onKeyDown: focusTrap, ref: modalRef, children: [
2888
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
2889
- "span",
2890
- {
2891
- className: (0, import_css45.css)({
2892
- padding: "md",
2893
- position: "absolute",
2894
- right: 0,
2895
- top: 0,
2896
- zIndex: "decorator"
2897
- }),
2898
- children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(IconButton, { ariaLabel: "Close modal", onClick: close, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(CloseIcon, {}) })
2899
- }
2900
- ),
2901
- /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_jsx4.VStack, { gap: "xl", w: "full", children: [
2902
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(ModalHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_jsx4.VStack, { gap: "lg", w: "full", children: [
2903
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
2805
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(DialogProvider, { open, onOpenChange: (e) => setOpen(e.open), children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(Dialog, { size: "sm", children: [
2806
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(DialogCloseIconTrigger, {}),
2807
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_jsx4.VStack, { gap: "xl", w: "full", children: [
2808
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_jsx4.VStack, { alignItems: "flex-start", gap: "md", w: "full", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_jsx4.VStack, { gap: "lg", w: "full", children: [
2809
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
2904
2810
  Avatar,
2905
2811
  {
2906
2812
  ariaLabel: "",
2907
2813
  gradient: "charon-light",
2908
- icon: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
2814
+ icon: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
2909
2815
  Show,
2910
2816
  {
2911
2817
  when: Boolean(confirmIcon),
2912
- fallback: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(FallbackIcon, { size: 24 }),
2818
+ fallback: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(FallbackIcon, { size: 24 }),
2913
2819
  children: confirmIcon
2914
2820
  }
2915
2821
  ),
2916
2822
  src: ""
2917
2823
  }
2918
2824
  ),
2919
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(ModalHeading, { children: content == null ? void 0 : content.heading }),
2920
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(ModalDescription, { children: content == null ? void 0 : content.description })
2825
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(DialogHeading, { children: content == null ? void 0 : content.heading }),
2826
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(DialogDescription, { children: content == null ? void 0 : content.description })
2921
2827
  ] }) }),
2922
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_jsx3.HStack, { gap: "md", w: "full", children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Show, { when: Boolean((_a = content == null ? void 0 : content.actions) == null ? void 0 : _a.length), children: (_b = content == null ? void 0 : content.actions) == null ? void 0 : _b.map((action, index) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
2828
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_jsx3.HStack, { gap: "md", w: "full", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Show, { when: Boolean((_a = content == null ? void 0 : content.actions) == null ? void 0 : _a.length), children: (_b = content == null ? void 0 : content.actions) == null ? void 0 : _b.map((action, index) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
2923
2829
  Button,
2924
2830
  {
2925
2831
  "data-index": index,
2926
- className: (0, import_css45.css)({
2832
+ className: (0, import_css48.css)({
2927
2833
  w: "1/2"
2928
2834
  }),
2929
2835
  onClick: handleActionClick,
@@ -2938,7 +2844,7 @@ function CTAModal(props) {
2938
2844
  ] });
2939
2845
  }
2940
2846
  function useCTAModal() {
2941
- const context = (0, import_react19.useContext)(CTAModalContext);
2847
+ const context = (0, import_react23.useContext)(CTAModalContext);
2942
2848
  if (context === null) {
2943
2849
  throw new Error("useCTAModal must be used within a CTAModal Provider");
2944
2850
  }
@@ -2946,50 +2852,103 @@ function useCTAModal() {
2946
2852
  }
2947
2853
 
2948
2854
  // src/context/notification-center.tsx
2949
- var import_react20 = require("react");
2950
- var import_patterns16 = require("@cerberus/styled-system/patterns");
2951
- var import_recipes37 = require("@cerberus/styled-system/recipes");
2952
- var import_css46 = require("@cerberus/styled-system/css");
2953
- var import_jsx_runtime55 = require("react/jsx-runtime");
2954
- var NotificationsContext = (0, import_react20.createContext)(null);
2855
+ var import_react24 = require("react");
2856
+ var import_patterns15 = require("@cerberus/styled-system/patterns");
2857
+ var import_recipes40 = require("@cerberus/styled-system/recipes");
2858
+ var import_css49 = require("@cerberus/styled-system/css");
2859
+
2860
+ // src/context/notification-center/store.ts
2861
+ function notificationCenterReducer(state, action) {
2862
+ switch (action.type) {
2863
+ case "ADD_NOTIFICATION":
2864
+ return [...state, action.payload];
2865
+ case "REMOVE_NOTIFICATION":
2866
+ return state.filter((n) => n.id !== action.payload.id);
2867
+ case "UPDATE_NOTIFICATION":
2868
+ return state.map(
2869
+ (n) => n.id === action.payload.id ? { ...n, ...action.payload } : n
2870
+ );
2871
+ case "CLEAR_NOTIFICATIONS":
2872
+ return [];
2873
+ default:
2874
+ return state;
2875
+ }
2876
+ }
2877
+ function addNotification(dispatch, options) {
2878
+ dispatch({ type: "ADD_NOTIFICATION", payload: { ...options } });
2879
+ }
2880
+ function removeNotification(dispatch, id) {
2881
+ dispatch({ type: "REMOVE_NOTIFICATION", payload: { id } });
2882
+ }
2883
+ function updateNotificationState(dispatch, options) {
2884
+ dispatch({ type: "UPDATE_NOTIFICATION", payload: { ...options } });
2885
+ }
2886
+ function clearNotificationState(dispatch) {
2887
+ dispatch({ type: "CLEAR_NOTIFICATIONS" });
2888
+ }
2889
+
2890
+ // src/context/notification-center.tsx
2891
+ var import_jsx_runtime58 = require("react/jsx-runtime");
2892
+ var NotificationsContext = (0, import_react24.createContext)(null);
2955
2893
  function NotificationCenter(props) {
2956
- const [activeNotifications, setActiveNotifications] = (0, import_react20.useState)([]);
2957
- const styles = (0, import_recipes37.notification)();
2958
- const handleNotify = (0, import_react20.useCallback)((options) => {
2959
- setActiveNotifications((prev) => {
2960
- const id = `${options.palette}:${prev.length + 1}`;
2961
- return [...prev, { ...options, id }];
2962
- });
2963
- }, []);
2964
- const handleClose = (0, import_react20.useCallback)((e) => {
2965
- const target = e.currentTarget;
2966
- setActiveNotifications((prev) => {
2967
- const item = prev.find((option) => option.id === target.value);
2968
- if (item == null ? void 0 : item.onClose) item.onClose();
2969
- return prev.filter((option) => option.id !== target.value);
2970
- });
2971
- }, []);
2972
- const handleCloseAll = (0, import_react20.useCallback)(() => {
2973
- setActiveNotifications((prev) => {
2974
- prev.forEach((item) => {
2975
- if (item.onClose) item.onClose();
2894
+ const [state, dispatch] = (0, import_react24.useReducer)(notificationCenterReducer, []);
2895
+ const styles = (0, import_recipes40.notification)();
2896
+ const timeout = (0, import_react24.useMemo)(
2897
+ () => props.duration || 6e3,
2898
+ [props.duration]
2899
+ );
2900
+ const closeNotification = (0, import_react24.useCallback)(
2901
+ (id) => {
2902
+ updateNotificationState(dispatch, {
2903
+ id,
2904
+ state: "closed"
2976
2905
  });
2977
- return [];
2906
+ window.setTimeout(() => {
2907
+ removeNotification(dispatch, id);
2908
+ }, 150);
2909
+ },
2910
+ [dispatch]
2911
+ );
2912
+ const handleNotify = (0, import_react24.useCallback)(
2913
+ (options) => {
2914
+ const id = `${options.palette}:${state.length + 1}`;
2915
+ addNotification(dispatch, {
2916
+ ...options,
2917
+ id,
2918
+ state: "open"
2919
+ });
2920
+ window.setTimeout(() => {
2921
+ closeNotification(id);
2922
+ }, timeout);
2923
+ },
2924
+ [dispatch, state, timeout, closeNotification]
2925
+ );
2926
+ const handleClose = (0, import_react24.useCallback)(
2927
+ (e) => {
2928
+ const target = e.currentTarget;
2929
+ closeNotification(target.value);
2930
+ },
2931
+ [closeNotification]
2932
+ );
2933
+ const handleCloseAll = (0, import_react24.useCallback)(() => {
2934
+ state.forEach((item) => {
2935
+ if (item.onClose) item.onClose();
2978
2936
  });
2979
- }, []);
2980
- const value = (0, import_react20.useMemo)(
2937
+ clearNotificationState(dispatch);
2938
+ }, [state, dispatch]);
2939
+ const value = (0, import_react24.useMemo)(
2981
2940
  () => ({
2982
2941
  notify: handleNotify
2983
2942
  }),
2984
2943
  [handleNotify]
2985
2944
  );
2986
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(NotificationsContext.Provider, { value, children: [
2945
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(NotificationsContext.Provider, { value, children: [
2987
2946
  props.children,
2988
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Show, { when: activeNotifications.length > 0, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Portal, { container: props.container, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: styles.center, children: [
2989
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Show, { when: activeNotifications.length >= 4, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
2947
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Show, { when: state.length > 0, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Portal, { container: props.container, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: styles.center, children: [
2948
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Show, { when: state.length >= 4, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
2990
2949
  Button,
2991
2950
  {
2992
- className: (0, import_css46.cx)(styles.closeAll, (0, import_patterns16.animateIn)()),
2951
+ className: (0, import_css49.cx)(styles.closeAll, (0, import_patterns15.animateIn)()),
2993
2952
  onClick: handleCloseAll,
2994
2953
  palette: "action",
2995
2954
  shape: "rounded",
@@ -2998,21 +2957,22 @@ function NotificationCenter(props) {
2998
2957
  children: "Close all"
2999
2958
  }
3000
2959
  ) }),
3001
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
2960
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
3002
2961
  "div",
3003
2962
  {
3004
- className: (0, import_patterns16.vstack)({
2963
+ className: (0, import_patterns15.vstack)({
3005
2964
  alignItems: "flex-end",
3006
2965
  gap: "4"
3007
2966
  }),
3008
2967
  style: {
3009
2968
  alignItems: "flex-end"
3010
2969
  },
3011
- children: activeNotifications.map((option) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
2970
+ children: state.map((option) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
3012
2971
  MatchNotification,
3013
2972
  {
3014
2973
  ...option,
3015
- onClose: handleClose
2974
+ onClose: handleClose,
2975
+ open: option.state
3016
2976
  },
3017
2977
  option.id
3018
2978
  ))
@@ -3022,53 +2982,42 @@ function NotificationCenter(props) {
3022
2982
  ] });
3023
2983
  }
3024
2984
  function MatchNotification(props) {
3025
- const { palette, id, onClose, heading, description } = props;
2985
+ const { palette, id, onClose, heading, description, open } = props;
2986
+ const sharedProps = (0, import_react24.useMemo)(
2987
+ () => ({
2988
+ id,
2989
+ open: true,
2990
+ onClose,
2991
+ "data-state": open
2992
+ }),
2993
+ [id, open, onClose]
2994
+ );
3026
2995
  switch (palette) {
3027
2996
  case "success":
3028
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
3029
- Notification,
3030
- {
3031
- id,
3032
- onClose,
3033
- open: true,
3034
- palette: "success",
3035
- children: [
3036
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(NotificationHeading, { palette: "success", children: heading }),
3037
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(NotificationDescription, { palette: "success", children: description })
3038
- ]
3039
- },
3040
- id
3041
- );
2997
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Notification, { ...sharedProps, palette: "success", children: [
2998
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(NotificationHeading, { palette: "success", children: heading }),
2999
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(NotificationDescription, { palette: "success", children: description })
3000
+ ] });
3042
3001
  case "warning":
3043
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
3044
- Notification,
3045
- {
3046
- id,
3047
- onClose,
3048
- open: true,
3049
- palette: "warning",
3050
- children: [
3051
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(NotificationHeading, { palette: "warning", children: heading }),
3052
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(NotificationDescription, { palette: "warning", children: description })
3053
- ]
3054
- },
3055
- id
3056
- );
3002
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Notification, { ...sharedProps, palette: "warning", children: [
3003
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(NotificationHeading, { palette: "warning", children: heading }),
3004
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(NotificationDescription, { palette: "warning", children: description })
3005
+ ] });
3057
3006
  case "danger":
3058
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(Notification, { id, onClose, open: true, palette: "danger", children: [
3059
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(NotificationHeading, { palette: "danger", children: heading }),
3060
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(NotificationDescription, { palette: "danger", children: description })
3061
- ] }, id);
3007
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Notification, { ...sharedProps, palette: "danger", children: [
3008
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(NotificationHeading, { palette: "danger", children: heading }),
3009
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(NotificationDescription, { palette: "danger", children: description })
3010
+ ] });
3062
3011
  case "info":
3063
3012
  default:
3064
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(Notification, { id, onClose, open: true, palette: "info", children: [
3065
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(NotificationHeading, { palette: "info", children: heading }),
3066
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(NotificationDescription, { palette: "info", children: description })
3067
- ] }, id);
3013
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Notification, { ...sharedProps, palette: "info", children: [
3014
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(NotificationHeading, { palette: "info", children: heading }),
3015
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(NotificationDescription, { palette: "info", children: description })
3016
+ ] });
3068
3017
  }
3069
3018
  }
3070
3019
  function useNotificationCenter() {
3071
- const context = (0, import_react20.useContext)(NotificationsContext);
3020
+ const context = (0, import_react24.useContext)(NotificationsContext);
3072
3021
  if (!context) {
3073
3022
  throw new Error(
3074
3023
  "useNotificationCenter must be used within a NotificationsProvider"
@@ -3078,89 +3027,91 @@ function useNotificationCenter() {
3078
3027
  }
3079
3028
 
3080
3029
  // src/context/prompt-modal.tsx
3081
- var import_react21 = require("react");
3082
- var import_css47 = require("@cerberus/styled-system/css");
3083
- var import_patterns17 = require("@cerberus/styled-system/patterns");
3084
- var import_jsx_runtime56 = require("react/jsx-runtime");
3085
- var PromptModalContext = (0, import_react21.createContext)(null);
3030
+ var import_react25 = require("react");
3031
+ var import_css50 = require("@cerberus/styled-system/css");
3032
+ var import_patterns16 = require("@cerberus/styled-system/patterns");
3033
+ var import_jsx5 = require("@cerberus/styled-system/jsx");
3034
+ var import_react26 = require("@ark-ui/react");
3035
+ var import_jsx_runtime59 = require("react/jsx-runtime");
3036
+ var PromptModalContext = (0, import_react25.createContext)(null);
3086
3037
  function PromptModal(props) {
3087
- const { modalRef, show, close } = useModal();
3088
- const resolveRef = (0, import_react21.useRef)(null);
3089
- const [content, setContent] = (0, import_react21.useState)(null);
3090
- const [inputValue, setInputValue] = (0, import_react21.useState)("");
3091
- const focusTrap = trapFocus(modalRef);
3092
- const PromptIcon = $cerberusIcons.promptModal;
3093
- const isValid = (0, import_react21.useMemo)(
3038
+ const resolveRef = (0, import_react25.useRef)(null);
3039
+ const [open, setOpen] = (0, import_react25.useState)(false);
3040
+ const [content, setContent] = (0, import_react25.useState)(null);
3041
+ const [inputValue, setInputValue] = (0, import_react25.useState)("");
3042
+ const { icons } = useCerberusContext();
3043
+ const { promptModal: PromptIcon } = icons;
3044
+ const isValid = (0, import_react25.useMemo)(
3094
3045
  () => inputValue === (content == null ? void 0 : content.key),
3095
3046
  [inputValue, content]
3096
3047
  );
3097
- const palette = (0, import_react21.useMemo)(
3048
+ const palette = (0, import_react25.useMemo)(
3098
3049
  () => (content == null ? void 0 : content.kind) === "destructive" ? "danger" : "action",
3099
3050
  [content]
3100
3051
  );
3101
- const handleChange = (0, import_react21.useCallback)(
3052
+ const handleChange = (0, import_react25.useCallback)(
3102
3053
  (e) => {
3103
3054
  setInputValue(e.currentTarget.value);
3104
3055
  },
3105
3056
  [content]
3106
3057
  );
3107
- const handleChoice = (0, import_react21.useCallback)(
3058
+ const handleChoice = (0, import_react25.useCallback)(
3108
3059
  (e) => {
3109
3060
  var _a;
3110
3061
  const target = e.currentTarget;
3111
3062
  if (target.value === "true") {
3112
3063
  (_a = resolveRef.current) == null ? void 0 : _a.call(resolveRef, inputValue);
3113
3064
  }
3114
- close();
3065
+ setOpen(false);
3115
3066
  },
3116
- [inputValue, close]
3067
+ [inputValue, setOpen]
3117
3068
  );
3118
- const handleShow = (0, import_react21.useCallback)(
3069
+ const handleShow = (0, import_react25.useCallback)(
3119
3070
  (options) => {
3120
3071
  return new Promise((resolve) => {
3121
3072
  setContent({ ...options, kind: options.kind || "non-destructive" });
3122
- show();
3073
+ setOpen(true);
3123
3074
  resolveRef.current = resolve;
3124
3075
  });
3125
3076
  },
3126
- [show]
3077
+ [setOpen]
3127
3078
  );
3128
- const value = (0, import_react21.useMemo)(
3079
+ const value = (0, import_react25.useMemo)(
3129
3080
  () => ({
3130
3081
  show: handleShow
3131
3082
  }),
3132
3083
  [handleShow]
3133
3084
  );
3134
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(PromptModalContext.Provider, { value, children: [
3085
+ return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(PromptModalContext.Provider, { value, children: [
3135
3086
  props.children,
3136
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(Modal, { onKeyDown: focusTrap, ref: modalRef, children: [
3137
- /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(ModalHeader, { children: [
3138
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
3139
- "div",
3087
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(DialogProvider, { open, onOpenChange: (e) => setOpen(e.open), children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Dialog, { size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_jsx5.VStack, { gap: "xl", w: "full", children: [
3088
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_jsx5.VStack, { alignItems: "flex-start", gap: "md", w: "full", children: [
3089
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
3090
+ import_jsx5.HStack,
3140
3091
  {
3141
- className: (0, import_patterns17.hstack)({
3142
- justify: "center",
3143
- w: "full"
3144
- }),
3145
- children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
3092
+ alignSelf: "center",
3093
+ justify: "center",
3094
+ paddingBlockEnd: "md",
3095
+ w: "full",
3096
+ children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
3146
3097
  Show,
3147
3098
  {
3148
3099
  when: palette === "danger",
3149
- fallback: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
3100
+ fallback: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
3150
3101
  Avatar,
3151
3102
  {
3152
3103
  ariaLabel: "",
3153
3104
  gradient: "charon-light",
3154
- icon: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(PromptIcon, { size: 24 }),
3105
+ icon: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(PromptIcon, { size: 24 }),
3155
3106
  src: ""
3156
3107
  }
3157
3108
  ),
3158
- children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
3109
+ children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
3159
3110
  Avatar,
3160
3111
  {
3161
3112
  ariaLabel: "",
3162
3113
  gradient: "hades-dark",
3163
- icon: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(PromptIcon, { size: 24 }),
3114
+ icon: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(PromptIcon, { size: 24 }),
3164
3115
  src: ""
3165
3116
  }
3166
3117
  )
@@ -3168,43 +3119,34 @@ function PromptModal(props) {
3168
3119
  )
3169
3120
  }
3170
3121
  ),
3171
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(ModalHeading, { children: content == null ? void 0 : content.heading }),
3172
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(ModalDescription, { children: content == null ? void 0 : content.description })
3122
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(DialogHeading, { children: content == null ? void 0 : content.heading }),
3123
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(DialogDescription, { children: content == null ? void 0 : content.description })
3173
3124
  ] }),
3174
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
3175
- "div",
3125
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
3126
+ import_jsx5.VStack,
3176
3127
  {
3177
- className: (0, import_patterns17.vstack)({
3178
- alignItems: "flex-start",
3179
- mt: "4",
3180
- mb: "8"
3181
- }),
3182
- children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(Field, { invalid: !isValid, children: [
3183
- /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
3128
+ alignItems: "flex-start",
3129
+ marginBlockStart: "md",
3130
+ marginBlockEnd: "lg",
3131
+ w: "full",
3132
+ children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(Field, { invalid: !isValid, children: [
3133
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
3184
3134
  Label,
3185
3135
  {
3186
- className: (0, import_css47.css)({
3187
- gap: 1,
3188
- justifyContent: "flex-start"
3136
+ className: (0, import_patterns16.hstack)({
3137
+ gap: "xs",
3138
+ justify: "flex-start !important"
3189
3139
  }),
3190
3140
  htmlFor: "confirm",
3191
3141
  size: "md",
3192
3142
  children: [
3193
3143
  "Type",
3194
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
3195
- "strong",
3196
- {
3197
- className: (0, import_css47.css)({
3198
- textTransform: "uppercase"
3199
- }),
3200
- children: content == null ? void 0 : content.key
3201
- }
3202
- ),
3144
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Text, { as: "strong", textTransform: "uppercase", children: content == null ? void 0 : content.key }),
3203
3145
  "to confirm"
3204
3146
  ]
3205
3147
  }
3206
3148
  ),
3207
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
3149
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
3208
3150
  Input,
3209
3151
  {
3210
3152
  id: "confirm",
@@ -3216,50 +3158,41 @@ function PromptModal(props) {
3216
3158
  ] })
3217
3159
  }
3218
3160
  ),
3219
- /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
3220
- "div",
3221
- {
3222
- className: (0, import_patterns17.hstack)({
3223
- justifyContent: "stretch",
3224
- gap: "4"
3225
- }),
3226
- children: [
3227
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
3228
- Button,
3229
- {
3230
- autoFocus: true,
3231
- className: (0, import_css47.css)({
3232
- w: "1/2"
3233
- }),
3234
- disabled: !isValid,
3235
- name: "confirm",
3236
- onClick: handleChoice,
3237
- palette,
3238
- value: "true",
3239
- children: content == null ? void 0 : content.actionText
3240
- }
3241
- ),
3242
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
3243
- Button,
3244
- {
3245
- className: (0, import_css47.css)({
3246
- w: "1/2"
3247
- }),
3248
- name: "cancel",
3249
- onClick: handleChoice,
3250
- usage: "outlined",
3251
- value: "false",
3252
- children: content == null ? void 0 : content.cancelText
3253
- }
3254
- )
3255
- ]
3256
- }
3257
- )
3258
- ] }) })
3161
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_jsx5.HStack, { gap: "md", justify: "stretch", w: "full", children: [
3162
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
3163
+ Button,
3164
+ {
3165
+ autoFocus: true,
3166
+ className: (0, import_css50.css)({
3167
+ w: "1/2"
3168
+ }),
3169
+ disabled: !isValid,
3170
+ name: "confirm",
3171
+ onClick: handleChoice,
3172
+ palette,
3173
+ value: "true",
3174
+ children: content == null ? void 0 : content.actionText
3175
+ }
3176
+ ),
3177
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_react26.DialogCloseTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
3178
+ Button,
3179
+ {
3180
+ className: (0, import_css50.css)({
3181
+ w: "1/2"
3182
+ }),
3183
+ name: "cancel",
3184
+ onClick: handleChoice,
3185
+ usage: "outlined",
3186
+ value: "false",
3187
+ children: content == null ? void 0 : content.cancelText
3188
+ }
3189
+ ) })
3190
+ ] })
3191
+ ] }) }) })
3259
3192
  ] });
3260
3193
  }
3261
3194
  function usePromptModal() {
3262
- const context = (0, import_react21.useContext)(PromptModalContext);
3195
+ const context = (0, import_react25.useContext)(PromptModalContext);
3263
3196
  if (context === null) {
3264
3197
  throw new Error("usePromptModal must be used within a PromptModal Provider");
3265
3198
  }
@@ -3267,50 +3200,50 @@ function usePromptModal() {
3267
3200
  }
3268
3201
 
3269
3202
  // src/context/theme.tsx
3270
- var import_react23 = require("react");
3203
+ var import_react28 = require("react");
3271
3204
 
3272
3205
  // src/hooks/useTheme.ts
3273
- var import_react22 = require("react");
3206
+ var import_react27 = require("react");
3274
3207
  var THEME_KEY = "cerberus-theme";
3275
3208
  var MODE_KEY = "cerberus-mode";
3276
3209
  function useTheme(defaultTheme = "cerberus", defaultColorMode = "light", options = {}) {
3277
3210
  const { updateMode, updateTheme, cache } = options;
3278
- const [theme, setTheme] = (0, import_react22.useState)(defaultTheme);
3279
- const [colorMode, setColorMode] = (0, import_react22.useState)(defaultColorMode);
3280
- const handleThemeChange = (0, import_react22.useCallback)(
3211
+ const [theme, setTheme] = (0, import_react27.useState)(defaultTheme);
3212
+ const [colorMode, setColorMode] = (0, import_react27.useState)(defaultColorMode);
3213
+ const handleThemeChange = (0, import_react27.useCallback)(
3281
3214
  (newTheme) => {
3282
3215
  setTheme(newTheme);
3283
3216
  updateTheme == null ? void 0 : updateTheme(newTheme);
3284
3217
  },
3285
3218
  [updateTheme]
3286
3219
  );
3287
- const handleColorModeChange = (0, import_react22.useCallback)(
3220
+ const handleColorModeChange = (0, import_react27.useCallback)(
3288
3221
  (newMode) => {
3289
3222
  setColorMode(newMode);
3290
3223
  updateMode == null ? void 0 : updateMode(newMode);
3291
3224
  },
3292
3225
  [updateMode]
3293
3226
  );
3294
- (0, import_react22.useLayoutEffect)(() => {
3227
+ (0, import_react27.useLayoutEffect)(() => {
3295
3228
  const theme2 = localStorage.getItem(THEME_KEY);
3296
3229
  if (theme2) {
3297
3230
  setTheme(theme2);
3298
3231
  }
3299
3232
  }, []);
3300
- (0, import_react22.useLayoutEffect)(() => {
3233
+ (0, import_react27.useLayoutEffect)(() => {
3301
3234
  const mode = localStorage.getItem(MODE_KEY);
3302
3235
  if (mode) {
3303
3236
  setColorMode(mode);
3304
3237
  }
3305
3238
  }, []);
3306
- (0, import_react22.useEffect)(() => {
3239
+ (0, import_react27.useEffect)(() => {
3307
3240
  const root = document.documentElement;
3308
3241
  root.dataset.pandaTheme = theme;
3309
3242
  if (cache) {
3310
3243
  localStorage.setItem(THEME_KEY, theme);
3311
3244
  }
3312
3245
  }, [theme, cache]);
3313
- (0, import_react22.useEffect)(() => {
3246
+ (0, import_react27.useEffect)(() => {
3314
3247
  const root = document.documentElement;
3315
3248
  if (colorMode === "system") {
3316
3249
  root.dataset.colorMode = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
@@ -3321,7 +3254,7 @@ function useTheme(defaultTheme = "cerberus", defaultColorMode = "light", options
3321
3254
  localStorage.setItem(MODE_KEY, colorMode);
3322
3255
  }
3323
3256
  }, [colorMode, cache]);
3324
- return (0, import_react22.useMemo)(
3257
+ return (0, import_react27.useMemo)(
3325
3258
  () => ({
3326
3259
  theme,
3327
3260
  mode: colorMode,
@@ -3333,8 +3266,8 @@ function useTheme(defaultTheme = "cerberus", defaultColorMode = "light", options
3333
3266
  }
3334
3267
 
3335
3268
  // src/context/theme.tsx
3336
- var import_jsx_runtime57 = require("react/jsx-runtime");
3337
- var ThemeContext = (0, import_react23.createContext)(
3269
+ var import_jsx_runtime60 = require("react/jsx-runtime");
3270
+ var ThemeContext = (0, import_react28.createContext)(
3338
3271
  null
3339
3272
  );
3340
3273
  function ThemeProvider(props) {
@@ -3343,10 +3276,10 @@ function ThemeProvider(props) {
3343
3276
  updateMode: props.updateMode,
3344
3277
  updateTheme: props.updateTheme
3345
3278
  });
3346
- return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(ThemeContext.Provider, { value: state, children: props.children });
3279
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(ThemeContext.Provider, { value: state, children: props.children });
3347
3280
  }
3348
3281
  function useThemeContext() {
3349
- const context = (0, import_react23.useContext)(ThemeContext);
3282
+ const context = (0, import_react28.useContext)(ThemeContext);
3350
3283
  if (!context) {
3351
3284
  throw new Error("useThemeContext must be used within a ThemeProvider");
3352
3285
  }
@@ -3354,13 +3287,13 @@ function useThemeContext() {
3354
3287
  }
3355
3288
 
3356
3289
  // src/hooks/useDate.ts
3357
- var import_react24 = require("react");
3290
+ var import_react29 = require("react");
3358
3291
  function useDate(options) {
3359
3292
  const initialValue = (options == null ? void 0 : options.initialValue) ?? "";
3360
3293
  const format = (options == null ? void 0 : options.format) ?? DateFormats.USMilitary;
3361
3294
  const onChange = options == null ? void 0 : options.onChange;
3362
- const [value, setValue] = (0, import_react24.useState)(initialValue);
3363
- const handleChange = (0, import_react24.useCallback)(
3295
+ const [value, setValue] = (0, import_react29.useState)(initialValue);
3296
+ const handleChange = (0, import_react29.useCallback)(
3364
3297
  (e) => {
3365
3298
  const newValue = formatMilitaryDate(e.currentTarget.value);
3366
3299
  if (onChange) onChange(e);
@@ -3368,7 +3301,7 @@ function useDate(options) {
3368
3301
  },
3369
3302
  [onChange]
3370
3303
  );
3371
- return (0, import_react24.useMemo)(
3304
+ return (0, import_react29.useMemo)(
3372
3305
  () => ({
3373
3306
  format,
3374
3307
  value,
@@ -3446,12 +3379,37 @@ var MONTHS = [
3446
3379
  "DEC"
3447
3380
  ];
3448
3381
 
3382
+ // src/hooks/useModal.ts
3383
+ var import_react30 = require("react");
3384
+ function useModal() {
3385
+ const modalRef = (0, import_react30.useRef)(null);
3386
+ const [isOpen, setIsOpen] = (0, import_react30.useState)(false);
3387
+ const show = (0, import_react30.useCallback)(() => {
3388
+ var _a;
3389
+ (_a = modalRef.current) == null ? void 0 : _a.showModal();
3390
+ setIsOpen(true);
3391
+ }, []);
3392
+ const close = (0, import_react30.useCallback)(() => {
3393
+ var _a;
3394
+ (_a = modalRef.current) == null ? void 0 : _a.close();
3395
+ setIsOpen(false);
3396
+ }, []);
3397
+ return (0, import_react30.useMemo)(() => {
3398
+ return {
3399
+ modalRef,
3400
+ show,
3401
+ close,
3402
+ isOpen
3403
+ };
3404
+ }, [modalRef, show, close, isOpen]);
3405
+ }
3406
+
3449
3407
  // src/hooks/useToggle.ts
3450
- var import_react25 = require("react");
3408
+ var import_react31 = require("react");
3451
3409
  function useToggle(options) {
3452
- const [checked, setChecked] = (0, import_react25.useState)((options == null ? void 0 : options.checked) ?? "");
3410
+ const [checked, setChecked] = (0, import_react31.useState)((options == null ? void 0 : options.checked) ?? "");
3453
3411
  const onChange = options == null ? void 0 : options.onChange;
3454
- const handleChange = (0, import_react25.useCallback)(
3412
+ const handleChange = (0, import_react31.useCallback)(
3455
3413
  (e) => {
3456
3414
  const target = e.currentTarget;
3457
3415
  setChecked((prev) => {
@@ -3461,25 +3419,25 @@ function useToggle(options) {
3461
3419
  },
3462
3420
  [onChange]
3463
3421
  );
3464
- return (0, import_react25.useMemo)(() => ({ checked, handleChange }), [checked, handleChange]);
3422
+ return (0, import_react31.useMemo)(() => ({ checked, handleChange }), [checked, handleChange]);
3465
3423
  }
3466
3424
 
3467
3425
  // src/hooks/useRootColors.ts
3468
- var import_react26 = require("react");
3426
+ var import_react32 = require("react");
3469
3427
  function useRootColors(colors = []) {
3470
- const [state, dispatch] = (0, import_react26.useReducer)(rootColorsReducer, {});
3471
- const handleRefetch = (0, import_react26.useCallback)(() => {
3428
+ const [state, dispatch] = (0, import_react32.useReducer)(rootColorsReducer, {});
3429
+ const handleRefetch = (0, import_react32.useCallback)(() => {
3472
3430
  return new Promise((resolve) => {
3473
3431
  dispatch(formatColors(colors));
3474
3432
  resolve();
3475
3433
  });
3476
3434
  }, []);
3477
- (0, import_react26.useEffect)(() => {
3435
+ (0, import_react32.useEffect)(() => {
3478
3436
  if (Object.keys(state).length === colors.length) return;
3479
3437
  dispatch(formatColors(colors));
3480
3438
  console.log("updating colors in root hook");
3481
3439
  }, [colors]);
3482
- return (0, import_react26.useMemo)(
3440
+ return (0, import_react32.useMemo)(
3483
3441
  () => ({ colors: state, refetch: handleRefetch }),
3484
3442
  [state, handleRefetch]
3485
3443
  );
@@ -3499,6 +3457,157 @@ function rootColorsReducer(state, action) {
3499
3457
  return { ...state, ...action };
3500
3458
  }
3501
3459
 
3460
+ // src/config/icons/checkbox.icons.tsx
3461
+ var import_jsx_runtime61 = require("react/jsx-runtime");
3462
+ function CheckmarkIcon(props) {
3463
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
3464
+ "svg",
3465
+ {
3466
+ "aria-hidden": "true",
3467
+ xmlns: "http://www.w3.org/2000/svg",
3468
+ fill: "none",
3469
+ role: "img",
3470
+ viewBox: "0 0 24 24",
3471
+ ...props,
3472
+ children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
3473
+ "path",
3474
+ {
3475
+ fill: "currentColor",
3476
+ d: "M9.714 18 4 12.335l1.818-1.764 3.896 3.824L18.181 6 20 7.803 9.714 18Z"
3477
+ }
3478
+ )
3479
+ }
3480
+ );
3481
+ }
3482
+ function IndeterminateIcon(props) {
3483
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
3484
+ "svg",
3485
+ {
3486
+ "aria-hidden": "true",
3487
+ xmlns: "http://www.w3.org/2000/svg",
3488
+ role: "img",
3489
+ fill: "none",
3490
+ viewBox: "0 0 24 24",
3491
+ ...props,
3492
+ children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("path", { fill: "currentColor", d: "M4 11h16v2.667H4z" })
3493
+ }
3494
+ );
3495
+ }
3496
+
3497
+ // src/components/AnimatingUploadIcon.tsx
3498
+ var import_jsx_runtime62 = require("react/jsx-runtime");
3499
+ function AnimatingUploadIcon(props) {
3500
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
3501
+ "svg",
3502
+ {
3503
+ "aria-hidden": "true",
3504
+ xmlns: "http://www.w3.org/2000/svg",
3505
+ width: props.size ?? "1em",
3506
+ height: props.size ?? "1em",
3507
+ viewBox: "0 0 24 24",
3508
+ children: /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
3509
+ "g",
3510
+ {
3511
+ fill: "none",
3512
+ stroke: "currentColor",
3513
+ strokeLinecap: "square",
3514
+ strokeLinejoin: "round",
3515
+ strokeWidth: 1.5,
3516
+ children: [
3517
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
3518
+ "path",
3519
+ {
3520
+ "data-name": "animating-trail",
3521
+ strokeDasharray: "2 4",
3522
+ strokeDashoffset: 6,
3523
+ d: "M12 21c-4.97 0 -9 -4.03 -9 -9c0 -4.97 4.03 -9 9 -9",
3524
+ children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
3525
+ "animate",
3526
+ {
3527
+ attributeName: "stroke-dashoffset",
3528
+ dur: "0.45s",
3529
+ repeatCount: "indefinite",
3530
+ values: "6;0"
3531
+ }
3532
+ )
3533
+ }
3534
+ ),
3535
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
3536
+ "path",
3537
+ {
3538
+ "data-name": "half-circle",
3539
+ strokeDasharray: 32,
3540
+ strokeDashoffset: 32,
3541
+ d: "M12 3c4.97 0 9 4.03 9 9c0 4.97 -4.03 9 -9 9",
3542
+ children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
3543
+ "animate",
3544
+ {
3545
+ fill: "freeze",
3546
+ attributeName: "stroke-dashoffset",
3547
+ begin: "0.075s",
3548
+ dur: "0.3s",
3549
+ values: "32;0"
3550
+ }
3551
+ )
3552
+ }
3553
+ ),
3554
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
3555
+ "svg",
3556
+ {
3557
+ "aria-hidden": "true",
3558
+ xmlns: "http://www.w3.org/2000/svg",
3559
+ width: "0.8em",
3560
+ height: "0.8em",
3561
+ x: "27%",
3562
+ y: "27%",
3563
+ viewBox: "0 0 24 24",
3564
+ children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
3565
+ "polygon",
3566
+ {
3567
+ fill: "currentColor",
3568
+ stroke: "currentColor",
3569
+ strokeWidth: 0.8,
3570
+ opacity: "1",
3571
+ 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 ",
3572
+ children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
3573
+ "animate",
3574
+ {
3575
+ fill: "freeze",
3576
+ attributeName: "opacity",
3577
+ values: "1;0;1",
3578
+ dur: "2s",
3579
+ repeatCount: "indefinite"
3580
+ }
3581
+ )
3582
+ }
3583
+ )
3584
+ }
3585
+ )
3586
+ ]
3587
+ }
3588
+ )
3589
+ }
3590
+ );
3591
+ }
3592
+
3593
+ // src/config/defineIcons.ts
3594
+ var defaultIcons = {
3595
+ checkbox: CheckmarkIcon,
3596
+ fileUploader: AnimatingUploadIcon,
3597
+ indeterminate: IndeterminateIcon
3598
+ };
3599
+ function defineIcons(icons) {
3600
+ return {
3601
+ ...defaultIcons,
3602
+ ...icons
3603
+ };
3604
+ }
3605
+
3606
+ // src/config/index.ts
3607
+ function makeSystemConfig(options) {
3608
+ return options;
3609
+ }
3610
+
3502
3611
  // src/utils/index.ts
3503
3612
  function formatNotifyCount(count) {
3504
3613
  if (count > 99) return "99+";
@@ -3509,7 +3618,6 @@ function formatNotifyCount(count) {
3509
3618
  __reExport(src_exports, require("@dnd-kit/core"), module.exports);
3510
3619
  // Annotate the CommonJS export names for ESM import in node:
3511
3620
  0 && (module.exports = {
3512
- $cerberusIcons,
3513
3621
  Accordion,
3514
3622
  AccordionItem,
3515
3623
  AccordionItemContent,
@@ -3522,6 +3630,7 @@ __reExport(src_exports, require("@dnd-kit/core"), module.exports);
3522
3630
  Avatar,
3523
3631
  Button,
3524
3632
  CTAModal,
3633
+ CerberusProvider,
3525
3634
  Checkbox,
3526
3635
  CircularProgress,
3527
3636
  ConfirmModal,
@@ -3543,6 +3652,16 @@ __reExport(src_exports, require("@dnd-kit/core"), module.exports);
3543
3652
  DatePickerViewControl,
3544
3653
  DatePickerViewControlGroup,
3545
3654
  DatePickerYearView,
3655
+ Dialog,
3656
+ DialogBackdrop,
3657
+ DialogCloseIconTrigger,
3658
+ DialogCloseTrigger,
3659
+ DialogContent,
3660
+ DialogDescription,
3661
+ DialogHeading,
3662
+ DialogPositioner,
3663
+ DialogProvider,
3664
+ DialogTrigger,
3546
3665
  Droppable,
3547
3666
  FeatureFlag,
3548
3667
  FeatureFlags,
@@ -3613,10 +3732,12 @@ __reExport(src_exports, require("@dnd-kit/core"), module.exports);
3613
3732
  formatNotifyCount,
3614
3733
  getLocalStorage,
3615
3734
  getPosition,
3735
+ makeSystemConfig,
3616
3736
  processStatus,
3617
3737
  setLocalStorage,
3618
3738
  trapFocus,
3619
3739
  useCTAModal,
3740
+ useCerberusContext,
3620
3741
  useConfirmModal,
3621
3742
  useDate,
3622
3743
  useFeatureFlags,