@jetbrains/ring-ui-built 7.0.79 → 7.0.80
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/components/_helpers/theme.js +90 -94
- package/components/alert/alert.js +0 -13
- package/components/alert-service/alert-service.js +0 -12
- package/components/auth/auth-core.js +1 -13
- package/components/auth/auth.js +1 -13
- package/components/auth/down-notification.js +0 -12
- package/components/auth/iframe-flow.js +1 -0
- package/components/auth/storage.js +1 -13
- package/components/auth-dialog/auth-dialog.js +1 -0
- package/components/auth-dialog-service/auth-dialog-service.js +1 -0
- package/components/avatar/fallback-avatar.js +78 -79
- package/components/avatar-stack/avatar-stack.js +1 -0
- package/components/clipboard/clipboard.js +1 -13
- package/components/collapse/collapse-content.js +2 -2
- package/components/collapse/collapse-control.js +34 -50
- package/components/collapse/collapse.js +2 -2
- package/components/confirm/confirm.js +1 -0
- package/components/confirm-service/confirm-service.js +1 -0
- package/components/date-picker/date-picker.js +1 -0
- package/components/date-picker/months.js +86 -100
- package/components/dialog/dialog.js +1 -0
- package/components/dropdown-menu/dropdown-menu.js +154 -238
- package/components/editable-heading/editable-heading.js +11 -11
- package/components/error-bubble/error-bubble.js +1 -0
- package/components/global/theme.d.ts +1 -0
- package/components/global/theme.js +0 -17
- package/components/global/use-event-callback.js +3 -2
- package/components/header/header.js +17 -17
- package/components/header/profile.js +1 -0
- package/components/header/smart-profile.js +13 -13
- package/components/login-dialog/login-dialog.js +1 -0
- package/components/login-dialog/service.js +1 -0
- package/components/old-browsers-message/white-list.js +2 -2
- package/components/pager/pager.js +1 -0
- package/components/popup/popup.js +49 -43
- package/components/popup-menu/popup-menu.js +1 -0
- package/components/query-assist/query-assist.js +1 -0
- package/components/select/select-popup.js +1 -0
- package/components/select/select.js +1 -0
- package/components/slider/slider.js +289 -366
- package/components/storage/storage-local.js +1 -13
- package/components/storage/storage.js +1 -13
- package/components/style.css +1 -1
- package/components/tabs/collapsible-more.js +12 -12
- package/components/tabs/collapsible-tabs.js +191 -205
- package/components/tabs/dumb-tabs.js +1 -0
- package/components/tabs/smart-tabs.js +1 -0
- package/components/tabs/tabs.js +1 -0
- package/components/tags-input/tags-input.js +1 -0
- package/components/upload/upload.js +31 -8
- package/components/user-agreement/service.js +11 -11
- package/components/user-agreement/user-agreement.js +1 -0
- package/components/user-card/card.js +5 -5
- package/components/user-card/smart-user-card-tooltip.js +1 -1
- package/components/user-card/tooltip.js +1 -1
- package/components/user-card/user-card.js +8 -8
- package/package.json +2 -2
|
@@ -5,6 +5,7 @@ import { isArray } from '../global/typescript-utils.js';
|
|
|
5
5
|
import Shortcuts from '../shortcuts/shortcuts.js';
|
|
6
6
|
import getUID from '../global/get-uid.js';
|
|
7
7
|
import { toRange, HUNDRED, calculateMarks, toPercent, validateValue, calculateValue, adjustValues } from './slider.utils.js';
|
|
8
|
+
import useEventCallback from '../global/use-event-callback.js';
|
|
8
9
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
9
10
|
import '../shortcuts/core.js';
|
|
10
11
|
import 'combokeys';
|
|
@@ -14,12 +15,12 @@ import 'sniffr';
|
|
|
14
15
|
var styles = {"slider":"ring-slider-slider","disabled":"ring-slider-disabled","marked":"ring-slider-marked","rail":"ring-slider-rail","rounded":"ring-slider-rounded","track":"ring-slider-track","thumb":"ring-slider-thumb ring-global-resetButton","dragged":"ring-slider-dragged","tick":"ring-slider-tick","active":"ring-slider-active","markValue":"ring-slider-markValue","tag":"ring-slider-tag"};
|
|
15
16
|
|
|
16
17
|
const Slider = t0 => {
|
|
17
|
-
const $ = c(
|
|
18
|
-
if ($[0] !== "
|
|
19
|
-
for (let $i = 0; $i <
|
|
18
|
+
const $ = c(122);
|
|
19
|
+
if ($[0] !== "8964b5418275bd38d0d46628f0c5c416a0eb127a555095f594f9e18fa28ba85a") {
|
|
20
|
+
for (let $i = 0; $i < 122; $i += 1) {
|
|
20
21
|
$[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
21
22
|
}
|
|
22
|
-
$[0] = "
|
|
23
|
+
$[0] = "8964b5418275bd38d0d46628f0c5c416a0eb127a555095f594f9e18fa28ba85a";
|
|
23
24
|
}
|
|
24
25
|
const {
|
|
25
26
|
defaultValue,
|
|
@@ -41,136 +42,80 @@ const Slider = t0 => {
|
|
|
41
42
|
const ref = useRef(null);
|
|
42
43
|
const previouslyDragged = useRef(false);
|
|
43
44
|
const [values, setValues] = useState(defaultValue !== null && defaultValue !== void 0 ? defaultValue : min);
|
|
44
|
-
const
|
|
45
|
-
let t5;
|
|
46
|
-
if ($[1] !== max || $[2] !== min || $[3] !== t4) {
|
|
47
|
-
t5 = toRange(t4, min, max);
|
|
48
|
-
$[1] = max;
|
|
49
|
-
$[2] = min;
|
|
50
|
-
$[3] = t4;
|
|
51
|
-
$[4] = t5;
|
|
52
|
-
} else {
|
|
53
|
-
t5 = $[4];
|
|
54
|
-
}
|
|
55
|
-
const validValues = t5;
|
|
45
|
+
const validValues = toRange(value !== null && value !== void 0 ? value : values, min, max);
|
|
56
46
|
const validStep = step < 0 ? 0 : step;
|
|
57
|
-
const
|
|
58
|
-
let
|
|
59
|
-
if ($[
|
|
60
|
-
|
|
61
|
-
$[
|
|
62
|
-
$[
|
|
47
|
+
const t4 = defaultValue !== null && defaultValue !== void 0 ? defaultValue : value;
|
|
48
|
+
let t5;
|
|
49
|
+
if ($[1] !== t4) {
|
|
50
|
+
t5 = isArray(t4);
|
|
51
|
+
$[1] = t4;
|
|
52
|
+
$[2] = t5;
|
|
63
53
|
} else {
|
|
64
|
-
|
|
54
|
+
t5 = $[2];
|
|
65
55
|
}
|
|
66
|
-
const isRange =
|
|
56
|
+
const isRange = t5;
|
|
67
57
|
const [isDragging, setIsDragging] = useState(false);
|
|
68
58
|
const [draggedIndex, setDraggedIndex] = useState(-1);
|
|
69
|
-
let
|
|
70
|
-
if ($[
|
|
71
|
-
|
|
72
|
-
$[
|
|
59
|
+
let t6;
|
|
60
|
+
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
61
|
+
t6 = getUID("ring-slider-");
|
|
62
|
+
$[3] = t6;
|
|
73
63
|
} else {
|
|
74
|
-
|
|
64
|
+
t6 = $[3];
|
|
75
65
|
}
|
|
76
|
-
const [shortcutsScope] = useState(
|
|
77
|
-
let
|
|
66
|
+
const [shortcutsScope] = useState(t6);
|
|
67
|
+
let t7;
|
|
78
68
|
bb0: {
|
|
79
69
|
if (isArray(marks)) {
|
|
80
|
-
let
|
|
81
|
-
if ($[
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
$[13] = min;
|
|
90
|
-
$[14] = t11;
|
|
91
|
-
} else {
|
|
92
|
-
t11 = $[14];
|
|
93
|
-
}
|
|
94
|
-
t10 = marks.map(t11);
|
|
95
|
-
$[8] = marks;
|
|
96
|
-
$[9] = max;
|
|
97
|
-
$[10] = min;
|
|
98
|
-
$[11] = t10;
|
|
70
|
+
let t8;
|
|
71
|
+
if ($[4] !== max || $[5] !== min) {
|
|
72
|
+
t8 = mark => ({
|
|
73
|
+
...mark,
|
|
74
|
+
value: validateValue(mark.value, min, max)
|
|
75
|
+
});
|
|
76
|
+
$[4] = max;
|
|
77
|
+
$[5] = min;
|
|
78
|
+
$[6] = t8;
|
|
99
79
|
} else {
|
|
100
|
-
|
|
80
|
+
t8 = $[6];
|
|
101
81
|
}
|
|
102
|
-
|
|
82
|
+
t7 = marks.map(t8);
|
|
103
83
|
break bb0;
|
|
104
84
|
}
|
|
105
85
|
if (marks) {
|
|
106
|
-
|
|
107
|
-
if ($[15] !== max || $[16] !== min || $[17] !== validStep) {
|
|
108
|
-
t10 = calculateMarks(min, max, validStep);
|
|
109
|
-
$[15] = max;
|
|
110
|
-
$[16] = min;
|
|
111
|
-
$[17] = validStep;
|
|
112
|
-
$[18] = t10;
|
|
113
|
-
} else {
|
|
114
|
-
t10 = $[18];
|
|
115
|
-
}
|
|
116
|
-
t9 = t10;
|
|
86
|
+
t7 = calculateMarks(min, max, validStep);
|
|
117
87
|
break bb0;
|
|
118
88
|
}
|
|
119
|
-
|
|
120
|
-
if ($[19] === Symbol.for("react.memo_cache_sentinel")) {
|
|
121
|
-
t10 = [];
|
|
122
|
-
$[19] = t10;
|
|
123
|
-
} else {
|
|
124
|
-
t10 = $[19];
|
|
125
|
-
}
|
|
126
|
-
t9 = t10;
|
|
89
|
+
t7 = [];
|
|
127
90
|
}
|
|
128
|
-
const markValues =
|
|
129
|
-
let
|
|
91
|
+
const markValues = t7;
|
|
92
|
+
let t8;
|
|
130
93
|
bb1: {
|
|
131
94
|
if (showTicks) {
|
|
132
|
-
|
|
133
|
-
if ($[20] !== markValues || $[21] !== max || $[22] !== min || $[23] !== validStep) {
|
|
134
|
-
t11 = markValues.length ? markValues : calculateMarks(min, max, validStep);
|
|
135
|
-
$[20] = markValues;
|
|
136
|
-
$[21] = max;
|
|
137
|
-
$[22] = min;
|
|
138
|
-
$[23] = validStep;
|
|
139
|
-
$[24] = t11;
|
|
140
|
-
} else {
|
|
141
|
-
t11 = $[24];
|
|
142
|
-
}
|
|
143
|
-
t10 = t11;
|
|
95
|
+
t8 = markValues.length ? markValues : calculateMarks(min, max, validStep);
|
|
144
96
|
break bb1;
|
|
145
97
|
}
|
|
146
|
-
|
|
147
|
-
if ($[25] === Symbol.for("react.memo_cache_sentinel")) {
|
|
148
|
-
t11 = [];
|
|
149
|
-
$[25] = t11;
|
|
150
|
-
} else {
|
|
151
|
-
t11 = $[25];
|
|
152
|
-
}
|
|
153
|
-
t10 = t11;
|
|
98
|
+
t8 = [];
|
|
154
99
|
}
|
|
155
|
-
const tickMarks =
|
|
100
|
+
const tickMarks = t8;
|
|
156
101
|
const trackStart = toPercent(isRange ? Math.min(...validValues) : min, min, max);
|
|
157
102
|
const trackLength = toPercent(Math.max(...validValues), min, max) - trackStart;
|
|
158
|
-
let
|
|
159
|
-
if ($[
|
|
160
|
-
|
|
103
|
+
let t9;
|
|
104
|
+
if ($[7] !== isRange || $[8] !== onChange) {
|
|
105
|
+
t9 = nextValues => {
|
|
161
106
|
setValues(nextValues);
|
|
162
107
|
onChange?.(isRange ? nextValues : nextValues[0]);
|
|
163
108
|
};
|
|
164
|
-
$[
|
|
165
|
-
$[
|
|
166
|
-
$[
|
|
109
|
+
$[7] = isRange;
|
|
110
|
+
$[8] = onChange;
|
|
111
|
+
$[9] = t9;
|
|
167
112
|
} else {
|
|
168
|
-
|
|
113
|
+
t9 = $[9];
|
|
169
114
|
}
|
|
170
|
-
const handleValueChange =
|
|
171
|
-
let
|
|
172
|
-
if ($[
|
|
173
|
-
|
|
115
|
+
const handleValueChange = t9;
|
|
116
|
+
let t10;
|
|
117
|
+
if ($[10] !== handleValueChange || $[11] !== validValues) {
|
|
118
|
+
t10 = (nextValue, index) => {
|
|
174
119
|
const nextValues_0 = [...validValues];
|
|
175
120
|
nextValues_0[index] = nextValue;
|
|
176
121
|
if (nextValues_0[0] > nextValues_0[1]) {
|
|
@@ -181,101 +126,100 @@ const Slider = t0 => {
|
|
|
181
126
|
}
|
|
182
127
|
handleValueChange(nextValues_0);
|
|
183
128
|
};
|
|
184
|
-
$[
|
|
185
|
-
$[
|
|
186
|
-
$[
|
|
129
|
+
$[10] = handleValueChange;
|
|
130
|
+
$[11] = validValues;
|
|
131
|
+
$[12] = t10;
|
|
187
132
|
} else {
|
|
188
|
-
|
|
133
|
+
t10 = $[12];
|
|
189
134
|
}
|
|
190
|
-
const setValueAndSwap =
|
|
135
|
+
const setValueAndSwap = t10;
|
|
191
136
|
const getIndex = _temp;
|
|
192
|
-
let
|
|
193
|
-
if ($[
|
|
194
|
-
|
|
137
|
+
let shortcutsMap;
|
|
138
|
+
if ($[13] !== disabled || $[14] !== max || $[15] !== min || $[16] !== setValueAndSwap || $[17] !== validStep || $[18] !== validValues) {
|
|
139
|
+
shortcutsMap = {};
|
|
195
140
|
if (!disabled) {
|
|
196
|
-
let
|
|
197
|
-
if ($[
|
|
198
|
-
|
|
141
|
+
let t11;
|
|
142
|
+
if ($[20] !== min || $[21] !== setValueAndSwap || $[22] !== validStep || $[23] !== validValues) {
|
|
143
|
+
t11 = t12 => {
|
|
199
144
|
const {
|
|
200
145
|
target: target_0
|
|
201
|
-
} =
|
|
146
|
+
} = t12;
|
|
202
147
|
const index_0 = getIndex(target_0);
|
|
203
148
|
setValueAndSwap(Math.max(min, validValues[index_0] - validStep), index_0);
|
|
204
149
|
};
|
|
205
|
-
$[
|
|
206
|
-
$[
|
|
207
|
-
$[
|
|
208
|
-
$[
|
|
209
|
-
$[
|
|
150
|
+
$[20] = min;
|
|
151
|
+
$[21] = setValueAndSwap;
|
|
152
|
+
$[22] = validStep;
|
|
153
|
+
$[23] = validValues;
|
|
154
|
+
$[24] = t11;
|
|
210
155
|
} else {
|
|
211
|
-
|
|
156
|
+
t11 = $[24];
|
|
212
157
|
}
|
|
213
|
-
|
|
214
|
-
let
|
|
215
|
-
if ($[
|
|
216
|
-
|
|
158
|
+
shortcutsMap.left = shortcutsMap.down = t11;
|
|
159
|
+
let t12;
|
|
160
|
+
if ($[25] !== max || $[26] !== setValueAndSwap || $[27] !== validStep || $[28] !== validValues) {
|
|
161
|
+
t12 = t13 => {
|
|
217
162
|
const {
|
|
218
163
|
target: target_1
|
|
219
|
-
} =
|
|
164
|
+
} = t13;
|
|
220
165
|
const index_1 = getIndex(target_1);
|
|
221
166
|
setValueAndSwap(Math.min(max, validValues[index_1] + validStep), index_1);
|
|
222
167
|
};
|
|
223
|
-
$[
|
|
224
|
-
$[
|
|
225
|
-
$[
|
|
226
|
-
$[
|
|
227
|
-
$[
|
|
168
|
+
$[25] = max;
|
|
169
|
+
$[26] = setValueAndSwap;
|
|
170
|
+
$[27] = validStep;
|
|
171
|
+
$[28] = validValues;
|
|
172
|
+
$[29] = t12;
|
|
228
173
|
} else {
|
|
229
|
-
|
|
174
|
+
t12 = $[29];
|
|
230
175
|
}
|
|
231
|
-
|
|
232
|
-
let
|
|
233
|
-
if ($[
|
|
234
|
-
|
|
176
|
+
shortcutsMap.right = shortcutsMap.up = t12;
|
|
177
|
+
let t13;
|
|
178
|
+
if ($[30] !== min || $[31] !== setValueAndSwap) {
|
|
179
|
+
t13 = t14 => {
|
|
235
180
|
const {
|
|
236
181
|
target: target_2
|
|
237
|
-
} =
|
|
182
|
+
} = t14;
|
|
238
183
|
const index_2 = getIndex(target_2);
|
|
239
184
|
setValueAndSwap(min, index_2);
|
|
240
185
|
};
|
|
241
|
-
$[
|
|
242
|
-
$[
|
|
243
|
-
$[
|
|
186
|
+
$[30] = min;
|
|
187
|
+
$[31] = setValueAndSwap;
|
|
188
|
+
$[32] = t13;
|
|
244
189
|
} else {
|
|
245
|
-
|
|
190
|
+
t13 = $[32];
|
|
246
191
|
}
|
|
247
|
-
|
|
248
|
-
let
|
|
249
|
-
if ($[
|
|
250
|
-
|
|
192
|
+
shortcutsMap.home = t13;
|
|
193
|
+
let t14;
|
|
194
|
+
if ($[33] !== max || $[34] !== setValueAndSwap) {
|
|
195
|
+
t14 = t15 => {
|
|
251
196
|
const {
|
|
252
197
|
target: target_3
|
|
253
|
-
} =
|
|
198
|
+
} = t15;
|
|
254
199
|
const index_3 = getIndex(target_3);
|
|
255
200
|
setValueAndSwap(max, index_3);
|
|
256
201
|
};
|
|
257
|
-
$[
|
|
258
|
-
$[
|
|
259
|
-
$[
|
|
202
|
+
$[33] = max;
|
|
203
|
+
$[34] = setValueAndSwap;
|
|
204
|
+
$[35] = t14;
|
|
260
205
|
} else {
|
|
261
|
-
|
|
206
|
+
t14 = $[35];
|
|
262
207
|
}
|
|
263
|
-
|
|
208
|
+
shortcutsMap.end = t14;
|
|
264
209
|
}
|
|
265
|
-
$[
|
|
266
|
-
$[
|
|
267
|
-
$[
|
|
268
|
-
$[
|
|
269
|
-
$[
|
|
270
|
-
$[
|
|
271
|
-
$[
|
|
210
|
+
$[13] = disabled;
|
|
211
|
+
$[14] = max;
|
|
212
|
+
$[15] = min;
|
|
213
|
+
$[16] = setValueAndSwap;
|
|
214
|
+
$[17] = validStep;
|
|
215
|
+
$[18] = validValues;
|
|
216
|
+
$[19] = shortcutsMap;
|
|
272
217
|
} else {
|
|
273
|
-
|
|
218
|
+
shortcutsMap = $[19];
|
|
274
219
|
}
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
t13 = e => {
|
|
220
|
+
let t11;
|
|
221
|
+
if ($[36] !== disabled || $[37] !== isRange || $[38] !== max || $[39] !== min || $[40] !== validStep || $[41] !== validValues) {
|
|
222
|
+
t11 = e => {
|
|
279
223
|
e.stopPropagation();
|
|
280
224
|
if (disabled) {
|
|
281
225
|
return;
|
|
@@ -291,24 +235,23 @@ const Slider = t0 => {
|
|
|
291
235
|
setIsDragging(true);
|
|
292
236
|
previouslyDragged.current = false;
|
|
293
237
|
};
|
|
294
|
-
$[
|
|
295
|
-
$[
|
|
296
|
-
$[
|
|
297
|
-
$[
|
|
298
|
-
$[
|
|
299
|
-
$[
|
|
300
|
-
$[
|
|
301
|
-
$[62] = t13;
|
|
238
|
+
$[36] = disabled;
|
|
239
|
+
$[37] = isRange;
|
|
240
|
+
$[38] = max;
|
|
241
|
+
$[39] = min;
|
|
242
|
+
$[40] = validStep;
|
|
243
|
+
$[41] = validValues;
|
|
244
|
+
$[42] = t11;
|
|
302
245
|
} else {
|
|
303
|
-
|
|
246
|
+
t11 = $[42];
|
|
304
247
|
}
|
|
305
|
-
const handleMouseDown =
|
|
306
|
-
let
|
|
307
|
-
if ($[
|
|
308
|
-
|
|
248
|
+
const handleMouseDown = t11;
|
|
249
|
+
let t12;
|
|
250
|
+
if ($[43] !== draggedIndex || $[44] !== handleValueChange || $[45] !== max || $[46] !== min || $[47] !== validStep || $[48] !== validValues) {
|
|
251
|
+
t12 = t13 => {
|
|
309
252
|
const {
|
|
310
253
|
pageX
|
|
311
|
-
} =
|
|
254
|
+
} = t13;
|
|
312
255
|
const nextValues_1 = adjustValues(validValues, ref, draggedIndex, pageX, max, min, validStep);
|
|
313
256
|
if (nextValues_1[0] > nextValues_1[1]) {
|
|
314
257
|
nextValues_1.reverse();
|
|
@@ -318,23 +261,23 @@ const Slider = t0 => {
|
|
|
318
261
|
setIsDragging(false);
|
|
319
262
|
previouslyDragged.current = true;
|
|
320
263
|
};
|
|
321
|
-
$[
|
|
322
|
-
$[
|
|
323
|
-
$[
|
|
324
|
-
$[
|
|
325
|
-
$[
|
|
326
|
-
$[
|
|
327
|
-
$[
|
|
264
|
+
$[43] = draggedIndex;
|
|
265
|
+
$[44] = handleValueChange;
|
|
266
|
+
$[45] = max;
|
|
267
|
+
$[46] = min;
|
|
268
|
+
$[47] = validStep;
|
|
269
|
+
$[48] = validValues;
|
|
270
|
+
$[49] = t12;
|
|
328
271
|
} else {
|
|
329
|
-
|
|
272
|
+
t12 = $[49];
|
|
330
273
|
}
|
|
331
|
-
const handleMouseUp =
|
|
332
|
-
let
|
|
333
|
-
if ($[
|
|
334
|
-
|
|
274
|
+
const handleMouseUp = useEventCallback(t12);
|
|
275
|
+
let t13;
|
|
276
|
+
if ($[50] !== draggedIndex || $[51] !== handleValueChange || $[52] !== max || $[53] !== min || $[54] !== validStep || $[55] !== validValues) {
|
|
277
|
+
t13 = t14 => {
|
|
335
278
|
const {
|
|
336
279
|
pageX: pageX_0
|
|
337
|
-
} =
|
|
280
|
+
} = t14;
|
|
338
281
|
const nextValues_2 = adjustValues(validValues, ref, draggedIndex, pageX_0, max, min, validStep);
|
|
339
282
|
if (nextValues_2[0] > nextValues_2[1]) {
|
|
340
283
|
nextValues_2.reverse();
|
|
@@ -342,21 +285,21 @@ const Slider = t0 => {
|
|
|
342
285
|
}
|
|
343
286
|
handleValueChange(nextValues_2);
|
|
344
287
|
};
|
|
345
|
-
$[
|
|
346
|
-
$[
|
|
347
|
-
$[
|
|
348
|
-
$[
|
|
349
|
-
$[
|
|
350
|
-
$[
|
|
351
|
-
$[
|
|
288
|
+
$[50] = draggedIndex;
|
|
289
|
+
$[51] = handleValueChange;
|
|
290
|
+
$[52] = max;
|
|
291
|
+
$[53] = min;
|
|
292
|
+
$[54] = validStep;
|
|
293
|
+
$[55] = validValues;
|
|
294
|
+
$[56] = t13;
|
|
352
295
|
} else {
|
|
353
|
-
|
|
296
|
+
t13 = $[56];
|
|
354
297
|
}
|
|
355
|
-
const handleMouseMove =
|
|
356
|
-
let
|
|
357
|
-
let
|
|
358
|
-
if ($[
|
|
359
|
-
|
|
298
|
+
const handleMouseMove = useEventCallback(t13);
|
|
299
|
+
let t14;
|
|
300
|
+
let t15;
|
|
301
|
+
if ($[57] !== disabled || $[58] !== handleMouseMove || $[59] !== handleMouseUp || $[60] !== isDragging) {
|
|
302
|
+
t14 = () => {
|
|
360
303
|
if (disabled) {
|
|
361
304
|
return;
|
|
362
305
|
}
|
|
@@ -374,110 +317,112 @@ const Slider = t0 => {
|
|
|
374
317
|
window.removeEventListener("mouseup", handleMouseUp);
|
|
375
318
|
};
|
|
376
319
|
};
|
|
377
|
-
|
|
378
|
-
$[
|
|
379
|
-
$[
|
|
380
|
-
$[
|
|
381
|
-
$[
|
|
382
|
-
$[
|
|
383
|
-
$[
|
|
320
|
+
t15 = [isDragging, disabled, handleMouseMove, handleMouseUp];
|
|
321
|
+
$[57] = disabled;
|
|
322
|
+
$[58] = handleMouseMove;
|
|
323
|
+
$[59] = handleMouseUp;
|
|
324
|
+
$[60] = isDragging;
|
|
325
|
+
$[61] = t14;
|
|
326
|
+
$[62] = t15;
|
|
384
327
|
} else {
|
|
385
|
-
|
|
386
|
-
|
|
328
|
+
t14 = $[61];
|
|
329
|
+
t15 = $[62];
|
|
387
330
|
}
|
|
388
|
-
useEffect(
|
|
389
|
-
const
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
331
|
+
useEffect(t14, t15);
|
|
332
|
+
const t16 = "presentation";
|
|
333
|
+
const t17 = !!marks || showTag;
|
|
334
|
+
let t18;
|
|
335
|
+
if ($[63] !== className || $[64] !== disabled || $[65] !== t17) {
|
|
336
|
+
t18 = classNames(styles.slider, className, {
|
|
393
337
|
[styles.disabled]: disabled,
|
|
394
|
-
[styles.marked]:
|
|
338
|
+
[styles.marked]: t17
|
|
395
339
|
});
|
|
396
|
-
$[
|
|
397
|
-
$[
|
|
398
|
-
$[
|
|
399
|
-
$[
|
|
340
|
+
$[63] = className;
|
|
341
|
+
$[64] = disabled;
|
|
342
|
+
$[65] = t17;
|
|
343
|
+
$[66] = t18;
|
|
400
344
|
} else {
|
|
401
|
-
|
|
345
|
+
t18 = $[66];
|
|
402
346
|
}
|
|
347
|
+
const t19 = -1;
|
|
403
348
|
let t20;
|
|
404
|
-
if ($[
|
|
349
|
+
if ($[67] !== shortcutsMap || $[68] !== shortcutsScope) {
|
|
405
350
|
t20 = /*#__PURE__*/jsx(Shortcuts, {
|
|
406
351
|
map: shortcutsMap,
|
|
407
352
|
scope: shortcutsScope
|
|
408
353
|
});
|
|
409
|
-
$[
|
|
410
|
-
$[
|
|
411
|
-
$[
|
|
354
|
+
$[67] = shortcutsMap;
|
|
355
|
+
$[68] = shortcutsScope;
|
|
356
|
+
$[69] = t20;
|
|
412
357
|
} else {
|
|
413
|
-
t20 = $[
|
|
358
|
+
t20 = $[69];
|
|
414
359
|
}
|
|
415
360
|
const t21 = !showTicks;
|
|
416
361
|
let t22;
|
|
417
|
-
if ($[
|
|
362
|
+
if ($[70] !== disabled || $[71] !== t21) {
|
|
418
363
|
t22 = classNames(styles.rail, {
|
|
419
364
|
[styles.rounded]: t21,
|
|
420
365
|
[styles.disabled]: disabled
|
|
421
366
|
});
|
|
422
|
-
$[
|
|
423
|
-
$[
|
|
424
|
-
$[
|
|
367
|
+
$[70] = disabled;
|
|
368
|
+
$[71] = t21;
|
|
369
|
+
$[72] = t22;
|
|
425
370
|
} else {
|
|
426
|
-
t22 = $[
|
|
371
|
+
t22 = $[72];
|
|
427
372
|
}
|
|
428
373
|
let t23;
|
|
429
|
-
if ($[
|
|
374
|
+
if ($[73] !== t22) {
|
|
430
375
|
t23 = /*#__PURE__*/jsx("div", {
|
|
431
376
|
className: t22
|
|
432
377
|
});
|
|
433
|
-
$[
|
|
434
|
-
$[
|
|
378
|
+
$[73] = t22;
|
|
379
|
+
$[74] = t23;
|
|
435
380
|
} else {
|
|
436
|
-
t23 = $[
|
|
381
|
+
t23 = $[74];
|
|
437
382
|
}
|
|
438
383
|
const t24 = `${trackStart}%`;
|
|
439
384
|
const t25 = `${trackLength}%`;
|
|
440
385
|
let t26;
|
|
441
|
-
if ($[
|
|
386
|
+
if ($[75] !== t24 || $[76] !== t25) {
|
|
442
387
|
t26 = {
|
|
443
388
|
left: t24,
|
|
444
389
|
width: t25
|
|
445
390
|
};
|
|
446
|
-
$[
|
|
447
|
-
$[
|
|
448
|
-
$[
|
|
391
|
+
$[75] = t24;
|
|
392
|
+
$[76] = t25;
|
|
393
|
+
$[77] = t26;
|
|
449
394
|
} else {
|
|
450
|
-
t26 = $[
|
|
395
|
+
t26 = $[77];
|
|
451
396
|
}
|
|
452
397
|
const t27 = !showTicks;
|
|
453
398
|
let t28;
|
|
454
|
-
if ($[
|
|
399
|
+
if ($[78] !== disabled || $[79] !== t27) {
|
|
455
400
|
t28 = classNames(styles.track, {
|
|
456
401
|
[styles.rounded]: t27,
|
|
457
402
|
[styles.disabled]: disabled
|
|
458
403
|
});
|
|
459
|
-
$[
|
|
460
|
-
$[
|
|
461
|
-
$[
|
|
404
|
+
$[78] = disabled;
|
|
405
|
+
$[79] = t27;
|
|
406
|
+
$[80] = t28;
|
|
462
407
|
} else {
|
|
463
|
-
t28 = $[
|
|
408
|
+
t28 = $[80];
|
|
464
409
|
}
|
|
465
410
|
let t29;
|
|
466
|
-
if ($[
|
|
411
|
+
if ($[81] !== t26 || $[82] !== t28) {
|
|
467
412
|
t29 = /*#__PURE__*/jsx("div", {
|
|
468
413
|
style: t26,
|
|
469
414
|
className: t28
|
|
470
415
|
});
|
|
471
|
-
$[
|
|
472
|
-
$[
|
|
473
|
-
$[
|
|
416
|
+
$[81] = t26;
|
|
417
|
+
$[82] = t28;
|
|
418
|
+
$[83] = t29;
|
|
474
419
|
} else {
|
|
475
|
-
t29 = $[
|
|
420
|
+
t29 = $[83];
|
|
476
421
|
}
|
|
477
422
|
let t30;
|
|
478
|
-
if ($[
|
|
423
|
+
if ($[84] !== disabled || $[85] !== draggedIndex || $[86] !== handleMouseDown || $[87] !== isDragging || $[88] !== max || $[89] !== min || $[90] !== renderTag || $[91] !== showTag || $[92] !== validValues) {
|
|
479
424
|
let t31;
|
|
480
|
-
if ($[
|
|
425
|
+
if ($[94] !== disabled || $[95] !== draggedIndex || $[96] !== handleMouseDown || $[97] !== isDragging || $[98] !== max || $[99] !== min || $[100] !== renderTag || $[101] !== showTag) {
|
|
481
426
|
t31 = (numValue, index_5) => {
|
|
482
427
|
const percent = toPercent(numValue, min, max);
|
|
483
428
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
@@ -509,131 +454,109 @@ const Slider = t0 => {
|
|
|
509
454
|
})]
|
|
510
455
|
}, index_5);
|
|
511
456
|
};
|
|
512
|
-
$[
|
|
513
|
-
$[
|
|
514
|
-
$[
|
|
515
|
-
$[
|
|
516
|
-
$[
|
|
517
|
-
$[
|
|
518
|
-
$[
|
|
519
|
-
$[
|
|
520
|
-
$[
|
|
457
|
+
$[94] = disabled;
|
|
458
|
+
$[95] = draggedIndex;
|
|
459
|
+
$[96] = handleMouseDown;
|
|
460
|
+
$[97] = isDragging;
|
|
461
|
+
$[98] = max;
|
|
462
|
+
$[99] = min;
|
|
463
|
+
$[100] = renderTag;
|
|
464
|
+
$[101] = showTag;
|
|
465
|
+
$[102] = t31;
|
|
521
466
|
} else {
|
|
522
|
-
t31 = $[
|
|
467
|
+
t31 = $[102];
|
|
523
468
|
}
|
|
524
469
|
t30 = validValues.map(t31);
|
|
525
|
-
$[
|
|
526
|
-
$[
|
|
527
|
-
$[
|
|
528
|
-
$[
|
|
529
|
-
$[
|
|
530
|
-
$[
|
|
531
|
-
$[
|
|
532
|
-
$[
|
|
533
|
-
$[
|
|
534
|
-
$[
|
|
470
|
+
$[84] = disabled;
|
|
471
|
+
$[85] = draggedIndex;
|
|
472
|
+
$[86] = handleMouseDown;
|
|
473
|
+
$[87] = isDragging;
|
|
474
|
+
$[88] = max;
|
|
475
|
+
$[89] = min;
|
|
476
|
+
$[90] = renderTag;
|
|
477
|
+
$[91] = showTag;
|
|
478
|
+
$[92] = validValues;
|
|
479
|
+
$[93] = t30;
|
|
535
480
|
} else {
|
|
536
|
-
t30 = $[
|
|
481
|
+
t30 = $[93];
|
|
537
482
|
}
|
|
538
483
|
let t31;
|
|
539
|
-
if ($[
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
$[130] = min;
|
|
561
|
-
$[131] = t32;
|
|
562
|
-
} else {
|
|
563
|
-
t32 = $[131];
|
|
564
|
-
}
|
|
565
|
-
t31 = markValues.map(t32);
|
|
566
|
-
$[123] = disabled;
|
|
567
|
-
$[124] = markValues;
|
|
568
|
-
$[125] = max;
|
|
569
|
-
$[126] = min;
|
|
570
|
-
$[127] = t31;
|
|
484
|
+
if ($[103] !== disabled || $[104] !== max || $[105] !== min) {
|
|
485
|
+
t31 = (t32, index_6) => {
|
|
486
|
+
const {
|
|
487
|
+
value: markValue,
|
|
488
|
+
label
|
|
489
|
+
} = t32;
|
|
490
|
+
const percent_0 = toPercent(markValue, min, max);
|
|
491
|
+
return /*#__PURE__*/jsx("div", {
|
|
492
|
+
style: {
|
|
493
|
+
left: `${percent_0}%`
|
|
494
|
+
},
|
|
495
|
+
className: classNames(styles.markValue, {
|
|
496
|
+
[styles.disabled]: disabled
|
|
497
|
+
}),
|
|
498
|
+
children: label !== null && label !== void 0 ? label : markValue
|
|
499
|
+
}, index_6);
|
|
500
|
+
};
|
|
501
|
+
$[103] = disabled;
|
|
502
|
+
$[104] = max;
|
|
503
|
+
$[105] = min;
|
|
504
|
+
$[106] = t31;
|
|
571
505
|
} else {
|
|
572
|
-
t31 = $[
|
|
506
|
+
t31 = $[106];
|
|
573
507
|
}
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
$[144] = t33;
|
|
600
|
-
} else {
|
|
601
|
-
t33 = $[144];
|
|
602
|
-
}
|
|
603
|
-
t32 = tickMarks.map(t33);
|
|
604
|
-
$[132] = disabled;
|
|
605
|
-
$[133] = isRange;
|
|
606
|
-
$[134] = max;
|
|
607
|
-
$[135] = min;
|
|
608
|
-
$[136] = tickMarks;
|
|
609
|
-
$[137] = validValues;
|
|
610
|
-
$[138] = t32;
|
|
508
|
+
const t32 = markValues.map(t31);
|
|
509
|
+
let t33;
|
|
510
|
+
if ($[107] !== disabled || $[108] !== isRange || $[109] !== max || $[110] !== min || $[111] !== validValues) {
|
|
511
|
+
t33 = (t34, index_7) => {
|
|
512
|
+
const {
|
|
513
|
+
value: tickValue
|
|
514
|
+
} = t34;
|
|
515
|
+
const percent_1 = toPercent(tickValue, min, max);
|
|
516
|
+
const isActive = isRange ? tickValue >= validValues[0] && tickValue <= validValues[validValues.length - 1] : tickValue <= validValues[0];
|
|
517
|
+
return /*#__PURE__*/jsx("div", {
|
|
518
|
+
className: classNames(styles.tick, {
|
|
519
|
+
[styles.active]: isActive,
|
|
520
|
+
[styles.disabled]: disabled
|
|
521
|
+
}),
|
|
522
|
+
style: {
|
|
523
|
+
left: `${percent_1}%`
|
|
524
|
+
}
|
|
525
|
+
}, index_7);
|
|
526
|
+
};
|
|
527
|
+
$[107] = disabled;
|
|
528
|
+
$[108] = isRange;
|
|
529
|
+
$[109] = max;
|
|
530
|
+
$[110] = min;
|
|
531
|
+
$[111] = validValues;
|
|
532
|
+
$[112] = t33;
|
|
611
533
|
} else {
|
|
612
|
-
|
|
534
|
+
t33 = $[112];
|
|
613
535
|
}
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
536
|
+
const t34 = tickMarks.map(t33);
|
|
537
|
+
let t35;
|
|
538
|
+
if ($[113] !== handleMouseDown || $[114] !== t18 || $[115] !== t20 || $[116] !== t23 || $[117] !== t29 || $[118] !== t30 || $[119] !== t32 || $[120] !== t34) {
|
|
539
|
+
t35 = /*#__PURE__*/jsxs("div", {
|
|
617
540
|
ref: ref,
|
|
618
|
-
role:
|
|
619
|
-
className:
|
|
620
|
-
tabIndex:
|
|
541
|
+
role: t16,
|
|
542
|
+
className: t18,
|
|
543
|
+
tabIndex: t19,
|
|
621
544
|
onMouseDown: handleMouseDown,
|
|
622
|
-
children: [t20, t23, t29, t30,
|
|
545
|
+
children: [t20, t23, t29, t30, t32, t34]
|
|
623
546
|
});
|
|
624
|
-
$[
|
|
625
|
-
$[
|
|
626
|
-
$[
|
|
627
|
-
$[
|
|
628
|
-
$[
|
|
629
|
-
$[
|
|
630
|
-
$[
|
|
631
|
-
$[
|
|
632
|
-
$[
|
|
547
|
+
$[113] = handleMouseDown;
|
|
548
|
+
$[114] = t18;
|
|
549
|
+
$[115] = t20;
|
|
550
|
+
$[116] = t23;
|
|
551
|
+
$[117] = t29;
|
|
552
|
+
$[118] = t30;
|
|
553
|
+
$[119] = t32;
|
|
554
|
+
$[120] = t34;
|
|
555
|
+
$[121] = t35;
|
|
633
556
|
} else {
|
|
634
|
-
|
|
557
|
+
t35 = $[121];
|
|
635
558
|
}
|
|
636
|
-
return
|
|
559
|
+
return t35;
|
|
637
560
|
};
|
|
638
561
|
function _temp(target) {
|
|
639
562
|
return Number(target?.getAttribute("data-index"));
|