@tapcart/mobile-components 0.8.30 → 0.8.31

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.
@@ -1 +1 @@
1
- {"version":3,"file":"use-block-conditional-rendering.d.ts","sourceRoot":"","sources":["../../../components/hooks/use-block-conditional-rendering.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,YAAY,EAGb,MAAM,kBAAkB,CAAA;AAczB,eAAO,MAAM,4BAA4B,WAC/B;IACN,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;IACd,eAAe,EAAE,GAAG,CAAA;IACpB,iBAAiB,EAAE,GAAG,CAAA;CACvB,UACO,YAAY;;;CAyMrB,CAAA"}
1
+ {"version":3,"file":"use-block-conditional-rendering.d.ts","sourceRoot":"","sources":["../../../components/hooks/use-block-conditional-rendering.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,YAAY,EAGb,MAAM,kBAAkB,CAAA;AAczB,eAAO,MAAM,4BAA4B,WAC/B;IACN,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;IACd,eAAe,EAAE,GAAG,CAAA;IACpB,iBAAiB,EAAE,GAAG,CAAA;CACvB,UACO,YAAY;;;CA2NrB,CAAA"}
@@ -40,7 +40,7 @@ export const useBlockConditionalRendering = (_props, _block) => {
40
40
  if (conditionalsV2IsEnabled && ((_a = _block === null || _block === void 0 ? void 0 : _block.visibilityConditions) === null || _a === void 0 ? void 0 : _a.conditions)) {
41
41
  const extractProductMetafields = (conditions) => {
42
42
  return conditions.reduce((acc, condition) => {
43
- if (condition.type === 'productMetafield' && condition.value) {
43
+ if (condition.type === "productMetafield" && condition.value) {
44
44
  acc.push(condition.value);
45
45
  }
46
46
  if (condition.conditions) {
@@ -53,7 +53,12 @@ export const useBlockConditionalRendering = (_props, _block) => {
53
53
  return extractProductMetafields(blockState.conditions || []);
54
54
  }
55
55
  return [];
56
- }, [blockState, conditionalsV1IsEnabled, conditionalsV2IsEnabled, _block === null || _block === void 0 ? void 0 : _block.visibilityConditions]);
56
+ }, [
57
+ blockState,
58
+ conditionalsV1IsEnabled,
59
+ conditionalsV2IsEnabled,
60
+ _block === null || _block === void 0 ? void 0 : _block.visibilityConditions,
61
+ ]);
57
62
  // Fetch product if productId is present
58
63
  const { products, error: useProductsError, isLoading: isProductsLoading, } = useProducts({
59
64
  productIds: productId !== undefined ? [gidFromId(productId)] : [],
@@ -73,7 +78,7 @@ export const useBlockConditionalRendering = (_props, _block) => {
73
78
  if (conditionalsV2IsEnabled && ((_a = _block === null || _block === void 0 ? void 0 : _block.visibilityConditions) === null || _a === void 0 ? void 0 : _a.conditions)) {
74
79
  const extractCollectionMetafields = (conditions) => {
75
80
  return conditions.reduce((acc, condition) => {
76
- if (condition.type === 'collectionMetafield' && condition.value) {
81
+ if (condition.type === "collectionMetafield" && condition.value) {
77
82
  acc.push(condition.value);
78
83
  }
79
84
  if (condition.conditions) {
@@ -86,7 +91,12 @@ export const useBlockConditionalRendering = (_props, _block) => {
86
91
  return extractCollectionMetafields(blockState.conditions || []);
87
92
  }
88
93
  return [];
89
- }, [blockState, conditionalsV1IsEnabled, conditionalsV2IsEnabled, _block === null || _block === void 0 ? void 0 : _block.visibilityConditions]);
94
+ }, [
95
+ blockState,
96
+ conditionalsV1IsEnabled,
97
+ conditionalsV2IsEnabled,
98
+ _block === null || _block === void 0 ? void 0 : _block.visibilityConditions,
99
+ ]);
90
100
  const collectionMetafieldsQuery = useMemo(() => blockCollectionMetafields.map((item) => {
91
101
  // these are the fields used in the query.
92
102
  return {
@@ -8,7 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  });
9
9
  };
10
10
  import { renderHook } from "@testing-library/react";
11
- import { act } from "react-dom/test-utils";
11
+ import { act } from "react";
12
12
  import { NostoRecommendationsType, useNostoRecommendations, } from "./use-nosto-recommendation";
13
13
  import { useProducts } from "./use-products";
14
14
  jest.mock("./use-products", () => ({
@@ -1 +1 @@
1
- {"version":3,"file":"use-shop.d.ts","sourceRoot":"","sources":["../../../components/hooks/use-shop.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAEvC,KAAK,GAAG,GAAG,MAAM,CAAA;AACjB,KAAK,YAAY,GAAG;IAClB,OAAO,EAAE,GAAG,CAAA;IACZ,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,GAAG,CAAC,CAAA;CACxC,CAAA;AACD,KAAK,aAAa,GAAG;IACnB,IAAI,EAAE,IAAI,GAAG;QAAE,eAAe,EAAE,MAAM,CAAA;KAAE,CAAA;IACxC,KAAK,EAAE,GAAG,CAAA;IACV,SAAS,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,wBAAgB,OAAO,CAAC,KAAK,EAAE,YAAY,GAAG,IAAI,GAAG,aAAa,CAkBjE"}
1
+ {"version":3,"file":"use-shop.d.ts","sourceRoot":"","sources":["../../../components/hooks/use-shop.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAEvC,KAAK,GAAG,GAAG,MAAM,CAAA;AACjB,KAAK,YAAY,GAAG;IAClB,OAAO,EAAE,GAAG,CAAA;IACZ,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,GAAG,CAAC,CAAA;CACxC,CAAA;AACD,KAAK,aAAa,GAAG;IACnB,IAAI,EAAE,IAAI,GAAG;QAAE,eAAe,EAAE,MAAM,CAAA;KAAE,CAAA;IACxC,KAAK,EAAE,GAAG,CAAA;IACV,SAAS,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,wBAAgB,OAAO,CAAC,KAAK,EAAE,YAAY,GAAG,IAAI,GAAG,aAAa,CAkBjE"}
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import useSWR from "swr";
2
3
  export function useShop(props) {
3
4
  let url = null;
@@ -23,7 +23,7 @@ const AccordionItem = React.forwardRef((_a, ref) => {
23
23
  AccordionItem.displayName = "AccordionItem";
24
24
  const AccordionTrigger = React.forwardRef((_a, ref) => {
25
25
  var { className, children, showDefaultIcon = true } = _a, props = __rest(_a, ["className", "children", "showDefaultIcon"]);
26
- return (_jsx(AccordionPrimitive.Header, Object.assign({ className: "flex" }, { children: _jsxs(AccordionPrimitive.Trigger, Object.assign({ ref: ref, className: cn("px-4 flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline active:opacity-70", { "[&[data-state=open]_svg]:rotate-180": showDefaultIcon }, className) }, props, { children: [children, showDefaultIcon && (_jsx(Icon, { name: "chevron-down", size: "sm", className: "text-coreColors-secondaryIcon shrink-0 transition-transform duration-200" }))] })) })));
26
+ return (_jsx(AccordionPrimitive.Header, Object.assign({ className: "flex" }, { children: _jsxs(AccordionPrimitive.Trigger, Object.assign({ ref: ref, className: cn("px-4 flex flex-1 items-center justify-between py-4 font-medium transition-all active:opacity-70", { "[&[data-state=open]_svg]:rotate-180": showDefaultIcon }, className) }, props, { children: [children, showDefaultIcon && (_jsx(Icon, { name: "chevron-down", size: "sm", className: "text-coreColors-secondaryIcon shrink-0 transition-transform duration-200" }))] })) })));
27
27
  });
28
28
  AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
29
29
  const AccordionContent = React.forwardRef((_a, ref) => {
@@ -30,10 +30,10 @@ const buttonVariants = cva("w-full flex rounded items-center justify-center tran
30
30
  variant: {
31
31
  default: "bg-buttonColors-primaryFill border border-buttonColors-primaryOutlineColor shadow-primary",
32
32
  destructive: "bg-stateColors-error disabled:bg-stateColors-disabled shadow-buttonColors-primaryShadow",
33
- outline: "border border-input hover:bg-accent",
33
+ outline: "border border-input",
34
34
  secondary: "bg-buttonColors-secondaryFill border border-buttonColors-secondaryOutlineColor disabled:bg-buttonColors-secondaryFill disabled:text-stateColors-disabled shadow-secondary",
35
- ghost: "hover:bg-accent",
36
- link: "underline-offset-4 hover:underline disabled:text-stateColors-disabled disabled:bg-transparent",
35
+ ghost: "",
36
+ link: "underline-offset-4 disabled:text-stateColors-disabled disabled:bg-transparent",
37
37
  quickadd: "bg-buttonColors-primaryFill w-full rounded-none rounded-b-lg min-h-8 border border-buttonColors-primaryOutlineColor py-2",
38
38
  applePay: "bg-white border border-black",
39
39
  shopPay: "bg-[#612EFF]",
@@ -49,9 +49,9 @@ const iconVariants = cva("", {
49
49
  variant: {
50
50
  default: "text-buttonColors-primaryText",
51
51
  destructive: "text-coreColors-pageColor",
52
- outline: "hover:text-accent-foreground",
52
+ outline: "",
53
53
  secondary: "text-buttonColors-secondaryText",
54
- ghost: "hover:text-accent-foreground",
54
+ ghost: "",
55
55
  link: "text-textColors-primaryColor",
56
56
  quickadd: "text-buttonColors-primaryText",
57
57
  applePay: "text-black",
@@ -67,9 +67,9 @@ const labelVariants = cva("truncate", {
67
67
  variant: {
68
68
  default: "text-buttonColors-primaryText",
69
69
  destructive: "text-coreColors-pageColor",
70
- outline: "hover:text-accent-foreground",
70
+ outline: "",
71
71
  secondary: "text-buttonColors-secondaryText",
72
- ghost: "hover:text-accent-foreground",
72
+ ghost: "",
73
73
  link: "text-textColors-primaryColor",
74
74
  quickadd: "text-buttonColors-primaryText",
75
75
  applePay: "text-black border",
@@ -19,7 +19,7 @@ declare const Chip: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps
19
19
  direction?: "vertical" | "horizontal" | null | undefined;
20
20
  iconPosition?: "left" | "right" | "default" | null | undefined;
21
21
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string> & {
22
- icon?: React.ElementType<any> | undefined;
22
+ icon?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
23
23
  iconColor?: string | undefined;
24
24
  iconPosition?: "left" | "right" | undefined;
25
25
  iconUrl?: string | undefined;
@@ -16,7 +16,7 @@ import { cn } from "../../lib/utils";
16
16
  import React, { useState, useEffect } from "react";
17
17
  import { Icon } from "./icon";
18
18
  import { LoadingDots } from "./loading-dots";
19
- const chipVariants = cva("inline-flex items-center justify-center rounded border border-coreColors-dividingLines text-[12px] transition-colors h-8 active:opacity-70", {
19
+ const chipVariants = cva("inline-flex items-center justify-center rounded border border-coreColors-dividingLines text-[12px] transition-colors h-8 active:opacity-70 cursor-pointer", {
20
20
  variants: {
21
21
  variant: {
22
22
  primary: "bg-coreColors-pageColor text-textColors-primaryColor",
@@ -70,6 +70,6 @@ function EmptyMessage({ iconName, iconUrl, title, description, className, button
70
70
  });
71
71
  }
72
72
  };
73
- return (_jsxs("div", Object.assign({ className: cn("flex-grow flex flex-col justify-center items-center gap-4 h-full", className), onClick: handlePageClick }, { children: [_jsxs("div", Object.assign({ className: "flex flex-col justify-center items-center gap-2" }, { children: [_jsx(Icon, { url: iconUrl, name: iconName, size: "md", color: "coreColors-secondaryIcon" }), _jsx(Text, Object.assign({ type: "h2", className: "text-textColors-primaryColor text-center" }, { children: title })), _jsx(Text, Object.assign({ type: "body-primary", className: "text-textColors-secondaryColor text-center" }, { children: description }))] })), buttonLabel ? (_jsx(Button, Object.assign({ variant: "default", onClick: onClick, className: "w-auto" }, { children: buttonLabel }))) : null] })));
73
+ return (_jsxs("div", Object.assign({ className: cn("flex-grow flex flex-col justify-center items-center gap-4 h-full cursor-pointer", className), onClick: handlePageClick }, { children: [_jsxs("div", Object.assign({ className: "flex flex-col justify-center items-center gap-2" }, { children: [_jsx(Icon, { url: iconUrl, name: iconName, size: "md", color: "coreColors-secondaryIcon" }), _jsx(Text, Object.assign({ type: "h2", className: "text-textColors-primaryColor text-center" }, { children: title })), _jsx(Text, Object.assign({ type: "body-primary", className: "text-textColors-secondaryColor text-center" }, { children: description }))] })), buttonLabel ? (_jsx(Button, Object.assign({ variant: "default", onClick: onClick, className: "w-auto" }, { children: buttonLabel }))) : null] })));
74
74
  }
75
75
  export { EmptyMessage };
@@ -1 +1 @@
1
- {"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../../components/ui/image.tsx"],"names":[],"mappings":"AAGA,OAA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,CAAA;IAC1B,IAAI,EAAE,IAAI,CAAA;CACX,EAAE,GACH,SAAS,CAUZ"}
@@ -174,11 +174,12 @@ export const Image = React.forwardRef((_a, ref) => {
174
174
  }, [ref]);
175
175
  const wrapperStyle = Object.assign({ aspectRatio: (_b = normalizedProps === null || normalizedProps === void 0 ? void 0 : normalizedProps.aspectRatio) === null || _b === void 0 ? void 0 : _b.replace(":", "/") }, imageWrapperStyles);
176
176
  const srcSet = generateSrcSet(normalizedProps.src, generateSizes(imageWidths, normalizedProps.aspectRatio, crop), loader, normalizedProps.objectFit === "contain");
177
+ console.log("Image alt value:", normalizedProps.alt);
177
178
  return (_jsxs(_Fragment, { children: [loading === "eager" && (_jsx(ImagePreload, { imgAttributes: {
178
179
  srcSet,
179
180
  sizes,
180
181
  fetchPriority: normalizedProps.fetchPriority,
181
- src: normalizedProps.src || "",
182
+ src: (normalizedProps.src || ""),
182
183
  } })), _jsxs("div", Object.assign({ className: "relative", style: Object.assign(Object.assign({ borderRadius: `${imageRadius}px` }, wrapperStyle), { overflow: "hidden" }) }, { children: [!hasError && normalizedProps.src ? (_jsx("img", Object.assign({}, passthroughProps, { fetchPriority: normalizedProps.fetchPriority, alt: normalizedProps.alt, decoding: decoding, height: normalizedProps.height, loading: loading, srcSet: srcSet, width: normalizedProps.width, onLoad: handleImageLoad, onError: handleImageError, sizes: sizes,
183
184
  // `src` needs to come after `sizes` and `srcSet` because React updates
184
185
  // attributes in order. If we keep `src` the first one, Safari will
@@ -188,7 +188,7 @@ const ProductCard = ({ config, tapcartData, product, isLoading, favorited, onFav
188
188
  };
189
189
  const sizes = getImageSizes(config);
190
190
  const imageSwipeEnabled = ((_e = config.productImage) === null || _e === void 0 ? void 0 : _e.allowSwipeability) && product.images.length > 1;
191
- return (_jsx("div", Object.assign({ className: cn("w-1/2", className) }, { children: _jsxs("div", Object.assign({ className: "w-full active:opacity-70", onClick: () => {
191
+ return (_jsx("div", Object.assign({ className: cn("w-1/2", className) }, { children: _jsxs("div", Object.assign({ className: "w-full active:opacity-70 cursor-pointer", onClick: () => {
192
192
  _openProduct();
193
193
  } }, { children: [((_f = config.productImage) === null || _f === void 0 ? void 0 : _f.enabled) && (_jsxs("div", Object.assign({ className: "relative w-full overflow-hidden", style: {
194
194
  borderTopLeftRadius: `${config.productImage.cornerRadius}px`,
@@ -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-[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) => {
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 h-4 w-4 rounded-full border-2 border-coreColors-brandColorPrimary bg-coreColors-modalBackground focus-visible:outline-none 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
  } })] }))] })) }))] }))] }));
@@ -17,7 +17,7 @@ import { Icon } from "./icon";
17
17
  const Subscription = React.forwardRef((_a, ref) => {
18
18
  var { imgUrl, name, oldPrice, newPrice, savePercentage = true, selected = false, type = "subscription", onClick, className } = _a, props = __rest(_a, ["imgUrl", "name", "oldPrice", "newPrice", "savePercentage", "selected", "type", "onClick", "className"]);
19
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: [type == "subscription" && (_jsx(Icon, { name: "repeat", size: "sm", color: "stateColors-subscriptions", className: "my-auto" })), _jsxs("div", Object.assign({ className: "flex flex-col w-full items-start overflow-hidden" }, { children: [_jsx(Text, Object.assign({ type: "body-primary", className: "text-textColors-primaryColor truncate w-full text-left" }, { children: name })), type == "subscription" && savePercentage && newPrice ? (_jsxs(Text, Object.assign({ type: "body-secondary", className: "text-stateColors-subscriptions" }, { children: ["Save ", 100 - (newPrice * 100) / oldPrice, "%"] }))) : null] })), _jsxs("div", Object.assign({ className: "flex flex-row items-start gap-2" }, { children: [type == "subscription" && newPrice ? (_jsx(Text, Object.assign({ type: "body-primary", className: "text-textColors-salePriceText" }, { children: `$${newPrice.toFixed(2)}` }))) : null, _jsx(Text, Object.assign({ type: "body-primary", className: `${type == "subscription"
20
- ? "line-through hover:!line-through text-textColors-strikethroughPriceText"
20
+ ? "line-through text-textColors-strikethroughPriceText"
21
21
  : "text-textColors-priceText"}` }, { children: `$${oldPrice.toFixed(2)}` }))] }))] })));
22
22
  });
23
23
  Subscription.displayName = "Subscription";
@@ -2,7 +2,7 @@ import React, { ReactNode } from "react";
2
2
  declare const useTap: (tapThreshold?: number) => {
3
3
  onTap: (handler: (event: any) => void) => (event: any) => void;
4
4
  isPressed: boolean;
5
- ref: React.MutableRefObject<null>;
5
+ ref: React.RefObject<null>;
6
6
  };
7
7
  interface TapProps {
8
8
  children: ReactNode;
@@ -121,10 +121,12 @@ const Tap = ({ children }) => {
121
121
  return React.cloneElement(element, Object.assign(Object.assign({}, props), { onClick: undefined, onTouchEnd: (event) => {
122
122
  onTap(() => {
123
123
  if (element.props.onTouchEnd) {
124
+ ;
124
125
  element.props.onTouchEnd(event);
125
126
  return;
126
127
  }
127
128
  if (element.props.onClick) {
129
+ ;
128
130
  element.props.onClick(event);
129
131
  return;
130
132
  }
@@ -15,7 +15,7 @@ import * as React from "react";
15
15
  import { Slot } from "@radix-ui/react-slot";
16
16
  import { cva } from "class-variance-authority";
17
17
  import { cn } from "../../lib/utils";
18
- const textareaVariants = cva("relative pl-4 pr-4 rounded border border-coreColors-dividingLines bg-coreColors-inputBackground focus-within:border-coreColors-brandColorPrimary [&_label]:focus-within:text-coreColors-brandColorPrimary", {
18
+ const textareaVariants = cva("relative pl-4 pr-4 rounded border border-coreColors-dividingLines bg-coreColors-inputBackground focus-within:border-coreColors-brandColorPrimary [&_label]:focus-within:text-coreColors-brandColorPrimary cursor-text", {
19
19
  variants: {
20
20
  error: {
21
21
  true: "!border-stateColors-error [&_*]:text-stateColors-error [&_*]:placeholder:text-stateColors-error focus-within:!border-stateColors-error [&+label]:text-stateColors-error [&_label]:focus-within:!text-stateColors-error",
@@ -55,12 +55,12 @@ const Toast = React.forwardRef((_a, ref) => {
55
55
  Toast.displayName = ToastPrimitives.Root.displayName;
56
56
  const ToastAction = React.forwardRef((_a, ref) => {
57
57
  var { className } = _a, props = __rest(_a, ["className"]);
58
- return (_jsx(ToastPrimitives.Action, Object.assign({ ref: ref, className: cn("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive", className) }, props)));
58
+ return (_jsx(ToastPrimitives.Action, Object.assign({ ref: ref, className: cn("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:focus:ring-destructive", className) }, props)));
59
59
  });
60
60
  ToastAction.displayName = ToastPrimitives.Action.displayName;
61
61
  const ToastClose = React.forwardRef((_a, ref) => {
62
62
  var { className } = _a, props = __rest(_a, ["className"]);
63
- return (_jsx(ToastPrimitives.Close, Object.assign({ ref: ref, className: cn("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600", className), "toast-close": "" }, props, { children: _jsx(X, { className: "h-4 w-4" }) })));
63
+ return (_jsx(ToastPrimitives.Close, Object.assign({ ref: ref, className: cn("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:text-red-300 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600", className), "toast-close": "" }, props, { children: _jsx(X, { className: "h-4 w-4" }) })));
64
64
  });
65
65
  ToastClose.displayName = ToastPrimitives.Close.displayName;
66
66
  const ToastTitle = React.forwardRef((_a, ref) => {
@@ -1 +1 @@
1
- {"version":3,"file":"toggle.d.ts","sourceRoot":"","sources":["../../../components/ui/toggle.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAA;AACzD,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAIjE,QAAA,MAAM,cAAc;;;mFAoBnB,CAAA;AAED,QAAA,MAAM,MAAM;;;8HAUV,CAAA;AAIF,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAA"}
1
+ {"version":3,"file":"toggle.d.ts","sourceRoot":"","sources":["../../../components/ui/toggle.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAA;AACzD,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAIjE,QAAA,MAAM,cAAc;;;mFAmBnB,CAAA;AAED,QAAA,MAAM,MAAM;;;8HAUV,CAAA;AAIF,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAA"}
@@ -15,11 +15,11 @@ import * as React from "react";
15
15
  import * as TogglePrimitive from "@radix-ui/react-toggle";
16
16
  import { cva } from "class-variance-authority";
17
17
  import { cn } from "../../lib/utils";
18
- const toggleVariants = cva("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground active:opacity-70", {
18
+ const toggleVariants = cva("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground active:opacity-70", {
19
19
  variants: {
20
20
  variant: {
21
21
  default: "bg-transparent",
22
- outline: "border border-input bg-transparent hover:bg-accent hover:text-accent-foreground",
22
+ outline: "border border-input bg-transparent",
23
23
  },
24
24
  size: {
25
25
  default: "h-10 px-3",
@@ -165,7 +165,7 @@ const Video = React.forwardRef((_a, ref) => {
165
165
  };
166
166
  return (_jsxs("div", Object.assign({ className: "relative w-full" }, { children: [_jsx("video", Object.assign({ ref: videoRef, className: cn(videoVariants.base, videoAttributes.videoFit === "fill"
167
167
  ? videoVariants.fit.cover
168
- : videoVariants.fit.contain, className), style: videoStyle, preload: "metadata", playsInline: true, loop: videoAttributes.enabled, controls: false, src: src }, props)), isLoaded && !isPlaying && (_jsx("button", Object.assign({ onClick: handlePlayPause, className: "absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 z-50\n w-16 h-16 rounded-full bg-black/75 hover:bg-black/90 \n flex items-center justify-center transition-all duration-300\n hover:scale-110 focus:outline-none focus:ring-2 focus:ring-white", "aria-label": "Play video" }, { children: _jsx("div", { className: "w-0 h-0 border-y-8 border-y-transparent \n border-l-[16px] border-l-white \n translate-x-[2px]" }) })))] })));
168
+ : videoVariants.fit.contain, className), style: videoStyle, preload: "metadata", playsInline: true, loop: videoAttributes.enabled, controls: false, src: src }, props)), isLoaded && !isPlaying && (_jsx("button", Object.assign({ onClick: handlePlayPause, className: "absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 z-50\n w-16 h-16 rounded-full bg-black/75 \n flex items-center justify-center transition-all duration-300\n focus:outline-none focus:ring-2 focus:ring-white", "aria-label": "Play video" }, { children: _jsx("div", { className: "w-0 h-0 border-y-8 border-y-transparent \n border-l-[16px] border-l-white \n translate-x-[2px]" }) })))] })));
169
169
  });
170
170
  Video.displayName = "Video";
171
171
  export { Video as VideoEnhanced };
@@ -1 +1 @@
1
- {"version":3,"file":"virtual-grid.d.ts","sourceRoot":"","sources":["../../../components/ui/virtual-grid.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAA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AE,MAAM,CAAA;IACjB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,OAAO,CAAC,EAAE;QACR,aAAa,EAAE,MAAM,CAAA;QACrB,WAAW,EAAE,MAAM,CAAA;KACpB,CAAA;IACD,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;CAC5B;AAED,QAAA,MAAM,mBAAmB;;mFAYvB,CAAA;AAEF,MAAM,WAAW,gBACf,SAAQ,QAAQ,EACd,YAAY,CAAC,OAAO,mBAAmB,CAAC;CAAG;AAE/C,iBAAS,WAAW,CAAC,EACnB,SAAS,EACT,OAAO,EACP,QAAQ,EACR,QAAY,EACZ,eAAqB,EACrB,aAAa,EACb,aAAa,EACb,UAAU,EACV,OAGC,EACD,KAAK,GACN,EAAE,gBAAgB,2CAoElB;AAED,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,CAAA"}
@@ -1,7 +1,8 @@
1
+ "use client";
1
2
  import { jsx as _jsx } from "react/jsx-runtime";
2
3
  import * as React from "react";
3
4
  import { cva } from "class-variance-authority";
4
- import { useVirtual } from "react-virtual";
5
+ import { useVirtualizer } from "@tanstack/react-virtual";
5
6
  import { Container } from "./container";
6
7
  import { cn } from "../../lib/utils";
7
8
  const virtualGridVariants = cva("grid", {
@@ -27,18 +28,18 @@ function VirtualGrid({ className, columns, children, overscan = 4, estimatedHeig
27
28
  const childrenArray = React.Children.toArray(children);
28
29
  const rowCount = Math.ceil(childrenArray.length / col);
29
30
  const totalItems = rowCount;
30
- const rowVirtualizer = useVirtual({
31
- size: totalItems,
32
- parentRef,
31
+ const rowVirtualizer = useVirtualizer({
32
+ count: totalItems,
33
+ getScrollElement: () => parentRef.current,
33
34
  estimateSize: React.useCallback(() => estimatedHeight, []),
34
35
  overscan,
35
36
  initialRect: { width: 0, height: estimatedHeight },
36
37
  });
37
38
  return (_jsx(Container, Object.assign({ style: style }, { children: _jsx("div", Object.assign({ style: {
38
39
  width: "100%",
39
- height: rowVirtualizer.totalSize,
40
+ height: rowVirtualizer.getTotalSize(),
40
41
  position: "relative",
41
- } }, { children: rowVirtualizer.virtualItems.map((virtualRow) => {
42
+ } }, { children: rowVirtualizer.getVirtualItems().map((virtualRow) => {
42
43
  const rowStartIndex = virtualRow.index * col;
43
44
  return (_jsx("div", Object.assign({ className: cn(virtualGridVariants({ columns })), style: {
44
45
  position: "absolute",
@@ -48,7 +49,7 @@ function VirtualGrid({ className, columns, children, overscan = 4, estimatedHeig
48
49
  transform: `translateY(${virtualRow.start}px)`,
49
50
  columnGap: `${spacing === null || spacing === void 0 ? void 0 : spacing.horizontalGap}px`,
50
51
  paddingBottom: `${spacing === null || spacing === void 0 ? void 0 : spacing.verticalGap}px`,
51
- }, ref: virtualRow.measureRef }, { children: Array.from({ length: col }).map((_, colIndex) => {
52
+ } }, { children: Array.from({ length: col }).map((_, colIndex) => {
52
53
  const index = rowStartIndex + colIndex;
53
54
  if (index >= childrenArray.length && !isReachingEnd)
54
55
  return (_jsx("div", { children: _jsx(LoaderItem, {}) }, index));
@@ -1 +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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AAK,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"}
@@ -53,7 +53,8 @@ const WishlistSelect = React.forwardRef(({ children, defaultValue, onChange, onO
53
53
  setIsOpen(false);
54
54
  onOpenChange && onOpenChange(false);
55
55
  };
56
- const selectedChild = React.Children.toArray(children).find((child) => React.isValidElement(child) && child.props.value === selectedValue);
56
+ const selectedChild = React.Children.toArray(children).find((child) => React.isValidElement(child) &&
57
+ child.props.value === selectedValue);
57
58
  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
59
  ? React.cloneElement(child, {
59
60
  onSelect: () => handleSelect(child.props.value),
package/dist/lib/utils.js CHANGED
@@ -518,19 +518,24 @@ const evaluateSingleCondition = (condition, context) => {
518
518
  const { type, operator, value } = condition;
519
519
  const contextValues = context[type];
520
520
  if (!contextValues || !Array.isArray(contextValues)) {
521
- return false;
521
+ return true;
522
+ }
523
+ if (type === '' && value === '') {
524
+ return true;
522
525
  }
523
526
  // Special handling for metafield types
524
527
  if (type.toLowerCase().includes("metafield")) {
525
- if (operator === 'does not equal' && contextValues.length === 0) {
528
+ if (operator === "does not equal" && contextValues.length === 0) {
526
529
  return true;
527
530
  }
528
531
  return contextValues.some((contextMetafield) => {
529
- return operator === 'does not equal' ? (contextMetafield.namespace !== value.namespace &&
530
- contextMetafield.key !== value.key &&
531
- contextMetafield.value !== value.value) : (contextMetafield.namespace === value.namespace &&
532
- contextMetafield.key === value.key &&
533
- contextMetafield.value === value.value);
532
+ return operator === "does not equal"
533
+ ? contextMetafield.namespace !== value.namespace &&
534
+ contextMetafield.key !== value.key &&
535
+ contextMetafield.value !== value.value
536
+ : contextMetafield.namespace === value.namespace &&
537
+ contextMetafield.key === value.key &&
538
+ contextMetafield.value === value.value;
534
539
  });
535
540
  }
536
541
  // For regular values (like collection names, customer auth, etc)
@@ -566,7 +571,7 @@ export const evaluateConditions = (group, context) => {
566
571
  return !results.every(Boolean);
567
572
  default:
568
573
  console.warn(`Unsupported logic operator: ${logic}`);
569
- return false;
574
+ return true;
570
575
  }
571
576
  };
572
577
  export const getLoyaltyButtonProps = (buttonConfig, state) => {
package/dist/styles.css CHANGED
@@ -1324,6 +1324,9 @@ video {
1324
1324
  .cursor-pointer {
1325
1325
  cursor: pointer;
1326
1326
  }
1327
+ .cursor-text {
1328
+ cursor: text;
1329
+ }
1327
1330
  .touch-none {
1328
1331
  touch-action: none;
1329
1332
  }
@@ -2307,9 +2310,6 @@ video {
2307
2310
  padding-right: 16px;
2308
2311
  padding-left: 16px;
2309
2312
  }
2310
- *:hover {
2311
- text-decoration-line: unset !important;
2312
- }
2313
2313
  .\[-ms-overflow-style\:none\] {
2314
2314
  -ms-overflow-style: none;
2315
2315
  }
@@ -2457,64 +2457,6 @@ body::-webkit-scrollbar {
2457
2457
  border-color: var(--coreColors-brandColorPrimary);
2458
2458
  }
2459
2459
 
2460
- .hover\:h-\[18px\]:hover {
2461
- height: 18px;
2462
- }
2463
-
2464
- .hover\:w-\[18px\]:hover {
2465
- width: 18px;
2466
- }
2467
-
2468
- .hover\:scale-110:hover {
2469
- --tw-scale-x: 1.1;
2470
- --tw-scale-y: 1.1;
2471
- 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));
2472
- }
2473
-
2474
- .hover\:bg-accent:hover {
2475
- background-color: hsl(var(--accent));
2476
- }
2477
-
2478
- .hover\:bg-black\/90:hover {
2479
- background-color: rgb(0 0 0 / 0.9);
2480
- }
2481
-
2482
- .hover\:bg-muted:hover {
2483
- background-color: hsl(var(--muted));
2484
- }
2485
-
2486
- .hover\:bg-secondary:hover {
2487
- background-color: hsl(var(--secondary));
2488
- }
2489
-
2490
- .hover\:text-accent-foreground:hover {
2491
- color: hsl(var(--accent-foreground));
2492
- }
2493
-
2494
- .hover\:text-foreground:hover {
2495
- color: hsl(var(--foreground));
2496
- }
2497
-
2498
- .hover\:text-muted-foreground:hover {
2499
- color: hsl(var(--muted-foreground));
2500
- }
2501
-
2502
- .hover\:underline:hover {
2503
- text-decoration-line: underline;
2504
- }
2505
-
2506
- .hover\:\!line-through:hover {
2507
- text-decoration-line: line-through !important;
2508
- }
2509
-
2510
- .hover\:line-through:hover {
2511
- text-decoration-line: line-through;
2512
- }
2513
-
2514
- .hover\:no-underline:hover {
2515
- text-decoration-line: none;
2516
- }
2517
-
2518
2460
  .focus\:border-coreColors-brandColorPrimary:focus {
2519
2461
  border-color: var(--coreColors-brandColorPrimary);
2520
2462
  }
@@ -2640,10 +2582,6 @@ body::-webkit-scrollbar {
2640
2582
  opacity: 0.7;
2641
2583
  }
2642
2584
 
2643
- .group:hover .group-hover\:opacity-100 {
2644
- opacity: 1;
2645
- }
2646
-
2647
2585
  .group:active .group-active\:text-coreColors-brandColorPrimary {
2648
2586
  color: var(--coreColors-brandColorPrimary);
2649
2587
  }
@@ -2661,23 +2599,6 @@ body::-webkit-scrollbar {
2661
2599
  color: rgb(252 165 165 / var(--tw-text-opacity, 1));
2662
2600
  }
2663
2601
 
2664
- .group.destructive .group-\[\.destructive\]\:hover\:border-destructive\/30:hover {
2665
- border-color: hsl(var(--destructive) / 0.3);
2666
- }
2667
-
2668
- .group.destructive .group-\[\.destructive\]\:hover\:bg-destructive:hover {
2669
- background-color: hsl(var(--destructive));
2670
- }
2671
-
2672
- .group.destructive .group-\[\.destructive\]\:hover\:text-destructive-foreground:hover {
2673
- color: hsl(var(--destructive-foreground));
2674
- }
2675
-
2676
- .group.destructive .group-\[\.destructive\]\:hover\:text-red-50:hover {
2677
- --tw-text-opacity: 1;
2678
- color: rgb(254 242 242 / var(--tw-text-opacity, 1));
2679
- }
2680
-
2681
2602
  .group.destructive .group-\[\.destructive\]\:focus\:ring-destructive:focus {
2682
2603
  --tw-ring-color: hsl(var(--destructive));
2683
2604
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tapcart/mobile-components",
3
- "version": "0.8.30",
3
+ "version": "0.8.31",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "style": "dist/styles.css",
@@ -26,8 +26,8 @@
26
26
  "test:watch": "jest --watch"
27
27
  },
28
28
  "peerDependencies": {
29
- "react": "^17.0.2 || ^18.0.0",
30
- "react-dom": "^17.0.2 || ^18.0.0"
29
+ "react": "^18.0.0 || ^19.0.0",
30
+ "react-dom": "^18.0.0 || ^19.0.0"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@testing-library/react": "^14.3.1",
@@ -35,8 +35,8 @@
35
35
  "@types/jest": "^29.5.14",
36
36
  "@types/lodash": "4.17.5",
37
37
  "@types/pluralize": "^0.0.33",
38
- "@types/react": "^18.2.0",
39
- "@types/react-dom": "^18.2.0",
38
+ "@types/react": "^19.1.2",
39
+ "@types/react-dom": "^19.1.2",
40
40
  "app-studio-types": "workspace:*",
41
41
  "autoprefixer": "^10.4.14",
42
42
  "chokidar-cli": "^3.0.0",
@@ -71,6 +71,7 @@
71
71
  "@radix-ui/react-toggle": "^1.0.3",
72
72
  "@radix-ui/react-toggle-group": "^1.0.4",
73
73
  "@tabler/icons-react": "^3.2.0",
74
+ "@tanstack/react-virtual": "^3.13.6",
74
75
  "@tapcart/webbridge-react": "^1.15.0",
75
76
  "apple-pay-button": "^1.1.7",
76
77
  "class-variance-authority": "^0.6.0",
@@ -80,8 +81,9 @@
80
81
  "embla-carousel-autoplay": "8.5.2",
81
82
  "embla-carousel-fade": "8.5.2",
82
83
  "embla-carousel-react": "^8.3.0",
83
- "lucide-react": "^0.248.0",
84
- "next": "^14.2.5",
84
+ "eslint-config-next": "^15.3.0",
85
+ "lucide-react": "^0.488.0",
86
+ "next": "^15.3.0",
85
87
  "next-themes": "^0.2.1",
86
88
  "phone": "^3.1.58",
87
89
  "pluralize": "^8.0.0",
@@ -90,7 +92,6 @@
90
92
  "react-intersection-observer": "^9.10.2",
91
93
  "react-svg": "^16.1.34",
92
94
  "react-swipeable-list": "^1.10.0",
93
- "react-virtual": "^2.10.4",
94
95
  "swr": "^2.2.5",
95
96
  "tailwind-merge": "^1.13.2",
96
97
  "tailwindcss-animate": "^1.0.6",