@rescui/toggle 0.8.0 → 0.8.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 +23 -23
- package/lib/toggle.p.module.css.js +1 -1
- package/package.json +5 -5
package/lib/index.css
CHANGED
|
@@ -3,39 +3,39 @@
|
|
|
3
3
|
inherits:true;
|
|
4
4
|
initial-value:0;
|
|
5
5
|
}
|
|
6
|
-
.
|
|
6
|
+
._themeLight_v5bxwy_6{
|
|
7
7
|
--rs-theme-dark:0;
|
|
8
8
|
}
|
|
9
|
-
.
|
|
9
|
+
._themeDark_v5bxwy_9{
|
|
10
10
|
--rs-theme-dark:1;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
.
|
|
13
|
+
._sizeS_v5bxwy_13{
|
|
14
14
|
--_rs-toggle-width:20px;
|
|
15
15
|
--_rs-toggle-height:12px;
|
|
16
16
|
--_rs-toggle-shadow:3px;
|
|
17
17
|
}
|
|
18
|
-
.
|
|
18
|
+
._sizeM_v5bxwy_16{
|
|
19
19
|
--_rs-toggle-width:28px;
|
|
20
20
|
--_rs-toggle-height:16px;
|
|
21
21
|
--_rs-toggle-shadow:3px;
|
|
22
22
|
}
|
|
23
|
-
.
|
|
23
|
+
._sizeL_v5bxwy_19{
|
|
24
24
|
--_rs-toggle-width:32px;
|
|
25
25
|
--_rs-toggle-height:18px;
|
|
26
26
|
--_rs-toggle-shadow:4px;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
.
|
|
29
|
+
._classic_v5bxwy_23{
|
|
30
30
|
--_rs-toggle-hover-slider-box-shadow-color:var(--_rs-color-primary-t-fog);
|
|
31
31
|
--_rs-toggle-checked-slider-background-color:var(--_rs-color-primary);
|
|
32
32
|
}
|
|
33
|
-
.
|
|
33
|
+
._rock_v5bxwy_26{
|
|
34
34
|
--_rs-toggle-hover-slider-box-shadow-color:rgba(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)), 0.2);
|
|
35
35
|
--_rs-toggle-checked-slider-background-color: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)));
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
.
|
|
38
|
+
._main_v5bxwy_30{
|
|
39
39
|
--_rs-toggle-circle-border:2px;
|
|
40
40
|
|
|
41
41
|
--_rs-theme-dark:var(
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
|
|
53
53
|
@supports (color: color-mix(in srgb, #fff 50%, #000 50%)){
|
|
54
54
|
|
|
55
|
-
.
|
|
55
|
+
._main_v5bxwy_30{
|
|
56
56
|
--_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)));
|
|
57
57
|
--_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)));
|
|
58
58
|
--_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)));
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
|
|
64
64
|
@supports not (color: color-mix(in srgb, #fff 50%, #000 50%)){
|
|
65
65
|
|
|
66
|
-
.
|
|
66
|
+
._main_v5bxwy_30{
|
|
67
67
|
--_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);
|
|
68
68
|
--_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)));
|
|
69
69
|
--_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)));
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
.
|
|
75
|
+
._main_v5bxwy_30 {
|
|
76
76
|
|
|
77
77
|
position:relative;
|
|
78
78
|
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
cursor:pointer;
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
.
|
|
88
|
+
._main_v5bxwy_30 input{
|
|
89
89
|
position:absolute;
|
|
90
90
|
z-index:-1;
|
|
91
91
|
|
|
@@ -96,12 +96,12 @@
|
|
|
96
96
|
pointer-events:none;
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
-
.
|
|
99
|
+
._main_v5bxwy_30._disabled_v5bxwy_57{
|
|
100
100
|
cursor:default;
|
|
101
101
|
pointer-events:none;
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
-
.
|
|
104
|
+
._slider_v5bxwy_63{
|
|
105
105
|
position:absolute;
|
|
106
106
|
top:var(--_rs-toggle-shadow);
|
|
107
107
|
left:var(--_rs-toggle-shadow);
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
transition:background-color 200ms var(--rs-transition-function, ease);
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
-
.
|
|
119
|
+
._slider_v5bxwy_63:after{
|
|
120
120
|
position:absolute;
|
|
121
121
|
top:0;
|
|
122
122
|
left:0;
|
|
@@ -136,17 +136,17 @@
|
|
|
136
136
|
transform:translate(0);
|
|
137
137
|
}
|
|
138
138
|
|
|
139
|
-
.
|
|
139
|
+
._disabled_v5bxwy_57 ._slider_v5bxwy_63{
|
|
140
140
|
background:rgb(calc(209 - 138 * var(--_rs-theme-dark-coefficient, 0)), calc(209 - 138 * var(--_rs-theme-dark-coefficient, 0)), calc(210 - 137 * var(--_rs-theme-dark-coefficient, 0)));
|
|
141
141
|
}
|
|
142
142
|
|
|
143
|
-
.
|
|
143
|
+
._disabled_v5bxwy_57 ._slider_v5bxwy_63:after{
|
|
144
144
|
border-color:rgb(calc(209 - 138 * var(--_rs-theme-dark-coefficient, 0)), calc(209 - 138 * var(--_rs-theme-dark-coefficient, 0)), calc(210 - 137 * var(--_rs-theme-dark-coefficient, 0)));
|
|
145
145
|
|
|
146
146
|
background:rgb(calc(232 - 184 * var(--_rs-theme-dark-coefficient, 0)), calc(232 - 184 * var(--_rs-theme-dark-coefficient, 0)), calc(232 - 181 * var(--_rs-theme-dark-coefficient, 0)));
|
|
147
147
|
}
|
|
148
148
|
|
|
149
|
-
input:checked + .
|
|
149
|
+
input:checked + ._slider_v5bxwy_63:after{
|
|
150
150
|
width:calc(var(--_rs-toggle-height) + var(--_rs-toggle-circle-border));
|
|
151
151
|
height:calc(var(--_rs-toggle-height) + var(--_rs-toggle-circle-border));
|
|
152
152
|
|
|
@@ -156,19 +156,19 @@ input:checked + ._slider_1gzivqo_63:after{
|
|
|
156
156
|
);
|
|
157
157
|
}
|
|
158
158
|
|
|
159
|
-
.
|
|
159
|
+
._main_v5bxwy_30:not(._disabled_v5bxwy_57) input:hover + ._slider_v5bxwy_63{
|
|
160
160
|
box-shadow:var(--_rs-toggle-hover-slider-box-shadow-color) 0 0 0 var(--_rs-toggle-shadow);
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
-
.
|
|
163
|
+
._main_v5bxwy_30:not(._disabled_v5bxwy_57) input:checked + ._slider_v5bxwy_63{
|
|
164
164
|
background-color:var(--_rs-toggle-checked-slider-background-color);
|
|
165
165
|
}
|
|
166
166
|
|
|
167
|
-
.
|
|
167
|
+
._main_v5bxwy_30:not(._disabled_v5bxwy_57) input:checked + ._slider_v5bxwy_63:after{
|
|
168
168
|
border-color:var(--_rs-toggle-checked-slider-background-color);
|
|
169
169
|
}
|
|
170
170
|
|
|
171
|
-
.
|
|
172
|
-
.
|
|
171
|
+
._main_v5bxwy_30:not(._disabled_v5bxwy_57) input:focus-visible + ._slider_v5bxwy_63,
|
|
172
|
+
._main_v5bxwy_30:not(._disabled_v5bxwy_57) input:focus[data-focus-method='key'] + ._slider_v5bxwy_63{
|
|
173
173
|
box-shadow:0 0 0 var(--_rs-toggle-shadow) var(--_rs-color-primary-t-dim);
|
|
174
174
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var styles = {"themeLight":"
|
|
1
|
+
var styles = {"themeLight":"_themeLight_v5bxwy_6","themeDark":"_themeDark_v5bxwy_9","sizeS":"_sizeS_v5bxwy_13","sizeM":"_sizeM_v5bxwy_16","sizeL":"_sizeL_v5bxwy_19","classic":"_classic_v5bxwy_23","rock":"_rock_v5bxwy_26","main":"_main_v5bxwy_30","disabled":"_disabled_v5bxwy_57","slider":"_slider_v5bxwy_63"};
|
|
2
2
|
|
|
3
3
|
export { styles as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rescui/toggle",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"description": "Toggle is a control that allows you to turn elements on and off instantly",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "JetBrains",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"access": "public"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@rescui/menu": "^0.17.
|
|
19
|
+
"@rescui/menu": "^0.17.1",
|
|
20
20
|
"classnames": "^2.2.6",
|
|
21
21
|
"react-compiler-runtime": "^1.0.0"
|
|
22
22
|
},
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
"react": ">=17.0.0 <20"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@rescui/colors": "^0.3.
|
|
29
|
+
"@rescui/colors": "^0.3.6",
|
|
30
30
|
"@rescui/scripts": "^0.6.0",
|
|
31
|
-
"@rescui/visual-regression": "^0.1.
|
|
31
|
+
"@rescui/visual-regression": "^0.1.5",
|
|
32
32
|
"@types/classnames": "^2.2.11"
|
|
33
33
|
},
|
|
34
34
|
"scripts": {
|
|
@@ -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": "428fe8428862945a1199cf875bbe180ccbb71df3"
|
|
40
40
|
}
|