@rescui/button 0.20.3-RUI-230-Update-icons-experiments-872b9bf9.15 → 0.20.3-RUI-230-Update-icons-tree-shaking-ec76507a.10
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/index.css.js +7 -7
- package/lib/_virtual/pure.js +92 -0
- package/lib/button.js +1 -1
- package/lib/button.p.module.css.js +29 -29
- package/lib/index.css +65 -65
- package/package.json +6 -6
- package/lib/_virtual/index.js +0 -44
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
var styles = {
|
|
2
|
-
"icon": "
|
|
3
|
-
"sizeXS": "
|
|
4
|
-
"sizeS": "
|
|
5
|
-
"sizeM": "
|
|
6
|
-
"sizeL": "
|
|
7
|
-
"light": "
|
|
8
|
-
"dark": "
|
|
2
|
+
"icon": "_icon_xt44n8_4",
|
|
3
|
+
"sizeXS": "_sizeXS_xt44n8_14",
|
|
4
|
+
"sizeS": "_sizeS_xt44n8_18",
|
|
5
|
+
"sizeM": "_sizeM_xt44n8_22",
|
|
6
|
+
"sizeL": "_sizeL_xt44n8_26",
|
|
7
|
+
"light": "_light_xt44n8_30",
|
|
8
|
+
"dark": "_dark_xt44n8_34"
|
|
9
9
|
};
|
|
10
10
|
export { styles as default };
|
|
@@ -0,0 +1,92 @@
|
|
|
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 LoadingIcon = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
19
|
+
let {
|
|
20
|
+
theme,
|
|
21
|
+
size,
|
|
22
|
+
className,
|
|
23
|
+
...props
|
|
24
|
+
} = _ref;
|
|
25
|
+
|
|
26
|
+
if (size === Size['xs']) {
|
|
27
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
28
|
+
viewBox: "0 0 16 16"
|
|
29
|
+
}, props, {
|
|
30
|
+
className: cn(styles.icon, styles[theme], sizeStyles[size], className),
|
|
31
|
+
ref: ref
|
|
32
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
33
|
+
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",
|
|
34
|
+
style: {
|
|
35
|
+
animation: "rs-icon-rotate 1s linear infinite",
|
|
36
|
+
transformOrigin: "center center"
|
|
37
|
+
}
|
|
38
|
+
}));
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
if (size === Size['s']) {
|
|
42
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
43
|
+
viewBox: "0 0 20 20"
|
|
44
|
+
}, props, {
|
|
45
|
+
className: cn(styles.icon, styles[theme], sizeStyles[size], className),
|
|
46
|
+
ref: ref
|
|
47
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
48
|
+
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",
|
|
49
|
+
style: {
|
|
50
|
+
animation: "rs-icon-rotate 1s linear infinite",
|
|
51
|
+
transformOrigin: "center center"
|
|
52
|
+
}
|
|
53
|
+
}));
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
if (size === Size['m']) {
|
|
57
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
58
|
+
viewBox: "0 0 24 24"
|
|
59
|
+
}, props, {
|
|
60
|
+
className: cn(styles.icon, styles[theme], sizeStyles[size], className),
|
|
61
|
+
ref: ref
|
|
62
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
63
|
+
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",
|
|
64
|
+
style: {
|
|
65
|
+
animation: "rs-icon-rotate 1s linear infinite",
|
|
66
|
+
transformOrigin: "center center"
|
|
67
|
+
}
|
|
68
|
+
}));
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
72
|
+
viewBox: "0 0 28 28"
|
|
73
|
+
}, props, {
|
|
74
|
+
className: cn(styles.icon, styles[theme], sizeStyles[size], className),
|
|
75
|
+
ref: ref
|
|
76
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
77
|
+
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",
|
|
78
|
+
style: {
|
|
79
|
+
animation: "rs-icon-rotate 1s linear infinite",
|
|
80
|
+
transformOrigin: "center center"
|
|
81
|
+
}
|
|
82
|
+
}));
|
|
83
|
+
});
|
|
84
|
+
LoadingIcon.propTypes = {
|
|
85
|
+
className: PropTypes.string,
|
|
86
|
+
theme: PropTypes.oneOf(["light", "dark"]),
|
|
87
|
+
size: PropTypes.oneOf(["xs", "s", "m", "l"])
|
|
88
|
+
};
|
|
89
|
+
LoadingIcon.defaultProps = {
|
|
90
|
+
size: "m"
|
|
91
|
+
};
|
|
92
|
+
export { Size, LoadingIcon as default };
|
package/lib/button.js
CHANGED
|
@@ -4,7 +4,7 @@ import cn from 'classnames';
|
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
import { useThemeWithUndefined } from '@rescui/ui-contexts';
|
|
6
6
|
import { useResizeObserver } from '@rescui/use-resize-observer';
|
|
7
|
-
import
|
|
7
|
+
import LoadingIcon from './_virtual/pure.js';
|
|
8
8
|
import styles from './button.p.module.css.js';
|
|
9
9
|
|
|
10
10
|
const calculateShifted = (shiftedProp, side) => shiftedProp === 'all' || shiftedProp === side || Array.isArray(shiftedProp) && _includesInstanceProperty(shiftedProp).call(shiftedProp, side);
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
var styles = {
|
|
2
|
-
"light": "
|
|
3
|
-
"dark": "
|
|
4
|
-
"flatRight": "
|
|
5
|
-
"flatLeft": "
|
|
6
|
-
"sizeXs": "
|
|
7
|
-
"sizeS": "
|
|
8
|
-
"sizeM": "
|
|
9
|
-
"sizeL": "
|
|
10
|
-
"modeClassic": "
|
|
11
|
-
"modeRock": "
|
|
12
|
-
"modeTransparent": "
|
|
13
|
-
"modeOutline": "
|
|
14
|
-
"modeClear": "
|
|
15
|
-
"alignIconLeft": "
|
|
16
|
-
"alignIconRight": "
|
|
17
|
-
"main": "
|
|
18
|
-
"disabled": "
|
|
19
|
-
"busy": "
|
|
20
|
-
"busyOverlay": "
|
|
21
|
-
"icon": "
|
|
22
|
-
"allowMultiline": "
|
|
23
|
-
"multiline": "
|
|
24
|
-
"withoutText": "
|
|
25
|
-
"busyIcon": "
|
|
26
|
-
"content": "
|
|
27
|
-
"shiftedLeft": "
|
|
28
|
-
"shiftedRight": "
|
|
29
|
-
"shiftedTop": "
|
|
30
|
-
"shiftedBottom": "
|
|
2
|
+
"light": "_light_19vj65j_6",
|
|
3
|
+
"dark": "_dark_19vj65j_9",
|
|
4
|
+
"flatRight": "_flatRight_19vj65j_13",
|
|
5
|
+
"flatLeft": "_flatLeft_19vj65j_16",
|
|
6
|
+
"sizeXs": "_sizeXs_19vj65j_20",
|
|
7
|
+
"sizeS": "_sizeS_19vj65j_23",
|
|
8
|
+
"sizeM": "_sizeM_19vj65j_26",
|
|
9
|
+
"sizeL": "_sizeL_19vj65j_29",
|
|
10
|
+
"modeClassic": "_modeClassic_19vj65j_33",
|
|
11
|
+
"modeRock": "_modeRock_19vj65j_36",
|
|
12
|
+
"modeTransparent": "_modeTransparent_19vj65j_39",
|
|
13
|
+
"modeOutline": "_modeOutline_19vj65j_42",
|
|
14
|
+
"modeClear": "_modeClear_19vj65j_45",
|
|
15
|
+
"alignIconLeft": "_alignIconLeft_19vj65j_49",
|
|
16
|
+
"alignIconRight": "_alignIconRight_19vj65j_52",
|
|
17
|
+
"main": "_main_19vj65j_56",
|
|
18
|
+
"disabled": "_disabled_19vj65j_133",
|
|
19
|
+
"busy": "_busy_19vj65j_143",
|
|
20
|
+
"busyOverlay": "_busyOverlay_19vj65j_147",
|
|
21
|
+
"icon": "_icon_19vj65j_182",
|
|
22
|
+
"allowMultiline": "_allowMultiline_19vj65j_195",
|
|
23
|
+
"multiline": "_multiline_19vj65j_199",
|
|
24
|
+
"withoutText": "_withoutText_19vj65j_203",
|
|
25
|
+
"busyIcon": "_busyIcon_19vj65j_208",
|
|
26
|
+
"content": "_content_19vj65j_224",
|
|
27
|
+
"shiftedLeft": "_shiftedLeft_19vj65j_229",
|
|
28
|
+
"shiftedRight": "_shiftedRight_19vj65j_232",
|
|
29
|
+
"shiftedTop": "_shiftedTop_19vj65j_235",
|
|
30
|
+
"shiftedBottom": "_shiftedBottom_19vj65j_238"
|
|
31
31
|
};
|
|
32
32
|
export { styles as default };
|
package/lib/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.
|
|
1
|
+
._icon_xt44n8_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_xt44n8_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_xt44n8_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_xt44n8_4{
|
|
29
29
|
|
|
30
30
|
fill:var(--_rs-icons-themed-fill-or-initial, currentcolor);
|
|
31
31
|
|
|
32
32
|
width:auto;
|
|
33
33
|
height:var(--_rs-icons-height);
|
|
34
34
|
}
|
|
35
|
-
.
|
|
35
|
+
._sizeXS_xt44n8_14{
|
|
36
36
|
--_rs-icons-height:16px;
|
|
37
37
|
}
|
|
38
|
-
.
|
|
38
|
+
._sizeS_xt44n8_18{
|
|
39
39
|
--_rs-icons-height:20px;
|
|
40
40
|
}
|
|
41
|
-
.
|
|
41
|
+
._sizeM_xt44n8_22{
|
|
42
42
|
--_rs-icons-height:24px;
|
|
43
43
|
}
|
|
44
|
-
.
|
|
44
|
+
._sizeL_xt44n8_26{
|
|
45
45
|
--_rs-icons-height:28px;
|
|
46
46
|
}
|
|
47
|
-
.
|
|
47
|
+
._light_xt44n8_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_xt44n8_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,25 +60,25 @@
|
|
|
60
60
|
transform:rotate(360deg);
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
|
-
.
|
|
63
|
+
._light_19vj65j_6{
|
|
64
64
|
--rs-theme-dark:0;
|
|
65
65
|
}
|
|
66
|
-
.
|
|
66
|
+
._dark_19vj65j_9{
|
|
67
67
|
--rs-theme-dark:1;
|
|
68
68
|
}
|
|
69
|
-
.
|
|
69
|
+
._flatRight_19vj65j_13{
|
|
70
70
|
--_rs-button-top-right-border-radius-or-initial:0px;
|
|
71
71
|
--_rs-button-bottom-right-border-radius-or-initial:0px;
|
|
72
72
|
--_rs-button-top-right-multiline-border-radius-or-initial:0px;
|
|
73
73
|
--_rs-button-bottom-right-multiline-border-radius-or-initial:0px;
|
|
74
74
|
}
|
|
75
|
-
.
|
|
75
|
+
._flatLeft_19vj65j_16{
|
|
76
76
|
--_rs-button-top-left-border-radius-or-initial:0px;
|
|
77
77
|
--_rs-button-bottom-left-border-radius-or-initial:0px;
|
|
78
78
|
--_rs-button-top-left-multiline-border-radius-or-initial:0px;
|
|
79
79
|
--_rs-button-bottom-left-multiline-border-radius-or-initial:0px;
|
|
80
80
|
}
|
|
81
|
-
.
|
|
81
|
+
._sizeXs_19vj65j_20{
|
|
82
82
|
--_rs-button-border-radius-base:var(
|
|
83
83
|
--rs-button-xs-border-radius,
|
|
84
84
|
var(--rs-button-border-radius, 4px)
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
--_rs-button-icon-size:16px;
|
|
94
94
|
--_rs-button-icon-offset:4px;
|
|
95
95
|
}
|
|
96
|
-
.
|
|
96
|
+
._sizeXs_19vj65j_20 [data-rs-internal='button__content']{
|
|
97
97
|
--_rs-typography-letter-spacing:var(--rs-text-3-letter-spacing, 0.0045em);
|
|
98
98
|
--_rs-typography-text-transform:initial;
|
|
99
99
|
--_rs-typography-font-variant-numeric:initial;
|
|
@@ -127,7 +127,7 @@
|
|
|
127
127
|
--_rs-typography-link-external-standalone-border-offset-from-text-base:1.02em;
|
|
128
128
|
--_rs-typography-link-border-bottom-width-from-text:1px;
|
|
129
129
|
}
|
|
130
|
-
.
|
|
130
|
+
._sizeS_19vj65j_23{
|
|
131
131
|
--_rs-button-border-radius-base:var(
|
|
132
132
|
--rs-button-s-border-radius,
|
|
133
133
|
var(--rs-button-border-radius, 16px)
|
|
@@ -142,7 +142,7 @@
|
|
|
142
142
|
--_rs-button-icon-size:20px;
|
|
143
143
|
--_rs-button-icon-offset:8px;
|
|
144
144
|
}
|
|
145
|
-
.
|
|
145
|
+
._sizeS_19vj65j_23 [data-rs-internal='button__content']{
|
|
146
146
|
--_rs-typography-letter-spacing:var(--rs-text-3-letter-spacing, 0.0045em);
|
|
147
147
|
--_rs-typography-text-transform:initial;
|
|
148
148
|
--_rs-typography-font-variant-numeric:initial;
|
|
@@ -176,7 +176,7 @@
|
|
|
176
176
|
--_rs-typography-link-external-standalone-border-offset-from-text-base:1.02em;
|
|
177
177
|
--_rs-typography-link-border-bottom-width-from-text:1px;
|
|
178
178
|
}
|
|
179
|
-
.
|
|
179
|
+
._sizeM_19vj65j_26{
|
|
180
180
|
--_rs-button-border-radius-base:var(
|
|
181
181
|
--rs-button-m-border-radius,
|
|
182
182
|
var(--rs-button-border-radius, 20px)
|
|
@@ -191,7 +191,7 @@
|
|
|
191
191
|
--_rs-button-icon-size:24px;
|
|
192
192
|
--_rs-button-icon-offset:8px;
|
|
193
193
|
}
|
|
194
|
-
.
|
|
194
|
+
._sizeM_19vj65j_26 [data-rs-internal='button__content']{
|
|
195
195
|
--_rs-typography-letter-spacing:var(--rs-text-2-letter-spacing, 0.0015em);
|
|
196
196
|
--_rs-typography-text-transform:initial;
|
|
197
197
|
--_rs-typography-font-variant-numeric:initial;
|
|
@@ -226,11 +226,11 @@
|
|
|
226
226
|
--_rs-typography-link-border-bottom-width-from-text:1px;
|
|
227
227
|
}
|
|
228
228
|
@media screen and (max-width: 640px){
|
|
229
|
-
.
|
|
229
|
+
._sizeM_19vj65j_26 [data-rs-internal='button__content']{
|
|
230
230
|
--_rs-typography-list-li-margin-top-from-text:12px;
|
|
231
231
|
}
|
|
232
232
|
}
|
|
233
|
-
.
|
|
233
|
+
._sizeL_19vj65j_29{
|
|
234
234
|
--_rs-button-border-radius-base:var(
|
|
235
235
|
--rs-button-l-border-radius,
|
|
236
236
|
var(--rs-button-border-radius, 26px)
|
|
@@ -245,7 +245,7 @@
|
|
|
245
245
|
--_rs-button-icon-size:28px;
|
|
246
246
|
--_rs-button-icon-offset:16px;
|
|
247
247
|
}
|
|
248
|
-
.
|
|
248
|
+
._sizeL_19vj65j_29 [data-rs-internal='button__content']{
|
|
249
249
|
--_rs-typography-letter-spacing:var(--rs-text-1-letter-spacing, normal);
|
|
250
250
|
--_rs-typography-text-transform:initial;
|
|
251
251
|
--_rs-typography-font-variant-numeric:initial;
|
|
@@ -280,11 +280,11 @@
|
|
|
280
280
|
--_rs-typography-link-border-bottom-width-from-text:1px;
|
|
281
281
|
}
|
|
282
282
|
@media screen and (max-width: 640px){
|
|
283
|
-
.
|
|
283
|
+
._sizeL_19vj65j_29 [data-rs-internal='button__content']{
|
|
284
284
|
--_rs-typography-list-li-margin-top-from-text:16px;
|
|
285
285
|
}
|
|
286
286
|
}
|
|
287
|
-
.
|
|
287
|
+
._modeClassic_19vj65j_33{
|
|
288
288
|
--_rs-button-inner-border-display:none;
|
|
289
289
|
--_rs-button-color:rgb(
|
|
290
290
|
calc(255 - var(--rs-button-flip-text-color, 0)*230),
|
|
@@ -300,7 +300,7 @@
|
|
|
300
300
|
--_rs-button-disabled-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.5);
|
|
301
301
|
--_rs-button-disabled-background: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);
|
|
302
302
|
}
|
|
303
|
-
.
|
|
303
|
+
._modeRock_19vj65j_36{
|
|
304
304
|
--_rs-button-inner-border-display:none;
|
|
305
305
|
--_rs-button-color:rgb(calc(255 - var(--_rs-theme-dark-coefficient, 0)*230), calc(255 - var(--_rs-theme-dark-coefficient, 0)*230), calc(255 - var(--_rs-theme-dark-coefficient, 0)*227));
|
|
306
306
|
--_rs-button-background: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));
|
|
@@ -313,7 +313,7 @@
|
|
|
313
313
|
--_rs-button-disabled-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.5);
|
|
314
314
|
--_rs-button-disabled-background: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);
|
|
315
315
|
}
|
|
316
|
-
.
|
|
316
|
+
._modeTransparent_19vj65j_39{
|
|
317
317
|
--_rs-button-inner-border-display:none;
|
|
318
318
|
--_rs-button-color:rgb(calc(255 - var(--_rs-theme-dark-coefficient, 0)*230), calc(255 - var(--_rs-theme-dark-coefficient, 0)*230), calc(255 - var(--_rs-theme-dark-coefficient, 0)*227));
|
|
319
319
|
--_rs-button-background: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);
|
|
@@ -325,7 +325,7 @@
|
|
|
325
325
|
--_rs-button-disabled-color:rgba(calc(255 - var(--_rs-theme-dark-coefficient, 0)*230), calc(255 - var(--_rs-theme-dark-coefficient, 0)*230), calc(255 - var(--_rs-theme-dark-coefficient, 0)*227), 0.5);
|
|
326
326
|
--_rs-button-disabled-background: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.4);
|
|
327
327
|
}
|
|
328
|
-
.
|
|
328
|
+
._modeOutline_19vj65j_42{
|
|
329
329
|
--_rs-button-inner-border-display:block;
|
|
330
330
|
--_rs-button-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));
|
|
331
331
|
--_rs-button-background:transparent;
|
|
@@ -337,7 +337,7 @@
|
|
|
337
337
|
--_rs-button-disabled-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.5);
|
|
338
338
|
--_rs-button-disabled-background:transparent;
|
|
339
339
|
}
|
|
340
|
-
.
|
|
340
|
+
._modeClear_19vj65j_45{
|
|
341
341
|
--_rs-button-inner-border-display:none;
|
|
342
342
|
--_rs-button-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));
|
|
343
343
|
--_rs-button-background:transparent;
|
|
@@ -349,13 +349,13 @@
|
|
|
349
349
|
--_rs-button-disabled-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.5);
|
|
350
350
|
--_rs-button-disabled-background:transparent;
|
|
351
351
|
}
|
|
352
|
-
.
|
|
352
|
+
._alignIconLeft_19vj65j_49{
|
|
353
353
|
--_rs-button-icon-flex-direction:row;
|
|
354
354
|
}
|
|
355
|
-
.
|
|
355
|
+
._alignIconRight_19vj65j_52{
|
|
356
356
|
--_rs-button-icon-flex-direction:row-reverse;
|
|
357
357
|
}
|
|
358
|
-
.
|
|
358
|
+
._main_19vj65j_56{
|
|
359
359
|
--_rs-theme-dark:var(
|
|
360
360
|
--_rs-internal-force-theme-dark-consult-rescui-before-using,
|
|
361
361
|
var(--rs-theme-dark, 0)
|
|
@@ -365,7 +365,7 @@
|
|
|
365
365
|
--_rs-theme-light-coefficient:calc(1 - var(--_rs-theme-dark-coefficient));
|
|
366
366
|
}
|
|
367
367
|
@supports (color: color-mix(in srgb, #fff 50%, #000 50%)){
|
|
368
|
-
.
|
|
368
|
+
._main_19vj65j_56{
|
|
369
369
|
--_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)));
|
|
370
370
|
--_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)));
|
|
371
371
|
--_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)));
|
|
@@ -374,7 +374,7 @@
|
|
|
374
374
|
}
|
|
375
375
|
}
|
|
376
376
|
@supports not (color: color-mix(in srgb, #fff 50%, #000 50%)){
|
|
377
|
-
.
|
|
377
|
+
._main_19vj65j_56{
|
|
378
378
|
--_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);
|
|
379
379
|
--_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));
|
|
380
380
|
--_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));
|
|
@@ -382,7 +382,7 @@
|
|
|
382
382
|
--_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));
|
|
383
383
|
}
|
|
384
384
|
}
|
|
385
|
-
.
|
|
385
|
+
._main_19vj65j_56 {
|
|
386
386
|
--_rs-button-background-final:var(
|
|
387
387
|
--_rs-button-background-from-state-active-focus-visible-no-hover,
|
|
388
388
|
var(
|
|
@@ -463,19 +463,19 @@
|
|
|
463
463
|
-moz-column-gap:var(--_rs-button-icon-offset);
|
|
464
464
|
column-gap:var(--_rs-button-icon-offset);
|
|
465
465
|
}
|
|
466
|
-
.
|
|
467
|
-
.
|
|
468
|
-
.
|
|
466
|
+
._main_19vj65j_56:hover,
|
|
467
|
+
._main_19vj65j_56:focus,
|
|
468
|
+
._main_19vj65j_56:active{
|
|
469
469
|
outline:none;
|
|
470
470
|
|
|
471
471
|
text-decoration:none;
|
|
472
472
|
}
|
|
473
|
-
.
|
|
473
|
+
._main_19vj65j_56:focus{
|
|
474
474
|
color:var(--_rs-button-color);
|
|
475
475
|
background:var(--_rs-button-background-final);
|
|
476
476
|
}
|
|
477
477
|
@media (hover: hover){
|
|
478
|
-
.
|
|
478
|
+
._main_19vj65j_56:hover{
|
|
479
479
|
--_rs-button-border-inner-color:rgba(
|
|
480
480
|
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),
|
|
481
481
|
calc(0.3 + var(--_rs-theme-dark-coefficient, 0)*0.1)
|
|
@@ -483,24 +483,24 @@
|
|
|
483
483
|
--_rs-button-background-from-state-hover:var(--_rs-button-hover-background);
|
|
484
484
|
}
|
|
485
485
|
}
|
|
486
|
-
.
|
|
486
|
+
._main_19vj65j_56:active{
|
|
487
487
|
--_rs-button-border-inner-width:2px;
|
|
488
488
|
--_rs-button-border-inner-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));
|
|
489
489
|
--_rs-button-background-from-state-active:var(
|
|
490
490
|
--_rs-button-active-background
|
|
491
491
|
);
|
|
492
492
|
}
|
|
493
|
-
.
|
|
493
|
+
._main_19vj65j_56:focus[data-focus-method='key']{
|
|
494
494
|
--_rs-button-box-shadow-from-state-focus-visible:var(
|
|
495
495
|
--_rs-color-primary-t-dim
|
|
496
496
|
) 0 0 0 4px;
|
|
497
497
|
}
|
|
498
|
-
.
|
|
498
|
+
._main_19vj65j_56:active:not(:hover):focus[data-focus-method='key']{
|
|
499
499
|
--_rs-button-background-from-state-active-focus-visible-no-hover:var(
|
|
500
500
|
--_rs-button-active-focus-visible-no-hover-background
|
|
501
501
|
);
|
|
502
502
|
}
|
|
503
|
-
.
|
|
503
|
+
._main_19vj65j_56._disabled_19vj65j_133{
|
|
504
504
|
--_rs-button-border-inner-color:rgba(
|
|
505
505
|
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),
|
|
506
506
|
0.2
|
|
@@ -509,26 +509,26 @@
|
|
|
509
509
|
color:var(--_rs-button-disabled-color);
|
|
510
510
|
background:var(--_rs-button-disabled-background);
|
|
511
511
|
}
|
|
512
|
-
.
|
|
512
|
+
._main_19vj65j_56._busy_19vj65j_143{
|
|
513
513
|
pointer-events:none;
|
|
514
514
|
}
|
|
515
|
-
.
|
|
515
|
+
._main_19vj65j_56._busyOverlay_19vj65j_147{
|
|
516
516
|
display:inline-flex;
|
|
517
517
|
justify-content:center;
|
|
518
518
|
align-items:center;
|
|
519
519
|
}
|
|
520
|
-
.
|
|
521
|
-
.
|
|
522
|
-
.
|
|
523
|
-
.
|
|
524
|
-
.
|
|
520
|
+
._main_19vj65j_56._busyOverlay_19vj65j_147,
|
|
521
|
+
._main_19vj65j_56._busyOverlay_19vj65j_147:hover,
|
|
522
|
+
._main_19vj65j_56._busyOverlay_19vj65j_147:active,
|
|
523
|
+
._main_19vj65j_56._busyOverlay_19vj65j_147._disabled_19vj65j_133,
|
|
524
|
+
._main_19vj65j_56._busyOverlay_19vj65j_147:focus{
|
|
525
525
|
-webkit-user-select:none;
|
|
526
526
|
-moz-user-select:none;
|
|
527
527
|
user-select:none;
|
|
528
528
|
|
|
529
529
|
color:transparent;
|
|
530
530
|
}
|
|
531
|
-
.
|
|
531
|
+
._main_19vj65j_56::before{
|
|
532
532
|
position:absolute;
|
|
533
533
|
top:0;
|
|
534
534
|
right:0;
|
|
@@ -545,40 +545,40 @@
|
|
|
545
545
|
|
|
546
546
|
transition:border-color 100ms;
|
|
547
547
|
}
|
|
548
|
-
.
|
|
548
|
+
._main_19vj65j_56 ._icon_19vj65j_182{
|
|
549
549
|
width:auto;
|
|
550
550
|
height:var(--_rs-button-icon-size);
|
|
551
551
|
|
|
552
552
|
margin:0;
|
|
553
553
|
fill:currentColor;
|
|
554
554
|
}
|
|
555
|
-
.
|
|
555
|
+
._disabled_19vj65j_133{
|
|
556
556
|
pointer-events:none;
|
|
557
557
|
}
|
|
558
|
-
.
|
|
558
|
+
._allowMultiline_19vj65j_195{
|
|
559
559
|
white-space:normal;
|
|
560
560
|
}
|
|
561
|
-
.
|
|
561
|
+
._multiline_19vj65j_199{
|
|
562
562
|
border-radius:var(--_rs-button-multiline-border-radius);
|
|
563
563
|
}
|
|
564
|
-
.
|
|
564
|
+
._withoutText_19vj65j_203{
|
|
565
565
|
--_rs-button-horizontal-real-padding:var(--_rs-button-icon-only-padding);
|
|
566
566
|
--_rs-button-vertical-real-padding:var(--_rs-button-icon-only-padding);
|
|
567
567
|
}
|
|
568
|
-
.
|
|
568
|
+
._busyIcon_19vj65j_208{
|
|
569
569
|
position:absolute;
|
|
570
570
|
top:50%;
|
|
571
571
|
left:50%;
|
|
572
572
|
|
|
573
573
|
transform:translate(-50%, -50%);
|
|
574
574
|
}
|
|
575
|
-
.
|
|
575
|
+
._main_19vj65j_56 ._busyIcon_19vj65j_208{
|
|
576
576
|
color:var(--_rs-button-color);
|
|
577
577
|
}
|
|
578
|
-
.
|
|
578
|
+
._main_19vj65j_56._disabled_19vj65j_133 ._busyIcon_19vj65j_208{
|
|
579
579
|
color:var(--_rs-button-disabled-color);
|
|
580
580
|
}
|
|
581
|
-
.
|
|
581
|
+
._content_19vj65j_224{
|
|
582
582
|
letter-spacing:var(
|
|
583
583
|
--rs-text-base-letter-spacing,
|
|
584
584
|
var(--_rs-typography-letter-spacing)
|
|
@@ -591,15 +591,15 @@
|
|
|
591
591
|
font-variant-numeric:var(--_rs-typography-font-variant-numeric);
|
|
592
592
|
font-feature-settings:'kern', 'liga', 'calt';
|
|
593
593
|
}
|
|
594
|
-
.
|
|
594
|
+
._shiftedLeft_19vj65j_229{
|
|
595
595
|
margin-left:calc(var(--_rs-button-horizontal-real-padding)*-1);
|
|
596
596
|
}
|
|
597
|
-
.
|
|
597
|
+
._shiftedRight_19vj65j_232{
|
|
598
598
|
margin-right:calc(var(--_rs-button-horizontal-real-padding)*-1);
|
|
599
599
|
}
|
|
600
|
-
.
|
|
600
|
+
._shiftedTop_19vj65j_235{
|
|
601
601
|
margin-top:calc(var(--_rs-button-vertical-real-padding)*-1);
|
|
602
602
|
}
|
|
603
|
-
.
|
|
603
|
+
._shiftedBottom_19vj65j_238{
|
|
604
604
|
margin-bottom:calc(var(--_rs-button-vertical-real-padding)*-1);
|
|
605
605
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rescui/button",
|
|
3
|
-
"version": "0.20.3-RUI-230-Update-icons-
|
|
3
|
+
"version": "0.20.3-RUI-230-Update-icons-tree-shaking-ec76507a.10+ec76507a",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "JetBrains",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@babel/runtime-corejs3": "^7.26.0",
|
|
18
|
-
"@rescui/use-resize-observer": "0.2.6-RUI-230-Update-icons-
|
|
18
|
+
"@rescui/use-resize-observer": "0.2.6-RUI-230-Update-icons-tree-shaking-ec76507a.34+ec76507a",
|
|
19
19
|
"classnames": "^2.2.6"
|
|
20
20
|
},
|
|
21
21
|
"peerDependencies": {
|
|
@@ -24,10 +24,10 @@
|
|
|
24
24
|
"react": ">=16.8.0 <19"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@rescui/colors": "0.2.7-RUI-230-Update-icons-
|
|
28
|
-
"@rescui/icons": "0.16.15-RUI-230-Update-icons-
|
|
27
|
+
"@rescui/colors": "0.2.7-RUI-230-Update-icons-tree-shaking-ec76507a.34+ec76507a",
|
|
28
|
+
"@rescui/icons": "0.16.15-RUI-230-Update-icons-tree-shaking-ec76507a.10+ec76507a",
|
|
29
29
|
"@rescui/scripts": "0.3.5",
|
|
30
|
-
"@rescui/typography": "0.21.1-RUI-230-Update-icons-
|
|
30
|
+
"@rescui/typography": "0.21.1-RUI-230-Update-icons-tree-shaking-ec76507a.10+ec76507a",
|
|
31
31
|
"@rescui/visual-regression": "0.1.2",
|
|
32
32
|
"@types/classnames": "^2.2.11"
|
|
33
33
|
},
|
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
"build-pcss-api": "rescui-scripts build-pcss-api --file public-api.p.css"
|
|
37
37
|
},
|
|
38
38
|
"nx": {},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "ec76507ad979df68d58a0a414b1ae497975090cd"
|
|
40
40
|
}
|
package/lib/_virtual/index.js
DELETED
|
@@ -1,44 +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 LoadingIcon = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
13
|
-
let {
|
|
14
|
-
theme,
|
|
15
|
-
size,
|
|
16
|
-
className,
|
|
17
|
-
...props
|
|
18
|
-
} = _ref;
|
|
19
|
-
return /*#__PURE__*/React.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.createElement("g", {
|
|
25
|
-
style: {
|
|
26
|
-
animation: "rs-icon-rotate 1s linear infinite",
|
|
27
|
-
transformOrigin: "center center"
|
|
28
|
-
}
|
|
29
|
-
}, /*#__PURE__*/React.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.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
|
-
})));
|
|
35
|
-
});
|
|
36
|
-
LoadingIcon.propTypes = {
|
|
37
|
-
className: PropTypes.string,
|
|
38
|
-
theme: PropTypes.oneOf(["light", "dark"]),
|
|
39
|
-
size: PropTypes.oneOf(["xs", "s", "m", "l"])
|
|
40
|
-
};
|
|
41
|
-
LoadingIcon.defaultProps = {
|
|
42
|
-
size: "m"
|
|
43
|
-
};
|
|
44
|
-
export { LoadingIcon, LoadingIcon as default };
|