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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xmlui",
3
- "version": "0.7.19",
3
+ "version": "0.7.20",
4
4
  "sideEffects": false,
5
5
  "scripts": {
6
6
  "start-test-bed": "cd src/testing/infrastructure && xmlui start",
@@ -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 null;
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.jsxs)(CarouselContext_1.CarouselContext.Provider, { value: carouselContextValue, children: [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: carouselItems.map((item, index) => ((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: item.ref, style: item.style, children: item.children }) }, item.id))) }) }), 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))) }))] })] }));
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
  });