@tapcart/mobile-components 0.6.1 → 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.
- package/dist/components/hooks/use-collection.d.ts +25 -0
- package/dist/components/hooks/use-collection.d.ts.map +1 -0
- package/dist/components/hooks/use-collection.js +74 -0
- package/dist/components/hooks/use-products.d.ts +2 -2
- package/dist/components/hooks/use-products.d.ts.map +1 -1
- package/dist/components/hooks/use-products.js +5 -3
- package/dist/components/ui/button.d.ts.map +1 -1
- package/dist/components/ui/button.js +7 -2
- package/dist/components/ui/chip.js +1 -1
- package/dist/components/ui/favorite.d.ts +1 -1
- package/dist/components/ui/favorite.d.ts.map +1 -1
- package/dist/components/ui/favorite.js +4 -4
- package/dist/components/ui/grid.d.ts +1 -1
- package/dist/components/ui/icon.d.ts.map +1 -1
- package/dist/components/ui/icon.js +9 -54
- package/dist/components/ui/product-card.d.ts.map +1 -1
- package/dist/components/ui/product-card.js +13 -17
- package/dist/components/ui/quantity-picker.js +2 -2
- package/dist/components/ui/selectors.d.ts.map +1 -1
- package/dist/components/ui/selectors.js +1 -1
- package/dist/components/ui/slider.js +1 -1
- package/dist/components/ui/text.d.ts.map +1 -1
- package/dist/components/ui/text.js +2 -2
- package/dist/components/ui/textarea.d.ts.map +1 -1
- package/dist/components/ui/textarea.js +5 -1
- package/dist/components/ui/wishlist-select.d.ts +43 -0
- package/dist/components/ui/wishlist-select.d.ts.map +1 -0
- package/dist/components/ui/wishlist-select.js +88 -0
- package/dist/components/ui/wishlist.d.ts +15 -4
- package/dist/components/ui/wishlist.d.ts.map +1 -1
- package/dist/components/ui/wishlist.js +12 -4
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/styles.css +97 -7
- 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
|
+
};
|
|
@@ -10,6 +10,6 @@ type UseProductsReturn = {
|
|
|
10
10
|
error: any;
|
|
11
11
|
isLoading: boolean;
|
|
12
12
|
};
|
|
13
|
-
declare function useProducts(
|
|
14
|
-
export {
|
|
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,
|
|
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(
|
|
3
|
-
const url =
|
|
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,
|
|
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 = () =>
|
|
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(
|
|
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
|
-
|
|
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,
|
|
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
|
|
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,
|
|
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, {
|
|
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?:
|
|
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,
|
|
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,EAuChB,MAAM,qBAAqB,CAAA;AAI5B,QAAA,MAAM,YAAY;;;mFAgBjB,CAAA;AA2DD,MAAM,WAAW,SACf,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC,EACzD,YAAY,CAAC,OAAO,YAAY,CAAC;IACnC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAC5B;AA6CD,iBAAS,IAAI,CAAC,EACZ,SAAS,EACT,IAAI,EACJ,IAAW,EACX,KAAK,EACL,SAAS,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
|
-
|
|
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,
|
|
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,62 +57,13 @@ 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,
|
|
63
64
|
"chevron-down": IconChevronDown,
|
|
64
65
|
"heart-filled": IconHeartFilled,
|
|
65
|
-
"menu-icon-about": IconBuildingStore,
|
|
66
|
-
"menu-icon-account": IconUser,
|
|
67
|
-
"menu-icon-alerts": IconBell,
|
|
68
|
-
"menu-icon-bag": IconShoppingBag,
|
|
69
|
-
"menu-icon-blog": IconAppWindow,
|
|
70
|
-
// "menu-icon-banana":
|
|
71
|
-
"menu-icon-bookmark": IconBookmark,
|
|
72
|
-
"menu-icon-beer": IconBottle,
|
|
73
|
-
"menu-icon-cards": IconBoxMultiple,
|
|
74
|
-
"menu-icon-cart": IconShoppingCart,
|
|
75
|
-
"menu-icon-carton": IconMilk,
|
|
76
|
-
"menu-icon-check": IconRosetteDiscountCheck,
|
|
77
|
-
"menu-icon-cheese": IconCheese,
|
|
78
|
-
"menu-icon-contact": IconMessage,
|
|
79
|
-
"menu-icon-delivery": IconPackage,
|
|
80
|
-
// "menu-icon-dresser": ,
|
|
81
|
-
"menu-icon-fork": IconToolsKitchen2,
|
|
82
|
-
"menu-icon-fullhamburger": IconBaselineDensityMedium,
|
|
83
|
-
"menu-icon-glasses": IconEyeglass2,
|
|
84
|
-
"menu-icon-globe": IconWorld,
|
|
85
|
-
"menu-icon-grid": IconLayoutGrid,
|
|
86
|
-
"menu-icon-hanger": IconHanger,
|
|
87
|
-
"menu-icon-hamburger": IconAlignLeft,
|
|
88
|
-
"menu-icon-handcart": IconShoppingBag,
|
|
89
66
|
"menu-icon-heart": IconHeartFilled,
|
|
90
|
-
"menu-icon-info": IconInfoCircle,
|
|
91
|
-
"menu-icon-instagram": IconBrandInstagram,
|
|
92
|
-
"menu-icon-lightning": IconBolt,
|
|
93
|
-
"menu-icon-lookbook": IconDeviceIpadHeart,
|
|
94
|
-
"menu-icon-locator": IconMap2,
|
|
95
|
-
"menu-icon-mail": IconMail,
|
|
96
|
-
"menu-icon-more": IconDots,
|
|
97
|
-
"menu-icon-message": IconMessage2,
|
|
98
|
-
"menu-icon-package": IconGift,
|
|
99
|
-
"menu-icon-page": IconNotes,
|
|
100
|
-
"menu-icon-paper": IconLicense,
|
|
101
|
-
"menu-icon-photos": IconPhoto,
|
|
102
|
-
"menu-icon-sale": IconRosetteDiscount,
|
|
103
|
-
"menu-icon-scroll": IconLicense,
|
|
104
|
-
// "menu-icon-shirt": ,
|
|
105
|
-
// "menu-icon-shorts": ,
|
|
106
|
-
"menu-icon-shoes": IconShoe,
|
|
107
|
-
"menu-icon-speaker": IconSpeakerphone,
|
|
108
|
-
"menu-icon-star": IconStar,
|
|
109
|
-
"menu-icon-search": IconListSearch,
|
|
110
|
-
"menu-icon-support": IconLifebuoy,
|
|
111
|
-
"menu-icon-tag": IconTag,
|
|
112
|
-
"menu-icon-term receipt": IconReceipt2,
|
|
113
|
-
"menu-icon-tshirt": IconShirt,
|
|
114
|
-
"menu-icon-write": IconFilePencil,
|
|
115
|
-
"menu-icon-watch": IconDeviceWatch,
|
|
116
67
|
upload: IconUpload,
|
|
117
68
|
"currency-dollar": IconCurrencyDollar,
|
|
118
69
|
x: IconX,
|
|
@@ -127,6 +78,10 @@ const icons = {
|
|
|
127
78
|
"columns-3": IconColumns3,
|
|
128
79
|
search: IconSearch,
|
|
129
80
|
"shopping-cart-off": IconShoppingCartOff,
|
|
81
|
+
"star-filled": IconStarFilled,
|
|
82
|
+
"shopping-bag": IconShoppingBag,
|
|
83
|
+
"shopping-bag-plus": IconShoppingBagPlus,
|
|
84
|
+
"shield-check-filled": IconShieldCheckFilled,
|
|
130
85
|
};
|
|
131
86
|
const TablerIcon = ({ name, size }) => {
|
|
132
87
|
const IconComponent = icons[name];
|
|
@@ -138,8 +93,8 @@ const CustomIcon = ({ url, size, strokeColor, fillColor }) => {
|
|
|
138
93
|
const paths = svg.querySelectorAll("path");
|
|
139
94
|
paths.forEach((path) => {
|
|
140
95
|
path.setAttribute("stroke-width", strokeWidthMapping[size].toString());
|
|
141
|
-
fillColor && path.setAttribute("fill", fillColor);
|
|
142
|
-
strokeColor && path.setAttribute("stroke", strokeColor);
|
|
96
|
+
fillColor && path.setAttribute("fill", `var(--${fillColor})`);
|
|
97
|
+
strokeColor && path.setAttribute("stroke", `var(--${strokeColor})`);
|
|
143
98
|
});
|
|
144
99
|
} }));
|
|
145
100
|
};
|
|
@@ -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;AAO9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AM,CAAA;IACd,WAAW,EAAE,WAAW,CAAA;IACxB,OAAO,EAAE,OAAO,CAAA;IAChB,SAAS,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,eAAe,CAAC,EAAE,CAChB,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,EAC1C,OAAO,EAAE,OAAO,KACb,IAAI,CAAA;IACT,UAAU,CAAC,EAAE,CACX,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,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
|
|
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
|
-
},
|
|
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: (
|
|
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 })) }))), ((
|
|
231
|
-
"text-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": ((
|
|
231
|
+
"text-right": ((_3 = config.productTitle) === null || _3 === void 0 ? void 0 : _3.textAlignment) === "right",
|
|
234
232
|
}, {
|
|
235
|
-
"text-center": ((
|
|
233
|
+
"text-center": ((_4 = config.productTitle) === null || _4 === void 0 ? void 0 : _4.textAlignment) === "center",
|
|
236
234
|
}, {
|
|
237
|
-
"line-clamp-2": (
|
|
238
|
-
"line-clamp-1": !((
|
|
239
|
-
}, "text-textColors-productTitle"), style: { fontSize: (
|
|
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((
|
|
239
|
+
parseFloat((_12 = variant.compareAtPrice) === null || _12 === void 0 ? void 0 : _12.amount) >
|
|
242
240
|
parseFloat(variant.price.amount), compareAtPrice: variant.compareAtPrice &&
|
|
243
|
-
parseFloat((
|
|
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",
|
|
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-
|
|
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-
|
|
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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AAiB,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
|
|
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-[
|
|
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;
|
|
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-[
|
|
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,
|
|
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-[
|
|
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
|
+
{"version":3,"file":"wishlist-select.d.ts","sourceRoot":"","sources":["../../../components/ui/wishlist-select.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAE/C,UAAU,WAAW,CAAC,CAAC;IACrB,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAC;QAC3B,KAAK,EAAE,CAAC,CAAA;QACR,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;QACrB,SAAS,CAAC,EAAE,OAAO,CAAA;QACnB,UAAU,CAAC,EAAE,OAAO,CAAA;QACpB,YAAY,EAAE,YAAY,CAAA;QAC1B,QAAQ,EAAE,CAAC,EACT,SAAS,EACT,YAAY,GACb,EAAE;YACD,SAAS,EAAE,OAAO,CAAA;YAClB,YAAY,EAAE,YAAY,CAAA;SAC3B,KAAK,KAAK,CAAC,SAAS,CAAA;KACtB,CAAC,EAAE,CAAA;IACJ,YAAY,CAAC,EAAE,CAAC,CAAA;IAChB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAA;IAC7B,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAA;IACxC,WAAW,CAAC,EAAE,MAAM,IAAI,CAAA;IACxB,YAAY,EAAE,YAAY,CAAA;CAC3B;AAED,QAAA,MAAM,cAAc,6FAwHnB,CAAA;AAID,UAAU,kBACR,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IACrD,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B;AAED,QAAA,MAAM,qBAAqB,8FAkBzB,CAAA;AAGF,UAAU,kBAAkB;IAC1B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,MAAM,EAAE,OAAO,CAAA;IACf,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,QAAA,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
|
-
|
|
4
|
-
|
|
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
|
|
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":"
|
|
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: "
|
|
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 {
|
|
20
|
-
return (_jsxs("button", Object.assign({ className: cn("flex flex-row items-center px-4 py-2 w-full
|
|
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
|
-
|
|
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,4 +1,5 @@
|
|
|
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";
|
|
@@ -46,4 +47,5 @@ export * from "./components/ui/use-toast";
|
|
|
46
47
|
export * from "./components/ui/video";
|
|
47
48
|
export * from "./components/ui/wishlist";
|
|
48
49
|
export * from "./components/hooks/use-product-options";
|
|
50
|
+
export * from "./components/ui/wishlist-select";
|
|
49
51
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -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,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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BAAwB,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;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,5 +1,6 @@
|
|
|
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";
|
|
@@ -47,3 +48,4 @@ export * from "./components/ui/use-toast";
|
|
|
47
48
|
export * from "./components/ui/video";
|
|
48
49
|
export * from "./components/ui/wishlist";
|
|
49
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,12 +844,21 @@ 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
|
}
|
|
856
|
+
.mr-0 {
|
|
857
|
+
margin-right: 0px;
|
|
858
|
+
}
|
|
859
|
+
.mr-0\.5 {
|
|
860
|
+
margin-right: 0.125rem;
|
|
861
|
+
}
|
|
829
862
|
.mr-2 {
|
|
830
863
|
margin-right: 0.5rem;
|
|
831
864
|
}
|
|
@@ -952,6 +985,9 @@ video {
|
|
|
952
985
|
.h-full {
|
|
953
986
|
height: 100%;
|
|
954
987
|
}
|
|
988
|
+
.max-h-\[200px\] {
|
|
989
|
+
max-height: 200px;
|
|
990
|
+
}
|
|
955
991
|
.max-h-\[240px\] {
|
|
956
992
|
max-height: 240px;
|
|
957
993
|
}
|
|
@@ -973,9 +1009,6 @@ video {
|
|
|
973
1009
|
.w-10 {
|
|
974
1010
|
width: 2.5rem;
|
|
975
1011
|
}
|
|
976
|
-
.w-12 {
|
|
977
|
-
width: 3rem;
|
|
978
|
-
}
|
|
979
1012
|
.w-14 {
|
|
980
1013
|
width: 3.5rem;
|
|
981
1014
|
}
|
|
@@ -1089,10 +1122,22 @@ video {
|
|
|
1089
1122
|
--tw-translate-x: -50%;
|
|
1090
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));
|
|
1091
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
|
+
}
|
|
1092
1133
|
.translate-y-\[-50\%\] {
|
|
1093
1134
|
--tw-translate-y: -50%;
|
|
1094
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));
|
|
1095
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
|
+
}
|
|
1096
1141
|
.rotate-45 {
|
|
1097
1142
|
--tw-rotate: 45deg;
|
|
1098
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));
|
|
@@ -1426,6 +1471,9 @@ video {
|
|
|
1426
1471
|
--tw-bg-opacity: 1;
|
|
1427
1472
|
background-color: rgb(97 46 255 / var(--tw-bg-opacity));
|
|
1428
1473
|
}
|
|
1474
|
+
.bg-\[rgba\(255\2c 255\2c 255\2c 0\.5\)\] {
|
|
1475
|
+
background-color: rgba(255,255,255,0.5);
|
|
1476
|
+
}
|
|
1429
1477
|
.bg-background {
|
|
1430
1478
|
background-color: hsl(var(--background));
|
|
1431
1479
|
}
|
|
@@ -1511,6 +1559,10 @@ video {
|
|
|
1511
1559
|
.fill-current {
|
|
1512
1560
|
fill: currentColor;
|
|
1513
1561
|
}
|
|
1562
|
+
.object-contain {
|
|
1563
|
+
-o-object-fit: contain;
|
|
1564
|
+
object-fit: contain;
|
|
1565
|
+
}
|
|
1514
1566
|
.object-cover {
|
|
1515
1567
|
-o-object-fit: cover;
|
|
1516
1568
|
object-fit: cover;
|
|
@@ -1521,6 +1573,9 @@ video {
|
|
|
1521
1573
|
.p-1 {
|
|
1522
1574
|
padding: 0.25rem;
|
|
1523
1575
|
}
|
|
1576
|
+
.p-1\.5 {
|
|
1577
|
+
padding: 0.375rem;
|
|
1578
|
+
}
|
|
1524
1579
|
.p-2 {
|
|
1525
1580
|
padding: 0.5rem;
|
|
1526
1581
|
}
|
|
@@ -1637,6 +1692,9 @@ video {
|
|
|
1637
1692
|
.pt-12 {
|
|
1638
1693
|
padding-top: 3rem;
|
|
1639
1694
|
}
|
|
1695
|
+
.pt-2 {
|
|
1696
|
+
padding-top: 0.5rem;
|
|
1697
|
+
}
|
|
1640
1698
|
.pt-4 {
|
|
1641
1699
|
padding-top: 1rem;
|
|
1642
1700
|
}
|
|
@@ -1681,6 +1739,9 @@ video {
|
|
|
1681
1739
|
.text-\[12px\] {
|
|
1682
1740
|
font-size: 12px;
|
|
1683
1741
|
}
|
|
1742
|
+
.text-\[14px\] {
|
|
1743
|
+
font-size: 14px;
|
|
1744
|
+
}
|
|
1684
1745
|
.text-\[15px\] {
|
|
1685
1746
|
font-size: 15px;
|
|
1686
1747
|
}
|
|
@@ -2017,6 +2078,9 @@ video {
|
|
|
2017
2078
|
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
2018
2079
|
transition-duration: 150ms;
|
|
2019
2080
|
}
|
|
2081
|
+
.duration-150 {
|
|
2082
|
+
transition-duration: 150ms;
|
|
2083
|
+
}
|
|
2020
2084
|
.duration-200 {
|
|
2021
2085
|
transition-duration: 200ms;
|
|
2022
2086
|
}
|
|
@@ -2043,6 +2107,9 @@ video {
|
|
|
2043
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));
|
|
2044
2108
|
}
|
|
2045
2109
|
}
|
|
2110
|
+
.duration-150 {
|
|
2111
|
+
animation-duration: 150ms;
|
|
2112
|
+
}
|
|
2046
2113
|
.duration-200 {
|
|
2047
2114
|
animation-duration: 200ms;
|
|
2048
2115
|
}
|
|
@@ -2092,6 +2159,14 @@ body::-webkit-scrollbar {
|
|
|
2092
2159
|
font-weight: 500;
|
|
2093
2160
|
}
|
|
2094
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
|
+
|
|
2095
2170
|
.placeholder\:text-stateColors-error::-moz-placeholder {
|
|
2096
2171
|
color: var(--stateColors-error);
|
|
2097
2172
|
}
|
|
@@ -2108,6 +2183,10 @@ body::-webkit-scrollbar {
|
|
|
2108
2183
|
color: var(--textColors-secondaryColor, #727272ff);
|
|
2109
2184
|
}
|
|
2110
2185
|
|
|
2186
|
+
.last\:border-b-0:last-child {
|
|
2187
|
+
border-bottom-width: 0px;
|
|
2188
|
+
}
|
|
2189
|
+
|
|
2111
2190
|
.placeholder-shown\:\!truncate:-moz-placeholder-shown {
|
|
2112
2191
|
overflow: hidden !important;
|
|
2113
2192
|
text-overflow: ellipsis !important;
|
|
@@ -2189,6 +2268,10 @@ body::-webkit-scrollbar {
|
|
|
2189
2268
|
text-decoration-line: line-through !important;
|
|
2190
2269
|
}
|
|
2191
2270
|
|
|
2271
|
+
.hover\:line-through:hover {
|
|
2272
|
+
text-decoration-line: line-through;
|
|
2273
|
+
}
|
|
2274
|
+
|
|
2192
2275
|
.focus\:border-coreColors-brandColorPrimary:focus {
|
|
2193
2276
|
border-color: var(--coreColors-brandColorPrimary);
|
|
2194
2277
|
}
|
|
@@ -2253,6 +2336,10 @@ body::-webkit-scrollbar {
|
|
|
2253
2336
|
--tw-ring-offset-color: hsl(var(--background));
|
|
2254
2337
|
}
|
|
2255
2338
|
|
|
2339
|
+
.active\:bg-black\/10:active {
|
|
2340
|
+
background-color: rgb(0 0 0 / 0.1);
|
|
2341
|
+
}
|
|
2342
|
+
|
|
2256
2343
|
.active\:text-coreColors-brandColorPrimary:active {
|
|
2257
2344
|
color: var(--coreColors-brandColorPrimary);
|
|
2258
2345
|
}
|
|
@@ -2614,6 +2701,13 @@ body::-webkit-scrollbar {
|
|
|
2614
2701
|
text-decoration-line: line-through !important;
|
|
2615
2702
|
}
|
|
2616
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
|
+
|
|
2617
2711
|
.\[\&\[data-state\=open\]\]\:outline-coreColors-brandColorPrimary[data-state=open] {
|
|
2618
2712
|
outline-color: var(--coreColors-brandColorPrimary);
|
|
2619
2713
|
}
|
|
@@ -2667,7 +2761,3 @@ body::-webkit-scrollbar {
|
|
|
2667
2761
|
.\[\&_p\]\:text-stateColors-disabled p {
|
|
2668
2762
|
color: var(--stateColors-disabled);
|
|
2669
2763
|
}
|
|
2670
|
-
|
|
2671
|
-
.active\:\[\&_svg\]\:text-stateColors-favorites svg:active {
|
|
2672
|
-
color: var(--stateColors-favorites);
|
|
2673
|
-
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tapcart/mobile-components",
|
|
3
|
-
"version": "0.6.
|
|
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
|
+
}
|