@telefonica/mistica 14.42.0 → 14.43.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/accordion.d.ts +0 -2
- package/dist/carousel.d.ts +5 -5
- package/dist/carousel.js +169 -153
- package/dist/cvv-field.js +85 -40
- package/dist/dialog.js +66 -65
- package/dist/feedback.css-mistica.js +14 -8
- package/dist/feedback.css.d.ts +2 -0
- package/dist/feedback.js +56 -49
- package/dist/index.d.ts +3 -1
- package/dist/index.js +4 -1
- package/dist/package-version.js +1 -1
- package/dist/popover.css-mistica.js +4 -43
- package/dist/popover.css.d.ts +1 -12
- package/dist/popover.d.ts +6 -2
- package/dist/popover.js +71 -226
- package/dist/select.js +176 -172
- package/dist/text.css-mistica.js +7 -7
- package/dist/text.css.d.ts +0 -1
- package/dist/text.js +24 -24
- package/dist/theme.d.ts +2 -1
- package/dist/theme.js +17 -13
- package/dist/tooltip.css-mistica.js +15 -6
- package/dist/tooltip.css.d.ts +3 -0
- package/dist/tooltip.d.ts +15 -1
- package/dist/tooltip.js +213 -140
- package/dist-es/carousel.js +193 -176
- package/dist-es/cvv-field.js +73 -69
- package/dist-es/dialog.js +126 -125
- package/dist-es/feedback.css-mistica.js +2 -2
- package/dist-es/feedback.js +90 -83
- package/dist-es/index.js +1734 -1734
- package/dist-es/package-version.js +1 -1
- package/dist-es/popover.css-mistica.js +2 -3
- package/dist-es/popover.js +75 -191
- package/dist-es/select.js +182 -178
- package/dist-es/style.css +1 -1
- package/dist-es/text.css-mistica.js +3 -3
- package/dist-es/text.js +32 -32
- package/dist-es/theme.js +16 -12
- package/dist-es/tooltip.css-mistica.js +2 -2
- package/dist-es/tooltip.js +234 -169
- package/package.json +4 -4
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const o = "14.
|
|
1
|
+
const o = "14.43.0";
|
|
2
2
|
export { o as PACKAGE_VERSION };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import "./sprinkles.css.ts.vanilla.css-mistica.js";
|
|
2
1
|
import "./popover.css.ts.vanilla.css-mistica.js";
|
|
3
|
-
var
|
|
4
|
-
export {
|
|
2
|
+
var o = "_12igu660";
|
|
3
|
+
export { o as content };
|
package/dist-es/popover.js
CHANGED
|
@@ -27,209 +27,93 @@ function _object_spread(target) {
|
|
|
27
27
|
}
|
|
28
28
|
return target;
|
|
29
29
|
}
|
|
30
|
-
function
|
|
31
|
-
|
|
30
|
+
function _object_without_properties(source, excluded) {
|
|
31
|
+
if (source == null) return {};
|
|
32
|
+
var target = _object_without_properties_loose(source, excluded);
|
|
33
|
+
var key, i;
|
|
32
34
|
if (Object.getOwnPropertySymbols) {
|
|
33
|
-
var
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
36
|
+
for(i = 0; i < sourceSymbolKeys.length; i++){
|
|
37
|
+
key = sourceSymbolKeys[i];
|
|
38
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
39
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
40
|
+
target[key] = source[key];
|
|
38
41
|
}
|
|
39
|
-
keys.push.apply(keys, symbols);
|
|
40
42
|
}
|
|
41
|
-
return
|
|
43
|
+
return target;
|
|
42
44
|
}
|
|
43
|
-
function
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
45
|
+
function _object_without_properties_loose(source, excluded) {
|
|
46
|
+
if (source == null) return {};
|
|
47
|
+
var target = {};
|
|
48
|
+
var sourceKeys = Object.keys(source);
|
|
49
|
+
var key, i;
|
|
50
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
51
|
+
key = sourceKeys[i];
|
|
52
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
53
|
+
target[key] = source[key];
|
|
51
54
|
}
|
|
52
55
|
return target;
|
|
53
56
|
}
|
|
54
|
-
import {
|
|
55
|
-
import
|
|
56
|
-
import
|
|
57
|
-
import
|
|
58
|
-
import {
|
|
59
|
-
import
|
|
60
|
-
import
|
|
61
|
-
import
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
right: {
|
|
75
|
-
left: e.width + m,
|
|
76
|
-
top: e.height / 2,
|
|
77
|
-
transform: "translateY(-50%)",
|
|
78
|
-
WebkitTransform: "translateY(-50%)"
|
|
79
|
-
},
|
|
80
|
-
left: {
|
|
81
|
-
left: e.left - r - m,
|
|
82
|
-
top: e.height / 2,
|
|
83
|
-
transform: "translateY(-50%)",
|
|
84
|
-
WebkitTransform: "translateY(-50%)"
|
|
85
|
-
},
|
|
86
|
-
top: {
|
|
87
|
-
transform: "translateY(-100%)",
|
|
88
|
-
WebkitTransform: "translateY(-100%)",
|
|
89
|
-
top: -m,
|
|
90
|
-
left: s ? d - e.parentLeft : Math.max(e.width / 2 - r / 2, 0)
|
|
91
|
-
},
|
|
92
|
-
bottom: {
|
|
93
|
-
top: e.height + m,
|
|
94
|
-
left: s ? d - e.parentLeft : Math.max(e.width / 2 - r / 2, 0)
|
|
95
|
-
}
|
|
96
|
-
}[t], f = {
|
|
97
|
-
right: {
|
|
98
|
-
right: "100%",
|
|
99
|
-
top: "50%",
|
|
100
|
-
transform: "translateY(-100%) rotate(90deg)",
|
|
101
|
-
transformOrigin: "bottom"
|
|
102
|
-
},
|
|
103
|
-
left: {
|
|
104
|
-
left: "100%",
|
|
105
|
-
top: "50%",
|
|
106
|
-
transform: "translateY(-100%) rotate(-90deg)",
|
|
107
|
-
transformOrigin: "bottom"
|
|
108
|
-
},
|
|
109
|
-
top: {
|
|
110
|
-
top: "100%",
|
|
111
|
-
left: a.left === 0 ? e.width / 2 : "50%",
|
|
112
|
-
transform: "translateX(-50%)"
|
|
113
|
-
},
|
|
114
|
-
bottom: {
|
|
115
|
-
bottom: "100%",
|
|
116
|
-
left: a.left === 0 ? e.width / 2 : "50%",
|
|
117
|
-
transform: "translateX(-50%) rotate(180deg)"
|
|
118
|
-
}
|
|
119
|
-
}[t];
|
|
120
|
-
return s && (f.left = e.parentLeft + e.width / 2 - d), {
|
|
121
|
-
containerStyles: a,
|
|
122
|
-
arrowStyles: f
|
|
123
|
-
};
|
|
124
|
-
}, N = (t)=>t ? {
|
|
125
|
-
left: t.offsetLeft,
|
|
126
|
-
top: t.offsetTop,
|
|
127
|
-
width: t.offsetWidth,
|
|
128
|
-
height: t.offsetHeight,
|
|
129
|
-
// @ts-expect-error - parentNode must exist
|
|
130
|
-
parentLeft: t.parentNode.offsetLeft
|
|
131
|
-
} : null, rt = (param)=>{
|
|
132
|
-
let { description: t, title: r, onClose: e, trackingEvent: s, position: n, width: a, target: w, asset: f, isVisible: g = !0, extra: Y, dataAttributes: B } = param;
|
|
133
|
-
const { texts: R, isIos: z, isDarkMode: D } = E(), { isTabletOrSmaller: h } = P(), [x, b] = c.useState(null), p = c.useRef(null);
|
|
134
|
-
n = V(n, h);
|
|
135
|
-
const y = tt(h, z, a), S = D ? 1 : 0.2;
|
|
136
|
-
c.useEffect(()=>{
|
|
137
|
-
const l = ()=>{
|
|
138
|
-
b(N(p.current));
|
|
139
|
-
};
|
|
140
|
-
return l(), window.addEventListener("resize", l), ()=>{
|
|
141
|
-
window.removeEventListener("resize", l);
|
|
142
|
-
};
|
|
143
|
-
}, []), c.useEffect(()=>{
|
|
144
|
-
b(N(p.current));
|
|
145
|
-
}, [
|
|
146
|
-
g
|
|
57
|
+
import { jsx as r, jsxs as t } from "react/jsx-runtime";
|
|
58
|
+
import { BaseTooltip as h } from "./tooltip.js";
|
|
59
|
+
import u from "./inline.js";
|
|
60
|
+
import x from "./stack.js";
|
|
61
|
+
import { Text3 as g, Text2 as v } from "./text.js";
|
|
62
|
+
import a from "./box.js";
|
|
63
|
+
import { content as P } from "./popover.css-mistica.js";
|
|
64
|
+
import { vars as y } from "./skins/skin-contract.css-mistica.js";
|
|
65
|
+
const T = (_param)=>{
|
|
66
|
+
var { open: m, isVisible: c, extra: l, children: p, onClose: i = ()=>{}, dataAttributes: s, trackingEvent: f, title: o, description: e, asset: n } = _param, d = _object_without_properties(_param, [
|
|
67
|
+
"open",
|
|
68
|
+
"isVisible",
|
|
69
|
+
"extra",
|
|
70
|
+
"children",
|
|
71
|
+
"onClose",
|
|
72
|
+
"dataAttributes",
|
|
73
|
+
"trackingEvent",
|
|
74
|
+
"title",
|
|
75
|
+
"description",
|
|
76
|
+
"asset"
|
|
147
77
|
]);
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
v = /* @__PURE__ */ i("div", _object_spread_props(_object_spread({
|
|
152
|
-
className: O,
|
|
153
|
-
style: _object_spread({
|
|
154
|
-
width: y,
|
|
155
|
-
boxShadow: `0 2px 4px 0 rgba(0, 0, 0, ${S})`
|
|
156
|
-
}, l)
|
|
157
|
-
}, J(B, "Popover")), {
|
|
78
|
+
return /* @__PURE__ */ r(h, _object_spread({
|
|
79
|
+
content: /* @__PURE__ */ t(a, {
|
|
80
|
+
className: P,
|
|
158
81
|
children: [
|
|
159
|
-
/* @__PURE__ */
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
boxSizing: "border-box",
|
|
168
|
-
boxShadow: n === "bottom" ? "initial" : `0 0 4px 0 rgba(0, 0, 0, ${S})`
|
|
169
|
-
}
|
|
170
|
-
})
|
|
171
|
-
}),
|
|
172
|
-
/* @__PURE__ */ i(u, {
|
|
173
|
-
padding: 16,
|
|
174
|
-
children: [
|
|
175
|
-
/* @__PURE__ */ o(u, {
|
|
176
|
-
paddingRight: 24,
|
|
177
|
-
className: T({
|
|
178
|
-
display: "flex"
|
|
179
|
-
}),
|
|
180
|
-
children: /* @__PURE__ */ i($, {
|
|
181
|
-
space: 16,
|
|
82
|
+
(o || e || n) && /* @__PURE__ */ r(a, {
|
|
83
|
+
paddingRight: 16,
|
|
84
|
+
children: /* @__PURE__ */ t(u, {
|
|
85
|
+
space: 16,
|
|
86
|
+
children: [
|
|
87
|
+
n,
|
|
88
|
+
/* @__PURE__ */ t(x, {
|
|
89
|
+
space: 4,
|
|
182
90
|
children: [
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
regular: !0,
|
|
192
|
-
children: r
|
|
193
|
-
}),
|
|
194
|
-
/* @__PURE__ */ o(H, {
|
|
195
|
-
regular: !0,
|
|
196
|
-
color: k.colors.textSecondary,
|
|
197
|
-
children: t
|
|
198
|
-
})
|
|
199
|
-
]
|
|
200
|
-
})
|
|
91
|
+
o && /* @__PURE__ */ r(g, {
|
|
92
|
+
regular: !0,
|
|
93
|
+
children: o
|
|
94
|
+
}),
|
|
95
|
+
e && /* @__PURE__ */ r(v, {
|
|
96
|
+
regular: !0,
|
|
97
|
+
color: y.colors.textSecondary,
|
|
98
|
+
children: e
|
|
201
99
|
})
|
|
202
100
|
]
|
|
203
101
|
})
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
e == null || e();
|
|
209
|
-
},
|
|
210
|
-
trackingEvent: s,
|
|
211
|
-
"aria-label": R.modalClose,
|
|
212
|
-
children: /* @__PURE__ */ o(M, {
|
|
213
|
-
color: k.colors.neutralHigh
|
|
214
|
-
})
|
|
215
|
-
}),
|
|
216
|
-
Y
|
|
217
|
-
]
|
|
218
|
-
})
|
|
102
|
+
]
|
|
103
|
+
})
|
|
104
|
+
}),
|
|
105
|
+
l !== null && l !== void 0 ? l : p
|
|
219
106
|
]
|
|
220
|
-
}));
|
|
221
|
-
}
|
|
222
|
-
return /* @__PURE__ */ i("div", {
|
|
223
|
-
className: T({
|
|
224
|
-
position: "relative"
|
|
225
107
|
}),
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
},
|
|
235
|
-
|
|
108
|
+
centerContent: !1,
|
|
109
|
+
open: m !== null && m !== void 0 ? m : c,
|
|
110
|
+
hasPointerInteractionOnly: !0,
|
|
111
|
+
delay: !1,
|
|
112
|
+
onClose: i,
|
|
113
|
+
trackingEvent: f,
|
|
114
|
+
dataAttributes: _object_spread({
|
|
115
|
+
"component-name": "Popover"
|
|
116
|
+
}, s)
|
|
117
|
+
}, d));
|
|
118
|
+
}, N = T;
|
|
119
|
+
export { N as default };
|