@koide-labs/ui 0.1.3 → 0.1.4
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/README.md +1 -4
- package/dist/{InternalBackdrop-BSMKU-hc.js → InternalBackdrop-DDLgWc7D.js} +1 -1
- package/dist/accordion.css +1 -1
- package/dist/alert-dialog.css +1 -1
- package/dist/anchor.css +1 -1
- package/dist/avatar.css +1 -1
- package/dist/badge.css +1 -1
- package/dist/button.css +1 -1
- package/dist/checkbox.css +1 -1
- package/dist/code.css +1 -1
- package/dist/collapse.css +1 -1
- package/dist/command.css +1 -1
- package/dist/components/accordion/accordion.js +88 -88
- package/dist/components/alert-dialog/alert-dialog.js +7 -7
- package/dist/components/anchor/anchor.js +6 -6
- package/dist/components/avatar/avatar.js +22 -22
- package/dist/components/badge/badge.js +17 -17
- package/dist/components/button/button.js +7 -7
- package/dist/components/checkbox/checkbox.js +15 -15
- package/dist/components/code/code.js +49 -49
- package/dist/components/collapse/collapse.js +3 -3
- package/dist/components/command/command.js +121 -121
- package/dist/components/context-menu/context-menu.js +13 -13
- package/dist/components/dialog/dialog.js +2 -2
- package/dist/components/heading/heading.js +5 -5
- package/dist/components/icon/icon.js +10 -10
- package/dist/components/icon-button/icon-button.js +15 -15
- package/dist/components/inline-code/inline-code.js +7 -7
- package/dist/components/input/input.js +1 -1
- package/dist/components/meter/meter.js +32 -32
- package/dist/components/multiline-input/multiline-input.js +1 -1
- package/dist/components/number-input/number-input.js +60 -60
- package/dist/components/password-input/password-input.js +6 -6
- package/dist/components/pill/pill.js +10 -10
- package/dist/components/popover/popover.js +22 -22
- package/dist/components/preview-card/preview-card.js +5 -5
- package/dist/components/radio-group/radio-group.js +99 -99
- package/dist/components/search-bar/search-bar.js +10 -10
- package/dist/components/select/select.js +76 -76
- package/dist/components/separator/index.js +1 -1
- package/dist/components/separator/separator.js +1 -1
- package/dist/components/slider/slider.js +146 -146
- package/dist/components/spinner/spinner.js +6 -6
- package/dist/components/stacked-avatars/stacked-avatars.js +25 -25
- package/dist/components/status-banner/status-banner.js +20 -20
- package/dist/components/surface/surface.js +19 -19
- package/dist/components/switch/switch.js +2 -2
- package/dist/components/tabs/tabs.js +34 -34
- package/dist/components/text/text.js +22 -22
- package/dist/components/timestamp/timestamp.js +73 -73
- package/dist/components/toaster/toaster.js +58 -58
- package/dist/components/tooltip/index.js +1 -1
- package/dist/components/tooltip/tooltip.js +2 -2
- package/dist/components/view/view.js +44 -44
- package/dist/context-menu.css +1 -1
- package/dist/dialog.css +1 -1
- package/dist/{dialog.module-1PAL873u.js → dialog.module-CRiRBcbM.js} +37 -37
- package/dist/{getDisabledMountTransitionStyles-E2x-_lte.js → getDisabledMountTransitionStyles-CyEI2117.js} +1 -1
- package/dist/heading.css +1 -1
- package/dist/icon-button.css +1 -1
- package/dist/icon.css +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +2 -2
- package/dist/index2.css +1 -1
- package/dist/inline-code.css +1 -1
- package/dist/input.css +1 -1
- package/dist/input.module-CYcyDtrO.js +8 -0
- package/dist/integrations/react-markdown/index.js +26 -26
- package/dist/integrations/twemoji/index.js +1 -1
- package/dist/meter.css +1 -1
- package/dist/number-input.css +1 -1
- package/dist/password-input.css +1 -1
- package/dist/pill.css +1 -1
- package/dist/popover.css +1 -1
- package/dist/preview-card.css +1 -1
- package/dist/radio-group.css +1 -1
- package/dist/{safePolygon-DnkzOIur.js → safePolygon-lAEp2rci.js} +1 -1
- package/dist/search-bar.css +1 -1
- package/dist/select.css +1 -1
- package/dist/{separator-DgY7BjjO.js → separator-Or-BDQYZ.js} +14 -14
- package/dist/separator.css +1 -1
- package/dist/slider.css +1 -1
- package/dist/spinner.css +1 -1
- package/dist/stacked-avatars.css +1 -1
- package/dist/status-banner.css +1 -1
- package/dist/styles/core.css +1 -1
- package/dist/surface.css +1 -1
- package/dist/switch.css +1 -1
- package/dist/tabs.css +1 -1
- package/dist/text.css +1 -1
- package/dist/timestamp.css +1 -1
- package/dist/toaster.css +1 -1
- package/dist/{tooltip-BJQPwudf.js → tooltip-JPnUwFFR.js} +6 -6
- package/dist/tooltip.css +1 -1
- package/dist/transitions.css +1 -1
- package/dist/{transitions.module-D9mMAtfI.js → transitions.module-SSNmQfsR.js} +43 -43
- package/dist/{useRole-BD3OL1rr.js → useRole-D1k7CnHQ.js} +1 -1
- package/dist/{useSyncedFloatingRootContext-BB1vwkV-.js → useSyncedFloatingRootContext-CaohymZI.js} +1 -1
- package/dist/{useTypeahead-BiL5IAVb.js → useTypeahead-CSZtonjF.js} +2 -2
- package/dist/view.css +1 -1
- package/dist/view.module-j3ylJCCE.js +6 -0
- package/dist/view2.css +1 -1
- package/package.json +17 -19
- package/dist/components/dialog/dialog.types.js +0 -1
- package/dist/components/icon/icon.types.js +0 -1
- package/dist/components/surface/surface.types.js +0 -1
- package/dist/components/view/view.types.js +0 -1
- package/dist/input.module-CtE19OH8.js +0 -8
- package/dist/view.module-CjopAf_0.js +0 -6
|
@@ -2,43 +2,43 @@ import { jsx as be, jsxs as Je } from "react/jsx-runtime";
|
|
|
2
2
|
import { c as Ct } from "../../clsx-OuTLNxxd.js";
|
|
3
3
|
import { View as Pt } from "../view/view.js";
|
|
4
4
|
import * as a from "react";
|
|
5
|
-
import { o as
|
|
6
|
-
import { u as
|
|
7
|
-
import { u as
|
|
5
|
+
import { o as _e } from "../../owner-rKN292Q9.js";
|
|
6
|
+
import { u as wt } from "../../useControlled-Du4sJyMj.js";
|
|
7
|
+
import { u as z } from "../../useStableCallback-DKZHlUAT.js";
|
|
8
8
|
import { u as Qe } from "../../useValueAsRef-B4EriRsI.js";
|
|
9
|
-
import { u as
|
|
10
|
-
import { w as
|
|
11
|
-
import { c as
|
|
9
|
+
import { u as ze } from "../../useIsoLayoutEffect-CIDbvm3Q.js";
|
|
10
|
+
import { w as _t } from "../../warn-CKtX8MLJ.js";
|
|
11
|
+
import { c as Ne, n as Nt, g as Ze, k as Et, m as Vt, r as At, u as Ge } from "../../createBaseUIEventDetails-CCSfZ2vM.js";
|
|
12
12
|
import { u as Tt } from "../../useValueChanged-MJRmEWz1.js";
|
|
13
|
-
import { u as
|
|
13
|
+
import { u as We } from "../../useBaseUiId-B7WyxtIE.js";
|
|
14
14
|
import { u as Ee, m as Mt, d as Ot } from "../../useRenderElement-DngNDu_P.js";
|
|
15
15
|
import { c as ue } from "../../clamp-D0KDAQIz.js";
|
|
16
16
|
import { C as Ft, u as Bt } from "../../useCompositeListItem-CZp9WTnF.js";
|
|
17
17
|
import { c as Dt, a as et, u as Lt, b as kt } from "../../LabelableContext-Be1u-eFg.js";
|
|
18
18
|
import { f as $t } from "../../formatErrorMessage-BqPuTBN-.js";
|
|
19
|
-
import { d as tt, f as
|
|
20
|
-
import { a as
|
|
21
|
-
import { u as
|
|
19
|
+
import { d as tt, f as Ht } from "../../element-u5WgOZX1.js";
|
|
20
|
+
import { a as Ue } from "../../floating-ui.utils.dom-cbi420Pg.js";
|
|
21
|
+
import { u as Ut } from "../../useAnimationFrame-DvK1s63A.js";
|
|
22
22
|
import { u as nt } from "../../DirectionContext-C2o_MF_i.js";
|
|
23
23
|
import { u as rt } from "../../useOnMount-VRW6CK2u.js";
|
|
24
|
-
import { v as
|
|
24
|
+
import { v as qe } from "../../valueToPercent-DaP9qN4u.js";
|
|
25
25
|
import { v as je } from "../../visuallyHidden-CpJ-mhai.js";
|
|
26
26
|
import { f as De } from "../../formatNumber-1UNwjeqf.js";
|
|
27
|
-
import { C as
|
|
28
|
-
import { u as
|
|
27
|
+
import { C as zt, H as ot, E as it, d as st, b as at, c as ut, e as lt } from "../../composite-BwEK5cWH.js";
|
|
28
|
+
import { u as Wt } from "../../useLabelableId-CX4tcfzK.js";
|
|
29
29
|
import '../../slider.css';function ct(e, t, r = (i, o) => i === o) {
|
|
30
30
|
return e.length === t.length && e.every((i, o) => r(i, t[o]));
|
|
31
31
|
}
|
|
32
32
|
function dt(e, t) {
|
|
33
33
|
return e - t;
|
|
34
34
|
}
|
|
35
|
-
function
|
|
35
|
+
function qt(e, t, r) {
|
|
36
36
|
const i = e.slice();
|
|
37
37
|
return i[t] = r, i.sort(dt);
|
|
38
38
|
}
|
|
39
39
|
function ft(e, t, r, i, o, l) {
|
|
40
40
|
let u = e;
|
|
41
|
-
return u = ue(u, r, i), o && (u =
|
|
41
|
+
return u = ue(u, r, i), o && (u = qt(
|
|
42
42
|
l,
|
|
43
43
|
t,
|
|
44
44
|
// Bound the new value to the thumb's neighbours.
|
|
@@ -80,9 +80,9 @@ const pt = /* @__PURE__ */ a.forwardRef(function(t, r) {
|
|
|
80
80
|
disabled: u = !1,
|
|
81
81
|
id: g,
|
|
82
82
|
format: p,
|
|
83
|
-
largeStep:
|
|
83
|
+
largeStep: N = 10,
|
|
84
84
|
locale: h,
|
|
85
|
-
render:
|
|
85
|
+
render: W,
|
|
86
86
|
max: E = 100,
|
|
87
87
|
min: m = 0,
|
|
88
88
|
minStepsBetweenValues: s = 0,
|
|
@@ -95,24 +95,24 @@ const pt = /* @__PURE__ */ a.forwardRef(function(t, r) {
|
|
|
95
95
|
thumbAlignment: ne = "center",
|
|
96
96
|
value: re,
|
|
97
97
|
...Re
|
|
98
|
-
} = t, le =
|
|
99
|
-
clearErrors:
|
|
98
|
+
} = t, le = We(g), q = z(x), ce = z(P), {
|
|
99
|
+
clearErrors: H
|
|
100
100
|
} = Dt(), {
|
|
101
|
-
state:
|
|
101
|
+
state: U,
|
|
102
102
|
disabled: K,
|
|
103
103
|
name: S,
|
|
104
104
|
setTouched: Y,
|
|
105
105
|
setDirty: A,
|
|
106
106
|
validityData: R,
|
|
107
|
-
shouldValidateOnChange:
|
|
107
|
+
shouldValidateOnChange: w,
|
|
108
108
|
validation: B
|
|
109
109
|
} = et(), {
|
|
110
110
|
labelId: oe
|
|
111
|
-
} = Lt(), X = i ?? oe, G = K || u, de = S ?? V, [C, Ie] =
|
|
111
|
+
} = Lt(), X = i ?? oe, G = K || u, de = S ?? V, [C, Ie] = wt({
|
|
112
112
|
controlled: re,
|
|
113
113
|
default: l ?? m,
|
|
114
114
|
name: "Slider"
|
|
115
|
-
}), ie = a.useRef(null), he = a.useRef(null), O = a.useRef([]), F = a.useRef(null), fe = a.useRef(null), ye = a.useRef(-1), D = a.useRef(null), L = a.useRef(null), se = a.useRef("none"), n = Qe(p), [f, c] = a.useState(-1), [b, d] = a.useState(-1), [$, me] = a.useState(!1), [J, ge] = a.useState(() => /* @__PURE__ */ new Map()), [Pe, Se] = a.useState([void 0, void 0]), I =
|
|
115
|
+
}), ie = a.useRef(null), he = a.useRef(null), O = a.useRef([]), F = a.useRef(null), fe = a.useRef(null), ye = a.useRef(-1), D = a.useRef(null), L = a.useRef(null), se = a.useRef("none"), n = Qe(p), [f, c] = a.useState(-1), [b, d] = a.useState(-1), [$, me] = a.useState(!1), [J, ge] = a.useState(() => /* @__PURE__ */ new Map()), [Pe, Se] = a.useState([void 0, void 0]), I = z((v) => {
|
|
116
116
|
c(v), v !== -1 && d(v);
|
|
117
117
|
});
|
|
118
118
|
kt({
|
|
@@ -123,17 +123,17 @@ const pt = /* @__PURE__ */ a.forwardRef(function(t, r) {
|
|
|
123
123
|
name: de,
|
|
124
124
|
getValue: () => C
|
|
125
125
|
}), Tt(C, () => {
|
|
126
|
-
|
|
126
|
+
H(de), w() ? B.commit(C) : B.commit(C, !0);
|
|
127
127
|
const v = R.initialValue;
|
|
128
128
|
let pe;
|
|
129
129
|
Array.isArray(C) && Array.isArray(v) ? pe = !ct(C, v) : pe = C !== v, A(pe);
|
|
130
130
|
});
|
|
131
|
-
const xe =
|
|
131
|
+
const xe = z((v) => {
|
|
132
132
|
v && (he.current = v);
|
|
133
|
-
}), Q = Array.isArray(C), Z = a.useMemo(() => Q ? C.slice().sort(dt) : [ue(C, m, E)], [E, m, Q, C]), j =
|
|
133
|
+
}), Q = Array.isArray(C), Z = a.useMemo(() => Q ? C.slice().sort(dt) : [ue(C, m, E)], [E, m, Q, C]), j = z((v, pe) => {
|
|
134
134
|
if (Number.isNaN(v) || Yt(v, C))
|
|
135
135
|
return;
|
|
136
|
-
const ae = pe ??
|
|
136
|
+
const ae = pe ?? Ne(Nt, void 0, void 0, {
|
|
137
137
|
activeThumbIndex: -1
|
|
138
138
|
});
|
|
139
139
|
se.current = ae.reason;
|
|
@@ -144,24 +144,24 @@ const pt = /* @__PURE__ */ a.forwardRef(function(t, r) {
|
|
|
144
144
|
value: v,
|
|
145
145
|
name: de
|
|
146
146
|
}
|
|
147
|
-
}), ae.event = ve, L.current = v,
|
|
148
|
-
}), Ce =
|
|
147
|
+
}), ae.event = ve, L.current = v, q(v, ae), !ae.isCanceled && Ie(v);
|
|
148
|
+
}), Ce = z((v, pe, ae) => {
|
|
149
149
|
const ve = ft(v, pe, m, E, Q, Z);
|
|
150
150
|
if (mt(ve, M, s)) {
|
|
151
151
|
const Te = Kt(ae);
|
|
152
|
-
j(ve,
|
|
152
|
+
j(ve, Ne(Te, ae.nativeEvent, void 0, {
|
|
153
153
|
activeThumbIndex: pe
|
|
154
154
|
})), Y(!0);
|
|
155
155
|
const Ye = L.current ?? ve;
|
|
156
156
|
ce(Ye, Ze(Te, ae.nativeEvent));
|
|
157
157
|
}
|
|
158
158
|
});
|
|
159
|
-
process.env.NODE_ENV !== "production" && m >= E &&
|
|
160
|
-
const v = tt(
|
|
159
|
+
process.env.NODE_ENV !== "production" && m >= E && _t("Slider `max` must be greater than `min`."), ze(() => {
|
|
160
|
+
const v = tt(_e(ie.current));
|
|
161
161
|
G && v && ie.current?.contains(v) && v.blur();
|
|
162
162
|
}, [G]), G && f !== -1 && I(-1);
|
|
163
163
|
const ee = a.useMemo(() => ({
|
|
164
|
-
...
|
|
164
|
+
...U,
|
|
165
165
|
activeThumbIndex: f,
|
|
166
166
|
disabled: G,
|
|
167
167
|
dragging: $,
|
|
@@ -171,7 +171,7 @@ const pt = /* @__PURE__ */ a.forwardRef(function(t, r) {
|
|
|
171
171
|
minStepsBetweenValues: s,
|
|
172
172
|
step: M,
|
|
173
173
|
values: Z
|
|
174
|
-
}), [
|
|
174
|
+
}), [U, f, G, $, E, m, s, y, M, Z]), ke = a.useMemo(() => ({
|
|
175
175
|
active: f,
|
|
176
176
|
controlRef: he,
|
|
177
177
|
disabled: G,
|
|
@@ -182,7 +182,7 @@ const pt = /* @__PURE__ */ a.forwardRef(function(t, r) {
|
|
|
182
182
|
indicatorPosition: Pe,
|
|
183
183
|
inset: ne !== "center",
|
|
184
184
|
labelId: X,
|
|
185
|
-
largeStep:
|
|
185
|
+
largeStep: N,
|
|
186
186
|
lastUsedThumbIndex: b,
|
|
187
187
|
lastChangedValueRef: L,
|
|
188
188
|
lastChangeReasonRef: se,
|
|
@@ -209,7 +209,7 @@ const pt = /* @__PURE__ */ a.forwardRef(function(t, r) {
|
|
|
209
209
|
thumbMap: J,
|
|
210
210
|
thumbRefs: O,
|
|
211
211
|
values: Z
|
|
212
|
-
}), [f, he, X, G, $, B, n, Ce, Pe,
|
|
212
|
+
}), [f, he, X, G, $, B, n, Ce, Pe, N, b, L, se, h, E, m, s, de, ce, y, F, fe, ye, D, xe, I, me, Se, j, ee, M, te, ne, J, O, Z]), Ae = Ee("div", t, {
|
|
213
213
|
state: ee,
|
|
214
214
|
ref: [r, ie],
|
|
215
215
|
props: [{
|
|
@@ -260,15 +260,15 @@ function Xe({
|
|
|
260
260
|
}) {
|
|
261
261
|
if (e.length === 0)
|
|
262
262
|
return [];
|
|
263
|
-
const p = e.slice(),
|
|
263
|
+
const p = e.slice(), N = l * u, h = p.length - 1, W = g ?? e, E = i + t * N, m = o - (h - t) * N;
|
|
264
264
|
p[t] = ue(r, E, m);
|
|
265
265
|
for (let s = t + 1; s <= h; s += 1) {
|
|
266
|
-
const V = p[s - 1] +
|
|
266
|
+
const V = p[s - 1] + N, x = o - (h - s) * N, P = W[s] ?? p[s];
|
|
267
267
|
let y = Math.max(p[s], V);
|
|
268
268
|
P < y && (y = Math.max(P, V)), p[s] = ue(y, V, x);
|
|
269
269
|
}
|
|
270
270
|
for (let s = t - 1; s >= 0; s -= 1) {
|
|
271
|
-
const V = p[s + 1] -
|
|
271
|
+
const V = p[s + 1] - N, x = i + s * N, P = W[s] ?? p[s];
|
|
272
272
|
let y = Math.min(p[s], V);
|
|
273
273
|
P > y && (y = Math.min(P, V)), p[s] = ue(y, x, V);
|
|
274
274
|
}
|
|
@@ -286,57 +286,57 @@ function jt({
|
|
|
286
286
|
min: u,
|
|
287
287
|
max: g,
|
|
288
288
|
step: p,
|
|
289
|
-
minStepsBetweenValues:
|
|
289
|
+
minStepsBetweenValues: N
|
|
290
290
|
}) {
|
|
291
|
-
const h = r ?? t,
|
|
291
|
+
const h = r ?? t, W = i ?? t;
|
|
292
292
|
if (!(h.length > 1))
|
|
293
293
|
return {
|
|
294
294
|
value: l,
|
|
295
295
|
thumbIndex: 0,
|
|
296
296
|
didSwap: !1
|
|
297
297
|
};
|
|
298
|
-
const m = p *
|
|
298
|
+
const m = p * N;
|
|
299
299
|
switch (e) {
|
|
300
300
|
case "swap": {
|
|
301
301
|
const s = h[o], V = 1e-7, x = h.slice(), P = x[o - 1], y = x[o + 1], M = P != null ? P + m : u, te = y != null ? y - m : g, ne = ue(l, M, te), re = Number(ne.toFixed(12));
|
|
302
302
|
x[o] = re;
|
|
303
|
-
const Re = l > s, le = l < s,
|
|
304
|
-
if (!
|
|
303
|
+
const Re = l > s, le = l < s, q = Re && y != null && l >= y - V, ce = le && P != null && l <= P + V;
|
|
304
|
+
if (!q && !ce)
|
|
305
305
|
return {
|
|
306
306
|
value: x,
|
|
307
307
|
thumbIndex: o,
|
|
308
308
|
didSwap: !1
|
|
309
309
|
};
|
|
310
|
-
const
|
|
310
|
+
const H = q ? o + 1 : o - 1, U = x.map((A, R) => {
|
|
311
311
|
if (R === o)
|
|
312
312
|
return re;
|
|
313
|
-
const
|
|
314
|
-
return
|
|
313
|
+
const w = W[R];
|
|
314
|
+
return w ?? h[R];
|
|
315
315
|
});
|
|
316
316
|
let K = l;
|
|
317
|
-
|
|
317
|
+
q ? K = Math.max(l, x[H]) : K = Math.min(l, x[H]);
|
|
318
318
|
const S = Xe({
|
|
319
319
|
values: x,
|
|
320
|
-
index:
|
|
320
|
+
index: H,
|
|
321
321
|
nextValue: K,
|
|
322
322
|
min: u,
|
|
323
323
|
max: g,
|
|
324
324
|
step: p,
|
|
325
|
-
minStepsBetweenValues:
|
|
326
|
-
initialValues:
|
|
327
|
-
}), Y =
|
|
325
|
+
minStepsBetweenValues: N,
|
|
326
|
+
initialValues: U
|
|
327
|
+
}), Y = q ? H - 1 : H + 1;
|
|
328
328
|
if (Y >= 0 && Y < S.length) {
|
|
329
329
|
const A = S[Y - 1], R = S[Y + 1];
|
|
330
|
-
let
|
|
331
|
-
|
|
330
|
+
let w = A != null ? A + m : u;
|
|
331
|
+
w = Math.max(w, u + Y * m);
|
|
332
332
|
let B = R != null ? R - m : g;
|
|
333
333
|
B = Math.min(B, g - (S.length - 1 - Y) * m);
|
|
334
|
-
const oe = ue(re,
|
|
334
|
+
const oe = ue(re, w, B);
|
|
335
335
|
S[Y] = Number(oe.toFixed(12));
|
|
336
336
|
}
|
|
337
337
|
return {
|
|
338
338
|
value: S,
|
|
339
|
-
thumbIndex:
|
|
339
|
+
thumbIndex: H,
|
|
340
340
|
didSwap: !0
|
|
341
341
|
};
|
|
342
342
|
}
|
|
@@ -349,7 +349,7 @@ function jt({
|
|
|
349
349
|
min: u,
|
|
350
350
|
max: g,
|
|
351
351
|
step: p,
|
|
352
|
-
minStepsBetweenValues:
|
|
352
|
+
minStepsBetweenValues: N
|
|
353
353
|
}),
|
|
354
354
|
thumbIndex: o,
|
|
355
355
|
didSwap: !1
|
|
@@ -408,9 +408,9 @@ const bt = /* @__PURE__ */ a.forwardRef(function(t, r) {
|
|
|
408
408
|
disabled: u,
|
|
409
409
|
dragging: g,
|
|
410
410
|
validation: p,
|
|
411
|
-
inset:
|
|
411
|
+
inset: N,
|
|
412
412
|
lastChangedValueRef: h,
|
|
413
|
-
lastChangeReasonRef:
|
|
413
|
+
lastChangeReasonRef: W,
|
|
414
414
|
max: E,
|
|
415
415
|
min: m,
|
|
416
416
|
minStepsBetweenValues: s,
|
|
@@ -424,15 +424,15 @@ const bt = /* @__PURE__ */ a.forwardRef(function(t, r) {
|
|
|
424
424
|
renderBeforeHydration: re,
|
|
425
425
|
setActive: Re,
|
|
426
426
|
setDragging: le,
|
|
427
|
-
setValue:
|
|
427
|
+
setValue: q,
|
|
428
428
|
state: ce,
|
|
429
|
-
step:
|
|
430
|
-
thumbCollisionBehavior:
|
|
429
|
+
step: H,
|
|
430
|
+
thumbCollisionBehavior: U,
|
|
431
431
|
thumbRefs: K,
|
|
432
432
|
values: S
|
|
433
|
-
} = Le(), Y = nt(), A = S.length > 1, R = x === "vertical",
|
|
433
|
+
} = Le(), Y = nt(), A = S.length > 1, R = x === "vertical", w = a.useRef(null), B = a.useRef(null), oe = z((n) => {
|
|
434
434
|
n && B.current == null && B.current == null && (B.current = getComputedStyle(n));
|
|
435
|
-
}), X = a.useRef(null), G = a.useRef(0), de = a.useRef(0), C = Qe(S), Ie =
|
|
435
|
+
}), X = a.useRef(null), G = a.useRef(0), de = a.useRef(0), C = Qe(S), Ie = z((n) => {
|
|
436
436
|
M.current !== n && (M.current = n);
|
|
437
437
|
const f = K.current[n];
|
|
438
438
|
if (!f) {
|
|
@@ -440,8 +440,8 @@ const bt = /* @__PURE__ */ a.forwardRef(function(t, r) {
|
|
|
440
440
|
return;
|
|
441
441
|
}
|
|
442
442
|
P.current = f.querySelector('input[type="range"]');
|
|
443
|
-
}), ie =
|
|
444
|
-
const f =
|
|
443
|
+
}), ie = z((n) => {
|
|
444
|
+
const f = w.current;
|
|
445
445
|
if (!f)
|
|
446
446
|
return null;
|
|
447
447
|
const {
|
|
@@ -452,7 +452,7 @@ const bt = /* @__PURE__ */ a.forwardRef(function(t, r) {
|
|
|
452
452
|
right: me
|
|
453
453
|
} = f.getBoundingClientRect(), J = Jt(B.current, R), ge = de.current, Pe = (R ? b : c) - J.start - J.end - ge * 2, Se = y.current ?? 0, I = n.x - Se, xe = n.y - Se, Q = R ? d - xe - J.end : (Y === "rtl" ? me - I : I - $) - J.start, Z = ue((Q - ge) / Pe, 0, 1);
|
|
454
454
|
let j = (E - m) * Z + m;
|
|
455
|
-
if (j = gt(j,
|
|
455
|
+
if (j = gt(j, H, m), j = ue(j, m, E), !A)
|
|
456
456
|
return {
|
|
457
457
|
value: j,
|
|
458
458
|
thumbIndex: 0,
|
|
@@ -462,7 +462,7 @@ const bt = /* @__PURE__ */ a.forwardRef(function(t, r) {
|
|
|
462
462
|
if (Ce < 0)
|
|
463
463
|
return null;
|
|
464
464
|
const ee = jt({
|
|
465
|
-
behavior:
|
|
465
|
+
behavior: U,
|
|
466
466
|
values: S,
|
|
467
467
|
currentValues: C.current ?? S,
|
|
468
468
|
initialValues: te.current,
|
|
@@ -470,11 +470,11 @@ const bt = /* @__PURE__ */ a.forwardRef(function(t, r) {
|
|
|
470
470
|
nextValue: j,
|
|
471
471
|
min: m,
|
|
472
472
|
max: E,
|
|
473
|
-
step:
|
|
473
|
+
step: H,
|
|
474
474
|
minStepsBetweenValues: s
|
|
475
475
|
});
|
|
476
|
-
return
|
|
477
|
-
}), he =
|
|
476
|
+
return U === "swap" && ee.didSwap ? Ie(ee.thumbIndex) : M.current = ee.thumbIndex, ee;
|
|
477
|
+
}), he = z((n) => {
|
|
478
478
|
te.current = A ? S.slice() : null, C.current = S;
|
|
479
479
|
const f = M.current;
|
|
480
480
|
let c = f;
|
|
@@ -491,24 +491,24 @@ const bt = /* @__PURE__ */ a.forwardRef(function(t, r) {
|
|
|
491
491
|
c = -1;
|
|
492
492
|
for (let $ = 0; $ < K.current.length; $ += 1) {
|
|
493
493
|
const me = K.current[$];
|
|
494
|
-
if (
|
|
494
|
+
if (Ue(me)) {
|
|
495
495
|
const J = ht(me), ge = Math.abs(n[b] - J[b]);
|
|
496
496
|
(d === void 0 || ge <= d) && (c = $, d = ge);
|
|
497
497
|
}
|
|
498
498
|
}
|
|
499
499
|
}
|
|
500
|
-
if (c > -1 && c !== f && Ie(c),
|
|
500
|
+
if (c > -1 && c !== f && Ie(c), N) {
|
|
501
501
|
const b = K.current[c];
|
|
502
|
-
if (
|
|
502
|
+
if (Ue(b)) {
|
|
503
503
|
const d = b.getBoundingClientRect(), $ = R ? "height" : "width";
|
|
504
504
|
de.current = d[$] / 2;
|
|
505
505
|
}
|
|
506
506
|
}
|
|
507
|
-
}), O =
|
|
507
|
+
}), O = z((n) => {
|
|
508
508
|
K.current?.[n]?.querySelector('input[type="range"]')?.focus({
|
|
509
509
|
preventScroll: !0
|
|
510
510
|
});
|
|
511
|
-
}), F =
|
|
511
|
+
}), F = z((n) => {
|
|
512
512
|
const f = Fe(n, X);
|
|
513
513
|
if (f == null)
|
|
514
514
|
return;
|
|
@@ -517,7 +517,7 @@ const bt = /* @__PURE__ */ a.forwardRef(function(t, r) {
|
|
|
517
517
|
return;
|
|
518
518
|
}
|
|
519
519
|
const c = ie(f);
|
|
520
|
-
c != null && mt(c.value,
|
|
520
|
+
c != null && mt(c.value, H, s) && (!g && G.current > Xt && le(!0), q(c.value, Ne(At, n, void 0, {
|
|
521
521
|
activeThumbIndex: c.thumbIndex
|
|
522
522
|
})), C.current = Array.isArray(c.value) ? c.value : [c.value], c.didSwap && O(c.thumbIndex));
|
|
523
523
|
});
|
|
@@ -525,12 +525,12 @@ const bt = /* @__PURE__ */ a.forwardRef(function(t, r) {
|
|
|
525
525
|
Re(-1), le(!1), P.current = null, y.current = null, M.current = -1;
|
|
526
526
|
const f = Fe(n, X), c = f != null ? ie(f) : null;
|
|
527
527
|
if (c != null) {
|
|
528
|
-
const b =
|
|
528
|
+
const b = W.current;
|
|
529
529
|
p.commit(h.current ?? c.value), V(h.current ?? c.value, Ze(b, n));
|
|
530
530
|
}
|
|
531
|
-
"pointerType" in n &&
|
|
531
|
+
"pointerType" in n && w.current?.hasPointerCapture(n.pointerId) && w.current?.releasePointerCapture(n.pointerId), X.current = null, te.current = null, D();
|
|
532
532
|
}
|
|
533
|
-
const ye =
|
|
533
|
+
const ye = z((n) => {
|
|
534
534
|
if (u)
|
|
535
535
|
return;
|
|
536
536
|
const f = n.changedTouches[0];
|
|
@@ -541,38 +541,38 @@ const bt = /* @__PURE__ */ a.forwardRef(function(t, r) {
|
|
|
541
541
|
const d = ie(c);
|
|
542
542
|
if (d == null)
|
|
543
543
|
return;
|
|
544
|
-
O(d.thumbIndex),
|
|
544
|
+
O(d.thumbIndex), q(d.value, Ne(Ge, n, void 0, {
|
|
545
545
|
activeThumbIndex: d.thumbIndex
|
|
546
546
|
})), C.current = Array.isArray(d.value) ? d.value : [d.value], d.didSwap && O(d.thumbIndex);
|
|
547
547
|
}
|
|
548
548
|
G.current = 0;
|
|
549
|
-
const b =
|
|
549
|
+
const b = _e(w.current);
|
|
550
550
|
b.addEventListener("touchmove", F, {
|
|
551
551
|
passive: !0
|
|
552
552
|
}), b.addEventListener("touchend", fe, {
|
|
553
553
|
passive: !0
|
|
554
554
|
});
|
|
555
|
-
}), D =
|
|
556
|
-
const n =
|
|
555
|
+
}), D = z(() => {
|
|
556
|
+
const n = _e(w.current);
|
|
557
557
|
n.removeEventListener("pointermove", F), n.removeEventListener("pointerup", fe), n.removeEventListener("touchmove", F), n.removeEventListener("touchend", fe), te.current = null;
|
|
558
|
-
}), L =
|
|
558
|
+
}), L = Ut();
|
|
559
559
|
return a.useEffect(() => {
|
|
560
|
-
const n =
|
|
560
|
+
const n = w.current;
|
|
561
561
|
return n ? (n.addEventListener("touchstart", ye, {
|
|
562
562
|
passive: !0
|
|
563
563
|
}), () => {
|
|
564
564
|
n.removeEventListener("touchstart", ye), L.cancel(), D();
|
|
565
565
|
}) : () => D();
|
|
566
|
-
}, [D, ye,
|
|
566
|
+
}, [D, ye, w, L]), a.useEffect(() => {
|
|
567
567
|
u && D();
|
|
568
568
|
}, [u, D]), Ee("div", t, {
|
|
569
569
|
state: ce,
|
|
570
|
-
ref: [r, ne,
|
|
570
|
+
ref: [r, ne, w, oe],
|
|
571
571
|
props: [{
|
|
572
572
|
"data-base-ui-slider-control": re ? "" : void 0,
|
|
573
573
|
onPointerDown(n) {
|
|
574
|
-
const f =
|
|
575
|
-
if (!f || u || n.defaultPrevented || !
|
|
574
|
+
const f = w.current;
|
|
575
|
+
if (!f || u || n.defaultPrevented || !Ue(n.target) || // Only handle left clicks
|
|
576
576
|
n.button !== 0)
|
|
577
577
|
return;
|
|
578
578
|
const c = Fe(n, X);
|
|
@@ -581,14 +581,14 @@ const bt = /* @__PURE__ */ a.forwardRef(function(t, r) {
|
|
|
581
581
|
const d = ie(c);
|
|
582
582
|
if (d == null)
|
|
583
583
|
return;
|
|
584
|
-
|
|
584
|
+
Ht(K.current[d.thumbIndex], tt(_e(f))) ? n.preventDefault() : L.request(() => {
|
|
585
585
|
O(d.thumbIndex);
|
|
586
|
-
}), le(!0), y.current != null || (
|
|
586
|
+
}), le(!0), y.current != null || (q(d.value, Ne(Ge, n.nativeEvent, void 0, {
|
|
587
587
|
activeThumbIndex: d.thumbIndex
|
|
588
588
|
})), C.current = Array.isArray(d.value) ? d.value : [d.value], d.didSwap && O(d.thumbIndex));
|
|
589
589
|
}
|
|
590
590
|
n.nativeEvent.pointerId && f.setPointerCapture(n.nativeEvent.pointerId), G.current = 0;
|
|
591
|
-
const b =
|
|
591
|
+
const b = _e(w.current);
|
|
592
592
|
b.addEventListener("pointermove", F, {
|
|
593
593
|
passive: !0
|
|
594
594
|
}), b.addEventListener("pointerup", fe, {
|
|
@@ -629,7 +629,7 @@ function tn(e, t, r, i) {
|
|
|
629
629
|
if (!(t < 0))
|
|
630
630
|
return e.length === 2 ? t === 0 ? `${De(e[t], i, r)} start range` : `${De(e[t], i, r)} end range` : r ? De(e[t], i, r) : void 0;
|
|
631
631
|
}
|
|
632
|
-
function
|
|
632
|
+
function we(e, t, r, i, o) {
|
|
633
633
|
return r === 1 ? Math.min(e + t, o) : Math.max(e - t, i);
|
|
634
634
|
}
|
|
635
635
|
const It = /* @__PURE__ */ a.forwardRef(function(t, r) {
|
|
@@ -640,9 +640,9 @@ const It = /* @__PURE__ */ a.forwardRef(function(t, r) {
|
|
|
640
640
|
"aria-describedby": u,
|
|
641
641
|
"aria-label": g,
|
|
642
642
|
"aria-labelledby": p,
|
|
643
|
-
disabled:
|
|
643
|
+
disabled: N = !1,
|
|
644
644
|
getAriaLabel: h,
|
|
645
|
-
getAriaValueText:
|
|
645
|
+
getAriaValueText: W,
|
|
646
646
|
id: E,
|
|
647
647
|
index: m,
|
|
648
648
|
inputRef: s,
|
|
@@ -651,21 +651,21 @@ const It = /* @__PURE__ */ a.forwardRef(function(t, r) {
|
|
|
651
651
|
onKeyDown: P,
|
|
652
652
|
tabIndex: y,
|
|
653
653
|
...M
|
|
654
|
-
} = t, te =
|
|
654
|
+
} = t, te = We(E), {
|
|
655
655
|
active: ne,
|
|
656
656
|
lastUsedThumbIndex: re,
|
|
657
657
|
controlRef: Re,
|
|
658
658
|
disabled: le,
|
|
659
|
-
validation:
|
|
659
|
+
validation: q,
|
|
660
660
|
formatOptionsRef: ce,
|
|
661
|
-
handleInputChange:
|
|
662
|
-
inset:
|
|
661
|
+
handleInputChange: H,
|
|
662
|
+
inset: U,
|
|
663
663
|
labelId: K,
|
|
664
664
|
largeStep: S,
|
|
665
665
|
locale: Y,
|
|
666
666
|
max: A,
|
|
667
667
|
min: R,
|
|
668
|
-
minStepsBetweenValues:
|
|
668
|
+
minStepsBetweenValues: w,
|
|
669
669
|
name: B,
|
|
670
670
|
orientation: oe,
|
|
671
671
|
pressedInputRef: X,
|
|
@@ -677,50 +677,50 @@ const It = /* @__PURE__ */ a.forwardRef(function(t, r) {
|
|
|
677
677
|
state: he,
|
|
678
678
|
step: O,
|
|
679
679
|
values: F
|
|
680
|
-
} = Le(), fe = nt(), ye =
|
|
680
|
+
} = Le(), fe = nt(), ye = N || le, D = F.length > 1, L = oe === "vertical", se = fe === "rtl", {
|
|
681
681
|
setTouched: n,
|
|
682
682
|
setFocused: f,
|
|
683
683
|
validationMode: c
|
|
684
|
-
} = et(), b = a.useRef(null), d = a.useRef(null), $ =
|
|
684
|
+
} = et(), b = a.useRef(null), d = a.useRef(null), $ = We(), me = Wt(), J = D ? $ : me, ge = a.useMemo(() => ({
|
|
685
685
|
inputId: J
|
|
686
686
|
}), [J]), {
|
|
687
687
|
ref: Pe,
|
|
688
688
|
index: Se
|
|
689
689
|
} = Bt({
|
|
690
690
|
metadata: ge
|
|
691
|
-
}), I = D ? m ?? Se : 0, xe = I === F.length - 1, Q = F[I], Z =
|
|
691
|
+
}), I = D ? m ?? Se : 0, xe = I === F.length - 1, Q = F[I], Z = qe(Q, R, A), [j, Ce] = a.useState(!1), [ee, ke] = a.useState();
|
|
692
692
|
rt(() => Ce(!0));
|
|
693
|
-
const Ae = re >= 0 && re < F.length ? re : -1, v =
|
|
694
|
-
const
|
|
695
|
-
if (!
|
|
693
|
+
const Ae = re >= 0 && re < F.length ? re : -1, v = z(() => {
|
|
694
|
+
const _ = Re.current, T = b.current;
|
|
695
|
+
if (!_ || !T)
|
|
696
696
|
return;
|
|
697
|
-
const k = T.getBoundingClientRect(), Me =
|
|
698
|
-
ke($e), I === 0 ? ie((
|
|
697
|
+
const k = T.getBoundingClientRect(), Me = _.getBoundingClientRect(), Oe = L ? "height" : "width", xt = Me[Oe] - k[Oe], $e = (k[Oe] / 2 + xt * Z / 100) / Me[Oe] * 100;
|
|
698
|
+
ke($e), I === 0 ? ie((He) => [$e, He[1]]) : xe && ie((He) => [He[0], $e]);
|
|
699
699
|
});
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
}, [v,
|
|
703
|
-
|
|
704
|
-
}, [v,
|
|
700
|
+
ze(() => {
|
|
701
|
+
U && queueMicrotask(v);
|
|
702
|
+
}, [v, U]), ze(() => {
|
|
703
|
+
U && v();
|
|
704
|
+
}, [v, U, Z]);
|
|
705
705
|
const pe = a.useCallback(() => {
|
|
706
|
-
const
|
|
706
|
+
const _ = L ? "bottom" : "insetInlineStart", T = L ? "left" : "top";
|
|
707
707
|
let k;
|
|
708
|
-
return D ? ne === I ? k = 2 : Ae === I && (k = 1) : ne === I && (k = 1),
|
|
708
|
+
return D ? ne === I ? k = 2 : Ae === I && (k = 1) : ne === I && (k = 1), U ? {
|
|
709
709
|
"--position": `${ee}%`,
|
|
710
710
|
visibility: C && !j || ee === void 0 ? "hidden" : void 0,
|
|
711
711
|
position: "absolute",
|
|
712
|
-
[
|
|
712
|
+
[_]: "var(--position)",
|
|
713
713
|
[T]: "50%",
|
|
714
714
|
translate: `${(L || !se ? -1 : 1) * 50}% ${(L ? 1 : -1) * 50}%`,
|
|
715
715
|
zIndex: k
|
|
716
716
|
} : Number.isFinite(Z) ? {
|
|
717
717
|
position: "absolute",
|
|
718
|
-
[
|
|
718
|
+
[_]: `${Z}%`,
|
|
719
719
|
[T]: "50%",
|
|
720
720
|
translate: `${(L || !se ? -1 : 1) * 50}% ${(L ? 1 : -1) * 50}%`,
|
|
721
721
|
zIndex: k
|
|
722
722
|
} : je;
|
|
723
|
-
}, [ne, I,
|
|
723
|
+
}, [ne, I, U, j, ee, D, C, se, Ae, Z, L]);
|
|
724
724
|
let ae;
|
|
725
725
|
oe === "vertical" && (ae = se ? "vertical-rl" : "vertical-lr");
|
|
726
726
|
const ve = Mt({
|
|
@@ -729,54 +729,54 @@ const It = /* @__PURE__ */ a.forwardRef(function(t, r) {
|
|
|
729
729
|
"aria-describedby": u,
|
|
730
730
|
"aria-orientation": oe,
|
|
731
731
|
"aria-valuenow": Q,
|
|
732
|
-
"aria-valuetext": typeof
|
|
732
|
+
"aria-valuetext": typeof W == "function" ? W(De(Q, Y, ce.current ?? void 0), Q, I) : tn(F, I, ce.current ?? void 0, Y),
|
|
733
733
|
disabled: ye,
|
|
734
734
|
id: J,
|
|
735
735
|
max: A,
|
|
736
736
|
min: R,
|
|
737
737
|
name: B,
|
|
738
|
-
onChange(
|
|
739
|
-
|
|
738
|
+
onChange(_) {
|
|
739
|
+
H(_.target.valueAsNumber, I, _);
|
|
740
740
|
},
|
|
741
741
|
onFocus() {
|
|
742
742
|
Ie(I), f(!0);
|
|
743
743
|
},
|
|
744
744
|
onBlur() {
|
|
745
|
-
b.current && (Ie(-1), n(!0), f(!1), c === "onBlur" &&
|
|
745
|
+
b.current && (Ie(-1), n(!0), f(!1), c === "onBlur" && q.commit(ft(Q, I, R, A, D, F)));
|
|
746
746
|
},
|
|
747
|
-
onKeyDown(
|
|
748
|
-
if (!en.has(
|
|
747
|
+
onKeyDown(_) {
|
|
748
|
+
if (!en.has(_.key))
|
|
749
749
|
return;
|
|
750
|
-
|
|
750
|
+
zt.has(_.key) && _.stopPropagation();
|
|
751
751
|
let T = null;
|
|
752
752
|
const k = gt(Q, O, R);
|
|
753
|
-
switch (
|
|
753
|
+
switch (_.key) {
|
|
754
754
|
case lt:
|
|
755
|
-
T =
|
|
755
|
+
T = we(k, _.shiftKey ? S : O, 1, R, A);
|
|
756
756
|
break;
|
|
757
757
|
case ut:
|
|
758
|
-
T =
|
|
758
|
+
T = we(k, _.shiftKey ? S : O, se ? -1 : 1, R, A);
|
|
759
759
|
break;
|
|
760
760
|
case at:
|
|
761
|
-
T =
|
|
761
|
+
T = we(k, _.shiftKey ? S : O, -1, R, A);
|
|
762
762
|
break;
|
|
763
763
|
case st:
|
|
764
|
-
T =
|
|
764
|
+
T = we(k, _.shiftKey ? S : O, se ? 1 : -1, R, A);
|
|
765
765
|
break;
|
|
766
766
|
case vt:
|
|
767
|
-
T =
|
|
767
|
+
T = we(k, S, 1, R, A);
|
|
768
768
|
break;
|
|
769
769
|
case Rt:
|
|
770
|
-
T =
|
|
770
|
+
T = we(k, S, -1, R, A);
|
|
771
771
|
break;
|
|
772
772
|
case it:
|
|
773
|
-
T = A, D && (T = Number.isFinite(F[I + 1]) ? F[I + 1] - O *
|
|
773
|
+
T = A, D && (T = Number.isFinite(F[I + 1]) ? F[I + 1] - O * w : A);
|
|
774
774
|
break;
|
|
775
775
|
case ot:
|
|
776
|
-
T = R, D && (T = Number.isFinite(F[I - 1]) ? F[I - 1] + O *
|
|
776
|
+
T = R, D && (T = Number.isFinite(F[I - 1]) ? F[I - 1] + O * w : R);
|
|
777
777
|
break;
|
|
778
778
|
}
|
|
779
|
-
T !== null && (
|
|
779
|
+
T !== null && (H(T, I, _), _.preventDefault());
|
|
780
780
|
},
|
|
781
781
|
step: O,
|
|
782
782
|
style: {
|
|
@@ -789,7 +789,7 @@ const It = /* @__PURE__ */ a.forwardRef(function(t, r) {
|
|
|
789
789
|
tabIndex: y ?? void 0,
|
|
790
790
|
type: "range",
|
|
791
791
|
value: Q ?? ""
|
|
792
|
-
},
|
|
792
|
+
}, q.getInputValidationProps), Te = Ot(d, q.inputRef, s);
|
|
793
793
|
return Ee("div", t, {
|
|
794
794
|
state: he,
|
|
795
795
|
ref: [r, Pe, b],
|
|
@@ -799,7 +799,7 @@ const It = /* @__PURE__ */ a.forwardRef(function(t, r) {
|
|
|
799
799
|
children: [o, /* @__PURE__ */ be("input", {
|
|
800
800
|
ref: Te,
|
|
801
801
|
...ve
|
|
802
|
-
}),
|
|
802
|
+
}), U && !j && C && // this must be rendered with the last thumb to ensure all
|
|
803
803
|
// preceding thumbs are already rendered in the DOM
|
|
804
804
|
xe && /* @__PURE__ */ be("script", {
|
|
805
805
|
// eslint-disable-next-line react/no-danger
|
|
@@ -812,9 +812,9 @@ const It = /* @__PURE__ */ a.forwardRef(function(t, r) {
|
|
|
812
812
|
id: te,
|
|
813
813
|
onBlur: V,
|
|
814
814
|
onFocus: x,
|
|
815
|
-
onPointerDown(
|
|
815
|
+
onPointerDown(_) {
|
|
816
816
|
if (de.current = I, b.current != null) {
|
|
817
|
-
const T = oe === "horizontal" ? "x" : "y", k = ht(b.current), Me = (oe === "horizontal" ?
|
|
817
|
+
const T = oe === "horizontal" ? "x" : "y", k = ht(b.current), Me = (oe === "horizontal" ? _.clientX : _.clientY) - k[T];
|
|
818
818
|
G.current = Me;
|
|
819
819
|
}
|
|
820
820
|
d.current != null && X.current !== d.current && (X.current = d.current);
|
|
@@ -854,27 +854,27 @@ const St = /* @__PURE__ */ a.forwardRef(function(t, r) {
|
|
|
854
854
|
indicatorPosition: u,
|
|
855
855
|
inset: g,
|
|
856
856
|
max: p,
|
|
857
|
-
min:
|
|
857
|
+
min: N,
|
|
858
858
|
orientation: h,
|
|
859
|
-
renderBeforeHydration:
|
|
859
|
+
renderBeforeHydration: W,
|
|
860
860
|
state: E,
|
|
861
861
|
values: m
|
|
862
862
|
} = Le(), [s, V] = a.useState(!1);
|
|
863
863
|
rt(() => V(!0));
|
|
864
|
-
const x = h === "vertical", P = m.length > 1, y = g ? nn(x, P, u[0], u[1],
|
|
864
|
+
const x = h === "vertical", P = m.length > 1, y = g ? nn(x, P, u[0], u[1], W, s) : rn(x, P, qe(m[0], N, p), qe(m[m.length - 1], N, p));
|
|
865
865
|
return Ee("div", t, {
|
|
866
866
|
state: E,
|
|
867
867
|
ref: r,
|
|
868
868
|
props: [{
|
|
869
|
-
"data-base-ui-slider-indicator":
|
|
869
|
+
"data-base-ui-slider-indicator": W ? "" : void 0,
|
|
870
870
|
style: y,
|
|
871
|
-
suppressHydrationWarning:
|
|
871
|
+
suppressHydrationWarning: W || void 0
|
|
872
872
|
}, l],
|
|
873
873
|
stateAttributesMapping: Ve
|
|
874
874
|
});
|
|
875
875
|
});
|
|
876
876
|
process.env.NODE_ENV !== "production" && (St.displayName = "SliderIndicator");
|
|
877
|
-
const on = "
|
|
877
|
+
const on = "_slider__control_158wu_3", sn = "_slider__track_158wu_10", an = "_slider__indicator_158wu_18", un = "_slider__thumb_158wu_29", Be = {
|
|
878
878
|
slider__control: on,
|
|
879
879
|
slider__track: sn,
|
|
880
880
|
slider__indicator: an,
|