@tapcart/mobile-components 0.9.1 → 0.9.3
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/wishlist-select.d.ts +54 -0
- package/dist/components/ui/wishlist-select.d.ts.map +1 -1
- package/dist/components/ui/wishlist-select.js +88 -12
- package/dist/components/ui/wishlist.d.ts +29 -1
- package/dist/components/ui/wishlist.d.ts.map +1 -1
- package/dist/components/ui/wishlist.js +57 -20
- package/dist/lib/utils.d.ts +5 -5
- package/dist/lib/utils.d.ts.map +1 -1
- package/dist/styles.css +0 -16
- package/package.json +1 -1
|
@@ -1,5 +1,53 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
import { Color } from "../../lib/utils";
|
|
2
3
|
import { Translations } from "app-studio-types";
|
|
4
|
+
interface WishlistSelectStyleConfig {
|
|
5
|
+
triggerBackgroundColor?: Color;
|
|
6
|
+
triggerBorderColor?: Color;
|
|
7
|
+
triggerCornerRadius?: number;
|
|
8
|
+
triggerPadding?: {
|
|
9
|
+
top: number;
|
|
10
|
+
bottom: number;
|
|
11
|
+
left: number;
|
|
12
|
+
right: number;
|
|
13
|
+
};
|
|
14
|
+
dropdownIcon?: {
|
|
15
|
+
url: string;
|
|
16
|
+
assetID?: string | null;
|
|
17
|
+
};
|
|
18
|
+
dropdownIconColor?: Color;
|
|
19
|
+
dropdownIconSize?: "xxs" | "xs" | "sm" | "md" | "lg" | null | undefined;
|
|
20
|
+
contentBackgroundColor?: Color;
|
|
21
|
+
contentBorderColor?: Color;
|
|
22
|
+
contentCornerRadius?: number;
|
|
23
|
+
contentMaxHeight?: number;
|
|
24
|
+
defaultImageIcon?: {
|
|
25
|
+
url: string;
|
|
26
|
+
assetID?: string | null;
|
|
27
|
+
};
|
|
28
|
+
defaultImageBackground?: Color;
|
|
29
|
+
defaultImageIconColor?: Color;
|
|
30
|
+
imageLeftBorderRadius?: number;
|
|
31
|
+
imageRightBorderRadius?: number;
|
|
32
|
+
itemHoverColor?: Color;
|
|
33
|
+
itemSelectedColor?: Color;
|
|
34
|
+
itemDividerColor?: Color;
|
|
35
|
+
nameTextColor?: Color;
|
|
36
|
+
nameFont?: {
|
|
37
|
+
family: string;
|
|
38
|
+
weight: string;
|
|
39
|
+
};
|
|
40
|
+
nameSize?: number;
|
|
41
|
+
countTextColor?: Color;
|
|
42
|
+
countFont?: {
|
|
43
|
+
family: string;
|
|
44
|
+
weight: string;
|
|
45
|
+
};
|
|
46
|
+
countSize?: number;
|
|
47
|
+
createNewTextColor?: Color;
|
|
48
|
+
createNewBackgroundColor?: Color;
|
|
49
|
+
createNewBorderColor?: Color;
|
|
50
|
+
}
|
|
3
51
|
interface SelectProps<T> {
|
|
4
52
|
children: React.ReactElement<{
|
|
5
53
|
value: T;
|
|
@@ -7,6 +55,7 @@ interface SelectProps<T> {
|
|
|
7
55
|
isTrigger?: boolean;
|
|
8
56
|
isSelected?: boolean;
|
|
9
57
|
translations: Translations;
|
|
58
|
+
styleConfig?: WishlistSelectStyleConfig;
|
|
10
59
|
children: ({ isTrigger, translations, }: {
|
|
11
60
|
isTrigger: boolean;
|
|
12
61
|
translations: Translations;
|
|
@@ -17,27 +66,32 @@ interface SelectProps<T> {
|
|
|
17
66
|
onOpenChange?: (isOpen: boolean) => void;
|
|
18
67
|
onCreateNew?: () => void;
|
|
19
68
|
translations: Translations;
|
|
69
|
+
styleConfig?: WishlistSelectStyleConfig;
|
|
20
70
|
}
|
|
21
71
|
declare const WishlistSelect: React.ForwardRefExoticComponent<SelectProps<unknown> & React.RefAttributes<HTMLDivElement>>;
|
|
22
72
|
interface SelectTriggerProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
23
73
|
isTrigger?: boolean;
|
|
24
74
|
children: React.ReactNode;
|
|
75
|
+
styleConfig?: WishlistSelectStyleConfig;
|
|
25
76
|
}
|
|
26
77
|
declare const WishlistSelectTrigger: React.ForwardRefExoticComponent<SelectTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
27
78
|
interface SelectContentProps {
|
|
28
79
|
children: React.ReactNode;
|
|
29
80
|
isOpen: boolean;
|
|
30
81
|
className?: string;
|
|
82
|
+
styleConfig?: WishlistSelectStyleConfig;
|
|
31
83
|
}
|
|
32
84
|
declare const WishlistSelectContent: React.ForwardRefExoticComponent<SelectContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
33
85
|
interface SelectItemProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "children"> {
|
|
34
86
|
onSelect?: () => void;
|
|
35
87
|
isSelected?: boolean;
|
|
36
88
|
isTrigger?: boolean;
|
|
89
|
+
styleConfig?: WishlistSelectStyleConfig;
|
|
37
90
|
children: React.ReactNode | (({ isTrigger }: {
|
|
38
91
|
isTrigger: boolean;
|
|
39
92
|
}) => React.ReactNode);
|
|
40
93
|
}
|
|
41
94
|
declare const WishlistSelectItem: React.ForwardRefExoticComponent<SelectItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
42
95
|
export { WishlistSelect, WishlistSelectTrigger, WishlistSelectContent, WishlistSelectItem, };
|
|
96
|
+
export type { WishlistSelectStyleConfig };
|
|
43
97
|
//# sourceMappingURL=wishlist-select.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wishlist-select.d.ts","sourceRoot":"","sources":["../../../components/ui/wishlist-select.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"wishlist-select.d.ts","sourceRoot":"","sources":["../../../components/ui/wishlist-select.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAgB,KAAK,EAA2B,MAAM,iBAAiB,CAAA;AAG9E,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAE/C,UAAU,yBAAyB;IACjC,sBAAsB,CAAC,EAAE,KAAK,CAAA;IAC9B,kBAAkB,CAAC,EAAE,KAA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AAA,MAAM,qBAAqB,8FAwCzB,CAAA;AAGF,UAAU,kBAAkB;IAC1B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,MAAM,EAAE,OAAO,CAAA;IACf,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,WAAW,CAAC,EAAE,yBAAyB,CAAA;CACxC;AAED,QAAA,MAAM,qBAAqB,2FAgCzB,CAAA;AAGF,UAAU,eACR,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC;IAC9D,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,WAAW,CAAC,EAAE,yBAAyB,CAAA;IACvC,QAAQ,EACJ,KAAK,CAAC,SAAS,GACf,CAAC,CAAC,EAAE,SAAS,EAAE,EAAE;QAAE,SAAS,EAAE,OAAO,CAAA;KAAE,KAAK,KAAK,CAAC,SAAS,CAAC,CAAA;CACjE;AAED,QAAA,MAAM,kBAAkB,wFA8CvB,CAAA;AAGD,OAAO,EACL,cAAc,EACd,qBAAqB,EACrB,qBAAqB,EACrB,kBAAkB,GACnB,CAAA;AAED,YAAY,EAAE,yBAAyB,EAAE,CAAA"}
|
|
@@ -13,9 +13,11 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
13
13
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
14
|
import * as React from "react";
|
|
15
15
|
import { ChevronDown } from "lucide-react";
|
|
16
|
-
import { cn } from "../../lib/utils";
|
|
16
|
+
import { cn, getColor } from "../../lib/utils";
|
|
17
17
|
import { CreateNew, Wishlist } from "./wishlist";
|
|
18
|
-
|
|
18
|
+
import { Icon } from "./icon";
|
|
19
|
+
const WishlistSelect = React.forwardRef(({ children, defaultValue, onChange, onOpenChange, onCreateNew, translations, styleConfig, }, ref) => {
|
|
20
|
+
var _a, _b, _c, _d, _e;
|
|
19
21
|
const [isOpen, setIsOpen] = React.useState(false);
|
|
20
22
|
const [selectedValue, setSelectedValue] = React.useState(defaultValue);
|
|
21
23
|
const triggerRef = React.useRef(null);
|
|
@@ -55,33 +57,107 @@ const WishlistSelect = React.forwardRef(({ children, defaultValue, onChange, onO
|
|
|
55
57
|
};
|
|
56
58
|
const selectedChild = React.Children.toArray(children).find((child) => React.isValidElement(child) &&
|
|
57
59
|
child.props.value === selectedValue);
|
|
58
|
-
return (_jsxs("div", Object.assign({ className: "relative", ref: ref }, { children: [_jsxs(WishlistSelectTrigger, Object.assign({ ref: triggerRef, onClick: handleToggle }, { children: [_jsx(WishlistSelectItem, Object.assign({ isTrigger: true }, { children: selectedChild ? (selectedChild.props.children({ isTrigger: true, translations })) : (_jsx(Wishlist, { name: translations["wishlist-multiple-create-text-field-placeholder"], isTrigger: true, translations: translations
|
|
60
|
+
return (_jsxs("div", Object.assign({ className: "relative", ref: ref }, { children: [_jsxs(WishlistSelectTrigger, Object.assign({ ref: triggerRef, onClick: handleToggle, styleConfig: styleConfig }, { children: [_jsx(WishlistSelectItem, Object.assign({ isTrigger: true, styleConfig: styleConfig }, { children: selectedChild ? (selectedChild.props.children({ isTrigger: true, translations })) : (_jsx(Wishlist, { name: translations["wishlist-multiple-create-text-field-placeholder"], isTrigger: true, translations: translations, nameStyle: (styleConfig === null || styleConfig === void 0 ? void 0 : styleConfig.nameTextColor)
|
|
61
|
+
? {
|
|
62
|
+
color: getColor(styleConfig.nameTextColor),
|
|
63
|
+
fontFamily: ((_a = styleConfig.nameFont) === null || _a === void 0 ? void 0 : _a.family) !== "unset"
|
|
64
|
+
? (_b = styleConfig.nameFont) === null || _b === void 0 ? void 0 : _b.family
|
|
65
|
+
: undefined,
|
|
66
|
+
fontWeight: ((_c = styleConfig.nameFont) === null || _c === void 0 ? void 0 : _c.weight) !== "unset"
|
|
67
|
+
? (_d = styleConfig.nameFont) === null || _d === void 0 ? void 0 : _d.weight
|
|
68
|
+
: undefined,
|
|
69
|
+
fontSize: styleConfig.nameSize
|
|
70
|
+
? `${styleConfig.nameSize}px`
|
|
71
|
+
: undefined,
|
|
72
|
+
}
|
|
73
|
+
: undefined })) })), ((_e = styleConfig === null || styleConfig === void 0 ? void 0 : styleConfig.dropdownIcon) === null || _e === void 0 ? void 0 : _e.url) ? (_jsx(Icon, { url: styleConfig.dropdownIcon.url, size: styleConfig.dropdownIconSize || "md", color: getColor(styleConfig.dropdownIconColor) ||
|
|
74
|
+
"var(--coreColors-secondaryIcon)", className: cn("mr-4 transition-transform duration-200 ease-in-out opacity-50", isOpen && "transform rotate-180") })) : (_jsx(ChevronDown, { className: cn("h-4 w-4 opacity-50 mr-4 transition-transform duration-200 ease-in-out", isOpen && "transform rotate-180"), style: {
|
|
75
|
+
color: getColor(styleConfig === null || styleConfig === void 0 ? void 0 : styleConfig.dropdownIconColor) || undefined,
|
|
76
|
+
width: (styleConfig === null || styleConfig === void 0 ? void 0 : styleConfig.dropdownIconSize)
|
|
77
|
+
? `${styleConfig.dropdownIconSize}px`
|
|
78
|
+
: undefined,
|
|
79
|
+
height: (styleConfig === null || styleConfig === void 0 ? void 0 : styleConfig.dropdownIconSize)
|
|
80
|
+
? `${styleConfig.dropdownIconSize}px`
|
|
81
|
+
: undefined,
|
|
82
|
+
} }))] })), _jsxs(WishlistSelectContent, Object.assign({ isOpen: isOpen, ref: contentRef, styleConfig: styleConfig }, { children: [React.Children.map(children, (child) => React.isValidElement(child)
|
|
59
83
|
? React.cloneElement(child, {
|
|
60
84
|
onSelect: () => handleSelect(child.props.value),
|
|
61
85
|
isSelected: child.props.value === selectedValue,
|
|
62
86
|
translations,
|
|
87
|
+
styleConfig,
|
|
63
88
|
}, child.props.children({ isTrigger: false, translations }))
|
|
64
|
-
: child), _jsx("div", Object.assign({ className: "sticky bottom-0
|
|
89
|
+
: child), _jsx("div", Object.assign({ className: "sticky bottom-0 border-t", style: {
|
|
90
|
+
backgroundColor: getColor(styleConfig === null || styleConfig === void 0 ? void 0 : styleConfig.createNewBackgroundColor) ||
|
|
91
|
+
"var(--coreColors-inputBackground)",
|
|
92
|
+
borderColor: getColor(styleConfig === null || styleConfig === void 0 ? void 0 : styleConfig.createNewBorderColor) ||
|
|
93
|
+
"var(--coreColors-dividingLines)",
|
|
94
|
+
} }, { children: _jsx(CreateNew, { onClick: handleCreateNew, translations: translations, styleConfig: styleConfig }) }))] }))] })));
|
|
65
95
|
});
|
|
66
96
|
WishlistSelect.displayName = "WishlistSelect";
|
|
67
97
|
const WishlistSelectTrigger = React.forwardRef((_a, ref) => {
|
|
68
|
-
var
|
|
69
|
-
|
|
98
|
+
var _b, _c, _d, _e;
|
|
99
|
+
var { className, children, isTrigger = false, styleConfig } = _a, props = __rest(_a, ["className", "children", "isTrigger", "styleConfig"]);
|
|
100
|
+
return (_jsx("button", Object.assign({ ref: ref, className: cn("flex w-full items-center justify-between text-sm disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1", className), style: {
|
|
70
101
|
WebkitTapHighlightColor: "transparent",
|
|
102
|
+
backgroundColor: getColor(styleConfig === null || styleConfig === void 0 ? void 0 : styleConfig.triggerBackgroundColor) ||
|
|
103
|
+
"var(--coreColors-inputBackground)",
|
|
104
|
+
borderColor: getColor(styleConfig === null || styleConfig === void 0 ? void 0 : styleConfig.triggerBorderColor) ||
|
|
105
|
+
"var(--coreColors-brandColorPrimary)",
|
|
106
|
+
borderWidth: "1px",
|
|
107
|
+
borderStyle: "solid",
|
|
108
|
+
borderRadius: (styleConfig === null || styleConfig === void 0 ? void 0 : styleConfig.triggerCornerRadius)
|
|
109
|
+
? `${styleConfig.triggerCornerRadius}px`
|
|
110
|
+
: "6px",
|
|
111
|
+
paddingTop: ((_b = styleConfig === null || styleConfig === void 0 ? void 0 : styleConfig.triggerPadding) === null || _b === void 0 ? void 0 : _b.top)
|
|
112
|
+
? `${styleConfig.triggerPadding.top}px`
|
|
113
|
+
: "8px",
|
|
114
|
+
paddingBottom: ((_c = styleConfig === null || styleConfig === void 0 ? void 0 : styleConfig.triggerPadding) === null || _c === void 0 ? void 0 : _c.bottom)
|
|
115
|
+
? `${styleConfig.triggerPadding.bottom}px`
|
|
116
|
+
: "8px",
|
|
117
|
+
paddingLeft: ((_d = styleConfig === null || styleConfig === void 0 ? void 0 : styleConfig.triggerPadding) === null || _d === void 0 ? void 0 : _d.left)
|
|
118
|
+
? `${styleConfig.triggerPadding.left}px`
|
|
119
|
+
: "12px",
|
|
120
|
+
paddingRight: ((_e = styleConfig === null || styleConfig === void 0 ? void 0 : styleConfig.triggerPadding) === null || _e === void 0 ? void 0 : _e.right)
|
|
121
|
+
? `${styleConfig.triggerPadding.right}px`
|
|
122
|
+
: "12px",
|
|
71
123
|
} }, props, { children: children })));
|
|
72
124
|
});
|
|
73
125
|
WishlistSelectTrigger.displayName = "WishlistSelectTrigger";
|
|
74
126
|
const WishlistSelectContent = React.forwardRef((_a, ref) => {
|
|
75
|
-
var { className, children, isOpen } = _a, props = __rest(_a, ["className", "children", "isOpen"]);
|
|
76
|
-
return (_jsx("div", Object.assign({ ref: ref, className: cn("mt-1 absolute z-50 w-full
|
|
127
|
+
var { className, children, isOpen, styleConfig } = _a, props = __rest(_a, ["className", "children", "isOpen", "styleConfig"]);
|
|
128
|
+
return (_jsx("div", Object.assign({ ref: ref, className: cn("mt-1 absolute z-50 w-full overflow-y-auto shadow-md border", "transition-all duration-300 ease-in-out", isOpen
|
|
77
129
|
? "opacity-100 translate-y-0"
|
|
78
|
-
: "opacity-0 translate-y-[-10px] pointer-events-none", className)
|
|
130
|
+
: "opacity-0 translate-y-[-10px] pointer-events-none", className), style: {
|
|
131
|
+
backgroundColor: getColor(styleConfig === null || styleConfig === void 0 ? void 0 : styleConfig.contentBackgroundColor) ||
|
|
132
|
+
"var(--coreColors-inputBackground)",
|
|
133
|
+
borderColor: getColor(styleConfig === null || styleConfig === void 0 ? void 0 : styleConfig.contentBorderColor) ||
|
|
134
|
+
"var(--coreColors-brandColorPrimary)",
|
|
135
|
+
borderRadius: (styleConfig === null || styleConfig === void 0 ? void 0 : styleConfig.contentCornerRadius)
|
|
136
|
+
? `${styleConfig.contentCornerRadius}px`
|
|
137
|
+
: "6px",
|
|
138
|
+
maxHeight: (styleConfig === null || styleConfig === void 0 ? void 0 : styleConfig.contentMaxHeight)
|
|
139
|
+
? `${styleConfig.contentMaxHeight}px`
|
|
140
|
+
: "200px",
|
|
141
|
+
} }, props, { children: children })));
|
|
79
142
|
});
|
|
80
143
|
WishlistSelectContent.displayName = "WishlistSelectContent";
|
|
81
144
|
const WishlistSelectItem = React.forwardRef((_a, ref) => {
|
|
82
|
-
var { className, children, onSelect, isSelected, isTrigger } = _a, props = __rest(_a, ["className", "children", "onSelect", "isSelected", "isTrigger"]);
|
|
83
|
-
return (_jsx("div", Object.assign({ ref: ref, className: cn("relative flex w-full cursor-pointer select-none items-center text-sm outline-none", !isTrigger &&
|
|
84
|
-
|
|
145
|
+
var { className, children, onSelect, isSelected, isTrigger, styleConfig } = _a, props = __rest(_a, ["className", "children", "onSelect", "isSelected", "isTrigger", "styleConfig"]);
|
|
146
|
+
return (_jsx("div", Object.assign({ ref: ref, className: cn("relative flex w-full cursor-pointer select-none items-center text-sm outline-none", !isTrigger && "border-b last:border-b-0", className), style: {
|
|
147
|
+
backgroundColor: isSelected
|
|
148
|
+
? getColor(styleConfig === null || styleConfig === void 0 ? void 0 : styleConfig.itemSelectedColor) ||
|
|
149
|
+
"var(--stateColors-skeleton)"
|
|
150
|
+
: undefined,
|
|
151
|
+
borderBottomColor: !isTrigger
|
|
152
|
+
? getColor(styleConfig === null || styleConfig === void 0 ? void 0 : styleConfig.itemDividerColor) ||
|
|
153
|
+
"var(--coreColors-dividingLines)"
|
|
154
|
+
: undefined,
|
|
155
|
+
}, onClick: onSelect, role: "button", tabIndex: 0, onKeyDown: (e) => {
|
|
156
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
157
|
+
e.preventDefault();
|
|
158
|
+
onSelect === null || onSelect === void 0 ? void 0 : onSelect();
|
|
159
|
+
}
|
|
160
|
+
} }, props, { children: typeof children === "function"
|
|
85
161
|
? children({ isTrigger: isTrigger || false })
|
|
86
162
|
: children })));
|
|
87
163
|
});
|
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
import { Color } from "../../lib/utils";
|
|
2
3
|
import { Translations } from "app-studio-types";
|
|
4
|
+
interface WishlistStyleConfig {
|
|
5
|
+
nameTextColor?: Color;
|
|
6
|
+
nameFont?: {
|
|
7
|
+
family: string;
|
|
8
|
+
weight: string;
|
|
9
|
+
};
|
|
10
|
+
nameSize?: number;
|
|
11
|
+
countTextColor?: Color;
|
|
12
|
+
countFont?: {
|
|
13
|
+
family: string;
|
|
14
|
+
weight: string;
|
|
15
|
+
};
|
|
16
|
+
countSize?: number;
|
|
17
|
+
createNewTextColor?: Color;
|
|
18
|
+
defaultImageIcon?: {
|
|
19
|
+
url: string;
|
|
20
|
+
assetID?: string | null;
|
|
21
|
+
};
|
|
22
|
+
defaultImageBackground?: Color;
|
|
23
|
+
defaultImageIconColor?: Color;
|
|
24
|
+
imageLeftBorderRadius?: number;
|
|
25
|
+
imageRightBorderRadius?: number;
|
|
26
|
+
}
|
|
3
27
|
export interface WishlistProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
4
28
|
name?: string;
|
|
5
29
|
amount?: number;
|
|
@@ -15,17 +39,21 @@ export interface WishlistProps extends React.ButtonHTMLAttributes<HTMLButtonElem
|
|
|
15
39
|
translations: Translations;
|
|
16
40
|
nameStyle?: React.CSSProperties;
|
|
17
41
|
amountStyle?: React.CSSProperties;
|
|
42
|
+
styleConfig?: WishlistStyleConfig;
|
|
18
43
|
}
|
|
19
|
-
declare const PlaceholderIcon: ({ rightBorderRadius, leftBorderRadius, }: {
|
|
44
|
+
declare const PlaceholderIcon: ({ rightBorderRadius, leftBorderRadius, styleConfig, }: {
|
|
20
45
|
rightBorderRadius?: number | undefined;
|
|
21
46
|
leftBorderRadius?: number | undefined;
|
|
47
|
+
styleConfig?: WishlistStyleConfig | undefined;
|
|
22
48
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
23
49
|
declare const Wishlist: React.ForwardRefExoticComponent<WishlistProps & React.RefAttributes<HTMLButtonElement>>;
|
|
24
50
|
export interface CreateNewProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
25
51
|
selected?: boolean;
|
|
26
52
|
className?: string;
|
|
27
53
|
translations: Translations;
|
|
54
|
+
styleConfig?: WishlistStyleConfig;
|
|
28
55
|
}
|
|
29
56
|
declare const CreateNew: React.ForwardRefExoticComponent<CreateNewProps & React.RefAttributes<HTMLButtonElement>>;
|
|
30
57
|
export { CreateNew, Wishlist, PlaceholderIcon };
|
|
58
|
+
export type { WishlistStyleConfig };
|
|
31
59
|
//# sourceMappingURL=wishlist.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wishlist.d.ts","sourceRoot":"","sources":["../../../components/ui/wishlist.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"wishlist.d.ts","sourceRoot":"","sources":["../../../components/ui/wishlist.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAgB,KAAK,EAAE,MAAM,iBAAiB,CAAA;AAErD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAE/C,UAAU,mBAAmB;IAC3B,aAAa,CAAC,EAAE,KAAK,CAAA;IACrB,QAAQ,CAAC,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAA;IAC7C,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,cAAc,CAAC,EAAE,KAAK,CAAA;IACtB,SAAS,CAAC,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,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CAAC;IACrD,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,YAAY,EAAE,YAAY,CAAA;IAC1B,WAAW,CAAC,EAAE,mBAAmB,CAAA;CAClC;AAED,QAAA,MAAM,SAAS,0FAuCd,CAAA;AAID,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,eAAe,EAAE,CAAA;AAC/C,YAAY,EAAE,mBAAmB,EAAE,CAAA"}
|
|
@@ -13,36 +13,73 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
13
13
|
/* eslint-disable @next/next/no-img-element */
|
|
14
14
|
import * as React from "react";
|
|
15
15
|
import { Text } from "./text";
|
|
16
|
-
import { cn } from "../../lib/utils";
|
|
16
|
+
import { cn, getColor } from "../../lib/utils";
|
|
17
17
|
import { Icon } from "./icon";
|
|
18
|
-
const PlaceholderIcon = ({ rightBorderRadius, leftBorderRadius, }) =>
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
18
|
+
const PlaceholderIcon = ({ rightBorderRadius, leftBorderRadius, styleConfig, }) => {
|
|
19
|
+
var _a;
|
|
20
|
+
// Use styleConfig border radius if available, otherwise fall back to the passed border radius props
|
|
21
|
+
const effectiveRightBorderRadius = (styleConfig === null || styleConfig === void 0 ? void 0 : styleConfig.imageRightBorderRadius) !== undefined
|
|
22
|
+
? styleConfig.imageRightBorderRadius
|
|
23
|
+
: rightBorderRadius !== null && rightBorderRadius !== void 0 ? rightBorderRadius : 4;
|
|
24
|
+
const effectiveLeftBorderRadius = (styleConfig === null || styleConfig === void 0 ? void 0 : styleConfig.imageLeftBorderRadius) !== undefined
|
|
25
|
+
? styleConfig.imageLeftBorderRadius
|
|
26
|
+
: leftBorderRadius !== null && leftBorderRadius !== void 0 ? leftBorderRadius : 0;
|
|
27
|
+
return (_jsx("div", Object.assign({ className: "flex items-center justify-center h-10 w-10", style: {
|
|
28
|
+
flex: "0 1 auto",
|
|
29
|
+
backgroundColor: getColor(styleConfig === null || styleConfig === void 0 ? void 0 : styleConfig.defaultImageBackground) ||
|
|
30
|
+
"var(--stateColors-skeleton)",
|
|
31
|
+
borderTopRightRadius: `${effectiveRightBorderRadius}px`,
|
|
32
|
+
borderBottomRightRadius: `${effectiveRightBorderRadius}px`,
|
|
33
|
+
borderTopLeftRadius: `${effectiveLeftBorderRadius}px`,
|
|
34
|
+
borderBottomLeftRadius: `${effectiveLeftBorderRadius}px`,
|
|
35
|
+
} }, { children: ((_a = styleConfig === null || styleConfig === void 0 ? void 0 : styleConfig.defaultImageIcon) === null || _a === void 0 ? void 0 : _a.url) ? (_jsx(Icon, { url: styleConfig.defaultImageIcon.url, size: "sm", color: getColor(styleConfig.defaultImageIconColor) ||
|
|
36
|
+
"var(--coreColors-secondaryIcon)" })) : (_jsx(Icon, { name: "heart-filled", size: "sm", color: getColor(styleConfig === null || styleConfig === void 0 ? void 0 : styleConfig.defaultImageIconColor) ||
|
|
37
|
+
"coreColors-secondaryIcon" })) })));
|
|
38
|
+
};
|
|
25
39
|
const Wishlist = React.forwardRef((_a, ref) => {
|
|
26
|
-
var
|
|
40
|
+
var _b, _c, _d, _e, _f, _g, _h, _j;
|
|
41
|
+
var { selected = false, onClick, className, name, amount, imgUrl, imgRightBorderRadius = 4, imgLeftBorderRadius = 0, aspectRatio, objectFit, isTrigger, translations, nameStyle, amountStyle, styleConfig } = _a, props = __rest(_a, ["selected", "onClick", "className", "name", "amount", "imgUrl", "imgRightBorderRadius", "imgLeftBorderRadius", "aspectRatio", "objectFit", "isTrigger", "translations", "nameStyle", "amountStyle", "styleConfig"]);
|
|
42
|
+
// Calculate effective border radius values (manifest takes priority)
|
|
43
|
+
const effectiveRightBorderRadius = (styleConfig === null || styleConfig === void 0 ? void 0 : styleConfig.imageRightBorderRadius) !== undefined
|
|
44
|
+
? styleConfig.imageRightBorderRadius
|
|
45
|
+
: imgRightBorderRadius !== null && imgRightBorderRadius !== void 0 ? imgRightBorderRadius : 4;
|
|
46
|
+
const effectiveLeftBorderRadius = (styleConfig === null || styleConfig === void 0 ? void 0 : styleConfig.imageLeftBorderRadius) !== undefined
|
|
47
|
+
? styleConfig.imageLeftBorderRadius
|
|
48
|
+
: imgLeftBorderRadius !== null && imgLeftBorderRadius !== void 0 ? imgLeftBorderRadius : 0;
|
|
27
49
|
return (_jsxs("button", Object.assign({ className: cn("flex flex-row items-center px-4 py-2 w-full ", selected ? "bg-stateColors-skeleton" : "", className), ref: ref, onClick: onClick }, props, { children: [imgUrl ? (_jsx("div", Object.assign({ className: "h-10 w-10 border border-coreColors-dividingLines overflow-hidden", style: {
|
|
28
50
|
flex: "0 1 auto",
|
|
29
|
-
borderTopRightRadius: `${
|
|
30
|
-
borderBottomRightRadius: `${
|
|
31
|
-
borderTopLeftRadius: `${
|
|
32
|
-
borderBottomLeftRadius: `${
|
|
51
|
+
borderTopRightRadius: `${effectiveRightBorderRadius}px`,
|
|
52
|
+
borderBottomRightRadius: `${effectiveRightBorderRadius}px`,
|
|
53
|
+
borderTopLeftRadius: `${effectiveLeftBorderRadius}px`,
|
|
54
|
+
borderBottomLeftRadius: `${effectiveLeftBorderRadius}px`,
|
|
33
55
|
} }, { children: _jsx("img", { alt: "wishlist-image", src: `${imgUrl}?width=40`, width: 40, height: 40, className: cn("w-full h-full", objectFit === "contain" ? "object-contain" : "object-cover"), style: {
|
|
34
|
-
borderTopRightRadius: `${
|
|
35
|
-
borderBottomRightRadius: `${
|
|
36
|
-
borderTopLeftRadius: `${
|
|
37
|
-
borderBottomLeftRadius: `${
|
|
38
|
-
} }) }))) : (_jsx(PlaceholderIcon, { rightBorderRadius: imgRightBorderRadius, leftBorderRadius: imgLeftBorderRadius })), _jsxs("div", Object.assign({ className: "flex flex-col flex-1 items-start mx-2 overflow-hidden" }, { children: [isTrigger && _jsx(Text, Object.assign({ type: "body-secondary" }, { children: "Wishlists" })), _jsx(Text, Object.assign({ type: "body-secondary", className: "w-full overflow-hidden text-ellipsis whitespace-nowrap text-left", style:
|
|
56
|
+
borderTopRightRadius: `${effectiveRightBorderRadius}px`,
|
|
57
|
+
borderBottomRightRadius: `${effectiveRightBorderRadius}px`,
|
|
58
|
+
borderTopLeftRadius: `${effectiveLeftBorderRadius}px`,
|
|
59
|
+
borderBottomLeftRadius: `${effectiveLeftBorderRadius}px`,
|
|
60
|
+
} }) }))) : (_jsx(PlaceholderIcon, { rightBorderRadius: imgRightBorderRadius, leftBorderRadius: imgLeftBorderRadius, styleConfig: styleConfig })), _jsxs("div", Object.assign({ className: "flex flex-col flex-1 items-start mx-2 overflow-hidden" }, { children: [isTrigger && _jsx(Text, Object.assign({ type: "body-secondary" }, { children: "Wishlists" })), _jsx(Text, Object.assign({ type: "body-secondary", className: "w-full overflow-hidden text-ellipsis whitespace-nowrap text-left", style: Object.assign(Object.assign({}, nameStyle), { color: (nameStyle === null || nameStyle === void 0 ? void 0 : nameStyle.color) || getColor(styleConfig === null || styleConfig === void 0 ? void 0 : styleConfig.nameTextColor), fontFamily: ((_b = styleConfig === null || styleConfig === void 0 ? void 0 : styleConfig.nameFont) === null || _b === void 0 ? void 0 : _b.family) !== "unset"
|
|
61
|
+
? (_c = styleConfig === null || styleConfig === void 0 ? void 0 : styleConfig.nameFont) === null || _c === void 0 ? void 0 : _c.family
|
|
62
|
+
: nameStyle === null || nameStyle === void 0 ? void 0 : nameStyle.fontFamily, fontWeight: ((_d = styleConfig === null || styleConfig === void 0 ? void 0 : styleConfig.nameFont) === null || _d === void 0 ? void 0 : _d.weight) !== "unset"
|
|
63
|
+
? (_e = styleConfig === null || styleConfig === void 0 ? void 0 : styleConfig.nameFont) === null || _e === void 0 ? void 0 : _e.weight
|
|
64
|
+
: nameStyle === null || nameStyle === void 0 ? void 0 : nameStyle.fontWeight, fontSize: (styleConfig === null || styleConfig === void 0 ? void 0 : styleConfig.nameSize)
|
|
65
|
+
? `${styleConfig.nameSize}px`
|
|
66
|
+
: nameStyle === null || nameStyle === void 0 ? void 0 : nameStyle.fontSize }) }, { children: name })), !isTrigger && (_jsx(Text, Object.assign({ type: "label", className: "w-full overflow-hidden text-ellipsis whitespace-nowrap text-left", style: Object.assign(Object.assign({}, amountStyle), { color: (amountStyle === null || amountStyle === void 0 ? void 0 : amountStyle.color) || getColor(styleConfig === null || styleConfig === void 0 ? void 0 : styleConfig.countTextColor), fontFamily: ((_f = styleConfig === null || styleConfig === void 0 ? void 0 : styleConfig.countFont) === null || _f === void 0 ? void 0 : _f.family) !== "unset"
|
|
67
|
+
? (_g = styleConfig === null || styleConfig === void 0 ? void 0 : styleConfig.countFont) === null || _g === void 0 ? void 0 : _g.family
|
|
68
|
+
: amountStyle === null || amountStyle === void 0 ? void 0 : amountStyle.fontFamily, fontWeight: ((_h = styleConfig === null || styleConfig === void 0 ? void 0 : styleConfig.countFont) === null || _h === void 0 ? void 0 : _h.weight) !== "unset"
|
|
69
|
+
? (_j = styleConfig === null || styleConfig === void 0 ? void 0 : styleConfig.countFont) === null || _j === void 0 ? void 0 : _j.weight
|
|
70
|
+
: amountStyle === null || amountStyle === void 0 ? void 0 : amountStyle.fontWeight, fontSize: (styleConfig === null || styleConfig === void 0 ? void 0 : styleConfig.countSize)
|
|
71
|
+
? `${styleConfig.countSize}px`
|
|
72
|
+
: amountStyle === null || amountStyle === void 0 ? void 0 : amountStyle.fontSize }) }, { children: `${amount} ${amount !== 1
|
|
39
73
|
? translations["checkout-summary-items"]
|
|
40
74
|
: translations["checkout-summary-item"]}` })))] }))] })));
|
|
41
75
|
});
|
|
42
76
|
Wishlist.displayName = "Wishlist";
|
|
43
77
|
const CreateNew = React.forwardRef((_a, ref) => {
|
|
44
|
-
var { selected = false, onClick, className, translations } = _a, props = __rest(_a, ["selected", "onClick", "className", "translations"]);
|
|
45
|
-
return (_jsx("button", Object.assign({ className: cn("flex flex-row items-center w-full relative py-2", "active:bg-black/10 transition-colors duration-150", className), ref: ref, onClick: onClick }, props, { children: _jsx("div", Object.assign({ className: "flex flex-col items-center justify-center m-auto space-y-1 overflow-hidden h-10" }, { children: _jsxs(Text, Object.assign({ type: "body-primary", className: "w-full text-center
|
|
78
|
+
var { selected = false, onClick, className, translations, styleConfig } = _a, props = __rest(_a, ["selected", "onClick", "className", "translations", "styleConfig"]);
|
|
79
|
+
return (_jsx("button", Object.assign({ className: cn("flex flex-row items-center w-full relative py-2", "active:bg-black/10 transition-colors duration-150", className), ref: ref, onClick: onClick }, props, { children: _jsx("div", Object.assign({ className: "flex flex-col items-center justify-center m-auto space-y-1 overflow-hidden h-10" }, { children: _jsxs(Text, Object.assign({ type: "body-primary", className: "w-full text-center", style: {
|
|
80
|
+
color: getColor(styleConfig === null || styleConfig === void 0 ? void 0 : styleConfig.createNewTextColor) ||
|
|
81
|
+
"var(--coreColors-brandColorPrimary)",
|
|
82
|
+
} }, { children: ["+ ", translations["wishlist-dropdown-create-list-button"]] })) })) })));
|
|
46
83
|
});
|
|
47
84
|
CreateNew.displayName = "CreateNew";
|
|
48
85
|
export { CreateNew, Wishlist, PlaceholderIcon };
|
package/dist/lib/utils.d.ts
CHANGED
|
@@ -136,9 +136,9 @@ export type TextStyle = {
|
|
|
136
136
|
};
|
|
137
137
|
size: number | string;
|
|
138
138
|
color: Color;
|
|
139
|
-
uppercase
|
|
140
|
-
textAlignment
|
|
141
|
-
wrapText
|
|
139
|
+
uppercase?: boolean;
|
|
140
|
+
textAlignment?: "left" | "center" | "right" | "justify";
|
|
141
|
+
wrapText?: boolean;
|
|
142
142
|
lineHeight?: number;
|
|
143
143
|
letterSpacing?: number;
|
|
144
144
|
};
|
|
@@ -1121,8 +1121,8 @@ export declare const pluralize: (word: string, count?: number, inclusive?: boole
|
|
|
1121
1121
|
export declare const getInputPlaceholderTextProps: (placeholderText: TextStyle) => {
|
|
1122
1122
|
placeholderTextColor: Color;
|
|
1123
1123
|
placeholderFontSize: string | number;
|
|
1124
|
-
placeholderTextAlign: "left" | "right" | "center" | "justify";
|
|
1125
|
-
placeholderUpperCase: boolean;
|
|
1124
|
+
placeholderTextAlign: "left" | "right" | "center" | "justify" | undefined;
|
|
1125
|
+
placeholderUpperCase: boolean | undefined;
|
|
1126
1126
|
placeholderFont: string;
|
|
1127
1127
|
placeholderFontWeight: string | number;
|
|
1128
1128
|
};
|
package/dist/lib/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,4BAA4B,EAC5B,yBAAyB,EACzB,UAAU,EACV,eAAe,EACf,OAAO,EACP,QAAQ,EACR,gBAAgB,EACjB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAE,UAAU,EAAQ,MAAM,MAAM,CAAA;AAMvC,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAErC,eAAO,MAAM,gBAAgB,UAAW,MAAM,YAAY,MAAM,gCACrC,CAAA;AAE3B,MAAM,MAAM,KAAK,GAAG;IAAE,IAAI,EAAE,QAAQ,GAAG,WAAW,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAA;AAEnE,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC;AAED,eAAO,MAAM,eAAe,UAc3B,CAAA;AAED,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,CAAA;AAMjE,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAA;AAI9C,eAAO,MAAM,QAAQ,gBAAiB,KAAK,GAAG,SAAS,uBAUtD,CAAA;AAED,KAAK,UAAU,GAAG,KAAK,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAA;AAC7D,KAAK,WAAW,GAAG,UAAU,EAAE,CAAA;AAE/B,eAAO,MAAM,mBAAmB;;;;;;;;;;;;CAU/B,CAAA;AAED,KAAK,iBAAiB,GAAG,KAAK,G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;AAE3C,eAAO,MAAM,yBAAyB,QAC/B,GAAG,EAAE,6BAGX,CAAA;AAED,eAAO,MAAM,mBAAmB,QACzB,GAAG,EAAE,0CAGX,CAAA;AA6BD,eAAO,MAAM,eAAe,aAChB,yBAAyB,cACvB,yBAAyB,YAoDtC,CAAA;AAGD,KAAK,SAAS,GAAG;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,GAAG,CAAA;CACX,CAAA;AAED,KAAK,UAAU,GAAG;IAChB,KAAK,EAAE,KAAK,GAAG,IAAI,GAAG,KAAK,CAAA;IAC3B,UAAU,EAAE,CAAC,SAAS,GAAG,UAAU,CAAC,EAAE,CAAA;CACvC,CAAA;AAoDD,eAAO,MAAM,kBAAkB,UACtB,UAAU,WACR,GAAG,KACX,OAyBF,CAAA"}
|
package/dist/styles.css
CHANGED
|
@@ -1088,9 +1088,6 @@ video {
|
|
|
1088
1088
|
.h-screen {
|
|
1089
1089
|
height: 100vh;
|
|
1090
1090
|
}
|
|
1091
|
-
.max-h-\[200px\] {
|
|
1092
|
-
max-height: 200px;
|
|
1093
|
-
}
|
|
1094
1091
|
.max-h-\[240px\] {
|
|
1095
1092
|
max-height: 240px;
|
|
1096
1093
|
}
|
|
@@ -2558,14 +2555,6 @@ body::-webkit-scrollbar {
|
|
|
2558
2555
|
font-weight: 500;
|
|
2559
2556
|
}
|
|
2560
2557
|
|
|
2561
|
-
.placeholder\:text-coreColors-brandColorPrimary::-moz-placeholder {
|
|
2562
|
-
color: var(--coreColors-brandColorPrimary);
|
|
2563
|
-
}
|
|
2564
|
-
|
|
2565
|
-
.placeholder\:text-coreColors-brandColorPrimary::placeholder {
|
|
2566
|
-
color: var(--coreColors-brandColorPrimary);
|
|
2567
|
-
}
|
|
2568
|
-
|
|
2569
2558
|
.placeholder\:text-stateColors-error::-moz-placeholder {
|
|
2570
2559
|
color: var(--stateColors-error);
|
|
2571
2560
|
}
|
|
@@ -2632,11 +2621,6 @@ body::-webkit-scrollbar {
|
|
|
2632
2621
|
border-color: var(--stateColors-error) !important;
|
|
2633
2622
|
}
|
|
2634
2623
|
|
|
2635
|
-
.focus-within\:border-black:focus-within {
|
|
2636
|
-
--tw-border-opacity: 1;
|
|
2637
|
-
border-color: rgb(0 0 0 / var(--tw-border-opacity, 1));
|
|
2638
|
-
}
|
|
2639
|
-
|
|
2640
2624
|
.focus-within\:border-coreColors-brandColorPrimary:focus-within {
|
|
2641
2625
|
border-color: var(--coreColors-brandColorPrimary);
|
|
2642
2626
|
}
|