@telefonica/mistica 16.5.0 → 16.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/callout.js +27 -15
- package/dist/card.css-mistica.js +5 -5
- package/dist/card.d.ts +9 -1
- package/dist/card.js +611 -475
- package/dist/community/advanced-data-card.css-mistica.js +14 -11
- package/dist/community/advanced-data-card.css.d.ts +1 -0
- package/dist/community/advanced-data-card.d.ts +1 -1
- package/dist/community/advanced-data-card.js +172 -85
- package/dist/cover-hero.css-mistica.js +14 -11
- package/dist/cover-hero.css.d.ts +1 -0
- package/dist/cover-hero.d.ts +1 -0
- package/dist/cover-hero.js +101 -59
- package/dist/empty-state.js +24 -15
- package/dist/header.css-mistica.js +6 -3
- package/dist/header.css.d.ts +1 -0
- package/dist/header.d.ts +3 -2
- package/dist/header.js +148 -79
- package/dist/hero.css-mistica.js +11 -8
- package/dist/hero.css.d.ts +1 -0
- package/dist/hero.d.ts +2 -1
- package/dist/hero.js +102 -68
- package/dist/highlighted-card.js +32 -23
- package/dist/index.d.ts +1 -0
- package/dist/index.js +4 -0
- package/dist/maybe-dismissable.js +8 -5
- package/dist/meter.d.ts +23 -0
- package/dist/meter.js +400 -0
- package/dist/package-version.js +1 -1
- package/dist/sheet-common.css-mistica.js +16 -10
- package/dist/sheet-common.css.d.ts +3 -1
- package/dist/sheet-common.js +78 -70
- package/dist/sheet-info.css-mistica.js +15 -4
- package/dist/sheet-info.css.d.ts +2 -0
- package/dist/sheet-info.d.ts +3 -0
- package/dist/sheet-info.js +61 -43
- package/dist/sheet-native.js +59 -48
- package/dist/sheet-types.d.ts +6 -1
- package/dist/sheet-web.js +6 -4
- package/dist/text-tokens.d.ts +10 -0
- package/dist/text-tokens.js +54 -38
- package/dist/theme-context-provider.js +60 -50
- package/dist/theme.d.ts +3 -2
- package/dist/utils/headings.d.ts +2 -0
- package/dist/utils/headings.js +11 -0
- package/dist/utils/types.d.ts +1 -0
- package/dist-es/callout.js +55 -43
- package/dist-es/card.css-mistica.js +2 -2
- package/dist-es/card.js +721 -588
- package/dist-es/community/advanced-data-card.css-mistica.js +3 -3
- package/dist-es/community/advanced-data-card.js +217 -130
- package/dist-es/cover-hero.css-mistica.js +3 -3
- package/dist-es/cover-hero.js +132 -90
- package/dist-es/empty-state.js +40 -31
- package/dist-es/header.css-mistica.js +2 -2
- package/dist-es/header.js +174 -104
- package/dist-es/hero.css-mistica.js +2 -2
- package/dist-es/hero.js +150 -115
- package/dist-es/highlighted-card.js +36 -27
- package/dist-es/index.js +1839 -1838
- package/dist-es/maybe-dismissable.js +17 -14
- package/dist-es/meter.js +346 -0
- package/dist-es/package-version.js +1 -1
- package/dist-es/sheet-common.css-mistica.js +2 -2
- package/dist-es/sheet-common.js +124 -116
- package/dist-es/sheet-info.css-mistica.js +2 -2
- package/dist-es/sheet-info.js +74 -56
- package/dist-es/sheet-native.js +59 -48
- package/dist-es/sheet-web.js +10 -8
- package/dist-es/style.css +1 -1
- package/dist-es/text-tokens.js +30 -20
- package/dist-es/theme-context-provider.js +88 -78
- package/dist-es/utils/headings.js +2 -0
- package/package.json +2 -1
package/dist-es/hero.js
CHANGED
|
@@ -78,90 +78,129 @@ function _object_without_properties_loose(source, excluded) {
|
|
|
78
78
|
}
|
|
79
79
|
return target;
|
|
80
80
|
}
|
|
81
|
-
import { jsx as
|
|
81
|
+
import { jsx as e, jsxs as s, Fragment as C } from "react/jsx-runtime";
|
|
82
82
|
import * as $ from "react";
|
|
83
|
-
import
|
|
83
|
+
import y from "classnames";
|
|
84
84
|
import { useScreenSize as D } from "./hooks.js";
|
|
85
|
-
import { Text3 as
|
|
86
|
-
import
|
|
87
|
-
import
|
|
88
|
-
import
|
|
89
|
-
import
|
|
90
|
-
import { vars as
|
|
91
|
-
import { container as
|
|
92
|
-
import { vars as
|
|
93
|
-
import { useSlideshowContext as
|
|
94
|
-
import { getPrefixedDataAttributes as
|
|
95
|
-
import { useIsInverseOrMediaVariant as
|
|
96
|
-
import { applyCssVars as
|
|
97
|
-
import { ResetResponsiveLayout as
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
85
|
+
import { Text3 as R, Text8 as A } from "./text.js";
|
|
86
|
+
import G from "./grid-layout.js";
|
|
87
|
+
import H from "./box.js";
|
|
88
|
+
import j from "./stack.js";
|
|
89
|
+
import E from "./button-group.js";
|
|
90
|
+
import { vars as d } from "./skins/skin-contract.css-mistica.js";
|
|
91
|
+
import { container as B, containerMobile as M, containerMinHeight as S, expandedContent as V, layout as N, vars as T, hero as _, containerDesktop as O, contentContainer as z, flexColumn as F, actions as K } from "./hero.css-mistica.js";
|
|
92
|
+
import { vars as b } from "./image.css-mistica.js";
|
|
93
|
+
import { useSlideshowContext as U } from "./carousel.js";
|
|
94
|
+
import { getPrefixedDataAttributes as k } from "./utils/dom.js";
|
|
95
|
+
import { useIsInverseOrMediaVariant as W } from "./theme-variant-context.js";
|
|
96
|
+
import { applyCssVars as g } from "./utils/css.js";
|
|
97
|
+
import { ResetResponsiveLayout as q, InternalResponsiveLayout as J } from "./responsive-layout.js";
|
|
98
|
+
import { isBiggerHeading as Q } from "./utils/headings.js";
|
|
99
|
+
const w = {
|
|
100
|
+
default: d.colors.background,
|
|
101
|
+
alternative: d.colors.backgroundAlternative,
|
|
102
|
+
brand: d.colors.backgroundBrand,
|
|
103
|
+
"brand-secondary": d.colors.backgroundBrandSecondary,
|
|
103
104
|
none: "transparent"
|
|
104
|
-
},
|
|
105
|
-
let { children:
|
|
106
|
-
return /* @__PURE__ */
|
|
107
|
-
isInverse:
|
|
108
|
-
className:
|
|
109
|
-
innerDivClassName:
|
|
105
|
+
}, I = (param)=>{
|
|
106
|
+
let { children: r, isInverse: t, backgroundColor: a } = param;
|
|
107
|
+
return /* @__PURE__ */ e(J, {
|
|
108
|
+
isInverse: t,
|
|
109
|
+
className: N,
|
|
110
|
+
innerDivClassName: N,
|
|
110
111
|
shouldExpandWhenNested: !0,
|
|
111
|
-
backgroundColor:
|
|
112
|
-
children:
|
|
112
|
+
backgroundColor: a !== null && a !== void 0 ? a : "transparent",
|
|
113
|
+
children: r
|
|
113
114
|
});
|
|
114
115
|
}, x = (param)=>{
|
|
115
|
-
let { headline:
|
|
116
|
-
|
|
117
|
-
|
|
116
|
+
let { headline: r, title: t, titleAs: a = "h1", pretitle: l, pretitleAs: c, description: o, descriptionLinesMax: m, extra: p, button: f, secondaryButton: u, buttonLink: n } = param;
|
|
117
|
+
const v = t ? /* @__PURE__ */ e(A, {
|
|
118
|
+
as: a,
|
|
119
|
+
dataAttributes: {
|
|
120
|
+
testid: "title"
|
|
121
|
+
},
|
|
122
|
+
children: t
|
|
123
|
+
}) : void 0, i = l ? /* @__PURE__ */ e(R, {
|
|
124
|
+
as: c,
|
|
125
|
+
regular: !0,
|
|
126
|
+
dataAttributes: {
|
|
127
|
+
testid: "pretitle"
|
|
128
|
+
},
|
|
129
|
+
children: l
|
|
130
|
+
}) : void 0, h = r ? // assuming that the headline will always be followed by one of: pretitle, title, subtitle, description
|
|
131
|
+
/* @__PURE__ */ e("div", {
|
|
132
|
+
"data-testid": "headline",
|
|
133
|
+
style: {
|
|
134
|
+
paddingBottom: 16,
|
|
135
|
+
order: -1
|
|
136
|
+
},
|
|
137
|
+
children: r
|
|
138
|
+
}) : void 0;
|
|
139
|
+
return /* @__PURE__ */ s("section", {
|
|
140
|
+
className: z,
|
|
118
141
|
children: [
|
|
119
|
-
/* @__PURE__ */
|
|
142
|
+
/* @__PURE__ */ s("div", {
|
|
120
143
|
children: [
|
|
121
|
-
/* @__PURE__ */
|
|
144
|
+
/* @__PURE__ */ s(j, {
|
|
122
145
|
space: 16,
|
|
123
146
|
children: [
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
147
|
+
/* @__PURE__ */ e("div", {
|
|
148
|
+
className: F,
|
|
149
|
+
children: Q(a, c) ? /* @__PURE__ */ s(C, {
|
|
150
|
+
children: [
|
|
151
|
+
v,
|
|
152
|
+
h,
|
|
153
|
+
i && /* @__PURE__ */ e("div", {
|
|
154
|
+
style: {
|
|
155
|
+
paddingBottom: t ? 8 : 0,
|
|
156
|
+
order: -1
|
|
157
|
+
},
|
|
158
|
+
children: i
|
|
159
|
+
})
|
|
160
|
+
]
|
|
161
|
+
}) : /* @__PURE__ */ s(C, {
|
|
162
|
+
children: [
|
|
163
|
+
i && /* @__PURE__ */ e("div", {
|
|
164
|
+
style: {
|
|
165
|
+
paddingBottom: t ? 8 : 0
|
|
166
|
+
},
|
|
167
|
+
children: i
|
|
168
|
+
}),
|
|
169
|
+
h,
|
|
170
|
+
v
|
|
171
|
+
]
|
|
172
|
+
})
|
|
138
173
|
}),
|
|
139
|
-
|
|
174
|
+
o && /* @__PURE__ */ e(R, {
|
|
140
175
|
as: "p",
|
|
141
176
|
regular: !0,
|
|
142
|
-
color:
|
|
143
|
-
truncate:
|
|
144
|
-
|
|
177
|
+
color: d.colors.textSecondary,
|
|
178
|
+
truncate: m,
|
|
179
|
+
dataAttributes: {
|
|
180
|
+
testid: "description"
|
|
181
|
+
},
|
|
182
|
+
children: o
|
|
145
183
|
})
|
|
146
184
|
]
|
|
147
185
|
}),
|
|
148
|
-
|
|
149
|
-
|
|
186
|
+
p && /* @__PURE__ */ e("div", {
|
|
187
|
+
"data-testid": "slot",
|
|
188
|
+
children: p
|
|
150
189
|
})
|
|
151
190
|
]
|
|
152
191
|
}),
|
|
153
|
-
(
|
|
154
|
-
className:
|
|
155
|
-
children: /* @__PURE__ */
|
|
156
|
-
primaryButton:
|
|
157
|
-
secondaryButton:
|
|
158
|
-
link:
|
|
192
|
+
(f || n) && /* @__PURE__ */ e("div", {
|
|
193
|
+
className: K,
|
|
194
|
+
children: /* @__PURE__ */ e(E, {
|
|
195
|
+
primaryButton: f,
|
|
196
|
+
secondaryButton: u,
|
|
197
|
+
link: n
|
|
159
198
|
})
|
|
160
199
|
})
|
|
161
200
|
]
|
|
162
201
|
});
|
|
163
|
-
},
|
|
164
|
-
var { height:
|
|
202
|
+
}, X = /*#__PURE__*/ $.forwardRef((_param, p)=>{
|
|
203
|
+
var { height: r, background: t = "default", media: a, desktopMediaPosition: l = "left", dataAttributes: c, noPaddingY: o } = _param, m = _object_without_properties(_param, [
|
|
165
204
|
"height",
|
|
166
205
|
"background",
|
|
167
206
|
"media",
|
|
@@ -169,39 +208,37 @@ const O = {
|
|
|
169
208
|
"dataAttributes",
|
|
170
209
|
"noPaddingY"
|
|
171
210
|
]);
|
|
172
|
-
const { isTabletOrSmaller:
|
|
173
|
-
if (
|
|
174
|
-
children: /* @__PURE__ */
|
|
175
|
-
style:
|
|
176
|
-
[
|
|
211
|
+
const { isTabletOrSmaller: f } = D(), u = U(), n = !!(u != null && u.withBullets), v = W(), i = t === "none" ? v : t === "brand" || t === "brand-secondary";
|
|
212
|
+
if (f) return /* @__PURE__ */ e(q, {
|
|
213
|
+
children: /* @__PURE__ */ e("div", {
|
|
214
|
+
style: g({
|
|
215
|
+
[b.mediaBorderRadius]: "0px"
|
|
177
216
|
}),
|
|
178
|
-
children: /* @__PURE__ */
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
ref: d,
|
|
182
|
-
style: _object_spread({}, e === "100vh" ? {
|
|
217
|
+
children: /* @__PURE__ */ s("div", _object_spread_props(_object_spread({}, k(c, "Hero")), {
|
|
218
|
+
ref: p,
|
|
219
|
+
style: _object_spread({}, r === "100vh" ? {
|
|
183
220
|
maxHeight: "-webkit-fill-available"
|
|
184
|
-
} : {},
|
|
185
|
-
[
|
|
186
|
-
[
|
|
221
|
+
} : {}, g({
|
|
222
|
+
[T.height]: typeof r == "number" ? `${r}px` : r !== null && r !== void 0 ? r : "100%",
|
|
223
|
+
[b.mediaBorderRadius]: "0px"
|
|
187
224
|
})),
|
|
188
|
-
className:
|
|
189
|
-
[
|
|
225
|
+
className: y(B, M, {
|
|
226
|
+
[S]: !o
|
|
190
227
|
}),
|
|
191
228
|
children: [
|
|
192
|
-
|
|
193
|
-
/* @__PURE__ */
|
|
194
|
-
isInverse:
|
|
195
|
-
backgroundColor:
|
|
196
|
-
children: /* @__PURE__ */
|
|
197
|
-
className:
|
|
198
|
-
children: /* @__PURE__ */
|
|
229
|
+
a,
|
|
230
|
+
/* @__PURE__ */ e(I, {
|
|
231
|
+
isInverse: i,
|
|
232
|
+
backgroundColor: w[t],
|
|
233
|
+
children: /* @__PURE__ */ e("div", {
|
|
234
|
+
className: V,
|
|
235
|
+
children: /* @__PURE__ */ e("div", {
|
|
199
236
|
style: {
|
|
200
237
|
paddingTop: 24,
|
|
201
|
-
paddingBottom:
|
|
238
|
+
paddingBottom: n ? 48 : o ? 0 : 24
|
|
202
239
|
},
|
|
203
|
-
className:
|
|
204
|
-
children: /* @__PURE__ */
|
|
240
|
+
className: N,
|
|
241
|
+
children: /* @__PURE__ */ e(x, _object_spread({}, m))
|
|
205
242
|
})
|
|
206
243
|
})
|
|
207
244
|
})
|
|
@@ -209,50 +246,48 @@ const O = {
|
|
|
209
246
|
}))
|
|
210
247
|
})
|
|
211
248
|
});
|
|
212
|
-
const
|
|
249
|
+
const h = l === "left" ? a : /* @__PURE__ */ e(H, {
|
|
213
250
|
paddingRight: 24,
|
|
214
|
-
children: /* @__PURE__ */
|
|
215
|
-
}), L = l === "right" ?
|
|
251
|
+
children: /* @__PURE__ */ e(x, _object_spread({}, m))
|
|
252
|
+
}), L = l === "right" ? a : /* @__PURE__ */ e(H, {
|
|
216
253
|
paddingLeft: 24,
|
|
217
|
-
children: /* @__PURE__ */
|
|
254
|
+
children: /* @__PURE__ */ e(x, _object_spread({}, m))
|
|
218
255
|
});
|
|
219
|
-
return /* @__PURE__ */
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
ref: d,
|
|
223
|
-
style: _object_spread_props(_object_spread({}, e === "100vh" ? {
|
|
256
|
+
return /* @__PURE__ */ e("div", _object_spread_props(_object_spread({}, k(c, "Hero")), {
|
|
257
|
+
ref: p,
|
|
258
|
+
style: _object_spread_props(_object_spread({}, r === "100vh" ? {
|
|
224
259
|
maxHeight: "-webkit-fill-available"
|
|
225
|
-
} : {},
|
|
226
|
-
[
|
|
227
|
-
[
|
|
260
|
+
} : {}, g({
|
|
261
|
+
[T.height]: typeof r == "number" ? `${r}px` : r !== null && r !== void 0 ? r : "100%",
|
|
262
|
+
[b.mediaBorderRadius]: d.borderRadii.container
|
|
228
263
|
})), {
|
|
229
|
-
background:
|
|
264
|
+
background: w[t]
|
|
230
265
|
}),
|
|
231
|
-
className:
|
|
232
|
-
children: /* @__PURE__ */
|
|
233
|
-
isInverse:
|
|
234
|
-
children: /* @__PURE__ */
|
|
266
|
+
className: _,
|
|
267
|
+
children: /* @__PURE__ */ e(I, {
|
|
268
|
+
isInverse: i,
|
|
269
|
+
children: /* @__PURE__ */ e(G, {
|
|
235
270
|
template: "6+6",
|
|
236
|
-
left: /* @__PURE__ */
|
|
271
|
+
left: /* @__PURE__ */ e("div", {
|
|
237
272
|
style: {
|
|
238
|
-
paddingTop:
|
|
239
|
-
paddingBottom:
|
|
273
|
+
paddingTop: o ? 0 : 56,
|
|
274
|
+
paddingBottom: o && !n ? 0 : 56
|
|
240
275
|
},
|
|
241
|
-
className:
|
|
242
|
-
[
|
|
276
|
+
className: y(B, O, {
|
|
277
|
+
[S]: !o
|
|
243
278
|
}),
|
|
244
|
-
children:
|
|
279
|
+
children: h
|
|
245
280
|
}),
|
|
246
|
-
right: /* @__PURE__ */
|
|
281
|
+
right: /* @__PURE__ */ e("div", {
|
|
247
282
|
style: {
|
|
248
|
-
paddingTop:
|
|
249
|
-
paddingBottom:
|
|
283
|
+
paddingTop: o ? 0 : 56,
|
|
284
|
+
paddingBottom: o && !n ? 0 : 56
|
|
250
285
|
},
|
|
251
|
-
className:
|
|
286
|
+
className: y(B, O),
|
|
252
287
|
children: L
|
|
253
288
|
})
|
|
254
289
|
})
|
|
255
290
|
})
|
|
256
291
|
}));
|
|
257
|
-
}),
|
|
258
|
-
export {
|
|
292
|
+
}), fe = X;
|
|
293
|
+
export { fe as default };
|
|
@@ -82,17 +82,17 @@ import { jsxs as l, jsx as i, Fragment as C } from "react/jsx-runtime";
|
|
|
82
82
|
import * as u from "react";
|
|
83
83
|
import { useIsInverseOrMediaVariant as g } from "./theme-variant-context.js";
|
|
84
84
|
import y from "./stack.js";
|
|
85
|
-
import { BaseTouchable as
|
|
86
|
-
import { Text as H, Text2 as
|
|
87
|
-
import { text4 as
|
|
85
|
+
import { BaseTouchable as A } from "./touchable.js";
|
|
86
|
+
import { Text as H, Text2 as k } from "./text.js";
|
|
87
|
+
import { text4 as T } from "./text-props.js";
|
|
88
88
|
import { Boxed as M } from "./boxed.js";
|
|
89
89
|
import N, { useIsDismissable as P } from "./maybe-dismissable.js";
|
|
90
90
|
import { container as R, textContainerVariant as $, imageContent as D, touchableContainer as O } from "./highlighted-card.css-mistica.js";
|
|
91
91
|
import { vars as S } from "./skins/skin-contract.css-mistica.js";
|
|
92
92
|
import { useTheme as j } from "./hooks.js";
|
|
93
|
-
const B = /*#__PURE__*/ u.forwardRef((
|
|
94
|
-
var
|
|
95
|
-
const { title:
|
|
93
|
+
const B = /*#__PURE__*/ u.forwardRef((s, e)=>{
|
|
94
|
+
var _s_isInverse;
|
|
95
|
+
const { title: o, description: r, imageUrl: a, imageFit: n, imageAlt: c, titleAs: b = "h3", width: m, dataAttributes: f, titleLinesMax: v, descriptionLinesMax: x } = s, t = _object_without_properties(s, [
|
|
96
96
|
"title",
|
|
97
97
|
"description",
|
|
98
98
|
"imageUrl",
|
|
@@ -103,14 +103,15 @@ const B = /*#__PURE__*/ u.forwardRef((n, e)=>{
|
|
|
103
103
|
"dataAttributes",
|
|
104
104
|
"titleLinesMax",
|
|
105
105
|
"descriptionLinesMax"
|
|
106
|
-
]),
|
|
106
|
+
]), p = g(), I = (_s_isInverse = s.isInverse) !== null && _s_isInverse !== void 0 ? _s_isInverse : p, h = P(), { textPresets: w } = j(), d = /* @__PURE__ */ l(M, {
|
|
107
107
|
ref: e,
|
|
108
|
-
|
|
108
|
+
variant: I ? "inverse" : "default",
|
|
109
109
|
className: R,
|
|
110
110
|
dataAttributes: _object_spread({
|
|
111
|
-
"component-name": "HighlightedCard"
|
|
112
|
-
|
|
113
|
-
|
|
111
|
+
"component-name": "HighlightedCard",
|
|
112
|
+
testid: "HighlightedCard"
|
|
113
|
+
}, f),
|
|
114
|
+
width: m ? `${m}px` : "100%",
|
|
114
115
|
minHeight: "100%",
|
|
115
116
|
children: [
|
|
116
117
|
/* @__PURE__ */ l("div", {
|
|
@@ -121,19 +122,25 @@ const B = /*#__PURE__*/ u.forwardRef((n, e)=>{
|
|
|
121
122
|
/* @__PURE__ */ l(y, {
|
|
122
123
|
space: 8,
|
|
123
124
|
children: [
|
|
124
|
-
!!
|
|
125
|
+
!!o && /* @__PURE__ */ i(H, _object_spread_props(_object_spread({}, T), {
|
|
125
126
|
truncate: v,
|
|
126
127
|
weight: w.cardTitle.weight,
|
|
127
|
-
as:
|
|
128
|
+
as: b,
|
|
128
129
|
hyphens: "auto",
|
|
129
|
-
|
|
130
|
+
dataAttributes: {
|
|
131
|
+
testid: "title"
|
|
132
|
+
},
|
|
133
|
+
children: o
|
|
130
134
|
})),
|
|
131
|
-
!!r && /* @__PURE__ */ i(
|
|
135
|
+
!!r && /* @__PURE__ */ i(k, {
|
|
132
136
|
regular: !0,
|
|
133
137
|
color: S.colors.textSecondary,
|
|
134
138
|
truncate: x,
|
|
135
139
|
as: "p",
|
|
136
140
|
hyphens: "auto",
|
|
141
|
+
dataAttributes: {
|
|
142
|
+
testid: "description"
|
|
143
|
+
},
|
|
137
144
|
children: r
|
|
138
145
|
})
|
|
139
146
|
]
|
|
@@ -151,38 +158,40 @@ const B = /*#__PURE__*/ u.forwardRef((n, e)=>{
|
|
|
151
158
|
})
|
|
152
159
|
]
|
|
153
160
|
}),
|
|
154
|
-
a && /* @__PURE__ */ i("div", _object_spread_props(_object_spread({
|
|
161
|
+
a && /* @__PURE__ */ i("div", _object_spread_props(_object_spread({
|
|
162
|
+
"data-testid": "image"
|
|
163
|
+
}, c ? {
|
|
155
164
|
role: "img",
|
|
156
|
-
"aria-label":
|
|
165
|
+
"aria-label": c
|
|
157
166
|
} : {}), {
|
|
158
167
|
className: D,
|
|
159
168
|
style: {
|
|
160
169
|
backgroundImage: `url(${a})`,
|
|
161
170
|
backgroundRepeat: "no-repeat",
|
|
162
|
-
backgroundSize:
|
|
163
|
-
backgroundPosition:
|
|
171
|
+
backgroundSize: n === "fit" ? "contain" : "cover",
|
|
172
|
+
backgroundPosition: n === "fit" ? "bottom right" : `center ${n === "fill-center" ? "center" : "right"}`
|
|
164
173
|
}
|
|
165
174
|
}))
|
|
166
175
|
]
|
|
167
176
|
});
|
|
168
|
-
return t.button ?
|
|
177
|
+
return t.button ? d : t.onPress || t.to || t.href ? /* @__PURE__ */ i(A, _object_spread_props(_object_spread({}, t), {
|
|
169
178
|
className: O,
|
|
170
|
-
children:
|
|
171
|
-
})) :
|
|
172
|
-
}), F = /*#__PURE__*/ u.forwardRef((_param,
|
|
173
|
-
var { "aria-label":
|
|
179
|
+
children: d
|
|
180
|
+
})) : d;
|
|
181
|
+
}), F = /*#__PURE__*/ u.forwardRef((_param, o)=>{
|
|
182
|
+
var { "aria-label": s } = _param, e = _object_without_properties(_param, [
|
|
174
183
|
"aria-label"
|
|
175
184
|
]);
|
|
176
185
|
var _e_isInverse;
|
|
177
|
-
const r =
|
|
186
|
+
const r = s || e.title || e.description, a = g(), n = (_e_isInverse = e.isInverse) !== null && _e_isInverse !== void 0 ? _e_isInverse : a;
|
|
178
187
|
return /* @__PURE__ */ i(N, {
|
|
179
188
|
onClose: e.onClose,
|
|
180
189
|
"aria-label": r,
|
|
181
190
|
width: e.width,
|
|
182
|
-
variant: e.imageUrl ? "media" :
|
|
191
|
+
variant: e.imageUrl ? "media" : n ? "inverse" : void 0,
|
|
183
192
|
children: /* @__PURE__ */ i(B, _object_spread_props(_object_spread({}, e), {
|
|
184
193
|
"aria-label": r,
|
|
185
|
-
ref:
|
|
194
|
+
ref: o
|
|
186
195
|
}))
|
|
187
196
|
});
|
|
188
197
|
}), X = F;
|