@cerberus-design/react 0.11.1 → 0.12.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.
- package/build/legacy/_tsup-dts-rollup.d.cts +244 -33
- package/build/legacy/components/Admonition.cjs +1 -1
- package/build/legacy/components/Admonition.cjs.map +1 -1
- package/build/legacy/components/Avatar.cjs +1 -1
- package/build/legacy/components/Avatar.cjs.map +1 -1
- package/build/legacy/components/Checkbox.cjs +1 -1
- package/build/legacy/components/Checkbox.cjs.map +1 -1
- package/build/legacy/components/FileStatus.cjs +1 -1
- package/build/legacy/components/FileStatus.cjs.map +1 -1
- package/build/legacy/components/FileUploader.cjs +1 -1
- package/build/legacy/components/FileUploader.cjs.map +1 -1
- package/build/legacy/components/Input.cjs +1 -1
- package/build/legacy/components/Input.cjs.map +1 -1
- package/build/legacy/components/Menu.cjs +82 -0
- package/build/legacy/components/Menu.cjs.map +1 -0
- package/build/legacy/components/ModalHeader.cjs +2 -1
- package/build/legacy/components/ModalHeader.cjs.map +1 -1
- package/build/legacy/components/NavMenuLink.cjs.map +1 -1
- package/build/legacy/components/NavMenuList.cjs.map +1 -1
- package/build/legacy/components/NavMenuTrigger.cjs.map +1 -1
- package/build/legacy/components/Notification.cjs +3 -3
- package/build/legacy/components/Notification.cjs.map +1 -1
- package/build/legacy/components/Select.cjs +1 -1
- package/build/legacy/components/Select.cjs.map +1 -1
- package/build/legacy/components/Tag.cjs +3 -3
- package/build/legacy/components/Tag.cjs.map +1 -1
- package/build/legacy/components/Tbody.cjs.map +1 -1
- package/build/legacy/components/Td.cjs.map +1 -1
- package/build/legacy/components/Th.cjs +1 -0
- package/build/legacy/components/Th.cjs.map +1 -1
- package/build/legacy/components/Thead.cjs.map +1 -1
- package/build/legacy/components/Toggle.cjs +1 -1
- package/build/legacy/components/Toggle.cjs.map +1 -1
- package/build/legacy/config/cerbIcons.cjs +1 -1
- package/build/legacy/config/cerbIcons.cjs.map +1 -1
- package/build/legacy/config/defineIcons.cjs +1 -1
- package/build/legacy/config/defineIcons.cjs.map +1 -1
- package/build/legacy/context/confirm-modal.cjs +3 -2
- package/build/legacy/context/confirm-modal.cjs.map +1 -1
- package/build/legacy/context/cta-modal.cjs +567 -0
- package/build/legacy/context/cta-modal.cjs.map +1 -0
- package/build/legacy/context/navMenu.cjs.map +1 -1
- package/build/legacy/context/notification-center.cjs +3 -3
- package/build/legacy/context/notification-center.cjs.map +1 -1
- package/build/legacy/context/prompt-modal.cjs +3 -2
- package/build/legacy/context/prompt-modal.cjs.map +1 -1
- package/build/legacy/index.cjs +501 -324
- package/build/legacy/index.cjs.map +1 -1
- package/build/legacy/utils/index.cjs +34 -0
- package/build/legacy/utils/index.cjs.map +1 -0
- package/build/modern/_tsup-dts-rollup.d.ts +244 -33
- package/build/modern/{chunk-HPM2XRWT.js → chunk-3R4TIF2X.js} +1 -1
- package/build/modern/{chunk-HPM2XRWT.js.map → chunk-3R4TIF2X.js.map} +1 -1
- package/build/modern/{chunk-RDQHHCFR.js → chunk-5OSUZUR4.js} +2 -2
- package/build/modern/{chunk-O75QAT4Z.js → chunk-6WS765J3.js} +1 -1
- package/build/modern/chunk-6WS765J3.js.map +1 -0
- package/build/modern/{chunk-KLUBAM4U.js → chunk-7SGPJM66.js} +4 -4
- package/build/modern/chunk-7SGPJM66.js.map +1 -0
- package/build/modern/{chunk-X4Y4WTRU.js → chunk-CSEHDNMJ.js} +7 -7
- package/build/modern/{chunk-TMR7JGMP.js → chunk-F27AAKQ3.js} +3 -3
- package/build/modern/chunk-F27AAKQ3.js.map +1 -0
- package/build/modern/{chunk-243VUIA6.js → chunk-F72ZABKX.js} +2 -2
- package/build/modern/chunk-F72ZABKX.js.map +1 -0
- package/build/modern/{chunk-KF6V5JLW.js → chunk-N4QTLDVM.js} +3 -3
- package/build/modern/{chunk-MDIUFBDX.js → chunk-NB6DV4VA.js} +2 -2
- package/build/modern/{chunk-UJKS4DDN.js → chunk-NKM6PISB.js} +2 -2
- package/build/modern/{chunk-YWCTMLLO.js → chunk-NMNONSHU.js} +2 -2
- package/build/modern/{chunk-OWKN5IV7.js → chunk-PM7CWT3N.js} +2 -2
- package/build/modern/chunk-PM7CWT3N.js.map +1 -0
- package/build/modern/chunk-RUR5MV54.js +52 -0
- package/build/modern/chunk-RUR5MV54.js.map +1 -0
- package/build/modern/{chunk-CO4BKT7K.js → chunk-SGKHA4EB.js} +1 -1
- package/build/modern/chunk-SGKHA4EB.js.map +1 -0
- package/build/modern/{chunk-ZX6DBC2Z.js → chunk-SPZYPRZ6.js} +2 -2
- package/build/modern/chunk-T6LS5P5W.js +155 -0
- package/build/modern/chunk-T6LS5P5W.js.map +1 -0
- package/build/modern/chunk-UTGEFJ3L.js +10 -0
- package/build/modern/chunk-UTGEFJ3L.js.map +1 -0
- package/build/modern/{chunk-5V5MBSM3.js → chunk-UZVQ4INR.js} +2 -2
- package/build/modern/chunk-UZVQ4INR.js.map +1 -0
- package/build/modern/{chunk-FT7DFRHQ.js → chunk-VERRHMW4.js} +2 -2
- package/build/modern/{chunk-3NE6C66J.js → chunk-VP5ERLAY.js} +8 -8
- package/build/modern/{chunk-HCB5NQ5J.js → chunk-W4DXACNV.js} +3 -3
- package/build/modern/{chunk-KBBASJIY.js → chunk-WPVDQRRF.js} +1 -1
- package/build/modern/chunk-WPVDQRRF.js.map +1 -0
- package/build/modern/{chunk-PA5EB7EO.js → chunk-XL4JREDT.js} +2 -2
- package/build/modern/{chunk-PKY46RRA.js → chunk-Y6QQCRQV.js} +1 -1
- package/build/modern/{chunk-PKY46RRA.js.map → chunk-Y6QQCRQV.js.map} +1 -1
- package/build/modern/{chunk-YMJMB6OP.js → chunk-ZBMA5G54.js} +6 -6
- package/build/modern/{chunk-ULYQLKWA.js → chunk-ZFAIE47A.js} +3 -2
- package/build/modern/{chunk-ULYQLKWA.js.map → chunk-ZFAIE47A.js.map} +1 -1
- package/build/modern/{chunk-PKQTTFWA.js → chunk-ZR37P4NZ.js} +1 -1
- package/build/modern/{chunk-PKQTTFWA.js.map → chunk-ZR37P4NZ.js.map} +1 -1
- package/build/modern/components/Admonition.js +4 -4
- package/build/modern/components/Avatar.js +3 -3
- package/build/modern/components/Checkbox.js +3 -3
- package/build/modern/components/FileStatus.js +5 -5
- package/build/modern/components/FileUploader.js +4 -4
- package/build/modern/components/Input.js +3 -3
- package/build/modern/components/Menu.js +19 -0
- package/build/modern/components/Menu.js.map +1 -0
- package/build/modern/components/ModalHeader.js +1 -1
- package/build/modern/components/NavMenuLink.js +1 -1
- package/build/modern/components/NavMenuList.js +2 -2
- package/build/modern/components/NavMenuTrigger.js +2 -2
- package/build/modern/components/Notification.js +3 -3
- package/build/modern/components/Select.js +3 -3
- package/build/modern/components/Tag.js +3 -3
- package/build/modern/components/Tbody.js +1 -1
- package/build/modern/components/Td.js +1 -1
- package/build/modern/components/Th.js +2 -1
- package/build/modern/components/Thead.js +1 -1
- package/build/modern/components/Toggle.js +3 -3
- package/build/modern/config/cerbIcons.js +1 -1
- package/build/modern/config/defineIcons.js +2 -2
- package/build/modern/context/confirm-modal.js +6 -6
- package/build/modern/context/cta-modal.js +25 -0
- package/build/modern/context/cta-modal.js.map +1 -0
- package/build/modern/context/navMenu.js +1 -1
- package/build/modern/context/notification-center.js +4 -4
- package/build/modern/context/prompt-modal.js +7 -7
- package/build/modern/index.js +72 -46
- package/build/modern/index.js.map +1 -1
- package/build/modern/utils/index.js +7 -0
- package/build/modern/utils/index.js.map +1 -0
- package/package.json +3 -2
- package/src/components/Menu.tsx +244 -0
- package/src/components/ModalHeader.tsx +1 -0
- package/src/components/NavMenuLink.tsx +1 -11
- package/src/components/NavMenuList.tsx +1 -3
- package/src/components/NavMenuTrigger.tsx +1 -10
- package/src/components/Notification.tsx +2 -2
- package/src/components/Tag.tsx +8 -4
- package/src/components/Tbody.tsx +1 -2
- package/src/components/Td.tsx +1 -2
- package/src/components/Th.tsx +4 -2
- package/src/components/Thead.tsx +1 -2
- package/src/config/cerbIcons.ts +2 -2
- package/src/context/cta-modal.tsx +210 -0
- package/src/context/navMenu.tsx +1 -2
- package/src/index.ts +3 -0
- package/src/utils/index.ts +19 -0
- package/build/modern/chunk-243VUIA6.js.map +0 -1
- package/build/modern/chunk-5V5MBSM3.js.map +0 -1
- package/build/modern/chunk-CO4BKT7K.js.map +0 -1
- package/build/modern/chunk-KBBASJIY.js.map +0 -1
- package/build/modern/chunk-KLUBAM4U.js.map +0 -1
- package/build/modern/chunk-O75QAT4Z.js.map +0 -1
- package/build/modern/chunk-OWKN5IV7.js.map +0 -1
- package/build/modern/chunk-TMR7JGMP.js.map +0 -1
- /package/build/modern/{chunk-RDQHHCFR.js.map → chunk-5OSUZUR4.js.map} +0 -0
- /package/build/modern/{chunk-X4Y4WTRU.js.map → chunk-CSEHDNMJ.js.map} +0 -0
- /package/build/modern/{chunk-KF6V5JLW.js.map → chunk-N4QTLDVM.js.map} +0 -0
- /package/build/modern/{chunk-MDIUFBDX.js.map → chunk-NB6DV4VA.js.map} +0 -0
- /package/build/modern/{chunk-UJKS4DDN.js.map → chunk-NKM6PISB.js.map} +0 -0
- /package/build/modern/{chunk-YWCTMLLO.js.map → chunk-NMNONSHU.js.map} +0 -0
- /package/build/modern/{chunk-ZX6DBC2Z.js.map → chunk-SPZYPRZ6.js.map} +0 -0
- /package/build/modern/{chunk-FT7DFRHQ.js.map → chunk-VERRHMW4.js.map} +0 -0
- /package/build/modern/{chunk-3NE6C66J.js.map → chunk-VP5ERLAY.js.map} +0 -0
- /package/build/modern/{chunk-HCB5NQ5J.js.map → chunk-W4DXACNV.js.map} +0 -0
- /package/build/modern/{chunk-PA5EB7EO.js.map → chunk-XL4JREDT.js.map} +0 -0
- /package/build/modern/{chunk-YMJMB6OP.js.map → chunk-ZBMA5G54.js.map} +0 -0
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "./chunk-BUVVRQLZ.js";
|
|
7
7
|
import {
|
|
8
8
|
$cerberusIcons
|
|
9
|
-
} from "./chunk-
|
|
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-
|
|
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-
|
|
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-
|
|
58
|
+
//# sourceMappingURL=chunk-NMNONSHU.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useNavMenuContext
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-6WS765J3.js";
|
|
4
4
|
import {
|
|
5
5
|
Show
|
|
6
6
|
} from "./chunk-BUVVRQLZ.js";
|
|
@@ -78,4 +78,4 @@ function NavMenuTrigger(props) {
|
|
|
78
78
|
export {
|
|
79
79
|
NavMenuTrigger
|
|
80
80
|
};
|
|
81
|
-
//# sourceMappingURL=chunk-
|
|
81
|
+
//# sourceMappingURL=chunk-PM7CWT3N.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/NavMenuTrigger.tsx"],"sourcesContent":["'use client'\n\nimport {\n useCallback,\n type ButtonHTMLAttributes,\n type ElementType,\n type MouseEvent,\n} from 'react'\nimport { cx } from '@cerberus/styled-system/css'\nimport { button } from '@cerberus/styled-system/recipes'\nimport {\n createNavTriggerProps,\n type NavTriggerAriaValues,\n} from '../aria-helpers/nav-menu.aria'\nimport { useNavMenuContext } from '../context/navMenu'\nimport type { ButtonProps } from './Button'\nimport { Show } from './Show'\n\n/**\n * This module contains the NavMenuTrigger component.\n * @module\n */\n\nexport interface NavMenuTriggerProps\n extends ButtonHTMLAttributes<HTMLButtonElement>,\n ButtonProps,\n NavTriggerAriaValues {\n /**\n * The element type to render as. Recommended to use for an IconButton trigger vs a standard Button.\n * @default 'button'\n * @example\n * ```tsx\n * <NavMenuTrigger as={IconButton} href=\"/home\" />\n * ```\n */\n as?: ElementType\n}\n\n/**\n * @deprecated use the {@link Menu} family instead\n */\nexport function NavMenuTrigger(props: NavMenuTriggerProps): JSX.Element {\n const {\n as,\n palette,\n usage,\n shape,\n controls,\n expanded: propsExpanded,\n onClick,\n ...nativeProps\n } = props\n const { triggerRef, onToggle, expanded } = useNavMenuContext()\n const ariaProps = createNavTriggerProps({\n controls,\n expanded: propsExpanded ?? expanded,\n })\n const hasAs = Boolean(as)\n const AsSub: ElementType = as!\n\n const handleClick = useCallback(\n (e: MouseEvent<HTMLButtonElement>) => {\n if (onClick) return onClick(e)\n onToggle()\n },\n [onClick, onToggle],\n )\n\n return (\n <Show\n when={hasAs}\n fallback={\n <button\n {...nativeProps}\n {...ariaProps}\n className={cx(\n nativeProps.className,\n button({\n palette,\n usage,\n shape,\n }),\n )}\n onClick={handleClick}\n ref={triggerRef}\n >\n {props.children}\n </button>\n }\n >\n {hasAs && (\n <AsSub\n {...nativeProps}\n {...ariaProps}\n onClick={handleClick}\n ref={triggerRef}\n />\n )}\n </Show>\n )\n}\n"],"mappings":";;;;;;;;;;;AAEA;AAAA,EACE;AAAA,OAIK;AACP,SAAS,UAAU;AACnB,SAAS,cAAc;AA+Df;AA/BD,SAAS,eAAe,OAAyC;AACtE,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,UAAU;AAAA,IACV;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AACJ,QAAM,EAAE,YAAY,UAAU,SAAS,IAAI,kBAAkB;AAC7D,QAAM,YAAY,sBAAsB;AAAA,IACtC;AAAA,IACA,UAAU,iBAAiB;AAAA,EAC7B,CAAC;AACD,QAAM,QAAQ,QAAQ,EAAE;AACxB,QAAM,QAAqB;AAE3B,QAAM,cAAc;AAAA,IAClB,CAAC,MAAqC;AACpC,UAAI,QAAS,QAAO,QAAQ,CAAC;AAC7B,eAAS;AAAA,IACX;AAAA,IACA,CAAC,SAAS,QAAQ;AAAA,EACpB;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAM;AAAA,MACN,UACE;AAAA,QAAC;AAAA;AAAA,UACE,GAAG;AAAA,UACH,GAAG;AAAA,UACJ,WAAW;AAAA,YACT,YAAY;AAAA,YACZ,OAAO;AAAA,cACL;AAAA,cACA;AAAA,cACA;AAAA,YACF,CAAC;AAAA,UACH;AAAA,UACA,SAAS;AAAA,UACT,KAAK;AAAA,UAEJ,gBAAM;AAAA;AAAA,MACT;AAAA,MAGD,mBACC;AAAA,QAAC;AAAA;AAAA,UACE,GAAG;AAAA,UACH,GAAG;AAAA,UACJ,SAAS;AAAA,UACT,KAAK;AAAA;AAAA,MACP;AAAA;AAAA,EAEJ;AAEJ;","names":[]}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
// src/components/Menu.tsx
|
|
2
|
+
import { Menu as ArkMenu } from "@ark-ui/react";
|
|
3
|
+
import { menu } from "@cerberus/styled-system/recipes";
|
|
4
|
+
import { cx } from "@cerberus/styled-system/css";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
var menuStyles = menu();
|
|
7
|
+
var Menu = ArkMenu.Root;
|
|
8
|
+
function MenuTrigger(props) {
|
|
9
|
+
return /* @__PURE__ */ jsx(ArkMenu.Trigger, { ...props, asChild: true });
|
|
10
|
+
}
|
|
11
|
+
function MenuContent(props) {
|
|
12
|
+
return /* @__PURE__ */ jsx(ArkMenu.Positioner, { children: /* @__PURE__ */ jsx(
|
|
13
|
+
ArkMenu.Content,
|
|
14
|
+
{
|
|
15
|
+
...props,
|
|
16
|
+
className: cx(props.className, menuStyles.content)
|
|
17
|
+
}
|
|
18
|
+
) });
|
|
19
|
+
}
|
|
20
|
+
function MenuItem(props) {
|
|
21
|
+
return /* @__PURE__ */ jsx(ArkMenu.Item, { ...props, className: cx(props.className, menuStyles.item) });
|
|
22
|
+
}
|
|
23
|
+
var MenuItemGroup = ArkMenu.ItemGroup;
|
|
24
|
+
function MenuGroupLabel(props) {
|
|
25
|
+
return /* @__PURE__ */ jsx(
|
|
26
|
+
ArkMenu.ItemGroupLabel,
|
|
27
|
+
{
|
|
28
|
+
...props,
|
|
29
|
+
className: cx(props.className, menuStyles.itemGroupLabel)
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
function MenuSeparator(props) {
|
|
34
|
+
return /* @__PURE__ */ jsx(
|
|
35
|
+
ArkMenu.Separator,
|
|
36
|
+
{
|
|
37
|
+
...props,
|
|
38
|
+
className: cx(props.className, menuStyles.separator)
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export {
|
|
44
|
+
Menu,
|
|
45
|
+
MenuTrigger,
|
|
46
|
+
MenuContent,
|
|
47
|
+
MenuItem,
|
|
48
|
+
MenuItemGroup,
|
|
49
|
+
MenuGroupLabel,
|
|
50
|
+
MenuSeparator
|
|
51
|
+
};
|
|
52
|
+
//# sourceMappingURL=chunk-RUR5MV54.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/Menu.tsx"],"sourcesContent":["import { Menu as ArkMenu } from '@ark-ui/react'\nimport { menu } from '@cerberus/styled-system/recipes'\nimport { cx } from '@cerberus/styled-system/css'\n\n/**\n * This module contains the Menu component family.\n * @module Menu\n */\n\nconst menuStyles = menu()\n\n/**\n * The root Menu component which controls the menu.\n * @definition [Cerberus docs](https://cerberus.digitalu.design/react/menu)\n * @example\n * ```tsx\n * <Menu>\n * <MenuTrigger>Trigger</MenuTrigger>\n * </Menu>\n */\nexport const Menu = ArkMenu.Root\n\n/**\n * The MenuTrigger component opens/closes the Menu.\n * @definition [Cerberus docs](https://cerberus.digitalu.design/react/menu)\n * @example\n * ```tsx\n * <Menu>\n * <MenuTrigger>\n * <Button>Trigger</Button>\n * </MenuTrigger>\n * </Menu>\n */\nexport function MenuTrigger(props: ArkMenu.TriggerProps) {\n return <ArkMenu.Trigger {...props} asChild />\n}\n\n/**\n * The MenuContent component is the container for the menu items.\n * @definition [Cerberus docs](https://cerberus.digitalu.design/react/menu)\n * @example\n * ```tsx\n * <Menu>\n * <MenuTrigger>\n * <Button>Trigger</Button>\n * </MenuTrigger>\n * <MenuContent>\n * <MenuItem value=\"item_1\">Item 1</MenuItem>\n * <MenuItem value=\"item_2\">Item 2</MenuItem>\n * </MenuContent>\n * </Menu>\n */\nexport function MenuContent(props: ArkMenu.ContentProps) {\n return (\n <ArkMenu.Positioner>\n <ArkMenu.Content\n {...props}\n className={cx(props.className, menuStyles.content)}\n />\n </ArkMenu.Positioner>\n )\n}\n\n/**\n * The MenuItem component is a single item in the menu.\n * @definition [Cerberus docs](https://cerberus.digitalu.design/react/menu)\n * @example\n * ```tsx\n * <Menu>\n * <MenuTrigger>\n * <Button>Trigger</Button>\n * </MenuTrigger>\n * <MenuContent>\n * <MenuItem value=\"item_1\">Item 1</MenuItem>\n * <MenuItem value=\"item_2\">Item 2</MenuItem>\n * </MenuContent>\n * </Menu>\n */\nexport function MenuItem(props: ArkMenu.ItemProps) {\n return (\n <ArkMenu.Item {...props} className={cx(props.className, menuStyles.item)} />\n )\n}\n\n/**\n * The MenuItemGroup component is a group of menu items.\n * @definition [Cerberus docs](https://cerberus.digitalu.design/react/menu)\n * @example\n * ```tsx\n * <Menu>\n * <MenuTrigger>\n * <Button>Trigger</Button>\n * </MenuTrigger>\n * <MenuContent>\n * <MenuItemGroup>\n * <MenuItem value=\"item_1\">Item 1</MenuItem>\n * <MenuItem value=\"item_2\">Item 2</MenuItem>\n * </MenuItemGroup>\n * </MenuContent>\n * </Menu>\n */\nexport const MenuItemGroup = ArkMenu.ItemGroup\n\n/**\n * The MenuItemGroupLabel component is the label for a group of menu items.\n * @definition [Cerberus docs](https://cerberus.digitalu.design/react/menu)\n * @example\n * ```tsx\n * <Menu>\n * <MenuTrigger>\n * <Button>Trigger</Button>\n * </MenuTrigger>\n * <MenuContent>\n * <MenuItemGroup>\n * <MenuItemGroupLabel>Group Label</MenuItemGroupLabel>\n * <MenuItem value=\"item_1\">Item 1</MenuItem>\n * <MenuItem value=\"item_2\">Item 2</MenuItem>\n * </MenuItemGroup>\n * </MenuContent>\n * </Menu>\n */\nexport function MenuGroupLabel(props: ArkMenu.ItemGroupLabelProps) {\n return (\n <ArkMenu.ItemGroupLabel\n {...props}\n className={cx(props.className, menuStyles.itemGroupLabel)}\n />\n )\n}\n\n/**\n * The MenuSeparator component is a visual divider between menu items.\n * @definition [Cerberus docs](https://cerberus.digitalu.design/react/menu)\n * @example\n * ```tsx\n * <Menu>\n * <MenuTrigger>\n * <Button>Trigger</Button>\n * </MenuTrigger>\n * <MenuContent>\n * <MenuItemGroup>\n * <MenuGroupLabel>Group Label</MenuGroupLabel>\n * <MenuSeparator />\n * <MenuItem value=\"item_1\">Item 1</MenuItem>\n * <MenuItem value=\"item_2\">Item 2</MenuItem>\n * </MenuItemGroup>\n * </MenuContent>\n * </Menu>\n */\nexport function MenuSeparator(props: ArkMenu.SeparatorProps) {\n return (\n <ArkMenu.Separator\n {...props}\n className={cx(props.className, menuStyles.separator)}\n />\n )\n}\n\n/**\n * The MenuCheckboxItem component is a menu item with a checkbox.\n * @definition [Cerberus docs](https://cerberus.digitalu.design/react/menu)\n * @example\n * ```tsx\n * <Menu>\n * <MenuTrigger>\n * <Button>Trigger</Button>\n * </MenuTrigger>\n * <MenuContent>\n * <MenuCheckboxItem\n * checked={checked}\n * onCheckedChange={setChecked}\n * value=\"checked\"\n * >\n * <MenuItemIndicator>✅</MenuItemIndicator>\n * <MenuItemText>Check me</MenuItemText>\n * </MenuCheckboxItem>\n * </MenuContent>\n */\n// export function MenuCheckboxItem(props: ArkMenu.CheckboxItemProps) {\n// return (\n// <ArkMenu.CheckboxItem\n// {...props}\n// className={cx(props.className, menuStyles.item)}\n// />\n// )\n// }\n\n/**\n * The MenuItemText component is the text for a grouped menu item.\n * @definition [Cerberus docs](https://cerberus.digitalu.design/react/menu)\n * @example\n * ```tsx\n * <Menu>\n * <MenuTrigger>\n * <Button>Trigger</Button>\n * </MenuTrigger>\n * <MenuContent>\n * <MenuCheckboxItem\n * checked={checked}\n * onCheckedChange={setChecked}\n * value=\"checked\"\n * >\n * <MenuItemText>Item 1</MenuItemText>\n * </MenuCheckboxItem>\n * </MenuContent>\n * </Menu>\n */\n// export function MenuItemText(props: ArkMenu.ItemTextProps) {\n// return (\n// <ArkMenu.ItemText\n// {...props}\n// className={cx(props.className, menuStyles.itemText)}\n// />\n// )\n// }\n\n/**\n * The MenuItemIndicator component is the indicator for a grouped menu item.\n * @definition [Cerberus docs](https://cerberus.digitalu.design/react/menu)\n * @example\n * ```tsx\n * <Menu>\n * <MenuTrigger>\n * <Button>Trigger</Button>\n * </MenuTrigger>\n * <MenuContent>\n * <MenuCheckboxItem\n * checked={checked}\n * onCheckedChange={setChecked}\n * value=\"checked\"\n * >\n * <MenuItemIndicator>✅</MenuItemIndicator>\n * <MenuItemText>Check me</MenuItemText>\n * </MenuCheckboxItem>\n * </MenuContent>\n */\n// export function MenuItemIndicator(props: ArkMenu.ItemIndicatorProps) {\n// return (\n// <ArkMenu.ItemIndicator\n// {...props}\n// className={cx(props.className, menuStyles.itemIndicator)}\n// />\n// )\n// }\n"],"mappings":";AAAA,SAAS,QAAQ,eAAe;AAChC,SAAS,YAAY;AACrB,SAAS,UAAU;AAgCV;AAzBT,IAAM,aAAa,KAAK;AAWjB,IAAM,OAAO,QAAQ;AAarB,SAAS,YAAY,OAA6B;AACvD,SAAO,oBAAC,QAAQ,SAAR,EAAiB,GAAG,OAAO,SAAO,MAAC;AAC7C;AAiBO,SAAS,YAAY,OAA6B;AACvD,SACE,oBAAC,QAAQ,YAAR,EACC;AAAA,IAAC,QAAQ;AAAA,IAAR;AAAA,MACE,GAAG;AAAA,MACJ,WAAW,GAAG,MAAM,WAAW,WAAW,OAAO;AAAA;AAAA,EACnD,GACF;AAEJ;AAiBO,SAAS,SAAS,OAA0B;AACjD,SACE,oBAAC,QAAQ,MAAR,EAAc,GAAG,OAAO,WAAW,GAAG,MAAM,WAAW,WAAW,IAAI,GAAG;AAE9E;AAmBO,IAAM,gBAAgB,QAAQ;AAoB9B,SAAS,eAAe,OAAoC;AACjE,SACE;AAAA,IAAC,QAAQ;AAAA,IAAR;AAAA,MACE,GAAG;AAAA,MACJ,WAAW,GAAG,MAAM,WAAW,WAAW,cAAc;AAAA;AAAA,EAC1D;AAEJ;AAqBO,SAAS,cAAc,OAA+B;AAC3D,SACE;AAAA,IAAC,QAAQ;AAAA,IAAR;AAAA,MACE,GAAG;AAAA,MACJ,WAAW,GAAG,MAAM,WAAW,WAAW,SAAS;AAAA;AAAA,EACrD;AAEJ;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/Th.tsx"],"sourcesContent":["'use client'\n\nimport { css, cx } from '@cerberus/styled-system/css'\nimport { th, type ThVariantProps } from '@cerberus/styled-system/recipes'\nimport type { MouseEvent } from 'react'\nimport { Show } from './Show'\n\n/**\n * Th component for the Table component\n * @module\n */\n\nexport type ThBaseProps = JSX.IntrinsicElements['th'] & {\n /**\n * Converts the Th into a actionable button. Called when the user clicks on\n * the Th.\n */\n onClick?: (e: MouseEvent<HTMLButtonElement>) => void\n}\nexport type ThProps = ThBaseProps & ThVariantProps\n\n/**\n * Styles for the Th component\n * @see https://cerberus.digitalu.design/react/table\n * @memberof module:Table\n * @example\n * ```tsx\n * <Th>Header 1</Th>\n * ```\n * @example\n * ```tsx\n * <Th onClick={handleClick}>\n * Names\n * <SortIcon />\n * </Th>\n * ```\n */\nexport function Th(props: ThProps) {\n const { size, onClick, ...nativeProps } = props\n return (\n <Show\n when={Boolean(onClick)}\n fallback={\n <th\n {...nativeProps}\n className={cx(nativeProps.className, th({ size }))}\n />\n }\n >\n <th {...nativeProps}>\n <button\n className={cx(\n nativeProps.className,\n th({ size }),\n css({\n alignItems: 'center',\n display: 'inline-flex',\n justifyContent: 'space-between',\n userSelect: 'none',\n w: 'full',\n _hover: {\n bgColor: 'page.bg.100',\n },\n }),\n )}\n onClick={onClick}\n >\n {props.children}\n </button>\n </th>\n </Show>\n )\n}\n"],"mappings":";;;;;AAEA,SAAS,KAAK,UAAU;AACxB,SAAS,UAA+B;AAwChC;AAND,SAAS,GAAG,OAAgB;AACjC,QAAM,EAAE,MAAM,SAAS,GAAG,YAAY,IAAI;AAC1C,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAM,QAAQ,OAAO;AAAA,MACrB,UACE;AAAA,QAAC;AAAA;AAAA,UACE,GAAG;AAAA,UACJ,WAAW,GAAG,YAAY,WAAW,GAAG,EAAE,KAAK,CAAC,CAAC;AAAA;AAAA,MACnD;AAAA,MAGF,8BAAC,QAAI,GAAG,aACN;AAAA,QAAC;AAAA;AAAA,UACC,WAAW;AAAA,YACT,YAAY;AAAA,YACZ,GAAG,EAAE,KAAK,CAAC;AAAA,YACX,IAAI;AAAA,cACF,YAAY;AAAA,cACZ,SAAS;AAAA,cACT,gBAAgB;AAAA,cAChB,YAAY;AAAA,cACZ,GAAG;AAAA,cACH,QAAQ;AAAA,gBACN,SAAS;AAAA,cACX;AAAA,YACF,CAAC;AAAA,UACH;AAAA,UACA;AAAA,UAEC,gBAAM;AAAA;AAAA,MACT,GACF;AAAA;AAAA,EACF;AAEJ;","names":[]}
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-BUVVRQLZ.js";
|
|
4
4
|
import {
|
|
5
5
|
$cerberusIcons
|
|
6
|
-
} from "./chunk-
|
|
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-
|
|
104
|
+
//# sourceMappingURL=chunk-SPZYPRZ6.js.map
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ModalHeading
|
|
3
|
+
} from "./chunk-2UXE5PDG.js";
|
|
4
|
+
import {
|
|
5
|
+
Portal
|
|
6
|
+
} from "./chunk-GLY7GU5S.js";
|
|
7
|
+
import {
|
|
8
|
+
Modal
|
|
9
|
+
} from "./chunk-BE4EOU2P.js";
|
|
10
|
+
import {
|
|
11
|
+
ModalDescription
|
|
12
|
+
} from "./chunk-Q7BRMIBR.js";
|
|
13
|
+
import {
|
|
14
|
+
ModalHeader
|
|
15
|
+
} from "./chunk-ZFAIE47A.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-T6LS5P5W.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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAKK;AAYP,SAAS,cAAc;AAEvB,SAAS,WAAW;AACpB,SAAS,cAAc;AA8HT,cAoBF,YApBE;AA7Fd,IAAM,kBAAkB,cAAoC,IAAI;AAoCzD,SAAS,SAAS,OAAiD;AACxE,QAAM,EAAE,UAAU,MAAM,MAAM,IAAI,SAAS;AAC3C,QAAM,CAAC,SAAS,UAAU,IAAI,SAAqC,IAAI;AACvE,QAAM,YAAY,UAAU,QAAQ;AACpC,QAAM,eAAe,eAAe;AACpC,QAAM,cAAc,SAAS;AAC7B,QAAM,EAAE,OAAO,UAAU,IAAI;AAE7B,QAAM,aAAa;AAAA,IACjB,CAAC,YAAiC;AAChC,YAAM,aAAa;AACnB,UAAI,QAAQ,QAAQ,SAAS,YAAY;AACvC,cAAM,IAAI;AAAA,UACR,wCAAwC,UAAU;AAAA,QACpD;AAAA,MACF;AACA,iBAAW,EAAE,GAAG,QAAQ,CAAC;AACzB,WAAK;AAAA,IACP;AAAA,IACA,CAAC,IAAI;AAAA,EACP;AAEA,QAAM,oBAAoB;AAAA,IACxB,CAAC,UAAyC;AACxC,YAAM,QAAQ,MAAM,cAAc,aAAa,YAAY;AAC3D,YAAM,SAAS,SAAS,QAAQ,OAAO,KAAK,CAAC;AAC7C,UAAI,OAAO,QAAQ,YAAY,YAAY;AACzC,eAAO,QAAQ,KAAK;AAAA,MACtB;AACA,YAAM;AAAA,IACR;AAAA,IACA,CAAC,SAAS,KAAK;AAAA,EACjB;AAEA,QAAM,QAAQ;AAAA,IACZ,OAAO;AAAA,MACL,MAAM;AAAA,IACR;AAAA,IACA,CAAC,UAAU;AAAA,EACb;AAEA,SACE,qBAAC,gBAAgB,UAAhB,EAAyB,OACvB;AAAA,UAAM;AAAA,IAEP,oBAAC,UACC,+BAAC,SAAM,WAAW,WAAW,KAAK,UAChC;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,WAAW,IAAI;AAAA,YACb,SAAS;AAAA,YACT,UAAU;AAAA,YACV,OAAO;AAAA,YACP,KAAK;AAAA,YACL,QAAQ;AAAA,UACV,CAAC;AAAA,UAED,8BAAC,cAAW,WAAU,eAAc,SAAS,OAC3C,8BAAC,aAAU,GACb;AAAA;AAAA,MACF;AAAA,MAEA,qBAAC,eACC;AAAA,4BAAC,UAAO,SAAQ,UAAS,GAAE,QACzB;AAAA,UAAC;AAAA;AAAA,YACC,WAAU;AAAA,YACV,UAAS;AAAA,YACT,MACE;AAAA,cAAC;AAAA;AAAA,gBACC,MAAM,QAAQ,WAAW;AAAA,gBACzB,UAAU,oBAAC,gBAAa,MAAM,IAAI;AAAA,gBAEjC;AAAA;AAAA,YACH;AAAA,YAEF,KAAI;AAAA;AAAA,QACN,GACF;AAAA,QACA,qBAAC,UAAO,KAAI,MAAK,GAAE,QACjB;AAAA,8BAAC,gBAAc,mBAAS,SAAQ;AAAA,UAChC,oBAAC,oBAAkB,mBAAS,aAAY;AAAA,WAC1C;AAAA,SACF;AAAA,MAEA,oBAAC,UAAO,KAAI,MAAK,IAAG,MAAK,GAAE,QACzB,8BAAC,QAAK,MAAM,QAAQ,SAAS,SAAS,MAAM,GACzC,mBAAS,SAAS,IAAI,CAAC,QAAQ,UAC9B;AAAA,QAAC;AAAA;AAAA,UACC,cAAY;AAAA,UACZ,WAAW,IAAI;AAAA,YACb,GAAG;AAAA,UACL,CAAC;AAAA,UAED,SAAS;AAAA,UACT,OAAM;AAAA,UACN,OAAM;AAAA,UAEL,iBAAO;AAAA;AAAA,QALH;AAAA,MAMP,CACD,GACH,GACF;AAAA,OACF,GACF;AAAA,KACF;AAEJ;AAEO,SAAS,cAA6B;AAC3C,QAAM,UAAU,WAAW,eAAe;AAC1C,MAAI,YAAY,MAAM;AACpB,UAAM,IAAI,MAAM,qDAAqD;AAAA,EACvE;AACA,SAAO;AACT;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/utils/index.ts"],"sourcesContent":["/**\n * This module contains utility functions that are used across your app.\n * @module Utils\n */\n\n/**\n * Formats the count of notifications to be displayed in the notification badge.\n * @param count - The number of notifications.\n * @returns The formatted count of notifications.\n * @example\n * ```tsx\n * const count = formatNotifyCount(100)\n * console.log(count) // '99+'\n * ```\n */\nexport function formatNotifyCount(count: number): string {\n if (count > 99) return '99+'\n return count.toString()\n}\n"],"mappings":";AAeO,SAAS,kBAAkB,OAAuB;AACvD,MAAI,QAAQ,GAAI,QAAO;AACvB,SAAO,MAAM,SAAS;AACxB;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useNavMenuContext
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-6WS765J3.js";
|
|
4
4
|
import {
|
|
5
5
|
Show
|
|
6
6
|
} from "./chunk-BUVVRQLZ.js";
|
|
@@ -83,4 +83,4 @@ export {
|
|
|
83
83
|
getPosition,
|
|
84
84
|
NavMenuList
|
|
85
85
|
};
|
|
86
|
-
//# sourceMappingURL=chunk-
|
|
86
|
+
//# sourceMappingURL=chunk-UZVQ4INR.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/NavMenuList.tsx"],"sourcesContent":["'use client'\n\nimport { useMemo, type HTMLAttributes } from 'react'\nimport { cx } from '@cerberus/styled-system/css'\nimport { vstack } from '@cerberus/styled-system/patterns'\nimport { useNavMenuContext } from '../context/navMenu'\nimport type { Positions } from '../types'\nimport { Show } from './Show'\n\n/**\n * This module contains the NavMenuList component.\n * @module\n */\n\ninterface GetPositionResult {\n /**\n * The left position of the element.\n */\n left: string\n /**\n * The right position of the element.\n */\n right: string\n /**\n * The top position of the element.\n */\n top: string\n /**\n * The bottom position of the element.\n */\n bottom: string\n}\n\n/**\n * @deprecated use the {@link Menu} family instead\n */\nexport function getPosition(position: Positions): GetPositionResult {\n const defaultPositions = {\n left: 'auto',\n right: 'auto',\n top: 'auto',\n bottom: 'auto',\n }\n switch (position) {\n case 'right':\n return { ...defaultPositions, top: '0%', left: '105%' }\n case 'left':\n return { ...defaultPositions, top: '0%', right: '105%' }\n case 'bottom':\n return { ...defaultPositions, top: '110%' }\n case 'top':\n return { ...defaultPositions, bottom: '110%' }\n default:\n return defaultPositions\n }\n}\n\nconst navListStyles = vstack({\n alignItems: 'flex-start',\n bgColor: 'page.surface.100',\n boxShadow: 'lg',\n gap: '2',\n opacity: '0',\n p: '4',\n position: 'absolute',\n rounded: 'md',\n zIndex: 'dropdown',\n _motionSafe: {\n animationName: 'zoomIn',\n animationDelay: '100ms',\n animationDuration: '150ms',\n animationFillMode: 'both',\n animationTimingFunction: 'ease-in-out',\n },\n _positionBottom: {\n transformOrigin: 'top left',\n },\n _positionTop: {\n transformOrigin: 'bottom left',\n },\n _positionLeft: {\n transformOrigin: 'top right',\n },\n _positionRight: {\n transformOrigin: 'top left',\n },\n})\n\nexport interface NavMenuListProps extends HTMLAttributes<HTMLUListElement> {\n /**\n * The unique identifier for the NavMenuList. Required for accessibility.\n */\n id: string\n /**\n * The position of the NavMenuList.\n * @type 'top' | 'right' | 'bottom' | 'left'\n * @default 'bottom'\n */\n position?: Positions\n}\n\n/**\n * A component that allows the user to display a menu of navigation links.\n * @definition [Disclosure Nav](https://www.w3.org/WAI/ARIA/apg/patterns/disclosure/examples/disclosure-navigation/)\n * @see https://cerberus.digitalu.design/react/nav-menu\n *\n * @example\n * ```tsx\n * <NavMenu>\n * <NavMenuList id=\"nav-menu-list\" position=\"bottom\">\n * <NavMenuLink href=\"/home\">Home</NavMenuLink>\n * <NavMenuLink href=\"/about\">About</NavMenuLink>\n * </NavMenuList>\n * </NavMenu>\n * ```\n **/\nexport function NavMenuList(props: NavMenuListProps): JSX.Element {\n const { position, ...nativeProps } = props\n const { menuRef, expanded } = useNavMenuContext()\n const locationStyles = useMemo(\n () => getPosition(position ?? 'bottom'),\n [position],\n )\n\n return (\n <Show when={expanded}>\n <ul\n {...nativeProps}\n data-position={position ?? 'bottom'}\n className={cx(nativeProps.className, navListStyles)}\n ref={menuRef}\n style={locationStyles}\n />\n </Show>\n )\n}\n"],"mappings":";;;;;;;;AAEA,SAAS,eAAoC;AAC7C,SAAS,UAAU;AACnB,SAAS,cAAc;AA0HjB;AA1FC,SAAS,YAAY,UAAwC;AAClE,QAAM,mBAAmB;AAAA,IACvB,MAAM;AAAA,IACN,OAAO;AAAA,IACP,KAAK;AAAA,IACL,QAAQ;AAAA,EACV;AACA,UAAQ,UAAU;AAAA,IAChB,KAAK;AACH,aAAO,EAAE,GAAG,kBAAkB,KAAK,MAAM,MAAM,OAAO;AAAA,IACxD,KAAK;AACH,aAAO,EAAE,GAAG,kBAAkB,KAAK,MAAM,OAAO,OAAO;AAAA,IACzD,KAAK;AACH,aAAO,EAAE,GAAG,kBAAkB,KAAK,OAAO;AAAA,IAC5C,KAAK;AACH,aAAO,EAAE,GAAG,kBAAkB,QAAQ,OAAO;AAAA,IAC/C;AACE,aAAO;AAAA,EACX;AACF;AAEA,IAAM,gBAAgB,OAAO;AAAA,EAC3B,YAAY;AAAA,EACZ,SAAS;AAAA,EACT,WAAW;AAAA,EACX,KAAK;AAAA,EACL,SAAS;AAAA,EACT,GAAG;AAAA,EACH,UAAU;AAAA,EACV,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,aAAa;AAAA,IACX,eAAe;AAAA,IACf,gBAAgB;AAAA,IAChB,mBAAmB;AAAA,IACnB,mBAAmB;AAAA,IACnB,yBAAyB;AAAA,EAC3B;AAAA,EACA,iBAAiB;AAAA,IACf,iBAAiB;AAAA,EACnB;AAAA,EACA,cAAc;AAAA,IACZ,iBAAiB;AAAA,EACnB;AAAA,EACA,eAAe;AAAA,IACb,iBAAiB;AAAA,EACnB;AAAA,EACA,gBAAgB;AAAA,IACd,iBAAiB;AAAA,EACnB;AACF,CAAC;AA8BM,SAAS,YAAY,OAAsC;AAChE,QAAM,EAAE,UAAU,GAAG,YAAY,IAAI;AACrC,QAAM,EAAE,SAAS,SAAS,IAAI,kBAAkB;AAChD,QAAM,iBAAiB;AAAA,IACrB,MAAM,YAAY,YAAY,QAAQ;AAAA,IACtC,CAAC,QAAQ;AAAA,EACX;AAEA,SACE,oBAAC,QAAK,MAAM,UACV;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,iBAAe,YAAY;AAAA,MAC3B,WAAW,GAAG,YAAY,WAAW,aAAa;AAAA,MAClD,KAAK;AAAA,MACL,OAAO;AAAA;AAAA,EACT,GACF;AAEJ;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
defaultIcons
|
|
3
|
-
} from "./chunk-
|
|
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-
|
|
27
|
+
//# sourceMappingURL=chunk-VERRHMW4.js.map
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ModalHeading
|
|
3
|
+
} from "./chunk-2UXE5PDG.js";
|
|
1
4
|
import {
|
|
2
5
|
Portal
|
|
3
6
|
} from "./chunk-GLY7GU5S.js";
|
|
4
7
|
import {
|
|
5
8
|
Input
|
|
6
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-NKM6PISB.js";
|
|
7
10
|
import {
|
|
8
11
|
Label
|
|
9
12
|
} from "./chunk-NMF2HYWO.js";
|
|
@@ -15,13 +18,10 @@ import {
|
|
|
15
18
|
} from "./chunk-Q7BRMIBR.js";
|
|
16
19
|
import {
|
|
17
20
|
ModalHeader
|
|
18
|
-
} from "./chunk-
|
|
19
|
-
import {
|
|
20
|
-
ModalHeading
|
|
21
|
-
} from "./chunk-2UXE5PDG.js";
|
|
21
|
+
} from "./chunk-ZFAIE47A.js";
|
|
22
22
|
import {
|
|
23
23
|
Avatar
|
|
24
|
-
} from "./chunk-
|
|
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-
|
|
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-
|
|
243
|
+
//# sourceMappingURL=chunk-VP5ERLAY.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Avatar
|
|
3
|
-
} from "./chunk-
|
|
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-
|
|
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-
|
|
75
|
+
//# sourceMappingURL=chunk-W4DXACNV.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/NavMenuLink.tsx"],"sourcesContent":["import type { AnchorHTMLAttributes, ElementType } from 'react'\nimport { css, cx } from '@cerberus/styled-system/css'\nimport { Show } from './Show'\n\n/**\n * This module contains the NavMenuLink component.\n * @module\n */\n\nexport interface NavMenuLinkProps\n extends AnchorHTMLAttributes<HTMLAnchorElement> {\n /**\n * The element type to render as. Recommended to use for Next apps with the\n * `Link` component.\n */\n as?: ElementType\n}\n\n/**\n * @deprecated use the {@link Menu} family instead\n */\nexport function NavMenuLink(props: NavMenuLinkProps): JSX.Element {\n const { as, ...nativeProps } = props\n const hasAs = Boolean(as)\n const AsSub: ElementType = as!\n\n return (\n <li\n className={css({\n w: 'full',\n })}\n >\n <Show\n when={hasAs}\n fallback={\n <a\n {...nativeProps}\n className={cx(\n nativeProps.className,\n css({\n color: 'action.navigation.initial',\n textStyle: 'link',\n _hover: {\n color: 'action.navigation.hover',\n },\n }),\n )}\n />\n }\n >\n {hasAs && <AsSub {...nativeProps} />}\n </Show>\n </li>\n )\n}\n"],"mappings":";;;;;AACA,SAAS,KAAK,UAAU;AAkCd;AAdH,SAAS,YAAY,OAAsC;AAChE,QAAM,EAAE,IAAI,GAAG,YAAY,IAAI;AAC/B,QAAM,QAAQ,QAAQ,EAAE;AACxB,QAAM,QAAqB;AAE3B,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW,IAAI;AAAA,QACb,GAAG;AAAA,MACL,CAAC;AAAA,MAED;AAAA,QAAC;AAAA;AAAA,UACC,MAAM;AAAA,UACN,UACE;AAAA,YAAC;AAAA;AAAA,cACE,GAAG;AAAA,cACJ,WAAW;AAAA,gBACT,YAAY;AAAA,gBACZ,IAAI;AAAA,kBACF,OAAO;AAAA,kBACP,WAAW;AAAA,kBACX,QAAQ;AAAA,oBACN,OAAO;AAAA,kBACT;AAAA,gBACF,CAAC;AAAA,cACH;AAAA;AAAA,UACF;AAAA,UAGD,mBAAS,oBAAC,SAAO,GAAG,aAAa;AAAA;AAAA,MACpC;AAAA;AAAA,EACF;AAEJ;","names":[]}
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "./chunk-BUVVRQLZ.js";
|
|
7
7
|
import {
|
|
8
8
|
$cerberusIcons
|
|
9
|
-
} from "./chunk-
|
|
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-
|
|
68
|
+
//# sourceMappingURL=chunk-XL4JREDT.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/Thead.tsx"],"sourcesContent":["import { cx } from '@cerberus/styled-system/css'\nimport { thead } from '@cerberus/styled-system/recipes'\
|
|
1
|
+
{"version":3,"sources":["../../src/components/Thead.tsx"],"sourcesContent":["import { cx } from '@cerberus/styled-system/css'\nimport { thead } from '@cerberus/styled-system/recipes'\n\n/**\n * This module contains the Thead component.\n * @module\n */\n\nexport type TheadProps = JSX.IntrinsicElements['thead']\n\n/**\n * The Thead component is used to render a table header.\n * @see https://cerberus.digitalu.design/react/table\n * @memberof module:Table\n * @example\n * ```tsx\n * <Thead>\n * {children}\n * </Thead>\n * ```\n */\nexport function Thead(props: TheadProps) {\n return <thead {...props} className={cx(props.className, thead())} />\n}\n"],"mappings":";AAAA,SAAS,UAAU;AACnB,SAAS,aAAa;AAqBb;AADF,SAAS,MAAM,OAAmB;AACvC,SAAO,oBAAC,WAAO,GAAG,OAAO,WAAW,GAAG,MAAM,WAAW,MAAM,CAAC,GAAG;AACpE;","names":[]}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ProgressBar
|
|
3
3
|
} from "./chunk-KCANMM64.js";
|
|
4
|
-
import {
|
|
5
|
-
FieldMessage
|
|
6
|
-
} from "./chunk-JWIJHSI6.js";
|
|
7
4
|
import {
|
|
8
5
|
IconButton
|
|
9
6
|
} from "./chunk-APD6IX5R.js";
|
|
7
|
+
import {
|
|
8
|
+
FieldMessage
|
|
9
|
+
} from "./chunk-JWIJHSI6.js";
|
|
10
10
|
import {
|
|
11
11
|
Avatar
|
|
12
|
-
} from "./chunk-
|
|
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-
|
|
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-
|
|
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-
|
|
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,
|
|
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":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/Tbody.tsx"],"sourcesContent":["import { tbody, type TbodyVariantProps } from '@cerberus/styled-system/recipes'\nimport { cx } from '@cerberus/styled-system/css'\
|
|
1
|
+
{"version":3,"sources":["../../src/components/Tbody.tsx"],"sourcesContent":["import { tbody, type TbodyVariantProps } from '@cerberus/styled-system/recipes'\nimport { cx } from '@cerberus/styled-system/css'\n\n/**\n * This module provides a TBody component.\n * @module\n */\n\nexport type TbodyBaseProps = JSX.IntrinsicElements['tbody']\nexport type TbodyProps = TbodyBaseProps & TbodyVariantProps\n\n/**\n * The TBody component is used to render a table body.\n * @see https://cerberus.digitalu.design/react/table\n * @memberof module:Table\n * @example\n * ```tsx\n * <TBody>\n * {children}\n * </TBody>\n * ```\n */\nexport function Tbody(props: TbodyProps) {\n const { decoration, ...nativeProps } = props\n return (\n <tbody\n {...nativeProps}\n className={cx(\n nativeProps.className,\n tbody({\n decoration,\n }),\n )}\n />\n )\n}\n"],"mappings":";AAAA,SAAS,aAAqC;AAC9C,SAAS,UAAU;AAwBf;AAHG,SAAS,MAAM,OAAmB;AACvC,QAAM,EAAE,YAAY,GAAG,YAAY,IAAI;AACvC,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,WAAW;AAAA,QACT,YAAY;AAAA,QACZ,MAAM;AAAA,UACJ;AAAA,QACF,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-
|
|
6
|
-
import "../chunk-
|
|
5
|
+
} from "../chunk-N4QTLDVM.js";
|
|
6
|
+
import "../chunk-SPZYPRZ6.js";
|
|
7
7
|
import "../chunk-BUVVRQLZ.js";
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
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 {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Avatar
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-SPZYPRZ6.js";
|
|
4
4
|
import "../chunk-BUVVRQLZ.js";
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
5
|
+
import "../chunk-VERRHMW4.js";
|
|
6
|
+
import "../chunk-F27AAKQ3.js";
|
|
7
7
|
import "../chunk-CP7OUC2Q.js";
|
|
8
8
|
import "../chunk-HVKM54BA.js";
|
|
9
9
|
export {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
Checkbox
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-NB6DV4VA.js";
|
|
5
5
|
import "../chunk-UZDVOIW5.js";
|
|
6
6
|
import "../chunk-BUVVRQLZ.js";
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
7
|
+
import "../chunk-VERRHMW4.js";
|
|
8
|
+
import "../chunk-F27AAKQ3.js";
|
|
9
9
|
import "../chunk-CP7OUC2Q.js";
|
|
10
10
|
import "../chunk-HVKM54BA.js";
|
|
11
11
|
export {
|