@rescui/toggle 0.6.1 → 0.6.2-update-build-chain-d223c387a.21.sha-d223c387a

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,36 +3,39 @@
3
3
  inherits:true;
4
4
  initial-value:0;
5
5
  }
6
- ._themeLight_1iv0967_6{
6
+ ._themeLight_gk82f5_6{
7
7
  --rs-theme-dark:0;
8
8
  }
9
- ._themeDark_1iv0967_9{
9
+ ._themeDark_gk82f5_9{
10
10
  --rs-theme-dark:1;
11
11
  }
12
- ._sizeS_1iv0967_13{
12
+
13
+ ._sizeS_gk82f5_13{
13
14
  --_rs-toggle-width:20px;
14
15
  --_rs-toggle-height:12px;
15
16
  --_rs-toggle-shadow:3px;
16
17
  }
17
- ._sizeM_1iv0967_16{
18
+ ._sizeM_gk82f5_16{
18
19
  --_rs-toggle-width:28px;
19
20
  --_rs-toggle-height:16px;
20
21
  --_rs-toggle-shadow:3px;
21
22
  }
22
- ._sizeL_1iv0967_19{
23
+ ._sizeL_gk82f5_19{
23
24
  --_rs-toggle-width:32px;
24
25
  --_rs-toggle-height:18px;
25
26
  --_rs-toggle-shadow:4px;
26
27
  }
27
- ._classic_1iv0967_23{
28
+
29
+ ._classic_gk82f5_23{
28
30
  --_rs-toggle-hover-slider-box-shadow-color:var(--_rs-color-primary-t-fog);
29
31
  --_rs-toggle-checked-slider-background-color:var(--_rs-color-primary);
30
32
  }
31
- ._rock_1iv0967_26{
32
- --_rs-toggle-hover-slider-box-shadow-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);
33
- --_rs-toggle-checked-slider-background-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));
33
+ ._rock_gk82f5_26{
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
+ --_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)));
34
36
  }
35
- ._main_1iv0967_30{
37
+
38
+ ._main_gk82f5_30{
36
39
  --_rs-toggle-circle-border:2px;
37
40
 
38
41
  --_rs-theme-dark:var(
@@ -42,41 +45,47 @@
42
45
 
43
46
  --_rs-theme-flip:var(--rs-theme-flip, 0);
44
47
 
45
- --_rs-theme-dark-coefficient:calc(var(--_rs-theme-dark)*(1 - var(--_rs-theme-flip)) + var(--_rs-theme-flip)*(1 - var(--_rs-theme-dark)));
48
+ --_rs-theme-dark-coefficient:calc(var(--_rs-theme-dark) * (1 - var(--_rs-theme-flip)) + var(--_rs-theme-flip) * (1 - var(--_rs-theme-dark)));
46
49
 
47
50
  --_rs-theme-light-coefficient:calc(1 - var(--_rs-theme-dark-coefficient));
48
51
  }
52
+
49
53
  @supports (color: color-mix(in srgb, #fff 50%, #000 50%)){
50
- ._main_1iv0967_30{
51
- --_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)));
52
- --_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)));
53
- --_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)));
54
- --_rs-color-primary-t-dim:color-mix(in srgb, var(--rs-color-primary-t-dim-light-theme, rgba(107, 87, 255, 0.8)) calc(100%*var(--_rs-theme-light-coefficient, 1)), var(--rs-color-primary-t-dim-dark-theme, rgba(132, 115, 255,0.8)) calc(100%*var(--_rs-theme-dark-coefficient, 0)));
55
- --_rs-color-primary-t-fog:color-mix(in srgb, var(--rs-color-primary-t-fog-light-theme, rgba(107, 87, 255,0.2)) calc(100%*var(--_rs-theme-light-coefficient, 1)), var(--rs-color-primary-t-fog-dark-theme, rgba(132, 115, 255,0.3)) calc(100%*var(--_rs-theme-dark-coefficient, 0)));
54
+
55
+ ._main_gk82f5_30{
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
+ --_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
+ --_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)));
59
+ --_rs-color-primary-t-dim:color-mix(in srgb, var(--rs-color-primary-t-dim-light-theme, rgba(107, 87, 255, 0.8)) calc(100% * var(--_rs-theme-light-coefficient, 1)), var(--rs-color-primary-t-dim-dark-theme, rgba(132, 115, 255,0.8)) calc(100% * var(--_rs-theme-dark-coefficient, 0)));
60
+ --_rs-color-primary-t-fog:color-mix(in srgb, var(--rs-color-primary-t-fog-light-theme, rgba(107, 87, 255,0.2)) calc(100% * var(--_rs-theme-light-coefficient, 1)), var(--rs-color-primary-t-fog-dark-theme, rgba(132, 115, 255,0.3)) calc(100% * var(--_rs-theme-dark-coefficient, 0)));
56
61
  }
57
62
  }
63
+
58
64
  @supports not (color: color-mix(in srgb, #fff 50%, #000 50%)){
59
- ._main_1iv0967_30{
60
- --_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);
61
- --_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));
62
- --_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));
63
- --_rs-color-primary-t-dim: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, 0.8);
64
- --_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));
65
+
66
+ ._main_gk82f5_30{
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
+ --_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
+ --_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)));
70
+ --_rs-color-primary-t-dim: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, 0.8);
71
+ --_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)));
65
72
  }
66
73
  }
67
- ._main_1iv0967_30 {
74
+
75
+ ._main_gk82f5_30 {
68
76
 
69
77
  position:relative;
70
78
 
71
79
  display:inline-flex;
72
80
  align-self:center;
73
81
 
74
- width:calc(var(--_rs-toggle-width) + var(--_rs-toggle-shadow)*2);
75
- height:calc(var(--_rs-toggle-height) + var(--_rs-toggle-shadow)*2);
82
+ width:calc(var(--_rs-toggle-width) + 2 * var(--_rs-toggle-shadow));
83
+ height:calc(var(--_rs-toggle-height) + 2 * var(--_rs-toggle-shadow));
76
84
 
77
85
  cursor:pointer;
78
86
  }
79
- ._main_1iv0967_30 input{
87
+
88
+ ._main_gk82f5_30 input{
80
89
  position:absolute;
81
90
  z-index:-1;
82
91
 
@@ -86,11 +95,13 @@
86
95
 
87
96
  pointer-events:none;
88
97
  }
89
- ._main_1iv0967_30._disabled_1iv0967_57{
98
+
99
+ ._main_gk82f5_30._disabled_gk82f5_57{
90
100
  cursor:default;
91
101
  pointer-events:none;
92
102
  }
93
- ._slider_1iv0967_63{
103
+
104
+ ._slider_gk82f5_63{
94
105
  position:absolute;
95
106
  top:var(--_rs-toggle-shadow);
96
107
  left:var(--_rs-toggle-shadow);
@@ -104,7 +115,8 @@
104
115
 
105
116
  transition:background-color 200ms var(--rs-transition-function, ease);
106
117
  }
107
- ._slider_1iv0967_63:after{
118
+
119
+ ._slider_gk82f5_63:after{
108
120
  position:absolute;
109
121
  top:0;
110
122
  left:0;
@@ -118,37 +130,44 @@
118
130
 
119
131
  content:'';
120
132
 
121
- background-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));
133
+ background-color:rgb(calc(255 - 230 * var(--_rs-theme-dark-coefficient, 0)), calc(255 - 230 * var(--_rs-theme-dark-coefficient, 0)), calc(255 - 227 * var(--_rs-theme-dark-coefficient, 0)));
122
134
 
123
135
  transition:transform 200ms var(--rs-transition-function, ease), height 200ms var(--rs-transition-function, ease), width 200ms var(--rs-transition-function, ease), border-color 200ms var(--rs-transition-function, ease);
124
136
  transform:translate(0);
125
137
  }
126
- ._disabled_1iv0967_57 ._slider_1iv0967_63{
127
- background:rgb(calc(209 - var(--_rs-theme-dark-coefficient, 0)*138), calc(209 - var(--_rs-theme-dark-coefficient, 0)*138), calc(210 - var(--_rs-theme-dark-coefficient, 0)*137));
138
+
139
+ ._disabled_gk82f5_57 ._slider_gk82f5_63{
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)));
128
141
  }
129
- ._disabled_1iv0967_57 ._slider_1iv0967_63:after{
130
- border-color:rgb(calc(209 - var(--_rs-theme-dark-coefficient, 0)*138), calc(209 - var(--_rs-theme-dark-coefficient, 0)*138), calc(210 - var(--_rs-theme-dark-coefficient, 0)*137));
131
142
 
132
- background:rgb(calc(232 - var(--_rs-theme-dark-coefficient, 0)*184), calc(232 - var(--_rs-theme-dark-coefficient, 0)*184), calc(232 - var(--_rs-theme-dark-coefficient, 0)*181));
143
+ ._disabled_gk82f5_57 ._slider_gk82f5_63:after{
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
+
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)));
133
147
  }
134
- input:checked + ._slider_1iv0967_63:after{
148
+
149
+ input:checked + ._slider_gk82f5_63:after{
135
150
  width:calc(var(--_rs-toggle-height) + var(--_rs-toggle-circle-border));
136
151
  height:calc(var(--_rs-toggle-height) + var(--_rs-toggle-circle-border));
137
152
 
138
153
  transform:translate(
139
- calc(var(--_rs-toggle-width) - var(--_rs-toggle-height) - var(--_rs-toggle-circle-border)/2),
140
- calc(var(--_rs-toggle-circle-border)/-2)
154
+ calc(var(--_rs-toggle-width) - var(--_rs-toggle-height) - .5 * var(--_rs-toggle-circle-border)),
155
+ calc(-.5 * var(--_rs-toggle-circle-border))
141
156
  );
142
157
  }
143
- ._main_1iv0967_30:not(._disabled_1iv0967_57) input:hover + ._slider_1iv0967_63{
158
+
159
+ ._main_gk82f5_30:not(._disabled_gk82f5_57) input:hover + ._slider_gk82f5_63{
144
160
  box-shadow:var(--_rs-toggle-hover-slider-box-shadow-color) 0 0 0 var(--_rs-toggle-shadow);
145
161
  }
146
- ._main_1iv0967_30:not(._disabled_1iv0967_57) input:checked + ._slider_1iv0967_63{
162
+
163
+ ._main_gk82f5_30:not(._disabled_gk82f5_57) input:checked + ._slider_gk82f5_63{
147
164
  background-color:var(--_rs-toggle-checked-slider-background-color);
148
165
  }
149
- ._main_1iv0967_30:not(._disabled_1iv0967_57) input:checked + ._slider_1iv0967_63:after{
166
+
167
+ ._main_gk82f5_30:not(._disabled_gk82f5_57) input:checked + ._slider_gk82f5_63:after{
150
168
  border-color:var(--_rs-toggle-checked-slider-background-color);
151
169
  }
152
- ._main_1iv0967_30:not(._disabled_1iv0967_57) input:focus[data-focus-method='key'] + ._slider_1iv0967_63{
170
+
171
+ ._main_gk82f5_30:not(._disabled_gk82f5_57) input:focus[data-focus-method='key'] + ._slider_gk82f5_63{
153
172
  box-shadow:0 0 0 var(--_rs-toggle-shadow) var(--_rs-color-primary-t-dim);
154
173
  }
@@ -36,7 +36,7 @@
36
36
  --_rs-typography-hardness-color,
37
37
  var(
38
38
  --rs-color-average,
39
- 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.7)
39
+ 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.7)
40
40
  )
41
41
  );
42
42
  --_rs-typography-text-auto-offset:8px;
@@ -82,7 +82,7 @@
82
82
  --_rs-typography-hardness-color,
83
83
  var(
84
84
  --rs-color-average,
85
- 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.7)
85
+ 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.7)
86
86
  )
87
87
  );
88
88
  --_rs-typography-text-auto-offset:16px;
@@ -136,7 +136,7 @@
136
136
  --_rs-typography-hardness-color,
137
137
  var(
138
138
  --rs-color-average,
139
- 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.7)
139
+ 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.7)
140
140
  )
141
141
  );
142
142
  --_rs-typography-text-auto-offset:32px;
@@ -165,8 +165,8 @@
165
165
  }
166
166
  @define-mixin rs-toggle-mode-rock{
167
167
  & [data-rs-internal="toggle"]{
168
- --_rs-toggle-hover-slider-box-shadow-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);
169
- --_rs-toggle-checked-slider-background-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));
168
+ --_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);
169
+ --_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)));
170
170
  }
171
171
  }
172
172
  @define-mixin rs-toggle-label-placement-left{
@@ -210,7 +210,7 @@
210
210
  }
211
211
  @define-mixin rs-toggle-control-mode-rock{
212
212
  &[class]{
213
- --_rs-toggle-hover-slider-box-shadow-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);
214
- --_rs-toggle-checked-slider-background-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));
213
+ --_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);
214
+ --_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)));
215
215
  }
216
216
  }
@@ -36,7 +36,7 @@
36
36
  --_rs-typography-hardness-color,
37
37
  var(
38
38
  --rs-color-average,
39
- 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.7)
39
+ 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.7)
40
40
  )
41
41
  );
42
42
  --_rs-typography-text-auto-offset:8px;
@@ -82,7 +82,7 @@
82
82
  --_rs-typography-hardness-color,
83
83
  var(
84
84
  --rs-color-average,
85
- 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.7)
85
+ 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.7)
86
86
  )
87
87
  );
88
88
  --_rs-typography-text-auto-offset:16px;
@@ -136,7 +136,7 @@
136
136
  --_rs-typography-hardness-color,
137
137
  var(
138
138
  --rs-color-average,
139
- 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.7)
139
+ 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.7)
140
140
  )
141
141
  );
142
142
  --_rs-typography-text-auto-offset:32px;
@@ -165,8 +165,8 @@
165
165
  }
166
166
  @define-mixin rs-toggle-mode-rock{
167
167
  & [data-rs-internal="toggle"]{
168
- --_rs-toggle-hover-slider-box-shadow-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);
169
- --_rs-toggle-checked-slider-background-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));
168
+ --_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);
169
+ --_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)));
170
170
  }
171
171
  }
172
172
  @define-mixin rs-toggle-label-placement-left{
@@ -210,7 +210,7 @@
210
210
  }
211
211
  @define-mixin rs-toggle-control-mode-rock{
212
212
  &[class]{
213
- --_rs-toggle-hover-slider-box-shadow-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);
214
- --_rs-toggle-checked-slider-background-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));
213
+ --_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);
214
+ --_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)));
215
215
  }
216
216
  }
@@ -1,11 +1,11 @@
1
1
  "use client";
2
- import _extends from '@babel/runtime-corejs3/helpers/esm/extends';
3
2
  import { c } from 'react-compiler-runtime';
4
3
  import React from 'react';
5
4
  import PropTypes from 'prop-types';
6
5
  import cn from 'classnames';
7
6
  import { useThemeWithUndefined } from '@rescui/ui-contexts';
8
7
  import styles from './toggle.p.module.css.js';
8
+
9
9
  const SIZE_STYLES = {
10
10
  s: styles.sizeS,
11
11
  m: styles.sizeM,
@@ -33,7 +33,6 @@ const ToggleControl = /*#__PURE__*/React.forwardRef((t0, ref) => {
33
33
  let t4;
34
34
  let themeFromProps;
35
35
  let value;
36
-
37
36
  if ($[0] !== t0) {
38
37
  ({
39
38
  className,
@@ -76,7 +75,6 @@ const ToggleControl = /*#__PURE__*/React.forwardRef((t0, ref) => {
76
75
  themeFromProps = $[11];
77
76
  value = $[12];
78
77
  }
79
-
80
78
  const size = t1 === undefined ? "m" : t1;
81
79
  const mode = t2 === undefined ? "classic" : t2;
82
80
  const disabled = t3 === undefined ? false : t3;
@@ -88,7 +86,6 @@ const ToggleControl = /*#__PURE__*/React.forwardRef((t0, ref) => {
88
86
  const t7 = THEME_STYLES[theme];
89
87
  const t8 = disabled && styles.disabled;
90
88
  let t9;
91
-
92
89
  if ($[13] !== className || $[14] !== t5 || $[15] !== t6 || $[16] !== t7 || $[17] !== t8) {
93
90
  t9 = cn(className, styles.main, t5, t6, t7, t8);
94
91
  $[13] = className;
@@ -100,12 +97,10 @@ const ToggleControl = /*#__PURE__*/React.forwardRef((t0, ref) => {
100
97
  } else {
101
98
  t9 = $[18];
102
99
  }
103
-
104
100
  const t10 = disabled ? -1 : tabIndex;
105
101
  let t11;
106
-
107
102
  if ($[19] !== checked || $[20] !== defaultChecked || $[21] !== disabled || $[22] !== onChange || $[23] !== ref || $[24] !== restProps || $[25] !== t10 || $[26] !== value) {
108
- t11 = /*#__PURE__*/React.createElement("input", _extends({
103
+ t11 = /*#__PURE__*/React.createElement("input", Object.assign({
109
104
  type: "checkbox",
110
105
  "data-test": "toggle__input",
111
106
  ref: ref,
@@ -128,9 +123,7 @@ const ToggleControl = /*#__PURE__*/React.forwardRef((t0, ref) => {
128
123
  } else {
129
124
  t11 = $[27];
130
125
  }
131
-
132
126
  let t12;
133
-
134
127
  if ($[28] === Symbol.for("react.memo_cache_sentinel")) {
135
128
  t12 = /*#__PURE__*/React.createElement("span", {
136
129
  className: styles.slider
@@ -139,9 +132,7 @@ const ToggleControl = /*#__PURE__*/React.forwardRef((t0, ref) => {
139
132
  } else {
140
133
  t12 = $[28];
141
134
  }
142
-
143
135
  let t13;
144
-
145
136
  if ($[29] !== RootTag || $[30] !== t11 || $[31] !== t9) {
146
137
  t13 = /*#__PURE__*/React.createElement(RootTag, {
147
138
  className: t9,
@@ -154,7 +145,6 @@ const ToggleControl = /*#__PURE__*/React.forwardRef((t0, ref) => {
154
145
  } else {
155
146
  t13 = $[32];
156
147
  }
157
-
158
148
  return t13;
159
149
  });
160
150
  ToggleControl.displayName = 'ToggleControl';
@@ -170,4 +160,5 @@ ToggleControl.propTypes = {
170
160
  value: PropTypes.string,
171
161
  notUseLabelTag: PropTypes.bool
172
162
  };
163
+
173
164
  export { ToggleControl };
package/lib/toggle.js CHANGED
@@ -1,5 +1,4 @@
1
1
  "use client";
2
- import _extends from '@babel/runtime-corejs3/helpers/esm/extends';
3
2
  import { c } from 'react-compiler-runtime';
4
3
  import React from 'react';
5
4
  import PropTypes from 'prop-types';
@@ -7,6 +6,7 @@ import cn from 'classnames';
7
6
  import { useThemeWithUndefined } from '@rescui/ui-contexts';
8
7
  import { MenuItem } from '@rescui/menu';
9
8
  import { ToggleControl } from './toggle-control.js';
9
+
10
10
  const Toggle = /*#__PURE__*/React.forwardRef(function Toggle(t0, ref) {
11
11
  const $ = c(34);
12
12
  let checked;
@@ -21,7 +21,6 @@ const Toggle = /*#__PURE__*/React.forwardRef(function Toggle(t0, ref) {
21
21
  let t4;
22
22
  let themeFromProps;
23
23
  let value;
24
-
25
24
  if ($[0] !== t0) {
26
25
  ({
27
26
  className,
@@ -64,7 +63,6 @@ const Toggle = /*#__PURE__*/React.forwardRef(function Toggle(t0, ref) {
64
63
  themeFromProps = $[11];
65
64
  value = $[12];
66
65
  }
67
-
68
66
  const size = t1 === undefined ? "m" : t1;
69
67
  const mode = t2 === undefined ? "classic" : t2;
70
68
  const disabled = t3 === undefined ? false : t3;
@@ -72,7 +70,6 @@ const Toggle = /*#__PURE__*/React.forwardRef(function Toggle(t0, ref) {
72
70
  const theme = useThemeWithUndefined(themeFromProps);
73
71
  const iconPlacement = labelPlacement === "right" ? "left" : "right";
74
72
  let t5;
75
-
76
73
  if ($[13] !== className) {
77
74
  t5 = cn(className);
78
75
  $[13] = className;
@@ -80,11 +77,9 @@ const Toggle = /*#__PURE__*/React.forwardRef(function Toggle(t0, ref) {
80
77
  } else {
81
78
  t5 = $[14];
82
79
  }
83
-
84
80
  let t6;
85
-
86
81
  if ($[15] !== checked || $[16] !== defaultChecked || $[17] !== disabled || $[18] !== mode || $[19] !== onChange || $[20] !== ref || $[21] !== restProps || $[22] !== size || $[23] !== theme || $[24] !== value) {
87
- t6 = /*#__PURE__*/React.createElement(ToggleControl, _extends({
82
+ t6 = /*#__PURE__*/React.createElement(ToggleControl, Object.assign({
88
83
  value: value,
89
84
  checked: checked,
90
85
  defaultChecked: defaultChecked,
@@ -110,9 +105,7 @@ const Toggle = /*#__PURE__*/React.forwardRef(function Toggle(t0, ref) {
110
105
  } else {
111
106
  t6 = $[25];
112
107
  }
113
-
114
108
  let t7;
115
-
116
109
  if ($[26] !== children || $[27] !== disabled || $[28] !== iconPlacement || $[29] !== size || $[30] !== t5 || $[31] !== t6 || $[32] !== theme) {
117
110
  t7 = /*#__PURE__*/React.createElement(MenuItem, {
118
111
  className: t5,
@@ -137,7 +130,6 @@ const Toggle = /*#__PURE__*/React.forwardRef(function Toggle(t0, ref) {
137
130
  } else {
138
131
  t7 = $[33];
139
132
  }
140
-
141
133
  return t7;
142
134
  });
143
135
  Toggle.propTypes = {
@@ -153,4 +145,5 @@ Toggle.propTypes = {
153
145
  theme: PropTypes.oneOf(['dark', 'light']),
154
146
  value: PropTypes.string
155
147
  };
148
+
156
149
  export { Toggle };
@@ -1,13 +1,3 @@
1
- var styles = {
2
- "themeLight": "_themeLight_1iv0967_6",
3
- "themeDark": "_themeDark_1iv0967_9",
4
- "sizeS": "_sizeS_1iv0967_13",
5
- "sizeM": "_sizeM_1iv0967_16",
6
- "sizeL": "_sizeL_1iv0967_19",
7
- "classic": "_classic_1iv0967_23",
8
- "rock": "_rock_1iv0967_26",
9
- "main": "_main_1iv0967_30",
10
- "disabled": "_disabled_1iv0967_57",
11
- "slider": "_slider_1iv0967_63"
12
- };
1
+ var styles = {"themeLight":"_themeLight_gk82f5_6","themeDark":"_themeDark_gk82f5_9","sizeS":"_sizeS_gk82f5_13","sizeM":"_sizeM_gk82f5_16","sizeL":"_sizeL_gk82f5_19","classic":"_classic_gk82f5_23","rock":"_rock_gk82f5_26","main":"_main_gk82f5_30","disabled":"_disabled_gk82f5_57","slider":"_slider_gk82f5_63"};
2
+
13
3
  export { styles as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rescui/toggle",
3
- "version": "0.6.1",
3
+ "version": "0.6.2-update-build-chain-d223c387a.21.sha-d223c387a",
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,8 +16,7 @@
16
16
  "access": "public"
17
17
  },
18
18
  "dependencies": {
19
- "@babel/runtime-corejs3": "^7.26.0",
20
- "@rescui/menu": "^0.15.1",
19
+ "@rescui/menu": "0.15.2-update-build-chain-d223c387a.21.sha-d223c387a",
21
20
  "classnames": "^2.2.6",
22
21
  "react-compiler-runtime": "^1.0.0"
23
22
  },
@@ -27,9 +26,9 @@
27
26
  "react": ">=17.0.0 <20"
28
27
  },
29
28
  "devDependencies": {
30
- "@rescui/colors": "^0.3.4",
31
- "@rescui/scripts": "^0.5.3",
32
- "@rescui/visual-regression": "^0.1.4",
29
+ "@rescui/colors": "0.3.5-update-build-chain-d223c387a.23.sha-d223c387a",
30
+ "@rescui/scripts": "0.5.3",
31
+ "@rescui/visual-regression": "0.1.4",
33
32
  "@types/classnames": "^2.2.11"
34
33
  },
35
34
  "scripts": {
@@ -37,5 +36,5 @@
37
36
  "build-pcss-api": "rescui-scripts build-pcss-api --file public-api.p.css"
38
37
  },
39
38
  "nx": {},
40
- "gitHead": "ce4c6c5e3fd5aede0006f6ef8e655fc0ab394c0f"
39
+ "gitHead": "d223c387a4d5be1b357b1900add068199eaf7983"
41
40
  }