@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.
Files changed (150) hide show
  1. package/Accordion.js +3 -0
  2. package/Alert.js +3 -0
  3. package/Avatar.js +3 -0
  4. package/AvatarGroup.js +3 -0
  5. package/Block.js +3 -0
  6. package/Button.js +3 -0
  7. package/ButtonBasic.js +3 -0
  8. package/Checkbox.js +3 -0
  9. package/DatePicker.js +3 -0
  10. package/DateRangePicker.js +3 -0
  11. package/DateTimePicker.js +3 -0
  12. package/DragDrop.js +3 -0
  13. package/DrawerPanel.js +3 -0
  14. package/DropDown.js +3 -0
  15. package/EnhancedTable.js +3 -0
  16. package/FabButton.js +3 -0
  17. package/Grid.js +3 -0
  18. package/Header.js +3 -0
  19. package/IconButton.js +3 -0
  20. package/IconButtonSquare.js +3 -0
  21. package/IconFont.js +3 -0
  22. package/InputAutocomplete.js +3 -0
  23. package/InputPassword.js +3 -0
  24. package/InputText.js +3 -0
  25. package/InputTextArea.js +3 -0
  26. package/LoadingSection.js +3 -0
  27. package/MenuItem.js +3 -0
  28. package/MenuLateralLeft.js +3 -0
  29. package/MenuLateralRight.js +3 -0
  30. package/Modal.js +3 -0
  31. package/Radio.js +3 -0
  32. package/RichTextInput.js +3 -0
  33. package/Scrollbar.js +3 -0
  34. package/ScrollbarNew.js +3 -0
  35. package/SelectInput.js +3 -0
  36. package/Slider.js +3 -0
  37. package/Spacing.js +3 -0
  38. package/Stars.js +3 -0
  39. package/Stepper.js +3 -0
  40. package/Table.js +3 -0
  41. package/TableBody.js +3 -0
  42. package/TableCell.js +3 -0
  43. package/TableContainer.js +3 -0
  44. package/TableHead.js +3 -0
  45. package/TableRow.js +3 -0
  46. package/TableSortLabel.js +3 -0
  47. package/Tabs.js +3 -0
  48. package/Tag.js +3 -0
  49. package/TextInput.js +3 -0
  50. package/ThemeProvider.js +3 -0
  51. package/TimePicker.js +3 -0
  52. package/Timeline.js +3 -0
  53. package/ToastProvider.js +3 -0
  54. package/Toggle.js +3 -0
  55. package/Tooltip.js +3 -0
  56. package/Typography.js +3 -0
  57. package/dist/HOCs/useDynamicStyles.js +25 -24
  58. package/dist/build-index.js +70 -0
  59. package/dist/components/1.Introduction.stories.mdx +4 -1
  60. package/dist/components/2.Changelog.stories.mdx +15 -3
  61. package/dist/components/DatePicker/Calendar.js +243 -0
  62. package/dist/components/DatePicker/DatePicker.css +197 -0
  63. package/dist/components/DatePicker/DatePicker.js +384 -0
  64. package/dist/components/DatePicker/DatePicker.stories.js +180 -0
  65. package/dist/components/DatePicker/dateUtils.js +478 -0
  66. package/dist/components/DateRangePicker/DateRangePicker.css +41 -0
  67. package/dist/components/DateRangePicker/DateRangePicker.js +435 -0
  68. package/dist/components/DateRangePicker/DateRangePicker.stories.js +147 -0
  69. package/dist/components/DateRangePicker/RangeCalendar.js +188 -0
  70. package/dist/components/DateTimePicker/DateTimePicker.css +4 -0
  71. package/dist/components/DateTimePicker/DateTimePicker.js +481 -0
  72. package/dist/components/DateTimePicker/DateTimePicker.stories.js +144 -0
  73. package/dist/components/DateTimePicker/TimeColumns.css +46 -0
  74. package/dist/components/DateTimePicker/TimeColumns.js +175 -0
  75. package/dist/components/DragDrop/DragDrop.js +4 -1
  76. package/dist/components/DropDown/DesignDropDown.stories.js +8 -0
  77. package/dist/components/DropDown/DropDown.js +14 -4
  78. package/dist/components/Header/Header.js +32 -10
  79. package/dist/components/IconButton/IconButton.js +3 -2
  80. package/dist/components/IconButtonSquare/IconButtonSquare.js +3 -3
  81. package/dist/components/InputAutocomplete/InputAutocomplete.js +2 -2
  82. package/dist/components/InputText/InputText.css +10 -5
  83. package/dist/components/InputText/InputText.js +4 -4
  84. package/dist/components/MenuItem/MenuItem.js +65 -61
  85. package/dist/components/MenuLateralRight/MenuLateralRight.js +18 -2
  86. package/dist/components/Modal/Modal.js +3 -1
  87. package/dist/components/RichTextInput/DesignRichTextInput.stories.js +119 -0
  88. package/dist/components/RichTextInput/RichTextInput.css +309 -0
  89. package/dist/components/RichTextInput/RichTextInput.js +851 -0
  90. package/dist/components/RichTextInput/RichTextInput.stories.js +33 -0
  91. package/dist/components/Ripple/DesignRipple.js +17 -0
  92. package/dist/components/ScrollbarNew/DesignScrollbarNew.js +24 -0
  93. package/dist/components/ScrollbarNew/ScrollbarNew.css +79 -0
  94. package/dist/components/ScrollbarNew/ScrollbarNew.js +426 -0
  95. package/dist/components/ScrollbarNew/ScrollbarNew.stories.js +37 -0
  96. package/dist/components/SelectInput/SelectInput.js +85 -78
  97. package/dist/components/Tabs/DesignTabs.js +1 -1
  98. package/dist/components/Tabs/Tabs.js +0 -1
  99. package/dist/components/TimePicker/TimePicker.css +3 -0
  100. package/dist/components/TimePicker/TimePicker.js +359 -0
  101. package/dist/components/TimePicker/TimePicker.stories.js +132 -0
  102. package/dist/components/Toast/DesignToast.stories.js +174 -0
  103. package/dist/components/Toast/Toast.css +154 -0
  104. package/dist/components/Toast/Toast.js +165 -0
  105. package/dist/components/Toast/Toast.stories.js +33 -0
  106. package/dist/components/Toast/ToastProvider.js +33 -0
  107. package/dist/components/Toast/ToastRoot.js +89 -0
  108. package/dist/components/Toast/toastStore.js +127 -0
  109. package/dist/components/Toast/useToast.js +42 -0
  110. package/dist/components/Toggle/Toggle.js +20 -14
  111. package/dist/components/Tooltip/Tooltip.js +7 -2
  112. package/dist/styles/styleFont.css +1 -1
  113. package/dist/styles/zIndexConsts.css +2 -0
  114. package/package.json +63 -3
  115. package/toast.js +7 -0
  116. package/useCouncilboxTheme.js +7 -0
  117. package/useToast.js +7 -0
  118. package/dist/components/Accordion/AccordionOld.css +0 -16
  119. package/dist/components/Accordion/AccordionOld.js +0 -91
  120. package/dist/components/Avatar/AvatarOld.js +0 -124
  121. package/dist/components/ButtonBasic/ButtonBasicOld.css +0 -41
  122. package/dist/components/ButtonBasic/ButtonBasicOld.js +0 -211
  123. package/dist/components/Checkbox/CheckboxOld.css +0 -31
  124. package/dist/components/Checkbox/CheckboxOld.js +0 -96
  125. package/dist/components/DrawerPanel/DrawerPanelOld.css +0 -56
  126. package/dist/components/DrawerPanel/DrawerPanelOld.js +0 -211
  127. package/dist/components/DropDown/DropDownOld.css +0 -3
  128. package/dist/components/DropDown/DropDownOld.js +0 -154
  129. package/dist/components/Grid/GridItemOld.js +0 -38
  130. package/dist/components/Grid/GridOld.css +0 -0
  131. package/dist/components/Grid/GridOld.js +0 -46
  132. package/dist/components/IconButton/IconButtonOld.css +0 -0
  133. package/dist/components/IconButton/IconButtonOld.js +0 -122
  134. package/dist/components/IconButtonSquare/IconButtonSquareOld.css +0 -43
  135. package/dist/components/IconButtonSquare/IconButtonSquareOld.js +0 -115
  136. package/dist/components/InputAutocomplete/InputAutocompleteOld.css +0 -5
  137. package/dist/components/InputAutocomplete/InputAutocompleteOld.js +0 -159
  138. package/dist/components/InputText/InputTextOld.css +0 -10
  139. package/dist/components/InputText/InputTextOld.js +0 -314
  140. package/dist/components/MenuItem/MenuItemOld.js +0 -123
  141. package/dist/components/Modal/ModalOld.css +0 -3
  142. package/dist/components/Modal/ModalOld.js +0 -213
  143. package/dist/components/RadioButton/RadioOld.css +0 -31
  144. package/dist/components/RadioButton/RadioOld.js +0 -126
  145. package/dist/components/SelectInput/SelectInputOld.css +0 -17
  146. package/dist/components/SelectInput/SelectInputOld.js +0 -296
  147. package/dist/components/Table/TableOld.css +0 -79
  148. package/dist/components/Table/TableOld.js +0 -133
  149. package/dist/components/Tabs/TabsOld.js +0 -78
  150. package/dist/components/Typography/TypographyOld.js +0 -119
@@ -1,124 +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("../../styles/main.css");
11
- var _Avatar = _interopRequireDefault(require("@mui/material/Avatar"));
12
- var _Typography = _interopRequireDefault(require("../Typography/Typography"));
13
- require("./Avatar.css");
14
- var _excluded = ["backgroundColor", "text", "src", "label", "colorText", "variantText", "fontWeightText", "textAlignText", "variantLabel", "colorLabel", "fontWeightLabel", "textAlignLabel", "sizeAvatar", "sizeText"];
15
- /* eslint-disable no-tabs */
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 stylesAvatar = {
26
- SM: {
27
- width: 'var(--spacing32)',
28
- height: 'var(--spacing32)'
29
- },
30
- XS: {
31
- width: 'var(--spacing24)',
32
- height: 'var(--spacing24)'
33
- }
34
- };
35
- var stylesAvatarLabel = {
36
- SM: {
37
- width: 'var(--spacing24)',
38
- height: 'var(--spacing24)'
39
- },
40
- XS: {
41
- width: 'var(--spacing24)',
42
- height: 'var(--spacing24)'
43
- }
44
- };
45
- var Avatar = function Avatar(_ref) {
46
- var backgroundColor = _ref.backgroundColor,
47
- text = _ref.text,
48
- src = _ref.src,
49
- label = _ref.label,
50
- colorText = _ref.colorText,
51
- variantText = _ref.variantText,
52
- fontWeightText = _ref.fontWeightText,
53
- textAlignText = _ref.textAlignText,
54
- variantLabel = _ref.variantLabel,
55
- colorLabel = _ref.colorLabel,
56
- fontWeightLabel = _ref.fontWeightLabel,
57
- textAlignLabel = _ref.textAlignLabel,
58
- sizeAvatar = _ref.sizeAvatar,
59
- sizeText = _ref.sizeText,
60
- props = _objectWithoutProperties(_ref, _excluded);
61
- return /*#__PURE__*/_react["default"].createElement("div", {
62
- className: 'cbx-avatar-block'
63
- }, /*#__PURE__*/_react["default"].createElement(_Avatar["default"], _extends({
64
- src: src,
65
- sx: _objectSpread({
66
- bgcolor: backgroundColor
67
- }, label ? _objectSpread({
68
- width: 'var(--spacing32)',
69
- height: 'var(--spacing32)'
70
- }, stylesAvatarLabel[sizeAvatar]) : _objectSpread({
71
- width: 'var(--spacing40)',
72
- height: 'var(--spacing40)'
73
- }, stylesAvatar[sizeAvatar]))
74
- }, props), /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
75
- variant: variantText || (!variantText && !!label ? 'XS' : 'M'),
76
- color: colorText || 'var(--gray4)',
77
- fontWeight: fontWeightText,
78
- textAlign: textAlignText
79
- }, text)), label && /*#__PURE__*/_react["default"].createElement("div", {
80
- style: {
81
- marginLeft: sizeAvatar === 'XS' ? 'var(--spacing4)' : 'var(--spacing8)'
82
- }
83
- }, /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
84
- variant: variantLabel || 'M',
85
- color: colorLabel,
86
- fontWeight: fontWeightLabel,
87
- textAlign: textAlignLabel
88
- }, label)));
89
- };
90
- Avatar.displayName = "Avatar";
91
- Avatar.propTypes = {
92
- backgroundColor: _propTypes["default"].string,
93
- text: _propTypes["default"].string,
94
- src: _propTypes["default"].string,
95
- label: _propTypes["default"].string,
96
- colorText: _propTypes["default"].string,
97
- variantText: _propTypes["default"].string,
98
- fontWeightText: _propTypes["default"].string,
99
- textAlignText: _propTypes["default"].string,
100
- variantLabel: _propTypes["default"].string,
101
- colorLabel: _propTypes["default"].string,
102
- fontWeightLabel: _propTypes["default"].string,
103
- textAlignLabel: _propTypes["default"].string,
104
- sizeAvatar: _propTypes["default"].string,
105
- sizeText: _propTypes["default"].string
106
- };
107
- Avatar.defaultProps = {
108
- backgroundColor: '',
109
- text: 'MW',
110
- src: null,
111
- label: '',
112
- colorText: '',
113
- variantText: '',
114
- fontWeightText: '700',
115
- textAlignText: 'center',
116
- variantLabel: '',
117
- colorLabel: '',
118
- fontWeightLabel: '',
119
- textAlignLabel: '',
120
- sizeAvatar: '',
121
- sizeText: ''
122
- };
123
- var _default = Avatar;
124
- exports["default"] = _default;
@@ -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
- }