@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/box.js CHANGED
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  Object.defineProperty(exports, "default", {
6
6
  enumerable: true,
7
7
  get: function() {
8
- return w;
8
+ return B;
9
9
  }
10
10
  });
11
11
  const _jsxruntime = require("react/jsx-runtime");
@@ -111,9 +111,9 @@ function _object_spread_props(target, source) {
111
111
  }
112
112
  return target;
113
113
  }
114
- const D = /*#__PURE__*/ _react.forwardRef((param, k)=>{
115
- let { className: i, children: f, width: l, padding: a = 0, paddingX: b = a, paddingY: m = a, paddingTop: e = m, paddingBottom: o = m, paddingLeft: r = b, paddingRight: t = b, role: x, id: y, dataAttributes: j, "aria-label": u, "aria-hidden": S } = param;
116
- const n = {
114
+ const N = /*#__PURE__*/ _react.forwardRef((param, n)=>{
115
+ let { className: i, children: f, as: x = "div", width: l, padding: a = 0, paddingX: b = a, paddingY: m = a, paddingTop: e = m, paddingBottom: o = m, paddingLeft: r = b, paddingRight: t = b, role: y, id: j, dataAttributes: u, "aria-label": S, "aria-hidden": k } = param;
116
+ const p = {
117
117
  paddingTop: e,
118
118
  paddingBottom: o,
119
119
  paddingLeft: r,
@@ -121,7 +121,7 @@ const D = /*#__PURE__*/ _react.forwardRef((param, k)=>{
121
121
  };
122
122
  let c = {}, s = "";
123
123
  try {
124
- s = (0, _sprinklescssmistica.sprinkles)(n);
124
+ s = (0, _sprinklescssmistica.sprinkles)(p);
125
125
  } catch (e1) {
126
126
  c = {
127
127
  paddingTop: typeof e == "object" ? e.mobile : e,
@@ -130,17 +130,17 @@ const D = /*#__PURE__*/ _react.forwardRef((param, k)=>{
130
130
  paddingRight: typeof t == "object" ? t.mobile : t
131
131
  };
132
132
  }
133
- return /* @__PURE__ */ (0, _jsxruntime.jsx)("div", _object_spread_props(_object_spread({}, (0, _dom.getPrefixedDataAttributes)(j)), {
134
- role: x,
135
- "aria-label": u,
136
- "aria-hidden": S,
137
- ref: k,
133
+ return /* @__PURE__ */ (0, _jsxruntime.jsx)(x, _object_spread_props(_object_spread({}, (0, _dom.getPrefixedDataAttributes)(u)), {
134
+ role: y,
135
+ "aria-label": S,
136
+ "aria-hidden": k,
137
+ ref: n,
138
138
  className: (0, _classnames.default)(i, s),
139
139
  style: _object_spread({}, l !== void 0 ? {
140
140
  width: l,
141
141
  boxSizing: "border-box"
142
142
  } : {}, s ? {} : c),
143
- id: y,
143
+ id: j,
144
144
  children: f
145
145
  }));
146
- }), w = D;
146
+ }), B = N;
package/dist/card.d.ts CHANGED
@@ -183,7 +183,13 @@ type DisplayMediaCardBaseProps = {
183
183
  height?: number | string;
184
184
  };
185
185
  type DisplayMediaCardWithImageProps = CommonDisplayCardProps & {
186
- backgroundImage: string;
186
+ backgroundImage: string | {
187
+ src: string;
188
+ srcSet?: string;
189
+ } | {
190
+ src?: string;
191
+ srcSet: string;
192
+ };
187
193
  };
188
194
  type DisplayMediaCardWithVideoProps = Omit<CommonDisplayCardProps, 'actions' | 'onClose'> & {
189
195
  backgroundVideo: VideoSource;
@@ -227,7 +233,13 @@ interface PosterCardBaseProps {
227
233
  extra?: React.ReactNode;
228
234
  }
229
235
  interface PosterCardWithImageProps extends PosterCardBaseProps {
230
- backgroundImage: string;
236
+ backgroundImage: string | {
237
+ src: string;
238
+ srcSet?: string;
239
+ } | {
240
+ src?: string;
241
+ srcSet: string;
242
+ };
231
243
  }
232
244
  type PosterCardWithVideoProps = Omit<PosterCardBaseProps, 'actions' | 'onClose'> & {
233
245
  backgroundVideo: VideoSource;