@telefonica/mistica 16.0.0 → 16.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.
Files changed (152) hide show
  1. package/README.md +11 -9
  2. package/css/mistica.css +1 -1
  3. package/dist/box.d.ts +1 -0
  4. package/dist/box.js +12 -12
  5. package/dist/card.d.ts +14 -2
  6. package/dist/card.js +210 -206
  7. package/dist/credit-card-expiration-field.d.ts +1 -1
  8. package/dist/credit-card-expiration-field.js +53 -52
  9. package/dist/credit-card-number-field.d.ts +1 -1
  10. package/dist/credit-card-number-field.js +47 -45
  11. package/dist/cvv-field.d.ts +1 -1
  12. package/dist/cvv-field.js +38 -37
  13. package/dist/date-field.d.ts +1 -1
  14. package/dist/date-field.js +15 -13
  15. package/dist/date-time-field.d.ts +1 -1
  16. package/dist/date-time-field.js +13 -11
  17. package/dist/decimal-field.d.ts +1 -1
  18. package/dist/decimal-field.js +39 -38
  19. package/dist/email-field.d.ts +1 -1
  20. package/dist/email-field.js +21 -19
  21. package/dist/form-context.d.ts +7 -2
  22. package/dist/form-context.js +69 -62
  23. package/dist/form.d.ts +2 -1
  24. package/dist/form.js +94 -80
  25. package/dist/iban-field.d.ts +1 -1
  26. package/dist/iban-field.js +32 -30
  27. package/dist/index.d.ts +12 -3
  28. package/dist/index.js +19 -8
  29. package/dist/inline.d.ts +2 -1
  30. package/dist/inline.js +16 -15
  31. package/dist/integer-field.d.ts +1 -1
  32. package/dist/integer-field.js +30 -30
  33. package/dist/month-field.d.ts +1 -1
  34. package/dist/month-field.js +15 -13
  35. package/dist/package-version.js +1 -1
  36. package/dist/password-field.d.ts +1 -1
  37. package/dist/password-field.js +24 -22
  38. package/dist/phone-number-field.d.ts +4 -1
  39. package/dist/phone-number-field.js +84 -52
  40. package/dist/pin-field.js +21 -20
  41. package/dist/radio-button.d.ts +1 -0
  42. package/dist/radio-button.js +42 -41
  43. package/dist/rating.css-mistica.js +44 -0
  44. package/dist/rating.css.d.ts +11 -0
  45. package/dist/rating.css.ts.vanilla.css-mistica.js +11 -0
  46. package/dist/rating.d.ts +37 -0
  47. package/dist/rating.js +320 -0
  48. package/dist/search-field.d.ts +1 -0
  49. package/dist/search-field.js +18 -16
  50. package/dist/select.js +36 -33
  51. package/dist/sheet-action-row.css-mistica.js +13 -0
  52. package/dist/sheet-action-row.css.d.ts +1 -0
  53. package/dist/sheet-actions-list.d.ts +26 -0
  54. package/dist/sheet-actions-list.js +147 -0
  55. package/dist/sheet-actions.d.ts +23 -0
  56. package/dist/sheet-actions.js +175 -0
  57. package/dist/{sheet.css-mistica.js → sheet-common.css-mistica.js} +15 -21
  58. package/dist/{sheet.css.d.ts → sheet-common.css.d.ts} +0 -2
  59. package/dist/sheet-common.css.ts.vanilla.css-mistica.js +11 -0
  60. package/dist/sheet-common.d.ts +24 -0
  61. package/dist/sheet-common.js +429 -0
  62. package/dist/sheet-info.css-mistica.js +12 -0
  63. package/dist/sheet-info.css.d.ts +1 -0
  64. package/dist/sheet-info.d.ts +28 -0
  65. package/dist/sheet-info.js +156 -0
  66. package/dist/sheet-native.d.ts +2 -0
  67. package/dist/sheet-native.js +173 -0
  68. package/dist/sheet-radio-list.d.ts +22 -0
  69. package/dist/sheet-radio-list.js +143 -0
  70. package/dist/sheet-root.d.ts +4 -85
  71. package/dist/sheet-root.js +48 -322
  72. package/dist/sheet-types.d.ts +88 -0
  73. package/dist/sheet-web.d.ts +8 -0
  74. package/dist/sheet-web.js +183 -0
  75. package/dist/slider.js +40 -39
  76. package/dist/switch-component.js +18 -17
  77. package/dist/text-field-base.d.ts +3 -1
  78. package/dist/text-field-base.js +74 -66
  79. package/dist/text-field-components.css-mistica.js +14 -14
  80. package/dist/text-field-components.css.d.ts +2 -2
  81. package/dist/text-field-components.js +49 -39
  82. package/dist/text-field.d.ts +1 -0
  83. package/dist/text-field.js +24 -22
  84. package/dist/text-tokens.d.ts +14 -0
  85. package/dist/text-tokens.js +145 -89
  86. package/dist/theme-context-provider.js +6 -5
  87. package/dist/theme.d.ts +2 -0
  88. package/dist/utils/credit-card.d.ts +2 -2
  89. package/dist/utils/credit-card.js +1 -1
  90. package/dist/vivinho-loading-animation/in-lottie.json.js +544 -612
  91. package/dist/vivinho-loading-animation/out-lottie.json.js +828 -896
  92. package/dist/vivinho-loading-animation/pulse-lottie.json.js +798 -866
  93. package/dist/vivinho-loading-animation/wave-lottie.json.js +4303 -4409
  94. package/dist-es/box.js +18 -18
  95. package/dist-es/card.js +305 -301
  96. package/dist-es/credit-card-expiration-field.js +57 -56
  97. package/dist-es/credit-card-number-field.js +74 -72
  98. package/dist-es/cvv-field.js +82 -81
  99. package/dist-es/date-field.js +29 -27
  100. package/dist-es/date-time-field.js +29 -27
  101. package/dist-es/decimal-field.js +46 -45
  102. package/dist-es/email-field.js +26 -24
  103. package/dist-es/form-context.js +70 -63
  104. package/dist-es/form.js +102 -88
  105. package/dist-es/iban-field.js +35 -33
  106. package/dist-es/index.js +1822 -1817
  107. package/dist-es/inline.js +26 -25
  108. package/dist-es/integer-field.js +31 -31
  109. package/dist-es/month-field.js +28 -26
  110. package/dist-es/package-version.js +1 -1
  111. package/dist-es/password-field.js +37 -35
  112. package/dist-es/phone-number-field.js +92 -60
  113. package/dist-es/pin-field.js +32 -31
  114. package/dist-es/radio-button.js +42 -41
  115. package/dist-es/rating.css-mistica.js +6 -0
  116. package/dist-es/rating.css.ts.vanilla.css-mistica.js +2 -0
  117. package/dist-es/rating.js +257 -0
  118. package/dist-es/search-field.js +33 -31
  119. package/dist-es/select.js +49 -46
  120. package/dist-es/sheet-action-row.css-mistica.js +4 -0
  121. package/dist-es/sheet-actions-list.js +92 -0
  122. package/dist-es/sheet-actions.js +125 -0
  123. package/dist-es/sheet-common.css-mistica.js +4 -0
  124. package/dist-es/sheet-common.css.ts.vanilla.css-mistica.js +2 -0
  125. package/dist-es/sheet-common.js +366 -0
  126. package/dist-es/sheet-info.css-mistica.js +3 -0
  127. package/dist-es/sheet-info.js +101 -0
  128. package/dist-es/sheet-native.js +164 -0
  129. package/dist-es/sheet-radio-list.js +88 -0
  130. package/dist-es/sheet-root.js +50 -319
  131. package/dist-es/sheet-web.js +128 -0
  132. package/dist-es/slider.js +49 -48
  133. package/dist-es/style.css +1 -1
  134. package/dist-es/switch-component.js +27 -26
  135. package/dist-es/text-field-base.js +108 -100
  136. package/dist-es/text-field-components.css-mistica.js +2 -2
  137. package/dist-es/text-field-components.js +70 -60
  138. package/dist-es/text-field.js +33 -31
  139. package/dist-es/text-tokens.js +80 -45
  140. package/dist-es/theme-context-provider.js +20 -19
  141. package/dist-es/utils/credit-card.js +1 -1
  142. package/dist-es/vivinho-loading-animation/in-lottie.json.js +534 -599
  143. package/dist-es/vivinho-loading-animation/out-lottie.json.js +821 -886
  144. package/dist-es/vivinho-loading-animation/pulse-lottie.json.js +790 -855
  145. package/dist-es/vivinho-loading-animation/wave-lottie.json.js +4297 -4400
  146. package/package.json +4 -3
  147. package/dist/sheet.d.ts +0 -107
  148. package/dist/sheet.js +0 -642
  149. package/dist-es/sheet.css-mistica.js +0 -4
  150. package/dist-es/sheet.js +0 -567
  151. /package/dist/{sheet.css.ts.vanilla.css-mistica.js → sheet-action-row.css.ts.vanilla.css-mistica.js} +0 -0
  152. /package/dist-es/{sheet.css.ts.vanilla.css-mistica.js → sheet-action-row.css.ts.vanilla.css-mistica.js} +0 -0
package/dist-es/sheet.js DELETED
@@ -1,567 +0,0 @@
1
- "use client";
2
- function _define_property(obj, key, value) {
3
- if (key in obj) {
4
- Object.defineProperty(obj, key, {
5
- value: value,
6
- enumerable: true,
7
- configurable: true,
8
- writable: true
9
- });
10
- } else {
11
- obj[key] = value;
12
- }
13
- return obj;
14
- }
15
- function _object_spread(target) {
16
- for(var i = 1; i < arguments.length; i++){
17
- var source = arguments[i] != null ? arguments[i] : {};
18
- var ownKeys = Object.keys(source);
19
- if (typeof Object.getOwnPropertySymbols === "function") {
20
- ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
21
- return Object.getOwnPropertyDescriptor(source, sym).enumerable;
22
- }));
23
- }
24
- ownKeys.forEach(function(key) {
25
- _define_property(target, key, source[key]);
26
- });
27
- }
28
- return target;
29
- }
30
- function ownKeys(object, enumerableOnly) {
31
- var keys = Object.keys(object);
32
- if (Object.getOwnPropertySymbols) {
33
- var symbols = Object.getOwnPropertySymbols(object);
34
- if (enumerableOnly) {
35
- symbols = symbols.filter(function(sym) {
36
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
37
- });
38
- }
39
- keys.push.apply(keys, symbols);
40
- }
41
- return keys;
42
- }
43
- function _object_spread_props(target, source) {
44
- source = source != null ? source : {};
45
- if (Object.getOwnPropertyDescriptors) {
46
- Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
47
- } else {
48
- ownKeys(Object(source)).forEach(function(key) {
49
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
50
- });
51
- }
52
- return target;
53
- }
54
- function _object_without_properties(source, excluded) {
55
- if (source == null) return {};
56
- var target = _object_without_properties_loose(source, excluded);
57
- var key, i;
58
- if (Object.getOwnPropertySymbols) {
59
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
60
- for(i = 0; i < sourceSymbolKeys.length; i++){
61
- key = sourceSymbolKeys[i];
62
- if (excluded.indexOf(key) >= 0) continue;
63
- if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
64
- target[key] = source[key];
65
- }
66
- }
67
- return target;
68
- }
69
- function _object_without_properties_loose(source, excluded) {
70
- if (source == null) return {};
71
- var target = {};
72
- var sourceKeys = Object.keys(source);
73
- var key, i;
74
- for(i = 0; i < sourceKeys.length; i++){
75
- key = sourceKeys[i];
76
- if (excluded.indexOf(key) >= 0) continue;
77
- target[key] = source[key];
78
- }
79
- return target;
80
- }
81
- import { jsx as e, jsxs as R, Fragment as z } from "react/jsx-runtime";
82
- import N from "classnames";
83
- import * as n from "react";
84
- import { transitionDuration as G, overlay as H, closingOverlay as V, SheetContainer as j, closingSheet as F, Sheet as K, SheetContent as $, handleContainer as X, handle as q, children as J, modalCloseButton as Q, stickyTitle as U, bodyContent as W, stickyButtons as Z, sheetActionRow as ee, infoItemIcon as te } from "./sheet.css-mistica.js";
85
- import re from "./focus-trap.js";
86
- import { useTheme as b, useDisableBodyScroll as ne, useIsInViewport as x, useScreenSize as M } from "./hooks.js";
87
- import { useSetModalStateEffect as oe } from "./modal-context-provider.js";
88
- import { Portal as ie } from "./portal.js";
89
- import { Text5 as se, Text3 as L, Text2 as B } from "./text.js";
90
- import { vars as D } from "./skins/skin-contract.css-mistica.js";
91
- import { RadioGroup as ce } from "./radio-button.js";
92
- import { RowList as ae, Row as le } from "./list.js";
93
- import Y from "./negative-box.js";
94
- import I from "./stack.js";
95
- import y from "./box.js";
96
- import de from "./touchable.js";
97
- import ue from "./inline.js";
98
- import me from "./circle.js";
99
- import C from "./divider.js";
100
- import { getPrefixedDataAttributes as he, getScrollableParentElement as fe } from "./utils/dom.js";
101
- import { ButtonPrimary as _, ButtonSecondary as pe, ButtonLink as ge } from "./button.js";
102
- import ve from "./generated/mistica-icons/icon-close-regular.js";
103
- import { InternalIconButton as Re } from "./icon-button.js";
104
- import Se from "./button-layout.js";
105
- import O from "./image.js";
106
- import { safeAreaInsetBottom as De } from "./utils/css.js";
107
- import { MOBILE_SIDE_MARGIN as ye, TABLET_SIDE_MARGIN as Ee, SMALL_DESKTOP_SIDE_MARGIN as Ie } from "./responsive-layout.css-mistica.js";
108
- import { modalClose as be, sheetConfirmButton as Te } from "./text-tokens.js";
109
- const ke = process.env.NODE_ENV === "test" ? 0 : G, P = (o)=>"touches" in o ? o.touches[0].clientY : o.clientY, Be = (param)=>{
110
- let { closeModal: o } = param;
111
- const [i, l] = n.useState(0), f = n.useRef(!1), p = n.useRef(0), h = n.useRef(0), t = n.useRef(0), c = n.useRef(0), { isDesktopOrBigger: u } = M(), r = n.useCallback((s)=>{
112
- f.current = !0, p.current = 0, h.current = Date.now(), t.current = P(s);
113
- }, []), m = n.useCallback(()=>{
114
- f.current = !1, l(0);
115
- }, []);
116
- return n.useEffect(()=>{
117
- if (u) return;
118
- const s = (a)=>{
119
- if (f.current) {
120
- if (p.current < 3) {
121
- p.current++;
122
- return;
123
- }
124
- c.current = P(a), l(c.current - t.current);
125
- }
126
- }, d = ()=>{
127
- if (!f.current) return;
128
- const a = Date.now() - h.current, g = c.current - t.current, v = g / a;
129
- f.current = !1, l(0), g > 50 && (c.current > window.innerHeight * 0.75 || v > 0.5) && o();
130
- };
131
- return document.addEventListener("touchmove", s), document.addEventListener("touchend", d), document.addEventListener("mousemove", s), document.addEventListener("mouseup", d), ()=>{
132
- document.removeEventListener("touchmove", s), document.removeEventListener("touchend", d), document.removeEventListener("mousemove", s), document.removeEventListener("mouseup", d);
133
- };
134
- }, [
135
- o,
136
- u
137
- ]), u ? {} : {
138
- onTouchStart: r,
139
- onMouseDown: r,
140
- style: i ? {
141
- transform: `translateY(${i}px)`,
142
- transition: "none"
143
- } : void 0,
144
- onScroll: m,
145
- overlayStyle: i ? {
146
- // decrease opacity when dragging down the sheet
147
- opacity: 0.25 + 1 - i / (window.innerHeight - t.current),
148
- transition: "none"
149
- } : void 0
150
- };
151
- }, Le = {
152
- closed: {
153
- open: "opening"
154
- },
155
- opening: {
156
- close: "closed",
157
- transitionEnd: "open"
158
- },
159
- open: {
160
- close: "closing"
161
- },
162
- closing: {
163
- transitionEnd: "closed"
164
- }
165
- }, we = (o, i)=>Le[o][i] || o, E = /*#__PURE__*/ n.forwardRef((param, f)=>{
166
- let { onClose: o, children: i, dataAttributes: l } = param;
167
- const { texts: p, t: h } = b(), [t, c] = n.useReducer(we, "closed"), u = n.useRef(!1), r = n.useId(), m = n.useCallback((v)=>{
168
- v.target === v.currentTarget && c("transitionEnd");
169
- }, []), s = ()=>{
170
- t === "open" && c("close");
171
- };
172
- n.useEffect(()=>{
173
- if (t === "opening" || t === "closing") {
174
- const v = setTimeout(()=>{
175
- c("transitionEnd");
176
- }, ke);
177
- return ()=>clearTimeout(v);
178
- }
179
- }, [
180
- t
181
- ]), n.useEffect(()=>{
182
- t === "closed" ? u.current ? o == null || o() : c("open") : u.current = !0;
183
- }, [
184
- t,
185
- o
186
- ]);
187
- const _Be = Be({
188
- closeModal: s
189
- }), { onScroll: d, overlayStyle: a } = _Be, g = _object_without_properties(_Be, [
190
- "onScroll",
191
- "overlayStyle"
192
- ]);
193
- return oe(), ne(t !== "closed"), t === "closed" ? null : /* @__PURE__ */ e(ie, {
194
- children: /* @__PURE__ */ R(re, {
195
- children: [
196
- /* @__PURE__ */ e("div", {
197
- className: N(H, {
198
- [V]: t === "closing"
199
- }),
200
- style: a,
201
- onClick: s
202
- }),
203
- /* @__PURE__ */ e("div", _object_spread_props(_object_spread({
204
- className: N(j, {
205
- [F]: t === "closing"
206
- }),
207
- onTransitionEnd: m,
208
- onAnimationEnd: m
209
- }, g, he(l, "Sheet")), {
210
- ref: f,
211
- children: /* @__PURE__ */ e("div", {
212
- className: K,
213
- children: /* @__PURE__ */ R("div", {
214
- className: $,
215
- children: [
216
- /* @__PURE__ */ e("div", {
217
- className: X,
218
- children: /* @__PURE__ */ e("div", {
219
- className: q
220
- })
221
- }),
222
- /* @__PURE__ */ R("section", {
223
- role: "dialog",
224
- "aria-modal": "true",
225
- "aria-labelledby": r,
226
- onScroll: d,
227
- className: J,
228
- style: {
229
- paddingBottom: De
230
- },
231
- children: [
232
- typeof i == "function" ? i({
233
- closeModal: s,
234
- modalTitleId: r
235
- }) : i,
236
- /* @__PURE__ */ e("div", {
237
- className: Q,
238
- children: /* @__PURE__ */ e(Re, {
239
- onPress: s,
240
- "aria-label": p.modalClose || h(be),
241
- Icon: ve,
242
- bleedLeft: !0,
243
- bleedRight: !0,
244
- bleedY: !0
245
- })
246
- })
247
- ]
248
- })
249
- ]
250
- })
251
- })
252
- }))
253
- ]
254
- })
255
- });
256
- }), k = {
257
- mobile: ye,
258
- tablet: Ee,
259
- desktop: Ie
260
- }, T = (param)=>{
261
- let { title: o, subtitle: i, description: l, modalTitleId: f, button: p, secondaryButton: h, link: t, children: c } = param;
262
- const u = n.useRef(null), r = n.useRef(null), m = n.useRef(null);
263
- n.useEffect(()=>{
264
- r.current && (m.current = fe(r.current));
265
- }, []);
266
- const s = !x(u, !0, {
267
- root: m.current
268
- }), d = !x(r, !0, {
269
- rootMargin: "1px",
270
- // bottomScrollSignal div has 0px height so we need a 1px margin to trigger the intersection observer
271
- root: m.current
272
- }), a = !!p || !!h || !!t;
273
- return /* @__PURE__ */ R(z, {
274
- children: [
275
- /* @__PURE__ */ e("div", {
276
- ref: u
277
- }),
278
- /* @__PURE__ */ R("div", {
279
- className: U,
280
- children: [
281
- o ? /* @__PURE__ */ e(y, {
282
- paddingBottom: 8,
283
- paddingTop: {
284
- mobile: 0,
285
- desktop: 40
286
- },
287
- paddingX: k,
288
- children: /* @__PURE__ */ e(se, {
289
- as: "h2",
290
- id: f,
291
- truncate: !0,
292
- children: o
293
- })
294
- }) : /* @__PURE__ */ e(y, {
295
- paddingTop: {
296
- mobile: 0,
297
- desktop: 40
298
- }
299
- }),
300
- s && /* @__PURE__ */ e(C, {})
301
- ]
302
- }),
303
- /* @__PURE__ */ e("div", {
304
- className: W,
305
- children: /* @__PURE__ */ e(y, {
306
- paddingBottom: a ? 0 : {
307
- desktop: 40,
308
- mobile: 0
309
- },
310
- paddingX: k,
311
- children: /* @__PURE__ */ R(I, {
312
- space: 8,
313
- children: [
314
- i || l ? /* @__PURE__ */ R(I, {
315
- space: {
316
- mobile: 8,
317
- desktop: 16
318
- },
319
- children: [
320
- i && /* @__PURE__ */ e(L, {
321
- as: "p",
322
- regular: !0,
323
- children: i
324
- }),
325
- l && (Array.isArray(l) ? /* @__PURE__ */ e(B, {
326
- as: "div",
327
- regular: !0,
328
- color: D.colors.textSecondary,
329
- children: l.map((g, v)=>/* @__PURE__ */ e("p", {
330
- style: {
331
- margin: 0,
332
- marginBottom: v < l.length - 1 ? "1em" : void 0
333
- },
334
- children: g
335
- }, v))
336
- }) : /* @__PURE__ */ e(B, {
337
- as: "p",
338
- regular: !0,
339
- color: D.colors.textSecondary,
340
- children: l
341
- }))
342
- ]
343
- }) : null,
344
- c
345
- ]
346
- })
347
- })
348
- }),
349
- a && /* @__PURE__ */ R("div", {
350
- className: Z,
351
- children: [
352
- d && /* @__PURE__ */ e(C, {}),
353
- /* @__PURE__ */ e(y, {
354
- paddingY: {
355
- mobile: 16,
356
- desktop: 40
357
- },
358
- paddingX: k,
359
- children: /* @__PURE__ */ e(Se, {
360
- align: "full-width",
361
- link: t,
362
- primaryButton: p,
363
- secondaryButton: h
364
- })
365
- })
366
- ]
367
- }),
368
- /* @__PURE__ */ e("div", {
369
- ref: r
370
- })
371
- ]
372
- });
373
- }, nt = /*#__PURE__*/ n.forwardRef((param, r)=>{
374
- let { title: o, subtitle: i, description: l, items: f, selectedId: p, onClose: h, onSelect: t, button: c, dataAttributes: u } = param;
375
- const [m, s] = n.useState(p), d = n.useRef(!1), { isDesktopOrBigger: a } = M(), { texts: g, t: v } = b();
376
- return /* @__PURE__ */ e(E, {
377
- onClose: h,
378
- ref: r,
379
- dataAttributes: _object_spread({
380
- "component-name": "RadioListSheet"
381
- }, u),
382
- children: (param)=>{
383
- let { closeModal: w, modalTitleId: A } = param;
384
- return /* @__PURE__ */ e(T, {
385
- title: o,
386
- subtitle: i,
387
- description: l,
388
- modalTitleId: A,
389
- button: a ? /* @__PURE__ */ e(_, {
390
- onPress: ()=>{
391
- d.current && (t == null || t(m || "")), w();
392
- },
393
- children: (c == null ? void 0 : c.text) || g.sheetConfirmButton || v(Te)
394
- }) : void 0,
395
- children: /* @__PURE__ */ e(Y, {
396
- children: /* @__PURE__ */ e(ce, {
397
- "aria-labelledby": A,
398
- name: "sheetselection",
399
- value: m,
400
- onChange: (S)=>{
401
- s(S), d.current = !0, !a && (t == null || t(S), setTimeout(()=>{
402
- w();
403
- }, 200));
404
- },
405
- children: /* @__PURE__ */ e(ae, {
406
- children: f.map((S)=>/* @__PURE__ */ {
407
- var _S_title;
408
- return e(le, {
409
- title: (_S_title = S.title) !== null && _S_title !== void 0 ? _S_title : "",
410
- description: S.description,
411
- asset: S.asset,
412
- radioValue: S.id
413
- }, S.id);
414
- })
415
- })
416
- })
417
- })
418
- });
419
- }
420
- });
421
- }), ot = /*#__PURE__*/ n.forwardRef((param, c)=>{
422
- let { title: o, subtitle: i, description: l, items: f, onClose: p, onSelect: h, dataAttributes: t } = param;
423
- const { isDarkMode: u } = b();
424
- return /* @__PURE__ */ e(E, {
425
- onClose: p,
426
- ref: c,
427
- dataAttributes: _object_spread({
428
- "component-name": "ActionsListSheet"
429
- }, t),
430
- children: (param)=>{
431
- let { closeModal: r, modalTitleId: m } = param;
432
- return /* @__PURE__ */ e(T, {
433
- title: o,
434
- subtitle: i,
435
- description: l,
436
- modalTitleId: m,
437
- children: /* @__PURE__ */ e(Y, {
438
- children: f.map((param)=>{
439
- let { id: s, style: d, title: a, icon: g } = param;
440
- return /* @__PURE__ */ e(de, {
441
- onPress: ()=>{
442
- h == null || h(s), r();
443
- },
444
- children: /* @__PURE__ */ R("div", {
445
- className: ee,
446
- children: [
447
- g && /* @__PURE__ */ e(y, {
448
- paddingRight: 16,
449
- children: g.Icon ? /* @__PURE__ */ e(g.Icon, {
450
- size: 24,
451
- color: d === "destructive" ? D.colors.textLinkDanger : D.colors.neutralHigh
452
- }) : /* @__PURE__ */ e(O, {
453
- circular: !0,
454
- src: u && g.urlDark ? g.urlDark : g.url,
455
- width: 40
456
- })
457
- }),
458
- /* @__PURE__ */ e(L, {
459
- regular: !0,
460
- color: d === "destructive" ? D.colors.textLinkDanger : D.colors.textPrimary,
461
- children: a
462
- })
463
- ]
464
- })
465
- }, s);
466
- })
467
- })
468
- });
469
- }
470
- });
471
- }), it = /*#__PURE__*/ n.forwardRef((param, t)=>{
472
- let { title: o, subtitle: i, description: l, items: f, onClose: p, dataAttributes: h } = param;
473
- const { isDarkMode: c } = b();
474
- return /* @__PURE__ */ e(E, {
475
- onClose: p,
476
- ref: t,
477
- dataAttributes: _object_spread({
478
- "component-name": "InfoSheet"
479
- }, h),
480
- children: (param)=>{
481
- let { modalTitleId: u } = param;
482
- return /* @__PURE__ */ e(T, {
483
- title: o,
484
- subtitle: i,
485
- description: l,
486
- modalTitleId: u,
487
- children: /* @__PURE__ */ e(y, {
488
- paddingBottom: 16,
489
- children: /* @__PURE__ */ e(I, {
490
- space: 16,
491
- role: "list",
492
- children: f.map((r, m)=>/* @__PURE__ */ R(ue, {
493
- space: 8,
494
- children: [
495
- /* @__PURE__ */ e("div", {
496
- className: te,
497
- children: r.icon.type === "bullet" ? /* @__PURE__ */ e(me, {
498
- size: 8,
499
- backgroundColor: D.colors.textPrimary
500
- }) : r.icon.Icon ? /* @__PURE__ */ e(r.icon.Icon, {
501
- size: r.icon.type === "small" ? 16 : 24
502
- }) : /* @__PURE__ */ e(O, {
503
- src: c && r.icon.urlDark ? r.icon.urlDark : r.icon.url,
504
- width: r.icon.type === "small" ? 16 : 24,
505
- height: r.icon.type === "small" ? 16 : 24
506
- })
507
- }),
508
- /* @__PURE__ */ R(I, {
509
- space: 2,
510
- children: [
511
- /* @__PURE__ */ e(L, {
512
- regular: !0,
513
- children: r.title
514
- }),
515
- r.description && /* @__PURE__ */ e(B, {
516
- regular: !0,
517
- color: D.colors.textSecondary,
518
- children: r.description
519
- })
520
- ]
521
- })
522
- ]
523
- }, r.id || m))
524
- })
525
- })
526
- });
527
- }
528
- });
529
- }), st = /*#__PURE__*/ n.forwardRef((param, r)=>{
530
- let { title: o, subtitle: i, description: l, button: f, secondaryButton: p, buttonLink: h, onClose: t, dataAttributes: c, onPressButton: u } = param;
531
- const m = (d, a)=>()=>{
532
- u == null || u(a), d();
533
- }, s = (_param)=>{
534
- var { text: d } = _param, a = _object_without_properties(_param, [
535
- "text"
536
- ]);
537
- return _object_spread({
538
- children: d
539
- }, a);
540
- };
541
- return /* @__PURE__ */ e(E, {
542
- onClose: t,
543
- ref: r,
544
- dataAttributes: _object_spread({
545
- "component-name": "ActionsSheet"
546
- }, c),
547
- children: (param)=>{
548
- let { modalTitleId: d, closeModal: a } = param;
549
- return /* @__PURE__ */ e(T, {
550
- title: o,
551
- subtitle: i,
552
- description: l,
553
- modalTitleId: d,
554
- button: /* @__PURE__ */ e(_, _object_spread_props(_object_spread({}, s(f)), {
555
- onPress: m(a, "PRIMARY")
556
- })),
557
- secondaryButton: p ? /* @__PURE__ */ e(pe, _object_spread_props(_object_spread({}, s(p)), {
558
- onPress: m(a, "SECONDARY")
559
- })) : void 0,
560
- link: h ? /* @__PURE__ */ e(ge, _object_spread_props(_object_spread({}, s(h)), {
561
- onPress: m(a, "LINK")
562
- })) : void 0
563
- });
564
- }
565
- });
566
- }), ct = E;
567
- export { ot as ActionsListSheet, st as ActionsSheet, it as InfoSheet, nt as RadioListSheet, T as SheetBody, ct as default };