@customafk/lunas-ui 0.0.97 → 0.0.99
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-Dm2SLvNi.d.cts → button-B9iPyKOi.d.ts} +5 -5
- package/dist/{button-D9BFe499.d.ts → button-BCupEAtU.d.cts} +3 -3
- package/dist/{command-CPfyi3lV.d.cts → command-BbuQojPT.d.cts} +12 -12
- package/dist/{command-Cjk7aLRb.d.ts → command-DdmKJu8K.d.ts} +11 -11
- package/dist/data-display/empty.d.cts +2 -2
- package/dist/data-display/empty.d.ts +2 -2
- package/dist/data-display/statistic.d.cts +2 -2
- package/dist/data-display/statistic.d.ts +2 -2
- package/dist/{dialog-Dx46kqvb.d.cts → dialog-CPq4R2AI.d.cts} +12 -12
- package/dist/dialogs/detail-dialog/component/sidebar.d.cts +3 -3
- package/dist/dialogs/detail-dialog/component/sidebar.d.ts +28 -28
- package/dist/dialogs/form-dialog.d.cts +2 -2
- package/dist/dialogs/form-dialog.d.ts +2 -2
- package/dist/forms/combobox-field.cjs +1 -1
- package/dist/forms/combobox-field.cjs.map +1 -1
- package/dist/forms/combobox-field.d.cts +2 -2
- package/dist/forms/combobox-field.d.ts +2 -2
- package/dist/forms/combobox-field.js +1 -1
- package/dist/forms/combobox-field.js.map +1 -1
- package/dist/forms/date-field.d.cts +2 -2
- package/dist/forms/date-field.d.ts +2 -2
- package/dist/forms/form-wrapper.d.cts +2 -2
- package/dist/forms/form-wrapper.d.ts +2 -2
- package/dist/forms/multi-select-field.d.cts +2 -2
- package/dist/forms/multi-select-field.d.ts +2 -2
- package/dist/forms/number-field.d.cts +2 -2
- package/dist/forms/number-field.d.ts +2 -2
- package/dist/forms/password-field.d.cts +2 -2
- package/dist/forms/password-field.d.ts +2 -2
- package/dist/forms/select-field.d.cts +2 -2
- package/dist/forms/select-field.d.ts +2 -2
- package/dist/forms/switch-field.d.cts +2 -2
- package/dist/forms/switch-field.d.ts +2 -2
- package/dist/forms/text-field.d.cts +2 -2
- package/dist/forms/text-field.d.ts +2 -2
- package/dist/forms/textarea-field.d.cts +2 -2
- package/dist/forms/textarea-field.d.ts +2 -2
- package/dist/{input-qIwUgqQ9.d.cts → input-BOzL2Lc5.d.cts} +3 -3
- package/dist/{input-6c2vBe4o.d.ts → input-CUesZuUg.d.ts} +3 -3
- package/dist/{label-DpJBMAXm.d.cts → label-GklERL4t.d.ts} +3 -3
- package/dist/label-u5Iik8dq.d.cts +11 -0
- package/dist/layouts/app-layout/index.d.cts +27 -27
- package/dist/layouts/app-layout/index.d.ts +5 -5
- package/dist/layouts/flex.d.cts +2 -2
- package/dist/layouts/flex.d.ts +2 -2
- package/dist/layouts/service-layout/index.d.cts +14 -14
- package/dist/layouts/service-layout/index.d.ts +5 -5
- package/dist/pages/FeatureDeveloping.d.cts +2 -2
- package/dist/pages/FeatureDeveloping.d.ts +2 -2
- package/dist/pages/FeatureFixing.d.cts +2 -2
- package/dist/pages/FeatureFixing.d.ts +2 -2
- package/dist/pages/NotAuthorized.d.ts +2 -2
- package/dist/pages/NotFound.d.cts +2 -2
- package/dist/pages/NotFound.d.ts +2 -2
- package/dist/products/product-quantity-control.d.cts +2 -2
- package/dist/products/product-quantity-control.d.ts +2 -2
- package/dist/{separator-DXiCorAO.d.ts → separator-D6kvmLId.d.ts} +3 -3
- package/dist/{separator-B9LriCbJ.d.cts → separator-m1lyeWye.d.cts} +3 -3
- package/dist/table/index.d.cts +2 -2
- package/dist/table/index.d.ts +2 -2
- package/dist/{toggle-DbK_eiCh.d.cts → toggle-BIEexN0k.d.cts} +5 -5
- package/dist/{toggle-DpbtNgX8.d.ts → toggle-BemciJ_z.d.ts} +5 -5
- package/dist/{tooltip-BXubLsHv.d.ts → tooltip-ygJWURhv.d.ts} +6 -6
- package/dist/typography/paragraph.d.cts +2 -2
- package/dist/typography/paragraph.d.ts +2 -2
- package/dist/typography/title.d.cts +2 -2
- package/dist/typography/title.d.ts +2 -2
- package/dist/ui/alert-dialog.d.cts +12 -12
- package/dist/ui/alert-dialog.d.ts +12 -12
- package/dist/ui/alert.d.cts +4 -4
- package/dist/ui/alert.d.ts +6 -6
- package/dist/ui/aspect-ratio.d.cts +2 -2
- package/dist/ui/aspect-ratio.d.ts +2 -2
- package/dist/ui/avatar.d.cts +4 -4
- package/dist/ui/avatar.d.ts +4 -4
- package/dist/ui/badge.d.cts +2 -2
- package/dist/ui/badge.d.ts +2 -2
- package/dist/ui/breadcrumb.d.cts +8 -8
- package/dist/ui/breadcrumb.d.ts +8 -8
- package/dist/ui/button-group.d.cts +5 -5
- package/dist/ui/button-group.d.ts +5 -5
- package/dist/ui/button.d.cts +1 -1
- package/dist/ui/button.d.ts +1 -1
- package/dist/ui/calendar.d.cts +4 -4
- package/dist/ui/calendar.d.ts +4 -4
- package/dist/ui/card.d.cts +8 -8
- package/dist/ui/card.d.ts +8 -8
- package/dist/ui/carousel.d.cts +7 -7
- package/dist/ui/carousel.d.ts +7 -7
- package/dist/ui/collapsible.d.cts +4 -4
- package/dist/ui/collapsible.d.ts +4 -4
- package/dist/ui/command.d.cts +2 -2
- package/dist/ui/command.d.ts +1 -1
- package/dist/ui/context-menu.d.cts +16 -16
- package/dist/ui/context-menu.d.ts +16 -16
- package/dist/ui/dialog.d.cts +1 -1
- package/dist/ui/drawer.d.cts +11 -11
- package/dist/ui/drawer.d.ts +11 -11
- package/dist/ui/dropdown-menu.d.cts +16 -16
- package/dist/ui/dropdown-menu.d.ts +16 -16
- package/dist/ui/empty.d.cts +7 -7
- package/dist/ui/empty.d.ts +7 -7
- package/dist/ui/field.d.cts +1 -1
- package/dist/ui/field.d.ts +12 -12
- package/dist/ui/file-uploader.d.cts +2 -2
- package/dist/ui/file-uploader.d.ts +2 -2
- package/dist/ui/form.d.cts +7 -7
- package/dist/ui/form.d.ts +7 -7
- package/dist/ui/hover-card.d.cts +4 -4
- package/dist/ui/hover-card.d.ts +4 -4
- package/dist/ui/input-otp.d.cts +5 -5
- package/dist/ui/input-otp.d.ts +5 -5
- package/dist/ui/input.d.cts +1 -1
- package/dist/ui/input.d.ts +1 -1
- package/dist/ui/inputs/search-input.d.cts +3 -3
- package/dist/ui/inputs/search-input.d.ts +3 -3
- package/dist/ui/item.d.cts +12 -12
- package/dist/ui/item.d.ts +15 -15
- package/dist/ui/label.d.cts +1 -1
- package/dist/ui/label.d.ts +1 -1
- package/dist/ui/menubar.d.cts +17 -17
- package/dist/ui/menubar.d.ts +17 -17
- package/dist/ui/multi-select.d.cts +2 -2
- package/dist/ui/multi-select.d.ts +1 -1
- package/dist/ui/navigation-menu.d.cts +9 -9
- package/dist/ui/navigation-menu.d.ts +11 -11
- package/dist/ui/pagination.d.cts +9 -9
- package/dist/ui/pagination.d.ts +9 -9
- package/dist/ui/popover.d.cts +5 -5
- package/dist/ui/popover.d.ts +5 -5
- package/dist/ui/progress.d.cts +2 -2
- package/dist/ui/progress.d.ts +2 -2
- package/dist/ui/radio-group.d.cts +3 -3
- package/dist/ui/radio-group.d.ts +3 -3
- package/dist/ui/resizable.d.cts +4 -4
- package/dist/ui/resizable.d.ts +4 -4
- package/dist/ui/scroll-area.d.cts +3 -3
- package/dist/ui/scroll-area.d.ts +3 -3
- package/dist/ui/select.d.cts +11 -11
- package/dist/ui/select.d.ts +11 -11
- package/dist/ui/separator.d.cts +1 -1
- package/dist/ui/separator.d.ts +1 -1
- package/dist/ui/sheet.d.cts +9 -9
- package/dist/ui/sheet.d.ts +9 -9
- package/dist/ui/sidebar.d.cts +29 -29
- package/dist/ui/sidebar.d.ts +30 -30
- package/dist/ui/skeleton.d.cts +2 -2
- package/dist/ui/skeleton.d.ts +2 -2
- package/dist/ui/slider.d.cts +2 -2
- package/dist/ui/slider.d.ts +2 -2
- package/dist/ui/sonner.d.cts +2 -2
- package/dist/ui/sonner.d.ts +2 -2
- package/dist/ui/spinner.d.cts +2 -2
- package/dist/ui/spinner.d.ts +2 -2
- package/dist/ui/switch.d.cts +2 -2
- package/dist/ui/switch.d.ts +2 -2
- package/dist/ui/table.d.cts +9 -9
- package/dist/ui/table.d.ts +9 -9
- package/dist/ui/tabs.d.cts +5 -5
- package/dist/ui/tabs.d.ts +5 -5
- package/dist/ui/textarea.d.cts +2 -2
- package/dist/ui/textarea.d.ts +2 -2
- package/dist/ui/toggle-group.d.cts +4 -4
- package/dist/ui/toggle-group.d.ts +4 -4
- package/dist/ui/toggle.d.cts +1 -1
- package/dist/ui/toggle.d.ts +1 -1
- package/dist/ui/tooltip.d.ts +1 -1
- package/package.json +1 -1
- package/dist/label-DG2t1Ucl.d.ts +0 -11
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as class_variance_authority_types12 from "class-variance-authority/types";
|
|
1
|
+
import * as react_jsx_runtime51 from "react/jsx-runtime";
|
|
3
2
|
import { VariantProps } from "class-variance-authority";
|
|
3
|
+
import * as class_variance_authority_types10 from "class-variance-authority/types";
|
|
4
4
|
|
|
5
5
|
//#region packages/components/ui/button-variants.d.ts
|
|
6
6
|
/**
|
|
@@ -10,7 +10,7 @@ declare const buttonVariants: (props?: ({
|
|
|
10
10
|
variant?: "default" | "outline" | "link" | "ghost" | null | undefined;
|
|
11
11
|
color?: "muted" | "primary" | "secondary" | "success" | "important" | "info" | "warning" | "danger" | null | undefined;
|
|
12
12
|
size?: "sm" | "lg" | "default" | "icon" | null | undefined;
|
|
13
|
-
} &
|
|
13
|
+
} & class_variance_authority_types10.ClassProp) | undefined) => string;
|
|
14
14
|
type ButtonVariantProps = VariantProps<typeof buttonVariants>;
|
|
15
15
|
//#endregion
|
|
16
16
|
//#region packages/components/ui/button.d.ts
|
|
@@ -50,7 +50,7 @@ declare function Button({
|
|
|
50
50
|
disabled,
|
|
51
51
|
type,
|
|
52
52
|
...props
|
|
53
|
-
}: ButtonProps):
|
|
53
|
+
}: ButtonProps): react_jsx_runtime51.JSX.Element;
|
|
54
54
|
//#endregion
|
|
55
55
|
export { Button, ButtonProps };
|
|
56
|
-
//# sourceMappingURL=button-
|
|
56
|
+
//# sourceMappingURL=button-B9iPyKOi.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime41 from "react/jsx-runtime";
|
|
2
|
+
import * as class_variance_authority_types13 from "class-variance-authority/types";
|
|
2
3
|
import { VariantProps } from "class-variance-authority";
|
|
3
|
-
import * as class_variance_authority_types12 from "class-variance-authority/types";
|
|
4
4
|
|
|
5
5
|
//#region packages/components/ui/button-variants.d.ts
|
|
6
6
|
/**
|
|
@@ -10,7 +10,7 @@ declare const buttonVariants: (props?: ({
|
|
|
10
10
|
variant?: "default" | "outline" | "link" | "ghost" | null | undefined;
|
|
11
11
|
color?: "muted" | "primary" | "secondary" | "success" | "important" | "info" | "warning" | "danger" | null | undefined;
|
|
12
12
|
size?: "sm" | "lg" | "default" | "icon" | null | undefined;
|
|
13
|
-
} &
|
|
13
|
+
} & class_variance_authority_types13.ClassProp) | undefined) => string;
|
|
14
14
|
type ButtonVariantProps = VariantProps<typeof buttonVariants>;
|
|
15
15
|
//#endregion
|
|
16
16
|
//#region packages/components/ui/button.d.ts
|
|
@@ -53,4 +53,4 @@ declare function Button({
|
|
|
53
53
|
}: ButtonProps): react_jsx_runtime41.JSX.Element;
|
|
54
54
|
//#endregion
|
|
55
55
|
export { Button, ButtonProps };
|
|
56
|
-
//# sourceMappingURL=button-
|
|
56
|
+
//# sourceMappingURL=button-BCupEAtU.d.cts.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { Dialog } from "./dialog-
|
|
2
|
-
import * as
|
|
1
|
+
import { Dialog } from "./dialog-CPq4R2AI.cjs";
|
|
2
|
+
import * as react_jsx_runtime94 from "react/jsx-runtime";
|
|
3
3
|
import { Command } from "cmdk";
|
|
4
4
|
|
|
5
5
|
//#region packages/components/ui/command.d.ts
|
|
6
6
|
declare function Command$1({
|
|
7
7
|
className,
|
|
8
8
|
...props
|
|
9
|
-
}: React.ComponentProps<typeof Command>):
|
|
9
|
+
}: React.ComponentProps<typeof Command>): react_jsx_runtime94.JSX.Element;
|
|
10
10
|
declare function CommandDialog({
|
|
11
11
|
title,
|
|
12
12
|
description,
|
|
@@ -19,34 +19,34 @@ declare function CommandDialog({
|
|
|
19
19
|
description?: string;
|
|
20
20
|
className?: string;
|
|
21
21
|
showCloseButton?: boolean;
|
|
22
|
-
}):
|
|
22
|
+
}): react_jsx_runtime94.JSX.Element;
|
|
23
23
|
declare function CommandInput({
|
|
24
24
|
className,
|
|
25
25
|
...props
|
|
26
|
-
}: React.ComponentProps<typeof Command.Input>):
|
|
26
|
+
}: React.ComponentProps<typeof Command.Input>): react_jsx_runtime94.JSX.Element;
|
|
27
27
|
declare function CommandList({
|
|
28
28
|
className,
|
|
29
29
|
...props
|
|
30
|
-
}: React.ComponentProps<typeof Command.List>):
|
|
30
|
+
}: React.ComponentProps<typeof Command.List>): react_jsx_runtime94.JSX.Element;
|
|
31
31
|
declare function CommandEmpty({
|
|
32
32
|
...props
|
|
33
|
-
}: React.ComponentProps<typeof Command.Empty>):
|
|
33
|
+
}: React.ComponentProps<typeof Command.Empty>): react_jsx_runtime94.JSX.Element;
|
|
34
34
|
declare function CommandGroup({
|
|
35
35
|
className,
|
|
36
36
|
...props
|
|
37
|
-
}: React.ComponentProps<typeof Command.Group>):
|
|
37
|
+
}: React.ComponentProps<typeof Command.Group>): react_jsx_runtime94.JSX.Element;
|
|
38
38
|
declare function CommandSeparator({
|
|
39
39
|
className,
|
|
40
40
|
...props
|
|
41
|
-
}: React.ComponentProps<typeof Command.Separator>):
|
|
41
|
+
}: React.ComponentProps<typeof Command.Separator>): react_jsx_runtime94.JSX.Element;
|
|
42
42
|
declare function CommandItem({
|
|
43
43
|
className,
|
|
44
44
|
...props
|
|
45
|
-
}: React.ComponentProps<typeof Command.Item>):
|
|
45
|
+
}: React.ComponentProps<typeof Command.Item>): react_jsx_runtime94.JSX.Element;
|
|
46
46
|
declare function CommandShortcut({
|
|
47
47
|
className,
|
|
48
48
|
...props
|
|
49
|
-
}: React.ComponentProps<'span'>):
|
|
49
|
+
}: React.ComponentProps<'span'>): react_jsx_runtime94.JSX.Element;
|
|
50
50
|
//#endregion
|
|
51
51
|
export { Command$1 as Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut };
|
|
52
|
-
//# sourceMappingURL=command-
|
|
52
|
+
//# sourceMappingURL=command-BbuQojPT.d.cts.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Dialog } from "./dialog-ghUnYeay.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime62 from "react/jsx-runtime";
|
|
3
3
|
import { Command } from "cmdk";
|
|
4
4
|
|
|
5
5
|
//#region packages/components/ui/command.d.ts
|
|
6
6
|
declare function Command$1({
|
|
7
7
|
className,
|
|
8
8
|
...props
|
|
9
|
-
}: React.ComponentProps<typeof Command>):
|
|
9
|
+
}: React.ComponentProps<typeof Command>): react_jsx_runtime62.JSX.Element;
|
|
10
10
|
declare function CommandDialog({
|
|
11
11
|
title,
|
|
12
12
|
description,
|
|
@@ -19,34 +19,34 @@ declare function CommandDialog({
|
|
|
19
19
|
description?: string;
|
|
20
20
|
className?: string;
|
|
21
21
|
showCloseButton?: boolean;
|
|
22
|
-
}):
|
|
22
|
+
}): react_jsx_runtime62.JSX.Element;
|
|
23
23
|
declare function CommandInput({
|
|
24
24
|
className,
|
|
25
25
|
...props
|
|
26
|
-
}: React.ComponentProps<typeof Command.Input>):
|
|
26
|
+
}: React.ComponentProps<typeof Command.Input>): react_jsx_runtime62.JSX.Element;
|
|
27
27
|
declare function CommandList({
|
|
28
28
|
className,
|
|
29
29
|
...props
|
|
30
|
-
}: React.ComponentProps<typeof Command.List>):
|
|
30
|
+
}: React.ComponentProps<typeof Command.List>): react_jsx_runtime62.JSX.Element;
|
|
31
31
|
declare function CommandEmpty({
|
|
32
32
|
...props
|
|
33
|
-
}: React.ComponentProps<typeof Command.Empty>):
|
|
33
|
+
}: React.ComponentProps<typeof Command.Empty>): react_jsx_runtime62.JSX.Element;
|
|
34
34
|
declare function CommandGroup({
|
|
35
35
|
className,
|
|
36
36
|
...props
|
|
37
|
-
}: React.ComponentProps<typeof Command.Group>):
|
|
37
|
+
}: React.ComponentProps<typeof Command.Group>): react_jsx_runtime62.JSX.Element;
|
|
38
38
|
declare function CommandSeparator({
|
|
39
39
|
className,
|
|
40
40
|
...props
|
|
41
|
-
}: React.ComponentProps<typeof Command.Separator>):
|
|
41
|
+
}: React.ComponentProps<typeof Command.Separator>): react_jsx_runtime62.JSX.Element;
|
|
42
42
|
declare function CommandItem({
|
|
43
43
|
className,
|
|
44
44
|
...props
|
|
45
|
-
}: React.ComponentProps<typeof Command.Item>):
|
|
45
|
+
}: React.ComponentProps<typeof Command.Item>): react_jsx_runtime62.JSX.Element;
|
|
46
46
|
declare function CommandShortcut({
|
|
47
47
|
className,
|
|
48
48
|
...props
|
|
49
|
-
}: React.ComponentProps<'span'>):
|
|
49
|
+
}: React.ComponentProps<'span'>): react_jsx_runtime62.JSX.Element;
|
|
50
50
|
//#endregion
|
|
51
51
|
export { Command$1 as Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut };
|
|
52
|
-
//# sourceMappingURL=command-
|
|
52
|
+
//# sourceMappingURL=command-DdmKJu8K.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime1 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_runtime1.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_runtime0 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_runtime0.JSX.Element;
|
|
5
5
|
//#endregion
|
|
6
6
|
export { EmptyDisplay };
|
|
7
7
|
//# sourceMappingURL=empty.d.ts.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,5 +1,5 @@
|
|
|
1
1
|
import * as react0 from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime1 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region packages/components/data-display/statistic.d.ts
|
|
5
5
|
type Props = {
|
|
@@ -23,7 +23,7 @@ declare const Statistic: react0.MemoExoticComponent<({
|
|
|
23
23
|
showTrailingZeros,
|
|
24
24
|
size,
|
|
25
25
|
value
|
|
26
|
-
}: Props) =>
|
|
26
|
+
}: Props) => react_jsx_runtime1.JSX.Element>;
|
|
27
27
|
//#endregion
|
|
28
28
|
export { Statistic };
|
|
29
29
|
//# sourceMappingURL=statistic.d.ts.map
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime84 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_runtime84.JSX.Element;
|
|
8
8
|
declare function DialogTrigger({
|
|
9
9
|
...props
|
|
10
|
-
}: React.ComponentProps<typeof Dialog.Trigger>):
|
|
10
|
+
}: React.ComponentProps<typeof Dialog.Trigger>): react_jsx_runtime84.JSX.Element;
|
|
11
11
|
declare function DialogPortal({
|
|
12
12
|
...props
|
|
13
|
-
}: React.ComponentProps<typeof Dialog.Portal>):
|
|
13
|
+
}: React.ComponentProps<typeof Dialog.Portal>): react_jsx_runtime84.JSX.Element;
|
|
14
14
|
declare function DialogClose({
|
|
15
15
|
...props
|
|
16
|
-
}: React.ComponentProps<typeof Dialog.Close>):
|
|
16
|
+
}: React.ComponentProps<typeof Dialog.Close>): react_jsx_runtime84.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_runtime84.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_runtime84.JSX.Element;
|
|
29
29
|
declare function DialogHeader({
|
|
30
30
|
className,
|
|
31
31
|
...props
|
|
32
|
-
}: React.ComponentProps<'div'>):
|
|
32
|
+
}: React.ComponentProps<'div'>): react_jsx_runtime84.JSX.Element;
|
|
33
33
|
declare function DialogFooter({
|
|
34
34
|
className,
|
|
35
35
|
...props
|
|
36
|
-
}: React.ComponentProps<'div'>):
|
|
36
|
+
}: React.ComponentProps<'div'>): react_jsx_runtime84.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_runtime84.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_runtime84.JSX.Element;
|
|
45
45
|
//#endregion
|
|
46
46
|
export { Dialog$1 as Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger };
|
|
47
|
-
//# sourceMappingURL=dialog-
|
|
47
|
+
//# sourceMappingURL=dialog-CPq4R2AI.d.cts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Button } from "../../../button-
|
|
2
|
-
import { Input } from "../../../input-
|
|
3
|
-
import { Separator } from "../../../separator-
|
|
1
|
+
import { Button } from "../../../button-BCupEAtU.cjs";
|
|
2
|
+
import { Input } from "../../../input-BOzL2Lc5.cjs";
|
|
3
|
+
import { Separator } from "../../../separator-m1lyeWye.cjs";
|
|
4
4
|
import { TooltipContent } from "../../../tooltip-CSwy3a18.cjs";
|
|
5
5
|
import * as react_jsx_runtime281 from "react/jsx-runtime";
|
|
6
6
|
import * as class_variance_authority_types9 from "class-variance-authority/types";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Button } from "../../../button-
|
|
2
|
-
import { Input } from "../../../input-
|
|
3
|
-
import { Separator } from "../../../separator-
|
|
4
|
-
import { TooltipContent } from "../../../tooltip-
|
|
5
|
-
import * as
|
|
1
|
+
import { Button } from "../../../button-B9iPyKOi.js";
|
|
2
|
+
import { Input } from "../../../input-CUesZuUg.js";
|
|
3
|
+
import { Separator } from "../../../separator-D6kvmLId.js";
|
|
4
|
+
import { TooltipContent } from "../../../tooltip-ygJWURhv.js";
|
|
5
|
+
import * as react_jsx_runtime281 from "react/jsx-runtime";
|
|
6
6
|
import { VariantProps } from "class-variance-authority";
|
|
7
7
|
import * as class_variance_authority_types9 from "class-variance-authority/types";
|
|
8
8
|
|
|
@@ -29,7 +29,7 @@ declare function SidebarProvider({
|
|
|
29
29
|
defaultOpen?: boolean;
|
|
30
30
|
open?: boolean;
|
|
31
31
|
onOpenChange?: (open: boolean) => void;
|
|
32
|
-
}):
|
|
32
|
+
}): react_jsx_runtime281.JSX.Element;
|
|
33
33
|
declare function Sidebar({
|
|
34
34
|
side,
|
|
35
35
|
variant,
|
|
@@ -41,70 +41,70 @@ declare function Sidebar({
|
|
|
41
41
|
side?: 'left' | 'right';
|
|
42
42
|
variant?: 'sidebar' | 'floating' | 'inset';
|
|
43
43
|
collapsible?: 'offcanvas' | 'icon' | 'none';
|
|
44
|
-
}):
|
|
44
|
+
}): react_jsx_runtime281.JSX.Element;
|
|
45
45
|
declare function DetailDialogSidebarTrigger({
|
|
46
46
|
className,
|
|
47
47
|
onClick,
|
|
48
48
|
...props
|
|
49
|
-
}: React.ComponentProps<typeof Button>):
|
|
49
|
+
}: React.ComponentProps<typeof Button>): react_jsx_runtime281.JSX.Element;
|
|
50
50
|
declare function DetailDialogSidebarRail({
|
|
51
51
|
className,
|
|
52
52
|
...props
|
|
53
|
-
}: React.ComponentProps<'button'>):
|
|
53
|
+
}: React.ComponentProps<'button'>): react_jsx_runtime281.JSX.Element;
|
|
54
54
|
declare function SidebarInset({
|
|
55
55
|
className,
|
|
56
56
|
...props
|
|
57
|
-
}: React.ComponentProps<'main'>):
|
|
57
|
+
}: React.ComponentProps<'main'>): react_jsx_runtime281.JSX.Element;
|
|
58
58
|
declare function SidebarInput({
|
|
59
59
|
className,
|
|
60
60
|
...props
|
|
61
|
-
}: React.ComponentProps<typeof Input>):
|
|
61
|
+
}: React.ComponentProps<typeof Input>): react_jsx_runtime281.JSX.Element;
|
|
62
62
|
declare function DetailDialogSidebarHeader({
|
|
63
63
|
className,
|
|
64
64
|
...props
|
|
65
|
-
}: React.ComponentProps<'div'>):
|
|
65
|
+
}: React.ComponentProps<'div'>): react_jsx_runtime281.JSX.Element;
|
|
66
66
|
declare function DetailDialogSidebarFooter({
|
|
67
67
|
className,
|
|
68
68
|
...props
|
|
69
|
-
}: React.ComponentProps<'div'>):
|
|
69
|
+
}: React.ComponentProps<'div'>): react_jsx_runtime281.JSX.Element;
|
|
70
70
|
declare function DetailDialogSidebarSeparator({
|
|
71
71
|
className,
|
|
72
72
|
...props
|
|
73
|
-
}: React.ComponentProps<typeof Separator>):
|
|
73
|
+
}: React.ComponentProps<typeof Separator>): react_jsx_runtime281.JSX.Element;
|
|
74
74
|
declare function DetailDialogSidebarContent({
|
|
75
75
|
className,
|
|
76
76
|
...props
|
|
77
|
-
}: React.ComponentProps<'div'>):
|
|
77
|
+
}: React.ComponentProps<'div'>): react_jsx_runtime281.JSX.Element;
|
|
78
78
|
declare function DetailDialogSidebarGroup({
|
|
79
79
|
className,
|
|
80
80
|
...props
|
|
81
|
-
}: React.ComponentProps<'div'>):
|
|
81
|
+
}: React.ComponentProps<'div'>): react_jsx_runtime281.JSX.Element;
|
|
82
82
|
declare function DetailDialogSidebarGroupLabel({
|
|
83
83
|
className,
|
|
84
84
|
asChild,
|
|
85
85
|
...props
|
|
86
86
|
}: React.ComponentProps<'div'> & {
|
|
87
87
|
asChild?: boolean;
|
|
88
|
-
}):
|
|
88
|
+
}): react_jsx_runtime281.JSX.Element;
|
|
89
89
|
declare function DetailDialogSidebarGroupAction({
|
|
90
90
|
className,
|
|
91
91
|
asChild,
|
|
92
92
|
...props
|
|
93
93
|
}: React.ComponentProps<'button'> & {
|
|
94
94
|
asChild?: boolean;
|
|
95
|
-
}):
|
|
95
|
+
}): react_jsx_runtime281.JSX.Element;
|
|
96
96
|
declare function DetailDialogSidebarGroupContent({
|
|
97
97
|
className,
|
|
98
98
|
...props
|
|
99
|
-
}: React.ComponentProps<'div'>):
|
|
99
|
+
}: React.ComponentProps<'div'>): react_jsx_runtime281.JSX.Element;
|
|
100
100
|
declare function DetailDialogSidebarMenu({
|
|
101
101
|
className,
|
|
102
102
|
...props
|
|
103
|
-
}: React.ComponentProps<'ul'>):
|
|
103
|
+
}: React.ComponentProps<'ul'>): react_jsx_runtime281.JSX.Element;
|
|
104
104
|
declare function DetailDialogSidebarMenuItem({
|
|
105
105
|
className,
|
|
106
106
|
...props
|
|
107
|
-
}: React.ComponentProps<'li'>):
|
|
107
|
+
}: React.ComponentProps<'li'>): react_jsx_runtime281.JSX.Element;
|
|
108
108
|
declare const sidebarMenuButtonVariants: (props?: ({
|
|
109
109
|
variant?: "default" | "outline" | null | undefined;
|
|
110
110
|
size?: "sm" | "lg" | "default" | null | undefined;
|
|
@@ -121,7 +121,7 @@ declare function DetailDialogSidebarMenuButton({
|
|
|
121
121
|
asChild?: boolean;
|
|
122
122
|
isActive?: boolean;
|
|
123
123
|
tooltip?: string | React.ComponentProps<typeof TooltipContent>;
|
|
124
|
-
} & VariantProps<typeof sidebarMenuButtonVariants>):
|
|
124
|
+
} & VariantProps<typeof sidebarMenuButtonVariants>): react_jsx_runtime281.JSX.Element;
|
|
125
125
|
declare function DetailDialogSidebarMenuAction({
|
|
126
126
|
className,
|
|
127
127
|
asChild,
|
|
@@ -130,26 +130,26 @@ declare function DetailDialogSidebarMenuAction({
|
|
|
130
130
|
}: React.ComponentProps<'button'> & {
|
|
131
131
|
asChild?: boolean;
|
|
132
132
|
showOnHover?: boolean;
|
|
133
|
-
}):
|
|
133
|
+
}): react_jsx_runtime281.JSX.Element;
|
|
134
134
|
declare function DetailDialogSidebarMenuBadge({
|
|
135
135
|
className,
|
|
136
136
|
...props
|
|
137
|
-
}: React.ComponentProps<'div'>):
|
|
137
|
+
}: React.ComponentProps<'div'>): react_jsx_runtime281.JSX.Element;
|
|
138
138
|
declare function DetailDialogSidebarMenuSkeleton({
|
|
139
139
|
className,
|
|
140
140
|
showIcon,
|
|
141
141
|
...props
|
|
142
142
|
}: React.ComponentProps<'div'> & {
|
|
143
143
|
showIcon?: boolean;
|
|
144
|
-
}):
|
|
144
|
+
}): react_jsx_runtime281.JSX.Element;
|
|
145
145
|
declare function DetailDialogSidebarMenuSub({
|
|
146
146
|
className,
|
|
147
147
|
...props
|
|
148
|
-
}: React.ComponentProps<'ul'>):
|
|
148
|
+
}: React.ComponentProps<'ul'>): react_jsx_runtime281.JSX.Element;
|
|
149
149
|
declare function DetailDialogSidebarMenuSubItem({
|
|
150
150
|
className,
|
|
151
151
|
...props
|
|
152
|
-
}: React.ComponentProps<'li'>):
|
|
152
|
+
}: React.ComponentProps<'li'>): react_jsx_runtime281.JSX.Element;
|
|
153
153
|
declare function DetailDialogSidebarMenuSubButton({
|
|
154
154
|
asChild,
|
|
155
155
|
size,
|
|
@@ -160,7 +160,7 @@ declare function DetailDialogSidebarMenuSubButton({
|
|
|
160
160
|
asChild?: boolean;
|
|
161
161
|
size?: 'sm' | 'md';
|
|
162
162
|
isActive?: boolean;
|
|
163
|
-
}):
|
|
163
|
+
}): react_jsx_runtime281.JSX.Element;
|
|
164
164
|
//#endregion
|
|
165
165
|
export { DetailDialogSidebarContent, DetailDialogSidebarFooter, DetailDialogSidebarGroup, DetailDialogSidebarGroupAction, DetailDialogSidebarGroupContent, DetailDialogSidebarGroupLabel, DetailDialogSidebarHeader, DetailDialogSidebarMenu, DetailDialogSidebarMenuAction, DetailDialogSidebarMenuBadge, DetailDialogSidebarMenuButton, DetailDialogSidebarMenuItem, DetailDialogSidebarMenuSkeleton, DetailDialogSidebarMenuSub, DetailDialogSidebarMenuSubButton, DetailDialogSidebarMenuSubItem, DetailDialogSidebarRail, DetailDialogSidebarSeparator, DetailDialogSidebarTrigger, Sidebar, SidebarInput, SidebarInset, SidebarProvider, useSidebar };
|
|
166
166
|
//# sourceMappingURL=sidebar.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime2 from "react/jsx-runtime";
|
|
2
2
|
import { FieldValues, FormState, SubmitErrorHandler, UseFormProps } from "react-hook-form";
|
|
3
3
|
|
|
4
4
|
//#region packages/components/dialogs/form-dialog.d.ts
|
|
@@ -30,7 +30,7 @@ declare const FormDialog: <TFieldValues extends FieldValues = FieldValues>({
|
|
|
30
30
|
onError,
|
|
31
31
|
onReset,
|
|
32
32
|
children
|
|
33
|
-
}: React.PropsWithChildren<Props<TFieldValues>>) =>
|
|
33
|
+
}: React.PropsWithChildren<Props<TFieldValues>>) => react_jsx_runtime2.JSX.Element;
|
|
34
34
|
//#endregion
|
|
35
35
|
export { FormDialog };
|
|
36
36
|
//# sourceMappingURL=form-dialog.d.cts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime5 from "react/jsx-runtime";
|
|
2
2
|
import { FieldValues, FormState, SubmitErrorHandler, UseFormProps } from "react-hook-form";
|
|
3
3
|
|
|
4
4
|
//#region packages/components/dialogs/form-dialog.d.ts
|
|
@@ -30,7 +30,7 @@ declare const FormDialog: <TFieldValues extends FieldValues = FieldValues>({
|
|
|
30
30
|
onError,
|
|
31
31
|
onReset,
|
|
32
32
|
children
|
|
33
|
-
}: React.PropsWithChildren<Props<TFieldValues>>) =>
|
|
33
|
+
}: React.PropsWithChildren<Props<TFieldValues>>) => react_jsx_runtime5.JSX.Element;
|
|
34
34
|
//#endregion
|
|
35
35
|
export { FormDialog };
|
|
36
36
|
//# sourceMappingURL=form-dialog.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";const e=require(`../chunk-CUT6urMc.cjs`);require(`../dist-CAevLI5t.cjs`),require(`../button-variants-BHDyMRNh.cjs`);const t=require(`../button-BCahPWI8.cjs`);require(`../label-D6mAvVmw.cjs`),require(`../separator-DMMoR-d2.cjs`);const n=require(`../field-DWOm17T1.cjs`),r=require(`../form-rN5ezSn5.cjs`);require(`../dialog-BBODhbxh.cjs`);const i=require(`../command-C13pL2M3.cjs`),a=require(`../popover-D6vyPDKA.cjs`);let o=require(`lucide-react`);o=e.__toESM(o);let s=require(`@customafk/react-toolkit/utils`);s=e.__toESM(s);let c=require(`react`);c=e.__toESM(c);let l=require(`react/jsx-runtime`);l=e.__toESM(l);const u=({name:e,label:u=`Combobox`,placeholder:d=`Chọn một mục`,description:f,options:p,onAddNewItem:m})=>(0,l.jsx)(r.FormField,{name:e,render:({field:e})=>(0,l.jsxs)(r.FormItem,{className:`w-full`,children:[(0,l.jsx)(c.Activity,{mode:u||f?`visible`:`hidden`,children:(0,l.jsxs)(n.FieldContent,{children:[(0,l.jsx)(r.FormLabel,{children:u}),!!f&&(0,l.jsx)(r.FormDescription,{children:f})]})}),(0,l.jsx)(`div`,{className:`basis-3/5 flex justify-end`,children:(0,l.jsxs)(a.Popover,{modal:!0,children:[(0,l.jsx)(a.PopoverTrigger,{asChild:!0,children:(0,l.jsx)(r.FormControl,{children:(0,l.jsxs)(t.Button,{type:`button`,variant:`outline`,role:`combobox`,color:`muted`,className:(0,s.cn)(`w-full md:max-w-80`,`shadow-input flex justify-between rounded-md px-3`,`outline-border-weak font-normal`,`[&_div]:w-full`,`[&_div]:justify-between`,`hover:outline-border`,`data-[state=open]:text-text-positive-muted`,`data-[state=open]:outline-1`,`data-[state=open]:outline-primary-strong`,`data-[state=open]:ring-primary-weak`,`data-[state=open]:ring-4`,`focus:border-primary-strong`,`focus:ring-4`,`focus:ring-primary-weak`,`focus:outline-1`,`focus:outline-primary-strong`),children:[e.value?(0,l.jsx)(`
|
|
1
|
+
"use client";const e=require(`../chunk-CUT6urMc.cjs`);require(`../dist-CAevLI5t.cjs`),require(`../button-variants-BHDyMRNh.cjs`);const t=require(`../button-BCahPWI8.cjs`);require(`../label-D6mAvVmw.cjs`),require(`../separator-DMMoR-d2.cjs`);const n=require(`../field-DWOm17T1.cjs`),r=require(`../form-rN5ezSn5.cjs`);require(`../dialog-BBODhbxh.cjs`);const i=require(`../command-C13pL2M3.cjs`),a=require(`../popover-D6vyPDKA.cjs`);let o=require(`lucide-react`);o=e.__toESM(o);let s=require(`@customafk/react-toolkit/utils`);s=e.__toESM(s);let c=require(`react`);c=e.__toESM(c);let l=require(`react/jsx-runtime`);l=e.__toESM(l);const u=({name:e,label:u=`Combobox`,placeholder:d=`Chọn một mục`,description:f,options:p,onAddNewItem:m})=>(0,l.jsx)(r.FormField,{name:e,render:({field:e})=>(0,l.jsxs)(r.FormItem,{className:`w-full`,children:[(0,l.jsx)(c.Activity,{mode:u||f?`visible`:`hidden`,children:(0,l.jsxs)(n.FieldContent,{children:[(0,l.jsx)(r.FormLabel,{children:u}),!!f&&(0,l.jsx)(r.FormDescription,{children:f})]})}),(0,l.jsx)(`div`,{className:`basis-3/5 flex justify-end`,children:(0,l.jsxs)(a.Popover,{modal:!0,children:[(0,l.jsx)(a.PopoverTrigger,{asChild:!0,children:(0,l.jsx)(r.FormControl,{children:(0,l.jsxs)(t.Button,{type:`button`,variant:`outline`,role:`combobox`,color:`muted`,className:(0,s.cn)(`w-full md:max-w-80`,`shadow-input flex justify-between rounded-md px-3`,`outline-border-weak font-normal`,`[&_div]:w-full`,`[&_div]:justify-between`,`hover:outline-border`,`data-[state=open]:text-text-positive-muted`,`data-[state=open]:outline-1`,`data-[state=open]:outline-primary-strong`,`data-[state=open]:ring-primary-weak`,`data-[state=open]:ring-4`,`focus:border-primary-strong`,`focus:ring-4`,`focus:ring-primary-weak`,`focus:outline-1`,`focus:outline-primary-strong`),children:[e.value?(0,l.jsx)(`p`,{className:`flex flex-1 min-w-0 items-center gap-2`,children:p?.find(({value:t})=>t===e.value)?.label}):(0,l.jsx)(`p`,{className:`text-text-positive-muted flex-1`,children:d}),(0,l.jsx)(o.ChevronDownIcon,{size:16,className:`text-text-positive-weak shrink-0`,"aria-hidden":`true`})]})})}),(0,l.jsx)(a.PopoverContent,{className:`w-[var(--radix-popover-trigger-width)] p-0`,children:(0,l.jsxs)(i.Command,{className:`border-none`,children:[(0,l.jsx)(i.CommandInput,{placeholder:d??`Tìm kiếm`}),(0,l.jsxs)(i.CommandList,{children:[(0,l.jsx)(i.CommandGroup,{className:`max-h-40 overflow-y-auto`,children:p?.map(({value:t,label:n})=>(0,l.jsx)(i.CommandItem,{value:n,onSelect:()=>e.onChange(t),children:n},t))}),m&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(i.CommandSeparator,{}),(0,l.jsx)(i.CommandGroup,{children:(0,l.jsxs)(t.Button,{type:`button`,variant:`ghost`,className:`w-full justify-start font-normal`,children:[(0,l.jsx)(o.PlusIcon,{size:14,className:`-ms-2 opacity-60`,"aria-hidden":`true`}),`Thêm mới`]})})]})]}),(0,l.jsx)(i.CommandEmpty,{children:`Không có kết quả`})]})})]})})]})});exports.ComboboxField=u;
|
|
2
2
|
//# sourceMappingURL=combobox-field.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"combobox-field.cjs","names":["FormField","FormItem","Activity","FieldContent","FormLabel","FormDescription","Popover","PopoverTrigger","FormControl","Button","ChevronDownIcon","PopoverContent","Command","CommandInput","CommandList","CommandGroup","CommandItem","label","CommandSeparator","PlusIcon","CommandEmpty"],"sources":["../../packages/components/forms/combobox-field.tsx"],"sourcesContent":["'use client';\nimport { Activity } from 'react';\nimport type { FieldPath, FieldValues } from 'react-hook-form';\n\nimport { ChevronDownIcon, PlusIcon } from 'lucide-react';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { Button } from '@/components/ui/button';\nimport { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator } from '@/components/ui/command';\nimport { FormControl, FormDescription, FormField, FormItem, FormLabel } from '@/components/ui/form';\nimport { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover';\nimport { FieldContent } from '../ui/field';\n\ntype Props<TFieldValues extends FieldValues = FieldValues> = {\n name: FieldPath<TFieldValues>;\n label?: string;\n placeholder?: string;\n options?: { value: string | number; label: string }[];\n isShowErrorMsg?: boolean;\n modal?: boolean;\n description?: string;\n onAddNewItem?: () => void;\n};\n\nexport const ComboboxField = <TFieldValues extends FieldValues = FieldValues>({\n name,\n label = 'Combobox',\n placeholder = 'Chọn một mục',\n description,\n options,\n onAddNewItem,\n}: Props<TFieldValues>) => {\n return (\n <FormField\n name={name}\n render={({ field }) => {\n return (\n <FormItem className=\"w-full\">\n <Activity mode={label || description ? 'visible' : 'hidden'}>\n <FieldContent>\n <FormLabel>{label}</FormLabel>\n {!!description && <FormDescription>{description}</FormDescription>}\n </FieldContent>\n </Activity>\n <div className
|
|
1
|
+
{"version":3,"file":"combobox-field.cjs","names":["FormField","FormItem","Activity","FieldContent","FormLabel","FormDescription","Popover","PopoverTrigger","FormControl","Button","ChevronDownIcon","PopoverContent","Command","CommandInput","CommandList","CommandGroup","CommandItem","label","CommandSeparator","PlusIcon","CommandEmpty"],"sources":["../../packages/components/forms/combobox-field.tsx"],"sourcesContent":["'use client';\nimport { Activity } from 'react';\nimport type { FieldPath, FieldValues } from 'react-hook-form';\n\nimport { ChevronDownIcon, PlusIcon } from 'lucide-react';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { Button } from '@/components/ui/button';\nimport { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator } from '@/components/ui/command';\nimport { FormControl, FormDescription, FormField, FormItem, FormLabel } from '@/components/ui/form';\nimport { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover';\nimport { FieldContent } from '../ui/field';\n\ntype Props<TFieldValues extends FieldValues = FieldValues> = {\n name: FieldPath<TFieldValues>;\n label?: string;\n placeholder?: string;\n options?: { value: string | number; label: string }[];\n isShowErrorMsg?: boolean;\n modal?: boolean;\n description?: string;\n onAddNewItem?: () => void;\n};\n\nexport const ComboboxField = <TFieldValues extends FieldValues = FieldValues>({\n name,\n label = 'Combobox',\n placeholder = 'Chọn một mục',\n description,\n options,\n onAddNewItem,\n}: Props<TFieldValues>) => {\n return (\n <FormField\n name={name}\n render={({ field }) => {\n return (\n <FormItem className=\"w-full\">\n <Activity mode={label || description ? 'visible' : 'hidden'}>\n <FieldContent>\n <FormLabel>{label}</FormLabel>\n {!!description && <FormDescription>{description}</FormDescription>}\n </FieldContent>\n </Activity>\n <div className=\"basis-3/5 flex justify-end\">\n <Popover modal={true}>\n <PopoverTrigger asChild>\n <FormControl>\n <Button\n type=\"button\"\n variant=\"outline\"\n role=\"combobox\"\n color=\"muted\"\n className={cn(\n 'w-full md:max-w-80',\n 'shadow-input flex justify-between rounded-md px-3',\n 'outline-border-weak font-normal',\n '[&_div]:w-full',\n '[&_div]:justify-between',\n 'hover:outline-border',\n 'data-[state=open]:text-text-positive-muted',\n 'data-[state=open]:outline-1',\n 'data-[state=open]:outline-primary-strong',\n 'data-[state=open]:ring-primary-weak',\n 'data-[state=open]:ring-4',\n 'focus:border-primary-strong',\n 'focus:ring-4',\n 'focus:ring-primary-weak',\n 'focus:outline-1',\n 'focus:outline-primary-strong'\n )}\n >\n {field.value ? (\n <p className=\"flex flex-1 min-w-0 items-center gap-2\">{options?.find(({ value }) => value === field.value)?.label}</p>\n ) : (\n <p className=\"text-text-positive-muted flex-1\">{placeholder}</p>\n )}\n <ChevronDownIcon size={16} className=\"text-text-positive-weak shrink-0\" aria-hidden=\"true\" />\n </Button>\n </FormControl>\n </PopoverTrigger>\n <PopoverContent className=\"w-[var(--radix-popover-trigger-width)] p-0\">\n <Command className=\"border-none\">\n <CommandInput placeholder={placeholder ?? 'Tìm kiếm'} />\n <CommandList>\n <CommandGroup className=\"max-h-40 overflow-y-auto\">\n {options?.map(({ value, label }) => (\n <CommandItem key={value} value={label} onSelect={() => field.onChange(value)}>\n {label}\n </CommandItem>\n ))}\n </CommandGroup>\n {onAddNewItem && (\n <>\n <CommandSeparator />\n <CommandGroup>\n <Button type=\"button\" variant=\"ghost\" className=\"w-full justify-start font-normal\">\n <PlusIcon size={14} className=\"-ms-2 opacity-60\" aria-hidden=\"true\" />\n Thêm mới\n </Button>\n </CommandGroup>\n </>\n )}\n </CommandList>\n <CommandEmpty>Không có kết quả</CommandEmpty>\n </Command>\n </PopoverContent>\n </Popover>\n </div>\n </FormItem>\n );\n }}\n />\n );\n};\n"],"mappings":"knBAyBA,MAAa,GAAiE,CAC5E,OACA,QAAQ,WACR,cAAc,eACd,cACA,UACA,mBAGE,EAAA,EAAA,KAACA,EAAAA,UAAAA,CACO,OACN,QAAS,CAAE,YAEP,EAAA,EAAA,MAACC,EAAAA,SAAAA,CAAS,UAAU,oBAClB,EAAA,EAAA,KAACC,EAAAA,SAAAA,CAAS,KAAM,GAAS,EAAc,UAAY,mBACjD,EAAA,EAAA,MAACC,EAAAA,aAAAA,CAAAA,SAAAA,EACC,EAAA,EAAA,KAACC,EAAAA,UAAAA,CAAAA,SAAW,EAAA,CAAkB,CAC7B,CAAC,CAAC,IAAe,EAAA,EAAA,KAACC,EAAAA,gBAAAA,CAAAA,SAAiB,EAAA,CAA8B,CAAA,CAAA,CACrD,EACN,EACX,EAAA,EAAA,KAAC,MAAA,CAAI,UAAU,uCACb,EAAA,EAAA,MAACC,EAAAA,QAAAA,CAAQ,MAAO,cACd,EAAA,EAAA,KAACC,EAAAA,eAAAA,CAAe,QAAA,aACd,EAAA,EAAA,KAACC,EAAAA,YAAAA,CAAAA,UACC,EAAA,EAAA,MAACC,EAAAA,OAAAA,CACC,KAAK,SACL,QAAQ,UACR,KAAK,WACL,MAAM,QACN,WAAA,EAAA,EAAA,IACE,qBACA,oDACA,kCACA,iBACA,0BACA,uBACA,6CACA,8BACA,2CACA,sCACA,2BACA,8BACA,eACA,0BACA,kBACA,+BACD,WAEA,EAAM,OACL,EAAA,EAAA,KAAC,IAAA,CAAE,UAAU,kDAA0C,GAAS,MAAM,CAAE,WAAY,IAAU,EAAM,MAAM,EAAE,OAAU,EAEtH,EAAA,EAAA,KAAC,IAAA,CAAE,UAAU,2CAAmC,GAAgB,EAElE,EAAA,EAAA,KAACC,EAAAA,gBAAAA,CAAgB,KAAM,GAAI,UAAU,mCAAmC,cAAY,QAAS,CAAA,EACtF,CAAA,CACG,EACC,EACjB,EAAA,EAAA,KAACC,EAAAA,eAAAA,CAAe,UAAU,uDACxB,EAAA,EAAA,MAACC,EAAAA,QAAAA,CAAQ,UAAU,yBACjB,EAAA,EAAA,KAACC,EAAAA,aAAAA,CAAa,YAAa,GAAe,WAAA,CAAc,EACxD,EAAA,EAAA,MAACC,EAAAA,YAAAA,CAAAA,SAAAA,EACC,EAAA,EAAA,KAACC,EAAAA,aAAAA,CAAa,UAAU,oCACrB,GAAS,KAAK,CAAE,QAAO,MAAA,MACtB,EAAA,EAAA,KAACC,EAAAA,YAAAA,CAAwB,MAAOC,EAAO,aAAgB,EAAM,SAAS,EAAM,UACzEA,GADe,EAEJ,CACd,EACW,CACd,IACC,EAAA,EAAA,MAAA,EAAA,SAAA,CAAA,SAAA,EACE,EAAA,EAAA,KAACC,EAAAA,iBAAAA,EAAAA,CAAmB,EACpB,EAAA,EAAA,KAACH,EAAAA,aAAAA,CAAAA,UACC,EAAA,EAAA,MAACN,EAAAA,OAAAA,CAAO,KAAK,SAAS,QAAQ,QAAQ,UAAU,8CAC9C,EAAA,EAAA,KAACU,EAAAA,SAAAA,CAAS,KAAM,GAAI,UAAU,mBAAmB,cAAY,QAAS,CAAA,WAAA,EAE/D,CAAA,CACI,CAAA,CAAA,CACd,CAAA,CAAA,CAEO,EACd,EAAA,EAAA,KAACC,EAAAA,aAAAA,CAAAA,SAAa,mBAAA,CAA+B,GACrC,EACK,CAAA,EACT,EACN,CAAA,EACG,EAGf"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime6 from "react/jsx-runtime";
|
|
2
2
|
import { FieldPath, FieldValues } from "react-hook-form";
|
|
3
3
|
|
|
4
4
|
//#region packages/components/forms/combobox-field.d.ts
|
|
@@ -22,7 +22,7 @@ declare const ComboboxField: <TFieldValues extends FieldValues = FieldValues>({
|
|
|
22
22
|
description,
|
|
23
23
|
options,
|
|
24
24
|
onAddNewItem
|
|
25
|
-
}: Props<TFieldValues>) =>
|
|
25
|
+
}: Props<TFieldValues>) => react_jsx_runtime6.JSX.Element;
|
|
26
26
|
//#endregion
|
|
27
27
|
export { ComboboxField };
|
|
28
28
|
//# sourceMappingURL=combobox-field.d.cts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime3 from "react/jsx-runtime";
|
|
2
2
|
import { FieldPath, FieldValues } from "react-hook-form";
|
|
3
3
|
|
|
4
4
|
//#region packages/components/forms/combobox-field.d.ts
|
|
@@ -22,7 +22,7 @@ declare const ComboboxField: <TFieldValues extends FieldValues = FieldValues>({
|
|
|
22
22
|
description,
|
|
23
23
|
options,
|
|
24
24
|
onAddNewItem
|
|
25
|
-
}: Props<TFieldValues>) =>
|
|
25
|
+
}: Props<TFieldValues>) => react_jsx_runtime3.JSX.Element;
|
|
26
26
|
//#endregion
|
|
27
27
|
export { ComboboxField };
|
|
28
28
|
//# sourceMappingURL=combobox-field.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import"../dist-BgkALM7U.js";import"../button-variants-aFWCWUvu.js";import{Button as e}from"../button-CriBqo8S.js";import"../label-CdrxlBJ8.js";import"../separator-D17HxS2f.js";import{FieldContent as t}from"../field-GVRRZiSk.js";import{FormControl as n,FormDescription as r,FormField as i,FormItem as a,FormLabel as o}from"../form-De64-oXe.js";import"../dialog-BAlJ18xi.js";import{Command as s,CommandEmpty as c,CommandGroup as l,CommandInput as u,CommandItem as d,CommandList as f,CommandSeparator as p}from"../command-UXLmHGja.js";import{Popover as m,PopoverContent as h,PopoverTrigger as g}from"../popover-BnzoeyDG.js";import{ChevronDownIcon as _,PlusIcon as v}from"lucide-react";import{cn as y}from"@customafk/react-toolkit/utils";import{Activity as b}from"react";import{Fragment as x,jsx as S,jsxs as C}from"react/jsx-runtime";const w=({name:w,label:T=`Combobox`,placeholder:E=`Chọn một mục`,description:D,options:O,onAddNewItem:k})=>S(i,{name:w,render:({field:i})=>C(a,{className:`w-full`,children:[S(b,{mode:T||D?`visible`:`hidden`,children:C(t,{children:[S(o,{children:T}),!!D&&S(r,{children:D})]})}),S(`div`,{className:`basis-3/5 flex justify-end`,children:C(m,{modal:!0,children:[S(g,{asChild:!0,children:S(n,{children:C(e,{type:`button`,variant:`outline`,role:`combobox`,color:`muted`,className:y(`w-full md:max-w-80`,`shadow-input flex justify-between rounded-md px-3`,`outline-border-weak font-normal`,`[&_div]:w-full`,`[&_div]:justify-between`,`hover:outline-border`,`data-[state=open]:text-text-positive-muted`,`data-[state=open]:outline-1`,`data-[state=open]:outline-primary-strong`,`data-[state=open]:ring-primary-weak`,`data-[state=open]:ring-4`,`focus:border-primary-strong`,`focus:ring-4`,`focus:ring-primary-weak`,`focus:outline-1`,`focus:outline-primary-strong`),children:[i.value?S(`
|
|
1
|
+
"use client";import"../dist-BgkALM7U.js";import"../button-variants-aFWCWUvu.js";import{Button as e}from"../button-CriBqo8S.js";import"../label-CdrxlBJ8.js";import"../separator-D17HxS2f.js";import{FieldContent as t}from"../field-GVRRZiSk.js";import{FormControl as n,FormDescription as r,FormField as i,FormItem as a,FormLabel as o}from"../form-De64-oXe.js";import"../dialog-BAlJ18xi.js";import{Command as s,CommandEmpty as c,CommandGroup as l,CommandInput as u,CommandItem as d,CommandList as f,CommandSeparator as p}from"../command-UXLmHGja.js";import{Popover as m,PopoverContent as h,PopoverTrigger as g}from"../popover-BnzoeyDG.js";import{ChevronDownIcon as _,PlusIcon as v}from"lucide-react";import{cn as y}from"@customafk/react-toolkit/utils";import{Activity as b}from"react";import{Fragment as x,jsx as S,jsxs as C}from"react/jsx-runtime";const w=({name:w,label:T=`Combobox`,placeholder:E=`Chọn một mục`,description:D,options:O,onAddNewItem:k})=>S(i,{name:w,render:({field:i})=>C(a,{className:`w-full`,children:[S(b,{mode:T||D?`visible`:`hidden`,children:C(t,{children:[S(o,{children:T}),!!D&&S(r,{children:D})]})}),S(`div`,{className:`basis-3/5 flex justify-end`,children:C(m,{modal:!0,children:[S(g,{asChild:!0,children:S(n,{children:C(e,{type:`button`,variant:`outline`,role:`combobox`,color:`muted`,className:y(`w-full md:max-w-80`,`shadow-input flex justify-between rounded-md px-3`,`outline-border-weak font-normal`,`[&_div]:w-full`,`[&_div]:justify-between`,`hover:outline-border`,`data-[state=open]:text-text-positive-muted`,`data-[state=open]:outline-1`,`data-[state=open]:outline-primary-strong`,`data-[state=open]:ring-primary-weak`,`data-[state=open]:ring-4`,`focus:border-primary-strong`,`focus:ring-4`,`focus:ring-primary-weak`,`focus:outline-1`,`focus:outline-primary-strong`),children:[i.value?S(`p`,{className:`flex flex-1 min-w-0 items-center gap-2`,children:O?.find(({value:e})=>e===i.value)?.label}):S(`p`,{className:`text-text-positive-muted flex-1`,children:E}),S(_,{size:16,className:`text-text-positive-weak shrink-0`,"aria-hidden":`true`})]})})}),S(h,{className:`w-[var(--radix-popover-trigger-width)] p-0`,children:C(s,{className:`border-none`,children:[S(u,{placeholder:E??`Tìm kiếm`}),C(f,{children:[S(l,{className:`max-h-40 overflow-y-auto`,children:O?.map(({value:e,label:t})=>S(d,{value:t,onSelect:()=>i.onChange(e),children:t},e))}),k&&C(x,{children:[S(p,{}),S(l,{children:C(e,{type:`button`,variant:`ghost`,className:`w-full justify-start font-normal`,children:[S(v,{size:14,className:`-ms-2 opacity-60`,"aria-hidden":`true`}),`Thêm mới`]})})]})]}),S(c,{children:`Không có kết quả`})]})})]})})]})});export{w as ComboboxField};
|
|
2
2
|
//# sourceMappingURL=combobox-field.js.map
|