@tapcart/mobile-components 0.6.19 → 0.6.20

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.
@@ -32,7 +32,7 @@ const buttonVariants = cva("w-full flex rounded items-center justify-center tran
32
32
  secondary: "bg-buttonColors-secondaryFill border border-buttonColors-secondaryOutlineColor disabled:bg-buttonColors-secondaryFill disabled:text-stateColors-disabled shadow-secondary",
33
33
  ghost: "hover:bg-accent",
34
34
  link: "underline-offset-4 hover:underline disabled:text-stateColors-disabled disabled:bg-transparent",
35
- quickadd: "bg-buttonColors-primaryFill w-full rounded-none rounded-b-lg h-8 border border-buttonColors-primaryOutlineColor py-2",
35
+ quickadd: "bg-buttonColors-primaryFill w-full rounded-none rounded-b-lg min-h-8 border border-buttonColors-primaryOutlineColor py-2",
36
36
  applePay: "bg-white border border-black",
37
37
  shopPay: "bg-[#612EFF]",
38
38
  },
@@ -69,7 +69,7 @@ const labelVariants = cva("truncate", {
69
69
  secondary: "text-buttonColors-secondaryText",
70
70
  ghost: "hover:text-accent-foreground",
71
71
  link: "text-textColors-primaryColor",
72
- quickadd: "text-buttonColors-primaryText text-xs",
72
+ quickadd: "text-buttonColors-primaryText",
73
73
  applePay: "text-black border",
74
74
  shopPay: "",
75
75
  },
@@ -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;AAM7B,KAAK,WAAW,GAAG,oBAAoB,CAAC,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,CA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,KAAK,aAAa,GAAG;IACnB,IAAI,CAAC,EAAE,eAAe,CAAA;IACtB,OAAO,CAAC,EAAE,cAAc,CAAA;IACxB,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAA;IACvC,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;AAuBD,QAAA,MAAM,QAAQ,6HAqHb,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,iIAqDjB,CAAA;AAGD,OAAO,EACL,KAAK,WAAW,EAChB,QAAQ,EACR,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,YAAY,EACZ,YAAY,GACb,CAAA"}
@@ -134,7 +134,7 @@ const CarouselDots = React.forwardRef((_a, ref) => {
134
134
  const numberOfSlides = Math.min((api === null || api === void 0 ? void 0 : api.scrollSnapList().length) || 0, maxDots);
135
135
  const currentSlide = Math.min((api === null || api === void 0 ? void 0 : api.selectedScrollSnap()) || 0, maxDots - 1);
136
136
  if (numberOfSlides > 1) {
137
- return (_jsx("div", Object.assign({ ref: ref, className: `flex justify-center ${props.className}` }, { children: Array.from({ length: numberOfSlides }, (_, i) => (_jsx(Button, { className: "mx-1 h-1.5 w-1.5 rounded-full p-0 border-none", style: {
137
+ 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: {
138
138
  backgroundColor: dotColor,
139
139
  opacity: i === currentSlide ? 1 : 0.5,
140
140
  }, "aria-label": `Go to slide ${i + 1}`, onClick: () => api === null || api === void 0 ? void 0 : api.scrollTo(i) }, i))) })));
@@ -16,10 +16,10 @@ import { cn } from "../../lib/utils";
16
16
  const gridVariants = cva("grid", {
17
17
  variants: {
18
18
  columns: {
19
- 1: "grid-cols-1 gap-y-4",
20
- 2: "grid-cols-2 gap-x-[7px] gap-y-4",
21
- 3: "grid-cols-3 gap-x-[7px] gap-y-4",
22
- 4: "grid-cols-4 gap-x-[7px] gap-y-4",
19
+ 1: "grid-cols-1 gap-y-4 last:gap-y-0",
20
+ 2: "grid-cols-2 gap-x-[7px] gap-y-4 last:gap-y-0",
21
+ 3: "grid-cols-3 gap-x-[7px] gap-y-4 last:gap-y-0",
22
+ 4: "grid-cols-4 gap-x-[7px] gap-y-4 last:gap-y-0",
23
23
  },
24
24
  },
25
25
  defaultVariants: {
@@ -1 +1 @@
1
- {"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../../components/ui/image.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAC5C,OAAO,KAAK,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAkC1D,KAAK,aAAa,GAAG;IACnB,SAAS,EAAE,MAAM,CAAA;IACjB,aAAa,EAAE,MAAM,CAAA;IACrB,aAAa,EAAE,MAAM,CAAA;IACrB,gBAAgB,EAAE,MAAM,CAAA;CACzB,CAAA;AAUD,MAAM,MAAM,YAAY,GAAG;IACzB,GAAG,CAAC,EAAE,SAAS,CAAC,KAAK,CAAC,CAAA;IACtB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,IAAI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K,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"}
@@ -147,12 +147,26 @@ export const Image = React.forwardRef((_a, ref) => {
147
147
  const fixedWidth = isFixedWidth(normalizedProps.width);
148
148
  const [isLoaded, setIsLoaded] = React.useState(false);
149
149
  const [hasError, setHasError] = React.useState(false);
150
+ const internalRef = React.useRef(null);
151
+ React.useEffect(() => {
152
+ if (internalRef.current && internalRef.current.complete) {
153
+ setIsLoaded(true);
154
+ }
155
+ }, []);
150
156
  const handleImageLoad = () => {
151
157
  setIsLoaded(true);
152
158
  };
153
159
  const handleImageError = () => {
154
160
  setHasError(true);
155
161
  };
162
+ const setRefs = React.useCallback((element) => {
163
+ // Set the internal ref
164
+ internalRef.current = element;
165
+ // Handle the forwarded ref
166
+ if (typeof ref === "function") {
167
+ ref(element);
168
+ }
169
+ }, [ref]);
156
170
  const imgClassName = `opacity-0 transition-opacity duration-500 ease-in-out ${isLoaded ? "opacity-100" : ""}`;
157
171
  const wrapperStyle = Object.assign({ aspectRatio: (_b = normalizedProps.aspectRatio) === null || _b === void 0 ? void 0 : _b.replace(":", "/") }, imageWrapperStyles);
158
172
  const srcSet = generateSrcSet(normalizedProps.src, generateSizes(imageWidths, normalizedProps.aspectRatio, crop), loader, normalizedProps.objectFit === "contain");
@@ -168,13 +182,9 @@ export const Image = React.forwardRef((_a, ref) => {
168
182
  // updated by React. That causes multiple unnecessary requests if `srcSet`
169
183
  // and `sizes` are defined.
170
184
  // This bug cannot be reproduced in Chrome or Firefox.
171
- src: normalizedProps.src, ref: ref, style: {
172
- objectFit: normalizedProps.objectFit,
173
- maxHeight: "100%",
174
- height: "100%",
175
- width: "100%",
176
- borderRadius: `${imageRadius}px`,
177
- } }))) : (_jsx("div", { className: "w-full h-full bg-stateColors-skeleton", style: Object.assign({ aspectRatio: aspectRatio && aspectRatio !== "auto" ? (_c = normalizedProps.aspectRatio) === null || _c === void 0 ? void 0 : _c.replace(":", "/") : "2/3" }, imageWrapperStyles) })) }))] }));
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.aspectRatio) === null || _c === void 0 ? void 0 : _c.replace(":", "/")
187
+ : "2/3" }, imageWrapperStyles) })) }))] }));
178
188
  });
179
189
  /**
180
190
  * The shopifyLoader function is a simple utility function that takes a src, width,
@@ -1,7 +1,9 @@
1
1
  import * as React from "react";
2
2
  import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
3
3
  type Orientation = "horizontal" | "vertical";
4
- declare const ScrollArea: React.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
4
+ declare const ScrollArea: React.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
5
+ wrapperClass?: string | undefined;
6
+ } & React.RefAttributes<HTMLDivElement>>;
5
7
  declare const ScrollBar: React.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaScrollbarProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
6
8
  orientation?: Orientation | undefined;
7
9
  } & React.RefAttributes<HTMLDivElement>>;
@@ -1 +1 @@
1
- {"version":3,"file":"scroll-area.d.ts","sourceRoot":"","sources":["../../../components/ui/scroll-area.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,mBAAmB,MAAM,6BAA6B,CAAA;AAIlE,KAAK,WAAW,GAAG,YAAY,GAAG,UAAU,CAAA;AAE5C,QAAA,MAAM,UAAU,+JAed,CAAA;AAGF,QAAA,MAAM,SAAS;;wCAuBb,CAAA;AAGF,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,CAAA"}
1
+ {"version":3,"file":"scroll-area.d.ts","sourceRoot":"","sources":["../../../components/ui/scroll-area.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,mBAAmB,MAAM,6BAA6B,CAAA;AAIlE,KAAK,WAAW,GAAG,YAAY,GAAG,UAAU,CAAA;AAE5C,QAAA,MAAM,UAAU;;wCAiBd,CAAA;AAGF,QAAA,MAAM,SAAS;;wCAuBb,CAAA;AAGF,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,CAAA"}
@@ -15,8 +15,8 @@ import * as React from "react";
15
15
  import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
16
16
  import { cn } from "../../lib/utils";
17
17
  const ScrollArea = React.forwardRef((_a, ref) => {
18
- var { className, children } = _a, props = __rest(_a, ["className", "children"]);
19
- return (_jsxs(ScrollAreaPrimitive.Root, Object.assign({ ref: ref, className: cn("relative overflow-hidden", className) }, props, { children: [_jsx(ScrollAreaPrimitive.Viewport, Object.assign({ className: "h-full w-full rounded-[inherit]" }, { children: _jsx("div", Object.assign({ className: "flex w-max" }, { children: children })) })), _jsx(ScrollBar, {}), _jsx(ScrollAreaPrimitive.Corner, {})] })));
18
+ var { className, wrapperClass, children } = _a, props = __rest(_a, ["className", "wrapperClass", "children"]);
19
+ return (_jsxs(ScrollAreaPrimitive.Root, Object.assign({ ref: ref, className: cn("relative overflow-hidden", className) }, props, { children: [_jsx(ScrollAreaPrimitive.Viewport, Object.assign({ className: "h-full w-full rounded-[inherit]" }, { children: _jsx("div", Object.assign({ className: cn("flex w-max", wrapperClass) }, { children: children })) })), _jsx(ScrollBar, {}), _jsx(ScrollAreaPrimitive.Corner, {})] })));
20
20
  });
21
21
  ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
22
22
  const ScrollBar = React.forwardRef((_a, ref) => {
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, } from "./lib/utils";
1
+ export { cn, cva, getColor, getBackgroundAndPaddingStyle, getBorderSidesStyle, getTextStyle, getVerticalAlignmentStyle, getBackgroundAndSpacingStyle, getIdFromGid, productGidFromId, variantGidFromId, getPaddingStyle, getVerticalAlignment, mapFlexToAlignment, stringRatioToInt, getOverlayStyle, } 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";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,EAAE,EACF,GAAG,EACH,QAA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CAAA;AACpC,cAAc,uBAAuB,CAAA;AACrC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,uBAAuB,CAAA;AACrC,cAAc,sCAAsC,CAAA;AACpD,cAAc,uBAAuB,CAAA;AACrC,cAAc,uBAAuB,CAAA;AACrC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,iCAAiC,CAAA;AAC/C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,2BAA2B,CAAA;AACzC,cAAc,2BAA2B,CAAA;AACzC,cAAc,0BAA0B,CAAA;AACxC,cAAc,wBAAwB,CAAA;AACtC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,wBAAwB,CAAA;AACtC,cAAc,sBAAsB,CAAA;AACpC,cAAc,sBAAsB,CAAA;AACpC,cAAc,0BAA0B,CAAA;AACxC,cAAc,uBAAuB,CAAA;AACrC,cAAc,yBAAyB,CAAA;AACvC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,wBAAwB,CAAA;AACtC,cAAc,2BAA2B,CAAA;AACzC,cAAc,uBAAuB,CAAA;AACrC,cAAc,0BAA0B,CAAA;AACxC,cAAc,wCAAwC,CAAA;AACtD,cAAc,iCAAiC,CAAA;AAC/C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,kDAAkD,CAAA;AAChE,cAAc,oCAAoC,CAAA;AAClD,cAAc,4BAA4B,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, } from "./lib/utils";
2
+ export { cn, cva, getColor, getBackgroundAndPaddingStyle, getBorderSidesStyle, getTextStyle, getVerticalAlignmentStyle, getBackgroundAndSpacingStyle, getIdFromGid, productGidFromId, variantGidFromId, getPaddingStyle, getVerticalAlignment, mapFlexToAlignment, stringRatioToInt, getOverlayStyle, } 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";
@@ -146,4 +146,13 @@ 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 const stringRatioToInt: (string: string) => number;
150
+ export declare const getOverlayStyle: (opacity: number) => {
151
+ position: string;
152
+ top: number;
153
+ left: number;
154
+ right: number;
155
+ bottom: number;
156
+ backgroundColor: string;
157
+ };
149
158
  //# 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;AAGvC,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;AAED,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,CAAA;AAMjE,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAA;AAI9C,eAAO,MAAM,QAAQ,gBAAiB,KAAK,GAAG,SAAS,uBAUtD,CAAA;AAED,KAAK,UAAU,GAAG,KAAK,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAA;AAC7D,KAAK,WAAW,GAAG,UAAU,EAAE,CAAA;AAE/B,eAAO,MAAM,mBAAmB;;;;;;;;;;;;CAU/B,CAAA;AAED,KAAK,iBAAiB,GAAG,KAAK,G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,IAAI,EAAE;QACJ,MAAM,EAAE,MAAM,CAAA;QACd,MAAM,EAAE,MAAM,GAAG,MAAM,CAAA;KACxB,CAAA;IACD,IAAI,EAAE,MAAM,GAAG,MAAM,CAAA;IACrB,KAAK,EAAE,KAAK,CAAA;IACZ,SAAS,EAAE,OAAO,CAAA;IAClB,aAAa,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,CAAA;IACtD,QAAQ,EAAE,OAAO,CAAA;CAClB,CAAA;AAED,KAAK,QAAQ,GAAG,SAAS,CAAA;AACzB,KAAK,OAAO,GAAG,SAAS,CAAA;AAExB,eAAO,MAAM,YAAY,cAAe,QAAQ,GAAG,OAAO;;;;;;;;CAWzD,CAAA;AAED,eAAO,MAAM,oBAAoB,cACpB,MAAM;;;;;;;;;;;;;;;CAYlB,CAAA;AAQD,eAAO,MAAM,kBAAkB,cAAe,MAAM,WAGnD,CAAA;AAED,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAK5D;AAED,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAI7E;AAED,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAI7E;AAED,eAAO,MAAM,gBAAgB,WAAY,MAAM,WAQ9C,CAAA;AAED,eAAO,MAAM,eAAe,YAAa,MAAM;;;;;;;CAW9C,CAAA"}
package/dist/lib/utils.js CHANGED
@@ -71,15 +71,16 @@ export const getPaddingStyle = (padding) => {
71
71
  export const getBackgroundAndPaddingStyle = (backgroundAndPadding) => {
72
72
  const { backgroundColor, borderSides, borderColor, cornerRadius, padding, borderRadius, } = backgroundAndPadding;
73
73
  const radius = cornerRadius || borderRadius;
74
+ const defaultBorderWidth = borderSides ? "0px" : undefined;
74
75
  return Object.assign(Object.assign({}, getPaddingStyle(padding)), { backgroundColor: getColor(backgroundColor), borderColor: getColor(borderColor), borderTopWidth: (borderSides === null || borderSides === void 0 ? void 0 : borderSides.includes("top")) || (borderSides === null || borderSides === void 0 ? void 0 : borderSides.includes("all"))
75
76
  ? "1px"
76
- : undefined, borderBottomWidth: (borderSides === null || borderSides === void 0 ? void 0 : borderSides.includes("bottom")) || (borderSides === null || borderSides === void 0 ? void 0 : borderSides.includes("all"))
77
+ : defaultBorderWidth, borderBottomWidth: (borderSides === null || borderSides === void 0 ? void 0 : borderSides.includes("bottom")) || (borderSides === null || borderSides === void 0 ? void 0 : borderSides.includes("all"))
77
78
  ? "1px"
78
- : undefined, borderLeftWidth: (borderSides === null || borderSides === void 0 ? void 0 : borderSides.includes("left")) || (borderSides === null || borderSides === void 0 ? void 0 : borderSides.includes("all"))
79
+ : defaultBorderWidth, borderLeftWidth: (borderSides === null || borderSides === void 0 ? void 0 : borderSides.includes("left")) || (borderSides === null || borderSides === void 0 ? void 0 : borderSides.includes("all"))
79
80
  ? "1px"
80
- : undefined, borderRightWidth: (borderSides === null || borderSides === void 0 ? void 0 : borderSides.includes("right")) || (borderSides === null || borderSides === void 0 ? void 0 : borderSides.includes("all"))
81
+ : defaultBorderWidth, borderRightWidth: (borderSides === null || borderSides === void 0 ? void 0 : borderSides.includes("right")) || (borderSides === null || borderSides === void 0 ? void 0 : borderSides.includes("all"))
81
82
  ? "1px"
82
- : undefined, borderStyle: (borderSides === null || borderSides === void 0 ? void 0 : borderSides.length) ? "solid" : undefined, borderRadius: radius !== undefined ? `${radius}px` : undefined });
83
+ : defaultBorderWidth, borderStyle: (borderSides === null || borderSides === void 0 ? void 0 : borderSides.length) ? "solid" : undefined, borderRadius: radius !== undefined ? `${radius}px` : undefined });
83
84
  };
84
85
  export const getBackgroundAndSpacingStyle = (backgroundAndSpacing) => {
85
86
  const { spacing, borderColor, backgroundColor, backgroundCorners } = backgroundAndSpacing;
@@ -146,4 +147,23 @@ export function variantGidFromId(id) {
146
147
  return id;
147
148
  return `gid://shopify/ProductVariant/${id}`;
148
149
  }
150
+ export const stringRatioToInt = (string) => {
151
+ const [numerator, denominator] = string
152
+ .replace(":", "/")
153
+ .split("/")
154
+ .map((part) => part.trim())
155
+ .map(Number);
156
+ return numerator / denominator;
157
+ };
158
+ export const getOverlayStyle = (opacity) => {
159
+ const opacityDecimal = opacity / 100;
160
+ return {
161
+ position: "absolute",
162
+ top: 0,
163
+ left: 0,
164
+ right: 0,
165
+ bottom: 0,
166
+ backgroundColor: `rgba(0, 0, 0, ${opacityDecimal})`,
167
+ };
168
+ };
149
169
  // #endregion =-=-=-= END BLOCK UTILS =-=-=-=
package/dist/styles.css CHANGED
@@ -1006,9 +1006,6 @@ video {
1006
1006
  .h-\[1px\] {
1007
1007
  height: 1px;
1008
1008
  }
1009
- .h-\[200px\] {
1010
- height: 200px;
1011
- }
1012
1009
  .h-\[22px\] {
1013
1010
  height: 22px;
1014
1011
  }
@@ -1128,12 +1125,6 @@ video {
1128
1125
  .min-w-0 {
1129
1126
  min-width: 0px;
1130
1127
  }
1131
- .min-w-\[138px\] {
1132
- min-width: 138px;
1133
- }
1134
- .min-w-\[148px\] {
1135
- min-width: 148px;
1136
- }
1137
1128
  .min-w-\[8rem\] {
1138
1129
  min-width: 8rem;
1139
1130
  }
@@ -1875,9 +1866,6 @@ video {
1875
1866
  .leading-none {
1876
1867
  line-height: 1;
1877
1868
  }
1878
- .leading-tight {
1879
- line-height: 1.25;
1880
- }
1881
1869
  .text-\[\#727272\] {
1882
1870
  --tw-text-opacity: 1;
1883
1871
  color: rgb(114 114 114 / var(--tw-text-opacity));
@@ -1970,10 +1958,6 @@ video {
1970
1958
  .text-foreground\/50 {
1971
1959
  color: hsl(var(--foreground) / 0.5);
1972
1960
  }
1973
- .text-gray-700 {
1974
- --tw-text-opacity: 1;
1975
- color: rgb(55 65 81 / var(--tw-text-opacity));
1976
- }
1977
1961
  .text-muted-foreground {
1978
1962
  color: hsl(var(--muted-foreground));
1979
1963
  }
@@ -2301,6 +2285,10 @@ body::-webkit-scrollbar {
2301
2285
  color: var(--textColors-secondaryColor, #727272ff);
2302
2286
  }
2303
2287
 
2288
+ .last\:gap-y-0:last-child {
2289
+ row-gap: 0px;
2290
+ }
2291
+
2304
2292
  .last\:border-b-0:last-child {
2305
2293
  border-bottom-width: 0px;
2306
2294
  }
@@ -2390,6 +2378,10 @@ body::-webkit-scrollbar {
2390
2378
  text-decoration-line: line-through;
2391
2379
  }
2392
2380
 
2381
+ .hover\:no-underline:hover {
2382
+ text-decoration-line: none;
2383
+ }
2384
+
2393
2385
  .focus\:border-coreColors-brandColorPrimary:focus {
2394
2386
  border-color: var(--coreColors-brandColorPrimary);
2395
2387
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tapcart/mobile-components",
3
- "version": "0.6.19",
3
+ "version": "0.6.20",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "style": "dist/styles.css",
@@ -74,4 +74,4 @@
74
74
  "tailwindcss-animate": "^1.0.6",
75
75
  "vaul": "^0.9.1"
76
76
  }
77
- }
77
+ }