@telefonica/mistica 14.41.0 → 14.42.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.
- package/css/mistica.css +1 -1
- package/dist/boxed.css-mistica.js +14 -5
- package/dist/boxed.css.d.ts +1 -0
- package/dist/boxed.d.ts +1 -0
- package/dist/boxed.js +11 -9
- package/dist/button-fixed-footer-layout.d.ts +1 -0
- package/dist/button-fixed-footer-layout.js +19 -14
- package/dist/button-layout.css-mistica.js +16 -13
- package/dist/button-layout.css.d.ts +1 -0
- package/dist/button-layout.js +15 -15
- package/dist/button.js +43 -35
- package/dist/carousel.d.ts +13 -0
- package/dist/carousel.js +325 -223
- package/dist/credit-card-expiration-field.js +30 -26
- package/dist/credit-card-number-field.css-mistica.js +7 -7
- package/dist/credit-card-number-field.js +59 -45
- package/dist/cvv-field.js +46 -41
- package/dist/date-field.css-mistica.js +14 -0
- package/dist/date-field.css.d.ts +1 -0
- package/dist/date-field.css.ts.vanilla.css-mistica.js +11 -0
- package/dist/date-field.js +41 -35
- package/dist/date-time-field.js +40 -34
- package/dist/date-time-picker.js +43 -45
- package/dist/decimal-field.js +26 -22
- package/dist/dialog-context.d.ts +24 -0
- package/dist/dialog-context.js +192 -0
- package/dist/dialog.css-mistica.js +15 -12
- package/dist/dialog.css.d.ts +1 -0
- package/dist/dialog.d.ts +14 -44
- package/dist/dialog.js +163 -246
- package/dist/double-field.css-mistica.js +3 -2
- package/dist/email-field.js +15 -11
- package/dist/feedback.css-mistica.js +23 -14
- package/dist/feedback.css.d.ts +7 -4
- package/dist/feedback.js +157 -143
- package/dist/fixed-footer-layout.css-mistica.js +1 -1
- package/dist/fixed-footer-layout.js +9 -8
- package/dist/iban-field.js +31 -27
- package/dist/icons/icon-amex.d.ts +1 -1
- package/dist/icons/icon-cvv-amex.d.ts +1 -1
- package/dist/icons/icon-cvv-visa-mc.d.ts +1 -1
- package/dist/icons/icon-mastercard.d.ts +1 -1
- package/dist/icons/icon-visa.d.ts +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +16 -4
- package/dist/inline.css-mistica.js +9 -6
- package/dist/inline.css.d.ts +1 -1
- package/dist/inline.js +9 -9
- package/dist/integer-field.js +17 -13
- package/dist/loading-bar.css-mistica.js +4 -7
- package/dist/loading-bar.css.d.ts +0 -2
- package/dist/loading-bar.js +3 -6
- package/dist/month-field.js +39 -33
- package/dist/package-version.js +1 -1
- package/dist/password-field.js +46 -44
- package/dist/phone-number-field.js +50 -46
- package/dist/pin-field.css-mistica.js +12 -6
- package/dist/pin-field.css.d.ts +2 -0
- package/dist/pin-field.d.ts +3 -1
- package/dist/pin-field.js +129 -95
- package/dist/responsive-layout.css-mistica.js +10 -7
- package/dist/responsive-layout.css.d.ts +2 -1
- package/dist/responsive-layout.d.ts +1 -1
- package/dist/responsive-layout.js +20 -17
- package/dist/search-field.js +36 -35
- package/dist/select.css-mistica.js +16 -15
- package/dist/select.css.d.ts +1 -0
- package/dist/select.js +138 -143
- package/dist/text-field-base.css-mistica.js +45 -21
- package/dist/text-field-base.css.d.ts +30 -7
- package/dist/text-field-base.d.ts +11 -0
- package/dist/text-field-base.js +175 -140
- package/dist/text-field-components.css-mistica.js +13 -21
- package/dist/text-field-components.css.d.ts +0 -3
- package/dist/text-field-components.d.ts +3 -0
- package/dist/text-field-components.js +38 -35
- package/dist/text-field.js +26 -22
- package/dist/text.css-mistica.js +7 -7
- package/dist/text.css.d.ts +0 -1
- package/dist/text.js +24 -24
- package/dist/theme-context-provider.js +2 -2
- package/dist/utils/platform.js +8 -11
- package/dist-es/boxed.css-mistica.js +3 -2
- package/dist-es/boxed.js +17 -15
- package/dist-es/button-fixed-footer-layout.js +29 -24
- package/dist-es/button-layout.css-mistica.js +7 -7
- package/dist-es/button-layout.js +23 -23
- package/dist-es/button.js +65 -57
- package/dist-es/carousel.js +373 -280
- package/dist-es/credit-card-expiration-field.js +34 -30
- package/dist-es/credit-card-number-field.css-mistica.js +4 -4
- package/dist-es/credit-card-number-field.js +84 -70
- package/dist-es/cvv-field.js +68 -63
- package/dist-es/date-field.css-mistica.js +5 -0
- package/dist-es/date-field.css.ts.vanilla.css-mistica.js +2 -0
- package/dist-es/date-field.js +46 -40
- package/dist-es/date-time-field.js +47 -41
- package/dist-es/date-time-picker.js +55 -57
- package/dist-es/decimal-field.js +31 -27
- package/dist-es/dialog-context.js +125 -0
- package/dist-es/dialog.css-mistica.js +3 -3
- package/dist-es/dialog.js +193 -262
- package/dist-es/double-field.css-mistica.js +3 -2
- package/dist-es/email-field.js +16 -12
- package/dist-es/feedback.css-mistica.js +2 -2
- package/dist-es/feedback.js +196 -182
- package/dist-es/fixed-footer-layout.css-mistica.js +1 -1
- package/dist-es/fixed-footer-layout.js +21 -20
- package/dist-es/iban-field.js +42 -38
- package/dist-es/index.js +1778 -1778
- package/dist-es/inline.css-mistica.js +3 -3
- package/dist-es/inline.js +18 -18
- package/dist-es/integer-field.js +21 -17
- package/dist-es/loading-bar.css-mistica.js +2 -2
- package/dist-es/loading-bar.js +10 -13
- package/dist-es/month-field.js +47 -41
- package/dist-es/package-version.js +1 -1
- package/dist-es/password-field.js +54 -52
- package/dist-es/phone-number-field.js +53 -49
- package/dist-es/pin-field.css-mistica.js +2 -2
- package/dist-es/pin-field.js +145 -111
- package/dist-es/responsive-layout.css-mistica.js +3 -3
- package/dist-es/responsive-layout.js +27 -24
- package/dist-es/search-field.js +45 -44
- package/dist-es/select.css-mistica.js +8 -7
- package/dist-es/select.js +167 -172
- package/dist-es/style.css +1 -1
- package/dist-es/text-field-base.css-mistica.js +2 -2
- package/dist-es/text-field-base.js +189 -157
- package/dist-es/text-field-components.css-mistica.js +3 -2
- package/dist-es/text-field-components.js +52 -49
- package/dist-es/text-field.js +31 -27
- package/dist-es/text.css-mistica.js +3 -3
- package/dist-es/text.js +32 -32
- package/dist-es/theme-context-provider.js +1 -1
- package/dist-es/utils/platform.js +6 -6
- package/package.json +1 -1
- package/dist/password-field.css-mistica.js +0 -13
- package/dist/password-field.css.d.ts +0 -1
- package/dist-es/password-field.css-mistica.js +0 -4
- /package/dist/{password-field.css.ts.vanilla.css-mistica.js → boxed.css.ts.vanilla.css-mistica.js} +0 -0
- /package/dist-es/{password-field.css.ts.vanilla.css-mistica.js → boxed.css.ts.vanilla.css-mistica.js} +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -26,7 +26,7 @@ export { LoadingScreen, BrandLoadingScreen } from './loading-screen';
|
|
|
26
26
|
export { default as IconButton } from './icon-button';
|
|
27
27
|
export { default as Popover } from './popover';
|
|
28
28
|
export { default as FocusTrap } from './focus-trap';
|
|
29
|
-
export { confirm, alert, dialog } from './dialog';
|
|
29
|
+
export { confirm, alert, dialog, useDialog } from './dialog-context';
|
|
30
30
|
export { default as Badge } from './badge';
|
|
31
31
|
export { default as TextLink } from './text-link';
|
|
32
32
|
export { default as Overlay } from './overlay';
|
|
@@ -76,7 +76,7 @@ export { default as Image } from './image';
|
|
|
76
76
|
export { default as Chip } from './chip';
|
|
77
77
|
export { default as Video } from './video';
|
|
78
78
|
export type { VideoElement } from './video';
|
|
79
|
-
export { Carousel, CenteredCarousel, Slideshow, PageBullets } from './carousel';
|
|
79
|
+
export { Carousel, CenteredCarousel, Slideshow, PageBullets, CarouselContextProvider, useCarouselContext, CarouselContextConsummer, } from './carousel';
|
|
80
80
|
export { Grid, GridItem } from './grid';
|
|
81
81
|
export { default as Sheet, ActionsSheet, InfoSheet, ActionsListSheet, RadioListSheet, SheetBody, } from './sheet';
|
|
82
82
|
export { default as SheetRoot, showSheet } from './sheet-root';
|
package/dist/index.js
CHANGED
|
@@ -87,6 +87,12 @@ _export(exports, {
|
|
|
87
87
|
Carousel: function() {
|
|
88
88
|
return _carousel.Carousel;
|
|
89
89
|
},
|
|
90
|
+
CarouselContextConsummer: function() {
|
|
91
|
+
return _carousel.CarouselContextConsummer;
|
|
92
|
+
},
|
|
93
|
+
CarouselContextProvider: function() {
|
|
94
|
+
return _carousel.CarouselContextProvider;
|
|
95
|
+
},
|
|
90
96
|
CenteredCarousel: function() {
|
|
91
97
|
return _carousel.CenteredCarousel;
|
|
92
98
|
},
|
|
@@ -5596,7 +5602,7 @@ _export(exports, {
|
|
|
5596
5602
|
return _logo.VivoLogo;
|
|
5597
5603
|
},
|
|
5598
5604
|
alert: function() {
|
|
5599
|
-
return
|
|
5605
|
+
return _dialogcontext.alert;
|
|
5600
5606
|
},
|
|
5601
5607
|
applyAlpha: function() {
|
|
5602
5608
|
return _color.applyAlpha;
|
|
@@ -5605,13 +5611,13 @@ _export(exports, {
|
|
|
5605
5611
|
return _blau.palette;
|
|
5606
5612
|
},
|
|
5607
5613
|
confirm: function() {
|
|
5608
|
-
return
|
|
5614
|
+
return _dialogcontext.confirm;
|
|
5609
5615
|
},
|
|
5610
5616
|
createNestableContext: function() {
|
|
5611
5617
|
return _nestablecontext.createNestableContext;
|
|
5612
5618
|
},
|
|
5613
5619
|
dialog: function() {
|
|
5614
|
-
return
|
|
5620
|
+
return _dialogcontext.dialog;
|
|
5615
5621
|
},
|
|
5616
5622
|
getBlauSkin: function() {
|
|
5617
5623
|
return _blau.getBlauSkin;
|
|
@@ -5670,6 +5676,12 @@ _export(exports, {
|
|
|
5670
5676
|
useAriaId: function() {
|
|
5671
5677
|
return _hooks.useAriaId;
|
|
5672
5678
|
},
|
|
5679
|
+
useCarouselContext: function() {
|
|
5680
|
+
return _carousel.useCarouselContext;
|
|
5681
|
+
},
|
|
5682
|
+
useDialog: function() {
|
|
5683
|
+
return _dialogcontext.useDialog;
|
|
5684
|
+
},
|
|
5673
5685
|
useDocumentVisibility: function() {
|
|
5674
5686
|
return _documentvisibility.useDocumentVisibility;
|
|
5675
5687
|
},
|
|
@@ -5745,7 +5757,7 @@ const _loadingscreen = require("./loading-screen.js");
|
|
|
5745
5757
|
const _iconbutton = /*#__PURE__*/ _interop_require_default(require("./icon-button.js"));
|
|
5746
5758
|
const _popover = /*#__PURE__*/ _interop_require_default(require("./popover.js"));
|
|
5747
5759
|
const _focustrap = /*#__PURE__*/ _interop_require_default(require("./focus-trap.js"));
|
|
5748
|
-
const
|
|
5760
|
+
const _dialogcontext = require("./dialog-context.js");
|
|
5749
5761
|
const _badge = /*#__PURE__*/ _interop_require_default(require("./badge.js"));
|
|
5750
5762
|
const _textlink = /*#__PURE__*/ _interop_require_default(require("./text-link.js"));
|
|
5751
5763
|
const _overlay = /*#__PURE__*/ _interop_require_default(require("./overlay.js"));
|
|
@@ -9,10 +9,10 @@ function _export(target, all) {
|
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
|
-
flexInline: function() {
|
|
13
|
-
return v;
|
|
14
|
-
},
|
|
15
12
|
fullWidth: function() {
|
|
13
|
+
return k;
|
|
14
|
+
},
|
|
15
|
+
inline: function() {
|
|
16
16
|
return a;
|
|
17
17
|
},
|
|
18
18
|
marginInline: function() {
|
|
@@ -21,17 +21,20 @@ _export(exports, {
|
|
|
21
21
|
noFullWidth: function() {
|
|
22
22
|
return r;
|
|
23
23
|
},
|
|
24
|
-
|
|
24
|
+
stringSpace: function() {
|
|
25
25
|
return b;
|
|
26
26
|
},
|
|
27
|
+
vars: function() {
|
|
28
|
+
return e;
|
|
29
|
+
},
|
|
27
30
|
wrap: function() {
|
|
28
31
|
return f;
|
|
29
32
|
}
|
|
30
33
|
});
|
|
31
34
|
require("./inline.css.ts.vanilla.css-mistica.js");
|
|
32
|
-
var
|
|
35
|
+
var k = "kkfbnv6", a = "kkfbnv5", n = "kkfbnv4", r = "kkfbnv8", b = "kkfbnv9", e = {
|
|
33
36
|
space: "var(--kkfbnv0)",
|
|
34
37
|
spaceMobile: "var(--kkfbnv1)",
|
|
35
38
|
spaceTablet: "var(--kkfbnv2)",
|
|
36
39
|
spaceDesktop: "var(--kkfbnv3)"
|
|
37
|
-
}, f = "
|
|
40
|
+
}, f = "kkfbnv7";
|
package/dist/inline.css.d.ts
CHANGED
|
@@ -5,8 +5,8 @@ export declare const vars: {
|
|
|
5
5
|
spaceDesktop: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
6
6
|
};
|
|
7
7
|
export declare const marginInline: string;
|
|
8
|
-
export declare const flexInline: string;
|
|
9
8
|
export declare const inline: string;
|
|
10
9
|
export declare const fullWidth: string;
|
|
11
10
|
export declare const wrap: string;
|
|
12
11
|
export declare const noFullWidth: string;
|
|
12
|
+
export declare const stringSpace: string;
|
package/dist/inline.js
CHANGED
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
Object.defineProperty(exports, "default", {
|
|
7
7
|
enumerable: true,
|
|
8
8
|
get: function() {
|
|
9
|
-
return
|
|
9
|
+
return P;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
12
|
const _jsxruntime = require("react/jsx-runtime");
|
|
@@ -126,23 +126,23 @@ const i = (t)=>typeof t == "number" ? `${t}px` : `space-${t}`, A = (t)=>{
|
|
|
126
126
|
};
|
|
127
127
|
return t.tablet && (e[_inlinecssmistica.vars.spaceTablet] = i(t.tablet)), e;
|
|
128
128
|
}, C = (param)=>{
|
|
129
|
-
let { space: t, className: e, children: s, role: a, alignItems: m = "stretch", "aria-labelledby":
|
|
130
|
-
const
|
|
129
|
+
let { space: t, className: e, children: s, role: a, alignItems: m = "stretch", "aria-labelledby": p, fullWidth: f, wrap: c, dataAttributes: u } = param;
|
|
130
|
+
const { platformOverrides: o } = (0, _hooks.useTheme)(), d = typeof t == "string";
|
|
131
131
|
return /* @__PURE__ */ (0, _jsxruntime.jsx)("div", _object_spread_props(_object_spread({
|
|
132
|
-
className: (0, _classnames.default)(e, (0, _sprinklescssmistica.sprinkles)({
|
|
132
|
+
className: (0, _classnames.default)(e, _inlinecssmistica.inline, (0, _sprinklescssmistica.sprinkles)({
|
|
133
133
|
alignItems: m
|
|
134
|
-
}),
|
|
134
|
+
}), c ? _inlinecssmistica.wrap : f ? _inlinecssmistica.fullWidth : _inlinecssmistica.noFullWidth, d ? _inlinecssmistica.stringSpace : _inlinecssmistica.marginInline),
|
|
135
135
|
style: (0, _css.applyCssVars)(A(t)),
|
|
136
136
|
role: a,
|
|
137
|
-
"aria-labelledby":
|
|
138
|
-
}, (0, _dom.getPrefixedDataAttributes)(
|
|
137
|
+
"aria-labelledby": p
|
|
138
|
+
}, (0, _dom.getPrefixedDataAttributes)(u, "Inline")), {
|
|
139
139
|
children: _react.Children.map(s, (n)=>n || n === 0 ? /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
140
140
|
style: {
|
|
141
141
|
// Hack to fix https://jira.tid.es/browse/WEB-1683
|
|
142
142
|
// In iOS the inline component sometimes cuts the last line of the content
|
|
143
|
-
paddingBottom: (0, _platform.isIos)(
|
|
143
|
+
paddingBottom: (0, _platform.isIos)(o) && !(0, _platform.isRunningAcceptanceTest)(o) ? 1 : void 0
|
|
144
144
|
},
|
|
145
145
|
children: n
|
|
146
146
|
}) : null)
|
|
147
147
|
}));
|
|
148
|
-
},
|
|
148
|
+
}, P = C;
|
package/dist/integer-field.js
CHANGED
|
@@ -11,7 +11,7 @@ function _export(target, all) {
|
|
|
11
11
|
}
|
|
12
12
|
_export(exports, {
|
|
13
13
|
IntegerInput: function() {
|
|
14
|
-
return
|
|
14
|
+
return h;
|
|
15
15
|
},
|
|
16
16
|
default: function() {
|
|
17
17
|
return C;
|
|
@@ -100,7 +100,7 @@ function _object_without_properties_loose(source, excluded) {
|
|
|
100
100
|
}
|
|
101
101
|
return target;
|
|
102
102
|
}
|
|
103
|
-
const
|
|
103
|
+
const h = (_param)=>{
|
|
104
104
|
var { inputRef: u, value: r, defaultValue: n, type: i = "text" } = _param, o = _object_without_properties(_param, [
|
|
105
105
|
"inputRef",
|
|
106
106
|
"value",
|
|
@@ -119,8 +119,8 @@ const T = (_param)=>{
|
|
|
119
119
|
value: r === void 0 ? void 0 : t(r),
|
|
120
120
|
defaultValue: n === void 0 ? void 0 : t(n)
|
|
121
121
|
}));
|
|
122
|
-
},
|
|
123
|
-
var { disabled: u, error: r, helperText: n, name: i, optional: o, validate: t, onChange:
|
|
122
|
+
}, A = (_param)=>{
|
|
123
|
+
var { disabled: u, error: r, helperText: n, name: i, optional: o, validate: t, onChange: d, onChangeValue: e, onBlur: m, value: a, defaultValue: p, dataAttributes: l } = _param, f = _object_without_properties(_param, [
|
|
124
124
|
"disabled",
|
|
125
125
|
"error",
|
|
126
126
|
"helperText",
|
|
@@ -131,23 +131,27 @@ const T = (_param)=>{
|
|
|
131
131
|
"onChangeValue",
|
|
132
132
|
"onBlur",
|
|
133
133
|
"value",
|
|
134
|
-
"defaultValue"
|
|
134
|
+
"defaultValue",
|
|
135
|
+
"dataAttributes"
|
|
135
136
|
]);
|
|
136
|
-
const { texts:
|
|
137
|
+
const { texts: g } = (0, _hooks.useTheme)(), I = (0, _formcontext.useFieldProps)({
|
|
137
138
|
name: i,
|
|
138
|
-
value:
|
|
139
|
-
defaultValue:
|
|
139
|
+
value: a,
|
|
140
|
+
defaultValue: p,
|
|
140
141
|
processValue: (s)=>s.trim(),
|
|
141
142
|
helperText: n,
|
|
142
143
|
optional: o,
|
|
143
144
|
error: r,
|
|
144
145
|
disabled: u,
|
|
145
146
|
onBlur: m,
|
|
146
|
-
validate: (s,
|
|
147
|
-
onChange:
|
|
147
|
+
validate: (s, F)=>s ? t == null ? void 0 : t(s, F) : o ? "" : g.formFieldErrorIsMandatory,
|
|
148
|
+
onChange: d,
|
|
148
149
|
onChangeValue: e
|
|
149
150
|
});
|
|
150
|
-
return /* @__PURE__ */ (0, _jsxruntime.jsx)(_textfieldbase.TextFieldBaseAutosuggest, _object_spread_props(_object_spread({},
|
|
151
|
-
inputComponent:
|
|
151
|
+
return /* @__PURE__ */ (0, _jsxruntime.jsx)(_textfieldbase.TextFieldBaseAutosuggest, _object_spread_props(_object_spread({}, f, I), {
|
|
152
|
+
inputComponent: h,
|
|
153
|
+
dataAttributes: _object_spread({
|
|
154
|
+
"component-name": "IntegerField"
|
|
155
|
+
}, l)
|
|
152
156
|
}));
|
|
153
|
-
}, C =
|
|
157
|
+
}, C = A;
|
|
@@ -10,21 +10,18 @@ function _export(target, all) {
|
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
12
|
hidden: function() {
|
|
13
|
-
return r;
|
|
14
|
-
},
|
|
15
|
-
innerProgress: function() {
|
|
16
13
|
return _;
|
|
17
14
|
},
|
|
18
15
|
portal: function() {
|
|
19
|
-
return
|
|
16
|
+
return r;
|
|
20
17
|
},
|
|
21
18
|
progress: function() {
|
|
22
|
-
return
|
|
19
|
+
return f;
|
|
23
20
|
},
|
|
24
21
|
progressContainer: function() {
|
|
25
|
-
return
|
|
22
|
+
return y;
|
|
26
23
|
}
|
|
27
24
|
});
|
|
28
25
|
require("./sprinkles.css.ts.vanilla.css-mistica.js");
|
|
29
26
|
require("./loading-bar.css.ts.vanilla.css-mistica.js");
|
|
30
|
-
var
|
|
27
|
+
var _ = "_1num3qg3", r = "_1num3qg2 _1y2v1nfge _1y2v1nfjp _1y2v1nfk4 _1y2v1nfkj", f = "_1num3qg7 _1y2v1nfgd _1y2v1nfh5 _1y2v1nfhm", y = "_1y2v1nfh5 _1y2v1nfjj _1y2v1nfgc _1y2v1nf4j _1y2v1nfhp";
|
package/dist/loading-bar.js
CHANGED
|
@@ -71,7 +71,7 @@ function _object_spread_props(target, source) {
|
|
|
71
71
|
}
|
|
72
72
|
return target;
|
|
73
73
|
}
|
|
74
|
-
const
|
|
74
|
+
const l = (param)=>{
|
|
75
75
|
let { visible: a, dataAttributes: o } = param;
|
|
76
76
|
return /* @__PURE__ */ (0, _jsxruntime.jsx)(_portal.Portal, {
|
|
77
77
|
className: (0, _classnames.default)(_loadingbarcssmistica.portal, {
|
|
@@ -81,11 +81,8 @@ const c = (param)=>{
|
|
|
81
81
|
className: _loadingbarcssmistica.progressContainer
|
|
82
82
|
}, (0, _dom.getPrefixedDataAttributes)(o, "LoadingBar")), {
|
|
83
83
|
children: /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
84
|
-
className: _loadingbarcssmistica.progress
|
|
85
|
-
children: /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
86
|
-
className: _loadingbarcssmistica.innerProgress
|
|
87
|
-
})
|
|
84
|
+
className: _loadingbarcssmistica.progress
|
|
88
85
|
})
|
|
89
86
|
}))
|
|
90
87
|
});
|
|
91
|
-
}, u =
|
|
88
|
+
}, u = l;
|
package/dist/month-field.js
CHANGED
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
Object.defineProperty(exports, "default", {
|
|
7
7
|
enumerable: true,
|
|
8
8
|
get: function() {
|
|
9
|
-
return
|
|
9
|
+
return U;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
12
|
const _jsxruntime = require("react/jsx-runtime");
|
|
@@ -18,6 +18,8 @@ const _environment = require("./utils/environment.js");
|
|
|
18
18
|
const _iconcalendarregular = /*#__PURE__*/ _interop_require_default(require("./generated/mistica-icons/icon-calendar-regular.js"));
|
|
19
19
|
const _time = require("./utils/time.js");
|
|
20
20
|
const _hooks = require("./hooks.js");
|
|
21
|
+
const _datefieldcssmistica = require("./date-field.css-mistica.js");
|
|
22
|
+
const _textfieldbasecssmistica = require("./text-field-base.css-mistica.js");
|
|
21
23
|
function _interop_require_default(obj) {
|
|
22
24
|
return obj && obj.__esModule ? obj : {
|
|
23
25
|
default: obj
|
|
@@ -143,8 +145,8 @@ function _object_without_properties_loose(source, excluded) {
|
|
|
143
145
|
}
|
|
144
146
|
return target;
|
|
145
147
|
}
|
|
146
|
-
const
|
|
147
|
-
var { disabled:
|
|
148
|
+
const B = /*#__PURE__*/ _react.lazy(()=>Promise.resolve().then(()=>/*#__PURE__*/ _interop_require_wildcard(require(/* webpackChunkName: "date-time-picker" */ "./date-time-picker.js")))), C = (_param)=>{
|
|
149
|
+
var { disabled: h, error: g, helperText: D, name: F, optional: f, validate: n, onChange: S, onChangeValue: s, onBlur: y, value: R, defaultValue: k, min: o, max: i, dataAttributes: d } = _param, p = _object_without_properties(_param, [
|
|
148
150
|
"disabled",
|
|
149
151
|
"error",
|
|
150
152
|
"helperText",
|
|
@@ -157,43 +159,47 @@ const j = /*#__PURE__*/ _react.lazy(()=>Promise.resolve().then(()=>/*#__PURE__*/
|
|
|
157
159
|
"value",
|
|
158
160
|
"defaultValue",
|
|
159
161
|
"min",
|
|
160
|
-
"max"
|
|
162
|
+
"max",
|
|
163
|
+
"dataAttributes"
|
|
161
164
|
]);
|
|
162
|
-
const
|
|
163
|
-
name:
|
|
164
|
-
value:
|
|
165
|
+
const I = (e)=>e, M = _react.useMemo(()=>(0, _dom.isInputTypeSupported)("month"), []), { texts: T } = (0, _hooks.useTheme)(), m = (e)=>!(o && e && e < (0, _time.getLocalYearMonthString)(o) || i && e && e > (0, _time.getLocalYearMonthString)(i)), u = (0, _formcontext.useFieldProps)({
|
|
166
|
+
name: F,
|
|
167
|
+
value: R,
|
|
165
168
|
defaultValue: k,
|
|
166
|
-
processValue:
|
|
167
|
-
helperText:
|
|
168
|
-
optional:
|
|
169
|
-
error:
|
|
170
|
-
disabled:
|
|
171
|
-
onBlur:
|
|
172
|
-
validate: (
|
|
173
|
-
onChange:
|
|
174
|
-
onChangeValue: (
|
|
175
|
-
|
|
169
|
+
processValue: I,
|
|
170
|
+
helperText: D,
|
|
171
|
+
optional: f,
|
|
172
|
+
error: g,
|
|
173
|
+
disabled: h,
|
|
174
|
+
onBlur: y,
|
|
175
|
+
validate: (e, c)=>m(e) ? n == null ? void 0 : n(e, c) : T.formDateOutOfRangeError,
|
|
176
|
+
onChange: S,
|
|
177
|
+
onChangeValue: (e, c)=>{
|
|
178
|
+
m(e) && (s == null || s(e, c));
|
|
176
179
|
}
|
|
177
|
-
}),
|
|
180
|
+
}), l = /* @__PURE__ */ (0, _jsxruntime.jsx)(_textfieldbase.TextFieldBaseAutosuggest, _object_spread_props(_object_spread({}, p, u), {
|
|
178
181
|
min: o ? (0, _time.getLocalYearMonthString)(o) : void 0,
|
|
179
182
|
max: i ? (0, _time.getLocalYearMonthString)(i) : void 0,
|
|
180
183
|
type: "month",
|
|
181
184
|
endIconOverlay: /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
})
|
|
185
|
+
className: _datefieldcssmistica.iconContainer,
|
|
186
|
+
children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_iconcalendarregular.default, {
|
|
187
|
+
size: _textfieldbasecssmistica.iconSize
|
|
188
|
+
})
|
|
189
|
+
}),
|
|
190
|
+
dataAttributes: _object_spread({
|
|
191
|
+
"component-name": "MonthField"
|
|
192
|
+
}, d)
|
|
190
193
|
}));
|
|
191
|
-
return
|
|
192
|
-
fallback:
|
|
193
|
-
children: /* @__PURE__ */ (0, _jsxruntime.jsx)(
|
|
194
|
-
optional:
|
|
195
|
-
isValidDate: (
|
|
196
|
-
mode: "year-month"
|
|
194
|
+
return M || (0, _environment.isServerSide)() ? l : /* @__PURE__ */ (0, _jsxruntime.jsx)(_react.Suspense, {
|
|
195
|
+
fallback: l,
|
|
196
|
+
children: /* @__PURE__ */ (0, _jsxruntime.jsx)(B, _object_spread_props(_object_spread({}, p, u), {
|
|
197
|
+
optional: f,
|
|
198
|
+
isValidDate: (e)=>m((0, _time.getLocalYearMonthString)(e.toDate())),
|
|
199
|
+
mode: "year-month",
|
|
200
|
+
dataAttributes: _object_spread({
|
|
201
|
+
"component-name": "MonthField"
|
|
202
|
+
}, d)
|
|
197
203
|
}))
|
|
198
204
|
});
|
|
199
|
-
},
|
|
205
|
+
}, U = C;
|
package/dist/package-version.js
CHANGED
package/dist/password-field.js
CHANGED
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
Object.defineProperty(exports, "default", {
|
|
7
7
|
enumerable: true,
|
|
8
8
|
get: function() {
|
|
9
|
-
return
|
|
9
|
+
return C;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
12
|
const _jsxruntime = require("react/jsx-runtime");
|
|
@@ -14,10 +14,9 @@ const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
|
14
14
|
const _formcontext = require("./form-context.js");
|
|
15
15
|
const _textfieldbase = require("./text-field-base.js");
|
|
16
16
|
const _hooks = require("./hooks.js");
|
|
17
|
-
const _iconbutton = require("./icon-button.js");
|
|
18
17
|
const _iconeyeoffregular = /*#__PURE__*/ _interop_require_default(require("./generated/mistica-icons/icon-eye-off-regular.js"));
|
|
19
18
|
const _iconeyeregular = /*#__PURE__*/ _interop_require_default(require("./generated/mistica-icons/icon-eye-regular.js"));
|
|
20
|
-
const
|
|
19
|
+
const _textfieldbasecssmistica = require("./text-field-base.css-mistica.js");
|
|
21
20
|
function _interop_require_default(obj) {
|
|
22
21
|
return obj && obj.__esModule ? obj : {
|
|
23
22
|
default: obj
|
|
@@ -143,20 +142,19 @@ function _object_without_properties_loose(source, excluded) {
|
|
|
143
142
|
}
|
|
144
143
|
return target;
|
|
145
144
|
}
|
|
146
|
-
const
|
|
147
|
-
let { isVisible:
|
|
148
|
-
const { texts:
|
|
149
|
-
return /* @__PURE__ */ (0, _jsxruntime.jsx)(
|
|
150
|
-
|
|
145
|
+
const B = (param)=>{
|
|
146
|
+
let { isVisible: e, setVisibility: n, focus: i } = param;
|
|
147
|
+
const { texts: c } = (0, _hooks.useTheme)();
|
|
148
|
+
return /* @__PURE__ */ (0, _jsxruntime.jsx)(_textfieldbase.FieldEndIcon, {
|
|
149
|
+
Icon: e ? _iconeyeoffregular.default : _iconeyeregular.default,
|
|
150
|
+
"aria-label": c.togglePasswordVisibilityLabel,
|
|
151
|
+
className: _textfieldbasecssmistica.endIconWithShadow,
|
|
151
152
|
onPress: ()=>{
|
|
152
|
-
|
|
153
|
-
}
|
|
154
|
-
size: 40,
|
|
155
|
-
className: _passwordfieldcssmistica.shadow,
|
|
156
|
-
children: s ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_iconeyeoffregular.default, {}) : /* @__PURE__ */ (0, _jsxruntime.jsx)(_iconeyeregular.default, {})
|
|
153
|
+
n(!e), i();
|
|
154
|
+
}
|
|
157
155
|
});
|
|
158
|
-
},
|
|
159
|
-
var { disabled:
|
|
156
|
+
}, L = (_param)=>{
|
|
157
|
+
var { disabled: e, error: n, helperText: i, name: c, optional: f, validate: m, onChange: d, onChangeValue: p, onBlur: P, value: R, autoComplete: w = "current-password", defaultValue: F, dataAttributes: I } = _param, b = _object_without_properties(_param, [
|
|
160
158
|
"disabled",
|
|
161
159
|
"error",
|
|
162
160
|
"helperText",
|
|
@@ -168,51 +166,55 @@ const j = (param)=>{
|
|
|
168
166
|
"onBlur",
|
|
169
167
|
"value",
|
|
170
168
|
"autoComplete",
|
|
171
|
-
"defaultValue"
|
|
169
|
+
"defaultValue",
|
|
170
|
+
"dataAttributes"
|
|
172
171
|
]);
|
|
173
|
-
const [
|
|
172
|
+
const [a, g] = _react.useState(!1), s = _react.useRef(0), o = _react.useRef(null), x = (t)=>t, y = ()=>{
|
|
174
173
|
const t = o.current;
|
|
175
|
-
t && (t.selectionStart !== null && (
|
|
174
|
+
t && (t.selectionStart !== null && (s.current = t.selectionStart), t.focus());
|
|
176
175
|
};
|
|
177
176
|
_react.useEffect(()=>{
|
|
178
177
|
const t = o.current;
|
|
179
178
|
if (t) {
|
|
180
|
-
const
|
|
181
|
-
t.selectionStart =
|
|
179
|
+
const A = requestAnimationFrame(()=>{
|
|
180
|
+
t.selectionStart = s.current, t.selectionEnd = s.current;
|
|
182
181
|
});
|
|
183
182
|
return ()=>{
|
|
184
|
-
cancelAnimationFrame(
|
|
183
|
+
cancelAnimationFrame(A);
|
|
185
184
|
};
|
|
186
185
|
}
|
|
187
186
|
}, [
|
|
188
|
-
|
|
189
|
-
|
|
187
|
+
a,
|
|
188
|
+
s,
|
|
190
189
|
o
|
|
191
190
|
]);
|
|
192
|
-
const
|
|
193
|
-
name:
|
|
194
|
-
value:
|
|
195
|
-
defaultValue:
|
|
196
|
-
processValue:
|
|
197
|
-
helperText:
|
|
198
|
-
optional:
|
|
199
|
-
error:
|
|
200
|
-
disabled:
|
|
201
|
-
onBlur:
|
|
191
|
+
const l = (0, _formcontext.useFieldProps)({
|
|
192
|
+
name: c,
|
|
193
|
+
value: R,
|
|
194
|
+
defaultValue: F,
|
|
195
|
+
processValue: x,
|
|
196
|
+
helperText: i,
|
|
197
|
+
optional: f,
|
|
198
|
+
error: n,
|
|
199
|
+
disabled: e,
|
|
200
|
+
onBlur: P,
|
|
202
201
|
validate: m,
|
|
203
|
-
onChange:
|
|
204
|
-
onChangeValue:
|
|
202
|
+
onChange: d,
|
|
203
|
+
onChangeValue: p
|
|
205
204
|
});
|
|
206
|
-
return /* @__PURE__ */ (0, _jsxruntime.jsx)(_textfieldbase.TextFieldBaseAutosuggest, _object_spread_props(_object_spread({},
|
|
207
|
-
type:
|
|
205
|
+
return /* @__PURE__ */ (0, _jsxruntime.jsx)(_textfieldbase.TextFieldBaseAutosuggest, _object_spread_props(_object_spread({}, b, l), {
|
|
206
|
+
type: a ? "text" : "password",
|
|
208
207
|
inputRef: (t)=>{
|
|
209
|
-
|
|
208
|
+
l.inputRef(t), o.current = t;
|
|
210
209
|
},
|
|
211
210
|
autoComplete: w,
|
|
212
|
-
endIcon: /* @__PURE__ */ (0, _jsxruntime.jsx)(
|
|
213
|
-
focus:
|
|
214
|
-
isVisible:
|
|
215
|
-
setVisibility:
|
|
216
|
-
})
|
|
211
|
+
endIcon: /* @__PURE__ */ (0, _jsxruntime.jsx)(B, {
|
|
212
|
+
focus: y,
|
|
213
|
+
isVisible: a,
|
|
214
|
+
setVisibility: g
|
|
215
|
+
}),
|
|
216
|
+
dataAttributes: _object_spread({
|
|
217
|
+
"component-name": "PasswordField"
|
|
218
|
+
}, I)
|
|
217
219
|
}));
|
|
218
|
-
},
|
|
220
|
+
}, C = L;
|