@festo-ui/react 9.0.0-dev.715 → 9.0.0-dev.717
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/package.json +2 -3
- package/dist/components/accordion/Accordion.css +0 -4
- package/dist/components/accordion/Accordion.d.ts +0 -10
- package/dist/components/accordion/Accordion.js +0 -41
- package/dist/components/accordion/AccordionContext.d.ts +0 -11
- package/dist/components/accordion/AccordionContext.js +0 -3
- package/dist/components/accordion/accordion-header/AccordionHeader.css +0 -11
- package/dist/components/accordion/accordion-header/AccordionHeader.d.ts +0 -2
- package/dist/components/accordion/accordion-header/AccordionHeader.js +0 -11
- package/dist/components/accordion/accordion-item/AccordionItem.css +0 -64
- package/dist/components/accordion/accordion-item/AccordionItem.d.ts +0 -8
- package/dist/components/accordion/accordion-item/AccordionItem.js +0 -60
- package/dist/components/accordion/accordion-item/AccordionItemContext.d.ts +0 -7
- package/dist/components/accordion/accordion-item/AccordionItemContext.js +0 -3
- package/dist/components/accordion/accordion-item/accordion-item-body/AccordionItemBody.css +0 -76
- package/dist/components/accordion/accordion-item/accordion-item-body/AccordionItemBody.d.ts +0 -2
- package/dist/components/accordion/accordion-item/accordion-item-body/AccordionItemBody.js +0 -61
- package/dist/components/accordion/accordion-item/accordion-item-header/AccordionItemHeader.css +0 -11
- package/dist/components/accordion/accordion-item/accordion-item-header/AccordionItemHeader.d.ts +0 -2
- package/dist/components/accordion/accordion-item/accordion-item-header/AccordionItemHeader.js +0 -20
- package/dist/components/bottom-sheet/BottomSheet.css +0 -18
- package/dist/components/bottom-sheet/BottomSheet.d.ts +0 -12
- package/dist/components/bottom-sheet/BottomSheet.js +0 -101
- package/dist/components/breadcrumb/Breadcrumb.d.ts +0 -13
- package/dist/components/breadcrumb/Breadcrumb.js +0 -32
- package/dist/components/button/Button.d.ts +0 -11
- package/dist/components/button/Button.js +0 -36
- package/dist/components/card/Card.d.ts +0 -4
- package/dist/components/card/Card.js +0 -9
- package/dist/components/card/CardBody.d.ts +0 -5
- package/dist/components/card/CardBody.js +0 -15
- package/dist/components/card/CardHeader.d.ts +0 -8
- package/dist/components/card/CardHeader.js +0 -31
- package/dist/components/card/CardHeader.stories.helper.js +0 -7
- package/dist/components/card/CardNotification.d.ts +0 -6
- package/dist/components/card/CardNotification.js +0 -26
- package/dist/components/chips/chip/Chip.d.ts +0 -17
- package/dist/components/chips/chip/Chip.js +0 -38
- package/dist/components/chips/chip-container/ChipContainer.d.ts +0 -5
- package/dist/components/chips/chip-container/ChipContainer.js +0 -12
- package/dist/components/icon-wrapper/IconWrapper.d.ts +0 -3
- package/dist/components/icon-wrapper/IconWrapper.js +0 -13
- package/dist/components/link-button/LinkButton.d.ts +0 -8
- package/dist/components/link-button/LinkButton.js +0 -26
- package/dist/components/loading-indicator/LoadingIndicator.d.ts +0 -5
- package/dist/components/loading-indicator/LoadingIndicator.js +0 -41
- package/dist/components/mobile-flyout/MobileFlyout.d.ts +0 -11
- package/dist/components/mobile-flyout/MobileFlyout.js +0 -88
- package/dist/components/mobile-flyout/MobileFlyoutContext.d.ts +0 -8
- package/dist/components/mobile-flyout/MobileFlyoutContext.js +0 -3
- package/dist/components/mobile-flyout/mobile-flyout-item/MobileFlyoutItem.d.ts +0 -17
- package/dist/components/mobile-flyout/mobile-flyout-item/MobileFlyoutItem.js +0 -36
- package/dist/components/mobile-flyout/mobile-flyout-page/MobileFlyoutPage.css +0 -5
- package/dist/components/mobile-flyout/mobile-flyout-page/MobileFlyoutPage.d.ts +0 -8
- package/dist/components/mobile-flyout/mobile-flyout-page/MobileFlyoutPage.js +0 -35
- package/dist/components/modals/AlertModal.d.ts +0 -12
- package/dist/components/modals/AlertModal.js +0 -53
- package/dist/components/modals/ConfirmModal.d.ts +0 -11
- package/dist/components/modals/ConfirmModal.js +0 -46
- package/dist/components/modals/CustomModal.d.ts +0 -8
- package/dist/components/modals/CustomModal.js +0 -38
- package/dist/components/modals/Modal.css +0 -39
- package/dist/components/modals/Modal.d.ts +0 -8
- package/dist/components/modals/Modal.js +0 -31
- package/dist/components/modals/ModalBase.d.ts +0 -9
- package/dist/components/modals/ModalBase.js +0 -124
- package/dist/components/modals/ModalFooter.d.ts +0 -2
- package/dist/components/modals/ModalFooter.js +0 -12
- package/dist/components/modals/Prompt.d.ts +0 -15
- package/dist/components/modals/Prompt.js +0 -58
- package/dist/components/modals/image-gallery/ImageGallery.css +0 -790
- package/dist/components/modals/image-gallery/ImageGallery.d.ts +0 -18
- package/dist/components/modals/image-gallery/ImageGallery.helper.d.ts +0 -2
- package/dist/components/modals/image-gallery/ImageGallery.helper.js +0 -13
- package/dist/components/modals/image-gallery/ImageGallery.js +0 -75
- package/dist/components/modals/image-gallery/ImageGallery.stories.helper.js +0 -112
- package/dist/components/modals/image-gallery/ImageGalleryContent.d.ts +0 -9
- package/dist/components/modals/image-gallery/ImageGalleryContent.js +0 -15
- package/dist/components/modals/image-gallery/ImageGalleryContext.d.ts +0 -10
- package/dist/components/modals/image-gallery/ImageGalleryContext.js +0 -4
- package/dist/components/modals/image-gallery/ImageGallerySwiper.d.ts +0 -8
- package/dist/components/modals/image-gallery/ImageGallerySwiper.js +0 -29
- package/dist/components/modals/image-gallery/ImageGalleryThumbsSwiper.d.ts +0 -5
- package/dist/components/modals/image-gallery/ImageGalleryThumbsSwiper.js +0 -23
- package/dist/components/modals/image-gallery/image-gallery-item/ImageGalleryItem.css +0 -10
- package/dist/components/modals/image-gallery/image-gallery-item/ImageGalleryItem.d.ts +0 -11
- package/dist/components/modals/image-gallery/image-gallery-item/ImageGalleryItem.js +0 -24
- package/dist/components/modals/image-gallery/internal/BaseGallery.d.ts +0 -17
- package/dist/components/modals/image-gallery/internal/BaseGallery.js +0 -50
- package/dist/components/modals/image-gallery/internal/CloseButton.d.ts +0 -6
- package/dist/components/modals/image-gallery/internal/CloseButton.js +0 -14
- package/dist/components/modals/image-gallery/internal/ImageGalleryContainer.d.ts +0 -5
- package/dist/components/modals/image-gallery/internal/ImageGalleryContainer.js +0 -8
- package/dist/components/modals/image-gallery/internal/ImageGalleryPagination.d.ts +0 -5
- package/dist/components/modals/image-gallery/internal/ImageGalleryPagination.js +0 -29
- package/dist/components/modals/image-gallery/internal/ScaleButton.d.ts +0 -4
- package/dist/components/modals/image-gallery/internal/ScaleButton.js +0 -17
- package/dist/components/pagination/Pagination.css +0 -10
- package/dist/components/pagination/Pagination.d.ts +0 -15
- package/dist/components/pagination/Pagination.js +0 -100
- package/dist/components/popovers/legend/Legend.css +0 -21
- package/dist/components/popovers/legend/Legend.d.ts +0 -11
- package/dist/components/popovers/legend/Legend.js +0 -24
- package/dist/components/popovers/popover/Popover.css +0 -56
- package/dist/components/popovers/popover/Popover.d.ts +0 -20
- package/dist/components/popovers/popover/Popover.js +0 -107
- package/dist/components/popovers/popover-menu/PopoverMenu.css +0 -20
- package/dist/components/popovers/popover-menu/PopoverMenu.d.ts +0 -8
- package/dist/components/popovers/popover-menu/PopoverMenu.js +0 -37
- package/dist/components/popovers/popover-menu/PopoverMenuContext.d.ts +0 -3
- package/dist/components/popovers/popover-menu/PopoverMenuContext.js +0 -5
- package/dist/components/popovers/popover-menu-item/PopoverMenuItem.css +0 -35
- package/dist/components/popovers/popover-menu-item/PopoverMenuItem.d.ts +0 -10
- package/dist/components/popovers/popover-menu-item/PopoverMenuItem.js +0 -30
- package/dist/components/popovers/tooltip/Tooltip.d.ts +0 -5
- package/dist/components/popovers/tooltip/Tooltip.js +0 -12
- package/dist/components/progress/Progress.d.ts +0 -7
- package/dist/components/progress/Progress.js +0 -26
- package/dist/components/scroll-area/ScrollArea.d.ts +0 -4
- package/dist/components/scroll-area/ScrollArea.js +0 -10
- package/dist/components/scroll-area/ScrollArea.stories.css +0 -9
- package/dist/components/search-input/ClearButton.d.ts +0 -2
- package/dist/components/search-input/ClearButton.js +0 -10
- package/dist/components/search-input/SearchInput.css +0 -13
- package/dist/components/search-input/SearchInput.d.ts +0 -14
- package/dist/components/search-input/SearchInput.js +0 -61
- package/dist/components/search-input/SearchSuggestion.d.ts +0 -17
- package/dist/components/search-input/SearchSuggestion.js +0 -21
- package/dist/components/search-input/useSearchInput.d.ts +0 -13
- package/dist/components/search-input/useSearchInput.js +0 -85
- package/dist/components/snackbar/Snackbar.css +0 -55
- package/dist/components/snackbar/Snackbar.d.ts +0 -21
- package/dist/components/snackbar/Snackbar.js +0 -78
- package/dist/components/snackbar/SnackbarContext.d.ts +0 -7
- package/dist/components/snackbar/SnackbarContext.js +0 -3
- package/dist/components/snackbar/SnackbarProvider.d.ts +0 -8
- package/dist/components/snackbar/SnackbarProvider.js +0 -66
- package/dist/components/snackbar/useSnackbar.d.ts +0 -2
- package/dist/components/snackbar/useSnackbar.js +0 -4
- package/dist/components/stepper-horizontal/StepperHorizontal.css +0 -6
- package/dist/components/stepper-horizontal/StepperHorizontal.d.ts +0 -7
- package/dist/components/stepper-horizontal/StepperHorizontal.js +0 -48
- package/dist/components/stepper-horizontal/step-horizontal/StepHorizontal.css +0 -24
- package/dist/components/stepper-horizontal/step-horizontal/StepHorizontal.d.ts +0 -6
- package/dist/components/stepper-horizontal/step-horizontal/StepHorizontal.js +0 -16
- package/dist/components/stepper-vertical/StepperVertical.d.ts +0 -6
- package/dist/components/stepper-vertical/StepperVertical.js +0 -26
- package/dist/components/stepper-vertical/step-vertical/StepVertical.css +0 -10
- package/dist/components/stepper-vertical/step-vertical/StepVertical.d.ts +0 -11
- package/dist/components/stepper-vertical/step-vertical/StepVertical.js +0 -58
- package/dist/components/tab/Tabs.css +0 -285
- package/dist/components/tab/Tabs.d.ts +0 -23
- package/dist/components/tab/Tabs.js +0 -194
- package/dist/components/tab/interfaces.d.ts +0 -5
- package/dist/components/tab/interfaces.js +0 -0
- package/dist/components/tab/tab-pane/TabPane.css +0 -8
- package/dist/components/tab/tab-pane/TabPane.d.ts +0 -9
- package/dist/components/tab/tab-pane/TabPane.js +0 -18
- package/dist/components/tab/useTabScroll.d.ts +0 -25
- package/dist/components/tab/useTabScroll.js +0 -151
- package/dist/components/table-header-cell/TableHeaderCell.d.ts +0 -5
- package/dist/components/table-header-cell/TableHeaderCell.js +0 -21
- package/dist/forms/checkbox/Checkbox.css +0 -134
- package/dist/forms/checkbox/Checkbox.d.ts +0 -15
- package/dist/forms/checkbox/Checkbox.js +0 -80
- package/dist/forms/radio/RadioButton.d.ts +0 -14
- package/dist/forms/radio/RadioButton.js +0 -61
- package/dist/forms/radio/RadioGroup.d.ts +0 -12
- package/dist/forms/radio/RadioGroup.js +0 -50
- package/dist/forms/radio/RadioGroupContext.d.ts +0 -12
- package/dist/forms/radio/RadioGroupContext.js +0 -3
- package/dist/forms/segment/Segment.d.ts +0 -13
- package/dist/forms/segment/Segment.js +0 -59
- package/dist/forms/segment/segment-control/SegmentControl.d.ts +0 -14
- package/dist/forms/segment/segment-control/SegmentControl.js +0 -57
- package/dist/forms/select/Select.css +0 -160
- package/dist/forms/select/Select.d.ts +0 -26
- package/dist/forms/select/Select.js +0 -95
- 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/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/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/SelectOptionsContainer.d.ts +0 -17
- package/dist/forms/select/internal/SelectOptionsContainer.js +0 -103
- 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
- package/dist/forms/slider/Slider.css +0 -50
- package/dist/forms/slider/Slider.d.ts +0 -17
- package/dist/forms/slider/Slider.js +0 -93
- package/dist/forms/switch/Switch.d.ts +0 -12
- package/dist/forms/switch/Switch.js +0 -42
- package/dist/forms/text-area/TextArea.css +0 -14
- package/dist/forms/text-area/TextArea.d.ts +0 -22
- package/dist/forms/text-area/TextArea.js +0 -99
- package/dist/forms/text-input/TextInput.d.ts +0 -24
- package/dist/forms/text-input/TextInput.js +0 -74
- package/dist/forms/time-picker/TimePicker.css +0 -10
- package/dist/forms/time-picker/TimePicker.d.ts +0 -24
- package/dist/forms/time-picker/TimePicker.js +0 -140
- package/dist/forms/time-picker/time-picker-dropdown/TimePickerDropdown.css +0 -4
- package/dist/forms/time-picker/time-picker-dropdown/TimePickerDropdown.d.ts +0 -19
- package/dist/forms/time-picker/time-picker-dropdown/TimePickerDropdown.js +0 -202
- package/dist/forms/time-picker/time-picker-dropdown/TimePickerInput.d.ts +0 -9
- package/dist/forms/time-picker/time-picker-dropdown/TimePickerInput.js +0 -14
- package/dist/index.d.ts +0 -63
- package/dist/index.js +0 -60
- package/dist/utils/index.d.ts +0 -1
- package/dist/utils/index.js +0 -7
- package/dist/utils/setRef.d.ts +0 -1
- package/dist/utils/setRef.js +0 -5
- package/dist/utils/types.d.ts +0 -29
- package/dist/utils/types.js +0 -0
- package/dist/utils/useControlled.d.ts +0 -7
- package/dist/utils/useControlled.js +0 -20
- package/dist/utils/useForkRef.d.ts +0 -2
- package/dist/utils/useForkRef.js +0 -15
- package/dist/utils/useId.d.ts +0 -1
- package/dist/utils/useId.js +0 -20
- package/dist/utils/useOnClickOutside.d.ts +0 -2
- package/dist/utils/useOnClickOutside.js +0 -20
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { createRef, forwardRef, isValidElement, useEffect, useRef, useState } from "react";
|
|
3
|
-
import { usePopper } from "react-popper";
|
|
4
|
-
import { ListItem } from "./ListItem.js";
|
|
5
|
-
import { SelectScrollContainer } from "./SelectScrollContainer.js";
|
|
6
|
-
import { getChildren } from "./utils.js";
|
|
7
|
-
function SelectOptionsContainerComponent({ options, config, onClose, label, onOptionChange, multiple, children }, ref) {
|
|
8
|
-
const [popperElement, setPopperElement] = useState(null);
|
|
9
|
-
const refObject = 'function' != typeof ref ? ref?.current : null;
|
|
10
|
-
const { styles, attributes } = usePopper(refObject, popperElement, {
|
|
11
|
-
placement: 'bottom-start',
|
|
12
|
-
modifiers: [
|
|
13
|
-
{
|
|
14
|
-
name: 'offset',
|
|
15
|
-
options: {
|
|
16
|
-
offset: [
|
|
17
|
-
0,
|
|
18
|
-
3
|
|
19
|
-
]
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
name: 'flip',
|
|
24
|
-
options: {
|
|
25
|
-
fallbackPlacements: [
|
|
26
|
-
'bottom-start',
|
|
27
|
-
'top-start'
|
|
28
|
-
]
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
]
|
|
32
|
-
});
|
|
33
|
-
function getCssProperies() {
|
|
34
|
-
if (config?.contentWidth) return {
|
|
35
|
-
...styles.popper,
|
|
36
|
-
minWidth: `${refObject?.clientWidth}px`,
|
|
37
|
-
width: config?.contentWidth
|
|
38
|
-
};
|
|
39
|
-
return {
|
|
40
|
-
...styles.popper,
|
|
41
|
-
minWidth: `${refObject?.clientWidth}px`
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
const allChildren = getChildren(children);
|
|
45
|
-
const childrenList = allChildren.childrenList;
|
|
46
|
-
const usedOptions = options ?? childrenList.map((child)=>child.props.option);
|
|
47
|
-
const { length } = usedOptions;
|
|
48
|
-
const listItemRef = useRef(Array.from({
|
|
49
|
-
length
|
|
50
|
-
}, ()=>/*#__PURE__*/ createRef()));
|
|
51
|
-
const selectedIndex = Array.isArray(label) ? usedOptions.findIndex((option)=>option.label === label.at(-1)) : usedOptions.findIndex((option)=>option.label === label);
|
|
52
|
-
const [init, setInit] = useState(false);
|
|
53
|
-
useEffect(()=>{
|
|
54
|
-
if (!init) requestAnimationFrame(()=>{
|
|
55
|
-
setInit(true);
|
|
56
|
-
const index = -1 === selectedIndex ? 0 : selectedIndex;
|
|
57
|
-
listItemRef.current?.[index].current?.focus();
|
|
58
|
-
});
|
|
59
|
-
}, [
|
|
60
|
-
selectedIndex,
|
|
61
|
-
init
|
|
62
|
-
]);
|
|
63
|
-
return /*#__PURE__*/ jsxs(Fragment, {
|
|
64
|
-
children: [
|
|
65
|
-
/*#__PURE__*/ jsx("div", {
|
|
66
|
-
"aria-hidden": true,
|
|
67
|
-
className: "fr-backdrop",
|
|
68
|
-
onClick: onClose
|
|
69
|
-
}),
|
|
70
|
-
/*#__PURE__*/ jsxs("ul", {
|
|
71
|
-
ref: setPopperElement,
|
|
72
|
-
style: getCssProperies(),
|
|
73
|
-
...attributes.popper,
|
|
74
|
-
className: "fwe-select-options-container",
|
|
75
|
-
role: "listbox",
|
|
76
|
-
children: [
|
|
77
|
-
allChildren.before,
|
|
78
|
-
/*#__PURE__*/ jsx(SelectScrollContainer, {
|
|
79
|
-
length: length,
|
|
80
|
-
config: config,
|
|
81
|
-
children: [
|
|
82
|
-
...options || [],
|
|
83
|
-
...childrenList
|
|
84
|
-
].map((item, i)=>/*#__PURE__*/ jsx(ListItem, {
|
|
85
|
-
withCheckbox: multiple,
|
|
86
|
-
item: item,
|
|
87
|
-
selectedLabel: label,
|
|
88
|
-
onClose: onClose,
|
|
89
|
-
onFocusChange: (index)=>listItemRef.current[index].current?.focus(),
|
|
90
|
-
onOptionChange: onOptionChange,
|
|
91
|
-
ref: listItemRef,
|
|
92
|
-
index: i,
|
|
93
|
-
options: usedOptions
|
|
94
|
-
}, /*#__PURE__*/ (isValidElement(item) ? item.props.option : item).data))
|
|
95
|
-
}),
|
|
96
|
-
allChildren.after
|
|
97
|
-
]
|
|
98
|
-
})
|
|
99
|
-
]
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
const SelectOptionsContainer = /*#__PURE__*/ forwardRef(SelectOptionsContainerComponent);
|
|
103
|
-
export { SelectOptionsContainer };
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { SelectConfiguration } from '../../../utils/types';
|
|
2
|
-
interface SelectScrollContainerProps {
|
|
3
|
-
readonly config?: SelectConfiguration;
|
|
4
|
-
readonly children: React.ReactNode;
|
|
5
|
-
readonly length: number;
|
|
6
|
-
}
|
|
7
|
-
export declare function SelectScrollContainer({ config, children, length, }: SelectScrollContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
export {};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Fragment, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { calcVirtualScrollHeight } from "../utils.js";
|
|
3
|
-
function SelectScrollContainer({ config, children, length }) {
|
|
4
|
-
if (config?.scroll?.enabled) return /*#__PURE__*/ jsx("div", {
|
|
5
|
-
className: "fr-select-scroll",
|
|
6
|
-
style: {
|
|
7
|
-
height: calcVirtualScrollHeight(config, length)
|
|
8
|
-
},
|
|
9
|
-
children: children
|
|
10
|
-
});
|
|
11
|
-
return /*#__PURE__*/ jsx(Fragment, {
|
|
12
|
-
children: children
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
export { SelectScrollContainer };
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { type ComponentPropsWithoutRef } from 'react';
|
|
2
|
-
interface SelectWrapperProps extends ComponentPropsWithoutRef<'div'> {
|
|
3
|
-
disabled?: boolean;
|
|
4
|
-
}
|
|
5
|
-
export declare const SelectWrapper: (props: SelectWrapperProps & import("react").RefAttributes<HTMLDivElement>) => React.ReactElement | null;
|
|
6
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import classnames from "classnames";
|
|
3
|
-
import { forwardRef } from "react";
|
|
4
|
-
const SelectWrapper = /*#__PURE__*/ forwardRef(({ children, disabled, className, ...props }, ref)=>/*#__PURE__*/ jsx("div", {
|
|
5
|
-
...props,
|
|
6
|
-
ref: ref,
|
|
7
|
-
className: classnames('fwe-select-wrapper', {
|
|
8
|
-
'fwe-disabled': disabled
|
|
9
|
-
}, className),
|
|
10
|
-
children: children
|
|
11
|
-
}));
|
|
12
|
-
export { SelectWrapper };
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export { HiddenInput } from './HiddenInput';
|
|
2
|
-
export { ListItem } from './ListItem';
|
|
3
|
-
export { SelectButton } from './SelectButton';
|
|
4
|
-
export { SelectLabel } from './SelectLabel';
|
|
5
|
-
export { SelectOptionsContainer } from './SelectOptionsContainer';
|
|
6
|
-
export { SelectWrapper } from './SelectWrapper';
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { HiddenInput } from "./HiddenInput.js";
|
|
2
|
-
import { ListItem } from "./ListItem.js";
|
|
3
|
-
import { SelectButton } from "./SelectButton.js";
|
|
4
|
-
import { SelectLabel } from "./SelectLabel.js";
|
|
5
|
-
import { SelectOptionsContainer } from "./SelectOptionsContainer.js";
|
|
6
|
-
import { SelectWrapper } from "./SelectWrapper.js";
|
|
7
|
-
export { HiddenInput, ListItem, SelectButton, SelectLabel, SelectOptionsContainer, SelectWrapper };
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { SelectOptionProps } from '../select-option/SelectOption';
|
|
3
|
-
export declare function getChildren<T>(children: React.ReactNode): {
|
|
4
|
-
childrenList: React.ReactElement<SelectOptionProps<T>, string | React.JSXElementConstructor<any>>[];
|
|
5
|
-
after: React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
|
|
6
|
-
before: React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
|
|
7
|
-
};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import classnames from "classnames";
|
|
2
|
-
import react from "react";
|
|
3
|
-
import { SelectOption } from "../select-option/SelectOption.js";
|
|
4
|
-
function getChildren(children) {
|
|
5
|
-
const before = [];
|
|
6
|
-
const childrenList = [];
|
|
7
|
-
const after = [];
|
|
8
|
-
let foundFirstOption = false;
|
|
9
|
-
react.Children.forEach(children, (element)=>{
|
|
10
|
-
if (react.isValidElement(element)) if (react.isValidElement(element) && element.type === SelectOption) {
|
|
11
|
-
foundFirstOption = true;
|
|
12
|
-
const className = classnames('fwe-select-option-content', element.props.className);
|
|
13
|
-
const { props } = element;
|
|
14
|
-
childrenList.push({
|
|
15
|
-
...element,
|
|
16
|
-
props: {
|
|
17
|
-
...props,
|
|
18
|
-
className
|
|
19
|
-
}
|
|
20
|
-
});
|
|
21
|
-
} else if (foundFirstOption) after.push(element);
|
|
22
|
-
else before.push(element);
|
|
23
|
-
});
|
|
24
|
-
return {
|
|
25
|
-
childrenList,
|
|
26
|
-
after,
|
|
27
|
-
before
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
export { getChildren };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { type ComponentPropsWithoutRef, type Ref } from 'react';
|
|
2
|
-
export interface SelectOptionType<T> {
|
|
3
|
-
label: string;
|
|
4
|
-
data: T;
|
|
5
|
-
disabled?: boolean;
|
|
6
|
-
}
|
|
7
|
-
export interface SelectOptionProps<T> extends ComponentPropsWithoutRef<'span'> {
|
|
8
|
-
option: SelectOptionType<T>;
|
|
9
|
-
}
|
|
10
|
-
declare function SelectOptionComponent<T>({ children, className, ...props }: SelectOptionProps<T>, ref: Ref<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
export declare const SelectOption: <T>(props: SelectOptionProps<T> & {
|
|
12
|
-
ref?: Ref<HTMLDivElement>;
|
|
13
|
-
}) => ReturnType<typeof SelectOptionComponent>;
|
|
14
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef } from "react";
|
|
3
|
-
function SelectOptionComponent({ children, className, ...props }, ref) {
|
|
4
|
-
return /*#__PURE__*/ jsx("span", {
|
|
5
|
-
ref: ref,
|
|
6
|
-
className: className,
|
|
7
|
-
...props,
|
|
8
|
-
children: children
|
|
9
|
-
});
|
|
10
|
-
}
|
|
11
|
-
const SelectOption = /*#__PURE__*/ forwardRef(SelectOptionComponent);
|
|
12
|
-
export { SelectOption };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
function calcVirtualScrollHeight(config, itemLength) {
|
|
2
|
-
const defaultHeight = 48;
|
|
3
|
-
let height = defaultHeight;
|
|
4
|
-
if (2 === itemLength) height = 2 * defaultHeight;
|
|
5
|
-
else if (itemLength >= 3) height = 3 * defaultHeight;
|
|
6
|
-
if (config?.scroll?.viewportSize != null && void 0 !== config.scroll.viewportSize) {
|
|
7
|
-
if (itemLength >= config.scroll.viewportSize) height = config.scroll.viewportSize * defaultHeight;
|
|
8
|
-
else if (itemLength < config.scroll.viewportSize) height = itemLength * defaultHeight;
|
|
9
|
-
}
|
|
10
|
-
return height;
|
|
11
|
-
}
|
|
12
|
-
export { calcVirtualScrollHeight };
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
label.fwe-slider {
|
|
2
|
-
display: block;
|
|
3
|
-
position: relative;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
label.fwe-slider .fr-slider-indicator {
|
|
7
|
-
background: var(--fwe-hero);
|
|
8
|
-
height: 2px;
|
|
9
|
-
position: absolute;
|
|
10
|
-
bottom: 22px;
|
|
11
|
-
left: 0;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
label.fwe-slider .fr-slider-indicator.disabled {
|
|
15
|
-
background: var(--fwe-border);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
label.fwe-slider.fr-slider-value {
|
|
19
|
-
height: 56px;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
label.fwe-slider.fr-slider-value .fr-slider-indicator {
|
|
23
|
-
bottom: 38px;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
label.fwe-slider.fr-slider-label {
|
|
27
|
-
height: 67px;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
label.fwe-slider.fr-slider-label .fr-slider-indicator {
|
|
31
|
-
bottom: 22px;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
label.fwe-slider.fr-slider-value-label {
|
|
35
|
-
height: 83px;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
label.fwe-slider.fr-slider-value-label .fr-slider-indicator {
|
|
39
|
-
bottom: 38px;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
label.fwe-slider .fr-slider-value {
|
|
43
|
-
color: var(--fwe-text);
|
|
44
|
-
font-size: var(--fwe-font-size-base);
|
|
45
|
-
user-select: none;
|
|
46
|
-
margin-bottom: 0;
|
|
47
|
-
position: absolute;
|
|
48
|
-
bottom: 0;
|
|
49
|
-
}
|
|
50
|
-
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type React from 'react';
|
|
2
|
-
import type { ClassNameProps } from '../../utils/types';
|
|
3
|
-
import './Slider.scss';
|
|
4
|
-
export interface SliderProps extends ClassNameProps {
|
|
5
|
-
disabled?: boolean;
|
|
6
|
-
min: number;
|
|
7
|
-
max: number;
|
|
8
|
-
step?: number;
|
|
9
|
-
value: number;
|
|
10
|
-
onChangeCommitted?: (value: number) => void;
|
|
11
|
-
label?: string;
|
|
12
|
-
showValue?: boolean;
|
|
13
|
-
onChange?: (event: React.ChangeEvent<HTMLInputElement>, value: number) => void;
|
|
14
|
-
id?: string;
|
|
15
|
-
widthOffset?: number;
|
|
16
|
-
}
|
|
17
|
-
export declare function Slider({ disabled, label, max, min, onChange, onChangeCommitted, step, value, showValue, className, id: idProps, widthOffset, }: SliderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import classnames from "classnames";
|
|
3
|
-
import { useCallback, useEffect, useRef, useState } from "react";
|
|
4
|
-
import "./Slider.css";
|
|
5
|
-
import { useId } from "../../utils/useId.js";
|
|
6
|
-
function Slider({ disabled = false, label, max, min, onChange, onChangeCommitted, step, value, showValue = true, className, id: idProps, widthOffset = 8 }) {
|
|
7
|
-
const id = useId(idProps);
|
|
8
|
-
const [innerValue, setInnerValue] = useState(value);
|
|
9
|
-
const [left, setLeft] = useState(null);
|
|
10
|
-
const [numberoffset, setNumberOffset] = useState(0);
|
|
11
|
-
const labelEl = useRef(null);
|
|
12
|
-
const classes = classnames('fwe-slider', {
|
|
13
|
-
'fr-slider-value': !label && showValue
|
|
14
|
-
}, {
|
|
15
|
-
'fr-slider-label': label && !showValue
|
|
16
|
-
}, {
|
|
17
|
-
'fr-slider-value-label': label && showValue
|
|
18
|
-
}, className);
|
|
19
|
-
useEffect(()=>{
|
|
20
|
-
setInnerValue(value);
|
|
21
|
-
}, [
|
|
22
|
-
value
|
|
23
|
-
]);
|
|
24
|
-
const updateValuePosition = useCallback(()=>{
|
|
25
|
-
if (labelEl.current) {
|
|
26
|
-
const { width } = labelEl.current.getBoundingClientRect();
|
|
27
|
-
const diff = max - min;
|
|
28
|
-
setLeft((innerValue - min) / diff * (width - widthOffset));
|
|
29
|
-
setNumberOffset(8 - 6 * innerValue.toString().length);
|
|
30
|
-
}
|
|
31
|
-
}, [
|
|
32
|
-
innerValue,
|
|
33
|
-
max,
|
|
34
|
-
min,
|
|
35
|
-
widthOffset
|
|
36
|
-
]);
|
|
37
|
-
const handleAfterChange = ()=>{
|
|
38
|
-
if (onChangeCommitted) onChangeCommitted(innerValue);
|
|
39
|
-
};
|
|
40
|
-
const handleChange = (e)=>{
|
|
41
|
-
const newValue = Number.parseFloat(e.target.value);
|
|
42
|
-
setInnerValue(newValue);
|
|
43
|
-
if (onChange) onChange(e, newValue);
|
|
44
|
-
};
|
|
45
|
-
useEffect(()=>{
|
|
46
|
-
function handleResize() {
|
|
47
|
-
updateValuePosition();
|
|
48
|
-
}
|
|
49
|
-
window.addEventListener('resize', handleResize);
|
|
50
|
-
handleResize();
|
|
51
|
-
return ()=>window.removeEventListener('resize', handleResize);
|
|
52
|
-
}, [
|
|
53
|
-
updateValuePosition
|
|
54
|
-
]);
|
|
55
|
-
return /*#__PURE__*/ jsxs("label", {
|
|
56
|
-
ref: labelEl,
|
|
57
|
-
className: classes,
|
|
58
|
-
htmlFor: id,
|
|
59
|
-
children: [
|
|
60
|
-
label && /*#__PURE__*/ jsx("span", {
|
|
61
|
-
children: label
|
|
62
|
-
}),
|
|
63
|
-
/*#__PURE__*/ jsx("input", {
|
|
64
|
-
id: id,
|
|
65
|
-
className: "fwe-slider-input",
|
|
66
|
-
type: "range",
|
|
67
|
-
disabled: disabled,
|
|
68
|
-
min: min,
|
|
69
|
-
max: max,
|
|
70
|
-
step: step,
|
|
71
|
-
onChange: handleChange,
|
|
72
|
-
value: innerValue,
|
|
73
|
-
onKeyUp: handleAfterChange,
|
|
74
|
-
onMouseUp: handleAfterChange,
|
|
75
|
-
onTouchEnd: handleAfterChange
|
|
76
|
-
}),
|
|
77
|
-
showValue && null !== left && /*#__PURE__*/ jsx("span", {
|
|
78
|
-
className: "fr-slider-value",
|
|
79
|
-
style: {
|
|
80
|
-
left: `${left + numberoffset}px`
|
|
81
|
-
},
|
|
82
|
-
children: innerValue
|
|
83
|
-
}),
|
|
84
|
-
/*#__PURE__*/ jsx("div", {
|
|
85
|
-
className: `fr-slider-indicator${disabled ? ' disabled' : ''}`,
|
|
86
|
-
style: {
|
|
87
|
-
width: `${left}px`
|
|
88
|
-
}
|
|
89
|
-
})
|
|
90
|
-
]
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
export { Slider };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { ClassNameProps } from '../../utils/types';
|
|
2
|
-
export interface SwitchProps extends ClassNameProps {
|
|
3
|
-
labelPosition?: 'before' | 'after' | 'below';
|
|
4
|
-
large?: boolean;
|
|
5
|
-
title: string;
|
|
6
|
-
value?: boolean;
|
|
7
|
-
defaultValue?: boolean;
|
|
8
|
-
disabled?: boolean;
|
|
9
|
-
onChange?: (value: boolean) => void;
|
|
10
|
-
id?: string;
|
|
11
|
-
}
|
|
12
|
-
export declare function Switch({ labelPosition, large, title, value, defaultValue, disabled, onChange, className, id: idProps, }: SwitchProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import classnames from "classnames";
|
|
3
|
-
import { useControlled } from "../../utils/useControlled.js";
|
|
4
|
-
import { useId } from "../../utils/useId.js";
|
|
5
|
-
function Switch({ labelPosition = 'after', large = false, title, value, defaultValue, disabled = false, onChange, className, id: idProps }) {
|
|
6
|
-
const id = useId(idProps);
|
|
7
|
-
const labelClassName = classnames('fwe-switch', {
|
|
8
|
-
[`fwe-switch-label-${labelPosition}`]: true
|
|
9
|
-
}, {
|
|
10
|
-
'fwe-switch-lg': large
|
|
11
|
-
}, className);
|
|
12
|
-
const [currentValue, setCurrentValue] = useControlled({
|
|
13
|
-
controlled: value,
|
|
14
|
-
default: defaultValue
|
|
15
|
-
});
|
|
16
|
-
const handleChange = ()=>{
|
|
17
|
-
const newValue = !currentValue;
|
|
18
|
-
setCurrentValue(newValue);
|
|
19
|
-
if (onChange) onChange(newValue);
|
|
20
|
-
};
|
|
21
|
-
return /*#__PURE__*/ jsxs("label", {
|
|
22
|
-
className: labelClassName,
|
|
23
|
-
htmlFor: id,
|
|
24
|
-
children: [
|
|
25
|
-
/*#__PURE__*/ jsx("input", {
|
|
26
|
-
type: "checkbox",
|
|
27
|
-
disabled: disabled,
|
|
28
|
-
checked: currentValue,
|
|
29
|
-
onChange: ()=>handleChange(),
|
|
30
|
-
id: id
|
|
31
|
-
}),
|
|
32
|
-
/*#__PURE__*/ jsx("div", {
|
|
33
|
-
className: "fwe-switch-track"
|
|
34
|
-
}),
|
|
35
|
-
/*#__PURE__*/ jsx("div", {
|
|
36
|
-
className: "fwe-switch-label-content",
|
|
37
|
-
children: title
|
|
38
|
-
})
|
|
39
|
-
]
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
export { Switch };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
label.fwe-input-text .fwe-input-text-count {
|
|
2
|
-
line-height: var(--fwe-line-height-base);
|
|
3
|
-
color: var(--fwe-text-disabled);
|
|
4
|
-
font-size: var(--fwe-font-size-small);
|
|
5
|
-
display: block;
|
|
6
|
-
position: absolute;
|
|
7
|
-
bottom: 0;
|
|
8
|
-
right: 0;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
label.fwe-input-text .fr-textarea {
|
|
12
|
-
overflow: visible;
|
|
13
|
-
}
|
|
14
|
-
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { ClassNameProps } from '../../utils/types';
|
|
3
|
-
import './TextArea.scss';
|
|
4
|
-
export interface TextAreaProps extends ClassNameProps {
|
|
5
|
-
disabled?: boolean;
|
|
6
|
-
required?: boolean;
|
|
7
|
-
readonly?: boolean;
|
|
8
|
-
onChange?: (event: React.ChangeEvent<HTMLTextAreaElement>) => void;
|
|
9
|
-
onFocus?: (event: React.FocusEvent<HTMLTextAreaElement>) => void;
|
|
10
|
-
onInput?: (event: React.FormEvent<HTMLTextAreaElement>) => void;
|
|
11
|
-
onBlur?: (event: React.FocusEvent<HTMLTextAreaElement>) => void;
|
|
12
|
-
label: string;
|
|
13
|
-
hint?: string;
|
|
14
|
-
error?: string;
|
|
15
|
-
value?: string;
|
|
16
|
-
defaultValue?: string;
|
|
17
|
-
name?: string;
|
|
18
|
-
rows?: number;
|
|
19
|
-
maxLength?: number;
|
|
20
|
-
id?: string;
|
|
21
|
-
}
|
|
22
|
-
export declare function TextArea({ disabled, onBlur, onChange, onFocus, onInput, readonly, required, label, error, hint, value, defaultValue, name, rows, maxLength, className, id: idProps, }: Readonly<TextAreaProps>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import classnames from "classnames";
|
|
3
|
-
import react, { useEffect, useState } from "react";
|
|
4
|
-
import "./TextArea.css";
|
|
5
|
-
import { useId } from "../../utils/useId.js";
|
|
6
|
-
function TextArea({ disabled, onBlur, onChange, onFocus, onInput, readonly, required, label, error, hint, value, defaultValue, name, rows, maxLength, className, id: idProps }) {
|
|
7
|
-
const controlled = void 0 !== value;
|
|
8
|
-
const [innerValue, setInnerValue] = useState(controlled ? value : defaultValue);
|
|
9
|
-
const id = useId(idProps);
|
|
10
|
-
const hintClasses = classnames('fwe-input-text-info');
|
|
11
|
-
const shadowRef = react.useRef(null);
|
|
12
|
-
const ref = react.useRef(null);
|
|
13
|
-
const [height, setHeight] = useState(void 0);
|
|
14
|
-
useEffect(()=>{
|
|
15
|
-
if (controlled) setInnerValue(value);
|
|
16
|
-
}, [
|
|
17
|
-
value,
|
|
18
|
-
controlled
|
|
19
|
-
]);
|
|
20
|
-
useEffect(()=>{
|
|
21
|
-
const input = ref.current;
|
|
22
|
-
const shadow = shadowRef.current;
|
|
23
|
-
const minRows = 2;
|
|
24
|
-
if (shadow && input) {
|
|
25
|
-
shadow.value = input.value || 'x';
|
|
26
|
-
shadow.style.width = `${input.clientWidth}`;
|
|
27
|
-
const newHeight = Math.max(24 * minRows, shadow.scrollHeight);
|
|
28
|
-
setHeight(newHeight + 4 + 4 + 1);
|
|
29
|
-
}
|
|
30
|
-
}, []);
|
|
31
|
-
function handleChange(event) {
|
|
32
|
-
if (!controlled) setInnerValue(event.target.value);
|
|
33
|
-
if (onChange) onChange(event);
|
|
34
|
-
}
|
|
35
|
-
return /*#__PURE__*/ jsxs("label", {
|
|
36
|
-
className: classnames('fwe-input-text', className),
|
|
37
|
-
htmlFor: id,
|
|
38
|
-
children: [
|
|
39
|
-
/*#__PURE__*/ jsx("textarea", {
|
|
40
|
-
style: {
|
|
41
|
-
...!rows && {
|
|
42
|
-
height,
|
|
43
|
-
overflow: 'hidden'
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
ref: ref,
|
|
47
|
-
name: name,
|
|
48
|
-
className: classnames('fr-textarea', `fwe-row-${rows}`),
|
|
49
|
-
disabled: disabled,
|
|
50
|
-
readOnly: readonly,
|
|
51
|
-
required: required,
|
|
52
|
-
autoComplete: "off",
|
|
53
|
-
onChange: handleChange,
|
|
54
|
-
onFocus: onFocus,
|
|
55
|
-
onInput: onInput,
|
|
56
|
-
onBlur: onBlur,
|
|
57
|
-
maxLength: maxLength,
|
|
58
|
-
defaultValue: defaultValue,
|
|
59
|
-
value: value,
|
|
60
|
-
id: id
|
|
61
|
-
}),
|
|
62
|
-
/*#__PURE__*/ jsx("textarea", {
|
|
63
|
-
style: {
|
|
64
|
-
visibility: 'hidden',
|
|
65
|
-
position: 'absolute',
|
|
66
|
-
overflow: 'hidden',
|
|
67
|
-
height: 0,
|
|
68
|
-
top: 0,
|
|
69
|
-
left: 0,
|
|
70
|
-
transform: 'translateZ(0)',
|
|
71
|
-
padding: '0'
|
|
72
|
-
},
|
|
73
|
-
ref: shadowRef,
|
|
74
|
-
readOnly: true
|
|
75
|
-
}),
|
|
76
|
-
/*#__PURE__*/ jsx("span", {
|
|
77
|
-
className: "fwe-input-text-label",
|
|
78
|
-
children: label
|
|
79
|
-
}),
|
|
80
|
-
hint && /*#__PURE__*/ jsx("span", {
|
|
81
|
-
className: hintClasses,
|
|
82
|
-
children: hint
|
|
83
|
-
}),
|
|
84
|
-
void 0 !== error && /*#__PURE__*/ jsx("span", {
|
|
85
|
-
className: "fwe-input-text-invalid",
|
|
86
|
-
children: error
|
|
87
|
-
}),
|
|
88
|
-
!!maxLength && void 0 !== innerValue && /*#__PURE__*/ jsxs("span", {
|
|
89
|
-
className: "fwe-input-text-count",
|
|
90
|
-
children: [
|
|
91
|
-
innerValue.length,
|
|
92
|
-
" /",
|
|
93
|
-
maxLength
|
|
94
|
-
]
|
|
95
|
-
})
|
|
96
|
-
]
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
export { TextArea };
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type React from 'react';
|
|
2
|
-
export interface TextInputProps {
|
|
3
|
-
disabled?: boolean;
|
|
4
|
-
required?: boolean;
|
|
5
|
-
readonly?: boolean;
|
|
6
|
-
placeholder?: string;
|
|
7
|
-
type?: string;
|
|
8
|
-
step?: string;
|
|
9
|
-
min?: number;
|
|
10
|
-
max?: number;
|
|
11
|
-
value?: string;
|
|
12
|
-
defaultValue?: string;
|
|
13
|
-
name?: string;
|
|
14
|
-
onFocus?: (event: React.FocusEvent<HTMLInputElement>) => void;
|
|
15
|
-
onInput?: (event: React.FormEvent<HTMLInputElement>) => void;
|
|
16
|
-
onBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;
|
|
17
|
-
label?: string;
|
|
18
|
-
hint?: string;
|
|
19
|
-
error?: string;
|
|
20
|
-
labelClassName?: string;
|
|
21
|
-
icon?: React.ReactNode;
|
|
22
|
-
autoFocus?: boolean;
|
|
23
|
-
}
|
|
24
|
-
export declare const TextInput: (props: TextInputProps & React.HTMLProps<HTMLInputElement> & React.RefAttributes<HTMLLabelElement>) => React.ReactElement | null;
|