@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.
- package/css/mistica.css +1 -1
- package/dist/chip.css-mistica.js +10 -9
- package/dist/chip.css.d.ts +1 -0
- package/dist/chip.d.ts +21 -2
- package/dist/chip.js +38 -25
- package/dist/circle.d.ts +1 -0
- package/dist/circle.js +9 -6
- package/dist/form.d.ts +1 -1
- package/dist/generated/mistica-icons/icon-chevron-left-light.js +11 -11
- package/dist/generated/mistica-icons/icon-chevron-left-regular.js +11 -11
- package/dist/generated/mistica-icons/icon-chevron-right-light.js +2 -2
- package/dist/generated/mistica-icons/icon-chevron-right-regular.js +2 -2
- package/dist/horizontal-scroll.css-mistica.js +18 -0
- package/dist/horizontal-scroll.css.d.ts +2 -0
- package/dist/horizontal-scroll.css.ts.vanilla.js +9 -0
- package/dist/horizontal-scroll.d.ts +7 -0
- package/dist/horizontal-scroll.js +66 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/list.js +56 -56
- package/dist/package-version.js +1 -1
- package/dist/tabs.js +14 -15
- package/dist-es/chip.css-mistica.js +6 -6
- package/dist-es/chip.js +57 -44
- package/dist-es/circle.js +12 -9
- package/dist-es/generated/mistica-icons/icon-chevron-left-light.js +12 -12
- package/dist-es/generated/mistica-icons/icon-chevron-left-regular.js +11 -11
- package/dist-es/generated/mistica-icons/icon-chevron-right-light.js +2 -2
- package/dist-es/generated/mistica-icons/icon-chevron-right-regular.js +2 -2
- package/dist-es/horizontal-scroll.css-mistica.js +5 -0
- package/dist-es/horizontal-scroll.css.ts.vanilla.js +2 -0
- package/dist-es/horizontal-scroll.js +15 -0
- package/dist-es/index.js +1708 -1707
- package/dist-es/list.js +75 -75
- package/dist-es/package-version.js +1 -1
- package/dist-es/style.css +1 -1
- package/dist-es/tabs.js +22 -23
- 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
|
|
54
|
-
import { useTheme as
|
|
55
|
-
import
|
|
56
|
-
import { Text2 as
|
|
57
|
-
import
|
|
58
|
-
import
|
|
59
|
-
import { pxToRem as
|
|
60
|
-
import { iconActive as
|
|
61
|
-
import { vars as
|
|
62
|
-
import { getPrefixedDataAttributes as
|
|
63
|
-
import { useThemeVariant as
|
|
64
|
-
import {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
const { texts:
|
|
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
|
-
|
|
69
|
+
i && /* @__PURE__ */ t(n, {
|
|
70
70
|
paddingRight: 4,
|
|
71
|
-
className: o ?
|
|
72
|
-
children: /* @__PURE__ */
|
|
71
|
+
className: o ? V : w,
|
|
72
|
+
children: /* @__PURE__ */ t(i, {
|
|
73
73
|
color: "currentColor",
|
|
74
|
-
size:
|
|
74
|
+
size: I(16)
|
|
75
75
|
})
|
|
76
76
|
}),
|
|
77
|
-
/* @__PURE__ */
|
|
78
|
-
id:
|
|
77
|
+
/* @__PURE__ */ t(T, {
|
|
78
|
+
id: g,
|
|
79
79
|
medium: !0,
|
|
80
80
|
truncate: 1,
|
|
81
81
|
color: "currentColor",
|
|
82
|
-
children:
|
|
82
|
+
children: v
|
|
83
83
|
})
|
|
84
84
|
]
|
|
85
|
-
}),
|
|
86
|
-
if (
|
|
87
|
-
className:
|
|
88
|
-
paddingLeft:
|
|
89
|
-
},
|
|
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
|
-
|
|
92
|
-
/* @__PURE__ */
|
|
91
|
+
d,
|
|
92
|
+
/* @__PURE__ */ t(n, {
|
|
93
93
|
paddingLeft: 4,
|
|
94
|
-
children: /* @__PURE__ */
|
|
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":
|
|
102
|
-
onPress: ()=>
|
|
103
|
-
children: /* @__PURE__ */
|
|
101
|
+
"aria-label": b.closeButtonLabel,
|
|
102
|
+
onPress: ()=>s(),
|
|
103
|
+
children: /* @__PURE__ */ t(E, {
|
|
104
104
|
size: 16,
|
|
105
|
-
color:
|
|
105
|
+
color: N.colors.neutralMedium
|
|
106
106
|
})
|
|
107
107
|
})
|
|
108
108
|
})
|
|
109
109
|
]
|
|
110
110
|
}));
|
|
111
|
-
{
|
|
112
|
-
|
|
113
|
-
|
|
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:
|
|
115
|
+
paddingLeft: f,
|
|
118
116
|
paddingRight: 12
|
|
119
|
-
},
|
|
120
|
-
children:
|
|
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 {
|
|
137
|
+
export { S as default };
|
package/dist-es/circle.js
CHANGED
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
import { circle as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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:
|
|
11
|
-
backgroundImage:
|
|
12
|
+
backgroundColor: s,
|
|
13
|
+
backgroundImage: o ? `url(${o})` : "none",
|
|
14
|
+
border: i
|
|
12
15
|
},
|
|
13
16
|
children: e
|
|
14
17
|
});
|
|
15
18
|
};
|
|
16
|
-
export {
|
|
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
|
|
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
|
|
85
|
-
var { color: r , size: e = 24 } = _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(),
|
|
90
|
-
return
|
|
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
|
-
},
|
|
95
|
+
}, i), {
|
|
96
96
|
children: /* @__PURE__ */ t("path", {
|
|
97
|
-
fill:
|
|
98
|
-
d: "
|
|
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
|
-
},
|
|
105
|
+
}, i), {
|
|
106
106
|
children: /* @__PURE__ */ t("path", {
|
|
107
|
-
fill:
|
|
108
|
-
d: "
|
|
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 {
|
|
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,
|
|
85
|
+
var { color: r , size: e = 24 } = _param, i = _objectWithoutProperties(_param, [
|
|
86
86
|
"color",
|
|
87
87
|
"size"
|
|
88
88
|
]);
|
|
89
|
-
const o = s(),
|
|
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
|
-
},
|
|
95
|
+
}, i), {
|
|
96
96
|
children: /* @__PURE__ */ t("path", {
|
|
97
|
-
fill:
|
|
98
|
-
d: "
|
|
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
|
-
},
|
|
105
|
+
}, i), {
|
|
106
106
|
children: /* @__PURE__ */ t("path", {
|
|
107
|
-
fill:
|
|
108
|
-
d: "
|
|
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
|
-
},
|
|
115
|
+
}, i), {
|
|
116
116
|
children: /* @__PURE__ */ t("path", {
|
|
117
|
-
fill:
|
|
118
|
-
d: "
|
|
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: "
|
|
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: "
|
|
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: "
|
|
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: "
|
|
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,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 };
|