@tapcart/mobile-components 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ui/button.js +2 -2
- package/dist/components/ui/carousel.d.ts +5 -1
- package/dist/components/ui/carousel.d.ts.map +1 -1
- package/dist/components/ui/carousel.js +29 -2
- package/dist/components/ui/checkbox.js +1 -1
- package/dist/components/ui/chip.d.ts +6 -4
- package/dist/components/ui/chip.d.ts.map +1 -1
- package/dist/components/ui/chip.js +9 -3
- package/dist/components/ui/drawer.js +2 -2
- package/dist/components/ui/image.d.ts.map +1 -1
- package/dist/components/ui/image.js +2 -9
- package/dist/components/ui/product-card.d.ts +1 -0
- package/dist/components/ui/product-card.d.ts.map +1 -1
- package/dist/components/ui/product-card.js +80 -34
- package/dist/components/ui/textarea.d.ts +18 -0
- package/dist/components/ui/textarea.d.ts.map +1 -0
- package/dist/components/ui/textarea.js +54 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/styles.css +143 -37
- package/package.json +16 -16
|
@@ -26,10 +26,10 @@ const buttonVariants = cva("w-full flex rounded items-center justify-center tran
|
|
|
26
26
|
content: "py-3 px-4 w-auto",
|
|
27
27
|
},
|
|
28
28
|
variant: {
|
|
29
|
-
default: "bg-buttonColors-primaryFill border border-buttonColors-primaryOutlineColor shadow-
|
|
29
|
+
default: "bg-buttonColors-primaryFill border border-buttonColors-primaryOutlineColor shadow-primary",
|
|
30
30
|
destructive: "bg-stateColors-error disabled:bg-stateColors-disabled shadow-buttonColors-primaryShadow",
|
|
31
31
|
outline: "border border-input hover:bg-accent",
|
|
32
|
-
secondary: "bg-buttonColors-secondaryFill border border-buttonColors-secondaryOutlineColor disabled:bg-buttonColors-secondaryFill disabled:text-stateColors-disabled
|
|
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
35
|
quickadd: "bg-buttonColors-primaryFill border border-buttonColors-primaryOutlineColor w-full rounded-none rounded-b-lg h-8 text-xs",
|
|
@@ -15,5 +15,9 @@ declare const CarouselContent: React.ForwardRefExoticComponent<React.HTMLAttribu
|
|
|
15
15
|
declare const CarouselItem: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
16
16
|
declare const CarouselPrevious: React.ForwardRefExoticComponent<Omit<import("../../components/ui/button").ButtonProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
17
17
|
declare const CarouselNext: React.ForwardRefExoticComponent<Omit<import("../../components/ui/button").ButtonProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
18
|
-
|
|
18
|
+
type CarouselDotsProps = {
|
|
19
|
+
maxDots?: number;
|
|
20
|
+
};
|
|
21
|
+
declare const CarouselDots: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & CarouselDotsProps & React.RefAttributes<HTMLDivElement>>;
|
|
22
|
+
export { type CarouselApi, Carousel, CarouselContent, CarouselItem, CarouselPrevious, CarouselNext, CarouselDots, };
|
|
19
23
|
//# sourceMappingURL=carousel.d.ts.map
|
|
@@ -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,UA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pC,CAAA;AAuBD,QAAA,MAAM,QAAQ,6HAyGb,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;AAIF,KAAK,iBAAiB,GAAG;IACvB,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,QAAA,MAAM,YAAY,iIA8ChB,CAAC;AAGH,OAAO,EACL,KAAK,WAAW,EAChB,QAAQ,EACR,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,YAAY,EACZ,YAAY,GACb,CAAA"}
|
|
@@ -10,7 +10,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
10
10
|
}
|
|
11
11
|
return t;
|
|
12
12
|
};
|
|
13
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
14
14
|
import * as React from "react";
|
|
15
15
|
import useEmblaCarousel from "embla-carousel-react";
|
|
16
16
|
import { ArrowLeft, ArrowRight } from "lucide-react";
|
|
@@ -109,4 +109,31 @@ const CarouselNext = React.forwardRef((_a, ref) => {
|
|
|
109
109
|
: "-bottom-12 left-1/2 -translate-x-1/2 rotate-90", className), disabled: !canScrollNext, onClick: scrollNext }, props, { children: [_jsx(ArrowRight, { className: "h-4 w-4" }), _jsx("span", Object.assign({ className: "sr-only" }, { children: "Next slide" }))] })));
|
|
110
110
|
});
|
|
111
111
|
CarouselNext.displayName = "CarouselNext";
|
|
112
|
-
|
|
112
|
+
const CarouselDots = React.forwardRef((_a, ref) => {
|
|
113
|
+
var { maxDots = 5 } = _a, props = __rest(_a, ["maxDots"]);
|
|
114
|
+
const { api } = useCarousel();
|
|
115
|
+
const [_, setUpdateState] = React.useState(false);
|
|
116
|
+
const toggleUpdateState = React.useCallback(() => setUpdateState((prevState) => !prevState), []);
|
|
117
|
+
React.useEffect(() => {
|
|
118
|
+
if (api) {
|
|
119
|
+
api.on('select', toggleUpdateState);
|
|
120
|
+
api.on('reInit', toggleUpdateState);
|
|
121
|
+
return () => {
|
|
122
|
+
api.off('select', toggleUpdateState);
|
|
123
|
+
api.off('reInit', toggleUpdateState);
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
}, [api, toggleUpdateState]);
|
|
127
|
+
const numberOfSlides = Math.min((api === null || api === void 0 ? void 0 : api.scrollSnapList().length) || 0, maxDots);
|
|
128
|
+
const currentSlide = Math.min((api === null || api === void 0 ? void 0 : api.selectedScrollSnap()) || 0, maxDots - 1);
|
|
129
|
+
if (numberOfSlides > 1) {
|
|
130
|
+
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 ${i === currentSlide
|
|
131
|
+
? 'bg-coreColors-brandColorPrimary'
|
|
132
|
+
: 'bg-coreColors-brandColorPrimary opacity-50'}`, "aria-label": `Go to slide ${i + 1}`, onClick: () => api === null || api === void 0 ? void 0 : api.scrollTo(i) }, i))) })));
|
|
133
|
+
}
|
|
134
|
+
else {
|
|
135
|
+
return _jsx(_Fragment, {});
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
CarouselDots.displayName = 'CarouselDots';
|
|
139
|
+
export { Carousel, CarouselContent, CarouselItem, CarouselPrevious, CarouselNext, CarouselDots, };
|
|
@@ -32,7 +32,7 @@ const checkboxVariants = cva("flex flex-col group group-disabled", {
|
|
|
32
32
|
});
|
|
33
33
|
const Checkbox = React.forwardRef((_a, ref) => {
|
|
34
34
|
var { id, className, label, numberAmount, subtext, selected = false, onCheck, onSelect, deactivated = false } = _a, props = __rest(_a, ["id", "className", "label", "numberAmount", "subtext", "selected", "onCheck", "onSelect", "deactivated"]);
|
|
35
|
-
return (_jsx("div", Object.assign({ className: cn(checkboxVariants({ deactivated })) }, { children: _jsx(CheckboxPrimitive.Root, Object.assign({ ref: ref, className: cn("peer h-6 shrink-0 self-start rounded ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 group ", className), id: id, checked: selected, onSelect: onSelect, onCheckedChange: onCheck, disabled: deactivated !== null && deactivated !== void 0 ? deactivated : false }, props, { children: _jsxs("div", Object.assign({ className: "grid grid-cols-[auto,auto,1fr] gap-2 items-start group" }, { children: [_jsxs("div", Object.assign({ className: "grid" }, { children: [_jsx(CheckboxPrimitive.Indicator, Object.assign({ className: "flex items-center justify-center text-current col-start-1 row-start-1" }, { children: !deactivated && (_jsx(Check, { className: "col-start-1 row-start-1 items-center z-50 text-coreColors-brandColorPrimary" })) })), _jsxs("div", Object.assign({ className: "flex items-center justify-center col-start-1 row-start-1" }, { children: [!deactivated && !selected && (_jsx(Unchecked, { className: "text-coreColors-secondaryIcon" })), deactivated && (_jsx(DisabledCheckbox, { className: "text-stateColors-disabled" }))] }))] })), _jsxs("div", Object.assign({ className: "flex flex-col gap-2 items-start" }, { children: [label && (_jsx("label", Object.assign({ htmlFor: id }, { children: _jsxs("span", Object.assign({ className: "flex gap-2" }, { children: [_jsx(Text, Object.assign({ type: "body-primary", className: "group-disabled:text-stateColors-disabled" }, { children: label })), numberAmount && (_jsxs(Text, Object.assign({ type: "body-primary", className: "text-textColors-secondaryColor group-disabled:text-stateColors-disabled inline" }, { children: ["(", numberAmount, ")"] })))] })) }))), subtext && (_jsx(Text, Object.assign({ type: "body-secondary", className: "group-disabled:text-stateColors-disabled" }, { children: subtext })))] }))] })) })) })));
|
|
35
|
+
return (_jsx("div", Object.assign({ className: cn(checkboxVariants({ deactivated })) }, { children: _jsx(CheckboxPrimitive.Root, Object.assign({ ref: ref, className: cn("w-full peer h-6 shrink-0 self-start rounded ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 group ", className), id: id, checked: selected, onSelect: onSelect, onCheckedChange: onCheck, disabled: deactivated !== null && deactivated !== void 0 ? deactivated : false }, props, { children: _jsxs("div", Object.assign({ className: "grid grid-cols-[auto,auto,1fr] gap-2 items-start group " }, { children: [_jsxs("div", Object.assign({ className: "grid" }, { children: [_jsx(CheckboxPrimitive.Indicator, Object.assign({ className: "flex items-center justify-center text-current col-start-1 row-start-1" }, { children: !deactivated && (_jsx(Check, { className: "col-start-1 row-start-1 items-center z-50 text-coreColors-brandColorPrimary" })) })), _jsxs("div", Object.assign({ className: "flex items-center justify-center col-start-1 row-start-1" }, { children: [!deactivated && !selected && (_jsx(Unchecked, { className: "text-coreColors-secondaryIcon" })), deactivated && (_jsx(DisabledCheckbox, { className: "text-stateColors-disabled" }))] }))] })), _jsxs("div", Object.assign({ className: "flex flex-col gap-2 items-start overflow-x-auto" }, { children: [label && (_jsx("label", Object.assign({ htmlFor: id, className: "max-w-full" }, { children: _jsxs("span", Object.assign({ className: "flex gap-2" }, { children: [_jsx(Text, Object.assign({ type: "body-primary", className: "group-disabled:text-stateColors-disabled text-ellipsis overflow-hidden " }, { children: label })), numberAmount && (_jsxs(Text, Object.assign({ type: "body-primary", className: "text-textColors-secondaryColor group-disabled:text-stateColors-disabled inline" }, { children: ["(", numberAmount, ")"] })))] })) }))), subtext && (_jsx(Text, Object.assign({ type: "body-secondary", className: "group-disabled:text-stateColors-disabled" }, { children: subtext })))] }))] })) })) })));
|
|
36
36
|
});
|
|
37
37
|
Checkbox.displayName = CheckboxPrimitive.Root.displayName;
|
|
38
38
|
export { Checkbox };
|
|
@@ -3,26 +3,28 @@ import React from "react";
|
|
|
3
3
|
declare const chipVariants: (props?: ({
|
|
4
4
|
variant?: "secondary" | "primary" | null | undefined;
|
|
5
5
|
direction?: "horizontal" | "vertical" | null | undefined;
|
|
6
|
+
iconPosition?: "default" | "left" | "right" | null | undefined;
|
|
6
7
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
7
|
-
type ChipProps = React.ComponentPropsWithoutRef<"
|
|
8
|
+
type ChipProps = React.ComponentPropsWithoutRef<"div"> & VariantProps<typeof chipVariants> & {
|
|
8
9
|
icon?: React.ElementType;
|
|
9
10
|
iconPosition?: "left" | "right";
|
|
10
11
|
onChipClick?: () => void;
|
|
11
12
|
onIconClick?: () => void;
|
|
12
13
|
};
|
|
13
|
-
declare const Chip: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.
|
|
14
|
+
declare const Chip: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & VariantProps<(props?: ({
|
|
14
15
|
variant?: "secondary" | "primary" | null | undefined;
|
|
15
16
|
direction?: "horizontal" | "vertical" | null | undefined;
|
|
17
|
+
iconPosition?: "default" | "left" | "right" | null | undefined;
|
|
16
18
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string> & {
|
|
17
19
|
icon?: React.ElementType<any> | undefined;
|
|
18
20
|
iconPosition?: "left" | "right" | undefined;
|
|
19
21
|
onChipClick?: (() => void) | undefined;
|
|
20
22
|
onIconClick?: (() => void) | undefined;
|
|
21
|
-
} & React.RefAttributes<
|
|
23
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
22
24
|
type MultipleChipsProps = {
|
|
23
25
|
children: React.ReactElement<ChipProps>[];
|
|
24
26
|
containerRef: React.RefObject<HTMLDivElement>;
|
|
25
27
|
};
|
|
26
28
|
declare const MultipleChips: React.FC<MultipleChipsProps>;
|
|
27
|
-
export { Chip, MultipleChips, type ChipProps };
|
|
29
|
+
export { Chip, MultipleChips, type ChipProps, type MultipleChipsProps };
|
|
28
30
|
//# sourceMappingURL=chip.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chip.d.ts","sourceRoot":"","sources":["../../../components/ui/chip.tsx"],"names":[],"mappings":"AACA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAEjE,OAAO,KAAsC,MAAM,OAAO,CAAA;AAG1D,QAAA,MAAM,YAAY
|
|
1
|
+
{"version":3,"file":"chip.d.ts","sourceRoot":"","sources":["../../../components/ui/chip.tsx"],"names":[],"mappings":"AACA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAEjE,OAAO,KAAsC,MAAM,OAAO,CAAA;AAG1D,QAAA,MAAM,YAAY;;;;mFAwBjB,CAAA;AAED,KAAK,SAAS,GAAG,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,GACpD,YAAY,CAAC,OAAO,YAAY,CAAC,GAAG;IAClC,IAAI,CAAC,EAAE,KAAK,CAAC,WAAW,CAAA;IACxB,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;IAC/B,WAAW,CAAC,EAAE,MAAM,IAAI,CAAA;IACxB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAA;CACzB,CAAA;AAEH,QAAA,MAAM,IAAI;;;;;;;yBAJc,IAAI;yBACJ,IAAI;wCAgE3B,CAAA;AAGD,KAAK,kBAAkB,GAAG;IACxB,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAC,SAAS,CAAC,EAAE,CAAA;IACzC,YAAY,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAA;CAC9C,CAAA;AAED,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAkD/C,CAAA;AAED,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,SAAS,EAAE,KAAK,kBAAkB,EAAE,CAAA"}
|
|
@@ -15,7 +15,7 @@ import { cva } from "class-variance-authority";
|
|
|
15
15
|
import { cn } from "../../lib/utils";
|
|
16
16
|
import React, { useState, useEffect } from "react";
|
|
17
17
|
import { Icon } from "./icon";
|
|
18
|
-
const chipVariants = cva("inline-flex items-center justify-center rounded border border-coreColors-dividingLines text-[12px] transition-colors
|
|
18
|
+
const chipVariants = cva("inline-flex items-center justify-center rounded border border-coreColors-dividingLines text-[12px] transition-colors h-8 active:opacity-70", {
|
|
19
19
|
variants: {
|
|
20
20
|
variant: {
|
|
21
21
|
primary: "bg-coreColors-pageColor text-textColors-primaryColor",
|
|
@@ -25,21 +25,27 @@ const chipVariants = cva("inline-flex items-center justify-center rounded border
|
|
|
25
25
|
horizontal: "flex-row",
|
|
26
26
|
vertical: "flex-col",
|
|
27
27
|
},
|
|
28
|
+
iconPosition: {
|
|
29
|
+
default: "p-2",
|
|
30
|
+
left: "pr-2",
|
|
31
|
+
right: "pl-2",
|
|
32
|
+
},
|
|
28
33
|
},
|
|
29
34
|
defaultVariants: {
|
|
30
35
|
variant: "primary",
|
|
31
36
|
direction: "horizontal",
|
|
37
|
+
iconPosition: "default",
|
|
32
38
|
},
|
|
33
39
|
});
|
|
34
40
|
const Chip = React.forwardRef((_a, ref) => {
|
|
35
|
-
var { className, variant, direction, children, iconPosition
|
|
41
|
+
var { className, variant, direction, children, iconPosition, onChipClick, onIconClick } = _a, props = __rest(_a, ["className", "variant", "direction", "children", "iconPosition", "onChipClick", "onIconClick"]);
|
|
36
42
|
const handleOnClick = () => {
|
|
37
43
|
onChipClick === null || onChipClick === void 0 ? void 0 : onChipClick();
|
|
38
44
|
};
|
|
39
45
|
const handleIconClick = () => {
|
|
40
46
|
onIconClick === null || onIconClick === void 0 ? void 0 : onIconClick();
|
|
41
47
|
};
|
|
42
|
-
return (_jsxs("
|
|
48
|
+
return (_jsxs("div", Object.assign({ onClick: handleOnClick, ref: ref, className: cn(chipVariants({ variant, direction, iconPosition }), className) }, props, { children: [iconPosition === "left" && (_jsx("button", Object.assign({ onClick: handleIconClick, className: "h-full flex items-center justify-center pl-2" }, { children: _jsx(Icon, { name: "square-x-filled", className: "mr-2 h-4 w-4 cursor-pointer", color: "coreColors-secondaryIcon" }) }))), children, iconPosition === "right" && (_jsx("button", Object.assign({ onClick: handleIconClick, className: "h-full flex items-center justify-center pr-2" }, { children: _jsx(Icon, { name: "square-x-filled", className: "ml-2 h-4 w-4 cursor-pointer", onClick: handleIconClick, color: "coreColors-secondaryIcon" }) })))] })));
|
|
43
49
|
});
|
|
44
50
|
Chip.displayName = "Chip";
|
|
45
51
|
const MultipleChips = ({ children, containerRef, }) => {
|
|
@@ -31,8 +31,8 @@ DrawerOverlay.displayName = DrawerPrimitive.Overlay.displayName;
|
|
|
31
31
|
const DrawerContentBase = React.forwardRef((_a, ref) => {
|
|
32
32
|
var { className, children, hideBackdrop = false, backdropHexColor, isSheet = false } = _a, props = __rest(_a, ["className", "children", "hideBackdrop", "backdropHexColor", "isSheet"]);
|
|
33
33
|
const styles = isSheet
|
|
34
|
-
? { height: "calc(100vh -
|
|
35
|
-
: { maxHeight: "calc(100vh -
|
|
34
|
+
? { height: "calc(100vh - 112px)" }
|
|
35
|
+
: { maxHeight: "calc(100vh - 112px)" };
|
|
36
36
|
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] }))] }));
|
|
37
37
|
});
|
|
38
38
|
DrawerContentBase.displayName = "DrawerContentBase";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../../components/ui/image.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAC5C,OAAO,KAAK,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAM1D,KAAK,aAAa,GAAG;IACnB,SAAS,EAAE,MAAM,CAAA;IACjB,aAAa,EAAE,MAA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AED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,eAAO,MAAM,KAAK,yGAqKjB,CAAA;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,aAAa,CAAC,EAC5B,GAAG,EACH,KAAK,EACL,MAAM,EACN,IAAI,EACJ,WAAW,GACZ,EAAE,YAAY,UAiBd;AAiED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAC5B,GAAG,CAAC,EAAE,MAAM,EACZ,UAAU,CAAC,EAAE,KAAK,CAAC;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,IAAI,CAAA;CAAE,CAAC,EACpE,MAAM,GAAE,MAAsB,EAC9B,WAAW,UAAQ,GAClB,MAAM,CAiBR;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,6BAA0B,EAC/B,SAAS,EAAE,MAAM,EACjB,aAAa,EAAE,MAAM,EACrB,aAAa,EAAE,MAAM,GACpB,MAAM,EAAE,CAUV;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAIzE;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAC3B,WAAW,CAAC,EAAE,MAAM,EAAE,EACtB,WAAW,CAAC,EAAE,MAAM,EACpB,IAAI,GAAE,IAAe,GAEnB;IACE,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,IAAI,EAAE,IAAI,CAAA;CACX,EAAE,GACH,SAAS,CAUZ"}
|
|
@@ -135,21 +135,14 @@ export const Image = React.forwardRef((_a, ref) => {
|
|
|
135
135
|
setHasError(true);
|
|
136
136
|
};
|
|
137
137
|
const imgClassName = `opacity-0 transition-opacity duration-500 ease-in-out ${isLoaded ? "opacity-100" : ""}`;
|
|
138
|
-
const aspectRatioPadding = aspectRatio
|
|
139
|
-
? {
|
|
140
|
-
paddingBottom: `${(parseFloat(aspectRatio.split(":")[1]) /
|
|
141
|
-
parseFloat(aspectRatio.split(":")[0])) *
|
|
142
|
-
100}%`,
|
|
143
|
-
}
|
|
144
|
-
: { paddingBottom: "100%" };
|
|
145
138
|
const wrapperStyle = {
|
|
146
|
-
paddingBottom: !isLoaded ? aspectRatioPadding.paddingBottom : undefined,
|
|
147
139
|
aspectRatio: (_b = normalizedProps.aspectRatio) === null || _b === void 0 ? void 0 : _b.replace(":", "/"),
|
|
148
140
|
};
|
|
149
|
-
return (_jsx("div", Object.assign({ className: "relative
|
|
141
|
+
return (_jsx("div", Object.assign({ className: "relative bg-stateColors-skeleton border-transparent", style: wrapperStyle }, { children: !hasError && normalizedProps.src ? (_jsx("img", Object.assign({ ref: ref, alt: normalizedProps.alt, decoding: decoding, height: normalizedProps.height, loading: loading, src: normalizedProps.src, srcSet: generateSrcSet(normalizedProps.src, generateSizes(imageWidths, normalizedProps.aspectRatio, crop), loader, normalizedProps.objectFit === "contain"), width: normalizedProps.width, className: imgClassName, onLoad: handleImageLoad, onError: handleImageError, sizes: sizes, style: {
|
|
150
142
|
objectFit: normalizedProps.objectFit,
|
|
151
143
|
maxHeight: "100%",
|
|
152
144
|
height: "100%",
|
|
145
|
+
width: "100%",
|
|
153
146
|
} }, passthroughProps))) : (_jsx("div", { className: "absolute top-0 left-0 w-full h-full bg-stateColors-skeleton " })) })));
|
|
154
147
|
});
|
|
155
148
|
/**
|
|
@@ -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,OAA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1C,OAAO,EAAE,OAAO,KACb,IAAI,CAAA;IACT,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAA;CAC1E,CAAA;AA8HD,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAiU3C,CAAA;AAED,OAAO,EAAE,WAAW,EAAE,CAAA"}
|
|
@@ -10,23 +10,7 @@ import { Skeleton } from "./skeleton";
|
|
|
10
10
|
import { cn } from "../../lib/utils";
|
|
11
11
|
import { cva } from "class-variance-authority";
|
|
12
12
|
import { Image } from "./image";
|
|
13
|
-
|
|
14
|
-
variants: {
|
|
15
|
-
aspectRatio: {
|
|
16
|
-
"1:1": "aspect-square",
|
|
17
|
-
"2:3": "aspect-[2/3]",
|
|
18
|
-
"4:5": "aspect-[4/5]",
|
|
19
|
-
},
|
|
20
|
-
scaling: {
|
|
21
|
-
fill: "object-cover",
|
|
22
|
-
fit: "object-contain",
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
defaultVariants: {
|
|
26
|
-
aspectRatio: "2:3",
|
|
27
|
-
scaling: "fill",
|
|
28
|
-
},
|
|
29
|
-
});
|
|
13
|
+
import { Carousel, CarouselContent, CarouselDots, CarouselItem } from "./carousel";
|
|
30
14
|
const productCardBadgeVariants = cva("absolute truncate", {
|
|
31
15
|
variants: {
|
|
32
16
|
horizontalPosition: {
|
|
@@ -39,7 +23,18 @@ const productCardBadgeVariants = cva("absolute truncate", {
|
|
|
39
23
|
bottom: "bottom-0 mb-2",
|
|
40
24
|
below: "",
|
|
41
25
|
},
|
|
26
|
+
imageSwipeEnabled: {
|
|
27
|
+
true: "",
|
|
28
|
+
false: "",
|
|
29
|
+
},
|
|
42
30
|
},
|
|
31
|
+
compoundVariants: [
|
|
32
|
+
{
|
|
33
|
+
verticalPosition: "bottom",
|
|
34
|
+
imageSwipeEnabled: true,
|
|
35
|
+
class: "bottom-[18px]",
|
|
36
|
+
},
|
|
37
|
+
],
|
|
43
38
|
});
|
|
44
39
|
const productCardFavoriteVariants = cva("absolute ", {
|
|
45
40
|
variants: {
|
|
@@ -60,22 +55,32 @@ const productCardFavoriteVariants = cva("absolute ", {
|
|
|
60
55
|
bottom: "",
|
|
61
56
|
below: "",
|
|
62
57
|
},
|
|
58
|
+
isSoldOut: {
|
|
59
|
+
true: "",
|
|
60
|
+
false: "",
|
|
61
|
+
},
|
|
63
62
|
showSoldOutBadge: {
|
|
64
63
|
true: "",
|
|
65
64
|
false: "",
|
|
66
65
|
},
|
|
66
|
+
imageSwipeEnabled: {
|
|
67
|
+
true: "",
|
|
68
|
+
false: "",
|
|
69
|
+
},
|
|
67
70
|
},
|
|
68
71
|
compoundVariants: [
|
|
69
72
|
{
|
|
70
73
|
iconPosition: "top-left",
|
|
71
74
|
badgeHorizontalPosition: ["start", "center"],
|
|
72
75
|
badgeVerticalPosition: "top",
|
|
76
|
+
showSoldOutBadge: false,
|
|
73
77
|
class: "top-10",
|
|
74
78
|
},
|
|
75
79
|
{
|
|
76
80
|
iconPosition: "top-right",
|
|
77
81
|
badgeHorizontalPosition: ["end", "center"],
|
|
78
82
|
badgeVerticalPosition: "top",
|
|
83
|
+
showSoldOutBadge: false,
|
|
79
84
|
class: "top-10",
|
|
80
85
|
},
|
|
81
86
|
{
|
|
@@ -95,13 +100,41 @@ const productCardFavoriteVariants = cva("absolute ", {
|
|
|
95
100
|
showSoldOutBadge: true,
|
|
96
101
|
class: "bottom-10",
|
|
97
102
|
},
|
|
103
|
+
{
|
|
104
|
+
iconPosition: ["bottom-left", "bottom-right"],
|
|
105
|
+
imageSwipeEnabled: true,
|
|
106
|
+
class: "bottom-[18px]",
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
iconPosition: "bottom-left",
|
|
110
|
+
badgeHorizontalPosition: ["start", "center"],
|
|
111
|
+
badgeVerticalPosition: "bottom",
|
|
112
|
+
isSoldOut: false,
|
|
113
|
+
showSoldOutBadge: false,
|
|
114
|
+
imageSwipeEnabled: true,
|
|
115
|
+
class: "bottom-[58px]",
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
iconPosition: "bottom-right",
|
|
119
|
+
badgeHorizontalPosition: ["end", "center"],
|
|
120
|
+
badgeVerticalPosition: "bottom",
|
|
121
|
+
showSoldOutBadge: false,
|
|
122
|
+
imageSwipeEnabled: true,
|
|
123
|
+
class: "bottom-[58px]",
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
iconPosition: "bottom-left",
|
|
127
|
+
showSoldOutBadge: true,
|
|
128
|
+
imageSwipeEnabled: true,
|
|
129
|
+
class: "bottom-[58px]",
|
|
130
|
+
},
|
|
98
131
|
],
|
|
99
132
|
defaultVariants: {
|
|
100
133
|
iconPosition: "below-image-on-right",
|
|
101
134
|
},
|
|
102
135
|
});
|
|
103
136
|
const ProductCard = ({ config, tapcartData, product, isLoading, favorited, onFavoriteClick, onQuickAdd, openProduct, }) => {
|
|
104
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15;
|
|
137
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18;
|
|
105
138
|
const { variants, images, title, tags } = product;
|
|
106
139
|
// Select the variant that has the lowest price that is available or just the lowest price if none are available
|
|
107
140
|
let searchVariants = variants.filter((variant) => variant.available);
|
|
@@ -151,50 +184,63 @@ const ProductCard = ({ config, tapcartData, product, isLoading, favorited, onFav
|
|
|
151
184
|
}
|
|
152
185
|
};
|
|
153
186
|
const sizes = getImageSizes(config);
|
|
187
|
+
const imageSwipeEnabled = (((_e = config.productImage) === null || _e === void 0 ? void 0 : _e.allowSwipeability) && product.images.length > 1);
|
|
154
188
|
return (_jsx("div", Object.assign({ className: `w-1/2` }, { children: _jsxs("div", Object.assign({ className: "w-full active:opacity-70", onClick: () => {
|
|
155
189
|
_openProduct();
|
|
156
|
-
} }, { children: [((
|
|
190
|
+
} }, { children: [((_f = config.productImage) === null || _f === void 0 ? void 0 : _f.enabled) && (_jsxs("div", Object.assign({ className: "relative w-full overflow-hidden", style: {
|
|
157
191
|
borderTopLeftRadius: `${config.productImage.cornerRadius}px`,
|
|
158
192
|
borderTopRightRadius: `${config.productImage.cornerRadius}px`,
|
|
159
|
-
|
|
193
|
+
borderBottomLeftRadius: `${((_g = config.quickAdd) === null || _g === void 0 ? void 0 : _g.enabled) ? "0" : config.productImage.cornerRadius}px`,
|
|
194
|
+
borderBottomRightRadius: `${((_h = config.quickAdd) === null || _h === void 0 ? void 0 : _h.enabled) ? "0" : config.productImage.cornerRadius}px`,
|
|
195
|
+
} }, { 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) => {
|
|
196
|
+
var _a, _b, _c, _d;
|
|
197
|
+
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 }) })));
|
|
198
|
+
}) })), _jsx(CarouselDots, { className: "absolute left-0 w-full bottom-2" })] })) }))) : (_jsx(Image, { alt: product.title, aspectRatio: (_k = (_j = tapcartData.theme) === null || _j === void 0 ? void 0 : _j.productImages) === null || _k === void 0 ? void 0 : _k.aspectRatio, data: product.featuredImage || product.images[0], sizes: sizes, objectFit: (_m = (_l = tapcartData.theme) === null || _l === void 0 ? void 0 : _l.productImages) === null || _m === void 0 ? void 0 : _m.scaling })), aboveBadge && product.availableForSale && (_jsx(Badge, Object.assign({ size: "plp-layout", className: cn(productCardBadgeVariants({
|
|
160
199
|
verticalPosition: aboveBadge.verticalPosition,
|
|
161
200
|
horizontalPosition: aboveBadge.horizontalPosition,
|
|
201
|
+
imageSwipeEnabled,
|
|
162
202
|
})), style: {
|
|
163
203
|
color: aboveBadge.fontColor,
|
|
164
204
|
backgroundColor: aboveBadge.backgroundColor,
|
|
165
|
-
}, alignment: aboveBadge.horizontalPosition, cornerRadius: aboveBadge.cornerRadius, icon: aboveBadge.image }, { children: aboveBadge.text }))), showSoldOutBadge && (_jsx(Badge, Object.assign({ size: "plp-layout", className:
|
|
205
|
+
}, alignment: aboveBadge.horizontalPosition, cornerRadius: aboveBadge.cornerRadius, icon: aboveBadge.image }, { children: aboveBadge.text }))), showSoldOutBadge && (_jsx(Badge, Object.assign({ size: "plp-layout", className: cn(productCardBadgeVariants({
|
|
206
|
+
verticalPosition: "bottom",
|
|
207
|
+
horizontalPosition: "start",
|
|
208
|
+
imageSwipeEnabled,
|
|
209
|
+
}), "bg-stateColors-disabled"), alignment: "start", cornerRadius: "rounded", type: "text-only" }, { children: "Sold Out" }))), ((_o = config.favoritesIcon) === null || _o === void 0 ? void 0 : _o.enabled) &&
|
|
166
210
|
iconPosition !== "below-image-on-right" && (_jsx(Favorite, { className: cn(productCardFavoriteVariants({
|
|
167
211
|
iconPosition,
|
|
168
212
|
badgeHorizontalPosition: aboveBadge === null || aboveBadge === void 0 ? void 0 : aboveBadge.horizontalPosition,
|
|
169
213
|
badgeVerticalPosition: aboveBadge === null || aboveBadge === void 0 ? void 0 : aboveBadge.verticalPosition,
|
|
214
|
+
isSoldOut: !product.availableForSale,
|
|
170
215
|
showSoldOutBadge,
|
|
216
|
+
imageSwipeEnabled
|
|
171
217
|
})), selected: favorited, onClick: (e) => {
|
|
172
218
|
onFavoriteClick === null || onFavoriteClick === void 0 ? void 0 : onFavoriteClick(e, product);
|
|
173
|
-
}, icon: ((
|
|
174
|
-
? (
|
|
175
|
-
: undefined }))] }))), ((
|
|
219
|
+
}, icon: ((_q = (_p = config.favoritesIcon) === null || _p === void 0 ? void 0 : _p.icon) === null || _q === void 0 ? void 0 : _q.type) === "internal"
|
|
220
|
+
? (_s = (_r = config.favoritesIcon) === null || _r === void 0 ? void 0 : _r.icon) === null || _s === void 0 ? void 0 : _s.url
|
|
221
|
+
: undefined }))] }))), ((_t = config.quickAdd) === null || _t === void 0 ? void 0 : _t.enabled) && (_jsx(Button, Object.assign({ className: "outline-0", style: {
|
|
176
222
|
borderBottomLeftRadius: `${config.quickAdd.cornerRadius}px`,
|
|
177
223
|
borderBottomRightRadius: `${config.quickAdd.cornerRadius}px`,
|
|
178
|
-
}, labelClassName: cn("outline-0 w-full", { uppercase: (
|
|
224
|
+
}, labelClassName: cn("outline-0 w-full", { uppercase: (_u = config.quickAdd) === null || _u === void 0 ? void 0 : _u.uppercase }, { "text-left": ((_v = config.quickAdd) === null || _v === void 0 ? void 0 : _v.textAlignment) === "left" }, { "text-right": ((_w = config.quickAdd) === null || _w === void 0 ? void 0 : _w.textAlignment) === "right" }, { "text-center": ((_x = config.quickAdd) === null || _x === void 0 ? void 0 : _x.textAlignment) === "center" }), labelStyle: { fontSize: (_y = config.quickAdd) === null || _y === void 0 ? void 0 : _y.fontSize }, variant: "quickadd", size: "default", onClick: (e) => {
|
|
179
225
|
e.stopPropagation();
|
|
180
226
|
onQuickAdd === null || onQuickAdd === void 0 ? void 0 : onQuickAdd(e, product);
|
|
181
227
|
} }, { children: "+ Quick add" }))), _jsxs("div", Object.assign({ className: "w-full flex-col justify-start items-start gap-0 inline-flex" }, { children: [belowBadge && (_jsx("div", Object.assign({ className: cn("mt-2 w-full flex justify-start", {
|
|
182
228
|
"justify-end": belowBadge.horizontalPosition === "end",
|
|
183
|
-
}) }, { children: _jsx(Badge, Object.assign({ size: "plp-layout", alignment: belowBadge.horizontalPosition, icon: belowBadge.image, className: cn("truncate", { rounded: belowBadge.cornerRadius === "rounded" }, { "rounded-none": belowBadge.cornerRadius === "square" }) }, { children: belowBadge.text })) }))), ((
|
|
184
|
-
"text-left": ((
|
|
229
|
+
}) }, { children: _jsx(Badge, Object.assign({ size: "plp-layout", alignment: belowBadge.horizontalPosition, icon: belowBadge.image, className: cn("truncate", { rounded: belowBadge.cornerRadius === "rounded" }, { "rounded-none": belowBadge.cornerRadius === "square" }) }, { children: belowBadge.text })) }))), ((_z = config.productTitle) === null || _z === void 0 ? void 0 : _z.enabled) && (_jsx("div", Object.assign({ className: "mt-2 w-full" }, { children: _jsx(Text, Object.assign({ type: "body-secondary", className: cn({ uppercase: (_0 = config.productTitle) === null || _0 === void 0 ? void 0 : _0.uppercase }, {
|
|
230
|
+
"text-left": ((_1 = config.productTitle) === null || _1 === void 0 ? void 0 : _1.textAlignment) === "left",
|
|
185
231
|
}, {
|
|
186
|
-
"text-right": ((
|
|
232
|
+
"text-right": ((_2 = config.productTitle) === null || _2 === void 0 ? void 0 : _2.textAlignment) === "right",
|
|
187
233
|
}, {
|
|
188
|
-
"text-center": ((
|
|
189
|
-
}, { truncate: !((
|
|
234
|
+
"text-center": ((_3 = config.productTitle) === null || _3 === void 0 ? void 0 : _3.textAlignment) === "center",
|
|
235
|
+
}, { truncate: !((_4 = config.productTitle) === null || _4 === void 0 ? void 0 : _4.wrapText) }, { "text-wrap": (_5 = config.productTitle) === null || _5 === void 0 ? void 0 : _5.wrapText }, "text-textColors-productTitle"), style: { fontSize: (_6 = config.productTitle) === null || _6 === void 0 ? void 0 : _6.fontSize } }, { children: title })) }))), _jsxs("div", Object.assign({ className: cn("flex flex-row w-full gap-2 mt-1 justify-end", { "justify-start": ((_7 = config.price) === null || _7 === void 0 ? void 0 : _7.textAlignment) === "left" }, { "justify-end": ((_8 = config.price) === null || _8 === void 0 ? void 0 : _8.textAlignment) === "right" }, { "justify-center": ((_9 = config.price) === null || _9 === void 0 ? void 0 : _9.textAlignment) === "center" }) }, { children: [((_10 = config.price) === null || _10 === void 0 ? void 0 : _10.enabled) && (_jsx(Price, { price: parseFloat(variant.price.amount), isSale: !!variant.compareAtPrice &&
|
|
190
236
|
variant.compareAtPrice &&
|
|
191
|
-
parseFloat((
|
|
237
|
+
parseFloat((_11 = variant.compareAtPrice) === null || _11 === void 0 ? void 0 : _11.amount) >
|
|
192
238
|
parseFloat(variant.price.amount), compareAtPrice: variant.compareAtPrice &&
|
|
193
|
-
parseFloat((
|
|
239
|
+
parseFloat((_12 = variant.compareAtPrice) === null || _12 === void 0 ? void 0 : _12.amount), currency: tapcartData.currency.code, locale: tapcartData.currency.locale, fontSize: (_13 = config.price) === null || _13 === void 0 ? void 0 : _13.fontSize })), ((_14 = config.favoritesIcon) === null || _14 === void 0 ? void 0 : _14.enabled) &&
|
|
194
240
|
config.favoritesIcon.layoutType === "below-image-on-right" && (_jsx("div", Object.assign({ className: "w-8 h-8 flex items-center justify-center" }, { children: _jsx(Favorite, { selected: favorited, onClick: (e) => {
|
|
195
241
|
onFavoriteClick === null || onFavoriteClick === void 0 ? void 0 : onFavoriteClick(e, product);
|
|
196
|
-
}, size: "small", icon: ((
|
|
197
|
-
? (
|
|
242
|
+
}, size: "small", icon: ((_16 = (_15 = config.favoritesIcon) === null || _15 === void 0 ? void 0 : _15.icon) === null || _16 === void 0 ? void 0 : _16.type) === "internal"
|
|
243
|
+
? (_18 = (_17 = config.favoritesIcon) === null || _17 === void 0 ? void 0 : _17.icon) === null || _18 === void 0 ? void 0 : _18.url
|
|
198
244
|
: undefined }) })))] }))] }))] })) })));
|
|
199
245
|
};
|
|
200
246
|
export { ProductCard };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
declare const textareaVariants: (props?: ({
|
|
4
|
+
error?: boolean | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
6
|
+
export interface TextareaProps extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, "onChange">, VariantProps<typeof textareaVariants> {
|
|
7
|
+
id: string;
|
|
8
|
+
label?: string;
|
|
9
|
+
icon?: string;
|
|
10
|
+
asChild?: boolean;
|
|
11
|
+
value: string;
|
|
12
|
+
placeholder: string;
|
|
13
|
+
maxHeight?: number;
|
|
14
|
+
onChange: (_: string) => void;
|
|
15
|
+
}
|
|
16
|
+
declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
17
|
+
export { Textarea };
|
|
18
|
+
//# sourceMappingURL=textarea.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textarea.d.ts","sourceRoot":"","sources":["../../../components/ui/textarea.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAGjE,QAAA,MAAM,gBAAgB;;mFAarB,CAAA;AAED,MAAM,WAAW,aACf,SAAQ,IAAI,CAAC,KAAK,CAAC,sBAAsB,CAAC,mBAAmB,CAAC,EAAE,UAAU,CAAC,EACzE,YAAY,CAAC,OAAO,gBAAgB,CAAC;IACvC,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;CAC9B;AAED,QAAA,MAAM,QAAQ,2FA6Eb,CAAA;AAGD,OAAO,EAAE,QAAQ,EAAE,CAAA"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
|
+
import * as React from "react";
|
|
15
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
16
|
+
import { cva } from "class-variance-authority";
|
|
17
|
+
import { cn } from "../../lib/utils";
|
|
18
|
+
const textareaVariants = cva("relative pl-4 pr-4 rounded border border-coreColors-dividingLines bg-coreColors-inputBackground focus-within:border-coreColors-brandColorPrimary [&_label]:focus-within:text-coreColors-brandColorPrimary", {
|
|
19
|
+
variants: {
|
|
20
|
+
error: {
|
|
21
|
+
true: "!border-stateColors-error [&_*]:text-stateColors-error [&_*]:placeholder:text-stateColors-error focus-within:!border-stateColors-error [&+label]:text-stateColors-error [&_label]:focus-within:!text-stateColors-error",
|
|
22
|
+
false: "",
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
defaultVariants: {
|
|
26
|
+
error: false,
|
|
27
|
+
},
|
|
28
|
+
});
|
|
29
|
+
const Textarea = React.forwardRef((_a, ref) => {
|
|
30
|
+
var { className, error = false, id, label, icon, asChild, value, placeholder, maxHeight, onChange } = _a, props = __rest(_a, ["className", "error", "id", "label", "icon", "asChild", "value", "placeholder", "maxHeight", "onChange"]);
|
|
31
|
+
const Comp = asChild ? Slot : "div";
|
|
32
|
+
const [content, setContent] = React.useState(value);
|
|
33
|
+
const textareaRef = React.useRef(null);
|
|
34
|
+
React.useEffect(() => {
|
|
35
|
+
if (textareaRef.current) {
|
|
36
|
+
textareaRef.current.style.height = "auto";
|
|
37
|
+
textareaRef.current.style.height = `${textareaRef.current.scrollHeight}px`;
|
|
38
|
+
}
|
|
39
|
+
}, [content]);
|
|
40
|
+
const handleChange = (e) => {
|
|
41
|
+
setContent(e);
|
|
42
|
+
};
|
|
43
|
+
const focusTextarea = () => {
|
|
44
|
+
if (textareaRef.current) {
|
|
45
|
+
textareaRef.current.focus();
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
return (_jsxs(Comp, Object.assign({ className: cn(textareaVariants({ error }), content ? "pt-6 pb-2" : "pt-4 pb-4", className), onClick: focusTextarea }, { children: [_jsx("textarea", Object.assign({ placeholder: placeholder, value: value, onChange: (e) => {
|
|
49
|
+
onChange(e.target.value);
|
|
50
|
+
handleChange(e.target.value);
|
|
51
|
+
}, id: id, className: cn("textarea-component overflow-y-auto w-full resize-none text-[15px] font-fontRegular leading-[160%] font-normal min-h-[24px] align-top placeholder-shown:!truncate text-textColors-primaryColor ring-offset-background file:border-0 file:bg-transparent placeholder-shown:text-textColors-secondaryColor focus-visible:outline-none focus-visible:ring-0 disabled:cursor-not-allowed disabled:opacity-50 focus:border-coreColors-brandColorPrimary peer", { "pr-1": (textareaRef.current && maxHeight && textareaRef.current.scrollHeight >= maxHeight) }), style: { maxHeight: `${maxHeight}px` }, "data-text": "Enter text here", rows: 1, ref: textareaRef }, props)), label ? (_jsx("label", Object.assign({ htmlFor: id, style: { maxWidth: `-webkit-fill-available` }, className: "absolute truncate text-[10px] pr-4 text-textColors-secondaryColor top-2 z-10 h-4 origin-[0] start-4 opacity-100 peer-placeholder-shown:opacity-0" }, { children: label }))) : null] })));
|
|
52
|
+
});
|
|
53
|
+
Textarea.displayName = "Textarea";
|
|
54
|
+
export { Textarea };
|
package/dist/index.d.ts
CHANGED
|
@@ -37,6 +37,7 @@ export * from "./components/ui/quantity-picker";
|
|
|
37
37
|
export * from "./components/hooks/use-infinite-scroll";
|
|
38
38
|
export * from "./components/ui/subscription";
|
|
39
39
|
export * from "./components/ui/line-item-text-icons";
|
|
40
|
+
export * from "./components/ui/textarea";
|
|
40
41
|
export * from "./components/hooks/use-scroll-direction";
|
|
41
42
|
export * from "./components/ui/image";
|
|
42
43
|
export { cn, cva } from "./lib/utils";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AACA,cAAc,wBAAwB,CAAA;AACtC,cAAc,uBAAuB,CAAA;AACrC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,2BAA2B,CAAA;AACzC,cAAc,sBAAsB,CAAA;AACpC,cAAc,0BAA0B,CAAA;AACxC,cAAc,0BAA0B,CAAA;AACxC,cAAc,2BAA2B,CAAA;AACzC,cAAc,sBAAsB,CAAA;AACpC,cAAc,uBAAuB,CAAA;AACrC,cAAc,2BAA2B,CAAA;AACzC,cAAc,uBAAuB,CAAA;AACrC,cAAc,uBAAuB,CAAA;AACrC,cAAc,uBAAuB,CAAA;AACrC,cAAc,0BAA0B,CAAA;AACxC,cAAc,sBAAsB,CAAA;AACpC,cAAc,wBAAwB,CAAA;AACtC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,wBAAwB,CAAA;AACtC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,wBAAwB,CAAA;AACtC,cAAc,2BAA2B,CAAA;AACzC,cAAc,uBAAuB,CAAA;AACrC,cAAc,yBAAyB,CAAA;AACvC,cAAc,sBAAsB,CAAA;AACpC,cAAc,2BAA2B,CAAA;AACzC,cAAc,wBAAwB,CAAA;AACtC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,sBAAsB,CAAA;AACpC,cAAc,uBAAuB,CAAA;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cAAc,0BAA0B,CAAA;AACxC,cAAc,0BAA0B,CAAA;AACxC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,0BAA0B,CAAA;AACxC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,iCAAiC,CAAA;AAC/C,cAAc,wCAAwC,CAAA;AACtD,cAAc,8BAA8B,CAAA;AAC5C,cAAc,sCAAsC,CAAA;AACpD,cAAc,0BAA0B,CAAA;AACxC,cAAc,yCAAyC,CAAA;AACvD,cAAc,uBAAuB,CAAA;AACrC,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,MAAM,aAAa,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -38,6 +38,7 @@ export * from "./components/ui/quantity-picker";
|
|
|
38
38
|
export * from "./components/hooks/use-infinite-scroll";
|
|
39
39
|
export * from "./components/ui/subscription";
|
|
40
40
|
export * from "./components/ui/line-item-text-icons";
|
|
41
|
+
export * from "./components/ui/textarea";
|
|
41
42
|
export * from "./components/hooks/use-scroll-direction";
|
|
42
43
|
export * from "./components/ui/image";
|
|
43
44
|
export { cn, cva } from "./lib/utils";
|
package/dist/styles.css
CHANGED
|
@@ -385,10 +385,10 @@ video {
|
|
|
385
385
|
[hidden] {
|
|
386
386
|
display: none;
|
|
387
387
|
}
|
|
388
|
-
|
|
388
|
+
.no-scrollbar *:not(.textarea-component)::-webkit-scrollbar {
|
|
389
389
|
display: none;
|
|
390
390
|
}
|
|
391
|
-
|
|
391
|
+
.no-scrollbar *:not(.textarea-component) {
|
|
392
392
|
-ms-overflow-style: none; /* IE and Edge */
|
|
393
393
|
scrollbar-width: none; /* Firefox */
|
|
394
394
|
}
|
|
@@ -425,9 +425,12 @@ video {
|
|
|
425
425
|
|
|
426
426
|
--radius: 0.5rem;
|
|
427
427
|
|
|
428
|
-
--fontRegular: -apple-system, BlinkMacSystemFont,
|
|
429
|
-
|
|
430
|
-
--
|
|
428
|
+
--fontRegular: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
|
|
429
|
+
Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
|
430
|
+
--fontMedium: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
|
|
431
|
+
Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
|
432
|
+
--fontBold: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
|
|
433
|
+
Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
|
431
434
|
|
|
432
435
|
--coreColors-pageColor: #ffffff;
|
|
433
436
|
--coreColors-shadow: #000000;
|
|
@@ -454,12 +457,12 @@ video {
|
|
|
454
457
|
--buttonColors-primaryText: #ffffff;
|
|
455
458
|
--buttonColors-primaryFill: #000000;
|
|
456
459
|
--buttonColors-primaryOutline: #000000;
|
|
457
|
-
--buttonColors-primaryShadow: #
|
|
460
|
+
--buttonColors-primaryShadow: #000000;
|
|
458
461
|
--buttonColors-disabled: #707070;
|
|
459
462
|
--buttonColors-secondaryText: #000000;
|
|
460
463
|
--buttonColors-secondaryFill: #ffffff;
|
|
461
464
|
--buttonColors-secondaryOutline: #000000;
|
|
462
|
-
--buttonColors-secondaryShadow: #
|
|
465
|
+
--buttonColors-secondaryShadow: #000000;
|
|
463
466
|
|
|
464
467
|
--stateColors-disabled: #707070;
|
|
465
468
|
--stateColors-error: #d91e18ff;
|
|
@@ -477,6 +480,29 @@ video {
|
|
|
477
480
|
--productImage-aspectRatio: "2:3";
|
|
478
481
|
--productImage-scaling: cover;
|
|
479
482
|
--productImage-isCustom: "false";
|
|
483
|
+
|
|
484
|
+
--standard-shadow: 0px 5px 25px 0px rgba(0, 0, 0, 0.10);
|
|
485
|
+
}
|
|
486
|
+
.textarea-component::-webkit-scrollbar {
|
|
487
|
+
width: 4px;
|
|
488
|
+
}
|
|
489
|
+
.textarea-component::-webkit-scrollbar-thumb {
|
|
490
|
+
border-radius: 1.5rem;
|
|
491
|
+
background: var(--coreColors-secondaryIcon);
|
|
492
|
+
}
|
|
493
|
+
.textarea-component::-webkit-scrollbar-track {
|
|
494
|
+
border-radius: 1.5rem;
|
|
495
|
+
background: var(--coreColors-dividingLines);
|
|
496
|
+
}
|
|
497
|
+
.textarea-component::-moz-placeholder {
|
|
498
|
+
white-space: nowrap;
|
|
499
|
+
overflow: hidden;
|
|
500
|
+
text-overflow: ellipsis;
|
|
501
|
+
}
|
|
502
|
+
.textarea-component::placeholder {
|
|
503
|
+
white-space: nowrap;
|
|
504
|
+
overflow: hidden;
|
|
505
|
+
text-overflow: ellipsis;
|
|
480
506
|
}
|
|
481
507
|
|
|
482
508
|
/*.dark {*/
|
|
@@ -672,6 +698,15 @@ video {
|
|
|
672
698
|
.bottom-10 {
|
|
673
699
|
bottom: 2.5rem;
|
|
674
700
|
}
|
|
701
|
+
.bottom-2 {
|
|
702
|
+
bottom: 0.5rem;
|
|
703
|
+
}
|
|
704
|
+
.bottom-\[18px\] {
|
|
705
|
+
bottom: 18px;
|
|
706
|
+
}
|
|
707
|
+
.bottom-\[58px\] {
|
|
708
|
+
bottom: 58px;
|
|
709
|
+
}
|
|
675
710
|
.end-4 {
|
|
676
711
|
inset-inline-end: 1rem;
|
|
677
712
|
}
|
|
@@ -732,6 +767,10 @@ video {
|
|
|
732
767
|
.row-start-1 {
|
|
733
768
|
grid-row-start: 1;
|
|
734
769
|
}
|
|
770
|
+
.mx-1 {
|
|
771
|
+
margin-left: 0.25rem;
|
|
772
|
+
margin-right: 0.25rem;
|
|
773
|
+
}
|
|
735
774
|
.mx-4 {
|
|
736
775
|
margin-left: 1rem;
|
|
737
776
|
margin-right: 1rem;
|
|
@@ -806,9 +845,6 @@ video {
|
|
|
806
845
|
.aspect-\[2\/3\] {
|
|
807
846
|
aspect-ratio: 2/3;
|
|
808
847
|
}
|
|
809
|
-
.aspect-\[4\/5\] {
|
|
810
|
-
aspect-ratio: 4/5;
|
|
811
|
-
}
|
|
812
848
|
.aspect-productImages {
|
|
813
849
|
aspect-ratio: var(--productImage-aspectRatio);
|
|
814
850
|
}
|
|
@@ -824,6 +860,9 @@ video {
|
|
|
824
860
|
.h-1 {
|
|
825
861
|
height: 0.25rem;
|
|
826
862
|
}
|
|
863
|
+
.h-1\.5 {
|
|
864
|
+
height: 0.375rem;
|
|
865
|
+
}
|
|
827
866
|
.h-10 {
|
|
828
867
|
height: 2.5rem;
|
|
829
868
|
}
|
|
@@ -884,6 +923,15 @@ video {
|
|
|
884
923
|
.max-h-screen {
|
|
885
924
|
max-height: 100vh;
|
|
886
925
|
}
|
|
926
|
+
.min-h-\[24px\] {
|
|
927
|
+
min-height: 24px;
|
|
928
|
+
}
|
|
929
|
+
.w-1 {
|
|
930
|
+
width: 0.25rem;
|
|
931
|
+
}
|
|
932
|
+
.w-1\.5 {
|
|
933
|
+
width: 0.375rem;
|
|
934
|
+
}
|
|
887
935
|
.w-1\/2 {
|
|
888
936
|
width: 50%;
|
|
889
937
|
}
|
|
@@ -948,6 +996,9 @@ video {
|
|
|
948
996
|
.max-w-lg {
|
|
949
997
|
max-width: 32rem;
|
|
950
998
|
}
|
|
999
|
+
.max-w-xs {
|
|
1000
|
+
max-width: 20rem;
|
|
1001
|
+
}
|
|
951
1002
|
.flex-1 {
|
|
952
1003
|
flex: 1 1 0%;
|
|
953
1004
|
}
|
|
@@ -1021,6 +1072,9 @@ video {
|
|
|
1021
1072
|
-moz-user-select: none;
|
|
1022
1073
|
user-select: none;
|
|
1023
1074
|
}
|
|
1075
|
+
.resize-none {
|
|
1076
|
+
resize: none;
|
|
1077
|
+
}
|
|
1024
1078
|
.resize {
|
|
1025
1079
|
resize: both;
|
|
1026
1080
|
}
|
|
@@ -1189,6 +1243,9 @@ video {
|
|
|
1189
1243
|
.border-t {
|
|
1190
1244
|
border-top-width: 1px;
|
|
1191
1245
|
}
|
|
1246
|
+
.\!border-stateColors-error {
|
|
1247
|
+
border-color: var(--stateColors-error) !important;
|
|
1248
|
+
}
|
|
1192
1249
|
.border-black {
|
|
1193
1250
|
--tw-border-opacity: 1;
|
|
1194
1251
|
border-color: rgb(0 0 0 / var(--tw-border-opacity));
|
|
@@ -1290,22 +1347,14 @@ video {
|
|
|
1290
1347
|
background-image: linear-gradient(90deg,#ffffff00 0%,#FFF 100%);
|
|
1291
1348
|
}
|
|
1292
1349
|
.bg-fade-left {
|
|
1293
|
-
background-image: linear-gradient(to right,
|
|
1350
|
+
background-image: linear-gradient(to right, var(--coreColors-pageColor) 0%, #ffffff00 100%);;
|
|
1294
1351
|
}
|
|
1295
1352
|
.bg-fade-right {
|
|
1296
|
-
background-image: linear-gradient(to left,
|
|
1353
|
+
background-image: linear-gradient(to left, var(--coreColors-pageColor) 0%, #ffffff00 100%);;
|
|
1297
1354
|
}
|
|
1298
1355
|
.fill-current {
|
|
1299
1356
|
fill: currentColor;
|
|
1300
1357
|
}
|
|
1301
|
-
.object-contain {
|
|
1302
|
-
-o-object-fit: contain;
|
|
1303
|
-
object-fit: contain;
|
|
1304
|
-
}
|
|
1305
|
-
.object-cover {
|
|
1306
|
-
-o-object-fit: cover;
|
|
1307
|
-
object-fit: cover;
|
|
1308
|
-
}
|
|
1309
1358
|
.p-0 {
|
|
1310
1359
|
padding: 0px;
|
|
1311
1360
|
}
|
|
@@ -1384,12 +1433,24 @@ video {
|
|
|
1384
1433
|
.pb-8 {
|
|
1385
1434
|
padding-bottom: 2rem;
|
|
1386
1435
|
}
|
|
1436
|
+
.pl-0 {
|
|
1437
|
+
padding-left: 0px;
|
|
1438
|
+
}
|
|
1439
|
+
.pl-2 {
|
|
1440
|
+
padding-left: 0.5rem;
|
|
1441
|
+
}
|
|
1387
1442
|
.pl-4 {
|
|
1388
1443
|
padding-left: 1rem;
|
|
1389
1444
|
}
|
|
1390
1445
|
.pl-8 {
|
|
1391
1446
|
padding-left: 2rem;
|
|
1392
1447
|
}
|
|
1448
|
+
.pr-1 {
|
|
1449
|
+
padding-right: 0.25rem;
|
|
1450
|
+
}
|
|
1451
|
+
.pr-2 {
|
|
1452
|
+
padding-right: 0.5rem;
|
|
1453
|
+
}
|
|
1393
1454
|
.pr-4 {
|
|
1394
1455
|
padding-right: 1rem;
|
|
1395
1456
|
}
|
|
@@ -1405,6 +1466,9 @@ video {
|
|
|
1405
1466
|
.pt-5 {
|
|
1406
1467
|
padding-top: 1.25rem;
|
|
1407
1468
|
}
|
|
1469
|
+
.pt-6 {
|
|
1470
|
+
padding-top: 1.5rem;
|
|
1471
|
+
}
|
|
1408
1472
|
.text-left {
|
|
1409
1473
|
text-align: left;
|
|
1410
1474
|
}
|
|
@@ -1417,6 +1481,9 @@ video {
|
|
|
1417
1481
|
.text-start {
|
|
1418
1482
|
text-align: start;
|
|
1419
1483
|
}
|
|
1484
|
+
.align-top {
|
|
1485
|
+
vertical-align: top;
|
|
1486
|
+
}
|
|
1420
1487
|
.font-fontMedium {
|
|
1421
1488
|
font-family: var(--fontMedium);
|
|
1422
1489
|
}
|
|
@@ -1502,9 +1569,6 @@ video {
|
|
|
1502
1569
|
.text-buttonColors-primaryShadow {
|
|
1503
1570
|
color: var(--buttonColors-primaryShadow);
|
|
1504
1571
|
}
|
|
1505
|
-
.text-buttonColors-primaryShadowEnabled {
|
|
1506
|
-
color: var(--buttonColors-primaryShadowEnabled);
|
|
1507
|
-
}
|
|
1508
1572
|
.text-buttonColors-primaryText {
|
|
1509
1573
|
color: var(--buttonColors-primaryText);
|
|
1510
1574
|
}
|
|
@@ -1523,9 +1587,6 @@ video {
|
|
|
1523
1587
|
.text-buttonColors-secondaryShadow {
|
|
1524
1588
|
color: var(--buttonColors-secondaryShadow);
|
|
1525
1589
|
}
|
|
1526
|
-
.text-buttonColors-secondaryShadowEnabled {
|
|
1527
|
-
color: var(--buttonColors-secondaryShadowEnabled);
|
|
1528
|
-
}
|
|
1529
1590
|
.text-buttonColors-secondaryText {
|
|
1530
1591
|
color: var(--buttonColors-secondaryText);
|
|
1531
1592
|
}
|
|
@@ -1637,6 +1698,9 @@ video {
|
|
|
1637
1698
|
.opacity-100 {
|
|
1638
1699
|
opacity: 1;
|
|
1639
1700
|
}
|
|
1701
|
+
.opacity-50 {
|
|
1702
|
+
opacity: 0.5;
|
|
1703
|
+
}
|
|
1640
1704
|
.shadow-\[0_0_6px_0_rgba\(17\2c 17\2c 17\2c 0\.16\)\] {
|
|
1641
1705
|
--tw-shadow: 0 0 6px 0 rgba(17,17,17,0.16);
|
|
1642
1706
|
--tw-shadow-colored: 0 0 6px 0 var(--tw-shadow-color);
|
|
@@ -1647,12 +1711,26 @@ video {
|
|
|
1647
1711
|
--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);
|
|
1648
1712
|
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
|
1649
1713
|
}
|
|
1714
|
+
.shadow-primary {
|
|
1715
|
+
--tw-shadow: calc(var(--buttonColors-primaryShadowEnabled) * 0px) calc(var(--buttonColors-primaryShadowEnabled) * 5px) calc(var(--buttonColors-primaryShadowEnabled) * 25px) calc(var(--buttonColors-primaryShadowEnabled)* 0px) rgb(0, 0, 0, 0.10);;
|
|
1716
|
+
--tw-shadow-colored: calc(var(--buttonColors-primaryShadowEnabled) * 0px) calc(var(--buttonColors-primaryShadowEnabled) * 5px) calc(var(--buttonColors-primaryShadowEnabled) * 25px) calc(var(--buttonColors-primaryShadowEnabled)* 0px) rgb(0, 0, 0, 0.10);;
|
|
1717
|
+
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
|
1718
|
+
}
|
|
1719
|
+
.shadow-secondary {
|
|
1720
|
+
--tw-shadow: calc(var(--buttonColors-secondaryShadowEnabled) * 0px) calc(var(--buttonColors-secondaryShadowEnabled) * 5px) calc(var(--buttonColors-secondaryShadowEnabled) * 25px) calc(var(--buttonColors-secondaryShadowEnabled)* 0px) rgb(0, 0, 0, 0.10);;
|
|
1721
|
+
--tw-shadow-colored: calc(var(--buttonColors-secondaryShadowEnabled) * 0px) calc(var(--buttonColors-secondaryShadowEnabled) * 5px) calc(var(--buttonColors-secondaryShadowEnabled) * 25px) calc(var(--buttonColors-secondaryShadowEnabled)* 0px) rgb(0, 0, 0, 0.10);;
|
|
1722
|
+
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
|
1723
|
+
}
|
|
1650
1724
|
.shadow-buttonColors-primaryShadow {
|
|
1651
1725
|
--tw-shadow-color: var(--buttonColors-primaryShadow);
|
|
1652
1726
|
--tw-shadow: var(--tw-shadow-colored);
|
|
1653
1727
|
}
|
|
1654
|
-
.shadow-
|
|
1655
|
-
--tw-shadow-color: var(--
|
|
1728
|
+
.shadow-primary {
|
|
1729
|
+
--tw-shadow-color: hsl(var(--primary));
|
|
1730
|
+
--tw-shadow: var(--tw-shadow-colored);
|
|
1731
|
+
}
|
|
1732
|
+
.shadow-secondary {
|
|
1733
|
+
--tw-shadow-color: hsl(var(--secondary));
|
|
1656
1734
|
--tw-shadow: var(--tw-shadow-colored);
|
|
1657
1735
|
}
|
|
1658
1736
|
.outline-none {
|
|
@@ -1753,15 +1831,6 @@ video {
|
|
|
1753
1831
|
.ease-in-out {
|
|
1754
1832
|
animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
1755
1833
|
}
|
|
1756
|
-
/* Hide scrollbar for Chrome, Safari and Opera */
|
|
1757
|
-
.no-scrollbar *::-webkit-scrollbar {
|
|
1758
|
-
display: none;
|
|
1759
|
-
}
|
|
1760
|
-
/* Hide scrollbar for IE, Edge and Firefox */
|
|
1761
|
-
.no-scrollbar * {
|
|
1762
|
-
-ms-overflow-style: none; /* IE and Edge */
|
|
1763
|
-
scrollbar-width: none; /* Firefox */
|
|
1764
|
-
}
|
|
1765
1834
|
.container {
|
|
1766
1835
|
padding-right: 16px;
|
|
1767
1836
|
padding-left: 16px;
|
|
@@ -1794,12 +1863,34 @@ video {
|
|
|
1794
1863
|
.placeholder\:text-textColors-secondaryColor::placeholder {
|
|
1795
1864
|
color: var(--textColors-secondaryColor, #727272ff);
|
|
1796
1865
|
}
|
|
1866
|
+
.placeholder-shown\:\!truncate:-moz-placeholder-shown {
|
|
1867
|
+
overflow: hidden !important;
|
|
1868
|
+
text-overflow: ellipsis !important;
|
|
1869
|
+
white-space: nowrap !important;
|
|
1870
|
+
}
|
|
1871
|
+
.placeholder-shown\:\!truncate:placeholder-shown {
|
|
1872
|
+
overflow: hidden !important;
|
|
1873
|
+
text-overflow: ellipsis !important;
|
|
1874
|
+
white-space: nowrap !important;
|
|
1875
|
+
}
|
|
1797
1876
|
.placeholder-shown\:p-4:-moz-placeholder-shown {
|
|
1798
1877
|
padding: 1rem;
|
|
1799
1878
|
}
|
|
1800
1879
|
.placeholder-shown\:p-4:placeholder-shown {
|
|
1801
1880
|
padding: 1rem;
|
|
1802
1881
|
}
|
|
1882
|
+
.placeholder-shown\:text-textColors-secondaryColor:-moz-placeholder-shown {
|
|
1883
|
+
color: var(--textColors-secondaryColor, #727272ff);
|
|
1884
|
+
}
|
|
1885
|
+
.placeholder-shown\:text-textColors-secondaryColor:placeholder-shown {
|
|
1886
|
+
color: var(--textColors-secondaryColor, #727272ff);
|
|
1887
|
+
}
|
|
1888
|
+
.focus-within\:\!border-stateColors-error:focus-within {
|
|
1889
|
+
border-color: var(--stateColors-error) !important;
|
|
1890
|
+
}
|
|
1891
|
+
.focus-within\:border-coreColors-brandColorPrimary:focus-within {
|
|
1892
|
+
border-color: var(--coreColors-brandColorPrimary);
|
|
1893
|
+
}
|
|
1803
1894
|
.hover\:h-\[18px\]:hover {
|
|
1804
1895
|
height: 18px;
|
|
1805
1896
|
}
|
|
@@ -2194,9 +2285,24 @@ video {
|
|
|
2194
2285
|
.\[\&_\*\]\:text-coreColors-pageColor * {
|
|
2195
2286
|
color: var(--coreColors-pageColor);
|
|
2196
2287
|
}
|
|
2288
|
+
.\[\&_\*\]\:text-stateColors-error * {
|
|
2289
|
+
color: var(--stateColors-error);
|
|
2290
|
+
}
|
|
2197
2291
|
.\[\&_\*\]\:text-textColors-primaryColor * {
|
|
2198
2292
|
color: var(--textColors-primaryColor, #121212ff);
|
|
2199
2293
|
}
|
|
2294
|
+
.\[\&_\*\]\:placeholder\:text-stateColors-error *::-moz-placeholder {
|
|
2295
|
+
color: var(--stateColors-error);
|
|
2296
|
+
}
|
|
2297
|
+
.\[\&_\*\]\:placeholder\:text-stateColors-error *::placeholder {
|
|
2298
|
+
color: var(--stateColors-error);
|
|
2299
|
+
}
|
|
2300
|
+
.\[\&_label\]\:focus-within\:\!text-stateColors-error:focus-within label {
|
|
2301
|
+
color: var(--stateColors-error) !important;
|
|
2302
|
+
}
|
|
2303
|
+
.\[\&_label\]\:focus-within\:text-coreColors-brandColorPrimary:focus-within label {
|
|
2304
|
+
color: var(--coreColors-brandColorPrimary);
|
|
2305
|
+
}
|
|
2200
2306
|
.\[\&_p\]\:text-stateColors-disabled p {
|
|
2201
2307
|
color: var(--stateColors-disabled);
|
|
2202
2308
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tapcart/mobile-components",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"style": "dist/styles.css",
|
|
@@ -11,16 +11,6 @@
|
|
|
11
11
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
12
12
|
"author": "Tapcart Inc.",
|
|
13
13
|
"homepage": "https://tapcart.com",
|
|
14
|
-
"scripts": {
|
|
15
|
-
"lint": "eslint \"**/*.ts*\"",
|
|
16
|
-
"ui:add": "pnpm dlx shadcn-ui@latest add",
|
|
17
|
-
"build:styles": "postcss styles/globals.css -o dist/styles.css",
|
|
18
|
-
"build:ts": "tsc -p tsconfig.json && tsc-alias",
|
|
19
|
-
"build": "pnpm run build:ts && pnpm run build:styles",
|
|
20
|
-
"dev:ts": "tsc -w -p tsconfig.json",
|
|
21
|
-
"dev:styles": "npx tailwindcss -i styles/globals.css -o dist/styles.css --watch",
|
|
22
|
-
"dev": "concurrently \"pnpm run dev:ts\" \"pnpm run dev:styles\""
|
|
23
|
-
},
|
|
24
14
|
"peerDependencies": {
|
|
25
15
|
"react": "^17.0.2 || ^18.0.0",
|
|
26
16
|
"react-dom": "^17.0.2 || ^18.0.0"
|
|
@@ -31,15 +21,15 @@
|
|
|
31
21
|
"@types/react-dom": "^18.2.0",
|
|
32
22
|
"autoprefixer": "^10.4.14",
|
|
33
23
|
"chokidar-cli": "^3.0.0",
|
|
34
|
-
"app-studio-types": "workspace:*",
|
|
35
24
|
"concurrently": "^8.2.2",
|
|
36
25
|
"eslint": "^7.32.0",
|
|
37
|
-
"eslint-config-custom": "workspace:*",
|
|
38
26
|
"postcss": "^8.4.24",
|
|
39
27
|
"tailwindcss": "^3.3.2",
|
|
40
28
|
"tsc-alias": "^1.8.10",
|
|
41
|
-
"
|
|
42
|
-
"
|
|
29
|
+
"typescript": "^4.5.2",
|
|
30
|
+
"eslint-config-custom": "0.0.0",
|
|
31
|
+
"tsconfig": "0.0.0",
|
|
32
|
+
"app-studio-types": "0.0.0"
|
|
43
33
|
},
|
|
44
34
|
"dependencies": {
|
|
45
35
|
"@radix-ui/react-accordion": "^1.1.2",
|
|
@@ -70,5 +60,15 @@
|
|
|
70
60
|
"tailwind-merge": "^1.13.2",
|
|
71
61
|
"tailwindcss-animate": "^1.0.6",
|
|
72
62
|
"vaul": "^0.9.1"
|
|
63
|
+
},
|
|
64
|
+
"scripts": {
|
|
65
|
+
"lint": "eslint \"**/*.ts*\"",
|
|
66
|
+
"ui:add": "pnpm dlx shadcn-ui@latest add",
|
|
67
|
+
"build:styles": "postcss styles/globals.css -o dist/styles.css",
|
|
68
|
+
"build:ts": "tsc -p tsconfig.json && tsc-alias",
|
|
69
|
+
"build": "pnpm run build:ts && pnpm run build:styles",
|
|
70
|
+
"dev:ts": "tsc -w -p tsconfig.json",
|
|
71
|
+
"dev:styles": "npx tailwindcss -i styles/globals.css -o dist/styles.css --watch",
|
|
72
|
+
"dev": "concurrently \"pnpm run dev:ts\" \"pnpm run dev:styles\""
|
|
73
73
|
}
|
|
74
|
-
}
|
|
74
|
+
}
|