xmlui 0.7.19 → 0.7.20
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/dist/{apiInterceptorWorker-C3bvewX6.mjs → apiInterceptorWorker-D3L7dpSV.mjs} +1 -1
- package/dist/{index-BwlAHBcX.mjs → index-BYjaMGrD.mjs} +489 -495
- package/dist/scripts/package.json +1 -1
- package/dist/scripts/src/components/Carousel/CarouselItemNative.js +7 -4
- package/dist/scripts/src/components/Carousel/CarouselNative.js +6 -6
- package/dist/xmlui-standalone.umd.js +8 -8
- package/dist/xmlui.mjs +1 -1
- package/package.json +1 -1
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.CarouselItemComponent = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
8
|
const react_1 = require("react");
|
|
5
9
|
const CarouselContext_1 = require("@components/Carousel/CarouselContext");
|
|
10
|
+
const classnames_1 = __importDefault(require("@components-core/utils/classnames"));
|
|
11
|
+
const Carousel_module_scss_1 = __importDefault(require("@components/Carousel/Carousel.module.scss"));
|
|
6
12
|
exports.CarouselItemComponent = (0, react_1.forwardRef)(function CarouselItemComponent({ children, style }, forwardedRef) {
|
|
7
13
|
const id = (0, react_1.useId)();
|
|
8
14
|
const { register, unRegister } = (0, CarouselContext_1.useCarousel)();
|
|
9
15
|
(0, react_1.useEffect)(() => {
|
|
10
16
|
register({
|
|
11
|
-
children,
|
|
12
|
-
style,
|
|
13
|
-
ref: forwardedRef,
|
|
14
17
|
id,
|
|
15
18
|
});
|
|
16
19
|
}, [id, children, style, register, forwardedRef]);
|
|
@@ -19,5 +22,5 @@ exports.CarouselItemComponent = (0, react_1.forwardRef)(function CarouselItemCom
|
|
|
19
22
|
unRegister(id);
|
|
20
23
|
};
|
|
21
24
|
}, [id, unRegister]);
|
|
22
|
-
return
|
|
25
|
+
return ((0, jsx_runtime_1.jsx)("div", { role: "group", "aria-roledescription": "slide", className: (0, classnames_1.default)(Carousel_module_scss_1.default.carouselItem), children: (0, jsx_runtime_1.jsx)("div", { className: Carousel_module_scss_1.default.innerWrapper, ref: forwardedRef, style: style, children: children }) }, id));
|
|
23
26
|
});
|
|
@@ -163,10 +163,10 @@ exports.CarouselComponent = (0, react_1.forwardRef)(function CarouselComponent({
|
|
|
163
163
|
referenceElement.current.addEventListener("keydown", handleKeyDown);
|
|
164
164
|
}
|
|
165
165
|
}, [ref, handleKeyDown]);
|
|
166
|
-
return ((0, jsx_runtime_1.
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
166
|
+
return ((0, jsx_runtime_1.jsx)(CarouselContext_1.CarouselContext.Provider, { value: carouselContextValue, children: (0, jsx_runtime_1.jsxs)("div", { style: style, ref: ref, className: (0, classnames_1.default)(Carousel_module_scss_1.default.carousel), role: "region", tabIndex: -1, "aria-roledescription": "carousel", children: [(0, jsx_runtime_1.jsx)("div", { ref: carouselRef, className: Carousel_module_scss_1.default.carouselContentWrapper, children: (0, jsx_runtime_1.jsx)("div", { className: (0, classnames_1.default)(Carousel_module_scss_1.default.carouselContent, {
|
|
167
|
+
[Carousel_module_scss_1.default.horizontal]: orientation === "horizontal",
|
|
168
|
+
[Carousel_module_scss_1.default.vertical]: orientation === "vertical",
|
|
169
|
+
}), children: children }) }), controls && ((0, jsx_runtime_1.jsxs)("div", { className: Carousel_module_scss_1.default.controls, children: [autoplay && ((0, jsx_runtime_1.jsx)("button", { className: Carousel_module_scss_1.default.controlButton, onClick: toggleAutoplay, children: isPlaying ? (0, jsx_runtime_1.jsx)(IconNative_1.default, { name: "pause" }) : (0, jsx_runtime_1.jsx)(IconNative_1.default, { name: "play" }) })), (0, jsx_runtime_1.jsx)("button", { className: Carousel_module_scss_1.default.controlButton, disabled: !canScrollPrev, onClick: scrollPrev, children: (0, jsx_runtime_1.jsx)(IconNative_1.default, { name: prevIconName }) }), (0, jsx_runtime_1.jsx)("button", { className: Carousel_module_scss_1.default.controlButton, onClick: scrollNext, disabled: !canScrollNext, children: (0, jsx_runtime_1.jsx)(IconNative_1.default, { name: nextIconName }) })] })), indicators && ((0, jsx_runtime_1.jsx)("div", { className: Carousel_module_scss_1.default.indicators, children: carouselItems.map((_, index) => ((0, jsx_runtime_1.jsx)("button", { type: "button", onClick: () => scrollTo(index), className: (0, classnames_1.default)(Carousel_module_scss_1.default.indicator, {
|
|
170
|
+
[Carousel_module_scss_1.default.active]: index === activeSlide,
|
|
171
|
+
}), "aria-current": index === activeSlide }, index))) }))] }) }));
|
|
172
172
|
});
|