@festo-ui/react 8.2.0-dev.582 → 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
|
@@ -13,8 +13,8 @@ let nextId = 0;
|
|
|
13
13
|
const Accordion = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
14
14
|
let {
|
|
15
15
|
children,
|
|
16
|
-
showMore =
|
|
17
|
-
showLess =
|
|
16
|
+
showMore = "Show more",
|
|
17
|
+
showLess = "Show less",
|
|
18
18
|
keepItemsOpen = true,
|
|
19
19
|
className,
|
|
20
20
|
transparent = false,
|
|
@@ -39,8 +39,8 @@ const Accordion = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
39
39
|
value: contextValue,
|
|
40
40
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
41
41
|
ref: ref,
|
|
42
|
-
className: (0, _classnames.default)(
|
|
43
|
-
|
|
42
|
+
className: (0, _classnames.default)("fr-accordion", {
|
|
43
|
+
"fwe-bg-white": !transparent
|
|
44
44
|
}, className),
|
|
45
45
|
...props,
|
|
46
46
|
children: children
|
|
@@ -16,7 +16,7 @@ const AccordionHeader = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
16
16
|
} = _ref;
|
|
17
17
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
18
18
|
ref: ref,
|
|
19
|
-
className: (0, _classnames.default)(
|
|
19
|
+
className: (0, _classnames.default)("fr-accordion-header", className),
|
|
20
20
|
...props,
|
|
21
21
|
children: children
|
|
22
22
|
});
|
|
@@ -56,10 +56,10 @@ const AccordionItem = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
56
56
|
value: contextValue,
|
|
57
57
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
58
58
|
ref: ref,
|
|
59
|
-
className: (0, _classnames.default)(
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
59
|
+
className: (0, _classnames.default)("fr-accordion-item", {
|
|
60
|
+
"fr-accordion-item--collapsed": !expanded,
|
|
61
|
+
"fr-accordion-item--expanded": expanded,
|
|
62
|
+
"fr-accordion-item--highlighted": expanded && highlighted
|
|
63
63
|
}, className),
|
|
64
64
|
...props,
|
|
65
65
|
children: [children, /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
package/node/lib/components/accordion/accordion-item/accordion-item-body/AccordionItemBody.js
CHANGED
|
@@ -24,7 +24,7 @@ const AccordionItemBody = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
24
24
|
const innerRef = (0, _react.useRef)(null);
|
|
25
25
|
const element = innerRef.current;
|
|
26
26
|
const combinedRef = (0, _useForkRef.default)(ref, innerRef);
|
|
27
|
-
const initialHeight = (0, _react.useRef)(expanded ?
|
|
27
|
+
const initialHeight = (0, _react.useRef)(expanded ? "auto" : 0);
|
|
28
28
|
const handleEntering = () => {
|
|
29
29
|
if (element) {
|
|
30
30
|
const itemHeight = element.scrollHeight;
|
|
@@ -33,7 +33,7 @@ const AccordionItemBody = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
33
33
|
};
|
|
34
34
|
const handleEntered = () => {
|
|
35
35
|
if (element) {
|
|
36
|
-
element.style.height =
|
|
36
|
+
element.style.height = "auto";
|
|
37
37
|
}
|
|
38
38
|
};
|
|
39
39
|
const handleExit = () => {
|
|
@@ -45,7 +45,7 @@ const AccordionItemBody = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
45
45
|
const handleExiting = () => {
|
|
46
46
|
setTimeout(() => {
|
|
47
47
|
if (element) {
|
|
48
|
-
element.style.height =
|
|
48
|
+
element.style.height = "0px";
|
|
49
49
|
}
|
|
50
50
|
});
|
|
51
51
|
};
|
|
@@ -62,7 +62,7 @@ const AccordionItemBody = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
62
62
|
role: "region",
|
|
63
63
|
id: `${id}-body`,
|
|
64
64
|
"aria-labelledby": `${id}-header`,
|
|
65
|
-
className: (0, _classnames.default)(
|
|
65
|
+
className: (0, _classnames.default)("fr-accordion-item-body", className),
|
|
66
66
|
style: {
|
|
67
67
|
height: initialHeight.current,
|
|
68
68
|
minHeight: 0
|
package/node/lib/components/accordion/accordion-item/accordion-item-header/AccordionItemHeader.js
CHANGED
|
@@ -20,20 +20,20 @@ const AccordionItemHeader = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
20
20
|
id
|
|
21
21
|
} = (0, _react.useContext)(_AccordionItemContext.default);
|
|
22
22
|
function handleKeyDown(event) {
|
|
23
|
-
if (event.key ===
|
|
23
|
+
if (event.key === "Enter") {
|
|
24
24
|
event.preventDefault();
|
|
25
25
|
toggle?.(event);
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
function handleKeyUp(event) {
|
|
29
|
-
if (event.key ===
|
|
29
|
+
if (event.key === "Enter") {
|
|
30
30
|
event.preventDefault();
|
|
31
31
|
toggle?.(event);
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
35
35
|
ref: ref,
|
|
36
|
-
className: (0, _classnames.default)(
|
|
36
|
+
className: (0, _classnames.default)("fr-accordion-item-header", className),
|
|
37
37
|
role: "button",
|
|
38
38
|
tabIndex: 0,
|
|
39
39
|
id: `${id}-header`,
|
|
@@ -16,7 +16,7 @@ function BottomSheet(_ref) {
|
|
|
16
16
|
children,
|
|
17
17
|
open,
|
|
18
18
|
defaultExpanded,
|
|
19
|
-
expandFrom =
|
|
19
|
+
expandFrom = "center",
|
|
20
20
|
hasBackdrop = true,
|
|
21
21
|
hideCloseIcon,
|
|
22
22
|
onOpenChange
|
|
@@ -61,17 +61,17 @@ function BottomSheet(_ref) {
|
|
|
61
61
|
};
|
|
62
62
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
63
63
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
64
|
-
className: (0, _classnames.default)(
|
|
65
|
-
|
|
64
|
+
className: (0, _classnames.default)("fwe-bottom-sheet-backdrop", {
|
|
65
|
+
"fwe-bottom-sheet-backdrop--visible": hasBackdrop && open && !isClosing
|
|
66
66
|
}),
|
|
67
67
|
onClick: closeBottomSheet
|
|
68
68
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
69
|
-
className: (0, _classnames.default)(
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
69
|
+
className: (0, _classnames.default)("fwe-bottom-sheet-container", {
|
|
70
|
+
"fwe-bottom-sheet-container--open": open,
|
|
71
|
+
"fwe-bottom-sheet-container--expanded": expanded,
|
|
72
|
+
"fwe-bottom-sheet-container--expand-from-center": expandFrom === "center",
|
|
73
|
+
"fwe-bottom-sheet-container--with-backdrop": hasBackdrop,
|
|
74
|
+
"fwe-bottom-sheet-container--closing": isClosing
|
|
75
75
|
}),
|
|
76
76
|
onTouchStart: handleTouchStart,
|
|
77
77
|
onTouchMove: handleTouchMove,
|
|
@@ -10,7 +10,7 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
10
10
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
11
|
const meta = {
|
|
12
12
|
component: _BottomSheet.default,
|
|
13
|
-
title:
|
|
13
|
+
title: "Components/Bottom Sheet",
|
|
14
14
|
decorators: [Story => /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
15
15
|
style: {
|
|
16
16
|
minHeight: 600
|
|
@@ -44,7 +44,7 @@ const WithoutBackdrop = exports.WithoutBackdrop = {
|
|
|
44
44
|
};
|
|
45
45
|
const ExpandFromBottom = exports.ExpandFromBottom = {
|
|
46
46
|
args: {
|
|
47
|
-
expandFrom:
|
|
47
|
+
expandFrom: "bottom"
|
|
48
48
|
},
|
|
49
49
|
render: Default.render
|
|
50
50
|
};
|
|
@@ -25,13 +25,13 @@ function Breadcrumb(_ref) {
|
|
|
25
25
|
...element,
|
|
26
26
|
props: {
|
|
27
27
|
...element.props,
|
|
28
|
-
className:
|
|
28
|
+
className: "fr-breadcrumb-location"
|
|
29
29
|
}
|
|
30
30
|
});
|
|
31
31
|
}
|
|
32
32
|
});
|
|
33
33
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
34
|
-
className: (0, _classnames.default)(
|
|
34
|
+
className: (0, _classnames.default)("fwe-breadcrumb", className),
|
|
35
35
|
children: locations ? locations.map(location => /*#__PURE__*/(0, _jsxRuntime.jsx)(_react.default.Fragment, {
|
|
36
36
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("a", {
|
|
37
37
|
className: "fr-breadcrumb-location",
|
|
@@ -12,7 +12,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
12
12
|
const Button = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
13
13
|
let {
|
|
14
14
|
icon,
|
|
15
|
-
type =
|
|
15
|
+
type = "button",
|
|
16
16
|
disabled = false,
|
|
17
17
|
iconOnly = false,
|
|
18
18
|
large = false,
|
|
@@ -24,18 +24,18 @@ const Button = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
24
24
|
children,
|
|
25
25
|
...props
|
|
26
26
|
} = _ref;
|
|
27
|
-
const classes = (0, _classnames.default)(
|
|
28
|
-
|
|
27
|
+
const classes = (0, _classnames.default)("fwe-btn", "fr-button", {
|
|
28
|
+
"fwe-btn-icon": iconOnly
|
|
29
29
|
}, {
|
|
30
|
-
|
|
30
|
+
"fwe-disabled": disabled
|
|
31
31
|
}, {
|
|
32
|
-
|
|
32
|
+
"fwe-btn-hero": primary && !tertiary
|
|
33
33
|
}, {
|
|
34
|
-
|
|
34
|
+
"fwe-btn-link": tertiary && !primary
|
|
35
35
|
}, {
|
|
36
|
-
|
|
36
|
+
"fwe-btn-lg": large
|
|
37
37
|
}, {
|
|
38
|
-
|
|
38
|
+
"fwe-btn-floating": floating
|
|
39
39
|
}, className);
|
|
40
40
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("button", {
|
|
41
41
|
// ignore here because fallback will explicitly be set to type 'button'
|
|
@@ -10,7 +10,7 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
10
10
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
11
|
const meta = {
|
|
12
12
|
component: _Button.default,
|
|
13
|
-
title:
|
|
13
|
+
title: "Components/Buttons"
|
|
14
14
|
};
|
|
15
15
|
var _default = exports.default = meta;
|
|
16
16
|
const Overview = exports.Overview = {
|
|
@@ -50,36 +50,36 @@ const Overview = exports.Overview = {
|
|
|
50
50
|
const Primary = exports.Primary = {
|
|
51
51
|
args: {
|
|
52
52
|
primary: true,
|
|
53
|
-
children:
|
|
53
|
+
children: "Primary"
|
|
54
54
|
}
|
|
55
55
|
};
|
|
56
56
|
const Secondary = exports.Secondary = {
|
|
57
57
|
args: {
|
|
58
|
-
children:
|
|
58
|
+
children: "Secondary"
|
|
59
59
|
}
|
|
60
60
|
};
|
|
61
61
|
const Tertiary = exports.Tertiary = {
|
|
62
62
|
args: {
|
|
63
63
|
tertiary: true,
|
|
64
|
-
children:
|
|
64
|
+
children: "Tertiary"
|
|
65
65
|
}
|
|
66
66
|
};
|
|
67
67
|
const Sizes = exports.Sizes = {
|
|
68
68
|
args: {
|
|
69
|
-
children:
|
|
69
|
+
children: "Large Button",
|
|
70
70
|
large: true
|
|
71
71
|
}
|
|
72
72
|
};
|
|
73
73
|
const Icon = exports.Icon = {
|
|
74
74
|
args: {
|
|
75
|
-
children:
|
|
76
|
-
icon:
|
|
75
|
+
children: "With Icon",
|
|
76
|
+
icon: "ecommerce-core-range-product"
|
|
77
77
|
}
|
|
78
78
|
};
|
|
79
79
|
const IconOnly = exports.IconOnly = {
|
|
80
80
|
args: {
|
|
81
81
|
iconOnly: true,
|
|
82
|
-
icon:
|
|
82
|
+
icon: "ecommerce-core-range-product"
|
|
83
83
|
}
|
|
84
84
|
};
|
|
85
85
|
const Floating = exports.Floating = {
|
|
@@ -88,6 +88,6 @@ const Floating = exports.Floating = {
|
|
|
88
88
|
large: true,
|
|
89
89
|
primary: true,
|
|
90
90
|
floating: true,
|
|
91
|
-
icon:
|
|
91
|
+
icon: "ecommerce-core-range-product"
|
|
92
92
|
}
|
|
93
93
|
};
|
|
@@ -13,7 +13,7 @@ function Card(_ref) {
|
|
|
13
13
|
className
|
|
14
14
|
} = _ref;
|
|
15
15
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
16
|
-
className: (0, _classnames.default)(
|
|
16
|
+
className: (0, _classnames.default)("fwe-card", className),
|
|
17
17
|
children: children
|
|
18
18
|
});
|
|
19
19
|
}
|
|
@@ -14,7 +14,7 @@ function CardBody(_ref) {
|
|
|
14
14
|
className
|
|
15
15
|
} = _ref;
|
|
16
16
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
17
|
-
className: (0, _classnames.default)(
|
|
17
|
+
className: (0, _classnames.default)("fwe-card-body", className),
|
|
18
18
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
19
19
|
className: "fwe-card-text",
|
|
20
20
|
children: text
|
|
@@ -18,10 +18,10 @@ function CardHeader(_ref) {
|
|
|
18
18
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
19
19
|
children: [image ? /*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
|
|
20
20
|
alt: image.alt,
|
|
21
|
-
className: `fwe-card-img-${image.aspectRatio ===
|
|
21
|
+
className: `fwe-card-img-${image.aspectRatio === "3/2" ? "32" : "169"}`,
|
|
22
22
|
src: image.src
|
|
23
23
|
}) : null, /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
24
|
-
className: (0, _classnames.default)(
|
|
24
|
+
className: (0, _classnames.default)("fwe-card-header", className),
|
|
25
25
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
26
26
|
className: "fwe-card-title",
|
|
27
27
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("h5", {
|
|
@@ -11,7 +11,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
11
11
|
|
|
12
12
|
const cardImage = {
|
|
13
13
|
src: _gallery01Webp.default,
|
|
14
|
-
alt:
|
|
15
|
-
aspectRatio:
|
|
14
|
+
alt: "Asset",
|
|
15
|
+
aspectRatio: "16/9"
|
|
16
16
|
};
|
|
17
17
|
var _default = exports.default = cardImage;
|
|
@@ -26,18 +26,18 @@ function Chip(_ref) {
|
|
|
26
26
|
onClick,
|
|
27
27
|
className
|
|
28
28
|
} = _ref;
|
|
29
|
-
const classes = (0, _classnames.default)(
|
|
30
|
-
|
|
29
|
+
const classes = (0, _classnames.default)("fr-chip", "fwe-chip", {
|
|
30
|
+
"fwe-selected": selected
|
|
31
31
|
}, {
|
|
32
|
-
|
|
32
|
+
"fwe-disabled": disabled
|
|
33
33
|
}, {
|
|
34
|
-
|
|
34
|
+
"fwe-chip-lg": large
|
|
35
35
|
}, {
|
|
36
|
-
|
|
36
|
+
"fwe-category": type === ChipType.Category
|
|
37
37
|
}, {
|
|
38
|
-
|
|
38
|
+
"fwe-filter": type === ChipType.Filter
|
|
39
39
|
}, {
|
|
40
|
-
|
|
40
|
+
"fwe-readonly": type === ChipType.Readonly
|
|
41
41
|
}, className);
|
|
42
42
|
return (
|
|
43
43
|
/*#__PURE__*/
|
|
@@ -13,8 +13,8 @@ function ChipContainer(_ref) {
|
|
|
13
13
|
children,
|
|
14
14
|
className
|
|
15
15
|
} = _ref;
|
|
16
|
-
const classes = (0, _classnames.default)(
|
|
17
|
-
|
|
16
|
+
const classes = (0, _classnames.default)("fwe-chip-container", {
|
|
17
|
+
"fwe-chip-container-lg": large
|
|
18
18
|
}, className);
|
|
19
19
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
20
20
|
className: classes,
|
|
@@ -10,9 +10,9 @@ function IconWrapper(_ref) {
|
|
|
10
10
|
icon
|
|
11
11
|
} = _ref;
|
|
12
12
|
if (!icon) return null;
|
|
13
|
-
if (typeof icon ===
|
|
13
|
+
if (typeof icon === "string") {
|
|
14
14
|
let iconName = icon;
|
|
15
|
-
if (!icon.startsWith(
|
|
15
|
+
if (!icon.startsWith("fwe-icon-")) {
|
|
16
16
|
iconName = `fwe-icon-${icon}`;
|
|
17
17
|
}
|
|
18
18
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
@@ -19,10 +19,10 @@ const LinkButton = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
19
19
|
className,
|
|
20
20
|
...props
|
|
21
21
|
} = _ref;
|
|
22
|
-
const classes = (0, _classnames.default)(
|
|
23
|
-
|
|
22
|
+
const classes = (0, _classnames.default)("fwe-btn", "fwe-btn-link", {
|
|
23
|
+
"fwe-disabled": disabled
|
|
24
24
|
}, {
|
|
25
|
-
|
|
25
|
+
"fwe-btn-icon": iconOnly
|
|
26
26
|
}, className);
|
|
27
27
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("button", {
|
|
28
28
|
onClick: onClick,
|
|
@@ -10,19 +10,19 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
10
10
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
11
|
const LoadingIndicator = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
12
12
|
let {
|
|
13
|
-
size =
|
|
13
|
+
size = "large",
|
|
14
14
|
children,
|
|
15
15
|
className,
|
|
16
16
|
...props
|
|
17
17
|
} = _ref;
|
|
18
|
-
const classes = (0, _classnames.default)(
|
|
19
|
-
|
|
18
|
+
const classes = (0, _classnames.default)("fwe-waiting-indicator", {
|
|
19
|
+
"fwe-waiting-indicator-md": size === "medium"
|
|
20
20
|
}, {
|
|
21
|
-
|
|
21
|
+
"fwe-waiting-indicator-sm": size === "small"
|
|
22
22
|
});
|
|
23
23
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
24
|
-
className: (0, _classnames.default)(
|
|
25
|
-
|
|
24
|
+
className: (0, _classnames.default)("fwe-waiting-container", {
|
|
25
|
+
"fwe-waiting-container-sm": size === "small"
|
|
26
26
|
}, className),
|
|
27
27
|
ref: ref,
|
|
28
28
|
...props,
|
|
@@ -12,7 +12,7 @@ var _useControlled = _interopRequireDefault(require("../../helper/useControlled.
|
|
|
12
12
|
var _MobileFlyoutContext = _interopRequireDefault(require("./MobileFlyoutContext.js"));
|
|
13
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
14
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
|
-
const defaultVisibleValue = [
|
|
15
|
+
const defaultVisibleValue = ["root"];
|
|
16
16
|
const MobileFlyout = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
17
17
|
let {
|
|
18
18
|
className,
|
|
@@ -67,17 +67,17 @@ const MobileFlyout = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
67
67
|
back
|
|
68
68
|
}), [handleVisibleChange, visibleState, back, handleOpenChange]);
|
|
69
69
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
70
|
-
className: (0, _classnames.default)(
|
|
70
|
+
className: (0, _classnames.default)("fwe-mobile-flyout", className),
|
|
71
71
|
...props,
|
|
72
72
|
ref: combinedRef,
|
|
73
73
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
|
|
74
74
|
"aria-label": "menu",
|
|
75
75
|
type: "button",
|
|
76
|
-
className: openState ?
|
|
76
|
+
className: openState ? "fwe-close-button" : "fwe-burger-button",
|
|
77
77
|
onClick: toggle
|
|
78
78
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
79
|
-
className: (0, _classnames.default)(
|
|
80
|
-
|
|
79
|
+
className: (0, _classnames.default)("fwe-mobile-flyout-container", {
|
|
80
|
+
"fwe-opened": openState
|
|
81
81
|
}),
|
|
82
82
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_MobileFlyoutContext.default.Provider, {
|
|
83
83
|
value: contextValue,
|
|
@@ -23,15 +23,15 @@ const MobileFlyoutPage = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
23
23
|
back: backContext
|
|
24
24
|
} = (0, _react.useContext)(_MobileFlyoutContext.default);
|
|
25
25
|
const innerVisible = root || name && visible.includes(name);
|
|
26
|
-
const innerBack = back ?? backContext ??
|
|
26
|
+
const innerBack = back ?? backContext ?? "Back";
|
|
27
27
|
function handleChange() {
|
|
28
28
|
if (name) {
|
|
29
29
|
setVisible(name);
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
33
|
-
className: (0, _classnames.default)(
|
|
34
|
-
|
|
33
|
+
className: (0, _classnames.default)("fwe-mobile-flyout-page", {
|
|
34
|
+
"fwe-opened": innerVisible
|
|
35
35
|
}),
|
|
36
36
|
ref: ref,
|
|
37
37
|
...props,
|
|
@@ -25,10 +25,10 @@ function AlertModal(_ref) {
|
|
|
25
25
|
} = _ref;
|
|
26
26
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Modal.default, {
|
|
27
27
|
className: (0, _classnames.default)({
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
"fwe-modal--with-indicator-bar": strong,
|
|
29
|
+
"fwe-modal--warning": alertType === "warning",
|
|
30
|
+
"fwe-modal--error": alertType === "error",
|
|
31
|
+
"fwe-modal--info": alertType === "info"
|
|
32
32
|
}, className),
|
|
33
33
|
head: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
34
34
|
children: [subtitle && /*#__PURE__*/(0, _jsxRuntime.jsx)("h2", {
|
|
@@ -39,7 +39,7 @@ function AlertModal(_ref) {
|
|
|
39
39
|
children: title
|
|
40
40
|
})]
|
|
41
41
|
}),
|
|
42
|
-
body: typeof body ===
|
|
42
|
+
body: typeof body === "string" ? /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
|
|
43
43
|
children: body
|
|
44
44
|
}) : body,
|
|
45
45
|
...props,
|
|
@@ -47,16 +47,16 @@ function AlertModal(_ref) {
|
|
|
47
47
|
children: [cancel && /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
|
|
48
48
|
type: "button",
|
|
49
49
|
"aria-label": "Cancel",
|
|
50
|
-
className: (0, _classnames.default)(
|
|
51
|
-
|
|
50
|
+
className: (0, _classnames.default)("fwe-btn fwe-btn-lg", {
|
|
51
|
+
"fwe-btn-link": strong
|
|
52
52
|
}),
|
|
53
53
|
onClick: onCancel,
|
|
54
54
|
children: cancel
|
|
55
55
|
}), ok && /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
|
|
56
56
|
type: "button",
|
|
57
57
|
"aria-label": "Ok",
|
|
58
|
-
className: (0, _classnames.default)(
|
|
59
|
-
|
|
58
|
+
className: (0, _classnames.default)("fwe-btn fwe-btn-lg", {
|
|
59
|
+
"fwe-btn-hero": !strong
|
|
60
60
|
}),
|
|
61
61
|
onClick: onOk,
|
|
62
62
|
children: ok
|
|
@@ -24,7 +24,7 @@ function ConfirmModal(_ref) {
|
|
|
24
24
|
} = _ref;
|
|
25
25
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Modal.default, {
|
|
26
26
|
className: (0, _classnames.default)({
|
|
27
|
-
|
|
27
|
+
"fwe-modal--large": large
|
|
28
28
|
}, className),
|
|
29
29
|
head: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
30
30
|
children: [subtitle && /*#__PURE__*/(0, _jsxRuntime.jsx)("h2", {
|
|
@@ -35,7 +35,7 @@ function ConfirmModal(_ref) {
|
|
|
35
35
|
children: title
|
|
36
36
|
})]
|
|
37
37
|
}),
|
|
38
|
-
body: typeof body ===
|
|
38
|
+
body: typeof body === "string" ? /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
|
|
39
39
|
children: body
|
|
40
40
|
}) : body,
|
|
41
41
|
...props,
|
|
@@ -20,7 +20,7 @@ const CustomModal = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
20
20
|
} = _ref;
|
|
21
21
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ModalBase.default, {
|
|
22
22
|
className: (0, _classnames.default)({
|
|
23
|
-
|
|
23
|
+
"fwe-modal--large": large
|
|
24
24
|
}, className),
|
|
25
25
|
ref: ref,
|
|
26
26
|
...props,
|
|
@@ -31,12 +31,12 @@ const ModalBase = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
31
31
|
const container = modalRef?.current?.ownerDocument || document;
|
|
32
32
|
(0, _react.useEffect)(() => {
|
|
33
33
|
const handleKeyDown = event => {
|
|
34
|
-
if (event.key ===
|
|
34
|
+
if (event.key === "Escape" && isOpen) {
|
|
35
35
|
onClose?.();
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
|
-
container.addEventListener(
|
|
39
|
-
return () => container.removeEventListener(
|
|
38
|
+
container.addEventListener("keydown", handleKeyDown);
|
|
39
|
+
return () => container.removeEventListener("keydown", handleKeyDown);
|
|
40
40
|
}, [onClose, isOpen, container]);
|
|
41
41
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
42
42
|
children: /*#__PURE__*/_reactDom.default.createPortal(/*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
@@ -77,7 +77,7 @@ const ModalBase = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
77
77
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactRemoveScroll.RemoveScroll, {
|
|
78
78
|
ref: allRefs,
|
|
79
79
|
enabled: isOpen,
|
|
80
|
-
className: (0, _classnames.default)(
|
|
80
|
+
className: (0, _classnames.default)("fr-modal fwe-modal", className),
|
|
81
81
|
children: children
|
|
82
82
|
})
|
|
83
83
|
})
|
|
@@ -15,9 +15,9 @@ const ModalFooter = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
15
15
|
} = _ref;
|
|
16
16
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
17
17
|
ref: ref,
|
|
18
|
-
className: (0, _classnames.default)(
|
|
18
|
+
className: (0, _classnames.default)("fwe-modal-footer", className),
|
|
19
19
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
20
|
-
className: (0, _classnames.default)(
|
|
20
|
+
className: (0, _classnames.default)("fwe-modal-buttons"),
|
|
21
21
|
children: children
|
|
22
22
|
})
|
|
23
23
|
});
|
|
@@ -7,7 +7,7 @@ exports.default = void 0;
|
|
|
7
7
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
8
8
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
9
|
const getClasses = (thumbnailImages, descriptiveContent, className) => {
|
|
10
|
-
const base =
|
|
10
|
+
const base = "fwe-modal-image-gallery";
|
|
11
11
|
const thumbnail = `${base}--with-thumbnails`;
|
|
12
12
|
const container = `${base}--with-container`;
|
|
13
13
|
return (0, _classnames.default)(base, {
|
|
@@ -17,7 +17,7 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
17
17
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
18
18
|
function getLength(pagination, images) {
|
|
19
19
|
let length = 0;
|
|
20
|
-
if (typeof pagination ===
|
|
20
|
+
if (typeof pagination === "number") {
|
|
21
21
|
length = pagination;
|
|
22
22
|
} else if (pagination === true && images?.length) {
|
|
23
23
|
length = images.length;
|
|
@@ -80,7 +80,7 @@ const ImageGallery = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
80
80
|
children: children
|
|
81
81
|
}), images && descriptiveContent === true ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_ImageGalleryContent.default, {
|
|
82
82
|
imageContent: images?.[currentIndex - 1]?.content
|
|
83
|
-
}) : null, typeof descriptiveContent ===
|
|
83
|
+
}) : null, typeof descriptiveContent === "function" ? descriptiveContent?.(currentIndex - 1) : null]
|
|
84
84
|
})]
|
|
85
85
|
})
|
|
86
86
|
});
|