@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
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import classNames from
|
|
2
|
-
import { forwardRef } from
|
|
1
|
+
import classNames from "classnames";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
3
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
4
|
const TableHeaderCell = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
5
5
|
let {
|
|
@@ -15,12 +15,12 @@ const TableHeaderCell = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
15
15
|
}
|
|
16
16
|
return /*#__PURE__*/_jsx("th", {
|
|
17
17
|
...props,
|
|
18
|
-
className: classNames(
|
|
19
|
-
|
|
18
|
+
className: classNames("fwe-table-order", {
|
|
19
|
+
"fwe-active": active
|
|
20
20
|
}, {
|
|
21
|
-
|
|
21
|
+
"fwe-table-order-ascending": active && ascending
|
|
22
22
|
}, {
|
|
23
|
-
|
|
23
|
+
"fwe-table-order-descending": active && !ascending
|
|
24
24
|
}, className),
|
|
25
25
|
onClick: handleClick,
|
|
26
26
|
ref: ref
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import React from
|
|
3
|
-
export interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>,
|
|
1
|
+
import "./Checkbox.scss";
|
|
2
|
+
import React from "react";
|
|
3
|
+
export interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange"> {
|
|
4
4
|
id?: string;
|
|
5
5
|
checked?: boolean;
|
|
6
6
|
defaultChecked?: boolean;
|
|
@@ -8,7 +8,7 @@ export interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputE
|
|
|
8
8
|
name?: string;
|
|
9
9
|
large?: boolean;
|
|
10
10
|
valid?: boolean;
|
|
11
|
-
labelPosition?:
|
|
11
|
+
labelPosition?: "before" | "after" | "below";
|
|
12
12
|
required?: boolean;
|
|
13
13
|
disabled?: boolean;
|
|
14
14
|
indeterminate?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import classNames from
|
|
2
|
-
import React from
|
|
1
|
+
import classNames from "classnames";
|
|
2
|
+
import React from "react";
|
|
3
3
|
import useControlled from "../../helper/useControlled.js";
|
|
4
4
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
5
|
function Checkbox(_ref) {
|
|
@@ -11,7 +11,7 @@ function Checkbox(_ref) {
|
|
|
11
11
|
name,
|
|
12
12
|
large = false,
|
|
13
13
|
valid = true,
|
|
14
|
-
labelPosition =
|
|
14
|
+
labelPosition = "after",
|
|
15
15
|
required,
|
|
16
16
|
disabled = false,
|
|
17
17
|
indeterminate = false,
|
|
@@ -28,20 +28,20 @@ function Checkbox(_ref) {
|
|
|
28
28
|
setChecked(newChecked);
|
|
29
29
|
onChange?.(newChecked, e);
|
|
30
30
|
};
|
|
31
|
-
const containerClasses = classNames(
|
|
32
|
-
|
|
31
|
+
const containerClasses = classNames("fwe-checkbox-container", {
|
|
32
|
+
"fr-checkbox-large": large
|
|
33
33
|
}, {
|
|
34
|
-
|
|
34
|
+
"fr-checkbox-invalid": !valid || required
|
|
35
35
|
}, {
|
|
36
|
-
|
|
36
|
+
"fwe-disabled": disabled
|
|
37
37
|
}, {
|
|
38
|
-
|
|
38
|
+
"fwe-checked": isChecked
|
|
39
39
|
}, {
|
|
40
|
-
|
|
40
|
+
"fwe-label-below": labelPosition === "below"
|
|
41
41
|
}, {
|
|
42
|
-
|
|
42
|
+
"fwe-label-before": labelPosition === "before"
|
|
43
43
|
}, {
|
|
44
|
-
|
|
44
|
+
"fr-checkbox-indeterminate": indeterminate
|
|
45
45
|
}, className);
|
|
46
46
|
return /*#__PURE__*/_jsxs("label", {
|
|
47
47
|
className: containerClasses,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ClassNamePropsWithChildren } from
|
|
2
|
-
import
|
|
1
|
+
import { ClassNamePropsWithChildren } from "../../helper/types";
|
|
2
|
+
import "./ColorIndicator.scss";
|
|
3
3
|
interface ColorIndicatorProps extends ClassNamePropsWithChildren {
|
|
4
4
|
text: string;
|
|
5
5
|
label: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React, { useState } from
|
|
2
|
-
import classNames from
|
|
1
|
+
import React, { useState } from "react";
|
|
2
|
+
import classNames from "classnames";
|
|
3
3
|
import Popover from "../../components/popovers/popover/Popover.js";
|
|
4
4
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
5
5
|
function ColorIndicator(_ref) {
|
|
@@ -12,11 +12,11 @@ function ColorIndicator(_ref) {
|
|
|
12
12
|
children,
|
|
13
13
|
disabled
|
|
14
14
|
} = _ref;
|
|
15
|
-
const classes = classNames(
|
|
15
|
+
const classes = classNames("fwe-color-indicator", className, disabled);
|
|
16
16
|
const [isEditorOpen, setEditorOpen] = useState(false);
|
|
17
17
|
function getBorderColor() {
|
|
18
|
-
if (!color || color.toUpperCase() ===
|
|
19
|
-
return
|
|
18
|
+
if (!color || color.toUpperCase() === "#FFFFFF" || color.toUpperCase() === "#F0F2F3") {
|
|
19
|
+
return "#b6bec6"; // = $control-border
|
|
20
20
|
}
|
|
21
21
|
return color;
|
|
22
22
|
}
|
|
@@ -99,7 +99,7 @@ function ColorIndicator(_ref) {
|
|
|
99
99
|
children: [wrapperChildren, " ", text && /*#__PURE__*/_jsx("div", {
|
|
100
100
|
className: "fwe-color-indicator-text",
|
|
101
101
|
children: text
|
|
102
|
-
}),
|
|
102
|
+
}), " "]
|
|
103
103
|
})]
|
|
104
104
|
});
|
|
105
105
|
return showPopOver ? /*#__PURE__*/_jsx(Popover, {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export default abstract class ColorHelper {
|
|
2
|
-
static rgbToHsv(rgb: Record<
|
|
3
|
-
static hsvToRgb(_hsv: Record<
|
|
2
|
+
static rgbToHsv(rgb: Record<"r" | "g" | "b", number>): Record<"h" | "s" | "v", number> | undefined;
|
|
3
|
+
static hsvToRgb(_hsv: Record<"h" | "s" | "v", number>): Record<"r" | "g" | "b", number>;
|
|
4
4
|
private static limitToByte;
|
|
5
5
|
private static limitToOne;
|
|
6
6
|
private static numberToHex;
|
|
7
|
-
static rgbToHex(_rgb: Record<
|
|
8
|
-
static hexToRgb(hexString: string): Record<
|
|
7
|
+
static rgbToHex(_rgb: Record<"r" | "g" | "b", number>): string;
|
|
8
|
+
static hexToRgb(hexString: string): Record<"r" | "g" | "b", number> | undefined;
|
|
9
9
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ClassNamePropsWithChildren } from
|
|
1
|
+
import { ClassNamePropsWithChildren } from "../../helper/types";
|
|
2
2
|
export interface RadioProps extends ClassNamePropsWithChildren {
|
|
3
3
|
id?: string;
|
|
4
4
|
defaultChecked?: boolean;
|
|
@@ -6,7 +6,7 @@ export interface RadioProps extends ClassNamePropsWithChildren {
|
|
|
6
6
|
onChange?: (value: string) => void;
|
|
7
7
|
name?: string;
|
|
8
8
|
value?: string;
|
|
9
|
-
labelPosition?:
|
|
9
|
+
labelPosition?: "before" | "after" | "below";
|
|
10
10
|
large?: boolean;
|
|
11
11
|
disabled?: boolean;
|
|
12
12
|
required?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useContext } from
|
|
2
|
-
import classNames from
|
|
1
|
+
import { useContext } from "react";
|
|
2
|
+
import classNames from "classnames";
|
|
3
3
|
import RadioGroupContext from "./RadioGroupContext.js";
|
|
4
4
|
import useId from "../../helper/useId.js";
|
|
5
5
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -11,7 +11,7 @@ function Radio(props) {
|
|
|
11
11
|
name,
|
|
12
12
|
defaultChecked: defaultCheckedProp,
|
|
13
13
|
checked,
|
|
14
|
-
labelPosition =
|
|
14
|
+
labelPosition = "after",
|
|
15
15
|
large = false,
|
|
16
16
|
disabled = false,
|
|
17
17
|
required = false,
|
|
@@ -29,12 +29,12 @@ function Radio(props) {
|
|
|
29
29
|
isControlled
|
|
30
30
|
} = useContext(RadioGroupContext);
|
|
31
31
|
const innerLabelPosition = groupLabelPosition ?? labelPosition;
|
|
32
|
-
const classes = classNames(
|
|
33
|
-
|
|
32
|
+
const classes = classNames("fwe-radio", {
|
|
33
|
+
"fwe-radio-label-below": innerLabelPosition === "below"
|
|
34
34
|
}, {
|
|
35
|
-
|
|
35
|
+
"fwe-radio-label-before": innerLabelPosition === "before"
|
|
36
36
|
}, {
|
|
37
|
-
|
|
37
|
+
"fwe-radio-lg": large || groupLarge
|
|
38
38
|
}, className);
|
|
39
39
|
const controlledChecked = checked !== undefined || isControlled && groupValue !== undefined ? Boolean(checked || groupValue === value) : undefined;
|
|
40
40
|
const getDefaultChecked = () => {
|
|
@@ -75,7 +75,7 @@ function Radio(props) {
|
|
|
75
75
|
required: required || groupRequired
|
|
76
76
|
}), /*#__PURE__*/_jsx("div", {
|
|
77
77
|
className: "fwe-radio-checkmark"
|
|
78
|
-
}),
|
|
78
|
+
}), " "]
|
|
79
79
|
}), /*#__PURE__*/_jsx("div", {
|
|
80
80
|
className: "fwe-radio-label-content",
|
|
81
81
|
children: children
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ComponentPropsWithoutRef } from
|
|
2
|
-
export interface RadioGroupProps extends ComponentPropsWithoutRef<
|
|
1
|
+
import { ComponentPropsWithoutRef } from "react";
|
|
2
|
+
export interface RadioGroupProps extends ComponentPropsWithoutRef<"div"> {
|
|
3
3
|
name?: string;
|
|
4
4
|
defaultValue?: string;
|
|
5
5
|
onValueChange?: (value: string) => void;
|
|
6
6
|
value?: string;
|
|
7
|
-
labelPosition?:
|
|
7
|
+
labelPosition?: "before" | "after" | "below";
|
|
8
8
|
large?: boolean;
|
|
9
9
|
disabled?: boolean;
|
|
10
10
|
required?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import classNames from
|
|
2
|
-
import { forwardRef, useCallback, useMemo } from
|
|
1
|
+
import classNames from "classnames";
|
|
2
|
+
import { forwardRef, useCallback, useMemo } from "react";
|
|
3
3
|
import useControlled from "../../helper/useControlled.js";
|
|
4
4
|
import useId from "../../helper/useId.js";
|
|
5
5
|
import RadioGroupContext from "./RadioGroupContext.js";
|
|
@@ -41,7 +41,7 @@ const RadioGroup = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
41
41
|
value: contextValue,
|
|
42
42
|
children: /*#__PURE__*/_jsx("div", {
|
|
43
43
|
ref: ref,
|
|
44
|
-
className: classNames(
|
|
44
|
+
className: classNames("fwe-radio-group", className),
|
|
45
45
|
role: "radiogroup",
|
|
46
46
|
...props,
|
|
47
47
|
children: children
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { ClassNamePropsWithChildren } from
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ClassNamePropsWithChildren } from "../../helper/types";
|
|
3
3
|
export interface SegmentComponentConfiguration {
|
|
4
4
|
outline?: boolean;
|
|
5
5
|
iconOnly?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import classNames from
|
|
2
|
-
import React from
|
|
1
|
+
import classNames from "classnames";
|
|
2
|
+
import React from "react";
|
|
3
3
|
import useControlled from "../../helper/useControlled.js";
|
|
4
4
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
5
|
const defaultConfig = {
|
|
@@ -21,7 +21,7 @@ function Segment(props) {
|
|
|
21
21
|
};
|
|
22
22
|
let useIcon = false;
|
|
23
23
|
let useIconAndText = false;
|
|
24
|
-
let tmpValue =
|
|
24
|
+
let tmpValue = "";
|
|
25
25
|
React.Children.forEach(children, (child, index) => {
|
|
26
26
|
if (! /*#__PURE__*/React.isValidElement(child)) {
|
|
27
27
|
return null;
|
|
@@ -49,10 +49,10 @@ function Segment(props) {
|
|
|
49
49
|
setValue(_value);
|
|
50
50
|
};
|
|
51
51
|
return /*#__PURE__*/_jsxs("fieldset", {
|
|
52
|
-
className: classNames(
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
52
|
+
className: classNames("fwe-segment", {
|
|
53
|
+
"fwe-segment-outline": innerConfig.outline,
|
|
54
|
+
"fwe-segment-icon": useIcon,
|
|
55
|
+
"fwe-segment-icon-text": useIconAndText
|
|
56
56
|
}, className),
|
|
57
57
|
children: [/*#__PURE__*/_jsx("legend", {
|
|
58
58
|
className: "fwe-sr-only fwe-d-inline-block",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { ClassNameProps } from
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ClassNameProps } from "../../../helper/types";
|
|
3
3
|
export interface SegmentControlProps extends ClassNameProps {
|
|
4
4
|
label: string;
|
|
5
5
|
name: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React, { useRef } from
|
|
2
|
-
import classNames from
|
|
1
|
+
import React, { useRef } from "react";
|
|
2
|
+
import classNames from "classnames";
|
|
3
3
|
import IconWrapper from "../../../components/icon-wrapper/IconWrapper.js";
|
|
4
4
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
5
|
function SegmentControl(props) {
|
|
@@ -15,10 +15,10 @@ function SegmentControl(props) {
|
|
|
15
15
|
className,
|
|
16
16
|
iconOnly
|
|
17
17
|
} = props;
|
|
18
|
-
const componentId = useRef(id ?? (Math.random() * Date.now()).toString().replace(
|
|
19
|
-
let viewMode =
|
|
18
|
+
const componentId = useRef(id ?? (Math.random() * Date.now()).toString().replace(".", "-"));
|
|
19
|
+
let viewMode = "text";
|
|
20
20
|
if (icon) {
|
|
21
|
-
viewMode = iconOnly ?
|
|
21
|
+
viewMode = iconOnly ? "icon" : "icon-text";
|
|
22
22
|
}
|
|
23
23
|
const handleChange = event => {
|
|
24
24
|
if (onChange) {
|
|
@@ -36,16 +36,16 @@ function SegmentControl(props) {
|
|
|
36
36
|
disabled: disabled,
|
|
37
37
|
onChange: e => handleChange(e)
|
|
38
38
|
}), /*#__PURE__*/_jsxs("label", {
|
|
39
|
-
className: classNames(
|
|
39
|
+
className: classNames("fwe-segment-label", className),
|
|
40
40
|
htmlFor: componentId.current,
|
|
41
|
-
children: [viewMode ===
|
|
41
|
+
children: [viewMode === "icon" && /*#__PURE__*/_jsxs(_Fragment, {
|
|
42
42
|
children: [/*#__PURE__*/_jsx("span", {
|
|
43
43
|
className: "fwe-sr-only",
|
|
44
44
|
children: label
|
|
45
45
|
}), /*#__PURE__*/_jsx(IconWrapper, {
|
|
46
46
|
icon: icon
|
|
47
47
|
})]
|
|
48
|
-
}), viewMode ===
|
|
48
|
+
}), viewMode === "text" && label, viewMode === "icon-text" && /*#__PURE__*/_jsxs(_Fragment, {
|
|
49
49
|
children: [/*#__PURE__*/_jsx(IconWrapper, {
|
|
50
50
|
icon: icon
|
|
51
51
|
}), /*#__PURE__*/_jsx("span", {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { ComponentPropsWithoutRef, Ref } from
|
|
3
|
-
import { SelectOptionType } from
|
|
4
|
-
import { SelectConfiguration } from
|
|
5
|
-
export interface SelectProps<T> extends Omit<ComponentPropsWithoutRef<
|
|
1
|
+
import "./Select.scss";
|
|
2
|
+
import { ComponentPropsWithoutRef, Ref } from "react";
|
|
3
|
+
import { SelectOptionType } from "./select-option/SelectOption";
|
|
4
|
+
import { SelectConfiguration } from "../../helper/types";
|
|
5
|
+
export interface SelectProps<T> extends Omit<ComponentPropsWithoutRef<"div">, "onChange" | "defaultValue"> {
|
|
6
6
|
defaultValue?: T;
|
|
7
7
|
defaultOpen?: boolean;
|
|
8
8
|
open?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { forwardRef, useRef } from
|
|
2
|
-
import ReactDOM from
|
|
1
|
+
import { forwardRef, useRef } from "react";
|
|
2
|
+
import ReactDOM from "react-dom";
|
|
3
3
|
import useControlled from "../../helper/useControlled.js";
|
|
4
4
|
import { Wrapper, HiddenInput, SelectButton, OptionsContainer, SelectLabel } from "./internal/index.js";
|
|
5
5
|
import useForkRef from "../../helper/useForkRef.js";
|
|
@@ -7,7 +7,7 @@ import getChildren from "./internal/utils.js";
|
|
|
7
7
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
8
|
function SelectComponent(_ref, ref) {
|
|
9
9
|
let {
|
|
10
|
-
defaultValue =
|
|
10
|
+
defaultValue = "",
|
|
11
11
|
open,
|
|
12
12
|
defaultOpen = false,
|
|
13
13
|
value: controlled,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React, { Ref, RefObject } from
|
|
2
|
-
import { SelectOptionProps, SelectOptionType } from
|
|
3
|
-
export interface ListItemProps<T> extends React.ComponentPropsWithoutRef<
|
|
1
|
+
import React, { Ref, RefObject } from "react";
|
|
2
|
+
import { SelectOptionProps, SelectOptionType } from "../select-option/SelectOption";
|
|
3
|
+
export interface ListItemProps<T> extends React.ComponentPropsWithoutRef<"li"> {
|
|
4
4
|
empty?: boolean;
|
|
5
5
|
item: SelectOptionType<T> | React.ReactElement<SelectOptionProps<T>>;
|
|
6
6
|
options: SelectOptionType<T>[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React, { forwardRef } from
|
|
2
|
-
import classNames from
|
|
1
|
+
import React, { forwardRef } from "react";
|
|
2
|
+
import classNames from "classnames";
|
|
3
3
|
import SelectCheckbox from "./SelectCheckbox.js";
|
|
4
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
5
|
function ListItemComponent(_ref, ref) {
|
|
@@ -25,25 +25,25 @@ function ListItemComponent(_ref, ref) {
|
|
|
25
25
|
} : {};
|
|
26
26
|
const checked = Array.isArray(selectedLabel) ? selectedLabel.includes(option.label) : selectedLabel === option.label;
|
|
27
27
|
function handleKeyDown(e) {
|
|
28
|
-
const arrowKeys = [
|
|
29
|
-
const validKeys = [
|
|
28
|
+
const arrowKeys = ["ArrowDown", "ArrowUp"];
|
|
29
|
+
const validKeys = ["Enter", " "];
|
|
30
30
|
if (arrowKeys.concat(validKeys).includes(e.key)) {
|
|
31
31
|
e.preventDefault();
|
|
32
32
|
}
|
|
33
|
-
if (e.key ===
|
|
33
|
+
if (e.key === "ArrowDown") {
|
|
34
34
|
onFocusChange((index + 1) % options.length);
|
|
35
35
|
}
|
|
36
|
-
if (e.key ===
|
|
36
|
+
if (e.key === "ArrowUp") {
|
|
37
37
|
const nextIndex = (index - 1 + options.length) % options.length;
|
|
38
38
|
onFocusChange(nextIndex);
|
|
39
39
|
}
|
|
40
|
-
if ([
|
|
40
|
+
if (["Enter", " "].includes(e.key)) {
|
|
41
41
|
if (option.disabled) {
|
|
42
42
|
return;
|
|
43
43
|
}
|
|
44
44
|
onOptionChange(option);
|
|
45
45
|
}
|
|
46
|
-
if (e.key ===
|
|
46
|
+
if (e.key === "Escape") {
|
|
47
47
|
onClose();
|
|
48
48
|
}
|
|
49
49
|
}
|
|
@@ -53,15 +53,15 @@ function ListItemComponent(_ref, ref) {
|
|
|
53
53
|
}
|
|
54
54
|
onOptionChange(option);
|
|
55
55
|
}
|
|
56
|
-
const itemRef = typeof ref !==
|
|
56
|
+
const itemRef = typeof ref !== "function" ? ref?.current?.[index] : undefined;
|
|
57
57
|
return /*#__PURE__*/_jsx("li", {
|
|
58
58
|
onClick: handleClick,
|
|
59
59
|
ref: itemRef,
|
|
60
60
|
role: "option",
|
|
61
61
|
onKeyDown: handleKeyDown,
|
|
62
62
|
"aria-selected": checked,
|
|
63
|
-
className: classNames(
|
|
64
|
-
|
|
63
|
+
className: classNames("fwe-select-option", {
|
|
64
|
+
"fwe-empty": !option.label
|
|
65
65
|
}, className),
|
|
66
66
|
tabIndex: 0,
|
|
67
67
|
...restProps,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import cn from
|
|
2
|
-
import { forwardRef } from
|
|
1
|
+
import cn from "classnames";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
3
|
import SelectButtonContent from "./SelectButtonContent.js";
|
|
4
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
5
|
const SelectButton = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
@@ -18,7 +18,7 @@ const SelectButton = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
18
18
|
if (disabled) {
|
|
19
19
|
return;
|
|
20
20
|
}
|
|
21
|
-
const validKeys = [
|
|
21
|
+
const validKeys = ["Enter", " ", "ArrowUp", "ArrowDown"];
|
|
22
22
|
if (validKeys.includes(e.key)) {
|
|
23
23
|
e.preventDefault();
|
|
24
24
|
onToggle();
|
|
@@ -34,12 +34,12 @@ const SelectButton = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
34
34
|
return /*#__PURE__*/_jsx("div", {
|
|
35
35
|
role: "button",
|
|
36
36
|
tabIndex: 0,
|
|
37
|
-
className: cn(
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
37
|
+
className: cn("fwe-select", {
|
|
38
|
+
"fwe-focus": focused,
|
|
39
|
+
"fwe-empty": empty,
|
|
40
|
+
"fwe-required": required,
|
|
41
|
+
"fwe-disabled": disabled,
|
|
42
|
+
"fwe-invalid": error
|
|
43
43
|
}),
|
|
44
44
|
onClick: handleClick,
|
|
45
45
|
ref: ref,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CheckboxProps } from
|
|
1
|
+
import { CheckboxProps } from "../../checkbox/Checkbox";
|
|
2
2
|
export default function SelectCheckbox({ children, withCheckbox, ...props }: CheckboxProps & {
|
|
3
3
|
withCheckbox?: boolean;
|
|
4
4
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -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 SelectLabel(_ref) {
|
|
4
4
|
let {
|
|
@@ -7,10 +7,10 @@ export default function SelectLabel(_ref) {
|
|
|
7
7
|
id
|
|
8
8
|
} = _ref;
|
|
9
9
|
return /*#__PURE__*/_jsx("label", {
|
|
10
|
-
className: cn(
|
|
11
|
-
|
|
10
|
+
className: cn("fwe-select-label", {
|
|
11
|
+
"fwe-sr-only": hideLabel
|
|
12
12
|
}),
|
|
13
13
|
htmlFor: id,
|
|
14
|
-
children: label ||
|
|
14
|
+
children: label || ""
|
|
15
15
|
});
|
|
16
16
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ComponentPropsWithoutRef } from
|
|
2
|
-
interface SelectWrapperProps extends ComponentPropsWithoutRef<
|
|
1
|
+
import { ComponentPropsWithoutRef } from "react";
|
|
2
|
+
interface SelectWrapperProps extends ComponentPropsWithoutRef<"div"> {
|
|
3
3
|
disabled?: boolean;
|
|
4
4
|
}
|
|
5
5
|
declare const SelectWrapper: (props: SelectWrapperProps & import("react").RefAttributes<HTMLDivElement>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import cn from
|
|
2
|
-
import { forwardRef } from
|
|
1
|
+
import cn from "classnames";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
3
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
4
|
const SelectWrapper = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
5
5
|
let {
|
|
@@ -11,8 +11,8 @@ const SelectWrapper = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
11
11
|
return /*#__PURE__*/_jsx("div", {
|
|
12
12
|
...props,
|
|
13
13
|
ref: ref,
|
|
14
|
-
className: cn(
|
|
15
|
-
|
|
14
|
+
className: cn("fwe-select-wrapper", {
|
|
15
|
+
"fwe-disabled": disabled
|
|
16
16
|
}, className),
|
|
17
17
|
children: children
|
|
18
18
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { default as HiddenInput } from
|
|
2
|
-
export { default as ListItem } from
|
|
3
|
-
export { default as SelectButton } from
|
|
4
|
-
export { default as OptionsContainer } from
|
|
5
|
-
export { default as Wrapper } from
|
|
6
|
-
export { default as SelectLabel } from
|
|
1
|
+
export { default as HiddenInput } from "./HiddenInput";
|
|
2
|
+
export { default as ListItem } from "./ListItem";
|
|
3
|
+
export { default as SelectButton } from "./SelectButton";
|
|
4
|
+
export { default as OptionsContainer } from "./SelectOptionsContainer";
|
|
5
|
+
export { default as Wrapper } from "./SelectWrapper";
|
|
6
|
+
export { default as SelectLabel } from "./SelectLabel";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { SelectOptionProps } from
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { SelectOptionProps } from "../select-option/SelectOption";
|
|
3
3
|
export default function getChildren<T>(children: React.ReactNode): {
|
|
4
4
|
childrenList: React.ReactElement<SelectOptionProps<T>, string | React.JSXElementConstructor<any>>[];
|
|
5
5
|
after: React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import cn from
|
|
1
|
+
import React from "react";
|
|
2
|
+
import cn from "classnames";
|
|
3
3
|
import SelectOption from "../select-option/SelectOption.js";
|
|
4
4
|
export default function getChildren(children) {
|
|
5
5
|
const before = [];
|
|
@@ -10,7 +10,7 @@ export default function getChildren(children) {
|
|
|
10
10
|
if (/*#__PURE__*/React.isValidElement(element)) {
|
|
11
11
|
if (/*#__PURE__*/React.isValidElement(element) && element.type === SelectOption) {
|
|
12
12
|
foundFirstOption = true;
|
|
13
|
-
const className = cn(
|
|
13
|
+
const className = cn("fwe-select-option-content", element.props.className);
|
|
14
14
|
const {
|
|
15
15
|
props
|
|
16
16
|
} = element;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import React, { Ref } from
|
|
1
|
+
import React, { Ref } from "react";
|
|
2
2
|
export interface SelectOptionType<T> {
|
|
3
3
|
label: string;
|
|
4
4
|
data: T;
|
|
5
5
|
disabled?: boolean;
|
|
6
6
|
}
|
|
7
|
-
export interface SelectOptionProps<T> extends React.ComponentPropsWithoutRef<
|
|
7
|
+
export interface SelectOptionProps<T> extends React.ComponentPropsWithoutRef<"span"> {
|
|
8
8
|
option: SelectOptionType<T>;
|
|
9
9
|
}
|
|
10
10
|
declare function SelectOptionComponent<T>({ children, className, ...props }: SelectOptionProps<T>, ref: Ref<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|