@customafk/lunas-ui 0.0.2-w → 0.0.2-y
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/Atoms/Button/index.d.ts +2 -2
- package/dist/Atoms/Command/index.d.ts +7 -7
- package/dist/Atoms/Dialog/index.d.ts +9 -9
- package/dist/Atoms/Sheet/index.d.ts +10 -10
- package/dist/Atoms/UserAvatar/index.js +2 -2
- package/dist/Icons/index.d.ts +1 -1
- package/dist/Molecules/UserDropdown/index.js +2 -2
- package/dist/Organisms/Header/index.d.ts +2 -1
- package/dist/Organisms/Header/index.js +10 -7
- package/dist/{types-BgHhiNa-.d.ts → types-BlE003QY.d.ts} +1 -1
- package/package.json +1 -1
|
@@ -4,8 +4,8 @@ import * as class_variance_authority_dist_types from 'class-variance-authority/d
|
|
|
4
4
|
import { VariantProps } from 'class-variance-authority';
|
|
5
5
|
|
|
6
6
|
declare const buttonVariants: (props?: ({
|
|
7
|
-
variant?: "
|
|
8
|
-
size?: "
|
|
7
|
+
variant?: "default" | "secondary" | "outline" | "destructive" | "destructive-secondary" | "destructive-outline" | "sort-outline" | "normal" | null | undefined;
|
|
8
|
+
size?: "base" | "small" | "default" | "large" | null | undefined;
|
|
9
9
|
} & class_variance_authority_dist_types.ClassProp) | undefined) => string;
|
|
10
10
|
|
|
11
11
|
interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
@@ -8,7 +8,7 @@ declare const Command: React.ForwardRefExoticComponent<Omit<{
|
|
|
8
8
|
ref?: React.Ref<HTMLDivElement>;
|
|
9
9
|
} & {
|
|
10
10
|
asChild?: boolean;
|
|
11
|
-
}, "key" |
|
|
11
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
|
|
12
12
|
label?: string;
|
|
13
13
|
shouldFilter?: boolean;
|
|
14
14
|
filter?: (value: string, search: string, keywords?: string[]) => number;
|
|
@@ -26,7 +26,7 @@ declare const CommandInput: React.ForwardRefExoticComponent<Omit<Omit<Pick<Pick<
|
|
|
26
26
|
ref?: React.Ref<HTMLInputElement>;
|
|
27
27
|
} & {
|
|
28
28
|
asChild?: boolean;
|
|
29
|
-
}, "key" | "asChild" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "onChange" | "
|
|
29
|
+
}, "key" | "asChild" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "onChange" | "type" | "value"> & {
|
|
30
30
|
value?: string;
|
|
31
31
|
onValueChange?: (search: string) => void;
|
|
32
32
|
} & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -36,7 +36,7 @@ declare const CommandList: React.ForwardRefExoticComponent<Omit<{
|
|
|
36
36
|
ref?: React.Ref<HTMLDivElement>;
|
|
37
37
|
} & {
|
|
38
38
|
asChild?: boolean;
|
|
39
|
-
}, "key" |
|
|
39
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
|
|
40
40
|
label?: string;
|
|
41
41
|
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
42
42
|
declare const CommandEmpty: React.ForwardRefExoticComponent<Omit<{
|
|
@@ -45,14 +45,14 @@ declare const CommandEmpty: React.ForwardRefExoticComponent<Omit<{
|
|
|
45
45
|
ref?: React.Ref<HTMLDivElement>;
|
|
46
46
|
} & {
|
|
47
47
|
asChild?: boolean;
|
|
48
|
-
}, "key" |
|
|
48
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
49
49
|
declare const CommandGroup: React.ForwardRefExoticComponent<Omit<{
|
|
50
50
|
children?: React.ReactNode;
|
|
51
51
|
} & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
52
52
|
ref?: React.Ref<HTMLDivElement>;
|
|
53
53
|
} & {
|
|
54
54
|
asChild?: boolean;
|
|
55
|
-
}, "key" |
|
|
55
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild">, "value" | "heading"> & {
|
|
56
56
|
heading?: React.ReactNode;
|
|
57
57
|
value?: string;
|
|
58
58
|
forceMount?: boolean;
|
|
@@ -61,7 +61,7 @@ declare const CommandSeparator: React.ForwardRefExoticComponent<Omit<Pick<Pick<R
|
|
|
61
61
|
ref?: React.Ref<HTMLDivElement>;
|
|
62
62
|
} & {
|
|
63
63
|
asChild?: boolean;
|
|
64
|
-
}, "key" |
|
|
64
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
|
|
65
65
|
alwaysRender?: boolean;
|
|
66
66
|
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
67
67
|
declare const CommandItem: React.ForwardRefExoticComponent<Omit<{
|
|
@@ -70,7 +70,7 @@ declare const CommandItem: React.ForwardRefExoticComponent<Omit<{
|
|
|
70
70
|
ref?: React.Ref<HTMLDivElement>;
|
|
71
71
|
} & {
|
|
72
72
|
asChild?: boolean;
|
|
73
|
-
}, "key" |
|
|
73
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild">, "onSelect" | "disabled" | "value"> & {
|
|
74
74
|
disabled?: boolean;
|
|
75
75
|
onSelect?: (value: string) => void;
|
|
76
76
|
value?: string;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import * as
|
|
3
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
4
4
|
|
|
5
|
-
declare const Dialog: React.FC<
|
|
6
|
-
declare const DialogTrigger: React.ForwardRefExoticComponent<
|
|
7
|
-
declare const DialogPortal: React.FC<
|
|
8
|
-
declare const DialogClose: React.ForwardRefExoticComponent<
|
|
9
|
-
declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<
|
|
10
|
-
declare const DialogContent: React.ForwardRefExoticComponent<Omit<
|
|
5
|
+
declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
|
|
6
|
+
declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
7
|
+
declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
|
|
8
|
+
declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
9
|
+
declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
11
11
|
declare const DialogHeader: {
|
|
12
12
|
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
13
13
|
displayName: string;
|
|
@@ -16,7 +16,7 @@ declare const DialogFooter: {
|
|
|
16
16
|
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
17
17
|
displayName: string;
|
|
18
18
|
};
|
|
19
|
-
declare const DialogTitle: React.ForwardRefExoticComponent<Omit<
|
|
20
|
-
declare const DialogDescription: React.ForwardRefExoticComponent<Omit<
|
|
19
|
+
declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
20
|
+
declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
21
21
|
|
|
22
22
|
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger };
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as class_variance_authority_dist_types from 'class-variance-authority/dist/types';
|
|
3
3
|
import React__default, { ComponentPropsWithoutRef } from 'react';
|
|
4
|
-
import * as
|
|
4
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
5
5
|
import { VariantProps } from 'class-variance-authority';
|
|
6
6
|
|
|
7
|
-
declare const Sheet: React__default.FC<
|
|
8
|
-
declare const SheetTrigger: React__default.ForwardRefExoticComponent<
|
|
9
|
-
declare const SheetClose: React__default.ForwardRefExoticComponent<
|
|
10
|
-
declare const SheetPortal: React__default.FC<
|
|
11
|
-
declare const SheetOverlay: React__default.ForwardRefExoticComponent<Omit<
|
|
7
|
+
declare const Sheet: React__default.FC<DialogPrimitive.DialogProps>;
|
|
8
|
+
declare const SheetTrigger: React__default.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React__default.RefAttributes<HTMLButtonElement>>;
|
|
9
|
+
declare const SheetClose: React__default.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React__default.RefAttributes<HTMLButtonElement>>;
|
|
10
|
+
declare const SheetPortal: React__default.FC<DialogPrimitive.DialogPortalProps>;
|
|
11
|
+
declare const SheetOverlay: React__default.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React__default.RefAttributes<HTMLDivElement>, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
|
|
12
12
|
declare const sheetVariants: (props?: ({
|
|
13
|
-
side?: "top" | "
|
|
13
|
+
side?: "top" | "bottom" | "left" | "right" | null | undefined;
|
|
14
14
|
} & class_variance_authority_dist_types.ClassProp) | undefined) => string;
|
|
15
|
-
interface SheetContentProps extends ComponentPropsWithoutRef<typeof
|
|
15
|
+
interface SheetContentProps extends ComponentPropsWithoutRef<typeof DialogPrimitive.Content>, VariantProps<typeof sheetVariants> {
|
|
16
16
|
}
|
|
17
17
|
declare const SheetContent: React__default.ForwardRefExoticComponent<SheetContentProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
18
18
|
declare const SheetHeader: {
|
|
@@ -23,7 +23,7 @@ declare const SheetFooter: {
|
|
|
23
23
|
({ className, ...props }: React__default.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
24
24
|
displayName: string;
|
|
25
25
|
};
|
|
26
|
-
declare const SheetTitle: React__default.ForwardRefExoticComponent<Omit<
|
|
27
|
-
declare const SheetDescription: React__default.ForwardRefExoticComponent<Omit<
|
|
26
|
+
declare const SheetTitle: React__default.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React__default.RefAttributes<HTMLHeadingElement>, "ref"> & React__default.RefAttributes<HTMLHeadingElement>>;
|
|
27
|
+
declare const SheetDescription: React__default.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React__default.RefAttributes<HTMLParagraphElement>, "ref"> & React__default.RefAttributes<HTMLParagraphElement>>;
|
|
28
28
|
|
|
29
29
|
export { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger };
|
|
@@ -444,7 +444,7 @@ var UserAvatar = memo(({ fullname, email, src: source, size, isButton = true })
|
|
|
444
444
|
"enabled:hover:shadow-ui-flat",
|
|
445
445
|
"enabled:hover:scale-110"
|
|
446
446
|
),
|
|
447
|
-
children: source ? /* @__PURE__ */ jsx2(
|
|
447
|
+
children: source ? /* @__PURE__ */ jsx2(AvatarIcon_default, { bgColor: color_hash_default.hex(fullname + email), size }) : /* @__PURE__ */ jsx2(
|
|
448
448
|
"img",
|
|
449
449
|
{
|
|
450
450
|
style: { width: size, height: size },
|
|
@@ -452,7 +452,7 @@ var UserAvatar = memo(({ fullname, email, src: source, size, isButton = true })
|
|
|
452
452
|
src: source,
|
|
453
453
|
alt: fullname
|
|
454
454
|
}
|
|
455
|
-
)
|
|
455
|
+
)
|
|
456
456
|
}
|
|
457
457
|
);
|
|
458
458
|
});
|
package/dist/Icons/index.d.ts
CHANGED
|
@@ -607,7 +607,7 @@ var UserAvatar = memo2(({ fullname, email, src: source, size, isButton = true })
|
|
|
607
607
|
"enabled:hover:shadow-ui-flat",
|
|
608
608
|
"enabled:hover:scale-110"
|
|
609
609
|
),
|
|
610
|
-
children: source ? /* @__PURE__ */ jsx5(
|
|
610
|
+
children: source ? /* @__PURE__ */ jsx5(AvatarIcon_default, { bgColor: color_hash_default.hex(fullname + email), size }) : /* @__PURE__ */ jsx5(
|
|
611
611
|
"img",
|
|
612
612
|
{
|
|
613
613
|
style: { width: size, height: size },
|
|
@@ -615,7 +615,7 @@ var UserAvatar = memo2(({ fullname, email, src: source, size, isButton = true })
|
|
|
615
615
|
src: source,
|
|
616
616
|
alt: fullname
|
|
617
617
|
}
|
|
618
|
-
)
|
|
618
|
+
)
|
|
619
619
|
}
|
|
620
620
|
);
|
|
621
621
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode, FC } from 'react';
|
|
2
|
-
import { T as TUser, a as TUserSettingSelect } from '../../types-
|
|
2
|
+
import { T as TUser, a as TUserSettingSelect } from '../../types-BlE003QY.js';
|
|
3
3
|
|
|
4
4
|
interface ICategory {
|
|
5
5
|
uuid: string;
|
|
@@ -39,6 +39,7 @@ interface IHeaderProps {
|
|
|
39
39
|
onShowAllProduct?: () => void;
|
|
40
40
|
onCartCheckout?: () => void;
|
|
41
41
|
onCartShowAll?: () => void;
|
|
42
|
+
onCartTypeSelected?: (value: 'ORDER' | 'IN_STOCK') => void;
|
|
42
43
|
onCategorySelected?: (slug: string) => void;
|
|
43
44
|
}
|
|
44
45
|
declare const Header: FC<IHeaderProps>;
|
|
@@ -1467,7 +1467,8 @@ var CartSheet = ({
|
|
|
1467
1467
|
inStock,
|
|
1468
1468
|
order,
|
|
1469
1469
|
onCheckout,
|
|
1470
|
-
onShowAll
|
|
1470
|
+
onShowAll,
|
|
1471
|
+
onTypeSelected
|
|
1471
1472
|
}) => {
|
|
1472
1473
|
const formattedMoney = new Intl.NumberFormat("vi-VN").format(moneyTotal ?? 0);
|
|
1473
1474
|
const formattedQuantity = new Intl.NumberFormat("vi-VN").format(quantityTotal ?? 0);
|
|
@@ -1489,8 +1490,8 @@ var CartSheet = ({
|
|
|
1489
1490
|
className: "relative flex w-full flex-col items-center overflow-auto",
|
|
1490
1491
|
children: [
|
|
1491
1492
|
/* @__PURE__ */ jsxs9(TabsList, { className: "h-fit w-[90%] *:w-1/2", children: [
|
|
1492
|
-
/* @__PURE__ */ jsx18(TabsTrigger, { value: "order", children: "H\xE0ng \u0111\u1EB7t tr\u01B0\u1EDBc" }),
|
|
1493
|
-
/* @__PURE__ */ jsx18(TabsTrigger, { value: "in_stock", children: "H\xE0ng c\xF3 s\u1EB5n" })
|
|
1493
|
+
/* @__PURE__ */ jsx18(TabsTrigger, { value: "order", onClick: () => onTypeSelected?.("ORDER"), children: "H\xE0ng \u0111\u1EB7t tr\u01B0\u1EDBc" }),
|
|
1494
|
+
/* @__PURE__ */ jsx18(TabsTrigger, { value: "in_stock", onClick: () => onTypeSelected?.("IN_STOCK"), children: "H\xE0ng c\xF3 s\u1EB5n" })
|
|
1494
1495
|
] }),
|
|
1495
1496
|
/* @__PURE__ */ jsxs9(ScrollArea, { className: "relative w-full", children: [
|
|
1496
1497
|
/* @__PURE__ */ jsx18(TabsContent, { value: "order", className: "w-full overflow-auto px-2", children: order }),
|
|
@@ -2061,7 +2062,7 @@ var UserAvatar = memo7(({ fullname, email, src: source, size, isButton = true })
|
|
|
2061
2062
|
"enabled:hover:shadow-ui-flat",
|
|
2062
2063
|
"enabled:hover:scale-110"
|
|
2063
2064
|
),
|
|
2064
|
-
children: source ? /* @__PURE__ */ jsx24(
|
|
2065
|
+
children: source ? /* @__PURE__ */ jsx24(AvatarIcon_default, { bgColor: color_hash_default.hex(fullname + email), size }) : /* @__PURE__ */ jsx24(
|
|
2065
2066
|
"img",
|
|
2066
2067
|
{
|
|
2067
2068
|
style: { width: size, height: size },
|
|
@@ -2069,7 +2070,7 @@ var UserAvatar = memo7(({ fullname, email, src: source, size, isButton = true })
|
|
|
2069
2070
|
src: source,
|
|
2070
2071
|
alt: fullname
|
|
2071
2072
|
}
|
|
2072
|
-
)
|
|
2073
|
+
)
|
|
2073
2074
|
}
|
|
2074
2075
|
);
|
|
2075
2076
|
});
|
|
@@ -2391,6 +2392,7 @@ var Header = memo9((props) => {
|
|
|
2391
2392
|
onCartCheckout,
|
|
2392
2393
|
onCartShowAll,
|
|
2393
2394
|
onShowAllProduct,
|
|
2395
|
+
onCartTypeSelected,
|
|
2394
2396
|
onCategorySelected
|
|
2395
2397
|
} = props;
|
|
2396
2398
|
return /* @__PURE__ */ jsxs17(
|
|
@@ -2444,7 +2446,7 @@ var Header = memo9((props) => {
|
|
|
2444
2446
|
initialActiveItem: activeUserNav,
|
|
2445
2447
|
fullname: user.fullname,
|
|
2446
2448
|
email: user.email,
|
|
2447
|
-
avatar: user.avatar,
|
|
2449
|
+
avatar: user.avatar ?? "",
|
|
2448
2450
|
onSelectItem: onSettingSelected
|
|
2449
2451
|
}
|
|
2450
2452
|
) : /* @__PURE__ */ jsxs17(Fragment3, { children: [
|
|
@@ -2475,7 +2477,8 @@ var Header = memo9((props) => {
|
|
|
2475
2477
|
inStock: cartInStock,
|
|
2476
2478
|
moneyTotal: cartsAmountTotal,
|
|
2477
2479
|
onCheckout: onCartCheckout,
|
|
2478
|
-
onShowAll: onCartShowAll
|
|
2480
|
+
onShowAll: onCartShowAll,
|
|
2481
|
+
onTypeSelected: onCartTypeSelected
|
|
2479
2482
|
}
|
|
2480
2483
|
)
|
|
2481
2484
|
]
|