@cerberus-design/react 0.8.0-next-79fb5c6 → 0.8.0-next-9aba71d
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.ts +65 -5
- package/build/legacy/{chunk-VQMP3PBJ.js → chunk-23UPROCG.js} +3 -3
- package/build/legacy/{chunk-VQMP3PBJ.js.map → chunk-23UPROCG.js.map} +1 -1
- package/build/legacy/{chunk-RQPDRHRP.js → chunk-2FK7NR7Y.js} +4 -4
- package/build/legacy/{chunk-6PN23MAZ.js → chunk-3RRNMPFC.js} +2 -2
- package/build/{modern/chunk-R6DGIPXN.js → legacy/chunk-4FD33RTW.js} +5 -5
- package/build/legacy/{chunk-C7447UIN.js → chunk-53QBTZZF.js} +5 -5
- package/build/legacy/{chunk-HQIRGWY3.js → chunk-5WVXIAG2.js} +2 -2
- package/build/legacy/chunk-7NX4RGDB.js +218 -0
- package/build/legacy/chunk-7NX4RGDB.js.map +1 -0
- package/build/{modern/chunk-K3X3OMAA.js → legacy/chunk-GUECLKHY.js} +9 -1
- package/build/legacy/chunk-GUECLKHY.js.map +1 -0
- package/build/{modern/chunk-MVV3VTY2.js → legacy/chunk-ID3XWGLY.js} +2 -2
- package/build/legacy/{chunk-BI6UZBJB.js → chunk-JHAI4ZHG.js} +2 -2
- package/build/legacy/{chunk-7EDCTSAP.js → chunk-KUQZECNS.js} +5 -5
- package/build/legacy/{chunk-RHMGQNFD.js → chunk-RHG26FYL.js} +5 -5
- package/build/legacy/{chunk-XKID4ZMW.js → chunk-TJI2SJCZ.js} +10 -10
- package/build/{modern/chunk-JJP2TFTU.js → legacy/chunk-VCR5C6Q3.js} +1 -1
- package/build/legacy/chunk-VCR5C6Q3.js.map +1 -0
- package/build/legacy/components/Checkbox.js +4 -4
- package/build/legacy/components/FileStatus.js +17 -0
- package/build/legacy/components/FileStatus.js.map +1 -0
- package/build/legacy/components/FileUploader.js +3 -3
- package/build/legacy/components/Input.js +4 -4
- package/build/legacy/components/Label.js +2 -2
- package/build/legacy/components/ModalIcon.js +1 -1
- package/build/legacy/components/Notification.js +3 -3
- package/build/legacy/components/Select.js +4 -4
- package/build/legacy/components/Toggle.js +3 -3
- package/build/legacy/config/cerbIcons.js +1 -1
- package/build/legacy/config/defineIcons.js +2 -2
- package/build/legacy/context/confirm-modal.js +4 -4
- package/build/legacy/context/notification-center.js +4 -4
- package/build/legacy/context/prompt-modal.js +7 -7
- package/build/legacy/index.js +33 -27
- package/build/legacy/index.js.map +1 -1
- package/build/modern/_tsup-dts-rollup.d.ts +65 -5
- package/build/modern/{chunk-RQPDRHRP.js → chunk-2FK7NR7Y.js} +4 -4
- package/build/{legacy/chunk-R6DGIPXN.js → modern/chunk-4FD33RTW.js} +5 -5
- package/build/modern/{chunk-C7447UIN.js → chunk-53QBTZZF.js} +5 -5
- package/build/modern/{chunk-HQIRGWY3.js → chunk-5WVXIAG2.js} +2 -2
- package/build/modern/chunk-7NX4RGDB.js +218 -0
- package/build/modern/chunk-7NX4RGDB.js.map +1 -0
- package/build/modern/{chunk-HVICMTKV.js → chunk-EJIMJWPB.js} +2 -2
- package/build/{legacy/chunk-K3X3OMAA.js → modern/chunk-GUECLKHY.js} +9 -1
- package/build/modern/chunk-GUECLKHY.js.map +1 -0
- package/build/modern/{chunk-R4V7FTYK.js → chunk-GZY6CH7D.js} +5 -5
- package/build/{legacy/chunk-MVV3VTY2.js → modern/chunk-ID3XWGLY.js} +2 -2
- package/build/modern/{chunk-RHMGQNFD.js → chunk-RHG26FYL.js} +5 -5
- package/build/modern/{chunk-66OTWSEH.js → chunk-S6CMAXQF.js} +10 -10
- package/build/modern/{chunk-EKUUJB37.js → chunk-TF3HRELU.js} +3 -3
- package/build/modern/{chunk-EKUUJB37.js.map → chunk-TF3HRELU.js.map} +1 -1
- package/build/{legacy/chunk-JJP2TFTU.js → modern/chunk-VCR5C6Q3.js} +1 -1
- package/build/modern/chunk-VCR5C6Q3.js.map +1 -0
- package/build/modern/{chunk-ETIKSLRO.js → chunk-VPWBSZAR.js} +2 -2
- package/build/modern/components/Checkbox.js +4 -4
- package/build/modern/components/FileStatus.js +17 -0
- package/build/modern/components/FileStatus.js.map +1 -0
- package/build/modern/components/FileUploader.js +3 -3
- package/build/modern/components/Input.js +4 -4
- package/build/modern/components/Label.js +2 -2
- package/build/modern/components/ModalIcon.js +1 -1
- package/build/modern/components/Notification.js +3 -3
- package/build/modern/components/Select.js +4 -4
- 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 +4 -4
- package/build/modern/context/notification-center.js +4 -4
- package/build/modern/context/prompt-modal.js +7 -7
- package/build/modern/index.js +33 -27
- package/build/modern/index.js.map +1 -1
- package/package.json +2 -2
- package/src/components/FileStatus.tsx +246 -0
- package/src/components/FileUploader.tsx +1 -1
- package/src/components/ModalIcon.tsx +2 -2
- package/src/config/cerbIcons.ts +12 -0
- package/src/index.ts +1 -0
- package/build/legacy/chunk-JJP2TFTU.js.map +0 -1
- package/build/legacy/chunk-K3X3OMAA.js.map +0 -1
- package/build/modern/chunk-JJP2TFTU.js.map +0 -1
- package/build/modern/chunk-K3X3OMAA.js.map +0 -1
- /package/build/legacy/{chunk-RQPDRHRP.js.map → chunk-2FK7NR7Y.js.map} +0 -0
- /package/build/legacy/{chunk-6PN23MAZ.js.map → chunk-3RRNMPFC.js.map} +0 -0
- /package/build/legacy/{chunk-R6DGIPXN.js.map → chunk-4FD33RTW.js.map} +0 -0
- /package/build/legacy/{chunk-C7447UIN.js.map → chunk-53QBTZZF.js.map} +0 -0
- /package/build/legacy/{chunk-HQIRGWY3.js.map → chunk-5WVXIAG2.js.map} +0 -0
- /package/build/legacy/{chunk-MVV3VTY2.js.map → chunk-ID3XWGLY.js.map} +0 -0
- /package/build/legacy/{chunk-BI6UZBJB.js.map → chunk-JHAI4ZHG.js.map} +0 -0
- /package/build/legacy/{chunk-7EDCTSAP.js.map → chunk-KUQZECNS.js.map} +0 -0
- /package/build/legacy/{chunk-RHMGQNFD.js.map → chunk-RHG26FYL.js.map} +0 -0
- /package/build/legacy/{chunk-XKID4ZMW.js.map → chunk-TJI2SJCZ.js.map} +0 -0
- /package/build/modern/{chunk-RQPDRHRP.js.map → chunk-2FK7NR7Y.js.map} +0 -0
- /package/build/modern/{chunk-R6DGIPXN.js.map → chunk-4FD33RTW.js.map} +0 -0
- /package/build/modern/{chunk-C7447UIN.js.map → chunk-53QBTZZF.js.map} +0 -0
- /package/build/modern/{chunk-HQIRGWY3.js.map → chunk-5WVXIAG2.js.map} +0 -0
- /package/build/modern/{chunk-HVICMTKV.js.map → chunk-EJIMJWPB.js.map} +0 -0
- /package/build/modern/{chunk-R4V7FTYK.js.map → chunk-GZY6CH7D.js.map} +0 -0
- /package/build/modern/{chunk-MVV3VTY2.js.map → chunk-ID3XWGLY.js.map} +0 -0
- /package/build/modern/{chunk-RHMGQNFD.js.map → chunk-RHG26FYL.js.map} +0 -0
- /package/build/modern/{chunk-66OTWSEH.js.map → chunk-S6CMAXQF.js.map} +0 -0
- /package/build/modern/{chunk-ETIKSLRO.js.map → chunk-VPWBSZAR.js.map} +0 -0
|
@@ -54,6 +54,7 @@ import { DroppableContainers } from '@dnd-kit/core';
|
|
|
54
54
|
import { DroppableMeasuring } from '@dnd-kit/core';
|
|
55
55
|
import { ElementType } from 'react';
|
|
56
56
|
import { fieldMessage } from '@cerberus/styled-system/recipes';
|
|
57
|
+
import { FileStatusVariantProps } from '@cerberus/styled-system/recipes';
|
|
57
58
|
import { ForwardRefExoticComponent } from 'react';
|
|
58
59
|
import { getClientRect } from '@dnd-kit/core';
|
|
59
60
|
import { getFirstCollision } from '@dnd-kit/core';
|
|
@@ -319,7 +320,9 @@ export { DefaultThemes as DefaultThemes_alias_1 }
|
|
|
319
320
|
|
|
320
321
|
export declare interface DefinedIcons {
|
|
321
322
|
checkbox?: IconType;
|
|
323
|
+
close?: IconType;
|
|
322
324
|
confirmModal?: IconType;
|
|
325
|
+
delete?: IconType;
|
|
323
326
|
promptModal?: IconType;
|
|
324
327
|
fileUploader?: IconType;
|
|
325
328
|
indeterminate?: IconType;
|
|
@@ -328,6 +331,8 @@ export declare interface DefinedIcons {
|
|
|
328
331
|
warningNotification?: IconType;
|
|
329
332
|
dangerNotification?: IconType;
|
|
330
333
|
invalid: IconType;
|
|
334
|
+
invalidAlt?: IconType;
|
|
335
|
+
redo?: IconType;
|
|
331
336
|
selectArrow?: IconType;
|
|
332
337
|
toggleChecked?: IconType;
|
|
333
338
|
}
|
|
@@ -497,6 +502,48 @@ declare type FieldMessageRecipe = RecipeVariantProps<typeof fieldMessage>;
|
|
|
497
502
|
export { FieldMessageRecipe }
|
|
498
503
|
export { FieldMessageRecipe as FieldMessageRecipe_alias_1 }
|
|
499
504
|
|
|
505
|
+
declare interface FileBaseStatusProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onClick'> {
|
|
506
|
+
file: string;
|
|
507
|
+
now: number;
|
|
508
|
+
status: processStatus;
|
|
509
|
+
onClick: (status: FileStatusActions, e: MouseEvent_2<HTMLButtonElement>) => void;
|
|
510
|
+
}
|
|
511
|
+
export { FileBaseStatusProps }
|
|
512
|
+
export { FileBaseStatusProps as FileBaseStatusProps_alias_1 }
|
|
513
|
+
|
|
514
|
+
/**
|
|
515
|
+
* This component displays the status of a file.
|
|
516
|
+
* @param props - {
|
|
517
|
+
* file: string,
|
|
518
|
+
* now: number,
|
|
519
|
+
* status: keyof typeof fileStatus,
|
|
520
|
+
* action: (status: FileStatusActions, e: MouseEvent<HTMLButtonElement>) => void
|
|
521
|
+
* }.
|
|
522
|
+
* @example
|
|
523
|
+
* ```tsx
|
|
524
|
+
* <FileStatus file="file.txt" now={0} status={processStatus.TODO} action={(status, e) => console.log(status, e)} />
|
|
525
|
+
* ```
|
|
526
|
+
*/
|
|
527
|
+
declare function FileStatus(props: FileStatusProps): JSX_2.Element;
|
|
528
|
+
export { FileStatus }
|
|
529
|
+
export { FileStatus as FileStatus_alias_1 }
|
|
530
|
+
|
|
531
|
+
declare type FileStatusActions = 'cancel' | 'retry' | 'delete';
|
|
532
|
+
export { FileStatusActions }
|
|
533
|
+
export { FileStatusActions as FileStatusActions_alias_1 }
|
|
534
|
+
|
|
535
|
+
/**
|
|
536
|
+
* This module contains the FileStatus component.
|
|
537
|
+
* @module
|
|
538
|
+
*/
|
|
539
|
+
declare type FileStatusKey = (typeof processStatus)[keyof typeof processStatus];
|
|
540
|
+
export { FileStatusKey }
|
|
541
|
+
export { FileStatusKey as FileStatusKey_alias_1 }
|
|
542
|
+
|
|
543
|
+
declare type FileStatusProps = FileBaseStatusProps & FileStatusVariantProps;
|
|
544
|
+
export { FileStatusProps }
|
|
545
|
+
export { FileStatusProps as FileStatusProps_alias_1 }
|
|
546
|
+
|
|
500
547
|
declare function FileUploader(props: FileUploaderProps): JSX_2.Element;
|
|
501
548
|
export { FileUploader }
|
|
502
549
|
export { FileUploader as FileUploader_alias_1 }
|
|
@@ -728,11 +775,7 @@ declare function ModalIcon(props: PropsWithChildren<ModalIconProps>): JSX_2.Elem
|
|
|
728
775
|
export { ModalIcon }
|
|
729
776
|
export { ModalIcon as ModalIcon_alias_1 }
|
|
730
777
|
|
|
731
|
-
declare type
|
|
732
|
-
export { ModalIconBaseProps }
|
|
733
|
-
export { ModalIconBaseProps as ModalIconBaseProps_alias_1 }
|
|
734
|
-
|
|
735
|
-
declare type ModalIconProps = ModalIconBaseProps & ModalIconVariantProps;
|
|
778
|
+
declare type ModalIconProps = HTMLAttributes<HTMLDivElement> & ModalIconVariantProps;
|
|
736
779
|
export { ModalIconProps }
|
|
737
780
|
export { ModalIconProps as ModalIconProps_alias_1 }
|
|
738
781
|
|
|
@@ -1009,6 +1052,23 @@ declare type Positions = 'top' | 'right' | 'bottom' | 'left';
|
|
|
1009
1052
|
export { Positions }
|
|
1010
1053
|
export { Positions as Positions_alias_1 }
|
|
1011
1054
|
|
|
1055
|
+
/**
|
|
1056
|
+
* A helper object to represent the status of a file.
|
|
1057
|
+
* @example
|
|
1058
|
+
* ```tsx
|
|
1059
|
+
* import { fileStatus } from '@cerberus/react'
|
|
1060
|
+
* processStatus.TODO // 'todo'
|
|
1061
|
+
* ```
|
|
1062
|
+
*/
|
|
1063
|
+
declare const enum processStatus {
|
|
1064
|
+
TODO = "todo",
|
|
1065
|
+
PROCESSING = "processing",
|
|
1066
|
+
DONE = "done",
|
|
1067
|
+
ERROR = "error"
|
|
1068
|
+
}
|
|
1069
|
+
export { processStatus }
|
|
1070
|
+
export { processStatus as processStatus_alias_1 }
|
|
1071
|
+
|
|
1012
1072
|
/**
|
|
1013
1073
|
* The ProgressBar component is used to display the progress of a task.
|
|
1014
1074
|
* @param props - HTML div element attributes
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-4O4QFF4S.js";
|
|
4
4
|
import {
|
|
5
5
|
$cerberusIcons
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-5WVXIAG2.js";
|
|
7
7
|
|
|
8
8
|
// src/components/FileUploader.tsx
|
|
9
9
|
import { cx } from "@cerberus/styled-system/css";
|
|
@@ -40,7 +40,7 @@ function FileUploader(props) {
|
|
|
40
40
|
"Import ",
|
|
41
41
|
(_a = props.accept) == null ? void 0 : _a.replace(",", ", "),
|
|
42
42
|
" files",
|
|
43
|
-
/* @__PURE__ */ jsx("p", { className: styles.description, children: "
|
|
43
|
+
/* @__PURE__ */ jsx("p", { className: styles.description, children: "Click to select files" }),
|
|
44
44
|
/* @__PURE__ */ jsx(
|
|
45
45
|
"input",
|
|
46
46
|
{
|
|
@@ -60,4 +60,4 @@ function FileUploader(props) {
|
|
|
60
60
|
export {
|
|
61
61
|
FileUploader
|
|
62
62
|
};
|
|
63
|
-
//# sourceMappingURL=chunk-
|
|
63
|
+
//# sourceMappingURL=chunk-23UPROCG.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/FileUploader.tsx"],"sourcesContent":["'use client'\n\nimport { cx } from '@cerberus/styled-system/css'\nimport { circle, vstack } from '@cerberus/styled-system/patterns'\nimport { type InputHTMLAttributes } from 'react'\nimport { Show } from './Show'\nimport { fileUploader, modalIcon } from '@cerberus/styled-system/recipes'\nimport { $cerberusIcons } from '../config/defineIcons'\n\nexport interface FileUploaderProps\n extends InputHTMLAttributes<HTMLInputElement> {\n heading?: string\n name: string\n}\n\nexport function FileUploader(props: FileUploaderProps) {\n const styles = fileUploader()\n const Icon = $cerberusIcons.fileUploader\n\n return (\n <div\n className={cx(\n vstack({\n justify: 'center',\n }),\n styles.container,\n )}\n >\n <span className={cx(styles.icon, modalIcon(), circle())}>\n <Icon />\n </span>\n\n <label\n className={cx(\n vstack({\n justify: 'center',\n }),\n styles.label,\n )}\n htmlFor={props.name}\n >\n <Show when={Boolean(props.heading)}>\n <p className={styles.heading}>{props.heading}</p>\n </Show>\n Import {props.accept?.replace(',', ', ')} files\n <p className={styles.description}>
|
|
1
|
+
{"version":3,"sources":["../../src/components/FileUploader.tsx"],"sourcesContent":["'use client'\n\nimport { cx } from '@cerberus/styled-system/css'\nimport { circle, vstack } from '@cerberus/styled-system/patterns'\nimport { type InputHTMLAttributes } from 'react'\nimport { Show } from './Show'\nimport { fileUploader, modalIcon } from '@cerberus/styled-system/recipes'\nimport { $cerberusIcons } from '../config/defineIcons'\n\nexport interface FileUploaderProps\n extends InputHTMLAttributes<HTMLInputElement> {\n heading?: string\n name: string\n}\n\nexport function FileUploader(props: FileUploaderProps) {\n const styles = fileUploader()\n const Icon = $cerberusIcons.fileUploader\n\n return (\n <div\n className={cx(\n vstack({\n justify: 'center',\n }),\n styles.container,\n )}\n >\n <span className={cx(styles.icon, modalIcon(), circle())}>\n <Icon />\n </span>\n\n <label\n className={cx(\n vstack({\n justify: 'center',\n }),\n styles.label,\n )}\n htmlFor={props.name}\n >\n <Show when={Boolean(props.heading)}>\n <p className={styles.heading}>{props.heading}</p>\n </Show>\n Import {props.accept?.replace(',', ', ')} files\n <p className={styles.description}>Click to select files</p>\n <input\n {...props}\n className={cx(props.className, styles.input)}\n type=\"file\"\n />\n </label>\n </div>\n )\n}\n"],"mappings":";;;;;;;;AAEA,SAAS,UAAU;AACnB,SAAS,QAAQ,cAAc;AAG/B,SAAS,cAAc,iBAAiB;AAuBhC,cAGF,YAHE;AAdD,SAAS,aAAa,OAA0B;AAfvD;AAgBE,QAAM,SAAS,aAAa;AAC5B,QAAM,OAAO,eAAe;AAE5B,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW;AAAA,QACT,OAAO;AAAA,UACL,SAAS;AAAA,QACX,CAAC;AAAA,QACD,OAAO;AAAA,MACT;AAAA,MAEA;AAAA,4BAAC,UAAK,WAAW,GAAG,OAAO,MAAM,UAAU,GAAG,OAAO,CAAC,GACpD,8BAAC,QAAK,GACR;AAAA,QAEA;AAAA,UAAC;AAAA;AAAA,YACC,WAAW;AAAA,cACT,OAAO;AAAA,gBACL,SAAS;AAAA,cACX,CAAC;AAAA,cACD,OAAO;AAAA,YACT;AAAA,YACA,SAAS,MAAM;AAAA,YAEf;AAAA,kCAAC,QAAK,MAAM,QAAQ,MAAM,OAAO,GAC/B,8BAAC,OAAE,WAAW,OAAO,SAAU,gBAAM,SAAQ,GAC/C;AAAA,cAAO;AAAA,eACC,WAAM,WAAN,mBAAc,QAAQ,KAAK;AAAA,cAAM;AAAA,cACzC,oBAAC,OAAE,WAAW,OAAO,aAAa,mCAAqB;AAAA,cACvD;AAAA,gBAAC;AAAA;AAAA,kBACE,GAAG;AAAA,kBACJ,WAAW,GAAG,MAAM,WAAW,OAAO,KAAK;AAAA,kBAC3C,MAAK;AAAA;AAAA,cACP;AAAA;AAAA;AAAA,QACF;AAAA;AAAA;AAAA,EACF;AAEJ;","names":[]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
useFieldContext
|
|
3
|
-
} from "./chunk-ZAU4JVLL.js";
|
|
4
1
|
import {
|
|
5
2
|
Show
|
|
6
3
|
} from "./chunk-4O4QFF4S.js";
|
|
4
|
+
import {
|
|
5
|
+
useFieldContext
|
|
6
|
+
} from "./chunk-ZAU4JVLL.js";
|
|
7
7
|
|
|
8
8
|
// src/components/Label.tsx
|
|
9
9
|
import { label } from "@cerberus/styled-system/recipes";
|
|
@@ -47,4 +47,4 @@ function Label(props) {
|
|
|
47
47
|
export {
|
|
48
48
|
Label
|
|
49
49
|
};
|
|
50
|
-
//# sourceMappingURL=chunk-
|
|
50
|
+
//# sourceMappingURL=chunk-2FK7NR7Y.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Notification
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-JHAI4ZHG.js";
|
|
4
4
|
import {
|
|
5
5
|
NotificationDescription
|
|
6
6
|
} from "./chunk-HW76XVA3.js";
|
|
@@ -119,4 +119,4 @@ export {
|
|
|
119
119
|
NotificationCenter,
|
|
120
120
|
useNotificationCenter
|
|
121
121
|
};
|
|
122
|
-
//# sourceMappingURL=chunk-
|
|
122
|
+
//# sourceMappingURL=chunk-3RRNMPFC.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
useFieldContext
|
|
3
|
-
} from "./chunk-ZAU4JVLL.js";
|
|
4
1
|
import {
|
|
5
2
|
Show
|
|
6
3
|
} from "./chunk-4O4QFF4S.js";
|
|
4
|
+
import {
|
|
5
|
+
useFieldContext
|
|
6
|
+
} from "./chunk-ZAU4JVLL.js";
|
|
7
7
|
import {
|
|
8
8
|
$cerberusIcons
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-5WVXIAG2.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-
|
|
56
|
+
//# sourceMappingURL=chunk-4FD33RTW.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
useFieldContext
|
|
3
|
-
} from "./chunk-ZAU4JVLL.js";
|
|
4
1
|
import {
|
|
5
2
|
Show
|
|
6
3
|
} from "./chunk-4O4QFF4S.js";
|
|
4
|
+
import {
|
|
5
|
+
useFieldContext
|
|
6
|
+
} from "./chunk-ZAU4JVLL.js";
|
|
7
7
|
import {
|
|
8
8
|
$cerberusIcons
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-5WVXIAG2.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-53QBTZZF.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
defaultIcons
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-GUECLKHY.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-5WVXIAG2.js.map
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ProgressBar
|
|
3
|
+
} from "./chunk-TYTEREKZ.js";
|
|
4
|
+
import {
|
|
5
|
+
IconButton
|
|
6
|
+
} from "./chunk-SLHX5K6I.js";
|
|
7
|
+
import {
|
|
8
|
+
FieldMessage
|
|
9
|
+
} from "./chunk-VGHVH2T3.js";
|
|
10
|
+
import {
|
|
11
|
+
Field
|
|
12
|
+
} from "./chunk-ZAU4JVLL.js";
|
|
13
|
+
import {
|
|
14
|
+
$cerberusIcons
|
|
15
|
+
} from "./chunk-5WVXIAG2.js";
|
|
16
|
+
|
|
17
|
+
// src/components/FileStatus.tsx
|
|
18
|
+
import {
|
|
19
|
+
useCallback,
|
|
20
|
+
useMemo
|
|
21
|
+
} from "react";
|
|
22
|
+
import {
|
|
23
|
+
fileStatus
|
|
24
|
+
} from "@cerberus/styled-system/recipes";
|
|
25
|
+
import { css, cx } from "@cerberus/styled-system/css";
|
|
26
|
+
import { circle, hstack, vstack } from "@cerberus/styled-system/patterns";
|
|
27
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
28
|
+
var processStatus = /* @__PURE__ */ ((processStatus2) => {
|
|
29
|
+
processStatus2["TODO"] = "todo";
|
|
30
|
+
processStatus2["PROCESSING"] = "processing";
|
|
31
|
+
processStatus2["DONE"] = "done";
|
|
32
|
+
processStatus2["ERROR"] = "error";
|
|
33
|
+
return processStatus2;
|
|
34
|
+
})(processStatus || {});
|
|
35
|
+
function FileStatus(props) {
|
|
36
|
+
const { file, now, status, onClick, ...nativeProps } = props;
|
|
37
|
+
const actionLabel = useMemo(() => getStatusActionLabel(status), [status]);
|
|
38
|
+
const palette = useMemo(() => getPalette(status), [status]);
|
|
39
|
+
const modalIconPalette = useMemo(() => getModalIconPalette(status), [status]);
|
|
40
|
+
const styles = useMemo(() => {
|
|
41
|
+
switch (status) {
|
|
42
|
+
case "todo" /* TODO */:
|
|
43
|
+
return fileStatus({ status: "todo" });
|
|
44
|
+
case "processing" /* PROCESSING */:
|
|
45
|
+
return fileStatus({ status: "processing" });
|
|
46
|
+
case "done" /* DONE */:
|
|
47
|
+
return fileStatus({ status: "done" });
|
|
48
|
+
case "error" /* ERROR */:
|
|
49
|
+
return fileStatus({ status: "error" });
|
|
50
|
+
default:
|
|
51
|
+
return fileStatus();
|
|
52
|
+
}
|
|
53
|
+
}, [status]);
|
|
54
|
+
const handleClick = useCallback(
|
|
55
|
+
(e) => {
|
|
56
|
+
const actionStatus = getStatusActionLabel(
|
|
57
|
+
status
|
|
58
|
+
).toLocaleLowerCase();
|
|
59
|
+
onClick(actionStatus, e);
|
|
60
|
+
},
|
|
61
|
+
[onClick]
|
|
62
|
+
);
|
|
63
|
+
return /* @__PURE__ */ jsxs(
|
|
64
|
+
"div",
|
|
65
|
+
{
|
|
66
|
+
...nativeProps,
|
|
67
|
+
className: cx(nativeProps.className, styles.root, hstack()),
|
|
68
|
+
children: [
|
|
69
|
+
/* @__PURE__ */ jsx(
|
|
70
|
+
"div",
|
|
71
|
+
{
|
|
72
|
+
className: cx(
|
|
73
|
+
styles.icon,
|
|
74
|
+
circle({
|
|
75
|
+
size: "2rem"
|
|
76
|
+
})
|
|
77
|
+
),
|
|
78
|
+
children: /* @__PURE__ */ jsx(MatchFileStatusIcon, { status })
|
|
79
|
+
}
|
|
80
|
+
),
|
|
81
|
+
/* @__PURE__ */ jsxs(
|
|
82
|
+
"div",
|
|
83
|
+
{
|
|
84
|
+
className: vstack({
|
|
85
|
+
alignItems: "flex-start",
|
|
86
|
+
gap: "0.12rem",
|
|
87
|
+
w: "full"
|
|
88
|
+
}),
|
|
89
|
+
children: [
|
|
90
|
+
/* @__PURE__ */ jsx(
|
|
91
|
+
"small",
|
|
92
|
+
{
|
|
93
|
+
className: css({
|
|
94
|
+
color: "page.text.initial",
|
|
95
|
+
textStyle: "label-sm"
|
|
96
|
+
}),
|
|
97
|
+
children: file
|
|
98
|
+
}
|
|
99
|
+
),
|
|
100
|
+
/* @__PURE__ */ jsx(ProgressBar, { now, size: "sm" }),
|
|
101
|
+
/* @__PURE__ */ jsx(Field, { invalid: modalIconPalette === "danger", children: /* @__PURE__ */ jsx(
|
|
102
|
+
FieldMessage,
|
|
103
|
+
{
|
|
104
|
+
className: css({
|
|
105
|
+
color: "page.text.100"
|
|
106
|
+
}),
|
|
107
|
+
id: `help:${file}`,
|
|
108
|
+
children: /* @__PURE__ */ jsx(MatchFileStatusText, { status, now })
|
|
109
|
+
}
|
|
110
|
+
) })
|
|
111
|
+
]
|
|
112
|
+
}
|
|
113
|
+
),
|
|
114
|
+
/* @__PURE__ */ jsx(
|
|
115
|
+
IconButton,
|
|
116
|
+
{
|
|
117
|
+
ariaLabel: actionLabel,
|
|
118
|
+
onClick: handleClick,
|
|
119
|
+
palette,
|
|
120
|
+
size: "sm",
|
|
121
|
+
children: /* @__PURE__ */ jsx(MatchStatusAction, { status })
|
|
122
|
+
}
|
|
123
|
+
)
|
|
124
|
+
]
|
|
125
|
+
}
|
|
126
|
+
);
|
|
127
|
+
}
|
|
128
|
+
function MatchFileStatusIcon(props) {
|
|
129
|
+
const {
|
|
130
|
+
fileUploader: FileUploaderIcon,
|
|
131
|
+
invalidAlt: InvalidIcon,
|
|
132
|
+
successNotification: DoneIcon
|
|
133
|
+
} = $cerberusIcons;
|
|
134
|
+
switch (props.status) {
|
|
135
|
+
case "todo" /* TODO */:
|
|
136
|
+
case "processing" /* PROCESSING */:
|
|
137
|
+
return /* @__PURE__ */ jsx(FileUploaderIcon, {});
|
|
138
|
+
case "done" /* DONE */:
|
|
139
|
+
return /* @__PURE__ */ jsx(DoneIcon, {});
|
|
140
|
+
case "error" /* ERROR */:
|
|
141
|
+
return /* @__PURE__ */ jsx(InvalidIcon, {});
|
|
142
|
+
default:
|
|
143
|
+
throw new Error("Unknown status");
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
function MatchFileStatusText(props) {
|
|
147
|
+
switch (props.status) {
|
|
148
|
+
case "todo" /* TODO */:
|
|
149
|
+
return "Waiting to upload";
|
|
150
|
+
case "processing" /* PROCESSING */:
|
|
151
|
+
return `${props.now}% Complete`;
|
|
152
|
+
case "done" /* DONE */:
|
|
153
|
+
return "File uploaded successfully";
|
|
154
|
+
case "error" /* ERROR */:
|
|
155
|
+
return "There was an error uploading the file";
|
|
156
|
+
default:
|
|
157
|
+
throw new Error("Invalid status");
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
function MatchStatusAction(props) {
|
|
161
|
+
const { close: CloseIcon, redo: RedoIcon, delete: TrashIcon } = $cerberusIcons;
|
|
162
|
+
switch (props.status) {
|
|
163
|
+
case "todo" /* TODO */:
|
|
164
|
+
case "processing" /* PROCESSING */:
|
|
165
|
+
return /* @__PURE__ */ jsx(CloseIcon, {});
|
|
166
|
+
case "error" /* ERROR */:
|
|
167
|
+
return /* @__PURE__ */ jsx(RedoIcon, {});
|
|
168
|
+
case "done" /* DONE */:
|
|
169
|
+
return /* @__PURE__ */ jsx(TrashIcon, {});
|
|
170
|
+
default:
|
|
171
|
+
throw new Error("Invalid status");
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
function getStatusActionLabel(status) {
|
|
175
|
+
switch (status) {
|
|
176
|
+
case "todo" /* TODO */:
|
|
177
|
+
case "processing" /* PROCESSING */:
|
|
178
|
+
return "Cancel";
|
|
179
|
+
case "error" /* ERROR */:
|
|
180
|
+
return "Retry";
|
|
181
|
+
case "done" /* DONE */:
|
|
182
|
+
return "Delete";
|
|
183
|
+
default:
|
|
184
|
+
return "";
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
function getPalette(status) {
|
|
188
|
+
switch (status) {
|
|
189
|
+
case "todo" /* TODO */:
|
|
190
|
+
case "processing" /* PROCESSING */:
|
|
191
|
+
return "danger";
|
|
192
|
+
case "error" /* ERROR */:
|
|
193
|
+
return "action";
|
|
194
|
+
case "done" /* DONE */:
|
|
195
|
+
return "danger";
|
|
196
|
+
default:
|
|
197
|
+
return "action";
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
function getModalIconPalette(status) {
|
|
201
|
+
switch (status) {
|
|
202
|
+
case "todo" /* TODO */:
|
|
203
|
+
case "processing" /* PROCESSING */:
|
|
204
|
+
return "action";
|
|
205
|
+
case "error" /* ERROR */:
|
|
206
|
+
return "danger";
|
|
207
|
+
case "done" /* DONE */:
|
|
208
|
+
return "success";
|
|
209
|
+
default:
|
|
210
|
+
return "action";
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
export {
|
|
215
|
+
processStatus,
|
|
216
|
+
FileStatus
|
|
217
|
+
};
|
|
218
|
+
//# sourceMappingURL=chunk-7NX4RGDB.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/FileStatus.tsx"],"sourcesContent":["'use client'\n\nimport {\n useCallback,\n useMemo,\n type HTMLAttributes,\n type MouseEvent,\n} from 'react'\nimport { ProgressBar } from './ProgressBar'\nimport { IconButton } from './IconButton'\nimport {\n fileStatus,\n type FileStatusVariantProps,\n} from '@cerberus/styled-system/recipes'\nimport { css, cx } from '@cerberus/styled-system/css'\nimport { circle, hstack, vstack } from '@cerberus/styled-system/patterns'\nimport { $cerberusIcons } from '../config/defineIcons'\nimport { FieldMessage } from './FieldMessage'\nimport { Field } from '../context/field'\n\n/**\n * This module contains the FileStatus component.\n * @module\n */\n\nexport type FileStatusKey = (typeof processStatus)[keyof typeof processStatus]\nexport type FileStatusActions = 'cancel' | 'retry' | 'delete'\nexport interface FileBaseStatusProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'onClick'> {\n file: string\n now: number\n status: processStatus\n onClick: (status: FileStatusActions, e: MouseEvent<HTMLButtonElement>) => void\n}\nexport type FileStatusProps = FileBaseStatusProps & FileStatusVariantProps\n\n/**\n * A helper object to represent the status of a file.\n * @example\n * ```tsx\n * import { fileStatus } from '@cerberus/react'\n * processStatus.TODO // 'todo'\n * ```\n */\nexport const enum processStatus {\n TODO = 'todo',\n PROCESSING = 'processing',\n DONE = 'done',\n ERROR = 'error',\n}\n\n/**\n * This component displays the status of a file.\n * @param props - {\n * file: string,\n * now: number,\n * status: keyof typeof fileStatus,\n * action: (status: FileStatusActions, e: MouseEvent<HTMLButtonElement>) => void\n * }.\n * @example\n * ```tsx\n * <FileStatus file=\"file.txt\" now={0} status={processStatus.TODO} action={(status, e) => console.log(status, e)} />\n * ```\n */\nexport function FileStatus(props: FileStatusProps) {\n const { file, now, status, onClick, ...nativeProps } = props\n const actionLabel = useMemo(() => getStatusActionLabel(status), [status])\n const palette = useMemo(() => getPalette(status), [status])\n const modalIconPalette = useMemo(() => getModalIconPalette(status), [status])\n const styles = useMemo(() => {\n switch (status) {\n case processStatus.TODO:\n return fileStatus({ status: 'todo' })\n case processStatus.PROCESSING:\n return fileStatus({ status: 'processing' })\n case processStatus.DONE:\n return fileStatus({ status: 'done' })\n case processStatus.ERROR:\n return fileStatus({ status: 'error' })\n default:\n return fileStatus()\n }\n }, [status])\n\n const handleClick = useCallback(\n (e: MouseEvent<HTMLButtonElement>) => {\n const actionStatus = getStatusActionLabel(\n status,\n ).toLocaleLowerCase() as FileStatusActions\n onClick(actionStatus, e)\n },\n [onClick],\n )\n\n return (\n <div\n {...nativeProps}\n className={cx(nativeProps.className, styles.root, hstack())}\n >\n <div\n className={cx(\n styles.icon,\n circle({\n size: '2rem',\n }),\n )}\n >\n <MatchFileStatusIcon status={status} />\n </div>\n\n <div\n className={vstack({\n alignItems: 'flex-start',\n gap: '0.12rem',\n w: 'full',\n })}\n >\n <small\n className={css({\n color: 'page.text.initial',\n textStyle: 'label-sm',\n })}\n >\n {file}\n </small>\n <ProgressBar now={now} size=\"sm\" />\n <Field invalid={modalIconPalette === 'danger'}>\n <FieldMessage\n className={css({\n color: 'page.text.100',\n })}\n id={`help:${file}`}\n >\n <MatchFileStatusText status={status} now={now} />\n </FieldMessage>\n </Field>\n </div>\n\n <IconButton\n ariaLabel={actionLabel}\n onClick={handleClick}\n palette={palette}\n size=\"sm\"\n >\n <MatchStatusAction status={status} />\n </IconButton>\n </div>\n )\n}\n\ninterface FileStatusElProps {\n status: FileStatusProps['status']\n now?: number\n}\n\nfunction MatchFileStatusIcon(props: FileStatusElProps) {\n const {\n fileUploader: FileUploaderIcon,\n invalidAlt: InvalidIcon,\n successNotification: DoneIcon,\n } = $cerberusIcons\n\n switch (props.status) {\n case processStatus.TODO:\n case processStatus.PROCESSING:\n return <FileUploaderIcon />\n case processStatus.DONE:\n return <DoneIcon />\n case processStatus.ERROR:\n return <InvalidIcon />\n default:\n throw new Error('Unknown status')\n }\n}\n\nfunction MatchFileStatusText(props: FileStatusElProps) {\n switch (props.status) {\n case processStatus.TODO:\n return 'Waiting to upload'\n case processStatus.PROCESSING:\n return `${props.now}% Complete`\n case processStatus.DONE:\n return 'File uploaded successfully'\n case processStatus.ERROR:\n return 'There was an error uploading the file'\n default:\n throw new Error('Invalid status')\n }\n}\n\nfunction MatchStatusAction(props: FileStatusElProps) {\n const { close: CloseIcon, redo: RedoIcon, delete: TrashIcon } = $cerberusIcons\n switch (props.status) {\n case processStatus.TODO:\n case processStatus.PROCESSING:\n return <CloseIcon />\n case processStatus.ERROR:\n return <RedoIcon />\n case processStatus.DONE:\n return <TrashIcon />\n default:\n throw new Error('Invalid status')\n }\n}\n\nfunction getStatusActionLabel(status: FileStatusKey) {\n switch (status) {\n case processStatus.TODO:\n case processStatus.PROCESSING:\n return 'Cancel'\n case processStatus.ERROR:\n return 'Retry'\n case processStatus.DONE:\n return 'Delete'\n default:\n return ''\n }\n}\n\nfunction getPalette(status: FileStatusKey) {\n switch (status) {\n case processStatus.TODO:\n case processStatus.PROCESSING:\n return 'danger'\n case processStatus.ERROR:\n return 'action'\n case processStatus.DONE:\n return 'danger'\n default:\n return 'action'\n }\n}\n\nfunction getModalIconPalette(status: FileStatusKey) {\n switch (status) {\n case processStatus.TODO:\n case processStatus.PROCESSING:\n return 'action'\n case processStatus.ERROR:\n return 'danger'\n case processStatus.DONE:\n return 'success'\n default:\n return 'action'\n }\n}\n"],"mappings":"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","names":["processStatus"]}
|
|
@@ -8,15 +8,21 @@ import {
|
|
|
8
8
|
Checkmark,
|
|
9
9
|
CheckmarkFilled,
|
|
10
10
|
ChevronDown,
|
|
11
|
+
CloseFilled,
|
|
11
12
|
CloudUpload,
|
|
12
13
|
ErrorFilled,
|
|
13
14
|
Information,
|
|
14
15
|
InformationFilled,
|
|
16
|
+
Restart,
|
|
17
|
+
TrashCan,
|
|
18
|
+
Warning,
|
|
15
19
|
WarningFilled
|
|
16
20
|
} from "@cerberus/icons";
|
|
17
21
|
var defaultIcons = {
|
|
18
22
|
checkbox: CheckmarkIcon,
|
|
23
|
+
close: CloseFilled,
|
|
19
24
|
confirmModal: Information,
|
|
25
|
+
delete: TrashCan,
|
|
20
26
|
promptModal: Information,
|
|
21
27
|
fileUploader: CloudUpload,
|
|
22
28
|
indeterminate: IndeterminateIcon,
|
|
@@ -25,6 +31,8 @@ var defaultIcons = {
|
|
|
25
31
|
warningNotification: WarningFilled,
|
|
26
32
|
dangerNotification: ErrorFilled,
|
|
27
33
|
invalid: WarningFilled,
|
|
34
|
+
invalidAlt: Warning,
|
|
35
|
+
redo: Restart,
|
|
28
36
|
selectArrow: ChevronDown,
|
|
29
37
|
toggleChecked: Checkmark
|
|
30
38
|
};
|
|
@@ -32,4 +40,4 @@ var defaultIcons = {
|
|
|
32
40
|
export {
|
|
33
41
|
defaultIcons
|
|
34
42
|
};
|
|
35
|
-
//# sourceMappingURL=chunk-
|
|
43
|
+
//# sourceMappingURL=chunk-GUECLKHY.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/config/cerbIcons.ts"],"sourcesContent":["import {\n Checkmark,\n CheckmarkFilled,\n ChevronDown,\n CloseFilled,\n CloudUpload,\n ErrorFilled,\n Information,\n InformationFilled,\n Restart,\n TrashCan,\n Warning,\n WarningFilled,\n type CarbonIconType,\n} from '@cerberus/icons'\nimport type { ElementType } from 'react'\nimport { CheckmarkIcon, IndeterminateIcon } from './icons/checkbox.icons'\n\nexport type IconType = CarbonIconType | ElementType\n\nexport interface DefinedIcons {\n checkbox?: IconType\n close?: IconType\n confirmModal?: IconType\n delete?: IconType\n promptModal?: 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 checkbox: CheckmarkIcon,\n close: CloseFilled,\n confirmModal: Information,\n delete: TrashCan,\n promptModal: Information,\n fileUploader: CloudUpload,\n indeterminate: IndeterminateIcon,\n infoNotification: InformationFilled,\n successNotification: CheckmarkFilled,\n warningNotification: WarningFilled,\n dangerNotification: ErrorFilled,\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;AAyBA,IAAM,eAA6B;AAAA,EACxC,UAAU;AAAA,EACV,OAAO;AAAA,EACP,cAAc;AAAA,EACd,QAAQ;AAAA,EACR,aAAa;AAAA,EACb,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-ZAU4JVLL.js";
|
|
4
4
|
import {
|
|
5
5
|
$cerberusIcons
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-5WVXIAG2.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-ID3XWGLY.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-KESKDLX6.js";
|
|
4
4
|
import {
|
|
5
5
|
$cerberusIcons
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-5WVXIAG2.js";
|
|
7
7
|
|
|
8
8
|
// src/components/Notification.tsx
|
|
9
9
|
import { cx } from "@cerberus/styled-system/css";
|
|
@@ -73,4 +73,4 @@ function Notification(props) {
|
|
|
73
73
|
export {
|
|
74
74
|
Notification
|
|
75
75
|
};
|
|
76
|
-
//# sourceMappingURL=chunk-
|
|
76
|
+
//# sourceMappingURL=chunk-JHAI4ZHG.js.map
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ModalIcon
|
|
3
|
+
} from "./chunk-VCR5C6Q3.js";
|
|
1
4
|
import {
|
|
2
5
|
Portal
|
|
3
6
|
} from "./chunk-4CAT3FHV.js";
|
|
@@ -13,9 +16,6 @@ import {
|
|
|
13
16
|
import {
|
|
14
17
|
ModalHeading
|
|
15
18
|
} from "./chunk-JB7IQ2BM.js";
|
|
16
|
-
import {
|
|
17
|
-
ModalIcon
|
|
18
|
-
} from "./chunk-JJP2TFTU.js";
|
|
19
19
|
import {
|
|
20
20
|
Button
|
|
21
21
|
} from "./chunk-6F34A7NZ.js";
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
} from "./chunk-KESKDLX6.js";
|
|
28
28
|
import {
|
|
29
29
|
$cerberusIcons
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-5WVXIAG2.js";
|
|
31
31
|
import {
|
|
32
32
|
useModal
|
|
33
33
|
} from "./chunk-TZNYJ3G7.js";
|
|
@@ -152,4 +152,4 @@ export {
|
|
|
152
152
|
ConfirmModal,
|
|
153
153
|
useConfirmModal
|
|
154
154
|
};
|
|
155
|
-
//# sourceMappingURL=chunk-
|
|
155
|
+
//# sourceMappingURL=chunk-KUQZECNS.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
useFieldContext
|
|
3
|
-
} from "./chunk-ZAU4JVLL.js";
|
|
4
1
|
import {
|
|
5
2
|
Show
|
|
6
3
|
} from "./chunk-4O4QFF4S.js";
|
|
4
|
+
import {
|
|
5
|
+
useFieldContext
|
|
6
|
+
} from "./chunk-ZAU4JVLL.js";
|
|
7
7
|
import {
|
|
8
8
|
$cerberusIcons
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-5WVXIAG2.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-RHG26FYL.js.map
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ModalIcon
|
|
3
|
+
} from "./chunk-VCR5C6Q3.js";
|
|
1
4
|
import {
|
|
2
5
|
Portal
|
|
3
6
|
} from "./chunk-4CAT3FHV.js";
|
|
4
7
|
import {
|
|
5
8
|
Input
|
|
6
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-53QBTZZF.js";
|
|
7
10
|
import {
|
|
8
11
|
Label
|
|
9
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-2FK7NR7Y.js";
|
|
10
13
|
import {
|
|
11
14
|
Modal
|
|
12
15
|
} from "./chunk-2UFNQM55.js";
|
|
@@ -19,24 +22,21 @@ import {
|
|
|
19
22
|
import {
|
|
20
23
|
ModalHeading
|
|
21
24
|
} from "./chunk-JB7IQ2BM.js";
|
|
22
|
-
import {
|
|
23
|
-
ModalIcon
|
|
24
|
-
} from "./chunk-JJP2TFTU.js";
|
|
25
25
|
import {
|
|
26
26
|
Button
|
|
27
27
|
} from "./chunk-6F34A7NZ.js";
|
|
28
|
-
import {
|
|
29
|
-
Field
|
|
30
|
-
} from "./chunk-ZAU4JVLL.js";
|
|
31
28
|
import {
|
|
32
29
|
Show
|
|
33
30
|
} from "./chunk-4O4QFF4S.js";
|
|
31
|
+
import {
|
|
32
|
+
Field
|
|
33
|
+
} from "./chunk-ZAU4JVLL.js";
|
|
34
34
|
import {
|
|
35
35
|
trapFocus
|
|
36
36
|
} from "./chunk-KESKDLX6.js";
|
|
37
37
|
import {
|
|
38
38
|
$cerberusIcons
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-5WVXIAG2.js";
|
|
40
40
|
import {
|
|
41
41
|
useModal
|
|
42
42
|
} from "./chunk-TZNYJ3G7.js";
|
|
@@ -205,4 +205,4 @@ export {
|
|
|
205
205
|
PromptModal,
|
|
206
206
|
usePromptModal
|
|
207
207
|
};
|
|
208
|
-
//# sourceMappingURL=chunk-
|
|
208
|
+
//# sourceMappingURL=chunk-TJI2SJCZ.js.map
|