@rescui/tag 0.12.1 → 0.13.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.
- package/lib/_virtual/close-outline.js +106 -0
- package/lib/_virtual/index.css.js +12 -12
- package/lib/index.css +78 -78
- package/lib/parts/base-tag.p.module.css.js +9 -9
- package/lib/parts/removable-tag.js +2 -2
- package/lib/parts/removable-tag.p.module.css.js +12 -12
- package/lib/parts/sticky-tag.p.module.css.js +11 -11
- package/lib/parts/tag.p.module.css.js +1 -1
- package/package.json +2 -2
- package/lib/_virtual/close.js +0 -106
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import _extends from '@babel/runtime-corejs3/helpers/esm/extends';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
import cn from 'classnames';
|
|
5
|
+
import styles from './index.css.js';
|
|
6
|
+
const sizeStyles = {
|
|
7
|
+
"xs": styles.sizeXS,
|
|
8
|
+
"s": styles.sizeS,
|
|
9
|
+
"m": styles.sizeM,
|
|
10
|
+
"l": styles.sizeL
|
|
11
|
+
};
|
|
12
|
+
const Size = {
|
|
13
|
+
"xs": "xs",
|
|
14
|
+
"s": "s",
|
|
15
|
+
"m": "m",
|
|
16
|
+
"l": "l"
|
|
17
|
+
};
|
|
18
|
+
const CloseOutlineIcon16 = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/React.createElement("svg", _extends({
|
|
19
|
+
viewBox: "0 0 16 16"
|
|
20
|
+
}, props, {
|
|
21
|
+
ref: ref
|
|
22
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
23
|
+
d: "M2.646 2.646a.5.5 0 0 1 .708 0L8 7.293l4.646-4.647a.5.5 0 0 1 .708.708L8.707 8l4.647 4.646a.5.5 0 0 1-.708.708L8 8.707l-4.646 4.647a.5.5 0 0 1-.708-.708L7.293 8 2.646 3.354a.5.5 0 0 1 0-.708"
|
|
24
|
+
})));
|
|
25
|
+
CloseOutlineIcon16.displayName = 'CloseOutlineIcon16';
|
|
26
|
+
const CloseOutlineIcon20 = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/React.createElement("svg", _extends({
|
|
27
|
+
viewBox: "0 0 20 20"
|
|
28
|
+
}, props, {
|
|
29
|
+
ref: ref
|
|
30
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
31
|
+
d: "M3.47 3.47a.75.75 0 0 1 1.06 0L10 8.94l5.47-5.47a.75.75 0 1 1 1.06 1.06L11.06 10l5.47 5.47a.75.75 0 1 1-1.06 1.06L10 11.06l-5.47 5.47a.75.75 0 0 1-1.06-1.06L8.94 10 3.47 4.53a.75.75 0 0 1 0-1.06"
|
|
32
|
+
})));
|
|
33
|
+
CloseOutlineIcon20.displayName = 'CloseOutlineIcon20';
|
|
34
|
+
const CloseOutlineIcon24 = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/React.createElement("svg", _extends({
|
|
35
|
+
viewBox: "0 0 24 24"
|
|
36
|
+
}, props, {
|
|
37
|
+
ref: ref
|
|
38
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
39
|
+
d: "M3.793 3.793a1 1 0 0 1 1.414 0L12 10.586l6.793-6.793a1 1 0 1 1 1.414 1.414L13.414 12l6.793 6.793a1 1 0 0 1-1.414 1.414L12 13.414l-6.793 6.793a1 1 0 0 1-1.414-1.414L10.586 12 3.793 5.207a1 1 0 0 1 0-1.414"
|
|
40
|
+
})));
|
|
41
|
+
CloseOutlineIcon24.displayName = 'CloseOutlineIcon24';
|
|
42
|
+
const CloseOutlineIcon28 = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/React.createElement("svg", _extends({
|
|
43
|
+
viewBox: "0 0 28 28"
|
|
44
|
+
}, props, {
|
|
45
|
+
ref: ref
|
|
46
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
47
|
+
d: "M4.793 4.793a1 1 0 0 1 1.414 0L14 12.586l7.793-7.793a1 1 0 1 1 1.414 1.414L15.414 14l7.793 7.793a1 1 0 0 1-1.414 1.414L14 15.414l-7.793 7.793a1 1 0 0 1-1.414-1.414L12.586 14 4.793 6.207a1 1 0 0 1 0-1.414"
|
|
48
|
+
})));
|
|
49
|
+
CloseOutlineIcon28.displayName = 'CloseOutlineIcon28';
|
|
50
|
+
const CloseOutlineIcon = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
51
|
+
let {
|
|
52
|
+
theme,
|
|
53
|
+
size: sizeFromProps = "m",
|
|
54
|
+
className,
|
|
55
|
+
style,
|
|
56
|
+
['data-render-all-sizes']: renderAllSizes = false,
|
|
57
|
+
...props
|
|
58
|
+
} = _ref;
|
|
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.createElement("svg", _extends({
|
|
72
|
+
viewBox: "0 0 28 28"
|
|
73
|
+
}, mainProps), /*#__PURE__*/React.createElement(CloseOutlineIcon16, {
|
|
74
|
+
className: styles.variant16
|
|
75
|
+
}), /*#__PURE__*/React.createElement(CloseOutlineIcon20, {
|
|
76
|
+
className: styles.variant20
|
|
77
|
+
}), /*#__PURE__*/React.createElement(CloseOutlineIcon24, {
|
|
78
|
+
className: styles.variant24
|
|
79
|
+
}), /*#__PURE__*/React.createElement(CloseOutlineIcon28, {
|
|
80
|
+
className: styles.variant28
|
|
81
|
+
}));
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
if (size === Size['xs']) {
|
|
85
|
+
return /*#__PURE__*/React.createElement(CloseOutlineIcon16, mainProps);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
if (size === Size['s']) {
|
|
89
|
+
return /*#__PURE__*/React.createElement(CloseOutlineIcon20, mainProps);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
if (size === Size['m']) {
|
|
93
|
+
return /*#__PURE__*/React.createElement(CloseOutlineIcon24, mainProps);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
return /*#__PURE__*/React.createElement(CloseOutlineIcon28, mainProps);
|
|
97
|
+
});
|
|
98
|
+
CloseOutlineIcon.displayName = 'CloseOutlineIcon';
|
|
99
|
+
CloseOutlineIcon.propTypes = {
|
|
100
|
+
className: PropTypes.string,
|
|
101
|
+
theme: PropTypes.oneOf(["light", "dark"]),
|
|
102
|
+
size: PropTypes.oneOf(["xs", "s", "m", "l"]),
|
|
103
|
+
'data-render-all-sizes': PropTypes.bool,
|
|
104
|
+
style: PropTypes.object
|
|
105
|
+
};
|
|
106
|
+
export { Size, CloseOutlineIcon as default };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
var styles = {
|
|
2
|
-
"icon": "
|
|
3
|
-
"sizeXS": "
|
|
4
|
-
"sizeS": "
|
|
5
|
-
"sizeM": "
|
|
6
|
-
"sizeL": "
|
|
7
|
-
"light": "
|
|
8
|
-
"dark": "
|
|
9
|
-
"allVariants": "
|
|
10
|
-
"variant16": "
|
|
11
|
-
"variant20": "
|
|
12
|
-
"variant24": "
|
|
13
|
-
"variant28": "
|
|
2
|
+
"icon": "_icon_gpkxqm_4",
|
|
3
|
+
"sizeXS": "_sizeXS_gpkxqm_14",
|
|
4
|
+
"sizeS": "_sizeS_gpkxqm_18",
|
|
5
|
+
"sizeM": "_sizeM_gpkxqm_22",
|
|
6
|
+
"sizeL": "_sizeL_gpkxqm_26",
|
|
7
|
+
"light": "_light_gpkxqm_30",
|
|
8
|
+
"dark": "_dark_gpkxqm_34",
|
|
9
|
+
"allVariants": "_allVariants_gpkxqm_48",
|
|
10
|
+
"variant16": "_variant16_gpkxqm_53",
|
|
11
|
+
"variant20": "_variant20_gpkxqm_54",
|
|
12
|
+
"variant24": "_variant24_gpkxqm_55",
|
|
13
|
+
"variant28": "_variant28_gpkxqm_58"
|
|
14
14
|
};
|
|
15
15
|
export { styles as default };
|
package/lib/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.
|
|
1
|
+
._icon_gpkxqm_4{
|
|
2
2
|
--_rs-theme-dark:var(
|
|
3
3
|
--_rs-internal-force-theme-dark-consult-rescui-before-using,
|
|
4
4
|
var(--rs-theme-dark, 0)
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
--_rs-theme-light-coefficient:calc(1 - var(--_rs-theme-dark-coefficient));
|
|
9
9
|
}
|
|
10
10
|
@supports (color: color-mix(in srgb, #fff 50%, #000 50%)){
|
|
11
|
-
.
|
|
11
|
+
._icon_gpkxqm_4{
|
|
12
12
|
--_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)));
|
|
13
13
|
--_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)));
|
|
14
14
|
--_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)));
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
@supports not (color: color-mix(in srgb, #fff 50%, #000 50%)){
|
|
20
|
-
.
|
|
20
|
+
._icon_gpkxqm_4{
|
|
21
21
|
--_rs-color-primary:rgb(calc(var(--_rs-theme-light-coefficient, 1)*107 + var(--_rs-theme-dark-coefficient, 0)*132), calc(var(--_rs-theme-light-coefficient, 1)*87 + var(--_rs-theme-dark-coefficient, 0)*115), 255);
|
|
22
22
|
--_rs-color-primary-dim:rgb(calc(var(--_rs-theme-light-coefficient, 1)*137 + var(--_rs-theme-dark-coefficient, 0)*111), calc(var(--_rs-theme-light-coefficient, 1)*121 + var(--_rs-theme-dark-coefficient, 0)*97), calc(var(--_rs-theme-light-coefficient, 1)*255 + var(--_rs-theme-dark-coefficient, 0)*210));
|
|
23
23
|
--_rs-color-primary-fog:rgb(calc(var(--_rs-theme-light-coefficient, 1)*225 + var(--_rs-theme-dark-coefficient, 0)*46), calc(var(--_rs-theme-light-coefficient, 1)*221 + var(--_rs-theme-dark-coefficient, 0)*43), calc(var(--_rs-theme-light-coefficient, 1)*255 + var(--_rs-theme-dark-coefficient, 0)*73));
|
|
@@ -25,30 +25,30 @@
|
|
|
25
25
|
--_rs-color-primary-t-fog:rgba(calc(var(--_rs-theme-light-coefficient, 1)*107 + var(--_rs-theme-dark-coefficient, 0)*132), calc(var(--_rs-theme-light-coefficient, 1)*87 + var(--_rs-theme-dark-coefficient, 0)*115), 255, calc(var(--_rs-theme-light-coefficient, 1)*0.2 + var(--_rs-theme-dark-coefficient, 0)*0.3));
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
|
-
.
|
|
28
|
+
._icon_gpkxqm_4{
|
|
29
29
|
|
|
30
30
|
fill:var(--_rs-icons-themed-fill-or-initial, currentcolor);
|
|
31
31
|
|
|
32
32
|
width:var(--rs-icons-width, auto);
|
|
33
33
|
height:var(--rs-icons-height, var(--_rs-icons-height));
|
|
34
34
|
}
|
|
35
|
-
.
|
|
35
|
+
._sizeXS_gpkxqm_14{
|
|
36
36
|
--_rs-icons-height:16px;
|
|
37
37
|
}
|
|
38
|
-
.
|
|
38
|
+
._sizeS_gpkxqm_18{
|
|
39
39
|
--_rs-icons-height:20px;
|
|
40
40
|
}
|
|
41
|
-
.
|
|
41
|
+
._sizeM_gpkxqm_22{
|
|
42
42
|
--_rs-icons-height:24px;
|
|
43
43
|
}
|
|
44
|
-
.
|
|
44
|
+
._sizeL_gpkxqm_26{
|
|
45
45
|
--_rs-icons-height:28px;
|
|
46
46
|
}
|
|
47
|
-
.
|
|
47
|
+
._light_gpkxqm_30{
|
|
48
48
|
--rs-theme-dark:0;
|
|
49
49
|
--_rs-icons-themed-fill-or-initial:rgb(calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(28 + var(--_rs-theme-dark-coefficient, 0)*227));
|
|
50
50
|
}
|
|
51
|
-
.
|
|
51
|
+
._dark_gpkxqm_34{
|
|
52
52
|
--rs-theme-dark:1;
|
|
53
53
|
--_rs-icons-themed-fill-or-initial:rgb(calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(28 + var(--_rs-theme-dark-coefficient, 0)*227));
|
|
54
54
|
}
|
|
@@ -60,55 +60,55 @@
|
|
|
60
60
|
transform:rotate(360deg);
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
|
-
.
|
|
63
|
+
._allVariants_gpkxqm_48{
|
|
64
64
|
aspect-ratio:var(--rs-icon-ar-width, 1) / var(--rs-icon-ar-height, 1);
|
|
65
65
|
container:rs-icon / size;
|
|
66
66
|
}
|
|
67
|
-
.
|
|
68
|
-
.
|
|
69
|
-
.
|
|
67
|
+
._variant16_gpkxqm_53,
|
|
68
|
+
._variant20_gpkxqm_54,
|
|
69
|
+
._variant24_gpkxqm_55{
|
|
70
70
|
display:none;
|
|
71
71
|
}
|
|
72
|
-
.
|
|
72
|
+
._variant28_gpkxqm_58{
|
|
73
73
|
display:block;
|
|
74
74
|
}
|
|
75
75
|
@container rs-icon (max-height: 24px){
|
|
76
|
-
.
|
|
76
|
+
._variant24_gpkxqm_55{
|
|
77
77
|
display:block;
|
|
78
78
|
}
|
|
79
|
-
.
|
|
79
|
+
._variant28_gpkxqm_58{
|
|
80
80
|
display:none;
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
@container rs-icon (max-height: 20px){
|
|
84
|
-
.
|
|
84
|
+
._variant20_gpkxqm_54{
|
|
85
85
|
display:block;
|
|
86
86
|
}
|
|
87
|
-
.
|
|
87
|
+
._variant24_gpkxqm_55{
|
|
88
88
|
display:none;
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
@container rs-icon (max-height: 16px){
|
|
92
|
-
.
|
|
92
|
+
._variant16_gpkxqm_53{
|
|
93
93
|
display:block;
|
|
94
94
|
}
|
|
95
|
-
.
|
|
95
|
+
._variant20_gpkxqm_54{
|
|
96
96
|
display:none;
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
|
-
.
|
|
99
|
+
._alignIconLeft_1ssib58_7{
|
|
100
100
|
--_rs-tag-flex-direction:row;
|
|
101
101
|
}
|
|
102
|
-
.
|
|
102
|
+
._alignIconRight_1ssib58_10{
|
|
103
103
|
--_rs-tag-flex-direction:row-reverse;
|
|
104
104
|
}
|
|
105
|
-
.
|
|
105
|
+
._uppercase_1ssib58_14{
|
|
106
106
|
--_rs-tag-text-transform:uppercase;
|
|
107
107
|
--_rs-tag-horizontal-padding-or-initial:var(
|
|
108
108
|
--_rs-tag-uppercase-horizontal-padding
|
|
109
109
|
);
|
|
110
110
|
}
|
|
111
|
-
.
|
|
111
|
+
._sizeXs_1ssib58_18{
|
|
112
112
|
--_rs-tag-vertical-padding:2px;
|
|
113
113
|
--_rs-tag-base-horizontal-padding:8px;
|
|
114
114
|
--_rs-tag-uppercase-horizontal-padding:var(
|
|
@@ -149,7 +149,7 @@
|
|
|
149
149
|
--_rs-typography-link-external-standalone-border-offset-from-text-base:1.02em;
|
|
150
150
|
--_rs-typography-link-border-bottom-width-from-text:1px;
|
|
151
151
|
}
|
|
152
|
-
.
|
|
152
|
+
._sizeS_1ssib58_21{
|
|
153
153
|
--_rs-tag-vertical-padding:4px;
|
|
154
154
|
--_rs-tag-base-horizontal-padding:8px;
|
|
155
155
|
--_rs-tag-uppercase-horizontal-padding:10px;
|
|
@@ -188,7 +188,7 @@
|
|
|
188
188
|
--_rs-typography-link-external-standalone-border-offset-from-text-base:1.02em;
|
|
189
189
|
--_rs-typography-link-border-bottom-width-from-text:1px;
|
|
190
190
|
}
|
|
191
|
-
.
|
|
191
|
+
._sizeM_1ssib58_24{
|
|
192
192
|
--_rs-tag-vertical-padding:6px;
|
|
193
193
|
--_rs-tag-base-horizontal-padding:12px;
|
|
194
194
|
--_rs-tag-uppercase-horizontal-padding:var(
|
|
@@ -233,11 +233,11 @@
|
|
|
233
233
|
--_rs-typography-link-border-bottom-width-from-text:1px;
|
|
234
234
|
}
|
|
235
235
|
@media screen and (max-width: 640px){
|
|
236
|
-
.
|
|
236
|
+
._sizeM_1ssib58_24{
|
|
237
237
|
--_rs-typography-text-2-sm-list-li-margin-top-from-text:12px;
|
|
238
238
|
}
|
|
239
239
|
}
|
|
240
|
-
.
|
|
240
|
+
._sizeL_1ssib58_27{
|
|
241
241
|
--_rs-tag-vertical-padding:8px;
|
|
242
242
|
--_rs-tag-base-horizontal-padding:16px;
|
|
243
243
|
--_rs-tag-uppercase-horizontal-padding:var(
|
|
@@ -282,11 +282,11 @@
|
|
|
282
282
|
--_rs-typography-link-border-bottom-width-from-text:1px;
|
|
283
283
|
}
|
|
284
284
|
@media screen and (max-width: 640px){
|
|
285
|
-
.
|
|
285
|
+
._sizeL_1ssib58_27{
|
|
286
286
|
--_rs-typography-text-1-sm-list-li-margin-top-from-text:16px;
|
|
287
287
|
}
|
|
288
288
|
}
|
|
289
|
-
.
|
|
289
|
+
._main_1ssib58_31{
|
|
290
290
|
--_rs-tag-border-width:1px;
|
|
291
291
|
|
|
292
292
|
--_rs-tag-horizontal-padding:var(
|
|
@@ -327,34 +327,34 @@
|
|
|
327
327
|
background:transparent;
|
|
328
328
|
gap:8px;
|
|
329
329
|
}
|
|
330
|
-
.
|
|
330
|
+
._main_1ssib58_31 ._icon_1ssib58_60{
|
|
331
331
|
fill:currentColor;
|
|
332
332
|
|
|
333
333
|
width:auto;
|
|
334
334
|
height:var(--_rs-tag-icon-size);
|
|
335
335
|
}
|
|
336
336
|
|
|
337
|
-
.
|
|
337
|
+
._main_xkufoa_1{
|
|
338
338
|
border-radius:var(--_rs-tag-border-radius);
|
|
339
339
|
}
|
|
340
340
|
|
|
341
|
-
.
|
|
341
|
+
._themeLight_fogoh1_7{
|
|
342
342
|
--rs-theme-dark:0;
|
|
343
343
|
}
|
|
344
|
-
.
|
|
344
|
+
._themeDark_fogoh1_10{
|
|
345
345
|
--rs-theme-dark:1;
|
|
346
346
|
}
|
|
347
|
-
.
|
|
347
|
+
._sizeXs_fogoh1_14{
|
|
348
348
|
--_rs-tag-removable-vertical-padding:2px;
|
|
349
349
|
--_rs-tag-removable-left-padding:8px;
|
|
350
350
|
--_rs-tag-removable-border-radius:4px;
|
|
351
351
|
--_rs-tag-removable-close-part-size:24px;
|
|
352
352
|
--_rs-tag-removable-custom-icon-size:16px;
|
|
353
353
|
}
|
|
354
|
-
.
|
|
354
|
+
._sizeXs_fogoh1_14 [data-rs-internal="removable-tag__close-icon"]:not(html){
|
|
355
355
|
--_rs-icons-height:16px;
|
|
356
356
|
}
|
|
357
|
-
.
|
|
357
|
+
._sizeXs_fogoh1_14 {
|
|
358
358
|
--_rs-typography-letter-spacing:var(--rs-text-3-letter-spacing, 0.0045em);
|
|
359
359
|
--_rs-typography-text-transform:initial;
|
|
360
360
|
--_rs-typography-font-variant-numeric:initial;
|
|
@@ -388,17 +388,17 @@
|
|
|
388
388
|
--_rs-typography-link-external-standalone-border-offset-from-text-base:1.02em;
|
|
389
389
|
--_rs-typography-link-border-bottom-width-from-text:1px;
|
|
390
390
|
}
|
|
391
|
-
.
|
|
391
|
+
._sizeS_fogoh1_17{
|
|
392
392
|
--_rs-tag-removable-vertical-padding:4px;
|
|
393
393
|
--_rs-tag-removable-left-padding:8px;
|
|
394
394
|
--_rs-tag-removable-border-radius:4px;
|
|
395
395
|
--_rs-tag-removable-close-part-size:28px;
|
|
396
396
|
--_rs-tag-removable-custom-icon-size:20px;
|
|
397
397
|
}
|
|
398
|
-
.
|
|
398
|
+
._sizeS_fogoh1_17 [data-rs-internal="removable-tag__close-icon"]:not(html){
|
|
399
399
|
--_rs-icons-height:20px;
|
|
400
400
|
}
|
|
401
|
-
.
|
|
401
|
+
._sizeS_fogoh1_17 {
|
|
402
402
|
--_rs-typography-letter-spacing:var(--rs-text-3-letter-spacing, 0.0045em);
|
|
403
403
|
--_rs-typography-text-transform:initial;
|
|
404
404
|
--_rs-typography-font-variant-numeric:initial;
|
|
@@ -432,17 +432,17 @@
|
|
|
432
432
|
--_rs-typography-link-external-standalone-border-offset-from-text-base:1.02em;
|
|
433
433
|
--_rs-typography-link-border-bottom-width-from-text:1px;
|
|
434
434
|
}
|
|
435
|
-
.
|
|
435
|
+
._sizeM_fogoh1_20{
|
|
436
436
|
--_rs-tag-removable-vertical-padding:6px;
|
|
437
437
|
--_rs-tag-removable-left-padding:12px;
|
|
438
438
|
--_rs-tag-removable-border-radius:6px;
|
|
439
439
|
--_rs-tag-removable-close-part-size:36px;
|
|
440
440
|
--_rs-tag-removable-custom-icon-size:24px;
|
|
441
441
|
}
|
|
442
|
-
.
|
|
442
|
+
._sizeM_fogoh1_20 [data-rs-internal="removable-tag__close-icon"]:not(html){
|
|
443
443
|
--_rs-icons-height:24px;
|
|
444
444
|
}
|
|
445
|
-
.
|
|
445
|
+
._sizeM_fogoh1_20 {
|
|
446
446
|
--_rs-typography-letter-spacing:var(--rs-text-2-letter-spacing, 0.0015em);
|
|
447
447
|
--_rs-typography-text-transform:initial;
|
|
448
448
|
--_rs-typography-font-variant-numeric:initial;
|
|
@@ -480,21 +480,21 @@
|
|
|
480
480
|
--_rs-typography-link-border-bottom-width-from-text:1px;
|
|
481
481
|
}
|
|
482
482
|
@media screen and (max-width: 640px){
|
|
483
|
-
.
|
|
483
|
+
._sizeM_fogoh1_20 {
|
|
484
484
|
--_rs-typography-text-2-sm-list-li-margin-top-from-text:12px;
|
|
485
485
|
}
|
|
486
486
|
}
|
|
487
|
-
.
|
|
487
|
+
._sizeL_fogoh1_23{
|
|
488
488
|
--_rs-tag-removable-vertical-padding:8px;
|
|
489
489
|
--_rs-tag-removable-left-padding:16px;
|
|
490
490
|
--_rs-tag-removable-border-radius:8px;
|
|
491
491
|
--_rs-tag-removable-close-part-size:44px;
|
|
492
492
|
--_rs-tag-removable-custom-icon-size:28px;
|
|
493
493
|
}
|
|
494
|
-
.
|
|
494
|
+
._sizeL_fogoh1_23 [data-rs-internal="removable-tag__close-icon"]:not(html){
|
|
495
495
|
--_rs-icons-height:28px;
|
|
496
496
|
}
|
|
497
|
-
.
|
|
497
|
+
._sizeL_fogoh1_23 {
|
|
498
498
|
--_rs-typography-letter-spacing:var(--rs-text-1-letter-spacing, normal);
|
|
499
499
|
--_rs-typography-text-transform:initial;
|
|
500
500
|
--_rs-typography-font-variant-numeric:initial;
|
|
@@ -532,11 +532,11 @@
|
|
|
532
532
|
--_rs-typography-link-border-bottom-width-from-text:1px;
|
|
533
533
|
}
|
|
534
534
|
@media screen and (max-width: 640px){
|
|
535
|
-
.
|
|
535
|
+
._sizeL_fogoh1_23 {
|
|
536
536
|
--_rs-typography-text-1-sm-list-li-margin-top-from-text:16px;
|
|
537
537
|
}
|
|
538
538
|
}
|
|
539
|
-
.
|
|
539
|
+
._wrapper_fogoh1_27{
|
|
540
540
|
--_rs-theme-dark:var(
|
|
541
541
|
--_rs-internal-force-theme-dark-consult-rescui-before-using,
|
|
542
542
|
var(--rs-theme-dark, 0)
|
|
@@ -546,7 +546,7 @@
|
|
|
546
546
|
--_rs-theme-light-coefficient:calc(1 - var(--_rs-theme-dark-coefficient));
|
|
547
547
|
}
|
|
548
548
|
@supports (color: color-mix(in srgb, #fff 50%, #000 50%)){
|
|
549
|
-
.
|
|
549
|
+
._wrapper_fogoh1_27{
|
|
550
550
|
--_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)));
|
|
551
551
|
--_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)));
|
|
552
552
|
--_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)));
|
|
@@ -555,7 +555,7 @@
|
|
|
555
555
|
}
|
|
556
556
|
}
|
|
557
557
|
@supports not (color: color-mix(in srgb, #fff 50%, #000 50%)){
|
|
558
|
-
.
|
|
558
|
+
._wrapper_fogoh1_27{
|
|
559
559
|
--_rs-color-primary:rgb(calc(var(--_rs-theme-light-coefficient, 1)*107 + var(--_rs-theme-dark-coefficient, 0)*132), calc(var(--_rs-theme-light-coefficient, 1)*87 + var(--_rs-theme-dark-coefficient, 0)*115), 255);
|
|
560
560
|
--_rs-color-primary-dim:rgb(calc(var(--_rs-theme-light-coefficient, 1)*137 + var(--_rs-theme-dark-coefficient, 0)*111), calc(var(--_rs-theme-light-coefficient, 1)*121 + var(--_rs-theme-dark-coefficient, 0)*97), calc(var(--_rs-theme-light-coefficient, 1)*255 + var(--_rs-theme-dark-coefficient, 0)*210));
|
|
561
561
|
--_rs-color-primary-fog:rgb(calc(var(--_rs-theme-light-coefficient, 1)*225 + var(--_rs-theme-dark-coefficient, 0)*46), calc(var(--_rs-theme-light-coefficient, 1)*221 + var(--_rs-theme-dark-coefficient, 0)*43), calc(var(--_rs-theme-light-coefficient, 1)*255 + var(--_rs-theme-dark-coefficient, 0)*73));
|
|
@@ -563,7 +563,7 @@
|
|
|
563
563
|
--_rs-color-primary-t-fog:rgba(calc(var(--_rs-theme-light-coefficient, 1)*107 + var(--_rs-theme-dark-coefficient, 0)*132), calc(var(--_rs-theme-light-coefficient, 1)*87 + var(--_rs-theme-dark-coefficient, 0)*115), 255, calc(var(--_rs-theme-light-coefficient, 1)*0.2 + var(--_rs-theme-dark-coefficient, 0)*0.3));
|
|
564
564
|
}
|
|
565
565
|
}
|
|
566
|
-
.
|
|
566
|
+
._wrapper_fogoh1_27 {
|
|
567
567
|
letter-spacing:var(
|
|
568
568
|
--rs-text-base-letter-spacing,
|
|
569
569
|
var(--_rs-typography-letter-spacing)
|
|
@@ -592,10 +592,10 @@
|
|
|
592
592
|
|
|
593
593
|
background-color:rgba(calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(28 + var(--_rs-theme-dark-coefficient, 0)*227), 0.1);
|
|
594
594
|
}
|
|
595
|
-
.
|
|
595
|
+
._wrapper_fogoh1_27 > *{
|
|
596
596
|
vertical-align:top;
|
|
597
597
|
}
|
|
598
|
-
.
|
|
598
|
+
._wrapper_fogoh1_27 ._icon_fogoh1_49{
|
|
599
599
|
flex:1 0 auto;
|
|
600
600
|
align-self:center;
|
|
601
601
|
|
|
@@ -606,14 +606,14 @@
|
|
|
606
606
|
vertical-align:top;
|
|
607
607
|
fill:currentColor;
|
|
608
608
|
}
|
|
609
|
-
.
|
|
609
|
+
._disabled_fogoh1_62{
|
|
610
610
|
pointer-events:none;
|
|
611
611
|
color:var(
|
|
612
612
|
--rs-color-pale,
|
|
613
613
|
rgba(calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(28 + var(--_rs-theme-dark-coefficient, 0)*227), 0.5)
|
|
614
614
|
);
|
|
615
615
|
}
|
|
616
|
-
.
|
|
616
|
+
._main_fogoh1_67{
|
|
617
617
|
display:inline-flex;
|
|
618
618
|
flex:1 1 auto;
|
|
619
619
|
justify-content:center;
|
|
@@ -627,10 +627,10 @@
|
|
|
627
627
|
|
|
628
628
|
background:transparent;
|
|
629
629
|
}
|
|
630
|
-
.
|
|
630
|
+
._wrap_fogoh1_27 ._main_fogoh1_67{
|
|
631
631
|
white-space:normal;
|
|
632
632
|
}
|
|
633
|
-
.
|
|
633
|
+
._close_fogoh1_86{
|
|
634
634
|
top:0;
|
|
635
635
|
right:0;
|
|
636
636
|
bottom:0;
|
|
@@ -658,82 +658,82 @@
|
|
|
658
658
|
-webkit-font-smoothing:inherit;
|
|
659
659
|
-moz-osx-font-smoothing:inherit;
|
|
660
660
|
}
|
|
661
|
-
.
|
|
661
|
+
._close_fogoh1_86::-moz-focus-inner{
|
|
662
662
|
padding:0;
|
|
663
663
|
|
|
664
664
|
border:0;
|
|
665
665
|
}
|
|
666
|
-
.
|
|
667
|
-
.
|
|
668
|
-
.
|
|
666
|
+
._close_fogoh1_86:active,
|
|
667
|
+
._close_fogoh1_86:hover,
|
|
668
|
+
._close_fogoh1_86:focus{
|
|
669
669
|
outline:none;
|
|
670
670
|
|
|
671
671
|
text-decoration:none;
|
|
672
672
|
}
|
|
673
|
-
.
|
|
673
|
+
._close_fogoh1_86:hover{
|
|
674
674
|
color:rgb(calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(28 + var(--_rs-theme-dark-coefficient, 0)*227));
|
|
675
675
|
background-color:rgba(calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(28 + var(--_rs-theme-dark-coefficient, 0)*227), 0.1);
|
|
676
676
|
}
|
|
677
|
-
.
|
|
677
|
+
._close_fogoh1_86:active{
|
|
678
678
|
color:rgb(calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(28 + var(--_rs-theme-dark-coefficient, 0)*227));
|
|
679
679
|
background-color:rgba(calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(28 + var(--_rs-theme-dark-coefficient, 0)*227), 0.2);
|
|
680
680
|
}
|
|
681
|
-
.
|
|
681
|
+
._close_fogoh1_86:focus[data-focus-method='key']{
|
|
682
682
|
box-shadow:inset 0 0 0 4px var(--_rs-color-primary-dim);
|
|
683
683
|
}
|
|
684
|
-
.
|
|
684
|
+
._disabled_fogoh1_62 ._close_fogoh1_86{
|
|
685
685
|
pointer-events:none;
|
|
686
686
|
}
|
|
687
687
|
|
|
688
|
-
.
|
|
688
|
+
._wrapper_1gap460_3{
|
|
689
689
|
position:relative;
|
|
690
690
|
}
|
|
691
|
-
.
|
|
691
|
+
._offset16_1gap460_7{
|
|
692
692
|
--_rs-tag-sticky-side-offset:16px;
|
|
693
693
|
}
|
|
694
|
-
.
|
|
694
|
+
._offset24_1gap460_10{
|
|
695
695
|
--_rs-tag-sticky-side-offset:24px;
|
|
696
696
|
}
|
|
697
|
-
.
|
|
697
|
+
._offset32_1gap460_13{
|
|
698
698
|
--_rs-tag-sticky-side-offset:32px;
|
|
699
699
|
}
|
|
700
|
-
.
|
|
700
|
+
._alignTop_1gap460_17{
|
|
701
701
|
--_rs-tag-sticky-border-radius:var(--_rs-tag-border-radius) var(--_rs-tag-border-radius) 0 0;
|
|
702
702
|
--_rs-tag-sticky-translate-y:-100%;
|
|
703
703
|
}
|
|
704
|
-
.
|
|
704
|
+
._alignMiddle_1gap460_20{
|
|
705
705
|
--_rs-tag-sticky-border-radius:var(--_rs-tag-border-radius);
|
|
706
706
|
--_rs-tag-sticky-translate-y:-50%;
|
|
707
707
|
}
|
|
708
|
-
.
|
|
708
|
+
._topStart_1gap460_24{
|
|
709
709
|
--_rs-tag-sticky-top:0;
|
|
710
710
|
--_rs-tag-sticky-right:initial;
|
|
711
711
|
--_rs-tag-sticky-left:var(--_rs-tag-sticky-side-offset);
|
|
712
712
|
--_rs-tag-sticky-transform:translate(0, var(--_rs-tag-sticky-translate-y));
|
|
713
713
|
--_rs-tag-sticky-transform-origin:initial;
|
|
714
714
|
}
|
|
715
|
-
.
|
|
715
|
+
._topEnd_1gap460_27{
|
|
716
716
|
--_rs-tag-sticky-top:0;
|
|
717
717
|
--_rs-tag-sticky-right:var(--_rs-tag-sticky-side-offset);
|
|
718
718
|
--_rs-tag-sticky-left:initial;
|
|
719
719
|
--_rs-tag-sticky-transform:translate(0, var(--_rs-tag-sticky-translate-y));
|
|
720
720
|
--_rs-tag-sticky-transform-origin:initial;
|
|
721
721
|
}
|
|
722
|
-
.
|
|
722
|
+
._leftStart_1gap460_30{
|
|
723
723
|
--_rs-tag-sticky-top:var(--_rs-tag-sticky-side-offset);
|
|
724
724
|
--_rs-tag-sticky-right:100%;
|
|
725
725
|
--_rs-tag-sticky-left:initial;
|
|
726
726
|
--_rs-tag-sticky-transform:rotate(270deg) translate(0, var(--_rs-tag-sticky-translate-y));
|
|
727
727
|
--_rs-tag-sticky-transform-origin:100% 0;
|
|
728
728
|
}
|
|
729
|
-
.
|
|
729
|
+
._leftEnd_1gap460_33{
|
|
730
730
|
--_rs-tag-sticky-top:calc(100% - var(--_rs-tag-sticky-side-offset));
|
|
731
731
|
--_rs-tag-sticky-right:100%;
|
|
732
732
|
--_rs-tag-sticky-left:initial;
|
|
733
733
|
--_rs-tag-sticky-transform:rotate(270deg) translate(100%, var(--_rs-tag-sticky-translate-y));
|
|
734
734
|
--_rs-tag-sticky-transform-origin:100% 0;
|
|
735
735
|
}
|
|
736
|
-
.
|
|
736
|
+
._tag_1gap460_37{
|
|
737
737
|
position:absolute;
|
|
738
738
|
top:var(--_rs-tag-sticky-top);
|
|
739
739
|
right:var(--_rs-tag-sticky-right);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
var styles = {
|
|
2
|
-
"alignIconLeft": "
|
|
3
|
-
"alignIconRight": "
|
|
4
|
-
"uppercase": "
|
|
5
|
-
"sizeXs": "
|
|
6
|
-
"sizeS": "
|
|
7
|
-
"sizeM": "
|
|
8
|
-
"sizeL": "
|
|
9
|
-
"main": "
|
|
10
|
-
"icon": "
|
|
2
|
+
"alignIconLeft": "_alignIconLeft_1ssib58_7",
|
|
3
|
+
"alignIconRight": "_alignIconRight_1ssib58_10",
|
|
4
|
+
"uppercase": "_uppercase_1ssib58_14",
|
|
5
|
+
"sizeXs": "_sizeXs_1ssib58_18",
|
|
6
|
+
"sizeS": "_sizeS_1ssib58_21",
|
|
7
|
+
"sizeM": "_sizeM_1ssib58_24",
|
|
8
|
+
"sizeL": "_sizeL_1ssib58_27",
|
|
9
|
+
"main": "_main_1ssib58_31",
|
|
10
|
+
"icon": "_icon_1ssib58_60"
|
|
11
11
|
};
|
|
12
12
|
export { styles as default };
|
|
@@ -3,7 +3,7 @@ import React, { cloneElement } from 'react';
|
|
|
3
3
|
import cn from 'classnames';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
import { useThemeWithUndefined } from '@rescui/ui-contexts';
|
|
6
|
-
import
|
|
6
|
+
import CloseOutlineIcon from '../_virtual/close-outline.js';
|
|
7
7
|
import styles from './removable-tag.p.module.css.js';
|
|
8
8
|
const SIZE_STYLES = {
|
|
9
9
|
xs: styles.sizeXs,
|
|
@@ -49,7 +49,7 @@ const RemovableTag = /*#__PURE__*/React.forwardRef(function Tag(_ref, ref) {
|
|
|
49
49
|
e.stopPropagation();
|
|
50
50
|
onRemoveClick();
|
|
51
51
|
}
|
|
52
|
-
}, /*#__PURE__*/React.createElement(
|
|
52
|
+
}, /*#__PURE__*/React.createElement(CloseOutlineIcon, {
|
|
53
53
|
"data-rs-internal": "removable-tag__close-icon",
|
|
54
54
|
"data-render-all-sizes": true
|
|
55
55
|
})));
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
var styles = {
|
|
2
|
-
"themeLight": "
|
|
3
|
-
"themeDark": "
|
|
4
|
-
"sizeXs": "
|
|
5
|
-
"sizeS": "
|
|
6
|
-
"sizeM": "
|
|
7
|
-
"sizeL": "
|
|
8
|
-
"wrapper": "
|
|
9
|
-
"icon": "
|
|
10
|
-
"disabled": "
|
|
11
|
-
"main": "
|
|
12
|
-
"wrap": "
|
|
13
|
-
"close": "
|
|
2
|
+
"themeLight": "_themeLight_fogoh1_7",
|
|
3
|
+
"themeDark": "_themeDark_fogoh1_10",
|
|
4
|
+
"sizeXs": "_sizeXs_fogoh1_14",
|
|
5
|
+
"sizeS": "_sizeS_fogoh1_17",
|
|
6
|
+
"sizeM": "_sizeM_fogoh1_20",
|
|
7
|
+
"sizeL": "_sizeL_fogoh1_23",
|
|
8
|
+
"wrapper": "_wrapper_fogoh1_27",
|
|
9
|
+
"icon": "_icon_fogoh1_49",
|
|
10
|
+
"disabled": "_disabled_fogoh1_62",
|
|
11
|
+
"main": "_main_fogoh1_67",
|
|
12
|
+
"wrap": "_wrap_fogoh1_27",
|
|
13
|
+
"close": "_close_fogoh1_86"
|
|
14
14
|
};
|
|
15
15
|
export { styles as default };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
var styles = {
|
|
2
|
-
"wrapper": "
|
|
3
|
-
"offset16": "
|
|
4
|
-
"offset24": "
|
|
5
|
-
"offset32": "
|
|
6
|
-
"alignTop": "
|
|
7
|
-
"alignMiddle": "
|
|
8
|
-
"topStart": "
|
|
9
|
-
"topEnd": "
|
|
10
|
-
"leftStart": "
|
|
11
|
-
"leftEnd": "
|
|
12
|
-
"tag": "
|
|
2
|
+
"wrapper": "_wrapper_1gap460_3",
|
|
3
|
+
"offset16": "_offset16_1gap460_7",
|
|
4
|
+
"offset24": "_offset24_1gap460_10",
|
|
5
|
+
"offset32": "_offset32_1gap460_13",
|
|
6
|
+
"alignTop": "_alignTop_1gap460_17",
|
|
7
|
+
"alignMiddle": "_alignMiddle_1gap460_20",
|
|
8
|
+
"topStart": "_topStart_1gap460_24",
|
|
9
|
+
"topEnd": "_topEnd_1gap460_27",
|
|
10
|
+
"leftStart": "_leftStart_1gap460_30",
|
|
11
|
+
"leftEnd": "_leftEnd_1gap460_33",
|
|
12
|
+
"tag": "_tag_1gap460_37"
|
|
13
13
|
};
|
|
14
14
|
export { styles as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rescui/tag",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "JetBrains",
|
|
@@ -34,5 +34,5 @@
|
|
|
34
34
|
"build-pcss-api": "rescui-scripts build-pcss-api --file public-api.p.css"
|
|
35
35
|
},
|
|
36
36
|
"nx": {},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "66c499bb620ffa7b651301dfb24dbb4e5782435d"
|
|
38
38
|
}
|
package/lib/_virtual/close.js
DELETED
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import _extends from '@babel/runtime-corejs3/helpers/esm/extends';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
4
|
-
import cn from 'classnames';
|
|
5
|
-
import styles from './index.css.js';
|
|
6
|
-
const sizeStyles = {
|
|
7
|
-
"xs": styles.sizeXS,
|
|
8
|
-
"s": styles.sizeS,
|
|
9
|
-
"m": styles.sizeM,
|
|
10
|
-
"l": styles.sizeL
|
|
11
|
-
};
|
|
12
|
-
const Size = {
|
|
13
|
-
"xs": "xs",
|
|
14
|
-
"s": "s",
|
|
15
|
-
"m": "m",
|
|
16
|
-
"l": "l"
|
|
17
|
-
};
|
|
18
|
-
const CloseIcon16 = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/React.createElement("svg", _extends({
|
|
19
|
-
viewBox: "0 0 16 16"
|
|
20
|
-
}, props, {
|
|
21
|
-
ref: ref
|
|
22
|
-
}), /*#__PURE__*/React.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.forwardRef((props, ref) => /*#__PURE__*/React.createElement("svg", _extends({
|
|
27
|
-
viewBox: "0 0 20 20"
|
|
28
|
-
}, props, {
|
|
29
|
-
ref: ref
|
|
30
|
-
}), /*#__PURE__*/React.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.forwardRef((props, ref) => /*#__PURE__*/React.createElement("svg", _extends({
|
|
35
|
-
viewBox: "0 0 24 24"
|
|
36
|
-
}, props, {
|
|
37
|
-
ref: ref
|
|
38
|
-
}), /*#__PURE__*/React.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.forwardRef((props, ref) => /*#__PURE__*/React.createElement("svg", _extends({
|
|
43
|
-
viewBox: "0 0 28 28"
|
|
44
|
-
}, props, {
|
|
45
|
-
ref: ref
|
|
46
|
-
}), /*#__PURE__*/React.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';
|
|
50
|
-
const CloseIcon = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
51
|
-
let {
|
|
52
|
-
theme,
|
|
53
|
-
size: sizeFromProps = "m",
|
|
54
|
-
className,
|
|
55
|
-
style,
|
|
56
|
-
['data-render-all-sizes']: renderAllSizes = false,
|
|
57
|
-
...props
|
|
58
|
-
} = _ref;
|
|
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.createElement("svg", _extends({
|
|
72
|
-
viewBox: "0 0 28 28"
|
|
73
|
-
}, mainProps), /*#__PURE__*/React.createElement(CloseIcon16, {
|
|
74
|
-
className: styles.variant16
|
|
75
|
-
}), /*#__PURE__*/React.createElement(CloseIcon20, {
|
|
76
|
-
className: styles.variant20
|
|
77
|
-
}), /*#__PURE__*/React.createElement(CloseIcon24, {
|
|
78
|
-
className: styles.variant24
|
|
79
|
-
}), /*#__PURE__*/React.createElement(CloseIcon28, {
|
|
80
|
-
className: styles.variant28
|
|
81
|
-
}));
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
if (size === Size['xs']) {
|
|
85
|
-
return /*#__PURE__*/React.createElement(CloseIcon16, mainProps);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
if (size === Size['s']) {
|
|
89
|
-
return /*#__PURE__*/React.createElement(CloseIcon20, mainProps);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
if (size === Size['m']) {
|
|
93
|
-
return /*#__PURE__*/React.createElement(CloseIcon24, mainProps);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
return /*#__PURE__*/React.createElement(CloseIcon28, mainProps);
|
|
97
|
-
});
|
|
98
|
-
CloseIcon.displayName = 'CloseIcon';
|
|
99
|
-
CloseIcon.propTypes = {
|
|
100
|
-
className: PropTypes.string,
|
|
101
|
-
theme: PropTypes.oneOf(["light", "dark"]),
|
|
102
|
-
size: PropTypes.oneOf(["xs", "s", "m", "l"]),
|
|
103
|
-
'data-render-all-sizes': PropTypes.bool,
|
|
104
|
-
style: PropTypes.object
|
|
105
|
-
};
|
|
106
|
-
export { Size, CloseIcon as default };
|