@councilbox/councilbox-ui 1.0.0 → 2.0.0
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/dist/HOCs/useDynamicStyles.js +99 -0
- package/dist/HOCs/useRipple.js +91 -0
- package/dist/build-index.js +8 -0
- package/dist/components/1.Introduction.stories.mdx +2 -1
- package/dist/components/2.Changelog.stories.mdx +7 -0
- package/dist/components/3.Guide.stories.mdx +56 -0
- package/dist/components/Accordion/Accordion.css +39 -1
- package/dist/components/Accordion/Accordion.js +84 -45
- package/dist/components/Accordion/Accordion.stories.js +4 -2
- package/dist/components/Accordion/AccordionOld.css +16 -0
- package/dist/components/Accordion/AccordionOld.js +115 -0
- package/dist/components/Accordion/DesignAccordion.stories.js +38 -0
- package/dist/components/Alert/Alert.css +5 -0
- package/dist/components/Alert/Alert.js +17 -6
- package/dist/components/Avatar/Avatar.css +3 -3
- package/dist/components/Avatar/Avatar.js +36 -20
- package/dist/components/Avatar/AvatarOld.js +138 -0
- package/dist/components/Avatar/DesignAvatar.stories.js +1 -1
- package/dist/components/Block/Block.js +17 -2
- package/dist/components/ButtonBasic/ButtonBasic.css +264 -20
- package/dist/components/ButtonBasic/ButtonBasic.js +85 -110
- package/dist/components/ButtonBasic/ButtonBasicOld.css +41 -0
- package/dist/components/ButtonBasic/ButtonBasicOld.js +231 -0
- package/dist/components/Checkbox/Checkbox.css +101 -22
- package/dist/components/Checkbox/Checkbox.js +119 -63
- package/dist/components/Checkbox/CheckboxOld.css +31 -0
- package/dist/components/Checkbox/CheckboxOld.js +112 -0
- package/dist/components/DragDrop/DragDrop.js +24 -9
- package/dist/components/DrawerPanel/DesignDrawerPanel.js +4 -2
- package/dist/components/DrawerPanel/DrawerPanel.css +76 -36
- package/dist/components/DrawerPanel/DrawerPanel.js +137 -115
- package/dist/components/DrawerPanel/DrawerPanelOld.css +56 -0
- package/dist/components/DrawerPanel/DrawerPanelOld.js +233 -0
- package/dist/components/DropDown/DesignDropDown.stories.js +146 -17
- package/dist/components/DropDown/DropDown.css +96 -1
- package/dist/components/DropDown/DropDown.js +363 -82
- package/dist/components/DropDown/DropDown.stories.js +1 -0
- package/dist/components/DropDown/DropDownOld.css +3 -0
- package/dist/components/DropDown/DropDownOld.js +186 -0
- package/dist/components/DropDown/PopoverPlayground.css +22 -0
- package/dist/components/DropDown/PopoverPlayground.js +235 -0
- package/dist/components/EnhancedTable/EnhancedTable.js +5 -6
- package/dist/components/FabButton/DesignFabButton.stories.js +3 -1
- package/dist/components/FabButton/FabButton.js +25 -5
- package/dist/components/Grid/DesignGrid.stories.js +9 -3
- package/dist/components/Grid/Grid.css +325 -0
- package/dist/components/Grid/Grid.js +57 -16
- package/dist/components/Grid/GridItem.js +31 -13
- package/dist/components/Grid/GridItemOld.js +43 -0
- package/dist/components/Grid/GridOld.css +0 -0
- package/dist/components/Grid/GridOld.js +53 -0
- package/dist/components/Header/Header.js +144 -115
- package/dist/components/IconButton/DesignIconButton.stories.js +37 -2
- package/dist/components/IconButton/IconButton.css +144 -0
- package/dist/components/IconButton/IconButton.js +177 -50
- package/dist/components/IconButton/IconButtonOld.css +0 -0
- package/dist/components/IconButton/IconButtonOld.js +138 -0
- package/dist/components/IconButtonSquare/IconButtonSquare.js +20 -90
- package/dist/components/IconButtonSquare/IconButtonSquareOld.css +43 -0
- package/dist/components/IconButtonSquare/IconButtonSquareOld.js +133 -0
- package/dist/components/InputAutocomplete/InputAutocomplete.css +109 -0
- package/dist/components/InputAutocomplete/InputAutocomplete.js +316 -77
- package/dist/components/InputAutocomplete/InputAutocomplete.stories.js +118 -6
- package/dist/components/InputAutocomplete/InputAutocompleteOld.css +5 -0
- package/dist/components/InputAutocomplete/InputAutocompleteOld.js +178 -0
- package/dist/components/InputPassword/InputPassword.js +10 -20
- package/dist/components/InputText/InputText.css +442 -1
- package/dist/components/InputText/InputText.js +298 -239
- package/dist/components/InputText/InputText.stories.js +12 -3
- package/dist/components/InputText/InputTextOld.css +10 -0
- package/dist/components/InputText/InputTextOld.js +340 -0
- package/dist/components/InputTextArea/DesignInputTextArea.stories.js +30 -4
- package/dist/components/InputTextArea/InputTextArea.js +13 -6
- package/dist/components/LoadingSection/LoadingSection.css +44 -2
- package/dist/components/LoadingSection/LoadingSection.js +63 -9
- package/dist/components/MenuItem/DesignMenuItem.stories.js +1 -0
- package/dist/components/MenuItem/MenuItem.css +31 -6
- package/dist/components/MenuItem/MenuItem.js +95 -50
- package/dist/components/MenuItem/MenuItemOld.js +139 -0
- package/dist/components/MenuLateralLeft/MenuLateralLeft.js +60 -40
- package/dist/components/MenuLateralRight/MenuLateralRight.js +32 -12
- package/dist/components/Modal/DesignModal.stories.js +54 -0
- package/dist/components/Modal/Modal.css +81 -2
- package/dist/components/Modal/Modal.js +112 -80
- package/dist/components/Modal/Modal.stories.js +13 -2
- package/dist/components/Modal/ModalOld.css +3 -0
- package/dist/components/Modal/ModalOld.js +230 -0
- package/dist/components/PaginationFooter/DesignPaginationFooter.stories.js +9 -1
- package/dist/components/PaginationFooter/PaginationFooter.css +73 -0
- package/dist/components/PaginationFooter/PaginationFooter.js +45 -87
- package/dist/components/RadioButton/Radio.css +115 -16
- package/dist/components/RadioButton/Radio.js +70 -94
- package/dist/components/RadioButton/Radio.stories.js +42 -18
- package/dist/components/RadioButton/RadioOld.css +31 -0
- package/dist/components/RadioButton/RadioOld.js +142 -0
- package/dist/components/Ripple/DesignRipple.js +77 -0
- package/dist/components/Ripple/Ripple.stories.js +45 -0
- package/dist/components/Scrollbar/Scrollbar.js +21 -6
- package/dist/components/SelectInput/DesignSelectInput.js +62 -23
- package/dist/components/SelectInput/SelectInput.css +128 -10
- package/dist/components/SelectInput/SelectInput.js +233 -246
- package/dist/components/SelectInput/SelectInputOld.css +17 -0
- package/dist/components/SelectInput/SelectInputOld.js +325 -0
- package/dist/components/Stars/Stars.css +28 -28
- package/dist/components/Stars/Stars.js +22 -12
- package/dist/components/Stepper/Stepper.css +1 -0
- package/dist/components/Stepper/Stepper.js +81 -24
- package/dist/components/Table/DesignTable.stories.js +1 -0
- package/dist/components/Table/Table.css +56 -53
- package/dist/components/Table/Table.js +55 -75
- package/dist/components/Table/TableOld.css +79 -0
- package/dist/components/Table/TableOld.js +165 -0
- package/dist/components/Tabs/DesignTabs.js +37 -12
- package/dist/components/Tabs/Tabs.css +39 -4
- package/dist/components/Tabs/Tabs.js +194 -30
- package/dist/components/Tabs/Tabs.stories.js +8 -1
- package/dist/components/Tabs/TabsOld.js +92 -0
- package/dist/components/Tag/Tag.js +19 -9
- package/dist/components/Toggle/Toggle.css +122 -3
- package/dist/components/Toggle/Toggle.js +95 -68
- package/dist/components/Tooltip/DesignTooltip.stories.js +48 -0
- package/dist/components/Tooltip/Tooltip.css +75 -0
- package/dist/components/Tooltip/Tooltip.js +126 -0
- package/dist/components/Tooltip/Tooltip.stories.js +40 -0
- package/dist/components/Typography/Typography.css +9 -0
- package/dist/components/Typography/Typography.js +30 -21
- package/dist/components/Typography/TypographyOld.js +132 -0
- package/dist/styles/colorConsts.css +24 -0
- package/dist/styles/main.css +41 -49
- package/dist/styles/scpacingConsts.css +26 -0
- package/dist/styles/zIndexConsts.css +9 -0
- package/package.json +2 -1
|
@@ -7,111 +7,41 @@ exports.default = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
10
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
|
|
12
|
-
var _IconButton = _interopRequireDefault(require("@mui/material/IconButton"));
|
|
13
|
-
|
|
14
10
|
require("../../styles/main.css");
|
|
15
11
|
|
|
16
12
|
require("./IconButtonSquare.css");
|
|
17
13
|
|
|
18
|
-
var
|
|
14
|
+
var _IconButton = _interopRequireDefault(require("../IconButton/IconButton"));
|
|
19
15
|
|
|
20
|
-
var
|
|
16
|
+
var _useDynamicStyles2 = _interopRequireDefault(require("../../HOCs/useDynamicStyles"));
|
|
21
17
|
|
|
22
|
-
var
|
|
18
|
+
var _excluded = ["sx", "prefixClass"];
|
|
23
19
|
|
|
24
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
21
|
|
|
26
|
-
function
|
|
22
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
27
23
|
|
|
28
|
-
function
|
|
24
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
29
25
|
|
|
30
|
-
function
|
|
26
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
31
27
|
|
|
32
28
|
var IconButtonSquare = function IconButtonSquare(_ref) {
|
|
33
|
-
var
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
var rippleRef = _react.default.useRef(null);
|
|
46
|
-
|
|
47
|
-
var onRippleStart = function onRippleStart(e) {
|
|
48
|
-
rippleRef.current.start(e);
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
var onRippleStop = function onRippleStop(e) {
|
|
52
|
-
rippleRef.current.stop(e);
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
return /*#__PURE__*/_react.default.createElement(_IconButton.default, {
|
|
56
|
-
onMouseDown: onRippleStart,
|
|
57
|
-
onMouseUp: onRippleStop,
|
|
58
|
-
disableRipple: true,
|
|
59
|
-
sx: _objectSpread({
|
|
60
|
-
width: '4.75rem',
|
|
61
|
-
height: '4.75rem',
|
|
62
|
-
background: active ? 'white' : 'transparent',
|
|
63
|
-
borderRadius: '0',
|
|
64
|
-
'&:focus': {
|
|
65
|
-
outline: 'none!important'
|
|
66
|
-
},
|
|
67
|
-
padding: textVisibleMenuMobile && '8px 20px'
|
|
68
|
-
}, styles),
|
|
69
|
-
onClick: onClick
|
|
70
|
-
}, /*#__PURE__*/_react.default.createElement(_TouchRipple.default, {
|
|
71
|
-
ref: rippleRef,
|
|
72
|
-
center: false
|
|
73
|
-
}), /*#__PURE__*/_react.default.createElement(_Tooltip.default, {
|
|
74
|
-
title: tooltip || '',
|
|
75
|
-
placement: placementTooltip
|
|
76
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
77
|
-
className: "cbx-iconButtonSquare-container ".concat(textVisibleMenuMobile ? 'menuMobile' : '')
|
|
78
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
79
|
-
className: "cbx-iconButtonSquare-containerIcon ".concat(active ? 'cbx-iconButtonSquare-containerIcon-active' : '')
|
|
80
|
-
}, badge && /*#__PURE__*/_react.default.createElement("div", {
|
|
81
|
-
className: "cbx-iconButtonSquare-red-dot ".concat(text ? '' : 'cbx-iconButtonSquare-red-dot-noText')
|
|
82
|
-
}), icon), text && /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
83
|
-
variant: variant || 'XS',
|
|
84
|
-
color: active ? 'var(--primary)' : 'var(--gray3)',
|
|
85
|
-
fontWeight: fontWeight,
|
|
86
|
-
styles: {
|
|
87
|
-
overflow: 'hidden',
|
|
88
|
-
whiteSpace: 'nowrap',
|
|
89
|
-
textOverflow: 'ellipsis',
|
|
90
|
-
maxWidth: textVisibleMenuMobile ? '4.5rem' : '3.25rem'
|
|
91
|
-
}
|
|
92
|
-
}, text)))));
|
|
29
|
+
var sx = _ref.sx,
|
|
30
|
+
propPrefixClass = _ref.prefixClass,
|
|
31
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
32
|
+
|
|
33
|
+
var _useDynamicStyles = (0, _useDynamicStyles2.default)(sx),
|
|
34
|
+
dynamicPrefixClass = _useDynamicStyles.prefixClass;
|
|
35
|
+
|
|
36
|
+
var prefixClass = propPrefixClass || dynamicPrefixClass;
|
|
37
|
+
return /*#__PURE__*/_react.default.createElement(_IconButton.default, _extends({
|
|
38
|
+
prefixClass: prefixClass,
|
|
39
|
+
type: 'square'
|
|
40
|
+
}, props));
|
|
93
41
|
};
|
|
94
42
|
|
|
95
43
|
IconButtonSquare.displayName = "IconButtonSquare";
|
|
96
|
-
IconButtonSquare.propTypes = {
|
|
97
|
-
|
|
98
|
-
icon: _propTypes.default.node,
|
|
99
|
-
active: _propTypes.default.bool,
|
|
100
|
-
badge: _propTypes.default.bool,
|
|
101
|
-
onClick: _propTypes.default.func,
|
|
102
|
-
styles: _propTypes.default.object,
|
|
103
|
-
tooltip: _propTypes.default.string,
|
|
104
|
-
placementTooltip: _propTypes.default.string
|
|
105
|
-
};
|
|
106
|
-
IconButtonSquare.defaultProps = {
|
|
107
|
-
text: '',
|
|
108
|
-
icon: undefined,
|
|
109
|
-
active: false,
|
|
110
|
-
badge: false,
|
|
111
|
-
onClick: Function.prototype,
|
|
112
|
-
styles: {},
|
|
113
|
-
tooltip: '',
|
|
114
|
-
placementTooltip: 'bottom'
|
|
115
|
-
};
|
|
44
|
+
IconButtonSquare.propTypes = {};
|
|
45
|
+
IconButtonSquare.defaultProps = {};
|
|
116
46
|
var _default = IconButtonSquare;
|
|
117
47
|
exports.default = _default;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
.cbx-iconButtonSquare-red-dot {
|
|
2
|
+
position: absolute;
|
|
3
|
+
width: var(--spacing8);
|
|
4
|
+
height: var(--spacing8);
|
|
5
|
+
right: var(--spacing4);
|
|
6
|
+
top: 0.125rem;
|
|
7
|
+
border-radius: 50rem;
|
|
8
|
+
background: var(--error);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.cbx-iconButtonSquare-container.menuMobile .cbx-iconButtonSquare-red-dot {
|
|
12
|
+
right: -.625rem;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.cbx-iconButtonSquare-red-dot-noText {
|
|
16
|
+
right: -0.813rem;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.cbx-iconButtonSquare-containerIcon {
|
|
20
|
+
font-size: 1.5rem;
|
|
21
|
+
position: relative;
|
|
22
|
+
color: var(--gray3);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.cbx-iconButtonSquare-containerIcon-active {
|
|
26
|
+
color: var(--primary)
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.cbx-iconButtonSquare-container.menuMobile{
|
|
30
|
+
text-align: center;
|
|
31
|
+
display: flex;
|
|
32
|
+
align-items: center;
|
|
33
|
+
justify-content: center;
|
|
34
|
+
flex-direction: column;
|
|
35
|
+
width: 100%;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.cbx-iconButtonSquare-container.menuMobile .cbx-iconButtonSquare-containerIcon {
|
|
39
|
+
display: flex;
|
|
40
|
+
align-items: center;
|
|
41
|
+
width: 1.5rem;
|
|
42
|
+
height: 1.5rem;
|
|
43
|
+
}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
+
|
|
12
|
+
var _IconButton = _interopRequireDefault(require("@mui/material/IconButton"));
|
|
13
|
+
|
|
14
|
+
require("../../styles/main.css");
|
|
15
|
+
|
|
16
|
+
require("./IconButtonSquare.css");
|
|
17
|
+
|
|
18
|
+
var _TouchRipple = _interopRequireDefault(require("@mui/material/ButtonBase/TouchRipple"));
|
|
19
|
+
|
|
20
|
+
var _Tooltip = _interopRequireDefault(require("@mui/material/Tooltip"));
|
|
21
|
+
|
|
22
|
+
var _Typography = _interopRequireDefault(require("../Typography/Typography"));
|
|
23
|
+
|
|
24
|
+
var _excluded = ["text", "icon", "active", "badge", "onClick", "styles", "tooltip", "placementTooltip", "variant", "fontWeight", "textVisibleMenuMobile", "className", "stylesText", "stylesBadge", "disabled"];
|
|
25
|
+
|
|
26
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
27
|
+
|
|
28
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
29
|
+
|
|
30
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
31
|
+
|
|
32
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
33
|
+
|
|
34
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
35
|
+
|
|
36
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
37
|
+
|
|
38
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
39
|
+
|
|
40
|
+
var IconButtonSquare = function IconButtonSquare(_ref) {
|
|
41
|
+
var text = _ref.text,
|
|
42
|
+
icon = _ref.icon,
|
|
43
|
+
active = _ref.active,
|
|
44
|
+
badge = _ref.badge,
|
|
45
|
+
onClick = _ref.onClick,
|
|
46
|
+
styles = _ref.styles,
|
|
47
|
+
tooltip = _ref.tooltip,
|
|
48
|
+
placementTooltip = _ref.placementTooltip,
|
|
49
|
+
variant = _ref.variant,
|
|
50
|
+
fontWeight = _ref.fontWeight,
|
|
51
|
+
textVisibleMenuMobile = _ref.textVisibleMenuMobile,
|
|
52
|
+
className = _ref.className,
|
|
53
|
+
stylesText = _ref.stylesText,
|
|
54
|
+
stylesBadge = _ref.stylesBadge,
|
|
55
|
+
disabled = _ref.disabled,
|
|
56
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
57
|
+
|
|
58
|
+
var rippleRef = _react.default.useRef(null);
|
|
59
|
+
|
|
60
|
+
var onRippleStart = function onRippleStart(e) {
|
|
61
|
+
rippleRef.current.start(e);
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
var onRippleStop = function onRippleStop(e) {
|
|
65
|
+
rippleRef.current.stop(e);
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
return /*#__PURE__*/_react.default.createElement(_IconButton.default, _extends({
|
|
69
|
+
onMouseDown: onRippleStart,
|
|
70
|
+
onMouseUp: onRippleStop,
|
|
71
|
+
disableRipple: true,
|
|
72
|
+
className: className,
|
|
73
|
+
disabled: disabled,
|
|
74
|
+
sx: _objectSpread({
|
|
75
|
+
width: '4.75rem',
|
|
76
|
+
height: '4.75rem',
|
|
77
|
+
background: active ? 'white' : 'transparent',
|
|
78
|
+
borderRadius: '0',
|
|
79
|
+
'&:focus': {
|
|
80
|
+
outline: 'none!important'
|
|
81
|
+
},
|
|
82
|
+
padding: textVisibleMenuMobile && '8px 20px'
|
|
83
|
+
}, styles),
|
|
84
|
+
onClick: onClick
|
|
85
|
+
}, props), /*#__PURE__*/_react.default.createElement(_TouchRipple.default, {
|
|
86
|
+
ref: rippleRef,
|
|
87
|
+
center: false
|
|
88
|
+
}), /*#__PURE__*/_react.default.createElement(_Tooltip.default, {
|
|
89
|
+
title: tooltip || '',
|
|
90
|
+
placement: placementTooltip
|
|
91
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
92
|
+
className: "cbx-iconButtonSquare-container ".concat(textVisibleMenuMobile ? 'menuMobile' : '')
|
|
93
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
94
|
+
className: "cbx-iconButtonSquare-containerIcon ".concat(active ? 'cbx-iconButtonSquare-containerIcon-active' : '')
|
|
95
|
+
}, badge && /*#__PURE__*/_react.default.createElement("div", {
|
|
96
|
+
style: _objectSpread({}, stylesBadge),
|
|
97
|
+
className: "cbx-iconButtonSquare-red-dot ".concat(text ? '' : 'cbx-iconButtonSquare-red-dot-noText')
|
|
98
|
+
}), icon), text && /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
99
|
+
variant: variant || 'XS',
|
|
100
|
+
color: active ? 'var(--primary)' : 'var(--gray3)',
|
|
101
|
+
fontWeight: fontWeight,
|
|
102
|
+
styles: _objectSpread({
|
|
103
|
+
overflow: 'hidden',
|
|
104
|
+
whiteSpace: 'nowrap',
|
|
105
|
+
textOverflow: 'ellipsis',
|
|
106
|
+
maxWidth: textVisibleMenuMobile ? '4.5rem' : '3.25rem'
|
|
107
|
+
}, stylesText)
|
|
108
|
+
}, text)))));
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
IconButtonSquare.displayName = "IconButtonSquare";
|
|
112
|
+
IconButtonSquare.propTypes = {
|
|
113
|
+
text: _propTypes.default.any,
|
|
114
|
+
icon: _propTypes.default.node,
|
|
115
|
+
active: _propTypes.default.bool,
|
|
116
|
+
badge: _propTypes.default.bool,
|
|
117
|
+
onClick: _propTypes.default.func,
|
|
118
|
+
styles: _propTypes.default.object,
|
|
119
|
+
tooltip: _propTypes.default.string,
|
|
120
|
+
placementTooltip: _propTypes.default.string
|
|
121
|
+
};
|
|
122
|
+
IconButtonSquare.defaultProps = {
|
|
123
|
+
text: '',
|
|
124
|
+
icon: undefined,
|
|
125
|
+
active: false,
|
|
126
|
+
badge: false,
|
|
127
|
+
onClick: Function.prototype,
|
|
128
|
+
styles: {},
|
|
129
|
+
tooltip: '',
|
|
130
|
+
placementTooltip: 'bottom'
|
|
131
|
+
};
|
|
132
|
+
var _default = IconButtonSquare;
|
|
133
|
+
exports.default = _default;
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
.cbx-inputAutocomplete-icon-button {
|
|
2
|
+
opacity: 0;
|
|
3
|
+
transition: opacity 0.3s ease-in-out;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.cbx-inputAutocomplete-container:hover .cbx-inputAutocomplete-icon-button {
|
|
7
|
+
opacity: 1;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.cbx-inputText-container-disabled.cbx-inputText-container-select.cbx-inputText-container:after {
|
|
11
|
+
border-left: 0px solid transparent;
|
|
12
|
+
border-right: 0px solid transparent;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.cbx-input.cbx-inputText-select {
|
|
16
|
+
padding: 1.031rem 0.875rem;
|
|
17
|
+
min-height: 3.5rem;
|
|
18
|
+
padding-right: 2rem;
|
|
19
|
+
cursor: pointer;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.cbx-inputText-container-disabled .cbx-input.cbx-inputText-select {
|
|
23
|
+
cursor: auto;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.cbx-inputAutocomplete-container {
|
|
27
|
+
position: relative;
|
|
28
|
+
width: 15rem;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.cbx-inputAutocomplete-options-container {
|
|
32
|
+
background-color: rgb(255, 255, 255);
|
|
33
|
+
color: rgba(0, 0, 0, 0.87);
|
|
34
|
+
transition: box-shadow 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
|
|
35
|
+
border-radius: 0.25rem;
|
|
36
|
+
box-shadow: rgba(0, 0, 0, 0) 0px 5px 5px -3px, rgba(0, 0, 0, 0.30) 0px 2px 2px 0px, rgba(0, 0, 0, 0) 0px 3px 14px 2px;
|
|
37
|
+
position: absolute;
|
|
38
|
+
overflow: hidden auto;
|
|
39
|
+
min-width: 1rem;
|
|
40
|
+
min-height: 1rem;
|
|
41
|
+
max-height: calc(100% - 2rem);
|
|
42
|
+
max-width: calc(100% - 2rem);
|
|
43
|
+
outline: 0px;
|
|
44
|
+
opacity: 1;
|
|
45
|
+
transform: none;
|
|
46
|
+
min-width: 15rem;
|
|
47
|
+
transition: opacity 248ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, transform 165ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
|
|
48
|
+
transform-origin: 7.5rem 0px;
|
|
49
|
+
pointer-events: auto;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.cbx-inputAutocomplete-options-container.cbx-inputAutocomplete-options-container-open {
|
|
53
|
+
animation: dropdownOpen 150ms ease-out forwards;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.cbx-inputAutocomplete-options-container.cbx-inputAutocomplete-options-container-close {
|
|
57
|
+
animation: dropdownClose 150ms ease-out forwards;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.cbx-inputAutocomplete-presentation {
|
|
61
|
+
position: fixed;
|
|
62
|
+
z-index: var(--zIdxAutocomplete);
|
|
63
|
+
inset: 0px;
|
|
64
|
+
pointer-events: none;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.cbx-inputAutocomplete-options {
|
|
68
|
+
list-style: none;
|
|
69
|
+
margin: 0px;
|
|
70
|
+
padding: 0.5rem 0px;
|
|
71
|
+
position: relative;
|
|
72
|
+
outline: 0px;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.cbx-inputAutocomplete-backdrop {
|
|
76
|
+
position: fixed;
|
|
77
|
+
display: flex;
|
|
78
|
+
-webkit-box-align: center;
|
|
79
|
+
align-items: center;
|
|
80
|
+
-webkit-box-pack: center;
|
|
81
|
+
justify-content: center;
|
|
82
|
+
inset: 0px;
|
|
83
|
+
background-color: transparent;
|
|
84
|
+
-webkit-tap-highlight-color: transparent;
|
|
85
|
+
z-index: -1;
|
|
86
|
+
pointer-events: none;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
@keyframes dropdownOpen {
|
|
90
|
+
0% {
|
|
91
|
+
opacity: 0;
|
|
92
|
+
transform: scale(0.75, 0.5625);
|
|
93
|
+
}
|
|
94
|
+
100% {
|
|
95
|
+
opacity: 1;
|
|
96
|
+
transform: scale(1, 1);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
@keyframes dropdownClose {
|
|
101
|
+
0% {
|
|
102
|
+
opacity: 1;
|
|
103
|
+
transform: scale(1, 1);
|
|
104
|
+
}
|
|
105
|
+
100% {
|
|
106
|
+
opacity: 0;
|
|
107
|
+
transform: scale(0.75, 0.5625);
|
|
108
|
+
}
|
|
109
|
+
}
|