@councilbox/councilbox-ui 0.1.3 → 0.2.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/assets/img/cbxLogo.svg +15 -0
- package/dist/assets/img/cbxXs.svg +4 -0
- package/dist/assets/img/ovacXs.svg +7 -0
- package/dist/build-index.js +8 -0
- package/dist/components/Avatar/Avatar.css +5 -0
- package/dist/components/Avatar/Avatar.js +13 -17
- package/dist/components/AvatarGroup/AvatarGroup.css +3 -3
- package/dist/components/Button/Button.js +10 -9
- package/dist/components/Button/button.css +1 -1
- package/dist/components/ButtonBasic/ButtonBasic.js +25 -16
- package/dist/components/DrawerPanel/{DrawerPanelPrueba.js → DesignDrawerPanel.js} +17 -4
- package/dist/components/DrawerPanel/DrawerPanel.css +19 -0
- package/dist/components/DrawerPanel/DrawerPanel.js +59 -12
- package/dist/components/DrawerPanel/DrawerPanel.stories.js +9 -8
- package/dist/components/DropDown/DesignDropDown.stories.js +0 -15
- package/dist/components/DropDown/DropDown.css +3 -0
- package/dist/components/DropDown/DropDown.js +18 -10
- package/dist/components/DropDown/DropDown.stories.js +1 -10
- package/dist/components/Grid/DesignGrid.stories.js +46 -0
- package/dist/components/Grid/Grid.js +35 -5
- package/dist/components/Grid/Grid.stories.js +7 -12
- package/dist/components/Grid/GridItem.js +13 -15
- package/dist/components/Header/Header.js +163 -33
- package/dist/components/Header/Header.stories.js +42 -2
- package/dist/components/Header/header.css +30 -9
- package/dist/components/IconButton/DesignIconButton.stories.js +27 -0
- package/dist/components/IconButton/IconButton.js +45 -6
- package/dist/components/IconButton/IconButton.stories.js +11 -7
- package/dist/components/IconButtonSquare/DesignIconButtonSquare.stories.js +27 -0
- package/dist/components/IconButtonSquare/IconButtonSquare.css +23 -0
- package/dist/components/IconButtonSquare/IconButtonSquare.js +106 -0
- package/dist/components/IconButtonSquare/IconButtonSquare.stories.js +31 -0
- package/dist/components/InputPassword/InputPassword.css +2 -2
- package/dist/components/InputPassword/InputPassword.js +2 -2
- package/dist/components/InputText/InputText.css +3 -3
- package/dist/components/InputText/InputText.js +6 -6
- package/dist/components/MenuLateralRight/MenuLateralRight.css +80 -0
- package/dist/components/MenuLateralRight/MenuLateralRight.js +159 -4
- package/dist/components/MenuLateralRight/MenuLateralRight.stories.js +2 -6
- package/dist/components/Modal/Modal.js +11 -17
- package/dist/components/TextInput/TextInput.css +2 -2
- package/dist/components/TextInput/TextInput.js +18 -12
- package/dist/components/Typography/Typography.js +21 -21
- package/dist/styles/stylesheet.js +2 -2
- package/package.json +1 -1
- package/dist/components/Grid/DesignGrid.js +0 -21
|
@@ -9,10 +9,21 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
|
|
10
10
|
var _Header = _interopRequireDefault(require("./Header"));
|
|
11
11
|
|
|
12
|
+
var _cbxLogo = _interopRequireDefault(require("../../assets/img/cbxLogo.svg"));
|
|
13
|
+
|
|
14
|
+
var _cbxXs = _interopRequireDefault(require("../../assets/img/cbxXs.svg"));
|
|
15
|
+
|
|
16
|
+
var _ovacXs = _interopRequireDefault(require("../../assets/img/ovacXs.svg"));
|
|
17
|
+
|
|
12
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
19
|
|
|
14
20
|
var IMGS = {
|
|
15
|
-
cbx:
|
|
21
|
+
cbx: _cbxLogo.default,
|
|
22
|
+
noLogo: 'noLogo',
|
|
23
|
+
empty: ''
|
|
24
|
+
};
|
|
25
|
+
var IMGSXS = {
|
|
26
|
+
cbx: _cbxXs.default,
|
|
16
27
|
empty: ''
|
|
17
28
|
};
|
|
18
29
|
var IMGS2 = {
|
|
@@ -20,6 +31,10 @@ var IMGS2 = {
|
|
|
20
31
|
abanca: 'https://api.councilbox.com/subdomains/logo/abanca_logo.png',
|
|
21
32
|
empty: ''
|
|
22
33
|
};
|
|
34
|
+
var IMGS2XS = {
|
|
35
|
+
ovac: _ovacXs.default,
|
|
36
|
+
empty: ''
|
|
37
|
+
};
|
|
23
38
|
var _default = {
|
|
24
39
|
title: 'Example/Header',
|
|
25
40
|
component: _Header.default,
|
|
@@ -30,11 +45,33 @@ var _default = {
|
|
|
30
45
|
},
|
|
31
46
|
options: IMGS
|
|
32
47
|
},
|
|
48
|
+
logoLeftXS: {
|
|
49
|
+
control: {
|
|
50
|
+
type: 'select'
|
|
51
|
+
},
|
|
52
|
+
options: IMGSXS
|
|
53
|
+
},
|
|
33
54
|
logoRight: {
|
|
34
55
|
control: {
|
|
35
56
|
type: 'select'
|
|
36
57
|
},
|
|
37
58
|
options: IMGS2
|
|
59
|
+
},
|
|
60
|
+
logoRightXS: {
|
|
61
|
+
control: {
|
|
62
|
+
type: 'select'
|
|
63
|
+
},
|
|
64
|
+
options: IMGS2XS
|
|
65
|
+
},
|
|
66
|
+
sectionCenter: {
|
|
67
|
+
control: {
|
|
68
|
+
type: 'select'
|
|
69
|
+
},
|
|
70
|
+
options: {
|
|
71
|
+
info: true,
|
|
72
|
+
search: 'search',
|
|
73
|
+
empty: false
|
|
74
|
+
}
|
|
38
75
|
}
|
|
39
76
|
}
|
|
40
77
|
};
|
|
@@ -49,5 +86,8 @@ var HeaderAllButtons = Template.bind({});
|
|
|
49
86
|
exports.HeaderAllButtons = HeaderAllButtons;
|
|
50
87
|
_Header.default.args = {
|
|
51
88
|
logoLeft: '',
|
|
52
|
-
|
|
89
|
+
logoLeftXS: '',
|
|
90
|
+
logoRight: '',
|
|
91
|
+
logoRightXS: '',
|
|
92
|
+
sectionCenter: ''
|
|
53
93
|
};
|
|
@@ -6,7 +6,9 @@
|
|
|
6
6
|
border-bottom: 1px solid gainsboro;
|
|
7
7
|
background: white;
|
|
8
8
|
box-shadow: 0px 0.25rem 0.25rem rgba(0, 0, 0, 0.25);
|
|
9
|
-
padding: 0 var(--spacing16)
|
|
9
|
+
padding: 0 var(--spacing16);
|
|
10
|
+
position: relative;
|
|
11
|
+
z-index: 1;
|
|
10
12
|
}
|
|
11
13
|
|
|
12
14
|
.cbx-header-first-block {
|
|
@@ -20,13 +22,14 @@
|
|
|
20
22
|
.cbx-header-first-container-app-logo-empty,
|
|
21
23
|
.cbx-header-third-button-user-logo,
|
|
22
24
|
.cbx-header-third-container,
|
|
23
|
-
.cbx-header-third-button-container
|
|
25
|
+
.cbx-header-third-button-container,
|
|
26
|
+
.cbx-header-second-block-search,
|
|
27
|
+
.cbx-header-second-container-dropdown {
|
|
24
28
|
display: flex;
|
|
25
29
|
align-items: center;
|
|
26
30
|
}
|
|
27
31
|
|
|
28
|
-
.cbx-header-first-container-app-logo-empty span
|
|
29
|
-
.cbx-header-first-container-app-logo {
|
|
32
|
+
.cbx-header-first-container-app-logo-empty span {
|
|
30
33
|
margin-left: var(--spacing12);
|
|
31
34
|
}
|
|
32
35
|
|
|
@@ -35,13 +38,11 @@
|
|
|
35
38
|
font-size: 1.125rem;
|
|
36
39
|
}
|
|
37
40
|
|
|
38
|
-
.cbx-header-third-logo-right,
|
|
41
|
+
.cbx-header-third-logo-right,
|
|
42
|
+
.App-logo {
|
|
39
43
|
display: block;
|
|
40
|
-
/* rem aqui */
|
|
41
44
|
max-width: 7.813rem;
|
|
42
45
|
max-height: 2.5rem;
|
|
43
|
-
width: auto;
|
|
44
|
-
height: auto;
|
|
45
46
|
user-select: none;
|
|
46
47
|
}
|
|
47
48
|
|
|
@@ -100,7 +101,8 @@
|
|
|
100
101
|
}
|
|
101
102
|
|
|
102
103
|
.cbx-header-third-button-user,
|
|
103
|
-
.cbx-header-third-button-user-logo
|
|
104
|
+
.cbx-header-third-button-user-logo,
|
|
105
|
+
.cbx-header-second-block-search {
|
|
104
106
|
background: var(--gray1) !important
|
|
105
107
|
}
|
|
106
108
|
|
|
@@ -125,4 +127,23 @@
|
|
|
125
127
|
border-radius: 50%;
|
|
126
128
|
justify-content: center;
|
|
127
129
|
font-weight: 400;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.cbx-header-first-container-button-dropdown-left,
|
|
133
|
+
.cbx-header-second-container-dropdown-title
|
|
134
|
+
{
|
|
135
|
+
margin-right: var(--spacing12)
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.cbx-header-second-container-dropdown-icon {
|
|
139
|
+
display: flex;
|
|
140
|
+
font-size: 15px
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.cbx-header-second-container-input{
|
|
144
|
+
width: 100%
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.cbx-header-third-container-logo-right{
|
|
148
|
+
margin-right: var(--spacing4)
|
|
128
149
|
}
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
require("../../styles/main.css");
|
|
11
|
+
|
|
12
|
+
var _IconButton = _interopRequireDefault(require("./IconButton"));
|
|
13
|
+
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
|
|
16
|
+
var DesignIconButton = function DesignIconButton(_ref) {
|
|
17
|
+
var badge = _ref.badge;
|
|
18
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_IconButton.default, {
|
|
19
|
+
badge: badge,
|
|
20
|
+
icon: /*#__PURE__*/_react.default.createElement("i", {
|
|
21
|
+
className: "ri-user-3-line"
|
|
22
|
+
})
|
|
23
|
+
}));
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
var _default = DesignIconButton;
|
|
27
|
+
exports.default = _default;
|
|
@@ -11,11 +11,15 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
11
11
|
|
|
12
12
|
var _IconButton = _interopRequireDefault(require("@mui/material/IconButton"));
|
|
13
13
|
|
|
14
|
+
var _Badge = _interopRequireDefault(require("@mui/material/Badge"));
|
|
15
|
+
|
|
14
16
|
require("../../styles/main.css");
|
|
15
17
|
|
|
16
18
|
require("./IconButton.css");
|
|
17
19
|
|
|
18
|
-
var
|
|
20
|
+
var _Tooltip = _interopRequireDefault(require("@mui/material/Tooltip"));
|
|
21
|
+
|
|
22
|
+
var _excluded = ["id", "className", "onClick", "icon", "backgroundColor", "styles", "badge", "classNameBadge", "rounded", "tooltip"];
|
|
19
23
|
|
|
20
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
25
|
|
|
@@ -38,19 +42,50 @@ var IconButton = function IconButton(_ref) {
|
|
|
38
42
|
icon = _ref.icon,
|
|
39
43
|
backgroundColor = _ref.backgroundColor,
|
|
40
44
|
styles = _ref.styles,
|
|
45
|
+
badge = _ref.badge,
|
|
46
|
+
classNameBadge = _ref.classNameBadge,
|
|
47
|
+
rounded = _ref.rounded,
|
|
48
|
+
tooltip = _ref.tooltip,
|
|
41
49
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
42
50
|
|
|
51
|
+
var getIcon = function getIcon() {
|
|
52
|
+
return /*#__PURE__*/_react.default.createElement(_Tooltip.default, {
|
|
53
|
+
title: tooltip || ''
|
|
54
|
+
}, icon);
|
|
55
|
+
};
|
|
56
|
+
|
|
43
57
|
return /*#__PURE__*/_react.default.createElement(_IconButton.default, _extends({
|
|
44
58
|
id: id,
|
|
45
59
|
className: className,
|
|
46
60
|
onClick: onClick,
|
|
47
|
-
sx: _objectSpread({
|
|
61
|
+
sx: _objectSpread(_objectSpread({
|
|
48
62
|
width: 'var(--spacing40)',
|
|
49
63
|
height: 'var(--spacing40)',
|
|
50
|
-
fontSize: '
|
|
64
|
+
fontSize: 'var(--spacing20)',
|
|
51
65
|
background: backgroundColor
|
|
66
|
+
}, rounded ? {
|
|
67
|
+
border: '2px solid var(--primary)',
|
|
68
|
+
color: 'var(--primary)'
|
|
69
|
+
} : {}), {}, {
|
|
70
|
+
'&:focus': {
|
|
71
|
+
outline: 'none!important'
|
|
72
|
+
}
|
|
52
73
|
}, styles)
|
|
53
|
-
}, props),
|
|
74
|
+
}, props), badge ? /*#__PURE__*/_react.default.createElement(_Badge.default, {
|
|
75
|
+
badgeContent: Number.parseInt(badge, 10) || ' ',
|
|
76
|
+
variant: !Number.parseInt(badge, 10) && 'dot',
|
|
77
|
+
className: classNameBadge,
|
|
78
|
+
sx: {
|
|
79
|
+
'& .MuiBadge-dot': {
|
|
80
|
+
background: !Number.parseInt(badge, 10) && 'var(--error)!important',
|
|
81
|
+
right: '-0.5rem',
|
|
82
|
+
top: '-0.25rem'
|
|
83
|
+
},
|
|
84
|
+
'& .MuiBadge-badge ': {
|
|
85
|
+
background: 'var(--secondary)'
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}, getIcon()) : getIcon());
|
|
54
89
|
};
|
|
55
90
|
|
|
56
91
|
IconButton.displayName = "IconButton";
|
|
@@ -59,14 +94,18 @@ IconButton.propTypes = {
|
|
|
59
94
|
className: _propTypes.default.string,
|
|
60
95
|
onClick: _propTypes.default.func,
|
|
61
96
|
icon: _propTypes.default.node,
|
|
62
|
-
backgroundColor: _propTypes.default.string
|
|
97
|
+
backgroundColor: _propTypes.default.string,
|
|
98
|
+
badge: _propTypes.default.any,
|
|
99
|
+
tooltip: _propTypes.default.string
|
|
63
100
|
};
|
|
64
101
|
IconButton.defaultProps = {
|
|
65
102
|
id: '',
|
|
66
103
|
className: '',
|
|
67
104
|
onClick: Function.prototype,
|
|
68
105
|
icon: undefined,
|
|
69
|
-
backgroundColor: ''
|
|
106
|
+
backgroundColor: '',
|
|
107
|
+
badge: false,
|
|
108
|
+
tooltip: ''
|
|
70
109
|
};
|
|
71
110
|
var _default = IconButton;
|
|
72
111
|
exports.default = _default;
|
|
@@ -3,12 +3,14 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.default = exports.
|
|
6
|
+
exports.default = exports.DesignIconButtonTemplate = void 0;
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
10
10
|
var _IconButton = _interopRequireDefault(require("./IconButton"));
|
|
11
11
|
|
|
12
|
+
var _DesignIconButton = _interopRequireDefault(require("./DesignIconButton.stories"));
|
|
13
|
+
|
|
12
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
15
|
|
|
14
16
|
var _default = {
|
|
@@ -17,11 +19,13 @@ var _default = {
|
|
|
17
19
|
};
|
|
18
20
|
exports.default = _default;
|
|
19
21
|
|
|
20
|
-
var
|
|
21
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
22
|
+
var TemplateIconButton = function TemplateIconButton(args) {
|
|
23
|
+
return /*#__PURE__*/_react.default.createElement(_DesignIconButton.default, args);
|
|
22
24
|
};
|
|
23
25
|
|
|
24
|
-
|
|
25
|
-
var
|
|
26
|
-
exports.
|
|
27
|
-
|
|
26
|
+
TemplateIconButton.displayName = "TemplateIconButton";
|
|
27
|
+
var DesignIconButtonTemplate = TemplateIconButton.bind({});
|
|
28
|
+
exports.DesignIconButtonTemplate = DesignIconButtonTemplate;
|
|
29
|
+
DesignIconButtonTemplate.parameters = {// controls: { disable: true },
|
|
30
|
+
};
|
|
31
|
+
DesignIconButtonTemplate.args = {};
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
require("../../styles/main.css");
|
|
11
|
+
|
|
12
|
+
var _IconButtonSquare = _interopRequireDefault(require("./IconButtonSquare"));
|
|
13
|
+
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
|
|
16
|
+
var DesignIconButtonSquare = function DesignIconButtonSquare(_ref) {
|
|
17
|
+
var badge = _ref.badge;
|
|
18
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_IconButtonSquare.default, {
|
|
19
|
+
badge: badge,
|
|
20
|
+
icon: /*#__PURE__*/_react.default.createElement("i", {
|
|
21
|
+
className: "ri-user-3-line"
|
|
22
|
+
})
|
|
23
|
+
}));
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
var _default = DesignIconButtonSquare;
|
|
27
|
+
exports.default = _default;
|
|
@@ -0,0 +1,23 @@
|
|
|
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: #ff3200;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.cbx-iconButtonSquare-red-dot-noText {
|
|
12
|
+
right: -0.813rem;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.cbx-iconButtonSquare-containerIcon {
|
|
16
|
+
font-size: 1.125rem;
|
|
17
|
+
position: relative;
|
|
18
|
+
color: var(--gray3)
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.cbx-iconButtonSquare-containerIcon-active {
|
|
22
|
+
color: var(--primary)
|
|
23
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
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
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
|
+
|
|
26
|
+
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; }
|
|
27
|
+
|
|
28
|
+
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; }
|
|
29
|
+
|
|
30
|
+
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; }
|
|
31
|
+
|
|
32
|
+
var IconButtonSquare = function IconButtonSquare(_ref) {
|
|
33
|
+
var text = _ref.text,
|
|
34
|
+
icon = _ref.icon,
|
|
35
|
+
active = _ref.active,
|
|
36
|
+
badge = _ref.badge,
|
|
37
|
+
onClick = _ref.onClick,
|
|
38
|
+
styles = _ref.styles,
|
|
39
|
+
tooltip = _ref.tooltip;
|
|
40
|
+
|
|
41
|
+
var rippleRef = _react.default.useRef(null);
|
|
42
|
+
|
|
43
|
+
var onRippleStart = function onRippleStart(e) {
|
|
44
|
+
rippleRef.current.start(e);
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
var onRippleStop = function onRippleStop(e) {
|
|
48
|
+
rippleRef.current.stop(e);
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
return /*#__PURE__*/_react.default.createElement(_IconButton.default, {
|
|
52
|
+
onMouseDown: onRippleStart,
|
|
53
|
+
onMouseUp: onRippleStop,
|
|
54
|
+
disableRipple: true,
|
|
55
|
+
sx: _objectSpread({
|
|
56
|
+
width: '4.75rem',
|
|
57
|
+
height: '4.75rem',
|
|
58
|
+
background: active ? 'white' : 'transparent',
|
|
59
|
+
borderRadius: '0',
|
|
60
|
+
'&:focus': {
|
|
61
|
+
outline: 'none!important'
|
|
62
|
+
}
|
|
63
|
+
}, styles),
|
|
64
|
+
onClick: onClick
|
|
65
|
+
}, /*#__PURE__*/_react.default.createElement(_TouchRipple.default, {
|
|
66
|
+
ref: rippleRef,
|
|
67
|
+
center: false
|
|
68
|
+
}), /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_Tooltip.default, {
|
|
69
|
+
title: tooltip || ''
|
|
70
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
71
|
+
className: "cbx-iconButtonSquare-containerIcon ".concat(active ? 'cbx-iconButtonSquare-containerIcon-active' : '')
|
|
72
|
+
}, badge && /*#__PURE__*/_react.default.createElement("div", {
|
|
73
|
+
className: "cbx-iconButtonSquare-red-dot ".concat(text ? '' : 'cbx-iconButtonSquare-red-dot-noText')
|
|
74
|
+
}), icon)), text && /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
75
|
+
variant: 'XS',
|
|
76
|
+
color: active ? 'var(--primary)' : 'var(--gray3)',
|
|
77
|
+
styles: {
|
|
78
|
+
overflow: 'hidden',
|
|
79
|
+
whiteSpace: 'nowrap',
|
|
80
|
+
textOverflow: 'ellipsis',
|
|
81
|
+
maxWidth: '3.25rem'
|
|
82
|
+
}
|
|
83
|
+
}, text))));
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
IconButtonSquare.displayName = "IconButtonSquare";
|
|
87
|
+
IconButtonSquare.propTypes = {
|
|
88
|
+
text: _propTypes.default.any,
|
|
89
|
+
icon: _propTypes.default.node,
|
|
90
|
+
active: _propTypes.default.bool,
|
|
91
|
+
badge: _propTypes.default.bool,
|
|
92
|
+
onClick: _propTypes.default.func,
|
|
93
|
+
styles: _propTypes.default.object,
|
|
94
|
+
tooltip: _propTypes.default.string
|
|
95
|
+
};
|
|
96
|
+
IconButtonSquare.defaultProps = {
|
|
97
|
+
text: '',
|
|
98
|
+
icon: undefined,
|
|
99
|
+
active: false,
|
|
100
|
+
badge: false,
|
|
101
|
+
onClick: Function.prototype,
|
|
102
|
+
styles: {},
|
|
103
|
+
tooltip: ''
|
|
104
|
+
};
|
|
105
|
+
var _default = IconButtonSquare;
|
|
106
|
+
exports.default = _default;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.DesignIconButtonSquareTemplate = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _IconButtonSquare = _interopRequireDefault(require("./IconButtonSquare"));
|
|
11
|
+
|
|
12
|
+
var _DesignIconButtonSquare = _interopRequireDefault(require("./DesignIconButtonSquare.stories"));
|
|
13
|
+
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
|
|
16
|
+
var _default = {
|
|
17
|
+
title: 'Example/IconButtonSquare',
|
|
18
|
+
component: _IconButtonSquare.default
|
|
19
|
+
};
|
|
20
|
+
exports.default = _default;
|
|
21
|
+
|
|
22
|
+
var TemplateIconButtonSquare = function TemplateIconButtonSquare(args) {
|
|
23
|
+
return /*#__PURE__*/_react.default.createElement(_DesignIconButtonSquare.default, args);
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
TemplateIconButtonSquare.displayName = "TemplateIconButtonSquare";
|
|
27
|
+
var DesignIconButtonSquareTemplate = TemplateIconButtonSquare.bind({});
|
|
28
|
+
exports.DesignIconButtonSquareTemplate = DesignIconButtonSquareTemplate;
|
|
29
|
+
DesignIconButtonSquareTemplate.parameters = {// controls: { disable: true },
|
|
30
|
+
};
|
|
31
|
+
DesignIconButtonSquareTemplate.args = {};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
width: 100%;
|
|
3
3
|
background: #DBDBDB;
|
|
4
4
|
height: var(--spacing8);
|
|
5
|
-
border-radius:
|
|
5
|
+
border-radius: 1.25rem;
|
|
6
6
|
margin-top: var(--spacing4);
|
|
7
7
|
margin-bottom: var(--spacing4);
|
|
8
8
|
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
.cbx-inputPassword-validation > div {
|
|
12
12
|
height: var(--spacing8);
|
|
13
|
-
border-radius:
|
|
13
|
+
border-radius: 1.25rem;
|
|
14
14
|
transition: all .5s;
|
|
15
15
|
}
|
|
16
16
|
|
|
@@ -132,7 +132,7 @@ InputPassword.propTypes = {
|
|
|
132
132
|
className: _propTypes.default.string,
|
|
133
133
|
onChange: _propTypes.default.func,
|
|
134
134
|
disabled: _propTypes.default.bool,
|
|
135
|
-
error: _propTypes.default.
|
|
135
|
+
error: _propTypes.default.node,
|
|
136
136
|
validation: _propTypes.default.bool,
|
|
137
137
|
percentageError: _propTypes.default.number
|
|
138
138
|
};
|
|
@@ -144,7 +144,7 @@ InputPassword.defaultProps = {
|
|
|
144
144
|
className: '',
|
|
145
145
|
onChange: undefined,
|
|
146
146
|
disabled: false,
|
|
147
|
-
error:
|
|
147
|
+
error: undefined,
|
|
148
148
|
validation: false,
|
|
149
149
|
percentageError: 0
|
|
150
150
|
};
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
}
|
|
5
5
|
.cbx-inputText-infoBtn {
|
|
6
6
|
margin-right: var(--spacing4);
|
|
7
|
-
height:
|
|
7
|
+
height: 0.875rem;
|
|
8
8
|
line-height: 1.1;
|
|
9
|
-
font-size:
|
|
9
|
+
font-size: 0.875rem;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
.cbx-inputText-endAdornment {
|
|
@@ -14,5 +14,5 @@
|
|
|
14
14
|
margin-top: var(--spacing12);
|
|
15
15
|
margin-bottom: var(--spacing12);
|
|
16
16
|
color: var(--success);
|
|
17
|
-
font-size:
|
|
17
|
+
font-size: 1.188rem;
|
|
18
18
|
}
|
|
@@ -47,13 +47,13 @@ var CssTextField = (0, _styled.default)(_TextField.default)(function () {
|
|
|
47
47
|
marginRight: '0px'
|
|
48
48
|
},
|
|
49
49
|
'& .MuiInputBase-input': {
|
|
50
|
-
height: '
|
|
50
|
+
height: '1.5rem',
|
|
51
51
|
lineHeight: 'var(--spacing12)',
|
|
52
52
|
padding: 'var(--spacing12)',
|
|
53
53
|
paddingRight: 'var(--spacing8)'
|
|
54
54
|
},
|
|
55
55
|
'& .MuiFormLabel-root': {
|
|
56
|
-
top: '-
|
|
56
|
+
top: '-0.25rem'
|
|
57
57
|
},
|
|
58
58
|
'& .Mui-error': {
|
|
59
59
|
color: 'var(--error)'
|
|
@@ -157,8 +157,8 @@ var InputText = function InputText(_ref) {
|
|
|
157
157
|
id: id,
|
|
158
158
|
className: className,
|
|
159
159
|
sx: {
|
|
160
|
-
minWidth: width || '
|
|
161
|
-
height: '
|
|
160
|
+
minWidth: width || '15rem',
|
|
161
|
+
height: '3rem'
|
|
162
162
|
},
|
|
163
163
|
label: label,
|
|
164
164
|
fullWidth: fullWidth,
|
|
@@ -198,7 +198,7 @@ InputText.propTypes = {
|
|
|
198
198
|
className: _propTypes.default.string,
|
|
199
199
|
onChange: _propTypes.default.func,
|
|
200
200
|
disabled: _propTypes.default.bool,
|
|
201
|
-
error: _propTypes.default.
|
|
201
|
+
error: _propTypes.default.node,
|
|
202
202
|
success: _propTypes.default.bool
|
|
203
203
|
};
|
|
204
204
|
InputText.defaultProps = {
|
|
@@ -209,7 +209,7 @@ InputText.defaultProps = {
|
|
|
209
209
|
className: '',
|
|
210
210
|
onChange: undefined,
|
|
211
211
|
disabled: false,
|
|
212
|
-
error:
|
|
212
|
+
error: undefined
|
|
213
213
|
};
|
|
214
214
|
var _default = InputText;
|
|
215
215
|
exports.default = _default;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
.cbx-menuLateralRight-block {
|
|
2
|
+
height: 100%;
|
|
3
|
+
min-width: 4.75rem;
|
|
4
|
+
width: 4.75rem;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.cbx-menuLateralRight-block-resize {
|
|
8
|
+
min-width: var(--spacing64);
|
|
9
|
+
width: var(--spacing64);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.cbx-menuLateralRight-block,
|
|
13
|
+
.cbx-menuLateralRight-block-mobile {
|
|
14
|
+
position: relative;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.cbx-menuLateralRight-block-mobile {
|
|
18
|
+
height: var(--spacing64);
|
|
19
|
+
min-width: 100%;
|
|
20
|
+
width: 100%;
|
|
21
|
+
justify-content: space-between;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.cbx-menuLateralRight-block,
|
|
25
|
+
.cbx-menuLateralRight-block-mobile {
|
|
26
|
+
background: var(--gray1);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.cbx-menuLateralRight-block-mobile,
|
|
30
|
+
.cbx-menuLateralRight-block-upper-mobile,
|
|
31
|
+
.cbx-menuLateralRight-icon-burguer-mobile,
|
|
32
|
+
.cbx-menuLateralRight-block-under-mobile,
|
|
33
|
+
.cbx-menuLateralRight-container-under,
|
|
34
|
+
.cbx-menuLateralRight-container-under-mobile {
|
|
35
|
+
display: flex;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.cbx-menuLateralRight-block-upper-mobile,
|
|
39
|
+
.cbx-menuLateralRight-block-mobile,
|
|
40
|
+
.cbx-menuLateralRight-block-under-mobile {
|
|
41
|
+
align-items: center;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.cbx-menuLateralRight-block-under {
|
|
45
|
+
bottom: 0;
|
|
46
|
+
left: 0;
|
|
47
|
+
width: 100%;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.cbx-menuLateralRight-block-under,
|
|
51
|
+
.cbx-menuLateralRight-icon-burguer-mobile-red-dot {
|
|
52
|
+
position: absolute;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.cbx-menuLateralRight-icon-burguer-mobile {
|
|
56
|
+
font-size: 1.125rem;
|
|
57
|
+
margin-right: var(--spacing8);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.cbx-menuLateralRight-container-under {
|
|
61
|
+
margin-bottom: var(--spacing12);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.cbx-menuLateralRight-container-under,
|
|
65
|
+
.cbx-menuLateralRight-container-under-mobile {
|
|
66
|
+
justify-content: center;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.cbx-menuLateralRight-container-under-mobile {
|
|
70
|
+
margin-right: var(--spacing12);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.cbx-menuLateralRight-icon-burguer-mobile-red-dot {
|
|
74
|
+
width: var(--spacing8);
|
|
75
|
+
height: var(--spacing8);
|
|
76
|
+
top: -0.188rem;
|
|
77
|
+
right: -0.438rem;
|
|
78
|
+
border-radius: 50rem;
|
|
79
|
+
background: #ff3200;
|
|
80
|
+
}
|