@telefonica/mistica 16.5.0 → 16.6.1
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 +607 -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 +176 -91
- 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 +144 -75
- 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 +101 -67
- 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 +717 -588
- package/dist-es/community/advanced-data-card.css-mistica.js +3 -3
- package/dist-es/community/advanced-data-card.js +220 -135
- 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 +172 -103
- package/dist-es/hero.css-mistica.js +2 -2
- package/dist-es/hero.js +148 -114
- 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,128 @@ 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 d, 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 l } 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: l.colors.background,
|
|
101
|
+
alternative: l.colors.backgroundAlternative,
|
|
102
|
+
brand: l.colors.backgroundBrand,
|
|
103
|
+
"brand-secondary": l.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: i, pretitleAs: c, description: o, descriptionLinesMax: m, extra: p, button: f, secondaryButton: u, buttonLink: s } = param;
|
|
117
|
+
const v = t ? /* @__PURE__ */ e(A, {
|
|
118
|
+
as: a,
|
|
119
|
+
dataAttributes: {
|
|
120
|
+
testid: "title"
|
|
121
|
+
},
|
|
122
|
+
children: t
|
|
123
|
+
}) : void 0, n = i ? /* @__PURE__ */ e(R, {
|
|
124
|
+
as: c,
|
|
125
|
+
regular: !0,
|
|
126
|
+
dataAttributes: {
|
|
127
|
+
testid: "pretitle"
|
|
128
|
+
},
|
|
129
|
+
children: i
|
|
130
|
+
}) : void 0, h = r ? /* @__PURE__ */ e("div", {
|
|
131
|
+
"data-testid": "headline",
|
|
132
|
+
style: {
|
|
133
|
+
paddingBottom: i || t || o ? 16 : 0,
|
|
134
|
+
order: -1
|
|
135
|
+
},
|
|
136
|
+
children: r
|
|
137
|
+
}) : void 0;
|
|
138
|
+
return /* @__PURE__ */ d("section", {
|
|
139
|
+
className: z,
|
|
118
140
|
children: [
|
|
119
|
-
/* @__PURE__ */
|
|
141
|
+
/* @__PURE__ */ d("div", {
|
|
120
142
|
children: [
|
|
121
|
-
/* @__PURE__ */
|
|
143
|
+
/* @__PURE__ */ d(j, {
|
|
122
144
|
space: 16,
|
|
123
145
|
children: [
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
146
|
+
/* @__PURE__ */ e("div", {
|
|
147
|
+
className: F,
|
|
148
|
+
children: Q(a, c) ? /* @__PURE__ */ d(C, {
|
|
149
|
+
children: [
|
|
150
|
+
v,
|
|
151
|
+
h,
|
|
152
|
+
n && /* @__PURE__ */ e("div", {
|
|
153
|
+
style: {
|
|
154
|
+
paddingBottom: t ? 8 : 0,
|
|
155
|
+
order: -1
|
|
156
|
+
},
|
|
157
|
+
children: n
|
|
158
|
+
})
|
|
159
|
+
]
|
|
160
|
+
}) : /* @__PURE__ */ d(C, {
|
|
161
|
+
children: [
|
|
162
|
+
n && /* @__PURE__ */ e("div", {
|
|
163
|
+
style: {
|
|
164
|
+
paddingBottom: t ? 8 : 0
|
|
165
|
+
},
|
|
166
|
+
children: n
|
|
167
|
+
}),
|
|
168
|
+
h,
|
|
169
|
+
v
|
|
170
|
+
]
|
|
171
|
+
})
|
|
138
172
|
}),
|
|
139
|
-
|
|
173
|
+
o && /* @__PURE__ */ e(R, {
|
|
140
174
|
as: "p",
|
|
141
175
|
regular: !0,
|
|
142
|
-
color:
|
|
143
|
-
truncate:
|
|
144
|
-
|
|
176
|
+
color: l.colors.textSecondary,
|
|
177
|
+
truncate: m,
|
|
178
|
+
dataAttributes: {
|
|
179
|
+
testid: "description"
|
|
180
|
+
},
|
|
181
|
+
children: o
|
|
145
182
|
})
|
|
146
183
|
]
|
|
147
184
|
}),
|
|
148
|
-
|
|
149
|
-
|
|
185
|
+
p && /* @__PURE__ */ e("div", {
|
|
186
|
+
"data-testid": "slot",
|
|
187
|
+
children: p
|
|
150
188
|
})
|
|
151
189
|
]
|
|
152
190
|
}),
|
|
153
|
-
(
|
|
154
|
-
className:
|
|
155
|
-
children: /* @__PURE__ */
|
|
156
|
-
primaryButton:
|
|
157
|
-
secondaryButton:
|
|
191
|
+
(f || s) && /* @__PURE__ */ e("div", {
|
|
192
|
+
className: K,
|
|
193
|
+
children: /* @__PURE__ */ e(E, {
|
|
194
|
+
primaryButton: f,
|
|
195
|
+
secondaryButton: u,
|
|
158
196
|
link: s
|
|
159
197
|
})
|
|
160
198
|
})
|
|
161
199
|
]
|
|
162
200
|
});
|
|
163
|
-
},
|
|
164
|
-
var { height:
|
|
201
|
+
}, X = /*#__PURE__*/ $.forwardRef((_param, p)=>{
|
|
202
|
+
var { height: r, background: t = "default", media: a, desktopMediaPosition: i = "left", dataAttributes: c, noPaddingY: o } = _param, m = _object_without_properties(_param, [
|
|
165
203
|
"height",
|
|
166
204
|
"background",
|
|
167
205
|
"media",
|
|
@@ -169,39 +207,37 @@ const O = {
|
|
|
169
207
|
"dataAttributes",
|
|
170
208
|
"noPaddingY"
|
|
171
209
|
]);
|
|
172
|
-
const { isTabletOrSmaller:
|
|
173
|
-
if (
|
|
174
|
-
children: /* @__PURE__ */
|
|
175
|
-
style:
|
|
176
|
-
[
|
|
210
|
+
const { isTabletOrSmaller: f } = D(), u = U(), s = !!(u != null && u.withBullets), v = W(), n = t === "none" ? v : t === "brand" || t === "brand-secondary";
|
|
211
|
+
if (f) return /* @__PURE__ */ e(q, {
|
|
212
|
+
children: /* @__PURE__ */ e("div", {
|
|
213
|
+
style: g({
|
|
214
|
+
[b.mediaBorderRadius]: "0px"
|
|
177
215
|
}),
|
|
178
|
-
children: /* @__PURE__ */
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
ref: d,
|
|
182
|
-
style: _object_spread({}, e === "100vh" ? {
|
|
216
|
+
children: /* @__PURE__ */ d("div", _object_spread_props(_object_spread({}, k(c, "Hero")), {
|
|
217
|
+
ref: p,
|
|
218
|
+
style: _object_spread({}, r === "100vh" ? {
|
|
183
219
|
maxHeight: "-webkit-fill-available"
|
|
184
|
-
} : {},
|
|
185
|
-
[
|
|
186
|
-
[
|
|
220
|
+
} : {}, g({
|
|
221
|
+
[T.height]: typeof r == "number" ? `${r}px` : r !== null && r !== void 0 ? r : "100%",
|
|
222
|
+
[b.mediaBorderRadius]: "0px"
|
|
187
223
|
})),
|
|
188
|
-
className:
|
|
189
|
-
[
|
|
224
|
+
className: y(B, M, {
|
|
225
|
+
[S]: !o
|
|
190
226
|
}),
|
|
191
227
|
children: [
|
|
192
|
-
|
|
193
|
-
/* @__PURE__ */
|
|
194
|
-
isInverse:
|
|
195
|
-
backgroundColor:
|
|
196
|
-
children: /* @__PURE__ */
|
|
197
|
-
className:
|
|
198
|
-
children: /* @__PURE__ */
|
|
228
|
+
a,
|
|
229
|
+
/* @__PURE__ */ e(I, {
|
|
230
|
+
isInverse: n,
|
|
231
|
+
backgroundColor: w[t],
|
|
232
|
+
children: /* @__PURE__ */ e("div", {
|
|
233
|
+
className: V,
|
|
234
|
+
children: /* @__PURE__ */ e("div", {
|
|
199
235
|
style: {
|
|
200
236
|
paddingTop: 24,
|
|
201
|
-
paddingBottom:
|
|
237
|
+
paddingBottom: s ? 48 : o ? 0 : 24
|
|
202
238
|
},
|
|
203
|
-
className:
|
|
204
|
-
children: /* @__PURE__ */
|
|
239
|
+
className: N,
|
|
240
|
+
children: /* @__PURE__ */ e(x, _object_spread({}, m))
|
|
205
241
|
})
|
|
206
242
|
})
|
|
207
243
|
})
|
|
@@ -209,50 +245,48 @@ const O = {
|
|
|
209
245
|
}))
|
|
210
246
|
})
|
|
211
247
|
});
|
|
212
|
-
const
|
|
248
|
+
const h = i === "left" ? a : /* @__PURE__ */ e(H, {
|
|
213
249
|
paddingRight: 24,
|
|
214
|
-
children: /* @__PURE__ */
|
|
215
|
-
}), L =
|
|
250
|
+
children: /* @__PURE__ */ e(x, _object_spread({}, m))
|
|
251
|
+
}), L = i === "right" ? a : /* @__PURE__ */ e(H, {
|
|
216
252
|
paddingLeft: 24,
|
|
217
|
-
children: /* @__PURE__ */
|
|
253
|
+
children: /* @__PURE__ */ e(x, _object_spread({}, m))
|
|
218
254
|
});
|
|
219
|
-
return /* @__PURE__ */
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
ref: d,
|
|
223
|
-
style: _object_spread_props(_object_spread({}, e === "100vh" ? {
|
|
255
|
+
return /* @__PURE__ */ e("div", _object_spread_props(_object_spread({}, k(c, "Hero")), {
|
|
256
|
+
ref: p,
|
|
257
|
+
style: _object_spread_props(_object_spread({}, r === "100vh" ? {
|
|
224
258
|
maxHeight: "-webkit-fill-available"
|
|
225
|
-
} : {},
|
|
226
|
-
[
|
|
227
|
-
[
|
|
259
|
+
} : {}, g({
|
|
260
|
+
[T.height]: typeof r == "number" ? `${r}px` : r !== null && r !== void 0 ? r : "100%",
|
|
261
|
+
[b.mediaBorderRadius]: l.borderRadii.container
|
|
228
262
|
})), {
|
|
229
|
-
background:
|
|
263
|
+
background: w[t]
|
|
230
264
|
}),
|
|
231
|
-
className:
|
|
232
|
-
children: /* @__PURE__ */
|
|
233
|
-
isInverse:
|
|
234
|
-
children: /* @__PURE__ */
|
|
265
|
+
className: _,
|
|
266
|
+
children: /* @__PURE__ */ e(I, {
|
|
267
|
+
isInverse: n,
|
|
268
|
+
children: /* @__PURE__ */ e(G, {
|
|
235
269
|
template: "6+6",
|
|
236
|
-
left: /* @__PURE__ */
|
|
270
|
+
left: /* @__PURE__ */ e("div", {
|
|
237
271
|
style: {
|
|
238
|
-
paddingTop:
|
|
239
|
-
paddingBottom:
|
|
272
|
+
paddingTop: o ? 0 : 56,
|
|
273
|
+
paddingBottom: o && !s ? 0 : 56
|
|
240
274
|
},
|
|
241
|
-
className:
|
|
242
|
-
[
|
|
275
|
+
className: y(B, O, {
|
|
276
|
+
[S]: !o
|
|
243
277
|
}),
|
|
244
|
-
children:
|
|
278
|
+
children: h
|
|
245
279
|
}),
|
|
246
|
-
right: /* @__PURE__ */
|
|
280
|
+
right: /* @__PURE__ */ e("div", {
|
|
247
281
|
style: {
|
|
248
|
-
paddingTop:
|
|
249
|
-
paddingBottom:
|
|
282
|
+
paddingTop: o ? 0 : 56,
|
|
283
|
+
paddingBottom: o && !s ? 0 : 56
|
|
250
284
|
},
|
|
251
|
-
className:
|
|
285
|
+
className: y(B, O),
|
|
252
286
|
children: L
|
|
253
287
|
})
|
|
254
288
|
})
|
|
255
289
|
})
|
|
256
290
|
}));
|
|
257
|
-
}),
|
|
258
|
-
export {
|
|
291
|
+
}), fe = X;
|
|
292
|
+
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;
|