@telefonica/mistica 13.5.0 → 13.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/boxed.d.ts +6 -0
- package/dist/boxed.js +29 -18
- package/dist/card.css-mistica.js +12 -7
- package/dist/card.css.d.ts +5 -0
- package/dist/card.d.ts +40 -2
- package/dist/card.js +271 -79
- package/dist/highlighted-card.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -0
- package/dist/menu.css-mistica.js +6 -6
- package/dist/menu.css.d.ts +2 -2
- package/dist/menu.js +73 -69
- package/dist/package-version.js +1 -1
- package/dist/text.d.ts +3 -0
- package/dist/text.js +162 -119
- package/dist-es/boxed.js +30 -25
- package/dist-es/card.css-mistica.js +2 -2
- package/dist-es/card.js +314 -124
- package/dist-es/highlighted-card.js +1 -1
- package/dist-es/index.js +1701 -1701
- package/dist-es/menu.css-mistica.js +5 -5
- package/dist-es/menu.js +82 -78
- package/dist-es/package-version.js +1 -1
- package/dist-es/style.css +1 -1
- package/dist-es/text.js +164 -121
- package/package.json +1 -1
package/dist-es/boxed.js
CHANGED
|
@@ -50,41 +50,46 @@ function _objectSpreadProps(target, source) {
|
|
|
50
50
|
}
|
|
51
51
|
return target;
|
|
52
52
|
}
|
|
53
|
-
import * as
|
|
54
|
-
import
|
|
55
|
-
import { useIsInverseVariant as
|
|
53
|
+
import * as n from "react";
|
|
54
|
+
import v from "classnames";
|
|
55
|
+
import { useIsInverseVariant as B, ThemeVariant as h } from "./theme-variant-context.js";
|
|
56
56
|
import { getPrefixedDataAttributes as k } from "./utils/dom.js";
|
|
57
|
-
import { vars as
|
|
58
|
-
import { useTheme as
|
|
59
|
-
import { inverseBorder as
|
|
57
|
+
import { vars as i } from "./skins/skin-contract.css-mistica.js";
|
|
58
|
+
import { useTheme as R } from "./hooks.js";
|
|
59
|
+
import { inverseBorder as w } from "./boxed.css-mistica.js";
|
|
60
60
|
import { sprinkles as e } from "./sprinkles.css-mistica.js";
|
|
61
|
-
import { jsx as
|
|
62
|
-
const
|
|
61
|
+
import { jsx as t } from "./_virtual/jsx-runtime.js";
|
|
62
|
+
const y = (o, r)=>o && !r ? w : r ? e({
|
|
63
63
|
border: "none"
|
|
64
64
|
}) : e({
|
|
65
65
|
border: "regular"
|
|
66
|
-
}),
|
|
67
|
-
let { children: o , isInverse: r = !1 , className:
|
|
68
|
-
const { isDarkMode:
|
|
69
|
-
return /* @__PURE__ */
|
|
70
|
-
ref:
|
|
66
|
+
}), D = /*#__PURE__*/ n.forwardRef((param, p)=>{
|
|
67
|
+
let { children: o , isInverse: r = !1 , className: s , role: m , dataAttributes: d , "aria-label": f , width: l , height: c , minHeight: u , borderRadius: b , background: a } = param;
|
|
68
|
+
const { isDarkMode: x } = R(), g = B();
|
|
69
|
+
return /* @__PURE__ */ t("div", _objectSpreadProps(_objectSpread({
|
|
70
|
+
ref: p,
|
|
71
71
|
style: {
|
|
72
|
-
width:
|
|
73
|
-
height:
|
|
74
|
-
|
|
72
|
+
width: l,
|
|
73
|
+
height: c,
|
|
74
|
+
minHeight: u,
|
|
75
|
+
boxSizing: "border-box",
|
|
76
|
+
background: a
|
|
75
77
|
},
|
|
76
|
-
className:
|
|
77
|
-
borderRadius:
|
|
78
|
+
className: v(s, y(g, r), e({
|
|
79
|
+
borderRadius: b,
|
|
78
80
|
overflow: "hidden",
|
|
79
|
-
background: r && !
|
|
81
|
+
background: a ? void 0 : r && !x ? i.colors.backgroundBrand : i.colors.backgroundContainer
|
|
80
82
|
})),
|
|
81
|
-
role:
|
|
82
|
-
"aria-label":
|
|
83
|
-
}, k(
|
|
84
|
-
children: /* @__PURE__ */
|
|
83
|
+
role: m,
|
|
84
|
+
"aria-label": f
|
|
85
|
+
}, k(d)), {
|
|
86
|
+
children: /* @__PURE__ */ t(h, {
|
|
85
87
|
isInverse: r,
|
|
86
88
|
children: o
|
|
87
89
|
})
|
|
88
90
|
}));
|
|
89
|
-
})
|
|
90
|
-
|
|
91
|
+
}), N = /*#__PURE__*/ n.forwardRef((o, r)=>/* @__PURE__ */ t(D, _objectSpreadProps(_objectSpread({}, o), {
|
|
92
|
+
ref: r,
|
|
93
|
+
borderRadius: 8
|
|
94
|
+
})));
|
|
95
|
+
export { N as Boxed, D as InternalBoxed };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import "./sprinkles.css.ts.vanilla.js";
|
|
2
2
|
import "./card.css.ts.vanilla.js";
|
|
3
|
-
var _ = "_15e54s91 _1y2v1nf5i _1y2v1nf64 _1y2v1nf5y", y = "_1y2v1nf5i", f = "_15e54s97 _1y2v1nf72 _1y2v1nf7g _1y2v1nf6b _1y2v1nf6p _1y2v1nf5i _1y2v1nf64 _1y2v1nf5o _1y2v1nf7p",
|
|
4
|
-
export { _ as actions, y as boxed, f as
|
|
3
|
+
var _ = "_15e54s91 _1y2v1nf5i _1y2v1nf64 _1y2v1nf5y", y = "_1y2v1nf5i", f = "_15e54s9i _1y2v1nf7y _1y2v1nf8d _1y2v1nf5i _1y2v1nf5x _1y2v1nf5r _1y2v1nf9h", a = "_1y2v1nf5i _1y2v1nf80 _1y2v1nf8f _1y2v1nf5x _1y2v1nf5r", r = "_15e54s9j _1y2v1nf7y _1y2v1nf8d _1y2v1nf5i _1y2v1nf5x _1y2v1nf5r _1y2v1nf9h", e = "_15e54s97 _1y2v1nf72 _1y2v1nf7g _1y2v1nf6b _1y2v1nf6p _1y2v1nf5i _1y2v1nf64 _1y2v1nf5o _1y2v1nf7p", i = "_15e54s9e _1y2v1nf5i _1y2v1nf64 _1y2v1nf5o _1y2v1nf5u", o = "_15e54s9f", d = "_1y2v1nf5i _1y2v1nf5o _1y2v1nf85 _1y2v1nf7p", s = "_15e54s95 _1y2v1nf72 _1y2v1nf7g _1y2v1nf5i _1y2v1nf64 _1y2v1nf6a _1y2v1nf6p _1y2v1nf5o", p = "_15e54s99 _1y2v1nf6a _1y2v1nf6o _1y2v1nf72 _1y2v1nf7g _1y2v1nf5i _1y2v1nf85 _1y2v1nf5o _1y2v1nf5u _1y2v1nf64", t = "_15e54s9b _1y2v1nf65 _1y2v1nf6j _1y2v1nf6x _1y2v1nf7b _1y2v1nf5i _1y2v1nf85 _1y2v1nf7p _1y2v1nf9g _1y2v1nf5c", c = "_15e54s9c _1y2v1nf65 _1y2v1nf6j _1y2v1nf6x _1y2v1nf7b _1y2v1nf5i _1y2v1nf85 _1y2v1nf7p _1y2v1nf9g _1y2v1nf5c";
|
|
4
|
+
export { _ as actions, y as boxed, f as cardAction, a as cardActionIconButton, r as cardActionInverse, e as dataCard, i as displayCard, o as displayCardGradient, d as mediaCard, s as mediaCardContent, p as snapCard, t as snapCardTouchableHover, c as snapCardTouchableHoverTransparent };
|
package/dist-es/card.js
CHANGED
|
@@ -77,188 +77,192 @@ function _objectWithoutPropertiesLoose(source, excluded) {
|
|
|
77
77
|
}
|
|
78
78
|
return target;
|
|
79
79
|
}
|
|
80
|
-
import * as
|
|
81
|
-
import
|
|
80
|
+
import * as x from "react";
|
|
81
|
+
import O from "./tag.js";
|
|
82
82
|
import b from "./stack.js";
|
|
83
|
-
import
|
|
84
|
-
import { Text2 as
|
|
85
|
-
import { Boxed as
|
|
86
|
-
import
|
|
87
|
-
import { MediaBorderRadiusProvider as
|
|
88
|
-
import
|
|
89
|
-
import { BaseTouchable as
|
|
90
|
-
import { vars as
|
|
91
|
-
import { boxed as
|
|
92
|
-
import { useTheme as
|
|
93
|
-
import { sprinkles as
|
|
94
|
-
import
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
83
|
+
import A from "./box.js";
|
|
84
|
+
import { Text2 as y, Text6 as P, Text3 as W, Text4 as $ } from "./text.js";
|
|
85
|
+
import { Boxed as N, InternalBoxed as q } from "./boxed.js";
|
|
86
|
+
import w from "./button-group.js";
|
|
87
|
+
import { MediaBorderRadiusProvider as F } from "./image.js";
|
|
88
|
+
import M, { useIsDismissable as J } from "./maybe-dismissable.js";
|
|
89
|
+
import { BaseTouchable as K } from "./touchable.js";
|
|
90
|
+
import { vars as B } from "./skins/skin-contract.css-mistica.js";
|
|
91
|
+
import { boxed as T, mediaCard as Q, mediaCardContent as U, dataCard as V, snapCardTouchableHover as Y, snapCardTouchableHoverTransparent as Z, snapCard as L, displayCard as rr, displayCardGradient as er, actions as ar, cardActionIconButton as ir, cardActionInverse as tr, cardAction as nr } from "./card.css-mistica.js";
|
|
92
|
+
import { useTheme as R } from "./hooks.js";
|
|
93
|
+
import { sprinkles as or } from "./sprinkles.css-mistica.js";
|
|
94
|
+
import dr from "./inline.js";
|
|
95
|
+
import lr from "./icon-button.js";
|
|
96
|
+
import cr from "./generated/mistica-icons/icon-close-regular.js";
|
|
97
|
+
import { jsx as r, jsxs as d } from "./_virtual/jsx-runtime.js";
|
|
98
|
+
const z = (param)=>{
|
|
99
|
+
let { headline: e , pretitle: a , pretitleLinesMax: i , title: t , titleLinesMax: n , subtitle: l , subtitleLinesMax: p , description: c , descriptionLinesMax: s , extra: o , button: u , buttonLink: m } = param;
|
|
100
|
+
const f = ()=>e ? typeof e == "string" ? /* @__PURE__ */ r(O, {
|
|
98
101
|
type: "promo",
|
|
99
102
|
children: e
|
|
100
103
|
}) : e : null;
|
|
101
|
-
return /* @__PURE__ */
|
|
102
|
-
className:
|
|
104
|
+
return /* @__PURE__ */ d("div", {
|
|
105
|
+
className: or({
|
|
103
106
|
display: "flex",
|
|
104
107
|
flex: 1,
|
|
105
108
|
justifyContent: "space-between",
|
|
106
109
|
flexDirection: "column"
|
|
107
110
|
}),
|
|
108
111
|
children: [
|
|
109
|
-
/* @__PURE__ */
|
|
112
|
+
/* @__PURE__ */ d("div", {
|
|
110
113
|
children: [
|
|
111
|
-
/* @__PURE__ */
|
|
114
|
+
/* @__PURE__ */ d(b, {
|
|
112
115
|
space: 8,
|
|
113
116
|
children: [
|
|
114
|
-
(e || a ||
|
|
115
|
-
children: /* @__PURE__ */
|
|
117
|
+
(e || a || t || l) && /* @__PURE__ */ r("header", {
|
|
118
|
+
children: /* @__PURE__ */ d(b, {
|
|
116
119
|
space: 8,
|
|
117
120
|
children: [
|
|
118
|
-
|
|
119
|
-
/* @__PURE__ */
|
|
121
|
+
f(),
|
|
122
|
+
/* @__PURE__ */ d(b, {
|
|
120
123
|
space: 4,
|
|
121
124
|
children: [
|
|
122
|
-
a && /* @__PURE__ */ r(
|
|
123
|
-
truncate:
|
|
125
|
+
a && /* @__PURE__ */ r(y, {
|
|
126
|
+
truncate: i,
|
|
124
127
|
as: "div",
|
|
125
128
|
regular: !0,
|
|
126
|
-
transform: "uppercase",
|
|
127
129
|
children: a
|
|
128
130
|
}),
|
|
129
|
-
/* @__PURE__ */ r(
|
|
130
|
-
truncate:
|
|
131
|
-
as: "
|
|
131
|
+
/* @__PURE__ */ r($, {
|
|
132
|
+
truncate: n,
|
|
133
|
+
as: "h3",
|
|
132
134
|
regular: !0,
|
|
133
|
-
children:
|
|
135
|
+
children: t
|
|
134
136
|
}),
|
|
135
|
-
/* @__PURE__ */ r(
|
|
136
|
-
truncate:
|
|
137
|
+
/* @__PURE__ */ r(y, {
|
|
138
|
+
truncate: p,
|
|
137
139
|
as: "div",
|
|
138
140
|
regular: !0,
|
|
139
|
-
children:
|
|
141
|
+
children: l
|
|
140
142
|
})
|
|
141
143
|
]
|
|
142
144
|
})
|
|
143
145
|
]
|
|
144
146
|
})
|
|
145
147
|
}),
|
|
146
|
-
|
|
147
|
-
truncate:
|
|
148
|
+
c && /* @__PURE__ */ r(y, {
|
|
149
|
+
truncate: s,
|
|
148
150
|
as: "p",
|
|
149
151
|
regular: !0,
|
|
150
|
-
color:
|
|
151
|
-
children:
|
|
152
|
+
color: B.colors.textSecondary,
|
|
153
|
+
children: c
|
|
152
154
|
})
|
|
153
155
|
]
|
|
154
156
|
}),
|
|
155
|
-
|
|
156
|
-
children:
|
|
157
|
+
o && /* @__PURE__ */ r("div", {
|
|
158
|
+
children: o
|
|
157
159
|
})
|
|
158
160
|
]
|
|
159
161
|
}),
|
|
160
|
-
(
|
|
161
|
-
className:
|
|
162
|
-
children: /* @__PURE__ */ r(
|
|
163
|
-
primaryButton:
|
|
162
|
+
(u || m) && /* @__PURE__ */ r("div", {
|
|
163
|
+
className: ar,
|
|
164
|
+
children: /* @__PURE__ */ r(w, {
|
|
165
|
+
primaryButton: u,
|
|
164
166
|
link: m
|
|
165
167
|
})
|
|
166
168
|
})
|
|
167
169
|
]
|
|
168
170
|
});
|
|
169
|
-
},
|
|
170
|
-
let { "aria-label": e , className: a , children: t } = param;
|
|
171
|
-
return
|
|
171
|
+
}, H = (param)=>{
|
|
172
|
+
let { "aria-label": e , className: a , style: i , children: t } = param;
|
|
173
|
+
return J() ? /* @__PURE__ */ r("div", {
|
|
172
174
|
className: a,
|
|
175
|
+
style: i,
|
|
173
176
|
children: t
|
|
174
177
|
}) : /* @__PURE__ */ r("section", {
|
|
175
178
|
className: a,
|
|
179
|
+
style: i,
|
|
176
180
|
"aria-label": e,
|
|
177
181
|
children: t
|
|
178
182
|
});
|
|
179
|
-
},
|
|
180
|
-
let { media: e , headline: a , pretitle:
|
|
181
|
-
return r(
|
|
182
|
-
onClose:
|
|
183
|
-
"aria-label":
|
|
184
|
-
children: /* @__PURE__ */ r(
|
|
185
|
-
className:
|
|
183
|
+
}, Rr = /*#__PURE__*/ x.forwardRef((param, S)=>/* @__PURE__ */ {
|
|
184
|
+
let { media: e , headline: a , pretitle: i , pretitleLinesMax: t , subtitle: n , subtitleLinesMax: l , title: p , titleLinesMax: c , description: s , descriptionLinesMax: o , extra: u , button: m , buttonLink: f , dataAttributes: g , "aria-label": h , onClose: C } = param;
|
|
185
|
+
return r(M, {
|
|
186
|
+
onClose: C,
|
|
187
|
+
"aria-label": h,
|
|
188
|
+
children: /* @__PURE__ */ r(N, {
|
|
189
|
+
className: T,
|
|
186
190
|
dataAttributes: _objectSpread({
|
|
187
191
|
"component-name": "MediaCard"
|
|
188
|
-
},
|
|
189
|
-
ref:
|
|
192
|
+
}, g),
|
|
193
|
+
ref: S,
|
|
190
194
|
width: "100%",
|
|
191
195
|
height: "100%",
|
|
192
|
-
children: /* @__PURE__ */
|
|
193
|
-
className:
|
|
194
|
-
"aria-label":
|
|
196
|
+
children: /* @__PURE__ */ d(H, {
|
|
197
|
+
className: Q,
|
|
198
|
+
"aria-label": h,
|
|
195
199
|
children: [
|
|
196
|
-
/* @__PURE__ */ r(
|
|
200
|
+
/* @__PURE__ */ r(F, {
|
|
197
201
|
value: !1,
|
|
198
202
|
children: e
|
|
199
203
|
}),
|
|
200
204
|
/* @__PURE__ */ r("div", {
|
|
201
|
-
className:
|
|
202
|
-
children: /* @__PURE__ */ r(
|
|
205
|
+
className: U,
|
|
206
|
+
children: /* @__PURE__ */ r(z, {
|
|
203
207
|
headline: a,
|
|
204
|
-
pretitle:
|
|
205
|
-
pretitleLinesMax:
|
|
206
|
-
title:
|
|
207
|
-
titleLinesMax:
|
|
208
|
-
subtitle:
|
|
209
|
-
subtitleLinesMax:
|
|
210
|
-
description:
|
|
211
|
-
descriptionLinesMax:
|
|
212
|
-
extra:
|
|
208
|
+
pretitle: i,
|
|
209
|
+
pretitleLinesMax: t,
|
|
210
|
+
title: p,
|
|
211
|
+
titleLinesMax: c,
|
|
212
|
+
subtitle: n,
|
|
213
|
+
subtitleLinesMax: l,
|
|
214
|
+
description: s,
|
|
215
|
+
descriptionLinesMax: o,
|
|
216
|
+
extra: u,
|
|
213
217
|
button: m,
|
|
214
|
-
buttonLink:
|
|
218
|
+
buttonLink: f
|
|
215
219
|
})
|
|
216
220
|
})
|
|
217
221
|
]
|
|
218
222
|
})
|
|
219
223
|
})
|
|
220
224
|
});
|
|
221
|
-
}),
|
|
222
|
-
let { icon: e , headline: a , pretitle:
|
|
223
|
-
return r(
|
|
224
|
-
"aria-label":
|
|
225
|
-
onClose:
|
|
226
|
-
children: /* @__PURE__ */ r(
|
|
227
|
-
className:
|
|
225
|
+
}), zr = /*#__PURE__*/ x.forwardRef((param, S)=>/* @__PURE__ */ {
|
|
226
|
+
let { icon: e , headline: a , pretitle: i , pretitleLinesMax: t , title: n , titleLinesMax: l , subtitle: p , subtitleLinesMax: c , description: s , descriptionLinesMax: o , extra: u , button: m , buttonLink: f , dataAttributes: g , "aria-label": h , onClose: C } = param;
|
|
227
|
+
return r(M, {
|
|
228
|
+
"aria-label": h,
|
|
229
|
+
onClose: C,
|
|
230
|
+
children: /* @__PURE__ */ r(N, {
|
|
231
|
+
className: T,
|
|
228
232
|
dataAttributes: _objectSpread({
|
|
229
233
|
"component-name": "DataCard"
|
|
230
|
-
},
|
|
231
|
-
ref:
|
|
234
|
+
}, g),
|
|
235
|
+
ref: S,
|
|
232
236
|
width: "100%",
|
|
233
237
|
height: "100%",
|
|
234
|
-
children: /* @__PURE__ */
|
|
235
|
-
className:
|
|
236
|
-
"aria-label":
|
|
238
|
+
children: /* @__PURE__ */ d(H, {
|
|
239
|
+
className: V,
|
|
240
|
+
"aria-label": h,
|
|
237
241
|
children: [
|
|
238
|
-
e && /* @__PURE__ */ r(
|
|
242
|
+
e && /* @__PURE__ */ r(A, {
|
|
239
243
|
paddingBottom: 16,
|
|
240
244
|
children: e
|
|
241
245
|
}),
|
|
242
|
-
/* @__PURE__ */ r(
|
|
246
|
+
/* @__PURE__ */ r(z, {
|
|
243
247
|
headline: a,
|
|
244
|
-
pretitle:
|
|
245
|
-
pretitleLinesMax:
|
|
246
|
-
title:
|
|
247
|
-
titleLinesMax:
|
|
248
|
-
subtitle:
|
|
249
|
-
subtitleLinesMax:
|
|
250
|
-
description:
|
|
251
|
-
descriptionLinesMax:
|
|
252
|
-
extra:
|
|
248
|
+
pretitle: i,
|
|
249
|
+
pretitleLinesMax: t,
|
|
250
|
+
title: n,
|
|
251
|
+
titleLinesMax: l,
|
|
252
|
+
subtitle: p,
|
|
253
|
+
subtitleLinesMax: c,
|
|
254
|
+
description: s,
|
|
255
|
+
descriptionLinesMax: o,
|
|
256
|
+
extra: u,
|
|
253
257
|
button: m,
|
|
254
|
-
buttonLink:
|
|
258
|
+
buttonLink: f
|
|
255
259
|
})
|
|
256
260
|
]
|
|
257
261
|
})
|
|
258
262
|
})
|
|
259
263
|
});
|
|
260
|
-
}),
|
|
261
|
-
var { icon: e , title: a , titleLinesMax:
|
|
264
|
+
}), Hr = /*#__PURE__*/ x.forwardRef((_param, u)=>{
|
|
265
|
+
var { icon: e , title: a , titleLinesMax: i , subtitle: t , subtitleLinesMax: n , dataAttributes: l , "aria-label": p , extra: c , isInverse: s = !1 } = _param, o = _objectWithoutProperties(_param, [
|
|
262
266
|
"icon",
|
|
263
267
|
"title",
|
|
264
268
|
"titleLinesMax",
|
|
@@ -269,56 +273,242 @@ const M = (param)=>{
|
|
|
269
273
|
"extra",
|
|
270
274
|
"isInverse"
|
|
271
275
|
]);
|
|
272
|
-
const { isDarkMode: m } =
|
|
273
|
-
return /* @__PURE__ */ r(
|
|
274
|
-
className:
|
|
276
|
+
const { isDarkMode: m } = R(), f = Boolean(o.to || o.href || o.onPress);
|
|
277
|
+
return /* @__PURE__ */ r(N, {
|
|
278
|
+
className: T,
|
|
275
279
|
dataAttributes: _objectSpread({
|
|
276
280
|
"component-name": "SnapCard"
|
|
277
|
-
},
|
|
278
|
-
ref:
|
|
279
|
-
isInverse:
|
|
281
|
+
}, l),
|
|
282
|
+
ref: u,
|
|
283
|
+
isInverse: s,
|
|
280
284
|
width: "100%",
|
|
281
285
|
height: "100%",
|
|
282
|
-
children: /* @__PURE__ */ r(
|
|
286
|
+
children: /* @__PURE__ */ r(K, _objectSpreadProps(_objectSpread({
|
|
283
287
|
maybe: !0
|
|
284
|
-
},
|
|
285
|
-
className:
|
|
286
|
-
"aria-label":
|
|
287
|
-
children: /* @__PURE__ */
|
|
288
|
-
className:
|
|
288
|
+
}, o), {
|
|
289
|
+
className: f && !s && !m ? Y : Z,
|
|
290
|
+
"aria-label": p,
|
|
291
|
+
children: /* @__PURE__ */ d("section", {
|
|
292
|
+
className: L,
|
|
289
293
|
children: [
|
|
290
|
-
/* @__PURE__ */
|
|
294
|
+
/* @__PURE__ */ d("div", {
|
|
291
295
|
children: [
|
|
292
|
-
e && /* @__PURE__ */ r(
|
|
296
|
+
e && /* @__PURE__ */ r(A, {
|
|
293
297
|
paddingBottom: 16,
|
|
294
298
|
children: e
|
|
295
299
|
}),
|
|
296
|
-
/* @__PURE__ */
|
|
300
|
+
/* @__PURE__ */ d(b, {
|
|
297
301
|
space: 4,
|
|
298
302
|
children: [
|
|
299
|
-
a && /* @__PURE__ */ r(
|
|
300
|
-
truncate:
|
|
301
|
-
as: "
|
|
303
|
+
a && /* @__PURE__ */ r(y, {
|
|
304
|
+
truncate: i,
|
|
305
|
+
as: "h3",
|
|
302
306
|
regular: !0,
|
|
303
307
|
children: a
|
|
304
308
|
}),
|
|
305
|
-
|
|
306
|
-
truncate:
|
|
309
|
+
t && /* @__PURE__ */ r(y, {
|
|
310
|
+
truncate: n,
|
|
307
311
|
regular: !0,
|
|
308
|
-
color:
|
|
312
|
+
color: B.colors.textSecondary,
|
|
309
313
|
as: "p",
|
|
310
|
-
children:
|
|
314
|
+
children: t
|
|
311
315
|
})
|
|
312
316
|
]
|
|
313
317
|
})
|
|
314
318
|
]
|
|
315
319
|
}),
|
|
316
|
-
|
|
317
|
-
children:
|
|
320
|
+
c && /* @__PURE__ */ r("div", {
|
|
321
|
+
children: c
|
|
318
322
|
})
|
|
319
323
|
]
|
|
320
324
|
})
|
|
321
325
|
}))
|
|
322
326
|
});
|
|
327
|
+
}), sr = (param)=>/* @__PURE__ */ {
|
|
328
|
+
let { actions: e , isInverse: a } = param;
|
|
329
|
+
return r(dr, {
|
|
330
|
+
space: 0,
|
|
331
|
+
children: e.map((param, l)=>/* @__PURE__ */ {
|
|
332
|
+
let { onPress: i , label: t , Icon: n } = param;
|
|
333
|
+
return r(lr, {
|
|
334
|
+
size: 48,
|
|
335
|
+
onPress: i,
|
|
336
|
+
"aria-label": t,
|
|
337
|
+
className: ir,
|
|
338
|
+
style: {
|
|
339
|
+
display: "flex"
|
|
340
|
+
},
|
|
341
|
+
children: /* @__PURE__ */ r("div", {
|
|
342
|
+
className: a ? tr : nr,
|
|
343
|
+
children: /* @__PURE__ */ r(n, {
|
|
344
|
+
color: B.colors.neutralHigh,
|
|
345
|
+
size: 20
|
|
346
|
+
})
|
|
347
|
+
})
|
|
348
|
+
}, l);
|
|
349
|
+
})
|
|
350
|
+
});
|
|
351
|
+
}, mr = {
|
|
352
|
+
"1:1": "1",
|
|
353
|
+
"16:9": "16 / 9",
|
|
354
|
+
"7:10": "7 / 10",
|
|
355
|
+
"9:10": "9 / 10",
|
|
356
|
+
auto: "auto"
|
|
357
|
+
}, hr = (param)=>{
|
|
358
|
+
let { children: e , width: a = "100%" , height: i = "100%" , aspectRatio: t , actions: n , onClose: l , isInverse: p , "aria-label": c } = param;
|
|
359
|
+
const { texts: s } = R(), o = n ? [
|
|
360
|
+
...n
|
|
361
|
+
] : [];
|
|
362
|
+
l && o.push({
|
|
363
|
+
label: s.closeButtonLabel,
|
|
364
|
+
onPress: l,
|
|
365
|
+
Icon: cr
|
|
366
|
+
});
|
|
367
|
+
const u = o.length > 0, m = t ? typeof t == "number" ? String(t) : mr[t] : void 0;
|
|
368
|
+
return /* @__PURE__ */ d("section", {
|
|
369
|
+
"aria-label": c,
|
|
370
|
+
style: {
|
|
371
|
+
width: a,
|
|
372
|
+
height: i,
|
|
373
|
+
aspectRatio: m,
|
|
374
|
+
position: "relative"
|
|
375
|
+
},
|
|
376
|
+
children: [
|
|
377
|
+
e,
|
|
378
|
+
u && /* @__PURE__ */ r("div", {
|
|
379
|
+
style: {
|
|
380
|
+
position: "absolute",
|
|
381
|
+
right: 8,
|
|
382
|
+
top: 8
|
|
383
|
+
},
|
|
384
|
+
children: /* @__PURE__ */ r(sr, {
|
|
385
|
+
actions: o,
|
|
386
|
+
isInverse: p
|
|
387
|
+
})
|
|
388
|
+
})
|
|
389
|
+
]
|
|
390
|
+
});
|
|
391
|
+
}, I = /*#__PURE__*/ x.forwardRef((param, _)=>{
|
|
392
|
+
let { isInverse: e , backgroundImage: a , icon: i , headline: t , pretitle: n , pretitleLinesMax: l , title: p , titleLinesMax: c , description: s , descriptionLinesMax: o , extra: u , button: m , secondaryButton: f , onClose: g , actions: h , buttonLink: C , dataAttributes: S , width: G , height: j , aspectRatio: k , "aria-label": X } = param;
|
|
393
|
+
const v = !!a, D = v ? "0 0 16px rgba(0,0,0,0.4)" : void 0, E = (h == null ? void 0 : h.length) || g;
|
|
394
|
+
return /* @__PURE__ */ r(hr, {
|
|
395
|
+
width: G,
|
|
396
|
+
height: j,
|
|
397
|
+
aspectRatio: k,
|
|
398
|
+
onClose: g,
|
|
399
|
+
actions: h,
|
|
400
|
+
"aria-label": X,
|
|
401
|
+
isInverse: e,
|
|
402
|
+
children: /* @__PURE__ */ r(q, {
|
|
403
|
+
borderRadius: 16,
|
|
404
|
+
className: T,
|
|
405
|
+
dataAttributes: S,
|
|
406
|
+
ref: _,
|
|
407
|
+
width: "100%",
|
|
408
|
+
minHeight: "100%",
|
|
409
|
+
isInverse: e,
|
|
410
|
+
background: e && a ? B.colors.backgroundContainer : void 0,
|
|
411
|
+
children: /* @__PURE__ */ d("div", {
|
|
412
|
+
className: rr,
|
|
413
|
+
style: {
|
|
414
|
+
backgroundImage: a ? `url("${CSS.escape(a)}")` : void 0,
|
|
415
|
+
paddingTop: v && !i && !E ? 0 : 24
|
|
416
|
+
},
|
|
417
|
+
children: [
|
|
418
|
+
i ? /* @__PURE__ */ r(A, {
|
|
419
|
+
paddingBottom: v ? 0 : 40,
|
|
420
|
+
paddingX: 24,
|
|
421
|
+
children: i
|
|
422
|
+
}) : /* @__PURE__ */ r(A, {
|
|
423
|
+
paddingBottom: (h == null ? void 0 : h.length) || g ? v ? 24 : 64 : 0
|
|
424
|
+
}),
|
|
425
|
+
/* @__PURE__ */ r(A, {
|
|
426
|
+
paddingX: 24,
|
|
427
|
+
paddingTop: v ? 40 : 0,
|
|
428
|
+
paddingBottom: 24,
|
|
429
|
+
className: v ? er : void 0,
|
|
430
|
+
children: /* @__PURE__ */ d(b, {
|
|
431
|
+
space: 24,
|
|
432
|
+
children: [
|
|
433
|
+
/* @__PURE__ */ d("div", {
|
|
434
|
+
children: [
|
|
435
|
+
/* @__PURE__ */ d(b, {
|
|
436
|
+
space: 8,
|
|
437
|
+
children: [
|
|
438
|
+
(t || n || p) && /* @__PURE__ */ r("header", {
|
|
439
|
+
children: /* @__PURE__ */ d(b, {
|
|
440
|
+
space: 16,
|
|
441
|
+
children: [
|
|
442
|
+
t,
|
|
443
|
+
/* @__PURE__ */ d(b, {
|
|
444
|
+
space: 4,
|
|
445
|
+
children: [
|
|
446
|
+
n && /* @__PURE__ */ r(y, {
|
|
447
|
+
forceMobileSizes: !0,
|
|
448
|
+
truncate: l,
|
|
449
|
+
as: "div",
|
|
450
|
+
regular: !0,
|
|
451
|
+
textShadow: D,
|
|
452
|
+
children: n
|
|
453
|
+
}),
|
|
454
|
+
/* @__PURE__ */ r(P, {
|
|
455
|
+
forceMobileSizes: !0,
|
|
456
|
+
truncate: c,
|
|
457
|
+
as: "h3",
|
|
458
|
+
textShadow: D,
|
|
459
|
+
children: p
|
|
460
|
+
})
|
|
461
|
+
]
|
|
462
|
+
})
|
|
463
|
+
]
|
|
464
|
+
})
|
|
465
|
+
}),
|
|
466
|
+
s && /* @__PURE__ */ r(W, {
|
|
467
|
+
forceMobileSizes: !0,
|
|
468
|
+
truncate: o,
|
|
469
|
+
as: "p",
|
|
470
|
+
regular: !0,
|
|
471
|
+
color: B.colors.textSecondary,
|
|
472
|
+
textShadow: D,
|
|
473
|
+
children: s
|
|
474
|
+
})
|
|
475
|
+
]
|
|
476
|
+
}),
|
|
477
|
+
u
|
|
478
|
+
]
|
|
479
|
+
}),
|
|
480
|
+
(m || f || C) && /* @__PURE__ */ r(w, {
|
|
481
|
+
primaryButton: m,
|
|
482
|
+
secondaryButton: f,
|
|
483
|
+
link: C
|
|
484
|
+
})
|
|
485
|
+
]
|
|
486
|
+
})
|
|
487
|
+
})
|
|
488
|
+
]
|
|
489
|
+
})
|
|
490
|
+
})
|
|
491
|
+
});
|
|
492
|
+
}), Ir = /*#__PURE__*/ x.forwardRef((_param, i)=>/* @__PURE__ */ {
|
|
493
|
+
var { dataAttributes: e } = _param, a = _objectWithoutProperties(_param, [
|
|
494
|
+
"dataAttributes"
|
|
495
|
+
]);
|
|
496
|
+
return r(I, _objectSpreadProps(_objectSpread({}, a), {
|
|
497
|
+
ref: i,
|
|
498
|
+
isInverse: !0,
|
|
499
|
+
dataAttributes: _objectSpreadProps(_objectSpread({}, e), {
|
|
500
|
+
"component-name": "DisplayMediaCard"
|
|
501
|
+
})
|
|
502
|
+
}));
|
|
503
|
+
}), Gr = /*#__PURE__*/ x.forwardRef((_param, i)=>/* @__PURE__ */ {
|
|
504
|
+
var { dataAttributes: e } = _param, a = _objectWithoutProperties(_param, [
|
|
505
|
+
"dataAttributes"
|
|
506
|
+
]);
|
|
507
|
+
return r(I, _objectSpreadProps(_objectSpread({}, a), {
|
|
508
|
+
ref: i,
|
|
509
|
+
dataAttributes: _objectSpreadProps(_objectSpread({}, e), {
|
|
510
|
+
"component-name": "DisplayDataCard"
|
|
511
|
+
})
|
|
512
|
+
}));
|
|
323
513
|
});
|
|
324
|
-
export {
|
|
514
|
+
export { zr as DataCard, Gr as DisplayDataCard, Ir as DisplayMediaCard, Rr as MediaCard, Hr as SnapCard };
|