@telefonica/mistica 15.7.0 → 15.9.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.
Files changed (39) hide show
  1. package/css/mistica.css +1 -1
  2. package/dist/accordion.d.ts +4 -6
  3. package/dist/accordion.js +99 -92
  4. package/dist/community/blocks.js +1 -0
  5. package/dist/empty-state.js +7 -6
  6. package/dist/icon-button.d.ts +17 -16
  7. package/dist/icon-button.js +51 -49
  8. package/dist/icons/icon-chevron.css-mistica.js +25 -0
  9. package/dist/icons/icon-chevron.css.d.ts +5 -0
  10. package/dist/icons/icon-chevron.css.ts.vanilla.css-mistica.js +11 -0
  11. package/dist/icons/icon-chevron.js +27 -20
  12. package/dist/image.js +13 -12
  13. package/dist/list.css-mistica.js +11 -11
  14. package/dist/list.css.d.ts +1 -3
  15. package/dist/list.d.ts +8 -16
  16. package/dist/list.js +275 -383
  17. package/dist/package-version.js +1 -1
  18. package/dist/progress-bar.d.ts +2 -0
  19. package/dist/progress-bar.js +44 -35
  20. package/dist/stacking-group.js +7 -7
  21. package/dist/text-field-components.js +4 -4
  22. package/dist/utils/aspect-ratio-support.js +18 -18
  23. package/dist-es/accordion.js +131 -121
  24. package/dist-es/community/blocks.js +1 -0
  25. package/dist-es/empty-state.js +9 -8
  26. package/dist-es/icon-button.js +64 -62
  27. package/dist-es/icons/icon-chevron.css-mistica.js +5 -0
  28. package/dist-es/icons/icon-chevron.css.ts.vanilla.css-mistica.js +2 -0
  29. package/dist-es/icons/icon-chevron.js +26 -24
  30. package/dist-es/image.js +19 -18
  31. package/dist-es/list.css-mistica.js +2 -2
  32. package/dist-es/list.js +321 -429
  33. package/dist-es/package-version.js +1 -1
  34. package/dist-es/progress-bar.js +54 -45
  35. package/dist-es/stacking-group.js +14 -14
  36. package/dist-es/style.css +1 -1
  37. package/dist-es/text-field-components.js +11 -11
  38. package/dist-es/utils/aspect-ratio-support.js +22 -22
  39. package/package.json +1 -1
@@ -26,44 +26,46 @@ function _object_spread(target) {
26
26
  }
27
27
  return target;
28
28
  }
29
- import { jsx as s } from "react/jsx-runtime";
30
- import { vars as c } from "../skins/skin-contract.css-mistica.js";
31
- const h = (param)=>{
32
- let { size: o, color: r, transform: n, transitionDuration: t, className: e, style: l } = param;
33
- return /* @__PURE__ */ s("svg", {
29
+ import { jsx as e } from "react/jsx-runtime";
30
+ import c from "classnames";
31
+ import { vars as m } from "../skins/skin-contract.css-mistica.js";
32
+ import { applyCssVars as h } from "../utils/css.js";
33
+ import { chevronRotateTransition as p, vars as v, chevronColorTransition as f } from "./icon-chevron.css-mistica.js";
34
+ const g = (param)=>{
35
+ let { size: o, color: r, transform: t, transitionDuration: n, className: s, style: a } = param;
36
+ return /* @__PURE__ */ e("svg", {
34
37
  role: "presentation",
35
38
  width: o,
36
39
  height: o,
37
40
  viewBox: "0 0 24 24",
38
- className: e,
41
+ className: c(s, p),
39
42
  style: _object_spread({
40
- transform: n,
41
- transition: `transform ${t}ms`
42
- }, l),
43
- children: /* @__PURE__ */ s("path", {
44
- style: {
45
- transition: `fill ${t}ms`
46
- },
43
+ transform: t
44
+ }, a, h({
45
+ [v.transitionDuration]: `${n}ms`
46
+ })),
47
+ children: /* @__PURE__ */ e("path", {
48
+ className: f,
47
49
  fill: r,
48
50
  fillRule: "evenodd",
49
51
  d: "M14.338 11.478a.75.75 0 0 1 0 1.044l-3.837 3.997a.75.75 0 1 1-1.082-1.038L12.76 12 9.42 8.52a.75.75 0 0 1 1.082-1.04l3.837 3.998z"
50
52
  })
51
53
  });
52
- }, f = {
54
+ }, d = {
53
55
  up: -90,
54
56
  down: 90,
55
57
  left: 180,
56
58
  right: 0
57
- }, g = (param)=>{
58
- let { size: o = 24, color: r, className: n, style: t, transitionDuration: e = 300, direction: l = "right" } = param;
59
- const i = r || c.colors.neutralHigh, a = {
59
+ }, u = (param)=>{
60
+ let { size: o = 24, color: r, className: t, style: n, transitionDuration: s = 300, direction: a = "right" } = param;
61
+ const i = r || m.colors.neutralHigh, l = {
60
62
  size: o,
61
63
  color: i,
62
- transform: `rotate(${f[l]}deg)`,
63
- className: n,
64
- transitionDuration: e,
65
- style: t
64
+ transform: `rotate(${d[a]}deg)`,
65
+ className: t,
66
+ transitionDuration: s,
67
+ style: n
66
68
  };
67
- return /* @__PURE__ */ s(h, _object_spread({}, a));
68
- }, p = g;
69
- export { p as default };
69
+ return /* @__PURE__ */ e(g, _object_spread({}, l));
70
+ }, I = u;
71
+ export { I as default };
package/dist-es/image.js CHANGED
@@ -78,10 +78,10 @@ function _object_without_properties_loose(source, excluded) {
78
78
  }
79
79
  return target;
80
80
  }
81
- import { jsx as t, jsxs as k, Fragment as S } from "react/jsx-runtime";
81
+ import { jsx as t, jsxs as k, Fragment as A } from "react/jsx-runtime";
82
82
  import * as r from "react";
83
- import L from "classnames";
84
- import { SkeletonAnimation as N } from "./skeletons.js";
83
+ import F from "classnames";
84
+ import { SkeletonAnimation as L } from "./skeletons.js";
85
85
  import { AspectRatioContainer as W } from "./utils/aspect-ratio-support.js";
86
86
  import { getPrefixedDataAttributes as M } from "./utils/dom.js";
87
87
  import { useIsInverseVariant as V } from "./theme-variant-context.js";
@@ -145,13 +145,13 @@ const Y = (param)=>{
145
145
  })
146
146
  }) : void 0
147
147
  });
148
- }), x = {
148
+ }), S = {
149
149
  "1:1": 1,
150
150
  "16:9": 16 / 9,
151
151
  "7:10": 7 / 10,
152
152
  "4:3": 4 / 3
153
- }, A = "1:1", e1 = /*#__PURE__*/ r.forwardRef((_param, H)=>{
154
- var { aspectRatio: e = A, alt: n = "", dataAttributes: d, noBorderRadius: h, src: o, srcSet: c, onError: s, onLoad: l, loadingFallback: B = !0, errorFallback: E = !0 } = _param, i = _object_without_properties(_param, [
153
+ }, x = "1:1", e1 = /*#__PURE__*/ r.forwardRef((_param, N)=>{
154
+ var { aspectRatio: e = x, alt: n = "", dataAttributes: d, noBorderRadius: h, src: o, srcSet: c, onError: s, onLoad: l, loadingFallback: B = !0, errorFallback: E = !0 } = _param, i = _object_without_properties(_param, [
155
155
  "aspectRatio",
156
156
  "alt",
157
157
  "dataAttributes",
@@ -164,7 +164,7 @@ const Y = (param)=>{
164
164
  "errorFallback"
165
165
  ]);
166
166
  var y;
167
- const u = O(), m = r.useRef(), f = i.circular ? P : h ? U : K, [v, g] = r.useState(!o), [T, C] = r.useState(!1), b = i.width && i.height ? void 0 : i.circular ? 1 : typeof e == "number" ? e : x[e], w = B && !!(b !== 0 || i.width && i.height), _ = E && !!(b !== 0 || i.width && i.height), I = r.useCallback(()=>{
167
+ const u = O(), m = r.useRef(), f = i.circular ? P : h ? U : K, [v, g] = r.useState(!o), [H, C] = r.useState(!1), b = i.width && i.height ? void 0 : i.circular ? 1 : typeof e == "number" ? e : S[e], w = B && !!(b !== 0 || i.width && i.height), T = E && !!(b !== 0 || i.width && i.height), I = r.useCallback(()=>{
168
168
  g(!1), m.current && (m.current.style.opacity = "1"), setTimeout(()=>{
169
169
  C(!0);
170
170
  }, Z), l == null || l();
@@ -181,18 +181,18 @@ const Y = (param)=>{
181
181
  }, [
182
182
  I
183
183
  ]);
184
- const z = X() || !((y = document.getElementById(u)) != null && y.complete), F = /* @__PURE__ */ k(S, {
184
+ const _ = X() || !((y = document.getElementById(u)) != null && y.complete), z = /* @__PURE__ */ k(A, {
185
185
  children: [
186
186
  /* @__PURE__ */ t("img", {
187
187
  suppressHydrationWarning: !0,
188
188
  id: u,
189
189
  style: {
190
- opacity: z && w ? 0 : 1
190
+ opacity: _ && w ? 0 : 1
191
191
  },
192
- ref: J(m, H),
192
+ ref: J(m, N),
193
193
  src: o,
194
194
  srcSet: c,
195
- className: L(f, q, {
195
+ className: F(f, q, {
196
196
  [G]: i.border
197
197
  }, $({
198
198
  position: b !== 0 ? "absolute" : "static"
@@ -212,9 +212,9 @@ const Y = (param)=>{
212
212
  ]
213
213
  });
214
214
  var _i_height, _i_width;
215
- return /* @__PURE__ */ k(S, {
215
+ return /* @__PURE__ */ k(A, {
216
216
  children: [
217
- w && !T && /* @__PURE__ */ t("div", {
217
+ w && !H && /* @__PURE__ */ t("div", {
218
218
  style: {
219
219
  position: "absolute",
220
220
  width: "100%",
@@ -222,7 +222,7 @@ const Y = (param)=>{
222
222
  overflow: "hidden"
223
223
  },
224
224
  className: f,
225
- children: /* @__PURE__ */ t(N, {
225
+ children: /* @__PURE__ */ t(L, {
226
226
  height: (_i_height = i.height) !== null && _i_height !== void 0 ? _i_height : "100%",
227
227
  width: (_i_width = i.width) !== null && _i_width !== void 0 ? _i_width : "100%",
228
228
  children: /* @__PURE__ */ t(Q, {
@@ -232,7 +232,7 @@ const Y = (param)=>{
232
232
  })
233
233
  })
234
234
  }),
235
- v && _ && /* @__PURE__ */ t("div", {
235
+ v && T && /* @__PURE__ */ t("div", {
236
236
  style: {
237
237
  position: "absolute",
238
238
  width: "100%",
@@ -244,12 +244,12 @@ const Y = (param)=>{
244
244
  className: f
245
245
  })
246
246
  }),
247
- !v && F
247
+ !v && z
248
248
  ]
249
249
  });
250
250
  }), t1 = /*#__PURE__*/ r.forwardRef((e, n)=>{
251
251
  var _e_aspectRatio;
252
- const d = e.width && e.height ? void 0 : e.circular ? 1 : typeof e.aspectRatio == "number" ? e.aspectRatio : x[(_e_aspectRatio = e.aspectRatio) !== null && _e_aspectRatio !== void 0 ? _e_aspectRatio : A];
252
+ const d = e.width && e.height ? void 0 : e.circular ? 1 : typeof e.aspectRatio == "number" ? e.aspectRatio : S[(_e_aspectRatio = e.aspectRatio) !== null && _e_aspectRatio !== void 0 ? _e_aspectRatio : x];
253
253
  return /* @__PURE__ */ t(W, {
254
254
  style: {
255
255
  position: "relative"
@@ -258,9 +258,10 @@ const Y = (param)=>{
258
258
  width: e.width,
259
259
  height: e.height,
260
260
  dataAttributes: M(e.dataAttributes, "Image"),
261
+ forceNonCssAspectRatio: e.forceNonCssAspectRatio,
261
262
  children: /* @__PURE__ */ t(e1, _object_spread_props(_object_spread({}, e), {
262
263
  ref: n
263
264
  }))
264
265
  });
265
266
  }), C1 = t1;
266
- export { e1 as ImageContent, p as ImageError, x as RATIO, C1 as default };
267
+ export { e1 as ImageContent, p as ImageError, S as RATIO, C1 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 = "_1y2v1nfht _1y2v1nfja _1y2v1nfio _1y2v1nfi2", y = "_1y2v1nfhk _1y2v1nfhz", a = "_1y2v1nfhk _1y2v1nfi7 _1y2v1nfjx", r = "_2buj9gf", i = "_2buj9ge", t = "_2buj9g0", o = "_1y2v1nfhk _1y2v1nfhp _1y2v1nfio", e = "_2buj9gm _1y2v1nfhk", h = "_1y2v1nf7d _1y2v1nf8m _1y2v1nf9v _1y2v1nfb4 _1y2v1nfk2 _1y2v1nf7c _1y2v1nfaa _1y2v1nfbj _1y2v1nfhm _1y2v1nfi5", d = "_2buj9go _1y2v1nf7d _1y2v1nf8m _1y2v1nf9v _1y2v1nfb4 _1y2v1nfk2 _1y2v1nf7c _1y2v1nfaa _1y2v1nfbj _1y2v1nfhk _1y2v1nfhz _1y2v1nfi4 _1y2v1nfi8 _1y2v1nfio", b = "_1y2v1nfkk", u = "_2buj9gc", g = "_2buj9gd", c = "_1y2v1nfhk _1y2v1nfhq _1y2v1nfi6", k = "_1y2v1nf7d _1y2v1nf8m _1y2v1nf9v _1y2v1nfb4 _1y2v1nfi7 _1y2v1nfk2 _1y2v1nf7c _1y2v1nfhm _1y2v1nfio", j = "_2buj9g1", l = "_2buj9g2";
4
- export { _ as asset, f as badge, y as center, a as content, r as detail, i as detailRight, t as disabled, o as dualActionContainer, e as dualActionDivider, h as dualActionLeft, d as dualActionRight, b as pointer, u as right, g as rightRestrictedWidth, c as rowBody, k as rowContent, j as touchableBackground, l as touchableBackgroundInverse };
3
+ var _ = "_1y2v1nfhk _1y2v1nfi2 _1y2v1nfi4", f = "_1y2v1nfhk _1y2v1nfhz _1y2v1nfht _1y2v1nfja _1y2v1nfio _1y2v1nfi2", y = "_1y2v1nfhk _1y2v1nfhz", a = "_1y2v1nfhk _1y2v1nfi7 _1y2v1nfjx", r = "_2buj9ge _1y2v1nfhk _1y2v1nfhz", i = "_2buj9gd", t = "_2buj9g0", h = "_1y2v1nfhk _1y2v1nfhp _1y2v1nfio", o = "_2buj9gk _1y2v1nfhk", e = "_1y2v1nf7d _1y2v1nf8m _1y2v1nf9v _1y2v1nfb4 _1y2v1nfk2 _1y2v1nf7c _1y2v1nfaa _1y2v1nfbj _1y2v1nfhm _1y2v1nfi5", b = "_2buj9gm _1y2v1nf7d _1y2v1nf8m _1y2v1nf9v _1y2v1nfb4 _1y2v1nfk2 _1y2v1nf7c _1y2v1nfaa _1y2v1nfbj _1y2v1nfhk _1y2v1nfhz _1y2v1nfi4 _1y2v1nfi8 _1y2v1nfio", d = "_1y2v1nfkk", k = "_2buj9gb", u = "_2buj9gc", g = "_1y2v1nfhk _1y2v1nfhq _1y2v1nfi6", c = "_1y2v1nf7d _1y2v1nf8m _1y2v1nf9v _1y2v1nfb4 _1y2v1nfi7 _1y2v1nfk2 _1y2v1nf7c _1y2v1nfhm _1y2v1nfio", j = "_2buj9g1", l = "_2buj9g2";
4
+ export { _ as asset, f as badge, y as center, a as content, r as detail, i as detailRight, t as disabled, h as dualActionContainer, o as dualActionDivider, e as dualActionLeft, b as dualActionRight, d as pointer, k as rightContent, u as rightRestrictedWidth, g as rowBody, c as rowContent, j as touchableBackground, l as touchableBackgroundInverse };