@tapcart/mobile-components 0.7.0 → 0.7.2
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-infinite-scroll.d.ts +3 -1
- package/dist/components/hooks/use-infinite-scroll.d.ts.map +1 -1
- package/dist/components/hooks/use-infinite-scroll.js +34 -11
- package/dist/components/hooks/use-nosto-recommendation.d.ts +8 -0
- package/dist/components/hooks/use-nosto-recommendation.d.ts.map +1 -0
- package/dist/components/hooks/use-nosto-recommendation.js +105 -0
- package/dist/components/hooks/use-products.d.ts +3 -1
- package/dist/components/hooks/use-products.d.ts.map +1 -1
- package/dist/components/hooks/use-products.js +21 -6
- package/dist/components/hooks/use-reviews.d.ts +27 -0
- package/dist/components/hooks/use-reviews.d.ts.map +1 -0
- package/dist/components/hooks/use-reviews.js +130 -0
- package/dist/components/templates/ProductCard/utils.d.ts +78 -0
- package/dist/components/templates/ProductCard/utils.d.ts.map +1 -0
- package/dist/components/templates/ProductCard/utils.js +128 -0
- package/dist/components/templates/ProductGrid/index.d.ts +1 -0
- package/dist/components/templates/ProductGrid/index.d.ts.map +1 -0
- package/dist/components/templates/ProductGrid/index.js +1 -0
- package/dist/components/ui/Input/input.d.ts +1 -1
- package/dist/components/ui/Input/input.d.ts.map +1 -1
- package/dist/components/ui/Input/input.js +23 -5
- package/dist/components/ui/Input/types.d.ts +3 -2
- package/dist/components/ui/Input/types.d.ts.map +1 -1
- package/dist/components/ui/Input/useInput.d.ts +2 -2
- package/dist/components/ui/Input/useInput.d.ts.map +1 -1
- package/dist/components/ui/Input/useInput.js +24 -10
- package/dist/components/ui/ProductCard/utils.d.ts +94 -0
- package/dist/components/ui/ProductCard/utils.d.ts.map +1 -0
- package/dist/components/ui/ProductCard/utils.js +148 -0
- package/dist/components/ui/ProductGrid/index.d.ts +1 -0
- package/dist/components/ui/ProductGrid/index.d.ts.map +1 -0
- package/dist/components/ui/ProductGrid/index.js +1 -0
- package/dist/components/ui/accordion.d.ts +3 -1
- package/dist/components/ui/accordion.d.ts.map +1 -1
- package/dist/components/ui/accordion.js +2 -2
- package/dist/components/ui/button.d.ts +2 -2
- package/dist/components/ui/button.d.ts.map +1 -1
- package/dist/components/ui/button.js +1 -1
- package/dist/components/ui/carousel.d.ts +1 -0
- package/dist/components/ui/carousel.d.ts.map +1 -1
- package/dist/components/ui/carousel.js +62 -2
- package/dist/components/ui/chip.d.ts +2 -2
- package/dist/components/ui/icon.d.ts +4 -1
- package/dist/components/ui/icon.d.ts.map +1 -1
- package/dist/components/ui/icon.js +35 -8
- package/dist/components/ui/image.d.ts.map +1 -1
- package/dist/components/ui/image.js +3 -3
- package/dist/components/ui/radio-group.d.ts +2 -2
- package/dist/components/ui/scroll-area.d.ts +1 -0
- package/dist/components/ui/scroll-area.d.ts.map +1 -1
- package/dist/components/ui/scroll-area.js +2 -2
- package/dist/components/ui/toast.d.ts +2 -2
- package/dist/components/ui/toggle-group.d.ts +2 -2
- package/dist/components/ui/toggle.d.ts +2 -2
- package/dist/index.d.ts +9 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -2
- package/dist/lib/price.d.ts +29 -0
- package/dist/lib/price.d.ts.map +1 -0
- package/dist/lib/price.js +66 -0
- package/dist/lib/utils.d.ts +18 -0
- package/dist/lib/utils.d.ts.map +1 -1
- package/dist/lib/utils.js +44 -1
- package/dist/styles.css +201 -727
- package/dist/tapcart-mobile-components.umd.js +44 -0
- package/package.json +4 -3
- package/dist/components/templates/product-card.d.ts +0 -33
- package/dist/components/templates/product-card.d.ts.map +0 -1
- package/dist/components/templates/product-card.js +0 -42
- package/dist/components/templates/product-grid.d.ts +0 -14
- package/dist/components/templates/product-grid.d.ts.map +0 -1
- package/dist/components/templates/product-grid.js +0 -22
- package/dist/components/ui/input.d.ts +0 -17
- package/dist/components/ui/input.d.ts.map +0 -1
- package/dist/components/ui/input.js +0 -35
- package/dist/components/ui/product-grid.d.ts +0 -15
- package/dist/components/ui/product-grid.d.ts.map +0 -1
- package/dist/components/ui/product-grid.js +0 -22
- package/dist/components/ui/select.d.ts +0 -14
- package/dist/components/ui/select.d.ts.map +0 -1
- package/dist/components/ui/select.js +0 -59
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../components/templates/ProductGrid/index.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { InputProps } from "
|
|
2
|
+
import { InputProps } from "../../../components/ui/Input/types";
|
|
3
3
|
declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
4
4
|
export { Input };
|
|
5
5
|
//# sourceMappingURL=input.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../../components/ui/Input/input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAA;
|
|
1
|
+
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../../components/ui/Input/input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAA;AAExD,QAAA,MAAM,KAAK,qFA+KV,CAAA;AAGD,OAAO,EAAE,KAAK,EAAE,CAAA"}
|
|
@@ -12,14 +12,15 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
13
|
import * as React from "react";
|
|
14
14
|
import { inputVariants, useInput } from "./useInput";
|
|
15
|
-
import { cn } from "../../../lib/utils";
|
|
15
|
+
import { cn, getColor } from "../../../lib/utils";
|
|
16
16
|
import { Icon } from "../icon";
|
|
17
17
|
const Input = React.forwardRef((_a, ref) => {
|
|
18
|
-
var { className, error = false, id, type, label, asChild, value, onChange, icon, iconPosition = "right", // Default to "right" for backward compatibility
|
|
19
|
-
iconColor, placeholder, placeholderFont, placeholderFontWeight, placeholderFontSize, placeholderTextAlign, placeholderTextColor, placeholderUpperCase, inputPadding, backgroundColor, borderRadius, inputBorderColor, borderSides, inputSpacing } = _a, props = __rest(_a, ["className", "error", "id", "type", "label", "asChild", "value", "onChange", "icon", "iconPosition", "iconColor", "placeholder", "placeholderFont", "placeholderFontWeight", "placeholderFontSize", "placeholderTextAlign", "placeholderTextColor", "placeholderUpperCase", "inputPadding", "backgroundColor", "borderRadius", "inputBorderColor", "borderSides", "inputSpacing"]);
|
|
18
|
+
var { className, error = false, id, type, label, asChild, value, onChange, icon, iconUrl, iconPosition = "right", // Default to "right" for backward compatibility
|
|
19
|
+
iconColor, placeholder, placeholderFont, placeholderFontWeight, placeholderFontSize, placeholderTextAlign, placeholderTextColor, placeholderUpperCase, inputPadding, backgroundColor, borderRadius, inputBorderColor, borderSides, inputSpacing } = _a, props = __rest(_a, ["className", "error", "id", "type", "label", "asChild", "value", "onChange", "icon", "iconUrl", "iconPosition", "iconColor", "placeholder", "placeholderFont", "placeholderFontWeight", "placeholderFontSize", "placeholderTextAlign", "placeholderTextColor", "placeholderUpperCase", "inputPadding", "backgroundColor", "borderRadius", "inputBorderColor", "borderSides", "inputSpacing"]);
|
|
20
20
|
const { Comp, inputPaddingRight, inputPaddingLeft, borderStyle, borderRadiusStyle, iconLeftPadding, iconRightPadding, iconTopPadding, iconBottomPadding, placeholderTextColorStyle, iconColorStyle, inputBgColor, inputBorderColorStyle, } = useInput({
|
|
21
21
|
asChild,
|
|
22
22
|
icon,
|
|
23
|
+
iconUrl,
|
|
23
24
|
iconPosition,
|
|
24
25
|
iconColor,
|
|
25
26
|
className,
|
|
@@ -31,7 +32,9 @@ const Input = React.forwardRef((_a, ref) => {
|
|
|
31
32
|
inputPadding,
|
|
32
33
|
placeholderTextColor,
|
|
33
34
|
});
|
|
34
|
-
return (_jsxs(Comp, Object.assign({ className: "relative flex items-center group" }, { children: [icon && iconPosition === "left" && (_jsx(Icon, { name: icon, "data-error": error, size: "sm", color: iconColorStyle !== "inherit"
|
|
35
|
+
return (_jsxs(Comp, Object.assign({ className: "relative flex items-center group" }, { children: [(icon || iconUrl) && iconPosition === "left" && (_jsx(Icon, { name: icon, url: iconUrl, "data-error": error, size: "sm", strokeColor: getColor(iconColor), color: iconColorStyle !== "inherit"
|
|
36
|
+
? undefined
|
|
37
|
+
: "coreColors-secondaryIcon", className: cn("flex items-center absolute aspect-square fill-current z-10 icon ", {
|
|
35
38
|
"w-5": true,
|
|
36
39
|
"text-stateColors-error": error,
|
|
37
40
|
}), style: {
|
|
@@ -43,7 +46,22 @@ const Input = React.forwardRef((_a, ref) => {
|
|
|
43
46
|
} })), _jsx("style", { children: `
|
|
44
47
|
.custom-placeholder-value::placeholder {
|
|
45
48
|
color: ${placeholderTextColorStyle};
|
|
46
|
-
}` }), _jsx("input", Object.assign({ placeholder: placeholder, value: value, onChange: (e) => onChange(e.target.value), id: id, type: type, className: cn(inputVariants({ error, hasLabel: !!label }), className, "custom-placeholder-value"), "data-icon": !!icon, ref: ref }, props, { style: Object.assign(Object.assign({ paddingLeft:
|
|
49
|
+
}` }), _jsx("input", Object.assign({ placeholder: placeholder, value: value, onChange: (e) => onChange(e.target.value), id: id, type: type, className: cn(inputVariants({ error, hasLabel: !!label }), className, "custom-placeholder-value"), "data-icon": !!icon, ref: ref }, props, { style: Object.assign(Object.assign({ paddingLeft: iconUrl &&
|
|
50
|
+
iconPosition === "left" &&
|
|
51
|
+
placeholderTextAlign === "center"
|
|
52
|
+
? undefined
|
|
53
|
+
: inputPaddingLeft, paddingRight: inputPaddingRight, fontFamily: placeholderFont, fontWeight: placeholderFontWeight, fontSize: `${placeholderFontSize}px`, textAlign: placeholderTextAlign, color: placeholderTextColorStyle, textTransform: placeholderUpperCase ? "uppercase" : undefined, borderColor: inputBorderColorStyle, paddingTop: inputPadding === null || inputPadding === void 0 ? void 0 : inputPadding.top, paddingBottom: inputPadding === null || inputPadding === void 0 ? void 0 : inputPadding.bottom, backgroundColor: inputBgColor }, borderStyle), (label ? { borderRadius: "8px" } : borderRadiusStyle)) })), label ? (_jsx("label", Object.assign({ htmlFor: id, className: cn("absolute text-[10px] text-textColors-secondaryColor group-active:text-coreColors-brandColorPrimary top-2 z-10 h-4 origin-[0] opacity-100 peer-placeholder-shown:opacity-0", iconPosition === "left" ? "start-10" : "start-4") }, { children: label }))) : null, (icon || iconUrl) && iconPosition === "right" && (_jsx(Icon, { name: icon, url: iconUrl, "data-error": error, size: "sm", strokeColor: getColor(iconColor), color: iconColorStyle !== "inherit"
|
|
54
|
+
? undefined
|
|
55
|
+
: "coreColors-secondaryIcon", className: cn("flex items-center absolute aspect-square fill-current z-10 icon ", {
|
|
56
|
+
"w-5": true,
|
|
57
|
+
"text-stateColors-error": error,
|
|
58
|
+
}), style: {
|
|
59
|
+
left: iconLeftPadding,
|
|
60
|
+
right: iconRightPadding,
|
|
61
|
+
top: iconTopPadding,
|
|
62
|
+
bottom: iconBottomPadding,
|
|
63
|
+
color: iconColorStyle,
|
|
64
|
+
} }))] })));
|
|
47
65
|
});
|
|
48
66
|
Input.displayName = "Input";
|
|
49
67
|
export { Input };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import type { VariantProps } from "class-variance-authority";
|
|
3
|
-
import { inputVariants } from "
|
|
4
|
-
import { Color } from "
|
|
3
|
+
import { inputVariants } from "../../../components/ui/Input/useInput";
|
|
4
|
+
import { Color } from "../../../lib/utils";
|
|
5
5
|
export type BorderSides = ("all" | "bottom" | "left" | "right" | "top")[];
|
|
6
6
|
export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange">, VariantProps<typeof inputVariants> {
|
|
7
7
|
id: string;
|
|
@@ -10,6 +10,7 @@ export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElem
|
|
|
10
10
|
value: string;
|
|
11
11
|
onChange: (value: string) => void;
|
|
12
12
|
icon?: string;
|
|
13
|
+
iconUrl?: string;
|
|
13
14
|
iconPosition?: "left" | "right";
|
|
14
15
|
iconColor?: Color;
|
|
15
16
|
placeholder: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../components/ui/Input/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAA;AAC9D,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../components/ui/Input/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAA;AAC9D,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AAEnC,MAAM,MAAM,WAAW,GAAG,CAAC,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,CAAC,EAAE,CAAA;AAEzE,MAAM,WAAW,UACf,SAAQ,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,UAAU,CAAC,EACnE,YAAY,CAAC,OAAO,aAAa,CAAC;IACpC,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACjC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;IAC/B,SAAS,CAAC,EAAE,KAAK,CAAA;IACjB,WAAW,EAAE,MAAM,CAAA;IACnB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,oBAAoB,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAA;IAClD,oBAAoB,CAAC,EAAE,KAAK,CAAA;IAC5B,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,eAAe,CAAC,EAAE,KAAK,CAAA;IACvB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,gBAAgB,CAAC,EAAE,KAAK,CAAA;IACxB,WAAW,CAAC,EAAE,WAAW,CAAA;IACzB,YAAY,CAAC,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAA;IAC3E,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { InputProps } from "
|
|
2
|
+
import { InputProps } from "../../../components/ui/Input/types";
|
|
3
3
|
export declare const DEFAULT_ICON_SIZE = 20;
|
|
4
4
|
export declare const DEFAULT_X_PADDING = 12;
|
|
5
5
|
export declare const DEFAULT_Y_PADDING = 8;
|
|
@@ -7,7 +7,7 @@ export declare const inputVariants: (props?: ({
|
|
|
7
7
|
hasLabel?: boolean | null | undefined;
|
|
8
8
|
error?: boolean | null | undefined;
|
|
9
9
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
10
|
-
export declare const useInput: (props: Pick<InputProps, "asChild" | "icon" | "iconPosition" | "iconColor" | "className" | "backgroundColor" | "borderRadius" | "inputBorderColor" | "borderSides" | "inputSpacing" | "inputPadding" | "placeholderTextColor">) => {
|
|
10
|
+
export declare const useInput: (props: Pick<InputProps, "asChild" | "icon" | "iconUrl" | "iconPosition" | "iconColor" | "className" | "backgroundColor" | "borderRadius" | "inputBorderColor" | "borderSides" | "inputSpacing" | "inputPadding" | "placeholderTextColor">) => {
|
|
11
11
|
Comp: string | import("react").ForwardRefExoticComponent<import("@radix-ui/react-slot").SlotProps & import("react").RefAttributes<HTMLElement>>;
|
|
12
12
|
inputPaddingRight: string | undefined;
|
|
13
13
|
inputPaddingLeft: string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useInput.d.ts","sourceRoot":"","sources":["../../../../components/ui/Input/useInput.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAA;AAGxD,eAAO,MAAM,iBAAiB,KAAK,CAAA;AACnC,eAAO,MAAM,iBAAiB,KAAK,CAAA;AACnC,eAAO,MAAM,iBAAiB,IAAI,CAAA;AAElC,eAAO,MAAM,aAAa;;;mFAkBzB,CAAA;AAED,eAAO,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"useInput.d.ts","sourceRoot":"","sources":["../../../../components/ui/Input/useInput.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAA;AAGxD,eAAO,MAAM,iBAAiB,KAAK,CAAA;AACnC,eAAO,MAAM,iBAAiB,KAAK,CAAA;AACnC,eAAO,MAAM,iBAAiB,IAAI,CAAA;AAElC,eAAO,MAAM,aAAa;;;mFAkBzB,CAAA;AAED,eAAO,MAAM,QAAQ,UACZ,KACL,UAAU,EACR,SAAS,GACT,MAAM,GACN,SAAS,GACT,cAAc,GACd,WAAW,GACX,WAAW,GACX,iBAAiB,GACjB,cAAc,GACd,kBAAkB,GAClB,aAAa,GACb,cAAc,GACd,cAAc,GACd,sBAAsB,CACzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwFF,CAAA"}
|
|
@@ -8,7 +8,7 @@ export const inputVariants = cva("flex w-full border border-coreColors-dividingL
|
|
|
8
8
|
variants: {
|
|
9
9
|
hasLabel: {
|
|
10
10
|
true: "h-14 px-4 rounded pt-5 pb-2 placeholder-shown:p-4",
|
|
11
|
-
false: "
|
|
11
|
+
false: "px-4 py-2",
|
|
12
12
|
},
|
|
13
13
|
error: {
|
|
14
14
|
true: "border-stateColors-error text-stateColors-error placeholder:text-stateColors-error focus:border-stateColors-error [&+label]:text-stateColors-error",
|
|
@@ -21,11 +21,15 @@ export const inputVariants = cva("flex w-full border border-coreColors-dividingL
|
|
|
21
21
|
},
|
|
22
22
|
});
|
|
23
23
|
export const useInput = (props) => {
|
|
24
|
-
const { asChild, icon, iconPosition = "right", // Default to "right" for backward compatibility
|
|
25
|
-
iconColor, placeholderTextColor, backgroundColor, borderRadius, inputBorderColor, borderSides = ["all"], inputPadding, inputSpacing
|
|
24
|
+
const { asChild, icon, iconUrl, iconPosition = "right", // Default to "right" for backward compatibility
|
|
25
|
+
iconColor, placeholderTextColor, backgroundColor, borderRadius, inputBorderColor, borderSides = ["all"], inputPadding, inputSpacing, } = props;
|
|
26
26
|
const Comp = asChild ? Slot : "div";
|
|
27
|
-
const inputPaddingRight = icon
|
|
28
|
-
|
|
27
|
+
const inputPaddingRight = (icon || iconUrl) && iconPosition === "right"
|
|
28
|
+
? (inputPadding === null || inputPadding === void 0 ? void 0 : inputPadding.right)
|
|
29
|
+
? `${inputPadding === null || inputPadding === void 0 ? void 0 : inputPadding.right}px`
|
|
30
|
+
: "2.5rem"
|
|
31
|
+
: undefined;
|
|
32
|
+
const inputPaddingLeft = (icon || iconUrl) && iconPosition === "left"
|
|
29
33
|
? (inputPadding === null || inputPadding === void 0 ? void 0 : inputPadding.left) !== undefined && inputSpacing
|
|
30
34
|
? `calc(${(inputPadding === null || inputPadding === void 0 ? void 0 : inputPadding.left) + inputSpacing + DEFAULT_ICON_SIZE}px)`
|
|
31
35
|
: (inputPadding === null || inputPadding === void 0 ? void 0 : inputPadding.left)
|
|
@@ -42,11 +46,21 @@ export const useInput = (props) => {
|
|
|
42
46
|
borderLeftWidth: borderSides.includes("left") ? "1px" : 0,
|
|
43
47
|
borderRightWidth: borderSides.includes("right") ? "1px" : 0,
|
|
44
48
|
};
|
|
45
|
-
const borderRadiusStyle = borderRadius
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
const
|
|
49
|
-
|
|
49
|
+
const borderRadiusStyle = borderRadius
|
|
50
|
+
? { borderRadius: `${borderRadius}px` }
|
|
51
|
+
: {};
|
|
52
|
+
const iconLeftPadding = (inputPadding === null || inputPadding === void 0 ? void 0 : inputPadding.left) !== undefined
|
|
53
|
+
? `${inputPadding.left}px`
|
|
54
|
+
: `${DEFAULT_X_PADDING}px`;
|
|
55
|
+
const iconRightPadding = (inputPadding === null || inputPadding === void 0 ? void 0 : inputPadding.right) !== undefined
|
|
56
|
+
? `${inputPadding.right}px`
|
|
57
|
+
: `${DEFAULT_X_PADDING}px`;
|
|
58
|
+
const iconTopPadding = (inputPadding === null || inputPadding === void 0 ? void 0 : inputPadding.top) !== undefined
|
|
59
|
+
? `${inputPadding.top}px`
|
|
60
|
+
: `${DEFAULT_Y_PADDING}px`;
|
|
61
|
+
const iconBottomPadding = (inputPadding === null || inputPadding === void 0 ? void 0 : inputPadding.bottom) !== undefined
|
|
62
|
+
? `${inputPadding.bottom}px`
|
|
63
|
+
: `${DEFAULT_Y_PADDING}px`;
|
|
50
64
|
const iconColorStyle = getColor(iconColor);
|
|
51
65
|
const inputBgColor = getColor(backgroundColor);
|
|
52
66
|
const inputBorderColorStyle = getColor(inputBorderColor);
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
interface ProductCardBadgeConfig {
|
|
2
|
+
variants: {
|
|
3
|
+
horizontalPosition: {
|
|
4
|
+
start: string;
|
|
5
|
+
end: string;
|
|
6
|
+
center: string;
|
|
7
|
+
};
|
|
8
|
+
verticalPosition: {
|
|
9
|
+
top: string;
|
|
10
|
+
bottom: string;
|
|
11
|
+
below: string;
|
|
12
|
+
};
|
|
13
|
+
imageSwipeEnabled: {
|
|
14
|
+
true: string;
|
|
15
|
+
false: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
compoundVariants: Array<{
|
|
19
|
+
verticalPosition: "bottom";
|
|
20
|
+
imageSwipeEnabled: true;
|
|
21
|
+
class: string;
|
|
22
|
+
}>;
|
|
23
|
+
}
|
|
24
|
+
export declare function getProductCardBadgeVariants(config?: Partial<ProductCardBadgeConfig>): (props?: ({
|
|
25
|
+
horizontalPosition?: "center" | "end" | "start" | null | undefined;
|
|
26
|
+
verticalPosition?: "top" | "bottom" | "below" | null | undefined;
|
|
27
|
+
imageSwipeEnabled?: boolean | null | undefined;
|
|
28
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
29
|
+
interface ProductCardFavoriteConfig {
|
|
30
|
+
variants: {
|
|
31
|
+
iconPosition: {
|
|
32
|
+
"top-left": string;
|
|
33
|
+
"top-right": string;
|
|
34
|
+
"bottom-left": string;
|
|
35
|
+
"bottom-right": string;
|
|
36
|
+
"below-image-on-right": string;
|
|
37
|
+
};
|
|
38
|
+
badgeHorizontalPosition: {
|
|
39
|
+
start: string;
|
|
40
|
+
end: string;
|
|
41
|
+
center: string;
|
|
42
|
+
};
|
|
43
|
+
badgeVerticalPosition: {
|
|
44
|
+
top: string;
|
|
45
|
+
bottom: string;
|
|
46
|
+
below: string;
|
|
47
|
+
};
|
|
48
|
+
isSoldOut: {
|
|
49
|
+
true: string;
|
|
50
|
+
false: string;
|
|
51
|
+
};
|
|
52
|
+
showSoldOutBadge: {
|
|
53
|
+
true: string;
|
|
54
|
+
false: string;
|
|
55
|
+
};
|
|
56
|
+
imageSwipeEnabled: {
|
|
57
|
+
true: string;
|
|
58
|
+
false: string;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
compoundVariants: Array<{
|
|
62
|
+
[key: string]: any;
|
|
63
|
+
class: string;
|
|
64
|
+
}>;
|
|
65
|
+
defaultVariants: {
|
|
66
|
+
iconPosition: "below-image-on-right";
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
export declare function getProductCardFavoriteVariants(config?: Partial<ProductCardFavoriteConfig>): (props?: ({
|
|
70
|
+
iconPosition?: "below-image-on-right" | "top-right" | "top-left" | "bottom-left" | "bottom-right" | null | undefined;
|
|
71
|
+
badgeHorizontalPosition?: "center" | "end" | "start" | null | undefined;
|
|
72
|
+
badgeVerticalPosition?: "top" | "bottom" | "below" | null | undefined;
|
|
73
|
+
isSoldOut?: boolean | null | undefined;
|
|
74
|
+
showSoldOutBadge?: boolean | null | undefined;
|
|
75
|
+
imageSwipeEnabled?: boolean | null | undefined;
|
|
76
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
77
|
+
type PageState = {
|
|
78
|
+
pageViewType: "collection" | "search";
|
|
79
|
+
};
|
|
80
|
+
export declare function getProductCardTranslations(pageState: PageState, translations: Record<string, string>): {
|
|
81
|
+
gridTranslations: {
|
|
82
|
+
title: string;
|
|
83
|
+
description: string;
|
|
84
|
+
buttonLabel: string;
|
|
85
|
+
};
|
|
86
|
+
productCardTranslations: {
|
|
87
|
+
quickAdd: string;
|
|
88
|
+
soldOut: string;
|
|
89
|
+
addToBag: string;
|
|
90
|
+
viewItem: string;
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
export {};
|
|
94
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../components/ui/ProductCard/utils.ts"],"names":[],"mappings":"AAEA,UAAU,sBAAsB;IAC9B,QAAQ,EAAE;QACR,kBAAkB,EAAE;YAClB,KAAK,EAAE,MAAM,CAAA;YACb,GAAG,EAAE,MAAM,CAAA;YACX,MAAM,EAAE,MAAM,CAAA;SACf,CAAA;QACD,gBAAgB,EAAE;YAChB,GAAG,EAAE,MAAM,CAAA;YACX,MAAM,EAAE,MAAM,CAAA;YACd,KAAK,EAAE,MAAM,CAAA;SACd,CAAA;QACD,iBAAiB,EAAE;YACjB,IAAI,EAAE,MAAM,CAAA;YACZ,KAAK,EAAE,MAAM,CAAA;SACd,CAAA;KACF,CAAA;IACD,gBAAgB,EAAE,KAAK,CAAC;QACtB,gBAAgB,EAAE,QAAQ,CAAA;QAC1B,iBAAiB,EAAE,IAAI,CAAA;QACvB,KAAK,EAAE,MAAM,CAAA;KACd,CAAC,CAAA;CACH;AAED,wBAAgB,2BAA2B,CACzC,MAAM,GAAE,OAAO,CAAC,sBAAsB,CAAM;;;;oFAgC7C;AAED,UAAU,yBAAyB;IACjC,QAAQ,EAAE;QACR,YAAY,EAAE;YACZ,UAAU,EAAE,MAAM,CAAA;YAClB,WAAW,EAAE,MAAM,CAAA;YACnB,aAAa,EAAE,MAAM,CAAA;YACrB,cAAc,EAAE,MAAM,CAAA;YACtB,sBAAsB,EAAE,MAAM,CAAA;SAC/B,CAAA;QACD,uBAAuB,EAAE;YACvB,KAAK,EAAE,MAAM,CAAA;YACb,GAAG,EAAE,MAAM,CAAA;YACX,MAAM,EAAE,MAAM,CAAA;SACf,CAAA;QACD,qBAAqB,EAAE;YACrB,GAAG,EAAE,MAAM,CAAA;YACX,MAAM,EAAE,MAAM,CAAA;YACd,KAAK,EAAE,MAAM,CAAA;SACd,CAAA;QACD,SAAS,EAAE;YACT,IAAI,EAAE,MAAM,CAAA;YACZ,KAAK,EAAE,MAAM,CAAA;SACd,CAAA;QACD,gBAAgB,EAAE;YAChB,IAAI,EAAE,MAAM,CAAA;YACZ,KAAK,EAAE,MAAM,CAAA;SACd,CAAA;QACD,iBAAiB,EAAE;YACjB,IAAI,EAAE,MAAM,CAAA;YACZ,KAAK,EAAE,MAAM,CAAA;SACd,CAAA;KACF,CAAA;IACD,gBAAgB,EAAE,KAAK,CAAC;QACtB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;QAClB,KAAK,EAAE,MAAM,CAAA;KACd,CAAC,CAAA;IACF,eAAe,EAAE;QACf,YAAY,EAAE,sBAAsB,CAAA;KACrC,CAAA;CACF;AAED,wBAAgB,8BAA8B,CAC5C,MAAM,GAAE,OAAO,CAAC,yBAAyB,CAAM;;;;;;;oFAuGhD;AAED,KAAK,SAAS,GAAG;IAAE,YAAY,EAAE,YAAY,GAAG,QAAQ,CAAA;CAAE,CAAA;AAE1D,wBAAgB,0BAA0B,CACxC,SAAS,EAAE,SAAS,EACpB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;;;;;;;;;;;;EAuBrC"}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { cva } from "../../../lib/utils";
|
|
2
|
+
export function getProductCardBadgeVariants(config = {}) {
|
|
3
|
+
const defaultConfig = {
|
|
4
|
+
variants: {
|
|
5
|
+
horizontalPosition: {
|
|
6
|
+
start: "left-0",
|
|
7
|
+
end: "right-0",
|
|
8
|
+
center: "",
|
|
9
|
+
},
|
|
10
|
+
verticalPosition: {
|
|
11
|
+
top: "top-0 mt-2",
|
|
12
|
+
bottom: "bottom-0 mb-2",
|
|
13
|
+
below: "",
|
|
14
|
+
},
|
|
15
|
+
imageSwipeEnabled: {
|
|
16
|
+
true: "",
|
|
17
|
+
false: "",
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
compoundVariants: [
|
|
21
|
+
{
|
|
22
|
+
verticalPosition: "bottom",
|
|
23
|
+
imageSwipeEnabled: true,
|
|
24
|
+
class: "bottom-[18px]",
|
|
25
|
+
},
|
|
26
|
+
],
|
|
27
|
+
};
|
|
28
|
+
return cva("absolute truncate pointer-events-none", Object.assign(Object.assign({}, defaultConfig), config));
|
|
29
|
+
}
|
|
30
|
+
export function getProductCardFavoriteVariants(config = {}) {
|
|
31
|
+
const defaultConfig = {
|
|
32
|
+
variants: {
|
|
33
|
+
iconPosition: {
|
|
34
|
+
"top-left": "top-0 left-2 mt-2",
|
|
35
|
+
"top-right": "top-0 right-2 mt-2",
|
|
36
|
+
"bottom-left": "bottom-0 left-2 mb-2",
|
|
37
|
+
"bottom-right": "bottom-0 right-2 mb-2",
|
|
38
|
+
"below-image-on-right": "",
|
|
39
|
+
},
|
|
40
|
+
badgeHorizontalPosition: {
|
|
41
|
+
start: "",
|
|
42
|
+
end: "",
|
|
43
|
+
center: "",
|
|
44
|
+
},
|
|
45
|
+
badgeVerticalPosition: {
|
|
46
|
+
top: "",
|
|
47
|
+
bottom: "",
|
|
48
|
+
below: "",
|
|
49
|
+
},
|
|
50
|
+
isSoldOut: {
|
|
51
|
+
true: "",
|
|
52
|
+
false: "",
|
|
53
|
+
},
|
|
54
|
+
showSoldOutBadge: {
|
|
55
|
+
true: "",
|
|
56
|
+
false: "",
|
|
57
|
+
},
|
|
58
|
+
imageSwipeEnabled: {
|
|
59
|
+
true: "",
|
|
60
|
+
false: "",
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
compoundVariants: [
|
|
64
|
+
{
|
|
65
|
+
iconPosition: "top-left",
|
|
66
|
+
badgeHorizontalPosition: ["start", "center"],
|
|
67
|
+
badgeVerticalPosition: "top",
|
|
68
|
+
showSoldOutBadge: false,
|
|
69
|
+
class: "top-10",
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
iconPosition: "top-right",
|
|
73
|
+
badgeHorizontalPosition: ["end", "center"],
|
|
74
|
+
badgeVerticalPosition: "top",
|
|
75
|
+
class: "top-10",
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
iconPosition: "bottom-left",
|
|
79
|
+
badgeHorizontalPosition: ["start", "center"],
|
|
80
|
+
badgeVerticalPosition: "bottom",
|
|
81
|
+
class: "bottom-10",
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
iconPosition: "bottom-right",
|
|
85
|
+
badgeHorizontalPosition: ["end", "center"],
|
|
86
|
+
badgeVerticalPosition: "bottom",
|
|
87
|
+
class: "bottom-10",
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
iconPosition: "bottom-left",
|
|
91
|
+
showSoldOutBadge: true,
|
|
92
|
+
class: "bottom-10",
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
iconPosition: ["bottom-left", "bottom-right"],
|
|
96
|
+
imageSwipeEnabled: true,
|
|
97
|
+
class: "bottom-[18px]",
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
iconPosition: "bottom-left",
|
|
101
|
+
badgeHorizontalPosition: ["start", "center"],
|
|
102
|
+
badgeVerticalPosition: "bottom",
|
|
103
|
+
isSoldOut: false,
|
|
104
|
+
showSoldOutBadge: false,
|
|
105
|
+
imageSwipeEnabled: true,
|
|
106
|
+
class: "bottom-[58px]",
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
iconPosition: "bottom-right",
|
|
110
|
+
badgeHorizontalPosition: ["end", "center"],
|
|
111
|
+
badgeVerticalPosition: "bottom",
|
|
112
|
+
showSoldOutBadge: false,
|
|
113
|
+
imageSwipeEnabled: true,
|
|
114
|
+
class: "bottom-[58px]",
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
iconPosition: "bottom-left",
|
|
118
|
+
showSoldOutBadge: true,
|
|
119
|
+
imageSwipeEnabled: true,
|
|
120
|
+
class: "bottom-[58px]",
|
|
121
|
+
},
|
|
122
|
+
],
|
|
123
|
+
defaultVariants: {
|
|
124
|
+
iconPosition: "below-image-on-right",
|
|
125
|
+
},
|
|
126
|
+
};
|
|
127
|
+
return cva("absolute ", Object.assign(Object.assign({}, defaultConfig), config));
|
|
128
|
+
}
|
|
129
|
+
export function getProductCardTranslations(pageState, translations) {
|
|
130
|
+
const gridTranslations = pageState.pageViewType === "collection"
|
|
131
|
+
? {
|
|
132
|
+
title: translations["collection-empty-title"],
|
|
133
|
+
description: translations["collection-empty-message"],
|
|
134
|
+
buttonLabel: translations["collection-empty-button"],
|
|
135
|
+
}
|
|
136
|
+
: {
|
|
137
|
+
title: translations["product-search-empty-title"],
|
|
138
|
+
description: translations["product-search-empty-message"],
|
|
139
|
+
buttonLabel: translations["product-search-empty-button"],
|
|
140
|
+
};
|
|
141
|
+
const productCardTranslations = {
|
|
142
|
+
quickAdd: translations["collection-product-quick-add"],
|
|
143
|
+
soldOut: translations["collection-product-sold-out"],
|
|
144
|
+
addToBag: translations["quick-add-add"],
|
|
145
|
+
viewItem: translations["quick-add-view"],
|
|
146
|
+
};
|
|
147
|
+
return { gridTranslations, productCardTranslations };
|
|
148
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../components/ui/ProductGrid/index.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -5,6 +5,8 @@ declare const AccordionItem: React.ForwardRefExoticComponent<Omit<AccordionPrimi
|
|
|
5
5
|
declare const AccordionTrigger: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & {
|
|
6
6
|
showDefaultIcon?: boolean | undefined;
|
|
7
7
|
} & React.RefAttributes<HTMLButtonElement>>;
|
|
8
|
-
declare const AccordionContent: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionContentProps & React.RefAttributes<HTMLDivElement>, "ref"> &
|
|
8
|
+
declare const AccordionContent: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
9
|
+
contentClassName: string;
|
|
10
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
9
11
|
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
|
|
10
12
|
//# sourceMappingURL=accordion.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accordion.d.ts","sourceRoot":"","sources":["../../../components/ui/accordion.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,kBAAkB,MAAM,2BAA2B,CAAA;AAK/D,QAAA,MAAM,SAAS,8JAA0B,CAAA;AAEzC,QAAA,MAAM,aAAa,iKASjB,CAAA;AAGF,QAAA,MAAM,gBAAgB;;2CA4BpB,CAAA;AAGF,QAAA,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"accordion.d.ts","sourceRoot":"","sources":["../../../components/ui/accordion.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,kBAAkB,MAAM,2BAA2B,CAAA;AAK/D,QAAA,MAAM,SAAS,8JAA0B,CAAA;AAEzC,QAAA,MAAM,aAAa,iKASjB,CAAA;AAGF,QAAA,MAAM,gBAAgB;;2CA4BpB,CAAA;AAGF,QAAA,MAAM,gBAAgB;sBAGA,MAAM;wCAU1B,CAAA;AAIF,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,CAAA"}
|
|
@@ -27,8 +27,8 @@ const AccordionTrigger = React.forwardRef((_a, ref) => {
|
|
|
27
27
|
});
|
|
28
28
|
AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
|
|
29
29
|
const AccordionContent = React.forwardRef((_a, ref) => {
|
|
30
|
-
var { className, children } = _a, props = __rest(_a, ["className", "children"]);
|
|
31
|
-
return (_jsx(AccordionPrimitive.Content, Object.assign({ ref: ref, className: "px-4 overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down" }, props, { children: _jsx("div", Object.assign({ className: cn("pb-4 pt-0", className) }, { children: children })) })));
|
|
30
|
+
var { className, children, contentClassName } = _a, props = __rest(_a, ["className", "children", "contentClassName"]);
|
|
31
|
+
return (_jsx(AccordionPrimitive.Content, Object.assign({ ref: ref, className: cn("px-4 overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down", contentClassName) }, props, { children: _jsx("div", Object.assign({ className: cn("pb-4 pt-0", className) }, { children: children })) })));
|
|
32
32
|
});
|
|
33
33
|
AccordionContent.displayName = AccordionPrimitive.Content.displayName;
|
|
34
34
|
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
|
|
@@ -2,8 +2,8 @@ import * as React from "react";
|
|
|
2
2
|
import { type VariantProps } from "class-variance-authority";
|
|
3
3
|
import { Color, TextStyle, BackgroundAndPadding } from "../../lib/utils";
|
|
4
4
|
declare const buttonVariants: (props?: ({
|
|
5
|
-
size?: "
|
|
6
|
-
variant?: "
|
|
5
|
+
size?: "default" | "sm" | "lg" | "content" | "icon" | null | undefined;
|
|
6
|
+
variant?: "default" | "link" | "destructive" | "outline" | "secondary" | "ghost" | "quickadd" | "applePay" | "shopPay" | null | undefined;
|
|
7
7
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
8
8
|
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
9
9
|
asChild?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../components/ui/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AACjE,OAAO,EAGL,KAAK,EAEL,SAAS,EAET,oBAAoB,EACrB,MAAM,iBAAiB,CAAA;AAIxB,QAAA,MAAM,cAAc;;;mFAgCnB,CAAA;AAwCD,MAAM,WAAW,WACf,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EACnD,YAAY,CAAC,OAAO,cAAc,CAAC;IACrC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,UAAU,CAAC,EAAE,KAAK,CAAC,aAAa,GAAG,SAAS,CAAA;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CAChC;AAED,QAAA,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../components/ui/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AACjE,OAAO,EAGL,KAAK,EAEL,SAAS,EAET,oBAAoB,EACrB,MAAM,iBAAiB,CAAA;AAIxB,QAAA,MAAM,cAAc;;;mFAgCnB,CAAA;AAwCD,MAAM,WAAW,WACf,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EACnD,YAAY,CAAC,OAAO,cAAc,CAAC;IACrC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,UAAU,CAAC,EAAE,KAAK,CAAC,aAAa,GAAG,SAAS,CAAA;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CAChC;AAED,QAAA,MAAM,MAAM,uFA4FX,CAAA;AAGD,QAAA,MAAM,cAAc,iBACJ,SAAS,GACrB,oBAAoB,GAAG;IACrB,SAAS,EAAE,KAAK,CAAA;IAChB,WAAW,EAAE;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,CAAA;IAC5B,gBAAgB,EAAE,OAAO,CAAA;CAC1B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkBJ,CAAA;AAED,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,cAAc,EAAE,CAAA"}
|
|
@@ -81,7 +81,7 @@ const labelVariants = cva("truncate", {
|
|
|
81
81
|
const Button = React.forwardRef((_a, ref) => {
|
|
82
82
|
var { className, labelClassName, labelStyle, variant, size, asChild = false, loading, icon, iconColor, iconStrokeColor, iconPosition, iconSize, iconUrl, iconClassName } = _a, props = __rest(_a, ["className", "labelClassName", "labelStyle", "variant", "size", "asChild", "loading", "icon", "iconColor", "iconStrokeColor", "iconPosition", "iconSize", "iconUrl", "iconClassName"]);
|
|
83
83
|
const Comp = asChild ? Slot : "button";
|
|
84
|
-
const IconButton = () => icon || iconUrl ? (_jsx(Icon, { name: icon, size: "sm", style: { color: iconColor } })) : null;
|
|
84
|
+
const IconButton = () => icon || iconUrl ? (_jsx(Icon, { name: icon, url: iconUrl, size: "sm", style: { color: iconColor, stroke: iconColor, fill: iconColor } })) : null;
|
|
85
85
|
const BasicButton = () => (_jsxs(_Fragment, { children: [icon || iconUrl ? (_jsx(Icon, { name: iconUrl ? undefined : icon, url: iconUrl, size: iconSize || variant === "quickadd" ? "xs" : "sm", className: cn(iconVariants({ variant }), {
|
|
86
86
|
"mr-2": iconPosition === "left",
|
|
87
87
|
"ml-2": iconPosition === "right",
|
|
@@ -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;
|
|
1
|
+
{"version":3,"file":"carousel.d.ts","sourceRoot":"","sources":["../../../components/ui/carousel.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,gBAAgB,EAAE,EACvB,KAAK,oBAAoB,EAC1B,MAAM,sBAAsB,CAAA;AAS7B,KAAK,WAAW,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAA;AAC1C,KAAK,qBAAqB,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAChE,KAAK,eAAe,GAAG,qBAAqB,CAAC,CAAC,CAAC,CAAA;AAC/C,KAAK,cAAc,GAAG,qBAAqB,CAAC,CAAC,CAAC,CAAA;AAE9C,KAAK,aAAa,GAAG;IACnB,IAAI,CAAC,EAAE,eAAe,CAAA;IACtB,OAAO,CAAC,EAAE,cAAc,CAAA;IACxB,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAA;IACvC,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,WAAW,KAAK,IAAI,CAAA;IACnC,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,IAAI,CAAA;CAC/C,CAAA;AA0BD,QAAA,MAAM,QAAQ,6HAuIb,CAAA;AAGD,QAAA,MAAM,eAAe,6GAmBnB,CAAA;AAGF,QAAA,MAAM,YAAY,6GAmBhB,CAAA;AAGF,QAAA,MAAM,gBAAgB,kLA0BpB,CAAA;AAGF,QAAA,MAAM,YAAY,kLA0BhB,CAAA;AAGF,KAAK,iBAAiB,GAAG;IACvB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,QAAA,MAAM,YAAY,iIAqDjB,CAAA;AA8DD,OAAO,EACL,KAAK,WAAW,EAChB,QAAQ,EACR,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,YAAY,EACZ,YAAY,GACb,CAAA"}
|