@councilbox/councilbox-ui 2.0.2 → 2.0.4
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 +4 -1
- package/dist/components/Modal/Modal.js +12 -1
- package/dist/components/SelectInput/SelectInput.js +8 -4
- 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.3 🎉
|
|
20
20
|
|
|
21
21
|
<h2>Componentes:</h2>
|
|
22
22
|
<div><a class='noStyles' href='/story/components-accordion--default'>Accordion</a></div>
|
|
@@ -24,6 +24,9 @@ a.noStyles:hover{
|
|
|
24
24
|
<h2>v0.5.4</h2>
|
|
25
25
|
<div>Fix zIndex label InputText y SelectInput</div>
|
|
26
26
|
</div>
|
|
27
|
+
<h2>v2.0.3</h2>
|
|
28
|
+
<div>Fix eventos del onChange en SelectInput</div>
|
|
29
|
+
|
|
27
30
|
<h2>v2.0.2</h2>
|
|
28
31
|
<div>Fix tabs in DrawerPanel</div>
|
|
29
32
|
<div>Eliminar props de Avatar</div>
|
|
@@ -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", "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", "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
|
|
|
@@ -64,6 +64,8 @@ var InputAutocomplete = function InputAutocomplete(_ref) {
|
|
|
64
64
|
onInputChange = _ref.onInputChange,
|
|
65
65
|
label = _ref.label,
|
|
66
66
|
value = _ref.value,
|
|
67
|
+
_ref$autocomplete = _ref.autocomplete,
|
|
68
|
+
autocomplete = _ref$autocomplete === void 0 ? 'off' : _ref$autocomplete,
|
|
67
69
|
propInputValue = _ref.inputValue,
|
|
68
70
|
style = _ref.style,
|
|
69
71
|
styles = _ref.styles,
|
|
@@ -313,6 +315,7 @@ var InputAutocomplete = function InputAutocomplete(_ref) {
|
|
|
313
315
|
shrink: !!inputValue || !!selectedValue,
|
|
314
316
|
prefixClass: prefixClass,
|
|
315
317
|
fullWidth: props.fullWidth,
|
|
318
|
+
autocomplete: autocomplete,
|
|
316
319
|
ref: inputRef,
|
|
317
320
|
onKeyDown: function onKeyDown(e) {
|
|
318
321
|
e.stopPropagation();
|
|
@@ -106,6 +106,17 @@ var Modal = function Modal(_ref) {
|
|
|
106
106
|
dynamicPrefixClass = _useDynamicStyles.prefixClass;
|
|
107
107
|
|
|
108
108
|
var prefixClass = propPrefixClass || dynamicPrefixClass;
|
|
109
|
+
var isFirefox = typeof navigator !== 'undefined' && /firefox/i.test(navigator.userAgent);
|
|
110
|
+
|
|
111
|
+
var adjustedScrollbarHeight = _react.default.useMemo(function () {
|
|
112
|
+
if (isFirefox) {
|
|
113
|
+
if (scrollbarHeight && scrollbarHeight.endsWith('%')) {
|
|
114
|
+
return "".concat(parseFloat(scrollbarHeight) * 1, "vh");
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
return scrollbarHeight;
|
|
119
|
+
}, [scrollbarHeight]);
|
|
109
120
|
|
|
110
121
|
_react.default.useEffect(function () {
|
|
111
122
|
if (isTransitioning) return;
|
|
@@ -169,7 +180,7 @@ var Modal = function Modal(_ref) {
|
|
|
169
180
|
onClick: handleContentClick,
|
|
170
181
|
style: _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, hasScrollbar ? {
|
|
171
182
|
width: size === 'sm' || size === 'xs' ? '' : '100%',
|
|
172
|
-
height:
|
|
183
|
+
height: adjustedScrollbarHeight || '100%'
|
|
173
184
|
} : {}), widthModal), PaperProps ? PaperProps.style : {}), size === 'sm' || size === 'xs' ? {
|
|
174
185
|
margin: 0
|
|
175
186
|
} : {}), size === 'sm' || size === 'xs' || fullWidth ? {
|
|
@@ -148,7 +148,9 @@ var SelectInput = function SelectInput(_ref) {
|
|
|
148
148
|
setInternalValue(newSelected);
|
|
149
149
|
|
|
150
150
|
if (onChange) {
|
|
151
|
-
onChange(event, {
|
|
151
|
+
onChange(_objectSpread(_objectSpread({}, event), {}, {
|
|
152
|
+
preventDefault: function preventDefault() {},
|
|
153
|
+
stopPropagation: function stopPropagation() {},
|
|
152
154
|
target: {
|
|
153
155
|
value: newSelected.map(function (opt) {
|
|
154
156
|
return opt.value;
|
|
@@ -156,7 +158,7 @@ var SelectInput = function SelectInput(_ref) {
|
|
|
156
158
|
return val !== undefined;
|
|
157
159
|
})
|
|
158
160
|
}
|
|
159
|
-
});
|
|
161
|
+
}));
|
|
160
162
|
}
|
|
161
163
|
} else {
|
|
162
164
|
setInternalValue({
|
|
@@ -165,11 +167,13 @@ var SelectInput = function SelectInput(_ref) {
|
|
|
165
167
|
});
|
|
166
168
|
|
|
167
169
|
if (onChange) {
|
|
168
|
-
onChange(event, {
|
|
170
|
+
onChange(_objectSpread(_objectSpread({}, event), {}, {
|
|
171
|
+
preventDefault: function preventDefault() {},
|
|
172
|
+
stopPropagation: function stopPropagation() {},
|
|
169
173
|
target: {
|
|
170
174
|
value: optionValue
|
|
171
175
|
}
|
|
172
|
-
});
|
|
176
|
+
}));
|
|
173
177
|
}
|
|
174
178
|
|
|
175
179
|
closeDropdown();
|