@rescui/radio-button 0.8.5 → 0.8.7

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.
@@ -1,10 +1,10 @@
1
1
  var styles = {
2
- "icon": "_icon_1g6zqe1_4",
3
- "sizeXS": "_sizeXS_1g6zqe1_14",
4
- "sizeS": "_sizeS_1g6zqe1_18",
5
- "sizeM": "_sizeM_1g6zqe1_22",
6
- "sizeL": "_sizeL_1g6zqe1_26",
7
- "light": "_light_1g6zqe1_30",
8
- "dark": "_dark_1g6zqe1_34"
2
+ "icon": "_icon_521zrc_4",
3
+ "sizeXS": "_sizeXS_521zrc_14",
4
+ "sizeS": "_sizeS_521zrc_18",
5
+ "sizeM": "_sizeM_521zrc_22",
6
+ "sizeL": "_sizeL_521zrc_26",
7
+ "light": "_light_521zrc_30",
8
+ "dark": "_dark_521zrc_34"
9
9
  };
10
10
  export { styles as default };
@@ -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
- var _excluded = ["theme", "size", "className"];
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
- var WarningIcon = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
15
- var theme = _ref.theme,
16
- size = _ref.size,
17
- className = _ref.className,
18
- props = _objectWithoutProperties(_ref, _excluded);
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
- ._icon_1g6zqe1_4{
1
+ ._icon_521zrc_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
- ._icon_1g6zqe1_4{
11
+ ._icon_521zrc_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
- ._icon_1g6zqe1_4{
20
+ ._icon_521zrc_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
- ._icon_1g6zqe1_4{
28
+ ._icon_521zrc_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
- ._sizeXS_1g6zqe1_14{
35
+ ._sizeXS_521zrc_14{
36
36
  --_rs-icons-height:16px;
37
37
  }
38
- ._sizeS_1g6zqe1_18{
38
+ ._sizeS_521zrc_18{
39
39
  --_rs-icons-height:20px;
40
40
  }
41
- ._sizeM_1g6zqe1_22{
41
+ ._sizeM_521zrc_22{
42
42
  --_rs-icons-height:24px;
43
43
  }
44
- ._sizeL_1g6zqe1_26{
44
+ ._sizeL_521zrc_26{
45
45
  --_rs-icons-height:28px;
46
46
  }
47
- ._light_1g6zqe1_30{
47
+ ._light_521zrc_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
- ._dark_1g6zqe1_34{
51
+ ._dark_521zrc_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
- -webkit-transform:rotate(0deg);
68
- transform:rotate(0deg);
57
+ transform:rotate(0deg);
69
58
  }
70
59
  to{
71
- -webkit-transform:rotate(360deg);
72
- transform:rotate(360deg);
60
+ transform:rotate(360deg);
73
61
  }
74
62
  }
75
- ._themeLight_e9v4g7_8{
63
+ ._themeLight_imoa0m_8{
76
64
  --rs-theme-dark:0;
77
65
  }
78
- ._themeDark_e9v4g7_11{
66
+ ._themeDark_imoa0m_11{
79
67
  --rs-theme-dark:1;
80
68
  }
81
- ._container_e9v4g7_15{
69
+ ._container_imoa0m_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
- ._container_e9v4g7_15{
79
+ ._container_imoa0m_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
- ._container_e9v4g7_15{
88
+ ._container_imoa0m_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
- ._listSizeS_e9v4g7_20 [data-rs-internal='radio-button-list__error-message']{
96
+ ._listSizeS_imoa0m_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
- ._listSizeS_e9v4g7_20 [data-rs-internal='radio-button-list__error-icon']:not(html){
127
+ ._listSizeS_imoa0m_20 [data-rs-internal='radio-button-list__error-icon']:not(html){
140
128
  --_rs-icons-height:20px;
141
129
  }
142
- ._listSizeM_e9v4g7_23 [data-rs-internal='radio-button-list__error-message']{
130
+ ._listSizeM_imoa0m_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
- ._listSizeM_e9v4g7_23 [data-rs-internal='radio-button-list__error-icon']:not(html){
161
+ ._listSizeM_imoa0m_23 [data-rs-internal='radio-button-list__error-icon']:not(html){
174
162
  --_rs-icons-height:20px;
175
163
  }
176
- ._listSizeL_e9v4g7_26 [data-rs-internal='radio-button-list__error-message']{
164
+ ._listSizeL_imoa0m_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
- ._listSizeL_e9v4g7_26 [data-rs-internal='radio-button-list__error-icon']:not(html){
195
+ ._listSizeL_imoa0m_26 [data-rs-internal='radio-button-list__error-icon']:not(html){
208
196
  --_rs-icons-height:24px;
209
197
  }
210
- ._sizeS_e9v4g7_30{
198
+ ._sizeS_imoa0m_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
- ._sizeM_e9v4g7_33{
203
+ ._sizeM_imoa0m_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
- ._sizeL_e9v4g7_36{
208
+ ._sizeL_imoa0m_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
- ._classic_e9v4g7_40{
213
+ ._classic_imoa0m_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
- ._rock_e9v4g7_43{
218
+ ._rock_imoa0m_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
- ._main_e9v4g7_47{
223
+ ._main_imoa0m_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
- ._main_e9v4g7_47{
233
+ ._main_imoa0m_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
- ._main_e9v4g7_47{
242
+ ._main_imoa0m_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
- ._main_e9v4g7_47 {
250
+ ._main_imoa0m_47 {
263
251
 
264
252
  display:inline-block;
265
253
 
@@ -268,7 +256,7 @@
268
256
 
269
257
  vertical-align:middle;
270
258
  }
271
- ._errorMessage_e9v4g7_59{
259
+ ._errorMessage_imoa0m_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
- -ms-flex-wrap:nowrap;
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
- -webkit-column-gap:8px;
297
- -moz-column-gap:8px;
298
- column-gap:8px;
278
+ -moz-column-gap:8px;
279
+ column-gap:8px;
299
280
  }
300
- ._errorIcon_e9v4g7_71{
301
- -webkit-box-flex:0;
302
- -ms-flex:0 0 auto;
303
- flex:0 0 auto;
281
+ ._errorIcon_imoa0m_71{
282
+ flex:0 0 auto;
304
283
 
305
284
  color:#F45C4A;
306
285
  }
307
- ._input_e9v4g7_77{
286
+ ._input_imoa0m_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
- ._icon_e9v4g7_90{
300
+ ._icon_imoa0m_90{
322
301
  position:relative;
323
302
 
324
303
  display:inline-block;
325
304
 
326
- -webkit-box-sizing:border-box;
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
- ._enabled_e9v4g7_111 ._icon_e9v4g7_90{
317
+ ._enabled_imoa0m_111 ._icon_imoa0m_90{
341
318
  cursor:pointer;
342
319
  }
343
- ._enabled_e9v4g7_111:hover > ._icon_e9v4g7_90,
344
- label:hover ._enabled_e9v4g7_111 > ._icon_e9v4g7_90{
320
+ ._enabled_imoa0m_111:hover > ._icon_imoa0m_90,
321
+ label:hover ._enabled_imoa0m_111 > ._icon_imoa0m_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
- ._disabled_e9v4g7_120 ._icon_e9v4g7_90._icon_e9v4g7_90,
348
- ._input_e9v4g7_77:disabled + ._icon_e9v4g7_90._icon_e9v4g7_90,
349
- ._input_e9v4g7_77:checked:disabled + ._icon_e9v4g7_90{
324
+ ._disabled_imoa0m_120 ._icon_imoa0m_90._icon_imoa0m_90,
325
+ ._input_imoa0m_77:disabled + ._icon_imoa0m_90._icon_imoa0m_90,
326
+ ._input_imoa0m_77:checked:disabled + ._icon_imoa0m_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
- ._enabled_e9v4g7_111 ._input_e9v4g7_77:active + ._icon_e9v4g7_90,
358
- ._enabled_e9v4g7_111 ._input_e9v4g7_77:checked + ._icon_e9v4g7_90{
334
+ ._enabled_imoa0m_111 ._input_imoa0m_77:active + ._icon_imoa0m_90,
335
+ ._enabled_imoa0m_111 ._input_imoa0m_77:checked + ._icon_imoa0m_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
- ._enabled_e9v4g7_111 ._input_e9v4g7_77:active + ._icon_e9v4g7_90,
364
- ._enabled_e9v4g7_111 ._input_e9v4g7_77:checked + ._icon_e9v4g7_90,
365
- ._main_e9v4g7_47 ._input_e9v4g7_77:checked:disabled + ._icon_e9v4g7_90{
340
+ ._enabled_imoa0m_111 ._input_imoa0m_77:active + ._icon_imoa0m_90,
341
+ ._enabled_imoa0m_111 ._input_imoa0m_77:checked + ._icon_imoa0m_90,
342
+ ._main_imoa0m_47 ._input_imoa0m_77:checked:disabled + ._icon_imoa0m_90{
366
343
  border-width:var(--_rs-radio-button-active-icon-border-width);
367
344
  }
368
- ._error_e9v4g7_59 ._icon_e9v4g7_90._icon_e9v4g7_90._icon_e9v4g7_90{
345
+ ._error_imoa0m_59 ._icon_imoa0m_90._icon_imoa0m_90._icon_imoa0m_90{
369
346
  border-color:#F45C4A;
370
347
  }
371
- ._enabled_e9v4g7_111:hover > ._icon_e9v4g7_90._icon_e9v4g7_90,
372
- label:hover ._enabled_e9v4g7_111 > ._icon_e9v4g7_90._icon_e9v4g7_90,
373
- ._enabled_e9v4g7_111 ._input_e9v4g7_77:active:not(:checked) + ._icon_e9v4g7_90{
374
- -webkit-box-shadow:0 0 0 var(--_rs-radio-button-box-shadow-size) var(--_rs-radio-button-active-icon-hover-box-shadow-color);
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_imoa0m_111:hover > ._icon_imoa0m_90._icon_imoa0m_90,
349
+ label:hover ._enabled_imoa0m_111 > ._icon_imoa0m_90._icon_imoa0m_90,
350
+ ._enabled_imoa0m_111 ._input_imoa0m_77:active:not(:checked) + ._icon_imoa0m_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
- ._enabled_e9v4g7_111 ._input_e9v4g7_77:focus[data-focus-method='key'] + ._icon_e9v4g7_90{
378
- -webkit-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);
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_imoa0m_111 ._input_imoa0m_77:focus[data-focus-method='key'] + ._icon_imoa0m_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
- var THEME_STYLES = {
6
+ const THEME_STYLES = {
23
7
  light: styles.themeLight,
24
8
  dark: styles.themeDark
25
9
  };
26
- var SIZE_STYLES = {
10
+ const SIZE_STYLES = {
27
11
  s: styles.sizeS,
28
12
  m: styles.sizeM,
29
13
  l: styles.sizeL
30
14
  };
31
- var MODE_STYLES = {
15
+ const MODE_STYLES = {
32
16
  classic: styles.classic,
33
17
  rock: styles.rock
34
18
  };
35
- var RadioButtonControl = /*#__PURE__*/React.forwardRef(function RadioButtonControl(props, ref) {
36
- var children = props.children,
37
- disabledFromProps = props.disabled,
38
- onChange = props.onChange,
39
- checked = props.checked,
40
- ownValue = props.value,
41
- className = props.className,
42
- error = props.error,
43
- _props$notUseLabelTag = props.notUseLabelTag,
44
- notUseLabelTag = _props$notUseLabelTag === void 0 ? false : _props$notUseLabelTag,
45
- restProps = _objectWithoutProperties(props, _excluded);
46
-
47
- var RootTag = notUseLabelTag ? 'span' : 'label';
48
- return /*#__PURE__*/React.createElement(RadioContext.Consumer, null, function (_ref) {
49
- var groupValue = _ref.value,
50
- theme = _ref.theme,
51
- setValue = _ref.setValue,
52
- name = _ref.name,
53
- errorFromContext = _ref.error,
54
- size = _ref.size,
55
- mode = _ref.mode,
56
- disabled = _ref.disabled;
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", _objectSpread({
51
+ }, /*#__PURE__*/React.createElement("input", {
62
52
  className: styles.input,
63
53
  type: "radio",
64
- onChange: function 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
- }, restProps)), /*#__PURE__*/React.createElement("span", {
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
- var THEME_STYLES = {
9
+ const THEME_STYLES = {
25
10
  light: styles.themeLight,
26
11
  dark: styles.themeDark
27
12
  };
28
- var SIZE_STYLES = {
13
+ const SIZE_STYLES = {
29
14
  s: styles.listSizeS,
30
15
  m: styles.listSizeM,
31
16
  l: styles.listSizeL
32
17
  };
33
18
 
34
- var RadioButtonList = function RadioButtonList(_ref) {
35
- var children = _ref.children,
36
- _ref$mode = _ref.mode,
37
- mode = _ref$mode === void 0 ? 'classic' : _ref$mode,
38
- disabled = _ref.disabled,
39
- _ref$size = _ref.size,
40
- size = _ref$size === void 0 ? 'm' : _ref$size,
41
- themeFromProps = _ref.theme,
42
- error = _ref.error,
43
- className = _ref.className,
44
- style = _ref.style,
45
- restProps = _objectWithoutProperties(_ref, _excluded);
46
-
47
- var theme = useThemeWithUndefined(themeFromProps);
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
- }, restProps), /*#__PURE__*/React.createElement("div", {
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 = _objectSpread(_objectSpread({}, RadioButtonManager.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
- var RadioButtonManager = function RadioButtonManager(_ref) {
9
- var defaultValue = _ref.defaultValue,
10
- children = _ref.children,
11
- valueFromProps = _ref.value,
12
- _ref$disabled = _ref.disabled,
13
- disabled = _ref$disabled === void 0 ? false : _ref$disabled,
14
- _ref$error = _ref.error,
15
- error = _ref$error === void 0 ? false : _ref$error,
16
- nameFromProps = _ref.name,
17
- onChange = _ref.onChange,
18
- _ref$size = _ref.size,
19
- size = _ref$size === void 0 ? 'm' : _ref$size,
20
- _ref$mode = _ref.mode,
21
- mode = _ref$mode === void 0 ? 'classic' : _ref$mode,
22
- themeFromProps = _ref.theme;
23
- var theme = useThemeWithUndefined(themeFromProps);
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
- var _useState = useState(isControlled ? valueFromProps : defaultValue),
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
- var name = nameFromProps !== null && nameFromProps !== void 0 ? nameFromProps : "_placeholder-radio-name-".concat(nameId.current);
39
- var handleSetValue = useCallback(function (val) {
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: error,
49
- theme: theme,
50
- size: size,
51
- mode: mode,
52
- disabled: disabled,
53
- name: 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": "_themeLight_e9v4g7_8",
3
- "themeDark": "_themeDark_e9v4g7_11",
4
- "container": "_container_e9v4g7_15",
5
- "listSizeS": "_listSizeS_e9v4g7_20",
6
- "listSizeM": "_listSizeM_e9v4g7_23",
7
- "listSizeL": "_listSizeL_e9v4g7_26",
8
- "sizeS": "_sizeS_e9v4g7_30",
9
- "sizeM": "_sizeM_e9v4g7_33",
10
- "sizeL": "_sizeL_e9v4g7_36",
11
- "classic": "_classic_e9v4g7_40",
12
- "rock": "_rock_e9v4g7_43",
13
- "main": "_main_e9v4g7_47",
14
- "errorMessage": "_errorMessage_e9v4g7_59",
15
- "errorIcon": "_errorIcon_e9v4g7_71",
16
- "input": "_input_e9v4g7_77",
17
- "icon": "_icon_e9v4g7_90",
18
- "enabled": "_enabled_e9v4g7_111",
19
- "disabled": "_disabled_e9v4g7_120",
20
- "error": "_error_e9v4g7_59"
2
+ "themeLight": "_themeLight_imoa0m_8",
3
+ "themeDark": "_themeDark_imoa0m_11",
4
+ "container": "_container_imoa0m_15",
5
+ "listSizeS": "_listSizeS_imoa0m_20",
6
+ "listSizeM": "_listSizeM_imoa0m_23",
7
+ "listSizeL": "_listSizeL_imoa0m_26",
8
+ "sizeS": "_sizeS_imoa0m_30",
9
+ "sizeM": "_sizeM_imoa0m_33",
10
+ "sizeL": "_sizeL_imoa0m_36",
11
+ "classic": "_classic_imoa0m_40",
12
+ "rock": "_rock_imoa0m_43",
13
+ "main": "_main_imoa0m_47",
14
+ "errorMessage": "_errorMessage_imoa0m_59",
15
+ "errorIcon": "_errorIcon_imoa0m_71",
16
+ "input": "_input_imoa0m_77",
17
+ "icon": "_icon_imoa0m_90",
18
+ "enabled": "_enabled_imoa0m_111",
19
+ "disabled": "_disabled_imoa0m_120",
20
+ "error": "_error_imoa0m_59"
21
21
  };
22
22
  export { styles as default };
@@ -2,6 +2,6 @@ import { createContext } from 'react';
2
2
  var RadioContext = /*#__PURE__*/createContext({
3
3
  value: '',
4
4
  // eslint-disable-next-line @typescript-eslint/no-empty-function
5
- setValue: function setValue() {}
5
+ setValue: () => {}
6
6
  });
7
7
  export { RadioContext as default };
@@ -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
- var RadioButton = /*#__PURE__*/React.forwardRef(function RadioButton(_ref, ref) {
21
- var children = _ref.children,
22
- className = _ref.className,
23
- disabled = _ref.disabled,
24
- restProps = _objectWithoutProperties(_ref, _excluded);
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, _objectSpread({
17
+ icon: /*#__PURE__*/React.createElement(RadioButtonControl, {
32
18
  ref: ref,
33
19
  disabled: disabled,
34
- notUseLabelTag: true
35
- }, restProps))
20
+ notUseLabelTag: true,
21
+ ...restProps
22
+ })
36
23
  }, children);
37
24
  });
38
- RadioButton.propTypes = _objectSpread(_objectSpread({}, RadioButtonControl.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.5",
3
+ "version": "0.8.7",
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.14.0",
18
- "@rescui/menu": "^0.10.9",
19
- "classnames": "^2.2.6",
20
- "core-js": "^3.9.1"
17
+ "@babel/runtime-corejs3": "^7.26.0",
18
+ "@rescui/menu": "^0.10.11",
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.5",
29
- "@rescui/scripts": "^0.3.4",
30
- "@rescui/typography": "^0.19.0"
27
+ "@rescui/colors": "^0.2.6",
28
+ "@rescui/scripts": "^0.3.5",
29
+ "@rescui/typography": "^0.20.0"
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": "69a84812628809943698f0b27643c83dc449f119"
36
+ "gitHead": "5531e3d285d6e38bf5536ff0690a252f1308c49b"
38
37
  }