@telefonica/mistica 14.15.0 → 14.16.1

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 (88) hide show
  1. package/css/mistica.css +1 -1
  2. package/dist/card.d.ts +3 -3
  3. package/dist/card.js +86 -90
  4. package/dist/checkbox.css-mistica.js +4 -4
  5. package/dist/checkbox.js +10 -9
  6. package/dist/credit-card-number-field.js +22 -19
  7. package/dist/cvv-field.js +60 -47
  8. package/dist/date-time-picker.d.ts +10 -0
  9. package/dist/date-time-picker.js +54 -35
  10. package/dist/hooks.d.ts +1 -1
  11. package/dist/icons/icon-cvv-amex.d.ts +1 -0
  12. package/dist/icons/icon-cvv-amex.js +5 -4
  13. package/dist/icons/icon-cvv-visa-mc.d.ts +1 -0
  14. package/dist/icons/icon-cvv-visa-mc.js +7 -6
  15. package/dist/index.d.ts +1 -0
  16. package/dist/list.css-mistica.js +1 -1
  17. package/dist/list.js +90 -91
  18. package/dist/package-version.js +1 -1
  19. package/dist/radio-button.css-mistica.js +12 -12
  20. package/dist/radio-button.js +34 -33
  21. package/dist/search-field.js +8 -8
  22. package/dist/select.css-mistica.js +6 -6
  23. package/dist/select.js +145 -142
  24. package/dist/skins/blau.js +10 -0
  25. package/dist/skins/defaults.js +10 -0
  26. package/dist/skins/movistar-legacy.js +10 -0
  27. package/dist/skins/movistar.js +10 -0
  28. package/dist/skins/o2.js +10 -0
  29. package/dist/skins/telefonica.js +12 -2
  30. package/dist/skins/types/index.d.ts +10 -0
  31. package/dist/skins/vivo-new.js +10 -0
  32. package/dist/skins/vivo.js +10 -0
  33. package/dist/switch-component.css-mistica.js +9 -9
  34. package/dist/switch-component.js +16 -15
  35. package/dist/tabs.js +32 -28
  36. package/dist/text-field-base.js +44 -44
  37. package/dist/theme-context-provider.js +25 -24
  38. package/dist/theme.d.ts +5 -2
  39. package/dist/theme.js +73 -24
  40. package/dist/video.d.ts +7 -1
  41. package/dist/video.js +116 -76
  42. package/dist-es/card.js +115 -119
  43. package/dist-es/checkbox.css-mistica.js +4 -4
  44. package/dist-es/checkbox.js +21 -20
  45. package/dist-es/credit-card-number-field.js +23 -20
  46. package/dist-es/cvv-field.js +74 -61
  47. package/dist-es/date-time-picker.js +66 -47
  48. package/dist-es/icons/icon-cvv-amex.js +5 -4
  49. package/dist-es/icons/icon-cvv-visa-mc.js +9 -8
  50. package/dist-es/list.css-mistica.js +1 -1
  51. package/dist-es/list.js +114 -115
  52. package/dist-es/package-version.js +1 -1
  53. package/dist-es/radio-button.css-mistica.js +6 -6
  54. package/dist-es/radio-button.js +38 -37
  55. package/dist-es/search-field.js +7 -7
  56. package/dist-es/select.css-mistica.js +5 -5
  57. package/dist-es/select.js +173 -170
  58. package/dist-es/skins/blau.js +10 -0
  59. package/dist-es/skins/defaults.js +10 -0
  60. package/dist-es/skins/movistar-legacy.js +10 -0
  61. package/dist-es/skins/movistar.js +10 -0
  62. package/dist-es/skins/o2.js +10 -0
  63. package/dist-es/skins/telefonica.js +12 -2
  64. package/dist-es/skins/vivo-new.js +10 -0
  65. package/dist-es/skins/vivo.js +10 -0
  66. package/dist-es/style.css +1 -1
  67. package/dist-es/switch-component.css-mistica.js +7 -7
  68. package/dist-es/switch-component.js +37 -36
  69. package/dist-es/tabs.js +49 -45
  70. package/dist-es/text-field-base.js +64 -64
  71. package/dist-es/theme-context-provider.js +56 -55
  72. package/dist-es/theme.js +69 -20
  73. package/dist-es/video.js +121 -81
  74. package/package.json +2 -2
  75. package/dist/cvv-field.css-mistica.js +0 -21
  76. package/dist/cvv-field.css.d.ts +0 -2
  77. package/dist/cvv-field.css.ts.vanilla.css-mistica.js +0 -11
  78. package/dist/icons/icon-creditcard.d.ts +0 -7
  79. package/dist/icons/icon-creditcard.js +0 -33
  80. package/dist/icons/icon-info-cvv.d.ts +0 -7
  81. package/dist/icons/icon-info-cvv.js +0 -26
  82. package/dist/icons/icon-search.d.ts +0 -7
  83. package/dist/icons/icon-search.js +0 -32
  84. package/dist-es/cvv-field.css-mistica.js +0 -4
  85. package/dist-es/cvv-field.css.ts.vanilla.css-mistica.js +0 -2
  86. package/dist-es/icons/icon-creditcard.js +0 -24
  87. package/dist-es/icons/icon-info-cvv.js +0 -17
  88. package/dist-es/icons/icon-search.js +0 -23
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  Object.defineProperty(exports, "default", {
6
6
  enumerable: true,
7
7
  get: function() {
8
- return pr;
8
+ return hr;
9
9
  }
10
10
  });
11
11
  const _jsxruntime = require("react/jsx-runtime");
@@ -14,7 +14,7 @@ const _formcontext = require("./form-context.js");
14
14
  const _hooks = require("./hooks.js");
15
15
  const _creditcard = require("./utils/credit-card.js");
16
16
  const _textfieldbase = require("./text-field-base.js");
17
- const _iconcreditcard = /*#__PURE__*/ _interop_require_default(require("./icons/icon-creditcard.js"));
17
+ const _iconcreditcardvisaregular = /*#__PURE__*/ _interop_require_default(require("./generated/mistica-icons/icon-credit-card-visa-regular.js"));
18
18
  const _iconvisa = /*#__PURE__*/ _interop_require_default(require("./icons/icon-visa.js"));
19
19
  const _iconmastercard = /*#__PURE__*/ _interop_require_default(require("./icons/icon-mastercard.js"));
20
20
  const _iconamex = /*#__PURE__*/ _interop_require_default(require("./icons/icon-amex.js"));
@@ -22,6 +22,7 @@ const _rifm = require("rifm");
22
22
  const _dom = require("./utils/dom.js");
23
23
  const _common = require("./utils/common.js");
24
24
  const _creditcardnumberfieldcssmistica = require("./credit-card-number-field.css-mistica.js");
25
+ const _skincontractcssmistica = require("./skins/skin-contract.css-mistica.js");
25
26
  function _interop_require_default(obj) {
26
27
  return obj && obj.__esModule ? obj : {
27
28
  default: obj
@@ -145,12 +146,12 @@ function _object_without_properties_loose(source, excluded) {
145
146
  }
146
147
  return target;
147
148
  }
148
- const Q = (r)=>{
149
+ const W = (r)=>{
149
150
  var t;
150
151
  const i = String(r !== null && r !== void 0 ? r : "").replace(/[^\d]/g, "");
151
152
  var _ref;
152
153
  return (_ref = (t = i.match(/.{1,4}/g)) == null ? void 0 : t.join(" ")) !== null && _ref !== void 0 ? _ref : i;
153
- }, W = (_param)=>{
154
+ }, X = (_param)=>{
154
155
  var { inputRef: r , value: i , defaultValue: t , onChange: e } = _param, a = _object_without_properties(_param, [
155
156
  "inputRef",
156
157
  "value",
@@ -163,7 +164,7 @@ const Q = (r)=>{
163
164
  f,
164
165
  e
165
166
  ]), d = (0, _rifm.useRifm)({
166
- format: Q,
167
+ format: W,
167
168
  value: u,
168
169
  onChange: p,
169
170
  accept: /[\d]+/g
@@ -176,14 +177,14 @@ const Q = (r)=>{
176
177
  value: d.value,
177
178
  ref: (0, _common.combineRefs)(r, m)
178
179
  }));
179
- }, X = (r)=>(0, _creditcard.isVisa)(r) ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_iconvisa.default, {}) : (0, _creditcard.isMasterCard)(r) ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_iconmastercard.default, {}) : (0, _creditcard.isAmericanExpress)(r) ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_iconamex.default, {}) : null, Y = {
180
+ }, Y = (r)=>(0, _creditcard.isVisa)(r) ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_iconvisa.default, {}) : (0, _creditcard.isMasterCard)(r) ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_iconmastercard.default, {}) : (0, _creditcard.isAmericanExpress)(r) ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_iconamex.default, {}) : null, Z = {
180
181
  showBackface: !1,
181
- animationTarget: /* @__PURE__ */ (0, _jsxruntime.jsx)(_iconcreditcard.default, {}),
182
+ animationTarget: /* @__PURE__ */ (0, _jsxruntime.jsx)(_iconcreditcardvisaregular.default, {}),
182
183
  isAnimating: !1
183
- }, Z = (r, param)=>{
184
+ }, v = (r, param)=>{
184
185
  let { type: i , value: t } = param;
185
186
  if (i === "INPUT") {
186
- const e = X(t);
187
+ const e = Y(t);
187
188
  if (e && !r.showBackface) return {
188
189
  animationTarget: e,
189
190
  showBackface: !0,
@@ -201,9 +202,9 @@ const Q = (r)=>{
201
202
  return i === "TRANSITION_END" ? _object_spread_props(_object_spread({}, r), {
202
203
  isAnimating: !1
203
204
  }) : r;
204
- }, v = (param)=>{
205
+ }, rr = (param)=>{
205
206
  let { value: r } = param;
206
- const [{ showBackface: i , animationTarget: t , isAnimating: e }, a] = _react.useReducer(Z, Y);
207
+ const [{ showBackface: i , animationTarget: t , isAnimating: e }, a] = _react.useReducer(v, Z);
207
208
  return _react.useEffect(()=>{
208
209
  a({
209
210
  type: "INPUT",
@@ -221,7 +222,9 @@ const Q = (r)=>{
221
222
  children: [
222
223
  /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
223
224
  className: _creditcardnumberfieldcssmistica.flipFront,
224
- children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_iconcreditcard.default, {})
225
+ children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_iconcreditcardvisaregular.default, {
226
+ color: _skincontractcssmistica.vars.colors.neutralMedium
227
+ })
225
228
  }),
226
229
  /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
227
230
  className: _creditcardnumberfieldcssmistica.flipBack,
@@ -230,7 +233,7 @@ const Q = (r)=>{
230
233
  ]
231
234
  })
232
235
  });
233
- }, rr = (_param)=>{
236
+ }, er = (_param)=>{
234
237
  var { disabled: r , error: i , helperText: t , name: e , optional: a , validate: c , onChange: N , onChangeValue: m , onBlur: f , acceptedCards: u = {
235
238
  americanExpress: !0,
236
239
  visa: !0,
@@ -250,7 +253,7 @@ const Q = (r)=>{
250
253
  "autoComplete",
251
254
  "defaultValue"
252
255
  ]);
253
- const { texts: E } = (0, _hooks.useTheme)(), { jumpToNext: F , rawValues: R , setFormError: S } = (0, _formcontext.useForm)(), h = (n, C)=>{
256
+ const { texts: E } = (0, _hooks.useTheme)(), { jumpToNext: R , rawValues: F , setFormError: S } = (0, _formcontext.useForm)(), h = (n, C)=>{
254
257
  const s = E.formCreditCardNumberError;
255
258
  return n ? (0, _creditcard.isAmericanExpress)(n) && !u.americanExpress || (0, _creditcard.isVisa)(n) && !u.visa || (0, _creditcard.isMasterCard)(n) && !u.masterCard || !(0, _creditcard.isValidCreditCardNumber)(n) || (0, _creditcard.getCreditCardNumberLength)(n) !== n.length ? s : c == null ? void 0 : c(n, C) : a ? "" : E.formFieldErrorIsMandatory;
256
259
  }, b = (n)=>n.replace(/\s/g, ""), k = (0, _formcontext.useFieldProps)({
@@ -277,13 +280,13 @@ const Q = (r)=>{
277
280
  B ? S({
278
281
  name: e,
279
282
  error: B
280
- }) : F(e);
283
+ }) : R(e);
281
284
  }
282
285
  },
283
- inputComponent: W,
286
+ inputComponent: X,
284
287
  autoComplete: d,
285
- endIcon: /* @__PURE__ */ (0, _jsxruntime.jsx)(v, {
286
- value: (_ref = p !== null && p !== void 0 ? p : R[e]) !== null && _ref !== void 0 ? _ref : ""
288
+ endIcon: /* @__PURE__ */ (0, _jsxruntime.jsx)(rr, {
289
+ value: (_ref = p !== null && p !== void 0 ? p : F[e]) !== null && _ref !== void 0 ? _ref : ""
287
290
  })
288
291
  }));
289
- }, pr = rr;
292
+ }, hr = er;
package/dist/cvv-field.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 P;
8
+ return lr;
9
9
  }
10
10
  });
11
11
  const _jsxruntime = require("react/jsx-runtime");
@@ -14,11 +14,16 @@ const _iconcvvvisamc = /*#__PURE__*/ _interop_require_default(require("./icons/i
14
14
  const _iconcvvamex = /*#__PURE__*/ _interop_require_default(require("./icons/icon-cvv-amex.js"));
15
15
  const _tooltip = /*#__PURE__*/ _interop_require_default(require("./tooltip.js"));
16
16
  const _iconbutton = /*#__PURE__*/ _interop_require_default(require("./icon-button.js"));
17
- const _iconinfocvv = /*#__PURE__*/ _interop_require_default(require("./icons/icon-info-cvv.js"));
17
+ const _iconinformationregular = /*#__PURE__*/ _interop_require_default(require("./generated/mistica-icons/icon-information-regular.js"));
18
18
  const _formcontext = require("./form-context.js");
19
19
  const _textfieldbase = require("./text-field-base.js");
20
20
  const _integerfield = require("./integer-field.js");
21
- const _cvvfieldcssmistica = require("./cvv-field.css-mistica.js");
21
+ const _inline = /*#__PURE__*/ _interop_require_default(require("./inline.js"));
22
+ const _stack = /*#__PURE__*/ _interop_require_default(require("./stack.js"));
23
+ const _box = /*#__PURE__*/ _interop_require_default(require("./box.js"));
24
+ const _divider = /*#__PURE__*/ _interop_require_default(require("./divider.js"));
25
+ const _text = /*#__PURE__*/ _interop_require_default(require("./text.js"));
26
+ const _skincontractcssmistica = require("./skins/skin-contract.css-mistica.js");
22
27
  function _interop_require_default(obj) {
23
28
  return obj && obj.__esModule ? obj : {
24
29
  default: obj
@@ -103,45 +108,52 @@ function _object_without_properties_loose(source, excluded) {
103
108
  }
104
109
  return target;
105
110
  }
106
- const J = (param)=>{
107
- let { acceptedCards: o } = param;
111
+ const O = (param)=>{
112
+ let { acceptedCards: t } = param;
108
113
  const { texts: e } = (0, _hooks.useTheme)();
109
- return /* @__PURE__ */ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
110
- children: [
111
- /* @__PURE__ */ (0, _jsxruntime.jsxs)("div", {
112
- className: _cvvfieldcssmistica.tooltipContainer,
114
+ return /* @__PURE__ */ (0, _jsxruntime.jsx)(_jsxruntime.Fragment, {
115
+ children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
116
+ padding: 8,
117
+ children: /* @__PURE__ */ (0, _jsxruntime.jsxs)(_stack.default, {
118
+ space: 8,
113
119
  children: [
114
- /* @__PURE__ */ (0, _jsxruntime.jsx)(_iconcvvvisamc.default, {
115
- size: 48,
116
- role: "img"
117
- }),
118
- /* @__PURE__ */ (0, _jsxruntime.jsx)("p", {
119
- className: _cvvfieldcssmistica.cvvText,
120
- children: e.formCreditCardCvvTooltipVisaMc
121
- })
122
- ]
123
- }),
124
- (o == null ? void 0 : o.americanExpress) && /* @__PURE__ */ (0, _jsxruntime.jsxs)("div", {
125
- className: _cvvfieldcssmistica.tooltipContainer,
126
- children: [
127
- /* @__PURE__ */ (0, _jsxruntime.jsx)(_iconcvvamex.default, {
128
- size: 48,
129
- role: "img"
120
+ /* @__PURE__ */ (0, _jsxruntime.jsxs)(_inline.default, {
121
+ space: 16,
122
+ alignItems: "center",
123
+ children: [
124
+ /* @__PURE__ */ (0, _jsxruntime.jsx)(_iconcvvvisamc.default, {
125
+ size: 48,
126
+ role: "img"
127
+ }),
128
+ /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.default, {
129
+ children: e.formCreditCardCvvTooltipVisaMc
130
+ })
131
+ ]
130
132
  }),
131
- /* @__PURE__ */ (0, _jsxruntime.jsx)("p", {
132
- className: _cvvfieldcssmistica.cvvText,
133
- children: e.formCreditCardCvvTooltipAmex
133
+ /* @__PURE__ */ (0, _jsxruntime.jsx)(_divider.default, {}),
134
+ (t == null ? void 0 : t.americanExpress) && /* @__PURE__ */ (0, _jsxruntime.jsxs)(_inline.default, {
135
+ space: 16,
136
+ alignItems: "center",
137
+ children: [
138
+ /* @__PURE__ */ (0, _jsxruntime.jsx)(_iconcvvamex.default, {
139
+ size: 48,
140
+ role: "img"
141
+ }),
142
+ /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.default, {
143
+ children: e.formCreditCardCvvTooltipAmex
144
+ })
145
+ ]
134
146
  })
135
147
  ]
136
148
  })
137
- ]
149
+ })
138
150
  });
139
- }, K = (_param)=>{
140
- var { disabled: o , error: e , helperText: x , name: s , optional: f , validate: n , onChange: I , onChangeValue: T , onBlur: F , acceptedCards: y = {
151
+ }, Q = (_param)=>{
152
+ var { disabled: t , error: e , helperText: I , name: n , optional: f , validate: s , onChange: x , onChangeValue: T , onBlur: F , acceptedCards: y = {
141
153
  americanExpress: !0,
142
154
  visa: !0,
143
155
  masterCard: !0
144
- } , maxLength: m = 4 , value: E , autoComplete: N = "cc-csc" , defaultValue: V } = _param, j = _object_without_properties(_param, [
156
+ } , maxLength: m = 4 , value: E , autoComplete: M = "cc-csc" , defaultValue: V } = _param, j = _object_without_properties(_param, [
145
157
  "disabled",
146
158
  "error",
147
159
  "helperText",
@@ -157,36 +169,36 @@ const J = (param)=>{
157
169
  "autoComplete",
158
170
  "defaultValue"
159
171
  ]);
160
- const { texts: l } = (0, _hooks.useTheme)(), { setFormError: z , jumpToNext: M } = (0, _formcontext.useForm)(), p = (t, i)=>t ? t.length !== m ? l.formCreditCardCvvError : n == null ? void 0 : n(t, i) : f ? "" : l.formFieldErrorIsMandatory, a = (t)=>t, u = (0, _formcontext.useFieldProps)({
161
- name: s,
172
+ const { texts: l } = (0, _hooks.useTheme)(), { setFormError: z , jumpToNext: B } = (0, _formcontext.useForm)(), p = (o, i)=>o ? o.length !== m ? l.formCreditCardCvvError : s == null ? void 0 : s(o, i) : f ? "" : l.formFieldErrorIsMandatory, a = (o)=>o, u = (0, _formcontext.useFieldProps)({
173
+ name: n,
162
174
  value: E,
163
175
  defaultValue: V,
164
176
  processValue: a,
165
- helperText: x,
177
+ helperText: I,
166
178
  optional: f,
167
179
  error: e,
168
- disabled: o,
180
+ disabled: t,
169
181
  onBlur: F,
170
182
  validate: p,
171
- onChange: I,
183
+ onChange: x,
172
184
  onChangeValue: T
173
185
  });
174
186
  return /* @__PURE__ */ (0, _jsxruntime.jsx)(_textfieldbase.TextFieldBaseAutosuggest, _object_spread_props(_object_spread({}, j, u), {
175
187
  maxLength: m,
176
- onChange: (t)=>{
177
- u.onChange(t);
178
- const i = t.currentTarget.value, d = a(i);
188
+ onChange: (o)=>{
189
+ u.onChange(o);
190
+ const i = o.currentTarget.value, d = a(i);
179
191
  if (d.length === m) {
180
192
  const v = p(d, i);
181
193
  v ? z({
182
- name: s,
194
+ name: n,
183
195
  error: v
184
- }) : M(s);
196
+ }) : B(n);
185
197
  }
186
198
  },
187
199
  endIcon: /* @__PURE__ */ (0, _jsxruntime.jsx)(_tooltip.default, {
188
200
  position: "top",
189
- children: /* @__PURE__ */ (0, _jsxruntime.jsx)(J, {
201
+ children: /* @__PURE__ */ (0, _jsxruntime.jsx)(O, {
190
202
  acceptedCards: y
191
203
  }),
192
204
  targetLabel: l.formCreditCardCvvTooltipVisaMcButton,
@@ -206,13 +218,14 @@ const J = (param)=>{
206
218
  // (40 - 16) / 2
207
219
  top: -12
208
220
  },
209
- children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_iconinfocvv.default, {
210
- size: 20
221
+ children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_iconinformationregular.default, {
222
+ size: 16,
223
+ color: _skincontractcssmistica.vars.colors.neutralMedium
211
224
  })
212
225
  })
213
226
  })
214
227
  }),
215
- autoComplete: N,
228
+ autoComplete: M,
216
229
  inputComponent: _integerfield.IntegerInput
217
230
  }));
218
- }, P = K;
231
+ }, lr = Q;
@@ -1,4 +1,14 @@
1
+ /**
2
+ * Do not use this component!
3
+ * Use DateField or FormDateTimeField
4
+ *
5
+ * This component is a fallback for browsers that don't support datetime-local or date inputs
6
+ */
1
7
  import * as React from 'react';
8
+ import 'moment/locale/es';
9
+ import 'moment/locale/de';
10
+ import 'moment/locale/pt-br';
11
+ import 'moment/locale/en-gb';
2
12
  import type { CommonFormFieldProps } from './text-field-base';
3
13
  import type Moment from 'moment';
4
14
  export interface DateTimePickerProps extends CommonFormFieldProps {
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  Object.defineProperty(exports, "default", {
6
6
  enumerable: true,
7
7
  get: function() {
8
- return Z;
8
+ return ie;
9
9
  }
10
10
  });
11
11
  const _jsxruntime = require("react/jsx-runtime");
@@ -21,6 +21,10 @@ const _hooks = require("./hooks.js");
21
21
  const _iconcloseregular = /*#__PURE__*/ _interop_require_default(require("./generated/mistica-icons/icon-close-regular.js"));
22
22
  const _datetimepickercssmistica = require("./date-time-picker.css-mistica.js");
23
23
  const _skincontractcssmistica = require("./skins/skin-contract.css-mistica.js");
24
+ require("moment/locale/es");
25
+ require("moment/locale/de");
26
+ require("moment/locale/pt-br");
27
+ require("moment/locale/en-gb");
24
28
  function _interop_require_default(obj) {
25
29
  return obj && obj.__esModule ? obj : {
26
30
  default: obj
@@ -144,49 +148,64 @@ function _object_without_properties_loose(source, excluded) {
144
148
  }
145
149
  return target;
146
150
  }
147
- const g = navigator.language.toLocaleLowerCase().split("-")[0];
148
- Promise.resolve(/* webpackChunkName: "moment-locale" */ `moment/locale/${g}`).then((p)=>/*#__PURE__*/ _interop_require_wildcard(require(p))).finally(()=>{});
149
- const Z = (_param)=>{
150
- var { withTime: s , mode: l , isValidDate: y , optional: u } = _param, t = _object_without_properties(_param, [
151
+ const A = {
152
+ es: "es",
153
+ // spanish
154
+ ca: "es",
155
+ // catalan
156
+ eu: "es",
157
+ // euskera
158
+ gl: "es",
159
+ // gallego
160
+ de: "de",
161
+ // german
162
+ pt: "pt-br",
163
+ // portuguese
164
+ en: "en-gb"
165
+ }, O = (a)=>{
166
+ const i = a.toLocaleLowerCase().split("-")[0];
167
+ return A[i] || "en-gb";
168
+ }, ie = (_param)=>{
169
+ var { withTime: a , mode: i , isValidDate: h , optional: u } = _param, t = _object_without_properties(_param, [
151
170
  "withTime",
152
171
  "mode",
153
172
  "isValidDate",
154
173
  "optional"
155
174
  ]);
156
- const [m, x] = _react.useState(!1), { texts: b } = (0, _hooks.useTheme)(), n = _react.useRef(null), { height: v , ref: k } = (0, _hooks.useElementDimensions)(), i = (e)=>{
157
- t.disabled || x(e);
158
- }, w = ()=>{
159
- var p;
160
- const { top: e = 0 , bottom: o = 0 , left: a = 0 } = ((p = n.current) == null ? void 0 : p.getBoundingClientRect()) || {}, P = 260 + o < window.innerHeight;
175
+ const [m, y] = _react.useState(!1), { texts: x , i18n: { locale: b } } = (0, _hooks.useTheme)(), n = _react.useRef(null), { height: k , ref: v } = (0, _hooks.useElementDimensions)(), l = (e)=>{
176
+ t.disabled || y(e);
177
+ }, C = ()=>{
178
+ var f;
179
+ const { top: e = 0 , bottom: o = 0 , left: c = 0 } = ((f = n.current) == null ? void 0 : f.getBoundingClientRect()) || {}, M = 260 + o < window.innerHeight;
161
180
  return {
162
181
  width: _textfieldcomponentscssmistica.DEFAULT_WIDTH,
163
- top: P ? o : e - v,
164
- left: a,
182
+ top: M ? o : e - k,
183
+ left: c,
165
184
  position: "absolute",
166
185
  borderRadius: _skincontractcssmistica.vars.borderRadii.input,
167
186
  overflow: "hidden",
168
187
  boxShadow: "0px 5px 5px -3px rgba(0,0,0,0.2), 0px 8px 10px 1px rgba(0,0,0,0.14), 0px 3px 14px 2px rgba(0,0,0,0.12)"
169
188
  };
170
- }, c = ()=>{
189
+ }, s = ()=>{
171
190
  var o;
172
191
  const e = (o = n.current) == null ? void 0 : o.value;
173
192
  return e ? new Date(e) : void 0;
174
- }, C = (e)=>s ? e.format("yyyy-MM-DD HH:mm") : l === "year-month" ? e.format("yyyy-MM") : e.format("yyyy-MM-DD"), f = (e)=>{
175
- var a;
176
- const o = typeof e == "string" ? e : C(e);
177
- n.current && (n.current.focus(), (a = t.onChange) == null || a.call(t, (0, _dom.createChangeEvent)(n.current, o)));
178
- }, D = ()=>c() && u ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_iconbutton.default, {
179
- "aria-label": b.clearButton,
193
+ }, D = (e)=>a ? e.format("yyyy-MM-DD HH:mm") : i === "year-month" ? e.format("yyyy-MM") : e.format("yyyy-MM-DD"), p = (e)=>{
194
+ var c;
195
+ const o = typeof e == "string" ? e : D(e);
196
+ n.current && (n.current.focus(), (c = t.onChange) == null || c.call(t, (0, _dom.createChangeEvent)(n.current, o)));
197
+ }, w = ()=>s() && u ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_iconbutton.default, {
198
+ "aria-label": x.clearButton,
180
199
  size: 32,
181
200
  onPress: ()=>{
182
- f("");
201
+ p("");
183
202
  },
184
203
  children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_iconcloseregular.default, {})
185
204
  }) : /* @__PURE__ */ (0, _jsxruntime.jsx)(_iconbutton.default, {
186
205
  disabled: t.disabled,
187
206
  "aria-label": "",
188
207
  size: 32,
189
- onPress: ()=>i(!m),
208
+ onPress: ()=>l(!m),
190
209
  children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_iconcalendarregular.default, {})
191
210
  });
192
211
  return /* @__PURE__ */ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
@@ -198,36 +217,36 @@ const Z = (_param)=>{
198
217
  required: !u,
199
218
  type: "text",
200
219
  autoComplete: "off",
201
- shrinkLabel: !!c(),
202
- endIcon: D(),
220
+ shrinkLabel: !!s(),
221
+ endIcon: w(),
203
222
  inputRef: (e)=>{
204
223
  var o;
205
224
  (o = t == null ? void 0 : t.inputRef) == null || o.call(t, e), n.current = e;
206
225
  },
207
226
  readOnly: !0,
208
- onKeyDown: ()=>i(!0),
227
+ onKeyDown: ()=>l(!0),
209
228
  onClick: ()=>{
210
- i(!0);
229
+ l(!0);
211
230
  }
212
231
  })),
213
232
  m && /* @__PURE__ */ (0, _jsxruntime.jsx)(_overlay.default, {
214
233
  onPress: (e)=>{
215
- (0, _dom.cancelEvent)(e), i(!1);
234
+ (0, _dom.cancelEvent)(e), l(!1);
216
235
  },
217
236
  disableScroll: !0,
218
237
  children: /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
219
- ref: k,
220
- style: w(),
238
+ ref: v,
239
+ style: C(),
221
240
  className: _datetimepickercssmistica.reactDatePicker,
222
241
  children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_reactdatetime.default, {
223
- initialViewMode: l === "year-month" ? "months" : void 0,
224
- dateFormat: l === "year-month" ? "YYYY-MM" : void 0,
225
- timeFormat: s ? "HH:mm" : !1,
226
- initialValue: c(),
227
- locale: g,
242
+ initialViewMode: i === "year-month" ? "months" : void 0,
243
+ dateFormat: i === "year-month" ? "YYYY-MM" : void 0,
244
+ timeFormat: a ? "HH:mm" : !1,
245
+ initialValue: s(),
246
+ locale: O(b),
228
247
  input: !1,
229
- onChange: f,
230
- isValidDate: y
248
+ onChange: p,
249
+ isValidDate: h
231
250
  })
232
251
  })
233
252
  })
package/dist/hooks.d.ts CHANGED
@@ -24,7 +24,7 @@ export declare const useIsomorphicLayoutEffect: typeof React.useLayoutEffect;
24
24
  type IntersectionObserverOptions = {
25
25
  root?: Element | Document | null;
26
26
  rootMargin?: string;
27
- threshold?: number | number[];
27
+ threshold?: number | Array<number>;
28
28
  };
29
29
  export declare const useIsInViewport: (ref: React.RefObject<HTMLElement>, defaultValue: boolean, options?: IntersectionObserverOptions) => boolean;
30
30
  export {};
@@ -2,6 +2,7 @@ import * as React from 'react';
2
2
  type Props = {
3
3
  role?: string;
4
4
  size?: number;
5
+ color?: string;
5
6
  };
6
7
  declare const IconCvvAmex: React.FC<Props>;
7
8
  export default IconCvvAmex;
@@ -5,12 +5,13 @@ Object.defineProperty(exports, "__esModule", {
5
5
  Object.defineProperty(exports, "default", {
6
6
  enumerable: true,
7
7
  get: function() {
8
- return a;
8
+ return s;
9
9
  }
10
10
  });
11
11
  const _jsxruntime = require("react/jsx-runtime");
12
+ const _skincontractcssmistica = require("../skins/skin-contract.css-mistica.js");
12
13
  const l = (param)=>/* @__PURE__ */ {
13
- let { role: t = "presentation" , size: c = 48 } = param;
14
+ let { role: t = "presentation" , size: c = 48 , color: r } = param;
14
15
  return (0, _jsxruntime.jsx)("svg", {
15
16
  width: c,
16
17
  height: c,
@@ -20,7 +21,7 @@ const l = (param)=>/* @__PURE__ */ {
20
21
  flexShrink: 0
21
22
  },
22
23
  children: /* @__PURE__ */ (0, _jsxruntime.jsxs)("g", {
23
- fill: "#00A9E0",
24
+ fill: r || _skincontractcssmistica.vars.colors.brand,
24
25
  children: [
25
26
  /* @__PURE__ */ (0, _jsxruntime.jsx)("path", {
26
27
  d: "M2.571 0H45.43C46.849 0 48 1.075 48 2.4v27.2c0 1.325-1.151 2.4-2.571 2.4H2.57C1.151 32 0 30.925 0 29.6V2.4C0 1.075 1.151 0 2.571 0zm0 1.2c-.71 0-1.285.537-1.285 1.2v27.2c0 .663.575 1.2 1.285 1.2H45.43c.71 0 1.285-.537 1.285-1.2V2.4c0-.663-.575-1.2-1.285-1.2H2.57z",
@@ -37,4 +38,4 @@ const l = (param)=>/* @__PURE__ */ {
37
38
  ]
38
39
  })
39
40
  });
40
- }, a = l;
41
+ }, s = l;
@@ -2,6 +2,7 @@ import * as React from 'react';
2
2
  type Props = {
3
3
  role?: string;
4
4
  size?: number;
5
+ color?: string;
5
6
  };
6
7
  declare const IconCvvVisaMc: React.FC<Props>;
7
8
  export default IconCvvVisaMc;
@@ -5,22 +5,23 @@ Object.defineProperty(exports, "__esModule", {
5
5
  Object.defineProperty(exports, "default", {
6
6
  enumerable: true,
7
7
  get: function() {
8
- return s;
8
+ return l;
9
9
  }
10
10
  });
11
11
  const _jsxruntime = require("react/jsx-runtime");
12
- const a = (param)=>/* @__PURE__ */ {
13
- let { role: v = "presentation" , size: t = 48 } = param;
12
+ const _skincontractcssmistica = require("../skins/skin-contract.css-mistica.js");
13
+ const s = (param)=>/* @__PURE__ */ {
14
+ let { role: r = "presentation" , size: t = 48 , color: v } = param;
14
15
  return (0, _jsxruntime.jsx)("svg", {
15
16
  width: t,
16
17
  height: t,
17
18
  viewBox: "0 0 48 48",
18
- role: v,
19
+ role: r,
19
20
  style: {
20
21
  flexShrink: 0
21
22
  },
22
23
  children: /* @__PURE__ */ (0, _jsxruntime.jsxs)("g", {
23
- fill: "#00A9E0",
24
+ fill: v || _skincontractcssmistica.vars.colors.brand,
24
25
  children: [
25
26
  /* @__PURE__ */ (0, _jsxruntime.jsx)("path", {
26
27
  d: "M2.571 0H45.43C46.849 0 48 1.075 48 2.4v27.2c0 1.325-1.151 2.4-2.571 2.4H2.57C1.151 32 0 30.925 0 29.6V2.4C0 1.075 1.151 0 2.571 0zm0 1.2c-.71 0-1.285.537-1.285 1.2v27.2c0 .663.575 1.2 1.285 1.2H45.43c.71 0 1.285-.537 1.285-1.2V2.4c0-.663-.575-1.2-1.285-1.2H2.57z",
@@ -37,4 +38,4 @@ const a = (param)=>/* @__PURE__ */ {
37
38
  ]
38
39
  })
39
40
  });
40
- }, s = a;
41
+ }, l = s;
package/dist/index.d.ts CHANGED
@@ -69,6 +69,7 @@ Logo as NavigationBarLogo, Logo, MovistarLogo, VivoLogo, O2Logo, TelefonicaLogo,
69
69
  export { default as Image } from './image';
70
70
  export { default as Chip } from './chip';
71
71
  export { default as Video } from './video';
72
+ export type { VideoElement } from './video';
72
73
  export { Carousel, CenteredCarousel, Slideshow, PageBullets } from './carousel';
73
74
  export { Grid, GridItem } from './grid';
74
75
  export { default as StackingGroup } from './stacking-group';
@@ -54,4 +54,4 @@ _export(exports, {
54
54
  });
55
55
  require("./sprinkles.css.ts.vanilla.css-mistica.js");
56
56
  require("./list.css.ts.vanilla.css-mistica.js");
57
- var _ = "_1y2v1nf64 _1y2v1nf6m _1y2v1nf6o", y = "_1y2v1nf6d _1y2v1nf9i _1y2v1nf8w _1y2v1nf6m", f = "_1y2v1nf64 _1y2v1nf6j", a = "_1y2v1nf64 _1y2v1nf8f _1y2v1nfa5", r = "_2buj9g0", o = "_1y2v1nf64 _1y2v1nf69", t = "_2buj9gi _1y2v1nf64", i = "_1y2v1nf6r _1y2v1nf76 _1y2v1nf7l _1y2v1nf80 _1y2v1nf66 _1y2v1nfaa _1y2v1nf5y _1y2v1nf7q _1y2v1nf85 _1y2v1nf6p", e = "_2buj9gk _1y2v1nf6r _1y2v1nf76 _1y2v1nf7l _1y2v1nf80 _1y2v1nf66 _1y2v1nfaa _1y2v1nf5y _1y2v1nf7q _1y2v1nf85 _1y2v1nf64 _1y2v1nf6j _1y2v1nf6o _1y2v1nf8g", d = "_2buj9g1", g = "_1y2v1nfar", u = "_2buj9gb", b = "_1y2v1nf64 _1y2v1nf6a _1y2v1nf6q", l = "_1y2v1nf6r _1y2v1nf76 _1y2v1nf7l _1y2v1nf80 _1y2v1nf8f _1y2v1nfaa _1y2v1nf5y";
57
+ var _ = "_1y2v1nf64 _1y2v1nf6m _1y2v1nf6o", y = "_1y2v1nf6d _1y2v1nf9i _1y2v1nf8w _1y2v1nf6m", f = "_1y2v1nf64 _1y2v1nf6j", a = "_1y2v1nf64 _1y2v1nf8f _1y2v1nfa5", r = "_2buj9g0", o = "_1y2v1nf64 _1y2v1nf69", t = "_2buj9gi _1y2v1nf64", i = "_1y2v1nf6r _1y2v1nf76 _1y2v1nf7l _1y2v1nf80 _1y2v1nfaa _1y2v1nf5y _1y2v1nf7q _1y2v1nf85 _1y2v1nf66 _1y2v1nf6p", e = "_2buj9gk _1y2v1nf6r _1y2v1nf76 _1y2v1nf7l _1y2v1nf80 _1y2v1nfaa _1y2v1nf5y _1y2v1nf7q _1y2v1nf85 _1y2v1nf64 _1y2v1nf6j _1y2v1nf6o _1y2v1nf8g _1y2v1nf8w", d = "_2buj9g1", g = "_1y2v1nfar", u = "_2buj9gb", b = "_1y2v1nf64 _1y2v1nf6a _1y2v1nf6q", l = "_1y2v1nf6r _1y2v1nf76 _1y2v1nf7l _1y2v1nf80 _1y2v1nf8f _1y2v1nfaa _1y2v1nf5y";