@tapcart/mobile-components 0.6.0 → 0.6.2

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.
Files changed (41) hide show
  1. package/dist/components/hooks/use-collection.d.ts +25 -0
  2. package/dist/components/hooks/use-collection.d.ts.map +1 -0
  3. package/dist/components/hooks/use-collection.js +74 -0
  4. package/dist/components/hooks/use-product-options.d.ts +9 -0
  5. package/dist/components/hooks/use-product-options.d.ts.map +1 -0
  6. package/dist/components/hooks/use-product-options.js +44 -0
  7. package/dist/components/hooks/use-products.d.ts +2 -2
  8. package/dist/components/hooks/use-products.d.ts.map +1 -1
  9. package/dist/components/hooks/use-products.js +5 -3
  10. package/dist/components/ui/button.d.ts.map +1 -1
  11. package/dist/components/ui/button.js +7 -2
  12. package/dist/components/ui/chip.js +1 -1
  13. package/dist/components/ui/favorite.d.ts +1 -1
  14. package/dist/components/ui/favorite.d.ts.map +1 -1
  15. package/dist/components/ui/favorite.js +4 -4
  16. package/dist/components/ui/grid.d.ts +1 -1
  17. package/dist/components/ui/icon.d.ts.map +1 -1
  18. package/dist/components/ui/icon.js +9 -4
  19. package/dist/components/ui/price.d.ts.map +1 -1
  20. package/dist/components/ui/price.js +1 -4
  21. package/dist/components/ui/product-card.d.ts.map +1 -1
  22. package/dist/components/ui/product-card.js +13 -17
  23. package/dist/components/ui/quantity-picker.js +2 -2
  24. package/dist/components/ui/selectors.d.ts.map +1 -1
  25. package/dist/components/ui/selectors.js +1 -1
  26. package/dist/components/ui/slider.js +1 -1
  27. package/dist/components/ui/text.d.ts.map +1 -1
  28. package/dist/components/ui/text.js +2 -2
  29. package/dist/components/ui/textarea.d.ts.map +1 -1
  30. package/dist/components/ui/textarea.js +5 -1
  31. package/dist/components/ui/wishlist-select.d.ts +43 -0
  32. package/dist/components/ui/wishlist-select.d.ts.map +1 -0
  33. package/dist/components/ui/wishlist-select.js +88 -0
  34. package/dist/components/ui/wishlist.d.ts +15 -4
  35. package/dist/components/ui/wishlist.d.ts.map +1 -1
  36. package/dist/components/ui/wishlist.js +12 -4
  37. package/dist/index.d.ts +4 -0
  38. package/dist/index.d.ts.map +1 -1
  39. package/dist/index.js +4 -0
  40. package/dist/styles.css +122 -12
  41. package/package.json +3 -2
@@ -0,0 +1,25 @@
1
+ interface Collection {
2
+ id: string;
3
+ title: string;
4
+ handle: string;
5
+ products: Product[];
6
+ }
7
+ interface UseCollectionProps {
8
+ apiUrl: string;
9
+ appId: string;
10
+ collectionId?: string;
11
+ collectionHandle?: string;
12
+ language: string;
13
+ getCollections?: boolean;
14
+ }
15
+ interface Product {
16
+ handle: string;
17
+ }
18
+ export declare const useCollection: ({ apiUrl, appId, collectionId, collectionHandle, language, getCollections, }: UseCollectionProps) => {
19
+ collections: Collection[] | null;
20
+ specificCollection: Collection | null;
21
+ loading: boolean;
22
+ error: string | null;
23
+ };
24
+ export {};
25
+ //# sourceMappingURL=use-collection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-collection.d.ts","sourceRoot":"","sources":["../../../components/hooks/use-collection.ts"],"names":[],"mappings":"AAGA,UAAU,UAAU;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,OAAO,EAAE,CAAC;CACrB;AAED,UAAU,kBAAkB;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,UAAU,OAAO;IACf,MAAM,EAAE,MAAM,CAAC;CAEhB;AAED,eAAO,MAAM,aAAa,iFAQrB,kBAAkB;;;;;CAwEtB,CAAC"}
@@ -0,0 +1,74 @@
1
+ "use client";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ import { useState, useEffect } from "react";
12
+ export const useCollection = ({ apiUrl, appId, collectionId, collectionHandle, language, getCollections = false, }) => {
13
+ const [collections, setCollections] = useState(null);
14
+ const [specificCollection, setSpecificCollection] = useState(null);
15
+ const [loading, setLoading] = useState(true);
16
+ const [error, setError] = useState(null);
17
+ useEffect(() => {
18
+ const fetchCollections = () => __awaiter(void 0, void 0, void 0, function* () {
19
+ try {
20
+ const allCollectionsUrl = `${apiUrl}/collections/by-app-id`;
21
+ let specificCollectionUrl = null;
22
+ if (collectionId || collectionHandle) {
23
+ // Fetch specific collection by ID or handle
24
+ const params = new URLSearchParams({
25
+ collectionHandle: collectionHandle || "",
26
+ collectionId: collectionId || "",
27
+ language,
28
+ }).toString();
29
+ const collectionBy = collectionHandle ? "by-handle" : "by-id";
30
+ specificCollectionUrl = `${apiUrl}/collections/${collectionBy}?${params}`;
31
+ }
32
+ const fetchAllCollections = allCollectionsUrl
33
+ ? fetch(allCollectionsUrl, {
34
+ method: "GET",
35
+ headers: {
36
+ "Content-Type": "application/json",
37
+ },
38
+ })
39
+ : null;
40
+ const fetchSpecificCollection = specificCollectionUrl
41
+ ? fetch(specificCollectionUrl, {
42
+ method: "GET",
43
+ headers: {
44
+ "Content-Type": "application/json",
45
+ },
46
+ })
47
+ : null;
48
+ const [allCollectionsResponse, specificCollectionResponse] = yield Promise.all([
49
+ fetchAllCollections,
50
+ fetchSpecificCollection,
51
+ ]);
52
+ if (fetchAllCollections && allCollectionsResponse && !allCollectionsResponse.ok) {
53
+ throw new Error(`Failed to fetch all collections: ${allCollectionsResponse.statusText}`);
54
+ }
55
+ if (fetchSpecificCollection && specificCollectionResponse && !specificCollectionResponse.ok) {
56
+ throw new Error(`Failed to fetch specific collection: ${specificCollectionResponse.statusText}`);
57
+ }
58
+ const allCollectionsData = fetchAllCollections && allCollectionsResponse ? yield allCollectionsResponse.json() : null;
59
+ const specificCollectionData = fetchSpecificCollection && specificCollectionResponse ? yield specificCollectionResponse.json() : null;
60
+ setCollections(allCollectionsData);
61
+ setSpecificCollection(specificCollectionData);
62
+ }
63
+ catch (error) {
64
+ console.error("Error fetching collection:", error);
65
+ setError(error instanceof Error ? error.message : "An unknown error occurred.");
66
+ }
67
+ finally {
68
+ setLoading(false);
69
+ }
70
+ });
71
+ fetchCollections();
72
+ }, [apiUrl, appId, collectionId, collectionHandle, language, getCollections]);
73
+ return { collections, specificCollection, loading, error };
74
+ };
@@ -0,0 +1,9 @@
1
+ import { ProductVariant } from "app-studio-types";
2
+ type SelectedOptions = Record<string, string>;
3
+ export declare function useProductOptions(variants: ProductVariant[] | undefined | null): {
4
+ selectedOptions: SelectedOptions;
5
+ handleSelect: (optionName: string, optionValue: string) => void;
6
+ selectedVariant: ProductVariant | undefined;
7
+ };
8
+ export {};
9
+ //# sourceMappingURL=use-product-options.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-product-options.d.ts","sourceRoot":"","sources":["../../../components/hooks/use-product-options.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAEjD,KAAK,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;AAE7C,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,cAAc,EAAE,GAAG,SAAS,GAAG,IAAI;;+BAyCX,MAAM,eAAe,MAAM,KAAG,IAAI;;EAwBrE"}
@@ -0,0 +1,44 @@
1
+ "use client";
2
+ import { useState, useEffect, useMemo } from "react";
3
+ export function useProductOptions(variants) {
4
+ const safeVariants = useMemo(() => variants || [], [variants]);
5
+ const getCheapestProductFromVariants = useMemo(() => {
6
+ return () => {
7
+ if (!safeVariants.length)
8
+ return null;
9
+ const availableVariants = safeVariants.filter((variant) => variant.availableForSale);
10
+ const activeVariants = availableVariants.length
11
+ ? availableVariants
12
+ : safeVariants;
13
+ return activeVariants.reduce((lowest, current) => {
14
+ return current.price.amount < lowest.price.amount ? current : lowest;
15
+ });
16
+ };
17
+ }, [safeVariants]);
18
+ const initializeSelectedOptions = useMemo(() => {
19
+ return () => {
20
+ const lowestPriceVariant = getCheapestProductFromVariants();
21
+ if (lowestPriceVariant) {
22
+ const selectedOptions = {};
23
+ lowestPriceVariant.selectedOptions.forEach((option) => {
24
+ selectedOptions[option.name] = option.value;
25
+ });
26
+ return selectedOptions;
27
+ }
28
+ return {};
29
+ };
30
+ }, [getCheapestProductFromVariants]);
31
+ const [selectedOptions, setSelectedOptions] = useState(initializeSelectedOptions());
32
+ const handleSelect = (optionName, optionValue) => {
33
+ setSelectedOptions((prevOptions) => (Object.assign(Object.assign({}, prevOptions), { [optionName]: optionValue })));
34
+ };
35
+ useEffect(() => {
36
+ setSelectedOptions(initializeSelectedOptions());
37
+ }, [safeVariants, initializeSelectedOptions]);
38
+ const selectedVariant = useMemo(() => safeVariants.find((v) => v.selectedOptions.every((o) => selectedOptions[o.name] === o.value)), [safeVariants, selectedOptions]);
39
+ return {
40
+ selectedOptions,
41
+ handleSelect,
42
+ selectedVariant,
43
+ };
44
+ }
@@ -10,6 +10,6 @@ type UseProductsReturn = {
10
10
  error: any;
11
11
  isLoading: boolean;
12
12
  };
13
- declare function useProducts({ productIds, baseURL, fetcher, }: UseProductsProps): UseProductsReturn;
14
- export { useProducts };
13
+ export declare function useProducts(props: UseProductsProps | null): UseProductsReturn;
14
+ export {};
15
15
  //# sourceMappingURL=use-products.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-products.d.ts","sourceRoot":"","sources":["../../../components/hooks/use-products.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAE1C,KAAK,GAAG,GAAG,MAAM,CAAA;AACjB,KAAK,gBAAgB,GAAG;IACtB,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,OAAO,EAAE,GAAG,CAAA;IACZ,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,GAAG,CAAC,CAAA;CACxC,CAAA;AACD,KAAK,iBAAiB,GAAG;IACvB,QAAQ,EAAE,OAAO,EAAE,CAAA;IACnB,KAAK,EAAE,GAAG,CAAA;IACV,SAAS,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,iBAAS,WAAW,CAAC,EACnB,UAAU,EACV,OAAO,EACP,OAAuD,GACxD,EAAE,gBAAgB,GAAG,iBAAiB,CAStC;AAED,OAAO,EAAE,WAAW,EAAE,CAAA"}
1
+ {"version":3,"file":"use-products.d.ts","sourceRoot":"","sources":["../../../components/hooks/use-products.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAE1C,KAAK,GAAG,GAAG,MAAM,CAAA;AACjB,KAAK,gBAAgB,GAAG;IACtB,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,OAAO,EAAE,GAAG,CAAA;IACZ,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,GAAG,CAAC,CAAA;CACxC,CAAA;AACD,KAAK,iBAAiB,GAAG;IACvB,QAAQ,EAAE,OAAO,EAAE,CAAA;IACnB,KAAK,EAAE,GAAG,CAAA;IACV,SAAS,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,GAAG,IAAI,GAAG,iBAAiB,CAc7E"}
@@ -1,6 +1,9 @@
1
1
  import useSWR from "swr";
2
- function useProducts({ productIds, baseURL, fetcher = (url) => fetch(url).then((res) => res.json()), }) {
3
- const url = `${baseURL}/products/by-ids?ids=${productIds.join(",")}`;
2
+ export function useProducts(props) {
3
+ const url = props
4
+ ? `${props.baseURL}/products/by-ids?ids=${props.productIds.join(",")}`
5
+ : null;
6
+ const fetcher = (props === null || props === void 0 ? void 0 : props.fetcher) || ((url) => fetch(url).then((res) => res.json()));
4
7
  const { data, error } = useSWR(url, fetcher);
5
8
  return {
6
9
  products: data || [],
@@ -8,4 +11,3 @@ function useProducts({ productIds, baseURL, fetcher = (url) => fetch(url).then((
8
11
  isLoading: !data && !error,
9
12
  };
10
13
  }
11
- export { useProducts };
@@ -1 +1 @@
1
- {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../components/ui/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAKjE,QAAA,MAAM,cAAc;;;mFAgCnB,CAAA;AAwCD,MAAM,WAAW,WACf,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EACnD,YAAY,CAAC,OAAO,cAAc,CAAC;IACrC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,UAAU,CAAC,EAAE,KAAK,CAAC,aAAa,GAAG,SAAS,CAAA;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CAChC;AAED,QAAA,MAAM,MAAM,uFAyEX,CAAA;AAGD,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAA"}
1
+ {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../components/ui/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAKjE,QAAA,MAAM,cAAc;;;mFAgCnB,CAAA;AAwCD,MAAM,WAAW,WACf,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EACnD,YAAY,CAAC,OAAO,cAAc,CAAC;IACrC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,UAAU,CAAC,EAAE,KAAK,CAAC,aAAa,GAAG,SAAS,CAAA;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CAChC;AAED,QAAA,MAAM,MAAM,uFAoFX,CAAA;AAGD,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAA"}
@@ -81,12 +81,17 @@ const labelVariants = cva("truncate", {
81
81
  const Button = React.forwardRef((_a, ref) => {
82
82
  var { className, labelClassName, labelStyle, variant, size, asChild = false, loading, icon, iconColor, iconPosition } = _a, props = __rest(_a, ["className", "labelClassName", "labelStyle", "variant", "size", "asChild", "loading", "icon", "iconColor", "iconPosition"]);
83
83
  const Comp = asChild ? Slot : "button";
84
- const IconButton = () => (icon ? _jsx(Icon, { name: icon, size: "sm" }) : null);
84
+ const IconButton = () => icon ? _jsx(Icon, { name: icon, size: "sm", style: { color: iconColor } }) : null;
85
85
  const BasicButton = () => (_jsxs(_Fragment, { children: [icon ? (_jsx(Icon, { name: icon, size: variant === "quickadd" ? "xs" : "sm", className: cn(iconVariants({ variant }), { "mr-2": iconPosition !== "right" }), style: { color: iconColor } })) : null, !loading ? (_jsx(Text, Object.assign({ type: "body-primary", className: cn(labelVariants({ variant }), labelClassName), style: labelStyle }, { children: props.children }))) : (_jsx(_Fragment, {}))] }));
86
+ const LoadingButton = () => (_jsx("div", Object.assign({ className: cn("flex items-center justify-center", size === "icon" ? "h-5" : "h-6") }, { children: _jsx(Icon, { className: cn(iconVariants({ variant }), "h-5 w-5 animate-spin"), name: "loader", style: { color: iconColor } }) })));
86
87
  return (_jsx(Comp, Object.assign({ className: cn(buttonVariants({ variant, size }), className, {
87
88
  "pointer-events-none": loading,
88
89
  "flex-row-reverse": icon && iconPosition === "right"
89
- }), ref: ref }, props, { children: loading ? (_jsx("div", Object.assign({ className: cn("flex items-center justify-center", size === "icon" ? "h-5" : "h-6") }, { children: _jsx(Icon, { className: cn(iconVariants({ variant }), "h-5 w-5 animate-spin"), name: "loader", style: { color: iconColor } }) }))) : size === "icon" ? (_jsx(IconButton, {})) : (_jsx(BasicButton, {})) })));
90
+ }), ref: ref }, props, { children: loading ? (_jsx(LoadingButton, {})) : typeof props.children === "object" &&
91
+ React.isValidElement(props.children) ? ( // if children are passed as a valid React element
92
+ props.children // render it
93
+ ) : // otherwise use props
94
+ size === "icon" ? (_jsx(IconButton, {})) : (_jsx(BasicButton, {})) })));
90
95
  });
91
96
  Button.displayName = "Button";
92
97
  export { Button, buttonVariants };
@@ -65,7 +65,7 @@ const MultipleChips = ({ children, containerRef, }) => {
65
65
  useEffect(() => {
66
66
  checkOverflow();
67
67
  }, [children]);
68
- return (_jsxs("div", Object.assign({ className: "relative no-scrollbar" }, { children: [_jsx("div", Object.assign({ ref: containerRef, className: "flex overflow-x-auto overflow-y-hidden", onScroll: checkOverflow }, { children: children.map((chip, index) => (_jsx("div", Object.assign({ className: cn("shrink-0", {
68
+ return (_jsxs("div", Object.assign({ className: "relative no-scrollbar" }, { children: [_jsx("div", Object.assign({ ref: containerRef, className: "flex overflow-x-auto overflow-y-hidden pt-2", onScroll: checkOverflow }, { children: children.map((chip, index) => (_jsx("div", Object.assign({ className: cn("shrink-0", {
69
69
  "mr-2": index < children.length - 1,
70
70
  }) }, { children: chip }), index))) })), showFadeLeft && (_jsx("div", { className: "absolute top-0 left-0 w-8 h-full pointer-events-none bg-fade-left" })), showFadeRight && (_jsx("div", { className: "absolute top-0 right-0 w-8 h-full pointer-events-none bg-fade-right" }))] })));
71
71
  };
@@ -8,7 +8,7 @@ declare const favoriteVariants: (props?: ({
8
8
  export interface FavoriteProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof favoriteVariants> {
9
9
  selected?: boolean;
10
10
  onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
11
- icon?: string;
11
+ iconUrl?: string;
12
12
  showBackground?: boolean;
13
13
  cornerRadius?: number;
14
14
  layoutType?: "below-image-on-right" | "top-right" | "top-left" | "bottom-left" | "bottom-right";
@@ -1 +1 @@
1
- {"version":3,"file":"favorite.d.ts","sourceRoot":"","sources":["../../../components/ui/favorite.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAKjE,QAAA,MAAM,gBAAgB;;;;mFA0BrB,CAAA;AAED,MAAM,WAAW,aACf,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EACnD,YAAY,CAAC,OAAO,gBAAgB,CAAC;IACvC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IAC/D,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,UAAU,CAAC,EAAE,sBAAsB,GAAG,WAAW,GAAG,UAAU,GAAG,aAAa,GAAG,cAAc,CAAA;CAChG;AAED,QAAA,MAAM,QAAQ,yFAuCb,CAAA;AAGD,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,CAAA"}
1
+ {"version":3,"file":"favorite.d.ts","sourceRoot":"","sources":["../../../components/ui/favorite.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAKjE,QAAA,MAAM,gBAAgB;;;;mFA0BrB,CAAA;AAED,MAAM,WAAW,aACf,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EACnD,YAAY,CAAC,OAAO,gBAAgB,CAAC;IACvC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAA;IAC9D,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,UAAU,CAAC,EACP,sBAAsB,GACtB,WAAW,GACX,UAAU,GACV,aAAa,GACb,cAAc,CAAA;CACnB;AAED,QAAA,MAAM,QAAQ,yFAwCb,CAAA;AAGD,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,CAAA"}
@@ -14,7 +14,7 @@ import * as React from "react";
14
14
  import { cva } from "class-variance-authority";
15
15
  import { cn } from "../../lib/utils";
16
16
  import { Icon } from "./icon";
17
- const favoriteVariants = cva("flex p-2 gap-2 rounded-[4px] shadow-buttonColors-primaryShadow active:[&_svg]:text-stateColors-favorites", {
17
+ const favoriteVariants = cva("flex p-2 gap-2 rounded-[4px] shadow-buttonColors-primaryShadow", {
18
18
  variants: {
19
19
  size: {
20
20
  small: "p-2",
@@ -30,7 +30,7 @@ const favoriteVariants = cva("flex p-2 gap-2 rounded-[4px] shadow-buttonColors-p
30
30
  "top-left": "",
31
31
  "bottom-left": "",
32
32
  "bottom-right": "",
33
- }
33
+ },
34
34
  },
35
35
  defaultVariants: {
36
36
  size: "small",
@@ -39,14 +39,14 @@ const favoriteVariants = cva("flex p-2 gap-2 rounded-[4px] shadow-buttonColors-p
39
39
  },
40
40
  });
41
41
  const Favorite = React.forwardRef((_a, ref) => {
42
- var { className, size = "small", selected = false, onClick, icon = "heart-filled", showBackground = false, cornerRadius = 4, layoutType = "below-image-on-right" } = _a, props = __rest(_a, ["className", "size", "selected", "onClick", "icon", "showBackground", "cornerRadius", "layoutType"]);
42
+ var { className, size = "small", selected = false, onClick, iconUrl = "", showBackground = false, cornerRadius = 4, layoutType = "below-image-on-right" } = _a, props = __rest(_a, ["className", "size", "selected", "onClick", "iconUrl", "showBackground", "cornerRadius", "layoutType"]);
43
43
  return (_jsx("button", Object.assign({ onClick: onClick, ref: ref, className: cn(favoriteVariants({
44
44
  size,
45
45
  showBackground,
46
46
  layoutType,
47
47
  }), className), style: {
48
48
  borderRadius: `${cornerRadius}px`,
49
- } }, props, { children: _jsx(Icon, { name: icon, color: selected ? "stateColors-favorites" : "stateColors-disabled", size: size === "small" ? "xs" : "sm" }) })));
49
+ } }, props, { children: _jsx(Icon, { url: iconUrl, color: selected ? "stateColors-favorites" : "stateColors-disabled", size: size === "small" ? "xs" : "sm" }) })));
50
50
  });
51
51
  Favorite.displayName = "Favorite";
52
52
  export { Favorite, favoriteVariants };
@@ -5,7 +5,7 @@ interface GridType {
5
5
  children: React.ReactNode;
6
6
  }
7
7
  declare const gridVariants: (props?: ({
8
- columns?: 3 | 1 | 2 | 4 | null | undefined;
8
+ columns?: 2 | 1 | 3 | 4 | null | undefined;
9
9
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
10
10
  export interface GridProps extends GridType, VariantProps<typeof gridVariants> {
11
11
  }
@@ -1 +1 @@
1
- {"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../../components/ui/icon.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AACjE,OAAO,EAEL,eAAe,EAkChB,MAAM,qBAAqB,CAAA;AAI5B,QAAA,MAAM,YAAY;;;mFAgBjB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S,EACT,WAAW,EACX,GAAG,EACH,GAAG,KAAK,EACT,EAAE,SAAS,2CAgBX;AAED,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,eAAe,EAAE,CAAA"}
@@ -1,4 +1,4 @@
1
- 'use client';
1
+ "use client";
2
2
  var __rest = (this && this.__rest) || function (s, e) {
3
3
  var t = {};
4
4
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
@@ -13,7 +13,7 @@ var __rest = (this && this.__rest) || function (s, e) {
13
13
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
14
14
  import { ReactSVG } from "react-svg";
15
15
  import { cva } from "class-variance-authority";
16
- import { IconUpload, IconPencilMinus, IconPlus, IconMinus, IconAdjustmentsAlt, IconArrowsSort, IconAlertCircle, IconCircleX, IconInfoCircle, IconCheck, IconSquareOff, IconMapPin, IconRepeat, IconSquare, IconSquareCheck, IconChevronUp, IconChevronRight, IconEyeOff, IconSquareX, IconCircle, IconChevronDown, IconHeartFilled, IconCurrencyDollar, IconX, IconCircleOff, IconCircleDotFilled, IconMoodSad, IconSquareXFilled, IconTrash, IconLoader2, IconColumns1, IconColumns2, IconColumns3, IconSearch, IconShoppingCartOff, } from "@tabler/icons-react";
16
+ import { IconUpload, IconPencilMinus, IconPlus, IconMinus, IconAdjustmentsAlt, IconArrowsSort, IconAlertCircle, IconCircleX, IconInfoCircle, IconCheck, IconSquareOff, IconMapPin, IconRepeat, IconSquare, IconSquareCheck, IconChevronUp, IconChevronRight, IconChevronLeft, IconEyeOff, IconSquareX, IconCircle, IconChevronDown, IconHeartFilled, IconCurrencyDollar, IconX, IconCircleOff, IconCircleDotFilled, IconMoodSad, IconSquareXFilled, IconTrash, IconLoader2, IconColumns1, IconColumns2, IconColumns3, IconSearch, IconShoppingCartOff, IconStarFilled, IconShoppingBagPlus, IconShieldCheckFilled, IconShoppingBag, } from "@tabler/icons-react";
17
17
  import { cn, iconColorVariantClasses } from "../../lib/utils";
18
18
  const iconVariants = cva("inline-flex items-center justify-center text-sm font-medium focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:opacity-50 disabled:pointer-events-none ring-offset-background", {
19
19
  variants: {
@@ -57,6 +57,7 @@ const icons = {
57
57
  "square-check": IconSquareCheck,
58
58
  "chevron-up": IconChevronUp,
59
59
  "chevron-right": IconChevronRight,
60
+ "chevron-left": IconChevronLeft,
60
61
  "eye-off": IconEyeOff,
61
62
  "square-x": IconSquareX,
62
63
  circle: IconCircle,
@@ -77,6 +78,10 @@ const icons = {
77
78
  "columns-3": IconColumns3,
78
79
  search: IconSearch,
79
80
  "shopping-cart-off": IconShoppingCartOff,
81
+ "star-filled": IconStarFilled,
82
+ "shopping-bag": IconShoppingBag,
83
+ "shopping-bag-plus": IconShoppingBagPlus,
84
+ "shield-check-filled": IconShieldCheckFilled,
80
85
  };
81
86
  const TablerIcon = ({ name, size }) => {
82
87
  const IconComponent = icons[name];
@@ -88,8 +93,8 @@ const CustomIcon = ({ url, size, strokeColor, fillColor }) => {
88
93
  const paths = svg.querySelectorAll("path");
89
94
  paths.forEach((path) => {
90
95
  path.setAttribute("stroke-width", strokeWidthMapping[size].toString());
91
- fillColor && path.setAttribute("fill", fillColor);
92
- strokeColor && path.setAttribute("stroke", strokeColor);
96
+ fillColor && path.setAttribute("fill", `var(--${fillColor})`);
97
+ strokeColor && path.setAttribute("stroke", `var(--${strokeColor})`);
93
98
  });
94
99
  } }));
95
100
  };
@@ -1 +1 @@
1
- {"version":3,"file":"price.d.ts","sourceRoot":"","sources":["../../../components/ui/price.tsx"],"names":[],"mappings":"AAIA,UAAU,UAAU;IAClB,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACnC,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,aAAa,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,EAAE,CAAC;CAClD;AAED,iBAAS,KAAK,CAAC,EACb,KAAK,EACL,SAAS,EACT,WAAmB,EACnB,MAAc,EACd,cAAc,EACd,kBAAkB,EAClB,QAAgB,EAChB,MAAgB,EAChB,QAAa,EACb,aAAkB,GACnB,EAAE,UAAU,2CAiEZ;AAED,OAAO,EAAE,KAAK,EAAE,CAAA"}
1
+ {"version":3,"file":"price.d.ts","sourceRoot":"","sources":["../../../components/ui/price.tsx"],"names":[],"mappings":"AAIA,UAAU,UAAU;IAClB,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACnC,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,aAAa,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,EAAE,CAAC;CAClD;AAED,iBAAS,KAAK,CAAC,EACb,KAAK,EACL,SAAS,EACT,WAAmB,EACnB,MAAc,EACd,cAAc,EACd,kBAAkB,EAClB,QAAgB,EAChB,MAAgB,EAChB,QAAa,EACb,aAAkB,GACnB,EAAE,UAAU,2CA6DZ;AAED,OAAO,EAAE,KAAK,EAAE,CAAA"}
@@ -6,10 +6,7 @@ function Price({ price, priceHigh, priceRanges = false, isSale = false, compareA
6
6
  const Spacer = () => (_jsx("span", { children: " - " }));
7
7
  const ProductPrice = () => {
8
8
  const colorClass = isSale ? 'text-textColors-salePriceText' : 'text-textColors-priceText';
9
- return (_jsxs(Text, Object.assign({ className: `${colorClass} flex-shrink-0`, style: { fontSize: `${fontSize}px` } }, { children: [_jsx("div", { className: cn("flex flex-wrap gap-2", {
10
- "ml-auto": textAlignment === 'right',
11
- "mr-auto": textAlignment === 'center',
12
- }) }), _jsxs("span", Object.assign({ className: "flex-grow min-w-[fit-content]" }, { children: [_jsx(Money, { price: price, currency: currency, locale: locale }), priceRanges && priceHigh !== undefined && _jsx(Spacer, {}), priceRanges && priceHigh !== undefined && (_jsx(Money, { price: priceHigh, currency: currency, locale: locale }))] }))] })));
9
+ return (_jsx(Text, Object.assign({ className: `${colorClass} flex-shrink-0`, style: { fontSize: `${fontSize}px` } }, { children: _jsxs("span", Object.assign({ className: "flex-grow min-w-[fit-content]" }, { children: [_jsx(Money, { price: price, currency: currency, locale: locale }), priceRanges && priceHigh !== undefined && _jsx(Spacer, {}), priceRanges && priceHigh !== undefined && (_jsx(Money, { price: priceHigh, currency: currency, locale: locale }))] })) })));
13
10
  };
14
11
  const StrikeThroughPrice = () => {
15
12
  if (!isSale || !compareAtPrice)
@@ -1 +1 @@
1
- {"version":3,"file":"product-card.d.ts","sourceRoot":"","sources":["../../../components/ui/product-card.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAO9B,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAG1C,KAAK,MAAM,GAAG;IACZ,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,YAAY,CAAC,EAAE;QACb,OAAO,EAAE,OAAO,CAAA;QAChB,YAAY,EAAE,MAAM,CAAA;QACpB,iBAAiB,EAAE,OAAO,CAAA;KAC3B,CAAA;IACD,KAAK,CAAC,EAAE;QACN,OAAO,EAAE,OAAO,CAAA;QAChB,QAAQ,EAAE,MAAM,CAAA;QAChB,aAAa,EAAE,MAAM,GAAG,OAAO,GAA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AAC,iBAAiB,CAAC,EAC1C,OAAO,EAAE,OAAO,KACb,IAAI,CAAA;IACT,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAA;IACzE,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AA8HD,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAsU3C,CAAA;AAED,OAAO,EAAE,WAAW,EAAE,CAAA"}
@@ -135,7 +135,7 @@ const productCardFavoriteVariants = cva("absolute ", {
135
135
  },
136
136
  });
137
137
  const ProductCard = ({ config, tapcartData, product, isLoading, favorited, onFavoriteClick, onQuickAdd, openProduct, className, }) => {
138
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24;
138
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20;
139
139
  const { variants, images, title, tags } = product;
140
140
  // Select the variant that has the lowest price that is available or just the lowest price if none are available
141
141
  let searchVariants = variants.filter((variant) => variant.available);
@@ -217,34 +217,30 @@ const ProductCard = ({ config, tapcartData, product, isLoading, favorited, onFav
217
217
  imageSwipeEnabled
218
218
  })), selected: favorited, onClick: (e) => {
219
219
  onFavoriteClick === null || onFavoriteClick === void 0 ? void 0 : onFavoriteClick(e, product);
220
- }, icon: ((_q = (_p = config.favoritesIcon) === null || _p === void 0 ? void 0 : _p.icon) === null || _q === void 0 ? void 0 : _q.type) === "internal"
221
- ? (_s = (_r = config.favoritesIcon) === null || _r === void 0 ? void 0 : _r.icon) === null || _s === void 0 ? void 0 : _s.url
222
- : undefined, layoutType: (_t = config.favoritesIcon) === null || _t === void 0 ? void 0 : _t.layoutType, showBackground: (_u = config.favoritesIcon) === null || _u === void 0 ? void 0 : _u.showBackground, cornerRadius: (_v = config.favoritesIcon) === null || _v === void 0 ? void 0 : _v.cornerRadius }))] }))), ((_w = config.quickAdd) === null || _w === void 0 ? void 0 : _w.enabled) && (_jsx(Button, Object.assign({ className: "outline-0", style: {
220
+ }, iconUrl: (_q = (_p = config.favoritesIcon) === null || _p === void 0 ? void 0 : _p.icon) === null || _q === void 0 ? void 0 : _q.url, layoutType: (_r = config.favoritesIcon) === null || _r === void 0 ? void 0 : _r.layoutType, showBackground: (_s = config.favoritesIcon) === null || _s === void 0 ? void 0 : _s.showBackground, cornerRadius: (_t = config.favoritesIcon) === null || _t === void 0 ? void 0 : _t.cornerRadius }))] }))), ((_u = config.quickAdd) === null || _u === void 0 ? void 0 : _u.enabled) && (_jsx(Button, Object.assign({ className: "outline-0", style: {
223
221
  borderBottomLeftRadius: `${config.quickAdd.cornerRadius}px`,
224
222
  borderBottomRightRadius: `${config.quickAdd.cornerRadius}px`,
225
- }, labelClassName: cn("outline-0 w-full", { uppercase: (_x = config.quickAdd) === null || _x === void 0 ? void 0 : _x.uppercase }, { "text-left": ((_y = config.quickAdd) === null || _y === void 0 ? void 0 : _y.textAlignment) === "left" }, { "text-right": ((_z = config.quickAdd) === null || _z === void 0 ? void 0 : _z.textAlignment) === "right" }, { "text-center": ((_0 = config.quickAdd) === null || _0 === void 0 ? void 0 : _0.textAlignment) === "center" }), labelStyle: { fontSize: (_1 = config.quickAdd) === null || _1 === void 0 ? void 0 : _1.fontSize }, variant: "quickadd", size: "default", disabled: product.availableForSale === false, onClick: (e) => {
223
+ }, labelClassName: cn("outline-0 w-full", { uppercase: (_v = config.quickAdd) === null || _v === void 0 ? void 0 : _v.uppercase }, { "text-left": ((_w = config.quickAdd) === null || _w === void 0 ? void 0 : _w.textAlignment) === "left" }, { "text-right": ((_x = config.quickAdd) === null || _x === void 0 ? void 0 : _x.textAlignment) === "right" }, { "text-center": ((_y = config.quickAdd) === null || _y === void 0 ? void 0 : _y.textAlignment) === "center" }), labelStyle: { fontSize: (_z = config.quickAdd) === null || _z === void 0 ? void 0 : _z.fontSize }, variant: "quickadd", size: "default", disabled: product.availableForSale === false, onClick: (e) => {
226
224
  e.stopPropagation();
227
225
  onQuickAdd === null || onQuickAdd === void 0 ? void 0 : onQuickAdd(e, product);
228
226
  } }, { children: _jsxs("div", Object.assign({ className: "flex items-center justify-center gap-2" }, { children: [_jsx(Icon, { name: product.availableForSale ? "plus" : "shopping-cart-off", size: "xs" }), product.availableForSale ? "Quick Add" : "Sold Out"] })) }))), _jsxs("div", Object.assign({ className: "w-full flex-col justify-start items-start gap-0 inline-flex" }, { children: [belowBadge && (_jsx("div", Object.assign({ className: cn("mt-2 w-full flex justify-start", {
229
227
  "justify-end": belowBadge.horizontalPosition === "end",
230
- }) }, { children: _jsx(Badge, Object.assign({ size: "plp-layout", alignment: belowBadge.horizontalPosition, icon: belowBadge.image, className: cn("truncate", { rounded: belowBadge.cornerRadius === "rounded" }, { "rounded-none": belowBadge.cornerRadius === "square" }) }, { children: belowBadge.text })) }))), ((_2 = config.productTitle) === null || _2 === void 0 ? void 0 : _2.enabled) && (_jsx("div", Object.assign({ className: "mt-2 w-full" }, { children: _jsx(Text, Object.assign({ type: "body-secondary", className: cn({ uppercase: (_3 = config.productTitle) === null || _3 === void 0 ? void 0 : _3.uppercase }, {
231
- "text-left": ((_4 = config.productTitle) === null || _4 === void 0 ? void 0 : _4.textAlignment) === "left",
228
+ }) }, { children: _jsx(Badge, Object.assign({ size: "plp-layout", alignment: belowBadge.horizontalPosition, icon: belowBadge.image, className: cn("truncate", { rounded: belowBadge.cornerRadius === "rounded" }, { "rounded-none": belowBadge.cornerRadius === "square" }) }, { children: belowBadge.text })) }))), ((_0 = config.productTitle) === null || _0 === void 0 ? void 0 : _0.enabled) && (_jsx("div", Object.assign({ className: "mt-2 w-full" }, { children: _jsx(Text, Object.assign({ type: "body-secondary", className: cn({ uppercase: (_1 = config.productTitle) === null || _1 === void 0 ? void 0 : _1.uppercase }, {
229
+ "text-left": ((_2 = config.productTitle) === null || _2 === void 0 ? void 0 : _2.textAlignment) === "left",
232
230
  }, {
233
- "text-right": ((_5 = config.productTitle) === null || _5 === void 0 ? void 0 : _5.textAlignment) === "right",
231
+ "text-right": ((_3 = config.productTitle) === null || _3 === void 0 ? void 0 : _3.textAlignment) === "right",
234
232
  }, {
235
- "text-center": ((_6 = config.productTitle) === null || _6 === void 0 ? void 0 : _6.textAlignment) === "center",
233
+ "text-center": ((_4 = config.productTitle) === null || _4 === void 0 ? void 0 : _4.textAlignment) === "center",
236
234
  }, {
237
- "line-clamp-2": (_7 = config.productTitle) === null || _7 === void 0 ? void 0 : _7.wrapText,
238
- "line-clamp-1": !((_8 = config.productTitle) === null || _8 === void 0 ? void 0 : _8.wrapText),
239
- }, "text-textColors-productTitle"), style: { fontSize: (_9 = config.productTitle) === null || _9 === void 0 ? void 0 : _9.fontSize } }, { children: title })) }))), _jsxs("div", Object.assign({ className: cn("flex flex-row w-full gap-2 mt-1 justify-end items-center", { "justify-start": ((_10 = config.price) === null || _10 === void 0 ? void 0 : _10.textAlignment) === "left" }, { "justify-end": ((_11 = config.price) === null || _11 === void 0 ? void 0 : _11.textAlignment) === "right" }, { "justify-center": ((_12 = config.price) === null || _12 === void 0 ? void 0 : _12.textAlignment) === "center" }) }, { children: [((_13 = config.price) === null || _13 === void 0 ? void 0 : _13.enabled) && (_jsx(Price, { price: parseFloat(variant.price.amount), isSale: !!variant.compareAtPrice &&
235
+ "line-clamp-2": (_5 = config.productTitle) === null || _5 === void 0 ? void 0 : _5.wrapText,
236
+ "line-clamp-1": !((_6 = config.productTitle) === null || _6 === void 0 ? void 0 : _6.wrapText),
237
+ }, "text-textColors-productTitle"), style: { fontSize: (_7 = config.productTitle) === null || _7 === void 0 ? void 0 : _7.fontSize } }, { children: title })) }))), _jsxs("div", Object.assign({ className: cn("flex flex-row w-full gap-2 mt-1 justify-end items-center", { "justify-start": ((_8 = config.price) === null || _8 === void 0 ? void 0 : _8.textAlignment) === "left" }, { "justify-end": ((_9 = config.price) === null || _9 === void 0 ? void 0 : _9.textAlignment) === "right" }, { "justify-center": ((_10 = config.price) === null || _10 === void 0 ? void 0 : _10.textAlignment) === "center" }) }, { children: [((_11 = config.price) === null || _11 === void 0 ? void 0 : _11.enabled) && (_jsx(Price, { price: parseFloat(variant.price.amount), isSale: !!variant.compareAtPrice &&
240
238
  variant.compareAtPrice &&
241
- parseFloat((_14 = variant.compareAtPrice) === null || _14 === void 0 ? void 0 : _14.amount) >
239
+ parseFloat((_12 = variant.compareAtPrice) === null || _12 === void 0 ? void 0 : _12.amount) >
242
240
  parseFloat(variant.price.amount), compareAtPrice: variant.compareAtPrice &&
243
- parseFloat((_15 = variant.compareAtPrice) === null || _15 === void 0 ? void 0 : _15.amount), currency: tapcartData.currency.code, locale: tapcartData.currency.locale, fontSize: (_16 = config.price) === null || _16 === void 0 ? void 0 : _16.fontSize })), ((_17 = config.favoritesIcon) === null || _17 === void 0 ? void 0 : _17.enabled) &&
241
+ parseFloat((_13 = variant.compareAtPrice) === null || _13 === void 0 ? void 0 : _13.amount), currency: tapcartData.currency.code, locale: tapcartData.currency.locale, fontSize: (_14 = config.price) === null || _14 === void 0 ? void 0 : _14.fontSize })), ((_15 = config.favoritesIcon) === null || _15 === void 0 ? void 0 : _15.enabled) &&
244
242
  config.favoritesIcon.layoutType === "below-image-on-right" && (_jsx("div", Object.assign({ className: "w-8 h-8 flex items-center justify-center" }, { children: _jsx(Favorite, { selected: favorited, onClick: (e) => {
245
243
  onFavoriteClick === null || onFavoriteClick === void 0 ? void 0 : onFavoriteClick(e, product);
246
- }, size: "small", icon: ((_19 = (_18 = config.favoritesIcon) === null || _18 === void 0 ? void 0 : _18.icon) === null || _19 === void 0 ? void 0 : _19.type) === "internal"
247
- ? (_21 = (_20 = config.favoritesIcon) === null || _20 === void 0 ? void 0 : _20.icon) === null || _21 === void 0 ? void 0 : _21.url
248
- : undefined, cornerRadius: (_22 = config.favoritesIcon) === null || _22 === void 0 ? void 0 : _22.cornerRadius, layoutType: (_23 = config.favoritesIcon) === null || _23 === void 0 ? void 0 : _23.layoutType, showBackground: (_24 = config.favoritesIcon) === null || _24 === void 0 ? void 0 : _24.showBackground }) })))] }))] }))] })) })));
244
+ }, size: "small", iconUrl: (_17 = (_16 = config.favoritesIcon) === null || _16 === void 0 ? void 0 : _16.icon) === null || _17 === void 0 ? void 0 : _17.url, cornerRadius: (_18 = config.favoritesIcon) === null || _18 === void 0 ? void 0 : _18.cornerRadius, layoutType: (_19 = config.favoritesIcon) === null || _19 === void 0 ? void 0 : _19.layoutType, showBackground: (_20 = config.favoritesIcon) === null || _20 === void 0 ? void 0 : _20.showBackground }) })))] }))] }))] })) })));
249
245
  };
250
246
  export { ProductCard };
@@ -14,10 +14,10 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
14
14
  import * as React from "react";
15
15
  import { cn } from "../../lib/utils";
16
16
  import { Icon } from "./icon";
17
- const IconButton = ({ icon, handler, className }) => (_jsx("button", Object.assign({ onClick: handler, className: cn("flex items-center justify-center h-8 w-8 bg-stateColors-skeleton outline outline-1 outline-stateColors-skeleton", className) }, { children: _jsx(Icon, { name: icon, size: "sm", color: "coreColors-secondaryIcon" }) })));
17
+ const IconButton = ({ icon, handler, className }) => (_jsx("button", Object.assign({ onClick: handler, className: cn("flex items-center justify-center h-7 w-7 bg-stateColors-skeleton outline outline-1 outline-stateColors-skeleton", className) }, { children: _jsx(Icon, { name: icon, size: "sm", color: "coreColors-secondaryIcon" }) })));
18
18
  const QuantityPicker = React.forwardRef((_a, ref) => {
19
19
  var { className, decreaseIcon, increaseIcon, deleteIcon, onDecreaseClick, onIncreaseClick, value, setValue } = _a, props = __rest(_a, ["className", "decreaseIcon", "increaseIcon", "deleteIcon", "onDecreaseClick", "onIncreaseClick", "value", "setValue"]);
20
- return (_jsxs("div", Object.assign({ className: cn("flex", className), ref: ref }, props, { children: [_jsx(IconButton, { handler: onDecreaseClick, icon: value === 1 ? deleteIcon : decreaseIcon, className: "rounded-tl rounded-bl" }), _jsx("div", Object.assign({ className: "w-12 py-1 flex justify-center bg-coreColors-inputBackground outline outline-1 outline-coreColors-dividingLines text-[15px] font-sfpro-roboto leading-[160%] font-normal text-textColors-primaryColor" }, { children: _jsx("input", { type: "tel", pattern: "[0-9]*", value: value, onBlur: (e) => (e.target.value = value.toString()), onFocus: (e) => (e.target.value = ""), onChange: (e) => setValue(parseInt(e.target.value) || 0), className: "w-8 focus-visible:outline-none text-center" }) })), _jsx(IconButton, { handler: onIncreaseClick, icon: increaseIcon, className: "rounded-tr rounded-br" })] })));
20
+ return (_jsxs("div", Object.assign({ className: cn("flex", className), ref: ref }, props, { children: [_jsx(IconButton, { handler: onDecreaseClick, icon: value === 1 ? deleteIcon : decreaseIcon, className: "rounded-tl rounded-bl" }), _jsx("div", Object.assign({ className: "w-8 h-7 py-1 flex justify-center bg-coreColors-inputBackground outline outline-1 outline-coreColors-dividingLines text-[14px] font-sfpro-roboto leading-[160%] font-normal text-textColors-primaryColor" }, { children: _jsx("input", { type: "tel", pattern: "[0-9]*", value: value, onBlur: (e) => (e.target.value = value.toString()), onFocus: (e) => (e.target.value = ""), onChange: (e) => setValue(parseInt(e.target.value) || 0), className: "w-8 focus-visible:outline-none text-center" }) })), _jsx(IconButton, { handler: onIncreaseClick, icon: increaseIcon, className: "rounded-tr rounded-br" })] })));
21
21
  });
22
22
  QuantityPicker.displayName = "QuantityPicker";
23
23
  export { QuantityPicker };
@@ -1 +1 @@
1
- {"version":3,"file":"selectors.d.ts","sourceRoot":"","sources":["../../../components/ui/selectors.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAO,KAA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AAQ,CAAC,GAC5D,YAAY,CAAC,OAAO,iBAAiB,CAAC,GAAG;IACvC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,QAAQ,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,GAAG,SAAS,CAAA;CAClE,CAAA;AAEH,QAAA,MAAM,SAAS;;;;;;;;;eAHA,MAAM,iBAAiB,CAAC,iBAAiB,CAAC,GAAG,SAAS;2CA2CpE,CAAA;AACD,KAAK,sBAAsB,GAAG;IAC5B,QAAQ,EACJ,KAAK,CAAC,YAAY,CAAC,cAAc,CAAC,EAAE,GACpC,KAAK,CAAC,YAAY,CAAC,cAAc,CAAC,CAAA;IACtC,YAAY,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAA;IAC7C,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AACD,QAAA,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CA6CvD,CAAA;AAID,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,iBAAiB,EAAE,CAAA"}
@@ -55,7 +55,7 @@ const SelectorContainer = ({ children, containerRef, className, }) => {
55
55
  React.useEffect(() => {
56
56
  checkOverflow();
57
57
  }, [children]);
58
- return (_jsx("div", Object.assign({ className: "relative no-scrollbar" }, { children: _jsxs("div", Object.assign({ className: cn("flex gap-2 px-1 h-[42px] items-center overflow-x-auto overflow-y-hidden no-scrollbar", className), onScroll: checkOverflow, ref: containerRef }, { children: [children, showFadeLeft && (_jsx("div", { className: "absolute top-0 left-0 w-8 h-full pointer-events-none bg-fade-left" })), showFadeRight && (_jsx("div", { className: "absolute top-0 right-0 w-8 h-full pointer-events-none bg-fade-right" }))] })) })));
58
+ return (_jsx("div", Object.assign({ className: "relative no-scrollbar" }, { children: _jsxs("div", Object.assign({ className: cn("flex gap-2 px-1 h-[42px] items-center overflow-x-auto overflow-y-hidden no-scrollbar", className), onScroll: checkOverflow, ref: containerRef }, { children: [children, showFadeLeft && (_jsx("div", { className: "absolute top-0 left-0 w-8 h-full pointer-events-none" })), showFadeRight && (_jsx("div", { className: "absolute top-0 right-0 w-8 h-full pointer-events-none " }))] })) })));
59
59
  };
60
60
  Selectors.displayName = "Selectors";
61
61
  export { SelectorContainer, Selectors, selectorsVariants };
@@ -41,7 +41,7 @@ const Slider = React.forwardRef((_a, ref) => {
41
41
  const debouncedSliderVal = useDebounce(value, 200);
42
42
  return (_jsxs(_Fragment, { children: [_jsx("div", Object.assign({ className: "mt-3 mb-6" }, { children: _jsxs(SliderPrimitive.Root, Object.assign({ ref: ref, className: cn("flex relative h-0.5 w-auto items-center select-none", className), onValueChange: (value) => onChange(value), onValueCommit: (value) => {
43
43
  handleCommit(value);
44
- }, defaultValue: defaultValue, value: value, max: max, min: min, step: step }, props, { children: [_jsx(SliderPrimitive.Track, Object.assign({ className: "relative h-1 rounded w-full grow overflow-hidden bg-coreColors-dividingLines" }, { children: _jsx(SliderPrimitive.Range, { className: "absolute h-full bg-coreColors-brandColorPrimary" }) })), _jsx(SliderPrimitive.Thumb, { className: "block hover:slider-thumb h-4 w-4 rounded-full border-2 border-coreColors-brandColorPrimary bg-coreColors-modalBackground focus-visible:outline-none hover:h-[18px] hover:w-[18px] disabled:pointer-events-none" })] })) })), _jsxs("div", Object.assign({ className: "flex w-auto gap-4 " }, { children: [doubleValue && doubleValue == true ? (_jsxs(_Fragment, { children: [_jsx("div", Object.assign({ className: "w-full px-4 py-2 border bg-coreColors-inputBackground" }, { children: _jsxs("div", Object.assign({ className: "flex flex-col" }, { children: [_jsx("div", Object.assign({ className: "h-4 text-textColors-secondaryColor text-[10px] leading-[13px]" }, { children: "Minimum" })), _jsxs("div", Object.assign({ className: "flex text-textColors-primaryColor text-[15px]" }, { children: ["$", min] }))] })) })), _jsx("div", { className: "w-4 h-0 self-center border-2 bg-coreColors-dividingLines" })] })) : (""), _jsx("div", Object.assign({ className: "w-full px-4 py-2 outline outline-1 outline-coreColors-dividingLines rounded bg-coreColors-inputBackground" }, { children: _jsxs("div", Object.assign({ className: "flex flex-col" }, { children: [_jsx("div", Object.assign({ className: "flex items-center h-4 text-textColors-secondaryColor text-[10px] leading-[13px]" }, { children: "Maximum" })), _jsxs("div", Object.assign({ className: "flex h-6 text-textColors-primaryColor text-[15px] w-full [&>div]:w-full" }, { children: ["$", _jsx(Input, { className: "border-0 p-0 h-full w-full text-[15px]", id: "slider-maximum", value: debouncedSliderVal[0].toString(), placeholder: defaultValue[0].toString(), onChange: (value) => {
44
+ }, defaultValue: defaultValue, value: value, max: max, min: min, step: step }, props, { children: [_jsx(SliderPrimitive.Track, Object.assign({ className: "relative h-1 rounded w-full grow overflow-hidden bg-coreColors-dividingLines" }, { children: _jsx(SliderPrimitive.Range, { className: "absolute h-full bg-coreColors-brandColorPrimary" }) })), _jsx(SliderPrimitive.Thumb, { className: "block hover:slider-thumb h-4 w-4 rounded-full border-2 border-coreColors-brandColorPrimary bg-coreColors-modalBackground focus-visible:outline-none hover:h-[18px] hover:w-[18px] disabled:pointer-events-none" })] })) })), _jsxs("div", Object.assign({ className: "flex w-auto gap-4 " }, { children: [doubleValue && doubleValue == true ? (_jsxs(_Fragment, { children: [_jsx("div", Object.assign({ className: "w-full px-4 py-2 border bg-coreColors-inputBackground" }, { children: _jsxs("div", Object.assign({ className: "flex flex-col" }, { children: [_jsx("div", Object.assign({ className: "h-4 text-textColors-secondaryColor text-[10px] leading-[13px]" }, { children: "Minimum" })), _jsxs("div", Object.assign({ className: "flex text-textColors-primaryColor text-[14px]" }, { children: ["$", min] }))] })) })), _jsx("div", { className: "w-4 h-0 self-center border-2 bg-coreColors-dividingLines" })] })) : (""), _jsx("div", Object.assign({ className: "w-full px-4 py-2 outline outline-1 outline-coreColors-dividingLines rounded bg-coreColors-inputBackground" }, { children: _jsxs("div", Object.assign({ className: "flex flex-col" }, { children: [_jsx("div", Object.assign({ className: "flex items-center h-4 text-textColors-secondaryColor text-[10px] leading-[13px]" }, { children: "Maximum" })), _jsxs("div", Object.assign({ className: "flex h-6 text-textColors-primaryColor text-[14px] w-full [&>div]:w-full" }, { children: ["$", _jsx(Input, { className: "border-0 p-0 h-full w-full text-[14px]", id: "slider-maximum", value: debouncedSliderVal[0].toString(), placeholder: defaultValue[0].toString(), onChange: (value) => {
45
45
  const inputValue = Number(value);
46
46
  inputValue > max ? onChange([max]) : onChange([inputValue]);
47
47
  } })] }))] })) }))] }))] }));
@@ -1 +1 @@
1
- {"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../../components/ui/text.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAGjE,QAAA,MAAM,YAAY;;mFAgBhB,CAAA;AAEF,MAAM,WAAW,SACf,SAAQ,KAAK,CAAC,cAAc,CAAC,oBAAoB,CAAC,EAChD,YAAY,CAAC,OAAO,YAAY,CAAC;IAC/B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAC1B;AAEL,iBAAS,IAAI,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,SAAS,2CAIhE;AAED,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,CAAA"}
1
+ {"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../../components/ui/text.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAGjE,QAAA,MAAM,YAAY;;mFAgBhB,CAAA;AAEF,MAAM,WAAW,SACf,SAAQ,KAAK,CAAC,cAAc,CAAC,oBAAoB,CAAC,EAChD,YAAY,CAAC,OAAO,YAAY,CAAC;IACnC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAC1B;AAED,iBAAS,IAAI,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,SAAS,2CAUhE;AAED,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,CAAA"}
@@ -17,7 +17,7 @@ const textVariants = cva("", {
17
17
  type: {
18
18
  h1: "text-[23px] font-fontRegular leading-[130%] font-normal text-textColors-primaryColor",
19
19
  h2: "text-lg font-fontMedium leading-[130%] font-medium text-textColors-primaryColor",
20
- "body-primary": "text-[15px] font-fontRegular leading-[160%] font-normal text-textColors-primaryColor",
20
+ "body-primary": "text-[14px] font-fontRegular leading-[160%] font-normal text-textColors-primaryColor",
21
21
  "body-secondary": "text-[12px] font-fontRegular leading-[130%] font-normal text-textColors-secondaryColor",
22
22
  label: "text-[10px] font-fontRegular leading-[130%] font-normal text-textColors-secondaryColor",
23
23
  },
@@ -29,6 +29,6 @@ const textVariants = cva("", {
29
29
  function Text(_a) {
30
30
  var { className, type, fontColor } = _a, props = __rest(_a, ["className", "type", "fontColor"]);
31
31
  const fontColorOverride = fontColor ? { color: fontColor } : {};
32
- return _jsx("p", Object.assign({ className: cn(textVariants({ type }), className), style: fontColorOverride }, props));
32
+ return (_jsx("p", Object.assign({ className: cn(textVariants({ type }), className), style: fontColorOverride }, props)));
33
33
  }
34
34
  export { Text, textVariants };
@@ -1 +1 @@
1
- {"version":3,"file":"textarea.d.ts","sourceRoot":"","sources":["../../../components/ui/textarea.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAGjE,QAAA,MAAM,gBAAgB;;mFAarB,CAAA;AAED,MAAM,WAAW,aACf,SAAQ,IAAI,CAAC,KAAK,CAAC,sBAAsB,CAAC,mBAAmB,CAAC,EAAE,UAAU,CAAC,EACzE,YAAY,CAAC,OAAO,gBAAgB,CAAC;IACvC,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;CAC9B;AAED,QAAA,MAAM,QAAQ,2FA6Eb,CAAA;AAGD,OAAO,EAAE,QAAQ,EAAE,CAAA"}
1
+ {"version":3,"file":"textarea.d.ts","sourceRoot":"","sources":["../../../components/ui/textarea.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAGjE,QAAA,MAAM,gBAAgB;;mFAarB,CAAA;AAED,MAAM,WAAW,aACf,SAAQ,IAAI,CAAC,KAAK,CAAC,sBAAsB,CAAC,mBAAmB,CAAC,EAAE,UAAU,CAAC,EACzE,YAAY,CAAC,OAAO,gBAAgB,CAAC;IACvC,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;CAC9B;AAED,QAAA,MAAM,QAAQ,2FAkFb,CAAA;AAGD,OAAO,EAAE,QAAQ,EAAE,CAAA"}
@@ -48,7 +48,11 @@ const Textarea = React.forwardRef((_a, ref) => {
48
48
  return (_jsxs(Comp, Object.assign({ className: cn(textareaVariants({ error }), content ? "pt-6 pb-2" : "pt-4 pb-4", className), onClick: focusTextarea }, { children: [_jsx("textarea", Object.assign({ placeholder: placeholder, value: value, onChange: (e) => {
49
49
  onChange(e.target.value);
50
50
  handleChange(e.target.value);
51
- }, id: id, className: cn("textarea-component overflow-y-auto w-full resize-none text-[15px] font-fontRegular leading-[160%] font-normal min-h-[24px] align-top placeholder-shown:!truncate text-textColors-primaryColor ring-offset-background file:border-0 file:bg-transparent placeholder-shown:text-textColors-secondaryColor focus-visible:outline-none focus-visible:ring-0 disabled:cursor-not-allowed disabled:opacity-50 focus:border-coreColors-brandColorPrimary peer", { "pr-1": (textareaRef.current && maxHeight && textareaRef.current.scrollHeight >= maxHeight) }), style: { maxHeight: `${maxHeight}px` }, "data-text": "Enter text here", rows: 1, ref: textareaRef }, props)), label ? (_jsx("label", Object.assign({ htmlFor: id, style: { maxWidth: `-webkit-fill-available` }, className: "absolute truncate text-[10px] pr-4 text-textColors-secondaryColor top-2 z-10 h-4 origin-[0] start-4 opacity-100 peer-placeholder-shown:opacity-0" }, { children: label }))) : null] })));
51
+ }, id: id, className: cn("textarea-component overflow-y-auto w-full resize-none text-[14px] font-fontRegular leading-[160%] font-normal min-h-[24px] align-top placeholder-shown:!truncate text-textColors-primaryColor ring-offset-background file:border-0 file:bg-transparent placeholder-shown:text-textColors-secondaryColor focus-visible:outline-none focus-visible:ring-0 disabled:cursor-not-allowed disabled:opacity-50 focus:border-coreColors-brandColorPrimary peer", {
52
+ "pr-1": textareaRef.current &&
53
+ maxHeight &&
54
+ textareaRef.current.scrollHeight >= maxHeight,
55
+ }), style: { maxHeight: `${maxHeight}px` }, "data-text": "Enter text here", rows: 1, ref: textareaRef }, props)), label ? (_jsx("label", Object.assign({ htmlFor: id, style: { maxWidth: `-webkit-fill-available` }, className: "absolute truncate text-[10px] pr-4 text-textColors-secondaryColor top-2 z-10 h-4 origin-[0] start-4 opacity-100 peer-placeholder-shown:opacity-0" }, { children: label }))) : null] })));
52
56
  });
53
57
  Textarea.displayName = "Textarea";
54
58
  export { Textarea };
@@ -0,0 +1,43 @@
1
+ import * as React from "react";
2
+ import { Translations } from "app-studio-types";
3
+ interface SelectProps<T> {
4
+ children: React.ReactElement<{
5
+ value: T;
6
+ onSelect?: () => void;
7
+ isTrigger?: boolean;
8
+ isSelected?: boolean;
9
+ translations: Translations;
10
+ children: ({ isTrigger, translations, }: {
11
+ isTrigger: boolean;
12
+ translations: Translations;
13
+ }) => React.ReactNode;
14
+ }>[];
15
+ defaultValue?: T;
16
+ onChange?: (value: T) => void;
17
+ onOpenChange?: (isOpen: boolean) => void;
18
+ onCreateNew?: () => void;
19
+ translations: Translations;
20
+ }
21
+ declare const WishlistSelect: React.ForwardRefExoticComponent<SelectProps<unknown> & React.RefAttributes<HTMLDivElement>>;
22
+ interface SelectTriggerProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
23
+ isTrigger?: boolean;
24
+ children: React.ReactNode;
25
+ }
26
+ declare const WishlistSelectTrigger: React.ForwardRefExoticComponent<SelectTriggerProps & React.RefAttributes<HTMLButtonElement>>;
27
+ interface SelectContentProps {
28
+ children: React.ReactNode;
29
+ isOpen: boolean;
30
+ className?: string;
31
+ }
32
+ declare const WishlistSelectContent: React.ForwardRefExoticComponent<SelectContentProps & React.RefAttributes<HTMLDivElement>>;
33
+ interface SelectItemProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "children"> {
34
+ onSelect?: () => void;
35
+ isSelected?: boolean;
36
+ isTrigger?: boolean;
37
+ children: React.ReactNode | (({ isTrigger }: {
38
+ isTrigger: boolean;
39
+ }) => React.ReactNode);
40
+ }
41
+ declare const WishlistSelectItem: React.ForwardRefExoticComponent<SelectItemProps & React.RefAttributes<HTMLDivElement>>;
42
+ export { WishlistSelect, WishlistSelectTrigger, WishlistSelectContent, WishlistSelectItem, };
43
+ //# sourceMappingURL=wishlist-select.d.ts.map
@@ -0,0 +1 @@
1
+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MAAM,qBAAqB,2FAkBzB,CAAA;AAGF,UAAU,eACR,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC;IAC9D,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,QAAQ,EACJ,KAAK,CAAC,SAAS,GACf,CAAC,CAAC,EAAE,SAAS,EAAE,EAAE;QAAE,SAAS,EAAE,OAAO,CAAA;KAAE,KAAK,KAAK,CAAC,SAAS,CAAC,CAAA;CACjE;AAED,QAAA,MAAM,kBAAkB,wFAmBvB,CAAA;AAGD,OAAO,EACL,cAAc,EACd,qBAAqB,EACrB,qBAAqB,EACrB,kBAAkB,GACnB,CAAA"}
@@ -0,0 +1,88 @@
1
+ "use client";
2
+ var __rest = (this && this.__rest) || function (s, e) {
3
+ var t = {};
4
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
+ t[p] = s[p];
6
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
+ t[p[i]] = s[p[i]];
10
+ }
11
+ return t;
12
+ };
13
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
14
+ import * as React from "react";
15
+ import { ChevronDown } from "lucide-react";
16
+ import { cn } from "../../lib/utils";
17
+ import { CreateNew, Wishlist } from "./wishlist";
18
+ const WishlistSelect = React.forwardRef(({ children, defaultValue, onChange, onOpenChange, onCreateNew, translations, }, ref) => {
19
+ const [isOpen, setIsOpen] = React.useState(false);
20
+ const [selectedValue, setSelectedValue] = React.useState(defaultValue);
21
+ const triggerRef = React.useRef(null);
22
+ const contentRef = React.useRef(null);
23
+ // useEffect for click outside listener
24
+ React.useEffect(() => {
25
+ const handleClickOutside = (event) => {
26
+ if (isOpen &&
27
+ triggerRef.current &&
28
+ contentRef.current &&
29
+ !triggerRef.current.contains(event.target) &&
30
+ !contentRef.current.contains(event.target)) {
31
+ setIsOpen(false);
32
+ onOpenChange && onOpenChange(false);
33
+ }
34
+ };
35
+ document.addEventListener("mousedown", handleClickOutside);
36
+ return () => {
37
+ document.removeEventListener("mousedown", handleClickOutside);
38
+ };
39
+ }, [isOpen, onOpenChange]);
40
+ const handleSelect = (value) => {
41
+ setSelectedValue(value);
42
+ setIsOpen(false);
43
+ onChange && onChange(value);
44
+ onOpenChange && onOpenChange(false);
45
+ };
46
+ const handleToggle = () => {
47
+ const newIsOpen = !isOpen;
48
+ setIsOpen(newIsOpen);
49
+ onOpenChange && onOpenChange(newIsOpen);
50
+ };
51
+ const handleCreateNew = () => {
52
+ onCreateNew && onCreateNew();
53
+ setIsOpen(false);
54
+ onOpenChange && onOpenChange(false);
55
+ };
56
+ const selectedChild = React.Children.toArray(children).find((child) => React.isValidElement(child) && child.props.value === selectedValue);
57
+ return (_jsxs("div", Object.assign({ className: "relative", ref: ref }, { children: [_jsxs(WishlistSelectTrigger, Object.assign({ ref: triggerRef, onClick: handleToggle }, { children: [_jsx(WishlistSelectItem, Object.assign({ isTrigger: true }, { children: selectedChild ? (selectedChild.props.children({ isTrigger: true, translations })) : (_jsx(Wishlist, { name: translations["wishlist-multiple-create-text-field-placeholder"], isTrigger: true, translations: translations })) })), _jsx(ChevronDown, { className: cn("h-4 w-4 opacity-50 mr-4 transition-transform duration-200 ease-in-out", isOpen && "transform rotate-180") })] })), _jsxs(WishlistSelectContent, Object.assign({ isOpen: isOpen, ref: contentRef }, { children: [React.Children.map(children, (child) => React.isValidElement(child)
58
+ ? React.cloneElement(child, {
59
+ onSelect: () => handleSelect(child.props.value),
60
+ isSelected: child.props.value === selectedValue,
61
+ translations,
62
+ }, child.props.children({ isTrigger: false, translations }))
63
+ : child), _jsx("div", Object.assign({ className: "sticky bottom-0 bg-coreColors-inputBackground border-t border-coreColors-dividingLines" }, { children: _jsx(CreateNew, { onClick: handleCreateNew, translations: translations }) }))] }))] })));
64
+ });
65
+ WishlistSelect.displayName = "WishlistSelect";
66
+ const WishlistSelectTrigger = React.forwardRef((_a, ref) => {
67
+ var { className, children, isTrigger = false } = _a, props = __rest(_a, ["className", "children", "isTrigger"]);
68
+ return (_jsx("button", Object.assign({ ref: ref, className: cn("flex w-full items-center justify-between rounded-md border border-coreColors-brandColorPrimary bg-coreColors-inputBackground text-sm placeholder:text-coreColors-brandColorPrimary disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1", className), style: {
69
+ WebkitTapHighlightColor: "transparent",
70
+ } }, props, { children: children })));
71
+ });
72
+ WishlistSelectTrigger.displayName = "WishlistSelectTrigger";
73
+ const WishlistSelectContent = React.forwardRef((_a, ref) => {
74
+ var { className, children, isOpen } = _a, props = __rest(_a, ["className", "children", "isOpen"]);
75
+ return (_jsx("div", Object.assign({ ref: ref, className: cn("mt-1 absolute z-50 w-full max-h-[200px] overflow-y-auto rounded-md bg-coreColors-inputBackground shadow-md border border-coreColors-brandColorPrimary", "transition-all duration-300 ease-in-out", isOpen
76
+ ? "opacity-100 translate-y-0"
77
+ : "opacity-0 translate-y-[-10px] pointer-events-none", className) }, props, { children: children })));
78
+ });
79
+ WishlistSelectContent.displayName = "WishlistSelectContent";
80
+ const WishlistSelectItem = React.forwardRef((_a, ref) => {
81
+ var { className, children, onSelect, isSelected, isTrigger } = _a, props = __rest(_a, ["className", "children", "onSelect", "isSelected", "isTrigger"]);
82
+ return (_jsx("div", Object.assign({ ref: ref, className: cn("relative flex w-full cursor-pointer select-none items-center text-sm outline-none", !isTrigger &&
83
+ "border-b border-coreColors-dividingLines last:border-b-0", isSelected && "bg-stateColors-skeleton", className), onClick: onSelect }, props, { children: typeof children === "function"
84
+ ? children({ isTrigger: isTrigger || false })
85
+ : children })));
86
+ });
87
+ WishlistSelectItem.displayName = "WishlistSelectItem";
88
+ export { WishlistSelect, WishlistSelectTrigger, WishlistSelectContent, WishlistSelectItem, };
@@ -1,13 +1,24 @@
1
1
  import * as React from "react";
2
+ import { Translations } from "app-studio-types";
2
3
  export interface WishlistProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
3
- imgUrl?: string;
4
- name: string;
5
- amount: number;
4
+ name?: string;
5
+ amount?: number;
6
6
  selected?: boolean;
7
7
  onClick?: () => void;
8
8
  className?: string;
9
+ imgUrl?: string;
10
+ aspectRatio?: string;
11
+ objectFit?: "none" | "fit" | "fill" | "cover" | "contain" | "scale-down";
12
+ isTrigger?: boolean;
13
+ translations: Translations;
9
14
  }
10
15
  declare const PlaceholderIcon: () => import("react/jsx-runtime").JSX.Element;
11
16
  declare const Wishlist: React.ForwardRefExoticComponent<WishlistProps & React.RefAttributes<HTMLButtonElement>>;
12
- export { Wishlist, PlaceholderIcon };
17
+ export interface CreateNewProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
18
+ selected?: boolean;
19
+ className?: string;
20
+ translations: Translations;
21
+ }
22
+ declare const CreateNew: React.ForwardRefExoticComponent<CreateNewProps & React.RefAttributes<HTMLButtonElement>>;
23
+ export { CreateNew, Wishlist, PlaceholderIcon };
13
24
  //# sourceMappingURL=wishlist.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"wishlist.d.ts","sourceRoot":"","sources":["../../../components/ui/wishlist.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAO9B,MAAM,WAAW,aACf,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IACrD,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,QAAA,MAAM,eAAe,+CAIpB,CAAA;AAED,QAAA,MAAM,QAAQ,yFAuCb,CAAA;AAID,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,CAAA"}
1
+ {"version":3,"file":"wishlist.d.ts","sourceRoot":"","sources":["../../../components/ui/wishlist.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAC/C,MAAM,WAAW,aACf,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IACrD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,YAAY,CAAA;IACxE,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,YAAY,EAAE,YAAY,CAAA;CAC3B;AAED,QAAA,MAAM,eAAe,+CAIpB,CAAA;AAED,QAAA,MAAM,QAAQ,yFA+Db,CAAA;AAID,MAAM,WAAW,cACf,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IACrD,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,YAAY,EAAE,YAAY,CAAA;CAC3B;AAED,QAAA,MAAM,SAAS,0FAwBd,CAAA;AAID,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,eAAe,EAAE,CAAA"}
@@ -10,14 +10,22 @@ var __rest = (this && this.__rest) || function (s, e) {
10
10
  return t;
11
11
  };
12
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
+ /* eslint-disable @next/next/no-img-element */
13
14
  import * as React from "react";
14
15
  import { Text } from "./text";
15
16
  import { cn } from "../../lib/utils";
16
17
  import { Icon } from "./icon";
17
- const PlaceholderIcon = () => (_jsx("div", Object.assign({ className: "flex-shrink-0 flex items-center justify-center h-10 w-10 bg-stateColors-skeleton rounded-sm" }, { children: _jsx(Icon, { name: "heart-filled", size: "sm", color: "stateColors-disabled" }) })));
18
+ const PlaceholderIcon = () => (_jsx("div", Object.assign({ className: "flex-shrink-0 flex items-center justify-center h-10 w-10 bg-stateColors-skeleton rounded-sm" }, { children: _jsx(Icon, { name: "heart-filled", size: "sm", color: "coreColors-secondaryIcon" }) })));
18
19
  const Wishlist = React.forwardRef((_a, ref) => {
19
- var { imgUrl, name, amount, selected = false, onClick, className } = _a, props = __rest(_a, ["imgUrl", "name", "amount", "selected", "onClick", "className"]);
20
- return (_jsxs("button", Object.assign({ className: cn("flex flex-row items-center px-4 py-2 w-full border-b border-coreColors-dividingLines", selected ? "bg-stateColors-skeleton" : "", className), ref: ref, onClick: onClick }, props, { children: [imgUrl ? (_jsx("img", { alt: "wishlist-image", className: "flex-shrink-0 h-10 w-10 border border-coreColors-dividingLines rounded-sm", src: imgUrl })) : (_jsx(PlaceholderIcon, {})), _jsxs("div", Object.assign({ className: "flex flex-col items-start ml-2 space-y-1 overflow-hidden" }, { children: [_jsx(Text, Object.assign({ type: "body-primary", className: "w-full overflow-hidden text-ellipsis whitespace-nowrap" }, { children: name })), _jsx(Text, Object.assign({ type: "body-secondary", className: "h-4" }, { children: `${amount} item${amount !== 1 ? "s" : ""}` }))] }))] })));
20
+ var { selected = false, onClick, className, name, amount, imgUrl, aspectRatio, objectFit, isTrigger, translations } = _a, props = __rest(_a, ["selected", "onClick", "className", "name", "amount", "imgUrl", "aspectRatio", "objectFit", "isTrigger", "translations"]);
21
+ return (_jsxs("button", Object.assign({ className: cn("flex flex-row items-center px-4 py-2 w-full ", selected ? "bg-stateColors-skeleton" : "", className), ref: ref, onClick: onClick }, props, { children: [imgUrl ? (_jsx("div", Object.assign({ className: "flex-shrink-0 h-10 w-10 border border-coreColors-dividingLines rounded-sm overflow-hidden" }, { children: _jsx("img", { alt: "wishlist-image", src: `${imgUrl}?width=40`, width: 40, height: 40, className: cn("rounded-sm w-full h-full", objectFit === "contain" ? "object-contain" : "object-cover") }) }))) : (_jsx(PlaceholderIcon, {})), _jsxs("div", Object.assign({ className: "flex flex-col items-start ml-2 space-y-1 overflow-hidden" }, { children: [isTrigger && _jsx(Text, Object.assign({ type: "body-secondary" }, { children: "Wishlists" })), _jsx(Text, Object.assign({ type: "body-primary", className: "w-full overflow-hidden text-ellipsis whitespace-nowrap" }, { children: name })), !isTrigger && (_jsx(Text, Object.assign({ type: "body-secondary" }, { children: `${amount} ${amount !== 1
22
+ ? translations["cart-checkout-items"]
23
+ : translations["cart-checkout-item"]}` })))] }))] })));
21
24
  });
22
25
  Wishlist.displayName = "Wishlist";
23
- export { Wishlist, PlaceholderIcon };
26
+ const CreateNew = React.forwardRef((_a, ref) => {
27
+ var { selected = false, onClick, className, translations } = _a, props = __rest(_a, ["selected", "onClick", "className", "translations"]);
28
+ return (_jsx("button", Object.assign({ className: cn("flex flex-row items-center w-full relative py-2", "active:bg-black/10 transition-colors duration-150", className), ref: ref, onClick: onClick }, props, { children: _jsx("div", Object.assign({ className: "flex flex-col items-center justify-center m-auto space-y-1 overflow-hidden h-10" }, { children: _jsxs(Text, Object.assign({ type: "body-primary", className: "w-full text-center text-coreColors-brandColorPrimary" }, { children: ["+ ", translations["wishlist-dropdown-create-list-button"]] })) })) })));
29
+ });
30
+ CreateNew.displayName = "CreateNew";
31
+ export { CreateNew, Wishlist, PlaceholderIcon };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,9 @@
1
1
  export { cn, cva, getColor } from "./lib/utils";
2
+ export * from "./components/hooks/use-collection";
2
3
  export * from "./components/hooks/use-infinite-scroll";
3
4
  export * from "./components/hooks/use-recommendations";
4
5
  export * from "./components/hooks/use-products";
6
+ export * from "./components/hooks/use-products";
5
7
  export * from "./components/hooks/use-scroll-direction";
6
8
  export * from "./components/ui/accordion";
7
9
  export * from "./components/ui/aspect-ratio";
@@ -44,4 +46,6 @@ export * from "./components/ui/toggle";
44
46
  export * from "./components/ui/use-toast";
45
47
  export * from "./components/ui/video";
46
48
  export * from "./components/ui/wishlist";
49
+ export * from "./components/hooks/use-product-options";
50
+ export * from "./components/ui/wishlist-select";
47
51
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAC/C,cAAc,wCAAwC,CAAA;AACtD,cAAc,wCAAwC,CAAA;AACtD,cAAc,iCAAiC,CAAA;AAC/C,cAAc,yCAAyC,CAAA;AACvD,cAAc,2BAA2B,CAAA;AACzC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,uBAAuB,CAAA;AACrC,cAAc,wBAAwB,CAAA;AACtC,cAAc,0BAA0B,CAAA;AACxC,cAAc,0BAA0B,CAAA;AACxC,cAAc,sBAAsB,CAAA;AACpC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,2BAA2B,CAAA;AACzC,cAAc,wBAAwB,CAAA;AACtC,cAAc,0BAA0B,CAAA;AACxC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,0BAA0B,CAAA;AACxC,cAAc,sBAAsB,CAAA;AACpC,cAAc,sBAAsB,CAAA;AACpC,cAAc,uBAAuB,CAAA;AACrC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,uBAAuB,CAAA;AACrC,cAAc,sCAAsC,CAAA;AACpD,cAAc,uBAAuB,CAAA;AACrC,cAAc,uBAAuB,CAAA;AACrC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,iCAAiC,CAAA;AAC/C,cAAc,6BAA6B,CAAA;AAC3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ACrC,cAAc,sCAAsC,CAAA;AACpD,cAAc,uBAAuB,CAAA;AACrC,cAAc,uBAAuB,CAAA;AACrC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,iCAAiC,CAAA;AAC/C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,2BAA2B,CAAA;AACzC,cAAc,2BAA2B,CAAA;AACzC,cAAc,0BAA0B,CAAA;AACxC,cAAc,wBAAwB,CAAA;AACtC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,wBAAwB,CAAA;AACtC,cAAc,sBAAsB,CAAA;AACpC,cAAc,sBAAsB,CAAA;AACpC,cAAc,0BAA0B,CAAA;AACxC,cAAc,uBAAuB,CAAA;AACrC,cAAc,yBAAyB,CAAA;AACvC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,wBAAwB,CAAA;AACtC,cAAc,2BAA2B,CAAA;AACzC,cAAc,uBAAuB,CAAA;AACrC,cAAc,0BAA0B,CAAA;AACxC,cAAc,wCAAwC,CAAA;AACtD,cAAc,iCAAiC,CAAA"}
package/dist/index.js CHANGED
@@ -1,8 +1,10 @@
1
1
  // component exports
2
2
  export { cn, cva, getColor } from "./lib/utils";
3
+ export * from "./components/hooks/use-collection";
3
4
  export * from "./components/hooks/use-infinite-scroll";
4
5
  export * from "./components/hooks/use-recommendations";
5
6
  export * from "./components/hooks/use-products";
7
+ export * from "./components/hooks/use-products";
6
8
  export * from "./components/hooks/use-scroll-direction";
7
9
  export * from "./components/ui/accordion";
8
10
  export * from "./components/ui/aspect-ratio";
@@ -45,3 +47,5 @@ export * from "./components/ui/toggle";
45
47
  export * from "./components/ui/use-toast";
46
48
  export * from "./components/ui/video";
47
49
  export * from "./components/ui/wishlist";
50
+ export * from "./components/hooks/use-product-options";
51
+ export * from "./components/ui/wishlist-select";
package/dist/styles.css CHANGED
@@ -673,6 +673,9 @@ video {
673
673
  .relative {
674
674
  position: relative;
675
675
  }
676
+ .sticky {
677
+ position: sticky;
678
+ }
676
679
  .inset-0 {
677
680
  inset: 0px;
678
681
  }
@@ -707,9 +710,15 @@ video {
707
710
  .bottom-\[18px\] {
708
711
  bottom: 18px;
709
712
  }
713
+ .bottom-\[30px\] {
714
+ bottom: 30px;
715
+ }
710
716
  .bottom-\[58px\] {
711
717
  bottom: 58px;
712
718
  }
719
+ .bottom-\[70px\] {
720
+ bottom: 70px;
721
+ }
713
722
  .end-4 {
714
723
  inset-inline-end: 1rem;
715
724
  }
@@ -722,6 +731,9 @@ video {
722
731
  .left-2 {
723
732
  left: 0.5rem;
724
733
  }
734
+ .left-4 {
735
+ left: 1rem;
736
+ }
725
737
  .left-6 {
726
738
  left: 1.5rem;
727
739
  }
@@ -734,6 +746,9 @@ video {
734
746
  .right-2 {
735
747
  right: 0.5rem;
736
748
  }
749
+ .right-4 {
750
+ right: 1rem;
751
+ }
737
752
  .start-10 {
738
753
  inset-inline-start: 2.5rem;
739
754
  }
@@ -752,6 +767,12 @@ video {
752
767
  .top-2 {
753
768
  top: 0.5rem;
754
769
  }
770
+ .top-4 {
771
+ top: 1rem;
772
+ }
773
+ .top-\[16px\] {
774
+ top: 16px;
775
+ }
755
776
  .top-\[18px\] {
756
777
  top: 18px;
757
778
  }
@@ -779,6 +800,9 @@ video {
779
800
  .m-2 {
780
801
  margin: 0.5rem;
781
802
  }
803
+ .m-auto {
804
+ margin: auto;
805
+ }
782
806
  .mx-1 {
783
807
  margin-left: 0.25rem;
784
808
  margin-right: 0.25rem;
@@ -820,14 +844,20 @@ video {
820
844
  .mb-6 {
821
845
  margin-bottom: 1.5rem;
822
846
  }
847
+ .ml-1 {
848
+ margin-left: 0.25rem;
849
+ }
823
850
  .ml-2 {
824
851
  margin-left: 0.5rem;
825
852
  }
826
853
  .ml-4 {
827
854
  margin-left: 1rem;
828
855
  }
829
- .ml-auto {
830
- margin-left: auto;
856
+ .mr-0 {
857
+ margin-right: 0px;
858
+ }
859
+ .mr-0\.5 {
860
+ margin-right: 0.125rem;
831
861
  }
832
862
  .mr-2 {
833
863
  margin-right: 0.5rem;
@@ -835,9 +865,6 @@ video {
835
865
  .mr-4 {
836
866
  margin-right: 1rem;
837
867
  }
838
- .mr-auto {
839
- margin-right: auto;
840
- }
841
868
  .mt-1 {
842
869
  margin-top: 0.25rem;
843
870
  }
@@ -958,6 +985,9 @@ video {
958
985
  .h-full {
959
986
  height: 100%;
960
987
  }
988
+ .max-h-\[200px\] {
989
+ max-height: 200px;
990
+ }
961
991
  .max-h-\[240px\] {
962
992
  max-height: 240px;
963
993
  }
@@ -979,9 +1009,6 @@ video {
979
1009
  .w-10 {
980
1010
  width: 2.5rem;
981
1011
  }
982
- .w-12 {
983
- width: 3rem;
984
- }
985
1012
  .w-14 {
986
1013
  width: 3.5rem;
987
1014
  }
@@ -1024,6 +1051,9 @@ video {
1024
1051
  .w-\[40px\] {
1025
1052
  width: 40px;
1026
1053
  }
1054
+ .w-\[69px\] {
1055
+ width: 69px;
1056
+ }
1027
1057
  .w-auto {
1028
1058
  width: auto;
1029
1059
  }
@@ -1092,10 +1122,22 @@ video {
1092
1122
  --tw-translate-x: -50%;
1093
1123
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
1094
1124
  }
1125
+ .translate-y-0 {
1126
+ --tw-translate-y: 0px;
1127
+ transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
1128
+ }
1129
+ .translate-y-\[-10px\] {
1130
+ --tw-translate-y: -10px;
1131
+ transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
1132
+ }
1095
1133
  .translate-y-\[-50\%\] {
1096
1134
  --tw-translate-y: -50%;
1097
1135
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
1098
1136
  }
1137
+ .rotate-180 {
1138
+ --tw-rotate: 180deg;
1139
+ transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
1140
+ }
1099
1141
  .rotate-45 {
1100
1142
  --tw-rotate: 45deg;
1101
1143
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
@@ -1193,6 +1235,9 @@ video {
1193
1235
  .items-start {
1194
1236
  align-items: flex-start;
1195
1237
  }
1238
+ .items-end {
1239
+ align-items: flex-end;
1240
+ }
1196
1241
  .items-center {
1197
1242
  align-items: center;
1198
1243
  }
@@ -1217,6 +1262,9 @@ video {
1217
1262
  .gap-2 {
1218
1263
  gap: 0.5rem;
1219
1264
  }
1265
+ .gap-2\.5 {
1266
+ gap: 0.625rem;
1267
+ }
1220
1268
  .gap-4 {
1221
1269
  gap: 1rem;
1222
1270
  }
@@ -1371,6 +1419,9 @@ video {
1371
1419
  .border-t {
1372
1420
  border-top-width: 1px;
1373
1421
  }
1422
+ .border-t-\[1px\] {
1423
+ border-top-width: 1px;
1424
+ }
1374
1425
  .border-none {
1375
1426
  border-style: none;
1376
1427
  }
@@ -1420,6 +1471,9 @@ video {
1420
1471
  --tw-bg-opacity: 1;
1421
1472
  background-color: rgb(97 46 255 / var(--tw-bg-opacity));
1422
1473
  }
1474
+ .bg-\[rgba\(255\2c 255\2c 255\2c 0\.5\)\] {
1475
+ background-color: rgba(255,255,255,0.5);
1476
+ }
1423
1477
  .bg-background {
1424
1478
  background-color: hsl(var(--background));
1425
1479
  }
@@ -1505,6 +1559,10 @@ video {
1505
1559
  .fill-current {
1506
1560
  fill: currentColor;
1507
1561
  }
1562
+ .object-contain {
1563
+ -o-object-fit: contain;
1564
+ object-fit: contain;
1565
+ }
1508
1566
  .object-cover {
1509
1567
  -o-object-fit: cover;
1510
1568
  object-fit: cover;
@@ -1515,6 +1573,9 @@ video {
1515
1573
  .p-1 {
1516
1574
  padding: 0.25rem;
1517
1575
  }
1576
+ .p-1\.5 {
1577
+ padding: 0.375rem;
1578
+ }
1518
1579
  .p-2 {
1519
1580
  padding: 0.5rem;
1520
1581
  }
@@ -1534,6 +1595,10 @@ video {
1534
1595
  padding-left: 0px !important;
1535
1596
  padding-right: 0px !important;
1536
1597
  }
1598
+ .px-0 {
1599
+ padding-left: 0px;
1600
+ padding-right: 0px;
1601
+ }
1537
1602
  .px-1 {
1538
1603
  padding-left: 0.25rem;
1539
1604
  padding-right: 0.25rem;
@@ -1600,6 +1665,9 @@ video {
1600
1665
  .pl-2 {
1601
1666
  padding-left: 0.5rem;
1602
1667
  }
1668
+ .pl-3 {
1669
+ padding-left: 0.75rem;
1670
+ }
1603
1671
  .pl-4 {
1604
1672
  padding-left: 1rem;
1605
1673
  }
@@ -1624,6 +1692,9 @@ video {
1624
1692
  .pt-12 {
1625
1693
  padding-top: 3rem;
1626
1694
  }
1695
+ .pt-2 {
1696
+ padding-top: 0.5rem;
1697
+ }
1627
1698
  .pt-4 {
1628
1699
  padding-top: 1rem;
1629
1700
  }
@@ -1668,6 +1739,9 @@ video {
1668
1739
  .text-\[12px\] {
1669
1740
  font-size: 12px;
1670
1741
  }
1742
+ .text-\[14px\] {
1743
+ font-size: 14px;
1744
+ }
1671
1745
  .text-\[15px\] {
1672
1746
  font-size: 15px;
1673
1747
  }
@@ -1977,6 +2051,13 @@ video {
1977
2051
  .filter {
1978
2052
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
1979
2053
  }
2054
+ .transition {
2055
+ transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter;
2056
+ transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
2057
+ transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter;
2058
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
2059
+ transition-duration: 150ms;
2060
+ }
1980
2061
  .transition-all {
1981
2062
  transition-property: all;
1982
2063
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
@@ -1997,6 +2078,9 @@ video {
1997
2078
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
1998
2079
  transition-duration: 150ms;
1999
2080
  }
2081
+ .duration-150 {
2082
+ transition-duration: 150ms;
2083
+ }
2000
2084
  .duration-200 {
2001
2085
  transition-duration: 200ms;
2002
2086
  }
@@ -2023,6 +2107,9 @@ video {
2023
2107
  transform: translate3d(var(--tw-exit-translate-x, 0), var(--tw-exit-translate-y, 0), 0) scale3d(var(--tw-exit-scale, 1), var(--tw-exit-scale, 1), var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0));
2024
2108
  }
2025
2109
  }
2110
+ .duration-150 {
2111
+ animation-duration: 150ms;
2112
+ }
2026
2113
  .duration-200 {
2027
2114
  animation-duration: 200ms;
2028
2115
  }
@@ -2072,6 +2159,14 @@ body::-webkit-scrollbar {
2072
2159
  font-weight: 500;
2073
2160
  }
2074
2161
 
2162
+ .placeholder\:text-coreColors-brandColorPrimary::-moz-placeholder {
2163
+ color: var(--coreColors-brandColorPrimary);
2164
+ }
2165
+
2166
+ .placeholder\:text-coreColors-brandColorPrimary::placeholder {
2167
+ color: var(--coreColors-brandColorPrimary);
2168
+ }
2169
+
2075
2170
  .placeholder\:text-stateColors-error::-moz-placeholder {
2076
2171
  color: var(--stateColors-error);
2077
2172
  }
@@ -2088,6 +2183,10 @@ body::-webkit-scrollbar {
2088
2183
  color: var(--textColors-secondaryColor, #727272ff);
2089
2184
  }
2090
2185
 
2186
+ .last\:border-b-0:last-child {
2187
+ border-bottom-width: 0px;
2188
+ }
2189
+
2091
2190
  .placeholder-shown\:\!truncate:-moz-placeholder-shown {
2092
2191
  overflow: hidden !important;
2093
2192
  text-overflow: ellipsis !important;
@@ -2169,6 +2268,10 @@ body::-webkit-scrollbar {
2169
2268
  text-decoration-line: line-through !important;
2170
2269
  }
2171
2270
 
2271
+ .hover\:line-through:hover {
2272
+ text-decoration-line: line-through;
2273
+ }
2274
+
2172
2275
  .focus\:border-coreColors-brandColorPrimary:focus {
2173
2276
  border-color: var(--coreColors-brandColorPrimary);
2174
2277
  }
@@ -2233,6 +2336,10 @@ body::-webkit-scrollbar {
2233
2336
  --tw-ring-offset-color: hsl(var(--background));
2234
2337
  }
2235
2338
 
2339
+ .active\:bg-black\/10:active {
2340
+ background-color: rgb(0 0 0 / 0.1);
2341
+ }
2342
+
2236
2343
  .active\:text-coreColors-brandColorPrimary:active {
2237
2344
  color: var(--coreColors-brandColorPrimary);
2238
2345
  }
@@ -2594,6 +2701,13 @@ body::-webkit-scrollbar {
2594
2701
  text-decoration-line: line-through !important;
2595
2702
  }
2596
2703
 
2704
+ .\[\&\>span\]\:line-clamp-1>span {
2705
+ overflow: hidden;
2706
+ display: -webkit-box;
2707
+ -webkit-box-orient: vertical;
2708
+ -webkit-line-clamp: 1;
2709
+ }
2710
+
2597
2711
  .\[\&\[data-state\=open\]\]\:outline-coreColors-brandColorPrimary[data-state=open] {
2598
2712
  outline-color: var(--coreColors-brandColorPrimary);
2599
2713
  }
@@ -2647,7 +2761,3 @@ body::-webkit-scrollbar {
2647
2761
  .\[\&_p\]\:text-stateColors-disabled p {
2648
2762
  color: var(--stateColors-disabled);
2649
2763
  }
2650
-
2651
- .active\:\[\&_svg\]\:text-stateColors-favorites svg:active {
2652
- color: var(--stateColors-favorites);
2653
- }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tapcart/mobile-components",
3
- "version": "0.6.0",
3
+ "version": "0.6.2",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "style": "dist/styles.css",
@@ -51,6 +51,7 @@
51
51
  "@radix-ui/react-label": "^2.0.2",
52
52
  "@radix-ui/react-radio-group": "^1.1.3",
53
53
  "@radix-ui/react-scroll-area": "^1.0.5",
54
+ "@radix-ui/react-select": "^2.1.1",
54
55
  "@radix-ui/react-separator": "^1.0.3",
55
56
  "@radix-ui/react-slider": "^1.1.2",
56
57
  "@radix-ui/react-slot": "^1.0.2",
@@ -73,4 +74,4 @@
73
74
  "tailwindcss-animate": "^1.0.6",
74
75
  "vaul": "^0.9.1"
75
76
  }
76
- }
77
+ }