@telefonica/mistica 15.0.0 → 15.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/css/mistica.css +1 -1
- package/dist/accordion.css-mistica.js +5 -5
- package/dist/accordion.d.ts +1 -0
- package/dist/avatar.css-mistica.js +3 -3
- package/dist/badge.css-mistica.js +6 -6
- package/dist/boxed.css-mistica.js +3 -3
- package/dist/button-group.css-mistica.js +1 -1
- package/dist/button-layout.css-mistica.js +9 -9
- package/dist/button.css-mistica.js +27 -27
- package/dist/button.d.ts +12 -0
- package/dist/button.js +67 -62
- package/dist/callout.css-mistica.js +2 -2
- package/dist/callout.d.ts +1 -0
- package/dist/callout.js +11 -11
- package/dist/card.css-mistica.js +13 -13
- package/dist/card.d.ts +6 -0
- package/dist/card.js +301 -293
- package/dist/carousel.css-mistica.js +19 -19
- package/dist/checkbox.css-mistica.js +9 -9
- package/dist/chip.css-mistica.js +10 -10
- package/dist/circle.css-mistica.js +2 -2
- package/dist/community/advanced-data-card.css-mistica.js +12 -12
- package/dist/community/blocks.css-mistica.js +1 -1
- package/dist/counter.css-mistica.js +4 -4
- package/dist/credit-card-number-field.css-mistica.js +5 -5
- package/dist/dialog.css-mistica.js +6 -6
- package/dist/double-field.css-mistica.js +2 -2
- package/dist/empty-state-card.css-mistica.js +3 -3
- package/dist/empty-state-card.d.ts +1 -0
- package/dist/empty-state-card.js +10 -9
- package/dist/empty-state.css-mistica.js +4 -4
- package/dist/empty-state.d.ts +1 -0
- package/dist/empty-state.js +14 -14
- package/dist/feedback.css-mistica.js +5 -5
- package/dist/fixed-footer-layout.css-mistica.js +2 -2
- package/dist/header.css-mistica.js +1 -1
- package/dist/header.d.ts +2 -0
- package/dist/header.js +46 -47
- package/dist/hero.css-mistica.js +2 -2
- package/dist/hero.d.ts +1 -0
- package/dist/hero.js +29 -29
- package/dist/highlighted-card.css-mistica.js +7 -7
- package/dist/highlighted-card.d.ts +1 -2
- package/dist/highlighted-card.js +9 -9
- package/dist/horizontal-scroll.css-mistica.js +1 -1
- package/dist/icon-button.css-mistica.js +14 -17
- package/dist/icon-button.css.d.ts +1 -1
- package/dist/icon-button.d.ts +0 -13
- package/dist/icon-button.js +84 -87
- package/dist/image.css-mistica.js +3 -3
- package/dist/index.d.ts +4 -2
- package/dist/index.js +13 -0
- package/dist/inline.js +8 -7
- package/dist/list.css-mistica.js +12 -12
- package/dist/list.d.ts +1 -0
- package/dist/list.js +143 -138
- package/dist/loading-bar.css-mistica.js +4 -4
- package/dist/loading-screen.css-mistica.js +3 -3
- package/dist/logo.d.ts +1 -0
- package/dist/logo.js +155 -136
- package/dist/maybe-dismissable.css-mistica.js +1 -1
- package/dist/maybe-dismissable.js +3 -4
- package/dist/menu.css-mistica.js +1 -1
- package/dist/navigation-bar.css-mistica.js +22 -22
- package/dist/navigation-bar.d.ts +2 -1
- package/dist/navigation-bar.js +53 -52
- package/dist/navigation-breadcrumbs.css-mistica.js +3 -3
- package/dist/package-version.js +1 -1
- package/dist/pin-field.css-mistica.js +4 -4
- package/dist/progress-bar.css-mistica.js +3 -3
- package/dist/radio-button.css-mistica.js +8 -8
- package/dist/responsive-layout.css-mistica.js +5 -5
- package/dist/screen-reader-only.css-mistica.js +1 -1
- package/dist/select.css-mistica.js +10 -10
- package/dist/sheet.css-mistica.js +8 -8
- package/dist/skeletons.css-mistica.js +5 -5
- package/dist/skins/blau.js +4 -2
- package/dist/skins/constants.d.ts +1 -0
- package/dist/skins/constants.js +6 -3
- package/dist/skins/movistar.d.ts +1 -0
- package/dist/skins/movistar.js +5 -2
- package/dist/skins/o2-new.d.ts +50 -0
- package/dist/skins/o2-new.js +397 -0
- package/dist/skins/o2.d.ts +1 -0
- package/dist/skins/o2.js +5 -2
- package/dist/skins/skin-contract.css-mistica.js +138 -136
- package/dist/skins/skin-contract.css.d.ts +2 -0
- package/dist/skins/telefonica.d.ts +1 -0
- package/dist/skins/telefonica.js +5 -2
- package/dist/skins/tu.d.ts +1 -0
- package/dist/skins/tu.js +5 -2
- package/dist/skins/types/colors.d.ts +1 -0
- package/dist/skins/types/index.d.ts +1 -1
- package/dist/skins/utils.js +7 -4
- package/dist/skins/vivo-new.js +4 -2
- package/dist/skins/vivo.js +4 -2
- package/dist/slider.css-mistica.js +7 -7
- package/dist/snackbar.css-mistica.js +12 -12
- package/dist/spinner.css-mistica.js +5 -5
- package/dist/sprinkles.css-mistica.js +792 -786
- package/dist/stacking-group.css-mistica.js +2 -2
- package/dist/stepper.css-mistica.js +9 -9
- package/dist/switch-component.css-mistica.js +26 -23
- package/dist/switch-component.css.d.ts +1 -0
- package/dist/switch-component.js +11 -10
- package/dist/tabs.css-mistica.js +9 -9
- package/dist/tag.css-mistica.js +1 -1
- package/dist/text-field-base.css-mistica.js +5 -5
- package/dist/text-field-components.css-mistica.js +11 -11
- package/dist/text-link.css-mistica.js +3 -3
- package/dist/text-link.d.ts +5 -0
- package/dist/tooltip.css-mistica.js +2 -2
- package/dist/tooltip.js +0 -1
- package/dist/touchable.css-mistica.js +5 -5
- package/dist/touchable.d.ts +33 -19
- package/dist/touchable.js +54 -51
- package/dist/utils/aspect-ratio-support.css-mistica.js +5 -5
- package/dist/utils/browser.d.ts +1 -0
- package/dist/utils/browser.js +14 -0
- package/dist/video.css-mistica.js +1 -1
- package/dist-es/accordion.css-mistica.js +3 -3
- package/dist-es/avatar.css-mistica.js +2 -2
- package/dist-es/badge.css-mistica.js +2 -2
- package/dist-es/boxed.css-mistica.js +2 -2
- package/dist-es/button-group.css-mistica.js +1 -1
- package/dist-es/button-layout.css-mistica.js +6 -6
- package/dist-es/button.css-mistica.js +16 -16
- package/dist-es/button.js +88 -83
- package/dist-es/callout.css-mistica.js +2 -2
- package/dist-es/callout.js +37 -37
- package/dist-es/card.css-mistica.js +2 -2
- package/dist-es/card.js +442 -434
- package/dist-es/carousel.css-mistica.js +2 -2
- package/dist-es/checkbox.css-mistica.js +6 -6
- package/dist-es/chip.css-mistica.js +7 -7
- package/dist-es/circle.css-mistica.js +2 -2
- package/dist-es/community/advanced-data-card.css-mistica.js +3 -3
- package/dist-es/community/blocks.css-mistica.js +1 -1
- package/dist-es/counter.css-mistica.js +2 -2
- package/dist-es/credit-card-number-field.css-mistica.js +4 -4
- package/dist-es/dialog.css-mistica.js +5 -5
- package/dist-es/double-field.css-mistica.js +2 -2
- package/dist-es/empty-state-card.css-mistica.js +2 -2
- package/dist-es/empty-state-card.js +30 -29
- package/dist-es/empty-state.css-mistica.js +3 -3
- package/dist-es/empty-state.js +34 -34
- package/dist-es/feedback.css-mistica.js +2 -2
- package/dist-es/fixed-footer-layout.css-mistica.js +2 -2
- package/dist-es/header.css-mistica.js +1 -1
- package/dist-es/header.js +69 -70
- package/dist-es/hero.css-mistica.js +2 -2
- package/dist-es/hero.js +56 -56
- package/dist-es/highlighted-card.css-mistica.js +5 -5
- package/dist-es/highlighted-card.js +26 -26
- package/dist-es/horizontal-scroll.css-mistica.js +1 -1
- package/dist-es/icon-button.css-mistica.js +9 -12
- package/dist-es/icon-button.js +94 -97
- package/dist-es/image.css-mistica.js +2 -2
- package/dist-es/index.js +1765 -1764
- package/dist-es/inline.js +13 -12
- package/dist-es/list.css-mistica.js +2 -2
- package/dist-es/list.js +184 -179
- package/dist-es/loading-bar.css-mistica.js +2 -2
- package/dist-es/loading-screen.css-mistica.js +2 -2
- package/dist-es/logo.js +172 -156
- package/dist-es/maybe-dismissable.css-mistica.js +1 -1
- package/dist-es/maybe-dismissable.js +7 -8
- package/dist-es/menu.css-mistica.js +1 -1
- package/dist-es/navigation-bar.css-mistica.js +9 -9
- package/dist-es/navigation-bar.js +72 -71
- package/dist-es/navigation-breadcrumbs.css-mistica.js +2 -2
- package/dist-es/package-version.js +1 -1
- package/dist-es/pin-field.css-mistica.js +2 -2
- package/dist-es/progress-bar.css-mistica.js +2 -2
- package/dist-es/radio-button.css-mistica.js +5 -5
- package/dist-es/responsive-layout.css-mistica.js +4 -4
- package/dist-es/screen-reader-only.css-mistica.js +1 -1
- package/dist-es/select.css-mistica.js +9 -9
- package/dist-es/sheet.css-mistica.js +2 -2
- package/dist-es/skeletons.css-mistica.js +2 -2
- package/dist-es/skins/blau.js +4 -2
- package/dist-es/skins/constants.js +2 -2
- package/dist-es/skins/movistar.js +7 -4
- package/dist-es/skins/o2-new.js +380 -0
- package/dist-es/skins/o2.js +5 -2
- package/dist-es/skins/skin-contract.css-mistica.js +138 -136
- package/dist-es/skins/telefonica.js +5 -2
- package/dist-es/skins/tu.js +5 -2
- package/dist-es/skins/utils.js +20 -17
- package/dist-es/skins/vivo-new.js +4 -2
- package/dist-es/skins/vivo.js +4 -2
- package/dist-es/slider.css-mistica.js +2 -2
- package/dist-es/snackbar.css-mistica.js +5 -5
- package/dist-es/spinner.css-mistica.js +2 -2
- package/dist-es/sprinkles.css-mistica.js +792 -786
- package/dist-es/stacking-group.css-mistica.js +2 -2
- package/dist-es/stepper.css-mistica.js +2 -2
- package/dist-es/style.css +1 -1
- package/dist-es/switch-component.css-mistica.js +19 -19
- package/dist-es/switch-component.js +24 -23
- package/dist-es/tabs.css-mistica.js +6 -6
- package/dist-es/tag.css-mistica.js +1 -1
- package/dist-es/text-field-base.css-mistica.js +2 -2
- package/dist-es/text-field-components.css-mistica.js +2 -2
- package/dist-es/text-link.css-mistica.js +3 -3
- package/dist-es/tooltip.css-mistica.js +2 -2
- package/dist-es/tooltip.js +0 -1
- package/dist-es/touchable.css-mistica.js +2 -2
- package/dist-es/touchable.js +68 -65
- package/dist-es/utils/aspect-ratio-support.css-mistica.js +3 -3
- package/dist-es/utils/browser.js +5 -0
- package/dist-es/video.css-mistica.js +1 -1
- package/package.json +2 -2
package/dist-es/button.js
CHANGED
|
@@ -78,48 +78,48 @@ function _object_without_properties_loose(source, excluded) {
|
|
|
78
78
|
}
|
|
79
79
|
return target;
|
|
80
80
|
}
|
|
81
|
-
import { jsx as n, jsxs as
|
|
81
|
+
import { jsx as n, jsxs as P, Fragment as W } from "react/jsx-runtime";
|
|
82
82
|
import * as a from "react";
|
|
83
83
|
import D from "classnames";
|
|
84
84
|
import K from "./spinner.js";
|
|
85
85
|
import { BaseTouchable as g } from "./touchable.js";
|
|
86
86
|
import { useIsInverseVariant as O } from "./theme-variant-context.js";
|
|
87
87
|
import { useForm as V } from "./form-context.js";
|
|
88
|
-
import { pxToRem as
|
|
88
|
+
import { pxToRem as S } from "./utils/css.js";
|
|
89
89
|
import { Text as j, Text3 as H, Text2 as Y } from "./text.js";
|
|
90
90
|
import $ from "./box.js";
|
|
91
|
-
import { getTextFromChildren as
|
|
91
|
+
import { getTextFromChildren as C } from "./utils/common.js";
|
|
92
92
|
import { useTrackingConfig as F, eventNames as z, eventCategories as M, eventActions as q } from "./utils/analytics.js";
|
|
93
93
|
import { useTheme as R } from "./hooks.js";
|
|
94
94
|
import { flattenChildren as J } from "./skins/utils.js";
|
|
95
|
-
import { inverseButtonVariants as Q, buttonVariants as U, small as p, isLoading as G, textContent as ee, inverseLinkVariants as te, linkVariants as ne, PADDING_X_LINK as A, PADDING_Y_LINK as T, textContentLink as
|
|
95
|
+
import { inverseButtonVariants as Q, buttonVariants as U, small as p, isLoading as G, textContent as ee, inverseLinkVariants as te, linkVariants as ne, PADDING_X_LINK as A, PADDING_Y_LINK as T, textContentLink as ie, SMALL_SPINNER_SIZE as re, SPINNER_SIZE as ae, ICON_MARGIN_PX as N, CHEVRON_MARGIN_LEFT_LINK as oe, loadingFiller as le, X_SMALL_PADDING_PX as se, X_PADDING_PX as ce, loadingContent as de, SMALL_ICON_SIZE as ue, ICON_SIZE as me } from "./button.css-mistica.js";
|
|
96
96
|
const x = (param)=>{
|
|
97
|
-
let { content: e, defaultIconSize: t, renderText:
|
|
98
|
-
const
|
|
99
|
-
let
|
|
97
|
+
let { content: e, defaultIconSize: t, renderText: i } = param;
|
|
98
|
+
const l = J(e), u = l.length, c = [];
|
|
99
|
+
let s = [];
|
|
100
100
|
const f = ()=>{
|
|
101
101
|
c.push(/* @__PURE__ */ n(a.Fragment, {
|
|
102
|
-
children:
|
|
103
|
-
}, c.length)),
|
|
102
|
+
children: i(s)
|
|
103
|
+
}, c.length)), s = [];
|
|
104
104
|
};
|
|
105
|
-
return
|
|
105
|
+
return l.forEach((d, m)=>{
|
|
106
106
|
const h = m === 0, o = m === u - 1;
|
|
107
107
|
if (/*#__PURE__*/ a.isValidElement(d)) {
|
|
108
|
-
|
|
108
|
+
s.length && f();
|
|
109
109
|
var _d_props_size;
|
|
110
110
|
const v = (_d_props_size = d.props.size) !== null && _d_props_size !== void 0 ? _d_props_size : t;
|
|
111
111
|
c.push(/* @__PURE__ */ n("div", {
|
|
112
112
|
style: {
|
|
113
113
|
display: "flex",
|
|
114
114
|
alignItems: "center",
|
|
115
|
-
marginLeft: h ? 0 :
|
|
116
|
-
marginRight: o ? 0 :
|
|
115
|
+
marginLeft: h ? 0 : N,
|
|
116
|
+
marginRight: o ? 0 : N
|
|
117
117
|
},
|
|
118
118
|
children: /*#__PURE__*/ a.cloneElement(d, {
|
|
119
|
-
size:
|
|
119
|
+
size: S(v)
|
|
120
120
|
})
|
|
121
121
|
}, c.length));
|
|
122
|
-
} else
|
|
122
|
+
} else s.push(d), o && f();
|
|
123
123
|
}), c;
|
|
124
124
|
}, fe = ()=>/* @__PURE__ */ n("svg", {
|
|
125
125
|
width: "0.5em",
|
|
@@ -130,11 +130,11 @@ const x = (param)=>{
|
|
|
130
130
|
fill: "currentColor"
|
|
131
131
|
})
|
|
132
132
|
}), X = (param)=>{
|
|
133
|
-
let { showSpinner: e, children: t, small:
|
|
134
|
-
const o =
|
|
135
|
-
return /* @__PURE__ */
|
|
133
|
+
let { showSpinner: e, children: t, small: i, loadingText: l, shouldRenderSpinner: u, setShouldRenderSpinner: c, renderText: s, textContentStyle: f, StartIcon: d, EndIcon: m, withChevron: h } = param;
|
|
134
|
+
const o = i ? ue : me, r = S(i ? re : ae);
|
|
135
|
+
return /* @__PURE__ */ P(W, {
|
|
136
136
|
children: [
|
|
137
|
-
/* @__PURE__ */
|
|
137
|
+
/* @__PURE__ */ P("div", {
|
|
138
138
|
"aria-hidden": e ? !0 : void 0,
|
|
139
139
|
className: f,
|
|
140
140
|
children: [
|
|
@@ -142,14 +142,14 @@ const x = (param)=>{
|
|
|
142
142
|
style: {
|
|
143
143
|
display: "flex",
|
|
144
144
|
alignItems: "center",
|
|
145
|
-
marginRight:
|
|
145
|
+
marginRight: N
|
|
146
146
|
},
|
|
147
147
|
children: /* @__PURE__ */ n(d, {
|
|
148
|
-
size:
|
|
148
|
+
size: S(o),
|
|
149
149
|
color: "currentColor"
|
|
150
150
|
})
|
|
151
151
|
}),
|
|
152
|
-
/* @__PURE__ */
|
|
152
|
+
/* @__PURE__ */ P("div", {
|
|
153
153
|
style: {
|
|
154
154
|
display: "flex",
|
|
155
155
|
alignItems: "baseline"
|
|
@@ -158,7 +158,7 @@ const x = (param)=>{
|
|
|
158
158
|
x({
|
|
159
159
|
content: t,
|
|
160
160
|
defaultIconSize: o,
|
|
161
|
-
renderText:
|
|
161
|
+
renderText: s
|
|
162
162
|
}),
|
|
163
163
|
h && /* @__PURE__ */ n("div", {
|
|
164
164
|
style: {
|
|
@@ -174,29 +174,29 @@ const x = (param)=>{
|
|
|
174
174
|
style: {
|
|
175
175
|
display: "flex",
|
|
176
176
|
alignItems: "center",
|
|
177
|
-
marginLeft:
|
|
177
|
+
marginLeft: N
|
|
178
178
|
},
|
|
179
179
|
children: /* @__PURE__ */ n(m, {
|
|
180
|
-
size:
|
|
180
|
+
size: S(o),
|
|
181
181
|
color: "currentColor"
|
|
182
182
|
})
|
|
183
183
|
})
|
|
184
184
|
]
|
|
185
185
|
}),
|
|
186
186
|
/* @__PURE__ */ n("div", {
|
|
187
|
-
className:
|
|
187
|
+
className: le,
|
|
188
188
|
"aria-hidden": !0,
|
|
189
|
-
style:
|
|
190
|
-
paddingLeft:
|
|
191
|
-
paddingRight:
|
|
189
|
+
style: l ? {
|
|
190
|
+
paddingLeft: r,
|
|
191
|
+
paddingRight: N + 2 * (i ? se : ce)
|
|
192
192
|
} : void 0,
|
|
193
193
|
children: x({
|
|
194
|
-
content:
|
|
194
|
+
content: l,
|
|
195
195
|
defaultIconSize: o,
|
|
196
|
-
renderText:
|
|
196
|
+
renderText: s
|
|
197
197
|
})
|
|
198
198
|
}),
|
|
199
|
-
/* @__PURE__ */
|
|
199
|
+
/* @__PURE__ */ P("div", {
|
|
200
200
|
"aria-hidden": e ? void 0 : !0,
|
|
201
201
|
className: de,
|
|
202
202
|
onTransitionEnd: ()=>{
|
|
@@ -204,23 +204,23 @@ const x = (param)=>{
|
|
|
204
204
|
},
|
|
205
205
|
children: [
|
|
206
206
|
u ? /* @__PURE__ */ n(K, {
|
|
207
|
-
rolePresentation: !!
|
|
207
|
+
rolePresentation: !!l,
|
|
208
208
|
color: "currentcolor",
|
|
209
209
|
delay: "0s",
|
|
210
|
-
size:
|
|
210
|
+
size: r
|
|
211
211
|
}) : /* @__PURE__ */ n("div", {
|
|
212
212
|
style: {
|
|
213
213
|
display: "inline-block",
|
|
214
|
-
width:
|
|
215
|
-
height:
|
|
214
|
+
width: r,
|
|
215
|
+
height: r
|
|
216
216
|
}
|
|
217
217
|
}),
|
|
218
|
-
|
|
218
|
+
l ? /* @__PURE__ */ n($, {
|
|
219
219
|
paddingLeft: 8,
|
|
220
220
|
children: x({
|
|
221
|
-
content:
|
|
221
|
+
content: l,
|
|
222
222
|
defaultIconSize: o,
|
|
223
|
-
renderText:
|
|
223
|
+
renderText: s
|
|
224
224
|
})
|
|
225
225
|
}) : null
|
|
226
226
|
]
|
|
@@ -228,47 +228,47 @@ const x = (param)=>{
|
|
|
228
228
|
]
|
|
229
229
|
});
|
|
230
230
|
}, k = /*#__PURE__*/ a.forwardRef((e, t)=>{
|
|
231
|
-
const { textPresets:
|
|
231
|
+
const { textPresets: i } = R(), { eventFormat: l } = F(), { formStatus: u, formId: c } = V(), s = O(), { loadingText: f } = e, d = !!e.submit, m = u === "sending", [h, o] = a.useState(!1), r = e.showSpinner || m && d || h, [v, I] = a.useState(!!r);
|
|
232
232
|
a.useEffect(()=>{
|
|
233
|
-
|
|
233
|
+
r && !v && I(!0);
|
|
234
234
|
}, [
|
|
235
|
-
|
|
235
|
+
r,
|
|
236
236
|
v,
|
|
237
237
|
u
|
|
238
238
|
]);
|
|
239
239
|
var _e_trackingEvent;
|
|
240
|
-
const
|
|
240
|
+
const E = ()=>l === "google-analytics-4" ? {
|
|
241
241
|
name: z.userInteraction,
|
|
242
242
|
component_type: `${e.type}_button`,
|
|
243
|
-
component_copy:
|
|
243
|
+
component_copy: C(e.children)
|
|
244
244
|
} : {
|
|
245
245
|
category: M.userInteraction,
|
|
246
246
|
action: `${e.type}_button_tapped`,
|
|
247
|
-
label:
|
|
247
|
+
label: C(e.children)
|
|
248
248
|
}, w = (y)=>e.small ? /* @__PURE__ */ n(j, {
|
|
249
249
|
size: 14,
|
|
250
250
|
lineHeight: 20,
|
|
251
|
-
weight:
|
|
251
|
+
weight: i.button.weight,
|
|
252
252
|
truncate: 1,
|
|
253
253
|
color: "inherit",
|
|
254
254
|
as: "div",
|
|
255
255
|
children: y
|
|
256
256
|
}) : /* @__PURE__ */ n(H, {
|
|
257
|
-
weight:
|
|
257
|
+
weight: i.button.weight,
|
|
258
258
|
truncate: 1,
|
|
259
259
|
color: "inherit",
|
|
260
260
|
as: "div",
|
|
261
261
|
children: y
|
|
262
262
|
}), b = {
|
|
263
263
|
ref: t,
|
|
264
|
-
className: D(
|
|
264
|
+
className: D(s ? Q[e.type] : U[e.type], e.className, {
|
|
265
265
|
[p]: e.small,
|
|
266
|
-
[G]:
|
|
266
|
+
[G]: r
|
|
267
267
|
}),
|
|
268
268
|
style: _object_spread({
|
|
269
269
|
cursor: e.fake ? "pointer" : void 0
|
|
270
270
|
}, e.style),
|
|
271
|
-
trackingEvent: (_e_trackingEvent = e.trackingEvent) !== null && _e_trackingEvent !== void 0 ? _e_trackingEvent : e.trackEvent ?
|
|
271
|
+
trackingEvent: (_e_trackingEvent = e.trackingEvent) !== null && _e_trackingEvent !== void 0 ? _e_trackingEvent : e.trackEvent ? E() : void 0,
|
|
272
272
|
dataAttributes: e.dataAttributes,
|
|
273
273
|
"aria-label": e["aria-label"],
|
|
274
274
|
"aria-controls": e["aria-controls"],
|
|
@@ -276,7 +276,7 @@ const x = (param)=>{
|
|
|
276
276
|
"aria-haspopup": e["aria-haspopup"],
|
|
277
277
|
tabIndex: e.tabIndex,
|
|
278
278
|
children: X({
|
|
279
|
-
showSpinner:
|
|
279
|
+
showSpinner: r,
|
|
280
280
|
shouldRenderSpinner: v,
|
|
281
281
|
setShouldRenderSpinner: I,
|
|
282
282
|
children: e.children,
|
|
@@ -287,8 +287,8 @@ const x = (param)=>{
|
|
|
287
287
|
StartIcon: e.StartIcon,
|
|
288
288
|
EndIcon: e.EndIcon
|
|
289
289
|
}),
|
|
290
|
-
disabled: e.disabled ||
|
|
291
|
-
role:
|
|
290
|
+
disabled: e.disabled || r || m,
|
|
291
|
+
role: e.role
|
|
292
292
|
};
|
|
293
293
|
if (process.env.NODE_ENV !== "production" && (e.to === "" || e.href === "")) throw Error("to or href props are empty strings");
|
|
294
294
|
if (e.fake) return /* @__PURE__ */ n(g, _object_spread_props(_object_spread({
|
|
@@ -310,37 +310,39 @@ const x = (param)=>{
|
|
|
310
310
|
}));
|
|
311
311
|
if (e.to || e.to === "") return /* @__PURE__ */ n(g, _object_spread_props(_object_spread({}, b), {
|
|
312
312
|
to: e.to,
|
|
313
|
-
fullPageOnWebView: e.fullPageOnWebView
|
|
313
|
+
fullPageOnWebView: e.fullPageOnWebView,
|
|
314
|
+
onNavigate: e.onNavigate
|
|
314
315
|
}));
|
|
315
316
|
if (e.href || e.href === "") return /* @__PURE__ */ n(g, _object_spread_props(_object_spread({}, b), {
|
|
316
317
|
href: e.href,
|
|
317
318
|
newTab: e.newTab,
|
|
318
|
-
loadOnTop: e.loadOnTop
|
|
319
|
+
loadOnTop: e.loadOnTop,
|
|
320
|
+
onNavigate: e.onNavigate
|
|
319
321
|
}));
|
|
320
322
|
if (process.env.NODE_ENV !== "production") throw Error("Bad button props");
|
|
321
323
|
return null;
|
|
322
|
-
}), Z = /*#__PURE__*/ a.forwardRef((_param,
|
|
324
|
+
}), Z = /*#__PURE__*/ a.forwardRef((_param, i)=>{
|
|
323
325
|
var { type: e } = _param, t = _object_without_properties(_param, [
|
|
324
326
|
"type"
|
|
325
327
|
]);
|
|
326
328
|
var _t_withChevron;
|
|
327
|
-
const { formStatus:
|
|
329
|
+
const { formStatus: l } = V(), u = O(), { textPresets: c } = R(), { eventFormat: s } = F(), { isDarkMode: f } = R(), { loadingText: d } = t, m = l === "sending", [h, o] = a.useState(!1), r = t.showSpinner || h, v = (_t_withChevron = t.withChevron) !== null && _t_withChevron !== void 0 ? _t_withChevron : !!t.href || !!t.to, [I, E] = a.useState(!!r);
|
|
328
330
|
a.useEffect(()=>{
|
|
329
|
-
|
|
331
|
+
r && !I && E(!0);
|
|
330
332
|
}, [
|
|
331
|
-
|
|
333
|
+
r,
|
|
332
334
|
I,
|
|
333
|
-
|
|
335
|
+
l
|
|
334
336
|
]);
|
|
335
337
|
var _t_trackingEvent;
|
|
336
|
-
const w = ()=>
|
|
338
|
+
const w = ()=>s === "google-analytics-4" ? {
|
|
337
339
|
name: z.userInteraction,
|
|
338
340
|
component_type: e === "danger" ? "danger_link" : "link",
|
|
339
|
-
component_copy:
|
|
341
|
+
component_copy: C(t.children)
|
|
340
342
|
} : {
|
|
341
343
|
category: M.userInteraction,
|
|
342
344
|
action: q.linkTapped,
|
|
343
|
-
label:
|
|
345
|
+
label: C(t.children)
|
|
344
346
|
}, b = (_)=>/* @__PURE__ */ n(Y, {
|
|
345
347
|
weight: c.button.weight,
|
|
346
348
|
truncate: 1,
|
|
@@ -348,7 +350,7 @@ const x = (param)=>{
|
|
|
348
350
|
children: _
|
|
349
351
|
}), y = e === "danger" && f && u ? "dangerDark" : e, L = {
|
|
350
352
|
className: D(u ? te[y] : ne[y], {
|
|
351
|
-
[G]:
|
|
353
|
+
[G]: r
|
|
352
354
|
}),
|
|
353
355
|
/**
|
|
354
356
|
* Setting bleed classes with style to override the margin:0 set by the Touchable component.
|
|
@@ -368,23 +370,24 @@ const x = (param)=>{
|
|
|
368
370
|
"aria-expanded": t["aria-expanded"],
|
|
369
371
|
"aria-haspopup": t["aria-haspopup"],
|
|
370
372
|
children: X({
|
|
371
|
-
showSpinner:
|
|
373
|
+
showSpinner: r,
|
|
372
374
|
shouldRenderSpinner: I,
|
|
373
|
-
setShouldRenderSpinner:
|
|
375
|
+
setShouldRenderSpinner: E,
|
|
374
376
|
children: t.children,
|
|
375
377
|
loadingText: d,
|
|
376
378
|
small: !0,
|
|
377
379
|
renderText: b,
|
|
378
|
-
textContentStyle:
|
|
380
|
+
textContentStyle: ie,
|
|
379
381
|
StartIcon: t.StartIcon,
|
|
380
382
|
EndIcon: t.EndIcon,
|
|
381
383
|
withChevron: v
|
|
382
384
|
}),
|
|
383
|
-
disabled: t.disabled ||
|
|
385
|
+
disabled: t.disabled || r || m,
|
|
386
|
+
role: t.role
|
|
384
387
|
};
|
|
385
388
|
if (process.env.NODE_ENV !== "production" && (t.to === "" || t.href === "")) throw Error("to or href props are empty strings");
|
|
386
389
|
if (t.onPress) return /* @__PURE__ */ n(g, _object_spread_props(_object_spread({
|
|
387
|
-
ref:
|
|
390
|
+
ref: i
|
|
388
391
|
}, L), {
|
|
389
392
|
onPress: (_)=>{
|
|
390
393
|
const B = t.onPress(_);
|
|
@@ -392,20 +395,22 @@ const x = (param)=>{
|
|
|
392
395
|
}
|
|
393
396
|
}));
|
|
394
397
|
if (t.to || t.to === "") return /* @__PURE__ */ n(g, _object_spread_props(_object_spread({
|
|
395
|
-
ref:
|
|
398
|
+
ref: i
|
|
396
399
|
}, L), {
|
|
397
400
|
to: t.to,
|
|
398
|
-
fullPageOnWebView: t.fullPageOnWebView
|
|
401
|
+
fullPageOnWebView: t.fullPageOnWebView,
|
|
402
|
+
onNavigate: t.onNavigate
|
|
399
403
|
}));
|
|
400
404
|
if (t.href || t.href === "") return /* @__PURE__ */ n(g, _object_spread_props(_object_spread({
|
|
401
|
-
ref:
|
|
405
|
+
ref: i
|
|
402
406
|
}, L), {
|
|
403
407
|
href: t.href,
|
|
404
|
-
newTab: t.newTab
|
|
408
|
+
newTab: t.newTab,
|
|
409
|
+
onNavigate: t.onNavigate
|
|
405
410
|
}));
|
|
406
411
|
if (process.env.NODE_ENV !== "production") throw Error("Bad button props");
|
|
407
412
|
return null;
|
|
408
|
-
}), xe = /*#__PURE__*/ a.forwardRef((_param,
|
|
413
|
+
}), xe = /*#__PURE__*/ a.forwardRef((_param, i)=>{
|
|
409
414
|
var { dataAttributes: e } = _param, t = _object_without_properties(_param, [
|
|
410
415
|
"dataAttributes"
|
|
411
416
|
]);
|
|
@@ -414,10 +419,10 @@ const x = (param)=>{
|
|
|
414
419
|
"component-name": "ButtonLink"
|
|
415
420
|
}, e)
|
|
416
421
|
}, t), {
|
|
417
|
-
ref:
|
|
422
|
+
ref: i,
|
|
418
423
|
type: "default"
|
|
419
424
|
}));
|
|
420
|
-
}), Re = /*#__PURE__*/ a.forwardRef((_param,
|
|
425
|
+
}), Re = /*#__PURE__*/ a.forwardRef((_param, i)=>{
|
|
421
426
|
var { dataAttributes: e } = _param, t = _object_without_properties(_param, [
|
|
422
427
|
"dataAttributes"
|
|
423
428
|
]);
|
|
@@ -427,10 +432,10 @@ const x = (param)=>{
|
|
|
427
432
|
}, e)
|
|
428
433
|
}, t), {
|
|
429
434
|
withChevron: !1,
|
|
430
|
-
ref:
|
|
435
|
+
ref: i,
|
|
431
436
|
type: "danger"
|
|
432
437
|
}));
|
|
433
|
-
}), ke = /*#__PURE__*/ a.forwardRef((_param,
|
|
438
|
+
}), ke = /*#__PURE__*/ a.forwardRef((_param, i)=>{
|
|
434
439
|
var { dataAttributes: e } = _param, t = _object_without_properties(_param, [
|
|
435
440
|
"dataAttributes"
|
|
436
441
|
]);
|
|
@@ -439,10 +444,10 @@ const x = (param)=>{
|
|
|
439
444
|
"component-name": "ButtonPrimary"
|
|
440
445
|
}, e)
|
|
441
446
|
}, t), {
|
|
442
|
-
ref:
|
|
447
|
+
ref: i,
|
|
443
448
|
type: "primary"
|
|
444
449
|
}));
|
|
445
|
-
}), Be = /*#__PURE__*/ a.forwardRef((_param,
|
|
450
|
+
}), Be = /*#__PURE__*/ a.forwardRef((_param, i)=>{
|
|
446
451
|
var { dataAttributes: e } = _param, t = _object_without_properties(_param, [
|
|
447
452
|
"dataAttributes"
|
|
448
453
|
]);
|
|
@@ -451,10 +456,10 @@ const x = (param)=>{
|
|
|
451
456
|
"component-name": "ButtonSecondary"
|
|
452
457
|
}, e)
|
|
453
458
|
}, t), {
|
|
454
|
-
ref:
|
|
459
|
+
ref: i,
|
|
455
460
|
type: "secondary"
|
|
456
461
|
}));
|
|
457
|
-
}), Ae = /*#__PURE__*/ a.forwardRef((_param,
|
|
462
|
+
}), Ae = /*#__PURE__*/ a.forwardRef((_param, i)=>{
|
|
458
463
|
var { dataAttributes: e } = _param, t = _object_without_properties(_param, [
|
|
459
464
|
"dataAttributes"
|
|
460
465
|
]);
|
|
@@ -463,7 +468,7 @@ const x = (param)=>{
|
|
|
463
468
|
"component-name": "ButtonDanger"
|
|
464
469
|
}, e)
|
|
465
470
|
}, t), {
|
|
466
|
-
ref:
|
|
471
|
+
ref: i,
|
|
467
472
|
type: "danger"
|
|
468
473
|
}));
|
|
469
474
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import "./sprinkles.css.ts.vanilla.css-mistica.js";
|
|
2
2
|
import "./callout.css.ts.vanilla.css-mistica.js";
|
|
3
|
-
var
|
|
4
|
-
export {
|
|
3
|
+
var y = "_14g0jmy1 _1y2v1nf7i _1y2v1nf8r _1y2v1nfa0 _1y2v1nfb9 _1y2v1nfha _1y2v1nfk1 _1y2v1nfkb", _ = "_14g0jmy3 _1y2v1nfhw";
|
|
4
|
+
export { y as container, _ as content };
|
package/dist-es/callout.js
CHANGED
|
@@ -53,50 +53,50 @@ function _object_spread_props(target, source) {
|
|
|
53
53
|
}
|
|
54
54
|
import { jsx as r, jsxs as o } from "react/jsx-runtime";
|
|
55
55
|
import n from "./stack.js";
|
|
56
|
-
import
|
|
57
|
-
import
|
|
58
|
-
import { useTheme as
|
|
59
|
-
import { useThemeVariant as
|
|
60
|
-
import { Text3 as
|
|
61
|
-
import
|
|
62
|
-
import { IconButton as
|
|
63
|
-
import
|
|
64
|
-
import
|
|
65
|
-
import { container as
|
|
66
|
-
import { vars as
|
|
67
|
-
import { sprinkles as
|
|
56
|
+
import g from "./inline.js";
|
|
57
|
+
import b from "./box.js";
|
|
58
|
+
import { useTheme as v } from "./hooks.js";
|
|
59
|
+
import { useThemeVariant as x, ThemeVariant as C } from "./theme-variant-context.js";
|
|
60
|
+
import { Text3 as k, Text2 as I } from "./text.js";
|
|
61
|
+
import T from "./generated/mistica-icons/icon-close-regular.js";
|
|
62
|
+
import { IconButton as B } from "./icon-button.js";
|
|
63
|
+
import R from "classnames";
|
|
64
|
+
import y from "./button-group.js";
|
|
65
|
+
import { container as N, content as S } from "./callout.css-mistica.js";
|
|
66
|
+
import { vars as V } from "./image.css-mistica.js";
|
|
67
|
+
import { sprinkles as j } from "./sprinkles.css-mistica.js";
|
|
68
68
|
import { vars as e } from "./skins/skin-contract.css-mistica.js";
|
|
69
|
-
import { getPrefixedDataAttributes as
|
|
70
|
-
import { applyCssVars as
|
|
71
|
-
const
|
|
72
|
-
let { title: t,
|
|
73
|
-
const
|
|
69
|
+
import { getPrefixedDataAttributes as A } from "./utils/dom.js";
|
|
70
|
+
import { applyCssVars as P } from "./utils/css.js";
|
|
71
|
+
const $ = (param)=>{
|
|
72
|
+
let { title: t, titleAs: c = "h2", description: d, icon: a, onClose: i, button: l, secondaryButton: s, buttonLink: m, "aria-label": p, dataAttributes: u } = param;
|
|
73
|
+
const f = x(), { texts: h } = v();
|
|
74
74
|
return /* @__PURE__ */ r("section", _object_spread_props(_object_spread({
|
|
75
|
-
className:
|
|
75
|
+
className: R(N, j({
|
|
76
76
|
background: {
|
|
77
77
|
inverse: e.colors.backgroundContainer,
|
|
78
78
|
alternative: e.colors.backgroundContainer,
|
|
79
79
|
default: e.colors.backgroundContainerAlternative
|
|
80
|
-
}[
|
|
80
|
+
}[f]
|
|
81
81
|
})),
|
|
82
|
-
style:
|
|
83
|
-
[
|
|
82
|
+
style: P({
|
|
83
|
+
[V.mediaBorderRadius]: e.borderRadii.mediaSmall
|
|
84
84
|
}),
|
|
85
|
-
"aria-label":
|
|
86
|
-
},
|
|
87
|
-
children: /* @__PURE__ */ o(
|
|
85
|
+
"aria-label": p !== null && p !== void 0 ? p : t
|
|
86
|
+
}, A(u, "Callout")), {
|
|
87
|
+
children: /* @__PURE__ */ o(C, {
|
|
88
88
|
isInverse: !1,
|
|
89
89
|
children: [
|
|
90
|
-
a && /* @__PURE__ */ r(
|
|
90
|
+
a && /* @__PURE__ */ r(b, {
|
|
91
91
|
paddingRight: 16,
|
|
92
92
|
children: a
|
|
93
93
|
}),
|
|
94
94
|
/* @__PURE__ */ r("div", {
|
|
95
|
-
className:
|
|
95
|
+
className: S,
|
|
96
96
|
children: /* @__PURE__ */ o(n, {
|
|
97
97
|
space: 16,
|
|
98
98
|
children: [
|
|
99
|
-
/* @__PURE__ */ o(
|
|
99
|
+
/* @__PURE__ */ o(g, {
|
|
100
100
|
fullWidth: !0,
|
|
101
101
|
alignItems: "flex-start",
|
|
102
102
|
space: "between",
|
|
@@ -104,16 +104,16 @@ const P = (param)=>{
|
|
|
104
104
|
/* @__PURE__ */ o(n, {
|
|
105
105
|
space: 4,
|
|
106
106
|
children: [
|
|
107
|
-
/* @__PURE__ */ r(
|
|
108
|
-
as:
|
|
107
|
+
/* @__PURE__ */ r(k, {
|
|
108
|
+
as: c,
|
|
109
109
|
regular: !0,
|
|
110
110
|
children: t
|
|
111
111
|
}),
|
|
112
|
-
/* @__PURE__ */ r(
|
|
112
|
+
/* @__PURE__ */ r(I, {
|
|
113
113
|
as: "p",
|
|
114
114
|
regular: !0,
|
|
115
115
|
color: e.colors.textSecondary,
|
|
116
|
-
children:
|
|
116
|
+
children: d
|
|
117
117
|
})
|
|
118
118
|
]
|
|
119
119
|
}),
|
|
@@ -122,18 +122,18 @@ const P = (param)=>{
|
|
|
122
122
|
// Align the X with the text content
|
|
123
123
|
marginTop: "0.125rem"
|
|
124
124
|
},
|
|
125
|
-
children: /* @__PURE__ */ r(
|
|
125
|
+
children: /* @__PURE__ */ r(B, {
|
|
126
126
|
small: !0,
|
|
127
127
|
bleedY: !0,
|
|
128
128
|
bleedRight: !0,
|
|
129
|
-
Icon:
|
|
129
|
+
Icon: T,
|
|
130
130
|
onPress: i,
|
|
131
|
-
"aria-label":
|
|
131
|
+
"aria-label": h.closeButtonLabel
|
|
132
132
|
})
|
|
133
133
|
})
|
|
134
134
|
]
|
|
135
135
|
}),
|
|
136
|
-
(l || s || m) && /* @__PURE__ */ r(
|
|
136
|
+
(l || s || m) && /* @__PURE__ */ r(y, {
|
|
137
137
|
primaryButton: l,
|
|
138
138
|
secondaryButton: s,
|
|
139
139
|
link: m
|
|
@@ -144,5 +144,5 @@ const P = (param)=>{
|
|
|
144
144
|
]
|
|
145
145
|
})
|
|
146
146
|
}));
|
|
147
|
-
},
|
|
148
|
-
export {
|
|
147
|
+
}, X = $;
|
|
148
|
+
export { X as default };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "./sprinkles.css.ts.vanilla.css-mistica.js";
|
|
2
2
|
import "./icon-button.css.ts.vanilla.css-mistica.js";
|
|
3
3
|
import "./card.css.ts.vanilla.css-mistica.js";
|
|
4
|
-
var n = "_15e54s91
|
|
4
|
+
var n = "_15e54s91 _1y2v1nfha _1y2v1nfhw _1y2v1nfhq", e = "_15e54s93 _1y2v1nfha _1y2v1nfh4", r = "_15e54s9v", y = "_15e54s98", f = "_15e54s9k _1y2v1nfa0 _1y2v1nfb9 _1y2v1nf7o _1y2v1nf8x _1y2v1nfha _1y2v1nfhw _1y2v1nfh4 _1y2v1nfhg _1y2v1nfhx", h = "_15e54s9w", s = "_15e54s9r", d = "_1y2v1nfhx _1y2v1nfie _1y2v1nfha _1y2v1nfh4", t = "_15e54s9q", i = "_15e54s9s", o = "_1y2v1nfha _1y2v1nfhg _1y2v1nfie _1y2v1nfhx _1y2v1nfhw", C = "_15e54s9f _1y2v1nfa0 _1y2v1nfb9 _1y2v1nfha _1y2v1nfhw _1y2v1nfh4 _1y2v1nf7i _1y2v1nf8x _1y2v1nfhg _1y2v1nfhm", c = "_15e54s9g", l = "_15e54s9i _1y2v1nfha _1y2v1nfhw _1y2v1nfh4 _1y2v1nfhg _1y2v1nfhm _1y2v1nf7i _1y2v1nfb9", b = "_15e54s9m _1y2v1nf7i _1y2v1nf8r _1y2v1nfa0 _1y2v1nfb9 _1y2v1nfha _1y2v1nfh4 _1y2v1nfie _1y2v1nfhg _1y2v1nfhm _1y2v1nfhx _1y2v1nfhw", p = "_15e54s95", u = "_15e54s9a _15e54s96", m = "_15e54s9b _15e54s96", x = "_15e54s9c _15e54s96", g = "_15e54s94", w = "_15e54s97 _15e54s96", O = "_15e54s99 _15e54s96", k = {
|
|
5
5
|
aspectRatio: "var(--_15e54s9t)",
|
|
6
6
|
topActionsCount: "var(--_15e54s9u)"
|
|
7
7
|
};
|
|
8
|
-
export { n as actions, e as boxed,
|
|
8
|
+
export { n as actions, e as boxed, r as cardContainer, y as circularMediaOverlay, f as dataCard, h as dataCardTopActionsWithoutIcon, s as displayCardBackground, d as displayCardContainer, t as displayCardContent, i as displayCardGradient, o as mediaCard, C as mediaCardContent, c as mediaCardIcon, l as nakedCardContent, b as snapCard, p as touchable, u as touchableCardOverlay, m as touchableCardOverlayInverse, x as touchableCardOverlayMedia, g as touchableContainer, w as touchableMediaCardOverlay, O as touchableNakedMediaOverlay, k as vars };
|