@councilbox/councilbox-ui 2.0.6 → 2.0.7

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.
@@ -16,7 +16,7 @@ a.noStyles:hover{
16
16
  `}</style>
17
17
 
18
18
 
19
- # Librería de componentes ui-councilbox NEW v2.0.6 &#127881;
19
+ # Librería de componentes ui-councilbox NEW v2.0.7 &#127881;
20
20
 
21
21
  <h2>Componentes:</h2>
22
22
  <div><a class='noStyles' href='/story/components-accordion--default'>Accordion</a></div>
@@ -25,6 +25,9 @@ a.noStyles:hover{
25
25
  <div>Fix zIndex label InputText y SelectInput</div>
26
26
  </div>
27
27
 
28
+ <h2>v2.0.7</h2>
29
+ <div>Fix button del Accordion</div>
30
+
28
31
  <h2>v2.0.6</h2>
29
32
  <div>Fix maxHeight del Accordion</div>
30
33
  <div>Fix Checkbox</div>
@@ -81,27 +81,28 @@ var Accordion = function Accordion(_ref) {
81
81
  closePanel();
82
82
  }, [disabled]);
83
83
 
84
- _react.default.useEffect(function () {
85
- closePanel();
86
- }, [disabled]);
87
-
88
- var updatePanelHeight = function updatePanelHeight() {
84
+ var handleAccordionClick = function handleAccordionClick() {
85
+ setExpanded(!expanded);
89
86
  var panel = panelRef.current;
90
87
 
91
88
  if (panel) {
92
- panel.style.maxHeight = expanded ? "".concat(panel.scrollHeight, "px") : null;
89
+ if (expanded) {
90
+ panel.style.maxHeight = null;
91
+ } else {
92
+ panel.style.maxHeight = "".concat(panel.scrollHeight, "px");
93
+ }
93
94
  }
94
95
  };
95
96
 
96
- var handleAccordionClick = function handleAccordionClick() {
97
- setExpanded(function (prev) {
98
- return !prev;
99
- });
100
- };
101
-
102
97
  _react.default.useEffect(function () {
103
- updatePanelHeight();
104
- }, [expanded, contentExpand]);
98
+ if (expanded) {
99
+ var panel = panelRef.current;
100
+
101
+ if (panel) {
102
+ panel.style.maxHeight = "".concat(panel.scrollHeight, "px");
103
+ }
104
+ }
105
+ }, [contentExpand]);
105
106
 
106
107
  return /*#__PURE__*/_react.default.createElement("div", _extends({
107
108
  id: id,
@@ -240,7 +240,6 @@ var DropDown = function DropDown(_ref2) {
240
240
  };
241
241
 
242
242
  var handleClick = _react.default.useCallback(function (event) {
243
- console.log('abre cabrón');
244
243
  event === null || event === void 0 ? void 0 : event.stopPropagation();
245
244
  event === null || event === void 0 ? void 0 : event.preventDefault();
246
245
  setIsOpen(true);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@councilbox/councilbox-ui",
3
- "version": "2.0.6",
3
+ "version": "2.0.7",
4
4
  "main": "dist/build-index.js",
5
5
  "files": [
6
6
  "dist",