@festo-ui/react 9.0.0-dev.718 → 9.0.0-dev.720
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,5 @@
|
|
|
1
|
+
import type { ClassNamePropsWithChildren } from '../../utils/types';
|
|
2
|
+
export interface CardBodyProps extends ClassNamePropsWithChildren {
|
|
3
|
+
text: string;
|
|
4
|
+
}
|
|
5
|
+
export declare function CardBody({ children, text, className }: CardBodyProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import classnames from "classnames";
|
|
3
|
+
function CardBody({ children, text, className }) {
|
|
4
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
5
|
+
className: classnames('fwe-card-body', className),
|
|
6
|
+
children: [
|
|
7
|
+
/*#__PURE__*/ jsx("div", {
|
|
8
|
+
className: "fwe-card-text",
|
|
9
|
+
children: text
|
|
10
|
+
}),
|
|
11
|
+
children
|
|
12
|
+
]
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
export { CardBody };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ClassNameProps, Image } from '../../utils/types';
|
|
2
|
+
export interface CardHeaderProps extends ClassNameProps {
|
|
3
|
+
title: string;
|
|
4
|
+
subtitle?: string;
|
|
5
|
+
action?: React.ReactNode;
|
|
6
|
+
image?: Image;
|
|
7
|
+
}
|
|
8
|
+
export declare function CardHeader({ title, subtitle, action, image, className, }: CardHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import classnames from "classnames";
|
|
3
|
+
function CardHeader({ title, subtitle, action, image, className }) {
|
|
4
|
+
return /*#__PURE__*/ jsxs(Fragment, {
|
|
5
|
+
children: [
|
|
6
|
+
image ? /*#__PURE__*/ jsx("img", {
|
|
7
|
+
alt: image.alt,
|
|
8
|
+
className: `fwe-card-img-${'3/2' === image.aspectRatio ? '32' : '169'}`,
|
|
9
|
+
src: image.src
|
|
10
|
+
}) : null,
|
|
11
|
+
/*#__PURE__*/ jsxs("div", {
|
|
12
|
+
className: classnames('fwe-card-header', className),
|
|
13
|
+
children: [
|
|
14
|
+
/*#__PURE__*/ jsxs("div", {
|
|
15
|
+
className: "fwe-card-title",
|
|
16
|
+
children: [
|
|
17
|
+
/*#__PURE__*/ jsx("h5", {
|
|
18
|
+
children: title
|
|
19
|
+
}),
|
|
20
|
+
subtitle && /*#__PURE__*/ jsx("p", {
|
|
21
|
+
children: subtitle
|
|
22
|
+
})
|
|
23
|
+
]
|
|
24
|
+
}),
|
|
25
|
+
action
|
|
26
|
+
]
|
|
27
|
+
})
|
|
28
|
+
]
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
export { CardHeader };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ClassNameProps } from '../../utils/types';
|
|
2
|
+
export interface CardNotificationProps extends ClassNameProps {
|
|
3
|
+
title: string;
|
|
4
|
+
message?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function CardNotification({ className, title, message, }: CardNotificationProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { IconWarning } from "@festo-ui/react-icons";
|
|
3
|
+
import classnames from "classnames";
|
|
4
|
+
function CardNotification({ className, title, message }) {
|
|
5
|
+
const classes = classnames('fwe-card-notification', className);
|
|
6
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
7
|
+
className: classes,
|
|
8
|
+
children: [
|
|
9
|
+
/*#__PURE__*/ jsx(IconWarning, {
|
|
10
|
+
size: 24
|
|
11
|
+
}),
|
|
12
|
+
/*#__PURE__*/ jsxs("div", {
|
|
13
|
+
className: "fwe-card-title",
|
|
14
|
+
children: [
|
|
15
|
+
/*#__PURE__*/ jsx("h6", {
|
|
16
|
+
children: title
|
|
17
|
+
}),
|
|
18
|
+
message && /*#__PURE__*/ jsx("p", {
|
|
19
|
+
children: message
|
|
20
|
+
})
|
|
21
|
+
]
|
|
22
|
+
})
|
|
23
|
+
]
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
export { CardNotification };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { ClassNamePropsWithChildren } from '../../../utils/types';
|
|
3
|
+
export declare enum ChipType {
|
|
4
|
+
Choice = 0,
|
|
5
|
+
Category = 1,
|
|
6
|
+
Filter = 2,
|
|
7
|
+
Readonly = 3
|
|
8
|
+
}
|
|
9
|
+
export interface ChipProps extends ClassNamePropsWithChildren {
|
|
10
|
+
readonly type?: ChipType;
|
|
11
|
+
readonly icon?: React.ReactNode;
|
|
12
|
+
readonly selected?: boolean;
|
|
13
|
+
readonly disabled?: boolean;
|
|
14
|
+
readonly large?: boolean;
|
|
15
|
+
readonly onClick?: (e: React.MouseEvent<HTMLElement, MouseEvent>) => void;
|
|
16
|
+
}
|
|
17
|
+
export declare function Chip({ type, selected, disabled, large, icon, children, onClick, className, }: ChipProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import classnames from "classnames";
|
|
3
|
+
import { IconWrapper } from "../../icon-wrapper/IconWrapper.js";
|
|
4
|
+
var Chip_ChipType = /*#__PURE__*/ function(ChipType) {
|
|
5
|
+
ChipType[ChipType["Choice"] = 0] = "Choice";
|
|
6
|
+
ChipType[ChipType["Category"] = 1] = "Category";
|
|
7
|
+
ChipType[ChipType["Filter"] = 2] = "Filter";
|
|
8
|
+
ChipType[ChipType["Readonly"] = 3] = "Readonly";
|
|
9
|
+
return ChipType;
|
|
10
|
+
}({});
|
|
11
|
+
function Chip({ type = 0, selected = false, disabled = false, large = false, icon, children, onClick, className }) {
|
|
12
|
+
const classes = classnames('fr-chip', 'fwe-chip', {
|
|
13
|
+
'fwe-selected': selected
|
|
14
|
+
}, {
|
|
15
|
+
'fwe-disabled': disabled
|
|
16
|
+
}, {
|
|
17
|
+
'fwe-chip-lg': large
|
|
18
|
+
}, {
|
|
19
|
+
'fwe-category': 1 === type
|
|
20
|
+
}, {
|
|
21
|
+
'fwe-filter': 2 === type
|
|
22
|
+
}, {
|
|
23
|
+
'fwe-readonly': 3 === type
|
|
24
|
+
}, className);
|
|
25
|
+
return /*#__PURE__*/ jsxs("button", {
|
|
26
|
+
type: "button",
|
|
27
|
+
className: classes,
|
|
28
|
+
onClick: onClick,
|
|
29
|
+
disabled: disabled,
|
|
30
|
+
children: [
|
|
31
|
+
/*#__PURE__*/ jsx(IconWrapper, {
|
|
32
|
+
icon: icon
|
|
33
|
+
}),
|
|
34
|
+
children
|
|
35
|
+
]
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
export { Chip, Chip_ChipType as ChipType };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ClassNamePropsWithChildren } from '../../../utils/types';
|
|
2
|
+
export interface ChipContainerProps extends ClassNamePropsWithChildren {
|
|
3
|
+
large?: boolean;
|
|
4
|
+
}
|
|
5
|
+
export declare function ChipContainer({ large, children, className, }: ChipContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import classnames from "classnames";
|
|
3
|
+
function ChipContainer({ large = false, children, className }) {
|
|
4
|
+
const classes = classnames('fwe-chip-container', {
|
|
5
|
+
'fwe-chip-container-lg': large
|
|
6
|
+
}, className);
|
|
7
|
+
return /*#__PURE__*/ jsx("div", {
|
|
8
|
+
className: classes,
|
|
9
|
+
children: children
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
export { ChipContainer };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
function IconWrapper({ icon }) {
|
|
3
|
+
if (!icon) return null;
|
|
4
|
+
if ('string' == typeof icon) {
|
|
5
|
+
let iconName = icon;
|
|
6
|
+
if (!icon.startsWith('fwe-icon-')) iconName = `fwe-icon-${icon}`;
|
|
7
|
+
return /*#__PURE__*/ jsx("i", {
|
|
8
|
+
className: `fwe-icon ${iconName}`
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
return icon;
|
|
12
|
+
}
|
|
13
|
+
export { IconWrapper };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
export interface LinkButtonProps extends ComponentPropsWithoutRef<'button'> {
|
|
3
|
+
disabled?: boolean;
|
|
4
|
+
icon?: React.ReactNode;
|
|
5
|
+
onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
6
|
+
iconOnly?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const LinkButton: (props: LinkButtonProps & import("react").RefAttributes<HTMLButtonElement>) => React.ReactElement | null;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import classnames from "classnames";
|
|
3
|
+
import { forwardRef } from "react";
|
|
4
|
+
import { IconWrapper } from "../icon-wrapper/IconWrapper.js";
|
|
5
|
+
const LinkButton = /*#__PURE__*/ forwardRef(({ icon, onClick, disabled = false, children, iconOnly = false, className, ...props }, ref)=>{
|
|
6
|
+
const classes = classnames('fwe-btn', 'fwe-btn-link', {
|
|
7
|
+
'fwe-disabled': disabled
|
|
8
|
+
}, {
|
|
9
|
+
'fwe-btn-icon': iconOnly
|
|
10
|
+
}, className);
|
|
11
|
+
return /*#__PURE__*/ jsxs("button", {
|
|
12
|
+
onClick: onClick,
|
|
13
|
+
type: "button",
|
|
14
|
+
className: classes,
|
|
15
|
+
disabled: disabled,
|
|
16
|
+
ref: ref,
|
|
17
|
+
...props,
|
|
18
|
+
children: [
|
|
19
|
+
/*#__PURE__*/ jsx(IconWrapper, {
|
|
20
|
+
icon: icon
|
|
21
|
+
}),
|
|
22
|
+
!iconOnly && children
|
|
23
|
+
]
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
export { LinkButton };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef } from 'react';
|
|
2
|
+
export interface LoadingIndicatorProps extends ComponentPropsWithRef<'div'> {
|
|
3
|
+
size: 'large' | 'medium' | 'small';
|
|
4
|
+
}
|
|
5
|
+
export declare const LoadingIndicator: (props: LoadingIndicatorProps & import("react").RefAttributes<HTMLDivElement>) => React.ReactElement | null;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import classnames from "classnames";
|
|
3
|
+
import { forwardRef } from "react";
|
|
4
|
+
const LoadingIndicator = /*#__PURE__*/ forwardRef(({ size = 'large', children, className, ...props }, ref)=>{
|
|
5
|
+
const classes = classnames('fwe-waiting-indicator', {
|
|
6
|
+
'fwe-waiting-indicator-md': 'medium' === size
|
|
7
|
+
}, {
|
|
8
|
+
'fwe-waiting-indicator-sm': 'small' === size
|
|
9
|
+
});
|
|
10
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
11
|
+
className: classnames('fwe-waiting-container', {
|
|
12
|
+
'fwe-waiting-container-sm': 'small' === size
|
|
13
|
+
}, className),
|
|
14
|
+
ref: ref,
|
|
15
|
+
...props,
|
|
16
|
+
children: [
|
|
17
|
+
/*#__PURE__*/ jsxs("div", {
|
|
18
|
+
className: classes,
|
|
19
|
+
children: [
|
|
20
|
+
/*#__PURE__*/ jsx("div", {
|
|
21
|
+
className: "fwe-waiting-circle-1"
|
|
22
|
+
}),
|
|
23
|
+
/*#__PURE__*/ jsx("div", {
|
|
24
|
+
className: "fwe-waiting-circle-2"
|
|
25
|
+
}),
|
|
26
|
+
/*#__PURE__*/ jsx("div", {
|
|
27
|
+
className: "fwe-waiting-circle-3"
|
|
28
|
+
}),
|
|
29
|
+
/*#__PURE__*/ jsx("div", {
|
|
30
|
+
className: "fwe-waiting-circle-4"
|
|
31
|
+
})
|
|
32
|
+
]
|
|
33
|
+
}),
|
|
34
|
+
children && /*#__PURE__*/ jsx("div", {
|
|
35
|
+
className: "fwe-waiting-content-container",
|
|
36
|
+
children: children
|
|
37
|
+
})
|
|
38
|
+
]
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
export { LoadingIndicator };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
export interface MobileFlyoutProps extends Omit<ComponentPropsWithoutRef<'div'>, 'onChange'> {
|
|
3
|
+
open?: boolean;
|
|
4
|
+
defaultOpen?: boolean;
|
|
5
|
+
visible?: string[];
|
|
6
|
+
defaultVisible?: string[];
|
|
7
|
+
onOpenChange?: (value: boolean) => void;
|
|
8
|
+
onVisibleChange?: (value: string) => void;
|
|
9
|
+
back?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare const MobileFlyout: (props: MobileFlyoutProps & import("react").RefAttributes<HTMLDivElement>) => React.ReactElement | null;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import classnames from "classnames";
|
|
3
|
+
import { forwardRef, useCallback, useMemo, useRef } from "react";
|
|
4
|
+
import { useControlled } from "../../utils/useControlled.js";
|
|
5
|
+
import { useForkRef } from "../../utils/useForkRef.js";
|
|
6
|
+
import { useOnClickOutside } from "../../utils/useOnClickOutside.js";
|
|
7
|
+
import { MobileFlyoutContext } from "./MobileFlyoutContext.js";
|
|
8
|
+
const defaultVisibleValue = [
|
|
9
|
+
'root'
|
|
10
|
+
];
|
|
11
|
+
const MobileFlyout = /*#__PURE__*/ forwardRef(({ className, children, open, onOpenChange, onVisibleChange, defaultOpen, visible, defaultVisible = defaultVisibleValue, back, ...props }, ref)=>{
|
|
12
|
+
const [openState, setOpen] = useControlled({
|
|
13
|
+
controlled: open,
|
|
14
|
+
default: defaultOpen
|
|
15
|
+
});
|
|
16
|
+
const [visibleState, setVisible] = useControlled({
|
|
17
|
+
controlled: visible,
|
|
18
|
+
default: defaultVisible
|
|
19
|
+
});
|
|
20
|
+
const innerRef = useRef(null);
|
|
21
|
+
const combinedRef = useForkRef(ref, innerRef);
|
|
22
|
+
const handleVisibleChange = useCallback((v)=>{
|
|
23
|
+
if (void 0 !== visibleState) if (visibleState.includes(v)) {
|
|
24
|
+
const newArray = visibleState.filter((entry)=>entry !== v);
|
|
25
|
+
setVisible(newArray);
|
|
26
|
+
} else {
|
|
27
|
+
const newArray = [
|
|
28
|
+
...visibleState,
|
|
29
|
+
v
|
|
30
|
+
];
|
|
31
|
+
setVisible(newArray);
|
|
32
|
+
}
|
|
33
|
+
onVisibleChange?.(v);
|
|
34
|
+
}, [
|
|
35
|
+
onVisibleChange,
|
|
36
|
+
setVisible,
|
|
37
|
+
visibleState
|
|
38
|
+
]);
|
|
39
|
+
const handleOpenChange = useCallback((v)=>{
|
|
40
|
+
setOpen(v);
|
|
41
|
+
onOpenChange?.(v);
|
|
42
|
+
}, [
|
|
43
|
+
onOpenChange,
|
|
44
|
+
setOpen
|
|
45
|
+
]);
|
|
46
|
+
function handleClickOutside() {
|
|
47
|
+
handleOpenChange(false);
|
|
48
|
+
}
|
|
49
|
+
function toggle() {
|
|
50
|
+
const newOpen = !openState;
|
|
51
|
+
handleOpenChange(newOpen);
|
|
52
|
+
}
|
|
53
|
+
useOnClickOutside(innerRef, handleClickOutside);
|
|
54
|
+
const contextValue = useMemo(()=>({
|
|
55
|
+
visible: visibleState ?? defaultVisibleValue,
|
|
56
|
+
setVisible: handleVisibleChange,
|
|
57
|
+
setOpen: handleOpenChange,
|
|
58
|
+
back
|
|
59
|
+
}), [
|
|
60
|
+
handleVisibleChange,
|
|
61
|
+
visibleState,
|
|
62
|
+
back,
|
|
63
|
+
handleOpenChange
|
|
64
|
+
]);
|
|
65
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
66
|
+
className: classnames('fwe-mobile-flyout', className),
|
|
67
|
+
...props,
|
|
68
|
+
ref: combinedRef,
|
|
69
|
+
children: [
|
|
70
|
+
/*#__PURE__*/ jsx("button", {
|
|
71
|
+
"aria-label": "menu",
|
|
72
|
+
type: "button",
|
|
73
|
+
className: openState ? 'fwe-close-button' : 'fwe-burger-button',
|
|
74
|
+
onClick: toggle
|
|
75
|
+
}),
|
|
76
|
+
/*#__PURE__*/ jsx("div", {
|
|
77
|
+
className: classnames('fwe-mobile-flyout-container', {
|
|
78
|
+
'fwe-opened': openState
|
|
79
|
+
}),
|
|
80
|
+
children: /*#__PURE__*/ jsx(MobileFlyoutContext.Provider, {
|
|
81
|
+
value: contextValue,
|
|
82
|
+
children: children
|
|
83
|
+
})
|
|
84
|
+
})
|
|
85
|
+
]
|
|
86
|
+
});
|
|
87
|
+
});
|
|
88
|
+
export { MobileFlyout };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { PolymorphicComponentPropWithRef, PolymorphicRef } from '../../../utils/types';
|
|
2
|
+
declare module 'react' {
|
|
3
|
+
function forwardRef<T, P = object>(render: (props: P, ref: React.Ref<T>) => React.ReactElement | null): (props: P & React.RefAttributes<T>) => React.ReactElement | null;
|
|
4
|
+
}
|
|
5
|
+
export interface MobileFlyoutItemBaseProps {
|
|
6
|
+
icon?: React.ReactNode;
|
|
7
|
+
pageLink?: string;
|
|
8
|
+
active?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export type MobileFlyoutItemProps<C extends React.ElementType> = PolymorphicComponentPropWithRef<C, MobileFlyoutItemBaseProps>;
|
|
11
|
+
export declare const MobileFlyoutItem: <C extends React.ElementType = "a">(props: MobileFlyoutItemBaseProps & {
|
|
12
|
+
component?: C | undefined;
|
|
13
|
+
} & {
|
|
14
|
+
children?: import("react").ReactNode | undefined;
|
|
15
|
+
} & Omit<import("react").PropsWithoutRef<import("react").ComponentProps<C>>, "component" | keyof MobileFlyoutItemBaseProps> & {
|
|
16
|
+
ref?: PolymorphicRef<C> | undefined;
|
|
17
|
+
} & import("react").RefAttributes<unknown>) => React.ReactElement | null;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { IconRight2 } from "@festo-ui/react-icons";
|
|
3
|
+
import classnames from "classnames";
|
|
4
|
+
import { forwardRef, useContext } from "react";
|
|
5
|
+
import { IconWrapper } from "../../icon-wrapper/IconWrapper.js";
|
|
6
|
+
import { MobileFlyoutContext } from "../MobileFlyoutContext.js";
|
|
7
|
+
const MobileFlyoutItem = /*#__PURE__*/ forwardRef(({ component, children, pageLink, icon, onClick, active, ...props }, ref)=>{
|
|
8
|
+
const Component = component || 'a';
|
|
9
|
+
const { setVisible, setOpen } = useContext(MobileFlyoutContext);
|
|
10
|
+
function handleClick(e) {
|
|
11
|
+
if (pageLink) setVisible(pageLink);
|
|
12
|
+
else setOpen(false);
|
|
13
|
+
onClick?.(e);
|
|
14
|
+
}
|
|
15
|
+
return /*#__PURE__*/ jsxs(Component, {
|
|
16
|
+
className: "fwe-mobile-flyout-item fwe-bb",
|
|
17
|
+
...props,
|
|
18
|
+
ref: ref,
|
|
19
|
+
onClick: handleClick,
|
|
20
|
+
children: [
|
|
21
|
+
/*#__PURE__*/ jsx(IconWrapper, {
|
|
22
|
+
icon: icon
|
|
23
|
+
}),
|
|
24
|
+
/*#__PURE__*/ jsx("div", {
|
|
25
|
+
className: classnames('fwe-flex-grow-1', {
|
|
26
|
+
'fwe-color-hero': active
|
|
27
|
+
}, {
|
|
28
|
+
'fwe-ml-xxs': !!icon
|
|
29
|
+
}),
|
|
30
|
+
children: children
|
|
31
|
+
}),
|
|
32
|
+
pageLink && /*#__PURE__*/ jsx(IconRight2, {})
|
|
33
|
+
]
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
export { MobileFlyoutItem };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import './MobileFlyoutPage.scss';
|
|
2
|
+
import { type ComponentPropsWithoutRef } from 'react';
|
|
3
|
+
export interface MobileFlyoutPageProps extends ComponentPropsWithoutRef<'div'> {
|
|
4
|
+
back?: string;
|
|
5
|
+
name?: string;
|
|
6
|
+
root?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const MobileFlyoutPage: (props: MobileFlyoutPageProps & import("react").RefAttributes<HTMLDivElement>) => React.ReactElement | null;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import "./MobileFlyoutPage.css";
|
|
3
|
+
import classnames from "classnames";
|
|
4
|
+
import { forwardRef, useContext } from "react";
|
|
5
|
+
import { MobileFlyoutContext } from "../MobileFlyoutContext.js";
|
|
6
|
+
const MobileFlyoutPage = /*#__PURE__*/ forwardRef(({ back, children, name, root, ...props }, ref)=>{
|
|
7
|
+
const { visible, setVisible, back: backContext } = useContext(MobileFlyoutContext);
|
|
8
|
+
const innerVisible = root || name && visible.includes(name);
|
|
9
|
+
const innerBack = back ?? backContext ?? 'Back';
|
|
10
|
+
function handleChange() {
|
|
11
|
+
if (name) setVisible(name);
|
|
12
|
+
}
|
|
13
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
14
|
+
className: classnames('fwe-mobile-flyout-page', {
|
|
15
|
+
'fwe-opened': innerVisible
|
|
16
|
+
}),
|
|
17
|
+
ref: ref,
|
|
18
|
+
...props,
|
|
19
|
+
children: [
|
|
20
|
+
!root && /*#__PURE__*/ jsx("button", {
|
|
21
|
+
type: "button",
|
|
22
|
+
className: "fwe-page-back fr-mobile-flyout-page-back",
|
|
23
|
+
onClick: handleChange,
|
|
24
|
+
children: /*#__PURE__*/ jsx("div", {
|
|
25
|
+
children: innerBack
|
|
26
|
+
})
|
|
27
|
+
}),
|
|
28
|
+
/*#__PURE__*/ jsx("div", {
|
|
29
|
+
className: "fwe-mobile-flyout-item-container",
|
|
30
|
+
children: children
|
|
31
|
+
})
|
|
32
|
+
]
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
export { MobileFlyoutPage };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type ModalProps } from './Modal';
|
|
2
|
+
export interface AlertModalProps extends Omit<ModalProps, 'head' | 'children'> {
|
|
3
|
+
title: string;
|
|
4
|
+
subtitle?: string;
|
|
5
|
+
alertType: 'info' | 'warning' | 'error';
|
|
6
|
+
strong?: boolean;
|
|
7
|
+
cancel?: string;
|
|
8
|
+
ok?: string;
|
|
9
|
+
onCancel?: () => void;
|
|
10
|
+
onOk?: () => void;
|
|
11
|
+
}
|
|
12
|
+
export declare function AlertModal({ title, subtitle, alertType, strong, cancel, ok, onCancel, onOk, className, body, ...props }: AlertModalProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import classnames from "classnames";
|
|
3
|
+
import { Modal } from "./Modal.js";
|
|
4
|
+
import { ModalFooter } from "./ModalFooter.js";
|
|
5
|
+
function AlertModal({ title, subtitle, alertType, strong, cancel, ok, onCancel, onOk, className, body, ...props }) {
|
|
6
|
+
return /*#__PURE__*/ jsx(Modal, {
|
|
7
|
+
className: classnames({
|
|
8
|
+
'fwe-modal--with-indicator-bar': strong,
|
|
9
|
+
'fwe-modal--warning': 'warning' === alertType,
|
|
10
|
+
'fwe-modal--error': 'error' === alertType,
|
|
11
|
+
'fwe-modal--info': 'info' === alertType
|
|
12
|
+
}, className),
|
|
13
|
+
head: /*#__PURE__*/ jsxs(Fragment, {
|
|
14
|
+
children: [
|
|
15
|
+
subtitle && /*#__PURE__*/ jsx("h2", {
|
|
16
|
+
className: "fwe-modal-h2",
|
|
17
|
+
children: subtitle
|
|
18
|
+
}),
|
|
19
|
+
/*#__PURE__*/ jsx("h1", {
|
|
20
|
+
className: "fwe-modal-h1",
|
|
21
|
+
children: title
|
|
22
|
+
})
|
|
23
|
+
]
|
|
24
|
+
}),
|
|
25
|
+
body: 'string' == typeof body ? /*#__PURE__*/ jsx("p", {
|
|
26
|
+
children: body
|
|
27
|
+
}) : body,
|
|
28
|
+
...props,
|
|
29
|
+
children: (cancel || ok) && /*#__PURE__*/ jsxs(ModalFooter, {
|
|
30
|
+
children: [
|
|
31
|
+
cancel && /*#__PURE__*/ jsx("button", {
|
|
32
|
+
type: "button",
|
|
33
|
+
"aria-label": "Cancel",
|
|
34
|
+
className: classnames('fwe-btn fwe-btn-lg', {
|
|
35
|
+
'fwe-btn-link': strong
|
|
36
|
+
}),
|
|
37
|
+
onClick: onCancel,
|
|
38
|
+
children: cancel
|
|
39
|
+
}),
|
|
40
|
+
ok && /*#__PURE__*/ jsx("button", {
|
|
41
|
+
type: "button",
|
|
42
|
+
"aria-label": "Ok",
|
|
43
|
+
className: classnames('fwe-btn fwe-btn-lg', {
|
|
44
|
+
'fwe-btn-hero': !strong
|
|
45
|
+
}),
|
|
46
|
+
onClick: onOk,
|
|
47
|
+
children: ok
|
|
48
|
+
})
|
|
49
|
+
]
|
|
50
|
+
})
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
export { AlertModal };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type ModalProps } from './Modal';
|
|
2
|
+
export interface ConfirmModalProps extends Omit<ModalProps, 'head' | 'children'> {
|
|
3
|
+
title: string;
|
|
4
|
+
subtitle?: string;
|
|
5
|
+
cancel?: string;
|
|
6
|
+
ok?: string;
|
|
7
|
+
onCancel?: () => void;
|
|
8
|
+
onOk?: () => void;
|
|
9
|
+
large?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare function ConfirmModal({ title, subtitle, cancel, ok, onCancel, onOk, large, body, className, ...props }: ConfirmModalProps): import("react/jsx-runtime").JSX.Element;
|