@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
|
@@ -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
|
|
13
|
+
return f;
|
|
14
14
|
},
|
|
15
15
|
SheetContainer: function() {
|
|
16
|
-
return
|
|
16
|
+
return y;
|
|
17
17
|
},
|
|
18
18
|
SheetContent: function() {
|
|
19
19
|
return _;
|
|
20
20
|
},
|
|
21
21
|
bodyContent: function() {
|
|
22
|
-
return
|
|
22
|
+
return e;
|
|
23
23
|
},
|
|
24
24
|
children: function() {
|
|
25
|
-
return
|
|
25
|
+
return r;
|
|
26
26
|
},
|
|
27
27
|
closingOverlay: function() {
|
|
28
|
-
return
|
|
28
|
+
return i;
|
|
29
29
|
},
|
|
30
30
|
closingSheet: function() {
|
|
31
|
-
return
|
|
31
|
+
return a;
|
|
32
32
|
},
|
|
33
33
|
handle: function() {
|
|
34
|
-
return
|
|
34
|
+
return t;
|
|
35
35
|
},
|
|
36
36
|
handleContainer: function() {
|
|
37
|
-
return
|
|
38
|
-
},
|
|
39
|
-
infoItemIcon: function() {
|
|
40
|
-
return i;
|
|
37
|
+
return h;
|
|
41
38
|
},
|
|
42
39
|
modalCloseButton: function() {
|
|
43
|
-
return
|
|
40
|
+
return l;
|
|
44
41
|
},
|
|
45
42
|
overlay: function() {
|
|
46
|
-
return
|
|
47
|
-
},
|
|
48
|
-
sheetActionRow: function() {
|
|
49
|
-
return k;
|
|
43
|
+
return o;
|
|
50
44
|
},
|
|
51
45
|
stickyButtons: function() {
|
|
52
|
-
return
|
|
46
|
+
return m;
|
|
53
47
|
},
|
|
54
48
|
stickyTitle: function() {
|
|
55
|
-
return
|
|
49
|
+
return p;
|
|
56
50
|
},
|
|
57
51
|
transitionDuration: function() {
|
|
58
|
-
return
|
|
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
|
|
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,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;
|