@councilbox/councilbox-ui 2.0.14 → 2.0.16
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 +12 -0
- package/dist/components/DropDown/DropDown.js +4 -3
- package/dist/components/Header/DesignHeader.stories.js +7 -0
- package/dist/components/Header/Header.js +13 -6
- package/dist/components/InputText/InputText.css +1 -2
- package/dist/components/InputText/InputText.js +1 -1
- package/dist/components/MenuItem/MenuItem.css +10 -3
- package/dist/components/MenuItem/MenuItem.js +4 -2
- package/dist/utils/index.js +2 -0
- package/package.json +1 -1
|
@@ -16,7 +16,7 @@ a.noStyles:hover{
|
|
|
16
16
|
`}</style>
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
# Librería de componentes ui-councilbox NEW v2.0.
|
|
19
|
+
# Librería de componentes ui-councilbox NEW v2.0.16 🎉
|
|
20
20
|
|
|
21
21
|
<h2>Componentes:</h2>
|
|
22
22
|
<div><a class='noStyles' href='/story/components-accordion--default'>Accordion</a></div>
|
|
@@ -25,6 +25,18 @@ a.noStyles:hover{
|
|
|
25
25
|
<div>Fix zIndex label InputText y SelectInput</div>
|
|
26
26
|
</div>
|
|
27
27
|
|
|
28
|
+
<h2>v2.0.16</h2>
|
|
29
|
+
<div>Add disabled MenuItem</div>
|
|
30
|
+
<div>Fix Dropdown close click items</div>
|
|
31
|
+
|
|
32
|
+
<h2>v2.0.15</h2>
|
|
33
|
+
<div>Add props Header</div>
|
|
34
|
+
<div>Change margin Dropdown</div>
|
|
35
|
+
<div>Fix label input en iOS</div>
|
|
36
|
+
|
|
37
|
+
<h2>v2.0.14</h2>
|
|
38
|
+
<div>Fix tamaño tabs</div>
|
|
39
|
+
|
|
28
40
|
<h2>v2.0.13</h2>
|
|
29
41
|
<div>Fix initial index Tabs</div>
|
|
30
42
|
|
|
@@ -49,7 +49,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
49
49
|
|
|
50
50
|
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; }
|
|
51
51
|
|
|
52
|
-
var OUT_MARGIN =
|
|
52
|
+
var OUT_MARGIN = 10;
|
|
53
53
|
|
|
54
54
|
var getDefaultCoordinates = function getDefaultCoordinates(_ref) {
|
|
55
55
|
var transformOrigin = _ref.transformOrigin,
|
|
@@ -201,7 +201,8 @@ var DropDown = function DropDown(_ref2) {
|
|
|
201
201
|
className = _ref2.className,
|
|
202
202
|
paperPropsStyles = _ref2.paperPropsStyles,
|
|
203
203
|
textStyle = _ref2.textStyle,
|
|
204
|
-
|
|
204
|
+
_ref2$closeOnOptionCl = _ref2.closeOnOptionClick,
|
|
205
|
+
closeOnOptionClick = _ref2$closeOnOptionCl === void 0 ? true : _ref2$closeOnOptionCl,
|
|
205
206
|
props = _objectWithoutProperties(_ref2, _excluded);
|
|
206
207
|
|
|
207
208
|
var memoizedSx = _react.default.useMemo(function () {
|
|
@@ -432,7 +433,7 @@ DropDown.defaultProps = {
|
|
|
432
433
|
styleComponent: undefined,
|
|
433
434
|
sxButton: undefined,
|
|
434
435
|
variantButton: '',
|
|
435
|
-
closeOnOptionClick:
|
|
436
|
+
closeOnOptionClick: true
|
|
436
437
|
};
|
|
437
438
|
var _default = DropDown;
|
|
438
439
|
exports.default = _default;
|
|
@@ -25,6 +25,13 @@ var DesignHeader = function DesignHeader() {
|
|
|
25
25
|
}, "Lorem ipsum dolor"), /*#__PURE__*/_react.default.createElement(_MenuItem.default, {
|
|
26
26
|
key: "3"
|
|
27
27
|
}, "Lorem ipsum dolor"))),
|
|
28
|
+
buttonNotificationIconItems: /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_MenuItem.default, {
|
|
29
|
+
key: "1"
|
|
30
|
+
}, "Lorem ipsum dolor"), /*#__PURE__*/_react.default.createElement(_MenuItem.default, {
|
|
31
|
+
key: "2"
|
|
32
|
+
}, "Lorem ipsum dolor"), /*#__PURE__*/_react.default.createElement(_MenuItem.default, {
|
|
33
|
+
key: "3"
|
|
34
|
+
}, "Lorem ipsum dolor"))),
|
|
28
35
|
tooltipThirdDropdownUser: /*#__PURE__*/_react.default.createElement("div", {
|
|
29
36
|
className: "flex flex-col items-end gap-2"
|
|
30
37
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
@@ -255,7 +255,8 @@ var Header = function Header(_ref) {
|
|
|
255
255
|
})
|
|
256
256
|
}, iconButtonDropdownLeftProps));
|
|
257
257
|
},
|
|
258
|
-
items: dropdownLeft
|
|
258
|
+
items: dropdownLeft,
|
|
259
|
+
closeOnOptionClick: true
|
|
259
260
|
}, dropdownLeftProps))), logoLeft ? logoLeft !== 'noLogo' && /*#__PURE__*/_react.default.createElement("div", {
|
|
260
261
|
className: prefixClass("cbx-header-first-container-app-logo".concat(showTypographyLogoLeft ? '-empty' : '')),
|
|
261
262
|
onClick: actionLogoLeft,
|
|
@@ -320,7 +321,8 @@ var Header = function Header(_ref) {
|
|
|
320
321
|
})
|
|
321
322
|
}, itemsDropDownMoreIconButtonProps));
|
|
322
323
|
},
|
|
323
|
-
items: itemsDropDownMore
|
|
324
|
+
items: itemsDropDownMore,
|
|
325
|
+
closeOnOptionClick: true
|
|
324
326
|
}, itemsDropDownMoreProps))), !!finish && /*#__PURE__*/_react.default.createElement("div", {
|
|
325
327
|
className: prefixClass('cbx-header-second-container-finish')
|
|
326
328
|
}, innerWidth < breakpoints.md ? /*#__PURE__*/_react.default.createElement(_IconButton.default, _extends({
|
|
@@ -383,7 +385,7 @@ var Header = function Header(_ref) {
|
|
|
383
385
|
}, buttonFileManagerProps));
|
|
384
386
|
},
|
|
385
387
|
items: buttonFileManagerItems
|
|
386
|
-
}, buttonFileManagerDropDownProps))),
|
|
388
|
+
}, buttonFileManagerDropDownProps))), buttonNotificationIconItems && /*#__PURE__*/_react.default.createElement("div", {
|
|
387
389
|
className: prefixClass('cbx-header-third-button-notification-container')
|
|
388
390
|
}, /*#__PURE__*/_react.default.createElement(_DropDown.default, _extends({
|
|
389
391
|
prefixClass: prefixClass,
|
|
@@ -401,7 +403,8 @@ var Header = function Header(_ref) {
|
|
|
401
403
|
badge: buttonNotificationBadge
|
|
402
404
|
}, buttonNotificationProps));
|
|
403
405
|
},
|
|
404
|
-
items: buttonNotificationIconItems
|
|
406
|
+
items: buttonNotificationIconItems,
|
|
407
|
+
closeOnOptionClick: true
|
|
405
408
|
}, buttonNotificationIconDropDownProps))), (logoRight || logoRightXS) && (!itemsDropDownUser || iconButtonRight) && /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("img", {
|
|
406
409
|
id: 'cbx-header-third-logo-right',
|
|
407
410
|
className: prefixClass('cbx-header-third-logo-right'),
|
|
@@ -474,12 +477,16 @@ var Header = function Header(_ref) {
|
|
|
474
477
|
className: prefixClass('cbx-header-third-button-notification'),
|
|
475
478
|
onClick: onClickButtonNotification,
|
|
476
479
|
icon: buttonNotificationIcon || /*#__PURE__*/_react.default.createElement("i", {
|
|
477
|
-
className: "ri-notification-3-line"
|
|
480
|
+
className: "ri-notification-3-line",
|
|
481
|
+
style: {
|
|
482
|
+
fontSize: '1.5rem'
|
|
483
|
+
}
|
|
478
484
|
}),
|
|
479
485
|
badge: buttonNotificationBadge
|
|
480
486
|
}, buttonNotificationProps));
|
|
481
487
|
},
|
|
482
|
-
items: buttonNotificationIconItems
|
|
488
|
+
items: buttonNotificationIconItems,
|
|
489
|
+
closeOnOptionClick: true
|
|
483
490
|
}, buttonNotificationIconDropDownProps))), /*#__PURE__*/_react.default.createElement(_DropDown.default, _extends({
|
|
484
491
|
prefixClass: prefixClass,
|
|
485
492
|
color: "transparent",
|
|
@@ -59,8 +59,7 @@
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
.cbx-input:focus~label.cbx-inputText-label,
|
|
62
|
-
.cbx-input.shrink~label.cbx-inputText-label
|
|
63
|
-
.cbx-input:not(:placeholder-shown)~.cbx-inputText-label {
|
|
62
|
+
.cbx-input.shrink~label.cbx-inputText-label {
|
|
64
63
|
top: -8px !important;
|
|
65
64
|
left: 13px !important;
|
|
66
65
|
transform: translate(3px, -2px) scale(0.75) !important;
|
|
@@ -118,7 +118,7 @@ var InputText = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
|
|
|
118
118
|
|
|
119
119
|
var textareaRef = _react.default.useRef(null);
|
|
120
120
|
|
|
121
|
-
var inputShrink = !!(shrink || props !== null && props !== void 0 && props.InputLabelProps && props !== null && props !== void 0 && (_props$InputLabelProp = props.InputLabelProps) !== null && _props$InputLabelProp !== void 0 && _props$InputLabelProp.shrink);
|
|
121
|
+
var inputShrink = !!(shrink || value || defaultValue || props !== null && props !== void 0 && props.InputLabelProps && props !== null && props !== void 0 && (_props$InputLabelProp = props.InputLabelProps) !== null && _props$InputLabelProp !== void 0 && _props$InputLabelProp.shrink);
|
|
122
122
|
|
|
123
123
|
var getVariant = function getVariant() {
|
|
124
124
|
var variantInput = 'outlined';
|
|
@@ -12,18 +12,25 @@
|
|
|
12
12
|
cursor: pointer;
|
|
13
13
|
display: flex;
|
|
14
14
|
align-items: center;
|
|
15
|
+
transition: .2s;
|
|
15
16
|
}
|
|
16
17
|
|
|
17
|
-
.cbx-menuItem.cbx-menuItem-
|
|
18
|
+
.cbx-menuItem.cbx-menuItem-disabled {
|
|
19
|
+
pointer-events: none;
|
|
20
|
+
opacity: 0.38;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.cbx-menuItem.cbx-menuItem-active {
|
|
18
24
|
background-color: var(--primary10);
|
|
19
25
|
}
|
|
20
26
|
|
|
21
|
-
.cbx-menuItem-fullWidth{
|
|
27
|
+
.cbx-menuItem-fullWidth {
|
|
22
28
|
width: 100%;
|
|
23
29
|
max-width: 100%;
|
|
24
30
|
}
|
|
25
31
|
|
|
26
|
-
.cbx-menuItem:hover,
|
|
32
|
+
.cbx-menuItem:hover,
|
|
33
|
+
.cbx-menuItem:focus {
|
|
27
34
|
text-decoration: none;
|
|
28
35
|
background-color: var(--gray1);
|
|
29
36
|
}
|
|
@@ -23,7 +23,7 @@ var _useDynamicStyles2 = _interopRequireDefault(require("../../HOCs/useDynamicSt
|
|
|
23
23
|
|
|
24
24
|
var _useRipple3 = _interopRequireDefault(require("../../HOCs/useRipple"));
|
|
25
25
|
|
|
26
|
-
var _excluded = ["id", "children", "icon", "sx", "badge", "menuItems", "setOpen", "onClick", "endIcon", "className", "style", "active", "fullWidth", "value"];
|
|
26
|
+
var _excluded = ["id", "children", "icon", "sx", "badge", "menuItems", "setOpen", "onClick", "endIcon", "className", "style", "active", "fullWidth", "value", "disabled"];
|
|
27
27
|
|
|
28
28
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
29
29
|
|
|
@@ -66,6 +66,7 @@ var MenuItem = function MenuItem(_ref) {
|
|
|
66
66
|
active = _ref.active,
|
|
67
67
|
fullWidth = _ref.fullWidth,
|
|
68
68
|
value = _ref.value,
|
|
69
|
+
disabled = _ref.disabled,
|
|
69
70
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
70
71
|
|
|
71
72
|
var _useDynamicStyles = (0, _useDynamicStyles2.default)(sx),
|
|
@@ -119,7 +120,7 @@ var MenuItem = function MenuItem(_ref) {
|
|
|
119
120
|
var getContent = function getContent() {
|
|
120
121
|
return /*#__PURE__*/_react.default.createElement("li", _extends({
|
|
121
122
|
id: id,
|
|
122
|
-
className: prefixClass("cbx-menuItem ".concat(className || '', " cbx-ripple ").concat(active ? 'cbx-menuItem-active' : '', " ").concat(fullWidth ? 'cbx-menuItem-fullWidth' : '')),
|
|
123
|
+
className: prefixClass("cbx-menuItem ".concat(className || '', " cbx-ripple ").concat(active ? 'cbx-menuItem-active' : '', " ").concat(fullWidth ? 'cbx-menuItem-fullWidth' : '', " ").concat(disabled ? 'cbx-menuItem-disabled' : '')),
|
|
123
124
|
onClick: function onClick(e) {
|
|
124
125
|
return handleClick(e);
|
|
125
126
|
},
|
|
@@ -186,6 +187,7 @@ MenuItem.propTypes = {
|
|
|
186
187
|
icon: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.node]),
|
|
187
188
|
sx: _propTypes.default.object,
|
|
188
189
|
badge: _propTypes.default.bool,
|
|
190
|
+
disabled: _propTypes.default.bool,
|
|
189
191
|
menuItems: _propTypes.default.node,
|
|
190
192
|
setOpen: _propTypes.default.func,
|
|
191
193
|
onClick: _propTypes.default.func,
|
package/dist/utils/index.js
CHANGED
|
@@ -47,6 +47,8 @@ var enhanceChild = function enhanceChild(child, index, handler, overrides) {
|
|
|
47
47
|
key: child.key || index,
|
|
48
48
|
menuItems: child.props.menuItems && enhanceClickableChildren(child.props.menuItems, handler) || null,
|
|
49
49
|
onClick: handler ? function (event) {
|
|
50
|
+
event.stopPropagation();
|
|
51
|
+
|
|
50
52
|
if (originalOnClick) {
|
|
51
53
|
originalOnClick(event);
|
|
52
54
|
}
|