@festo-ui/react 4.0.3-pre-20221213.1 → 5.0.0-dev.102
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
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
9
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
/**
|
|
12
|
+
* Breadcrumb navigation can be used on pages with multiple navigation levels.
|
|
13
|
+
*/
|
|
14
|
+
function Breadcrumb(_ref) {
|
|
15
|
+
let {
|
|
16
|
+
locations,
|
|
17
|
+
onClick,
|
|
18
|
+
children,
|
|
19
|
+
className
|
|
20
|
+
} = _ref;
|
|
21
|
+
const childrenList = [];
|
|
22
|
+
_react.default.Children.forEach(children, element => {
|
|
23
|
+
if ( /*#__PURE__*/_react.default.isValidElement(element)) {
|
|
24
|
+
childrenList.push({
|
|
25
|
+
...element,
|
|
26
|
+
props: {
|
|
27
|
+
...element.props,
|
|
28
|
+
className: 'fr-breadcrumb-location'
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
34
|
+
className: (0, _classnames.default)('fwe-breadcrumb', className),
|
|
35
|
+
children: locations ? locations.map((location, index) => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.default.Fragment, {
|
|
36
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("a", {
|
|
37
|
+
className: "fr-breadcrumb-location",
|
|
38
|
+
href: location.url,
|
|
39
|
+
onClick: e => onClick ? onClick(e) : undefined,
|
|
40
|
+
children: location.label
|
|
41
|
+
}), index + 1 < locations.length && /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
42
|
+
className: "fwe-icon fwe-icon-arrows-right-2"
|
|
43
|
+
})]
|
|
44
|
+
}, location.url)) : childrenList.map((child, index) => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.default.Fragment, {
|
|
45
|
+
children: [child, ' ', index + 1 < childrenList.length && /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
46
|
+
className: "fwe-icon fwe-icon-arrows-right-2"
|
|
47
|
+
})]
|
|
48
|
+
}, child.props.children))
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
var _default = Breadcrumb;
|
|
52
|
+
exports.default = _default;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
function Button(_ref) {
|
|
12
|
+
let {
|
|
13
|
+
icon,
|
|
14
|
+
disabled = false,
|
|
15
|
+
iconOnly = false,
|
|
16
|
+
large = false,
|
|
17
|
+
onClick,
|
|
18
|
+
primary = false,
|
|
19
|
+
className,
|
|
20
|
+
children
|
|
21
|
+
} = _ref;
|
|
22
|
+
const classes = (0, _classnames.default)('fwe-btn', 'fr-button', {
|
|
23
|
+
'fwe-btn-icon': iconOnly
|
|
24
|
+
}, {
|
|
25
|
+
'fwe-disabled': disabled
|
|
26
|
+
}, {
|
|
27
|
+
'fwe-btn-hero': primary
|
|
28
|
+
}, {
|
|
29
|
+
'fwe-btn-lg': large
|
|
30
|
+
}, className);
|
|
31
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("button", {
|
|
32
|
+
type: "button",
|
|
33
|
+
onClick: onClick,
|
|
34
|
+
className: classes,
|
|
35
|
+
disabled: disabled,
|
|
36
|
+
children: [icon && /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
37
|
+
className: `fwe-icon fwe-icon-${icon}`
|
|
38
|
+
}), !iconOnly && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
39
|
+
children: children
|
|
40
|
+
})]
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
var _default = Button;
|
|
44
|
+
exports.default = _default;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
8
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
function Card(_ref) {
|
|
11
|
+
let {
|
|
12
|
+
children,
|
|
13
|
+
className
|
|
14
|
+
} = _ref;
|
|
15
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
16
|
+
className: (0, _classnames.default)('fwe-card', className),
|
|
17
|
+
children: children
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
var _default = Card;
|
|
21
|
+
exports.default = _default;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
8
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
function CardBody(_ref) {
|
|
11
|
+
let {
|
|
12
|
+
children,
|
|
13
|
+
text,
|
|
14
|
+
className
|
|
15
|
+
} = _ref;
|
|
16
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
17
|
+
className: (0, _classnames.default)('fwe-card-body', className),
|
|
18
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
19
|
+
className: "fwe-card-text",
|
|
20
|
+
children: text
|
|
21
|
+
}), children]
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
var _default = CardBody;
|
|
25
|
+
exports.default = _default;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
8
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
function CardHeader(_ref) {
|
|
11
|
+
let {
|
|
12
|
+
title,
|
|
13
|
+
subtitle,
|
|
14
|
+
action,
|
|
15
|
+
className
|
|
16
|
+
} = _ref;
|
|
17
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
18
|
+
className: (0, _classnames.default)('fwe-card-header', className),
|
|
19
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
20
|
+
className: "fwe-card-title",
|
|
21
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("h5", {
|
|
22
|
+
children: title
|
|
23
|
+
}), subtitle && /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
|
|
24
|
+
children: subtitle
|
|
25
|
+
})]
|
|
26
|
+
}), action]
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
var _default = CardHeader;
|
|
30
|
+
exports.default = _default;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
8
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
function CardNotification(_ref) {
|
|
11
|
+
let {
|
|
12
|
+
iconName,
|
|
13
|
+
className,
|
|
14
|
+
title,
|
|
15
|
+
message
|
|
16
|
+
} = _ref;
|
|
17
|
+
const classes = (0, _classnames.default)('fwe-card-notification', className);
|
|
18
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
19
|
+
className: classes,
|
|
20
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
21
|
+
className: `fwe-icon fwe-icon-${iconName} fwe-icon-lg`
|
|
22
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
23
|
+
className: "fwe-card-title",
|
|
24
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("h6", {
|
|
25
|
+
children: title
|
|
26
|
+
}), message && /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
|
|
27
|
+
children: message
|
|
28
|
+
})]
|
|
29
|
+
})]
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
var _default = CardNotification;
|
|
33
|
+
exports.default = _default;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.ChipType = void 0;
|
|
7
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
8
|
+
var _DeleteIcon = _interopRequireDefault(require("./DeleteIcon"));
|
|
9
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
let ChipType;
|
|
12
|
+
exports.ChipType = ChipType;
|
|
13
|
+
(function (ChipType) {
|
|
14
|
+
ChipType[ChipType["Choice"] = 0] = "Choice";
|
|
15
|
+
ChipType[ChipType["Category"] = 1] = "Category";
|
|
16
|
+
ChipType[ChipType["Filter"] = 2] = "Filter";
|
|
17
|
+
ChipType[ChipType["Action"] = 3] = "Action";
|
|
18
|
+
ChipType[ChipType["Readonly"] = 4] = "Readonly";
|
|
19
|
+
})(ChipType || (exports.ChipType = ChipType = {}));
|
|
20
|
+
function Chip(_ref) {
|
|
21
|
+
let {
|
|
22
|
+
type = ChipType.Choice,
|
|
23
|
+
selected = false,
|
|
24
|
+
disabled = false,
|
|
25
|
+
large = false,
|
|
26
|
+
icon,
|
|
27
|
+
children,
|
|
28
|
+
onClick,
|
|
29
|
+
className
|
|
30
|
+
} = _ref;
|
|
31
|
+
const classes = (0, _classnames.default)('fr-chip', 'fwe-chip', {
|
|
32
|
+
'fwe-selected': selected
|
|
33
|
+
}, {
|
|
34
|
+
'fwe-disabled': disabled
|
|
35
|
+
}, {
|
|
36
|
+
'fwe-chip-lg': large
|
|
37
|
+
}, {
|
|
38
|
+
'fwe-category': type === ChipType.Category
|
|
39
|
+
}, {
|
|
40
|
+
'fwe-filter': type === ChipType.Filter
|
|
41
|
+
}, {
|
|
42
|
+
'fwe-readonly': type === ChipType.Readonly
|
|
43
|
+
}, className);
|
|
44
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
45
|
+
className: classes,
|
|
46
|
+
children: [icon && /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
47
|
+
className: `fwe-icon fwe-icon-${icon}`
|
|
48
|
+
}), children, type === ChipType.Category && /*#__PURE__*/(0, _jsxRuntime.jsx)(_DeleteIcon.default, {
|
|
49
|
+
onClick: e => onClick ? onClick(e) : undefined
|
|
50
|
+
})]
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
var _default = Chip;
|
|
54
|
+
exports.default = _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = DeleteIcon;
|
|
7
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
8
|
+
function DeleteIcon(props) {
|
|
9
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
10
|
+
...props,
|
|
11
|
+
className: "fwe-icon fwe-icon-menu-close"
|
|
12
|
+
});
|
|
13
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
8
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
function ChipContainer(_ref) {
|
|
11
|
+
let {
|
|
12
|
+
large = false,
|
|
13
|
+
children,
|
|
14
|
+
className
|
|
15
|
+
} = _ref;
|
|
16
|
+
const classes = (0, _classnames.default)('fwe-chip-container', {
|
|
17
|
+
'fwe-chip-container-lg': large
|
|
18
|
+
}, className);
|
|
19
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
20
|
+
className: classes,
|
|
21
|
+
children: children
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
var _default = ChipContainer;
|
|
25
|
+
exports.default = _default;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
8
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
function LinkButton(_ref) {
|
|
11
|
+
let {
|
|
12
|
+
icon,
|
|
13
|
+
onClick,
|
|
14
|
+
disabled = false,
|
|
15
|
+
children,
|
|
16
|
+
iconOnly = false,
|
|
17
|
+
className
|
|
18
|
+
} = _ref;
|
|
19
|
+
const classes = (0, _classnames.default)('fwe-btn', 'fwe-btn-link', {
|
|
20
|
+
'fwe-disabled': disabled
|
|
21
|
+
}, className);
|
|
22
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("button", {
|
|
23
|
+
onClick: onClick,
|
|
24
|
+
type: "button",
|
|
25
|
+
className: classes,
|
|
26
|
+
disabled: disabled,
|
|
27
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
28
|
+
className: `fwe-icon fwe-icon-${icon}`
|
|
29
|
+
}), !iconOnly && children]
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
var _default = LinkButton;
|
|
33
|
+
exports.default = _default;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.LoadingIndicator = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
9
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
const LoadingIndicator = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
12
|
+
let {
|
|
13
|
+
size = 'large',
|
|
14
|
+
children,
|
|
15
|
+
className,
|
|
16
|
+
...props
|
|
17
|
+
} = _ref;
|
|
18
|
+
const classes = (0, _classnames.default)('fwe-waiting-indicator', {
|
|
19
|
+
'fwe-waiting-indicator-md': size === 'medium'
|
|
20
|
+
}, {
|
|
21
|
+
'fwe-waiting-indicator-sm': size === 'small'
|
|
22
|
+
});
|
|
23
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
24
|
+
className: (0, _classnames.default)('fwe-waiting-container', {
|
|
25
|
+
'fwe-waiting-container-sm': size === 'small'
|
|
26
|
+
}, className),
|
|
27
|
+
ref: ref,
|
|
28
|
+
...props,
|
|
29
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
30
|
+
className: classes,
|
|
31
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
32
|
+
className: "fwe-waiting-circle-1"
|
|
33
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
34
|
+
className: "fwe-waiting-circle-2"
|
|
35
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
36
|
+
className: "fwe-waiting-circle-3"
|
|
37
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
38
|
+
className: "fwe-waiting-circle-4"
|
|
39
|
+
})]
|
|
40
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
41
|
+
className: "fwe-waiting-content-container",
|
|
42
|
+
children: children
|
|
43
|
+
})]
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
exports.LoadingIndicator = LoadingIndicator;
|
|
47
|
+
var _default = LoadingIndicator;
|
|
48
|
+
exports.default = _default;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
8
|
+
var _Modal = _interopRequireDefault(require("./Modal"));
|
|
9
|
+
var _ModalFooter = _interopRequireDefault(require("./ModalFooter"));
|
|
10
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
+
function AlertModal(_ref) {
|
|
13
|
+
let {
|
|
14
|
+
alertType,
|
|
15
|
+
title,
|
|
16
|
+
className,
|
|
17
|
+
body,
|
|
18
|
+
strong,
|
|
19
|
+
subtitle,
|
|
20
|
+
cancel,
|
|
21
|
+
ok,
|
|
22
|
+
onCancel,
|
|
23
|
+
onOk,
|
|
24
|
+
...props
|
|
25
|
+
} = _ref;
|
|
26
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Modal.default, {
|
|
27
|
+
className: (0, _classnames.default)({
|
|
28
|
+
'fwe-modal--with-indicator-bar': strong,
|
|
29
|
+
'fwe-modal--warning': alertType === 'warning',
|
|
30
|
+
'fwe-modal--error': alertType === 'error',
|
|
31
|
+
'fwe-modal--info': alertType === 'info'
|
|
32
|
+
}, className),
|
|
33
|
+
head: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
34
|
+
children: [subtitle && /*#__PURE__*/(0, _jsxRuntime.jsxs)("h2", {
|
|
35
|
+
className: "fwe-modal-h2",
|
|
36
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
37
|
+
className: (0, _classnames.default)({
|
|
38
|
+
'fwe-icon': true,
|
|
39
|
+
'fwe-icon-status-warning': alertType === 'warning',
|
|
40
|
+
'fwe-icon-status-failure': alertType === 'error',
|
|
41
|
+
'fwe-icon-status-check-status': alertType === 'info'
|
|
42
|
+
})
|
|
43
|
+
}), subtitle]
|
|
44
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("h1", {
|
|
45
|
+
className: "fwe-modal-h1",
|
|
46
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
47
|
+
className: (0, _classnames.default)({
|
|
48
|
+
'fwe-icon': true,
|
|
49
|
+
'fwe-icon-status-warning': alertType === 'warning',
|
|
50
|
+
'fwe-icon-status-failure': alertType === 'error',
|
|
51
|
+
'fwe-icon-status-check-status': alertType === 'info'
|
|
52
|
+
})
|
|
53
|
+
}), title]
|
|
54
|
+
})]
|
|
55
|
+
}),
|
|
56
|
+
body: typeof body === 'string' ? /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
|
|
57
|
+
children: body
|
|
58
|
+
}) : body,
|
|
59
|
+
...props,
|
|
60
|
+
children: (cancel || ok) && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ModalFooter.default, {
|
|
61
|
+
children: [cancel && /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
|
|
62
|
+
type: "button",
|
|
63
|
+
"aria-label": "Cancel",
|
|
64
|
+
className: (0, _classnames.default)('fwe-btn fwe-btn-lg', {
|
|
65
|
+
'fwe-btn-link': strong
|
|
66
|
+
}),
|
|
67
|
+
onClick: onCancel,
|
|
68
|
+
children: cancel
|
|
69
|
+
}), ok && /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
|
|
70
|
+
type: "button",
|
|
71
|
+
"aria-label": "Ok",
|
|
72
|
+
className: (0, _classnames.default)('fwe-btn fwe-btn-lg', {
|
|
73
|
+
'fwe-btn-hero': !strong
|
|
74
|
+
}),
|
|
75
|
+
onClick: onOk,
|
|
76
|
+
children: ok
|
|
77
|
+
})]
|
|
78
|
+
})
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
var _default = AlertModal;
|
|
82
|
+
exports.default = _default;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
8
|
+
var _Modal = _interopRequireDefault(require("./Modal"));
|
|
9
|
+
var _ModalFooter = _interopRequireDefault(require("./ModalFooter"));
|
|
10
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
+
function ConfirmModal(_ref) {
|
|
13
|
+
let {
|
|
14
|
+
title,
|
|
15
|
+
subtitle,
|
|
16
|
+
body,
|
|
17
|
+
className,
|
|
18
|
+
cancel,
|
|
19
|
+
ok,
|
|
20
|
+
onCancel,
|
|
21
|
+
onOk,
|
|
22
|
+
isOpen,
|
|
23
|
+
large,
|
|
24
|
+
...props
|
|
25
|
+
} = _ref;
|
|
26
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Modal.default, {
|
|
27
|
+
className: (0, _classnames.default)({
|
|
28
|
+
'fwe-modal--large': large
|
|
29
|
+
}, className),
|
|
30
|
+
head: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
31
|
+
children: [subtitle && /*#__PURE__*/(0, _jsxRuntime.jsx)("h2", {
|
|
32
|
+
className: "fwe-modal-h2",
|
|
33
|
+
children: subtitle
|
|
34
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("h1", {
|
|
35
|
+
className: "fwe-modal-h1",
|
|
36
|
+
children: title
|
|
37
|
+
})]
|
|
38
|
+
}),
|
|
39
|
+
body: typeof body === 'string' ? /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
|
|
40
|
+
children: body
|
|
41
|
+
}) : body,
|
|
42
|
+
isOpen: isOpen,
|
|
43
|
+
...props,
|
|
44
|
+
children: (cancel || ok) && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ModalFooter.default, {
|
|
45
|
+
children: [cancel && /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
|
|
46
|
+
type: "button",
|
|
47
|
+
"aria-label": "Cancel",
|
|
48
|
+
className: "fwe-btn fwe-btn-lg",
|
|
49
|
+
onClick: onCancel,
|
|
50
|
+
children: cancel
|
|
51
|
+
}), ok && /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
|
|
52
|
+
type: "button",
|
|
53
|
+
"aria-label": "Ok",
|
|
54
|
+
className: "fwe-btn fwe-btn-hero fwe-btn-lg",
|
|
55
|
+
onClick: onOk,
|
|
56
|
+
children: ok
|
|
57
|
+
})]
|
|
58
|
+
})
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
var _default = ConfirmModal;
|
|
62
|
+
exports.default = _default;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
9
|
+
var _reactTransitionGroup = require("react-transition-group");
|
|
10
|
+
var _reactOutsideClickHandler = _interopRequireDefault(require("react-outside-click-handler"));
|
|
11
|
+
var _useForkRef = _interopRequireDefault(require("../../helper/useForkRef"));
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
15
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
16
|
+
const Modal = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
17
|
+
let {
|
|
18
|
+
head,
|
|
19
|
+
isOpen,
|
|
20
|
+
body,
|
|
21
|
+
onClose,
|
|
22
|
+
className,
|
|
23
|
+
children
|
|
24
|
+
} = _ref;
|
|
25
|
+
const backdropRef = (0, _react.useRef)(null);
|
|
26
|
+
const modalRef = (0, _react.useRef)(null);
|
|
27
|
+
const combinedRef = (0, _useForkRef.default)(ref, modalRef);
|
|
28
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
29
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactTransitionGroup.CSSTransition, {
|
|
30
|
+
nodeRef: backdropRef,
|
|
31
|
+
unmountOnExit: true,
|
|
32
|
+
timeout: {
|
|
33
|
+
exit: 600
|
|
34
|
+
},
|
|
35
|
+
in: isOpen,
|
|
36
|
+
classNames: "fr-modal-backdrop",
|
|
37
|
+
appear: true,
|
|
38
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
39
|
+
ref: backdropRef,
|
|
40
|
+
className: "fr-modal-backdrop fwe-modal-backdrop"
|
|
41
|
+
})
|
|
42
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactOutsideClickHandler.default, {
|
|
43
|
+
onOutsideClick: () => onClose ? onClose() : undefined,
|
|
44
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactTransitionGroup.CSSTransition, {
|
|
45
|
+
ref: modalRef,
|
|
46
|
+
unmountOnExit: true,
|
|
47
|
+
classNames: "fr-modal",
|
|
48
|
+
appear: true,
|
|
49
|
+
in: isOpen,
|
|
50
|
+
timeout: {
|
|
51
|
+
exit: 600
|
|
52
|
+
},
|
|
53
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
54
|
+
ref: combinedRef,
|
|
55
|
+
className: (0, _classnames.default)('fr-modal fwe-modal', className),
|
|
56
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
57
|
+
className: "fwe-modal-close",
|
|
58
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("button", {
|
|
59
|
+
type: "button",
|
|
60
|
+
"aria-label": "Close",
|
|
61
|
+
className: "fwe-btn fwe-btn-link fwe-dark",
|
|
62
|
+
onClick: onClose,
|
|
63
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
64
|
+
"aria-hidden": "true",
|
|
65
|
+
className: "fwe-icon fwe-icon-close-small"
|
|
66
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
67
|
+
className: "fwe-sr-only",
|
|
68
|
+
children: "Close"
|
|
69
|
+
})]
|
|
70
|
+
})
|
|
71
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
72
|
+
className: "fwe-modal-header",
|
|
73
|
+
children: head
|
|
74
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
75
|
+
className: "fwe-modal-body",
|
|
76
|
+
children: body
|
|
77
|
+
}), children]
|
|
78
|
+
})
|
|
79
|
+
})
|
|
80
|
+
})]
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
var _default = Modal;
|
|
84
|
+
exports.default = _default;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
9
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
const ModalFooter = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
12
|
+
let {
|
|
13
|
+
children,
|
|
14
|
+
className
|
|
15
|
+
} = _ref;
|
|
16
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
17
|
+
ref: ref,
|
|
18
|
+
className: (0, _classnames.default)('fwe-modal-footer', className),
|
|
19
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
20
|
+
className: (0, _classnames.default)('fwe-modal-buttons'),
|
|
21
|
+
children: children
|
|
22
|
+
})
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
var _default = ModalFooter;
|
|
26
|
+
exports.default = _default;
|