@festo-ui/react 8.2.0-dev.579 → 8.2.0-dev.584
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/index.css +1 -1
- package/index.d.ts +63 -63
- package/lib/components/accordion/Accordion.d.ts +3 -3
- package/lib/components/accordion/Accordion.js +6 -6
- package/lib/components/accordion/AccordionContext.js +1 -1
- package/lib/components/accordion/accordion-header/AccordionHeader.d.ts +1 -1
- package/lib/components/accordion/accordion-header/AccordionHeader.js +3 -3
- package/lib/components/accordion/accordion-item/AccordionItem.d.ts +3 -3
- package/lib/components/accordion/accordion-item/AccordionItem.js +6 -6
- package/lib/components/accordion/accordion-item/AccordionItemContext.js +1 -1
- package/lib/components/accordion/accordion-item/accordion-item-body/AccordionItemBody.d.ts +1 -1
- package/lib/components/accordion/accordion-item/accordion-item-body/AccordionItemBody.js +7 -7
- package/lib/components/accordion/accordion-item/accordion-item-header/AccordionItemHeader.d.ts +1 -1
- package/lib/components/accordion/accordion-item/accordion-item-header/AccordionItemHeader.js +5 -5
- package/lib/components/bottom-sheet/BottomSheet.d.ts +1 -1
- package/lib/components/bottom-sheet/BottomSheet.js +11 -11
- package/lib/components/bottom-sheet/BottomSheet.stories.d.ts +2 -2
- package/lib/components/bottom-sheet/BottomSheet.stories.js +3 -3
- package/lib/components/breadcrumb/Breadcrumb.d.ts +2 -2
- package/lib/components/breadcrumb/Breadcrumb.js +4 -4
- package/lib/components/buttons/button/Button.d.ts +2 -2
- package/lib/components/buttons/button/Button.js +10 -10
- package/lib/components/buttons/button/Button.stories.d.ts +2 -2
- package/lib/components/buttons/button/Button.stories.js +10 -10
- package/lib/components/card/Card.d.ts +1 -1
- package/lib/components/card/Card.js +2 -2
- package/lib/components/card/CardBody.d.ts +1 -1
- package/lib/components/card/CardBody.js +2 -2
- package/lib/components/card/CardHeader.d.ts +1 -1
- package/lib/components/card/CardHeader.js +3 -3
- package/lib/components/card/CardHeader.stories.helper.d.ts +1 -1
- package/lib/components/card/CardHeader.stories.helper.js +2 -2
- package/lib/components/card/CardNotification.d.ts +1 -1
- package/lib/components/chips/chip/Chip.d.ts +1 -1
- package/lib/components/chips/chip/Chip.js +8 -8
- package/lib/components/chips/chip-container/ChipContainer.d.ts +1 -1
- package/lib/components/chips/chip-container/ChipContainer.js +3 -3
- package/lib/components/icon-wrapper/IconWrapper.js +2 -2
- package/lib/components/link-button/LinkButton.d.ts +2 -2
- package/lib/components/link-button/LinkButton.js +5 -5
- package/lib/components/loading-indicator/LoadingIndicator.d.ts +4 -4
- package/lib/components/loading-indicator/LoadingIndicator.js +8 -8
- package/lib/components/mobile-flyout/MobileFlyout.d.ts +2 -2
- package/lib/components/mobile-flyout/MobileFlyout.js +7 -7
- package/lib/components/mobile-flyout/MobileFlyoutContext.js +1 -1
- package/lib/components/mobile-flyout/mobile-flyout-page/MobileFlyoutPage.d.ts +2 -2
- package/lib/components/mobile-flyout/mobile-flyout-page/MobileFlyoutPage.js +5 -5
- package/lib/components/modals/AlertModal.d.ts +3 -3
- package/lib/components/modals/AlertModal.js +10 -10
- package/lib/components/modals/ConfirmModal.d.ts +2 -2
- package/lib/components/modals/ConfirmModal.js +3 -3
- package/lib/components/modals/CustomModal.d.ts +1 -1
- package/lib/components/modals/CustomModal.js +3 -3
- package/lib/components/modals/Modal.d.ts +4 -4
- package/lib/components/modals/Modal.js +1 -1
- package/lib/components/modals/ModalBase.d.ts +2 -2
- package/lib/components/modals/ModalBase.js +9 -9
- package/lib/components/modals/ModalFooter.d.ts +1 -1
- package/lib/components/modals/ModalFooter.js +4 -4
- package/lib/components/modals/Prompt.d.ts +3 -3
- package/lib/components/modals/Prompt.js +1 -1
- package/lib/components/modals/image-gallery/ImageGallery.d.ts +5 -5
- package/lib/components/modals/image-gallery/ImageGallery.helper.d.ts +1 -1
- package/lib/components/modals/image-gallery/ImageGallery.helper.js +2 -2
- package/lib/components/modals/image-gallery/ImageGallery.js +3 -3
- package/lib/components/modals/image-gallery/ImageGallery.stories.helper.d.ts +1 -1
- package/lib/components/modals/image-gallery/ImageGallery.stories.helper.js +29 -29
- package/lib/components/modals/image-gallery/ImageGalleryContext.d.ts +1 -1
- package/lib/components/modals/image-gallery/ImageGalleryContext.js +1 -1
- package/lib/components/modals/image-gallery/ImageGallerySwiper.js +6 -6
- package/lib/components/modals/image-gallery/ImageGalleryThumbsSwiper.js +3 -3
- package/lib/components/modals/image-gallery/image-gallery-item/ImageGalleryItem.d.ts +2 -2
- package/lib/components/modals/image-gallery/image-gallery-item/ImageGalleryItem.js +8 -8
- package/lib/components/modals/image-gallery/internal/BaseGallery.d.ts +4 -4
- package/lib/components/modals/image-gallery/internal/BaseGallery.js +1 -1
- package/lib/components/modals/image-gallery/internal/CloseButton.js +4 -4
- package/lib/components/modals/image-gallery/internal/ScaleButton.js +1 -1
- package/lib/components/pagination/Pagination.d.ts +2 -2
- package/lib/components/pagination/Pagination.js +14 -14
- package/lib/components/popovers/legend/Legend.d.ts +3 -3
- package/lib/components/popovers/popover/Popover.d.ts +4 -4
- package/lib/components/popovers/popover/Popover.js +11 -11
- package/lib/components/popovers/popover-menu/PopoverMenu.d.ts +3 -3
- package/lib/components/popovers/popover-menu/PopoverMenu.js +3 -3
- package/lib/components/popovers/tooltip/Tooltip.d.ts +1 -1
- package/lib/components/progress/Progress.d.ts +2 -2
- package/lib/components/progress/Progress.js +7 -7
- package/lib/components/scroll-area/ScrollArea.d.ts +1 -1
- package/lib/components/scroll-area/ScrollArea.js +1 -1
- package/lib/components/search-input/ClearButton.d.ts +2 -2
- package/lib/components/search-input/SearchInput.d.ts +2 -2
- package/lib/components/search-input/SearchInput.js +2 -2
- package/lib/components/search-input/useSearchInput.d.ts +2 -2
- package/lib/components/search-input/useSearchInput.js +7 -7
- package/lib/components/snackbar/Snackbar.d.ts +4 -4
- package/lib/components/snackbar/Snackbar.js +11 -11
- package/lib/components/snackbar/SnackbarContext.d.ts +2 -2
- package/lib/components/snackbar/SnackbarContext.js +1 -1
- package/lib/components/snackbar/SnackbarProvider.d.ts +2 -2
- package/lib/components/snackbar/SnackbarProvider.js +3 -3
- package/lib/components/snackbar/useSnackbar.d.ts +1 -1
- package/lib/components/snackbar/useSnackbar.js +1 -1
- package/lib/components/stepper-horizontal/StepperHorizontal.d.ts +2 -2
- package/lib/components/stepper-horizontal/StepperHorizontal.js +7 -7
- package/lib/components/stepper-horizontal/step-horizontal/StepHorizontal.d.ts +3 -3
- package/lib/components/stepper-horizontal/step-horizontal/StepHorizontal.js +3 -3
- package/lib/components/stepper-vertical/StepperVertical.d.ts +2 -2
- package/lib/components/stepper-vertical/StepperVertical.js +3 -3
- package/lib/components/stepper-vertical/step-vertical/StepVertical.d.ts +3 -3
- package/lib/components/stepper-vertical/step-vertical/StepVertical.js +9 -9
- package/lib/components/tab/Tabs.d.ts +5 -5
- package/lib/components/tab/Tabs.js +24 -24
- package/lib/components/tab/tab-pane/TabPane.d.ts +3 -3
- package/lib/components/tab/tab-pane/TabPane.js +3 -3
- package/lib/components/tab/useTabScroll.d.ts +1 -1
- package/lib/components/tab/useTabScroll.js +11 -11
- package/lib/components/table-header-cell/TableHeaderCell.js +6 -6
- package/lib/forms/checkbox/Checkbox.d.ts +4 -4
- package/lib/forms/checkbox/Checkbox.js +11 -11
- package/lib/forms/color-indicator/ColorIndicator.d.ts +2 -2
- package/lib/forms/color-indicator/ColorIndicator.js +6 -6
- package/lib/forms/color-picker/ColorHelper.d.ts +4 -4
- package/lib/forms/radio/RadioButton.d.ts +2 -2
- package/lib/forms/radio/RadioButton.js +8 -8
- package/lib/forms/radio/RadioGroup.d.ts +3 -3
- package/lib/forms/radio/RadioGroup.js +3 -3
- package/lib/forms/radio/RadioGroupContext.d.ts +1 -1
- package/lib/forms/radio/RadioGroupContext.js +1 -1
- package/lib/forms/segment/Segment.d.ts +2 -2
- package/lib/forms/segment/Segment.js +7 -7
- package/lib/forms/segment/segment-control/SegmentControl.d.ts +2 -2
- package/lib/forms/segment/segment-control/SegmentControl.js +8 -8
- package/lib/forms/select/Select.d.ts +5 -5
- package/lib/forms/select/Select.js +3 -3
- package/lib/forms/select/internal/HiddenInput.d.ts +1 -1
- package/lib/forms/select/internal/ListItem.d.ts +3 -3
- package/lib/forms/select/internal/ListItem.js +11 -11
- package/lib/forms/select/internal/SelectButton.js +9 -9
- package/lib/forms/select/internal/SelectCheckbox.d.ts +1 -1
- package/lib/forms/select/internal/SelectLabel.js +4 -4
- package/lib/forms/select/internal/SelectScrollContainer.d.ts +1 -1
- package/lib/forms/select/internal/SelectWrapper.d.ts +2 -2
- package/lib/forms/select/internal/SelectWrapper.js +4 -4
- package/lib/forms/select/internal/index.d.ts +6 -6
- package/lib/forms/select/internal/utils.d.ts +2 -2
- package/lib/forms/select/internal/utils.js +3 -3
- package/lib/forms/select/select-option/SelectOption.d.ts +2 -2
- package/lib/forms/select/select-option/SelectOption.js +1 -1
- package/lib/forms/select/utils.d.ts +1 -1
- package/lib/forms/slider/Slider.d.ts +3 -3
- package/lib/forms/slider/Slider.js +9 -9
- package/lib/forms/switch/Switch.d.ts +2 -2
- package/lib/forms/switch/Switch.js +4 -4
- package/lib/forms/text-area/TextArea.d.ts +3 -3
- package/lib/forms/text-area/TextArea.js +12 -12
- package/lib/forms/text-editor/TextEditor.d.ts +1 -1
- package/lib/forms/text-editor/TextEditor.js +42 -38
- package/lib/forms/text-editor/TextEditorButton.d.ts +3 -2
- package/lib/forms/text-editor/TextEditorButton.js +13 -13
- package/lib/forms/text-input/TextInput.d.ts +1 -1
- package/lib/forms/text-input/TextInput.js +6 -6
- package/lib/forms/time-picker/time-picker-dropdown/TimePickerInput.d.ts +1 -1
- package/lib/forms/time-picker/time-picker-dropdown/TimePickerInput.js +2 -2
- package/lib/helper/index.js +2 -2
- package/lib/helper/setRef.js +1 -1
- package/lib/helper/types.d.ts +2 -2
- package/lib/helper/useControlled.d.ts +1 -1
- package/lib/helper/useControlled.js +2 -2
- package/lib/helper/useForkRef.d.ts +1 -1
- package/lib/helper/useForkRef.js +1 -1
- package/lib/helper/useId.js +2 -2
- package/lib/helper/useOnClickOutside.d.ts +1 -1
- package/lib/helper/useOnClickOutside.js +5 -5
- package/node/lib/components/accordion/Accordion.js +4 -4
- package/node/lib/components/accordion/accordion-header/AccordionHeader.js +1 -1
- package/node/lib/components/accordion/accordion-item/AccordionItem.js +4 -4
- package/node/lib/components/accordion/accordion-item/accordion-item-body/AccordionItemBody.js +4 -4
- package/node/lib/components/accordion/accordion-item/accordion-item-header/AccordionItemHeader.js +3 -3
- package/node/lib/components/bottom-sheet/BottomSheet.js +9 -9
- package/node/lib/components/bottom-sheet/BottomSheet.stories.js +2 -2
- package/node/lib/components/breadcrumb/Breadcrumb.js +2 -2
- package/node/lib/components/buttons/button/Button.js +8 -8
- package/node/lib/components/buttons/button/Button.stories.js +9 -9
- package/node/lib/components/card/Card.js +1 -1
- package/node/lib/components/card/CardBody.js +1 -1
- package/node/lib/components/card/CardHeader.js +2 -2
- package/node/lib/components/card/CardHeader.stories.helper.js +2 -2
- package/node/lib/components/chips/chip/Chip.js +7 -7
- package/node/lib/components/chips/chip-container/ChipContainer.js +2 -2
- package/node/lib/components/icon-wrapper/IconWrapper.js +2 -2
- package/node/lib/components/link-button/LinkButton.js +3 -3
- package/node/lib/components/loading-indicator/LoadingIndicator.js +6 -6
- package/node/lib/components/mobile-flyout/MobileFlyout.js +5 -5
- package/node/lib/components/mobile-flyout/mobile-flyout-page/MobileFlyoutPage.js +3 -3
- package/node/lib/components/modals/AlertModal.js +9 -9
- package/node/lib/components/modals/ConfirmModal.js +2 -2
- package/node/lib/components/modals/CustomModal.js +1 -1
- package/node/lib/components/modals/ModalBase.js +4 -4
- package/node/lib/components/modals/ModalFooter.js +2 -2
- package/node/lib/components/modals/image-gallery/ImageGallery.helper.js +1 -1
- package/node/lib/components/modals/image-gallery/ImageGallery.js +2 -2
- package/node/lib/components/modals/image-gallery/ImageGallery.stories.helper.js +29 -29
- package/node/lib/components/modals/image-gallery/ImageGallerySwiper.js +3 -3
- package/node/lib/components/modals/image-gallery/image-gallery-item/ImageGalleryItem.js +5 -5
- package/node/lib/components/modals/image-gallery/internal/CloseButton.js +3 -3
- package/node/lib/components/pagination/Pagination.js +12 -12
- package/node/lib/components/popovers/popover/Popover.js +8 -8
- package/node/lib/components/popovers/popover-menu/PopoverMenu.js +1 -1
- package/node/lib/components/progress/Progress.js +6 -6
- package/node/lib/components/search-input/SearchInput.js +1 -1
- package/node/lib/components/search-input/useSearchInput.js +6 -6
- package/node/lib/components/snackbar/Snackbar.js +8 -8
- package/node/lib/components/snackbar/SnackbarProvider.js +1 -1
- package/node/lib/components/stepper-horizontal/StepperHorizontal.js +5 -5
- package/node/lib/components/stepper-horizontal/step-horizontal/StepHorizontal.js +1 -1
- package/node/lib/components/stepper-vertical/StepperVertical.js +1 -1
- package/node/lib/components/stepper-vertical/step-vertical/StepVertical.js +7 -7
- package/node/lib/components/tab/Tabs.js +22 -22
- package/node/lib/components/tab/tab-pane/TabPane.js +2 -2
- package/node/lib/components/tab/useTabScroll.js +10 -10
- package/node/lib/components/table-header-cell/TableHeaderCell.js +4 -4
- package/node/lib/forms/checkbox/Checkbox.js +9 -9
- package/node/lib/forms/color-indicator/ColorIndicator.js +4 -4
- package/node/lib/forms/radio/RadioButton.js +6 -6
- package/node/lib/forms/radio/RadioGroup.js +1 -1
- package/node/lib/forms/segment/Segment.js +5 -5
- package/node/lib/forms/segment/segment-control/SegmentControl.js +6 -6
- package/node/lib/forms/select/Select.js +1 -1
- package/node/lib/forms/select/internal/ListItem.js +9 -9
- package/node/lib/forms/select/internal/SelectButton.js +7 -7
- package/node/lib/forms/select/internal/SelectLabel.js +3 -3
- package/node/lib/forms/select/internal/SelectWrapper.js +2 -2
- package/node/lib/forms/select/internal/utils.js +1 -1
- package/node/lib/forms/slider/Slider.js +7 -7
- package/node/lib/forms/switch/Switch.js +3 -3
- package/node/lib/forms/text-area/TextArea.js +10 -10
- package/node/lib/forms/text-editor/TextEditor.js +39 -35
- package/node/lib/forms/text-editor/TextEditorButton.js +11 -11
- package/node/lib/forms/text-input/TextInput.js +4 -4
- package/node/lib/forms/time-picker/time-picker-dropdown/TimePickerInput.js +1 -1
- package/node/lib/helper/index.js +2 -2
- package/node/lib/helper/setRef.js +1 -1
- package/node/lib/helper/useControlled.js +1 -1
- package/node/lib/helper/useId.js +1 -1
- package/node/lib/helper/useOnClickOutside.js +4 -4
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/* eslint-disable jsx-a11y/no-static-element-interactions */
|
|
2
2
|
/* eslint-disable jsx-a11y/click-events-have-key-events */
|
|
3
3
|
|
|
4
|
-
import classNames from
|
|
5
|
-
import { forwardRef, useEffect, useRef } from
|
|
6
|
-
import ReactDOM from
|
|
7
|
-
import { CSSTransition } from
|
|
8
|
-
import { RemoveScroll } from
|
|
4
|
+
import classNames from "classnames";
|
|
5
|
+
import { forwardRef, useEffect, useRef } from "react";
|
|
6
|
+
import ReactDOM from "react-dom";
|
|
7
|
+
import { CSSTransition } from "react-transition-group";
|
|
8
|
+
import { RemoveScroll } from "react-remove-scroll";
|
|
9
9
|
import useForkRef from "../../helper/useForkRef.js";
|
|
10
10
|
import LoadingIndicator from "../loading-indicator/LoadingIndicator.js";
|
|
11
11
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -24,12 +24,12 @@ const ModalBase = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
24
24
|
const container = modalRef?.current?.ownerDocument || document;
|
|
25
25
|
useEffect(() => {
|
|
26
26
|
const handleKeyDown = event => {
|
|
27
|
-
if (event.key ===
|
|
27
|
+
if (event.key === "Escape" && isOpen) {
|
|
28
28
|
onClose?.();
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
|
-
container.addEventListener(
|
|
32
|
-
return () => container.removeEventListener(
|
|
31
|
+
container.addEventListener("keydown", handleKeyDown);
|
|
32
|
+
return () => container.removeEventListener("keydown", handleKeyDown);
|
|
33
33
|
}, [onClose, isOpen, container]);
|
|
34
34
|
return /*#__PURE__*/_jsx(_Fragment, {
|
|
35
35
|
children: /*#__PURE__*/ReactDOM.createPortal(/*#__PURE__*/_jsxs(_Fragment, {
|
|
@@ -70,7 +70,7 @@ const ModalBase = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
70
70
|
children: /*#__PURE__*/_jsx(RemoveScroll, {
|
|
71
71
|
ref: allRefs,
|
|
72
72
|
enabled: isOpen,
|
|
73
|
-
className: classNames(
|
|
73
|
+
className: classNames("fr-modal fwe-modal", className),
|
|
74
74
|
children: children
|
|
75
75
|
})
|
|
76
76
|
})
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ClassNamePropsWithChildren } from
|
|
1
|
+
import { ClassNamePropsWithChildren } from "../../helper/types";
|
|
2
2
|
declare const ModalFooter: (props: ClassNamePropsWithChildren & import("react").RefAttributes<HTMLDivElement>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | null;
|
|
3
3
|
export default ModalFooter;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { forwardRef } from
|
|
2
|
-
import cn from
|
|
1
|
+
import { forwardRef } from "react";
|
|
2
|
+
import cn from "classnames";
|
|
3
3
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
4
|
const ModalFooter = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
5
5
|
let {
|
|
@@ -8,9 +8,9 @@ const ModalFooter = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
8
8
|
} = _ref;
|
|
9
9
|
return /*#__PURE__*/_jsx("div", {
|
|
10
10
|
ref: ref,
|
|
11
|
-
className: cn(
|
|
11
|
+
className: cn("fwe-modal-footer", className),
|
|
12
12
|
children: /*#__PURE__*/_jsx("div", {
|
|
13
|
-
className: cn(
|
|
13
|
+
className: cn("fwe-modal-buttons"),
|
|
14
14
|
children: children
|
|
15
15
|
})
|
|
16
16
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { ModalProps } from
|
|
3
|
-
interface PromptProps extends Omit<ModalProps,
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ModalProps } from "./Modal";
|
|
3
|
+
interface PromptProps extends Omit<ModalProps, "head" | "body" | "children"> {
|
|
4
4
|
title: string;
|
|
5
5
|
subtitle?: string;
|
|
6
6
|
hint?: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { ComponentPropsWithoutRef } from
|
|
3
|
-
import { ModalBaseProps } from
|
|
4
|
-
import { ImageGalleryItemData, ImageGalleryItemDataBase } from
|
|
5
|
-
export interface ImageGalleryProps extends ComponentPropsWithoutRef<
|
|
1
|
+
import "./ImageGallery.scss";
|
|
2
|
+
import { ComponentPropsWithoutRef } from "react";
|
|
3
|
+
import { ModalBaseProps } from "../ModalBase";
|
|
4
|
+
import { ImageGalleryItemData, ImageGalleryItemDataBase } from "./internal/BaseGallery";
|
|
5
|
+
export interface ImageGalleryProps extends ComponentPropsWithoutRef<"div">, ModalBaseProps {
|
|
6
6
|
/** Index number of initial slide. */
|
|
7
7
|
startIndex: number;
|
|
8
8
|
images?: ImageGalleryItemData[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import cn from
|
|
1
|
+
import cn from "classnames";
|
|
2
2
|
const getClasses = (thumbnailImages, descriptiveContent, className) => {
|
|
3
|
-
const base =
|
|
3
|
+
const base = "fwe-modal-image-gallery";
|
|
4
4
|
const thumbnail = `${base}--with-thumbnails`;
|
|
5
5
|
const container = `${base}--with-container`;
|
|
6
6
|
return cn(base, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { forwardRef, useState } from
|
|
1
|
+
import { forwardRef, useState } from "react";
|
|
2
2
|
import ModalBase from "../ModalBase.js";
|
|
3
3
|
import BaseGallery from "./internal/BaseGallery.js";
|
|
4
4
|
import ImageGalleryContent from "./ImageGalleryContent.js";
|
|
@@ -10,7 +10,7 @@ import ScaleButton from "./internal/ScaleButton.js";
|
|
|
10
10
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
11
11
|
function getLength(pagination, images) {
|
|
12
12
|
let length = 0;
|
|
13
|
-
if (typeof pagination ===
|
|
13
|
+
if (typeof pagination === "number") {
|
|
14
14
|
length = pagination;
|
|
15
15
|
} else if (pagination === true && images?.length) {
|
|
16
16
|
length = images.length;
|
|
@@ -73,7 +73,7 @@ const ImageGallery = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
73
73
|
children: children
|
|
74
74
|
}), images && descriptiveContent === true ? /*#__PURE__*/_jsx(ImageGalleryContent, {
|
|
75
75
|
imageContent: images?.[currentIndex - 1]?.content
|
|
76
|
-
}) : null, typeof descriptiveContent ===
|
|
76
|
+
}) : null, typeof descriptiveContent === "function" ? descriptiveContent?.(currentIndex - 1) : null]
|
|
77
77
|
})]
|
|
78
78
|
})
|
|
79
79
|
});
|
|
@@ -13,17 +13,17 @@ import AssetTen from "../../../../../../web-essentials/stories/assets/gallery-10
|
|
|
13
13
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
14
14
|
const images = [{
|
|
15
15
|
src: Asset1,
|
|
16
|
-
alt:
|
|
16
|
+
alt: "Asset1",
|
|
17
17
|
imageContent: {
|
|
18
|
-
title:
|
|
19
|
-
body:
|
|
18
|
+
title: "Asset 1",
|
|
19
|
+
body: "Asset 1 description"
|
|
20
20
|
}
|
|
21
21
|
}, {
|
|
22
22
|
src: Asset2,
|
|
23
|
-
alt:
|
|
23
|
+
alt: "Asset2",
|
|
24
24
|
containMode: true,
|
|
25
25
|
imageContent: {
|
|
26
|
-
title:
|
|
26
|
+
title: "Asset 2",
|
|
27
27
|
body: /*#__PURE__*/_jsxs(_Fragment, {
|
|
28
28
|
children: [/*#__PURE__*/_jsx("p", {
|
|
29
29
|
children: "Asset 2 description with some html inside."
|
|
@@ -38,60 +38,60 @@ const images = [{
|
|
|
38
38
|
}
|
|
39
39
|
}, {
|
|
40
40
|
src: Asset3,
|
|
41
|
-
alt:
|
|
41
|
+
alt: "Asset3",
|
|
42
42
|
containMode: true,
|
|
43
43
|
imageContent: {
|
|
44
|
-
title:
|
|
45
|
-
body:
|
|
44
|
+
title: "Asset 3",
|
|
45
|
+
body: "Asset 3 description"
|
|
46
46
|
}
|
|
47
47
|
}, {
|
|
48
48
|
src: Asset4,
|
|
49
|
-
alt:
|
|
49
|
+
alt: "Asset4",
|
|
50
50
|
imageContent: {
|
|
51
|
-
title:
|
|
52
|
-
body:
|
|
51
|
+
title: "Asset 4",
|
|
52
|
+
body: "Asset 4 description"
|
|
53
53
|
}
|
|
54
54
|
}, {
|
|
55
55
|
src: Asset5,
|
|
56
|
-
alt:
|
|
56
|
+
alt: "Asset5",
|
|
57
57
|
imageContent: {
|
|
58
|
-
title:
|
|
59
|
-
body:
|
|
58
|
+
title: "Asset 5",
|
|
59
|
+
body: "Asset 5 description"
|
|
60
60
|
}
|
|
61
61
|
}, {
|
|
62
62
|
src: Asset6,
|
|
63
|
-
alt:
|
|
63
|
+
alt: "Asset6",
|
|
64
64
|
imageContent: {
|
|
65
|
-
title:
|
|
66
|
-
body:
|
|
65
|
+
title: "Asset 6",
|
|
66
|
+
body: "Asset 6 description"
|
|
67
67
|
}
|
|
68
68
|
}, {
|
|
69
69
|
src: Asset7,
|
|
70
|
-
alt:
|
|
70
|
+
alt: "Asset7",
|
|
71
71
|
imageContent: {
|
|
72
|
-
title:
|
|
73
|
-
body:
|
|
72
|
+
title: "Asset 7",
|
|
73
|
+
body: "Asset 7 description"
|
|
74
74
|
}
|
|
75
75
|
}, {
|
|
76
76
|
src: Asset8,
|
|
77
|
-
alt:
|
|
77
|
+
alt: "Asset8",
|
|
78
78
|
imageContent: {
|
|
79
|
-
title:
|
|
80
|
-
body:
|
|
79
|
+
title: "Asset 8",
|
|
80
|
+
body: "Asset 8 description"
|
|
81
81
|
}
|
|
82
82
|
}, {
|
|
83
83
|
src: Asset9,
|
|
84
|
-
alt:
|
|
84
|
+
alt: "Asset9",
|
|
85
85
|
imageContent: {
|
|
86
|
-
title:
|
|
87
|
-
body:
|
|
86
|
+
title: "Asset 9",
|
|
87
|
+
body: "Asset 9 description"
|
|
88
88
|
}
|
|
89
89
|
}, {
|
|
90
90
|
src: AssetTen,
|
|
91
|
-
alt:
|
|
91
|
+
alt: "Asset10",
|
|
92
92
|
imageContent: {
|
|
93
|
-
title:
|
|
94
|
-
body:
|
|
93
|
+
title: "Asset 10",
|
|
94
|
+
body: "Asset 1ß description"
|
|
95
95
|
}
|
|
96
96
|
}];
|
|
97
97
|
export default images;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Swiper } from
|
|
2
|
-
import { Navigation, Thumbs } from
|
|
3
|
-
import { useContext } from
|
|
1
|
+
import { Swiper } from "swiper/react";
|
|
2
|
+
import { Navigation, Thumbs } from "swiper";
|
|
3
|
+
import { useContext } from "react";
|
|
4
4
|
import ImageGalleryContext from "./ImageGalleryContext.js";
|
|
5
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
6
|
export default function ImageGallerySwiper(_ref) {
|
|
@@ -19,8 +19,8 @@ export default function ImageGallerySwiper(_ref) {
|
|
|
19
19
|
},
|
|
20
20
|
modules: [Thumbs, Navigation],
|
|
21
21
|
navigation: {
|
|
22
|
-
nextEl:
|
|
23
|
-
prevEl:
|
|
22
|
+
nextEl: ".fwe-navigate-btn-up",
|
|
23
|
+
prevEl: ".fwe-navigate-btn-down"
|
|
24
24
|
},
|
|
25
25
|
zoom: true,
|
|
26
26
|
className: "gallery-swiper fwe-image-gallery",
|
|
@@ -29,4 +29,4 @@ export default function ImageGallerySwiper(_ref) {
|
|
|
29
29
|
children: children
|
|
30
30
|
});
|
|
31
31
|
}
|
|
32
|
-
ImageGallerySwiper.displayName =
|
|
32
|
+
ImageGallerySwiper.displayName = "Swiper";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useContext } from
|
|
2
|
-
import { Thumbs } from
|
|
3
|
-
import { Swiper } from
|
|
1
|
+
import { useContext } from "react";
|
|
2
|
+
import { Thumbs } from "swiper";
|
|
3
|
+
import { Swiper } from "swiper/react";
|
|
4
4
|
import ImageGalleryContext, { SwiperContext } from "./ImageGalleryContext.js";
|
|
5
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
6
|
export default function ImageGalleryThumbsSwiper(_ref) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SwiperSlideProps } from
|
|
2
|
-
import
|
|
1
|
+
import { SwiperSlideProps } from "swiper/react";
|
|
2
|
+
import "./ImageGalleryItem.scss";
|
|
3
3
|
interface ImageGalleryItemProps extends SwiperSlideProps {
|
|
4
4
|
children: React.ReactNode;
|
|
5
5
|
containMode?: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import cn from
|
|
2
|
-
import { SwiperSlide } from
|
|
3
|
-
import { useContext } from
|
|
1
|
+
import cn from "classnames";
|
|
2
|
+
import { SwiperSlide } from "swiper/react";
|
|
3
|
+
import { useContext } from "react";
|
|
4
4
|
import { SwiperContext } from "../ImageGalleryContext.js";
|
|
5
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
6
|
export default function ImageGalleryItem(_ref) {
|
|
@@ -11,18 +11,18 @@ export default function ImageGalleryItem(_ref) {
|
|
|
11
11
|
...props
|
|
12
12
|
} = _ref;
|
|
13
13
|
const swiperType = useContext(SwiperContext);
|
|
14
|
-
const isThumbsSwiper = swiperType ===
|
|
14
|
+
const isThumbsSwiper = swiperType === "thumbs";
|
|
15
15
|
return /*#__PURE__*/_jsx(SwiperSlide, {
|
|
16
16
|
...props,
|
|
17
17
|
className: cn(className, {
|
|
18
|
-
|
|
18
|
+
"fr-image-gallery-item--contain": containMode && isThumbsSwiper
|
|
19
19
|
}),
|
|
20
20
|
children: isThumbsSwiper ? children : /*#__PURE__*/_jsx("div", {
|
|
21
|
-
className: cn(
|
|
22
|
-
|
|
21
|
+
className: cn("swiper-zoom-container", {
|
|
22
|
+
"fr-image-gallery-item--contain": containMode
|
|
23
23
|
}),
|
|
24
24
|
children: children
|
|
25
25
|
})
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
|
-
ImageGalleryItem.displayName =
|
|
28
|
+
ImageGalleryItem.displayName = "SwiperSlide";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ComponentPropsWithoutRef } from
|
|
2
|
-
import { ClassNamePropsWithChildren } from
|
|
3
|
-
import { ImageDescriptiveContent } from
|
|
4
|
-
export interface ImageGalleryItemDataBase extends ComponentPropsWithoutRef<
|
|
1
|
+
import { ComponentPropsWithoutRef } from "react";
|
|
2
|
+
import { ClassNamePropsWithChildren } from "../../../../helper/types";
|
|
3
|
+
import { ImageDescriptiveContent } from "../ImageGalleryContent";
|
|
4
|
+
export interface ImageGalleryItemDataBase extends ComponentPropsWithoutRef<"img">, Record<string, unknown> {
|
|
5
5
|
containMode?: boolean;
|
|
6
6
|
}
|
|
7
7
|
export type ImageGalleryItemData = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useMemo, useState } from
|
|
1
|
+
import { useMemo, useState } from "react";
|
|
2
2
|
import ImageGalleryContext from "../ImageGalleryContext.js";
|
|
3
3
|
import ImageGalleryItem from "../image-gallery-item/ImageGalleryItem.js";
|
|
4
4
|
import ImageGalleryThumbsSwiper from "../ImageGalleryThumbsSwiper.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import cn from
|
|
1
|
+
import cn from "classnames";
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
export default function CloseButton(_ref) {
|
|
4
4
|
let {
|
|
@@ -8,9 +8,9 @@ export default function CloseButton(_ref) {
|
|
|
8
8
|
return /*#__PURE__*/_jsx("button", {
|
|
9
9
|
type: "button",
|
|
10
10
|
"aria-label": "close",
|
|
11
|
-
className: cn(
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
className: cn("fwe-image-gallery-close-btn", {
|
|
12
|
+
"fwe-ml-auto": !showScaleButton,
|
|
13
|
+
"fwe-ml-3": showScaleButton
|
|
14
14
|
}),
|
|
15
15
|
onClick: onClose
|
|
16
16
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React, { useEffect, useState } from
|
|
2
|
-
import classNames from
|
|
1
|
+
import React, { useEffect, useState } from "react";
|
|
2
|
+
import classNames from "classnames";
|
|
3
3
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
4
4
|
export let PaginationType = /*#__PURE__*/function (PaginationType) {
|
|
5
5
|
PaginationType["Simple"] = "SIMPLE";
|
|
@@ -49,18 +49,18 @@ function Pagination(props) {
|
|
|
49
49
|
handleChange(newPageCurrent);
|
|
50
50
|
}
|
|
51
51
|
function handleKeyPress(event, index) {
|
|
52
|
-
if (event.key ===
|
|
52
|
+
if (event.key === "Enter" || event.key === " ") {
|
|
53
53
|
onDotClick(index);
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
57
57
|
children: [type !== PaginationType.Dots && /*#__PURE__*/_jsxs("div", {
|
|
58
|
-
className: classNames(
|
|
59
|
-
|
|
58
|
+
className: classNames("fwe-pagination fwe-p-m", {
|
|
59
|
+
"fwe-d-none": pageMax < 2
|
|
60
60
|
}, className),
|
|
61
61
|
children: [/*#__PURE__*/_jsx("button", {
|
|
62
|
-
className: classNames(
|
|
63
|
-
|
|
62
|
+
className: classNames("fwe-navigate-btn-down", {
|
|
63
|
+
"fwe-disabled": innerPageCurrent <= 1
|
|
64
64
|
}),
|
|
65
65
|
onClick: onBtnDown,
|
|
66
66
|
type: "button",
|
|
@@ -74,25 +74,25 @@ function Pagination(props) {
|
|
|
74
74
|
children: pageMax
|
|
75
75
|
})]
|
|
76
76
|
}), /*#__PURE__*/_jsx("button", {
|
|
77
|
-
className: classNames(
|
|
78
|
-
|
|
79
|
-
|
|
77
|
+
className: classNames("fwe-navigate-btn-up", {
|
|
78
|
+
"fwe-disabled": innerPageCurrent >= pageMax,
|
|
79
|
+
"fwe-ml-4": type === PaginationType.Simple
|
|
80
80
|
}),
|
|
81
81
|
onClick: onBtnUp,
|
|
82
82
|
type: "button",
|
|
83
83
|
"aria-label": "navigate-btn-up"
|
|
84
84
|
})]
|
|
85
85
|
}), type === PaginationType.Dots && /*#__PURE__*/_jsx("div", {
|
|
86
|
-
className: classNames(
|
|
87
|
-
|
|
86
|
+
className: classNames("fwe-p-m", {
|
|
87
|
+
"fwe-d-none": pageMax < 2
|
|
88
88
|
}, className),
|
|
89
89
|
children: /*#__PURE__*/_jsx("div", {
|
|
90
90
|
className: "fwe-pagination",
|
|
91
91
|
children: dotArray.map(index => /*#__PURE__*/_jsx("span", {
|
|
92
92
|
tabIndex: 0,
|
|
93
93
|
role: "button",
|
|
94
|
-
className: classNames(
|
|
95
|
-
|
|
94
|
+
className: classNames("fwe-page-dot", {
|
|
95
|
+
"fwe-selected": index + 1 === innerPageCurrent
|
|
96
96
|
}),
|
|
97
97
|
onClick: () => onDotClick(index),
|
|
98
98
|
"aria-label": "page-dot",
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { PopoverProps } from
|
|
2
|
-
import
|
|
1
|
+
import { PopoverProps } from "../popover/Popover";
|
|
2
|
+
import "./Legend.scss";
|
|
3
3
|
interface Item {
|
|
4
4
|
name: string;
|
|
5
5
|
text: string;
|
|
6
6
|
}
|
|
7
|
-
export interface LegendProps extends Omit<PopoverProps,
|
|
7
|
+
export interface LegendProps extends Omit<PopoverProps, "popoverContent"> {
|
|
8
8
|
items: Item[];
|
|
9
9
|
}
|
|
10
10
|
declare function Legend({ items, ...props }: LegendProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { Placement } from
|
|
3
|
-
import { ClassNamePropsWithChildren } from
|
|
4
|
-
import
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Placement } from "@popperjs/core";
|
|
3
|
+
import { ClassNamePropsWithChildren } from "../../../helper/types";
|
|
4
|
+
import "./Popover.scss";
|
|
5
5
|
export interface PopoverProps extends ClassNamePropsWithChildren {
|
|
6
6
|
popoverContent: React.ReactNode;
|
|
7
7
|
position?: Placement;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React, { useEffect, useRef, useState } from
|
|
2
|
-
import { usePopper } from
|
|
3
|
-
import classNames from
|
|
1
|
+
import React, { useEffect, useRef, useState } from "react";
|
|
2
|
+
import { usePopper } from "react-popper";
|
|
3
|
+
import classNames from "classnames";
|
|
4
4
|
import useOnClickOutside from "../../../helper/useOnClickOutside.js";
|
|
5
5
|
import useForkRef from "../../../helper/useForkRef.js";
|
|
6
6
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
@@ -35,19 +35,19 @@ function Popover(_ref) {
|
|
|
35
35
|
} = usePopper(referenceElement.current, popperElement, {
|
|
36
36
|
placement: position,
|
|
37
37
|
modifiers: [{
|
|
38
|
-
name:
|
|
38
|
+
name: "arrow",
|
|
39
39
|
options: {
|
|
40
40
|
element: arrowElement
|
|
41
41
|
}
|
|
42
42
|
}, {
|
|
43
|
-
name:
|
|
43
|
+
name: "offset",
|
|
44
44
|
options: {
|
|
45
45
|
offset: [0, 24]
|
|
46
46
|
}
|
|
47
47
|
}, {
|
|
48
|
-
name:
|
|
48
|
+
name: "flip",
|
|
49
49
|
options: {
|
|
50
|
-
fallbackPlacements: flip ? fallbackPositions : [position ||
|
|
50
|
+
fallbackPlacements: flip ? fallbackPositions : [position || "auto"]
|
|
51
51
|
}
|
|
52
52
|
}]
|
|
53
53
|
});
|
|
@@ -66,15 +66,15 @@ function Popover(_ref) {
|
|
|
66
66
|
}
|
|
67
67
|
useOnClickOutside(popperElRef, closePopover, referenceElement);
|
|
68
68
|
function handleKeyDown(event) {
|
|
69
|
-
if (event.key ===
|
|
69
|
+
if (event.key === "Enter") {
|
|
70
70
|
handleChange(undefined, true);
|
|
71
71
|
}
|
|
72
|
-
if (event.key ===
|
|
72
|
+
if (event.key === "Escape") {
|
|
73
73
|
handleChange(undefined, false);
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
function handleKeyUp(event) {
|
|
77
|
-
if (event.key ===
|
|
77
|
+
if (event.key === " ") {
|
|
78
78
|
handleChange(undefined, true);
|
|
79
79
|
}
|
|
80
80
|
}
|
|
@@ -90,7 +90,7 @@ function Popover(_ref) {
|
|
|
90
90
|
});
|
|
91
91
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
92
92
|
children: [wrapper ? wrapper(childrenWrapper) : childrenWrapper, showPopper && /*#__PURE__*/_jsxs("div", {
|
|
93
|
-
className: classNames(
|
|
93
|
+
className: classNames("fwe-popover-container", containerClassName),
|
|
94
94
|
ref: combinedRef,
|
|
95
95
|
style: styles.popper,
|
|
96
96
|
...attributes.popper,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { PopoverProps } from
|
|
2
|
-
import
|
|
1
|
+
import { PopoverProps } from "../popover/Popover";
|
|
2
|
+
import "./PopoverMenu.scss";
|
|
3
3
|
interface PopoverMenuItem {
|
|
4
4
|
text: string;
|
|
5
5
|
icon: React.ReactNode;
|
|
6
6
|
action?: (data: unknown) => void;
|
|
7
7
|
data: unknown;
|
|
8
8
|
}
|
|
9
|
-
export interface PopoverMenuProps extends Omit<PopoverProps,
|
|
9
|
+
export interface PopoverMenuProps extends Omit<PopoverProps, "popoverContent" | "open" | "onStatusChange"> {
|
|
10
10
|
menu: PopoverMenuItem[];
|
|
11
11
|
}
|
|
12
12
|
declare function PopoverMenu({ children, menu, className, ...props }: PopoverMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useState } from
|
|
2
|
-
import classNames from
|
|
1
|
+
import { useState } from "react";
|
|
2
|
+
import classNames from "classnames";
|
|
3
3
|
import Popover from "../popover/Popover.js";
|
|
4
4
|
import IconWrapper from "../../icon-wrapper/IconWrapper.js";
|
|
5
5
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -38,7 +38,7 @@ function PopoverMenu(_ref) {
|
|
|
38
38
|
}, item.icon + item.text))
|
|
39
39
|
});
|
|
40
40
|
return /*#__PURE__*/_jsx("div", {
|
|
41
|
-
className: classNames(
|
|
41
|
+
className: classNames("fwe-popover-menu", className),
|
|
42
42
|
children: /*#__PURE__*/_jsx(Popover, {
|
|
43
43
|
popoverContent: content,
|
|
44
44
|
position: "right",
|
|
@@ -5,5 +5,5 @@ export interface PopoverMenuProps extends ClassNamePropsWithChildren {
|
|
|
5
5
|
title: string | JSX.Element;
|
|
6
6
|
position?: Placement;
|
|
7
7
|
}
|
|
8
|
-
declare function Tooltip({ children, className, title, position
|
|
8
|
+
declare function Tooltip({ children, className, title, position }: Readonly<PopoverMenuProps>): import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
export default Tooltip;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ClassNameProps } from
|
|
1
|
+
import { ClassNameProps } from "../../helper/types";
|
|
2
2
|
interface ProgressProps extends ClassNameProps {
|
|
3
3
|
progress: number;
|
|
4
|
-
background?:
|
|
4
|
+
background?: "white" | "black" | "background";
|
|
5
5
|
error?: boolean;
|
|
6
6
|
}
|
|
7
7
|
declare function Progress({ background, error, progress, className }: ProgressProps): import("react/jsx-runtime").JSX.Element;
|