@janbox/storefront-ui 2.0.11 → 2.0.12
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/lib/avatar/avatar.d.ts.map +1 -1
- package/dist/lib/avatar/avatar.js +5 -2
- package/dist/lib/avatar/helpers.d.ts.map +1 -1
- package/dist/lib/avatar/helpers.js +2 -1
- package/dist/lib/price-label/price-label.d.ts.map +1 -1
- package/dist/lib/price-label/price-label.js +26 -7
- package/dist/lib/price-label/types.d.ts +2 -0
- package/dist/lib/price-label/types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"avatar.d.ts","sourceRoot":"","sources":["../../../src/lib/avatar/avatar.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAyB,MAAM,SAAS,CAAC;AAQ7D,eAAO,MAAM,MAAM,uBAAwB,WAAW,
|
|
1
|
+
{"version":3,"file":"avatar.d.ts","sourceRoot":"","sources":["../../../src/lib/avatar/avatar.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAyB,MAAM,SAAS,CAAC;AAQ7D,eAAO,MAAM,MAAM,uBAAwB,WAAW,4CAwFrD,CAAC"}
|
|
@@ -43,7 +43,9 @@ const Avatar = ({ ref, ..._props }) => {
|
|
|
43
43
|
onError: () => setAvatarSrc(void 0),
|
|
44
44
|
sx: {
|
|
45
45
|
position: "absolute",
|
|
46
|
-
|
|
46
|
+
width: "100%",
|
|
47
|
+
height: "100%",
|
|
48
|
+
display: "block",
|
|
47
49
|
objectFit: "inherit",
|
|
48
50
|
borderRadius: "inherit"
|
|
49
51
|
},
|
|
@@ -54,7 +56,8 @@ const Avatar = ({ ref, ..._props }) => {
|
|
|
54
56
|
{
|
|
55
57
|
sx: {
|
|
56
58
|
position: "absolute",
|
|
57
|
-
|
|
59
|
+
width: "100%",
|
|
60
|
+
height: "100%",
|
|
58
61
|
display: "flex",
|
|
59
62
|
alignItems: "center",
|
|
60
63
|
justifyContent: "center",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/lib/avatar/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/lib/avatar/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAapD,eAAO,MAAM,cAAc,UAAW,WAAW,KAAG,WAEnD,CAAC;AAEF,yDAAyD;AAEzD,eAAO,MAAM,WAAW,2BAIvB,CAAC;AAEF,eAAO,MAAM,oBAAoB,WAAY,YAAY,uBAaxD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"price-label.d.ts","sourceRoot":"","sources":["../../../src/lib/price-label/price-label.tsx"],"names":[],"mappings":"AAGA,OAAO,EAA8C,eAAe,EAAE,MAAM,SAAS,CAAC;AAOtF,eAAO,MAAM,UAAU,WAAY,eAAe,
|
|
1
|
+
{"version":3,"file":"price-label.d.ts","sourceRoot":"","sources":["../../../src/lib/price-label/price-label.tsx"],"names":[],"mappings":"AAGA,OAAO,EAA8C,eAAe,EAAE,MAAM,SAAS,CAAC;AAOtF,eAAO,MAAM,UAAU,WAAY,eAAe,4CAsGjD,CAAC"}
|
|
@@ -8,6 +8,7 @@ import { getSmallerTypographyVariants, getTypographyVar } from "../../theme/typo
|
|
|
8
8
|
import { Primitive } from "../primitive/primitive.js";
|
|
9
9
|
import { TextSkeleton } from "../loading/text-skeleton/text-skeleton.js";
|
|
10
10
|
const PriceLabel = (_props) => {
|
|
11
|
+
var _a, _b, _c, _d, _e, _f;
|
|
11
12
|
const {
|
|
12
13
|
price,
|
|
13
14
|
exchangePrice,
|
|
@@ -18,6 +19,8 @@ const PriceLabel = (_props) => {
|
|
|
18
19
|
md,
|
|
19
20
|
lg,
|
|
20
21
|
showEqual = false,
|
|
22
|
+
priceProps,
|
|
23
|
+
exchangePriceProps,
|
|
21
24
|
...rest
|
|
22
25
|
} = getPriceLabelProps(_props);
|
|
23
26
|
const isPriceEqual = price.currency && price.currency === (exchangePrice == null ? void 0 : exchangePrice.currency) && isNumber(price.value) && price.value === (exchangePrice == null ? void 0 : exchangePrice.value);
|
|
@@ -39,14 +42,25 @@ const PriceLabel = (_props) => {
|
|
|
39
42
|
/* @__PURE__ */ jsx(
|
|
40
43
|
Primitive,
|
|
41
44
|
{
|
|
42
|
-
|
|
45
|
+
...priceProps,
|
|
43
46
|
sx: {
|
|
44
47
|
color: getColorVar(`${color}.600`),
|
|
45
48
|
...createStyle({ size }),
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
+
...priceProps == null ? void 0 : priceProps.sx,
|
|
50
|
+
sm: {
|
|
51
|
+
...createStyle(sm),
|
|
52
|
+
...(_a = priceProps == null ? void 0 : priceProps.sx) == null ? void 0 : _a.sm
|
|
53
|
+
},
|
|
54
|
+
md: {
|
|
55
|
+
...createStyle(md),
|
|
56
|
+
...(_b = priceProps == null ? void 0 : priceProps.sx) == null ? void 0 : _b.md
|
|
57
|
+
},
|
|
58
|
+
lg: {
|
|
59
|
+
...createStyle(lg),
|
|
60
|
+
...(_c = priceProps == null ? void 0 : priceProps.sx) == null ? void 0 : _c.lg
|
|
61
|
+
}
|
|
49
62
|
},
|
|
63
|
+
as: "span",
|
|
50
64
|
children: /* @__PURE__ */ jsx(
|
|
51
65
|
PriceRenderer,
|
|
52
66
|
{
|
|
@@ -63,17 +77,22 @@ const PriceLabel = (_props) => {
|
|
|
63
77
|
/* @__PURE__ */ jsx(
|
|
64
78
|
Primitive,
|
|
65
79
|
{
|
|
80
|
+
...exchangePriceProps,
|
|
66
81
|
sx: {
|
|
67
82
|
color: getColorVar(`${color}.500`),
|
|
68
83
|
...createStyle({ size: getSmallerTypographyVariants(size).at(0) }),
|
|
84
|
+
...exchangePriceProps == null ? void 0 : exchangePriceProps.sx,
|
|
69
85
|
sm: {
|
|
70
|
-
...createStyle({ size: getSmallerTypographyVariants(sm == null ? void 0 : sm.size).at(0) })
|
|
86
|
+
...createStyle({ size: getSmallerTypographyVariants(sm == null ? void 0 : sm.size).at(0) }),
|
|
87
|
+
...(_d = exchangePriceProps == null ? void 0 : exchangePriceProps.sx) == null ? void 0 : _d.sm
|
|
71
88
|
},
|
|
72
89
|
md: {
|
|
73
|
-
...createStyle({ size: getSmallerTypographyVariants(md == null ? void 0 : md.size).at(0) })
|
|
90
|
+
...createStyle({ size: getSmallerTypographyVariants(md == null ? void 0 : md.size).at(0) }),
|
|
91
|
+
...(_e = exchangePriceProps == null ? void 0 : exchangePriceProps.sx) == null ? void 0 : _e.md
|
|
74
92
|
},
|
|
75
93
|
lg: {
|
|
76
|
-
...createStyle({ size: getSmallerTypographyVariants(lg == null ? void 0 : lg.size).at(0) })
|
|
94
|
+
...createStyle({ size: getSmallerTypographyVariants(lg == null ? void 0 : lg.size).at(0) }),
|
|
95
|
+
...(_f = exchangePriceProps == null ? void 0 : exchangePriceProps.sx) == null ? void 0 : _f.lg
|
|
77
96
|
}
|
|
78
97
|
},
|
|
79
98
|
as: "span",
|
|
@@ -15,7 +15,9 @@ export interface PriceLabelResponsiveProps {
|
|
|
15
15
|
}
|
|
16
16
|
type PriceLabelExtendedProps = ToResponsiveProps<PriceLabelResponsiveProps> & {
|
|
17
17
|
price: PriceLabelEntry;
|
|
18
|
+
priceProps?: PrimitiveProps<JSX.IntrinsicElements['span']>;
|
|
18
19
|
exchangePrice?: PriceLabelEntry;
|
|
20
|
+
exchangePriceProps?: PrimitiveProps<JSX.IntrinsicElements['span']>;
|
|
19
21
|
color?: ColorVariant;
|
|
20
22
|
orientation?: 'horizontal' | 'vertical';
|
|
21
23
|
showEqual?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/price-label/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE5B,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,MAAM,MAAM,eAAe,GAAG;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,WAAW,yBAAyB;IACxC,IAAI,CAAC,EAAE,qBAAqB,CAAC;CAC9B;AAED,KAAK,uBAAuB,GAAG,iBAAiB,CAAC,yBAAyB,CAAC,GAAG;IAC5E,KAAK,EAAE,eAAe,CAAC;IACvB,aAAa,CAAC,EAAE,eAAe,CAAC;IAChC,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IACxC,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,YAAY,CAAC,cAAc,CAAC,GAAG,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,EAAE,uBAAuB,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/price-label/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE5B,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,iBAAiB,EAAE,MA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