@prom-ui/core 1.3.0 → 1.4.0-alpha.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/Avatar/cjs/index.development.js +99 -67
- package/Avatar/cjs/index.development.v2.js +99 -67
- package/Avatar/cjs/index.production.js +1 -1
- package/Avatar/cjs/index.production.v2.js +1 -1
- package/Avatar/index.d.ts +14 -14
- package/Avatar/package.json +1 -1
- package/Avatar/utils.d.ts +2 -2
- package/Backdrop/cjs/index.development.js +131 -77
- package/Backdrop/cjs/index.development.v2.js +131 -77
- package/Backdrop/cjs/index.production.js +1 -1
- package/Backdrop/cjs/index.production.v2.js +1 -1
- package/Backdrop/index.d.ts +25 -25
- package/Backdrop/package.json +1 -1
- package/Body/cjs/index.development.js +2 -0
- package/Body/cjs/index.development.v2.js +2 -0
- package/Body/index.d.ts +36 -36
- package/Body/package.json +1 -1
- package/BodyContext/cjs/index.development.js +6 -7
- package/BodyContext/cjs/index.development.v2.js +6 -7
- package/BodyContext/cjs/index.production.js +1 -1
- package/BodyContext/cjs/index.production.v2.js +1 -1
- package/BodyContext/index.d.ts +12 -12
- package/BodyContext/package.json +1 -1
- package/BodyProvider/cjs/index.development.js +7 -6
- package/BodyProvider/cjs/index.development.v2.js +7 -6
- package/BodyProvider/index.d.ts +10 -10
- package/BodyProvider/package.json +1 -1
- package/Box/cjs/index.development.js +4 -4
- package/Box/cjs/index.development.v2.js +4 -4
- package/Box/index.d.ts +106 -106
- package/Box/package.json +1 -1
- package/Button/cjs/index.development.js +67 -62
- package/Button/cjs/index.development.v2.js +67 -62
- package/Button/cjs/index.production.js +1 -1
- package/Button/cjs/index.production.v2.js +1 -1
- package/Button/index.d.ts +45 -45
- package/Button/package.json +1 -1
- package/ButtonPageUp/cjs/index.development.js +195 -85
- package/ButtonPageUp/cjs/index.development.v2.js +195 -85
- package/ButtonPageUp/cjs/index.production.js +1 -1
- package/ButtonPageUp/cjs/index.production.v2.js +1 -1
- package/ButtonPageUp/index.d.ts +18 -18
- package/ButtonPageUp/package.json +1 -1
- package/Checkbox/cjs/index.development.js +99 -67
- package/Checkbox/cjs/index.development.v2.js +99 -67
- package/Checkbox/cjs/index.production.js +1 -1
- package/Checkbox/cjs/index.production.v2.js +1 -1
- package/Checkbox/index.d.ts +8 -8
- package/Checkbox/package.json +1 -1
- package/Flex/index.d.ts +34 -34
- package/Flex/package.json +1 -1
- package/Grid/index.d.ts +46 -46
- package/Grid/package.json +1 -1
- package/Icon/index.d.ts +9 -9
- package/Icon/package.json +1 -1
- package/Image/index.d.ts +42 -42
- package/Image/package.json +1 -1
- package/ImageEmoji/cjs/index.development.js +70 -63
- package/ImageEmoji/cjs/index.development.v2.js +70 -63
- package/ImageEmoji/cjs/index.production.js +1 -1
- package/ImageEmoji/cjs/index.production.v2.js +1 -1
- package/ImageEmoji/index.d.ts +9 -9
- package/ImageEmoji/package.json +1 -1
- package/Input/index.d.ts +18 -18
- package/Input/package.json +1 -1
- package/InputField/addons/AfterClearValue.d.ts +3 -3
- package/InputField/addons/AfterCorrectValue.d.ts +2 -2
- package/InputField/addons/AfterLoading.d.ts +2 -2
- package/InputField/addons/AfterTogglePassword.d.ts +6 -6
- package/InputField/addons/ErrorText.d.ts +6 -6
- package/InputField/cjs/index.development.js +241 -175
- package/InputField/cjs/index.development.v2.js +241 -175
- package/InputField/cjs/index.production.js +1 -1
- package/InputField/cjs/index.production.v2.js +1 -1
- package/InputField/index.d.ts +18 -18
- package/InputField/package.json +1 -1
- package/InputField/utils.d.ts +10 -10
- package/KeyPress/cjs/index.development.js +13 -13
- package/KeyPress/cjs/index.development.v2.js +13 -13
- package/KeyPress/index.d.ts +14 -14
- package/KeyPress/package.json +1 -1
- package/Line/index.d.ts +13 -13
- package/Line/package.json +1 -1
- package/Link/cjs/index.development.js +5 -5
- package/Link/cjs/index.development.v2.js +5 -5
- package/Link/index.d.ts +28 -28
- package/Link/package.json +1 -1
- package/List/index.d.ts +23 -23
- package/List/package.json +1 -1
- package/Media/MediaProvider.d.ts +8 -8
- package/Media/cjs/index.development.js +70 -19
- package/Media/cjs/index.development.v2.js +70 -19
- package/Media/cjs/index.production.js +1 -1
- package/Media/cjs/index.production.v2.js +1 -1
- package/Media/index.d.ts +20 -20
- package/Media/package.json +1 -1
- package/OutsideClick/cjs/index.development.js +117 -61
- package/OutsideClick/cjs/index.development.v2.js +117 -61
- package/OutsideClick/cjs/index.production.js +1 -1
- package/OutsideClick/cjs/index.production.v2.js +1 -1
- package/OutsideClick/index.d.ts +12 -12
- package/OutsideClick/package.json +1 -1
- package/Overlay/cjs/index.development.js +197 -183
- package/Overlay/cjs/index.development.v2.js +197 -183
- package/Overlay/cjs/index.production.js +1 -1
- package/Overlay/cjs/index.production.v2.js +1 -1
- package/Overlay/components/OverlayHeader.d.ts +11 -11
- package/Overlay/components/SwipeClose.d.ts +11 -11
- package/Overlay/components/TouchScrollable.d.ts +8 -8
- package/Overlay/index.d.ts +76 -76
- package/Overlay/package.json +1 -1
- package/Overlay/utils.d.ts +10 -10
- package/Picture/index.d.ts +70 -70
- package/Picture/package.json +1 -1
- package/Portal/cjs/index.development.js +11 -11
- package/Portal/cjs/index.development.v2.js +11 -11
- package/Portal/index.d.ts +10 -10
- package/Portal/package.json +1 -1
- package/QRCode/cjs/index.development.js +11 -11
- package/QRCode/cjs/index.development.v2.js +11 -11
- package/QRCode/index.d.ts +17 -17
- package/QRCode/package.json +1 -1
- package/Rating/cjs/index.development.js +75 -69
- package/Rating/cjs/index.development.v2.js +75 -69
- package/Rating/cjs/index.production.js +1 -1
- package/Rating/cjs/index.production.v2.js +1 -1
- package/Rating/index.d.ts +17 -17
- package/Rating/package.json +1 -1
- package/RatingSelect/cjs/index.development.js +148 -68
- package/RatingSelect/cjs/index.development.v2.js +148 -68
- package/RatingSelect/cjs/index.production.js +1 -1
- package/RatingSelect/cjs/index.production.v2.js +1 -1
- package/RatingSelect/index.d.ts +22 -18
- package/RatingSelect/package.json +1 -1
- package/SafeQuery/cjs/index.development.js +158 -110
- package/SafeQuery/cjs/index.development.v2.js +158 -110
- package/SafeQuery/cjs/index.production.js +1 -1
- package/SafeQuery/cjs/index.production.v2.js +1 -1
- package/SafeQuery/components/Error.d.ts +7 -7
- package/SafeQuery/index.d.ts +10 -10
- package/SafeQuery/package.json +1 -1
- package/Scroll/index.d.ts +25 -25
- package/Scroll/package.json +1 -1
- package/ScrollControls/ScrollControlsButton.d.ts +11 -11
- package/ScrollControls/cjs/index.development.js +201 -113
- package/ScrollControls/cjs/index.development.v2.js +201 -113
- package/ScrollControls/cjs/index.production.js +1 -1
- package/ScrollControls/cjs/index.production.v2.js +1 -1
- package/ScrollControls/index.d.ts +16 -16
- package/ScrollControls/package.json +1 -1
- package/SimpleSlider/cjs/index.development.js +270 -158
- package/SimpleSlider/cjs/index.development.v2.js +270 -158
- package/SimpleSlider/cjs/index.production.js +1 -1
- package/SimpleSlider/cjs/index.production.v2.js +1 -1
- package/SimpleSlider/index.d.ts +41 -41
- package/SimpleSlider/package.json +1 -1
- package/SimpleSlider/useAutoPlay.d.ts +3 -3
- package/SimpleSlider/utils.d.ts +19 -19
- package/Skeleton/cjs/index.development.js +118 -64
- package/Skeleton/cjs/index.development.v2.js +118 -64
- package/Skeleton/cjs/index.production.js +1 -1
- package/Skeleton/cjs/index.production.v2.js +1 -1
- package/Skeleton/index.d.ts +37 -37
- package/Skeleton/package.json +1 -1
- package/Spinner/cjs/index.development.js +66 -61
- package/Spinner/cjs/index.development.v2.js +66 -61
- package/Spinner/cjs/index.production.js +1 -1
- package/Spinner/cjs/index.production.v2.js +1 -1
- package/Spinner/index.d.ts +29 -29
- package/Spinner/package.json +1 -1
- package/Text/index.d.ts +25 -25
- package/Text/package.json +1 -1
- package/TextEmoji/cjs/index.development.js +65 -60
- package/TextEmoji/cjs/index.development.v2.js +65 -60
- package/TextEmoji/cjs/index.production.js +1 -1
- package/TextEmoji/cjs/index.production.v2.js +1 -1
- package/TextEmoji/index.d.ts +9 -9
- package/TextEmoji/package.json +1 -1
- package/Tooltip/cjs/index.development.js +80 -91
- package/Tooltip/cjs/index.development.v2.js +80 -91
- package/Tooltip/cjs/index.production.js +1 -1
- package/Tooltip/cjs/index.production.v2.js +1 -1
- package/Tooltip/index.d.ts +87 -87
- package/Tooltip/package.json +1 -1
- package/Tumbler/cjs/index.development.js +98 -66
- package/Tumbler/cjs/index.development.v2.js +98 -66
- package/Tumbler/cjs/index.production.js +1 -1
- package/Tumbler/cjs/index.production.v2.js +1 -1
- package/Tumbler/index.d.ts +8 -8
- package/Tumbler/package.json +1 -1
- package/package.json +7 -5
- package/useBodyTTag/cjs/index.development.js +1 -1
- package/useBodyTTag/cjs/index.development.v2.js +1 -1
- package/useBodyTTag/index.d.ts +2 -2
- package/useBodyTTag/package.json +1 -1
- package/useDebounce/cjs/index.development.js +58 -6
- package/useDebounce/cjs/index.development.v2.js +58 -6
- package/useDebounce/cjs/index.production.js +1 -1
- package/useDebounce/cjs/index.production.v2.js +1 -1
- package/useDebounce/index.d.ts +4 -4
- package/useDebounce/package.json +1 -1
- package/useId/cjs/index.development.js +6 -7
- package/useId/cjs/index.development.v2.js +6 -7
- package/useId/cjs/index.production.js +1 -1
- package/useId/cjs/index.production.v2.js +1 -1
- package/useId/index.d.ts +4 -4
- package/useId/package.json +1 -1
- package/useIsMounted/cjs/index.development.js +3 -3
- package/useIsMounted/cjs/index.development.v2.js +3 -3
- package/useIsMounted/index.d.ts +4 -4
- package/useIsMounted/package.json +1 -1
- package/useKeyPress/cjs/index.development.js +76 -22
- package/useKeyPress/cjs/index.development.v2.js +76 -22
- package/useKeyPress/cjs/index.production.js +1 -1
- package/useKeyPress/cjs/index.production.v2.js +1 -1
- package/useKeyPress/index.d.ts +6 -6
- package/useKeyPress/package.json +1 -1
- package/useMedia/cjs/index.development.js +5 -5
- package/useMedia/cjs/index.development.v2.js +5 -5
- package/useMedia/index.d.ts +21 -21
- package/useMedia/package.json +1 -1
- package/useOutsideClick/cjs/index.development.js +2 -2
- package/useOutsideClick/cjs/index.development.v2.js +2 -2
- package/useOutsideClick/index.d.ts +5 -5
- package/useOutsideClick/package.json +1 -1
- package/usePortal/cjs/index.development.js +32 -27
- package/usePortal/cjs/index.development.v2.js +32 -27
- package/usePortal/index.d.ts +12 -12
- package/usePortal/package.json +1 -1
- package/useScrollPosition/cjs/index.development.js +2 -2
- package/useScrollPosition/cjs/index.development.v2.js +2 -2
- package/useScrollPosition/index.d.ts +5 -5
- package/useScrollPosition/package.json +1 -1
|
@@ -15,136 +15,195 @@ var Ok = require('@prom-ui/icons/Ok');
|
|
|
15
15
|
var Cancel = require('@prom-ui/icons/Cancel');
|
|
16
16
|
|
|
17
17
|
function _interopNamespaceCompat(e) {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
});
|
|
28
|
-
}
|
|
18
|
+
if (e && typeof e === 'object' && 'default' in e) return e;
|
|
19
|
+
var n = Object.create(null);
|
|
20
|
+
if (e) {
|
|
21
|
+
Object.keys(e).forEach(function (k) {
|
|
22
|
+
if (k !== 'default') {
|
|
23
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
24
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () { return e[k]; }
|
|
29
27
|
});
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
n.default = e;
|
|
32
|
+
return Object.freeze(n);
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
var React__namespace = /*#__PURE__*/_interopNamespaceCompat(React);
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
37
|
+
function _iterableToArrayLimit(arr, i) {
|
|
38
|
+
var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
|
|
39
|
+
if (null != _i) {
|
|
40
|
+
var _s,
|
|
41
|
+
_e,
|
|
42
|
+
_x,
|
|
43
|
+
_r,
|
|
44
|
+
_arr = [],
|
|
45
|
+
_n = !0,
|
|
46
|
+
_d = !1;
|
|
47
|
+
try {
|
|
48
|
+
if (_x = (_i = _i.call(arr)).next, 0 === i) {
|
|
49
|
+
if (Object(_i) !== _i) return;
|
|
50
|
+
_n = !1;
|
|
51
|
+
} else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
|
|
52
|
+
} catch (err) {
|
|
53
|
+
_d = !0, _e = err;
|
|
54
|
+
} finally {
|
|
55
|
+
try {
|
|
56
|
+
if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return;
|
|
57
|
+
} finally {
|
|
58
|
+
if (_d) throw _e;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return _arr;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
function _extends() {
|
|
65
|
+
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
66
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
67
|
+
var source = arguments[i];
|
|
68
|
+
for (var key in source) {
|
|
69
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
70
|
+
target[key] = source[key];
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
return target;
|
|
75
|
+
};
|
|
76
|
+
return _extends.apply(this, arguments);
|
|
77
|
+
}
|
|
78
|
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
79
|
+
if (source == null) return {};
|
|
80
|
+
var target = {};
|
|
81
|
+
var sourceKeys = Object.keys(source);
|
|
82
|
+
var key, i;
|
|
83
|
+
for (i = 0; i < sourceKeys.length; i++) {
|
|
84
|
+
key = sourceKeys[i];
|
|
85
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
86
|
+
target[key] = source[key];
|
|
87
|
+
}
|
|
88
|
+
return target;
|
|
89
|
+
}
|
|
90
|
+
function _objectWithoutProperties(source, excluded) {
|
|
91
|
+
if (source == null) return {};
|
|
92
|
+
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
93
|
+
var key, i;
|
|
94
|
+
if (Object.getOwnPropertySymbols) {
|
|
95
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
96
|
+
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
97
|
+
key = sourceSymbolKeys[i];
|
|
98
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
99
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
100
|
+
target[key] = source[key];
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
return target;
|
|
104
|
+
}
|
|
105
|
+
function _taggedTemplateLiteral(strings, raw) {
|
|
106
|
+
if (!raw) {
|
|
107
|
+
raw = strings.slice(0);
|
|
108
|
+
}
|
|
109
|
+
return Object.freeze(Object.defineProperties(strings, {
|
|
110
|
+
raw: {
|
|
111
|
+
value: Object.freeze(raw)
|
|
112
|
+
}
|
|
113
|
+
}));
|
|
114
|
+
}
|
|
115
|
+
function _slicedToArray(arr, i) {
|
|
116
|
+
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
117
|
+
}
|
|
118
|
+
function _arrayWithHoles(arr) {
|
|
119
|
+
if (Array.isArray(arr)) return arr;
|
|
120
|
+
}
|
|
121
|
+
function _unsupportedIterableToArray(o, minLen) {
|
|
122
|
+
if (!o) return;
|
|
123
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
124
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
125
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
126
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
|
127
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
128
|
+
}
|
|
129
|
+
function _arrayLikeToArray(arr, len) {
|
|
130
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
131
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
132
|
+
return arr2;
|
|
133
|
+
}
|
|
134
|
+
function _nonIterableRest() {
|
|
135
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
78
136
|
}
|
|
79
137
|
|
|
80
|
-
var
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
138
|
+
var _templateObject$1, _templateObject2;
|
|
139
|
+
var AfterTogglePassword = function AfterTogglePassword(_ref) {
|
|
140
|
+
var inputType = _ref.inputType,
|
|
141
|
+
onChange = _ref.onChange;
|
|
142
|
+
var _useBodyTTag = useBodyTTag.useBodyTTag(),
|
|
143
|
+
t = _useBodyTTag.t;
|
|
84
144
|
if (inputType === 'text') {
|
|
85
|
-
return React__namespace.createElement(Button.Button, {
|
|
86
|
-
type:
|
|
87
|
-
"button-height":
|
|
88
|
-
"button-width":
|
|
89
|
-
"button-padding":
|
|
90
|
-
onClick: function () {
|
|
145
|
+
return /*#__PURE__*/React__namespace.createElement(Button.Button, {
|
|
146
|
+
type: "button",
|
|
147
|
+
"button-height": "1-1",
|
|
148
|
+
"button-width": "1-1",
|
|
149
|
+
"button-padding": "none",
|
|
150
|
+
onClick: function onClick() {
|
|
91
151
|
return onChange('password');
|
|
92
152
|
},
|
|
93
|
-
title: t(
|
|
153
|
+
title: t(_templateObject$1 || (_templateObject$1 = _taggedTemplateLiteral(["\u0421\u043A\u0440\u044B\u0442\u044C \u043F\u0430\u0440\u043E\u043B\u044C"]))),
|
|
94
154
|
tabIndex: -1,
|
|
95
|
-
"data-qaid":
|
|
96
|
-
"data-testid":
|
|
97
|
-
}, React__namespace.createElement(Icon.Icon, {
|
|
155
|
+
"data-qaid": "input_field_hide_password",
|
|
156
|
+
"data-testid": "input_field_hide_password"
|
|
157
|
+
}, /*#__PURE__*/React__namespace.createElement(Icon.Icon, {
|
|
98
158
|
"icon-as": EyeOpen.SvgEyeOpen,
|
|
99
|
-
"icon-color":
|
|
100
|
-
"icon-events":
|
|
159
|
+
"icon-color": "black-700",
|
|
160
|
+
"icon-events": "none",
|
|
101
161
|
style: {
|
|
102
162
|
width: 16,
|
|
103
163
|
height: 16
|
|
104
164
|
}
|
|
105
165
|
}));
|
|
106
166
|
}
|
|
107
|
-
return React__namespace.createElement(Button.Button, {
|
|
108
|
-
type:
|
|
109
|
-
"button-height":
|
|
110
|
-
"button-width":
|
|
111
|
-
"button-padding":
|
|
112
|
-
onClick: function () {
|
|
167
|
+
return /*#__PURE__*/React__namespace.createElement(Button.Button, {
|
|
168
|
+
type: "button",
|
|
169
|
+
"button-height": "1-1",
|
|
170
|
+
"button-width": "1-1",
|
|
171
|
+
"button-padding": "none",
|
|
172
|
+
onClick: function onClick() {
|
|
113
173
|
return onChange('text');
|
|
114
174
|
},
|
|
115
|
-
title: t(
|
|
175
|
+
title: t(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043F\u0430\u0440\u043E\u043B\u044C"]))),
|
|
116
176
|
tabIndex: -1,
|
|
117
|
-
"data-qaid":
|
|
118
|
-
"data-testid":
|
|
119
|
-
}, React__namespace.createElement(Icon.Icon, {
|
|
177
|
+
"data-qaid": "input_field_show_password",
|
|
178
|
+
"data-testid": "input_field_show_password"
|
|
179
|
+
}, /*#__PURE__*/React__namespace.createElement(Icon.Icon, {
|
|
120
180
|
"icon-as": EyeClose.SvgEyeClose,
|
|
121
|
-
"icon-color":
|
|
122
|
-
"icon-events":
|
|
181
|
+
"icon-color": "black-600",
|
|
182
|
+
"icon-events": "none",
|
|
123
183
|
style: {
|
|
124
184
|
width: 16,
|
|
125
185
|
height: 16
|
|
126
186
|
}
|
|
127
187
|
}));
|
|
128
188
|
};
|
|
129
|
-
var templateObject_1$1, templateObject_2;
|
|
130
189
|
|
|
131
|
-
var AfterLoading = function () {
|
|
132
|
-
return React__namespace.createElement(Spinner.Spinner, {
|
|
133
|
-
"spinner-color":
|
|
190
|
+
var AfterLoading = function AfterLoading() {
|
|
191
|
+
return /*#__PURE__*/React__namespace.createElement(Spinner.Spinner, {
|
|
192
|
+
"spinner-color": "violet-500",
|
|
134
193
|
width: 16,
|
|
135
194
|
height: 16,
|
|
136
|
-
"data-qaid":
|
|
137
|
-
"data-testid":
|
|
195
|
+
"data-qaid": "input_field_loading",
|
|
196
|
+
"data-testid": "input_field_loading"
|
|
138
197
|
});
|
|
139
198
|
};
|
|
140
199
|
|
|
141
|
-
var AfterCorrectValue = function () {
|
|
142
|
-
return React__namespace.createElement(Icon.Icon, {
|
|
200
|
+
var AfterCorrectValue = function AfterCorrectValue() {
|
|
201
|
+
return /*#__PURE__*/React__namespace.createElement(Icon.Icon, {
|
|
143
202
|
"icon-as": Ok.SvgOk,
|
|
144
|
-
"icon-color":
|
|
145
|
-
"icon-events":
|
|
146
|
-
"data-qaid":
|
|
147
|
-
"data-testid":
|
|
203
|
+
"icon-color": "green-800",
|
|
204
|
+
"icon-events": "none",
|
|
205
|
+
"data-qaid": "input_field_correct_value",
|
|
206
|
+
"data-testid": "input_field_correct_value",
|
|
148
207
|
style: {
|
|
149
208
|
width: 16,
|
|
150
209
|
height: 16
|
|
@@ -152,39 +211,40 @@ var AfterCorrectValue = function () {
|
|
|
152
211
|
});
|
|
153
212
|
};
|
|
154
213
|
|
|
155
|
-
var
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
"button
|
|
161
|
-
"button-
|
|
162
|
-
|
|
214
|
+
var _templateObject;
|
|
215
|
+
var AfterClearValue = function AfterClearValue(props) {
|
|
216
|
+
var _useBodyTTag = useBodyTTag.useBodyTTag(),
|
|
217
|
+
t = _useBodyTTag.t;
|
|
218
|
+
return /*#__PURE__*/React__namespace.createElement(Button.Button, _extends({
|
|
219
|
+
type: "button",
|
|
220
|
+
"button-height": "1-1",
|
|
221
|
+
"button-width": "1-1",
|
|
222
|
+
"button-padding": "none",
|
|
223
|
+
title: t(_templateObject || (_templateObject = _taggedTemplateLiteral(["\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C"]))),
|
|
163
224
|
tabIndex: -1,
|
|
164
|
-
"data-qaid":
|
|
165
|
-
"data-testid":
|
|
166
|
-
}, props), React__namespace.createElement(Icon.Icon, {
|
|
225
|
+
"data-qaid": "input_field_clear_value",
|
|
226
|
+
"data-testid": "input_field_clear_value"
|
|
227
|
+
}, props), /*#__PURE__*/React__namespace.createElement(Icon.Icon, {
|
|
167
228
|
"icon-as": Cancel.SvgCancel,
|
|
168
|
-
"icon-color":
|
|
169
|
-
"icon-events":
|
|
229
|
+
"icon-color": "black-600",
|
|
230
|
+
"icon-events": "none",
|
|
170
231
|
style: {
|
|
171
232
|
width: 16,
|
|
172
233
|
height: 16
|
|
173
234
|
}
|
|
174
235
|
}));
|
|
175
236
|
};
|
|
176
|
-
var templateObject_1;
|
|
177
237
|
|
|
178
238
|
var css = {"root":"InputField__root___UnXum","input":"InputField__input___1Wl0O","beforeAndAfter":"InputField__beforeAndAfter___cUXq3","before":"InputField__before___-TbcG InputField__beforeAndAfter___cUXq3","after":"InputField__after___QmiGS InputField__beforeAndAfter___cUXq3","error":"InputField__error___7Fcq2","label":"InputField__label___uV711","labelRequired":"InputField__labelRequired___cxqrg"};
|
|
179
239
|
|
|
180
|
-
var ErrorText = function (
|
|
181
|
-
var id =
|
|
182
|
-
children =
|
|
183
|
-
return React__namespace.createElement("div", {
|
|
240
|
+
var ErrorText = function ErrorText(_ref) {
|
|
241
|
+
var id = _ref.id,
|
|
242
|
+
children = _ref.children;
|
|
243
|
+
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
184
244
|
id: id,
|
|
185
245
|
className: css.error,
|
|
186
|
-
"data-qaid":
|
|
187
|
-
"data-testid":
|
|
246
|
+
"data-qaid": "input_field_error",
|
|
247
|
+
"data-testid": "input_field_error"
|
|
188
248
|
}, children);
|
|
189
249
|
};
|
|
190
250
|
|
|
@@ -205,7 +265,9 @@ function resolveOnChange(target, e, onChange, targetValue) {
|
|
|
205
265
|
// setQuery((prevStatus) => e.target.value);
|
|
206
266
|
// }}
|
|
207
267
|
// />
|
|
268
|
+
|
|
208
269
|
var currentTarget = target.cloneNode(true);
|
|
270
|
+
|
|
209
271
|
// Click clear button
|
|
210
272
|
event = Object.create(e, {
|
|
211
273
|
target: {
|
|
@@ -219,6 +281,7 @@ function resolveOnChange(target, e, onChange, targetValue) {
|
|
|
219
281
|
onChange(event);
|
|
220
282
|
return;
|
|
221
283
|
}
|
|
284
|
+
|
|
222
285
|
// Trigger by composition event, this means we need force change the input value
|
|
223
286
|
if (targetValue !== undefined) {
|
|
224
287
|
event = Object.create(e, {
|
|
@@ -250,10 +313,8 @@ function isNotEmptyArray(arr) {
|
|
|
250
313
|
function getIsValueEmpty(value) {
|
|
251
314
|
return valueToString(value).length <= 0;
|
|
252
315
|
}
|
|
253
|
-
var useForwardRef = function (ref
|
|
254
|
-
|
|
255
|
-
initialValue = null;
|
|
256
|
-
}
|
|
316
|
+
var useForwardRef = function useForwardRef(ref) {
|
|
317
|
+
var initialValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
257
318
|
var targetRef = React__namespace.useRef(initialValue);
|
|
258
319
|
React__namespace.useEffect(function () {
|
|
259
320
|
if (ref) {
|
|
@@ -267,16 +328,18 @@ var useForwardRef = function (ref, initialValue) {
|
|
|
267
328
|
}, [ref]);
|
|
268
329
|
return targetRef;
|
|
269
330
|
};
|
|
270
|
-
var prepareErrorList = function (prefix, error) {
|
|
331
|
+
var prepareErrorList = function prepareErrorList(prefix, error) {
|
|
271
332
|
var result = [];
|
|
272
333
|
if (Array.isArray(error)) {
|
|
273
|
-
result = error.
|
|
334
|
+
result = error.filter(function (errorItem) {
|
|
335
|
+
return Boolean(errorItem);
|
|
336
|
+
}).map(function (errorItem, index) {
|
|
274
337
|
return {
|
|
275
338
|
id: "".concat(prefix, "-error-").concat(index),
|
|
276
339
|
content: errorItem
|
|
277
340
|
};
|
|
278
341
|
});
|
|
279
|
-
} else if (typeof error === 'string') {
|
|
342
|
+
} else if (typeof error === 'string' && Boolean(error)) {
|
|
280
343
|
result = [{
|
|
281
344
|
id: "".concat(prefix, "-error-0"),
|
|
282
345
|
content: error
|
|
@@ -285,29 +348,32 @@ var prepareErrorList = function (prefix, error) {
|
|
|
285
348
|
return result;
|
|
286
349
|
};
|
|
287
350
|
|
|
288
|
-
var
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
addonBeforeWidth =
|
|
293
|
-
|
|
294
|
-
addonAfterWidth =
|
|
295
|
-
|
|
296
|
-
error =
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
351
|
+
var _excluded = ["addonBefore", "addonAfter", "addonBeforeWidth", "addonAfterWidth", "error", "label", "isLabelRequired"];
|
|
352
|
+
var InputField = /*#__PURE__*/React__namespace.forwardRef(function (_ref, ref) {
|
|
353
|
+
var addonBefore = _ref.addonBefore,
|
|
354
|
+
addonAfter = _ref.addonAfter,
|
|
355
|
+
_ref$addonBeforeWidth = _ref.addonBeforeWidth,
|
|
356
|
+
addonBeforeWidth = _ref$addonBeforeWidth === void 0 ? 40 : _ref$addonBeforeWidth,
|
|
357
|
+
_ref$addonAfterWidth = _ref.addonAfterWidth,
|
|
358
|
+
addonAfterWidth = _ref$addonAfterWidth === void 0 ? 40 : _ref$addonAfterWidth,
|
|
359
|
+
_ref$error = _ref.error,
|
|
360
|
+
error = _ref$error === void 0 ? false : _ref$error,
|
|
361
|
+
label = _ref.label,
|
|
362
|
+
isLabelRequired = _ref.isLabelRequired,
|
|
363
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
300
364
|
var componentId = useId.useId();
|
|
301
365
|
var isMounted = React__namespace.useRef(false);
|
|
302
366
|
var isSkipOnFocus = React__namespace.useRef(false);
|
|
303
367
|
var isSkipOnBlur = React__namespace.useRef(false);
|
|
304
368
|
var inputRef = useForwardRef(ref, null);
|
|
305
|
-
var
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
369
|
+
var _React$useState = React__namespace.useState(props.type),
|
|
370
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
371
|
+
localType = _React$useState2[0],
|
|
372
|
+
setLocalType = _React$useState2[1];
|
|
373
|
+
var _React$useState3 = React__namespace.useState(getIsValueEmpty(props.value || props.defaultValue)),
|
|
374
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
375
|
+
isValueEmpty = _React$useState4[0],
|
|
376
|
+
setIsValueEmpty = _React$useState4[1];
|
|
311
377
|
React__namespace.useEffect(function () {
|
|
312
378
|
if (isMounted.current) {
|
|
313
379
|
var nextIsValueEmpty = getIsValueEmpty(props.value);
|
|
@@ -320,18 +386,18 @@ var InputField = React__namespace.forwardRef(function (_a, ref) {
|
|
|
320
386
|
}, [props.value]);
|
|
321
387
|
var currentAddonAfter = null;
|
|
322
388
|
if (props.type === 'password' && addonAfter === 'togglePassword') {
|
|
323
|
-
currentAddonAfter = React__namespace.createElement(AfterTogglePassword, {
|
|
389
|
+
currentAddonAfter = /*#__PURE__*/React__namespace.createElement(AfterTogglePassword, {
|
|
324
390
|
inputType: localType,
|
|
325
|
-
onChange: function (type) {
|
|
391
|
+
onChange: function onChange(type) {
|
|
326
392
|
return setLocalType(type);
|
|
327
393
|
}
|
|
328
394
|
});
|
|
329
395
|
} else if (addonAfter === 'clearValue') {
|
|
330
|
-
currentAddonAfter = isValueEmpty ? null : React__namespace.createElement(AfterClearValue, {
|
|
331
|
-
onClick: function (e) {
|
|
332
|
-
var _a;
|
|
396
|
+
currentAddonAfter = isValueEmpty ? null : /*#__PURE__*/React__namespace.createElement(AfterClearValue, {
|
|
397
|
+
onClick: function onClick(e) {
|
|
333
398
|
if (!getIsValueEmpty(props.value) && !props.onChange) {
|
|
334
|
-
|
|
399
|
+
var _inputRef$current;
|
|
400
|
+
(_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
|
|
335
401
|
return;
|
|
336
402
|
}
|
|
337
403
|
if (inputRef.current) {
|
|
@@ -343,27 +409,27 @@ var InputField = React__namespace.forwardRef(function (_a, ref) {
|
|
|
343
409
|
}
|
|
344
410
|
}
|
|
345
411
|
},
|
|
346
|
-
onMouseEnter: function () {
|
|
412
|
+
onMouseEnter: function onMouseEnter() {
|
|
347
413
|
isSkipOnFocus.current = true;
|
|
348
414
|
isSkipOnBlur.current = true;
|
|
349
415
|
},
|
|
350
|
-
onTouchStart: function () {
|
|
416
|
+
onTouchStart: function onTouchStart() {
|
|
351
417
|
isSkipOnFocus.current = true;
|
|
352
418
|
isSkipOnBlur.current = true;
|
|
353
419
|
},
|
|
354
|
-
onMouseLeave: function () {
|
|
420
|
+
onMouseLeave: function onMouseLeave() {
|
|
355
421
|
isSkipOnFocus.current = false;
|
|
356
422
|
isSkipOnBlur.current = false;
|
|
357
423
|
},
|
|
358
|
-
onTouchEnd: function () {
|
|
424
|
+
onTouchEnd: function onTouchEnd() {
|
|
359
425
|
isSkipOnFocus.current = false;
|
|
360
426
|
isSkipOnBlur.current = false;
|
|
361
427
|
}
|
|
362
428
|
});
|
|
363
429
|
} else if (addonAfter === 'correctValue') {
|
|
364
|
-
currentAddonAfter = React__namespace.createElement(AfterCorrectValue, null);
|
|
430
|
+
currentAddonAfter = /*#__PURE__*/React__namespace.createElement(AfterCorrectValue, null);
|
|
365
431
|
} else if (addonAfter === 'loading') {
|
|
366
|
-
currentAddonAfter = React__namespace.createElement(AfterLoading, null);
|
|
432
|
+
currentAddonAfter = /*#__PURE__*/React__namespace.createElement(AfterLoading, null);
|
|
367
433
|
} else {
|
|
368
434
|
currentAddonAfter = addonAfter;
|
|
369
435
|
}
|
|
@@ -375,72 +441,72 @@ var InputField = React__namespace.forwardRef(function (_a, ref) {
|
|
|
375
441
|
var isRenderError = isNotEmptyArray(currentErrorList);
|
|
376
442
|
var isInputError = isRenderError || error === true;
|
|
377
443
|
var isInputRequired = Boolean((props === null || props === void 0 ? void 0 : props.required) || isLabelRequired);
|
|
378
|
-
return React__namespace.createElement("div", {
|
|
444
|
+
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
379
445
|
className: props.className,
|
|
380
446
|
style: props.style,
|
|
381
447
|
"data-qaid": props['data-qaid'] || 'input_field',
|
|
382
448
|
"data-testid": props['data-testid'] || 'input_field'
|
|
383
|
-
}, isLabel && React__namespace.createElement("div", {
|
|
449
|
+
}, isLabel && /*#__PURE__*/React__namespace.createElement("div", {
|
|
384
450
|
className: css.label
|
|
385
|
-
}, React__namespace.createElement("label", {
|
|
386
|
-
"data-qaid":
|
|
387
|
-
"data-testid":
|
|
451
|
+
}, /*#__PURE__*/React__namespace.createElement("label", {
|
|
452
|
+
"data-qaid": "input_field_label",
|
|
453
|
+
"data-testid": "input_field_label",
|
|
388
454
|
htmlFor: currentInputId
|
|
389
|
-
}, label), isInputRequired && React__namespace.createElement(React__namespace.Fragment, null, "\
|
|
455
|
+
}, label), isInputRequired && /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, "\xA0", /*#__PURE__*/React__namespace.createElement("span", {
|
|
390
456
|
className: css.labelRequired,
|
|
391
|
-
"data-qaid":
|
|
392
|
-
"data-testid":
|
|
393
|
-
}, "*"))), React__namespace.createElement("div", {
|
|
457
|
+
"data-qaid": "input_field_label_required",
|
|
458
|
+
"data-testid": "input_field_label_required"
|
|
459
|
+
}, "*"))), /*#__PURE__*/React__namespace.createElement("div", {
|
|
394
460
|
className: css.root
|
|
395
|
-
}, React__namespace.createElement(Input.Input,
|
|
461
|
+
}, /*#__PURE__*/React__namespace.createElement(Input.Input, _extends({
|
|
396
462
|
ref: inputRef,
|
|
397
463
|
"input-theme": isInputError ? 'red' : 'white',
|
|
398
464
|
"aria-invalid": isInputError,
|
|
399
465
|
"aria-required": isInputRequired,
|
|
400
|
-
"aria-describedby": isRenderError ? currentErrorList.map(function (
|
|
401
|
-
var id =
|
|
466
|
+
"aria-describedby": isRenderError ? currentErrorList.map(function (_ref2) {
|
|
467
|
+
var id = _ref2.id;
|
|
402
468
|
return id;
|
|
403
469
|
}).join(' ') : undefined
|
|
404
470
|
}, props, {
|
|
405
471
|
id: currentInputId,
|
|
406
|
-
"data-qaid":
|
|
407
|
-
"data-testid":
|
|
472
|
+
"data-qaid": "input_field_textbox",
|
|
473
|
+
"data-testid": "input_field_textbox",
|
|
408
474
|
style: {
|
|
409
475
|
paddingLeft: isBefore ? addonBeforeWidth : undefined,
|
|
410
476
|
paddingRight: isAfter ? addonAfterWidth : undefined
|
|
411
477
|
},
|
|
412
478
|
className: css.input,
|
|
413
479
|
type: localType,
|
|
414
|
-
onFocus: function (e) {
|
|
480
|
+
onFocus: function onFocus(e) {
|
|
415
481
|
if (!isSkipOnFocus.current && props.onFocus) {
|
|
416
482
|
props.onFocus(e);
|
|
417
483
|
}
|
|
418
484
|
isSkipOnFocus.current = false;
|
|
419
485
|
},
|
|
420
|
-
onBlur: function (e) {
|
|
486
|
+
onBlur: function onBlur(e) {
|
|
421
487
|
if (!isSkipOnBlur.current && props.onBlur) {
|
|
422
488
|
props.onBlur(e);
|
|
423
489
|
}
|
|
424
490
|
isSkipOnBlur.current = false;
|
|
425
491
|
},
|
|
426
|
-
onChange: function (e) {
|
|
492
|
+
onChange: function onChange(e) {
|
|
427
493
|
setIsValueEmpty(getIsValueEmpty(e.target.value));
|
|
428
494
|
resolveOnChange(e.currentTarget, e, props.onChange);
|
|
429
495
|
}
|
|
430
|
-
})), isBefore && React__namespace.createElement("div", {
|
|
496
|
+
})), isBefore && /*#__PURE__*/React__namespace.createElement("div", {
|
|
431
497
|
className: css.before,
|
|
432
498
|
style: {
|
|
433
499
|
width: addonBeforeWidth
|
|
434
500
|
}
|
|
435
|
-
}, addonBefore), isAfter && React__namespace.createElement("div", {
|
|
501
|
+
}, addonBefore), isAfter && /*#__PURE__*/React__namespace.createElement("div", {
|
|
436
502
|
className: css.after,
|
|
437
503
|
style: {
|
|
438
504
|
width: addonAfterWidth
|
|
439
505
|
}
|
|
440
|
-
}, currentAddonAfter)), isRenderError && currentErrorList.map(function (
|
|
441
|
-
var id =
|
|
442
|
-
content =
|
|
443
|
-
return React__namespace.createElement(ErrorText, {
|
|
506
|
+
}, currentAddonAfter)), isRenderError && currentErrorList.map(function (_ref3) {
|
|
507
|
+
var id = _ref3.id,
|
|
508
|
+
content = _ref3.content;
|
|
509
|
+
return /*#__PURE__*/React__namespace.createElement(ErrorText, {
|
|
444
510
|
key: id,
|
|
445
511
|
id: id
|
|
446
512
|
}, content);
|