@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
@@ -0,0 +1,175 @@
1
+ "use client";
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "default", {
7
+ enumerable: true,
8
+ get: function() {
9
+ return Y;
10
+ }
11
+ });
12
+ const _jsxruntime = require("react/jsx-runtime");
13
+ const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
14
+ const _sheetcommon = /*#__PURE__*/ _interop_require_wildcard(require("./sheet-common.js"));
15
+ const _button = require("./button.js");
16
+ function _getRequireWildcardCache(nodeInterop) {
17
+ if (typeof WeakMap !== "function") return null;
18
+ var cacheBabelInterop = new WeakMap();
19
+ var cacheNodeInterop = new WeakMap();
20
+ return (_getRequireWildcardCache = function(nodeInterop) {
21
+ return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
22
+ })(nodeInterop);
23
+ }
24
+ function _interop_require_wildcard(obj, nodeInterop) {
25
+ if (!nodeInterop && obj && obj.__esModule) {
26
+ return obj;
27
+ }
28
+ if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
29
+ return {
30
+ default: obj
31
+ };
32
+ }
33
+ var cache = _getRequireWildcardCache(nodeInterop);
34
+ if (cache && cache.has(obj)) {
35
+ return cache.get(obj);
36
+ }
37
+ var newObj = {
38
+ __proto__: null
39
+ };
40
+ var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
41
+ for(var key in obj){
42
+ if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
43
+ var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
44
+ if (desc && (desc.get || desc.set)) {
45
+ Object.defineProperty(newObj, key, desc);
46
+ } else {
47
+ newObj[key] = obj[key];
48
+ }
49
+ }
50
+ }
51
+ newObj.default = obj;
52
+ if (cache) {
53
+ cache.set(obj, newObj);
54
+ }
55
+ return newObj;
56
+ }
57
+ function _define_property(obj, key, value) {
58
+ if (key in obj) {
59
+ Object.defineProperty(obj, key, {
60
+ value: value,
61
+ enumerable: true,
62
+ configurable: true,
63
+ writable: true
64
+ });
65
+ } else {
66
+ obj[key] = value;
67
+ }
68
+ return obj;
69
+ }
70
+ function _object_spread(target) {
71
+ for(var i = 1; i < arguments.length; i++){
72
+ var source = arguments[i] != null ? arguments[i] : {};
73
+ var ownKeys = Object.keys(source);
74
+ if (typeof Object.getOwnPropertySymbols === "function") {
75
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
76
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
77
+ }));
78
+ }
79
+ ownKeys.forEach(function(key) {
80
+ _define_property(target, key, source[key]);
81
+ });
82
+ }
83
+ return target;
84
+ }
85
+ function ownKeys(object, enumerableOnly) {
86
+ var keys = Object.keys(object);
87
+ if (Object.getOwnPropertySymbols) {
88
+ var symbols = Object.getOwnPropertySymbols(object);
89
+ if (enumerableOnly) {
90
+ symbols = symbols.filter(function(sym) {
91
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
92
+ });
93
+ }
94
+ keys.push.apply(keys, symbols);
95
+ }
96
+ return keys;
97
+ }
98
+ function _object_spread_props(target, source) {
99
+ source = source != null ? source : {};
100
+ if (Object.getOwnPropertyDescriptors) {
101
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
102
+ } else {
103
+ ownKeys(Object(source)).forEach(function(key) {
104
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
105
+ });
106
+ }
107
+ return target;
108
+ }
109
+ function _object_without_properties(source, excluded) {
110
+ if (source == null) return {};
111
+ var target = _object_without_properties_loose(source, excluded);
112
+ var key, i;
113
+ if (Object.getOwnPropertySymbols) {
114
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
115
+ for(i = 0; i < sourceSymbolKeys.length; i++){
116
+ key = sourceSymbolKeys[i];
117
+ if (excluded.indexOf(key) >= 0) continue;
118
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
119
+ target[key] = source[key];
120
+ }
121
+ }
122
+ return target;
123
+ }
124
+ function _object_without_properties_loose(source, excluded) {
125
+ if (source == null) return {};
126
+ var target = {};
127
+ var sourceKeys = Object.keys(source);
128
+ var key, i;
129
+ for(i = 0; i < sourceKeys.length; i++){
130
+ key = sourceKeys[i];
131
+ if (excluded.indexOf(key) >= 0) continue;
132
+ target[key] = source[key];
133
+ }
134
+ return target;
135
+ }
136
+ const v = /*#__PURE__*/ _react.forwardRef((param, S)=>{
137
+ let { title: c, subtitle: s, description: d, button: f, secondaryButton: m, buttonLink: a, onClose: h, dataAttributes: p, onPressButton: o } = param;
138
+ const n = (e, t)=>()=>{
139
+ o == null || o(t), e();
140
+ }, i = (_param)=>{
141
+ var { text: e } = _param, t = _object_without_properties(_param, [
142
+ "text"
143
+ ]);
144
+ return _object_spread({
145
+ children: e
146
+ }, t);
147
+ };
148
+ return /* @__PURE__ */ (0, _jsxruntime.jsx)(_sheetcommon.default, {
149
+ onClose: h,
150
+ ref: S,
151
+ dataAttributes: _object_spread({
152
+ "component-name": "ActionsSheet"
153
+ }, p),
154
+ children: (param)=>{
155
+ let { modalTitleId: e, closeModal: t } = param;
156
+ return /* @__PURE__ */ (0, _jsxruntime.jsx)(_sheetcommon.SheetBody, {
157
+ title: c,
158
+ subtitle: s,
159
+ description: d,
160
+ modalTitleId: e,
161
+ button: /* @__PURE__ */ (0, _jsxruntime.jsx)(_button.ButtonPrimary, _object_spread_props(_object_spread({}, i(f)), {
162
+ onPress: n(t, "PRIMARY")
163
+ })),
164
+ secondaryButton: m ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_button.ButtonSecondary, _object_spread_props(_object_spread({}, i(m)), {
165
+ onPress: n(t, "SECONDARY")
166
+ })) : void 0,
167
+ link: a ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_button.ButtonLink, _object_spread_props(_object_spread({
168
+ small: !0
169
+ }, i(a)), {
170
+ onPress: n(t, "LINK")
171
+ })) : void 0
172
+ });
173
+ }
174
+ });
175
+ }), Y = v;
@@ -10,54 +10,48 @@ function _export(target, all) {
10
10
  }
11
11
  _export(exports, {
12
12
  Sheet: function() {
13
- return y;
13
+ return f;
14
14
  },
15
15
  SheetContainer: function() {
16
- return f;
16
+ return y;
17
17
  },
18
18
  SheetContent: function() {
19
19
  return _;
20
20
  },
21
21
  bodyContent: function() {
22
- return r;
22
+ return e;
23
23
  },
24
24
  children: function() {
25
- return l;
25
+ return r;
26
26
  },
27
27
  closingOverlay: function() {
28
- return a;
28
+ return i;
29
29
  },
30
30
  closingSheet: function() {
31
- return t;
31
+ return a;
32
32
  },
33
33
  handle: function() {
34
- return h;
34
+ return t;
35
35
  },
36
36
  handleContainer: function() {
37
- return e;
38
- },
39
- infoItemIcon: function() {
40
- return i;
37
+ return h;
41
38
  },
42
39
  modalCloseButton: function() {
43
- return o;
40
+ return l;
44
41
  },
45
42
  overlay: function() {
46
- return c;
47
- },
48
- sheetActionRow: function() {
49
- return k;
43
+ return o;
50
44
  },
51
45
  stickyButtons: function() {
52
- return z;
46
+ return m;
53
47
  },
54
48
  stickyTitle: function() {
55
- return s;
49
+ return p;
56
50
  },
57
51
  transitionDuration: function() {
58
- return m;
52
+ return d;
59
53
  }
60
54
  });
61
55
  require("./sprinkles.css.ts.vanilla.css-mistica.js");
62
- require("./sheet.css.ts.vanilla.css-mistica.js");
63
- var y = "cylz3v6 _1y2v1nf3p", f = "cylz3v4 _1y2v1nfhg _1y2v1nfl6 _1y2v1nfll _1y2v1nfm0", _ = "cylz3v9 _1y2v1nf81 _1y2v1nfhk _1y2v1nfhq", r = "cylz3vo", l = "_1y2v1nfkq _1y2v1nfi6 _1y2v1nfhk _1y2v1nfhq", a = "cylz3vl", t = "cylz3v7", h = "_1y2v1nf4y _1y2v1nfig _1y2v1nfir _1y2v1nfk4", e = "cylz3vc _1y2v1nf7m _1y2v1nf8v _1y2v1nfhf _1y2v1nfkr _1y2v1nfj1 _1y2v1nfi7 _1y2v1nfhk _1y2v1nfht", i = "_1y2v1nfhk _1y2v1nfhz _1y2v1nfiw", o = "cylz3vf _1y2v1nf7y _1y2v1nf97 _1y2v1nfag _1y2v1nfbp _1y2v1nfhf _1y2v1nfkr _1y2v1nfll", c = "cylz3vk _1y2v1nfhg _1y2v1nf41 _1y2v1nfkr _1y2v1nfl6 _1y2v1nfll _1y2v1nfm0", k = "cylz3vq _1y2v1nf7s _1y2v1nf91 _1y2v1nfaa _1y2v1nfbj _1y2v1nfhk _1y2v1nfjx _1y2v1nfhz", z = "_1y2v1nfhi _1y2v1nfm0 _1y2v1nf3p", s = "_1y2v1nfhi _1y2v1nfkr _1y2v1nf3p", m = 400;
56
+ require("./sheet-common.css.ts.vanilla.css-mistica.js");
57
+ var f = "pidemf6 _1y2v1nf3p", y = "pidemf4 _1y2v1nfhg _1y2v1nfl6 _1y2v1nfll _1y2v1nfm0", _ = "pidemf9 _1y2v1nf81 _1y2v1nfhk _1y2v1nfhq", e = "pidemfo", r = "_1y2v1nfkq _1y2v1nfi6 _1y2v1nfhk _1y2v1nfhq", i = "pidemfl", a = "pidemf7", t = "_1y2v1nf4y _1y2v1nfig _1y2v1nfir _1y2v1nfk4", h = "pidemfc _1y2v1nf7m _1y2v1nf8v _1y2v1nfhf _1y2v1nfkr _1y2v1nfj1 _1y2v1nfi7 _1y2v1nfhk _1y2v1nfht", l = "pidemff _1y2v1nf7y _1y2v1nf97 _1y2v1nfag _1y2v1nfbp _1y2v1nfhf _1y2v1nfkr _1y2v1nfll", o = "pidemfk _1y2v1nfhg _1y2v1nf41 _1y2v1nfkr _1y2v1nfl6 _1y2v1nfll _1y2v1nfm0", m = "_1y2v1nfhi _1y2v1nfm0 _1y2v1nf3p", p = "_1y2v1nfhi _1y2v1nfkr _1y2v1nf3p", d = 400;
@@ -16,5 +16,3 @@ export declare const closingOverlay: string;
16
16
  export declare const stickyTitle: string;
17
17
  export declare const stickyButtons: string;
18
18
  export declare const bodyContent: string;
19
- export declare const sheetActionRow: string;
20
- 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 = "";
@@ -0,0 +1,24 @@
1
+ import * as React from 'react';
2
+ import type { DataAttributes, RendersNullableElement } from './utils/types';
3
+ import type { ButtonLink, ButtonPrimary, ButtonSecondary } from './button';
4
+ type SheetProps = {
5
+ onClose?: () => void;
6
+ dataAttributes?: DataAttributes;
7
+ children: React.ReactNode | ((renderParams: {
8
+ closeModal: () => void;
9
+ modalTitleId: string;
10
+ }) => React.ReactNode);
11
+ };
12
+ declare const Sheet: React.ForwardRefExoticComponent<SheetProps & React.RefAttributes<HTMLDivElement>>;
13
+ type SheetBodyProps = {
14
+ title?: string;
15
+ subtitle?: string;
16
+ description?: string | ReadonlyArray<string>;
17
+ button?: RendersNullableElement<typeof ButtonPrimary>;
18
+ secondaryButton?: RendersNullableElement<typeof ButtonSecondary>;
19
+ link?: RendersNullableElement<typeof ButtonLink>;
20
+ modalTitleId: string;
21
+ children?: React.ReactNode;
22
+ };
23
+ export declare const SheetBody: ({ title, subtitle, description, modalTitleId, button, secondaryButton, link, children, }: SheetBodyProps) => JSX.Element;
24
+ export default Sheet;