@telefonica/mistica 15.16.4 → 15.18.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.
Files changed (114) hide show
  1. package/css/mistica.css +1 -1
  2. package/css/roboto.css +102 -34
  3. package/dist/box.d.ts +1 -0
  4. package/dist/box.js +11 -10
  5. package/dist/callout.d.ts +1 -0
  6. package/dist/callout.js +10 -10
  7. package/dist/card.d.ts +6 -1
  8. package/dist/card.js +375 -365
  9. package/dist/chip.d.ts +1 -0
  10. package/dist/chip.js +25 -26
  11. package/dist/dialog.d.ts +1 -0
  12. package/dist/dialog.js +65 -62
  13. package/dist/feedback.js +58 -52
  14. package/dist/generated/mistica-icons/icon-box-star-filled.d.ts +4 -0
  15. package/dist/generated/mistica-icons/icon-box-star-filled.js +121 -0
  16. package/dist/generated/mistica-icons/icon-box-star-light.d.ts +4 -0
  17. package/dist/generated/mistica-icons/icon-box-star-light.js +117 -0
  18. package/dist/generated/mistica-icons/icon-box-star-regular.d.ts +4 -0
  19. package/dist/generated/mistica-icons/icon-box-star-regular.js +117 -0
  20. package/dist/generated/mistica-icons/icon-high-priority-filled.d.ts +4 -0
  21. package/dist/generated/mistica-icons/icon-high-priority-filled.js +111 -0
  22. package/dist/generated/mistica-icons/icon-high-priority-light.d.ts +4 -0
  23. package/dist/generated/mistica-icons/icon-high-priority-light.js +111 -0
  24. package/dist/generated/mistica-icons/icon-high-priority-regular.d.ts +4 -0
  25. package/dist/generated/mistica-icons/icon-high-priority-regular.js +111 -0
  26. package/dist/generated/mistica-icons/icon-mms-filled.d.ts +4 -0
  27. package/dist/generated/mistica-icons/icon-mms-filled.js +122 -0
  28. package/dist/generated/mistica-icons/icon-mms-light.d.ts +4 -0
  29. package/dist/generated/mistica-icons/icon-mms-light.js +134 -0
  30. package/dist/generated/mistica-icons/icon-mms-regular.d.ts +4 -0
  31. package/dist/generated/mistica-icons/icon-mms-regular.js +134 -0
  32. package/dist/generated/mistica-icons/icon-vivo-valoriza-filled.d.ts +4 -0
  33. package/dist/generated/mistica-icons/icon-vivo-valoriza-filled.js +111 -0
  34. package/dist/generated/mistica-icons/icon-vivo-valoriza-light.d.ts +4 -0
  35. package/dist/generated/mistica-icons/icon-vivo-valoriza-light.js +117 -0
  36. package/dist/generated/mistica-icons/icon-vivo-valoriza-regular.d.ts +4 -0
  37. package/dist/generated/mistica-icons/icon-vivo-valoriza-regular.js +117 -0
  38. package/dist/generated/mistica-icons/icons-keywords.js +31 -0
  39. package/dist/index.d.ts +12 -0
  40. package/dist/index.js +48 -0
  41. package/dist/inline.css-mistica.js +11 -8
  42. package/dist/inline.css.d.ts +1 -0
  43. package/dist/inline.js +12 -12
  44. package/dist/list.d.ts +1 -0
  45. package/dist/list.js +163 -157
  46. package/dist/package-version.js +1 -1
  47. package/dist/popover.d.ts +1 -0
  48. package/dist/popover.js +9 -7
  49. package/dist/select.js +103 -95
  50. package/dist/skins/blau.js +96 -8
  51. package/dist/skins/defaults.js +98 -10
  52. package/dist/skins/movistar.js +94 -6
  53. package/dist/skins/o2-new.js +95 -7
  54. package/dist/skins/o2.js +94 -6
  55. package/dist/skins/skin-contract.css-mistica.js +42 -10
  56. package/dist/skins/skin-contract.css.d.ts +32 -0
  57. package/dist/skins/telefonica.js +96 -8
  58. package/dist/skins/tu.js +94 -6
  59. package/dist/skins/types/index.d.ts +36 -28
  60. package/dist/skins/vivo-new.js +95 -7
  61. package/dist/skins/vivo.js +94 -6
  62. package/dist/snackbar-context.js +23 -22
  63. package/dist/snackbar.d.ts +1 -0
  64. package/dist/snackbar.js +63 -57
  65. package/dist/theme-context-provider.js +91 -63
  66. package/dist/theme-context.css-mistica.js +452 -0
  67. package/dist/theme-context.css.d.ts +432 -0
  68. package/dist/theme-context.css.ts.vanilla.css-mistica.js +11 -0
  69. package/dist/tooltip.d.ts +1 -0
  70. package/dist/tooltip.js +110 -110
  71. package/dist-es/box.js +17 -16
  72. package/dist-es/callout.js +38 -38
  73. package/dist-es/card.js +492 -482
  74. package/dist-es/chip.js +49 -50
  75. package/dist-es/dialog.js +78 -75
  76. package/dist-es/feedback.js +96 -89
  77. package/dist-es/generated/mistica-icons/icon-box-star-filled.js +112 -0
  78. package/dist-es/generated/mistica-icons/icon-box-star-light.js +108 -0
  79. package/dist-es/generated/mistica-icons/icon-box-star-regular.js +108 -0
  80. package/dist-es/generated/mistica-icons/icon-high-priority-filled.js +102 -0
  81. package/dist-es/generated/mistica-icons/icon-high-priority-light.js +102 -0
  82. package/dist-es/generated/mistica-icons/icon-high-priority-regular.js +102 -0
  83. package/dist-es/generated/mistica-icons/icon-mms-filled.js +113 -0
  84. package/dist-es/generated/mistica-icons/icon-mms-light.js +125 -0
  85. package/dist-es/generated/mistica-icons/icon-mms-regular.js +125 -0
  86. package/dist-es/generated/mistica-icons/icon-vivo-valoriza-filled.js +102 -0
  87. package/dist-es/generated/mistica-icons/icon-vivo-valoriza-light.js +108 -0
  88. package/dist-es/generated/mistica-icons/icon-vivo-valoriza-regular.js +108 -0
  89. package/dist-es/generated/mistica-icons/icons-keywords.js +31 -0
  90. package/dist-es/index.js +1563 -1551
  91. package/dist-es/inline.css-mistica.js +3 -3
  92. package/dist-es/inline.js +23 -23
  93. package/dist-es/list.js +225 -219
  94. package/dist-es/package-version.js +1 -1
  95. package/dist-es/popover.js +26 -24
  96. package/dist-es/select.js +146 -138
  97. package/dist-es/skins/blau.js +96 -8
  98. package/dist-es/skins/defaults.js +97 -9
  99. package/dist-es/skins/movistar.js +94 -6
  100. package/dist-es/skins/o2-new.js +95 -7
  101. package/dist-es/skins/o2.js +94 -6
  102. package/dist-es/skins/skin-contract.css-mistica.js +42 -10
  103. package/dist-es/skins/telefonica.js +98 -10
  104. package/dist-es/skins/tu.js +94 -6
  105. package/dist-es/skins/vivo-new.js +95 -7
  106. package/dist-es/skins/vivo.js +94 -6
  107. package/dist-es/snackbar-context.js +25 -24
  108. package/dist-es/snackbar.js +91 -85
  109. package/dist-es/style.css +1 -1
  110. package/dist-es/theme-context-provider.js +133 -105
  111. package/dist-es/theme-context.css-mistica.js +432 -0
  112. package/dist-es/theme-context.css.ts.vanilla.css-mistica.js +2 -0
  113. package/dist-es/tooltip.js +149 -149
  114. package/package.json +2 -3
package/dist-es/chip.js CHANGED
@@ -51,59 +51,60 @@ function _object_spread_props(target, source) {
51
51
  }
52
52
  return target;
53
53
  }
54
- import { jsxs as l, Fragment as x, jsx as t } from "react/jsx-runtime";
55
- import d from "classnames";
56
- import { useTheme as j } from "./hooks.js";
57
- import A from "./badge.js";
58
- import i from "./box.js";
59
- import { Text2 as D } from "./text.js";
60
- import V from "./generated/mistica-icons/icon-close-regular.js";
61
- import { pxToRem as o } from "./utils/css.js";
62
- import { iconActive as z, icon as L, chipVariants as m, chipWrapper as h, button as M, wrappedContent as F, chipInteractiveVariants as W } from "./chip.css-mistica.js";
63
- import { vars as $ } from "./skins/skin-contract.css-mistica.js";
64
- import { getPrefixedDataAttributes as q } from "./utils/dom.js";
54
+ import { jsxs as d, Fragment as C, jsx as t } from "react/jsx-runtime";
55
+ import m from "classnames";
56
+ import { useTheme as P } from "./hooks.js";
57
+ import x from "./badge.js";
58
+ import o from "./box.js";
59
+ import { Text2 as V } from "./text.js";
60
+ import z from "./generated/mistica-icons/icon-close-regular.js";
61
+ import { pxToRem as i } from "./utils/css.js";
62
+ import { iconActive as D, icon as M, chipVariants as h, chipWrapper as u, button as F, wrappedContent as W, chipInteractiveVariants as $ } from "./chip.css-mistica.js";
63
+ import { vars as q } from "./skins/skin-contract.css-mistica.js";
65
64
  import { useThemeVariant as E } from "./theme-variant-context.js";
66
65
  import G, { BaseTouchable as H } from "./touchable.js";
67
66
  const J = (e)=>{
68
- const { Icon: n, children: R, id: T, dataAttributes: p, active: a, badge: r, onClose: s } = e, { texts: k, isDarkMode: I, textPresets: B } = j(), u = E() === "alternative", f = n ? {
67
+ const { Icon: n, children: A, id: R, dataAttributes: T, active: a, badge: r, onClose: s, closeButtonLabel: k } = e, { texts: B, isDarkMode: I, textPresets: w } = P(), p = E() === "alternative", f = n ? {
69
68
  mobile: 16,
70
69
  desktop: 8
71
70
  } : {
72
71
  mobile: 20,
73
72
  desktop: 12
74
- }, w = {
73
+ }, y = {
75
74
  mobile: 20,
76
75
  desktop: 12
77
76
  }, g = {
78
77
  mobile: 16,
79
78
  desktop: 8
80
- }, b = /* @__PURE__ */ l(x, {
79
+ }, b = /* @__PURE__ */ d(C, {
81
80
  children: [
82
- n && /* @__PURE__ */ t(i, {
81
+ n && /* @__PURE__ */ t(o, {
83
82
  paddingRight: 4,
84
- className: a ? z : L,
83
+ className: a ? D : M,
85
84
  children: /* @__PURE__ */ t(n, {
86
85
  color: "currentColor",
87
- size: o(16)
86
+ size: i(16)
88
87
  })
89
88
  }),
90
- /* @__PURE__ */ t(i, {
89
+ /* @__PURE__ */ t(o, {
91
90
  paddingRight: r ? 8 : s ? 4 : 0,
92
- children: /* @__PURE__ */ t(D, {
93
- id: T,
94
- weight: B.indicator.weight,
91
+ children: /* @__PURE__ */ t(V, {
92
+ id: R,
93
+ weight: w.indicator.weight,
95
94
  truncate: 1,
96
95
  color: "currentColor",
97
- children: R
96
+ children: A
98
97
  })
99
98
  })
100
99
  ]
101
- });
102
- if (s) return /* @__PURE__ */ l(i, _object_spread_props(_object_spread({
103
- className: d(u ? m.overAlternative : m.default, h),
100
+ }), c = _object_spread({
101
+ "component-name": "Chip"
102
+ }, T);
103
+ if (s) return /* @__PURE__ */ d(o, {
104
+ className: m(p ? h.overAlternative : h.default, u),
104
105
  paddingLeft: f,
105
- paddingRight: g
106
- }, q(p, "Chip")), {
106
+ paddingRight: g,
107
+ dataAttributes: c,
107
108
  children: [
108
109
  b,
109
110
  /* @__PURE__ */ t(G, {
@@ -111,41 +112,39 @@ const J = (e)=>{
111
112
  display: "flex",
112
113
  justifyContent: "center",
113
114
  alignItems: "center",
114
- width: o(24),
115
- height: o(24)
115
+ width: i(24),
116
+ height: i(24)
116
117
  },
117
- "aria-label": k.closeButtonLabel,
118
+ "aria-label": k !== null && k !== void 0 ? k : B.closeButtonLabel,
118
119
  onPress: ()=>s(),
119
- children: /* @__PURE__ */ t(V, {
120
- size: o(16),
121
- color: $.colors.neutralMedium
120
+ children: /* @__PURE__ */ t(z, {
121
+ size: i(16),
122
+ color: q.colors.neutralMedium
122
123
  })
123
124
  })
124
125
  ]
125
- }));
126
- const c = e.href || e.onPress || e.to, y = a !== void 0 || c, v = _object_spread({
127
- "component-name": "Chip"
128
- }, p), N = ()=>r ? /* @__PURE__ */ t(x, {
129
- children: r === !0 ? /* @__PURE__ */ t(A, {}) : /* @__PURE__ */ t(A, {
126
+ });
127
+ const l = e.href || e.onPress || e.to, N = a !== void 0 || l, j = ()=>r ? /* @__PURE__ */ t(C, {
128
+ children: r === !0 ? /* @__PURE__ */ t(x, {}) : /* @__PURE__ */ t(x, {
130
129
  value: r
131
130
  })
132
- }) : null, C = (P)=>/* @__PURE__ */ l(i, {
133
- className: d(m[a ? "active" : u ? "overAlternative" : "default"], // If the chip is wrapped inside a BaseTouchable, we set inline-flex to the Touchable instead
134
- c ? F : h, {
135
- [W[I ? "dark" : "light"]]: y
131
+ }) : null, v = (L)=>/* @__PURE__ */ d(o, {
132
+ className: m(h[a ? "active" : p ? "overAlternative" : "default"], // If the chip is wrapped inside a BaseTouchable, we set inline-flex to the Touchable instead
133
+ l ? W : u, {
134
+ [$[I ? "dark" : "light"]]: N
136
135
  }),
137
136
  paddingLeft: f,
138
- paddingRight: r ? g : w,
139
- dataAttributes: P,
137
+ paddingRight: r ? g : y,
138
+ dataAttributes: L,
140
139
  children: [
141
140
  b,
142
- N()
141
+ j()
143
142
  ]
144
143
  });
145
- return c ? /* @__PURE__ */ t(H, _object_spread_props(_object_spread({}, e), {
146
- className: d(h, M),
147
- dataAttributes: v,
148
- children: C()
149
- })) : C(v);
144
+ return l ? /* @__PURE__ */ t(H, _object_spread_props(_object_spread({}, e), {
145
+ className: m(u, F),
146
+ dataAttributes: c,
147
+ children: v()
148
+ })) : v(c);
150
149
  }, ot = J;
151
150
  export { ot as default };
package/dist-es/dialog.js CHANGED
@@ -79,7 +79,7 @@ function _object_without_properties_loose(source, excluded) {
79
79
  return target;
80
80
  }
81
81
  import { jsx as e, jsxs as w, Fragment as L } from "react/jsx-runtime";
82
- import * as o from "react";
82
+ import * as n from "react";
83
83
  import E from "classnames";
84
84
  import { ButtonDanger as O, ButtonPrimary as S, ButtonSecondary as M } from "./button.js";
85
85
  import { Portal as _ } from "./portal.js";
@@ -95,32 +95,32 @@ import k from "./box.js";
95
95
  import { isRunningAcceptanceTest as H } from "./utils/platform.js";
96
96
  import { useSetModalStateEffect as J } from "./modal-context-provider.js";
97
97
  import Q from "./stack.js";
98
- import { ANIMATION_DURATION_MS as X, wrapper as Z, modalOpacityLayer as $, closedOpactityLayer as ee, modalContent as te, closedModalContent as oe, modalCloseButtonContainer as ne, variants as ae, iconContainer as re, dialogContent as ie, dialogActions as se } from "./dialog.css-mistica.js";
98
+ import { ANIMATION_DURATION_MS as X, wrapper as Z, modalOpacityLayer as $, closedOpactityLayer as ee, modalContent as te, closedModalContent as ne, modalCloseButtonContainer as oe, variants as ae, iconContainer as re, dialogContent as ie, dialogActions as se } from "./dialog.css-mistica.js";
99
99
  import { vars as le } from "./skins/skin-contract.css-mistica.js";
100
- const ce = ()=>process.env.NODE_ENV !== "test" && !H(), de = (t)=>{
101
- const { texts: i } = D(), { className: d, title: r, message: m, icon: n, extra: c, showCancelButton: s, showAcceptButton: l, cancelText: f = i.dialogCancelButton, acceptText: b = i.dialogAcceptButton, onCancel: g, onAccept: v, destructive: B = !1 } = t, u = t.type === "dialog", h = u && !!t.link || l || s, C = {
102
- onPress: v || (()=>{}),
103
- children: b,
100
+ const ce = ()=>process.env.NODE_ENV !== "test" && !H(), ue = (t)=>{
101
+ const { texts: i } = D(), { className: u, title: r, message: f, icon: o, extra: c, showCancelButton: s, showAcceptButton: l, cancelText: g = i.dialogCancelButton, acceptText: m = i.dialogAcceptButton, onCancel: h, onAccept: C, destructive: B = !1 } = t, d = t.type === "dialog", p = d && !!t.link || l || s, y = {
102
+ onPress: C || (()=>{}),
103
+ children: m,
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
109
  return /* @__PURE__ */ w("div", {
110
- className: E(ae[u ? "dialog" : "default"], d),
110
+ className: E(ae[d ? "dialog" : "default"], u),
111
111
  children: [
112
- n && /* @__PURE__ */ e(k, {
112
+ o && /* @__PURE__ */ e(k, {
113
113
  paddingBottom: 24,
114
114
  children: /* @__PURE__ */ e("div", {
115
115
  className: re,
116
- children: /*#__PURE__*/ o.cloneElement(n, {
116
+ children: /*#__PURE__*/ n.cloneElement(o, {
117
117
  size: "100%"
118
118
  })
119
119
  })
120
120
  }),
121
121
  r && /* @__PURE__ */ e(k, {
122
122
  paddingBottom: 16,
123
- children: u ? /* @__PURE__ */ e(Y, {
123
+ children: d ? /* @__PURE__ */ e(Y, {
124
124
  as: "h2",
125
125
  children: r
126
126
  }) : /* @__PURE__ */ e(A, {
@@ -145,134 +145,137 @@ const ce = ()=>process.env.NODE_ENV !== "test" && !H(), de = (t)=>{
145
145
  /* @__PURE__ */ e(q, {
146
146
  color: le.colors.textSecondary,
147
147
  regular: !0,
148
- children: m
148
+ children: f
149
149
  }),
150
150
  c
151
151
  ]
152
152
  })
153
153
  }),
154
- h && /* @__PURE__ */ e("div", {
154
+ p && /* @__PURE__ */ e("div", {
155
155
  className: se,
156
156
  children: /* @__PURE__ */ e(U, {
157
- link: u ? t.link : void 0,
157
+ link: d ? t.link : void 0,
158
158
  primaryButton: l ? B ? /* @__PURE__ */ e(O, _object_spread({
159
159
  tabIndex: 1
160
- }, C)) : /* @__PURE__ */ e(S, _object_spread({
160
+ }, y)) : /* @__PURE__ */ e(S, _object_spread({
161
161
  tabIndex: 1
162
- }, C)) : void 0,
162
+ }, y)) : void 0,
163
163
  secondaryButton: s ? /* @__PURE__ */ e(M, {
164
164
  tabIndex: 2,
165
- onPress: g || (()=>{}),
165
+ onPress: h || (()=>{}),
166
166
  dataAttributes: {
167
167
  testid: "dialog-cancel-button"
168
168
  },
169
- children: f
169
+ children: g
170
170
  }) : void 0
171
171
  })
172
172
  })
173
173
  ]
174
174
  });
175
- }, ue = (param)=>{
176
- let { type: t, message: i, title: d, acceptText: r, cancelText: m, onAccept: n, onCancel: c, onDestroy: s } = param;
175
+ }, de = (param)=>{
176
+ let { type: t, message: i, title: u, acceptText: r, cancelText: f, onAccept: o, onCancel: c, onDestroy: s } = param;
177
177
  return t === "confirm" ? z({
178
178
  message: i,
179
- title: d,
180
- cancelText: m,
179
+ title: u,
180
+ cancelText: f,
181
181
  acceptText: r
182
182
  }).then((l)=>{
183
- l ? n == null || n() : c == null || c(), s();
183
+ l ? o == null || o() : c == null || c(), s();
184
184
  }) : K({
185
185
  message: i,
186
- title: d,
186
+ title: u,
187
187
  buttonText: r
188
188
  }).then(()=>{
189
- n == null || n(), s();
189
+ o == null || o(), s();
190
190
  });
191
191
  }, me = (param)=>{
192
- let { type: t, onAccept: i, onCancel: d, onDestroy: r, acceptText: m, cancelText: n, message: c, title: s } = param;
193
- const { texts: l } = D(), f = o.useRef({
192
+ let { type: t, onAccept: i, onCancel: u, onDestroy: r, acceptText: f, cancelText: o, message: c, title: s } = param;
193
+ const { texts: l } = D(), g = n.useRef({
194
194
  type: t,
195
195
  onAccept: i,
196
- onCancel: d,
196
+ onCancel: u,
197
197
  onDestroy: r,
198
- acceptText: m || l.dialogAcceptButton,
199
- cancelText: n || l.dialogCancelButton,
198
+ acceptText: f || l.dialogAcceptButton,
199
+ cancelText: o || l.dialogCancelButton,
200
200
  message: c,
201
201
  title: s
202
- });
203
- return o.useEffect(()=>{
204
- ue(f.current);
202
+ }), m = n.useRef(!1);
203
+ return n.useEffect(()=>{
204
+ m.current || (m.current = !0, de(g.current).finally(()=>{
205
+ m.current = !1;
206
+ }));
205
207
  }, []), /* @__PURE__ */ e(L, {});
206
208
  }, Ie = (t)=>{
207
209
  J();
208
- const i = o.useRef(null), { texts: d } = D(), [r, m] = o.useState(!1), n = o.useRef(!1), c = o.useRef(!1), [s, l] = o.useState(!1), f = o.useRef(!1), b = o.useRef(ce() ? X : 0), g = t.type !== "dialog" && W(), v = t.type === "dialog", B = t.type === "alert", { onAccept: u, onCancel: h, onDestroy: C } = t, I = _object_without_properties(t, [
210
+ const i = n.useRef(null), { texts: u } = D(), [r, f] = n.useState(!1), o = n.useRef(!1), c = n.useRef(!1), [s, l] = n.useState(!1), g = n.useRef(!1), m = n.useRef(ce() ? X : 0), h = t.type !== "dialog" && W(), C = t.type === "dialog", B = t.type === "alert", { onAccept: d, onCancel: p, onDestroy: y } = t, I = _object_without_properties(t, [
209
211
  "onAccept",
210
212
  "onCancel",
211
213
  "onDestroy"
212
214
  ]);
213
- o.useEffect(()=>{
215
+ n.useEffect(()=>{
214
216
  const a = setTimeout(()=>{
215
- n.current || l(!0);
216
- }, b.current);
217
+ o.current || l(!0);
218
+ }, m.current);
217
219
  return ()=>{
218
220
  clearTimeout(a);
219
221
  };
220
222
  }, []);
221
- const x = o.useCallback(()=>{
222
- c.current || (c.current = !0, f.current ? u == null || u() : h == null || h(), C());
223
+ const x = n.useCallback(()=>{
224
+ c.current || (c.current = !0, g.current ? d == null || d() : p == null || p(), y());
223
225
  }, [
224
- u,
225
- h,
226
- C
227
- ]), R = o.useCallback(()=>{
226
+ d,
227
+ p,
228
+ y
229
+ ]), R = n.useCallback(()=>{
228
230
  let a;
229
- return !n.current && s && (n.current = !0, l(!1), m(!0), a = setTimeout(x, b.current)), ()=>{
231
+ return !o.current && s && (o.current = !0, l(!1), f(!0), a = setTimeout(x, m.current)), ()=>{
230
232
  a && clearTimeout(a);
231
233
  };
232
234
  }, [
233
235
  x,
234
236
  s
235
- ]), N = o.useCallback(()=>{
236
- f.current = !0, R();
237
+ ]), N = n.useCallback(()=>{
238
+ g.current = !0, R();
237
239
  }, [
238
240
  R
239
- ]), y = o.useCallback(()=>{
240
- f.current = !1, R();
241
+ ]), b = n.useCallback(()=>{
242
+ g.current = !1, R();
241
243
  }, [
242
244
  R
243
- ]), p = o.useCallback(()=>{
244
- n.current || (B ? N() : y());
245
+ ]), v = n.useCallback(()=>{
246
+ o.current || (B ? N() : b());
245
247
  }, [
246
248
  N,
247
- y,
249
+ b,
248
250
  B
249
- ]), T = o.useCallback((a)=>{
250
- a.key === G && (a.stopPropagation(), a.preventDefault(), p());
251
+ ]), T = n.useCallback((a)=>{
252
+ a.key === G && (a.stopPropagation(), a.preventDefault(), v());
251
253
  }, [
252
- p
254
+ v
253
255
  ]);
254
- o.useEffect(()=>{
255
- if (!g) return document.addEventListener("keydown", T), ()=>{
256
+ n.useEffect(()=>{
257
+ if (!h) return document.addEventListener("keydown", T), ()=>{
256
258
  document.removeEventListener("keydown", T);
257
259
  };
258
260
  }, [
259
261
  T,
260
- g
261
- ]), o.useEffect(()=>{
262
- if (!g) return window.addEventListener("popstate", p), ()=>{
263
- window.removeEventListener("popstate", p);
262
+ h
263
+ ]), n.useEffect(()=>{
264
+ if (!h) return window.addEventListener("popstate", v), ()=>{
265
+ window.removeEventListener("popstate", v);
264
266
  };
265
267
  }, [
266
- p,
267
- g
268
+ v,
269
+ h
268
270
  ]);
269
- const P = o.useCallback((a)=>{
270
- a.stopPropagation(), v && y();
271
+ const P = n.useCallback((a)=>{
272
+ a.stopPropagation(), C && b();
271
273
  }, [
272
- v,
273
- y
274
+ C,
275
+ b
274
276
  ]);
275
- return g ? /* @__PURE__ */ e(me, _object_spread({}, t)) : /* @__PURE__ */ e(_, {
277
+ var _t_closeButtonLabel;
278
+ return h ? /* @__PURE__ */ e(me, _object_spread({}, t)) : /* @__PURE__ */ e(_, {
276
279
  className: Z,
277
280
  children: /* @__PURE__ */ e(j, {
278
281
  children: /* @__PURE__ */ e("div", {
@@ -289,30 +292,30 @@ const ce = ()=>process.env.NODE_ENV !== "test" && !H(), de = (t)=>{
289
292
  children: /* @__PURE__ */ w("div", {
290
293
  ref: i,
291
294
  onAnimationEnd: (a)=>{
292
- a.target === i.current && (n.current || l(!0));
295
+ a.target === i.current && (o.current || l(!0));
293
296
  },
294
297
  onTransitionEnd: (a)=>{
295
- a.target === i.current && n.current && x();
298
+ a.target === i.current && o.current && x();
296
299
  },
297
300
  className: E(te, {
298
- [oe]: r
301
+ [ne]: r
299
302
  }),
300
303
  children: [
301
- v && /* @__PURE__ */ e("div", {
302
- className: ne,
304
+ C && /* @__PURE__ */ e("div", {
305
+ className: oe,
303
306
  children: /* @__PURE__ */ e(V, {
304
- onPress: p,
305
- "aria-label": d.modalClose || d.closeButtonLabel,
307
+ onPress: v,
308
+ "aria-label": (_t_closeButtonLabel = t.closeButtonLabel) !== null && _t_closeButtonLabel !== void 0 ? _t_closeButtonLabel : u.modalClose || u.closeButtonLabel,
306
309
  bleedLeft: !0,
307
310
  bleedRight: !0,
308
311
  bleedY: !0,
309
312
  Icon: F
310
313
  })
311
314
  }),
312
- /* @__PURE__ */ e(de, _object_spread_props(_object_spread({}, I), {
315
+ /* @__PURE__ */ e(ue, _object_spread_props(_object_spread({}, I), {
313
316
  showAcceptButton: t.type !== "dialog" || !!t.onAccept,
314
317
  showCancelButton: t.type === "confirm" || t.type === "dialog" && !!t.onCancel,
315
- onCancel: y,
318
+ onCancel: b,
316
319
  onAccept: N
317
320
  }))
318
321
  ]