@festo-ui/react 9.0.0-dev.718 → 9.0.0-dev.719
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.css +4 -0
- package/dist/components/accordion/Accordion.d.ts +10 -0
- package/dist/components/accordion/Accordion.js +41 -0
- package/dist/components/accordion/AccordionContext.d.ts +11 -0
- package/dist/components/accordion/AccordionContext.js +3 -0
- package/dist/components/accordion/accordion-header/AccordionHeader.css +11 -0
- package/dist/components/accordion/accordion-header/AccordionHeader.d.ts +2 -0
- package/dist/components/accordion/accordion-header/AccordionHeader.js +11 -0
- package/dist/components/accordion/accordion-item/AccordionItem.css +64 -0
- package/dist/components/accordion/accordion-item/AccordionItem.d.ts +8 -0
- package/dist/components/accordion/accordion-item/AccordionItem.js +60 -0
- package/dist/components/accordion/accordion-item/AccordionItemContext.d.ts +7 -0
- package/dist/components/accordion/accordion-item/AccordionItemContext.js +3 -0
- package/dist/components/accordion/accordion-item/accordion-item-body/AccordionItemBody.css +76 -0
- package/dist/components/accordion/accordion-item/accordion-item-body/AccordionItemBody.d.ts +2 -0
- package/dist/components/accordion/accordion-item/accordion-item-body/AccordionItemBody.js +61 -0
- package/dist/components/accordion/accordion-item/accordion-item-header/AccordionItemHeader.css +11 -0
- package/dist/components/accordion/accordion-item/accordion-item-header/AccordionItemHeader.d.ts +2 -0
- package/dist/components/accordion/accordion-item/accordion-item-header/AccordionItemHeader.js +20 -0
- package/dist/components/bottom-sheet/BottomSheet.css +18 -0
- package/dist/components/bottom-sheet/BottomSheet.d.ts +12 -0
- package/dist/components/bottom-sheet/BottomSheet.js +101 -0
- package/dist/components/breadcrumb/Breadcrumb.d.ts +13 -0
- package/dist/components/breadcrumb/Breadcrumb.js +32 -0
- package/dist/components/button/Button.d.ts +11 -0
- package/dist/components/button/Button.js +36 -0
- package/dist/components/card/Card.d.ts +4 -0
- package/dist/components/card/Card.js +9 -0
- package/dist/components/card/CardBody.d.ts +5 -0
- package/dist/components/card/CardBody.js +15 -0
- package/dist/components/card/CardHeader.d.ts +8 -0
- package/dist/components/card/CardHeader.js +31 -0
- package/dist/components/card/CardHeader.stories.helper.js +7 -0
- package/dist/components/card/CardNotification.d.ts +6 -0
- package/dist/components/card/CardNotification.js +26 -0
- package/dist/components/chips/chip/Chip.d.ts +17 -0
- package/dist/components/chips/chip/Chip.js +38 -0
- package/dist/components/chips/chip-container/ChipContainer.d.ts +5 -0
- package/dist/components/chips/chip-container/ChipContainer.js +12 -0
- package/dist/components/icon-wrapper/IconWrapper.d.ts +3 -0
- package/dist/components/icon-wrapper/IconWrapper.js +13 -0
- package/dist/components/link-button/LinkButton.d.ts +8 -0
- package/dist/components/link-button/LinkButton.js +26 -0
- package/dist/components/loading-indicator/LoadingIndicator.d.ts +5 -0
- package/dist/components/loading-indicator/LoadingIndicator.js +41 -0
- package/dist/components/mobile-flyout/MobileFlyout.d.ts +11 -0
- package/dist/components/mobile-flyout/MobileFlyout.js +88 -0
- package/dist/components/mobile-flyout/MobileFlyoutContext.d.ts +8 -0
- package/dist/components/mobile-flyout/MobileFlyoutContext.js +3 -0
- package/dist/components/mobile-flyout/mobile-flyout-item/MobileFlyoutItem.d.ts +17 -0
- package/dist/components/mobile-flyout/mobile-flyout-item/MobileFlyoutItem.js +36 -0
- package/dist/components/mobile-flyout/mobile-flyout-page/MobileFlyoutPage.css +5 -0
- package/dist/components/mobile-flyout/mobile-flyout-page/MobileFlyoutPage.d.ts +8 -0
- package/dist/components/mobile-flyout/mobile-flyout-page/MobileFlyoutPage.js +35 -0
- package/dist/components/modals/AlertModal.d.ts +12 -0
- package/dist/components/modals/AlertModal.js +53 -0
- package/dist/components/modals/ConfirmModal.d.ts +11 -0
- package/dist/components/modals/ConfirmModal.js +46 -0
- package/dist/components/modals/CustomModal.d.ts +8 -0
- package/dist/components/modals/CustomModal.js +38 -0
- package/dist/components/modals/Modal.css +39 -0
- package/dist/components/modals/Modal.d.ts +8 -0
- package/dist/components/modals/Modal.js +31 -0
- package/dist/components/modals/ModalBase.d.ts +9 -0
- package/dist/components/modals/ModalBase.js +124 -0
- package/dist/components/modals/ModalFooter.d.ts +2 -0
- package/dist/components/modals/ModalFooter.js +12 -0
- package/dist/components/modals/Prompt.d.ts +15 -0
- package/dist/components/modals/Prompt.js +58 -0
- package/dist/components/modals/image-gallery/ImageGallery.css +790 -0
- package/dist/components/modals/image-gallery/ImageGallery.d.ts +18 -0
- package/dist/components/modals/image-gallery/ImageGallery.helper.d.ts +2 -0
- package/dist/components/modals/image-gallery/ImageGallery.helper.js +13 -0
- package/dist/components/modals/image-gallery/ImageGallery.js +75 -0
- package/dist/components/modals/image-gallery/ImageGallery.stories.helper.js +112 -0
- package/dist/components/modals/image-gallery/ImageGalleryContent.d.ts +9 -0
- package/dist/components/modals/image-gallery/ImageGalleryContent.js +15 -0
- package/dist/components/modals/image-gallery/ImageGalleryContext.d.ts +10 -0
- package/dist/components/modals/image-gallery/ImageGalleryContext.js +4 -0
- package/dist/components/modals/image-gallery/ImageGallerySwiper.d.ts +8 -0
- package/dist/components/modals/image-gallery/ImageGallerySwiper.js +29 -0
- package/dist/components/modals/image-gallery/ImageGalleryThumbsSwiper.d.ts +5 -0
- package/dist/components/modals/image-gallery/ImageGalleryThumbsSwiper.js +23 -0
- package/dist/components/modals/image-gallery/image-gallery-item/ImageGalleryItem.css +10 -0
- package/dist/components/modals/image-gallery/image-gallery-item/ImageGalleryItem.d.ts +11 -0
- package/dist/components/modals/image-gallery/image-gallery-item/ImageGalleryItem.js +24 -0
- package/dist/components/modals/image-gallery/internal/BaseGallery.d.ts +17 -0
- package/dist/components/modals/image-gallery/internal/BaseGallery.js +50 -0
- package/dist/components/modals/image-gallery/internal/CloseButton.d.ts +6 -0
- package/dist/components/modals/image-gallery/internal/CloseButton.js +14 -0
- package/dist/components/modals/image-gallery/internal/ImageGalleryContainer.d.ts +5 -0
- package/dist/components/modals/image-gallery/internal/ImageGalleryContainer.js +8 -0
- package/dist/components/modals/image-gallery/internal/ImageGalleryPagination.d.ts +5 -0
- package/dist/components/modals/image-gallery/internal/ImageGalleryPagination.js +29 -0
- package/dist/components/modals/image-gallery/internal/ScaleButton.d.ts +4 -0
- package/dist/components/modals/image-gallery/internal/ScaleButton.js +17 -0
- package/dist/components/pagination/Pagination.css +10 -0
- package/dist/components/pagination/Pagination.d.ts +15 -0
- package/dist/components/pagination/Pagination.js +100 -0
- package/dist/components/popovers/legend/Legend.css +21 -0
- package/dist/components/popovers/legend/Legend.d.ts +11 -0
- package/dist/components/popovers/legend/Legend.js +24 -0
- package/dist/components/popovers/popover/Popover.css +56 -0
- package/dist/components/popovers/popover/Popover.d.ts +20 -0
- package/dist/components/popovers/popover/Popover.js +106 -0
- package/dist/components/popovers/popover-menu/PopoverMenu.css +20 -0
- package/dist/components/popovers/popover-menu/PopoverMenu.d.ts +8 -0
- package/dist/components/popovers/popover-menu/PopoverMenu.js +37 -0
- package/dist/components/popovers/popover-menu/PopoverMenuContext.d.ts +3 -0
- package/dist/components/popovers/popover-menu/PopoverMenuContext.js +5 -0
- package/dist/components/popovers/popover-menu-item/PopoverMenuItem.css +35 -0
- package/dist/components/popovers/popover-menu-item/PopoverMenuItem.d.ts +10 -0
- package/dist/components/popovers/popover-menu-item/PopoverMenuItem.js +30 -0
- package/dist/components/popovers/tooltip/Tooltip.d.ts +5 -0
- package/dist/components/popovers/tooltip/Tooltip.js +12 -0
- package/dist/components/progress/Progress.d.ts +7 -0
- package/dist/components/progress/Progress.js +26 -0
- package/dist/components/search-input/ClearButton.d.ts +2 -0
- package/dist/components/search-input/ClearButton.js +10 -0
- package/dist/components/search-input/SearchInput.css +13 -0
- package/dist/components/search-input/SearchInput.d.ts +14 -0
- package/dist/components/search-input/SearchInput.js +61 -0
- package/dist/components/search-input/SearchSuggestion.d.ts +17 -0
- package/dist/components/search-input/SearchSuggestion.js +21 -0
- package/dist/components/search-input/useSearchInput.d.ts +13 -0
- package/dist/components/search-input/useSearchInput.js +85 -0
- package/dist/components/snackbar/Snackbar.css +55 -0
- package/dist/components/snackbar/Snackbar.d.ts +21 -0
- package/dist/components/snackbar/Snackbar.js +78 -0
- package/dist/components/snackbar/SnackbarContext.d.ts +7 -0
- package/dist/components/snackbar/SnackbarContext.js +3 -0
- package/dist/components/snackbar/SnackbarProvider.d.ts +8 -0
- package/dist/components/snackbar/SnackbarProvider.js +66 -0
- package/dist/components/snackbar/useSnackbar.d.ts +2 -0
- package/dist/components/snackbar/useSnackbar.js +4 -0
- package/dist/components/stepper-horizontal/StepperHorizontal.css +6 -0
- package/dist/components/stepper-horizontal/StepperHorizontal.d.ts +7 -0
- package/dist/components/stepper-horizontal/StepperHorizontal.js +48 -0
- package/dist/components/stepper-horizontal/step-horizontal/StepHorizontal.css +24 -0
- package/dist/components/stepper-horizontal/step-horizontal/StepHorizontal.d.ts +6 -0
- package/dist/components/stepper-horizontal/step-horizontal/StepHorizontal.js +16 -0
- package/dist/components/stepper-vertical/StepperVertical.d.ts +6 -0
- package/dist/components/stepper-vertical/StepperVertical.js +26 -0
- package/dist/components/stepper-vertical/step-vertical/StepVertical.css +10 -0
- package/dist/components/stepper-vertical/step-vertical/StepVertical.d.ts +11 -0
- package/dist/components/stepper-vertical/step-vertical/StepVertical.js +58 -0
- package/dist/components/tab/Tabs.css +285 -0
- package/dist/components/tab/Tabs.d.ts +23 -0
- package/dist/components/tab/Tabs.js +194 -0
- package/dist/components/tab/interfaces.d.ts +5 -0
- package/dist/components/tab/interfaces.js +0 -0
- package/dist/components/tab/tab-pane/TabPane.css +8 -0
- package/dist/components/tab/tab-pane/TabPane.d.ts +9 -0
- package/dist/components/tab/tab-pane/TabPane.js +18 -0
- package/dist/components/tab/useTabScroll.d.ts +25 -0
- package/dist/components/tab/useTabScroll.js +151 -0
- package/dist/components/table-header-cell/TableHeaderCell.d.ts +5 -0
- package/dist/components/table-header-cell/TableHeaderCell.js +21 -0
- package/dist/forms/checkbox/Checkbox.css +134 -0
- package/dist/forms/checkbox/Checkbox.d.ts +15 -0
- package/dist/forms/checkbox/Checkbox.js +80 -0
- package/dist/forms/radio/RadioButton.d.ts +14 -0
- package/dist/forms/radio/RadioButton.js +61 -0
- package/dist/forms/radio/RadioGroup.d.ts +12 -0
- package/dist/forms/radio/RadioGroup.js +50 -0
- package/dist/forms/radio/RadioGroupContext.d.ts +12 -0
- package/dist/forms/radio/RadioGroupContext.js +3 -0
- package/dist/forms/segment/Segment.d.ts +13 -0
- package/dist/forms/segment/Segment.js +59 -0
- package/dist/forms/segment/segment-control/SegmentControl.d.ts +14 -0
- package/dist/forms/segment/segment-control/SegmentControl.js +57 -0
- package/dist/forms/select/Select.css +160 -0
- package/dist/forms/select/Select.d.ts +26 -0
- package/dist/forms/select/Select.js +95 -0
- package/dist/forms/select/internal/HiddenInput.d.ts +8 -0
- package/dist/forms/select/internal/HiddenInput.js +15 -0
- package/dist/forms/select/internal/ListItem.d.ts +18 -0
- package/dist/forms/select/internal/ListItem.js +69 -0
- package/dist/forms/select/internal/SelectButton.d.ts +12 -0
- package/dist/forms/select/internal/SelectButton.js +49 -0
- package/dist/forms/select/internal/SelectButtonContent.d.ts +7 -0
- package/dist/forms/select/internal/SelectButtonContent.js +31 -0
- package/dist/forms/select/internal/SelectCheckbox.d.ts +4 -0
- package/dist/forms/select/internal/SelectCheckbox.js +13 -0
- package/dist/forms/select/internal/SelectLabel.d.ts +7 -0
- package/dist/forms/select/internal/SelectLabel.js +12 -0
- package/dist/forms/select/internal/SelectOptionsContainer.d.ts +17 -0
- package/dist/forms/select/internal/SelectOptionsContainer.js +103 -0
- package/dist/forms/select/internal/SelectScrollContainer.d.ts +8 -0
- package/dist/forms/select/internal/SelectScrollContainer.js +15 -0
- package/dist/forms/select/internal/SelectWrapper.d.ts +6 -0
- package/dist/forms/select/internal/SelectWrapper.js +12 -0
- package/dist/forms/select/internal/index.d.ts +6 -0
- package/dist/forms/select/internal/index.js +7 -0
- package/dist/forms/select/internal/utils.d.ts +7 -0
- package/dist/forms/select/internal/utils.js +30 -0
- package/dist/forms/select/select-option/SelectOption.d.ts +14 -0
- package/dist/forms/select/select-option/SelectOption.js +12 -0
- package/dist/forms/select/utils.d.ts +2 -0
- package/dist/forms/select/utils.js +12 -0
- package/dist/forms/slider/Slider.css +50 -0
- package/dist/forms/slider/Slider.d.ts +17 -0
- package/dist/forms/slider/Slider.js +93 -0
- package/dist/forms/switch/Switch.d.ts +12 -0
- package/dist/forms/switch/Switch.js +42 -0
- package/dist/forms/text-area/TextArea.css +14 -0
- package/dist/forms/text-area/TextArea.d.ts +22 -0
- package/dist/forms/text-area/TextArea.js +99 -0
- package/dist/forms/text-input/TextInput.d.ts +24 -0
- package/dist/forms/text-input/TextInput.js +74 -0
- package/dist/forms/time-picker/TimePicker.css +10 -0
- package/dist/forms/time-picker/TimePicker.d.ts +24 -0
- package/dist/forms/time-picker/TimePicker.js +140 -0
- package/dist/forms/time-picker/time-picker-dropdown/TimePickerDropdown.css +4 -0
- package/dist/forms/time-picker/time-picker-dropdown/TimePickerDropdown.d.ts +19 -0
- package/dist/forms/time-picker/time-picker-dropdown/TimePickerDropdown.js +202 -0
- package/dist/forms/time-picker/time-picker-dropdown/TimePickerInput.d.ts +9 -0
- package/dist/forms/time-picker/time-picker-dropdown/TimePickerInput.js +14 -0
- package/dist/index.d.ts +63 -0
- package/dist/index.js +60 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +7 -0
- package/dist/utils/setRef.d.ts +1 -0
- package/dist/utils/setRef.js +5 -0
- package/dist/utils/types.d.ts +29 -0
- package/dist/utils/types.js +0 -0
- package/dist/utils/useControlled.d.ts +7 -0
- package/dist/utils/useControlled.js +20 -0
- package/dist/utils/useForkRef.d.ts +2 -0
- package/dist/utils/useForkRef.js +15 -0
- package/dist/utils/useId.d.ts +1 -0
- package/dist/utils/useId.js +20 -0
- package/dist/utils/useOnClickOutside.d.ts +2 -0
- package/dist/utils/useOnClickOutside.js +20 -0
- package/package.json +1 -2
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import classnames from "classnames";
|
|
3
|
+
import { forwardRef, useEffect, useRef } from "react";
|
|
4
|
+
import { useId } from "../../utils/useId.js";
|
|
5
|
+
const TextInput = /*#__PURE__*/ forwardRef(({ disabled, required, readonly, placeholder, max, min, onBlur, onFocus, onInput, step, type, value, defaultValue, name, error, hint, label, labelClassName, icon, id: idProps, autoFocus, ...props }, ref)=>{
|
|
6
|
+
const id = useId(idProps);
|
|
7
|
+
const inputRef = useRef(null);
|
|
8
|
+
useEffect(()=>{
|
|
9
|
+
if (autoFocus && inputRef.current) {
|
|
10
|
+
const timer = setTimeout(()=>{
|
|
11
|
+
inputRef.current?.focus();
|
|
12
|
+
}, 0);
|
|
13
|
+
return ()=>clearTimeout(timer);
|
|
14
|
+
}
|
|
15
|
+
}, [
|
|
16
|
+
autoFocus
|
|
17
|
+
]);
|
|
18
|
+
const supported = [
|
|
19
|
+
'text',
|
|
20
|
+
'number',
|
|
21
|
+
'password',
|
|
22
|
+
'datetime-local'
|
|
23
|
+
];
|
|
24
|
+
const innerType = type && supported.includes(type) ? type : 'text';
|
|
25
|
+
const labelClasses = classnames('fwe-input-text', {
|
|
26
|
+
'fwe-input-text-icon': icon
|
|
27
|
+
}, labelClassName);
|
|
28
|
+
const hintClasses = classnames('fwe-input-text-info');
|
|
29
|
+
function handleChange(e) {
|
|
30
|
+
if (props.onChange) props.onChange(e);
|
|
31
|
+
}
|
|
32
|
+
return /*#__PURE__*/ jsxs("label", {
|
|
33
|
+
className: labelClasses,
|
|
34
|
+
htmlFor: id,
|
|
35
|
+
ref: ref,
|
|
36
|
+
children: [
|
|
37
|
+
/*#__PURE__*/ jsx("input", {
|
|
38
|
+
name: name,
|
|
39
|
+
disabled: disabled,
|
|
40
|
+
required: required,
|
|
41
|
+
readOnly: readonly,
|
|
42
|
+
placeholder: placeholder,
|
|
43
|
+
autoComplete: "off",
|
|
44
|
+
min: min,
|
|
45
|
+
max: max,
|
|
46
|
+
step: step,
|
|
47
|
+
onChange: handleChange,
|
|
48
|
+
onBlur: onBlur,
|
|
49
|
+
onFocus: onFocus,
|
|
50
|
+
onInput: onInput,
|
|
51
|
+
type: innerType,
|
|
52
|
+
value: value,
|
|
53
|
+
defaultValue: defaultValue,
|
|
54
|
+
id: id,
|
|
55
|
+
ref: inputRef,
|
|
56
|
+
...props
|
|
57
|
+
}),
|
|
58
|
+
icon,
|
|
59
|
+
/*#__PURE__*/ jsx("span", {
|
|
60
|
+
className: "fwe-input-text-label",
|
|
61
|
+
children: label
|
|
62
|
+
}),
|
|
63
|
+
hint && /*#__PURE__*/ jsx("span", {
|
|
64
|
+
className: hintClasses,
|
|
65
|
+
children: hint
|
|
66
|
+
}),
|
|
67
|
+
error && /*#__PURE__*/ jsx("span", {
|
|
68
|
+
className: "fwe-input-text-invalid",
|
|
69
|
+
children: error
|
|
70
|
+
})
|
|
71
|
+
]
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
export { TextInput };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import './TimePicker.scss';
|
|
2
|
+
import type React from 'react';
|
|
3
|
+
import { type ComponentPropsWithoutRef } from 'react';
|
|
4
|
+
export interface TimePickerOptions {
|
|
5
|
+
timeFormat?: '12' | '24';
|
|
6
|
+
showSeconds?: boolean;
|
|
7
|
+
minuteStepSize?: number;
|
|
8
|
+
range?: {
|
|
9
|
+
minValue: Date;
|
|
10
|
+
maxValue: Date;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export interface TimePickerProps extends Omit<ComponentPropsWithoutRef<'button'>, 'value' | 'defaultValue' | 'onChange'> {
|
|
14
|
+
error?: string;
|
|
15
|
+
hint?: string;
|
|
16
|
+
required?: boolean;
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
value?: Date;
|
|
19
|
+
defaultValue?: Date;
|
|
20
|
+
options?: TimePickerOptions;
|
|
21
|
+
formatDate?: (date: Date) => string;
|
|
22
|
+
onChange?: (date: Date) => void;
|
|
23
|
+
}
|
|
24
|
+
export declare const TimePicker: (props: TimePickerProps & React.RefAttributes<HTMLButtonElement>) => React.ReactElement | null;
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import "./TimePicker.css";
|
|
3
|
+
import { IconTime } from "@festo-ui/react-icons";
|
|
4
|
+
import classnames from "classnames";
|
|
5
|
+
import { forwardRef, useEffect, useMemo, useRef, useState } from "react";
|
|
6
|
+
import react_dom from "react-dom";
|
|
7
|
+
import { usePopper } from "react-popper";
|
|
8
|
+
import { useForkRef } from "../../utils/useForkRef.js";
|
|
9
|
+
import { useId } from "../../utils/useId.js";
|
|
10
|
+
import { TimePickerDropdown } from "./time-picker-dropdown/TimePickerDropdown.js";
|
|
11
|
+
const TimePicker = /*#__PURE__*/ forwardRef(({ error, hint, required, disabled, children, value, options, defaultValue, formatDate, onChange, id: idProps, ...props }, ref)=>{
|
|
12
|
+
const id = useId(idProps);
|
|
13
|
+
const innerFormatDate = formatDate ?? Intl.DateTimeFormat('default', {
|
|
14
|
+
hour: 'numeric',
|
|
15
|
+
minute: 'numeric',
|
|
16
|
+
...options?.showSeconds && {
|
|
17
|
+
second: 'numeric'
|
|
18
|
+
}
|
|
19
|
+
}).format;
|
|
20
|
+
const timeFormat = options?.timeFormat ?? '24';
|
|
21
|
+
const [referenceElement, setReferenceElement] = useState(null);
|
|
22
|
+
const [popperElement, setPopperElement] = useState(null);
|
|
23
|
+
const customModifier = useMemo(()=>({
|
|
24
|
+
name: 'offset',
|
|
25
|
+
options: {
|
|
26
|
+
offset: ({ placement })=>{
|
|
27
|
+
if ('bottom' === placement) return [
|
|
28
|
+
0,
|
|
29
|
+
-12
|
|
30
|
+
];
|
|
31
|
+
return [
|
|
32
|
+
0,
|
|
33
|
+
0
|
|
34
|
+
];
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}), []);
|
|
38
|
+
const { styles, attributes } = usePopper(referenceElement, popperElement, {
|
|
39
|
+
modifiers: [
|
|
40
|
+
customModifier
|
|
41
|
+
]
|
|
42
|
+
});
|
|
43
|
+
const buttonRef = useRef(null);
|
|
44
|
+
const allRefs = useForkRef(ref, buttonRef);
|
|
45
|
+
const labelRef = useRef(null);
|
|
46
|
+
const combinedLabelRef = useForkRef(labelRef, (r)=>setReferenceElement(r));
|
|
47
|
+
const timePickerRef = useRef(null);
|
|
48
|
+
const combinedTimePickerRef = useForkRef(timePickerRef, (r)=>setPopperElement(r));
|
|
49
|
+
const [open, setOpen] = useState(false);
|
|
50
|
+
const controlled = void 0 !== value;
|
|
51
|
+
const initialValue = controlled ? value : defaultValue;
|
|
52
|
+
const [innerValue, setInnerValue] = useState(initialValue ?? new Date());
|
|
53
|
+
useEffect(()=>{
|
|
54
|
+
if (void 0 !== value) {
|
|
55
|
+
value.setMilliseconds(0);
|
|
56
|
+
setInnerValue(value);
|
|
57
|
+
}
|
|
58
|
+
}, [
|
|
59
|
+
value
|
|
60
|
+
]);
|
|
61
|
+
function toggle(e) {
|
|
62
|
+
e?.preventDefault();
|
|
63
|
+
if (!disabled) setOpen((prevOpen)=>!prevOpen);
|
|
64
|
+
}
|
|
65
|
+
function handleDateChange(newDate) {
|
|
66
|
+
if (!controlled) setInnerValue(newDate);
|
|
67
|
+
if (onChange) onChange(newDate);
|
|
68
|
+
}
|
|
69
|
+
function handleClose(newDate) {
|
|
70
|
+
if (newDate) handleDateChange(newDate);
|
|
71
|
+
setOpen(false);
|
|
72
|
+
}
|
|
73
|
+
const container = labelRef?.current?.ownerDocument || document;
|
|
74
|
+
return /*#__PURE__*/ jsxs(Fragment, {
|
|
75
|
+
children: [
|
|
76
|
+
/*#__PURE__*/ jsx("button", {
|
|
77
|
+
type: "button",
|
|
78
|
+
ref: allRefs,
|
|
79
|
+
onClick: toggle,
|
|
80
|
+
disabled: disabled,
|
|
81
|
+
className: "fr-time-picker",
|
|
82
|
+
...props,
|
|
83
|
+
children: /*#__PURE__*/ jsxs("label", {
|
|
84
|
+
htmlFor: id,
|
|
85
|
+
ref: combinedLabelRef,
|
|
86
|
+
className: "fr-time-picker fwe-input-text fwe-input-text-icon",
|
|
87
|
+
children: [
|
|
88
|
+
/*#__PURE__*/ jsx(IconTime, {
|
|
89
|
+
className: classnames({
|
|
90
|
+
'fwe-color-hero': open && !disabled,
|
|
91
|
+
'fwe-color-control-disabled': disabled
|
|
92
|
+
})
|
|
93
|
+
}),
|
|
94
|
+
/*#__PURE__*/ jsx("input", {
|
|
95
|
+
id: id,
|
|
96
|
+
"aria-label": "picked time",
|
|
97
|
+
type: "text",
|
|
98
|
+
readOnly: true,
|
|
99
|
+
required: required,
|
|
100
|
+
className: classnames({
|
|
101
|
+
'fwe-border-hero': open
|
|
102
|
+
}),
|
|
103
|
+
value: innerFormatDate(innerValue),
|
|
104
|
+
disabled: disabled
|
|
105
|
+
}),
|
|
106
|
+
/*#__PURE__*/ jsx("span", {
|
|
107
|
+
className: "fwe-input-text-label",
|
|
108
|
+
children: children
|
|
109
|
+
}),
|
|
110
|
+
hint && /*#__PURE__*/ jsx("span", {
|
|
111
|
+
className: "fwe-input-text-info",
|
|
112
|
+
children: hint
|
|
113
|
+
}),
|
|
114
|
+
error && /*#__PURE__*/ jsx("span", {
|
|
115
|
+
className: "fwe-input-text-invalid",
|
|
116
|
+
children: error
|
|
117
|
+
})
|
|
118
|
+
]
|
|
119
|
+
})
|
|
120
|
+
}),
|
|
121
|
+
open && /*#__PURE__*/ react_dom.createPortal(/*#__PURE__*/ jsx(TimePickerDropdown, {
|
|
122
|
+
labelRef: labelRef,
|
|
123
|
+
ref: combinedTimePickerRef,
|
|
124
|
+
onClose: handleClose,
|
|
125
|
+
onDateChange: handleDateChange,
|
|
126
|
+
timeFormat: timeFormat,
|
|
127
|
+
showSeconds: options?.showSeconds,
|
|
128
|
+
minuteStepSize: options?.minuteStepSize,
|
|
129
|
+
range: options?.range,
|
|
130
|
+
date: innerValue,
|
|
131
|
+
style: {
|
|
132
|
+
...styles.popper,
|
|
133
|
+
minWidth: labelRef?.current?.scrollWidth
|
|
134
|
+
},
|
|
135
|
+
...attributes.popper
|
|
136
|
+
}), container.body)
|
|
137
|
+
]
|
|
138
|
+
});
|
|
139
|
+
});
|
|
140
|
+
export { TimePicker };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import './TimePickerDropdown.scss';
|
|
2
|
+
import type React from 'react';
|
|
3
|
+
import { type RefObject } from 'react';
|
|
4
|
+
interface TimePickerDropdownProps {
|
|
5
|
+
timeFormat: '12' | '24';
|
|
6
|
+
date: Date;
|
|
7
|
+
onDateChange: (date: Date) => void;
|
|
8
|
+
showSeconds?: boolean;
|
|
9
|
+
minuteStepSize?: number;
|
|
10
|
+
range?: {
|
|
11
|
+
minValue: Date;
|
|
12
|
+
maxValue: Date;
|
|
13
|
+
};
|
|
14
|
+
onClose: (date?: Date) => void;
|
|
15
|
+
style?: React.CSSProperties;
|
|
16
|
+
labelRef: RefObject<HTMLLabelElement>;
|
|
17
|
+
}
|
|
18
|
+
export declare const TimePickerDropdown: (props: TimePickerDropdownProps & React.RefAttributes<HTMLDivElement>) => React.ReactElement | null;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import "./TimePickerDropdown.css";
|
|
3
|
+
import { IconCollapse, IconExpand } from "@festo-ui/react-icons";
|
|
4
|
+
import classnames from "classnames";
|
|
5
|
+
import { forwardRef, useEffect, useRef, useState } from "react";
|
|
6
|
+
import { LinkButton } from "../../../components/link-button/LinkButton.js";
|
|
7
|
+
import { useForkRef } from "../../../utils/useForkRef.js";
|
|
8
|
+
import { useOnClickOutside } from "../../../utils/useOnClickOutside.js";
|
|
9
|
+
import { TimePickerInput } from "./TimePickerInput.js";
|
|
10
|
+
const TimePickerDropdown = /*#__PURE__*/ forwardRef(({ timeFormat, date, onDateChange, showSeconds, minuteStepSize, range, onClose, style, labelRef }, ref)=>{
|
|
11
|
+
const innerRef = useRef(null);
|
|
12
|
+
const combinedRef = useForkRef(ref, innerRef);
|
|
13
|
+
const hoursRef = useRef(null);
|
|
14
|
+
const [tmpHours, setTmpHours] = useState(null);
|
|
15
|
+
const [tmpMinutes, setTmpMinutes] = useState(null);
|
|
16
|
+
const [tmpSeconds, setTmpSeconds] = useState(null);
|
|
17
|
+
const [innerDate, setInnerDate] = useState(date);
|
|
18
|
+
useOnClickOutside(labelRef, ()=>onClose(innerDate), innerRef);
|
|
19
|
+
const min = 0;
|
|
20
|
+
const hourMax = '12' === timeFormat ? 12 : 23;
|
|
21
|
+
const minutesSecondsMax = 59;
|
|
22
|
+
let innerMinuteStepSize = 1;
|
|
23
|
+
if (minuteStepSize) {
|
|
24
|
+
if (minuteStepSize > 1 && minuteStepSize < 60) innerMinuteStepSize = Math.round(minuteStepSize);
|
|
25
|
+
}
|
|
26
|
+
useEffect(()=>{
|
|
27
|
+
requestAnimationFrame(()=>{
|
|
28
|
+
hoursRef.current?.focus();
|
|
29
|
+
});
|
|
30
|
+
}, []);
|
|
31
|
+
function handleKeyPress(e) {
|
|
32
|
+
if ('Escape' === e.key || 'Enter' === e.key) onClose('Enter' === e.key ? innerDate : void 0);
|
|
33
|
+
}
|
|
34
|
+
function limitRange(newDate) {
|
|
35
|
+
if (range) {
|
|
36
|
+
if (newDate > range.maxValue) return range.minValue;
|
|
37
|
+
if (newDate < range.minValue) return range.maxValue;
|
|
38
|
+
}
|
|
39
|
+
return newDate;
|
|
40
|
+
}
|
|
41
|
+
function handleHourIncrement(increment) {
|
|
42
|
+
let newDate = new Date(innerDate);
|
|
43
|
+
newDate.setHours(innerDate.getHours() + increment);
|
|
44
|
+
newDate = limitRange(newDate);
|
|
45
|
+
setInnerDate(newDate);
|
|
46
|
+
onDateChange(newDate);
|
|
47
|
+
setTmpHours(null);
|
|
48
|
+
}
|
|
49
|
+
function handleHourChange(e) {
|
|
50
|
+
let newDate = new Date(innerDate);
|
|
51
|
+
const hour = +e.target.value;
|
|
52
|
+
newDate.setHours(Math.min(Math.max(hour, min), hourMax));
|
|
53
|
+
newDate = limitRange(newDate);
|
|
54
|
+
setInnerDate(newDate);
|
|
55
|
+
setTmpHours(newDate.getHours().toString());
|
|
56
|
+
}
|
|
57
|
+
function handleMinuteIncrement(increment) {
|
|
58
|
+
let newDate = new Date(innerDate);
|
|
59
|
+
newDate.setMinutes(innerDate.getMinutes() + increment);
|
|
60
|
+
newDate = limitRange(newDate);
|
|
61
|
+
setInnerDate(newDate);
|
|
62
|
+
onDateChange(newDate);
|
|
63
|
+
setTmpMinutes(null);
|
|
64
|
+
}
|
|
65
|
+
function handleMinuteChange(e) {
|
|
66
|
+
let newDate = new Date(innerDate);
|
|
67
|
+
const minute = +e.target.value;
|
|
68
|
+
newDate.setMinutes(Math.min(Math.max(minute, min), minutesSecondsMax));
|
|
69
|
+
newDate = limitRange(newDate);
|
|
70
|
+
setInnerDate(newDate);
|
|
71
|
+
setTmpMinutes(newDate.getMinutes().toString());
|
|
72
|
+
}
|
|
73
|
+
function handleSecondIncrement(increment) {
|
|
74
|
+
let newDate = new Date(innerDate);
|
|
75
|
+
newDate.setSeconds(innerDate.getSeconds() + increment);
|
|
76
|
+
newDate = limitRange(newDate);
|
|
77
|
+
setInnerDate(newDate);
|
|
78
|
+
onDateChange(newDate);
|
|
79
|
+
setTmpSeconds(null);
|
|
80
|
+
}
|
|
81
|
+
function handleSecondChange(e) {
|
|
82
|
+
let newDate = new Date(innerDate);
|
|
83
|
+
const seconds = +e.target.value;
|
|
84
|
+
newDate.setSeconds(Math.min(Math.max(seconds, min), minutesSecondsMax));
|
|
85
|
+
newDate = limitRange(newDate);
|
|
86
|
+
setInnerDate(newDate);
|
|
87
|
+
setTmpSeconds(newDate.getSeconds().toString());
|
|
88
|
+
}
|
|
89
|
+
const hours = '12' === timeFormat ? (innerDate.getHours() + 11) % 12 + 1 : innerDate.getHours();
|
|
90
|
+
function toggleAmPm() {
|
|
91
|
+
const newDate = new Date(innerDate);
|
|
92
|
+
const currentHours = innerDate.getHours();
|
|
93
|
+
if (currentHours >= 0 && currentHours < 12) newDate.setHours(currentHours + 12);
|
|
94
|
+
else newDate.setHours(currentHours - 12);
|
|
95
|
+
setInnerDate(newDate);
|
|
96
|
+
onDateChange(newDate);
|
|
97
|
+
}
|
|
98
|
+
const formatNumberWithLeadingZero = (number)=>(number < 10 ? '0' : '') + number;
|
|
99
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
100
|
+
role: "dialog",
|
|
101
|
+
style: style,
|
|
102
|
+
ref: combinedRef,
|
|
103
|
+
className: classnames('fr-timepicker fwe-timepicker', {
|
|
104
|
+
'fwe-timepicker-am-pm': '12' === timeFormat
|
|
105
|
+
}),
|
|
106
|
+
onKeyDown: (e)=>handleKeyPress(e),
|
|
107
|
+
tabIndex: -1,
|
|
108
|
+
children: [
|
|
109
|
+
/*#__PURE__*/ jsxs("div", {
|
|
110
|
+
className: "fwe-timepicker-spinners",
|
|
111
|
+
children: [
|
|
112
|
+
/*#__PURE__*/ jsxs("div", {
|
|
113
|
+
className: "fwe-timepicker-spinners-hours",
|
|
114
|
+
children: [
|
|
115
|
+
/*#__PURE__*/ jsx(LinkButton, {
|
|
116
|
+
"aria-label": "hour up",
|
|
117
|
+
className: "fwe-dark",
|
|
118
|
+
onClick: ()=>handleHourIncrement(1),
|
|
119
|
+
iconOnly: true,
|
|
120
|
+
icon: /*#__PURE__*/ jsx(IconExpand, {})
|
|
121
|
+
}),
|
|
122
|
+
/*#__PURE__*/ jsx(TimePickerInput, {
|
|
123
|
+
"aria-label": "hours value",
|
|
124
|
+
min: min,
|
|
125
|
+
max: hourMax,
|
|
126
|
+
value: tmpHours ?? formatNumberWithLeadingZero(hours),
|
|
127
|
+
onInput: handleHourChange,
|
|
128
|
+
ref: hoursRef
|
|
129
|
+
}),
|
|
130
|
+
/*#__PURE__*/ jsx(LinkButton, {
|
|
131
|
+
"aria-label": "hour down",
|
|
132
|
+
className: "fwe-dark",
|
|
133
|
+
onClick: ()=>handleHourIncrement(-1),
|
|
134
|
+
iconOnly: true,
|
|
135
|
+
icon: /*#__PURE__*/ jsx(IconCollapse, {})
|
|
136
|
+
})
|
|
137
|
+
]
|
|
138
|
+
}),
|
|
139
|
+
/*#__PURE__*/ jsxs("div", {
|
|
140
|
+
className: "fwe-timepicker-spinners-minutes",
|
|
141
|
+
children: [
|
|
142
|
+
/*#__PURE__*/ jsx(LinkButton, {
|
|
143
|
+
"aria-label": "minute up",
|
|
144
|
+
className: "fwe-dark",
|
|
145
|
+
onClick: ()=>handleMinuteIncrement(innerMinuteStepSize),
|
|
146
|
+
iconOnly: true,
|
|
147
|
+
icon: /*#__PURE__*/ jsx(IconExpand, {})
|
|
148
|
+
}),
|
|
149
|
+
/*#__PURE__*/ jsx(TimePickerInput, {
|
|
150
|
+
"aria-label": "minutes value",
|
|
151
|
+
min: min,
|
|
152
|
+
max: minutesSecondsMax,
|
|
153
|
+
value: tmpMinutes ?? formatNumberWithLeadingZero(innerDate.getMinutes()),
|
|
154
|
+
onInput: handleMinuteChange
|
|
155
|
+
}),
|
|
156
|
+
/*#__PURE__*/ jsx(LinkButton, {
|
|
157
|
+
"aria-label": "minute down",
|
|
158
|
+
className: "fwe-dark",
|
|
159
|
+
onClick: ()=>handleMinuteIncrement(-innerMinuteStepSize),
|
|
160
|
+
iconOnly: true,
|
|
161
|
+
icon: /*#__PURE__*/ jsx(IconCollapse, {})
|
|
162
|
+
})
|
|
163
|
+
]
|
|
164
|
+
}),
|
|
165
|
+
showSeconds && /*#__PURE__*/ jsxs("div", {
|
|
166
|
+
className: "fwe-timepicker-spinners-seconds",
|
|
167
|
+
children: [
|
|
168
|
+
/*#__PURE__*/ jsx(LinkButton, {
|
|
169
|
+
"aria-label": "seconds up",
|
|
170
|
+
className: "fwe-dark",
|
|
171
|
+
onClick: ()=>handleSecondIncrement(1),
|
|
172
|
+
iconOnly: true,
|
|
173
|
+
icon: /*#__PURE__*/ jsx(IconExpand, {})
|
|
174
|
+
}),
|
|
175
|
+
/*#__PURE__*/ jsx(TimePickerInput, {
|
|
176
|
+
"aria-label": "seconds value",
|
|
177
|
+
min: min,
|
|
178
|
+
max: minutesSecondsMax,
|
|
179
|
+
value: tmpSeconds ?? formatNumberWithLeadingZero(innerDate.getSeconds()),
|
|
180
|
+
onInput: handleSecondChange
|
|
181
|
+
}),
|
|
182
|
+
/*#__PURE__*/ jsx(LinkButton, {
|
|
183
|
+
"aria-label": "minute down",
|
|
184
|
+
className: "fwe-dark",
|
|
185
|
+
onClick: ()=>handleSecondIncrement(-1),
|
|
186
|
+
iconOnly: true,
|
|
187
|
+
icon: /*#__PURE__*/ jsx(IconCollapse, {})
|
|
188
|
+
})
|
|
189
|
+
]
|
|
190
|
+
})
|
|
191
|
+
]
|
|
192
|
+
}),
|
|
193
|
+
'12' === timeFormat && /*#__PURE__*/ jsx("button", {
|
|
194
|
+
onClick: toggleAmPm,
|
|
195
|
+
type: "button",
|
|
196
|
+
className: "fwe-btn fwe-ml-m",
|
|
197
|
+
children: innerDate.getHours() >= 12 ? 'PM' : 'AM'
|
|
198
|
+
})
|
|
199
|
+
]
|
|
200
|
+
});
|
|
201
|
+
});
|
|
202
|
+
export { TimePickerDropdown };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface TimePickerInputProps {
|
|
2
|
+
min: number;
|
|
3
|
+
value: string | number;
|
|
4
|
+
max: number;
|
|
5
|
+
onInput: React.FormEventHandler<HTMLInputElement>;
|
|
6
|
+
'aria-label': string;
|
|
7
|
+
}
|
|
8
|
+
export declare const TimePickerInput: (props: TimePickerInputProps & import("react").RefAttributes<HTMLInputElement>) => React.ReactElement | null;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
const TimePickerInput = /*#__PURE__*/ forwardRef(({ min, max, value, onInput, 'aria-label': ariaLabel }, ref)=>/*#__PURE__*/ jsx("input", {
|
|
4
|
+
"aria-label": ariaLabel,
|
|
5
|
+
className: "fwe-timepicker-hide-spinners",
|
|
6
|
+
type: "number",
|
|
7
|
+
min: min,
|
|
8
|
+
step: 1,
|
|
9
|
+
value: value,
|
|
10
|
+
max: max,
|
|
11
|
+
onInput: onInput,
|
|
12
|
+
ref: ref
|
|
13
|
+
}));
|
|
14
|
+
export { TimePickerInput };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
export { Accordion, type AccordionProps, } from './components/accordion/Accordion';
|
|
2
|
+
export { AccordionHeader } from './components/accordion/accordion-header/AccordionHeader';
|
|
3
|
+
export { AccordionItem, type AccordionItemProps, } from './components/accordion/accordion-item/AccordionItem';
|
|
4
|
+
export { AccordionItemBody } from './components/accordion/accordion-item/accordion-item-body/AccordionItemBody';
|
|
5
|
+
export { AccordionItemHeader } from './components/accordion/accordion-item/accordion-item-header/AccordionItemHeader';
|
|
6
|
+
export { Breadcrumb, type BreadcrumbProps, } from './components/breadcrumb/Breadcrumb';
|
|
7
|
+
export { Button, type ButtonProps } from './components/button/Button';
|
|
8
|
+
export { Card, type CardProps } from './components/card/Card';
|
|
9
|
+
export { CardBody, type CardBodyProps } from './components/card/CardBody';
|
|
10
|
+
export { CardHeader, type CardHeaderProps } from './components/card/CardHeader';
|
|
11
|
+
export { CardNotification, type CardNotificationProps, } from './components/card/CardNotification';
|
|
12
|
+
export { Chip, type ChipProps, ChipType } from './components/chips/chip/Chip';
|
|
13
|
+
export { ChipContainer, type ChipContainerProps, } from './components/chips/chip-container/ChipContainer';
|
|
14
|
+
export { LinkButton, type LinkButtonProps, } from './components/link-button/LinkButton';
|
|
15
|
+
export { LoadingIndicator, type LoadingIndicatorProps, } from './components/loading-indicator/LoadingIndicator';
|
|
16
|
+
export { MobileFlyout, type MobileFlyoutProps, } from './components/mobile-flyout/MobileFlyout';
|
|
17
|
+
export { MobileFlyoutItem, type MobileFlyoutItemBaseProps, type MobileFlyoutItemProps, } from './components/mobile-flyout/mobile-flyout-item/MobileFlyoutItem';
|
|
18
|
+
export { MobileFlyoutPage, type MobileFlyoutPageProps, } from './components/mobile-flyout/mobile-flyout-page/MobileFlyoutPage';
|
|
19
|
+
export { AlertModal, type AlertModalProps, } from './components/modals/AlertModal';
|
|
20
|
+
export { ConfirmModal, type ConfirmModalProps, } from './components/modals/ConfirmModal';
|
|
21
|
+
export { CustomModal, type CustomModalProps, } from './components/modals/CustomModal';
|
|
22
|
+
export { ImageGallery } from './components/modals/image-gallery/ImageGallery';
|
|
23
|
+
export { ImageGalleryContent } from './components/modals/image-gallery/ImageGalleryContent';
|
|
24
|
+
export { ImageGallerySwiper } from './components/modals/image-gallery/ImageGallerySwiper';
|
|
25
|
+
export { ImageGalleryThumbsSwiper } from './components/modals/image-gallery/ImageGalleryThumbsSwiper';
|
|
26
|
+
export { ImageGalleryItem } from './components/modals/image-gallery/image-gallery-item/ImageGalleryItem';
|
|
27
|
+
export { ModalBase, type ModalBaseProps, } from './components/modals/ModalBase';
|
|
28
|
+
export { Prompt, type PromptProps } from './components/modals/Prompt';
|
|
29
|
+
export { Pagination, type PaginationProps, PaginationType, } from './components/pagination/Pagination';
|
|
30
|
+
export type { PopoverProps } from './components/popovers/popover/Popover';
|
|
31
|
+
export { Popover } from './components/popovers/popover/Popover';
|
|
32
|
+
export type { PopoverMenuProps } from './components/popovers/popover-menu/PopoverMenu';
|
|
33
|
+
export { PopoverMenu } from './components/popovers/popover-menu/PopoverMenu';
|
|
34
|
+
export { PopoverMenuContext } from './components/popovers/popover-menu/PopoverMenuContext';
|
|
35
|
+
export type { PopoverMenuItemProps } from './components/popovers/popover-menu-item/PopoverMenuItem';
|
|
36
|
+
export { PopoverMenuItem } from './components/popovers/popover-menu-item/PopoverMenuItem';
|
|
37
|
+
export type { TooltipProps } from './components/popovers/tooltip/Tooltip';
|
|
38
|
+
export { Tooltip } from './components/popovers/tooltip/Tooltip';
|
|
39
|
+
export { Progress, type ProgressProps } from './components/progress/Progress';
|
|
40
|
+
export { SearchInput, type SearchInputProps, } from './components/search-input/SearchInput';
|
|
41
|
+
export { SearchSuggestion } from './components/search-input/SearchSuggestion';
|
|
42
|
+
export { Snackbar } from './components/snackbar/Snackbar';
|
|
43
|
+
export { addSnackbar, SnackbarProvider, } from './components/snackbar/SnackbarProvider';
|
|
44
|
+
export { useSnackbar } from './components/snackbar/useSnackbar';
|
|
45
|
+
export { StepperHorizontal, type StepperHorizontalProps, } from './components/stepper-horizontal/StepperHorizontal';
|
|
46
|
+
export { StepHorizontal, type StepHorizontalProps, } from './components/stepper-horizontal/step-horizontal/StepHorizontal';
|
|
47
|
+
export { StepperVertical, type StepperVerticalProps, } from './components/stepper-vertical/StepperVertical';
|
|
48
|
+
export { StepVertical, type StepVerticalProps, } from './components/stepper-vertical/step-vertical/StepVertical';
|
|
49
|
+
export { Tabs, type TabsConfiguration, type TabsProps, type TabViewType, } from './components/tab/Tabs';
|
|
50
|
+
export { TabPane, type TabPaneProps } from './components/tab/tab-pane/TabPane';
|
|
51
|
+
export { TableHeaderCell, type TableHeaderCellProps, } from './components/table-header-cell/TableHeaderCell';
|
|
52
|
+
export { Checkbox, type CheckboxProps } from './forms/checkbox/Checkbox';
|
|
53
|
+
export { RadioButton, type RadioProps, } from './forms/radio/RadioButton';
|
|
54
|
+
export { RadioGroup, type RadioGroupProps } from './forms/radio/RadioGroup';
|
|
55
|
+
export { Segment, type SegmentComponentConfiguration, type SegmentProps, } from './forms/segment/Segment';
|
|
56
|
+
export { SegmentControl, type SegmentControlProps, } from './forms/segment/segment-control/SegmentControl';
|
|
57
|
+
export { Select, type SelectProps } from './forms/select/Select';
|
|
58
|
+
export { SelectOption, type SelectOptionProps, type SelectOptionType, } from './forms/select/select-option/SelectOption';
|
|
59
|
+
export { Slider, type SliderProps } from './forms/slider/Slider';
|
|
60
|
+
export { Switch, type SwitchProps } from './forms/switch/Switch';
|
|
61
|
+
export { TextArea, type TextAreaProps } from './forms/text-area/TextArea';
|
|
62
|
+
export { TextInput, type TextInputProps } from './forms/text-input/TextInput';
|
|
63
|
+
export { TimePicker, type TimePickerOptions, type TimePickerProps, } from './forms/time-picker/TimePicker';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { Accordion } from "./components/accordion/Accordion.js";
|
|
2
|
+
import { AccordionHeader } from "./components/accordion/accordion-header/AccordionHeader.js";
|
|
3
|
+
import { AccordionItem } from "./components/accordion/accordion-item/AccordionItem.js";
|
|
4
|
+
import { AccordionItemBody } from "./components/accordion/accordion-item/accordion-item-body/AccordionItemBody.js";
|
|
5
|
+
import { AccordionItemHeader } from "./components/accordion/accordion-item/accordion-item-header/AccordionItemHeader.js";
|
|
6
|
+
import { Breadcrumb } from "./components/breadcrumb/Breadcrumb.js";
|
|
7
|
+
import { Button } from "./components/button/Button.js";
|
|
8
|
+
import { Card } from "./components/card/Card.js";
|
|
9
|
+
import { CardBody } from "./components/card/CardBody.js";
|
|
10
|
+
import { CardHeader } from "./components/card/CardHeader.js";
|
|
11
|
+
import { CardNotification } from "./components/card/CardNotification.js";
|
|
12
|
+
import { Chip, ChipType } from "./components/chips/chip/Chip.js";
|
|
13
|
+
import { ChipContainer } from "./components/chips/chip-container/ChipContainer.js";
|
|
14
|
+
import { LinkButton } from "./components/link-button/LinkButton.js";
|
|
15
|
+
import { LoadingIndicator } from "./components/loading-indicator/LoadingIndicator.js";
|
|
16
|
+
import { MobileFlyout } from "./components/mobile-flyout/MobileFlyout.js";
|
|
17
|
+
import { MobileFlyoutItem } from "./components/mobile-flyout/mobile-flyout-item/MobileFlyoutItem.js";
|
|
18
|
+
import { MobileFlyoutPage } from "./components/mobile-flyout/mobile-flyout-page/MobileFlyoutPage.js";
|
|
19
|
+
import { AlertModal } from "./components/modals/AlertModal.js";
|
|
20
|
+
import { ConfirmModal } from "./components/modals/ConfirmModal.js";
|
|
21
|
+
import { CustomModal } from "./components/modals/CustomModal.js";
|
|
22
|
+
import { ImageGallery } from "./components/modals/image-gallery/ImageGallery.js";
|
|
23
|
+
import { ImageGalleryContent } from "./components/modals/image-gallery/ImageGalleryContent.js";
|
|
24
|
+
import { ImageGallerySwiper } from "./components/modals/image-gallery/ImageGallerySwiper.js";
|
|
25
|
+
import { ImageGalleryThumbsSwiper } from "./components/modals/image-gallery/ImageGalleryThumbsSwiper.js";
|
|
26
|
+
import { ImageGalleryItem } from "./components/modals/image-gallery/image-gallery-item/ImageGalleryItem.js";
|
|
27
|
+
import { ModalBase } from "./components/modals/ModalBase.js";
|
|
28
|
+
import { Prompt } from "./components/modals/Prompt.js";
|
|
29
|
+
import { Pagination, PaginationType } from "./components/pagination/Pagination.js";
|
|
30
|
+
import { Popover } from "./components/popovers/popover/Popover.js";
|
|
31
|
+
import { PopoverMenu } from "./components/popovers/popover-menu/PopoverMenu.js";
|
|
32
|
+
import { PopoverMenuContext } from "./components/popovers/popover-menu/PopoverMenuContext.js";
|
|
33
|
+
import { PopoverMenuItem } from "./components/popovers/popover-menu-item/PopoverMenuItem.js";
|
|
34
|
+
import { Tooltip } from "./components/popovers/tooltip/Tooltip.js";
|
|
35
|
+
import { Progress } from "./components/progress/Progress.js";
|
|
36
|
+
import { SearchInput } from "./components/search-input/SearchInput.js";
|
|
37
|
+
import { SearchSuggestion } from "./components/search-input/SearchSuggestion.js";
|
|
38
|
+
import { Snackbar } from "./components/snackbar/Snackbar.js";
|
|
39
|
+
import { SnackbarProvider, addSnackbar } from "./components/snackbar/SnackbarProvider.js";
|
|
40
|
+
import { useSnackbar } from "./components/snackbar/useSnackbar.js";
|
|
41
|
+
import { StepperHorizontal } from "./components/stepper-horizontal/StepperHorizontal.js";
|
|
42
|
+
import { StepHorizontal } from "./components/stepper-horizontal/step-horizontal/StepHorizontal.js";
|
|
43
|
+
import { StepperVertical } from "./components/stepper-vertical/StepperVertical.js";
|
|
44
|
+
import { StepVertical } from "./components/stepper-vertical/step-vertical/StepVertical.js";
|
|
45
|
+
import { Tabs } from "./components/tab/Tabs.js";
|
|
46
|
+
import { TabPane } from "./components/tab/tab-pane/TabPane.js";
|
|
47
|
+
import { TableHeaderCell } from "./components/table-header-cell/TableHeaderCell.js";
|
|
48
|
+
import { Checkbox } from "./forms/checkbox/Checkbox.js";
|
|
49
|
+
import { RadioButton } from "./forms/radio/RadioButton.js";
|
|
50
|
+
import { RadioGroup } from "./forms/radio/RadioGroup.js";
|
|
51
|
+
import { Segment } from "./forms/segment/Segment.js";
|
|
52
|
+
import { SegmentControl } from "./forms/segment/segment-control/SegmentControl.js";
|
|
53
|
+
import { Select } from "./forms/select/Select.js";
|
|
54
|
+
import { SelectOption } from "./forms/select/select-option/SelectOption.js";
|
|
55
|
+
import { Slider } from "./forms/slider/Slider.js";
|
|
56
|
+
import { Switch } from "./forms/switch/Switch.js";
|
|
57
|
+
import { TextArea } from "./forms/text-area/TextArea.js";
|
|
58
|
+
import { TextInput } from "./forms/text-input/TextInput.js";
|
|
59
|
+
import { TimePicker } from "./forms/time-picker/TimePicker.js";
|
|
60
|
+
export { Accordion, AccordionHeader, AccordionItem, AccordionItemBody, AccordionItemHeader, AlertModal, Breadcrumb, Button, Card, CardBody, CardHeader, CardNotification, Checkbox, Chip, ChipContainer, ChipType, ConfirmModal, CustomModal, ImageGallery, ImageGalleryContent, ImageGalleryItem, ImageGallerySwiper, ImageGalleryThumbsSwiper, LinkButton, LoadingIndicator, MobileFlyout, MobileFlyoutItem, MobileFlyoutPage, ModalBase, Pagination, PaginationType, Popover, PopoverMenu, PopoverMenuContext, PopoverMenuItem, Progress, Prompt, RadioButton, RadioGroup, SearchInput, SearchSuggestion, Segment, SegmentControl, Select, SelectOption, Slider, Snackbar, SnackbarProvider, StepHorizontal, StepVertical, StepperHorizontal, StepperVertical, Switch, TabPane, TableHeaderCell, Tabs, TextArea, TextInput, TimePicker, Tooltip, addSnackbar, useSnackbar };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const provideDiv: () => HTMLDivElement;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function setRef<T>(ref: React.ForwardedRef<T> | undefined, value: any): void;
|