@instockng/storefront-ui 1.0.74 → 1.0.76
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/components/ProductAddOns.d.ts +3 -1
- package/dist/components/ProductAddOns.d.ts.map +1 -1
- package/dist/components/RecommendedProducts.d.ts.map +1 -1
- package/dist/components/VariantPickerModal.d.ts +28 -0
- package/dist/components/VariantPickerModal.d.ts.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +104 -102
- package/dist/index10.mjs +162 -121
- package/dist/index100.mjs +20 -69
- package/dist/index101.mjs +55 -34
- package/dist/index102.mjs +32 -42
- package/dist/index103.mjs +2 -2
- package/dist/index104.mjs +2 -28
- package/dist/index105.mjs +20 -17
- package/dist/index106.mjs +54 -213
- package/dist/index107.mjs +28 -179
- package/dist/index108.mjs +6 -21
- package/dist/index109.mjs +50 -21
- package/dist/index11.mjs +116 -88
- package/dist/index110.mjs +6 -33
- package/dist/index111.mjs +11 -155
- package/dist/index112.mjs +7 -20
- package/dist/index113.mjs +28 -31
- package/dist/index114.mjs +2 -84
- package/dist/index115.mjs +68 -36
- package/dist/index116.mjs +163 -141
- package/dist/index117.mjs +2 -55
- package/dist/index118.mjs +26 -21
- package/dist/index119.mjs +11 -20
- package/dist/index12.mjs +86 -90
- package/dist/index120.mjs +211 -19
- package/dist/index121.mjs +174 -19
- package/dist/index122.mjs +15 -14
- package/dist/index123.mjs +16 -15
- package/dist/index124.mjs +26 -14
- package/dist/index125.mjs +147 -56
- package/dist/index126.mjs +10 -8
- package/dist/index127.mjs +22 -30
- package/dist/index128.mjs +77 -17
- package/dist/index129.mjs +30 -26
- package/dist/index13.mjs +83 -185
- package/dist/index130.mjs +140 -22
- package/dist/index131.mjs +50 -14
- package/dist/index132.mjs +17 -15
- package/dist/index133.mjs +18 -38
- package/dist/index134.mjs +17 -17
- package/dist/index135.mjs +19 -262
- package/dist/index136.mjs +13 -62
- package/dist/index137.mjs +21 -7
- package/dist/index138.mjs +21 -2
- package/dist/index139.mjs +65 -2
- package/dist/index14.mjs +196 -94
- package/dist/index140.mjs +12 -27
- package/dist/index141.mjs +39 -2
- package/dist/index142.mjs +24 -2
- package/dist/index143.mjs +33 -20
- package/dist/index144.mjs +25 -54
- package/dist/index145.mjs +18 -28
- package/dist/index146.mjs +20 -6
- package/dist/index147.mjs +44 -49
- package/dist/index148.mjs +23 -6
- package/dist/index149.mjs +267 -11
- package/dist/index15.mjs +82 -713
- package/dist/index150.mjs +70 -7
- package/dist/index151.mjs +8 -28
- package/dist/index152.mjs +2 -2
- package/dist/index153.mjs +2 -70
- package/dist/index154.mjs +30 -164
- package/dist/index155.mjs +2 -2
- package/dist/index159.mjs +1 -1
- package/dist/index16.mjs +722 -53
- package/dist/index160.mjs +1 -1
- package/dist/index161.mjs +1 -1
- package/dist/index162.mjs +1 -1
- package/dist/index163.mjs +1 -1
- package/dist/index165.mjs +3 -3
- package/dist/index166.mjs +1 -1
- package/dist/index168.mjs +3 -3
- package/dist/index169.mjs +1 -1
- package/dist/index17.mjs +58 -60
- package/dist/index174.mjs +2 -2
- package/dist/index176.mjs +1 -1
- package/dist/index178.mjs +2 -2
- package/dist/index179.mjs +5 -5
- package/dist/index18.mjs +60 -22
- package/dist/index182.mjs +1 -1
- package/dist/index185.mjs +1 -1
- package/dist/index188.mjs +3 -3
- package/dist/index189.mjs +1 -1
- package/dist/index19.mjs +22 -107
- package/dist/index193.mjs +2 -2
- package/dist/index195.mjs +2 -2
- package/dist/index199.mjs +1 -1
- package/dist/index2.mjs +2 -2
- package/dist/index20.mjs +105 -38
- package/dist/index201.mjs +2 -2
- package/dist/index21.mjs +37 -37
- package/dist/index210.mjs +2 -2
- package/dist/index212.mjs +1 -1
- package/dist/index213.mjs +1 -1
- package/dist/index214.mjs +31 -2
- package/dist/index215.mjs +11 -2
- package/dist/index216.mjs +4 -2
- package/dist/index217.mjs +4 -2
- package/dist/index218.mjs +13 -108
- package/dist/index219.mjs +7 -2
- package/dist/index22.mjs +42 -71
- package/dist/index220.mjs +12 -2
- package/dist/index221.mjs +4 -36
- package/dist/index222.mjs +33 -2
- package/dist/index223.mjs +31 -2
- package/dist/index224.mjs +28 -2
- package/dist/index225.mjs +61 -2
- package/dist/index226.mjs +2 -2
- package/dist/index227.mjs +2 -2
- package/dist/index228.mjs +2 -2
- package/dist/index229.mjs +2 -244
- package/dist/index23.mjs +67 -28
- package/dist/index231.mjs +2 -33
- package/dist/index232.mjs +2 -65
- package/dist/index233.mjs +31 -19
- package/dist/index234.mjs +2 -2
- package/dist/index235.mjs +2 -2
- package/dist/index237.mjs +244 -2
- package/dist/index238.mjs +2 -2
- package/dist/index239.mjs +33 -2
- package/dist/index24.mjs +29 -6
- package/dist/index240.mjs +65 -2
- package/dist/index241.mjs +25 -2
- package/dist/index243.mjs +2 -2
- package/dist/index244.mjs +108 -4
- package/dist/index245.mjs +2 -31
- package/dist/index246.mjs +2 -11
- package/dist/index247.mjs +2 -4
- package/dist/index248.mjs +2 -4
- package/dist/index249.mjs +2 -13
- package/dist/index25.mjs +8 -21
- package/dist/index250.mjs +2 -7
- package/dist/index251.mjs +2 -12
- package/dist/index252.mjs +2 -5
- package/dist/index253.mjs +2 -33
- package/dist/index254.mjs +2 -31
- package/dist/index255.mjs +2 -28
- package/dist/index256.mjs +2 -61
- package/dist/index257.mjs +4 -2
- package/dist/index258.mjs +3 -2
- package/dist/index259.mjs +2 -18
- package/dist/index26.mjs +19 -34
- package/dist/index260.mjs +2 -47
- package/dist/index261.mjs +17 -2
- package/dist/index262.mjs +13 -2
- package/dist/index263.mjs +6 -2
- package/dist/index264.mjs +30 -2
- package/dist/index265.mjs +2 -91
- package/dist/index266.mjs +2 -2
- package/dist/index267.mjs +18 -3
- package/dist/index268.mjs +47 -2
- package/dist/index269.mjs +2 -2
- package/dist/index27.mjs +34 -37
- package/dist/index270.mjs +2 -17
- package/dist/index271.mjs +2 -13
- package/dist/index272.mjs +91 -6
- package/dist/index273.mjs +2 -30
- package/dist/index274.mjs +2 -2
- package/dist/index276.mjs +2 -2
- package/dist/index277.mjs +5 -0
- package/dist/index28.mjs +28 -103
- package/dist/index29.mjs +104 -20
- package/dist/index3.mjs +5 -5
- package/dist/index30.mjs +29 -9
- package/dist/index31.mjs +9 -9
- package/dist/index32.mjs +11 -116
- package/dist/index33.mjs +116 -25
- package/dist/index34.mjs +25 -81
- package/dist/index35.mjs +81 -112
- package/dist/index36.mjs +109 -8
- package/dist/index37.mjs +9 -33
- package/dist/index38.mjs +27 -20
- package/dist/index39.mjs +26 -9
- package/dist/index4.mjs +1 -1
- package/dist/index40.mjs +10 -122
- package/dist/index41.mjs +114 -380
- package/dist/index42.mjs +384 -20
- package/dist/index43.mjs +24 -31
- package/dist/index44.mjs +32 -7
- package/dist/index45.mjs +6 -1432
- package/dist/index46.mjs +1432 -69
- package/dist/index47.mjs +70 -2
- package/dist/index48.mjs +2 -60
- package/dist/index49.mjs +57 -48
- package/dist/index5.mjs +1 -1
- package/dist/index50.mjs +51 -33
- package/dist/index51.mjs +33 -15
- package/dist/index52.mjs +12 -2260
- package/dist/index53.mjs +2263 -36
- package/dist/index54.mjs +36 -44
- package/dist/index55.mjs +44 -99
- package/dist/index56.mjs +99 -81
- package/dist/index57.mjs +75 -13
- package/dist/index58.mjs +15 -125
- package/dist/index59.mjs +93 -89
- package/dist/index6.mjs +1 -1
- package/dist/index60.mjs +102 -56
- package/dist/index61.mjs +55 -89
- package/dist/index62.mjs +82 -76
- package/dist/index63.mjs +100 -13
- package/dist/index64.mjs +17 -92
- package/dist/index65.mjs +70 -56
- package/dist/index66.mjs +62 -44
- package/dist/index67.mjs +47 -46
- package/dist/index68.mjs +48 -121
- package/dist/index69.mjs +133 -22
- package/dist/index7.mjs +6 -6
- package/dist/index70.mjs +24 -2
- package/dist/index71.mjs +2 -153
- package/dist/index72.mjs +4 -22
- package/dist/index73.mjs +22 -4
- package/dist/index74.mjs +149 -71
- package/dist/index75.mjs +74 -14
- package/dist/index76.mjs +14 -62
- package/dist/index77.mjs +63 -2
- package/dist/index78.mjs +234 -5
- package/dist/index79.mjs +5 -1133
- package/dist/index8.mjs +4 -4
- package/dist/index80.mjs +131 -17
- package/dist/index81.mjs +67 -54
- package/dist/index82.mjs +84 -30
- package/dist/index83.mjs +29 -2
- package/dist/index84.mjs +9 -235
- package/dist/index85.mjs +74 -5
- package/dist/index86.mjs +3 -133
- package/dist/index87.mjs +2 -68
- package/dist/index88.mjs +79 -83
- package/dist/index89.mjs +52 -27
- package/dist/index9.mjs +3 -3
- package/dist/index90.mjs +5 -8
- package/dist/index91.mjs +4 -74
- package/dist/index92.mjs +178 -3
- package/dist/index93.mjs +53 -2
- package/dist/index94.mjs +68 -82
- package/dist/index95.mjs +33 -53
- package/dist/index96.mjs +42 -5
- package/dist/index97.mjs +2 -5
- package/dist/index98.mjs +5 -178
- package/dist/index99.mjs +1134 -53
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/src/components/ProductAddOns.stories.tsx +10 -3
- package/src/components/ProductAddOns.tsx +167 -112
- package/src/components/RecommendedProducts.tsx +130 -88
- package/src/components/ShoppingCart.tsx +1 -1
- package/src/components/VariantPickerModal.tsx +154 -0
- package/src/index.ts +3 -0
|
@@ -13,9 +13,11 @@ export interface ProductAddOnsProps {
|
|
|
13
13
|
onToggle?: (product: AddOnProduct, isSelected: boolean) => void;
|
|
14
14
|
/** Manual selection list (list of product IDs) */
|
|
15
15
|
selectedProductIds?: string[];
|
|
16
|
+
/** Callback when product card is clicked (for navigation) */
|
|
17
|
+
onProductClick?: (product: AddOnProduct) => void;
|
|
16
18
|
className?: string;
|
|
17
19
|
title?: string;
|
|
18
20
|
limit?: number;
|
|
19
21
|
}
|
|
20
|
-
export declare function ProductAddOns({ slug, products: manualProducts, onToggle: manualOnToggle, selectedProductIds: manualSelectedIds, className, title, limit, }: ProductAddOnsProps): import("react/jsx-runtime").JSX.Element | null;
|
|
22
|
+
export declare function ProductAddOns({ slug, products: manualProducts, onToggle: manualOnToggle, selectedProductIds: manualSelectedIds, onProductClick, className, title, limit, }: ProductAddOnsProps): import("react/jsx-runtime").JSX.Element | null;
|
|
21
23
|
//# sourceMappingURL=ProductAddOns.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductAddOns.d.ts","sourceRoot":"","sources":["../../src/components/ProductAddOns.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"ProductAddOns.d.ts","sourceRoot":"","sources":["../../src/components/ProductAddOns.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAMnD,MAAM,WAAW,YAAa,SAAQ,kBAAkB;IACpD,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACpC;AAED,MAAM,WAAW,kBAAkB;IAC/B,wCAAwC;IACxC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,oDAAoD;IACpD,QAAQ,CAAC,EAAE,YAAY,EAAE,CAAC;IAC1B,4BAA4B;IAC5B,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,OAAO,KAAK,IAAI,CAAC;IAChE,kDAAkD;IAClD,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC9B,6DAA6D;IAC7D,cAAc,CAAC,EAAE,CAAC,OAAO,EAAE,YAAY,KAAK,IAAI,CAAC;IACjD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,aAAa,CAAC,EAC1B,IAAI,EACJ,QAAQ,EAAE,cAAc,EACxB,QAAQ,EAAE,cAAc,EACxB,kBAAkB,EAAE,iBAAiB,EACrC,cAAc,EACd,SAAS,EACT,KAAyB,EACzB,KAAS,GACZ,EAAE,kBAAkB,kDA2PpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RecommendedProducts.d.ts","sourceRoot":"","sources":["../../src/components/RecommendedProducts.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RecommendedProducts.d.ts","sourceRoot":"","sources":["../../src/components/RecommendedProducts.tsx"],"names":[],"mappings":"AAkBA,MAAM,WAAW,wBAAwB;IACvC,yCAAyC;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,wBAAwB;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,mBAAmB,CAAC,EAClC,KAAK,EACL,SAAS,GACV,EAAE,wBAAwB,kDAsM1B"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface Variant {
|
|
2
|
+
id: string;
|
|
3
|
+
name?: string | null;
|
|
4
|
+
price: number;
|
|
5
|
+
sku: string;
|
|
6
|
+
thumbnailUrl?: string | null;
|
|
7
|
+
}
|
|
8
|
+
export interface VariantPickerProduct {
|
|
9
|
+
id: string;
|
|
10
|
+
name: string;
|
|
11
|
+
slug: string;
|
|
12
|
+
thumbnailUrl?: string | null;
|
|
13
|
+
variants: Variant[];
|
|
14
|
+
}
|
|
15
|
+
export interface VariantPickerModalProps {
|
|
16
|
+
/** Controls modal visibility */
|
|
17
|
+
isOpen: boolean;
|
|
18
|
+
/** Callback when modal should close */
|
|
19
|
+
onClose: () => void;
|
|
20
|
+
/** Product to select variant for */
|
|
21
|
+
product: VariantPickerProduct | null;
|
|
22
|
+
/** Callback when variant is selected and confirmed */
|
|
23
|
+
onConfirm: (product: VariantPickerProduct, variant: Variant) => void;
|
|
24
|
+
/** Whether add operation is in progress */
|
|
25
|
+
isLoading?: boolean;
|
|
26
|
+
}
|
|
27
|
+
export declare function VariantPickerModal({ isOpen, onClose, product, onConfirm, isLoading, }: VariantPickerModalProps): import("react/jsx-runtime").JSX.Element | null;
|
|
28
|
+
//# sourceMappingURL=VariantPickerModal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VariantPickerModal.d.ts","sourceRoot":"","sources":["../../src/components/VariantPickerModal.tsx"],"names":[],"mappings":"AAeA,MAAM,WAAW,OAAO;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC;AAED,MAAM,WAAW,oBAAoB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,QAAQ,EAAE,OAAO,EAAE,CAAC;CACvB;AAED,MAAM,WAAW,uBAAuB;IACpC,gCAAgC;IAChC,MAAM,EAAE,OAAO,CAAC;IAChB,uCAAuC;IACvC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,oCAAoC;IACpC,OAAO,EAAE,oBAAoB,GAAG,IAAI,CAAC;IACrC,sDAAsD;IACtD,SAAS,EAAE,CAAC,OAAO,EAAE,oBAAoB,EAAE,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACrE,2CAA2C;IAC3C,SAAS,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,wBAAgB,kBAAkB,CAAC,EAC/B,MAAM,EACN,OAAO,EACP,OAAO,EACP,SAAS,EACT,SAAiB,GACpB,EAAE,uBAAuB,kDAuGzB"}
|
package/dist/index.d.ts
CHANGED
|
@@ -20,6 +20,8 @@ export { ProductAddOns } from './components/ProductAddOns';
|
|
|
20
20
|
export type { ProductAddOnsProps, AddOnProduct } from './components/ProductAddOns';
|
|
21
21
|
export { RecommendedProducts } from './components/RecommendedProducts';
|
|
22
22
|
export type { RecommendedProductsProps } from './components/RecommendedProducts';
|
|
23
|
+
export { VariantPickerModal } from './components/VariantPickerModal';
|
|
24
|
+
export type { VariantPickerModalProps, VariantPickerProduct, Variant } from './components/VariantPickerModal';
|
|
23
25
|
export { CartItem } from './components/CartItem';
|
|
24
26
|
export type { CartItemProps } from './components/CartItem';
|
|
25
27
|
export { ShoppingCart } from './components/ShoppingCart';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,YAAY,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAG9E,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAG/D,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAChF,YAAY,EAAE,sBAAsB,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAG1F,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAGtF,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAG1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,YAAY,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAE7E,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,YAAY,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAErF,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,YAAY,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAEjE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,YAAY,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAEnF,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,YAAY,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAEjF,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,YAAY,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE3D,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,YAAY,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAEnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,YAAY,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAE7E,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,YAAY,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAG7E,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAC7G,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,YAAY,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,YAAY,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,YAAY,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAGnE,OAAO,EAAE,EAAE,EAAE,cAAc,EAAE,UAAU,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAI7F,cAAc,uBAAuB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,YAAY,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAG9E,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAG/D,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAChF,YAAY,EAAE,sBAAsB,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAG1F,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAGtF,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAG1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,YAAY,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAE7E,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,YAAY,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAErF,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,YAAY,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAEjE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,YAAY,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAEnF,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,YAAY,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAEjF,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,YAAY,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,OAAO,EAAE,MAAM,iCAAiC,CAAC;AAE9G,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,YAAY,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE3D,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,YAAY,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAEnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,YAAY,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAE7E,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,YAAY,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAG7E,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAC7G,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,YAAY,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,YAAY,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,YAAY,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAGnE,OAAO,EAAE,EAAE,EAAE,cAAc,EAAE,UAAU,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAI7F,cAAc,uBAAuB,CAAC"}
|
package/dist/index.mjs
CHANGED
|
@@ -6,121 +6,123 @@ import { TikTokPixelProvider as s, useTikTokPixel as c } from "./index5.mjs";
|
|
|
6
6
|
import { usePageTracking as x } from "./index6.mjs";
|
|
7
7
|
import { OrderConfirmation as P } from "./index7.mjs";
|
|
8
8
|
import { ProductCard as A } from "./index8.mjs";
|
|
9
|
-
import { ProductGrid as
|
|
10
|
-
import { ProductAddOns as
|
|
9
|
+
import { ProductGrid as v } from "./index9.mjs";
|
|
10
|
+
import { ProductAddOns as R } from "./index10.mjs";
|
|
11
11
|
import { RecommendedProducts as D } from "./index11.mjs";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import
|
|
34
|
-
import * as
|
|
35
|
-
import
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
12
|
+
import { VariantPickerModal as g } from "./index12.mjs";
|
|
13
|
+
import { CartItem as B } from "./index13.mjs";
|
|
14
|
+
import { ShoppingCart as S } from "./index14.mjs";
|
|
15
|
+
import { DiscountCodeInput as F } from "./index15.mjs";
|
|
16
|
+
import { Checkout as U } from "./index16.mjs";
|
|
17
|
+
import { Button as b } from "./index17.mjs";
|
|
18
|
+
import { Card as z, CardContent as K, CardDescription as V, CardFooter as $, CardHeader as j, CardTitle as w } from "./index18.mjs";
|
|
19
|
+
import { Badge as J } from "./index19.mjs";
|
|
20
|
+
import { Modal as N } from "./index20.mjs";
|
|
21
|
+
import { FormInput as W } from "./index21.mjs";
|
|
22
|
+
import { FormSelect as Y } from "./index22.mjs";
|
|
23
|
+
import { cn as ee, formatCurrency as re, formatDate as te, formatDateTime as oe, getStatusColor as me } from "./index23.mjs";
|
|
24
|
+
import { ApiClientProvider as ie, useApiClientContext as de } from "./index24.mjs";
|
|
25
|
+
import { useApiConfig as ue } from "./index25.mjs";
|
|
26
|
+
import { getApiClient as fe, initializeApiClient as se, resetApiClient as ce } from "./index26.mjs";
|
|
27
|
+
import { authHeaders as xe, createAdminRpcClients as le, createRpcClients as Pe } from "./index27.mjs";
|
|
28
|
+
import { fetchProductAddons as Ae, fetchProductBySlug as ke, fetchProductRecommendations as ve, fetchProductsByBrand as Ge } from "./index28.mjs";
|
|
29
|
+
import { addCartItem as ye, applyDiscount as De, checkoutCart as Ie, createCart as ge, fetchCart as Oe, fetchCartRecommendations as Be, initiateCheckout as Te, removeCartItem as Se, removeDiscount as Me, updateCart as Fe, updateCartItem as He } from "./index29.mjs";
|
|
30
|
+
import { confirmOrder as Ze, fetchOrder as be, fetchOrderRecommendations as qe } from "./index30.mjs";
|
|
31
|
+
import { fetchDeliveryZones as Ke } from "./index31.mjs";
|
|
32
|
+
import { fetchBrandBySlug as $e } from "./index32.mjs";
|
|
33
|
+
import { queryKeys as we } from "./index33.mjs";
|
|
34
|
+
import * as e from "./index34.mjs";
|
|
35
|
+
import * as r from "./index35.mjs";
|
|
36
|
+
import { useAddCartItem as Je, useApplyDiscount as Le, useCheckoutCart as Ne, useCreateCart as Qe, useGetCart as We, useGetCartRecommendations as Xe, useInitiateCheckout as Ye, useRemoveCartItem as _e, useRemoveDiscount as er, useUpdateCart as rr, useUpdateCartItem as tr } from "./index36.mjs";
|
|
37
|
+
import { useGetBrand as mr } from "./index37.mjs";
|
|
38
|
+
import { useGetProduct as ir, useGetProductAddOns as dr, useGetProductRecommendations as pr, useGetProducts as ur } from "./index38.mjs";
|
|
39
|
+
import { useConfirmOrder as fr, useGetOrder as sr, useGetOrderRecommendations as cr } from "./index39.mjs";
|
|
40
|
+
import { useGetDeliveryZones as xr } from "./index40.mjs";
|
|
40
41
|
export {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
42
|
+
ie as ApiClientProvider,
|
|
43
|
+
J as Badge,
|
|
44
|
+
b as Button,
|
|
45
|
+
z as Card,
|
|
46
|
+
K as CardContent,
|
|
47
|
+
V as CardDescription,
|
|
48
|
+
$ as CardFooter,
|
|
49
|
+
j as CardHeader,
|
|
50
|
+
w as CardTitle,
|
|
51
|
+
B as CartItem,
|
|
51
52
|
i as CartProvider,
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
U as Checkout,
|
|
54
|
+
F as DiscountCodeInput,
|
|
55
|
+
W as FormInput,
|
|
56
|
+
Y as FormSelect,
|
|
56
57
|
u as MetaPixelProvider,
|
|
57
|
-
|
|
58
|
+
N as Modal,
|
|
58
59
|
P as OrderConfirmation,
|
|
59
|
-
|
|
60
|
+
R as ProductAddOns,
|
|
60
61
|
A as ProductCard,
|
|
61
|
-
|
|
62
|
+
v as ProductGrid,
|
|
62
63
|
D as RecommendedProducts,
|
|
63
|
-
|
|
64
|
+
S as ShoppingCart,
|
|
64
65
|
m as StorefrontProvider,
|
|
65
66
|
s as TikTokPixelProvider,
|
|
66
|
-
|
|
67
|
+
g as VariantPickerModal,
|
|
68
|
+
ye as addCartItem,
|
|
67
69
|
r as adminApi,
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
70
|
+
De as applyDiscount,
|
|
71
|
+
xe as authHeaders,
|
|
72
|
+
Ie as checkoutCart,
|
|
73
|
+
ee as cn,
|
|
74
|
+
Ze as confirmOrder,
|
|
75
|
+
le as createAdminRpcClients,
|
|
76
|
+
ge as createCart,
|
|
77
|
+
Pe as createRpcClients,
|
|
78
|
+
$e as fetchBrandBySlug,
|
|
79
|
+
Oe as fetchCart,
|
|
80
|
+
Be as fetchCartRecommendations,
|
|
81
|
+
Ke as fetchDeliveryZones,
|
|
82
|
+
be as fetchOrder,
|
|
83
|
+
qe as fetchOrderRecommendations,
|
|
84
|
+
Ae as fetchProductAddons,
|
|
85
|
+
ke as fetchProductBySlug,
|
|
86
|
+
ve as fetchProductRecommendations,
|
|
87
|
+
Ge as fetchProductsByBrand,
|
|
88
|
+
re as formatCurrency,
|
|
89
|
+
te as formatDate,
|
|
90
|
+
oe as formatDateTime,
|
|
91
|
+
fe as getApiClient,
|
|
92
|
+
me as getStatusColor,
|
|
93
|
+
se as initializeApiClient,
|
|
94
|
+
Te as initiateCheckout,
|
|
93
95
|
e as publicApi,
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
96
|
+
we as queryKeys,
|
|
97
|
+
Se as removeCartItem,
|
|
98
|
+
Me as removeDiscount,
|
|
99
|
+
ce as resetApiClient,
|
|
100
|
+
Fe as updateCart,
|
|
101
|
+
He as updateCartItem,
|
|
102
|
+
Je as useAddCartItem,
|
|
103
|
+
de as useApiClientContext,
|
|
104
|
+
ue as useApiConfig,
|
|
105
|
+
Le as useApplyDiscount,
|
|
104
106
|
d as useCart,
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
107
|
+
Ne as useCheckoutCart,
|
|
108
|
+
fr as useConfirmOrder,
|
|
109
|
+
Qe as useCreateCart,
|
|
110
|
+
mr as useGetBrand,
|
|
111
|
+
We as useGetCart,
|
|
112
|
+
Xe as useGetCartRecommendations,
|
|
113
|
+
xr as useGetDeliveryZones,
|
|
114
|
+
sr as useGetOrder,
|
|
115
|
+
cr as useGetOrderRecommendations,
|
|
116
|
+
ir as useGetProduct,
|
|
117
|
+
dr as useGetProductAddOns,
|
|
118
|
+
pr as useGetProductRecommendations,
|
|
119
|
+
ur as useGetProducts,
|
|
120
|
+
Ye as useInitiateCheckout,
|
|
119
121
|
n as useMetaPixel,
|
|
120
122
|
x as usePageTracking,
|
|
121
|
-
|
|
122
|
-
|
|
123
|
+
_e as useRemoveCartItem,
|
|
124
|
+
er as useRemoveDiscount,
|
|
123
125
|
c as useTikTokPixel,
|
|
124
|
-
|
|
125
|
-
|
|
126
|
+
rr as useUpdateCart,
|
|
127
|
+
tr as useUpdateCartItem
|
|
126
128
|
};
|
package/dist/index10.mjs
CHANGED
|
@@ -1,37 +1,42 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import {
|
|
4
|
-
import { ChevronLeft as
|
|
5
|
-
import { Switch as
|
|
6
|
-
import { Badge as
|
|
7
|
-
import { cn as
|
|
8
|
-
import "./
|
|
2
|
+
import { jsxs as a, jsx as t, Fragment as C } from "react/jsx-runtime";
|
|
3
|
+
import { useState as f, useRef as V } from "react";
|
|
4
|
+
import { ChevronLeft as U, ChevronRight as z } from "lucide-react";
|
|
5
|
+
import { Switch as G } from "./index44.mjs";
|
|
6
|
+
import { Badge as T } from "./index19.mjs";
|
|
7
|
+
import { cn as P, formatCurrency as k } from "./index23.mjs";
|
|
8
|
+
import { VariantPickerModal as _ } from "./index12.mjs";
|
|
9
|
+
import "./index24.mjs";
|
|
9
10
|
import "@tanstack/react-query";
|
|
10
|
-
import { useGetProductAddOns as
|
|
11
|
-
import { useCart as
|
|
12
|
-
function
|
|
13
|
-
slug:
|
|
14
|
-
products:
|
|
15
|
-
onToggle:
|
|
16
|
-
selectedProductIds:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
11
|
+
import { useGetProductAddOns as $ } from "./index38.mjs";
|
|
12
|
+
import { useCart as q } from "./index3.mjs";
|
|
13
|
+
function le({
|
|
14
|
+
slug: g,
|
|
15
|
+
products: x,
|
|
16
|
+
onToggle: u,
|
|
17
|
+
selectedProductIds: A,
|
|
18
|
+
onProductClick: H,
|
|
19
|
+
className: p,
|
|
20
|
+
title: j = "Popular add-ons",
|
|
21
|
+
limit: D = 6
|
|
20
22
|
}) {
|
|
21
|
-
const { cart:
|
|
22
|
-
enabled: !!
|
|
23
|
-
}), c =
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
23
|
+
const { cart: s, addItem: v, removeItem: I } = q(), { data: M, isLoading: N } = $(g || "", D, {
|
|
24
|
+
enabled: !!g && !x
|
|
25
|
+
}), c = x || M || [], W = A || c.filter((e) => s == null ? void 0 : s.items.some(
|
|
26
|
+
(n) => e.variants.some((r) => r.id === n.variant.id)
|
|
27
|
+
)).map((e) => e.id), [y, m] = f(null), [B, b] = f(!1), F = async (e, n) => {
|
|
28
|
+
if (u) {
|
|
29
|
+
u(e, n);
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
if (n && e.variants.length > 1) {
|
|
33
|
+
m(e);
|
|
29
34
|
return;
|
|
30
35
|
}
|
|
31
36
|
const r = e.variants[0];
|
|
32
37
|
if (r)
|
|
33
|
-
if (
|
|
34
|
-
await
|
|
38
|
+
if (n)
|
|
39
|
+
await v(
|
|
35
40
|
e.slug,
|
|
36
41
|
e.name,
|
|
37
42
|
r.price,
|
|
@@ -39,120 +44,156 @@ function Y({
|
|
|
39
44
|
1
|
|
40
45
|
);
|
|
41
46
|
else {
|
|
42
|
-
const
|
|
43
|
-
|
|
47
|
+
const l = s == null ? void 0 : s.items.find(
|
|
48
|
+
(i) => e.variants.some((d) => d.id === i.variant.id)
|
|
49
|
+
);
|
|
50
|
+
l && await I(l.id);
|
|
44
51
|
}
|
|
45
|
-
},
|
|
52
|
+
}, S = async (e, n) => {
|
|
53
|
+
b(!0);
|
|
54
|
+
try {
|
|
55
|
+
await v(
|
|
56
|
+
e.slug,
|
|
57
|
+
e.name,
|
|
58
|
+
n.price,
|
|
59
|
+
n.sku,
|
|
60
|
+
1
|
|
61
|
+
), m(null);
|
|
62
|
+
} finally {
|
|
63
|
+
b(!1);
|
|
64
|
+
}
|
|
65
|
+
}, o = V(null), [L, O] = f(0), E = () => {
|
|
46
66
|
if (o.current) {
|
|
47
|
-
const { scrollLeft: e, scrollWidth:
|
|
48
|
-
|
|
67
|
+
const { scrollLeft: e, scrollWidth: n, clientWidth: r } = o.current, l = e / (n - r);
|
|
68
|
+
O(l || 0);
|
|
49
69
|
}
|
|
50
|
-
},
|
|
70
|
+
}, w = (e) => {
|
|
51
71
|
if (o.current) {
|
|
52
|
-
const { clientWidth:
|
|
72
|
+
const { clientWidth: n } = o.current, r = n * 0.9;
|
|
53
73
|
o.current.scrollBy({
|
|
54
74
|
left: e === "left" ? -r : r,
|
|
55
75
|
behavior: "smooth"
|
|
56
76
|
});
|
|
57
77
|
}
|
|
58
78
|
};
|
|
59
|
-
return (!c || c.length === 0) && !
|
|
79
|
+
return (!c || c.length === 0) && !N ? null : N ? /* @__PURE__ */ a("div", { className: P("w-full py-8 space-y-4 animate-pulse", p), style: { maxWidth: "calc(100vw - calc(var(--spacing) * 7))" }, children: [
|
|
60
80
|
/* @__PURE__ */ t("div", { className: "h-4 w-32 bg-gray-200 rounded px-1 mb-6" }),
|
|
61
|
-
/* @__PURE__ */
|
|
81
|
+
/* @__PURE__ */ a("div", { className: "flex gap-4 overflow-x-hidden", children: [
|
|
62
82
|
/* @__PURE__ */ t("div", { className: "min-w-[90%] h-[90px] bg-gray-100 rounded-[2rem]" }),
|
|
63
83
|
/* @__PURE__ */ t("div", { className: "min-w-[90%] h-[90px] bg-gray-100 rounded-[2rem]" })
|
|
64
84
|
] })
|
|
65
|
-
] }) : /* @__PURE__ */
|
|
66
|
-
/* @__PURE__ */
|
|
67
|
-
|
|
68
|
-
"div",
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
85
|
+
] }) : /* @__PURE__ */ a(C, { children: [
|
|
86
|
+
/* @__PURE__ */ a("div", { className: p, children: [
|
|
87
|
+
/* @__PURE__ */ t("div", { className: "px-1 mb-3", children: /* @__PURE__ */ t("h3", { className: "text-lg font-bold tracking-tight text-gray-900", children: j }) }),
|
|
88
|
+
/* @__PURE__ */ t("div", { className: "relative", children: /* @__PURE__ */ t(
|
|
89
|
+
"div",
|
|
90
|
+
{
|
|
91
|
+
ref: o,
|
|
92
|
+
onScroll: E,
|
|
93
|
+
className: "flex gap-4 overflow-x-auto scrollbar-hide snap-x snap-mandatory px-1",
|
|
94
|
+
style: { scrollbarWidth: "none", msOverflowStyle: "none", maxWidth: "calc(100vw - calc(var(--spacing) * 7))" },
|
|
95
|
+
children: c.map((e) => {
|
|
96
|
+
const n = W.includes(e.id), r = e.variants[0], l = (r == null ? void 0 : r.price) || 0, i = e.compareAtPrice || r.compareAtPrice, d = i && i > l, R = d ? Math.round((i - l) / i * 100) : 0;
|
|
97
|
+
return /* @__PURE__ */ a(
|
|
98
|
+
"div",
|
|
99
|
+
{
|
|
100
|
+
className: "relative flex min-w-[90%] md:min-w-[420px] snap-start items-center gap-4 rounded-xl bg-[#EBEBEB] p-3 transition-all",
|
|
101
|
+
children: [
|
|
102
|
+
/* @__PURE__ */ a(
|
|
103
|
+
"a",
|
|
104
|
+
{
|
|
105
|
+
href: `/product/${e.slug}`,
|
|
106
|
+
className: "flex flex-1 items-center gap-4 min-w-0",
|
|
107
|
+
children: [
|
|
108
|
+
/* @__PURE__ */ t("div", { className: "h-16 w-16 flex-shrink-0 overflow-hidden rounded-xl bg-white/40 flex items-center justify-center", children: e.thumbnailUrl ? /* @__PURE__ */ t(
|
|
109
|
+
"img",
|
|
110
|
+
{
|
|
111
|
+
src: e.thumbnailUrl,
|
|
112
|
+
alt: e.name,
|
|
113
|
+
className: "h-full w-full object-cover",
|
|
114
|
+
loading: "lazy"
|
|
115
|
+
}
|
|
116
|
+
) : /* @__PURE__ */ t("div", { className: "flex h-full w-full items-center justify-center text-[10px] text-gray-400", children: "No Img" }) }),
|
|
117
|
+
/* @__PURE__ */ a("div", { className: "flex flex-1 flex-col justify-center min-w-0", children: [
|
|
118
|
+
/* @__PURE__ */ t("h4", { className: "text-md font-bold text-[#333] truncate pr-2", title: e.name, children: e.name }),
|
|
119
|
+
e.addonDescription && /* @__PURE__ */ t("p", { className: "text-[11px] text-gray-500 line-clamp-3 italic mb-1", children: e.addonDescription }),
|
|
120
|
+
/* @__PURE__ */ a("div", { className: "flex items-center gap-2 mt-1", children: [
|
|
121
|
+
/* @__PURE__ */ t("span", { className: "text-md font-bold text-[#333]", children: k(l) }),
|
|
122
|
+
d && /* @__PURE__ */ a(C, { children: [
|
|
123
|
+
/* @__PURE__ */ t("span", { className: "text-sm text-[#DC143C] line-through", children: k(i) }),
|
|
124
|
+
/* @__PURE__ */ a(T, { className: "bg-[#DC143C]/10 hover:bg-[#DC143C]/20 text-[#DC143C] border-none text-[10px] font-bold px-2 py-0.5 rounded-lg uppercase tracking-tight", children: [
|
|
125
|
+
R,
|
|
126
|
+
"% OFF"
|
|
127
|
+
] })
|
|
128
|
+
] })
|
|
129
|
+
] })
|
|
130
|
+
] })
|
|
131
|
+
]
|
|
132
|
+
}
|
|
133
|
+
),
|
|
134
|
+
/* @__PURE__ */ t("div", { className: "pl-2", onClick: (h) => h.stopPropagation(), children: /* @__PURE__ */ t(
|
|
135
|
+
G,
|
|
136
|
+
{
|
|
137
|
+
checked: n,
|
|
138
|
+
onCheckedChange: (h) => F(e, h),
|
|
139
|
+
className: "scale-125"
|
|
140
|
+
}
|
|
141
|
+
) })
|
|
142
|
+
]
|
|
143
|
+
},
|
|
144
|
+
e.id
|
|
145
|
+
);
|
|
146
|
+
})
|
|
147
|
+
}
|
|
148
|
+
) }),
|
|
149
|
+
/* @__PURE__ */ a("div", { className: "flex items-center justify-between px-2 mt-2", children: [
|
|
150
|
+
/* @__PURE__ */ t("div", { className: "flex gap-1.5 focus:outline-none", children: Array.from({ length: Math.min(c.length, 6) }).map((e, n) => {
|
|
151
|
+
const r = Math.round(L * (Math.min(c.length, 6) - 1)) === n;
|
|
152
|
+
return /* @__PURE__ */ t(
|
|
77
153
|
"div",
|
|
78
154
|
{
|
|
79
|
-
className:
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
{
|
|
84
|
-
src: e.thumbnailUrl,
|
|
85
|
-
alt: e.name,
|
|
86
|
-
className: "h-full w-full object-cover",
|
|
87
|
-
loading: "lazy"
|
|
88
|
-
}
|
|
89
|
-
) : /* @__PURE__ */ t("div", { className: "flex h-full w-full items-center justify-center text-[10px] text-gray-400", children: "No Img" }) }),
|
|
90
|
-
/* @__PURE__ */ n("div", { className: "flex flex-1 flex-col justify-center min-w-0", children: [
|
|
91
|
-
/* @__PURE__ */ t("h4", { className: "text-md font-bold text-[#333] truncate pr-2", title: e.name, children: e.name }),
|
|
92
|
-
e.addonDescription && /* @__PURE__ */ t("p", { className: "text-[11px] text-gray-500 line-clamp-3 italic mb-1", children: e.addonDescription }),
|
|
93
|
-
/* @__PURE__ */ n("div", { className: "flex items-center gap-2 mt-1", children: [
|
|
94
|
-
/* @__PURE__ */ t("span", { className: "text-md font-bold text-[#333]", children: v(a) }),
|
|
95
|
-
p && /* @__PURE__ */ n(B, { children: [
|
|
96
|
-
/* @__PURE__ */ t("span", { className: "text-sm text-[#DC143C] line-through", children: v(s) }),
|
|
97
|
-
/* @__PURE__ */ n(R, { className: "bg-[#DC143C]/10 hover:bg-[#DC143C]/20 text-[#DC143C] border-none text-[10px] font-bold px-2 py-0.5 rounded-lg uppercase tracking-tight", children: [
|
|
98
|
-
S,
|
|
99
|
-
"% OFF"
|
|
100
|
-
] })
|
|
101
|
-
] })
|
|
102
|
-
] })
|
|
103
|
-
] }),
|
|
104
|
-
/* @__PURE__ */ t("div", { className: "pl-2", children: /* @__PURE__ */ t(
|
|
105
|
-
O,
|
|
106
|
-
{
|
|
107
|
-
checked: l,
|
|
108
|
-
onCheckedChange: (W) => A(e, W),
|
|
109
|
-
className: "scale-125"
|
|
110
|
-
}
|
|
111
|
-
) })
|
|
112
|
-
]
|
|
155
|
+
className: P(
|
|
156
|
+
"h-2 w-2 rounded-full transition-all duration-300",
|
|
157
|
+
r ? "bg-gray-600 scale-110" : "bg-gray-300"
|
|
158
|
+
)
|
|
113
159
|
},
|
|
114
|
-
|
|
160
|
+
n
|
|
115
161
|
);
|
|
116
|
-
})
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
onClick: () => g("left"),
|
|
138
|
-
className: "text-gray-400 hover:text-gray-900 transition-colors",
|
|
139
|
-
"aria-label": "Previous",
|
|
140
|
-
children: /* @__PURE__ */ t(F, { className: "h-6 w-6 stroke-[2.5px]" })
|
|
141
|
-
}
|
|
142
|
-
),
|
|
143
|
-
/* @__PURE__ */ t(
|
|
144
|
-
"button",
|
|
145
|
-
{
|
|
146
|
-
onClick: () => g("right"),
|
|
147
|
-
className: "text-gray-400 hover:text-gray-900 transition-colors",
|
|
148
|
-
"aria-label": "Next",
|
|
149
|
-
children: /* @__PURE__ */ t(L, { className: "h-6 w-6 stroke-[2.5px]" })
|
|
150
|
-
}
|
|
151
|
-
)
|
|
162
|
+
}) }),
|
|
163
|
+
/* @__PURE__ */ a("div", { className: "flex gap-4", children: [
|
|
164
|
+
/* @__PURE__ */ t(
|
|
165
|
+
"button",
|
|
166
|
+
{
|
|
167
|
+
onClick: () => w("left"),
|
|
168
|
+
className: "text-gray-400 hover:text-gray-900 transition-colors",
|
|
169
|
+
"aria-label": "Previous",
|
|
170
|
+
children: /* @__PURE__ */ t(U, { className: "h-6 w-6 stroke-[2.5px]" })
|
|
171
|
+
}
|
|
172
|
+
),
|
|
173
|
+
/* @__PURE__ */ t(
|
|
174
|
+
"button",
|
|
175
|
+
{
|
|
176
|
+
onClick: () => w("right"),
|
|
177
|
+
className: "text-gray-400 hover:text-gray-900 transition-colors",
|
|
178
|
+
"aria-label": "Next",
|
|
179
|
+
children: /* @__PURE__ */ t(z, { className: "h-6 w-6 stroke-[2.5px]" })
|
|
180
|
+
}
|
|
181
|
+
)
|
|
182
|
+
] })
|
|
152
183
|
] })
|
|
153
|
-
] })
|
|
184
|
+
] }),
|
|
185
|
+
/* @__PURE__ */ t(
|
|
186
|
+
_,
|
|
187
|
+
{
|
|
188
|
+
isOpen: !!y,
|
|
189
|
+
onClose: () => m(null),
|
|
190
|
+
product: y,
|
|
191
|
+
onConfirm: S,
|
|
192
|
+
isLoading: B
|
|
193
|
+
}
|
|
194
|
+
)
|
|
154
195
|
] });
|
|
155
196
|
}
|
|
156
197
|
export {
|
|
157
|
-
|
|
198
|
+
le as ProductAddOns
|
|
158
199
|
};
|