@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.
- package/README.md +11 -9
- package/css/mistica.css +1 -1
- package/dist/box.d.ts +1 -0
- package/dist/box.js +12 -12
- package/dist/card.d.ts +14 -2
- package/dist/card.js +210 -206
- package/dist/credit-card-expiration-field.d.ts +1 -1
- package/dist/credit-card-expiration-field.js +53 -52
- package/dist/credit-card-number-field.d.ts +1 -1
- package/dist/credit-card-number-field.js +47 -45
- package/dist/cvv-field.d.ts +1 -1
- package/dist/cvv-field.js +38 -37
- package/dist/date-field.d.ts +1 -1
- package/dist/date-field.js +15 -13
- package/dist/date-time-field.d.ts +1 -1
- package/dist/date-time-field.js +13 -11
- package/dist/decimal-field.d.ts +1 -1
- package/dist/decimal-field.js +39 -38
- package/dist/email-field.d.ts +1 -1
- package/dist/email-field.js +21 -19
- package/dist/form-context.d.ts +7 -2
- package/dist/form-context.js +69 -62
- package/dist/form.d.ts +2 -1
- package/dist/form.js +94 -80
- package/dist/iban-field.d.ts +1 -1
- package/dist/iban-field.js +32 -30
- package/dist/index.d.ts +12 -3
- package/dist/index.js +19 -8
- package/dist/inline.d.ts +2 -1
- package/dist/inline.js +16 -15
- package/dist/integer-field.d.ts +1 -1
- package/dist/integer-field.js +30 -30
- package/dist/month-field.d.ts +1 -1
- package/dist/month-field.js +15 -13
- package/dist/package-version.js +1 -1
- package/dist/password-field.d.ts +1 -1
- package/dist/password-field.js +24 -22
- package/dist/phone-number-field.d.ts +4 -1
- package/dist/phone-number-field.js +84 -52
- package/dist/pin-field.js +21 -20
- package/dist/radio-button.d.ts +1 -0
- package/dist/radio-button.js +42 -41
- package/dist/rating.css-mistica.js +44 -0
- package/dist/rating.css.d.ts +11 -0
- package/dist/rating.css.ts.vanilla.css-mistica.js +11 -0
- package/dist/rating.d.ts +37 -0
- package/dist/rating.js +320 -0
- package/dist/search-field.d.ts +1 -0
- package/dist/search-field.js +18 -16
- package/dist/select.js +36 -33
- package/dist/sheet-action-row.css-mistica.js +13 -0
- package/dist/sheet-action-row.css.d.ts +1 -0
- package/dist/sheet-actions-list.d.ts +26 -0
- package/dist/sheet-actions-list.js +147 -0
- package/dist/sheet-actions.d.ts +23 -0
- package/dist/sheet-actions.js +175 -0
- package/dist/{sheet.css-mistica.js → sheet-common.css-mistica.js} +15 -21
- package/dist/{sheet.css.d.ts → sheet-common.css.d.ts} +0 -2
- package/dist/sheet-common.css.ts.vanilla.css-mistica.js +11 -0
- package/dist/sheet-common.d.ts +24 -0
- package/dist/sheet-common.js +429 -0
- package/dist/sheet-info.css-mistica.js +12 -0
- package/dist/sheet-info.css.d.ts +1 -0
- package/dist/sheet-info.d.ts +28 -0
- package/dist/sheet-info.js +156 -0
- package/dist/sheet-native.d.ts +2 -0
- package/dist/sheet-native.js +173 -0
- package/dist/sheet-radio-list.d.ts +22 -0
- package/dist/sheet-radio-list.js +143 -0
- package/dist/sheet-root.d.ts +4 -85
- package/dist/sheet-root.js +48 -322
- package/dist/sheet-types.d.ts +88 -0
- package/dist/sheet-web.d.ts +8 -0
- package/dist/sheet-web.js +183 -0
- package/dist/slider.js +40 -39
- package/dist/switch-component.js +18 -17
- package/dist/text-field-base.d.ts +3 -1
- package/dist/text-field-base.js +74 -66
- package/dist/text-field-components.css-mistica.js +14 -14
- package/dist/text-field-components.css.d.ts +2 -2
- package/dist/text-field-components.js +49 -39
- package/dist/text-field.d.ts +1 -0
- package/dist/text-field.js +24 -22
- package/dist/text-tokens.d.ts +14 -0
- package/dist/text-tokens.js +145 -89
- package/dist/theme-context-provider.js +6 -5
- package/dist/theme.d.ts +2 -0
- package/dist/utils/credit-card.d.ts +2 -2
- package/dist/utils/credit-card.js +1 -1
- package/dist/vivinho-loading-animation/in-lottie.json.js +544 -612
- package/dist/vivinho-loading-animation/out-lottie.json.js +828 -896
- package/dist/vivinho-loading-animation/pulse-lottie.json.js +798 -866
- package/dist/vivinho-loading-animation/wave-lottie.json.js +4303 -4409
- package/dist-es/box.js +18 -18
- package/dist-es/card.js +305 -301
- package/dist-es/credit-card-expiration-field.js +57 -56
- package/dist-es/credit-card-number-field.js +74 -72
- package/dist-es/cvv-field.js +82 -81
- package/dist-es/date-field.js +29 -27
- package/dist-es/date-time-field.js +29 -27
- package/dist-es/decimal-field.js +46 -45
- package/dist-es/email-field.js +26 -24
- package/dist-es/form-context.js +70 -63
- package/dist-es/form.js +102 -88
- package/dist-es/iban-field.js +35 -33
- package/dist-es/index.js +1822 -1817
- package/dist-es/inline.js +26 -25
- package/dist-es/integer-field.js +31 -31
- package/dist-es/month-field.js +28 -26
- package/dist-es/package-version.js +1 -1
- package/dist-es/password-field.js +37 -35
- package/dist-es/phone-number-field.js +92 -60
- package/dist-es/pin-field.js +32 -31
- package/dist-es/radio-button.js +42 -41
- package/dist-es/rating.css-mistica.js +6 -0
- package/dist-es/rating.css.ts.vanilla.css-mistica.js +2 -0
- package/dist-es/rating.js +257 -0
- package/dist-es/search-field.js +33 -31
- package/dist-es/select.js +49 -46
- package/dist-es/sheet-action-row.css-mistica.js +4 -0
- package/dist-es/sheet-actions-list.js +92 -0
- package/dist-es/sheet-actions.js +125 -0
- package/dist-es/sheet-common.css-mistica.js +4 -0
- package/dist-es/sheet-common.css.ts.vanilla.css-mistica.js +2 -0
- package/dist-es/sheet-common.js +366 -0
- package/dist-es/sheet-info.css-mistica.js +3 -0
- package/dist-es/sheet-info.js +101 -0
- package/dist-es/sheet-native.js +164 -0
- package/dist-es/sheet-radio-list.js +88 -0
- package/dist-es/sheet-root.js +50 -319
- package/dist-es/sheet-web.js +128 -0
- package/dist-es/slider.js +49 -48
- package/dist-es/style.css +1 -1
- package/dist-es/switch-component.js +27 -26
- package/dist-es/text-field-base.js +108 -100
- package/dist-es/text-field-components.css-mistica.js +2 -2
- package/dist-es/text-field-components.js +70 -60
- package/dist-es/text-field.js +33 -31
- package/dist-es/text-tokens.js +80 -45
- package/dist-es/theme-context-provider.js +20 -19
- package/dist-es/utils/credit-card.js +1 -1
- package/dist-es/vivinho-loading-animation/in-lottie.json.js +534 -599
- package/dist-es/vivinho-loading-animation/out-lottie.json.js +821 -886
- package/dist-es/vivinho-loading-animation/pulse-lottie.json.js +790 -855
- package/dist-es/vivinho-loading-animation/wave-lottie.json.js +4297 -4400
- package/package.json +4 -3
- package/dist/sheet.d.ts +0 -107
- package/dist/sheet.js +0 -642
- package/dist-es/sheet.css-mistica.js +0 -4
- package/dist-es/sheet.js +0 -567
- /package/dist/{sheet.css.ts.vanilla.css-mistica.js → sheet-action-row.css.ts.vanilla.css-mistica.js} +0 -0
- /package/dist-es/{sheet.css.ts.vanilla.css-mistica.js → sheet-action-row.css.ts.vanilla.css-mistica.js} +0 -0
|
@@ -29,12 +29,12 @@ function _object_spread(target) {
|
|
|
29
29
|
}
|
|
30
30
|
import { jsxs as P, Fragment as _, jsx as r } from "react/jsx-runtime";
|
|
31
31
|
import * as i from "react";
|
|
32
|
-
import { assignInlineVars as
|
|
32
|
+
import { assignInlineVars as v } from "@vanilla-extract/dynamic";
|
|
33
33
|
import { DialogRoot as I } from "./dialog-context.js";
|
|
34
|
-
import
|
|
35
|
-
import { dimensions as
|
|
36
|
-
import { getPlatform as E, isInsideNovumNativeApp as
|
|
37
|
-
import
|
|
34
|
+
import y from "./screen-size-context-provider.js";
|
|
35
|
+
import { dimensions as F, getMisticaLinkComponent as N, NAVBAR_HEIGHT_MOBILE as $ } from "./theme.js";
|
|
36
|
+
import { getPlatform as E, isInsideNovumNativeApp as j } from "./utils/platform.js";
|
|
37
|
+
import z from "./theme-context.js";
|
|
38
38
|
import { useIsomorphicLayoutEffect as T } from "./hooks.js";
|
|
39
39
|
import L from "./tab-focus.js";
|
|
40
40
|
import A from "./modal-context-provider.js";
|
|
@@ -68,12 +68,12 @@ const re = "(prefers-color-scheme: dark)", oe = ()=>{
|
|
|
68
68
|
};
|
|
69
69
|
}, []), e;
|
|
70
70
|
}, se = ()=>(e)=>e, ie = (e)=>({
|
|
71
|
-
headerMobileHeight: (e == null ? void 0 : e.headerMobileHeight) === "mistica" ?
|
|
71
|
+
headerMobileHeight: (e == null ? void 0 : e.headerMobileHeight) === "mistica" ? $ : e == null ? void 0 : e.headerMobileHeight
|
|
72
72
|
}), ne = ()=>{
|
|
73
|
-
const e = i.useRef(null), [l, n] = i.useState(!1), [s,
|
|
73
|
+
const e = i.useRef(null), [l, n] = i.useState(!1), [s, h] = i.useState(!0);
|
|
74
74
|
return T(()=>{
|
|
75
75
|
var m;
|
|
76
|
-
if (s)
|
|
76
|
+
if (s) h(!1);
|
|
77
77
|
else {
|
|
78
78
|
const p = (m = e.current) == null ? void 0 : m.parentElement;
|
|
79
79
|
p && (p.style.isolation = "isolate", n(!0));
|
|
@@ -89,12 +89,12 @@ const re = "(prefers-color-scheme: dark)", oe = ()=>{
|
|
|
89
89
|
}, ae = (param)=>{
|
|
90
90
|
let { theme: e, children: l, as: n, withoutStyles: s = !1 } = param;
|
|
91
91
|
var _e_colorScheme, _e_skin_borderRadii;
|
|
92
|
-
const
|
|
92
|
+
const h = oe(), m = (_e_colorScheme = e.colorScheme) !== null && _e_colorScheme !== void 0 ? _e_colorScheme : "auto", p = e.skin.colors, R = _object_spread({}, e.skin.colors, e.skin.darkModeColors), g = m === "auto" && h || m === "dark", d = g ? R : p, b = te(e.i18n.locale), k = i.useCallback((o)=>o[b] || o.en, [
|
|
93
93
|
b
|
|
94
94
|
]), c = i.useMemo(()=>{
|
|
95
95
|
const o = _object_spread({
|
|
96
96
|
platform: E(),
|
|
97
|
-
insideNovumNativeApp:
|
|
97
|
+
insideNovumNativeApp: j()
|
|
98
98
|
}, e.platformOverrides), a = Object.entries(J).map((param)=>{
|
|
99
99
|
let [u, x] = param;
|
|
100
100
|
var f;
|
|
@@ -102,7 +102,7 @@ const re = "(prefers-color-scheme: dark)", oe = ()=>{
|
|
|
102
102
|
[u]: _object_spread({}, x, (f = e.skin.textPresets) == null ? void 0 : f[u])
|
|
103
103
|
};
|
|
104
104
|
}), t = Object.assign({}, ...a);
|
|
105
|
-
var _e_useHrefDecorator;
|
|
105
|
+
var _e_useHrefDecorator, _e_preventCopyInFormFields;
|
|
106
106
|
return {
|
|
107
107
|
skinName: e.skin.name,
|
|
108
108
|
i18n: _object_spread({}, e.i18n),
|
|
@@ -113,13 +113,14 @@ const re = "(prefers-color-scheme: dark)", oe = ()=>{
|
|
|
113
113
|
eventFormat: "universal-analytics"
|
|
114
114
|
}, e.analytics),
|
|
115
115
|
colorValues: d,
|
|
116
|
-
dimensions: _object_spread({},
|
|
116
|
+
dimensions: _object_spread({}, F, ie(e.dimensions)),
|
|
117
117
|
textPresets: t,
|
|
118
|
-
Link:
|
|
118
|
+
Link: N(e.Link),
|
|
119
119
|
isDarkMode: g,
|
|
120
120
|
isIos: E(o) === "ios",
|
|
121
121
|
useHrefDecorator: (_e_useHrefDecorator = e.useHrefDecorator) !== null && _e_useHrefDecorator !== void 0 ? _e_useHrefDecorator : se,
|
|
122
|
-
t: k
|
|
122
|
+
t: k,
|
|
123
|
+
preventCopyInFormFields: (_e_preventCopyInFormFields = e.preventCopyInFormFields) !== null && _e_preventCopyInFormFields !== void 0 ? _e_preventCopyInFormFields : !1
|
|
123
124
|
};
|
|
124
125
|
}, [
|
|
125
126
|
d,
|
|
@@ -183,27 +184,27 @@ const re = "(prefers-color-scheme: dark)", oe = ()=>{
|
|
|
183
184
|
disabled: !e.enableTabFocus,
|
|
184
185
|
children: /* @__PURE__ */ r(A, {
|
|
185
186
|
children: /* @__PURE__ */ r(B, {
|
|
186
|
-
children: /* @__PURE__ */ r(
|
|
187
|
+
children: /* @__PURE__ */ r(z.Provider, {
|
|
187
188
|
value: c,
|
|
188
189
|
children: /* @__PURE__ */ r(q, {
|
|
189
190
|
eventFormat: c.analytics.eventFormat,
|
|
190
191
|
children: /* @__PURE__ */ r(W, {
|
|
191
192
|
children: /* @__PURE__ */ r(G, {
|
|
192
|
-
children: /* @__PURE__ */ r(
|
|
193
|
+
children: /* @__PURE__ */ r(y, {
|
|
193
194
|
children: /* @__PURE__ */ r(I, {
|
|
194
195
|
children: /* @__PURE__ */ r(U, {
|
|
195
196
|
children: n ? /*#__PURE__*/ i.createElement(n, {
|
|
196
197
|
style: _object_spread({
|
|
197
198
|
isolation: "isolate"
|
|
198
|
-
},
|
|
199
|
+
}, v(Y, M), v(Z, C)),
|
|
199
200
|
className: s ? void 0 : ee
|
|
200
201
|
}, l) : /* @__PURE__ */ P(_, {
|
|
201
202
|
children: [
|
|
202
203
|
!s && (process.env.NODE_ENV !== "test" || process.env.SSR_TEST) && /* @__PURE__ */ r("style", {
|
|
203
204
|
children: `
|
|
204
|
-
:root {${
|
|
205
|
+
:root {${v(w, M)}}
|
|
205
206
|
@media ${X} {
|
|
206
|
-
:root {${
|
|
207
|
+
:root {${v(w.textPresets, C)}}
|
|
207
208
|
}
|
|
208
209
|
`
|
|
209
210
|
}),
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const
|
|
1
|
+
const t = (s)=>(e)=>!!e && s.test(e), n = t(/^3[47]/), o = t(/^4/), g = t(/^5/), a = (s)=>n(s) ? 4 : 3, i = (s)=>n(s) ? 15 : 16, c = (s)=>!s || !n(s) && !g(s) && !o(s) ? !1 : i(s) === s.length;
|
|
2
2
|
export { i as getCreditCardNumberLength, a as getCvvLength, n as isAmericanExpress, g as isMasterCard, c as isValidCreditCardNumber, o as isVisa };
|