@telefonica/mistica 14.42.0 → 14.42.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/dialog.js +66 -65
- package/dist/feedback.css-mistica.js +14 -8
- package/dist/feedback.css.d.ts +2 -0
- package/dist/feedback.js +43 -36
- package/dist/package-version.js +1 -1
- package/dist/text.css-mistica.js +7 -7
- package/dist/text.css.d.ts +0 -1
- package/dist/text.js +24 -24
- package/dist-es/dialog.js +126 -125
- package/dist-es/feedback.css-mistica.js +2 -2
- package/dist-es/feedback.js +72 -65
- package/dist-es/package-version.js +1 -1
- package/dist-es/style.css +1 -1
- package/dist-es/text.css-mistica.js +3 -3
- package/dist-es/text.js +32 -32
- package/package.json +1 -1
package/dist/text.js
CHANGED
|
@@ -14,7 +14,7 @@ _export(exports, {
|
|
|
14
14
|
return n;
|
|
15
15
|
},
|
|
16
16
|
Text1: function() {
|
|
17
|
-
return
|
|
17
|
+
return le;
|
|
18
18
|
},
|
|
19
19
|
Text10: function() {
|
|
20
20
|
return ie;
|
|
@@ -44,7 +44,7 @@ _export(exports, {
|
|
|
44
44
|
return oe;
|
|
45
45
|
},
|
|
46
46
|
default: function() {
|
|
47
|
-
return
|
|
47
|
+
return he;
|
|
48
48
|
}
|
|
49
49
|
});
|
|
50
50
|
const _jsxruntime = require("react/jsx-runtime");
|
|
@@ -181,28 +181,28 @@ function _object_without_properties_loose(source, excluded) {
|
|
|
181
181
|
}
|
|
182
182
|
return target;
|
|
183
183
|
}
|
|
184
|
-
const
|
|
184
|
+
const K = {
|
|
185
185
|
light: 300,
|
|
186
186
|
regular: 400,
|
|
187
187
|
medium: 500,
|
|
188
188
|
bold: 700
|
|
189
|
-
},
|
|
190
|
-
let { weight: e, color: i = _skincontractcssmistica.vars.colors.textPrimary, decoration: t, truncate: o, transform:
|
|
191
|
-
const I = (0, _themevariantcontext.useIsInverseVariant)(), C =
|
|
189
|
+
}, Q = (e)=>e === !0 ? 1 : e || "initial", n = (param)=>{
|
|
190
|
+
let { weight: e, color: i = _skincontractcssmistica.vars.colors.textPrimary, decoration: t, truncate: o, transform: h, wordBreak: c = !0, hyphens: u = "auto", as: z = "span", children: g, size: d, mobileSize: b = d, desktopSize: T = d, lineHeight: k, mobileLineHeight: S = k, desktopLineHeight: f = k, letterSpacing: w, textAlign: H, textShadow: v, id: A, role: P, "aria-level": y, dataAttributes: W } = param;
|
|
191
|
+
const I = (0, _themevariantcontext.useIsInverseVariant)(), C = Q(o), V = {
|
|
192
192
|
[_skincontractcssmistica.vars.colors.textPrimary]: _skincontractcssmistica.vars.colors.textPrimaryInverse,
|
|
193
193
|
[_skincontractcssmistica.vars.colors.textSecondary]: _skincontractcssmistica.vars.colors.textSecondaryInverse,
|
|
194
194
|
[_skincontractcssmistica.vars.colors.textLink]: _skincontractcssmistica.vars.colors.textLinkInverse
|
|
195
195
|
};
|
|
196
196
|
if (!g && g !== 0) return null;
|
|
197
197
|
const D = (0, _classnames.default)(_textcssmistica.text, c ? _textcssmistica.withWordBreak : _textcssmistica.withoutWordBreak, {
|
|
198
|
-
[_textcssmistica.
|
|
199
|
-
[_textcssmistica.
|
|
200
|
-
}),
|
|
198
|
+
[_textcssmistica.truncate]: o,
|
|
199
|
+
[_textcssmistica.truncateToOneLine]: o === 1 || o === !0
|
|
200
|
+
}), R = (0, _css.applyCssVars)({
|
|
201
201
|
[_textcssmistica.vars.mobileSize]: b ? (0, _css.pxToRem)(b) : "inherit",
|
|
202
|
-
[_textcssmistica.vars.mobileLineHeight]:
|
|
202
|
+
[_textcssmistica.vars.mobileLineHeight]: S ? (0, _css.pxToRem)(S) : "inherit",
|
|
203
203
|
[_textcssmistica.vars.desktopSize]: T ? (0, _css.pxToRem)(T) : "inherit",
|
|
204
|
-
[_textcssmistica.vars.desktopLineHeight]:
|
|
205
|
-
}),
|
|
204
|
+
[_textcssmistica.vars.desktopLineHeight]: f ? (0, _css.pxToRem)(f) : "inherit"
|
|
205
|
+
}), j = o ? (0, _css.applyCssVars)({
|
|
206
206
|
[_textcssmistica.vars.lineClamp]: String(C)
|
|
207
207
|
}) : {};
|
|
208
208
|
var _V_i;
|
|
@@ -212,12 +212,12 @@ const J = {
|
|
|
212
212
|
role: P,
|
|
213
213
|
"aria-level": y
|
|
214
214
|
}, (0, _dom.getPrefixedDataAttributes)(W)), {
|
|
215
|
-
style: _object_spread_props(_object_spread({},
|
|
215
|
+
style: _object_spread_props(_object_spread({}, R, j), {
|
|
216
216
|
hyphens: u,
|
|
217
217
|
WebkitHyphens: u,
|
|
218
218
|
letterSpacing: w,
|
|
219
|
-
fontWeight: e ?
|
|
220
|
-
textTransform:
|
|
219
|
+
fontWeight: e ? K[e] : "inherit",
|
|
220
|
+
textTransform: h || "inherit",
|
|
221
221
|
textDecoration: t !== null && t !== void 0 ? t : "inherit",
|
|
222
222
|
overflowWrap: c ? "anywhere" : "inherit",
|
|
223
223
|
color: I ? (_V_i = V[i]) !== null && _V_i !== void 0 ? _V_i : i : i,
|
|
@@ -225,13 +225,13 @@ const J = {
|
|
|
225
225
|
textShadow: v
|
|
226
226
|
})
|
|
227
227
|
}), g);
|
|
228
|
-
},
|
|
228
|
+
}, l = (e)=>{
|
|
229
229
|
if (e.light) return "light";
|
|
230
230
|
if (e.regular) return "regular";
|
|
231
231
|
if (e.medium) return "medium";
|
|
232
232
|
if (e.weight) return e.weight;
|
|
233
233
|
}, s = (param)=>{
|
|
234
|
-
let { forceMobileSizes: e, mobileSize: i, mobileLineHeight: t, desktopSize: o, desktopLineHeight:
|
|
234
|
+
let { forceMobileSizes: e, mobileSize: i, mobileLineHeight: t, desktopSize: o, desktopLineHeight: h } = param;
|
|
235
235
|
return e ? {
|
|
236
236
|
size: i,
|
|
237
237
|
lineHeight: t
|
|
@@ -239,7 +239,7 @@ const J = {
|
|
|
239
239
|
mobileSize: i,
|
|
240
240
|
mobileLineHeight: t,
|
|
241
241
|
desktopSize: o,
|
|
242
|
-
desktopLineHeight:
|
|
242
|
+
desktopLineHeight: h
|
|
243
243
|
};
|
|
244
244
|
}, ie = (_param)=>{
|
|
245
245
|
var { dataAttributes: e, forceMobileSizes: i } = _param, t = _object_without_properties(_param, [
|
|
@@ -361,7 +361,7 @@ const J = {
|
|
|
361
361
|
desktopSize: 20,
|
|
362
362
|
desktopLineHeight: "28px"
|
|
363
363
|
})), {
|
|
364
|
-
weight:
|
|
364
|
+
weight: l(t),
|
|
365
365
|
dataAttributes: _object_spread({
|
|
366
366
|
"component-name": "Text4"
|
|
367
367
|
}, e)
|
|
@@ -378,7 +378,7 @@ const J = {
|
|
|
378
378
|
desktopSize: 18,
|
|
379
379
|
desktopLineHeight: "24px"
|
|
380
380
|
})), {
|
|
381
|
-
weight:
|
|
381
|
+
weight: l(t),
|
|
382
382
|
dataAttributes: _object_spread({
|
|
383
383
|
"component-name": "Text3"
|
|
384
384
|
}, e)
|
|
@@ -395,12 +395,12 @@ const J = {
|
|
|
395
395
|
desktopSize: 16,
|
|
396
396
|
desktopLineHeight: "24px"
|
|
397
397
|
})), {
|
|
398
|
-
weight:
|
|
398
|
+
weight: l(t),
|
|
399
399
|
dataAttributes: _object_spread({
|
|
400
400
|
"component-name": "Text2"
|
|
401
401
|
}, e)
|
|
402
402
|
}), t));
|
|
403
|
-
},
|
|
403
|
+
}, le = (_param)=>{
|
|
404
404
|
var { dataAttributes: e, forceMobileSizes: i } = _param, t = _object_without_properties(_param, [
|
|
405
405
|
"dataAttributes",
|
|
406
406
|
"forceMobileSizes"
|
|
@@ -412,9 +412,9 @@ const J = {
|
|
|
412
412
|
desktopSize: 14,
|
|
413
413
|
desktopLineHeight: "20px"
|
|
414
414
|
})), {
|
|
415
|
-
weight:
|
|
415
|
+
weight: l(t),
|
|
416
416
|
dataAttributes: _object_spread({
|
|
417
417
|
"component-name": "Text1"
|
|
418
418
|
}, e)
|
|
419
419
|
}), t));
|
|
420
|
-
},
|
|
420
|
+
}, he = n;
|
package/dist-es/dialog.js
CHANGED
|
@@ -78,72 +78,72 @@ function _object_without_properties_loose(source, excluded) {
|
|
|
78
78
|
}
|
|
79
79
|
return target;
|
|
80
80
|
}
|
|
81
|
-
import { jsx as
|
|
82
|
-
import * as
|
|
83
|
-
import
|
|
84
|
-
import { ButtonDanger as
|
|
85
|
-
import { Portal as
|
|
86
|
-
import
|
|
87
|
-
import
|
|
88
|
-
import
|
|
89
|
-
import { isWebViewBridgeAvailable as
|
|
90
|
-
import { useTheme as
|
|
91
|
-
import
|
|
92
|
-
import { Text5 as
|
|
93
|
-
import { ESC as
|
|
94
|
-
import
|
|
95
|
-
import { isRunningAcceptanceTest as
|
|
96
|
-
import { useSetModalStateEffect as
|
|
97
|
-
import
|
|
98
|
-
import { ANIMATION_DURATION_MS as
|
|
99
|
-
import { vars as
|
|
100
|
-
const
|
|
101
|
-
const { texts: s } =
|
|
102
|
-
onPress:
|
|
81
|
+
import { jsx as t, jsxs as k, Fragment as W } from "react/jsx-runtime";
|
|
82
|
+
import * as e from "react";
|
|
83
|
+
import E from "classnames";
|
|
84
|
+
import { ButtonDanger as _, ButtonPrimary as j, ButtonSecondary as F } from "./button.js";
|
|
85
|
+
import { Portal as V } from "./portal.js";
|
|
86
|
+
import z from "./focus-trap.js";
|
|
87
|
+
import H from "./generated/mistica-icons/icon-close-regular.js";
|
|
88
|
+
import K from "./icon-button.js";
|
|
89
|
+
import { isWebViewBridgeAvailable as U, nativeConfirm as q, nativeAlert as G } from "@tef-novum/webview-bridge";
|
|
90
|
+
import { useTheme as D } from "./hooks.js";
|
|
91
|
+
import J from "./button-layout.js";
|
|
92
|
+
import { Text5 as Q, Text4 as A, Text3 as X } from "./text.js";
|
|
93
|
+
import { ESC as Y } from "./utils/keys.js";
|
|
94
|
+
import T from "./box.js";
|
|
95
|
+
import { isRunningAcceptanceTest as Z } from "./utils/platform.js";
|
|
96
|
+
import { useSetModalStateEffect as $ } from "./modal-context-provider.js";
|
|
97
|
+
import ee from "./stack.js";
|
|
98
|
+
import { ANIMATION_DURATION_MS as te, wrapper as ne, modalOpacityLayer as re, closedOpactityLayer as oe, modalContent as ae, closedModalContent as se, modalCloseButtonContainer as ie, variants as le, iconContainer as ce, dialogContent as ue, dialogActions as de } from "./dialog.css-mistica.js";
|
|
99
|
+
import { vars as L } from "./skins/skin-contract.css-mistica.js";
|
|
100
|
+
const fe = ()=>process.env.NODE_ENV !== "test" && !Z(), me = (o)=>{
|
|
101
|
+
const { texts: s } = D(), { className: u, title: a, message: h, icon: n, extra: i, cancelText: l = s.dialogCancelButton, acceptText: c = s.dialogAcceptButton, onCancel: f, onAccept: m, destructive: y = !1 } = o, d = o.type === "dialog", g = o.type === "confirm" || d && !!f, p = {
|
|
102
|
+
onPress: m || (()=>{}),
|
|
103
103
|
children: c,
|
|
104
104
|
// @deprecated - testid should be removed but many webapp tests depend on this
|
|
105
105
|
dataAttributes: {
|
|
106
106
|
testid: "dialog-accept-button"
|
|
107
107
|
}
|
|
108
108
|
};
|
|
109
|
-
return /* @__PURE__ */
|
|
110
|
-
className:
|
|
109
|
+
return /* @__PURE__ */ k("div", {
|
|
110
|
+
className: E(le[d ? "dialog" : "default"], u),
|
|
111
111
|
children: [
|
|
112
|
-
|
|
112
|
+
n && /* @__PURE__ */ t(T, {
|
|
113
113
|
paddingBottom: 24,
|
|
114
|
-
children: /* @__PURE__ */
|
|
115
|
-
className:
|
|
116
|
-
children: /*#__PURE__*/
|
|
114
|
+
children: /* @__PURE__ */ t("div", {
|
|
115
|
+
className: ce,
|
|
116
|
+
children: /*#__PURE__*/ e.cloneElement(n, {
|
|
117
117
|
size: "100%"
|
|
118
118
|
})
|
|
119
119
|
})
|
|
120
120
|
}),
|
|
121
|
-
a && /* @__PURE__ */
|
|
121
|
+
a && /* @__PURE__ */ t(T, {
|
|
122
122
|
paddingBottom: 16,
|
|
123
|
-
children: d ? /* @__PURE__ */
|
|
123
|
+
children: d ? /* @__PURE__ */ t(Q, {
|
|
124
124
|
as: "h2",
|
|
125
125
|
children: a
|
|
126
|
-
}) : /* @__PURE__ */
|
|
126
|
+
}) : /* @__PURE__ */ t(A, {
|
|
127
127
|
regular: !0,
|
|
128
128
|
as: "h2",
|
|
129
129
|
children: a
|
|
130
130
|
})
|
|
131
131
|
}),
|
|
132
|
-
|
|
132
|
+
o.subtitle && /* @__PURE__ */ t(T, {
|
|
133
133
|
paddingBottom: 16,
|
|
134
|
-
children: /* @__PURE__ */
|
|
134
|
+
children: /* @__PURE__ */ t(A, {
|
|
135
135
|
regular: !0,
|
|
136
136
|
as: "h2",
|
|
137
|
-
children:
|
|
137
|
+
children: o.subtitle
|
|
138
138
|
})
|
|
139
139
|
}),
|
|
140
|
-
/* @__PURE__ */
|
|
141
|
-
className:
|
|
142
|
-
children: /* @__PURE__ */
|
|
140
|
+
/* @__PURE__ */ t("div", {
|
|
141
|
+
className: ue,
|
|
142
|
+
children: /* @__PURE__ */ k(ee, {
|
|
143
143
|
space: 16,
|
|
144
144
|
children: [
|
|
145
|
-
/* @__PURE__ */
|
|
146
|
-
color:
|
|
145
|
+
/* @__PURE__ */ t(X, {
|
|
146
|
+
color: L.colors.textSecondary,
|
|
147
147
|
regular: !0,
|
|
148
148
|
children: h
|
|
149
149
|
}),
|
|
@@ -151,19 +151,19 @@ const ue = ()=>process.env.NODE_ENV !== "test" && !Y(), me = (r)=>{
|
|
|
151
151
|
]
|
|
152
152
|
})
|
|
153
153
|
}),
|
|
154
|
-
/* @__PURE__ */
|
|
154
|
+
/* @__PURE__ */ t("div", {
|
|
155
155
|
className: de,
|
|
156
|
-
children: /* @__PURE__ */
|
|
157
|
-
link: d ?
|
|
156
|
+
children: /* @__PURE__ */ k(J, {
|
|
157
|
+
link: d ? o.link : void 0,
|
|
158
158
|
children: [
|
|
159
|
-
y ? /* @__PURE__ */
|
|
159
|
+
y ? /* @__PURE__ */ t(_, _object_spread({
|
|
160
160
|
tabIndex: 1
|
|
161
|
-
}, p)) : /* @__PURE__ */
|
|
161
|
+
}, p)) : /* @__PURE__ */ t(j, _object_spread({
|
|
162
162
|
tabIndex: 1
|
|
163
163
|
}, p)),
|
|
164
|
-
g && /* @__PURE__ */
|
|
164
|
+
g && /* @__PURE__ */ t(F, {
|
|
165
165
|
tabIndex: 2,
|
|
166
|
-
onPress:
|
|
166
|
+
onPress: f || (()=>{}),
|
|
167
167
|
dataAttributes: {
|
|
168
168
|
testid: "dialog-cancel-button"
|
|
169
169
|
},
|
|
@@ -174,151 +174,152 @@ const ue = ()=>process.env.NODE_ENV !== "test" && !Y(), me = (r)=>{
|
|
|
174
174
|
})
|
|
175
175
|
]
|
|
176
176
|
});
|
|
177
|
-
},
|
|
178
|
-
let { type:
|
|
179
|
-
return
|
|
177
|
+
}, he = (param)=>{
|
|
178
|
+
let { type: o, message: s, title: u, acceptText: a, cancelText: h, onAccept: n, onCancel: i, onDestroy: l } = param;
|
|
179
|
+
return o === "confirm" ? q({
|
|
180
180
|
message: s,
|
|
181
181
|
title: u,
|
|
182
182
|
cancelText: h,
|
|
183
183
|
acceptText: a
|
|
184
184
|
}).then((c)=>{
|
|
185
|
-
c ?
|
|
186
|
-
}) :
|
|
185
|
+
c ? n == null || n() : i == null || i(), l();
|
|
186
|
+
}) : G({
|
|
187
187
|
message: s,
|
|
188
188
|
title: u,
|
|
189
189
|
buttonText: a
|
|
190
190
|
}).then(()=>{
|
|
191
|
-
|
|
191
|
+
n == null || n(), l();
|
|
192
192
|
});
|
|
193
|
-
},
|
|
194
|
-
let { type:
|
|
195
|
-
const { texts: c } =
|
|
196
|
-
type:
|
|
193
|
+
}, ge = (param)=>{
|
|
194
|
+
let { type: o, onAccept: s, onCancel: u, onDestroy: a, acceptText: h, cancelText: n, message: i, title: l } = param;
|
|
195
|
+
const { texts: c } = D(), f = e.useRef({
|
|
196
|
+
type: o,
|
|
197
197
|
onAccept: s,
|
|
198
198
|
onCancel: u,
|
|
199
199
|
onDestroy: a,
|
|
200
200
|
acceptText: h || c.dialogAcceptButton,
|
|
201
|
-
cancelText:
|
|
201
|
+
cancelText: n || c.dialogCancelButton,
|
|
202
202
|
message: i,
|
|
203
203
|
title: l
|
|
204
204
|
});
|
|
205
|
-
return
|
|
206
|
-
|
|
207
|
-
}, []), /* @__PURE__ */
|
|
208
|
-
},
|
|
209
|
-
|
|
210
|
-
const s =
|
|
205
|
+
return e.useEffect(()=>{
|
|
206
|
+
he(f.current);
|
|
207
|
+
}, []), /* @__PURE__ */ t(W, {});
|
|
208
|
+
}, Le = (o)=>{
|
|
209
|
+
$();
|
|
210
|
+
const s = e.useRef(null), { texts: u } = D(), [a, h] = e.useState(!1), n = e.useRef(!1), i = e.useRef(!1), [l, c] = e.useState(!1), f = e.useRef(!1), m = e.useRef(!1), y = e.useRef(fe() ? te : 0), d = e.useRef(()=>{}), g = o.type !== "dialog" && U(), p = o.type === "dialog", P = o.type === "alert", { onAccept: b, onCancel: R, onDestroy: I } = o, O = _object_without_properties(o, [
|
|
211
211
|
"onAccept",
|
|
212
212
|
"onCancel",
|
|
213
213
|
"onDestroy"
|
|
214
214
|
]);
|
|
215
|
-
|
|
216
|
-
const
|
|
217
|
-
|
|
215
|
+
e.useEffect(()=>{
|
|
216
|
+
const r = setTimeout(()=>{
|
|
217
|
+
n.current || c(!0);
|
|
218
218
|
}, y.current);
|
|
219
219
|
return ()=>{
|
|
220
|
-
clearTimeout(
|
|
220
|
+
clearTimeout(r);
|
|
221
221
|
};
|
|
222
222
|
}, []);
|
|
223
|
-
const
|
|
224
|
-
i.current || (i.current = !0,
|
|
223
|
+
const w = e.useCallback(()=>{
|
|
224
|
+
i.current || (i.current = !0, f.current ? b == null || b() : R == null || R(), I());
|
|
225
225
|
}, [
|
|
226
226
|
b,
|
|
227
227
|
R,
|
|
228
228
|
I
|
|
229
|
-
]),
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
229
|
+
]), B = e.useCallback(()=>{
|
|
230
|
+
window.removeEventListener("popstate", d.current), m.current && (m.current = !1, window.history.back());
|
|
231
|
+
let r;
|
|
232
|
+
return !n.current && l && (n.current = !0, c(!1), h(!0), r = setTimeout(w, y.current)), ()=>{
|
|
233
|
+
r && clearTimeout(r);
|
|
233
234
|
};
|
|
234
235
|
}, [
|
|
235
|
-
|
|
236
|
+
w,
|
|
236
237
|
l
|
|
237
|
-
]),
|
|
238
|
-
|
|
238
|
+
]), x = e.useCallback(()=>{
|
|
239
|
+
f.current = !0, B();
|
|
239
240
|
}, [
|
|
240
|
-
|
|
241
|
-
]), v =
|
|
242
|
-
|
|
241
|
+
B
|
|
242
|
+
]), v = e.useCallback(()=>{
|
|
243
|
+
f.current = !1, B();
|
|
243
244
|
}, [
|
|
244
|
-
|
|
245
|
-
]), C =
|
|
246
|
-
|
|
245
|
+
B
|
|
246
|
+
]), C = e.useCallback(()=>{
|
|
247
|
+
n.current || (P ? x() : v());
|
|
247
248
|
}, [
|
|
248
|
-
|
|
249
|
+
x,
|
|
249
250
|
v,
|
|
250
|
-
|
|
251
|
-
]),
|
|
252
|
-
|
|
251
|
+
P
|
|
252
|
+
]), S = e.useCallback(()=>{
|
|
253
|
+
m.current && (m.current = !1, C());
|
|
253
254
|
}, [
|
|
254
255
|
C
|
|
255
256
|
]);
|
|
256
|
-
|
|
257
|
-
if (!
|
|
258
|
-
window.removeEventListener("popstate",
|
|
257
|
+
e.useEffect(()=>{
|
|
258
|
+
if (!g) return !m.current && !n.current && (m.current = !0, window.history.pushState(null, document.title, window.location.href)), d.current = S, window.addEventListener("popstate", d.current), ()=>{
|
|
259
|
+
window.removeEventListener("popstate", d.current);
|
|
259
260
|
};
|
|
260
261
|
}, [
|
|
261
|
-
|
|
262
|
-
|
|
262
|
+
S,
|
|
263
|
+
g
|
|
263
264
|
]);
|
|
264
|
-
const
|
|
265
|
-
|
|
265
|
+
const N = e.useCallback((r)=>{
|
|
266
|
+
r.key === Y && (r.stopPropagation(), r.preventDefault(), C());
|
|
266
267
|
}, [
|
|
267
268
|
C
|
|
268
269
|
]);
|
|
269
|
-
|
|
270
|
-
if (!
|
|
271
|
-
document.removeEventListener("keydown",
|
|
270
|
+
e.useEffect(()=>{
|
|
271
|
+
if (!g) return document.addEventListener("keydown", N), ()=>{
|
|
272
|
+
document.removeEventListener("keydown", N);
|
|
272
273
|
};
|
|
273
274
|
}, [
|
|
274
|
-
|
|
275
|
-
|
|
275
|
+
N,
|
|
276
|
+
g
|
|
276
277
|
]);
|
|
277
|
-
const
|
|
278
|
-
|
|
278
|
+
const M = e.useCallback((r)=>{
|
|
279
|
+
r.stopPropagation(), p && v();
|
|
279
280
|
}, [
|
|
280
|
-
|
|
281
|
+
p,
|
|
281
282
|
v
|
|
282
283
|
]);
|
|
283
|
-
return
|
|
284
|
-
className:
|
|
285
|
-
children: /* @__PURE__ */
|
|
286
|
-
children: /* @__PURE__ */
|
|
287
|
-
onClick:
|
|
288
|
-
className:
|
|
289
|
-
[
|
|
284
|
+
return g ? /* @__PURE__ */ t(ge, _object_spread({}, o)) : /* @__PURE__ */ t(V, {
|
|
285
|
+
className: ne,
|
|
286
|
+
children: /* @__PURE__ */ t(z, {
|
|
287
|
+
children: /* @__PURE__ */ t("div", {
|
|
288
|
+
onClick: M,
|
|
289
|
+
className: E(re, {
|
|
290
|
+
[oe]: a
|
|
290
291
|
}),
|
|
291
292
|
"data-testid": "dialog-overlay",
|
|
292
293
|
"aria-hidden": a || !l,
|
|
293
|
-
children: /* @__PURE__ */
|
|
294
|
+
children: /* @__PURE__ */ t("div", {
|
|
294
295
|
role: "dialog",
|
|
295
|
-
onClick: (
|
|
296
|
+
onClick: (r)=>r.stopPropagation(),
|
|
296
297
|
"data-component-name": "Dialog",
|
|
297
|
-
children: /* @__PURE__ */
|
|
298
|
+
children: /* @__PURE__ */ k("div", {
|
|
298
299
|
ref: s,
|
|
299
|
-
onAnimationEnd: (
|
|
300
|
-
|
|
300
|
+
onAnimationEnd: (r)=>{
|
|
301
|
+
r.target === s.current && (n.current || c(!0));
|
|
301
302
|
},
|
|
302
|
-
onTransitionEnd: (
|
|
303
|
-
|
|
303
|
+
onTransitionEnd: (r)=>{
|
|
304
|
+
r.target === s.current && n.current && w();
|
|
304
305
|
},
|
|
305
|
-
className:
|
|
306
|
-
[
|
|
306
|
+
className: E(ae, {
|
|
307
|
+
[se]: a
|
|
307
308
|
}),
|
|
308
309
|
children: [
|
|
309
|
-
|
|
310
|
-
className:
|
|
311
|
-
children: /* @__PURE__ */
|
|
310
|
+
p && /* @__PURE__ */ t("div", {
|
|
311
|
+
className: ie,
|
|
312
|
+
children: /* @__PURE__ */ t(K, {
|
|
312
313
|
onPress: C,
|
|
313
314
|
"aria-label": u.modalClose || u.closeButtonLabel,
|
|
314
|
-
children: /* @__PURE__ */
|
|
315
|
-
color:
|
|
315
|
+
children: /* @__PURE__ */ t(H, {
|
|
316
|
+
color: L.colors.neutralHigh
|
|
316
317
|
})
|
|
317
318
|
})
|
|
318
319
|
}),
|
|
319
|
-
/* @__PURE__ */
|
|
320
|
+
/* @__PURE__ */ t(me, _object_spread_props(_object_spread({}, O), {
|
|
320
321
|
onCancel: v,
|
|
321
|
-
onAccept:
|
|
322
|
+
onAccept: x
|
|
322
323
|
}))
|
|
323
324
|
]
|
|
324
325
|
})
|
|
@@ -327,4 +328,4 @@ const ue = ()=>process.env.NODE_ENV !== "test" && !Y(), me = (r)=>{
|
|
|
327
328
|
})
|
|
328
329
|
});
|
|
329
330
|
};
|
|
330
|
-
export {
|
|
331
|
+
export { Le as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import "./sprinkles.css.ts.vanilla.css-mistica.js";
|
|
2
2
|
import "./feedback.css.ts.vanilla.css-mistica.js";
|
|
3
|
-
var r = "
|
|
4
|
-
export { r as backgroundBrand, n as container, h as desktopContainer,
|
|
3
|
+
var r = "gx6h6ag", n = "gx6h6a4 _1y2v1nfgi _1y2v1nfhm _1y2v1nfh5 _1y2v1nfgo", h = "gx6h6a0", t = "gx6h6a1", g = "gx6h6a2", v = "gx6h6af", x = "gx6h6a7", o = "gx6h6ac gx6h6ab", i = "gx6h6ad gx6h6ab", d = "gx6h6ae gx6h6ab", f = "_1y2v1nfhh _1y2v1nfhx", p = "gx6h6a5", c = "gx6h6a6";
|
|
4
|
+
export { r as backgroundBrand, n as container, h as desktopContainer, t as desktopContent, g as desktopImage, v as feedbackData, x as feedbackScreenInverse, o as feedbackTextAppearFast, i as feedbackTextAppearMedium, d as feedbackTextAppearSlow, f as iconContainer, p as innerContainer, c as innerContainerWithButtons };
|