@moises.ai/design-system 2.2.2 → 2.2.3
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/index.js +408 -407
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -23,11 +23,11 @@ var li = [" ", "Enter", "ArrowUp", "ArrowDown"], ci = [" ", "Enter"], Oe = "Sele
|
|
|
23
23
|
onValueChange: c,
|
|
24
24
|
dir: d,
|
|
25
25
|
name: u,
|
|
26
|
-
autoComplete:
|
|
27
|
-
disabled:
|
|
26
|
+
autoComplete: m,
|
|
27
|
+
disabled: h,
|
|
28
28
|
required: R,
|
|
29
|
-
form:
|
|
30
|
-
} = e,
|
|
29
|
+
form: C
|
|
30
|
+
} = e, p = xt(t), [S, f] = r.useState(null), [I, k] = r.useState(null), [E, w] = r.useState(!1), T = ar(d), [b, G] = pt({
|
|
31
31
|
prop: s,
|
|
32
32
|
defaultProp: n ?? !1,
|
|
33
33
|
onChange: o,
|
|
@@ -37,16 +37,16 @@ var li = [" ", "Enter", "ArrowUp", "ArrowDown"], ci = [" ", "Enter"], Oe = "Sele
|
|
|
37
37
|
defaultProp: l,
|
|
38
38
|
onChange: c,
|
|
39
39
|
caller: Oe
|
|
40
|
-
}), M = r.useRef(null), H =
|
|
41
|
-
return /* @__PURE__ */ A(Rn, { ...
|
|
40
|
+
}), M = r.useRef(null), H = S ? C || !!S.closest("form") : !0, [v, U] = r.useState(/* @__PURE__ */ new Set()), O = Array.from(v).map((z) => z.props.value).join(";");
|
|
41
|
+
return /* @__PURE__ */ A(Rn, { ...p, children: /* @__PURE__ */ y(
|
|
42
42
|
di,
|
|
43
43
|
{
|
|
44
44
|
required: R,
|
|
45
45
|
scope: t,
|
|
46
|
-
trigger:
|
|
47
|
-
onTriggerChange:
|
|
48
|
-
valueNode:
|
|
49
|
-
onValueNodeChange:
|
|
46
|
+
trigger: S,
|
|
47
|
+
onTriggerChange: f,
|
|
48
|
+
valueNode: I,
|
|
49
|
+
onValueNodeChange: k,
|
|
50
50
|
valueNodeHasChildren: E,
|
|
51
51
|
onValueNodeHasChildrenChange: w,
|
|
52
52
|
contentId: Aa(),
|
|
@@ -56,7 +56,7 @@ var li = [" ", "Enter", "ArrowUp", "ArrowDown"], ci = [" ", "Enter"], Oe = "Sele
|
|
|
56
56
|
onOpenChange: G,
|
|
57
57
|
dir: T,
|
|
58
58
|
triggerPointerDownPosRef: M,
|
|
59
|
-
disabled:
|
|
59
|
+
disabled: h,
|
|
60
60
|
children: [
|
|
61
61
|
/* @__PURE__ */ A(Ut.Provider, { scope: t, children: /* @__PURE__ */ A(
|
|
62
62
|
ui,
|
|
@@ -81,11 +81,11 @@ var li = [" ", "Enter", "ArrowUp", "ArrowDown"], ci = [" ", "Enter"], Oe = "Sele
|
|
|
81
81
|
required: R,
|
|
82
82
|
tabIndex: -1,
|
|
83
83
|
name: u,
|
|
84
|
-
autoComplete:
|
|
84
|
+
autoComplete: m,
|
|
85
85
|
value: re,
|
|
86
86
|
onChange: (z) => ee(z.target.value),
|
|
87
|
-
disabled:
|
|
88
|
-
form:
|
|
87
|
+
disabled: h,
|
|
88
|
+
form: C,
|
|
89
89
|
children: [
|
|
90
90
|
re === void 0 ? /* @__PURE__ */ A("option", { value: "" }) : null,
|
|
91
91
|
Array.from(v)
|
|
@@ -100,13 +100,13 @@ var li = [" ", "Enter", "ArrowUp", "ArrowDown"], ci = [" ", "Enter"], Oe = "Sele
|
|
|
100
100
|
fr.displayName = Oe;
|
|
101
101
|
var Sr = "SelectTrigger", Cr = r.forwardRef(
|
|
102
102
|
(e, t) => {
|
|
103
|
-
const { __scopeSelect: a, disabled: s = !1, ...n } = e, o = xt(a), i = ye(Sr, a), l = i.disabled || s, c = ne(t, i.onTriggerChange), d = Tt(a), u = r.useRef("touch"), [
|
|
104
|
-
const
|
|
105
|
-
|
|
106
|
-
}),
|
|
107
|
-
l || (i.onOpenChange(!0), R()),
|
|
108
|
-
x: Math.round(
|
|
109
|
-
y: Math.round(
|
|
103
|
+
const { __scopeSelect: a, disabled: s = !1, ...n } = e, o = xt(a), i = ye(Sr, a), l = i.disabled || s, c = ne(t, i.onTriggerChange), d = Tt(a), u = r.useRef("touch"), [m, h, R] = Pr((p) => {
|
|
104
|
+
const S = d().filter((k) => !k.disabled), f = S.find((k) => k.value === i.value), I = Hr(S, p, f);
|
|
105
|
+
I !== void 0 && i.onValueChange(I.value);
|
|
106
|
+
}), C = (p) => {
|
|
107
|
+
l || (i.onOpenChange(!0), R()), p && (i.triggerPointerDownPosRef.current = {
|
|
108
|
+
x: Math.round(p.pageX),
|
|
109
|
+
y: Math.round(p.pageY)
|
|
110
110
|
});
|
|
111
111
|
};
|
|
112
112
|
return /* @__PURE__ */ A(yn, { asChild: !0, ...o, children: /* @__PURE__ */ A(
|
|
@@ -125,17 +125,17 @@ var Sr = "SelectTrigger", Cr = r.forwardRef(
|
|
|
125
125
|
"data-placeholder": Vr(i.value) ? "" : void 0,
|
|
126
126
|
...n,
|
|
127
127
|
ref: c,
|
|
128
|
-
onClick: P(n.onClick, (
|
|
129
|
-
|
|
128
|
+
onClick: P(n.onClick, (p) => {
|
|
129
|
+
p.currentTarget.focus(), u.current !== "mouse" && C(p);
|
|
130
130
|
}),
|
|
131
|
-
onPointerDown: P(n.onPointerDown, (
|
|
132
|
-
u.current =
|
|
133
|
-
const
|
|
134
|
-
|
|
131
|
+
onPointerDown: P(n.onPointerDown, (p) => {
|
|
132
|
+
u.current = p.pointerType;
|
|
133
|
+
const S = p.target;
|
|
134
|
+
S.hasPointerCapture(p.pointerId) && S.releasePointerCapture(p.pointerId), p.button === 0 && p.ctrlKey === !1 && p.pointerType === "mouse" && (C(p), p.preventDefault());
|
|
135
135
|
}),
|
|
136
|
-
onKeyDown: P(n.onKeyDown, (
|
|
137
|
-
const
|
|
138
|
-
!(
|
|
136
|
+
onKeyDown: P(n.onKeyDown, (p) => {
|
|
137
|
+
const S = m.current !== "";
|
|
138
|
+
!(p.ctrlKey || p.altKey || p.metaKey) && p.key.length === 1 && h(p.key), !(S && p.key === " ") && li.includes(p.key) && (C(), p.preventDefault());
|
|
139
139
|
})
|
|
140
140
|
}
|
|
141
141
|
) });
|
|
@@ -144,14 +144,14 @@ var Sr = "SelectTrigger", Cr = r.forwardRef(
|
|
|
144
144
|
Cr.displayName = Sr;
|
|
145
145
|
var kr = "SelectValue", Ir = r.forwardRef(
|
|
146
146
|
(e, t) => {
|
|
147
|
-
const { __scopeSelect: a, className: s, style: n, children: o, placeholder: i = "", ...l } = e, c = ye(kr, a), { onValueNodeHasChildrenChange: d } = c, u = o !== void 0,
|
|
147
|
+
const { __scopeSelect: a, className: s, style: n, children: o, placeholder: i = "", ...l } = e, c = ye(kr, a), { onValueNodeHasChildrenChange: d } = c, u = o !== void 0, m = ne(t, c.onValueNodeChange);
|
|
148
148
|
return Re(() => {
|
|
149
149
|
d(u);
|
|
150
150
|
}, [d, u]), /* @__PURE__ */ A(
|
|
151
151
|
_.span,
|
|
152
152
|
{
|
|
153
153
|
...l,
|
|
154
|
-
ref:
|
|
154
|
+
ref: m,
|
|
155
155
|
style: { pointerEvents: "none" },
|
|
156
156
|
children: Vr(c.value) ? /* @__PURE__ */ A(qe, { children: i }) : o
|
|
157
157
|
}
|
|
@@ -198,20 +198,20 @@ var pe = 10, [Br, Be] = $e(Ke), hi = "SelectContentImpl", fi = bn("SelectContent
|
|
|
198
198
|
sideOffset: c,
|
|
199
199
|
align: d,
|
|
200
200
|
alignOffset: u,
|
|
201
|
-
arrowPadding:
|
|
202
|
-
collisionBoundary:
|
|
201
|
+
arrowPadding: m,
|
|
202
|
+
collisionBoundary: h,
|
|
203
203
|
collisionPadding: R,
|
|
204
|
-
sticky:
|
|
205
|
-
hideWhenDetached:
|
|
206
|
-
avoidCollisions:
|
|
204
|
+
sticky: C,
|
|
205
|
+
hideWhenDetached: p,
|
|
206
|
+
avoidCollisions: S,
|
|
207
207
|
//
|
|
208
|
-
...
|
|
209
|
-
} = e,
|
|
208
|
+
...f
|
|
209
|
+
} = e, I = ye(Ke, a), [k, E] = r.useState(null), [w, T] = r.useState(null), b = ne(t, (J) => E(J)), [G, re] = r.useState(null), [ee, M] = r.useState(
|
|
210
210
|
null
|
|
211
211
|
), H = Tt(a), [v, U] = r.useState(!1), O = r.useRef(!1);
|
|
212
212
|
r.useEffect(() => {
|
|
213
|
-
if (
|
|
214
|
-
}, [
|
|
213
|
+
if (k) return Jn(k);
|
|
214
|
+
}, [k]), wn();
|
|
215
215
|
const z = r.useCallback(
|
|
216
216
|
(J) => {
|
|
217
217
|
const [j, ...ce] = H().map((q) => q.ref.current), [W] = ce.slice(-1), K = document.activeElement;
|
|
@@ -220,15 +220,15 @@ var pe = 10, [Br, Be] = $e(Ke), hi = "SelectContentImpl", fi = bn("SelectContent
|
|
|
220
220
|
},
|
|
221
221
|
[H, w]
|
|
222
222
|
), Y = r.useCallback(
|
|
223
|
-
() => z([G,
|
|
224
|
-
[z, G,
|
|
223
|
+
() => z([G, k]),
|
|
224
|
+
[z, G, k]
|
|
225
225
|
);
|
|
226
226
|
r.useEffect(() => {
|
|
227
227
|
v && Y();
|
|
228
228
|
}, [v, Y]);
|
|
229
|
-
const { onOpenChange: X, triggerPointerDownPosRef: le } =
|
|
229
|
+
const { onOpenChange: X, triggerPointerDownPosRef: le } = I;
|
|
230
230
|
r.useEffect(() => {
|
|
231
|
-
if (
|
|
231
|
+
if (k) {
|
|
232
232
|
let J = { x: 0, y: 0 };
|
|
233
233
|
const j = (W) => {
|
|
234
234
|
var K, q;
|
|
@@ -237,13 +237,13 @@ var pe = 10, [Br, Be] = $e(Ke), hi = "SelectContentImpl", fi = bn("SelectContent
|
|
|
237
237
|
y: Math.abs(Math.round(W.pageY) - (((q = le.current) == null ? void 0 : q.y) ?? 0))
|
|
238
238
|
};
|
|
239
239
|
}, ce = (W) => {
|
|
240
|
-
J.x <= 10 && J.y <= 10 ? W.preventDefault() :
|
|
240
|
+
J.x <= 10 && J.y <= 10 ? W.preventDefault() : k.contains(W.target) || X(!1), document.removeEventListener("pointermove", j), le.current = null;
|
|
241
241
|
};
|
|
242
242
|
return le.current !== null && (document.addEventListener("pointermove", j), document.addEventListener("pointerup", ce, { capture: !0, once: !0 })), () => {
|
|
243
243
|
document.removeEventListener("pointermove", j), document.removeEventListener("pointerup", ce, { capture: !0 });
|
|
244
244
|
};
|
|
245
245
|
}
|
|
246
|
-
}, [
|
|
246
|
+
}, [k, X, le]), r.useEffect(() => {
|
|
247
247
|
const J = () => X(!1);
|
|
248
248
|
return window.addEventListener("blur", J), window.addEventListener("resize", J), () => {
|
|
249
249
|
window.removeEventListener("blur", J), window.removeEventListener("resize", J);
|
|
@@ -255,32 +255,32 @@ var pe = 10, [Br, Be] = $e(Ke), hi = "SelectContentImpl", fi = bn("SelectContent
|
|
|
255
255
|
}), Ot = r.useCallback(
|
|
256
256
|
(J, j, ce) => {
|
|
257
257
|
const W = !O.current && !ce;
|
|
258
|
-
(
|
|
258
|
+
(I.value !== void 0 && I.value === j || W) && (re(J), W && (O.current = !0));
|
|
259
259
|
},
|
|
260
|
-
[
|
|
261
|
-
), Kt = r.useCallback(() =>
|
|
260
|
+
[I.value]
|
|
261
|
+
), Kt = r.useCallback(() => k == null ? void 0 : k.focus(), [k]), ze = r.useCallback(
|
|
262
262
|
(J, j, ce) => {
|
|
263
263
|
const W = !O.current && !ce;
|
|
264
|
-
(
|
|
264
|
+
(I.value !== void 0 && I.value === j || W) && M(J);
|
|
265
265
|
},
|
|
266
|
-
[
|
|
266
|
+
[I.value]
|
|
267
267
|
), Ct = s === "popper" ? Zt : vr, st = Ct === Zt ? {
|
|
268
268
|
side: l,
|
|
269
269
|
sideOffset: c,
|
|
270
270
|
align: d,
|
|
271
271
|
alignOffset: u,
|
|
272
|
-
arrowPadding:
|
|
273
|
-
collisionBoundary:
|
|
272
|
+
arrowPadding: m,
|
|
273
|
+
collisionBoundary: h,
|
|
274
274
|
collisionPadding: R,
|
|
275
|
-
sticky:
|
|
276
|
-
hideWhenDetached:
|
|
277
|
-
avoidCollisions:
|
|
275
|
+
sticky: C,
|
|
276
|
+
hideWhenDetached: p,
|
|
277
|
+
avoidCollisions: S
|
|
278
278
|
} : {};
|
|
279
279
|
return /* @__PURE__ */ A(
|
|
280
280
|
Br,
|
|
281
281
|
{
|
|
282
282
|
scope: a,
|
|
283
|
-
content:
|
|
283
|
+
content: k,
|
|
284
284
|
viewport: w,
|
|
285
285
|
onViewportChange: T,
|
|
286
286
|
itemRefCallback: Ot,
|
|
@@ -296,13 +296,13 @@ var pe = 10, [Br, Be] = $e(Ke), hi = "SelectContentImpl", fi = bn("SelectContent
|
|
|
296
296
|
Un,
|
|
297
297
|
{
|
|
298
298
|
asChild: !0,
|
|
299
|
-
trapped:
|
|
299
|
+
trapped: I.open,
|
|
300
300
|
onMountAutoFocus: (J) => {
|
|
301
301
|
J.preventDefault();
|
|
302
302
|
},
|
|
303
303
|
onUnmountAutoFocus: P(n, (J) => {
|
|
304
304
|
var j;
|
|
305
|
-
(j =
|
|
305
|
+
(j = I.trigger) == null || j.focus({ preventScroll: !0 }), J.preventDefault();
|
|
306
306
|
}),
|
|
307
307
|
children: /* @__PURE__ */ A(
|
|
308
308
|
Tn,
|
|
@@ -312,16 +312,16 @@ var pe = 10, [Br, Be] = $e(Ke), hi = "SelectContentImpl", fi = bn("SelectContent
|
|
|
312
312
|
onEscapeKeyDown: o,
|
|
313
313
|
onPointerDownOutside: i,
|
|
314
314
|
onFocusOutside: (J) => J.preventDefault(),
|
|
315
|
-
onDismiss: () =>
|
|
315
|
+
onDismiss: () => I.onOpenChange(!1),
|
|
316
316
|
children: /* @__PURE__ */ A(
|
|
317
317
|
Ct,
|
|
318
318
|
{
|
|
319
319
|
role: "listbox",
|
|
320
|
-
id:
|
|
321
|
-
"data-state":
|
|
322
|
-
dir:
|
|
320
|
+
id: I.contentId,
|
|
321
|
+
"data-state": I.open ? "open" : "closed",
|
|
322
|
+
dir: I.dir,
|
|
323
323
|
onContextMenu: (J) => J.preventDefault(),
|
|
324
|
-
...
|
|
324
|
+
...f,
|
|
325
325
|
...st,
|
|
326
326
|
onPlaced: () => U(!0),
|
|
327
327
|
ref: b,
|
|
@@ -331,9 +331,9 @@ var pe = 10, [Br, Be] = $e(Ke), hi = "SelectContentImpl", fi = bn("SelectContent
|
|
|
331
331
|
flexDirection: "column",
|
|
332
332
|
// reset the outline by default as the content MAY get focused
|
|
333
333
|
outline: "none",
|
|
334
|
-
...
|
|
334
|
+
...f.style
|
|
335
335
|
},
|
|
336
|
-
onKeyDown: P(
|
|
336
|
+
onKeyDown: P(f.onKeyDown, (J) => {
|
|
337
337
|
const j = J.ctrlKey || J.altKey || J.metaKey;
|
|
338
338
|
if (J.key === "Tab" && J.preventDefault(), !j && J.key.length === 1 && We(J.key), ["ArrowUp", "ArrowDown", "Home", "End"].includes(J.key)) {
|
|
339
339
|
let W = H().filter((K) => !K.disabled).map((K) => K.ref.current);
|
|
@@ -356,9 +356,9 @@ var pe = 10, [Br, Be] = $e(Ke), hi = "SelectContentImpl", fi = bn("SelectContent
|
|
|
356
356
|
);
|
|
357
357
|
Nr.displayName = hi;
|
|
358
358
|
var Si = "SelectItemAlignedPosition", vr = r.forwardRef((e, t) => {
|
|
359
|
-
const { __scopeSelect: a, onPlaced: s, ...n } = e, o = ye(Ke, a), i = Be(Ke, a), [l, c] = r.useState(null), [d, u] = r.useState(null),
|
|
360
|
-
if (o.trigger && o.valueNode && l && d &&
|
|
361
|
-
const b = o.trigger.getBoundingClientRect(), G = d.getBoundingClientRect(), re = o.valueNode.getBoundingClientRect(), ee =
|
|
359
|
+
const { __scopeSelect: a, onPlaced: s, ...n } = e, o = ye(Ke, a), i = Be(Ke, a), [l, c] = r.useState(null), [d, u] = r.useState(null), m = ne(t, (b) => u(b)), h = Tt(a), R = r.useRef(!1), C = r.useRef(!0), { viewport: p, selectedItem: S, selectedItemText: f, focusSelectedItem: I } = i, k = r.useCallback(() => {
|
|
360
|
+
if (o.trigger && o.valueNode && l && d && p && S && f) {
|
|
361
|
+
const b = o.trigger.getBoundingClientRect(), G = d.getBoundingClientRect(), re = o.valueNode.getBoundingClientRect(), ee = f.getBoundingClientRect();
|
|
362
362
|
if (o.dir !== "rtl") {
|
|
363
363
|
const K = ee.left - G.left, q = re.left - K, Je = b.left - q, we = b.width + Je, qt = Math.max(we, G.width), Vt = window.innerWidth - pe, Pt = Bt(q, [
|
|
364
364
|
pe,
|
|
@@ -377,50 +377,50 @@ var Si = "SelectItemAlignedPosition", vr = r.forwardRef((e, t) => {
|
|
|
377
377
|
]);
|
|
378
378
|
l.style.minWidth = we + "px", l.style.right = Pt + "px";
|
|
379
379
|
}
|
|
380
|
-
const M =
|
|
380
|
+
const M = h(), H = window.innerHeight - pe * 2, v = p.scrollHeight, U = window.getComputedStyle(d), O = parseInt(U.borderTopWidth, 10), z = parseInt(U.paddingTop, 10), Y = parseInt(U.borderBottomWidth, 10), X = parseInt(U.paddingBottom, 10), le = O + z + v + X + Y, rt = Math.min(S.offsetHeight * 5, le), We = window.getComputedStyle(p), Ot = parseInt(We.paddingTop, 10), Kt = parseInt(We.paddingBottom, 10), ze = b.top + b.height / 2 - pe, Ct = H - ze, st = S.offsetHeight / 2, J = S.offsetTop + st, j = O + z + J, ce = le - j;
|
|
381
381
|
if (j <= ze) {
|
|
382
|
-
const K = M.length > 0 &&
|
|
382
|
+
const K = M.length > 0 && S === M[M.length - 1].ref.current;
|
|
383
383
|
l.style.bottom = "0px";
|
|
384
|
-
const q = d.clientHeight -
|
|
384
|
+
const q = d.clientHeight - p.offsetTop - p.offsetHeight, Je = Math.max(
|
|
385
385
|
Ct,
|
|
386
386
|
st + // viewport might have padding bottom, include it to avoid a scrollable viewport
|
|
387
387
|
(K ? Kt : 0) + q + Y
|
|
388
388
|
), we = j + Je;
|
|
389
389
|
l.style.height = we + "px";
|
|
390
390
|
} else {
|
|
391
|
-
const K = M.length > 0 &&
|
|
391
|
+
const K = M.length > 0 && S === M[0].ref.current;
|
|
392
392
|
l.style.top = "0px";
|
|
393
393
|
const Je = Math.max(
|
|
394
394
|
ze,
|
|
395
|
-
O +
|
|
395
|
+
O + p.offsetTop + // viewport might have padding top, include it to avoid a scrollable viewport
|
|
396
396
|
(K ? Ot : 0) + st
|
|
397
397
|
) + ce;
|
|
398
|
-
l.style.height = Je + "px",
|
|
398
|
+
l.style.height = Je + "px", p.scrollTop = j - ze + p.offsetTop;
|
|
399
399
|
}
|
|
400
400
|
l.style.margin = `${pe}px 0`, l.style.minHeight = rt + "px", l.style.maxHeight = H + "px", s == null || s(), requestAnimationFrame(() => R.current = !0);
|
|
401
401
|
}
|
|
402
402
|
}, [
|
|
403
|
-
|
|
403
|
+
h,
|
|
404
404
|
o.trigger,
|
|
405
405
|
o.valueNode,
|
|
406
406
|
l,
|
|
407
407
|
d,
|
|
408
|
-
|
|
409
|
-
C,
|
|
408
|
+
p,
|
|
410
409
|
S,
|
|
410
|
+
f,
|
|
411
411
|
o.dir,
|
|
412
412
|
s
|
|
413
413
|
]);
|
|
414
|
-
Re(() =>
|
|
414
|
+
Re(() => k(), [k]);
|
|
415
415
|
const [E, w] = r.useState();
|
|
416
416
|
Re(() => {
|
|
417
417
|
d && w(window.getComputedStyle(d).zIndex);
|
|
418
418
|
}, [d]);
|
|
419
419
|
const T = r.useCallback(
|
|
420
420
|
(b) => {
|
|
421
|
-
b &&
|
|
421
|
+
b && C.current === !0 && (k(), I == null || I(), C.current = !1);
|
|
422
422
|
},
|
|
423
|
-
[
|
|
423
|
+
[k, I]
|
|
424
424
|
);
|
|
425
425
|
return /* @__PURE__ */ A(
|
|
426
426
|
ki,
|
|
@@ -443,7 +443,7 @@ var Si = "SelectItemAlignedPosition", vr = r.forwardRef((e, t) => {
|
|
|
443
443
|
_.div,
|
|
444
444
|
{
|
|
445
445
|
...n,
|
|
446
|
-
ref:
|
|
446
|
+
ref: m,
|
|
447
447
|
style: {
|
|
448
448
|
// When we get the height of the content, it includes borders. If we were to set
|
|
449
449
|
// the height without having `boxSizing: 'border-box'` it would be too big.
|
|
@@ -523,14 +523,14 @@ var [ki, ha] = $e(Ke, {}), _t = "SelectViewport", Jr = r.forwardRef(
|
|
|
523
523
|
...n.style
|
|
524
524
|
},
|
|
525
525
|
onScroll: P(n.onScroll, (d) => {
|
|
526
|
-
const u = d.currentTarget, { contentWrapper:
|
|
527
|
-
if (
|
|
526
|
+
const u = d.currentTarget, { contentWrapper: m, shouldExpandOnScrollRef: h } = i;
|
|
527
|
+
if (h != null && h.current && m) {
|
|
528
528
|
const R = Math.abs(c.current - u.scrollTop);
|
|
529
529
|
if (R > 0) {
|
|
530
|
-
const
|
|
531
|
-
if (
|
|
532
|
-
const
|
|
533
|
-
|
|
530
|
+
const C = window.innerHeight - pe * 2, p = parseFloat(m.style.minHeight), S = parseFloat(m.style.height), f = Math.max(p, S);
|
|
531
|
+
if (f < C) {
|
|
532
|
+
const I = f + R, k = Math.min(C, I), E = I - k;
|
|
533
|
+
m.style.height = k + "px", m.style.bottom === "0px" && (u.scrollTop = E > 0 ? E : 0, m.style.justifyContent = "flex-end");
|
|
534
534
|
}
|
|
535
535
|
}
|
|
536
536
|
}
|
|
@@ -564,13 +564,13 @@ var Nt = "SelectItem", [Ri, Tr] = $e(Nt), xr = r.forwardRef(
|
|
|
564
564
|
disabled: n = !1,
|
|
565
565
|
textValue: o,
|
|
566
566
|
...i
|
|
567
|
-
} = e, l = ye(Nt, a), c = Be(Nt, a), d = l.value === s, [u,
|
|
567
|
+
} = e, l = ye(Nt, a), c = Be(Nt, a), d = l.value === s, [u, m] = r.useState(o ?? ""), [h, R] = r.useState(!1), C = ne(
|
|
568
568
|
t,
|
|
569
|
-
(
|
|
570
|
-
var
|
|
571
|
-
return (
|
|
569
|
+
(I) => {
|
|
570
|
+
var k;
|
|
571
|
+
return (k = c.itemRefCallback) == null ? void 0 : k.call(c, I, s, n);
|
|
572
572
|
}
|
|
573
|
-
),
|
|
573
|
+
), p = Aa(), S = r.useRef("touch"), f = () => {
|
|
574
574
|
n || (l.onValueChange(s), l.onOpenChange(!1));
|
|
575
575
|
};
|
|
576
576
|
if (s === "")
|
|
@@ -583,10 +583,10 @@ var Nt = "SelectItem", [Ri, Tr] = $e(Nt), xr = r.forwardRef(
|
|
|
583
583
|
scope: a,
|
|
584
584
|
value: s,
|
|
585
585
|
disabled: n,
|
|
586
|
-
textId:
|
|
586
|
+
textId: p,
|
|
587
587
|
isSelected: d,
|
|
588
|
-
onItemTextChange: r.useCallback((
|
|
589
|
-
|
|
588
|
+
onItemTextChange: r.useCallback((I) => {
|
|
589
|
+
m((k) => k || ((I == null ? void 0 : I.textContent) ?? "").trim());
|
|
590
590
|
}, []),
|
|
591
591
|
children: /* @__PURE__ */ A(
|
|
592
592
|
Ut.ItemSlot,
|
|
@@ -599,37 +599,37 @@ var Nt = "SelectItem", [Ri, Tr] = $e(Nt), xr = r.forwardRef(
|
|
|
599
599
|
_.div,
|
|
600
600
|
{
|
|
601
601
|
role: "option",
|
|
602
|
-
"aria-labelledby":
|
|
603
|
-
"data-highlighted":
|
|
604
|
-
"aria-selected": d &&
|
|
602
|
+
"aria-labelledby": p,
|
|
603
|
+
"data-highlighted": h ? "" : void 0,
|
|
604
|
+
"aria-selected": d && h,
|
|
605
605
|
"data-state": d ? "checked" : "unchecked",
|
|
606
606
|
"aria-disabled": n || void 0,
|
|
607
607
|
"data-disabled": n ? "" : void 0,
|
|
608
608
|
tabIndex: n ? void 0 : -1,
|
|
609
609
|
...i,
|
|
610
|
-
ref:
|
|
610
|
+
ref: C,
|
|
611
611
|
onFocus: P(i.onFocus, () => R(!0)),
|
|
612
612
|
onBlur: P(i.onBlur, () => R(!1)),
|
|
613
613
|
onClick: P(i.onClick, () => {
|
|
614
|
-
|
|
614
|
+
S.current !== "mouse" && f();
|
|
615
615
|
}),
|
|
616
616
|
onPointerUp: P(i.onPointerUp, () => {
|
|
617
|
-
|
|
617
|
+
S.current === "mouse" && f();
|
|
618
618
|
}),
|
|
619
|
-
onPointerDown: P(i.onPointerDown, (
|
|
620
|
-
|
|
619
|
+
onPointerDown: P(i.onPointerDown, (I) => {
|
|
620
|
+
S.current = I.pointerType;
|
|
621
621
|
}),
|
|
622
|
-
onPointerMove: P(i.onPointerMove, (
|
|
623
|
-
var
|
|
624
|
-
|
|
622
|
+
onPointerMove: P(i.onPointerMove, (I) => {
|
|
623
|
+
var k;
|
|
624
|
+
S.current = I.pointerType, n ? (k = c.onItemLeave) == null || k.call(c) : S.current === "mouse" && I.currentTarget.focus({ preventScroll: !0 });
|
|
625
625
|
}),
|
|
626
|
-
onPointerLeave: P(i.onPointerLeave, (
|
|
627
|
-
var
|
|
628
|
-
|
|
626
|
+
onPointerLeave: P(i.onPointerLeave, (I) => {
|
|
627
|
+
var k;
|
|
628
|
+
I.currentTarget === document.activeElement && ((k = c.onItemLeave) == null || k.call(c));
|
|
629
629
|
}),
|
|
630
|
-
onKeyDown: P(i.onKeyDown, (
|
|
630
|
+
onKeyDown: P(i.onKeyDown, (I) => {
|
|
631
631
|
var E;
|
|
632
|
-
((E = c.searchRef) == null ? void 0 : E.current) !== "" &&
|
|
632
|
+
((E = c.searchRef) == null ? void 0 : E.current) !== "" && I.key === " " || (ci.includes(I.key) && f(), I.key === " " && I.preventDefault());
|
|
633
633
|
})
|
|
634
634
|
}
|
|
635
635
|
)
|
|
@@ -642,20 +642,20 @@ var Nt = "SelectItem", [Ri, Tr] = $e(Nt), xr = r.forwardRef(
|
|
|
642
642
|
xr.displayName = Nt;
|
|
643
643
|
var ct = "SelectItemText", Dr = r.forwardRef(
|
|
644
644
|
(e, t) => {
|
|
645
|
-
const { __scopeSelect: a, className: s, style: n, ...o } = e, i = ye(ct, a), l = Be(ct, a), c = Tr(ct, a), d = gi(ct, a), [u,
|
|
645
|
+
const { __scopeSelect: a, className: s, style: n, ...o } = e, i = ye(ct, a), l = Be(ct, a), c = Tr(ct, a), d = gi(ct, a), [u, m] = r.useState(null), h = ne(
|
|
646
646
|
t,
|
|
647
|
-
(
|
|
647
|
+
(f) => m(f),
|
|
648
648
|
c.onItemTextChange,
|
|
649
|
-
(
|
|
650
|
-
var
|
|
651
|
-
return (
|
|
649
|
+
(f) => {
|
|
650
|
+
var I;
|
|
651
|
+
return (I = l.itemTextRefCallback) == null ? void 0 : I.call(l, f, c.value, c.disabled);
|
|
652
652
|
}
|
|
653
|
-
), R = u == null ? void 0 : u.textContent,
|
|
653
|
+
), R = u == null ? void 0 : u.textContent, C = r.useMemo(
|
|
654
654
|
() => /* @__PURE__ */ A("option", { value: c.value, disabled: c.disabled, children: R }, c.value),
|
|
655
655
|
[c.disabled, c.value, R]
|
|
656
|
-
), { onNativeOptionAdd:
|
|
657
|
-
return Re(() => (
|
|
658
|
-
/* @__PURE__ */ A(_.span, { id: c.textId, ...o, ref:
|
|
656
|
+
), { onNativeOptionAdd: p, onNativeOptionRemove: S } = d;
|
|
657
|
+
return Re(() => (p(C), () => S(C)), [p, S, C]), /* @__PURE__ */ y(qe, { children: [
|
|
658
|
+
/* @__PURE__ */ A(_.span, { id: c.textId, ...o, ref: h }),
|
|
659
659
|
c.isSelected && i.valueNode && !i.valueNodeHasChildren ? hr.createPortal(o.children, i.valueNode) : null
|
|
660
660
|
] });
|
|
661
661
|
}
|
|
@@ -722,7 +722,7 @@ var Or = r.forwardRef((e, t) => {
|
|
|
722
722
|
}, []);
|
|
723
723
|
return r.useEffect(() => () => c(), [c]), Re(() => {
|
|
724
724
|
var u;
|
|
725
|
-
const d = l().find((
|
|
725
|
+
const d = l().find((m) => m.ref.current === document.activeElement);
|
|
726
726
|
(u = d == null ? void 0 : d.ref.current) == null || u.scrollIntoView({ block: "nearest" });
|
|
727
727
|
}, [l]), /* @__PURE__ */ A(
|
|
728
728
|
_.div,
|
|
@@ -768,8 +768,8 @@ var Ji = "SelectBubbleInput", qr = r.forwardRef(
|
|
|
768
768
|
"value"
|
|
769
769
|
).set;
|
|
770
770
|
if (i !== t && u) {
|
|
771
|
-
const
|
|
772
|
-
u.call(l, t), l.dispatchEvent(
|
|
771
|
+
const m = new Event("change", { bubbles: !0 });
|
|
772
|
+
u.call(l, t), l.dispatchEvent(m);
|
|
773
773
|
}
|
|
774
774
|
}, [i, t]), /* @__PURE__ */ A(
|
|
775
775
|
_.select,
|
|
@@ -831,19 +831,19 @@ var Qi = fr, bi = Cr, Ui = Ir, Ti = Er, xi = Rr, Di = yr, Mi = Jr, Fi = Qr, Oi =
|
|
|
831
831
|
minStepsBetweenThumbs: c = 0,
|
|
832
832
|
defaultValue: d = [s],
|
|
833
833
|
value: u,
|
|
834
|
-
onValueChange:
|
|
834
|
+
onValueChange: m = () => {
|
|
835
835
|
},
|
|
836
|
-
onValueCommit:
|
|
836
|
+
onValueCommit: h = () => {
|
|
837
837
|
},
|
|
838
838
|
inverted: R = !1,
|
|
839
|
-
form:
|
|
840
|
-
...
|
|
841
|
-
} = e,
|
|
839
|
+
form: C,
|
|
840
|
+
...p
|
|
841
|
+
} = e, S = r.useRef(/* @__PURE__ */ new Set()), f = r.useRef(0), k = i === "horizontal" ? ji : Gi, [E = [], w] = pt({
|
|
842
842
|
prop: u,
|
|
843
843
|
defaultProp: d,
|
|
844
844
|
onChange: (M) => {
|
|
845
845
|
var v;
|
|
846
|
-
(v = [...
|
|
846
|
+
(v = [...S.current][f.current]) == null || v.focus(), m(M);
|
|
847
847
|
}
|
|
848
848
|
}), T = r.useRef(E);
|
|
849
849
|
function b(M) {
|
|
@@ -851,20 +851,20 @@ var Qi = fr, bi = Cr, Ui = Ir, Ti = Er, xi = Rr, Di = yr, Mi = Jr, Fi = Qr, Oi =
|
|
|
851
851
|
ee(M, H);
|
|
852
852
|
}
|
|
853
853
|
function G(M) {
|
|
854
|
-
ee(M,
|
|
854
|
+
ee(M, f.current);
|
|
855
855
|
}
|
|
856
856
|
function re() {
|
|
857
|
-
const M = T.current[
|
|
858
|
-
E[
|
|
857
|
+
const M = T.current[f.current];
|
|
858
|
+
E[f.current] !== M && h(E);
|
|
859
859
|
}
|
|
860
860
|
function ee(M, H, { commit: v } = { commit: !1 }) {
|
|
861
861
|
const U = al(o), O = rl(Math.round((M - s) / o) * o + s, U), z = Bt(O, [s, n]);
|
|
862
862
|
w((Y = []) => {
|
|
863
863
|
const X = Xi(Y, z, H);
|
|
864
864
|
if (tl(X, c * o)) {
|
|
865
|
-
|
|
865
|
+
f.current = X.indexOf(z);
|
|
866
866
|
const le = String(X) !== String(Y);
|
|
867
|
-
return le && v &&
|
|
867
|
+
return le && v && h(X), le ? X : Y;
|
|
868
868
|
} else
|
|
869
869
|
return Y;
|
|
870
870
|
});
|
|
@@ -877,19 +877,19 @@ var Qi = fr, bi = Cr, Ui = Ir, Ti = Er, xi = Rr, Di = yr, Mi = Jr, Fi = Qr, Oi =
|
|
|
877
877
|
disabled: l,
|
|
878
878
|
min: s,
|
|
879
879
|
max: n,
|
|
880
|
-
valueIndexToChangeRef:
|
|
881
|
-
thumbs:
|
|
880
|
+
valueIndexToChangeRef: f,
|
|
881
|
+
thumbs: S.current,
|
|
882
882
|
values: E,
|
|
883
883
|
orientation: i,
|
|
884
|
-
form:
|
|
884
|
+
form: C,
|
|
885
885
|
children: /* @__PURE__ */ A(aa.Provider, { scope: e.__scopeSlider, children: /* @__PURE__ */ A(aa.Slot, { scope: e.__scopeSlider, children: /* @__PURE__ */ A(
|
|
886
|
-
|
|
886
|
+
k,
|
|
887
887
|
{
|
|
888
888
|
"aria-disabled": l,
|
|
889
889
|
"data-disabled": l ? "" : void 0,
|
|
890
|
-
...
|
|
890
|
+
...p,
|
|
891
891
|
ref: t,
|
|
892
|
-
onPointerDown: P(
|
|
892
|
+
onPointerDown: P(p.onPointerDown, () => {
|
|
893
893
|
l || (T.current = E);
|
|
894
894
|
}),
|
|
895
895
|
min: s,
|
|
@@ -902,7 +902,7 @@ var Qi = fr, bi = Cr, Ui = Ir, Ti = Er, xi = Rr, Di = yr, Mi = Jr, Fi = Qr, Oi =
|
|
|
902
902
|
onEndKeyDown: () => !l && ee(n, E.length - 1, { commit: !0 }),
|
|
903
903
|
onStepKeyDown: ({ event: M, direction: H }) => {
|
|
904
904
|
if (!l) {
|
|
905
|
-
const O = Wr.includes(M.key) || M.shiftKey && zr.includes(M.key) ? 10 : 1, z =
|
|
905
|
+
const O = Wr.includes(M.key) || M.shiftKey && zr.includes(M.key) ? 10 : 1, z = f.current, Y = E[z], X = o * O * H;
|
|
906
906
|
ee(Y + X, z, { commit: !0 });
|
|
907
907
|
}
|
|
908
908
|
}
|
|
@@ -930,23 +930,23 @@ var [Yr, Xr] = Gr(et, {
|
|
|
930
930
|
onSlideEnd: c,
|
|
931
931
|
onStepKeyDown: d,
|
|
932
932
|
...u
|
|
933
|
-
} = e, [
|
|
934
|
-
function k
|
|
935
|
-
const E =
|
|
936
|
-
return
|
|
933
|
+
} = e, [m, h] = r.useState(null), R = ne(t, (k) => h(k)), C = r.useRef(void 0), p = ar(n), S = p === "ltr", f = S && !o || !S && o;
|
|
934
|
+
function I(k) {
|
|
935
|
+
const E = C.current || m.getBoundingClientRect(), w = [0, E.width], b = fa(w, f ? [a, s] : [s, a]);
|
|
936
|
+
return C.current = E, b(k - E.left);
|
|
937
937
|
}
|
|
938
938
|
return /* @__PURE__ */ A(
|
|
939
939
|
Yr,
|
|
940
940
|
{
|
|
941
941
|
scope: e.__scopeSlider,
|
|
942
|
-
startEdge:
|
|
943
|
-
endEdge:
|
|
944
|
-
direction:
|
|
942
|
+
startEdge: f ? "left" : "right",
|
|
943
|
+
endEdge: f ? "right" : "left",
|
|
944
|
+
direction: f ? 1 : -1,
|
|
945
945
|
size: "width",
|
|
946
946
|
children: /* @__PURE__ */ A(
|
|
947
947
|
Zr,
|
|
948
948
|
{
|
|
949
|
-
dir:
|
|
949
|
+
dir: p,
|
|
950
950
|
"data-orientation": "horizontal",
|
|
951
951
|
...u,
|
|
952
952
|
ref: R,
|
|
@@ -954,20 +954,20 @@ var [Yr, Xr] = Gr(et, {
|
|
|
954
954
|
...u.style,
|
|
955
955
|
"--radix-slider-thumb-transform": "translateX(-50%)"
|
|
956
956
|
},
|
|
957
|
-
onSlideStart: (
|
|
958
|
-
const E = k
|
|
957
|
+
onSlideStart: (k) => {
|
|
958
|
+
const E = I(k.clientX);
|
|
959
959
|
i == null || i(E);
|
|
960
960
|
},
|
|
961
|
-
onSlideMove: (
|
|
962
|
-
const E = k
|
|
961
|
+
onSlideMove: (k) => {
|
|
962
|
+
const E = I(k.clientX);
|
|
963
963
|
l == null || l(E);
|
|
964
964
|
},
|
|
965
965
|
onSlideEnd: () => {
|
|
966
|
-
|
|
966
|
+
C.current = void 0, c == null || c();
|
|
967
967
|
},
|
|
968
|
-
onStepKeyDown: (
|
|
969
|
-
const w = jr[
|
|
970
|
-
d == null || d({ event:
|
|
968
|
+
onStepKeyDown: (k) => {
|
|
969
|
+
const w = jr[f ? "from-left" : "from-right"].includes(k.key);
|
|
970
|
+
d == null || d({ event: k, direction: w ? -1 : 1 });
|
|
971
971
|
}
|
|
972
972
|
}
|
|
973
973
|
)
|
|
@@ -985,10 +985,10 @@ var [Yr, Xr] = Gr(et, {
|
|
|
985
985
|
onSlideEnd: l,
|
|
986
986
|
onStepKeyDown: c,
|
|
987
987
|
...d
|
|
988
|
-
} = e, u = r.useRef(null),
|
|
989
|
-
function
|
|
990
|
-
const
|
|
991
|
-
return
|
|
988
|
+
} = e, u = r.useRef(null), m = ne(t, u), h = r.useRef(void 0), R = !n;
|
|
989
|
+
function C(p) {
|
|
990
|
+
const S = h.current || u.current.getBoundingClientRect(), f = [0, S.height], k = fa(f, R ? [s, a] : [a, s]);
|
|
991
|
+
return h.current = S, k(p - S.top);
|
|
992
992
|
}
|
|
993
993
|
return /* @__PURE__ */ A(
|
|
994
994
|
Yr,
|
|
@@ -1003,25 +1003,25 @@ var [Yr, Xr] = Gr(et, {
|
|
|
1003
1003
|
{
|
|
1004
1004
|
"data-orientation": "vertical",
|
|
1005
1005
|
...d,
|
|
1006
|
-
ref:
|
|
1006
|
+
ref: m,
|
|
1007
1007
|
style: {
|
|
1008
1008
|
...d.style,
|
|
1009
1009
|
"--radix-slider-thumb-transform": "translateY(50%)"
|
|
1010
1010
|
},
|
|
1011
|
-
onSlideStart: (
|
|
1012
|
-
const
|
|
1013
|
-
o == null || o(
|
|
1011
|
+
onSlideStart: (p) => {
|
|
1012
|
+
const S = C(p.clientY);
|
|
1013
|
+
o == null || o(S);
|
|
1014
1014
|
},
|
|
1015
|
-
onSlideMove: (
|
|
1016
|
-
const
|
|
1017
|
-
i == null || i(
|
|
1015
|
+
onSlideMove: (p) => {
|
|
1016
|
+
const S = C(p.clientY);
|
|
1017
|
+
i == null || i(S);
|
|
1018
1018
|
},
|
|
1019
1019
|
onSlideEnd: () => {
|
|
1020
|
-
|
|
1020
|
+
h.current = void 0, l == null || l();
|
|
1021
1021
|
},
|
|
1022
|
-
onStepKeyDown: (
|
|
1023
|
-
const
|
|
1024
|
-
c == null || c({ event:
|
|
1022
|
+
onStepKeyDown: (p) => {
|
|
1023
|
+
const f = jr[R ? "from-bottom" : "from-top"].includes(p.key);
|
|
1024
|
+
c == null || c({ event: p, direction: f ? -1 : 1 });
|
|
1025
1025
|
}
|
|
1026
1026
|
}
|
|
1027
1027
|
)
|
|
@@ -1045,19 +1045,19 @@ var [Yr, Xr] = Gr(et, {
|
|
|
1045
1045
|
{
|
|
1046
1046
|
...d,
|
|
1047
1047
|
ref: t,
|
|
1048
|
-
onKeyDown: P(e.onKeyDown, (
|
|
1049
|
-
|
|
1048
|
+
onKeyDown: P(e.onKeyDown, (m) => {
|
|
1049
|
+
m.key === "Home" ? (i(m), m.preventDefault()) : m.key === "End" ? (l(m), m.preventDefault()) : Wr.concat(zr).includes(m.key) && (c(m), m.preventDefault());
|
|
1050
1050
|
}),
|
|
1051
|
-
onPointerDown: P(e.onPointerDown, (
|
|
1052
|
-
const
|
|
1053
|
-
|
|
1051
|
+
onPointerDown: P(e.onPointerDown, (m) => {
|
|
1052
|
+
const h = m.target;
|
|
1053
|
+
h.setPointerCapture(m.pointerId), m.preventDefault(), u.thumbs.has(h) ? h.focus() : s(m);
|
|
1054
1054
|
}),
|
|
1055
|
-
onPointerMove: P(e.onPointerMove, (
|
|
1056
|
-
|
|
1055
|
+
onPointerMove: P(e.onPointerMove, (m) => {
|
|
1056
|
+
m.target.hasPointerCapture(m.pointerId) && n(m);
|
|
1057
1057
|
}),
|
|
1058
|
-
onPointerUp: P(e.onPointerUp, (
|
|
1059
|
-
const
|
|
1060
|
-
|
|
1058
|
+
onPointerUp: P(e.onPointerUp, (m) => {
|
|
1059
|
+
const h = m.target;
|
|
1060
|
+
h.hasPointerCapture(m.pointerId) && (h.releasePointerCapture(m.pointerId), o(m));
|
|
1061
1061
|
})
|
|
1062
1062
|
}
|
|
1063
1063
|
);
|
|
@@ -1080,8 +1080,8 @@ $r.displayName = _r;
|
|
|
1080
1080
|
var ra = "SliderRange", es = r.forwardRef(
|
|
1081
1081
|
(e, t) => {
|
|
1082
1082
|
const { __scopeSlider: a, ...s } = e, n = Dt(ra, a), o = Xr(ra, a), i = r.useRef(null), l = ne(t, i), c = n.values.length, d = n.values.map(
|
|
1083
|
-
(
|
|
1084
|
-
), u = c > 1 ? Math.min(...d) : 0,
|
|
1083
|
+
(h) => rs(h, n.min, n.max)
|
|
1084
|
+
), u = c > 1 ? Math.min(...d) : 0, m = 100 - Math.max(...d);
|
|
1085
1085
|
return /* @__PURE__ */ A(
|
|
1086
1086
|
_.span,
|
|
1087
1087
|
{
|
|
@@ -1092,7 +1092,7 @@ var ra = "SliderRange", es = r.forwardRef(
|
|
|
1092
1092
|
style: {
|
|
1093
1093
|
...e.style,
|
|
1094
1094
|
[o.startEdge]: u + "%",
|
|
1095
|
-
[o.endEdge]:
|
|
1095
|
+
[o.endEdge]: m + "%"
|
|
1096
1096
|
}
|
|
1097
1097
|
}
|
|
1098
1098
|
);
|
|
@@ -1109,7 +1109,7 @@ var sa = "SliderThumb", ts = r.forwardRef(
|
|
|
1109
1109
|
}
|
|
1110
1110
|
), Li = r.forwardRef(
|
|
1111
1111
|
(e, t) => {
|
|
1112
|
-
const { __scopeSlider: a, index: s, name: n, ...o } = e, i = Dt(sa, a), l = Xr(sa, a), [c, d] = r.useState(null), u = ne(t, (
|
|
1112
|
+
const { __scopeSlider: a, index: s, name: n, ...o } = e, i = Dt(sa, a), l = Xr(sa, a), [c, d] = r.useState(null), u = ne(t, (I) => d(I)), m = c ? i.form || !!c.closest("form") : !0, h = Mn(c), R = i.values[s], C = R === void 0 ? 0 : rs(R, i.min, i.max), p = Zi(s, i.values.length), S = h == null ? void 0 : h[l.size], f = S ? $i(S, C, l.direction) : 0;
|
|
1113
1113
|
return r.useEffect(() => {
|
|
1114
1114
|
if (c)
|
|
1115
1115
|
return i.thumbs.add(c), () => {
|
|
@@ -1121,14 +1121,14 @@ var sa = "SliderThumb", ts = r.forwardRef(
|
|
|
1121
1121
|
style: {
|
|
1122
1122
|
transform: "var(--radix-slider-thumb-transform)",
|
|
1123
1123
|
position: "absolute",
|
|
1124
|
-
[l.startEdge]: `calc(${
|
|
1124
|
+
[l.startEdge]: `calc(${C}% + ${f}px)`
|
|
1125
1125
|
},
|
|
1126
1126
|
children: [
|
|
1127
1127
|
/* @__PURE__ */ A(aa.ItemSlot, { scope: e.__scopeSlider, children: /* @__PURE__ */ A(
|
|
1128
1128
|
_.span,
|
|
1129
1129
|
{
|
|
1130
1130
|
role: "slider",
|
|
1131
|
-
"aria-label": e["aria-label"] ||
|
|
1131
|
+
"aria-label": e["aria-label"] || p,
|
|
1132
1132
|
"aria-valuemin": i.min,
|
|
1133
1133
|
"aria-valuenow": R,
|
|
1134
1134
|
"aria-valuemax": i.max,
|
|
@@ -1144,7 +1144,7 @@ var sa = "SliderThumb", ts = r.forwardRef(
|
|
|
1144
1144
|
})
|
|
1145
1145
|
}
|
|
1146
1146
|
) }),
|
|
1147
|
-
|
|
1147
|
+
m && /* @__PURE__ */ A(
|
|
1148
1148
|
as,
|
|
1149
1149
|
{
|
|
1150
1150
|
name: n ?? (i.name ? i.name + (i.values.length > 1 ? "[]" : "") : void 0),
|
|
@@ -1167,8 +1167,8 @@ var Yi = "RadioBubbleInput", as = r.forwardRef(
|
|
|
1167
1167
|
if (!l) return;
|
|
1168
1168
|
const c = window.HTMLInputElement.prototype, u = Object.getOwnPropertyDescriptor(c, "value").set;
|
|
1169
1169
|
if (i !== t && u) {
|
|
1170
|
-
const
|
|
1171
|
-
u.call(l, t), l.dispatchEvent(
|
|
1170
|
+
const m = new Event("input", { bubbles: !0 });
|
|
1171
|
+
u.call(l, t), l.dispatchEvent(m);
|
|
1172
1172
|
}
|
|
1173
1173
|
}, [i, t]), /* @__PURE__ */ A(
|
|
1174
1174
|
_.input,
|
|
@@ -1344,8 +1344,8 @@ function N(e, ...t) {
|
|
|
1344
1344
|
continue;
|
|
1345
1345
|
}
|
|
1346
1346
|
if (c.type === "string" || c.type === "enum | string") {
|
|
1347
|
-
const u = c.type === "string" ? [] : c.values, [
|
|
1348
|
-
s = ht(s,
|
|
1347
|
+
const u = c.type === "string" ? [] : c.values, [m, h] = Ee({ className: c.className, customProperties: c.customProperties, propValues: u, parseValue: c.parseValue, value: l });
|
|
1348
|
+
s = ht(s, h), a = g(a, m);
|
|
1349
1349
|
continue;
|
|
1350
1350
|
}
|
|
1351
1351
|
if (c.type === "boolean" && l) {
|
|
@@ -1412,23 +1412,23 @@ function kl() {
|
|
|
1412
1412
|
const Ne = r.forwardRef((e, t) => r.useContext(vt) === void 0 ? r.createElement(da, { delayDuration: 200 }, r.createElement(Fn, { dir: "ltr" }, r.createElement(gs, { ...e, ref: t }))) : r.createElement(Ia, { ...e, ref: t }));
|
|
1413
1413
|
Ne.displayName = "Theme";
|
|
1414
1414
|
const gs = r.forwardRef((e, t) => {
|
|
1415
|
-
const { appearance: a = de.appearance.default, accentColor: s = de.accentColor.default, grayColor: n = de.grayColor.default, panelBackground: o = de.panelBackground.default, radius: i = de.radius.default, scaling: l = de.scaling.default, hasBackground: c = de.hasBackground.default, ...d } = e, [u,
|
|
1416
|
-
r.useEffect(() =>
|
|
1417
|
-
const [
|
|
1415
|
+
const { appearance: a = de.appearance.default, accentColor: s = de.accentColor.default, grayColor: n = de.grayColor.default, panelBackground: o = de.panelBackground.default, radius: i = de.radius.default, scaling: l = de.scaling.default, hasBackground: c = de.hasBackground.default, ...d } = e, [u, m] = r.useState(a);
|
|
1416
|
+
r.useEffect(() => m(a), [a]);
|
|
1417
|
+
const [h, R] = r.useState(s);
|
|
1418
1418
|
r.useEffect(() => R(s), [s]);
|
|
1419
|
-
const [
|
|
1420
|
-
r.useEffect(() =>
|
|
1421
|
-
const [
|
|
1422
|
-
r.useEffect(() =>
|
|
1423
|
-
const [
|
|
1424
|
-
r.useEffect(() =>
|
|
1419
|
+
const [C, p] = r.useState(n);
|
|
1420
|
+
r.useEffect(() => p(n), [n]);
|
|
1421
|
+
const [S, f] = r.useState(o);
|
|
1422
|
+
r.useEffect(() => f(o), [o]);
|
|
1423
|
+
const [I, k] = r.useState(i);
|
|
1424
|
+
r.useEffect(() => k(i), [i]);
|
|
1425
1425
|
const [E, w] = r.useState(l);
|
|
1426
|
-
return r.useEffect(() => w(l), [l]), r.createElement(Ia, { ...d, ref: t, isRoot: !0, hasBackground: c, appearance: u, accentColor:
|
|
1426
|
+
return r.useEffect(() => w(l), [l]), r.createElement(Ia, { ...d, ref: t, isRoot: !0, hasBackground: c, appearance: u, accentColor: h, grayColor: C, panelBackground: S, radius: I, scaling: E, onAppearanceChange: m, onAccentColorChange: R, onGrayColorChange: p, onPanelBackgroundChange: f, onRadiusChange: k, onScalingChange: w });
|
|
1427
1427
|
});
|
|
1428
1428
|
gs.displayName = "ThemeRoot";
|
|
1429
1429
|
const Ia = r.forwardRef((e, t) => {
|
|
1430
|
-
const a = r.useContext(vt), { asChild: s, isRoot: n, hasBackground: o, appearance: i = (a == null ? void 0 : a.appearance) ?? de.appearance.default, accentColor: l = (a == null ? void 0 : a.accentColor) ?? de.accentColor.default, grayColor: c = (a == null ? void 0 : a.resolvedGrayColor) ?? de.grayColor.default, panelBackground: d = (a == null ? void 0 : a.panelBackground) ?? de.panelBackground.default, radius: u = (a == null ? void 0 : a.radius) ?? de.radius.default, scaling:
|
|
1431
|
-
return r.createElement(vt.Provider, { value: r.useMemo(() => ({ appearance: i, accentColor: l, grayColor: c, resolvedGrayColor: E, panelBackground: d, radius: u, scaling:
|
|
1430
|
+
const a = r.useContext(vt), { asChild: s, isRoot: n, hasBackground: o, appearance: i = (a == null ? void 0 : a.appearance) ?? de.appearance.default, accentColor: l = (a == null ? void 0 : a.accentColor) ?? de.accentColor.default, grayColor: c = (a == null ? void 0 : a.resolvedGrayColor) ?? de.grayColor.default, panelBackground: d = (a == null ? void 0 : a.panelBackground) ?? de.panelBackground.default, radius: u = (a == null ? void 0 : a.radius) ?? de.radius.default, scaling: m = (a == null ? void 0 : a.scaling) ?? de.scaling.default, onAppearanceChange: h = je, onAccentColorChange: R = je, onGrayColorChange: C = je, onPanelBackgroundChange: p = je, onRadiusChange: S = je, onScalingChange: f = je, ...I } = e, k = s ? $ : "div", E = c === "auto" ? Sl(l) : c, w = e.appearance === "light" || e.appearance === "dark", T = o === void 0 ? n || w : o;
|
|
1431
|
+
return r.createElement(vt.Provider, { value: r.useMemo(() => ({ appearance: i, accentColor: l, grayColor: c, resolvedGrayColor: E, panelBackground: d, radius: u, scaling: m, onAppearanceChange: h, onAccentColorChange: R, onGrayColorChange: C, onPanelBackgroundChange: p, onRadiusChange: S, onScalingChange: f }), [i, l, c, E, d, u, m, h, R, C, p, S, f]) }, r.createElement(k, { "data-is-root-theme": n ? "true" : "false", "data-accent-color": l, "data-gray-color": E, "data-has-background": T ? "true" : "false", "data-panel-background": d, "data-radius": u, "data-scaling": m, ref: t, ...I, className: g("radix-themes", { light: i === "light", dark: i === "dark" }, I.className) }));
|
|
1432
1432
|
});
|
|
1433
1433
|
Ia.displayName = "ThemeImpl";
|
|
1434
1434
|
const ve = (e) => {
|
|
@@ -1591,8 +1591,8 @@ function Ic(e) {
|
|
|
1591
1591
|
return e === "left" ? "start" : e === "right" ? "end" : e;
|
|
1592
1592
|
}
|
|
1593
1593
|
const Ec = r.forwardRef(({ width: e, minWidth: t, maxWidth: a, height: s, minHeight: n, maxHeight: o, ...i }, l) => {
|
|
1594
|
-
const { asChild: c, children: d, className: u, ...
|
|
1595
|
-
return r.createElement(
|
|
1594
|
+
const { asChild: c, children: d, className: u, ...m } = N(i, Cc, ft, Q), { className: h, style: R } = N({ width: e, minWidth: t, maxWidth: a, height: s, minHeight: n, maxHeight: o }, se, tt), C = c ? $ : "div";
|
|
1595
|
+
return r.createElement(C, { ...m, ref: l, className: g("rt-Container", u) }, Ea({ asChild: c, children: d }, (p) => r.createElement("div", { className: g("rt-ContainerInner", h), style: R }, p)));
|
|
1596
1596
|
});
|
|
1597
1597
|
Ec.displayName = "Container";
|
|
1598
1598
|
const Rc = ["1", "2", "3"], ot = { ...V, size: { values: Rc, default: "1" }, ...fe, scrollbars: { default: "both" } };
|
|
@@ -1602,12 +1602,12 @@ function yc(e) {
|
|
|
1602
1602
|
}
|
|
1603
1603
|
const Ue = Q.m.values;
|
|
1604
1604
|
function Bc(e) {
|
|
1605
|
-
const [t, a] = Ee({ className: "rt-r-m", customProperties: ["--margin"], propValues: Ue, value: e.m }), [s, n] = Ee({ className: "rt-r-mx", customProperties: ["--margin-left", "--margin-right"], propValues: Ue, value: e.mx }), [o, i] = Ee({ className: "rt-r-my", customProperties: ["--margin-top", "--margin-bottom"], propValues: Ue, value: e.my }), [l, c] = Ee({ className: "rt-r-mt", customProperties: ["--margin-top"], propValues: Ue, value: e.mt }), [d, u] = Ee({ className: "rt-r-mr", customProperties: ["--margin-right"], propValues: Ue, value: e.mr }), [
|
|
1606
|
-
return [g(t, s, o, l, d,
|
|
1605
|
+
const [t, a] = Ee({ className: "rt-r-m", customProperties: ["--margin"], propValues: Ue, value: e.m }), [s, n] = Ee({ className: "rt-r-mx", customProperties: ["--margin-left", "--margin-right"], propValues: Ue, value: e.mx }), [o, i] = Ee({ className: "rt-r-my", customProperties: ["--margin-top", "--margin-bottom"], propValues: Ue, value: e.my }), [l, c] = Ee({ className: "rt-r-mt", customProperties: ["--margin-top"], propValues: Ue, value: e.mt }), [d, u] = Ee({ className: "rt-r-mr", customProperties: ["--margin-right"], propValues: Ue, value: e.mr }), [m, h] = Ee({ className: "rt-r-mb", customProperties: ["--margin-bottom"], propValues: Ue, value: e.mb }), [R, C] = Ee({ className: "rt-r-ml", customProperties: ["--margin-left"], propValues: Ue, value: e.ml });
|
|
1606
|
+
return [g(t, s, o, l, d, m, R), ht(a, n, i, c, u, h, C)];
|
|
1607
1607
|
}
|
|
1608
1608
|
const St = r.forwardRef((e, t) => {
|
|
1609
|
-
const { rest: a, ...s } = yc(e), [n, o] = Bc(s), { asChild: i, children: l, className: c, style: d, type: u, scrollHideDelay:
|
|
1610
|
-
return r.createElement(nr, { type: u, scrollHideDelay:
|
|
1609
|
+
const { rest: a, ...s } = yc(e), [n, o] = Bc(s), { asChild: i, children: l, className: c, style: d, type: u, scrollHideDelay: m = u !== "scroll" ? 0 : void 0, dir: h, size: R = ot.size.default, radius: C = ot.radius.default, scrollbars: p = ot.scrollbars.default, ...S } = a;
|
|
1610
|
+
return r.createElement(nr, { type: u, scrollHideDelay: m, className: g("rt-ScrollAreaRoot", n, c), style: ht(o, d), asChild: i }, Ea({ asChild: i, children: l }, (f) => r.createElement(r.Fragment, null, r.createElement(or, { ...S, ref: t, className: "rt-ScrollAreaViewport" }, f), r.createElement("div", { className: "rt-ScrollAreaViewportFocusRing" }), p !== "vertical" ? r.createElement(Yt, { "data-radius": C, orientation: "horizontal", className: g("rt-ScrollAreaScrollbar", mt({ className: "rt-r-size", value: R, propValues: ot.size.values })) }, r.createElement(Xt, { className: "rt-ScrollAreaThumb" })) : null, p !== "horizontal" ? r.createElement(Yt, { "data-radius": C, orientation: "vertical", className: g("rt-ScrollAreaScrollbar", mt({ className: "rt-r-size", value: R, propValues: ot.size.values })) }, r.createElement(Xt, { className: "rt-ScrollAreaThumb" })) : null, p === "both" ? r.createElement(eo, { className: "rt-ScrollAreaCorner" }) : null)));
|
|
1611
1611
|
});
|
|
1612
1612
|
St.displayName = "ScrollArea";
|
|
1613
1613
|
const Us = (e) => r.createElement(oo, { ...e, modal: !0 });
|
|
@@ -1736,8 +1736,8 @@ const Rm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1736
1736
|
nA.displayName = "Radio";
|
|
1737
1737
|
const oA = ["1", "2", "3"], iA = ["surface", "classic"], lA = { disabled: { type: "boolean", className: "disabled", default: !1 }, size: { type: "enum", className: "rt-r-size", values: oA, default: "2", responsive: !0 }, variant: { type: "enum", className: "rt-variant", values: iA, default: "surface" }, ...fe }, $s = r.forwardRef((e, t) => {
|
|
1738
1738
|
const { className: a, children: s, radius: n, value: o, defaultValue: i, onValueChange: l, ...c } = N(e, lA, Q), [d, u] = pt({ prop: o, onChange: l, defaultProp: i });
|
|
1739
|
-
return r.createElement(Co, { "data-disabled": e.disabled || void 0, "data-radius": n, ref: t, className: g("rt-SegmentedControlRoot", a), onValueChange: (
|
|
1740
|
-
|
|
1739
|
+
return r.createElement(Co, { "data-disabled": e.disabled || void 0, "data-radius": n, ref: t, className: g("rt-SegmentedControlRoot", a), onValueChange: (m) => {
|
|
1740
|
+
m && u(m);
|
|
1741
1741
|
}, ...c, type: "single", value: d, asChild: !1, disabled: !!e.disabled }, s, r.createElement("div", { className: "rt-SegmentedControlIndicator" }));
|
|
1742
1742
|
});
|
|
1743
1743
|
$s.displayName = "SegmentedControl.Root";
|
|
@@ -1882,18 +1882,18 @@ const YA = ["1", "2", "3"], XA = ["classic", "surface", "soft"], ZA = { size: {
|
|
|
1882
1882
|
return r.createElement("div", { "data-accent-color": o, "data-radius": i, style: l, className: g("rt-TextFieldRoot", n), onPointerDown: (d) => {
|
|
1883
1883
|
const u = d.target;
|
|
1884
1884
|
if (u.closest("input, button, a")) return;
|
|
1885
|
-
const
|
|
1886
|
-
if (!
|
|
1887
|
-
const
|
|
1885
|
+
const m = a.current;
|
|
1886
|
+
if (!m) return;
|
|
1887
|
+
const h = u.closest(`
|
|
1888
1888
|
.rt-TextFieldSlot[data-side='right'],
|
|
1889
1889
|
.rt-TextFieldSlot:not([data-side='right']) ~ .rt-TextFieldSlot:not([data-side='left'])
|
|
1890
|
-
`) ?
|
|
1890
|
+
`) ? m.value.length : 0;
|
|
1891
1891
|
requestAnimationFrame(() => {
|
|
1892
1892
|
try {
|
|
1893
|
-
|
|
1893
|
+
m.setSelectionRange(h, h);
|
|
1894
1894
|
} catch {
|
|
1895
1895
|
}
|
|
1896
|
-
|
|
1896
|
+
m.focus();
|
|
1897
1897
|
});
|
|
1898
1898
|
} }, r.createElement("input", { spellCheck: "false", ...c, ref: gr(a, t), className: "rt-reset rt-TextFieldInput" }), s);
|
|
1899
1899
|
});
|
|
@@ -1904,8 +1904,8 @@ const hn = r.forwardRef((e, t) => {
|
|
|
1904
1904
|
});
|
|
1905
1905
|
hn.displayName = "TextField.Slot";
|
|
1906
1906
|
const ed = { content: { type: "ReactNode", required: !0 }, width: se.width, minWidth: se.minWidth, maxWidth: { ...se.maxWidth, default: "360px" } }, He = r.forwardRef((e, t) => {
|
|
1907
|
-
const { children: a, className: s, open: n, defaultOpen: o, onOpenChange: i, delayDuration: l, disableHoverableContent: c, content: d, container: u, forceMount:
|
|
1908
|
-
return r.createElement(ua, { ...R }, r.createElement(ga, { asChild: !0 }, a), r.createElement(vo, { container: u, forceMount:
|
|
1907
|
+
const { children: a, className: s, open: n, defaultOpen: o, onOpenChange: i, delayDuration: l, disableHoverableContent: c, content: d, container: u, forceMount: m, ...h } = N(e, ed), R = { open: n, defaultOpen: o, onOpenChange: i, delayDuration: l, disableHoverableContent: c };
|
|
1908
|
+
return r.createElement(ua, { ...R }, r.createElement(ga, { asChild: !0 }, a), r.createElement(vo, { container: u, forceMount: m }, r.createElement(Ne, { asChild: !0 }, r.createElement(pa, { sideOffset: 4, collisionPadding: 10, ...h, asChild: !1, ref: t, className: g("rt-TooltipContent", s) }, r.createElement(x, { as: "p", className: "rt-TooltipText", size: "1" }, d), r.createElement(ma, { className: "rt-TooltipArrow" })))));
|
|
1909
1909
|
});
|
|
1910
1910
|
He.displayName = "Tooltip";
|
|
1911
1911
|
const td = "_iconButton_do0d3_1", ad = "_ghost_do0d3_7", rd = "_mint_do0d3_7", sd = "_highContrast_do0d3_12", nd = "_disabled_do0d3_17", od = "_red_do0d3_40", id = "_gray_do0d3_61", ld = "_cyan_do0d3_83", cd = "_loading_do0d3_119", Ad = "_solid_do0d3_135", dd = "_surface_do0d3_137", ud = "_size1_do0d3_144", gd = "_size2_do0d3_152", pd = "_size3_do0d3_160", md = "_size4_do0d3_168", hd = "_soft_do0d3_236", De = {
|
|
@@ -1990,32 +1990,32 @@ const Nm = ({ children: e, ...t }) => /* @__PURE__ */ A(
|
|
|
1990
1990
|
}, []), c = D((E) => E === -1 / 0 || E <= -60 ? 0 : Math.pow(10, E / 20), []), d = ge(() => {
|
|
1991
1991
|
const E = l(t);
|
|
1992
1992
|
return E === -1 / 0 ? -60 : Math.max(-60, Math.min(6, E));
|
|
1993
|
-
}, [t, l]), u = ge(() => t < 1e-3, [t]),
|
|
1993
|
+
}, [t, l]), u = ge(() => t < 1e-3, [t]), m = D(() => {
|
|
1994
1994
|
clearTimeout(o.current), n(!0);
|
|
1995
|
-
}, []),
|
|
1995
|
+
}, []), h = D(() => {
|
|
1996
1996
|
o.current = setTimeout(() => {
|
|
1997
1997
|
n(!1);
|
|
1998
1998
|
}, 300);
|
|
1999
1999
|
}, []), R = D(
|
|
2000
2000
|
(E) => {
|
|
2001
|
-
(E.key === "ArrowUp" || E.key === "ArrowDown") &&
|
|
2001
|
+
(E.key === "ArrowUp" || E.key === "ArrowDown") && m(), (E.key === "ArrowLeft" || E.key === "ArrowRight") && (E.preventDefault(), E.stopPropagation(), m());
|
|
2002
2002
|
},
|
|
2003
|
-
[
|
|
2004
|
-
),
|
|
2003
|
+
[m]
|
|
2004
|
+
), C = D(
|
|
2005
2005
|
(E) => {
|
|
2006
2006
|
e(E.map(c));
|
|
2007
2007
|
},
|
|
2008
2008
|
[e, c]
|
|
2009
|
-
),
|
|
2010
|
-
|
|
2011
|
-
}, [
|
|
2012
|
-
|
|
2013
|
-
}, [
|
|
2014
|
-
e([1]),
|
|
2015
|
-
}, [e,
|
|
2009
|
+
), p = D(() => {
|
|
2010
|
+
m();
|
|
2011
|
+
}, [m]), S = D(() => {
|
|
2012
|
+
h();
|
|
2013
|
+
}, [h]), f = D(() => {
|
|
2014
|
+
e([1]), m();
|
|
2015
|
+
}, [e, m]), I = D(() => {
|
|
2016
2016
|
const E = Date.now();
|
|
2017
|
-
E - i.current < 300 &&
|
|
2018
|
-
}, [
|
|
2017
|
+
E - i.current < 300 && f(), i.current = E;
|
|
2018
|
+
}, [f]), k = ge(
|
|
2019
2019
|
() => /* @__PURE__ */ y(qe, { children: [
|
|
2020
2020
|
u ? "-∞ dB" : `${d.toFixed(1)} dB`,
|
|
2021
2021
|
/* @__PURE__ */ A(ma, { className: Me.tooltipArrow })
|
|
@@ -2030,9 +2030,9 @@ const Nm = ({ children: e, ...t }) => /* @__PURE__ */ A(
|
|
|
2030
2030
|
max: 6,
|
|
2031
2031
|
step: 0.1,
|
|
2032
2032
|
value: [u ? -60 : d],
|
|
2033
|
-
onValueChange:
|
|
2034
|
-
onPointerDown:
|
|
2035
|
-
onPointerUp:
|
|
2033
|
+
onValueChange: C,
|
|
2034
|
+
onPointerDown: p,
|
|
2035
|
+
onPointerUp: S,
|
|
2036
2036
|
disabled: a,
|
|
2037
2037
|
children: /* @__PURE__ */ y("div", { className: Me.sliderContainer, children: [
|
|
2038
2038
|
/* @__PURE__ */ A(ns, { className: Me.sliderTrack, children: /* @__PURE__ */ A(os, { className: Me.sliderRange }) }),
|
|
@@ -2041,10 +2041,10 @@ const Nm = ({ children: e, ...t }) => /* @__PURE__ */ A(
|
|
|
2041
2041
|
is,
|
|
2042
2042
|
{
|
|
2043
2043
|
className: Me.sliderThumb,
|
|
2044
|
-
onPointerDown:
|
|
2044
|
+
onPointerDown: p,
|
|
2045
2045
|
onKeyDown: R,
|
|
2046
|
-
onBlur:
|
|
2047
|
-
onClick:
|
|
2046
|
+
onBlur: S,
|
|
2047
|
+
onClick: I
|
|
2048
2048
|
}
|
|
2049
2049
|
) }),
|
|
2050
2050
|
/* @__PURE__ */ A(
|
|
@@ -2054,7 +2054,7 @@ const Nm = ({ children: e, ...t }) => /* @__PURE__ */ A(
|
|
|
2054
2054
|
side: "bottom",
|
|
2055
2055
|
align: "center",
|
|
2056
2056
|
sideOffset: 10,
|
|
2057
|
-
children:
|
|
2057
|
+
children: k
|
|
2058
2058
|
}
|
|
2059
2059
|
)
|
|
2060
2060
|
] }) })
|
|
@@ -2530,26 +2530,26 @@ const Cn = ({
|
|
|
2530
2530
|
...i
|
|
2531
2531
|
}) => {
|
|
2532
2532
|
const l = ge(() => Object.keys(la), []), c = ge(() => Object.keys(ia), []), { color: d, graphic: u } = ge(() => {
|
|
2533
|
-
let
|
|
2533
|
+
let C = e, p = t;
|
|
2534
2534
|
if (n) {
|
|
2535
|
-
const
|
|
2536
|
-
|
|
2535
|
+
const S = Tu(n);
|
|
2536
|
+
C = C || S.color, p = p || S.graphic;
|
|
2537
2537
|
}
|
|
2538
|
-
if (!
|
|
2539
|
-
const
|
|
2540
|
-
|
|
2538
|
+
if (!C) {
|
|
2539
|
+
const S = Math.floor(Math.random() * l.length);
|
|
2540
|
+
C = l[S];
|
|
2541
2541
|
}
|
|
2542
|
-
if (!
|
|
2543
|
-
const
|
|
2544
|
-
|
|
2542
|
+
if (!p) {
|
|
2543
|
+
const S = Math.floor(Math.random() * c.length);
|
|
2544
|
+
p = c[S];
|
|
2545
2545
|
}
|
|
2546
|
-
return { color:
|
|
2547
|
-
}, [e, t, n, l, c]),
|
|
2546
|
+
return { color: C, graphic: p };
|
|
2547
|
+
}, [e, t, n, l, c]), m = la[d], h = ia[u], R = ge(
|
|
2548
2548
|
() => ({
|
|
2549
|
-
background:
|
|
2550
|
-
opacity:
|
|
2549
|
+
background: m.gradient,
|
|
2550
|
+
opacity: m.opacity
|
|
2551
2551
|
}),
|
|
2552
|
-
[
|
|
2552
|
+
[m.gradient, m.opacity]
|
|
2553
2553
|
);
|
|
2554
2554
|
return /* @__PURE__ */ A(
|
|
2555
2555
|
Se,
|
|
@@ -2559,7 +2559,7 @@ const Cn = ({
|
|
|
2559
2559
|
className: g(o),
|
|
2560
2560
|
style: R,
|
|
2561
2561
|
...i,
|
|
2562
|
-
children: /* @__PURE__ */ A("img", { src:
|
|
2562
|
+
children: /* @__PURE__ */ A("img", { src: h, alt: u, width: a, height: s })
|
|
2563
2563
|
}
|
|
2564
2564
|
);
|
|
2565
2565
|
};
|
|
@@ -2573,41 +2573,42 @@ const xu = ({
|
|
|
2573
2573
|
item: o,
|
|
2574
2574
|
customThumbnail: i,
|
|
2575
2575
|
icon: l,
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2576
|
+
Icon: c,
|
|
2577
|
+
checked: d,
|
|
2578
|
+
onClick: u,
|
|
2579
|
+
...m
|
|
2579
2580
|
}) => {
|
|
2580
|
-
const
|
|
2581
|
-
k.stopPropagation(), k.preventDefault(),
|
|
2581
|
+
const h = (o == null ? void 0 : o.id) || n, R = (o == null ? void 0 : o.name) || a, C = (o == null ? void 0 : o.description) || s, p = (o == null ? void 0 : o.image) || t, S = (o == null ? void 0 : o.icon) || l, f = p && (p != null && p.startsWith("url(")) ? p == null ? void 0 : p.substring(4, (p == null ? void 0 : p.length) - 1).replace(/"/g, "") : p, I = (k) => {
|
|
2582
|
+
k.stopPropagation(), k.preventDefault(), u == null || u();
|
|
2582
2583
|
};
|
|
2583
2584
|
return /* @__PURE__ */ A(
|
|
2584
2585
|
Qa,
|
|
2585
2586
|
{
|
|
2586
|
-
value:
|
|
2587
|
+
value: h,
|
|
2587
2588
|
className: g(e, L.listCardsItem),
|
|
2588
2589
|
style: { "--color-surface": "transparent" },
|
|
2589
|
-
"data-state":
|
|
2590
|
-
onClick:
|
|
2591
|
-
...
|
|
2590
|
+
"data-state": d ? "checked" : "unchecked",
|
|
2591
|
+
onClick: I,
|
|
2592
|
+
...m,
|
|
2592
2593
|
children: /* @__PURE__ */ y(B, { gap: "2", children: [
|
|
2593
2594
|
/* @__PURE__ */ A(B, { width: "60px", height: "60px", children: i ? /* @__PURE__ */ A(
|
|
2594
2595
|
Cn,
|
|
2595
2596
|
{
|
|
2596
|
-
id:
|
|
2597
|
+
id: h,
|
|
2597
2598
|
className: L.listCardsAvatar,
|
|
2598
2599
|
width: 60,
|
|
2599
2600
|
height: 60
|
|
2600
2601
|
}
|
|
2601
|
-
) :
|
|
2602
|
+
) : c ? /* @__PURE__ */ A(c, { width: 15, height: 15 }) : S ? /* @__PURE__ */ A("div", { className: L.listCardsAvatarIcon, children: S }) : /* @__PURE__ */ A(Jt, { src: f, className: L.listCardsAvatar }) }),
|
|
2602
2603
|
/* @__PURE__ */ y(B, { direction: "column", justify: "center", gap: "1", children: [
|
|
2603
|
-
/* @__PURE__ */ A(x, { as: "div", size: "2", className: L.listCardsItemText, children:
|
|
2604
|
+
/* @__PURE__ */ A(x, { as: "div", size: "2", className: L.listCardsItemText, children: R }),
|
|
2604
2605
|
/* @__PURE__ */ A(
|
|
2605
2606
|
x,
|
|
2606
2607
|
{
|
|
2607
2608
|
as: "div",
|
|
2608
2609
|
size: "1",
|
|
2609
2610
|
className: L.listCardsItemDescriptionWrappable,
|
|
2610
|
-
children:
|
|
2611
|
+
children: C
|
|
2611
2612
|
}
|
|
2612
2613
|
)
|
|
2613
2614
|
] })
|
|
@@ -2626,10 +2627,10 @@ const xu = ({
|
|
|
2626
2627
|
onAvatarClick: c,
|
|
2627
2628
|
avatarContent: d,
|
|
2628
2629
|
seeDetailsText: u = "Details",
|
|
2629
|
-
children:
|
|
2630
|
-
...
|
|
2630
|
+
children: m,
|
|
2631
|
+
...h
|
|
2631
2632
|
}) => {
|
|
2632
|
-
const R = (n == null ? void 0 : n.id) || s,
|
|
2633
|
+
const R = (n == null ? void 0 : n.id) || s, C = (n == null ? void 0 : n.name) || a, p = (n == null ? void 0 : n.avatar) || t, S = p && (p != null && p.startsWith("url(")) ? p == null ? void 0 : p.substring(4, (p == null ? void 0 : p.length) - 1).replace(/"/g, "") : p;
|
|
2633
2634
|
return /* @__PURE__ */ y("div", { className: L.cardWrapper, children: [
|
|
2634
2635
|
/* @__PURE__ */ A(
|
|
2635
2636
|
Qa,
|
|
@@ -2641,7 +2642,7 @@ const xu = ({
|
|
|
2641
2642
|
width: "100%",
|
|
2642
2643
|
height: "68px"
|
|
2643
2644
|
},
|
|
2644
|
-
...
|
|
2645
|
+
...h,
|
|
2645
2646
|
children: /* @__PURE__ */ y(
|
|
2646
2647
|
B,
|
|
2647
2648
|
{
|
|
@@ -2653,9 +2654,9 @@ const xu = ({
|
|
|
2653
2654
|
overflow: "hidden"
|
|
2654
2655
|
},
|
|
2655
2656
|
children: [
|
|
2656
|
-
!c && /* @__PURE__ */ A(Jt, { src:
|
|
2657
|
+
!c && /* @__PURE__ */ A(Jt, { src: S, className: L.listCardsAvatar }),
|
|
2657
2658
|
/* @__PURE__ */ y(B, { direction: "column", justify: "center", children: [
|
|
2658
|
-
/* @__PURE__ */ A(x, { as: "div", size: "2", className: L.listCardsItemText, children:
|
|
2659
|
+
/* @__PURE__ */ A(x, { as: "div", size: "2", className: L.listCardsItemText, children: C }),
|
|
2659
2660
|
/* @__PURE__ */ A(
|
|
2660
2661
|
B,
|
|
2661
2662
|
{
|
|
@@ -2668,7 +2669,7 @@ const xu = ({
|
|
|
2668
2669
|
width: "100%",
|
|
2669
2670
|
whiteSpace: "nowrap"
|
|
2670
2671
|
},
|
|
2671
|
-
children:
|
|
2672
|
+
children: m
|
|
2672
2673
|
}
|
|
2673
2674
|
)
|
|
2674
2675
|
] })
|
|
@@ -2681,10 +2682,10 @@ const xu = ({
|
|
|
2681
2682
|
"div",
|
|
2682
2683
|
{
|
|
2683
2684
|
className: L.clickableAvatar,
|
|
2684
|
-
onClick: c ? (
|
|
2685
|
-
|
|
2685
|
+
onClick: c ? (f) => {
|
|
2686
|
+
f.stopPropagation(), f.preventDefault(), c(f);
|
|
2686
2687
|
} : void 0,
|
|
2687
|
-
children: d ? /* @__PURE__ */ A("div", { className: L.avatarContent, children: d }) : /* @__PURE__ */ A(Jt, { src:
|
|
2688
|
+
children: d ? /* @__PURE__ */ A("div", { className: L.avatarContent, children: d }) : /* @__PURE__ */ A(Jt, { src: S, className: L.listCardsAvatar })
|
|
2688
2689
|
}
|
|
2689
2690
|
) }),
|
|
2690
2691
|
/* @__PURE__ */ A("div", { className: L.cardActions, children: /* @__PURE__ */ y(
|
|
@@ -2703,8 +2704,8 @@ const xu = ({
|
|
|
2703
2704
|
L.favoriteButton,
|
|
2704
2705
|
L.seeDetailsButton
|
|
2705
2706
|
),
|
|
2706
|
-
onClick: (
|
|
2707
|
-
|
|
2707
|
+
onClick: (f) => {
|
|
2708
|
+
f.stopPropagation(), f.preventDefault(), i(f);
|
|
2708
2709
|
},
|
|
2709
2710
|
children: o ? /* @__PURE__ */ A($o, {}) : /* @__PURE__ */ A(ei, {})
|
|
2710
2711
|
}
|
|
@@ -2716,8 +2717,8 @@ const xu = ({
|
|
|
2716
2717
|
L.buttonGhost,
|
|
2717
2718
|
L.seeDetailsButton
|
|
2718
2719
|
),
|
|
2719
|
-
onClick: (
|
|
2720
|
-
|
|
2720
|
+
onClick: (f) => {
|
|
2721
|
+
f.stopPropagation(), f.preventDefault(), l(f);
|
|
2721
2722
|
},
|
|
2722
2723
|
children: u
|
|
2723
2724
|
}
|
|
@@ -2972,15 +2973,15 @@ const lg = "_selectTrigger_1nzeo_1", cg = "_soft_1nzeo_1", Ag = "_ghost_1nzeo_2"
|
|
|
2972
2973
|
disabled: c = !1,
|
|
2973
2974
|
readOnly: d = !1,
|
|
2974
2975
|
maxHeight: u = "auto",
|
|
2975
|
-
showSelectIndicator:
|
|
2976
|
-
maxWidth:
|
|
2976
|
+
showSelectIndicator: m = !0,
|
|
2977
|
+
maxWidth: h = "100%",
|
|
2977
2978
|
...R
|
|
2978
2979
|
}) => /* @__PURE__ */ y(Se, { width: "100%", children: [
|
|
2979
2980
|
t && /* @__PURE__ */ y(B, { mb: "2", align: "center", gap: "2", children: [
|
|
2980
2981
|
/* @__PURE__ */ A(x, { size: "1", weight: "bold", children: t }),
|
|
2981
2982
|
o && /* @__PURE__ */ A(He, { content: o, children: /* @__PURE__ */ A(_e, {}) })
|
|
2982
2983
|
] }),
|
|
2983
|
-
/* @__PURE__ */ A(B, { direction: "column", maxWidth:
|
|
2984
|
+
/* @__PURE__ */ A(B, { direction: "column", maxWidth: h, children: /* @__PURE__ */ y(
|
|
2984
2985
|
Ta,
|
|
2985
2986
|
{
|
|
2986
2987
|
onValueChange: a,
|
|
@@ -3001,19 +3002,19 @@ const lg = "_selectTrigger_1nzeo_1", cg = "_soft_1nzeo_1", Ag = "_ghost_1nzeo_2"
|
|
|
3001
3002
|
})
|
|
3002
3003
|
}
|
|
3003
3004
|
),
|
|
3004
|
-
/* @__PURE__ */ A(Da, { position: "popper", style: { height: u }, children: /* @__PURE__ */ A(Ma, { children: n.map((
|
|
3005
|
+
/* @__PURE__ */ A(Da, { position: "popper", style: { height: u }, children: /* @__PURE__ */ A(Ma, { children: n.map((C) => /* @__PURE__ */ y(
|
|
3005
3006
|
tn,
|
|
3006
3007
|
{
|
|
3007
|
-
value:
|
|
3008
|
+
value: C.value,
|
|
3008
3009
|
className: g(ke.selectItem, {
|
|
3009
|
-
[ke.hideIndicator]: !
|
|
3010
|
+
[ke.hideIndicator]: !m,
|
|
3010
3011
|
[ke.size1]: i === "1",
|
|
3011
3012
|
[ke.size2]: i === "2"
|
|
3012
3013
|
}),
|
|
3013
3014
|
disabled: c || d,
|
|
3014
3015
|
children: [
|
|
3015
|
-
/* @__PURE__ */ A(x, { size: i, style: { color: "var(--neutral-12)" }, children:
|
|
3016
|
-
|
|
3016
|
+
/* @__PURE__ */ A(x, { size: i, style: { color: "var(--neutral-12)" }, children: C.label }),
|
|
3017
|
+
C.aiDetected && /* @__PURE__ */ A(
|
|
3017
3018
|
x,
|
|
3018
3019
|
{
|
|
3019
3020
|
size: "1",
|
|
@@ -3024,7 +3025,7 @@ const lg = "_selectTrigger_1nzeo_1", cg = "_soft_1nzeo_1", Ag = "_ghost_1nzeo_2"
|
|
|
3024
3025
|
children: "✦"
|
|
3025
3026
|
}
|
|
3026
3027
|
),
|
|
3027
|
-
|
|
3028
|
+
C.extra && /* @__PURE__ */ y(
|
|
3028
3029
|
x,
|
|
3029
3030
|
{
|
|
3030
3031
|
size: i,
|
|
@@ -3034,13 +3035,13 @@ const lg = "_selectTrigger_1nzeo_1", cg = "_soft_1nzeo_1", Ag = "_ghost_1nzeo_2"
|
|
|
3034
3035
|
},
|
|
3035
3036
|
children: [
|
|
3036
3037
|
" ",
|
|
3037
|
-
|
|
3038
|
+
C.extra
|
|
3038
3039
|
]
|
|
3039
3040
|
}
|
|
3040
3041
|
)
|
|
3041
3042
|
]
|
|
3042
3043
|
},
|
|
3043
|
-
|
|
3044
|
+
C.value
|
|
3044
3045
|
)) }) })
|
|
3045
3046
|
]
|
|
3046
3047
|
}
|
|
@@ -3067,11 +3068,11 @@ const hg = "_selectTrigger_1b07c_1", fg = "_soft_1b07c_1", Sg = "_ghost_1b07c_2"
|
|
|
3067
3068
|
readOnly: c = !1,
|
|
3068
3069
|
maxHeight: d = "auto",
|
|
3069
3070
|
maxWidth: u = "100%",
|
|
3070
|
-
placeholder:
|
|
3071
|
-
...
|
|
3071
|
+
placeholder: m = "Select options...",
|
|
3072
|
+
...h
|
|
3072
3073
|
}) => {
|
|
3073
|
-
const R = (
|
|
3074
|
-
a && a(
|
|
3074
|
+
const R = (C) => {
|
|
3075
|
+
a && a(C);
|
|
3075
3076
|
};
|
|
3076
3077
|
return /* @__PURE__ */ y(Se, { width: "100%", children: [
|
|
3077
3078
|
t && /* @__PURE__ */ y(B, { mb: "2", align: "center", gap: "2", children: [
|
|
@@ -3083,7 +3084,7 @@ const hg = "_selectTrigger_1b07c_1", fg = "_soft_1b07c_1", Sg = "_ghost_1b07c_2"
|
|
|
3083
3084
|
{
|
|
3084
3085
|
className: g(e),
|
|
3085
3086
|
disabled: l || c,
|
|
3086
|
-
...
|
|
3087
|
+
...h,
|
|
3087
3088
|
children: [
|
|
3088
3089
|
/* @__PURE__ */ A(
|
|
3089
3090
|
xa,
|
|
@@ -3091,15 +3092,15 @@ const hg = "_selectTrigger_1b07c_1", fg = "_soft_1b07c_1", Sg = "_ghost_1b07c_2"
|
|
|
3091
3092
|
variant: i,
|
|
3092
3093
|
color: "gray",
|
|
3093
3094
|
size: o,
|
|
3094
|
-
placeholder:
|
|
3095
|
+
placeholder: m,
|
|
3095
3096
|
className: g(Ie.selectTrigger, {
|
|
3096
3097
|
[Ie.ghost]: i === "ghost",
|
|
3097
3098
|
[Ie.soft]: i === "soft"
|
|
3098
3099
|
}),
|
|
3099
|
-
children:
|
|
3100
|
+
children: m
|
|
3100
3101
|
}
|
|
3101
3102
|
),
|
|
3102
|
-
/* @__PURE__ */ A(Da, { position: "popper", style: { height: d }, children: /* @__PURE__ */ A(Ma, { children: s.map((
|
|
3103
|
+
/* @__PURE__ */ A(Da, { position: "popper", style: { height: d }, children: /* @__PURE__ */ A(Ma, { children: s.map((C) => /* @__PURE__ */ y(
|
|
3103
3104
|
B,
|
|
3104
3105
|
{
|
|
3105
3106
|
align: "center",
|
|
@@ -3110,7 +3111,7 @@ const hg = "_selectTrigger_1b07c_1", fg = "_soft_1b07c_1", Sg = "_ghost_1b07c_2"
|
|
|
3110
3111
|
[Ie.size1]: o === "1",
|
|
3111
3112
|
[Ie.size2]: o === "2"
|
|
3112
3113
|
}),
|
|
3113
|
-
onClick: () => R(
|
|
3114
|
+
onClick: () => R(C.value),
|
|
3114
3115
|
style: {
|
|
3115
3116
|
cursor: l || c ? "not-allowed" : "pointer",
|
|
3116
3117
|
width: "100%"
|
|
@@ -3120,13 +3121,13 @@ const hg = "_selectTrigger_1b07c_1", fg = "_soft_1b07c_1", Sg = "_ghost_1b07c_2"
|
|
|
3120
3121
|
bs,
|
|
3121
3122
|
{
|
|
3122
3123
|
disabled: l || c,
|
|
3123
|
-
checked:
|
|
3124
|
+
checked: C.isActived || !1,
|
|
3124
3125
|
size: o
|
|
3125
3126
|
}
|
|
3126
3127
|
),
|
|
3127
3128
|
/* @__PURE__ */ y(B, { align: "center", gap: "1", style: { flex: 1 }, children: [
|
|
3128
|
-
/* @__PURE__ */ A(x, { size: o, style: { color: "var(--neutral-12)" }, children:
|
|
3129
|
-
|
|
3129
|
+
/* @__PURE__ */ A(x, { size: o, style: { color: "var(--neutral-12)" }, children: C.label }),
|
|
3130
|
+
C.aiDetected && /* @__PURE__ */ A(
|
|
3130
3131
|
x,
|
|
3131
3132
|
{
|
|
3132
3133
|
size: "1",
|
|
@@ -3137,7 +3138,7 @@ const hg = "_selectTrigger_1b07c_1", fg = "_soft_1b07c_1", Sg = "_ghost_1b07c_2"
|
|
|
3137
3138
|
children: "✦"
|
|
3138
3139
|
}
|
|
3139
3140
|
),
|
|
3140
|
-
|
|
3141
|
+
C.extra && /* @__PURE__ */ y(
|
|
3141
3142
|
x,
|
|
3142
3143
|
{
|
|
3143
3144
|
size: o,
|
|
@@ -3147,14 +3148,14 @@ const hg = "_selectTrigger_1b07c_1", fg = "_soft_1b07c_1", Sg = "_ghost_1b07c_2"
|
|
|
3147
3148
|
},
|
|
3148
3149
|
children: [
|
|
3149
3150
|
" ",
|
|
3150
|
-
|
|
3151
|
+
C.extra
|
|
3151
3152
|
]
|
|
3152
3153
|
}
|
|
3153
3154
|
)
|
|
3154
3155
|
] })
|
|
3155
3156
|
]
|
|
3156
3157
|
},
|
|
3157
|
-
|
|
3158
|
+
C.value
|
|
3158
3159
|
)) }) })
|
|
3159
3160
|
]
|
|
3160
3161
|
}
|
|
@@ -3192,63 +3193,63 @@ const it = 10, lt = 10, Fe = 9.5, jt = -Math.PI / 2, Gt = 0.01, Ga = (e) => Math
|
|
|
3192
3193
|
minValue: n = -0.65,
|
|
3193
3194
|
maxValue: o = 0.65
|
|
3194
3195
|
}) => {
|
|
3195
|
-
const i = me(null), [l, c] = he(!1), d = me(), [u,
|
|
3196
|
+
const i = me(null), [l, c] = he(!1), d = me(), [u, m] = he(!1), h = me(null), R = me(0), C = me(t), p = me(0), S = D(() => {
|
|
3196
3197
|
clearTimeout(d.current), c(!0);
|
|
3197
|
-
}, []),
|
|
3198
|
+
}, []), f = D(() => {
|
|
3198
3199
|
u || (d.current = setTimeout(() => c(!1), 300));
|
|
3199
3200
|
}, [u]);
|
|
3200
3201
|
bt(() => {
|
|
3201
3202
|
if (u) {
|
|
3202
3203
|
const v = document.createElement("style");
|
|
3203
|
-
v.textContent = "* { cursor: ns-resize !important; }", document.head.appendChild(v),
|
|
3204
|
+
v.textContent = "* { cursor: ns-resize !important; }", document.head.appendChild(v), h.current = v, S();
|
|
3204
3205
|
} else
|
|
3205
|
-
|
|
3206
|
+
h.current && (document.head.removeChild(h.current), h.current = null), f();
|
|
3206
3207
|
return () => {
|
|
3207
|
-
|
|
3208
|
+
h.current && (document.head.removeChild(h.current), h.current = null), f(), p.current && cancelAnimationFrame(p.current);
|
|
3208
3209
|
};
|
|
3209
|
-
}, [u,
|
|
3210
|
-
const
|
|
3210
|
+
}, [u, S, f]);
|
|
3211
|
+
const I = D(
|
|
3211
3212
|
(v) => {
|
|
3212
|
-
|
|
3213
|
-
|
|
3213
|
+
C.current = Ga(v), !p.current && (p.current = requestAnimationFrame(() => {
|
|
3214
|
+
p.current = 0, a(C.current);
|
|
3214
3215
|
}));
|
|
3215
3216
|
},
|
|
3216
3217
|
[a]
|
|
3217
|
-
),
|
|
3218
|
+
), k = D(
|
|
3218
3219
|
(v) => {
|
|
3219
3220
|
v.preventDefault(), v.stopPropagation();
|
|
3220
3221
|
const U = v.wheelDelta ?? -v.deltaY * 25;
|
|
3221
3222
|
if (!U) return;
|
|
3222
3223
|
const O = t + (U > 0 ? Gt : -Gt);
|
|
3223
|
-
|
|
3224
|
+
I(O);
|
|
3224
3225
|
},
|
|
3225
|
-
[t,
|
|
3226
|
+
[t, I]
|
|
3226
3227
|
);
|
|
3227
|
-
Xe("wheel",
|
|
3228
|
+
Xe("wheel", k, i);
|
|
3228
3229
|
const E = D(
|
|
3229
3230
|
(v) => {
|
|
3230
3231
|
var O;
|
|
3231
3232
|
if (s) return;
|
|
3232
3233
|
v.preventDefault();
|
|
3233
3234
|
const U = v.currentTarget;
|
|
3234
|
-
(O = U.setPointerCapture) == null || O.call(U, v.pointerId),
|
|
3235
|
+
(O = U.setPointerCapture) == null || O.call(U, v.pointerId), m(!0), R.current = v.clientY;
|
|
3235
3236
|
},
|
|
3236
3237
|
[s]
|
|
3237
3238
|
), w = D(
|
|
3238
3239
|
(v) => {
|
|
3239
3240
|
if (!u) return;
|
|
3240
3241
|
const U = R.current - v.clientY, O = t + U * Gt;
|
|
3241
|
-
|
|
3242
|
+
I(O), R.current = v.clientY;
|
|
3242
3243
|
},
|
|
3243
|
-
[u, t,
|
|
3244
|
+
[u, t, I]
|
|
3244
3245
|
), T = D((v) => {
|
|
3245
3246
|
var U, O;
|
|
3246
|
-
(O = (U = v.currentTarget) == null ? void 0 : U.releasePointerCapture) == null || O.call(U, v.pointerId),
|
|
3247
|
+
(O = (U = v.currentTarget) == null ? void 0 : U.releasePointerCapture) == null || O.call(U, v.pointerId), m(!1);
|
|
3247
3248
|
}, []), b = D(
|
|
3248
3249
|
(v) => {
|
|
3249
|
-
v.detail === 2 &&
|
|
3250
|
+
v.detail === 2 && I(0);
|
|
3250
3251
|
},
|
|
3251
|
-
[
|
|
3252
|
+
[I]
|
|
3252
3253
|
), { arcPath: G, pointerRotation: re, arcColor: ee, pointerColor: M } = ge(() => {
|
|
3253
3254
|
const v = La(t, n, o), U = Ga(v), O = jt + U * Math.PI, z = it + Fe * Math.cos(jt), Y = lt + Fe * Math.sin(jt), X = it + Fe * Math.cos(O), le = lt + Fe * Math.sin(O), rt = 0, We = U > 0 ? 1 : 0;
|
|
3254
3255
|
return {
|
|
@@ -3354,7 +3355,7 @@ const Ug = ({
|
|
|
3354
3355
|
onClick: c,
|
|
3355
3356
|
loading: d,
|
|
3356
3357
|
besideFooter: u,
|
|
3357
|
-
...
|
|
3358
|
+
...m
|
|
3358
3359
|
}) => /* @__PURE__ */ y(
|
|
3359
3360
|
B,
|
|
3360
3361
|
{
|
|
@@ -3367,7 +3368,7 @@ const Ug = ({
|
|
|
3367
3368
|
borderTop: "1px solid var(--neutral-3)"
|
|
3368
3369
|
},
|
|
3369
3370
|
className: t,
|
|
3370
|
-
...
|
|
3371
|
+
...m,
|
|
3371
3372
|
children: [
|
|
3372
3373
|
e && /* @__PURE__ */ A(B, { width: "100%", children: e }),
|
|
3373
3374
|
/* @__PURE__ */ y(B, { width: "100%", justify: "between", gap: "3", align: "center", children: [
|
|
@@ -3422,12 +3423,12 @@ const Tg = "_sliderTrack_bq3k4_29", xg = "_sliderTrackSize1_bq3k4_40", Dg = "_sl
|
|
|
3422
3423
|
max: c = 100,
|
|
3423
3424
|
step: d = 1,
|
|
3424
3425
|
size: u = "2",
|
|
3425
|
-
disabled:
|
|
3426
|
-
highContrast:
|
|
3426
|
+
disabled: m = !1,
|
|
3427
|
+
highContrast: h = !1,
|
|
3427
3428
|
markers: R = [],
|
|
3428
|
-
...
|
|
3429
|
+
...C
|
|
3429
3430
|
}) => {
|
|
3430
|
-
const
|
|
3431
|
+
const p = (S) => (S - l) / (c - l) * 100;
|
|
3431
3432
|
return /* @__PURE__ */ y(Se, { width: "100%", children: [
|
|
3432
3433
|
t && /* @__PURE__ */ y(B, { mb: "2", justify: "between", align: "center", children: [
|
|
3433
3434
|
/* @__PURE__ */ y(B, { align: "center", gap: "2", children: [
|
|
@@ -3452,9 +3453,9 @@ const Tg = "_sliderTrack_bq3k4_29", xg = "_sliderTrackSize1_bq3k4_40", Dg = "_sl
|
|
|
3452
3453
|
step: d,
|
|
3453
3454
|
value: n,
|
|
3454
3455
|
onValueChange: a,
|
|
3455
|
-
disabled:
|
|
3456
|
+
disabled: m,
|
|
3456
3457
|
className: e,
|
|
3457
|
-
...
|
|
3458
|
+
...C,
|
|
3458
3459
|
children: /* @__PURE__ */ y(B, { className: te.sliderContainer, children: [
|
|
3459
3460
|
/* @__PURE__ */ y(
|
|
3460
3461
|
ns,
|
|
@@ -3471,8 +3472,8 @@ const Tg = "_sliderTrack_bq3k4_29", xg = "_sliderTrackSize1_bq3k4_40", Dg = "_sl
|
|
|
3471
3472
|
className: g(te.sliderRange, {
|
|
3472
3473
|
[te.sliderRangeAccent]: s === "accent",
|
|
3473
3474
|
[te.sliderRangeNeutral]: s === "neutral",
|
|
3474
|
-
[te.sliderRangeHighContrastNeutral]:
|
|
3475
|
-
[te.sliderRangeHighContrastAccent]:
|
|
3475
|
+
[te.sliderRangeHighContrastNeutral]: h && s === "neutral",
|
|
3476
|
+
[te.sliderRangeHighContrastAccent]: h && s === "accent"
|
|
3476
3477
|
})
|
|
3477
3478
|
}
|
|
3478
3479
|
),
|
|
@@ -3489,17 +3490,17 @@ const Tg = "_sliderTrack_bq3k4_29", xg = "_sliderTrackSize1_bq3k4_40", Dg = "_sl
|
|
|
3489
3490
|
]
|
|
3490
3491
|
}
|
|
3491
3492
|
),
|
|
3492
|
-
R.length > 0 && /* @__PURE__ */ A("div", { className: te.markersContainer, children: R.map((
|
|
3493
|
+
R.length > 0 && /* @__PURE__ */ A("div", { className: te.markersContainer, children: R.map((S, f) => /* @__PURE__ */ A(
|
|
3493
3494
|
"div",
|
|
3494
3495
|
{
|
|
3495
3496
|
className: g(te.marker, {
|
|
3496
3497
|
[te.markerSize3]: u === "3"
|
|
3497
3498
|
}),
|
|
3498
3499
|
style: {
|
|
3499
|
-
left: `${
|
|
3500
|
+
left: `${p(S)}%`
|
|
3500
3501
|
}
|
|
3501
3502
|
},
|
|
3502
|
-
|
|
3503
|
+
f
|
|
3503
3504
|
)) })
|
|
3504
3505
|
] })
|
|
3505
3506
|
}
|
|
@@ -3912,8 +3913,8 @@ const xp = "_hasTriggerWithoutClick_1ss22_1", Dp = "_hasLeftColor_1ss22_10", Mp
|
|
|
3912
3913
|
leftColor: l,
|
|
3913
3914
|
...c
|
|
3914
3915
|
}) => {
|
|
3915
|
-
const [d, u] = he(!1),
|
|
3916
|
-
n && (
|
|
3916
|
+
const [d, u] = he(!1), m = (h) => {
|
|
3917
|
+
n && (h.preventDefault(), h.stopPropagation(), n(h));
|
|
3917
3918
|
};
|
|
3918
3919
|
return /* @__PURE__ */ A(B, { className: g(ue.container, a), ...c, children: /* @__PURE__ */ y(lr, { open: o, onOpenChange: i, modal: !0, children: [
|
|
3919
3920
|
n && /* @__PURE__ */ A(
|
|
@@ -3930,7 +3931,7 @@ const xp = "_hasTriggerWithoutClick_1ss22_1", Dp = "_hasLeftColor_1ss22_10", Mp
|
|
|
3930
3931
|
onMouseLeave: () => {
|
|
3931
3932
|
u(!1);
|
|
3932
3933
|
},
|
|
3933
|
-
onClick:
|
|
3934
|
+
onClick: m,
|
|
3934
3935
|
children: /* @__PURE__ */ A(
|
|
3935
3936
|
Ze,
|
|
3936
3937
|
{
|
|
@@ -4096,61 +4097,61 @@ const Hp = "_content_1vf1h_1", Wp = "_pan_1vf1h_13", zp = "_disabled_1vf1h_26",
|
|
|
4096
4097
|
defaultDot: n,
|
|
4097
4098
|
clickableDots: o = !1
|
|
4098
4099
|
}) => {
|
|
4099
|
-
const i = me(null), [l, c] = he(!1), [d, u] = he(0),
|
|
4100
|
+
const i = me(null), [l, c] = he(!1), [d, u] = he(0), m = me(0);
|
|
4100
4101
|
bt(() => {
|
|
4101
4102
|
e == null && t(n);
|
|
4102
4103
|
}, [e, t, n]);
|
|
4103
|
-
const
|
|
4104
|
-
(
|
|
4105
|
-
if (
|
|
4106
|
-
const E =
|
|
4104
|
+
const h = D(
|
|
4105
|
+
(k) => {
|
|
4106
|
+
if (k.preventDefault(), k.stopPropagation(), a) return;
|
|
4107
|
+
const E = k.wheelDelta ?? -k.deltaY * 25;
|
|
4107
4108
|
if (!E || Math.abs(E) <= 50) return;
|
|
4108
4109
|
const w = Date.now();
|
|
4109
|
-
if (w -
|
|
4110
|
+
if (w - m.current < 100) return;
|
|
4110
4111
|
const T = E > 0 ? 1 : -1, b = $a(e, s, T);
|
|
4111
|
-
t(b),
|
|
4112
|
+
t(b), m.current = w;
|
|
4112
4113
|
},
|
|
4113
4114
|
[t, e, s, a]
|
|
4114
4115
|
), R = D(
|
|
4115
|
-
(
|
|
4116
|
+
(k) => {
|
|
4116
4117
|
if (a) {
|
|
4117
|
-
|
|
4118
|
+
k.preventDefault();
|
|
4118
4119
|
return;
|
|
4119
4120
|
}
|
|
4120
|
-
|
|
4121
|
+
k.preventDefault(), c(!0), u(k.clientY);
|
|
4121
4122
|
},
|
|
4122
4123
|
[a]
|
|
4123
|
-
),
|
|
4124
|
-
(
|
|
4124
|
+
), C = D(
|
|
4125
|
+
(k) => {
|
|
4125
4126
|
if (!l || a) return;
|
|
4126
|
-
const E = d -
|
|
4127
|
+
const E = d - k.clientY;
|
|
4127
4128
|
if (Math.abs(E) <= 20) return;
|
|
4128
4129
|
const w = E > 0 ? 1 : -1, T = $a(e, s, w);
|
|
4129
|
-
t(T), u(
|
|
4130
|
+
t(T), u(k.clientY), m.current = Date.now();
|
|
4130
4131
|
},
|
|
4131
4132
|
[l, d, e, t, s, a]
|
|
4132
|
-
),
|
|
4133
|
+
), p = D(() => {
|
|
4133
4134
|
c(!1);
|
|
4134
|
-
}, []),
|
|
4135
|
+
}, []), S = D(() => {
|
|
4135
4136
|
c(!1);
|
|
4136
|
-
}, []),
|
|
4137
|
-
(
|
|
4138
|
-
|
|
4137
|
+
}, []), f = D(
|
|
4138
|
+
(k) => {
|
|
4139
|
+
k.detail === 2 && !a && t(n);
|
|
4139
4140
|
},
|
|
4140
4141
|
[t, n, a]
|
|
4141
|
-
),
|
|
4142
|
-
(
|
|
4142
|
+
), I = D(
|
|
4143
|
+
(k) => {
|
|
4143
4144
|
if (!o || a) return;
|
|
4144
|
-
const E = Lp(s,
|
|
4145
|
+
const E = Lp(s, k);
|
|
4145
4146
|
E && t(E);
|
|
4146
4147
|
},
|
|
4147
4148
|
[o, a, t, s]
|
|
4148
4149
|
);
|
|
4149
|
-
return Xe("wheel",
|
|
4150
|
+
return Xe("wheel", h, i), Xe("mousedown", R, i), Xe("mousemove", C), Xe("mouseup", p), Xe("mouseleave", S), {
|
|
4150
4151
|
containerRef: i,
|
|
4151
4152
|
isDragging: l,
|
|
4152
|
-
handleClick:
|
|
4153
|
-
handleDotClick:
|
|
4153
|
+
handleClick: f,
|
|
4154
|
+
handleDotClick: I
|
|
4154
4155
|
};
|
|
4155
4156
|
}, _p = ({
|
|
4156
4157
|
className: e,
|
|
@@ -4163,16 +4164,16 @@ const Hp = "_content_1vf1h_1", Wp = "_pan_1vf1h_13", zp = "_disabled_1vf1h_26",
|
|
|
4163
4164
|
const [i, l] = he(null);
|
|
4164
4165
|
if (!o || o.length === 0)
|
|
4165
4166
|
return console.warn("Knob: dots prop is required and must be a non-empty array"), null;
|
|
4166
|
-
const c = ge(() => (o == null ? void 0 : o.find((
|
|
4167
|
+
const c = ge(() => (o == null ? void 0 : o.find((f) => f.default)) || (o == null ? void 0 : o[0]) || { position: 0, color: "neutral", default: !0 }, [o]), { containerRef: d, isDragging: u, handleClick: m, handleDotClick: h } = Zp({
|
|
4167
4168
|
value: t,
|
|
4168
4169
|
onChange: a,
|
|
4169
4170
|
disabled: s,
|
|
4170
4171
|
dots: o || [],
|
|
4171
4172
|
defaultDot: c,
|
|
4172
4173
|
clickableDots: n
|
|
4173
|
-
}), R = ge(() => typeof t == "object" && t !== null ? t.position : Yp(t, o), [t, o]), { pointerRotation:
|
|
4174
|
-
const
|
|
4175
|
-
return s ?
|
|
4174
|
+
}), R = ge(() => typeof t == "object" && t !== null ? t.position : Yp(t, o), [t, o]), { pointerRotation: C, pointerColor: p } = ge(() => Xp(R, s), [R, s]), S = (f) => {
|
|
4175
|
+
const I = _a[f.color] || _a.neutral, k = f.position === R, E = i === f.position && n;
|
|
4176
|
+
return s ? I.default : k ? I.active : E ? I.hover : I.default;
|
|
4176
4177
|
};
|
|
4177
4178
|
return /* @__PURE__ */ A(
|
|
4178
4179
|
"div",
|
|
@@ -4180,7 +4181,7 @@ const Hp = "_content_1vf1h_1", Wp = "_pan_1vf1h_13", zp = "_disabled_1vf1h_26",
|
|
|
4180
4181
|
ref: d,
|
|
4181
4182
|
className: g(Et.content, e),
|
|
4182
4183
|
"data-no-drag": "true",
|
|
4183
|
-
onClick:
|
|
4184
|
+
onClick: m,
|
|
4184
4185
|
style: { cursor: s ? "default" : "ns-resize" },
|
|
4185
4186
|
children: /* @__PURE__ */ A(
|
|
4186
4187
|
"div",
|
|
@@ -4205,64 +4206,64 @@ const Hp = "_content_1vf1h_1", Wp = "_pan_1vf1h_13", zp = "_disabled_1vf1h_26",
|
|
|
4205
4206
|
/* @__PURE__ */ A(
|
|
4206
4207
|
"g",
|
|
4207
4208
|
{
|
|
4208
|
-
transform: `rotate(${
|
|
4209
|
+
transform: `rotate(${C} ${Rt} ${yt})`,
|
|
4209
4210
|
children: /* @__PURE__ */ A(
|
|
4210
4211
|
"path",
|
|
4211
4212
|
{
|
|
4212
4213
|
d: "M19.5 4.5 L19.5 12",
|
|
4213
|
-
stroke:
|
|
4214
|
+
stroke: p,
|
|
4214
4215
|
strokeWidth: 1,
|
|
4215
4216
|
transform: "rotate(90 19.5 19.5)"
|
|
4216
4217
|
}
|
|
4217
4218
|
)
|
|
4218
4219
|
}
|
|
4219
4220
|
),
|
|
4220
|
-
o == null ? void 0 : o.map((
|
|
4221
|
-
const
|
|
4222
|
-
if (!
|
|
4223
|
-
const
|
|
4221
|
+
o == null ? void 0 : o.map((f) => {
|
|
4222
|
+
const I = In[f.position];
|
|
4223
|
+
if (!I) return null;
|
|
4224
|
+
const k = S(f), E = n && !s;
|
|
4224
4225
|
return /* @__PURE__ */ y(ae.Fragment, { children: [
|
|
4225
4226
|
E && /* @__PURE__ */ A(
|
|
4226
4227
|
"circle",
|
|
4227
4228
|
{
|
|
4228
|
-
cx:
|
|
4229
|
-
cy:
|
|
4229
|
+
cx: I.x,
|
|
4230
|
+
cy: I.y,
|
|
4230
4231
|
r: 4,
|
|
4231
4232
|
style: {
|
|
4232
4233
|
cursor: "pointer",
|
|
4233
4234
|
pointerEvents: "all"
|
|
4234
4235
|
},
|
|
4235
|
-
onMouseEnter: () => l(
|
|
4236
|
+
onMouseEnter: () => l(f.position),
|
|
4236
4237
|
onMouseLeave: () => l(null),
|
|
4237
4238
|
onClick: (w) => {
|
|
4238
|
-
w.stopPropagation(), f
|
|
4239
|
+
w.stopPropagation(), h(f.position);
|
|
4239
4240
|
}
|
|
4240
4241
|
}
|
|
4241
4242
|
),
|
|
4242
4243
|
/* @__PURE__ */ A(
|
|
4243
4244
|
"circle",
|
|
4244
4245
|
{
|
|
4245
|
-
cx:
|
|
4246
|
-
cy:
|
|
4246
|
+
cx: I.x,
|
|
4247
|
+
cy: I.y,
|
|
4247
4248
|
r: 1,
|
|
4248
|
-
fill:
|
|
4249
|
+
fill: k,
|
|
4249
4250
|
style: {
|
|
4250
4251
|
cursor: E ? "pointer" : "default",
|
|
4251
4252
|
transition: "fill 0.2s ease",
|
|
4252
4253
|
pointerEvents: E ? "none" : "all"
|
|
4253
4254
|
},
|
|
4254
4255
|
onMouseEnter: () => {
|
|
4255
|
-
E && l(
|
|
4256
|
+
E && l(f.position);
|
|
4256
4257
|
},
|
|
4257
4258
|
onMouseLeave: () => {
|
|
4258
4259
|
E && l(null);
|
|
4259
4260
|
},
|
|
4260
4261
|
onClick: (w) => {
|
|
4261
|
-
E && (w.stopPropagation(), f
|
|
4262
|
+
E && (w.stopPropagation(), h(f.position));
|
|
4262
4263
|
}
|
|
4263
4264
|
}
|
|
4264
4265
|
)
|
|
4265
|
-
] }, `dot-${
|
|
4266
|
+
] }, `dot-${f.position}`);
|
|
4266
4267
|
})
|
|
4267
4268
|
] })
|
|
4268
4269
|
}
|
|
@@ -4310,26 +4311,26 @@ const am = "_starButton_azi6g_1", rm = "_disabled_azi6g_17", sm = "_readOnly_azi
|
|
|
4310
4311
|
label: c,
|
|
4311
4312
|
minLabel: d,
|
|
4312
4313
|
maxLabel: u,
|
|
4313
|
-
...
|
|
4314
|
+
...m
|
|
4314
4315
|
}) => {
|
|
4315
|
-
const [
|
|
4316
|
+
const [h, R] = he(a || 0), [C, p] = he(0), S = t !== void 0 ? t : h, f = t !== void 0, I = D(
|
|
4316
4317
|
(T) => {
|
|
4317
4318
|
if (s || n) return;
|
|
4318
|
-
const b = T + 1, G = b ===
|
|
4319
|
-
|
|
4319
|
+
const b = T + 1, G = b === S ? 0 : b;
|
|
4320
|
+
f || R(G), o == null || o({ value: G });
|
|
4320
4321
|
},
|
|
4321
|
-
[s, n,
|
|
4322
|
-
),
|
|
4322
|
+
[s, n, f, o, S]
|
|
4323
|
+
), k = D(
|
|
4323
4324
|
(T) => {
|
|
4324
4325
|
if (s || n) return;
|
|
4325
4326
|
const b = T.currentTarget.getBoundingClientRect(), G = T.clientX - b.left, re = b.width / e, ee = Math.floor(G / re), H = Math.max(0, Math.min(ee, e - 1)) + 1;
|
|
4326
|
-
H !==
|
|
4327
|
+
H !== C && (p(H), i == null || i({ value: H }));
|
|
4327
4328
|
},
|
|
4328
|
-
[s, n, e,
|
|
4329
|
+
[s, n, e, C, i]
|
|
4329
4330
|
), E = D(() => {
|
|
4330
|
-
s || n || (
|
|
4331
|
+
s || n || (p(0), i == null || i({ value: 0 }));
|
|
4331
4332
|
}, [s, n, i]), w = (T) => {
|
|
4332
|
-
const b =
|
|
4333
|
+
const b = C > 0 ? T < C : T < S, G = C > 0 && T < C, re = T < S;
|
|
4333
4334
|
return /* @__PURE__ */ A(
|
|
4334
4335
|
"button",
|
|
4335
4336
|
{
|
|
@@ -4341,10 +4342,10 @@ const am = "_starButton_azi6g_1", rm = "_disabled_azi6g_17", sm = "_readOnly_azi
|
|
|
4341
4342
|
[Ae.disabled]: s,
|
|
4342
4343
|
[Ae.readOnly]: n
|
|
4343
4344
|
}),
|
|
4344
|
-
onClick: () =>
|
|
4345
|
+
onClick: () => I(T),
|
|
4345
4346
|
disabled: s || n,
|
|
4346
4347
|
"aria-label": `Rate ${T + 1} out of ${e}`,
|
|
4347
|
-
...
|
|
4348
|
+
...m,
|
|
4348
4349
|
children: b ? /* @__PURE__ */ A(ni, { className: Ae.starIcon }) : /* @__PURE__ */ A(oi, { className: Ae.starIcon })
|
|
4349
4350
|
},
|
|
4350
4351
|
T
|
|
@@ -4370,8 +4371,8 @@ const am = "_starButton_azi6g_1", rm = "_disabled_azi6g_17", sm = "_readOnly_azi
|
|
|
4370
4371
|
justify: "center",
|
|
4371
4372
|
className: Ae.starsContainer,
|
|
4372
4373
|
role: "radiogroup",
|
|
4373
|
-
"aria-label": `Rating: ${
|
|
4374
|
-
onMouseMove:
|
|
4374
|
+
"aria-label": `Rating: ${S} out of ${e} stars`,
|
|
4375
|
+
onMouseMove: k,
|
|
4375
4376
|
onMouseLeave: E,
|
|
4376
4377
|
children: Array.from({ length: e }, (T, b) => w(b))
|
|
4377
4378
|
}
|