@telefonica/mistica 14.8.0 → 14.10.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 (38) hide show
  1. package/css/mistica.css +1 -1
  2. package/dist/chip.css-mistica.js +10 -9
  3. package/dist/chip.css.d.ts +1 -0
  4. package/dist/chip.d.ts +21 -2
  5. package/dist/chip.js +38 -25
  6. package/dist/circle.d.ts +1 -0
  7. package/dist/circle.js +9 -6
  8. package/dist/form.d.ts +1 -1
  9. package/dist/generated/mistica-icons/icon-chevron-left-light.js +11 -11
  10. package/dist/generated/mistica-icons/icon-chevron-left-regular.js +11 -11
  11. package/dist/generated/mistica-icons/icon-chevron-right-light.js +2 -2
  12. package/dist/generated/mistica-icons/icon-chevron-right-regular.js +2 -2
  13. package/dist/horizontal-scroll.css-mistica.js +18 -0
  14. package/dist/horizontal-scroll.css.d.ts +2 -0
  15. package/dist/horizontal-scroll.css.ts.vanilla.js +9 -0
  16. package/dist/horizontal-scroll.d.ts +7 -0
  17. package/dist/horizontal-scroll.js +66 -0
  18. package/dist/index.d.ts +2 -0
  19. package/dist/index.js +2 -0
  20. package/dist/list.js +56 -56
  21. package/dist/package-version.js +1 -1
  22. package/dist/tabs.js +14 -15
  23. package/dist-es/chip.css-mistica.js +6 -6
  24. package/dist-es/chip.js +57 -44
  25. package/dist-es/circle.js +12 -9
  26. package/dist-es/generated/mistica-icons/icon-chevron-left-light.js +12 -12
  27. package/dist-es/generated/mistica-icons/icon-chevron-left-regular.js +11 -11
  28. package/dist-es/generated/mistica-icons/icon-chevron-right-light.js +2 -2
  29. package/dist-es/generated/mistica-icons/icon-chevron-right-regular.js +2 -2
  30. package/dist-es/horizontal-scroll.css-mistica.js +5 -0
  31. package/dist-es/horizontal-scroll.css.ts.vanilla.js +2 -0
  32. package/dist-es/horizontal-scroll.js +15 -0
  33. package/dist-es/index.js +1708 -1707
  34. package/dist-es/list.js +75 -75
  35. package/dist-es/package-version.js +1 -1
  36. package/dist-es/style.css +1 -1
  37. package/dist-es/tabs.js +22 -23
  38. package/package.json +1 -1
package/dist-es/chip.js CHANGED
@@ -50,75 +50,88 @@ function _objectSpreadProps(target, source) {
50
50
  }
51
51
  return target;
52
52
  }
53
- import v from "classnames";
54
- import { useTheme as x } from "./hooks.js";
55
- import r from "./box.js";
56
- import { Text2 as C } from "./text.js";
57
- import y from "./icon-button.js";
58
- import A from "./generated/mistica-icons/icon-close-regular.js";
59
- import { pxToRem as R } from "./utils/css.js";
60
- import { iconActive as T, icon as b, chipVariants as i, chipInteractiveVariants as j } from "./chip.css-mistica.js";
61
- import { vars as z } from "./skins/skin-contract.css-mistica.js";
62
- import { getPrefixedDataAttributes as c } from "./utils/dom.js";
63
- import { useThemeVariant as B } from "./theme-variant-context.js";
64
- import { jsxs as d, Fragment as I, jsx as e } from "./_virtual/jsx-runtime.js";
65
- const H = (param)=>{
66
- let { Icon: t , children: p , id: f , dataAttributes: n , active: o , onClose: a } = param;
67
- const { texts: u , isDarkMode: h } = x(), s = B() === "alternative", m = /* @__PURE__ */ d(I, {
53
+ import k from "classnames";
54
+ import { useTheme as P } from "./hooks.js";
55
+ import n from "./box.js";
56
+ import { Text2 as T } from "./text.js";
57
+ import A from "./icon-button.js";
58
+ import E from "./generated/mistica-icons/icon-close-regular.js";
59
+ import { pxToRem as I } from "./utils/css.js";
60
+ import { iconActive as V, icon as w, chipVariants as a, button as y, chipInteractiveVariants as B } from "./chip.css-mistica.js";
61
+ import { vars as N } from "./skins/skin-contract.css-mistica.js";
62
+ import { getPrefixedDataAttributes as u } from "./utils/dom.js";
63
+ import { useThemeVariant as R } from "./theme-variant-context.js";
64
+ import { BaseTouchable as c } from "./touchable.js";
65
+ import { jsxs as h, Fragment as j, jsx as t } from "./_virtual/jsx-runtime.js";
66
+ const S = (e)=>{
67
+ const { Icon: i , children: v , id: g , dataAttributes: l , active: o , onClose: s } = e, { texts: b , isDarkMode: x } = P(), m = R() === "alternative", d = /* @__PURE__ */ h(j, {
68
68
  children: [
69
- t && /* @__PURE__ */ e(r, {
69
+ i && /* @__PURE__ */ t(n, {
70
70
  paddingRight: 4,
71
- className: o ? T : b,
72
- children: /* @__PURE__ */ e(t, {
71
+ className: o ? V : w,
72
+ children: /* @__PURE__ */ t(i, {
73
73
  color: "currentColor",
74
- size: R(16)
74
+ size: I(16)
75
75
  })
76
76
  }),
77
- /* @__PURE__ */ e(C, {
78
- id: f,
77
+ /* @__PURE__ */ t(T, {
78
+ id: g,
79
79
  medium: !0,
80
80
  truncate: 1,
81
81
  color: "currentColor",
82
- children: p
82
+ children: v
83
83
  })
84
84
  ]
85
- }), l = t ? 8 : 12;
86
- if (a) return /* @__PURE__ */ d(r, _objectSpreadProps(_objectSpread({
87
- className: s ? i.overAlternative : i.default,
88
- paddingLeft: l
89
- }, c(n, "Chip")), {
85
+ }), f = i ? 8 : 12;
86
+ if (s) return /* @__PURE__ */ h(n, _objectSpreadProps(_objectSpread({
87
+ className: m ? a.overAlternative : a.default,
88
+ paddingLeft: f
89
+ }, u(l, "Chip")), {
90
90
  children: [
91
- m,
92
- /* @__PURE__ */ e(r, {
91
+ d,
92
+ /* @__PURE__ */ t(n, {
93
93
  paddingLeft: 4,
94
- children: /* @__PURE__ */ e(y, {
94
+ children: /* @__PURE__ */ t(A, {
95
95
  size: 24,
96
96
  style: {
97
97
  display: "flex",
98
98
  justifyContent: "center",
99
99
  alignItems: "center"
100
100
  },
101
- "aria-label": u.closeButtonLabel,
102
- onPress: ()=>a(),
103
- children: /* @__PURE__ */ e(A, {
101
+ "aria-label": b.closeButtonLabel,
102
+ onPress: ()=>s(),
103
+ children: /* @__PURE__ */ t(E, {
104
104
  size: 16,
105
- color: z.colors.neutralMedium
105
+ color: N.colors.neutralMedium
106
106
  })
107
107
  })
108
108
  })
109
109
  ]
110
110
  }));
111
- {
112
- const g = o !== void 0;
113
- return /* @__PURE__ */ e(r, _objectSpreadProps(_objectSpread({
114
- className: v(i[o ? "active" : s ? "overAlternative" : "default"], {
115
- [j[h ? "dark" : "light"]]: g
111
+ const C = o !== void 0 || e.href || e.onPress || e.to, r = ()=>/* @__PURE__ */ t(n, _objectSpreadProps(_objectSpread({
112
+ className: k(a[o ? "active" : m ? "overAlternative" : "default"], {
113
+ [B[x ? "dark" : "light"]]: C
116
114
  }),
117
- paddingLeft: l,
115
+ paddingLeft: f,
118
116
  paddingRight: 12
119
- }, c(n, "Chip")), {
120
- children: m
117
+ }, u(l, "Chip")), {
118
+ children: d
121
119
  }));
122
- }
120
+ return e.onPress ? /* @__PURE__ */ t(c, {
121
+ className: y,
122
+ trackingEvent: e.trackingEvent,
123
+ onPress: e.onPress,
124
+ children: r()
125
+ }) : e.to ? /* @__PURE__ */ t(c, {
126
+ trackingEvent: e.trackingEvent,
127
+ to: e.to,
128
+ fullPageOnWebView: e.fullPageOnWebView,
129
+ children: r()
130
+ }) : e.href ? /* @__PURE__ */ t(c, {
131
+ trackingEvent: e.trackingEvent,
132
+ href: e.href,
133
+ newTab: e.newTab,
134
+ children: r()
135
+ }) : r();
123
136
  };
124
- export { H as default };
137
+ export { S as default };
package/dist-es/circle.js CHANGED
@@ -1,16 +1,19 @@
1
- import { circle as i } from "./circle.css-mistica.js";
2
- import { jsx as l } from "./_virtual/jsx-runtime.js";
3
- const s = (param)=>/* @__PURE__ */ {
4
- let { children: e , backgroundColor: o , backgroundImage: r , size: t } = param;
5
- return l("div", {
6
- className: i,
1
+ import { circle as c } from "./circle.css-mistica.js";
2
+ import { vars as d } from "./skins/skin-contract.css-mistica.js";
3
+ import { jsx as m } from "./_virtual/jsx-runtime.js";
4
+ const f = (param)=>{
5
+ let { children: e , backgroundColor: s , backgroundImage: o , size: t , border: r = !1 } = param;
6
+ const l = r === !0 ? d.colors.border : r, i = r ? `1px solid ${l}` : void 0;
7
+ return /* @__PURE__ */ m("div", {
8
+ className: c,
7
9
  style: {
8
10
  width: t,
9
11
  height: t,
10
- backgroundColor: o,
11
- backgroundImage: r ? `url(${r})` : "none"
12
+ backgroundColor: s,
13
+ backgroundImage: o ? `url(${o})` : "none",
14
+ border: i
12
15
  },
13
16
  children: e
14
17
  });
15
18
  };
16
- export { s as default };
19
+ export { f as default };
@@ -77,36 +77,36 @@ function _objectWithoutPropertiesLoose(source, excluded) {
77
77
  }
78
78
  return target;
79
79
  }
80
- import { useTheme as s } from "../../hooks.js";
80
+ import { useTheme as l } from "../../hooks.js";
81
81
  import { useIsInverseVariant as h } from "../../theme-variant-context.js";
82
82
  import { vars as n } from "../../skins/skin-contract.css-mistica.js";
83
83
  import { jsx as t } from "../../_virtual/jsx-runtime.js";
84
- const c = (_param)=>{
85
- var { color: r , size: e = 24 } = _param, a = _objectWithoutProperties(_param, [
84
+ const v = (_param)=>{
85
+ var { color: r , size: e = 24 } = _param, i = _objectWithoutProperties(_param, [
86
86
  "color",
87
87
  "size"
88
88
  ]);
89
- const o = h(), i = r != null ? r : o ? n.colors.inverse : n.colors.neutralHigh, { skinName: l } = s();
90
- return l.match(/^o2/i) ? /* @__PURE__ */ t("svg", _objectSpreadProps(_objectSpread({
89
+ const o = h(), a = r != null ? r : o ? n.colors.inverse : n.colors.neutralHigh, { skinName: s } = l();
90
+ return s.match(/^o2/i) ? /* @__PURE__ */ t("svg", _objectSpreadProps(_objectSpread({
91
91
  width: e,
92
92
  height: e,
93
93
  viewBox: "0 0 24 24",
94
94
  role: "presentation"
95
- }, a), {
95
+ }, i), {
96
96
  children: /* @__PURE__ */ t("path", {
97
- fill: i,
98
- d: "M15.889 4.117a.368.368 0 00-.538 0l-7.24 7.585a.413.413 0 00-.071.46c.019.05.048.099.088.14l6.008 6.296a.377.377 0 00.55 0 .422.422 0 000-.577l-5.765-6.04 6.968-7.3a.412.412 0 000-.564zM14.866 19.41c0-.326.252-.59.563-.59.312 0 .564.264.564.59 0 .326-.252.59-.564.59a.577.577 0 01-.563-.59z"
97
+ fill: a,
98
+ d: "M14.889 4.117a.368.368 0 00-.538 0l-7.24 7.585a.413.413 0 00-.071.46c.019.05.048.099.088.14l6.008 6.296a.377.377 0 00.55 0 .422.422 0 000-.577l-5.765-6.04 6.968-7.3a.412.412 0 000-.564zM13.866 19.41c0-.326.252-.59.563-.59.312 0 .564.264.564.59 0 .326-.252.59-.564.59a.577.577 0 01-.563-.59z"
99
99
  })
100
100
  })) : /* @__PURE__ */ t("svg", _objectSpreadProps(_objectSpread({
101
101
  width: e,
102
102
  height: e,
103
103
  viewBox: "0 0 24 24",
104
104
  role: "presentation"
105
- }, a), {
105
+ }, i), {
106
106
  children: /* @__PURE__ */ t("path", {
107
- fill: i,
108
- d: "M16.32 20a.7.7 0 01-.45-.16l-8.658-7.314a.577.577 0 010-.897l8.659-7.451a.71.71 0 01.939 0 .595.595 0 010 .872l-8.171 7.02 8.132 6.862a.584.584 0 01.005.868l-.005.004a.727.727 0 01-.451.196z"
107
+ fill: a,
108
+ d: "M14.387 4a.583.583 0 01.442.198.644.644 0 010 .875l-7.356 6.99 7.318 6.865c.242.23.26.622.038.872a.584.584 0 01-.846.037L6.19 12.525a.645.645 0 01-.025-.886l.025-.025 7.794-7.46A.61.61 0 0114.387 4z"
109
109
  })
110
110
  }));
111
111
  };
112
- export { c as default };
112
+ export { v as default };
@@ -82,40 +82,40 @@ import { useIsInverseVariant as s } from "../../theme-variant-context.js";
82
82
  import { vars as n } from "../../skins/skin-contract.css-mistica.js";
83
83
  import { jsx as t } from "../../_virtual/jsx-runtime.js";
84
84
  const v = (_param)=>{
85
- var { color: r , size: e = 24 } = _param, a = _objectWithoutProperties(_param, [
85
+ var { color: r , size: e = 24 } = _param, i = _objectWithoutProperties(_param, [
86
86
  "color",
87
87
  "size"
88
88
  ]);
89
- const o = s(), i = r != null ? r : o ? n.colors.inverse : n.colors.neutralHigh, { skinName: l } = h();
89
+ const o = s(), a = r != null ? r : o ? n.colors.inverse : n.colors.neutralHigh, { skinName: l } = h();
90
90
  return l.match(/^blau/i) ? /* @__PURE__ */ t("svg", _objectSpreadProps(_objectSpread({
91
91
  width: e,
92
92
  height: e,
93
93
  viewBox: "0 0 24 24",
94
94
  role: "presentation"
95
- }, a), {
95
+ }, i), {
96
96
  children: /* @__PURE__ */ t("path", {
97
- fill: i,
98
- d: "M15.855 4.16a.535.535 0 010 .77L8.586 12l7.27 7.07a.535.535 0 010 .77.571.571 0 01-.793 0L7 12l8.063-7.84a.571.571 0 01.792 0z"
97
+ fill: a,
98
+ d: "M14.855 4.16a.535.535 0 010 .77L7.586 12l7.27 7.07a.535.535 0 010 .77.571.571 0 01-.793 0L6 12l8.063-7.84a.571.571 0 01.792 0z"
99
99
  })
100
100
  })) : l.match(/^o2/i) ? /* @__PURE__ */ t("svg", _objectSpreadProps(_objectSpread({
101
101
  width: e,
102
102
  height: e,
103
103
  viewBox: "0 0 24 24",
104
104
  role: "presentation"
105
- }, a), {
105
+ }, i), {
106
106
  children: /* @__PURE__ */ t("path", {
107
- fill: i,
108
- d: "M15.8 5.266a.79.79 0 000-1.049.641.641 0 00-.962 0L8.2 11.455A.777.777 0 008 12a.777.777 0 00.2.545l6.638 7.238c.266.29.697.29.963 0a.79.79 0 000-1.05L9.624 12l6.177-6.734z"
107
+ fill: a,
108
+ d: "M14.8 5.266a.79.79 0 000-1.049.641.641 0 00-.962 0L7.2 11.455A.777.777 0 007 12a.777.777 0 00.2.545l6.638 7.238c.266.29.697.29.963 0a.79.79 0 000-1.05L8.624 12l6.177-6.734z"
109
109
  })
110
110
  })) : /* @__PURE__ */ t("svg", _objectSpreadProps(_objectSpread({
111
111
  width: e,
112
112
  height: e,
113
113
  viewBox: "0 0 24 24",
114
114
  role: "presentation"
115
- }, a), {
115
+ }, i), {
116
116
  children: /* @__PURE__ */ t("path", {
117
- fill: i,
118
- d: "M16.068 20a.96.96 0 01-.627-.23l-8.133-7.05a.858.858 0 01-.05-1.273c.013-.014.028-.025.042-.04l8.137-7.17a.964.964 0 011.297.029l.02.02a.861.861 0 01-.054 1.257L9.31 12.06l7.385 6.393c.38.33.407.892.06 1.257a.964.964 0 01-.687.291z"
117
+ fill: a,
118
+ d: "M14.161 4.024c.235 0 .46.105.617.285a.928.928 0 01-.048 1.257L8 12.083l6.78 6.541c.343.335.22.9 0 1.108-.28.28-.82.392-1.163.08l-.02-.018-7.323-7.046A.905.905 0 016 12.095a.913.913 0 01.268-.658l7.325-7.176a.803.803 0 01.568-.237z"
119
119
  })
120
120
  }));
121
121
  };
@@ -95,7 +95,7 @@ const c = (_param)=>{
95
95
  }, i), {
96
96
  children: /* @__PURE__ */ t("path", {
97
97
  fill: a,
98
- d: "M8.111 4.117a.368.368 0 01.538 0l7.24 7.585c.118.124.142.31.071.46a.41.41 0 01-.088.14l-6.008 6.296a.377.377 0 01-.55 0 .422.422 0 010-.577l5.765-6.04-6.968-7.3a.412.412 0 010-.564zM9.134 19.41a.577.577 0 00-.563-.59.577.577 0 00-.564.59c0 .326.252.59.564.59a.577.577 0 00.563-.59z"
98
+ d: "M9.111 4.117a.368.368 0 01.538 0l7.24 7.585c.118.124.142.31.071.46a.41.41 0 01-.088.14l-6.008 6.296a.377.377 0 01-.55 0 .422.422 0 010-.577l5.765-6.04-6.968-7.3a.412.412 0 010-.564zm1.023 15.293a.577.577 0 00-.563-.59.577.577 0 00-.564.59c0 .326.252.59.564.59a.577.577 0 00.563-.59z"
99
99
  })
100
100
  })) : /* @__PURE__ */ t("svg", _objectSpreadProps(_objectSpread({
101
101
  width: e,
@@ -105,7 +105,7 @@ const c = (_param)=>{
105
105
  }, i), {
106
106
  children: /* @__PURE__ */ t("path", {
107
107
  fill: a,
108
- d: "M8.113 20a.583.583 0 01-.442-.198.644.644 0 010-.875l7.356-6.99-7.318-6.865A.635.635 0 017.67 4.2a.585.585 0 01.846-.037l7.794 7.312a.645.645 0 01.025.886l-.024.025-7.795 7.46a.61.61 0 01-.404.154z"
108
+ d: "M9.613 20a.583.583 0 01-.442-.198.644.644 0 010-.875l7.356-6.99-7.318-6.865A.635.635 0 019.17 4.2a.585.585 0 01.846-.037l7.794 7.312a.645.645 0 01.025.886l-.024.025-7.795 7.46a.61.61 0 01-.404.154z"
109
109
  })
110
110
  }));
111
111
  };
@@ -105,7 +105,7 @@ const d = (_param)=>{
105
105
  }, i), {
106
106
  children: /* @__PURE__ */ t("path", {
107
107
  fill: a,
108
- d: "M8.2 18.733a.79.79 0 000 1.05.64.64 0 00.962 0l6.639-7.238A.777.777 0 0016 12a.777.777 0 00-.2-.545L9.163 4.217a.641.641 0 00-.963 0 .79.79 0 000 1.05L14.376 12l-6.177 6.733z"
108
+ d: "M9.2 18.733a.79.79 0 000 1.05.64.64 0 00.962 0l6.639-7.238A.777.777 0 0017 12a.777.777 0 00-.2-.545l-6.638-7.238a.641.641 0 00-.963 0 .79.79 0 000 1.05L15.376 12l-6.177 6.733z"
109
109
  })
110
110
  })) : /* @__PURE__ */ t("svg", _objectSpreadProps(_objectSpread({
111
111
  width: e,
@@ -115,7 +115,7 @@ const d = (_param)=>{
115
115
  }, i), {
116
116
  children: /* @__PURE__ */ t("path", {
117
117
  fill: a,
118
- d: "M8.339 20a.823.823 0 01-.617-.285.928.928 0 01.048-1.256l6.73-6.518L7.72 5.4c-.343-.335-.22-.9 0-1.108.28-.28.82-.392 1.163-.08l.02.018 7.323 7.046a.905.905 0 01.274.654.913.913 0 01-.268.658l-7.325 7.175A.804.804 0 018.34 20z"
118
+ d: "M9.839 20a.823.823 0 01-.617-.285.928.928 0 01.048-1.256L16 11.94 9.22 5.4c-.343-.335-.22-.9 0-1.108.28-.28.82-.392 1.163-.08l.02.018 7.323 7.046a.905.905 0 01.274.654.913.913 0 01-.268.658l-7.325 7.175A.803.803 0 019.84 20z"
119
119
  })
120
120
  }));
121
121
  };
@@ -0,0 +1,5 @@
1
+ import "./sprinkles.css.ts.vanilla.js";
2
+ import "./responsive-layout.css.ts.vanilla.js";
3
+ import "./horizontal-scroll.css.ts.vanilla.js";
4
+ var m = "_1gl3gmv2", v = "_1gl3gmv1 _1y2v1nf5q";
5
+ export { m as noScrollbar, v as scroll };
@@ -0,0 +1,2 @@
1
+ const l = "";
2
+ export { l as default };
@@ -0,0 +1,15 @@
1
+ import l from "classnames";
2
+ import * as m from "react";
3
+ import { scroll as s, noScrollbar as t } from "./horizontal-scroll.css-mistica.js";
4
+ import { jsx as c } from "./_virtual/jsx-runtime.js";
5
+ const n = /*#__PURE__*/ m.forwardRef((param, a)=>/* @__PURE__ */ {
6
+ let { children: r , noScrollbar: o } = param;
7
+ return c("div", {
8
+ className: l(s, {
9
+ [t]: o
10
+ }),
11
+ ref: a,
12
+ children: r
13
+ });
14
+ });
15
+ export { n as default };