@telefonica/mistica 16.2.0 → 16.3.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.css-mistica.js +33 -21
- package/dist/card.css.d.ts +4 -0
- package/dist/card.js +235 -263
- package/dist/chip.css-mistica.js +19 -7
- package/dist/chip.css.d.ts +2 -0
- package/dist/chip.js +33 -49
- package/dist/community/advanced-data-card.css-mistica.js +24 -24
- package/dist/community/advanced-data-card.css.d.ts +1 -1
- package/dist/community/advanced-data-card.js +45 -48
- package/dist/empty-state-card.js +12 -11
- package/dist/hero.js +25 -19
- package/dist/highlighted-card.js +15 -14
- package/dist/list.css-mistica.js +21 -15
- package/dist/list.css.d.ts +2 -0
- package/dist/list.js +97 -96
- package/dist/menu.css-mistica.js +9 -9
- package/dist/menu.js +9 -10
- package/dist/package-version.js +1 -1
- package/dist/sheet-common.js +3 -2
- package/dist/table.js +52 -51
- package/dist/tag.css-mistica.js +1 -1
- package/dist/tag.js +9 -10
- package/dist/text-props.d.ts +60 -0
- package/dist/text-props.js +93 -0
- package/dist/text.d.ts +0 -62
- package/dist/text.js +156 -219
- package/dist/title.js +10 -9
- package/dist-es/card.css-mistica.js +4 -4
- package/dist-es/card.js +343 -371
- package/dist-es/chip.css-mistica.js +10 -4
- package/dist-es/chip.js +44 -60
- package/dist-es/community/advanced-data-card.css-mistica.js +7 -7
- package/dist-es/community/advanced-data-card.js +74 -77
- package/dist-es/empty-state-card.js +17 -16
- package/dist-es/hero.js +53 -47
- package/dist-es/highlighted-card.js +19 -18
- package/dist-es/list.css-mistica.js +2 -2
- package/dist-es/list.js +141 -140
- package/dist-es/menu.css-mistica.js +3 -3
- package/dist-es/menu.js +21 -22
- package/dist-es/package-version.js +1 -1
- package/dist-es/sheet-common.js +12 -11
- package/dist-es/style.css +1 -1
- package/dist-es/table.js +89 -88
- package/dist-es/tag.css-mistica.js +1 -1
- package/dist-es/tag.js +14 -15
- package/dist-es/text-props.js +52 -0
- package/dist-es/text.js +171 -231
- package/dist-es/title.js +14 -13
- package/package.json +3 -3
package/dist-es/hero.js
CHANGED
|
@@ -78,22 +78,22 @@ function _object_without_properties_loose(source, excluded) {
|
|
|
78
78
|
}
|
|
79
79
|
return target;
|
|
80
80
|
}
|
|
81
|
-
import { jsx as r, jsxs as
|
|
81
|
+
import { jsx as r, jsxs as m } from "react/jsx-runtime";
|
|
82
82
|
import * as $ from "react";
|
|
83
|
-
import
|
|
83
|
+
import f from "classnames";
|
|
84
84
|
import { useScreenSize as D } from "./hooks.js";
|
|
85
|
-
import { Text3 as
|
|
85
|
+
import { Text3 as N, Text8 as G } from "./text.js";
|
|
86
86
|
import j from "./grid-layout.js";
|
|
87
|
-
import
|
|
87
|
+
import R from "./box.js";
|
|
88
88
|
import g from "./stack.js";
|
|
89
89
|
import A from "./button-group.js";
|
|
90
90
|
import { vars as i } from "./skins/skin-contract.css-mistica.js";
|
|
91
|
-
import { container as v, containerMobile as E, containerMinHeight as C, expandedContent as M, layout as
|
|
92
|
-
import { vars as
|
|
91
|
+
import { container as v, containerMobile as E, containerMinHeight as C, expandedContent as M, layout as b, vars as H, hero as V, containerDesktop as S, contentContainer as _, actions as z } from "./hero.css-mistica.js";
|
|
92
|
+
import { vars as h } from "./image.css-mistica.js";
|
|
93
93
|
import { useSlideshowContext as K } from "./carousel.js";
|
|
94
94
|
import { getPrefixedDataAttributes as T } from "./utils/dom.js";
|
|
95
95
|
import { useIsInverseOrMediaVariant as U } from "./theme-variant-context.js";
|
|
96
|
-
import { applyCssVars as
|
|
96
|
+
import { applyCssVars as y } from "./utils/css.js";
|
|
97
97
|
import { ResetResponsiveLayout as W, InternalResponsiveLayout as q } from "./responsive-layout.js";
|
|
98
98
|
const O = {
|
|
99
99
|
default: i.colors.background,
|
|
@@ -105,27 +105,27 @@ const O = {
|
|
|
105
105
|
let { children: e, isInverse: o, backgroundColor: t } = param;
|
|
106
106
|
return /* @__PURE__ */ r(q, {
|
|
107
107
|
isInverse: o,
|
|
108
|
-
className:
|
|
109
|
-
innerDivClassName:
|
|
108
|
+
className: b,
|
|
109
|
+
innerDivClassName: b,
|
|
110
110
|
shouldExpandWhenNested: !0,
|
|
111
111
|
backgroundColor: t !== null && t !== void 0 ? t : "transparent",
|
|
112
112
|
children: e
|
|
113
113
|
});
|
|
114
|
-
},
|
|
115
|
-
let { headline: e, title: o, titleAs: t = "h1", pretitle: l, description: c, descriptionLinesMax: a, extra: n, button: d, secondaryButton:
|
|
116
|
-
return /* @__PURE__ */
|
|
114
|
+
}, x = (param)=>{
|
|
115
|
+
let { headline: e, title: o, titleAs: t = "h1", pretitle: l, description: c, descriptionLinesMax: a, extra: n, button: d, secondaryButton: p, buttonLink: s } = param;
|
|
116
|
+
return /* @__PURE__ */ m("section", {
|
|
117
117
|
className: _,
|
|
118
118
|
children: [
|
|
119
|
-
/* @__PURE__ */
|
|
119
|
+
/* @__PURE__ */ m("div", {
|
|
120
120
|
children: [
|
|
121
|
-
/* @__PURE__ */
|
|
121
|
+
/* @__PURE__ */ m(g, {
|
|
122
122
|
space: 16,
|
|
123
123
|
children: [
|
|
124
124
|
e && e,
|
|
125
|
-
/* @__PURE__ */
|
|
125
|
+
/* @__PURE__ */ m(g, {
|
|
126
126
|
space: 8,
|
|
127
127
|
children: [
|
|
128
|
-
l && /* @__PURE__ */ r(
|
|
128
|
+
l && /* @__PURE__ */ r(N, {
|
|
129
129
|
as: "p",
|
|
130
130
|
regular: !0,
|
|
131
131
|
children: l
|
|
@@ -136,7 +136,7 @@ const O = {
|
|
|
136
136
|
})
|
|
137
137
|
]
|
|
138
138
|
}),
|
|
139
|
-
c && /* @__PURE__ */ r(
|
|
139
|
+
c && /* @__PURE__ */ r(N, {
|
|
140
140
|
as: "p",
|
|
141
141
|
regular: !0,
|
|
142
142
|
color: i.colors.textSecondary,
|
|
@@ -154,7 +154,7 @@ const O = {
|
|
|
154
154
|
className: z,
|
|
155
155
|
children: /* @__PURE__ */ r(A, {
|
|
156
156
|
primaryButton: d,
|
|
157
|
-
secondaryButton:
|
|
157
|
+
secondaryButton: p,
|
|
158
158
|
link: s
|
|
159
159
|
})
|
|
160
160
|
})
|
|
@@ -169,37 +169,39 @@ const O = {
|
|
|
169
169
|
"dataAttributes",
|
|
170
170
|
"noPaddingY"
|
|
171
171
|
]);
|
|
172
|
-
const { isTabletOrSmaller:
|
|
173
|
-
if (
|
|
172
|
+
const { isTabletOrSmaller: p } = D(), s = K(), u = !!(s != null && s.withBullets), w = U(), B = o === "none" ? w : o === "brand" || o === "brand-secondary";
|
|
173
|
+
if (p) return /* @__PURE__ */ r(W, {
|
|
174
174
|
children: /* @__PURE__ */ r("div", {
|
|
175
|
-
style:
|
|
176
|
-
[
|
|
175
|
+
style: y({
|
|
176
|
+
[h.mediaBorderRadius]: "0px"
|
|
177
177
|
}),
|
|
178
|
-
children: /* @__PURE__ */
|
|
178
|
+
children: /* @__PURE__ */ m("div", _object_spread_props(_object_spread({}, T(_object_spread({
|
|
179
179
|
"component-name": "Hero"
|
|
180
180
|
}, c))), {
|
|
181
181
|
ref: d,
|
|
182
182
|
style: _object_spread({}, e === "100vh" ? {
|
|
183
183
|
maxHeight: "-webkit-fill-available"
|
|
184
|
-
} : {},
|
|
184
|
+
} : {}, y({
|
|
185
185
|
[H.height]: typeof e == "number" ? `${e}px` : e !== null && e !== void 0 ? e : "100%",
|
|
186
|
-
[
|
|
186
|
+
[h.mediaBorderRadius]: "0px"
|
|
187
187
|
})),
|
|
188
|
-
className:
|
|
188
|
+
className: f(v, E, {
|
|
189
189
|
[C]: !a
|
|
190
190
|
}),
|
|
191
191
|
children: [
|
|
192
192
|
t,
|
|
193
193
|
/* @__PURE__ */ r(k, {
|
|
194
|
-
isInverse:
|
|
194
|
+
isInverse: B,
|
|
195
195
|
backgroundColor: O[o],
|
|
196
196
|
children: /* @__PURE__ */ r("div", {
|
|
197
197
|
className: M,
|
|
198
|
-
children: /* @__PURE__ */ r(
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
198
|
+
children: /* @__PURE__ */ r("div", {
|
|
199
|
+
style: {
|
|
200
|
+
paddingTop: 24,
|
|
201
|
+
paddingBottom: u ? 48 : a ? 0 : 24
|
|
202
|
+
},
|
|
203
|
+
className: b,
|
|
204
|
+
children: /* @__PURE__ */ r(x, _object_spread({}, n))
|
|
203
205
|
})
|
|
204
206
|
})
|
|
205
207
|
})
|
|
@@ -207,12 +209,12 @@ const O = {
|
|
|
207
209
|
}))
|
|
208
210
|
})
|
|
209
211
|
});
|
|
210
|
-
const I = l === "left" ? t : /* @__PURE__ */ r(
|
|
212
|
+
const I = l === "left" ? t : /* @__PURE__ */ r(R, {
|
|
211
213
|
paddingRight: 24,
|
|
212
|
-
children: /* @__PURE__ */ r(
|
|
213
|
-
}), L = l === "right" ? t : /* @__PURE__ */ r(
|
|
214
|
+
children: /* @__PURE__ */ r(x, _object_spread({}, n))
|
|
215
|
+
}), L = l === "right" ? t : /* @__PURE__ */ r(R, {
|
|
214
216
|
paddingLeft: 24,
|
|
215
|
-
children: /* @__PURE__ */ r(
|
|
217
|
+
children: /* @__PURE__ */ r(x, _object_spread({}, n))
|
|
216
218
|
});
|
|
217
219
|
return /* @__PURE__ */ r("div", _object_spread_props(_object_spread({}, T(_object_spread({
|
|
218
220
|
"component-name": "Hero"
|
|
@@ -220,29 +222,33 @@ const O = {
|
|
|
220
222
|
ref: d,
|
|
221
223
|
style: _object_spread_props(_object_spread({}, e === "100vh" ? {
|
|
222
224
|
maxHeight: "-webkit-fill-available"
|
|
223
|
-
} : {},
|
|
225
|
+
} : {}, y({
|
|
224
226
|
[H.height]: typeof e == "number" ? `${e}px` : e !== null && e !== void 0 ? e : "100%",
|
|
225
|
-
[
|
|
227
|
+
[h.mediaBorderRadius]: i.borderRadii.container
|
|
226
228
|
})), {
|
|
227
229
|
background: O[o]
|
|
228
230
|
}),
|
|
229
231
|
className: V,
|
|
230
232
|
children: /* @__PURE__ */ r(k, {
|
|
231
|
-
isInverse:
|
|
233
|
+
isInverse: B,
|
|
232
234
|
children: /* @__PURE__ */ r(j, {
|
|
233
235
|
template: "6+6",
|
|
234
|
-
left: /* @__PURE__ */ r(
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
236
|
+
left: /* @__PURE__ */ r("div", {
|
|
237
|
+
style: {
|
|
238
|
+
paddingTop: a ? 0 : 56,
|
|
239
|
+
paddingBottom: a && !u ? 0 : 56
|
|
240
|
+
},
|
|
241
|
+
className: f(v, S, {
|
|
238
242
|
[C]: !a
|
|
239
243
|
}),
|
|
240
244
|
children: I
|
|
241
245
|
}),
|
|
242
|
-
right: /* @__PURE__ */ r(
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
+
right: /* @__PURE__ */ r("div", {
|
|
247
|
+
style: {
|
|
248
|
+
paddingTop: a ? 0 : 56,
|
|
249
|
+
paddingBottom: a && !u ? 0 : 56
|
|
250
|
+
},
|
|
251
|
+
className: f(v, S),
|
|
246
252
|
children: L
|
|
247
253
|
})
|
|
248
254
|
})
|
|
@@ -83,15 +83,16 @@ import * as u from "react";
|
|
|
83
83
|
import { useIsInverseOrMediaVariant as g } from "./theme-variant-context.js";
|
|
84
84
|
import y from "./stack.js";
|
|
85
85
|
import { BaseTouchable as k } from "./touchable.js";
|
|
86
|
-
import { Text as H,
|
|
87
|
-
import {
|
|
88
|
-
import
|
|
86
|
+
import { Text as H, Text2 as T } from "./text.js";
|
|
87
|
+
import { text4 as A } from "./text-props.js";
|
|
88
|
+
import { Boxed as M } from "./boxed.js";
|
|
89
|
+
import N, { useIsDismissable as P } from "./maybe-dismissable.js";
|
|
89
90
|
import { container as R, textContainerVariant as $, imageContent as D, touchableContainer as O } from "./highlighted-card.css-mistica.js";
|
|
90
91
|
import { vars as S } from "./skins/skin-contract.css-mistica.js";
|
|
91
92
|
import { useTheme as j } from "./hooks.js";
|
|
92
|
-
const B = /*#__PURE__*/ u.forwardRef((
|
|
93
|
-
var
|
|
94
|
-
const { title: s, description: r, imageUrl: a, imageFit:
|
|
93
|
+
const B = /*#__PURE__*/ u.forwardRef((n, e)=>{
|
|
94
|
+
var _n_isInverse;
|
|
95
|
+
const { title: s, description: r, imageUrl: a, imageFit: o, imageAlt: m, titleAs: f = "h3", width: d, dataAttributes: b, titleLinesMax: v, descriptionLinesMax: x } = n, t = _object_without_properties(n, [
|
|
95
96
|
"title",
|
|
96
97
|
"description",
|
|
97
98
|
"imageUrl",
|
|
@@ -102,13 +103,13 @@ const B = /*#__PURE__*/ u.forwardRef((o, e)=>{
|
|
|
102
103
|
"dataAttributes",
|
|
103
104
|
"titleLinesMax",
|
|
104
105
|
"descriptionLinesMax"
|
|
105
|
-
]), I = g(), p = (
|
|
106
|
+
]), I = g(), p = (_n_isInverse = n.isInverse) !== null && _n_isInverse !== void 0 ? _n_isInverse : I, h = P(), { textPresets: w } = j(), c = /* @__PURE__ */ l(M, {
|
|
106
107
|
ref: e,
|
|
107
108
|
isInverse: p,
|
|
108
109
|
className: R,
|
|
109
110
|
dataAttributes: _object_spread({
|
|
110
111
|
"component-name": "HighlightedCard"
|
|
111
|
-
},
|
|
112
|
+
}, b),
|
|
112
113
|
width: d ? `${d}px` : "100%",
|
|
113
114
|
minHeight: "100%",
|
|
114
115
|
children: [
|
|
@@ -120,10 +121,10 @@ const B = /*#__PURE__*/ u.forwardRef((o, e)=>{
|
|
|
120
121
|
/* @__PURE__ */ l(y, {
|
|
121
122
|
space: 8,
|
|
122
123
|
children: [
|
|
123
|
-
!!s && /* @__PURE__ */ i(H, _object_spread_props(_object_spread({},
|
|
124
|
+
!!s && /* @__PURE__ */ i(H, _object_spread_props(_object_spread({}, A), {
|
|
124
125
|
truncate: v,
|
|
125
126
|
weight: w.cardTitle.weight,
|
|
126
|
-
as:
|
|
127
|
+
as: f,
|
|
127
128
|
hyphens: "auto",
|
|
128
129
|
children: s
|
|
129
130
|
})),
|
|
@@ -158,8 +159,8 @@ const B = /*#__PURE__*/ u.forwardRef((o, e)=>{
|
|
|
158
159
|
style: {
|
|
159
160
|
backgroundImage: `url(${a})`,
|
|
160
161
|
backgroundRepeat: "no-repeat",
|
|
161
|
-
backgroundSize:
|
|
162
|
-
backgroundPosition:
|
|
162
|
+
backgroundSize: o === "fit" ? "contain" : "cover",
|
|
163
|
+
backgroundPosition: o === "fit" ? "bottom right" : `center ${o === "fill-center" ? "center" : "right"}`
|
|
163
164
|
}
|
|
164
165
|
}))
|
|
165
166
|
]
|
|
@@ -169,20 +170,20 @@ const B = /*#__PURE__*/ u.forwardRef((o, e)=>{
|
|
|
169
170
|
children: c
|
|
170
171
|
})) : c;
|
|
171
172
|
}), F = /*#__PURE__*/ u.forwardRef((_param, s)=>{
|
|
172
|
-
var { "aria-label":
|
|
173
|
+
var { "aria-label": n } = _param, e = _object_without_properties(_param, [
|
|
173
174
|
"aria-label"
|
|
174
175
|
]);
|
|
175
176
|
var _e_isInverse;
|
|
176
|
-
const r =
|
|
177
|
-
return /* @__PURE__ */ i(
|
|
177
|
+
const r = n || e.title || e.description, a = g(), o = (_e_isInverse = e.isInverse) !== null && _e_isInverse !== void 0 ? _e_isInverse : a;
|
|
178
|
+
return /* @__PURE__ */ i(N, {
|
|
178
179
|
onClose: e.onClose,
|
|
179
180
|
"aria-label": r,
|
|
180
181
|
width: e.width,
|
|
181
|
-
variant: e.imageUrl ? "media" :
|
|
182
|
+
variant: e.imageUrl ? "media" : o ? "inverse" : void 0,
|
|
182
183
|
children: /* @__PURE__ */ i(B, _object_spread_props(_object_spread({}, e), {
|
|
183
184
|
"aria-label": r,
|
|
184
185
|
ref: s
|
|
185
186
|
}))
|
|
186
187
|
});
|
|
187
|
-
}),
|
|
188
|
-
export {
|
|
188
|
+
}), X = F;
|
|
189
|
+
export { X as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import "./sprinkles.css.ts.vanilla.css-mistica.js";
|
|
2
2
|
import "./list.css.ts.vanilla.css-mistica.js";
|
|
3
|
-
var _ = "_1y2v1nfhk _1y2v1nfi2 _1y2v1nfi4", f = "_1y2v1nfhk _1y2v1nfhz _1y2v1nfht _1y2v1nfja _1y2v1nfio _1y2v1nfi2",
|
|
4
|
-
export { _ as asset, f as
|
|
3
|
+
var _ = "_1y2v1nfhk _1y2v1nfi2 _1y2v1nfi4", f = "_1y2v1nfbj", y = "_1y2v1nfhk _1y2v1nfhz _1y2v1nfht _1y2v1nfja _1y2v1nfio _1y2v1nfi2", a = "_1y2v1nfhk _1y2v1nfhz", r = "_1y2v1nf7s _1y2v1nf91 _1y2v1nfhk _1y2v1nfi7 _1y2v1nfjx", i = "_2buj9gh _1y2v1nfhk _1y2v1nfhz", t = "_2buj9gg", o = "_2buj9g0", h = "_1y2v1nfhk _1y2v1nfhp _1y2v1nfio", e = "_2buj9gn _1y2v1nfhk", b = "_1y2v1nf7d _1y2v1nf8m _1y2v1nf9v _1y2v1nfb4 _1y2v1nfk2 _1y2v1nf7c _1y2v1nfaa _1y2v1nfbj _1y2v1nfhm _1y2v1nfi5", d = "_2buj9gp _1y2v1nf7d _1y2v1nf8m _1y2v1nf9v _1y2v1nfb4 _1y2v1nfk2 _1y2v1nf7c _1y2v1nfaa _1y2v1nfbj _1y2v1nfhk _1y2v1nfhz _1y2v1nfi4 _1y2v1nfi8 _1y2v1nfio", g = "_1y2v1nfkk", u = "_2buj9ge", k = "_2buj9gf", j = "_1y2v1nfi7", c = "_1y2v1nfhk _1y2v1nfhq _1y2v1nfi6", l = "_1y2v1nf7d _1y2v1nf8m _1y2v1nf9v _1y2v1nfb4 _1y2v1nfi7 _1y2v1nfk2 _1y2v1nf7c _1y2v1nfhm _1y2v1nfio", s = "_1y2v1nfaa _1y2v1nfbj", m = "_2buj9g2", p = "_2buj9g3";
|
|
4
|
+
export { _ as asset, f as assetContainer, y as badge, a as center, r as content, i as detail, t as detailRight, o as disabled, h as dualActionContainer, e as dualActionDivider, b as dualActionLeft, d as dualActionRight, g as pointer, u as rightContent, k as rightRestrictedWidth, j as row, c as rowBody, l as rowContent, s as rowContentPadding, m as touchableBackground, p as touchableBackgroundInverse };
|