@tapcart/mobile-components 0.7.41 → 0.7.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/hooks/use-nosto-recommendation.queries.d.ts.map +1 -1
- package/dist/components/hooks/use-product-options.d.ts.map +1 -1
- package/dist/components/hooks/use-recommendations.d.ts +1 -1
- package/dist/components/hooks/use-recommendations.d.ts.map +1 -1
- package/dist/components/hooks/use-recommendations.js +4 -4
- package/dist/components/hooks/use-reviews.d.ts.map +1 -1
- package/dist/components/hooks/use-reviews.js +45 -42
- package/dist/components/libs/sort-filter/custom-search.d.ts.map +1 -1
- package/dist/components/libs/sort-filter/custom-search.js +1 -1
- package/dist/components/libs/sort-filter/kmp.d.ts.map +1 -1
- package/dist/components/libs/sort-filter/search-integration.d.ts.map +1 -1
- package/dist/components/libs/sort-filter/search-integration.js +2 -1
- package/dist/components/libs/sort-filter/shopify-search-and-discovery.d.ts.map +1 -1
- package/dist/components/ui/Input/index.d.ts +1 -1
- package/dist/components/ui/Input/index.d.ts.map +1 -1
- package/dist/components/ui/Input/index.js +1 -1
- package/dist/components/ui/Input/input.d.ts.map +1 -1
- package/dist/components/ui/Input/input.js +15 -5
- package/dist/components/ui/Input/types.d.ts +3 -1
- package/dist/components/ui/Input/types.d.ts.map +1 -1
- package/dist/components/ui/Input/useInput.d.ts +11 -1
- package/dist/components/ui/Input/useInput.d.ts.map +1 -1
- package/dist/components/ui/Input/useInput.js +6 -2
- package/dist/components/ui/accordion.d.ts.map +1 -1
- package/dist/components/ui/badge.d.ts.map +1 -1
- package/dist/components/ui/badge.js +3 -1
- package/dist/components/ui/button.d.ts +0 -12
- package/dist/components/ui/button.d.ts.map +1 -1
- package/dist/components/ui/chip.d.ts +1 -0
- package/dist/components/ui/chip.d.ts.map +1 -1
- package/dist/components/ui/chip.js +2 -2
- package/dist/components/ui/drawer.js +2 -1
- package/dist/components/ui/grid.js +1 -1
- package/dist/components/ui/image.d.ts.map +1 -1
- package/dist/components/ui/image.js +3 -1
- package/dist/components/ui/line-item-text-icons.d.ts.map +1 -1
- package/dist/components/ui/money.d.ts.map +1 -1
- package/dist/components/ui/money.js +2 -2
- package/dist/components/ui/price.d.ts +2 -2
- package/dist/components/ui/price.d.ts.map +1 -1
- package/dist/components/ui/price.js +6 -4
- package/dist/components/ui/product-card.d.ts.map +1 -1
- package/dist/components/ui/product-card.js +9 -5
- package/dist/components/ui/quantity-picker.d.ts +3 -0
- package/dist/components/ui/quantity-picker.d.ts.map +1 -1
- package/dist/components/ui/quantity-picker.js +6 -3
- package/dist/components/ui/radio-group.d.ts.map +1 -1
- package/dist/components/ui/star-rating.d.ts.map +1 -1
- package/dist/components/ui/star-rating.js +1 -1
- package/dist/components/ui/tabs.d.ts +3 -0
- package/dist/components/ui/tabs.d.ts.map +1 -1
- package/dist/components/ui/tabs.js +4 -7
- package/dist/components/ui/toaster.d.ts.map +1 -1
- package/dist/components/ui/toaster.js +1 -1
- package/dist/components/ui/use-toast.d.ts +1 -0
- package/dist/components/ui/use-toast.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/lib/utils.d.ts +22 -14
- package/dist/lib/utils.d.ts.map +1 -1
- package/dist/lib/utils.js +43 -11
- package/dist/styles.css +13 -6
- package/package.json +3 -2
|
@@ -176,7 +176,9 @@ export const Image = React.forwardRef((_a, ref) => {
|
|
|
176
176
|
sizes,
|
|
177
177
|
fetchPriority: normalizedProps.fetchPriority,
|
|
178
178
|
src: normalizedProps.src || "",
|
|
179
|
-
} })), _jsx("div", Object.assign({ className: cn("relative border-transparent", {
|
|
179
|
+
} })), _jsx("div", Object.assign({ className: cn("relative border-transparent", {
|
|
180
|
+
"bg-stateColors-skeleton": hasError || !isLoaded,
|
|
181
|
+
}), style: Object.assign({ borderRadius: `${imageRadius}px` }, wrapperStyle) }, { 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, className: imgClassName, onLoad: handleImageLoad, onError: handleImageError, sizes: sizes,
|
|
180
182
|
// `src` needs to come after `sizes` and `srcSet` because React updates
|
|
181
183
|
// attributes in order. If we keep `src` the first one, Safari will
|
|
182
184
|
// immediately start to fetch `src`, before `sizes` and `srcSet` are even
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"line-item-text-icons.d.ts","sourceRoot":"","sources":["../../../components/ui/line-item-text-icons.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAO9B,MAAM,WAAW,qBACf,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IACrD,WAAW,EAAE,MAAM,CAAA;IACnB,aAAa,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,QAAA,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"line-item-text-icons.d.ts","sourceRoot":"","sources":["../../../components/ui/line-item-text-icons.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAO9B,MAAM,WAAW,qBACf,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IACrD,WAAW,EAAE,MAAM,CAAA;IACnB,aAAa,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,QAAA,MAAM,gBAAgB,iGA4DrB,CAAA;AAID,OAAO,EAAE,gBAAgB,EAAE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"money.d.ts","sourceRoot":"","sources":["../../../components/ui/money.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAEjE,UAAU,SAAS;IACjB,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;CACd;AAED,QAAA,MAAM,aAAa,gGAMjB,CAAA;AAEF,MAAM,WAAW,UACf,SAAQ,SAAS,EACf,YAAY,CAAC,OAAO,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"money.d.ts","sourceRoot":"","sources":["../../../components/ui/money.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAEjE,UAAU,SAAS;IACjB,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;CACd;AAED,QAAA,MAAM,aAAa,gGAMjB,CAAA;AAEF,MAAM,WAAW,UACf,SAAQ,SAAS,EACf,YAAY,CAAC,OAAO,aAAa,CAAC;IACpC,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,MAAM,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;CAC7B;AAED,iBAAS,KAAK,CAAC,EACb,KAAK,EACL,MAAM,EACN,QAAQ,EACR,aAAqB,EACrB,MAAM,EACN,GAAG,KAAK,EACT,EAAE,UAAU,2CA6BZ;AAED,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,CAAA"}
|
|
@@ -34,8 +34,8 @@ function Money(_a) {
|
|
|
34
34
|
}), [locale, currency]);
|
|
35
35
|
const formattedPrice = React.useMemo(() => {
|
|
36
36
|
const formatted = formatter.format(Number(price));
|
|
37
|
-
return hideZeroCents ? formatted.replace(/(\.|,)00$/,
|
|
37
|
+
return hideZeroCents ? formatted.replace(/(\.|,)00$/, "") : formatted;
|
|
38
38
|
}, [formatter, price, hideZeroCents]);
|
|
39
|
-
return _jsx("span", Object.assign({}, props, { style: styles }, { children: formattedPrice }));
|
|
39
|
+
return (_jsx("span", Object.assign({}, props, { style: styles }, { children: formattedPrice })));
|
|
40
40
|
}
|
|
41
41
|
export { Money, moneyVariants };
|
|
@@ -10,11 +10,11 @@ interface PriceProps {
|
|
|
10
10
|
currency?: string;
|
|
11
11
|
locale?: string;
|
|
12
12
|
fontSize?: number;
|
|
13
|
-
textAlignment?:
|
|
13
|
+
textAlignment?: "left" | "center" | "right" | "";
|
|
14
14
|
standardStyles?: React.CSSProperties;
|
|
15
15
|
saleStyles?: React.CSSProperties;
|
|
16
16
|
strikeThroughStyles?: React.CSSProperties;
|
|
17
17
|
}
|
|
18
|
-
declare function Price({ price, priceHigh, priceRanges, isSale, compareAtPrice, compareAtPriceHigh, currency, locale, fontSize, textAlignment, standardStyles, saleStyles, strikeThroughStyles, hideZeroCents }: PriceProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
declare function Price({ price, priceHigh, priceRanges, isSale, compareAtPrice, compareAtPriceHigh, currency, locale, fontSize, textAlignment, standardStyles, saleStyles, strikeThroughStyles, hideZeroCents, }: PriceProps): import("react/jsx-runtime").JSX.Element;
|
|
19
19
|
export { Price };
|
|
20
20
|
//# sourceMappingURL=price.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"price.d.ts","sourceRoot":"","sources":["../../../components/ui/price.tsx"],"names":[],"mappings":";AAIA,UAAU,UAAU;IAClB,aAAa,CAAC,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"price.d.ts","sourceRoot":"","sources":["../../../components/ui/price.tsx"],"names":[],"mappings":";AAIA,UAAU,UAAU;IAClB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACnC,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,aAAa,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,EAAE,CAAA;IAChD,cAAc,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;IACpC,UAAU,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;IAChC,mBAAmB,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;CAC1C;AAED,iBAAS,KAAK,CAAC,EACb,KAAK,EACL,SAAS,EACT,WAAmB,EACnB,MAAc,EACd,cAAc,EACd,kBAAkB,EAClB,QAAgB,EAChB,MAAgB,EAChB,QAAa,EACb,aAAkB,EAClB,cAAc,EACd,UAAU,EACV,mBAAmB,EACnB,aAAa,GACd,EAAE,UAAU,2CA6EZ;AAED,OAAO,EAAE,KAAK,EAAE,CAAA"}
|
|
@@ -2,11 +2,13 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { Money } from "./money";
|
|
3
3
|
import { Text } from "./text";
|
|
4
4
|
import { cn } from "../../lib/utils";
|
|
5
|
-
function Price({ price, priceHigh, priceRanges = false, isSale = false, compareAtPrice, compareAtPriceHigh, currency = "USD", locale = "en-US", fontSize = 15, textAlignment =
|
|
6
|
-
const Spacer = () =>
|
|
5
|
+
function Price({ price, priceHigh, priceRanges = false, isSale = false, compareAtPrice, compareAtPriceHigh, currency = "USD", locale = "en-US", fontSize = 15, textAlignment = "", standardStyles, saleStyles, strikeThroughStyles, hideZeroCents, }) {
|
|
6
|
+
const Spacer = () => _jsx("span", { children: " - " });
|
|
7
7
|
const ProductPrice = () => {
|
|
8
|
-
const priceStyles =
|
|
9
|
-
const colorClass = isSale
|
|
8
|
+
const priceStyles = !isSale || !compareAtPrice ? standardStyles : saleStyles;
|
|
9
|
+
const colorClass = isSale
|
|
10
|
+
? "text-textColors-salePriceText"
|
|
11
|
+
: "text-textColors-priceText";
|
|
10
12
|
return (_jsx(Text, Object.assign({ className: `${colorClass} flex-shrink-0 max-w-full`, style: { fontSize: `${fontSize}px` } }, { children: _jsxs("span", Object.assign({ className: "flex-grow min-w-[fit-content] break-all" }, { children: [_jsx(Money, { price: price, currency: currency, locale: locale, styles: priceStyles, hideZeroCents: hideZeroCents }), priceRanges && priceHigh !== undefined && _jsx(Spacer, {}), priceRanges && priceHigh !== undefined && (_jsx(Money, { price: priceHigh, currency: currency, locale: locale, styles: priceStyles, hideZeroCents: hideZeroCents }))] })) })));
|
|
11
13
|
};
|
|
12
14
|
const StrikeThroughPrice = () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product-card.d.ts","sourceRoot":"","sources":["../../../components/ui/product-card.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAO9B,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"product-card.d.ts","sourceRoot":"","sources":["../../../components/ui/product-card.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAO9B,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAQ1C,KAAK,MAAM,GAAG;IACZ,OAAO,CAAC,EAA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E,MAAM,CAAA;KAAE,KAAK,IAAI,CAAA;IACzE,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AA8HD,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAyV3C,CAAA;AAED,OAAO,EAAE,WAAW,EAAE,CAAA"}
|
|
@@ -11,7 +11,7 @@ import { Skeleton } from "./skeleton";
|
|
|
11
11
|
import { cn } from "../../lib/utils";
|
|
12
12
|
import { cva } from "class-variance-authority";
|
|
13
13
|
import { Image } from "./image";
|
|
14
|
-
import { Carousel, CarouselContent, CarouselDots, CarouselItem } from "./carousel";
|
|
14
|
+
import { Carousel, CarouselContent, CarouselDots, CarouselItem, } from "./carousel";
|
|
15
15
|
const productCardBadgeVariants = cva("absolute truncate", {
|
|
16
16
|
variants: {
|
|
17
17
|
horizontalPosition: {
|
|
@@ -185,14 +185,18 @@ const ProductCard = ({ config, tapcartData, product, isLoading, favorited, onFav
|
|
|
185
185
|
}
|
|
186
186
|
};
|
|
187
187
|
const sizes = getImageSizes(config);
|
|
188
|
-
const imageSwipeEnabled = ((
|
|
188
|
+
const imageSwipeEnabled = ((_e = config.productImage) === null || _e === void 0 ? void 0 : _e.allowSwipeability) && product.images.length > 1;
|
|
189
189
|
return (_jsx("div", Object.assign({ className: cn("w-1/2", className) }, { children: _jsxs("div", Object.assign({ className: "w-full active:opacity-70", onClick: () => {
|
|
190
190
|
_openProduct();
|
|
191
191
|
} }, { children: [((_f = config.productImage) === null || _f === void 0 ? void 0 : _f.enabled) && (_jsxs("div", Object.assign({ className: "relative w-full overflow-hidden", style: {
|
|
192
192
|
borderTopLeftRadius: `${config.productImage.cornerRadius}px`,
|
|
193
193
|
borderTopRightRadius: `${config.productImage.cornerRadius}px`,
|
|
194
|
-
borderBottomLeftRadius: `${((_g = config.quickAdd) === null || _g === void 0 ? void 0 : _g.enabled)
|
|
195
|
-
|
|
194
|
+
borderBottomLeftRadius: `${((_g = config.quickAdd) === null || _g === void 0 ? void 0 : _g.enabled)
|
|
195
|
+
? "0"
|
|
196
|
+
: config.productImage.cornerRadius}px`,
|
|
197
|
+
borderBottomRightRadius: `${((_h = config.quickAdd) === null || _h === void 0 ? void 0 : _h.enabled)
|
|
198
|
+
? "0"
|
|
199
|
+
: config.productImage.cornerRadius}px`,
|
|
196
200
|
} }, { children: [imageSwipeEnabled ? (_jsx(Carousel, Object.assign({ className: "w-full max-w-xs overflow-hidden relative" }, { children: _jsxs("div", Object.assign({ className: "relative" }, { children: [_jsx(CarouselContent, Object.assign({ className: "" }, { children: product.images.map((image, index) => {
|
|
197
201
|
var _a, _b, _c, _d;
|
|
198
202
|
return (_jsx(CarouselItem, Object.assign({ className: "pl-0" }, { children: _jsx(Image, { alt: product.title, aspectRatio: (_b = (_a = tapcartData.theme) === null || _a === void 0 ? void 0 : _a.productImages) === null || _b === void 0 ? void 0 : _b.aspectRatio, data: image, sizes: sizes, objectFit: (_d = (_c = tapcartData.theme) === null || _c === void 0 ? void 0 : _c.productImages) === null || _d === void 0 ? void 0 : _d.scaling }) }), `${product.title}-${image.url}`));
|
|
@@ -214,7 +218,7 @@ const ProductCard = ({ config, tapcartData, product, isLoading, favorited, onFav
|
|
|
214
218
|
badgeVerticalPosition: aboveBadge === null || aboveBadge === void 0 ? void 0 : aboveBadge.verticalPosition,
|
|
215
219
|
isSoldOut: !product.availableForSale,
|
|
216
220
|
showSoldOutBadge,
|
|
217
|
-
imageSwipeEnabled
|
|
221
|
+
imageSwipeEnabled,
|
|
218
222
|
})), selected: favorited, onClick: (e) => {
|
|
219
223
|
onFavoriteClick === null || onFavoriteClick === void 0 ? void 0 : onFavoriteClick(e, product);
|
|
220
224
|
}, iconUrl: (_q = (_p = config.favoritesIcon) === null || _p === void 0 ? void 0 : _p.icon) === null || _q === void 0 ? void 0 : _q.url, layoutType: (_r = config.favoritesIcon) === null || _r === void 0 ? void 0 : _r.layoutType, showBackground: (_s = config.favoritesIcon) === null || _s === void 0 ? void 0 : _s.showBackground, cornerRadius: (_t = config.favoritesIcon) === null || _t === void 0 ? void 0 : _t.cornerRadius }))] }))), ((_u = config.quickAdd) === null || _u === void 0 ? void 0 : _u.enabled) && (_jsx(Button, Object.assign({ className: "outline-0", style: {
|
|
@@ -10,6 +10,9 @@ export interface QuantityPickerProps extends React.HTMLAttributes<HTMLDivElement
|
|
|
10
10
|
value: number;
|
|
11
11
|
setValue: (_: number) => void;
|
|
12
12
|
className?: string;
|
|
13
|
+
inputStyle?: React.CSSProperties;
|
|
14
|
+
buttonStyle?: React.CSSProperties;
|
|
15
|
+
buttonCornerRadius?: number;
|
|
13
16
|
}
|
|
14
17
|
declare const QuantityPicker: React.ForwardRefExoticComponent<QuantityPickerProps & React.RefAttributes<HTMLDivElement>>;
|
|
15
18
|
export { QuantityPicker };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quantity-picker.d.ts","sourceRoot":"","sources":["../../../components/ui/quantity-picker.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,MAAM,WAAW,mBACf,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC5C,eAAe,EAAE,MAAM,CAAA;IACvB,eAAe,EAAE,MAAM,CAAA;IACvB,aAAa,EAAE,MAAM,CAAA;IACrB,YAAY,EAAE,OAAO,CAAA;IACrB,SAAS,EAAE,MAAM,CAAA;IACjB,eAAe,EAAE,KAAK,CAAC,iBAAiB,CAAA;IACxC,eAAe,EAAE,KAAK,CAAC,iBAAiB,CAAA;IACxC,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"quantity-picker.d.ts","sourceRoot":"","sources":["../../../components/ui/quantity-picker.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,MAAM,WAAW,mBACf,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC5C,eAAe,EAAE,MAAM,CAAA;IACvB,eAAe,EAAE,MAAM,CAAA;IACvB,aAAa,EAAE,MAAM,CAAA;IACrB,YAAY,EAAE,OAAO,CAAA;IACrB,SAAS,EAAE,MAAM,CAAA;IACjB,eAAe,EAAE,KAAK,CAAC,iBAAiB,CAAA;IACxC,eAAe,EAAE,KAAK,CAAC,iBAAiB,CAAA;IACxC,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,UAAU,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;IAChC,WAAW,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;IACjC,kBAAkB,CAAC,EAAE,MAAM,CAAA;CAC5B;AAoBD,QAAA,MAAM,cAAc,4FA2EnB,CAAA;AAID,OAAO,EAAE,cAAc,EAAE,CAAA"}
|
|
@@ -14,10 +14,13 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
14
14
|
import * as React from "react";
|
|
15
15
|
import { cn } from "../../lib/utils";
|
|
16
16
|
import { Icon } from "./icon";
|
|
17
|
-
const IconButton = ({ iconUrl, iconColor, handler, className }) => (_jsx("button", Object.assign({ onClick: handler, className: cn("flex items-center justify-center h-7 w-7 bg-stateColors-skeleton
|
|
17
|
+
const IconButton = ({ iconUrl, iconColor, handler, className, style }) => (_jsx("button", Object.assign({ onClick: handler, className: cn("flex items-center justify-center h-7 w-7 bg-stateColors-skeleton border border-coreColors-dividingLines", className), style: style }, { children: _jsx(Icon, { url: iconUrl, size: "sm", strokeColor: iconColor, strokeWidth: 4 }) })));
|
|
18
18
|
const QuantityPicker = React.forwardRef((_a, ref) => {
|
|
19
|
-
var { className, decreaseIconUrl, increaseIconUrl, deleteIconUrl, isDeleteOnly = false, iconColor, onDecreaseClick, onIncreaseClick, value, setValue } = _a, props = __rest(_a, ["className", "decreaseIconUrl", "increaseIconUrl", "deleteIconUrl", "isDeleteOnly", "iconColor", "onDecreaseClick", "onIncreaseClick", "value", "setValue"]);
|
|
20
|
-
|
|
19
|
+
var { className, decreaseIconUrl, increaseIconUrl, deleteIconUrl, isDeleteOnly = false, iconColor, onDecreaseClick, onIncreaseClick, value, setValue, inputStyle, buttonStyle, buttonCornerRadius = 4 } = _a, props = __rest(_a, ["className", "decreaseIconUrl", "increaseIconUrl", "deleteIconUrl", "isDeleteOnly", "iconColor", "onDecreaseClick", "onIncreaseClick", "value", "setValue", "inputStyle", "buttonStyle", "buttonCornerRadius"]);
|
|
20
|
+
const leftButtonStyle = Object.assign(Object.assign({}, buttonStyle), { borderTopLeftRadius: buttonCornerRadius ? `${buttonCornerRadius}px` : undefined, borderBottomLeftRadius: buttonCornerRadius ? `${buttonCornerRadius}px` : undefined });
|
|
21
|
+
const rightButtonStyle = Object.assign(Object.assign({}, buttonStyle), { borderTopRightRadius: buttonCornerRadius ? `${buttonCornerRadius}px` : undefined, borderBottomRightRadius: buttonCornerRadius ? `${buttonCornerRadius}px` : undefined });
|
|
22
|
+
const singleButtonStyle = Object.assign(Object.assign({}, buttonStyle), { borderRadius: buttonCornerRadius ? `${buttonCornerRadius}px` : undefined });
|
|
23
|
+
return (_jsx("div", Object.assign({ className: cn("flex", className), ref: ref }, props, { children: isDeleteOnly ? (_jsx(IconButton, { handler: onDecreaseClick, iconUrl: deleteIconUrl, iconColor: iconColor, style: singleButtonStyle })) : (_jsxs(_Fragment, { children: [_jsx(IconButton, { handler: onDecreaseClick, iconUrl: value === 1 ? deleteIconUrl : decreaseIconUrl, iconColor: iconColor, style: leftButtonStyle }), _jsx("input", { type: "text", pattern: "[0-9]*", value: value, onBlur: (e) => (e.target.value = value.toString()), onFocus: (e) => (e.target.value = ""), onChange: (e) => setValue(parseInt(e.target.value) || 0), className: "w-8 h-7 focus-visible:outline-none text-center bg-coreColors-inputBackground text-textColors-primaryColor border-t border-b border-coreColors-dividingLines", style: inputStyle }), _jsx(IconButton, { handler: onIncreaseClick, iconUrl: increaseIconUrl, iconColor: iconColor, style: rightButtonStyle })] })) })));
|
|
21
24
|
});
|
|
22
25
|
QuantityPicker.displayName = "QuantityPicker";
|
|
23
26
|
export { QuantityPicker };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-group.d.ts","sourceRoot":"","sources":["../../../components/ui/radio-group.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,mBAAmB,MAAM,6BAA6B,CAAA;AAElE,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAKjE,QAAA,MAAM,UAAU,+JAWd,CAAA;AAGF,MAAM,WAAW,mBAAmB;IAClC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAA;IAClC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,KAAK,EAAE,MAAM,CAAA;CACd;AAED,QAAA,MAAM,sBAAsB;;mFAc3B,CAAA;AAuCD,QAAA,MAAM,cAAc;;
|
|
1
|
+
{"version":3,"file":"radio-group.d.ts","sourceRoot":"","sources":["../../../components/ui/radio-group.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,mBAAmB,MAAM,6BAA6B,CAAA;AAElE,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAKjE,QAAA,MAAM,UAAU,+JAWd,CAAA;AAGF,MAAM,WAAW,mBAAmB;IAClC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAA;IAClC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,KAAK,EAAE,MAAM,CAAA;CACd;AAED,QAAA,MAAM,sBAAsB;;mFAc3B,CAAA;AAuCD,QAAA,MAAM,cAAc;;8HAgGnB,CAAA;AAGD,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,sBAAsB,EAAE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"star-rating.d.ts","sourceRoot":"","sources":["../../../components/ui/star-rating.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"star-rating.d.ts","sourceRoot":"","sources":["../../../components/ui/star-rating.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,MAAM,WAAW,eAAgB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC3E,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;IACpC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,aAAa,CAAC,EAAE,WAAW,GAAG,UAAU,CAAA;CACzC;AAED,QAAA,MAAM,UAAU,wFA2Df,CAAA;AAID,OAAO,EAAE,UAAU,EAAE,CAAA"}
|
|
@@ -16,7 +16,7 @@ import { Icon } from "./icon";
|
|
|
16
16
|
const StarRating = React.forwardRef((_a, ref) => {
|
|
17
17
|
var { className, score, iconSize = "sm", iconUrl, filledColor, emptyColor, designOptions } = _a, props = __rest(_a, ["className", "score", "iconSize", "iconUrl", "filledColor", "emptyColor", "designOptions"]);
|
|
18
18
|
if (designOptions === "condensed") {
|
|
19
|
-
return
|
|
19
|
+
return _jsx(Icon, { size: iconSize, url: iconUrl, color: filledColor });
|
|
20
20
|
}
|
|
21
21
|
return (_jsx("div", Object.assign({ className: cn("flex flex-row gap-1", className), ref: ref }, props, { children: Array.from({ length: 5 }).map((_, index) => {
|
|
22
22
|
if (score % 1 !== 0 && Math.floor(score) === index) {
|
|
@@ -3,7 +3,10 @@ export interface TabsProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
3
3
|
tabs: {
|
|
4
4
|
label: string;
|
|
5
5
|
children: React.ReactNode;
|
|
6
|
+
buttonStyle?: React.CSSProperties;
|
|
7
|
+
textStyle?: React.CSSProperties;
|
|
6
8
|
}[];
|
|
9
|
+
activeBorderStyle?: React.CSSProperties;
|
|
7
10
|
activeTab: number | null;
|
|
8
11
|
onTabChange: (_: number | null) => void;
|
|
9
12
|
active?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["../../../components/ui/tabs.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAM9B,MAAM,WAAW,SAAU,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACrE,IAAI,EAAE;
|
|
1
|
+
{"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["../../../components/ui/tabs.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAM9B,MAAM,WAAW,SAAU,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACrE,IAAI,EAAE;QACJ,KAAK,EAAE,MAAM,CAAA;QACb,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;QACzB,WAAW,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;QACjC,SAAS,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;KAChC,EAAE,CAAA;IACH,iBAAiB,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;IACvC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,WAAW,EAAE,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAA;IACvC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAiDD,QAAA,MAAM,IAAI,kFA8HT,CAAA;AAGD,OAAO,EAAE,IAAI,EAAE,CAAA"}
|
|
@@ -31,14 +31,14 @@ const tabVariants = cva("flex items-center justify-center px-4 py-2 active:opaci
|
|
|
31
31
|
isLink: false,
|
|
32
32
|
},
|
|
33
33
|
});
|
|
34
|
-
const Tab = ({ label, isActive = false, onClick, isLink }) => {
|
|
34
|
+
const Tab = ({ label, isActive = false, onClick, isLink, buttonStyle, textStyle }) => {
|
|
35
35
|
return (_jsx("button", Object.assign({ className: cn(tabVariants({
|
|
36
36
|
isActive,
|
|
37
37
|
isLink,
|
|
38
|
-
}), "whitespace-nowrap"), onClick: onClick }, { children: _jsx(Text, Object.assign({ type: "body-primary" }, { children: label })) })));
|
|
38
|
+
}), "whitespace-nowrap"), onClick: onClick, style: buttonStyle }, { children: _jsx(Text, Object.assign({ type: "body-primary", style: textStyle }, { children: label })) })));
|
|
39
39
|
};
|
|
40
40
|
const Tabs = React.forwardRef((_a, ref) => {
|
|
41
|
-
var { className, tabs, activeTab, onTabChange, links = false } = _a, props = __rest(_a, ["className", "tabs", "activeTab", "onTabChange", "links"]);
|
|
41
|
+
var { className, tabs, activeTab, onTabChange, links = false, activeBorderStyle } = _a, props = __rest(_a, ["className", "tabs", "activeTab", "onTabChange", "links", "activeBorderStyle"]);
|
|
42
42
|
const [underlinePosition, setUnderlinePosition] = React.useState({
|
|
43
43
|
left: 0,
|
|
44
44
|
width: 0,
|
|
@@ -97,10 +97,7 @@ const Tabs = React.forwardRef((_a, ref) => {
|
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
}, [ref]);
|
|
100
|
-
return (_jsxs("div", Object.assign({ className: "relative no-scrollbar" }, props, { children: [_jsxs("div", Object.assign({ ref: containerRef, className: "relative flex overflow-x-auto no-scrollbar", onScroll: checkShowGradients }, { children: [tabs.map((tab, index) => (_jsx(Tab, { label: tab.label, isActive: activeTab === index, onClick: () => onTabChange(index), isLink: links }, index))), activeTab !== null && !links && (_jsx("div", { className: `absolute bottom-0
|
|
101
|
-
left: underlinePosition.left,
|
|
102
|
-
width: underlinePosition.width,
|
|
103
|
-
} }))] })), showRightGradient && (_jsx("div", Object.assign({ className: "absolute right-0 bottom-0 w-16 h-10 pointer-events-none overflow-hidden" }, { children: _jsx("div", { className: "w-full h-full gradient-right" }) }))), showLeftGradient && (_jsx("div", Object.assign({ className: "absolute left-0 bottom-0 w-16 h-10 pointer-events-none overflow-hidden" }, { children: _jsx("div", { className: "w-full h-full gradient-left" }) })))] })));
|
|
100
|
+
return (_jsxs("div", Object.assign({ className: "relative no-scrollbar" }, props, { children: [_jsxs("div", Object.assign({ ref: containerRef, className: "relative flex overflow-x-auto no-scrollbar", onScroll: checkShowGradients }, { children: [tabs.map((tab, index) => (_jsx(Tab, { label: tab.label, isActive: activeTab === index, onClick: () => onTabChange(index), isLink: links, buttonStyle: tab.buttonStyle, textStyle: tab.textStyle }, index))), activeTab !== null && !links && (_jsx("div", { className: `absolute bottom-0 border-coreColors-brandColorPrimary border-b-2 h-full transition-all duration-300`, style: Object.assign({ left: underlinePosition.left, width: underlinePosition.width }, activeBorderStyle) }))] })), showRightGradient && (_jsx("div", Object.assign({ className: "absolute right-0 bottom-0 w-16 h-10 pointer-events-none overflow-hidden" }, { children: _jsx("div", { className: "w-full h-full gradient-right" }) }))), showLeftGradient && (_jsx("div", Object.assign({ className: "absolute left-0 bottom-0 w-16 h-10 pointer-events-none overflow-hidden" }, { children: _jsx("div", { className: "w-full h-full gradient-left" }) })))] })));
|
|
104
101
|
});
|
|
105
102
|
Tabs.displayName = "Tabs";
|
|
106
103
|
export { Tabs };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toaster.d.ts","sourceRoot":"","sources":["../../../components/ui/toaster.tsx"],"names":[],"mappings":"AAWA,wBAAgB,OAAO,CAAC,EACtB,IAAgB,GACjB,EAAE;IACD,IAAI,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAA;IAClD,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,IAAI,CAAC,EAAE,OAAO,CAAA;CACf,
|
|
1
|
+
{"version":3,"file":"toaster.d.ts","sourceRoot":"","sources":["../../../components/ui/toaster.tsx"],"names":[],"mappings":"AAWA,wBAAgB,OAAO,CAAC,EACtB,IAAgB,GACjB,EAAE;IACD,IAAI,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAA;IAClD,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,IAAI,CAAC,EAAE,OAAO,CAAA;CACf,2CAsBA"}
|
|
@@ -17,6 +17,6 @@ export function Toaster({ type = "default", }) {
|
|
|
17
17
|
const { toasts } = useToast();
|
|
18
18
|
return (_jsxs(ToastProvider, { children: [toasts.map(function (_a) {
|
|
19
19
|
var { id, title, description, icon } = _a, props = __rest(_a, ["id", "title", "description", "icon"]);
|
|
20
|
-
return (_jsx(Toast, Object.assign({ variant: type }, props, { children: _jsxs("div", Object.assign({ className: "flex w-full justify-center" }, { children: [title && _jsx(ToastTitle, { children: title }), description && (_jsx(ToastDescription, Object.assign({ type: type, icon: icon }, { children: description })))] })) }), id));
|
|
20
|
+
return (_jsx(Toast, Object.assign({ variant: props.type || type }, props, { children: _jsxs("div", Object.assign({ className: "flex w-full justify-center" }, { children: [title && _jsx(ToastTitle, { children: title }), description && (_jsx(ToastDescription, Object.assign({ type: props.type || type, icon: icon }, { children: description })))] })) }), id));
|
|
21
21
|
}), _jsx(ToastViewport, {})] }));
|
|
22
22
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-toast.d.ts","sourceRoot":"","sources":["../../../components/ui/use-toast.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,KAAK,EAAsB,UAAU,EAAE,MAAM,SAAS,CAAA;AAK7D,KAAK,YAAY,GAAG,UAAU,GAAG;IAC/B,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACvB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC7B,IAAI,CAAC,EAAE,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"use-toast.d.ts","sourceRoot":"","sources":["../../../components/ui/use-toast.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,KAAK,EAAsB,UAAU,EAAE,MAAM,SAAS,CAAA;AAK7D,KAAK,YAAY,GAAG,UAAU,GAAG;IAC/B,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACvB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC7B,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,IAAI,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAA;CACnD,CAAA;AAED,QAAA,MAAM,WAAW;;;;;CAKP,CAAA;AASV,KAAK,UAAU,GAAG,OAAO,WAAW,CAAA;AAEpC,KAAK,MAAM,GACP;IACE,IAAI,EAAE,UAAU,CAAC,WAAW,CAAC,CAAA;IAC7B,KAAK,EAAE,YAAY,CAAA;CACpB,GACD;IACE,IAAI,EAAE,UAAU,CAAC,cAAc,CAAC,CAAA;IAChC,KAAK,EAAE,OAAO,CAAC,YAAY,CAAC,CAAA;CAC7B,GACD;IACE,IAAI,EAAE,UAAU,CAAC,eAAe,CAAC,CAAA;IACjC,OAAO,CAAC,EAAE,YAAY,CAAC,IAAI,CAAC,CAAA;CAC7B,GACD;IACE,IAAI,EAAE,UAAU,CAAC,cAAc,CAAC,CAAA;IAChC,OAAO,CAAC,EAAE,YAAY,CAAC,IAAI,CAAC,CAAA;CAC7B,CAAA;AAEL,UAAU,KAAK;IACb,MAAM,EAAE,YAAY,EAAE,CAAA;CACvB;AAoBD,eAAO,MAAM,OAAO,UAAW,KAAK,UAAU,MAAM,KAAG,KAqDtD,CAAA;AAaD,KAAK,KAAK,GAAG,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,CAAA;AAErC,iBAAS,KAAK,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK;;;oBAGT,YAAY;EAwBpC;AAED,iBAAS,QAAQ;;wBAgBO,MAAM;;EAE7B;AAED,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAA"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { cn, cva, getColor, getBackgroundAndPaddingStyle, getBorderSidesStyle, getTextStyle, getVerticalAlignmentStyle, getBackgroundAndSpacingStyle, getIdFromGid, productGidFromId, variantGidFromId, getPaddingStyle, getMarginStyle, getVerticalAlignment, mapFlexToAlignment, formatRelativeTime, stringRatioToInt, getOverlayStyle, throttleFunction, getDestinationHandler, getProductGidsFromIds, createCollectionImageMap, isFavoriteIntegrationEnabled, getSpaceBetween, getGridSpacing, pluralize, } from "./lib/utils";
|
|
1
|
+
export { cn, cva, getColor, getBackgroundAndPaddingStyle, getBorderStyle, getBorderSidesStyle, getTextStyle, getVerticalAlignmentStyle, getBackgroundAndSpacingStyle, getIdFromGid, productGidFromId, variantGidFromId, getPaddingStyle, getMarginStyle, getVerticalAlignment, mapFlexToAlignment, formatRelativeTime, stringRatioToInt, getOverlayStyle, throttleFunction, getDestinationHandler, getProductGidsFromIds, createCollectionImageMap, isFavoriteIntegrationEnabled, getSpaceBetween, getGridSpacing, pluralize, getInputPlaceholderTextProps, } from "./lib/utils";
|
|
2
2
|
export * from "./components/contexts/translation-context";
|
|
3
3
|
export * from "./components/hooks/use-collection";
|
|
4
4
|
export * from "./components/hooks/use-infinite-scroll";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -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,cAAc,EACd,oBAAoB,EACpB,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,qBAAqB,EACrB,qBAAqB,EACrB,wBAAwB,EACxB,4BAA4B,EAC5B,eAAe,EACf,cAAc,EACd,SAAS,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,EAAE,EACF,GAAG,EACH,QAAQ,EACR,4BAA4B,EAC5B,cAAc,EACd,mBAAmB,EACnB,YAAY,EACZ,yBAAyB,EACzB,4BAA4B,EAC5B,YAAY,EACZ,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,cAAc,EACd,oBAAoB,EACpB,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,qBAAqB,EACrB,qBAAqB,EACrB,wBAAwB,EACxB,4BAA4B,EAC5B,eAAe,EACf,cAAc,EACd,SAAS,EACT,4BAA4B,GAC7B,MAAM,aAAa,CAAA;AACpB,cAAc,2CAA2C,CAAA;AACzD,cAAc,mCAAmC,CAAA;AACjD,cAAc,wCAAwC,CAAA;AACtD,cAAc,wCAAwC,CAAA;AACtD,cAAc,iCAAiC,CAAA;AAC/C,cAAc,sCAAsC,CAAA;AACpD,cAAc,yCAAyC,CAAA;AACvD,cAAc,oCAAoC,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,CAAA;AACxC,cAAc,iCAAiC,CAAA;AAC/C,cAAc,sBAAsB,CAAA;AACpC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,kDAAkD,CAAA;AAChE,cAAc,gCAAgC,CAAA;AAC9C,cAAc,oCAAoC,CAAA;AAClD,cAAc,mCAAmC,CAAA;AACjD,cAAc,aAAa,CAAA;AAC3B,cAAc,6CAA6C,CAAA;AAC3D,cAAc,kDAAkD,CAAA;AAChE,cAAc,qBAAqB,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, getMarginStyle, getVerticalAlignment, mapFlexToAlignment, formatRelativeTime, stringRatioToInt, getOverlayStyle, throttleFunction, getDestinationHandler, getProductGidsFromIds, createCollectionImageMap, isFavoriteIntegrationEnabled, getSpaceBetween, getGridSpacing, pluralize, } from "./lib/utils";
|
|
2
|
+
export { cn, cva, getColor, getBackgroundAndPaddingStyle, getBorderStyle, getBorderSidesStyle, getTextStyle, getVerticalAlignmentStyle, getBackgroundAndSpacingStyle, getIdFromGid, productGidFromId, variantGidFromId, getPaddingStyle, getMarginStyle, getVerticalAlignment, mapFlexToAlignment, formatRelativeTime, stringRatioToInt, getOverlayStyle, throttleFunction, getDestinationHandler, getProductGidsFromIds, createCollectionImageMap, isFavoriteIntegrationEnabled, getSpaceBetween, getGridSpacing, pluralize, getInputPlaceholderTextProps, } from "./lib/utils";
|
|
3
3
|
export * from "./components/contexts/translation-context";
|
|
4
4
|
export * from "./components/hooks/use-collection";
|
|
5
5
|
export * from "./components/hooks/use-infinite-scroll";
|
package/dist/lib/utils.d.ts
CHANGED
|
@@ -81,22 +81,28 @@ export declare const getMarginStyle: (margin: Partial<Spacing> | undefined) => {
|
|
|
81
81
|
marginLeft: string | undefined;
|
|
82
82
|
marginRight: string | undefined;
|
|
83
83
|
};
|
|
84
|
-
|
|
85
|
-
backgroundColor?: Color;
|
|
84
|
+
interface BorderStyle {
|
|
86
85
|
borderSides?: BorderSides;
|
|
87
86
|
borderColor?: Color;
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
borderRadius?: number;
|
|
91
|
-
};
|
|
92
|
-
export declare const getBackgroundAndPaddingStyle: (backgroundAndPadding: BackgroundAndPadding) => {
|
|
93
|
-
backgroundColor: string | undefined;
|
|
87
|
+
}
|
|
88
|
+
export declare const getBorderStyle: (borderStyle: BorderStyle, borderWidth?: number) => {
|
|
94
89
|
borderColor: string | undefined;
|
|
95
90
|
borderTopWidth: string | undefined;
|
|
96
91
|
borderBottomWidth: string | undefined;
|
|
97
92
|
borderLeftWidth: string | undefined;
|
|
98
93
|
borderRightWidth: string | undefined;
|
|
99
94
|
borderStyle: string | undefined;
|
|
95
|
+
};
|
|
96
|
+
export interface BackgroundAndPadding extends BorderStyle {
|
|
97
|
+
backgroundColor?: Color;
|
|
98
|
+
cornerRadius?: number;
|
|
99
|
+
padding?: Partial<Spacing>;
|
|
100
|
+
borderRadius?: number;
|
|
101
|
+
}
|
|
102
|
+
export declare const getBackgroundAndPaddingStyle: (backgroundAndPadding: BackgroundAndPadding, { omitBorder }?: {
|
|
103
|
+
omitBorder?: boolean | undefined;
|
|
104
|
+
}) => {
|
|
105
|
+
backgroundColor: string | undefined;
|
|
100
106
|
borderRadius: string | undefined;
|
|
101
107
|
paddingTop?: undefined;
|
|
102
108
|
paddingBottom?: undefined;
|
|
@@ -104,12 +110,6 @@ export declare const getBackgroundAndPaddingStyle: (backgroundAndPadding: Backgr
|
|
|
104
110
|
paddingRight?: undefined;
|
|
105
111
|
} | {
|
|
106
112
|
backgroundColor: string | undefined;
|
|
107
|
-
borderColor: string | undefined;
|
|
108
|
-
borderTopWidth: string | undefined;
|
|
109
|
-
borderBottomWidth: string | undefined;
|
|
110
|
-
borderLeftWidth: string | undefined;
|
|
111
|
-
borderRightWidth: string | undefined;
|
|
112
|
-
borderStyle: string | undefined;
|
|
113
113
|
borderRadius: string | undefined;
|
|
114
114
|
paddingTop: string | undefined;
|
|
115
115
|
paddingBottom: string | undefined;
|
|
@@ -203,4 +203,12 @@ export declare const createCollectionImageMap: (collections: {
|
|
|
203
203
|
}[]) => Record<string, string>;
|
|
204
204
|
export declare const isFavoriteIntegrationEnabled: (integrations: Integrations) => boolean;
|
|
205
205
|
export declare const pluralize: (word: string, count?: number, inclusive?: boolean) => string;
|
|
206
|
+
export declare const getInputPlaceholderTextProps: (placeholderText: TextStyle) => {
|
|
207
|
+
placeholderTextColor: Color;
|
|
208
|
+
placeholderFontSize: string | number;
|
|
209
|
+
placeholderTextAlign: "left" | "right" | "center" | "justify";
|
|
210
|
+
placeholderUpperCase: boolean;
|
|
211
|
+
placeholderFont: string;
|
|
212
|
+
placeholderFontWeight: string | number;
|
|
213
|
+
};
|
|
206
214
|
//# sourceMappingURL=utils.d.ts.map
|
package/dist/lib/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAC/C,OAAO,EAAE,UAAU,EAAQ,MAAM,MAAM,CAAA;AAMvC,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,gBA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AOlD;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;AAED,eAAO,MAAM,4BAA4B,yCAOxC,CAAA;AAED,eAAO,MAAM,SAAS,SACd,MAAM,UACJ,MAAM,cACF,OAAO,WAGpB,CAAA;AAED,eAAO,MAAM,4BAA4B,oBAAqB,SAAS;;;;;;;CAetE,CAAA"}
|
package/dist/lib/utils.js
CHANGED
|
@@ -90,19 +90,37 @@ export const getMarginStyle = (margin) => {
|
|
|
90
90
|
marginRight: (margin === null || margin === void 0 ? void 0 : margin.right) !== undefined ? `${margin.right}px` : undefined,
|
|
91
91
|
};
|
|
92
92
|
};
|
|
93
|
-
export const
|
|
93
|
+
export const getBorderStyle = (borderStyle, borderWidth = 1) => {
|
|
94
|
+
const { borderSides, borderColor } = borderStyle;
|
|
95
|
+
const defaultBorderWidth = borderSides ? "0px" : undefined;
|
|
96
|
+
return {
|
|
97
|
+
borderColor: getColor(borderColor),
|
|
98
|
+
borderTopWidth: (borderSides === null || borderSides === void 0 ? void 0 : borderSides.includes("top")) || (borderSides === null || borderSides === void 0 ? void 0 : borderSides.includes("all"))
|
|
99
|
+
? `${borderWidth}px`
|
|
100
|
+
: defaultBorderWidth,
|
|
101
|
+
borderBottomWidth: (borderSides === null || borderSides === void 0 ? void 0 : borderSides.includes("bottom")) || (borderSides === null || borderSides === void 0 ? void 0 : borderSides.includes("all"))
|
|
102
|
+
? `${borderWidth}px`
|
|
103
|
+
: defaultBorderWidth,
|
|
104
|
+
borderLeftWidth: (borderSides === null || borderSides === void 0 ? void 0 : borderSides.includes("left")) || (borderSides === null || borderSides === void 0 ? void 0 : borderSides.includes("all"))
|
|
105
|
+
? `${borderWidth}px`
|
|
106
|
+
: defaultBorderWidth,
|
|
107
|
+
borderRightWidth: (borderSides === null || borderSides === void 0 ? void 0 : borderSides.includes("right")) || (borderSides === null || borderSides === void 0 ? void 0 : borderSides.includes("all"))
|
|
108
|
+
? `${borderWidth}px`
|
|
109
|
+
: defaultBorderWidth,
|
|
110
|
+
borderStyle: (borderSides === null || borderSides === void 0 ? void 0 : borderSides.length) ? "solid" : undefined,
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
export const getBackgroundAndPaddingStyle = (backgroundAndPadding, { omitBorder = false } = {}) => {
|
|
94
114
|
const { backgroundColor, borderSides, borderColor, cornerRadius, padding, borderRadius, } = backgroundAndPadding;
|
|
95
115
|
const radius = cornerRadius || borderRadius;
|
|
96
|
-
const
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
? "1px"
|
|
105
|
-
: defaultBorderWidth, borderStyle: (borderSides === null || borderSides === void 0 ? void 0 : borderSides.length) ? "solid" : undefined, borderRadius: radius !== undefined ? `${radius}px` : undefined });
|
|
116
|
+
const backgroundAndPaddingStyle = Object.assign(Object.assign({}, getPaddingStyle(padding)), { backgroundColor: getColor(backgroundColor), borderRadius: radius !== undefined ? `${radius}px` : undefined });
|
|
117
|
+
if (omitBorder)
|
|
118
|
+
return backgroundAndPaddingStyle;
|
|
119
|
+
const borderStyle = getBorderStyle({
|
|
120
|
+
borderSides,
|
|
121
|
+
borderColor,
|
|
122
|
+
});
|
|
123
|
+
return Object.assign(Object.assign({}, backgroundAndPaddingStyle), borderStyle);
|
|
106
124
|
};
|
|
107
125
|
export const getBackgroundAndSpacingStyle = (backgroundAndSpacing) => {
|
|
108
126
|
const { spacing, borderColor, backgroundColor, backgroundCorners } = backgroundAndSpacing;
|
|
@@ -249,4 +267,18 @@ export const isFavoriteIntegrationEnabled = (integrations) => {
|
|
|
249
267
|
export const pluralize = (word, count, inclusive) => {
|
|
250
268
|
return Pluralize(word, count, inclusive);
|
|
251
269
|
};
|
|
270
|
+
export const getInputPlaceholderTextProps = (placeholderText) => {
|
|
271
|
+
return {
|
|
272
|
+
placeholderTextColor: placeholderText.color,
|
|
273
|
+
placeholderFontSize: placeholderText.size,
|
|
274
|
+
placeholderTextAlign: placeholderText.textAlignment,
|
|
275
|
+
placeholderUpperCase: placeholderText.uppercase,
|
|
276
|
+
placeholderFont: placeholderText.font.family === "unset"
|
|
277
|
+
? "inherit"
|
|
278
|
+
: placeholderText.font.family,
|
|
279
|
+
placeholderFontWeight: placeholderText.font.weight === "unset"
|
|
280
|
+
? "inherit"
|
|
281
|
+
: placeholderText.font.weight,
|
|
282
|
+
};
|
|
283
|
+
};
|
|
252
284
|
// #endregion =-=-=-= END BLOCK UTILS =-=-=-=
|
package/dist/styles.css
CHANGED
|
@@ -975,21 +975,24 @@ video {
|
|
|
975
975
|
.h-9 {
|
|
976
976
|
height: 2.25rem;
|
|
977
977
|
}
|
|
978
|
+
.h-\[130px\] {
|
|
979
|
+
height: 130px;
|
|
980
|
+
}
|
|
978
981
|
.h-\[1px\] {
|
|
979
982
|
height: 1px;
|
|
980
983
|
}
|
|
981
984
|
.h-\[22px\] {
|
|
982
985
|
height: 22px;
|
|
983
986
|
}
|
|
984
|
-
.h-\[2px\] {
|
|
985
|
-
height: 2px;
|
|
986
|
-
}
|
|
987
987
|
.h-\[36\] {
|
|
988
988
|
height: 36;
|
|
989
989
|
}
|
|
990
990
|
.h-\[38px\] {
|
|
991
991
|
height: 38px;
|
|
992
992
|
}
|
|
993
|
+
.h-\[40px\] {
|
|
994
|
+
height: 40px;
|
|
995
|
+
}
|
|
993
996
|
.h-\[42px\] {
|
|
994
997
|
height: 42px;
|
|
995
998
|
}
|
|
@@ -1474,6 +1477,9 @@ video {
|
|
|
1474
1477
|
.border-b {
|
|
1475
1478
|
border-bottom-width: 1px;
|
|
1476
1479
|
}
|
|
1480
|
+
.border-b-2 {
|
|
1481
|
+
border-bottom-width: 2px;
|
|
1482
|
+
}
|
|
1477
1483
|
.border-l {
|
|
1478
1484
|
border-left-width: 1px;
|
|
1479
1485
|
}
|
|
@@ -1624,6 +1630,10 @@ video {
|
|
|
1624
1630
|
-o-object-fit: cover;
|
|
1625
1631
|
object-fit: cover;
|
|
1626
1632
|
}
|
|
1633
|
+
.object-center {
|
|
1634
|
+
-o-object-position: center;
|
|
1635
|
+
object-position: center;
|
|
1636
|
+
}
|
|
1627
1637
|
.p-0 {
|
|
1628
1638
|
padding: 0px;
|
|
1629
1639
|
}
|
|
@@ -2067,9 +2077,6 @@ video {
|
|
|
2067
2077
|
.outline-stateColors-error {
|
|
2068
2078
|
outline-color: var(--stateColors-error);
|
|
2069
2079
|
}
|
|
2070
|
-
.outline-stateColors-skeleton {
|
|
2071
|
-
outline-color: var(--stateColors-skeleton);
|
|
2072
|
-
}
|
|
2073
2080
|
.outline-transparent {
|
|
2074
2081
|
outline-color: transparent;
|
|
2075
2082
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tapcart/mobile-components",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.43",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"style": "dist/styles.css",
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
"dev:styles": "npx tailwindcss -i styles/globals.css -o dist/styles.css --watch",
|
|
22
22
|
"dev": "concurrently \"pnpm run dev:ts\" \"pnpm run dev:styles\"",
|
|
23
23
|
"test": "jest",
|
|
24
|
+
"test:silent": "jest --silent",
|
|
24
25
|
"test:watch": "jest --watch"
|
|
25
26
|
},
|
|
26
27
|
"peerDependencies": {
|
|
@@ -85,4 +86,4 @@
|
|
|
85
86
|
"tailwindcss-animate": "^1.0.6",
|
|
86
87
|
"vaul": "0.9.1"
|
|
87
88
|
}
|
|
88
|
-
}
|
|
89
|
+
}
|