@customafk/lunas-ui 0.1.86 → 0.1.88
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/dist/{button-D2qx5QHI.d.cts → button-DjqNWeLI.d.cts} +4 -4
- package/dist/{button-eheC-7Id.d.mts → button-VdupFKuy.d.mts} +4 -4
- package/dist/data-display/empty.d.cts +2 -2
- package/dist/data-display/empty.d.mts +2 -2
- package/dist/data-display/statistic.d.cts +2 -2
- package/dist/data-display/statistic.d.mts +2 -2
- package/dist/{dialog-T7CVHrm2.d.mts → dialog-NSWxAcg2.d.cts} +12 -12
- package/dist/{dialog-5imw84-8.d.cts → dialog-VmYg9Eq_.d.mts} +12 -12
- package/dist/dialogs/detail-dialog/components/sidebar.d.cts +26 -26
- package/dist/dialogs/detail-dialog/components/sidebar.d.mts +26 -26
- package/dist/features/descriptions/index.cjs.map +1 -1
- package/dist/features/descriptions/index.d.cts +4 -4
- package/dist/features/descriptions/index.mjs.map +1 -1
- package/dist/features/search-modal/index.d.cts +2 -2
- package/dist/features/search-modal/index.d.mts +2 -2
- package/dist/features/tables/index.cjs +1 -1
- package/dist/features/tables/index.cjs.map +1 -1
- package/dist/features/tables/index.d.cts +10 -8
- package/dist/features/tables/index.d.mts +4 -2
- package/dist/features/tables/index.mjs +1 -1
- package/dist/features/tables/index.mjs.map +1 -1
- package/dist/features/tanstack-form/index.cjs +1 -1
- package/dist/features/tanstack-form/index.cjs.map +1 -1
- package/dist/features/tanstack-form/index.d.cts +54 -48
- package/dist/features/tanstack-form/index.d.mts +54 -48
- package/dist/features/tanstack-form/index.mjs +1 -1
- package/dist/features/tanstack-form/index.mjs.map +1 -1
- package/dist/{input-DhoSwu7d.mjs → input-CqN74taK.mjs} +2 -2
- package/dist/{input-DhoSwu7d.mjs.map → input-CqN74taK.mjs.map} +1 -1
- package/dist/{input-CbpWzuai.d.cts → input-DZh516vt.d.mts} +5 -5
- package/dist/{input-qnlHzDDm.cjs → input-dAoEznUI.cjs} +2 -2
- package/dist/{input-qnlHzDDm.cjs.map → input-dAoEznUI.cjs.map} +1 -1
- package/dist/{input-BYz8teIQ.d.mts → input-x9tCltJ_.d.cts} +5 -5
- package/dist/layouts/cms-layout/index.cjs +1 -1
- package/dist/layouts/cms-layout/index.mjs +1 -1
- package/dist/layouts/flex.d.cts +8 -8
- package/dist/layouts/flex.d.mts +6 -6
- package/dist/layouts/payment-layout/index.cjs +1 -1
- package/dist/layouts/payment-layout/index.mjs +1 -1
- package/dist/pages/FeatureDeveloping.d.cts +2 -2
- package/dist/pages/FeatureDeveloping.d.mts +2 -2
- package/dist/pages/FeatureFixing.d.cts +2 -2
- package/dist/pages/FeatureFixing.d.mts +2 -2
- package/dist/pages/NotAuthorized.d.cts +2 -2
- package/dist/pages/NotAuthorized.d.mts +2 -2
- package/dist/pages/NotFound.d.cts +2 -2
- package/dist/pages/NotFound.d.mts +2 -2
- package/dist/typography/paragraph.d.cts +2 -2
- package/dist/typography/paragraph.d.mts +2 -2
- package/dist/typography/title.d.cts +2 -2
- package/dist/typography/title.d.mts +2 -2
- package/dist/ui/alert-dialog.d.cts +12 -12
- package/dist/ui/alert-dialog.d.mts +12 -12
- package/dist/ui/alert.d.cts +6 -6
- package/dist/ui/alert.d.mts +6 -6
- package/dist/ui/aspect-ratio.d.cts +2 -2
- package/dist/ui/aspect-ratio.d.mts +2 -2
- package/dist/ui/avatar.d.cts +4 -4
- package/dist/ui/avatar.d.mts +4 -4
- package/dist/ui/badge.d.cts +4 -4
- package/dist/ui/badge.d.mts +4 -4
- package/dist/ui/breadcrumb.d.cts +8 -8
- package/dist/ui/breadcrumb.d.mts +8 -8
- package/dist/ui/button-group.d.cts +6 -6
- package/dist/ui/button-group.d.mts +6 -6
- package/dist/ui/button.d.cts +1 -1
- package/dist/ui/button.d.mts +1 -1
- package/dist/ui/calendar.d.cts +4 -4
- package/dist/ui/calendar.d.mts +4 -4
- package/dist/ui/card.d.cts +8 -8
- package/dist/ui/card.d.mts +8 -8
- package/dist/ui/carousel.d.cts +7 -7
- package/dist/ui/carousel.d.mts +7 -7
- package/dist/ui/checkbox.d.cts +2 -2
- package/dist/ui/checkbox.d.mts +2 -2
- package/dist/ui/collapsible.d.cts +4 -4
- package/dist/ui/collapsible.d.mts +4 -4
- package/dist/ui/command.d.cts +11 -11
- package/dist/ui/command.d.mts +11 -11
- package/dist/ui/context-menu.d.cts +16 -16
- package/dist/ui/context-menu.d.mts +16 -16
- package/dist/ui/dialog.d.cts +1 -1
- package/dist/ui/dialog.d.mts +1 -1
- package/dist/ui/drawer.d.cts +11 -11
- package/dist/ui/drawer.d.mts +11 -11
- package/dist/ui/dropdown-menu.d.cts +16 -16
- package/dist/ui/dropdown-menu.d.mts +16 -16
- package/dist/ui/empty.d.cts +9 -9
- package/dist/ui/empty.d.mts +9 -9
- package/dist/ui/field.d.cts +24 -24
- package/dist/ui/field.d.mts +24 -24
- package/dist/ui/file-uploader.d.cts +2 -2
- package/dist/ui/file-uploader.d.mts +2 -2
- package/dist/ui/form.d.cts +11 -11
- package/dist/ui/form.d.mts +11 -11
- package/dist/ui/hover-card.d.cts +4 -4
- package/dist/ui/hover-card.d.mts +4 -4
- package/dist/ui/input-otp.d.cts +5 -5
- package/dist/ui/input-otp.d.mts +5 -5
- package/dist/ui/input.cjs +1 -1
- package/dist/ui/input.d.cts +1 -1
- package/dist/ui/input.d.mts +1 -1
- package/dist/ui/input.mjs +1 -1
- package/dist/ui/inputs/search-input.cjs +1 -1
- package/dist/ui/inputs/search-input.d.cts +3 -3
- package/dist/ui/inputs/search-input.d.mts +3 -3
- package/dist/ui/inputs/search-input.mjs +1 -1
- package/dist/ui/item.d.cts +16 -16
- package/dist/ui/item.d.mts +16 -16
- package/dist/ui/label.d.cts +2 -2
- package/dist/ui/label.d.mts +2 -2
- package/dist/ui/menubar.d.cts +17 -17
- package/dist/ui/menubar.d.mts +17 -17
- package/dist/ui/multi-select.d.cts +2 -2
- package/dist/ui/multi-select.d.mts +3 -3
- package/dist/ui/navigation-menu.d.cts +11 -11
- package/dist/ui/navigation-menu.d.mts +11 -11
- package/dist/ui/pagination.d.cts +9 -9
- package/dist/ui/pagination.d.mts +9 -9
- package/dist/ui/popover.d.cts +5 -5
- package/dist/ui/popover.d.mts +5 -5
- package/dist/ui/progress.d.cts +2 -2
- package/dist/ui/progress.d.mts +2 -2
- package/dist/ui/radio-group.d.cts +3 -3
- package/dist/ui/radio-group.d.mts +3 -3
- package/dist/ui/resizable.d.cts +4 -4
- package/dist/ui/resizable.d.mts +4 -4
- package/dist/ui/scroll-area.d.cts +6 -6
- package/dist/ui/scroll-area.d.mts +6 -6
- package/dist/ui/select.d.cts +11 -11
- package/dist/ui/select.d.mts +11 -11
- package/dist/ui/separator.d.cts +2 -2
- package/dist/ui/separator.d.mts +2 -2
- package/dist/ui/sheet.d.cts +9 -9
- package/dist/ui/sheet.d.mts +9 -9
- package/dist/ui/sidebar.cjs +1 -1
- package/dist/ui/sidebar.d.cts +28 -28
- package/dist/ui/sidebar.d.mts +26 -26
- package/dist/ui/sidebar.mjs +1 -1
- package/dist/ui/skeleton.d.cts +2 -2
- package/dist/ui/skeleton.d.mts +2 -2
- package/dist/ui/slider.d.cts +2 -2
- package/dist/ui/slider.d.mts +2 -2
- package/dist/ui/sonner.d.cts +2 -2
- package/dist/ui/sonner.d.mts +2 -2
- package/dist/ui/spinner.d.cts +2 -2
- package/dist/ui/spinner.d.mts +2 -2
- package/dist/ui/switch.d.cts +2 -2
- package/dist/ui/switch.d.mts +2 -2
- package/dist/ui/table.d.cts +18 -18
- package/dist/ui/table.d.mts +18 -18
- package/dist/ui/tabs.d.cts +5 -5
- package/dist/ui/tabs.d.mts +5 -5
- package/dist/ui/textarea.d.cts +2 -2
- package/dist/ui/textarea.d.mts +2 -2
- package/dist/ui/toggle-group.d.cts +3 -3
- package/dist/ui/toggle-group.d.mts +3 -3
- package/dist/ui/toggle.d.cts +4 -4
- package/dist/ui/toggle.d.mts +4 -4
- package/dist/ui/tooltip.d.cts +5 -5
- package/dist/ui/tooltip.d.mts +5 -5
- package/package.json +6 -6
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime156 from "react/jsx-runtime";
|
|
2
2
|
import * as class_variance_authority_types12 from "class-variance-authority/types";
|
|
3
3
|
import { VariantProps } from "class-variance-authority";
|
|
4
4
|
|
|
@@ -8,7 +8,7 @@ import { VariantProps } from "class-variance-authority";
|
|
|
8
8
|
* Button variants definition for styling using class-variance-authority
|
|
9
9
|
*/
|
|
10
10
|
declare const buttonVariants: (props?: ({
|
|
11
|
-
variant?: "default" | "
|
|
11
|
+
variant?: "default" | "link" | "outline" | "ghost" | "soft" | "subtle" | null | undefined;
|
|
12
12
|
color?: "muted" | "warning" | "success" | "info" | "primary" | "secondary" | "important" | "danger" | null | undefined;
|
|
13
13
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | "default" | "icon" | null | undefined;
|
|
14
14
|
} & class_variance_authority_types12.ClassProp) | undefined) => string;
|
|
@@ -51,7 +51,7 @@ declare function Button({
|
|
|
51
51
|
disabled,
|
|
52
52
|
type,
|
|
53
53
|
...props
|
|
54
|
-
}: ButtonProps):
|
|
54
|
+
}: ButtonProps): react_jsx_runtime156.JSX.Element;
|
|
55
55
|
//#endregion
|
|
56
56
|
export { ButtonProps as n, Button as t };
|
|
57
|
-
//# sourceMappingURL=button-
|
|
57
|
+
//# sourceMappingURL=button-DjqNWeLI.d.cts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime156 from "react/jsx-runtime";
|
|
2
2
|
import { VariantProps } from "class-variance-authority";
|
|
3
3
|
import * as class_variance_authority_types12 from "class-variance-authority/types";
|
|
4
4
|
|
|
@@ -8,7 +8,7 @@ import * as class_variance_authority_types12 from "class-variance-authority/type
|
|
|
8
8
|
* Button variants definition for styling using class-variance-authority
|
|
9
9
|
*/
|
|
10
10
|
declare const buttonVariants: (props?: ({
|
|
11
|
-
variant?: "default" | "
|
|
11
|
+
variant?: "default" | "link" | "outline" | "ghost" | "soft" | "subtle" | null | undefined;
|
|
12
12
|
color?: "muted" | "warning" | "success" | "info" | "primary" | "secondary" | "important" | "danger" | null | undefined;
|
|
13
13
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | "default" | "icon" | null | undefined;
|
|
14
14
|
} & class_variance_authority_types12.ClassProp) | undefined) => string;
|
|
@@ -51,7 +51,7 @@ declare function Button({
|
|
|
51
51
|
disabled,
|
|
52
52
|
type,
|
|
53
53
|
...props
|
|
54
|
-
}: ButtonProps):
|
|
54
|
+
}: ButtonProps): react_jsx_runtime156.JSX.Element;
|
|
55
55
|
//#endregion
|
|
56
56
|
export { ButtonProps as n, Button as t };
|
|
57
|
-
//# sourceMappingURL=button-
|
|
57
|
+
//# sourceMappingURL=button-VdupFKuy.d.mts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime128 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region packages/components/data-display/empty.d.ts
|
|
4
|
-
declare const EmptyDisplay: () =>
|
|
4
|
+
declare const EmptyDisplay: () => react_jsx_runtime128.JSX.Element;
|
|
5
5
|
//#endregion
|
|
6
6
|
export { EmptyDisplay };
|
|
7
7
|
//# sourceMappingURL=empty.d.cts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime128 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region packages/components/data-display/empty.d.ts
|
|
4
|
-
declare const EmptyDisplay: () =>
|
|
4
|
+
declare const EmptyDisplay: () => react_jsx_runtime128.JSX.Element;
|
|
5
5
|
//#endregion
|
|
6
6
|
export { EmptyDisplay };
|
|
7
7
|
//# sourceMappingURL=empty.d.mts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
2
|
import * as react0 from "react";
|
|
3
3
|
|
|
4
4
|
//#region packages/components/data-display/statistic.d.ts
|
|
@@ -23,7 +23,7 @@ declare const Statistic: react0.MemoExoticComponent<({
|
|
|
23
23
|
showTrailingZeros,
|
|
24
24
|
size,
|
|
25
25
|
value
|
|
26
|
-
}: Props) =>
|
|
26
|
+
}: Props) => react_jsx_runtime0.JSX.Element>;
|
|
27
27
|
//#endregion
|
|
28
28
|
export { Statistic };
|
|
29
29
|
//# sourceMappingURL=statistic.d.cts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
2
|
import * as react0 from "react";
|
|
3
3
|
|
|
4
4
|
//#region packages/components/data-display/statistic.d.ts
|
|
@@ -23,7 +23,7 @@ declare const Statistic: react0.MemoExoticComponent<({
|
|
|
23
23
|
showTrailingZeros,
|
|
24
24
|
size,
|
|
25
25
|
value
|
|
26
|
-
}: Props) =>
|
|
26
|
+
}: Props) => react_jsx_runtime0.JSX.Element>;
|
|
27
27
|
//#endregion
|
|
28
28
|
export { Statistic };
|
|
29
29
|
//# sourceMappingURL=statistic.d.mts.map
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime20 from "react/jsx-runtime";
|
|
2
2
|
import { Dialog } from "radix-ui";
|
|
3
3
|
|
|
4
4
|
//#region packages/components/ui/dialog.d.ts
|
|
5
5
|
declare function Dialog$1({
|
|
6
6
|
...props
|
|
7
|
-
}: React.ComponentProps<typeof Dialog.Root>):
|
|
7
|
+
}: React.ComponentProps<typeof Dialog.Root>): react_jsx_runtime20.JSX.Element;
|
|
8
8
|
declare function DialogTrigger({
|
|
9
9
|
...props
|
|
10
|
-
}: React.ComponentProps<typeof Dialog.Trigger>):
|
|
10
|
+
}: React.ComponentProps<typeof Dialog.Trigger>): react_jsx_runtime20.JSX.Element;
|
|
11
11
|
declare function DialogPortal({
|
|
12
12
|
...props
|
|
13
|
-
}: React.ComponentProps<typeof Dialog.Portal>):
|
|
13
|
+
}: React.ComponentProps<typeof Dialog.Portal>): react_jsx_runtime20.JSX.Element;
|
|
14
14
|
declare function DialogClose({
|
|
15
15
|
...props
|
|
16
|
-
}: React.ComponentProps<typeof Dialog.Close>):
|
|
16
|
+
}: React.ComponentProps<typeof Dialog.Close>): react_jsx_runtime20.JSX.Element;
|
|
17
17
|
declare function DialogOverlay({
|
|
18
18
|
className,
|
|
19
19
|
...props
|
|
20
|
-
}: React.ComponentProps<typeof Dialog.Overlay>):
|
|
20
|
+
}: React.ComponentProps<typeof Dialog.Overlay>): react_jsx_runtime20.JSX.Element;
|
|
21
21
|
declare function DialogContent({
|
|
22
22
|
className,
|
|
23
23
|
children,
|
|
@@ -25,23 +25,23 @@ declare function DialogContent({
|
|
|
25
25
|
...props
|
|
26
26
|
}: React.ComponentProps<typeof Dialog.Content> & {
|
|
27
27
|
showCloseButton?: boolean;
|
|
28
|
-
}):
|
|
28
|
+
}): react_jsx_runtime20.JSX.Element;
|
|
29
29
|
declare function DialogHeader({
|
|
30
30
|
className,
|
|
31
31
|
...props
|
|
32
|
-
}: React.ComponentProps<'div'>):
|
|
32
|
+
}: React.ComponentProps<'div'>): react_jsx_runtime20.JSX.Element;
|
|
33
33
|
declare function DialogFooter({
|
|
34
34
|
className,
|
|
35
35
|
...props
|
|
36
|
-
}: React.ComponentProps<'div'>):
|
|
36
|
+
}: React.ComponentProps<'div'>): react_jsx_runtime20.JSX.Element;
|
|
37
37
|
declare function DialogTitle({
|
|
38
38
|
className,
|
|
39
39
|
...props
|
|
40
|
-
}: React.ComponentProps<typeof Dialog.Title>):
|
|
40
|
+
}: React.ComponentProps<typeof Dialog.Title>): react_jsx_runtime20.JSX.Element;
|
|
41
41
|
declare function DialogDescription({
|
|
42
42
|
className,
|
|
43
43
|
...props
|
|
44
|
-
}: React.ComponentProps<typeof Dialog.Description>):
|
|
44
|
+
}: React.ComponentProps<typeof Dialog.Description>): react_jsx_runtime20.JSX.Element;
|
|
45
45
|
//#endregion
|
|
46
46
|
export { DialogFooter as a, DialogPortal as c, DialogDescription as i, DialogTitle as l, DialogClose as n, DialogHeader as o, DialogContent as r, DialogOverlay as s, Dialog$1 as t, DialogTrigger as u };
|
|
47
|
-
//# sourceMappingURL=dialog-
|
|
47
|
+
//# sourceMappingURL=dialog-NSWxAcg2.d.cts.map
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime35 from "react/jsx-runtime";
|
|
2
2
|
import { Dialog } from "radix-ui";
|
|
3
3
|
|
|
4
4
|
//#region packages/components/ui/dialog.d.ts
|
|
5
5
|
declare function Dialog$1({
|
|
6
6
|
...props
|
|
7
|
-
}: React.ComponentProps<typeof Dialog.Root>):
|
|
7
|
+
}: React.ComponentProps<typeof Dialog.Root>): react_jsx_runtime35.JSX.Element;
|
|
8
8
|
declare function DialogTrigger({
|
|
9
9
|
...props
|
|
10
|
-
}: React.ComponentProps<typeof Dialog.Trigger>):
|
|
10
|
+
}: React.ComponentProps<typeof Dialog.Trigger>): react_jsx_runtime35.JSX.Element;
|
|
11
11
|
declare function DialogPortal({
|
|
12
12
|
...props
|
|
13
|
-
}: React.ComponentProps<typeof Dialog.Portal>):
|
|
13
|
+
}: React.ComponentProps<typeof Dialog.Portal>): react_jsx_runtime35.JSX.Element;
|
|
14
14
|
declare function DialogClose({
|
|
15
15
|
...props
|
|
16
|
-
}: React.ComponentProps<typeof Dialog.Close>):
|
|
16
|
+
}: React.ComponentProps<typeof Dialog.Close>): react_jsx_runtime35.JSX.Element;
|
|
17
17
|
declare function DialogOverlay({
|
|
18
18
|
className,
|
|
19
19
|
...props
|
|
20
|
-
}: React.ComponentProps<typeof Dialog.Overlay>):
|
|
20
|
+
}: React.ComponentProps<typeof Dialog.Overlay>): react_jsx_runtime35.JSX.Element;
|
|
21
21
|
declare function DialogContent({
|
|
22
22
|
className,
|
|
23
23
|
children,
|
|
@@ -25,23 +25,23 @@ declare function DialogContent({
|
|
|
25
25
|
...props
|
|
26
26
|
}: React.ComponentProps<typeof Dialog.Content> & {
|
|
27
27
|
showCloseButton?: boolean;
|
|
28
|
-
}):
|
|
28
|
+
}): react_jsx_runtime35.JSX.Element;
|
|
29
29
|
declare function DialogHeader({
|
|
30
30
|
className,
|
|
31
31
|
...props
|
|
32
|
-
}: React.ComponentProps<'div'>):
|
|
32
|
+
}: React.ComponentProps<'div'>): react_jsx_runtime35.JSX.Element;
|
|
33
33
|
declare function DialogFooter({
|
|
34
34
|
className,
|
|
35
35
|
...props
|
|
36
|
-
}: React.ComponentProps<'div'>):
|
|
36
|
+
}: React.ComponentProps<'div'>): react_jsx_runtime35.JSX.Element;
|
|
37
37
|
declare function DialogTitle({
|
|
38
38
|
className,
|
|
39
39
|
...props
|
|
40
|
-
}: React.ComponentProps<typeof Dialog.Title>):
|
|
40
|
+
}: React.ComponentProps<typeof Dialog.Title>): react_jsx_runtime35.JSX.Element;
|
|
41
41
|
declare function DialogDescription({
|
|
42
42
|
className,
|
|
43
43
|
...props
|
|
44
|
-
}: React.ComponentProps<typeof Dialog.Description>):
|
|
44
|
+
}: React.ComponentProps<typeof Dialog.Description>): react_jsx_runtime35.JSX.Element;
|
|
45
45
|
//#endregion
|
|
46
46
|
export { DialogFooter as a, DialogPortal as c, DialogDescription as i, DialogTitle as l, DialogClose as n, DialogHeader as o, DialogContent as r, DialogOverlay as s, Dialog$1 as t, DialogTrigger as u };
|
|
47
|
-
//# sourceMappingURL=dialog-
|
|
47
|
+
//# sourceMappingURL=dialog-VmYg9Eq_.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as Button } from "../../../button-
|
|
1
|
+
import { t as Button } from "../../../button-DjqNWeLI.cjs";
|
|
2
2
|
import { Separator } from "../../../ui/separator.cjs";
|
|
3
3
|
import { TooltipContent } from "../../../ui/tooltip.cjs";
|
|
4
|
-
import * as
|
|
5
|
-
import * as
|
|
4
|
+
import * as react_jsx_runtime206 from "react/jsx-runtime";
|
|
5
|
+
import * as class_variance_authority_types5 from "class-variance-authority/types";
|
|
6
6
|
import { VariantProps } from "class-variance-authority";
|
|
7
7
|
|
|
8
8
|
//#region packages/components/dialogs/detail-dialog/components/sidebar.d.ts
|
|
@@ -28,7 +28,7 @@ declare function SidebarProvider({
|
|
|
28
28
|
defaultOpen?: boolean;
|
|
29
29
|
open?: boolean;
|
|
30
30
|
onOpenChange?: (open: boolean) => void;
|
|
31
|
-
}):
|
|
31
|
+
}): react_jsx_runtime206.JSX.Element;
|
|
32
32
|
declare function Sidebar({
|
|
33
33
|
side,
|
|
34
34
|
variant,
|
|
@@ -40,71 +40,71 @@ declare function Sidebar({
|
|
|
40
40
|
side?: 'left' | 'right';
|
|
41
41
|
variant?: 'sidebar' | 'floating' | 'inset';
|
|
42
42
|
collapsible?: 'offcanvas' | 'icon' | 'none';
|
|
43
|
-
}):
|
|
43
|
+
}): react_jsx_runtime206.JSX.Element;
|
|
44
44
|
declare function DetailDialogSidebarTrigger({
|
|
45
45
|
className,
|
|
46
46
|
onClick,
|
|
47
47
|
...props
|
|
48
|
-
}: React.ComponentProps<typeof Button>):
|
|
48
|
+
}: React.ComponentProps<typeof Button>): react_jsx_runtime206.JSX.Element;
|
|
49
49
|
declare function DetailDialogSidebarRail({
|
|
50
50
|
className,
|
|
51
51
|
...props
|
|
52
|
-
}: React.ComponentProps<'button'>):
|
|
52
|
+
}: React.ComponentProps<'button'>): react_jsx_runtime206.JSX.Element;
|
|
53
53
|
declare function SidebarInset({
|
|
54
54
|
className,
|
|
55
55
|
...props
|
|
56
|
-
}: React.ComponentProps<'main'>):
|
|
56
|
+
}: React.ComponentProps<'main'>): react_jsx_runtime206.JSX.Element;
|
|
57
57
|
declare function DetailDialogSidebarHeader({
|
|
58
58
|
className,
|
|
59
59
|
...props
|
|
60
|
-
}: React.ComponentProps<'div'>):
|
|
60
|
+
}: React.ComponentProps<'div'>): react_jsx_runtime206.JSX.Element;
|
|
61
61
|
declare function DetailDialogSidebarFooter({
|
|
62
62
|
className,
|
|
63
63
|
children,
|
|
64
64
|
...props
|
|
65
|
-
}: React.ComponentProps<'div'>):
|
|
65
|
+
}: React.ComponentProps<'div'>): react_jsx_runtime206.JSX.Element;
|
|
66
66
|
declare function DetailDialogSidebarSeparator({
|
|
67
67
|
className,
|
|
68
68
|
...props
|
|
69
|
-
}: React.ComponentProps<typeof Separator>):
|
|
69
|
+
}: React.ComponentProps<typeof Separator>): react_jsx_runtime206.JSX.Element;
|
|
70
70
|
declare function DetailDialogSidebarContent({
|
|
71
71
|
className,
|
|
72
72
|
...props
|
|
73
|
-
}: React.ComponentProps<'div'>):
|
|
73
|
+
}: React.ComponentProps<'div'>): react_jsx_runtime206.JSX.Element;
|
|
74
74
|
declare function DetailDialogSidebarGroup({
|
|
75
75
|
className,
|
|
76
76
|
...props
|
|
77
|
-
}: React.ComponentProps<'div'>):
|
|
77
|
+
}: React.ComponentProps<'div'>): react_jsx_runtime206.JSX.Element;
|
|
78
78
|
declare function DetailDialogSidebarGroupLabel({
|
|
79
79
|
className,
|
|
80
80
|
asChild,
|
|
81
81
|
...props
|
|
82
82
|
}: React.ComponentProps<'div'> & {
|
|
83
83
|
asChild?: boolean;
|
|
84
|
-
}):
|
|
84
|
+
}): react_jsx_runtime206.JSX.Element;
|
|
85
85
|
declare function DetailDialogSidebarGroupAction({
|
|
86
86
|
className,
|
|
87
87
|
asChild,
|
|
88
88
|
...props
|
|
89
89
|
}: React.ComponentProps<'button'> & {
|
|
90
90
|
asChild?: boolean;
|
|
91
|
-
}):
|
|
91
|
+
}): react_jsx_runtime206.JSX.Element;
|
|
92
92
|
declare function DetailDialogSidebarGroupContent({
|
|
93
93
|
className,
|
|
94
94
|
...props
|
|
95
|
-
}: React.ComponentProps<'div'>):
|
|
95
|
+
}: React.ComponentProps<'div'>): react_jsx_runtime206.JSX.Element;
|
|
96
96
|
declare function DetailDialogSidebarMenu({
|
|
97
97
|
className,
|
|
98
98
|
...props
|
|
99
|
-
}: React.ComponentProps<'ul'>):
|
|
99
|
+
}: React.ComponentProps<'ul'>): react_jsx_runtime206.JSX.Element;
|
|
100
100
|
declare function DetailDialogSidebarMenuItem({
|
|
101
101
|
className,
|
|
102
102
|
...props
|
|
103
|
-
}: React.ComponentProps<'li'>):
|
|
103
|
+
}: React.ComponentProps<'li'>): react_jsx_runtime206.JSX.Element;
|
|
104
104
|
declare const sidebarMenuButtonVariants: (props?: ({
|
|
105
105
|
variant?: "default" | "outline" | null | undefined;
|
|
106
106
|
size?: "sm" | "lg" | "default" | null | undefined;
|
|
107
|
-
} &
|
|
107
|
+
} & class_variance_authority_types5.ClassProp) | undefined) => string;
|
|
108
108
|
declare function DetailDialogSidebarMenuButton({
|
|
109
109
|
asChild,
|
|
110
110
|
isActive,
|
|
@@ -117,7 +117,7 @@ declare function DetailDialogSidebarMenuButton({
|
|
|
117
117
|
asChild?: boolean;
|
|
118
118
|
isActive?: boolean;
|
|
119
119
|
tooltip?: string | React.ComponentProps<typeof TooltipContent>;
|
|
120
|
-
} & VariantProps<typeof sidebarMenuButtonVariants>):
|
|
120
|
+
} & VariantProps<typeof sidebarMenuButtonVariants>): react_jsx_runtime206.JSX.Element;
|
|
121
121
|
declare function DetailDialogSidebarMenuAction({
|
|
122
122
|
className,
|
|
123
123
|
asChild,
|
|
@@ -126,26 +126,26 @@ declare function DetailDialogSidebarMenuAction({
|
|
|
126
126
|
}: React.ComponentProps<'button'> & {
|
|
127
127
|
asChild?: boolean;
|
|
128
128
|
showOnHover?: boolean;
|
|
129
|
-
}):
|
|
129
|
+
}): react_jsx_runtime206.JSX.Element;
|
|
130
130
|
declare function DetailDialogSidebarMenuBadge({
|
|
131
131
|
className,
|
|
132
132
|
...props
|
|
133
|
-
}: React.ComponentProps<'div'>):
|
|
133
|
+
}: React.ComponentProps<'div'>): react_jsx_runtime206.JSX.Element;
|
|
134
134
|
declare function DetailDialogSidebarMenuSkeleton({
|
|
135
135
|
className,
|
|
136
136
|
showIcon,
|
|
137
137
|
...props
|
|
138
138
|
}: React.ComponentProps<'div'> & {
|
|
139
139
|
showIcon?: boolean;
|
|
140
|
-
}):
|
|
140
|
+
}): react_jsx_runtime206.JSX.Element;
|
|
141
141
|
declare function DetailDialogSidebarMenuSub({
|
|
142
142
|
className,
|
|
143
143
|
...props
|
|
144
|
-
}: React.ComponentProps<'ul'>):
|
|
144
|
+
}: React.ComponentProps<'ul'>): react_jsx_runtime206.JSX.Element;
|
|
145
145
|
declare function DetailDialogSidebarMenuSubItem({
|
|
146
146
|
className,
|
|
147
147
|
...props
|
|
148
|
-
}: React.ComponentProps<'li'>):
|
|
148
|
+
}: React.ComponentProps<'li'>): react_jsx_runtime206.JSX.Element;
|
|
149
149
|
declare function DetailDialogSidebarMenuSubButton({
|
|
150
150
|
asChild,
|
|
151
151
|
size,
|
|
@@ -156,7 +156,7 @@ declare function DetailDialogSidebarMenuSubButton({
|
|
|
156
156
|
asChild?: boolean;
|
|
157
157
|
size?: 'sm' | 'md';
|
|
158
158
|
isActive?: boolean;
|
|
159
|
-
}):
|
|
159
|
+
}): react_jsx_runtime206.JSX.Element;
|
|
160
160
|
//#endregion
|
|
161
161
|
export { DetailDialogSidebarContent, DetailDialogSidebarFooter, DetailDialogSidebarGroup, DetailDialogSidebarGroupAction, DetailDialogSidebarGroupContent, DetailDialogSidebarGroupLabel, DetailDialogSidebarHeader, DetailDialogSidebarMenu, DetailDialogSidebarMenuAction, DetailDialogSidebarMenuBadge, DetailDialogSidebarMenuButton, DetailDialogSidebarMenuItem, DetailDialogSidebarMenuSkeleton, DetailDialogSidebarMenuSub, DetailDialogSidebarMenuSubButton, DetailDialogSidebarMenuSubItem, DetailDialogSidebarRail, DetailDialogSidebarSeparator, DetailDialogSidebarTrigger, Sidebar, SidebarInset, SidebarProvider, useSidebar };
|
|
162
162
|
//# sourceMappingURL=sidebar.d.cts.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { t as Button } from "../../../button-
|
|
1
|
+
import { t as Button } from "../../../button-VdupFKuy.mjs";
|
|
2
2
|
import { Separator } from "../../../ui/separator.mjs";
|
|
3
3
|
import { TooltipContent } from "../../../ui/tooltip.mjs";
|
|
4
|
-
import * as
|
|
4
|
+
import * as react_jsx_runtime191 from "react/jsx-runtime";
|
|
5
5
|
import { VariantProps } from "class-variance-authority";
|
|
6
|
-
import * as
|
|
6
|
+
import * as class_variance_authority_types5 from "class-variance-authority/types";
|
|
7
7
|
|
|
8
8
|
//#region packages/components/dialogs/detail-dialog/components/sidebar.d.ts
|
|
9
9
|
type SidebarContextProps = {
|
|
@@ -28,7 +28,7 @@ declare function SidebarProvider({
|
|
|
28
28
|
defaultOpen?: boolean;
|
|
29
29
|
open?: boolean;
|
|
30
30
|
onOpenChange?: (open: boolean) => void;
|
|
31
|
-
}):
|
|
31
|
+
}): react_jsx_runtime191.JSX.Element;
|
|
32
32
|
declare function Sidebar({
|
|
33
33
|
side,
|
|
34
34
|
variant,
|
|
@@ -40,71 +40,71 @@ declare function Sidebar({
|
|
|
40
40
|
side?: 'left' | 'right';
|
|
41
41
|
variant?: 'sidebar' | 'floating' | 'inset';
|
|
42
42
|
collapsible?: 'offcanvas' | 'icon' | 'none';
|
|
43
|
-
}):
|
|
43
|
+
}): react_jsx_runtime191.JSX.Element;
|
|
44
44
|
declare function DetailDialogSidebarTrigger({
|
|
45
45
|
className,
|
|
46
46
|
onClick,
|
|
47
47
|
...props
|
|
48
|
-
}: React.ComponentProps<typeof Button>):
|
|
48
|
+
}: React.ComponentProps<typeof Button>): react_jsx_runtime191.JSX.Element;
|
|
49
49
|
declare function DetailDialogSidebarRail({
|
|
50
50
|
className,
|
|
51
51
|
...props
|
|
52
|
-
}: React.ComponentProps<'button'>):
|
|
52
|
+
}: React.ComponentProps<'button'>): react_jsx_runtime191.JSX.Element;
|
|
53
53
|
declare function SidebarInset({
|
|
54
54
|
className,
|
|
55
55
|
...props
|
|
56
|
-
}: React.ComponentProps<'main'>):
|
|
56
|
+
}: React.ComponentProps<'main'>): react_jsx_runtime191.JSX.Element;
|
|
57
57
|
declare function DetailDialogSidebarHeader({
|
|
58
58
|
className,
|
|
59
59
|
...props
|
|
60
|
-
}: React.ComponentProps<'div'>):
|
|
60
|
+
}: React.ComponentProps<'div'>): react_jsx_runtime191.JSX.Element;
|
|
61
61
|
declare function DetailDialogSidebarFooter({
|
|
62
62
|
className,
|
|
63
63
|
children,
|
|
64
64
|
...props
|
|
65
|
-
}: React.ComponentProps<'div'>):
|
|
65
|
+
}: React.ComponentProps<'div'>): react_jsx_runtime191.JSX.Element;
|
|
66
66
|
declare function DetailDialogSidebarSeparator({
|
|
67
67
|
className,
|
|
68
68
|
...props
|
|
69
|
-
}: React.ComponentProps<typeof Separator>):
|
|
69
|
+
}: React.ComponentProps<typeof Separator>): react_jsx_runtime191.JSX.Element;
|
|
70
70
|
declare function DetailDialogSidebarContent({
|
|
71
71
|
className,
|
|
72
72
|
...props
|
|
73
|
-
}: React.ComponentProps<'div'>):
|
|
73
|
+
}: React.ComponentProps<'div'>): react_jsx_runtime191.JSX.Element;
|
|
74
74
|
declare function DetailDialogSidebarGroup({
|
|
75
75
|
className,
|
|
76
76
|
...props
|
|
77
|
-
}: React.ComponentProps<'div'>):
|
|
77
|
+
}: React.ComponentProps<'div'>): react_jsx_runtime191.JSX.Element;
|
|
78
78
|
declare function DetailDialogSidebarGroupLabel({
|
|
79
79
|
className,
|
|
80
80
|
asChild,
|
|
81
81
|
...props
|
|
82
82
|
}: React.ComponentProps<'div'> & {
|
|
83
83
|
asChild?: boolean;
|
|
84
|
-
}):
|
|
84
|
+
}): react_jsx_runtime191.JSX.Element;
|
|
85
85
|
declare function DetailDialogSidebarGroupAction({
|
|
86
86
|
className,
|
|
87
87
|
asChild,
|
|
88
88
|
...props
|
|
89
89
|
}: React.ComponentProps<'button'> & {
|
|
90
90
|
asChild?: boolean;
|
|
91
|
-
}):
|
|
91
|
+
}): react_jsx_runtime191.JSX.Element;
|
|
92
92
|
declare function DetailDialogSidebarGroupContent({
|
|
93
93
|
className,
|
|
94
94
|
...props
|
|
95
|
-
}: React.ComponentProps<'div'>):
|
|
95
|
+
}: React.ComponentProps<'div'>): react_jsx_runtime191.JSX.Element;
|
|
96
96
|
declare function DetailDialogSidebarMenu({
|
|
97
97
|
className,
|
|
98
98
|
...props
|
|
99
|
-
}: React.ComponentProps<'ul'>):
|
|
99
|
+
}: React.ComponentProps<'ul'>): react_jsx_runtime191.JSX.Element;
|
|
100
100
|
declare function DetailDialogSidebarMenuItem({
|
|
101
101
|
className,
|
|
102
102
|
...props
|
|
103
|
-
}: React.ComponentProps<'li'>):
|
|
103
|
+
}: React.ComponentProps<'li'>): react_jsx_runtime191.JSX.Element;
|
|
104
104
|
declare const sidebarMenuButtonVariants: (props?: ({
|
|
105
105
|
variant?: "default" | "outline" | null | undefined;
|
|
106
106
|
size?: "sm" | "lg" | "default" | null | undefined;
|
|
107
|
-
} &
|
|
107
|
+
} & class_variance_authority_types5.ClassProp) | undefined) => string;
|
|
108
108
|
declare function DetailDialogSidebarMenuButton({
|
|
109
109
|
asChild,
|
|
110
110
|
isActive,
|
|
@@ -117,7 +117,7 @@ declare function DetailDialogSidebarMenuButton({
|
|
|
117
117
|
asChild?: boolean;
|
|
118
118
|
isActive?: boolean;
|
|
119
119
|
tooltip?: string | React.ComponentProps<typeof TooltipContent>;
|
|
120
|
-
} & VariantProps<typeof sidebarMenuButtonVariants>):
|
|
120
|
+
} & VariantProps<typeof sidebarMenuButtonVariants>): react_jsx_runtime191.JSX.Element;
|
|
121
121
|
declare function DetailDialogSidebarMenuAction({
|
|
122
122
|
className,
|
|
123
123
|
asChild,
|
|
@@ -126,26 +126,26 @@ declare function DetailDialogSidebarMenuAction({
|
|
|
126
126
|
}: React.ComponentProps<'button'> & {
|
|
127
127
|
asChild?: boolean;
|
|
128
128
|
showOnHover?: boolean;
|
|
129
|
-
}):
|
|
129
|
+
}): react_jsx_runtime191.JSX.Element;
|
|
130
130
|
declare function DetailDialogSidebarMenuBadge({
|
|
131
131
|
className,
|
|
132
132
|
...props
|
|
133
|
-
}: React.ComponentProps<'div'>):
|
|
133
|
+
}: React.ComponentProps<'div'>): react_jsx_runtime191.JSX.Element;
|
|
134
134
|
declare function DetailDialogSidebarMenuSkeleton({
|
|
135
135
|
className,
|
|
136
136
|
showIcon,
|
|
137
137
|
...props
|
|
138
138
|
}: React.ComponentProps<'div'> & {
|
|
139
139
|
showIcon?: boolean;
|
|
140
|
-
}):
|
|
140
|
+
}): react_jsx_runtime191.JSX.Element;
|
|
141
141
|
declare function DetailDialogSidebarMenuSub({
|
|
142
142
|
className,
|
|
143
143
|
...props
|
|
144
|
-
}: React.ComponentProps<'ul'>):
|
|
144
|
+
}: React.ComponentProps<'ul'>): react_jsx_runtime191.JSX.Element;
|
|
145
145
|
declare function DetailDialogSidebarMenuSubItem({
|
|
146
146
|
className,
|
|
147
147
|
...props
|
|
148
|
-
}: React.ComponentProps<'li'>):
|
|
148
|
+
}: React.ComponentProps<'li'>): react_jsx_runtime191.JSX.Element;
|
|
149
149
|
declare function DetailDialogSidebarMenuSubButton({
|
|
150
150
|
asChild,
|
|
151
151
|
size,
|
|
@@ -156,7 +156,7 @@ declare function DetailDialogSidebarMenuSubButton({
|
|
|
156
156
|
asChild?: boolean;
|
|
157
157
|
size?: 'sm' | 'md';
|
|
158
158
|
isActive?: boolean;
|
|
159
|
-
}):
|
|
159
|
+
}): react_jsx_runtime191.JSX.Element;
|
|
160
160
|
//#endregion
|
|
161
161
|
export { DetailDialogSidebarContent, DetailDialogSidebarFooter, DetailDialogSidebarGroup, DetailDialogSidebarGroupAction, DetailDialogSidebarGroupContent, DetailDialogSidebarGroupLabel, DetailDialogSidebarHeader, DetailDialogSidebarMenu, DetailDialogSidebarMenuAction, DetailDialogSidebarMenuBadge, DetailDialogSidebarMenuButton, DetailDialogSidebarMenuItem, DetailDialogSidebarMenuSkeleton, DetailDialogSidebarMenuSub, DetailDialogSidebarMenuSubButton, DetailDialogSidebarMenuSubItem, DetailDialogSidebarRail, DetailDialogSidebarSeparator, DetailDialogSidebarTrigger, Sidebar, SidebarInset, SidebarProvider, useSidebar };
|
|
162
162
|
//# sourceMappingURL=sidebar.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["DescriptionEmpty: React.FC","DescriptionBadge: React.FC<{\n label: string | number | null | undefined;\n}>","DescriptionDate: React.FC<Props>","TooltipProvider","Tooltip","TooltipTrigger","DateDisplay","TooltipContent","DescriptionImages: React.FC<{\n images?:\n | Array<{\n id: string;\n src: string;\n alt: string;\n }>\n | null\n | undefined;\n}>","Image","DescriptionLongText: React.FC<{ content: string | null | undefined | number }>","Tooltip","TooltipTrigger","Paragraph","TooltipContent","DescriptionName: React.FC<{\n name?: string | null | undefined;\n}>","Tooltip","TooltipTrigger","Paragraph","TooltipContent","DescriptionNumberPhone: React.FC<React.PropsWithChildren<{ value: string }>>","Tooltip","TooltipTrigger","Paragraph","TooltipContent","options: Intl.NumberFormatOptions","Flex","DescriptionItem: React.FC<\n React.PropsWithChildren<{\n label: string;\n labelColSpan?: number;\n }>\n>","Description: React.FC<\n React.PropsWithChildren<{\n className?: string;\n }>\n>"],"sources":["../../../packages/components/features/descriptions/components/empty.tsx","../../../packages/components/features/descriptions/components/badge.tsx","../../../packages/components/features/descriptions/components/date.tsx","../../../packages/components/features/descriptions/components/images.tsx","../../../packages/components/features/descriptions/components/longtext.tsx","../../../packages/components/features/descriptions/components/name.tsx","../../../packages/components/features/descriptions/components/number-phone.tsx","../../../packages/components/features/descriptions/components/statistic.tsx","../../../packages/components/features/descriptions/index.tsx"],"sourcesContent":["export const DescriptionEmpty: React.FC = () => {\n return (\n <div className=\"flex items-center gap-0 font-medium text-sm text-text-positive-muted italic\">\n <p>Empty Value</p>\n </div>\n );\n};\n","import { DescriptionEmpty } from './empty';\n\nexport const DescriptionBadge: React.FC<{\n label: string | number | null | undefined;\n}> = ({ label }) => {\n if (!label) return <DescriptionEmpty />;\n return (\n <div className=\"w-fit rounded-full border border-border-weak px-3 py-1 font-medium text-text-positive-weak text-xs tabular-nums shadow-xs\">{label}</div>\n );\n};\n","import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/tooltip';\n\nimport { DateDisplay } from '@/components/data-display/date';\nimport { DescriptionEmpty } from './empty';\n\ntype Props = {\n date: Date | string | number | null | undefined;\n};\nexport const DescriptionDate: React.FC<Props> = ({ date }) => {\n if (typeof date === 'undefined' || date === null) return <DescriptionEmpty />;\n return (\n <TooltipProvider>\n <Tooltip>\n <TooltipTrigger>\n <DateDisplay date={date} format=\"medium\" />\n </TooltipTrigger>\n <TooltipContent>\n <DateDisplay date={date} format=\"full\" showTime className=\"font-medium text-xs\" />\n </TooltipContent>\n </Tooltip>\n </TooltipProvider>\n );\n};\n","import { Image } from '@/components/ui/image';\n\nimport { DescriptionEmpty } from './empty';\n\nexport const DescriptionImages: React.FC<{\n images?:\n | Array<{\n id: string;\n src: string;\n alt: string;\n }>\n | null\n | undefined;\n}> = ({ images }) => {\n if (!images || !images.length) return <DescriptionEmpty />;\n if (images.length === 1)\n return (\n <div className=\"flex flex-wrap gap-4\">\n <div key={images[0].id} className=\"group relative size-42 rounded-sm border border-border shadow-xs\">\n <Image src={images[0].src} alt={images[0].alt} width=\"100%\" height=\"100%\" />\n </div>\n </div>\n );\n return (\n <div className=\"flex flex-wrap gap-4\">\n {images.map(image => (\n <div key={image.id} className=\"group relative size-16 rounded-lg border border-border shadow-xs\">\n <Image src={image.src} alt={image.alt} width=\"100%\" height=\"100%\" />\n </div>\n ))}\n </div>\n );\n};\n","import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip';\n\nimport { Paragraph } from '@/components/typography/paragraph';\nimport { DescriptionEmpty } from './empty';\n\nexport const DescriptionLongText: React.FC<{ content: string | null | undefined | number }> = ({ content }) => {\n if (content === undefined || content === null) {\n return <DescriptionEmpty />;\n }\n return (\n <Tooltip>\n <TooltipTrigger>\n <Paragraph variant=\"sm\" className=\"whitespace-pre-line break-all text-start text-sm\">\n {content}\n </Paragraph>\n </TooltipTrigger>\n <TooltipContent align=\"start\" className=\"h-fit min-w-48 max-w-80 pt-4\">\n <div className=\"flex flex-col gap-y-2\">\n <p className=\"whitespace-pre-line text-wrap break-keep\">{content}</p>\n <p className=\"w-full text-end\">{content.toString().length} chars</p>\n </div>\n </TooltipContent>\n </Tooltip>\n );\n};\n","import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip';\n\nimport { Paragraph } from '@/components/typography/paragraph';\nimport { DescriptionEmpty } from './empty';\n\nexport const DescriptionName: React.FC<{\n name?: string | null | undefined;\n}> = ({ name }) => {\n if (!name) return <DescriptionEmpty />;\n return (\n <Tooltip>\n <TooltipTrigger>\n <Paragraph variant=\"sm\" className=\"line-clamp-2 w-full truncate\">\n {name}\n </Paragraph>\n </TooltipTrigger>\n <TooltipContent align=\"start\" className=\"h-fit min-w-48 max-w-80 pt-4\">\n <div className=\"flex flex-col gap-y-2\">\n <p className=\"whitespace-pre-line text-wrap break-keep\">{name}</p>\n <p className=\"w-full text-end\">{name.length} chars</p>\n </div>\n </TooltipContent>\n </Tooltip>\n );\n};\n","import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip';\n\nimport { Paragraph } from '@/components/typography/paragraph';\n\nexport const DescriptionNumberPhone: React.FC<React.PropsWithChildren<{ value: string }>> = ({ value }) => {\n return (\n <Tooltip>\n <TooltipTrigger>\n <Paragraph variant=\"sm\">{value.replace(/(\\d{3})(\\d{3})(\\d{4})/, '($1) $2-$3')}</Paragraph>\n </TooltipTrigger>\n <TooltipContent align=\"start\">\n <p className=\"tabular-nums\">{value.slice(1).replace(/(\\d{2})(\\d{3})(\\d{4})/, '(00) (+84) ($1) $2-$3')}</p>\n </TooltipContent>\n </Tooltip>\n );\n};\n","import { memo, useCallback, useMemo } from 'react';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { Flex } from '@/components/layouts/flex';\nimport { DescriptionEmpty } from './empty';\n\nconst applyRounding = (num: number, precisionValue: number, roundingMode?: 'round' | 'floor' | 'ceil') => {\n const multiplier = 10 ** precisionValue;\n\n switch (roundingMode) {\n case 'floor':\n return Math.floor(num * multiplier) / multiplier;\n case 'ceil':\n return Math.ceil(num * multiplier) / multiplier;\n default:\n return Math.round(num * multiplier) / multiplier;\n }\n};\n\ntype Props = {\n decimalSeparator?: string;\n groupSeparator?: string;\n prefix?: React.ReactNode;\n suffix?: React.ReactNode;\n precision?: number; // Số chữ số thập phân\n roundingMode?: 'round' | 'floor' | 'ceil'; // Kiểu làm tròn\n showTrailingZeros?: boolean; // Hiển thị số 0 cuối\n size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'; // Kích thước của component\n value: number | string | null | undefined;\n};\n\nexport const DescriptionStatistic = memo(\n ({\n decimalSeparator = '.',\n groupSeparator = ',',\n prefix: Prefix,\n suffix: Suffix,\n precision,\n roundingMode = 'round',\n showTrailingZeros = false,\n size = 'sm',\n value = 0,\n }: Props) => {\n // Memoize number formatting options\n const formatOptions = useMemo((): Intl.NumberFormatOptions => {\n const options: Intl.NumberFormatOptions = {};\n\n if (typeof precision === 'number' && precision >= 0 && showTrailingZeros) {\n options.minimumFractionDigits = precision;\n options.maximumFractionDigits = precision;\n } else {\n options.maximumFractionDigits = precision;\n }\n\n return options;\n }, [precision, showTrailingZeros]);\n\n const formatNumber = useCallback(\n (num: number): string => {\n let processedNum = num;\n\n // Áp dụng làm tròn nếu có precision\n if (typeof precision === 'number' && precision >= 0) {\n processedNum = applyRounding(num, precision, roundingMode);\n }\n\n return processedNum.toLocaleString('en-US', formatOptions);\n },\n [roundingMode, formatOptions, precision]\n );\n\n // Memoize value processing\n const processedValue = useMemo((): string => {\n // Xử lý giá trị number\n if (typeof value === 'number') {\n if (Number.isNaN(value) || !Number.isFinite(value)) {\n return 'N/A';\n }\n return formatNumber(value);\n }\n\n // Xử lý giá trị string\n if (typeof value === 'string') {\n const trimmedValue = value.trim();\n\n // Nếu là chuỗi rỗng\n if (!trimmedValue) {\n return 'N/A';\n }\n\n // Thử convert sang number\n const numValue = Number(trimmedValue);\n\n if (Number.isNaN(numValue) || !Number.isFinite(numValue)) {\n // Nếu không phải số, trả về string gốc\n return 'N/A';\n }\n\n return formatNumber(numValue);\n }\n\n return 'N/A';\n }, [value, formatNumber]);\n\n // Memoize separator replacement\n const finalFormattedValue = useMemo((): string => {\n // Chỉ thay thế separators nếu khác mặc định\n if (decimalSeparator === '.' && groupSeparator === ',') {\n return processedValue;\n }\n return processedValue.replace(/,/g, groupSeparator).replace(/\\./g, decimalSeparator);\n }, [processedValue, decimalSeparator, groupSeparator]);\n\n if (finalFormattedValue === '0' || finalFormattedValue === 'N/A' || !finalFormattedValue) {\n return <DescriptionEmpty />;\n }\n\n return (\n <Flex\n padding=\"none\"\n className={cn(\n 'font-number text-lg text-text-positive tabular-nums',\n size === 'xs' && 'text-xs',\n size === 'sm' && 'text-sm',\n size === 'md' && 'text-base',\n size === 'lg' && 'text-lg',\n size === 'xl' && 'text-xl'\n )}\n >\n {Prefix}\n <p>{finalFormattedValue}</p>\n {Suffix}\n </Flex>\n );\n }\n);\nDescriptionStatistic.displayName = 'DescriptionStatistic';\n","import { cn } from '@customafk/react-toolkit/utils';\n\nexport * from './components';\n\nexport const DescriptionItem: React.FC<\n React.PropsWithChildren<{\n label: string;\n labelColSpan?: number;\n }>\n> = ({ label, labelColSpan = 3, children }) => {\n return (\n <div\n style={{\n display: 'grid',\n gridTemplateColumns: 'repeat(12, minmax(0, 1fr))',\n }}\n className=\"grid border-b border-b-border\"\n >\n <div\n style={{\n gridColumn: `span ${labelColSpan} / span ${labelColSpan}`,\n }}\n className=\"flex min-w-full items-center justify-start overflow-x-hidden text-wrap break-all border-r border-r-border bg-secondary-muted py-3 pr-2 pl-4 text-sm text-text-positive-weak tabular-nums\"\n >\n {label}\n </div>\n <div\n style={{\n gridColumn: `span ${12 - labelColSpan} / span ${12 - labelColSpan}`,\n }}\n className=\"flex flex-wrap gap-2 py-3 pr-2 pl-4 text-sm text-text-positive\"\n >\n {children}\n </div>\n </div>\n );\n};\n\nexport const Description: React.FC<\n React.PropsWithChildren<{\n className?: string;\n }>\n> = ({ children, className }) => {\n return (\n <div\n data-slot=\"description-wrapper\"\n className={cn('relative flex size-full flex-col gap-y-0 space-y-0 overflow-hidden rounded-lg border border-border bg-card shadow-xs ring-3 ring-border-muted', className)}\n >\n {children}\n </div>\n );\n};\n"],"mappings":"6XAAA,MAAaA,OAET,EAAA,EAAA,KAAC,MAAA,CAAI,UAAU,wFACb,EAAA,EAAA,KAAC,IAAA,CAAA,SAAE,cAAA,CAAe,EACd,CCFGC,GAEP,CAAE,WACD,GAEH,EAAA,EAAA,KAAC,MAAA,CAAI,UAAU,qIAA6H,GAAY,EAFvI,EAAA,EAAA,KAAC,EAAA,EAAA,CAAmB,CCG5BC,GAAoC,CAAE,UACtC,GAAiC,MAAa,EAAA,EAAA,KAAC,EAAA,EAAA,CAAmB,EAE3E,EAAA,EAAA,KAACC,EAAAA,EAAAA,CAAAA,UACC,EAAA,EAAA,MAACC,EAAAA,EAAAA,CAAAA,SAAAA,EACC,EAAA,EAAA,KAACC,EAAAA,EAAAA,CAAAA,UACC,EAAA,EAAA,KAACC,EAAAA,EAAAA,CAAkB,OAAM,OAAO,UAAW,CAAA,CAC5B,EACjB,EAAA,EAAA,KAACC,EAAAA,EAAAA,CAAAA,UACC,EAAA,EAAA,KAACD,EAAAA,EAAAA,CAAkB,OAAM,OAAO,OAAO,SAAA,GAAS,UAAU,uBAAwB,CAAA,CACnE,CAAA,CAAA,CACT,CAAA,CACM,CChBTE,GASP,CAAE,YACF,CAAC,GAAU,CAAC,EAAO,QAAe,EAAA,EAAA,KAAC,EAAA,EAAA,CAAmB,CACtD,EAAO,SAAW,GAElB,EAAA,EAAA,KAAC,MAAA,CAAI,UAAU,iCACb,EAAA,EAAA,KAA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EV,EAAA,EAAA,KAAC,MAAA,CACC,MAAO,CACL,WAAY,QAAQ,EAAa,UAAU,IAC5C,CACD,UAAU,oMAET,GACG,EACN,EAAA,EAAA,KAAC,MAAA,CACC,MAAO,CACL,WAAY,QAAQ,GAAK,EAAa,UAAU,GAAK,IACtD,CACD,UAAU,iEAET,YACG,CAAA,EACF,CAIGC,GAIR,CAAE,WAAU,gBAEb,EAAA,EAAA,KAAC,MAAA,CACC,YAAU,sBACV,WAAA,EAAA,EAAA,IAAc,gJAAiJ,EAAU,CAExK,YACG"}
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["DescriptionEmpty: React.FC","DescriptionBadge: React.FC<{\n label: string | number | null | undefined;\n}>","DescriptionDate: React.FC<Props>","TooltipProvider","Tooltip","TooltipTrigger","DateDisplay","TooltipContent","DescriptionImages: React.FC<{\n images?:\n | Array<{\n id: string;\n src: string;\n alt: string;\n }>\n | null\n | undefined;\n}>","Image","DescriptionLongText: React.FC<{ content: string | null | undefined | number }>","Tooltip","TooltipTrigger","Paragraph","TooltipContent","DescriptionName: React.FC<{\n name?: string | null | undefined;\n}>","Tooltip","TooltipTrigger","Paragraph","TooltipContent","DescriptionNumberPhone: React.FC<React.PropsWithChildren<{ value: string }>>","Tooltip","TooltipTrigger","Paragraph","TooltipContent","options: Intl.NumberFormatOptions","Flex","DescriptionItem: React.FC<\n React.PropsWithChildren<{\n label: string;\n labelColSpan?: number;\n }>\n>","Description: React.FC<\n React.PropsWithChildren<{\n className?: string;\n }>\n>"],"sources":["../../../packages/components/features/descriptions/components/empty.tsx","../../../packages/components/features/descriptions/components/badge.tsx","../../../packages/components/features/descriptions/components/date.tsx","../../../packages/components/features/descriptions/components/images.tsx","../../../packages/components/features/descriptions/components/longtext.tsx","../../../packages/components/features/descriptions/components/name.tsx","../../../packages/components/features/descriptions/components/number-phone.tsx","../../../packages/components/features/descriptions/components/statistic.tsx","../../../packages/components/features/descriptions/index.tsx"],"sourcesContent":["export const DescriptionEmpty: React.FC = () => {\n return (\n <div className=\"flex items-center gap-0 font-medium text-sm text-text-positive-muted italic\">\n <p>Empty Value</p>\n </div>\n );\n};\n","import { DescriptionEmpty } from './empty';\n\nexport const DescriptionBadge: React.FC<{\n label: string | number | null | undefined;\n}> = ({ label }) => {\n if (!label) return <DescriptionEmpty />;\n return (\n <div className=\"w-fit rounded-full border border-border-weak px-3 py-1 font-medium text-text-positive-weak text-xs tabular-nums shadow-xs\">{label}</div>\n );\n};\n","import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/tooltip';\n\nimport { DateDisplay } from '@/components/data-display/date';\nimport { DescriptionEmpty } from './empty';\n\ntype Props = {\n date: Date | string | number | null | undefined;\n};\nexport const DescriptionDate: React.FC<Props> = ({ date }) => {\n if (typeof date === 'undefined' || date === null) return <DescriptionEmpty />;\n return (\n <TooltipProvider>\n <Tooltip>\n <TooltipTrigger>\n <DateDisplay date={date} format=\"medium\" />\n </TooltipTrigger>\n <TooltipContent>\n <DateDisplay date={date} format=\"full\" showTime className=\"font-medium text-xs\" />\n </TooltipContent>\n </Tooltip>\n </TooltipProvider>\n );\n};\n","import { Image } from '@/components/ui/image';\n\nimport { DescriptionEmpty } from './empty';\n\nexport const DescriptionImages: React.FC<{\n images?:\n | Array<{\n id: string;\n src: string;\n alt: string;\n }>\n | null\n | undefined;\n}> = ({ images }) => {\n if (!images || !images.length) return <DescriptionEmpty />;\n if (images.length === 1)\n return (\n <div className=\"flex flex-wrap gap-4\">\n <div key={images[0].id} className=\"group relative size-42 rounded-sm border border-border shadow-xs\">\n <Image src={images[0].src} alt={images[0].alt} width=\"100%\" height=\"100%\" />\n </div>\n </div>\n );\n return (\n <div className=\"flex flex-wrap gap-4\">\n {images.map(image => (\n <div key={image.id} className=\"group relative size-16 rounded-lg border border-border shadow-xs\">\n <Image src={image.src} alt={image.alt} width=\"100%\" height=\"100%\" />\n </div>\n ))}\n </div>\n );\n};\n","import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip';\n\nimport { Paragraph } from '@/components/typography/paragraph';\nimport { DescriptionEmpty } from './empty';\n\nexport const DescriptionLongText: React.FC<{ content: string | null | undefined | number }> = ({ content }) => {\n if (content === undefined || content === null) {\n return <DescriptionEmpty />;\n }\n return (\n <Tooltip>\n <TooltipTrigger>\n <Paragraph variant=\"sm\" className=\"whitespace-pre-line break-all text-start text-sm\">\n {content}\n </Paragraph>\n </TooltipTrigger>\n <TooltipContent align=\"start\" className=\"h-fit min-w-48 max-w-80 pt-4\">\n <div className=\"flex flex-col gap-y-2\">\n <p className=\"whitespace-pre-line text-wrap break-keep\">{content}</p>\n <p className=\"w-full text-end\">{content.toString().length} chars</p>\n </div>\n </TooltipContent>\n </Tooltip>\n );\n};\n","import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip';\n\nimport { Paragraph } from '@/components/typography/paragraph';\nimport { DescriptionEmpty } from './empty';\n\nexport const DescriptionName: React.FC<{\n name?: string | null | undefined;\n}> = ({ name }) => {\n if (!name) return <DescriptionEmpty />;\n return (\n <Tooltip>\n <TooltipTrigger>\n <Paragraph variant=\"sm\" className=\"line-clamp-2 w-full truncate\">\n {name}\n </Paragraph>\n </TooltipTrigger>\n <TooltipContent align=\"start\" className=\"h-fit min-w-48 max-w-80 pt-4\">\n <div className=\"flex flex-col gap-y-2\">\n <p className=\"whitespace-pre-line text-wrap break-keep\">{name}</p>\n <p className=\"w-full text-end\">{name.length} chars</p>\n </div>\n </TooltipContent>\n </Tooltip>\n );\n};\n","import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip';\n\nimport { Paragraph } from '@/components/typography/paragraph';\n\nexport const DescriptionNumberPhone: React.FC<React.PropsWithChildren<{ value: string }>> = ({ value }) => {\n return (\n <Tooltip>\n <TooltipTrigger>\n <Paragraph variant=\"sm\">{value.replace(/(\\d{3})(\\d{3})(\\d{4})/, '($1) $2-$3')}</Paragraph>\n </TooltipTrigger>\n <TooltipContent align=\"start\">\n <p className=\"tabular-nums\">{value.slice(1).replace(/(\\d{2})(\\d{3})(\\d{4})/, '(00) (+84) ($1) $2-$3')}</p>\n </TooltipContent>\n </Tooltip>\n );\n};\n","import { memo, useCallback, useMemo } from 'react';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { Flex } from '@/components/layouts/flex';\nimport { DescriptionEmpty } from './empty';\n\nconst applyRounding = (num: number, precisionValue: number, roundingMode?: 'round' | 'floor' | 'ceil') => {\n const multiplier = 10 ** precisionValue;\n\n switch (roundingMode) {\n case 'floor':\n return Math.floor(num * multiplier) / multiplier;\n case 'ceil':\n return Math.ceil(num * multiplier) / multiplier;\n default:\n return Math.round(num * multiplier) / multiplier;\n }\n};\n\ntype Props = {\n decimalSeparator?: string;\n groupSeparator?: string;\n prefix?: React.ReactNode;\n suffix?: React.ReactNode;\n precision?: number; // Số chữ số thập phân\n roundingMode?: 'round' | 'floor' | 'ceil'; // Kiểu làm tròn\n showTrailingZeros?: boolean; // Hiển thị số 0 cuối\n size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'; // Kích thước của component\n value: number | string | null | undefined;\n};\n\nexport const DescriptionStatistic = memo(\n ({\n decimalSeparator = '.',\n groupSeparator = ',',\n prefix: Prefix,\n suffix: Suffix,\n precision,\n roundingMode = 'round',\n showTrailingZeros = false,\n size = 'sm',\n value = 0,\n }: Props) => {\n // Memoize number formatting options\n const formatOptions = useMemo((): Intl.NumberFormatOptions => {\n const options: Intl.NumberFormatOptions = {};\n\n if (typeof precision === 'number' && precision >= 0 && showTrailingZeros) {\n options.minimumFractionDigits = precision;\n options.maximumFractionDigits = precision;\n } else {\n options.maximumFractionDigits = precision;\n }\n\n return options;\n }, [precision, showTrailingZeros]);\n\n const formatNumber = useCallback(\n (num: number): string => {\n let processedNum = num;\n\n // Áp dụng làm tròn nếu có precision\n if (typeof precision === 'number' && precision >= 0) {\n processedNum = applyRounding(num, precision, roundingMode);\n }\n\n return processedNum.toLocaleString('en-US', formatOptions);\n },\n [roundingMode, formatOptions, precision]\n );\n\n // Memoize value processing\n const processedValue = useMemo((): string => {\n // Xử lý giá trị number\n if (typeof value === 'number') {\n if (Number.isNaN(value) || !Number.isFinite(value)) {\n return 'N/A';\n }\n return formatNumber(value);\n }\n\n // Xử lý giá trị string\n if (typeof value === 'string') {\n const trimmedValue = value.trim();\n\n // Nếu là chuỗi rỗng\n if (!trimmedValue) {\n return 'N/A';\n }\n\n // Thử convert sang number\n const numValue = Number(trimmedValue);\n\n if (Number.isNaN(numValue) || !Number.isFinite(numValue)) {\n // Nếu không phải số, trả về string gốc\n return 'N/A';\n }\n\n return formatNumber(numValue);\n }\n\n return 'N/A';\n }, [value, formatNumber]);\n\n // Memoize separator replacement\n const finalFormattedValue = useMemo((): string => {\n // Chỉ thay thế separators nếu khác mặc định\n if (decimalSeparator === '.' && groupSeparator === ',') {\n return processedValue;\n }\n return processedValue.replace(/,/g, groupSeparator).replace(/\\./g, decimalSeparator);\n }, [processedValue, decimalSeparator, groupSeparator]);\n\n if (finalFormattedValue === '0' || finalFormattedValue === 'N/A' || !finalFormattedValue) {\n return <DescriptionEmpty />;\n }\n\n return (\n <Flex\n padding=\"none\"\n className={cn(\n 'font-number text-lg text-text-positive tabular-nums',\n size === 'xs' && 'text-xs',\n size === 'sm' && 'text-sm',\n size === 'md' && 'text-base',\n size === 'lg' && 'text-lg',\n size === 'xl' && 'text-xl'\n )}\n >\n {Prefix}\n <p>{finalFormattedValue}</p>\n {Suffix}\n </Flex>\n );\n }\n);\nDescriptionStatistic.displayName = 'DescriptionStatistic';\n","import { cn } from '@customafk/react-toolkit/utils';\n\nexport * from './components';\n\nexport const DescriptionItem: React.FC<\n React.PropsWithChildren<{\n label: string;\n labelColSpan?: number;\n }>\n> = ({ label, labelColSpan = 3, children }) => {\n return (\n <div\n style={{\n display: 'grid',\n gridTemplateColumns: 'repeat(12, minmax(0, 1fr))',\n }}\n className=\"grid border-b border-b-border\"\n >\n <div\n style={{\n gridColumn: `span ${labelColSpan} / span ${labelColSpan}`,\n }}\n className=\"flex min-w-full items-center justify-start overflow-x-hidden text-wrap break-all border-r border-r-border bg-secondary-muted py-3 pr-2 pl-4 text-sm text-text-positive-weak tabular-nums\"\n >\n {label}\n </div>\n <div\n style={{\n gridColumn: `span ${12 - labelColSpan} / span ${12 - labelColSpan}`,\n }}\n className=\"flex flex-wrap gap-2 py-3 pr-2 pl-4 text-sm text-text-positive\"\n >\n {children}\n </div>\n </div>\n );\n};\n\nexport const Description: React.FC<\n React.PropsWithChildren<{\n className?: string;\n }>\n> = ({ children, className }) => {\n return (\n <div\n data-slot=\"description-wrapper\"\n className={cn(\n 'relative flex size-full flex-col gap-y-0 space-y-0 overflow-hidden rounded-lg border border-border bg-card shadow-xs ring-3 ring-border-muted',\n className\n )}\n >\n {children}\n </div>\n );\n};\n"],"mappings":"6XAAA,MAAaA,OAET,EAAA,EAAA,KAAC,MAAA,CAAI,UAAU,wFACb,EAAA,EAAA,KAAC,IAAA,CAAA,SAAE,cAAA,CAAe,EACd,CCFGC,GAEP,CAAE,WACD,GAEH,EAAA,EAAA,KAAC,MAAA,CAAI,UAAU,qIAA6H,GAAY,EAFvI,EAAA,EAAA,KAAC,EAAA,EAAA,CAAmB,CCG5BC,GAAoC,CAAE,UACtC,GAAiC,MAAa,EAAA,EAAA,KAAC,EAAA,EAAA,CAAmB,EAE3E,EAAA,EAAA,KAACC,EAAAA,EAAAA,CAAAA,UACC,EAAA,EAAA,MAACC,EAAAA,EAAAA,CAAAA,SAAAA,EACC,EAAA,EAAA,KAACC,EAAAA,EAAAA,CAAAA,UACC,EAAA,EAAA,KAACC,EAAAA,EAAAA,CAAkB,OAAM,OAAO,UAAW,CAAA,CAC5B,EACjB,EAAA,EAAA,KAACC,EAAAA,EAAAA,CAAAA,UACC,EAAA,EAAA,KAACD,EAAAA,EAAAA,CAAkB,OAAM,OAAO,OAAO,SAAA,GAAS,UAAU,uBAAwB,CAAA,CACnE,CAAA,CAAA,CACT,CAAA,CACM,CChBTE,G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