@salutejs/plasma-core 1.214.0-canary.2448.21508326842.0 → 1.214.0-canary.2449.21626940271.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/.swc/plugins/{v7_linux_x86_64_14.0.0/cce279a62b5dde357ee7b421711ef357c3f0a29cd3cb6e86336f7345fd604d8e → linux_x86_64_24.0.0/202f6e4cef5244f7c5860be71bf49ba7448c1085420582e8bfccb5598d99b9c4.wasmer-v7} +0 -0
- package/.swc/plugins/{v7_linux_x86_64_14.0.0/358fecaab1701de64a7bceee21e5f3a204d1107aa33eb372d1dab77a43118622 → linux_x86_64_24.0.0/671036687e3bc3a68b2957b14f0890c0b5825f19e8049d9af5daf3537b9160fd.wasmer-v7} +0 -0
- package/collectPackageInfo.js +1 -1
- package/components/Badge/Badge.js +19 -10
- package/components/Button/Button.mixins.js +1 -1
- package/components/Button/createButton.js +76 -12
- package/components/Card/Card.js +75 -11
- package/components/Card/CardMedia.js +19 -10
- package/components/Card/CardPrice.js +19 -10
- package/components/Card/CardTypography.js +2 -2
- package/components/Carousel/CarouselItem.js +21 -12
- package/components/Carousel/hooks.js +2 -2
- package/components/Carousel/utils.js +14 -14
- package/components/Image/Image.js +19 -10
- package/components/Input/Input.mixins.js +1 -1
- package/components/ModalBase/ModalBase.js +19 -10
- package/components/ModalBase/ModalBaseContext.js +3 -3
- package/components/ModalBase/ModalOverlay.js +19 -10
- package/components/ModalBase/hooks.js +1 -1
- package/components/PaginationDots/usePaginationDots.js +1 -1
- package/components/Popup/Popup.js +77 -13
- package/components/PopupBase/PopupBase.js +31 -13
- package/components/PopupBase/PopupBaseContext.js +4 -4
- package/components/PopupBase/PopupBaseRoot.js +75 -11
- package/components/PopupBase/hooks.js +2 -2
- package/components/PopupBase/utils.js +1 -1
- package/components/Price/Price.js +19 -10
- package/components/RadioGroup/RadioGroup.js +75 -11
- package/components/SSRProvider/SSRProvider.js +1 -1
- package/components/Skeleton/LineSkeleton.js +19 -10
- package/components/Skeleton/RectSkeleton.js +19 -10
- package/components/Skeleton/TextSkeleton.js +19 -10
- package/components/Slider/Double.js +19 -10
- package/components/Slider/Handle.js +29 -11
- package/components/Slider/Single.js +19 -10
- package/components/Slider/Slider.js +2 -2
- package/components/Slider/SliderBase.js +2 -2
- package/components/Slider/ThumbBase.js +19 -10
- package/components/Spinner/Spinner.js +19 -10
- package/components/Spinner/SpinnerSvg.js +19 -10
- package/components/Switch/Switch.js +76 -12
- package/components/Tabs/TabItem.js +75 -11
- package/components/Tabs/Tabs.js +75 -11
- package/components/Tabs/createTabsController.js +75 -11
- package/components/TextArea/TextArea.js +1 -1
- package/components/Toast/Toast.js +1 -1
- package/components/Toast/ToastContext.js +2 -2
- package/components/Toast/ToastController.js +3 -3
- package/components/Toast/ToastProvider.js +3 -3
- package/components/Toast/useToast.js +1 -1
- package/es/collectPackageInfo.js +1 -1
- package/es/components/Badge/Badge.js +19 -10
- package/es/components/Button/Button.mixins.js +1 -1
- package/es/components/Button/createButton.js +76 -12
- package/es/components/Card/Card.js +75 -11
- package/es/components/Card/CardMedia.js +19 -10
- package/es/components/Card/CardPrice.js +19 -10
- package/es/components/Card/CardTypography.js +2 -2
- package/es/components/Carousel/CarouselItem.js +21 -12
- package/es/components/Carousel/hooks.js +4 -4
- package/es/components/Carousel/utils.js +14 -14
- package/es/components/Image/Image.js +19 -10
- package/es/components/Input/Input.mixins.js +1 -1
- package/es/components/ModalBase/ModalBase.js +19 -10
- package/es/components/ModalBase/ModalBaseContext.js +3 -3
- package/es/components/ModalBase/ModalOverlay.js +19 -10
- package/es/components/ModalBase/hooks.js +1 -1
- package/es/components/PaginationDots/usePaginationDots.js +1 -1
- package/es/components/Popup/Popup.js +77 -13
- package/es/components/PopupBase/PopupBase.js +31 -13
- package/es/components/PopupBase/PopupBaseContext.js +4 -4
- package/es/components/PopupBase/PopupBaseRoot.js +75 -11
- package/es/components/PopupBase/hooks.js +2 -2
- package/es/components/PopupBase/utils.js +1 -1
- package/es/components/Price/Price.js +19 -10
- package/es/components/RadioGroup/RadioGroup.js +75 -11
- package/es/components/SSRProvider/SSRProvider.js +1 -1
- package/es/components/Skeleton/LineSkeleton.js +19 -10
- package/es/components/Skeleton/RectSkeleton.js +19 -10
- package/es/components/Skeleton/TextSkeleton.js +19 -10
- package/es/components/Slider/Double.js +19 -10
- package/es/components/Slider/Handle.js +29 -11
- package/es/components/Slider/Single.js +19 -10
- package/es/components/Slider/Slider.js +2 -2
- package/es/components/Slider/SliderBase.js +2 -2
- package/es/components/Slider/ThumbBase.js +19 -10
- package/es/components/Spinner/Spinner.js +19 -10
- package/es/components/Spinner/SpinnerSvg.js +19 -10
- package/es/components/Switch/Switch.js +76 -12
- package/es/components/Tabs/TabItem.js +75 -11
- package/es/components/Tabs/Tabs.js +75 -11
- package/es/components/Tabs/createTabsController.js +75 -11
- package/es/components/TextArea/TextArea.js +1 -1
- package/es/components/Toast/Toast.js +1 -1
- package/es/components/Toast/ToastContext.js +2 -2
- package/es/components/Toast/ToastController.js +3 -3
- package/es/components/Toast/ToastProvider.js +3 -3
- package/es/components/Toast/useToast.js +1 -1
- package/es/hocs/withAutoFocus.js +20 -11
- package/es/hocs/withSkeleton.js +1 -1
- package/es/hooks/useFocusTrap.js +4 -4
- package/es/hooks/useForkRef.js +1 -1
- package/es/hooks/useResizeObserver.js +1 -1
- package/es/mixins/addFocus.js +2 -2
- package/es/mixins/applyDisabled.js +1 -1
- package/es/mixins/applyEllipsis.js +1 -1
- package/es/mixins/applyMaxLines.js +1 -1
- package/es/mixins/applyNoSelect.js +1 -1
- package/es/mixins/applyOutline.js +1 -1
- package/es/mixins/applyRoundness.js +1 -1
- package/es/mixins/applyScrollSnap.js +1 -1
- package/es/mixins/applySkeletonGradient.js +1 -1
- package/es/mixins/applyView.js +1 -1
- package/es/mixins/blur.js +1 -1
- package/es/utils/animatedScrollTo.js +8 -8
- package/es/utils/extractTextFrom.js +1 -1
- package/es/utils/formatCurrency.js +1 -1
- package/es/utils/formatters.js +5 -5
- package/es/utils/roundness.js +1 -1
- package/es/utils/scopeTab.js +1 -1
- package/es/utils/setRef.js +1 -1
- package/es/utils/tabbable.js +6 -6
- package/es/utils/toCssSize.js +1 -1
- package/es/utils/transformStyles.js +3 -3
- package/hocs/withAutoFocus.js +20 -11
- package/hocs/withSkeleton.js +1 -1
- package/hooks/useFocusTrap.js +4 -4
- package/hooks/useForkRef.js +1 -1
- package/hooks/useResizeObserver.js +1 -1
- package/mixins/addFocus.js +2 -2
- package/mixins/applyDisabled.js +1 -1
- package/mixins/applyEllipsis.js +1 -1
- package/mixins/applyMaxLines.js +1 -1
- package/mixins/applyNoSelect.js +1 -1
- package/mixins/applyOutline.js +1 -1
- package/mixins/applyRoundness.js +1 -1
- package/mixins/applyScrollSnap.js +1 -1
- package/mixins/applySkeletonGradient.js +1 -1
- package/mixins/applyView.js +1 -1
- package/mixins/blur.js +1 -1
- package/package.json +3 -3
- package/utils/animatedScrollTo.js +8 -8
- package/utils/extractTextFrom.js +1 -1
- package/utils/formatCurrency.js +1 -1
- package/utils/formatters.js +5 -5
- package/utils/roundness.js +1 -1
- package/utils/scopeTab.js +1 -1
- package/utils/setRef.js +1 -1
- package/utils/tabbable.js +6 -6
- package/utils/toCssSize.js +1 -1
- package/utils/transformStyles.js +3 -3
package/collectPackageInfo.js
CHANGED
|
@@ -98,12 +98,22 @@ function _object_spread(target) {
|
|
|
98
98
|
}
|
|
99
99
|
function _object_without_properties(source, excluded) {
|
|
100
100
|
if (source == null) return {};
|
|
101
|
-
var target =
|
|
102
|
-
|
|
101
|
+
var target = {}, sourceKeys, key, i;
|
|
102
|
+
if (typeof Reflect !== "undefined" && Reflect.ownKeys) {
|
|
103
|
+
sourceKeys = Reflect.ownKeys(source);
|
|
104
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
105
|
+
key = sourceKeys[i];
|
|
106
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
107
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
108
|
+
target[key] = source[key];
|
|
109
|
+
}
|
|
110
|
+
return target;
|
|
111
|
+
}
|
|
112
|
+
target = _object_without_properties_loose(source, excluded);
|
|
103
113
|
if (Object.getOwnPropertySymbols) {
|
|
104
|
-
|
|
105
|
-
for(i = 0; i <
|
|
106
|
-
key =
|
|
114
|
+
sourceKeys = Object.getOwnPropertySymbols(source);
|
|
115
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
116
|
+
key = sourceKeys[i];
|
|
107
117
|
if (excluded.indexOf(key) >= 0) continue;
|
|
108
118
|
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
109
119
|
target[key] = source[key];
|
|
@@ -113,12 +123,11 @@ function _object_without_properties(source, excluded) {
|
|
|
113
123
|
}
|
|
114
124
|
function _object_without_properties_loose(source, excluded) {
|
|
115
125
|
if (source == null) return {};
|
|
116
|
-
var target = {};
|
|
117
|
-
var sourceKeys = Object.keys(source);
|
|
118
|
-
var key, i;
|
|
126
|
+
var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
|
|
119
127
|
for(i = 0; i < sourceKeys.length; i++){
|
|
120
128
|
key = sourceKeys[i];
|
|
121
129
|
if (excluded.indexOf(key) >= 0) continue;
|
|
130
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
122
131
|
target[key] = source[key];
|
|
123
132
|
}
|
|
124
133
|
return target;
|
|
@@ -185,8 +194,8 @@ var StyledBadge = _styledcomponents.default.div.withConfig({
|
|
|
185
194
|
";padding-left:0;padding-right:0;"
|
|
186
195
|
], badgeRootSizes[size].minWidth), StyledText, badgeSizes[size].textMarginX, badgeSizes[size].textMarginX, StyledContent, StyledText, badgeSizes[size].textMarginLeftAfterContent);
|
|
187
196
|
});
|
|
188
|
-
var Badge = function(
|
|
189
|
-
var
|
|
197
|
+
var Badge = function Badge(_0) {
|
|
198
|
+
var _0_size = _0.size, size = _0_size === void 0 ? 'l' : _0_size, text = _0.text, contentLeft = _0.contentLeft, rest = _object_without_properties(_0, [
|
|
190
199
|
"size",
|
|
191
200
|
"text",
|
|
192
201
|
"contentLeft"
|
|
@@ -63,7 +63,7 @@ function _object_spread_props(target, source) {
|
|
|
63
63
|
}
|
|
64
64
|
return target;
|
|
65
65
|
}
|
|
66
|
-
var getButtonSizesMixin = function(sizes, typos) {
|
|
66
|
+
var getButtonSizesMixin = function getButtonSizesMixin(sizes, typos) {
|
|
67
67
|
return function(param) {
|
|
68
68
|
var size = param.size, pin = param.pin, outlined = param.outlined, focused = param.focused, isContentLeft = param.$isContentLeft, isContentRight = param.$isContentRight, shiftLeft = param.shiftLeft, shiftRight = param.shiftRight, square = param.square, stretch = param.stretch, theme = param.theme;
|
|
69
69
|
var paddingX = sizes[size].paddingX;
|
|
@@ -10,6 +10,14 @@ Object.defineProperty(exports, "createButton", {
|
|
|
10
10
|
});
|
|
11
11
|
var _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
12
12
|
var _Button = require("./Button");
|
|
13
|
+
function _array_like_to_array(arr, len) {
|
|
14
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
15
|
+
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
16
|
+
return arr2;
|
|
17
|
+
}
|
|
18
|
+
function _array_with_holes(arr) {
|
|
19
|
+
if (Array.isArray(arr)) return arr;
|
|
20
|
+
}
|
|
13
21
|
function _define_property(obj, key, value) {
|
|
14
22
|
if (key in obj) {
|
|
15
23
|
Object.defineProperty(obj, key, {
|
|
@@ -64,6 +72,36 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
64
72
|
}
|
|
65
73
|
return newObj;
|
|
66
74
|
}
|
|
75
|
+
function _iterable_to_array(iter) {
|
|
76
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
77
|
+
}
|
|
78
|
+
function _iterable_to_array_limit(arr, i) {
|
|
79
|
+
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
80
|
+
if (_i == null) return;
|
|
81
|
+
var _arr = [];
|
|
82
|
+
var _n = true;
|
|
83
|
+
var _d = false;
|
|
84
|
+
var _s, _e;
|
|
85
|
+
try {
|
|
86
|
+
for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
|
|
87
|
+
_arr.push(_s.value);
|
|
88
|
+
if (i && _arr.length === i) break;
|
|
89
|
+
}
|
|
90
|
+
} catch (err) {
|
|
91
|
+
_d = true;
|
|
92
|
+
_e = err;
|
|
93
|
+
} finally{
|
|
94
|
+
try {
|
|
95
|
+
if (!_n && _i["return"] != null) _i["return"]();
|
|
96
|
+
} finally{
|
|
97
|
+
if (_d) throw _e;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
return _arr;
|
|
101
|
+
}
|
|
102
|
+
function _non_iterable_rest() {
|
|
103
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
104
|
+
}
|
|
67
105
|
function _object_spread(target) {
|
|
68
106
|
for(var i = 1; i < arguments.length; i++){
|
|
69
107
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
@@ -81,12 +119,22 @@ function _object_spread(target) {
|
|
|
81
119
|
}
|
|
82
120
|
function _object_without_properties(source, excluded) {
|
|
83
121
|
if (source == null) return {};
|
|
84
|
-
var target =
|
|
85
|
-
|
|
122
|
+
var target = {}, sourceKeys, key, i;
|
|
123
|
+
if (typeof Reflect !== "undefined" && Reflect.ownKeys) {
|
|
124
|
+
sourceKeys = Reflect.ownKeys(source);
|
|
125
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
126
|
+
key = sourceKeys[i];
|
|
127
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
128
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
129
|
+
target[key] = source[key];
|
|
130
|
+
}
|
|
131
|
+
return target;
|
|
132
|
+
}
|
|
133
|
+
target = _object_without_properties_loose(source, excluded);
|
|
86
134
|
if (Object.getOwnPropertySymbols) {
|
|
87
|
-
|
|
88
|
-
for(i = 0; i <
|
|
89
|
-
key =
|
|
135
|
+
sourceKeys = Object.getOwnPropertySymbols(source);
|
|
136
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
137
|
+
key = sourceKeys[i];
|
|
90
138
|
if (excluded.indexOf(key) >= 0) continue;
|
|
91
139
|
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
92
140
|
target[key] = source[key];
|
|
@@ -96,25 +144,41 @@ function _object_without_properties(source, excluded) {
|
|
|
96
144
|
}
|
|
97
145
|
function _object_without_properties_loose(source, excluded) {
|
|
98
146
|
if (source == null) return {};
|
|
99
|
-
var target = {};
|
|
100
|
-
var sourceKeys = Object.keys(source);
|
|
101
|
-
var key, i;
|
|
147
|
+
var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
|
|
102
148
|
for(i = 0; i < sourceKeys.length; i++){
|
|
103
149
|
key = sourceKeys[i];
|
|
104
150
|
if (excluded.indexOf(key) >= 0) continue;
|
|
151
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
105
152
|
target[key] = source[key];
|
|
106
153
|
}
|
|
107
154
|
return target;
|
|
108
155
|
}
|
|
156
|
+
function _sliced_to_array(arr, i) {
|
|
157
|
+
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
158
|
+
}
|
|
159
|
+
function _to_array(arr) {
|
|
160
|
+
return _array_with_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_rest();
|
|
161
|
+
}
|
|
162
|
+
function _unsupported_iterable_to_array(o, minLen) {
|
|
163
|
+
if (!o) return;
|
|
164
|
+
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
165
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
166
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
167
|
+
if (n === "Map" || n === "Set") return Array.from(n);
|
|
168
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
169
|
+
}
|
|
109
170
|
function createButton() {
|
|
110
171
|
var Root = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : _Button.ButtonRoot;
|
|
111
172
|
// eslint-disable-next-line prefer-arrow-callback
|
|
112
|
-
return /*#__PURE__*/ (0, _react.forwardRef)(function Button(
|
|
113
|
-
var
|
|
173
|
+
return /*#__PURE__*/ (0, _react.forwardRef)(function Button(_0, _1) {
|
|
174
|
+
var _ref = [
|
|
175
|
+
_0,
|
|
176
|
+
_1
|
|
177
|
+
], _ref1 = _to_array(_ref), _ref2 = _ref1[0], _rest = _ref1.slice(1), children = _ref2.children, text = _ref2.text, contentLeft = _ref2.contentLeft, contentRight = _ref2.contentRight, square = _ref2.square, deviceScale = _ref2.deviceScale, _ref_loader = _ref2.loader, loader = _ref_loader === void 0 ? /*#__PURE__*/ _react.default.createElement(_Button.StyledSpinner, {
|
|
114
178
|
color: "currentColor",
|
|
115
179
|
size: 56,
|
|
116
180
|
deviceScale: deviceScale
|
|
117
|
-
}) :
|
|
181
|
+
}) : _ref_loader, disabled = _ref2.disabled, isLoading = _ref2.isLoading, _ref_type = _ref2.type, type = _ref_type === void 0 ? 'button' : _ref_type, rest = _object_without_properties(_ref2, [
|
|
118
182
|
"children",
|
|
119
183
|
"text",
|
|
120
184
|
"contentLeft",
|
|
@@ -125,7 +189,7 @@ function createButton() {
|
|
|
125
189
|
"disabled",
|
|
126
190
|
"isLoading",
|
|
127
191
|
"type"
|
|
128
|
-
]);
|
|
192
|
+
]), _rest1 = _sliced_to_array(_rest, 1), ref = _rest1[0];
|
|
129
193
|
var isContentLeft = Boolean(contentLeft);
|
|
130
194
|
var isContentRight = Boolean(contentRight);
|
|
131
195
|
return /*#__PURE__*/ _react.default.createElement(Root, _object_spread({
|
package/components/Card/Card.js
CHANGED
|
@@ -21,6 +21,14 @@ var _styledcomponents = /*#__PURE__*/ _interop_require_wildcard(require("styled-
|
|
|
21
21
|
var _tokens = require("../../tokens");
|
|
22
22
|
var _mixins = require("../../mixins");
|
|
23
23
|
var _Typography = require("../Typography");
|
|
24
|
+
function _array_like_to_array(arr, len) {
|
|
25
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
26
|
+
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
27
|
+
return arr2;
|
|
28
|
+
}
|
|
29
|
+
function _array_with_holes(arr) {
|
|
30
|
+
if (Array.isArray(arr)) return arr;
|
|
31
|
+
}
|
|
24
32
|
function _define_property(obj, key, value) {
|
|
25
33
|
if (key in obj) {
|
|
26
34
|
Object.defineProperty(obj, key, {
|
|
@@ -80,6 +88,36 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
80
88
|
}
|
|
81
89
|
return newObj;
|
|
82
90
|
}
|
|
91
|
+
function _iterable_to_array(iter) {
|
|
92
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
93
|
+
}
|
|
94
|
+
function _iterable_to_array_limit(arr, i) {
|
|
95
|
+
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
96
|
+
if (_i == null) return;
|
|
97
|
+
var _arr = [];
|
|
98
|
+
var _n = true;
|
|
99
|
+
var _d = false;
|
|
100
|
+
var _s, _e;
|
|
101
|
+
try {
|
|
102
|
+
for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
|
|
103
|
+
_arr.push(_s.value);
|
|
104
|
+
if (i && _arr.length === i) break;
|
|
105
|
+
}
|
|
106
|
+
} catch (err) {
|
|
107
|
+
_d = true;
|
|
108
|
+
_e = err;
|
|
109
|
+
} finally{
|
|
110
|
+
try {
|
|
111
|
+
if (!_n && _i["return"] != null) _i["return"]();
|
|
112
|
+
} finally{
|
|
113
|
+
if (_d) throw _e;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
return _arr;
|
|
117
|
+
}
|
|
118
|
+
function _non_iterable_rest() {
|
|
119
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
120
|
+
}
|
|
83
121
|
function _object_spread(target) {
|
|
84
122
|
for(var i = 1; i < arguments.length; i++){
|
|
85
123
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
@@ -97,12 +135,22 @@ function _object_spread(target) {
|
|
|
97
135
|
}
|
|
98
136
|
function _object_without_properties(source, excluded) {
|
|
99
137
|
if (source == null) return {};
|
|
100
|
-
var target =
|
|
101
|
-
|
|
138
|
+
var target = {}, sourceKeys, key, i;
|
|
139
|
+
if (typeof Reflect !== "undefined" && Reflect.ownKeys) {
|
|
140
|
+
sourceKeys = Reflect.ownKeys(source);
|
|
141
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
142
|
+
key = sourceKeys[i];
|
|
143
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
144
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
145
|
+
target[key] = source[key];
|
|
146
|
+
}
|
|
147
|
+
return target;
|
|
148
|
+
}
|
|
149
|
+
target = _object_without_properties_loose(source, excluded);
|
|
102
150
|
if (Object.getOwnPropertySymbols) {
|
|
103
|
-
|
|
104
|
-
for(i = 0; i <
|
|
105
|
-
key =
|
|
151
|
+
sourceKeys = Object.getOwnPropertySymbols(source);
|
|
152
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
153
|
+
key = sourceKeys[i];
|
|
106
154
|
if (excluded.indexOf(key) >= 0) continue;
|
|
107
155
|
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
108
156
|
target[key] = source[key];
|
|
@@ -112,16 +160,29 @@ function _object_without_properties(source, excluded) {
|
|
|
112
160
|
}
|
|
113
161
|
function _object_without_properties_loose(source, excluded) {
|
|
114
162
|
if (source == null) return {};
|
|
115
|
-
var target = {};
|
|
116
|
-
var sourceKeys = Object.keys(source);
|
|
117
|
-
var key, i;
|
|
163
|
+
var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
|
|
118
164
|
for(i = 0; i < sourceKeys.length; i++){
|
|
119
165
|
key = sourceKeys[i];
|
|
120
166
|
if (excluded.indexOf(key) >= 0) continue;
|
|
167
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
121
168
|
target[key] = source[key];
|
|
122
169
|
}
|
|
123
170
|
return target;
|
|
124
171
|
}
|
|
172
|
+
function _sliced_to_array(arr, i) {
|
|
173
|
+
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
174
|
+
}
|
|
175
|
+
function _to_array(arr) {
|
|
176
|
+
return _array_with_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_rest();
|
|
177
|
+
}
|
|
178
|
+
function _unsupported_iterable_to_array(o, minLen) {
|
|
179
|
+
if (!o) return;
|
|
180
|
+
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
181
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
182
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
183
|
+
if (n === "Map" || n === "Set") return Array.from(n);
|
|
184
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
185
|
+
}
|
|
125
186
|
// В этих константах задаем размеры в em, чтобы не зависеть напрямую от пикселей
|
|
126
187
|
// В то же время в числителях - значения в пикселях, взятые из макета
|
|
127
188
|
var fontSize = 16;
|
|
@@ -160,11 +221,14 @@ var StyledCard = (0, _styledcomponents.default)(_Typography.Body1).withConfig({
|
|
|
160
221
|
"&{transform:scale(1.04);}"
|
|
161
222
|
]), focused));
|
|
162
223
|
});
|
|
163
|
-
var Card = /*#__PURE__*/ _react.default.forwardRef(function Card(
|
|
164
|
-
var
|
|
224
|
+
var Card = /*#__PURE__*/ _react.default.forwardRef(function Card(_0, _1) {
|
|
225
|
+
var _ref = [
|
|
226
|
+
_0,
|
|
227
|
+
_1
|
|
228
|
+
], _ref1 = _to_array(_ref), _ref2 = _ref1[0], _rest = _ref1.slice(1), _ref_roundness = _ref2.roundness, roundness = _ref_roundness === void 0 ? DEFAULT_ROUNDNESS : _ref_roundness, children = _ref2.children, rest = _object_without_properties(_ref2, [
|
|
165
229
|
"roundness",
|
|
166
230
|
"children"
|
|
167
|
-
]);
|
|
231
|
+
]), _rest1 = _sliced_to_array(_rest, 1), ref = _rest1[0];
|
|
168
232
|
return /*#__PURE__*/ _react.default.createElement(StyledCard, _object_spread({
|
|
169
233
|
ref: ref,
|
|
170
234
|
roundness: roundness
|
|
@@ -87,12 +87,22 @@ function _object_spread(target) {
|
|
|
87
87
|
}
|
|
88
88
|
function _object_without_properties(source, excluded) {
|
|
89
89
|
if (source == null) return {};
|
|
90
|
-
var target =
|
|
91
|
-
|
|
90
|
+
var target = {}, sourceKeys, key, i;
|
|
91
|
+
if (typeof Reflect !== "undefined" && Reflect.ownKeys) {
|
|
92
|
+
sourceKeys = Reflect.ownKeys(source);
|
|
93
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
94
|
+
key = sourceKeys[i];
|
|
95
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
96
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
97
|
+
target[key] = source[key];
|
|
98
|
+
}
|
|
99
|
+
return target;
|
|
100
|
+
}
|
|
101
|
+
target = _object_without_properties_loose(source, excluded);
|
|
92
102
|
if (Object.getOwnPropertySymbols) {
|
|
93
|
-
|
|
94
|
-
for(i = 0; i <
|
|
95
|
-
key =
|
|
103
|
+
sourceKeys = Object.getOwnPropertySymbols(source);
|
|
104
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
105
|
+
key = sourceKeys[i];
|
|
96
106
|
if (excluded.indexOf(key) >= 0) continue;
|
|
97
107
|
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
98
108
|
target[key] = source[key];
|
|
@@ -102,12 +112,11 @@ function _object_without_properties(source, excluded) {
|
|
|
102
112
|
}
|
|
103
113
|
function _object_without_properties_loose(source, excluded) {
|
|
104
114
|
if (source == null) return {};
|
|
105
|
-
var target = {};
|
|
106
|
-
var sourceKeys = Object.keys(source);
|
|
107
|
-
var key, i;
|
|
115
|
+
var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
|
|
108
116
|
for(i = 0; i < sourceKeys.length; i++){
|
|
109
117
|
key = sourceKeys[i];
|
|
110
118
|
if (excluded.indexOf(key) >= 0) continue;
|
|
119
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
111
120
|
target[key] = source[key];
|
|
112
121
|
}
|
|
113
122
|
return target;
|
|
@@ -130,8 +139,8 @@ var StyledRoot = _styledcomponents.default.div.withConfig({
|
|
|
130
139
|
})([
|
|
131
140
|
"position:relative;"
|
|
132
141
|
]);
|
|
133
|
-
var CardMedia = function(
|
|
134
|
-
var disabled =
|
|
142
|
+
var CardMedia = function CardMedia(_0) {
|
|
143
|
+
var disabled = _0.disabled, placeholder = _0.placeholder, style = _0.style, children = _0.children, className = _0.className, props = _object_without_properties(_0, [
|
|
135
144
|
"disabled",
|
|
136
145
|
"placeholder",
|
|
137
146
|
"style",
|
|
@@ -20,12 +20,22 @@ function _interop_require_default(obj) {
|
|
|
20
20
|
}
|
|
21
21
|
function _object_without_properties(source, excluded) {
|
|
22
22
|
if (source == null) return {};
|
|
23
|
-
var target =
|
|
24
|
-
|
|
23
|
+
var target = {}, sourceKeys, key, i;
|
|
24
|
+
if (typeof Reflect !== "undefined" && Reflect.ownKeys) {
|
|
25
|
+
sourceKeys = Reflect.ownKeys(source);
|
|
26
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
27
|
+
key = sourceKeys[i];
|
|
28
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
29
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
30
|
+
target[key] = source[key];
|
|
31
|
+
}
|
|
32
|
+
return target;
|
|
33
|
+
}
|
|
34
|
+
target = _object_without_properties_loose(source, excluded);
|
|
25
35
|
if (Object.getOwnPropertySymbols) {
|
|
26
|
-
|
|
27
|
-
for(i = 0; i <
|
|
28
|
-
key =
|
|
36
|
+
sourceKeys = Object.getOwnPropertySymbols(source);
|
|
37
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
38
|
+
key = sourceKeys[i];
|
|
29
39
|
if (excluded.indexOf(key) >= 0) continue;
|
|
30
40
|
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
31
41
|
target[key] = source[key];
|
|
@@ -35,12 +45,11 @@ function _object_without_properties(source, excluded) {
|
|
|
35
45
|
}
|
|
36
46
|
function _object_without_properties_loose(source, excluded) {
|
|
37
47
|
if (source == null) return {};
|
|
38
|
-
var target = {};
|
|
39
|
-
var sourceKeys = Object.keys(source);
|
|
40
|
-
var key, i;
|
|
48
|
+
var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
|
|
41
49
|
for(i = 0; i < sourceKeys.length; i++){
|
|
42
50
|
key = sourceKeys[i];
|
|
43
51
|
if (excluded.indexOf(key) >= 0) continue;
|
|
52
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
44
53
|
target[key] = source[key];
|
|
45
54
|
}
|
|
46
55
|
return target;
|
|
@@ -72,8 +81,8 @@ var StyledCount = (0, _styledcomponents.default)(_Typography.Body2).withConfig({
|
|
|
72
81
|
"box-sizing:border-box;height:2.5rem;margin-left:0.5rem;color:",
|
|
73
82
|
";"
|
|
74
83
|
], _tokens.buttonAccent);
|
|
75
|
-
var CardPrice = function(
|
|
76
|
-
var count =
|
|
84
|
+
var CardPrice = function CardPrice(_0) {
|
|
85
|
+
var count = _0.count, currency = _0.currency, oldPrice = _0.oldPrice, price = _0.price, rest = _object_without_properties(_0, [
|
|
77
86
|
"count",
|
|
78
87
|
"currency",
|
|
79
88
|
"oldPrice",
|
|
@@ -87,14 +87,14 @@ var views = {
|
|
|
87
87
|
secondary: _tokens.secondary,
|
|
88
88
|
tertiary: _tokens.tertiary
|
|
89
89
|
};
|
|
90
|
-
var linesMixin = function(param) {
|
|
90
|
+
var linesMixin = function linesMixin(param) {
|
|
91
91
|
var _param_lines = param.lines, lines = _param_lines === void 0 ? 2 : _param_lines;
|
|
92
92
|
return (0, _styledcomponents.css)([
|
|
93
93
|
"display:-webkit-box;overflow:hidden;box-sizing:border-box;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:",
|
|
94
94
|
";"
|
|
95
95
|
], lines);
|
|
96
96
|
};
|
|
97
|
-
var viewMixin = function(param) {
|
|
97
|
+
var viewMixin = function viewMixin(param) {
|
|
98
98
|
var _param_view = param.view, view = _param_view === void 0 ? 'primary' : _param_view;
|
|
99
99
|
return (0, _styledcomponents.css)([
|
|
100
100
|
"transition:",
|
|
@@ -54,12 +54,22 @@ function _object_spread(target) {
|
|
|
54
54
|
}
|
|
55
55
|
function _object_without_properties(source, excluded) {
|
|
56
56
|
if (source == null) return {};
|
|
57
|
-
var target =
|
|
58
|
-
|
|
57
|
+
var target = {}, sourceKeys, key, i;
|
|
58
|
+
if (typeof Reflect !== "undefined" && Reflect.ownKeys) {
|
|
59
|
+
sourceKeys = Reflect.ownKeys(source);
|
|
60
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
61
|
+
key = sourceKeys[i];
|
|
62
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
63
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
64
|
+
target[key] = source[key];
|
|
65
|
+
}
|
|
66
|
+
return target;
|
|
67
|
+
}
|
|
68
|
+
target = _object_without_properties_loose(source, excluded);
|
|
59
69
|
if (Object.getOwnPropertySymbols) {
|
|
60
|
-
|
|
61
|
-
for(i = 0; i <
|
|
62
|
-
key =
|
|
70
|
+
sourceKeys = Object.getOwnPropertySymbols(source);
|
|
71
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
72
|
+
key = sourceKeys[i];
|
|
63
73
|
if (excluded.indexOf(key) >= 0) continue;
|
|
64
74
|
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
65
75
|
target[key] = source[key];
|
|
@@ -69,12 +79,11 @@ function _object_without_properties(source, excluded) {
|
|
|
69
79
|
}
|
|
70
80
|
function _object_without_properties_loose(source, excluded) {
|
|
71
81
|
if (source == null) return {};
|
|
72
|
-
var target = {};
|
|
73
|
-
var sourceKeys = Object.keys(source);
|
|
74
|
-
var key, i;
|
|
82
|
+
var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
|
|
75
83
|
for(i = 0; i < sourceKeys.length; i++){
|
|
76
84
|
key = sourceKeys[i];
|
|
77
85
|
if (excluded.indexOf(key) >= 0) continue;
|
|
86
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
78
87
|
target[key] = source[key];
|
|
79
88
|
}
|
|
80
89
|
return target;
|
|
@@ -92,8 +101,8 @@ var StyledItemVirtual = _styledcomponents.default.div.withConfig({
|
|
|
92
101
|
})([
|
|
93
102
|
"position:absolute;"
|
|
94
103
|
]);
|
|
95
|
-
var CarouselItem = function(
|
|
96
|
-
var
|
|
104
|
+
var CarouselItem = function CarouselItem(_0) {
|
|
105
|
+
var _0_scrollSnapAlign = _0.scrollSnapAlign, scrollSnapAlign = _0_scrollSnapAlign === void 0 ? 'center' : _0_scrollSnapAlign, _0_scrollSnapStop = _0.scrollSnapStop, scrollSnapStop = _0_scrollSnapStop === void 0 ? 'always' : _0_scrollSnapStop, children = _0.children, rest = _object_without_properties(_0, [
|
|
97
106
|
"scrollSnapAlign",
|
|
98
107
|
"scrollSnapStop",
|
|
99
108
|
"children"
|
|
@@ -105,8 +114,8 @@ var CarouselItem = function(_param) {
|
|
|
105
114
|
"aria-roledescription": "slide"
|
|
106
115
|
}, rest), children);
|
|
107
116
|
};
|
|
108
|
-
var CarouselItemVirtual = function(
|
|
109
|
-
var left =
|
|
117
|
+
var CarouselItemVirtual = function CarouselItemVirtual(_0) {
|
|
118
|
+
var left = _0.left, top = _0.top, children = _0.children, style = _0.style, rest = _object_without_properties(_0, [
|
|
110
119
|
"left",
|
|
111
120
|
"top",
|
|
112
121
|
"children",
|
|
@@ -73,7 +73,7 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
73
73
|
}
|
|
74
74
|
var THROTTLE_DEFAULT_MS = 100;
|
|
75
75
|
var DEBOUNCE_DEFAULT_MS = 150;
|
|
76
|
-
var useCarousel = function(param) {
|
|
76
|
+
var useCarousel = function useCarousel(param) {
|
|
77
77
|
var index = param.index, axis = param.axis, _param_detectActive = param.detectActive, detectActive = _param_detectActive === void 0 ? false : _param_detectActive, _param_detectThreshold = param.detectThreshold, detectThreshold = _param_detectThreshold === void 0 ? 0.5 : _param_detectThreshold, _param_scrollAlign = param.scrollAlign, scrollAlign = _param_scrollAlign === void 0 ? 'center' : _param_scrollAlign, scaleCallback = param.scaleCallback, scaleResetCallback = param.scaleResetCallback, onIndexChange = param.onIndexChange, onDetectActiveItem = param.onDetectActiveItem, _param_animatedScrollByIndex = param.animatedScrollByIndex, animatedScrollByIndex = _param_animatedScrollByIndex === void 0 ? false : _param_animatedScrollByIndex, _param_throttleMs = param.throttleMs, throttleMs = _param_throttleMs === void 0 ? THROTTLE_DEFAULT_MS : _param_throttleMs, _param_debounceMs = param.debounceMs, debounceMs = _param_debounceMs === void 0 ? DEBOUNCE_DEFAULT_MS : _param_debounceMs;
|
|
78
78
|
var prevIndex = (0, _react.useRef)(null);
|
|
79
79
|
var direction = (0, _react.useRef)(null);
|
|
@@ -119,6 +119,7 @@ var useCarousel = function(param) {
|
|
|
119
119
|
* Проходим по всему списку, суммируя ширины элементов,
|
|
120
120
|
* пока не найдем один элемент, чей центр будет в центре карусели.
|
|
121
121
|
*/ for(var itemIndex = 0; itemIndex < items.length; itemIndex++){
|
|
122
|
+
var _prevIndex_current;
|
|
122
123
|
var item = items.item(itemIndex);
|
|
123
124
|
if (item === null) {
|
|
124
125
|
continue;
|
|
@@ -147,7 +148,6 @@ var useCarousel = function(param) {
|
|
|
147
148
|
}
|
|
148
149
|
continue;
|
|
149
150
|
}
|
|
150
|
-
var _prevIndex_current;
|
|
151
151
|
var itemSlot = (0, _utils.getItemSlot)(itemIndex, itemEdge, itemSize, scrollPos, scrollSize, scrollAlign, (_prevIndex_current = prevIndex.current) !== null && _prevIndex_current !== void 0 ? _prevIndex_current : 0, offset.current);
|
|
152
152
|
if (itemSlot !== null) {
|
|
153
153
|
if (detectThreshold && Math.abs(itemSlot) <= detectThreshold) {
|
|
@@ -29,7 +29,7 @@ _export(exports, {
|
|
|
29
29
|
}
|
|
30
30
|
});
|
|
31
31
|
var _utils = require("../../utils");
|
|
32
|
-
var positionModByScrollAlign = function(param) {
|
|
32
|
+
var positionModByScrollAlign = function positionModByScrollAlign(param) {
|
|
33
33
|
var scrollAlign = param.scrollAlign, position = param.position, carouselSize = param.carouselSize, itemSize = param.itemSize, offset = param.offset, scrollStart = param.scrollStart, axis = param.axis;
|
|
34
34
|
if (scrollAlign === 'start') {
|
|
35
35
|
var inaccuracy = 1;
|
|
@@ -52,7 +52,7 @@ var positionModByScrollAlign = function(param) {
|
|
|
52
52
|
}
|
|
53
53
|
return position;
|
|
54
54
|
};
|
|
55
|
-
var getCalculatedPos = function(param) {
|
|
55
|
+
var getCalculatedPos = function getCalculatedPos(param) {
|
|
56
56
|
var scrollEl = param.scrollEl, items = param.items, axis = param.axis, index = param.index, offset = param.offset, scrollAlign = param.scrollAlign;
|
|
57
57
|
var position = scrollAlign === 'center' ? offset : 0;
|
|
58
58
|
var carouselSize;
|
|
@@ -63,26 +63,26 @@ var getCalculatedPos = function(param) {
|
|
|
63
63
|
}
|
|
64
64
|
for(var i = 0; i < index; i++){
|
|
65
65
|
if (axis === 'x') {
|
|
66
|
+
var _ref;
|
|
66
67
|
var _items_item;
|
|
67
|
-
|
|
68
|
-
position += (_items_item_offsetWidth = (_items_item = items.item(i)) === null || _items_item === void 0 ? void 0 : _items_item.offsetWidth) !== null && _items_item_offsetWidth !== void 0 ? _items_item_offsetWidth : 0;
|
|
68
|
+
position += (_ref = (_items_item = items.item(i)) === null || _items_item === void 0 ? void 0 : _items_item.offsetWidth) !== null && _ref !== void 0 ? _ref : 0;
|
|
69
69
|
} else {
|
|
70
|
+
var _ref1;
|
|
70
71
|
var _items_item1;
|
|
71
|
-
|
|
72
|
-
position += (_items_item_offsetHeight = (_items_item1 = items.item(i)) === null || _items_item1 === void 0 ? void 0 : _items_item1.offsetHeight) !== null && _items_item_offsetHeight !== void 0 ? _items_item_offsetHeight : 0;
|
|
72
|
+
position += (_ref1 = (_items_item1 = items.item(i)) === null || _items_item1 === void 0 ? void 0 : _items_item1.offsetHeight) !== null && _ref1 !== void 0 ? _ref1 : 0;
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
if (axis === 'x') {
|
|
76
|
+
var _ref2;
|
|
76
77
|
var _items_item2;
|
|
77
78
|
carouselSize = scrollEl.offsetWidth;
|
|
78
|
-
|
|
79
|
-
itemSize = (_items_item_offsetWidth1 = (_items_item2 = items.item(index)) === null || _items_item2 === void 0 ? void 0 : _items_item2.offsetWidth) !== null && _items_item_offsetWidth1 !== void 0 ? _items_item_offsetWidth1 : 0;
|
|
79
|
+
itemSize = (_ref2 = (_items_item2 = items.item(index)) === null || _items_item2 === void 0 ? void 0 : _items_item2.offsetWidth) !== null && _ref2 !== void 0 ? _ref2 : 0;
|
|
80
80
|
scrollStart = scrollEl.scrollLeft;
|
|
81
81
|
} else {
|
|
82
|
+
var _ref3;
|
|
82
83
|
var _items_item3;
|
|
83
84
|
carouselSize = scrollEl.offsetHeight;
|
|
84
|
-
|
|
85
|
-
itemSize = (_items_item_offsetHeight1 = (_items_item3 = items.item(index)) === null || _items_item3 === void 0 ? void 0 : _items_item3.offsetHeight) !== null && _items_item_offsetHeight1 !== void 0 ? _items_item_offsetHeight1 : 0;
|
|
85
|
+
itemSize = (_ref3 = (_items_item3 = items.item(index)) === null || _items_item3 === void 0 ? void 0 : _items_item3.offsetHeight) !== null && _ref3 !== void 0 ? _ref3 : 0;
|
|
86
86
|
scrollStart = scrollEl.scrollTop;
|
|
87
87
|
}
|
|
88
88
|
return positionModByScrollAlign({
|
|
@@ -95,11 +95,11 @@ var getCalculatedPos = function(param) {
|
|
|
95
95
|
axis: axis
|
|
96
96
|
});
|
|
97
97
|
};
|
|
98
|
-
var getCalculatedOffset = function(scrollEl, trackEl, axis) {
|
|
98
|
+
var getCalculatedOffset = function getCalculatedOffset(scrollEl, trackEl, axis) {
|
|
99
99
|
var paddingProp = axis === 'x' ? 'paddingLeft' : 'paddingTop';
|
|
100
100
|
return parseInt(getComputedStyle(scrollEl)[paddingProp], 10) + parseInt(getComputedStyle(trackEl)[paddingProp], 10);
|
|
101
101
|
};
|
|
102
|
-
var scrollToPos = function(param) {
|
|
102
|
+
var scrollToPos = function scrollToPos(param) {
|
|
103
103
|
var scrollEl = param.scrollEl, pos = param.pos, axis = param.axis, animated = param.animated, duration = param.duration, timingFunction = param.timingFunction;
|
|
104
104
|
if (axis === 'x' && Math.abs(pos - scrollEl.scrollLeft) > 1) {
|
|
105
105
|
if (animated) {
|
|
@@ -120,10 +120,10 @@ var scrollToPos = function(param) {
|
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
122
|
};
|
|
123
|
-
var round = function(n) {
|
|
123
|
+
var round = function round(n) {
|
|
124
124
|
return Math.round(n * 100) / 100;
|
|
125
125
|
};
|
|
126
|
-
var getItemSlot = function(itemIndex, itemEnd, itemSize, scrollStart, scrollSize, scrollAlign) {
|
|
126
|
+
var getItemSlot = function getItemSlot(itemIndex, itemEnd, itemSize, scrollStart, scrollSize, scrollAlign) {
|
|
127
127
|
var prevIndex = arguments.length > 6 && arguments[6] !== void 0 ? arguments[6] : 0, offset = arguments.length > 7 && arguments[7] !== void 0 ? arguments[7] : 0;
|
|
128
128
|
/**
|
|
129
129
|
* Граница и центр скролла (видимой части).
|