@react-spectrum/slider 3.0.5-nightly.3040 → 3.0.5-nightly.3064
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/dist/main.css +63 -2
- package/dist/main.js +649 -586
- package/dist/main.js.map +1 -1
- package/dist/module.js +641 -548
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +13 -13
- package/dist/main.css.map +0 -1
package/dist/main.js
CHANGED
|
@@ -1,625 +1,688 @@
|
|
|
1
|
-
|
|
1
|
+
require("./main.css");
|
|
2
|
+
var $aNSXN$reactariautils = require("@react-aria/utils");
|
|
3
|
+
var $aNSXN$reactspectrumutils = require("@react-spectrum/utils");
|
|
4
|
+
var $aNSXN$react = require("react");
|
|
5
|
+
var $aNSXN$reactariai18n = require("@react-aria/i18n");
|
|
6
|
+
var $aNSXN$reactstatelyslider = require("@react-stately/slider");
|
|
7
|
+
var $aNSXN$reactspectrumprovider = require("@react-spectrum/provider");
|
|
8
|
+
var $aNSXN$reactariaslider = require("@react-aria/slider");
|
|
9
|
+
var $aNSXN$reactariafocus = require("@react-aria/focus");
|
|
10
|
+
var $aNSXN$reactariainteractions = require("@react-aria/interactions");
|
|
11
|
+
var $aNSXN$reactariavisuallyhidden = require("@react-aria/visually-hidden");
|
|
12
|
+
|
|
13
|
+
function $parcel$exportWildcard(dest, source) {
|
|
14
|
+
Object.keys(source).forEach(function(key) {
|
|
15
|
+
if (key === 'default' || key === '__esModule' || dest.hasOwnProperty(key)) {
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
2
18
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
19
|
+
Object.defineProperty(dest, key, {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
get: function get() {
|
|
22
|
+
return source[key];
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
});
|
|
6
26
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
27
|
+
return dest;
|
|
28
|
+
}
|
|
29
|
+
function $parcel$interopDefault(a) {
|
|
30
|
+
return a && a.__esModule ? a.default : a;
|
|
31
|
+
}
|
|
32
|
+
function $parcel$export(e, n, v, s) {
|
|
33
|
+
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
34
|
+
}
|
|
35
|
+
var $004fd48cd418b4b6$exports = {};
|
|
36
|
+
|
|
37
|
+
$parcel$export($004fd48cd418b4b6$exports, "Slider", () => $004fd48cd418b4b6$export$472062a354075cee);
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
var $1b0036f7437cfd0c$exports = {};
|
|
45
|
+
|
|
46
|
+
$parcel$export($1b0036f7437cfd0c$exports, "spectrum-Slider", () => $1b0036f7437cfd0c$export$fc844a18ff837543, (v) => $1b0036f7437cfd0c$export$fc844a18ff837543 = v);
|
|
47
|
+
$parcel$export($1b0036f7437cfd0c$exports, "spectrum-Dial", () => $1b0036f7437cfd0c$export$db619d28010f1dd7, (v) => $1b0036f7437cfd0c$export$db619d28010f1dd7 = v);
|
|
48
|
+
$parcel$export($1b0036f7437cfd0c$exports, "spectrum-Slider--positionTop", () => $1b0036f7437cfd0c$export$3d0239f4af6225c0, (v) => $1b0036f7437cfd0c$export$3d0239f4af6225c0 = v);
|
|
49
|
+
$parcel$export($1b0036f7437cfd0c$exports, "spectrum-Slider-controls", () => $1b0036f7437cfd0c$export$eed070f7d409a4eb, (v) => $1b0036f7437cfd0c$export$eed070f7d409a4eb = v);
|
|
50
|
+
$parcel$export($1b0036f7437cfd0c$exports, "spectrum-Dial-controls", () => $1b0036f7437cfd0c$export$9a4ea6c1b342a483, (v) => $1b0036f7437cfd0c$export$9a4ea6c1b342a483 = v);
|
|
51
|
+
$parcel$export($1b0036f7437cfd0c$exports, "spectrum-Slider--positionSide", () => $1b0036f7437cfd0c$export$7e6c269c6bbb2ffa, (v) => $1b0036f7437cfd0c$export$7e6c269c6bbb2ffa = v);
|
|
52
|
+
$parcel$export($1b0036f7437cfd0c$exports, "spectrum-Slider-labelContainer", () => $1b0036f7437cfd0c$export$6a95ef18f88e804b, (v) => $1b0036f7437cfd0c$export$6a95ef18f88e804b = v);
|
|
53
|
+
$parcel$export($1b0036f7437cfd0c$exports, "spectrum-Dial-labelContainer", () => $1b0036f7437cfd0c$export$f64ec32f85626909, (v) => $1b0036f7437cfd0c$export$f64ec32f85626909 = v);
|
|
54
|
+
$parcel$export($1b0036f7437cfd0c$exports, "spectrum-Slider-valueLabelContainer", () => $1b0036f7437cfd0c$export$2183ef1701a88013, (v) => $1b0036f7437cfd0c$export$2183ef1701a88013 = v);
|
|
55
|
+
$parcel$export($1b0036f7437cfd0c$exports, "spectrum-Slider-value", () => $1b0036f7437cfd0c$export$d1c0699c6d985532, (v) => $1b0036f7437cfd0c$export$d1c0699c6d985532 = v);
|
|
56
|
+
$parcel$export($1b0036f7437cfd0c$exports, "spectrum-Slider-track", () => $1b0036f7437cfd0c$export$16e664b3091a0b47, (v) => $1b0036f7437cfd0c$export$16e664b3091a0b47 = v);
|
|
57
|
+
$parcel$export($1b0036f7437cfd0c$exports, "spectrum-Slider-buffer", () => $1b0036f7437cfd0c$export$8ac5a980ecf86d70, (v) => $1b0036f7437cfd0c$export$8ac5a980ecf86d70 = v);
|
|
58
|
+
$parcel$export($1b0036f7437cfd0c$exports, "spectrum-Slider-ramp", () => $1b0036f7437cfd0c$export$74af90f7b59a4a0b, (v) => $1b0036f7437cfd0c$export$74af90f7b59a4a0b = v);
|
|
59
|
+
$parcel$export($1b0036f7437cfd0c$exports, "spectrum-Slider-fill", () => $1b0036f7437cfd0c$export$79e384500d3b9c9d, (v) => $1b0036f7437cfd0c$export$79e384500d3b9c9d = v);
|
|
60
|
+
$parcel$export($1b0036f7437cfd0c$exports, "spectrum-Slider-fill--right", () => $1b0036f7437cfd0c$export$4ad5f741edcaf768, (v) => $1b0036f7437cfd0c$export$4ad5f741edcaf768 = v);
|
|
61
|
+
$parcel$export($1b0036f7437cfd0c$exports, "spectrum-Slider--range", () => $1b0036f7437cfd0c$export$91bbf9ca430efa38, (v) => $1b0036f7437cfd0c$export$91bbf9ca430efa38 = v);
|
|
62
|
+
$parcel$export($1b0036f7437cfd0c$exports, "spectrum-Slider-handle", () => $1b0036f7437cfd0c$export$4e56e324ec89fe53, (v) => $1b0036f7437cfd0c$export$4e56e324ec89fe53 = v);
|
|
63
|
+
$parcel$export($1b0036f7437cfd0c$exports, "spectrum-Dial-handle", () => $1b0036f7437cfd0c$export$41c59246a9248fa9, (v) => $1b0036f7437cfd0c$export$41c59246a9248fa9 = v);
|
|
64
|
+
$parcel$export($1b0036f7437cfd0c$exports, "is-dragged", () => $1b0036f7437cfd0c$export$8778c911bed6c759, (v) => $1b0036f7437cfd0c$export$8778c911bed6c759 = v);
|
|
65
|
+
$parcel$export($1b0036f7437cfd0c$exports, "is-focused", () => $1b0036f7437cfd0c$export$e7dc768d35940237, (v) => $1b0036f7437cfd0c$export$e7dc768d35940237 = v);
|
|
66
|
+
$parcel$export($1b0036f7437cfd0c$exports, "is-tophandle", () => $1b0036f7437cfd0c$export$e7c8b64dd65a8bd6, (v) => $1b0036f7437cfd0c$export$e7c8b64dd65a8bd6 = v);
|
|
67
|
+
$parcel$export($1b0036f7437cfd0c$exports, "spectrum-Slider-input", () => $1b0036f7437cfd0c$export$fdecbf00e674772b, (v) => $1b0036f7437cfd0c$export$fdecbf00e674772b = v);
|
|
68
|
+
$parcel$export($1b0036f7437cfd0c$exports, "spectrum-Dial-input", () => $1b0036f7437cfd0c$export$39043e8612543a9e, (v) => $1b0036f7437cfd0c$export$39043e8612543a9e = v);
|
|
69
|
+
$parcel$export($1b0036f7437cfd0c$exports, "spectrum-Slider-label", () => $1b0036f7437cfd0c$export$87d97f82d3be9540, (v) => $1b0036f7437cfd0c$export$87d97f82d3be9540 = v);
|
|
70
|
+
$parcel$export($1b0036f7437cfd0c$exports, "spectrum-Dial-label", () => $1b0036f7437cfd0c$export$d93200a6e46e9ce7, (v) => $1b0036f7437cfd0c$export$d93200a6e46e9ce7 = v);
|
|
71
|
+
$parcel$export($1b0036f7437cfd0c$exports, "spectrum-Dial-value", () => $1b0036f7437cfd0c$export$be548803c10dddf5, (v) => $1b0036f7437cfd0c$export$be548803c10dddf5 = v);
|
|
72
|
+
$parcel$export($1b0036f7437cfd0c$exports, "spectrum-Slider-ticks", () => $1b0036f7437cfd0c$export$8015a78273599416, (v) => $1b0036f7437cfd0c$export$8015a78273599416 = v);
|
|
73
|
+
$parcel$export($1b0036f7437cfd0c$exports, "spectrum-Slider-tick", () => $1b0036f7437cfd0c$export$daf7ddf4a129876d, (v) => $1b0036f7437cfd0c$export$daf7ddf4a129876d = v);
|
|
74
|
+
$parcel$export($1b0036f7437cfd0c$exports, "spectrum-Slider-tickLabel", () => $1b0036f7437cfd0c$export$e045256579534563, (v) => $1b0036f7437cfd0c$export$e045256579534563 = v);
|
|
75
|
+
$parcel$export($1b0036f7437cfd0c$exports, "spectrum-Slider--color", () => $1b0036f7437cfd0c$export$c0271c7b757e2c6d, (v) => $1b0036f7437cfd0c$export$c0271c7b757e2c6d = v);
|
|
76
|
+
$parcel$export($1b0036f7437cfd0c$exports, "spectrum-Dial--small", () => $1b0036f7437cfd0c$export$40db493959f853b2, (v) => $1b0036f7437cfd0c$export$40db493959f853b2 = v);
|
|
77
|
+
$parcel$export($1b0036f7437cfd0c$exports, "is-disabled", () => $1b0036f7437cfd0c$export$d35bc1e505d1ebbf, (v) => $1b0036f7437cfd0c$export$d35bc1e505d1ebbf = v);
|
|
78
|
+
$parcel$export($1b0036f7437cfd0c$exports, "is-hovered", () => $1b0036f7437cfd0c$export$b8813cd5d7824ce7, (v) => $1b0036f7437cfd0c$export$b8813cd5d7824ce7 = v);
|
|
79
|
+
$parcel$export($1b0036f7437cfd0c$exports, "u-isGrabbing", () => $1b0036f7437cfd0c$export$af9e6e484daea602, (v) => $1b0036f7437cfd0c$export$af9e6e484daea602 = v);
|
|
80
|
+
$parcel$export($1b0036f7437cfd0c$exports, "spectrum-Slider--filled", () => $1b0036f7437cfd0c$export$743466ce5e272176, (v) => $1b0036f7437cfd0c$export$743466ce5e272176 = v);
|
|
81
|
+
$parcel$export($1b0036f7437cfd0c$exports, "spectrum-Slider--ramp", () => $1b0036f7437cfd0c$export$87c47a8a21ea9aa, (v) => $1b0036f7437cfd0c$export$87c47a8a21ea9aa = v);
|
|
82
|
+
$parcel$export($1b0036f7437cfd0c$exports, "spectrum-Slider--label-side", () => $1b0036f7437cfd0c$export$fc5a803c4caf36a, (v) => $1b0036f7437cfd0c$export$fc5a803c4caf36a = v);
|
|
83
|
+
var $1b0036f7437cfd0c$export$fc844a18ff837543;
|
|
84
|
+
var $1b0036f7437cfd0c$export$db619d28010f1dd7;
|
|
85
|
+
var $1b0036f7437cfd0c$export$3d0239f4af6225c0;
|
|
86
|
+
var $1b0036f7437cfd0c$export$eed070f7d409a4eb;
|
|
87
|
+
var $1b0036f7437cfd0c$export$9a4ea6c1b342a483;
|
|
88
|
+
var $1b0036f7437cfd0c$export$7e6c269c6bbb2ffa;
|
|
89
|
+
var $1b0036f7437cfd0c$export$6a95ef18f88e804b;
|
|
90
|
+
var $1b0036f7437cfd0c$export$f64ec32f85626909;
|
|
91
|
+
var $1b0036f7437cfd0c$export$2183ef1701a88013;
|
|
92
|
+
var $1b0036f7437cfd0c$export$d1c0699c6d985532;
|
|
93
|
+
var $1b0036f7437cfd0c$export$16e664b3091a0b47;
|
|
94
|
+
var $1b0036f7437cfd0c$export$8ac5a980ecf86d70;
|
|
95
|
+
var $1b0036f7437cfd0c$export$74af90f7b59a4a0b;
|
|
96
|
+
var $1b0036f7437cfd0c$export$79e384500d3b9c9d;
|
|
97
|
+
var $1b0036f7437cfd0c$export$4ad5f741edcaf768;
|
|
98
|
+
var $1b0036f7437cfd0c$export$91bbf9ca430efa38;
|
|
99
|
+
var $1b0036f7437cfd0c$export$4e56e324ec89fe53;
|
|
100
|
+
var $1b0036f7437cfd0c$export$41c59246a9248fa9;
|
|
101
|
+
var $1b0036f7437cfd0c$export$8778c911bed6c759;
|
|
102
|
+
var $1b0036f7437cfd0c$export$e7dc768d35940237;
|
|
103
|
+
var $1b0036f7437cfd0c$export$e7c8b64dd65a8bd6;
|
|
104
|
+
var $1b0036f7437cfd0c$export$fdecbf00e674772b;
|
|
105
|
+
var $1b0036f7437cfd0c$export$39043e8612543a9e;
|
|
106
|
+
var $1b0036f7437cfd0c$export$87d97f82d3be9540;
|
|
107
|
+
var $1b0036f7437cfd0c$export$d93200a6e46e9ce7;
|
|
108
|
+
var $1b0036f7437cfd0c$export$be548803c10dddf5;
|
|
109
|
+
var $1b0036f7437cfd0c$export$8015a78273599416;
|
|
110
|
+
var $1b0036f7437cfd0c$export$daf7ddf4a129876d;
|
|
111
|
+
var $1b0036f7437cfd0c$export$e045256579534563;
|
|
112
|
+
var $1b0036f7437cfd0c$export$c0271c7b757e2c6d;
|
|
113
|
+
var $1b0036f7437cfd0c$export$40db493959f853b2;
|
|
114
|
+
var $1b0036f7437cfd0c$export$d35bc1e505d1ebbf;
|
|
115
|
+
var $1b0036f7437cfd0c$export$b8813cd5d7824ce7;
|
|
116
|
+
var $1b0036f7437cfd0c$export$af9e6e484daea602;
|
|
117
|
+
var $1b0036f7437cfd0c$export$743466ce5e272176;
|
|
118
|
+
var $1b0036f7437cfd0c$export$87c47a8a21ea9aa;
|
|
119
|
+
var $1b0036f7437cfd0c$export$fc5a803c4caf36a;
|
|
120
|
+
$1b0036f7437cfd0c$export$fc844a18ff837543 = "_spectrum-Slider_e4b6ba";
|
|
121
|
+
$1b0036f7437cfd0c$export$db619d28010f1dd7 = "_spectrum-Dial_e4b6ba";
|
|
122
|
+
$1b0036f7437cfd0c$export$3d0239f4af6225c0 = "_spectrum-Slider--positionTop_e4b6ba";
|
|
123
|
+
$1b0036f7437cfd0c$export$eed070f7d409a4eb = "_spectrum-Slider-controls_e4b6ba";
|
|
124
|
+
$1b0036f7437cfd0c$export$9a4ea6c1b342a483 = "_spectrum-Dial-controls_e4b6ba";
|
|
125
|
+
$1b0036f7437cfd0c$export$7e6c269c6bbb2ffa = "_spectrum-Slider--positionSide_e4b6ba";
|
|
126
|
+
$1b0036f7437cfd0c$export$6a95ef18f88e804b = "_spectrum-Slider-labelContainer_e4b6ba";
|
|
127
|
+
$1b0036f7437cfd0c$export$f64ec32f85626909 = "_spectrum-Dial-labelContainer_e4b6ba";
|
|
128
|
+
$1b0036f7437cfd0c$export$2183ef1701a88013 = "_spectrum-Slider-valueLabelContainer_e4b6ba";
|
|
129
|
+
$1b0036f7437cfd0c$export$d1c0699c6d985532 = "_spectrum-Slider-value_e4b6ba";
|
|
130
|
+
$1b0036f7437cfd0c$export$16e664b3091a0b47 = "_spectrum-Slider-track_e4b6ba";
|
|
131
|
+
$1b0036f7437cfd0c$export$8ac5a980ecf86d70 = "_spectrum-Slider-buffer_e4b6ba";
|
|
132
|
+
$1b0036f7437cfd0c$export$74af90f7b59a4a0b = "_spectrum-Slider-ramp_e4b6ba";
|
|
133
|
+
$1b0036f7437cfd0c$export$79e384500d3b9c9d = "_spectrum-Slider-fill_e4b6ba";
|
|
134
|
+
$1b0036f7437cfd0c$export$4ad5f741edcaf768 = "_spectrum-Slider-fill--right_e4b6ba";
|
|
135
|
+
$1b0036f7437cfd0c$export$91bbf9ca430efa38 = "_spectrum-Slider--range_e4b6ba";
|
|
136
|
+
$1b0036f7437cfd0c$export$4e56e324ec89fe53 = "_spectrum-Slider-handle_e4b6ba";
|
|
137
|
+
$1b0036f7437cfd0c$export$41c59246a9248fa9 = "_spectrum-Dial-handle_e4b6ba";
|
|
138
|
+
$1b0036f7437cfd0c$export$8778c911bed6c759 = "_is-dragged_e4b6ba";
|
|
139
|
+
$1b0036f7437cfd0c$export$e7dc768d35940237 = "_is-focused_e4b6ba";
|
|
140
|
+
$1b0036f7437cfd0c$export$e7c8b64dd65a8bd6 = "_is-tophandle_e4b6ba";
|
|
141
|
+
$1b0036f7437cfd0c$export$fdecbf00e674772b = "_spectrum-Slider-input_e4b6ba";
|
|
142
|
+
$1b0036f7437cfd0c$export$39043e8612543a9e = "_spectrum-Dial-input_e4b6ba";
|
|
143
|
+
$1b0036f7437cfd0c$export$87d97f82d3be9540 = "_spectrum-Slider-label_e4b6ba";
|
|
144
|
+
$1b0036f7437cfd0c$export$d93200a6e46e9ce7 = "_spectrum-Dial-label_e4b6ba";
|
|
145
|
+
$1b0036f7437cfd0c$export$be548803c10dddf5 = "_spectrum-Dial-value_e4b6ba";
|
|
146
|
+
$1b0036f7437cfd0c$export$8015a78273599416 = "_spectrum-Slider-ticks_e4b6ba";
|
|
147
|
+
$1b0036f7437cfd0c$export$daf7ddf4a129876d = "_spectrum-Slider-tick_e4b6ba";
|
|
148
|
+
$1b0036f7437cfd0c$export$e045256579534563 = "_spectrum-Slider-tickLabel_e4b6ba";
|
|
149
|
+
$1b0036f7437cfd0c$export$c0271c7b757e2c6d = "_spectrum-Slider--color_e4b6ba";
|
|
150
|
+
$1b0036f7437cfd0c$export$40db493959f853b2 = "_spectrum-Dial--small_e4b6ba";
|
|
151
|
+
$1b0036f7437cfd0c$export$d35bc1e505d1ebbf = "_is-disabled_e4b6ba";
|
|
152
|
+
$1b0036f7437cfd0c$export$b8813cd5d7824ce7 = "_is-hovered_e4b6ba";
|
|
153
|
+
$1b0036f7437cfd0c$export$af9e6e484daea602 = "_u-isGrabbing_e4b6ba";
|
|
154
|
+
$1b0036f7437cfd0c$export$743466ce5e272176 = "_spectrum-Slider--filled_e4b6ba";
|
|
155
|
+
$1b0036f7437cfd0c$export$87c47a8a21ea9aa = "_spectrum-Slider--ramp_e4b6ba";
|
|
156
|
+
$1b0036f7437cfd0c$export$fc5a803c4caf36a = "_spectrum-Slider--label-side_e4b6ba";
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
function $affbb9e08b166bcd$var$SliderBase(props, ref) {
|
|
163
|
+
props = $aNSXN$reactspectrumprovider.useProviderProps(props);
|
|
164
|
+
let { isDisabled: isDisabled , children: children , classes: classes , style: style , labelPosition: labelPosition = 'top' , getValueLabel: getValueLabel , showValueLabel: showValueLabel = !!props.label , formatOptions: formatOptions , minValue: minValue = 0 , maxValue: maxValue = 100 , ...otherProps } = props;
|
|
165
|
+
let { styleProps: styleProps } = $aNSXN$reactspectrumutils.useStyleProps(otherProps);
|
|
166
|
+
// `Math.abs(Math.sign(a) - Math.sign(b)) === 2` is true if the values have a different sign.
|
|
167
|
+
let alwaysDisplaySign = Math.abs(Math.sign(minValue) - Math.sign(maxValue)) === 2;
|
|
168
|
+
if (alwaysDisplaySign) {
|
|
169
|
+
if (formatOptions != null) {
|
|
170
|
+
if (!('signDisplay' in formatOptions)) formatOptions = {
|
|
171
|
+
...formatOptions,
|
|
172
|
+
// @ts-ignore
|
|
173
|
+
signDisplay: 'exceptZero'
|
|
174
|
+
};
|
|
175
|
+
} else // @ts-ignore
|
|
176
|
+
formatOptions = {
|
|
177
|
+
signDisplay: 'exceptZero'
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
const formatter = $aNSXN$reactariai18n.useNumberFormatter(formatOptions);
|
|
181
|
+
const state = $aNSXN$reactstatelyslider.useSliderState({
|
|
182
|
+
...props,
|
|
183
|
+
numberFormatter: formatter,
|
|
184
|
+
minValue: minValue,
|
|
185
|
+
maxValue: maxValue
|
|
186
|
+
});
|
|
187
|
+
let trackRef = $aNSXN$react.useRef();
|
|
188
|
+
let { groupProps: groupProps , trackProps: trackProps , labelProps: labelProps , outputProps: outputProps } = $aNSXN$reactariaslider.useSlider(props, state, trackRef);
|
|
189
|
+
let inputRef = $aNSXN$react.useRef();
|
|
190
|
+
let domRef = $aNSXN$reactspectrumutils.useFocusableRef(ref, inputRef);
|
|
191
|
+
let displayValue = '';
|
|
192
|
+
let maxLabelLength = undefined;
|
|
193
|
+
if (typeof getValueLabel === 'function') {
|
|
194
|
+
displayValue = getValueLabel(state.values);
|
|
195
|
+
switch(state.values.length){
|
|
196
|
+
case 1:
|
|
197
|
+
maxLabelLength = Math.max(getValueLabel([
|
|
198
|
+
minValue
|
|
199
|
+
]).length, getValueLabel([
|
|
200
|
+
maxValue
|
|
201
|
+
]).length);
|
|
202
|
+
break;
|
|
203
|
+
case 2:
|
|
204
|
+
// Try all possible combinations of min and max values.
|
|
205
|
+
maxLabelLength = Math.max(getValueLabel([
|
|
206
|
+
minValue,
|
|
207
|
+
minValue
|
|
208
|
+
]).length, getValueLabel([
|
|
209
|
+
minValue,
|
|
210
|
+
maxValue
|
|
211
|
+
]).length, getValueLabel([
|
|
212
|
+
maxValue,
|
|
213
|
+
minValue
|
|
214
|
+
]).length, getValueLabel([
|
|
215
|
+
maxValue,
|
|
216
|
+
maxValue
|
|
217
|
+
]).length);
|
|
218
|
+
break;
|
|
219
|
+
default:
|
|
220
|
+
throw new Error('Only sliders with 1 or 2 handles are supported!');
|
|
221
|
+
}
|
|
222
|
+
} else {
|
|
223
|
+
maxLabelLength = Math.max([
|
|
224
|
+
...formatter.format(minValue)
|
|
225
|
+
].length, [
|
|
226
|
+
...formatter.format(maxValue)
|
|
227
|
+
].length);
|
|
228
|
+
switch(state.values.length){
|
|
229
|
+
case 1:
|
|
230
|
+
displayValue = state.getThumbValueLabel(0);
|
|
231
|
+
break;
|
|
232
|
+
case 2:
|
|
233
|
+
// This should really use the NumberFormat#formatRange proposal...
|
|
234
|
+
// https://github.com/tc39/ecma402/issues/393
|
|
235
|
+
// https://github.com/tc39/proposal-intl-numberformat-v3#formatrange-ecma-402-393
|
|
236
|
+
displayValue = `${state.getThumbValueLabel(0)} – ${state.getThumbValueLabel(1)}`;
|
|
237
|
+
maxLabelLength = 3 + 2 * Math.max(maxLabelLength, [
|
|
238
|
+
...formatter.format(minValue)
|
|
239
|
+
].length, [
|
|
240
|
+
...formatter.format(maxValue)
|
|
241
|
+
].length);
|
|
242
|
+
break;
|
|
243
|
+
default:
|
|
244
|
+
throw new Error('Only sliders with 1 or 2 handles are supported!');
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
let labelNode = /*#__PURE__*/ ($parcel$interopDefault($aNSXN$react)).createElement("label", {
|
|
248
|
+
className: $aNSXN$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($1b0036f7437cfd0c$exports)), 'spectrum-Slider-label'),
|
|
249
|
+
...labelProps
|
|
250
|
+
}, props.label);
|
|
251
|
+
let valueNode = /*#__PURE__*/ ($parcel$interopDefault($aNSXN$react)).createElement("output", {
|
|
252
|
+
...outputProps,
|
|
253
|
+
className: $aNSXN$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($1b0036f7437cfd0c$exports)), 'spectrum-Slider-value'),
|
|
254
|
+
style: maxLabelLength && {
|
|
255
|
+
width: `${maxLabelLength}ch`,
|
|
256
|
+
minWidth: `${maxLabelLength}ch`
|
|
257
|
+
}
|
|
258
|
+
}, displayValue);
|
|
259
|
+
return(/*#__PURE__*/ ($parcel$interopDefault($aNSXN$react)).createElement("div", {
|
|
260
|
+
ref: domRef,
|
|
261
|
+
className: $aNSXN$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($1b0036f7437cfd0c$exports)), 'spectrum-Slider', {
|
|
262
|
+
'spectrum-Slider--positionTop': labelPosition === 'top',
|
|
263
|
+
'spectrum-Slider--positionSide': labelPosition === 'side',
|
|
264
|
+
'is-disabled': isDisabled
|
|
265
|
+
}, classes, styleProps.className),
|
|
266
|
+
style: {
|
|
267
|
+
...style,
|
|
268
|
+
...styleProps.style
|
|
269
|
+
},
|
|
270
|
+
...groupProps
|
|
271
|
+
}, props.label && /*#__PURE__*/ ($parcel$interopDefault($aNSXN$react)).createElement("div", {
|
|
272
|
+
className: $aNSXN$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($1b0036f7437cfd0c$exports)), 'spectrum-Slider-labelContainer'),
|
|
273
|
+
role: "presentation"
|
|
274
|
+
}, props.label && labelNode, labelPosition === 'top' && showValueLabel && valueNode), /*#__PURE__*/ ($parcel$interopDefault($aNSXN$react)).createElement("div", {
|
|
275
|
+
className: $aNSXN$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($1b0036f7437cfd0c$exports)), 'spectrum-Slider-controls'),
|
|
276
|
+
ref: trackRef,
|
|
277
|
+
...trackProps,
|
|
278
|
+
role: "presentation"
|
|
279
|
+
}, children({
|
|
280
|
+
trackRef: trackRef,
|
|
281
|
+
inputRef: inputRef,
|
|
282
|
+
state: state
|
|
283
|
+
})), labelPosition === 'side' && /*#__PURE__*/ ($parcel$interopDefault($aNSXN$react)).createElement("div", {
|
|
284
|
+
className: $aNSXN$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($1b0036f7437cfd0c$exports)), 'spectrum-Slider-valueLabelContainer'),
|
|
285
|
+
role: "presentation"
|
|
286
|
+
}, showValueLabel && valueNode)));
|
|
287
|
+
}
|
|
288
|
+
const $affbb9e08b166bcd$export$9418495bb635ebde = /*#__PURE__*/ ($parcel$interopDefault($aNSXN$react)).forwardRef($affbb9e08b166bcd$var$SliderBase);
|
|
10
289
|
|
|
11
|
-
var {
|
|
12
|
-
FocusRing
|
|
13
|
-
} = require("@react-aria/focus");
|
|
14
290
|
|
|
15
|
-
var {
|
|
16
|
-
useSlider,
|
|
17
|
-
useSliderThumb
|
|
18
|
-
} = require("@react-aria/slider");
|
|
19
291
|
|
|
20
|
-
var {
|
|
21
|
-
useProviderProps
|
|
22
|
-
} = require("@react-spectrum/provider");
|
|
23
292
|
|
|
24
|
-
var {
|
|
25
|
-
useNumberFormatter,
|
|
26
|
-
useLocale,
|
|
27
|
-
useMessageFormatter
|
|
28
|
-
} = require("@react-aria/i18n");
|
|
29
293
|
|
|
30
|
-
var {
|
|
31
|
-
useSliderState
|
|
32
|
-
} = require("@react-stately/slider");
|
|
33
294
|
|
|
34
|
-
var _react2 = require("react");
|
|
35
295
|
|
|
36
|
-
var _react = $parcel$interopDefault(_react2);
|
|
37
296
|
|
|
38
|
-
var {
|
|
39
|
-
useRef
|
|
40
|
-
} = _react2;
|
|
41
297
|
|
|
42
|
-
var {
|
|
43
|
-
classNames,
|
|
44
|
-
useFocusableRef,
|
|
45
|
-
useStyleProps
|
|
46
|
-
} = require("@react-spectrum/utils");
|
|
47
298
|
|
|
48
|
-
var {
|
|
49
|
-
clamp,
|
|
50
|
-
mergeProps
|
|
51
|
-
} = require("@react-aria/utils");
|
|
52
299
|
|
|
53
|
-
|
|
300
|
+
function $fd0b2b20217355e3$export$2c1b491743890dec(props) {
|
|
301
|
+
let { index: index , inputRef: inputRef , state: state } = props;
|
|
302
|
+
let backupRef = $aNSXN$react.useRef();
|
|
303
|
+
inputRef = inputRef || backupRef;
|
|
304
|
+
let { thumbProps: thumbProps , inputProps: inputProps } = $aNSXN$reactariaslider.useSliderThumb({
|
|
305
|
+
...props,
|
|
306
|
+
inputRef: inputRef
|
|
307
|
+
}, state);
|
|
308
|
+
let { hoverProps: hoverProps , isHovered: isHovered } = $aNSXN$reactariainteractions.useHover({
|
|
309
|
+
});
|
|
310
|
+
let { direction: direction } = $aNSXN$reactariai18n.useLocale();
|
|
311
|
+
let cssDirection = direction === 'rtl' ? 'right' : 'left';
|
|
312
|
+
return(/*#__PURE__*/ ($parcel$interopDefault($aNSXN$react)).createElement($aNSXN$reactariafocus.FocusRing, {
|
|
313
|
+
within: true,
|
|
314
|
+
focusRingClass: $aNSXN$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($1b0036f7437cfd0c$exports)), 'is-focused')
|
|
315
|
+
}, /*#__PURE__*/ ($parcel$interopDefault($aNSXN$react)).createElement("div", {
|
|
316
|
+
className: $aNSXN$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($1b0036f7437cfd0c$exports)), 'spectrum-Slider-handle', {
|
|
317
|
+
'is-hovered': isHovered,
|
|
318
|
+
'is-dragged': state.isThumbDragging(index),
|
|
319
|
+
'is-tophandle': state.focusedThumb === index
|
|
320
|
+
}),
|
|
321
|
+
style: {
|
|
322
|
+
[cssDirection]: `${state.getThumbPercent(index) * 100}%`
|
|
323
|
+
},
|
|
324
|
+
...$aNSXN$reactariautils.mergeProps(thumbProps, hoverProps),
|
|
325
|
+
role: "presentation"
|
|
326
|
+
}, /*#__PURE__*/ ($parcel$interopDefault($aNSXN$react)).createElement($aNSXN$reactariavisuallyhidden.VisuallyHidden, null, /*#__PURE__*/ ($parcel$interopDefault($aNSXN$react)).createElement("input", {
|
|
327
|
+
className: $aNSXN$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($1b0036f7437cfd0c$exports)), 'spectrum-Slider-input'),
|
|
328
|
+
ref: inputRef,
|
|
329
|
+
...inputProps
|
|
330
|
+
})))));
|
|
331
|
+
}
|
|
54
332
|
|
|
55
|
-
var _babelRuntimeHelpersExtends = $parcel$interopDefault(require("@babel/runtime/helpers/extends"));
|
|
56
333
|
|
|
57
|
-
require("./main.css");
|
|
58
334
|
|
|
59
|
-
function $parcel$interopDefault(a) {
|
|
60
|
-
return a && a.__esModule ? a.default : a;
|
|
61
|
-
}
|
|
62
335
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
var
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
isDisabled,
|
|
111
|
-
children,
|
|
112
|
-
classes,
|
|
113
|
-
style,
|
|
114
|
-
labelPosition = 'top',
|
|
115
|
-
getValueLabel,
|
|
116
|
-
showValueLabel = !!props.label,
|
|
117
|
-
formatOptions,
|
|
118
|
-
minValue = 0,
|
|
119
|
-
maxValue = 100
|
|
120
|
-
} = props,
|
|
121
|
-
otherProps = _babelRuntimeHelpersObjectWithoutPropertiesLoose(props, ["isDisabled", "children", "classes", "style", "labelPosition", "getValueLabel", "showValueLabel", "formatOptions", "minValue", "maxValue"]);
|
|
122
|
-
|
|
123
|
-
let {
|
|
124
|
-
styleProps
|
|
125
|
-
} = useStyleProps(otherProps); // `Math.abs(Math.sign(a) - Math.sign(b)) === 2` is true if the values have a different sign.
|
|
126
|
-
|
|
127
|
-
let alwaysDisplaySign = Math.abs(Math.sign(minValue) - Math.sign(maxValue)) === 2;
|
|
128
|
-
|
|
129
|
-
if (alwaysDisplaySign) {
|
|
130
|
-
if (formatOptions != null) {
|
|
131
|
-
if (!('signDisplay' in formatOptions)) {
|
|
132
|
-
formatOptions = _babelRuntimeHelpersExtends({}, formatOptions, {
|
|
133
|
-
// @ts-ignore
|
|
134
|
-
signDisplay: 'exceptZero'
|
|
336
|
+
function $004fd48cd418b4b6$var$Slider(props, ref) {
|
|
337
|
+
let { onChange: onChange , onChangeEnd: onChangeEnd , value: value , defaultValue: defaultValue , isFilled: isFilled , fillOffset: fillOffset , trackGradient: trackGradient , getValueLabel: getValueLabel , ...otherProps } = props;
|
|
338
|
+
let baseProps = {
|
|
339
|
+
...otherProps,
|
|
340
|
+
// Normalize `value: number[]` to `value: number`
|
|
341
|
+
value: value != null ? [
|
|
342
|
+
value
|
|
343
|
+
] : undefined,
|
|
344
|
+
defaultValue: defaultValue != null ? [
|
|
345
|
+
defaultValue
|
|
346
|
+
] : undefined,
|
|
347
|
+
onChange: (v)=>{
|
|
348
|
+
onChange?.(v[0]);
|
|
349
|
+
},
|
|
350
|
+
onChangeEnd: (v)=>{
|
|
351
|
+
onChangeEnd?.(v[0]);
|
|
352
|
+
},
|
|
353
|
+
getValueLabel: getValueLabel ? ([v])=>getValueLabel(v)
|
|
354
|
+
: undefined
|
|
355
|
+
};
|
|
356
|
+
let { direction: direction } = $aNSXN$reactariai18n.useLocale();
|
|
357
|
+
return(/*#__PURE__*/ ($parcel$interopDefault($aNSXN$react)).createElement($affbb9e08b166bcd$export$9418495bb635ebde, {
|
|
358
|
+
...baseProps,
|
|
359
|
+
ref: ref,
|
|
360
|
+
classes: {
|
|
361
|
+
'spectrum-Slider--filled': isFilled && fillOffset == null
|
|
362
|
+
},
|
|
363
|
+
style: // @ts-ignore
|
|
364
|
+
{
|
|
365
|
+
'--spectrum-slider-track-gradient': trackGradient && `linear-gradient(to ${direction === 'ltr' ? 'right' : 'left'}, ${trackGradient.join(', ')})`
|
|
366
|
+
}
|
|
367
|
+
}, ({ trackRef: trackRef , inputRef: inputRef , state: state })=>{
|
|
368
|
+
fillOffset = fillOffset != null ? $aNSXN$reactariautils.clamp(fillOffset, state.getThumbMinValue(0), state.getThumbMaxValue(0)) : fillOffset;
|
|
369
|
+
let cssDirection = direction === 'rtl' ? 'right' : 'left';
|
|
370
|
+
let lowerTrack = /*#__PURE__*/ ($parcel$interopDefault($aNSXN$react)).createElement("div", {
|
|
371
|
+
className: $aNSXN$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($1b0036f7437cfd0c$exports)), 'spectrum-Slider-track'),
|
|
372
|
+
style: {
|
|
373
|
+
width: `${state.getThumbPercent(0) * 100}%`,
|
|
374
|
+
// TODO not sure if it has advantages, but this could also be implemented as CSS calc():
|
|
375
|
+
// .track::before {
|
|
376
|
+
// background-size: calc((1/ (var(--width)/100)) * 100%);
|
|
377
|
+
// width: calc(var(--width) * 1%)M
|
|
378
|
+
// }
|
|
379
|
+
// @ts-ignore
|
|
380
|
+
'--spectrum-track-background-size': `${1 / state.getThumbPercent(0) * 100}%`,
|
|
381
|
+
'--spectrum-track-background-position': direction === 'ltr' ? '0' : '100%'
|
|
382
|
+
}
|
|
135
383
|
});
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
// Try all possible combinations of min and max values.
|
|
173
|
-
maxLabelLength = Math.max(getValueLabel([minValue, minValue]).length, getValueLabel([minValue, maxValue]).length, getValueLabel([maxValue, minValue]).length, getValueLabel([maxValue, maxValue]).length);
|
|
174
|
-
break;
|
|
175
|
-
|
|
176
|
-
default:
|
|
177
|
-
throw new Error('Only sliders with 1 or 2 handles are supported!');
|
|
178
|
-
}
|
|
179
|
-
} else {
|
|
180
|
-
maxLabelLength = Math.max([...formatter.format(minValue)].length, [...formatter.format(maxValue)].length);
|
|
181
|
-
|
|
182
|
-
switch (state.values.length) {
|
|
183
|
-
case 1:
|
|
184
|
-
displayValue = state.getThumbValueLabel(0);
|
|
185
|
-
break;
|
|
186
|
-
|
|
187
|
-
case 2:
|
|
188
|
-
// This should really use the NumberFormat#formatRange proposal...
|
|
189
|
-
// https://github.com/tc39/ecma402/issues/393
|
|
190
|
-
// https://github.com/tc39/proposal-intl-numberformat-v3#formatrange-ecma-402-393
|
|
191
|
-
displayValue = state.getThumbValueLabel(0) + " \u2013 " + state.getThumbValueLabel(1);
|
|
192
|
-
maxLabelLength = 3 + 2 * Math.max(maxLabelLength, [...formatter.format(minValue)].length, [...formatter.format(maxValue)].length);
|
|
193
|
-
break;
|
|
194
|
-
|
|
195
|
-
default:
|
|
196
|
-
throw new Error('Only sliders with 1 or 2 handles are supported!');
|
|
197
|
-
}
|
|
198
|
-
}
|
|
384
|
+
let upperTrack = /*#__PURE__*/ ($parcel$interopDefault($aNSXN$react)).createElement("div", {
|
|
385
|
+
className: $aNSXN$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($1b0036f7437cfd0c$exports)), 'spectrum-Slider-track'),
|
|
386
|
+
style: {
|
|
387
|
+
width: `${(1 - state.getThumbPercent(0)) * 100}%`,
|
|
388
|
+
// @ts-ignore
|
|
389
|
+
'--spectrum-track-background-size': `${1 / (1 - state.getThumbPercent(0)) * 100}%`,
|
|
390
|
+
'--spectrum-track-background-position': direction === 'ltr' ? '100%' : '0'
|
|
391
|
+
}
|
|
392
|
+
});
|
|
393
|
+
let filledTrack = null;
|
|
394
|
+
if (isFilled && fillOffset != null) {
|
|
395
|
+
let width = state.getThumbPercent(0) - state.getValuePercent(fillOffset);
|
|
396
|
+
let isRightOfOffset = width > 0;
|
|
397
|
+
let offset = isRightOfOffset ? state.getValuePercent(fillOffset) : state.getThumbPercent(0);
|
|
398
|
+
filledTrack = /*#__PURE__*/ ($parcel$interopDefault($aNSXN$react)).createElement("div", {
|
|
399
|
+
className: $aNSXN$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($1b0036f7437cfd0c$exports)), 'spectrum-Slider-fill', {
|
|
400
|
+
'spectrum-Slider-fill--right': isRightOfOffset
|
|
401
|
+
}),
|
|
402
|
+
style: {
|
|
403
|
+
[cssDirection]: `${offset * 100}%`,
|
|
404
|
+
width: `${Math.abs(width) * 100}%`
|
|
405
|
+
}
|
|
406
|
+
});
|
|
407
|
+
}
|
|
408
|
+
return(/*#__PURE__*/ ($parcel$interopDefault($aNSXN$react)).createElement(($parcel$interopDefault($aNSXN$react)).Fragment, null, lowerTrack, /*#__PURE__*/ ($parcel$interopDefault($aNSXN$react)).createElement($fd0b2b20217355e3$export$2c1b491743890dec, {
|
|
409
|
+
index: 0,
|
|
410
|
+
isDisabled: props.isDisabled,
|
|
411
|
+
trackRef: trackRef,
|
|
412
|
+
inputRef: inputRef,
|
|
413
|
+
state: state
|
|
414
|
+
}), upperTrack, filledTrack));
|
|
415
|
+
}));
|
|
416
|
+
}
|
|
417
|
+
/**
|
|
418
|
+
* Sliders allow users to quickly select a value within a range. They should be used when the upper and lower bounds to the range are invariable.
|
|
419
|
+
*/ const $004fd48cd418b4b6$export$472062a354075cee = /*#__PURE__*/ ($parcel$interopDefault($aNSXN$react)).forwardRef($004fd48cd418b4b6$var$Slider);
|
|
199
420
|
|
|
200
|
-
let labelNode = /*#__PURE__*/_react.createElement("label", _babelRuntimeHelpersExtends({
|
|
201
|
-
className: classNames($c8f0b01c76499f8ceef39abc1b587900$$interop$default, 'spectrum-Slider-label')
|
|
202
|
-
}, labelProps), props.label);
|
|
203
421
|
|
|
204
|
-
|
|
205
|
-
className: classNames($c8f0b01c76499f8ceef39abc1b587900$$interop$default, 'spectrum-Slider-value'),
|
|
206
|
-
style: maxLabelLength && {
|
|
207
|
-
width: maxLabelLength + "ch",
|
|
208
|
-
minWidth: maxLabelLength + "ch"
|
|
209
|
-
}
|
|
210
|
-
}), displayValue);
|
|
211
|
-
|
|
212
|
-
return /*#__PURE__*/_react.createElement("div", _babelRuntimeHelpersExtends({
|
|
213
|
-
ref: domRef,
|
|
214
|
-
className: classNames($c8f0b01c76499f8ceef39abc1b587900$$interop$default, 'spectrum-Slider', {
|
|
215
|
-
'spectrum-Slider--positionTop': labelPosition === 'top',
|
|
216
|
-
'spectrum-Slider--positionSide': labelPosition === 'side',
|
|
217
|
-
'is-disabled': isDisabled
|
|
218
|
-
}, classes, styleProps.className),
|
|
219
|
-
style: _babelRuntimeHelpersExtends({}, style, styleProps.style)
|
|
220
|
-
}, groupProps), props.label && /*#__PURE__*/_react.createElement("div", {
|
|
221
|
-
className: classNames($c8f0b01c76499f8ceef39abc1b587900$$interop$default, 'spectrum-Slider-labelContainer'),
|
|
222
|
-
role: "presentation"
|
|
223
|
-
}, props.label && labelNode, labelPosition === 'top' && showValueLabel && valueNode), /*#__PURE__*/_react.createElement("div", _babelRuntimeHelpersExtends({
|
|
224
|
-
className: classNames($c8f0b01c76499f8ceef39abc1b587900$$interop$default, 'spectrum-Slider-controls'),
|
|
225
|
-
ref: trackRef
|
|
226
|
-
}, trackProps, {
|
|
227
|
-
role: "presentation"
|
|
228
|
-
}), children({
|
|
229
|
-
trackRef,
|
|
230
|
-
inputRef,
|
|
231
|
-
state
|
|
232
|
-
})), labelPosition === 'side' && /*#__PURE__*/_react.createElement("div", {
|
|
233
|
-
className: classNames($c8f0b01c76499f8ceef39abc1b587900$$interop$default, 'spectrum-Slider-valueLabelContainer'),
|
|
234
|
-
role: "presentation"
|
|
235
|
-
}, showValueLabel && valueNode));
|
|
236
|
-
}
|
|
422
|
+
var $9dfe4d8e2be34bd3$exports = {};
|
|
237
423
|
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
function $d5bef0bb79767419ec0237e591b28$export$SliderThumb(props) {
|
|
241
|
-
let {
|
|
242
|
-
index,
|
|
243
|
-
inputRef,
|
|
244
|
-
state
|
|
245
|
-
} = props;
|
|
246
|
-
let backupRef = useRef();
|
|
247
|
-
inputRef = inputRef || backupRef;
|
|
248
|
-
let {
|
|
249
|
-
thumbProps,
|
|
250
|
-
inputProps
|
|
251
|
-
} = useSliderThumb(_babelRuntimeHelpersExtends({}, props, {
|
|
252
|
-
inputRef
|
|
253
|
-
}), state);
|
|
254
|
-
let {
|
|
255
|
-
hoverProps,
|
|
256
|
-
isHovered
|
|
257
|
-
} = useHover({});
|
|
258
|
-
let {
|
|
259
|
-
direction
|
|
260
|
-
} = useLocale();
|
|
261
|
-
let cssDirection = direction === 'rtl' ? 'right' : 'left';
|
|
262
|
-
return /*#__PURE__*/_react.createElement(FocusRing, {
|
|
263
|
-
within: true,
|
|
264
|
-
focusRingClass: classNames($c8f0b01c76499f8ceef39abc1b587900$$interop$default, 'is-focused')
|
|
265
|
-
}, /*#__PURE__*/_react.createElement("div", _babelRuntimeHelpersExtends({
|
|
266
|
-
className: classNames($c8f0b01c76499f8ceef39abc1b587900$$interop$default, 'spectrum-Slider-handle', {
|
|
267
|
-
'is-hovered': isHovered,
|
|
268
|
-
'is-dragged': state.isThumbDragging(index),
|
|
269
|
-
'is-tophandle': state.focusedThumb === index
|
|
270
|
-
}),
|
|
271
|
-
style: {
|
|
272
|
-
[cssDirection]: state.getThumbPercent(index) * 100 + "%"
|
|
273
|
-
}
|
|
274
|
-
}, mergeProps(thumbProps, hoverProps), {
|
|
275
|
-
role: "presentation"
|
|
276
|
-
}), /*#__PURE__*/_react.createElement(VisuallyHidden, null, /*#__PURE__*/_react.createElement("input", _babelRuntimeHelpersExtends({
|
|
277
|
-
className: classNames($c8f0b01c76499f8ceef39abc1b587900$$interop$default, 'spectrum-Slider-input'),
|
|
278
|
-
ref: inputRef
|
|
279
|
-
}, inputProps)))));
|
|
280
|
-
}
|
|
424
|
+
$parcel$export($9dfe4d8e2be34bd3$exports, "RangeSlider", () => $9dfe4d8e2be34bd3$export$826424dabc3dd705);
|
|
281
425
|
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
onChangeEnd: _onChangeEnd,
|
|
286
|
-
value,
|
|
287
|
-
defaultValue,
|
|
288
|
-
isFilled,
|
|
289
|
-
fillOffset,
|
|
290
|
-
trackGradient,
|
|
291
|
-
getValueLabel
|
|
292
|
-
} = props,
|
|
293
|
-
otherProps = _babelRuntimeHelpersObjectWithoutPropertiesLoose(props, ["onChange", "onChangeEnd", "value", "defaultValue", "isFilled", "fillOffset", "trackGradient", "getValueLabel"]);
|
|
294
|
-
|
|
295
|
-
let baseProps = _babelRuntimeHelpersExtends({}, otherProps, {
|
|
296
|
-
// Normalize `value: number[]` to `value: number`
|
|
297
|
-
value: value != null ? [value] : undefined,
|
|
298
|
-
defaultValue: defaultValue != null ? [defaultValue] : undefined,
|
|
299
|
-
onChange: v => {
|
|
300
|
-
_onChange == null ? void 0 : _onChange(v[0]);
|
|
301
|
-
},
|
|
302
|
-
onChangeEnd: v => {
|
|
303
|
-
_onChangeEnd == null ? void 0 : _onChangeEnd(v[0]);
|
|
304
|
-
},
|
|
305
|
-
getValueLabel: getValueLabel ? (_ref) => {
|
|
306
|
-
let [v] = _ref;
|
|
307
|
-
return getValueLabel(v);
|
|
308
|
-
} : undefined
|
|
309
|
-
});
|
|
426
|
+
var $8d4b09353ea10dd8$exports = {};
|
|
427
|
+
var $19cb148615246852$exports = {};
|
|
428
|
+
$19cb148615246852$exports = JSON.parse("{\"maximum\":\"أقصى\",\"minimum\":\"أدنى\"}");
|
|
310
429
|
|
|
311
|
-
let {
|
|
312
|
-
direction
|
|
313
|
-
} = useLocale();
|
|
314
|
-
return /*#__PURE__*/_react.createElement($e14249f20430d37bc9376d3f2ea9af72$export$SliderBase, _babelRuntimeHelpersExtends({}, baseProps, {
|
|
315
|
-
ref: ref,
|
|
316
|
-
classes: {
|
|
317
|
-
'spectrum-Slider--filled': isFilled && fillOffset == null
|
|
318
|
-
},
|
|
319
|
-
style: // @ts-ignore
|
|
320
|
-
{
|
|
321
|
-
'--spectrum-slider-track-gradient': trackGradient && "linear-gradient(to " + (direction === 'ltr' ? 'right' : 'left') + ", " + trackGradient.join(', ') + ")"
|
|
322
|
-
}
|
|
323
|
-
}), (_ref2) => {
|
|
324
|
-
let {
|
|
325
|
-
trackRef,
|
|
326
|
-
inputRef,
|
|
327
|
-
state
|
|
328
|
-
} = _ref2;
|
|
329
|
-
fillOffset = fillOffset != null ? clamp(fillOffset, state.getThumbMinValue(0), state.getThumbMaxValue(0)) : fillOffset;
|
|
330
|
-
let cssDirection = direction === 'rtl' ? 'right' : 'left';
|
|
331
430
|
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
style: {
|
|
335
|
-
width: state.getThumbPercent(0) * 100 + "%",
|
|
336
|
-
// TODO not sure if it has advantages, but this could also be implemented as CSS calc():
|
|
337
|
-
// .track::before {
|
|
338
|
-
// background-size: calc((1/ (var(--width)/100)) * 100%);
|
|
339
|
-
// width: calc(var(--width) * 1%)M
|
|
340
|
-
// }
|
|
341
|
-
// @ts-ignore
|
|
342
|
-
'--spectrum-track-background-size': 1 / state.getThumbPercent(0) * 100 + "%",
|
|
343
|
-
'--spectrum-track-background-position': direction === 'ltr' ? '0' : '100%'
|
|
344
|
-
}
|
|
345
|
-
});
|
|
431
|
+
var $bda81ba95f451834$exports = {};
|
|
432
|
+
$bda81ba95f451834$exports = JSON.parse("{\"maximum\":\"Максимум\",\"minimum\":\"Минимум\"}");
|
|
346
433
|
|
|
347
|
-
let upperTrack = /*#__PURE__*/_react.createElement("div", {
|
|
348
|
-
className: classNames($c8f0b01c76499f8ceef39abc1b587900$$interop$default, 'spectrum-Slider-track'),
|
|
349
|
-
style: {
|
|
350
|
-
width: (1 - state.getThumbPercent(0)) * 100 + "%",
|
|
351
|
-
// @ts-ignore
|
|
352
|
-
'--spectrum-track-background-size': 1 / (1 - state.getThumbPercent(0)) * 100 + "%",
|
|
353
|
-
'--spectrum-track-background-position': direction === 'ltr' ? '100%' : '0'
|
|
354
|
-
}
|
|
355
|
-
});
|
|
356
434
|
|
|
357
|
-
|
|
435
|
+
var $22a7dd9d694d98a2$exports = {};
|
|
436
|
+
$22a7dd9d694d98a2$exports = JSON.parse("{\"maximum\":\"Maximum\",\"minimum\":\"Minimum\"}");
|
|
358
437
|
|
|
359
|
-
if (isFilled && fillOffset != null) {
|
|
360
|
-
let width = state.getThumbPercent(0) - state.getValuePercent(fillOffset);
|
|
361
|
-
let isRightOfOffset = width > 0;
|
|
362
|
-
let offset = isRightOfOffset ? state.getValuePercent(fillOffset) : state.getThumbPercent(0);
|
|
363
|
-
filledTrack = /*#__PURE__*/_react.createElement("div", {
|
|
364
|
-
className: classNames($c8f0b01c76499f8ceef39abc1b587900$$interop$default, 'spectrum-Slider-fill', {
|
|
365
|
-
'spectrum-Slider-fill--right': isRightOfOffset
|
|
366
|
-
}),
|
|
367
|
-
style: {
|
|
368
|
-
[cssDirection]: offset * 100 + "%",
|
|
369
|
-
width: Math.abs(width) * 100 + "%"
|
|
370
|
-
}
|
|
371
|
-
});
|
|
372
|
-
}
|
|
373
438
|
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
}
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
exports
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
var $
|
|
399
|
-
$
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
$
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
var $
|
|
411
|
-
$
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
$
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
var $
|
|
423
|
-
$
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
$
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
var $
|
|
435
|
-
$
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
$
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
var $
|
|
447
|
-
$
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
$
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
var $
|
|
459
|
-
$
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
$
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
var $
|
|
471
|
-
$
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
$
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
var $
|
|
483
|
-
$
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
$
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
439
|
+
var $922dd1c9231a213d$exports = {};
|
|
440
|
+
$922dd1c9231a213d$exports = JSON.parse("{\"maximum\":\"Maksimum\",\"minimum\":\"Minimum\"}");
|
|
441
|
+
|
|
442
|
+
|
|
443
|
+
var $ec911369a794a3ba$exports = {};
|
|
444
|
+
$ec911369a794a3ba$exports = JSON.parse("{\"maximum\":\"Maximum\",\"minimum\":\"Minimum\"}");
|
|
445
|
+
|
|
446
|
+
|
|
447
|
+
var $7c60fd69a7890e67$exports = {};
|
|
448
|
+
$7c60fd69a7890e67$exports = JSON.parse("{\"maximum\":\"Μέγιστο\",\"minimum\":\"Ελάχιστο\"}");
|
|
449
|
+
|
|
450
|
+
|
|
451
|
+
var $489976b57108fe5b$exports = {};
|
|
452
|
+
$489976b57108fe5b$exports = JSON.parse("{\"minimum\":\"Minimum\",\"maximum\":\"Maximum\"}");
|
|
453
|
+
|
|
454
|
+
|
|
455
|
+
var $a3b68234bca6bcfd$exports = {};
|
|
456
|
+
$a3b68234bca6bcfd$exports = JSON.parse("{\"maximum\":\"Máximo\",\"minimum\":\"Mínimo\"}");
|
|
457
|
+
|
|
458
|
+
|
|
459
|
+
var $be37b960859ff577$exports = {};
|
|
460
|
+
$be37b960859ff577$exports = JSON.parse("{\"maximum\":\"Maksimaalne\",\"minimum\":\"Minimaalne\"}");
|
|
461
|
+
|
|
462
|
+
|
|
463
|
+
var $f792e3dc24a0608d$exports = {};
|
|
464
|
+
$f792e3dc24a0608d$exports = JSON.parse("{\"maximum\":\"Maksimi\",\"minimum\":\"Minimi\"}");
|
|
465
|
+
|
|
466
|
+
|
|
467
|
+
var $fa05b78df55dfa31$exports = {};
|
|
468
|
+
$fa05b78df55dfa31$exports = JSON.parse("{\"maximum\":\"Maximum\",\"minimum\":\"Minimum\"}");
|
|
469
|
+
|
|
470
|
+
|
|
471
|
+
var $ad90d97685655bcd$exports = {};
|
|
472
|
+
$ad90d97685655bcd$exports = JSON.parse("{\"maximum\":\"מקסימום\",\"minimum\":\"מינימום\"}");
|
|
473
|
+
|
|
474
|
+
|
|
475
|
+
var $3b2d77b66c66bc70$exports = {};
|
|
476
|
+
$3b2d77b66c66bc70$exports = JSON.parse("{\"maximum\":\"Najviše\",\"minimum\":\"Najmanje\"}");
|
|
477
|
+
|
|
478
|
+
|
|
479
|
+
var $3c70d9ea0361307d$exports = {};
|
|
480
|
+
$3c70d9ea0361307d$exports = JSON.parse("{\"maximum\":\"Maximum\",\"minimum\":\"Minimum\"}");
|
|
481
|
+
|
|
482
|
+
|
|
483
|
+
var $e80bf2704aaced96$exports = {};
|
|
484
|
+
$e80bf2704aaced96$exports = JSON.parse("{\"maximum\":\"Massimo\",\"minimum\":\"Minimo\"}");
|
|
485
|
+
|
|
486
|
+
|
|
487
|
+
var $9b1fc5713e2d67e7$exports = {};
|
|
488
|
+
$9b1fc5713e2d67e7$exports = JSON.parse("{\"maximum\":\"最大\",\"minimum\":\"最小\"}");
|
|
489
|
+
|
|
490
|
+
|
|
491
|
+
var $72471714e5907a16$exports = {};
|
|
492
|
+
$72471714e5907a16$exports = JSON.parse("{\"maximum\":\"최대\",\"minimum\":\"최소\"}");
|
|
493
|
+
|
|
494
|
+
|
|
495
|
+
var $2f9db1c416e539bf$exports = {};
|
|
496
|
+
$2f9db1c416e539bf$exports = JSON.parse("{\"maximum\":\"Daugiausia\",\"minimum\":\"Mažiausia\"}");
|
|
497
|
+
|
|
498
|
+
|
|
499
|
+
var $2bd0a770b73fb691$exports = {};
|
|
500
|
+
$2bd0a770b73fb691$exports = JSON.parse("{\"maximum\":\"Maksimālā vērtība\",\"minimum\":\"Minimālā vērtība\"}");
|
|
501
|
+
|
|
502
|
+
|
|
503
|
+
var $3ea8086734dff855$exports = {};
|
|
504
|
+
$3ea8086734dff855$exports = JSON.parse("{\"maximum\":\"Maksimum\",\"minimum\":\"Minimum\"}");
|
|
505
|
+
|
|
506
|
+
|
|
507
|
+
var $478dcf79e51c1100$exports = {};
|
|
508
|
+
$478dcf79e51c1100$exports = JSON.parse("{\"maximum\":\"Maximum\",\"minimum\":\"Minimum\"}");
|
|
509
|
+
|
|
510
|
+
|
|
511
|
+
var $dc6da54e974cbe16$exports = {};
|
|
512
|
+
$dc6da54e974cbe16$exports = JSON.parse("{\"maximum\":\"Maksimum\",\"minimum\":\"Minimum\"}");
|
|
513
|
+
|
|
514
|
+
|
|
515
|
+
var $a26d72cc1a1ddc76$exports = {};
|
|
516
|
+
$a26d72cc1a1ddc76$exports = JSON.parse("{\"maximum\":\"Máximo\",\"minimum\":\"Mínimo\"}");
|
|
517
|
+
|
|
518
|
+
|
|
519
|
+
var $5c830a5f58cacc46$exports = {};
|
|
520
|
+
$5c830a5f58cacc46$exports = JSON.parse("{\"maximum\":\"Máximo\",\"minimum\":\"Mínimo\"}");
|
|
521
|
+
|
|
522
|
+
|
|
523
|
+
var $c05877d8ce472641$exports = {};
|
|
524
|
+
$c05877d8ce472641$exports = JSON.parse("{\"maximum\":\"Maximum\",\"minimum\":\"Minimum\"}");
|
|
525
|
+
|
|
526
|
+
|
|
527
|
+
var $1b4d572d794e5e82$exports = {};
|
|
528
|
+
$1b4d572d794e5e82$exports = JSON.parse("{\"maximum\":\"Максимум\",\"minimum\":\"Минимум\"}");
|
|
529
|
+
|
|
530
|
+
|
|
531
|
+
var $c7ee6b0d75adfa14$exports = {};
|
|
532
|
+
$c7ee6b0d75adfa14$exports = JSON.parse("{\"maximum\":\"Maximum\",\"minimum\":\"Minimum\"}");
|
|
533
|
+
|
|
534
|
+
|
|
535
|
+
var $aea258d8cdaecde2$exports = {};
|
|
536
|
+
$aea258d8cdaecde2$exports = JSON.parse("{\"maximum\":\"Največji\",\"minimum\":\"Najmanj\"}");
|
|
537
|
+
|
|
538
|
+
|
|
539
|
+
var $06f6aeba3fb02582$exports = {};
|
|
540
|
+
$06f6aeba3fb02582$exports = JSON.parse("{\"maximum\":\"Najviše\",\"minimum\":\"Najmanje\"}");
|
|
541
|
+
|
|
542
|
+
|
|
543
|
+
var $6ef280f5b317680b$exports = {};
|
|
544
|
+
$6ef280f5b317680b$exports = JSON.parse("{\"maximum\":\"Maximum\",\"minimum\":\"Minimum\"}");
|
|
545
|
+
|
|
546
|
+
|
|
547
|
+
var $97211e8324a001d5$exports = {};
|
|
548
|
+
$97211e8324a001d5$exports = JSON.parse("{\"maximum\":\"Maksimum\",\"minimum\":\"Minimum\"}");
|
|
549
|
+
|
|
550
|
+
|
|
551
|
+
var $cec9b310051046fa$exports = {};
|
|
552
|
+
$cec9b310051046fa$exports = JSON.parse("{\"maximum\":\"Максимум\",\"minimum\":\"Мінімум\"}");
|
|
553
|
+
|
|
554
|
+
|
|
555
|
+
var $ed9e7f33c3612814$exports = {};
|
|
556
|
+
$ed9e7f33c3612814$exports = JSON.parse("{\"maximum\":\"最大\",\"minimum\":\"最小\"}");
|
|
557
|
+
|
|
558
|
+
|
|
559
|
+
var $f1d9d3e3f806e91a$exports = {};
|
|
560
|
+
$f1d9d3e3f806e91a$exports = JSON.parse("{\"maximum\":\"最大值\",\"minimum\":\"最小值\"}");
|
|
561
|
+
|
|
562
|
+
|
|
563
|
+
$8d4b09353ea10dd8$exports = {
|
|
564
|
+
"ar-AE": $19cb148615246852$exports,
|
|
565
|
+
"bg-BG": $bda81ba95f451834$exports,
|
|
566
|
+
"cs-CZ": $22a7dd9d694d98a2$exports,
|
|
567
|
+
"da-DK": $922dd1c9231a213d$exports,
|
|
568
|
+
"de-DE": $ec911369a794a3ba$exports,
|
|
569
|
+
"el-GR": $7c60fd69a7890e67$exports,
|
|
570
|
+
"en-US": $489976b57108fe5b$exports,
|
|
571
|
+
"es-ES": $a3b68234bca6bcfd$exports,
|
|
572
|
+
"et-EE": $be37b960859ff577$exports,
|
|
573
|
+
"fi-FI": $f792e3dc24a0608d$exports,
|
|
574
|
+
"fr-FR": $fa05b78df55dfa31$exports,
|
|
575
|
+
"he-IL": $ad90d97685655bcd$exports,
|
|
576
|
+
"hr-HR": $3b2d77b66c66bc70$exports,
|
|
577
|
+
"hu-HU": $3c70d9ea0361307d$exports,
|
|
578
|
+
"it-IT": $e80bf2704aaced96$exports,
|
|
579
|
+
"ja-JP": $9b1fc5713e2d67e7$exports,
|
|
580
|
+
"ko-KR": $72471714e5907a16$exports,
|
|
581
|
+
"lt-LT": $2f9db1c416e539bf$exports,
|
|
582
|
+
"lv-LV": $2bd0a770b73fb691$exports,
|
|
583
|
+
"nb-NO": $3ea8086734dff855$exports,
|
|
584
|
+
"nl-NL": $478dcf79e51c1100$exports,
|
|
585
|
+
"pl-PL": $dc6da54e974cbe16$exports,
|
|
586
|
+
"pt-BR": $a26d72cc1a1ddc76$exports,
|
|
587
|
+
"pt-PT": $5c830a5f58cacc46$exports,
|
|
588
|
+
"ro-RO": $c05877d8ce472641$exports,
|
|
589
|
+
"ru-RU": $1b4d572d794e5e82$exports,
|
|
590
|
+
"sk-SK": $c7ee6b0d75adfa14$exports,
|
|
591
|
+
"sl-SI": $aea258d8cdaecde2$exports,
|
|
592
|
+
"sr-SP": $06f6aeba3fb02582$exports,
|
|
593
|
+
"sv-SE": $6ef280f5b317680b$exports,
|
|
594
|
+
"tr-TR": $97211e8324a001d5$exports,
|
|
595
|
+
"uk-UA": $cec9b310051046fa$exports,
|
|
596
|
+
"zh-CN": $ed9e7f33c3612814$exports,
|
|
597
|
+
"zh-TW": $f1d9d3e3f806e91a$exports
|
|
529
598
|
};
|
|
530
599
|
|
|
531
|
-
function $b7614884795b0b78874e0b09da85cc36$var$RangeSlider(props, ref) {
|
|
532
|
-
var _props$minValue, _props$maxValue;
|
|
533
|
-
|
|
534
|
-
let {
|
|
535
|
-
onChange,
|
|
536
|
-
onChangeEnd,
|
|
537
|
-
value,
|
|
538
|
-
defaultValue,
|
|
539
|
-
getValueLabel
|
|
540
|
-
} = props,
|
|
541
|
-
otherProps = _babelRuntimeHelpersObjectWithoutPropertiesLoose(props, ["onChange", "onChangeEnd", "value", "defaultValue", "getValueLabel"]);
|
|
542
|
-
|
|
543
|
-
let baseProps = _babelRuntimeHelpersExtends({}, otherProps, {
|
|
544
|
-
value: value != null ? [value.start, value.end] : undefined,
|
|
545
|
-
defaultValue: defaultValue != null ? [defaultValue.start, defaultValue.end] // make sure that useSliderState knows we have two handles
|
|
546
|
-
: [(_props$minValue = props.minValue) != null ? _props$minValue : 0, (_props$maxValue = props.maxValue) != null ? _props$maxValue : 100],
|
|
547
|
-
|
|
548
|
-
onChange(v) {
|
|
549
|
-
onChange == null ? void 0 : onChange({
|
|
550
|
-
start: v[0],
|
|
551
|
-
end: v[1]
|
|
552
|
-
});
|
|
553
|
-
},
|
|
554
|
-
|
|
555
|
-
onChangeEnd(v) {
|
|
556
|
-
onChangeEnd == null ? void 0 : onChangeEnd({
|
|
557
|
-
start: v[0],
|
|
558
|
-
end: v[1]
|
|
559
|
-
});
|
|
560
|
-
},
|
|
561
|
-
|
|
562
|
-
getValueLabel: getValueLabel ? (_ref) => {
|
|
563
|
-
let [start, end] = _ref;
|
|
564
|
-
return getValueLabel({
|
|
565
|
-
start,
|
|
566
|
-
end
|
|
567
|
-
});
|
|
568
|
-
} : undefined
|
|
569
|
-
});
|
|
570
600
|
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
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
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
601
|
+
|
|
602
|
+
|
|
603
|
+
|
|
604
|
+
|
|
605
|
+
|
|
606
|
+
function $9dfe4d8e2be34bd3$var$RangeSlider(props, ref) {
|
|
607
|
+
let { onChange: onChange , onChangeEnd: onChangeEnd , value: value , defaultValue: defaultValue , getValueLabel: getValueLabel , ...otherProps } = props;
|
|
608
|
+
let baseProps = {
|
|
609
|
+
...otherProps,
|
|
610
|
+
value: value != null ? [
|
|
611
|
+
value.start,
|
|
612
|
+
value.end
|
|
613
|
+
] : undefined,
|
|
614
|
+
defaultValue: defaultValue != null ? [
|
|
615
|
+
defaultValue.start,
|
|
616
|
+
defaultValue.end
|
|
617
|
+
] : [
|
|
618
|
+
props.minValue ?? 0,
|
|
619
|
+
props.maxValue ?? 100
|
|
620
|
+
],
|
|
621
|
+
onChange (v) {
|
|
622
|
+
onChange?.({
|
|
623
|
+
start: v[0],
|
|
624
|
+
end: v[1]
|
|
625
|
+
});
|
|
626
|
+
},
|
|
627
|
+
onChangeEnd (v) {
|
|
628
|
+
onChangeEnd?.({
|
|
629
|
+
start: v[0],
|
|
630
|
+
end: v[1]
|
|
631
|
+
});
|
|
632
|
+
},
|
|
633
|
+
getValueLabel: getValueLabel ? ([start, end])=>getValueLabel({
|
|
634
|
+
start: start,
|
|
635
|
+
end: end
|
|
636
|
+
})
|
|
637
|
+
: undefined
|
|
638
|
+
};
|
|
639
|
+
let formatter = $aNSXN$reactariai18n.useMessageFormatter((/*@__PURE__*/$parcel$interopDefault($8d4b09353ea10dd8$exports)));
|
|
640
|
+
let { direction: direction } = $aNSXN$reactariai18n.useLocale();
|
|
641
|
+
return(/*#__PURE__*/ ($parcel$interopDefault($aNSXN$react)).createElement($affbb9e08b166bcd$export$9418495bb635ebde, {
|
|
642
|
+
...baseProps,
|
|
643
|
+
classes: 'spectrum-Slider--range',
|
|
644
|
+
ref: ref
|
|
645
|
+
}, ({ trackRef: trackRef , inputRef: inputRef , state: state })=>{
|
|
646
|
+
let cssDirection = direction === 'rtl' ? 'right' : 'left';
|
|
647
|
+
return(/*#__PURE__*/ ($parcel$interopDefault($aNSXN$react)).createElement(($parcel$interopDefault($aNSXN$react)).Fragment, null, /*#__PURE__*/ ($parcel$interopDefault($aNSXN$react)).createElement("div", {
|
|
648
|
+
className: $aNSXN$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($1b0036f7437cfd0c$exports)), 'spectrum-Slider-track'),
|
|
649
|
+
style: {
|
|
650
|
+
width: `${state.getThumbPercent(0) * 100}%`
|
|
651
|
+
}
|
|
652
|
+
}), /*#__PURE__*/ ($parcel$interopDefault($aNSXN$react)).createElement($fd0b2b20217355e3$export$2c1b491743890dec, {
|
|
653
|
+
index: 0,
|
|
654
|
+
"aria-label": formatter('minimum'),
|
|
655
|
+
isDisabled: props.isDisabled,
|
|
656
|
+
trackRef: trackRef,
|
|
657
|
+
inputRef: inputRef,
|
|
658
|
+
state: state
|
|
659
|
+
}), /*#__PURE__*/ ($parcel$interopDefault($aNSXN$react)).createElement("div", {
|
|
660
|
+
className: $aNSXN$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($1b0036f7437cfd0c$exports)), 'spectrum-Slider-track'),
|
|
661
|
+
style: {
|
|
662
|
+
[cssDirection]: `${state.getThumbPercent(0) * 100}%`,
|
|
663
|
+
width: `${Math.abs(state.getThumbPercent(0) - state.getThumbPercent(1)) * 100}%`
|
|
664
|
+
}
|
|
665
|
+
}), /*#__PURE__*/ ($parcel$interopDefault($aNSXN$react)).createElement($fd0b2b20217355e3$export$2c1b491743890dec, {
|
|
666
|
+
index: 1,
|
|
667
|
+
"aria-label": formatter('maximum'),
|
|
668
|
+
isDisabled: props.isDisabled,
|
|
669
|
+
trackRef: trackRef,
|
|
670
|
+
state: state
|
|
671
|
+
}), /*#__PURE__*/ ($parcel$interopDefault($aNSXN$react)).createElement("div", {
|
|
672
|
+
className: $aNSXN$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($1b0036f7437cfd0c$exports)), 'spectrum-Slider-track'),
|
|
673
|
+
style: {
|
|
674
|
+
width: `${(1 - state.getThumbPercent(1)) * 100}%`
|
|
675
|
+
}
|
|
676
|
+
})));
|
|
614
677
|
}));
|
|
615
|
-
});
|
|
616
678
|
}
|
|
617
679
|
/**
|
|
618
680
|
* RangeSliders allow users to quickly select a subset range. They should be used when the upper and lower bounds to the range are invariable.
|
|
619
|
-
*/
|
|
681
|
+
*/ const $9dfe4d8e2be34bd3$export$826424dabc3dd705 = /*#__PURE__*/ ($parcel$interopDefault($aNSXN$react)).forwardRef($9dfe4d8e2be34bd3$var$RangeSlider);
|
|
682
|
+
|
|
620
683
|
|
|
684
|
+
$parcel$exportWildcard(module.exports, $004fd48cd418b4b6$exports);
|
|
685
|
+
$parcel$exportWildcard(module.exports, $9dfe4d8e2be34bd3$exports);
|
|
621
686
|
|
|
622
|
-
const RangeSlider = /*#__PURE__*/_react.forwardRef($b7614884795b0b78874e0b09da85cc36$var$RangeSlider);
|
|
623
687
|
|
|
624
|
-
exports.RangeSlider = RangeSlider;
|
|
625
688
|
//# sourceMappingURL=main.js.map
|