@councilbox/councilbox-ui 2.0.54 → 2.0.56
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/ScrollbarOld.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/useDynamicStyles.js +25 -24
- package/dist/HOCs/usePopoverPosition.js +2 -0
- package/dist/build-index.js +70 -0
- package/dist/components/1.Introduction.stories.mdx +4 -1
- package/dist/components/2.Changelog.stories.mdx +25 -2
- package/dist/components/Button/Button.js +15 -0
- package/dist/components/ButtonBasic/ButtonBasic.js +15 -0
- package/dist/components/Checkbox/Checkbox.js +2 -2
- package/dist/components/DatePicker/Calendar.js +243 -0
- package/dist/components/DatePicker/DatePicker.css +197 -0
- package/dist/components/DatePicker/DatePicker.js +465 -0
- package/dist/components/DatePicker/DatePicker.stories.js +180 -0
- package/dist/components/DatePicker/dateUtils.js +525 -0
- package/dist/components/DateRangePicker/DateRangePicker.css +41 -0
- package/dist/components/DateRangePicker/DateRangePicker.js +530 -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 +541 -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.js +21 -5
- package/dist/components/DropDown/DesignDropDown.stories.js +8 -0
- package/dist/components/DropDown/DropDown.js +14 -4
- package/dist/components/Header/Header.js +134 -25
- package/dist/components/IconButton/IconButton.js +3 -2
- package/dist/components/IconButtonSquare/IconButtonSquare.js +3 -3
- package/dist/components/InputAutocomplete/InputAutocomplete.js +17 -2
- package/dist/components/InputPassword/InputPassword.js +14 -1
- package/dist/components/InputText/InputText.css +10 -5
- package/dist/components/InputText/InputText.js +4 -4
- package/dist/components/InputTextArea/InputTextArea.js +14 -0
- package/dist/components/LoadingSection/LoadingSection.js +16 -4
- package/dist/components/MenuItem/MenuItem.js +78 -61
- package/dist/components/MenuLateralLeft/MenuLateralLeft.js +16 -2
- package/dist/components/MenuLateralRight/MenuLateralRight.js +34 -4
- package/dist/components/Modal/Modal.js +16 -1
- package/dist/components/RadioButton/Radio.js +15 -0
- package/dist/components/RichTextInput/DesignRichTextInput.stories.js +119 -0
- package/dist/components/RichTextInput/RichTextInput.css +352 -0
- package/dist/components/RichTextInput/RichTextInput.js +1057 -0
- package/dist/components/RichTextInput/RichTextInput.stories.js +33 -0
- package/dist/components/Ripple/DesignRipple.js +17 -0
- package/dist/components/Scrollbar/Scrollbar.css +60 -19
- package/dist/components/Scrollbar/Scrollbar.js +384 -62
- package/dist/components/ScrollbarOld/DesignScrollbarOld.js +24 -0
- package/dist/components/ScrollbarOld/ScrollbarOld.css +38 -0
- package/dist/components/ScrollbarOld/ScrollbarOld.js +104 -0
- package/dist/components/ScrollbarOld/ScrollbarOld.stories.js +37 -0
- package/dist/components/SelectInput/SelectInput.js +112 -86
- package/dist/components/Slider/Slider.js +15 -0
- package/dist/components/Stars/Stars.js +13 -0
- package/dist/components/Stepper/Stepper.js +15 -2
- package/dist/components/Table/TableSortLabel.js +11 -0
- package/dist/components/Tabs/DesignTabs.js +1 -1
- package/dist/components/Tabs/Tabs.js +13 -2
- package/dist/components/Tag/Tag.js +16 -0
- package/dist/components/TextInput/TextInput.js +13 -0
- package/dist/components/TimePicker/TimePicker.css +3 -0
- package/dist/components/TimePicker/TimePicker.js +441 -0
- package/dist/components/TimePicker/TimePicker.stories.js +132 -0
- package/dist/components/Toast/DesignToast.stories.js +174 -0
- package/dist/components/Toast/Toast.css +154 -0
- package/dist/components/Toast/Toast.js +178 -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 +138 -0
- package/dist/components/Toast/useToast.js +42 -0
- package/dist/components/Toggle/Toggle.js +20 -14
- package/dist/components/Tooltip/Tooltip.js +24 -2
- package/dist/styles/styleFont.css +1 -1
- package/dist/styles/zIndexConsts.css +2 -0
- package/package.json +63 -3
- 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 -91
- package/dist/components/Avatar/AvatarOld.js +0 -124
- package/dist/components/ButtonBasic/ButtonBasicOld.css +0 -41
- package/dist/components/ButtonBasic/ButtonBasicOld.js +0 -211
- package/dist/components/Checkbox/CheckboxOld.css +0 -31
- package/dist/components/Checkbox/CheckboxOld.js +0 -96
- package/dist/components/DrawerPanel/DrawerPanelOld.css +0 -56
- package/dist/components/DrawerPanel/DrawerPanelOld.js +0 -211
- package/dist/components/DropDown/DropDownOld.css +0 -3
- package/dist/components/DropDown/DropDownOld.js +0 -154
- package/dist/components/Grid/GridItemOld.js +0 -38
- package/dist/components/Grid/GridOld.css +0 -0
- package/dist/components/Grid/GridOld.js +0 -46
- package/dist/components/IconButton/IconButtonOld.css +0 -0
- package/dist/components/IconButton/IconButtonOld.js +0 -122
- package/dist/components/IconButtonSquare/IconButtonSquareOld.css +0 -43
- package/dist/components/IconButtonSquare/IconButtonSquareOld.js +0 -115
- package/dist/components/InputAutocomplete/InputAutocompleteOld.css +0 -5
- package/dist/components/InputAutocomplete/InputAutocompleteOld.js +0 -159
- package/dist/components/InputText/InputTextOld.css +0 -10
- package/dist/components/InputText/InputTextOld.js +0 -314
- package/dist/components/MenuItem/MenuItemOld.js +0 -123
- package/dist/components/Modal/ModalOld.css +0 -3
- package/dist/components/Modal/ModalOld.js +0 -213
- package/dist/components/RadioButton/RadioOld.css +0 -31
- package/dist/components/RadioButton/RadioOld.js +0 -126
- package/dist/components/SelectInput/SelectInputOld.css +0 -17
- package/dist/components/SelectInput/SelectInputOld.js +0 -296
- package/dist/components/Table/TableOld.css +0 -79
- package/dist/components/Table/TableOld.js +0 -133
- package/dist/components/Tabs/TabsOld.js +0 -78
- package/dist/components/Typography/TypographyOld.js +0 -119
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
.cbx-buttonBasic-container {
|
|
2
|
-
display: flex;
|
|
3
|
-
align-items: center;
|
|
4
|
-
justify-content: space-between;
|
|
5
|
-
position: relative;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.cbx-buttonBasic-container-start-icon,
|
|
9
|
-
.cbx-buttonBasic-container-loading,
|
|
10
|
-
.cbx-buttonBasic-container-end-icon {
|
|
11
|
-
width: 1.5rem;
|
|
12
|
-
height: 1.5rem;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.cbx-buttonBasic-container-start-icon {
|
|
16
|
-
margin-right: 0.75rem;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.cbx-buttonBasic-container-loading,
|
|
20
|
-
.cbx-buttonBasic-container-end-icon {
|
|
21
|
-
font-size: 1.5rem;
|
|
22
|
-
margin-left: 0.75rem;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.cbx-buttonBasic-container-start-icon i,
|
|
26
|
-
.cbx-buttonBasic-container-end-icon i {
|
|
27
|
-
font-size: 1.5rem !important;
|
|
28
|
-
margin: 0 !important;
|
|
29
|
-
padding: 0 !important;
|
|
30
|
-
vertical-align: unset !important;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.cbx-buttonBasic-badge {
|
|
34
|
-
position: absolute;
|
|
35
|
-
width: var(--spacing8);
|
|
36
|
-
height: var(--spacing8);
|
|
37
|
-
top: -0.125rem;
|
|
38
|
-
left: -0.75rem;
|
|
39
|
-
border-radius: 50rem;
|
|
40
|
-
background: var(--error);
|
|
41
|
-
}
|
|
@@ -1,211 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
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); }
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports["default"] = void 0;
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
|
-
var _Button = _interopRequireDefault(require("@mui/material/Button"));
|
|
11
|
-
require("../../styles/main.css");
|
|
12
|
-
require("./ButtonBasicOld.css");
|
|
13
|
-
var _CircularProgress = _interopRequireDefault(require("@mui/material/CircularProgress"));
|
|
14
|
-
var _Typography = _interopRequireDefault(require("../Typography/Typography"));
|
|
15
|
-
var _excluded = ["id", "text", "onClick", "disabled", "loading", "variant", "fullWidth", "icon", "variantText", "stylesButton", "sx", "badge", "resetDelay", "reset", "error", "success", "startIcon", "endIcon", "className"];
|
|
16
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
17
|
-
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); }
|
|
18
|
-
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; }
|
|
19
|
-
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; }
|
|
20
|
-
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; }
|
|
21
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
22
|
-
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); }
|
|
23
|
-
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; }
|
|
24
|
-
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; }
|
|
25
|
-
var ButtonBasicOld = function ButtonBasicOld(_ref) {
|
|
26
|
-
var id = _ref.id,
|
|
27
|
-
text = _ref.text,
|
|
28
|
-
onClick = _ref.onClick,
|
|
29
|
-
disabled = _ref.disabled,
|
|
30
|
-
loading = _ref.loading,
|
|
31
|
-
variant = _ref.variant,
|
|
32
|
-
fullWidth = _ref.fullWidth,
|
|
33
|
-
icon = _ref.icon,
|
|
34
|
-
variantText = _ref.variantText,
|
|
35
|
-
stylesButton = _ref.stylesButton,
|
|
36
|
-
sx = _ref.sx,
|
|
37
|
-
badge = _ref.badge,
|
|
38
|
-
_ref$resetDelay = _ref.resetDelay,
|
|
39
|
-
resetDelay = _ref$resetDelay === void 0 ? 2700 : _ref$resetDelay,
|
|
40
|
-
reset = _ref.reset,
|
|
41
|
-
error = _ref.error,
|
|
42
|
-
success = _ref.success,
|
|
43
|
-
_ref$startIcon = _ref.startIcon,
|
|
44
|
-
startIcon = _ref$startIcon === void 0 ? icon : _ref$startIcon,
|
|
45
|
-
endIcon = _ref.endIcon,
|
|
46
|
-
className = _ref.className,
|
|
47
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
48
|
-
var buttonVariant;
|
|
49
|
-
var buttonColor;
|
|
50
|
-
if (variant === 'primary') {
|
|
51
|
-
buttonVariant = 'contained';
|
|
52
|
-
buttonColor = 'var(--white)';
|
|
53
|
-
} else if (variant === 'secondary') {
|
|
54
|
-
buttonVariant = 'outlined';
|
|
55
|
-
buttonColor = 'var(--primary)';
|
|
56
|
-
} else if (variant === 'secondaryDark') {
|
|
57
|
-
buttonVariant = 'outlined';
|
|
58
|
-
buttonColor = 'var(--white)';
|
|
59
|
-
} else {
|
|
60
|
-
buttonVariant = 'text';
|
|
61
|
-
buttonColor = 'var(--primary)';
|
|
62
|
-
}
|
|
63
|
-
_react["default"].useEffect(function () {
|
|
64
|
-
var timeout;
|
|
65
|
-
if ((error || success) && !!reset) {
|
|
66
|
-
timeout = setTimeout(reset, resetDelay);
|
|
67
|
-
}
|
|
68
|
-
return function () {
|
|
69
|
-
clearTimeout(timeout);
|
|
70
|
-
};
|
|
71
|
-
}, [error, success, reset, resetDelay]);
|
|
72
|
-
return /*#__PURE__*/_react["default"].createElement(_Button["default"], _extends({
|
|
73
|
-
id: id,
|
|
74
|
-
className: "".concat(className || '', " ").concat(variant === 'secondaryDark' ? 'secondaryDark' : ''),
|
|
75
|
-
sx: _objectSpread(_objectSpread({}, sx), {}, {
|
|
76
|
-
height: '3rem',
|
|
77
|
-
'&:focus': {
|
|
78
|
-
outline: 'none!important'
|
|
79
|
-
},
|
|
80
|
-
'&.MuiButton-contained': {
|
|
81
|
-
backgroundColor: success || error ? success ? 'var(--success)' : error && 'var(--error)' : 'var(--primary)'
|
|
82
|
-
},
|
|
83
|
-
'&.MuiButton-contained:hover': {
|
|
84
|
-
boxShadow: 'none',
|
|
85
|
-
backgroundColor: success || error ? success ? 'var(--success)' : error && 'var(--error)' : 'var(--primary)'
|
|
86
|
-
},
|
|
87
|
-
'&.MuiButton-contained div span, &.MuiButton-contained div div ': {
|
|
88
|
-
transition: 'background .3s, width .3s, color .3s'
|
|
89
|
-
},
|
|
90
|
-
'&.MuiButton-contained:hover div span, &.MuiButton-contained:hover div div': {
|
|
91
|
-
color: success || error ? 'white' : 'var(--accent)'
|
|
92
|
-
},
|
|
93
|
-
'&.MuiButton-contained.Mui-disabled': {
|
|
94
|
-
backgroundColor: 'var(--primary25)'
|
|
95
|
-
},
|
|
96
|
-
'&.MuiButton-contained.Mui-disabled div span, &.MuiButton-contained.Mui-disabled div div': {
|
|
97
|
-
color: 'var(--primary50)'
|
|
98
|
-
},
|
|
99
|
-
'&.MuiButton-outlined': {
|
|
100
|
-
border: '0.063rem solid var(--primary)',
|
|
101
|
-
borderColor: success ? 'var(--success)' : error && 'var(--error)'
|
|
102
|
-
},
|
|
103
|
-
'&.MuiButton-outlined.secondaryDark': {
|
|
104
|
-
border: "0.063rem solid ".concat(buttonColor),
|
|
105
|
-
background: success ? 'var(--success)' : error && 'var(--error)'
|
|
106
|
-
},
|
|
107
|
-
'&.MuiButton-outlined div span, &.MuiButton-outlined div div ': {
|
|
108
|
-
color: success ? 'var(--success)' : error && 'var(--error)'
|
|
109
|
-
},
|
|
110
|
-
'&.MuiButton-outlined.secondaryDark div span, &.MuiButton-outlined.secondaryDark div div ': {
|
|
111
|
-
color: buttonColor
|
|
112
|
-
},
|
|
113
|
-
'&.MuiButton-outlined.Mui-disabled': {
|
|
114
|
-
border: '0.063rem solid var(--primary25)'
|
|
115
|
-
},
|
|
116
|
-
'&.MuiButton-outlined.Mui-disabled div span, &.MuiButton-outlined.Mui-disabled div div': {
|
|
117
|
-
color: 'var(--primary50)'
|
|
118
|
-
},
|
|
119
|
-
'&.MuiButton-text.Mui-disabled div span, &.MuiButton-text.Mui-disabled div div': {
|
|
120
|
-
color: 'var(--primary50)'
|
|
121
|
-
},
|
|
122
|
-
'&.MuiButton-text div span, &.MuiButton-text div div': {
|
|
123
|
-
color: success ? 'var(--success)' : error && 'var(--error)'
|
|
124
|
-
},
|
|
125
|
-
'&.MuiButton-root': {
|
|
126
|
-
transition: 'background .3s, width .3s, color .3s'
|
|
127
|
-
},
|
|
128
|
-
'&.MuiButton-outlined:hover': {
|
|
129
|
-
border: '0.063rem solid var(--primary)',
|
|
130
|
-
backgroundColor: success || error ? 'transparent' : 'var(--accent25)',
|
|
131
|
-
borderColor: success ? 'var(--success)' : error && 'var(--error)'
|
|
132
|
-
},
|
|
133
|
-
'&.MuiButton-outlined.secondaryDark:hover': {
|
|
134
|
-
border: "0.063rem solid ".concat(buttonColor),
|
|
135
|
-
backgroundColor: success || error ? success ? 'var(--success)' : error && 'var(--error)' : 'var(--primary75)'
|
|
136
|
-
},
|
|
137
|
-
'&.MuiButton-root.MuiButton-text:hover': {
|
|
138
|
-
backgroundColor: success || error ? 'transparent' : 'var(--accent25)'
|
|
139
|
-
},
|
|
140
|
-
paddingTop: '0.75rem',
|
|
141
|
-
paddingBottom: '0.75rem',
|
|
142
|
-
paddingLeft: startIcon && endIcon ? 'var(--spacing16)' : startIcon ? 'var(--spacing16)' : 'var(--spacing24)',
|
|
143
|
-
paddingRight: startIcon && endIcon ? 'var(--spacing16)' : endIcon || loading ? 'var(--spacing16)' : 'var(--spacing24)',
|
|
144
|
-
boxShadow: 'none',
|
|
145
|
-
lineHeight: '1.5rem'
|
|
146
|
-
}),
|
|
147
|
-
disabled: loading || disabled,
|
|
148
|
-
variant: buttonVariant,
|
|
149
|
-
disableFocusRipple: true,
|
|
150
|
-
fullWidth: fullWidth,
|
|
151
|
-
onClick: onClick
|
|
152
|
-
}, props), /*#__PURE__*/_react["default"].createElement("div", {
|
|
153
|
-
className: 'cbx-buttonBasic-container'
|
|
154
|
-
}, badge && /*#__PURE__*/_react["default"].createElement("div", {
|
|
155
|
-
className: "cbx-buttonBasic-badge"
|
|
156
|
-
}), startIcon && /*#__PURE__*/_react["default"].createElement("div", {
|
|
157
|
-
className: 'cbx-buttonBasic-container-start-icon'
|
|
158
|
-
}, startIcon), /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
159
|
-
color: buttonColor,
|
|
160
|
-
variant: variantText || 'M',
|
|
161
|
-
component: 'span',
|
|
162
|
-
fontWeight: '700',
|
|
163
|
-
styles: _objectSpread({}, stylesButton)
|
|
164
|
-
}, text), loading ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
165
|
-
className: 'cbx-buttonBasic-container-loading'
|
|
166
|
-
}, /*#__PURE__*/_react["default"].createElement(_CircularProgress["default"], {
|
|
167
|
-
style: {
|
|
168
|
-
width: 'var(--spacing24)',
|
|
169
|
-
height: '1.5rem'
|
|
170
|
-
}
|
|
171
|
-
})) : success || error ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
172
|
-
className: 'cbx-buttonBasic-container-end-icon'
|
|
173
|
-
}, /*#__PURE__*/_react["default"].createElement("i", {
|
|
174
|
-
className: error ? 'ri-close-line' : 'ri-check-line'
|
|
175
|
-
})) : endIcon && /*#__PURE__*/_react["default"].createElement("div", {
|
|
176
|
-
className: 'cbx-buttonBasic-container-end-icon'
|
|
177
|
-
}, endIcon)));
|
|
178
|
-
};
|
|
179
|
-
ButtonBasicOld.displayName = "ButtonBasicOld";
|
|
180
|
-
ButtonBasicOld.propTypes = {
|
|
181
|
-
text: _propTypes["default"].node,
|
|
182
|
-
onClick: _propTypes["default"].func,
|
|
183
|
-
disabled: _propTypes["default"].bool,
|
|
184
|
-
loading: _propTypes["default"].bool,
|
|
185
|
-
variant: _propTypes["default"].string,
|
|
186
|
-
fullWidth: _propTypes["default"].bool,
|
|
187
|
-
startIcon: _propTypes["default"].node,
|
|
188
|
-
endIcon: _propTypes["default"].node,
|
|
189
|
-
variantText: _propTypes["default"].string,
|
|
190
|
-
stylesButton: _propTypes["default"].object,
|
|
191
|
-
badge: _propTypes["default"].any,
|
|
192
|
-
success: _propTypes["default"].bool,
|
|
193
|
-
error: _propTypes["default"].bool
|
|
194
|
-
};
|
|
195
|
-
ButtonBasicOld.defaultProps = {
|
|
196
|
-
text: null,
|
|
197
|
-
onClick: undefined,
|
|
198
|
-
disabled: false,
|
|
199
|
-
loading: false,
|
|
200
|
-
variant: 'primary',
|
|
201
|
-
fullWidth: false,
|
|
202
|
-
startIcon: undefined,
|
|
203
|
-
endIcon: undefined,
|
|
204
|
-
variantText: '',
|
|
205
|
-
stylesButton: undefined,
|
|
206
|
-
badge: false,
|
|
207
|
-
success: false,
|
|
208
|
-
error: false
|
|
209
|
-
};
|
|
210
|
-
var _default = ButtonBasicOld;
|
|
211
|
-
exports["default"] = _default;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
.cbx-checkbox-container {
|
|
2
|
-
position: relative;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.cbx-checkbox-container:hover:before {
|
|
6
|
-
animation: ripple .6s ease;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.cbx-checkbox-container:before {
|
|
10
|
-
content: "";
|
|
11
|
-
position: absolute;
|
|
12
|
-
top: 0;
|
|
13
|
-
left: 0;
|
|
14
|
-
width: 100%;
|
|
15
|
-
height: 100%;
|
|
16
|
-
background-color: var(--accent25);
|
|
17
|
-
border-radius: 50%;
|
|
18
|
-
transform: scale(0);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
@keyframes ripple {
|
|
22
|
-
from {
|
|
23
|
-
transform: scale(0);
|
|
24
|
-
opacity: 1;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
to {
|
|
28
|
-
transform: scale(2.1);
|
|
29
|
-
opacity: .6;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
@@ -1,96 +0,0 @@
|
|
|
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 _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
-
var _Checkbox = _interopRequireDefault(require("@mui/material/Checkbox"));
|
|
10
|
-
require("../../styles/main.css");
|
|
11
|
-
require("./Checkbox.css");
|
|
12
|
-
var _FormControlLabel = _interopRequireDefault(require("@mui/material/FormControlLabel"));
|
|
13
|
-
var _styled = _interopRequireDefault(require("@mui/material/styles/styled"));
|
|
14
|
-
var _excluded = ["id", "className", "disabled", "indeterminate", "label", "onChange"];
|
|
15
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
16
|
-
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); }
|
|
17
|
-
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; }
|
|
18
|
-
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; }
|
|
19
|
-
var CssFormControlLabel = (0, _styled["default"])(_FormControlLabel["default"])(function () {
|
|
20
|
-
return {
|
|
21
|
-
'& .MuiFormControlLabel-label': {
|
|
22
|
-
marginLeft: 'var(--spacing12)',
|
|
23
|
-
transition: '0.2s'
|
|
24
|
-
},
|
|
25
|
-
'& .MuiCheckbox-root.Mui-disabled': {
|
|
26
|
-
color: '#acadce'
|
|
27
|
-
},
|
|
28
|
-
'& .MuiCheckbox-root': {
|
|
29
|
-
transition: 'all .2s',
|
|
30
|
-
width: '1.188rem',
|
|
31
|
-
height: '1.125rem'
|
|
32
|
-
},
|
|
33
|
-
'.MuiButtonBase-root.Mui-disabled, .MuiFormControlLabel-label.Mui-disabled': {
|
|
34
|
-
color: 'var(--gray3)',
|
|
35
|
-
fontWeight: '700'
|
|
36
|
-
},
|
|
37
|
-
'& .MuiButtonBase-root.Mui-checked + span': {
|
|
38
|
-
color: 'var(--primary)',
|
|
39
|
-
fontWeight: '700'
|
|
40
|
-
},
|
|
41
|
-
'& .MuiCheckbox-root.Mui-disabled.Mui-checked + span': {
|
|
42
|
-
color: 'var(--gray3)',
|
|
43
|
-
fontWeight: '700'
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
});
|
|
47
|
-
var CheckboxOld = function CheckboxOld(_ref) {
|
|
48
|
-
var id = _ref.id,
|
|
49
|
-
className = _ref.className,
|
|
50
|
-
disabled = _ref.disabled,
|
|
51
|
-
indeterminate = _ref.indeterminate,
|
|
52
|
-
label = _ref.label,
|
|
53
|
-
onChange = _ref.onChange,
|
|
54
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
55
|
-
return /*#__PURE__*/_react["default"].createElement(CssFormControlLabel, _extends({
|
|
56
|
-
id: id,
|
|
57
|
-
className: className,
|
|
58
|
-
style: {
|
|
59
|
-
margin: '0px'
|
|
60
|
-
},
|
|
61
|
-
onChange: onChange,
|
|
62
|
-
control: /*#__PURE__*/_react["default"].createElement(_Checkbox["default"], {
|
|
63
|
-
className: 'cbx-checkbox-container',
|
|
64
|
-
indeterminate: indeterminate,
|
|
65
|
-
style: {
|
|
66
|
-
padding: '0px'
|
|
67
|
-
},
|
|
68
|
-
sx: {
|
|
69
|
-
'& .MuiSvgIcon-root': {
|
|
70
|
-
fontSize: '1.5rem',
|
|
71
|
-
zIndex: '1'
|
|
72
|
-
},
|
|
73
|
-
'.MuiTouchRipple-child': {
|
|
74
|
-
backgroundColor: 'var(--accent25)'
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}),
|
|
78
|
-
disabled: disabled,
|
|
79
|
-
label: label
|
|
80
|
-
}, props));
|
|
81
|
-
};
|
|
82
|
-
CheckboxOld.displayName = "CheckboxOld";
|
|
83
|
-
CheckboxOld.propTypes = {
|
|
84
|
-
onChange: _propTypes["default"].func,
|
|
85
|
-
disabled: _propTypes["default"].bool,
|
|
86
|
-
indeterminate: _propTypes["default"].bool,
|
|
87
|
-
label: _propTypes["default"].string
|
|
88
|
-
};
|
|
89
|
-
CheckboxOld.defaultProps = {
|
|
90
|
-
onChange: undefined,
|
|
91
|
-
disabled: false,
|
|
92
|
-
indeterminate: false,
|
|
93
|
-
label: ''
|
|
94
|
-
};
|
|
95
|
-
var _default = CheckboxOld;
|
|
96
|
-
exports["default"] = _default;
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
.cbx-DrawerPanel-dialog {
|
|
2
|
-
display: flex;
|
|
3
|
-
align-items: center;
|
|
4
|
-
justify-content: flex-end;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.cbx-DrawerPanel-toolbar {
|
|
8
|
-
padding: 0 1rem
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.cbx-DrawerPanel-iconButton {
|
|
12
|
-
outline: none!important;
|
|
13
|
-
height: 1.5em;
|
|
14
|
-
padding: 0!important;
|
|
15
|
-
margin: 0!important;
|
|
16
|
-
width: 1.5em;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.cbx-DrawerPanel-icon {
|
|
20
|
-
color: #fff;
|
|
21
|
-
height: auto!important;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.cbx-DrawerPanel-typography {
|
|
25
|
-
color:#fff;
|
|
26
|
-
flex: 1!important;
|
|
27
|
-
padding: 1.125rem!important;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.cbx-DrawerPanel-typography span{
|
|
31
|
-
padding-left: 1.5rem!important;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.cbx-DrawerPanel-container-tabs {
|
|
35
|
-
width: 100%;
|
|
36
|
-
margin-right: 4.25rem;
|
|
37
|
-
margin-left: 4.25rem;
|
|
38
|
-
overflow: hidden;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.cbx-DrawerPanel-tabs {
|
|
42
|
-
color: var(--white)!important;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.cbx-DrawerPanel-tabs:focus {
|
|
46
|
-
outline: none;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.cbx-DrawerPanel-tabs-opacity {
|
|
50
|
-
opacity: 50%!important
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.cbx-DrawerPanel-dialogContent {
|
|
54
|
-
min-width: 40vw;
|
|
55
|
-
max-width: 95vw;
|
|
56
|
-
}
|
|
@@ -1,211 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
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); }
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports["default"] = void 0;
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
require("./DrawerPanel.css");
|
|
10
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
var _AppBar = _interopRequireDefault(require("@mui/material/AppBar"));
|
|
12
|
-
var _Dialog = _interopRequireDefault(require("@mui/material/Dialog"));
|
|
13
|
-
var _DialogContent = _interopRequireDefault(require("@mui/material/DialogContent"));
|
|
14
|
-
var _Icon = _interopRequireDefault(require("@mui/material/Icon"));
|
|
15
|
-
var _IconButton = _interopRequireDefault(require("@mui/material/IconButton"));
|
|
16
|
-
var _Slide = _interopRequireDefault(require("@mui/material/Slide"));
|
|
17
|
-
var _Toolbar = _interopRequireDefault(require("@mui/material/Toolbar"));
|
|
18
|
-
var _material = require("@mui/material");
|
|
19
|
-
var _ButtonBasic = _interopRequireDefault(require("../ButtonBasic/ButtonBasic"));
|
|
20
|
-
var _Typography = _interopRequireDefault(require("../Typography/Typography"));
|
|
21
|
-
var _excluded = ["title", "id", "fullScreen", "sizeContainer", "buttonAccept", "successAction", "open", "requestClose", "loadingAction", "acceptAction", "bodyText", "bodyStyle", "hideAccept", "classNameDialog", "PaperProps", "widthModal", "isMobile", "tabs", "onChange", "titleStyles", "subTitle", "subTitleStyles", "endIcon", "propsButton"];
|
|
22
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
23
|
-
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; }
|
|
24
|
-
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; }
|
|
25
|
-
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; }
|
|
26
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
27
|
-
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); }
|
|
28
|
-
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; }
|
|
29
|
-
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; }
|
|
30
|
-
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); }
|
|
31
|
-
var Transition = /*#__PURE__*/_react["default"].forwardRef(function (props, ref) {
|
|
32
|
-
return /*#__PURE__*/_react["default"].createElement(_Slide["default"], _extends({
|
|
33
|
-
direction: "left",
|
|
34
|
-
ref: ref
|
|
35
|
-
}, props));
|
|
36
|
-
});
|
|
37
|
-
var DrawerPanel = function DrawerPanel(_ref) {
|
|
38
|
-
var title = _ref.title,
|
|
39
|
-
_ref$id = _ref.id,
|
|
40
|
-
id = _ref$id === void 0 ? 'panel-confirm' : _ref$id,
|
|
41
|
-
fullScreen = _ref.fullScreen,
|
|
42
|
-
sizeContainer = _ref.sizeContainer,
|
|
43
|
-
buttonAccept = _ref.buttonAccept,
|
|
44
|
-
_ref$successAction = _ref.successAction,
|
|
45
|
-
successAction = _ref$successAction === void 0 ? false : _ref$successAction,
|
|
46
|
-
open = _ref.open,
|
|
47
|
-
requestClose = _ref.requestClose,
|
|
48
|
-
loadingAction = _ref.loadingAction,
|
|
49
|
-
acceptAction = _ref.acceptAction,
|
|
50
|
-
bodyText = _ref.bodyText,
|
|
51
|
-
_ref$bodyStyle = _ref.bodyStyle,
|
|
52
|
-
bodyStyle = _ref$bodyStyle === void 0 ? {} : _ref$bodyStyle,
|
|
53
|
-
hideAccept = _ref.hideAccept,
|
|
54
|
-
classNameDialog = _ref.classNameDialog,
|
|
55
|
-
PaperProps = _ref.PaperProps,
|
|
56
|
-
widthModal = _ref.widthModal,
|
|
57
|
-
isMobile = _ref.isMobile,
|
|
58
|
-
tabs = _ref.tabs,
|
|
59
|
-
onChange = _ref.onChange,
|
|
60
|
-
titleStyles = _ref.titleStyles,
|
|
61
|
-
subTitle = _ref.subTitle,
|
|
62
|
-
subTitleStyles = _ref.subTitleStyles,
|
|
63
|
-
endIcon = _ref.endIcon,
|
|
64
|
-
propsButton = _ref.propsButton,
|
|
65
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
66
|
-
return /*#__PURE__*/_react["default"].createElement(_Dialog["default"], _extends({
|
|
67
|
-
TransitionComponent: Transition,
|
|
68
|
-
className: "".concat(classNameDialog, " cbx-DrawerPanel-dialog"),
|
|
69
|
-
fullScreen: true,
|
|
70
|
-
maxWidth: false,
|
|
71
|
-
id: id,
|
|
72
|
-
open: open || false,
|
|
73
|
-
onClose: requestClose,
|
|
74
|
-
sx: {
|
|
75
|
-
'& .MuiDialog-container': {
|
|
76
|
-
width: isMobile || fullScreen ? '100%' : sizeContainer === 'SM' ? '40%' : '80%',
|
|
77
|
-
maxWidth: '75rem',
|
|
78
|
-
justifyContent: 'flex-end'
|
|
79
|
-
}
|
|
80
|
-
},
|
|
81
|
-
PaperProps: {
|
|
82
|
-
style: _objectSpread(_objectSpread(_objectSpread({
|
|
83
|
-
maxWidth: !isMobile && !fullScreen && '1600px'
|
|
84
|
-
}, widthModal), PaperProps ? PaperProps.style : {}), isMobile ? {
|
|
85
|
-
margin: 0
|
|
86
|
-
} : {})
|
|
87
|
-
}
|
|
88
|
-
}, props), /*#__PURE__*/_react["default"].createElement(_AppBar["default"], {
|
|
89
|
-
sx: {
|
|
90
|
-
position: 'relative',
|
|
91
|
-
flexDirection: 'row',
|
|
92
|
-
alignItems: 'center',
|
|
93
|
-
backgroundColor: 'var(--primary)'
|
|
94
|
-
},
|
|
95
|
-
elevation: 0
|
|
96
|
-
}, !!requestClose && /*#__PURE__*/_react["default"].createElement(_Toolbar["default"], {
|
|
97
|
-
className: "cbx-DrawerPanel-toolbar"
|
|
98
|
-
}, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
|
|
99
|
-
edge: "end",
|
|
100
|
-
id: "".concat(id, "-close"),
|
|
101
|
-
className: "cbx-DrawerPanel-iconButton",
|
|
102
|
-
onClick: requestClose
|
|
103
|
-
}, /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
|
|
104
|
-
className: 'cbx-DrawerPanel-icon ri-close-line'
|
|
105
|
-
}))), !!title && /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
106
|
-
variant: "M",
|
|
107
|
-
color: 'white',
|
|
108
|
-
className: 'cbx-DrawerPanel-typography',
|
|
109
|
-
fontWeight: 'bold',
|
|
110
|
-
styles: _objectSpread({
|
|
111
|
-
fontSize: '1.125rem'
|
|
112
|
-
}, titleStyles)
|
|
113
|
-
}, title, !!subTitle && /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
114
|
-
variant: "M",
|
|
115
|
-
color: 'white',
|
|
116
|
-
styles: _objectSpread({
|
|
117
|
-
fontSize: '1.125rem',
|
|
118
|
-
paddingLeft: '24px'
|
|
119
|
-
}, subTitleStyles),
|
|
120
|
-
component: 'span'
|
|
121
|
-
}, subTitle)), /*#__PURE__*/_react["default"].createElement(_Toolbar["default"], {
|
|
122
|
-
className: 'cbx-DrawerPanel-toolbar'
|
|
123
|
-
}, !hideAccept && !!buttonAccept && /*#__PURE__*/_react["default"].createElement(_ButtonBasic["default"], _extends({
|
|
124
|
-
text: buttonAccept,
|
|
125
|
-
id: "".concat(id, "-button-accept"),
|
|
126
|
-
loading: loadingAction,
|
|
127
|
-
success: successAction,
|
|
128
|
-
onClick: acceptAction,
|
|
129
|
-
variant: 'secondaryDark',
|
|
130
|
-
endIcon: endIcon
|
|
131
|
-
}, propsButton)))), /*#__PURE__*/_react["default"].createElement(_AppBar["default"], {
|
|
132
|
-
sx: {
|
|
133
|
-
position: 'relative',
|
|
134
|
-
flexDirection: 'row',
|
|
135
|
-
backgroundColor: 'var(--primary)'
|
|
136
|
-
},
|
|
137
|
-
elevation: 0
|
|
138
|
-
}, tabs.length > 0 && /*#__PURE__*/_react["default"].createElement("div", {
|
|
139
|
-
className: 'cbx-DrawerPanel-container-tabs'
|
|
140
|
-
}, /*#__PURE__*/_react["default"].createElement(_material.Tabs, {
|
|
141
|
-
indicatorColor: "secondary",
|
|
142
|
-
textColor: "secondary",
|
|
143
|
-
onChange: onChange,
|
|
144
|
-
value: tabs.findIndex(function (tab) {
|
|
145
|
-
return tab.active;
|
|
146
|
-
}),
|
|
147
|
-
variant: "scrollable",
|
|
148
|
-
scrollButtons: "auto"
|
|
149
|
-
}, tabs.map(function (tab, index) {
|
|
150
|
-
return /*#__PURE__*/_react["default"].createElement(_material.Tab, {
|
|
151
|
-
label: tab.label,
|
|
152
|
-
key: index,
|
|
153
|
-
className: "cbx-DrawerPanel-tabs ".concat(!tab.active ? 'cbx-DrawerPanel-tabs-opacity' : ''),
|
|
154
|
-
sx: _objectSpread({}, !tab.active ? {
|
|
155
|
-
opacity: '50% !important'
|
|
156
|
-
} : {})
|
|
157
|
-
});
|
|
158
|
-
})))), /*#__PURE__*/_react["default"].createElement(_DialogContent["default"], {
|
|
159
|
-
className: 'cbx-DrawerPanel-dialogContent',
|
|
160
|
-
style: _objectSpread({}, bodyStyle)
|
|
161
|
-
}, bodyText));
|
|
162
|
-
};
|
|
163
|
-
DrawerPanel.displayName = "DrawerPanel";
|
|
164
|
-
DrawerPanel.propTypes = {
|
|
165
|
-
open: _propTypes["default"].bool,
|
|
166
|
-
title: _propTypes["default"].string,
|
|
167
|
-
id: _propTypes["default"].string,
|
|
168
|
-
fullScreen: _propTypes["default"].bool,
|
|
169
|
-
sizeContainer: _propTypes["default"].string,
|
|
170
|
-
buttonAccept: _propTypes["default"].string,
|
|
171
|
-
successAction: _propTypes["default"].bool,
|
|
172
|
-
requestClose: _propTypes["default"].func,
|
|
173
|
-
loadingAction: _propTypes["default"].bool,
|
|
174
|
-
acceptAction: _propTypes["default"].func,
|
|
175
|
-
bodyText: _propTypes["default"].any,
|
|
176
|
-
bodyStyle: _propTypes["default"].object,
|
|
177
|
-
hideAccept: _propTypes["default"].bool,
|
|
178
|
-
classNameDialog: _propTypes["default"].string,
|
|
179
|
-
PaperProps: _propTypes["default"].object,
|
|
180
|
-
widthModal: _propTypes["default"].object,
|
|
181
|
-
isMobile: _propTypes["default"].bool,
|
|
182
|
-
loadingColor: _propTypes["default"].string,
|
|
183
|
-
tabs: _propTypes["default"].array,
|
|
184
|
-
onChange: _propTypes["default"].func,
|
|
185
|
-
titleStyles: _propTypes["default"].object
|
|
186
|
-
};
|
|
187
|
-
DrawerPanel.defaultProps = {
|
|
188
|
-
open: true,
|
|
189
|
-
title: 'title',
|
|
190
|
-
id: '',
|
|
191
|
-
fullScreen: false,
|
|
192
|
-
sizeContainer: '',
|
|
193
|
-
buttonAccept: '',
|
|
194
|
-
successAction: false,
|
|
195
|
-
requestClose: undefined,
|
|
196
|
-
loadingAction: false,
|
|
197
|
-
acceptAction: undefined,
|
|
198
|
-
bodyText: undefined,
|
|
199
|
-
bodyStyle: undefined,
|
|
200
|
-
hideAccept: false,
|
|
201
|
-
classNameDialog: '',
|
|
202
|
-
PaperProps: undefined,
|
|
203
|
-
widthModal: undefined,
|
|
204
|
-
isMobile: false,
|
|
205
|
-
loadingColor: 'white',
|
|
206
|
-
tabs: [],
|
|
207
|
-
onChange: undefined,
|
|
208
|
-
titleStyles: undefined
|
|
209
|
-
};
|
|
210
|
-
var _default = DrawerPanel;
|
|
211
|
-
exports["default"] = _default;
|