@councilbox/councilbox-ui 0.6.20 → 0.6.22
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/components/1.Introduction.stories.mdx +1 -1
- package/dist/components/2.Changelog.stories.mdx +7 -0
- package/dist/components/Header/Header.js +61 -10
- package/dist/components/Header/header.css +24 -12
- package/dist/components/InputAutocomplete/InputAutocomplete.css +0 -5
- package/dist/components/InputAutocomplete/InputAutocomplete.js +7 -19
- package/dist/components/MenuItem/MenuItem.css +6 -0
- package/dist/components/MenuItem/MenuItem.js +6 -4
- package/package.json +1 -1
|
@@ -24,6 +24,13 @@ a.noStyles:hover{
|
|
|
24
24
|
<h2>v0.5.4</h2>
|
|
25
25
|
<div>Fix zIndex label InputText y SelectInput</div>
|
|
26
26
|
</div>
|
|
27
|
+
<h2>v0.6.22</h2>
|
|
28
|
+
<div>Add tooltip en el bloque cbx-header-third-container del header</div>
|
|
29
|
+
|
|
30
|
+
<h2>v0.6.21</h2>
|
|
31
|
+
<div>Fix fullwidth de los menuItems en los Autocomplete</div>
|
|
32
|
+
<div>Añadido nuevo boton a la derecha en el header</div>
|
|
33
|
+
|
|
27
34
|
<h2>v0.6.20</h2>
|
|
28
35
|
<div>Fix posicion del value en el SelectInput</div>
|
|
29
36
|
|
|
@@ -11,6 +11,8 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
11
11
|
|
|
12
12
|
var _InputBase = _interopRequireDefault(require("@mui/material/InputBase"));
|
|
13
13
|
|
|
14
|
+
var _Tooltip = _interopRequireDefault(require("@mui/material/Tooltip"));
|
|
15
|
+
|
|
14
16
|
var _Typography = _interopRequireDefault(require("../Typography/Typography"));
|
|
15
17
|
|
|
16
18
|
var _ButtonBasic = _interopRequireDefault(require("../ButtonBasic/ButtonBasic"));
|
|
@@ -76,7 +78,15 @@ var Header = function Header(_ref) {
|
|
|
76
78
|
sectionCenterInputBaseProps = _ref.sectionCenterInputBaseProps,
|
|
77
79
|
iconButtonRightProps = _ref.iconButtonRightProps,
|
|
78
80
|
itemsDropDownUserProps = _ref.itemsDropDownUserProps,
|
|
79
|
-
demoMode = _ref.demoMode
|
|
81
|
+
demoMode = _ref.demoMode,
|
|
82
|
+
onClickButtonNotification = _ref.onClickButtonNotification,
|
|
83
|
+
buttonNotificationIcon = _ref.buttonNotificationIcon,
|
|
84
|
+
buttonNotificationProps = _ref.buttonNotificationProps,
|
|
85
|
+
buttonNotificationBadge = _ref.buttonNotificationBadge,
|
|
86
|
+
styleIconButtonRightContainer = _ref.styleIconButtonRightContainer,
|
|
87
|
+
styleIconButtonRight = _ref.styleIconButtonRight,
|
|
88
|
+
placementTooltipThirdDropdownUser = _ref.placementTooltipThirdDropdownUser,
|
|
89
|
+
tooltipThirdDropdownUser = _ref.tooltipThirdDropdownUser;
|
|
80
90
|
|
|
81
91
|
var _useWindowSize = (0, _useWindowSize2.default)(),
|
|
82
92
|
innerWidth = _useWindowSize.innerWidth,
|
|
@@ -317,7 +327,18 @@ var Header = function Header(_ref) {
|
|
|
317
327
|
}
|
|
318
328
|
}, "DEMO"), logoAndDropdownSeparate ? /*#__PURE__*/_react.default.createElement("div", {
|
|
319
329
|
className: "cbx-header-third-container"
|
|
320
|
-
},
|
|
330
|
+
}, !!onClickButtonNotification && /*#__PURE__*/_react.default.createElement("div", {
|
|
331
|
+
className: "cbx-header-third-button-notification-container"
|
|
332
|
+
}, /*#__PURE__*/_react.default.createElement(_IconButton.default, _extends({
|
|
333
|
+
"aria-label": "",
|
|
334
|
+
id: 'cbx-header-third-button-notification',
|
|
335
|
+
className: "cbx-header-third-button-notification",
|
|
336
|
+
onClick: onClickButtonNotification,
|
|
337
|
+
icon: buttonNotificationIcon || /*#__PURE__*/_react.default.createElement("i", {
|
|
338
|
+
className: "ri-notification-3-line"
|
|
339
|
+
}),
|
|
340
|
+
badge: buttonNotificationBadge
|
|
341
|
+
}, buttonNotificationProps))), (logoRight || logoRightXS) && (!itemsDropDownUser || iconButtonRight) && /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("img", {
|
|
321
342
|
id: 'cbx-header-third-logo-right',
|
|
322
343
|
className: "cbx-header-third-logo-right",
|
|
323
344
|
src: innerWidth < breakpoints.md ? logoRightXS || logoRight : logoRight,
|
|
@@ -353,8 +374,10 @@ var Header = function Header(_ref) {
|
|
|
353
374
|
"aria-label": "",
|
|
354
375
|
id: 'cbx-header-third-button-user',
|
|
355
376
|
className: "cbx-header-third-button-user cbx-header-button",
|
|
377
|
+
styles: _objectSpread({}, styleIconButtonRightContainer),
|
|
356
378
|
icon: iconButtonRight || /*#__PURE__*/_react.default.createElement("i", {
|
|
357
|
-
className: "ri-user-3-line"
|
|
379
|
+
className: "ri-user-3-line",
|
|
380
|
+
style: _objectSpread({}, styleIconButtonRight)
|
|
358
381
|
})
|
|
359
382
|
}, iconButtonRightProps)), (logoRight || logoRightXS) && !iconButtonRight && /*#__PURE__*/_react.default.createElement("img", {
|
|
360
383
|
style: {
|
|
@@ -367,7 +390,20 @@ var Header = function Header(_ref) {
|
|
|
367
390
|
}));
|
|
368
391
|
},
|
|
369
392
|
items: itemsDropDownUser
|
|
370
|
-
}, itemsDropDownUserProps)))) : /*#__PURE__*/_react.default.createElement("div",
|
|
393
|
+
}, itemsDropDownUserProps)))) : /*#__PURE__*/_react.default.createElement("div", {
|
|
394
|
+
className: "cbx-header-third-container"
|
|
395
|
+
}, !!onClickButtonNotification && /*#__PURE__*/_react.default.createElement("div", {
|
|
396
|
+
className: "cbx-header-third-button-notification-container-noSeparate"
|
|
397
|
+
}, /*#__PURE__*/_react.default.createElement(_IconButton.default, _extends({
|
|
398
|
+
"aria-label": "",
|
|
399
|
+
id: 'cbx-header-third-button-notification',
|
|
400
|
+
className: "cbx-header-third-button-notification",
|
|
401
|
+
onClick: onClickButtonNotification,
|
|
402
|
+
icon: buttonNotificationIcon || /*#__PURE__*/_react.default.createElement("i", {
|
|
403
|
+
className: "ri-notification-3-line"
|
|
404
|
+
}),
|
|
405
|
+
badge: buttonNotificationBadge
|
|
406
|
+
}, buttonNotificationProps))), /*#__PURE__*/_react.default.createElement(_DropDown.default, _extends({
|
|
371
407
|
color: "transparent",
|
|
372
408
|
anchorOrigin: {
|
|
373
409
|
vertical: 'bottom',
|
|
@@ -378,7 +414,10 @@ var Header = function Header(_ref) {
|
|
|
378
414
|
horizontal: 'right'
|
|
379
415
|
},
|
|
380
416
|
Component: function Component() {
|
|
381
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
417
|
+
return /*#__PURE__*/_react.default.createElement(_Tooltip.default, {
|
|
418
|
+
title: tooltipThirdDropdownUser || '',
|
|
419
|
+
placement: placementTooltipThirdDropdownUser
|
|
420
|
+
}, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_ButtonBasic.default, _extends({
|
|
382
421
|
id: 'cbx-header-third-dropdown-user',
|
|
383
422
|
variant: 'tertiary',
|
|
384
423
|
style: {
|
|
@@ -394,11 +433,13 @@ var Header = function Header(_ref) {
|
|
|
394
433
|
src: innerWidth < breakpoints.md ? logoRightXS || logoRight : logoRight,
|
|
395
434
|
alt: "logo"
|
|
396
435
|
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
397
|
-
className: "cbx-header-third-button-user-logo "
|
|
436
|
+
className: "cbx-header-third-button-user-logo ",
|
|
437
|
+
style: _objectSpread({}, styleIconButtonRightContainer)
|
|
398
438
|
}, iconButtonRight || /*#__PURE__*/_react.default.createElement("i", {
|
|
399
|
-
className: "ri-user-3-line"
|
|
439
|
+
className: "ri-user-3-line",
|
|
440
|
+
style: _objectSpread({}, styleIconButtonRight)
|
|
400
441
|
})))
|
|
401
|
-
}, iconButtonRightProps));
|
|
442
|
+
}, iconButtonRightProps))));
|
|
402
443
|
},
|
|
403
444
|
items: itemsDropDownUser
|
|
404
445
|
}, itemsDropDownUserProps)))));
|
|
@@ -433,7 +474,12 @@ Header.propTypes = {
|
|
|
433
474
|
finishButtonVariant: _propTypes.default.node,
|
|
434
475
|
finishButtonIcon: _propTypes.default.node,
|
|
435
476
|
actionLogoLeft: _propTypes.default.func,
|
|
436
|
-
demoMode: _propTypes.default.bool
|
|
477
|
+
demoMode: _propTypes.default.bool,
|
|
478
|
+
buttonNotificationIcon: _propTypes.default.any,
|
|
479
|
+
buttonNotificationProps: _propTypes.default.any,
|
|
480
|
+
buttonNotificationBadge: _propTypes.default.bool,
|
|
481
|
+
tooltipThirdDropdownUser: _propTypes.default.string,
|
|
482
|
+
placementTooltipThirdDropdownUser: _propTypes.default.string
|
|
437
483
|
};
|
|
438
484
|
Header.defaultProps = {
|
|
439
485
|
back: '',
|
|
@@ -463,7 +509,12 @@ Header.defaultProps = {
|
|
|
463
509
|
dropdownLeftIcon: '',
|
|
464
510
|
finishButtonVariant: '',
|
|
465
511
|
finishButtonIcon: '',
|
|
466
|
-
demoMode: false
|
|
512
|
+
demoMode: false,
|
|
513
|
+
buttonNotificationIcon: undefined,
|
|
514
|
+
buttonNotificationProps: undefined,
|
|
515
|
+
buttonNotificationBadge: false,
|
|
516
|
+
tooltipThirdDropdownUser: '',
|
|
517
|
+
placementTooltipThirdDropdownUser: 'bottom'
|
|
467
518
|
};
|
|
468
519
|
var _default = Header;
|
|
469
520
|
exports.default = _default;
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
.cbx-header-third-logo-right,
|
|
42
42
|
.App-logo-header-ui {
|
|
43
43
|
display: block;
|
|
44
|
-
max-width: 7.813rem!important;
|
|
45
|
-
max-height: 2.5rem!important;
|
|
44
|
+
max-width: 7.813rem !important;
|
|
45
|
+
max-height: 2.5rem !important;
|
|
46
46
|
user-select: none;
|
|
47
47
|
}
|
|
48
48
|
|
|
@@ -101,11 +101,14 @@
|
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
.cbx-header-third-button-user,
|
|
104
|
-
.cbx-header-third-button-user-logo,
|
|
105
104
|
.cbx-header-second-block-search {
|
|
106
105
|
background: var(--gray1) !important
|
|
107
106
|
}
|
|
108
107
|
|
|
108
|
+
.cbx-header-third-button-user-logo{
|
|
109
|
+
background: var(--gray1);
|
|
110
|
+
}
|
|
111
|
+
|
|
109
112
|
.cbx-header-button,
|
|
110
113
|
.cbx-header-first-app-logo-empty,
|
|
111
114
|
.cbx-header-third-button-user-logo {
|
|
@@ -114,14 +117,14 @@
|
|
|
114
117
|
}
|
|
115
118
|
|
|
116
119
|
.cbx-header-first-app-logo-empty {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
120
|
+
background: var(--primary);
|
|
121
|
+
border-radius: 50%;
|
|
122
|
+
color: var(--white);
|
|
123
|
+
display: flex;
|
|
124
|
+
align-items: center;
|
|
125
|
+
justify-content: center;
|
|
126
|
+
font-size: 1.375rem;
|
|
127
|
+
min-width: var(--spacing40);
|
|
125
128
|
}
|
|
126
129
|
|
|
127
130
|
.cbx-header-button {
|
|
@@ -156,4 +159,13 @@
|
|
|
156
159
|
|
|
157
160
|
.cbx-header-third-container-logo-right {
|
|
158
161
|
margin-right: var(--spacing4)
|
|
159
|
-
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.cbx-header-third-button-notification-container {
|
|
165
|
+
margin-right: 2rem;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.cbx-header-third-button-notification i {
|
|
169
|
+
color: var(--primary);
|
|
170
|
+
font-size: 1.125rem;
|
|
171
|
+
}
|
|
@@ -7,16 +7,12 @@ exports.default = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
10
|
-
var _reactDom = require("react-dom");
|
|
11
|
-
|
|
12
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
11
|
|
|
14
12
|
require("../../styles/main.css");
|
|
15
13
|
|
|
16
14
|
var _Autocomplete = _interopRequireDefault(require("@mui/material/Autocomplete"));
|
|
17
15
|
|
|
18
|
-
var _Popper = _interopRequireDefault(require("@mui/material/Popper"));
|
|
19
|
-
|
|
20
16
|
require("./InputAutocomplete.css");
|
|
21
17
|
|
|
22
18
|
var _InputText = _interopRequireDefault(require("../InputText/InputText"));
|
|
@@ -82,7 +78,7 @@ var InputAutocomplete = function InputAutocomplete(_ref) {
|
|
|
82
78
|
|
|
83
79
|
return /*#__PURE__*/_react.default.createElement(_Autocomplete.default, _extends({
|
|
84
80
|
id: id,
|
|
85
|
-
className: className,
|
|
81
|
+
className: "".concat(className || ''),
|
|
86
82
|
onChange: onChange,
|
|
87
83
|
disabled: disabled,
|
|
88
84
|
sx: _objectSpread({
|
|
@@ -96,9 +92,11 @@ var InputAutocomplete = function InputAutocomplete(_ref) {
|
|
|
96
92
|
},
|
|
97
93
|
'&.MuiAutocomplete-root .MuiInput-root': {
|
|
98
94
|
paddingBottom: '0!important'
|
|
95
|
+
},
|
|
96
|
+
'&.MuiAutocomplete-root .MuiAutocomplete-inputRoot .MuiAutocomplete-input': {
|
|
97
|
+
paddingRight: '2.5rem!important'
|
|
99
98
|
}
|
|
100
99
|
}, sx),
|
|
101
|
-
disablePortal: false,
|
|
102
100
|
freeSolo: true,
|
|
103
101
|
options: top100Films,
|
|
104
102
|
renderInput: function renderInput(params) {
|
|
@@ -116,19 +114,9 @@ var InputAutocomplete = function InputAutocomplete(_ref) {
|
|
|
116
114
|
}));
|
|
117
115
|
},
|
|
118
116
|
renderOption: function renderOption(propsOption) {
|
|
119
|
-
return /*#__PURE__*/_react.default.createElement(_MenuItem.default,
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
return /*#__PURE__*/(0, _reactDom.createPortal)( /*#__PURE__*/_react.default.createElement(_Popper.default, _extends({
|
|
123
|
-
className: fullWidth ? 'cbx-inputAutocomplete-fullwidth' : '',
|
|
124
|
-
sx: {
|
|
125
|
-
'&.MuiPopper-root': {
|
|
126
|
-
minWidth: fullWidth ? 'auto' : '13.75rem!important',
|
|
127
|
-
maxWidth: fullWidth ? 'auto' : '17.5rem!important',
|
|
128
|
-
width: fullWidth ? 'auto' : 'auto!important'
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
}, propsPopper)), document.body);
|
|
117
|
+
return /*#__PURE__*/_react.default.createElement(_MenuItem.default, _extends({
|
|
118
|
+
fullWidth: fullWidth
|
|
119
|
+
}, propsOption), propsOption.key);
|
|
132
120
|
}
|
|
133
121
|
}, props));
|
|
134
122
|
};
|
|
@@ -19,7 +19,7 @@ var _Typography = _interopRequireDefault(require("../Typography/Typography"));
|
|
|
19
19
|
|
|
20
20
|
var _DropDown = _interopRequireDefault(require("../DropDown/DropDown"));
|
|
21
21
|
|
|
22
|
-
var _excluded = ["id", "children", "icon", "sx", "badge", "menuItems", "setOpen", "onClick", "endIcon", "className"];
|
|
22
|
+
var _excluded = ["id", "children", "icon", "sx", "badge", "menuItems", "setOpen", "onClick", "endIcon", "className", "fullWidth"];
|
|
23
23
|
|
|
24
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
25
|
|
|
@@ -46,6 +46,7 @@ var MenuItem = function MenuItem(_ref) {
|
|
|
46
46
|
onClick = _ref.onClick,
|
|
47
47
|
endIcon = _ref.endIcon,
|
|
48
48
|
className = _ref.className,
|
|
49
|
+
fullWidth = _ref.fullWidth,
|
|
49
50
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
50
51
|
|
|
51
52
|
var getContent = function getContent() {
|
|
@@ -53,9 +54,10 @@ var MenuItem = function MenuItem(_ref) {
|
|
|
53
54
|
id: id,
|
|
54
55
|
sx: _objectSpread({
|
|
55
56
|
padding: '0.75rem 1.25rem!important',
|
|
56
|
-
minWidth: '13.75rem!important',
|
|
57
|
+
minWidth: fullWidth ? '100%!important' : '13.75rem!important',
|
|
57
58
|
maxHeight: '3rem!important',
|
|
58
|
-
maxWidth: '17.5rem!important',
|
|
59
|
+
maxWidth: fullWidth ? '100%!important' : '17.5rem!important',
|
|
60
|
+
width: fullWidth && '100%!important',
|
|
59
61
|
'&.MuiButtonBase-root.MuiMenuItem-root.Mui-selected': {
|
|
60
62
|
background: 'var(--gray1)'
|
|
61
63
|
},
|
|
@@ -65,7 +67,7 @@ var MenuItem = function MenuItem(_ref) {
|
|
|
65
67
|
}, sx)
|
|
66
68
|
}, props, {
|
|
67
69
|
onClick: onClick || setOpen,
|
|
68
|
-
className: "cbx-menuItem ".concat(className)
|
|
70
|
+
className: "cbx-menuItem ".concat(className || '')
|
|
69
71
|
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
70
72
|
className: "cbx-menuItem-container"
|
|
71
73
|
}, icon && /*#__PURE__*/_react.default.createElement("div", {
|