@tapcart/mobile-components 0.7.4 → 0.7.6

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 (42) hide show
  1. package/dist/components/hooks/use-products.d.ts.map +1 -1
  2. package/dist/components/hooks/use-products.js +1 -2
  3. package/dist/components/ui/Input/input.d.ts.map +1 -1
  4. package/dist/components/ui/Input/input.js +3 -7
  5. package/dist/components/ui/badge.d.ts.map +1 -1
  6. package/dist/components/ui/badge.js +3 -3
  7. package/dist/components/ui/button.d.ts.map +1 -1
  8. package/dist/components/ui/button.js +2 -2
  9. package/dist/components/ui/carousel.d.ts.map +1 -1
  10. package/dist/components/ui/carousel.js +2 -2
  11. package/dist/components/ui/drawer.d.ts +19 -10
  12. package/dist/components/ui/drawer.d.ts.map +1 -1
  13. package/dist/components/ui/drawer.js +11 -8
  14. package/dist/components/ui/favorite.js +2 -1
  15. package/dist/components/ui/image.js +2 -2
  16. package/dist/index.d.ts +1 -5
  17. package/dist/index.d.ts.map +1 -1
  18. package/dist/index.js +1 -5
  19. package/dist/lib/utils.d.ts +5 -2
  20. package/dist/lib/utils.d.ts.map +1 -1
  21. package/dist/lib/utils.js +8 -25
  22. package/dist/styles.css +6 -33
  23. package/package.json +2 -2
  24. package/dist/components/hooks/use-nosto-recommendation.d.ts +0 -8
  25. package/dist/components/hooks/use-nosto-recommendation.d.ts.map +0 -1
  26. package/dist/components/hooks/use-nosto-recommendation.js +0 -105
  27. package/dist/components/templates/ProductCard/utils.d.ts +0 -78
  28. package/dist/components/templates/ProductCard/utils.d.ts.map +0 -1
  29. package/dist/components/templates/ProductCard/utils.js +0 -128
  30. package/dist/components/templates/ProductGrid/index.d.ts +0 -1
  31. package/dist/components/templates/ProductGrid/index.d.ts.map +0 -1
  32. package/dist/components/templates/ProductGrid/index.js +0 -1
  33. package/dist/components/ui/ProductCard/utils.d.ts +0 -94
  34. package/dist/components/ui/ProductCard/utils.d.ts.map +0 -1
  35. package/dist/components/ui/ProductCard/utils.js +0 -148
  36. package/dist/components/ui/ProductGrid/index.d.ts +0 -1
  37. package/dist/components/ui/ProductGrid/index.d.ts.map +0 -1
  38. package/dist/components/ui/ProductGrid/index.js +0 -1
  39. package/dist/lib/price.d.ts +0 -29
  40. package/dist/lib/price.d.ts.map +0 -1
  41. package/dist/lib/price.js +0 -66
  42. package/dist/tapcart-mobile-components.umd.js +0 -44
@@ -1 +1 @@
1
- {"version":3,"file":"use-products.d.ts","sourceRoot":"","sources":["../../../components/hooks/use-products.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAG1C,KAAK,GAAG,GAAG,MAAM,CAAA;AACjB,KAAK,cAAc,GAAG;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAA;AACxD,KAAK,gBAAgB,GAAG;IACtB,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,cAAc,EAAE,MAAM,EAAE,CAAA;IACxB,OAAO,EAAE,GAAG,CAAA;IACZ,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACpC,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,KAAK,OAAO,CAAC,GAAG,CAAC,CAAA;IAC1E,UAAU,CAAC,EAAE,cAAc,EAAE,CAAA;CAC9B,CAAA;AACD,KAAK,iBAAiB,GAAG;IACvB,QAAQ,EAAE,OAAO,EAAE,CAAA;IACnB,KAAK,EAAE,GAAG,CAAA;IACV,SAAS,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,GAAG,IAAI,GAAG,iBAAiB,CAyD7E"}
1
+ {"version":3,"file":"use-products.d.ts","sourceRoot":"","sources":["../../../components/hooks/use-products.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAE1C,KAAK,GAAG,GAAG,MAAM,CAAA;AACjB,KAAK,cAAc,GAAG;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAA;AACxD,KAAK,gBAAgB,GAAG;IACtB,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,cAAc,EAAE,MAAM,EAAE,CAAA;IACxB,OAAO,EAAE,GAAG,CAAA;IACZ,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACpC,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,KAAK,OAAO,CAAC,GAAG,CAAC,CAAA;IAC1E,UAAU,CAAC,EAAE,cAAc,EAAE,CAAA;CAC9B,CAAA;AACD,KAAK,iBAAiB,GAAG;IACvB,QAAQ,EAAE,OAAO,EAAE,CAAA;IACnB,KAAK,EAAE,GAAG,CAAA;IACV,SAAS,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,GAAG,IAAI,GAAG,iBAAiB,CAyD7E"}
@@ -1,6 +1,5 @@
1
1
  "use client";
2
2
  import useSWR from "swr";
3
- import { getProductGidsFromIds } from "../../lib/utils";
4
3
  export function useProducts(props) {
5
4
  let url = null;
6
5
  let body = null;
@@ -8,7 +7,7 @@ export function useProducts(props) {
8
7
  const { baseURL, productIds, productHandles, metafields, collection, queryVariables, } = props;
9
8
  let queryParams = new URLSearchParams();
10
9
  if ((productIds === null || productIds === void 0 ? void 0 : productIds.length) > 0) {
11
- queryParams.set("ids", getProductGidsFromIds(productIds).join(","));
10
+ queryParams.set("ids", productIds.join(","));
12
11
  }
13
12
  if ((productHandles === null || productHandles === void 0 ? void 0 : productHandles.length) > 0) {
14
13
  queryParams.set("handles", productHandles.join(","));
@@ -1 +1 @@
1
- {"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../../components/ui/Input/input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAA;AAExD,QAAA,MAAM,KAAK,qFA+KV,CAAA;AAGD,OAAO,EAAE,KAAK,EAAE,CAAA"}
1
+ {"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../../components/ui/Input/input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAA;AAExD,QAAA,MAAM,KAAK,qFAmKV,CAAA;AAGD,OAAO,EAAE,KAAK,EAAE,CAAA"}
@@ -12,7 +12,7 @@ var __rest = (this && this.__rest) || function (s, e) {
12
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
13
  import * as React from "react";
14
14
  import { inputVariants, useInput } from "./useInput";
15
- import { cn, getColor } from "../../../lib/utils";
15
+ import { cn } from "../../../lib/utils";
16
16
  import { Icon } from "../icon";
17
17
  const Input = React.forwardRef((_a, ref) => {
18
18
  var { className, error = false, id, type, label, asChild, value, onChange, icon, iconUrl, iconPosition = "right", // Default to "right" for backward compatibility
@@ -32,9 +32,7 @@ const Input = React.forwardRef((_a, ref) => {
32
32
  inputPadding,
33
33
  placeholderTextColor,
34
34
  });
35
- return (_jsxs(Comp, Object.assign({ className: "relative flex items-center group" }, { children: [(icon || iconUrl) && iconPosition === "left" && (_jsx(Icon, { name: icon, url: iconUrl, "data-error": error, size: "sm", strokeColor: getColor(iconColor), color: iconColorStyle !== "inherit"
36
- ? undefined
37
- : "coreColors-secondaryIcon", className: cn("flex items-center absolute aspect-square fill-current z-10 icon ", {
35
+ return (_jsxs(Comp, Object.assign({ className: "relative flex items-center group" }, { children: [(icon || iconUrl) && iconPosition === "left" && (_jsx(Icon, { name: icon, url: iconUrl, "data-error": error, size: "sm", className: cn("flex items-center absolute aspect-square fill-current z-10 icon ", {
38
36
  "w-5": true,
39
37
  "text-stateColors-error": error,
40
38
  }), style: {
@@ -50,9 +48,7 @@ const Input = React.forwardRef((_a, ref) => {
50
48
  iconPosition === "left" &&
51
49
  placeholderTextAlign === "center"
52
50
  ? undefined
53
- : inputPaddingLeft, paddingRight: inputPaddingRight, fontFamily: placeholderFont, fontWeight: placeholderFontWeight, fontSize: `${placeholderFontSize}px`, textAlign: placeholderTextAlign, color: placeholderTextColorStyle, textTransform: placeholderUpperCase ? "uppercase" : undefined, borderColor: inputBorderColorStyle, paddingTop: inputPadding === null || inputPadding === void 0 ? void 0 : inputPadding.top, paddingBottom: inputPadding === null || inputPadding === void 0 ? void 0 : inputPadding.bottom, backgroundColor: inputBgColor }, borderStyle), (label ? { borderRadius: "8px" } : borderRadiusStyle)) })), label ? (_jsx("label", Object.assign({ htmlFor: id, className: cn("absolute text-[10px] text-textColors-secondaryColor group-active:text-coreColors-brandColorPrimary top-2 z-10 h-4 origin-[0] opacity-100 peer-placeholder-shown:opacity-0", iconPosition === "left" ? "start-10" : "start-4") }, { children: label }))) : null, (icon || iconUrl) && iconPosition === "right" && (_jsx(Icon, { name: icon, url: iconUrl, "data-error": error, size: "sm", strokeColor: getColor(iconColor), color: iconColorStyle !== "inherit"
54
- ? undefined
55
- : "coreColors-secondaryIcon", className: cn("flex items-center absolute aspect-square fill-current z-10 icon ", {
51
+ : inputPaddingLeft, paddingRight: inputPaddingRight, fontFamily: placeholderFont, fontWeight: placeholderFontWeight, fontSize: `${placeholderFontSize}px`, textAlign: placeholderTextAlign, color: placeholderTextColorStyle, textTransform: placeholderUpperCase ? "uppercase" : undefined, borderColor: inputBorderColorStyle, paddingTop: inputPadding === null || inputPadding === void 0 ? void 0 : inputPadding.top, paddingBottom: inputPadding === null || inputPadding === void 0 ? void 0 : inputPadding.bottom, backgroundColor: inputBgColor }, borderStyle), (label ? { borderRadius: "8px" } : borderRadiusStyle)) })), label ? (_jsx("label", Object.assign({ htmlFor: id, className: cn("absolute text-[10px] text-textColors-secondaryColor group-active:text-coreColors-brandColorPrimary top-2 z-10 h-4 origin-[0] opacity-100 peer-placeholder-shown:opacity-0", iconPosition === "left" ? "start-10" : "start-4") }, { children: label }))) : null, (icon || iconUrl) && iconPosition === "right" && (_jsx(Icon, { name: icon, url: iconUrl, "data-error": error, size: "sm", className: cn("flex items-center absolute aspect-square fill-current z-10 icon ", {
56
52
  "w-5": true,
57
53
  "text-stateColors-error": error,
58
54
  }), style: {
@@ -1 +1 @@
1
- {"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../../components/ui/badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAMjE,QAAA,MAAM,aAAa;;;mFAqDlB,CAAA;AAED,MAAM,WAAW,UACf,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAC1C,YAAY,CAAC,OAAO,aAAa,CAAC;IACpC,IAAI,EAAE,YAAY,GAAG,WAAW,CAAA;IAChC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,IAAI,CAAC,EAAE,eAAe,GAAG,WAAW,GAAG,WAAW,CAAA;IAClD,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC/B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAC1B;AAED,iBAAS,KAAK,CAAC,EACb,SAAS,EACT,IAAI,EACJ,OAAO,EACP,SAAS,EACT,YAAwB,EACxB,IAAsB,EACtB,IAAmB,EACnB,eAAe,EACf,SAAS,EACT,GAAG,KAAK,EACT,EAAE,UAAU,2CA6BZ;AAED,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,CAAA"}
1
+ {"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../../components/ui/badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAMjE,QAAA,MAAM,aAAa;;;mFAoDlB,CAAA;AAED,MAAM,WAAW,UACf,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAC1C,YAAY,CAAC,OAAO,aAAa,CAAC;IACpC,IAAI,EAAE,YAAY,GAAG,WAAW,CAAA;IAChC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,IAAI,CAAC,EAAE,eAAe,GAAG,WAAW,GAAG,WAAW,CAAA;IAClD,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC/B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAC1B;AAED,iBAAS,KAAK,CAAC,EACb,SAAS,EACT,IAAI,EACJ,OAAO,EACP,SAAS,EACT,YAAwB,EACxB,IAAsB,EACtB,IAAmB,EACnB,eAAe,EACf,SAAS,EACT,GAAG,KAAK,EACT,EAAE,UAAU,2CA2CZ;AAED,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,CAAA"}
@@ -25,7 +25,7 @@ const badgeVariants = cva("inline-flex items-center justify-center gap-1 py-1 px
25
25
  rounded: "",
26
26
  square: "",
27
27
  circle: "",
28
- }
28
+ },
29
29
  },
30
30
  defaultVariants: {
31
31
  cornerRadius: "rounded",
@@ -62,12 +62,12 @@ const badgeVariants = cva("inline-flex items-center justify-center gap-1 py-1 px
62
62
  cornerRadius: "circle",
63
63
  class: "rounded-2xl",
64
64
  },
65
- ]
65
+ ],
66
66
  });
67
67
  function Badge(_a) {
68
68
  var { className, icon, iconUrl, alignment, cornerRadius = "rounded", type = "icon-and-text", size = "plp-layout", backgroundColor, fontColor } = _a, props = __rest(_a, ["className", "icon", "iconUrl", "alignment", "cornerRadius", "type", "size", "backgroundColor", "fontColor"]);
69
69
  const backgroundColorOverride = backgroundColor ? { backgroundColor } : {};
70
70
  const BadgeText = () => (_jsx(Text, Object.assign({ type: size === "plp-layout" ? "body-primary" : "body-secondary", className: "text-productBadging-text", fontColor: fontColor }, { children: props.children })));
71
- return (_jsx("div", Object.assign({ className: cn(badgeVariants({ alignment, cornerRadius }), className), style: backgroundColorOverride }, props, { children: type === "icon-and-text" ? (_jsxs(_Fragment, { children: [(icon || iconUrl) && (_jsx(Icon, { name: icon, url: iconUrl, strokeColor: fontColor, fillColor: fontColor, size: size === "carousels" ? "xs" : "sm" })), _jsx(BadgeText, {})] })) : type === "icon-only" && icon ? (_jsx(Icon, { name: icon, url: iconUrl, strokeColor: fontColor, fillColor: fontColor, size: size === "carousels" ? "xs" : "sm" })) : (_jsx(BadgeText, {})) })));
71
+ return (_jsx("div", Object.assign({ className: cn(badgeVariants({ alignment, cornerRadius }), className), style: backgroundColorOverride }, props, { children: type === "icon-and-text" ? (_jsxs(_Fragment, { children: [(icon || iconUrl) && (_jsx(Icon, { name: icon, url: iconUrl, style: fontColor ? { color: fontColor } : {}, size: size === "carousels" ? "xs" : "sm" })), _jsx(BadgeText, {})] })) : type === "icon-only" && icon ? (_jsx(Icon, { name: icon, url: iconUrl, style: fontColor ? { color: fontColor } : {}, size: size === "carousels" ? "xs" : "sm" })) : (_jsx(BadgeText, {})) })));
72
72
  }
73
73
  export { Badge, badgeVariants };
@@ -1 +1 @@
1
- {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../components/ui/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AACjE,OAAO,EAGL,K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AAM,iBAAiB,CAAA;AAIxB,QAAA,MAAM,cAAc;;;mFAgCnB,CAAA;AAwCD,MAAM,WAAW,WACf,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EACnD,YAAY,CAAC,OAAO,cAAc,CAAC;IACrC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,UAAU,CAAC,EAAE,KAAK,CAAC,aAAa,GAAG,SAAS,CAAA;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CAChC;AAED,QAAA,MAAM,MAAM,uFAsGX,CAAA;AAGD,QAAA,MAAM,cAAc,iBACJ,SAAS,GACrB,oBAAoB,GAAG;IACrB,SAAS,EAAE,KAAK,CAAA;IAChB,WAAW,EAAE;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,CAAA;IAC5B,gBAAgB,EAAE,OAAO,CAAA;CAC1B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkBJ,CAAA;AAED,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,cAAc,EAAE,CAAA"}
@@ -81,11 +81,11 @@ const labelVariants = cva("truncate", {
81
81
  const Button = React.forwardRef((_a, ref) => {
82
82
  var { className, labelClassName, labelStyle, variant, size, asChild = false, loading, icon, iconColor, iconStrokeColor, iconPosition, iconSize, iconUrl, iconClassName } = _a, props = __rest(_a, ["className", "labelClassName", "labelStyle", "variant", "size", "asChild", "loading", "icon", "iconColor", "iconStrokeColor", "iconPosition", "iconSize", "iconUrl", "iconClassName"]);
83
83
  const Comp = asChild ? Slot : "button";
84
- const IconButton = () => icon || iconUrl ? (_jsx(Icon, { name: icon, url: iconUrl, size: "sm", style: { color: iconColor, stroke: iconColor, fill: iconColor } })) : null;
84
+ const IconButton = () => icon || iconUrl ? (_jsx(Icon, { name: icon, url: iconUrl, size: "sm", style: { color: iconColor } })) : null;
85
85
  const BasicButton = () => (_jsxs(_Fragment, { children: [icon || iconUrl ? (_jsx(Icon, { name: iconUrl ? undefined : icon, url: iconUrl, size: iconSize || variant === "quickadd" ? "xs" : "sm", className: cn(iconVariants({ variant }), {
86
86
  "mr-2": iconPosition === "left",
87
87
  "ml-2": iconPosition === "right",
88
- }, iconClassName), strokeColor: iconStrokeColor, style: { color: iconColor, stroke: iconColor, fill: iconColor } })) : null, !loading ? (_jsx(Text, Object.assign({ type: "body-primary", className: cn(labelVariants({ variant }), labelClassName), style: labelStyle }, { children: props.children }))) : (_jsx(_Fragment, {}))] }));
88
+ }, iconClassName), style: { color: iconColor } })) : null, !loading ? (_jsx(Text, Object.assign({ type: "body-primary", className: cn(labelVariants({ variant }), labelClassName), style: labelStyle }, { children: props.children }))) : (_jsx(_Fragment, {}))] }));
89
89
  const LoadingButton = () => (_jsx("div", Object.assign({ className: cn("flex items-center justify-center", size === "icon" ? "h-5" : "h-6") }, { children: _jsx(Icon, { className: cn(iconVariants({ variant }), "h-5 w-5 animate-spin"), name: "loader", style: { color: iconColor } }) })));
90
90
  return (_jsx(Comp, Object.assign({ className: cn(buttonVariants({ variant, size }), className, {
91
91
  "pointer-events-none": loading,
@@ -1 +1 @@
1
- {"version":3,"file":"carousel.d.ts","sourceRoot":"","sources":["../../../components/ui/carousel.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,gBAAgB,EAAE,EACvB,KAAK,oBAAoB,EAC1B,MAAM,sBAAsB,CAAA;AAS7B,KAAK,WAAW,GAAG,oBAAoB,CAAC,CAAC,CAAC,CA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CAAC,CAAC,CAAA;AAC1C,KAAK,qBAAqB,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAChE,KAAK,eAAe,GAAG,qBAAqB,CAAC,CAAC,CAAC,CAAA;AAC/C,KAAK,cAAc,GAAG,qBAAqB,CAAC,CAAC,CAAC,CAAA;AAE9C,KAAK,aAAa,GAAG;IACnB,IAAI,CAAC,EAAE,eAAe,CAAA;IACtB,OAAO,CAAC,EAAE,cAAc,CAAA;IACxB,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAA;IACvC,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,WAAW,KAAK,IAAI,CAAA;IACnC,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,IAAI,CAAA;CAC/C,CAAA;AA0BD,QAAA,MAAM,QAAQ,6HAsIb,CAAA;AAGD,QAAA,MAAM,eAAe,6GAmBnB,CAAA;AAGF,QAAA,MAAM,YAAY,6GAmBhB,CAAA;AAGF,QAAA,MAAM,gBAAgB,kLA0BpB,CAAA;AAGF,QAAA,MAAM,YAAY,kLA0BhB,CAAA;AAGF,KAAK,iBAAiB,GAAG;IACvB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,QAAA,MAAM,YAAY,iIAuDjB,CAAA;AA8DD,OAAO,EACL,KAAK,WAAW,EAChB,QAAQ,EACR,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,YAAY,EACZ,YAAY,GACb,CAAA"}
@@ -90,7 +90,6 @@ const Carousel = React.forwardRef((_a, ref) => {
90
90
  .on("reInit", setTweenFactor)
91
91
  .on("reInit", tweenScale)
92
92
  .on("scroll", tweenScale)
93
- // @ts-ignore
94
93
  .on("slideFocus", tweenScale);
95
94
  }, [api, tweenScale]);
96
95
  return (_jsx(CarouselContext.Provider, Object.assign({ value: {
@@ -134,6 +133,7 @@ const CarouselNext = React.forwardRef((_a, ref) => {
134
133
  });
135
134
  CarouselNext.displayName = "CarouselNext";
136
135
  const CarouselDots = React.forwardRef((_a, ref) => {
136
+ var _b;
137
137
  var { maxDots = 5, dotColor = "var(--coreColors-brandColorPrimary)" } = _a, props = __rest(_a, ["maxDots", "dotColor"]);
138
138
  const { api } = useCarousel();
139
139
  const [_, setUpdateState] = React.useState(false);
@@ -151,7 +151,7 @@ const CarouselDots = React.forwardRef((_a, ref) => {
151
151
  const numberOfSlides = Math.min((api === null || api === void 0 ? void 0 : api.scrollSnapList().length) || 0, maxDots);
152
152
  const currentSlide = Math.min((api === null || api === void 0 ? void 0 : api.selectedScrollSnap()) || 0, maxDots - 1);
153
153
  if (numberOfSlides > 1) {
154
- return (_jsx("div", Object.assign({ ref: ref, className: `flex justify-center ${props.className}`, style: props.style }, { children: Array.from({ length: numberOfSlides }, (_, i) => (_jsx(Button, { className: "mx-1 h-1.5 w-1.5 rounded-full p-0 border-none", style: {
154
+ return (_jsx("div", Object.assign({ ref: ref, className: `flex ${props.className} ${!((_b = props.className) === null || _b === void 0 ? void 0 : _b.includes("justify-")) ? "justify-center" : ""}`, style: props.style }, { children: Array.from({ length: numberOfSlides }, (_, i) => (_jsx(Button, { className: "mx-1 h-1.5 w-1.5 rounded-full p-0 border-none", style: {
155
155
  backgroundColor: dotColor,
156
156
  opacity: i === currentSlide ? 1 : 0.5,
157
157
  }, "aria-label": `Go to slide ${i + 1}`, onClick: () => api === null || api === void 0 ? void 0 : api.scrollTo(i) }, i))) })));
@@ -1,19 +1,28 @@
1
1
  import * as React from "react";
2
2
  import { Drawer as DrawerPrimitive } from "vaul";
3
- declare const DrawerTrigger: React.ForwardRefExoticComponent<import("@radix-ui/react-dialog").DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
4
- declare const DrawerPortal: React.FC<import("@radix-ui/react-dialog").DialogPortalProps>;
5
- declare const DrawerClose: React.ForwardRefExoticComponent<import("@radix-ui/react-dialog").DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
6
- type DrawerProps = React.ComponentProps<typeof DrawerPrimitive.Root>;
3
+ type DrawerTriggerProps = React.ComponentPropsWithoutRef<"button"> & {
4
+ asChild?: boolean;
5
+ };
6
+ type DrawerPortalProps = {
7
+ children: React.ReactNode;
8
+ };
9
+ type DrawerCloseProps = React.ComponentPropsWithoutRef<"button"> & {
10
+ asChild?: boolean;
11
+ };
12
+ declare const DrawerTrigger: React.FC<DrawerTriggerProps>;
13
+ declare const DrawerPortal: React.FC<DrawerPortalProps>;
14
+ declare const DrawerClose: React.FC<DrawerCloseProps>;
15
+ type DrawerProps = React.ComponentProps<typeof DrawerPrimitive.Root> & {
16
+ containerRef?: React.RefObject<HTMLElement>;
17
+ };
7
18
  declare const Drawer: {
8
- ({ shouldScaleBackground, ...props }: DrawerProps): import("react/jsx-runtime").JSX.Element;
19
+ ({ shouldScaleBackground, containerRef, ...props }: DrawerProps): import("react/jsx-runtime").JSX.Element;
9
20
  displayName: string;
10
21
  };
11
- declare const DrawerOverlay: React.ForwardRefExoticComponent<Omit<Omit<import("@radix-ui/react-dialog").DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & {
22
+ declare const DrawerOverlay: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
12
23
  backdropHexColor?: string | undefined;
13
24
  } & React.RefAttributes<HTMLDivElement>>;
14
- declare const DrawerContentBase: React.ForwardRefExoticComponent<Omit<Omit<import("@radix-ui/react-dialog").DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
15
- onAnimationEnd?: ((open: boolean) => void) | undefined;
16
- } & React.RefAttributes<HTMLDivElement>, "ref"> & {
25
+ declare const DrawerContentBase: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
17
26
  hideBackdrop?: boolean | undefined;
18
27
  backdropHexColor?: string | undefined;
19
28
  isSheet?: boolean | undefined;
@@ -22,7 +31,7 @@ declare const DrawerFooter: {
22
31
  ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
23
32
  displayName: string;
24
33
  };
25
- declare const DrawerDescription: React.ForwardRefExoticComponent<Omit<import("@radix-ui/react-dialog").DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
34
+ declare const DrawerDescription: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
26
35
  type DrawerHeaderProps = {
27
36
  iconLeftName?: string;
28
37
  iconRightName?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"drawer.d.ts","sourceRoot":"","sources":["../../../components/ui/drawer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,MAAM,CAAA;AAIhD,QAAA,MAAM,aAAa,+HAA0B,CAAA;AAE7C,QAAA,MAAM,YAAY,8DAAyB,CAAA;AAE3C,QAAA,MAAM,WAAW,6HAAwB,CAAA;AAEzC,KAAK,WAAW,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,CAAA;AAEpE,QAAA,MAAM,MAAM;0CAAyC,WAAW;;CAS/D,CAAA;AAGD,QAAA,MAAM,aAAa;;wCAejB,CAAA;AAGF,QAAA,MAAM,iBAAiB;;;;;;wCA0CtB,CAAA;AA0BD,QAAA,MAAM,YAAY;8BAGf,MAAM,cAAc,CAAC,cAAc,CAAC;;CAQtC,CAAA;AAGD,QAAA,MAAM,iBAAiB,+LASrB,CAAA;AAGF,KAAK,iBAAiB,GAAG;IACvB,YAAY,CAAC,EAA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IT,WAAW;;CAUb,CAAA;AAOD,QAAA,MAAM,aAAa;;wCAYlB,CAAA;AASD,QAAA,MAAM,iBAAiB;;;;wCAyCtB,CAAA;AA0BD,QAAA,MAAM,YAAY;8BAGf,MAAM,cAAc,CAAC,cAAc,CAAC;;CAQtC,CAAA;AAGD,QAAA,MAAM,iBAAiB,qLASrB,CAAA;AAGF,KAAK,iBAAiB,GAAG;IACvB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,KAAK,EAAE,MAAM,CAAA;IACb,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAA;CACjD,CAAA;AAED,QAAA,MAAM,YAAY,0DAKf,iBAAiB,4CA8BnB,CAAA;AAED,QAAA,MAAM,aAAa;cAA8B,MAAM,SAAS;6CAE/D,CAAA;AAED,OAAO,EACL,MAAM,EACN,YAAY,EACZ,aAAa,EACb,aAAa,EACb,WAAW,EACX,iBAAiB,EACjB,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,YAAY,GACb,CAAA"}
@@ -16,11 +16,14 @@ import { Drawer as DrawerPrimitive } from "vaul";
16
16
  import { cn } from "../../lib/utils";
17
17
  import { Icon } from "./icon";
18
18
  const DrawerTrigger = DrawerPrimitive.Trigger;
19
+ DrawerTrigger.displayName = "DrawerTrigger";
19
20
  const DrawerPortal = DrawerPrimitive.Portal;
21
+ DrawerPortal.displayName = "DrawerPortal";
20
22
  const DrawerClose = DrawerPrimitive.Close;
23
+ DrawerClose.displayName = "DrawerClose";
21
24
  const Drawer = (_a) => {
22
- var { shouldScaleBackground } = _a, props = __rest(_a, ["shouldScaleBackground"]);
23
- return (_jsx(DrawerPrimitive.Root, Object.assign({ shouldScaleBackground: true }, props, { noBodyStyles: true, disablePreventScroll: true })));
25
+ var { shouldScaleBackground, containerRef } = _a, props = __rest(_a, ["shouldScaleBackground", "containerRef"]);
26
+ return (_jsx(DrawerPrimitive.Root, Object.assign({ shouldScaleBackground: true, container: containerRef === null || containerRef === void 0 ? void 0 : containerRef.current }, props, { noBodyStyles: true, disablePreventScroll: true })));
24
27
  };
25
28
  Drawer.displayName = "Drawer";
26
29
  const DrawerOverlay = React.forwardRef((_a, ref) => {
@@ -28,13 +31,13 @@ const DrawerOverlay = React.forwardRef((_a, ref) => {
28
31
  const style = { backgroundColor: `${backdropHexColor}CC` };
29
32
  return (_jsx(DrawerPrimitive.Overlay, Object.assign({ style: style, ref: ref, className: cn(`fixed inset-0 z-50`, className) }, props)));
30
33
  });
31
- DrawerOverlay.displayName = DrawerPrimitive.Overlay.displayName;
34
+ DrawerOverlay.displayName = "DrawerOverlay";
32
35
  const DrawerContentBase = React.forwardRef((_a, ref) => {
33
36
  var { className, children, hideBackdrop = false, backdropHexColor, isSheet = false } = _a, props = __rest(_a, ["className", "children", "hideBackdrop", "backdropHexColor", "isSheet"]);
34
37
  const styles = isSheet
35
38
  ? { height: "calc(100vh - 112px)" }
36
39
  : { maxHeight: "calc(100vh - 112px)" };
37
- return (_jsxs(DrawerPortal, { children: [hideBackdrop ? null : (_jsx(DrawerOverlay, { backdropHexColor: backdropHexColor })), _jsxs(DrawerPrimitive.Content, Object.assign({ ref: ref, style: styles, className: cn("fixed inset-x-0 bottom-0 z-50 flex h-auto flex-col rounded-t-2xl bg-coreColors-modalBackground", className) }, props, { children: [_jsx("div", { className: "mx-auto mb-2 mt-2 h-[4px] w-[40px] rounded-full bg-coreColors-dividingLines" }), children] }))] }));
40
+ return (_jsxs(DrawerPortal, { children: [hideBackdrop ? null : (_jsx(DrawerOverlay, { backdropHexColor: backdropHexColor })), _jsxs(DrawerPrimitive.Content, Object.assign({ ref: ref, style: styles, className: cn("fixed inset-x-0 bottom-0 z-50 flex h-auto flex-col rounded-t-2xl bg-coreColors-modalBackground", className) }, props, { "data-testid": "drawer-content" }, { children: [_jsx("div", { className: "mx-auto mb-2 mt-2 h-[4px] w-[40px] rounded-full bg-coreColors-dividingLines" }), children] }))] }));
38
41
  });
39
42
  DrawerContentBase.displayName = "DrawerContentBase";
40
43
  const DrawerHeaderBase = (_a) => {
@@ -44,9 +47,9 @@ const DrawerHeaderBase = (_a) => {
44
47
  DrawerHeaderBase.displayName = "DrawerHeaderBase";
45
48
  const DrawerTitle = React.forwardRef((_a, ref) => {
46
49
  var { className } = _a, props = __rest(_a, ["className"]);
47
- return (_jsx(DrawerPrimitive.Title, Object.assign({ ref: ref, className: cn("text-textColors-primaryColor text-center text-[18px] font-medium leading-[24px] truncate my-0 mx-4", className) }, props)));
50
+ return (_jsx("h2", Object.assign({ ref: ref, className: cn("text-textColors-primaryColor text-center text-[18px] font-medium leading-[24px] truncate my-0 mx-4", className) }, props)));
48
51
  });
49
- DrawerTitle.displayName = DrawerPrimitive.Title.displayName;
52
+ DrawerTitle.displayName = "DrawerTitle";
50
53
  const DrawerFooter = (_a) => {
51
54
  var { className } = _a, props = __rest(_a, ["className"]);
52
55
  return (_jsx("div", Object.assign({ className: cn("mt-auto flex flex-row gap-2 pb-8 pt-4 pl-4 pr-4 border-t border-coreColors-dividingLines", className) }, props)));
@@ -54,9 +57,9 @@ const DrawerFooter = (_a) => {
54
57
  DrawerFooter.displayName = "DrawerFooter";
55
58
  const DrawerDescription = React.forwardRef((_a, ref) => {
56
59
  var { className } = _a, props = __rest(_a, ["className"]);
57
- return (_jsx(DrawerPrimitive.Description, Object.assign({ ref: ref, className: cn("text-sm text-muted-foreground", className) }, props)));
60
+ return (_jsx("p", Object.assign({ ref: ref, className: cn("text-sm text-muted-foreground", className) }, props)));
58
61
  });
59
- DrawerDescription.displayName = DrawerPrimitive.Description.displayName;
62
+ DrawerDescription.displayName = "DrawerDescription";
60
63
  const DrawerHeader = ({ title, iconLeftName, iconRightName, onCloseClick, }) => {
61
64
  return (_jsxs(DrawerHeaderBase, Object.assign({ className: "p-4 text-center flex justify-between" }, { children: [iconLeftName ? (_jsx(DrawerClose, Object.assign({ className: "h-6 w-6 p-0", onClick: onCloseClick }, { children: _jsx(Icon, { name: iconLeftName, color: "coreColors-secondaryIcon", className: "h-6 w-6 p-0", size: "md" }) }))) : (_jsx("div", { className: "w-6" })), _jsx(DrawerTitle, { children: title }), iconRightName ? (_jsx(DrawerClose, Object.assign({ className: "h-6 w-6 p-0", onClick: onCloseClick }, { children: _jsx(Icon, { name: iconRightName, color: "coreColors-secondaryIcon", className: "h-6 w-6 p-0", size: "md" }) }))) : (_jsx("div", { className: "w-6" }))] })));
62
65
  };
@@ -48,8 +48,9 @@ const Favorite = React.forwardRef((_a, forwardedRef) => {
48
48
  size,
49
49
  showBackgroundShadow,
50
50
  layoutType,
51
- }), className), style: Object.assign({}, (showBackground && Object.assign(Object.assign({ borderRadius: `${cornerRadius}px`, backgroundColor: backgroundColor, borderColor: borderColorStyle }, getBorderSidesStyle(borderSides)), getPaddingStyle(borderPadding)))) }, props, { children: _jsx(Icon, { url: iconUrl, size: size === "small" ? "xs" : "sm", color: selected ? favoriteFillColor : disabledFillColor, style: {
51
+ }), className), style: Object.assign({}, (showBackground && Object.assign(Object.assign({ borderRadius: `${cornerRadius}px`, backgroundColor: backgroundColor, borderColor: borderColorStyle }, getBorderSidesStyle(borderSides)), getPaddingStyle(borderPadding)))) }, props, { children: _jsx(Icon, { url: iconUrl, size: size === "small" ? "xs" : "sm", style: {
52
52
  opacity: isPressed ? 0.7 : 1,
53
+ color: selected ? favoriteFillColor : disabledFillColor,
53
54
  } }) })));
54
55
  });
55
56
  Favorite.displayName = "Favorite";
@@ -168,7 +168,7 @@ export const Image = React.forwardRef((_a, ref) => {
168
168
  }
169
169
  }, [ref]);
170
170
  const imgClassName = `opacity-0 transition-opacity duration-500 ease-in-out ${isLoaded ? "opacity-100" : ""}`;
171
- const wrapperStyle = Object.assign({ aspectRatio: (_b = normalizedProps === null || normalizedProps === void 0 ? void 0 : normalizedProps.aspectRatio) === null || _b === void 0 ? void 0 : _b.replace(":", "/") }, imageWrapperStyles);
171
+ const wrapperStyle = Object.assign({ aspectRatio: (_b = normalizedProps.aspectRatio) === null || _b === void 0 ? void 0 : _b.replace(":", "/") }, imageWrapperStyles);
172
172
  const srcSet = generateSrcSet(normalizedProps.src, generateSizes(imageWidths, normalizedProps.aspectRatio, crop), loader, normalizedProps.objectFit === "contain");
173
173
  return (_jsxs(_Fragment, { children: [loading === "eager" && (_jsx(ImagePreload, { imgAttributes: {
174
174
  srcSet,
@@ -183,7 +183,7 @@ export const Image = React.forwardRef((_a, ref) => {
183
183
  // and `sizes` are defined.
184
184
  // This bug cannot be reproduced in Chrome or Firefox.
185
185
  src: normalizedProps.src, ref: setRefs, style: Object.assign({ objectFit: normalizedProps.objectFit, maxHeight: "100%", height: "100%", width: "100%", borderRadius: `${imageRadius}px` }, passthroughProps.style) }))) : (_jsx("div", { className: "w-full h-full bg-stateColors-skeleton", style: Object.assign({ aspectRatio: aspectRatio && aspectRatio !== "auto"
186
- ? (_c = normalizedProps === null || normalizedProps === void 0 ? void 0 : normalizedProps.aspectRatio) === null || _c === void 0 ? void 0 : _c.replace(":", "/")
186
+ ? (_c = normalizedProps.aspectRatio) === null || _c === void 0 ? void 0 : _c.replace(":", "/")
187
187
  : "2/3" }, imageWrapperStyles) })) }))] }));
188
188
  });
189
189
  /**
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { cn, cva, getColor, getBackgroundAndPaddingStyle, getBorderSidesStyle, getTextStyle, getVerticalAlignmentStyle, getBackgroundAndSpacingStyle, getIdFromGid, productGidFromId, variantGidFromId, getPaddingStyle, getVerticalAlignment, mapFlexToAlignment, formatRelativeTime, stringRatioToInt, getOverlayStyle, throttleFunction, getDestinationHandler, getProductGidsFromIds, } from "./lib/utils";
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
2
  export * from "./components/hooks/use-collection";
3
3
  export * from "./components/hooks/use-infinite-scroll";
4
4
  export * from "./components/hooks/use-recommendations";
@@ -54,9 +54,5 @@ export * from "./components/hooks/use-shop";
54
54
  export * from "./components/libs/sort-filter/search-integration";
55
55
  export * from "./components/hooks/use-reviews";
56
56
  export * from "./components/ui/subcollection-tabs";
57
- export * from "./components/hooks/use-tap";
58
- export * from "./components/ui/ProductCard/utils";
59
- export * from "./lib/price";
60
- export * from "./components/hooks/use-nosto-recommendation";
61
57
  export * from "./components/libs/sort-filter/search-integration";
62
58
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.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,gBAAgB,EAChB,qBAAqB,EACrB,qBAAqB,GACtB,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;AACp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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,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/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // component exports
2
- export { cn, cva, getColor, getBackgroundAndPaddingStyle, getBorderSidesStyle, getTextStyle, getVerticalAlignmentStyle, getBackgroundAndSpacingStyle, getIdFromGid, productGidFromId, variantGidFromId, getPaddingStyle, getVerticalAlignment, mapFlexToAlignment, formatRelativeTime, stringRatioToInt, getOverlayStyle, throttleFunction, getDestinationHandler, getProductGidsFromIds, } from "./lib/utils";
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
3
  export * from "./components/hooks/use-collection";
4
4
  export * from "./components/hooks/use-infinite-scroll";
5
5
  export * from "./components/hooks/use-recommendations";
@@ -55,8 +55,4 @@ export * from "./components/hooks/use-shop";
55
55
  export * from "./components/libs/sort-filter/search-integration";
56
56
  export * from "./components/hooks/use-reviews";
57
57
  export * from "./components/ui/subcollection-tabs";
58
- export * from "./components/hooks/use-tap";
59
- export * from "./components/ui/ProductCard/utils";
60
- export * from "./lib/price";
61
- export * from "./components/hooks/use-nosto-recommendation";
62
58
  export * from "./components/libs/sort-filter/search-integration";
@@ -146,7 +146,6 @@ export declare const mapFlexToAlignment: (flexClass: string) => string;
146
146
  export declare function getIdFromGid(gid: string | undefined): string;
147
147
  export declare function productGidFromId(id: string | null | undefined): string | null;
148
148
  export declare function variantGidFromId(id: string | null | undefined): string | null;
149
- export declare function throttleFunction(fn: Function, wait: number): ((...args: any[]) => void)[];
150
149
  export declare function formatRelativeTime(inputDate: Date | string): string;
151
150
  export declare const stringRatioToInt: (string: string) => number;
152
151
  export declare const getOverlayStyle: (opacity: number) => {
@@ -172,5 +171,9 @@ type DestinationActions = {
172
171
  }) => void;
173
172
  };
174
173
  export declare const getDestinationHandler: (type: "app-screen" | "url" | "product" | "collection" | "none") => ((location: string, actions: DestinationActions) => void) | ((location: string, actions: DestinationActions) => void) | ((location: string, actions: DestinationActions) => void) | ((location: string, actions: DestinationActions) => void) | (() => void);
175
- export declare function getProductGidsFromIds(ids: string[]): string[];
174
+ export declare const createCollectionImageMap: (collections: {
175
+ id: string;
176
+ customImage: boolean;
177
+ image?: string;
178
+ }[]) => Record<string, string>;
176
179
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAQ,MAAM,MAAM,CAAA;AAKvC,MAAM,MAAM,KAAK,GAAG;IAAE,IAAI,EAAE,QAAQ,GAAG,WAAW,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAA;AAEnE,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC;AAED,eAAO,MAAM,eAAe,UAc3B,CAAA;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AAK,CAAC;YAAC,GAAG,EAAE,MAAM,CAAA;SAAE,CAAA;KACvD,KAAK,IAAI,CAAA;IACV,WAAW,EAAE,CAAC,GAAG,EAAE;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAA;IACjD,cAAc,EAAE,CAAC,GAAG,EAAE;QAAE,YAAY,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAA;CACxD,CAAA;AAgBD,eAAO,MAAM,qBAAqB,SAC1B,YAAY,GAAG,KAAK,GAAG,SAAS,GAAG,YAAY,GAAG,MAAM,iBAdrC,MAAM,WAAW,kBAAkB,yBAE5C,MAAM,WAAW,kBAAkB,yBAI/B,MAAM,WAAW,kBAAkB,yBAEhC,MAAM,WAAW,kBAAkB,yBAS3D,CAAA;AAED,eAAO,MAAM,wBAAwB,gBACtB;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,EAAE,2BAQpE,CAAA"}
package/dist/lib/utils.js CHANGED
@@ -149,24 +149,6 @@ export function variantGidFromId(id) {
149
149
  return id;
150
150
  return `gid://shopify/ProductVariant/${id}`;
151
151
  }
152
- // Use to prevent multiple clicks in quick succession
153
- export function throttleFunction(fn, wait) {
154
- let throttle = false;
155
- return [
156
- function () {
157
- return throttle;
158
- },
159
- function (...args) {
160
- if (!throttle) {
161
- fn(...args);
162
- throttle = true;
163
- setInterval(() => {
164
- throttle = false;
165
- }, wait);
166
- }
167
- },
168
- ];
169
- }
170
152
  export function formatRelativeTime(inputDate) {
171
153
  dayjs.extend(relativeTime);
172
154
  return dayjs(inputDate).fromNow();
@@ -202,11 +184,12 @@ const DESTINATION_HANDLERS = {
202
184
  export const getDestinationHandler = (type) => {
203
185
  return DESTINATION_HANDLERS[type];
204
186
  };
205
- export function getProductGidsFromIds(ids) {
206
- return ids.map((id) => {
207
- if (id.startsWith("gid://shopify/Product/")) {
208
- return id;
187
+ export const createCollectionImageMap = (collections) => {
188
+ return collections.reduce((imageMap, collection) => {
189
+ if (collection.customImage && collection.image) {
190
+ imageMap[collection.id] = collection.image;
209
191
  }
210
- return `gid://shopify/Product/${id}`;
211
- });
212
- }
192
+ return imageMap;
193
+ }, {});
194
+ };
195
+ // #endregion =-=-=-= END BLOCK UTILS =-=-=-=
package/dist/styles.css CHANGED
@@ -704,9 +704,6 @@ video {
704
704
  .bottom-2 {
705
705
  bottom: 0.5rem;
706
706
  }
707
- .bottom-6 {
708
- bottom: 1.5rem;
709
- }
710
707
  .bottom-\[18px\] {
711
708
  bottom: 18px;
712
709
  }
@@ -725,9 +722,6 @@ video {
725
722
  .left-4 {
726
723
  left: 1rem;
727
724
  }
728
- .left-6 {
729
- left: 1.5rem;
730
- }
731
725
  .left-\[50\%\] {
732
726
  left: 50%;
733
727
  }
@@ -976,9 +970,6 @@ video {
976
970
  .h-\[42px\] {
977
971
  height: 42px;
978
972
  }
979
- .h-\[48px\] {
980
- height: 48px;
981
- }
982
973
  .h-\[4px\] {
983
974
  height: 4px;
984
975
  }
@@ -994,9 +985,6 @@ video {
994
985
  .max-h-\[240px\] {
995
986
  max-height: 240px;
996
987
  }
997
- .max-h-\[300px\] {
998
- max-height: 300px;
999
- }
1000
988
  .max-h-screen {
1001
989
  max-height: 100vh;
1002
990
  }
@@ -1057,9 +1045,6 @@ video {
1057
1045
  .w-\[22px\] {
1058
1046
  width: 22px;
1059
1047
  }
1060
- .w-\[327px\] {
1061
- width: 327px;
1062
- }
1063
1048
  .w-\[40px\] {
1064
1049
  width: 40px;
1065
1050
  }
@@ -1087,9 +1072,6 @@ video {
1087
1072
  min-width: -moz-fit-content;
1088
1073
  min-width: fit-content;
1089
1074
  }
1090
- .max-w-\[200px\] {
1091
- max-width: 200px;
1092
- }
1093
1075
  .max-w-full {
1094
1076
  max-width: 100%;
1095
1077
  }
@@ -1102,6 +1084,9 @@ video {
1102
1084
  .flex-1 {
1103
1085
  flex: 1 1 0%;
1104
1086
  }
1087
+ .flex-none {
1088
+ flex: none;
1089
+ }
1105
1090
  .flex-shrink-0 {
1106
1091
  flex-shrink: 0;
1107
1092
  }
@@ -1440,6 +1425,9 @@ video {
1440
1425
  .border-t {
1441
1426
  border-top-width: 1px;
1442
1427
  }
1428
+ .border-t-0 {
1429
+ border-top-width: 0px;
1430
+ }
1443
1431
  .border-t-\[0px\] {
1444
1432
  border-top-width: 0px;
1445
1433
  }
@@ -1596,10 +1584,6 @@ video {
1596
1584
  .p-\[1px\] {
1597
1585
  padding: 1px;
1598
1586
  }
1599
- .\!px-0 {
1600
- padding-left: 0px !important;
1601
- padding-right: 0px !important;
1602
- }
1603
1587
  .px-0 {
1604
1588
  padding-left: 0px;
1605
1589
  padding-right: 0px;
@@ -1687,9 +1671,6 @@ video {
1687
1671
  .pr-4 {
1688
1672
  padding-right: 1rem;
1689
1673
  }
1690
- .pr-6 {
1691
- padding-right: 1.5rem;
1692
- }
1693
1674
  .pt-0 {
1694
1675
  padding-top: 0px;
1695
1676
  }
@@ -1752,10 +1733,6 @@ video {
1752
1733
  .text-\[23px\] {
1753
1734
  font-size: 23px;
1754
1735
  }
1755
- .text-base {
1756
- font-size: 1rem;
1757
- line-height: 1.5rem;
1758
- }
1759
1736
  .text-lg {
1760
1737
  font-size: 1.125rem;
1761
1738
  line-height: 1.75rem;
@@ -1950,10 +1927,6 @@ video {
1950
1927
  .text-textColors-strikethroughPriceText {
1951
1928
  color: var(--textColors-strikethroughPriceText);
1952
1929
  }
1953
- .text-white {
1954
- --tw-text-opacity: 1;
1955
- color: rgb(255 255 255 / var(--tw-text-opacity));
1956
- }
1957
1930
  .line-through {
1958
1931
  text-decoration-line: line-through;
1959
1932
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tapcart/mobile-components",
3
- "version": "0.7.4",
3
+ "version": "0.7.6",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "style": "dist/styles.css",
@@ -73,6 +73,6 @@
73
73
  "swr": "^2.2.5",
74
74
  "tailwind-merge": "^1.13.2",
75
75
  "tailwindcss-animate": "^1.0.6",
76
- "vaul": "^0.9.1"
76
+ "vaul": "^1.1.0"
77
77
  }
78
78
  }
@@ -1,8 +0,0 @@
1
- import { Integrations } from "app-studio-types";
2
- export declare function useNostoRecommendations(integrations: Integrations, baseURL: string, slotId?: null): {
3
- recommendations: import("app-studio-types").Product[];
4
- isLoading: boolean;
5
- error: any;
6
- isEmpty: boolean;
7
- };
8
- //# sourceMappingURL=use-nosto-recommendation.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-nosto-recommendation.d.ts","sourceRoot":"","sources":["../../../components/hooks/use-nosto-recommendation.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AA+E/C,wBAAgB,uBAAuB,CACrC,YAAY,EAAE,YAAY,EAC1B,OAAO,EAAE,MAAM,EACf,MAAM,OAAO;;;;;EA4Cd"}