@customafk/lunas-ui 0.0.2-u → 0.0.2-v
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.
|
@@ -5,7 +5,7 @@ import { VariantProps } from 'class-variance-authority';
|
|
|
5
5
|
|
|
6
6
|
declare const buttonVariants: (props?: ({
|
|
7
7
|
variant?: "default" | "secondary" | "outline" | "destructive" | "destructive-secondary" | "destructive-outline" | "sort-outline" | "normal" | null | undefined;
|
|
8
|
-
size?: "
|
|
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> {
|
|
@@ -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>>, "
|
|
29
|
+
}, "key" | "asChild" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "value" | "onChange" | "type"> & {
|
|
30
30
|
value?: string;
|
|
31
31
|
onValueChange?: (search: string) => void;
|
|
32
32
|
} & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -70,7 +70,7 @@ declare const CommandItem: React.ForwardRefExoticComponent<Omit<{
|
|
|
70
70
|
ref?: React.Ref<HTMLDivElement>;
|
|
71
71
|
} & {
|
|
72
72
|
asChild?: boolean;
|
|
73
|
-
}, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>>, "
|
|
73
|
+
}, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>>, "value" | "onSelect" | "disabled"> & {
|
|
74
74
|
disabled?: boolean;
|
|
75
75
|
onSelect?: (value: string) => void;
|
|
76
76
|
value?: string;
|
|
@@ -30,11 +30,13 @@ interface IHeaderProps {
|
|
|
30
30
|
cartInStock?: ReactNode;
|
|
31
31
|
activeUserNav?: 'PROFILE' | 'SECURITY' | 'NOTIFICATION' | 'RESERVATION' | 'ADDRESS' | 'LOGOUT';
|
|
32
32
|
categories: ICategory[];
|
|
33
|
+
cartsAmountTotal?: number;
|
|
33
34
|
className?: string;
|
|
34
35
|
onSignIn?: () => void;
|
|
35
36
|
onSignUp?: () => void;
|
|
36
37
|
onSearch?: (value: string) => void;
|
|
37
38
|
onSettingSelected?: (value: TUserSettingSelect) => void;
|
|
39
|
+
onShowAllProduct?: () => void;
|
|
38
40
|
onCartCheckout?: () => void;
|
|
39
41
|
onCartShowAll?: () => void;
|
|
40
42
|
onCategorySelected?: (slug: string) => void;
|
|
@@ -502,7 +502,7 @@ TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
|
502
502
|
|
|
503
503
|
// packages/Organisms/Header/components/Category.tsx
|
|
504
504
|
import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
505
|
-
var Category = ({ data = [], onClickCategory }) => {
|
|
505
|
+
var Category = ({ data = [], onShowAll, onClickCategory }) => {
|
|
506
506
|
const containerRef = useRef(null);
|
|
507
507
|
const Item2 = useMemo(
|
|
508
508
|
() => ({ name, description, slug, sub }) => {
|
|
@@ -548,11 +548,28 @@ var Category = ({ data = [], onClickCategory }) => {
|
|
|
548
548
|
) })
|
|
549
549
|
] }) }) });
|
|
550
550
|
},
|
|
551
|
-
[]
|
|
551
|
+
[onClickCategory]
|
|
552
552
|
);
|
|
553
553
|
return /* @__PURE__ */ jsxs3(NavigationMenuItem, { children: [
|
|
554
554
|
/* @__PURE__ */ jsx5(NavigationMenuTrigger, { className: "rounded-full", children: "Danh m\u1EE5c" }),
|
|
555
|
-
/* @__PURE__ */ jsx5(NavigationMenuContent, { children: /* @__PURE__ */
|
|
555
|
+
/* @__PURE__ */ jsx5(NavigationMenuContent, { children: /* @__PURE__ */ jsxs3(
|
|
556
|
+
"div",
|
|
557
|
+
{
|
|
558
|
+
ref: containerRef,
|
|
559
|
+
className: "flex max-h-[520px] w-[420px] flex-col gap-y-2 px-3 pb-6 pt-4",
|
|
560
|
+
children: [
|
|
561
|
+
/* @__PURE__ */ jsx5(
|
|
562
|
+
"button",
|
|
563
|
+
{
|
|
564
|
+
className: "w-fit pl-2 text-ui-small-note font-semibold text-ui-text-500 hover:text-ui-text-800",
|
|
565
|
+
onClick: onShowAll,
|
|
566
|
+
children: "Xem t\u1EA5t c\u1EA3 s\u1EA3n ph\u1EA9m"
|
|
567
|
+
}
|
|
568
|
+
),
|
|
569
|
+
/* @__PURE__ */ jsx5(ScrollArea, { className: "h-64 w-full", children: /* @__PURE__ */ jsx5("ul", { className: "relative flex h-full flex-col gap-y-2", children: data.map((item) => /* @__PURE__ */ jsx5(Item2, { ...item }, item.uuid)) }) })
|
|
570
|
+
]
|
|
571
|
+
}
|
|
572
|
+
) })
|
|
556
573
|
] });
|
|
557
574
|
};
|
|
558
575
|
var Category_default = Category;
|
|
@@ -1489,7 +1506,10 @@ var CartSheet = ({
|
|
|
1489
1506
|
/* @__PURE__ */ jsxs9(Flex_default, { vertical: true, pt: "5", height: "full", width: "full", className: "shadow-ui-muli", children: [
|
|
1490
1507
|
/* @__PURE__ */ jsxs9(Flex_default, { px: "6", justify: "between", width: "full", children: [
|
|
1491
1508
|
/* @__PURE__ */ jsx18("p", { className: "text-ui-p font-bold text-ui-text-800", children: "T\u1ED4NG C\u1ED8NG" }),
|
|
1492
|
-
/* @__PURE__ */
|
|
1509
|
+
/* @__PURE__ */ jsxs9("p", { className: "text-ui-p font-extrabold text-ui-primary-500", children: [
|
|
1510
|
+
formattedMoney,
|
|
1511
|
+
" VND"
|
|
1512
|
+
] })
|
|
1493
1513
|
] }),
|
|
1494
1514
|
/* @__PURE__ */ jsxs9(Flex_default, { px: "5", py: "3", gapX: "4", width: "full", className: "*:grow", children: [
|
|
1495
1515
|
/* @__PURE__ */ jsx18(
|
|
@@ -2363,12 +2383,14 @@ var Header = memo9((props) => {
|
|
|
2363
2383
|
categories,
|
|
2364
2384
|
cartOrder,
|
|
2365
2385
|
cartInStock,
|
|
2386
|
+
cartsAmountTotal,
|
|
2366
2387
|
className,
|
|
2367
2388
|
onSignIn,
|
|
2368
2389
|
onSignUp,
|
|
2369
2390
|
onSettingSelected,
|
|
2370
2391
|
onCartCheckout,
|
|
2371
2392
|
onCartShowAll,
|
|
2393
|
+
onShowAllProduct,
|
|
2372
2394
|
onCategorySelected
|
|
2373
2395
|
} = props;
|
|
2374
2396
|
return /* @__PURE__ */ jsxs17(
|
|
@@ -2381,7 +2403,14 @@ var Header = memo9((props) => {
|
|
|
2381
2403
|
children: [
|
|
2382
2404
|
/* @__PURE__ */ jsx32(Flex_default, { className: "grow-0", pb: "1", justify: "center", pr: "9", children: /* @__PURE__ */ jsx32(SmallLogoIcon_default, {}) }),
|
|
2383
2405
|
/* @__PURE__ */ jsx32(Flex_default, { className: "grow", children: /* @__PURE__ */ jsx32(NavigationMenu, { children: /* @__PURE__ */ jsxs17(NavigationMenuList, { children: [
|
|
2384
|
-
/* @__PURE__ */ jsx32(
|
|
2406
|
+
/* @__PURE__ */ jsx32(
|
|
2407
|
+
Category_default,
|
|
2408
|
+
{
|
|
2409
|
+
data: categories,
|
|
2410
|
+
onShowAll: onShowAllProduct,
|
|
2411
|
+
onClickCategory: onCategorySelected
|
|
2412
|
+
}
|
|
2413
|
+
),
|
|
2385
2414
|
/* @__PURE__ */ jsx32(Series_default, {}),
|
|
2386
2415
|
/* @__PURE__ */ jsx32(
|
|
2387
2416
|
NavigationMenuItem,
|
|
@@ -2444,6 +2473,7 @@ var Header = memo9((props) => {
|
|
|
2444
2473
|
isNew: hasNewCart,
|
|
2445
2474
|
order: cartOrder,
|
|
2446
2475
|
inStock: cartInStock,
|
|
2476
|
+
moneyTotal: cartsAmountTotal,
|
|
2447
2477
|
onCheckout: onCartCheckout,
|
|
2448
2478
|
onShowAll: onCartShowAll
|
|
2449
2479
|
}
|
package/package.json
CHANGED