@festo-ui/react 4.0.3-pre-20221213.1 → 5.0.0-dev.72
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 +3 -3202
- package/index.d.ts +50 -48
- package/index.js +50 -4797
- package/lib/components/accordion/Accordion.d.ts +9 -9
- package/lib/components/accordion/Accordion.js +38 -0
- package/lib/components/accordion/AccordionContext.d.ts +11 -11
- package/lib/components/accordion/AccordionContext.js +3 -0
- package/lib/components/accordion/accordion-header/AccordionHeader.d.ts +4 -4
- package/lib/components/accordion/accordion-header/AccordionHeader.js +17 -0
- package/lib/components/accordion/accordion-item/AccordionItem.d.ts +9 -9
- package/lib/components/accordion/accordion-item/AccordionItem.js +64 -0
- package/lib/components/accordion/accordion-item/AccordionItemContext.d.ts +8 -8
- package/lib/components/accordion/accordion-item/AccordionItemContext.js +3 -0
- package/lib/components/accordion/accordion-item/accordion-item-body/AccordionItemBody.d.ts +4 -4
- package/lib/components/accordion/accordion-item/accordion-item-body/AccordionItemBody.js +71 -0
- package/lib/components/accordion/accordion-item/accordion-item-header/AccordionItemHeader.d.ts +4 -4
- package/lib/components/accordion/accordion-item/accordion-item-header/AccordionItemHeader.js +41 -0
- package/lib/components/breadcrumb/Breadcrumb.d.ts +14 -14
- package/lib/components/breadcrumb/Breadcrumb.js +45 -0
- package/lib/components/buttons/button/Button.d.ts +12 -12
- package/lib/components/buttons/button/Button.js +37 -0
- package/lib/components/card/Card.d.ts +4 -4
- package/lib/components/card/Card.js +13 -0
- package/lib/components/card/CardBody.d.ts +7 -7
- package/lib/components/card/CardBody.js +18 -0
- package/lib/components/card/CardHeader.d.ts +9 -9
- package/lib/components/card/CardHeader.js +23 -0
- package/lib/components/card/CardNotification.d.ts +9 -9
- package/lib/components/card/CardNotification.js +26 -0
- package/lib/components/chips/chip/Chip.d.ts +19 -19
- package/lib/components/chips/chip/Chip.js +46 -0
- package/lib/components/chips/chip/DeleteIcon.d.ts +2 -0
- package/lib/components/chips/chip/DeleteIcon.js +7 -0
- package/lib/components/chips/chip-container/ChipContainer.d.ts +8 -8
- package/lib/components/chips/chip-container/ChipContainer.js +17 -0
- package/lib/components/link-button/LinkButton.d.ts +10 -10
- package/lib/components/link-button/LinkButton.js +26 -0
- package/lib/components/loading-indicator/LoadingIndicator.d.ts +7 -7
- package/lib/components/loading-indicator/LoadingIndicator.js +40 -0
- package/lib/components/modals/AlertModal.d.ts +14 -14
- package/lib/components/modals/AlertModal.js +76 -0
- package/lib/components/modals/ConfirmModal.d.ts +13 -13
- package/lib/components/modals/ConfirmModal.js +56 -0
- package/lib/components/modals/Modal.d.ts +11 -11
- package/lib/components/modals/Modal.js +76 -0
- package/lib/components/modals/ModalFooter.d.ts +4 -4
- package/lib/components/modals/ModalFooter.js +18 -0
- package/lib/components/modals/Prompt.d.ts +16 -16
- package/lib/components/modals/Prompt.js +65 -0
- package/lib/components/pagination/Pagination.d.ts +17 -17
- package/lib/components/pagination/Pagination.js +107 -0
- package/lib/components/popovers/legend/Legend.d.ts +12 -12
- package/lib/components/popovers/legend/Legend.js +25 -0
- package/lib/components/popovers/popover/Popover.d.ts +18 -18
- package/lib/components/popovers/popover/Popover.js +109 -0
- package/lib/components/popovers/popover-menu/PopoverMenu.d.ts +15 -15
- package/lib/components/popovers/popover-menu/PopoverMenu.js +54 -0
- package/lib/components/popovers/tooltip/Tooltip.d.ts +10 -10
- package/lib/components/popovers/tooltip/Tooltip.js +64 -0
- package/lib/components/progress/Progress.d.ts +9 -9
- package/lib/components/progress/Progress.js +32 -0
- package/lib/components/search-input/ClearButton.d.ts +2 -0
- package/lib/components/search-input/ClearButton.js +10 -0
- package/lib/components/search-input/SearchInput.d.ts +15 -0
- package/lib/components/search-input/SearchInput.js +75 -0
- package/lib/components/search-input/SearchSuggestion.d.ts +17 -0
- package/lib/components/search-input/SearchSuggestion.js +32 -0
- package/lib/components/search-input/useSearchInput.d.ts +13 -0
- package/lib/components/search-input/useSearchInput.js +94 -0
- package/lib/components/snackbar/Snackbar.d.ts +23 -23
- package/lib/components/snackbar/Snackbar.js +87 -0
- package/lib/components/snackbar/SnackbarContext.d.ts +8 -8
- package/lib/components/snackbar/SnackbarContext.js +2 -0
- package/lib/components/snackbar/SnackbarProvider.d.ts +8 -8
- package/lib/components/snackbar/SnackbarProvider.js +58 -0
- package/lib/components/snackbar/useSnackbar.d.ts +3 -3
- package/lib/components/snackbar/useSnackbar.js +3 -0
- package/lib/components/stepper-horizontal/StepperHorizontal.d.ts +7 -7
- package/lib/components/stepper-horizontal/StepperHorizontal.js +62 -0
- package/lib/components/stepper-horizontal/step-horizontal/StepHorizontal.d.ts +7 -7
- package/lib/components/stepper-horizontal/step-horizontal/StepHorizontal.js +23 -0
- package/lib/components/stepper-vertical/StepperVertical.d.ts +7 -7
- package/lib/components/stepper-vertical/StepperVertical.js +37 -0
- package/lib/components/stepper-vertical/step-vertical/StepVertical.d.ts +12 -12
- package/lib/components/stepper-vertical/step-vertical/StepVertical.js +77 -0
- package/lib/components/tab/Tabs.d.ts +23 -23
- package/lib/components/tab/Tabs.js +229 -0
- package/lib/components/tab/interfaces.d.ts +5 -0
- package/lib/components/tab/interfaces.js +1 -0
- package/lib/components/tab/tab-pane/TabPane.d.ts +11 -13
- package/lib/components/tab/tab-pane/TabPane.js +23 -0
- package/lib/components/tab/useTabScroll.d.ts +24 -24
- package/lib/components/tab/useTabScroll.js +233 -0
- package/lib/components/table-header-cell/TableHeaderCell.d.ts +7 -7
- package/lib/components/table-header-cell/TableHeaderCell.js +21 -0
- package/lib/forms/checkbox/Checkbox.d.ts +16 -16
- package/lib/forms/checkbox/Checkbox.js +88 -0
- package/lib/forms/color-indicator/ColorIndicator.d.ts +12 -12
- package/lib/forms/color-indicator/ColorIndicator.js +122 -0
- package/lib/forms/color-picker/ColorHelper.d.ts +9 -9
- package/lib/forms/color-picker/ColorHelper.js +142 -0
- package/lib/forms/color-picker/ColorPicker.d.ts +15 -15
- package/lib/forms/color-picker/ColorPicker.js +539 -0
- package/lib/forms/date-picker/DatePicker.d.ts +22 -21
- package/lib/forms/date-picker/DatePicker.js +124 -0
- package/lib/forms/date-range-picker/DateRangePicker.d.ts +20 -20
- package/lib/forms/date-range-picker/DateRangePicker.js +135 -0
- package/lib/forms/radio/RadioButton.d.ts +15 -15
- package/lib/forms/radio/RadioButton.js +56 -0
- package/lib/forms/radio/RadioGroup.d.ts +13 -13
- package/lib/forms/radio/RadioGroup.js +35 -0
- package/lib/forms/radio/RadioGroupContext.d.ts +12 -12
- package/lib/forms/radio/RadioGroupContext.js +3 -0
- package/lib/forms/segment/Segment.d.ts +14 -14
- package/lib/forms/segment/Segment.js +77 -0
- package/lib/forms/segment/segment-control/SegmentControl.d.ts +15 -15
- package/lib/forms/segment/segment-control/SegmentControl.js +64 -0
- package/lib/forms/select/Select.d.ts +26 -26
- package/lib/forms/select/Select.js +281 -0
- package/lib/forms/select/select-option/SelectOption.d.ts +10 -10
- package/lib/forms/select/select-option/SelectOption.js +16 -0
- package/lib/forms/slider/Slider.d.ts +18 -17
- package/lib/forms/slider/Slider.js +92 -0
- package/lib/forms/switch/Switch.d.ts +13 -12
- package/lib/forms/switch/Switch.js +51 -0
- package/lib/forms/text-area/TextArea.d.ts +22 -21
- package/lib/forms/text-area/TextArea.js +108 -0
- package/lib/forms/text-editor/TextEditor.d.ts +29 -29
- package/lib/forms/text-editor/TextEditor.js +255 -0
- package/lib/forms/text-editor/TextEditorButton.d.ts +14 -14
- package/lib/forms/text-editor/TextEditorButton.js +82 -0
- package/lib/forms/text-input/TextInput.d.ts +21 -21
- package/lib/forms/text-input/TextInput.js +75 -0
- package/lib/forms/time-picker/TimePicker.d.ts +18 -18
- package/lib/forms/time-picker/TimePicker.js +161 -0
- package/lib/forms/time-picker/time-picker-dropdown/TimePickerDropdown.d.ts +12 -12
- package/lib/forms/time-picker/time-picker-dropdown/TimePickerDropdown.js +213 -0
- package/lib/helper/index.d.ts +2 -2
- package/lib/helper/index.js +7 -0
- package/lib/helper/setRef.d.ts +2 -2
- package/lib/helper/setRef.js +7 -0
- package/lib/helper/types.d.ts +7 -7
- package/lib/helper/types.js +1 -0
- package/lib/helper/useControlled.d.ts +6 -6
- package/lib/helper/useControlled.js +18 -0
- package/lib/helper/useForkRef.d.ts +2 -2
- package/lib/helper/useForkRef.js +20 -0
- package/lib/helper/useId.d.ts +1 -0
- package/lib/helper/useId.js +21 -0
- package/lib/helper/useOnClickOutside.d.ts +2 -2
- package/lib/helper/useOnClickOutside.js +18 -0
- package/node/index.js +370 -0
- package/node/lib/components/accordion/Accordion.js +46 -0
- package/node/lib/components/accordion/AccordionContext.js +10 -0
- package/node/lib/components/accordion/accordion-header/AccordionHeader.js +25 -0
- package/node/lib/components/accordion/accordion-item/AccordionItem.js +71 -0
- package/node/lib/components/accordion/accordion-item/AccordionItemContext.js +10 -0
- package/node/lib/components/accordion/accordion-item/accordion-item-body/AccordionItemBody.js +78 -0
- package/node/lib/components/accordion/accordion-item/accordion-item-header/AccordionItemHeader.js +49 -0
- package/node/lib/components/breadcrumb/Breadcrumb.js +52 -0
- package/node/lib/components/buttons/button/Button.js +44 -0
- package/node/lib/components/card/Card.js +21 -0
- package/node/lib/components/card/CardBody.js +25 -0
- package/node/lib/components/card/CardHeader.js +30 -0
- package/node/lib/components/card/CardNotification.js +33 -0
- package/node/lib/components/chips/chip/Chip.js +54 -0
- package/node/lib/components/chips/chip/DeleteIcon.js +13 -0
- package/node/lib/components/chips/chip-container/ChipContainer.js +25 -0
- package/node/lib/components/link-button/LinkButton.js +33 -0
- package/node/lib/components/loading-indicator/LoadingIndicator.js +48 -0
- package/node/lib/components/modals/AlertModal.js +82 -0
- package/node/lib/components/modals/ConfirmModal.js +62 -0
- package/node/lib/components/modals/Modal.js +84 -0
- package/node/lib/components/modals/ModalFooter.js +26 -0
- package/node/lib/components/modals/Prompt.js +72 -0
- package/node/lib/components/pagination/Pagination.js +116 -0
- package/node/lib/components/popovers/legend/Legend.js +32 -0
- package/node/lib/components/popovers/popover/Popover.js +117 -0
- package/node/lib/components/popovers/popover-menu/PopoverMenu.js +61 -0
- package/node/lib/components/popovers/tooltip/Tooltip.js +70 -0
- package/node/lib/components/progress/Progress.js +40 -0
- package/node/lib/components/search-input/ClearButton.js +16 -0
- package/node/lib/components/search-input/SearchInput.js +82 -0
- package/node/lib/components/search-input/SearchSuggestion.js +39 -0
- package/node/lib/components/search-input/useSearchInput.js +101 -0
- package/node/lib/components/snackbar/Snackbar.js +94 -0
- package/node/lib/components/snackbar/SnackbarContext.js +10 -0
- package/node/lib/components/snackbar/SnackbarProvider.js +65 -0
- package/node/lib/components/snackbar/useSnackbar.js +11 -0
- package/node/lib/components/stepper-horizontal/StepperHorizontal.js +70 -0
- package/node/lib/components/stepper-horizontal/step-horizontal/StepHorizontal.js +31 -0
- package/node/lib/components/stepper-vertical/StepperVertical.js +47 -0
- package/node/lib/components/stepper-vertical/step-vertical/StepVertical.js +84 -0
- package/node/lib/components/tab/Tabs.js +237 -0
- package/node/lib/components/tab/interfaces.js +5 -0
- package/node/lib/components/tab/tab-pane/TabPane.js +31 -0
- package/node/lib/components/tab/useTabScroll.js +236 -0
- package/node/lib/components/table-header-cell/TableHeaderCell.js +29 -0
- package/node/lib/forms/checkbox/Checkbox.js +97 -0
- package/node/lib/forms/color-indicator/ColorIndicator.js +130 -0
- package/node/lib/forms/color-picker/ColorHelper.js +149 -0
- package/node/lib/forms/color-picker/ColorPicker.js +549 -0
- package/node/lib/forms/date-picker/DatePicker.js +131 -0
- package/node/lib/forms/date-range-picker/DateRangePicker.js +142 -0
- package/node/lib/forms/radio/RadioButton.js +63 -0
- package/node/lib/forms/radio/RadioGroup.js +43 -0
- package/node/lib/forms/radio/RadioGroupContext.js +10 -0
- package/node/lib/forms/segment/Segment.js +84 -0
- package/node/lib/forms/segment/segment-control/SegmentControl.js +72 -0
- package/node/lib/forms/select/Select.js +289 -0
- package/node/lib/forms/select/select-option/SelectOption.js +26 -0
- package/node/lib/forms/slider/Slider.js +101 -0
- package/node/lib/forms/switch/Switch.js +58 -0
- package/node/lib/forms/text-area/TextArea.js +117 -0
- package/node/lib/forms/text-editor/TextEditor.js +261 -0
- package/node/lib/forms/text-editor/TextEditorButton.js +88 -0
- package/node/lib/forms/text-input/TextInput.js +84 -0
- package/node/lib/forms/time-picker/TimePicker.js +169 -0
- package/node/lib/forms/time-picker/time-picker-dropdown/TimePickerDropdown.js +222 -0
- package/node/lib/helper/index.js +15 -0
- package/node/lib/helper/setRef.js +13 -0
- package/node/lib/helper/types.js +5 -0
- package/node/lib/helper/useControlled.js +24 -0
- package/node/lib/helper/useForkRef.js +26 -0
- package/node/lib/helper/useId.js +27 -0
- package/node/lib/helper/useOnClickOutside.js +24 -0
- package/package.json +20 -10
- package/README.md +0 -17
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
import { ClassNamePropsWithChildren } from '../../../helper/types';
|
|
3
|
-
export declare enum ChipType {
|
|
4
|
-
Choice = 0,
|
|
5
|
-
Category = 1,
|
|
6
|
-
Filter = 2,
|
|
7
|
-
Action = 3,
|
|
8
|
-
Readonly = 4
|
|
9
|
-
}
|
|
10
|
-
interface ChipProps extends ClassNamePropsWithChildren {
|
|
11
|
-
type?: ChipType;
|
|
12
|
-
icon?: string;
|
|
13
|
-
selected?: boolean;
|
|
14
|
-
disabled?: boolean;
|
|
15
|
-
large?: boolean;
|
|
16
|
-
onClick?: (e: React.MouseEvent<HTMLElement, MouseEvent>) => void;
|
|
17
|
-
}
|
|
18
|
-
declare function Chip({ type, selected, disabled, large, icon, children, onClick, className }: ChipProps): JSX.Element;
|
|
19
|
-
export default Chip;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ClassNamePropsWithChildren } from '../../../helper/types';
|
|
3
|
+
export declare enum ChipType {
|
|
4
|
+
Choice = 0,
|
|
5
|
+
Category = 1,
|
|
6
|
+
Filter = 2,
|
|
7
|
+
Action = 3,
|
|
8
|
+
Readonly = 4
|
|
9
|
+
}
|
|
10
|
+
interface ChipProps extends ClassNamePropsWithChildren {
|
|
11
|
+
type?: ChipType;
|
|
12
|
+
icon?: string;
|
|
13
|
+
selected?: boolean;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
large?: boolean;
|
|
16
|
+
onClick?: (e: React.MouseEvent<HTMLElement, MouseEvent>) => void;
|
|
17
|
+
}
|
|
18
|
+
declare function Chip({ type, selected, disabled, large, icon, children, onClick, className, }: ChipProps): JSX.Element;
|
|
19
|
+
export default Chip;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import classNames from 'classnames';
|
|
2
|
+
import DeleteIcon from './DeleteIcon';
|
|
3
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
|
+
export let ChipType;
|
|
6
|
+
(function (ChipType) {
|
|
7
|
+
ChipType[ChipType["Choice"] = 0] = "Choice";
|
|
8
|
+
ChipType[ChipType["Category"] = 1] = "Category";
|
|
9
|
+
ChipType[ChipType["Filter"] = 2] = "Filter";
|
|
10
|
+
ChipType[ChipType["Action"] = 3] = "Action";
|
|
11
|
+
ChipType[ChipType["Readonly"] = 4] = "Readonly";
|
|
12
|
+
})(ChipType || (ChipType = {}));
|
|
13
|
+
function Chip(_ref) {
|
|
14
|
+
let {
|
|
15
|
+
type = ChipType.Choice,
|
|
16
|
+
selected = false,
|
|
17
|
+
disabled = false,
|
|
18
|
+
large = false,
|
|
19
|
+
icon,
|
|
20
|
+
children,
|
|
21
|
+
onClick,
|
|
22
|
+
className
|
|
23
|
+
} = _ref;
|
|
24
|
+
const classes = classNames('fr-chip', 'fwe-chip', {
|
|
25
|
+
'fwe-selected': selected
|
|
26
|
+
}, {
|
|
27
|
+
'fwe-disabled': disabled
|
|
28
|
+
}, {
|
|
29
|
+
'fwe-chip-lg': large
|
|
30
|
+
}, {
|
|
31
|
+
'fwe-category': type === ChipType.Category
|
|
32
|
+
}, {
|
|
33
|
+
'fwe-filter': type === ChipType.Filter
|
|
34
|
+
}, {
|
|
35
|
+
'fwe-readonly': type === ChipType.Readonly
|
|
36
|
+
}, className);
|
|
37
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
38
|
+
className: classes,
|
|
39
|
+
children: [icon && /*#__PURE__*/_jsx("i", {
|
|
40
|
+
className: `fwe-icon fwe-icon-${icon}`
|
|
41
|
+
}), children, type === ChipType.Category && /*#__PURE__*/_jsx(DeleteIcon, {
|
|
42
|
+
onClick: e => onClick ? onClick(e) : undefined
|
|
43
|
+
})]
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
export default Chip;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { ClassNamePropsWithChildren } from '../../../helper/types';
|
|
3
|
-
import './ChipContainer.scss';
|
|
4
|
-
interface ChipContainerProps extends ClassNamePropsWithChildren {
|
|
5
|
-
large?: boolean;
|
|
6
|
-
}
|
|
7
|
-
declare function ChipContainer({ large, children, className }: ChipContainerProps): JSX.Element;
|
|
8
|
-
export default ChipContainer;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ClassNamePropsWithChildren } from '../../../helper/types';
|
|
3
|
+
import './ChipContainer.scss';
|
|
4
|
+
interface ChipContainerProps extends ClassNamePropsWithChildren {
|
|
5
|
+
large?: boolean;
|
|
6
|
+
}
|
|
7
|
+
declare function ChipContainer({ large, children, className }: ChipContainerProps): JSX.Element;
|
|
8
|
+
export default ChipContainer;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import classNames from 'classnames';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
function ChipContainer(_ref) {
|
|
4
|
+
let {
|
|
5
|
+
large = false,
|
|
6
|
+
children,
|
|
7
|
+
className
|
|
8
|
+
} = _ref;
|
|
9
|
+
const classes = classNames('fwe-chip-container', {
|
|
10
|
+
'fwe-chip-container-lg': large
|
|
11
|
+
}, className);
|
|
12
|
+
return /*#__PURE__*/_jsx("div", {
|
|
13
|
+
className: classes,
|
|
14
|
+
children: children
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
export default ChipContainer;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
import { ClassNamePropsWithChildren } from '../../helper/types';
|
|
3
|
-
interface LinkButtonProps extends ClassNamePropsWithChildren {
|
|
4
|
-
disabled?: boolean;
|
|
5
|
-
icon?: string;
|
|
6
|
-
onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
7
|
-
iconOnly?: boolean;
|
|
8
|
-
}
|
|
9
|
-
declare function LinkButton({ icon, onClick, disabled, children, iconOnly, className }: LinkButtonProps): JSX.Element;
|
|
10
|
-
export default LinkButton;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ClassNamePropsWithChildren } from '../../helper/types';
|
|
3
|
+
interface LinkButtonProps extends ClassNamePropsWithChildren {
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
icon?: string;
|
|
6
|
+
onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
7
|
+
iconOnly?: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare function LinkButton({ icon, onClick, disabled, children, iconOnly, className, }: LinkButtonProps): JSX.Element;
|
|
10
|
+
export default LinkButton;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import classNames from 'classnames';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
4
|
+
function LinkButton(_ref) {
|
|
5
|
+
let {
|
|
6
|
+
icon,
|
|
7
|
+
onClick,
|
|
8
|
+
disabled = false,
|
|
9
|
+
children,
|
|
10
|
+
iconOnly = false,
|
|
11
|
+
className
|
|
12
|
+
} = _ref;
|
|
13
|
+
const classes = classNames('fwe-btn', 'fwe-btn-link', {
|
|
14
|
+
'fwe-disabled': disabled
|
|
15
|
+
}, className);
|
|
16
|
+
return /*#__PURE__*/_jsxs("button", {
|
|
17
|
+
onClick: onClick,
|
|
18
|
+
type: "button",
|
|
19
|
+
className: classes,
|
|
20
|
+
disabled: disabled,
|
|
21
|
+
children: [/*#__PURE__*/_jsx("i", {
|
|
22
|
+
className: `fwe-icon fwe-icon-${icon}`
|
|
23
|
+
}), !iconOnly && children]
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
export default LinkButton;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import './LoadingIndicator.scss';
|
|
3
|
-
interface LoadingIndicatorProps extends ComponentPropsWithRef<'div'> {
|
|
4
|
-
size: 'large' | 'medium' | 'small';
|
|
5
|
-
}
|
|
6
|
-
export declare const LoadingIndicator:
|
|
7
|
-
export default LoadingIndicator;
|
|
1
|
+
import { ComponentPropsWithRef } from 'react';
|
|
2
|
+
import './LoadingIndicator.scss';
|
|
3
|
+
interface LoadingIndicatorProps extends ComponentPropsWithRef<'div'> {
|
|
4
|
+
size: 'large' | 'medium' | 'small';
|
|
5
|
+
}
|
|
6
|
+
export declare const LoadingIndicator: import("react").ForwardRefExoticComponent<Pick<LoadingIndicatorProps, "slot" | "style" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "size"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
7
|
+
export default LoadingIndicator;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { forwardRef } from 'react';
|
|
2
|
+
import cn from 'classnames';
|
|
3
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
|
+
export const LoadingIndicator = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
6
|
+
let {
|
|
7
|
+
size = 'large',
|
|
8
|
+
children,
|
|
9
|
+
className,
|
|
10
|
+
...props
|
|
11
|
+
} = _ref;
|
|
12
|
+
const classes = cn('fwe-waiting-indicator', {
|
|
13
|
+
'fwe-waiting-indicator-md': size === 'medium'
|
|
14
|
+
}, {
|
|
15
|
+
'fwe-waiting-indicator-sm': size === 'small'
|
|
16
|
+
});
|
|
17
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
18
|
+
className: cn('fwe-waiting-container', {
|
|
19
|
+
'fwe-waiting-container-sm': size === 'small'
|
|
20
|
+
}, className),
|
|
21
|
+
ref: ref,
|
|
22
|
+
...props,
|
|
23
|
+
children: [/*#__PURE__*/_jsxs("div", {
|
|
24
|
+
className: classes,
|
|
25
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
26
|
+
className: "fwe-waiting-circle-1"
|
|
27
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
28
|
+
className: "fwe-waiting-circle-2"
|
|
29
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
30
|
+
className: "fwe-waiting-circle-3"
|
|
31
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
32
|
+
className: "fwe-waiting-circle-4"
|
|
33
|
+
})]
|
|
34
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
35
|
+
className: "fwe-waiting-content-container",
|
|
36
|
+
children: children
|
|
37
|
+
})]
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
export default LoadingIndicator;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { ModalProps } from './Modal';
|
|
3
|
-
interface AlertModalProps extends Omit<ModalProps, 'head' | 'children'> {
|
|
4
|
-
strong?: boolean;
|
|
5
|
-
subtitle?: string;
|
|
6
|
-
alertType: 'info' | 'warning' | 'error';
|
|
7
|
-
title: string;
|
|
8
|
-
cancel?: string;
|
|
9
|
-
ok?: string;
|
|
10
|
-
onCancel?: () => void;
|
|
11
|
-
onOk?: () => void;
|
|
12
|
-
}
|
|
13
|
-
declare function AlertModal({ alertType, title, className, body, strong, subtitle, cancel, ok, onCancel, onOk, ...props }: AlertModalProps): JSX.Element;
|
|
14
|
-
export default AlertModal;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ModalProps } from './Modal';
|
|
3
|
+
interface AlertModalProps extends Omit<ModalProps, 'head' | 'children'> {
|
|
4
|
+
strong?: boolean;
|
|
5
|
+
subtitle?: string;
|
|
6
|
+
alertType: 'info' | 'warning' | 'error';
|
|
7
|
+
title: string;
|
|
8
|
+
cancel?: string;
|
|
9
|
+
ok?: string;
|
|
10
|
+
onCancel?: () => void;
|
|
11
|
+
onOk?: () => void;
|
|
12
|
+
}
|
|
13
|
+
declare function AlertModal({ alertType, title, className, body, strong, subtitle, cancel, ok, onCancel, onOk, ...props }: AlertModalProps): JSX.Element;
|
|
14
|
+
export default AlertModal;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import cn from 'classnames';
|
|
2
|
+
import Modal from './Modal';
|
|
3
|
+
import ModalFooter from './ModalFooter';
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
7
|
+
function AlertModal(_ref) {
|
|
8
|
+
let {
|
|
9
|
+
alertType,
|
|
10
|
+
title,
|
|
11
|
+
className,
|
|
12
|
+
body,
|
|
13
|
+
strong,
|
|
14
|
+
subtitle,
|
|
15
|
+
cancel,
|
|
16
|
+
ok,
|
|
17
|
+
onCancel,
|
|
18
|
+
onOk,
|
|
19
|
+
...props
|
|
20
|
+
} = _ref;
|
|
21
|
+
return /*#__PURE__*/_jsx(Modal, {
|
|
22
|
+
className: cn({
|
|
23
|
+
'fwe-modal--with-indicator-bar': strong,
|
|
24
|
+
'fwe-modal--warning': alertType === 'warning',
|
|
25
|
+
'fwe-modal--error': alertType === 'error',
|
|
26
|
+
'fwe-modal--info': alertType === 'info'
|
|
27
|
+
}, className),
|
|
28
|
+
head: /*#__PURE__*/_jsxs(_Fragment, {
|
|
29
|
+
children: [subtitle && /*#__PURE__*/_jsxs("h2", {
|
|
30
|
+
className: "fwe-modal-h2",
|
|
31
|
+
children: [/*#__PURE__*/_jsx("i", {
|
|
32
|
+
className: cn({
|
|
33
|
+
'fwe-icon': true,
|
|
34
|
+
'fwe-icon-status-warning': alertType === 'warning',
|
|
35
|
+
'fwe-icon-status-failure': alertType === 'error',
|
|
36
|
+
'fwe-icon-status-check-status': alertType === 'info'
|
|
37
|
+
})
|
|
38
|
+
}), subtitle]
|
|
39
|
+
}), /*#__PURE__*/_jsxs("h1", {
|
|
40
|
+
className: "fwe-modal-h1",
|
|
41
|
+
children: [/*#__PURE__*/_jsx("i", {
|
|
42
|
+
className: cn({
|
|
43
|
+
'fwe-icon': true,
|
|
44
|
+
'fwe-icon-status-warning': alertType === 'warning',
|
|
45
|
+
'fwe-icon-status-failure': alertType === 'error',
|
|
46
|
+
'fwe-icon-status-check-status': alertType === 'info'
|
|
47
|
+
})
|
|
48
|
+
}), title]
|
|
49
|
+
})]
|
|
50
|
+
}),
|
|
51
|
+
body: typeof body === 'string' ? /*#__PURE__*/_jsx("p", {
|
|
52
|
+
children: body
|
|
53
|
+
}) : body,
|
|
54
|
+
...props,
|
|
55
|
+
children: (cancel || ok) && /*#__PURE__*/_jsxs(ModalFooter, {
|
|
56
|
+
children: [cancel && /*#__PURE__*/_jsx("button", {
|
|
57
|
+
type: "button",
|
|
58
|
+
"aria-label": "Cancel",
|
|
59
|
+
className: cn('fwe-btn fwe-btn-lg', {
|
|
60
|
+
'fwe-btn-link': strong
|
|
61
|
+
}),
|
|
62
|
+
onClick: onCancel,
|
|
63
|
+
children: cancel
|
|
64
|
+
}), ok && /*#__PURE__*/_jsx("button", {
|
|
65
|
+
type: "button",
|
|
66
|
+
"aria-label": "Ok",
|
|
67
|
+
className: cn('fwe-btn fwe-btn-lg', {
|
|
68
|
+
'fwe-btn-hero': !strong
|
|
69
|
+
}),
|
|
70
|
+
onClick: onOk,
|
|
71
|
+
children: ok
|
|
72
|
+
})]
|
|
73
|
+
})
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
export default AlertModal;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { ModalProps } from './Modal';
|
|
3
|
-
interface ConfirmModalProps extends Omit<ModalProps, 'head' | 'children'> {
|
|
4
|
-
title: string;
|
|
5
|
-
subtitle?: string;
|
|
6
|
-
cancel?: string;
|
|
7
|
-
ok?: string;
|
|
8
|
-
onCancel?: () => void;
|
|
9
|
-
onOk?: () => void;
|
|
10
|
-
large?: boolean;
|
|
11
|
-
}
|
|
12
|
-
declare function ConfirmModal({ title, subtitle, body, className, cancel, ok, onCancel, onOk, isOpen, large, ...props }: ConfirmModalProps): JSX.Element;
|
|
13
|
-
export default ConfirmModal;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ModalProps } from './Modal';
|
|
3
|
+
interface ConfirmModalProps extends Omit<ModalProps, 'head' | 'children'> {
|
|
4
|
+
title: string;
|
|
5
|
+
subtitle?: string;
|
|
6
|
+
cancel?: string;
|
|
7
|
+
ok?: string;
|
|
8
|
+
onCancel?: () => void;
|
|
9
|
+
onOk?: () => void;
|
|
10
|
+
large?: boolean;
|
|
11
|
+
}
|
|
12
|
+
declare function ConfirmModal({ title, subtitle, body, className, cancel, ok, onCancel, onOk, isOpen, large, ...props }: ConfirmModalProps): JSX.Element;
|
|
13
|
+
export default ConfirmModal;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import cn from 'classnames';
|
|
2
|
+
import Modal from './Modal';
|
|
3
|
+
import ModalFooter from './ModalFooter';
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
6
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
+
function ConfirmModal(_ref) {
|
|
8
|
+
let {
|
|
9
|
+
title,
|
|
10
|
+
subtitle,
|
|
11
|
+
body,
|
|
12
|
+
className,
|
|
13
|
+
cancel,
|
|
14
|
+
ok,
|
|
15
|
+
onCancel,
|
|
16
|
+
onOk,
|
|
17
|
+
isOpen,
|
|
18
|
+
large,
|
|
19
|
+
...props
|
|
20
|
+
} = _ref;
|
|
21
|
+
return /*#__PURE__*/_jsx(Modal, {
|
|
22
|
+
className: cn({
|
|
23
|
+
'fwe-modal--large': large
|
|
24
|
+
}, className),
|
|
25
|
+
head: /*#__PURE__*/_jsxs(_Fragment, {
|
|
26
|
+
children: [subtitle && /*#__PURE__*/_jsx("h2", {
|
|
27
|
+
className: "fwe-modal-h2",
|
|
28
|
+
children: subtitle
|
|
29
|
+
}), /*#__PURE__*/_jsx("h1", {
|
|
30
|
+
className: "fwe-modal-h1",
|
|
31
|
+
children: title
|
|
32
|
+
})]
|
|
33
|
+
}),
|
|
34
|
+
body: typeof body === 'string' ? /*#__PURE__*/_jsx("p", {
|
|
35
|
+
children: body
|
|
36
|
+
}) : body,
|
|
37
|
+
isOpen: isOpen,
|
|
38
|
+
...props,
|
|
39
|
+
children: (cancel || ok) && /*#__PURE__*/_jsxs(ModalFooter, {
|
|
40
|
+
children: [cancel && /*#__PURE__*/_jsx("button", {
|
|
41
|
+
type: "button",
|
|
42
|
+
"aria-label": "Cancel",
|
|
43
|
+
className: "fwe-btn fwe-btn-lg",
|
|
44
|
+
onClick: onCancel,
|
|
45
|
+
children: cancel
|
|
46
|
+
}), ok && /*#__PURE__*/_jsx("button", {
|
|
47
|
+
type: "button",
|
|
48
|
+
"aria-label": "Ok",
|
|
49
|
+
className: "fwe-btn fwe-btn-hero fwe-btn-lg",
|
|
50
|
+
onClick: onOk,
|
|
51
|
+
children: ok
|
|
52
|
+
})]
|
|
53
|
+
})
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
export default ConfirmModal;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ClassNamePropsWithChildren } from '../../helper/types';
|
|
3
|
-
import './Modal.scss';
|
|
4
|
-
export interface ModalProps extends ClassNamePropsWithChildren {
|
|
5
|
-
isOpen: boolean;
|
|
6
|
-
body: React.ReactNode;
|
|
7
|
-
onClose?: () => void;
|
|
8
|
-
head: React.ReactNode;
|
|
9
|
-
}
|
|
10
|
-
declare const Modal: React.ForwardRefExoticComponent<ModalProps & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
-
export default Modal;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ClassNamePropsWithChildren } from '../../helper/types';
|
|
3
|
+
import './Modal.scss';
|
|
4
|
+
export interface ModalProps extends ClassNamePropsWithChildren {
|
|
5
|
+
isOpen: boolean;
|
|
6
|
+
body: React.ReactNode;
|
|
7
|
+
onClose?: () => void;
|
|
8
|
+
head: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
declare const Modal: React.ForwardRefExoticComponent<ModalProps & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
export default Modal;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import React, { useRef, forwardRef } from 'react';
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
import { CSSTransition } from 'react-transition-group';
|
|
4
|
+
import OutsideClickHandler from 'react-outside-click-handler';
|
|
5
|
+
import useForkRef from '../../helper/useForkRef';
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
9
|
+
const Modal = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
10
|
+
let {
|
|
11
|
+
head,
|
|
12
|
+
isOpen,
|
|
13
|
+
body,
|
|
14
|
+
onClose,
|
|
15
|
+
className,
|
|
16
|
+
children
|
|
17
|
+
} = _ref;
|
|
18
|
+
const backdropRef = useRef(null);
|
|
19
|
+
const modalRef = useRef(null);
|
|
20
|
+
const combinedRef = useForkRef(ref, modalRef);
|
|
21
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
22
|
+
children: [/*#__PURE__*/_jsx(CSSTransition, {
|
|
23
|
+
nodeRef: backdropRef,
|
|
24
|
+
unmountOnExit: true,
|
|
25
|
+
timeout: {
|
|
26
|
+
exit: 600
|
|
27
|
+
},
|
|
28
|
+
in: isOpen,
|
|
29
|
+
classNames: "fr-modal-backdrop",
|
|
30
|
+
appear: true,
|
|
31
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
32
|
+
ref: backdropRef,
|
|
33
|
+
className: "fr-modal-backdrop fwe-modal-backdrop"
|
|
34
|
+
})
|
|
35
|
+
}), /*#__PURE__*/_jsx(OutsideClickHandler, {
|
|
36
|
+
onOutsideClick: () => onClose ? onClose() : undefined,
|
|
37
|
+
children: /*#__PURE__*/_jsx(CSSTransition, {
|
|
38
|
+
ref: modalRef,
|
|
39
|
+
unmountOnExit: true,
|
|
40
|
+
classNames: "fr-modal",
|
|
41
|
+
appear: true,
|
|
42
|
+
in: isOpen,
|
|
43
|
+
timeout: {
|
|
44
|
+
exit: 600
|
|
45
|
+
},
|
|
46
|
+
children: /*#__PURE__*/_jsxs("div", {
|
|
47
|
+
ref: combinedRef,
|
|
48
|
+
className: classNames('fr-modal fwe-modal', className),
|
|
49
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
50
|
+
className: "fwe-modal-close",
|
|
51
|
+
children: /*#__PURE__*/_jsxs("button", {
|
|
52
|
+
type: "button",
|
|
53
|
+
"aria-label": "Close",
|
|
54
|
+
className: "fwe-btn fwe-btn-link fwe-dark",
|
|
55
|
+
onClick: onClose,
|
|
56
|
+
children: [/*#__PURE__*/_jsx("i", {
|
|
57
|
+
"aria-hidden": "true",
|
|
58
|
+
className: "fwe-icon fwe-icon-close-small"
|
|
59
|
+
}), /*#__PURE__*/_jsx("span", {
|
|
60
|
+
className: "fwe-sr-only",
|
|
61
|
+
children: "Close"
|
|
62
|
+
})]
|
|
63
|
+
})
|
|
64
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
65
|
+
className: "fwe-modal-header",
|
|
66
|
+
children: head
|
|
67
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
68
|
+
className: "fwe-modal-body",
|
|
69
|
+
children: body
|
|
70
|
+
}), children]
|
|
71
|
+
})
|
|
72
|
+
})
|
|
73
|
+
})]
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
export default Modal;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { ClassNamePropsWithChildren } from '../../helper/types';
|
|
3
|
-
declare const ModalFooter:
|
|
4
|
-
export default ModalFooter;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ClassNamePropsWithChildren } from '../../helper/types';
|
|
3
|
+
declare const ModalFooter: import("react").ForwardRefExoticComponent<ClassNamePropsWithChildren & import("react").RefAttributes<HTMLDivElement>>;
|
|
4
|
+
export default ModalFooter;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { forwardRef } from 'react';
|
|
2
|
+
import cn from 'classnames';
|
|
3
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
+
const ModalFooter = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
5
|
+
let {
|
|
6
|
+
children,
|
|
7
|
+
className
|
|
8
|
+
} = _ref;
|
|
9
|
+
return /*#__PURE__*/_jsx("div", {
|
|
10
|
+
ref: ref,
|
|
11
|
+
className: cn('fwe-modal-footer', className),
|
|
12
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
13
|
+
className: cn('fwe-modal-buttons'),
|
|
14
|
+
children: children
|
|
15
|
+
})
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
export default ModalFooter;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ModalProps } from './Modal';
|
|
3
|
-
interface PromptProps extends Omit<ModalProps, 'head' | 'body' | 'children'> {
|
|
4
|
-
title: string;
|
|
5
|
-
subtitle?: string;
|
|
6
|
-
hint?: string;
|
|
7
|
-
label?: string;
|
|
8
|
-
value?: string;
|
|
9
|
-
onChange: (event: React.FormEvent<HTMLInputElement>) => void;
|
|
10
|
-
cancel?: string;
|
|
11
|
-
ok?: string;
|
|
12
|
-
onCancel?: () => void;
|
|
13
|
-
onOk: (value: string) => void;
|
|
14
|
-
}
|
|
15
|
-
export default function Prompt({ title, subtitle, hint, label, value, onChange, onOk, onCancel, cancel, ok, ...props }: PromptProps): JSX.Element;
|
|
16
|
-
export {};
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ModalProps } from './Modal';
|
|
3
|
+
interface PromptProps extends Omit<ModalProps, 'head' | 'body' | 'children'> {
|
|
4
|
+
title: string;
|
|
5
|
+
subtitle?: string;
|
|
6
|
+
hint?: string;
|
|
7
|
+
label?: string;
|
|
8
|
+
value?: string;
|
|
9
|
+
onChange: (event: React.FormEvent<HTMLInputElement>) => void;
|
|
10
|
+
cancel?: string;
|
|
11
|
+
ok?: string;
|
|
12
|
+
onCancel?: () => void;
|
|
13
|
+
onOk: (value: string | undefined) => void;
|
|
14
|
+
}
|
|
15
|
+
export default function Prompt({ title, subtitle, hint, label, value, onChange, onOk, onCancel, cancel, ok, ...props }: PromptProps): JSX.Element;
|
|
16
|
+
export {};
|