@rescui/select 0.11.7 → 0.11.9
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/lib/_virtual/check.js +8 -9
- package/lib/_virtual/close.js +8 -9
- package/lib/_virtual/down.js +8 -9
- package/lib/_virtual/index.css.js +7 -7
- package/lib/_virtual/loading.js +8 -9
- package/lib/_virtual/warning.js +8 -9
- package/lib/common-prop-types.js +6 -6
- package/lib/index.css +184 -263
- package/lib/key-codes.js +7 -7
- package/lib/parts/common-select.p.module.css.js +12 -12
- package/lib/parts/foldable.js +158 -220
- package/lib/parts/form-trigger-wrapper.js +20 -16
- package/lib/parts/form-trigger.p.module.css.js +10 -10
- package/lib/parts/multiselect.js +130 -201
- package/lib/parts/native-select.js +85 -117
- package/lib/parts/native-select.p.module.css.js +6 -6
- package/lib/parts/throttle.js +9 -12
- package/lib/parts/trigger.js +86 -118
- package/lib/parts/trigger.p.module.css.js +27 -27
- package/lib/parts/use-observable-force-rerender.js +5 -12
- package/lib/select.js +118 -195
- package/lib/utils.js +44 -90
- package/package.json +10 -11
package/lib/_virtual/check.js
CHANGED
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
import _extends from '@babel/runtime-corejs3/helpers/esm/extends';
|
|
2
|
-
import _objectWithoutProperties from '@babel/runtime-corejs3/helpers/esm/objectWithoutProperties';
|
|
3
2
|
import React from 'react';
|
|
4
3
|
import PropTypes from 'prop-types';
|
|
5
4
|
import cn from 'classnames';
|
|
6
5
|
import styles from './index.css.js';
|
|
7
|
-
|
|
8
|
-
var sizeStyles = {
|
|
6
|
+
const sizeStyles = {
|
|
9
7
|
"xs": styles.sizeXS,
|
|
10
8
|
"s": styles.sizeS,
|
|
11
9
|
"m": styles.sizeM,
|
|
12
10
|
"l": styles.sizeL
|
|
13
11
|
};
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
12
|
+
const CheckIcon = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
13
|
+
let {
|
|
14
|
+
theme,
|
|
15
|
+
size,
|
|
16
|
+
className,
|
|
17
|
+
...props
|
|
18
|
+
} = _ref;
|
|
20
19
|
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
21
20
|
viewBox: "0 0 24 24"
|
|
22
21
|
}, props, {
|
package/lib/_virtual/close.js
CHANGED
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
import _extends from '@babel/runtime-corejs3/helpers/esm/extends';
|
|
2
|
-
import _objectWithoutProperties from '@babel/runtime-corejs3/helpers/esm/objectWithoutProperties';
|
|
3
2
|
import React from 'react';
|
|
4
3
|
import PropTypes from 'prop-types';
|
|
5
4
|
import cn from 'classnames';
|
|
6
5
|
import styles from './index.css.js';
|
|
7
|
-
|
|
8
|
-
var sizeStyles = {
|
|
6
|
+
const sizeStyles = {
|
|
9
7
|
"xs": styles.sizeXS,
|
|
10
8
|
"s": styles.sizeS,
|
|
11
9
|
"m": styles.sizeM,
|
|
12
10
|
"l": styles.sizeL
|
|
13
11
|
};
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
12
|
+
const CloseIcon = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
13
|
+
let {
|
|
14
|
+
theme,
|
|
15
|
+
size,
|
|
16
|
+
className,
|
|
17
|
+
...props
|
|
18
|
+
} = _ref;
|
|
20
19
|
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
21
20
|
viewBox: "0 0 24 24"
|
|
22
21
|
}, props, {
|
package/lib/_virtual/down.js
CHANGED
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
import _extends from '@babel/runtime-corejs3/helpers/esm/extends';
|
|
2
|
-
import _objectWithoutProperties from '@babel/runtime-corejs3/helpers/esm/objectWithoutProperties';
|
|
3
2
|
import React from 'react';
|
|
4
3
|
import PropTypes from 'prop-types';
|
|
5
4
|
import cn from 'classnames';
|
|
6
5
|
import styles from './index.css.js';
|
|
7
|
-
|
|
8
|
-
var sizeStyles = {
|
|
6
|
+
const sizeStyles = {
|
|
9
7
|
"xs": styles.sizeXS,
|
|
10
8
|
"s": styles.sizeS,
|
|
11
9
|
"m": styles.sizeM,
|
|
12
10
|
"l": styles.sizeL
|
|
13
11
|
};
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
12
|
+
const DownIcon = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
13
|
+
let {
|
|
14
|
+
theme,
|
|
15
|
+
size,
|
|
16
|
+
className,
|
|
17
|
+
...props
|
|
18
|
+
} = _ref;
|
|
20
19
|
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
21
20
|
viewBox: "0 0 24 24"
|
|
22
21
|
}, props, {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
var styles = {
|
|
2
|
-
"icon": "
|
|
3
|
-
"sizeXS": "
|
|
4
|
-
"sizeS": "
|
|
5
|
-
"sizeM": "
|
|
6
|
-
"sizeL": "
|
|
7
|
-
"light": "
|
|
8
|
-
"dark": "
|
|
2
|
+
"icon": "_icon_521zrc_4",
|
|
3
|
+
"sizeXS": "_sizeXS_521zrc_14",
|
|
4
|
+
"sizeS": "_sizeS_521zrc_18",
|
|
5
|
+
"sizeM": "_sizeM_521zrc_22",
|
|
6
|
+
"sizeL": "_sizeL_521zrc_26",
|
|
7
|
+
"light": "_light_521zrc_30",
|
|
8
|
+
"dark": "_dark_521zrc_34"
|
|
9
9
|
};
|
|
10
10
|
export { styles as default };
|
package/lib/_virtual/loading.js
CHANGED
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
import _extends from '@babel/runtime-corejs3/helpers/esm/extends';
|
|
2
|
-
import _objectWithoutProperties from '@babel/runtime-corejs3/helpers/esm/objectWithoutProperties';
|
|
3
2
|
import React from 'react';
|
|
4
3
|
import PropTypes from 'prop-types';
|
|
5
4
|
import cn from 'classnames';
|
|
6
5
|
import styles from './index.css.js';
|
|
7
|
-
|
|
8
|
-
var sizeStyles = {
|
|
6
|
+
const sizeStyles = {
|
|
9
7
|
"xs": styles.sizeXS,
|
|
10
8
|
"s": styles.sizeS,
|
|
11
9
|
"m": styles.sizeM,
|
|
12
10
|
"l": styles.sizeL
|
|
13
11
|
};
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
12
|
+
const LoadingIcon = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
13
|
+
let {
|
|
14
|
+
theme,
|
|
15
|
+
size,
|
|
16
|
+
className,
|
|
17
|
+
...props
|
|
18
|
+
} = _ref;
|
|
20
19
|
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
21
20
|
viewBox: "0 0 24 24"
|
|
22
21
|
}, props, {
|
package/lib/_virtual/warning.js
CHANGED
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
import _extends from '@babel/runtime-corejs3/helpers/esm/extends';
|
|
2
|
-
import _objectWithoutProperties from '@babel/runtime-corejs3/helpers/esm/objectWithoutProperties';
|
|
3
2
|
import React from 'react';
|
|
4
3
|
import PropTypes from 'prop-types';
|
|
5
4
|
import cn from 'classnames';
|
|
6
5
|
import styles from './index.css.js';
|
|
7
|
-
|
|
8
|
-
var sizeStyles = {
|
|
6
|
+
const sizeStyles = {
|
|
9
7
|
"xs": styles.sizeXS,
|
|
10
8
|
"s": styles.sizeS,
|
|
11
9
|
"m": styles.sizeM,
|
|
12
10
|
"l": styles.sizeL
|
|
13
11
|
};
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
12
|
+
const WarningIcon = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
13
|
+
let {
|
|
14
|
+
theme,
|
|
15
|
+
size,
|
|
16
|
+
className,
|
|
17
|
+
...props
|
|
18
|
+
} = _ref;
|
|
20
19
|
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
21
20
|
viewBox: "0 0 24 24"
|
|
22
21
|
}, props, {
|
package/lib/common-prop-types.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
|
-
|
|
2
|
+
const optionType = PropTypes.shape({
|
|
3
3
|
label: PropTypes.string.isRequired,
|
|
4
4
|
value: PropTypes.string
|
|
5
5
|
});
|
|
6
|
-
|
|
6
|
+
const optionsGroupType = PropTypes.shape({
|
|
7
7
|
label: PropTypes.string,
|
|
8
8
|
options: PropTypes.arrayOf(optionType)
|
|
9
9
|
});
|
|
10
|
-
|
|
10
|
+
const nativeOptionType = PropTypes.shape({
|
|
11
11
|
label: PropTypes.string.isRequired,
|
|
12
12
|
value: PropTypes.string,
|
|
13
13
|
disabled: PropTypes.bool
|
|
14
14
|
});
|
|
15
|
-
|
|
15
|
+
const nativeOptionsGroupType = PropTypes.shape({
|
|
16
16
|
label: PropTypes.string,
|
|
17
17
|
disabled: PropTypes.bool,
|
|
18
18
|
options: PropTypes.arrayOf(optionType)
|
|
19
19
|
});
|
|
20
|
-
|
|
20
|
+
const noOptionsMessageConfigType = PropTypes.shape({
|
|
21
21
|
noOptions: PropTypes.string.isRequired,
|
|
22
22
|
nothingFound: PropTypes.string,
|
|
23
23
|
loading: PropTypes.string
|
|
24
24
|
});
|
|
25
|
-
|
|
25
|
+
const noOptionsMessageType = PropTypes.oneOfType([PropTypes.string, noOptionsMessageConfigType]);
|
|
26
26
|
export { nativeOptionType, nativeOptionsGroupType, noOptionsMessageConfigType, noOptionsMessageType, optionType, optionsGroupType };
|