@codacy/ui-components 0.66.25 → 0.66.27
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/lib/Avatar/Avatar.js +20 -28
- package/lib/Avatar/Avatar.types.js +1 -5
- package/lib/Avatar/gravatar.js +14 -22
- package/lib/Avatar/index.js +1 -16
- package/lib/Banner/Banner.js +33 -50
- package/lib/Banner/Banner.styles.d.ts +1 -1
- package/lib/Banner/Banner.styles.js +11 -20
- package/lib/Banner/Banner.types.js +1 -5
- package/lib/Banner/index.js +2 -27
- package/lib/Bannerol/Bannerol.js +44 -61
- package/lib/Bannerol/Bannerol.styles.js +9 -18
- package/lib/Bannerol/Bannerol.types.js +1 -5
- package/lib/Bannerol/index.js +3 -38
- package/lib/BigTabs/BigTabs.js +39 -54
- package/lib/BigTabs/BigTabs.styles.js +79 -107
- package/lib/BigTabs/BigTabs.types.js +1 -5
- package/lib/BigTabs/index.js +1 -16
- package/lib/Button/Button.js +45 -67
- package/lib/Button/index.js +2 -27
- package/lib/Button/styles.js +101 -130
- package/lib/Button/types.js +1 -5
- package/lib/Checkbox/Checkbox.js +55 -68
- package/lib/Checkbox/CheckboxFilterList.js +33 -66
- package/lib/Checkbox/index.js +3 -38
- package/lib/Checkbox/styles.js +64 -86
- package/lib/Checkbox/types.js +1 -5
- package/lib/CloseButton/index.d.ts +1 -1
- package/lib/CloseButton/index.js +24 -36
- package/lib/Divider/Divider.js +14 -25
- package/lib/Divider/Divider.styles.d.ts +1 -1
- package/lib/Divider/Divider.styles.js +24 -38
- package/lib/Divider/Divider.types.js +1 -5
- package/lib/Divider/index.js +1 -16
- package/lib/Dropdown/Content/DropdownInput.js +10 -20
- package/lib/Dropdown/Content/DropdownItem.js +22 -36
- package/lib/Dropdown/Content/DropdownSeparator.js +8 -19
- package/lib/Dropdown/Content/DropdownTitle.js +8 -22
- package/lib/Dropdown/Content/index.js +4 -49
- package/lib/Dropdown/Dropdown.js +74 -102
- package/lib/Dropdown/Dropdown.styles.d.ts +1 -1
- package/lib/Dropdown/Dropdown.styles.js +60 -82
- package/lib/Dropdown/Dropdown.types.js +1 -5
- package/lib/Dropdown/Triggers/DropdownButtonTrigger.js +19 -32
- package/lib/Dropdown/Triggers/DropdownItemTrigger.js +18 -30
- package/lib/Dropdown/Triggers/FilterTrigger.js +66 -93
- package/lib/Dropdown/Triggers/InputTrigger.js +15 -24
- package/lib/Dropdown/Triggers/SelectTrigger.js +12 -21
- package/lib/Dropdown/Triggers/hooks.js +17 -26
- package/lib/Dropdown/Triggers/index.js +6 -71
- package/lib/Dropdown/Triggers/types.js +1 -5
- package/lib/Dropdown/index.js +4 -49
- package/lib/ExpandableBox/ExpandableBox.js +28 -43
- package/lib/ExpandableBox/ExpandableBox.styles.d.ts +2 -2
- package/lib/ExpandableBox/ExpandableBox.styles.js +27 -40
- package/lib/ExpandableBox/ExpandableBox.types.js +1 -5
- package/lib/ExpandableBox/index.js +1 -16
- package/lib/Flexbox/Flexbox.js +14 -21
- package/lib/Flexbox/index.js +1 -16
- package/lib/Group/Group.js +7 -18
- package/lib/Group/Group.styles.js +8 -16
- package/lib/Group/Group.types.js +1 -5
- package/lib/Group/index.js +1 -16
- package/lib/Icon/Icon.js +15 -26
- package/lib/Icon/Icon.styles.d.ts +1 -1
- package/lib/Icon/Icon.styles.js +57 -50
- package/lib/Icon/Icon.types.js +1 -5
- package/lib/Icon/index.js +1 -16
- package/lib/IconAndText/IconAndText.js +23 -36
- package/lib/IconAndText/IconAndText.styles.js +19 -29
- package/lib/IconAndText/IconAndText.types.js +1 -5
- package/lib/IconAndText/index.js +1 -16
- package/lib/Icons/Chevrons.js +45 -65
- package/lib/Icons/CodacyIcon.js +9 -20
- package/lib/Icons/Ellipsis.js +18 -29
- package/lib/Icons/Messages.js +58 -79
- package/lib/Icons/Search.js +8 -19
- package/lib/Icons/Severities.js +113 -149
- package/lib/Icons/Sorting.js +15 -29
- package/lib/Icons/Spinner.js +11 -22
- package/lib/Icons/Symbols.js +67 -90
- package/lib/Icons/index.js +8 -93
- package/lib/Img/Img.js +26 -45
- package/lib/Img/Img.styles.d.ts +2 -2
- package/lib/Img/Img.styles.js +21 -29
- package/lib/Img/Img.types.js +1 -5
- package/lib/Img/index.js +1 -16
- package/lib/InlineMessage/InlineMessage.js +43 -70
- package/lib/InlineMessage/index.js +1 -16
- package/lib/InlineMessage/types.js +1 -5
- package/lib/Input/Input.js +115 -143
- package/lib/Input/hooks.js +107 -208
- package/lib/Input/index.js +2 -27
- package/lib/Input/styles.d.ts +2 -2
- package/lib/Input/styles.js +116 -151
- package/lib/Input/types.js +1 -5
- package/lib/Labeled/Labeled.js +22 -35
- package/lib/Labeled/index.js +1 -16
- package/lib/Labeled/styles.js +23 -37
- package/lib/Labeled/types.js +1 -5
- package/lib/LeftMenu/LeftMenu.js +10 -21
- package/lib/LeftMenu/LeftMenu.styles.js +25 -43
- package/lib/LeftMenu/LeftMenu.types.js +1 -5
- package/lib/LeftMenu/index.js +1 -16
- package/lib/Link/Link.js +32 -50
- package/lib/Link/Link.styles.js +11 -23
- package/lib/Link/Link.types.js +1 -5
- package/lib/Link/index.js +3 -38
- package/lib/Message/Message.js +31 -42
- package/lib/Message/Message.styles.js +18 -31
- package/lib/Message/Message.types.js +1 -5
- package/lib/Message/index.js +1 -16
- package/lib/Modal/ConfirmationModal.js +40 -67
- package/lib/Modal/Modal.js +107 -137
- package/lib/Modal/index.js +2 -27
- package/lib/Modal/styles.js +44 -62
- package/lib/Modal/types.js +1 -5
- package/lib/MoreInfo/MoreInfo.js +41 -53
- package/lib/MoreInfo/index.js +1 -16
- package/lib/MoreInfo/types.js +1 -5
- package/lib/MultiSlider/MultiSlider.js +17 -31
- package/lib/MultiSlider/index.js +1 -16
- package/lib/MultiSlider/styles.js +18 -34
- package/lib/MultiSlider/types.js +1 -5
- package/lib/Panel/Panel.js +9 -19
- package/lib/Panel/Panel.styles.js +15 -26
- package/lib/Panel/Panel.types.js +1 -5
- package/lib/Panel/index.js +2 -27
- package/lib/PillLabel/PillLabel.js +35 -49
- package/lib/PillLabel/PillLabel.styles.js +33 -44
- package/lib/PillLabel/PillLabel.types.js +1 -5
- package/lib/PillLabel/index.js +1 -16
- package/lib/Popup/Popup.js +43 -61
- package/lib/Popup/index.js +1 -16
- package/lib/Popup/styles.js +22 -37
- package/lib/Popup/types.js +1 -5
- package/lib/ProgressBar/ProgressBar.js +19 -34
- package/lib/ProgressBar/index.js +2 -27
- package/lib/ProgressBar/styles.js +21 -35
- package/lib/ProgressBar/types.js +1 -5
- package/lib/Radio/Radio.js +47 -59
- package/lib/Radio/index.js +1 -16
- package/lib/Radio/styles.js +48 -72
- package/lib/Radio/types.js +1 -5
- package/lib/ScrollableContent/ScrollableContent.js +27 -40
- package/lib/ScrollableContent/ScrollableContent.styles.js +22 -39
- package/lib/ScrollableContent/ScrollableContent.types.js +1 -5
- package/lib/ScrollableContent/index.js +2 -27
- package/lib/ScrollableContent/useScrollContainer.js +35 -50
- package/lib/Skeleton/Skeleton.js +25 -45
- package/lib/Skeleton/Skeleton.styles.js +28 -25
- package/lib/Skeleton/Skeleton.types.js +1 -5
- package/lib/Skeleton/index.js +2 -20
- package/lib/Slider/Slider.js +32 -56
- package/lib/Slider/index.js +1 -16
- package/lib/Slider/styles.js +41 -60
- package/lib/Slider/types.js +1 -5
- package/lib/StepNumber/StepNumber.js +26 -40
- package/lib/StepNumber/index.js +1 -16
- package/lib/StepNumber/styles.js +13 -24
- package/lib/StepNumber/types.js +1 -5
- package/lib/Stepper/Stepper.js +45 -62
- package/lib/Stepper/Stepper.styles.js +27 -44
- package/lib/Stepper/Stepper.types.js +1 -5
- package/lib/Stepper/index.js +1 -16
- package/lib/Switcher/Switcher.js +22 -34
- package/lib/Switcher/Switcher.styles.js +27 -42
- package/lib/Switcher/Switcher.types.js +1 -5
- package/lib/Switcher/index.js +1 -16
- package/lib/Tab/Tab.js +21 -33
- package/lib/Tab/Tab.styles.js +34 -50
- package/lib/Tab/Tab.types.js +1 -5
- package/lib/Tab/index.js +1 -16
- package/lib/Table/NewSelectableTable.js +59 -97
- package/lib/Table/SelectableTable.js +142 -189
- package/lib/Table/Table.js +110 -155
- package/lib/Table/Table.styles.js +67 -90
- package/lib/Table/Table.types.js +1 -5
- package/lib/Table/index.js +2 -27
- package/lib/TagsInput/TagsInput.js +32 -46
- package/lib/TagsInput/index.js +1 -16
- package/lib/TagsInput/style.js +45 -71
- package/lib/TagsInput/types.js +1 -5
- package/lib/Textarea/Textarea.js +52 -71
- package/lib/Textarea/Textarea.styles.js +91 -126
- package/lib/Textarea/Textarea.types.js +1 -5
- package/lib/Textarea/index.js +1 -16
- package/lib/ThemeProvider/ThemeProvider.js +41 -65
- package/lib/ThemeProvider/index.js +1 -16
- package/lib/Toast/Toast.js +53 -68
- package/lib/Toast/index.js +1 -16
- package/lib/Toast/styles.js +29 -49
- package/lib/Toast/types.js +1 -5
- package/lib/Toggle/Toggle.js +48 -65
- package/lib/Toggle/index.js +1 -16
- package/lib/Toggle/styles.d.ts +1 -1
- package/lib/Toggle/styles.js +66 -101
- package/lib/Toggle/types.js +1 -5
- package/lib/Tooltip/Tooltip.js +84 -121
- package/lib/Tooltip/index.js +2 -27
- package/lib/Tooltip/styles.js +61 -91
- package/lib/Tooltip/types.js +1 -5
- package/lib/Typography/Typography.js +78 -116
- package/lib/Typography/Typography.styles.js +61 -78
- package/lib/Typography/Typography.types.js +1 -5
- package/lib/Typography/index.js +3 -38
- package/lib/emotion.d.js +1 -3
- package/lib/hooks/index.d.ts +1 -0
- package/lib/hooks/index.js +4 -38
- package/lib/hooks/useForwardedRef.js +5 -11
- package/lib/hooks/useInfiniteScroll.js +13 -25
- package/lib/hooks/useStatefulRef.js +10 -23
- package/lib/index.js +49 -544
- package/lib/system-props/color.js +3 -9
- package/lib/system-props/index.js +2 -27
- package/lib/system-props/types.js +1 -5
- package/lib/theme/ColorSchemes/components/alerts.js +30 -38
- package/lib/theme/ColorSchemes/components/button.js +89 -97
- package/lib/theme/ColorSchemes/components/cards.js +16 -24
- package/lib/theme/ColorSchemes/components/charts.js +93 -101
- package/lib/theme/ColorSchemes/components/checkbox-input.js +13 -21
- package/lib/theme/ColorSchemes/components/divider.js +4 -12
- package/lib/theme/ColorSchemes/components/drawer.js +21 -29
- package/lib/theme/ColorSchemes/components/effects.js +5 -13
- package/lib/theme/ColorSchemes/components/filters.js +12 -20
- package/lib/theme/ColorSchemes/components/index.js +23 -258
- package/lib/theme/ColorSchemes/components/input.js +38 -46
- package/lib/theme/ColorSchemes/components/issues.js +27 -35
- package/lib/theme/ColorSchemes/components/label.js +33 -41
- package/lib/theme/ColorSchemes/components/list-orb.js +8 -16
- package/lib/theme/ColorSchemes/components/loading.js +4 -12
- package/lib/theme/ColorSchemes/components/logo.js +6 -14
- package/lib/theme/ColorSchemes/components/modals.js +6 -14
- package/lib/theme/ColorSchemes/components/navigation.js +17 -25
- package/lib/theme/ColorSchemes/components/progress-bar.js +5 -13
- package/lib/theme/ColorSchemes/components/selector.js +20 -28
- package/lib/theme/ColorSchemes/components/stepper.js +9 -17
- package/lib/theme/ColorSchemes/components/tables.js +12 -20
- package/lib/theme/ColorSchemes/components/tabs.js +13 -21
- package/lib/theme/ColorSchemes/components/tooltip.js +6 -14
- package/lib/theme/ColorSchemes/components/utils.js +1 -11
- package/lib/theme/ColorSchemes/dark/background.d.ts +27 -27
- package/lib/theme/ColorSchemes/dark/background.js +42 -50
- package/lib/theme/ColorSchemes/dark/border.d.ts +27 -27
- package/lib/theme/ColorSchemes/dark/border.js +37 -45
- package/lib/theme/ColorSchemes/dark/data.js +18 -24
- package/lib/theme/ColorSchemes/dark/icon.d.ts +27 -27
- package/lib/theme/ColorSchemes/dark/icon.js +40 -48
- package/lib/theme/ColorSchemes/dark/illustration.js +11 -17
- package/lib/theme/ColorSchemes/dark/index.js +60 -31
- package/lib/theme/ColorSchemes/dark/text.d.ts +27 -27
- package/lib/theme/ColorSchemes/dark/text.js +47 -54
- package/lib/theme/ColorSchemes/index.js +4 -49
- package/lib/theme/ColorSchemes/light/background.d.ts +27 -27
- package/lib/theme/ColorSchemes/light/background.js +42 -50
- package/lib/theme/ColorSchemes/light/border.d.ts +27 -27
- package/lib/theme/ColorSchemes/light/border.js +37 -45
- package/lib/theme/ColorSchemes/light/data.js +18 -24
- package/lib/theme/ColorSchemes/light/icon.d.ts +27 -27
- package/lib/theme/ColorSchemes/light/icon.js +40 -48
- package/lib/theme/ColorSchemes/light/illustration.js +11 -17
- package/lib/theme/ColorSchemes/light/index.d.ts +54 -54
- package/lib/theme/ColorSchemes/light/index.js +43 -19
- package/lib/theme/ColorSchemes/light/text.d.ts +27 -27
- package/lib/theme/ColorSchemes/light/text.js +47 -54
- package/lib/theme/ColorSchemes/primitives/blue.js +1 -7
- package/lib/theme/ColorSchemes/primitives/green.js +1 -7
- package/lib/theme/ColorSchemes/primitives/grey.js +1 -7
- package/lib/theme/ColorSchemes/primitives/index.d.ts +9 -9
- package/lib/theme/ColorSchemes/primitives/index.js +20 -18
- package/lib/theme/ColorSchemes/primitives/magenta.js +1 -7
- package/lib/theme/ColorSchemes/primitives/orange.js +1 -7
- package/lib/theme/ColorSchemes/primitives/purple.js +1 -7
- package/lib/theme/ColorSchemes/primitives/red.js +1 -7
- package/lib/theme/ColorSchemes/primitives/teal.js +1 -7
- package/lib/theme/ColorSchemes/primitives/yellow.js +1 -7
- package/lib/theme/ColorSchemes/semantics.js +7 -13
- package/lib/theme/index.js +2 -27
- package/lib/theme/theme.js +68 -77
- package/lib/types.js +1 -5
- package/lib/utils/hash.js +3 -9
- package/lib/utils/reactNodeToText.js +9 -17
- package/package.json +21 -11
package/lib/Message/Message.js
CHANGED
|
@@ -1,35 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.statusToIconMap = exports.Message = void 0;
|
|
8
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
9
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
|
10
|
-
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
var _Message = require("./Message.styles");
|
|
12
|
-
var _Icons = require("../Icons");
|
|
13
|
-
var _Typography = require("../Typography");
|
|
14
|
-
var _Icon = require("../Icon");
|
|
15
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
|
-
var _excluded = ["children", "id", "status"]; // /**
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
// /**
|
|
17
3
|
// * Description for Message
|
|
18
4
|
// */
|
|
19
|
-
|
|
20
|
-
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import { MessageWrapper } from './Message.styles';
|
|
7
|
+
import { InfoIcon, WarningIcon, ErrorIcon, SuccessIcon, RocketFilledIcon } from '../Icons';
|
|
8
|
+
import { Paragraph } from '../Typography';
|
|
9
|
+
import { Icon } from '../Icon';
|
|
10
|
+
export const statusToIconMap = {
|
|
11
|
+
info: /*#__PURE__*/React.createElement(InfoIcon, {
|
|
21
12
|
color: "alerts-info-icon"
|
|
22
13
|
}),
|
|
23
|
-
warning: /*#__PURE__*/
|
|
14
|
+
warning: /*#__PURE__*/React.createElement(WarningIcon, {
|
|
24
15
|
color: "alerts-warning-icon"
|
|
25
16
|
}),
|
|
26
|
-
danger: /*#__PURE__*/
|
|
17
|
+
danger: /*#__PURE__*/React.createElement(ErrorIcon, {
|
|
27
18
|
color: "alerts-danger-icon"
|
|
28
19
|
}),
|
|
29
|
-
success: /*#__PURE__*/
|
|
20
|
+
success: /*#__PURE__*/React.createElement(SuccessIcon, {
|
|
30
21
|
color: "alerts-success-icon"
|
|
31
22
|
}),
|
|
32
|
-
attention: /*#__PURE__*/
|
|
23
|
+
attention: /*#__PURE__*/React.createElement(RocketFilledIcon, {
|
|
33
24
|
color: "alerts-attention-icon"
|
|
34
25
|
})
|
|
35
26
|
};
|
|
@@ -37,25 +28,23 @@ var statusToIconMap = exports.statusToIconMap = {
|
|
|
37
28
|
/**
|
|
38
29
|
* Message Banner
|
|
39
30
|
*/
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
31
|
+
const Message = /*#__PURE__*/React.forwardRef(({
|
|
32
|
+
children,
|
|
33
|
+
id,
|
|
34
|
+
status,
|
|
35
|
+
...props
|
|
36
|
+
}, ref) => {
|
|
37
|
+
return /*#__PURE__*/React.createElement(MessageWrapper, _extends({
|
|
46
38
|
id: id,
|
|
47
39
|
status: status
|
|
48
|
-
}, props
|
|
49
|
-
ref: ref
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
})]
|
|
60
|
-
}));
|
|
61
|
-
});
|
|
40
|
+
}, props, {
|
|
41
|
+
ref: ref
|
|
42
|
+
}), /*#__PURE__*/React.createElement(Icon, {
|
|
43
|
+
icon: () => statusToIconMap[status],
|
|
44
|
+
size: "lg",
|
|
45
|
+
mr: 3
|
|
46
|
+
}), /*#__PURE__*/React.createElement(Paragraph, {
|
|
47
|
+
color: "alerts-secondary-text"
|
|
48
|
+
}, children));
|
|
49
|
+
});
|
|
50
|
+
export { Message };
|
|
@@ -1,35 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.MessageWrapper = void 0;
|
|
8
|
-
var _base = _interopRequireDefault(require("@emotion/styled/base"));
|
|
9
|
-
var _Flexbox = require("../Flexbox");
|
|
10
|
-
var _Link = require("../Link/Link.styles");
|
|
11
|
-
var MessageWrapper = exports.MessageWrapper = /*#__PURE__*/(0, _base["default"])(_Flexbox.Flex, process.env.NODE_ENV === "production" ? {
|
|
1
|
+
import _styled from "@emotion/styled/base";
|
|
2
|
+
import { Flex } from '../Flexbox';
|
|
3
|
+
import { StyledLink } from '../Link/Link.styles';
|
|
4
|
+
export const MessageWrapper = /*#__PURE__*/_styled(Flex, process.env.NODE_ENV === "production" ? {
|
|
12
5
|
target: "ebhqpcy0"
|
|
13
6
|
} : {
|
|
14
7
|
target: "ebhqpcy0",
|
|
15
8
|
label: "codacy"
|
|
16
|
-
})("padding:",
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}, ";
|
|
30
|
-
var theme = _ref5.theme;
|
|
31
|
-
return theme.fontWeights['semi-bold'];
|
|
32
|
-
}, ";text-decoration:underline;&:hover{color:", function (_ref6) {
|
|
33
|
-
var theme = _ref6.theme;
|
|
34
|
-
return theme.colors['alerts-primary-link'];
|
|
35
|
-
}, ";}}" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9NZXNzYWdlL01lc3NhZ2Uuc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUt3RCIsImZpbGUiOiIuLi8uLi9zcmMvTWVzc2FnZS9NZXNzYWdlLnN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJ1xuaW1wb3J0IHsgTWVzc2FnZVByb3BzIH0gZnJvbSAnLi9NZXNzYWdlLnR5cGVzJ1xuaW1wb3J0IHsgRmxleCB9IGZyb20gJy4uL0ZsZXhib3gnXG5pbXBvcnQgeyBTdHlsZWRMaW5rIH0gZnJvbSAnLi4vTGluay9MaW5rLnN0eWxlcydcblxuZXhwb3J0IGNvbnN0IE1lc3NhZ2VXcmFwcGVyID0gc3R5bGVkKEZsZXgpPE1lc3NhZ2VQcm9wcz5gXG4gIHBhZGRpbmc6ICR7KHsgdGhlbWUgfSkgPT4gdGhlbWUuc3BhY2VbMl19O1xuICBjb2xvcjogJHsoeyB0aGVtZSB9KSA9PiB0aGVtZS5jb2xvcnNbJ2FsZXJ0cy1zZWNvbmRhcnktdGV4dCddfTtcbiAganVzdGlmeS1jb250ZW50OiBjZW50ZXI7XG4gIGFsaWduLWl0ZW1zOiBjZW50ZXI7XG4gIGJhY2tncm91bmQtY29sb3I6ICR7KHsgc3RhdHVzLCB0aGVtZSB9KSA9PiB0aGVtZS5jb2xvcnNbYGFsZXJ0cy0ke3N0YXR1c30tYmFja2dyb3VuZGBdfTtcblxuICAke1N0eWxlZExpbmt9IHtcbiAgICBjb2xvcjogJHsoeyB0aGVtZSB9KSA9PiB0aGVtZS5jb2xvcnNbJ2FsZXJ0cy1zZWNvbmRhcnktdGV4dCddfTtcbiAgICBmb250LXdlaWdodDogJHsoeyB0aGVtZSB9KSA9PiB0aGVtZS5mb250V2VpZ2h0c1snc2VtaS1ib2xkJ119O1xuICAgIHRleHQtZGVjb3JhdGlvbjogdW5kZXJsaW5lO1xuXG4gICAgJjpob3ZlciB7XG4gICAgICBjb2xvcjogJHsoeyB0aGVtZSB9KSA9PiB0aGVtZS5jb2xvcnNbJ2FsZXJ0cy1wcmltYXJ5LWxpbmsnXX07XG4gICAgfVxuICB9XG5gXG4iXX0= */"));
|
|
9
|
+
})("padding:", ({
|
|
10
|
+
theme
|
|
11
|
+
}) => theme.space[2], ";color:", ({
|
|
12
|
+
theme
|
|
13
|
+
}) => theme.colors['alerts-secondary-text'], ";justify-content:center;align-items:center;background-color:", ({
|
|
14
|
+
status,
|
|
15
|
+
theme
|
|
16
|
+
}) => theme.colors[`alerts-${status}-background`], ";", StyledLink, "{color:", ({
|
|
17
|
+
theme
|
|
18
|
+
}) => theme.colors['alerts-secondary-text'], ";font-weight:", ({
|
|
19
|
+
theme
|
|
20
|
+
}) => theme.fontWeights['semi-bold'], ";text-decoration:underline;&:hover{color:", ({
|
|
21
|
+
theme
|
|
22
|
+
}) => theme.colors['alerts-primary-link'], ";}}" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9NZXNzYWdlL01lc3NhZ2Uuc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUt3RCIsImZpbGUiOiIuLi8uLi9zcmMvTWVzc2FnZS9NZXNzYWdlLnN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJ1xuaW1wb3J0IHsgTWVzc2FnZVByb3BzIH0gZnJvbSAnLi9NZXNzYWdlLnR5cGVzJ1xuaW1wb3J0IHsgRmxleCB9IGZyb20gJy4uL0ZsZXhib3gnXG5pbXBvcnQgeyBTdHlsZWRMaW5rIH0gZnJvbSAnLi4vTGluay9MaW5rLnN0eWxlcydcblxuZXhwb3J0IGNvbnN0IE1lc3NhZ2VXcmFwcGVyID0gc3R5bGVkKEZsZXgpPE1lc3NhZ2VQcm9wcz5gXG4gIHBhZGRpbmc6ICR7KHsgdGhlbWUgfSkgPT4gdGhlbWUuc3BhY2VbMl19O1xuICBjb2xvcjogJHsoeyB0aGVtZSB9KSA9PiB0aGVtZS5jb2xvcnNbJ2FsZXJ0cy1zZWNvbmRhcnktdGV4dCddfTtcbiAganVzdGlmeS1jb250ZW50OiBjZW50ZXI7XG4gIGFsaWduLWl0ZW1zOiBjZW50ZXI7XG4gIGJhY2tncm91bmQtY29sb3I6ICR7KHsgc3RhdHVzLCB0aGVtZSB9KSA9PiB0aGVtZS5jb2xvcnNbYGFsZXJ0cy0ke3N0YXR1c30tYmFja2dyb3VuZGBdfTtcblxuICAke1N0eWxlZExpbmt9IHtcbiAgICBjb2xvcjogJHsoeyB0aGVtZSB9KSA9PiB0aGVtZS5jb2xvcnNbJ2FsZXJ0cy1zZWNvbmRhcnktdGV4dCddfTtcbiAgICBmb250LXdlaWdodDogJHsoeyB0aGVtZSB9KSA9PiB0aGVtZS5mb250V2VpZ2h0c1snc2VtaS1ib2xkJ119O1xuICAgIHRleHQtZGVjb3JhdGlvbjogdW5kZXJsaW5lO1xuXG4gICAgJjpob3ZlciB7XG4gICAgICBjb2xvcjogJHsoeyB0aGVtZSB9KSA9PiB0aGVtZS5jb2xvcnNbJ2FsZXJ0cy1wcmltYXJ5LWxpbmsnXX07XG4gICAgfVxuICB9XG5gXG4iXX0= */"));
|
package/lib/Message/index.js
CHANGED
|
@@ -1,16 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
var _Message = require("./Message");
|
|
7
|
-
Object.keys(_Message).forEach(function (key) {
|
|
8
|
-
if (key === "default" || key === "__esModule") return;
|
|
9
|
-
if (key in exports && exports[key] === _Message[key]) return;
|
|
10
|
-
Object.defineProperty(exports, key, {
|
|
11
|
-
enumerable: true,
|
|
12
|
-
get: function get() {
|
|
13
|
-
return _Message[key];
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
});
|
|
1
|
+
export * from './Message';
|
|
@@ -1,75 +1,48 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
onConfirm = _ref.onConfirm,
|
|
20
|
-
_ref$cancelText = _ref.cancelText,
|
|
21
|
-
cancelText = _ref$cancelText === void 0 ? 'Cancel' : _ref$cancelText,
|
|
22
|
-
onCancel = _ref.onCancel,
|
|
23
|
-
_ref$variant = _ref.variant,
|
|
24
|
-
variant = _ref$variant === void 0 ? 'primary' : _ref$variant,
|
|
25
|
-
icon = _ref.icon,
|
|
26
|
-
isLoading = _ref.isLoading,
|
|
27
|
-
children = _ref.children,
|
|
28
|
-
dialog = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
29
|
-
var cancelRef = (0, _react.useRef)(null);
|
|
30
|
-
var handleCancel = (0, _react.useCallback)(function () {
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
import React, { useCallback, useRef } from 'react';
|
|
3
|
+
import { Modal } from '.';
|
|
4
|
+
import { Button, ButtonGroup, IconAndText, Subheader } from '..';
|
|
5
|
+
export const ConfirmationModal = ({
|
|
6
|
+
title,
|
|
7
|
+
confirmText,
|
|
8
|
+
onConfirm,
|
|
9
|
+
cancelText = 'Cancel',
|
|
10
|
+
onCancel,
|
|
11
|
+
variant = 'primary',
|
|
12
|
+
icon,
|
|
13
|
+
isLoading,
|
|
14
|
+
children,
|
|
15
|
+
...dialog
|
|
16
|
+
}) => {
|
|
17
|
+
const cancelRef = useRef(null);
|
|
18
|
+
const handleCancel = useCallback(() => {
|
|
31
19
|
if (onCancel) onCancel();
|
|
32
20
|
dialog.hide();
|
|
33
21
|
}, [onCancel, dialog]);
|
|
34
|
-
|
|
22
|
+
const variantToColor = {
|
|
35
23
|
primary: 'brand',
|
|
36
24
|
danger: 'danger'
|
|
37
25
|
};
|
|
38
|
-
return /*#__PURE__*/
|
|
26
|
+
return /*#__PURE__*/React.createElement(Modal, _extends({
|
|
39
27
|
focusRef: cancelRef
|
|
40
|
-
}, dialog),
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
variant: "primary",
|
|
61
|
-
color: variantToColor[variant],
|
|
62
|
-
onClick: onConfirm,
|
|
63
|
-
isLoading: isLoading,
|
|
64
|
-
children: confirmText
|
|
65
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_2.Button, {
|
|
66
|
-
variant: "text",
|
|
67
|
-
color: "secondary",
|
|
68
|
-
onClick: handleCancel,
|
|
69
|
-
ref: cancelRef,
|
|
70
|
-
children: cancelText
|
|
71
|
-
})]
|
|
72
|
-
})
|
|
73
|
-
})]
|
|
74
|
-
}));
|
|
28
|
+
}, dialog), /*#__PURE__*/React.createElement(Modal.Header, null, /*#__PURE__*/React.createElement(Subheader, null, icon ? /*#__PURE__*/React.createElement(IconAndText, {
|
|
29
|
+
icon: icon,
|
|
30
|
+
iconProps: {
|
|
31
|
+
color: `icon-${variant}`
|
|
32
|
+
}
|
|
33
|
+
}, title) : /*#__PURE__*/React.createElement(React.Fragment, null, title))), /*#__PURE__*/React.createElement(Modal.Body, {
|
|
34
|
+
mt: 4
|
|
35
|
+
}, children), /*#__PURE__*/React.createElement(Modal.Footer, null, /*#__PURE__*/React.createElement(ButtonGroup, {
|
|
36
|
+
mt: 5
|
|
37
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
38
|
+
variant: "primary",
|
|
39
|
+
color: variantToColor[variant],
|
|
40
|
+
onClick: onConfirm,
|
|
41
|
+
isLoading: isLoading
|
|
42
|
+
}, confirmText), /*#__PURE__*/React.createElement(Button, {
|
|
43
|
+
variant: "text",
|
|
44
|
+
color: "secondary",
|
|
45
|
+
onClick: handleCancel,
|
|
46
|
+
ref: cancelRef
|
|
47
|
+
}, cancelText))));
|
|
75
48
|
};
|
package/lib/Modal/Modal.js
CHANGED
|
@@ -1,164 +1,134 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var _styles = require("./styles");
|
|
13
|
-
var _Dialog = require("reakit/Dialog");
|
|
14
|
-
var _Typography = require("../Typography");
|
|
15
|
-
var _Flexbox = require("../Flexbox");
|
|
16
|
-
var _ = require("..");
|
|
17
|
-
var _lodash = require("lodash");
|
|
18
|
-
var _ScrollableContent = require("../ScrollableContent");
|
|
19
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
20
|
-
var _excluded = ["title", "description", "role", "headerImg", "size", "vPos", "focusRef", "children", "tabIndex", "showCloseButton", "p"],
|
|
21
|
-
_excluded2 = ["headerImg", "title", "description", "id", "children"],
|
|
22
|
-
_excluded3 = ["children"],
|
|
23
|
-
_excluded4 = ["atTop", "atBottom", "scroll", "height"],
|
|
24
|
-
_excluded5 = ["children"];
|
|
25
|
-
var defaultModalPadding = 6;
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { CloseButton } from '../CloseButton';
|
|
4
|
+
import { Overlay, ModalBox, CloseBtnLocation, ModalHeaderBox, ModalBodyBox, ModalFooterBox } from './styles';
|
|
5
|
+
import { useDialogState, Dialog, DialogBackdrop } from 'reakit/Dialog';
|
|
6
|
+
import { Subheader, Paragraph } from '../Typography';
|
|
7
|
+
import { Box } from '../Flexbox';
|
|
8
|
+
import { Img } from '..';
|
|
9
|
+
import { isObject } from 'lodash';
|
|
10
|
+
import { useScrollContainer } from '../ScrollableContent';
|
|
11
|
+
const defaultModalPadding = 6;
|
|
26
12
|
function findChild(ofType, children) {
|
|
27
|
-
return
|
|
28
|
-
return child && (0, _lodash.isObject)(child) && 'type' in child && (0, _lodash.isObject)(child.type) && child.type.name === ofType.name;
|
|
29
|
-
});
|
|
13
|
+
return React.Children.toArray(children).find(child => child && isObject(child) && 'type' in child && isObject(child.type) && child.type.name === ofType.name);
|
|
30
14
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
p = _ref$p === void 0 ? defaultModalPadding : _ref$p,
|
|
48
|
-
dialog = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
49
|
-
var labelProps = {
|
|
50
|
-
'aria-labelledby': "modal-title-".concat(dialog.baseId)
|
|
15
|
+
const ModalComponent = ({
|
|
16
|
+
title,
|
|
17
|
+
description,
|
|
18
|
+
role = 'dialog',
|
|
19
|
+
headerImg,
|
|
20
|
+
size = 'xs',
|
|
21
|
+
vPos = 'top',
|
|
22
|
+
focusRef,
|
|
23
|
+
children,
|
|
24
|
+
tabIndex,
|
|
25
|
+
showCloseButton = false,
|
|
26
|
+
p = defaultModalPadding,
|
|
27
|
+
...dialog
|
|
28
|
+
}) => {
|
|
29
|
+
const labelProps = {
|
|
30
|
+
'aria-labelledby': `modal-title-${dialog.baseId}`
|
|
51
31
|
};
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
return /*#__PURE__*/
|
|
32
|
+
const isAlert = role === 'alertdialog';
|
|
33
|
+
const childHeader = findChild(ModalHeader, children);
|
|
34
|
+
const childBody = findChild(ModalBody, children);
|
|
35
|
+
const childFooter = findChild(ModalFooter, children);
|
|
36
|
+
return /*#__PURE__*/React.createElement(DialogBackdrop, _extends({
|
|
57
37
|
role: "presentation",
|
|
58
|
-
as:
|
|
59
|
-
}, dialog), {}, {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
onClick: dialog.hide
|
|
85
|
-
})
|
|
86
|
-
})]
|
|
87
|
-
}))
|
|
88
|
-
}));
|
|
38
|
+
as: Overlay
|
|
39
|
+
}, dialog), /*#__PURE__*/React.createElement(Dialog, _extends({}, dialog, labelProps, {
|
|
40
|
+
as: ModalBox,
|
|
41
|
+
id: dialog.baseId,
|
|
42
|
+
role: role,
|
|
43
|
+
hideOnEsc: !isAlert,
|
|
44
|
+
hideOnClickOutside: !isAlert,
|
|
45
|
+
unstable_initialFocusRef: focusRef,
|
|
46
|
+
tabIndex: tabIndex,
|
|
47
|
+
size: size,
|
|
48
|
+
vPos: vPos
|
|
49
|
+
}), !!childHeader ? childHeader : /*#__PURE__*/React.createElement(ModalHeader, {
|
|
50
|
+
headerImg: headerImg,
|
|
51
|
+
title: title,
|
|
52
|
+
description: description,
|
|
53
|
+
pt: defaultModalPadding,
|
|
54
|
+
px: defaultModalPadding,
|
|
55
|
+
id: dialog.baseId
|
|
56
|
+
}), childBody ? childBody : /*#__PURE__*/React.createElement(ModalBody, {
|
|
57
|
+
pt: defaultModalPadding / 2,
|
|
58
|
+
pb: defaultModalPadding
|
|
59
|
+
}, children), childFooter, (!isAlert || showCloseButton) && /*#__PURE__*/React.createElement(CloseBtnLocation, {
|
|
60
|
+
padding: defaultModalPadding
|
|
61
|
+
}, /*#__PURE__*/React.createElement(CloseButton, {
|
|
62
|
+
onClick: dialog.hide
|
|
63
|
+
}))));
|
|
89
64
|
};
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
65
|
+
const ModalHeader = ({
|
|
66
|
+
headerImg,
|
|
67
|
+
title,
|
|
68
|
+
description,
|
|
69
|
+
id,
|
|
70
|
+
children,
|
|
71
|
+
...props
|
|
72
|
+
}) => {
|
|
73
|
+
const titleProps = id && {
|
|
74
|
+
id: `modal-title-${id}`
|
|
99
75
|
};
|
|
100
|
-
return /*#__PURE__*/
|
|
76
|
+
return /*#__PURE__*/React.createElement(ModalHeaderBox, _extends({
|
|
101
77
|
px: defaultModalPadding,
|
|
102
78
|
pt: defaultModalPadding
|
|
103
|
-
}, props),
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
mt: 2,
|
|
117
|
-
as: "div",
|
|
118
|
-
children: description
|
|
119
|
-
}), children]
|
|
120
|
-
})]
|
|
121
|
-
}));
|
|
79
|
+
}, props), headerImg && /*#__PURE__*/React.createElement(Img, {
|
|
80
|
+
src: headerImg.src,
|
|
81
|
+
alt: headerImg.alt,
|
|
82
|
+
width: headerImg.width,
|
|
83
|
+
transparent: true,
|
|
84
|
+
mr: 4
|
|
85
|
+
}), /*#__PURE__*/React.createElement(Box, {
|
|
86
|
+
pr: 5,
|
|
87
|
+
flexGrow: 1
|
|
88
|
+
}, title && /*#__PURE__*/React.createElement(Subheader, titleProps, title), description && /*#__PURE__*/React.createElement(Paragraph, {
|
|
89
|
+
mt: 2,
|
|
90
|
+
as: "div"
|
|
91
|
+
}, description), children));
|
|
122
92
|
};
|
|
123
93
|
|
|
124
94
|
// On future usages we should start using these components
|
|
125
95
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
96
|
+
const ModalBody = ({
|
|
97
|
+
children,
|
|
98
|
+
...props
|
|
99
|
+
}) => {
|
|
100
|
+
const {
|
|
101
|
+
atTop,
|
|
102
|
+
atBottom,
|
|
103
|
+
scroll,
|
|
104
|
+
height,
|
|
105
|
+
...divProps
|
|
106
|
+
} = useScrollContainer();
|
|
107
|
+
return /*#__PURE__*/React.createElement(ModalBodyBox, _extends({
|
|
136
108
|
px: defaultModalPadding,
|
|
137
109
|
moreTop: !atTop,
|
|
138
110
|
moreBottom: !atBottom
|
|
139
|
-
}, props
|
|
140
|
-
children: children
|
|
141
|
-
}));
|
|
111
|
+
}, props, divProps), children);
|
|
142
112
|
};
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
113
|
+
const ModalFooter = ({
|
|
114
|
+
children,
|
|
115
|
+
...props
|
|
116
|
+
}) => {
|
|
117
|
+
return /*#__PURE__*/React.createElement(ModalFooterBox, _extends({
|
|
147
118
|
px: defaultModalPadding,
|
|
148
119
|
pb: defaultModalPadding
|
|
149
|
-
}, props),
|
|
150
|
-
children: children
|
|
151
|
-
}));
|
|
120
|
+
}, props), children);
|
|
152
121
|
};
|
|
153
|
-
|
|
154
|
-
return
|
|
122
|
+
const useModal = (id, visibleOnMount) => {
|
|
123
|
+
return useDialogState({
|
|
155
124
|
baseId: id,
|
|
156
125
|
animated: true,
|
|
157
126
|
visible: visibleOnMount
|
|
158
127
|
});
|
|
159
128
|
};
|
|
160
|
-
|
|
129
|
+
const Modal = Object.assign(ModalComponent, {
|
|
161
130
|
Header: ModalHeader,
|
|
162
131
|
Body: ModalBody,
|
|
163
132
|
Footer: ModalFooter
|
|
164
|
-
});
|
|
133
|
+
});
|
|
134
|
+
export { Modal, useModal };
|
package/lib/Modal/index.js
CHANGED
|
@@ -1,27 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
var _Modal = require("./Modal");
|
|
7
|
-
Object.keys(_Modal).forEach(function (key) {
|
|
8
|
-
if (key === "default" || key === "__esModule") return;
|
|
9
|
-
if (key in exports && exports[key] === _Modal[key]) return;
|
|
10
|
-
Object.defineProperty(exports, key, {
|
|
11
|
-
enumerable: true,
|
|
12
|
-
get: function get() {
|
|
13
|
-
return _Modal[key];
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
});
|
|
17
|
-
var _ConfirmationModal = require("./ConfirmationModal");
|
|
18
|
-
Object.keys(_ConfirmationModal).forEach(function (key) {
|
|
19
|
-
if (key === "default" || key === "__esModule") return;
|
|
20
|
-
if (key in exports && exports[key] === _ConfirmationModal[key]) return;
|
|
21
|
-
Object.defineProperty(exports, key, {
|
|
22
|
-
enumerable: true,
|
|
23
|
-
get: function get() {
|
|
24
|
-
return _ConfirmationModal[key];
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
});
|
|
1
|
+
export * from './Modal';
|
|
2
|
+
export * from './ConfirmationModal';
|