@councilbox/councilbox-ui 2.0.15 → 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 +3 -2
- 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
|
|
|
@@ -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;
|
|
@@ -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
|
}
|