@councilbox/councilbox-ui 2.0.53 → 2.0.55
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/Accordion.js +3 -0
- package/Alert.js +3 -0
- package/Avatar.js +3 -0
- package/AvatarGroup.js +3 -0
- package/Block.js +3 -0
- package/Button.js +3 -0
- package/ButtonBasic.js +3 -0
- package/Checkbox.js +3 -0
- package/DatePicker.js +3 -0
- package/DateRangePicker.js +3 -0
- package/DateTimePicker.js +3 -0
- package/DragDrop.js +3 -0
- package/DrawerPanel.js +3 -0
- package/DropDown.js +3 -0
- package/EnhancedTable.js +3 -0
- package/FabButton.js +3 -0
- package/Grid.js +3 -0
- package/Header.js +3 -0
- package/IconButton.js +3 -0
- package/IconButtonSquare.js +3 -0
- package/IconFont.js +3 -0
- package/InputAutocomplete.js +3 -0
- package/InputPassword.js +3 -0
- package/InputText.js +3 -0
- package/InputTextArea.js +3 -0
- package/LoadingSection.js +3 -0
- package/MenuItem.js +3 -0
- package/MenuLateralLeft.js +3 -0
- package/MenuLateralRight.js +3 -0
- package/Modal.js +3 -0
- package/Radio.js +3 -0
- package/RichTextInput.js +3 -0
- package/Scrollbar.js +3 -0
- package/ScrollbarNew.js +3 -0
- package/SelectInput.js +3 -0
- package/Slider.js +3 -0
- package/Spacing.js +3 -0
- package/Stars.js +3 -0
- package/Stepper.js +3 -0
- package/Table.js +3 -0
- package/TableBody.js +3 -0
- package/TableCell.js +3 -0
- package/TableContainer.js +3 -0
- package/TableHead.js +3 -0
- package/TableRow.js +3 -0
- package/TableSortLabel.js +3 -0
- package/Tabs.js +3 -0
- package/Tag.js +3 -0
- package/TextInput.js +3 -0
- package/ThemeProvider.js +3 -0
- package/TimePicker.js +3 -0
- package/Timeline.js +3 -0
- package/ToastProvider.js +3 -0
- package/Toggle.js +3 -0
- package/Tooltip.js +3 -0
- package/Typography.js +3 -0
- package/dist/HOCs/overlayA11yStack.js +47 -0
- package/dist/HOCs/useA11yGuard.js +38 -0
- package/dist/HOCs/useDynamicStyles.js +41 -60
- package/dist/HOCs/useMenuNavigation.js +110 -0
- package/dist/HOCs/useOverlay.js +87 -0
- package/dist/HOCs/usePopoverPosition.js +228 -0
- package/dist/HOCs/useRipple.js +17 -35
- package/dist/HOCs/useWindowSize.js +24 -42
- package/dist/build-index.js +119 -99
- package/dist/components/1.Introduction.stories.mdx +4 -1
- package/dist/components/2.Changelog.stories.mdx +54 -0
- package/dist/components/3.Guide.stories.mdx +1 -1
- package/dist/components/Accordion/Accordion.css +7 -0
- package/dist/components/Accordion/Accordion.js +97 -102
- package/dist/components/Accordion/Accordion.stories.js +10 -12
- package/dist/components/Accordion/DesignAccordion.stories.js +10 -21
- package/dist/components/Alert/Alert.js +55 -55
- package/dist/components/Alert/Alert.stories.js +10 -11
- package/dist/components/Avatar/Avatar.js +82 -74
- package/dist/components/Avatar/Avatar.stories.js +19 -23
- package/dist/components/Avatar/DesignAvatar.stories.js +18 -26
- package/dist/components/Avatar/DesignAvatarText.stories.js +31 -40
- package/dist/components/AvatarGroup/AvatarGroup.js +7 -14
- package/dist/components/AvatarGroup/AvatarGroup.stories.js +6 -13
- package/dist/components/AvatarGroup/DesignAvatarGroup.stories.js +34 -45
- package/dist/components/Block/Block.css +3 -3
- package/dist/components/Block/Block.js +31 -45
- package/dist/components/Block/Block.stories.js +5 -12
- package/dist/components/Block/DesignBlock.stories.js +7 -13
- package/dist/components/Button/Button.js +44 -66
- package/dist/components/Button/Button.stories.js +8 -14
- package/dist/components/Button/button.css +1 -1
- package/dist/components/ButtonBasic/ButtonBasic.css +6 -1
- package/dist/components/ButtonBasic/ButtonBasic.js +96 -118
- package/dist/components/ButtonBasic/ButtonBasic.stories.js +14 -15
- package/dist/components/Checkbox/Checkbox.css +6 -0
- package/dist/components/Checkbox/Checkbox.js +81 -100
- package/dist/components/Checkbox/Checkbox.stories.js +10 -11
- package/dist/components/DatePicker/Calendar.js +243 -0
- package/dist/components/DatePicker/DatePicker.css +197 -0
- package/dist/components/DatePicker/DatePicker.js +384 -0
- package/dist/components/DatePicker/DatePicker.stories.js +180 -0
- package/dist/components/DatePicker/dateUtils.js +478 -0
- package/dist/components/DateRangePicker/DateRangePicker.css +41 -0
- package/dist/components/DateRangePicker/DateRangePicker.js +435 -0
- package/dist/components/DateRangePicker/DateRangePicker.stories.js +147 -0
- package/dist/components/DateRangePicker/RangeCalendar.js +188 -0
- package/dist/components/DateTimePicker/DateTimePicker.css +4 -0
- package/dist/components/DateTimePicker/DateTimePicker.js +481 -0
- package/dist/components/DateTimePicker/DateTimePicker.stories.js +144 -0
- package/dist/components/DateTimePicker/TimeColumns.css +46 -0
- package/dist/components/DateTimePicker/TimeColumns.js +175 -0
- package/dist/components/DragDrop/DragDrop.css +20 -9
- package/dist/components/DragDrop/DragDrop.js +83 -76
- package/dist/components/DragDrop/DragDrop.stories.js +9 -16
- package/dist/components/DrawerPanel/DesignDrawerPanel.js +35 -53
- package/dist/components/DrawerPanel/DrawerPanel.js +157 -146
- package/dist/components/DrawerPanel/DrawerPanel.stories.js +10 -12
- package/dist/components/DropDown/DesignDropDown.stories.js +87 -97
- package/dist/components/DropDown/DropDown.js +179 -343
- package/dist/components/DropDown/DropDown.stories.js +6 -12
- package/dist/components/DropDown/PopoverPlayground.js +68 -98
- package/dist/components/EnhancedTable/DesignEnhancedTable.stories.js +26 -36
- package/dist/components/EnhancedTable/EnhancedMyTable.js +16 -19
- package/dist/components/EnhancedTable/EnhancedTable.js +77 -136
- package/dist/components/EnhancedTable/EnhancedTable.stories.js +5 -12
- package/dist/components/EnhancedTable/EnhancedTableBody.js +11 -14
- package/dist/components/EnhancedTable/EnhancedTableCell.js +25 -34
- package/dist/components/EnhancedTable/EnhancedTableContainer.js +11 -14
- package/dist/components/EnhancedTable/EnhancedTableHead.js +11 -14
- package/dist/components/EnhancedTable/EnhancedTableRow.js +15 -18
- package/dist/components/EnhancedTable/EnhancedTableSortLabel.js +15 -18
- package/dist/components/FabButton/DesignFabButton.stories.js +9 -16
- package/dist/components/FabButton/FabButton.js +51 -54
- package/dist/components/FabButton/FabButton.stories.js +10 -12
- package/dist/components/Grid/DesignGrid.stories.js +7 -14
- package/dist/components/Grid/Grid.js +38 -46
- package/dist/components/Grid/Grid.stories.js +6 -13
- package/dist/components/Grid/GridItem.js +37 -39
- package/dist/components/Header/DesignHeader.stories.js +20 -24
- package/dist/components/Header/Header.js +227 -246
- package/dist/components/Header/Header.stories.js +9 -21
- package/dist/components/Header/header.css +10 -5
- package/dist/components/IconButton/DesignIconButton.stories.js +31 -36
- package/dist/components/IconButton/IconButton.css +6 -1
- package/dist/components/IconButton/IconButton.js +135 -140
- package/dist/components/IconButton/IconButton.stories.js +12 -13
- package/dist/components/IconButtonSquare/DesignIconButtonSquare.stories.js +5 -11
- package/dist/components/IconButtonSquare/IconButtonSquare.js +14 -28
- package/dist/components/IconButtonSquare/IconButtonSquare.stories.js +7 -13
- package/dist/components/IconFont/IconFont.js +27 -48
- package/dist/components/IconFont/IconFont.stories.js +5 -11
- package/dist/components/InputAutocomplete/InputAutocomplete.css +6 -0
- package/dist/components/InputAutocomplete/InputAutocomplete.js +184 -260
- package/dist/components/InputAutocomplete/InputAutocomplete.stories.js +5 -11
- package/dist/components/InputPassword/InputPassword.css +0 -6
- package/dist/components/InputPassword/InputPassword.js +58 -73
- package/dist/components/InputPassword/InputPassword.stories.js +5 -11
- package/dist/components/InputText/InputText.css +96 -83
- package/dist/components/InputText/InputText.js +211 -215
- package/dist/components/InputText/InputText.stories.js +11 -11
- package/dist/components/InputTextArea/DesignInputTextArea.stories.js +38 -51
- package/dist/components/InputTextArea/InputTextArea.js +84 -93
- package/dist/components/InputTextArea/InputTextArea.stories.js +5 -12
- package/dist/components/LoadingSection/LoadingSection.js +44 -51
- package/dist/components/LoadingSection/LoadingSection.stories.js +5 -11
- package/dist/components/MenuItem/DesignMenuItem.stories.js +20 -34
- package/dist/components/MenuItem/MenuItem.css +7 -2
- package/dist/components/MenuItem/MenuItem.js +131 -140
- package/dist/components/MenuItem/MenuItem.stories.js +6 -15
- package/dist/components/MenuLateralLeft/MenuLateralLeft.css +24 -0
- package/dist/components/MenuLateralLeft/MenuLateralLeft.js +120 -157
- package/dist/components/MenuLateralLeft/MenuLateralLeft.stories.js +5 -12
- package/dist/components/MenuLateralRight/MenuLateralRight.css +2 -2
- package/dist/components/MenuLateralRight/MenuLateralRight.js +91 -79
- package/dist/components/MenuLateralRight/MenuLateralRight.stories.js +5 -12
- package/dist/components/Modal/DesignModal.stories.js +15 -30
- package/dist/components/Modal/Modal.css +35 -15
- package/dist/components/Modal/Modal.js +156 -145
- package/dist/components/Modal/Modal.stories.js +7 -16
- package/dist/components/PaginationFooter/DesignPaginationFooter.stories.js +4 -10
- package/dist/components/PaginationFooter/PaginationFooter.css +10 -0
- package/dist/components/PaginationFooter/PaginationFooter.js +99 -91
- package/dist/components/PaginationFooter/PaginationFooter.stories.js +5 -12
- package/dist/components/RadioButton/Radio.css +19 -18
- package/dist/components/RadioButton/Radio.js +65 -83
- package/dist/components/RadioButton/Radio.stories.js +27 -36
- package/dist/components/RichTextInput/DesignRichTextInput.stories.js +119 -0
- package/dist/components/RichTextInput/RichTextInput.css +309 -0
- package/dist/components/RichTextInput/RichTextInput.js +851 -0
- package/dist/components/RichTextInput/RichTextInput.stories.js +33 -0
- package/dist/components/Ripple/DesignRipple.js +42 -41
- package/dist/components/Ripple/Ripple.stories.js +5 -11
- package/dist/components/Scrollbar/DesignScrollbar.js +5 -10
- package/dist/components/Scrollbar/Scrollbar.js +37 -56
- package/dist/components/Scrollbar/Scrollbar.stories.js +5 -12
- package/dist/components/ScrollbarNew/DesignScrollbarNew.js +24 -0
- package/dist/components/ScrollbarNew/ScrollbarNew.css +79 -0
- package/dist/components/ScrollbarNew/ScrollbarNew.js +426 -0
- package/dist/components/ScrollbarNew/ScrollbarNew.stories.js +37 -0
- package/dist/components/SelectInput/DesignSelectInput.js +22 -45
- package/dist/components/SelectInput/SelectInput.js +171 -218
- package/dist/components/SelectInput/SelectInput.stories.js +6 -15
- package/dist/components/Slider/DesignSlider.js +8 -14
- package/dist/components/Slider/Slider.css +57 -37
- package/dist/components/Slider/Slider.js +85 -84
- package/dist/components/Slider/Slider.stories.js +5 -12
- package/dist/components/Spacing/Spacing.js +38 -45
- package/dist/components/Spacing/Spacing.stories.js +5 -11
- package/dist/components/Stars/DesignStars.js +17 -30
- package/dist/components/Stars/Stars.css +55 -104
- package/dist/components/Stars/Stars.js +89 -73
- package/dist/components/Stars/Stars.stories.js +5 -12
- package/dist/components/Stepper/DesignStepper.stories.js +16 -30
- package/dist/components/Stepper/Stepper.css +46 -10
- package/dist/components/Stepper/Stepper.js +118 -134
- package/dist/components/Stepper/Stepper.stories.js +5 -12
- package/dist/components/Table/DesignTable.stories.js +200 -211
- package/dist/components/Table/Table.css +33 -2
- package/dist/components/Table/Table.js +30 -38
- package/dist/components/Table/Table.stories.js +5 -12
- package/dist/components/Table/TableBody.js +22 -34
- package/dist/components/Table/TableCell.js +71 -61
- package/dist/components/Table/TableContainer.js +22 -34
- package/dist/components/Table/TableHead.js +22 -34
- package/dist/components/Table/TableRow.js +33 -37
- package/dist/components/Table/TableSortLabel.js +42 -52
- package/dist/components/Tabs/DesignTabs.js +14 -28
- package/dist/components/Tabs/Tabs.css +30 -11
- package/dist/components/Tabs/Tabs.js +151 -138
- package/dist/components/Tabs/Tabs.stories.js +5 -12
- package/dist/components/Tag/DesignTags.stories.js +24 -39
- package/dist/components/Tag/Tag.css +61 -42
- package/dist/components/Tag/Tag.js +93 -91
- package/dist/components/Tag/Tag.stories.js +5 -12
- package/dist/components/TextInput/TextInput.js +38 -54
- package/dist/components/TextInput/TextInput.stories.js +5 -11
- package/dist/components/ThemeProvider/Colors.js +2 -2
- package/dist/components/ThemeProvider/CouncilboxThemeContext.js +7 -10
- package/dist/components/ThemeProvider/ThemeProvider.js +34 -52
- package/dist/components/TimePicker/TimePicker.css +3 -0
- package/dist/components/TimePicker/TimePicker.js +359 -0
- package/dist/components/TimePicker/TimePicker.stories.js +132 -0
- package/dist/components/Timeline/DesignTimeline.stories.js +4 -10
- package/dist/components/Timeline/Timeline.js +66 -46
- package/dist/components/Timeline/Timeline.stories.js +5 -12
- package/dist/components/Toast/DesignToast.stories.js +174 -0
- package/dist/components/Toast/Toast.css +154 -0
- package/dist/components/Toast/Toast.js +165 -0
- package/dist/components/Toast/Toast.stories.js +33 -0
- package/dist/components/Toast/ToastProvider.js +33 -0
- package/dist/components/Toast/ToastRoot.js +89 -0
- package/dist/components/Toast/toastStore.js +127 -0
- package/dist/components/Toast/useToast.js +42 -0
- package/dist/components/Toggle/Toggle.css +10 -0
- package/dist/components/Toggle/Toggle.js +123 -100
- package/dist/components/Toggle/Toggle.stories.js +10 -11
- package/dist/components/Tooltip/DesignTooltip.stories.js +10 -16
- package/dist/components/Tooltip/Tooltip.css +17 -1
- package/dist/components/Tooltip/Tooltip.js +195 -366
- package/dist/components/Tooltip/Tooltip.stories.js +5 -12
- package/dist/components/Typography/Typography.css +57 -6
- package/dist/components/Typography/Typography.js +44 -97
- package/dist/components/Typography/Typography.stories.js +5 -11
- package/dist/index.js +2 -6
- package/dist/reportWebVitals.js +8 -14
- package/dist/storybook.test.js +2 -4
- package/dist/styles/colorConsts.css +4 -4
- package/dist/styles/main.css +16 -0
- package/dist/styles/styleFont.css +1 -1
- package/dist/styles/stylesheet.js +10 -22
- package/dist/styles/zIndexConsts.css +2 -0
- package/dist/testing/TestAutocomplete.js +74 -97
- package/dist/testing/TestComponents.js +5 -10
- package/dist/testing/TestDropdown.js +33 -41
- package/dist/utils/autoDetectScroll.js +12 -35
- package/dist/utils/index.js +37 -63
- package/dist/utils/useFallbackId.js +19 -0
- package/package.json +67 -4
- package/toast.js +7 -0
- package/useCouncilboxTheme.js +7 -0
- package/useToast.js +7 -0
- package/dist/components/Accordion/AccordionOld.css +0 -16
- package/dist/components/Accordion/AccordionOld.js +0 -115
- package/dist/components/Avatar/AvatarOld.js +0 -138
- package/dist/components/ButtonBasic/ButtonBasicOld.css +0 -41
- package/dist/components/ButtonBasic/ButtonBasicOld.js +0 -231
- package/dist/components/Checkbox/CheckboxOld.css +0 -31
- package/dist/components/Checkbox/CheckboxOld.js +0 -112
- package/dist/components/DrawerPanel/DrawerPanelOld.css +0 -56
- package/dist/components/DrawerPanel/DrawerPanelOld.js +0 -233
- package/dist/components/DropDown/DropDownOld.css +0 -3
- package/dist/components/DropDown/DropDownOld.js +0 -186
- package/dist/components/Grid/GridItemOld.js +0 -43
- package/dist/components/Grid/GridOld.css +0 -0
- package/dist/components/Grid/GridOld.js +0 -53
- package/dist/components/IconButton/IconButtonOld.css +0 -0
- package/dist/components/IconButton/IconButtonOld.js +0 -138
- package/dist/components/IconButtonSquare/IconButtonSquareOld.css +0 -43
- package/dist/components/IconButtonSquare/IconButtonSquareOld.js +0 -133
- package/dist/components/InputAutocomplete/InputAutocompleteOld.css +0 -5
- package/dist/components/InputAutocomplete/InputAutocompleteOld.js +0 -178
- package/dist/components/InputText/InputTextOld.css +0 -10
- package/dist/components/InputText/InputTextOld.js +0 -340
- package/dist/components/MenuItem/MenuItemOld.js +0 -139
- package/dist/components/Modal/ModalOld.css +0 -3
- package/dist/components/Modal/ModalOld.js +0 -230
- package/dist/components/RadioButton/RadioOld.css +0 -31
- package/dist/components/RadioButton/RadioOld.js +0 -142
- package/dist/components/SelectInput/SelectInputOld.css +0 -17
- package/dist/components/SelectInput/SelectInputOld.js +0 -325
- package/dist/components/Table/TableOld.css +0 -79
- package/dist/components/Table/TableOld.js +0 -165
- package/dist/components/Tabs/TabsOld.js +0 -92
- package/dist/components/Typography/TypographyOld.js +0 -132
|
@@ -3,30 +3,23 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports
|
|
7
|
-
|
|
6
|
+
exports["default"] = exports.DesignGroup = void 0;
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _AvatarGroup = _interopRequireDefault(require("./AvatarGroup"));
|
|
11
|
-
|
|
12
9
|
var _DesignAvatarGroup = _interopRequireDefault(require("./DesignAvatarGroup.stories"));
|
|
13
|
-
|
|
14
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
16
11
|
var _default = {
|
|
17
12
|
title: 'Components/AvatarGroup',
|
|
18
|
-
component: _AvatarGroup
|
|
13
|
+
component: _AvatarGroup["default"],
|
|
19
14
|
argTypes: {}
|
|
20
15
|
};
|
|
21
|
-
exports
|
|
22
|
-
|
|
16
|
+
exports["default"] = _default;
|
|
23
17
|
var TemplateAvatarGroup = function TemplateAvatarGroup(args) {
|
|
24
|
-
return /*#__PURE__*/_react
|
|
18
|
+
return /*#__PURE__*/_react["default"].createElement(_DesignAvatarGroup["default"], args);
|
|
25
19
|
};
|
|
26
|
-
|
|
27
20
|
TemplateAvatarGroup.displayName = "TemplateAvatarGroup";
|
|
28
21
|
var DesignGroup = TemplateAvatarGroup.bind({});
|
|
29
22
|
exports.DesignGroup = DesignGroup;
|
|
30
|
-
_AvatarGroup
|
|
23
|
+
_AvatarGroup["default"].args = {
|
|
31
24
|
compressed: false
|
|
32
25
|
};
|
|
@@ -3,113 +3,103 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports
|
|
7
|
-
|
|
6
|
+
exports["default"] = void 0;
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
require("../../styles/main.css");
|
|
11
|
-
|
|
12
9
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
-
|
|
14
10
|
var _imgDefault = _interopRequireDefault(require("../../assets/img/imgDefault.png"));
|
|
15
|
-
|
|
16
11
|
var _imgMan = _interopRequireDefault(require("../../assets/img/imgMan.png"));
|
|
17
|
-
|
|
18
12
|
var _imgGirl = _interopRequireDefault(require("../../assets/img/imgGirl.png"));
|
|
19
|
-
|
|
20
13
|
var _AvatarGroup = _interopRequireDefault(require("./AvatarGroup"));
|
|
21
|
-
|
|
22
14
|
var _Avatar = _interopRequireDefault(require("../Avatar/Avatar"));
|
|
23
|
-
|
|
24
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
|
-
|
|
15
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
26
16
|
var DesignAvatarGroup = function DesignAvatarGroup(_ref) {
|
|
27
17
|
var compressed = _ref.compressed;
|
|
28
|
-
return /*#__PURE__*/_react
|
|
18
|
+
return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
29
19
|
style: {
|
|
30
20
|
display: 'flex',
|
|
31
21
|
justifyContent: 'center'
|
|
32
22
|
}
|
|
33
|
-
}, /*#__PURE__*/_react
|
|
23
|
+
}, /*#__PURE__*/_react["default"].createElement(_AvatarGroup["default"], {
|
|
34
24
|
group: true,
|
|
35
25
|
compressed: compressed
|
|
36
|
-
}, /*#__PURE__*/_react
|
|
37
|
-
src: _imgDefault
|
|
38
|
-
}), /*#__PURE__*/_react
|
|
39
|
-
src: _imgMan
|
|
40
|
-
}), /*#__PURE__*/_react
|
|
26
|
+
}, /*#__PURE__*/_react["default"].createElement(_Avatar["default"], {
|
|
27
|
+
src: _imgDefault["default"]
|
|
28
|
+
}), /*#__PURE__*/_react["default"].createElement(_Avatar["default"], {
|
|
29
|
+
src: _imgMan["default"]
|
|
30
|
+
}), /*#__PURE__*/_react["default"].createElement(_Avatar["default"], {
|
|
41
31
|
backgroundColor: 'primary.main',
|
|
42
32
|
text: 'MW',
|
|
43
33
|
colorText: 'white'
|
|
44
|
-
}), /*#__PURE__*/_react
|
|
45
|
-
src: _imgGirl
|
|
46
|
-
}), /*#__PURE__*/_react
|
|
34
|
+
}), /*#__PURE__*/_react["default"].createElement(_Avatar["default"], {
|
|
35
|
+
src: _imgGirl["default"]
|
|
36
|
+
}), /*#__PURE__*/_react["default"].createElement(_Avatar["default"], {
|
|
47
37
|
backgroundColor: '#E0E0E0',
|
|
48
38
|
src: '',
|
|
49
39
|
text: '+5'
|
|
50
|
-
}))), /*#__PURE__*/_react
|
|
40
|
+
}))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
51
41
|
style: {
|
|
52
42
|
display: 'flex',
|
|
53
43
|
justifyContent: 'center',
|
|
54
44
|
marginTop: '1em'
|
|
55
45
|
}
|
|
56
|
-
}, /*#__PURE__*/_react
|
|
46
|
+
}, /*#__PURE__*/_react["default"].createElement(_AvatarGroup["default"], {
|
|
57
47
|
group: true,
|
|
58
48
|
compressed: compressed,
|
|
59
49
|
sizeGroup: 'S'
|
|
60
|
-
}, /*#__PURE__*/_react
|
|
61
|
-
src: _imgDefault
|
|
50
|
+
}, /*#__PURE__*/_react["default"].createElement(_Avatar["default"], {
|
|
51
|
+
src: _imgDefault["default"],
|
|
62
52
|
sizeAvatar: 'SM',
|
|
63
53
|
variantText: 'XS'
|
|
64
|
-
}), /*#__PURE__*/_react
|
|
65
|
-
src: _imgMan
|
|
54
|
+
}), /*#__PURE__*/_react["default"].createElement(_Avatar["default"], {
|
|
55
|
+
src: _imgMan["default"],
|
|
66
56
|
sizeAvatar: 'SM',
|
|
67
57
|
variantText: 'XS'
|
|
68
|
-
}), /*#__PURE__*/_react
|
|
58
|
+
}), /*#__PURE__*/_react["default"].createElement(_Avatar["default"], {
|
|
69
59
|
backgroundColor: 'primary.main',
|
|
70
60
|
text: 'MW',
|
|
71
61
|
colorText: 'white',
|
|
72
62
|
sizeAvatar: 'SM',
|
|
73
63
|
variantText: 'XS'
|
|
74
|
-
}), /*#__PURE__*/_react
|
|
75
|
-
src: _imgGirl
|
|
64
|
+
}), /*#__PURE__*/_react["default"].createElement(_Avatar["default"], {
|
|
65
|
+
src: _imgGirl["default"],
|
|
76
66
|
sizeAvatar: 'SM',
|
|
77
67
|
variantText: 'XS'
|
|
78
|
-
}), /*#__PURE__*/_react
|
|
68
|
+
}), /*#__PURE__*/_react["default"].createElement(_Avatar["default"], {
|
|
79
69
|
backgroundColor: '#E0E0E0',
|
|
80
70
|
src: '',
|
|
81
71
|
text: '+5',
|
|
82
72
|
sizeAvatar: 'SM',
|
|
83
73
|
variantText: 'XS'
|
|
84
|
-
}))), /*#__PURE__*/_react
|
|
74
|
+
}))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
85
75
|
style: {
|
|
86
76
|
display: 'flex',
|
|
87
77
|
justifyContent: 'center',
|
|
88
78
|
marginTop: '1em'
|
|
89
79
|
}
|
|
90
|
-
}, /*#__PURE__*/_react
|
|
80
|
+
}, /*#__PURE__*/_react["default"].createElement(_AvatarGroup["default"], {
|
|
91
81
|
group: true,
|
|
92
82
|
compressed: compressed,
|
|
93
83
|
sizeGroup: 'XS'
|
|
94
|
-
}, /*#__PURE__*/_react
|
|
95
|
-
src: _imgDefault
|
|
84
|
+
}, /*#__PURE__*/_react["default"].createElement(_Avatar["default"], {
|
|
85
|
+
src: _imgDefault["default"],
|
|
96
86
|
sizeAvatar: 'XS',
|
|
97
87
|
variantText: '2XS'
|
|
98
|
-
}), /*#__PURE__*/_react
|
|
99
|
-
src: _imgMan
|
|
88
|
+
}), /*#__PURE__*/_react["default"].createElement(_Avatar["default"], {
|
|
89
|
+
src: _imgMan["default"],
|
|
100
90
|
sizeAvatar: 'XS',
|
|
101
91
|
variantText: '2XS'
|
|
102
|
-
}), /*#__PURE__*/_react
|
|
92
|
+
}), /*#__PURE__*/_react["default"].createElement(_Avatar["default"], {
|
|
103
93
|
backgroundColor: 'primary.main',
|
|
104
94
|
text: 'MW',
|
|
105
95
|
colorText: 'white',
|
|
106
96
|
sizeAvatar: 'XS',
|
|
107
97
|
variantText: '2XS'
|
|
108
|
-
}), /*#__PURE__*/_react
|
|
109
|
-
src: _imgGirl
|
|
98
|
+
}), /*#__PURE__*/_react["default"].createElement(_Avatar["default"], {
|
|
99
|
+
src: _imgGirl["default"],
|
|
110
100
|
sizeAvatar: 'XS',
|
|
111
101
|
variantText: '2XS'
|
|
112
|
-
}), /*#__PURE__*/_react
|
|
102
|
+
}), /*#__PURE__*/_react["default"].createElement(_Avatar["default"], {
|
|
113
103
|
backgroundColor: '#E0E0E0',
|
|
114
104
|
src: '',
|
|
115
105
|
text: '+5',
|
|
@@ -117,13 +107,12 @@ var DesignAvatarGroup = function DesignAvatarGroup(_ref) {
|
|
|
117
107
|
variantText: '2XS'
|
|
118
108
|
}))));
|
|
119
109
|
};
|
|
120
|
-
|
|
121
110
|
DesignAvatarGroup.displayName = "DesignAvatarGroup";
|
|
122
111
|
DesignAvatarGroup.propTypes = {
|
|
123
|
-
compressed: _propTypes
|
|
112
|
+
compressed: _propTypes["default"]["boolean"]
|
|
124
113
|
};
|
|
125
114
|
DesignAvatarGroup.defaultProps = {
|
|
126
115
|
compressed: false
|
|
127
116
|
};
|
|
128
117
|
var _default = DesignAvatarGroup;
|
|
129
|
-
exports
|
|
118
|
+
exports["default"] = _default;
|
|
@@ -1,76 +1,62 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
|
-
exports
|
|
7
|
-
|
|
7
|
+
exports["default"] = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
9
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
|
|
12
10
|
require("../../styles/main.css");
|
|
13
|
-
|
|
14
11
|
require("./Block.css");
|
|
15
|
-
|
|
16
12
|
var _useDynamicStyles2 = _interopRequireDefault(require("../../HOCs/useDynamicStyles"));
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
function
|
|
21
|
-
|
|
22
|
-
function
|
|
23
|
-
|
|
24
|
-
function
|
|
25
|
-
|
|
26
|
-
function
|
|
27
|
-
|
|
28
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
29
|
-
|
|
30
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
31
|
-
|
|
32
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
33
|
-
|
|
13
|
+
var _excluded = ["children", "variant", "className", "sx", "style", "component"];
|
|
14
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
15
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) { ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } } return n; }, _extends.apply(null, arguments); }
|
|
16
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
17
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
18
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
19
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
20
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
21
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) { o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } } return i; }
|
|
22
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) { if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } } return t; }
|
|
34
23
|
var Block = function Block(_ref) {
|
|
35
24
|
var children = _ref.children,
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
25
|
+
variant = _ref.variant,
|
|
26
|
+
className = _ref.className,
|
|
27
|
+
sx = _ref.sx,
|
|
28
|
+
style = _ref.style,
|
|
29
|
+
_ref$component = _ref.component,
|
|
30
|
+
Component = _ref$component === void 0 ? 'div' : _ref$component,
|
|
31
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
32
|
+
var _useDynamicStyles = (0, _useDynamicStyles2["default"])(sx),
|
|
33
|
+
stylesInLine = _useDynamicStyles.stylesInLine,
|
|
34
|
+
prefixClass = _useDynamicStyles.prefixClass;
|
|
46
35
|
var getVariant = function getVariant() {
|
|
47
36
|
switch (variant) {
|
|
48
37
|
case 'primary':
|
|
49
|
-
return 'primary';
|
|
50
|
-
|
|
38
|
+
return 'cbx-block-primary';
|
|
51
39
|
case 'secondary':
|
|
52
|
-
return 'secondary';
|
|
53
|
-
|
|
40
|
+
return 'cbx-block-secondary';
|
|
54
41
|
case 'tertiary':
|
|
55
|
-
return 'tertiary';
|
|
56
|
-
|
|
42
|
+
return 'cbx-block-tertiary';
|
|
57
43
|
default:
|
|
58
44
|
return 'default';
|
|
59
45
|
}
|
|
60
46
|
};
|
|
61
|
-
|
|
62
|
-
return /*#__PURE__*/_react.default.createElement("div", _extends({
|
|
47
|
+
return /*#__PURE__*/_react["default"].createElement(Component, _extends({
|
|
63
48
|
className: "".concat(prefixClass(getVariant()), " ").concat(className || ''),
|
|
64
49
|
style: _objectSpread(_objectSpread({}, style), stylesInLine)
|
|
65
50
|
}, props), children);
|
|
66
51
|
};
|
|
67
|
-
|
|
68
52
|
Block.displayName = "Block";
|
|
69
53
|
Block.propTypes = {
|
|
70
|
-
variant: _propTypes
|
|
54
|
+
variant: _propTypes["default"].string,
|
|
55
|
+
component: _propTypes["default"].elementType
|
|
71
56
|
};
|
|
72
57
|
Block.defaultProps = {
|
|
73
|
-
variant: 'default'
|
|
58
|
+
variant: 'default',
|
|
59
|
+
component: 'div'
|
|
74
60
|
};
|
|
75
61
|
var _default = Block;
|
|
76
|
-
exports
|
|
62
|
+
exports["default"] = _default;
|
|
@@ -3,19 +3,14 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports
|
|
7
|
-
|
|
6
|
+
exports["default"] = exports.DesignBlockTemplate = void 0;
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _Block = _interopRequireDefault(require("./Block"));
|
|
11
|
-
|
|
12
9
|
var _DesignBlock = _interopRequireDefault(require("./DesignBlock.stories"));
|
|
13
|
-
|
|
14
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
16
11
|
var _default = {
|
|
17
12
|
title: 'Components/Block',
|
|
18
|
-
component: _Block
|
|
13
|
+
component: _Block["default"],
|
|
19
14
|
argTypes: {
|
|
20
15
|
variant: {
|
|
21
16
|
options: ['primary', 'secondary', 'default'],
|
|
@@ -39,12 +34,10 @@ var _default = {
|
|
|
39
34
|
}
|
|
40
35
|
}
|
|
41
36
|
};
|
|
42
|
-
exports
|
|
43
|
-
|
|
37
|
+
exports["default"] = _default;
|
|
44
38
|
var TemplateBlock = function TemplateBlock(args) {
|
|
45
|
-
return /*#__PURE__*/_react
|
|
39
|
+
return /*#__PURE__*/_react["default"].createElement(_DesignBlock["default"], args);
|
|
46
40
|
};
|
|
47
|
-
|
|
48
41
|
TemplateBlock.displayName = "TemplateBlock";
|
|
49
42
|
var DesignBlockTemplate = TemplateBlock.bind({});
|
|
50
43
|
exports.DesignBlockTemplate = DesignBlockTemplate;
|
|
@@ -3,39 +3,33 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports
|
|
7
|
-
|
|
6
|
+
exports["default"] = void 0;
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
require("../../styles/main.css");
|
|
11
|
-
|
|
12
9
|
var _Block = _interopRequireDefault(require("./Block"));
|
|
13
|
-
|
|
14
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
16
11
|
var DesignBlock = function DesignBlock() {
|
|
17
|
-
return /*#__PURE__*/_react
|
|
12
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_Block["default"], {
|
|
18
13
|
variant: 'primary',
|
|
19
14
|
style: {
|
|
20
15
|
background: '#e7a9a9'
|
|
21
16
|
}
|
|
22
|
-
}, "primary"), /*#__PURE__*/_react
|
|
17
|
+
}, "primary"), /*#__PURE__*/_react["default"].createElement(_Block["default"], {
|
|
23
18
|
variant: 'secondary',
|
|
24
19
|
style: {
|
|
25
20
|
background: '#c1a9e7'
|
|
26
21
|
}
|
|
27
|
-
}, "secondary"), /*#__PURE__*/_react
|
|
22
|
+
}, "secondary"), /*#__PURE__*/_react["default"].createElement(_Block["default"], {
|
|
28
23
|
variant: 'tertiary',
|
|
29
24
|
style: {
|
|
30
25
|
background: '#e7e3a9'
|
|
31
26
|
}
|
|
32
|
-
}, "tertiary"), /*#__PURE__*/_react
|
|
27
|
+
}, "tertiary"), /*#__PURE__*/_react["default"].createElement(_Block["default"], {
|
|
33
28
|
variant: 'default',
|
|
34
29
|
style: {
|
|
35
30
|
background: '#a9e7ce'
|
|
36
31
|
}
|
|
37
32
|
}, "default"));
|
|
38
33
|
};
|
|
39
|
-
|
|
40
34
|
var _default = DesignBlock;
|
|
41
|
-
exports
|
|
35
|
+
exports["default"] = _default;
|
|
@@ -1,43 +1,29 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
|
-
exports
|
|
7
|
-
|
|
7
|
+
exports["default"] = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
9
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
|
|
12
10
|
var _Button = _interopRequireDefault(require("@mui/material/Button"));
|
|
13
|
-
|
|
14
11
|
require("../../styles/main.css");
|
|
15
|
-
|
|
16
12
|
require("./button.css");
|
|
17
|
-
|
|
18
13
|
var _CircularProgress = _interopRequireDefault(require("@mui/material/CircularProgress"));
|
|
19
|
-
|
|
20
14
|
var _styled = _interopRequireDefault(require("@mui/material/styles/styled"));
|
|
21
|
-
|
|
22
15
|
var _Typography = _interopRequireDefault(require("../Typography/Typography"));
|
|
23
|
-
|
|
24
16
|
var _excluded = ["id", "text", "onClick", "disabled", "loading", "variant", "fullWidth", "icon", "endIcon", "variantText", "stylesButton", "stylesText", "darkMode"];
|
|
25
|
-
|
|
26
|
-
function
|
|
27
|
-
|
|
28
|
-
function
|
|
29
|
-
|
|
30
|
-
function
|
|
31
|
-
|
|
32
|
-
function
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
37
|
-
|
|
38
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
39
|
-
|
|
40
|
-
var CssButton = (0, _styled.default)(_Button.default)(function () {
|
|
17
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
18
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) { ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } } return n; }, _extends.apply(null, arguments); }
|
|
19
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
20
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
21
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
22
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
23
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
24
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) { o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } } return i; }
|
|
25
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) { if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } } return t; }
|
|
26
|
+
var CssButton = (0, _styled["default"])(_Button["default"])(function () {
|
|
41
27
|
return {
|
|
42
28
|
'& MuiButton-root': {
|
|
43
29
|
paddingTop: 'var(--spacing12)',
|
|
@@ -66,34 +52,30 @@ var CssButton = (0, _styled.default)(_Button.default)(function () {
|
|
|
66
52
|
}
|
|
67
53
|
};
|
|
68
54
|
});
|
|
69
|
-
|
|
70
55
|
var Button = function Button(_ref) {
|
|
71
56
|
var id = _ref.id,
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
57
|
+
text = _ref.text,
|
|
58
|
+
onClick = _ref.onClick,
|
|
59
|
+
disabled = _ref.disabled,
|
|
60
|
+
loading = _ref.loading,
|
|
61
|
+
variant = _ref.variant,
|
|
62
|
+
fullWidth = _ref.fullWidth,
|
|
63
|
+
icon = _ref.icon,
|
|
64
|
+
endIcon = _ref.endIcon,
|
|
65
|
+
variantText = _ref.variantText,
|
|
66
|
+
stylesButton = _ref.stylesButton,
|
|
67
|
+
stylesText = _ref.stylesText,
|
|
68
|
+
darkMode = _ref.darkMode,
|
|
69
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
86
70
|
var buttonVariant;
|
|
87
71
|
var buttonColor;
|
|
88
72
|
var background;
|
|
89
73
|
var border;
|
|
90
74
|
var elementsColor = 'var(--white)';
|
|
91
|
-
|
|
92
75
|
if (variant === 'primary') {
|
|
93
76
|
buttonVariant = 'contained';
|
|
94
77
|
background = 'var(--primary)';
|
|
95
78
|
buttonColor = 'var(--gray1)';
|
|
96
|
-
|
|
97
79
|
if (darkMode) {
|
|
98
80
|
background = 'var(--white)';
|
|
99
81
|
elementsColor = 'var(--primary)';
|
|
@@ -102,7 +84,6 @@ var Button = function Button(_ref) {
|
|
|
102
84
|
} else if (variant === 'secondary') {
|
|
103
85
|
buttonVariant = 'outlined';
|
|
104
86
|
buttonColor = 'var(--primary)';
|
|
105
|
-
|
|
106
87
|
if (darkMode) {
|
|
107
88
|
buttonColor = 'var(--white)';
|
|
108
89
|
border = 'var(--white)';
|
|
@@ -124,12 +105,10 @@ var Button = function Button(_ref) {
|
|
|
124
105
|
buttonVariant = 'text';
|
|
125
106
|
buttonColor = 'var(--primary)';
|
|
126
107
|
}
|
|
127
|
-
|
|
128
108
|
var shouldAnimateArrow = function shouldAnimateArrow(variantBtn) {
|
|
129
109
|
return variantBtn === 'secondary' || variantBtn === 'tertiary' || endIcon || icon;
|
|
130
110
|
};
|
|
131
|
-
|
|
132
|
-
return /*#__PURE__*/_react.default.createElement(CssButton, _extends({
|
|
111
|
+
return /*#__PURE__*/_react["default"].createElement(CssButton, _extends({
|
|
133
112
|
id: id,
|
|
134
113
|
sx: {
|
|
135
114
|
minWidth: !shouldAnimateArrow(variant) ? '8.75rem' : '6.25rem',
|
|
@@ -152,45 +131,44 @@ var Button = function Button(_ref) {
|
|
|
152
131
|
disableFocusRipple: true,
|
|
153
132
|
fullWidth: fullWidth,
|
|
154
133
|
onClick: onClick,
|
|
155
|
-
startIcon: icon && icon === 'arrow' ? /*#__PURE__*/_react
|
|
134
|
+
startIcon: icon && icon === 'arrow' ? /*#__PURE__*/_react["default"].createElement("i", {
|
|
156
135
|
className: "ri-arrow-left-s-line"
|
|
157
136
|
}) : icon,
|
|
158
|
-
endIcon: !loading && (endIcon && endIcon === 'arrow' ? /*#__PURE__*/_react
|
|
137
|
+
endIcon: !loading && (endIcon && endIcon === 'arrow' ? /*#__PURE__*/_react["default"].createElement("i", {
|
|
159
138
|
className: "ri-arrow-right-s-line"
|
|
160
139
|
}) : endIcon)
|
|
161
|
-
}, props), /*#__PURE__*/_react
|
|
140
|
+
}, props), /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
162
141
|
color: buttonColor,
|
|
163
142
|
variant: variantText,
|
|
164
143
|
styles: _objectSpread({}, stylesText)
|
|
165
|
-
}, text), buttonVariant === 'contained' && !loading && !endIcon && /*#__PURE__*/_react
|
|
144
|
+
}, text), buttonVariant === 'contained' && !loading && !endIcon && /*#__PURE__*/_react["default"].createElement("span", {
|
|
166
145
|
className: "cbx-button-containerArrow"
|
|
167
|
-
}, /*#__PURE__*/_react
|
|
146
|
+
}, /*#__PURE__*/_react["default"].createElement("i", {
|
|
168
147
|
className: "ri-arrow-right-s-line arrow-primary",
|
|
169
148
|
style: {
|
|
170
149
|
color: elementsColor
|
|
171
150
|
}
|
|
172
|
-
})), loading && /*#__PURE__*/_react
|
|
151
|
+
})), loading && /*#__PURE__*/_react["default"].createElement("span", {
|
|
173
152
|
className: "cbx-button-containerLoading"
|
|
174
|
-
}, /*#__PURE__*/_react
|
|
153
|
+
}, /*#__PURE__*/_react["default"].createElement(_CircularProgress["default"], {
|
|
175
154
|
sx: {
|
|
176
155
|
color: elementsColor
|
|
177
156
|
},
|
|
178
157
|
size: 13
|
|
179
158
|
})));
|
|
180
159
|
};
|
|
181
|
-
|
|
182
160
|
Button.displayName = "Button";
|
|
183
161
|
Button.propTypes = {
|
|
184
|
-
text: _propTypes
|
|
185
|
-
onClick: _propTypes
|
|
186
|
-
disabled: _propTypes
|
|
187
|
-
loading: _propTypes
|
|
188
|
-
variant: _propTypes
|
|
189
|
-
fullWidth: _propTypes
|
|
190
|
-
icon: _propTypes
|
|
191
|
-
endIcon: _propTypes
|
|
192
|
-
variantText: _propTypes
|
|
193
|
-
darkMode: _propTypes
|
|
162
|
+
text: _propTypes["default"].node,
|
|
163
|
+
onClick: _propTypes["default"].func,
|
|
164
|
+
disabled: _propTypes["default"].bool,
|
|
165
|
+
loading: _propTypes["default"].bool,
|
|
166
|
+
variant: _propTypes["default"].string,
|
|
167
|
+
fullWidth: _propTypes["default"].bool,
|
|
168
|
+
icon: _propTypes["default"].node,
|
|
169
|
+
endIcon: _propTypes["default"].node,
|
|
170
|
+
variantText: _propTypes["default"].string,
|
|
171
|
+
darkMode: _propTypes["default"].bool
|
|
194
172
|
};
|
|
195
173
|
Button.defaultProps = {
|
|
196
174
|
text: null,
|
|
@@ -205,4 +183,4 @@ Button.defaultProps = {
|
|
|
205
183
|
darkMode: false
|
|
206
184
|
};
|
|
207
185
|
var _default = Button;
|
|
208
|
-
exports
|
|
186
|
+
exports["default"] = _default;
|