@councilbox/councilbox-ui 2.0.38 → 2.0.40
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 +4 -0
- package/dist/components/EnhancedTable/EnhancedTable.js +3 -2
- package/dist/components/MenuLateralRight/MenuLateralRight.css +5 -1
- package/dist/components/MenuLateralRight/MenuLateralRight.js +3 -2
- package/dist/components/Tooltip/Tooltip.js +11 -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.39 🎉
|
|
20
20
|
|
|
21
21
|
<h2>Componentes:</h2>
|
|
22
22
|
<div><a class='noStyles' href='/story/components-accordion--default'>Accordion</a></div>
|
|
@@ -25,6 +25,10 @@ a.noStyles:hover{
|
|
|
25
25
|
<div>Fix zIndex label InputText y SelectInput</div>
|
|
26
26
|
</div>
|
|
27
27
|
|
|
28
|
+
<h2>v2.0.39</h2>
|
|
29
|
+
<div>Fix MenuLateralRight under button expanded</div>
|
|
30
|
+
<div>Fix position Tooltip</div>
|
|
31
|
+
|
|
28
32
|
<h2>v2.0.38</h2>
|
|
29
33
|
<div>Add prefixClass en DrawerPanel</div>
|
|
30
34
|
<div>Fix tooltip MenuLateralRight</div>
|
|
@@ -29,7 +29,7 @@ var _PaginationFooter = _interopRequireDefault(require("../PaginationFooter/Pagi
|
|
|
29
29
|
|
|
30
30
|
var _useDynamicStyles2 = _interopRequireDefault(require("../../HOCs/useDynamicStyles"));
|
|
31
31
|
|
|
32
|
-
var _excluded = ["defaultFilter", "defaultLimit", "defaultOrder", "selectedCategories", "paperStyle", "refetch", "dataFiltered", "setDataFiltered", "options", "stickyHeader", "styleContainer", "translate", "isMobile", "sx", "prefixClass"];
|
|
32
|
+
var _excluded = ["defaultFilter", "defaultLimit", "defaultOrder", "selectedCategories", "paperStyle", "refetch", "dataFiltered", "setDataFiltered", "options", "stickyHeader", "styleContainer", "translate", "isMobile", "sx", "prefixClass", "onHeaderClick"];
|
|
33
33
|
|
|
34
34
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
35
35
|
|
|
@@ -81,6 +81,7 @@ var EnhancedTable = function EnhancedTable(_ref) {
|
|
|
81
81
|
isMobile = _ref.isMobile,
|
|
82
82
|
sx = _ref.sx,
|
|
83
83
|
propPrefixClass = _ref.prefixClass,
|
|
84
|
+
onHeaderClick = _ref.onHeaderClick,
|
|
84
85
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
85
86
|
|
|
86
87
|
var _useDynamicStyles = (0, _useDynamicStyles2.default)(sx),
|
|
@@ -315,7 +316,7 @@ var EnhancedTable = function EnhancedTable(_ref) {
|
|
|
315
316
|
active: header.name === orderBy,
|
|
316
317
|
direction: orderDirection,
|
|
317
318
|
onClick: function onClick() {
|
|
318
|
-
return orderByArray(header.name, header.typeof);
|
|
319
|
+
return onHeaderClick ? onHeaderClick(header.name, header.typeof) : orderByArray(header.name, header.typeof);
|
|
319
320
|
}
|
|
320
321
|
}, header.text), !header.canOrderByArray && !header.canOrder && header.text);
|
|
321
322
|
}))), /*#__PURE__*/_react.default.createElement(_EnhancedTableBody.default, {
|
|
@@ -177,7 +177,7 @@
|
|
|
177
177
|
justify-content: flex-start;
|
|
178
178
|
}
|
|
179
179
|
|
|
180
|
-
.cbx-menuLateralRight-block-expanded .cbx-menuLateralRight-container-under .cbx-IconButton i{
|
|
180
|
+
.cbx-menuLateralRight-block-expanded .cbx-menuLateralRight-container-under .cbx-IconButton i {
|
|
181
181
|
font-size: 2rem;
|
|
182
182
|
}
|
|
183
183
|
|
|
@@ -190,4 +190,8 @@
|
|
|
190
190
|
.cbx-menuLateralRight-block-expanded .cbx-menuLateralRight-container-under .cbx-menuLateralRight-text-under {
|
|
191
191
|
display: flex;
|
|
192
192
|
align-items: center;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.cbx-menuLateralRight-container-under.cbx-menuLateralRight-container-under-expanded-button {
|
|
196
|
+
cursor: pointer;
|
|
193
197
|
}
|
|
@@ -207,7 +207,8 @@ var MenuLateralRight = function MenuLateralRight(_ref) {
|
|
|
207
207
|
}, underSection === null || underSection === void 0 ? void 0 : underSection.map(function (item, index) {
|
|
208
208
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
209
209
|
key: "under-section-".concat(index),
|
|
210
|
-
className: prefixClass(mobile ? 'cbx-menuLateralRight-container-under-mobile' : 'cbx-menuLateralRight-container-under')
|
|
210
|
+
className: prefixClass(mobile ? 'cbx-menuLateralRight-container-under-mobile' : "cbx-menuLateralRight-container-under ".concat(expanded && !item.disabled ? 'cbx-menuLateralRight-container-under-expanded-button' : '')),
|
|
211
|
+
onClick: expanded && !item.disabled && !mobile ? item.action : undefined
|
|
211
212
|
}, item.actionTooltip && /*#__PURE__*/_react.default.createElement("div", {
|
|
212
213
|
className: prefixClass('cbx-menuLateralRight-block-tooltip-under'),
|
|
213
214
|
onClick: item.setActionTooltip
|
|
@@ -227,7 +228,7 @@ var MenuLateralRight = function MenuLateralRight(_ref) {
|
|
|
227
228
|
tooltip: !mobile && item.text,
|
|
228
229
|
icon: item.icon,
|
|
229
230
|
badge: item.badge,
|
|
230
|
-
onClick: item.action,
|
|
231
|
+
onClick: expanded && !mobile ? undefined : item.action,
|
|
231
232
|
placementTooltip: 'left',
|
|
232
233
|
hoverColor: item.active ? '#272762' : '',
|
|
233
234
|
styles: _objectSpread({}, item.active ? {
|
|
@@ -438,6 +438,17 @@ var Tooltip = function Tooltip(_ref2) {
|
|
|
438
438
|
}, props), title), document.body));
|
|
439
439
|
};
|
|
440
440
|
|
|
441
|
+
_react.default.useEffect(function () {
|
|
442
|
+
if (!tooltipRef.current) return;
|
|
443
|
+
var observer = new ResizeObserver(function () {
|
|
444
|
+
adjustPopoverPosition();
|
|
445
|
+
});
|
|
446
|
+
observer.observe(tooltipRef.current);
|
|
447
|
+
return function () {
|
|
448
|
+
observer.disconnect();
|
|
449
|
+
};
|
|
450
|
+
}, [tooltipRef.current, adjustPopoverPosition]);
|
|
451
|
+
|
|
441
452
|
return title === '' ? children : getTooltip();
|
|
442
453
|
};
|
|
443
454
|
|