@tapcart/mobile-components 0.2.12 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/dist/components/hooks/use-infinite-scroll.d.ts +1 -0
  2. package/dist/components/hooks/use-infinite-scroll.d.ts.map +1 -1
  3. package/dist/components/hooks/use-infinite-scroll.js +3 -2
  4. package/dist/components/hooks/use-scroll-direction.d.ts +1 -1
  5. package/dist/components/hooks/use-scroll-direction.d.ts.map +1 -1
  6. package/dist/components/hooks/use-scroll-direction.js +17 -5
  7. package/dist/components/ui/accordion.js +1 -1
  8. package/dist/components/ui/badge.d.ts +1 -1
  9. package/dist/components/ui/button.d.ts.map +1 -1
  10. package/dist/components/ui/button.js +49 -14
  11. package/dist/components/ui/carousel.d.ts +5 -1
  12. package/dist/components/ui/carousel.d.ts.map +1 -1
  13. package/dist/components/ui/carousel.js +29 -2
  14. package/dist/components/ui/checkbox.js +2 -2
  15. package/dist/components/ui/chip.d.ts +6 -4
  16. package/dist/components/ui/chip.d.ts.map +1 -1
  17. package/dist/components/ui/chip.js +10 -4
  18. package/dist/components/ui/drawer.js +3 -3
  19. package/dist/components/ui/icon.d.ts.map +1 -1
  20. package/dist/components/ui/icon.js +5 -1
  21. package/dist/components/ui/image.d.ts +157 -0
  22. package/dist/components/ui/image.d.ts.map +1 -0
  23. package/dist/components/ui/image.js +311 -0
  24. package/dist/components/ui/line-item-text-icons.d.ts +14 -0
  25. package/dist/components/ui/line-item-text-icons.d.ts.map +1 -0
  26. package/dist/components/ui/line-item-text-icons.js +22 -0
  27. package/dist/components/ui/product-card.d.ts +6 -19
  28. package/dist/components/ui/product-card.d.ts.map +1 -1
  29. package/dist/components/ui/product-card.js +135 -36
  30. package/dist/components/ui/quantity-picker.d.ts +14 -0
  31. package/dist/components/ui/quantity-picker.d.ts.map +1 -0
  32. package/dist/components/ui/quantity-picker.js +23 -0
  33. package/dist/components/ui/radio-group.js +1 -1
  34. package/dist/components/ui/selectors.d.ts +1 -1
  35. package/dist/components/ui/selectors.d.ts.map +1 -1
  36. package/dist/components/ui/selectors.js +20 -4
  37. package/dist/components/ui/skeleton.js +1 -1
  38. package/dist/components/ui/slider.d.ts +14 -0
  39. package/dist/components/ui/slider.d.ts.map +1 -0
  40. package/dist/components/ui/slider.js +50 -0
  41. package/dist/components/ui/subscription.d.ts +15 -0
  42. package/dist/components/ui/subscription.d.ts.map +1 -0
  43. package/dist/components/ui/subscription.js +24 -0
  44. package/dist/components/ui/switch.d.ts.map +1 -1
  45. package/dist/components/ui/switch.js +2 -2
  46. package/dist/components/ui/tabs.js +1 -1
  47. package/dist/components/ui/textarea.d.ts +18 -0
  48. package/dist/components/ui/textarea.d.ts.map +1 -0
  49. package/dist/components/ui/textarea.js +54 -0
  50. package/dist/components/ui/toggle.js +1 -1
  51. package/dist/index.d.ts +6 -0
  52. package/dist/index.d.ts.map +1 -1
  53. package/dist/index.js +6 -0
  54. package/dist/styles.css +248 -122
  55. package/package.json +20 -14
  56. package/dist/components/ThemeProvider.d.ts +0 -3
  57. package/dist/components/ThemeProvider.d.ts.map +0 -1
  58. package/dist/components/ThemeProvider.js +0 -18
  59. package/dist/components/ThemeToggle.d.ts +0 -2
  60. package/dist/components/ThemeToggle.d.ts.map +0 -1
  61. package/dist/components/ThemeToggle.js +0 -8
@@ -0,0 +1,157 @@
1
+ import * as React from "react";
2
+ import type { PartialDeep } from "type-fest";
3
+ import type { Image as ImageType } from "app-studio-types";
4
+ type SrcSetOptions = {
5
+ intervals: number;
6
+ startingWidth: number;
7
+ incrementSize: number;
8
+ placeholderWidth: number;
9
+ };
10
+ export type LoaderParams = {
11
+ src?: ImageType["url"];
12
+ width?: number;
13
+ height?: number;
14
+ crop?: Crop;
15
+ isContained?: boolean;
16
+ };
17
+ export type Loader = (params: LoaderParams) => string;
18
+ type Crop = "center" | "top" | "bottom" | "left" | "right";
19
+ export type TapcartImageProps = React.ComponentPropsWithRef<"img"> & TapcartImageBaseProps;
20
+ type TapcartImageBaseProps = {
21
+ /** The aspect ratio of the image, in the format of `width/height`.
22
+ *
23
+ * @example
24
+ * ```
25
+ * <Image data={productImage} aspectRatio="4/5" />
26
+ * ```
27
+ */
28
+ aspectRatio?: string;
29
+ /** The crop position of the image.
30
+ *
31
+ * @remarks
32
+ * In the event that AspectRatio is set, without specifying a crop,
33
+ * the Shopify CDN won't return the expected image.
34
+ *
35
+ * @defaultValue `center`
36
+ */
37
+ crop?: Crop;
38
+ data?: PartialDeep<ImageType, {
39
+ recurseIntoArrays: true;
40
+ }>;
41
+ /** A function that returns a URL string for an image.
42
+ *
43
+ * @remarks
44
+ * By default, this uses Shopify’s CDN {@link https://cdn.shopify.com/} but you can provide
45
+ * your own function to use a another provider, as long as they support URL based image transformations.
46
+ */
47
+ loader?: Loader;
48
+ /** An optional prop you can use to change the default srcSet generation behaviour */
49
+ srcSetOptions?: SrcSetOptions;
50
+ /** An optional prop to set the fill behavior of the image. Defaults to "cover"
51
+ *
52
+ * @remarks
53
+ * "fit" maps to `object-fit: contain`
54
+ * "fill" maps to `object-fit: cover`
55
+ */
56
+ objectFit?: "fit" | "fill" | "cover" | "contain" | "none" | "scale-down";
57
+ };
58
+ /**
59
+ * Tapcart’s Image component is a wrapper around the HTML image element.
60
+ * It supports the same props as the HTML `img` element, but automatically
61
+ * generates the srcSet and sizes attributes for you. For most use cases,
62
+ * you’ll want to set the `aspectRatio` prop to ensure the image is sized
63
+ * correctly.
64
+ *
65
+ * @remarks
66
+ * - `decoding` is set to `async` by default.
67
+ * - `loading` is set to `lazy` by default.
68
+ * - `alt` will automatically be set to the `altText` from the Storefront API if passed in the `data` prop
69
+ * - `src` will automatically be set to the `url` from the Storefront API if passed in the `data` prop
70
+ *
71
+ * @example
72
+ * A responsive image with a 4:5 aspect ratio:
73
+ * ```
74
+ * <Image
75
+ * data={product.featuredImage}
76
+ * aspectRatio="4:5"
77
+ * sizes="(min-width: 45em) 40vw, 100vw"
78
+ * />
79
+ * ```
80
+ * @example
81
+ * A fixed size image:
82
+ * ```
83
+ * <Image
84
+ * data={product.featuredImage}
85
+ * width={100}
86
+ * height={100}
87
+ * />
88
+ * ```
89
+ *
90
+ * {@link https://shopify.dev/docs/api/hydrogen-react/components/image}
91
+ */
92
+ export declare const Image: React.ForwardRefExoticComponent<Omit<TapcartImageProps, "ref"> & React.RefAttributes<HTMLImageElement>>;
93
+ /**
94
+ * The shopifyLoader function is a simple utility function that takes a src, width,
95
+ * height, and crop and returns a string that can be used as the src for an image.
96
+ * It can be used with the Tapcart Image component or with the next/image component.
97
+ * (or any others that accept equivalent configuration)
98
+ * @param src - The source URL of the image, e.g. `https://cdn.shopify.com/static/sample-images/garnished.jpeg`
99
+ * @param width - The width of the image, e.g. `100`
100
+ * @param height - The height of the image, e.g. `100`
101
+ * @param crop - The crop of the image, e.g. `center`
102
+ * @returns A Shopify image URL with the correct query parameters, e.g. `https://cdn.shopify.com/static/sample-images/garnished.jpeg?width=100&height=100&crop=center`
103
+ *
104
+ * @example
105
+ * ```
106
+ * shopifyLoader({
107
+ * src: 'https://cdn.shopify.com/static/sample-images/garnished.jpeg',
108
+ * width: 100,
109
+ * height: 100,
110
+ * crop: 'center',
111
+ * })
112
+ * ```
113
+ */
114
+ export declare function shopifyLoader({ src, width, height, crop, isContained, }: LoaderParams): string;
115
+ /**
116
+ * This function generates a srcSet for Shopify images.
117
+ * @param src - The source URL of the image, e.g. https://cdn.shopify.com/static/sample-images/garnished.jpeg
118
+ * @param sizesArray - An array of objects containing the `width`, `height`, and `crop` of the image, e.g. [\{width: 200, height: 200, crop: 'center'\}, \{width: 400, height: 400, crop: 'center'\}]
119
+ * @param loader - A function that takes a Shopify image URL and returns a Shopify image URL with the correct query parameters
120
+ * @returns A srcSet for Shopify images, e.g. 'https://cdn.shopify.com/static/sample-images/garnished.jpeg?width=200&height=200&crop=center 200w, https://cdn.shopify.com/static/sample-images/garnished.jpeg?width=400&height=400&crop=center 400w'
121
+ */
122
+ export declare function generateSrcSet(src?: string, sizesArray?: Array<{
123
+ width?: number;
124
+ height?: number;
125
+ crop?: Crop;
126
+ }>, loader?: Loader, isContained?: boolean): string;
127
+ /**
128
+ * This function generates an array of sizes for Shopify images, for both fixed and responsive images.
129
+ * @param width - The CSS width of the image
130
+ * @param intervals - The number of intervals to generate
131
+ * @param startingWidth - The starting width of the image
132
+ * @param incrementSize - The size of each interval
133
+ * @returns An array of widths
134
+ */
135
+ export declare function generateImageWidths(width: string | number | undefined, intervals: number, startingWidth: number, incrementSize: number): number[];
136
+ /**
137
+ * Simple utility function to convert an aspect ratio CSS string to a decimal, currently only supports values like `1:1`, not `0.5`, or `auto`
138
+ * @param aspectRatio - The aspect ratio of the image, e.g. `1:1`
139
+ * @returns The aspect ratio as a number, e.g. `1`
140
+ *
141
+ * {@link https://developer.mozilla.org/en-US/docs/Web/CSS/aspect-ratio}
142
+ */
143
+ export declare function parseAspectRatio(aspectRatio?: string): number | undefined;
144
+ /**
145
+ * Generate sizes for Imagery loader
146
+ * @param imageWidths
147
+ * @param aspectRatio
148
+ * @param crop
149
+ * @returns
150
+ */
151
+ export declare function generateSizes(imageWidths?: number[], aspectRatio?: string, crop?: Crop): {
152
+ width: number;
153
+ height: number | undefined;
154
+ crop: Crop;
155
+ }[] | undefined;
156
+ export {};
157
+ //# sourceMappingURL=image.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../../components/ui/image.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAC5C,OAAO,KAAK,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAM1D,KAAK,aAAa,GAAG;IACnB,SAAS,EAAE,MAAM,CAAA;IACjB,aAAa,EAAE,MAAM,CAAA;IACrB,aAAa,EAAE,MAAM,CAAA;IACrB,gBAAgB,EAAE,MA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B,cAAc,CAC5B,GAAG,CAAC,EAAE,MAAM,EACZ,UAAU,CAAC,EAAE,KAAK,CAAC;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,IAAI,CAAA;CAAE,CAAC,EACpE,MAAM,GAAE,MAAsB,EAC9B,WAAW,UAAQ,GAClB,MAAM,CAiBR;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,6BAA0B,EAC/B,SAAS,EAAE,MAAM,EACjB,aAAa,EAAE,MAAM,EACrB,aAAa,EAAE,MAAM,GACpB,MAAM,EAAE,CAUV;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAIzE;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAC3B,WAAW,CAAC,EAAE,MAAM,EAAE,EACtB,WAAW,CAAC,EAAE,MAAM,EACpB,IAAI,GAAE,IAAe,GAEnB;IACE,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,IAAI,EAAE,IAAI,CAAA;CACX,EAAE,GACH,SAAS,CAUZ"}
@@ -0,0 +1,311 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ /* eslint-disable react/display-name */
14
+ /* eslint-disable @next/next/no-img-element */
15
+ import * as React from "react";
16
+ /**
17
+ * Tapcart’s Image component is a wrapper around the HTML image element.
18
+ * It supports the same props as the HTML `img` element, but automatically
19
+ * generates the srcSet and sizes attributes for you. For most use cases,
20
+ * you’ll want to set the `aspectRatio` prop to ensure the image is sized
21
+ * correctly.
22
+ *
23
+ * @remarks
24
+ * - `decoding` is set to `async` by default.
25
+ * - `loading` is set to `lazy` by default.
26
+ * - `alt` will automatically be set to the `altText` from the Storefront API if passed in the `data` prop
27
+ * - `src` will automatically be set to the `url` from the Storefront API if passed in the `data` prop
28
+ *
29
+ * @example
30
+ * A responsive image with a 4:5 aspect ratio:
31
+ * ```
32
+ * <Image
33
+ * data={product.featuredImage}
34
+ * aspectRatio="4:5"
35
+ * sizes="(min-width: 45em) 40vw, 100vw"
36
+ * />
37
+ * ```
38
+ * @example
39
+ * A fixed size image:
40
+ * ```
41
+ * <Image
42
+ * data={product.featuredImage}
43
+ * width={100}
44
+ * height={100}
45
+ * />
46
+ * ```
47
+ *
48
+ * {@link https://shopify.dev/docs/api/hydrogen-react/components/image}
49
+ */
50
+ export const Image = React.forwardRef((_a, ref) => {
51
+ var _b;
52
+ var { alt, aspectRatio, crop = "center", data, decoding = "async", height = "auto", loader = shopifyLoader, loading = "lazy", sizes, src, srcSetOptions = {
53
+ intervals: 15,
54
+ startingWidth: 100,
55
+ incrementSize: 100,
56
+ placeholderWidth: 100,
57
+ }, width = "100%", objectFit = "cover" } = _a, passthroughProps = __rest(_a, ["alt", "aspectRatio", "crop", "data", "decoding", "height", "loader", "loading", "sizes", "src", "srcSetOptions", "width", "objectFit"]);
58
+ /*
59
+ * Gets normalized values for width, height from data prop
60
+ */
61
+ const normalizedData = React.useMemo(() => {
62
+ /* Only use data width if height is also set */
63
+ const dataWidth = (data === null || data === void 0 ? void 0 : data.width) && (data === null || data === void 0 ? void 0 : data.height) ? data === null || data === void 0 ? void 0 : data.width : undefined;
64
+ const dataHeight = (data === null || data === void 0 ? void 0 : data.width) && (data === null || data === void 0 ? void 0 : data.height) ? data === null || data === void 0 ? void 0 : data.height : undefined;
65
+ return {
66
+ width: dataWidth,
67
+ height: dataHeight,
68
+ unitsMatch: Boolean(unitsMatch(dataWidth, dataHeight)),
69
+ };
70
+ }, [data]);
71
+ /*
72
+ * Gets normalized values for width, height, src, alt, and aspectRatio props
73
+ * supporting the presence of `data` in addition to flat props.
74
+ */
75
+ const normalizedProps = React.useMemo(() => {
76
+ const nWidthProp = width || "100%";
77
+ const widthParts = getUnitValueParts(nWidthProp.toString());
78
+ const nWidth = `${widthParts.number}${widthParts.unit}`;
79
+ const autoHeight = height === "auto" || height === undefined || height === null;
80
+ const heightParts = autoHeight
81
+ ? null
82
+ : getUnitValueParts(height.toString());
83
+ const fixedHeight = heightParts
84
+ ? `${heightParts.number}${heightParts.unit}`
85
+ : "";
86
+ const nHeight = autoHeight ? "auto" : fixedHeight;
87
+ const nSrc = src || (data === null || data === void 0 ? void 0 : data.url);
88
+ const nAlt = (data === null || data === void 0 ? void 0 : data.altText) && !alt ? data === null || data === void 0 ? void 0 : data.altText : alt || "";
89
+ const nAspectRatio = aspectRatio
90
+ ? aspectRatio
91
+ : normalizedData.unitsMatch
92
+ ? [
93
+ getNormalizedFixedUnit(normalizedData.width),
94
+ getNormalizedFixedUnit(normalizedData.height),
95
+ ].join(":")
96
+ : undefined;
97
+ // Map Tapcart properties "fill" and "fit" to CSS object-fit values
98
+ const nObjectFit = objectFit === "fill"
99
+ ? "cover"
100
+ : objectFit === "fit"
101
+ ? "contain"
102
+ : objectFit;
103
+ return {
104
+ width: nWidth,
105
+ height: nHeight,
106
+ src: nSrc,
107
+ alt: nAlt,
108
+ aspectRatio: nAspectRatio,
109
+ objectFit: nObjectFit,
110
+ };
111
+ }, [
112
+ width,
113
+ height,
114
+ src,
115
+ data,
116
+ alt,
117
+ aspectRatio,
118
+ normalizedData,
119
+ passthroughProps === null || passthroughProps === void 0 ? void 0 : passthroughProps.key,
120
+ ]);
121
+ const { intervals, startingWidth, incrementSize, placeholderWidth } = srcSetOptions;
122
+ /*
123
+ * This function creates an array of widths to be used in srcSet
124
+ */
125
+ const imageWidths = React.useMemo(() => {
126
+ return generateImageWidths(width, intervals, startingWidth, incrementSize);
127
+ }, [width, intervals, startingWidth, incrementSize]);
128
+ const fixedWidth = isFixedWidth(normalizedProps.width);
129
+ const [isLoaded, setIsLoaded] = React.useState(false);
130
+ const [hasError, setHasError] = React.useState(false);
131
+ const handleImageLoad = () => {
132
+ setIsLoaded(true);
133
+ };
134
+ const handleImageError = () => {
135
+ setHasError(true);
136
+ };
137
+ const imgClassName = `opacity-0 transition-opacity duration-500 ease-in-out ${isLoaded ? "opacity-100" : ""}`;
138
+ const wrapperStyle = {
139
+ aspectRatio: (_b = normalizedProps.aspectRatio) === null || _b === void 0 ? void 0 : _b.replace(":", "/"),
140
+ };
141
+ return (_jsx("div", Object.assign({ className: "relative bg-stateColors-skeleton border-transparent", style: wrapperStyle }, { children: !hasError && normalizedProps.src ? (_jsx("img", Object.assign({ ref: ref, alt: normalizedProps.alt, decoding: decoding, height: normalizedProps.height, loading: loading, src: normalizedProps.src, srcSet: generateSrcSet(normalizedProps.src, generateSizes(imageWidths, normalizedProps.aspectRatio, crop), loader, normalizedProps.objectFit === "contain"), width: normalizedProps.width, className: imgClassName, onLoad: handleImageLoad, onError: handleImageError, sizes: sizes, style: {
142
+ objectFit: normalizedProps.objectFit,
143
+ maxHeight: "100%",
144
+ height: "100%",
145
+ width: "100%",
146
+ } }, passthroughProps))) : (_jsx("div", { className: "absolute top-0 left-0 w-full h-full bg-stateColors-skeleton " })) })));
147
+ });
148
+ /**
149
+ * The shopifyLoader function is a simple utility function that takes a src, width,
150
+ * height, and crop and returns a string that can be used as the src for an image.
151
+ * It can be used with the Tapcart Image component or with the next/image component.
152
+ * (or any others that accept equivalent configuration)
153
+ * @param src - The source URL of the image, e.g. `https://cdn.shopify.com/static/sample-images/garnished.jpeg`
154
+ * @param width - The width of the image, e.g. `100`
155
+ * @param height - The height of the image, e.g. `100`
156
+ * @param crop - The crop of the image, e.g. `center`
157
+ * @returns A Shopify image URL with the correct query parameters, e.g. `https://cdn.shopify.com/static/sample-images/garnished.jpeg?width=100&height=100&crop=center`
158
+ *
159
+ * @example
160
+ * ```
161
+ * shopifyLoader({
162
+ * src: 'https://cdn.shopify.com/static/sample-images/garnished.jpeg',
163
+ * width: 100,
164
+ * height: 100,
165
+ * crop: 'center',
166
+ * })
167
+ * ```
168
+ */
169
+ export function shopifyLoader({ src, width, height, crop, isContained, }) {
170
+ if (!src) {
171
+ return "";
172
+ }
173
+ const url = new URL(src);
174
+ if (width && !isContained) {
175
+ url.searchParams.append("width", Math.round(width).toString());
176
+ }
177
+ if (height) {
178
+ url.searchParams.append("height", Math.round(height).toString());
179
+ }
180
+ if (crop && !isContained) {
181
+ url.searchParams.append("crop", crop);
182
+ }
183
+ return url.href;
184
+ }
185
+ /**
186
+ * Checks whether the width and height share the same unit type
187
+ * @param width - The width of the image, e.g. 100% | 10px
188
+ * @param height - The height of the image, e.g. auto | 100px
189
+ * @returns Whether the width and height share the same unit type (boolean)
190
+ */
191
+ function unitsMatch(width = "100%", height = "auto") {
192
+ return (getUnitValueParts(width.toString()).unit ===
193
+ getUnitValueParts(height.toString()).unit);
194
+ }
195
+ /**
196
+ * Given a CSS size, returns the unit and number parts of the value
197
+ * @param value - The CSS size, e.g. 100px
198
+ * @returns The unit and number parts of the value, e.g. \{unit: 'px', number: 100\}
199
+ */
200
+ function getUnitValueParts(value) {
201
+ const unit = value.replace(/[0-9.]/g, "");
202
+ const number = parseFloat(value.replace(unit, ""));
203
+ return {
204
+ unit: unit === "" ? (number === undefined ? "auto" : "px") : unit,
205
+ number,
206
+ };
207
+ }
208
+ /**
209
+ * Given a value, returns the width of the image as an integer in pixels
210
+ * @param value - The width of the image, e.g. 16px | 1rem | 1em | 16
211
+ * @returns The width of the image in pixels, e.g. 16, or undefined if the value is not a fixed unit
212
+ */
213
+ function getNormalizedFixedUnit(value) {
214
+ if (value === undefined)
215
+ return;
216
+ const { unit, number } = getUnitValueParts(value.toString());
217
+ switch (unit) {
218
+ case "em":
219
+ case "rem":
220
+ return number * 16;
221
+ case "px":
222
+ case "":
223
+ return number;
224
+ default:
225
+ return;
226
+ }
227
+ }
228
+ /**
229
+ * This function checks whether a width is fixed or not.
230
+ * @param width - The width of the image, e.g. 100 | '100px' | '100em' | '100rem'
231
+ * @returns Whether the width is fixed or not
232
+ */
233
+ function isFixedWidth(width) {
234
+ const fixedEndings = /\d(px|em|rem)$/;
235
+ return (typeof width === "number" ||
236
+ (typeof width === "string" && fixedEndings.test(width)));
237
+ }
238
+ /**
239
+ * This function generates a srcSet for Shopify images.
240
+ * @param src - The source URL of the image, e.g. https://cdn.shopify.com/static/sample-images/garnished.jpeg
241
+ * @param sizesArray - An array of objects containing the `width`, `height`, and `crop` of the image, e.g. [\{width: 200, height: 200, crop: 'center'\}, \{width: 400, height: 400, crop: 'center'\}]
242
+ * @param loader - A function that takes a Shopify image URL and returns a Shopify image URL with the correct query parameters
243
+ * @returns A srcSet for Shopify images, e.g. 'https://cdn.shopify.com/static/sample-images/garnished.jpeg?width=200&height=200&crop=center 200w, https://cdn.shopify.com/static/sample-images/garnished.jpeg?width=400&height=400&crop=center 400w'
244
+ */
245
+ export function generateSrcSet(src, sizesArray, loader = shopifyLoader, isContained = false) {
246
+ if (!src)
247
+ return "";
248
+ if (!sizesArray || sizesArray.length === 0)
249
+ return src;
250
+ const srcSet = sizesArray
251
+ .map((size, i) => {
252
+ var _a;
253
+ return `${loader({
254
+ src,
255
+ width: size.width,
256
+ height: size.height,
257
+ crop: size.crop,
258
+ isContained,
259
+ })} ${sizesArray.length === 3 ? `${i + 1}x` : `${(_a = size.width) !== null && _a !== void 0 ? _a : 0}w`}`;
260
+ })
261
+ .join(`, `);
262
+ return srcSet;
263
+ }
264
+ /**
265
+ * This function generates an array of sizes for Shopify images, for both fixed and responsive images.
266
+ * @param width - The CSS width of the image
267
+ * @param intervals - The number of intervals to generate
268
+ * @param startingWidth - The starting width of the image
269
+ * @param incrementSize - The size of each interval
270
+ * @returns An array of widths
271
+ */
272
+ export function generateImageWidths(width = "100%", intervals, startingWidth, incrementSize) {
273
+ const responsive = Array.from({ length: intervals }, (_, i) => i * incrementSize + startingWidth);
274
+ const fixed = Array.from({ length: 3 }, (_, i) => { var _a; return (i + 1) * ((_a = getNormalizedFixedUnit(width)) !== null && _a !== void 0 ? _a : 0); });
275
+ return isFixedWidth(width) ? fixed : responsive;
276
+ }
277
+ /**
278
+ * Simple utility function to convert an aspect ratio CSS string to a decimal, currently only supports values like `1:1`, not `0.5`, or `auto`
279
+ * @param aspectRatio - The aspect ratio of the image, e.g. `1:1`
280
+ * @returns The aspect ratio as a number, e.g. `1`
281
+ *
282
+ * {@link https://developer.mozilla.org/en-US/docs/Web/CSS/aspect-ratio}
283
+ */
284
+ export function parseAspectRatio(aspectRatio) {
285
+ if (!aspectRatio)
286
+ return;
287
+ const [width, height] = aspectRatio.split(":");
288
+ return Number(width) / Number(height);
289
+ }
290
+ /**
291
+ * Generate sizes for Imagery loader
292
+ * @param imageWidths
293
+ * @param aspectRatio
294
+ * @param crop
295
+ * @returns
296
+ */
297
+ export function generateSizes(imageWidths, aspectRatio, crop = "center") {
298
+ if (!imageWidths)
299
+ return;
300
+ const sizes = imageWidths.map((width) => {
301
+ var _a;
302
+ return ({
303
+ width,
304
+ height: aspectRatio
305
+ ? width / ((_a = parseAspectRatio(aspectRatio)) !== null && _a !== void 0 ? _a : 1)
306
+ : undefined,
307
+ crop,
308
+ });
309
+ });
310
+ return sizes;
311
+ }
@@ -0,0 +1,14 @@
1
+ import * as React from "react";
2
+ export interface LineItemTextIconProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
3
+ primaryText: string;
4
+ secondaryText: string;
5
+ selected?: boolean;
6
+ showIcon?: boolean;
7
+ showSecondaryText?: boolean;
8
+ showChevron?: boolean;
9
+ onClick?: () => void;
10
+ className?: string;
11
+ }
12
+ declare const LineItemTextIcon: React.ForwardRefExoticComponent<LineItemTextIconProps & React.RefAttributes<HTMLButtonElement>>;
13
+ export { LineItemTextIcon };
14
+ //# sourceMappingURL=line-item-text-icons.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"line-item-text-icons.d.ts","sourceRoot":"","sources":["../../../components/ui/line-item-text-icons.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAO9B,MAAM,WAAW,qBACf,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IACrD,WAAW,EAAE,MAAM,CAAA;IACnB,aAAa,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,QAAA,MAAM,gBAAgB,iGA0DrB,CAAA;AAID,OAAO,EAAE,gBAAgB,EAAE,CAAA"}
@@ -0,0 +1,22 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
12
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
+ import * as React from "react";
14
+ import { Text } from "./text";
15
+ import { cn } from "../../lib/utils";
16
+ import { Icon } from "./icon";
17
+ const LineItemTextIcon = React.forwardRef((_a, ref) => {
18
+ var { primaryText, secondaryText, selected = false, showIcon = true, showSecondaryText = true, showChevron = true, onClick, className } = _a, props = __rest(_a, ["primaryText", "secondaryText", "selected", "showIcon", "showSecondaryText", "showChevron", "onClick", "className"]);
19
+ return (_jsxs("button", Object.assign({ className: cn("flex flex-row p-4 gap-2 w-full border-b border-coreColors-dividingLines", selected ? "bg-stateColors-skeleton" : "", className), ref: ref, onClick: onClick }, props, { children: [_jsx(Icon, { name: "map-pin", size: "sm", color: "coreColors-secondaryIcon", className: `${showIcon ? "" : "opacity-0"}` }), _jsxs("div", Object.assign({ className: "flex flex-col w-full items-start gap-1 overflow-hidden" }, { children: [_jsx(Text, Object.assign({ type: "body-primary", className: "text-textColors-primaryColor max-w-full truncate" }, { children: primaryText })), _jsx(Text, Object.assign({ type: "body-secondary", className: `text-textColors-secondaryColor line-clamp-2 text-left ${showSecondaryText ? "" : "opacity-0"}` }, { children: secondaryText }))] })), _jsx(Icon, { name: "chevron-right", size: "sm", color: "coreColors-secondaryIcon", className: `my-auto ${showChevron ? "" : "opacity-0"}` })] })));
20
+ });
21
+ LineItemTextIcon.displayName = "LineItemTextIcon";
22
+ export { LineItemTextIcon };
@@ -1,9 +1,11 @@
1
1
  import * as React from "react";
2
+ import { Product } from "app-studio-types";
2
3
  type Config = {
3
4
  gridLayout?: string;
4
5
  productImage?: {
5
6
  enabled: boolean;
6
7
  cornerRadius: number;
8
+ allowSwipeability: boolean;
7
9
  };
8
10
  price?: {
9
11
  enabled: boolean;
@@ -66,24 +68,6 @@ type TapcartData = {
66
68
  };
67
69
  };
68
70
  };
69
- export type Product = {
70
- variants: {
71
- compareAtPrice: {
72
- amount: string;
73
- currencyCode: string;
74
- } | undefined;
75
- price: {
76
- amount: string;
77
- currencyCode: string;
78
- };
79
- }[];
80
- images: {
81
- src: string;
82
- }[];
83
- title: string;
84
- tags: string[];
85
- availableForSale: boolean;
86
- };
87
71
  export type ProductCardProps = {
88
72
  config: Config;
89
73
  tapcartData: TapcartData;
@@ -92,7 +76,10 @@ export type ProductCardProps = {
92
76
  favorited?: boolean;
93
77
  onFavoriteClick?: (event: React.MouseEvent<HTMLButtonElement>, product: Product) => void;
94
78
  onQuickAdd?: (event: React.MouseEvent<HTMLButtonElement>, product: Product) => void;
95
- openProduct?: (event: React.MouseEvent<HTMLDivElement>, product: Product) => void;
79
+ openProduct?: (params: {
80
+ productId: string;
81
+ variantId?: string;
82
+ }) => void;
96
83
  };
97
84
  declare const ProductCard: React.FC<ProductCardProps>;
98
85
  export { ProductCard };
@@ -1 +1 @@
1
- {"version":3,"file":"product-card.d.ts","sourceRoot":"","sources":["../../../components/ui/product-card.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAO9B,KAAK,MAAM,GAAG;IACZ,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE;QACb,OAAO,EAAE,OAAO,CAAC;QACjB,YAAY,EAAE,MAAM,CAAC;KACtB,CAAC;IACF,KAAK,CAAC,EAAE;QACN,OAAO,EAAE,OAAO,CAAC;QACjB,QAAQ,EAAE,MAAM,CAAC;QACjB,aAAa,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,IAAI,CAAA;KAClD,CAAC;IACF,YAAY,CAAC,EAAE;QACb,OAAO,EAAE,OAAO,CAAC;QACjB,QAAQ,EAAE,MAAM,CAAC;QACjB,SAAS,EAAE,OAAO,CAAC;QACnB,aAAa,EAAE,MAAM,CAAC;QACtB,QAAQ,EAAE,OAAO,CAAC;KACnB,CAAC;IACF,QAAQ,CAAC,EAAE;QACT,OAAO,EAAE,OAAO,CAAC;QACjB,QAAQ,EAAE,MAAM,CAAC;QACjB,SAAS,EAAE,OAAO,CAAC;QACnB,aAAa,EAAE,MAAM,CAAC;QACtB,YAAY,EAAE,MAAM,CAAC;KACtB,CAAC;IACF,aAAa,CAAC,EAAE;QACd,OAAO,EAAE,OAAO,CAAC;QACjB,UAAU,EAAE,UAAU,GAAG,WAAW,GAAG,aAAa,GAAG,cAAc,GAAG,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