@mw-kit/mw-ui 1.7.110 → 1.7.112
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.
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ReactNode, SpacingOrZero, Spacings, ThemeInterface } from '../../interfaces';
|
|
3
|
+
import { LoaderProps } from '../Loader/interfaces';
|
|
3
4
|
declare type Common = React.HTMLAttributes<HTMLDivElement> & {
|
|
4
5
|
height?: string;
|
|
5
6
|
maxHeight?: string;
|
|
@@ -29,6 +30,6 @@ export interface ScrollContainerProps extends Common {
|
|
|
29
30
|
empty: boolean;
|
|
30
31
|
content: ReactNode;
|
|
31
32
|
};
|
|
32
|
-
loading?: boolean;
|
|
33
|
+
loading?: boolean | LoaderProps;
|
|
33
34
|
}
|
|
34
35
|
export {};
|
package/dist/index.js
CHANGED
|
@@ -12479,12 +12479,19 @@ var Input$1 = React__default.forwardRef(function (props, ref) {
|
|
|
12479
12479
|
var setValue = props.setValue || function () {};
|
|
12480
12480
|
|
|
12481
12481
|
inputProps.onChange = function (event) {
|
|
12482
|
-
var
|
|
12483
|
-
|
|
12484
|
-
event.target.value
|
|
12482
|
+
var masked = mask(event.target.value);
|
|
12483
|
+
|
|
12484
|
+
var _ref = event.target.selectionStart === event.target.selectionEnd && event.target.selectionEnd === event.target.value.length ? [masked.length, masked.length] : [event.target.selectionStart, event.target.selectionEnd],
|
|
12485
|
+
start = _ref[0],
|
|
12486
|
+
end = _ref[1];
|
|
12487
|
+
|
|
12488
|
+
event.target.value = masked;
|
|
12485
12489
|
onChange(event);
|
|
12486
12490
|
setValue(event.target.value);
|
|
12487
|
-
|
|
12491
|
+
|
|
12492
|
+
if (['text', 'search', 'url', 'password'].includes(event.target.type)) {
|
|
12493
|
+
event.target.setSelectionRange(start, end);
|
|
12494
|
+
}
|
|
12488
12495
|
};
|
|
12489
12496
|
|
|
12490
12497
|
if (inputProps.onKeyDown || onPressEnter) {
|
|
@@ -12927,9 +12934,9 @@ var ScrollContainer = React__default.forwardRef(function (props, ref) {
|
|
|
12927
12934
|
}
|
|
12928
12935
|
}, props.empty && props.empty.empty ? {
|
|
12929
12936
|
children: props.empty.content
|
|
12930
|
-
} : {})), loading && React__default.createElement(Loader, {
|
|
12937
|
+
} : {})), loading && React__default.createElement(Loader, Object.assign({
|
|
12931
12938
|
filled: true
|
|
12932
|
-
})), getBeforeAfter(props.after));
|
|
12939
|
+
}, loading === true ? {} : loading))), getBeforeAfter(props.after));
|
|
12933
12940
|
});
|
|
12934
12941
|
ScrollContainer.displayName = 'ScrollContainer';
|
|
12935
12942
|
|