@festo-ui/react 8.2.0-dev.579 → 8.2.0-dev.584
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.css +1 -1
- package/index.d.ts +63 -63
- package/lib/components/accordion/Accordion.d.ts +3 -3
- package/lib/components/accordion/Accordion.js +6 -6
- package/lib/components/accordion/AccordionContext.js +1 -1
- package/lib/components/accordion/accordion-header/AccordionHeader.d.ts +1 -1
- package/lib/components/accordion/accordion-header/AccordionHeader.js +3 -3
- package/lib/components/accordion/accordion-item/AccordionItem.d.ts +3 -3
- package/lib/components/accordion/accordion-item/AccordionItem.js +6 -6
- package/lib/components/accordion/accordion-item/AccordionItemContext.js +1 -1
- package/lib/components/accordion/accordion-item/accordion-item-body/AccordionItemBody.d.ts +1 -1
- package/lib/components/accordion/accordion-item/accordion-item-body/AccordionItemBody.js +7 -7
- package/lib/components/accordion/accordion-item/accordion-item-header/AccordionItemHeader.d.ts +1 -1
- package/lib/components/accordion/accordion-item/accordion-item-header/AccordionItemHeader.js +5 -5
- package/lib/components/bottom-sheet/BottomSheet.d.ts +1 -1
- package/lib/components/bottom-sheet/BottomSheet.js +11 -11
- package/lib/components/bottom-sheet/BottomSheet.stories.d.ts +2 -2
- package/lib/components/bottom-sheet/BottomSheet.stories.js +3 -3
- package/lib/components/breadcrumb/Breadcrumb.d.ts +2 -2
- package/lib/components/breadcrumb/Breadcrumb.js +4 -4
- package/lib/components/buttons/button/Button.d.ts +2 -2
- package/lib/components/buttons/button/Button.js +10 -10
- package/lib/components/buttons/button/Button.stories.d.ts +2 -2
- package/lib/components/buttons/button/Button.stories.js +10 -10
- package/lib/components/card/Card.d.ts +1 -1
- package/lib/components/card/Card.js +2 -2
- package/lib/components/card/CardBody.d.ts +1 -1
- package/lib/components/card/CardBody.js +2 -2
- package/lib/components/card/CardHeader.d.ts +1 -1
- package/lib/components/card/CardHeader.js +3 -3
- package/lib/components/card/CardHeader.stories.helper.d.ts +1 -1
- package/lib/components/card/CardHeader.stories.helper.js +2 -2
- package/lib/components/card/CardNotification.d.ts +1 -1
- package/lib/components/chips/chip/Chip.d.ts +1 -1
- package/lib/components/chips/chip/Chip.js +8 -8
- package/lib/components/chips/chip-container/ChipContainer.d.ts +1 -1
- package/lib/components/chips/chip-container/ChipContainer.js +3 -3
- package/lib/components/icon-wrapper/IconWrapper.js +2 -2
- package/lib/components/link-button/LinkButton.d.ts +2 -2
- package/lib/components/link-button/LinkButton.js +5 -5
- package/lib/components/loading-indicator/LoadingIndicator.d.ts +4 -4
- package/lib/components/loading-indicator/LoadingIndicator.js +8 -8
- package/lib/components/mobile-flyout/MobileFlyout.d.ts +2 -2
- package/lib/components/mobile-flyout/MobileFlyout.js +7 -7
- package/lib/components/mobile-flyout/MobileFlyoutContext.js +1 -1
- package/lib/components/mobile-flyout/mobile-flyout-page/MobileFlyoutPage.d.ts +2 -2
- package/lib/components/mobile-flyout/mobile-flyout-page/MobileFlyoutPage.js +5 -5
- package/lib/components/modals/AlertModal.d.ts +3 -3
- package/lib/components/modals/AlertModal.js +10 -10
- package/lib/components/modals/ConfirmModal.d.ts +2 -2
- package/lib/components/modals/ConfirmModal.js +3 -3
- package/lib/components/modals/CustomModal.d.ts +1 -1
- package/lib/components/modals/CustomModal.js +3 -3
- package/lib/components/modals/Modal.d.ts +4 -4
- package/lib/components/modals/Modal.js +1 -1
- package/lib/components/modals/ModalBase.d.ts +2 -2
- package/lib/components/modals/ModalBase.js +9 -9
- package/lib/components/modals/ModalFooter.d.ts +1 -1
- package/lib/components/modals/ModalFooter.js +4 -4
- package/lib/components/modals/Prompt.d.ts +3 -3
- package/lib/components/modals/Prompt.js +1 -1
- package/lib/components/modals/image-gallery/ImageGallery.d.ts +5 -5
- package/lib/components/modals/image-gallery/ImageGallery.helper.d.ts +1 -1
- package/lib/components/modals/image-gallery/ImageGallery.helper.js +2 -2
- package/lib/components/modals/image-gallery/ImageGallery.js +3 -3
- package/lib/components/modals/image-gallery/ImageGallery.stories.helper.d.ts +1 -1
- package/lib/components/modals/image-gallery/ImageGallery.stories.helper.js +29 -29
- package/lib/components/modals/image-gallery/ImageGalleryContext.d.ts +1 -1
- package/lib/components/modals/image-gallery/ImageGalleryContext.js +1 -1
- package/lib/components/modals/image-gallery/ImageGallerySwiper.js +6 -6
- package/lib/components/modals/image-gallery/ImageGalleryThumbsSwiper.js +3 -3
- package/lib/components/modals/image-gallery/image-gallery-item/ImageGalleryItem.d.ts +2 -2
- package/lib/components/modals/image-gallery/image-gallery-item/ImageGalleryItem.js +8 -8
- package/lib/components/modals/image-gallery/internal/BaseGallery.d.ts +4 -4
- package/lib/components/modals/image-gallery/internal/BaseGallery.js +1 -1
- package/lib/components/modals/image-gallery/internal/CloseButton.js +4 -4
- package/lib/components/modals/image-gallery/internal/ScaleButton.js +1 -1
- package/lib/components/pagination/Pagination.d.ts +2 -2
- package/lib/components/pagination/Pagination.js +14 -14
- package/lib/components/popovers/legend/Legend.d.ts +3 -3
- package/lib/components/popovers/popover/Popover.d.ts +4 -4
- package/lib/components/popovers/popover/Popover.js +11 -11
- package/lib/components/popovers/popover-menu/PopoverMenu.d.ts +3 -3
- package/lib/components/popovers/popover-menu/PopoverMenu.js +3 -3
- package/lib/components/popovers/tooltip/Tooltip.d.ts +1 -1
- package/lib/components/progress/Progress.d.ts +2 -2
- package/lib/components/progress/Progress.js +7 -7
- package/lib/components/scroll-area/ScrollArea.d.ts +1 -1
- package/lib/components/scroll-area/ScrollArea.js +1 -1
- package/lib/components/search-input/ClearButton.d.ts +2 -2
- package/lib/components/search-input/SearchInput.d.ts +2 -2
- package/lib/components/search-input/SearchInput.js +2 -2
- package/lib/components/search-input/useSearchInput.d.ts +2 -2
- package/lib/components/search-input/useSearchInput.js +7 -7
- package/lib/components/snackbar/Snackbar.d.ts +4 -4
- package/lib/components/snackbar/Snackbar.js +11 -11
- package/lib/components/snackbar/SnackbarContext.d.ts +2 -2
- package/lib/components/snackbar/SnackbarContext.js +1 -1
- package/lib/components/snackbar/SnackbarProvider.d.ts +2 -2
- package/lib/components/snackbar/SnackbarProvider.js +3 -3
- package/lib/components/snackbar/useSnackbar.d.ts +1 -1
- package/lib/components/snackbar/useSnackbar.js +1 -1
- package/lib/components/stepper-horizontal/StepperHorizontal.d.ts +2 -2
- package/lib/components/stepper-horizontal/StepperHorizontal.js +7 -7
- package/lib/components/stepper-horizontal/step-horizontal/StepHorizontal.d.ts +3 -3
- package/lib/components/stepper-horizontal/step-horizontal/StepHorizontal.js +3 -3
- package/lib/components/stepper-vertical/StepperVertical.d.ts +2 -2
- package/lib/components/stepper-vertical/StepperVertical.js +3 -3
- package/lib/components/stepper-vertical/step-vertical/StepVertical.d.ts +3 -3
- package/lib/components/stepper-vertical/step-vertical/StepVertical.js +9 -9
- package/lib/components/tab/Tabs.d.ts +5 -5
- package/lib/components/tab/Tabs.js +24 -24
- package/lib/components/tab/tab-pane/TabPane.d.ts +3 -3
- package/lib/components/tab/tab-pane/TabPane.js +3 -3
- package/lib/components/tab/useTabScroll.d.ts +1 -1
- package/lib/components/tab/useTabScroll.js +11 -11
- package/lib/components/table-header-cell/TableHeaderCell.js +6 -6
- package/lib/forms/checkbox/Checkbox.d.ts +4 -4
- package/lib/forms/checkbox/Checkbox.js +11 -11
- package/lib/forms/color-indicator/ColorIndicator.d.ts +2 -2
- package/lib/forms/color-indicator/ColorIndicator.js +6 -6
- package/lib/forms/color-picker/ColorHelper.d.ts +4 -4
- package/lib/forms/radio/RadioButton.d.ts +2 -2
- package/lib/forms/radio/RadioButton.js +8 -8
- package/lib/forms/radio/RadioGroup.d.ts +3 -3
- package/lib/forms/radio/RadioGroup.js +3 -3
- package/lib/forms/radio/RadioGroupContext.d.ts +1 -1
- package/lib/forms/radio/RadioGroupContext.js +1 -1
- package/lib/forms/segment/Segment.d.ts +2 -2
- package/lib/forms/segment/Segment.js +7 -7
- package/lib/forms/segment/segment-control/SegmentControl.d.ts +2 -2
- package/lib/forms/segment/segment-control/SegmentControl.js +8 -8
- package/lib/forms/select/Select.d.ts +5 -5
- package/lib/forms/select/Select.js +3 -3
- package/lib/forms/select/internal/HiddenInput.d.ts +1 -1
- package/lib/forms/select/internal/ListItem.d.ts +3 -3
- package/lib/forms/select/internal/ListItem.js +11 -11
- package/lib/forms/select/internal/SelectButton.js +9 -9
- package/lib/forms/select/internal/SelectCheckbox.d.ts +1 -1
- package/lib/forms/select/internal/SelectLabel.js +4 -4
- package/lib/forms/select/internal/SelectScrollContainer.d.ts +1 -1
- package/lib/forms/select/internal/SelectWrapper.d.ts +2 -2
- package/lib/forms/select/internal/SelectWrapper.js +4 -4
- package/lib/forms/select/internal/index.d.ts +6 -6
- package/lib/forms/select/internal/utils.d.ts +2 -2
- package/lib/forms/select/internal/utils.js +3 -3
- package/lib/forms/select/select-option/SelectOption.d.ts +2 -2
- package/lib/forms/select/select-option/SelectOption.js +1 -1
- package/lib/forms/select/utils.d.ts +1 -1
- package/lib/forms/slider/Slider.d.ts +3 -3
- package/lib/forms/slider/Slider.js +9 -9
- package/lib/forms/switch/Switch.d.ts +2 -2
- package/lib/forms/switch/Switch.js +4 -4
- package/lib/forms/text-area/TextArea.d.ts +3 -3
- package/lib/forms/text-area/TextArea.js +12 -12
- package/lib/forms/text-editor/TextEditor.d.ts +1 -1
- package/lib/forms/text-editor/TextEditor.js +42 -38
- package/lib/forms/text-editor/TextEditorButton.d.ts +3 -2
- package/lib/forms/text-editor/TextEditorButton.js +13 -13
- package/lib/forms/text-input/TextInput.d.ts +1 -1
- package/lib/forms/text-input/TextInput.js +6 -6
- package/lib/forms/time-picker/time-picker-dropdown/TimePickerInput.d.ts +1 -1
- package/lib/forms/time-picker/time-picker-dropdown/TimePickerInput.js +2 -2
- package/lib/helper/index.js +2 -2
- package/lib/helper/setRef.js +1 -1
- package/lib/helper/types.d.ts +2 -2
- package/lib/helper/useControlled.d.ts +1 -1
- package/lib/helper/useControlled.js +2 -2
- package/lib/helper/useForkRef.d.ts +1 -1
- package/lib/helper/useForkRef.js +1 -1
- package/lib/helper/useId.js +2 -2
- package/lib/helper/useOnClickOutside.d.ts +1 -1
- package/lib/helper/useOnClickOutside.js +5 -5
- package/node/lib/components/accordion/Accordion.js +4 -4
- package/node/lib/components/accordion/accordion-header/AccordionHeader.js +1 -1
- package/node/lib/components/accordion/accordion-item/AccordionItem.js +4 -4
- package/node/lib/components/accordion/accordion-item/accordion-item-body/AccordionItemBody.js +4 -4
- package/node/lib/components/accordion/accordion-item/accordion-item-header/AccordionItemHeader.js +3 -3
- package/node/lib/components/bottom-sheet/BottomSheet.js +9 -9
- package/node/lib/components/bottom-sheet/BottomSheet.stories.js +2 -2
- package/node/lib/components/breadcrumb/Breadcrumb.js +2 -2
- package/node/lib/components/buttons/button/Button.js +8 -8
- package/node/lib/components/buttons/button/Button.stories.js +9 -9
- package/node/lib/components/card/Card.js +1 -1
- package/node/lib/components/card/CardBody.js +1 -1
- package/node/lib/components/card/CardHeader.js +2 -2
- package/node/lib/components/card/CardHeader.stories.helper.js +2 -2
- package/node/lib/components/chips/chip/Chip.js +7 -7
- package/node/lib/components/chips/chip-container/ChipContainer.js +2 -2
- package/node/lib/components/icon-wrapper/IconWrapper.js +2 -2
- package/node/lib/components/link-button/LinkButton.js +3 -3
- package/node/lib/components/loading-indicator/LoadingIndicator.js +6 -6
- package/node/lib/components/mobile-flyout/MobileFlyout.js +5 -5
- package/node/lib/components/mobile-flyout/mobile-flyout-page/MobileFlyoutPage.js +3 -3
- package/node/lib/components/modals/AlertModal.js +9 -9
- package/node/lib/components/modals/ConfirmModal.js +2 -2
- package/node/lib/components/modals/CustomModal.js +1 -1
- package/node/lib/components/modals/ModalBase.js +4 -4
- package/node/lib/components/modals/ModalFooter.js +2 -2
- package/node/lib/components/modals/image-gallery/ImageGallery.helper.js +1 -1
- package/node/lib/components/modals/image-gallery/ImageGallery.js +2 -2
- package/node/lib/components/modals/image-gallery/ImageGallery.stories.helper.js +29 -29
- package/node/lib/components/modals/image-gallery/ImageGallerySwiper.js +3 -3
- package/node/lib/components/modals/image-gallery/image-gallery-item/ImageGalleryItem.js +5 -5
- package/node/lib/components/modals/image-gallery/internal/CloseButton.js +3 -3
- package/node/lib/components/pagination/Pagination.js +12 -12
- package/node/lib/components/popovers/popover/Popover.js +8 -8
- package/node/lib/components/popovers/popover-menu/PopoverMenu.js +1 -1
- package/node/lib/components/progress/Progress.js +6 -6
- package/node/lib/components/search-input/SearchInput.js +1 -1
- package/node/lib/components/search-input/useSearchInput.js +6 -6
- package/node/lib/components/snackbar/Snackbar.js +8 -8
- package/node/lib/components/snackbar/SnackbarProvider.js +1 -1
- package/node/lib/components/stepper-horizontal/StepperHorizontal.js +5 -5
- package/node/lib/components/stepper-horizontal/step-horizontal/StepHorizontal.js +1 -1
- package/node/lib/components/stepper-vertical/StepperVertical.js +1 -1
- package/node/lib/components/stepper-vertical/step-vertical/StepVertical.js +7 -7
- package/node/lib/components/tab/Tabs.js +22 -22
- package/node/lib/components/tab/tab-pane/TabPane.js +2 -2
- package/node/lib/components/tab/useTabScroll.js +10 -10
- package/node/lib/components/table-header-cell/TableHeaderCell.js +4 -4
- package/node/lib/forms/checkbox/Checkbox.js +9 -9
- package/node/lib/forms/color-indicator/ColorIndicator.js +4 -4
- package/node/lib/forms/radio/RadioButton.js +6 -6
- package/node/lib/forms/radio/RadioGroup.js +1 -1
- package/node/lib/forms/segment/Segment.js +5 -5
- package/node/lib/forms/segment/segment-control/SegmentControl.js +6 -6
- package/node/lib/forms/select/Select.js +1 -1
- package/node/lib/forms/select/internal/ListItem.js +9 -9
- package/node/lib/forms/select/internal/SelectButton.js +7 -7
- package/node/lib/forms/select/internal/SelectLabel.js +3 -3
- package/node/lib/forms/select/internal/SelectWrapper.js +2 -2
- package/node/lib/forms/select/internal/utils.js +1 -1
- package/node/lib/forms/slider/Slider.js +7 -7
- package/node/lib/forms/switch/Switch.js +3 -3
- package/node/lib/forms/text-area/TextArea.js +10 -10
- package/node/lib/forms/text-editor/TextEditor.js +39 -35
- package/node/lib/forms/text-editor/TextEditorButton.js +11 -11
- package/node/lib/forms/text-input/TextInput.js +4 -4
- package/node/lib/forms/time-picker/time-picker-dropdown/TimePickerInput.js +1 -1
- package/node/lib/helper/index.js +2 -2
- package/node/lib/helper/setRef.js +1 -1
- package/node/lib/helper/useControlled.js +1 -1
- package/node/lib/helper/useId.js +1 -1
- package/node/lib/helper/useOnClickOutside.js +4 -4
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ComponentPropsWithoutRef } from
|
|
2
|
-
export interface ButtonProps extends ComponentPropsWithoutRef<
|
|
1
|
+
import { ComponentPropsWithoutRef } from "react";
|
|
2
|
+
export interface ButtonProps extends ComponentPropsWithoutRef<"button"> {
|
|
3
3
|
icon?: React.ReactNode;
|
|
4
4
|
disabled?: boolean;
|
|
5
5
|
primary?: boolean;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import classNames from
|
|
2
|
-
import { forwardRef } from
|
|
1
|
+
import classNames from "classnames";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
3
|
import IconWrapper from "../../icon-wrapper/IconWrapper.js";
|
|
4
4
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
5
|
const Button = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
6
6
|
let {
|
|
7
7
|
icon,
|
|
8
|
-
type =
|
|
8
|
+
type = "button",
|
|
9
9
|
disabled = false,
|
|
10
10
|
iconOnly = false,
|
|
11
11
|
large = false,
|
|
@@ -17,18 +17,18 @@ const Button = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
17
17
|
children,
|
|
18
18
|
...props
|
|
19
19
|
} = _ref;
|
|
20
|
-
const classes = classNames(
|
|
21
|
-
|
|
20
|
+
const classes = classNames("fwe-btn", "fr-button", {
|
|
21
|
+
"fwe-btn-icon": iconOnly
|
|
22
22
|
}, {
|
|
23
|
-
|
|
23
|
+
"fwe-disabled": disabled
|
|
24
24
|
}, {
|
|
25
|
-
|
|
25
|
+
"fwe-btn-hero": primary && !tertiary
|
|
26
26
|
}, {
|
|
27
|
-
|
|
27
|
+
"fwe-btn-link": tertiary && !primary
|
|
28
28
|
}, {
|
|
29
|
-
|
|
29
|
+
"fwe-btn-lg": large
|
|
30
30
|
}, {
|
|
31
|
-
|
|
31
|
+
"fwe-btn-floating": floating
|
|
32
32
|
}, className);
|
|
33
33
|
return /*#__PURE__*/_jsxs("button", {
|
|
34
34
|
// ignore here because fallback will explicitly be set to type 'button'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from
|
|
2
|
-
import Button from
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import Button from "./Button";
|
|
3
3
|
declare const meta: Meta<typeof Button>;
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof Button>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { IconCoreRangeProduct } from
|
|
1
|
+
import { IconCoreRangeProduct } from "@festo-ui/react-icons";
|
|
2
2
|
import Button from "./Button.js";
|
|
3
3
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
4
4
|
const meta = {
|
|
5
5
|
component: Button,
|
|
6
|
-
title:
|
|
6
|
+
title: "Components/Buttons"
|
|
7
7
|
};
|
|
8
8
|
export default meta;
|
|
9
9
|
export const Overview = {
|
|
@@ -43,36 +43,36 @@ export const Overview = {
|
|
|
43
43
|
export const Primary = {
|
|
44
44
|
args: {
|
|
45
45
|
primary: true,
|
|
46
|
-
children:
|
|
46
|
+
children: "Primary"
|
|
47
47
|
}
|
|
48
48
|
};
|
|
49
49
|
export const Secondary = {
|
|
50
50
|
args: {
|
|
51
|
-
children:
|
|
51
|
+
children: "Secondary"
|
|
52
52
|
}
|
|
53
53
|
};
|
|
54
54
|
export const Tertiary = {
|
|
55
55
|
args: {
|
|
56
56
|
tertiary: true,
|
|
57
|
-
children:
|
|
57
|
+
children: "Tertiary"
|
|
58
58
|
}
|
|
59
59
|
};
|
|
60
60
|
export const Sizes = {
|
|
61
61
|
args: {
|
|
62
|
-
children:
|
|
62
|
+
children: "Large Button",
|
|
63
63
|
large: true
|
|
64
64
|
}
|
|
65
65
|
};
|
|
66
66
|
export const Icon = {
|
|
67
67
|
args: {
|
|
68
|
-
children:
|
|
69
|
-
icon:
|
|
68
|
+
children: "With Icon",
|
|
69
|
+
icon: "ecommerce-core-range-product"
|
|
70
70
|
}
|
|
71
71
|
};
|
|
72
72
|
export const IconOnly = {
|
|
73
73
|
args: {
|
|
74
74
|
iconOnly: true,
|
|
75
|
-
icon:
|
|
75
|
+
icon: "ecommerce-core-range-product"
|
|
76
76
|
}
|
|
77
77
|
};
|
|
78
78
|
export const Floating = {
|
|
@@ -81,6 +81,6 @@ export const Floating = {
|
|
|
81
81
|
large: true,
|
|
82
82
|
primary: true,
|
|
83
83
|
floating: true,
|
|
84
|
-
icon:
|
|
84
|
+
icon: "ecommerce-core-range-product"
|
|
85
85
|
}
|
|
86
86
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import classNames from
|
|
1
|
+
import classNames from "classnames";
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
function Card(_ref) {
|
|
4
4
|
let {
|
|
@@ -6,7 +6,7 @@ function Card(_ref) {
|
|
|
6
6
|
className
|
|
7
7
|
} = _ref;
|
|
8
8
|
return /*#__PURE__*/_jsx("div", {
|
|
9
|
-
className: classNames(
|
|
9
|
+
className: classNames("fwe-card", className),
|
|
10
10
|
children: children
|
|
11
11
|
});
|
|
12
12
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import classNames from
|
|
1
|
+
import classNames from "classnames";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
function CardBody(_ref) {
|
|
4
4
|
let {
|
|
@@ -7,7 +7,7 @@ function CardBody(_ref) {
|
|
|
7
7
|
className
|
|
8
8
|
} = _ref;
|
|
9
9
|
return /*#__PURE__*/_jsxs("div", {
|
|
10
|
-
className: classNames(
|
|
10
|
+
className: classNames("fwe-card-body", className),
|
|
11
11
|
children: [/*#__PURE__*/_jsx("div", {
|
|
12
12
|
className: "fwe-card-text",
|
|
13
13
|
children: text
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import classNames from
|
|
1
|
+
import classNames from "classnames";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
function CardHeader(_ref) {
|
|
4
4
|
let {
|
|
@@ -11,10 +11,10 @@ function CardHeader(_ref) {
|
|
|
11
11
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
12
12
|
children: [image ? /*#__PURE__*/_jsx("img", {
|
|
13
13
|
alt: image.alt,
|
|
14
|
-
className: `fwe-card-img-${image.aspectRatio ===
|
|
14
|
+
className: `fwe-card-img-${image.aspectRatio === "3/2" ? "32" : "169"}`,
|
|
15
15
|
src: image.src
|
|
16
16
|
}) : null, /*#__PURE__*/_jsxs("div", {
|
|
17
|
-
className: classNames(
|
|
17
|
+
className: classNames("fwe-card-header", className),
|
|
18
18
|
children: [/*#__PURE__*/_jsxs("div", {
|
|
19
19
|
className: "fwe-card-title",
|
|
20
20
|
children: [/*#__PURE__*/_jsx("h5", {
|
|
@@ -3,5 +3,5 @@ interface CardNotificationProps extends ClassNameProps {
|
|
|
3
3
|
title: string;
|
|
4
4
|
message?: string;
|
|
5
5
|
}
|
|
6
|
-
declare function CardNotification({ className, title, message
|
|
6
|
+
declare function CardNotification({ className, title, message }: CardNotificationProps): import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
export default CardNotification;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import classNames from
|
|
1
|
+
import classNames from "classnames";
|
|
2
2
|
import IconWrapper from "../../icon-wrapper/IconWrapper.js";
|
|
3
3
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
4
4
|
export let ChipType = /*#__PURE__*/function (ChipType) {
|
|
@@ -19,18 +19,18 @@ function Chip(_ref) {
|
|
|
19
19
|
onClick,
|
|
20
20
|
className
|
|
21
21
|
} = _ref;
|
|
22
|
-
const classes = classNames(
|
|
23
|
-
|
|
22
|
+
const classes = classNames("fr-chip", "fwe-chip", {
|
|
23
|
+
"fwe-selected": selected
|
|
24
24
|
}, {
|
|
25
|
-
|
|
25
|
+
"fwe-disabled": disabled
|
|
26
26
|
}, {
|
|
27
|
-
|
|
27
|
+
"fwe-chip-lg": large
|
|
28
28
|
}, {
|
|
29
|
-
|
|
29
|
+
"fwe-category": type === ChipType.Category
|
|
30
30
|
}, {
|
|
31
|
-
|
|
31
|
+
"fwe-filter": type === ChipType.Filter
|
|
32
32
|
}, {
|
|
33
|
-
|
|
33
|
+
"fwe-readonly": type === ChipType.Readonly
|
|
34
34
|
}, className);
|
|
35
35
|
return (
|
|
36
36
|
/*#__PURE__*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import classNames from
|
|
1
|
+
import classNames from "classnames";
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
function ChipContainer(_ref) {
|
|
4
4
|
let {
|
|
@@ -6,8 +6,8 @@ function ChipContainer(_ref) {
|
|
|
6
6
|
children,
|
|
7
7
|
className
|
|
8
8
|
} = _ref;
|
|
9
|
-
const classes = classNames(
|
|
10
|
-
|
|
9
|
+
const classes = classNames("fwe-chip-container", {
|
|
10
|
+
"fwe-chip-container-lg": large
|
|
11
11
|
}, className);
|
|
12
12
|
return /*#__PURE__*/_jsx("div", {
|
|
13
13
|
className: classes,
|
|
@@ -4,9 +4,9 @@ export default function IconWrapper(_ref) {
|
|
|
4
4
|
icon
|
|
5
5
|
} = _ref;
|
|
6
6
|
if (!icon) return null;
|
|
7
|
-
if (typeof icon ===
|
|
7
|
+
if (typeof icon === "string") {
|
|
8
8
|
let iconName = icon;
|
|
9
|
-
if (!icon.startsWith(
|
|
9
|
+
if (!icon.startsWith("fwe-icon-")) {
|
|
10
10
|
iconName = `fwe-icon-${icon}`;
|
|
11
11
|
}
|
|
12
12
|
return /*#__PURE__*/_jsx("i", {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ComponentPropsWithoutRef } from
|
|
2
|
-
interface LinkButtonProps extends ComponentPropsWithoutRef<
|
|
1
|
+
import { ComponentPropsWithoutRef } from "react";
|
|
2
|
+
interface LinkButtonProps extends ComponentPropsWithoutRef<"button"> {
|
|
3
3
|
disabled?: boolean;
|
|
4
4
|
icon?: React.ReactNode;
|
|
5
5
|
onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import classNames from
|
|
2
|
-
import { forwardRef } from
|
|
1
|
+
import classNames from "classnames";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
3
|
import IconWrapper from "../icon-wrapper/IconWrapper.js";
|
|
4
4
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
5
|
const LinkButton = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
@@ -12,10 +12,10 @@ const LinkButton = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
12
12
|
className,
|
|
13
13
|
...props
|
|
14
14
|
} = _ref;
|
|
15
|
-
const classes = classNames(
|
|
16
|
-
|
|
15
|
+
const classes = classNames("fwe-btn", "fwe-btn-link", {
|
|
16
|
+
"fwe-disabled": disabled
|
|
17
17
|
}, {
|
|
18
|
-
|
|
18
|
+
"fwe-btn-icon": iconOnly
|
|
19
19
|
}, className);
|
|
20
20
|
return /*#__PURE__*/_jsxs("button", {
|
|
21
21
|
onClick: onClick,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ComponentPropsWithRef } from
|
|
2
|
-
import
|
|
3
|
-
interface LoadingIndicatorProps extends ComponentPropsWithRef<
|
|
4
|
-
size:
|
|
1
|
+
import { ComponentPropsWithRef } from "react";
|
|
2
|
+
import "./LoadingIndicator.scss";
|
|
3
|
+
interface LoadingIndicatorProps extends ComponentPropsWithRef<"div"> {
|
|
4
|
+
size: "large" | "medium" | "small";
|
|
5
5
|
}
|
|
6
6
|
declare const LoadingIndicator: (props: LoadingIndicatorProps & import("react").RefAttributes<HTMLDivElement>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | null;
|
|
7
7
|
export default LoadingIndicator;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { forwardRef } from
|
|
2
|
-
import cn from
|
|
1
|
+
import { forwardRef } from "react";
|
|
2
|
+
import cn from "classnames";
|
|
3
3
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
4
4
|
const LoadingIndicator = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
5
5
|
let {
|
|
6
|
-
size =
|
|
6
|
+
size = "large",
|
|
7
7
|
children,
|
|
8
8
|
className,
|
|
9
9
|
...props
|
|
10
10
|
} = _ref;
|
|
11
|
-
const classes = cn(
|
|
12
|
-
|
|
11
|
+
const classes = cn("fwe-waiting-indicator", {
|
|
12
|
+
"fwe-waiting-indicator-md": size === "medium"
|
|
13
13
|
}, {
|
|
14
|
-
|
|
14
|
+
"fwe-waiting-indicator-sm": size === "small"
|
|
15
15
|
});
|
|
16
16
|
return /*#__PURE__*/_jsxs("div", {
|
|
17
|
-
className: cn(
|
|
18
|
-
|
|
17
|
+
className: cn("fwe-waiting-container", {
|
|
18
|
+
"fwe-waiting-container-sm": size === "small"
|
|
19
19
|
}, className),
|
|
20
20
|
ref: ref,
|
|
21
21
|
...props,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ComponentPropsWithoutRef } from
|
|
2
|
-
interface MobileFlyoutProps extends Omit<ComponentPropsWithoutRef<
|
|
1
|
+
import { ComponentPropsWithoutRef } from "react";
|
|
2
|
+
interface MobileFlyoutProps extends Omit<ComponentPropsWithoutRef<"div">, "onChange"> {
|
|
3
3
|
open?: boolean;
|
|
4
4
|
defaultOpen?: boolean;
|
|
5
5
|
visible?: string[];
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { forwardRef, useCallback, useMemo, useRef } from
|
|
2
|
-
import cn from
|
|
1
|
+
import { forwardRef, useCallback, useMemo, useRef } from "react";
|
|
2
|
+
import cn from "classnames";
|
|
3
3
|
import useForkRef from "../../helper/useForkRef.js";
|
|
4
4
|
import useOnClickOutside from "../../helper/useOnClickOutside.js";
|
|
5
5
|
import useControlled from "../../helper/useControlled.js";
|
|
6
6
|
import MobileFlyoutContext from "./MobileFlyoutContext.js";
|
|
7
7
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
|
-
const defaultVisibleValue = [
|
|
8
|
+
const defaultVisibleValue = ["root"];
|
|
9
9
|
const MobileFlyout = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
10
10
|
let {
|
|
11
11
|
className,
|
|
@@ -60,17 +60,17 @@ const MobileFlyout = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
60
60
|
back
|
|
61
61
|
}), [handleVisibleChange, visibleState, back, handleOpenChange]);
|
|
62
62
|
return /*#__PURE__*/_jsxs("div", {
|
|
63
|
-
className: cn(
|
|
63
|
+
className: cn("fwe-mobile-flyout", className),
|
|
64
64
|
...props,
|
|
65
65
|
ref: combinedRef,
|
|
66
66
|
children: [/*#__PURE__*/_jsx("button", {
|
|
67
67
|
"aria-label": "menu",
|
|
68
68
|
type: "button",
|
|
69
|
-
className: openState ?
|
|
69
|
+
className: openState ? "fwe-close-button" : "fwe-burger-button",
|
|
70
70
|
onClick: toggle
|
|
71
71
|
}), /*#__PURE__*/_jsx("div", {
|
|
72
|
-
className: cn(
|
|
73
|
-
|
|
72
|
+
className: cn("fwe-mobile-flyout-container", {
|
|
73
|
+
"fwe-opened": openState
|
|
74
74
|
}),
|
|
75
75
|
children: /*#__PURE__*/_jsx(MobileFlyoutContext.Provider, {
|
|
76
76
|
value: contextValue,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { createContext } from
|
|
1
|
+
import { createContext } from "react";
|
|
2
2
|
export default /*#__PURE__*/createContext(null);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ComponentPropsWithoutRef } from
|
|
2
|
-
interface MobileFlyoutPageProps extends ComponentPropsWithoutRef<
|
|
1
|
+
import { ComponentPropsWithoutRef } from "react";
|
|
2
|
+
interface MobileFlyoutPageProps extends ComponentPropsWithoutRef<"div"> {
|
|
3
3
|
back?: string;
|
|
4
4
|
name?: string;
|
|
5
5
|
root?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import cn from
|
|
2
|
-
import { forwardRef, useContext } from
|
|
1
|
+
import cn from "classnames";
|
|
2
|
+
import { forwardRef, useContext } from "react";
|
|
3
3
|
import MobileFlyoutContext from "../MobileFlyoutContext.js";
|
|
4
4
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
5
|
const MobileFlyoutPage = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
@@ -16,15 +16,15 @@ const MobileFlyoutPage = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
16
16
|
back: backContext
|
|
17
17
|
} = useContext(MobileFlyoutContext);
|
|
18
18
|
const innerVisible = root || name && visible.includes(name);
|
|
19
|
-
const innerBack = back ?? backContext ??
|
|
19
|
+
const innerBack = back ?? backContext ?? "Back";
|
|
20
20
|
function handleChange() {
|
|
21
21
|
if (name) {
|
|
22
22
|
setVisible(name);
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
return /*#__PURE__*/_jsxs("div", {
|
|
26
|
-
className: cn(
|
|
27
|
-
|
|
26
|
+
className: cn("fwe-mobile-flyout-page", {
|
|
27
|
+
"fwe-opened": innerVisible
|
|
28
28
|
}),
|
|
29
29
|
ref: ref,
|
|
30
30
|
...props,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ModalProps } from
|
|
2
|
-
interface AlertModalProps extends Omit<ModalProps,
|
|
1
|
+
import { ModalProps } from "./Modal";
|
|
2
|
+
interface AlertModalProps extends Omit<ModalProps, "head" | "children"> {
|
|
3
3
|
title: string;
|
|
4
4
|
subtitle?: string;
|
|
5
|
-
alertType:
|
|
5
|
+
alertType: "info" | "warning" | "error";
|
|
6
6
|
strong?: boolean;
|
|
7
7
|
cancel?: string;
|
|
8
8
|
ok?: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import cn from
|
|
1
|
+
import cn from "classnames";
|
|
2
2
|
import Modal from "./Modal.js";
|
|
3
3
|
import ModalFooter from "./ModalFooter.js";
|
|
4
4
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -18,10 +18,10 @@ function AlertModal(_ref) {
|
|
|
18
18
|
} = _ref;
|
|
19
19
|
return /*#__PURE__*/_jsx(Modal, {
|
|
20
20
|
className: cn({
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
"fwe-modal--with-indicator-bar": strong,
|
|
22
|
+
"fwe-modal--warning": alertType === "warning",
|
|
23
|
+
"fwe-modal--error": alertType === "error",
|
|
24
|
+
"fwe-modal--info": alertType === "info"
|
|
25
25
|
}, className),
|
|
26
26
|
head: /*#__PURE__*/_jsxs(_Fragment, {
|
|
27
27
|
children: [subtitle && /*#__PURE__*/_jsx("h2", {
|
|
@@ -32,7 +32,7 @@ function AlertModal(_ref) {
|
|
|
32
32
|
children: title
|
|
33
33
|
})]
|
|
34
34
|
}),
|
|
35
|
-
body: typeof body ===
|
|
35
|
+
body: typeof body === "string" ? /*#__PURE__*/_jsx("p", {
|
|
36
36
|
children: body
|
|
37
37
|
}) : body,
|
|
38
38
|
...props,
|
|
@@ -40,16 +40,16 @@ function AlertModal(_ref) {
|
|
|
40
40
|
children: [cancel && /*#__PURE__*/_jsx("button", {
|
|
41
41
|
type: "button",
|
|
42
42
|
"aria-label": "Cancel",
|
|
43
|
-
className: cn(
|
|
44
|
-
|
|
43
|
+
className: cn("fwe-btn fwe-btn-lg", {
|
|
44
|
+
"fwe-btn-link": strong
|
|
45
45
|
}),
|
|
46
46
|
onClick: onCancel,
|
|
47
47
|
children: cancel
|
|
48
48
|
}), ok && /*#__PURE__*/_jsx("button", {
|
|
49
49
|
type: "button",
|
|
50
50
|
"aria-label": "Ok",
|
|
51
|
-
className: cn(
|
|
52
|
-
|
|
51
|
+
className: cn("fwe-btn fwe-btn-lg", {
|
|
52
|
+
"fwe-btn-hero": !strong
|
|
53
53
|
}),
|
|
54
54
|
onClick: onOk,
|
|
55
55
|
children: ok
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ModalProps } from
|
|
2
|
-
interface ConfirmModalProps extends Omit<ModalProps,
|
|
1
|
+
import { ModalProps } from "./Modal";
|
|
2
|
+
interface ConfirmModalProps extends Omit<ModalProps, "head" | "children"> {
|
|
3
3
|
title: string;
|
|
4
4
|
subtitle?: string;
|
|
5
5
|
cancel?: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import cn from
|
|
1
|
+
import cn from "classnames";
|
|
2
2
|
import Modal from "./Modal.js";
|
|
3
3
|
import ModalFooter from "./ModalFooter.js";
|
|
4
4
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -17,7 +17,7 @@ function ConfirmModal(_ref) {
|
|
|
17
17
|
} = _ref;
|
|
18
18
|
return /*#__PURE__*/_jsx(Modal, {
|
|
19
19
|
className: cn({
|
|
20
|
-
|
|
20
|
+
"fwe-modal--large": large
|
|
21
21
|
}, className),
|
|
22
22
|
head: /*#__PURE__*/_jsxs(_Fragment, {
|
|
23
23
|
children: [subtitle && /*#__PURE__*/_jsx("h2", {
|
|
@@ -28,7 +28,7 @@ function ConfirmModal(_ref) {
|
|
|
28
28
|
children: title
|
|
29
29
|
})]
|
|
30
30
|
}),
|
|
31
|
-
body: typeof body ===
|
|
31
|
+
body: typeof body === "string" ? /*#__PURE__*/_jsx("p", {
|
|
32
32
|
children: body
|
|
33
33
|
}) : body,
|
|
34
34
|
...props,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import cn from
|
|
2
|
-
import { forwardRef } from
|
|
1
|
+
import cn from "classnames";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
3
|
import ModalBase from "./ModalBase.js";
|
|
4
4
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
5
|
const CustomModal = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
@@ -13,7 +13,7 @@ const CustomModal = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
13
13
|
} = _ref;
|
|
14
14
|
return /*#__PURE__*/_jsxs(ModalBase, {
|
|
15
15
|
className: cn({
|
|
16
|
-
|
|
16
|
+
"fwe-modal--large": large
|
|
17
17
|
}, className),
|
|
18
18
|
ref: ref,
|
|
19
19
|
...props,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import React from
|
|
3
|
-
import { ModalBaseProps } from
|
|
4
|
-
export interface ModalProps extends Omit<ModalBaseProps,
|
|
1
|
+
import "./Modal.scss";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { ModalBaseProps } from "./ModalBase";
|
|
4
|
+
export interface ModalProps extends Omit<ModalBaseProps, "onCloseDone"> {
|
|
5
5
|
head?: React.ReactNode;
|
|
6
6
|
body: React.ReactNode;
|
|
7
7
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { ClassNamePropsWithChildren } from
|
|
1
|
+
import "./Modal.scss";
|
|
2
|
+
import { ClassNamePropsWithChildren } from "../../helper/types";
|
|
3
3
|
export interface ModalBaseProps extends ClassNamePropsWithChildren {
|
|
4
4
|
isOpen: boolean;
|
|
5
5
|
isLoading?: boolean;
|