@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-es/button.js
CHANGED
|
@@ -77,298 +77,344 @@ function _object_without_properties_loose(source, excluded) {
|
|
|
77
77
|
}
|
|
78
78
|
return target;
|
|
79
79
|
}
|
|
80
|
-
import { jsx as t, jsxs as
|
|
81
|
-
import * as
|
|
82
|
-
import
|
|
80
|
+
import { jsx as t, jsxs as C, Fragment as F } from "react/jsx-runtime";
|
|
81
|
+
import * as o from "react";
|
|
82
|
+
import x from "classnames";
|
|
83
83
|
import z from "./spinner.js";
|
|
84
|
-
import { BaseTouchable as
|
|
85
|
-
import { useIsInverseVariant as
|
|
86
|
-
import { useForm as
|
|
87
|
-
import { pxToRem as
|
|
88
|
-
import { Text as
|
|
89
|
-
import
|
|
90
|
-
import { getTextFromChildren as
|
|
91
|
-
import { useTrackingConfig as
|
|
92
|
-
import { useTheme as
|
|
93
|
-
import { flattenChildren as
|
|
94
|
-
import { inverseVariants as
|
|
84
|
+
import { BaseTouchable as y } from "./touchable.js";
|
|
85
|
+
import { useIsInverseVariant as R } from "./theme-variant-context.js";
|
|
86
|
+
import { useForm as k } from "./form-context.js";
|
|
87
|
+
import { pxToRem as T } from "./utils/css.js";
|
|
88
|
+
import { Text as M, Text3 as X, Text2 as Z } from "./text.js";
|
|
89
|
+
import G from "./box.js";
|
|
90
|
+
import { getTextFromChildren as P } from "./utils/common.js";
|
|
91
|
+
import { useTrackingConfig as W, eventNames as A, eventCategories as B, eventActions as j } from "./utils/analytics.js";
|
|
92
|
+
import { useTheme as O } from "./hooks.js";
|
|
93
|
+
import { flattenChildren as H } from "./skins/utils.js";
|
|
94
|
+
import { inverseVariants as $, variants as K, small as q, isLoading as D, textContent as J, link as Q, inverseLink as U, alignedLink as Y, textContentLink as p, SMALL_SPINNER_SIZE as ee, SPINNER_SIZE as te, ICON_MARGIN_PX as b, CHEVRON_MARGIN_LEFT_LINK as ne, loadingFiller as re, X_SMALL_PADDING_PX as ie, X_PADDING_PX as oe, loadingContent as ae, SMALL_ICON_SIZE as se, ICON_SIZE as ce } from "./button.css-mistica.js";
|
|
95
95
|
const w = (param)=>{
|
|
96
|
-
let { content: e , defaultIconSize:
|
|
97
|
-
const
|
|
98
|
-
let
|
|
99
|
-
const
|
|
100
|
-
|
|
101
|
-
children: n(
|
|
102
|
-
},
|
|
96
|
+
let { content: e , defaultIconSize: i , renderText: n } = param;
|
|
97
|
+
const c = H(e), f = c.length, d = [];
|
|
98
|
+
let l = [];
|
|
99
|
+
const g = ()=>{
|
|
100
|
+
d.push(/* @__PURE__ */ t(o.Fragment, {
|
|
101
|
+
children: n(l)
|
|
102
|
+
}, d.length)), l = [];
|
|
103
103
|
};
|
|
104
|
-
return
|
|
105
|
-
const
|
|
106
|
-
if (/*#__PURE__*/
|
|
107
|
-
|
|
108
|
-
var
|
|
109
|
-
const
|
|
110
|
-
|
|
104
|
+
return c.forEach((u, m)=>{
|
|
105
|
+
const a = m === 0, s = m === f - 1;
|
|
106
|
+
if (/*#__PURE__*/ o.isValidElement(u)) {
|
|
107
|
+
l.length && g();
|
|
108
|
+
var _u_props_size;
|
|
109
|
+
const v = (_u_props_size = u.props.size) !== null && _u_props_size !== void 0 ? _u_props_size : i;
|
|
110
|
+
d.push(/* @__PURE__ */ t("div", {
|
|
111
111
|
style: {
|
|
112
112
|
display: "flex",
|
|
113
113
|
alignItems: "center",
|
|
114
|
-
marginLeft:
|
|
115
|
-
marginRight:
|
|
114
|
+
marginLeft: a ? 0 : b,
|
|
115
|
+
marginRight: s ? 0 : b
|
|
116
116
|
},
|
|
117
|
-
children: /*#__PURE__*/
|
|
118
|
-
size:
|
|
117
|
+
children: /*#__PURE__*/ o.cloneElement(u, {
|
|
118
|
+
size: T(v)
|
|
119
119
|
})
|
|
120
|
-
},
|
|
121
|
-
} else
|
|
122
|
-
}),
|
|
123
|
-
},
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
120
|
+
}, d.length));
|
|
121
|
+
} else l.push(u), s && g();
|
|
122
|
+
}), d;
|
|
123
|
+
}, le = ()=>/* @__PURE__ */ t("svg", {
|
|
124
|
+
width: "8",
|
|
125
|
+
height: "20",
|
|
126
|
+
viewBox: "0 0 8 20",
|
|
127
|
+
children: /* @__PURE__ */ t("path", {
|
|
128
|
+
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",
|
|
129
|
+
fill: "currentColor"
|
|
130
|
+
})
|
|
131
|
+
}), V = (param)=>{
|
|
132
|
+
let { showSpinner: e , children: i , small: n , loadingText: c , shouldRenderSpinner: f , setShouldRenderSpinner: d , renderText: l , textContentStyle: g , StartIcon: u , EndIcon: m , withChevron: a } = param;
|
|
133
|
+
const s = n ? se : ce, r = T(n ? ee : te);
|
|
134
|
+
return /* @__PURE__ */ C(F, {
|
|
127
135
|
children: [
|
|
128
|
-
/* @__PURE__ */
|
|
136
|
+
/* @__PURE__ */ C("div", {
|
|
129
137
|
"aria-hidden": e ? !0 : void 0,
|
|
130
|
-
className:
|
|
131
|
-
children:
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
138
|
+
className: g,
|
|
139
|
+
children: [
|
|
140
|
+
u && /* @__PURE__ */ t("div", {
|
|
141
|
+
style: {
|
|
142
|
+
display: "flex",
|
|
143
|
+
alignItems: "center",
|
|
144
|
+
marginRight: b
|
|
145
|
+
},
|
|
146
|
+
children: /* @__PURE__ */ t(u, {
|
|
147
|
+
size: s,
|
|
148
|
+
color: "currentColor"
|
|
149
|
+
})
|
|
150
|
+
}),
|
|
151
|
+
w({
|
|
152
|
+
content: i,
|
|
153
|
+
defaultIconSize: s,
|
|
154
|
+
renderText: l
|
|
155
|
+
}),
|
|
156
|
+
m && !a && /* @__PURE__ */ t("div", {
|
|
157
|
+
style: {
|
|
158
|
+
display: "flex",
|
|
159
|
+
alignItems: "center",
|
|
160
|
+
marginLeft: b
|
|
161
|
+
},
|
|
162
|
+
children: /* @__PURE__ */ t(m, {
|
|
163
|
+
size: s,
|
|
164
|
+
color: "currentColor"
|
|
165
|
+
})
|
|
166
|
+
}),
|
|
167
|
+
a && /* @__PURE__ */ t("div", {
|
|
168
|
+
style: {
|
|
169
|
+
display: "flex",
|
|
170
|
+
alignItems: "center",
|
|
171
|
+
marginLeft: ne
|
|
172
|
+
},
|
|
173
|
+
children: /* @__PURE__ */ t(le, {})
|
|
174
|
+
})
|
|
175
|
+
]
|
|
136
176
|
}),
|
|
137
177
|
/* @__PURE__ */ t("div", {
|
|
138
|
-
className:
|
|
178
|
+
className: re,
|
|
139
179
|
"aria-hidden": !0,
|
|
140
|
-
style:
|
|
141
|
-
paddingLeft:
|
|
142
|
-
paddingRight:
|
|
180
|
+
style: c ? {
|
|
181
|
+
paddingLeft: r,
|
|
182
|
+
paddingRight: b + 2 * (n ? ie : oe)
|
|
143
183
|
} : void 0,
|
|
144
184
|
children: w({
|
|
145
|
-
content:
|
|
146
|
-
defaultIconSize:
|
|
147
|
-
renderText:
|
|
185
|
+
content: c,
|
|
186
|
+
defaultIconSize: s,
|
|
187
|
+
renderText: l
|
|
148
188
|
})
|
|
149
189
|
}),
|
|
150
|
-
/* @__PURE__ */
|
|
190
|
+
/* @__PURE__ */ C("div", {
|
|
151
191
|
"aria-hidden": e ? void 0 : !0,
|
|
152
|
-
className:
|
|
192
|
+
className: ae,
|
|
153
193
|
onTransitionEnd: ()=>{
|
|
154
|
-
e !==
|
|
194
|
+
e !== f && d(e);
|
|
155
195
|
},
|
|
156
196
|
children: [
|
|
157
|
-
|
|
158
|
-
rolePresentation: !!
|
|
197
|
+
f ? /* @__PURE__ */ t(z, {
|
|
198
|
+
rolePresentation: !!c,
|
|
159
199
|
color: "currentcolor",
|
|
160
200
|
delay: "0s",
|
|
161
|
-
size:
|
|
201
|
+
size: r
|
|
162
202
|
}) : /* @__PURE__ */ t("div", {
|
|
163
203
|
style: {
|
|
164
204
|
display: "inline-block",
|
|
165
|
-
width:
|
|
166
|
-
height:
|
|
205
|
+
width: r,
|
|
206
|
+
height: r
|
|
167
207
|
}
|
|
168
208
|
}),
|
|
169
|
-
|
|
209
|
+
c ? /* @__PURE__ */ t(G, {
|
|
170
210
|
paddingLeft: 8,
|
|
171
211
|
children: w({
|
|
172
|
-
content:
|
|
173
|
-
defaultIconSize:
|
|
174
|
-
renderText:
|
|
212
|
+
content: c,
|
|
213
|
+
defaultIconSize: s,
|
|
214
|
+
renderText: l
|
|
175
215
|
})
|
|
176
216
|
}) : null
|
|
177
217
|
]
|
|
178
218
|
})
|
|
179
219
|
]
|
|
180
220
|
});
|
|
181
|
-
},
|
|
182
|
-
const { textPresets: n } =
|
|
183
|
-
|
|
184
|
-
|
|
221
|
+
}, N = /*#__PURE__*/ o.forwardRef((e, i)=>{
|
|
222
|
+
const { textPresets: n } = O(), { eventFormat: c } = W(), { formStatus: f , formId: d } = k(), l = R(), { loadingText: g } = e, u = !!e.submit, m = f === "sending", [a, s] = o.useState(!1), r = e.showSpinner || m && u || a, [v, L] = o.useState(!!r);
|
|
223
|
+
o.useEffect(()=>{
|
|
224
|
+
r && !v && L(!0);
|
|
185
225
|
}, [
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
226
|
+
r,
|
|
227
|
+
v,
|
|
228
|
+
f
|
|
189
229
|
]);
|
|
190
230
|
var _e_trackingEvent;
|
|
191
|
-
const
|
|
192
|
-
name:
|
|
231
|
+
const S = ()=>c === "google-analytics-4" ? {
|
|
232
|
+
name: A.userInteraction,
|
|
193
233
|
component_type: `${e.type}_button`,
|
|
194
|
-
component_copy:
|
|
234
|
+
component_copy: P(e.children)
|
|
195
235
|
} : {
|
|
196
|
-
category:
|
|
236
|
+
category: B.userInteraction,
|
|
197
237
|
action: `${e.type}_button_tapped`,
|
|
198
|
-
label:
|
|
199
|
-
}, E = (
|
|
238
|
+
label: P(e.children)
|
|
239
|
+
}, E = (I)=>e.small ? /* @__PURE__ */ t(M, {
|
|
200
240
|
size: 14,
|
|
201
241
|
lineHeight: 20,
|
|
202
242
|
weight: n.button.weight,
|
|
203
243
|
truncate: 1,
|
|
204
244
|
color: "inherit",
|
|
205
245
|
as: "div",
|
|
206
|
-
children:
|
|
207
|
-
}) : /* @__PURE__ */ t(
|
|
246
|
+
children: I
|
|
247
|
+
}) : /* @__PURE__ */ t(X, {
|
|
208
248
|
weight: n.button.weight,
|
|
209
249
|
truncate: 1,
|
|
210
250
|
color: "inherit",
|
|
211
251
|
as: "div",
|
|
212
|
-
children:
|
|
213
|
-
}),
|
|
214
|
-
ref:
|
|
215
|
-
className:
|
|
216
|
-
[
|
|
217
|
-
[D]:
|
|
252
|
+
children: I
|
|
253
|
+
}), h = {
|
|
254
|
+
ref: i,
|
|
255
|
+
className: x(l ? $[e.type] : K[e.type], e.className, {
|
|
256
|
+
[q]: e.small,
|
|
257
|
+
[D]: r
|
|
218
258
|
}),
|
|
219
259
|
style: _object_spread({
|
|
220
260
|
cursor: e.fake ? "pointer" : void 0
|
|
221
261
|
}, e.style),
|
|
222
|
-
trackingEvent: (_e_trackingEvent = e.trackingEvent) !== null && _e_trackingEvent !== void 0 ? _e_trackingEvent : e.trackEvent ?
|
|
262
|
+
trackingEvent: (_e_trackingEvent = e.trackingEvent) !== null && _e_trackingEvent !== void 0 ? _e_trackingEvent : e.trackEvent ? S() : void 0,
|
|
223
263
|
dataAttributes: e.dataAttributes,
|
|
224
264
|
"aria-controls": e["aria-controls"],
|
|
225
265
|
"aria-expanded": e["aria-expanded"],
|
|
226
266
|
tabIndex: e.tabIndex,
|
|
227
267
|
children: V({
|
|
228
|
-
showSpinner:
|
|
229
|
-
shouldRenderSpinner:
|
|
230
|
-
setShouldRenderSpinner:
|
|
268
|
+
showSpinner: r,
|
|
269
|
+
shouldRenderSpinner: v,
|
|
270
|
+
setShouldRenderSpinner: L,
|
|
231
271
|
children: e.children,
|
|
232
|
-
loadingText:
|
|
272
|
+
loadingText: g,
|
|
233
273
|
small: e.small,
|
|
234
274
|
renderText: E,
|
|
235
|
-
textContentStyle:
|
|
275
|
+
textContentStyle: J,
|
|
276
|
+
StartIcon: e.StartIcon,
|
|
277
|
+
EndIcon: e.EndIcon
|
|
236
278
|
}),
|
|
237
|
-
disabled: e.disabled ||
|
|
279
|
+
disabled: e.disabled || r || m,
|
|
238
280
|
role: "button"
|
|
239
281
|
};
|
|
240
282
|
if (process.env.NODE_ENV !== "production" && (e.to === "" || e.href === "")) throw Error("to or href props are empty strings");
|
|
241
|
-
if (e.fake) return /* @__PURE__ */ t(
|
|
283
|
+
if (e.fake) return /* @__PURE__ */ t(y, _object_spread_props(_object_spread({
|
|
242
284
|
maybe: !0
|
|
243
|
-
},
|
|
285
|
+
}, h), {
|
|
244
286
|
role: "presentation",
|
|
245
287
|
"aria-hidden": "true"
|
|
246
288
|
}));
|
|
247
|
-
if (e.submit) return /* @__PURE__ */ t(
|
|
289
|
+
if (e.submit) return /* @__PURE__ */ t(y, _object_spread({
|
|
248
290
|
type: "submit",
|
|
249
|
-
formId:
|
|
291
|
+
formId: d,
|
|
250
292
|
onPress: ()=>{}
|
|
251
|
-
},
|
|
252
|
-
if (e.onPress) return /* @__PURE__ */ t(
|
|
253
|
-
onPress: (
|
|
254
|
-
const
|
|
255
|
-
|
|
293
|
+
}, h));
|
|
294
|
+
if (e.onPress) return /* @__PURE__ */ t(y, _object_spread_props(_object_spread({}, h), {
|
|
295
|
+
onPress: (I)=>{
|
|
296
|
+
const _ = e.onPress(I);
|
|
297
|
+
_ && (s(!0), _.finally(()=>s(!1)));
|
|
256
298
|
}
|
|
257
299
|
}));
|
|
258
|
-
if (e.to || e.to === "") return /* @__PURE__ */ t(
|
|
300
|
+
if (e.to || e.to === "") return /* @__PURE__ */ t(y, _object_spread_props(_object_spread({}, h), {
|
|
259
301
|
to: e.to,
|
|
260
302
|
fullPageOnWebView: e.fullPageOnWebView
|
|
261
303
|
}));
|
|
262
|
-
if (e.href || e.href === "") return /* @__PURE__ */ t(
|
|
304
|
+
if (e.href || e.href === "") return /* @__PURE__ */ t(y, _object_spread_props(_object_spread({}, h), {
|
|
263
305
|
href: e.href,
|
|
264
306
|
newTab: e.newTab,
|
|
265
307
|
loadOnTop: e.loadOnTop
|
|
266
308
|
}));
|
|
267
309
|
if (process.env.NODE_ENV !== "production") throw Error("Bad button props");
|
|
268
310
|
return null;
|
|
269
|
-
}),
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
311
|
+
}), Ce = /*#__PURE__*/ o.forwardRef((e, i)=>{
|
|
312
|
+
var _e_withChevron;
|
|
313
|
+
const { formStatus: n } = k(), c = R(), { analytics: f , textPresets: d } = O(), { loadingText: l } = e, g = n === "sending", [u, m] = o.useState(!1), a = e.showSpinner || u, s = (_e_withChevron = e.withChevron) !== null && _e_withChevron !== void 0 ? _e_withChevron : !!e.href || !!e.to, [r, v] = o.useState(!!a);
|
|
314
|
+
o.useEffect(()=>{
|
|
315
|
+
a && !r && v(!0);
|
|
273
316
|
}, [
|
|
274
|
-
|
|
275
|
-
|
|
317
|
+
a,
|
|
318
|
+
r,
|
|
276
319
|
n
|
|
277
320
|
]);
|
|
278
321
|
var _e_trackingEvent;
|
|
279
|
-
const
|
|
280
|
-
name:
|
|
322
|
+
const L = ()=>f.eventFormat === "google-analytics-4" ? {
|
|
323
|
+
name: A.userInteraction,
|
|
281
324
|
component_type: "link",
|
|
282
|
-
component_copy:
|
|
325
|
+
component_copy: P(e.children)
|
|
283
326
|
} : {
|
|
284
|
-
category:
|
|
327
|
+
category: B.userInteraction,
|
|
285
328
|
action: j.linkTapped,
|
|
286
|
-
label:
|
|
287
|
-
},
|
|
288
|
-
weight:
|
|
329
|
+
label: P(e.children)
|
|
330
|
+
}, S = (h)=>/* @__PURE__ */ t(Z, {
|
|
331
|
+
weight: d.button.weight,
|
|
289
332
|
truncate: 1,
|
|
290
333
|
color: "inherit",
|
|
291
|
-
children:
|
|
292
|
-
}),
|
|
293
|
-
className:
|
|
294
|
-
[U]:
|
|
334
|
+
children: h
|
|
335
|
+
}), E = {
|
|
336
|
+
className: x(Q, {
|
|
337
|
+
[U]: c,
|
|
295
338
|
[Y]: e.aligned,
|
|
296
|
-
[D]:
|
|
339
|
+
[D]: a
|
|
297
340
|
}),
|
|
298
|
-
trackingEvent: (_e_trackingEvent = e.trackingEvent) !== null && _e_trackingEvent !== void 0 ? _e_trackingEvent : e.trackEvent ?
|
|
341
|
+
trackingEvent: (_e_trackingEvent = e.trackingEvent) !== null && _e_trackingEvent !== void 0 ? _e_trackingEvent : e.trackEvent ? L() : void 0,
|
|
299
342
|
dataAttributes: _object_spread({
|
|
300
343
|
"component-name": "ButtonLink"
|
|
301
344
|
}, e.dataAttributes),
|
|
302
345
|
children: V({
|
|
303
|
-
showSpinner:
|
|
304
|
-
shouldRenderSpinner:
|
|
305
|
-
setShouldRenderSpinner:
|
|
346
|
+
showSpinner: a,
|
|
347
|
+
shouldRenderSpinner: r,
|
|
348
|
+
setShouldRenderSpinner: v,
|
|
306
349
|
children: e.children,
|
|
307
|
-
loadingText:
|
|
350
|
+
loadingText: l,
|
|
308
351
|
small: !0,
|
|
309
|
-
renderText:
|
|
310
|
-
textContentStyle: p
|
|
352
|
+
renderText: S,
|
|
353
|
+
textContentStyle: p,
|
|
354
|
+
StartIcon: e.StartIcon,
|
|
355
|
+
EndIcon: e.EndIcon,
|
|
356
|
+
withChevron: s
|
|
311
357
|
}),
|
|
312
|
-
disabled: e.disabled ||
|
|
358
|
+
disabled: e.disabled || a || g
|
|
313
359
|
};
|
|
314
360
|
if (process.env.NODE_ENV !== "production" && (e.to === "" || e.href === "")) throw Error("to or href props are empty strings");
|
|
315
|
-
if (e.onPress) return /* @__PURE__ */ t(
|
|
316
|
-
ref:
|
|
317
|
-
},
|
|
318
|
-
onPress: (
|
|
319
|
-
const
|
|
320
|
-
|
|
361
|
+
if (e.onPress) return /* @__PURE__ */ t(y, _object_spread_props(_object_spread({
|
|
362
|
+
ref: i
|
|
363
|
+
}, E), {
|
|
364
|
+
onPress: (h)=>{
|
|
365
|
+
const I = e.onPress(h);
|
|
366
|
+
I && (m(!0), I.finally(()=>m(!1)));
|
|
321
367
|
}
|
|
322
368
|
}));
|
|
323
|
-
if (e.to || e.to === "") return /* @__PURE__ */ t(
|
|
324
|
-
ref:
|
|
325
|
-
},
|
|
369
|
+
if (e.to || e.to === "") return /* @__PURE__ */ t(y, _object_spread_props(_object_spread({
|
|
370
|
+
ref: i
|
|
371
|
+
}, E), {
|
|
326
372
|
to: e.to,
|
|
327
373
|
fullPageOnWebView: e.fullPageOnWebView
|
|
328
374
|
}));
|
|
329
|
-
if (e.href || e.href === "") return /* @__PURE__ */ t(
|
|
330
|
-
ref:
|
|
331
|
-
},
|
|
375
|
+
if (e.href || e.href === "") return /* @__PURE__ */ t(y, _object_spread_props(_object_spread({
|
|
376
|
+
ref: i
|
|
377
|
+
}, E), {
|
|
332
378
|
href: e.href,
|
|
333
379
|
newTab: e.newTab
|
|
334
380
|
}));
|
|
335
381
|
if (process.env.NODE_ENV !== "production") throw Error("Bad button props");
|
|
336
382
|
return null;
|
|
337
|
-
}), we = /*#__PURE__*/
|
|
338
|
-
var { dataAttributes: e } = _param,
|
|
383
|
+
}), we = /*#__PURE__*/ o.forwardRef((_param, n)=>/* @__PURE__ */ {
|
|
384
|
+
var { dataAttributes: e } = _param, i = _object_without_properties(_param, [
|
|
339
385
|
"dataAttributes"
|
|
340
386
|
]);
|
|
341
|
-
return t(
|
|
387
|
+
return t(N, _object_spread_props(_object_spread({
|
|
342
388
|
dataAttributes: _object_spread({
|
|
343
389
|
"component-name": "ButtonPrimary"
|
|
344
390
|
}, e)
|
|
345
|
-
},
|
|
391
|
+
}, i), {
|
|
346
392
|
ref: n,
|
|
347
393
|
type: "primary"
|
|
348
394
|
}));
|
|
349
|
-
}), Ne = /*#__PURE__*/
|
|
350
|
-
var { dataAttributes: e } = _param,
|
|
395
|
+
}), Ne = /*#__PURE__*/ o.forwardRef((_param, n)=>/* @__PURE__ */ {
|
|
396
|
+
var { dataAttributes: e } = _param, i = _object_without_properties(_param, [
|
|
351
397
|
"dataAttributes"
|
|
352
398
|
]);
|
|
353
|
-
return t(
|
|
399
|
+
return t(N, _object_spread_props(_object_spread({
|
|
354
400
|
dataAttributes: _object_spread({
|
|
355
401
|
"component-name": "ButtonSecondary"
|
|
356
402
|
}, e)
|
|
357
|
-
},
|
|
403
|
+
}, i), {
|
|
358
404
|
ref: n,
|
|
359
405
|
type: "secondary"
|
|
360
406
|
}));
|
|
361
|
-
}), _e = /*#__PURE__*/
|
|
362
|
-
var { dataAttributes: e } = _param,
|
|
407
|
+
}), _e = /*#__PURE__*/ o.forwardRef((_param, n)=>/* @__PURE__ */ {
|
|
408
|
+
var { dataAttributes: e } = _param, i = _object_without_properties(_param, [
|
|
363
409
|
"dataAttributes"
|
|
364
410
|
]);
|
|
365
|
-
return t(
|
|
411
|
+
return t(N, _object_spread_props(_object_spread({
|
|
366
412
|
dataAttributes: _object_spread({
|
|
367
413
|
"component-name": "ButtonDanger"
|
|
368
414
|
}, e)
|
|
369
|
-
},
|
|
415
|
+
}, i), {
|
|
370
416
|
ref: n,
|
|
371
417
|
type: "danger"
|
|
372
418
|
}));
|
|
373
419
|
});
|
|
374
|
-
export { _e as ButtonDanger,
|
|
420
|
+
export { _e as ButtonDanger, Ce as ButtonLink, we as ButtonPrimary, Ne as ButtonSecondary };
|