@councilbox/councilbox-ui 2.0.4 → 2.0.6

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.3 &#127881;
19
+ # Librería de componentes ui-councilbox NEW v2.0.6 &#127881;
20
20
 
21
21
  <h2>Componentes:</h2>
22
22
  <div><a class='noStyles' href='/story/components-accordion--default'>Accordion</a></div>
@@ -19,22 +19,36 @@ a.noStyles:hover{
19
19
  `}</style>
20
20
 
21
21
 
22
- # Changelog ui-councilbox
23
- <div class="hide">
24
- <h2>v0.5.4</h2>
25
- <div>Fix zIndex label InputText y SelectInput</div>
26
- </div>
27
- <h2>v2.0.3</h2>
28
- <div>Fix eventos del onChange en SelectInput</div>
29
-
30
- <h2>v2.0.2</h2>
31
- <div>Fix tabs in DrawerPanel</div>
32
- <div>Eliminar props de Avatar</div>
33
- <div>Fix eventos del onChange en SelectInput</div>
34
- <div>Fix validacion onChange en SelectInput</div>
35
-
36
- <h2>v2.0.1</h2>
37
- <div>Fix errores</div>
22
+ # Changelog ui-councilbox
23
+ <div class="hide">
24
+ <h2>v0.5.4</h2>
25
+ <div>Fix zIndex label InputText y SelectInput</div>
26
+ </div>
27
+
28
+ <h2>v2.0.6</h2>
29
+ <div>Fix maxHeight del Accordion</div>
30
+ <div>Fix Checkbox</div>
31
+ <div>Fix boton X disabled en InputAutocomplete</div>
32
+
33
+ <h2>v2.0.5</h2>
34
+ <div>Fix posicionamiento del tooltip en los MenuItem</div>
35
+ <div>Fix linea en el label en inputText</div>
36
+ <div>Change type prop text Avatar</div>
37
+
38
+ <h2>v2.0.4</h2>
39
+ <div>Fix height en Modal para Firefox</div>
40
+
41
+ <h2>v2.0.3</h2>
42
+ <div>Fix eventos del onChange en SelectInput</div>
43
+
44
+ <h2>v2.0.2</h2>
45
+ <div>Fix tabs in DrawerPanel</div>
46
+ <div>Eliminar props de Avatar</div>
47
+ <div>Fix eventos del onChange en SelectInput</div>
48
+ <div>Fix validacion onChange en SelectInput</div>
49
+
50
+ <h2>v2.0.1</h2>
51
+ <div>Fix errores</div>
38
52
 
39
53
  <h2>v2.0.0</h2>
40
54
  <div>Nuevos componentes sin Mui</div>
@@ -81,19 +81,28 @@ var Accordion = function Accordion(_ref) {
81
81
  closePanel();
82
82
  }, [disabled]);
83
83
 
84
- var handleAccordionClick = function handleAccordionClick() {
85
- setExpanded(!expanded);
84
+ _react.default.useEffect(function () {
85
+ closePanel();
86
+ }, [disabled]);
87
+
88
+ var updatePanelHeight = function updatePanelHeight() {
86
89
  var panel = panelRef.current;
87
90
 
88
91
  if (panel) {
89
- if (expanded) {
90
- panel.style.maxHeight = null;
91
- } else {
92
- panel.style.maxHeight = "".concat(panel.scrollHeight, "px");
93
- }
92
+ panel.style.maxHeight = expanded ? "".concat(panel.scrollHeight, "px") : null;
94
93
  }
95
94
  };
96
95
 
96
+ var handleAccordionClick = function handleAccordionClick() {
97
+ setExpanded(function (prev) {
98
+ return !prev;
99
+ });
100
+ };
101
+
102
+ _react.default.useEffect(function () {
103
+ updatePanelHeight();
104
+ }, [expanded, contentExpand]);
105
+
97
106
  return /*#__PURE__*/_react.default.createElement("div", _extends({
98
107
  id: id,
99
108
  className: prefixClass("cbx-Accordion-block ".concat(className || '', " ").concat(disabled ? 'disabled' : '')),
@@ -123,7 +123,7 @@ var Avatar = function Avatar(_ref) {
123
123
  Avatar.displayName = "Avatar";
124
124
  Avatar.propTypes = {
125
125
  backgroundColor: _propTypes.default.string,
126
- text: _propTypes.default.string,
126
+ text: _propTypes.default.any,
127
127
  src: _propTypes.default.any,
128
128
  label: _propTypes.default.string,
129
129
  colorText: _propTypes.default.string,
@@ -82,7 +82,7 @@ var Checkbox = function Checkbox(_ref) {
82
82
  setInternalState(newChecked);
83
83
 
84
84
  if (onChange) {
85
- onChange(event);
85
+ onChange(event, newChecked);
86
86
  }
87
87
  };
88
88
 
@@ -7,6 +7,12 @@
7
7
  opacity: 1;
8
8
  }
9
9
 
10
+ .cbx-inputAutocomplete-icon-button.disabled {
11
+ cursor: not-allowed;
12
+ opacity: 0.5;
13
+ pointer-events: none;
14
+ }
15
+
10
16
  .cbx-inputText-container-disabled.cbx-inputText-container-select.cbx-inputText-container:after {
11
17
  border-left: 0px solid transparent;
12
18
  border-right: 0px solid transparent;
@@ -29,7 +29,7 @@ var _autoDetectScroll = require("../../utils/autoDetectScroll");
29
29
 
30
30
  var _utils = require("../../utils");
31
31
 
32
- var _excluded = ["children", "className", "onChange", "onInputChange", "label", "value", "autocomplete", "inputValue", "style", "styles", "sx", "loadingText", "loading", "prefixClass", "options", "getOptionLabel", "clearable", "getOptionSelected", "defaultValue", "filterOptions", "freeSolo", "InputProps", "clearOnBlur", "selectOnFocus"];
32
+ var _excluded = ["children", "className", "onChange", "onInputChange", "label", "value", "autocomplete", "inputValue", "style", "styles", "sx", "loadingText", "loading", "prefixClass", "options", "disabled", "getOptionLabel", "clearable", "getOptionSelected", "defaultValue", "filterOptions", "freeSolo", "InputProps", "clearOnBlur", "selectOnFocus"];
33
33
 
34
34
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
35
35
 
@@ -76,6 +76,7 @@ var InputAutocomplete = function InputAutocomplete(_ref) {
76
76
  loading = _ref$loading === void 0 ? false : _ref$loading,
77
77
  propPrefixClass = _ref.prefixClass,
78
78
  options = _ref.options,
79
+ disabled = _ref.disabled,
79
80
  _ref$getOptionLabel = _ref.getOptionLabel,
80
81
  getOptionLabel = _ref$getOptionLabel === void 0 ? function (option) {
81
82
  if (!option) {
@@ -316,6 +317,7 @@ var InputAutocomplete = function InputAutocomplete(_ref) {
316
317
  prefixClass: prefixClass,
317
318
  fullWidth: props.fullWidth,
318
319
  autocomplete: autocomplete,
320
+ disabled: disabled,
319
321
  ref: inputRef,
320
322
  onKeyDown: function onKeyDown(e) {
321
323
  e.stopPropagation();
@@ -341,7 +343,9 @@ var InputAutocomplete = function InputAutocomplete(_ref) {
341
343
  }) : /*#__PURE__*/_react.default.createElement(_IconButton.default, {
342
344
  prefixClass: prefixClass,
343
345
  className: "cbx-inputAutocomplete-icon-button",
346
+ disabled: disabled,
344
347
  onClick: function onClick(e) {
348
+ if (disabled) return;
345
349
  e.stopPropagation();
346
350
  e.preventDefault();
347
351
  searchTextRef.current = '';
@@ -275,6 +275,10 @@ var InputText = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
275
275
  }
276
276
  }, [rows, value]);
277
277
 
278
+ _react.default.useEffect(function () {
279
+ setInputValue(defaultValue || value);
280
+ }, [value]);
281
+
278
282
  _react.default.useEffect(function () {
279
283
  var hiddenLabel = document.createElement('label');
280
284
  hiddenLabel.classList.add('cbx-inputText-label-hidden');
@@ -138,7 +138,8 @@ var MenuItem = function MenuItem(_ref) {
138
138
  paddingRight: badge && !icon && '1.188rem'
139
139
  }
140
140
  }, /*#__PURE__*/_react.default.createElement(_Tooltip.default, {
141
- title: isEllipsisActive ? extractText(children) : ''
141
+ title: isEllipsisActive ? extractText(children) : '',
142
+ placement: "right"
142
143
  }, /*#__PURE__*/_react.default.createElement(_Typography.default, {
143
144
  color: 'var(--black)',
144
145
  prefixClass: prefixClass,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@councilbox/councilbox-ui",
3
- "version": "2.0.4",
3
+ "version": "2.0.6",
4
4
  "main": "dist/build-index.js",
5
5
  "files": [
6
6
  "dist",