@telefonica/mistica 14.20.1 → 14.21.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 (175) hide show
  1. package/css/mistica.css +1 -1
  2. package/dist/avatar.css-mistica.js +1 -1
  3. package/dist/badge.css-mistica.js +1 -1
  4. package/dist/boxed.css-mistica.js +1 -1
  5. package/dist/button-group.css-mistica.js +1 -1
  6. package/dist/button-layout.css-mistica.js +8 -8
  7. package/dist/button-layout.js +2 -2
  8. package/dist/button.css-mistica.js +17 -17
  9. package/dist/callout.css-mistica.js +1 -1
  10. package/dist/card.css-mistica.js +16 -16
  11. package/dist/card.js +190 -193
  12. package/dist/carousel.css-mistica.js +11 -11
  13. package/dist/checkbox.css-mistica.js +9 -9
  14. package/dist/chip.css-mistica.js +4 -4
  15. package/dist/circle.css-mistica.js +2 -2
  16. package/dist/community/advanced-data-card.css-mistica.js +4 -4
  17. package/dist/community/blocks.css-mistica.js +1 -1
  18. package/dist/dialog.css-mistica.js +9 -9
  19. package/dist/dialog.js +52 -62
  20. package/dist/double-field.css-mistica.js +2 -2
  21. package/dist/empty-state-card.css-mistica.js +1 -1
  22. package/dist/empty-state.css-mistica.js +2 -2
  23. package/dist/feedback.css-mistica.js +15 -6
  24. package/dist/feedback.css.d.ts +4 -1
  25. package/dist/feedback.d.ts +10 -3
  26. package/dist/feedback.js +140 -107
  27. package/dist/fixed-footer-layout.css-mistica.js +2 -2
  28. package/dist/fixed-footer-layout.js +2 -2
  29. package/dist/grid.css.d.ts +6 -6
  30. package/dist/hero.css-mistica.js +3 -3
  31. package/dist/highlighted-card.css-mistica.js +4 -4
  32. package/dist/horizontal-scroll.css-mistica.js +1 -1
  33. package/dist/icon-button.css-mistica.js +1 -1
  34. package/dist/icons/icon-error.d.ts +4 -1
  35. package/dist/icons/icon-error.js +16 -12
  36. package/dist/icons/icon-info.d.ts +4 -1
  37. package/dist/icons/icon-info.js +42 -14
  38. package/dist/icons/icon-success-vivo-new.d.ts +6 -0
  39. package/dist/icons/icon-success-vivo-new.js +86 -0
  40. package/dist/icons/icon-success-vivo.d.ts +2 -3
  41. package/dist/icons/icon-success-vivo.js +11 -15
  42. package/dist/icons/icon-success.d.ts +2 -2
  43. package/dist/icons/icon-success.js +2 -2
  44. package/dist/image.css-mistica.js +1 -1
  45. package/dist/index.d.ts +4 -0
  46. package/dist/index.js +30 -0
  47. package/dist/list.css-mistica.js +6 -6
  48. package/dist/loading-bar.css-mistica.js +2 -2
  49. package/dist/maybe-dismissable.css-mistica.js +1 -1
  50. package/dist/menu.css-mistica.js +1 -1
  51. package/dist/modal-context-provider.d.ts +1 -0
  52. package/dist/modal-context-provider.js +24 -10
  53. package/dist/navigation-bar.css-mistica.js +10 -10
  54. package/dist/navigation-breadcrumbs.css-mistica.js +1 -1
  55. package/dist/nestable-context.js +2 -7
  56. package/dist/package-version.js +1 -1
  57. package/dist/password-field.css-mistica.js +2 -2
  58. package/dist/popover.css-mistica.js +8 -8
  59. package/dist/progress-bar.css-mistica.js +1 -1
  60. package/dist/radio-button.css-mistica.js +5 -5
  61. package/dist/responsive-layout.css-mistica.js +1 -1
  62. package/dist/screen-reader-only.css-mistica.js +1 -1
  63. package/dist/select.css-mistica.js +10 -10
  64. package/dist/sheet-root.d.ts +93 -0
  65. package/dist/sheet-root.js +370 -0
  66. package/dist/sheet.css-mistica.js +66 -0
  67. package/dist/sheet.css.d.ts +17 -0
  68. package/dist/sheet.css.ts.vanilla.css-mistica.js +11 -0
  69. package/dist/sheet.d.ts +107 -0
  70. package/dist/sheet.js +643 -0
  71. package/dist/skeletons.css-mistica.js +1 -1
  72. package/dist/snackbar.css-mistica.js +1 -1
  73. package/dist/spinner.css-mistica.js +1 -1
  74. package/dist/sprinkles.css-mistica.js +191 -172
  75. package/dist/sprinkles.css.d.ts +4 -3
  76. package/dist/stack.js +14 -13
  77. package/dist/stacking-group.css-mistica.js +2 -2
  78. package/dist/stepper.css-mistica.js +8 -8
  79. package/dist/switch-component.css-mistica.js +13 -13
  80. package/dist/switch-component.js +2 -2
  81. package/dist/tabs.css-mistica.js +7 -7
  82. package/dist/tag.css-mistica.js +1 -1
  83. package/dist/text-field-base.css-mistica.js +6 -6
  84. package/dist/text-field-components.css-mistica.js +5 -5
  85. package/dist/text-link.css-mistica.js +3 -3
  86. package/dist/theme.d.ts +1 -0
  87. package/dist/theme.js +22 -18
  88. package/dist/tooltip.css-mistica.js +11 -11
  89. package/dist/touchable.css-mistica.js +2 -2
  90. package/dist/utils/animation.d.ts +2 -1
  91. package/dist/utils/animation.js +28 -14
  92. package/dist/utils/aspect-ratio-support.css-mistica.js +2 -2
  93. package/dist/utils/helpers.d.ts +9 -0
  94. package/dist/utils/helpers.js +46 -0
  95. package/dist/utils/utility-types.d.ts +1 -1
  96. package/dist/video.css-mistica.js +1 -1
  97. package/dist-es/avatar.css-mistica.js +1 -1
  98. package/dist-es/badge.css-mistica.js +1 -1
  99. package/dist-es/boxed.css-mistica.js +1 -1
  100. package/dist-es/button-group.css-mistica.js +1 -1
  101. package/dist-es/button-layout.css-mistica.js +7 -7
  102. package/dist-es/button-layout.js +1 -1
  103. package/dist-es/button.css-mistica.js +9 -9
  104. package/dist-es/callout.css-mistica.js +1 -1
  105. package/dist-es/card.css-mistica.js +2 -2
  106. package/dist-es/card.js +251 -254
  107. package/dist-es/carousel.css-mistica.js +2 -2
  108. package/dist-es/checkbox.css-mistica.js +6 -6
  109. package/dist-es/chip.css-mistica.js +4 -4
  110. package/dist-es/circle.css-mistica.js +2 -2
  111. package/dist-es/community/advanced-data-card.css-mistica.js +3 -3
  112. package/dist-es/community/blocks.css-mistica.js +1 -1
  113. package/dist-es/dialog.css-mistica.js +5 -5
  114. package/dist-es/dialog.js +101 -111
  115. package/dist-es/double-field.css-mistica.js +2 -2
  116. package/dist-es/empty-state-card.css-mistica.js +1 -1
  117. package/dist-es/empty-state.css-mistica.js +2 -2
  118. package/dist-es/feedback.css-mistica.js +2 -2
  119. package/dist-es/feedback.js +180 -147
  120. package/dist-es/fixed-footer-layout.css-mistica.js +2 -2
  121. package/dist-es/fixed-footer-layout.js +1 -1
  122. package/dist-es/hero.css-mistica.js +2 -2
  123. package/dist-es/highlighted-card.css-mistica.js +4 -4
  124. package/dist-es/horizontal-scroll.css-mistica.js +1 -1
  125. package/dist-es/icon-button.css-mistica.js +1 -1
  126. package/dist-es/icons/icon-error.js +40 -36
  127. package/dist-es/icons/icon-info.js +45 -17
  128. package/dist-es/icons/icon-success-vivo-new.js +77 -0
  129. package/dist-es/icons/icon-success-vivo.js +19 -23
  130. package/dist-es/icons/icon-success.js +2 -2
  131. package/dist-es/image.css-mistica.js +1 -1
  132. package/dist-es/index.js +1709 -1706
  133. package/dist-es/list.css-mistica.js +2 -2
  134. package/dist-es/loading-bar.css-mistica.js +2 -2
  135. package/dist-es/maybe-dismissable.css-mistica.js +1 -1
  136. package/dist-es/menu.css-mistica.js +1 -1
  137. package/dist-es/modal-context-provider.js +22 -11
  138. package/dist-es/navigation-bar.css-mistica.js +9 -9
  139. package/dist-es/navigation-breadcrumbs.css-mistica.js +1 -1
  140. package/dist-es/nestable-context.js +1 -1
  141. package/dist-es/package-version.js +1 -1
  142. package/dist-es/password-field.css-mistica.js +2 -2
  143. package/dist-es/popover.css-mistica.js +2 -2
  144. package/dist-es/progress-bar.css-mistica.js +1 -1
  145. package/dist-es/radio-button.css-mistica.js +4 -4
  146. package/dist-es/responsive-layout.css-mistica.js +1 -1
  147. package/dist-es/screen-reader-only.css-mistica.js +1 -1
  148. package/dist-es/select.css-mistica.js +9 -9
  149. package/dist-es/sheet-root.js +306 -0
  150. package/dist-es/sheet.css-mistica.js +4 -0
  151. package/dist-es/sheet.css.ts.vanilla.css-mistica.js +2 -0
  152. package/dist-es/sheet.js +570 -0
  153. package/dist-es/skeletons.css-mistica.js +1 -1
  154. package/dist-es/snackbar.css-mistica.js +1 -1
  155. package/dist-es/spinner.css-mistica.js +1 -1
  156. package/dist-es/sprinkles.css-mistica.js +191 -172
  157. package/dist-es/stack.js +18 -17
  158. package/dist-es/stacking-group.css-mistica.js +2 -2
  159. package/dist-es/stepper.css-mistica.js +2 -2
  160. package/dist-es/style.css +1 -1
  161. package/dist-es/switch-component.css-mistica.js +13 -13
  162. package/dist-es/switch-component.js +1 -1
  163. package/dist-es/tabs.css-mistica.js +6 -6
  164. package/dist-es/tag.css-mistica.js +1 -1
  165. package/dist-es/text-field-base.css-mistica.js +2 -2
  166. package/dist-es/text-field-components.css-mistica.js +2 -2
  167. package/dist-es/text-link.css-mistica.js +3 -3
  168. package/dist-es/theme.js +28 -24
  169. package/dist-es/tooltip.css-mistica.js +3 -3
  170. package/dist-es/touchable.css-mistica.js +2 -2
  171. package/dist-es/utils/animation.js +26 -15
  172. package/dist-es/utils/aspect-ratio-support.css-mistica.js +2 -2
  173. package/dist-es/utils/helpers.js +29 -0
  174. package/dist-es/video.css-mistica.js +1 -1
  175. package/package.json +4 -4
@@ -10,22 +10,22 @@ function _export(target, all) {
10
10
  }
11
11
  _export(exports, {
12
12
  arrow: function() {
13
- return r;
13
+ return t;
14
14
  },
15
15
  arrowSize: function() {
16
- return t;
16
+ return r;
17
17
  },
18
18
  arrowWrapper: function() {
19
- return o;
19
+ return _;
20
20
  },
21
21
  closeButtonIcon: function() {
22
- return _;
22
+ return a;
23
23
  },
24
24
  container: function() {
25
- return a;
25
+ return f;
26
26
  },
27
27
  defaultPositionDesktop: function() {
28
- return f;
28
+ return o;
29
29
  },
30
30
  defaultPositionMobile: function() {
31
31
  return e;
@@ -43,9 +43,9 @@ _export(exports, {
43
43
  return g;
44
44
  },
45
45
  textContent: function() {
46
- return d;
46
+ return p;
47
47
  }
48
48
  });
49
49
  require("./sprinkles.css.ts.vanilla.css-mistica.js");
50
50
  require("./popover.css.ts.vanilla.css-mistica.js");
51
- var r = "_12igu661 _1y2v1nfb0 _1y2v1nfe6 _1y2v1nfdl _1y2v1nfdo _1y2v1nf31", t = 12, o = "_12igu663 _1y2v1nfb0 _1y2v1nf2 _1y2v1nfe4", _ = "_12igu669 _1y2v1nfb0 _1y2v1nfe9 _1y2v1nff3", a = "_12igu665 _1y2v1nfb0 _1y2v1nfbs _1y2v1nf31 _1y2v1nfdl _1y2v1nfdx", f = "bottom", e = "top", i = 20, y = 16, b = 488, g = "_1y2v1nfb4 _1y2v1nfbj _1y2v1nfc8", d = "_12igu667";
51
+ var t = "_12igu661 _1y2v1nfb0 _1y2v1nfeb _1y2v1nfdm _1y2v1nfdp _1y2v1nf31", r = 12, _ = "_12igu663 _1y2v1nfb0 _1y2v1nf2 _1y2v1nfe5", a = "_12igu669 _1y2v1nfb0 _1y2v1nfee _1y2v1nff8", f = "_12igu665 _1y2v1nfb0 _1y2v1nfbt _1y2v1nf31 _1y2v1nfdm _1y2v1nfdy", o = "bottom", e = "top", i = 20, y = 16, b = 488, g = "_1y2v1nfb5 _1y2v1nfbk _1y2v1nfc9", p = "_12igu667";
@@ -24,4 +24,4 @@ _export(exports, {
24
24
  });
25
25
  require("./sprinkles.css.ts.vanilla.css-mistica.js");
26
26
  require("./progress-bar.css.ts.vanilla.css-mistica.js");
27
- var a = "_1y2v1nfc8 _1y2v1nfe1", n = "_1y2v1nfe1 _1y2v1nfcb _1y2v1nf44", y = "j0y7r95", e = "j0y7r94";
27
+ var a = "_1y2v1nfc9 _1y2v1nfe2", n = "_1y2v1nfe2 _1y2v1nfcc _1y2v1nf44", y = "j0y7r95", e = "j0y7r94";
@@ -16,10 +16,10 @@ _export(exports, {
16
16
  return r;
17
17
  },
18
18
  innerCircleChecked: function() {
19
- return c;
19
+ return e;
20
20
  },
21
21
  outerCircleCheckedVariants: function() {
22
- return e;
22
+ return c;
23
23
  },
24
24
  outerCircleVariants: function() {
25
25
  return a;
@@ -33,10 +33,10 @@ _export(exports, {
33
33
  });
34
34
  require("./sprinkles.css.ts.vanilla.css-mistica.js");
35
35
  require("./radio-button.css.ts.vanilla.css-mistica.js");
36
- var v = "c6dmsud", r = "c6dmsu5 _1y2v1nfb4 _1y2v1nfdn", c = "c6dmsu7 _1y2v1nf45", e = {
36
+ var v = "c6dmsud", r = "c6dmsu5 _1y2v1nfb5 _1y2v1nfdo", e = "c6dmsu7 _1y2v1nf45", c = {
37
37
  default: "c6dmsub",
38
38
  ios: "c6dmsuc"
39
39
  }, a = {
40
- default: "c6dmsu2 c6dmsu1 _1y2v1nfb5 _1y2v1nfbj _1y2v1nfbd _1y2v1nfe3 _1y2v1nfbm _1y2v1nfdn _1y2v1nf30",
41
- ios: "c6dmsu3 c6dmsu1 _1y2v1nfb5 _1y2v1nfbj _1y2v1nfbd _1y2v1nfe3 _1y2v1nfbm _1y2v1nfdn _1y2v1nf30"
40
+ default: "c6dmsu2 c6dmsu1 _1y2v1nfb6 _1y2v1nfbk _1y2v1nfbe _1y2v1nfe4 _1y2v1nfbn _1y2v1nfdo _1y2v1nf30",
41
+ ios: "c6dmsu3 c6dmsu1 _1y2v1nfb6 _1y2v1nfbk _1y2v1nfbe _1y2v1nfe4 _1y2v1nfbn _1y2v1nfdo _1y2v1nf30"
42
42
  }, f = "c6dmsu9 c6dmsu8", s = "c6dmsua c6dmsu8";
@@ -27,4 +27,4 @@ require("./responsive-layout.css.ts.vanilla.css-mistica.js");
27
27
  var n = {
28
28
  inverse: "_1y2v1nf39",
29
29
  alternative: "_1y2v1nf3e"
30
- }, v = "_1y2v1nfbr", e = "_17lofg76 _1y2v1nfbr", o = "_17lofg74";
30
+ }, v = "_1y2v1nfbs", e = "_17lofg76 _1y2v1nfbs", o = "_17lofg74";
@@ -10,4 +10,4 @@ Object.defineProperty(exports, "screenReaderOnly", {
10
10
  });
11
11
  require("./sprinkles.css.ts.vanilla.css-mistica.js");
12
12
  require("./screen-reader-only.css.ts.vanilla.css-mistica.js");
13
- var y = "gwdgwo1 _1y2v1nf5z _1y2v1nf78 _1y2v1nf8h _1y2v1nf9q _1y2v1nfb0 _1y2v1nfe4 _1y2v1nfdm";
13
+ var y = "gwdgwo1 _1y2v1nf5z _1y2v1nf78 _1y2v1nf8h _1y2v1nf9q _1y2v1nfb0 _1y2v1nfe5 _1y2v1nfdn";
@@ -22,10 +22,10 @@ _export(exports, {
22
22
  return i;
23
23
  },
24
24
  optionsContainer: function() {
25
- return a;
25
+ return s;
26
26
  },
27
27
  selectContainerVariants: function() {
28
- return s;
28
+ return a;
29
29
  },
30
30
  selectTextVariants: function() {
31
31
  return e;
@@ -39,18 +39,18 @@ _export(exports, {
39
39
  });
40
40
  require("./sprinkles.css.ts.vanilla.css-mistica.js");
41
41
  require("./select.css.ts.vanilla.css-mistica.js");
42
- var n = "_1sqpivvo _1y2v1nfb0 _1y2v1nff5", f = "_1sqpivvq _1y2v1nf8w _1y2v1nfa5 _1y2v1nf68 _1y2v1nf7h _1y2v1nf1w _1y2v1nfb4 _1y2v1nfbj _1y2v1nfe3 _1y2v1nfcj", y = "_1y2v1nf3e", i = {
42
+ var n = "_1sqpivvo _1y2v1nfb0 _1y2v1nffa", f = "_1sqpivvq _1y2v1nf8w _1y2v1nfa5 _1y2v1nf68 _1y2v1nf7h _1y2v1nf1w _1y2v1nfb5 _1y2v1nfbk _1y2v1nfe4 _1y2v1nfck", y = "_1y2v1nf3e", i = {
43
43
  show: "_1sqpivv7",
44
44
  hide: "_1sqpivv8"
45
- }, a = "_1sqpivv6 _1y2v1nf5z _1y2v1nf78 _1y2v1nf8h _1y2v1nf9q _1y2v1nfb1 _1y2v1nfdu _1y2v1nf31", s = {
46
- default: "_1sqpivvd _1sqpivvc _1y2v1nfaz _1y2v1nfe3",
47
- fullWidth: "_1sqpivve _1sqpivvc _1y2v1nfaz _1y2v1nfe3"
45
+ }, s = "_1sqpivv6 _1y2v1nf5z _1y2v1nf78 _1y2v1nf8h _1y2v1nf9q _1y2v1nfb1 _1y2v1nfdv _1y2v1nf31", a = {
46
+ default: "_1sqpivvd _1sqpivvc _1y2v1nfaz _1y2v1nfe4",
47
+ fullWidth: "_1sqpivve _1sqpivvc _1y2v1nfaz _1y2v1nfe4"
48
48
  }, e = {
49
- default: "_1sqpivvl _1sqpivvk _1y2v1nfb0 _1y2v1nfe4 _1y2v1nfdj _1y2v1nf1w",
50
- disabled: "_1sqpivvm _1sqpivvk _1y2v1nfb0 _1y2v1nfe4 _1y2v1nfdj _1y2v1nf1w"
49
+ default: "_1sqpivvl _1sqpivvk _1y2v1nfb0 _1y2v1nfe5 _1y2v1nfdk _1y2v1nf1w",
50
+ disabled: "_1sqpivvm _1sqpivvk _1y2v1nfb0 _1y2v1nfe5 _1y2v1nfdk _1y2v1nf1w"
51
51
  }, r = {
52
- default: "_1sqpivvh _1sqpivvg _1y2v1nfdm _1y2v1nfe4 _1y2v1nf1w _1y2v1nf5y _1y2v1nfbr _1y2v1nfc8",
53
- disabled: "_1sqpivvi _1sqpivvg _1y2v1nfdm _1y2v1nfe4 _1y2v1nf1w _1y2v1nf5y _1y2v1nfbr _1y2v1nfc8"
52
+ default: "_1sqpivvh _1sqpivvg _1y2v1nfdn _1y2v1nfe5 _1y2v1nf1w _1y2v1nf5y _1y2v1nfbs _1y2v1nfc9",
53
+ disabled: "_1sqpivvi _1sqpivvg _1y2v1nfdn _1y2v1nfe5 _1y2v1nf1w _1y2v1nf5y _1y2v1nfbs _1y2v1nfc9"
54
54
  }, p = {
55
55
  top: "var(--_1sqpivv0)",
56
56
  left: "var(--_1sqpivv1)",
@@ -0,0 +1,93 @@
1
+ import * as React from 'react';
2
+ import type { ExclusifyUnion, Id } from './utils/utility-types';
3
+ type InfoIcon = ExclusifyUnion<{
4
+ type: 'small' | 'regular';
5
+ url: string;
6
+ urlDark?: string;
7
+ } | {
8
+ type: 'bullet';
9
+ }>;
10
+ type SheetProps<T> = Id<{
11
+ title?: string;
12
+ subtitle?: string;
13
+ description?: string;
14
+ } & T>;
15
+ type SheetPropsByType = {
16
+ RADIO_LIST: SheetProps<{
17
+ selectedId?: string;
18
+ items: Array<{
19
+ id: string;
20
+ title?: string;
21
+ description?: string;
22
+ icon?: {
23
+ size?: 'small' | 'large';
24
+ url: string;
25
+ urlDark?: string;
26
+ };
27
+ }>;
28
+ }>;
29
+ ACTIONS_LIST: SheetProps<{
30
+ items: Array<{
31
+ id: string;
32
+ title: string;
33
+ style?: 'normal' | 'destructive';
34
+ icon?: {
35
+ url: string;
36
+ urlDark?: string;
37
+ };
38
+ }>;
39
+ }>;
40
+ INFO: SheetProps<{
41
+ items: Array<{
42
+ id: string;
43
+ title: string;
44
+ description?: string;
45
+ icon: InfoIcon;
46
+ }>;
47
+ }>;
48
+ ACTIONS: SheetProps<{
49
+ button: {
50
+ text: string;
51
+ };
52
+ secondaryButton?: {
53
+ text: string;
54
+ };
55
+ link?: {
56
+ text: string;
57
+ withChevron?: boolean;
58
+ };
59
+ }>;
60
+ };
61
+ type SheetResultByType = {
62
+ RADIO_LIST: {
63
+ action: 'SUBMIT';
64
+ selectedId: string;
65
+ } | {
66
+ action: 'DISMISS';
67
+ };
68
+ ACTIONS_LIST: {
69
+ action: 'SUBMIT';
70
+ selectedId: string;
71
+ } | {
72
+ action: 'DISMISS';
73
+ };
74
+ INFO: void;
75
+ ACTIONS: {
76
+ action: 'PRIMARY' | 'SECONDARY' | 'LINK' | 'DISMISS';
77
+ };
78
+ };
79
+ type SheetType = keyof SheetPropsByType;
80
+ type SheetTypeWithProps<T extends SheetType> = Id<{
81
+ type: T;
82
+ props: SheetPropsByType[T];
83
+ }>;
84
+ export type NativeSheetImplementation = typeof import('@tef-novum/webview-bridge')['bottomSheet'];
85
+ export declare const showSheet: <T extends keyof SheetPropsByType>(sheetProps: {
86
+ type: T;
87
+ props: SheetPropsByType[T];
88
+ }) => Promise<SheetResultByType[T]>;
89
+ type Props = {
90
+ nativeImplementation?: NativeSheetImplementation;
91
+ };
92
+ export declare const SheetRoot: (props: Props) => React.ReactElement | null;
93
+ export default SheetRoot;
@@ -0,0 +1,370 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ SheetRoot: function() {
13
+ return k;
14
+ },
15
+ default: function() {
16
+ return B;
17
+ },
18
+ showSheet: function() {
19
+ return _;
20
+ }
21
+ });
22
+ const _jsxruntime = require("react/jsx-runtime");
23
+ const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
24
+ const _sheet = require("./sheet.js");
25
+ const _image = /*#__PURE__*/ _interop_require_default(require("./image.js"));
26
+ const _hooks = require("./hooks.js");
27
+ function _interop_require_default(obj) {
28
+ return obj && obj.__esModule ? obj : {
29
+ default: obj
30
+ };
31
+ }
32
+ function _getRequireWildcardCache(nodeInterop) {
33
+ if (typeof WeakMap !== "function") return null;
34
+ var cacheBabelInterop = new WeakMap();
35
+ var cacheNodeInterop = new WeakMap();
36
+ return (_getRequireWildcardCache = function(nodeInterop) {
37
+ return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
38
+ })(nodeInterop);
39
+ }
40
+ function _interop_require_wildcard(obj, nodeInterop) {
41
+ if (!nodeInterop && obj && obj.__esModule) {
42
+ return obj;
43
+ }
44
+ if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
45
+ return {
46
+ default: obj
47
+ };
48
+ }
49
+ var cache = _getRequireWildcardCache(nodeInterop);
50
+ if (cache && cache.has(obj)) {
51
+ return cache.get(obj);
52
+ }
53
+ var newObj = {};
54
+ var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
55
+ for(var key in obj){
56
+ if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
57
+ var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
58
+ if (desc && (desc.get || desc.set)) {
59
+ Object.defineProperty(newObj, key, desc);
60
+ } else {
61
+ newObj[key] = obj[key];
62
+ }
63
+ }
64
+ }
65
+ newObj.default = obj;
66
+ if (cache) {
67
+ cache.set(obj, newObj);
68
+ }
69
+ return newObj;
70
+ }
71
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
72
+ try {
73
+ var info = gen[key](arg);
74
+ var value = info.value;
75
+ } catch (error) {
76
+ reject(error);
77
+ return;
78
+ }
79
+ if (info.done) {
80
+ resolve(value);
81
+ } else {
82
+ Promise.resolve(value).then(_next, _throw);
83
+ }
84
+ }
85
+ function _async_to_generator(fn) {
86
+ return function() {
87
+ var self = this, args = arguments;
88
+ return new Promise(function(resolve, reject) {
89
+ var gen = fn.apply(self, args);
90
+ function _next(value) {
91
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
92
+ }
93
+ function _throw(err) {
94
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
95
+ }
96
+ _next(undefined);
97
+ });
98
+ };
99
+ }
100
+ function _define_property(obj, key, value) {
101
+ if (key in obj) {
102
+ Object.defineProperty(obj, key, {
103
+ value: value,
104
+ enumerable: true,
105
+ configurable: true,
106
+ writable: true
107
+ });
108
+ } else {
109
+ obj[key] = value;
110
+ }
111
+ return obj;
112
+ }
113
+ function _object_spread(target) {
114
+ for(var i = 1; i < arguments.length; i++){
115
+ var source = arguments[i] != null ? arguments[i] : {};
116
+ var ownKeys = Object.keys(source);
117
+ if (typeof Object.getOwnPropertySymbols === "function") {
118
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
119
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
120
+ }));
121
+ }
122
+ ownKeys.forEach(function(key) {
123
+ _define_property(target, key, source[key]);
124
+ });
125
+ }
126
+ return target;
127
+ }
128
+ function ownKeys(object, enumerableOnly) {
129
+ var keys = Object.keys(object);
130
+ if (Object.getOwnPropertySymbols) {
131
+ var symbols = Object.getOwnPropertySymbols(object);
132
+ if (enumerableOnly) {
133
+ symbols = symbols.filter(function(sym) {
134
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
135
+ });
136
+ }
137
+ keys.push.apply(keys, symbols);
138
+ }
139
+ return keys;
140
+ }
141
+ function _object_spread_props(target, source) {
142
+ source = source != null ? source : {};
143
+ if (Object.getOwnPropertyDescriptors) {
144
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
145
+ } else {
146
+ ownKeys(Object(source)).forEach(function(key) {
147
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
148
+ });
149
+ }
150
+ return target;
151
+ }
152
+ let d = null, e = null, u = null;
153
+ const m = (param)=>{
154
+ let { title: o , subtitle: c , description: t , selectedId: r , items: n } = param;
155
+ return u({
156
+ title: o,
157
+ subtitle: c,
158
+ description: t,
159
+ content: [
160
+ {
161
+ type: "LIST",
162
+ id: "list-0",
163
+ listType: "SINGLE_SELECTION",
164
+ autoSubmit: !0,
165
+ selectedIds: typeof r == "string" ? [
166
+ r
167
+ ] : [],
168
+ items: n
169
+ }
170
+ ]
171
+ }).then((param)=>{
172
+ let { action: s , result: a } = param;
173
+ return s === "SUBMIT" ? {
174
+ action: s,
175
+ selectedId: a[0].selectedIds[0]
176
+ } : {
177
+ action: s,
178
+ selectedId: null
179
+ };
180
+ });
181
+ }, L = (param)=>{
182
+ let { title: o , subtitle: c , description: t , items: r } = param;
183
+ return u({
184
+ title: o,
185
+ subtitle: c,
186
+ description: t,
187
+ content: [
188
+ {
189
+ type: "LIST",
190
+ id: "list-0",
191
+ listType: "ACTIONS",
192
+ autoSubmit: !0,
193
+ selectedIds: [],
194
+ items: r
195
+ }
196
+ ]
197
+ }).then((param)=>{
198
+ let { action: n , result: s } = param;
199
+ return n === "SUBMIT" ? {
200
+ action: n,
201
+ selectedId: s[0].selectedIds[0]
202
+ } : {
203
+ action: n,
204
+ selectedId: null
205
+ };
206
+ });
207
+ }, C = function() {
208
+ var _ref = _async_to_generator(function*(param) {
209
+ let { title: o , subtitle: c , description: t , items: r } = param;
210
+ yield u({
211
+ title: o,
212
+ subtitle: c,
213
+ description: t,
214
+ content: [
215
+ {
216
+ type: "LIST",
217
+ id: "list-0",
218
+ listType: "INFORMATIVE",
219
+ autoSubmit: !1,
220
+ selectedIds: [],
221
+ items: r
222
+ }
223
+ ]
224
+ });
225
+ });
226
+ return function C(_) {
227
+ return _ref.apply(this, arguments);
228
+ };
229
+ }(), M = function() {
230
+ var _ref = _async_to_generator(function*(param) {
231
+ let { title: o , subtitle: c , description: t , button: r , secondaryButton: n , link: s } = param;
232
+ return u({
233
+ title: o,
234
+ subtitle: c,
235
+ description: t,
236
+ content: [
237
+ {
238
+ type: "BOTTOM_ACTIONS",
239
+ id: "bottom-actions-0",
240
+ button: r,
241
+ secondaryButton: n,
242
+ link: s
243
+ }
244
+ ]
245
+ }).then((param)=>{
246
+ let { action: a , result: i } = param;
247
+ if (a === "SUBMIT") {
248
+ const p = i.find((param)=>{
249
+ let { id: T } = param;
250
+ return T === "bottom-actions-0";
251
+ }), I = p == null ? void 0 : p.selectedIds[0];
252
+ if (I === "PRIMARY" || I === "SECONDARY" || I === "LINK") return {
253
+ action: I
254
+ };
255
+ }
256
+ return {
257
+ action: "DISMISS"
258
+ };
259
+ });
260
+ });
261
+ return function M(_) {
262
+ return _ref.apply(this, arguments);
263
+ };
264
+ }();
265
+ let f = !1;
266
+ const _ = (o)=>{
267
+ if (u) {
268
+ const { type: t , props: r } = o;
269
+ switch(t){
270
+ case "INFO":
271
+ return C(r);
272
+ case "ACTIONS_LIST":
273
+ return L(r);
274
+ case "RADIO_LIST":
275
+ return m(r);
276
+ case "ACTIONS":
277
+ return M(r);
278
+ default:
279
+ const n = t;
280
+ throw new Error(`Unknown sheet type: ${n}`);
281
+ }
282
+ }
283
+ if (!d) return Promise.reject(new Error("Tried to show a Sheet but the SheetRoot component was not mounted"));
284
+ if (f) return Promise.reject(new Error("Tried to show a Sheet but there is already one open"));
285
+ f = !0, d(o);
286
+ const c = new Promise((t)=>{
287
+ e = t;
288
+ });
289
+ return c.then(()=>{
290
+ f = !1;
291
+ }), c;
292
+ }, k = (o)=>{
293
+ const { isDarkMode: c } = (0, _hooks.useTheme)(), [t, r] = _react.useState(null), n = _react.useRef(null);
294
+ if (_react.useEffect(()=>{
295
+ if (o.nativeImplementation) return u = o.nativeImplementation, ()=>{
296
+ u = null;
297
+ };
298
+ }, [
299
+ o.nativeImplementation
300
+ ]), _react.useEffect(()=>(d = (i)=>{
301
+ n.current = null, r(i);
302
+ }, ()=>{
303
+ d = null;
304
+ }), []), !t || o.nativeImplementation) return null;
305
+ const s = ()=>{
306
+ switch(r(null), t.type){
307
+ case "INFO":
308
+ e == null || e(void 0);
309
+ break;
310
+ case "ACTIONS_LIST":
311
+ n.current ? e == null || e({
312
+ action: "SUBMIT",
313
+ selectedId: n.current
314
+ }) : e == null || e({
315
+ action: "DISMISS"
316
+ });
317
+ break;
318
+ case "RADIO_LIST":
319
+ n.current ? e == null || e({
320
+ action: "SUBMIT",
321
+ selectedId: n.current
322
+ }) : e == null || e({
323
+ action: "DISMISS"
324
+ });
325
+ break;
326
+ case "ACTIONS":
327
+ n.current === "PRIMARY" || n.current === "SECONDARY" || n.current === "LINK" ? e == null || e({
328
+ action: n.current
329
+ }) : e == null || e({
330
+ action: "DISMISS"
331
+ });
332
+ break;
333
+ default:
334
+ throw new Error(`Unknown sheet type: ${t.type}`);
335
+ }
336
+ }, a = (i)=>{
337
+ n.current = i;
338
+ };
339
+ switch(t.type){
340
+ case "INFO":
341
+ return /* @__PURE__ */ (0, _jsxruntime.jsx)(_sheet.InfoSheet, _object_spread_props(_object_spread({}, t.props), {
342
+ onClose: s
343
+ }));
344
+ case "ACTIONS_LIST":
345
+ return /* @__PURE__ */ (0, _jsxruntime.jsx)(_sheet.ActionsListSheet, _object_spread_props(_object_spread({}, t.props), {
346
+ onClose: s,
347
+ onSelect: a
348
+ }));
349
+ case "RADIO_LIST":
350
+ return /* @__PURE__ */ (0, _jsxruntime.jsx)(_sheet.RadioListSheet, _object_spread_props(_object_spread({}, t.props), {
351
+ items: t.props.items.map((i)=>_object_spread_props(_object_spread({}, i), {
352
+ asset: i.icon && /* @__PURE__ */ (0, _jsxruntime.jsx)(_image.default, {
353
+ circular: !0,
354
+ src: c && i.icon.urlDark ? i.icon.urlDark : i.icon.url,
355
+ width: i.icon.size === "small" ? 24 : 40
356
+ })
357
+ })),
358
+ onClose: s,
359
+ onSelect: a
360
+ }));
361
+ case "ACTIONS":
362
+ return /* @__PURE__ */ (0, _jsxruntime.jsx)(_sheet.ActionsSheet, _object_spread_props(_object_spread({}, t.props), {
363
+ buttonLink: t.props.link,
364
+ onClose: s,
365
+ onPressButton: a
366
+ }));
367
+ default:
368
+ throw new Error(`Unknown sheet type: ${t.type}`);
369
+ }
370
+ }, B = k;
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ Sheet: function() {
13
+ return y;
14
+ },
15
+ SheetContainer: function() {
16
+ return f;
17
+ },
18
+ SheetContent: function() {
19
+ return _;
20
+ },
21
+ bodyContent: function() {
22
+ return e;
23
+ },
24
+ children: function() {
25
+ return a;
26
+ },
27
+ closingOverlay: function() {
28
+ return b;
29
+ },
30
+ closingSheet: function() {
31
+ return r;
32
+ },
33
+ handle: function() {
34
+ return t;
35
+ },
36
+ handleContainer: function() {
37
+ return c;
38
+ },
39
+ infoItemIcon: function() {
40
+ return o;
41
+ },
42
+ modalCloseButton: function() {
43
+ return l;
44
+ },
45
+ modalCloseButtonIcon: function() {
46
+ return i;
47
+ },
48
+ overlay: function() {
49
+ return z;
50
+ },
51
+ sheetActionRow: function() {
52
+ return h;
53
+ },
54
+ stickyButtons: function() {
55
+ return s;
56
+ },
57
+ stickyTitle: function() {
58
+ return d;
59
+ },
60
+ transitionDuration: function() {
61
+ return k;
62
+ }
63
+ });
64
+ require("./sprinkles.css.ts.vanilla.css-mistica.js");
65
+ require("./sheet.css.ts.vanilla.css-mistica.js");
66
+ var y = "cylz3v5 _1y2v1nf30", f = "cylz3v3 _1y2v1nfb1 _1y2v1nfeq _1y2v1nff5 _1y2v1nffk", _ = "cylz3v8 _1y2v1nf6n _1y2v1nfb5 _1y2v1nfbb", e = "cylz3vn", a = "_1y2v1nfea _1y2v1nfbr _1y2v1nfb5 _1y2v1nfbb", b = "cylz3vk", r = "cylz3v6", t = "_1y2v1nf44 _1y2v1nfc1 _1y2v1nfcc _1y2v1nfdp", c = "cylz3vb _1y2v1nf68 _1y2v1nf7h _1y2v1nfb0 _1y2v1nfeb _1y2v1nfcm _1y2v1nfbs _1y2v1nfb5 _1y2v1nfbe", o = "_1y2v1nfb5 _1y2v1nfbk _1y2v1nfch", l = "cylz3ve _1y2v1nf6e _1y2v1nf7n _1y2v1nf8w _1y2v1nfa5 _1y2v1nfb0 _1y2v1nfeb _1y2v1nff5", i = "cylz3vg _1y2v1nfc2 _1y2v1nfci _1y2v1nfb5 _1y2v1nfbk _1y2v1nfbe _1y2v1nfdo", z = "cylz3vj _1y2v1nfb1 _1y2v1nf3b _1y2v1nfeb _1y2v1nfeq _1y2v1nff5 _1y2v1nffk", h = "cylz3vp _1y2v1nf6e _1y2v1nf7n _1y2v1nf8w _1y2v1nfa5 _1y2v1nfb5 _1y2v1nfdi _1y2v1nfbk", s = "_1y2v1nfb3 _1y2v1nffk _1y2v1nf30", d = "_1y2v1nfb3 _1y2v1nfeb _1y2v1nf30", k = 400;
@@ -0,0 +1,17 @@
1
+ export declare const transitionDuration: number;
2
+ export declare const SheetContainer: string;
3
+ export declare const Sheet: string;
4
+ export declare const closingSheet: string;
5
+ export declare const SheetContent: string;
6
+ export declare const children: string;
7
+ export declare const handleContainer: string;
8
+ export declare const handle: string;
9
+ export declare const modalCloseButton: string;
10
+ export declare const modalCloseButtonIcon: string;
11
+ export declare const overlay: string;
12
+ export declare const closingOverlay: string;
13
+ export declare const stickyTitle: string;
14
+ export declare const stickyButtons: string;
15
+ export declare const bodyContent: string;
16
+ export declare const sheetActionRow: string;
17
+ export declare const infoItemIcon: string;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "default", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return s;
9
+ }
10
+ });
11
+ const s = "";