@rescui/select 0.10.3 → 0.11.0

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.
@@ -0,0 +1,37 @@
1
+ import _extends from '@babel/runtime-corejs3/helpers/esm/extends';
2
+ import _objectWithoutProperties from '@babel/runtime-corejs3/helpers/esm/objectWithoutProperties';
3
+ import React from 'react';
4
+ import PropTypes from 'prop-types';
5
+ import cn from 'classnames';
6
+ import styles from './index.css.js';
7
+ var _excluded = ["theme", "size", "className"];
8
+ var sizeStyles = {
9
+ "xs": styles.sizeXS,
10
+ "s": styles.sizeS,
11
+ "m": styles.sizeM,
12
+ "l": styles.sizeL
13
+ };
14
+ var CheckIcon = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
15
+ var theme = _ref.theme,
16
+ size = _ref.size,
17
+ className = _ref.className,
18
+ props = _objectWithoutProperties(_ref, _excluded);
19
+
20
+ return /*#__PURE__*/React.createElement("svg", _extends({
21
+ viewBox: "0 0 24 24"
22
+ }, props, {
23
+ className: cn(styles.icon, styles[theme], sizeStyles[size], className),
24
+ ref: ref
25
+ }), /*#__PURE__*/React.createElement("path", {
26
+ d: "M8 20l-6-5.98 1.42-1.41L8 17.18l12.59-12.6L22 6 8 20z"
27
+ }));
28
+ });
29
+ CheckIcon.propTypes = {
30
+ className: PropTypes.string,
31
+ theme: PropTypes.oneOf(["light", "dark"]),
32
+ size: PropTypes.oneOf(["xs", "s", "m", "l"])
33
+ };
34
+ CheckIcon.defaultProps = {
35
+ size: "m"
36
+ };
37
+ export { CheckIcon as default };
@@ -0,0 +1,37 @@
1
+ import _extends from '@babel/runtime-corejs3/helpers/esm/extends';
2
+ import _objectWithoutProperties from '@babel/runtime-corejs3/helpers/esm/objectWithoutProperties';
3
+ import React from 'react';
4
+ import PropTypes from 'prop-types';
5
+ import cn from 'classnames';
6
+ import styles from './index.css.js';
7
+ var _excluded = ["theme", "size", "className"];
8
+ var sizeStyles = {
9
+ "xs": styles.sizeXS,
10
+ "s": styles.sizeS,
11
+ "m": styles.sizeM,
12
+ "l": styles.sizeL
13
+ };
14
+ var CloseIcon = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
15
+ var theme = _ref.theme,
16
+ size = _ref.size,
17
+ className = _ref.className,
18
+ props = _objectWithoutProperties(_ref, _excluded);
19
+
20
+ return /*#__PURE__*/React.createElement("svg", _extends({
21
+ viewBox: "0 0 24 24"
22
+ }, props, {
23
+ className: cn(styles.icon, styles[theme], sizeStyles[size], className),
24
+ ref: ref
25
+ }), /*#__PURE__*/React.createElement("path", {
26
+ d: "M5.67 19.751l6.342-6.34 6.34 6.34 1.41-1.409-6.341-6.34 6.34-6.341-1.408-1.409-6.341 6.341L5.67 4.251 4.26 5.66l6.342 6.342-6.34 6.34 1.408 1.409z"
27
+ }));
28
+ });
29
+ CloseIcon.propTypes = {
30
+ className: PropTypes.string,
31
+ theme: PropTypes.oneOf(["light", "dark"]),
32
+ size: PropTypes.oneOf(["xs", "s", "m", "l"])
33
+ };
34
+ CloseIcon.defaultProps = {
35
+ size: "m"
36
+ };
37
+ export { CloseIcon as default };
@@ -0,0 +1,37 @@
1
+ import _extends from '@babel/runtime-corejs3/helpers/esm/extends';
2
+ import _objectWithoutProperties from '@babel/runtime-corejs3/helpers/esm/objectWithoutProperties';
3
+ import React from 'react';
4
+ import PropTypes from 'prop-types';
5
+ import cn from 'classnames';
6
+ import styles from './index.css.js';
7
+ var _excluded = ["theme", "size", "className"];
8
+ var sizeStyles = {
9
+ "xs": styles.sizeXS,
10
+ "s": styles.sizeS,
11
+ "m": styles.sizeM,
12
+ "l": styles.sizeL
13
+ };
14
+ var DownIcon = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
15
+ var theme = _ref.theme,
16
+ size = _ref.size,
17
+ className = _ref.className,
18
+ props = _objectWithoutProperties(_ref, _excluded);
19
+
20
+ return /*#__PURE__*/React.createElement("svg", _extends({
21
+ viewBox: "0 0 24 24"
22
+ }, props, {
23
+ className: cn(styles.icon, styles[theme], sizeStyles[size], className),
24
+ ref: ref
25
+ }), /*#__PURE__*/React.createElement("path", {
26
+ d: "M19.004 9h-14l7 8 7-8z"
27
+ }));
28
+ });
29
+ DownIcon.propTypes = {
30
+ className: PropTypes.string,
31
+ theme: PropTypes.oneOf(["light", "dark"]),
32
+ size: PropTypes.oneOf(["xs", "s", "m", "l"])
33
+ };
34
+ DownIcon.defaultProps = {
35
+ size: "m"
36
+ };
37
+ export { DownIcon as default };
@@ -0,0 +1,10 @@
1
+ var styles = {
2
+ "icon": "_icon_1jmu341_4",
3
+ "sizeXS": "_sizeXS_1jmu341_14",
4
+ "sizeS": "_sizeS_1jmu341_18",
5
+ "sizeM": "_sizeM_1jmu341_22",
6
+ "sizeL": "_sizeL_1jmu341_26",
7
+ "light": "_light_1jmu341_30",
8
+ "dark": "_dark_1jmu341_34"
9
+ };
10
+ export { styles as default };
@@ -0,0 +1,45 @@
1
+ import _extends from '@babel/runtime-corejs3/helpers/esm/extends';
2
+ import _objectWithoutProperties from '@babel/runtime-corejs3/helpers/esm/objectWithoutProperties';
3
+ import React from 'react';
4
+ import PropTypes from 'prop-types';
5
+ import cn from 'classnames';
6
+ import styles from './index.css.js';
7
+ var _excluded = ["theme", "size", "className"];
8
+ var sizeStyles = {
9
+ "xs": styles.sizeXS,
10
+ "s": styles.sizeS,
11
+ "m": styles.sizeM,
12
+ "l": styles.sizeL
13
+ };
14
+ var LoadingIcon = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
15
+ var theme = _ref.theme,
16
+ size = _ref.size,
17
+ className = _ref.className,
18
+ props = _objectWithoutProperties(_ref, _excluded);
19
+
20
+ return /*#__PURE__*/React.createElement("svg", _extends({
21
+ viewBox: "0 0 24 24"
22
+ }, props, {
23
+ className: cn(styles.icon, styles[theme], sizeStyles[size], className),
24
+ ref: ref
25
+ }), /*#__PURE__*/React.createElement("g", {
26
+ style: {
27
+ animation: "rs-icon-rotate 1s linear infinite",
28
+ transformOrigin: "center center"
29
+ }
30
+ }, /*#__PURE__*/React.createElement("path", {
31
+ opacity: 0.2,
32
+ d: "M12 2c5.523 0 10 4.477 10 10h-2a8 8 0 00-8-8V2z"
33
+ }), /*#__PURE__*/React.createElement("path", {
34
+ d: "M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10h-2a8 8 0 11-8-8V2z"
35
+ })));
36
+ });
37
+ LoadingIcon.propTypes = {
38
+ className: PropTypes.string,
39
+ theme: PropTypes.oneOf(["light", "dark"]),
40
+ size: PropTypes.oneOf(["xs", "s", "m", "l"])
41
+ };
42
+ LoadingIcon.defaultProps = {
43
+ size: "m"
44
+ };
45
+ export { LoadingIcon as default };
@@ -0,0 +1,37 @@
1
+ import _extends from '@babel/runtime-corejs3/helpers/esm/extends';
2
+ import _objectWithoutProperties from '@babel/runtime-corejs3/helpers/esm/objectWithoutProperties';
3
+ import React from 'react';
4
+ import PropTypes from 'prop-types';
5
+ import cn from 'classnames';
6
+ import styles from './index.css.js';
7
+ var _excluded = ["theme", "size", "className"];
8
+ var sizeStyles = {
9
+ "xs": styles.sizeXS,
10
+ "s": styles.sizeS,
11
+ "m": styles.sizeM,
12
+ "l": styles.sizeL
13
+ };
14
+ var WarningIcon = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
15
+ var theme = _ref.theme,
16
+ size = _ref.size,
17
+ className = _ref.className,
18
+ props = _objectWithoutProperties(_ref, _excluded);
19
+
20
+ return /*#__PURE__*/React.createElement("svg", _extends({
21
+ viewBox: "0 0 24 24"
22
+ }, props, {
23
+ className: cn(styles.icon, styles[theme], sizeStyles[size], className),
24
+ ref: ref
25
+ }), /*#__PURE__*/React.createElement("path", {
26
+ d: "M2.769 20h18.363a.615.615 0 00.546-.891L12.504 2.8a.566.566 0 00-.989-.002C9.8 5.891 4.026 16.101 2.322 19.112A.61.61 0 002.77 20zm8.229-12h2v6h-2V8zm0 8h2v2h-2v-2z"
27
+ }));
28
+ });
29
+ WarningIcon.propTypes = {
30
+ className: PropTypes.string,
31
+ theme: PropTypes.oneOf(["light", "dark"]),
32
+ size: PropTypes.oneOf(["xs", "s", "m", "l"])
33
+ };
34
+ WarningIcon.defaultProps = {
35
+ size: "m"
36
+ };
37
+ export { WarningIcon as default };
@@ -2,15 +2,25 @@ import PropTypes from 'prop-types';
2
2
  export declare const optionType: PropTypes.Requireable<PropTypes.InferProps<{
3
3
  label: PropTypes.Validator<string>;
4
4
  value: PropTypes.Requireable<string>;
5
- disabled: PropTypes.Requireable<boolean>;
6
5
  }>>;
7
6
  export declare const optionsGroupType: PropTypes.Requireable<PropTypes.InferProps<{
7
+ label: PropTypes.Requireable<string>;
8
+ options: PropTypes.Requireable<PropTypes.InferProps<{
9
+ label: PropTypes.Validator<string>;
10
+ value: PropTypes.Requireable<string>;
11
+ }>[]>;
12
+ }>>;
13
+ export declare const nativeOptionType: PropTypes.Requireable<PropTypes.InferProps<{
14
+ label: PropTypes.Validator<string>;
15
+ value: PropTypes.Requireable<string>;
16
+ disabled: PropTypes.Requireable<boolean>;
17
+ }>>;
18
+ export declare const nativeOptionsGroupType: PropTypes.Requireable<PropTypes.InferProps<{
8
19
  label: PropTypes.Requireable<string>;
9
20
  disabled: PropTypes.Requireable<boolean>;
10
21
  options: PropTypes.Requireable<PropTypes.InferProps<{
11
22
  label: PropTypes.Validator<string>;
12
23
  value: PropTypes.Requireable<string>;
13
- disabled: PropTypes.Requireable<boolean>;
14
24
  }>[]>;
15
25
  }>>;
16
26
  export declare const noOptionsMessageConfigType: PropTypes.Requireable<PropTypes.InferProps<{
@@ -1,10 +1,18 @@
1
1
  import PropTypes from 'prop-types';
2
2
  var optionType = PropTypes.shape({
3
+ label: PropTypes.string.isRequired,
4
+ value: PropTypes.string
5
+ });
6
+ var optionsGroupType = PropTypes.shape({
7
+ label: PropTypes.string,
8
+ options: PropTypes.arrayOf(optionType)
9
+ });
10
+ var nativeOptionType = PropTypes.shape({
3
11
  label: PropTypes.string.isRequired,
4
12
  value: PropTypes.string,
5
13
  disabled: PropTypes.bool
6
14
  });
7
- var optionsGroupType = PropTypes.shape({
15
+ var nativeOptionsGroupType = PropTypes.shape({
8
16
  label: PropTypes.string,
9
17
  disabled: PropTypes.bool,
10
18
  options: PropTypes.arrayOf(optionType)
@@ -15,4 +23,4 @@ var noOptionsMessageConfigType = PropTypes.shape({
15
23
  loading: PropTypes.string
16
24
  });
17
25
  var noOptionsMessageType = PropTypes.oneOfType([PropTypes.string, noOptionsMessageConfigType]);
18
- export { noOptionsMessageConfigType, noOptionsMessageType, optionType, optionsGroupType };
26
+ export { nativeOptionType, nativeOptionsGroupType, noOptionsMessageConfigType, noOptionsMessageType, optionType, optionsGroupType };