@rescui/switcher 0.13.6 → 0.14.0
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 +77 -77
- package/lib/switcher.js +378 -116
- package/lib/switcher.p.module.css.js +19 -19
- package/lib/vertical-switcher.d.ts +1 -1
- package/lib/vertical-switcher.js +465 -176
- package/lib/vertical-switcher.p.module.css.js +20 -20
- package/package.json +10 -9
package/lib/switcher.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import
|
|
2
|
+
import _extends from '@babel/runtime-corejs3/helpers/esm/extends';
|
|
3
|
+
import { c } from 'react-compiler-runtime';
|
|
4
|
+
import React, { useRef, useState, useEffect, cloneElement } from 'react';
|
|
3
5
|
import PropTypes from 'prop-types';
|
|
4
6
|
import cn from 'classnames';
|
|
5
7
|
import { useThemeWithUndefined } from '@rescui/ui-contexts';
|
|
@@ -30,8 +32,9 @@ const findIndexByValue = (options, value) => {
|
|
|
30
32
|
|
|
31
33
|
const isNodeEmpty = node => node === null || typeof node === 'undefined' || node === false || node === true || node === '';
|
|
32
34
|
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
+
const Option = t0 => {
|
|
36
|
+
const $ = c(22);
|
|
37
|
+
const {
|
|
35
38
|
label,
|
|
36
39
|
value,
|
|
37
40
|
icon,
|
|
@@ -39,132 +42,391 @@ const optionRenderer = (_ref, ref) => {
|
|
|
39
42
|
onChange,
|
|
40
43
|
selected,
|
|
41
44
|
name,
|
|
42
|
-
'aria-label': ariaLabel
|
|
43
|
-
} = _ref;
|
|
44
|
-
const isWithoutText = isNodeEmpty(label);
|
|
45
|
-
return /*#__PURE__*/React.createElement("label", {
|
|
46
|
-
ref: ref,
|
|
47
|
-
key: String(value),
|
|
48
|
-
"data-rs-internal": 'switcher__option',
|
|
49
|
-
className: cn(styles.option, selected && styles.selected),
|
|
50
45
|
"aria-label": ariaLabel
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
46
|
+
} = t0;
|
|
47
|
+
let t1;
|
|
48
|
+
|
|
49
|
+
if ($[0] !== label) {
|
|
50
|
+
t1 = isNodeEmpty(label);
|
|
51
|
+
$[0] = label;
|
|
52
|
+
$[1] = t1;
|
|
53
|
+
} else {
|
|
54
|
+
t1 = $[1];
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const isWithoutText = t1;
|
|
58
|
+
const t2 = String(value);
|
|
59
|
+
const t3 = selected && styles.selected;
|
|
60
|
+
let t4;
|
|
61
|
+
|
|
62
|
+
if ($[2] !== t3) {
|
|
63
|
+
t4 = cn(styles.option, t3);
|
|
64
|
+
$[2] = t3;
|
|
65
|
+
$[3] = t4;
|
|
66
|
+
} else {
|
|
67
|
+
t4 = $[3];
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
const t5 = String(value);
|
|
71
|
+
let t6;
|
|
72
|
+
|
|
73
|
+
if ($[4] !== disabled || $[5] !== name || $[6] !== onChange || $[7] !== selected || $[8] !== t5) {
|
|
74
|
+
t6 = /*#__PURE__*/React.createElement("input", {
|
|
75
|
+
type: "radio",
|
|
76
|
+
value: t5,
|
|
77
|
+
onChange: onChange,
|
|
78
|
+
className: styles.radio,
|
|
79
|
+
checked: selected,
|
|
80
|
+
disabled: disabled,
|
|
81
|
+
name: name
|
|
82
|
+
});
|
|
83
|
+
$[4] = disabled;
|
|
84
|
+
$[5] = name;
|
|
85
|
+
$[6] = onChange;
|
|
86
|
+
$[7] = selected;
|
|
87
|
+
$[8] = t5;
|
|
88
|
+
$[9] = t6;
|
|
89
|
+
} else {
|
|
90
|
+
t6 = $[9];
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
let t7;
|
|
94
|
+
|
|
95
|
+
if ($[10] !== icon) {
|
|
96
|
+
t7 = /*#__PURE__*/ /*#__PURE__*/React.isValidElement(icon) && /*#__PURE__*/cloneElement(icon, {
|
|
97
|
+
className: cn(icon.props.className, styles.icon),
|
|
98
|
+
"data-render-all-sizes": true
|
|
99
|
+
});
|
|
100
|
+
$[10] = icon;
|
|
101
|
+
$[11] = t7;
|
|
102
|
+
} else {
|
|
103
|
+
t7 = $[11];
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
let t8;
|
|
107
|
+
|
|
108
|
+
if ($[12] !== isWithoutText || $[13] !== label) {
|
|
109
|
+
t8 = !isWithoutText && /*#__PURE__*/React.createElement("span", null, label);
|
|
110
|
+
$[12] = isWithoutText;
|
|
111
|
+
$[13] = label;
|
|
112
|
+
$[14] = t8;
|
|
113
|
+
} else {
|
|
114
|
+
t8 = $[14];
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
let t9;
|
|
118
|
+
|
|
119
|
+
if ($[15] !== ariaLabel || $[16] !== t2 || $[17] !== t4 || $[18] !== t6 || $[19] !== t7 || $[20] !== t8) {
|
|
120
|
+
t9 = /*#__PURE__*/React.createElement("label", {
|
|
121
|
+
key: t2,
|
|
122
|
+
"data-rs-internal": "switcher__option",
|
|
123
|
+
className: t4,
|
|
124
|
+
"aria-label": ariaLabel
|
|
125
|
+
}, t6, t7, t8);
|
|
126
|
+
$[15] = ariaLabel;
|
|
127
|
+
$[16] = t2;
|
|
128
|
+
$[17] = t4;
|
|
129
|
+
$[18] = t6;
|
|
130
|
+
$[19] = t7;
|
|
131
|
+
$[20] = t8;
|
|
132
|
+
$[21] = t9;
|
|
133
|
+
} else {
|
|
134
|
+
t9 = $[21];
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
return t9;
|
|
63
138
|
};
|
|
64
139
|
|
|
65
|
-
|
|
140
|
+
function Switcher(t0) {
|
|
141
|
+
const $ = c(57);
|
|
142
|
+
let className;
|
|
143
|
+
let disabled;
|
|
144
|
+
let name;
|
|
145
|
+
let onChange;
|
|
146
|
+
let options;
|
|
147
|
+
let rest;
|
|
148
|
+
let style;
|
|
149
|
+
let switcherValue;
|
|
150
|
+
let t1;
|
|
151
|
+
let t2;
|
|
152
|
+
let t3;
|
|
153
|
+
let t4;
|
|
154
|
+
let themeFromProps;
|
|
66
155
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
156
|
+
if ($[0] !== t0) {
|
|
157
|
+
({
|
|
158
|
+
className,
|
|
159
|
+
theme: themeFromProps,
|
|
160
|
+
size: t1,
|
|
161
|
+
disabled,
|
|
162
|
+
compact: t2,
|
|
163
|
+
options,
|
|
164
|
+
value: switcherValue,
|
|
165
|
+
mode: t3,
|
|
166
|
+
iconPosition: t4,
|
|
167
|
+
onChange,
|
|
168
|
+
style,
|
|
169
|
+
name,
|
|
170
|
+
...rest
|
|
171
|
+
} = t0);
|
|
172
|
+
$[0] = t0;
|
|
173
|
+
$[1] = className;
|
|
174
|
+
$[2] = disabled;
|
|
175
|
+
$[3] = name;
|
|
176
|
+
$[4] = onChange;
|
|
177
|
+
$[5] = options;
|
|
178
|
+
$[6] = rest;
|
|
179
|
+
$[7] = style;
|
|
180
|
+
$[8] = switcherValue;
|
|
181
|
+
$[9] = t1;
|
|
182
|
+
$[10] = t2;
|
|
183
|
+
$[11] = t3;
|
|
184
|
+
$[12] = t4;
|
|
185
|
+
$[13] = themeFromProps;
|
|
186
|
+
} else {
|
|
187
|
+
className = $[1];
|
|
188
|
+
disabled = $[2];
|
|
189
|
+
name = $[3];
|
|
190
|
+
onChange = $[4];
|
|
191
|
+
options = $[5];
|
|
192
|
+
rest = $[6];
|
|
193
|
+
style = $[7];
|
|
194
|
+
switcherValue = $[8];
|
|
195
|
+
t1 = $[9];
|
|
196
|
+
t2 = $[10];
|
|
197
|
+
t3 = $[11];
|
|
198
|
+
t4 = $[12];
|
|
199
|
+
themeFromProps = $[13];
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
const size = t1 === undefined ? "m" : t1;
|
|
203
|
+
const compact = t2 === undefined ? false : t2;
|
|
204
|
+
const mode = t3 === undefined ? "classic" : t3;
|
|
205
|
+
const iconPosition = t4 === undefined ? "left" : t4;
|
|
84
206
|
const containerRef = useRef(null);
|
|
85
207
|
const theme = useThemeWithUndefined(themeFromProps);
|
|
86
208
|
const uniqueId = useSafeId();
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
209
|
+
let t5;
|
|
210
|
+
|
|
211
|
+
if ($[14] !== options || $[15] !== switcherValue) {
|
|
212
|
+
t5 = findIndexByValue(options, switcherValue);
|
|
213
|
+
$[14] = options;
|
|
214
|
+
$[15] = switcherValue;
|
|
215
|
+
$[16] = t5;
|
|
216
|
+
} else {
|
|
217
|
+
t5 = $[16];
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
const activeIndex = t5;
|
|
221
|
+
let t6;
|
|
222
|
+
|
|
223
|
+
if ($[17] === Symbol.for("react.memo_cache_sentinel")) {
|
|
224
|
+
t6 = {
|
|
225
|
+
offset: 0,
|
|
226
|
+
width: 0,
|
|
227
|
+
hidden: true
|
|
228
|
+
};
|
|
229
|
+
$[17] = t6;
|
|
230
|
+
} else {
|
|
231
|
+
t6 = $[17];
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
const [mark, setMark] = useState(t6);
|
|
102
235
|
const [isMarkTransitionEnabled, setIsMarkTransitionEnabled] = useState(false);
|
|
103
236
|
const firstMarkUpdate = useRef(true);
|
|
237
|
+
let t7;
|
|
238
|
+
|
|
239
|
+
if ($[18] !== activeIndex) {
|
|
240
|
+
t7 = t8 => {
|
|
241
|
+
const isValueChanged = t8 === undefined ? false : t8;
|
|
242
|
+
const activeEl = containerRef.current?.children.item(activeIndex);
|
|
104
243
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
244
|
+
if (!activeEl) {
|
|
245
|
+
return;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
const activeElBox = activeEl.getBoundingClientRect();
|
|
249
|
+
const parentBox = activeEl.parentElement.getBoundingClientRect();
|
|
250
|
+
setMark({
|
|
251
|
+
offset: activeElBox.left - parentBox.left,
|
|
252
|
+
width: activeElBox.width,
|
|
253
|
+
hidden: false
|
|
254
|
+
});
|
|
255
|
+
|
|
256
|
+
if (firstMarkUpdate.current) {
|
|
257
|
+
firstMarkUpdate.current = false;
|
|
258
|
+
setIsMarkTransitionEnabled(false);
|
|
259
|
+
} else {
|
|
260
|
+
setIsMarkTransitionEnabled(isValueChanged);
|
|
261
|
+
}
|
|
262
|
+
};
|
|
263
|
+
|
|
264
|
+
$[18] = activeIndex;
|
|
265
|
+
$[19] = t7;
|
|
266
|
+
} else {
|
|
267
|
+
t7 = $[19];
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
const updateMark = t7;
|
|
271
|
+
let t8;
|
|
272
|
+
let t9;
|
|
273
|
+
|
|
274
|
+
if ($[20] !== updateMark) {
|
|
275
|
+
t8 = () => updateMark(true);
|
|
276
|
+
|
|
277
|
+
t9 = [updateMark];
|
|
278
|
+
$[20] = updateMark;
|
|
279
|
+
$[21] = t8;
|
|
280
|
+
$[22] = t9;
|
|
281
|
+
} else {
|
|
282
|
+
t8 = $[21];
|
|
283
|
+
t9 = $[22];
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
useEffect(t8, t9);
|
|
287
|
+
let t10;
|
|
288
|
+
|
|
289
|
+
if ($[23] !== updateMark) {
|
|
290
|
+
t10 = () => updateMark(false);
|
|
291
|
+
|
|
292
|
+
$[23] = updateMark;
|
|
293
|
+
$[24] = t10;
|
|
294
|
+
} else {
|
|
295
|
+
t10 = $[24];
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
useResizeObserver(containerRef, t10);
|
|
299
|
+
const t11 = sizeToClass[size];
|
|
300
|
+
const t12 = themeToClass[theme];
|
|
301
|
+
const t13 = modeToClass[mode];
|
|
302
|
+
const t14 = disabled && styles.disabled;
|
|
303
|
+
const t15 = compact && styles.compact;
|
|
304
|
+
const t16 = mark.hidden && styles.hiddenMark;
|
|
305
|
+
const t17 = iconPosition === "right" ? styles.alignIconRight : styles.alignIconLeft;
|
|
306
|
+
let t18;
|
|
307
|
+
|
|
308
|
+
if ($[25] !== className || $[26] !== t11 || $[27] !== t12 || $[28] !== t13 || $[29] !== t14 || $[30] !== t15 || $[31] !== t16 || $[32] !== t17) {
|
|
309
|
+
t18 = cn(className, styles.switcher, t11, t12, t13, t14, t15, t16, t17);
|
|
310
|
+
$[25] = className;
|
|
311
|
+
$[26] = t11;
|
|
312
|
+
$[27] = t12;
|
|
313
|
+
$[28] = t13;
|
|
314
|
+
$[29] = t14;
|
|
315
|
+
$[30] = t15;
|
|
316
|
+
$[31] = t16;
|
|
317
|
+
$[32] = t17;
|
|
318
|
+
$[33] = t18;
|
|
319
|
+
} else {
|
|
320
|
+
t18 = $[33];
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
const t19 = disabled && "switcher-disabled";
|
|
324
|
+
let t20;
|
|
325
|
+
|
|
326
|
+
if ($[34] !== t19) {
|
|
327
|
+
t20 = cn("switcher", t19);
|
|
328
|
+
$[34] = t19;
|
|
329
|
+
$[35] = t20;
|
|
330
|
+
} else {
|
|
331
|
+
t20 = $[35];
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
const t21 = isMarkTransitionEnabled ? MARK_TRANSITION_DURATION : "0s";
|
|
335
|
+
let t22;
|
|
336
|
+
|
|
337
|
+
if ($[36] !== style || $[37] !== t21) {
|
|
338
|
+
t22 = { ...style,
|
|
339
|
+
"--_rs-switcher-mark-transition-duration": t21
|
|
340
|
+
};
|
|
341
|
+
$[36] = style;
|
|
342
|
+
$[37] = t21;
|
|
343
|
+
$[38] = t22;
|
|
344
|
+
} else {
|
|
345
|
+
t22 = $[38];
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
let t23;
|
|
349
|
+
|
|
350
|
+
if ($[39] !== activeIndex || $[40] !== disabled || $[41] !== name || $[42] !== onChange || $[43] !== options || $[44] !== uniqueId) {
|
|
351
|
+
t23 = options.map((t24, index) => {
|
|
352
|
+
const {
|
|
353
|
+
value,
|
|
354
|
+
label,
|
|
355
|
+
icon,
|
|
356
|
+
"aria-label": optionAriaLabel
|
|
357
|
+
} = t24;
|
|
358
|
+
return /*#__PURE__*/React.createElement(Option, {
|
|
359
|
+
key: String(value),
|
|
360
|
+
value: value,
|
|
361
|
+
label: label,
|
|
362
|
+
icon: icon,
|
|
363
|
+
disabled: disabled,
|
|
364
|
+
onChange: () => onChange(value),
|
|
365
|
+
selected: options[activeIndex]?.value === value,
|
|
366
|
+
name: name ?? `rs-switcher-${uniqueId}`,
|
|
367
|
+
"aria-label": optionAriaLabel
|
|
368
|
+
});
|
|
120
369
|
});
|
|
370
|
+
$[39] = activeIndex;
|
|
371
|
+
$[40] = disabled;
|
|
372
|
+
$[41] = name;
|
|
373
|
+
$[42] = onChange;
|
|
374
|
+
$[43] = options;
|
|
375
|
+
$[44] = uniqueId;
|
|
376
|
+
$[45] = t23;
|
|
377
|
+
} else {
|
|
378
|
+
t23 = $[45];
|
|
379
|
+
}
|
|
121
380
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
},
|
|
141
|
-
role: "radiogroup"
|
|
142
|
-
}, options.map((_ref3, index) => {
|
|
143
|
-
let {
|
|
144
|
-
value,
|
|
145
|
-
label,
|
|
146
|
-
icon,
|
|
147
|
-
'aria-label': optionAriaLabel
|
|
148
|
-
} = _ref3;
|
|
149
|
-
return /*#__PURE__*/React.createElement(Option, {
|
|
150
|
-
key: String(value),
|
|
151
|
-
value: value,
|
|
152
|
-
label: label,
|
|
153
|
-
icon: icon,
|
|
154
|
-
disabled: disabled,
|
|
155
|
-
onChange: () => onChange(value),
|
|
156
|
-
ref: handleOptionRef(index),
|
|
157
|
-
selected: options[activeIndex]?.value === value,
|
|
158
|
-
name: name ?? `rs-switcher-${uniqueId}`,
|
|
159
|
-
"aria-label": optionAriaLabel
|
|
381
|
+
let t24;
|
|
382
|
+
|
|
383
|
+
if ($[46] === Symbol.for("react.memo_cache_sentinel")) {
|
|
384
|
+
t24 = cn(styles.mark);
|
|
385
|
+
$[46] = t24;
|
|
386
|
+
} else {
|
|
387
|
+
t24 = $[46];
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
let t25;
|
|
391
|
+
|
|
392
|
+
if ($[47] !== mark.offset || $[48] !== mark.width) {
|
|
393
|
+
t25 = /*#__PURE__*/React.createElement("span", {
|
|
394
|
+
className: t24,
|
|
395
|
+
style: {
|
|
396
|
+
left: mark.offset,
|
|
397
|
+
width: mark.width
|
|
398
|
+
}
|
|
160
399
|
});
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
400
|
+
$[47] = mark.offset;
|
|
401
|
+
$[48] = mark.width;
|
|
402
|
+
$[49] = t25;
|
|
403
|
+
} else {
|
|
404
|
+
t25 = $[49];
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
let t26;
|
|
408
|
+
|
|
409
|
+
if ($[50] !== rest || $[51] !== t18 || $[52] !== t20 || $[53] !== t22 || $[54] !== t23 || $[55] !== t25) {
|
|
410
|
+
t26 = /*#__PURE__*/React.createElement("span", _extends({}, rest, {
|
|
411
|
+
className: t18,
|
|
412
|
+
ref: containerRef,
|
|
413
|
+
"data-rs-internal": "switcher",
|
|
414
|
+
"data-test": t20,
|
|
415
|
+
style: t22,
|
|
416
|
+
role: "radiogroup"
|
|
417
|
+
}), t23, t25);
|
|
418
|
+
$[50] = rest;
|
|
419
|
+
$[51] = t18;
|
|
420
|
+
$[52] = t20;
|
|
421
|
+
$[53] = t22;
|
|
422
|
+
$[54] = t23;
|
|
423
|
+
$[55] = t25;
|
|
424
|
+
$[56] = t26;
|
|
425
|
+
} else {
|
|
426
|
+
t26 = $[56];
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
return t26;
|
|
168
430
|
}
|
|
169
431
|
|
|
170
432
|
const optionPropType = PropTypes.shape({
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
var styles = {
|
|
2
|
-
"themeLight": "
|
|
3
|
-
"themeDark": "
|
|
4
|
-
"sizeXS": "
|
|
5
|
-
"sizeS": "
|
|
6
|
-
"sizeM": "
|
|
7
|
-
"sizeL": "
|
|
8
|
-
"modeClassic": "
|
|
9
|
-
"modeRock": "
|
|
10
|
-
"compact": "
|
|
11
|
-
"switcher": "
|
|
12
|
-
"disabled": "
|
|
13
|
-
"alignIconLeft": "
|
|
14
|
-
"alignIconRight": "
|
|
15
|
-
"option": "
|
|
16
|
-
"selected": "
|
|
17
|
-
"hiddenMark": "
|
|
18
|
-
"icon": "
|
|
19
|
-
"mark": "
|
|
20
|
-
"radio": "
|
|
2
|
+
"themeLight": "_themeLight_11g3j9s_6",
|
|
3
|
+
"themeDark": "_themeDark_11g3j9s_9",
|
|
4
|
+
"sizeXS": "_sizeXS_11g3j9s_13",
|
|
5
|
+
"sizeS": "_sizeS_11g3j9s_16",
|
|
6
|
+
"sizeM": "_sizeM_11g3j9s_19",
|
|
7
|
+
"sizeL": "_sizeL_11g3j9s_22",
|
|
8
|
+
"modeClassic": "_modeClassic_11g3j9s_26",
|
|
9
|
+
"modeRock": "_modeRock_11g3j9s_29",
|
|
10
|
+
"compact": "_compact_11g3j9s_33",
|
|
11
|
+
"switcher": "_switcher_11g3j9s_37",
|
|
12
|
+
"disabled": "_disabled_11g3j9s_55",
|
|
13
|
+
"alignIconLeft": "_alignIconLeft_11g3j9s_60",
|
|
14
|
+
"alignIconRight": "_alignIconRight_11g3j9s_63",
|
|
15
|
+
"option": "_option_11g3j9s_67",
|
|
16
|
+
"selected": "_selected_11g3j9s_118",
|
|
17
|
+
"hiddenMark": "_hiddenMark_11g3j9s_127",
|
|
18
|
+
"icon": "_icon_11g3j9s_158",
|
|
19
|
+
"mark": "_mark_11g3j9s_171",
|
|
20
|
+
"radio": "_radio_11g3j9s_199"
|
|
21
21
|
};
|
|
22
22
|
export { styles as default };
|
|
@@ -40,7 +40,7 @@ interface VerticalSwitcherExplicitProps<ValueType, OptionsValueType extends Valu
|
|
|
40
40
|
name?: string;
|
|
41
41
|
}
|
|
42
42
|
export type VerticalSwitcherProps<ValueType, OptionsValueType extends ValueType> = VerticalSwitcherExplicitProps<ValueType, OptionsValueType> & Omit<React.HTMLProps<HTMLSpanElement>, keyof VerticalSwitcherExplicitProps<ValueType, OptionsValueType>>;
|
|
43
|
-
export declare function VerticalSwitcher<ValueType, OptionsValueType extends ValueType = ValueType>({ className, theme: themeFromProps, size, disabled, options
|
|
43
|
+
export declare function VerticalSwitcher<ValueType, OptionsValueType extends ValueType = ValueType>({ className, theme: themeFromProps, size, disabled, options, value: switcherValue, mode, iconPosition, onChange, style, name, ...rest }: VerticalSwitcherProps<ValueType, OptionsValueType>): JSX.Element;
|
|
44
44
|
export declare namespace VerticalSwitcher {
|
|
45
45
|
var propTypes: {
|
|
46
46
|
options: PropTypes.Validator<PropTypes.InferProps<{
|