@telefonica/mistica 15.17.0 → 15.19.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/button.css-mistica.js +61 -52
- package/dist/button.css.d.ts +33 -17
- package/dist/button.d.ts +9 -46
- package/dist/button.js +188 -237
- package/dist/callout.d.ts +1 -0
- package/dist/callout.js +10 -10
- package/dist/card.d.ts +6 -1
- package/dist/card.js +375 -365
- package/dist/chip.d.ts +1 -0
- package/dist/chip.js +15 -15
- package/dist/dialog.d.ts +1 -0
- package/dist/dialog.js +18 -17
- package/dist/feedback.js +58 -52
- package/dist/inline.css-mistica.js +11 -8
- package/dist/inline.css.d.ts +1 -0
- package/dist/inline.js +12 -12
- package/dist/logo-blau.d.ts +4 -0
- package/dist/logo-blau.js +74 -0
- package/dist/logo-common.d.ts +9 -0
- package/dist/logo-common.js +21 -0
- package/dist/logo-movistar.d.ts +4 -0
- package/dist/logo-movistar.js +99 -0
- package/dist/logo-o2-new.d.ts +4 -0
- package/dist/logo-o2-new.js +29 -0
- package/dist/logo-o2.d.ts +4 -0
- package/dist/logo-o2.js +29 -0
- package/dist/logo-telefonica.d.ts +4 -0
- package/dist/logo-telefonica.js +197 -0
- package/dist/logo-tu.d.ts +4 -0
- package/dist/logo-tu.js +28 -0
- package/dist/logo-vivo.d.ts +4 -0
- package/dist/logo-vivo.js +81 -0
- package/dist/logo.d.ts +10 -10
- package/dist/logo.js +174 -534
- package/dist/navigation-bar.d.ts +7 -0
- package/dist/navigation-bar.js +99 -91
- package/dist/package-version.js +1 -1
- package/dist/popover.d.ts +1 -0
- package/dist/popover.js +9 -7
- package/dist/snackbar-context.js +23 -22
- package/dist/snackbar.d.ts +1 -0
- package/dist/snackbar.js +51 -47
- package/dist/text.d.ts +1 -0
- package/dist/text.js +133 -109
- package/dist/tooltip.d.ts +1 -0
- package/dist/tooltip.js +110 -110
- package/dist-es/button.css-mistica.js +36 -18
- package/dist-es/button.js +219 -268
- package/dist-es/callout.js +38 -38
- package/dist-es/card.js +492 -482
- package/dist-es/chip.js +25 -25
- package/dist-es/dialog.js +22 -21
- package/dist-es/feedback.js +96 -89
- package/dist-es/inline.css-mistica.js +3 -3
- package/dist-es/inline.js +23 -23
- package/dist-es/logo-blau.js +65 -0
- package/dist-es/logo-common.js +12 -0
- package/dist-es/logo-movistar.js +90 -0
- package/dist-es/logo-o2-new.js +20 -0
- package/dist-es/logo-o2.js +20 -0
- package/dist-es/logo-telefonica.js +188 -0
- package/dist-es/logo-tu.js +19 -0
- package/dist-es/logo-vivo.js +72 -0
- package/dist-es/logo.js +132 -533
- package/dist-es/navigation-bar.js +163 -155
- package/dist-es/package-version.js +1 -1
- package/dist-es/popover.js +26 -24
- package/dist-es/snackbar-context.js +25 -24
- package/dist-es/snackbar.js +81 -77
- package/dist-es/style.css +1 -1
- package/dist-es/text.js +143 -119
- package/dist-es/tooltip.js +149 -149
- package/package.json +1 -1
package/dist/snackbar.js
CHANGED
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
Object.defineProperty(exports, "default", {
|
|
7
7
|
enumerable: true,
|
|
8
8
|
get: function() {
|
|
9
|
-
return
|
|
9
|
+
return Se;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
12
|
const _jsxruntime = require("react/jsx-runtime");
|
|
@@ -120,37 +120,37 @@ function _object_spread_props(target, source) {
|
|
|
120
120
|
}
|
|
121
121
|
return target;
|
|
122
122
|
}
|
|
123
|
-
const
|
|
123
|
+
const ee = [
|
|
124
124
|
"DISMISS",
|
|
125
125
|
"TIMEOUT",
|
|
126
126
|
"CONSECUTIVE",
|
|
127
127
|
"BUTTON"
|
|
128
|
-
],
|
|
129
|
-
let { message: m, buttonText: n, buttonAccessibilityLabel: u, duration: t, onClose: o, type:
|
|
130
|
-
const { texts:
|
|
128
|
+
], re = 5e3, te = 1e4, ne = /*#__PURE__*/ _react.forwardRef((param, g)=>{
|
|
129
|
+
let { message: m, buttonText: n, buttonAccessibilityLabel: u, closeButtonLabel: d, duration: t, onClose: o, type: c, withDismiss: p = !1, dataAttributes: R } = param;
|
|
130
|
+
const { texts: T } = (0, _hooks.useTheme)(), [a, s] = _react.useState(!1), { width: I, ref: v } = (0, _hooks.useElementDimensions)(), { isDesktopOrBigger: i } = (0, _hooks.useScreenSize)(), l = I > (i ? 160 : 128), B = _react.useRef(null), E = t === 1 / 0 && !n || p, h = _react.useRef(o);
|
|
131
131
|
_react.useEffect(()=>{
|
|
132
|
-
|
|
132
|
+
h.current = o;
|
|
133
133
|
}, [
|
|
134
134
|
o
|
|
135
135
|
]);
|
|
136
|
-
const f = _react.useCallback((
|
|
137
|
-
|
|
138
|
-
var
|
|
139
|
-
(
|
|
136
|
+
const f = _react.useCallback((k)=>{
|
|
137
|
+
s(!1), setTimeout(()=>{
|
|
138
|
+
var S;
|
|
139
|
+
(S = h.current) == null || S.call(h, k);
|
|
140
140
|
}, process.env.NODE_ENV === "test" ? 0 : _snackbarcssmistica.TRANSITION_TIME_IN_MS);
|
|
141
141
|
}, []);
|
|
142
|
-
return _react.useImperativeHandle(
|
|
142
|
+
return _react.useImperativeHandle(g, ()=>_object_spread_props(_object_spread({}, B), {
|
|
143
143
|
close: f
|
|
144
144
|
}), [
|
|
145
145
|
f
|
|
146
146
|
]), _react.useEffect(()=>{
|
|
147
|
-
const
|
|
148
|
-
|
|
149
|
-
}, 50),
|
|
147
|
+
const k = setTimeout(()=>{
|
|
148
|
+
s(!0);
|
|
149
|
+
}, 50), S = t !== 1 / 0 ? setTimeout(()=>f({
|
|
150
150
|
action: "TIMEOUT"
|
|
151
151
|
}), t) : void 0;
|
|
152
152
|
return ()=>{
|
|
153
|
-
clearTimeout(
|
|
153
|
+
clearTimeout(k), clearTimeout(S);
|
|
154
154
|
};
|
|
155
155
|
}, [
|
|
156
156
|
f,
|
|
@@ -158,28 +158,28 @@ const Z = [
|
|
|
158
158
|
]), /* @__PURE__ */ (0, _jsxruntime.jsx)(_portal.Portal, {
|
|
159
159
|
className: _snackbarcssmistica.snackbarContainer,
|
|
160
160
|
children: /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
161
|
-
ref:
|
|
161
|
+
ref: B,
|
|
162
162
|
className: (0, _classnames.default)(_snackbarcssmistica.snackbar, {
|
|
163
|
-
[_snackbarcssmistica.snackbarOpen]:
|
|
163
|
+
[_snackbarcssmistica.snackbarOpen]: a
|
|
164
164
|
}),
|
|
165
165
|
children: /* @__PURE__ */ (0, _jsxruntime.jsxs)("div", _object_spread_props(_object_spread({
|
|
166
166
|
role: "alert",
|
|
167
|
-
className: (0, _classnames.default)(_snackbarcssmistica.wrapper,
|
|
168
|
-
[_snackbarcssmistica.wrapperOpen]:
|
|
167
|
+
className: (0, _classnames.default)(_snackbarcssmistica.wrapper, c === "CRITICAL" ? _snackbarcssmistica.wrapperCritical : _snackbarcssmistica.wrapperInfo, {
|
|
168
|
+
[_snackbarcssmistica.wrapperOpen]: a
|
|
169
169
|
})
|
|
170
|
-
}, (0, _dom.getPrefixedDataAttributes)(
|
|
170
|
+
}, (0, _dom.getPrefixedDataAttributes)(R, "SnackBar")), {
|
|
171
171
|
children: [
|
|
172
172
|
/* @__PURE__ */ (0, _jsxruntime.jsxs)("div", {
|
|
173
173
|
className: (0, _classnames.default)(_snackbarcssmistica.content, (0, _sprinklescssmistica.sprinkles)({
|
|
174
174
|
flexDirection: l ? "column" : "row",
|
|
175
175
|
alignItems: l ? void 0 : "center"
|
|
176
176
|
})),
|
|
177
|
-
style:
|
|
177
|
+
style: E && !l ? {
|
|
178
178
|
paddingRight: 32
|
|
179
179
|
} : void 0,
|
|
180
180
|
children: [
|
|
181
181
|
/* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
182
|
-
style:
|
|
182
|
+
style: E && l ? {
|
|
183
183
|
paddingRight: 32
|
|
184
184
|
} : void 0,
|
|
185
185
|
children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text2, {
|
|
@@ -200,7 +200,7 @@ const Z = [
|
|
|
200
200
|
padding: 0,
|
|
201
201
|
background: "transparent"
|
|
202
202
|
}),
|
|
203
|
-
ref:
|
|
203
|
+
ref: v,
|
|
204
204
|
onPress: ()=>{
|
|
205
205
|
f({
|
|
206
206
|
action: "BUTTON"
|
|
@@ -211,20 +211,20 @@ const Z = [
|
|
|
211
211
|
medium: !0,
|
|
212
212
|
forceMobileSizes: !0,
|
|
213
213
|
truncate: !0,
|
|
214
|
-
color:
|
|
214
|
+
color: c === "CRITICAL" ? _skincontractcssmistica.vars.colors.textPrimaryInverse : _skincontractcssmistica.vars.colors.textLinkSnackbar,
|
|
215
215
|
children: n
|
|
216
216
|
})
|
|
217
217
|
})
|
|
218
218
|
})
|
|
219
219
|
]
|
|
220
220
|
}),
|
|
221
|
-
|
|
221
|
+
E ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.default, {
|
|
222
222
|
onPress: ()=>{
|
|
223
223
|
f({
|
|
224
224
|
action: "DISMISS"
|
|
225
225
|
});
|
|
226
226
|
},
|
|
227
|
-
"aria-label":
|
|
227
|
+
"aria-label": d !== null && d !== void 0 ? d : T.closeButtonLabel,
|
|
228
228
|
className: _snackbarcssmistica.dismissButton[l ? "topRight" : "centered"],
|
|
229
229
|
style: {
|
|
230
230
|
display: "flex",
|
|
@@ -243,50 +243,54 @@ const Z = [
|
|
|
243
243
|
}))
|
|
244
244
|
})
|
|
245
245
|
});
|
|
246
|
-
}),
|
|
247
|
-
let { message: m, buttonText: n, buttonAccessibilityLabel: u, duration: t, onClose: o = ()=>{}, type:
|
|
248
|
-
const
|
|
249
|
-
t = Math.max(t !== null && t !== void 0 ? t :
|
|
250
|
-
const
|
|
246
|
+
}), oe = /*#__PURE__*/ _react.forwardRef((param, g)=>{
|
|
247
|
+
let { message: m, buttonText: n, buttonAccessibilityLabel: u, closeButtonLabel: d, duration: t, onClose: o = ()=>{}, type: c = "INFORMATIVE", withDismiss: p, dataAttributes: R } = param;
|
|
248
|
+
const T = n ? te : re;
|
|
249
|
+
t = Math.max(t !== null && t !== void 0 ? t : T, T);
|
|
250
|
+
const a = (0, _webviewbridge.isWebViewBridgeAvailable)(), s = _react.useRef(o), I = _react.useRef(!1);
|
|
251
251
|
return _react.useEffect(()=>{
|
|
252
252
|
s.current = o;
|
|
253
253
|
}, [
|
|
254
254
|
o
|
|
255
255
|
]), _react.useEffect(()=>{
|
|
256
|
-
|
|
256
|
+
a && !I.current && (I.current = !0, (0, _webviewbridge.nativeMessage)({
|
|
257
257
|
message: m,
|
|
258
258
|
// @ts-expect-error duration can be 'PERSISTENT' in new webview-bridge lib versions, and old apps will ignore it
|
|
259
259
|
duration: t === 1 / 0 ? "PERSISTENT" : void 0,
|
|
260
260
|
buttonText: n,
|
|
261
261
|
buttonAccessibilityLabel: u,
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
262
|
+
closeButtonLabel: d,
|
|
263
|
+
type: c,
|
|
264
|
+
withDismiss: p
|
|
265
|
+
}).then((v)=>{
|
|
266
|
+
const i = v;
|
|
267
|
+
i != null && i.action && ee.includes(i.action) ? s.current({
|
|
268
|
+
action: i.action
|
|
268
269
|
}) : s.current({
|
|
269
270
|
action: "DISMISS"
|
|
270
271
|
});
|
|
271
272
|
}).finally(()=>{
|
|
272
|
-
|
|
273
|
+
I.current = !1;
|
|
273
274
|
}));
|
|
274
275
|
}, [
|
|
275
276
|
u,
|
|
277
|
+
d,
|
|
276
278
|
n,
|
|
277
279
|
t,
|
|
278
280
|
m,
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
]),
|
|
283
|
-
ref:
|
|
281
|
+
a,
|
|
282
|
+
c,
|
|
283
|
+
p
|
|
284
|
+
]), a ? null : /* @__PURE__ */ (0, _jsxruntime.jsx)(ne, {
|
|
285
|
+
ref: g,
|
|
284
286
|
message: m,
|
|
285
287
|
duration: t,
|
|
286
288
|
buttonText: n,
|
|
287
289
|
buttonAccessibilityLabel: u,
|
|
288
|
-
|
|
290
|
+
closeButtonLabel: d,
|
|
291
|
+
type: c,
|
|
289
292
|
onClose: s.current,
|
|
290
|
-
withDismiss:
|
|
293
|
+
withDismiss: p,
|
|
294
|
+
dataAttributes: R
|
|
291
295
|
});
|
|
292
|
-
}),
|
|
296
|
+
}), Se = oe;
|
package/dist/text.d.ts
CHANGED
package/dist/text.js
CHANGED
|
@@ -17,13 +17,13 @@ _export(exports, {
|
|
|
17
17
|
return He;
|
|
18
18
|
},
|
|
19
19
|
Text10: function() {
|
|
20
|
-
return
|
|
20
|
+
return ge;
|
|
21
21
|
},
|
|
22
22
|
Text2: function() {
|
|
23
|
-
return
|
|
23
|
+
return we;
|
|
24
24
|
},
|
|
25
25
|
Text3: function() {
|
|
26
|
-
return
|
|
26
|
+
return ke;
|
|
27
27
|
},
|
|
28
28
|
Text4: function() {
|
|
29
29
|
return Se;
|
|
@@ -32,25 +32,25 @@ _export(exports, {
|
|
|
32
32
|
return Te;
|
|
33
33
|
},
|
|
34
34
|
Text6: function() {
|
|
35
|
-
return
|
|
35
|
+
return fe;
|
|
36
36
|
},
|
|
37
37
|
Text7: function() {
|
|
38
|
-
return
|
|
38
|
+
return be;
|
|
39
39
|
},
|
|
40
40
|
Text8: function() {
|
|
41
|
-
return
|
|
41
|
+
return de;
|
|
42
42
|
},
|
|
43
43
|
Text9: function() {
|
|
44
|
-
return
|
|
44
|
+
return ue;
|
|
45
45
|
},
|
|
46
46
|
default: function() {
|
|
47
|
-
return
|
|
47
|
+
return ze;
|
|
48
48
|
},
|
|
49
49
|
mapToWeight: function() {
|
|
50
|
-
return
|
|
50
|
+
return ee;
|
|
51
51
|
},
|
|
52
52
|
textProps: function() {
|
|
53
|
-
return
|
|
53
|
+
return a;
|
|
54
54
|
}
|
|
55
55
|
});
|
|
56
56
|
const _jsxruntime = require("react/jsx-runtime");
|
|
@@ -189,16 +189,16 @@ function _object_without_properties_loose(source, excluded) {
|
|
|
189
189
|
}
|
|
190
190
|
return target;
|
|
191
191
|
}
|
|
192
|
-
const
|
|
192
|
+
const ee = {
|
|
193
193
|
light: 300,
|
|
194
194
|
regular: 400,
|
|
195
195
|
medium: 500,
|
|
196
196
|
bold: 700
|
|
197
|
-
},
|
|
197
|
+
}, te = (e)=>e === !0 ? 1 : e || "initial", g = "Ħ", ie = /* @__PURE__ */ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
|
|
198
198
|
children: [
|
|
199
199
|
/* @__PURE__ */ (0, _jsxruntime.jsx)("span", {
|
|
200
200
|
"aria-hidden": !0,
|
|
201
|
-
children:
|
|
201
|
+
children: g
|
|
202
202
|
}),
|
|
203
203
|
/* @__PURE__ */ (0, _jsxruntime.jsx)(_screenreaderonly.default, {
|
|
204
204
|
children: /* @__PURE__ */ (0, _jsxruntime.jsx)("span", {
|
|
@@ -206,72 +206,96 @@ const $ = {
|
|
|
206
206
|
})
|
|
207
207
|
})
|
|
208
208
|
]
|
|
209
|
-
}),
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
209
|
+
}), re = (param)=>{
|
|
210
|
+
let { children: e, ariaLabel: i, as: t } = param;
|
|
211
|
+
return typeof t == "string" && [
|
|
212
|
+
"h1",
|
|
213
|
+
"h2",
|
|
214
|
+
"h3",
|
|
215
|
+
"h4",
|
|
216
|
+
"h5",
|
|
217
|
+
"h6"
|
|
218
|
+
].includes(t) && typeof e == "string" && e.includes(g) ? {
|
|
219
|
+
ariaLabel: e.replace(new RegExp(g, "g"), "Vivo"),
|
|
220
|
+
children: /* @__PURE__ */ (0, _jsxruntime.jsx)("span", {
|
|
221
|
+
"aria-hidden": !0,
|
|
222
|
+
children: e
|
|
223
|
+
})
|
|
224
|
+
} : {
|
|
225
|
+
children: _react.Children.map(e, (r)=>typeof r != "string" || !r.includes(g) ? r : /* @__PURE__ */ (0, _jsxruntime.jsx)(_jsxruntime.Fragment, {
|
|
226
|
+
children: r.split(g).map((p, l)=>/* @__PURE__ */ (0, _jsxruntime.jsxs)(_react.Fragment, {
|
|
227
|
+
children: [
|
|
228
|
+
l > 0 && ie,
|
|
229
|
+
p
|
|
230
|
+
]
|
|
231
|
+
}, l))
|
|
232
|
+
})),
|
|
233
|
+
ariaLabel: i
|
|
234
|
+
};
|
|
235
|
+
}, o = (param)=>{
|
|
236
|
+
let { weight: e, color: i = _skincontractcssmistica.vars.colors.textPrimary, decoration: t, truncate: r, transform: p, wordBreak: l = !0, hyphens: S = "auto", as: b = "span", children: h, size: k, mobileSize: w = k, desktopSize: H = k, lineHeight: z, mobileLineHeight: L = z, desktopLineHeight: v = z, letterSpacing: I, textAlign: P, textShadow: C, id: R, role: W, "aria-level": E, "aria-label": f, dataAttributes: N } = param;
|
|
237
|
+
const { skinName: F } = (0, _hooks.useTheme)(), O = (0, _themevariantcontext.useIsInverseVariant)(), _ = te(r), j = {
|
|
219
238
|
[_skincontractcssmistica.vars.colors.textPrimary]: _skincontractcssmistica.vars.colors.textPrimaryInverse,
|
|
220
239
|
[_skincontractcssmistica.vars.colors.textSecondary]: _skincontractcssmistica.vars.colors.textSecondaryInverse,
|
|
221
240
|
[_skincontractcssmistica.vars.colors.textLink]: _skincontractcssmistica.vars.colors.textLinkInverse,
|
|
222
241
|
[_skincontractcssmistica.vars.colors.textError]: _skincontractcssmistica.vars.colors.textErrorInverse
|
|
223
242
|
};
|
|
224
|
-
if (!
|
|
225
|
-
const
|
|
243
|
+
if (!h && h !== 0) return null;
|
|
244
|
+
const D = (0, _classnames.default)(_textcssmistica.text, l ? _textcssmistica.withWordBreak : _textcssmistica.withoutWordBreak, {
|
|
226
245
|
[_textcssmistica.truncate]: r,
|
|
227
246
|
[_textcssmistica.truncateToOneLine]: r === 1 || r === !0
|
|
228
|
-
}),
|
|
229
|
-
[_textcssmistica.vars.mobileSize]:
|
|
230
|
-
[_textcssmistica.vars.mobileLineHeight]:
|
|
247
|
+
}), B = (0, _css.applyCssVars)({
|
|
248
|
+
[_textcssmistica.vars.mobileSize]: w ? (0, _css.pxToRem)(w) : "inherit",
|
|
249
|
+
[_textcssmistica.vars.mobileLineHeight]: L ? (0, _css.pxToRem)(L) : "inherit",
|
|
231
250
|
[_textcssmistica.vars.desktopSize]: H ? (0, _css.pxToRem)(H) : "inherit",
|
|
232
|
-
[_textcssmistica.vars.desktopLineHeight]:
|
|
233
|
-
}),
|
|
234
|
-
[_textcssmistica.vars.lineClamp]: String(
|
|
251
|
+
[_textcssmistica.vars.desktopLineHeight]: v ? (0, _css.pxToRem)(v) : "inherit"
|
|
252
|
+
}), K = r ? (0, _css.applyCssVars)({
|
|
253
|
+
[_textcssmistica.vars.lineClamp]: String(_)
|
|
235
254
|
}) : {};
|
|
236
|
-
var
|
|
237
|
-
return
|
|
238
|
-
|
|
239
|
-
|
|
255
|
+
var _j_i;
|
|
256
|
+
return F === _constants.VIVO_NEW_SKIN && ({ ariaLabel: f, children: h } = re({
|
|
257
|
+
children: h,
|
|
258
|
+
ariaLabel: f,
|
|
259
|
+
as: b
|
|
260
|
+
})), /*#__PURE__*/ _react.createElement(b, _object_spread_props(_object_spread({
|
|
261
|
+
className: D,
|
|
262
|
+
id: R,
|
|
240
263
|
role: W,
|
|
241
|
-
"aria-level":
|
|
264
|
+
"aria-level": E,
|
|
265
|
+
"aria-label": f
|
|
242
266
|
}, (0, _dom.getPrefixedDataAttributes)(N, "Text")), {
|
|
243
|
-
style: _object_spread_props(_object_spread({},
|
|
244
|
-
hyphens:
|
|
245
|
-
WebkitHyphens:
|
|
246
|
-
letterSpacing:
|
|
247
|
-
fontWeight: e ?
|
|
248
|
-
textTransform:
|
|
249
|
-
textDecoration:
|
|
250
|
-
overflowWrap:
|
|
251
|
-
color:
|
|
252
|
-
textAlign:
|
|
253
|
-
textShadow:
|
|
267
|
+
style: _object_spread_props(_object_spread({}, B, K), {
|
|
268
|
+
hyphens: S,
|
|
269
|
+
WebkitHyphens: S,
|
|
270
|
+
letterSpacing: I,
|
|
271
|
+
fontWeight: e ? ee[e] : "inherit",
|
|
272
|
+
textTransform: p || "inherit",
|
|
273
|
+
textDecoration: t !== null && t !== void 0 ? t : "inherit",
|
|
274
|
+
overflowWrap: l ? "anywhere" : "inherit",
|
|
275
|
+
color: O ? (_j_i = j[i]) !== null && _j_i !== void 0 ? _j_i : i : i,
|
|
276
|
+
textAlign: P,
|
|
277
|
+
textShadow: C,
|
|
254
278
|
// When rendering as <pre/>, spaces are preserved and we don't want to remove them
|
|
255
|
-
whiteSpace:
|
|
279
|
+
whiteSpace: b === "pre" ? void 0 : "pre-line"
|
|
256
280
|
})
|
|
257
|
-
}),
|
|
258
|
-
},
|
|
281
|
+
}), h);
|
|
282
|
+
}, d = (e)=>{
|
|
259
283
|
if (e.light) return "light";
|
|
260
284
|
if (e.regular) return "regular";
|
|
261
285
|
if (e.medium) return "medium";
|
|
262
286
|
if (e.weight) return e.weight;
|
|
263
287
|
}, s = (param)=>{
|
|
264
|
-
let { forceMobileSizes: e, mobileSize:
|
|
288
|
+
let { forceMobileSizes: e, mobileSize: i, mobileLineHeight: t, desktopSize: r, desktopLineHeight: p } = param;
|
|
265
289
|
return e ? {
|
|
266
|
-
size:
|
|
267
|
-
lineHeight:
|
|
290
|
+
size: i,
|
|
291
|
+
lineHeight: t
|
|
268
292
|
} : {
|
|
269
|
-
mobileSize:
|
|
270
|
-
mobileLineHeight:
|
|
293
|
+
mobileSize: i,
|
|
294
|
+
mobileLineHeight: t,
|
|
271
295
|
desktopSize: r,
|
|
272
|
-
desktopLineHeight:
|
|
296
|
+
desktopLineHeight: p
|
|
273
297
|
};
|
|
274
|
-
},
|
|
298
|
+
}, a = {
|
|
275
299
|
text1: {
|
|
276
300
|
mobileSize: 12,
|
|
277
301
|
mobileLineHeight: "16px",
|
|
@@ -332,140 +356,140 @@ const $ = {
|
|
|
332
356
|
desktopSize: 64,
|
|
333
357
|
desktopLineHeight: "72px"
|
|
334
358
|
}
|
|
335
|
-
},
|
|
336
|
-
var { dataAttributes: e, forceMobileSizes:
|
|
359
|
+
}, ge = (_param)=>{
|
|
360
|
+
var { dataAttributes: e, forceMobileSizes: i } = _param, t = _object_without_properties(_param, [
|
|
337
361
|
"dataAttributes",
|
|
338
362
|
"forceMobileSizes"
|
|
339
363
|
]);
|
|
340
364
|
const { textPresets: r } = (0, _hooks.useTheme)();
|
|
341
365
|
return /* @__PURE__ */ (0, _jsxruntime.jsx)(o, _object_spread(_object_spread_props(_object_spread({}, s(_object_spread({
|
|
342
|
-
forceMobileSizes:
|
|
343
|
-
},
|
|
366
|
+
forceMobileSizes: i
|
|
367
|
+
}, a.text10))), {
|
|
344
368
|
weight: r.text10.weight,
|
|
345
369
|
dataAttributes: _object_spread({
|
|
346
370
|
"component-name": "Text10"
|
|
347
371
|
}, e)
|
|
348
|
-
}),
|
|
349
|
-
},
|
|
350
|
-
var { dataAttributes: e, forceMobileSizes:
|
|
372
|
+
}), t));
|
|
373
|
+
}, ue = (_param)=>{
|
|
374
|
+
var { dataAttributes: e, forceMobileSizes: i } = _param, t = _object_without_properties(_param, [
|
|
351
375
|
"dataAttributes",
|
|
352
376
|
"forceMobileSizes"
|
|
353
377
|
]);
|
|
354
378
|
const { textPresets: r } = (0, _hooks.useTheme)();
|
|
355
379
|
return /* @__PURE__ */ (0, _jsxruntime.jsx)(o, _object_spread(_object_spread_props(_object_spread({}, s(_object_spread({
|
|
356
|
-
forceMobileSizes:
|
|
357
|
-
},
|
|
380
|
+
forceMobileSizes: i
|
|
381
|
+
}, a.text9))), {
|
|
358
382
|
weight: r.text9.weight,
|
|
359
383
|
dataAttributes: _object_spread({
|
|
360
384
|
"component-name": "Text9"
|
|
361
385
|
}, e)
|
|
362
|
-
}),
|
|
363
|
-
},
|
|
364
|
-
var { dataAttributes: e, forceMobileSizes:
|
|
386
|
+
}), t));
|
|
387
|
+
}, de = (_param)=>{
|
|
388
|
+
var { dataAttributes: e, forceMobileSizes: i } = _param, t = _object_without_properties(_param, [
|
|
365
389
|
"dataAttributes",
|
|
366
390
|
"forceMobileSizes"
|
|
367
391
|
]);
|
|
368
392
|
const { textPresets: r } = (0, _hooks.useTheme)();
|
|
369
393
|
return /* @__PURE__ */ (0, _jsxruntime.jsx)(o, _object_spread(_object_spread_props(_object_spread({}, s(_object_spread({
|
|
370
|
-
forceMobileSizes:
|
|
371
|
-
},
|
|
394
|
+
forceMobileSizes: i
|
|
395
|
+
}, a.text8))), {
|
|
372
396
|
weight: r.text8.weight,
|
|
373
397
|
dataAttributes: _object_spread({
|
|
374
398
|
"component-name": "Text8"
|
|
375
399
|
}, e)
|
|
376
|
-
}),
|
|
377
|
-
},
|
|
378
|
-
var { dataAttributes: e, forceMobileSizes:
|
|
400
|
+
}), t));
|
|
401
|
+
}, be = (_param)=>{
|
|
402
|
+
var { dataAttributes: e, forceMobileSizes: i } = _param, t = _object_without_properties(_param, [
|
|
379
403
|
"dataAttributes",
|
|
380
404
|
"forceMobileSizes"
|
|
381
405
|
]);
|
|
382
406
|
const { textPresets: r } = (0, _hooks.useTheme)();
|
|
383
407
|
return /* @__PURE__ */ (0, _jsxruntime.jsx)(o, _object_spread(_object_spread_props(_object_spread({}, s(_object_spread({
|
|
384
|
-
forceMobileSizes:
|
|
385
|
-
},
|
|
408
|
+
forceMobileSizes: i
|
|
409
|
+
}, a.text7))), {
|
|
386
410
|
weight: r.text7.weight,
|
|
387
411
|
dataAttributes: _object_spread({
|
|
388
412
|
"component-name": "Text7"
|
|
389
413
|
}, e)
|
|
390
|
-
}),
|
|
391
|
-
},
|
|
392
|
-
var { dataAttributes: e, forceMobileSizes:
|
|
414
|
+
}), t));
|
|
415
|
+
}, fe = (_param)=>{
|
|
416
|
+
var { dataAttributes: e, forceMobileSizes: i } = _param, t = _object_without_properties(_param, [
|
|
393
417
|
"dataAttributes",
|
|
394
418
|
"forceMobileSizes"
|
|
395
419
|
]);
|
|
396
420
|
const { textPresets: r } = (0, _hooks.useTheme)();
|
|
397
421
|
return /* @__PURE__ */ (0, _jsxruntime.jsx)(o, _object_spread(_object_spread_props(_object_spread({}, s(_object_spread({
|
|
398
|
-
forceMobileSizes:
|
|
399
|
-
},
|
|
422
|
+
forceMobileSizes: i
|
|
423
|
+
}, a.text6))), {
|
|
400
424
|
weight: r.text6.weight,
|
|
401
425
|
dataAttributes: _object_spread({
|
|
402
426
|
"component-name": "Text6"
|
|
403
427
|
}, e)
|
|
404
|
-
}),
|
|
428
|
+
}), t));
|
|
405
429
|
}, Te = (_param)=>{
|
|
406
|
-
var { dataAttributes: e, forceMobileSizes:
|
|
430
|
+
var { dataAttributes: e, forceMobileSizes: i } = _param, t = _object_without_properties(_param, [
|
|
407
431
|
"dataAttributes",
|
|
408
432
|
"forceMobileSizes"
|
|
409
433
|
]);
|
|
410
434
|
const { textPresets: r } = (0, _hooks.useTheme)();
|
|
411
435
|
return /* @__PURE__ */ (0, _jsxruntime.jsx)(o, _object_spread(_object_spread_props(_object_spread({}, s(_object_spread({
|
|
412
|
-
forceMobileSizes:
|
|
413
|
-
},
|
|
436
|
+
forceMobileSizes: i
|
|
437
|
+
}, a.text5))), {
|
|
414
438
|
weight: r.text5.weight,
|
|
415
439
|
dataAttributes: _object_spread({
|
|
416
440
|
"component-name": "Text5"
|
|
417
441
|
}, e)
|
|
418
|
-
}),
|
|
442
|
+
}), t));
|
|
419
443
|
}, Se = (_param)=>{
|
|
420
|
-
var { dataAttributes: e, forceMobileSizes:
|
|
444
|
+
var { dataAttributes: e, forceMobileSizes: i } = _param, t = _object_without_properties(_param, [
|
|
421
445
|
"dataAttributes",
|
|
422
446
|
"forceMobileSizes"
|
|
423
447
|
]);
|
|
424
448
|
return /* @__PURE__ */ (0, _jsxruntime.jsx)(o, _object_spread(_object_spread_props(_object_spread({}, s(_object_spread({
|
|
425
|
-
forceMobileSizes:
|
|
426
|
-
},
|
|
427
|
-
weight:
|
|
449
|
+
forceMobileSizes: i
|
|
450
|
+
}, a.text4))), {
|
|
451
|
+
weight: d(t),
|
|
428
452
|
dataAttributes: _object_spread({
|
|
429
453
|
"component-name": "Text4"
|
|
430
454
|
}, e)
|
|
431
|
-
}),
|
|
432
|
-
},
|
|
433
|
-
var { dataAttributes: e, forceMobileSizes:
|
|
455
|
+
}), t));
|
|
456
|
+
}, ke = (_param)=>{
|
|
457
|
+
var { dataAttributes: e, forceMobileSizes: i } = _param, t = _object_without_properties(_param, [
|
|
434
458
|
"dataAttributes",
|
|
435
459
|
"forceMobileSizes"
|
|
436
460
|
]);
|
|
437
461
|
return /* @__PURE__ */ (0, _jsxruntime.jsx)(o, _object_spread(_object_spread_props(_object_spread({}, s(_object_spread({
|
|
438
|
-
forceMobileSizes:
|
|
439
|
-
},
|
|
440
|
-
weight:
|
|
462
|
+
forceMobileSizes: i
|
|
463
|
+
}, a.text3))), {
|
|
464
|
+
weight: d(t),
|
|
441
465
|
dataAttributes: _object_spread({
|
|
442
466
|
"component-name": "Text3"
|
|
443
467
|
}, e)
|
|
444
|
-
}),
|
|
445
|
-
},
|
|
446
|
-
var { dataAttributes: e, forceMobileSizes:
|
|
468
|
+
}), t));
|
|
469
|
+
}, we = (_param)=>{
|
|
470
|
+
var { dataAttributes: e, forceMobileSizes: i } = _param, t = _object_without_properties(_param, [
|
|
447
471
|
"dataAttributes",
|
|
448
472
|
"forceMobileSizes"
|
|
449
473
|
]);
|
|
450
474
|
return /* @__PURE__ */ (0, _jsxruntime.jsx)(o, _object_spread(_object_spread_props(_object_spread({}, s(_object_spread({
|
|
451
|
-
forceMobileSizes:
|
|
452
|
-
},
|
|
453
|
-
weight:
|
|
475
|
+
forceMobileSizes: i
|
|
476
|
+
}, a.text2))), {
|
|
477
|
+
weight: d(t),
|
|
454
478
|
dataAttributes: _object_spread({
|
|
455
479
|
"component-name": "Text2"
|
|
456
480
|
}, e)
|
|
457
|
-
}),
|
|
481
|
+
}), t));
|
|
458
482
|
}, He = (_param)=>{
|
|
459
|
-
var { dataAttributes: e, forceMobileSizes:
|
|
483
|
+
var { dataAttributes: e, forceMobileSizes: i } = _param, t = _object_without_properties(_param, [
|
|
460
484
|
"dataAttributes",
|
|
461
485
|
"forceMobileSizes"
|
|
462
486
|
]);
|
|
463
487
|
return /* @__PURE__ */ (0, _jsxruntime.jsx)(o, _object_spread(_object_spread_props(_object_spread({}, s(_object_spread({
|
|
464
|
-
forceMobileSizes:
|
|
465
|
-
},
|
|
466
|
-
weight:
|
|
488
|
+
forceMobileSizes: i
|
|
489
|
+
}, a.text1))), {
|
|
490
|
+
weight: d(t),
|
|
467
491
|
dataAttributes: _object_spread({
|
|
468
492
|
"component-name": "Text1"
|
|
469
493
|
}, e)
|
|
470
|
-
}),
|
|
471
|
-
},
|
|
494
|
+
}), t));
|
|
495
|
+
}, ze = o;
|
package/dist/tooltip.d.ts
CHANGED
|
@@ -25,6 +25,7 @@ type BaseTooltipProps = {
|
|
|
25
25
|
open?: boolean;
|
|
26
26
|
hasPointerInteractionOnly?: boolean;
|
|
27
27
|
onClose?: () => void;
|
|
28
|
+
closeButtonLabel?: string;
|
|
28
29
|
trackingEvent?: TrackingEvent | ReadonlyArray<TrackingEvent>;
|
|
29
30
|
};
|
|
30
31
|
export declare const BaseTooltip: React.FC<BaseTooltipProps>;
|