@snack-uikit/carousel 0.6.10 → 0.6.11-preview-ea1a9bc3.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.
|
@@ -69,7 +69,7 @@ function ItemProvider(_ref) {
|
|
|
69
69
|
const itemsTrackerRef = (0, react_1.useRef)(null);
|
|
70
70
|
const hideNonVisibleItems = () => {
|
|
71
71
|
var _a;
|
|
72
|
-
(_a = itemsTrackerRef.current) === null || _a === void 0 ? void 0 : _a.querySelectorAll(
|
|
72
|
+
(_a = itemsTrackerRef.current) === null || _a === void 0 ? void 0 : _a.querySelectorAll("[data-test-id=".concat(testIds_1.TEST_IDS.trackItem, "]")).forEach(slide => {
|
|
73
73
|
slide.setAttribute('aria-hidden', '0');
|
|
74
74
|
slide.querySelectorAll('a, button, select, input, textarea, [tabindex="0"]').forEach(focusableElement => {
|
|
75
75
|
focusableElement.setAttribute('tabindex', '-5');
|
|
@@ -79,7 +79,7 @@ function ItemProvider(_ref) {
|
|
|
79
79
|
};
|
|
80
80
|
const showVisibleItems = (slide, page, show) => {
|
|
81
81
|
var _a;
|
|
82
|
-
(_a = itemsTrackerRef.current) === null || _a === void 0 ? void 0 : _a.querySelectorAll(
|
|
82
|
+
(_a = itemsTrackerRef.current) === null || _a === void 0 ? void 0 : _a.querySelectorAll("[data-test-id=".concat(testIds_1.TEST_IDS.trackItem, "]")).forEach((item, i) => {
|
|
83
83
|
if (i >= page * slide && i < page * slide + Math.trunc(show)) {
|
|
84
84
|
item.removeAttribute('aria-hidden');
|
|
85
85
|
item.querySelectorAll('a, button, select, input, textarea, [tabindex="-5"]').forEach(focusableElement => {
|
|
@@ -113,7 +113,7 @@ function ItemProvider(_ref) {
|
|
|
113
113
|
return computedValues.itemWidth;
|
|
114
114
|
}
|
|
115
115
|
const fallbackWidth = Math.floor(100 / showItems);
|
|
116
|
-
return
|
|
116
|
+
return "".concat(fallbackWidth, "%");
|
|
117
117
|
}, [computedValues.itemWidth, showItems]);
|
|
118
118
|
const [drag, setDrag] = (0, react_1.useState)({
|
|
119
119
|
drag: 0,
|
|
@@ -163,8 +163,8 @@ function ItemProvider(_ref) {
|
|
|
163
163
|
className: styles_module_scss_1.default.itemTracker,
|
|
164
164
|
"data-test-id": testIds_1.TEST_IDS.trackLine,
|
|
165
165
|
style: {
|
|
166
|
-
transform:
|
|
167
|
-
transition:
|
|
166
|
+
transform: "translateX(".concat(transform + drag.drag, "px)"),
|
|
167
|
+
transition: "transform ".concat(transition, "s ease 0s")
|
|
168
168
|
},
|
|
169
169
|
ref: (0, merge_refs_1.default)(ref, itemsTrackerRef),
|
|
170
170
|
children: items.map((item, i) =>
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"version": "0.6.
|
|
7
|
+
"version": "0.6.11-preview-ea1a9bc3.0",
|
|
8
8
|
"sideEffects": [
|
|
9
9
|
"*.css",
|
|
10
10
|
"*.woff",
|
|
@@ -36,13 +36,13 @@
|
|
|
36
36
|
"license": "Apache-2.0",
|
|
37
37
|
"scripts": {},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@snack-uikit/icons": "0.27.
|
|
40
|
-
"@snack-uikit/pagination": "0.10.
|
|
39
|
+
"@snack-uikit/icons": "0.27.7-preview-ea1a9bc3.0",
|
|
40
|
+
"@snack-uikit/pagination": "0.10.24-preview-ea1a9bc3.0",
|
|
41
41
|
"@snack-uikit/utils": "4.0.1",
|
|
42
42
|
"classnames": "2.5.1",
|
|
43
43
|
"lodash.debounce": "4.0.8",
|
|
44
44
|
"merge-refs": "1.3.0",
|
|
45
45
|
"uncontrollable": "8.0.4"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "39719176042e1faa36c12e0bf6b63ee265fa70f1"
|
|
48
48
|
}
|