@semcore/carousel 3.49.2-prerelease.0 → 3.50.0-prerelease.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/CHANGELOG.md +6 -0
- package/lib/cjs/Carousel.js +165 -178
- package/lib/cjs/Carousel.js.map +1 -1
- package/lib/cjs/Carousel.types.js.map +1 -1
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/style/carousel.shadow.css +52 -54
- package/lib/cjs/translations/__intergalactic-dynamic-locales.js +4 -5
- package/lib/cjs/translations/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/cjs/translations/de.json +3 -1
- package/lib/cjs/translations/en.json +3 -1
- package/lib/cjs/translations/es.json +3 -1
- package/lib/cjs/translations/fr.json +3 -1
- package/lib/cjs/translations/it.json +3 -1
- package/lib/cjs/translations/ja.json +3 -1
- package/lib/cjs/translations/ko.json +3 -1
- package/lib/cjs/translations/nl.json +3 -1
- package/lib/cjs/translations/pl.json +3 -1
- package/lib/cjs/translations/pt.json +3 -1
- package/lib/cjs/translations/sv.json +3 -1
- package/lib/cjs/translations/tr.json +3 -1
- package/lib/cjs/translations/vi.json +3 -1
- package/lib/cjs/translations/zh.json +3 -1
- package/lib/es6/Carousel.js +152 -162
- package/lib/es6/Carousel.js.map +1 -1
- package/lib/es6/Carousel.types.js.map +1 -1
- package/lib/es6/index.js.map +1 -1
- package/lib/es6/style/carousel.shadow.css +52 -54
- package/lib/es6/translations/__intergalactic-dynamic-locales.js +2 -2
- package/lib/es6/translations/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/es6/translations/de.json +3 -1
- package/lib/es6/translations/en.json +3 -1
- package/lib/es6/translations/es.json +3 -1
- package/lib/es6/translations/fr.json +3 -1
- package/lib/es6/translations/it.json +3 -1
- package/lib/es6/translations/ja.json +3 -1
- package/lib/es6/translations/ko.json +3 -1
- package/lib/es6/translations/nl.json +3 -1
- package/lib/es6/translations/pl.json +3 -1
- package/lib/es6/translations/pt.json +3 -1
- package/lib/es6/translations/sv.json +3 -1
- package/lib/es6/translations/tr.json +3 -1
- package/lib/es6/translations/vi.json +3 -1
- package/lib/es6/translations/zh.json +3 -1
- package/lib/esm/Carousel.mjs +148 -160
- package/lib/esm/Carousel.types.mjs +1 -0
- package/lib/esm/index.mjs +1 -0
- package/lib/esm/style/carousel.shadow.css +52 -54
- package/lib/esm/translations/__intergalactic-dynamic-locales.mjs +2 -2
- package/lib/esm/translations/de.json.mjs +3 -1
- package/lib/esm/translations/en.json.mjs +3 -1
- package/lib/esm/translations/es.json.mjs +3 -1
- package/lib/esm/translations/fr.json.mjs +3 -1
- package/lib/esm/translations/it.json.mjs +3 -1
- package/lib/esm/translations/ja.json.mjs +3 -1
- package/lib/esm/translations/ko.json.mjs +3 -1
- package/lib/esm/translations/nl.json.mjs +3 -1
- package/lib/esm/translations/pl.json.mjs +3 -1
- package/lib/esm/translations/pt.json.mjs +3 -1
- package/lib/esm/translations/sv.json.mjs +3 -1
- package/lib/esm/translations/tr.json.mjs +3 -1
- package/lib/esm/translations/vi.json.mjs +3 -1
- package/lib/esm/translations/zh.json.mjs +3 -1
- package/lib/types/Carousel.d.ts +1 -1
- package/lib/types/Carousel.types.d.ts +4 -12
- package/lib/types/translations/__intergalactic-dynamic-locales.d.ts +28 -0
- package/package.json +8 -8
package/lib/es6/Carousel.js
CHANGED
|
@@ -3,12 +3,11 @@ import _objectSpread from "@babel/runtime/helpers/objectSpread2";
|
|
|
3
3
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
4
4
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
5
5
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
6
|
-
import
|
|
6
|
+
import _callSuper from "@babel/runtime/helpers/callSuper";
|
|
7
7
|
import _inherits from "@babel/runtime/helpers/inherits";
|
|
8
|
-
import _createSuper from "@babel/runtime/helpers/createSuper";
|
|
9
8
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
10
|
-
import { sstyled as _sstyled } from "@semcore/
|
|
11
|
-
import { assignProps as
|
|
9
|
+
import { sstyled as _sstyled } from "@semcore/core";
|
|
10
|
+
import { assignProps as _assignProps0 } from "@semcore/core";
|
|
12
11
|
import { assignProps as _assignProps9 } from "@semcore/core";
|
|
13
12
|
import { assignProps as _assignProps8 } from "@semcore/core";
|
|
14
13
|
import { assignProps as _assignProps7 } from "@semcore/core";
|
|
@@ -18,45 +17,43 @@ import { assignProps as _assignProps4 } from "@semcore/core";
|
|
|
18
17
|
import { assignProps as _assignProps3 } from "@semcore/core";
|
|
19
18
|
import { assignProps as _assignProps2 } from "@semcore/core";
|
|
20
19
|
import { assignProps as _assignProps } from "@semcore/core";
|
|
21
|
-
import
|
|
22
|
-
import createComponent, { Component, sstyled, Root } from '@semcore/core';
|
|
20
|
+
import { createBreakpoints, Box, Flex } from '@semcore/base-components';
|
|
23
21
|
import Button from '@semcore/button';
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import
|
|
22
|
+
import { createComponent, Component, sstyled, Root } from '@semcore/core';
|
|
23
|
+
import i18nEnhance from '@semcore/core/lib/utils/enhances/i18nEnhance';
|
|
24
|
+
import { findAllComponents } from '@semcore/core/lib/utils/findComponent';
|
|
25
|
+
import logger from '@semcore/core/lib/utils/logger';
|
|
26
|
+
import uniqueIDEnhancement from '@semcore/core/lib/utils/uniqueID';
|
|
27
27
|
import ChevronLeft from '@semcore/icon/ChevronLeft/l';
|
|
28
|
-
import
|
|
29
|
-
import
|
|
30
|
-
import
|
|
31
|
-
import logger from '@semcore/utils/lib/logger';
|
|
28
|
+
import ChevronRight from '@semcore/icon/ChevronRight/l';
|
|
29
|
+
import Modal from '@semcore/modal';
|
|
30
|
+
import React from 'react';
|
|
32
31
|
/*!__reshadow-styles__:"./style/carousel.shadow.css"*/
|
|
33
|
-
var style = (
|
|
32
|
+
var style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___SCarousel_mxe6r_gg_{overflow:hidden;outline:0;-webkit-user-select:none;-moz-user-select:none;user-select:none}.___SContainer_mxe6r_gg_{display:flex;transition:transform var(--duration_mxe6r) ease-in-out}.___SContentBox_mxe6r_gg_,.___SIndicator_mxe6r_gg_,.___SModalBox_mxe6r_gg_{position:relative;overflow:hidden;border-radius:var(--intergalactic-surface-rounded, calc(6px + 2px))}.___SContentBox_mxe6r_gg_:has(.___SItem_mxe6r_gg_:focus-visible)::after{border-radius:inherit;z-index:2;position:absolute;top:0;right:0;bottom:0;left:0;content:\"\";outline-color:var(--intergalactic-keyboard-focus-outline, #008ff8);outline-style:solid;outline-width:2px;outline-offset:-2px;transition-duration:calc(var(--intergalactic-duration-extra-fast, 100)*1ms);transition-timing-function:ease-in-out;transition-property:outline-color,outline-width,outline-offset}.___SImageBoxContainer_mxe6r_gg_{position:relative;border-radius:var(--intergalactic-surface-rounded, calc(6px + 2px))}.___SImageBoxContainer_mxe6r_gg_:has(.___SItem_mxe6r_gg_:focus-visible)::after{border-radius:inherit;z-index:2;position:absolute;top:0;right:0;bottom:0;left:0;content:\"\";outline-color:var(--intergalactic-keyboard-focus-outline, #008ff8);outline-style:solid;outline-width:2px;outline-offset:2px;transition-duration:calc(var(--intergalactic-duration-extra-fast, 100)*1ms);transition-timing-function:ease-in-out;transition-property:outline-color,outline-width,outline-offset}@supports (color:oklab(0%0 0%)){.___SImageBoxContainer_mxe6r_gg_:has(.___SItem_mxe6r_gg_:focus-visible)::after{outline-color:var(--intergalactic-keyboard-focus-invert-outline, oklch(1 0 0 / 0.7))}}.___SImageBoxContainer_mxe6r_gg_ .___SItem_mxe6r_gg_:focus-visible{outline:0}.___SModalContainer_mxe6r_gg_{display:flex;transition:transform var(--duration_mxe6r) ease-in-out}.___SItem_mxe6r_gg_{flex:0 0 100%;max-width:100%;box-sizing:border-box;transform:var(--transform_mxe6r);border-radius:var(--intergalactic-surface-rounded, calc(6px + 2px));overflow:hidden;outline:0}.___SItem_mxe6r_gg_>img{display:block}.___SItem_mxe6r_gg_.__zoomIn_mxe6r_gg_{cursor:zoom-in}.___SItem_mxe6r_gg_.__zoomOut_mxe6r_gg_{cursor:zoom-out}.___SIndicators_mxe6r_gg_{display:flex;justify-content:center;margin:var(--intergalactic-spacing-4x, 16px) 4px 4px 4px;outline:0;position:relative}.___SIndicator_mxe6r_gg_{margin:0 calc(.5*var(--intergalactic-spacing-3x, 12px));cursor:pointer;display:block;width:12px;height:12px;background-color:var(--intergalactic-icon-secondary-neutral, rgba(0, 5, 2, 0.385));opacity:var(--intergalactic-disabled-opacity, 0.4);-o-object-fit:cover;object-fit:cover;transition:ease-in-out opacity .1s}@supports (color:color(display-p3 0 0 0%)){.___SIndicator_mxe6r_gg_{background-color:var(--intergalactic-icon-secondary-neutral, rgba(0, 5, 2, 0.385))}@media (color-gamut:p3){.___SIndicator_mxe6r_gg_{background-color:var(--intergalactic-icon-secondary-neutral, color(display-p3 0.0036 0.02041 0.00996 / 0.385))}}}.___SIndicator_mxe6r_gg_[aria-roledescription=slide]{width:100px;height:100px}@media (hover:hover){.___SIndicator_mxe6r_gg_:hover{opacity:calc(2*var(--intergalactic-disabled-opacity, 0.4))}}.___SIndicator_mxe6r_gg_.__active_mxe6r_gg_{opacity:1}.___SIndicator_mxe6r_gg_.__inverted_mxe6r_gg_{background-color:var(--intergalactic-icon-primary-invert, rgba(253, 255, 254, 0.808))}@supports (color:color(display-p3 0 0 0%)){.___SIndicator_mxe6r_gg_.__inverted_mxe6r_gg_{background-color:var(--intergalactic-icon-primary-invert, rgba(253, 255, 254, 0.808))}@media (color-gamut:p3){.___SIndicator_mxe6r_gg_.__inverted_mxe6r_gg_{background-color:var(--intergalactic-icon-primary-invert, color(display-p3 0.99189 0.99995 0.99683 / 0.808))}}}.___SNext_mxe6r_gg_,.___SPrev_mxe6r_gg_{display:inline-flex;align-items:center;justify-content:center;cursor:pointer;color:var(--intergalactic-icon-primary-neutral, rgba(0, 4, 1, 0.526))}.___SNext_mxe6r_gg_ .___SNextButton_mxe6r_gg_ span:has(>svg:only-child),.___SNext_mxe6r_gg_ .___SPrevButton_mxe6r_gg_ span:has(>svg:only-child),.___SPrev_mxe6r_gg_ .___SNextButton_mxe6r_gg_ span:has(>svg:only-child),.___SPrev_mxe6r_gg_ .___SPrevButton_mxe6r_gg_ span:has(>svg:only-child){margin-left:calc(2*var(--intergalactic-spacing-1x, 4px) - 1px);margin-right:calc(2*var(--intergalactic-spacing-1x, 4px) - 1px)}.___SPrev_mxe6r_gg_{margin-right:var(--intergalactic-spacing-2x, 8px)}.___SNext_mxe6r_gg_{margin-left:var(--intergalactic-spacing-2x, 8px)}.___SNext_mxe6r_gg_.__disabled_mxe6r_gg_,.___SPrev_mxe6r_gg_.__disabled_mxe6r_gg_{opacity:var(--intergalactic-disabled-opacity, 0.4);cursor:default;pointer-events:none}@media (prefers-reduced-motion){.___SContainer_mxe6r_gg_{transition:none}}", /*__inner_css_end__*/"mxe6r_gg_"),
|
|
34
33
|
/*__reshadow_css_end__*/
|
|
35
34
|
{
|
|
36
|
-
"__SCarousel": "
|
|
37
|
-
"__SContainer": "
|
|
38
|
-
"--duration": "--
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"_active": "
|
|
48
|
-
"_inverted": "
|
|
49
|
-
"__SPrev": "
|
|
50
|
-
"__SNext": "
|
|
51
|
-
"_disabled": "
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"__SPrevButton": "
|
|
55
|
-
"__SNextButton": "
|
|
35
|
+
"__SCarousel": "___SCarousel_mxe6r_gg_",
|
|
36
|
+
"__SContainer": "___SContainer_mxe6r_gg_",
|
|
37
|
+
"--duration": "--duration_mxe6r",
|
|
38
|
+
"__SContentBox": "___SContentBox_mxe6r_gg_",
|
|
39
|
+
"__SModalBox": "___SModalBox_mxe6r_gg_",
|
|
40
|
+
"__SIndicator": "___SIndicator_mxe6r_gg_",
|
|
41
|
+
"__SItem": "___SItem_mxe6r_gg_",
|
|
42
|
+
"__SModalContainer": "___SModalContainer_mxe6r_gg_",
|
|
43
|
+
"_zoomIn": "__zoomIn_mxe6r_gg_",
|
|
44
|
+
"_zoomOut": "__zoomOut_mxe6r_gg_",
|
|
45
|
+
"__SIndicators": "___SIndicators_mxe6r_gg_",
|
|
46
|
+
"_active": "__active_mxe6r_gg_",
|
|
47
|
+
"_inverted": "__inverted_mxe6r_gg_",
|
|
48
|
+
"__SPrev": "___SPrev_mxe6r_gg_",
|
|
49
|
+
"__SNext": "___SNext_mxe6r_gg_",
|
|
50
|
+
"_disabled": "__disabled_mxe6r_gg_",
|
|
51
|
+
"__SImageBoxContainer": "___SImageBoxContainer_mxe6r_gg_",
|
|
52
|
+
"--transform": "--transform_mxe6r",
|
|
53
|
+
"__SPrevButton": "___SPrevButton_mxe6r_gg_",
|
|
54
|
+
"__SNextButton": "___SNextButton_mxe6r_gg_"
|
|
56
55
|
});
|
|
57
|
-
import {
|
|
58
|
-
import { createBreakpoints } from '@semcore/breakpoints';
|
|
59
|
-
import keyboardFocusEnhance from '@semcore/utils/lib/enhances/keyboardFocusEnhance';
|
|
56
|
+
import { localizedMessages } from './translations/__intergalactic-dynamic-locales';
|
|
60
57
|
var MAP_TRANSFORM = {
|
|
61
58
|
ArrowLeft: 'left',
|
|
62
59
|
ArrowRight: 'right'
|
|
@@ -68,19 +65,17 @@ var isSmallScreen = function isSmallScreen(index) {
|
|
|
68
65
|
return index === 1;
|
|
69
66
|
};
|
|
70
67
|
var CarouselRoot = /*#__PURE__*/function (_Component) {
|
|
71
|
-
_inherits(CarouselRoot, _Component);
|
|
72
|
-
var _super = _createSuper(CarouselRoot);
|
|
73
68
|
function CarouselRoot(props) {
|
|
74
|
-
var
|
|
69
|
+
var _ref18, _props$index;
|
|
75
70
|
var _this;
|
|
76
71
|
_classCallCheck(this, CarouselRoot);
|
|
77
|
-
_this =
|
|
78
|
-
_defineProperty(
|
|
79
|
-
_defineProperty(
|
|
80
|
-
_defineProperty(
|
|
81
|
-
_defineProperty(
|
|
82
|
-
_defineProperty(
|
|
83
|
-
_defineProperty(
|
|
72
|
+
_this = _callSuper(this, CarouselRoot, [props]);
|
|
73
|
+
_defineProperty(_this, "defaultItemsCount", 0);
|
|
74
|
+
_defineProperty(_this, "refCarousel", /*#__PURE__*/React.createRef());
|
|
75
|
+
_defineProperty(_this, "refContainer", /*#__PURE__*/React.createRef());
|
|
76
|
+
_defineProperty(_this, "refModalContainer", /*#__PURE__*/React.createRef());
|
|
77
|
+
_defineProperty(_this, "_touchStartCoord", -1);
|
|
78
|
+
_defineProperty(_this, "handlerKeyDown", function (e) {
|
|
84
79
|
var firstSlide = 1;
|
|
85
80
|
var lastSlide = _this.state.items.length + 1;
|
|
86
81
|
switch (e.key) {
|
|
@@ -118,7 +113,7 @@ var CarouselRoot = /*#__PURE__*/function (_Component) {
|
|
|
118
113
|
_this.handleToggleZoomModal();
|
|
119
114
|
}
|
|
120
115
|
});
|
|
121
|
-
_defineProperty(
|
|
116
|
+
_defineProperty(_this, "toggleItem", function (item) {
|
|
122
117
|
var removeItem = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
123
118
|
_this.setState(function (prevState) {
|
|
124
119
|
var newItems = removeItem ? prevState.items.filter(function (element) {
|
|
@@ -132,7 +127,7 @@ var CarouselRoot = /*#__PURE__*/function (_Component) {
|
|
|
132
127
|
_this.defaultItemsCount++;
|
|
133
128
|
}
|
|
134
129
|
});
|
|
135
|
-
_defineProperty(
|
|
130
|
+
_defineProperty(_this, "transformContainer", function () {
|
|
136
131
|
var transform = _this.state.selectedIndex * -1 * 100;
|
|
137
132
|
if (_this.refContainer.current) {
|
|
138
133
|
_this.refContainer.current.style.transform = "translateX(".concat(transform, "%)");
|
|
@@ -141,7 +136,7 @@ var CarouselRoot = /*#__PURE__*/function (_Component) {
|
|
|
141
136
|
_this.refModalContainer.current.style.transform = "translateX(".concat(transform, "%)");
|
|
142
137
|
}
|
|
143
138
|
});
|
|
144
|
-
_defineProperty(
|
|
139
|
+
_defineProperty(_this, "getDirection", function (currentIndex, nextIndex) {
|
|
145
140
|
var bounded = _this.asProps.bounded;
|
|
146
141
|
if (bounded) {
|
|
147
142
|
return currentIndex < nextIndex ? 'right' : 'left';
|
|
@@ -168,7 +163,7 @@ var CarouselRoot = /*#__PURE__*/function (_Component) {
|
|
|
168
163
|
var left = tmpArr.indexOf(nextIndex);
|
|
169
164
|
return left - tmpCurrentIndex < 0 ? 'left' : 'right';
|
|
170
165
|
});
|
|
171
|
-
_defineProperty(
|
|
166
|
+
_defineProperty(_this, "slideToValue", function (nextIndex) {
|
|
172
167
|
var selectedIndex = _this.state.selectedIndex;
|
|
173
168
|
var direction = selectedIndex < nextIndex ? 'right' : 'left';
|
|
174
169
|
var diff = Math.abs(selectedIndex - nextIndex);
|
|
@@ -177,7 +172,7 @@ var CarouselRoot = /*#__PURE__*/function (_Component) {
|
|
|
177
172
|
diff--;
|
|
178
173
|
}
|
|
179
174
|
});
|
|
180
|
-
_defineProperty(
|
|
175
|
+
_defineProperty(_this, "transformItem", function (direction) {
|
|
181
176
|
var bounded = _this.asProps.bounded;
|
|
182
177
|
var _this$state = _this.state,
|
|
183
178
|
items = _this$state.items,
|
|
@@ -222,12 +217,12 @@ var CarouselRoot = /*#__PURE__*/function (_Component) {
|
|
|
222
217
|
return;
|
|
223
218
|
}
|
|
224
219
|
});
|
|
225
|
-
_defineProperty(
|
|
220
|
+
_defineProperty(_this, "bindHandlerClick", function (direction) {
|
|
226
221
|
return function () {
|
|
227
222
|
_this.transformItem(direction);
|
|
228
223
|
};
|
|
229
224
|
});
|
|
230
|
-
_defineProperty(
|
|
225
|
+
_defineProperty(_this, "bindHandlerClickIndicator", function (value) {
|
|
231
226
|
return function () {
|
|
232
227
|
var _this$state2 = _this.state,
|
|
233
228
|
selectedIndex = _this$state2.selectedIndex,
|
|
@@ -239,10 +234,10 @@ var CarouselRoot = /*#__PURE__*/function (_Component) {
|
|
|
239
234
|
_this.handlers.index(value);
|
|
240
235
|
};
|
|
241
236
|
});
|
|
242
|
-
_defineProperty(
|
|
237
|
+
_defineProperty(_this, "handlerTouchStart", function (e) {
|
|
243
238
|
_this._touchStartCoord = e.changedTouches[0].clientX;
|
|
244
239
|
});
|
|
245
|
-
_defineProperty(
|
|
240
|
+
_defineProperty(_this, "handlerTouchEnd", function (e) {
|
|
246
241
|
var touchEndCoord = e.changedTouches[0].clientX;
|
|
247
242
|
var delta = touchEndCoord - _this._touchStartCoord;
|
|
248
243
|
if (delta > 50) {
|
|
@@ -251,16 +246,18 @@ var CarouselRoot = /*#__PURE__*/function (_Component) {
|
|
|
251
246
|
_this.transformItem('right');
|
|
252
247
|
}
|
|
253
248
|
});
|
|
254
|
-
_defineProperty(
|
|
249
|
+
_defineProperty(_this, "handleToggleZoomModal", function () {
|
|
255
250
|
_this.setState(function (prevState) {
|
|
256
251
|
return {
|
|
257
252
|
isOpenZoom: !prevState.isOpenZoom
|
|
258
253
|
};
|
|
259
254
|
}, function () {
|
|
260
|
-
_this.state.isOpenZoom
|
|
255
|
+
if (_this.state.isOpenZoom) {
|
|
256
|
+
_this.transformContainer();
|
|
257
|
+
}
|
|
261
258
|
});
|
|
262
259
|
});
|
|
263
|
-
_defineProperty(
|
|
260
|
+
_defineProperty(_this, "bindHandlerKeydownControl", function (direction) {
|
|
264
261
|
return function (e) {
|
|
265
262
|
if (e.key === 'Enter' || e.key === ' ') {
|
|
266
263
|
e.preventDefault();
|
|
@@ -272,21 +269,22 @@ var CarouselRoot = /*#__PURE__*/function (_Component) {
|
|
|
272
269
|
_this.state = {
|
|
273
270
|
items: [],
|
|
274
271
|
isOpenZoom: false,
|
|
275
|
-
selectedIndex: (
|
|
272
|
+
selectedIndex: (_ref18 = (_props$index = props.index) !== null && _props$index !== void 0 ? _props$index : props.defaultIndex) !== null && _ref18 !== void 0 ? _ref18 : 0
|
|
276
273
|
};
|
|
277
274
|
return _this;
|
|
278
275
|
}
|
|
279
|
-
|
|
276
|
+
_inherits(CarouselRoot, _Component);
|
|
277
|
+
return _createClass(CarouselRoot, [{
|
|
280
278
|
key: "uncontrolledProps",
|
|
281
279
|
value: function uncontrolledProps() {
|
|
282
280
|
var _this2 = this;
|
|
283
281
|
return {
|
|
284
282
|
index: [null, function (_index) {
|
|
285
283
|
var _this2$refCarousel$cu;
|
|
286
|
-
(_this2$refCarousel$cu = _this2.refCarousel.current) === null || _this2$refCarousel$cu === void 0
|
|
284
|
+
(_this2$refCarousel$cu = _this2.refCarousel.current) === null || _this2$refCarousel$cu === void 0 || _this2$refCarousel$cu.blur();
|
|
287
285
|
setTimeout(function () {
|
|
288
286
|
var _this2$refCarousel$cu2;
|
|
289
|
-
(_this2$refCarousel$cu2 = _this2.refCarousel.current) === null || _this2$refCarousel$cu2 === void 0
|
|
287
|
+
(_this2$refCarousel$cu2 = _this2.refCarousel.current) === null || _this2$refCarousel$cu2 === void 0 || _this2$refCarousel$cu2.focus();
|
|
290
288
|
}, 0);
|
|
291
289
|
}]
|
|
292
290
|
};
|
|
@@ -332,7 +330,7 @@ var CarouselRoot = /*#__PURE__*/function (_Component) {
|
|
|
332
330
|
}
|
|
333
331
|
}, {
|
|
334
332
|
key: "getItemProps",
|
|
335
|
-
value: function getItemProps(
|
|
333
|
+
value: function getItemProps(_props, index) {
|
|
336
334
|
var zoom = this.asProps.zoom;
|
|
337
335
|
var isCurrent = this.isSelected(index);
|
|
338
336
|
return {
|
|
@@ -361,10 +359,10 @@ var CarouselRoot = /*#__PURE__*/function (_Component) {
|
|
|
361
359
|
disabled = selectedIndex === 0;
|
|
362
360
|
}
|
|
363
361
|
return {
|
|
364
|
-
onClick: this.bindHandlerClick('left'),
|
|
365
|
-
onKeyDown: this.bindHandlerKeydownControl('left'),
|
|
362
|
+
'onClick': this.bindHandlerClick('left'),
|
|
363
|
+
'onKeyDown': this.bindHandlerKeydownControl('left'),
|
|
366
364
|
disabled: disabled,
|
|
367
|
-
label: getI18nText('prev'),
|
|
365
|
+
'label': getI18nText('prev'),
|
|
368
366
|
'aria-controls': "igc-".concat(uid, "-carousel")
|
|
369
367
|
};
|
|
370
368
|
}
|
|
@@ -383,10 +381,10 @@ var CarouselRoot = /*#__PURE__*/function (_Component) {
|
|
|
383
381
|
disabled = selectedIndex === items.length - 1;
|
|
384
382
|
}
|
|
385
383
|
return {
|
|
386
|
-
onClick: this.bindHandlerClick('right'),
|
|
387
|
-
onKeyDown: this.bindHandlerKeydownControl('right'),
|
|
384
|
+
'onClick': this.bindHandlerClick('right'),
|
|
385
|
+
'onKeyDown': this.bindHandlerKeydownControl('right'),
|
|
388
386
|
disabled: disabled,
|
|
389
|
-
label: getI18nText('next'),
|
|
387
|
+
'label': getI18nText('next'),
|
|
390
388
|
'aria-controls': "igc-".concat(uid, "-carousel")
|
|
391
389
|
};
|
|
392
390
|
}
|
|
@@ -397,14 +395,15 @@ var CarouselRoot = /*#__PURE__*/function (_Component) {
|
|
|
397
395
|
var items = this.state.items;
|
|
398
396
|
var getI18nText = this.asProps.getI18nText;
|
|
399
397
|
return {
|
|
400
|
-
items: items.map(function (
|
|
398
|
+
'items': items.map(function (_item, key) {
|
|
401
399
|
return {
|
|
402
400
|
active: _this4.isSelected(key),
|
|
403
401
|
onClick: _this4.bindHandlerClickIndicator(key),
|
|
404
402
|
key: key
|
|
405
403
|
};
|
|
406
404
|
}),
|
|
407
|
-
role: 'tablist',
|
|
405
|
+
'role': 'tablist',
|
|
406
|
+
'tabIndex': 0,
|
|
408
407
|
'aria-label': getI18nText('slides')
|
|
409
408
|
};
|
|
410
409
|
}
|
|
@@ -414,7 +413,7 @@ var CarouselRoot = /*#__PURE__*/function (_Component) {
|
|
|
414
413
|
var isCurrent = this.isSelected(index);
|
|
415
414
|
var getI18nText = this.asProps.getI18nText;
|
|
416
415
|
return {
|
|
417
|
-
role: 'tab',
|
|
416
|
+
'role': 'tab',
|
|
418
417
|
'aria-selected': isCurrent,
|
|
419
418
|
'aria-controls': "igc-".concat(this.asProps.uid, "-carousel-item-").concat(index),
|
|
420
419
|
'aria-label': getI18nText('slide', {
|
|
@@ -460,26 +459,27 @@ var CarouselRoot = /*#__PURE__*/function (_Component) {
|
|
|
460
459
|
key: "renderModal",
|
|
461
460
|
value: function renderModal(isSmall, ComponentItems) {
|
|
462
461
|
var _ref = this.asProps,
|
|
463
|
-
|
|
462
|
+
_ref0,
|
|
464
463
|
_this5 = this;
|
|
465
464
|
var SModalContainer = Box;
|
|
466
465
|
var SModalBox = Box;
|
|
466
|
+
var SImageBoxContainer = Box;
|
|
467
467
|
var _this$asProps3 = this.asProps,
|
|
468
468
|
styles = _this$asProps3.styles,
|
|
469
469
|
uid = _this$asProps3.uid,
|
|
470
470
|
duration = _this$asProps3.duration,
|
|
471
471
|
zoomWidth = _this$asProps3.zoomWidth;
|
|
472
472
|
var isOpenZoom = this.state.isOpenZoom;
|
|
473
|
-
return
|
|
473
|
+
return _ref0 = sstyled(styles), /*#__PURE__*/React.createElement(Modal, _ref0.cn("Modal", {
|
|
474
474
|
"visible": isOpenZoom,
|
|
475
475
|
"onClose": this.handleToggleZoomModal,
|
|
476
476
|
"ghost": true,
|
|
477
477
|
"closable": !isSmall
|
|
478
|
-
}), /*#__PURE__*/React.createElement(Flex,
|
|
478
|
+
}), /*#__PURE__*/React.createElement(Flex, _ref0.cn("Flex", {
|
|
479
479
|
"direction": isSmall ? 'column' : 'row'
|
|
480
480
|
}), !isSmall && /*#__PURE__*/React.createElement(Carousel.Prev, {
|
|
481
481
|
inverted: true
|
|
482
|
-
}), /*#__PURE__*/React.createElement(SModalBox,
|
|
482
|
+
}), /*#__PURE__*/React.createElement(SImageBoxContainer, _ref0.cn("SImageBoxContainer", {}), /*#__PURE__*/React.createElement(SModalBox, _ref0.cn("SModalBox", {}), /*#__PURE__*/React.createElement(SModalContainer, _ref0.cn("SModalContainer", _objectSpread({}, _assignProps({
|
|
483
483
|
"aria-live": 'polite',
|
|
484
484
|
"use:duration": "".concat(duration, "ms"),
|
|
485
485
|
"ref": this.refModalContainer,
|
|
@@ -496,7 +496,7 @@ var CarouselRoot = /*#__PURE__*/function (_Component) {
|
|
|
496
496
|
zoomOut: true,
|
|
497
497
|
transform: _this5.isSelected(i) ? _this5.getTransform() : undefined
|
|
498
498
|
}));
|
|
499
|
-
}))), isSmall ? /*#__PURE__*/React.createElement(Flex,
|
|
499
|
+
})))), isSmall ? /*#__PURE__*/React.createElement(Flex, _ref0.cn("Flex", {
|
|
500
500
|
"justifyContent": 'center',
|
|
501
501
|
"mt": 2
|
|
502
502
|
}), /*#__PURE__*/React.createElement(Carousel.Prev, {
|
|
@@ -513,7 +513,7 @@ var CarouselRoot = /*#__PURE__*/function (_Component) {
|
|
|
513
513
|
key: "render",
|
|
514
514
|
value: function render() {
|
|
515
515
|
var _ref2 = this.asProps,
|
|
516
|
-
|
|
516
|
+
_ref1,
|
|
517
517
|
_this6 = this;
|
|
518
518
|
var SCarousel = Box;
|
|
519
519
|
var _this$asProps4 = this.asProps,
|
|
@@ -522,38 +522,35 @@ var CarouselRoot = /*#__PURE__*/function (_Component) {
|
|
|
522
522
|
uid = _this$asProps4.uid,
|
|
523
523
|
hasZoom = _this$asProps4.zoom,
|
|
524
524
|
ariaLabel = _this$asProps4['aria-label'],
|
|
525
|
-
|
|
526
|
-
|
|
525
|
+
indicators = _this$asProps4.indicators,
|
|
526
|
+
getI18nText = _this$asProps4.getI18nText;
|
|
527
527
|
var ComponentItems = findAllComponents(Children, ['Carousel.Item']);
|
|
528
528
|
var Controls = findAllComponents(Children, ['Carousel.Prev', 'Carousel.Next', 'Carousel.Indicators']);
|
|
529
|
-
return
|
|
529
|
+
return _ref1 = sstyled(styles), /*#__PURE__*/React.createElement(SCarousel, _ref1.cn("SCarousel", _objectSpread({}, _assignProps2({
|
|
530
530
|
"role": 'region',
|
|
531
|
-
"roledescription": '
|
|
531
|
+
"aria-roledescription": getI18nText('Carousel:aria-roledescription'),
|
|
532
532
|
"onKeyDown": this.handlerKeyDown,
|
|
533
533
|
"onTouchStart": this.handlerTouchStart,
|
|
534
534
|
"onTouchEnd": this.handlerTouchEnd,
|
|
535
535
|
"ref": this.refCarousel,
|
|
536
|
-
"id": "igc-".concat(uid, "-carousel")
|
|
537
|
-
|
|
538
|
-
}, _ref2))), Controls.length === 0 ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Flex, _ref11.cn("Flex", {}), /*#__PURE__*/React.createElement(Carousel.Prev, null), /*#__PURE__*/React.createElement(Carousel.ContentBox, null, /*#__PURE__*/React.createElement(Carousel.Container, {
|
|
536
|
+
"id": "igc-".concat(uid, "-carousel")
|
|
537
|
+
}, _ref2))), Controls.length === 0 ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Flex, _ref1.cn("Flex", {}), /*#__PURE__*/React.createElement(Carousel.Prev, null), /*#__PURE__*/React.createElement(Carousel.ContentBox, null, /*#__PURE__*/React.createElement(Carousel.Container, {
|
|
539
538
|
"aria-label": ariaLabel
|
|
540
|
-
}, /*#__PURE__*/React.createElement(Children,
|
|
539
|
+
}, /*#__PURE__*/React.createElement(Children, _ref1.cn("Children", {})))), /*#__PURE__*/React.createElement(Carousel.Next, null)), indicators === 'default' && /*#__PURE__*/React.createElement(Carousel.Indicators, null), indicators === 'preview' && /*#__PURE__*/React.createElement(Carousel.Indicators, null, function () {
|
|
541
540
|
return ComponentItems.map(function (item, index) {
|
|
542
541
|
return /*#__PURE__*/React.createElement(Carousel.Indicator, _extends({}, item.props, {
|
|
543
542
|
key: item.key,
|
|
544
|
-
w:
|
|
545
|
-
|
|
546
|
-
"aria-roledescription": "slide",
|
|
543
|
+
w: undefined,
|
|
544
|
+
"aria-roledescription": getI18nText('Carousel.Indicator:aria-roledescription'),
|
|
547
545
|
active: _this6.isSelected(index),
|
|
548
546
|
onClick: _this6.bindHandlerClickIndicator(index)
|
|
549
547
|
}));
|
|
550
548
|
});
|
|
551
|
-
})) : /*#__PURE__*/React.createElement(Children,
|
|
549
|
+
})) : /*#__PURE__*/React.createElement(Children, _ref1.cn("Children", {})), hasZoom && /*#__PURE__*/React.createElement(BreakPoints, _ref1.cn("BreakPoints", {}), /*#__PURE__*/React.createElement(BreakPoints.Context.Consumer, null, function (mediaIndex) {
|
|
552
550
|
return _this6.renderModal(isSmallScreen(mediaIndex), ComponentItems);
|
|
553
551
|
})));
|
|
554
552
|
}
|
|
555
553
|
}]);
|
|
556
|
-
return CarouselRoot;
|
|
557
554
|
}(Component);
|
|
558
555
|
_defineProperty(CarouselRoot, "displayName", 'Carousel');
|
|
559
556
|
_defineProperty(CarouselRoot, "defaultProps", {
|
|
@@ -567,48 +564,48 @@ _defineProperty(CarouselRoot, "defaultProps", {
|
|
|
567
564
|
});
|
|
568
565
|
_defineProperty(CarouselRoot, "style", style);
|
|
569
566
|
_defineProperty(CarouselRoot, "enhance", enhance);
|
|
570
|
-
|
|
567
|
+
function Container(props) {
|
|
571
568
|
var _ref3 = arguments[0],
|
|
572
|
-
|
|
569
|
+
_ref10;
|
|
573
570
|
var SContainer = Box;
|
|
574
571
|
var styles = props.styles,
|
|
575
572
|
duration = props.duration;
|
|
576
|
-
return
|
|
573
|
+
return _ref10 = sstyled(styles), /*#__PURE__*/React.createElement(SContainer, _ref10.cn("SContainer", _objectSpread({}, _assignProps3({
|
|
577
574
|
"use:duration": "".concat(duration, "ms"),
|
|
578
575
|
"aria-live": 'polite'
|
|
579
576
|
}, _ref3))));
|
|
580
|
-
}
|
|
581
|
-
|
|
577
|
+
}
|
|
578
|
+
function ContentBox(props) {
|
|
582
579
|
var _ref4 = arguments[0],
|
|
583
|
-
|
|
580
|
+
_ref11;
|
|
584
581
|
var SContentBox = Box;
|
|
585
582
|
var styles = props.styles;
|
|
586
|
-
return
|
|
587
|
-
}
|
|
583
|
+
return _ref11 = sstyled(styles), /*#__PURE__*/React.createElement(SContentBox, _ref11.cn("SContentBox", _objectSpread({}, _assignProps4({}, _ref4))));
|
|
584
|
+
}
|
|
588
585
|
var Item = /*#__PURE__*/function (_Component2) {
|
|
589
|
-
_inherits(Item, _Component2);
|
|
590
|
-
var _super2 = _createSuper(Item);
|
|
591
586
|
function Item() {
|
|
592
587
|
var _this7;
|
|
593
588
|
_classCallCheck(this, Item);
|
|
594
589
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
595
590
|
args[_key] = arguments[_key];
|
|
596
591
|
}
|
|
597
|
-
_this7 =
|
|
598
|
-
_defineProperty(
|
|
599
|
-
_defineProperty(_assertThisInitialized(_this7), "keepFocusTimeout", void 0);
|
|
592
|
+
_this7 = _callSuper(this, Item, [].concat(args));
|
|
593
|
+
_defineProperty(_this7, "refItem", /*#__PURE__*/React.createRef());
|
|
600
594
|
return _this7;
|
|
601
595
|
}
|
|
602
|
-
|
|
596
|
+
_inherits(Item, _Component2);
|
|
597
|
+
return _createClass(Item, [{
|
|
603
598
|
key: "componentDidMount",
|
|
604
599
|
value: function componentDidMount() {
|
|
605
600
|
var _this$props = this.props,
|
|
606
601
|
toggleItem = _this$props.toggleItem,
|
|
607
602
|
transform = _this$props.transform;
|
|
608
603
|
var refItem = this.refItem.current;
|
|
609
|
-
toggleItem && refItem
|
|
610
|
-
|
|
611
|
-
|
|
604
|
+
if (toggleItem && refItem) {
|
|
605
|
+
toggleItem({
|
|
606
|
+
node: refItem
|
|
607
|
+
});
|
|
608
|
+
}
|
|
612
609
|
if (transform && refItem) {
|
|
613
610
|
refItem.style.transform = "translateX(".concat(transform, "%)");
|
|
614
611
|
}
|
|
@@ -618,41 +615,26 @@ var Item = /*#__PURE__*/function (_Component2) {
|
|
|
618
615
|
value: function componentWillUnmount() {
|
|
619
616
|
var toggleItem = this.props.toggleItem;
|
|
620
617
|
var refItem = this.refItem.current;
|
|
621
|
-
toggleItem && refItem
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
618
|
+
if (toggleItem && refItem) {
|
|
619
|
+
toggleItem({
|
|
620
|
+
node: refItem
|
|
621
|
+
}, true);
|
|
622
|
+
}
|
|
625
623
|
}
|
|
626
624
|
}, {
|
|
627
625
|
key: "componentDidUpdate",
|
|
628
626
|
value: function componentDidUpdate(prevProps) {
|
|
629
|
-
var _this8 = this;
|
|
630
|
-
clearTimeout(this.keepFocusTimeout);
|
|
631
627
|
var transform = this.props.transform;
|
|
632
628
|
var refItem = this.refItem.current;
|
|
633
629
|
if (prevProps.transform !== transform && refItem) {
|
|
634
630
|
refItem.style.transform = "translateX(".concat(transform, "%)");
|
|
635
631
|
}
|
|
636
|
-
if (this.props.current) {
|
|
637
|
-
this.keepFocusTimeout = setTimeout(function () {
|
|
638
|
-
var _document$activeEleme;
|
|
639
|
-
if (document.activeElement !== refItem && ((_document$activeEleme = document.activeElement) === null || _document$activeEleme === void 0 ? void 0 : _document$activeEleme.dataset.carousel) === (refItem === null || refItem === void 0 ? void 0 : refItem.dataset.carousel)) {
|
|
640
|
-
refItem === null || refItem === void 0 ? void 0 : refItem.focus();
|
|
641
|
-
}
|
|
642
|
-
}, 100);
|
|
643
|
-
}
|
|
644
|
-
if (prevProps.isOpenZoom === true && this.props.isOpenZoom === false && this.props.current && !this.props.zoomOut) {
|
|
645
|
-
this.keepFocusTimeout = setTimeout(function () {
|
|
646
|
-
var _this8$refItem$curren;
|
|
647
|
-
(_this8$refItem$curren = _this8.refItem.current) === null || _this8$refItem$curren === void 0 ? void 0 : _this8$refItem$curren.focus();
|
|
648
|
-
}, 200);
|
|
649
|
-
}
|
|
650
632
|
}
|
|
651
633
|
}, {
|
|
652
634
|
key: "render",
|
|
653
635
|
value: function render() {
|
|
654
636
|
var _ref5 = this.asProps,
|
|
655
|
-
|
|
637
|
+
_ref12;
|
|
656
638
|
var _this$props2 = this.props,
|
|
657
639
|
styles = _this$props2.styles,
|
|
658
640
|
index = _this$props2.index,
|
|
@@ -661,7 +643,7 @@ var Item = /*#__PURE__*/function (_Component2) {
|
|
|
661
643
|
zoomIn = _this$props2.zoomIn,
|
|
662
644
|
onToggleZoomModal = _this$props2.onToggleZoomModal;
|
|
663
645
|
var SItem = Box;
|
|
664
|
-
return
|
|
646
|
+
return _ref12 = sstyled(styles), /*#__PURE__*/React.createElement(SItem, _ref12.cn("SItem", _objectSpread({}, _assignProps5({
|
|
665
647
|
"ref": this.refItem,
|
|
666
648
|
"role": 'tabpanel',
|
|
667
649
|
"data-carousel": "igc-".concat(uid, "-carousel"),
|
|
@@ -673,12 +655,10 @@ var Item = /*#__PURE__*/function (_Component2) {
|
|
|
673
655
|
}, _ref5))));
|
|
674
656
|
}
|
|
675
657
|
}]);
|
|
676
|
-
return Item;
|
|
677
658
|
}(Component);
|
|
678
|
-
|
|
679
|
-
var Prev = function Prev(props) {
|
|
659
|
+
function Prev(props) {
|
|
680
660
|
var _ref6 = arguments[0],
|
|
681
|
-
|
|
661
|
+
_ref13;
|
|
682
662
|
var styles = props.styles,
|
|
683
663
|
children = props.children,
|
|
684
664
|
Children = props.Children,
|
|
@@ -688,19 +668,21 @@ var Prev = function Prev(props) {
|
|
|
688
668
|
inverted = props.inverted;
|
|
689
669
|
var SPrev = Box;
|
|
690
670
|
var SPrevButton = Button;
|
|
691
|
-
return
|
|
671
|
+
return _ref13 = sstyled(styles), /*#__PURE__*/React.createElement(SPrev, _ref13.cn("SPrev", _objectSpread({}, _assignProps6({
|
|
692
672
|
"top": top
|
|
693
|
-
}, _ref6))), children ? /*#__PURE__*/React.createElement(Children,
|
|
673
|
+
}, _ref6))), children ? /*#__PURE__*/React.createElement(Children, _ref13.cn("Children", {})) : /*#__PURE__*/React.createElement(SPrevButton, _ref13.cn("SPrevButton", {
|
|
694
674
|
"addonLeft": ChevronLeft,
|
|
695
675
|
"aria-label": label,
|
|
696
676
|
"theme": inverted ? 'invert' : 'muted',
|
|
697
677
|
"use": 'tertiary',
|
|
698
|
-
"size": 'l'
|
|
678
|
+
"size": 'l',
|
|
679
|
+
"innerOutline": true
|
|
699
680
|
})));
|
|
700
|
-
}
|
|
701
|
-
|
|
681
|
+
}
|
|
682
|
+
;
|
|
683
|
+
function Next(props) {
|
|
702
684
|
var _ref7 = arguments[0],
|
|
703
|
-
|
|
685
|
+
_ref14;
|
|
704
686
|
var styles = props.styles,
|
|
705
687
|
children = props.children,
|
|
706
688
|
Children = props.Children,
|
|
@@ -710,45 +692,53 @@ var Next = function Next(props) {
|
|
|
710
692
|
inverted = props.inverted;
|
|
711
693
|
var SNext = Box;
|
|
712
694
|
var SNextButton = Button;
|
|
713
|
-
return
|
|
695
|
+
return _ref14 = sstyled(styles), /*#__PURE__*/React.createElement(SNext, _ref14.cn("SNext", _objectSpread({}, _assignProps7({
|
|
714
696
|
"top": top
|
|
715
|
-
}, _ref7))), children ? /*#__PURE__*/React.createElement(Children,
|
|
697
|
+
}, _ref7))), children ? /*#__PURE__*/React.createElement(Children, _ref14.cn("Children", {})) : /*#__PURE__*/React.createElement(SNextButton, _ref14.cn("SNextButton", {
|
|
716
698
|
"addonLeft": ChevronRight,
|
|
717
699
|
"aria-label": label,
|
|
718
700
|
"theme": inverted ? 'invert' : 'muted',
|
|
719
701
|
"use": 'tertiary',
|
|
720
|
-
"size": 'l'
|
|
702
|
+
"size": 'l',
|
|
703
|
+
"innerOutline": true
|
|
721
704
|
})));
|
|
722
|
-
}
|
|
723
|
-
|
|
705
|
+
}
|
|
706
|
+
;
|
|
707
|
+
function Indicators(_ref19) {
|
|
724
708
|
var _ref8 = arguments[0],
|
|
725
|
-
|
|
726
|
-
var items =
|
|
727
|
-
styles =
|
|
728
|
-
Children =
|
|
729
|
-
inverted =
|
|
709
|
+
_ref16;
|
|
710
|
+
var items = _ref19.items,
|
|
711
|
+
styles = _ref19.styles,
|
|
712
|
+
Children = _ref19.Children,
|
|
713
|
+
inverted = _ref19.inverted;
|
|
730
714
|
var SIndicators = Box;
|
|
731
715
|
if (Children.origin) {
|
|
732
|
-
var
|
|
733
|
-
return
|
|
716
|
+
var _ref15;
|
|
717
|
+
return _ref15 = sstyled(styles), /*#__PURE__*/React.createElement(SIndicators, _ref15.cn("SIndicators", _objectSpread({}, _assignProps8({
|
|
718
|
+
"innerOffset": true
|
|
719
|
+
}, _ref8))), /*#__PURE__*/React.createElement(Children, _ref15.cn("Children", {})));
|
|
734
720
|
}
|
|
735
|
-
return
|
|
721
|
+
return _ref16 = sstyled(styles), /*#__PURE__*/React.createElement(SIndicators, _ref16.cn("SIndicators", _objectSpread({}, _assignProps9({
|
|
722
|
+
"invertOutline": inverted
|
|
723
|
+
}, _ref8))), items === null || items === void 0 ? void 0 : items.map(function (item, index) {
|
|
736
724
|
return /*#__PURE__*/React.createElement(Carousel.Indicator, _extends({
|
|
737
725
|
key: index
|
|
738
726
|
}, item, {
|
|
739
727
|
inverted: inverted
|
|
740
728
|
}));
|
|
741
729
|
}));
|
|
742
|
-
}
|
|
743
|
-
|
|
744
|
-
|
|
730
|
+
}
|
|
731
|
+
;
|
|
732
|
+
function Indicator(_ref20) {
|
|
745
733
|
var _ref9 = arguments[0],
|
|
746
|
-
|
|
747
|
-
var styles =
|
|
748
|
-
Children =
|
|
734
|
+
_ref17;
|
|
735
|
+
var styles = _ref20.styles,
|
|
736
|
+
Children = _ref20.Children,
|
|
737
|
+
inverted = _ref20.inverted;
|
|
749
738
|
var SIndicator = Box;
|
|
750
|
-
return
|
|
751
|
-
}
|
|
739
|
+
return _ref17 = sstyled(styles), /*#__PURE__*/React.createElement(SIndicator, _ref17.cn("SIndicator", _objectSpread({}, _assignProps0({}, _ref9))), /*#__PURE__*/React.createElement(Children, _ref17.cn("Children", {})));
|
|
740
|
+
}
|
|
741
|
+
;
|
|
752
742
|
var Carousel = createComponent(CarouselRoot, {
|
|
753
743
|
Container: Container,
|
|
754
744
|
ContentBox: ContentBox,
|