@telefonica/mistica 16.2.0 → 16.3.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.
Files changed (51) hide show
  1. package/css/mistica.css +1 -1
  2. package/dist/card.css-mistica.js +33 -21
  3. package/dist/card.css.d.ts +4 -0
  4. package/dist/card.js +235 -263
  5. package/dist/chip.css-mistica.js +19 -7
  6. package/dist/chip.css.d.ts +2 -0
  7. package/dist/chip.js +33 -49
  8. package/dist/community/advanced-data-card.css-mistica.js +24 -24
  9. package/dist/community/advanced-data-card.css.d.ts +1 -1
  10. package/dist/community/advanced-data-card.js +45 -48
  11. package/dist/empty-state-card.js +12 -11
  12. package/dist/hero.js +25 -19
  13. package/dist/highlighted-card.js +15 -14
  14. package/dist/list.css-mistica.js +21 -15
  15. package/dist/list.css.d.ts +2 -0
  16. package/dist/list.js +97 -96
  17. package/dist/menu.css-mistica.js +9 -9
  18. package/dist/menu.js +9 -10
  19. package/dist/package-version.js +1 -1
  20. package/dist/sheet-common.js +3 -2
  21. package/dist/table.js +52 -51
  22. package/dist/tag.css-mistica.js +1 -1
  23. package/dist/tag.js +9 -10
  24. package/dist/text-props.d.ts +60 -0
  25. package/dist/text-props.js +93 -0
  26. package/dist/text.d.ts +0 -62
  27. package/dist/text.js +156 -219
  28. package/dist/title.js +10 -9
  29. package/dist-es/card.css-mistica.js +4 -4
  30. package/dist-es/card.js +343 -371
  31. package/dist-es/chip.css-mistica.js +10 -4
  32. package/dist-es/chip.js +44 -60
  33. package/dist-es/community/advanced-data-card.css-mistica.js +7 -7
  34. package/dist-es/community/advanced-data-card.js +74 -77
  35. package/dist-es/empty-state-card.js +17 -16
  36. package/dist-es/hero.js +53 -47
  37. package/dist-es/highlighted-card.js +19 -18
  38. package/dist-es/list.css-mistica.js +2 -2
  39. package/dist-es/list.js +141 -140
  40. package/dist-es/menu.css-mistica.js +3 -3
  41. package/dist-es/menu.js +21 -22
  42. package/dist-es/package-version.js +1 -1
  43. package/dist-es/sheet-common.js +12 -11
  44. package/dist-es/style.css +1 -1
  45. package/dist-es/table.js +89 -88
  46. package/dist-es/tag.css-mistica.js +1 -1
  47. package/dist-es/tag.js +14 -15
  48. package/dist-es/text-props.js +52 -0
  49. package/dist-es/text.js +171 -231
  50. package/dist-es/title.js +14 -13
  51. package/package.json +3 -3
package/dist/hero.js CHANGED
@@ -167,8 +167,8 @@ const O = {
167
167
  backgroundColor: t !== null && t !== void 0 ? t : "transparent",
168
168
  children: e
169
169
  });
170
- }, b = (param)=>{
171
- let { headline: e, title: o, titleAs: t = "h1", pretitle: l, description: c, descriptionLinesMax: a, extra: n, button: d, secondaryButton: u, buttonLink: s } = param;
170
+ }, x = (param)=>{
171
+ let { headline: e, title: o, titleAs: t = "h1", pretitle: l, description: c, descriptionLinesMax: a, extra: n, button: d, secondaryButton: p, buttonLink: s } = param;
172
172
  return /* @__PURE__ */ (0, _jsxruntime.jsxs)("section", {
173
173
  className: _herocssmistica.contentContainer,
174
174
  children: [
@@ -210,7 +210,7 @@ const O = {
210
210
  className: _herocssmistica.actions,
211
211
  children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_buttongroup.default, {
212
212
  primaryButton: d,
213
- secondaryButton: u,
213
+ secondaryButton: p,
214
214
  link: s
215
215
  })
216
216
  })
@@ -225,8 +225,8 @@ const O = {
225
225
  "dataAttributes",
226
226
  "noPaddingY"
227
227
  ]);
228
- const { isTabletOrSmaller: u } = (0, _hooks.useScreenSize)(), s = (0, _carousel.useSlideshowContext)(), f = !!(s != null && s.withBullets), w = (0, _themevariantcontext.useIsInverseOrMediaVariant)(), N = o === "none" ? w : o === "brand" || o === "brand-secondary";
229
- if (u) return /* @__PURE__ */ (0, _jsxruntime.jsx)(_responsivelayout.ResetResponsiveLayout, {
228
+ const { isTabletOrSmaller: p } = (0, _hooks.useScreenSize)(), s = (0, _carousel.useSlideshowContext)(), u = !!(s != null && s.withBullets), w = (0, _themevariantcontext.useIsInverseOrMediaVariant)(), B = o === "none" ? w : o === "brand" || o === "brand-secondary";
229
+ if (p) return /* @__PURE__ */ (0, _jsxruntime.jsx)(_responsivelayout.ResetResponsiveLayout, {
230
230
  children: /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
231
231
  style: (0, _css.applyCssVars)({
232
232
  [_imagecssmistica.vars.mediaBorderRadius]: "0px"
@@ -247,15 +247,17 @@ const O = {
247
247
  children: [
248
248
  t,
249
249
  /* @__PURE__ */ (0, _jsxruntime.jsx)(k, {
250
- isInverse: N,
250
+ isInverse: B,
251
251
  backgroundColor: O[o],
252
252
  children: /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
253
253
  className: _herocssmistica.expandedContent,
254
- children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
255
- paddingTop: 24,
256
- paddingBottom: f ? 48 : a ? 0 : 24,
254
+ children: /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
255
+ style: {
256
+ paddingTop: 24,
257
+ paddingBottom: u ? 48 : a ? 0 : 24
258
+ },
257
259
  className: _herocssmistica.layout,
258
- children: /* @__PURE__ */ (0, _jsxruntime.jsx)(b, _object_spread({}, n))
260
+ children: /* @__PURE__ */ (0, _jsxruntime.jsx)(x, _object_spread({}, n))
259
261
  })
260
262
  })
261
263
  })
@@ -265,10 +267,10 @@ const O = {
265
267
  });
266
268
  const I = l === "left" ? t : /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
267
269
  paddingRight: 24,
268
- children: /* @__PURE__ */ (0, _jsxruntime.jsx)(b, _object_spread({}, n))
270
+ children: /* @__PURE__ */ (0, _jsxruntime.jsx)(x, _object_spread({}, n))
269
271
  }), L = l === "right" ? t : /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
270
272
  paddingLeft: 24,
271
- children: /* @__PURE__ */ (0, _jsxruntime.jsx)(b, _object_spread({}, n))
273
+ children: /* @__PURE__ */ (0, _jsxruntime.jsx)(x, _object_spread({}, n))
272
274
  });
273
275
  return /* @__PURE__ */ (0, _jsxruntime.jsx)("div", _object_spread_props(_object_spread({}, (0, _dom.getPrefixedDataAttributes)(_object_spread({
274
276
  "component-name": "Hero"
@@ -284,20 +286,24 @@ const O = {
284
286
  }),
285
287
  className: _herocssmistica.hero,
286
288
  children: /* @__PURE__ */ (0, _jsxruntime.jsx)(k, {
287
- isInverse: N,
289
+ isInverse: B,
288
290
  children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_gridlayout.default, {
289
291
  template: "6+6",
290
- left: /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
291
- paddingTop: a ? 0 : 56,
292
- paddingBottom: a && !f ? 0 : 56,
292
+ left: /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
293
+ style: {
294
+ paddingTop: a ? 0 : 56,
295
+ paddingBottom: a && !u ? 0 : 56
296
+ },
293
297
  className: (0, _classnames.default)(_herocssmistica.container, _herocssmistica.containerDesktop, {
294
298
  [_herocssmistica.containerMinHeight]: !a
295
299
  }),
296
300
  children: I
297
301
  }),
298
- right: /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
299
- paddingTop: a ? 0 : 56,
300
- paddingBottom: a && !f ? 0 : 56,
302
+ right: /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
303
+ style: {
304
+ paddingTop: a ? 0 : 56,
305
+ paddingBottom: a && !u ? 0 : 56
306
+ },
301
307
  className: (0, _classnames.default)(_herocssmistica.container, _herocssmistica.containerDesktop),
302
308
  children: L
303
309
  })
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  Object.defineProperty(exports, "default", {
7
7
  enumerable: true,
8
8
  get: function() {
9
- return W;
9
+ return X;
10
10
  }
11
11
  });
12
12
  const _jsxruntime = require("react/jsx-runtime");
@@ -15,6 +15,7 @@ const _themevariantcontext = require("./theme-variant-context.js");
15
15
  const _stack = /*#__PURE__*/ _interop_require_default(require("./stack.js"));
16
16
  const _touchable = require("./touchable.js");
17
17
  const _text = require("./text.js");
18
+ const _textprops = require("./text-props.js");
18
19
  const _boxed = require("./boxed.js");
19
20
  const _maybedismissable = /*#__PURE__*/ _interop_require_wildcard(require("./maybe-dismissable.js"));
20
21
  const _highlightedcardcssmistica = require("./highlighted-card.css-mistica.js");
@@ -145,9 +146,9 @@ function _object_without_properties_loose(source, excluded) {
145
146
  }
146
147
  return target;
147
148
  }
148
- const B = /*#__PURE__*/ _react.forwardRef((o, e)=>{
149
- var _o_isInverse;
150
- const { title: s, description: r, imageUrl: a, imageFit: n, imageAlt: m, titleAs: b = "h3", width: d, dataAttributes: f, titleLinesMax: v, descriptionLinesMax: x } = o, t = _object_without_properties(o, [
149
+ const B = /*#__PURE__*/ _react.forwardRef((n, e)=>{
150
+ var _n_isInverse;
151
+ 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, [
151
152
  "title",
152
153
  "description",
153
154
  "imageUrl",
@@ -158,13 +159,13 @@ const B = /*#__PURE__*/ _react.forwardRef((o, e)=>{
158
159
  "dataAttributes",
159
160
  "titleLinesMax",
160
161
  "descriptionLinesMax"
161
- ]), I = (0, _themevariantcontext.useIsInverseOrMediaVariant)(), p = (_o_isInverse = o.isInverse) !== null && _o_isInverse !== void 0 ? _o_isInverse : I, h = (0, _maybedismissable.useIsDismissable)(), { textPresets: w } = (0, _hooks.useTheme)(), c = /* @__PURE__ */ (0, _jsxruntime.jsxs)(_boxed.Boxed, {
162
+ ]), I = (0, _themevariantcontext.useIsInverseOrMediaVariant)(), p = (_n_isInverse = n.isInverse) !== null && _n_isInverse !== void 0 ? _n_isInverse : I, h = (0, _maybedismissable.useIsDismissable)(), { textPresets: w } = (0, _hooks.useTheme)(), c = /* @__PURE__ */ (0, _jsxruntime.jsxs)(_boxed.Boxed, {
162
163
  ref: e,
163
164
  isInverse: p,
164
165
  className: _highlightedcardcssmistica.container,
165
166
  dataAttributes: _object_spread({
166
167
  "component-name": "HighlightedCard"
167
- }, f),
168
+ }, b),
168
169
  width: d ? `${d}px` : "100%",
169
170
  minHeight: "100%",
170
171
  children: [
@@ -176,10 +177,10 @@ const B = /*#__PURE__*/ _react.forwardRef((o, e)=>{
176
177
  /* @__PURE__ */ (0, _jsxruntime.jsxs)(_stack.default, {
177
178
  space: 8,
178
179
  children: [
179
- !!s && /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text, _object_spread_props(_object_spread({}, _text.textProps.text4), {
180
+ !!s && /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text, _object_spread_props(_object_spread({}, _textprops.text4), {
180
181
  truncate: v,
181
182
  weight: w.cardTitle.weight,
182
- as: b,
183
+ as: f,
183
184
  hyphens: "auto",
184
185
  children: s
185
186
  })),
@@ -214,8 +215,8 @@ const B = /*#__PURE__*/ _react.forwardRef((o, e)=>{
214
215
  style: {
215
216
  backgroundImage: `url(${a})`,
216
217
  backgroundRepeat: "no-repeat",
217
- backgroundSize: n === "fit" ? "contain" : "cover",
218
- backgroundPosition: n === "fit" ? "bottom right" : `center ${n === "fill-center" ? "center" : "right"}`
218
+ backgroundSize: o === "fit" ? "contain" : "cover",
219
+ backgroundPosition: o === "fit" ? "bottom right" : `center ${o === "fill-center" ? "center" : "right"}`
219
220
  }
220
221
  }))
221
222
  ]
@@ -225,19 +226,19 @@ const B = /*#__PURE__*/ _react.forwardRef((o, e)=>{
225
226
  children: c
226
227
  })) : c;
227
228
  }), F = /*#__PURE__*/ _react.forwardRef((_param, s)=>{
228
- var { "aria-label": o } = _param, e = _object_without_properties(_param, [
229
+ var { "aria-label": n } = _param, e = _object_without_properties(_param, [
229
230
  "aria-label"
230
231
  ]);
231
232
  var _e_isInverse;
232
- const r = o || e.title || e.description, a = (0, _themevariantcontext.useIsInverseOrMediaVariant)(), n = (_e_isInverse = e.isInverse) !== null && _e_isInverse !== void 0 ? _e_isInverse : a;
233
+ const r = n || e.title || e.description, a = (0, _themevariantcontext.useIsInverseOrMediaVariant)(), o = (_e_isInverse = e.isInverse) !== null && _e_isInverse !== void 0 ? _e_isInverse : a;
233
234
  return /* @__PURE__ */ (0, _jsxruntime.jsx)(_maybedismissable.default, {
234
235
  onClose: e.onClose,
235
236
  "aria-label": r,
236
237
  width: e.width,
237
- variant: e.imageUrl ? "media" : n ? "inverse" : void 0,
238
+ variant: e.imageUrl ? "media" : o ? "inverse" : void 0,
238
239
  children: /* @__PURE__ */ (0, _jsxruntime.jsx)(B, _object_spread_props(_object_spread({}, e), {
239
240
  "aria-label": r,
240
241
  ref: s
241
242
  }))
242
243
  });
243
- }), W = F;
244
+ }), X = F;
@@ -12,61 +12,67 @@ _export(exports, {
12
12
  asset: function() {
13
13
  return _;
14
14
  },
15
- badge: function() {
15
+ assetContainer: function() {
16
16
  return f;
17
17
  },
18
- center: function() {
18
+ badge: function() {
19
19
  return y;
20
20
  },
21
- content: function() {
21
+ center: function() {
22
22
  return a;
23
23
  },
24
- detail: function() {
24
+ content: function() {
25
25
  return r;
26
26
  },
27
- detailRight: function() {
27
+ detail: function() {
28
28
  return i;
29
29
  },
30
- disabled: function() {
30
+ detailRight: function() {
31
31
  return t;
32
32
  },
33
+ disabled: function() {
34
+ return o;
35
+ },
33
36
  dualActionContainer: function() {
34
37
  return h;
35
38
  },
36
39
  dualActionDivider: function() {
37
- return o;
40
+ return e;
38
41
  },
39
42
  dualActionLeft: function() {
40
- return e;
43
+ return b;
41
44
  },
42
45
  dualActionRight: function() {
43
46
  return d;
44
47
  },
45
48
  pointer: function() {
46
- return b;
49
+ return g;
47
50
  },
48
51
  rightContent: function() {
49
52
  return u;
50
53
  },
51
54
  rightRestrictedWidth: function() {
52
- return g;
55
+ return k;
53
56
  },
54
57
  row: function() {
55
- return k;
58
+ return j;
56
59
  },
57
60
  rowBody: function() {
58
61
  return c;
59
62
  },
60
63
  rowContent: function() {
61
- return j;
64
+ return l;
65
+ },
66
+ rowContentPadding: function() {
67
+ return s;
62
68
  },
63
69
  touchableBackground: function() {
64
- return l;
70
+ return m;
65
71
  },
66
72
  touchableBackgroundInverse: function() {
67
- return m;
73
+ return p;
68
74
  }
69
75
  });
70
76
  require("./sprinkles.css.ts.vanilla.css-mistica.js");
71
77
  require("./list.css.ts.vanilla.css-mistica.js");
72
- var _ = "_1y2v1nfhk _1y2v1nfi2 _1y2v1nfi4", f = "_1y2v1nfhk _1y2v1nfhz _1y2v1nfht _1y2v1nfja _1y2v1nfio _1y2v1nfi2", y = "_1y2v1nfhk _1y2v1nfhz", a = "_1y2v1nfhk _1y2v1nfi7 _1y2v1nfjx", r = "_2buj9gf _1y2v1nfhk _1y2v1nfhz", i = "_2buj9ge", t = "_2buj9g0", h = "_1y2v1nfhk _1y2v1nfhp _1y2v1nfio", o = "_2buj9gl _1y2v1nfhk", e = "_1y2v1nf7d _1y2v1nf8m _1y2v1nf9v _1y2v1nfb4 _1y2v1nfk2 _1y2v1nf7c _1y2v1nfaa _1y2v1nfbj _1y2v1nfhm _1y2v1nfi5", d = "_2buj9gn _1y2v1nf7d _1y2v1nf8m _1y2v1nf9v _1y2v1nfb4 _1y2v1nfk2 _1y2v1nf7c _1y2v1nfaa _1y2v1nfbj _1y2v1nfhk _1y2v1nfhz _1y2v1nfi4 _1y2v1nfi8 _1y2v1nfio", b = "_1y2v1nfkk", u = "_2buj9gc", g = "_2buj9gd", k = "_1y2v1nfi7", c = "_1y2v1nfhk _1y2v1nfhq _1y2v1nfi6", j = "_1y2v1nf7d _1y2v1nf8m _1y2v1nf9v _1y2v1nfb4 _1y2v1nfi7 _1y2v1nfk2 _1y2v1nf7c _1y2v1nfhm _1y2v1nfio", l = "_2buj9g2", m = "_2buj9g3";
78
+ 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,7 +4,9 @@ export declare const touchableBackground: string;
4
4
  export declare const touchableBackgroundInverse: string;
5
5
  export declare const pointer: string;
6
6
  export declare const rowContent: string;
7
+ export declare const rowContentPadding: string;
7
8
  export declare const content: string;
9
+ export declare const assetContainer: string;
8
10
  export declare const asset: string;
9
11
  export declare const rowBody: string;
10
12
  export declare const center: string;