@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
|
@@ -12,101 +12,189 @@ var Right = require('@prom-ui/icons/Right');
|
|
|
12
12
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
13
13
|
|
|
14
14
|
function _interopNamespaceCompat(e) {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
});
|
|
25
|
-
}
|
|
15
|
+
if (e && typeof e === 'object' && 'default' in e) return e;
|
|
16
|
+
var n = Object.create(null);
|
|
17
|
+
if (e) {
|
|
18
|
+
Object.keys(e).forEach(function (k) {
|
|
19
|
+
if (k !== 'default') {
|
|
20
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
21
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () { return e[k]; }
|
|
26
24
|
});
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
n.default = e;
|
|
29
|
+
return Object.freeze(n);
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
var React__namespace = /*#__PURE__*/_interopNamespaceCompat(React);
|
|
33
33
|
var classNames__default = /*#__PURE__*/_interopDefaultCompat(classNames);
|
|
34
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
|
-
|
|
74
|
-
|
|
75
|
-
|
|
35
|
+
function _iterableToArrayLimit(arr, i) {
|
|
36
|
+
var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
|
|
37
|
+
if (null != _i) {
|
|
38
|
+
var _s,
|
|
39
|
+
_e,
|
|
40
|
+
_x,
|
|
41
|
+
_r,
|
|
42
|
+
_arr = [],
|
|
43
|
+
_n = !0,
|
|
44
|
+
_d = !1;
|
|
45
|
+
try {
|
|
46
|
+
if (_x = (_i = _i.call(arr)).next, 0 === i) {
|
|
47
|
+
if (Object(_i) !== _i) return;
|
|
48
|
+
_n = !1;
|
|
49
|
+
} else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
|
|
50
|
+
} catch (err) {
|
|
51
|
+
_d = !0, _e = err;
|
|
52
|
+
} finally {
|
|
53
|
+
try {
|
|
54
|
+
if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return;
|
|
55
|
+
} finally {
|
|
56
|
+
if (_d) throw _e;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return _arr;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
function _defineProperty(obj, key, value) {
|
|
63
|
+
key = _toPropertyKey(key);
|
|
64
|
+
if (key in obj) {
|
|
65
|
+
Object.defineProperty(obj, key, {
|
|
66
|
+
value: value,
|
|
67
|
+
enumerable: true,
|
|
68
|
+
configurable: true,
|
|
69
|
+
writable: true
|
|
70
|
+
});
|
|
71
|
+
} else {
|
|
72
|
+
obj[key] = value;
|
|
73
|
+
}
|
|
74
|
+
return obj;
|
|
75
|
+
}
|
|
76
|
+
function _extends() {
|
|
77
|
+
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
78
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
79
|
+
var source = arguments[i];
|
|
80
|
+
for (var key in source) {
|
|
81
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
82
|
+
target[key] = source[key];
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
return target;
|
|
87
|
+
};
|
|
88
|
+
return _extends.apply(this, arguments);
|
|
89
|
+
}
|
|
90
|
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
91
|
+
if (source == null) return {};
|
|
92
|
+
var target = {};
|
|
93
|
+
var sourceKeys = Object.keys(source);
|
|
94
|
+
var key, i;
|
|
95
|
+
for (i = 0; i < sourceKeys.length; i++) {
|
|
96
|
+
key = sourceKeys[i];
|
|
97
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
98
|
+
target[key] = source[key];
|
|
99
|
+
}
|
|
100
|
+
return target;
|
|
101
|
+
}
|
|
102
|
+
function _objectWithoutProperties(source, excluded) {
|
|
103
|
+
if (source == null) return {};
|
|
104
|
+
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
105
|
+
var key, i;
|
|
106
|
+
if (Object.getOwnPropertySymbols) {
|
|
107
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
108
|
+
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
109
|
+
key = sourceSymbolKeys[i];
|
|
110
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
111
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
112
|
+
target[key] = source[key];
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
return target;
|
|
116
|
+
}
|
|
117
|
+
function _taggedTemplateLiteral(strings, raw) {
|
|
118
|
+
if (!raw) {
|
|
119
|
+
raw = strings.slice(0);
|
|
120
|
+
}
|
|
121
|
+
return Object.freeze(Object.defineProperties(strings, {
|
|
122
|
+
raw: {
|
|
123
|
+
value: Object.freeze(raw)
|
|
124
|
+
}
|
|
125
|
+
}));
|
|
126
|
+
}
|
|
127
|
+
function _slicedToArray(arr, i) {
|
|
128
|
+
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
129
|
+
}
|
|
130
|
+
function _arrayWithHoles(arr) {
|
|
131
|
+
if (Array.isArray(arr)) return arr;
|
|
132
|
+
}
|
|
133
|
+
function _unsupportedIterableToArray(o, minLen) {
|
|
134
|
+
if (!o) return;
|
|
135
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
136
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
137
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
138
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
|
139
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
140
|
+
}
|
|
141
|
+
function _arrayLikeToArray(arr, len) {
|
|
142
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
143
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
144
|
+
return arr2;
|
|
145
|
+
}
|
|
146
|
+
function _nonIterableRest() {
|
|
147
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
148
|
+
}
|
|
149
|
+
function _toPrimitive(input, hint) {
|
|
150
|
+
if (typeof input !== "object" || input === null) return input;
|
|
151
|
+
var prim = input[Symbol.toPrimitive];
|
|
152
|
+
if (prim !== undefined) {
|
|
153
|
+
var res = prim.call(input, hint || "default");
|
|
154
|
+
if (typeof res !== "object") return res;
|
|
155
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
156
|
+
}
|
|
157
|
+
return (hint === "string" ? String : Number)(input);
|
|
158
|
+
}
|
|
159
|
+
function _toPropertyKey(arg) {
|
|
160
|
+
var key = _toPrimitive(arg, "string");
|
|
161
|
+
return typeof key === "symbol" ? key : String(key);
|
|
76
162
|
}
|
|
77
163
|
|
|
78
164
|
var css = {"root":"ScrollControls__root___5xFyd","buttonCommon":"ScrollControls__buttonCommon___kQ3-r","prev":"ScrollControls__prev___YhapL ScrollControls__buttonCommon___kQ3-r","next":"ScrollControls__next___yCCvv ScrollControls__buttonCommon___kQ3-r","largeBoxShadow":"ScrollControls__largeBoxShadow___4Z-qq","smallBoxShadow":"ScrollControls__smallBoxShadow___ZAZeD","iconPlaceholder":"ScrollControls__iconPlaceholder___XLACs","icon":"ScrollControls__icon___z7X7-","showOnHover":"ScrollControls__showOnHover___PVtmJ","hideOnDisabled":"ScrollControls__hideOnDisabled___hwEsJ"};
|
|
79
165
|
|
|
166
|
+
var _templateObject, _templateObject2;
|
|
80
167
|
var DIRECTION_NEXT = 1;
|
|
81
168
|
var DIRECTION_PREV = -1;
|
|
82
169
|
var CONTROLS_UPDATE_DELAY = 100;
|
|
83
170
|
var CONTROLS_SMALL_HEIGHT = 64;
|
|
84
|
-
var ScrollControlsButton = function (
|
|
85
|
-
var
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
171
|
+
var ScrollControlsButton = function ScrollControlsButton(_ref) {
|
|
172
|
+
var scrollRef = _ref.scrollRef,
|
|
173
|
+
_ref$hideOnDisabled = _ref.hideOnDisabled,
|
|
174
|
+
hideOnDisabled = _ref$hideOnDisabled === void 0 ? false : _ref$hideOnDisabled,
|
|
175
|
+
_ref$isActive = _ref.isActive,
|
|
176
|
+
isActive = _ref$isActive === void 0 ? true : _ref$isActive,
|
|
177
|
+
onClickNext = _ref.onClickNext,
|
|
178
|
+
onClickPrev = _ref.onClickPrev,
|
|
179
|
+
zIndex = _ref.zIndex,
|
|
180
|
+
children = _ref.children;
|
|
181
|
+
var _useBodyTTag = useBodyTTag.useBodyTTag(),
|
|
182
|
+
t = _useBodyTTag.t;
|
|
96
183
|
var updateControlsTimer = React.useRef(null);
|
|
97
|
-
var
|
|
184
|
+
var _useState = React.useState({
|
|
98
185
|
prev: false,
|
|
99
186
|
next: false,
|
|
100
187
|
isSmallHeight: false
|
|
101
188
|
}),
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
189
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
190
|
+
controlsVisible = _useState2[0],
|
|
191
|
+
setControlsVisible = _useState2[1];
|
|
192
|
+
var updateControlsVisible = function updateControlsVisible(nextScrollLeft) {
|
|
193
|
+
var _ref2 = scrollRef.current,
|
|
194
|
+
scrollLeft = _ref2.scrollLeft,
|
|
195
|
+
scrollWidth = _ref2.scrollWidth,
|
|
196
|
+
clientWidth = _ref2.clientWidth,
|
|
197
|
+
clientHeight = _ref2.clientHeight;
|
|
110
198
|
var currentScrollLeft = (Number.isInteger(nextScrollLeft) ? nextScrollLeft : scrollLeft) || 0;
|
|
111
199
|
setControlsVisible({
|
|
112
200
|
prev: currentScrollLeft > 1,
|
|
@@ -114,10 +202,10 @@ var ScrollControlsButton = function (_a) {
|
|
|
114
202
|
isSmallHeight: clientHeight < CONTROLS_SMALL_HEIGHT
|
|
115
203
|
});
|
|
116
204
|
};
|
|
117
|
-
var updateScrollLeft = function (direction) {
|
|
118
|
-
var
|
|
119
|
-
scrollLeft =
|
|
120
|
-
clientWidth =
|
|
205
|
+
var updateScrollLeft = function updateScrollLeft(direction) {
|
|
206
|
+
var _ref3 = scrollRef.current,
|
|
207
|
+
scrollLeft = _ref3.scrollLeft,
|
|
208
|
+
clientWidth = _ref3.clientWidth;
|
|
121
209
|
var offset = clientWidth * direction;
|
|
122
210
|
updateControlsVisible(scrollLeft + offset);
|
|
123
211
|
requestAnimationFrame(function () {
|
|
@@ -129,19 +217,19 @@ var ScrollControlsButton = function (_a) {
|
|
|
129
217
|
}
|
|
130
218
|
});
|
|
131
219
|
};
|
|
132
|
-
var handleOnClickPrev = function () {
|
|
220
|
+
var handleOnClickPrev = function handleOnClickPrev() {
|
|
133
221
|
if (typeof onClickPrev === 'function') {
|
|
134
222
|
onClickPrev();
|
|
135
223
|
}
|
|
136
224
|
updateScrollLeft(DIRECTION_PREV);
|
|
137
225
|
};
|
|
138
|
-
var handleOnClickNext = function () {
|
|
226
|
+
var handleOnClickNext = function handleOnClickNext() {
|
|
139
227
|
if (typeof onClickNext === 'function') {
|
|
140
228
|
onClickNext();
|
|
141
229
|
}
|
|
142
230
|
updateScrollLeft(DIRECTION_NEXT);
|
|
143
231
|
};
|
|
144
|
-
var handleOnScroll = function () {
|
|
232
|
+
var handleOnScroll = function handleOnScroll() {
|
|
145
233
|
clearTimeout(updateControlsTimer.current || 0);
|
|
146
234
|
updateControlsTimer.current = setTimeout(updateControlsVisible, CONTROLS_UPDATE_DELAY);
|
|
147
235
|
};
|
|
@@ -157,64 +245,64 @@ var ScrollControlsButton = function (_a) {
|
|
|
157
245
|
};
|
|
158
246
|
}, [isActive, children]);
|
|
159
247
|
if (isActive && (controlsVisible.prev || controlsVisible.next)) {
|
|
160
|
-
var
|
|
248
|
+
var _classNames, _classNames2;
|
|
249
|
+
var iconPlaceholder = /*#__PURE__*/React__namespace.default.createElement("svg", {
|
|
161
250
|
className: css.iconPlaceholder,
|
|
162
|
-
viewBox:
|
|
251
|
+
viewBox: "0 0 24 24",
|
|
163
252
|
width: 24,
|
|
164
253
|
height: 24,
|
|
165
254
|
focusable: false,
|
|
166
255
|
"aria-hidden": true,
|
|
167
256
|
tabIndex: -1
|
|
168
257
|
});
|
|
169
|
-
return React__namespace.default.createElement(React__namespace.default.Fragment, null, React__namespace.default.createElement("button", {
|
|
170
|
-
type:
|
|
171
|
-
className: classNames__default.default(css.prev, (
|
|
258
|
+
return /*#__PURE__*/React__namespace.default.createElement(React__namespace.default.Fragment, null, /*#__PURE__*/React__namespace.default.createElement("button", {
|
|
259
|
+
type: "button",
|
|
260
|
+
className: classNames__default.default(css.prev, (_classNames = {}, _defineProperty(_classNames, css.hideOnDisabled, hideOnDisabled), _defineProperty(_classNames, css.largeBoxShadow, !controlsVisible.isSmallHeight), _defineProperty(_classNames, css.smallBoxShadow, controlsVisible.isSmallHeight), _classNames)),
|
|
172
261
|
onClick: handleOnClickPrev,
|
|
173
262
|
style: {
|
|
174
263
|
zIndex: zIndex
|
|
175
264
|
},
|
|
176
265
|
disabled: !controlsVisible.prev,
|
|
177
|
-
title: t(
|
|
178
|
-
}, iconPlaceholder, React__namespace.default.createElement(Icon.Icon, {
|
|
266
|
+
title: t(_templateObject || (_templateObject = _taggedTemplateLiteral(["\u041D\u0430\u0437\u0430\u0434"])))
|
|
267
|
+
}, iconPlaceholder, /*#__PURE__*/React__namespace.default.createElement(Icon.Icon, {
|
|
179
268
|
className: css.icon,
|
|
180
269
|
"icon-as": Left.Left
|
|
181
|
-
})), React__namespace.default.createElement("button", {
|
|
182
|
-
type:
|
|
183
|
-
className: classNames__default.default(css.next, (
|
|
270
|
+
})), /*#__PURE__*/React__namespace.default.createElement("button", {
|
|
271
|
+
type: "button",
|
|
272
|
+
className: classNames__default.default(css.next, (_classNames2 = {}, _defineProperty(_classNames2, css.hideOnDisabled, hideOnDisabled), _defineProperty(_classNames2, css.largeBoxShadow, !controlsVisible.isSmallHeight), _defineProperty(_classNames2, css.smallBoxShadow, controlsVisible.isSmallHeight), _classNames2)),
|
|
184
273
|
onClick: handleOnClickNext,
|
|
185
274
|
style: {
|
|
186
275
|
zIndex: zIndex
|
|
187
276
|
},
|
|
188
277
|
disabled: !controlsVisible.next,
|
|
189
|
-
title: t(
|
|
190
|
-
}, iconPlaceholder, React__namespace.default.createElement(Icon.Icon, {
|
|
278
|
+
title: t(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\u0414\u0430\u043B\u0435\u0435"])))
|
|
279
|
+
}, iconPlaceholder, /*#__PURE__*/React__namespace.default.createElement(Icon.Icon, {
|
|
191
280
|
className: css.icon,
|
|
192
281
|
"icon-as": Right.Right
|
|
193
282
|
})));
|
|
194
283
|
}
|
|
195
284
|
return null;
|
|
196
285
|
};
|
|
197
|
-
var templateObject_1, templateObject_2;
|
|
198
286
|
|
|
199
|
-
var
|
|
200
|
-
|
|
201
|
-
var children =
|
|
202
|
-
className =
|
|
203
|
-
|
|
204
|
-
hideOnDisabled =
|
|
205
|
-
|
|
206
|
-
isActive =
|
|
207
|
-
onClickNext =
|
|
208
|
-
onClickPrev =
|
|
209
|
-
|
|
210
|
-
showOnHover =
|
|
211
|
-
zIndex =
|
|
212
|
-
props =
|
|
287
|
+
var _excluded = ["children", "className", "hideOnDisabled", "isActive", "onClickNext", "onClickPrev", "showOnHover", "zIndex"];
|
|
288
|
+
var ScrollControls = /*#__PURE__*/React__namespace.forwardRef(function (_ref, ref) {
|
|
289
|
+
var children = _ref.children,
|
|
290
|
+
className = _ref.className,
|
|
291
|
+
_ref$hideOnDisabled = _ref.hideOnDisabled,
|
|
292
|
+
hideOnDisabled = _ref$hideOnDisabled === void 0 ? true : _ref$hideOnDisabled,
|
|
293
|
+
_ref$isActive = _ref.isActive,
|
|
294
|
+
isActive = _ref$isActive === void 0 ? true : _ref$isActive,
|
|
295
|
+
onClickNext = _ref.onClickNext,
|
|
296
|
+
onClickPrev = _ref.onClickPrev,
|
|
297
|
+
_ref$showOnHover = _ref.showOnHover,
|
|
298
|
+
showOnHover = _ref$showOnHover === void 0 ? false : _ref$showOnHover,
|
|
299
|
+
zIndex = _ref.zIndex,
|
|
300
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
213
301
|
var scrollRef = React__namespace.useRef(null);
|
|
214
|
-
return React__namespace.createElement("div",
|
|
302
|
+
return /*#__PURE__*/React__namespace.createElement("div", _extends({
|
|
215
303
|
ref: ref,
|
|
216
|
-
className: classNames__default.default(css.root, className, (
|
|
217
|
-
}, props), children(scrollRef), React__namespace.createElement(ScrollControlsButton, {
|
|
304
|
+
className: classNames__default.default(css.root, className, _defineProperty({}, css.showOnHover, showOnHover))
|
|
305
|
+
}, props), children(scrollRef), /*#__PURE__*/React__namespace.createElement(ScrollControlsButton, {
|
|
218
306
|
scrollRef: scrollRef,
|
|
219
307
|
hideOnDisabled: hideOnDisabled,
|
|
220
308
|
isActive: isActive,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("classnames"),r=require("@prom-ui/core/Icon"),n=require("@prom-ui/core/useBodyTTag"),i=require("@prom-ui/icons/Left"),l=require("@prom-ui/icons/Right");function
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("classnames"),r=require("@prom-ui/core/Icon"),n=require("@prom-ui/core/useBodyTTag"),i=require("@prom-ui/icons/Left"),l=require("@prom-ui/icons/Right");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function c(e){if(e&&"object"==typeof e&&"default"in e)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var u=c(e),a=o(t);function f(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s.apply(this,arguments)}function d(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function v(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function m(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,l,o,c=[],u=!0,a=!1;try{if(l=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=l.call(r)).done)&&(c.push(n.value),c.length!==t);u=!0);}catch(f){a=!0,i=f}finally{try{if(!u&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(a)throw i}}return c}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return b(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return b(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var y,p,h="mOlOq",g="cF2KB rZcyK",O="_9B-9g rZcyK",j="a-AIU",x="EU4JE",S="mOQTl",E="lzBzL",w="StbVV",I="IONkE",N=function(t){var o=t.scrollRef,c=t.hideOnDisabled,s=void 0!==c&&c,d=t.isActive,b=void 0===d||d,h=t.onClickNext,w=t.onClickPrev,N=t.zIndex,P=t.children,k=n.useBodyTTag().t,A=e.useRef(null),C=m(e.useState({prev:!1,next:!1,isSmallHeight:!1}),2),z=C[0],q=C[1],H=function(e){var t=o.current,r=t.scrollLeft,n=t.scrollWidth,i=t.clientWidth,l=t.clientHeight,c=(Number.isInteger(e)?e:r)||0;q({prev:c>1,next:c<n-i,isSmallHeight:l<64})},T=function(e){var t=o.current,r=t.scrollLeft,n=t.clientWidth*e;H(r+n),requestAnimationFrame((function(){o.current&&o.current.scrollBy({left:n,behavior:"smooth"})}))},B=function(){clearTimeout(A.current||0),A.current=setTimeout(H,100)};if(e.useEffect((function(){return o.current&&b&&(H(),o.current.addEventListener("scroll",B)),function(){o.current&&b&&o.current.removeEventListener("scroll",B)}}),[b,P]),b&&(z.prev||z.next)){var L,R,D=u.default.createElement("svg",{className:S,viewBox:"0 0 24 24",width:24,height:24,focusable:!1,"aria-hidden":!0,tabIndex:-1});return u.default.createElement(u.default.Fragment,null,u.default.createElement("button",{type:"button",className:a.default(g,(L={},f(L,I,s),f(L,j,!z.isSmallHeight),f(L,x,z.isSmallHeight),L)),onClick:function(){"function"==typeof w&&w(),T(-1)},style:{zIndex:N},disabled:!z.prev,title:k(y||(y=v(["Назад"])))},D,u.default.createElement(r.Icon,{className:E,"icon-as":i.Left})),u.default.createElement("button",{type:"button",className:a.default(O,(R={},f(R,I,s),f(R,j,!z.isSmallHeight),f(R,x,z.isSmallHeight),R)),onClick:function(){"function"==typeof h&&h(),T(1)},style:{zIndex:N},disabled:!z.next,title:k(p||(p=v(["Далее"])))},D,u.default.createElement(r.Icon,{className:E,"icon-as":l.Right})))}return null},P=["children","className","hideOnDisabled","isActive","onClickNext","onClickPrev","showOnHover","zIndex"],k=u.forwardRef((function(e,t){var r=e.children,n=e.className,i=e.hideOnDisabled,l=void 0===i||i,o=e.isActive,c=void 0===o||o,v=e.onClickNext,m=e.onClickPrev,b=e.showOnHover,y=void 0!==b&&b,p=e.zIndex,g=d(e,P),O=u.useRef(null);return u.createElement("div",s({ref:t,className:a.default(h,n,f({},w,y))},g),r(O),u.createElement(N,{scrollRef:O,hideOnDisabled:l,isActive:c,onClickNext:v,onClickPrev:m,zIndex:p},r))}));exports.ScrollControls=k,require("./style.production.css");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("classnames"),r=require("@prom-ui/core/Icon"),n=require("@prom-ui/core/useBodyTTag"),i=require("@prom-ui/icons/Left"),l=require("@prom-ui/icons/Right");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("classnames"),r=require("@prom-ui/core/Icon"),n=require("@prom-ui/core/useBodyTTag"),i=require("@prom-ui/icons/Left"),l=require("@prom-ui/icons/Right");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function u(e){if(e&&"object"==typeof e&&"default"in e)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var c=u(e),a=o(t);function f(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s.apply(this,arguments)}function d(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function v(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function m(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,l,o,u=[],c=!0,a=!1;try{if(l=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=l.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(f){a=!0,i=f}finally{try{if(!c&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(a)throw i}}return u}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return b(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return b(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var y,p,h="_5xFyd",g="YhapL kQ3-r",O="yCCvv kQ3-r",j="_4Z-qq",x="ZAZeD",w="XLACs",S="z7X7-",E="PVtmJ",C="hwEsJ",I=function(t){var o=t.scrollRef,u=t.hideOnDisabled,s=void 0!==u&&u,d=t.isActive,b=void 0===d||d,h=t.onClickNext,E=t.onClickPrev,I=t.zIndex,P=t.children,k=n.useBodyTTag().t,N=e.useRef(null),A=m(e.useState({prev:!1,next:!1,isSmallHeight:!1}),2),q=A[0],z=A[1],H=function(e){var t=o.current,r=t.scrollLeft,n=t.scrollWidth,i=t.clientWidth,l=t.clientHeight,u=(Number.isInteger(e)?e:r)||0;z({prev:u>1,next:u<n-i,isSmallHeight:l<64})},L=function(e){var t=o.current,r=t.scrollLeft,n=t.clientWidth*e;H(r+n),requestAnimationFrame((function(){o.current&&o.current.scrollBy({left:n,behavior:"smooth"})}))},T=function(){clearTimeout(N.current||0),N.current=setTimeout(H,100)};if(e.useEffect((function(){return o.current&&b&&(H(),o.current.addEventListener("scroll",T)),function(){o.current&&b&&o.current.removeEventListener("scroll",T)}}),[b,P]),b&&(q.prev||q.next)){var R,D,B=c.default.createElement("svg",{className:w,viewBox:"0 0 24 24",width:24,height:24,focusable:!1,"aria-hidden":!0,tabIndex:-1});return c.default.createElement(c.default.Fragment,null,c.default.createElement("button",{type:"button",className:a.default(g,(R={},f(R,C,s),f(R,j,!q.isSmallHeight),f(R,x,q.isSmallHeight),R)),onClick:function(){"function"==typeof E&&E(),L(-1)},style:{zIndex:I},disabled:!q.prev,title:k(y||(y=v(["Назад"])))},B,c.default.createElement(r.Icon,{className:S,"icon-as":i.Left})),c.default.createElement("button",{type:"button",className:a.default(O,(D={},f(D,C,s),f(D,j,!q.isSmallHeight),f(D,x,q.isSmallHeight),D)),onClick:function(){"function"==typeof h&&h(),L(1)},style:{zIndex:I},disabled:!q.next,title:k(p||(p=v(["Далее"])))},B,c.default.createElement(r.Icon,{className:S,"icon-as":l.Right})))}return null},P=["children","className","hideOnDisabled","isActive","onClickNext","onClickPrev","showOnHover","zIndex"],k=c.forwardRef((function(e,t){var r=e.children,n=e.className,i=e.hideOnDisabled,l=void 0===i||i,o=e.isActive,u=void 0===o||o,v=e.onClickNext,m=e.onClickPrev,b=e.showOnHover,y=void 0!==b&&b,p=e.zIndex,g=d(e,P),O=c.useRef(null);return c.createElement("div",s({ref:t,className:a.default(h,n,f({},E,y))},g),r(O),c.createElement(I,{scrollRef:O,hideOnDisabled:l,isActive:u,onClickNext:v,onClickPrev:m,zIndex:p},r))}));exports.ScrollControls=k,require("./style.production.v2.css");
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
export type ScrollControlsProps = Omit<React.ComponentProps<'div'>, 'children'> & {
|
|
3
|
-
/** Принимает children как функцию, `(scrollRef) =>` */
|
|
4
|
-
children: (ref: React.MutableRefObject<null>) => JSX.Element | null;
|
|
5
|
-
/** Показывать кнопки при наведении */
|
|
6
|
-
showOnHover?: boolean;
|
|
7
|
-
/** Скрыть кнопку если не активная */
|
|
8
|
-
hideOnDisabled?: boolean;
|
|
9
|
-
/** Если передать `false` компонент перестанет работать */
|
|
10
|
-
isActive?: boolean;
|
|
11
|
-
onClickNext?: () => void;
|
|
12
|
-
onClickPrev?: () => void;
|
|
13
|
-
/** Устанавливает z-index кнопкам */
|
|
14
|
-
zIndex?: number;
|
|
15
|
-
};
|
|
16
|
-
export declare const ScrollControls: React.ForwardRefExoticComponent<Omit<ScrollControlsProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export type ScrollControlsProps = Omit<React.ComponentProps<'div'>, 'children'> & {
|
|
3
|
+
/** Принимает children как функцию, `(scrollRef) =>` */
|
|
4
|
+
children: (ref: React.MutableRefObject<null>) => JSX.Element | null;
|
|
5
|
+
/** Показывать кнопки при наведении */
|
|
6
|
+
showOnHover?: boolean;
|
|
7
|
+
/** Скрыть кнопку если не активная */
|
|
8
|
+
hideOnDisabled?: boolean;
|
|
9
|
+
/** Если передать `false` компонент перестанет работать */
|
|
10
|
+
isActive?: boolean;
|
|
11
|
+
onClickNext?: () => void;
|
|
12
|
+
onClickPrev?: () => void;
|
|
13
|
+
/** Устанавливает z-index кнопкам */
|
|
14
|
+
zIndex?: number;
|
|
15
|
+
};
|
|
16
|
+
export declare const ScrollControls: React.ForwardRefExoticComponent<Omit<ScrollControlsProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|