@tapcart/mobile-components 0.7.26 → 0.7.27
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/contexts/translationContext.d.ts +9 -0
- package/dist/components/contexts/translationContext.d.ts.map +1 -0
- package/dist/components/contexts/translationContext.js +5 -0
- package/dist/components/hooks/use-destination.d.ts +23 -0
- package/dist/components/hooks/use-destination.d.ts.map +1 -0
- package/dist/components/hooks/use-destination.js +13 -0
- package/dist/components/hooks/use-products.d.ts +2 -0
- package/dist/components/hooks/use-products.d.ts.map +1 -1
- package/dist/components/hooks/use-products.js +40 -5
- package/dist/components/ui/use-tap.d.ts +8 -0
- package/dist/components/ui/use-tap.d.ts.map +1 -0
- package/dist/components/ui/use-tap.js +100 -0
- package/dist/components/ui/video copy.d.ts +18 -0
- package/dist/components/ui/video copy.d.ts.map +1 -0
- package/dist/components/ui/video copy.js +70 -0
- package/dist/components/ui/video.v2.d.ts +18 -0
- package/dist/components/ui/video.v2.d.ts.map +1 -0
- package/dist/components/ui/video.v2.js +70 -0
- package/dist/index copy.d.ts +59 -0
- package/dist/index copy.d.ts.map +1 -0
- package/dist/index copy.js +59 -0
- package/dist/lib/utils/destination.d.ts +17 -0
- package/dist/lib/utils/destination.d.ts.map +1 -0
- package/dist/lib/utils/destination.js +15 -0
- package/dist/lib/utils/id.d.ts +5 -0
- package/dist/lib/utils/id.d.ts.map +1 -0
- package/dist/lib/utils/id.js +29 -0
- package/dist/lib/utils/index.d.ts +18 -0
- package/dist/lib/utils/index.d.ts.map +1 -0
- package/dist/lib/utils/index.js +55 -0
- package/dist/lib/utils/misc.d.ts +1 -0
- package/dist/lib/utils/misc.d.ts.map +1 -0
- package/dist/lib/utils/style.d.ts +154 -0
- package/dist/lib/utils/style.d.ts.map +1 -0
- package/dist/lib/utils/style.js +148 -0
- package/dist/lib/utils.deprecated.d.ts +181 -0
- package/dist/lib/utils.deprecated.d.ts.map +1 -0
- package/dist/lib/utils.deprecated.js +222 -0
- package/dist/v2.d.ts +59 -0
- package/dist/v2.d.ts.map +1 -0
- package/dist/v2.js +59 -0
- package/package.json +1 -1
- package/dist/jest.config.d.ts +0 -1
- package/dist/jest.config.d.ts.map +0 -1
- package/dist/lib/__tests__/utils.test.d.ts +0 -1
- package/dist/lib/__tests__/utils.test.d.ts.map +0 -1
- package/dist/lib/__tests__/utils.test.js +0 -1
- /package/dist/{jest.config.js → lib/utils/misc.js} +0 -0
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
import { clsx } from "clsx";
|
|
2
|
+
import { twMerge } from "tailwind-merge";
|
|
3
|
+
import dayjs from "dayjs";
|
|
4
|
+
import relativeTime from "dayjs/plugin/relativeTime";
|
|
5
|
+
export function cn(...inputs) {
|
|
6
|
+
return twMerge(clsx(inputs));
|
|
7
|
+
}
|
|
8
|
+
export const iconColorLevels = [
|
|
9
|
+
"coreColors-primaryIcon",
|
|
10
|
+
"coreColors-secondaryIcon",
|
|
11
|
+
"coreColors-headerIcon",
|
|
12
|
+
"coreColors-brandColorPrimary",
|
|
13
|
+
"stateColors-subscriptions",
|
|
14
|
+
"stateColors-favorites",
|
|
15
|
+
"stateColors-reviews",
|
|
16
|
+
"stateColors-success",
|
|
17
|
+
"stateColors-error",
|
|
18
|
+
"stateColors-warning",
|
|
19
|
+
"stateColors-disabled",
|
|
20
|
+
"buttonColors-primaryText",
|
|
21
|
+
"buttonColors-secondaryText",
|
|
22
|
+
];
|
|
23
|
+
export const iconColorVariantClasses = {};
|
|
24
|
+
for (let iconColorLevel of iconColorLevels) {
|
|
25
|
+
iconColorVariantClasses[iconColorLevel] = `text-${iconColorLevel}`;
|
|
26
|
+
}
|
|
27
|
+
export { cva } from "class-variance-authority";
|
|
28
|
+
export const getColor = (colorOption) => {
|
|
29
|
+
if ((colorOption === null || colorOption === void 0 ? void 0 : colorOption.value) === null) {
|
|
30
|
+
return undefined;
|
|
31
|
+
}
|
|
32
|
+
return colorOption
|
|
33
|
+
? (colorOption === null || colorOption === void 0 ? void 0 : colorOption.type) === "brand-kit"
|
|
34
|
+
? `var(--${colorOption.value})`
|
|
35
|
+
: colorOption.value
|
|
36
|
+
: undefined;
|
|
37
|
+
};
|
|
38
|
+
export const getBorderSidesStyle = (borderSides) => {
|
|
39
|
+
const style = (borderSides === null || borderSides === void 0 ? void 0 : borderSides.includes("all"))
|
|
40
|
+
? { borderWidth: "1px" }
|
|
41
|
+
: {
|
|
42
|
+
borderTopWidth: (borderSides === null || borderSides === void 0 ? void 0 : borderSides.includes("top")) ? "1px" : 0,
|
|
43
|
+
borderBottomWidth: (borderSides === null || borderSides === void 0 ? void 0 : borderSides.includes("bottom")) ? "1px" : 0,
|
|
44
|
+
borderLeftWidth: (borderSides === null || borderSides === void 0 ? void 0 : borderSides.includes("left")) ? "1px" : 0,
|
|
45
|
+
borderRightWidth: (borderSides === null || borderSides === void 0 ? void 0 : borderSides.includes("right")) ? "1px" : 0,
|
|
46
|
+
};
|
|
47
|
+
return style;
|
|
48
|
+
};
|
|
49
|
+
export const getVerticalAlignmentStyle = (alignmentAndSpacing) => {
|
|
50
|
+
const { alignment, spacing } = alignmentAndSpacing;
|
|
51
|
+
switch (alignment) {
|
|
52
|
+
case "bottom":
|
|
53
|
+
return { bottom: `${spacing.bottom}px`, top: "auto" };
|
|
54
|
+
case "middle":
|
|
55
|
+
return { top: "50%", transform: "translateY(-50%)" };
|
|
56
|
+
case "top":
|
|
57
|
+
return { top: `${spacing.top}px`, bottom: "auto" };
|
|
58
|
+
default:
|
|
59
|
+
return {};
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
export const getPaddingStyle = (padding) => {
|
|
63
|
+
if (!padding)
|
|
64
|
+
return {};
|
|
65
|
+
return {
|
|
66
|
+
paddingTop: (padding === null || padding === void 0 ? void 0 : padding.top) !== undefined ? `${padding.top}px` : undefined,
|
|
67
|
+
paddingBottom: (padding === null || padding === void 0 ? void 0 : padding.bottom) !== undefined ? `${padding.bottom}px` : undefined,
|
|
68
|
+
paddingLeft: (padding === null || padding === void 0 ? void 0 : padding.left) !== undefined ? `${padding.left}px` : undefined,
|
|
69
|
+
paddingRight: (padding === null || padding === void 0 ? void 0 : padding.right) !== undefined ? `${padding.right}px` : undefined,
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
export const getBackgroundAndPaddingStyle = (backgroundAndPadding) => {
|
|
73
|
+
const { backgroundColor, borderSides, borderColor, cornerRadius, padding, borderRadius, } = backgroundAndPadding;
|
|
74
|
+
const radius = cornerRadius || borderRadius;
|
|
75
|
+
const defaultBorderWidth = borderSides ? "0px" : undefined;
|
|
76
|
+
return Object.assign(Object.assign({}, getPaddingStyle(padding)), { backgroundColor: getColor(backgroundColor), borderColor: getColor(borderColor), borderTopWidth: (borderSides === null || borderSides === void 0 ? void 0 : borderSides.includes("top")) || (borderSides === null || borderSides === void 0 ? void 0 : borderSides.includes("all"))
|
|
77
|
+
? "1px"
|
|
78
|
+
: defaultBorderWidth, borderBottomWidth: (borderSides === null || borderSides === void 0 ? void 0 : borderSides.includes("bottom")) || (borderSides === null || borderSides === void 0 ? void 0 : borderSides.includes("all"))
|
|
79
|
+
? "1px"
|
|
80
|
+
: defaultBorderWidth, borderLeftWidth: (borderSides === null || borderSides === void 0 ? void 0 : borderSides.includes("left")) || (borderSides === null || borderSides === void 0 ? void 0 : borderSides.includes("all"))
|
|
81
|
+
? "1px"
|
|
82
|
+
: defaultBorderWidth, borderRightWidth: (borderSides === null || borderSides === void 0 ? void 0 : borderSides.includes("right")) || (borderSides === null || borderSides === void 0 ? void 0 : borderSides.includes("all"))
|
|
83
|
+
? "1px"
|
|
84
|
+
: defaultBorderWidth, borderStyle: (borderSides === null || borderSides === void 0 ? void 0 : borderSides.length) ? "solid" : undefined, borderRadius: radius !== undefined ? `${radius}px` : undefined });
|
|
85
|
+
};
|
|
86
|
+
export const getBackgroundAndSpacingStyle = (backgroundAndSpacing) => {
|
|
87
|
+
const { spacing, borderColor, backgroundColor, backgroundCorners } = backgroundAndSpacing;
|
|
88
|
+
return {
|
|
89
|
+
padding: `${spacing.top}px ${spacing.right}px ${spacing.bottom}px ${spacing.left}px`,
|
|
90
|
+
borderColor: borderColor ? borderColor.value : "transparent",
|
|
91
|
+
backgroundColor: getColor(backgroundColor) || "transparent",
|
|
92
|
+
borderRadius: `${backgroundCorners !== null && backgroundCorners !== void 0 ? backgroundCorners : 0}px`,
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
export const getTextStyle = (textStyle) => {
|
|
96
|
+
const { font, size, color, uppercase, textAlignment, wrapText } = textStyle;
|
|
97
|
+
return {
|
|
98
|
+
fontFamily: font.family === "initial" ? undefined : font.family,
|
|
99
|
+
fontWeight: font.weight === "initial" ? undefined : font.weight,
|
|
100
|
+
fontSize: size,
|
|
101
|
+
color: getColor(color),
|
|
102
|
+
textTransform: uppercase ? "uppercase" : "none",
|
|
103
|
+
textAlign: textAlignment,
|
|
104
|
+
textWrap: wrapText ? "wrap" : "nowrap",
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
export const getVerticalAlignment = (alignment, padding = { top: 0, bottom: 0 }) => {
|
|
108
|
+
if (alignment === "bottom") {
|
|
109
|
+
return { bottom: `${padding.bottom}px`, top: "auto" };
|
|
110
|
+
}
|
|
111
|
+
else if (alignment === "middle") {
|
|
112
|
+
return { top: "50%", transform: `translateY(-50%)` };
|
|
113
|
+
}
|
|
114
|
+
else if (alignment === "top") {
|
|
115
|
+
return { top: `${padding.top}px`, bottom: "auto" };
|
|
116
|
+
}
|
|
117
|
+
else {
|
|
118
|
+
return {};
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
const alignmentClasses = {
|
|
122
|
+
left: "justify-start",
|
|
123
|
+
middle: "justify-center",
|
|
124
|
+
right: "justify-end",
|
|
125
|
+
};
|
|
126
|
+
export const mapFlexToAlignment = (flexClass) => {
|
|
127
|
+
if (flexClass in alignmentClasses)
|
|
128
|
+
return alignmentClasses[flexClass];
|
|
129
|
+
return "";
|
|
130
|
+
};
|
|
131
|
+
export function getIdFromGid(gid) {
|
|
132
|
+
if (!gid)
|
|
133
|
+
return "";
|
|
134
|
+
const arr = gid.split("/");
|
|
135
|
+
return arr[arr.length - 1] || "";
|
|
136
|
+
}
|
|
137
|
+
export function productGidFromId(id) {
|
|
138
|
+
if (!id)
|
|
139
|
+
return null;
|
|
140
|
+
if (id.startsWith("gid://shopify/Product/"))
|
|
141
|
+
return id;
|
|
142
|
+
return `gid://shopify/Product/${id}`;
|
|
143
|
+
}
|
|
144
|
+
export function variantGidFromId(id) {
|
|
145
|
+
if (!id)
|
|
146
|
+
return null;
|
|
147
|
+
if (id.startsWith("gid://shopify/ProductVariant/"))
|
|
148
|
+
return id;
|
|
149
|
+
return `gid://shopify/ProductVariant/${id}`;
|
|
150
|
+
}
|
|
151
|
+
// Use to prevent multiple clicks in quick succession
|
|
152
|
+
export function throttleFunction(fn, wait) {
|
|
153
|
+
let throttle = false;
|
|
154
|
+
return [
|
|
155
|
+
function () {
|
|
156
|
+
return throttle;
|
|
157
|
+
},
|
|
158
|
+
function (...args) {
|
|
159
|
+
if (!throttle) {
|
|
160
|
+
fn(...args);
|
|
161
|
+
throttle = true;
|
|
162
|
+
setInterval(() => {
|
|
163
|
+
throttle = false;
|
|
164
|
+
}, wait);
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
];
|
|
168
|
+
}
|
|
169
|
+
export function formatRelativeTime(inputDate) {
|
|
170
|
+
dayjs.extend(relativeTime);
|
|
171
|
+
return dayjs(inputDate).fromNow();
|
|
172
|
+
}
|
|
173
|
+
export const stringRatioToInt = (string) => {
|
|
174
|
+
const [numerator, denominator] = string
|
|
175
|
+
.replace(":", "/")
|
|
176
|
+
.split("/")
|
|
177
|
+
.map((part) => part.trim())
|
|
178
|
+
.map(Number);
|
|
179
|
+
return numerator / denominator;
|
|
180
|
+
};
|
|
181
|
+
export const getOverlayStyle = (opacity) => {
|
|
182
|
+
const opacityDecimal = opacity / 100;
|
|
183
|
+
return {
|
|
184
|
+
position: "absolute",
|
|
185
|
+
top: 0,
|
|
186
|
+
left: 0,
|
|
187
|
+
right: 0,
|
|
188
|
+
bottom: 0,
|
|
189
|
+
backgroundColor: `rgba(0, 0, 0, ${opacityDecimal})`,
|
|
190
|
+
};
|
|
191
|
+
};
|
|
192
|
+
const DESTINATION_HANDLERS = {
|
|
193
|
+
"app-screen": (location, actions) => actions.openScreen({ destination: { type: "internal", url: location } }),
|
|
194
|
+
url: (location, actions) => actions.openScreen({
|
|
195
|
+
destination: {
|
|
196
|
+
type: "web",
|
|
197
|
+
url: location.includes("https://") ? location : `https://${location}`,
|
|
198
|
+
},
|
|
199
|
+
}),
|
|
200
|
+
product: (location, actions) => actions.openProduct({ productId: location }),
|
|
201
|
+
collection: (location, actions) => actions.openCollection({ collectionId: location }),
|
|
202
|
+
none: () => { },
|
|
203
|
+
};
|
|
204
|
+
export const getDestinationHandler = (type) => {
|
|
205
|
+
return DESTINATION_HANDLERS[type];
|
|
206
|
+
};
|
|
207
|
+
export function getProductGidsFromIds(ids) {
|
|
208
|
+
return ids.map((id) => {
|
|
209
|
+
if (id.startsWith("gid://shopify/Product/")) {
|
|
210
|
+
return id;
|
|
211
|
+
}
|
|
212
|
+
return `gid://shopify/Product/${id}`;
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
export const createCollectionImageMap = (collections) => {
|
|
216
|
+
return collections.reduce((imageMap, collection) => {
|
|
217
|
+
if (collection.customImage && collection.image) {
|
|
218
|
+
imageMap[collection.id] = collection.image;
|
|
219
|
+
}
|
|
220
|
+
return imageMap;
|
|
221
|
+
}, {});
|
|
222
|
+
};
|
package/dist/v2.d.ts
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
export { cn, cva, getColor, getBackgroundAndPaddingStyle, getBorderSidesStyle, getTextStyle, getVerticalAlignmentStyle, getBackgroundAndSpacingStyle, getIdFromGid, productGidFromId, variantGidFromId, getPaddingStyle, getVerticalAlignment, mapFlexToAlignment, formatRelativeTime, stringRatioToInt, getOverlayStyle, getDestinationHandler, createCollectionImageMap, } from "./lib/utils";
|
|
2
|
+
export * from "./components/hooks/use-collection";
|
|
3
|
+
export * from "./components/hooks/use-infinite-scroll";
|
|
4
|
+
export * from "./components/hooks/use-recommendations";
|
|
5
|
+
export * from "./components/hooks/use-products";
|
|
6
|
+
export * from "./components/hooks/use-scroll-direction";
|
|
7
|
+
export * from "./components/hooks/use-sort-filter";
|
|
8
|
+
export * from "./components/hooks/use-product-options";
|
|
9
|
+
export * from "./components/hooks/use-shop";
|
|
10
|
+
export * from "./components/hooks/use-tap";
|
|
11
|
+
export * from "./components/ui/accordion";
|
|
12
|
+
export * from "./components/ui/aspect-ratio";
|
|
13
|
+
export * from "./components/ui/badge";
|
|
14
|
+
export * from "./components/ui/button";
|
|
15
|
+
export * from "./components/ui/carousel";
|
|
16
|
+
export * from "./components/ui/checkbox";
|
|
17
|
+
export * from "./components/ui/chip";
|
|
18
|
+
export * from "./components/ui/color-swatch";
|
|
19
|
+
export * from "./components/ui/container";
|
|
20
|
+
export * from "./components/ui/drawer";
|
|
21
|
+
export * from "./components/ui/dropdown";
|
|
22
|
+
export * from "./components/ui/empty-message";
|
|
23
|
+
export * from "./components/ui/favorite";
|
|
24
|
+
export * from "./components/ui/grid";
|
|
25
|
+
export * from "./components/ui/icon";
|
|
26
|
+
export * from "./components/ui/image";
|
|
27
|
+
export * from "./components/ui/Input/input";
|
|
28
|
+
export * from "./components/ui/label";
|
|
29
|
+
export * from "./components/ui/line-item-text-icons";
|
|
30
|
+
export * from "./components/ui/money";
|
|
31
|
+
export * from "./components/ui/price";
|
|
32
|
+
export * from "./components/ui/product-card";
|
|
33
|
+
export * from "./components/ui/quantity-picker";
|
|
34
|
+
export * from "./components/ui/radio-group";
|
|
35
|
+
export * from "./components/ui/scroll-area";
|
|
36
|
+
export * from "./components/ui/selectors";
|
|
37
|
+
export * from "./components/ui/separator";
|
|
38
|
+
export * from "./components/ui/skeleton";
|
|
39
|
+
export * from "./components/ui/slider";
|
|
40
|
+
export * from "./components/ui/subscription";
|
|
41
|
+
export * from "./components/ui/switch";
|
|
42
|
+
export * from "./components/ui/tabs";
|
|
43
|
+
export * from "./components/ui/text";
|
|
44
|
+
export * from "./components/ui/textarea";
|
|
45
|
+
export * from "./components/ui/toast";
|
|
46
|
+
export * from "./components/ui/toaster";
|
|
47
|
+
export * from "./components/ui/toggle-group";
|
|
48
|
+
export * from "./components/ui/toggle";
|
|
49
|
+
export * from "./components/ui/use-toast";
|
|
50
|
+
export * from "./components/ui/video";
|
|
51
|
+
export * from "./components/ui/video.v2";
|
|
52
|
+
export * from "./components/ui/wishlist";
|
|
53
|
+
export * from "./components/ui/wishlist-select";
|
|
54
|
+
export * from "./components/hooks/use-shop";
|
|
55
|
+
export * from "./components/libs/sort-filter/search-integration";
|
|
56
|
+
export * from "./components/hooks/use-reviews";
|
|
57
|
+
export * from "./components/ui/subcollection-tabs";
|
|
58
|
+
export * from "./components/libs/sort-filter/search-integration";
|
|
59
|
+
//# sourceMappingURL=v2.d.ts.map
|
package/dist/v2.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v2.d.ts","sourceRoot":"","sources":["../v2.ts"],"names":[],"mappings":"AACA,OAAO,EACL,EAAE,EACF,GAAG,EACH,QAAQ,EACR,4BAA4B,EAC5B,mBAAmB,EACnB,YAAY,EACZ,yBAAyB,EACzB,4BAA4B,EAC5B,YAAY,EACZ,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,oBAAoB,EACpB,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EAChB,eAAe,EACf,qBAAqB,EACrB,wBAAwB,GACzB,MAAM,aAAa,CAAA;AACpB,cAAc,mCAAmC,CAAA;AACjD,cAAc,wCAAwC,CAAA;AACtD,cAAc,wCAAwC,CAAA;AACtD,cAAc,iCAAiC,CAAA;AAC/C,cAAc,yCAAyC,CAAA;AACvD,cAAc,oCAAoC,CAAA;AAClD,cAAc,wCAAwC,CAAA;AACtD,cAAc,6BAA6B,CAAA;AAC3C,cAAc,4BAA4B,CAAA;AAC1C,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;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,0BAA0B,CAAA;AACxC,cAAc,iCAAiC,CAAA;AAC/C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,kDAAkD,CAAA;AAChE,cAAc,gCAAgC,CAAA;AAC9C,cAAc,oCAAoC,CAAA;AAClD,cAAc,kDAAkD,CAAA"}
|
package/dist/v2.js
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
// component exports
|
|
2
|
+
export { cn, cva, getColor, getBackgroundAndPaddingStyle, getBorderSidesStyle, getTextStyle, getVerticalAlignmentStyle, getBackgroundAndSpacingStyle, getIdFromGid, productGidFromId, variantGidFromId, getPaddingStyle, getVerticalAlignment, mapFlexToAlignment, formatRelativeTime, stringRatioToInt, getOverlayStyle, getDestinationHandler, createCollectionImageMap, } from "./lib/utils";
|
|
3
|
+
export * from "./components/hooks/use-collection";
|
|
4
|
+
export * from "./components/hooks/use-infinite-scroll";
|
|
5
|
+
export * from "./components/hooks/use-recommendations";
|
|
6
|
+
export * from "./components/hooks/use-products";
|
|
7
|
+
export * from "./components/hooks/use-scroll-direction";
|
|
8
|
+
export * from "./components/hooks/use-sort-filter";
|
|
9
|
+
export * from "./components/hooks/use-product-options";
|
|
10
|
+
export * from "./components/hooks/use-shop";
|
|
11
|
+
export * from "./components/hooks/use-tap";
|
|
12
|
+
export * from "./components/ui/accordion";
|
|
13
|
+
export * from "./components/ui/aspect-ratio";
|
|
14
|
+
export * from "./components/ui/badge";
|
|
15
|
+
export * from "./components/ui/button";
|
|
16
|
+
export * from "./components/ui/carousel";
|
|
17
|
+
export * from "./components/ui/checkbox";
|
|
18
|
+
export * from "./components/ui/chip";
|
|
19
|
+
export * from "./components/ui/color-swatch";
|
|
20
|
+
export * from "./components/ui/container";
|
|
21
|
+
export * from "./components/ui/drawer";
|
|
22
|
+
export * from "./components/ui/dropdown";
|
|
23
|
+
export * from "./components/ui/empty-message";
|
|
24
|
+
export * from "./components/ui/favorite";
|
|
25
|
+
export * from "./components/ui/grid";
|
|
26
|
+
export * from "./components/ui/icon";
|
|
27
|
+
export * from "./components/ui/image";
|
|
28
|
+
export * from "./components/ui/Input/input";
|
|
29
|
+
export * from "./components/ui/label";
|
|
30
|
+
export * from "./components/ui/line-item-text-icons";
|
|
31
|
+
export * from "./components/ui/money";
|
|
32
|
+
export * from "./components/ui/price";
|
|
33
|
+
export * from "./components/ui/product-card";
|
|
34
|
+
export * from "./components/ui/quantity-picker";
|
|
35
|
+
export * from "./components/ui/radio-group";
|
|
36
|
+
export * from "./components/ui/scroll-area";
|
|
37
|
+
export * from "./components/ui/selectors";
|
|
38
|
+
export * from "./components/ui/separator";
|
|
39
|
+
export * from "./components/ui/skeleton";
|
|
40
|
+
export * from "./components/ui/slider";
|
|
41
|
+
export * from "./components/ui/subscription";
|
|
42
|
+
export * from "./components/ui/switch";
|
|
43
|
+
export * from "./components/ui/tabs";
|
|
44
|
+
export * from "./components/ui/text";
|
|
45
|
+
export * from "./components/ui/textarea";
|
|
46
|
+
export * from "./components/ui/toast";
|
|
47
|
+
export * from "./components/ui/toaster";
|
|
48
|
+
export * from "./components/ui/toggle-group";
|
|
49
|
+
export * from "./components/ui/toggle";
|
|
50
|
+
export * from "./components/ui/use-toast";
|
|
51
|
+
export * from "./components/ui/video";
|
|
52
|
+
export * from "./components/ui/video.v2";
|
|
53
|
+
export * from "./components/ui/wishlist";
|
|
54
|
+
export * from "./components/ui/wishlist-select";
|
|
55
|
+
export * from "./components/hooks/use-shop";
|
|
56
|
+
export * from "./components/libs/sort-filter/search-integration";
|
|
57
|
+
export * from "./components/hooks/use-reviews";
|
|
58
|
+
export * from "./components/ui/subcollection-tabs";
|
|
59
|
+
export * from "./components/libs/sort-filter/search-integration";
|
package/package.json
CHANGED
package/dist/jest.config.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=jest.config.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"jest.config.d.ts","sourceRoot":"","sources":["../jest.config.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=utils.test.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.test.d.ts","sourceRoot":"","sources":["../../../lib/__tests__/utils.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
File without changes
|