@rescui/icons 1.12.0 → 1.12.1

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/index.css CHANGED
@@ -3,7 +3,7 @@
3
3
  inherits:true;
4
4
  initial-value:0;
5
5
  }
6
- ._icon_g46ng3_4{
6
+ ._icon_8et0sh_4{
7
7
  --_rs-theme-dark:var(
8
8
  --_rs-internal-force-theme-dark-consult-rescui-before-using,
9
9
  var(--rs-theme-dark, 0)
@@ -13,7 +13,7 @@
13
13
  --_rs-theme-light-coefficient:calc(1 - var(--_rs-theme-dark-coefficient));
14
14
  }
15
15
  @supports (color: color-mix(in srgb, #fff 50%, #000 50%)){
16
- ._icon_g46ng3_4{
16
+ ._icon_8et0sh_4{
17
17
  --_rs-color-primary:color-mix(in srgb, var(--rs-color-primary-light-theme, #6B57FF) calc(100% * var(--_rs-theme-light-coefficient, 1)), var(--rs-color-primary-dark-theme, #8473FF) calc(100% * var(--_rs-theme-dark-coefficient, 0)));
18
18
  --_rs-color-primary-dim:color-mix(in srgb, var(--rs-color-primary-dim-light-theme, #8979ff) calc(100% * var(--_rs-theme-light-coefficient, 1)), var(--rs-color-primary-dim-dark-theme, #6f61d2) calc(100% * var(--_rs-theme-dark-coefficient, 0)));
19
19
  --_rs-color-primary-fog:color-mix(in srgb, var(--rs-color-primary-fog-light-theme, #e1ddff) calc(100% * var(--_rs-theme-light-coefficient, 1)), var(--rs-color-primary-fog-dark-theme, #2e2b49) calc(100% * var(--_rs-theme-dark-coefficient, 0)));
@@ -22,7 +22,7 @@
22
22
  }
23
23
  }
24
24
  @supports not (color: color-mix(in srgb, #fff 50%, #000 50%)){
25
- ._icon_g46ng3_4{
25
+ ._icon_8et0sh_4{
26
26
  --_rs-color-primary:rgb(calc(107 * var(--_rs-theme-light-coefficient, 1) + 132 * var(--_rs-theme-dark-coefficient, 0)), calc(87 * var(--_rs-theme-light-coefficient, 1) + 115 * var(--_rs-theme-dark-coefficient, 0)), 255);
27
27
  --_rs-color-primary-dim:rgb(calc(137 * var(--_rs-theme-light-coefficient, 1) + 111 * var(--_rs-theme-dark-coefficient, 0)), calc(121 * var(--_rs-theme-light-coefficient, 1) + 97 * var(--_rs-theme-dark-coefficient, 0)), calc(255 * var(--_rs-theme-light-coefficient, 1) + 210 * var(--_rs-theme-dark-coefficient, 0)));
28
28
  --_rs-color-primary-fog:rgb(calc(225 * var(--_rs-theme-light-coefficient, 1) + 46 * var(--_rs-theme-dark-coefficient, 0)), calc(221 * var(--_rs-theme-light-coefficient, 1) + 43 * var(--_rs-theme-dark-coefficient, 0)), calc(255 * var(--_rs-theme-light-coefficient, 1) + 73 * var(--_rs-theme-dark-coefficient, 0)));
@@ -30,7 +30,7 @@
30
30
  --_rs-color-primary-t-fog:rgba(calc(107 * var(--_rs-theme-light-coefficient, 1) + 132 * var(--_rs-theme-dark-coefficient, 0)), calc(87 * var(--_rs-theme-light-coefficient, 1) + 115 * var(--_rs-theme-dark-coefficient, 0)), 255, calc(.2 * var(--_rs-theme-light-coefficient, 1) + .3 * var(--_rs-theme-dark-coefficient, 0)));
31
31
  }
32
32
  }
33
- ._icon_g46ng3_4{
33
+ ._icon_8et0sh_4{
34
34
 
35
35
  fill:var(--_rs-icons-themed-fill-or-initial, currentcolor);
36
36
 
@@ -38,27 +38,27 @@
38
38
  height:var(--rs-icons-height, var(--_rs-icons-height));
39
39
  }
40
40
 
41
- ._sizeXS_g46ng3_14{
41
+ ._sizeXS_8et0sh_14{
42
42
  --_rs-icons-height:16px;
43
43
  }
44
44
 
45
- ._sizeS_g46ng3_18{
45
+ ._sizeS_8et0sh_18{
46
46
  --_rs-icons-height:20px;
47
47
  }
48
48
 
49
- ._sizeM_g46ng3_22{
49
+ ._sizeM_8et0sh_22{
50
50
  --_rs-icons-height:24px;
51
51
  }
52
52
 
53
- ._sizeL_g46ng3_26{
53
+ ._sizeL_8et0sh_26{
54
54
  --_rs-icons-height:28px;
55
55
  }
56
56
 
57
- ._light_g46ng3_30{
57
+ ._light_8et0sh_30{
58
58
  --rs-theme-dark:0;
59
59
  --_rs-icons-themed-fill-or-initial:rgb(calc(25 + 230 * var(--_rs-theme-dark-coefficient, 0)), calc(25 + 230 * var(--_rs-theme-dark-coefficient, 0)), calc(28 + 227 * var(--_rs-theme-dark-coefficient, 0)));
60
60
  }
61
- ._dark_g46ng3_34{
61
+ ._dark_8et0sh_34{
62
62
  --rs-theme-dark:1;
63
63
  --_rs-icons-themed-fill-or-initial:rgb(calc(25 + 230 * var(--_rs-theme-dark-coefficient, 0)), calc(25 + 230 * var(--_rs-theme-dark-coefficient, 0)), calc(28 + 227 * var(--_rs-theme-dark-coefficient, 0)));
64
64
  }
@@ -72,40 +72,40 @@
72
72
  }
73
73
  }
74
74
 
75
- ._allVariants_g46ng3_48{
75
+ ._allVariants_8et0sh_48{
76
76
  aspect-ratio:var(--rs-icon-ar-width, 1) / var(--rs-icon-ar-height, 1);
77
77
  container:rs-icon / size;
78
78
  }
79
79
 
80
- ._variant16_g46ng3_53,
81
- ._variant20_g46ng3_54,
82
- ._variant24_g46ng3_55{
80
+ ._variant16_8et0sh_53,
81
+ ._variant20_8et0sh_54,
82
+ ._variant24_8et0sh_55{
83
83
  display:none;
84
84
  }
85
- ._variant28_g46ng3_58{
85
+ ._variant28_8et0sh_58{
86
86
  display:block;
87
87
  }
88
88
  @container rs-icon (max-height: 24px){
89
- ._variant24_g46ng3_55{
89
+ ._variant24_8et0sh_55{
90
90
  display:block;
91
91
  }
92
- ._variant28_g46ng3_58{
92
+ ._variant28_8et0sh_58{
93
93
  display:none;
94
94
  }
95
95
  }
96
96
  @container rs-icon (max-height: 20px){
97
- ._variant20_g46ng3_54{
97
+ ._variant20_8et0sh_54{
98
98
  display:block;
99
99
  }
100
- ._variant24_g46ng3_55{
100
+ ._variant24_8et0sh_55{
101
101
  display:none;
102
102
  }
103
103
  }
104
104
  @container rs-icon (max-height: 16px){
105
- ._variant16_g46ng3_53{
105
+ ._variant16_8et0sh_53{
106
106
  display:block;
107
107
  }
108
- ._variant20_g46ng3_54{
108
+ ._variant20_8et0sh_54{
109
109
  display:none;
110
110
  }
111
111
  }
package/lib/index.css.js CHANGED
@@ -1,14 +1,14 @@
1
1
  export default {
2
- "icon": "_icon_g46ng3_4",
3
- "sizeXS": "_sizeXS_g46ng3_14",
4
- "sizeS": "_sizeS_g46ng3_18",
5
- "sizeM": "_sizeM_g46ng3_22",
6
- "sizeL": "_sizeL_g46ng3_26",
7
- "light": "_light_g46ng3_30",
8
- "dark": "_dark_g46ng3_34",
9
- "allVariants": "_allVariants_g46ng3_48",
10
- "variant16": "_variant16_g46ng3_53",
11
- "variant20": "_variant20_g46ng3_54",
12
- "variant24": "_variant24_g46ng3_55",
13
- "variant28": "_variant28_g46ng3_58"
2
+ "icon": "_icon_8et0sh_4",
3
+ "sizeXS": "_sizeXS_8et0sh_14",
4
+ "sizeS": "_sizeS_8et0sh_18",
5
+ "sizeM": "_sizeM_8et0sh_22",
6
+ "sizeL": "_sizeL_8et0sh_26",
7
+ "light": "_light_8et0sh_30",
8
+ "dark": "_dark_8et0sh_34",
9
+ "allVariants": "_allVariants_8et0sh_48",
10
+ "variant16": "_variant16_8et0sh_53",
11
+ "variant20": "_variant20_8et0sh_54",
12
+ "variant24": "_variant24_8et0sh_55",
13
+ "variant28": "_variant28_8et0sh_58"
14
14
  };
package/lib/index.d.ts CHANGED
@@ -482,6 +482,10 @@ export { default as PlayIcon } from './play';
482
482
  export type { IPlayIconProps as PlayIconProps } from './play';
483
483
  export { default as PlayOutlineIcon } from './play-outline';
484
484
  export type { IPlayOutlineIconProps as PlayOutlineIconProps } from './play-outline';
485
+ export { default as PlugIcon } from './plug';
486
+ export type { IPlugIconProps as PlugIconProps } from './plug';
487
+ export { default as PlugOutlineIcon } from './plug-outline';
488
+ export type { IPlugOutlineIconProps as PlugOutlineIconProps } from './plug-outline';
485
489
  export { default as PlusIcon } from './plus';
486
490
  export type { IPlusIconProps as PlusIconProps } from './plus';
487
491
  export { default as PlusOutlineIcon } from './plus-outline';
package/lib/index.js CHANGED
@@ -240,6 +240,8 @@ export { default as PhoneIcon } from './phone.js';
240
240
  export { default as PhoneOutlineIcon } from './phone-outline.js';
241
241
  export { default as PlayIcon } from './play.js';
242
242
  export { default as PlayOutlineIcon } from './play-outline.js';
243
+ export { default as PlugIcon } from './plug.js';
244
+ export { default as PlugOutlineIcon } from './plug-outline.js';
243
245
  export { default as PlusIcon } from './plus.js';
244
246
  export { default as PlusOutlineIcon } from './plus-outline.js';
245
247
  export { default as PocketIcon } from './pocket.js';
@@ -0,0 +1,16 @@
1
+ import * as React from 'react';
2
+
3
+ export type TPlugOutlineIconSize = "xs" | "s" | "m" | "l";
4
+
5
+ export type TPlugOutlineIconTheme = "light" | "dark";
6
+
7
+ export interface IPlugOutlineIconProps extends React.SVGProps<any> {
8
+ size?: TPlugOutlineIconSize;
9
+ theme?: TPlugOutlineIconTheme;
10
+ 'data-render-all-sizes'?: boolean;
11
+ style?: React.CSSProperties;
12
+ }
13
+
14
+ declare const PlugOutlineIcon: React.ForwardRefExoticComponent<IPlugOutlineIconProps & React.RefAttributes<SVGSVGElement>>;
15
+
16
+ export default PlugOutlineIcon;
@@ -0,0 +1,297 @@
1
+ import { c as _c } from "react-compiler-runtime";
2
+ import React from 'react';
3
+ import PropTypes from 'prop-types';
4
+ import cn from 'classnames';
5
+ import "./index.css";
6
+ import styles from "./index.css.js";
7
+ const sizeStyles = {
8
+ "xs": styles.sizeXS,
9
+ "s": styles.sizeS,
10
+ "m": styles.sizeM,
11
+ "l": styles.sizeL
12
+ };
13
+ export const Size = {
14
+ "xs": "xs",
15
+ "s": "s",
16
+ "m": "m",
17
+ "l": "l"
18
+ };
19
+ const PlugOutlineIcon16 = /*#__PURE__*/React.forwardRef((props, ref) => {
20
+ const $ = _c(4);
21
+ let t0;
22
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
23
+ t0 = /*#__PURE__*/React.createElement("path", {
24
+ d: "M9.667 2.5c1.012 0 1.833.82 1.833 1.833V4.5h3.167a.5.5 0 0 1 0 1H11.5v5h3.167a.5.5 0 0 1 0 1H11.5v.167c0 1.012-.82 1.833-1.833 1.833H7.333a3.834 3.834 0 0 1-3.741-3H1.667A1.167 1.167 0 0 1 .5 9.333V6.667c0-.644.523-1.167 1.167-1.167h1.925c.38-1.716 1.91-3 3.741-3zm-2.334 1A2.833 2.833 0 0 0 4.5 6.333v3.334A2.833 2.833 0 0 0 7.333 12.5h2.334c.46 0 .833-.373.833-.833V4.333a.833.833 0 0 0-.833-.833zm-5.666 3a.167.167 0 0 0-.167.167v2.666c0 .092.075.167.167.167H3.5v-3z"
25
+ });
26
+ $[0] = t0;
27
+ } else {
28
+ t0 = $[0];
29
+ }
30
+ let t1;
31
+ if ($[1] !== props || $[2] !== ref) {
32
+ t1 = /*#__PURE__*/React.createElement("svg", Object.assign({
33
+ viewBox: "0 0 16 16"
34
+ }, props, {
35
+ ref: ref
36
+ }), t0);
37
+ $[1] = props;
38
+ $[2] = ref;
39
+ $[3] = t1;
40
+ } else {
41
+ t1 = $[3];
42
+ }
43
+ return t1;
44
+ });
45
+ PlugOutlineIcon16.displayName = 'PlugOutlineIcon16';
46
+ const PlugOutlineIcon20 = /*#__PURE__*/React.forwardRef((props, ref) => {
47
+ const $ = _c(4);
48
+ let t0;
49
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
50
+ t0 = /*#__PURE__*/React.createElement("path", {
51
+ d: "M12.333 3.25a2.417 2.417 0 0 1 2.417 2.417v.583h3.833a.75.75 0 0 1 0 1.5H14.75v4.5h3.833a.75.75 0 0 1 0 1.5H14.75v.583a2.417 2.417 0 0 1-2.417 2.417H9.167a4.92 4.92 0 0 1-4.53-3H1.834A1.583 1.583 0 0 1 .25 12.167V7.833c0-.874.709-1.583 1.583-1.583h2.805a4.92 4.92 0 0 1 4.529-3zm-3.166 1.5A3.417 3.417 0 0 0 5.75 8.167v3.666a3.417 3.417 0 0 0 3.417 3.417h3.166c.506 0 .917-.41.917-.917V5.667a.917.917 0 0 0-.917-.917zm-7.334 3a.083.083 0 0 0-.083.083v4.334c0 .046.037.083.083.083H4.25v-4.5z"
52
+ });
53
+ $[0] = t0;
54
+ } else {
55
+ t0 = $[0];
56
+ }
57
+ let t1;
58
+ if ($[1] !== props || $[2] !== ref) {
59
+ t1 = /*#__PURE__*/React.createElement("svg", Object.assign({
60
+ viewBox: "0 0 20 20"
61
+ }, props, {
62
+ ref: ref
63
+ }), t0);
64
+ $[1] = props;
65
+ $[2] = ref;
66
+ $[3] = t1;
67
+ } else {
68
+ t1 = $[3];
69
+ }
70
+ return t1;
71
+ });
72
+ PlugOutlineIcon20.displayName = 'PlugOutlineIcon20';
73
+ const PlugOutlineIcon24 = /*#__PURE__*/React.forwardRef((props, ref) => {
74
+ const $ = _c(4);
75
+ let t0;
76
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
77
+ t0 = /*#__PURE__*/React.createElement("path", {
78
+ d: "M15 4a3 3 0 0 1 3 3h4.5a1 1 0 1 1 0 2H18v6h4.5a1 1 0 1 1 0 2H18a3 3 0 0 1-3 3h-3a6 6 0 0 1-5.657-4H3a2 2 0 0 1-2-2v-4a2 2 0 0 1 2-2h3.343C7.167 5.67 9.388 4 12 4zm-3 2a4 4 0 0 0-4 4v4a4 4 0 0 0 4 4h3a1 1 0 0 0 1-1V7a1 1 0 0 0-1-1zm-9 8h3v-4H3z"
79
+ });
80
+ $[0] = t0;
81
+ } else {
82
+ t0 = $[0];
83
+ }
84
+ let t1;
85
+ if ($[1] !== props || $[2] !== ref) {
86
+ t1 = /*#__PURE__*/React.createElement("svg", Object.assign({
87
+ viewBox: "0 0 24 24"
88
+ }, props, {
89
+ ref: ref
90
+ }), t0);
91
+ $[1] = props;
92
+ $[2] = ref;
93
+ $[3] = t1;
94
+ } else {
95
+ t1 = $[3];
96
+ }
97
+ return t1;
98
+ });
99
+ PlugOutlineIcon24.displayName = 'PlugOutlineIcon24';
100
+ const PlugOutlineIcon28 = /*#__PURE__*/React.forwardRef((props, ref) => {
101
+ const $ = _c(4);
102
+ let t0;
103
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
104
+ t0 = /*#__PURE__*/React.createElement("path", {
105
+ d: "M18 5a3 3 0 0 1 3 3h5a1 1 0 1 1 0 2h-5v8h5a1 1 0 1 1 0 2h-5a3 3 0 0 1-3 3h-4a7 7 0 0 1-6.325-4H3a2 2 0 0 1-2-2v-6a2 2 0 0 1 2-2h4.675A7 7 0 0 1 14 5zm-4 2a5 5 0 0 0-5 5v4a5 5 0 0 0 5 5h4a1 1 0 0 0 1-1V8a1 1 0 0 0-1-1zM3 17h4v-6H3z"
106
+ });
107
+ $[0] = t0;
108
+ } else {
109
+ t0 = $[0];
110
+ }
111
+ let t1;
112
+ if ($[1] !== props || $[2] !== ref) {
113
+ t1 = /*#__PURE__*/React.createElement("svg", Object.assign({
114
+ viewBox: "0 0 28 28"
115
+ }, props, {
116
+ ref: ref
117
+ }), t0);
118
+ $[1] = props;
119
+ $[2] = ref;
120
+ $[3] = t1;
121
+ } else {
122
+ t1 = $[3];
123
+ }
124
+ return t1;
125
+ });
126
+ PlugOutlineIcon28.displayName = 'PlugOutlineIcon28';
127
+ const PlugOutlineIcon = /*#__PURE__*/React.forwardRef((t0, ref) => {
128
+ const $ = _c(34);
129
+ let className;
130
+ let props;
131
+ let style;
132
+ let t1;
133
+ let t2;
134
+ let theme;
135
+ if ($[0] !== t0) {
136
+ ({
137
+ theme,
138
+ size: t1,
139
+ className,
140
+ style,
141
+ "data-render-all-sizes": t2,
142
+ ...props
143
+ } = t0);
144
+ $[0] = t0;
145
+ $[1] = className;
146
+ $[2] = props;
147
+ $[3] = style;
148
+ $[4] = t1;
149
+ $[5] = t2;
150
+ $[6] = theme;
151
+ } else {
152
+ className = $[1];
153
+ props = $[2];
154
+ style = $[3];
155
+ t1 = $[4];
156
+ t2 = $[5];
157
+ theme = $[6];
158
+ }
159
+ const sizeFromProps = t1 === undefined ? "m" : t1;
160
+ const renderAllSizes = t2 === undefined ? false : t2;
161
+ const size = sizeFromProps in Size ? sizeFromProps : "m";
162
+ const t3 = styles[theme];
163
+ const t4 = sizeStyles[size];
164
+ const t5 = renderAllSizes && styles.allVariants;
165
+ let t6;
166
+ if ($[7] !== className || $[8] !== t3 || $[9] !== t4 || $[10] !== t5) {
167
+ t6 = cn(styles.icon, t3, t4, t5, className);
168
+ $[7] = className;
169
+ $[8] = t3;
170
+ $[9] = t4;
171
+ $[10] = t5;
172
+ $[11] = t6;
173
+ } else {
174
+ t6 = $[11];
175
+ }
176
+ let t7;
177
+ if ($[12] !== renderAllSizes || $[13] !== style) {
178
+ t7 = renderAllSizes ? {
179
+ "--rs-icon-ar-width": 28,
180
+ "--rs-icon-ar-height": 28,
181
+ ...style
182
+ } : style;
183
+ $[12] = renderAllSizes;
184
+ $[13] = style;
185
+ $[14] = t7;
186
+ } else {
187
+ t7 = $[14];
188
+ }
189
+ let t8;
190
+ if ($[15] !== props || $[16] !== ref || $[17] !== t6 || $[18] !== t7) {
191
+ t8 = {
192
+ ...props,
193
+ className: t6,
194
+ style: t7,
195
+ ref
196
+ };
197
+ $[15] = props;
198
+ $[16] = ref;
199
+ $[17] = t6;
200
+ $[18] = t7;
201
+ $[19] = t8;
202
+ } else {
203
+ t8 = $[19];
204
+ }
205
+ const mainProps = t8;
206
+ if (renderAllSizes) {
207
+ let t10;
208
+ let t11;
209
+ let t12;
210
+ let t9;
211
+ if ($[20] === Symbol.for("react.memo_cache_sentinel")) {
212
+ t9 = /*#__PURE__*/React.createElement(PlugOutlineIcon16, {
213
+ className: styles.variant16
214
+ });
215
+ t10 = /*#__PURE__*/React.createElement(PlugOutlineIcon20, {
216
+ className: styles.variant20
217
+ });
218
+ t11 = /*#__PURE__*/React.createElement(PlugOutlineIcon24, {
219
+ className: styles.variant24
220
+ });
221
+ t12 = /*#__PURE__*/React.createElement(PlugOutlineIcon28, {
222
+ className: styles.variant28
223
+ });
224
+ $[20] = t10;
225
+ $[21] = t11;
226
+ $[22] = t12;
227
+ $[23] = t9;
228
+ } else {
229
+ t10 = $[20];
230
+ t11 = $[21];
231
+ t12 = $[22];
232
+ t9 = $[23];
233
+ }
234
+ let t13;
235
+ if ($[24] !== mainProps) {
236
+ t13 = /*#__PURE__*/React.createElement("svg", Object.assign({
237
+ viewBox: "0 0 28 28"
238
+ }, mainProps), t9, t10, t11, t12);
239
+ $[24] = mainProps;
240
+ $[25] = t13;
241
+ } else {
242
+ t13 = $[25];
243
+ }
244
+ return t13;
245
+ }
246
+ if (size === Size.xs) {
247
+ let t9;
248
+ if ($[26] !== mainProps) {
249
+ t9 = /*#__PURE__*/React.createElement(PlugOutlineIcon16, mainProps);
250
+ $[26] = mainProps;
251
+ $[27] = t9;
252
+ } else {
253
+ t9 = $[27];
254
+ }
255
+ return t9;
256
+ }
257
+ if (size === Size.s) {
258
+ let t9;
259
+ if ($[28] !== mainProps) {
260
+ t9 = /*#__PURE__*/React.createElement(PlugOutlineIcon20, mainProps);
261
+ $[28] = mainProps;
262
+ $[29] = t9;
263
+ } else {
264
+ t9 = $[29];
265
+ }
266
+ return t9;
267
+ }
268
+ if (size === Size.m) {
269
+ let t9;
270
+ if ($[30] !== mainProps) {
271
+ t9 = /*#__PURE__*/React.createElement(PlugOutlineIcon24, mainProps);
272
+ $[30] = mainProps;
273
+ $[31] = t9;
274
+ } else {
275
+ t9 = $[31];
276
+ }
277
+ return t9;
278
+ }
279
+ let t9;
280
+ if ($[32] !== mainProps) {
281
+ t9 = /*#__PURE__*/React.createElement(PlugOutlineIcon28, mainProps);
282
+ $[32] = mainProps;
283
+ $[33] = t9;
284
+ } else {
285
+ t9 = $[33];
286
+ }
287
+ return t9;
288
+ });
289
+ PlugOutlineIcon.displayName = 'PlugOutlineIcon';
290
+ PlugOutlineIcon.propTypes = {
291
+ className: PropTypes.string,
292
+ theme: PropTypes.oneOf(["light", "dark"]),
293
+ size: PropTypes.oneOf(["xs", "s", "m", "l"]),
294
+ 'data-render-all-sizes': PropTypes.bool,
295
+ style: PropTypes.object
296
+ };
297
+ export default PlugOutlineIcon;
package/lib/plug.d.ts ADDED
@@ -0,0 +1,16 @@
1
+ import * as React from 'react';
2
+
3
+ export type TPlugIconSize = "xs" | "s" | "m" | "l";
4
+
5
+ export type TPlugIconTheme = "light" | "dark";
6
+
7
+ export interface IPlugIconProps extends React.SVGProps<any> {
8
+ size?: TPlugIconSize;
9
+ theme?: TPlugIconTheme;
10
+ 'data-render-all-sizes'?: boolean;
11
+ style?: React.CSSProperties;
12
+ }
13
+
14
+ declare const PlugIcon: React.ForwardRefExoticComponent<IPlugIconProps & React.RefAttributes<SVGSVGElement>>;
15
+
16
+ export default PlugIcon;
package/lib/plug.js ADDED
@@ -0,0 +1,297 @@
1
+ import { c as _c } from "react-compiler-runtime";
2
+ import React from 'react';
3
+ import PropTypes from 'prop-types';
4
+ import cn from 'classnames';
5
+ import "./index.css";
6
+ import styles from "./index.css.js";
7
+ const sizeStyles = {
8
+ "xs": styles.sizeXS,
9
+ "s": styles.sizeS,
10
+ "m": styles.sizeM,
11
+ "l": styles.sizeL
12
+ };
13
+ export const Size = {
14
+ "xs": "xs",
15
+ "s": "s",
16
+ "m": "m",
17
+ "l": "l"
18
+ };
19
+ const PlugIcon16 = /*#__PURE__*/React.forwardRef((props, ref) => {
20
+ const $ = _c(4);
21
+ let t0;
22
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
23
+ t0 = /*#__PURE__*/React.createElement("path", {
24
+ d: "M10.667 3C11.403 3 12 3.597 12 4.333v.417h2.667a.75.75 0 0 1 0 1.5H12v3.5h2.667a.75.75 0 0 1 0 1.5H12v.417c0 .736-.597 1.333-1.333 1.333H8.333A3.333 3.333 0 0 1 5 9.667V6.333A3.333 3.333 0 0 1 8.333 3zM4 10H1.667A.667.667 0 0 1 1 9.333V6.667C1 6.299 1.299 6 1.667 6H4z"
25
+ });
26
+ $[0] = t0;
27
+ } else {
28
+ t0 = $[0];
29
+ }
30
+ let t1;
31
+ if ($[1] !== props || $[2] !== ref) {
32
+ t1 = /*#__PURE__*/React.createElement("svg", Object.assign({
33
+ viewBox: "0 0 16 16"
34
+ }, props, {
35
+ ref: ref
36
+ }), t0);
37
+ $[1] = props;
38
+ $[2] = ref;
39
+ $[3] = t1;
40
+ } else {
41
+ t1 = $[3];
42
+ }
43
+ return t1;
44
+ });
45
+ PlugIcon16.displayName = 'PlugIcon16';
46
+ const PlugIcon20 = /*#__PURE__*/React.forwardRef((props, ref) => {
47
+ const $ = _c(4);
48
+ let t0;
49
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
50
+ t0 = /*#__PURE__*/React.createElement("path", {
51
+ d: "M12.333 4C13.253 4 14 4.747 14 5.667V6h3.583a1 1 0 1 1 0 2H14v4h3.583a1 1 0 1 1 0 2H14v.333c0 .92-.746 1.667-1.667 1.667H9.167A4.167 4.167 0 0 1 5 11.833V8.167A4.167 4.167 0 0 1 9.167 4zM4 13H1.833A.833.833 0 0 1 1 12.167V7.833c0-.46.373-.833.833-.833H4z"
52
+ });
53
+ $[0] = t0;
54
+ } else {
55
+ t0 = $[0];
56
+ }
57
+ let t1;
58
+ if ($[1] !== props || $[2] !== ref) {
59
+ t1 = /*#__PURE__*/React.createElement("svg", Object.assign({
60
+ viewBox: "0 0 20 20"
61
+ }, props, {
62
+ ref: ref
63
+ }), t0);
64
+ $[1] = props;
65
+ $[2] = ref;
66
+ $[3] = t1;
67
+ } else {
68
+ t1 = $[3];
69
+ }
70
+ return t1;
71
+ });
72
+ PlugIcon20.displayName = 'PlugIcon20';
73
+ const PlugIcon24 = /*#__PURE__*/React.forwardRef((props, ref) => {
74
+ const $ = _c(4);
75
+ let t0;
76
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
77
+ t0 = /*#__PURE__*/React.createElement("path", {
78
+ d: "M16 4a2 2 0 0 1 2 2v.5h3.5a1.5 1.5 0 0 1 0 3H18v5h3.5a1.5 1.5 0 0 1 0 3H18v.5a2 2 0 0 1-2 2h-4a5 5 0 0 1-5-5V9a5 5 0 0 1 5-5zM5 16H2a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1h3z"
79
+ });
80
+ $[0] = t0;
81
+ } else {
82
+ t0 = $[0];
83
+ }
84
+ let t1;
85
+ if ($[1] !== props || $[2] !== ref) {
86
+ t1 = /*#__PURE__*/React.createElement("svg", Object.assign({
87
+ viewBox: "0 0 24 24"
88
+ }, props, {
89
+ ref: ref
90
+ }), t0);
91
+ $[1] = props;
92
+ $[2] = ref;
93
+ $[3] = t1;
94
+ } else {
95
+ t1 = $[3];
96
+ }
97
+ return t1;
98
+ });
99
+ PlugIcon24.displayName = 'PlugIcon24';
100
+ const PlugIcon28 = /*#__PURE__*/React.forwardRef((props, ref) => {
101
+ const $ = _c(4);
102
+ let t0;
103
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
104
+ t0 = /*#__PURE__*/React.createElement("path", {
105
+ d: "M19 5a2 2 0 0 1 2 2v.5h5a1.5 1.5 0 0 1 0 3h-5v7h5a1.5 1.5 0 0 1 0 3h-5v.5a2 2 0 0 1-2 2h-6a6 6 0 0 1-6-6v-6a6 6 0 0 1 6-6zM5 19H2a1 1 0 0 1-1-1v-8a1 1 0 0 1 1-1h3z"
106
+ });
107
+ $[0] = t0;
108
+ } else {
109
+ t0 = $[0];
110
+ }
111
+ let t1;
112
+ if ($[1] !== props || $[2] !== ref) {
113
+ t1 = /*#__PURE__*/React.createElement("svg", Object.assign({
114
+ viewBox: "0 0 28 28"
115
+ }, props, {
116
+ ref: ref
117
+ }), t0);
118
+ $[1] = props;
119
+ $[2] = ref;
120
+ $[3] = t1;
121
+ } else {
122
+ t1 = $[3];
123
+ }
124
+ return t1;
125
+ });
126
+ PlugIcon28.displayName = 'PlugIcon28';
127
+ const PlugIcon = /*#__PURE__*/React.forwardRef((t0, ref) => {
128
+ const $ = _c(34);
129
+ let className;
130
+ let props;
131
+ let style;
132
+ let t1;
133
+ let t2;
134
+ let theme;
135
+ if ($[0] !== t0) {
136
+ ({
137
+ theme,
138
+ size: t1,
139
+ className,
140
+ style,
141
+ "data-render-all-sizes": t2,
142
+ ...props
143
+ } = t0);
144
+ $[0] = t0;
145
+ $[1] = className;
146
+ $[2] = props;
147
+ $[3] = style;
148
+ $[4] = t1;
149
+ $[5] = t2;
150
+ $[6] = theme;
151
+ } else {
152
+ className = $[1];
153
+ props = $[2];
154
+ style = $[3];
155
+ t1 = $[4];
156
+ t2 = $[5];
157
+ theme = $[6];
158
+ }
159
+ const sizeFromProps = t1 === undefined ? "m" : t1;
160
+ const renderAllSizes = t2 === undefined ? false : t2;
161
+ const size = sizeFromProps in Size ? sizeFromProps : "m";
162
+ const t3 = styles[theme];
163
+ const t4 = sizeStyles[size];
164
+ const t5 = renderAllSizes && styles.allVariants;
165
+ let t6;
166
+ if ($[7] !== className || $[8] !== t3 || $[9] !== t4 || $[10] !== t5) {
167
+ t6 = cn(styles.icon, t3, t4, t5, className);
168
+ $[7] = className;
169
+ $[8] = t3;
170
+ $[9] = t4;
171
+ $[10] = t5;
172
+ $[11] = t6;
173
+ } else {
174
+ t6 = $[11];
175
+ }
176
+ let t7;
177
+ if ($[12] !== renderAllSizes || $[13] !== style) {
178
+ t7 = renderAllSizes ? {
179
+ "--rs-icon-ar-width": 28,
180
+ "--rs-icon-ar-height": 28,
181
+ ...style
182
+ } : style;
183
+ $[12] = renderAllSizes;
184
+ $[13] = style;
185
+ $[14] = t7;
186
+ } else {
187
+ t7 = $[14];
188
+ }
189
+ let t8;
190
+ if ($[15] !== props || $[16] !== ref || $[17] !== t6 || $[18] !== t7) {
191
+ t8 = {
192
+ ...props,
193
+ className: t6,
194
+ style: t7,
195
+ ref
196
+ };
197
+ $[15] = props;
198
+ $[16] = ref;
199
+ $[17] = t6;
200
+ $[18] = t7;
201
+ $[19] = t8;
202
+ } else {
203
+ t8 = $[19];
204
+ }
205
+ const mainProps = t8;
206
+ if (renderAllSizes) {
207
+ let t10;
208
+ let t11;
209
+ let t12;
210
+ let t9;
211
+ if ($[20] === Symbol.for("react.memo_cache_sentinel")) {
212
+ t9 = /*#__PURE__*/React.createElement(PlugIcon16, {
213
+ className: styles.variant16
214
+ });
215
+ t10 = /*#__PURE__*/React.createElement(PlugIcon20, {
216
+ className: styles.variant20
217
+ });
218
+ t11 = /*#__PURE__*/React.createElement(PlugIcon24, {
219
+ className: styles.variant24
220
+ });
221
+ t12 = /*#__PURE__*/React.createElement(PlugIcon28, {
222
+ className: styles.variant28
223
+ });
224
+ $[20] = t10;
225
+ $[21] = t11;
226
+ $[22] = t12;
227
+ $[23] = t9;
228
+ } else {
229
+ t10 = $[20];
230
+ t11 = $[21];
231
+ t12 = $[22];
232
+ t9 = $[23];
233
+ }
234
+ let t13;
235
+ if ($[24] !== mainProps) {
236
+ t13 = /*#__PURE__*/React.createElement("svg", Object.assign({
237
+ viewBox: "0 0 28 28"
238
+ }, mainProps), t9, t10, t11, t12);
239
+ $[24] = mainProps;
240
+ $[25] = t13;
241
+ } else {
242
+ t13 = $[25];
243
+ }
244
+ return t13;
245
+ }
246
+ if (size === Size.xs) {
247
+ let t9;
248
+ if ($[26] !== mainProps) {
249
+ t9 = /*#__PURE__*/React.createElement(PlugIcon16, mainProps);
250
+ $[26] = mainProps;
251
+ $[27] = t9;
252
+ } else {
253
+ t9 = $[27];
254
+ }
255
+ return t9;
256
+ }
257
+ if (size === Size.s) {
258
+ let t9;
259
+ if ($[28] !== mainProps) {
260
+ t9 = /*#__PURE__*/React.createElement(PlugIcon20, mainProps);
261
+ $[28] = mainProps;
262
+ $[29] = t9;
263
+ } else {
264
+ t9 = $[29];
265
+ }
266
+ return t9;
267
+ }
268
+ if (size === Size.m) {
269
+ let t9;
270
+ if ($[30] !== mainProps) {
271
+ t9 = /*#__PURE__*/React.createElement(PlugIcon24, mainProps);
272
+ $[30] = mainProps;
273
+ $[31] = t9;
274
+ } else {
275
+ t9 = $[31];
276
+ }
277
+ return t9;
278
+ }
279
+ let t9;
280
+ if ($[32] !== mainProps) {
281
+ t9 = /*#__PURE__*/React.createElement(PlugIcon28, mainProps);
282
+ $[32] = mainProps;
283
+ $[33] = t9;
284
+ } else {
285
+ t9 = $[33];
286
+ }
287
+ return t9;
288
+ });
289
+ PlugIcon.displayName = 'PlugIcon';
290
+ PlugIcon.propTypes = {
291
+ className: PropTypes.string,
292
+ theme: PropTypes.oneOf(["light", "dark"]),
293
+ size: PropTypes.oneOf(["xs", "s", "m", "l"]),
294
+ 'data-render-all-sizes': PropTypes.bool,
295
+ style: PropTypes.object
296
+ };
297
+ export default PlugIcon;
@@ -248,6 +248,8 @@ All Icons list
248
248
  - PhoneOutlineIcon
249
249
  - PlayIcon
250
250
  - PlayOutlineIcon
251
+ - PlugIcon
252
+ - PlugOutlineIcon
251
253
  - PlusIcon
252
254
  - PlusOutlineIcon
253
255
  - PocketIcon
@@ -376,7 +378,7 @@ All Icons list
376
378
 
377
379
  ### Usage
378
380
 
379
- ```tsx
381
+ ```jsx
380
382
  import { CompanyIcon } from '@rescui/icons';
381
383
 
382
384
  <CompanyIcon />;
@@ -388,7 +390,7 @@ Animation inside `<svg>` tags can affect performance on pages with lots of loadi
388
390
 
389
391
  If you encounter performance issues, put loading icons as a background image for span and animate them like in this example:
390
392
 
391
- ```tsx
393
+ ```jsx
392
394
  import loadingOutlineIconSrc from '@rescui/icons/svg/loading-outline_24.svg';
393
395
 
394
396
  <>
@@ -413,7 +415,7 @@ import loadingOutlineIconSrc from '@rescui/icons/svg/loading-outline_24.svg';
413
415
 
414
416
  Here's an interactive comparison showcasing a possible performance hit (More FPS = Better).
415
417
 
416
- ```tsx
418
+ ```jsx
417
419
  import { useRef, useEffect, useState } from 'react';
418
420
  import { textCn } from '@rescui/typography';
419
421
  import { LoadingOutlineIcon } from '@rescui/icons';
@@ -533,7 +535,7 @@ Must be used with `data-render-all-sizes` prop
533
535
 
534
536
  Use the controls to see the effect at different viewport widths.
535
537
 
536
- ```tsx
538
+ ```jsx
537
539
  import { PersonOutlineIcon } from '@rescui/icons';
538
540
 
539
541
  const MyIcon = () => {
@@ -567,7 +569,7 @@ render(<MyIcon />);
567
569
 
568
570
  ##### Demo
569
571
 
570
- ```tsx
572
+ ```jsx
571
573
  import { PersonOutlineIcon } from '@rescui/icons';
572
574
 
573
575
  render(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rescui/icons",
3
- "version": "1.12.0",
3
+ "version": "1.12.1",
4
4
  "description": "",
5
5
  "license": "Apache-2.0",
6
6
  "author": "JetBrains",
@@ -44,5 +44,5 @@
44
44
  "svg-to-jsx": "rescui-scripts svg-to-jsx --src=svg --out=lib --template=template.js --ts-template=ts-template.js --typings-dir=lib"
45
45
  },
46
46
  "nx": {},
47
- "gitHead": "5a6fe218e161f8f97ea1faf56a82b0a5dae2ab4d"
47
+ "gitHead": "de39487aaf7fa1351451b7a4c73b0f6024551e5a"
48
48
  }
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path d="M9.667 2.5c1.012 0 1.833.82 1.833 1.833V4.5h3.167a.5.5 0 0 1 0 1H11.5v5h3.167a.5.5 0 0 1 0 1H11.5v.167c0 1.012-.82 1.833-1.833 1.833H7.333a3.834 3.834 0 0 1-3.741-3H1.667A1.167 1.167 0 0 1 .5 9.333V6.667c0-.644.523-1.167 1.167-1.167h1.925c.38-1.716 1.91-3 3.741-3zm-2.334 1A2.833 2.833 0 0 0 4.5 6.333v3.334A2.833 2.833 0 0 0 7.333 12.5h2.334c.46 0 .833-.373.833-.833V4.333a.833.833 0 0 0-.833-.833zm-5.666 3a.167.167 0 0 0-.167.167v2.666c0 .092.075.167.167.167H3.5v-3z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20"><path d="M12.333 3.25a2.417 2.417 0 0 1 2.417 2.417v.583h3.833a.75.75 0 0 1 0 1.5H14.75v4.5h3.833a.75.75 0 0 1 0 1.5H14.75v.583a2.417 2.417 0 0 1-2.417 2.417H9.167a4.92 4.92 0 0 1-4.53-3H1.834A1.583 1.583 0 0 1 .25 12.167V7.833c0-.874.709-1.583 1.583-1.583h2.805a4.92 4.92 0 0 1 4.529-3zm-3.166 1.5A3.417 3.417 0 0 0 5.75 8.167v3.666a3.417 3.417 0 0 0 3.417 3.417h3.166c.506 0 .917-.41.917-.917V5.667a.917.917 0 0 0-.917-.917zm-7.334 3a.083.083 0 0 0-.083.083v4.334c0 .046.037.083.083.083H4.25v-4.5z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path d="M15 4a3 3 0 0 1 3 3h4.5a1 1 0 1 1 0 2H18v6h4.5a1 1 0 1 1 0 2H18a3 3 0 0 1-3 3h-3a6 6 0 0 1-5.657-4H3a2 2 0 0 1-2-2v-4a2 2 0 0 1 2-2h3.343C7.167 5.67 9.388 4 12 4zm-3 2a4 4 0 0 0-4 4v4a4 4 0 0 0 4 4h3a1 1 0 0 0 1-1V7a1 1 0 0 0-1-1zm-9 8h3v-4H3z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="28" height="28"><path d="M18 5a3 3 0 0 1 3 3h5a1 1 0 1 1 0 2h-5v8h5a1 1 0 1 1 0 2h-5a3 3 0 0 1-3 3h-4a7 7 0 0 1-6.325-4H3a2 2 0 0 1-2-2v-6a2 2 0 0 1 2-2h4.675A7 7 0 0 1 14 5zm-4 2a5 5 0 0 0-5 5v4a5 5 0 0 0 5 5h4a1 1 0 0 0 1-1V8a1 1 0 0 0-1-1zM3 17h4v-6H3z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path d="M10.667 3C11.403 3 12 3.597 12 4.333v.417h2.667a.75.75 0 0 1 0 1.5H12v3.5h2.667a.75.75 0 0 1 0 1.5H12v.417c0 .736-.597 1.333-1.333 1.333H8.333A3.333 3.333 0 0 1 5 9.667V6.333A3.333 3.333 0 0 1 8.333 3zM4 10H1.667A.667.667 0 0 1 1 9.333V6.667C1 6.299 1.299 6 1.667 6H4z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20"><path d="M12.333 4C13.253 4 14 4.747 14 5.667V6h3.583a1 1 0 1 1 0 2H14v4h3.583a1 1 0 1 1 0 2H14v.333c0 .92-.746 1.667-1.667 1.667H9.167A4.167 4.167 0 0 1 5 11.833V8.167A4.167 4.167 0 0 1 9.167 4zM4 13H1.833A.833.833 0 0 1 1 12.167V7.833c0-.46.373-.833.833-.833H4z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path d="M16 4a2 2 0 0 1 2 2v.5h3.5a1.5 1.5 0 0 1 0 3H18v5h3.5a1.5 1.5 0 0 1 0 3H18v.5a2 2 0 0 1-2 2h-4a5 5 0 0 1-5-5V9a5 5 0 0 1 5-5zM5 16H2a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1h3z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="28" height="28"><path d="M19 5a2 2 0 0 1 2 2v.5h5a1.5 1.5 0 0 1 0 3h-5v7h5a1.5 1.5 0 0 1 0 3h-5v.5a2 2 0 0 1-2 2h-6a6 6 0 0 1-6-6v-6a6 6 0 0 1 6-6zM5 19H2a1 1 0 0 1-1-1v-8a1 1 0 0 1 1-1h3z"/></svg>