@onesy/ui-react 1.0.203 → 1.0.204
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/AutoComplete/AutoComplete.js +3 -3
- package/Select/Select.d.ts +1 -0
- package/Select/Select.js +23 -16
- package/esm/AutoComplete/AutoComplete.js +3 -3
- package/esm/Select/Select.js +22 -15
- package/esm/index.js +1 -1
- package/index.js +1 -1
- package/package.json +1 -1
|
@@ -24,7 +24,7 @@ var _ListSubheader = _interopRequireDefault(require("../ListSubheader"));
|
|
|
24
24
|
var _Line = _interopRequireDefault(require("../Line"));
|
|
25
25
|
var _utils2 = require("../utils");
|
|
26
26
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
27
|
-
const _excluded = ["ref", "tonal", "color", "size", "version", "valueInput", "valueInputDefault", "onChangeInput", "value", "valueDefault", "onChange", "options", "label", "multiple", "prefix", "sufix", "start", "end", "autoWidth", "readOnly", "getLabel", "renderValues", "renderChip", "renderOption", "equal", "equalInput", "filter", "clear", "loading", "autoSelectOnBlur", "blurOnSelect", "noOptions", "noOptionsObject", "startOptionsObject", "noOptionsElement", "startOptionsElement", "endOptionsElement", "endOptionsObject", "openOnFocus", "closeOnSelect", "clearOnEscape", "groupBy", "limit", "openOnInputUpdate", "filterOutSelectedOptions", "selectOnFocus", "clearOnBlur", "clearInputOnSelect", "chip", "fullWidth", "noInputValue", "disabled", "IconClear", "IconDropdown", "WrapperProps", "ChipProps", "ListProps", "MenuProps", "IconButtonProps", "InputProps", "IconProps", "TextFieldProps", "
|
|
27
|
+
const _excluded = ["ref", "tonal", "color", "size", "version", "valueInput", "valueInputDefault", "onChangeInput", "value", "valueDefault", "onChange", "options", "label", "multiple", "prefix", "sufix", "start", "end", "autoWidth", "readOnly", "getLabel", "renderValues", "renderChip", "renderOption", "equal", "equalInput", "filter", "clear", "loading", "autoSelectOnBlur", "blurOnSelect", "noOptions", "noOptionsObject", "startOptionsObject", "noOptionsElement", "startOptionsElement", "endOptionsElement", "endOptionsObject", "openOnFocus", "closeOnSelect", "clearOnEscape", "groupBy", "limit", "openOnInputUpdate", "filterOutSelectedOptions", "selectOnFocus", "clearOnBlur", "clearInputOnSelect", "chip", "fullWidth", "noInputValue", "disabled", "portal", "IconClear", "IconDropdown", "WrapperProps", "ChipProps", "ListProps", "MenuProps", "IconButtonProps", "InputProps", "IconProps", "TextFieldProps", "className", "style", "children"];
|
|
28
28
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
29
29
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
30
30
|
const useStyle = (0, _styleReact.style)(theme => ({
|
|
@@ -183,6 +183,7 @@ const AutoComplete = props_ => {
|
|
|
183
183
|
fullWidth,
|
|
184
184
|
noInputValue,
|
|
185
185
|
disabled,
|
|
186
|
+
portal = (_props$MenuProps$port = (_props$MenuProps = props.MenuProps) === null || _props$MenuProps === void 0 ? void 0 : _props$MenuProps.portal) !== null && _props$MenuProps$port !== void 0 ? _props$MenuProps$port : true,
|
|
186
187
|
IconClear = _IconMaterialCloseW.default,
|
|
187
188
|
IconDropdown = _IconMaterialArrowDropDownW.default,
|
|
188
189
|
WrapperProps,
|
|
@@ -193,7 +194,6 @@ const AutoComplete = props_ => {
|
|
|
193
194
|
InputProps,
|
|
194
195
|
IconProps,
|
|
195
196
|
TextFieldProps,
|
|
196
|
-
portal = (_props$MenuProps$port = (_props$MenuProps = props.MenuProps) === null || _props$MenuProps === void 0 ? void 0 : _props$MenuProps.portal) !== null && _props$MenuProps$port !== void 0 ? _props$MenuProps$port : true,
|
|
197
197
|
className,
|
|
198
198
|
style,
|
|
199
199
|
children: children_
|
|
@@ -696,7 +696,7 @@ const AutoComplete = props_ => {
|
|
|
696
696
|
}, MenuProps === null || MenuProps === void 0 || (_MenuProps$ListProps2 = MenuProps.ListProps) === null || _MenuProps$ListProps2 === void 0 ? void 0 : _MenuProps$ListProps2.style), ListProps === null || ListProps === void 0 ? void 0 : ListProps.style)
|
|
697
697
|
}),
|
|
698
698
|
style: _objectSpread(_objectSpread({}, styles.menu), MenuProps === null || MenuProps === void 0 ? void 0 : MenuProps.style),
|
|
699
|
-
className: (0, _styleReact.classNames)([MenuProps === null || MenuProps === void 0 ? void 0 : MenuProps.className])
|
|
699
|
+
className: (0, _styleReact.classNames)(['onesy-Select-Menu', MenuProps === null || MenuProps === void 0 ? void 0 : MenuProps.className])
|
|
700
700
|
}))]
|
|
701
701
|
}));
|
|
702
702
|
};
|
package/Select/Select.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export declare type ISelect = ITextField & {
|
|
|
14
14
|
chip?: boolean;
|
|
15
15
|
clear?: boolean;
|
|
16
16
|
noSelectText?: any;
|
|
17
|
+
portal?: boolean;
|
|
17
18
|
renderValues?: (value: string | string[]) => IElement;
|
|
18
19
|
renderChip?: (item: any, value: any, props: IPropsAny) => IElement;
|
|
19
20
|
IconClear?: any;
|
package/Select/Select.js
CHANGED
|
@@ -22,7 +22,7 @@ var _IconButton = _interopRequireDefault(require("../IconButton"));
|
|
|
22
22
|
var _Line = _interopRequireDefault(require("../Line"));
|
|
23
23
|
var _utils2 = require("../utils");
|
|
24
24
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
25
|
-
const _excluded = ["ref", "tonal", "color", "size", "version", "value", "valueDefault", "onChange", "options", "name", "multiple", "prefix", "sufix", "start", "end", "autoWidth", "getLabel", "getOptionName", "fullWidth", "chip", "clear", "readOnly", "noSelectText", "disabled", "renderValues", "renderChip", "IconClear", "IconDropdown", "inputProps", "InputWrapperProps", "WrapperProps", "ChipProps", "ChiProps", "ListProps", "MenuProps", "ListItemProps", "ListItemTypeProps", "ListItemTypePrimaryProps", "ListItemTypeSecondaryProps", "IconButtonProps", "IconProps", "className", "style", "children"];
|
|
25
|
+
const _excluded = ["ref", "tonal", "color", "size", "version", "value", "valueDefault", "onChange", "options", "name", "multiple", "prefix", "sufix", "start", "end", "autoWidth", "getLabel", "getOptionName", "fullWidth", "chip", "clear", "readOnly", "noSelectText", "disabled", "portal", "renderValues", "renderChip", "IconClear", "IconDropdown", "inputProps", "InputWrapperProps", "WrapperProps", "ChipProps", "ChiProps", "ListProps", "MenuProps", "ListItemProps", "ListItemTypeProps", "ListItemTypePrimaryProps", "ListItemTypeSecondaryProps", "IconButtonProps", "IconProps", "className", "style", "children"];
|
|
26
26
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
27
27
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
28
28
|
const useStyle = (0, _styleReact.style)(theme => ({
|
|
@@ -121,7 +121,7 @@ const useStyle = (0, _styleReact.style)(theme => ({
|
|
|
121
121
|
});
|
|
122
122
|
const getValue = value => (value === null || value === void 0 ? void 0 : value.value) !== undefined ? value.value : value;
|
|
123
123
|
const Select = props_ => {
|
|
124
|
-
var _theme$ui, _theme$ui2, _theme$elements, _theme$elements2, _theme$elements3, _theme$elements4, _theme$elements5, _theme$elements6, _theme$elements7, _theme$elements8;
|
|
124
|
+
var _theme$ui, _theme$ui2, _theme$elements, _theme$elements2, _theme$elements3, _theme$elements4, _theme$elements5, _theme$elements6, _theme$elements7, _theme$elements8, _props$MenuProps$port, _props$MenuProps, _MenuProps$ListProps, _MenuProps$ListProps2;
|
|
125
125
|
const theme = (0, _styleReact.useOnesyTheme)();
|
|
126
126
|
const l = theme.l;
|
|
127
127
|
const props = _objectSpread(_objectSpread(_objectSpread({}, theme === null || theme === void 0 || (_theme$ui = theme.ui) === null || _theme$ui === void 0 || (_theme$ui = _theme$ui.elements) === null || _theme$ui === void 0 || (_theme$ui = _theme$ui.all) === null || _theme$ui === void 0 || (_theme$ui = _theme$ui.props) === null || _theme$ui === void 0 ? void 0 : _theme$ui.default), theme === null || theme === void 0 || (_theme$ui2 = theme.ui) === null || _theme$ui2 === void 0 || (_theme$ui2 = _theme$ui2.elements) === null || _theme$ui2 === void 0 || (_theme$ui2 = _theme$ui2.onesySelect) === null || _theme$ui2 === void 0 || (_theme$ui2 = _theme$ui2.props) === null || _theme$ui2 === void 0 ? void 0 : _theme$ui2.default), props_);
|
|
@@ -158,6 +158,7 @@ const Select = props_ => {
|
|
|
158
158
|
readOnly,
|
|
159
159
|
noSelectText,
|
|
160
160
|
disabled,
|
|
161
|
+
portal = (_props$MenuProps$port = (_props$MenuProps = props.MenuProps) === null || _props$MenuProps === void 0 ? void 0 : _props$MenuProps.portal) !== null && _props$MenuProps$port !== void 0 ? _props$MenuProps$port : true,
|
|
161
162
|
renderValues: renderValues_,
|
|
162
163
|
renderChip,
|
|
163
164
|
IconClear = _IconMaterialCloseW.default,
|
|
@@ -167,13 +168,7 @@ const Select = props_ => {
|
|
|
167
168
|
WrapperProps,
|
|
168
169
|
ChipProps,
|
|
169
170
|
ChiProps,
|
|
170
|
-
ListProps
|
|
171
|
-
style: {
|
|
172
|
-
maxHeight: 250,
|
|
173
|
-
overflowY: 'auto',
|
|
174
|
-
overflowX: 'hidden'
|
|
175
|
-
}
|
|
176
|
-
},
|
|
171
|
+
ListProps,
|
|
177
172
|
MenuProps: MenuPropsProps,
|
|
178
173
|
ListItemProps,
|
|
179
174
|
ListItemTypeProps,
|
|
@@ -213,7 +208,7 @@ const Select = props_ => {
|
|
|
213
208
|
const MenuProps = _objectSpread({
|
|
214
209
|
portal: true
|
|
215
210
|
}, MenuPropsProps);
|
|
216
|
-
if (
|
|
211
|
+
if (portal && autoWidth) {
|
|
217
212
|
var _refs$wrapper$current;
|
|
218
213
|
styles.menu.width = (_refs$wrapper$current = refs.wrapper.current) === null || _refs$wrapper$current === void 0 ? void 0 : _refs$wrapper$current.clientWidth;
|
|
219
214
|
}
|
|
@@ -438,7 +433,9 @@ const Select = props_ => {
|
|
|
438
433
|
})), (!!items.length || children) && /*#__PURE__*/(0, _jsxRuntime.jsx)(Menu, _objectSpread(_objectSpread({
|
|
439
434
|
ref: refs.menu,
|
|
440
435
|
open: open,
|
|
441
|
-
portal:
|
|
436
|
+
portal: portal,
|
|
437
|
+
includeQueries: ['.onesy-more'],
|
|
438
|
+
includeParentQueries: ['.onesy-more'],
|
|
442
439
|
onClose: () => onClose(false),
|
|
443
440
|
anchorElement: refs.root.current,
|
|
444
441
|
transformOrigin: "center top",
|
|
@@ -489,21 +486,31 @@ const Select = props_ => {
|
|
|
489
486
|
if (!multiple) setOpen(false);
|
|
490
487
|
}
|
|
491
488
|
});
|
|
492
|
-
})
|
|
489
|
+
}),
|
|
490
|
+
ignoreNonExisting: true
|
|
493
491
|
}, MenuProps), {}, {
|
|
494
492
|
AppendProps: _objectSpread({
|
|
495
493
|
alignment: 'start'
|
|
496
494
|
}, MenuProps === null || MenuProps === void 0 ? void 0 : MenuProps.AppendProps),
|
|
497
|
-
ModalProps: _objectSpread({
|
|
498
|
-
|
|
495
|
+
ModalProps: _objectSpread({
|
|
496
|
+
freezeScroll: false
|
|
497
|
+
}, MenuProps === null || MenuProps === void 0 ? void 0 : MenuProps.ModalProps),
|
|
498
|
+
ListProps: _objectSpread(_objectSpread(_objectSpread({
|
|
499
499
|
menu: true,
|
|
500
500
|
size: (ListProps === null || ListProps === void 0 ? void 0 : ListProps.size) || (MenuProps === null || MenuProps === void 0 ? void 0 : MenuProps.size) || size,
|
|
501
501
|
role: 'listbox',
|
|
502
502
|
id: refs.ids.list,
|
|
503
503
|
'aria-label': name
|
|
504
|
-
},
|
|
504
|
+
}, MenuProps === null || MenuProps === void 0 ? void 0 : MenuProps.ListProps), ListProps), {}, {
|
|
505
|
+
className: (0, _styleReact.classNames)([MenuProps === null || MenuProps === void 0 || (_MenuProps$ListProps = MenuProps.ListProps) === null || _MenuProps$ListProps === void 0 ? void 0 : _MenuProps$ListProps.className, ListProps === null || ListProps === void 0 ? void 0 : ListProps.className]),
|
|
506
|
+
style: _objectSpread(_objectSpread({
|
|
507
|
+
maxHeight: 250,
|
|
508
|
+
overflow: 'hidden auto',
|
|
509
|
+
overscrollBehavior: 'contain'
|
|
510
|
+
}, MenuProps === null || MenuProps === void 0 || (_MenuProps$ListProps2 = MenuProps.ListProps) === null || _MenuProps$ListProps2 === void 0 ? void 0 : _MenuProps$ListProps2.style), ListProps === null || ListProps === void 0 ? void 0 : ListProps.style)
|
|
511
|
+
}),
|
|
505
512
|
style: _objectSpread(_objectSpread({}, styles.menu), MenuProps === null || MenuProps === void 0 ? void 0 : MenuProps.style),
|
|
506
|
-
className: (0, _styleReact.classNames)([MenuProps === null || MenuProps === void 0 ? void 0 : MenuProps.className])
|
|
513
|
+
className: (0, _styleReact.classNames)(['onesy-Select-Menu', MenuProps === null || MenuProps === void 0 ? void 0 : MenuProps.className])
|
|
507
514
|
}))]
|
|
508
515
|
}));
|
|
509
516
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
-
const _excluded = ["ref", "tonal", "color", "size", "version", "valueInput", "valueInputDefault", "onChangeInput", "value", "valueDefault", "onChange", "options", "label", "multiple", "prefix", "sufix", "start", "end", "autoWidth", "readOnly", "getLabel", "renderValues", "renderChip", "renderOption", "equal", "equalInput", "filter", "clear", "loading", "autoSelectOnBlur", "blurOnSelect", "noOptions", "noOptionsObject", "startOptionsObject", "noOptionsElement", "startOptionsElement", "endOptionsElement", "endOptionsObject", "openOnFocus", "closeOnSelect", "clearOnEscape", "groupBy", "limit", "openOnInputUpdate", "filterOutSelectedOptions", "selectOnFocus", "clearOnBlur", "clearInputOnSelect", "chip", "fullWidth", "noInputValue", "disabled", "IconClear", "IconDropdown", "WrapperProps", "ChipProps", "ListProps", "MenuProps", "IconButtonProps", "InputProps", "IconProps", "TextFieldProps", "
|
|
3
|
+
const _excluded = ["ref", "tonal", "color", "size", "version", "valueInput", "valueInputDefault", "onChangeInput", "value", "valueDefault", "onChange", "options", "label", "multiple", "prefix", "sufix", "start", "end", "autoWidth", "readOnly", "getLabel", "renderValues", "renderChip", "renderOption", "equal", "equalInput", "filter", "clear", "loading", "autoSelectOnBlur", "blurOnSelect", "noOptions", "noOptionsObject", "startOptionsObject", "noOptionsElement", "startOptionsElement", "endOptionsElement", "endOptionsObject", "openOnFocus", "closeOnSelect", "clearOnEscape", "groupBy", "limit", "openOnInputUpdate", "filterOutSelectedOptions", "selectOnFocus", "clearOnBlur", "clearInputOnSelect", "chip", "fullWidth", "noInputValue", "disabled", "portal", "IconClear", "IconDropdown", "WrapperProps", "ChipProps", "ListProps", "MenuProps", "IconButtonProps", "InputProps", "IconProps", "TextFieldProps", "className", "style", "children"];
|
|
4
4
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5
5
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
6
6
|
import React from 'react';
|
|
@@ -175,6 +175,7 @@ const AutoComplete = props_ => {
|
|
|
175
175
|
fullWidth,
|
|
176
176
|
noInputValue,
|
|
177
177
|
disabled,
|
|
178
|
+
portal = props.MenuProps?.portal ?? true,
|
|
178
179
|
IconClear = IconMaterialClose,
|
|
179
180
|
IconDropdown = IconMaterialArrowDropDown,
|
|
180
181
|
WrapperProps,
|
|
@@ -185,7 +186,6 @@ const AutoComplete = props_ => {
|
|
|
185
186
|
InputProps,
|
|
186
187
|
IconProps,
|
|
187
188
|
TextFieldProps,
|
|
188
|
-
portal = props.MenuProps?.portal ?? true,
|
|
189
189
|
className,
|
|
190
190
|
style,
|
|
191
191
|
children: children_
|
|
@@ -676,7 +676,7 @@ const AutoComplete = props_ => {
|
|
|
676
676
|
}, MenuProps?.ListProps?.style), ListProps?.style)
|
|
677
677
|
}),
|
|
678
678
|
style: _objectSpread(_objectSpread({}, styles.menu), MenuProps?.style),
|
|
679
|
-
className: classNames([MenuProps?.className])
|
|
679
|
+
className: classNames(['onesy-Select-Menu', MenuProps?.className])
|
|
680
680
|
}))]
|
|
681
681
|
}));
|
|
682
682
|
};
|
package/esm/Select/Select.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
-
const _excluded = ["ref", "tonal", "color", "size", "version", "value", "valueDefault", "onChange", "options", "name", "multiple", "prefix", "sufix", "start", "end", "autoWidth", "getLabel", "getOptionName", "fullWidth", "chip", "clear", "readOnly", "noSelectText", "disabled", "renderValues", "renderChip", "IconClear", "IconDropdown", "inputProps", "InputWrapperProps", "WrapperProps", "ChipProps", "ChiProps", "ListProps", "MenuProps", "ListItemProps", "ListItemTypeProps", "ListItemTypePrimaryProps", "ListItemTypeSecondaryProps", "IconButtonProps", "IconProps", "className", "style", "children"];
|
|
3
|
+
const _excluded = ["ref", "tonal", "color", "size", "version", "value", "valueDefault", "onChange", "options", "name", "multiple", "prefix", "sufix", "start", "end", "autoWidth", "getLabel", "getOptionName", "fullWidth", "chip", "clear", "readOnly", "noSelectText", "disabled", "portal", "renderValues", "renderChip", "IconClear", "IconDropdown", "inputProps", "InputWrapperProps", "WrapperProps", "ChipProps", "ChiProps", "ListProps", "MenuProps", "ListItemProps", "ListItemTypeProps", "ListItemTypePrimaryProps", "ListItemTypeSecondaryProps", "IconButtonProps", "IconProps", "className", "style", "children"];
|
|
4
4
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5
5
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
6
6
|
import React from 'react';
|
|
@@ -150,6 +150,7 @@ const Select = props_ => {
|
|
|
150
150
|
readOnly,
|
|
151
151
|
noSelectText,
|
|
152
152
|
disabled,
|
|
153
|
+
portal = props.MenuProps?.portal ?? true,
|
|
153
154
|
renderValues: renderValues_,
|
|
154
155
|
renderChip,
|
|
155
156
|
IconClear = IconMaterialClose,
|
|
@@ -159,13 +160,7 @@ const Select = props_ => {
|
|
|
159
160
|
WrapperProps,
|
|
160
161
|
ChipProps,
|
|
161
162
|
ChiProps,
|
|
162
|
-
ListProps
|
|
163
|
-
style: {
|
|
164
|
-
maxHeight: 250,
|
|
165
|
-
overflowY: 'auto',
|
|
166
|
-
overflowX: 'hidden'
|
|
167
|
-
}
|
|
168
|
-
},
|
|
163
|
+
ListProps,
|
|
169
164
|
MenuProps: MenuPropsProps,
|
|
170
165
|
ListItemProps,
|
|
171
166
|
ListItemTypeProps,
|
|
@@ -205,7 +200,7 @@ const Select = props_ => {
|
|
|
205
200
|
const MenuProps = _objectSpread({
|
|
206
201
|
portal: true
|
|
207
202
|
}, MenuPropsProps);
|
|
208
|
-
if (
|
|
203
|
+
if (portal && autoWidth) {
|
|
209
204
|
styles.menu.width = refs.wrapper.current?.clientWidth;
|
|
210
205
|
}
|
|
211
206
|
React.useEffect(() => {
|
|
@@ -425,7 +420,9 @@ const Select = props_ => {
|
|
|
425
420
|
})), (!!items.length || children) && /*#__PURE__*/_jsx(Menu, _objectSpread(_objectSpread({
|
|
426
421
|
ref: refs.menu,
|
|
427
422
|
open: open,
|
|
428
|
-
portal:
|
|
423
|
+
portal: portal,
|
|
424
|
+
includeQueries: ['.onesy-more'],
|
|
425
|
+
includeParentQueries: ['.onesy-more'],
|
|
429
426
|
onClose: () => onClose(false),
|
|
430
427
|
anchorElement: refs.root.current,
|
|
431
428
|
transformOrigin: "center top",
|
|
@@ -471,21 +468,31 @@ const Select = props_ => {
|
|
|
471
468
|
if (is('function', item_9.props?.onClick)) item_9.props?.onClick(event_10);
|
|
472
469
|
if (!multiple) setOpen(false);
|
|
473
470
|
}
|
|
474
|
-
})))
|
|
471
|
+
}))),
|
|
472
|
+
ignoreNonExisting: true
|
|
475
473
|
}, MenuProps), {}, {
|
|
476
474
|
AppendProps: _objectSpread({
|
|
477
475
|
alignment: 'start'
|
|
478
476
|
}, MenuProps?.AppendProps),
|
|
479
|
-
ModalProps: _objectSpread({
|
|
480
|
-
|
|
477
|
+
ModalProps: _objectSpread({
|
|
478
|
+
freezeScroll: false
|
|
479
|
+
}, MenuProps?.ModalProps),
|
|
480
|
+
ListProps: _objectSpread(_objectSpread(_objectSpread({
|
|
481
481
|
menu: true,
|
|
482
482
|
size: ListProps?.size || MenuProps?.size || size,
|
|
483
483
|
role: 'listbox',
|
|
484
484
|
id: refs.ids.list,
|
|
485
485
|
'aria-label': name
|
|
486
|
-
}, ListProps),
|
|
486
|
+
}, MenuProps?.ListProps), ListProps), {}, {
|
|
487
|
+
className: classNames([MenuProps?.ListProps?.className, ListProps?.className]),
|
|
488
|
+
style: _objectSpread(_objectSpread({
|
|
489
|
+
maxHeight: 250,
|
|
490
|
+
overflow: 'hidden auto',
|
|
491
|
+
overscrollBehavior: 'contain'
|
|
492
|
+
}, MenuProps?.ListProps?.style), ListProps?.style)
|
|
493
|
+
}),
|
|
487
494
|
style: _objectSpread(_objectSpread({}, styles.menu), MenuProps?.style),
|
|
488
|
-
className: classNames([MenuProps?.className])
|
|
495
|
+
className: classNames(['onesy-Select-Menu', MenuProps?.className])
|
|
489
496
|
}))]
|
|
490
497
|
}));
|
|
491
498
|
};
|
package/esm/index.js
CHANGED
package/index.js
CHANGED