@mw-kit/mw-ui 1.7.93 → 1.7.94
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/Input/components/Select/hooks/Select/index.d.ts +3 -4
- package/dist/components/Input/components/Select/hooks/SelectMultiple/index.d.ts +3 -4
- package/dist/components/Input/components/Select/hooks/interfaces.d.ts +1 -0
- package/dist/components/Menu/interfaces.d.ts +5 -1
- package/dist/index.js +6 -7
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +6 -7
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -13038,8 +13038,6 @@ var MenuComponent = function MenuComponent(props, ref) {
|
|
|
13038
13038
|
var absoluteContainerProps = filterObject(props, ['scrollSpacing', 'scrollTabIndex', 'label', 'rules', 'onClickOption', 'onScrollEnd', 'before', 'after', 'close', 'options', 'loading', 'children', 'emptyContent', 'highlight'], {
|
|
13039
13039
|
itemSpacing: 's1'
|
|
13040
13040
|
});
|
|
13041
|
-
var rules = props.rules || [];
|
|
13042
|
-
var LabelComponent = props.label || EmptyLabel;
|
|
13043
13041
|
return React__default.createElement(Container$2, Object.assign({}, absoluteContainerProps, {
|
|
13044
13042
|
ref: ref
|
|
13045
13043
|
}), React__default.createElement(React__default.Fragment, null, React__default.createElement(ScrollContainer, {
|
|
@@ -13071,14 +13069,14 @@ var MenuComponent = function MenuComponent(props, ref) {
|
|
|
13071
13069
|
};
|
|
13072
13070
|
|
|
13073
13071
|
if (!disabled) {
|
|
13074
|
-
var rule = rules.map(function (rule) {
|
|
13072
|
+
var rule = (option.rules || props.rules || []).map(function (rule) {
|
|
13075
13073
|
return rule(index, data);
|
|
13076
13074
|
}).find(function (result) {
|
|
13077
13075
|
return result !== true;
|
|
13078
13076
|
});
|
|
13079
13077
|
|
|
13080
13078
|
if (rule === true || rule === undefined) {
|
|
13081
|
-
var _onClick = props.onClickOption || function () {};
|
|
13079
|
+
var _onClick = option.onClick || props.onClickOption || function () {};
|
|
13082
13080
|
|
|
13083
13081
|
onClick = function onClick(e) {
|
|
13084
13082
|
_onClick(index, option.data, e);
|
|
@@ -13111,6 +13109,7 @@ var MenuComponent = function MenuComponent(props, ref) {
|
|
|
13111
13109
|
}
|
|
13112
13110
|
|
|
13113
13111
|
OptionContent.displayName = 'OptionContent';
|
|
13112
|
+
var LabelComponent = option.labelComponent || props.label || EmptyLabel;
|
|
13114
13113
|
return React__default.createElement(React__default.Fragment, {
|
|
13115
13114
|
key: index
|
|
13116
13115
|
}, React__default.createElement(OptionContent, null, React__default.createElement(Option, {
|
|
@@ -14702,11 +14701,11 @@ var useNavigation = function useNavigation(props) {
|
|
|
14702
14701
|
}
|
|
14703
14702
|
}, [highlight, options, rules]);
|
|
14704
14703
|
|
|
14705
|
-
var onFocus = function onFocus(
|
|
14704
|
+
var onFocus = function onFocus() {
|
|
14706
14705
|
setHighlight(0);
|
|
14707
14706
|
};
|
|
14708
14707
|
|
|
14709
|
-
var onBlur = function onBlur(
|
|
14708
|
+
var onBlur = function onBlur() {
|
|
14710
14709
|
setHighlight(-1);
|
|
14711
14710
|
};
|
|
14712
14711
|
|
|
@@ -15056,7 +15055,7 @@ var parseValue = function parseValue(value) {
|
|
|
15056
15055
|
return parsed;
|
|
15057
15056
|
};
|
|
15058
15057
|
|
|
15059
|
-
var useSelectMultiple = function useSelectMultiple(props, _ref, _ref2
|
|
15058
|
+
var useSelectMultiple = function useSelectMultiple(props, _ref, _ref2) {
|
|
15060
15059
|
var highlight = _ref[0],
|
|
15061
15060
|
setHighlight = _ref[1];
|
|
15062
15061
|
var options = _ref2[0],
|