@onesy/ui-react 1.0.202 → 1.0.203
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.d.ts +2 -0
- package/AutoComplete/AutoComplete.js +32 -23
- package/AutoCompleteCountry/AutoCompleteCountry.js +1 -0
- package/AutoCompleteCurrency/AutoCompleteCurrency.js +1 -0
- package/esm/AutoComplete/AutoComplete.js +31 -22
- package/esm/AutoCompleteCountry/AutoCompleteCountry.js +1 -0
- package/esm/AutoCompleteCurrency/AutoCompleteCurrency.js +1 -0
- package/esm/index.js +1 -1
- package/index.js +1 -1
- package/package.json +1 -1
|
@@ -47,6 +47,7 @@ export declare type IAutoComplete = Omit<ITextField, 'onChange'> & {
|
|
|
47
47
|
selectOnFocus?: boolean;
|
|
48
48
|
clearOnBlur?: boolean;
|
|
49
49
|
noInputValue?: boolean;
|
|
50
|
+
portal?: boolean;
|
|
50
51
|
IconClear?: IElementReference;
|
|
51
52
|
IconDropdown?: IElementReference;
|
|
52
53
|
WrapperProps?: IPropsAny;
|
|
@@ -56,6 +57,7 @@ export declare type IAutoComplete = Omit<ITextField, 'onChange'> & {
|
|
|
56
57
|
IconButtonProps?: IPropsAny;
|
|
57
58
|
InputProps?: IPropsAny;
|
|
58
59
|
IconProps?: IPropsAny;
|
|
60
|
+
TextFieldProps?: IPropsAny;
|
|
59
61
|
};
|
|
60
62
|
declare const AutoComplete: React.FC<IAutoComplete>;
|
|
61
63
|
export default AutoComplete;
|
|
@@ -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", "className", "style", "children"];
|
|
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", "portal", "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 => ({
|
|
@@ -116,7 +116,7 @@ const getText = value => {
|
|
|
116
116
|
};
|
|
117
117
|
const getValue = value => (value === null || value === void 0 ? void 0 : value.value) !== undefined ? value.value : value;
|
|
118
118
|
const AutoComplete = props_ => {
|
|
119
|
-
var _theme$ui, _theme$ui2, _theme$elements, _theme$elements2, _theme$elements3, _theme$elements4, _theme$elements5, _theme$elements6, _theme$elements7, _theme$elements8, _theme$elements9, _theme$elements0;
|
|
119
|
+
var _theme$ui, _theme$ui2, _theme$elements, _theme$elements2, _theme$elements3, _theme$elements4, _theme$elements5, _theme$elements6, _theme$elements7, _theme$elements8, _theme$elements9, _theme$elements0, _props$MenuProps$port, _props$MenuProps, _TextFieldProps$Input, _MenuProps$ListProps, _MenuProps$ListProps2;
|
|
120
120
|
const theme = (0, _styleReact.useOnesyTheme)();
|
|
121
121
|
const l = theme.l;
|
|
122
122
|
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.onesyAutoComplete) === null || _theme$ui2 === void 0 || (_theme$ui2 = _theme$ui2.props) === null || _theme$ui2 === void 0 ? void 0 : _theme$ui2.default), props_);
|
|
@@ -192,6 +192,8 @@ const AutoComplete = props_ => {
|
|
|
192
192
|
IconButtonProps,
|
|
193
193
|
InputProps,
|
|
194
194
|
IconProps,
|
|
195
|
+
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,
|
|
195
197
|
className,
|
|
196
198
|
style,
|
|
197
199
|
children: children_
|
|
@@ -228,7 +230,7 @@ const AutoComplete = props_ => {
|
|
|
228
230
|
root: {},
|
|
229
231
|
menu: {}
|
|
230
232
|
};
|
|
231
|
-
if (
|
|
233
|
+
if (portal && autoWidth) {
|
|
232
234
|
var _refs$wrapper$current;
|
|
233
235
|
styles.menu.width = (_refs$wrapper$current = refs.wrapper.current) === null || _refs$wrapper$current === void 0 ? void 0 : _refs$wrapper$current.clientWidth;
|
|
234
236
|
}
|
|
@@ -594,7 +596,7 @@ const AutoComplete = props_ => {
|
|
|
594
596
|
fullWidth: fullWidth
|
|
595
597
|
}, WrapperProps), {}, {
|
|
596
598
|
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('AutoComplete', theme) && ['onesy-AutoComplete-wrapper', fullWidth && 'onesy-full-width'], WrapperProps === null || WrapperProps === void 0 ? void 0 : WrapperProps.className, classes.wrapper]),
|
|
597
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(TextField, _objectSpread(_objectSpread({
|
|
599
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(TextField, _objectSpread(_objectSpread(_objectSpread({
|
|
598
600
|
ref: refs.input,
|
|
599
601
|
rootRef: item_11 => {
|
|
600
602
|
if (ref) {
|
|
@@ -629,21 +631,22 @@ const AutoComplete = props_ => {
|
|
|
629
631
|
"aria-labelledby": label,
|
|
630
632
|
"aria-disabled": disabled,
|
|
631
633
|
fullWidth: fullWidth,
|
|
632
|
-
disabled: disabled
|
|
633
|
-
|
|
634
|
-
|
|
634
|
+
disabled: disabled
|
|
635
|
+
}, TextFieldProps), {}, {
|
|
636
|
+
InputWrapperProps: _objectSpread(_objectSpread({}, TextFieldProps === null || TextFieldProps === void 0 ? void 0 : TextFieldProps.InputWrapperProps), {}, {
|
|
637
|
+
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('AutoComplete', theme) && ['onesy-AutoComplete-input-wrapper'], TextFieldProps === null || TextFieldProps === void 0 || (_TextFieldProps$Input = TextFieldProps.InputWrapperProps) === null || _TextFieldProps$Input === void 0 ? void 0 : _TextFieldProps$Input.className, classes.inputWrapper, multiple && [classes.multiple, classes[`inputWrapper_multiple_size_${size}`]], chip && classes.chip, open && classes.open, readOnly && classes.readOnly]),
|
|
635
638
|
onMouseDown,
|
|
636
639
|
onMouseUp,
|
|
637
640
|
onClick,
|
|
638
641
|
onKeyDown: onEnterKeyDown
|
|
639
|
-
},
|
|
640
|
-
inputProps: _objectSpread(_objectSpread({
|
|
642
|
+
}),
|
|
643
|
+
inputProps: _objectSpread(_objectSpread(_objectSpread({}, TextFieldProps === null || TextFieldProps === void 0 ? void 0 : TextFieldProps.inputProps), {}, {
|
|
641
644
|
disabled: multiple,
|
|
642
645
|
readOnly: multiple
|
|
643
646
|
}, InputProps), {}, {
|
|
644
647
|
className: (0, _styleReact.classNames)([InputProps === null || InputProps === void 0 ? void 0 : InputProps.className, multiple && classes.input_])
|
|
645
648
|
}),
|
|
646
|
-
style: _objectSpread(_objectSpread({}, styles.root), style)
|
|
649
|
+
style: _objectSpread(_objectSpread(_objectSpread({}, styles.root), TextFieldProps === null || TextFieldProps === void 0 ? void 0 : TextFieldProps.style), style)
|
|
647
650
|
}, other), {}, {
|
|
648
651
|
children: [!noInputValue && multiple && !chip && !!value.length && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
649
652
|
ref: refs.value,
|
|
@@ -659,7 +662,9 @@ const AutoComplete = props_ => {
|
|
|
659
662
|
ref: refs.menu,
|
|
660
663
|
open: open && !!(menuItems !== null && menuItems !== void 0 && menuItems.length),
|
|
661
664
|
autoSelectOnBlur: autoSelectOnBlur,
|
|
662
|
-
portal:
|
|
665
|
+
portal: portal,
|
|
666
|
+
includeQueries: ['.onesy-more'],
|
|
667
|
+
includeParentQueries: ['.onesy-more'],
|
|
663
668
|
onClose: () => onClose(false),
|
|
664
669
|
anchorElement: refs.root.current,
|
|
665
670
|
onExited: onExited,
|
|
@@ -667,26 +672,30 @@ const AutoComplete = props_ => {
|
|
|
667
672
|
transformOrigin: "center top",
|
|
668
673
|
transformOriginSwitch: "center bottom",
|
|
669
674
|
maxWidth: "unset",
|
|
670
|
-
|
|
675
|
+
ignoreNonExisting: true
|
|
676
|
+
}, MenuProps), {}, {
|
|
677
|
+
AppendProps: _objectSpread({
|
|
671
678
|
alignment: 'start'
|
|
672
|
-
},
|
|
673
|
-
ModalProps: {
|
|
674
|
-
// focus: !MenuProps.portal
|
|
675
|
-
|
|
679
|
+
}, MenuProps === null || MenuProps === void 0 ? void 0 : MenuProps.AppendProps),
|
|
680
|
+
ModalProps: _objectSpread({
|
|
676
681
|
freezeScroll: false
|
|
677
|
-
},
|
|
678
|
-
ListProps: _objectSpread(_objectSpread({
|
|
682
|
+
}, MenuProps === null || MenuProps === void 0 ? void 0 : MenuProps.ModalProps),
|
|
683
|
+
ListProps: _objectSpread(_objectSpread(_objectSpread({
|
|
679
684
|
menu: true,
|
|
680
685
|
paddingVertical: (0, _utils.is)('function', groupBy) && !!options.length ? 'none' : undefined,
|
|
681
686
|
size,
|
|
682
687
|
role: 'listbox',
|
|
683
688
|
id: refs.ids.list,
|
|
684
689
|
'aria-label': label
|
|
685
|
-
}, ListProps), {}, {
|
|
686
|
-
className: (0, _styleReact.classNames)([ListProps === null || ListProps === void 0 ? void 0 : ListProps.className, classes.list])
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
+
}, MenuProps === null || MenuProps === void 0 ? void 0 : MenuProps.ListProps), ListProps), {}, {
|
|
691
|
+
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, classes.list]),
|
|
692
|
+
style: _objectSpread(_objectSpread({
|
|
693
|
+
maxHeight: 250,
|
|
694
|
+
overflow: 'hidden auto',
|
|
695
|
+
overscrollBehavior: 'contain'
|
|
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
|
+
}),
|
|
698
|
+
style: _objectSpread(_objectSpread({}, styles.menu), MenuProps === null || MenuProps === void 0 ? void 0 : MenuProps.style),
|
|
690
699
|
className: (0, _styleReact.classNames)([MenuProps === null || MenuProps === void 0 ? void 0 : MenuProps.className])
|
|
691
700
|
}))]
|
|
692
701
|
}));
|
|
@@ -66,6 +66,7 @@ const AutoCompleteCountry = props_ => {
|
|
|
66
66
|
return valueInputDefault_ !== undefined ? valueInputDefault_ : (_options$find = options.find(item_0 => item_0.value === (value !== undefined ? value : valueDefault))) === null || _options$find === void 0 ? void 0 : _options$find.name;
|
|
67
67
|
}, []);
|
|
68
68
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(AutoComplete, _objectSpread({
|
|
69
|
+
name: l('Select a country'),
|
|
69
70
|
valueInputDefault: valueInputDefault,
|
|
70
71
|
valueDefault: valueDefault,
|
|
71
72
|
value: value,
|
|
@@ -60,6 +60,7 @@ const AutoCompleteCurrency = props_ => {
|
|
|
60
60
|
return valueInputDefault_ !== undefined ? valueInputDefault_ : (_options$find = options.find(item_0 => item_0.value === (other.value !== undefined ? other.value : other.valueDefault))) === null || _options$find === void 0 ? void 0 : _options$find.name;
|
|
61
61
|
}, []);
|
|
62
62
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(AutoComplete, _objectSpread({
|
|
63
|
+
name: l('Select a currency'),
|
|
63
64
|
valueInputDefault: valueInputDefault,
|
|
64
65
|
options: options,
|
|
65
66
|
size: size,
|
|
@@ -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", "className", "style", "children"];
|
|
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", "portal", "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';
|
|
@@ -184,6 +184,8 @@ const AutoComplete = props_ => {
|
|
|
184
184
|
IconButtonProps,
|
|
185
185
|
InputProps,
|
|
186
186
|
IconProps,
|
|
187
|
+
TextFieldProps,
|
|
188
|
+
portal = props.MenuProps?.portal ?? true,
|
|
187
189
|
className,
|
|
188
190
|
style,
|
|
189
191
|
children: children_
|
|
@@ -220,7 +222,7 @@ const AutoComplete = props_ => {
|
|
|
220
222
|
root: {},
|
|
221
223
|
menu: {}
|
|
222
224
|
};
|
|
223
|
-
if (
|
|
225
|
+
if (portal && autoWidth) {
|
|
224
226
|
styles.menu.width = refs.wrapper.current?.clientWidth;
|
|
225
227
|
}
|
|
226
228
|
React.useEffect(() => {
|
|
@@ -574,7 +576,7 @@ const AutoComplete = props_ => {
|
|
|
574
576
|
fullWidth: fullWidth
|
|
575
577
|
}, WrapperProps), {}, {
|
|
576
578
|
className: classNames([staticClassName('AutoComplete', theme) && ['onesy-AutoComplete-wrapper', fullWidth && 'onesy-full-width'], WrapperProps?.className, classes.wrapper]),
|
|
577
|
-
children: [/*#__PURE__*/_jsxs(TextField, _objectSpread(_objectSpread({
|
|
579
|
+
children: [/*#__PURE__*/_jsxs(TextField, _objectSpread(_objectSpread(_objectSpread({
|
|
578
580
|
ref: refs.input,
|
|
579
581
|
rootRef: item_11 => {
|
|
580
582
|
if (ref) {
|
|
@@ -609,21 +611,22 @@ const AutoComplete = props_ => {
|
|
|
609
611
|
"aria-labelledby": label,
|
|
610
612
|
"aria-disabled": disabled,
|
|
611
613
|
fullWidth: fullWidth,
|
|
612
|
-
disabled: disabled
|
|
613
|
-
|
|
614
|
-
|
|
614
|
+
disabled: disabled
|
|
615
|
+
}, TextFieldProps), {}, {
|
|
616
|
+
InputWrapperProps: _objectSpread(_objectSpread({}, TextFieldProps?.InputWrapperProps), {}, {
|
|
617
|
+
className: classNames([staticClassName('AutoComplete', theme) && ['onesy-AutoComplete-input-wrapper'], TextFieldProps?.InputWrapperProps?.className, classes.inputWrapper, multiple && [classes.multiple, classes[`inputWrapper_multiple_size_${size}`]], chip && classes.chip, open && classes.open, readOnly && classes.readOnly]),
|
|
615
618
|
onMouseDown,
|
|
616
619
|
onMouseUp,
|
|
617
620
|
onClick,
|
|
618
621
|
onKeyDown: onEnterKeyDown
|
|
619
|
-
},
|
|
620
|
-
inputProps: _objectSpread(_objectSpread({
|
|
622
|
+
}),
|
|
623
|
+
inputProps: _objectSpread(_objectSpread(_objectSpread({}, TextFieldProps?.inputProps), {}, {
|
|
621
624
|
disabled: multiple,
|
|
622
625
|
readOnly: multiple
|
|
623
626
|
}, InputProps), {}, {
|
|
624
627
|
className: classNames([InputProps?.className, multiple && classes.input_])
|
|
625
628
|
}),
|
|
626
|
-
style: _objectSpread(_objectSpread({}, styles.root), style)
|
|
629
|
+
style: _objectSpread(_objectSpread(_objectSpread({}, styles.root), TextFieldProps?.style), style)
|
|
627
630
|
}, other), {}, {
|
|
628
631
|
children: [!noInputValue && multiple && !chip && !!value.length && /*#__PURE__*/_jsx("div", {
|
|
629
632
|
ref: refs.value,
|
|
@@ -639,7 +642,9 @@ const AutoComplete = props_ => {
|
|
|
639
642
|
ref: refs.menu,
|
|
640
643
|
open: open && !!menuItems?.length,
|
|
641
644
|
autoSelectOnBlur: autoSelectOnBlur,
|
|
642
|
-
portal:
|
|
645
|
+
portal: portal,
|
|
646
|
+
includeQueries: ['.onesy-more'],
|
|
647
|
+
includeParentQueries: ['.onesy-more'],
|
|
643
648
|
onClose: () => onClose(false),
|
|
644
649
|
anchorElement: refs.root.current,
|
|
645
650
|
onExited: onExited,
|
|
@@ -647,26 +652,30 @@ const AutoComplete = props_ => {
|
|
|
647
652
|
transformOrigin: "center top",
|
|
648
653
|
transformOriginSwitch: "center bottom",
|
|
649
654
|
maxWidth: "unset",
|
|
650
|
-
|
|
655
|
+
ignoreNonExisting: true
|
|
656
|
+
}, MenuProps), {}, {
|
|
657
|
+
AppendProps: _objectSpread({
|
|
651
658
|
alignment: 'start'
|
|
652
|
-
},
|
|
653
|
-
ModalProps: {
|
|
654
|
-
// focus: !MenuProps.portal
|
|
655
|
-
|
|
659
|
+
}, MenuProps?.AppendProps),
|
|
660
|
+
ModalProps: _objectSpread({
|
|
656
661
|
freezeScroll: false
|
|
657
|
-
},
|
|
658
|
-
ListProps: _objectSpread(_objectSpread({
|
|
662
|
+
}, MenuProps?.ModalProps),
|
|
663
|
+
ListProps: _objectSpread(_objectSpread(_objectSpread({
|
|
659
664
|
menu: true,
|
|
660
665
|
paddingVertical: is('function', groupBy) && !!options.length ? 'none' : undefined,
|
|
661
666
|
size,
|
|
662
667
|
role: 'listbox',
|
|
663
668
|
id: refs.ids.list,
|
|
664
669
|
'aria-label': label
|
|
665
|
-
}, ListProps), {}, {
|
|
666
|
-
className: classNames([ListProps?.className, classes.list])
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
+
}, MenuProps?.ListProps), ListProps), {}, {
|
|
671
|
+
className: classNames([MenuProps?.ListProps?.className, ListProps?.className, classes.list]),
|
|
672
|
+
style: _objectSpread(_objectSpread({
|
|
673
|
+
maxHeight: 250,
|
|
674
|
+
overflow: 'hidden auto',
|
|
675
|
+
overscrollBehavior: 'contain'
|
|
676
|
+
}, MenuProps?.ListProps?.style), ListProps?.style)
|
|
677
|
+
}),
|
|
678
|
+
style: _objectSpread(_objectSpread({}, styles.menu), MenuProps?.style),
|
|
670
679
|
className: classNames([MenuProps?.className])
|
|
671
680
|
}))]
|
|
672
681
|
}));
|
|
@@ -57,6 +57,7 @@ const AutoCompleteCountry = props_ => {
|
|
|
57
57
|
return valueInputDefault_ !== undefined ? valueInputDefault_ : options.find(item_0 => item_0.value === (value !== undefined ? value : valueDefault))?.name;
|
|
58
58
|
}, []);
|
|
59
59
|
return /*#__PURE__*/_jsx(AutoComplete, _objectSpread({
|
|
60
|
+
name: l('Select a country'),
|
|
60
61
|
valueInputDefault: valueInputDefault,
|
|
61
62
|
valueDefault: valueDefault,
|
|
62
63
|
value: value,
|
|
@@ -51,6 +51,7 @@ const AutoCompleteCurrency = props_ => {
|
|
|
51
51
|
return valueInputDefault_ !== undefined ? valueInputDefault_ : options.find(item_0 => item_0.value === (other.value !== undefined ? other.value : other.valueDefault))?.name;
|
|
52
52
|
}, []);
|
|
53
53
|
return /*#__PURE__*/_jsx(AutoComplete, _objectSpread({
|
|
54
|
+
name: l('Select a currency'),
|
|
54
55
|
valueInputDefault: valueInputDefault,
|
|
55
56
|
options: options,
|
|
56
57
|
size: size,
|
package/esm/index.js
CHANGED
package/index.js
CHANGED