@telefonica/mistica 14.16.1 → 14.17.1
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 +19 -16
- package/dist/button.css.d.ts +1 -0
- package/dist/button.d.ts +6 -1
- package/dist/button.js +161 -115
- package/dist/card.js +41 -41
- package/dist/list.css-mistica.js +20 -11
- package/dist/list.css.d.ts +3 -0
- package/dist/list.d.ts +1 -0
- package/dist/list.js +121 -108
- package/dist/package-version.js +1 -1
- package/dist/skins/blau.js +11 -10
- package/dist/skins/defaults.js +1 -0
- package/dist/skins/movistar-legacy.js +11 -10
- package/dist/skins/movistar.js +11 -10
- package/dist/skins/o2.js +11 -10
- package/dist/skins/telefonica.js +11 -10
- package/dist/skins/types/index.d.ts +1 -0
- package/dist/skins/vivo-new.js +11 -10
- package/dist/skins/vivo.js +11 -10
- package/dist/spinner.css-mistica.js +4 -4
- package/dist/tabs.js +13 -13
- package/dist-es/button.css-mistica.js +3 -3
- package/dist-es/button.js +201 -155
- package/dist-es/card.js +66 -66
- package/dist-es/list.css-mistica.js +2 -2
- package/dist-es/list.js +159 -146
- package/dist-es/package-version.js +1 -1
- package/dist-es/skins/blau.js +11 -10
- package/dist-es/skins/defaults.js +1 -0
- package/dist-es/skins/movistar-legacy.js +11 -10
- package/dist-es/skins/movistar.js +11 -10
- package/dist-es/skins/o2.js +11 -10
- package/dist-es/skins/telefonica.js +11 -10
- package/dist-es/skins/vivo-new.js +11 -10
- package/dist-es/skins/vivo.js +11 -10
- package/dist-es/spinner.css-mistica.js +2 -2
- package/dist-es/style.css +1 -1
- package/dist-es/tabs.js +18 -18
- package/package.json +1 -1
package/dist/button.js
CHANGED
|
@@ -13,7 +13,7 @@ _export(exports, {
|
|
|
13
13
|
return _e;
|
|
14
14
|
},
|
|
15
15
|
ButtonLink: function() {
|
|
16
|
-
return
|
|
16
|
+
return Ce;
|
|
17
17
|
},
|
|
18
18
|
ButtonPrimary: function() {
|
|
19
19
|
return we;
|
|
@@ -161,102 +161,142 @@ function _object_without_properties_loose(source, excluded) {
|
|
|
161
161
|
return target;
|
|
162
162
|
}
|
|
163
163
|
const w = (param)=>{
|
|
164
|
-
let { content: e , defaultIconSize:
|
|
165
|
-
const
|
|
166
|
-
let
|
|
167
|
-
const
|
|
168
|
-
|
|
169
|
-
children: n(
|
|
170
|
-
},
|
|
164
|
+
let { content: e , defaultIconSize: i , renderText: n } = param;
|
|
165
|
+
const c = (0, _utils.flattenChildren)(e), f = c.length, d = [];
|
|
166
|
+
let l = [];
|
|
167
|
+
const g = ()=>{
|
|
168
|
+
d.push(/* @__PURE__ */ (0, _jsxruntime.jsx)(_react.Fragment, {
|
|
169
|
+
children: n(l)
|
|
170
|
+
}, d.length)), l = [];
|
|
171
171
|
};
|
|
172
|
-
return
|
|
173
|
-
const
|
|
174
|
-
if (/*#__PURE__*/ _react.isValidElement(
|
|
175
|
-
|
|
176
|
-
var
|
|
177
|
-
const
|
|
178
|
-
|
|
172
|
+
return c.forEach((u, m)=>{
|
|
173
|
+
const a = m === 0, s = m === f - 1;
|
|
174
|
+
if (/*#__PURE__*/ _react.isValidElement(u)) {
|
|
175
|
+
l.length && g();
|
|
176
|
+
var _u_props_size;
|
|
177
|
+
const v = (_u_props_size = u.props.size) !== null && _u_props_size !== void 0 ? _u_props_size : i;
|
|
178
|
+
d.push(/* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
179
179
|
style: {
|
|
180
180
|
display: "flex",
|
|
181
181
|
alignItems: "center",
|
|
182
|
-
marginLeft:
|
|
183
|
-
marginRight:
|
|
182
|
+
marginLeft: a ? 0 : _buttoncssmistica.ICON_MARGIN_PX,
|
|
183
|
+
marginRight: s ? 0 : _buttoncssmistica.ICON_MARGIN_PX
|
|
184
184
|
},
|
|
185
|
-
children: /*#__PURE__*/ _react.cloneElement(
|
|
186
|
-
size: (0, _css.pxToRem)(
|
|
185
|
+
children: /*#__PURE__*/ _react.cloneElement(u, {
|
|
186
|
+
size: (0, _css.pxToRem)(v)
|
|
187
187
|
})
|
|
188
|
-
},
|
|
189
|
-
} else
|
|
190
|
-
}),
|
|
191
|
-
},
|
|
192
|
-
|
|
193
|
-
|
|
188
|
+
}, d.length));
|
|
189
|
+
} else l.push(u), s && g();
|
|
190
|
+
}), d;
|
|
191
|
+
}, le = ()=>/* @__PURE__ */ (0, _jsxruntime.jsx)("svg", {
|
|
192
|
+
width: "8",
|
|
193
|
+
height: "20",
|
|
194
|
+
viewBox: "0 0 8 20",
|
|
195
|
+
children: /* @__PURE__ */ (0, _jsxruntime.jsx)("path", {
|
|
196
|
+
d: "M6.32595 11.0107L3.03801 7.7086L3.03292 7.70375L3.032 7.70291L3.02931 7.70047L3.02848 7.69974L3.02248 7.69436C2.88533 7.57121 2.71386 7.53733 2.56343 7.55395C2.41648 7.57018 2.27272 7.63567 2.16886 7.73711C2.06893 7.83185 2.01209 7.97816 2.00175 8.11707C1.99083 8.26377 2.02925 8.43959 2.16869 8.57393L5.24446 11.5515L2.15859 14.512L2.15375 14.5171L2.1529 14.518L2.15046 14.5207L2.14974 14.5215L2.14435 14.5275C2.02121 14.6647 1.98733 14.8361 2.00394 14.9866C2.02017 15.1335 2.08567 15.2773 2.18711 15.3811C2.28184 15.4811 2.42816 15.5379 2.56706 15.5483C2.71377 15.5592 2.88958 15.5208 3.02392 15.3813L6.32595 12.0922C6.6246 11.7936 6.6246 11.3094 6.32595 11.0107Z",
|
|
197
|
+
fill: "currentColor"
|
|
198
|
+
})
|
|
199
|
+
}), V = (param)=>{
|
|
200
|
+
let { showSpinner: e , children: i , small: n , loadingText: c , shouldRenderSpinner: f , setShouldRenderSpinner: d , renderText: l , textContentStyle: g , StartIcon: u , EndIcon: m , withChevron: a } = param;
|
|
201
|
+
const s = n ? _buttoncssmistica.SMALL_ICON_SIZE : _buttoncssmistica.ICON_SIZE, r = (0, _css.pxToRem)(n ? _buttoncssmistica.SMALL_SPINNER_SIZE : _buttoncssmistica.SPINNER_SIZE);
|
|
194
202
|
return /* @__PURE__ */ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
|
|
195
203
|
children: [
|
|
196
|
-
/* @__PURE__ */ (0, _jsxruntime.
|
|
204
|
+
/* @__PURE__ */ (0, _jsxruntime.jsxs)("div", {
|
|
197
205
|
"aria-hidden": e ? !0 : void 0,
|
|
198
|
-
className:
|
|
199
|
-
children:
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
206
|
+
className: g,
|
|
207
|
+
children: [
|
|
208
|
+
u && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
209
|
+
style: {
|
|
210
|
+
display: "flex",
|
|
211
|
+
alignItems: "center",
|
|
212
|
+
marginRight: _buttoncssmistica.ICON_MARGIN_PX
|
|
213
|
+
},
|
|
214
|
+
children: /* @__PURE__ */ (0, _jsxruntime.jsx)(u, {
|
|
215
|
+
size: s,
|
|
216
|
+
color: "currentColor"
|
|
217
|
+
})
|
|
218
|
+
}),
|
|
219
|
+
w({
|
|
220
|
+
content: i,
|
|
221
|
+
defaultIconSize: s,
|
|
222
|
+
renderText: l
|
|
223
|
+
}),
|
|
224
|
+
m && !a && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
225
|
+
style: {
|
|
226
|
+
display: "flex",
|
|
227
|
+
alignItems: "center",
|
|
228
|
+
marginLeft: _buttoncssmistica.ICON_MARGIN_PX
|
|
229
|
+
},
|
|
230
|
+
children: /* @__PURE__ */ (0, _jsxruntime.jsx)(m, {
|
|
231
|
+
size: s,
|
|
232
|
+
color: "currentColor"
|
|
233
|
+
})
|
|
234
|
+
}),
|
|
235
|
+
a && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
236
|
+
style: {
|
|
237
|
+
display: "flex",
|
|
238
|
+
alignItems: "center",
|
|
239
|
+
marginLeft: _buttoncssmistica.CHEVRON_MARGIN_LEFT_LINK
|
|
240
|
+
},
|
|
241
|
+
children: /* @__PURE__ */ (0, _jsxruntime.jsx)(le, {})
|
|
242
|
+
})
|
|
243
|
+
]
|
|
204
244
|
}),
|
|
205
245
|
/* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
206
246
|
className: _buttoncssmistica.loadingFiller,
|
|
207
247
|
"aria-hidden": !0,
|
|
208
|
-
style:
|
|
209
|
-
paddingLeft:
|
|
248
|
+
style: c ? {
|
|
249
|
+
paddingLeft: r,
|
|
210
250
|
paddingRight: _buttoncssmistica.ICON_MARGIN_PX + 2 * (n ? _buttoncssmistica.X_SMALL_PADDING_PX : _buttoncssmistica.X_PADDING_PX)
|
|
211
251
|
} : void 0,
|
|
212
252
|
children: w({
|
|
213
|
-
content:
|
|
214
|
-
defaultIconSize:
|
|
215
|
-
renderText:
|
|
253
|
+
content: c,
|
|
254
|
+
defaultIconSize: s,
|
|
255
|
+
renderText: l
|
|
216
256
|
})
|
|
217
257
|
}),
|
|
218
258
|
/* @__PURE__ */ (0, _jsxruntime.jsxs)("div", {
|
|
219
259
|
"aria-hidden": e ? void 0 : !0,
|
|
220
260
|
className: _buttoncssmistica.loadingContent,
|
|
221
261
|
onTransitionEnd: ()=>{
|
|
222
|
-
e !==
|
|
262
|
+
e !== f && d(e);
|
|
223
263
|
},
|
|
224
264
|
children: [
|
|
225
|
-
|
|
226
|
-
rolePresentation: !!
|
|
265
|
+
f ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_spinner.default, {
|
|
266
|
+
rolePresentation: !!c,
|
|
227
267
|
color: "currentcolor",
|
|
228
268
|
delay: "0s",
|
|
229
|
-
size:
|
|
269
|
+
size: r
|
|
230
270
|
}) : /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
231
271
|
style: {
|
|
232
272
|
display: "inline-block",
|
|
233
|
-
width:
|
|
234
|
-
height:
|
|
273
|
+
width: r,
|
|
274
|
+
height: r
|
|
235
275
|
}
|
|
236
276
|
}),
|
|
237
|
-
|
|
277
|
+
c ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
|
|
238
278
|
paddingLeft: 8,
|
|
239
279
|
children: w({
|
|
240
|
-
content:
|
|
241
|
-
defaultIconSize:
|
|
242
|
-
renderText:
|
|
280
|
+
content: c,
|
|
281
|
+
defaultIconSize: s,
|
|
282
|
+
renderText: l
|
|
243
283
|
})
|
|
244
284
|
}) : null
|
|
245
285
|
]
|
|
246
286
|
})
|
|
247
287
|
]
|
|
248
288
|
});
|
|
249
|
-
},
|
|
250
|
-
const { textPresets: n } = (0, _hooks.useTheme)(), { eventFormat:
|
|
289
|
+
}, N = /*#__PURE__*/ _react.forwardRef((e, i)=>{
|
|
290
|
+
const { textPresets: n } = (0, _hooks.useTheme)(), { eventFormat: c } = (0, _analytics.useTrackingConfig)(), { formStatus: f , formId: d } = (0, _formcontext.useForm)(), l = (0, _themevariantcontext.useIsInverseVariant)(), { loadingText: g } = e, u = !!e.submit, m = f === "sending", [a, s] = _react.useState(!1), r = e.showSpinner || m && u || a, [v, L] = _react.useState(!!r);
|
|
251
291
|
_react.useEffect(()=>{
|
|
252
|
-
|
|
292
|
+
r && !v && L(!0);
|
|
253
293
|
}, [
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
294
|
+
r,
|
|
295
|
+
v,
|
|
296
|
+
f
|
|
257
297
|
]);
|
|
258
298
|
var _e_trackingEvent;
|
|
259
|
-
const
|
|
299
|
+
const S = ()=>c === "google-analytics-4" ? {
|
|
260
300
|
name: _analytics.eventNames.userInteraction,
|
|
261
301
|
component_type: `${e.type}_button`,
|
|
262
302
|
component_copy: (0, _common.getTextFromChildren)(e.children)
|
|
@@ -264,87 +304,90 @@ const w = (param)=>{
|
|
|
264
304
|
category: _analytics.eventCategories.userInteraction,
|
|
265
305
|
action: `${e.type}_button_tapped`,
|
|
266
306
|
label: (0, _common.getTextFromChildren)(e.children)
|
|
267
|
-
}, E = (
|
|
307
|
+
}, E = (I)=>e.small ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text, {
|
|
268
308
|
size: 14,
|
|
269
309
|
lineHeight: 20,
|
|
270
310
|
weight: n.button.weight,
|
|
271
311
|
truncate: 1,
|
|
272
312
|
color: "inherit",
|
|
273
313
|
as: "div",
|
|
274
|
-
children:
|
|
314
|
+
children: I
|
|
275
315
|
}) : /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text3, {
|
|
276
316
|
weight: n.button.weight,
|
|
277
317
|
truncate: 1,
|
|
278
318
|
color: "inherit",
|
|
279
319
|
as: "div",
|
|
280
|
-
children:
|
|
281
|
-
}),
|
|
282
|
-
ref:
|
|
283
|
-
className: (0, _classnames.default)(
|
|
320
|
+
children: I
|
|
321
|
+
}), h = {
|
|
322
|
+
ref: i,
|
|
323
|
+
className: (0, _classnames.default)(l ? _buttoncssmistica.inverseVariants[e.type] : _buttoncssmistica.variants[e.type], e.className, {
|
|
284
324
|
[_buttoncssmistica.small]: e.small,
|
|
285
|
-
[_buttoncssmistica.isLoading]:
|
|
325
|
+
[_buttoncssmistica.isLoading]: r
|
|
286
326
|
}),
|
|
287
327
|
style: _object_spread({
|
|
288
328
|
cursor: e.fake ? "pointer" : void 0
|
|
289
329
|
}, e.style),
|
|
290
|
-
trackingEvent: (_e_trackingEvent = e.trackingEvent) !== null && _e_trackingEvent !== void 0 ? _e_trackingEvent : e.trackEvent ?
|
|
330
|
+
trackingEvent: (_e_trackingEvent = e.trackingEvent) !== null && _e_trackingEvent !== void 0 ? _e_trackingEvent : e.trackEvent ? S() : void 0,
|
|
291
331
|
dataAttributes: e.dataAttributes,
|
|
292
332
|
"aria-controls": e["aria-controls"],
|
|
293
333
|
"aria-expanded": e["aria-expanded"],
|
|
294
334
|
tabIndex: e.tabIndex,
|
|
295
335
|
children: V({
|
|
296
|
-
showSpinner:
|
|
297
|
-
shouldRenderSpinner:
|
|
298
|
-
setShouldRenderSpinner:
|
|
336
|
+
showSpinner: r,
|
|
337
|
+
shouldRenderSpinner: v,
|
|
338
|
+
setShouldRenderSpinner: L,
|
|
299
339
|
children: e.children,
|
|
300
|
-
loadingText:
|
|
340
|
+
loadingText: g,
|
|
301
341
|
small: e.small,
|
|
302
342
|
renderText: E,
|
|
303
|
-
textContentStyle: _buttoncssmistica.textContent
|
|
343
|
+
textContentStyle: _buttoncssmistica.textContent,
|
|
344
|
+
StartIcon: e.StartIcon,
|
|
345
|
+
EndIcon: e.EndIcon
|
|
304
346
|
}),
|
|
305
|
-
disabled: e.disabled ||
|
|
347
|
+
disabled: e.disabled || r || m,
|
|
306
348
|
role: "button"
|
|
307
349
|
};
|
|
308
350
|
if (process.env.NODE_ENV !== "production" && (e.to === "" || e.href === "")) throw Error("to or href props are empty strings");
|
|
309
351
|
if (e.fake) return /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, _object_spread_props(_object_spread({
|
|
310
352
|
maybe: !0
|
|
311
|
-
},
|
|
353
|
+
}, h), {
|
|
312
354
|
role: "presentation",
|
|
313
355
|
"aria-hidden": "true"
|
|
314
356
|
}));
|
|
315
357
|
if (e.submit) return /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, _object_spread({
|
|
316
358
|
type: "submit",
|
|
317
|
-
formId:
|
|
359
|
+
formId: d,
|
|
318
360
|
onPress: ()=>{}
|
|
319
|
-
},
|
|
320
|
-
if (e.onPress) return /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, _object_spread_props(_object_spread({},
|
|
321
|
-
onPress: (
|
|
322
|
-
const
|
|
323
|
-
|
|
361
|
+
}, h));
|
|
362
|
+
if (e.onPress) return /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, _object_spread_props(_object_spread({}, h), {
|
|
363
|
+
onPress: (I)=>{
|
|
364
|
+
const _ = e.onPress(I);
|
|
365
|
+
_ && (s(!0), _.finally(()=>s(!1)));
|
|
324
366
|
}
|
|
325
367
|
}));
|
|
326
|
-
if (e.to || e.to === "") return /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, _object_spread_props(_object_spread({},
|
|
368
|
+
if (e.to || e.to === "") return /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, _object_spread_props(_object_spread({}, h), {
|
|
327
369
|
to: e.to,
|
|
328
370
|
fullPageOnWebView: e.fullPageOnWebView
|
|
329
371
|
}));
|
|
330
|
-
if (e.href || e.href === "") return /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, _object_spread_props(_object_spread({},
|
|
372
|
+
if (e.href || e.href === "") return /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, _object_spread_props(_object_spread({}, h), {
|
|
331
373
|
href: e.href,
|
|
332
374
|
newTab: e.newTab,
|
|
333
375
|
loadOnTop: e.loadOnTop
|
|
334
376
|
}));
|
|
335
377
|
if (process.env.NODE_ENV !== "production") throw Error("Bad button props");
|
|
336
378
|
return null;
|
|
337
|
-
}),
|
|
338
|
-
|
|
379
|
+
}), Ce = /*#__PURE__*/ _react.forwardRef((e, i)=>{
|
|
380
|
+
var _e_withChevron;
|
|
381
|
+
const { formStatus: n } = (0, _formcontext.useForm)(), c = (0, _themevariantcontext.useIsInverseVariant)(), { analytics: f , textPresets: d } = (0, _hooks.useTheme)(), { loadingText: l } = e, g = n === "sending", [u, m] = _react.useState(!1), a = e.showSpinner || u, s = (_e_withChevron = e.withChevron) !== null && _e_withChevron !== void 0 ? _e_withChevron : !!e.href || !!e.to, [r, v] = _react.useState(!!a);
|
|
339
382
|
_react.useEffect(()=>{
|
|
340
|
-
|
|
383
|
+
a && !r && v(!0);
|
|
341
384
|
}, [
|
|
342
|
-
|
|
343
|
-
|
|
385
|
+
a,
|
|
386
|
+
r,
|
|
344
387
|
n
|
|
345
388
|
]);
|
|
346
389
|
var _e_trackingEvent;
|
|
347
|
-
const
|
|
390
|
+
const L = ()=>f.eventFormat === "google-analytics-4" ? {
|
|
348
391
|
name: _analytics.eventNames.userInteraction,
|
|
349
392
|
component_type: "link",
|
|
350
393
|
component_copy: (0, _common.getTextFromChildren)(e.children)
|
|
@@ -352,89 +395,92 @@ const w = (param)=>{
|
|
|
352
395
|
category: _analytics.eventCategories.userInteraction,
|
|
353
396
|
action: _analytics.eventActions.linkTapped,
|
|
354
397
|
label: (0, _common.getTextFromChildren)(e.children)
|
|
355
|
-
},
|
|
356
|
-
weight:
|
|
398
|
+
}, S = (h)=>/* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text2, {
|
|
399
|
+
weight: d.button.weight,
|
|
357
400
|
truncate: 1,
|
|
358
401
|
color: "inherit",
|
|
359
|
-
children:
|
|
360
|
-
}),
|
|
402
|
+
children: h
|
|
403
|
+
}), E = {
|
|
361
404
|
className: (0, _classnames.default)(_buttoncssmistica.link, {
|
|
362
|
-
[_buttoncssmistica.inverseLink]:
|
|
405
|
+
[_buttoncssmistica.inverseLink]: c,
|
|
363
406
|
[_buttoncssmistica.alignedLink]: e.aligned,
|
|
364
|
-
[_buttoncssmistica.isLoading]:
|
|
407
|
+
[_buttoncssmistica.isLoading]: a
|
|
365
408
|
}),
|
|
366
|
-
trackingEvent: (_e_trackingEvent = e.trackingEvent) !== null && _e_trackingEvent !== void 0 ? _e_trackingEvent : e.trackEvent ?
|
|
409
|
+
trackingEvent: (_e_trackingEvent = e.trackingEvent) !== null && _e_trackingEvent !== void 0 ? _e_trackingEvent : e.trackEvent ? L() : void 0,
|
|
367
410
|
dataAttributes: _object_spread({
|
|
368
411
|
"component-name": "ButtonLink"
|
|
369
412
|
}, e.dataAttributes),
|
|
370
413
|
children: V({
|
|
371
|
-
showSpinner:
|
|
372
|
-
shouldRenderSpinner:
|
|
373
|
-
setShouldRenderSpinner:
|
|
414
|
+
showSpinner: a,
|
|
415
|
+
shouldRenderSpinner: r,
|
|
416
|
+
setShouldRenderSpinner: v,
|
|
374
417
|
children: e.children,
|
|
375
|
-
loadingText:
|
|
418
|
+
loadingText: l,
|
|
376
419
|
small: !0,
|
|
377
|
-
renderText:
|
|
378
|
-
textContentStyle: _buttoncssmistica.textContentLink
|
|
420
|
+
renderText: S,
|
|
421
|
+
textContentStyle: _buttoncssmistica.textContentLink,
|
|
422
|
+
StartIcon: e.StartIcon,
|
|
423
|
+
EndIcon: e.EndIcon,
|
|
424
|
+
withChevron: s
|
|
379
425
|
}),
|
|
380
|
-
disabled: e.disabled ||
|
|
426
|
+
disabled: e.disabled || a || g
|
|
381
427
|
};
|
|
382
428
|
if (process.env.NODE_ENV !== "production" && (e.to === "" || e.href === "")) throw Error("to or href props are empty strings");
|
|
383
429
|
if (e.onPress) return /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, _object_spread_props(_object_spread({
|
|
384
|
-
ref:
|
|
385
|
-
},
|
|
386
|
-
onPress: (
|
|
387
|
-
const
|
|
388
|
-
|
|
430
|
+
ref: i
|
|
431
|
+
}, E), {
|
|
432
|
+
onPress: (h)=>{
|
|
433
|
+
const I = e.onPress(h);
|
|
434
|
+
I && (m(!0), I.finally(()=>m(!1)));
|
|
389
435
|
}
|
|
390
436
|
}));
|
|
391
437
|
if (e.to || e.to === "") return /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, _object_spread_props(_object_spread({
|
|
392
|
-
ref:
|
|
393
|
-
},
|
|
438
|
+
ref: i
|
|
439
|
+
}, E), {
|
|
394
440
|
to: e.to,
|
|
395
441
|
fullPageOnWebView: e.fullPageOnWebView
|
|
396
442
|
}));
|
|
397
443
|
if (e.href || e.href === "") return /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, _object_spread_props(_object_spread({
|
|
398
|
-
ref:
|
|
399
|
-
},
|
|
444
|
+
ref: i
|
|
445
|
+
}, E), {
|
|
400
446
|
href: e.href,
|
|
401
447
|
newTab: e.newTab
|
|
402
448
|
}));
|
|
403
449
|
if (process.env.NODE_ENV !== "production") throw Error("Bad button props");
|
|
404
450
|
return null;
|
|
405
451
|
}), we = /*#__PURE__*/ _react.forwardRef((_param, n)=>/* @__PURE__ */ {
|
|
406
|
-
var { dataAttributes: e } = _param,
|
|
452
|
+
var { dataAttributes: e } = _param, i = _object_without_properties(_param, [
|
|
407
453
|
"dataAttributes"
|
|
408
454
|
]);
|
|
409
|
-
return (0, _jsxruntime.jsx)(
|
|
455
|
+
return (0, _jsxruntime.jsx)(N, _object_spread_props(_object_spread({
|
|
410
456
|
dataAttributes: _object_spread({
|
|
411
457
|
"component-name": "ButtonPrimary"
|
|
412
458
|
}, e)
|
|
413
|
-
},
|
|
459
|
+
}, i), {
|
|
414
460
|
ref: n,
|
|
415
461
|
type: "primary"
|
|
416
462
|
}));
|
|
417
463
|
}), Ne = /*#__PURE__*/ _react.forwardRef((_param, n)=>/* @__PURE__ */ {
|
|
418
|
-
var { dataAttributes: e } = _param,
|
|
464
|
+
var { dataAttributes: e } = _param, i = _object_without_properties(_param, [
|
|
419
465
|
"dataAttributes"
|
|
420
466
|
]);
|
|
421
|
-
return (0, _jsxruntime.jsx)(
|
|
467
|
+
return (0, _jsxruntime.jsx)(N, _object_spread_props(_object_spread({
|
|
422
468
|
dataAttributes: _object_spread({
|
|
423
469
|
"component-name": "ButtonSecondary"
|
|
424
470
|
}, e)
|
|
425
|
-
},
|
|
471
|
+
}, i), {
|
|
426
472
|
ref: n,
|
|
427
473
|
type: "secondary"
|
|
428
474
|
}));
|
|
429
475
|
}), _e = /*#__PURE__*/ _react.forwardRef((_param, n)=>/* @__PURE__ */ {
|
|
430
|
-
var { dataAttributes: e } = _param,
|
|
476
|
+
var { dataAttributes: e } = _param, i = _object_without_properties(_param, [
|
|
431
477
|
"dataAttributes"
|
|
432
478
|
]);
|
|
433
|
-
return (0, _jsxruntime.jsx)(
|
|
479
|
+
return (0, _jsxruntime.jsx)(N, _object_spread_props(_object_spread({
|
|
434
480
|
dataAttributes: _object_spread({
|
|
435
481
|
"component-name": "ButtonDanger"
|
|
436
482
|
}, e)
|
|
437
|
-
},
|
|
483
|
+
}, i), {
|
|
438
484
|
ref: n,
|
|
439
485
|
type: "danger"
|
|
440
486
|
}));
|