@rescui/input 0.11.9 → 0.11.10-RUI-226-Update-card-cn-baacc2f1.68

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.
@@ -9,28 +9,98 @@ const sizeStyles = {
9
9
  "m": styles.sizeM,
10
10
  "l": styles.sizeL
11
11
  };
12
+ const Size = {
13
+ "xs": "xs",
14
+ "s": "s",
15
+ "m": "m",
16
+ "l": "l"
17
+ };
18
+ const CloseIcon16 = /*#__PURE__*/React__default.forwardRef((props, ref) => /*#__PURE__*/React__default.createElement("svg", _extends({
19
+ viewBox: "0 0 16 16"
20
+ }, props, {
21
+ ref: ref
22
+ }), /*#__PURE__*/React__default.createElement("path", {
23
+ d: "M2.47 2.47a.75.75 0 0 1 1.06 0L8 6.94l4.47-4.47a.75.75 0 1 1 1.06 1.06L9.06 8l4.47 4.47a.75.75 0 1 1-1.06 1.06L8 9.06l-4.47 4.47a.75.75 0 0 1-1.06-1.06L6.94 8 2.47 3.53a.75.75 0 0 1 0-1.06"
24
+ })));
25
+ CloseIcon16.displayName = 'CloseIcon16';
26
+ const CloseIcon20 = /*#__PURE__*/React__default.forwardRef((props, ref) => /*#__PURE__*/React__default.createElement("svg", _extends({
27
+ viewBox: "0 0 20 20"
28
+ }, props, {
29
+ ref: ref
30
+ }), /*#__PURE__*/React__default.createElement("path", {
31
+ d: "M3.293 3.293a1 1 0 0 1 1.414 0L10 8.586l5.293-5.293a1 1 0 1 1 1.414 1.414L11.414 10l5.293 5.293a1 1 0 0 1-1.414 1.414L10 11.414l-5.293 5.293a1 1 0 0 1-1.414-1.414L8.586 10 3.293 4.707a1 1 0 0 1 0-1.414"
32
+ })));
33
+ CloseIcon20.displayName = 'CloseIcon20';
34
+ const CloseIcon24 = /*#__PURE__*/React__default.forwardRef((props, ref) => /*#__PURE__*/React__default.createElement("svg", _extends({
35
+ viewBox: "0 0 24 24"
36
+ }, props, {
37
+ ref: ref
38
+ }), /*#__PURE__*/React__default.createElement("path", {
39
+ d: "M3.44 3.44a1.5 1.5 0 0 1 2.12 0L12 9.878l6.44-6.44a1.5 1.5 0 0 1 2.12 2.122L14.122 12l6.44 6.44a1.5 1.5 0 0 1-2.122 2.12L12 14.122l-6.44 6.44a1.5 1.5 0 0 1-2.12-2.122L9.878 12l-6.44-6.44a1.5 1.5 0 0 1 0-2.12"
40
+ })));
41
+ CloseIcon24.displayName = 'CloseIcon24';
42
+ const CloseIcon28 = /*#__PURE__*/React__default.forwardRef((props, ref) => /*#__PURE__*/React__default.createElement("svg", _extends({
43
+ viewBox: "0 0 28 28"
44
+ }, props, {
45
+ ref: ref
46
+ }), /*#__PURE__*/React__default.createElement("path", {
47
+ d: "M4.44 4.44a1.5 1.5 0 0 1 2.12 0L14 11.878l7.44-7.44a1.5 1.5 0 0 1 2.12 2.122L16.122 14l7.44 7.44a1.5 1.5 0 0 1-2.122 2.12L14 16.122l-7.44 7.44a1.5 1.5 0 0 1-2.12-2.122L11.878 14l-7.44-7.44a1.5 1.5 0 0 1 0-2.12"
48
+ })));
49
+ CloseIcon28.displayName = 'CloseIcon28';
12
50
  const CloseIcon = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
13
51
  let {
14
52
  theme,
15
- size,
53
+ size: sizeFromProps = "m",
16
54
  className,
55
+ style,
56
+ ['data-render-all-sizes']: renderAllSizes = false,
17
57
  ...props
18
58
  } = _ref;
19
- return /*#__PURE__*/React__default.createElement("svg", _extends({
20
- viewBox: "0 0 24 24"
21
- }, props, {
22
- className: cn(styles.icon, styles[theme], sizeStyles[size], className),
23
- ref: ref
24
- }), /*#__PURE__*/React__default.createElement("path", {
25
- 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"
26
- }));
59
+ const size = sizeFromProps in Size ? sizeFromProps : "m";
60
+ const mainProps = { ...props,
61
+ className: cn(styles.icon, styles[theme], sizeStyles[size], renderAllSizes && styles.allVariants, className),
62
+ style: renderAllSizes ? {
63
+ '--rs-icon-ar-width': 28,
64
+ '--rs-icon-ar-height': 28,
65
+ ...style
66
+ } : style,
67
+ ref
68
+ };
69
+
70
+ if (renderAllSizes) {
71
+ return /*#__PURE__*/React__default.createElement("svg", _extends({
72
+ viewBox: "0 0 28 28"
73
+ }, mainProps), /*#__PURE__*/React__default.createElement(CloseIcon16, {
74
+ className: styles.variant16
75
+ }), /*#__PURE__*/React__default.createElement(CloseIcon20, {
76
+ className: styles.variant20
77
+ }), /*#__PURE__*/React__default.createElement(CloseIcon24, {
78
+ className: styles.variant24
79
+ }), /*#__PURE__*/React__default.createElement(CloseIcon28, {
80
+ className: styles.variant28
81
+ }));
82
+ }
83
+
84
+ if (size === Size['xs']) {
85
+ return /*#__PURE__*/React__default.createElement(CloseIcon16, mainProps);
86
+ }
87
+
88
+ if (size === Size['s']) {
89
+ return /*#__PURE__*/React__default.createElement(CloseIcon20, mainProps);
90
+ }
91
+
92
+ if (size === Size['m']) {
93
+ return /*#__PURE__*/React__default.createElement(CloseIcon24, mainProps);
94
+ }
95
+
96
+ return /*#__PURE__*/React__default.createElement(CloseIcon28, mainProps);
27
97
  });
98
+ CloseIcon.displayName = 'CloseIcon';
28
99
  CloseIcon.propTypes = {
29
100
  className: PropTypes.string,
30
101
  theme: PropTypes.oneOf(["light", "dark"]),
31
- size: PropTypes.oneOf(["xs", "s", "m", "l"])
32
- };
33
- CloseIcon.defaultProps = {
34
- size: "m"
102
+ size: PropTypes.oneOf(["xs", "s", "m", "l"]),
103
+ 'data-render-all-sizes': PropTypes.bool,
104
+ style: PropTypes.object
35
105
  };
36
- export { CloseIcon as default };
106
+ export { Size, CloseIcon as default };
@@ -1,10 +1,15 @@
1
1
  var styles = {
2
- "icon": "_icon_ons1cf_4",
3
- "sizeXS": "_sizeXS_ons1cf_14",
4
- "sizeS": "_sizeS_ons1cf_18",
5
- "sizeM": "_sizeM_ons1cf_22",
6
- "sizeL": "_sizeL_ons1cf_26",
7
- "light": "_light_ons1cf_30",
8
- "dark": "_dark_ons1cf_34"
2
+ "icon": "_icon_1bfqf1a_4",
3
+ "sizeXS": "_sizeXS_1bfqf1a_14",
4
+ "sizeS": "_sizeS_1bfqf1a_18",
5
+ "sizeM": "_sizeM_1bfqf1a_22",
6
+ "sizeL": "_sizeL_1bfqf1a_26",
7
+ "light": "_light_1bfqf1a_30",
8
+ "dark": "_dark_1bfqf1a_34",
9
+ "allVariants": "_allVariants_1bfqf1a_48",
10
+ "variant16": "_variant16_1bfqf1a_53",
11
+ "variant20": "_variant20_1bfqf1a_54",
12
+ "variant24": "_variant24_1bfqf1a_55",
13
+ "variant28": "_variant28_1bfqf1a_58"
9
14
  };
10
15
  export { styles as default };
@@ -9,36 +9,114 @@ const sizeStyles = {
9
9
  "m": styles.sizeM,
10
10
  "l": styles.sizeL
11
11
  };
12
+ const Size = {
13
+ "xs": "xs",
14
+ "s": "s",
15
+ "m": "m",
16
+ "l": "l"
17
+ };
18
+ const LoadingIcon16 = /*#__PURE__*/React__default.forwardRef((props, ref) => /*#__PURE__*/React__default.createElement("svg", _extends({
19
+ viewBox: "0 0 16 16"
20
+ }, props, {
21
+ ref: ref
22
+ }), /*#__PURE__*/React__default.createElement("path", {
23
+ d: "M8 3.25a4.75 4.75 0 1 0 4.686 3.968.75.75 0 1 1 1.48-.245q.083.503.084 1.027a6.25 6.25 0 1 1-5.223-6.166.75.75 0 0 1-.245 1.48A5 5 0 0 0 8 3.25",
24
+ style: {
25
+ animation: "rs-icon-rotate 1s linear infinite",
26
+ transformOrigin: "center center"
27
+ }
28
+ })));
29
+ LoadingIcon16.displayName = 'LoadingIcon16';
30
+ const LoadingIcon20 = /*#__PURE__*/React__default.forwardRef((props, ref) => /*#__PURE__*/React__default.createElement("svg", _extends({
31
+ viewBox: "0 0 20 20"
32
+ }, props, {
33
+ ref: ref
34
+ }), /*#__PURE__*/React__default.createElement("path", {
35
+ d: "M10 4a6 6 0 1 0 5.92 5.012 1 1 0 0 1 1.972-.326Q18 9.329 18 10a8 8 0 1 1-6.686-7.892 1 1 0 0 1-.326 1.973A6 6 0 0 0 10 4",
36
+ style: {
37
+ animation: "rs-icon-rotate 1s linear infinite",
38
+ transformOrigin: "center center"
39
+ }
40
+ })));
41
+ LoadingIcon20.displayName = 'LoadingIcon20';
42
+ const LoadingIcon24 = /*#__PURE__*/React__default.forwardRef((props, ref) => /*#__PURE__*/React__default.createElement("svg", _extends({
43
+ viewBox: "0 0 24 24"
44
+ }, props, {
45
+ ref: ref
46
+ }), /*#__PURE__*/React__default.createElement("path", {
47
+ d: "M12 6a6 6 0 1 0 5.92 5.012 1.5 1.5 0 0 1 2.959-.49q.12.724.121 1.478a9 9 0 1 1-7.522-8.879 1.5 1.5 0 0 1-.49 2.96Q12.508 6 12 6",
48
+ style: {
49
+ animation: "rs-icon-rotate 1s linear infinite",
50
+ transformOrigin: "center center"
51
+ }
52
+ })));
53
+ LoadingIcon24.displayName = 'LoadingIcon24';
54
+ const LoadingIcon28 = /*#__PURE__*/React__default.forwardRef((props, ref) => /*#__PURE__*/React__default.createElement("svg", _extends({
55
+ viewBox: "0 0 28 28"
56
+ }, props, {
57
+ ref: ref
58
+ }), /*#__PURE__*/React__default.createElement("path", {
59
+ d: "M14 6.5a7.5 7.5 0 1 0 7.399 6.265 1.5 1.5 0 0 1 2.96-.49q.14.844.141 1.725c0 5.799-4.701 10.5-10.5 10.5S3.5 19.799 3.5 14 8.201 3.5 14 3.5q.813 0 1.595.12a1.5 1.5 0 0 1-.453 2.966A7.6 7.6 0 0 0 14 6.5",
60
+ style: {
61
+ animation: "rs-icon-rotate 1s linear infinite",
62
+ transformOrigin: "center center"
63
+ }
64
+ })));
65
+ LoadingIcon28.displayName = 'LoadingIcon28';
12
66
  const LoadingIcon = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
13
67
  let {
14
68
  theme,
15
- size,
69
+ size: sizeFromProps = "m",
16
70
  className,
71
+ style,
72
+ ['data-render-all-sizes']: renderAllSizes = false,
17
73
  ...props
18
74
  } = _ref;
19
- return /*#__PURE__*/React__default.createElement("svg", _extends({
20
- viewBox: "0 0 24 24"
21
- }, props, {
22
- className: cn(styles.icon, styles[theme], sizeStyles[size], className),
23
- ref: ref
24
- }), /*#__PURE__*/React__default.createElement("g", {
25
- style: {
26
- animation: "rs-icon-rotate 1s linear infinite",
27
- transformOrigin: "center center"
28
- }
29
- }, /*#__PURE__*/React__default.createElement("path", {
30
- opacity: 0.2,
31
- d: "M12 2c5.523 0 10 4.477 10 10h-2a8 8 0 00-8-8V2z"
32
- }), /*#__PURE__*/React__default.createElement("path", {
33
- 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"
34
- })));
75
+ const size = sizeFromProps in Size ? sizeFromProps : "m";
76
+ const mainProps = { ...props,
77
+ className: cn(styles.icon, styles[theme], sizeStyles[size], renderAllSizes && styles.allVariants, className),
78
+ style: renderAllSizes ? {
79
+ '--rs-icon-ar-width': 28,
80
+ '--rs-icon-ar-height': 28,
81
+ ...style
82
+ } : style,
83
+ ref
84
+ };
85
+
86
+ if (renderAllSizes) {
87
+ return /*#__PURE__*/React__default.createElement("svg", _extends({
88
+ viewBox: "0 0 28 28"
89
+ }, mainProps), /*#__PURE__*/React__default.createElement(LoadingIcon16, {
90
+ className: styles.variant16
91
+ }), /*#__PURE__*/React__default.createElement(LoadingIcon20, {
92
+ className: styles.variant20
93
+ }), /*#__PURE__*/React__default.createElement(LoadingIcon24, {
94
+ className: styles.variant24
95
+ }), /*#__PURE__*/React__default.createElement(LoadingIcon28, {
96
+ className: styles.variant28
97
+ }));
98
+ }
99
+
100
+ if (size === Size['xs']) {
101
+ return /*#__PURE__*/React__default.createElement(LoadingIcon16, mainProps);
102
+ }
103
+
104
+ if (size === Size['s']) {
105
+ return /*#__PURE__*/React__default.createElement(LoadingIcon20, mainProps);
106
+ }
107
+
108
+ if (size === Size['m']) {
109
+ return /*#__PURE__*/React__default.createElement(LoadingIcon24, mainProps);
110
+ }
111
+
112
+ return /*#__PURE__*/React__default.createElement(LoadingIcon28, mainProps);
35
113
  });
114
+ LoadingIcon.displayName = 'LoadingIcon';
36
115
  LoadingIcon.propTypes = {
37
116
  className: PropTypes.string,
38
117
  theme: PropTypes.oneOf(["light", "dark"]),
39
- size: PropTypes.oneOf(["xs", "s", "m", "l"])
40
- };
41
- LoadingIcon.defaultProps = {
42
- size: "m"
118
+ size: PropTypes.oneOf(["xs", "s", "m", "l"]),
119
+ 'data-render-all-sizes': PropTypes.bool,
120
+ style: PropTypes.object
43
121
  };
44
- export { LoadingIcon as default };
122
+ export { Size, LoadingIcon as default };
@@ -9,28 +9,98 @@ const sizeStyles = {
9
9
  "m": styles.sizeM,
10
10
  "l": styles.sizeL
11
11
  };
12
+ const Size = {
13
+ "xs": "xs",
14
+ "s": "s",
15
+ "m": "m",
16
+ "l": "l"
17
+ };
18
+ const WarningIcon16 = /*#__PURE__*/React__default.forwardRef((props, ref) => /*#__PURE__*/React__default.createElement("svg", _extends({
19
+ viewBox: "0 0 16 16"
20
+ }, props, {
21
+ ref: ref
22
+ }), /*#__PURE__*/React__default.createElement("path", {
23
+ d: "m6.303 1.989-5.027 8.874C.483 12.263 1.494 14 3.103 14h9.793c1.609 0 2.62-1.736 1.827-3.137L9.696 1.99C8.949.67 7.05.67 6.303 1.989M8 12a1 1 0 1 1 0-2 1 1 0 0 1 0 2m0-8a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-1 0v-4A.5.5 0 0 1 8 4"
24
+ })));
25
+ WarningIcon16.displayName = 'WarningIcon16';
26
+ const WarningIcon20 = /*#__PURE__*/React__default.forwardRef((props, ref) => /*#__PURE__*/React__default.createElement("svg", _extends({
27
+ viewBox: "0 0 20 20"
28
+ }, props, {
29
+ ref: ref
30
+ }), /*#__PURE__*/React__default.createElement("path", {
31
+ d: "m8.042 3.141-5.8 10.24C1.327 14.997 2.494 17 4.35 17h11.3c1.856 0 3.023-2.003 2.108-3.62l-5.8-10.239c-.862-1.521-3.054-1.521-3.916 0M10 5.25a.75.75 0 0 1 .75.75v5a.75.75 0 0 1-1.5 0V6a.75.75 0 0 1 .75-.75m0 9.25a1 1 0 1 1 0-2 1 1 0 0 1 0 2"
32
+ })));
33
+ WarningIcon20.displayName = 'WarningIcon20';
34
+ const WarningIcon24 = /*#__PURE__*/React__default.forwardRef((props, ref) => /*#__PURE__*/React__default.createElement("svg", _extends({
35
+ viewBox: "0 0 24 24"
36
+ }, props, {
37
+ ref: ref
38
+ }), /*#__PURE__*/React__default.createElement("path", {
39
+ d: "m9.52 3.446-7.346 12.97C1.014 18.463 2.492 21 4.844 21h14.312c2.352 0 3.83-2.537 2.67-4.584L14.48 3.446c-1.092-1.928-3.868-1.928-4.96 0M12 7a1 1 0 0 1 1 1v5a1 1 0 1 1-2 0V8a1 1 0 0 1 1-1m0 11a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3"
40
+ })));
41
+ WarningIcon24.displayName = 'WarningIcon24';
42
+ const WarningIcon28 = /*#__PURE__*/React__default.forwardRef((props, ref) => /*#__PURE__*/React__default.createElement("svg", _extends({
43
+ viewBox: "0 0 28 28"
44
+ }, props, {
45
+ ref: ref
46
+ }), /*#__PURE__*/React__default.createElement("path", {
47
+ d: "M11.26 4.598 3.14 18.933C1.858 21.195 3.492 24 6.09 24h15.82c2.599 0 4.232-2.805 2.951-5.067l-8.12-14.335c-1.207-2.13-4.275-2.13-5.481 0M14 8a1 1 0 0 1 1 1v6a1 1 0 1 1-2 0V9a1 1 0 0 1 1-1m0 12a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3"
48
+ })));
49
+ WarningIcon28.displayName = 'WarningIcon28';
12
50
  const WarningIcon = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
13
51
  let {
14
52
  theme,
15
- size,
53
+ size: sizeFromProps = "m",
16
54
  className,
55
+ style,
56
+ ['data-render-all-sizes']: renderAllSizes = false,
17
57
  ...props
18
58
  } = _ref;
19
- return /*#__PURE__*/React__default.createElement("svg", _extends({
20
- viewBox: "0 0 24 24"
21
- }, props, {
22
- className: cn(styles.icon, styles[theme], sizeStyles[size], className),
23
- ref: ref
24
- }), /*#__PURE__*/React__default.createElement("path", {
25
- 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"
26
- }));
59
+ const size = sizeFromProps in Size ? sizeFromProps : "m";
60
+ const mainProps = { ...props,
61
+ className: cn(styles.icon, styles[theme], sizeStyles[size], renderAllSizes && styles.allVariants, className),
62
+ style: renderAllSizes ? {
63
+ '--rs-icon-ar-width': 28,
64
+ '--rs-icon-ar-height': 28,
65
+ ...style
66
+ } : style,
67
+ ref
68
+ };
69
+
70
+ if (renderAllSizes) {
71
+ return /*#__PURE__*/React__default.createElement("svg", _extends({
72
+ viewBox: "0 0 28 28"
73
+ }, mainProps), /*#__PURE__*/React__default.createElement(WarningIcon16, {
74
+ className: styles.variant16
75
+ }), /*#__PURE__*/React__default.createElement(WarningIcon20, {
76
+ className: styles.variant20
77
+ }), /*#__PURE__*/React__default.createElement(WarningIcon24, {
78
+ className: styles.variant24
79
+ }), /*#__PURE__*/React__default.createElement(WarningIcon28, {
80
+ className: styles.variant28
81
+ }));
82
+ }
83
+
84
+ if (size === Size['xs']) {
85
+ return /*#__PURE__*/React__default.createElement(WarningIcon16, mainProps);
86
+ }
87
+
88
+ if (size === Size['s']) {
89
+ return /*#__PURE__*/React__default.createElement(WarningIcon20, mainProps);
90
+ }
91
+
92
+ if (size === Size['m']) {
93
+ return /*#__PURE__*/React__default.createElement(WarningIcon24, mainProps);
94
+ }
95
+
96
+ return /*#__PURE__*/React__default.createElement(WarningIcon28, mainProps);
27
97
  });
98
+ WarningIcon.displayName = 'WarningIcon';
28
99
  WarningIcon.propTypes = {
29
100
  className: PropTypes.string,
30
101
  theme: PropTypes.oneOf(["light", "dark"]),
31
- size: PropTypes.oneOf(["xs", "s", "m", "l"])
32
- };
33
- WarningIcon.defaultProps = {
34
- size: "m"
102
+ size: PropTypes.oneOf(["xs", "s", "m", "l"]),
103
+ 'data-render-all-sizes': PropTypes.bool,
104
+ style: PropTypes.object
35
105
  };
36
- export { WarningIcon as default };
106
+ export { Size, WarningIcon as default };