@purpurds/slider 6.2.0 → 6.3.1
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/slider.cjs.js +2 -2
- package/dist/slider.cjs.js.map +1 -1
- package/dist/slider.es.js +287 -284
- package/dist/slider.es.js.map +1 -1
- package/package.json +7 -7
package/dist/slider.es.js
CHANGED
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as g, Fragment as be, jsxs as Q } from "react/jsx-runtime";
|
|
2
2
|
import * as a from "react";
|
|
3
|
-
import E, { forwardRef as ye, useId as
|
|
3
|
+
import E, { forwardRef as ye, useId as we } from "react";
|
|
4
4
|
import "react-dom";
|
|
5
|
-
function
|
|
5
|
+
function ee(e, [t, n]) {
|
|
6
6
|
return Math.min(n, Math.max(t, e));
|
|
7
7
|
}
|
|
8
8
|
function I(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
|
|
9
|
-
return function(
|
|
10
|
-
if (e == null || e(
|
|
11
|
-
return t == null ? void 0 : t(
|
|
9
|
+
return function(i) {
|
|
10
|
+
if (e == null || e(i), n === !1 || !i.defaultPrevented)
|
|
11
|
+
return t == null ? void 0 : t(i);
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function Z(e, t) {
|
|
15
15
|
if (typeof e == "function")
|
|
16
16
|
return e(t);
|
|
17
17
|
e != null && (e.current = t);
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function te(...e) {
|
|
20
20
|
return (t) => {
|
|
21
21
|
let n = !1;
|
|
22
|
-
const o = e.map((
|
|
23
|
-
const r =
|
|
22
|
+
const o = e.map((i) => {
|
|
23
|
+
const r = Z(i, t);
|
|
24
24
|
return !n && typeof r == "function" && (n = !0), r;
|
|
25
25
|
});
|
|
26
26
|
if (n)
|
|
27
27
|
return () => {
|
|
28
|
-
for (let
|
|
29
|
-
const r = o[
|
|
30
|
-
typeof r == "function" ? r() :
|
|
28
|
+
for (let i = 0; i < o.length; i++) {
|
|
29
|
+
const r = o[i];
|
|
30
|
+
typeof r == "function" ? r() : Z(e[i], null);
|
|
31
31
|
}
|
|
32
32
|
};
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
35
|
function D(...e) {
|
|
36
|
-
return a.useCallback(
|
|
36
|
+
return a.useCallback(te(...e), e);
|
|
37
37
|
}
|
|
38
|
-
function
|
|
38
|
+
function ne(e, t = []) {
|
|
39
39
|
let n = [];
|
|
40
|
-
function o(r,
|
|
41
|
-
const c = a.createContext(
|
|
42
|
-
n = [...n,
|
|
40
|
+
function o(r, s) {
|
|
41
|
+
const c = a.createContext(s), u = n.length;
|
|
42
|
+
n = [...n, s];
|
|
43
43
|
const d = (l) => {
|
|
44
44
|
var p;
|
|
45
|
-
const { scope: f, children:
|
|
46
|
-
return /* @__PURE__ */
|
|
45
|
+
const { scope: f, children: v, ...m } = l, h = ((p = f == null ? void 0 : f[e]) == null ? void 0 : p[u]) || c, S = a.useMemo(() => m, Object.values(m));
|
|
46
|
+
return /* @__PURE__ */ g(h.Provider, { value: S, children: v });
|
|
47
47
|
};
|
|
48
48
|
d.displayName = r + "Provider";
|
|
49
|
-
function
|
|
49
|
+
function y(l, f) {
|
|
50
50
|
var h;
|
|
51
|
-
const
|
|
51
|
+
const v = ((h = f == null ? void 0 : f[e]) == null ? void 0 : h[u]) || c, m = a.useContext(v);
|
|
52
52
|
if (m) return m;
|
|
53
|
-
if (
|
|
53
|
+
if (s !== void 0) return s;
|
|
54
54
|
throw new Error(`\`${l}\` must be used within \`${r}\``);
|
|
55
55
|
}
|
|
56
|
-
return [d,
|
|
56
|
+
return [d, y];
|
|
57
57
|
}
|
|
58
|
-
const
|
|
59
|
-
const r = n.map((
|
|
58
|
+
const i = () => {
|
|
59
|
+
const r = n.map((s) => a.createContext(s));
|
|
60
60
|
return function(c) {
|
|
61
61
|
const u = (c == null ? void 0 : c[e]) || r;
|
|
62
62
|
return a.useMemo(
|
|
@@ -65,27 +65,27 @@ function ee(e, t = []) {
|
|
|
65
65
|
);
|
|
66
66
|
};
|
|
67
67
|
};
|
|
68
|
-
return
|
|
68
|
+
return i.scopeName = e, [o, Ce(i, ...t)];
|
|
69
69
|
}
|
|
70
|
-
function
|
|
70
|
+
function Ce(...e) {
|
|
71
71
|
const t = e[0];
|
|
72
72
|
if (e.length === 1) return t;
|
|
73
73
|
const n = () => {
|
|
74
|
-
const o = e.map((
|
|
75
|
-
useScope:
|
|
76
|
-
scopeName:
|
|
74
|
+
const o = e.map((i) => ({
|
|
75
|
+
useScope: i(),
|
|
76
|
+
scopeName: i.scopeName
|
|
77
77
|
}));
|
|
78
78
|
return function(r) {
|
|
79
|
-
const
|
|
79
|
+
const s = o.reduce((c, { useScope: u, scopeName: d }) => {
|
|
80
80
|
const l = u(r)[`__scope${d}`];
|
|
81
81
|
return { ...c, ...l };
|
|
82
82
|
}, {});
|
|
83
|
-
return a.useMemo(() => ({ [`__scope${t.scopeName}`]:
|
|
83
|
+
return a.useMemo(() => ({ [`__scope${t.scopeName}`]: s }), [s]);
|
|
84
84
|
};
|
|
85
85
|
};
|
|
86
86
|
return n.scopeName = t.scopeName, n;
|
|
87
87
|
}
|
|
88
|
-
function
|
|
88
|
+
function re(e) {
|
|
89
89
|
const t = a.useRef(e);
|
|
90
90
|
return a.useEffect(() => {
|
|
91
91
|
t.current = e;
|
|
@@ -94,104 +94,104 @@ function te(e) {
|
|
|
94
94
|
return (o = t.current) == null ? void 0 : o.call(t, ...n);
|
|
95
95
|
}, []);
|
|
96
96
|
}
|
|
97
|
-
function
|
|
97
|
+
function _e({
|
|
98
98
|
prop: e,
|
|
99
99
|
defaultProp: t,
|
|
100
100
|
onChange: n = () => {
|
|
101
101
|
}
|
|
102
102
|
}) {
|
|
103
|
-
const [o,
|
|
103
|
+
const [o, i] = Re({ defaultProp: t, onChange: n }), r = e !== void 0, s = r ? e : o, c = re(n), u = a.useCallback(
|
|
104
104
|
(d) => {
|
|
105
105
|
if (r) {
|
|
106
106
|
const l = typeof d == "function" ? d(e) : d;
|
|
107
107
|
l !== e && c(l);
|
|
108
108
|
} else
|
|
109
|
-
|
|
109
|
+
i(d);
|
|
110
110
|
},
|
|
111
|
-
[r, e,
|
|
111
|
+
[r, e, i, c]
|
|
112
112
|
);
|
|
113
|
-
return [
|
|
113
|
+
return [s, u];
|
|
114
114
|
}
|
|
115
|
-
function
|
|
115
|
+
function Re({
|
|
116
116
|
defaultProp: e,
|
|
117
117
|
onChange: t
|
|
118
118
|
}) {
|
|
119
|
-
const n = a.useState(e), [o] = n,
|
|
119
|
+
const n = a.useState(e), [o] = n, i = a.useRef(o), r = re(t);
|
|
120
120
|
return a.useEffect(() => {
|
|
121
|
-
|
|
122
|
-
}, [o,
|
|
121
|
+
i.current !== o && (r(o), i.current = o);
|
|
122
|
+
}, [o, i, r]), n;
|
|
123
123
|
}
|
|
124
|
-
var
|
|
125
|
-
function
|
|
126
|
-
const t = a.useContext(
|
|
124
|
+
var xe = a.createContext(void 0);
|
|
125
|
+
function Pe(e) {
|
|
126
|
+
const t = a.useContext(xe);
|
|
127
127
|
return e || t || "ltr";
|
|
128
128
|
}
|
|
129
|
-
function
|
|
129
|
+
function Ee(e) {
|
|
130
130
|
const t = a.useRef({ value: e, previous: e });
|
|
131
131
|
return a.useMemo(() => (t.current.value !== e && (t.current.previous = t.current.value, t.current.value = e), t.current.previous), [e]);
|
|
132
132
|
}
|
|
133
|
-
var
|
|
133
|
+
var De = globalThis != null && globalThis.document ? a.useLayoutEffect : () => {
|
|
134
134
|
};
|
|
135
|
-
function
|
|
135
|
+
function Me(e) {
|
|
136
136
|
const [t, n] = a.useState(void 0);
|
|
137
|
-
return
|
|
137
|
+
return De(() => {
|
|
138
138
|
if (e) {
|
|
139
139
|
n({ width: e.offsetWidth, height: e.offsetHeight });
|
|
140
|
-
const o = new ResizeObserver((
|
|
141
|
-
if (!Array.isArray(
|
|
140
|
+
const o = new ResizeObserver((i) => {
|
|
141
|
+
if (!Array.isArray(i) || !i.length)
|
|
142
142
|
return;
|
|
143
|
-
const r =
|
|
144
|
-
let
|
|
143
|
+
const r = i[0];
|
|
144
|
+
let s, c;
|
|
145
145
|
if ("borderBoxSize" in r) {
|
|
146
146
|
const u = r.borderBoxSize, d = Array.isArray(u) ? u[0] : u;
|
|
147
|
-
|
|
147
|
+
s = d.inlineSize, c = d.blockSize;
|
|
148
148
|
} else
|
|
149
|
-
|
|
150
|
-
n({ width:
|
|
149
|
+
s = e.offsetWidth, c = e.offsetHeight;
|
|
150
|
+
n({ width: s, height: c });
|
|
151
151
|
});
|
|
152
152
|
return o.observe(e, { box: "border-box" }), () => o.unobserve(e);
|
|
153
153
|
} else
|
|
154
154
|
n(void 0);
|
|
155
155
|
}, [e]), t;
|
|
156
156
|
}
|
|
157
|
-
var
|
|
158
|
-
const { children: n, ...o } = e,
|
|
157
|
+
var B = a.forwardRef((e, t) => {
|
|
158
|
+
const { children: n, ...o } = e, i = a.Children.toArray(n), r = i.find(Ie);
|
|
159
159
|
if (r) {
|
|
160
|
-
const
|
|
161
|
-
return /* @__PURE__ */
|
|
160
|
+
const s = r.props.children, c = i.map((u) => u === r ? a.Children.count(s) > 1 ? a.Children.only(null) : a.isValidElement(s) ? s.props.children : null : u);
|
|
161
|
+
return /* @__PURE__ */ g(H, { ...o, ref: t, children: a.isValidElement(s) ? a.cloneElement(s, void 0, c) : null });
|
|
162
162
|
}
|
|
163
|
-
return /* @__PURE__ */
|
|
163
|
+
return /* @__PURE__ */ g(H, { ...o, ref: t, children: n });
|
|
164
164
|
});
|
|
165
|
-
|
|
166
|
-
var
|
|
165
|
+
B.displayName = "Slot";
|
|
166
|
+
var H = a.forwardRef((e, t) => {
|
|
167
167
|
const { children: n, ...o } = e;
|
|
168
168
|
if (a.isValidElement(n)) {
|
|
169
|
-
const
|
|
170
|
-
return n.type !== a.Fragment && (r.ref = t ?
|
|
169
|
+
const i = Oe(n), r = Ne(o, n.props);
|
|
170
|
+
return n.type !== a.Fragment && (r.ref = t ? te(t, i) : i), a.cloneElement(n, r);
|
|
171
171
|
}
|
|
172
172
|
return a.Children.count(n) > 1 ? a.Children.only(null) : null;
|
|
173
173
|
});
|
|
174
|
-
|
|
175
|
-
var
|
|
176
|
-
function
|
|
177
|
-
return a.isValidElement(e) && e.type ===
|
|
174
|
+
H.displayName = "SlotClone";
|
|
175
|
+
var Ae = ({ children: e }) => /* @__PURE__ */ g(be, { children: e });
|
|
176
|
+
function Ie(e) {
|
|
177
|
+
return a.isValidElement(e) && e.type === Ae;
|
|
178
178
|
}
|
|
179
|
-
function
|
|
179
|
+
function Ne(e, t) {
|
|
180
180
|
const n = { ...t };
|
|
181
181
|
for (const o in t) {
|
|
182
|
-
const
|
|
183
|
-
/^on[A-Z]/.test(o) ?
|
|
184
|
-
r(...c),
|
|
185
|
-
} :
|
|
182
|
+
const i = e[o], r = t[o];
|
|
183
|
+
/^on[A-Z]/.test(o) ? i && r ? n[o] = (...c) => {
|
|
184
|
+
r(...c), i(...c);
|
|
185
|
+
} : i && (n[o] = i) : o === "style" ? n[o] = { ...i, ...r } : o === "className" && (n[o] = [i, r].filter(Boolean).join(" "));
|
|
186
186
|
}
|
|
187
187
|
return { ...e, ...n };
|
|
188
188
|
}
|
|
189
|
-
function
|
|
190
|
-
var o,
|
|
189
|
+
function Oe(e) {
|
|
190
|
+
var o, i;
|
|
191
191
|
let t = (o = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
192
|
-
return n ? e.ref : (t = (
|
|
192
|
+
return n ? e.ref : (t = (i = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : i.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
193
193
|
}
|
|
194
|
-
var
|
|
194
|
+
var Te = [
|
|
195
195
|
"a",
|
|
196
196
|
"button",
|
|
197
197
|
"div",
|
|
@@ -208,103 +208,103 @@ var Oe = [
|
|
|
208
208
|
"span",
|
|
209
209
|
"svg",
|
|
210
210
|
"ul"
|
|
211
|
-
],
|
|
212
|
-
const n = a.forwardRef((o,
|
|
213
|
-
const { asChild: r, ...
|
|
214
|
-
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */
|
|
211
|
+
], z = Te.reduce((e, t) => {
|
|
212
|
+
const n = a.forwardRef((o, i) => {
|
|
213
|
+
const { asChild: r, ...s } = o, c = r ? B : t;
|
|
214
|
+
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ g(c, { ...s, ref: i });
|
|
215
215
|
});
|
|
216
216
|
return n.displayName = `Primitive.${t}`, { ...e, [t]: n };
|
|
217
217
|
}, {});
|
|
218
|
-
function
|
|
219
|
-
const t = e + "CollectionProvider", [n, o] =
|
|
218
|
+
function Ve(e) {
|
|
219
|
+
const t = e + "CollectionProvider", [n, o] = ne(t), [i, r] = n(
|
|
220
220
|
t,
|
|
221
221
|
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
222
|
-
),
|
|
223
|
-
const { scope: m, children: h } =
|
|
224
|
-
return /* @__PURE__ */
|
|
222
|
+
), s = (v) => {
|
|
223
|
+
const { scope: m, children: h } = v, S = E.useRef(null), p = E.useRef(/* @__PURE__ */ new Map()).current;
|
|
224
|
+
return /* @__PURE__ */ g(i, { scope: m, itemMap: p, collectionRef: S, children: h });
|
|
225
225
|
};
|
|
226
|
-
|
|
226
|
+
s.displayName = t;
|
|
227
227
|
const c = e + "CollectionSlot", u = E.forwardRef(
|
|
228
|
-
(
|
|
229
|
-
const { scope: h, children: S } =
|
|
230
|
-
return /* @__PURE__ */
|
|
228
|
+
(v, m) => {
|
|
229
|
+
const { scope: h, children: S } = v, p = r(c, h), C = D(m, p.collectionRef);
|
|
230
|
+
return /* @__PURE__ */ g(B, { ref: C, children: S });
|
|
231
231
|
}
|
|
232
232
|
);
|
|
233
233
|
u.displayName = c;
|
|
234
|
-
const d = e + "CollectionItemSlot",
|
|
235
|
-
(
|
|
236
|
-
const { scope: h, children: S, ...p } =
|
|
237
|
-
return E.useEffect(() => (
|
|
234
|
+
const d = e + "CollectionItemSlot", y = "data-radix-collection-item", l = E.forwardRef(
|
|
235
|
+
(v, m) => {
|
|
236
|
+
const { scope: h, children: S, ...p } = v, C = E.useRef(null), w = D(m, C), b = r(d, h);
|
|
237
|
+
return E.useEffect(() => (b.itemMap.set(C, { ref: C, ...p }), () => void b.itemMap.delete(C))), /* @__PURE__ */ g(B, { [y]: "", ref: w, children: S });
|
|
238
238
|
}
|
|
239
239
|
);
|
|
240
240
|
l.displayName = d;
|
|
241
|
-
function f(
|
|
242
|
-
const m = r(e + "CollectionConsumer",
|
|
241
|
+
function f(v) {
|
|
242
|
+
const m = r(e + "CollectionConsumer", v);
|
|
243
243
|
return E.useCallback(() => {
|
|
244
244
|
const S = m.collectionRef.current;
|
|
245
245
|
if (!S) return [];
|
|
246
|
-
const p = Array.from(S.querySelectorAll(`[${
|
|
246
|
+
const p = Array.from(S.querySelectorAll(`[${y}]`));
|
|
247
247
|
return Array.from(m.itemMap.values()).sort(
|
|
248
|
-
(
|
|
248
|
+
(b, R) => p.indexOf(b.ref.current) - p.indexOf(R.ref.current)
|
|
249
249
|
);
|
|
250
250
|
}, [m.collectionRef, m.itemMap]);
|
|
251
251
|
}
|
|
252
252
|
return [
|
|
253
|
-
{ Provider:
|
|
253
|
+
{ Provider: s, Slot: u, ItemSlot: l },
|
|
254
254
|
f,
|
|
255
255
|
o
|
|
256
256
|
];
|
|
257
257
|
}
|
|
258
|
-
var
|
|
258
|
+
var oe = ["PageUp", "PageDown"], ie = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], se = {
|
|
259
259
|
"from-left": ["Home", "PageDown", "ArrowDown", "ArrowLeft"],
|
|
260
260
|
"from-right": ["Home", "PageDown", "ArrowDown", "ArrowRight"],
|
|
261
261
|
"from-bottom": ["Home", "PageDown", "ArrowDown", "ArrowLeft"],
|
|
262
262
|
"from-top": ["Home", "PageDown", "ArrowUp", "ArrowLeft"]
|
|
263
|
-
}, N = "Slider", [
|
|
264
|
-
|
|
265
|
-
]), [ze, K] =
|
|
263
|
+
}, N = "Slider", [W, ke, Be] = Ve(N), [ce, ft] = ne(N, [
|
|
264
|
+
Be
|
|
265
|
+
]), [ze, K] = ce(N), ae = a.forwardRef(
|
|
266
266
|
(e, t) => {
|
|
267
267
|
const {
|
|
268
268
|
name: n,
|
|
269
269
|
min: o = 0,
|
|
270
|
-
max:
|
|
270
|
+
max: i = 100,
|
|
271
271
|
step: r = 1,
|
|
272
|
-
orientation:
|
|
272
|
+
orientation: s = "horizontal",
|
|
273
273
|
disabled: c = !1,
|
|
274
274
|
minStepsBetweenThumbs: u = 0,
|
|
275
275
|
defaultValue: d = [o],
|
|
276
|
-
value:
|
|
276
|
+
value: y,
|
|
277
277
|
onValueChange: l = () => {
|
|
278
278
|
},
|
|
279
279
|
onValueCommit: f = () => {
|
|
280
280
|
},
|
|
281
|
-
inverted:
|
|
281
|
+
inverted: v = !1,
|
|
282
282
|
form: m,
|
|
283
283
|
...h
|
|
284
|
-
} = e, S = a.useRef(/* @__PURE__ */ new Set()), p = a.useRef(0), w =
|
|
285
|
-
prop:
|
|
284
|
+
} = e, S = a.useRef(/* @__PURE__ */ new Set()), p = a.useRef(0), w = s === "horizontal" ? Ke : Le, [b = [], R] = _e({
|
|
285
|
+
prop: y,
|
|
286
286
|
defaultProp: d,
|
|
287
287
|
onChange: (_) => {
|
|
288
288
|
var M;
|
|
289
289
|
(M = [...S.current][p.current]) == null || M.focus(), l(_);
|
|
290
290
|
}
|
|
291
|
-
}), L = a.useRef(
|
|
291
|
+
}), L = a.useRef(b);
|
|
292
292
|
function $(_) {
|
|
293
|
-
const x =
|
|
293
|
+
const x = We(b, _);
|
|
294
294
|
O(_, x);
|
|
295
295
|
}
|
|
296
|
-
function
|
|
296
|
+
function ve(_) {
|
|
297
297
|
O(_, p.current);
|
|
298
298
|
}
|
|
299
299
|
function ge() {
|
|
300
300
|
const _ = L.current[p.current];
|
|
301
|
-
|
|
301
|
+
b[p.current] !== _ && f(b);
|
|
302
302
|
}
|
|
303
303
|
function O(_, x, { commit: M } = { commit: !1 }) {
|
|
304
|
-
const X = Xe(r), j = Ge(Math.round((_ - o) / r) * r + o, X), T =
|
|
304
|
+
const X = Xe(r), j = Ge(Math.round((_ - o) / r) * r + o, X), T = ee(j, [o, i]);
|
|
305
305
|
R((A = []) => {
|
|
306
|
-
const P =
|
|
307
|
-
if (
|
|
306
|
+
const P = Fe(A, T, x);
|
|
307
|
+
if (qe(P, u * r)) {
|
|
308
308
|
p.current = P.indexOf(T);
|
|
309
309
|
const G = String(P) !== String(A);
|
|
310
310
|
return G && M && f(P), G ? P : A;
|
|
@@ -312,20 +312,20 @@ var ne = ["PageUp", "PageDown"], re = ["ArrowUp", "ArrowDown", "ArrowLeft", "Arr
|
|
|
312
312
|
return A;
|
|
313
313
|
});
|
|
314
314
|
}
|
|
315
|
-
return /* @__PURE__ */
|
|
315
|
+
return /* @__PURE__ */ g(
|
|
316
316
|
ze,
|
|
317
317
|
{
|
|
318
318
|
scope: e.__scopeSlider,
|
|
319
319
|
name: n,
|
|
320
320
|
disabled: c,
|
|
321
321
|
min: o,
|
|
322
|
-
max:
|
|
322
|
+
max: i,
|
|
323
323
|
valueIndexToChangeRef: p,
|
|
324
324
|
thumbs: S.current,
|
|
325
|
-
values:
|
|
326
|
-
orientation:
|
|
325
|
+
values: b,
|
|
326
|
+
orientation: s,
|
|
327
327
|
form: m,
|
|
328
|
-
children: /* @__PURE__ */
|
|
328
|
+
children: /* @__PURE__ */ g(W.Provider, { scope: e.__scopeSlider, children: /* @__PURE__ */ g(W.Slot, { scope: e.__scopeSlider, children: /* @__PURE__ */ g(
|
|
329
329
|
w,
|
|
330
330
|
{
|
|
331
331
|
"aria-disabled": c,
|
|
@@ -333,19 +333,19 @@ var ne = ["PageUp", "PageDown"], re = ["ArrowUp", "ArrowDown", "ArrowLeft", "Arr
|
|
|
333
333
|
...h,
|
|
334
334
|
ref: t,
|
|
335
335
|
onPointerDown: I(h.onPointerDown, () => {
|
|
336
|
-
c || (L.current =
|
|
336
|
+
c || (L.current = b);
|
|
337
337
|
}),
|
|
338
338
|
min: o,
|
|
339
|
-
max:
|
|
340
|
-
inverted:
|
|
339
|
+
max: i,
|
|
340
|
+
inverted: v,
|
|
341
341
|
onSlideStart: c ? void 0 : $,
|
|
342
|
-
onSlideMove: c ? void 0 :
|
|
342
|
+
onSlideMove: c ? void 0 : ve,
|
|
343
343
|
onSlideEnd: c ? void 0 : ge,
|
|
344
344
|
onHomeKeyDown: () => !c && O(o, 0, { commit: !0 }),
|
|
345
|
-
onEndKeyDown: () => !c && O(
|
|
345
|
+
onEndKeyDown: () => !c && O(i, b.length - 1, { commit: !0 }),
|
|
346
346
|
onStepKeyDown: ({ event: _, direction: x }) => {
|
|
347
347
|
if (!c) {
|
|
348
|
-
const j =
|
|
348
|
+
const j = oe.includes(_.key) || _.shiftKey && ie.includes(_.key) ? 10 : 1, T = p.current, A = b[T], P = r * j * x;
|
|
349
349
|
O(A + P, T, { commit: !0 });
|
|
350
350
|
}
|
|
351
351
|
}
|
|
@@ -355,61 +355,61 @@ var ne = ["PageUp", "PageDown"], re = ["ArrowUp", "ArrowDown", "ArrowLeft", "Arr
|
|
|
355
355
|
);
|
|
356
356
|
}
|
|
357
357
|
);
|
|
358
|
-
|
|
359
|
-
var [
|
|
358
|
+
ae.displayName = N;
|
|
359
|
+
var [le, ue] = ce(N, {
|
|
360
360
|
startEdge: "left",
|
|
361
361
|
endEdge: "right",
|
|
362
362
|
size: "width",
|
|
363
363
|
direction: 1
|
|
364
|
-
}),
|
|
364
|
+
}), Ke = a.forwardRef(
|
|
365
365
|
(e, t) => {
|
|
366
366
|
const {
|
|
367
367
|
min: n,
|
|
368
368
|
max: o,
|
|
369
|
-
dir:
|
|
369
|
+
dir: i,
|
|
370
370
|
inverted: r,
|
|
371
|
-
onSlideStart:
|
|
371
|
+
onSlideStart: s,
|
|
372
372
|
onSlideMove: c,
|
|
373
373
|
onSlideEnd: u,
|
|
374
374
|
onStepKeyDown: d,
|
|
375
|
-
...
|
|
376
|
-
} = e, [l, f] = a.useState(null),
|
|
375
|
+
...y
|
|
376
|
+
} = e, [l, f] = a.useState(null), v = D(t, (w) => f(w)), m = a.useRef(void 0), h = Pe(i), S = h === "ltr", p = S && !r || !S && r;
|
|
377
377
|
function C(w) {
|
|
378
|
-
const
|
|
379
|
-
return m.current =
|
|
378
|
+
const b = m.current || l.getBoundingClientRect(), R = [0, b.width], $ = q(R, p ? [n, o] : [o, n]);
|
|
379
|
+
return m.current = b, $(w - b.left);
|
|
380
380
|
}
|
|
381
|
-
return /* @__PURE__ */
|
|
382
|
-
|
|
381
|
+
return /* @__PURE__ */ g(
|
|
382
|
+
le,
|
|
383
383
|
{
|
|
384
384
|
scope: e.__scopeSlider,
|
|
385
385
|
startEdge: p ? "left" : "right",
|
|
386
386
|
endEdge: p ? "right" : "left",
|
|
387
387
|
direction: p ? 1 : -1,
|
|
388
388
|
size: "width",
|
|
389
|
-
children: /* @__PURE__ */
|
|
390
|
-
|
|
389
|
+
children: /* @__PURE__ */ g(
|
|
390
|
+
de,
|
|
391
391
|
{
|
|
392
392
|
dir: h,
|
|
393
393
|
"data-orientation": "horizontal",
|
|
394
|
-
...
|
|
395
|
-
ref:
|
|
394
|
+
...y,
|
|
395
|
+
ref: v,
|
|
396
396
|
style: {
|
|
397
|
-
...
|
|
397
|
+
...y.style,
|
|
398
398
|
"--radix-slider-thumb-transform": "translateX(-50%)"
|
|
399
399
|
},
|
|
400
400
|
onSlideStart: (w) => {
|
|
401
|
-
const
|
|
402
|
-
|
|
401
|
+
const b = C(w.clientX);
|
|
402
|
+
s == null || s(b);
|
|
403
403
|
},
|
|
404
404
|
onSlideMove: (w) => {
|
|
405
|
-
const
|
|
406
|
-
c == null || c(
|
|
405
|
+
const b = C(w.clientX);
|
|
406
|
+
c == null || c(b);
|
|
407
407
|
},
|
|
408
408
|
onSlideEnd: () => {
|
|
409
409
|
m.current = void 0, u == null || u();
|
|
410
410
|
},
|
|
411
411
|
onStepKeyDown: (w) => {
|
|
412
|
-
const R =
|
|
412
|
+
const R = se[p ? "from-left" : "from-right"].includes(w.key);
|
|
413
413
|
d == null || d({ event: w, direction: R ? -1 : 1 });
|
|
414
414
|
}
|
|
415
415
|
}
|
|
@@ -417,32 +417,32 @@ var [ce, ae] = se(N, {
|
|
|
417
417
|
}
|
|
418
418
|
);
|
|
419
419
|
}
|
|
420
|
-
),
|
|
420
|
+
), Le = a.forwardRef(
|
|
421
421
|
(e, t) => {
|
|
422
422
|
const {
|
|
423
423
|
min: n,
|
|
424
424
|
max: o,
|
|
425
|
-
inverted:
|
|
425
|
+
inverted: i,
|
|
426
426
|
onSlideStart: r,
|
|
427
|
-
onSlideMove:
|
|
427
|
+
onSlideMove: s,
|
|
428
428
|
onSlideEnd: c,
|
|
429
429
|
onStepKeyDown: u,
|
|
430
430
|
...d
|
|
431
|
-
} = e,
|
|
431
|
+
} = e, y = a.useRef(null), l = D(t, y), f = a.useRef(void 0), v = !i;
|
|
432
432
|
function m(h) {
|
|
433
|
-
const S = f.current ||
|
|
433
|
+
const S = f.current || y.current.getBoundingClientRect(), p = [0, S.height], w = q(p, v ? [o, n] : [n, o]);
|
|
434
434
|
return f.current = S, w(h - S.top);
|
|
435
435
|
}
|
|
436
|
-
return /* @__PURE__ */
|
|
437
|
-
|
|
436
|
+
return /* @__PURE__ */ g(
|
|
437
|
+
le,
|
|
438
438
|
{
|
|
439
439
|
scope: e.__scopeSlider,
|
|
440
|
-
startEdge:
|
|
441
|
-
endEdge:
|
|
440
|
+
startEdge: v ? "bottom" : "top",
|
|
441
|
+
endEdge: v ? "top" : "bottom",
|
|
442
442
|
size: "height",
|
|
443
|
-
direction:
|
|
444
|
-
children: /* @__PURE__ */
|
|
445
|
-
|
|
443
|
+
direction: v ? 1 : -1,
|
|
444
|
+
children: /* @__PURE__ */ g(
|
|
445
|
+
de,
|
|
446
446
|
{
|
|
447
447
|
"data-orientation": "vertical",
|
|
448
448
|
...d,
|
|
@@ -457,13 +457,13 @@ var [ce, ae] = se(N, {
|
|
|
457
457
|
},
|
|
458
458
|
onSlideMove: (h) => {
|
|
459
459
|
const S = m(h.clientY);
|
|
460
|
-
|
|
460
|
+
s == null || s(S);
|
|
461
461
|
},
|
|
462
462
|
onSlideEnd: () => {
|
|
463
463
|
f.current = void 0, c == null || c();
|
|
464
464
|
},
|
|
465
465
|
onStepKeyDown: (h) => {
|
|
466
|
-
const p =
|
|
466
|
+
const p = se[v ? "from-bottom" : "from-top"].includes(h.key);
|
|
467
467
|
u == null || u({ event: h, direction: p ? -1 : 1 });
|
|
468
468
|
}
|
|
469
469
|
}
|
|
@@ -471,32 +471,32 @@ var [ce, ae] = se(N, {
|
|
|
471
471
|
}
|
|
472
472
|
);
|
|
473
473
|
}
|
|
474
|
-
),
|
|
474
|
+
), de = a.forwardRef(
|
|
475
475
|
(e, t) => {
|
|
476
476
|
const {
|
|
477
477
|
__scopeSlider: n,
|
|
478
478
|
onSlideStart: o,
|
|
479
|
-
onSlideMove:
|
|
479
|
+
onSlideMove: i,
|
|
480
480
|
onSlideEnd: r,
|
|
481
|
-
onHomeKeyDown:
|
|
481
|
+
onHomeKeyDown: s,
|
|
482
482
|
onEndKeyDown: c,
|
|
483
483
|
onStepKeyDown: u,
|
|
484
484
|
...d
|
|
485
|
-
} = e,
|
|
486
|
-
return /* @__PURE__ */
|
|
487
|
-
|
|
485
|
+
} = e, y = K(N, n);
|
|
486
|
+
return /* @__PURE__ */ g(
|
|
487
|
+
z.span,
|
|
488
488
|
{
|
|
489
489
|
...d,
|
|
490
490
|
ref: t,
|
|
491
491
|
onKeyDown: I(e.onKeyDown, (l) => {
|
|
492
|
-
l.key === "Home" ? (
|
|
492
|
+
l.key === "Home" ? (s(l), l.preventDefault()) : l.key === "End" ? (c(l), l.preventDefault()) : oe.concat(ie).includes(l.key) && (u(l), l.preventDefault());
|
|
493
493
|
}),
|
|
494
494
|
onPointerDown: I(e.onPointerDown, (l) => {
|
|
495
495
|
const f = l.target;
|
|
496
|
-
f.setPointerCapture(l.pointerId), l.preventDefault(),
|
|
496
|
+
f.setPointerCapture(l.pointerId), l.preventDefault(), y.thumbs.has(f) ? f.focus() : o(l);
|
|
497
497
|
}),
|
|
498
498
|
onPointerMove: I(e.onPointerMove, (l) => {
|
|
499
|
-
l.target.hasPointerCapture(l.pointerId) &&
|
|
499
|
+
l.target.hasPointerCapture(l.pointerId) && i(l);
|
|
500
500
|
}),
|
|
501
501
|
onPointerUp: I(e.onPointerUp, (l) => {
|
|
502
502
|
const f = l.target;
|
|
@@ -505,60 +505,60 @@ var [ce, ae] = se(N, {
|
|
|
505
505
|
}
|
|
506
506
|
);
|
|
507
507
|
}
|
|
508
|
-
),
|
|
508
|
+
), fe = "SliderTrack", pe = a.forwardRef(
|
|
509
509
|
(e, t) => {
|
|
510
|
-
const { __scopeSlider: n, ...o } = e,
|
|
511
|
-
return /* @__PURE__ */
|
|
512
|
-
|
|
510
|
+
const { __scopeSlider: n, ...o } = e, i = K(fe, n);
|
|
511
|
+
return /* @__PURE__ */ g(
|
|
512
|
+
z.span,
|
|
513
513
|
{
|
|
514
|
-
"data-disabled":
|
|
515
|
-
"data-orientation":
|
|
514
|
+
"data-disabled": i.disabled ? "" : void 0,
|
|
515
|
+
"data-orientation": i.orientation,
|
|
516
516
|
...o,
|
|
517
517
|
ref: t
|
|
518
518
|
}
|
|
519
519
|
);
|
|
520
520
|
}
|
|
521
521
|
);
|
|
522
|
-
|
|
523
|
-
var
|
|
522
|
+
pe.displayName = fe;
|
|
523
|
+
var U = "SliderRange", me = a.forwardRef(
|
|
524
524
|
(e, t) => {
|
|
525
|
-
const { __scopeSlider: n, ...o } = e,
|
|
526
|
-
(f) =>
|
|
527
|
-
),
|
|
528
|
-
return /* @__PURE__ */
|
|
529
|
-
|
|
525
|
+
const { __scopeSlider: n, ...o } = e, i = K(U, n), r = ue(U, n), s = a.useRef(null), c = D(t, s), u = i.values.length, d = i.values.map(
|
|
526
|
+
(f) => Se(f, i.min, i.max)
|
|
527
|
+
), y = u > 1 ? Math.min(...d) : 0, l = 100 - Math.max(...d);
|
|
528
|
+
return /* @__PURE__ */ g(
|
|
529
|
+
z.span,
|
|
530
530
|
{
|
|
531
|
-
"data-orientation":
|
|
532
|
-
"data-disabled":
|
|
531
|
+
"data-orientation": i.orientation,
|
|
532
|
+
"data-disabled": i.disabled ? "" : void 0,
|
|
533
533
|
...o,
|
|
534
534
|
ref: c,
|
|
535
535
|
style: {
|
|
536
536
|
...e.style,
|
|
537
|
-
[r.startEdge]:
|
|
537
|
+
[r.startEdge]: y + "%",
|
|
538
538
|
[r.endEdge]: l + "%"
|
|
539
539
|
}
|
|
540
540
|
}
|
|
541
541
|
);
|
|
542
542
|
}
|
|
543
543
|
);
|
|
544
|
-
|
|
545
|
-
var
|
|
544
|
+
me.displayName = U;
|
|
545
|
+
var Y = "SliderThumb", he = a.forwardRef(
|
|
546
546
|
(e, t) => {
|
|
547
|
-
const n =
|
|
547
|
+
const n = ke(e.__scopeSlider), [o, i] = a.useState(null), r = D(t, (c) => i(c)), s = a.useMemo(
|
|
548
548
|
() => o ? n().findIndex((c) => c.ref.current === o) : -1,
|
|
549
549
|
[n, o]
|
|
550
550
|
);
|
|
551
|
-
return /* @__PURE__ */
|
|
551
|
+
return /* @__PURE__ */ g($e, { ...e, ref: r, index: s });
|
|
552
552
|
}
|
|
553
|
-
),
|
|
553
|
+
), $e = a.forwardRef(
|
|
554
554
|
(e, t) => {
|
|
555
|
-
const { __scopeSlider: n, index: o, name:
|
|
555
|
+
const { __scopeSlider: n, index: o, name: i, ...r } = e, s = K(Y, n), c = ue(Y, n), [u, d] = a.useState(null), y = D(t, (C) => d(C)), l = u ? s.form || !!u.closest("form") : !0, f = Me(u), v = s.values[o], m = v === void 0 ? 0 : Se(v, s.min, s.max), h = He(o, s.values.length), S = f == null ? void 0 : f[c.size], p = S ? Ue(S, m, c.direction) : 0;
|
|
556
556
|
return a.useEffect(() => {
|
|
557
557
|
if (u)
|
|
558
|
-
return
|
|
559
|
-
|
|
558
|
+
return s.thumbs.add(u), () => {
|
|
559
|
+
s.thumbs.delete(u);
|
|
560
560
|
};
|
|
561
|
-
}, [u,
|
|
561
|
+
}, [u, s.thumbs]), /* @__PURE__ */ Q(
|
|
562
562
|
"span",
|
|
563
563
|
{
|
|
564
564
|
style: {
|
|
@@ -567,32 +567,32 @@ var U = "SliderThumb", pe = a.forwardRef(
|
|
|
567
567
|
[c.startEdge]: `calc(${m}% + ${p}px)`
|
|
568
568
|
},
|
|
569
569
|
children: [
|
|
570
|
-
/* @__PURE__ */
|
|
571
|
-
|
|
570
|
+
/* @__PURE__ */ g(W.ItemSlot, { scope: e.__scopeSlider, children: /* @__PURE__ */ g(
|
|
571
|
+
z.span,
|
|
572
572
|
{
|
|
573
573
|
role: "slider",
|
|
574
574
|
"aria-label": e["aria-label"] || h,
|
|
575
|
-
"aria-valuemin":
|
|
576
|
-
"aria-valuenow":
|
|
577
|
-
"aria-valuemax":
|
|
578
|
-
"aria-orientation":
|
|
579
|
-
"data-orientation":
|
|
580
|
-
"data-disabled":
|
|
581
|
-
tabIndex:
|
|
575
|
+
"aria-valuemin": s.min,
|
|
576
|
+
"aria-valuenow": v,
|
|
577
|
+
"aria-valuemax": s.max,
|
|
578
|
+
"aria-orientation": s.orientation,
|
|
579
|
+
"data-orientation": s.orientation,
|
|
580
|
+
"data-disabled": s.disabled ? "" : void 0,
|
|
581
|
+
tabIndex: s.disabled ? void 0 : 0,
|
|
582
582
|
...r,
|
|
583
|
-
ref:
|
|
584
|
-
style:
|
|
583
|
+
ref: y,
|
|
584
|
+
style: v === void 0 ? { display: "none" } : e.style,
|
|
585
585
|
onFocus: I(e.onFocus, () => {
|
|
586
|
-
|
|
586
|
+
s.valueIndexToChangeRef.current = o;
|
|
587
587
|
})
|
|
588
588
|
}
|
|
589
589
|
) }),
|
|
590
|
-
l && /* @__PURE__ */
|
|
591
|
-
|
|
590
|
+
l && /* @__PURE__ */ g(
|
|
591
|
+
je,
|
|
592
592
|
{
|
|
593
|
-
name:
|
|
594
|
-
form:
|
|
595
|
-
value:
|
|
593
|
+
name: i ?? (s.name ? s.name + (s.values.length > 1 ? "[]" : "") : void 0),
|
|
594
|
+
form: s.form,
|
|
595
|
+
value: v
|
|
596
596
|
},
|
|
597
597
|
o
|
|
598
598
|
)
|
|
@@ -601,48 +601,48 @@ var U = "SliderThumb", pe = a.forwardRef(
|
|
|
601
601
|
);
|
|
602
602
|
}
|
|
603
603
|
);
|
|
604
|
-
|
|
605
|
-
var
|
|
606
|
-
const { value: t, ...n } = e, o = a.useRef(null),
|
|
604
|
+
he.displayName = Y;
|
|
605
|
+
var je = (e) => {
|
|
606
|
+
const { value: t, ...n } = e, o = a.useRef(null), i = Ee(t);
|
|
607
607
|
return a.useEffect(() => {
|
|
608
|
-
const r = o.current,
|
|
609
|
-
if (
|
|
608
|
+
const r = o.current, s = window.HTMLInputElement.prototype, u = Object.getOwnPropertyDescriptor(s, "value").set;
|
|
609
|
+
if (i !== t && u) {
|
|
610
610
|
const d = new Event("input", { bubbles: !0 });
|
|
611
611
|
u.call(r, t), r.dispatchEvent(d);
|
|
612
612
|
}
|
|
613
|
-
}, [
|
|
613
|
+
}, [i, t]), /* @__PURE__ */ g("input", { style: { display: "none" }, ...n, ref: o, defaultValue: t });
|
|
614
614
|
};
|
|
615
|
-
function
|
|
615
|
+
function Fe(e = [], t, n) {
|
|
616
616
|
const o = [...e];
|
|
617
|
-
return o[n] = t, o.sort((
|
|
617
|
+
return o[n] = t, o.sort((i, r) => i - r);
|
|
618
618
|
}
|
|
619
|
-
function
|
|
619
|
+
function Se(e, t, n) {
|
|
620
620
|
const r = 100 / (n - t) * (e - t);
|
|
621
|
-
return
|
|
621
|
+
return ee(r, [0, 100]);
|
|
622
622
|
}
|
|
623
|
-
function
|
|
623
|
+
function He(e, t) {
|
|
624
624
|
return t > 2 ? `Value ${e + 1} of ${t}` : t === 2 ? ["Minimum", "Maximum"][e] : void 0;
|
|
625
625
|
}
|
|
626
|
-
function
|
|
626
|
+
function We(e, t) {
|
|
627
627
|
if (e.length === 1) return 0;
|
|
628
|
-
const n = e.map((
|
|
628
|
+
const n = e.map((i) => Math.abs(i - t)), o = Math.min(...n);
|
|
629
629
|
return n.indexOf(o);
|
|
630
630
|
}
|
|
631
|
-
function
|
|
632
|
-
const o = e / 2, r =
|
|
631
|
+
function Ue(e, t, n) {
|
|
632
|
+
const o = e / 2, r = q([0, 50], [0, o]);
|
|
633
633
|
return (o - r(t) * n) * n;
|
|
634
634
|
}
|
|
635
|
-
function
|
|
635
|
+
function Ye(e) {
|
|
636
636
|
return e.slice(0, -1).map((t, n) => e[n + 1] - t);
|
|
637
637
|
}
|
|
638
|
-
function
|
|
638
|
+
function qe(e, t) {
|
|
639
639
|
if (t > 0) {
|
|
640
|
-
const n =
|
|
640
|
+
const n = Ye(e);
|
|
641
641
|
return Math.min(...n) >= t;
|
|
642
642
|
}
|
|
643
643
|
return !0;
|
|
644
644
|
}
|
|
645
|
-
function
|
|
645
|
+
function q(e, t) {
|
|
646
646
|
return (n) => {
|
|
647
647
|
if (e[0] === e[1] || t[0] === t[1]) return t[0];
|
|
648
648
|
const o = (t[1] - t[0]) / (e[1] - e[0]);
|
|
@@ -656,89 +656,92 @@ function Ge(e, t) {
|
|
|
656
656
|
const n = Math.pow(10, t);
|
|
657
657
|
return Math.round(e * n) / n;
|
|
658
658
|
}
|
|
659
|
-
var
|
|
660
|
-
function
|
|
659
|
+
var Ze = ae, Je = pe, Qe = me, et = he;
|
|
660
|
+
function tt(e) {
|
|
661
661
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
662
662
|
}
|
|
663
|
-
var
|
|
663
|
+
var F = { exports: {} };
|
|
664
664
|
/*!
|
|
665
665
|
Copyright (c) 2018 Jed Watson.
|
|
666
666
|
Licensed under the MIT License (MIT), see
|
|
667
667
|
http://jedwatson.github.io/classnames
|
|
668
668
|
*/
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
function
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
669
|
+
var J;
|
|
670
|
+
function nt() {
|
|
671
|
+
return J || (J = 1, function(e) {
|
|
672
|
+
(function() {
|
|
673
|
+
var t = {}.hasOwnProperty;
|
|
674
|
+
function n() {
|
|
675
|
+
for (var r = "", s = 0; s < arguments.length; s++) {
|
|
676
|
+
var c = arguments[s];
|
|
677
|
+
c && (r = i(r, o.call(this, c)));
|
|
678
|
+
}
|
|
679
|
+
return r;
|
|
676
680
|
}
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
}
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
const nt = /* @__PURE__ */ et(tt), rt = {
|
|
681
|
+
function o(r) {
|
|
682
|
+
if (typeof r == "string" || typeof r == "number")
|
|
683
|
+
return this && this[r] || r;
|
|
684
|
+
if (typeof r != "object")
|
|
685
|
+
return "";
|
|
686
|
+
if (Array.isArray(r))
|
|
687
|
+
return n.apply(this, r);
|
|
688
|
+
if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
|
|
689
|
+
return r.toString();
|
|
690
|
+
var s = "";
|
|
691
|
+
for (var c in r)
|
|
692
|
+
t.call(r, c) && r[c] && (s = i(s, this && this[c] || c));
|
|
693
|
+
return s;
|
|
694
|
+
}
|
|
695
|
+
function i(r, s) {
|
|
696
|
+
return s ? r ? r + " " + s : r + s : r;
|
|
697
|
+
}
|
|
698
|
+
e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
|
|
699
|
+
})();
|
|
700
|
+
}(F)), F.exports;
|
|
701
|
+
}
|
|
702
|
+
var rt = nt();
|
|
703
|
+
const ot = /* @__PURE__ */ tt(rt), it = {
|
|
701
704
|
"purpur-slider": "_purpur-slider_14tuk_1",
|
|
702
705
|
"purpur-slider__track": "_purpur-slider__track_14tuk_17",
|
|
703
706
|
"purpur-slider__range": "_purpur-slider__range_14tuk_17",
|
|
704
707
|
"purpur-slider__thumb": "_purpur-slider__thumb_14tuk_43"
|
|
705
|
-
}, V =
|
|
708
|
+
}, V = ot.bind(it), pt = ["horizontal", "vertical"], k = "purpur-slider", st = (e) => String(e), ct = ({
|
|
706
709
|
"aria-label": e,
|
|
707
710
|
"aria-valuetext": t,
|
|
708
711
|
className: n,
|
|
709
712
|
defaultValue: o,
|
|
710
|
-
id:
|
|
713
|
+
id: i,
|
|
711
714
|
value: r,
|
|
712
|
-
...
|
|
715
|
+
...s
|
|
713
716
|
}, c) => {
|
|
714
|
-
const u =
|
|
715
|
-
return /* @__PURE__ */
|
|
716
|
-
|
|
717
|
+
const u = we(), d = r || o;
|
|
718
|
+
return /* @__PURE__ */ Q(
|
|
719
|
+
Ze,
|
|
717
720
|
{
|
|
718
|
-
...
|
|
719
|
-
id:
|
|
721
|
+
...s,
|
|
722
|
+
id: i || u,
|
|
720
723
|
ref: c,
|
|
721
724
|
className: V(k, n),
|
|
722
725
|
value: r,
|
|
723
726
|
defaultValue: o,
|
|
724
727
|
children: [
|
|
725
|
-
/* @__PURE__ */
|
|
726
|
-
d == null ? void 0 : d.map((
|
|
727
|
-
|
|
728
|
+
/* @__PURE__ */ g(Je, { className: V(`${k}__track`), children: /* @__PURE__ */ g(Qe, { className: V(`${k}__range`) }) }),
|
|
729
|
+
d == null ? void 0 : d.map((y, l) => /* @__PURE__ */ g(
|
|
730
|
+
et,
|
|
728
731
|
{
|
|
729
732
|
className: V(`${k}__thumb`),
|
|
730
733
|
"aria-label": e,
|
|
731
734
|
"aria-valuetext": t
|
|
732
735
|
},
|
|
733
|
-
|
|
736
|
+
st(l)
|
|
734
737
|
))
|
|
735
738
|
]
|
|
736
739
|
}
|
|
737
740
|
);
|
|
738
|
-
},
|
|
739
|
-
|
|
741
|
+
}, at = ye(ct);
|
|
742
|
+
at.displayName = "Slider";
|
|
740
743
|
export {
|
|
741
|
-
|
|
742
|
-
|
|
744
|
+
pt as SLIDER_ORIENTATION,
|
|
745
|
+
at as Slider
|
|
743
746
|
};
|
|
744
747
|
//# sourceMappingURL=slider.es.js.map
|