@rescui/radio-button 0.8.4 → 0.8.6
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/warning.js +8 -9
- package/lib/index.css +59 -84
- package/lib/parts/radio-button-control.js +36 -47
- package/lib/parts/radio-button-list.js +21 -36
- package/lib/parts/radio-button-manager.js +25 -34
- package/lib/parts/radio-button.p.module.css.js +19 -19
- package/lib/parts/radio-group-context.js +1 -1
- package/lib/radio-button.js +14 -26
- package/package.json +8 -9
|
@@ -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_ons1cf_4",
|
|
3
|
+
"sizeXS": "_sizeXS_ons1cf_14",
|
|
4
|
+
"sizeS": "_sizeS_ons1cf_18",
|
|
5
|
+
"sizeM": "_sizeM_ons1cf_22",
|
|
6
|
+
"sizeL": "_sizeL_ons1cf_26",
|
|
7
|
+
"light": "_light_ons1cf_30",
|
|
8
|
+
"dark": "_dark_ons1cf_34"
|
|
9
9
|
};
|
|
10
10
|
export { styles as default };
|
package/lib/_virtual/warning.js
CHANGED
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
import _extends from '@babel/runtime-corejs3/helpers/esm/extends';
|
|
2
|
-
import _objectWithoutProperties from '@babel/runtime-corejs3/helpers/esm/objectWithoutProperties';
|
|
3
2
|
import React from 'react';
|
|
4
3
|
import PropTypes from 'prop-types';
|
|
5
4
|
import cn from 'classnames';
|
|
6
5
|
import styles from './index.css.js';
|
|
7
|
-
|
|
8
|
-
var sizeStyles = {
|
|
6
|
+
const sizeStyles = {
|
|
9
7
|
"xs": styles.sizeXS,
|
|
10
8
|
"s": styles.sizeS,
|
|
11
9
|
"m": styles.sizeM,
|
|
12
10
|
"l": styles.sizeL
|
|
13
11
|
};
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
12
|
+
const WarningIcon = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
13
|
+
let {
|
|
14
|
+
theme,
|
|
15
|
+
size,
|
|
16
|
+
className,
|
|
17
|
+
...props
|
|
18
|
+
} = _ref;
|
|
20
19
|
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
21
20
|
viewBox: "0 0 24 24"
|
|
22
21
|
}, props, {
|
package/lib/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.
|
|
1
|
+
._icon_ons1cf_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_ons1cf_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_ons1cf_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,60 +25,48 @@
|
|
|
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_ons1cf_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_ons1cf_14{
|
|
36
36
|
--_rs-icons-height:16px;
|
|
37
37
|
}
|
|
38
|
-
.
|
|
38
|
+
._sizeS_ons1cf_18{
|
|
39
39
|
--_rs-icons-height:20px;
|
|
40
40
|
}
|
|
41
|
-
.
|
|
41
|
+
._sizeM_ons1cf_22{
|
|
42
42
|
--_rs-icons-height:24px;
|
|
43
43
|
}
|
|
44
|
-
.
|
|
44
|
+
._sizeL_ons1cf_26{
|
|
45
45
|
--_rs-icons-height:28px;
|
|
46
46
|
}
|
|
47
|
-
.
|
|
47
|
+
._light_ons1cf_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_ons1cf_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
|
}
|
|
55
|
-
@-webkit-keyframes rs-icon-rotate{
|
|
56
|
-
from{
|
|
57
|
-
-webkit-transform:rotate(0deg);
|
|
58
|
-
transform:rotate(0deg);
|
|
59
|
-
}
|
|
60
|
-
to{
|
|
61
|
-
-webkit-transform:rotate(360deg);
|
|
62
|
-
transform:rotate(360deg);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
55
|
@keyframes rs-icon-rotate{
|
|
66
56
|
from{
|
|
67
|
-
|
|
68
|
-
transform:rotate(0deg);
|
|
57
|
+
transform:rotate(0deg);
|
|
69
58
|
}
|
|
70
59
|
to{
|
|
71
|
-
|
|
72
|
-
transform:rotate(360deg);
|
|
60
|
+
transform:rotate(360deg);
|
|
73
61
|
}
|
|
74
62
|
}
|
|
75
|
-
.
|
|
63
|
+
._themeLight_1ru8ryp_8{
|
|
76
64
|
--rs-theme-dark:0;
|
|
77
65
|
}
|
|
78
|
-
.
|
|
66
|
+
._themeDark_1ru8ryp_11{
|
|
79
67
|
--rs-theme-dark:1;
|
|
80
68
|
}
|
|
81
|
-
.
|
|
69
|
+
._container_1ru8ryp_15{
|
|
82
70
|
--_rs-theme-dark:var(
|
|
83
71
|
--_rs-internal-force-theme-dark-consult-rescui-before-using,
|
|
84
72
|
var(--rs-theme-dark, 0)
|
|
@@ -88,7 +76,7 @@
|
|
|
88
76
|
--_rs-theme-light-coefficient:calc(1 - var(--_rs-theme-dark-coefficient));
|
|
89
77
|
}
|
|
90
78
|
@supports (color: color-mix(in srgb, #fff 50%, #000 50%)){
|
|
91
|
-
.
|
|
79
|
+
._container_1ru8ryp_15{
|
|
92
80
|
--_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)));
|
|
93
81
|
--_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)));
|
|
94
82
|
--_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)));
|
|
@@ -97,7 +85,7 @@
|
|
|
97
85
|
}
|
|
98
86
|
}
|
|
99
87
|
@supports not (color: color-mix(in srgb, #fff 50%, #000 50%)){
|
|
100
|
-
.
|
|
88
|
+
._container_1ru8ryp_15{
|
|
101
89
|
--_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);
|
|
102
90
|
--_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));
|
|
103
91
|
--_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));
|
|
@@ -105,7 +93,7 @@
|
|
|
105
93
|
--_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));
|
|
106
94
|
}
|
|
107
95
|
}
|
|
108
|
-
.
|
|
96
|
+
._listSizeS_1ru8ryp_20 [data-rs-internal='radio-button-list__error-message']{
|
|
109
97
|
--_rs-typography-letter-spacing:normal;
|
|
110
98
|
--_rs-typography-text-transform:initial;
|
|
111
99
|
--_rs-typography-font-variant-numeric:initial;
|
|
@@ -136,10 +124,10 @@
|
|
|
136
124
|
--_rs-typography-link-external-standalone-border-offset-from-text-base:1.02em;
|
|
137
125
|
--_rs-typography-link-border-bottom-width-from-text:2px;
|
|
138
126
|
}
|
|
139
|
-
.
|
|
127
|
+
._listSizeS_1ru8ryp_20 [data-rs-internal='radio-button-list__error-icon']:not(html){
|
|
140
128
|
--_rs-icons-height:20px;
|
|
141
129
|
}
|
|
142
|
-
.
|
|
130
|
+
._listSizeM_1ru8ryp_23 [data-rs-internal='radio-button-list__error-message']{
|
|
143
131
|
--_rs-typography-letter-spacing:normal;
|
|
144
132
|
--_rs-typography-text-transform:initial;
|
|
145
133
|
--_rs-typography-font-variant-numeric:initial;
|
|
@@ -170,10 +158,10 @@
|
|
|
170
158
|
--_rs-typography-link-external-standalone-border-offset-from-text-base:1.02em;
|
|
171
159
|
--_rs-typography-link-border-bottom-width-from-text:2px;
|
|
172
160
|
}
|
|
173
|
-
.
|
|
161
|
+
._listSizeM_1ru8ryp_23 [data-rs-internal='radio-button-list__error-icon']:not(html){
|
|
174
162
|
--_rs-icons-height:20px;
|
|
175
163
|
}
|
|
176
|
-
.
|
|
164
|
+
._listSizeL_1ru8ryp_26 [data-rs-internal='radio-button-list__error-message']{
|
|
177
165
|
--_rs-typography-letter-spacing:normal;
|
|
178
166
|
--_rs-typography-text-transform:initial;
|
|
179
167
|
--_rs-typography-font-variant-numeric:initial;
|
|
@@ -204,35 +192,35 @@
|
|
|
204
192
|
--_rs-typography-link-external-standalone-border-offset-from-text-base:1.02em;
|
|
205
193
|
--_rs-typography-link-border-bottom-width-from-text:2px;
|
|
206
194
|
}
|
|
207
|
-
.
|
|
195
|
+
._listSizeL_1ru8ryp_26 [data-rs-internal='radio-button-list__error-icon']:not(html){
|
|
208
196
|
--_rs-icons-height:24px;
|
|
209
197
|
}
|
|
210
|
-
.
|
|
198
|
+
._sizeS_1ru8ryp_30{
|
|
211
199
|
--_rs-radio-button-size:20px;
|
|
212
200
|
--_rs-radio-button-box-shadow-size:3px;
|
|
213
201
|
--_rs-radio-button-active-icon-border-width:5px;
|
|
214
202
|
}
|
|
215
|
-
.
|
|
203
|
+
._sizeM_1ru8ryp_33{
|
|
216
204
|
--_rs-radio-button-size:24px;
|
|
217
205
|
--_rs-radio-button-box-shadow-size:3px;
|
|
218
206
|
--_rs-radio-button-active-icon-border-width:6px;
|
|
219
207
|
}
|
|
220
|
-
.
|
|
208
|
+
._sizeL_1ru8ryp_36{
|
|
221
209
|
--_rs-radio-button-size:28px;
|
|
222
210
|
--_rs-radio-button-box-shadow-size:4px;
|
|
223
211
|
--_rs-radio-button-active-icon-border-width:6px;
|
|
224
212
|
}
|
|
225
|
-
.
|
|
213
|
+
._classic_1ru8ryp_40{
|
|
226
214
|
--_rs-radio-button-active-icon-border-color:var(--_rs-color-primary);
|
|
227
215
|
--_rs-radio-button-active-icon-background-color:#FFFFFF;
|
|
228
216
|
--_rs-radio-button-active-icon-hover-box-shadow-color:var(--_rs-color-primary-t-fog);
|
|
229
217
|
}
|
|
230
|
-
.
|
|
218
|
+
._rock_1ru8ryp_43{
|
|
231
219
|
--_rs-radio-button-active-icon-border-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));
|
|
232
220
|
--_rs-radio-button-active-icon-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));
|
|
233
221
|
--_rs-radio-button-active-icon-hover-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.1);
|
|
234
222
|
}
|
|
235
|
-
.
|
|
223
|
+
._main_1ru8ryp_47{
|
|
236
224
|
--_rs-theme-dark:var(
|
|
237
225
|
--_rs-internal-force-theme-dark-consult-rescui-before-using,
|
|
238
226
|
var(--rs-theme-dark, 0)
|
|
@@ -242,7 +230,7 @@
|
|
|
242
230
|
--_rs-theme-light-coefficient:calc(1 - var(--_rs-theme-dark-coefficient));
|
|
243
231
|
}
|
|
244
232
|
@supports (color: color-mix(in srgb, #fff 50%, #000 50%)){
|
|
245
|
-
.
|
|
233
|
+
._main_1ru8ryp_47{
|
|
246
234
|
--_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)));
|
|
247
235
|
--_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)));
|
|
248
236
|
--_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)));
|
|
@@ -251,7 +239,7 @@
|
|
|
251
239
|
}
|
|
252
240
|
}
|
|
253
241
|
@supports not (color: color-mix(in srgb, #fff 50%, #000 50%)){
|
|
254
|
-
.
|
|
242
|
+
._main_1ru8ryp_47{
|
|
255
243
|
--_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);
|
|
256
244
|
--_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));
|
|
257
245
|
--_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));
|
|
@@ -259,7 +247,7 @@
|
|
|
259
247
|
--_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));
|
|
260
248
|
}
|
|
261
249
|
}
|
|
262
|
-
.
|
|
250
|
+
._main_1ru8ryp_47 {
|
|
263
251
|
|
|
264
252
|
display:inline-block;
|
|
265
253
|
|
|
@@ -268,7 +256,7 @@
|
|
|
268
256
|
|
|
269
257
|
vertical-align:middle;
|
|
270
258
|
}
|
|
271
|
-
.
|
|
259
|
+
._errorMessage_1ru8ryp_59{
|
|
272
260
|
letter-spacing:var(
|
|
273
261
|
--rs-text-base-letter-spacing,
|
|
274
262
|
var(--_rs-typography-letter-spacing)
|
|
@@ -279,32 +267,23 @@
|
|
|
279
267
|
font-weight:var(--_rs-typography-font-weight);
|
|
280
268
|
line-height:var(--_rs-typography-line-height);
|
|
281
269
|
font-variant-numeric:var(--_rs-typography-font-variant-numeric);
|
|
282
|
-
-webkit-font-feature-settings:'kern', 'liga', 'calt';
|
|
283
270
|
font-feature-settings:'kern', 'liga', 'calt';
|
|
284
271
|
|
|
285
|
-
display:-webkit-box;
|
|
286
|
-
|
|
287
|
-
display:-ms-flexbox;
|
|
288
|
-
|
|
289
272
|
display:flex;
|
|
290
|
-
|
|
291
|
-
flex-wrap:nowrap;
|
|
273
|
+
flex-wrap:nowrap;
|
|
292
274
|
|
|
293
275
|
margin-bottom:8px;
|
|
294
276
|
|
|
295
277
|
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));
|
|
296
|
-
-
|
|
297
|
-
|
|
298
|
-
column-gap:8px;
|
|
278
|
+
-moz-column-gap:8px;
|
|
279
|
+
column-gap:8px;
|
|
299
280
|
}
|
|
300
|
-
.
|
|
301
|
-
|
|
302
|
-
-ms-flex:0 0 auto;
|
|
303
|
-
flex:0 0 auto;
|
|
281
|
+
._errorIcon_1ru8ryp_71{
|
|
282
|
+
flex:0 0 auto;
|
|
304
283
|
|
|
305
284
|
color:#F45C4A;
|
|
306
285
|
}
|
|
307
|
-
.
|
|
286
|
+
._input_1ru8ryp_77{
|
|
308
287
|
position:absolute;
|
|
309
288
|
-webkit-appearance:none;
|
|
310
289
|
-moz-appearance:none;
|
|
@@ -318,14 +297,12 @@
|
|
|
318
297
|
|
|
319
298
|
border:0;
|
|
320
299
|
}
|
|
321
|
-
.
|
|
300
|
+
._icon_1ru8ryp_90{
|
|
322
301
|
position:relative;
|
|
323
302
|
|
|
324
303
|
display:inline-block;
|
|
325
304
|
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
box-sizing:border-box;
|
|
305
|
+
box-sizing:border-box;
|
|
329
306
|
width:calc(var(--_rs-radio-button-size) - var(--_rs-radio-button-box-shadow-size)*2);
|
|
330
307
|
height:calc(var(--_rs-radio-button-size) - var(--_rs-radio-button-box-shadow-size)*2);
|
|
331
308
|
margin:var(--_rs-radio-button-box-shadow-size);
|
|
@@ -337,16 +314,16 @@
|
|
|
337
314
|
|
|
338
315
|
background-color:rgb(calc(255 - var(--_rs-theme-dark-coefficient, 0)*207), calc(255 - var(--_rs-theme-dark-coefficient, 0)*207), calc(255 - var(--_rs-theme-dark-coefficient, 0)*204));
|
|
339
316
|
}
|
|
340
|
-
.
|
|
317
|
+
._enabled_1ru8ryp_111 ._icon_1ru8ryp_90{
|
|
341
318
|
cursor:pointer;
|
|
342
319
|
}
|
|
343
|
-
.
|
|
344
|
-
label:hover .
|
|
320
|
+
._enabled_1ru8ryp_111:hover > ._icon_1ru8ryp_90,
|
|
321
|
+
label:hover ._enabled_1ru8ryp_111 > ._icon_1ru8ryp_90{
|
|
345
322
|
background-color:rgb(calc(255 - var(--_rs-theme-dark-coefficient, 0)*184), calc(255 - var(--_rs-theme-dark-coefficient, 0)*184), calc(255 - var(--_rs-theme-dark-coefficient, 0)*182));
|
|
346
323
|
}
|
|
347
|
-
.
|
|
348
|
-
.
|
|
349
|
-
.
|
|
324
|
+
._disabled_1ru8ryp_120 ._icon_1ru8ryp_90._icon_1ru8ryp_90,
|
|
325
|
+
._input_1ru8ryp_77:disabled + ._icon_1ru8ryp_90._icon_1ru8ryp_90,
|
|
326
|
+
._input_1ru8ryp_77:checked:disabled + ._icon_1ru8ryp_90{
|
|
350
327
|
border-color:rgb(calc(186 - var(--_rs-theme-dark-coefficient, 0)*92), calc(186 - var(--_rs-theme-dark-coefficient, 0)*92), calc(187 - var(--_rs-theme-dark-coefficient, 0)*91));
|
|
351
328
|
|
|
352
329
|
cursor:not-allowed;
|
|
@@ -354,27 +331,25 @@
|
|
|
354
331
|
|
|
355
332
|
background-color:rgb(calc(244 - var(--_rs-theme-dark-coefficient, 0)*196), calc(244 - var(--_rs-theme-dark-coefficient, 0)*196), calc(244 - var(--_rs-theme-dark-coefficient, 0)*193));
|
|
356
333
|
}
|
|
357
|
-
.
|
|
358
|
-
.
|
|
334
|
+
._enabled_1ru8ryp_111 ._input_1ru8ryp_77:active + ._icon_1ru8ryp_90,
|
|
335
|
+
._enabled_1ru8ryp_111 ._input_1ru8ryp_77:checked + ._icon_1ru8ryp_90{
|
|
359
336
|
border-color:var(--_rs-radio-button-active-icon-border-color);
|
|
360
337
|
|
|
361
338
|
background-color:var(--_rs-radio-button-active-icon-background-color);
|
|
362
339
|
}
|
|
363
|
-
.
|
|
364
|
-
.
|
|
365
|
-
.
|
|
340
|
+
._enabled_1ru8ryp_111 ._input_1ru8ryp_77:active + ._icon_1ru8ryp_90,
|
|
341
|
+
._enabled_1ru8ryp_111 ._input_1ru8ryp_77:checked + ._icon_1ru8ryp_90,
|
|
342
|
+
._main_1ru8ryp_47 ._input_1ru8ryp_77:checked:disabled + ._icon_1ru8ryp_90{
|
|
366
343
|
border-width:var(--_rs-radio-button-active-icon-border-width);
|
|
367
344
|
}
|
|
368
|
-
.
|
|
345
|
+
._error_1ru8ryp_59 ._icon_1ru8ryp_90._icon_1ru8ryp_90._icon_1ru8ryp_90{
|
|
369
346
|
border-color:#F45C4A;
|
|
370
347
|
}
|
|
371
|
-
.
|
|
372
|
-
label:hover .
|
|
373
|
-
.
|
|
374
|
-
|
|
375
|
-
box-shadow:0 0 0 var(--_rs-radio-button-box-shadow-size) var(--_rs-radio-button-active-icon-hover-box-shadow-color);
|
|
348
|
+
._enabled_1ru8ryp_111:hover > ._icon_1ru8ryp_90._icon_1ru8ryp_90,
|
|
349
|
+
label:hover ._enabled_1ru8ryp_111 > ._icon_1ru8ryp_90._icon_1ru8ryp_90,
|
|
350
|
+
._enabled_1ru8ryp_111 ._input_1ru8ryp_77:active:not(:checked) + ._icon_1ru8ryp_90{
|
|
351
|
+
box-shadow:0 0 0 var(--_rs-radio-button-box-shadow-size) var(--_rs-radio-button-active-icon-hover-box-shadow-color);
|
|
376
352
|
}
|
|
377
|
-
.
|
|
378
|
-
|
|
379
|
-
box-shadow:0 0 0 1px 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)), 0 0 0 var(--_rs-radio-button-box-shadow-size) var(--_rs-color-primary-t-dim);
|
|
353
|
+
._enabled_1ru8ryp_111 ._input_1ru8ryp_77:focus[data-focus-method='key'] + ._icon_1ru8ryp_90{
|
|
354
|
+
box-shadow:0 0 0 1px 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)), 0 0 0 var(--_rs-radio-button-box-shadow-size) var(--_rs-color-primary-t-dim);
|
|
380
355
|
}
|
|
@@ -1,76 +1,65 @@
|
|
|
1
|
-
import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
|
|
2
|
-
import _Object$getOwnPropertySymbols from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols";
|
|
3
|
-
import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
|
|
4
|
-
import _Object$getOwnPropertyDescriptor from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor";
|
|
5
|
-
import _Object$getOwnPropertyDescriptors from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors";
|
|
6
|
-
import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
|
|
7
|
-
import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/esm/objectWithoutProperties";
|
|
8
|
-
var _excluded = ["children", "disabled", "onChange", "checked", "value", "className", "error", "notUseLabelTag"];
|
|
9
|
-
|
|
10
|
-
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
11
|
-
|
|
12
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? Object.defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
13
|
-
|
|
14
|
-
import "core-js/modules/es.function.name.js";
|
|
15
|
-
import "core-js/modules/es.object.to-string.js";
|
|
16
|
-
import "core-js/modules/web.dom-collections.for-each.js";
|
|
17
1
|
import React from 'react';
|
|
18
2
|
import PropTypes from 'prop-types';
|
|
19
3
|
import cn from 'classnames';
|
|
20
4
|
import RadioContext from './radio-group-context.js';
|
|
21
5
|
import styles from './radio-button.p.module.css.js';
|
|
22
|
-
|
|
6
|
+
const THEME_STYLES = {
|
|
23
7
|
light: styles.themeLight,
|
|
24
8
|
dark: styles.themeDark
|
|
25
9
|
};
|
|
26
|
-
|
|
10
|
+
const SIZE_STYLES = {
|
|
27
11
|
s: styles.sizeS,
|
|
28
12
|
m: styles.sizeM,
|
|
29
13
|
l: styles.sizeL
|
|
30
14
|
};
|
|
31
|
-
|
|
15
|
+
const MODE_STYLES = {
|
|
32
16
|
classic: styles.classic,
|
|
33
17
|
rock: styles.rock
|
|
34
18
|
};
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
19
|
+
const RadioButtonControl = /*#__PURE__*/React.forwardRef(function RadioButtonControl(props, ref) {
|
|
20
|
+
const {
|
|
21
|
+
children,
|
|
22
|
+
disabled: disabledFromProps,
|
|
23
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore, react/prop-types
|
|
24
|
+
// @ts-ignore
|
|
25
|
+
onChange,
|
|
26
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore, react/prop-types
|
|
27
|
+
// @ts-ignore
|
|
28
|
+
checked,
|
|
29
|
+
value: ownValue,
|
|
30
|
+
className,
|
|
31
|
+
error,
|
|
32
|
+
notUseLabelTag = false,
|
|
33
|
+
...restProps
|
|
34
|
+
} = props;
|
|
35
|
+
const RootTag = notUseLabelTag ? 'span' : 'label';
|
|
36
|
+
return /*#__PURE__*/React.createElement(RadioContext.Consumer, null, _ref => {
|
|
37
|
+
let {
|
|
38
|
+
value: groupValue,
|
|
39
|
+
theme,
|
|
40
|
+
setValue,
|
|
41
|
+
name,
|
|
42
|
+
error: errorFromContext,
|
|
43
|
+
size,
|
|
44
|
+
mode,
|
|
45
|
+
disabled
|
|
46
|
+
} = _ref;
|
|
57
47
|
return /*#__PURE__*/React.createElement(RootTag, {
|
|
58
48
|
className: cn(styles.main, THEME_STYLES[theme], SIZE_STYLES[size], MODE_STYLES[mode], (error || errorFromContext) && styles.error, disabled || disabledFromProps ? styles.disabled : styles.enabled, className),
|
|
59
49
|
"data-test": 'radio-button-control-root',
|
|
60
50
|
"data-rs-internal": "radio-button__control"
|
|
61
|
-
}, /*#__PURE__*/React.createElement("input",
|
|
51
|
+
}, /*#__PURE__*/React.createElement("input", {
|
|
62
52
|
className: styles.input,
|
|
63
53
|
type: "radio",
|
|
64
|
-
onChange:
|
|
65
|
-
return setValue(ownValue);
|
|
66
|
-
},
|
|
54
|
+
onChange: () => setValue(ownValue),
|
|
67
55
|
disabled: disabled || disabledFromProps,
|
|
68
56
|
value: ownValue,
|
|
69
57
|
name: name,
|
|
70
58
|
checked: groupValue === ownValue,
|
|
71
59
|
ref: ref,
|
|
72
|
-
"data-test": 'radio-button-control'
|
|
73
|
-
|
|
60
|
+
"data-test": 'radio-button-control',
|
|
61
|
+
...restProps
|
|
62
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
74
63
|
className: cn(styles.icon, (error || errorFromContext) && styles.iconError)
|
|
75
64
|
}));
|
|
76
65
|
});
|
|
@@ -1,18 +1,3 @@
|
|
|
1
|
-
import "core-js/modules/es.object.to-string.js";
|
|
2
|
-
import "core-js/modules/web.dom-collections.for-each.js";
|
|
3
|
-
import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
|
|
4
|
-
import _Object$getOwnPropertySymbols from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols";
|
|
5
|
-
import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
|
|
6
|
-
import _Object$getOwnPropertyDescriptor from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor";
|
|
7
|
-
import _Object$getOwnPropertyDescriptors from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors";
|
|
8
|
-
import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
|
|
9
|
-
import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/esm/objectWithoutProperties";
|
|
10
|
-
var _excluded = ["children", "mode", "disabled", "size", "theme", "error", "className", "style"];
|
|
11
|
-
|
|
12
|
-
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
13
|
-
|
|
14
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? Object.defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
15
|
-
|
|
16
1
|
import React from 'react';
|
|
17
2
|
import PropTypes from 'prop-types';
|
|
18
3
|
import cn from 'classnames';
|
|
@@ -21,36 +6,36 @@ import { useThemeWithUndefined } from '@rescui/ui-contexts';
|
|
|
21
6
|
import WarningIcon from '../_virtual/warning.js';
|
|
22
7
|
import { RadioButtonManager } from './radio-button-manager.js';
|
|
23
8
|
import styles from './radio-button.p.module.css.js';
|
|
24
|
-
|
|
9
|
+
const THEME_STYLES = {
|
|
25
10
|
light: styles.themeLight,
|
|
26
11
|
dark: styles.themeDark
|
|
27
12
|
};
|
|
28
|
-
|
|
13
|
+
const SIZE_STYLES = {
|
|
29
14
|
s: styles.listSizeS,
|
|
30
15
|
m: styles.listSizeM,
|
|
31
16
|
l: styles.listSizeL
|
|
32
17
|
};
|
|
33
18
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
return /*#__PURE__*/React.createElement(RadioButtonManager, _objectSpread({
|
|
19
|
+
const RadioButtonList = _ref => {
|
|
20
|
+
let {
|
|
21
|
+
children,
|
|
22
|
+
mode = 'classic',
|
|
23
|
+
disabled,
|
|
24
|
+
size = 'm',
|
|
25
|
+
theme: themeFromProps,
|
|
26
|
+
error,
|
|
27
|
+
className,
|
|
28
|
+
style,
|
|
29
|
+
...restProps
|
|
30
|
+
} = _ref;
|
|
31
|
+
const theme = useThemeWithUndefined(themeFromProps);
|
|
32
|
+
return /*#__PURE__*/React.createElement(RadioButtonManager, {
|
|
49
33
|
disabled: disabled,
|
|
50
34
|
size: size,
|
|
51
35
|
mode: mode,
|
|
52
|
-
theme: theme
|
|
53
|
-
|
|
36
|
+
theme: theme,
|
|
37
|
+
...restProps
|
|
38
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
54
39
|
className: cn(className, styles.container, THEME_STYLES[theme], SIZE_STYLES[size]),
|
|
55
40
|
style: style
|
|
56
41
|
}, error && typeof error !== 'boolean' && /*#__PURE__*/React.createElement("div", {
|
|
@@ -70,8 +55,8 @@ var RadioButtonList = function RadioButtonList(_ref) {
|
|
|
70
55
|
}, children)));
|
|
71
56
|
};
|
|
72
57
|
|
|
73
|
-
RadioButtonList.propTypes =
|
|
58
|
+
RadioButtonList.propTypes = { ...RadioButtonManager.propTypes,
|
|
74
59
|
error: PropTypes.oneOfType([PropTypes.bool, PropTypes.node]),
|
|
75
60
|
style: PropTypes.object
|
|
76
|
-
}
|
|
61
|
+
};
|
|
77
62
|
export { RadioButtonList };
|
|
@@ -1,42 +1,33 @@
|
|
|
1
|
-
import _slicedToArray from "@babel/runtime-corejs3/helpers/esm/slicedToArray";
|
|
2
|
-
import "core-js/modules/es.function.name.js";
|
|
3
1
|
import React, { useState, useRef, useCallback } from 'react';
|
|
4
2
|
import PropTypes from 'prop-types';
|
|
5
3
|
import { useThemeWithUndefined } from '@rescui/ui-contexts';
|
|
6
4
|
import RadioContext from './radio-group-context.js';
|
|
7
5
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
var isControlled = typeof valueFromProps !== 'undefined';
|
|
6
|
+
const RadioButtonManager = _ref => {
|
|
7
|
+
let {
|
|
8
|
+
defaultValue,
|
|
9
|
+
children,
|
|
10
|
+
value: valueFromProps,
|
|
11
|
+
disabled = false,
|
|
12
|
+
error = false,
|
|
13
|
+
name: nameFromProps,
|
|
14
|
+
onChange,
|
|
15
|
+
size = 'm',
|
|
16
|
+
mode = 'classic',
|
|
17
|
+
theme: themeFromProps
|
|
18
|
+
} = _ref;
|
|
19
|
+
const theme = useThemeWithUndefined(themeFromProps);
|
|
20
|
+
const isControlled = typeof valueFromProps !== 'undefined';
|
|
21
|
+
const [value, setValue] = useState(isControlled ? valueFromProps : defaultValue); // set unique id to the component on mount without rerender
|
|
25
22
|
|
|
26
|
-
|
|
27
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
28
|
-
value = _useState2[0],
|
|
29
|
-
setValue = _useState2[1]; // set unique id to the component on mount without rerender
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
var nameId = useRef(null);
|
|
23
|
+
const nameId = useRef(null);
|
|
33
24
|
|
|
34
25
|
if (nameId.current === null) {
|
|
35
26
|
nameId.current = RadioButtonManager.idCounter++;
|
|
36
27
|
}
|
|
37
28
|
|
|
38
|
-
|
|
39
|
-
|
|
29
|
+
const name = nameFromProps ?? `_placeholder-radio-name-${nameId.current}`;
|
|
30
|
+
const handleSetValue = useCallback(val => {
|
|
40
31
|
setValue(val);
|
|
41
32
|
|
|
42
33
|
if (onChange) {
|
|
@@ -45,12 +36,12 @@ var RadioButtonManager = function RadioButtonManager(_ref) {
|
|
|
45
36
|
}, [onChange]);
|
|
46
37
|
return /*#__PURE__*/React.createElement(RadioContext.Provider, {
|
|
47
38
|
value: {
|
|
48
|
-
error
|
|
49
|
-
theme
|
|
50
|
-
size
|
|
51
|
-
mode
|
|
52
|
-
disabled
|
|
53
|
-
name
|
|
39
|
+
error,
|
|
40
|
+
theme,
|
|
41
|
+
size,
|
|
42
|
+
mode,
|
|
43
|
+
disabled,
|
|
44
|
+
name,
|
|
54
45
|
setValue: handleSetValue,
|
|
55
46
|
value: isControlled ? valueFromProps : value
|
|
56
47
|
}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
var styles = {
|
|
2
|
-
"themeLight": "
|
|
3
|
-
"themeDark": "
|
|
4
|
-
"container": "
|
|
5
|
-
"listSizeS": "
|
|
6
|
-
"listSizeM": "
|
|
7
|
-
"listSizeL": "
|
|
8
|
-
"sizeS": "
|
|
9
|
-
"sizeM": "
|
|
10
|
-
"sizeL": "
|
|
11
|
-
"classic": "
|
|
12
|
-
"rock": "
|
|
13
|
-
"main": "
|
|
14
|
-
"errorMessage": "
|
|
15
|
-
"errorIcon": "
|
|
16
|
-
"input": "
|
|
17
|
-
"icon": "
|
|
18
|
-
"enabled": "
|
|
19
|
-
"disabled": "
|
|
20
|
-
"error": "
|
|
2
|
+
"themeLight": "_themeLight_1ru8ryp_8",
|
|
3
|
+
"themeDark": "_themeDark_1ru8ryp_11",
|
|
4
|
+
"container": "_container_1ru8ryp_15",
|
|
5
|
+
"listSizeS": "_listSizeS_1ru8ryp_20",
|
|
6
|
+
"listSizeM": "_listSizeM_1ru8ryp_23",
|
|
7
|
+
"listSizeL": "_listSizeL_1ru8ryp_26",
|
|
8
|
+
"sizeS": "_sizeS_1ru8ryp_30",
|
|
9
|
+
"sizeM": "_sizeM_1ru8ryp_33",
|
|
10
|
+
"sizeL": "_sizeL_1ru8ryp_36",
|
|
11
|
+
"classic": "_classic_1ru8ryp_40",
|
|
12
|
+
"rock": "_rock_1ru8ryp_43",
|
|
13
|
+
"main": "_main_1ru8ryp_47",
|
|
14
|
+
"errorMessage": "_errorMessage_1ru8ryp_59",
|
|
15
|
+
"errorIcon": "_errorIcon_1ru8ryp_71",
|
|
16
|
+
"input": "_input_1ru8ryp_77",
|
|
17
|
+
"icon": "_icon_1ru8ryp_90",
|
|
18
|
+
"enabled": "_enabled_1ru8ryp_111",
|
|
19
|
+
"disabled": "_disabled_1ru8ryp_120",
|
|
20
|
+
"error": "_error_1ru8ryp_59"
|
|
21
21
|
};
|
|
22
22
|
export { styles as default };
|
package/lib/radio-button.js
CHANGED
|
@@ -1,42 +1,30 @@
|
|
|
1
|
-
import "core-js/modules/es.object.to-string.js";
|
|
2
|
-
import "core-js/modules/web.dom-collections.for-each.js";
|
|
3
|
-
import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
|
|
4
|
-
import _Object$getOwnPropertySymbols from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols";
|
|
5
|
-
import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
|
|
6
|
-
import _Object$getOwnPropertyDescriptor from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor";
|
|
7
|
-
import _Object$getOwnPropertyDescriptors from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors";
|
|
8
|
-
import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
|
|
9
|
-
import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/esm/objectWithoutProperties";
|
|
10
|
-
var _excluded = ["children", "className", "disabled"];
|
|
11
|
-
|
|
12
|
-
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
13
|
-
|
|
14
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? Object.defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
15
|
-
|
|
16
1
|
import React from 'react';
|
|
17
2
|
import PropTypes from 'prop-types';
|
|
18
3
|
import { MenuItem } from '@rescui/menu';
|
|
19
4
|
import { RadioButtonControl } from './parts/radio-button-control.js';
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
5
|
+
const RadioButton = /*#__PURE__*/React.forwardRef(function RadioButton(_ref, ref) {
|
|
6
|
+
let {
|
|
7
|
+
children,
|
|
8
|
+
className,
|
|
9
|
+
disabled,
|
|
10
|
+
...restProps
|
|
11
|
+
} = _ref;
|
|
26
12
|
return /*#__PURE__*/React.createElement(MenuItem, {
|
|
27
13
|
tag: 'label',
|
|
28
14
|
disabled: disabled,
|
|
29
15
|
className: className,
|
|
30
16
|
tabIndex: null,
|
|
31
|
-
icon: /*#__PURE__*/React.createElement(RadioButtonControl,
|
|
17
|
+
icon: /*#__PURE__*/React.createElement(RadioButtonControl, {
|
|
32
18
|
ref: ref,
|
|
33
19
|
disabled: disabled,
|
|
34
|
-
notUseLabelTag: true
|
|
35
|
-
|
|
20
|
+
notUseLabelTag: true,
|
|
21
|
+
...restProps
|
|
22
|
+
})
|
|
36
23
|
}, children);
|
|
37
24
|
});
|
|
38
|
-
RadioButton.propTypes =
|
|
25
|
+
RadioButton.propTypes = { ...RadioButtonControl.propTypes,
|
|
26
|
+
|
|
39
27
|
/** Node or text to show near the input */
|
|
40
28
|
children: PropTypes.node
|
|
41
|
-
}
|
|
29
|
+
};
|
|
42
30
|
export { RadioButton, RadioButton as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rescui/radio-button",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.6",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "JetBrains",
|
|
@@ -14,10 +14,9 @@
|
|
|
14
14
|
"access": "public"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@babel/runtime-corejs3": "^7.
|
|
18
|
-
"@rescui/menu": "^0.10.
|
|
19
|
-
"classnames": "^2.2.6"
|
|
20
|
-
"core-js": "^3.9.1"
|
|
17
|
+
"@babel/runtime-corejs3": "^7.26.0",
|
|
18
|
+
"@rescui/menu": "^0.10.10",
|
|
19
|
+
"classnames": "^2.2.6"
|
|
21
20
|
},
|
|
22
21
|
"peerDependencies": {
|
|
23
22
|
"@rescui/ui-contexts": "^0.5.0",
|
|
@@ -25,14 +24,14 @@
|
|
|
25
24
|
"react": ">=16.8.0 <19"
|
|
26
25
|
},
|
|
27
26
|
"devDependencies": {
|
|
28
|
-
"@rescui/colors": "^0.2.
|
|
29
|
-
"@rescui/scripts": "^0.3.
|
|
30
|
-
"@rescui/typography": "^0.
|
|
27
|
+
"@rescui/colors": "^0.2.6",
|
|
28
|
+
"@rescui/scripts": "^0.3.5",
|
|
29
|
+
"@rescui/typography": "^0.19.1"
|
|
31
30
|
},
|
|
32
31
|
"scripts": {
|
|
33
32
|
"build": "rescui-scripts build && yarn run build-pcss-api",
|
|
34
33
|
"build-pcss-api": "rescui-scripts build-pcss-api --file public-api.p.css"
|
|
35
34
|
},
|
|
36
35
|
"nx": {},
|
|
37
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "67627f69be3de4b4c6a21244fd7de36e841f01f0"
|
|
38
37
|
}
|