@councilbox/councilbox-ui 2.0.23 → 2.0.24
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 +3 -0
- package/dist/components/InputAutocomplete/InputAutocomplete.js +18 -1
- package/dist/components/InputText/InputText.css +11 -3
- package/dist/components/InputText/InputText.js +7 -2
- 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.24 🎉
|
|
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.24</h2>
|
|
29
|
+
<div>Fix boton desplegar Autocomplete</div>
|
|
30
|
+
|
|
28
31
|
<h2>v2.0.23</h2>
|
|
29
32
|
<div>Fix Tabs controlados y no controlados</div>
|
|
30
33
|
<div>Fix Checkbox controlados y no controlados</div>
|
|
@@ -268,6 +268,17 @@ var InputAutocomplete = function InputAutocomplete(_ref) {
|
|
|
268
268
|
}));
|
|
269
269
|
};
|
|
270
270
|
|
|
271
|
+
var _handleOpen = function handleOpen() {
|
|
272
|
+
if (!uiState.showDropdown) {
|
|
273
|
+
setUIstate(_objectSpread(_objectSpread({}, uiState), {}, {
|
|
274
|
+
showDropdown: true,
|
|
275
|
+
showSearchInput: true
|
|
276
|
+
}));
|
|
277
|
+
} else {
|
|
278
|
+
closeDropdown();
|
|
279
|
+
}
|
|
280
|
+
};
|
|
281
|
+
|
|
271
282
|
var updateDropdownPosition = function updateDropdownPosition() {
|
|
272
283
|
var _selectRef$current, _selectRef$current2, _selectRef$current2$c;
|
|
273
284
|
|
|
@@ -405,7 +416,13 @@ var InputAutocomplete = function InputAutocomplete(_ref) {
|
|
|
405
416
|
tabIndex: -1
|
|
406
417
|
})),
|
|
407
418
|
endAdornmentClass: 'cbx-inputAutocomplete-endAdornment'
|
|
408
|
-
}, InputProps)
|
|
419
|
+
}, InputProps),
|
|
420
|
+
handleOpen: function handleOpen() {
|
|
421
|
+
if ((options === null || options === void 0 ? void 0 : options.length) > 0) {
|
|
422
|
+
_handleOpen();
|
|
423
|
+
}
|
|
424
|
+
},
|
|
425
|
+
options: options
|
|
409
426
|
}, props, {
|
|
410
427
|
type: 'autocomplete'
|
|
411
428
|
})), (uiState.showDropdown || loading) && (positions.top || positions.bottom) && /*#__PURE__*/(0, _reactDom.createPortal)( /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -435,7 +435,7 @@ textarea.cbx-inputText.cbx-inputText-standard~.cbx-inputText-fieldset-standard {
|
|
|
435
435
|
margin-left: .5rem;
|
|
436
436
|
}
|
|
437
437
|
|
|
438
|
-
.cbx-inputText-container-standard .cbx-inputText-startAdornmentContainer{
|
|
438
|
+
.cbx-inputText-container-standard .cbx-inputText-startAdornmentContainer {
|
|
439
439
|
margin-left: 0rem;
|
|
440
440
|
margin-right: .5rem;
|
|
441
441
|
}
|
|
@@ -445,6 +445,14 @@ textarea.cbx-inputText.cbx-inputText-standard~.cbx-inputText-fieldset-standard {
|
|
|
445
445
|
color: var(--gray3);
|
|
446
446
|
}
|
|
447
447
|
|
|
448
|
-
.cbx-inputText-icon-startAdornment .cbx-inputText-label{
|
|
449
|
-
|
|
448
|
+
.cbx-inputText-icon-startAdornment .cbx-inputText-label {
|
|
449
|
+
left: 40px;
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
.cbx-inputText-autocomplete-button-open {
|
|
453
|
+
position: absolute;
|
|
454
|
+
right: 0.313rem;
|
|
455
|
+
width: 1.25rem;
|
|
456
|
+
height: 2.125rem;
|
|
457
|
+
cursor: pointer;
|
|
450
458
|
}
|
|
@@ -17,7 +17,7 @@ var _Typography = _interopRequireDefault(require("../Typography/Typography"));
|
|
|
17
17
|
|
|
18
18
|
var _useDynamicStyles2 = _interopRequireDefault(require("../../HOCs/useDynamicStyles"));
|
|
19
19
|
|
|
20
|
-
var _excluded = ["value", "defaultValue", "id", "placeholder", "autoComplete", "shrink", "helperText", "error", "helper", "disabled", "label", "startAdornment", "endAdornment", "success", "multiline", "onChange", "variant", "type", "fullWidth", "rows", "onFocus", "onBlur", "onMouseEnter", "onMouseLeave", "sx", "style", "prefixClass", "children", "onClick", "className", "readOnly", "required", "width", "renderValue", "InputProps"];
|
|
20
|
+
var _excluded = ["value", "defaultValue", "id", "placeholder", "autoComplete", "shrink", "helperText", "error", "helper", "disabled", "label", "startAdornment", "endAdornment", "success", "multiline", "onChange", "variant", "type", "fullWidth", "rows", "onFocus", "onBlur", "onMouseEnter", "onMouseLeave", "sx", "style", "prefixClass", "children", "onClick", "className", "readOnly", "required", "width", "renderValue", "InputProps", "handleOpen", "options"];
|
|
21
21
|
|
|
22
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
23
|
|
|
@@ -88,6 +88,8 @@ var InputText = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
|
|
|
88
88
|
width = _ref.width,
|
|
89
89
|
renderValue = _ref.renderValue,
|
|
90
90
|
InputProps = _ref.InputProps,
|
|
91
|
+
handleOpen = _ref.handleOpen,
|
|
92
|
+
options = _ref.options,
|
|
91
93
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
92
94
|
|
|
93
95
|
var _useDynamicStyles = (0, _useDynamicStyles2.default)(sx),
|
|
@@ -355,7 +357,10 @@ var InputText = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
|
|
|
355
357
|
"aria-label": 'Input'
|
|
356
358
|
}, props)), (getVariant() === 'filled' || getVariant() === 'standard') && /*#__PURE__*/_react.default.createElement("span", {
|
|
357
359
|
className: prefixClass('cbx-inputText-bar')
|
|
358
|
-
}), !renderValue && getLabel(), /*#__PURE__*/_react.default.createElement("
|
|
360
|
+
}), !renderValue && getLabel(), type === 'autocomplete' && (options === null || options === void 0 ? void 0 : options.length) > 0 && /*#__PURE__*/_react.default.createElement("div", {
|
|
361
|
+
className: prefixClass('cbx-inputText-autocomplete-button-open'),
|
|
362
|
+
onClick: handleOpen
|
|
363
|
+
}), /*#__PURE__*/_react.default.createElement("fieldset", {
|
|
359
364
|
className: prefixClass("cbx-inputText-fieldset cbx-inputText-fieldset-".concat(getVariant(), " ").concat(isInputHover ? 'hover' : '', " ").concat(isInputFocused ? 'focused' : '', " ").concat(inputValue && !isInputFocused ? 'focusedNo value' : '', " ").concat(!label ? 'noLabel' : '', " ").concat(inputShrink && !isInputFocused ? 'focusedNo value shrink' : '')),
|
|
360
365
|
"aria-label": 'Input fieldset'
|
|
361
366
|
}, /*#__PURE__*/_react.default.createElement("legend", {
|