@rescui/radio-button 0.2.2 → 0.3.2
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
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
.
|
|
1
|
+
._main_xksgkf_3{
|
|
2
2
|
display:inline-block;
|
|
3
|
+
|
|
3
4
|
vertical-align:middle;
|
|
4
5
|
}
|
|
5
|
-
.
|
|
6
|
+
._errorMessage_xksgkf_9{
|
|
6
7
|
letter-spacing:0.0045em;
|
|
7
|
-
color:rgba(25,25,28,0.7);
|
|
8
|
-
color:var(--rs-typography-color-average, rgba(25,25,28,0.7));
|
|
9
8
|
font-family:'JetBrains Sans', Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Droid Sans', 'Helvetica Neue', Arial, sans-serif;
|
|
10
9
|
font-family:var(--rs-font-family-ui, var(--rs-font-family-jb-sans, 'JetBrains Sans', Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Droid Sans', 'Helvetica Neue', Arial, sans-serif));
|
|
11
10
|
font-size:13px;
|
|
@@ -13,20 +12,21 @@
|
|
|
13
12
|
line-height:20px;
|
|
14
13
|
line-height:var(--rs-text-3-line-height, 20px);
|
|
15
14
|
}
|
|
16
|
-
._rs-reset-letter-
|
|
15
|
+
._rs-reset-letter-spacing_xksgkf_1 ._errorMessage_xksgkf_9{
|
|
17
16
|
letter-spacing:normal;
|
|
18
17
|
}
|
|
19
|
-
.
|
|
18
|
+
._errorMessage_xksgkf_9 {
|
|
20
19
|
|
|
21
20
|
margin-bottom:8px;
|
|
22
21
|
|
|
23
22
|
color:#F45C4A;
|
|
24
23
|
}
|
|
25
|
-
.
|
|
24
|
+
._input_xksgkf_17{
|
|
26
25
|
position:absolute;
|
|
27
26
|
-webkit-appearance:none;
|
|
28
27
|
-moz-appearance:none;
|
|
29
28
|
appearance:none;
|
|
29
|
+
|
|
30
30
|
z-index:-1;
|
|
31
31
|
|
|
32
32
|
opacity:0;
|
|
@@ -35,256 +35,231 @@
|
|
|
35
35
|
|
|
36
36
|
border:0;
|
|
37
37
|
}
|
|
38
|
-
.
|
|
39
|
-
display:inline-block;
|
|
38
|
+
._icon_xksgkf_30{
|
|
40
39
|
position:relative;
|
|
41
40
|
|
|
41
|
+
display:inline-block;
|
|
42
|
+
|
|
42
43
|
-webkit-box-sizing:border-box;
|
|
43
44
|
|
|
44
45
|
box-sizing:border-box;
|
|
45
46
|
|
|
47
|
+
border-width:1px;
|
|
48
|
+
border-style:solid;
|
|
49
|
+
|
|
46
50
|
border-radius:50%;
|
|
47
51
|
}
|
|
48
|
-
.
|
|
52
|
+
._enabled_xksgkf_42 ._icon_xksgkf_30{
|
|
49
53
|
cursor:pointer;
|
|
50
54
|
}
|
|
51
|
-
.
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}
|
|
63
|
-
.
|
|
64
|
-
._themeLight_v4gxqo_52._rock_v4gxqo_53 ._icon_v4gxqo_28{
|
|
65
|
-
background-color:rgba(25,25,28,0.4);
|
|
66
|
-
}
|
|
67
|
-
._themeLight_v4gxqo_52._classic_v4gxqo_52 ._icon_v4gxqo_28::before, ._themeLight_v4gxqo_52._rock_v4gxqo_53 ._icon_v4gxqo_28::before{
|
|
68
|
-
background-color:#FFFFFF;
|
|
69
|
-
}
|
|
70
|
-
._themeDark_v4gxqo_61._classic_v4gxqo_52 ._icon_v4gxqo_28,
|
|
71
|
-
._themeDark_v4gxqo_61._rock_v4gxqo_53 ._icon_v4gxqo_28{
|
|
72
|
-
background-color:rgba(255,255,255,0.4);
|
|
73
|
-
}
|
|
74
|
-
._themeDark_v4gxqo_61._classic_v4gxqo_52 ._icon_v4gxqo_28::before, ._themeDark_v4gxqo_61._rock_v4gxqo_53 ._icon_v4gxqo_28::before{
|
|
75
|
-
background-color:#303033;
|
|
76
|
-
}
|
|
77
|
-
._sizeS_v4gxqo_70 ._icon_v4gxqo_28{
|
|
55
|
+
._themeLight_xksgkf_46._classic_xksgkf_46 ._icon_xksgkf_30,
|
|
56
|
+
._themeLight_xksgkf_46._rock_xksgkf_47 ._icon_xksgkf_30{
|
|
57
|
+
border-color:rgba(25,25,28,0.4);
|
|
58
|
+
|
|
59
|
+
background-color:#FFFFFF;
|
|
60
|
+
}
|
|
61
|
+
._themeDark_xksgkf_53._classic_xksgkf_46 ._icon_xksgkf_30,
|
|
62
|
+
._themeDark_xksgkf_53._rock_xksgkf_47 ._icon_xksgkf_30{
|
|
63
|
+
border-color:rgba(255,255,255,0.4);
|
|
64
|
+
|
|
65
|
+
background-color:#303033;
|
|
66
|
+
}
|
|
67
|
+
._sizeS_xksgkf_60 ._icon_xksgkf_30{
|
|
78
68
|
width:14px;
|
|
79
69
|
height:14px;
|
|
80
70
|
margin:3px;
|
|
81
71
|
}
|
|
82
|
-
.
|
|
72
|
+
._sizeM_xksgkf_66 ._icon_xksgkf_30{
|
|
83
73
|
width:18px;
|
|
84
74
|
height:18px;
|
|
85
75
|
margin:3px;
|
|
86
76
|
}
|
|
87
|
-
.
|
|
77
|
+
._sizeL_xksgkf_72 ._icon_xksgkf_30{
|
|
88
78
|
width:20px;
|
|
89
79
|
height:20px;
|
|
90
80
|
margin:4px;
|
|
91
81
|
}
|
|
92
|
-
.
|
|
82
|
+
._error_xksgkf_9 ._icon_xksgkf_30{
|
|
93
83
|
border-color:#F45C4A !important;
|
|
94
84
|
}
|
|
95
|
-
.
|
|
85
|
+
._sizeS_xksgkf_60{
|
|
96
86
|
width:20px;
|
|
97
87
|
height:20px;
|
|
98
88
|
}
|
|
99
|
-
.
|
|
100
|
-
.
|
|
101
|
-
.
|
|
102
|
-
width:
|
|
103
|
-
height:calc(100% - 10px);
|
|
89
|
+
._sizeS_xksgkf_60._enabled_xksgkf_42 ._input_xksgkf_17:active + ._icon_xksgkf_30,
|
|
90
|
+
._sizeS_xksgkf_60._enabled_xksgkf_42 ._input_xksgkf_17:checked + ._icon_xksgkf_30,
|
|
91
|
+
._sizeS_xksgkf_60 ._input_xksgkf_17:checked:disabled + ._icon_xksgkf_30{
|
|
92
|
+
border-width:5px;
|
|
104
93
|
}
|
|
105
|
-
.
|
|
94
|
+
._sizeM_xksgkf_66{
|
|
106
95
|
width:24px;
|
|
107
96
|
height:24px;
|
|
108
97
|
}
|
|
109
|
-
.
|
|
110
|
-
.
|
|
111
|
-
.
|
|
112
|
-
width:
|
|
113
|
-
height:calc(100% - 12px);
|
|
98
|
+
._sizeM_xksgkf_66._enabled_xksgkf_42 ._input_xksgkf_17:active + ._icon_xksgkf_30,
|
|
99
|
+
._sizeM_xksgkf_66._enabled_xksgkf_42 ._input_xksgkf_17:checked + ._icon_xksgkf_30,
|
|
100
|
+
._sizeM_xksgkf_66 ._input_xksgkf_17:checked:disabled + ._icon_xksgkf_30{
|
|
101
|
+
border-width:6px;
|
|
114
102
|
}
|
|
115
|
-
.
|
|
103
|
+
._sizeL_xksgkf_72{
|
|
116
104
|
width:28px;
|
|
117
105
|
height:28px;
|
|
118
106
|
}
|
|
119
|
-
.
|
|
120
|
-
.
|
|
121
|
-
.
|
|
122
|
-
width:
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
.
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
background-color
|
|
135
|
-
}
|
|
136
|
-
.
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
.
|
|
143
|
-
background-color:rgba(255,255,255,0.5);
|
|
144
|
-
}
|
|
145
|
-
label:hover ._themeDark_v4gxqo_61._classic_v4gxqo_52._enabled_v4gxqo_36 > ._icon_v4gxqo_28::before,
|
|
146
|
-
._themeDark_v4gxqo_61._classic_v4gxqo_52._enabled_v4gxqo_36:hover > ._icon_v4gxqo_28::before{
|
|
107
|
+
._sizeL_xksgkf_72._enabled_xksgkf_42 ._input_xksgkf_17:active + ._icon_xksgkf_30,
|
|
108
|
+
._sizeL_xksgkf_72._enabled_xksgkf_42 ._input_xksgkf_17:checked + ._icon_xksgkf_30,
|
|
109
|
+
._sizeL_xksgkf_72 ._input_xksgkf_17:checked:disabled + ._icon_xksgkf_30{
|
|
110
|
+
border-width:6px;
|
|
111
|
+
}
|
|
112
|
+
._themeLight_xksgkf_46._classic_xksgkf_46._enabled_xksgkf_42 ._input_xksgkf_17:active + ._icon_xksgkf_30,
|
|
113
|
+
._themeLight_xksgkf_46._classic_xksgkf_46._enabled_xksgkf_42 ._input_xksgkf_17:checked + ._icon_xksgkf_30{
|
|
114
|
+
border-color:#6B57FF;
|
|
115
|
+
border-color:var(--rs-color-primary-light-theme, #6B57FF);
|
|
116
|
+
|
|
117
|
+
background-color:#FFFFFF;
|
|
118
|
+
}
|
|
119
|
+
._themeLight_xksgkf_46._classic_xksgkf_46 ._input_xksgkf_17:disabled + ._icon_xksgkf_30{
|
|
120
|
+
border-color:rgba(25,25,28,0.2);
|
|
121
|
+
|
|
122
|
+
background-color:#F4F4F4;
|
|
123
|
+
}
|
|
124
|
+
._themeLight_xksgkf_46._classic_xksgkf_46 ._input_xksgkf_17:checked:disabled + ._icon_xksgkf_30{
|
|
125
|
+
border-color:rgba(25,25,28,0.1);
|
|
126
|
+
|
|
127
|
+
background:rgba(25,25,28,0.1);
|
|
128
|
+
}
|
|
129
|
+
label:hover ._themeDark_xksgkf_53._classic_xksgkf_46._enabled_xksgkf_42 > ._icon_xksgkf_30,
|
|
130
|
+
._themeDark_xksgkf_53._classic_xksgkf_46._enabled_xksgkf_42:hover > ._icon_xksgkf_30{
|
|
147
131
|
background-color:#474749;
|
|
148
132
|
}
|
|
149
|
-
.
|
|
150
|
-
.
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
background
|
|
165
|
-
}
|
|
166
|
-
.
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
.
|
|
171
|
-
.
|
|
172
|
-
.
|
|
173
|
-
|
|
174
|
-
._themeLight_v4gxqo_52._classic_v4gxqo_52._enabled_v4gxqo_36._sizeM_v4gxqo_76:hover > ._icon_v4gxqo_28,
|
|
175
|
-
._themeLight_v4gxqo_52._classic_v4gxqo_52._enabled_v4gxqo_36._sizeM_v4gxqo_76 ._input_v4gxqo_16:focus[data-focus-method='key'] + ._icon_v4gxqo_28,
|
|
176
|
-
._themeLight_v4gxqo_52._classic_v4gxqo_52._enabled_v4gxqo_36._sizeM_v4gxqo_76 ._input_v4gxqo_16:active:not(:checked) + ._icon_v4gxqo_28{
|
|
133
|
+
._themeDark_xksgkf_53._classic_xksgkf_46._enabled_xksgkf_42 ._input_xksgkf_17:active + ._icon_xksgkf_30,
|
|
134
|
+
._themeDark_xksgkf_53._classic_xksgkf_46._enabled_xksgkf_42 ._input_xksgkf_17:checked + ._icon_xksgkf_30{
|
|
135
|
+
border-color:#8473FF;
|
|
136
|
+
border-color:var(--rs-color-primary-dark-theme, #8473FF);
|
|
137
|
+
|
|
138
|
+
background-color:#FFFFFF;
|
|
139
|
+
}
|
|
140
|
+
._themeDark_xksgkf_53._classic_xksgkf_46 ._input_xksgkf_17:disabled + ._icon_xksgkf_30{
|
|
141
|
+
border-color:rgba(255,255,255,0.2);
|
|
142
|
+
|
|
143
|
+
background-color:#19191C;
|
|
144
|
+
}
|
|
145
|
+
._themeDark_xksgkf_53._classic_xksgkf_46 ._input_xksgkf_17:checked:disabled + ._icon_xksgkf_30{
|
|
146
|
+
border-color:rgba(255,255,255,0.1);
|
|
147
|
+
|
|
148
|
+
background:rgba(255,255,255,0.1);
|
|
149
|
+
}
|
|
150
|
+
label:hover ._themeLight_xksgkf_46._classic_xksgkf_46._enabled_xksgkf_42._sizeS_xksgkf_60 > ._icon_xksgkf_30,
|
|
151
|
+
._themeLight_xksgkf_46._classic_xksgkf_46._enabled_xksgkf_42._sizeS_xksgkf_60:hover > ._icon_xksgkf_30,
|
|
152
|
+
._themeLight_xksgkf_46._classic_xksgkf_46._enabled_xksgkf_42._sizeS_xksgkf_60 ._input_xksgkf_17:focus[data-focus-method='key'] + ._icon_xksgkf_30,
|
|
153
|
+
._themeLight_xksgkf_46._classic_xksgkf_46._enabled_xksgkf_42._sizeS_xksgkf_60 ._input_xksgkf_17:active:not(:checked) + ._icon_xksgkf_30,
|
|
154
|
+
label:hover ._themeLight_xksgkf_46._classic_xksgkf_46._enabled_xksgkf_42._sizeM_xksgkf_66 > ._icon_xksgkf_30,
|
|
155
|
+
._themeLight_xksgkf_46._classic_xksgkf_46._enabled_xksgkf_42._sizeM_xksgkf_66:hover > ._icon_xksgkf_30,
|
|
156
|
+
._themeLight_xksgkf_46._classic_xksgkf_46._enabled_xksgkf_42._sizeM_xksgkf_66 ._input_xksgkf_17:focus[data-focus-method='key'] + ._icon_xksgkf_30,
|
|
157
|
+
._themeLight_xksgkf_46._classic_xksgkf_46._enabled_xksgkf_42._sizeM_xksgkf_66 ._input_xksgkf_17:active:not(:checked) + ._icon_xksgkf_30{
|
|
177
158
|
-webkit-box-shadow:0 0 0 3px #e1ddff;
|
|
178
159
|
-webkit-box-shadow:0 0 0 3px var(--rs-color-primary-fog-light-theme, #e1ddff);
|
|
179
160
|
box-shadow:0 0 0 3px #e1ddff;
|
|
180
161
|
box-shadow:0 0 0 3px var(--rs-color-primary-fog-light-theme, #e1ddff);
|
|
181
162
|
}
|
|
182
|
-
label:hover .
|
|
183
|
-
.
|
|
184
|
-
.
|
|
185
|
-
.
|
|
186
|
-
label:hover .
|
|
187
|
-
.
|
|
188
|
-
.
|
|
189
|
-
.
|
|
163
|
+
label:hover ._themeDark_xksgkf_53._classic_xksgkf_46._enabled_xksgkf_42._sizeS_xksgkf_60 > ._icon_xksgkf_30,
|
|
164
|
+
._themeDark_xksgkf_53._classic_xksgkf_46._enabled_xksgkf_42._sizeS_xksgkf_60:hover > ._icon_xksgkf_30,
|
|
165
|
+
._themeDark_xksgkf_53._classic_xksgkf_46._enabled_xksgkf_42._sizeS_xksgkf_60 ._input_xksgkf_17:focus[data-focus-method='key'] + ._icon_xksgkf_30,
|
|
166
|
+
._themeDark_xksgkf_53._classic_xksgkf_46._enabled_xksgkf_42._sizeS_xksgkf_60 ._input_xksgkf_17:active:not(:checked) + ._icon_xksgkf_30,
|
|
167
|
+
label:hover ._themeDark_xksgkf_53._classic_xksgkf_46._enabled_xksgkf_42._sizeM_xksgkf_66 > ._icon_xksgkf_30,
|
|
168
|
+
._themeDark_xksgkf_53._classic_xksgkf_46._enabled_xksgkf_42._sizeM_xksgkf_66:hover > ._icon_xksgkf_30,
|
|
169
|
+
._themeDark_xksgkf_53._classic_xksgkf_46._enabled_xksgkf_42._sizeM_xksgkf_66 ._input_xksgkf_17:focus[data-focus-method='key'] + ._icon_xksgkf_30,
|
|
170
|
+
._themeDark_xksgkf_53._classic_xksgkf_46._enabled_xksgkf_42._sizeM_xksgkf_66 ._input_xksgkf_17:active:not(:checked) + ._icon_xksgkf_30{
|
|
190
171
|
-webkit-box-shadow:0 0 0 3px #2e2b49;
|
|
191
172
|
-webkit-box-shadow:0 0 0 3px var(--rs-color-primary-fog-dark-theme, #2e2b49);
|
|
192
173
|
box-shadow:0 0 0 3px #2e2b49;
|
|
193
174
|
box-shadow:0 0 0 3px var(--rs-color-primary-fog-dark-theme, #2e2b49);
|
|
194
175
|
}
|
|
195
|
-
label:hover .
|
|
196
|
-
.
|
|
197
|
-
.
|
|
198
|
-
.
|
|
176
|
+
label:hover ._themeLight_xksgkf_46._classic_xksgkf_46._enabled_xksgkf_42._sizeL_xksgkf_72 > ._icon_xksgkf_30,
|
|
177
|
+
._themeLight_xksgkf_46._classic_xksgkf_46._enabled_xksgkf_42._sizeL_xksgkf_72:hover > ._icon_xksgkf_30,
|
|
178
|
+
._themeLight_xksgkf_46._classic_xksgkf_46._enabled_xksgkf_42._sizeL_xksgkf_72 ._input_xksgkf_17:focus[data-focus-method='key'] + ._icon_xksgkf_30,
|
|
179
|
+
._themeLight_xksgkf_46._classic_xksgkf_46._enabled_xksgkf_42._sizeL_xksgkf_72 ._input_xksgkf_17:active:not(:checked) + ._icon_xksgkf_30{
|
|
199
180
|
-webkit-box-shadow:0 0 0 4px #e1ddff;
|
|
200
181
|
-webkit-box-shadow:0 0 0 4px var(--rs-color-primary-fog-light-theme, #e1ddff);
|
|
201
182
|
box-shadow:0 0 0 4px #e1ddff;
|
|
202
183
|
box-shadow:0 0 0 4px var(--rs-color-primary-fog-light-theme, #e1ddff);
|
|
203
184
|
}
|
|
204
|
-
label:hover .
|
|
205
|
-
.
|
|
206
|
-
.
|
|
207
|
-
.
|
|
185
|
+
label:hover ._themeDark_xksgkf_53._classic_xksgkf_46._enabled_xksgkf_42._sizeL_xksgkf_72 > ._icon_xksgkf_30,
|
|
186
|
+
._themeDark_xksgkf_53._classic_xksgkf_46._enabled_xksgkf_42._sizeL_xksgkf_72:hover > ._icon_xksgkf_30,
|
|
187
|
+
._themeDark_xksgkf_53._classic_xksgkf_46._enabled_xksgkf_42._sizeL_xksgkf_72 ._input_xksgkf_17:focus[data-focus-method='key'] + ._icon_xksgkf_30,
|
|
188
|
+
._themeDark_xksgkf_53._classic_xksgkf_46._enabled_xksgkf_42._sizeL_xksgkf_72 ._input_xksgkf_17:active:not(:checked) + ._icon_xksgkf_30{
|
|
208
189
|
-webkit-box-shadow:0 0 0 4px #2e2b49;
|
|
209
190
|
-webkit-box-shadow:0 0 0 4px var(--rs-color-primary-fog-dark-theme, #2e2b49);
|
|
210
191
|
box-shadow:0 0 0 4px #2e2b49;
|
|
211
192
|
box-shadow:0 0 0 4px var(--rs-color-primary-fog-dark-theme, #2e2b49);
|
|
212
193
|
}
|
|
213
|
-
.
|
|
214
|
-
.
|
|
215
|
-
|
|
194
|
+
._themeLight_xksgkf_46._rock_xksgkf_47._enabled_xksgkf_42 ._input_xksgkf_17:active + ._icon_xksgkf_30,
|
|
195
|
+
._themeLight_xksgkf_46._rock_xksgkf_47._enabled_xksgkf_42 ._input_xksgkf_17:checked + ._icon_xksgkf_30{
|
|
196
|
+
border-color:#19191C;
|
|
197
|
+
|
|
198
|
+
background-color:#FFFFFF;
|
|
199
|
+
}
|
|
200
|
+
._themeLight_xksgkf_46._rock_xksgkf_47 ._input_xksgkf_17:disabled + ._icon_xksgkf_30{
|
|
201
|
+
border-color:rgba(25,25,28,0.2);
|
|
202
|
+
|
|
203
|
+
background-color:#F4F4F4;
|
|
216
204
|
}
|
|
217
|
-
.
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
.
|
|
224
|
-
background-color:#F4F4F4;
|
|
225
|
-
}
|
|
226
|
-
._themeLight_v4gxqo_52._rock_v4gxqo_53 ._input_v4gxqo_16:checked:disabled + ._icon_v4gxqo_28{
|
|
227
|
-
background-color:rgba(25,25,28,0.2);
|
|
228
|
-
}
|
|
229
|
-
._themeLight_v4gxqo_52._rock_v4gxqo_53 ._input_v4gxqo_16:checked:disabled + ._icon_v4gxqo_28::before{
|
|
230
|
-
background-color:rgba(255,255,255,0.5);
|
|
231
|
-
}
|
|
232
|
-
label:hover ._themeDark_v4gxqo_61._rock_v4gxqo_53._enabled_v4gxqo_36 > ._icon_v4gxqo_28::before,
|
|
233
|
-
._themeDark_v4gxqo_61._rock_v4gxqo_53._enabled_v4gxqo_36:hover > ._icon_v4gxqo_28::before{
|
|
205
|
+
._themeLight_xksgkf_46._rock_xksgkf_47 ._input_xksgkf_17:checked:disabled + ._icon_xksgkf_30{
|
|
206
|
+
border-color:rgba(25,25,28,0.1);
|
|
207
|
+
|
|
208
|
+
background:rgba(25,25,28,0.1);
|
|
209
|
+
}
|
|
210
|
+
label:hover ._themeDark_xksgkf_53._rock_xksgkf_47._enabled_xksgkf_42 > ._icon_xksgkf_30,
|
|
211
|
+
._themeDark_xksgkf_53._rock_xksgkf_47._enabled_xksgkf_42:hover > ._icon_xksgkf_30{
|
|
234
212
|
background-color:#474749;
|
|
235
213
|
}
|
|
236
|
-
.
|
|
237
|
-
.
|
|
238
|
-
|
|
214
|
+
._themeDark_xksgkf_53._rock_xksgkf_47._enabled_xksgkf_42 ._input_xksgkf_17:active + ._icon_xksgkf_30,
|
|
215
|
+
._themeDark_xksgkf_53._rock_xksgkf_47._enabled_xksgkf_42 ._input_xksgkf_17:checked + ._icon_xksgkf_30{
|
|
216
|
+
border-color:#FFFFFF;
|
|
217
|
+
|
|
218
|
+
background-color:#19191C;
|
|
239
219
|
}
|
|
240
|
-
.
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
.
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
.
|
|
257
|
-
.
|
|
258
|
-
._themeLight_v4gxqo_52._rock_v4gxqo_53._enabled_v4gxqo_36._sizeS_v4gxqo_70 ._input_v4gxqo_16:active:not(:checked) + ._icon_v4gxqo_28,
|
|
259
|
-
label:hover ._themeLight_v4gxqo_52._rock_v4gxqo_53._enabled_v4gxqo_36._sizeM_v4gxqo_76 > ._icon_v4gxqo_28,
|
|
260
|
-
._themeLight_v4gxqo_52._rock_v4gxqo_53._enabled_v4gxqo_36._sizeM_v4gxqo_76:hover > ._icon_v4gxqo_28,
|
|
261
|
-
._themeLight_v4gxqo_52._rock_v4gxqo_53._enabled_v4gxqo_36._sizeM_v4gxqo_76 ._input_v4gxqo_16:focus[data-focus-method='key'] + ._icon_v4gxqo_28,
|
|
262
|
-
._themeLight_v4gxqo_52._rock_v4gxqo_53._enabled_v4gxqo_36._sizeM_v4gxqo_76 ._input_v4gxqo_16:active:not(:checked) + ._icon_v4gxqo_28{
|
|
220
|
+
._themeDark_xksgkf_53._rock_xksgkf_47 ._input_xksgkf_17:disabled + ._icon_xksgkf_30{
|
|
221
|
+
border-color:rgba(255,255,255,0.2);
|
|
222
|
+
|
|
223
|
+
background-color:#19191C;
|
|
224
|
+
}
|
|
225
|
+
._themeDark_xksgkf_53._rock_xksgkf_47 ._input_xksgkf_17:checked:disabled + ._icon_xksgkf_30{
|
|
226
|
+
border-color:rgba(255,255,255,0.1);
|
|
227
|
+
|
|
228
|
+
background:rgba(255,255,255,0.1);
|
|
229
|
+
}
|
|
230
|
+
label:hover ._themeLight_xksgkf_46._rock_xksgkf_47._enabled_xksgkf_42._sizeS_xksgkf_60 > ._icon_xksgkf_30,
|
|
231
|
+
._themeLight_xksgkf_46._rock_xksgkf_47._enabled_xksgkf_42._sizeS_xksgkf_60:hover > ._icon_xksgkf_30,
|
|
232
|
+
._themeLight_xksgkf_46._rock_xksgkf_47._enabled_xksgkf_42._sizeS_xksgkf_60 ._input_xksgkf_17:focus[data-focus-method='key'] + ._icon_xksgkf_30,
|
|
233
|
+
._themeLight_xksgkf_46._rock_xksgkf_47._enabled_xksgkf_42._sizeS_xksgkf_60 ._input_xksgkf_17:active:not(:checked) + ._icon_xksgkf_30,
|
|
234
|
+
label:hover ._themeLight_xksgkf_46._rock_xksgkf_47._enabled_xksgkf_42._sizeM_xksgkf_66 > ._icon_xksgkf_30,
|
|
235
|
+
._themeLight_xksgkf_46._rock_xksgkf_47._enabled_xksgkf_42._sizeM_xksgkf_66:hover > ._icon_xksgkf_30,
|
|
236
|
+
._themeLight_xksgkf_46._rock_xksgkf_47._enabled_xksgkf_42._sizeM_xksgkf_66 ._input_xksgkf_17:focus[data-focus-method='key'] + ._icon_xksgkf_30,
|
|
237
|
+
._themeLight_xksgkf_46._rock_xksgkf_47._enabled_xksgkf_42._sizeM_xksgkf_66 ._input_xksgkf_17:active:not(:checked) + ._icon_xksgkf_30{
|
|
263
238
|
-webkit-box-shadow:0 0 0 3px rgba(25,25,28,0.1);
|
|
264
239
|
box-shadow:0 0 0 3px rgba(25,25,28,0.1);
|
|
265
240
|
}
|
|
266
|
-
label:hover .
|
|
267
|
-
.
|
|
268
|
-
.
|
|
269
|
-
.
|
|
270
|
-
label:hover .
|
|
271
|
-
.
|
|
272
|
-
.
|
|
273
|
-
.
|
|
241
|
+
label:hover ._themeDark_xksgkf_53._rock_xksgkf_47._enabled_xksgkf_42._sizeS_xksgkf_60 > ._icon_xksgkf_30,
|
|
242
|
+
._themeDark_xksgkf_53._rock_xksgkf_47._enabled_xksgkf_42._sizeS_xksgkf_60:hover > ._icon_xksgkf_30,
|
|
243
|
+
._themeDark_xksgkf_53._rock_xksgkf_47._enabled_xksgkf_42._sizeS_xksgkf_60 ._input_xksgkf_17:focus[data-focus-method='key'] + ._icon_xksgkf_30,
|
|
244
|
+
._themeDark_xksgkf_53._rock_xksgkf_47._enabled_xksgkf_42._sizeS_xksgkf_60 ._input_xksgkf_17:active:not(:checked) + ._icon_xksgkf_30,
|
|
245
|
+
label:hover ._themeDark_xksgkf_53._rock_xksgkf_47._enabled_xksgkf_42._sizeM_xksgkf_66 > ._icon_xksgkf_30,
|
|
246
|
+
._themeDark_xksgkf_53._rock_xksgkf_47._enabled_xksgkf_42._sizeM_xksgkf_66:hover > ._icon_xksgkf_30,
|
|
247
|
+
._themeDark_xksgkf_53._rock_xksgkf_47._enabled_xksgkf_42._sizeM_xksgkf_66 ._input_xksgkf_17:focus[data-focus-method='key'] + ._icon_xksgkf_30,
|
|
248
|
+
._themeDark_xksgkf_53._rock_xksgkf_47._enabled_xksgkf_42._sizeM_xksgkf_66 ._input_xksgkf_17:active:not(:checked) + ._icon_xksgkf_30{
|
|
274
249
|
-webkit-box-shadow:0 0 0 3px rgba(255,255,255,0.1);
|
|
275
250
|
box-shadow:0 0 0 3px rgba(255,255,255,0.1);
|
|
276
251
|
}
|
|
277
|
-
label:hover .
|
|
278
|
-
.
|
|
279
|
-
.
|
|
280
|
-
.
|
|
252
|
+
label:hover ._themeLight_xksgkf_46._rock_xksgkf_47._enabled_xksgkf_42._sizeL_xksgkf_72 > ._icon_xksgkf_30,
|
|
253
|
+
._themeLight_xksgkf_46._rock_xksgkf_47._enabled_xksgkf_42._sizeL_xksgkf_72:hover > ._icon_xksgkf_30,
|
|
254
|
+
._themeLight_xksgkf_46._rock_xksgkf_47._enabled_xksgkf_42._sizeL_xksgkf_72 ._input_xksgkf_17:focus[data-focus-method='key'] + ._icon_xksgkf_30,
|
|
255
|
+
._themeLight_xksgkf_46._rock_xksgkf_47._enabled_xksgkf_42._sizeL_xksgkf_72 ._input_xksgkf_17:active:not(:checked) + ._icon_xksgkf_30{
|
|
281
256
|
-webkit-box-shadow:0 0 0 4px rgba(25,25,28,0.1);
|
|
282
257
|
box-shadow:0 0 0 4px rgba(25,25,28,0.1);
|
|
283
258
|
}
|
|
284
|
-
label:hover .
|
|
285
|
-
.
|
|
286
|
-
.
|
|
287
|
-
.
|
|
259
|
+
label:hover ._themeDark_xksgkf_53._rock_xksgkf_47._enabled_xksgkf_42._sizeL_xksgkf_72 > ._icon_xksgkf_30,
|
|
260
|
+
._themeDark_xksgkf_53._rock_xksgkf_47._enabled_xksgkf_42._sizeL_xksgkf_72:hover > ._icon_xksgkf_30,
|
|
261
|
+
._themeDark_xksgkf_53._rock_xksgkf_47._enabled_xksgkf_42._sizeL_xksgkf_72 ._input_xksgkf_17:focus[data-focus-method='key'] + ._icon_xksgkf_30,
|
|
262
|
+
._themeDark_xksgkf_53._rock_xksgkf_47._enabled_xksgkf_42._sizeL_xksgkf_72 ._input_xksgkf_17:active:not(:checked) + ._icon_xksgkf_30{
|
|
288
263
|
-webkit-box-shadow:0 0 0 4px rgba(255,255,255,0.1);
|
|
289
264
|
box-shadow:0 0 0 4px rgba(255,255,255,0.1);
|
|
290
265
|
}
|
|
@@ -23,4 +23,8 @@ export interface RadioButtonManagerProps {
|
|
|
23
23
|
/** Name of the each radio button in the list */
|
|
24
24
|
name?: string;
|
|
25
25
|
}
|
|
26
|
-
|
|
26
|
+
declare type TRadioButtonManager = React.FC<RadioButtonManagerProps> & {
|
|
27
|
+
idCounter: number;
|
|
28
|
+
};
|
|
29
|
+
export declare const RadioButtonManager: TRadioButtonManager;
|
|
30
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime-corejs3/helpers/esm/slicedToArray";
|
|
2
2
|
import "core-js/modules/es.function.name.js";
|
|
3
|
-
import React, { useState, useCallback } from 'react';
|
|
3
|
+
import React, { useState, useRef, useCallback } from 'react';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
import { useTheme } from '@rescui/ui-contexts';
|
|
6
6
|
import RadioContext from './radio-group-context.js';
|
|
@@ -13,7 +13,7 @@ var RadioButtonManager = function RadioButtonManager(_ref) {
|
|
|
13
13
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
14
14
|
_ref$error = _ref.error,
|
|
15
15
|
error = _ref$error === void 0 ? false : _ref$error,
|
|
16
|
-
|
|
16
|
+
nameFromProps = _ref.name,
|
|
17
17
|
onChange = _ref.onChange,
|
|
18
18
|
_ref$size = _ref.size,
|
|
19
19
|
size = _ref$size === void 0 ? 'm' : _ref$size,
|
|
@@ -21,18 +21,26 @@ var RadioButtonManager = function RadioButtonManager(_ref) {
|
|
|
21
21
|
mode = _ref$mode === void 0 ? 'classic' : _ref$mode,
|
|
22
22
|
themeFromProps = _ref.theme;
|
|
23
23
|
var theme = useTheme(themeFromProps);
|
|
24
|
+
var isControlled = typeof valueFromProps !== 'undefined';
|
|
24
25
|
|
|
25
|
-
var _useState = useState(defaultValue),
|
|
26
|
+
var _useState = useState(isControlled ? valueFromProps : defaultValue),
|
|
26
27
|
_useState2 = _slicedToArray(_useState, 2),
|
|
27
28
|
value = _useState2[0],
|
|
28
|
-
setValue = _useState2[1];
|
|
29
|
+
setValue = _useState2[1]; // set unique id to the component on mount without rerender
|
|
29
30
|
|
|
30
|
-
|
|
31
|
+
|
|
32
|
+
var nameId = useRef(null);
|
|
33
|
+
|
|
34
|
+
if (nameId.current === null) {
|
|
35
|
+
nameId.current = RadioButtonManager.idCounter++;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
var name = nameFromProps !== null && nameFromProps !== void 0 ? nameFromProps : "_placeholder-radio-name-".concat(nameId.current);
|
|
31
39
|
var handleSetValue = useCallback(function (val) {
|
|
32
40
|
setValue(val);
|
|
33
41
|
|
|
34
42
|
if (onChange) {
|
|
35
|
-
onChange(
|
|
43
|
+
onChange(val);
|
|
36
44
|
}
|
|
37
45
|
}, [onChange]);
|
|
38
46
|
return /*#__PURE__*/React.createElement(RadioContext.Provider, {
|
|
@@ -49,6 +57,7 @@ var RadioButtonManager = function RadioButtonManager(_ref) {
|
|
|
49
57
|
}, children);
|
|
50
58
|
};
|
|
51
59
|
|
|
60
|
+
RadioButtonManager.idCounter = 0;
|
|
52
61
|
RadioButtonManager.propTypes = {
|
|
53
62
|
children: PropTypes.node,
|
|
54
63
|
defaultValue: PropTypes.string,
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
var styles = {
|
|
2
|
-
"main": "
|
|
3
|
-
"errorMessage": "
|
|
4
|
-
"rs-reset-letter-spacing": "_rs-reset-letter-
|
|
5
|
-
"input": "
|
|
6
|
-
"icon": "
|
|
7
|
-
"enabled": "
|
|
8
|
-
"themeLight": "
|
|
9
|
-
"classic": "
|
|
10
|
-
"rock": "
|
|
11
|
-
"themeDark": "
|
|
12
|
-
"sizeS": "
|
|
13
|
-
"sizeM": "
|
|
14
|
-
"sizeL": "
|
|
15
|
-
"error": "
|
|
2
|
+
"main": "_main_xksgkf_3",
|
|
3
|
+
"errorMessage": "_errorMessage_xksgkf_9",
|
|
4
|
+
"rs-reset-letter-spacing": "_rs-reset-letter-spacing_xksgkf_1",
|
|
5
|
+
"input": "_input_xksgkf_17",
|
|
6
|
+
"icon": "_icon_xksgkf_30",
|
|
7
|
+
"enabled": "_enabled_xksgkf_42",
|
|
8
|
+
"themeLight": "_themeLight_xksgkf_46",
|
|
9
|
+
"classic": "_classic_xksgkf_46",
|
|
10
|
+
"rock": "_rock_xksgkf_47",
|
|
11
|
+
"themeDark": "_themeDark_xksgkf_53",
|
|
12
|
+
"sizeS": "_sizeS_xksgkf_60",
|
|
13
|
+
"sizeM": "_sizeM_xksgkf_66",
|
|
14
|
+
"sizeL": "_sizeL_xksgkf_72",
|
|
15
|
+
"error": "_error_xksgkf_9"
|
|
16
16
|
};
|
|
17
17
|
export default styles;
|
package/lib/radio-button.js
CHANGED
|
@@ -26,6 +26,7 @@ var RadioButton = /*#__PURE__*/React.forwardRef(function RadioButton(_ref, ref)
|
|
|
26
26
|
tag: 'label',
|
|
27
27
|
disabled: disabled,
|
|
28
28
|
className: className,
|
|
29
|
+
tabIndex: null,
|
|
29
30
|
icon: /*#__PURE__*/React.createElement(RadioButtonControl, _objectSpread({
|
|
30
31
|
ref: ref,
|
|
31
32
|
disabled: disabled,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rescui/radio-button",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.2",
|
|
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.14.0",
|
|
18
|
-
"@rescui/menu": "^0.
|
|
18
|
+
"@rescui/menu": "^0.4.0",
|
|
19
19
|
"classnames": "^2.2.6",
|
|
20
20
|
"core-js": "^3.9.1"
|
|
21
21
|
},
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@rescui/colors": "^0.1.0",
|
|
29
29
|
"@rescui/scripts": "^0.1.4",
|
|
30
|
-
"@rescui/typography": "^0.
|
|
30
|
+
"@rescui/typography": "^0.7.0"
|
|
31
31
|
},
|
|
32
32
|
"scripts": {
|
|
33
33
|
"build": "rescui-scripts build"
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "d31278a5136a7cb38364fc89345e1a7326298c9a"
|
|
36
36
|
}
|