@telefonica/mistica 14.42.1 → 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/feedback.js +36 -36
- 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/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/feedback.js +58 -58
- 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/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
package/dist-es/tooltip.js
CHANGED
|
@@ -51,28 +51,58 @@ function _object_spread_props(target, source) {
|
|
|
51
51
|
}
|
|
52
52
|
return target;
|
|
53
53
|
}
|
|
54
|
-
|
|
54
|
+
function _object_without_properties(source, excluded) {
|
|
55
|
+
if (source == null) return {};
|
|
56
|
+
var target = _object_without_properties_loose(source, excluded);
|
|
57
|
+
var key, i;
|
|
58
|
+
if (Object.getOwnPropertySymbols) {
|
|
59
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
60
|
+
for(i = 0; i < sourceSymbolKeys.length; i++){
|
|
61
|
+
key = sourceSymbolKeys[i];
|
|
62
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
63
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
64
|
+
target[key] = source[key];
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
return target;
|
|
68
|
+
}
|
|
69
|
+
function _object_without_properties_loose(source, excluded) {
|
|
70
|
+
if (source == null) return {};
|
|
71
|
+
var target = {};
|
|
72
|
+
var sourceKeys = Object.keys(source);
|
|
73
|
+
var key, i;
|
|
74
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
75
|
+
key = sourceKeys[i];
|
|
76
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
77
|
+
target[key] = source[key];
|
|
78
|
+
}
|
|
79
|
+
return target;
|
|
80
|
+
}
|
|
81
|
+
import { jsx as n, jsxs as B, Fragment as ht } from "react/jsx-runtime";
|
|
55
82
|
import * as i from "react";
|
|
56
|
-
import { useAriaId as
|
|
57
|
-
import { Portal as
|
|
58
|
-
import { Transition as
|
|
59
|
-
import { container as
|
|
60
|
-
import
|
|
83
|
+
import { useTheme as Tt, useAriaId as gt, useBoundingRect as it, useWindowSize as vt } from "./hooks.js";
|
|
84
|
+
import { Portal as xt } from "./portal.js";
|
|
85
|
+
import { Transition as bt } from "react-transition-group";
|
|
86
|
+
import { content as Mt, CONTENT_MIN_WIDTH as Et, container as St, tooltipTransitionClasses as wt, tooltip as Ot, contentContainer as It, tooltipCenter as Rt, closeButtonIcon as _t, arrowContainer as Ct, arrow as Nt } from "./tooltip.css-mistica.js";
|
|
87
|
+
import yt from "./stack.js";
|
|
61
88
|
import { Text2 as nt } from "./text.js";
|
|
62
|
-
import { getCssVarValue as
|
|
63
|
-
import { TAB as
|
|
64
|
-
import { isTouchableDevice as
|
|
65
|
-
import { isEqual as
|
|
66
|
-
import
|
|
67
|
-
import { vars as
|
|
68
|
-
import { useIsInverseVariant as
|
|
69
|
-
import { combineRefs as
|
|
70
|
-
import { useTooltipState as
|
|
71
|
-
import { isRunningAcceptanceTest as
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
89
|
+
import { getCssVarValue as kt } from "./utils/dom.js";
|
|
90
|
+
import { TAB as Lt, ESC as At } from "./utils/keys.js";
|
|
91
|
+
import { isTouchableDevice as $t } from "./utils/environment.js";
|
|
92
|
+
import { isEqual as at } from "./utils/helpers.js";
|
|
93
|
+
import tt from "classnames";
|
|
94
|
+
import { vars as X } from "./skins/skin-contract.css-mistica.js";
|
|
95
|
+
import { useIsInverseVariant as Ft, ThemeVariant as Dt } from "./theme-variant-context.js";
|
|
96
|
+
import { combineRefs as Bt } from "./utils/common.js";
|
|
97
|
+
import { useTooltipState as Wt, useSetTooltipState as Ht } from "./tooltip-context-provider.js";
|
|
98
|
+
import { isRunningAcceptanceTest as Vt } from "./utils/platform.js";
|
|
99
|
+
import Xt from "./icon-button.js";
|
|
100
|
+
import zt from "./generated/mistica-icons/icon-close-regular.js";
|
|
101
|
+
import Pt from "./box.js";
|
|
102
|
+
const lt = (t)=>({
|
|
103
|
+
border: `1px solid ${t ? X.colors.backgroundContainer : X.colors.border}`
|
|
104
|
+
}), ct = 496, Yt = 300, Gt = 500, Kt = 100, p = 20, O = 6, N = O + p / 2 + 1, Ut = (t)=>{
|
|
105
|
+
switch(t){
|
|
76
106
|
case "left":
|
|
77
107
|
return `translateX(-${O}px)`;
|
|
78
108
|
case "right":
|
|
@@ -84,76 +114,76 @@ const at = (e)=>({
|
|
|
84
114
|
default:
|
|
85
115
|
return "";
|
|
86
116
|
}
|
|
87
|
-
}, pt = (
|
|
88
|
-
const
|
|
117
|
+
}, pt = (t)=>{
|
|
118
|
+
const u = parseFloat(getComputedStyle(t, null).paddingLeft) + parseFloat(getComputedStyle(t, null).paddingRight), v = parseFloat(getComputedStyle(t, null).paddingTop) + parseFloat(getComputedStyle(t, null).paddingBottom), d = t.offsetWidth - u, x = t.offsetHeight - v;
|
|
89
119
|
return {
|
|
90
|
-
width:
|
|
91
|
-
height:
|
|
120
|
+
width: d,
|
|
121
|
+
height: x
|
|
92
122
|
};
|
|
93
|
-
},
|
|
94
|
-
if (!
|
|
95
|
-
const { top:
|
|
96
|
-
if (!(!
|
|
123
|
+
}, ft = (t, u, v, d, x)=>{
|
|
124
|
+
if (!t || !u) return;
|
|
125
|
+
const { top: b, bottom: h, left: I, right: W } = t, o = d - h, R = x - W, _ = b, a = I, { width: z, height: H } = pt(u), C = z + N, T = H + N, M = C <= Math.max(a, R), E = T <= Math.max(o, _);
|
|
126
|
+
if (!(!E && !M)) switch(v){
|
|
97
127
|
case "left":
|
|
98
|
-
return
|
|
128
|
+
return M ? C <= a ? "left" : "right" : o > _ ? "bottom" : "top";
|
|
99
129
|
case "right":
|
|
100
|
-
return
|
|
130
|
+
return M ? C <= R ? "right" : "left" : o > _ ? "bottom" : "top";
|
|
101
131
|
case "top":
|
|
102
|
-
return
|
|
132
|
+
return E ? T <= _ ? "top" : "bottom" : a > R ? "left" : "right";
|
|
103
133
|
case "bottom":
|
|
104
|
-
return
|
|
134
|
+
return E ? T <= o ? "bottom" : "top" : a > R ? "left" : "right";
|
|
105
135
|
default:
|
|
106
136
|
return;
|
|
107
137
|
}
|
|
108
|
-
},
|
|
109
|
-
let {
|
|
110
|
-
const
|
|
111
|
-
|
|
138
|
+
}, jt = (param)=>{
|
|
139
|
+
let { content: t, target: u, width: v, position: d = "top", dataAttributes: x, delay: b = !0, centerContent: h, open: I, onClose: W, hasPointerInteractionOnly: o = !1, trackingEvent: R } = param;
|
|
140
|
+
const { texts: _ } = Tt(), a = gt(), { openTooltipId: z } = Wt(), { openTooltip: H, closeTooltip: C } = Ht(), [T, M] = i.useState(), [E, P] = i.useState(), Y = i.useRef(null), G = i.useRef(null), [y, dt] = i.useState(null), m = $t(), K = b ? Gt : 0, [et, U] = i.useState(!1), [j, k] = i.useState(!1), q = I !== void 0, [ot, Z] = i.useState(!1), S = q ? I : a === z, J = Ft(), f = it(Y, S), V = it(G, S, !0), l = vt(), w = i.useCallback(()=>{
|
|
141
|
+
Z(!1), U(!1), k(!1);
|
|
112
142
|
}, []);
|
|
113
143
|
i.useEffect(()=>{
|
|
114
|
-
|
|
144
|
+
S || w();
|
|
115
145
|
}, [
|
|
116
|
-
|
|
117
|
-
|
|
146
|
+
S,
|
|
147
|
+
w
|
|
118
148
|
]), i.useEffect(()=>{
|
|
119
|
-
if (!
|
|
120
|
-
const
|
|
121
|
-
if (!
|
|
122
|
-
|
|
149
|
+
if (!y || !S) return;
|
|
150
|
+
const s = ft(f, y, d, l.height, l.width);
|
|
151
|
+
if (!s || !f) {
|
|
152
|
+
M(void 0), P(void 0), w();
|
|
123
153
|
return;
|
|
124
154
|
}
|
|
125
|
-
let
|
|
155
|
+
let r, e;
|
|
126
156
|
var _parseInt;
|
|
127
|
-
const { left:
|
|
128
|
-
switch(
|
|
157
|
+
const { left: c, right: L, top: A, bottom: $ } = f, { width: F, height: D } = pt(y), rt = l.width - F, st = l.height - D, g = (_parseInt = parseInt(kt(X.borderRadii.popup))) !== null && _parseInt !== void 0 ? _parseInt : 8;
|
|
158
|
+
switch(s){
|
|
129
159
|
case "top":
|
|
130
|
-
|
|
131
|
-
left: Math.max(0, Math.min(
|
|
132
|
-
top:
|
|
133
|
-
padding: `0px 0px ${
|
|
134
|
-
},
|
|
135
|
-
left: Math.max(
|
|
160
|
+
r = {
|
|
161
|
+
left: Math.max(0, Math.min(rt, (c + L - F) / 2)),
|
|
162
|
+
top: A - D - p / 2,
|
|
163
|
+
padding: `0px 0px ${N}px 0px`
|
|
164
|
+
}, e = {
|
|
165
|
+
left: Math.max(g, Math.min(l.width - g - p, (c + L - p) / 2)),
|
|
136
166
|
top: "100%"
|
|
137
167
|
};
|
|
138
168
|
break;
|
|
139
169
|
case "bottom":
|
|
140
|
-
|
|
141
|
-
left: Math.max(0, Math.min(
|
|
142
|
-
top:
|
|
143
|
-
padding: `${
|
|
144
|
-
},
|
|
145
|
-
left: Math.max(
|
|
170
|
+
r = {
|
|
171
|
+
left: Math.max(0, Math.min(rt, (c + L - F) / 2)),
|
|
172
|
+
top: $ - O,
|
|
173
|
+
padding: `${N}px 0px 0px 0px`
|
|
174
|
+
}, e = {
|
|
175
|
+
left: Math.max(g, Math.min(l.width - g - p, (c + L - p) / 2)),
|
|
146
176
|
bottom: "100%",
|
|
147
177
|
transform: "rotate(180deg)"
|
|
148
178
|
};
|
|
149
179
|
break;
|
|
150
180
|
case "left":
|
|
151
|
-
|
|
152
|
-
left:
|
|
153
|
-
top: Math.max(0, Math.min(
|
|
154
|
-
padding: `0px ${
|
|
155
|
-
},
|
|
156
|
-
top: Math.max(
|
|
181
|
+
r = {
|
|
182
|
+
left: c - F - p / 2,
|
|
183
|
+
top: Math.max(0, Math.min(st, (A + $ - D) / 2)),
|
|
184
|
+
padding: `0px ${N}px 0px 0px`
|
|
185
|
+
}, e = {
|
|
186
|
+
top: Math.max(g, Math.min(l.height - g - p, (A + $ - p) / 2)),
|
|
157
187
|
left: "100%",
|
|
158
188
|
transform: "rotate(-90deg)",
|
|
159
189
|
transformOrigin: "bottom"
|
|
@@ -161,172 +191,172 @@ const at = (e)=>({
|
|
|
161
191
|
break;
|
|
162
192
|
case "right":
|
|
163
193
|
default:
|
|
164
|
-
|
|
165
|
-
left:
|
|
166
|
-
top: Math.max(0, Math.min(
|
|
167
|
-
padding: `0px 0px 0px ${
|
|
168
|
-
},
|
|
169
|
-
top: Math.max(
|
|
194
|
+
r = {
|
|
195
|
+
left: L - O,
|
|
196
|
+
top: Math.max(0, Math.min(st, (A + $ - D) / 2)),
|
|
197
|
+
padding: `0px 0px 0px ${N}px`
|
|
198
|
+
}, e = {
|
|
199
|
+
top: Math.max(g, Math.min(l.height - g - p, (A + $ - p) / 2)),
|
|
170
200
|
right: "100%",
|
|
171
201
|
transform: "rotate(90deg)",
|
|
172
202
|
transformOrigin: "bottom"
|
|
173
203
|
};
|
|
174
204
|
break;
|
|
175
205
|
}
|
|
176
|
-
typeof
|
|
206
|
+
typeof e.top == "number" && (e.top -= r.top, e.top = `${e.top / D * 100}%`), typeof e.left == "number" && (e.left -= r.left, e.left = `${e.left / F * 100}%`), at(r, T) || M(r), at(e, E) || P(e);
|
|
177
207
|
}, [
|
|
178
|
-
|
|
179
|
-
l,
|
|
180
|
-
dt,
|
|
181
|
-
x,
|
|
182
|
-
R,
|
|
183
|
-
s,
|
|
184
|
-
d,
|
|
185
|
-
v,
|
|
186
|
-
j,
|
|
208
|
+
y,
|
|
187
209
|
f,
|
|
188
|
-
|
|
189
|
-
|
|
210
|
+
V,
|
|
211
|
+
S,
|
|
212
|
+
d,
|
|
213
|
+
l,
|
|
214
|
+
T,
|
|
215
|
+
E,
|
|
216
|
+
J,
|
|
217
|
+
m,
|
|
218
|
+
a,
|
|
219
|
+
w
|
|
190
220
|
]);
|
|
191
|
-
const
|
|
221
|
+
const Q = i.useRef(!1);
|
|
192
222
|
i.useEffect(()=>{
|
|
193
|
-
const
|
|
194
|
-
switch(
|
|
195
|
-
case
|
|
196
|
-
|
|
223
|
+
const s = (c)=>{
|
|
224
|
+
switch(c.key){
|
|
225
|
+
case At:
|
|
226
|
+
o || w();
|
|
197
227
|
break;
|
|
198
|
-
case
|
|
199
|
-
|
|
228
|
+
case Lt:
|
|
229
|
+
Q.current = !0;
|
|
200
230
|
break;
|
|
201
231
|
}
|
|
202
|
-
},
|
|
203
|
-
|
|
232
|
+
}, r = ()=>Q.current = !1, e = (c)=>{
|
|
233
|
+
!o && m && f && (c.clientX < f.left || c.clientX > f.right || c.clientY < f.top || c.clientY > f.bottom) && w();
|
|
204
234
|
};
|
|
205
|
-
return document.addEventListener("keydown",
|
|
206
|
-
document.removeEventListener("keydown",
|
|
235
|
+
return document.addEventListener("keydown", s, !1), document.addEventListener("keyup", r, !1), document.addEventListener("click", e, !1), ()=>{
|
|
236
|
+
document.removeEventListener("keydown", s, !1), document.removeEventListener("keyup", r, !1), document.removeEventListener("click", e, !1);
|
|
207
237
|
};
|
|
208
238
|
}, [
|
|
239
|
+
m,
|
|
240
|
+
w,
|
|
209
241
|
f,
|
|
210
|
-
|
|
211
|
-
l
|
|
242
|
+
o
|
|
212
243
|
]), i.useEffect(()=>{
|
|
213
|
-
|
|
244
|
+
q || (j || et || ot ? H(a) : C(a));
|
|
214
245
|
}, [
|
|
215
|
-
|
|
216
|
-
Q,
|
|
246
|
+
j,
|
|
217
247
|
et,
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
248
|
+
ot,
|
|
249
|
+
a,
|
|
250
|
+
H,
|
|
251
|
+
C,
|
|
252
|
+
q
|
|
222
253
|
]);
|
|
223
|
-
const
|
|
224
|
-
return /* @__PURE__ */
|
|
254
|
+
const mt = ft(f, y, d, l.height, l.width), ut = h !== void 0 ? h : (V == null ? void 0 : V.width) === Et;
|
|
255
|
+
return /* @__PURE__ */ B(ht, {
|
|
225
256
|
children: [
|
|
226
|
-
/* @__PURE__ */
|
|
227
|
-
ref: (
|
|
228
|
-
const
|
|
229
|
-
|
|
257
|
+
/* @__PURE__ */ n("div", {
|
|
258
|
+
ref: (s)=>{
|
|
259
|
+
const r = s == null ? void 0 : s.firstElementChild;
|
|
260
|
+
r && r !== Y.current && (Y.current = r);
|
|
230
261
|
},
|
|
231
262
|
onMouseOver: ()=>{
|
|
232
|
-
|
|
263
|
+
!m && !o && k(!0);
|
|
233
264
|
},
|
|
234
265
|
onMouseLeave: ()=>{
|
|
235
|
-
|
|
266
|
+
!m && !o && k(!1);
|
|
236
267
|
},
|
|
237
268
|
onClick: ()=>{
|
|
238
|
-
|
|
269
|
+
(m || o) && k(o ? !j : !0);
|
|
239
270
|
},
|
|
240
271
|
onFocus: ()=>{
|
|
241
|
-
|
|
272
|
+
Q.current && !o && Z(!0);
|
|
242
273
|
},
|
|
243
274
|
onBlur: ()=>{
|
|
244
|
-
|
|
275
|
+
!m && !o && Z(!1);
|
|
245
276
|
},
|
|
246
|
-
"aria-describedby":
|
|
247
|
-
children:
|
|
277
|
+
"aria-describedby": a,
|
|
278
|
+
children: u
|
|
248
279
|
}),
|
|
249
|
-
/* @__PURE__ */
|
|
250
|
-
children: /* @__PURE__ */
|
|
251
|
-
in:
|
|
252
|
-
nodeRef:
|
|
253
|
-
timeout:
|
|
254
|
-
enter:
|
|
255
|
-
exit:
|
|
280
|
+
/* @__PURE__ */ n(xt, {
|
|
281
|
+
children: /* @__PURE__ */ n(bt, {
|
|
282
|
+
in: S,
|
|
283
|
+
nodeRef: G,
|
|
284
|
+
timeout: Vt() ? 0 : {
|
|
285
|
+
enter: Yt + K,
|
|
286
|
+
exit: Kt
|
|
256
287
|
},
|
|
257
288
|
onExited: ()=>{
|
|
258
|
-
|
|
289
|
+
M(void 0), P(void 0);
|
|
259
290
|
},
|
|
260
291
|
mountOnEnter: !0,
|
|
261
292
|
unmountOnExit: !0,
|
|
262
|
-
children: (
|
|
293
|
+
children: (s)=>/* @__PURE__ */ n("div", _object_spread_props(_object_spread({
|
|
263
294
|
style: {
|
|
264
295
|
/**
|
|
265
296
|
* Hack to prevent text from wrapping automatically when touching the viewport's edges,
|
|
266
297
|
* even if the content's width didn't reach the max width.
|
|
267
298
|
* https://stackoverflow.com/questions/66106629/how-to-disable-text-wrapping-when-viewport-border-is-reached
|
|
268
|
-
*/ width: `calc(100vw + ${
|
|
299
|
+
*/ width: `calc(100vw + ${ct}px)`,
|
|
269
300
|
top: 0,
|
|
270
301
|
left: 0,
|
|
271
302
|
position: "fixed",
|
|
272
|
-
visibility:
|
|
303
|
+
visibility: T ? "visible" : "hidden"
|
|
273
304
|
}
|
|
274
|
-
},
|
|
305
|
+
}, x), {
|
|
275
306
|
role: "tooltip",
|
|
276
|
-
"aria-label":
|
|
307
|
+
"aria-label": a,
|
|
277
308
|
tabIndex: -1,
|
|
278
|
-
children: /* @__PURE__ */
|
|
279
|
-
className:
|
|
309
|
+
children: /* @__PURE__ */ n("div", {
|
|
310
|
+
className: tt(St),
|
|
280
311
|
style: _object_spread_props(_object_spread({
|
|
281
|
-
pointerEvents:
|
|
282
|
-
transform:
|
|
283
|
-
},
|
|
284
|
-
transition:
|
|
312
|
+
pointerEvents: s === "entered" ? "auto" : "none",
|
|
313
|
+
transform: Ut(mt)
|
|
314
|
+
}, T, wt[s]), {
|
|
315
|
+
transition: s === "entering" ? `opacity .1s linear ${K}ms,transform .3s cubic-bezier(0.215,0.61,0.335,1) ${K}ms` : "opacity .1s linear"
|
|
285
316
|
}),
|
|
286
|
-
ref:
|
|
317
|
+
ref: Bt(dt, G),
|
|
287
318
|
onMouseEnter: ()=>{
|
|
288
|
-
!
|
|
319
|
+
!m && s === "entered" && !o && U(!0);
|
|
289
320
|
},
|
|
290
321
|
onMouseLeave: ()=>{
|
|
291
|
-
|
|
322
|
+
!m && !o && U(!1);
|
|
292
323
|
},
|
|
293
|
-
children: /* @__PURE__ */
|
|
324
|
+
children: /* @__PURE__ */ B("div", {
|
|
294
325
|
className: Ot,
|
|
295
|
-
style: _object_spread({
|
|
296
|
-
width:
|
|
297
|
-
},
|
|
326
|
+
style: _object_spread_props(_object_spread({
|
|
327
|
+
width: v
|
|
328
|
+
}, lt(J)), {
|
|
329
|
+
maxWidth: Math.min(ct, l.width)
|
|
330
|
+
}),
|
|
298
331
|
children: [
|
|
299
|
-
/* @__PURE__ */
|
|
300
|
-
className:
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
children: /* @__PURE__ */ F(Lt, {
|
|
332
|
+
/* @__PURE__ */ n("div", {
|
|
333
|
+
className: tt(It, {
|
|
334
|
+
[Rt]: ut
|
|
335
|
+
}),
|
|
336
|
+
children: /* @__PURE__ */ B(Dt, {
|
|
305
337
|
isInverse: !1,
|
|
306
338
|
children: [
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
}),
|
|
320
|
-
I || e
|
|
339
|
+
t,
|
|
340
|
+
W && /* @__PURE__ */ n(Xt, {
|
|
341
|
+
className: _t,
|
|
342
|
+
onPress: ()=>{
|
|
343
|
+
k(!1), W();
|
|
344
|
+
},
|
|
345
|
+
trackingEvent: R,
|
|
346
|
+
"aria-label": _.modalClose,
|
|
347
|
+
children: /* @__PURE__ */ n(zt, {
|
|
348
|
+
color: X.colors.neutralHigh
|
|
349
|
+
})
|
|
350
|
+
})
|
|
321
351
|
]
|
|
322
352
|
})
|
|
323
353
|
}),
|
|
324
|
-
/* @__PURE__ */
|
|
325
|
-
className:
|
|
326
|
-
style:
|
|
327
|
-
children: /* @__PURE__ */
|
|
328
|
-
className:
|
|
329
|
-
style:
|
|
354
|
+
/* @__PURE__ */ n("div", {
|
|
355
|
+
className: Ct,
|
|
356
|
+
style: E,
|
|
357
|
+
children: /* @__PURE__ */ n("div", {
|
|
358
|
+
className: tt(Nt),
|
|
359
|
+
style: lt(J)
|
|
330
360
|
})
|
|
331
361
|
})
|
|
332
362
|
]
|
|
@@ -337,5 +367,40 @@ const at = (e)=>({
|
|
|
337
367
|
})
|
|
338
368
|
]
|
|
339
369
|
});
|
|
340
|
-
},
|
|
341
|
-
|
|
370
|
+
}, qt = (_param)=>{
|
|
371
|
+
var { centerContent: t, textCenter: u, extra: v, children: d, dataAttributes: x, title: b, description: h } = _param, I = _object_without_properties(_param, [
|
|
372
|
+
"centerContent",
|
|
373
|
+
"textCenter",
|
|
374
|
+
"extra",
|
|
375
|
+
"children",
|
|
376
|
+
"dataAttributes",
|
|
377
|
+
"title",
|
|
378
|
+
"description"
|
|
379
|
+
]);
|
|
380
|
+
return /* @__PURE__ */ n(jt, _object_spread({
|
|
381
|
+
content: /* @__PURE__ */ B(Pt, {
|
|
382
|
+
className: Mt,
|
|
383
|
+
children: [
|
|
384
|
+
(b || h) && /* @__PURE__ */ B(yt, {
|
|
385
|
+
space: 4,
|
|
386
|
+
children: [
|
|
387
|
+
b && /* @__PURE__ */ n(nt, {
|
|
388
|
+
medium: !0,
|
|
389
|
+
children: b
|
|
390
|
+
}),
|
|
391
|
+
h && /* @__PURE__ */ n(nt, {
|
|
392
|
+
regular: !0,
|
|
393
|
+
children: h
|
|
394
|
+
})
|
|
395
|
+
]
|
|
396
|
+
}),
|
|
397
|
+
v !== null && v !== void 0 ? v : d
|
|
398
|
+
]
|
|
399
|
+
}),
|
|
400
|
+
centerContent: t !== null && t !== void 0 ? t : u,
|
|
401
|
+
dataAttributes: _object_spread({
|
|
402
|
+
"component-name": "Tooltip"
|
|
403
|
+
}, x)
|
|
404
|
+
}, I));
|
|
405
|
+
}, ge = qt;
|
|
406
|
+
export { jt as BaseTooltip, ge as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@telefonica/mistica",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.43.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"storybook-for-acceptance-tests": "cross-env NODE_ENV=production yarn storybook --ci 2>&1",
|
|
33
33
|
"playroom": "playroom start",
|
|
34
34
|
"gen-ts-defs": "rimraf dist-ts && tsc --project tsconfig.production.json --emitDeclarationOnly && cp -r dist-ts/src/* dist && rimraf dist-ts",
|
|
35
|
-
"vercel-build": "VERCEL_PROD_BUILD=1 yarn storybook-static && ./node_modules/.bin/playroom build && FORCE_MOBILE=1 ./node_modules/.bin/playroom build && FORCE_DESKTOP=1 ./node_modules/.bin/playroom build && cp img/favicon.ico public/",
|
|
36
|
-
"vercel-preview-build": "yarn storybook-static && ./node_modules/.bin/playroom build && cp img/favicon.ico public/",
|
|
35
|
+
"vercel-build": "VERCEL_PROD_BUILD=1 yarn storybook-static && ./node_modules/.bin/playroom build && FORCE_MOBILE=1 ./node_modules/.bin/playroom build && FORCE_DESKTOP=1 ./node_modules/.bin/playroom build && cp img/favicon.ico public/ && cp img/favicon.svg public/",
|
|
36
|
+
"vercel-preview-build": "yarn storybook-static && ./node_modules/.bin/playroom build && cp img/favicon.ico public/ && cp img/favicon.svg public/",
|
|
37
37
|
"storybook-static": "rimraf public && storybook build -s ./.storybook/css/fonts -o public --quiet",
|
|
38
38
|
"serve-static-storybook": "node ./scripts/serve-static-storybook.js",
|
|
39
39
|
"detect-circular-dependencies": "npx dpdm --circular src/index.tsx",
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
"lodash": "^4.17.21",
|
|
124
124
|
"mini-css-extract-plugin": "^1.6.2",
|
|
125
125
|
"node-fetch": "^2.6.7",
|
|
126
|
-
"playroom": "^0.
|
|
126
|
+
"playroom": "^0.34.2",
|
|
127
127
|
"postcss": "^8.4.18",
|
|
128
128
|
"postcss-loader": "^4.2.0",
|
|
129
129
|
"prettier": "^2.6.1",
|