@telefonica/mistica 15.5.0 → 15.6.0
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/css/mistica.css +1 -1
- package/dist/card.d.ts +4 -0
- package/dist/chip.d.ts +3 -20
- package/dist/chip.js +44 -60
- package/dist/community/advanced-data-card.css-mistica.js +13 -16
- package/dist/community/advanced-data-card.css.d.ts +0 -1
- package/dist/community/advanced-data-card.js +25 -26
- package/dist/highlighted-card.d.ts +5 -35
- package/dist/highlighted-card.js +44 -48
- package/dist/icon-button.d.ts +190 -118
- package/dist/icon-button.js +87 -112
- package/dist/image.js +2 -1
- package/dist/list.d.ts +15 -21
- package/dist/list.js +188 -183
- package/dist/logo.d.ts +4 -23
- package/dist/logo.js +42 -67
- package/dist/package-version.js +1 -1
- package/dist/text-link.d.ts +2 -21
- package/dist/text-link.js +16 -15
- package/dist/text.js +45 -44
- package/dist/touchable.d.ts +18 -48
- package/dist-es/chip.js +68 -84
- package/dist-es/community/advanced-data-card.css-mistica.js +6 -6
- package/dist-es/community/advanced-data-card.js +69 -70
- package/dist-es/highlighted-card.js +61 -65
- package/dist-es/icon-button.js +97 -122
- package/dist-es/image.js +2 -1
- package/dist-es/list.js +248 -243
- package/dist-es/logo.js +80 -105
- package/dist-es/package-version.js +1 -1
- package/dist-es/style.css +1 -1
- package/dist-es/text-link.js +25 -24
- package/dist-es/text.js +59 -58
- package/package.json +1 -1
package/dist/chip.js
CHANGED
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
Object.defineProperty(exports, "default", {
|
|
7
7
|
enumerable: true,
|
|
8
8
|
get: function() {
|
|
9
|
-
return
|
|
9
|
+
return oe;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
12
|
const _jsxruntime = require("react/jsx-runtime");
|
|
@@ -120,62 +120,62 @@ function _object_spread_props(target, source) {
|
|
|
120
120
|
}
|
|
121
121
|
return target;
|
|
122
122
|
}
|
|
123
|
-
const
|
|
124
|
-
const { Icon:
|
|
123
|
+
const J = (t)=>{
|
|
124
|
+
const { Icon: c, children: T, id: k, dataAttributes: l, active: d, badge: r, onClose: m } = t, { texts: I, isDarkMode: B, textPresets: N } = (0, _hooks.useTheme)(), h = (0, _themevariantcontext.useThemeVariant)() === "alternative", p = c ? {
|
|
125
125
|
mobile: 16,
|
|
126
126
|
desktop: 8
|
|
127
127
|
} : {
|
|
128
128
|
mobile: 20,
|
|
129
129
|
desktop: 12
|
|
130
|
-
},
|
|
130
|
+
}, w = {
|
|
131
131
|
mobile: 20,
|
|
132
132
|
desktop: 12
|
|
133
|
-
},
|
|
133
|
+
}, b = {
|
|
134
134
|
mobile: 16,
|
|
135
135
|
desktop: 8
|
|
136
|
-
},
|
|
137
|
-
children:
|
|
138
|
-
value:
|
|
136
|
+
}, y = ()=>r ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_jsxruntime.Fragment, {
|
|
137
|
+
children: r === !0 ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_badge.default, {}) : /* @__PURE__ */ (0, _jsxruntime.jsx)(_badge.default, {
|
|
138
|
+
value: r
|
|
139
139
|
})
|
|
140
|
-
}) : null,
|
|
140
|
+
}) : null, u = /* @__PURE__ */ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
|
|
141
141
|
children: [
|
|
142
|
-
|
|
142
|
+
c && /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
|
|
143
143
|
paddingRight: 4,
|
|
144
|
-
className:
|
|
145
|
-
children: /* @__PURE__ */ (0, _jsxruntime.jsx)(
|
|
144
|
+
className: d ? _chipcssmistica.iconActive : _chipcssmistica.icon,
|
|
145
|
+
children: /* @__PURE__ */ (0, _jsxruntime.jsx)(c, {
|
|
146
146
|
color: "currentColor",
|
|
147
147
|
size: (0, _css.pxToRem)(16)
|
|
148
148
|
})
|
|
149
149
|
}),
|
|
150
150
|
/* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
|
|
151
|
-
paddingRight:
|
|
151
|
+
paddingRight: r ? 8 : m ? 4 : 0,
|
|
152
152
|
children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text2, {
|
|
153
|
-
id:
|
|
154
|
-
weight:
|
|
153
|
+
id: k,
|
|
154
|
+
weight: N.indicator.weight,
|
|
155
155
|
truncate: 1,
|
|
156
156
|
color: "currentColor",
|
|
157
|
-
children:
|
|
157
|
+
children: T
|
|
158
158
|
})
|
|
159
159
|
})
|
|
160
160
|
]
|
|
161
161
|
});
|
|
162
|
-
if (
|
|
163
|
-
className: (0, _classnames.default)(
|
|
164
|
-
paddingLeft:
|
|
165
|
-
paddingRight:
|
|
166
|
-
}, (0, _dom.getPrefixedDataAttributes)(
|
|
162
|
+
if (r) return /* @__PURE__ */ (0, _jsxruntime.jsxs)(_box.default, _object_spread_props(_object_spread({
|
|
163
|
+
className: (0, _classnames.default)(h ? _chipcssmistica.chipVariants.overAlternative : _chipcssmistica.chipVariants.default, _chipcssmistica.chipWrapper),
|
|
164
|
+
paddingLeft: p,
|
|
165
|
+
paddingRight: b
|
|
166
|
+
}, (0, _dom.getPrefixedDataAttributes)(l, "Chip")), {
|
|
167
167
|
children: [
|
|
168
|
-
|
|
169
|
-
|
|
168
|
+
u,
|
|
169
|
+
y()
|
|
170
170
|
]
|
|
171
171
|
}));
|
|
172
|
-
if (
|
|
173
|
-
className: (0, _classnames.default)(
|
|
174
|
-
paddingLeft:
|
|
175
|
-
paddingRight:
|
|
176
|
-
}, (0, _dom.getPrefixedDataAttributes)(
|
|
172
|
+
if (m) return /* @__PURE__ */ (0, _jsxruntime.jsxs)(_box.default, _object_spread_props(_object_spread({
|
|
173
|
+
className: (0, _classnames.default)(h ? _chipcssmistica.chipVariants.overAlternative : _chipcssmistica.chipVariants.default, _chipcssmistica.chipWrapper),
|
|
174
|
+
paddingLeft: p,
|
|
175
|
+
paddingRight: b
|
|
176
|
+
}, (0, _dom.getPrefixedDataAttributes)(l, "Chip")), {
|
|
177
177
|
children: [
|
|
178
|
-
|
|
178
|
+
u,
|
|
179
179
|
/* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.default, {
|
|
180
180
|
style: {
|
|
181
181
|
display: "flex",
|
|
@@ -184,8 +184,8 @@ const G = (e)=>{
|
|
|
184
184
|
width: (0, _css.pxToRem)(24),
|
|
185
185
|
height: (0, _css.pxToRem)(24)
|
|
186
186
|
},
|
|
187
|
-
"aria-label":
|
|
188
|
-
onPress: ()=>
|
|
187
|
+
"aria-label": I.closeButtonLabel,
|
|
188
|
+
onPress: ()=>m(),
|
|
189
189
|
children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_iconcloseregular.default, {
|
|
190
190
|
size: (0, _css.pxToRem)(16),
|
|
191
191
|
color: _skincontractcssmistica.vars.colors.neutralMedium
|
|
@@ -193,36 +193,20 @@ const G = (e)=>{
|
|
|
193
193
|
})
|
|
194
194
|
]
|
|
195
195
|
}));
|
|
196
|
-
const
|
|
196
|
+
const f = t.href || t.onPress || t.to, P = d !== void 0 || f, v = _object_spread({
|
|
197
197
|
"component-name": "Chip"
|
|
198
|
-
},
|
|
199
|
-
className: (0, _classnames.default)(_chipcssmistica.chipVariants[
|
|
200
|
-
[_chipcssmistica.chipInteractiveVariants[
|
|
198
|
+
}, l), C = (j)=>/* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
|
|
199
|
+
className: (0, _classnames.default)(_chipcssmistica.chipVariants[d ? "active" : h ? "overAlternative" : "default"], f ? _chipcssmistica.wrappedContent : _chipcssmistica.chipWrapper, {
|
|
200
|
+
[_chipcssmistica.chipInteractiveVariants[B ? "dark" : "light"]]: P
|
|
201
201
|
}),
|
|
202
|
-
paddingLeft:
|
|
203
|
-
paddingRight:
|
|
204
|
-
dataAttributes:
|
|
205
|
-
children:
|
|
202
|
+
paddingLeft: p,
|
|
203
|
+
paddingRight: w,
|
|
204
|
+
dataAttributes: j,
|
|
205
|
+
children: u
|
|
206
206
|
});
|
|
207
|
-
return
|
|
207
|
+
return f ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, _object_spread_props(_object_spread({}, t), {
|
|
208
208
|
className: (0, _classnames.default)(_chipcssmistica.chipWrapper, _chipcssmistica.button),
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
}) : e.to ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, {
|
|
214
|
-
trackingEvent: e.trackingEvent,
|
|
215
|
-
to: e.to,
|
|
216
|
-
fullPageOnWebView: e.fullPageOnWebView,
|
|
217
|
-
dataAttributes: o,
|
|
218
|
-
className: _chipcssmistica.chipWrapper,
|
|
219
|
-
children: c()
|
|
220
|
-
}) : e.href ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, {
|
|
221
|
-
trackingEvent: e.trackingEvent,
|
|
222
|
-
href: e.href,
|
|
223
|
-
newTab: e.newTab,
|
|
224
|
-
dataAttributes: o,
|
|
225
|
-
className: _chipcssmistica.chipWrapper,
|
|
226
|
-
children: c()
|
|
227
|
-
}) : c(o);
|
|
228
|
-
}, ie = G;
|
|
209
|
+
dataAttributes: v,
|
|
210
|
+
children: C()
|
|
211
|
+
})) : C(v);
|
|
212
|
+
}, oe = J;
|
|
@@ -10,13 +10,13 @@ function _export(target, all) {
|
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
12
|
actions: function() {
|
|
13
|
-
return
|
|
13
|
+
return n;
|
|
14
14
|
},
|
|
15
15
|
actionsVariants: function() {
|
|
16
|
-
return
|
|
16
|
+
return v;
|
|
17
17
|
},
|
|
18
18
|
adjustButtonLink: function() {
|
|
19
|
-
return
|
|
19
|
+
return _;
|
|
20
20
|
},
|
|
21
21
|
button: function() {
|
|
22
22
|
return t;
|
|
@@ -46,28 +46,25 @@ _export(exports, {
|
|
|
46
46
|
return b;
|
|
47
47
|
},
|
|
48
48
|
minHeight: function() {
|
|
49
|
-
return c;
|
|
50
|
-
},
|
|
51
|
-
minHeightBox: function() {
|
|
52
49
|
return d;
|
|
53
50
|
},
|
|
54
51
|
paddingX: function() {
|
|
55
|
-
return
|
|
52
|
+
return c;
|
|
56
53
|
},
|
|
57
54
|
topActionsWithoutIcon: function() {
|
|
58
55
|
return l;
|
|
59
56
|
},
|
|
60
57
|
touchableArea: function() {
|
|
61
|
-
return
|
|
58
|
+
return m;
|
|
62
59
|
},
|
|
63
60
|
touchableCardOverlay: function() {
|
|
64
|
-
return
|
|
61
|
+
return p;
|
|
65
62
|
},
|
|
66
63
|
touchableContainer: function() {
|
|
67
|
-
return
|
|
64
|
+
return s;
|
|
68
65
|
},
|
|
69
66
|
vars: function() {
|
|
70
|
-
return
|
|
67
|
+
return g;
|
|
71
68
|
},
|
|
72
69
|
zindex: function() {
|
|
73
70
|
return k;
|
|
@@ -76,9 +73,9 @@ _export(exports, {
|
|
|
76
73
|
require("../sprinkles.css.ts.vanilla.css-mistica.js");
|
|
77
74
|
require("../icon-button.css.ts.vanilla.css-mistica.js");
|
|
78
75
|
require("./advanced-data-card.css.ts.vanilla.css-mistica.js");
|
|
79
|
-
var
|
|
80
|
-
default: "
|
|
81
|
-
mobile: "
|
|
82
|
-
},
|
|
83
|
-
topActionsCount: "var(--
|
|
76
|
+
var n = "_1x00fru3 _1x00fru1 _1y2v1nfaa _1y2v1nfbj _1y2v1nfhk _1y2v1nfhw _1y2v1nf97", v = {
|
|
77
|
+
default: "_1x00fruk",
|
|
78
|
+
mobile: "_1x00frul"
|
|
79
|
+
}, _ = "_1x00frur", t = "_1x00frun", u = "_1x00fruo _1x00frun", o = "_1x00fru9 _1x00fru1 _1y2v1nfaa _1y2v1nfbj _1y2v1nf7m _1y2v1nf97", i = "_1x00frud _1y2v1nfhe _1y2v1nfhk _1y2v1nfi6 _1y2v1nfhq _1y2v1nfi7 _1y2v1nfio _1x00frub", x = "_1x00frui", y = "_1x00fruq _1y2v1nfhk _1y2v1nfhp", e = "_1y2v1nfhk _1y2v1nfi6 _1y2v1nfhz _1y2v1nfjt", h = "_1x00frum", b = "_1x00frus", d = "_1x00frub", c = "_1x00fru1 _1y2v1nfaa _1y2v1nfbj", l = "_1x00fruu", m = "_1x00fru4", p = "_1x00fru7", s = "_1x00fru5", g = {
|
|
80
|
+
topActionsCount: "var(--_1x00frut)"
|
|
84
81
|
}, k = "_1x00frua";
|
|
@@ -7,7 +7,6 @@ export declare const touchableCardOverlay: string;
|
|
|
7
7
|
export declare const cardContentStyle: string;
|
|
8
8
|
export declare const zindex: string;
|
|
9
9
|
export declare const minHeight: string;
|
|
10
|
-
export declare const minHeightBox: string;
|
|
11
10
|
export declare const dataCard: string;
|
|
12
11
|
export declare const cardActionIconButton: string;
|
|
13
12
|
export declare const cardAction: string;
|
|
@@ -11,10 +11,10 @@ function _export(target, all) {
|
|
|
11
11
|
}
|
|
12
12
|
_export(exports, {
|
|
13
13
|
AdvancedDataCard: function() {
|
|
14
|
-
return
|
|
14
|
+
return xe;
|
|
15
15
|
},
|
|
16
16
|
default: function() {
|
|
17
|
-
return
|
|
17
|
+
return We;
|
|
18
18
|
}
|
|
19
19
|
});
|
|
20
20
|
const _jsxruntime = require("react/jsx-runtime");
|
|
@@ -160,8 +160,8 @@ function _object_without_properties_loose(source, excluded) {
|
|
|
160
160
|
}
|
|
161
161
|
return target;
|
|
162
162
|
}
|
|
163
|
-
const
|
|
164
|
-
var { headline: a, pretitle: i, pretitleAs: n = "p", pretitleLinesMax: p, title: d, titleAs: c = "h3", titleLinesMax: l, subtitle: m, subtitleLinesMax: o, description: r, descriptionLinesMax: u, ariaLabel:
|
|
163
|
+
const ye = (_param)=>{
|
|
164
|
+
var { headline: a, pretitle: i, pretitleAs: n = "p", pretitleLinesMax: p, title: d, titleAs: c = "h3", titleLinesMax: l, subtitle: m, subtitleLinesMax: o, description: r, descriptionLinesMax: u, ariaLabel: x } = _param, s = _object_without_properties(_param, [
|
|
165
165
|
"headline",
|
|
166
166
|
"pretitle",
|
|
167
167
|
"pretitleAs",
|
|
@@ -185,7 +185,7 @@ const xe = (_param)=>{
|
|
|
185
185
|
maybe: !0,
|
|
186
186
|
className: (0, _classnames.default)(_advanceddatacardcssmistica.touchableArea)
|
|
187
187
|
}, s), {
|
|
188
|
-
"aria-label":
|
|
188
|
+
"aria-label": x,
|
|
189
189
|
children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_jsxruntime.Fragment, {})
|
|
190
190
|
})),
|
|
191
191
|
i && /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text2, {
|
|
@@ -225,7 +225,7 @@ const xe = (_param)=>{
|
|
|
225
225
|
})
|
|
226
226
|
]
|
|
227
227
|
});
|
|
228
|
-
},
|
|
228
|
+
}, Ne = (param)=>{
|
|
229
229
|
let { button: a, footerImage: i, footerText: n, footerTextLinesMax: p, buttonLink: d } = param;
|
|
230
230
|
const c = !!a, l = !!i, m = !!n, o = !!d, r = c && (l || m) && o, u = o && !r ? "178px" : "";
|
|
231
231
|
return /* @__PURE__ */ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
|
|
@@ -280,8 +280,8 @@ const xe = (_param)=>{
|
|
|
280
280
|
})
|
|
281
281
|
]
|
|
282
282
|
});
|
|
283
|
-
},
|
|
284
|
-
var { stackingGroup: a, headline: i, pretitle: n, pretitleAs: p, pretitleLinesMax: d, title: c, titleAs: l, titleLinesMax: m, subtitle: o, subtitleLinesMax: r, description: u, descriptionLinesMax:
|
|
283
|
+
}, xe = /*#__PURE__*/ _react.forwardRef((_param, E)=>{
|
|
284
|
+
var { stackingGroup: a, headline: i, pretitle: n, pretitleAs: p, pretitleLinesMax: d, title: c, titleAs: l, titleLinesMax: m, subtitle: o, subtitleLinesMax: r, description: u, descriptionLinesMax: x, extra: s, extraDividerPadding: C = 24, button: A, footerImage: T, footerText: B, footerTextLinesMax: V, buttonLink: R, dataAttributes: W, actions: g, "aria-label": S, onClose: D } = _param, f = _object_without_properties(_param, [
|
|
285
285
|
"stackingGroup",
|
|
286
286
|
"headline",
|
|
287
287
|
"pretitle",
|
|
@@ -307,12 +307,12 @@ const xe = (_param)=>{
|
|
|
307
307
|
"onClose"
|
|
308
308
|
]);
|
|
309
309
|
const G = !!f.href || !!f.onPress || !!f.to, L = {
|
|
310
|
-
button:
|
|
311
|
-
footerImage:
|
|
312
|
-
footerText:
|
|
310
|
+
button: A,
|
|
311
|
+
footerImage: T,
|
|
312
|
+
footerText: B,
|
|
313
313
|
footerTextLinesMax: V,
|
|
314
|
-
buttonLink:
|
|
315
|
-
},
|
|
314
|
+
buttonLink: R
|
|
315
|
+
}, w = !!A || !!T || !!B || !!R, F = !!(s != null && s.length), M = ((g == null ? void 0 : g.length) || 0) + (D ? 1 : 0);
|
|
316
316
|
return /* @__PURE__ */ (0, _jsxruntime.jsx)("section", _object_spread_props(_object_spread({
|
|
317
317
|
className: (0, _sprinklescssmistica.sprinkles)({
|
|
318
318
|
position: "relative",
|
|
@@ -320,7 +320,7 @@ const xe = (_param)=>{
|
|
|
320
320
|
})
|
|
321
321
|
}, (0, _dom.getPrefixedDataAttributes)(W, "AdvancedDataCard")), {
|
|
322
322
|
ref: E,
|
|
323
|
-
"aria-label":
|
|
323
|
+
"aria-label": S,
|
|
324
324
|
children: /* @__PURE__ */ (0, _jsxruntime.jsxs)(_boxed.Boxed, {
|
|
325
325
|
className: _advanceddatacardcssmistica.dataCard,
|
|
326
326
|
children: [
|
|
@@ -331,10 +331,9 @@ const xe = (_param)=>{
|
|
|
331
331
|
className: _advanceddatacardcssmistica.touchableCardOverlay
|
|
332
332
|
}),
|
|
333
333
|
/* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
334
|
-
className: (0, _classnames.default)(_advanceddatacardcssmistica.cardContentStyle, !
|
|
334
|
+
className: (0, _classnames.default)(_advanceddatacardcssmistica.cardContentStyle, !w && !F ? _advanceddatacardcssmistica.minHeight : ""),
|
|
335
335
|
children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
|
|
336
336
|
paddingTop: 8,
|
|
337
|
-
className: !b && !A ? "" : _advanceddatacardcssmistica.minHeightBox,
|
|
338
337
|
children: /* @__PURE__ */ (0, _jsxruntime.jsxs)(_inline.default, {
|
|
339
338
|
space: 0,
|
|
340
339
|
children: [
|
|
@@ -342,7 +341,7 @@ const xe = (_param)=>{
|
|
|
342
341
|
space: 8,
|
|
343
342
|
children: [
|
|
344
343
|
a,
|
|
345
|
-
/* @__PURE__ */ (0, _jsxruntime.jsx)(
|
|
344
|
+
/* @__PURE__ */ (0, _jsxruntime.jsx)(ye, _object_spread({
|
|
346
345
|
headline: i,
|
|
347
346
|
pretitle: n,
|
|
348
347
|
pretitleAs: p,
|
|
@@ -353,8 +352,8 @@ const xe = (_param)=>{
|
|
|
353
352
|
subtitle: o,
|
|
354
353
|
subtitleLinesMax: r,
|
|
355
354
|
description: u,
|
|
356
|
-
descriptionLinesMax:
|
|
357
|
-
ariaLabel:
|
|
355
|
+
descriptionLinesMax: x,
|
|
356
|
+
ariaLabel: S
|
|
358
357
|
}, f))
|
|
359
358
|
]
|
|
360
359
|
}),
|
|
@@ -373,33 +372,33 @@ const xe = (_param)=>{
|
|
|
373
372
|
flexGrow: 1
|
|
374
373
|
}
|
|
375
374
|
}),
|
|
376
|
-
|
|
375
|
+
F && /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
|
|
377
376
|
paddingTop: 16,
|
|
378
377
|
paddingBottom: 24,
|
|
379
378
|
width: "100%",
|
|
380
379
|
className: _advanceddatacardcssmistica.zindex,
|
|
381
|
-
children: s.map((O,
|
|
380
|
+
children: s.map((O, I)=>/* @__PURE__ */ (0, _jsxruntime.jsxs)("div", {
|
|
382
381
|
children: [
|
|
383
382
|
/* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
384
383
|
className: _advanceddatacardcssmistica.paddingX,
|
|
385
384
|
children: O
|
|
386
385
|
}),
|
|
387
|
-
|
|
386
|
+
I + 1 !== s.length && /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
|
|
388
387
|
paddingY: C,
|
|
389
388
|
children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_divider.default, {})
|
|
390
389
|
})
|
|
391
390
|
]
|
|
392
|
-
},
|
|
391
|
+
}, I))
|
|
393
392
|
}),
|
|
394
393
|
/* @__PURE__ */ (0, _jsxruntime.jsx)(_card.CardActionsGroup, {
|
|
395
394
|
actions: g,
|
|
396
|
-
onClose:
|
|
395
|
+
onClose: D,
|
|
397
396
|
padding: 15
|
|
398
397
|
})
|
|
399
398
|
]
|
|
400
399
|
}),
|
|
401
|
-
|
|
400
|
+
w && /* @__PURE__ */ (0, _jsxruntime.jsx)(Ne, _object_spread({}, L))
|
|
402
401
|
]
|
|
403
402
|
})
|
|
404
403
|
}));
|
|
405
|
-
}),
|
|
404
|
+
}), We = xe;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import type { ExclusifyUnion } from './utils/utility-types';
|
|
3
|
+
import type { TouchableComponentProps } from './touchable';
|
|
2
4
|
import type { ButtonLink, NullableButtonElement } from './button';
|
|
3
5
|
import type { DataAttributes, RendersNullableElement, TrackingEvent } from './utils/types';
|
|
4
6
|
type TextProps = {
|
|
@@ -25,42 +27,10 @@ type CommonProps = TextProps & {
|
|
|
25
27
|
width?: string | number;
|
|
26
28
|
dataAttributes?: DataAttributes;
|
|
27
29
|
};
|
|
28
|
-
type BasicProps = CommonProps & {
|
|
29
|
-
button?: undefined;
|
|
30
|
-
onPress?: undefined;
|
|
31
|
-
to?: undefined;
|
|
32
|
-
href?: undefined;
|
|
33
|
-
};
|
|
34
30
|
type ButtonProps = CommonProps & {
|
|
35
|
-
button
|
|
36
|
-
onPress?: undefined;
|
|
37
|
-
to?: undefined;
|
|
38
|
-
href?: undefined;
|
|
39
|
-
};
|
|
40
|
-
type HrefProps = CommonProps & {
|
|
41
|
-
href?: string;
|
|
42
|
-
newTab?: boolean;
|
|
43
|
-
onPress?: undefined;
|
|
44
|
-
to?: undefined;
|
|
45
|
-
button?: undefined;
|
|
46
|
-
fullPageOnWebView?: undefined;
|
|
47
|
-
};
|
|
48
|
-
type ToProps = CommonProps & {
|
|
49
|
-
to?: string;
|
|
50
|
-
fullPageOnWebView?: boolean;
|
|
51
|
-
href?: undefined;
|
|
52
|
-
onPress?: undefined;
|
|
53
|
-
button?: undefined;
|
|
54
|
-
newTab?: undefined;
|
|
55
|
-
};
|
|
56
|
-
type OnPressProps = CommonProps & {
|
|
57
|
-
onPress?: () => void;
|
|
58
|
-
href?: undefined;
|
|
59
|
-
to?: undefined;
|
|
60
|
-
button?: undefined;
|
|
61
|
-
newTab?: undefined;
|
|
62
|
-
fullPageOnWebView?: undefined;
|
|
31
|
+
button: NullableButtonElement | RendersNullableElement<typeof ButtonLink> | undefined;
|
|
63
32
|
};
|
|
64
|
-
type
|
|
33
|
+
type TouchableCardProps = TouchableComponentProps<CommonProps>;
|
|
34
|
+
type Props = ExclusifyUnion<ButtonProps | TouchableCardProps>;
|
|
65
35
|
declare const HighlightedCard: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
|
|
66
36
|
export default HighlightedCard;
|
package/dist/highlighted-card.js
CHANGED
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
Object.defineProperty(exports, "default", {
|
|
7
7
|
enumerable: true,
|
|
8
8
|
get: function() {
|
|
9
|
-
return
|
|
9
|
+
return K;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
12
|
const _jsxruntime = require("react/jsx-runtime");
|
|
@@ -145,22 +145,32 @@ function _object_without_properties_loose(source, excluded) {
|
|
|
145
145
|
}
|
|
146
146
|
return target;
|
|
147
147
|
}
|
|
148
|
-
const
|
|
149
|
-
var
|
|
150
|
-
const { title: s, description:
|
|
151
|
-
|
|
152
|
-
|
|
148
|
+
const A = /*#__PURE__*/ _react.forwardRef((n, e)=>{
|
|
149
|
+
var _n_isInverse;
|
|
150
|
+
const { title: s, description: r, imageUrl: a, imageFit: o, titleAs: g = "h3", width: m, dataAttributes: b, titleLinesMax: f, descriptionLinesMax: v } = n, t = _object_without_properties(n, [
|
|
151
|
+
"title",
|
|
152
|
+
"description",
|
|
153
|
+
"imageUrl",
|
|
154
|
+
"imageFit",
|
|
155
|
+
"titleAs",
|
|
156
|
+
"width",
|
|
157
|
+
"dataAttributes",
|
|
158
|
+
"titleLinesMax",
|
|
159
|
+
"descriptionLinesMax"
|
|
160
|
+
]), x = (0, _themevariantcontext.useIsInverseVariant)(), p = (_n_isInverse = n.isInverse) !== null && _n_isInverse !== void 0 ? _n_isInverse : x, d = (0, _maybedismissable.useIsDismissable)(), { textPresets: I } = (0, _hooks.useTheme)(), c = /* @__PURE__ */ (0, _jsxruntime.jsxs)(_boxed.Boxed, {
|
|
161
|
+
ref: e,
|
|
162
|
+
isInverse: p,
|
|
153
163
|
className: _highlightedcardcssmistica.container,
|
|
154
164
|
dataAttributes: _object_spread({
|
|
155
165
|
"component-name": "HighlightedCard"
|
|
156
|
-
},
|
|
157
|
-
width:
|
|
166
|
+
}, b),
|
|
167
|
+
width: m ? `${m}px` : "100%",
|
|
158
168
|
minHeight: "100%",
|
|
159
169
|
children: [
|
|
160
170
|
/* @__PURE__ */ (0, _jsxruntime.jsxs)("div", {
|
|
161
171
|
role: d ? void 0 : "region",
|
|
162
172
|
className: _highlightedcardcssmistica.textContainerVariant[a ? "withImage" : "withoutImage"],
|
|
163
|
-
"aria-label": d ? void 0 :
|
|
173
|
+
"aria-label": d ? void 0 : t["aria-label"],
|
|
164
174
|
children: [
|
|
165
175
|
/* @__PURE__ */ (0, _jsxruntime.jsxs)(_stack.default, {
|
|
166
176
|
space: 8,
|
|
@@ -170,23 +180,23 @@ const S = /*#__PURE__*/ _react.forwardRef((e, t)=>{
|
|
|
170
180
|
mobileLineHeight: "24px",
|
|
171
181
|
desktopSize: 20,
|
|
172
182
|
desktopLineHeight: "28px",
|
|
173
|
-
truncate:
|
|
174
|
-
weight:
|
|
175
|
-
as:
|
|
183
|
+
truncate: f,
|
|
184
|
+
weight: I.cardTitle.weight,
|
|
185
|
+
as: g,
|
|
176
186
|
hyphens: "auto",
|
|
177
187
|
children: s
|
|
178
188
|
}),
|
|
179
|
-
!!
|
|
189
|
+
!!r && /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text2, {
|
|
180
190
|
regular: !0,
|
|
181
191
|
color: _skincontractcssmistica.vars.colors.textSecondary,
|
|
182
|
-
truncate:
|
|
192
|
+
truncate: v,
|
|
183
193
|
as: "p",
|
|
184
194
|
hyphens: "auto",
|
|
185
|
-
children:
|
|
195
|
+
children: r
|
|
186
196
|
})
|
|
187
197
|
]
|
|
188
198
|
}),
|
|
189
|
-
|
|
199
|
+
t.button && /* @__PURE__ */ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
|
|
190
200
|
children: [
|
|
191
201
|
/* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
192
202
|
style: {
|
|
@@ -194,7 +204,7 @@ const S = /*#__PURE__*/ _react.forwardRef((e, t)=>{
|
|
|
194
204
|
flexGrow: 1
|
|
195
205
|
}
|
|
196
206
|
}),
|
|
197
|
-
|
|
207
|
+
t.button
|
|
198
208
|
]
|
|
199
209
|
})
|
|
200
210
|
]
|
|
@@ -204,45 +214,31 @@ const S = /*#__PURE__*/ _react.forwardRef((e, t)=>{
|
|
|
204
214
|
style: {
|
|
205
215
|
backgroundImage: `url(${a})`,
|
|
206
216
|
backgroundRepeat: "no-repeat",
|
|
207
|
-
backgroundSize:
|
|
208
|
-
backgroundPosition:
|
|
217
|
+
backgroundSize: o === "fit" ? "contain" : "cover",
|
|
218
|
+
backgroundPosition: o === "fit" ? "bottom right" : `center ${o === "fill-center" ? "center" : "right"}`
|
|
209
219
|
}
|
|
210
220
|
})
|
|
211
221
|
]
|
|
212
222
|
});
|
|
213
|
-
return
|
|
214
|
-
onPress: e.onPress,
|
|
215
|
-
trackingEvent: e.trackingEvent,
|
|
216
|
-
className: _highlightedcardcssmistica.touchableContainer,
|
|
217
|
-
children: o
|
|
218
|
-
}) : e.to ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, {
|
|
219
|
-
to: e.to,
|
|
220
|
-
trackingEvent: e.trackingEvent,
|
|
221
|
-
fullPageOnWebView: e.fullPageOnWebView,
|
|
223
|
+
return t.button ? c : t.onPress || t.to || t.href ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, _object_spread_props(_object_spread({}, t), {
|
|
222
224
|
className: _highlightedcardcssmistica.touchableContainer,
|
|
223
|
-
children:
|
|
224
|
-
}) :
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
newTab: e.newTab,
|
|
228
|
-
className: _highlightedcardcssmistica.touchableContainer,
|
|
229
|
-
children: o
|
|
230
|
-
}) : o;
|
|
231
|
-
}), L = /*#__PURE__*/ _react.forwardRef((_param, s)=>{
|
|
232
|
-
var { "aria-label": e } = _param, t = _object_without_properties(_param, [
|
|
225
|
+
children: c
|
|
226
|
+
})) : c;
|
|
227
|
+
}), D = /*#__PURE__*/ _react.forwardRef((_param, s)=>{
|
|
228
|
+
var { "aria-label": n } = _param, e = _object_without_properties(_param, [
|
|
233
229
|
"aria-label"
|
|
234
230
|
]);
|
|
235
|
-
var
|
|
236
|
-
const
|
|
231
|
+
var _e_isInverse;
|
|
232
|
+
const r = n || e.title || e.description, a = (0, _themevariantcontext.useIsInverseVariant)(), o = (_e_isInverse = e.isInverse) !== null && _e_isInverse !== void 0 ? _e_isInverse : a;
|
|
237
233
|
return /* @__PURE__ */ (0, _jsxruntime.jsx)(_maybedismissable.default, {
|
|
238
|
-
onClose:
|
|
239
|
-
"aria-label":
|
|
240
|
-
width:
|
|
241
|
-
isOverMedia: !!
|
|
242
|
-
isInverse:
|
|
243
|
-
children: /* @__PURE__ */ (0, _jsxruntime.jsx)(
|
|
244
|
-
"aria-label":
|
|
234
|
+
onClose: e.onClose,
|
|
235
|
+
"aria-label": r,
|
|
236
|
+
width: e.width,
|
|
237
|
+
isOverMedia: !!e.imageUrl,
|
|
238
|
+
isInverse: o,
|
|
239
|
+
children: /* @__PURE__ */ (0, _jsxruntime.jsx)(A, _object_spread_props(_object_spread({}, e), {
|
|
240
|
+
"aria-label": r,
|
|
245
241
|
ref: s
|
|
246
242
|
}))
|
|
247
243
|
});
|
|
248
|
-
}),
|
|
244
|
+
}), K = D;
|