@festo-ui/react 9.0.1 → 10.0.0-dev.826
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/components/accordion/Accordion.d.ts +3 -3
- package/dist/components/accordion/Accordion.js +2 -1
- package/dist/components/accordion/accordion-header/AccordionHeader.js +1 -0
- package/dist/components/accordion/accordion-item/AccordionItem.d.ts +1 -1
- package/dist/components/accordion/accordion-item/AccordionItem.js +2 -1
- package/dist/components/accordion/accordion-item/accordion-item-body/AccordionItemBody.js +1 -0
- package/dist/components/accordion/accordion-item/accordion-item-header/AccordionItemHeader.js +1 -0
- package/dist/components/bottom-sheet/BottomSheet.d.ts +2 -3
- package/dist/components/bottom-sheet/BottomSheet.js +7 -4
- package/dist/components/breadcrumb/Breadcrumb.d.ts +9 -9
- package/dist/components/breadcrumb/Breadcrumb.js +86 -26
- package/dist/components/button/Button.js +1 -0
- package/dist/components/card/Card.d.ts +3 -4
- package/dist/components/card/Card.js +6 -4
- package/dist/components/card/CardBody.d.ts +3 -3
- package/dist/components/card/CardBody.js +6 -4
- package/dist/components/card/CardHeader.d.ts +3 -3
- package/dist/components/card/CardHeader.js +6 -4
- package/dist/components/card/CardNotification.d.ts +2 -3
- package/dist/components/card/CardNotification.js +6 -2
- package/dist/components/chips/chip/Chip.d.ts +4 -5
- package/dist/components/chips/chip/Chip.js +11 -4
- package/dist/components/chips/chip-container/ChipContainer.d.ts +3 -3
- package/dist/components/chips/chip-container/ChipContainer.js +6 -2
- package/dist/components/icon-wrapper/IconWrapper.d.ts +2 -1
- package/dist/components/loading-indicator/LoadingIndicator.d.ts +2 -2
- package/dist/components/loading-indicator/LoadingIndicator.js +1 -0
- package/dist/components/mobile-flyout/MobileFlyout.js +1 -0
- package/dist/components/mobile-flyout/mobile-flyout-item/MobileFlyoutItem.d.ts +1 -0
- package/dist/components/mobile-flyout/mobile-flyout-item/MobileFlyoutItem.js +3 -2
- package/dist/components/mobile-flyout/mobile-flyout-page/MobileFlyoutPage.js +4 -3
- package/dist/components/modals/AlertModal.d.ts +1 -1
- package/dist/components/modals/AlertModal.js +5 -4
- package/dist/components/modals/ConfirmModal.d.ts +1 -1
- package/dist/components/modals/ConfirmModal.js +5 -4
- package/dist/components/modals/CustomModal.js +1 -0
- package/dist/components/modals/Modal.js +1 -0
- package/dist/components/modals/ModalBase.js +1 -0
- package/dist/components/modals/ModalFooter.d.ts +2 -2
- package/dist/components/modals/ModalFooter.js +3 -1
- package/dist/components/modals/Prompt.d.ts +3 -3
- package/dist/components/modals/Prompt.js +9 -6
- package/dist/components/modals/image-gallery/ImageGallery.css +24 -6
- package/dist/components/modals/image-gallery/ImageGallery.d.ts +1 -1
- package/dist/components/modals/image-gallery/ImageGallery.js +1 -0
- package/dist/components/modals/image-gallery/ImageGallerySwiper.js +1 -1
- package/dist/components/modals/image-gallery/internal/ImageGalleryContainer.d.ts +1 -1
- package/dist/components/pagination/Pagination.d.ts +3 -4
- package/dist/components/pagination/Pagination.js +17 -13
- package/dist/components/popovers/legend/Legend.d.ts +6 -4
- package/dist/components/popovers/legend/Legend.js +8 -4
- package/dist/components/popovers/popover/Popover.css +5 -52
- package/dist/components/popovers/popover/Popover.d.ts +12 -14
- package/dist/components/popovers/popover/Popover.js +82 -91
- package/dist/components/popovers/popover-menu/PopoverMenu.d.ts +6 -4
- package/dist/components/popovers/popover-menu/PopoverMenu.js +23 -27
- package/dist/components/popovers/popover-menu/PopoverMenuContext.d.ts +2 -1
- package/dist/components/popovers/popover-menu/PopoverMenuContext.js +1 -1
- package/dist/components/popovers/popover-menu/popover-menu-item/PopoverMenuItem.d.ts +8 -0
- package/dist/components/popovers/popover-menu/popover-menu-item/PopoverMenuItem.js +31 -0
- package/dist/components/popovers/tooltip/Tooltip.d.ts +4 -3
- package/dist/components/popovers/tooltip/Tooltip.js +7 -6
- package/dist/components/progress/Progress.d.ts +2 -3
- package/dist/components/progress/Progress.js +6 -2
- package/dist/components/search-input/ClearButton.d.ts +1 -2
- package/dist/components/search-input/ClearButton.js +5 -4
- package/dist/components/search-input/SearchInput.d.ts +3 -4
- package/dist/components/search-input/SearchInput.js +9 -5
- package/dist/components/snackbar/Snackbar.d.ts +4 -4
- package/dist/components/snackbar/Snackbar.js +11 -7
- package/dist/components/snackbar/SnackbarProvider.d.ts +3 -3
- package/dist/components/snackbar/SnackbarProvider.js +7 -4
- package/dist/components/stepper-horizontal/StepperHorizontal.d.ts +2 -2
- package/dist/components/stepper-horizontal/StepperHorizontal.js +4 -3
- package/dist/components/stepper-horizontal/step-horizontal/StepHorizontal.js +2 -1
- package/dist/components/stepper-vertical/StepperVertical.js +1 -1
- package/dist/components/stepper-vertical/step-vertical/StepVertical.js +1 -0
- package/dist/components/tab/Tabs.js +3 -3
- package/dist/components/tab/tab-pane/TabPane.d.ts +3 -4
- package/dist/components/tab/tab-pane/TabPane.js +6 -2
- package/dist/components/table-header-cell/TableHeaderCell.d.ts +2 -1
- package/dist/components/table-header-cell/TableHeaderCell.js +1 -0
- package/dist/forms/checkbox/Checkbox.d.ts +3 -6
- package/dist/forms/checkbox/Checkbox.js +5 -2
- package/dist/forms/combobox/ComboBox.css +124 -0
- package/dist/forms/combobox/ComboBox.d.ts +27 -0
- package/dist/forms/combobox/ComboBox.js +174 -0
- package/dist/forms/multi-select/MultiSelect.css +13 -0
- package/dist/forms/multi-select/MultiSelect.d.ts +20 -0
- package/dist/forms/multi-select/MultiSelect.js +192 -0
- package/dist/forms/radio/RadioButton.d.ts +4 -4
- package/dist/forms/radio/RadioButton.js +11 -10
- package/dist/forms/radio/RadioGroup.d.ts +4 -4
- package/dist/forms/radio/RadioGroup.js +1 -0
- package/dist/forms/segment/Segment.d.ts +4 -5
- package/dist/forms/segment/Segment.js +10 -9
- package/dist/forms/segment/segment-control/SegmentControl.d.ts +4 -8
- package/dist/forms/segment/segment-control/SegmentControl.js +8 -6
- package/dist/forms/select/Select.d.ts +16 -17
- package/dist/forms/select/Select.js +80 -82
- package/dist/forms/select/internal/SelectButton.d.ts +0 -12
- package/dist/forms/select/internal/SelectButton.js +0 -49
- package/dist/forms/select/internal/SelectButtonContent.d.ts +0 -7
- package/dist/forms/select/internal/SelectButtonContent.js +0 -31
- package/dist/forms/select/internal/SelectOptionsContainer.d.ts +0 -17
- package/dist/forms/select/internal/SelectOptionsContainer.js +0 -103
- package/dist/forms/slider/Slider.d.ts +4 -7
- package/dist/forms/slider/Slider.js +11 -6
- package/dist/forms/switch/Switch.d.ts +4 -6
- package/dist/forms/switch/Switch.js +12 -6
- package/dist/forms/text-area/TextArea.d.ts +6 -15
- package/dist/forms/text-area/TextArea.js +42 -25
- package/dist/forms/text-input/TextInput.css +31 -0
- package/dist/forms/text-input/TextInput.d.ts +6 -17
- package/dist/forms/text-input/TextInput.js +16 -25
- package/dist/forms/time-picker/TimePicker.d.ts +7 -6
- package/dist/forms/time-picker/TimePicker.js +16 -31
- package/dist/forms/time-picker/time-picker-dropdown/TimePickerDropdown.js +1 -0
- package/dist/forms/time-picker/time-picker-dropdown/TimePickerInput.js +1 -0
- package/dist/index.d.ts +7 -5
- package/dist/index.js +4 -3
- package/dist/utils/types.d.ts +0 -6
- package/dist/utils/useControlled.js +4 -4
- package/dist/utils/useForkRef.d.ts +2 -2
- package/dist/utils/useForkRef.js +2 -2
- package/dist/utils/useOnClickOutside.d.ts +1 -1
- package/package.json +17 -28
- package/dist/components/popovers/popover-menu-item/PopoverMenuItem.d.ts +0 -9
- package/dist/components/popovers/popover-menu-item/PopoverMenuItem.js +0 -29
- package/dist/forms/select/Select.css +0 -160
- package/dist/forms/select/internal/HiddenInput.d.ts +0 -8
- package/dist/forms/select/internal/HiddenInput.js +0 -15
- package/dist/forms/select/internal/ListItem.d.ts +0 -18
- package/dist/forms/select/internal/ListItem.js +0 -69
- package/dist/forms/select/internal/SelectCheckbox.d.ts +0 -4
- package/dist/forms/select/internal/SelectCheckbox.js +0 -13
- package/dist/forms/select/internal/SelectLabel.d.ts +0 -7
- package/dist/forms/select/internal/SelectLabel.js +0 -12
- package/dist/forms/select/internal/SelectScrollContainer.d.ts +0 -8
- package/dist/forms/select/internal/SelectScrollContainer.js +0 -15
- package/dist/forms/select/internal/SelectWrapper.d.ts +0 -6
- package/dist/forms/select/internal/SelectWrapper.js +0 -12
- package/dist/forms/select/internal/index.d.ts +0 -6
- package/dist/forms/select/internal/index.js +0 -7
- package/dist/forms/select/internal/utils.d.ts +0 -7
- package/dist/forms/select/internal/utils.js +0 -30
- package/dist/forms/select/select-option/SelectOption.d.ts +0 -14
- package/dist/forms/select/select-option/SelectOption.js +0 -12
- package/dist/forms/select/utils.d.ts +0 -2
- package/dist/forms/select/utils.js +0 -12
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import classnames from "classnames";
|
|
3
|
+
import { forwardRef } from "react";
|
|
3
4
|
import { Modal } from "./Modal.js";
|
|
4
5
|
import { ModalFooter } from "./ModalFooter.js";
|
|
5
|
-
|
|
6
|
-
return /*#__PURE__*/ jsx(Modal, {
|
|
6
|
+
const AlertModal = /*#__PURE__*/ forwardRef(({ title, subtitle, alertType, strong, cancel, ok, onCancel, onOk, className, body, ...props }, ref)=>/*#__PURE__*/ jsx(Modal, {
|
|
7
7
|
className: classnames({
|
|
8
8
|
'fwe-modal--with-indicator-bar': strong,
|
|
9
9
|
'fwe-modal--warning': 'warning' === alertType,
|
|
@@ -25,6 +25,7 @@ function AlertModal({ title, subtitle, alertType, strong, cancel, ok, onCancel,
|
|
|
25
25
|
body: 'string' == typeof body ? /*#__PURE__*/ jsx("p", {
|
|
26
26
|
children: body
|
|
27
27
|
}) : body,
|
|
28
|
+
ref: ref,
|
|
28
29
|
...props,
|
|
29
30
|
children: (cancel || ok) && /*#__PURE__*/ jsxs(ModalFooter, {
|
|
30
31
|
children: [
|
|
@@ -48,6 +49,6 @@ function AlertModal({ title, subtitle, alertType, strong, cancel, ok, onCancel,
|
|
|
48
49
|
})
|
|
49
50
|
]
|
|
50
51
|
})
|
|
51
|
-
});
|
|
52
|
-
|
|
52
|
+
}));
|
|
53
|
+
AlertModal.displayName = 'AlertModal';
|
|
53
54
|
export { AlertModal };
|
|
@@ -8,4 +8,4 @@ export interface ConfirmModalProps extends Omit<ModalProps, 'head' | 'children'>
|
|
|
8
8
|
readonly onOk?: () => void;
|
|
9
9
|
readonly large?: boolean;
|
|
10
10
|
}
|
|
11
|
-
export declare
|
|
11
|
+
export declare const ConfirmModal: (props: ConfirmModalProps & import("react").RefAttributes<HTMLDivElement>) => React.ReactElement | null;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import classnames from "classnames";
|
|
3
|
+
import { forwardRef } from "react";
|
|
3
4
|
import { Modal } from "./Modal.js";
|
|
4
5
|
import { ModalFooter } from "./ModalFooter.js";
|
|
5
|
-
|
|
6
|
-
return /*#__PURE__*/ jsx(Modal, {
|
|
6
|
+
const ConfirmModal = /*#__PURE__*/ forwardRef(({ title, subtitle, cancel, ok, onCancel, onOk, large, body, className, ...props }, ref)=>/*#__PURE__*/ jsx(Modal, {
|
|
7
7
|
className: classnames({
|
|
8
8
|
'fwe-modal--large': large
|
|
9
9
|
}, className),
|
|
@@ -22,6 +22,7 @@ function ConfirmModal({ title, subtitle, cancel, ok, onCancel, onOk, large, body
|
|
|
22
22
|
body: 'string' == typeof body ? /*#__PURE__*/ jsx("p", {
|
|
23
23
|
children: body
|
|
24
24
|
}) : body,
|
|
25
|
+
ref: ref,
|
|
25
26
|
...props,
|
|
26
27
|
children: (cancel || ok) && /*#__PURE__*/ jsxs(ModalFooter, {
|
|
27
28
|
children: [
|
|
@@ -41,6 +42,6 @@ function ConfirmModal({ title, subtitle, cancel, ok, onCancel, onOk, large, body
|
|
|
41
42
|
})
|
|
42
43
|
]
|
|
43
44
|
})
|
|
44
|
-
});
|
|
45
|
-
|
|
45
|
+
}));
|
|
46
|
+
ConfirmModal.displayName = 'ConfirmModal';
|
|
46
47
|
export { ConfirmModal };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type
|
|
2
|
-
export declare const ModalFooter: (props:
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
export declare const ModalFooter: (props: Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>) => React.ReactElement | null;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import classnames from "classnames";
|
|
3
3
|
import { forwardRef } from "react";
|
|
4
|
-
const ModalFooter = /*#__PURE__*/ forwardRef(({ children, className }, ref)=>/*#__PURE__*/ jsx("div", {
|
|
4
|
+
const ModalFooter = /*#__PURE__*/ forwardRef(({ children, className, ...props }, ref)=>/*#__PURE__*/ jsx("div", {
|
|
5
5
|
ref: ref,
|
|
6
6
|
className: classnames('fwe-modal-footer', className),
|
|
7
|
+
...props,
|
|
7
8
|
children: /*#__PURE__*/ jsx("div", {
|
|
8
9
|
className: classnames('fwe-modal-buttons'),
|
|
9
10
|
children: children
|
|
10
11
|
})
|
|
11
12
|
}));
|
|
13
|
+
ModalFooter.displayName = 'ModalFooter';
|
|
12
14
|
export { ModalFooter };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import { type ModalProps } from './Modal';
|
|
3
|
-
export interface PromptProps extends Omit<ModalProps, 'head' | 'body' | 'children'> {
|
|
3
|
+
export interface PromptProps extends Omit<ModalProps, 'head' | 'body' | 'children' | 'onChange'> {
|
|
4
4
|
readonly title: string;
|
|
5
5
|
readonly subtitle?: string;
|
|
6
6
|
readonly hint?: string;
|
|
7
7
|
readonly label?: string;
|
|
8
8
|
readonly value?: string;
|
|
9
|
-
readonly onChange:
|
|
9
|
+
readonly onChange?: (value: string, event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
10
10
|
readonly cancel?: string;
|
|
11
11
|
readonly ok?: string;
|
|
12
12
|
readonly onCancel?: () => void;
|
|
13
13
|
readonly onOk: (value: string | undefined) => void;
|
|
14
14
|
}
|
|
15
|
-
export declare
|
|
15
|
+
export declare const Prompt: (props: PromptProps & React.RefAttributes<HTMLDivElement>) => React.ReactElement | null;
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useEffect, useState } from "react";
|
|
2
|
+
import { forwardRef, useEffect, useState } from "react";
|
|
3
3
|
import { TextInput } from "../../forms/text-input/TextInput.js";
|
|
4
4
|
import { Modal } from "./Modal.js";
|
|
5
5
|
import { ModalFooter } from "./ModalFooter.js";
|
|
6
|
-
|
|
6
|
+
const Prompt = /*#__PURE__*/ forwardRef(({ title, subtitle, hint, label, value, onChange, onOk, onCancel, cancel, ok, className, ...props }, ref)=>{
|
|
7
7
|
const [innerValue, setInnerValue] = useState(value);
|
|
8
8
|
useEffect(()=>{
|
|
9
9
|
setInnerValue(value);
|
|
10
10
|
}, [
|
|
11
11
|
value
|
|
12
12
|
]);
|
|
13
|
-
function handleChange(e) {
|
|
14
|
-
setInnerValue(
|
|
15
|
-
if (onChange) onChange(e);
|
|
13
|
+
function handleChange(newValue, e) {
|
|
14
|
+
setInnerValue(newValue);
|
|
15
|
+
if (onChange) onChange(newValue, e);
|
|
16
16
|
}
|
|
17
17
|
return /*#__PURE__*/ jsx(Modal, {
|
|
18
|
+
className: className,
|
|
18
19
|
head: /*#__PURE__*/ jsxs(Fragment, {
|
|
19
20
|
children: [
|
|
20
21
|
subtitle && /*#__PURE__*/ jsx("h2", {
|
|
@@ -34,6 +35,7 @@ function Prompt({ title, subtitle, hint, label, value, onChange, onOk, onCancel,
|
|
|
34
35
|
value: innerValue,
|
|
35
36
|
autoFocus: true
|
|
36
37
|
}),
|
|
38
|
+
ref: ref,
|
|
37
39
|
...props,
|
|
38
40
|
children: (cancel || ok) && /*#__PURE__*/ jsxs(ModalFooter, {
|
|
39
41
|
children: [
|
|
@@ -54,5 +56,6 @@ function Prompt({ title, subtitle, hint, label, value, onChange, onOk, onCancel,
|
|
|
54
56
|
]
|
|
55
57
|
})
|
|
56
58
|
});
|
|
57
|
-
}
|
|
59
|
+
});
|
|
60
|
+
Prompt.displayName = 'Prompt';
|
|
58
61
|
export { Prompt };
|
|
@@ -110,12 +110,30 @@
|
|
|
110
110
|
& > .swiper-wrapper {
|
|
111
111
|
scroll-snap-type: x mandatory;
|
|
112
112
|
}
|
|
113
|
+
|
|
114
|
+
& > .swiper-wrapper > .swiper-slide:first-child {
|
|
115
|
+
margin-inline-start: var(--swiper-slides-offset-before);
|
|
116
|
+
scroll-margin-inline-start: var(--swiper-slides-offset-before);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
& > .swiper-wrapper > .swiper-slide:last-child {
|
|
120
|
+
margin-inline-end: var(--swiper-slides-offset-after);
|
|
121
|
+
}
|
|
113
122
|
}
|
|
114
123
|
|
|
115
124
|
&.swiper-vertical {
|
|
116
125
|
& > .swiper-wrapper {
|
|
117
126
|
scroll-snap-type: y mandatory;
|
|
118
127
|
}
|
|
128
|
+
|
|
129
|
+
& > .swiper-wrapper > .swiper-slide:first-child {
|
|
130
|
+
margin-block-start: var(--swiper-slides-offset-before);
|
|
131
|
+
scroll-margin-block-start: var(--swiper-slides-offset-before);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
& > .swiper-wrapper > .swiper-slide:last-child {
|
|
135
|
+
margin-block-end: var(--swiper-slides-offset-after);
|
|
136
|
+
}
|
|
119
137
|
}
|
|
120
138
|
|
|
121
139
|
&.swiper-free-mode {
|
|
@@ -298,7 +316,7 @@
|
|
|
298
316
|
display: none !important;
|
|
299
317
|
}
|
|
300
318
|
|
|
301
|
-
& svg {
|
|
319
|
+
& ::slotted(svg), & svg {
|
|
302
320
|
object-fit: contain;
|
|
303
321
|
transform-origin: center;
|
|
304
322
|
fill: currentColor;
|
|
@@ -321,7 +339,7 @@
|
|
|
321
339
|
left: var(--swiper-navigation-sides-offset, 4px);
|
|
322
340
|
right: auto;
|
|
323
341
|
|
|
324
|
-
& .swiper-navigation-icon {
|
|
342
|
+
& ::slotted(.swiper-navigation-icon), & .swiper-navigation-icon {
|
|
325
343
|
transform: rotate(180deg);
|
|
326
344
|
}
|
|
327
345
|
}
|
|
@@ -349,13 +367,13 @@
|
|
|
349
367
|
}
|
|
350
368
|
|
|
351
369
|
& .swiper-button-prev, & ~ .swiper-button-prev, &.swiper-rtl .swiper-button-next, &.swiper-rtl ~ .swiper-button-next {
|
|
352
|
-
& .swiper-navigation-icon {
|
|
370
|
+
& ::slotted(.swiper-navigation-icon), & .swiper-navigation-icon {
|
|
353
371
|
transform: rotate(180deg);
|
|
354
372
|
}
|
|
355
373
|
}
|
|
356
374
|
|
|
357
375
|
&.swiper-rtl .swiper-button-prev, &.swiper-rtl ~ .swiper-button-prev {
|
|
358
|
-
& .swiper-navigation-icon {
|
|
376
|
+
& ::slotted(.swiper-navigation-icon), & .swiper-navigation-icon {
|
|
359
377
|
transform: rotate(0);
|
|
360
378
|
}
|
|
361
379
|
}
|
|
@@ -373,7 +391,7 @@
|
|
|
373
391
|
top: var(--swiper-navigation-sides-offset, 4px);
|
|
374
392
|
bottom: auto;
|
|
375
393
|
|
|
376
|
-
& .swiper-navigation-icon {
|
|
394
|
+
& ::slotted(.swiper-navigation-icon), & .swiper-navigation-icon {
|
|
377
395
|
transform: rotate(-90deg);
|
|
378
396
|
}
|
|
379
397
|
}
|
|
@@ -382,7 +400,7 @@
|
|
|
382
400
|
bottom: var(--swiper-navigation-sides-offset, 4px);
|
|
383
401
|
top: auto;
|
|
384
402
|
|
|
385
|
-
& .swiper-navigation-icon {
|
|
403
|
+
& ::slotted(.swiper-navigation-icon), & .swiper-navigation-icon {
|
|
386
404
|
transform: rotate(90deg);
|
|
387
405
|
}
|
|
388
406
|
}
|
|
@@ -18,4 +18,4 @@ export interface ImageGalleryProps extends ComponentPropsWithoutRef<'div'>, Moda
|
|
|
18
18
|
descriptiveContent?: boolean | ((index: number) => React.ReactNode);
|
|
19
19
|
onSlideChanged?: (index: number) => void;
|
|
20
20
|
}
|
|
21
|
-
export declare const ImageGallery: (props: ImageGalleryProps & import("react").RefAttributes<
|
|
21
|
+
export declare const ImageGallery: (props: ImageGalleryProps & import("react").RefAttributes<HTMLDivElement>) => React.ReactElement | null;
|
|
@@ -2,4 +2,4 @@ export interface ImageGalleryContainerProps {
|
|
|
2
2
|
children: React.ReactNode;
|
|
3
3
|
descriptiveContent?: boolean;
|
|
4
4
|
}
|
|
5
|
-
export declare function ImageGalleryContainer({ children, descriptiveContent, }: ImageGalleryContainerProps): string | number | boolean | Iterable<import("react").ReactNode> | import("react/jsx-runtime").JSX.Element | null | undefined;
|
|
5
|
+
export declare function ImageGalleryContainer({ children, descriptiveContent, }: ImageGalleryContainerProps): string | number | bigint | boolean | Iterable<import("react").ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null | undefined;
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import './Pagination.scss';
|
|
2
|
-
import type { ClassNameProps } from '../../utils/types';
|
|
3
2
|
export declare enum PaginationType {
|
|
4
3
|
Simple = "SIMPLE",
|
|
5
4
|
Numeric = "NUMERIC",
|
|
6
5
|
Dots = "DOTS"
|
|
7
6
|
}
|
|
8
|
-
export interface PaginationProps extends
|
|
7
|
+
export interface PaginationProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'onChange'> {
|
|
9
8
|
readonly type?: PaginationType;
|
|
10
|
-
readonly onChange?: (page: number) => void;
|
|
9
|
+
readonly onChange?: (page: number, event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
11
10
|
readonly pageCurrent?: number;
|
|
12
11
|
readonly defaultPageCurrent?: number;
|
|
13
12
|
readonly pageMax: number;
|
|
14
13
|
}
|
|
15
|
-
export declare
|
|
14
|
+
export declare const Pagination: (props: PaginationProps & import("react").RefAttributes<HTMLDivElement>) => React.ReactElement | null;
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import "./Pagination.css";
|
|
3
3
|
import classnames from "classnames";
|
|
4
|
-
import { useEffect, useState } from "react";
|
|
4
|
+
import { forwardRef, useEffect, useState } from "react";
|
|
5
5
|
var Pagination_PaginationType = /*#__PURE__*/ function(PaginationType) {
|
|
6
6
|
PaginationType["Simple"] = "SIMPLE";
|
|
7
7
|
PaginationType["Numeric"] = "NUMERIC";
|
|
8
8
|
PaginationType["Dots"] = "DOTS";
|
|
9
9
|
return PaginationType;
|
|
10
10
|
}({});
|
|
11
|
-
|
|
12
|
-
const { pageMax, onChange, pageCurrent, defaultPageCurrent = 1, type = "NUMERIC", className } = props;
|
|
11
|
+
const Pagination = /*#__PURE__*/ forwardRef(({ pageMax, onChange, pageCurrent, defaultPageCurrent = 1, type = "NUMERIC", className, ...props }, ref)=>{
|
|
13
12
|
const controlled = void 0 !== pageCurrent;
|
|
14
13
|
const dotArray = Array.from(new Array(pageMax).keys());
|
|
15
14
|
const [innerPageCurrent, setInnerPageCurrent] = useState(controlled ? pageCurrent : defaultPageCurrent);
|
|
@@ -19,32 +18,34 @@ function Pagination(props) {
|
|
|
19
18
|
pageCurrent,
|
|
20
19
|
controlled
|
|
21
20
|
]);
|
|
22
|
-
function handleChange(newPage) {
|
|
21
|
+
function handleChange(newPage, event) {
|
|
23
22
|
if (!controlled) setInnerPageCurrent(newPage);
|
|
24
|
-
if (onChange) onChange(newPage);
|
|
23
|
+
if (onChange) onChange(newPage, event);
|
|
25
24
|
}
|
|
26
|
-
function onBtnDown() {
|
|
25
|
+
function onBtnDown(event) {
|
|
27
26
|
if (innerPageCurrent > 1) {
|
|
28
27
|
const newPageCurrent = innerPageCurrent - 1;
|
|
29
|
-
handleChange(newPageCurrent);
|
|
28
|
+
handleChange(newPageCurrent, event);
|
|
30
29
|
}
|
|
31
30
|
}
|
|
32
|
-
function onBtnUp() {
|
|
31
|
+
function onBtnUp(event) {
|
|
33
32
|
if (innerPageCurrent < pageMax) {
|
|
34
33
|
const newPageCurrent = innerPageCurrent + 1;
|
|
35
|
-
handleChange(newPageCurrent);
|
|
34
|
+
handleChange(newPageCurrent, event);
|
|
36
35
|
}
|
|
37
36
|
}
|
|
38
|
-
function onDotClick(index) {
|
|
37
|
+
function onDotClick(index, event) {
|
|
39
38
|
const newPageCurrent = index + 1;
|
|
40
|
-
handleChange(newPageCurrent);
|
|
39
|
+
handleChange(newPageCurrent, event);
|
|
41
40
|
}
|
|
42
41
|
return /*#__PURE__*/ jsxs(Fragment, {
|
|
43
42
|
children: [
|
|
44
43
|
"DOTS" !== type && /*#__PURE__*/ jsxs("div", {
|
|
44
|
+
...props,
|
|
45
45
|
className: classnames('fwe-pagination', {
|
|
46
46
|
'fwe-d-none': pageMax < 2
|
|
47
47
|
}, className),
|
|
48
|
+
ref: ref,
|
|
48
49
|
children: [
|
|
49
50
|
/*#__PURE__*/ jsx("button", {
|
|
50
51
|
className: classnames('fwe-navigate-btn-down', {
|
|
@@ -78,9 +79,11 @@ function Pagination(props) {
|
|
|
78
79
|
]
|
|
79
80
|
}),
|
|
80
81
|
"DOTS" === type && /*#__PURE__*/ jsx("div", {
|
|
82
|
+
...props,
|
|
81
83
|
className: classnames({
|
|
82
84
|
'fwe-d-none': pageMax < 2
|
|
83
85
|
}, className),
|
|
86
|
+
ref: ref,
|
|
84
87
|
children: /*#__PURE__*/ jsx("div", {
|
|
85
88
|
className: "fwe-pagination",
|
|
86
89
|
children: dotArray.map((index)=>/*#__PURE__*/ jsx("button", {
|
|
@@ -88,7 +91,7 @@ function Pagination(props) {
|
|
|
88
91
|
className: classnames('fwe-page-dot', {
|
|
89
92
|
'fwe-selected': index + 1 === innerPageCurrent
|
|
90
93
|
}),
|
|
91
|
-
onClick: ()=>onDotClick(index),
|
|
94
|
+
onClick: (e)=>onDotClick(index, e),
|
|
92
95
|
"aria-label": `Go to page ${index + 1}`,
|
|
93
96
|
"aria-current": index + 1 === innerPageCurrent ? 'page' : void 0
|
|
94
97
|
}, index))
|
|
@@ -96,5 +99,6 @@ function Pagination(props) {
|
|
|
96
99
|
})
|
|
97
100
|
]
|
|
98
101
|
});
|
|
99
|
-
}
|
|
102
|
+
});
|
|
103
|
+
Pagination.displayName = 'Pagination';
|
|
100
104
|
export { Pagination, Pagination_PaginationType as PaginationType };
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { type PopoverProps } from '../popover/Popover';
|
|
2
|
-
export interface
|
|
2
|
+
export interface LegendItem {
|
|
3
3
|
readonly name: string;
|
|
4
4
|
readonly text: string;
|
|
5
5
|
}
|
|
6
|
-
export interface LegendProps extends Omit<PopoverProps, '
|
|
7
|
-
readonly items:
|
|
6
|
+
export interface LegendProps extends Omit<PopoverProps, 'content'> {
|
|
7
|
+
readonly items: LegendItem[];
|
|
8
8
|
}
|
|
9
|
-
export declare
|
|
9
|
+
export declare const Legend: (props: LegendProps & {
|
|
10
|
+
children?: import("react").ReactNode | undefined;
|
|
11
|
+
} & import("react").RefAttributes<HTMLDivElement>) => React.ReactElement | null;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import classnames from "classnames";
|
|
3
|
+
import { forwardRef } from "react";
|
|
2
4
|
import { Popover } from "../popover/Popover.js";
|
|
3
|
-
|
|
5
|
+
const Legend = /*#__PURE__*/ forwardRef(({ items, containerClassName, ...props }, ref)=>{
|
|
4
6
|
const content = items.map((item)=>/*#__PURE__*/ jsxs("dl", {
|
|
5
7
|
className: "fwe-popover-legend-content",
|
|
6
8
|
children: [
|
|
@@ -13,9 +15,11 @@ function Legend({ items, ...props }) {
|
|
|
13
15
|
]
|
|
14
16
|
}, item.name));
|
|
15
17
|
return /*#__PURE__*/ jsx(Popover, {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
+
content: content,
|
|
19
|
+
containerClassName: classnames('fwe-popover--legend', containerClassName),
|
|
20
|
+
ref: ref,
|
|
18
21
|
...props
|
|
19
22
|
});
|
|
20
|
-
}
|
|
23
|
+
});
|
|
24
|
+
Legend.displayName = 'Legend';
|
|
21
25
|
export { Legend };
|
|
@@ -1,56 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
position: absolute;
|
|
5
|
-
transform: rotate(45deg);
|
|
1
|
+
.fwe-popover-container {
|
|
2
|
+
z-index: var(--fwe-z-index-popover);
|
|
3
|
+
filter: drop-shadow(0 1px 3px #3336);
|
|
6
4
|
}
|
|
7
5
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
height: 17px;
|
|
11
|
-
overflow: hidden;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
#arrow:after {
|
|
15
|
-
content: "";
|
|
16
|
-
z-index: -1;
|
|
17
|
-
background: #fff;
|
|
18
|
-
box-shadow: 0 1px 4px #3333;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.fwe-popover-container[data-popper-placement^="top"] > #arrow {
|
|
22
|
-
top: 100%;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.fwe-popover-container[data-popper-placement^="top"] > #arrow:after {
|
|
26
|
-
top: -6px;
|
|
27
|
-
left: 3px;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.fwe-popover-container[data-popper-placement^="bottom"] > #arrow {
|
|
31
|
-
top: -17px;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.fwe-popover-container[data-popper-placement^="bottom"] > #arrow:after {
|
|
35
|
-
top: 11px;
|
|
36
|
-
left: 3px;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.fwe-popover-container[data-popper-placement^="left"] > #arrow {
|
|
40
|
-
left: 100%;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.fwe-popover-container[data-popper-placement^="left"] > #arrow:after {
|
|
44
|
-
top: 2px;
|
|
45
|
-
left: -6px;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.fwe-popover-container[data-popper-placement^="right"] > #arrow {
|
|
49
|
-
left: -17px;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.fwe-popover-container[data-popper-placement^="right"] > #arrow:after {
|
|
53
|
-
top: 2px;
|
|
54
|
-
left: 11px;
|
|
6
|
+
.fwe-popover-container .fwe-popover {
|
|
7
|
+
box-shadow: none;
|
|
55
8
|
}
|
|
56
9
|
|
|
@@ -1,21 +1,19 @@
|
|
|
1
1
|
import './Popover.scss';
|
|
2
|
-
import type
|
|
3
|
-
import type
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
readonly
|
|
2
|
+
import { type Placement } from '@floating-ui/react';
|
|
3
|
+
import { type MouseEvent, type ReactNode } from 'react';
|
|
4
|
+
export interface PopoverProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'content' | 'onChange'> {
|
|
5
|
+
readonly 'data-testid'?: string;
|
|
6
|
+
readonly containerClassName?: string;
|
|
7
|
+
readonly content: ReactNode;
|
|
7
8
|
readonly position?: Placement;
|
|
8
9
|
readonly fallbackPositions?: Placement[];
|
|
10
|
+
readonly isOpen?: boolean;
|
|
9
11
|
readonly openOnHover?: boolean;
|
|
10
|
-
readonly
|
|
11
|
-
readonly
|
|
12
|
-
readonly onStatusChange?: (status: boolean) => void;
|
|
13
|
-
readonly wrapper?: (children: React.ReactNode) => React.ReactNode;
|
|
12
|
+
readonly openByDefault?: boolean;
|
|
13
|
+
readonly onChange?: (isOpen: boolean) => void;
|
|
14
14
|
readonly flip?: boolean;
|
|
15
|
-
readonly
|
|
16
|
-
readonly
|
|
15
|
+
readonly showArrow?: boolean;
|
|
16
|
+
readonly onTriggerClick?: (event: MouseEvent) => void;
|
|
17
17
|
readonly stopPropagation?: boolean;
|
|
18
|
-
readonly arrow?: boolean;
|
|
19
|
-
readonly onClick?: (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
|
|
20
18
|
}
|
|
21
|
-
export declare
|
|
19
|
+
export declare const Popover: (props: PopoverProps & import("react").RefAttributes<HTMLDivElement>) => React.ReactElement | null;
|