@rescui/toggle 0.8.0 → 0.8.2-floating-ui-migration-19bb1e9d6.6.sha-19bb1e9d6
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/llm/components/toggle.md +7 -7
- package/package.json +7 -7
package/lib/index.css
CHANGED
|
@@ -3,39 +3,39 @@
|
|
|
3
3
|
inherits:true;
|
|
4
4
|
initial-value:0;
|
|
5
5
|
}
|
|
6
|
-
.
|
|
6
|
+
._themeLight_x8f352_6{
|
|
7
7
|
--rs-theme-dark:0;
|
|
8
8
|
}
|
|
9
|
-
.
|
|
9
|
+
._themeDark_x8f352_9{
|
|
10
10
|
--rs-theme-dark:1;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
.
|
|
13
|
+
._sizeS_x8f352_13{
|
|
14
14
|
--_rs-toggle-width:20px;
|
|
15
15
|
--_rs-toggle-height:12px;
|
|
16
16
|
--_rs-toggle-shadow:3px;
|
|
17
17
|
}
|
|
18
|
-
.
|
|
18
|
+
._sizeM_x8f352_16{
|
|
19
19
|
--_rs-toggle-width:28px;
|
|
20
20
|
--_rs-toggle-height:16px;
|
|
21
21
|
--_rs-toggle-shadow:3px;
|
|
22
22
|
}
|
|
23
|
-
.
|
|
23
|
+
._sizeL_x8f352_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_x8f352_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_x8f352_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_x8f352_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_x8f352_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_x8f352_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_x8f352_30 {
|
|
76
76
|
|
|
77
77
|
position:relative;
|
|
78
78
|
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
cursor:pointer;
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
.
|
|
88
|
+
._main_x8f352_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_x8f352_30._disabled_x8f352_57{
|
|
100
100
|
cursor:default;
|
|
101
101
|
pointer-events:none;
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
-
.
|
|
104
|
+
._slider_x8f352_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_x8f352_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_x8f352_57 ._slider_x8f352_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_x8f352_57 ._slider_x8f352_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_x8f352_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_x8f352_30:not(._disabled_x8f352_57) input:hover + ._slider_x8f352_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_x8f352_30:not(._disabled_x8f352_57) input:checked + ._slider_x8f352_63{
|
|
164
164
|
background-color:var(--_rs-toggle-checked-slider-background-color);
|
|
165
165
|
}
|
|
166
166
|
|
|
167
|
-
.
|
|
167
|
+
._main_x8f352_30:not(._disabled_x8f352_57) input:checked + ._slider_x8f352_63:after{
|
|
168
168
|
border-color:var(--_rs-toggle-checked-slider-background-color);
|
|
169
169
|
}
|
|
170
170
|
|
|
171
|
-
.
|
|
172
|
-
.
|
|
171
|
+
._main_x8f352_30:not(._disabled_x8f352_57) input:focus-visible + ._slider_x8f352_63,
|
|
172
|
+
._main_x8f352_30:not(._disabled_x8f352_57) input:focus[data-focus-method='key'] + ._slider_x8f352_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_x8f352_6","themeDark":"_themeDark_x8f352_9","sizeS":"_sizeS_x8f352_13","sizeM":"_sizeM_x8f352_16","sizeL":"_sizeL_x8f352_19","classic":"_classic_x8f352_23","rock":"_rock_x8f352_26","main":"_main_x8f352_30","disabled":"_disabled_x8f352_57","slider":"_slider_x8f352_63"};
|
|
2
2
|
|
|
3
3
|
export { styles as default };
|
package/llm/components/toggle.md
CHANGED
|
@@ -8,7 +8,7 @@ Toggle is a control that allows you to turn elements on and off instantly.
|
|
|
8
8
|
|
|
9
9
|
#### Default props
|
|
10
10
|
|
|
11
|
-
```
|
|
11
|
+
```jsx
|
|
12
12
|
import { Toggle } from '@rescui/toggle';
|
|
13
13
|
|
|
14
14
|
<Toggle>Toggle</Toggle>;
|
|
@@ -16,7 +16,7 @@ import { Toggle } from '@rescui/toggle';
|
|
|
16
16
|
|
|
17
17
|
#### Controlled toggle
|
|
18
18
|
|
|
19
|
-
```
|
|
19
|
+
```jsx
|
|
20
20
|
import { Toggle } from '@rescui/toggle';
|
|
21
21
|
import { useState } from 'react';
|
|
22
22
|
|
|
@@ -39,7 +39,7 @@ render(<Demo />);
|
|
|
39
39
|
|
|
40
40
|
Use inlined `Toggle` when you want to save as much space as possible
|
|
41
41
|
|
|
42
|
-
```
|
|
42
|
+
```jsx
|
|
43
43
|
import { Toggle } from '@rescui/toggle';
|
|
44
44
|
|
|
45
45
|
<span style={{ display: 'inline-block' }}>
|
|
@@ -51,7 +51,7 @@ import { Toggle } from '@rescui/toggle';
|
|
|
51
51
|
|
|
52
52
|
Use 'Toggle' wrapped in "Label" to enable custom toggle descriptions
|
|
53
53
|
|
|
54
|
-
```
|
|
54
|
+
```jsx
|
|
55
55
|
import { ToggleControl } from '@rescui/toggle';
|
|
56
56
|
|
|
57
57
|
<label style={{ display: 'flex', alignItems: 'center' }}>
|
|
@@ -66,7 +66,7 @@ import { ToggleControl } from '@rescui/toggle';
|
|
|
66
66
|
|
|
67
67
|
If you want to change the size of items in the list, change the size of `ToggleControl` component as well.
|
|
68
68
|
|
|
69
|
-
```
|
|
69
|
+
```jsx
|
|
70
70
|
import { ToggleControl } from '@rescui/toggle';
|
|
71
71
|
import { Menu, MenuItem } from '@rescui/menu';
|
|
72
72
|
|
|
@@ -99,7 +99,7 @@ import { Menu, MenuItem } from '@rescui/menu';
|
|
|
99
99
|
|
|
100
100
|
Use the controls to see the effect at different viewport widths.
|
|
101
101
|
|
|
102
|
-
```
|
|
102
|
+
```jsx
|
|
103
103
|
import { Toggle } from '@rescui/toggle';
|
|
104
104
|
|
|
105
105
|
const MyToggle = () => {
|
|
@@ -146,7 +146,7 @@ render(<MyToggle />);
|
|
|
146
146
|
|
|
147
147
|
Use the controls to see the effect at different viewport widths.
|
|
148
148
|
|
|
149
|
-
```
|
|
149
|
+
```jsx
|
|
150
150
|
import { ToggleControl } from '@rescui/toggle';
|
|
151
151
|
|
|
152
152
|
const MyToggleControl = () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rescui/toggle",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.2-floating-ui-migration-19bb1e9d6.6.sha-19bb1e9d6",
|
|
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,19 +16,19 @@
|
|
|
16
16
|
"access": "public"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@rescui/menu": "
|
|
19
|
+
"@rescui/menu": "0.17.2-floating-ui-migration-19bb1e9d6.6.sha-19bb1e9d6",
|
|
20
20
|
"classnames": "^2.2.6",
|
|
21
21
|
"react-compiler-runtime": "^1.0.0"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
|
-
"@rescui/ui-contexts": "^0.7.0",
|
|
24
|
+
"@rescui/ui-contexts": "^0.7.0 || ^0.8.0",
|
|
25
25
|
"prop-types": "^15",
|
|
26
26
|
"react": ">=17.0.0 <20"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@rescui/colors": "
|
|
30
|
-
"@rescui/scripts": "
|
|
31
|
-
"@rescui/visual-regression": "
|
|
29
|
+
"@rescui/colors": "0.3.7-floating-ui-migration-19bb1e9d6.6.sha-19bb1e9d6",
|
|
30
|
+
"@rescui/scripts": "0.6.0",
|
|
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": "19bb1e9d6209ed46222713346d964bc6af332c37"
|
|
40
40
|
}
|