@telefonica/mistica 15.18.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/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/text.d.ts +1 -0
- package/dist/text.js +133 -109
- package/dist-es/button.css-mistica.js +36 -18
- package/dist-es/button.js +219 -268
- 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/style.css +1 -1
- package/dist-es/text.js +143 -119
- package/package.json +1 -1
package/dist/button.js
CHANGED
|
@@ -11,19 +11,19 @@ function _export(target, all) {
|
|
|
11
11
|
}
|
|
12
12
|
_export(exports, {
|
|
13
13
|
ButtonDanger: function() {
|
|
14
|
-
return
|
|
14
|
+
return ze;
|
|
15
15
|
},
|
|
16
16
|
ButtonLink: function() {
|
|
17
|
-
return
|
|
17
|
+
return Pe;
|
|
18
18
|
},
|
|
19
19
|
ButtonLinkDanger: function() {
|
|
20
|
-
return
|
|
20
|
+
return Ne;
|
|
21
21
|
},
|
|
22
22
|
ButtonPrimary: function() {
|
|
23
|
-
return
|
|
23
|
+
return Se;
|
|
24
24
|
},
|
|
25
25
|
ButtonSecondary: function() {
|
|
26
|
-
return
|
|
26
|
+
return Ve;
|
|
27
27
|
}
|
|
28
28
|
});
|
|
29
29
|
const _jsxruntime = require("react/jsx-runtime");
|
|
@@ -167,35 +167,34 @@ function _object_without_properties_loose(source, excluded) {
|
|
|
167
167
|
}
|
|
168
168
|
return target;
|
|
169
169
|
}
|
|
170
|
-
const
|
|
171
|
-
let {
|
|
172
|
-
const
|
|
173
|
-
let
|
|
174
|
-
const
|
|
175
|
-
|
|
176
|
-
children:
|
|
177
|
-
},
|
|
170
|
+
const A = (param)=>{
|
|
171
|
+
let { small: e, content: i, defaultIconSize: n, TextContentRenderer: r } = param;
|
|
172
|
+
const f = (0, _utils.flattenChildren)(i), g = f.length, l = [];
|
|
173
|
+
let c = [];
|
|
174
|
+
const m = ()=>{
|
|
175
|
+
l.push(/* @__PURE__ */ (0, _jsxruntime.jsx)(_react.Fragment, {
|
|
176
|
+
children: r(c, e)
|
|
177
|
+
}, l.length)), c = [];
|
|
178
178
|
};
|
|
179
|
-
return
|
|
180
|
-
const
|
|
181
|
-
if (/*#__PURE__*/ _react.isValidElement(
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
c.push(/* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
179
|
+
return f.forEach((s, d)=>{
|
|
180
|
+
const u = d === 0, o = d === g - 1;
|
|
181
|
+
if (/*#__PURE__*/ _react.isValidElement(s)) {
|
|
182
|
+
c.length && m();
|
|
183
|
+
const y = s.props.size !== void 0 ? (0, _css.pxToRem)(s.props.size) : n;
|
|
184
|
+
l.push(/* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
186
185
|
style: {
|
|
187
186
|
display: "flex",
|
|
188
187
|
alignItems: "center",
|
|
189
|
-
marginLeft:
|
|
190
|
-
marginRight: o ? 0 : _buttoncssmistica.
|
|
188
|
+
marginLeft: u ? 0 : _buttoncssmistica.iconMargin,
|
|
189
|
+
marginRight: o ? 0 : _buttoncssmistica.iconMargin
|
|
191
190
|
},
|
|
192
|
-
children: /*#__PURE__*/ _react.cloneElement(
|
|
193
|
-
size:
|
|
191
|
+
children: /*#__PURE__*/ _react.cloneElement(s, {
|
|
192
|
+
size: y
|
|
194
193
|
})
|
|
195
|
-
},
|
|
196
|
-
} else
|
|
197
|
-
}),
|
|
198
|
-
},
|
|
194
|
+
}, l.length));
|
|
195
|
+
} else c.push(s), o && m();
|
|
196
|
+
}), l;
|
|
197
|
+
}, me = ()=>{
|
|
199
198
|
const { skinName: e } = (0, _hooks.useTheme)();
|
|
200
199
|
return e === _constants.VIVO_NEW_SKIN ? /* @__PURE__ */ (0, _jsxruntime.jsx)("svg", {
|
|
201
200
|
width: "0.5em",
|
|
@@ -215,23 +214,33 @@ const k = (param)=>{
|
|
|
215
214
|
fill: "currentColor"
|
|
216
215
|
})
|
|
217
216
|
});
|
|
218
|
-
},
|
|
219
|
-
let { showSpinner: e, children:
|
|
220
|
-
const
|
|
217
|
+
}, fe = (param)=>{
|
|
218
|
+
let { showSpinner: e, children: i, small: n, loadingText: r, shouldRenderSpinner: f, setShouldRenderSpinner: g, TextContentRenderer: l, StartIcon: c, EndIcon: m, withChevron: s } = param;
|
|
219
|
+
const d = n ? _buttoncssmistica.iconSize.small : _buttoncssmistica.iconSize.default, u = n ? _buttoncssmistica.spinnerSize.small : _buttoncssmistica.spinnerSize.default, o = A({
|
|
220
|
+
small: n,
|
|
221
|
+
content: i,
|
|
222
|
+
defaultIconSize: d,
|
|
223
|
+
TextContentRenderer: l
|
|
224
|
+
}), C = A({
|
|
225
|
+
small: n,
|
|
226
|
+
content: r,
|
|
227
|
+
defaultIconSize: d,
|
|
228
|
+
TextContentRenderer: l
|
|
229
|
+
});
|
|
221
230
|
return /* @__PURE__ */ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
|
|
222
231
|
children: [
|
|
223
232
|
/* @__PURE__ */ (0, _jsxruntime.jsxs)("div", {
|
|
224
233
|
"aria-hidden": e ? !0 : void 0,
|
|
225
|
-
className:
|
|
234
|
+
className: _buttoncssmistica.textContent,
|
|
226
235
|
children: [
|
|
227
|
-
|
|
236
|
+
c && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
228
237
|
style: {
|
|
229
238
|
display: "flex",
|
|
230
239
|
alignItems: "center",
|
|
231
|
-
marginRight: _buttoncssmistica.
|
|
240
|
+
marginRight: _buttoncssmistica.iconMargin
|
|
232
241
|
},
|
|
233
|
-
children: /* @__PURE__ */ (0, _jsxruntime.jsx)(
|
|
234
|
-
size:
|
|
242
|
+
children: /* @__PURE__ */ (0, _jsxruntime.jsx)(c, {
|
|
243
|
+
size: d,
|
|
235
244
|
color: "currentColor"
|
|
236
245
|
})
|
|
237
246
|
}),
|
|
@@ -241,29 +250,25 @@ const k = (param)=>{
|
|
|
241
250
|
alignItems: "baseline"
|
|
242
251
|
},
|
|
243
252
|
children: [
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
defaultIconSize: o,
|
|
247
|
-
renderText: s
|
|
248
|
-
}),
|
|
249
|
-
h && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
253
|
+
o,
|
|
254
|
+
s && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
250
255
|
style: {
|
|
251
256
|
display: "flex",
|
|
252
257
|
alignItems: "center",
|
|
253
|
-
marginLeft: _buttoncssmistica.
|
|
258
|
+
marginLeft: _buttoncssmistica.chevronMarginLeft
|
|
254
259
|
},
|
|
255
|
-
children: /* @__PURE__ */ (0, _jsxruntime.jsx)(
|
|
260
|
+
children: /* @__PURE__ */ (0, _jsxruntime.jsx)(me, {})
|
|
256
261
|
})
|
|
257
262
|
]
|
|
258
263
|
}),
|
|
259
|
-
m && !
|
|
264
|
+
m && !s && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
260
265
|
style: {
|
|
261
266
|
display: "flex",
|
|
262
267
|
alignItems: "center",
|
|
263
|
-
marginLeft: _buttoncssmistica.
|
|
268
|
+
marginLeft: _buttoncssmistica.iconMargin
|
|
264
269
|
},
|
|
265
270
|
children: /* @__PURE__ */ (0, _jsxruntime.jsx)(m, {
|
|
266
|
-
size:
|
|
271
|
+
size: d,
|
|
267
272
|
color: "currentColor"
|
|
268
273
|
})
|
|
269
274
|
})
|
|
@@ -272,135 +277,137 @@ const k = (param)=>{
|
|
|
272
277
|
/* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
273
278
|
className: _buttoncssmistica.loadingFiller,
|
|
274
279
|
"aria-hidden": !0,
|
|
275
|
-
style:
|
|
276
|
-
paddingLeft:
|
|
277
|
-
paddingRight: _buttoncssmistica.
|
|
280
|
+
style: r ? {
|
|
281
|
+
paddingLeft: u,
|
|
282
|
+
paddingRight: `calc(${_buttoncssmistica.iconMargin} + 2 * ${n ? _buttoncssmistica.buttonPaddingX.small : _buttoncssmistica.buttonPaddingX.default})`
|
|
278
283
|
} : void 0,
|
|
279
|
-
children:
|
|
280
|
-
content: l,
|
|
281
|
-
defaultIconSize: o,
|
|
282
|
-
renderText: s
|
|
283
|
-
})
|
|
284
|
+
children: C
|
|
284
285
|
}),
|
|
285
286
|
/* @__PURE__ */ (0, _jsxruntime.jsxs)("div", {
|
|
286
287
|
"aria-hidden": e ? void 0 : !0,
|
|
287
288
|
className: _buttoncssmistica.loadingContent,
|
|
288
289
|
onTransitionEnd: ()=>{
|
|
289
|
-
e !==
|
|
290
|
+
e !== f && g(e);
|
|
290
291
|
},
|
|
291
292
|
children: [
|
|
292
|
-
|
|
293
|
-
rolePresentation: !!
|
|
293
|
+
f ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_spinner.default, {
|
|
294
|
+
rolePresentation: !!r,
|
|
294
295
|
color: "currentcolor",
|
|
295
296
|
delay: "0s",
|
|
296
|
-
size:
|
|
297
|
+
size: u
|
|
297
298
|
}) : /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
298
299
|
style: {
|
|
299
300
|
display: "inline-block",
|
|
300
|
-
width:
|
|
301
|
-
height:
|
|
301
|
+
width: u,
|
|
302
|
+
height: u
|
|
302
303
|
}
|
|
303
304
|
}),
|
|
304
|
-
|
|
305
|
+
r ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
|
|
305
306
|
paddingLeft: 8,
|
|
306
|
-
children:
|
|
307
|
-
content: l,
|
|
308
|
-
defaultIconSize: o,
|
|
309
|
-
renderText: s
|
|
310
|
-
})
|
|
307
|
+
children: C
|
|
311
308
|
}) : null
|
|
312
309
|
]
|
|
313
310
|
})
|
|
314
311
|
]
|
|
315
312
|
});
|
|
316
|
-
},
|
|
317
|
-
|
|
313
|
+
}, x = /*#__PURE__*/ _react.forwardRef((e, i)=>{
|
|
314
|
+
var _e_withChevron;
|
|
315
|
+
const { eventFormat: n } = (0, _analytics.useTrackingConfig)(), { formStatus: r, formId: f } = (0, _formcontext.useForm)(), g = (0, _themevariantcontext.useIsInverseVariant)(), { loadingText: l } = e, c = !!e.submit, m = r === "sending", { isDarkMode: s } = (0, _hooks.useTheme)(), [d, u] = _react.useState(!1), o = e.showSpinner || m && c || d, C = (_e_withChevron = e.withChevron) !== null && _e_withChevron !== void 0 ? _e_withChevron : e.buttonType.startsWith("link") && (!!e.href || !!e.to), [y, P] = _react.useState(!!o);
|
|
318
316
|
_react.useEffect(()=>{
|
|
319
|
-
|
|
317
|
+
o && !y && P(!0);
|
|
320
318
|
}, [
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
319
|
+
o,
|
|
320
|
+
y,
|
|
321
|
+
r
|
|
324
322
|
]);
|
|
325
323
|
var _e_trackingEvent;
|
|
326
|
-
const
|
|
324
|
+
const W = ()=>{
|
|
325
|
+
let b, h;
|
|
326
|
+
switch(e.buttonType){
|
|
327
|
+
case "link":
|
|
328
|
+
b = "link", h = _analytics.eventActions.linkTapped;
|
|
329
|
+
break;
|
|
330
|
+
case "linkDanger":
|
|
331
|
+
b = "danger_link", h = _analytics.eventActions.linkTapped;
|
|
332
|
+
break;
|
|
333
|
+
default:
|
|
334
|
+
b = `${e.buttonType}_button`, h = `${e.buttonType}_button_tapped`;
|
|
335
|
+
break;
|
|
336
|
+
}
|
|
337
|
+
return n === "google-analytics-4" ? {
|
|
327
338
|
name: _analytics.eventNames.userInteraction,
|
|
328
|
-
component_type:
|
|
339
|
+
component_type: b,
|
|
329
340
|
component_copy: (0, _common.getTextFromChildren)(e.children)
|
|
330
341
|
} : {
|
|
331
342
|
category: _analytics.eventCategories.userInteraction,
|
|
332
|
-
action:
|
|
343
|
+
action: h,
|
|
333
344
|
label: (0, _common.getTextFromChildren)(e.children)
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
truncate: 1,
|
|
339
|
-
color: "inherit",
|
|
340
|
-
as: "div",
|
|
341
|
-
children: I
|
|
342
|
-
}) : /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text3, {
|
|
343
|
-
weight: i.button.weight,
|
|
344
|
-
truncate: 1,
|
|
345
|
-
color: "inherit",
|
|
346
|
-
as: "div",
|
|
347
|
-
children: I
|
|
348
|
-
}), b = {
|
|
349
|
-
ref: t,
|
|
350
|
-
className: (0, _classnames.default)(s ? _buttoncssmistica.inverseButtonVariants[e.type] : _buttoncssmistica.buttonVariants[e.type], e.className, {
|
|
345
|
+
};
|
|
346
|
+
}, N = e.buttonType.startsWith("link") ? _buttoncssmistica.linkMinWidth : _buttoncssmistica.buttonMinWidth, S = e.buttonType === "linkDanger" && s && g ? "linkDangerDark" : e.buttonType, T = {
|
|
347
|
+
ref: i,
|
|
348
|
+
className: (0, _classnames.default)(g ? _buttoncssmistica.inverseButtonVariants[S] : _buttoncssmistica.buttonVariants[S], e.className, {
|
|
351
349
|
[_buttoncssmistica.small]: e.small,
|
|
352
|
-
[_buttoncssmistica.isLoading]:
|
|
350
|
+
[_buttoncssmistica.isLoading]: o
|
|
353
351
|
}),
|
|
354
|
-
style: _object_spread({
|
|
352
|
+
style: _object_spread(_object_spread_props(_object_spread({}, (0, _css.applyCssVars)({
|
|
353
|
+
[_buttoncssmistica.buttonVars.minWidth]: e.small ? N.small : N.default
|
|
354
|
+
}), e.bleedLeft ? {
|
|
355
|
+
marginLeft: `calc(-1 * (${_buttoncssmistica.borderSize} + ${e.small ? _buttoncssmistica.buttonPaddingX.small : _buttoncssmistica.buttonPaddingX.default}))`
|
|
356
|
+
} : void 0, e.bleedRight ? {
|
|
357
|
+
marginRight: `calc(-1 * (${_buttoncssmistica.borderSize} + ${e.small ? _buttoncssmistica.buttonPaddingX.small : _buttoncssmistica.buttonPaddingX.default}))`
|
|
358
|
+
} : void 0, e.bleedY ? {
|
|
359
|
+
marginTop: `calc(-1 * (${_buttoncssmistica.borderSize} + ${e.small ? _buttoncssmistica.buttonPaddingY.small : _buttoncssmistica.buttonPaddingY.default}))`,
|
|
360
|
+
marginBottom: `calc(-1 * (${_buttoncssmistica.borderSize} + ${e.small ? _buttoncssmistica.buttonPaddingY.small : _buttoncssmistica.buttonPaddingY.default}))`
|
|
361
|
+
} : void 0), {
|
|
355
362
|
cursor: e.fake ? "pointer" : void 0
|
|
356
|
-
}, e.style),
|
|
357
|
-
trackingEvent: (_e_trackingEvent = e.trackingEvent) !== null && _e_trackingEvent !== void 0 ? _e_trackingEvent : e.trackEvent ?
|
|
363
|
+
}), e.style),
|
|
364
|
+
trackingEvent: (_e_trackingEvent = e.trackingEvent) !== null && _e_trackingEvent !== void 0 ? _e_trackingEvent : e.trackEvent ? W() : void 0,
|
|
358
365
|
dataAttributes: e.dataAttributes,
|
|
359
366
|
"aria-label": e["aria-label"],
|
|
360
367
|
"aria-controls": e["aria-controls"],
|
|
361
368
|
"aria-expanded": e["aria-expanded"],
|
|
362
369
|
"aria-haspopup": e["aria-haspopup"],
|
|
363
370
|
tabIndex: e.tabIndex,
|
|
364
|
-
children:
|
|
365
|
-
showSpinner:
|
|
366
|
-
shouldRenderSpinner:
|
|
367
|
-
setShouldRenderSpinner:
|
|
371
|
+
children: fe({
|
|
372
|
+
showSpinner: o,
|
|
373
|
+
shouldRenderSpinner: y,
|
|
374
|
+
setShouldRenderSpinner: P,
|
|
368
375
|
children: e.children,
|
|
369
|
-
loadingText:
|
|
376
|
+
loadingText: l,
|
|
370
377
|
small: e.small,
|
|
371
|
-
|
|
372
|
-
textContentStyle: _buttoncssmistica.textContent,
|
|
378
|
+
TextContentRenderer: e.TextContentRenderer,
|
|
373
379
|
StartIcon: e.StartIcon,
|
|
374
|
-
EndIcon: e.EndIcon
|
|
380
|
+
EndIcon: e.EndIcon,
|
|
381
|
+
withChevron: C
|
|
375
382
|
}),
|
|
376
|
-
disabled: e.disabled ||
|
|
383
|
+
disabled: e.disabled || o || m,
|
|
377
384
|
role: e.role
|
|
378
385
|
};
|
|
379
386
|
if (process.env.NODE_ENV !== "production" && (e.to === "" || e.href === "")) throw Error("to or href props are empty strings");
|
|
380
387
|
if (e.fake) return /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, _object_spread_props(_object_spread({
|
|
381
388
|
maybe: !0
|
|
382
|
-
},
|
|
389
|
+
}, T), {
|
|
383
390
|
role: "presentation",
|
|
384
391
|
"aria-hidden": "true"
|
|
385
392
|
}));
|
|
386
393
|
if (e.submit) return /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, _object_spread({
|
|
387
394
|
type: "submit",
|
|
388
|
-
formId:
|
|
395
|
+
formId: f,
|
|
389
396
|
onPress: ()=>{}
|
|
390
|
-
},
|
|
391
|
-
if (e.onPress) return /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, _object_spread_props(_object_spread({},
|
|
392
|
-
onPress: (
|
|
393
|
-
const
|
|
394
|
-
|
|
397
|
+
}, T));
|
|
398
|
+
if (e.onPress) return /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, _object_spread_props(_object_spread({}, T), {
|
|
399
|
+
onPress: (b)=>{
|
|
400
|
+
const h = e.onPress(b);
|
|
401
|
+
h && (u(!0), h.finally(()=>u(!1)));
|
|
395
402
|
}
|
|
396
403
|
}));
|
|
397
|
-
if (e.to || e.to === "") return /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, _object_spread_props(_object_spread({},
|
|
404
|
+
if (e.to || e.to === "") return /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, _object_spread_props(_object_spread({}, T), {
|
|
398
405
|
to: e.to,
|
|
399
406
|
newTab: e.newTab,
|
|
400
407
|
fullPageOnWebView: e.fullPageOnWebView,
|
|
401
408
|
onNavigate: e.onNavigate
|
|
402
409
|
}));
|
|
403
|
-
if (e.href || e.href === "") return /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, _object_spread_props(_object_spread({},
|
|
410
|
+
if (e.href || e.href === "") return /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, _object_spread_props(_object_spread({}, T), {
|
|
404
411
|
href: e.href,
|
|
405
412
|
newTab: e.newTab,
|
|
406
413
|
loadOnTop: e.loadOnTop,
|
|
@@ -408,155 +415,99 @@ const k = (param)=>{
|
|
|
408
415
|
}));
|
|
409
416
|
if (process.env.NODE_ENV !== "production") throw Error("Bad button props");
|
|
410
417
|
return null;
|
|
411
|
-
}),
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
[_buttoncssmistica.isLoading]: r
|
|
441
|
-
}),
|
|
442
|
-
/**
|
|
443
|
-
* Setting bleed classes with style to override the margin:0 set by the Touchable component.
|
|
444
|
-
* If we set it using className, it may not work depending on the order in which the styles are applied.
|
|
445
|
-
*/ style: _object_spread({}, t.bleedLeft ? {
|
|
446
|
-
marginLeft: -_buttoncssmistica.PADDING_X_LINK
|
|
447
|
-
} : void 0, t.bleedRight ? {
|
|
448
|
-
marginRight: -_buttoncssmistica.PADDING_X_LINK
|
|
449
|
-
} : void 0, t.bleedY ? {
|
|
450
|
-
marginTop: -_buttoncssmistica.PADDING_Y_LINK,
|
|
451
|
-
marginBottom: -_buttoncssmistica.PADDING_Y_LINK
|
|
452
|
-
} : void 0),
|
|
453
|
-
trackingEvent: (_t_trackingEvent = t.trackingEvent) !== null && _t_trackingEvent !== void 0 ? _t_trackingEvent : t.trackEvent ? _() : void 0,
|
|
454
|
-
dataAttributes: t.dataAttributes,
|
|
455
|
-
"aria-label": t["aria-label"],
|
|
456
|
-
"aria-controls": t["aria-controls"],
|
|
457
|
-
"aria-expanded": t["aria-expanded"],
|
|
458
|
-
"aria-haspopup": t["aria-haspopup"],
|
|
459
|
-
children: X({
|
|
460
|
-
showSpinner: r,
|
|
461
|
-
shouldRenderSpinner: L,
|
|
462
|
-
setShouldRenderSpinner: N,
|
|
463
|
-
children: t.children,
|
|
464
|
-
loadingText: d,
|
|
465
|
-
small: !0,
|
|
466
|
-
renderText: b,
|
|
467
|
-
textContentStyle: _buttoncssmistica.textContentLink,
|
|
468
|
-
StartIcon: t.StartIcon,
|
|
469
|
-
EndIcon: t.EndIcon,
|
|
470
|
-
withChevron: v
|
|
471
|
-
}),
|
|
472
|
-
disabled: t.disabled || r || m,
|
|
473
|
-
role: t.role
|
|
474
|
-
};
|
|
475
|
-
if (process.env.NODE_ENV !== "production" && (t.to === "" || t.href === "")) throw Error("to or href props are empty strings");
|
|
476
|
-
if (t.onPress) return /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, _object_spread_props(_object_spread({
|
|
477
|
-
ref: i
|
|
478
|
-
}, y), {
|
|
479
|
-
onPress: (x)=>{
|
|
480
|
-
const B = t.onPress(x);
|
|
481
|
-
B && (o(!0), B.finally(()=>o(!1)));
|
|
482
|
-
}
|
|
483
|
-
}));
|
|
484
|
-
if (t.to || t.to === "") return /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, _object_spread_props(_object_spread({
|
|
485
|
-
ref: i
|
|
486
|
-
}, y), {
|
|
487
|
-
to: t.to,
|
|
488
|
-
newTab: t.newTab,
|
|
489
|
-
fullPageOnWebView: t.fullPageOnWebView,
|
|
490
|
-
onNavigate: t.onNavigate
|
|
491
|
-
}));
|
|
492
|
-
if (t.href || t.href === "") return /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, _object_spread_props(_object_spread({
|
|
493
|
-
ref: i
|
|
494
|
-
}, y), {
|
|
495
|
-
href: t.href,
|
|
496
|
-
newTab: t.newTab,
|
|
497
|
-
onNavigate: t.onNavigate
|
|
498
|
-
}));
|
|
499
|
-
if (process.env.NODE_ENV !== "production") throw Error("Bad button props");
|
|
500
|
-
return null;
|
|
501
|
-
}), Re = /*#__PURE__*/ _react.forwardRef((_param, i)=>{
|
|
502
|
-
var { dataAttributes: e } = _param, t = _object_without_properties(_param, [
|
|
503
|
-
"dataAttributes"
|
|
418
|
+
}), I = (e, i)=>{
|
|
419
|
+
const { textPresets: n } = (0, _hooks.useTheme)();
|
|
420
|
+
return i ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text, {
|
|
421
|
+
size: 14,
|
|
422
|
+
lineHeight: 20,
|
|
423
|
+
weight: n.button.weight,
|
|
424
|
+
truncate: 1,
|
|
425
|
+
color: "inherit",
|
|
426
|
+
as: "div",
|
|
427
|
+
children: e
|
|
428
|
+
}) : /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text3, {
|
|
429
|
+
weight: n.button.weight,
|
|
430
|
+
truncate: 1,
|
|
431
|
+
color: "inherit",
|
|
432
|
+
as: "div",
|
|
433
|
+
children: e
|
|
434
|
+
});
|
|
435
|
+
}, O = (e, i)=>{
|
|
436
|
+
const { textPresets: n } = (0, _hooks.useTheme)();
|
|
437
|
+
return /* @__PURE__ */ (0, _jsxruntime.jsx)(i ? _text.Text2 : _text.Text3, {
|
|
438
|
+
weight: n.button.weight,
|
|
439
|
+
truncate: 1,
|
|
440
|
+
color: "inherit",
|
|
441
|
+
children: e
|
|
442
|
+
});
|
|
443
|
+
}, Pe = /*#__PURE__*/ _react.forwardRef((_param, r)=>{
|
|
444
|
+
var { dataAttributes: e, small: i } = _param, n = _object_without_properties(_param, [
|
|
445
|
+
"dataAttributes",
|
|
446
|
+
"small"
|
|
504
447
|
]);
|
|
505
|
-
return /* @__PURE__ */ (0, _jsxruntime.jsx)(
|
|
448
|
+
return /* @__PURE__ */ (0, _jsxruntime.jsx)(x, _object_spread_props(_object_spread({
|
|
506
449
|
dataAttributes: _object_spread({
|
|
507
450
|
"component-name": "ButtonLink"
|
|
508
451
|
}, e)
|
|
509
|
-
},
|
|
510
|
-
|
|
511
|
-
|
|
452
|
+
}, n), {
|
|
453
|
+
small: !0,
|
|
454
|
+
ref: r,
|
|
455
|
+
buttonType: "link",
|
|
456
|
+
TextContentRenderer: O
|
|
512
457
|
}));
|
|
513
|
-
}),
|
|
514
|
-
var { dataAttributes: e } = _param,
|
|
515
|
-
"dataAttributes"
|
|
458
|
+
}), Ne = /*#__PURE__*/ _react.forwardRef((_param, r)=>{
|
|
459
|
+
var { dataAttributes: e, small: i } = _param, n = _object_without_properties(_param, [
|
|
460
|
+
"dataAttributes",
|
|
461
|
+
"small"
|
|
516
462
|
]);
|
|
517
|
-
return /* @__PURE__ */ (0, _jsxruntime.jsx)(
|
|
463
|
+
return /* @__PURE__ */ (0, _jsxruntime.jsx)(x, _object_spread_props(_object_spread({
|
|
518
464
|
dataAttributes: _object_spread({
|
|
519
465
|
"component-name": "ButtonLinkDanger"
|
|
520
466
|
}, e)
|
|
521
|
-
},
|
|
467
|
+
}, n), {
|
|
522
468
|
withChevron: !1,
|
|
523
|
-
|
|
524
|
-
|
|
469
|
+
small: !0,
|
|
470
|
+
ref: r,
|
|
471
|
+
buttonType: "linkDanger",
|
|
472
|
+
TextContentRenderer: O
|
|
525
473
|
}));
|
|
526
|
-
}),
|
|
527
|
-
var { dataAttributes: e } = _param,
|
|
474
|
+
}), Se = /*#__PURE__*/ _react.forwardRef((_param, n)=>{
|
|
475
|
+
var { dataAttributes: e } = _param, i = _object_without_properties(_param, [
|
|
528
476
|
"dataAttributes"
|
|
529
477
|
]);
|
|
530
|
-
return /* @__PURE__ */ (0, _jsxruntime.jsx)(
|
|
478
|
+
return /* @__PURE__ */ (0, _jsxruntime.jsx)(x, _object_spread_props(_object_spread({
|
|
531
479
|
dataAttributes: _object_spread({
|
|
532
480
|
"component-name": "ButtonPrimary"
|
|
533
481
|
}, e)
|
|
534
|
-
},
|
|
535
|
-
ref:
|
|
536
|
-
|
|
482
|
+
}, i), {
|
|
483
|
+
ref: n,
|
|
484
|
+
buttonType: "primary",
|
|
485
|
+
TextContentRenderer: I
|
|
537
486
|
}));
|
|
538
|
-
}),
|
|
539
|
-
var { dataAttributes: e } = _param,
|
|
487
|
+
}), Ve = /*#__PURE__*/ _react.forwardRef((_param, n)=>{
|
|
488
|
+
var { dataAttributes: e } = _param, i = _object_without_properties(_param, [
|
|
540
489
|
"dataAttributes"
|
|
541
490
|
]);
|
|
542
|
-
return /* @__PURE__ */ (0, _jsxruntime.jsx)(
|
|
491
|
+
return /* @__PURE__ */ (0, _jsxruntime.jsx)(x, _object_spread_props(_object_spread({
|
|
543
492
|
dataAttributes: _object_spread({
|
|
544
493
|
"component-name": "ButtonSecondary"
|
|
545
494
|
}, e)
|
|
546
|
-
},
|
|
547
|
-
ref:
|
|
548
|
-
|
|
495
|
+
}, i), {
|
|
496
|
+
ref: n,
|
|
497
|
+
buttonType: "secondary",
|
|
498
|
+
TextContentRenderer: I
|
|
549
499
|
}));
|
|
550
|
-
}),
|
|
551
|
-
var { dataAttributes: e } = _param,
|
|
500
|
+
}), ze = /*#__PURE__*/ _react.forwardRef((_param, n)=>{
|
|
501
|
+
var { dataAttributes: e } = _param, i = _object_without_properties(_param, [
|
|
552
502
|
"dataAttributes"
|
|
553
503
|
]);
|
|
554
|
-
return /* @__PURE__ */ (0, _jsxruntime.jsx)(
|
|
504
|
+
return /* @__PURE__ */ (0, _jsxruntime.jsx)(x, _object_spread_props(_object_spread({
|
|
555
505
|
dataAttributes: _object_spread({
|
|
556
506
|
"component-name": "ButtonDanger"
|
|
557
507
|
}, e)
|
|
558
|
-
},
|
|
559
|
-
ref:
|
|
560
|
-
|
|
508
|
+
}, i), {
|
|
509
|
+
ref: n,
|
|
510
|
+
buttonType: "danger",
|
|
511
|
+
TextContentRenderer: I
|
|
561
512
|
}));
|
|
562
513
|
});
|