@prom-ui/core 1.3.1 → 1.4.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 +237 -173
- package/InputField/cjs/index.development.v2.js +237 -173
- 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
|
@@ -11,68 +11,177 @@ var Icon = require('@prom-ui/core/Icon');
|
|
|
11
11
|
var ArrowUp = require('@prom-ui/icons/ArrowUp');
|
|
12
12
|
|
|
13
13
|
function _interopNamespaceCompat(e) {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
});
|
|
24
|
-
}
|
|
14
|
+
if (e && typeof e === 'object' && 'default' in e) return e;
|
|
15
|
+
var n = Object.create(null);
|
|
16
|
+
if (e) {
|
|
17
|
+
Object.keys(e).forEach(function (k) {
|
|
18
|
+
if (k !== 'default') {
|
|
19
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
20
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
get: function () { return e[k]; }
|
|
25
23
|
});
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
n.default = e;
|
|
28
|
+
return Object.freeze(n);
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
var React__namespace = /*#__PURE__*/_interopNamespaceCompat(React);
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
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
|
-
|
|
33
|
+
function _iterableToArrayLimit(arr, i) {
|
|
34
|
+
var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
|
|
35
|
+
if (null != _i) {
|
|
36
|
+
var _s,
|
|
37
|
+
_e,
|
|
38
|
+
_x,
|
|
39
|
+
_r,
|
|
40
|
+
_arr = [],
|
|
41
|
+
_n = !0,
|
|
42
|
+
_d = !1;
|
|
43
|
+
try {
|
|
44
|
+
if (_x = (_i = _i.call(arr)).next, 0 === i) {
|
|
45
|
+
if (Object(_i) !== _i) return;
|
|
46
|
+
_n = !1;
|
|
47
|
+
} else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
|
|
48
|
+
} catch (err) {
|
|
49
|
+
_d = !0, _e = err;
|
|
50
|
+
} finally {
|
|
51
|
+
try {
|
|
52
|
+
if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return;
|
|
53
|
+
} finally {
|
|
54
|
+
if (_d) throw _e;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return _arr;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
function ownKeys(object, enumerableOnly) {
|
|
61
|
+
var keys = Object.keys(object);
|
|
62
|
+
if (Object.getOwnPropertySymbols) {
|
|
63
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
64
|
+
enumerableOnly && (symbols = symbols.filter(function (sym) {
|
|
65
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
66
|
+
})), keys.push.apply(keys, symbols);
|
|
67
|
+
}
|
|
68
|
+
return keys;
|
|
69
|
+
}
|
|
70
|
+
function _objectSpread2(target) {
|
|
71
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
72
|
+
var source = null != arguments[i] ? arguments[i] : {};
|
|
73
|
+
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
|
|
74
|
+
_defineProperty(target, key, source[key]);
|
|
75
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
|
|
76
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
return target;
|
|
80
|
+
}
|
|
81
|
+
function _defineProperty(obj, key, value) {
|
|
82
|
+
key = _toPropertyKey(key);
|
|
83
|
+
if (key in obj) {
|
|
84
|
+
Object.defineProperty(obj, key, {
|
|
85
|
+
value: value,
|
|
86
|
+
enumerable: true,
|
|
87
|
+
configurable: true,
|
|
88
|
+
writable: true
|
|
89
|
+
});
|
|
90
|
+
} else {
|
|
91
|
+
obj[key] = value;
|
|
92
|
+
}
|
|
93
|
+
return obj;
|
|
94
|
+
}
|
|
95
|
+
function _extends() {
|
|
96
|
+
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
97
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
98
|
+
var source = arguments[i];
|
|
99
|
+
for (var key in source) {
|
|
100
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
101
|
+
target[key] = source[key];
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
return target;
|
|
106
|
+
};
|
|
107
|
+
return _extends.apply(this, arguments);
|
|
108
|
+
}
|
|
109
|
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
110
|
+
if (source == null) return {};
|
|
111
|
+
var target = {};
|
|
112
|
+
var sourceKeys = Object.keys(source);
|
|
113
|
+
var key, i;
|
|
114
|
+
for (i = 0; i < sourceKeys.length; i++) {
|
|
115
|
+
key = sourceKeys[i];
|
|
116
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
117
|
+
target[key] = source[key];
|
|
118
|
+
}
|
|
119
|
+
return target;
|
|
120
|
+
}
|
|
121
|
+
function _objectWithoutProperties(source, excluded) {
|
|
122
|
+
if (source == null) return {};
|
|
123
|
+
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
124
|
+
var key, i;
|
|
125
|
+
if (Object.getOwnPropertySymbols) {
|
|
126
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
127
|
+
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
128
|
+
key = sourceSymbolKeys[i];
|
|
129
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
130
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
131
|
+
target[key] = source[key];
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
return target;
|
|
135
|
+
}
|
|
136
|
+
function _taggedTemplateLiteral(strings, raw) {
|
|
137
|
+
if (!raw) {
|
|
138
|
+
raw = strings.slice(0);
|
|
139
|
+
}
|
|
140
|
+
return Object.freeze(Object.defineProperties(strings, {
|
|
141
|
+
raw: {
|
|
142
|
+
value: Object.freeze(raw)
|
|
143
|
+
}
|
|
144
|
+
}));
|
|
145
|
+
}
|
|
146
|
+
function _slicedToArray(arr, i) {
|
|
147
|
+
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
148
|
+
}
|
|
149
|
+
function _arrayWithHoles(arr) {
|
|
150
|
+
if (Array.isArray(arr)) return arr;
|
|
151
|
+
}
|
|
152
|
+
function _unsupportedIterableToArray(o, minLen) {
|
|
153
|
+
if (!o) return;
|
|
154
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
155
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
156
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
157
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
|
158
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
159
|
+
}
|
|
160
|
+
function _arrayLikeToArray(arr, len) {
|
|
161
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
162
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
163
|
+
return arr2;
|
|
164
|
+
}
|
|
165
|
+
function _nonIterableRest() {
|
|
166
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
167
|
+
}
|
|
168
|
+
function _toPrimitive(input, hint) {
|
|
169
|
+
if (typeof input !== "object" || input === null) return input;
|
|
170
|
+
var prim = input[Symbol.toPrimitive];
|
|
171
|
+
if (prim !== undefined) {
|
|
172
|
+
var res = prim.call(input, hint || "default");
|
|
173
|
+
if (typeof res !== "object") return res;
|
|
174
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
175
|
+
}
|
|
176
|
+
return (hint === "string" ? String : Number)(input);
|
|
177
|
+
}
|
|
178
|
+
function _toPropertyKey(arg) {
|
|
179
|
+
var key = _toPrimitive(arg, "string");
|
|
180
|
+
return typeof key === "symbol" ? key : String(key);
|
|
74
181
|
}
|
|
75
182
|
|
|
183
|
+
var _templateObject;
|
|
184
|
+
var _excluded = ["children", "scrollRef", "onClick", "scrollDelay", "scrollOffset", "margin", "zIndex"];
|
|
76
185
|
var POSITION_FIXED = {
|
|
77
186
|
position: 'fixed',
|
|
78
187
|
right: 0,
|
|
@@ -91,27 +200,29 @@ var defaultProps = {
|
|
|
91
200
|
margin: '0 18px 18px 0',
|
|
92
201
|
zIndex: 10
|
|
93
202
|
};
|
|
94
|
-
var ButtonPageUp = React__namespace.memo(function (
|
|
95
|
-
var children =
|
|
96
|
-
scrollRef =
|
|
97
|
-
onClick =
|
|
98
|
-
|
|
99
|
-
scrollDelay =
|
|
100
|
-
|
|
101
|
-
scrollOffset =
|
|
102
|
-
|
|
103
|
-
margin =
|
|
104
|
-
|
|
105
|
-
zIndex =
|
|
106
|
-
props =
|
|
107
|
-
var
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
203
|
+
var ButtonPageUp = /*#__PURE__*/React__namespace.memo(function (_ref) {
|
|
204
|
+
var children = _ref.children,
|
|
205
|
+
scrollRef = _ref.scrollRef,
|
|
206
|
+
onClick = _ref.onClick,
|
|
207
|
+
_ref$scrollDelay = _ref.scrollDelay,
|
|
208
|
+
scrollDelay = _ref$scrollDelay === void 0 ? 100 : _ref$scrollDelay,
|
|
209
|
+
_ref$scrollOffset = _ref.scrollOffset,
|
|
210
|
+
scrollOffset = _ref$scrollOffset === void 0 ? 100 : _ref$scrollOffset,
|
|
211
|
+
_ref$margin = _ref.margin,
|
|
212
|
+
margin = _ref$margin === void 0 ? '0 18px 18px 0' : _ref$margin,
|
|
213
|
+
_ref$zIndex = _ref.zIndex,
|
|
214
|
+
zIndex = _ref$zIndex === void 0 ? 10 : _ref$zIndex,
|
|
215
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
216
|
+
var _useBodyTTag = useBodyTTag.useBodyTTag(),
|
|
217
|
+
t = _useBodyTTag.t;
|
|
218
|
+
var _React$useState = React__namespace.useState(false),
|
|
219
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
220
|
+
visible = _React$useState2[0],
|
|
221
|
+
setVisible = _React$useState2[1];
|
|
222
|
+
var getRootElement = function getRootElement() {
|
|
112
223
|
return (scrollRef === null || scrollRef === void 0 ? void 0 : scrollRef.current) || document.documentElement;
|
|
113
224
|
};
|
|
114
|
-
var handleScrollToTop = function (e) {
|
|
225
|
+
var handleScrollToTop = function handleScrollToTop(e) {
|
|
115
226
|
if (typeof onClick === 'function') {
|
|
116
227
|
onClick(e);
|
|
117
228
|
}
|
|
@@ -137,17 +248,17 @@ var ButtonPageUp = React__namespace.memo(function (_a) {
|
|
|
137
248
|
};
|
|
138
249
|
}, []);
|
|
139
250
|
if (!visible) return null;
|
|
140
|
-
var Parent =
|
|
141
|
-
var positionStyle =
|
|
142
|
-
return React__namespace.createElement(Parent, null, React__namespace.createElement("div", {
|
|
143
|
-
style:
|
|
251
|
+
var Parent = scrollRef !== null && scrollRef !== void 0 && scrollRef.current ? React__namespace.Fragment : Portal.Portal;
|
|
252
|
+
var positionStyle = scrollRef !== null && scrollRef !== void 0 && scrollRef.current ? POSITION_STICKY : POSITION_FIXED;
|
|
253
|
+
return /*#__PURE__*/React__namespace.createElement(Parent, null, /*#__PURE__*/React__namespace.createElement("div", {
|
|
254
|
+
style: _objectSpread2(_objectSpread2({}, positionStyle), {}, {
|
|
144
255
|
zIndex: zIndex
|
|
145
256
|
})
|
|
146
|
-
}, React__namespace.createElement(Button.Button,
|
|
147
|
-
"button-padding":
|
|
148
|
-
"button-theme":
|
|
149
|
-
"button-round":
|
|
150
|
-
"aria-label": t(
|
|
257
|
+
}, /*#__PURE__*/React__namespace.createElement(Button.Button, _extends({
|
|
258
|
+
"button-padding": "xs",
|
|
259
|
+
"button-theme": "white",
|
|
260
|
+
"button-round": "full",
|
|
261
|
+
"aria-label": t(_templateObject || (_templateObject = _taggedTemplateLiteral(["\u041D\u0430\u0432\u0435\u0440\u0445"])))
|
|
151
262
|
}, props, {
|
|
152
263
|
style: {
|
|
153
264
|
position: 'absolute',
|
|
@@ -156,7 +267,7 @@ var ButtonPageUp = React__namespace.memo(function (_a) {
|
|
|
156
267
|
margin: margin
|
|
157
268
|
},
|
|
158
269
|
onClick: handleScrollToTop
|
|
159
|
-
}), children || React__namespace.createElement(Icon.Icon, {
|
|
270
|
+
}), children || /*#__PURE__*/React__namespace.createElement(Icon.Icon, {
|
|
160
271
|
"icon-as": ArrowUp.ArrowUp,
|
|
161
272
|
style: {
|
|
162
273
|
width: 24,
|
|
@@ -165,6 +276,5 @@ var ButtonPageUp = React__namespace.memo(function (_a) {
|
|
|
165
276
|
}))));
|
|
166
277
|
});
|
|
167
278
|
ButtonPageUp.defaultProps = defaultProps;
|
|
168
|
-
var templateObject_1;
|
|
169
279
|
|
|
170
280
|
exports.ButtonPageUp = ButtonPageUp;
|
|
@@ -11,68 +11,177 @@ var Icon = require('@prom-ui/core/Icon');
|
|
|
11
11
|
var ArrowUp = require('@prom-ui/icons/ArrowUp');
|
|
12
12
|
|
|
13
13
|
function _interopNamespaceCompat(e) {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
});
|
|
24
|
-
}
|
|
14
|
+
if (e && typeof e === 'object' && 'default' in e) return e;
|
|
15
|
+
var n = Object.create(null);
|
|
16
|
+
if (e) {
|
|
17
|
+
Object.keys(e).forEach(function (k) {
|
|
18
|
+
if (k !== 'default') {
|
|
19
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
20
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
get: function () { return e[k]; }
|
|
25
23
|
});
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
n.default = e;
|
|
28
|
+
return Object.freeze(n);
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
var React__namespace = /*#__PURE__*/_interopNamespaceCompat(React);
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
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
|
-
|
|
33
|
+
function _iterableToArrayLimit(arr, i) {
|
|
34
|
+
var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
|
|
35
|
+
if (null != _i) {
|
|
36
|
+
var _s,
|
|
37
|
+
_e,
|
|
38
|
+
_x,
|
|
39
|
+
_r,
|
|
40
|
+
_arr = [],
|
|
41
|
+
_n = !0,
|
|
42
|
+
_d = !1;
|
|
43
|
+
try {
|
|
44
|
+
if (_x = (_i = _i.call(arr)).next, 0 === i) {
|
|
45
|
+
if (Object(_i) !== _i) return;
|
|
46
|
+
_n = !1;
|
|
47
|
+
} else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
|
|
48
|
+
} catch (err) {
|
|
49
|
+
_d = !0, _e = err;
|
|
50
|
+
} finally {
|
|
51
|
+
try {
|
|
52
|
+
if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return;
|
|
53
|
+
} finally {
|
|
54
|
+
if (_d) throw _e;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return _arr;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
function ownKeys(object, enumerableOnly) {
|
|
61
|
+
var keys = Object.keys(object);
|
|
62
|
+
if (Object.getOwnPropertySymbols) {
|
|
63
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
64
|
+
enumerableOnly && (symbols = symbols.filter(function (sym) {
|
|
65
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
66
|
+
})), keys.push.apply(keys, symbols);
|
|
67
|
+
}
|
|
68
|
+
return keys;
|
|
69
|
+
}
|
|
70
|
+
function _objectSpread2(target) {
|
|
71
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
72
|
+
var source = null != arguments[i] ? arguments[i] : {};
|
|
73
|
+
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
|
|
74
|
+
_defineProperty(target, key, source[key]);
|
|
75
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
|
|
76
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
return target;
|
|
80
|
+
}
|
|
81
|
+
function _defineProperty(obj, key, value) {
|
|
82
|
+
key = _toPropertyKey(key);
|
|
83
|
+
if (key in obj) {
|
|
84
|
+
Object.defineProperty(obj, key, {
|
|
85
|
+
value: value,
|
|
86
|
+
enumerable: true,
|
|
87
|
+
configurable: true,
|
|
88
|
+
writable: true
|
|
89
|
+
});
|
|
90
|
+
} else {
|
|
91
|
+
obj[key] = value;
|
|
92
|
+
}
|
|
93
|
+
return obj;
|
|
94
|
+
}
|
|
95
|
+
function _extends() {
|
|
96
|
+
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
97
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
98
|
+
var source = arguments[i];
|
|
99
|
+
for (var key in source) {
|
|
100
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
101
|
+
target[key] = source[key];
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
return target;
|
|
106
|
+
};
|
|
107
|
+
return _extends.apply(this, arguments);
|
|
108
|
+
}
|
|
109
|
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
110
|
+
if (source == null) return {};
|
|
111
|
+
var target = {};
|
|
112
|
+
var sourceKeys = Object.keys(source);
|
|
113
|
+
var key, i;
|
|
114
|
+
for (i = 0; i < sourceKeys.length; i++) {
|
|
115
|
+
key = sourceKeys[i];
|
|
116
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
117
|
+
target[key] = source[key];
|
|
118
|
+
}
|
|
119
|
+
return target;
|
|
120
|
+
}
|
|
121
|
+
function _objectWithoutProperties(source, excluded) {
|
|
122
|
+
if (source == null) return {};
|
|
123
|
+
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
124
|
+
var key, i;
|
|
125
|
+
if (Object.getOwnPropertySymbols) {
|
|
126
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
127
|
+
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
128
|
+
key = sourceSymbolKeys[i];
|
|
129
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
130
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
131
|
+
target[key] = source[key];
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
return target;
|
|
135
|
+
}
|
|
136
|
+
function _taggedTemplateLiteral(strings, raw) {
|
|
137
|
+
if (!raw) {
|
|
138
|
+
raw = strings.slice(0);
|
|
139
|
+
}
|
|
140
|
+
return Object.freeze(Object.defineProperties(strings, {
|
|
141
|
+
raw: {
|
|
142
|
+
value: Object.freeze(raw)
|
|
143
|
+
}
|
|
144
|
+
}));
|
|
145
|
+
}
|
|
146
|
+
function _slicedToArray(arr, i) {
|
|
147
|
+
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
148
|
+
}
|
|
149
|
+
function _arrayWithHoles(arr) {
|
|
150
|
+
if (Array.isArray(arr)) return arr;
|
|
151
|
+
}
|
|
152
|
+
function _unsupportedIterableToArray(o, minLen) {
|
|
153
|
+
if (!o) return;
|
|
154
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
155
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
156
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
157
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
|
158
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
159
|
+
}
|
|
160
|
+
function _arrayLikeToArray(arr, len) {
|
|
161
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
162
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
163
|
+
return arr2;
|
|
164
|
+
}
|
|
165
|
+
function _nonIterableRest() {
|
|
166
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
167
|
+
}
|
|
168
|
+
function _toPrimitive(input, hint) {
|
|
169
|
+
if (typeof input !== "object" || input === null) return input;
|
|
170
|
+
var prim = input[Symbol.toPrimitive];
|
|
171
|
+
if (prim !== undefined) {
|
|
172
|
+
var res = prim.call(input, hint || "default");
|
|
173
|
+
if (typeof res !== "object") return res;
|
|
174
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
175
|
+
}
|
|
176
|
+
return (hint === "string" ? String : Number)(input);
|
|
177
|
+
}
|
|
178
|
+
function _toPropertyKey(arg) {
|
|
179
|
+
var key = _toPrimitive(arg, "string");
|
|
180
|
+
return typeof key === "symbol" ? key : String(key);
|
|
74
181
|
}
|
|
75
182
|
|
|
183
|
+
var _templateObject;
|
|
184
|
+
var _excluded = ["children", "scrollRef", "onClick", "scrollDelay", "scrollOffset", "margin", "zIndex"];
|
|
76
185
|
var POSITION_FIXED = {
|
|
77
186
|
position: 'fixed',
|
|
78
187
|
right: 0,
|
|
@@ -91,27 +200,29 @@ var defaultProps = {
|
|
|
91
200
|
margin: '0 18px 18px 0',
|
|
92
201
|
zIndex: 10
|
|
93
202
|
};
|
|
94
|
-
var ButtonPageUp = React__namespace.memo(function (
|
|
95
|
-
var children =
|
|
96
|
-
scrollRef =
|
|
97
|
-
onClick =
|
|
98
|
-
|
|
99
|
-
scrollDelay =
|
|
100
|
-
|
|
101
|
-
scrollOffset =
|
|
102
|
-
|
|
103
|
-
margin =
|
|
104
|
-
|
|
105
|
-
zIndex =
|
|
106
|
-
props =
|
|
107
|
-
var
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
203
|
+
var ButtonPageUp = /*#__PURE__*/React__namespace.memo(function (_ref) {
|
|
204
|
+
var children = _ref.children,
|
|
205
|
+
scrollRef = _ref.scrollRef,
|
|
206
|
+
onClick = _ref.onClick,
|
|
207
|
+
_ref$scrollDelay = _ref.scrollDelay,
|
|
208
|
+
scrollDelay = _ref$scrollDelay === void 0 ? 100 : _ref$scrollDelay,
|
|
209
|
+
_ref$scrollOffset = _ref.scrollOffset,
|
|
210
|
+
scrollOffset = _ref$scrollOffset === void 0 ? 100 : _ref$scrollOffset,
|
|
211
|
+
_ref$margin = _ref.margin,
|
|
212
|
+
margin = _ref$margin === void 0 ? '0 18px 18px 0' : _ref$margin,
|
|
213
|
+
_ref$zIndex = _ref.zIndex,
|
|
214
|
+
zIndex = _ref$zIndex === void 0 ? 10 : _ref$zIndex,
|
|
215
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
216
|
+
var _useBodyTTag = useBodyTTag.useBodyTTag(),
|
|
217
|
+
t = _useBodyTTag.t;
|
|
218
|
+
var _React$useState = React__namespace.useState(false),
|
|
219
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
220
|
+
visible = _React$useState2[0],
|
|
221
|
+
setVisible = _React$useState2[1];
|
|
222
|
+
var getRootElement = function getRootElement() {
|
|
112
223
|
return (scrollRef === null || scrollRef === void 0 ? void 0 : scrollRef.current) || document.documentElement;
|
|
113
224
|
};
|
|
114
|
-
var handleScrollToTop = function (e) {
|
|
225
|
+
var handleScrollToTop = function handleScrollToTop(e) {
|
|
115
226
|
if (typeof onClick === 'function') {
|
|
116
227
|
onClick(e);
|
|
117
228
|
}
|
|
@@ -137,17 +248,17 @@ var ButtonPageUp = React__namespace.memo(function (_a) {
|
|
|
137
248
|
};
|
|
138
249
|
}, []);
|
|
139
250
|
if (!visible) return null;
|
|
140
|
-
var Parent =
|
|
141
|
-
var positionStyle =
|
|
142
|
-
return React__namespace.createElement(Parent, null, React__namespace.createElement("div", {
|
|
143
|
-
style:
|
|
251
|
+
var Parent = scrollRef !== null && scrollRef !== void 0 && scrollRef.current ? React__namespace.Fragment : Portal.Portal;
|
|
252
|
+
var positionStyle = scrollRef !== null && scrollRef !== void 0 && scrollRef.current ? POSITION_STICKY : POSITION_FIXED;
|
|
253
|
+
return /*#__PURE__*/React__namespace.createElement(Parent, null, /*#__PURE__*/React__namespace.createElement("div", {
|
|
254
|
+
style: _objectSpread2(_objectSpread2({}, positionStyle), {}, {
|
|
144
255
|
zIndex: zIndex
|
|
145
256
|
})
|
|
146
|
-
}, React__namespace.createElement(Button.Button,
|
|
147
|
-
"button-padding":
|
|
148
|
-
"button-theme":
|
|
149
|
-
"button-round":
|
|
150
|
-
"aria-label": t(
|
|
257
|
+
}, /*#__PURE__*/React__namespace.createElement(Button.Button, _extends({
|
|
258
|
+
"button-padding": "xs",
|
|
259
|
+
"button-theme": "white",
|
|
260
|
+
"button-round": "full",
|
|
261
|
+
"aria-label": t(_templateObject || (_templateObject = _taggedTemplateLiteral(["\u041D\u0430\u0432\u0435\u0440\u0445"])))
|
|
151
262
|
}, props, {
|
|
152
263
|
style: {
|
|
153
264
|
position: 'absolute',
|
|
@@ -156,7 +267,7 @@ var ButtonPageUp = React__namespace.memo(function (_a) {
|
|
|
156
267
|
margin: margin
|
|
157
268
|
},
|
|
158
269
|
onClick: handleScrollToTop
|
|
159
|
-
}), children || React__namespace.createElement(Icon.Icon, {
|
|
270
|
+
}), children || /*#__PURE__*/React__namespace.createElement(Icon.Icon, {
|
|
160
271
|
"icon-as": ArrowUp.ArrowUp,
|
|
161
272
|
style: {
|
|
162
273
|
width: 24,
|
|
@@ -165,6 +276,5 @@ var ButtonPageUp = React__namespace.memo(function (_a) {
|
|
|
165
276
|
}))));
|
|
166
277
|
});
|
|
167
278
|
ButtonPageUp.defaultProps = defaultProps;
|
|
168
|
-
var templateObject_1;
|
|
169
279
|
|
|
170
280
|
exports.ButtonPageUp = ButtonPageUp;
|