@councilbox/councilbox-ui 2.0.54 → 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/useDynamicStyles.js +25 -24
- package/dist/build-index.js +70 -0
- package/dist/components/1.Introduction.stories.mdx +4 -1
- package/dist/components/2.Changelog.stories.mdx +15 -3
- 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.js +4 -1
- package/dist/components/DropDown/DesignDropDown.stories.js +8 -0
- package/dist/components/DropDown/DropDown.js +14 -4
- package/dist/components/Header/Header.js +32 -10
- package/dist/components/IconButton/IconButton.js +3 -2
- package/dist/components/IconButtonSquare/IconButtonSquare.js +3 -3
- package/dist/components/InputAutocomplete/InputAutocomplete.js +2 -2
- package/dist/components/InputText/InputText.css +10 -5
- package/dist/components/InputText/InputText.js +4 -4
- package/dist/components/MenuItem/MenuItem.js +65 -61
- package/dist/components/MenuLateralRight/MenuLateralRight.js +18 -2
- package/dist/components/Modal/Modal.js +3 -1
- 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 +17 -0
- 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/SelectInput.js +85 -78
- package/dist/components/Tabs/DesignTabs.js +1 -1
- package/dist/components/Tabs/Tabs.js +0 -1
- 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/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.js +20 -14
- package/dist/components/Tooltip/Tooltip.js +7 -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,123 +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 _MenuItem = _interopRequireDefault(require("@mui/material/MenuItem"));
|
|
9
|
-
var _react = _interopRequireDefault(require("react"));
|
|
10
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
require("../../styles/main.css");
|
|
12
|
-
require("./MenuItem.css");
|
|
13
|
-
var _Typography = _interopRequireDefault(require("../Typography/Typography"));
|
|
14
|
-
var _DropDown = _interopRequireDefault(require("../DropDown/DropDown"));
|
|
15
|
-
var _excluded = ["id", "children", "icon", "sx", "badge", "menuItems", "setOpen", "onClick", "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 MenuItem = function MenuItem(_ref) {
|
|
26
|
-
var id = _ref.id,
|
|
27
|
-
children = _ref.children,
|
|
28
|
-
icon = _ref.icon,
|
|
29
|
-
sx = _ref.sx,
|
|
30
|
-
badge = _ref.badge,
|
|
31
|
-
menuItems = _ref.menuItems,
|
|
32
|
-
setOpen = _ref.setOpen,
|
|
33
|
-
onClick = _ref.onClick,
|
|
34
|
-
endIcon = _ref.endIcon,
|
|
35
|
-
className = _ref.className,
|
|
36
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
37
|
-
var getContent = function getContent() {
|
|
38
|
-
return /*#__PURE__*/_react["default"].createElement(_MenuItem["default"], _extends({
|
|
39
|
-
id: id,
|
|
40
|
-
sx: _objectSpread({
|
|
41
|
-
padding: '0.75rem 1.25rem!important',
|
|
42
|
-
minWidth: '13.75rem!important',
|
|
43
|
-
maxHeight: '3rem!important',
|
|
44
|
-
maxWidth: '17.5rem!important',
|
|
45
|
-
'&.MuiButtonBase-root.MuiMenuItem-root.Mui-selected': {
|
|
46
|
-
background: 'var(--gray1)'
|
|
47
|
-
},
|
|
48
|
-
'&.MuiButtonBase-root.MuiMenuItem-root:hover': {
|
|
49
|
-
background: 'var(--gray1)'
|
|
50
|
-
}
|
|
51
|
-
}, sx)
|
|
52
|
-
}, props, {
|
|
53
|
-
onClick: onClick || setOpen,
|
|
54
|
-
className: "cbx-menuItem ".concat(className)
|
|
55
|
-
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
56
|
-
className: "cbx-menuItem-container"
|
|
57
|
-
}, icon && /*#__PURE__*/_react["default"].createElement("div", {
|
|
58
|
-
className: "cbx-menuItem-container-icon"
|
|
59
|
-
}, badge && /*#__PURE__*/_react["default"].createElement("div", {
|
|
60
|
-
className: "cbx-menuItem-badge-icon"
|
|
61
|
-
}), typeof icon === 'string' ? /*#__PURE__*/_react["default"].createElement("i", {
|
|
62
|
-
className: icon
|
|
63
|
-
}) : icon), /*#__PURE__*/_react["default"].createElement("div", {
|
|
64
|
-
className: "cbx-menuItem-container-typography",
|
|
65
|
-
style: {
|
|
66
|
-
paddingRight: badge && !icon && '1.188rem'
|
|
67
|
-
}
|
|
68
|
-
}, /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
69
|
-
color: 'var(--black)',
|
|
70
|
-
styles: {
|
|
71
|
-
whiteSpace: 'nowrap',
|
|
72
|
-
textOverflow: 'ellipsis',
|
|
73
|
-
overflow: 'hidden'
|
|
74
|
-
}
|
|
75
|
-
}, children), badge && !icon && /*#__PURE__*/_react["default"].createElement("div", {
|
|
76
|
-
className: "cbx-menuItem-badge-typography"
|
|
77
|
-
})), (menuItems || endIcon) && /*#__PURE__*/_react["default"].createElement("div", {
|
|
78
|
-
className: "cbx-menuItem-container-icon-right"
|
|
79
|
-
}, /*#__PURE__*/_react["default"].createElement("i", {
|
|
80
|
-
className: endIcon || 'ri-arrow-right-s-line'
|
|
81
|
-
}))));
|
|
82
|
-
};
|
|
83
|
-
return menuItems ? /*#__PURE__*/_react["default"].createElement(_DropDown["default"], {
|
|
84
|
-
Component: function Component() {
|
|
85
|
-
return getContent();
|
|
86
|
-
},
|
|
87
|
-
sx: {
|
|
88
|
-
'& .MuiPopover-paper': {
|
|
89
|
-
marginLeft: '-0.5rem',
|
|
90
|
-
boxShadow: '0px 4px 4px rgba(0, 0, 0, 0.25)'
|
|
91
|
-
}
|
|
92
|
-
},
|
|
93
|
-
anchorOrigin: {
|
|
94
|
-
vertical: 'center',
|
|
95
|
-
horizontal: 'right'
|
|
96
|
-
},
|
|
97
|
-
transformOrigin: {
|
|
98
|
-
vertical: 'center',
|
|
99
|
-
horizontal: 'left'
|
|
100
|
-
},
|
|
101
|
-
items: menuItems
|
|
102
|
-
}) : getContent();
|
|
103
|
-
};
|
|
104
|
-
MenuItem.propTypes = {
|
|
105
|
-
badge: _propTypes["default"].bool,
|
|
106
|
-
id: _propTypes["default"].string,
|
|
107
|
-
children: _propTypes["default"].string,
|
|
108
|
-
icon: _propTypes["default"].string,
|
|
109
|
-
menuItems: _propTypes["default"].any,
|
|
110
|
-
setOpen: _propTypes["default"].func,
|
|
111
|
-
endIcon: _propTypes["default"].string
|
|
112
|
-
};
|
|
113
|
-
MenuItem.defaultProps = {
|
|
114
|
-
badge: false,
|
|
115
|
-
id: '',
|
|
116
|
-
children: '',
|
|
117
|
-
icon: '',
|
|
118
|
-
menuItems: '',
|
|
119
|
-
setOpen: undefined,
|
|
120
|
-
endIcon: ''
|
|
121
|
-
};
|
|
122
|
-
var _default = MenuItem;
|
|
123
|
-
exports["default"] = _default;
|
|
@@ -1,213 +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
|
-
require("./Modal.css");
|
|
11
|
-
var _material = require("@mui/material");
|
|
12
|
-
var _Typography = _interopRequireDefault(require("../Typography/Typography"));
|
|
13
|
-
var _ButtonBasic = _interopRequireDefault(require("../ButtonBasic/ButtonBasic"));
|
|
14
|
-
var _CouncilboxThemeContext = require("../ThemeProvider/CouncilboxThemeContext");
|
|
15
|
-
var _excluded = ["title", "fullWidth", "id", "fullScreen", "buttonAccept", "buttonCancel", "open", "requestClose", "loadingAction", "acceptAction", "cancelAction", "body", "bodyText", "hideAccept", "extraActions", "classNameDialog", "PaperProps", "widthModal", "actions", "sx", "buttonCancelProps", "buttonAcceptProps", "breakpointsButtons", "hasScrollbar", "scrollbarHeight"];
|
|
16
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
17
|
-
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; }
|
|
18
|
-
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; }
|
|
19
|
-
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; }
|
|
20
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
21
|
-
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); }
|
|
22
|
-
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); }
|
|
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 Modal = function Modal(_ref) {
|
|
26
|
-
var title = _ref.title,
|
|
27
|
-
fullWidth = _ref.fullWidth,
|
|
28
|
-
_ref$id = _ref.id,
|
|
29
|
-
id = _ref$id === void 0 ? 'modal' : _ref$id,
|
|
30
|
-
fullScreen = _ref.fullScreen,
|
|
31
|
-
buttonAccept = _ref.buttonAccept,
|
|
32
|
-
buttonCancel = _ref.buttonCancel,
|
|
33
|
-
open = _ref.open,
|
|
34
|
-
requestClose = _ref.requestClose,
|
|
35
|
-
loadingAction = _ref.loadingAction,
|
|
36
|
-
acceptAction = _ref.acceptAction,
|
|
37
|
-
cancelAction = _ref.cancelAction,
|
|
38
|
-
body = _ref.body,
|
|
39
|
-
bodyText = _ref.bodyText,
|
|
40
|
-
hideAccept = _ref.hideAccept,
|
|
41
|
-
extraActions = _ref.extraActions,
|
|
42
|
-
classNameDialog = _ref.classNameDialog,
|
|
43
|
-
PaperProps = _ref.PaperProps,
|
|
44
|
-
widthModal = _ref.widthModal,
|
|
45
|
-
actions = _ref.actions,
|
|
46
|
-
sx = _ref.sx,
|
|
47
|
-
buttonCancelProps = _ref.buttonCancelProps,
|
|
48
|
-
buttonAcceptProps = _ref.buttonAcceptProps,
|
|
49
|
-
breakpointsButtons = _ref.breakpointsButtons,
|
|
50
|
-
hasScrollbar = _ref.hasScrollbar,
|
|
51
|
-
scrollbarHeight = _ref.scrollbarHeight,
|
|
52
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
53
|
-
var _useCouncilboxTheme = (0, _CouncilboxThemeContext.useCouncilboxTheme)(),
|
|
54
|
-
size = _useCouncilboxTheme.size,
|
|
55
|
-
innerWidth = _useCouncilboxTheme.innerWidth;
|
|
56
|
-
var buttons = /*#__PURE__*/_react["default"].createElement("div", {
|
|
57
|
-
style: {
|
|
58
|
-
display: 'flex',
|
|
59
|
-
gap: innerWidth < breakpointsButtons ? 'var(--spacing12)' : 'var(--spacing8)',
|
|
60
|
-
flexDirection: innerWidth < breakpointsButtons && 'column',
|
|
61
|
-
width: innerWidth < breakpointsButtons && '100%'
|
|
62
|
-
}
|
|
63
|
-
}, !!buttonCancel && /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_ButtonBasic["default"], _extends({
|
|
64
|
-
variant: "secondary",
|
|
65
|
-
text: buttonCancel,
|
|
66
|
-
id: "".concat(id, "-button-cancel"),
|
|
67
|
-
onClick: cancelAction || requestClose,
|
|
68
|
-
fullWidth: true
|
|
69
|
-
}, buttonCancelProps))), extraActions &&
|
|
70
|
-
/*#__PURE__*/
|
|
71
|
-
// extraActions siempre fullWidth
|
|
72
|
-
_react["default"].createElement("div", null, extraActions), !hideAccept && !!buttonAccept && /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_ButtonBasic["default"], _extends({
|
|
73
|
-
text: buttonAccept,
|
|
74
|
-
id: "".concat(id, "-button-accept"),
|
|
75
|
-
loading: loadingAction,
|
|
76
|
-
onClick: acceptAction,
|
|
77
|
-
fullWidth: true
|
|
78
|
-
}, buttonAcceptProps))));
|
|
79
|
-
return /*#__PURE__*/_react["default"].createElement(_material.Dialog, _extends({
|
|
80
|
-
className: classNameDialog,
|
|
81
|
-
fullWidth: size === 'sm' || size === 'xs' || fullWidth,
|
|
82
|
-
fullScreen: fullScreen,
|
|
83
|
-
id: id,
|
|
84
|
-
open: open || false,
|
|
85
|
-
onClose: requestClose,
|
|
86
|
-
PaperProps: {
|
|
87
|
-
style: _objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
|
88
|
-
filter: 'drop-shadow(4px 4px 4px rgba(0, 0, 0, 0.25))',
|
|
89
|
-
boxShadow: 'none',
|
|
90
|
-
maxWidth: '37.5rem'
|
|
91
|
-
}, hasScrollbar ? {
|
|
92
|
-
width: size === 'sm' || size === 'xs' ? '' : '100%',
|
|
93
|
-
height: scrollbarHeight || '100%'
|
|
94
|
-
} : {}), widthModal), PaperProps ? PaperProps.style : {}), size === 'sm' || size === 'xs' ? {
|
|
95
|
-
margin: 0
|
|
96
|
-
} : {})
|
|
97
|
-
},
|
|
98
|
-
sx: _objectSpread({
|
|
99
|
-
'& .MuiDialog-paperFullWidth': {
|
|
100
|
-
width: '100%',
|
|
101
|
-
minWidth: '100%'
|
|
102
|
-
},
|
|
103
|
-
'& .MuiDialog-paperFullWidth .MuiDialogContent-root': {
|
|
104
|
-
width: '100%',
|
|
105
|
-
minWidth: '100%'
|
|
106
|
-
}
|
|
107
|
-
}, sx)
|
|
108
|
-
}, props), !!requestClose && /*#__PURE__*/_react["default"].createElement("div", {
|
|
109
|
-
style: {
|
|
110
|
-
position: 'absolute',
|
|
111
|
-
right: '26px',
|
|
112
|
-
top: '18px'
|
|
113
|
-
},
|
|
114
|
-
id: "alert-confirm-close",
|
|
115
|
-
onClick: requestClose
|
|
116
|
-
}, /*#__PURE__*/_react["default"].createElement("i", {
|
|
117
|
-
className: "ri-close-line",
|
|
118
|
-
style: {
|
|
119
|
-
fontSize: '1.5rem',
|
|
120
|
-
color: 'var(--gray3)',
|
|
121
|
-
cursor: 'pointer'
|
|
122
|
-
}
|
|
123
|
-
})), !!title && /*#__PURE__*/_react["default"].createElement(_material.DialogTitle, {
|
|
124
|
-
component: 'span',
|
|
125
|
-
sx: {
|
|
126
|
-
paddingTop: '1.438rem',
|
|
127
|
-
paddingLeft: '2rem'
|
|
128
|
-
}
|
|
129
|
-
}, /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
130
|
-
variant: "L",
|
|
131
|
-
fontWeight: '700',
|
|
132
|
-
color: 'var(--primary)',
|
|
133
|
-
styles: {
|
|
134
|
-
marginRight: '1.8rem'
|
|
135
|
-
}
|
|
136
|
-
}, title)), /*#__PURE__*/_react["default"].createElement(_material.DialogContent, {
|
|
137
|
-
sx: {
|
|
138
|
-
minWidth: size === 'sm' || size === 'xs' ? '100%' : '25rem',
|
|
139
|
-
maxWidth: size === 'sm' || size === 'xs' ? '100%' : '37.5rem',
|
|
140
|
-
padding: '0 2rem',
|
|
141
|
-
overflow: 'hidden'
|
|
142
|
-
}
|
|
143
|
-
}, body || bodyText), (!!buttonCancel || !!buttonAccept) && /*#__PURE__*/_react["default"].createElement(_material.DialogActions, {
|
|
144
|
-
className: "cbx-modal-contentButtons",
|
|
145
|
-
sx: {
|
|
146
|
-
padding: '1.5rem 2rem',
|
|
147
|
-
margin: '0px',
|
|
148
|
-
minWidth: '1.563rem',
|
|
149
|
-
display: 'flex',
|
|
150
|
-
flexFlow: 'row wrap'
|
|
151
|
-
}
|
|
152
|
-
}, buttons), actions && /*#__PURE__*/_react["default"].createElement(_material.DialogActions, {
|
|
153
|
-
className: "cbx-modal-contentButtons",
|
|
154
|
-
sx: {
|
|
155
|
-
padding: '1.5rem 2rem',
|
|
156
|
-
margin: '0px',
|
|
157
|
-
minWidth: '1.563rem',
|
|
158
|
-
display: 'flex',
|
|
159
|
-
flexFlow: 'row wrap'
|
|
160
|
-
}
|
|
161
|
-
}, actions));
|
|
162
|
-
};
|
|
163
|
-
Modal.displayName = "Modal";
|
|
164
|
-
var _default = Modal;
|
|
165
|
-
exports["default"] = _default;
|
|
166
|
-
Modal.propTypes = {
|
|
167
|
-
title: _propTypes["default"].string,
|
|
168
|
-
fullWidth: _propTypes["default"].bool,
|
|
169
|
-
id: _propTypes["default"].string,
|
|
170
|
-
fullScreen: _propTypes["default"].bool,
|
|
171
|
-
buttonAccept: _propTypes["default"].string,
|
|
172
|
-
buttonCancel: _propTypes["default"].string,
|
|
173
|
-
open: _propTypes["default"].bool,
|
|
174
|
-
requestClose: _propTypes["default"].func,
|
|
175
|
-
loadingAction: _propTypes["default"].bool,
|
|
176
|
-
acceptAction: _propTypes["default"].func,
|
|
177
|
-
cancelAction: _propTypes["default"].func,
|
|
178
|
-
body: _propTypes["default"].node,
|
|
179
|
-
bodyText: _propTypes["default"].node,
|
|
180
|
-
hideAccept: _propTypes["default"].bool,
|
|
181
|
-
extraActions: _propTypes["default"].node,
|
|
182
|
-
classNameDialog: _propTypes["default"].string,
|
|
183
|
-
PaperProps: _propTypes["default"].object,
|
|
184
|
-
widthModal: _propTypes["default"].object,
|
|
185
|
-
actions: _propTypes["default"].node,
|
|
186
|
-
breakpointsButtons: _propTypes["default"].string,
|
|
187
|
-
hasScrollbar: _propTypes["default"].bool,
|
|
188
|
-
scrollbarHeight: _propTypes["default"].string
|
|
189
|
-
};
|
|
190
|
-
Modal.defaultProps = {
|
|
191
|
-
title: '',
|
|
192
|
-
fullWidth: false,
|
|
193
|
-
id: 'modal',
|
|
194
|
-
fullScreen: false,
|
|
195
|
-
buttonAccept: '',
|
|
196
|
-
buttonCancel: '',
|
|
197
|
-
open: false,
|
|
198
|
-
requestClose: undefined,
|
|
199
|
-
loadingAction: false,
|
|
200
|
-
acceptAction: undefined,
|
|
201
|
-
cancelAction: undefined,
|
|
202
|
-
body: '',
|
|
203
|
-
bodyText: '',
|
|
204
|
-
hideAccept: false,
|
|
205
|
-
extraActions: undefined,
|
|
206
|
-
classNameDialog: '',
|
|
207
|
-
PaperProps: {},
|
|
208
|
-
widthModal: {},
|
|
209
|
-
actions: undefined,
|
|
210
|
-
breakpointsButtons: '800',
|
|
211
|
-
hasScrollbar: false,
|
|
212
|
-
scrollbarHeight: '70%'
|
|
213
|
-
};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
.cbx-radio-container {
|
|
2
|
-
position: relative;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.cbx-radio-container:hover:before {
|
|
6
|
-
animation: ripple .6s ease;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.cbx-radio-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,126 +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 _Radio = _interopRequireDefault(require("@mui/material/Radio"));
|
|
10
|
-
require("../../styles/main.css");
|
|
11
|
-
require("./Radio.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 BpIcon = (0, _styled["default"])('span')(function () {
|
|
20
|
-
return {
|
|
21
|
-
borderRadius: '50%',
|
|
22
|
-
width: 20,
|
|
23
|
-
height: 20,
|
|
24
|
-
boxShadow: 'inset 0 0 0 0.125rem var(--gray3)',
|
|
25
|
-
backgroundColor: '#f5f8fa',
|
|
26
|
-
zIndex: '1',
|
|
27
|
-
backgroundImage: 'linear-gradient(180deg,hsla(0,0%,100%,.8),hsla(0,0%,100%,0))',
|
|
28
|
-
transition: '0.2s',
|
|
29
|
-
'.Mui-focusVisible &': {
|
|
30
|
-
outline: '0.125rem auto rgba(19,124,189,.6)',
|
|
31
|
-
outlineOffset: 2
|
|
32
|
-
},
|
|
33
|
-
'input:disabled ~ &': {
|
|
34
|
-
boxShadow: 'inset 0 0 0 0.125rem var(--gray3)'
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
});
|
|
38
|
-
var BpCheckedIcon = (0, _styled["default"])(BpIcon)({
|
|
39
|
-
boxShadow: 'inset 0 0 0 0.125rem var(--primary)',
|
|
40
|
-
backgroundColor: 'var(--primary)',
|
|
41
|
-
backgroundImage: 'linear-gradient(180deg,hsla(0,0%,100%,.1),hsla(0,0%,100%,0))',
|
|
42
|
-
'&:before': {
|
|
43
|
-
display: 'block',
|
|
44
|
-
width: 20,
|
|
45
|
-
height: 20,
|
|
46
|
-
backgroundImage: 'radial-gradient(#fff,#fff 28%,transparent 32%)',
|
|
47
|
-
content: '""'
|
|
48
|
-
},
|
|
49
|
-
'input:hover ~ &': {
|
|
50
|
-
backgroundColor: 'var(--primary)'
|
|
51
|
-
},
|
|
52
|
-
'input:disabled ~ &': {
|
|
53
|
-
boxShadow: 'inset 0 0 0 0.125rem var(--gray3)',
|
|
54
|
-
backgroundImage: 'linear-gradient(180deg,hsla(0,0%,100%,.1),hsla(0,0%,100%,0))',
|
|
55
|
-
backgroundColor: 'var(--gray3)'
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
var CssFormControlLabel = (0, _styled["default"])(_FormControlLabel["default"])(function () {
|
|
59
|
-
return {
|
|
60
|
-
'& .MuiFormControlLabel-label': {
|
|
61
|
-
marginLeft: 'var(--spacing12)',
|
|
62
|
-
transition: '0.2s'
|
|
63
|
-
},
|
|
64
|
-
'& .MuiRadio-root.Mui-disabled': {
|
|
65
|
-
color: '#acadce'
|
|
66
|
-
},
|
|
67
|
-
'& .MuiRadio-root': {
|
|
68
|
-
transition: 'all .2s'
|
|
69
|
-
},
|
|
70
|
-
'& .MuiRadio-root.Mui-checked + span': {
|
|
71
|
-
color: 'var(--primary)',
|
|
72
|
-
fontWeight: '700'
|
|
73
|
-
},
|
|
74
|
-
'& .MuiRadio-root.Mui-disabled.Mui-checked + span': {
|
|
75
|
-
color: 'var(--gray3)',
|
|
76
|
-
fontWeight: '700'
|
|
77
|
-
},
|
|
78
|
-
'.MuiButtonBase-root.Mui-disabled, .MuiFormControlLabel-label.Mui-disabled': {
|
|
79
|
-
color: 'var(--gray3)',
|
|
80
|
-
fontWeight: '700'
|
|
81
|
-
}
|
|
82
|
-
};
|
|
83
|
-
});
|
|
84
|
-
var Radio = function Radio(_ref) {
|
|
85
|
-
var id = _ref.id,
|
|
86
|
-
className = _ref.className,
|
|
87
|
-
disabled = _ref.disabled,
|
|
88
|
-
indeterminate = _ref.indeterminate,
|
|
89
|
-
label = _ref.label,
|
|
90
|
-
onChange = _ref.onChange,
|
|
91
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
92
|
-
return /*#__PURE__*/_react["default"].createElement(CssFormControlLabel, _extends({
|
|
93
|
-
id: id,
|
|
94
|
-
className: className,
|
|
95
|
-
style: {
|
|
96
|
-
margin: '0px'
|
|
97
|
-
},
|
|
98
|
-
onChange: onChange,
|
|
99
|
-
control: /*#__PURE__*/_react["default"].createElement(_Radio["default"], {
|
|
100
|
-
className: 'cbx-radio-container',
|
|
101
|
-
indeterminate: indeterminate,
|
|
102
|
-
style: {
|
|
103
|
-
padding: '0px'
|
|
104
|
-
},
|
|
105
|
-
checkedIcon: /*#__PURE__*/_react["default"].createElement(BpCheckedIcon, null),
|
|
106
|
-
icon: /*#__PURE__*/_react["default"].createElement(BpIcon, null)
|
|
107
|
-
}),
|
|
108
|
-
disabled: disabled,
|
|
109
|
-
label: label
|
|
110
|
-
}, props));
|
|
111
|
-
};
|
|
112
|
-
Radio.displayName = "Radio";
|
|
113
|
-
Radio.propTypes = {
|
|
114
|
-
onChange: _propTypes["default"].func,
|
|
115
|
-
disabled: _propTypes["default"].bool,
|
|
116
|
-
indeterminate: _propTypes["default"].bool,
|
|
117
|
-
label: _propTypes["default"].string
|
|
118
|
-
};
|
|
119
|
-
Radio.defaultProps = {
|
|
120
|
-
onChange: undefined,
|
|
121
|
-
disabled: false,
|
|
122
|
-
indeterminate: false,
|
|
123
|
-
label: ''
|
|
124
|
-
};
|
|
125
|
-
var _default = Radio;
|
|
126
|
-
exports["default"] = _default;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
.cbx-selectInput-items-center {
|
|
2
|
-
display: flex;
|
|
3
|
-
align-items: center;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.cbx-selectInput-infoBtn {
|
|
7
|
-
margin-right: var(--spacing4);
|
|
8
|
-
height: 0.875rem;
|
|
9
|
-
line-height: 1.1;
|
|
10
|
-
font-size: 0.875rem;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.cbx-selectInput-fullwidth ul li {
|
|
14
|
-
width: 100%!important;
|
|
15
|
-
min-width: 100%!important;
|
|
16
|
-
max-width: 100%!important;
|
|
17
|
-
}
|