@councilbox/councilbox-ui 2.0.1 → 2.0.2
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 +9 -0
- package/dist/components/Avatar/Avatar.js +0 -2
- package/dist/components/DrawerPanel/DrawerPanel.css +5 -2
- package/dist/components/DrawerPanel/DrawerPanel.js +4 -3
- package/dist/components/InputAutocomplete/InputAutocomplete.js +7 -5
- package/dist/components/SelectInput/SelectInput.js +7 -5
- package/dist/testing/TestAutocomplete.js +2 -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.2 🎉
|
|
20
20
|
|
|
21
21
|
<h2>Componentes:</h2>
|
|
22
22
|
<div><a class='noStyles' href='/story/components-accordion--default'>Accordion</a></div>
|
|
@@ -24,6 +24,15 @@ 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.2</h2>
|
|
28
|
+
<div>Fix tabs in DrawerPanel</div>
|
|
29
|
+
<div>Eliminar props de Avatar</div>
|
|
30
|
+
<div>Fix eventos del onChange en SelectInput</div>
|
|
31
|
+
<div>Fix validacion onChange en SelectInput</div>
|
|
32
|
+
|
|
33
|
+
<h2>v2.0.1</h2>
|
|
34
|
+
<div>Fix errores</div>
|
|
35
|
+
|
|
27
36
|
<h2>v2.0.0</h2>
|
|
28
37
|
<div>Nuevos componentes sin Mui</div>
|
|
29
38
|
|
|
@@ -125,7 +125,6 @@ Avatar.propTypes = {
|
|
|
125
125
|
backgroundColor: _propTypes.default.string,
|
|
126
126
|
text: _propTypes.default.string,
|
|
127
127
|
src: _propTypes.default.any,
|
|
128
|
-
icon: _propTypes.default.any,
|
|
129
128
|
label: _propTypes.default.string,
|
|
130
129
|
colorText: _propTypes.default.string,
|
|
131
130
|
variantText: _propTypes.default.string,
|
|
@@ -142,7 +141,6 @@ Avatar.defaultProps = {
|
|
|
142
141
|
backgroundColor: '',
|
|
143
142
|
text: 'MW',
|
|
144
143
|
src: null,
|
|
145
|
-
icon: null,
|
|
146
144
|
label: '',
|
|
147
145
|
colorText: '',
|
|
148
146
|
variantText: '',
|
|
@@ -88,11 +88,14 @@
|
|
|
88
88
|
background-color: var(--primary);
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
-
.cbx-drawerPanel-tabs-block {
|
|
91
|
+
.cbx-drawerPanel-tabs-block, .cbx-drawerPanel-tabs-block-mobile {
|
|
92
92
|
width: 100%;
|
|
93
|
+
overflow: hidden;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.cbx-drawerPanel-tabs-block {
|
|
93
97
|
margin-right: 4.25rem;
|
|
94
98
|
margin-left: 4.25rem;
|
|
95
|
-
overflow: hidden;
|
|
96
99
|
}
|
|
97
100
|
|
|
98
101
|
.cbx-drawerPanel-tabs-bodyText {
|
|
@@ -23,7 +23,7 @@ var _IconButton = _interopRequireDefault(require("../IconButton/IconButton"));
|
|
|
23
23
|
|
|
24
24
|
var _useDynamicStyles2 = _interopRequireDefault(require("../../HOCs/useDynamicStyles"));
|
|
25
25
|
|
|
26
|
-
var _excluded = ["title", "id", "fullScreen", "sizeContainer", "buttonAccept", "successAction", "open", "requestClose", "loadingAction", "acceptAction", "bodyText", "bodyStyle", "hideAccept", "classNameDialog", "PaperProps", "widthModal", "isMobile", "tabs", "onChange", "titleStyles", "subTitle", "subTitleStyles", "endIcon", "propsButton", "style", "styles", "sx", "prefixClass", "direction"];
|
|
26
|
+
var _excluded = ["title", "id", "fullScreen", "sizeContainer", "buttonAccept", "successAction", "open", "requestClose", "loadingAction", "acceptAction", "bodyText", "bodyStyle", "hideAccept", "classNameDialog", "PaperProps", "widthModal", "isMobile", "tabs", "onChange", "titleStyles", "subTitle", "subTitleStyles", "endIcon", "propsButton", "style", "styles", "sx", "prefixClass", "direction", "variantTabs"];
|
|
27
27
|
|
|
28
28
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
29
29
|
|
|
@@ -85,6 +85,7 @@ var DrawerPanel = function DrawerPanel(_ref) {
|
|
|
85
85
|
sx = _ref.sx,
|
|
86
86
|
propPrefixClass = _ref.prefixClass,
|
|
87
87
|
direction = _ref.direction,
|
|
88
|
+
variantTabs = _ref.variantTabs,
|
|
88
89
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
89
90
|
|
|
90
91
|
var _useDynamicStyles = (0, _useDynamicStyles2.default)(sx),
|
|
@@ -201,7 +202,7 @@ var DrawerPanel = function DrawerPanel(_ref) {
|
|
|
201
202
|
}, propsButton)))), /*#__PURE__*/_react.default.createElement("div", {
|
|
202
203
|
className: prefixClass('cbx-drawerPanel-tabs-container')
|
|
203
204
|
}, tabs.length > 0 && /*#__PURE__*/_react.default.createElement("div", {
|
|
204
|
-
className: prefixClass('cbx-drawerPanel-tabs-block')
|
|
205
|
+
className: prefixClass(isMobile ? 'cbx-drawerPanel-tabs-block-mobile' : 'cbx-drawerPanel-tabs-block')
|
|
205
206
|
}, /*#__PURE__*/_react.default.createElement(_Tabs.default, {
|
|
206
207
|
onChange: function onChange(index, e) {
|
|
207
208
|
return _onChange(e, index);
|
|
@@ -210,7 +211,7 @@ var DrawerPanel = function DrawerPanel(_ref) {
|
|
|
210
211
|
return tab.active;
|
|
211
212
|
}),
|
|
212
213
|
itemsTab: tabs,
|
|
213
|
-
variant: 'scrollable',
|
|
214
|
+
variant: variantTabs || 'scrollable',
|
|
214
215
|
indicatorColor: "secondary",
|
|
215
216
|
prefixClass: prefixClass
|
|
216
217
|
}))), /*#__PURE__*/_react.default.createElement("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", "clearOnBlur", "selectOnFocus"];
|
|
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"];
|
|
33
33
|
|
|
34
34
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
35
35
|
|
|
@@ -96,6 +96,8 @@ var InputAutocomplete = function InputAutocomplete(_ref) {
|
|
|
96
96
|
filterOptions = _ref.filterOptions,
|
|
97
97
|
_ref$freeSolo = _ref.freeSolo,
|
|
98
98
|
freeSolo = _ref$freeSolo === void 0 ? false : _ref$freeSolo,
|
|
99
|
+
_ref$InputProps = _ref.InputProps,
|
|
100
|
+
InputProps = _ref$InputProps === void 0 ? {} : _ref$InputProps,
|
|
99
101
|
_ref$clearOnBlur = _ref.clearOnBlur,
|
|
100
102
|
clearOnBlur = _ref$clearOnBlur === void 0 ? true : _ref$clearOnBlur,
|
|
101
103
|
_ref$selectOnFocus = _ref.selectOnFocus,
|
|
@@ -264,7 +266,7 @@ var InputAutocomplete = function InputAutocomplete(_ref) {
|
|
|
264
266
|
var _selectRef$current3, _selectRef$current3$c, _selectRef$current3$c2;
|
|
265
267
|
|
|
266
268
|
var selectRect = selectRef === null || selectRef === void 0 ? void 0 : (_selectRef$current3 = selectRef.current) === null || _selectRef$current3 === void 0 ? void 0 : (_selectRef$current3$c = _selectRef$current3.children[0]) === null || _selectRef$current3$c === void 0 ? void 0 : (_selectRef$current3$c2 = _selectRef$current3$c.children[0]) === null || _selectRef$current3$c2 === void 0 ? void 0 : _selectRef$current3$c2.getBoundingClientRect();
|
|
267
|
-
var isOverflowingBelow = selectRect.bottom > window.innerHeight
|
|
269
|
+
var isOverflowingBelow = selectRect.bottom > window.innerHeight * 0.60;
|
|
268
270
|
|
|
269
271
|
var newPositions = _objectSpread({}, positions);
|
|
270
272
|
|
|
@@ -313,7 +315,7 @@ var InputAutocomplete = function InputAutocomplete(_ref) {
|
|
|
313
315
|
fullWidth: props.fullWidth,
|
|
314
316
|
ref: inputRef,
|
|
315
317
|
onKeyDown: function onKeyDown(e) {
|
|
316
|
-
e.
|
|
318
|
+
e.stopPropagation();
|
|
317
319
|
|
|
318
320
|
if (e.keyCode === 9) {
|
|
319
321
|
closeDropdown();
|
|
@@ -328,7 +330,7 @@ var InputAutocomplete = function InputAutocomplete(_ref) {
|
|
|
328
330
|
onChange: handleInputChange,
|
|
329
331
|
onClick: handleInputFocus,
|
|
330
332
|
defaultValue: defaultValue,
|
|
331
|
-
InputProps: {
|
|
333
|
+
InputProps: _objectSpread({
|
|
332
334
|
endAdornment: clearable && inputValue && (loading ? /*#__PURE__*/_react.default.createElement(_LoadingSection.default, {
|
|
333
335
|
size: 20,
|
|
334
336
|
thickness: 3,
|
|
@@ -349,7 +351,7 @@ var InputAutocomplete = function InputAutocomplete(_ref) {
|
|
|
349
351
|
tabIndex: "-1"
|
|
350
352
|
})
|
|
351
353
|
}))
|
|
352
|
-
}
|
|
354
|
+
}, InputProps)
|
|
353
355
|
}, props, {
|
|
354
356
|
type: 'autocomplete'
|
|
355
357
|
})), (uiState.showDropdown || loading) && (positions.top || positions.bottom) && /*#__PURE__*/(0, _reactDom.createPortal)( /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -125,7 +125,7 @@ var SelectInput = function SelectInput(_ref) {
|
|
|
125
125
|
}, 150);
|
|
126
126
|
};
|
|
127
127
|
|
|
128
|
-
var handleOptionClick = function handleOptionClick(option) {
|
|
128
|
+
var handleOptionClick = function handleOptionClick(option, event) {
|
|
129
129
|
var optionValue = option.props.value;
|
|
130
130
|
var optionText = option.props.children;
|
|
131
131
|
|
|
@@ -148,10 +148,12 @@ var SelectInput = function SelectInput(_ref) {
|
|
|
148
148
|
setInternalValue(newSelected);
|
|
149
149
|
|
|
150
150
|
if (onChange) {
|
|
151
|
-
onChange({
|
|
151
|
+
onChange(event, {
|
|
152
152
|
target: {
|
|
153
153
|
value: newSelected.map(function (opt) {
|
|
154
154
|
return opt.value;
|
|
155
|
+
}).filter(function (val) {
|
|
156
|
+
return val !== undefined;
|
|
155
157
|
})
|
|
156
158
|
}
|
|
157
159
|
});
|
|
@@ -163,7 +165,7 @@ var SelectInput = function SelectInput(_ref) {
|
|
|
163
165
|
});
|
|
164
166
|
|
|
165
167
|
if (onChange) {
|
|
166
|
-
onChange({
|
|
168
|
+
onChange(event, {
|
|
167
169
|
target: {
|
|
168
170
|
value: optionValue
|
|
169
171
|
}
|
|
@@ -224,8 +226,8 @@ var SelectInput = function SelectInput(_ref) {
|
|
|
224
226
|
key: child.key || "".concat(child.props.value, "-").concat(index),
|
|
225
227
|
active: checkSelectedOptions(child.props.value),
|
|
226
228
|
selected: checkSelectedOptions(child.props.value),
|
|
227
|
-
onClick: function onClick() {
|
|
228
|
-
return handleOptionClick(child);
|
|
229
|
+
onClick: function onClick(event) {
|
|
230
|
+
return handleOptionClick(child, event);
|
|
229
231
|
},
|
|
230
232
|
fullWidth: fullWidth
|
|
231
233
|
});
|
|
@@ -7,12 +7,12 @@ exports.default = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
10
|
+
var _material = require("@mui/material");
|
|
11
|
+
|
|
10
12
|
var _InputAutocomplete = _interopRequireDefault(require("../components/InputAutocomplete/InputAutocomplete"));
|
|
11
13
|
|
|
12
14
|
var _SelectInput = _interopRequireDefault(require("../components/SelectInput/SelectInput"));
|
|
13
15
|
|
|
14
|
-
var _material = require("@mui/material");
|
|
15
|
-
|
|
16
16
|
var _MenuItem = _interopRequireDefault(require("../components/MenuItem/MenuItem"));
|
|
17
17
|
|
|
18
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|