@cerberus-design/react 0.11.1-next-2ed68bd → 0.11.1-next-c28b077

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 (100) hide show
  1. package/build/legacy/_tsup-dts-rollup.d.cts +79 -0
  2. package/build/legacy/components/Admonition.cjs +1 -1
  3. package/build/legacy/components/Admonition.cjs.map +1 -1
  4. package/build/legacy/components/Avatar.cjs +1 -1
  5. package/build/legacy/components/Avatar.cjs.map +1 -1
  6. package/build/legacy/components/Checkbox.cjs +1 -1
  7. package/build/legacy/components/Checkbox.cjs.map +1 -1
  8. package/build/legacy/components/FileStatus.cjs +1 -1
  9. package/build/legacy/components/FileStatus.cjs.map +1 -1
  10. package/build/legacy/components/FileUploader.cjs +1 -1
  11. package/build/legacy/components/FileUploader.cjs.map +1 -1
  12. package/build/legacy/components/Input.cjs +1 -1
  13. package/build/legacy/components/Input.cjs.map +1 -1
  14. package/build/legacy/components/ModalHeader.cjs +2 -1
  15. package/build/legacy/components/ModalHeader.cjs.map +1 -1
  16. package/build/legacy/components/Notification.cjs +3 -3
  17. package/build/legacy/components/Notification.cjs.map +1 -1
  18. package/build/legacy/components/Select.cjs +1 -1
  19. package/build/legacy/components/Select.cjs.map +1 -1
  20. package/build/legacy/components/Tag.cjs +3 -3
  21. package/build/legacy/components/Tag.cjs.map +1 -1
  22. package/build/legacy/components/Toggle.cjs +1 -1
  23. package/build/legacy/components/Toggle.cjs.map +1 -1
  24. package/build/legacy/config/cerbIcons.cjs +1 -1
  25. package/build/legacy/config/cerbIcons.cjs.map +1 -1
  26. package/build/legacy/config/defineIcons.cjs +1 -1
  27. package/build/legacy/config/defineIcons.cjs.map +1 -1
  28. package/build/legacy/context/confirm-modal.cjs +3 -2
  29. package/build/legacy/context/confirm-modal.cjs.map +1 -1
  30. package/build/legacy/context/cta-modal.cjs +567 -0
  31. package/build/legacy/context/cta-modal.cjs.map +1 -0
  32. package/build/legacy/context/notification-center.cjs +3 -3
  33. package/build/legacy/context/notification-center.cjs.map +1 -1
  34. package/build/legacy/context/prompt-modal.cjs +3 -2
  35. package/build/legacy/context/prompt-modal.cjs.map +1 -1
  36. package/build/legacy/index.cjs +201 -88
  37. package/build/legacy/index.cjs.map +1 -1
  38. package/build/modern/_tsup-dts-rollup.d.ts +79 -0
  39. package/build/modern/{chunk-RDQHHCFR.js → chunk-5OSUZUR4.js} +2 -2
  40. package/build/modern/{chunk-KLUBAM4U.js → chunk-7SGPJM66.js} +4 -4
  41. package/build/modern/chunk-7SGPJM66.js.map +1 -0
  42. package/build/modern/{chunk-3NE6C66J.js → chunk-C7UVOGPZ.js} +5 -5
  43. package/build/modern/{chunk-TMR7JGMP.js → chunk-F27AAKQ3.js} +3 -3
  44. package/build/modern/chunk-F27AAKQ3.js.map +1 -0
  45. package/build/modern/{chunk-BOCAJC3S.js → chunk-F72ZABKX.js} +2 -2
  46. package/build/modern/chunk-JVIFMN67.js +155 -0
  47. package/build/modern/chunk-JVIFMN67.js.map +1 -0
  48. package/build/modern/{chunk-KF6V5JLW.js → chunk-N4QTLDVM.js} +3 -3
  49. package/build/modern/{chunk-MDIUFBDX.js → chunk-NB6DV4VA.js} +2 -2
  50. package/build/modern/{chunk-UJKS4DDN.js → chunk-NKM6PISB.js} +2 -2
  51. package/build/modern/{chunk-YWCTMLLO.js → chunk-NMNONSHU.js} +2 -2
  52. package/build/modern/{chunk-X4Y4WTRU.js → chunk-PJGUYNKD.js} +4 -4
  53. package/build/modern/{chunk-ZX6DBC2Z.js → chunk-SPZYPRZ6.js} +2 -2
  54. package/build/modern/{chunk-FT7DFRHQ.js → chunk-VERRHMW4.js} +2 -2
  55. package/build/modern/{chunk-HCB5NQ5J.js → chunk-W4DXACNV.js} +3 -3
  56. package/build/modern/{chunk-PA5EB7EO.js → chunk-XL4JREDT.js} +2 -2
  57. package/build/modern/{chunk-6EJXHRAP.js → chunk-ZBMA5G54.js} +3 -3
  58. package/build/modern/{chunk-ULYQLKWA.js → chunk-ZFAIE47A.js} +3 -2
  59. package/build/modern/{chunk-ULYQLKWA.js.map → chunk-ZFAIE47A.js.map} +1 -1
  60. package/build/modern/components/Admonition.js +4 -4
  61. package/build/modern/components/Avatar.js +3 -3
  62. package/build/modern/components/Checkbox.js +3 -3
  63. package/build/modern/components/FileStatus.js +4 -4
  64. package/build/modern/components/FileUploader.js +4 -4
  65. package/build/modern/components/Input.js +3 -3
  66. package/build/modern/components/ModalHeader.js +1 -1
  67. package/build/modern/components/Notification.js +3 -3
  68. package/build/modern/components/Select.js +3 -3
  69. package/build/modern/components/Tag.js +3 -3
  70. package/build/modern/components/Toggle.js +3 -3
  71. package/build/modern/config/cerbIcons.js +1 -1
  72. package/build/modern/config/defineIcons.js +2 -2
  73. package/build/modern/context/confirm-modal.js +5 -5
  74. package/build/modern/context/cta-modal.js +25 -0
  75. package/build/modern/context/cta-modal.js.map +1 -0
  76. package/build/modern/context/notification-center.js +4 -4
  77. package/build/modern/context/prompt-modal.js +6 -6
  78. package/build/modern/index.js +22 -16
  79. package/build/modern/index.js.map +1 -1
  80. package/package.json +2 -2
  81. package/src/components/ModalHeader.tsx +1 -0
  82. package/src/components/Notification.tsx +2 -2
  83. package/src/config/cerbIcons.ts +2 -2
  84. package/src/context/cta-modal.tsx +210 -0
  85. package/src/index.ts +1 -0
  86. package/build/modern/chunk-KLUBAM4U.js.map +0 -1
  87. package/build/modern/chunk-TMR7JGMP.js.map +0 -1
  88. /package/build/modern/{chunk-RDQHHCFR.js.map → chunk-5OSUZUR4.js.map} +0 -0
  89. /package/build/modern/{chunk-3NE6C66J.js.map → chunk-C7UVOGPZ.js.map} +0 -0
  90. /package/build/modern/{chunk-BOCAJC3S.js.map → chunk-F72ZABKX.js.map} +0 -0
  91. /package/build/modern/{chunk-KF6V5JLW.js.map → chunk-N4QTLDVM.js.map} +0 -0
  92. /package/build/modern/{chunk-MDIUFBDX.js.map → chunk-NB6DV4VA.js.map} +0 -0
  93. /package/build/modern/{chunk-UJKS4DDN.js.map → chunk-NKM6PISB.js.map} +0 -0
  94. /package/build/modern/{chunk-YWCTMLLO.js.map → chunk-NMNONSHU.js.map} +0 -0
  95. /package/build/modern/{chunk-X4Y4WTRU.js.map → chunk-PJGUYNKD.js.map} +0 -0
  96. /package/build/modern/{chunk-ZX6DBC2Z.js.map → chunk-SPZYPRZ6.js.map} +0 -0
  97. /package/build/modern/{chunk-FT7DFRHQ.js.map → chunk-VERRHMW4.js.map} +0 -0
  98. /package/build/modern/{chunk-HCB5NQ5J.js.map → chunk-W4DXACNV.js.map} +0 -0
  99. /package/build/modern/{chunk-PA5EB7EO.js.map → chunk-XL4JREDT.js.map} +0 -0
  100. /package/build/modern/{chunk-6EJXHRAP.js.map → chunk-ZBMA5G54.js.map} +0 -0
@@ -521,6 +521,53 @@ declare function createNavTriggerProps(values: NavTriggerAriaValues): NavTrigger
521
521
  export { createNavTriggerProps }
522
522
  export { createNavTriggerProps as createNavTriggerProps_alias_1 }
523
523
 
524
+ /**
525
+ * Provides a CTA modal to the app.
526
+ * @see https://cerberus.digitalu.design/react/cta-modal
527
+ * @example
528
+ * ```tsx
529
+ * // Wrap the Provider around the root of the feature.
530
+ * <CTAModal>
531
+ * <SomeFeatureSection />
532
+ * </CTAModal>
533
+ *
534
+ * // Use the hook to show the cta modal.
535
+ * const cta = useCTAModal()
536
+ *
537
+ * const handleClick = useCallback(async () => {
538
+ * const userConsent = await cta.show({
539
+ * heading: 'Create or copy a Cohort',
540
+ * description:
541
+ * 'Create a new cohort or copy and existing one.',
542
+ * icon: <Copy size={24} />,
543
+ * actions: [
544
+ * {
545
+ * text: 'Create Cohort',
546
+ * onClick: () => {},
547
+ * {
548
+ * text: 'Copy Cohort',
549
+ * onClick: () => {}
550
+ * }
551
+ * })
552
+ * setConsent(userConsent)
553
+ * }, [cta])
554
+ * ```
555
+ */
556
+ declare function CTAModal(props: PropsWithChildren<CTAModalProviderProps>): JSX_2.Element;
557
+ export { CTAModal }
558
+ export { CTAModal as CTAModal_alias_1 }
559
+
560
+ declare interface CTAModalProviderProps {
561
+ }
562
+ export { CTAModalProviderProps }
563
+ export { CTAModalProviderProps as CTAModalProviderProps_alias_1 }
564
+
565
+ declare interface CTAModalValue {
566
+ show: (options: ShowCTAModalOptions) => void;
567
+ }
568
+ export { CTAModalValue }
569
+ export { CTAModalValue as CTAModalValue_alias_1 }
570
+
524
571
  declare type CustomThemes<K extends string = DefaultThemes> = 'cerberus' | K;
525
572
  export { CustomThemes }
526
573
  export { CustomThemes as CustomThemes_alias_1 }
@@ -1961,6 +2008,34 @@ declare interface ShowConfirmModalOptions {
1961
2008
  export { ShowConfirmModalOptions }
1962
2009
  export { ShowConfirmModalOptions as ShowConfirmModalOptions_alias_1 }
1963
2010
 
2011
+ /**
2012
+ * This module provides a context and hook for the cta modal.
2013
+ * @module
2014
+ */
2015
+ declare interface ShowCTAModalOptions {
2016
+ /**
2017
+ * The heading of the cta modal.
2018
+ */
2019
+ heading: string;
2020
+ /**
2021
+ * The description of the cta modal.
2022
+ */
2023
+ description?: string;
2024
+ /**
2025
+ * The icon used for the modal Avatar.
2026
+ */
2027
+ icon?: ReactNode;
2028
+ /**
2029
+ * The actions for the cta modal. Max of 2 actions.
2030
+ */
2031
+ actions: {
2032
+ text: string;
2033
+ onClick: Required<ButtonHTMLAttributes<HTMLButtonElement>['onClick']>;
2034
+ }[];
2035
+ }
2036
+ export { ShowCTAModalOptions }
2037
+ export { ShowCTAModalOptions as ShowCTAModalOptions_alias_1 }
2038
+
1964
2039
  /**
1965
2040
  * This module provides a context and hook for the prompt modal.
1966
2041
  * @module PromptModal
@@ -2566,6 +2641,10 @@ declare function useConfirmModal(): ConfirmModalValue;
2566
2641
  export { useConfirmModal }
2567
2642
  export { useConfirmModal as useConfirmModal_alias_1 }
2568
2643
 
2644
+ declare function useCTAModal(): CTAModalValue;
2645
+ export { useCTAModal }
2646
+ export { useCTAModal as useCTAModal_alias_1 }
2647
+
2569
2648
  export { useDndContext }
2570
2649
 
2571
2650
  export { UseDndContextReturnValue }
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Notification
3
- } from "./chunk-KLUBAM4U.js";
3
+ } from "./chunk-7SGPJM66.js";
4
4
  import {
5
5
  NotificationDescription
6
6
  } from "./chunk-XEW6TJJ4.js";
@@ -159,4 +159,4 @@ export {
159
159
  NotificationCenter,
160
160
  useNotificationCenter
161
161
  };
162
- //# sourceMappingURL=chunk-RDQHHCFR.js.map
162
+ //# sourceMappingURL=chunk-5OSUZUR4.js.map
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-JIZQFTW6.js";
4
4
  import {
5
5
  $cerberusIcons
6
- } from "./chunk-FT7DFRHQ.js";
6
+ } from "./chunk-VERRHMW4.js";
7
7
 
8
8
  // src/components/Notification.tsx
9
9
  import { cx } from "@cerberus/styled-system/css";
@@ -14,7 +14,6 @@ import {
14
14
  import {
15
15
  useRef
16
16
  } from "react";
17
- import { Close } from "@cerberus/icons";
18
17
  import { jsx, jsxs } from "react/jsx-runtime";
19
18
  function MatchNotificationIcon(props) {
20
19
  const palette = props.palette || "info";
@@ -27,6 +26,7 @@ function Notification(props) {
27
26
  const ref = useRef(null);
28
27
  const onKeyDown = trapFocus(ref);
29
28
  const styles = notification({ palette });
29
+ const { close: CloseIcon } = $cerberusIcons;
30
30
  return /* @__PURE__ */ jsxs(
31
31
  "dialog",
32
32
  {
@@ -61,7 +61,7 @@ function Notification(props) {
61
61
  className: styles.close,
62
62
  onClick: onClose,
63
63
  value: props.id,
64
- children: /* @__PURE__ */ jsx(Close, {})
64
+ children: /* @__PURE__ */ jsx(CloseIcon, {})
65
65
  }
66
66
  )
67
67
  ]
@@ -72,4 +72,4 @@ function Notification(props) {
72
72
  export {
73
73
  Notification
74
74
  };
75
- //# sourceMappingURL=chunk-KLUBAM4U.js.map
75
+ //# sourceMappingURL=chunk-7SGPJM66.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/Notification.tsx"],"sourcesContent":["'use client'\n\nimport { cx } from '@cerberus/styled-system/css'\nimport { hstack, vstack } from '@cerberus/styled-system/patterns'\nimport {\n notification,\n type NotificationVariantProps,\n} from '@cerberus/styled-system/recipes'\nimport {\n useRef,\n type DialogHTMLAttributes,\n type PropsWithChildren,\n type MouseEvent,\n} from 'react'\nimport { $cerberusIcons } from '../config/defineIcons'\nimport type { IconType } from '../config/cerbIcons'\nimport { trapFocus } from '../aria-helpers/trap-focus.aria'\n\n/**\n * This module exports the Notification component.\n * @module\n */\n\nfunction MatchNotificationIcon(props: NotificationVariantProps) {\n const palette = props.palette || 'info'\n const key = `${palette}Notification` as keyof typeof $cerberusIcons\n const Icon = $cerberusIcons[key] as IconType\n return <Icon />\n}\n\nexport interface NotificationBaseProps\n extends Omit<DialogHTMLAttributes<HTMLDialogElement>, 'onClose'> {\n /**\n * The unique id of the notification. Required for the onClose callback.\n */\n id: string\n /**\n * Called when the close button is clicked.\n */\n onClose?: (e: MouseEvent<HTMLButtonElement>) => void\n}\nexport type NotificationProps = NotificationBaseProps & NotificationVariantProps\n\n/**\n * A static Notification component that displays a message to the user. This\n * is typically only used when not utilizing the NotificationCenter.\n * @see https://cerberus.digitalu.design/react/notification\n * @memberof module:NotificationCenter\n * @example\n * ```tsx\n * <Notification id=\"info:1\" open>\n * <NotificationHeading>Info Notification</NotificationHeading>\n * <NotificationDescription>\n * This is a description with a <a href=\"#\">link</a> in the message.\n * </NotificationDescription>\n * </Notification>\n * ```\n */\nexport function Notification(props: PropsWithChildren<NotificationProps>) {\n const { children, palette, onClose, ...nativeProps } = props\n const ref = useRef<HTMLDialogElement>(null)\n const onKeyDown = trapFocus(ref)\n const styles = notification({ palette })\n const { close: CloseIcon } = $cerberusIcons\n\n return (\n <dialog\n {...nativeProps}\n className={cx(\n nativeProps.className,\n hstack({\n position: 'relative',\n gap: '4',\n }),\n styles.dialog,\n )}\n onKeyDown={onKeyDown}\n ref={ref}\n >\n <span className={styles.icon}>\n <MatchNotificationIcon palette={palette} />\n </span>\n\n <div\n className={vstack({\n alignItems: 'flex-start',\n gap: '0',\n py: '2',\n })}\n >\n {children}\n </div>\n\n <button\n aria-label=\"Close\"\n className={styles.close}\n onClick={onClose}\n value={props.id}\n >\n <CloseIcon />\n </button>\n </dialog>\n )\n}\n"],"mappings":";;;;;;;;AAEA,SAAS,UAAU;AACnB,SAAS,QAAQ,cAAc;AAC/B;AAAA,EACE;AAAA,OAEK;AACP;AAAA,EACE;AAAA,OAIK;AAcE,cAuCL,YAvCK;AAJT,SAAS,sBAAsB,OAAiC;AAC9D,QAAM,UAAU,MAAM,WAAW;AACjC,QAAM,MAAM,GAAG,OAAO;AACtB,QAAM,OAAO,eAAe,GAAG;AAC/B,SAAO,oBAAC,QAAK;AACf;AA8BO,SAAS,aAAa,OAA6C;AACxE,QAAM,EAAE,UAAU,SAAS,SAAS,GAAG,YAAY,IAAI;AACvD,QAAM,MAAM,OAA0B,IAAI;AAC1C,QAAM,YAAY,UAAU,GAAG;AAC/B,QAAM,SAAS,aAAa,EAAE,QAAQ,CAAC;AACvC,QAAM,EAAE,OAAO,UAAU,IAAI;AAE7B,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,WAAW;AAAA,QACT,YAAY;AAAA,QACZ,OAAO;AAAA,UACL,UAAU;AAAA,UACV,KAAK;AAAA,QACP,CAAC;AAAA,QACD,OAAO;AAAA,MACT;AAAA,MACA;AAAA,MACA;AAAA,MAEA;AAAA,4BAAC,UAAK,WAAW,OAAO,MACtB,8BAAC,yBAAsB,SAAkB,GAC3C;AAAA,QAEA;AAAA,UAAC;AAAA;AAAA,YACC,WAAW,OAAO;AAAA,cAChB,YAAY;AAAA,cACZ,KAAK;AAAA,cACL,IAAI;AAAA,YACN,CAAC;AAAA,YAEA;AAAA;AAAA,QACH;AAAA,QAEA;AAAA,UAAC;AAAA;AAAA,YACC,cAAW;AAAA,YACX,WAAW,OAAO;AAAA,YAClB,SAAS;AAAA,YACT,OAAO,MAAM;AAAA,YAEb,8BAAC,aAAU;AAAA;AAAA,QACb;AAAA;AAAA;AAAA,EACF;AAEJ;","names":[]}
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-GLY7GU5S.js";
4
4
  import {
5
5
  Input
6
- } from "./chunk-UJKS4DDN.js";
6
+ } from "./chunk-NKM6PISB.js";
7
7
  import {
8
8
  Label
9
9
  } from "./chunk-NMF2HYWO.js";
@@ -15,13 +15,13 @@ import {
15
15
  } from "./chunk-Q7BRMIBR.js";
16
16
  import {
17
17
  ModalHeader
18
- } from "./chunk-ULYQLKWA.js";
18
+ } from "./chunk-ZFAIE47A.js";
19
19
  import {
20
20
  ModalHeading
21
21
  } from "./chunk-2UXE5PDG.js";
22
22
  import {
23
23
  Avatar
24
- } from "./chunk-ZX6DBC2Z.js";
24
+ } from "./chunk-SPZYPRZ6.js";
25
25
  import {
26
26
  Button
27
27
  } from "./chunk-EXGKZGML.js";
@@ -36,7 +36,7 @@ import {
36
36
  } from "./chunk-JIZQFTW6.js";
37
37
  import {
38
38
  $cerberusIcons
39
- } from "./chunk-FT7DFRHQ.js";
39
+ } from "./chunk-VERRHMW4.js";
40
40
  import {
41
41
  useModal
42
42
  } from "./chunk-7T3JIGM7.js";
@@ -240,4 +240,4 @@ export {
240
240
  PromptModal,
241
241
  usePromptModal
242
242
  };
243
- //# sourceMappingURL=chunk-3NE6C66J.js.map
243
+ //# sourceMappingURL=chunk-C7UVOGPZ.js.map
@@ -11,7 +11,7 @@ import {
11
11
  Checkmark,
12
12
  CheckmarkOutline,
13
13
  ChevronDown,
14
- CloseFilled,
14
+ Close,
15
15
  CloudUpload,
16
16
  Information,
17
17
  Restart,
@@ -24,7 +24,7 @@ import {
24
24
  var defaultIcons = {
25
25
  avatar: UserFilled,
26
26
  checkbox: CheckmarkIcon,
27
- close: CloseFilled,
27
+ close: Close,
28
28
  confirmModal: Information,
29
29
  delete: TrashCan,
30
30
  promptModal: Information,
@@ -45,4 +45,4 @@ var defaultIcons = {
45
45
  export {
46
46
  defaultIcons
47
47
  };
48
- //# sourceMappingURL=chunk-TMR7JGMP.js.map
48
+ //# sourceMappingURL=chunk-F27AAKQ3.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/config/cerbIcons.ts"],"sourcesContent":["import {\n Checkmark,\n CheckmarkOutline,\n ChevronDown,\n Close,\n CloudUpload,\n Information,\n Restart,\n TrashCan,\n UserFilled,\n Warning,\n WarningAlt,\n WarningFilled,\n type CarbonIconType,\n} from '@cerberus/icons'\nimport type { ElementType } from 'react'\nimport { CheckmarkIcon, IndeterminateIcon } from './icons/checkbox.icons'\nimport { AnimatingUploadIcon } from '../components/AnimatingUploadIcon'\n\nexport type IconType = CarbonIconType | ElementType\n\nexport interface DefinedIcons {\n avatar?: IconType\n checkbox?: IconType\n close?: IconType\n confirmModal?: IconType\n delete?: IconType\n promptModal?: IconType\n waitingFileUploader?: IconType\n fileUploader?: IconType\n indeterminate?: IconType\n infoNotification?: IconType\n successNotification?: IconType\n warningNotification?: IconType\n dangerNotification?: IconType\n invalid: IconType\n invalidAlt?: IconType\n redo?: IconType\n selectArrow?: IconType\n toggleChecked?: IconType\n}\n\nexport const defaultIcons: DefinedIcons = {\n avatar: UserFilled,\n checkbox: CheckmarkIcon,\n close: Close,\n confirmModal: Information,\n delete: TrashCan,\n promptModal: Information,\n waitingFileUploader: CloudUpload,\n fileUploader: AnimatingUploadIcon,\n indeterminate: IndeterminateIcon,\n infoNotification: Information,\n successNotification: CheckmarkOutline,\n warningNotification: WarningAlt,\n dangerNotification: WarningFilled,\n invalid: WarningFilled,\n invalidAlt: Warning,\n redo: Restart,\n selectArrow: ChevronDown,\n toggleChecked: Checkmark,\n}\n"],"mappings":";;;;;;;;;AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AA4BA,IAAM,eAA6B;AAAA,EACxC,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,OAAO;AAAA,EACP,cAAc;AAAA,EACd,QAAQ;AAAA,EACR,aAAa;AAAA,EACb,qBAAqB;AAAA,EACrB,cAAc;AAAA,EACd,eAAe;AAAA,EACf,kBAAkB;AAAA,EAClB,qBAAqB;AAAA,EACrB,qBAAqB;AAAA,EACrB,oBAAoB;AAAA,EACpB,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,MAAM;AAAA,EACN,aAAa;AAAA,EACb,eAAe;AACjB;","names":[]}
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-BUVVRQLZ.js";
4
4
  import {
5
5
  $cerberusIcons
6
- } from "./chunk-FT7DFRHQ.js";
6
+ } from "./chunk-VERRHMW4.js";
7
7
 
8
8
  // src/components/Tag.tsx
9
9
  import { css, cx } from "@cerberus/styled-system/css";
@@ -61,4 +61,4 @@ var closableCss = css({
61
61
  export {
62
62
  Tag
63
63
  };
64
- //# sourceMappingURL=chunk-BOCAJC3S.js.map
64
+ //# sourceMappingURL=chunk-F72ZABKX.js.map
@@ -0,0 +1,155 @@
1
+ import {
2
+ Portal
3
+ } from "./chunk-GLY7GU5S.js";
4
+ import {
5
+ Modal
6
+ } from "./chunk-BE4EOU2P.js";
7
+ import {
8
+ ModalDescription
9
+ } from "./chunk-Q7BRMIBR.js";
10
+ import {
11
+ ModalHeader
12
+ } from "./chunk-ZFAIE47A.js";
13
+ import {
14
+ ModalHeading
15
+ } from "./chunk-2UXE5PDG.js";
16
+ import {
17
+ IconButton
18
+ } from "./chunk-APD6IX5R.js";
19
+ import {
20
+ Avatar
21
+ } from "./chunk-SPZYPRZ6.js";
22
+ import {
23
+ Button
24
+ } from "./chunk-EXGKZGML.js";
25
+ import {
26
+ Show
27
+ } from "./chunk-BUVVRQLZ.js";
28
+ import {
29
+ trapFocus
30
+ } from "./chunk-JIZQFTW6.js";
31
+ import {
32
+ $cerberusIcons
33
+ } from "./chunk-VERRHMW4.js";
34
+ import {
35
+ useModal
36
+ } from "./chunk-7T3JIGM7.js";
37
+
38
+ // src/context/cta-modal.tsx
39
+ import {
40
+ createContext,
41
+ useCallback,
42
+ useContext,
43
+ useMemo,
44
+ useState
45
+ } from "react";
46
+ import { HStack } from "@cerberus/styled-system/jsx";
47
+ import { css } from "@cerberus/styled-system/css";
48
+ import { VStack } from "@cerberus/styled-system/jsx";
49
+ import { jsx, jsxs } from "react/jsx-runtime";
50
+ var CTAModalContext = createContext(null);
51
+ function CTAModal(props) {
52
+ const { modalRef, show, close } = useModal();
53
+ const [content, setContent] = useState(null);
54
+ const focusTrap = trapFocus(modalRef);
55
+ const FallbackIcon = $cerberusIcons.confirmModal;
56
+ const confirmIcon = content?.icon;
57
+ const { close: CloseIcon } = $cerberusIcons;
58
+ const handleShow = useCallback(
59
+ (options) => {
60
+ const maxActions = 2;
61
+ if (options.actions.length > maxActions) {
62
+ throw new Error(
63
+ `CTA Modal only supports a maximum of ${maxActions} actions.`
64
+ );
65
+ }
66
+ setContent({ ...options });
67
+ show();
68
+ },
69
+ [show]
70
+ );
71
+ const handleActionClick = useCallback(
72
+ (event) => {
73
+ const index = event.currentTarget.getAttribute("data-index");
74
+ const action = content?.actions[Number(index)];
75
+ if (typeof action?.onClick === "function") {
76
+ action.onClick(event);
77
+ }
78
+ close();
79
+ },
80
+ [content, close]
81
+ );
82
+ const value = useMemo(
83
+ () => ({
84
+ show: handleShow
85
+ }),
86
+ [handleShow]
87
+ );
88
+ return /* @__PURE__ */ jsxs(CTAModalContext.Provider, { value, children: [
89
+ props.children,
90
+ /* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsxs(Modal, { onKeyDown: focusTrap, ref: modalRef, children: [
91
+ /* @__PURE__ */ jsx(
92
+ "span",
93
+ {
94
+ className: css({
95
+ padding: "md",
96
+ position: "absolute",
97
+ right: 0,
98
+ top: 0,
99
+ zIndex: "decorator"
100
+ }),
101
+ children: /* @__PURE__ */ jsx(IconButton, { ariaLabel: "Close modal", onClick: close, children: /* @__PURE__ */ jsx(CloseIcon, {}) })
102
+ }
103
+ ),
104
+ /* @__PURE__ */ jsxs(ModalHeader, { children: [
105
+ /* @__PURE__ */ jsx(HStack, { justify: "center", w: "full", children: /* @__PURE__ */ jsx(
106
+ Avatar,
107
+ {
108
+ ariaLabel: "",
109
+ gradient: "charon-light",
110
+ icon: /* @__PURE__ */ jsx(
111
+ Show,
112
+ {
113
+ when: Boolean(confirmIcon),
114
+ fallback: /* @__PURE__ */ jsx(FallbackIcon, { size: 24 }),
115
+ children: confirmIcon
116
+ }
117
+ ),
118
+ src: ""
119
+ }
120
+ ) }),
121
+ /* @__PURE__ */ jsxs(VStack, { gap: "lg", w: "full", children: [
122
+ /* @__PURE__ */ jsx(ModalHeading, { children: content?.heading }),
123
+ /* @__PURE__ */ jsx(ModalDescription, { children: content?.description })
124
+ ] })
125
+ ] }),
126
+ /* @__PURE__ */ jsx(HStack, { gap: "md", pt: "sm", w: "full", children: /* @__PURE__ */ jsx(Show, { when: Boolean(content?.actions?.length), children: content?.actions?.map((action, index) => /* @__PURE__ */ jsx(
127
+ Button,
128
+ {
129
+ "data-index": index,
130
+ className: css({
131
+ w: "1/2"
132
+ }),
133
+ onClick: handleActionClick,
134
+ shape: "rounded",
135
+ usage: "outlined",
136
+ children: action.text
137
+ },
138
+ index
139
+ )) }) })
140
+ ] }) })
141
+ ] });
142
+ }
143
+ function useCTAModal() {
144
+ const context = useContext(CTAModalContext);
145
+ if (context === null) {
146
+ throw new Error("useCTAModal must be used within a CTAModal Provider");
147
+ }
148
+ return context;
149
+ }
150
+
151
+ export {
152
+ CTAModal,
153
+ useCTAModal
154
+ };
155
+ //# sourceMappingURL=chunk-JVIFMN67.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/context/cta-modal.tsx"],"sourcesContent":["'use client'\n\nimport {\n createContext,\n useCallback,\n useContext,\n useMemo,\n useState,\n type ButtonHTMLAttributes,\n type MouseEvent,\n type PropsWithChildren,\n type ReactNode,\n} from 'react'\nimport { Portal } from '../components/Portal'\nimport { Button } from '../components/Button'\nimport { $cerberusIcons } from '../config/defineIcons'\nimport { trapFocus } from '../aria-helpers/trap-focus.aria'\nimport { Show } from '../components/Show'\nimport { Modal } from '../components/Modal'\nimport { useModal } from '../hooks/useModal'\nimport { ModalHeader } from '../components/ModalHeader'\nimport { ModalHeading } from '../components/ModalHeading'\nimport { ModalDescription } from '../components/ModalDescription'\nimport { Avatar } from '../components/Avatar'\nimport { HStack } from '@cerberus/styled-system/jsx'\nimport { IconButton } from '../components/IconButton'\nimport { css } from '@cerberus/styled-system/css'\nimport { VStack } from '@cerberus/styled-system/jsx'\n\n/**\n * This module provides a context and hook for the cta modal.\n * @module\n */\n\nexport interface ShowCTAModalOptions {\n /**\n * The heading of the cta modal.\n */\n heading: string\n /**\n * The description of the cta modal.\n */\n description?: string\n /**\n * The icon used for the modal Avatar.\n */\n icon?: ReactNode\n /**\n * The actions for the cta modal. Max of 2 actions.\n */\n actions: {\n text: string\n onClick: Required<ButtonHTMLAttributes<HTMLButtonElement>['onClick']>\n }[]\n}\n\nexport interface CTAModalValue {\n show: (options: ShowCTAModalOptions) => void\n}\n\nconst CTAModalContext = createContext<CTAModalValue | null>(null)\n\nexport interface CTAModalProviderProps {}\n\n/**\n * Provides a CTA modal to the app.\n * @see https://cerberus.digitalu.design/react/cta-modal\n * @example\n * ```tsx\n * // Wrap the Provider around the root of the feature.\n * <CTAModal>\n * <SomeFeatureSection />\n * </CTAModal>\n *\n * // Use the hook to show the cta modal.\n * const cta = useCTAModal()\n *\n * const handleClick = useCallback(async () => {\n * const userConsent = await cta.show({\n * heading: 'Create or copy a Cohort',\n * description:\n * 'Create a new cohort or copy and existing one.',\n * icon: <Copy size={24} />,\n * actions: [\n * {\n * text: 'Create Cohort',\n * onClick: () => {},\n * {\n * text: 'Copy Cohort',\n * onClick: () => {}\n * }\n * })\n * setConsent(userConsent)\n * }, [cta])\n * ```\n */\nexport function CTAModal(props: PropsWithChildren<CTAModalProviderProps>) {\n const { modalRef, show, close } = useModal()\n const [content, setContent] = useState<ShowCTAModalOptions | null>(null)\n const focusTrap = trapFocus(modalRef)\n const FallbackIcon = $cerberusIcons.confirmModal\n const confirmIcon = content?.icon as ReactNode\n const { close: CloseIcon } = $cerberusIcons\n\n const handleShow = useCallback(\n (options: ShowCTAModalOptions) => {\n const maxActions = 2\n if (options.actions.length > maxActions) {\n throw new Error(\n `CTA Modal only supports a maximum of ${maxActions} actions.`,\n )\n }\n setContent({ ...options })\n show()\n },\n [show],\n )\n\n const handleActionClick = useCallback(\n (event: MouseEvent<HTMLButtonElement>) => {\n const index = event.currentTarget.getAttribute('data-index')\n const action = content?.actions[Number(index)]\n if (typeof action?.onClick === 'function') {\n action.onClick(event)\n }\n close()\n },\n [content, close],\n )\n\n const value = useMemo(\n () => ({\n show: handleShow,\n }),\n [handleShow],\n )\n\n return (\n <CTAModalContext.Provider value={value}>\n {props.children}\n\n <Portal>\n <Modal onKeyDown={focusTrap} ref={modalRef}>\n <span\n className={css({\n padding: 'md',\n position: 'absolute',\n right: 0,\n top: 0,\n zIndex: 'decorator',\n })}\n >\n <IconButton ariaLabel=\"Close modal\" onClick={close}>\n <CloseIcon />\n </IconButton>\n </span>\n\n <ModalHeader>\n <HStack justify=\"center\" w=\"full\">\n <Avatar\n ariaLabel=\"\"\n gradient=\"charon-light\"\n icon={\n <Show\n when={Boolean(confirmIcon)}\n fallback={<FallbackIcon size={24} />}\n >\n {confirmIcon}\n </Show>\n }\n src=\"\"\n />\n </HStack>\n <VStack gap=\"lg\" w=\"full\">\n <ModalHeading>{content?.heading}</ModalHeading>\n <ModalDescription>{content?.description}</ModalDescription>\n </VStack>\n </ModalHeader>\n\n <HStack gap=\"md\" pt=\"sm\" w=\"full\">\n <Show when={Boolean(content?.actions?.length)}>\n {content?.actions?.map((action, index) => (\n <Button\n data-index={index}\n className={css({\n w: '1/2',\n })}\n key={index}\n onClick={handleActionClick}\n shape=\"rounded\"\n usage=\"outlined\"\n >\n {action.text}\n </Button>\n ))}\n </Show>\n </HStack>\n </Modal>\n </Portal>\n </CTAModalContext.Provider>\n )\n}\n\nexport function useCTAModal(): CTAModalValue {\n const context = useContext(CTAModalContext)\n if (context === null) {\n throw new Error('useCTAModal must be used within a CTAModal Provider')\n }\n return context\n}\n"],"mappings":"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","names":[]}
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  Avatar
3
- } from "./chunk-ZX6DBC2Z.js";
3
+ } from "./chunk-SPZYPRZ6.js";
4
4
  import {
5
5
  Show
6
6
  } from "./chunk-BUVVRQLZ.js";
7
7
  import {
8
8
  $cerberusIcons
9
- } from "./chunk-FT7DFRHQ.js";
9
+ } from "./chunk-VERRHMW4.js";
10
10
 
11
11
  // src/components/Admonition.tsx
12
12
  import {
@@ -135,4 +135,4 @@ export {
135
135
  AdmonitionHeading,
136
136
  AdmonitionDescription
137
137
  };
138
- //# sourceMappingURL=chunk-KF6V5JLW.js.map
138
+ //# sourceMappingURL=chunk-N4QTLDVM.js.map
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-BUVVRQLZ.js";
7
7
  import {
8
8
  $cerberusIcons
9
- } from "./chunk-FT7DFRHQ.js";
9
+ } from "./chunk-VERRHMW4.js";
10
10
 
11
11
  // src/components/Checkbox.tsx
12
12
  import {
@@ -53,4 +53,4 @@ function Checkbox(props) {
53
53
  export {
54
54
  Checkbox
55
55
  };
56
- //# sourceMappingURL=chunk-MDIUFBDX.js.map
56
+ //# sourceMappingURL=chunk-NB6DV4VA.js.map
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-BUVVRQLZ.js";
7
7
  import {
8
8
  $cerberusIcons
9
- } from "./chunk-FT7DFRHQ.js";
9
+ } from "./chunk-VERRHMW4.js";
10
10
 
11
11
  // src/components/Input.tsx
12
12
  import { input } from "@cerberus/styled-system/recipes";
@@ -39,4 +39,4 @@ function Input(props) {
39
39
  export {
40
40
  Input
41
41
  };
42
- //# sourceMappingURL=chunk-UJKS4DDN.js.map
42
+ //# sourceMappingURL=chunk-NKM6PISB.js.map
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-UZDVOIW5.js";
4
4
  import {
5
5
  $cerberusIcons
6
- } from "./chunk-FT7DFRHQ.js";
6
+ } from "./chunk-VERRHMW4.js";
7
7
 
8
8
  // src/components/Toggle.tsx
9
9
  import { cx } from "@cerberus/styled-system/css";
@@ -55,4 +55,4 @@ function Toggle(props) {
55
55
  export {
56
56
  Toggle
57
57
  };
58
- //# sourceMappingURL=chunk-YWCTMLLO.js.map
58
+ //# sourceMappingURL=chunk-NMNONSHU.js.map
@@ -9,13 +9,13 @@ import {
9
9
  } from "./chunk-Q7BRMIBR.js";
10
10
  import {
11
11
  ModalHeader
12
- } from "./chunk-ULYQLKWA.js";
12
+ } from "./chunk-ZFAIE47A.js";
13
13
  import {
14
14
  ModalHeading
15
15
  } from "./chunk-2UXE5PDG.js";
16
16
  import {
17
17
  Avatar
18
- } from "./chunk-ZX6DBC2Z.js";
18
+ } from "./chunk-SPZYPRZ6.js";
19
19
  import {
20
20
  Button
21
21
  } from "./chunk-EXGKZGML.js";
@@ -27,7 +27,7 @@ import {
27
27
  } from "./chunk-JIZQFTW6.js";
28
28
  import {
29
29
  $cerberusIcons
30
- } from "./chunk-FT7DFRHQ.js";
30
+ } from "./chunk-VERRHMW4.js";
31
31
  import {
32
32
  useModal
33
33
  } from "./chunk-7T3JIGM7.js";
@@ -176,4 +176,4 @@ export {
176
176
  ConfirmModal,
177
177
  useConfirmModal
178
178
  };
179
- //# sourceMappingURL=chunk-X4Y4WTRU.js.map
179
+ //# sourceMappingURL=chunk-PJGUYNKD.js.map
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-BUVVRQLZ.js";
4
4
  import {
5
5
  $cerberusIcons
6
- } from "./chunk-FT7DFRHQ.js";
6
+ } from "./chunk-VERRHMW4.js";
7
7
 
8
8
  // src/components/Avatar.tsx
9
9
  import { css, cx } from "@cerberus/styled-system/css";
@@ -101,4 +101,4 @@ var iconSizeMap = {
101
101
  export {
102
102
  Avatar
103
103
  };
104
- //# sourceMappingURL=chunk-ZX6DBC2Z.js.map
104
+ //# sourceMappingURL=chunk-SPZYPRZ6.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  defaultIcons
3
- } from "./chunk-TMR7JGMP.js";
3
+ } from "./chunk-F27AAKQ3.js";
4
4
 
5
5
  // src/config/defineIcons.ts
6
6
  function _validateIconsProperties(icons) {
@@ -24,4 +24,4 @@ export {
24
24
  defineIcons,
25
25
  $cerberusIcons
26
26
  };
27
- //# sourceMappingURL=chunk-FT7DFRHQ.js.map
27
+ //# sourceMappingURL=chunk-VERRHMW4.js.map
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  Avatar
3
- } from "./chunk-ZX6DBC2Z.js";
3
+ } from "./chunk-SPZYPRZ6.js";
4
4
  import {
5
5
  Show
6
6
  } from "./chunk-BUVVRQLZ.js";
7
7
  import {
8
8
  $cerberusIcons
9
- } from "./chunk-FT7DFRHQ.js";
9
+ } from "./chunk-VERRHMW4.js";
10
10
 
11
11
  // src/components/FileUploader.tsx
12
12
  import { cx } from "@cerberus/styled-system/css";
@@ -72,4 +72,4 @@ function FileUploader(props) {
72
72
  export {
73
73
  FileUploader
74
74
  };
75
- //# sourceMappingURL=chunk-HCB5NQ5J.js.map
75
+ //# sourceMappingURL=chunk-W4DXACNV.js.map
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-BUVVRQLZ.js";
7
7
  import {
8
8
  $cerberusIcons
9
- } from "./chunk-FT7DFRHQ.js";
9
+ } from "./chunk-VERRHMW4.js";
10
10
 
11
11
  // src/components/Select.tsx
12
12
  import { cx } from "@cerberus/styled-system/css";
@@ -65,4 +65,4 @@ export {
65
65
  Select,
66
66
  Option
67
67
  };
68
- //# sourceMappingURL=chunk-PA5EB7EO.js.map
68
+ //# sourceMappingURL=chunk-XL4JREDT.js.map
@@ -9,13 +9,13 @@ import {
9
9
  } from "./chunk-JWIJHSI6.js";
10
10
  import {
11
11
  Avatar
12
- } from "./chunk-ZX6DBC2Z.js";
12
+ } from "./chunk-SPZYPRZ6.js";
13
13
  import {
14
14
  Field
15
15
  } from "./chunk-UZDVOIW5.js";
16
16
  import {
17
17
  $cerberusIcons
18
- } from "./chunk-FT7DFRHQ.js";
18
+ } from "./chunk-VERRHMW4.js";
19
19
 
20
20
  // src/components/FileStatus.tsx
21
21
  import {
@@ -225,4 +225,4 @@ export {
225
225
  processStatus,
226
226
  FileStatus
227
227
  };
228
- //# sourceMappingURL=chunk-6EJXHRAP.js.map
228
+ //# sourceMappingURL=chunk-ZBMA5G54.js.map
@@ -12,7 +12,8 @@ function ModalHeader(props) {
12
12
  vstack({
13
13
  alignItems: "flex-start",
14
14
  gap: "md",
15
- mb: "md"
15
+ mb: "md",
16
+ position: "relative"
16
17
  })
17
18
  )
18
19
  }
@@ -22,4 +23,4 @@ function ModalHeader(props) {
22
23
  export {
23
24
  ModalHeader
24
25
  };
25
- //# sourceMappingURL=chunk-ULYQLKWA.js.map
26
+ //# sourceMappingURL=chunk-ZFAIE47A.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/ModalHeader.tsx"],"sourcesContent":["import { cx } from '@cerberus/styled-system/css'\nimport { vstack } from '@cerberus/styled-system/patterns'\nimport type { HTMLAttributes } from 'react'\n\n/**\n * This module contains the ModalHeader component for a customizable modal.\n * @module\n */\n\nexport type ModalHeaderProps = HTMLAttributes<HTMLDivElement>\n\n/**\n * The ModalHeader component is a header element for a customizable modal.\n * @see https://cerberus.digitalu.design/react/modal\n * @example\n * ```tsx\n * <Modal>\n * <ModalHeader>\n * <h2>Modal Heading</h2>\n * </ModalHeader>\n * </Modal>\n * ```\n */\nexport function ModalHeader(props: ModalHeaderProps) {\n return (\n <div\n {...props}\n className={cx(\n props.className,\n vstack({\n alignItems: 'flex-start',\n gap: 'md',\n mb: 'md',\n }),\n )}\n />\n )\n}\n"],"mappings":";AAAA,SAAS,UAAU;AACnB,SAAS,cAAc;AAwBnB;AAFG,SAAS,YAAY,OAAyB;AACnD,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,WAAW;AAAA,QACT,MAAM;AAAA,QACN,OAAO;AAAA,UACL,YAAY;AAAA,UACZ,KAAK;AAAA,UACL,IAAI;AAAA,QACN,CAAC;AAAA,MACH;AAAA;AAAA,EACF;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../../src/components/ModalHeader.tsx"],"sourcesContent":["import { cx } from '@cerberus/styled-system/css'\nimport { vstack } from '@cerberus/styled-system/patterns'\nimport type { HTMLAttributes } from 'react'\n\n/**\n * This module contains the ModalHeader component for a customizable modal.\n * @module\n */\n\nexport type ModalHeaderProps = HTMLAttributes<HTMLDivElement>\n\n/**\n * The ModalHeader component is a header element for a customizable modal.\n * @see https://cerberus.digitalu.design/react/modal\n * @example\n * ```tsx\n * <Modal>\n * <ModalHeader>\n * <h2>Modal Heading</h2>\n * </ModalHeader>\n * </Modal>\n * ```\n */\nexport function ModalHeader(props: ModalHeaderProps) {\n return (\n <div\n {...props}\n className={cx(\n props.className,\n vstack({\n alignItems: 'flex-start',\n gap: 'md',\n mb: 'md',\n position: 'relative',\n }),\n )}\n />\n )\n}\n"],"mappings":";AAAA,SAAS,UAAU;AACnB,SAAS,cAAc;AAwBnB;AAFG,SAAS,YAAY,OAAyB;AACnD,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,WAAW;AAAA,QACT,MAAM;AAAA,QACN,OAAO;AAAA,UACL,YAAY;AAAA,UACZ,KAAK;AAAA,UACL,IAAI;AAAA,UACJ,UAAU;AAAA,QACZ,CAAC;AAAA,MACH;AAAA;AAAA,EACF;AAEJ;","names":[]}
@@ -2,11 +2,11 @@ import {
2
2
  Admonition,
3
3
  AdmonitionDescription,
4
4
  AdmonitionHeading
5
- } from "../chunk-KF6V5JLW.js";
6
- import "../chunk-ZX6DBC2Z.js";
5
+ } from "../chunk-N4QTLDVM.js";
6
+ import "../chunk-SPZYPRZ6.js";
7
7
  import "../chunk-BUVVRQLZ.js";
8
- import "../chunk-FT7DFRHQ.js";
9
- import "../chunk-TMR7JGMP.js";
8
+ import "../chunk-VERRHMW4.js";
9
+ import "../chunk-F27AAKQ3.js";
10
10
  import "../chunk-CP7OUC2Q.js";
11
11
  import "../chunk-HVKM54BA.js";
12
12
  export {