@arcadeai/design-system 2.3.0 → 3.0.0
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/{arcade-DzMbb7xi.js → arcade-CHE48l2C.js} +1 -1
- package/dist/assets/index.css +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/ui/atoms/accordion.js +16 -16
- package/dist/components/ui/atoms/alert-dialog.js +25 -25
- package/dist/components/ui/atoms/avatar.js +7 -7
- package/dist/components/ui/atoms/checkbox.js +34 -34
- package/dist/components/ui/atoms/dropdown-menu.js +31 -31
- package/dist/components/ui/atoms/hover-card.js +19 -19
- package/dist/components/ui/atoms/popover.js +9 -9
- package/dist/components/ui/atoms/progress.js +11 -11
- package/dist/components/ui/atoms/radio-group.js +29 -29
- package/dist/components/ui/atoms/resizable.js +1 -1
- package/dist/components/ui/atoms/scroll-area.js +40 -40
- package/dist/components/ui/atoms/select.js +17 -17
- package/dist/components/ui/atoms/sidebar.js +4 -1
- package/dist/components/ui/atoms/slider.js +35 -35
- package/dist/components/ui/atoms/switch.js +15 -15
- package/dist/components/ui/atoms/tabs.js +13 -13
- package/dist/components/ui/atoms/tooltip.js +22 -22
- package/dist/components/ui/index.js +1 -1
- package/dist/components/ui/molecules/index.js +1 -1
- package/dist/components/ui/molecules/requirement-badges.js +6 -5
- package/dist/components/ui/molecules/toolkit-card.js +1 -1
- package/dist/components/ui/molecules/toolkit-picker-trigger.js +20 -23
- package/dist/components/ui/molecules/toolkit-selection-summary.js +16 -19
- package/dist/components/ui/organisms/toolkit-picker/components/action-buttons.js +6 -6
- package/dist/components/ui/organisms/toolkit-picker/components/filter-badges.js +9 -12
- package/dist/components/ui/organisms/toolkit-picker/components/search-input.js +12 -11
- package/dist/components/ui/organisms/toolkit-picker/components/select-button.js +5 -4
- package/dist/components/ui/organisms/toolkit-picker/components/toolkit-card-with-selection.js +4 -7
- package/dist/components/ui/organisms/toolkit-picker/components/toolkit-list.js +5 -4
- package/dist/components/ui/organisms/toolkit-picker/components/tools-list.js +21 -21
- package/dist/components/ui/organisms/toolkit-picker/hooks/use-toolkit-picker-filter.test.js +2 -2
- package/dist/components/ui/organisms/toolkit-picker/hooks/use-toolkit-picker-search.test.js +2 -2
- package/dist/components/ui/organisms/toolkit-picker/hooks/use-toolkit-picker-selection.test.js +2 -2
- package/dist/components/ui/organisms/toolkit-picker/mocks/toolkit-collection.js +19 -23
- package/dist/components/ui/organisms/toolkit-picker/toolkit-picker.test.js +1773 -1729
- package/dist/components/ui/utils/memo.test.js +1 -1
- package/dist/lib/arcade/arcade.js +1 -1
- package/dist/lib/arcade/arcade.test.js +2 -2
- package/dist/lib/utils.test.js +1 -1
- package/dist/main.js +195 -188
- package/dist/metadata/index.d.ts +1 -0
- package/dist/metadata/index.js +23 -16
- package/dist/metadata/toolkit-icons.d.ts +27 -0
- package/dist/metadata/toolkit-icons.js +227 -0
- package/dist/metadata/toolkits.js +341 -643
- package/dist/metadata/types.d.ts +1 -3
- package/dist/metadata/utils.d.ts +15 -0
- package/dist/metadata/utils.js +15 -8
- package/dist/{react-resizable-panels.browser-DggUboAp.js → react-resizable-panels.browser-31wAXhAV.js} +2 -1
- package/dist/{react.esm-DUaR5u-J.js → react.esm-I5_wjDW6.js} +17509 -15389
- package/dist/{toolkit-card-BWuG_NJi.js → toolkit-card-nuE_5OvN.js} +4 -3
- package/dist/{vi.bdSIJ99Y-Bs-viS39.js → vi.bdSIJ99Y-DBnM2VfT.js} +1296 -1315
- package/package.json +34 -34
- package/dist/components/ui/atoms/icons/utils.d.ts +0 -43
- package/dist/components/ui/atoms/icons/utils.js +0 -33
|
@@ -3,7 +3,7 @@ import * as c from "react";
|
|
|
3
3
|
import { P as L } from "../../../index-CpDnqHCm.js";
|
|
4
4
|
import { P as I } from "../../../index-BGfrl8IX.js";
|
|
5
5
|
import { c as ae } from "../../../index-DFZozV_h.js";
|
|
6
|
-
import { u as
|
|
6
|
+
import { u as A } from "../../../index-5Bhkapwi.js";
|
|
7
7
|
import { u as C } from "../../../index-0ioNhtNM.js";
|
|
8
8
|
import { u as ie } from "../../../index-ByaXH_ih.js";
|
|
9
9
|
import { u as de } from "../../../index-CCKe-Mpx.js";
|
|
@@ -13,7 +13,7 @@ import { c as V } from "../../../utils-Db4QWi-E.js";
|
|
|
13
13
|
function fe(e, o) {
|
|
14
14
|
return c.useReducer((r, l) => o[r][l] ?? r, e);
|
|
15
15
|
}
|
|
16
|
-
var B = "ScrollArea", [q
|
|
16
|
+
var B = "ScrollArea", [q] = ae(B), [he, v] = q(B), G = c.forwardRef(
|
|
17
17
|
(e, o) => {
|
|
18
18
|
const {
|
|
19
19
|
__scopeScrollArea: r,
|
|
@@ -21,13 +21,13 @@ var B = "ScrollArea", [q, Ye] = ae(B), [he, p] = q(B), G = c.forwardRef(
|
|
|
21
21
|
dir: t,
|
|
22
22
|
scrollHideDelay: n = 600,
|
|
23
23
|
...s
|
|
24
|
-
} = e, [a, i] = c.useState(null), [f, d] = c.useState(null), [b, u] = c.useState(null), [m, w] = c.useState(null), [x, M] = c.useState(null), [P, _] = c.useState(0), [U, D] = c.useState(0), [N, y] = c.useState(!1), [W, H] = c.useState(!1), S =
|
|
24
|
+
} = e, [a, i] = c.useState(null), [f, d] = c.useState(null), [b, u] = c.useState(null), [m, w] = c.useState(null), [x, M] = c.useState(null), [P, _] = c.useState(0), [U, D] = c.useState(0), [N, y] = c.useState(!1), [W, H] = c.useState(!1), S = A(o, (E) => i(E)), p = ie(t);
|
|
25
25
|
return /* @__PURE__ */ h(
|
|
26
26
|
he,
|
|
27
27
|
{
|
|
28
28
|
scope: r,
|
|
29
29
|
type: l,
|
|
30
|
-
dir:
|
|
30
|
+
dir: p,
|
|
31
31
|
scrollHideDelay: n,
|
|
32
32
|
scrollArea: a,
|
|
33
33
|
viewport: f,
|
|
@@ -47,7 +47,7 @@ var B = "ScrollArea", [q, Ye] = ae(B), [he, p] = q(B), G = c.forwardRef(
|
|
|
47
47
|
children: /* @__PURE__ */ h(
|
|
48
48
|
L.div,
|
|
49
49
|
{
|
|
50
|
-
dir:
|
|
50
|
+
dir: p,
|
|
51
51
|
...s,
|
|
52
52
|
ref: S,
|
|
53
53
|
style: {
|
|
@@ -66,7 +66,7 @@ var B = "ScrollArea", [q, Ye] = ae(B), [he, p] = q(B), G = c.forwardRef(
|
|
|
66
66
|
G.displayName = B;
|
|
67
67
|
var J = "ScrollAreaViewport", K = c.forwardRef(
|
|
68
68
|
(e, o) => {
|
|
69
|
-
const { __scopeScrollArea: r, children: l, nonce: t, ...n } = e, s =
|
|
69
|
+
const { __scopeScrollArea: r, children: l, nonce: t, ...n } = e, s = v(J, r), a = c.useRef(null), i = A(o, a, s.onViewportChange);
|
|
70
70
|
return /* @__PURE__ */ j(se, { children: [
|
|
71
71
|
/* @__PURE__ */ h(
|
|
72
72
|
"style",
|
|
@@ -108,7 +108,7 @@ var J = "ScrollAreaViewport", K = c.forwardRef(
|
|
|
108
108
|
K.displayName = J;
|
|
109
109
|
var g = "ScrollAreaScrollbar", Q = c.forwardRef(
|
|
110
110
|
(e, o) => {
|
|
111
|
-
const { forceMount: r, ...l } = e, t =
|
|
111
|
+
const { forceMount: r, ...l } = e, t = v(g, e.__scopeScrollArea), { onScrollbarXEnabledChange: n, onScrollbarYEnabledChange: s } = t, a = e.orientation === "horizontal";
|
|
112
112
|
return c.useEffect(() => (a ? n(!0) : s(!0), () => {
|
|
113
113
|
a ? n(!1) : s(!1);
|
|
114
114
|
}), [a, n, s]), t.type === "hover" ? /* @__PURE__ */ h(be, { ...l, ref: o, forceMount: r }) : t.type === "scroll" ? /* @__PURE__ */ h(me, { ...l, ref: o, forceMount: r }) : t.type === "auto" ? /* @__PURE__ */ h(Z, { ...l, ref: o, forceMount: r }) : t.type === "always" ? /* @__PURE__ */ h(k, { ...l, ref: o }) : null;
|
|
@@ -116,7 +116,7 @@ var g = "ScrollAreaScrollbar", Q = c.forwardRef(
|
|
|
116
116
|
);
|
|
117
117
|
Q.displayName = g;
|
|
118
118
|
var be = c.forwardRef((e, o) => {
|
|
119
|
-
const { forceMount: r, ...l } = e, t =
|
|
119
|
+
const { forceMount: r, ...l } = e, t = v(g, e.__scopeScrollArea), [n, s] = c.useState(!1);
|
|
120
120
|
return c.useEffect(() => {
|
|
121
121
|
const a = t.scrollArea;
|
|
122
122
|
let i = 0;
|
|
@@ -139,7 +139,7 @@ var be = c.forwardRef((e, o) => {
|
|
|
139
139
|
}
|
|
140
140
|
) });
|
|
141
141
|
}), me = c.forwardRef((e, o) => {
|
|
142
|
-
const { forceMount: r, ...l } = e, t =
|
|
142
|
+
const { forceMount: r, ...l } = e, t = v(g, e.__scopeScrollArea), n = e.orientation === "horizontal", s = Y(() => i("SCROLL_END"), 100), [a, i] = fe("hidden", {
|
|
143
143
|
hidden: {
|
|
144
144
|
SCROLL: "scrolling"
|
|
145
145
|
},
|
|
@@ -183,13 +183,13 @@ var be = c.forwardRef((e, o) => {
|
|
|
183
183
|
}
|
|
184
184
|
) });
|
|
185
185
|
}), Z = c.forwardRef((e, o) => {
|
|
186
|
-
const r =
|
|
186
|
+
const r = v(g, e.__scopeScrollArea), { forceMount: l, ...t } = e, [n, s] = c.useState(!1), a = e.orientation === "horizontal", i = Y(() => {
|
|
187
187
|
if (r.viewport) {
|
|
188
188
|
const f = r.viewport.offsetWidth < r.viewport.scrollWidth, d = r.viewport.offsetHeight < r.viewport.scrollHeight;
|
|
189
189
|
s(a ? f : d);
|
|
190
190
|
}
|
|
191
191
|
}, 10);
|
|
192
|
-
return
|
|
192
|
+
return T(r.viewport, i), T(r.content, i), /* @__PURE__ */ h(I, { present: l || n, children: /* @__PURE__ */ h(
|
|
193
193
|
k,
|
|
194
194
|
{
|
|
195
195
|
"data-state": n ? "visible" : "hidden",
|
|
@@ -198,7 +198,7 @@ var be = c.forwardRef((e, o) => {
|
|
|
198
198
|
}
|
|
199
199
|
) });
|
|
200
200
|
}), k = c.forwardRef((e, o) => {
|
|
201
|
-
const { orientation: r = "vertical", ...l } = e, t =
|
|
201
|
+
const { orientation: r = "vertical", ...l } = e, t = v(g, e.__scopeScrollArea), n = c.useRef(null), s = c.useRef(0), [a, i] = c.useState({
|
|
202
202
|
content: 0,
|
|
203
203
|
viewport: 0,
|
|
204
204
|
scrollbar: { size: 0, paddingStart: 0, paddingEnd: 0 }
|
|
@@ -233,7 +233,7 @@ var be = c.forwardRef((e, o) => {
|
|
|
233
233
|
}
|
|
234
234
|
}
|
|
235
235
|
) : r === "vertical" ? /* @__PURE__ */ h(
|
|
236
|
-
|
|
236
|
+
ve,
|
|
237
237
|
{
|
|
238
238
|
...d,
|
|
239
239
|
ref: o,
|
|
@@ -252,7 +252,7 @@ var be = c.forwardRef((e, o) => {
|
|
|
252
252
|
}
|
|
253
253
|
) : null;
|
|
254
254
|
}), Se = c.forwardRef((e, o) => {
|
|
255
|
-
const { sizes: r, onSizesChange: l, ...t } = e, n =
|
|
255
|
+
const { sizes: r, onSizesChange: l, ...t } = e, n = v(g, e.__scopeScrollArea), [s, a] = c.useState(), i = c.useRef(null), f = A(o, i, n.onScrollbarXChange);
|
|
256
256
|
return c.useEffect(() => {
|
|
257
257
|
i.current && a(getComputedStyle(i.current));
|
|
258
258
|
}, [i]), /* @__PURE__ */ h(
|
|
@@ -290,8 +290,8 @@ var be = c.forwardRef((e, o) => {
|
|
|
290
290
|
}
|
|
291
291
|
}
|
|
292
292
|
);
|
|
293
|
-
}),
|
|
294
|
-
const { sizes: r, onSizesChange: l, ...t } = e, n =
|
|
293
|
+
}), ve = c.forwardRef((e, o) => {
|
|
294
|
+
const { sizes: r, onSizesChange: l, ...t } = e, n = v(g, e.__scopeScrollArea), [s, a] = c.useState(), i = c.useRef(null), f = A(o, i, n.onScrollbarYChange);
|
|
295
295
|
return c.useEffect(() => {
|
|
296
296
|
i.current && a(getComputedStyle(i.current));
|
|
297
297
|
}, [i]), /* @__PURE__ */ h(
|
|
@@ -330,7 +330,7 @@ var be = c.forwardRef((e, o) => {
|
|
|
330
330
|
}
|
|
331
331
|
}
|
|
332
332
|
);
|
|
333
|
-
}), [
|
|
333
|
+
}), [pe, ee] = q(g), re = c.forwardRef((e, o) => {
|
|
334
334
|
const {
|
|
335
335
|
__scopeScrollArea: r,
|
|
336
336
|
sizes: l,
|
|
@@ -343,21 +343,21 @@ var be = c.forwardRef((e, o) => {
|
|
|
343
343
|
onWheelScroll: d,
|
|
344
344
|
onResize: b,
|
|
345
345
|
...u
|
|
346
|
-
} = e, m =
|
|
346
|
+
} = e, m = v(g, r), [w, x] = c.useState(null), M = A(o, (S) => x(S)), P = c.useRef(null), _ = c.useRef(""), U = m.viewport, D = l.content - l.viewport, N = C(d), y = C(i), W = Y(b, 10);
|
|
347
347
|
function H(S) {
|
|
348
348
|
if (P.current) {
|
|
349
|
-
const
|
|
350
|
-
f({ x:
|
|
349
|
+
const p = S.clientX - P.current.left, E = S.clientY - P.current.top;
|
|
350
|
+
f({ x: p, y: E });
|
|
351
351
|
}
|
|
352
352
|
}
|
|
353
353
|
return c.useEffect(() => {
|
|
354
|
-
const S = (
|
|
355
|
-
const E =
|
|
356
|
-
w?.contains(E) && N(
|
|
354
|
+
const S = (p) => {
|
|
355
|
+
const E = p.target;
|
|
356
|
+
w?.contains(E) && N(p, D);
|
|
357
357
|
};
|
|
358
358
|
return document.addEventListener("wheel", S, { passive: !1 }), () => document.removeEventListener("wheel", S, { passive: !1 });
|
|
359
|
-
}, [U, w, D, N]), c.useEffect(y, [l, y]),
|
|
360
|
-
|
|
359
|
+
}, [U, w, D, N]), c.useEffect(y, [l, y]), T(w, W), T(m.content, W), /* @__PURE__ */ h(
|
|
360
|
+
pe,
|
|
361
361
|
{
|
|
362
362
|
scope: r,
|
|
363
363
|
scrollbar: w,
|
|
@@ -377,8 +377,8 @@ var be = c.forwardRef((e, o) => {
|
|
|
377
377
|
}),
|
|
378
378
|
onPointerMove: R(e.onPointerMove, H),
|
|
379
379
|
onPointerUp: R(e.onPointerUp, (S) => {
|
|
380
|
-
const
|
|
381
|
-
|
|
380
|
+
const p = S.target;
|
|
381
|
+
p.hasPointerCapture(S.pointerId) && p.releasePointerCapture(S.pointerId), document.body.style.webkitUserSelect = _.current, m.viewport && (m.viewport.style.scrollBehavior = ""), P.current = null;
|
|
382
382
|
})
|
|
383
383
|
}
|
|
384
384
|
)
|
|
@@ -391,7 +391,7 @@ var be = c.forwardRef((e, o) => {
|
|
|
391
391
|
}
|
|
392
392
|
), we = c.forwardRef(
|
|
393
393
|
(e, o) => {
|
|
394
|
-
const { __scopeScrollArea: r, style: l, ...t } = e, n =
|
|
394
|
+
const { __scopeScrollArea: r, style: l, ...t } = e, n = v(z, r), s = ee(z, r), { onThumbPositionChange: a } = s, i = A(
|
|
395
395
|
o,
|
|
396
396
|
(b) => s.onThumbChange(b)
|
|
397
397
|
), f = c.useRef(void 0), d = Y(() => {
|
|
@@ -431,17 +431,17 @@ var be = c.forwardRef((e, o) => {
|
|
|
431
431
|
oe.displayName = z;
|
|
432
432
|
var F = "ScrollAreaCorner", te = c.forwardRef(
|
|
433
433
|
(e, o) => {
|
|
434
|
-
const r =
|
|
434
|
+
const r = v(F, e.__scopeScrollArea), l = !!(r.scrollbarX && r.scrollbarY);
|
|
435
435
|
return r.type !== "scroll" && l ? /* @__PURE__ */ h(ge, { ...e, ref: o }) : null;
|
|
436
436
|
}
|
|
437
437
|
);
|
|
438
438
|
te.displayName = F;
|
|
439
439
|
var ge = c.forwardRef((e, o) => {
|
|
440
|
-
const { __scopeScrollArea: r, ...l } = e, t =
|
|
441
|
-
return
|
|
440
|
+
const { __scopeScrollArea: r, ...l } = e, t = v(F, r), [n, s] = c.useState(0), [a, i] = c.useState(0), f = !!(n && a);
|
|
441
|
+
return T(t.scrollbarX, () => {
|
|
442
442
|
const d = t.scrollbarX?.offsetHeight || 0;
|
|
443
443
|
t.onCornerHeightChange(d), i(d);
|
|
444
|
-
}),
|
|
444
|
+
}), T(t.scrollbarY, () => {
|
|
445
445
|
const d = t.scrollbarY?.offsetWidth || 0;
|
|
446
446
|
t.onCornerWidthChange(d), s(d);
|
|
447
447
|
}), f ? /* @__PURE__ */ h(
|
|
@@ -504,7 +504,7 @@ function Y(e, o) {
|
|
|
504
504
|
window.clearTimeout(l.current), l.current = window.setTimeout(r, o);
|
|
505
505
|
}, [r, o]);
|
|
506
506
|
}
|
|
507
|
-
function
|
|
507
|
+
function T(e, o) {
|
|
508
508
|
const r = C(o);
|
|
509
509
|
de(() => {
|
|
510
510
|
let l = 0;
|
|
@@ -518,8 +518,8 @@ function A(e, o) {
|
|
|
518
518
|
}
|
|
519
519
|
}, [e, r]);
|
|
520
520
|
}
|
|
521
|
-
var Re = G, Ee = K,
|
|
522
|
-
function
|
|
521
|
+
var Re = G, Ee = K, Te = te;
|
|
522
|
+
function Ye({
|
|
523
523
|
className: e,
|
|
524
524
|
children: o,
|
|
525
525
|
viewPortClassName: r,
|
|
@@ -543,13 +543,13 @@ function Me({
|
|
|
543
543
|
children: o
|
|
544
544
|
}
|
|
545
545
|
),
|
|
546
|
-
/* @__PURE__ */ h(
|
|
547
|
-
/* @__PURE__ */ h(
|
|
546
|
+
/* @__PURE__ */ h(Ae, {}),
|
|
547
|
+
/* @__PURE__ */ h(Te, {})
|
|
548
548
|
]
|
|
549
549
|
}
|
|
550
550
|
);
|
|
551
551
|
}
|
|
552
|
-
function
|
|
552
|
+
function Ae({
|
|
553
553
|
className: e,
|
|
554
554
|
orientation: o = "vertical",
|
|
555
555
|
...r
|
|
@@ -577,6 +577,6 @@ function Te({
|
|
|
577
577
|
);
|
|
578
578
|
}
|
|
579
579
|
export {
|
|
580
|
-
|
|
581
|
-
|
|
580
|
+
Ye as ScrollArea,
|
|
581
|
+
Ae as ScrollBar
|
|
582
582
|
};
|
|
@@ -19,7 +19,7 @@ import { u as yt } from "../../../index-BZPx6jYI.js";
|
|
|
19
19
|
import { V as It } from "../../../index-DfNPZZ8M.js";
|
|
20
20
|
import { CheckIcon as bt, ChevronDownIcon as Me, ChevronUpIcon as Tt } from "lucide-react";
|
|
21
21
|
import { c as j } from "../../../utils-Db4QWi-E.js";
|
|
22
|
-
var Pt = [" ", "Enter", "ArrowUp", "ArrowDown"], Nt = [" ", "Enter"], ee = "Select", [de, ue, Rt] = lt(ee), [ne
|
|
22
|
+
var Pt = [" ", "Enter", "ArrowUp", "ArrowDown"], Nt = [" ", "Enter"], ee = "Select", [de, ue, Rt] = lt(ee), [ne] = it(ee, [
|
|
23
23
|
Rt,
|
|
24
24
|
Ee
|
|
25
25
|
]), pe = Ee(), [_t, Y] = ne(ee), [Et, Mt] = ne(ee), Ae = (t) => {
|
|
@@ -810,22 +810,22 @@ function $t(t, o) {
|
|
|
810
810
|
return t.map((e, c) => t[(o + c) % t.length]);
|
|
811
811
|
}
|
|
812
812
|
var Gt = Ae, jt = De, Yt = ke, qt = Be, Xt = Ve, Zt = He, Jt = ze, Qt = $e, eo = je, to = qe, oo = Xe, no = Je, ro = Qe, so = et, ao = ot;
|
|
813
|
-
function
|
|
813
|
+
function _o({
|
|
814
814
|
...t
|
|
815
815
|
}) {
|
|
816
816
|
return /* @__PURE__ */ s(Gt, { "data-slot": "select", ...t });
|
|
817
817
|
}
|
|
818
|
-
function
|
|
818
|
+
function Eo({
|
|
819
819
|
...t
|
|
820
820
|
}) {
|
|
821
821
|
return /* @__PURE__ */ s(Qt, { "data-slot": "select-group", ...t });
|
|
822
822
|
}
|
|
823
|
-
function
|
|
823
|
+
function Mo({
|
|
824
824
|
...t
|
|
825
825
|
}) {
|
|
826
826
|
return /* @__PURE__ */ s(Yt, { "data-slot": "select-value", ...t });
|
|
827
827
|
}
|
|
828
|
-
function
|
|
828
|
+
function Ao({
|
|
829
829
|
className: t,
|
|
830
830
|
size: o = "default",
|
|
831
831
|
children: e,
|
|
@@ -848,7 +848,7 @@ function Oo({
|
|
|
848
848
|
}
|
|
849
849
|
);
|
|
850
850
|
}
|
|
851
|
-
function
|
|
851
|
+
function Oo({
|
|
852
852
|
className: t,
|
|
853
853
|
children: o,
|
|
854
854
|
position: e = "popper",
|
|
@@ -882,7 +882,7 @@ function Do({
|
|
|
882
882
|
}
|
|
883
883
|
) });
|
|
884
884
|
}
|
|
885
|
-
function
|
|
885
|
+
function Do({
|
|
886
886
|
className: t,
|
|
887
887
|
...o
|
|
888
888
|
}) {
|
|
@@ -895,7 +895,7 @@ function Lo({
|
|
|
895
895
|
}
|
|
896
896
|
);
|
|
897
897
|
}
|
|
898
|
-
function
|
|
898
|
+
function Lo({
|
|
899
899
|
className: t,
|
|
900
900
|
children: o,
|
|
901
901
|
...e
|
|
@@ -916,7 +916,7 @@ function ko({
|
|
|
916
916
|
}
|
|
917
917
|
);
|
|
918
918
|
}
|
|
919
|
-
function
|
|
919
|
+
function ko({
|
|
920
920
|
className: t,
|
|
921
921
|
...o
|
|
922
922
|
}) {
|
|
@@ -964,14 +964,14 @@ function co({
|
|
|
964
964
|
);
|
|
965
965
|
}
|
|
966
966
|
export {
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
967
|
+
_o as Select,
|
|
968
|
+
Oo as SelectContent,
|
|
969
|
+
Eo as SelectGroup,
|
|
970
|
+
Lo as SelectItem,
|
|
971
|
+
Do as SelectLabel,
|
|
972
972
|
co as SelectScrollDownButton,
|
|
973
973
|
lo as SelectScrollUpButton,
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
974
|
+
ko as SelectSeparator,
|
|
975
|
+
Ao as SelectTrigger,
|
|
976
|
+
Mo as SelectValue
|
|
977
977
|
};
|
|
@@ -33,7 +33,10 @@ function ue({
|
|
|
33
33
|
i ? i(u) : C(u), document.cookie = `${G}=${u}; path=/; max-age=${Y}`;
|
|
34
34
|
},
|
|
35
35
|
[i, g]
|
|
36
|
-
), w = c.useCallback(
|
|
36
|
+
), w = c.useCallback(
|
|
37
|
+
() => s ? p((d) => !d) : x((d) => !d),
|
|
38
|
+
[s, x]
|
|
39
|
+
);
|
|
37
40
|
c.useEffect(() => {
|
|
38
41
|
const d = (u) => {
|
|
39
42
|
u.key === J && (u.metaKey || u.ctrlKey) && (u.preventDefault(), w());
|
|
@@ -9,14 +9,14 @@ import { u as fe } from "../../../index-ByaXH_ih.js";
|
|
|
9
9
|
import { u as me } from "../../../index-BZPx6jYI.js";
|
|
10
10
|
import { u as pe } from "../../../index-BGQepRFJ.js";
|
|
11
11
|
import { P as B } from "../../../index-CpDnqHCm.js";
|
|
12
|
-
import { c as
|
|
12
|
+
import { c as he } from "../../../index-CxO14pcK.js";
|
|
13
13
|
import { c as H } from "../../../utils-Db4QWi-E.js";
|
|
14
14
|
var G = ["PageUp", "PageDown"], W = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], q = {
|
|
15
15
|
"from-left": ["Home", "PageDown", "ArrowDown", "ArrowLeft"],
|
|
16
16
|
"from-right": ["Home", "PageDown", "ArrowDown", "ArrowRight"],
|
|
17
17
|
"from-bottom": ["Home", "PageDown", "ArrowDown", "ArrowLeft"],
|
|
18
18
|
"from-top": ["Home", "PageDown", "ArrowUp", "ArrowLeft"]
|
|
19
|
-
}, M = "Slider", [L,
|
|
19
|
+
}, M = "Slider", [L, Se, ge] = he(M), [J] = de(M, [
|
|
20
20
|
ge
|
|
21
21
|
]), [ve, T] = J(M), Q = c.forwardRef(
|
|
22
22
|
(e, t) => {
|
|
@@ -29,7 +29,7 @@ var G = ["PageUp", "PageDown"], W = ["ArrowUp", "ArrowDown", "ArrowLeft", "Arrow
|
|
|
29
29
|
disabled: s = !1,
|
|
30
30
|
minStepsBetweenThumbs: d = 0,
|
|
31
31
|
defaultValue: w = [n],
|
|
32
|
-
value:
|
|
32
|
+
value: S,
|
|
33
33
|
onValueChange: a = () => {
|
|
34
34
|
},
|
|
35
35
|
onValueCommit: u = () => {
|
|
@@ -37,15 +37,15 @@ var G = ["PageUp", "PageDown"], W = ["ArrowUp", "ArrowDown", "ArrowLeft", "Arrow
|
|
|
37
37
|
inverted: v = !1,
|
|
38
38
|
form: R,
|
|
39
39
|
...g
|
|
40
|
-
} = e, p = c.useRef(/* @__PURE__ */ new Set()), f = c.useRef(0), b = i === "horizontal" ? we : be, [
|
|
41
|
-
prop:
|
|
40
|
+
} = e, p = c.useRef(/* @__PURE__ */ new Set()), f = c.useRef(0), b = i === "horizontal" ? we : be, [h = [], A] = ue({
|
|
41
|
+
prop: S,
|
|
42
42
|
defaultProp: w,
|
|
43
43
|
onChange: (y) => {
|
|
44
44
|
[...p.current][f.current]?.focus(), a(y);
|
|
45
45
|
}
|
|
46
|
-
}), k = c.useRef(
|
|
46
|
+
}), k = c.useRef(h);
|
|
47
47
|
function V(y) {
|
|
48
|
-
const P = De(
|
|
48
|
+
const P = De(h, y);
|
|
49
49
|
K(y, P);
|
|
50
50
|
}
|
|
51
51
|
function le(y) {
|
|
@@ -53,7 +53,7 @@ var G = ["PageUp", "PageDown"], W = ["ArrowUp", "ArrowDown", "ArrowLeft", "Arrow
|
|
|
53
53
|
}
|
|
54
54
|
function ce() {
|
|
55
55
|
const y = k.current[f.current];
|
|
56
|
-
|
|
56
|
+
h[f.current] !== y && u(h);
|
|
57
57
|
}
|
|
58
58
|
function K(y, P, { commit: z } = { commit: !1 }) {
|
|
59
59
|
const Y = Me(l), N = Ae(Math.round((y - n) / l) * l + n, Y), I = X(N, [n, r]);
|
|
@@ -77,7 +77,7 @@ var G = ["PageUp", "PageDown"], W = ["ArrowUp", "ArrowDown", "ArrowLeft", "Arrow
|
|
|
77
77
|
max: r,
|
|
78
78
|
valueIndexToChangeRef: f,
|
|
79
79
|
thumbs: p.current,
|
|
80
|
-
values:
|
|
80
|
+
values: h,
|
|
81
81
|
orientation: i,
|
|
82
82
|
form: R,
|
|
83
83
|
children: /* @__PURE__ */ m(L.Provider, { scope: e.__scopeSlider, children: /* @__PURE__ */ m(L.Slot, { scope: e.__scopeSlider, children: /* @__PURE__ */ m(
|
|
@@ -88,7 +88,7 @@ var G = ["PageUp", "PageDown"], W = ["ArrowUp", "ArrowDown", "ArrowLeft", "Arrow
|
|
|
88
88
|
...g,
|
|
89
89
|
ref: t,
|
|
90
90
|
onPointerDown: _(g.onPointerDown, () => {
|
|
91
|
-
s || (k.current =
|
|
91
|
+
s || (k.current = h);
|
|
92
92
|
}),
|
|
93
93
|
min: n,
|
|
94
94
|
max: r,
|
|
@@ -97,10 +97,10 @@ var G = ["PageUp", "PageDown"], W = ["ArrowUp", "ArrowDown", "ArrowLeft", "Arrow
|
|
|
97
97
|
onSlideMove: s ? void 0 : le,
|
|
98
98
|
onSlideEnd: s ? void 0 : ce,
|
|
99
99
|
onHomeKeyDown: () => !s && K(n, 0, { commit: !0 }),
|
|
100
|
-
onEndKeyDown: () => !s && K(r,
|
|
100
|
+
onEndKeyDown: () => !s && K(r, h.length - 1, { commit: !0 }),
|
|
101
101
|
onStepKeyDown: ({ event: y, direction: P }) => {
|
|
102
102
|
if (!s) {
|
|
103
|
-
const N = G.includes(y.key) || y.shiftKey && W.includes(y.key) ? 10 : 1, I = f.current, E =
|
|
103
|
+
const N = G.includes(y.key) || y.shiftKey && W.includes(y.key) ? 10 : 1, I = f.current, E = h[I], x = l * N * P;
|
|
104
104
|
K(E + x, I, { commit: !0 });
|
|
105
105
|
}
|
|
106
106
|
}
|
|
@@ -127,11 +127,11 @@ var [Z, ee] = J(M, {
|
|
|
127
127
|
onSlideMove: s,
|
|
128
128
|
onSlideEnd: d,
|
|
129
129
|
onStepKeyDown: w,
|
|
130
|
-
...
|
|
130
|
+
...S
|
|
131
131
|
} = e, [a, u] = c.useState(null), v = C(t, (b) => u(b)), R = c.useRef(void 0), g = fe(r), p = g === "ltr", f = p && !l || !p && l;
|
|
132
132
|
function D(b) {
|
|
133
|
-
const
|
|
134
|
-
return R.current =
|
|
133
|
+
const h = R.current || a.getBoundingClientRect(), A = [0, h.width], V = F(A, f ? [o, n] : [n, o]);
|
|
134
|
+
return R.current = h, V(b - h.left);
|
|
135
135
|
}
|
|
136
136
|
return /* @__PURE__ */ m(
|
|
137
137
|
Z,
|
|
@@ -146,19 +146,19 @@ var [Z, ee] = J(M, {
|
|
|
146
146
|
{
|
|
147
147
|
dir: g,
|
|
148
148
|
"data-orientation": "horizontal",
|
|
149
|
-
...
|
|
149
|
+
...S,
|
|
150
150
|
ref: v,
|
|
151
151
|
style: {
|
|
152
|
-
...
|
|
152
|
+
...S.style,
|
|
153
153
|
"--radix-slider-thumb-transform": "translateX(-50%)"
|
|
154
154
|
},
|
|
155
155
|
onSlideStart: (b) => {
|
|
156
|
-
const
|
|
157
|
-
i?.(
|
|
156
|
+
const h = D(b.clientX);
|
|
157
|
+
i?.(h);
|
|
158
158
|
},
|
|
159
159
|
onSlideMove: (b) => {
|
|
160
|
-
const
|
|
161
|
-
s?.(
|
|
160
|
+
const h = D(b.clientX);
|
|
161
|
+
s?.(h);
|
|
162
162
|
},
|
|
163
163
|
onSlideEnd: () => {
|
|
164
164
|
R.current = void 0, d?.();
|
|
@@ -183,9 +183,9 @@ var [Z, ee] = J(M, {
|
|
|
183
183
|
onSlideEnd: s,
|
|
184
184
|
onStepKeyDown: d,
|
|
185
185
|
...w
|
|
186
|
-
} = e,
|
|
186
|
+
} = e, S = c.useRef(null), a = C(t, S), u = c.useRef(void 0), v = !r;
|
|
187
187
|
function R(g) {
|
|
188
|
-
const p = u.current ||
|
|
188
|
+
const p = u.current || S.current.getBoundingClientRect(), f = [0, p.height], b = F(f, v ? [n, o] : [o, n]);
|
|
189
189
|
return u.current = p, b(g - p.top);
|
|
190
190
|
}
|
|
191
191
|
return /* @__PURE__ */ m(
|
|
@@ -237,7 +237,7 @@ var [Z, ee] = J(M, {
|
|
|
237
237
|
onEndKeyDown: s,
|
|
238
238
|
onStepKeyDown: d,
|
|
239
239
|
...w
|
|
240
|
-
} = e,
|
|
240
|
+
} = e, S = T(M, o);
|
|
241
241
|
return /* @__PURE__ */ m(
|
|
242
242
|
B.span,
|
|
243
243
|
{
|
|
@@ -248,7 +248,7 @@ var [Z, ee] = J(M, {
|
|
|
248
248
|
}),
|
|
249
249
|
onPointerDown: _(e.onPointerDown, (a) => {
|
|
250
250
|
const u = a.target;
|
|
251
|
-
u.setPointerCapture(a.pointerId), a.preventDefault(),
|
|
251
|
+
u.setPointerCapture(a.pointerId), a.preventDefault(), S.thumbs.has(u) ? u.focus() : n(a);
|
|
252
252
|
}),
|
|
253
253
|
onPointerMove: _(e.onPointerMove, (a) => {
|
|
254
254
|
a.target.hasPointerCapture(a.pointerId) && r(a);
|
|
@@ -279,7 +279,7 @@ var O = "SliderRange", re = c.forwardRef(
|
|
|
279
279
|
(e, t) => {
|
|
280
280
|
const { __scopeSlider: o, ...n } = e, r = T(O, o), l = ee(O, o), i = c.useRef(null), s = C(t, i), d = r.values.length, w = r.values.map(
|
|
281
281
|
(u) => se(u, r.min, r.max)
|
|
282
|
-
),
|
|
282
|
+
), S = d > 1 ? Math.min(...w) : 0, a = 100 - Math.max(...w);
|
|
283
283
|
return /* @__PURE__ */ m(
|
|
284
284
|
B.span,
|
|
285
285
|
{
|
|
@@ -289,7 +289,7 @@ var O = "SliderRange", re = c.forwardRef(
|
|
|
289
289
|
ref: s,
|
|
290
290
|
style: {
|
|
291
291
|
...e.style,
|
|
292
|
-
[l.startEdge]:
|
|
292
|
+
[l.startEdge]: S + "%",
|
|
293
293
|
[l.endEdge]: a + "%"
|
|
294
294
|
}
|
|
295
295
|
}
|
|
@@ -299,7 +299,7 @@ var O = "SliderRange", re = c.forwardRef(
|
|
|
299
299
|
re.displayName = O;
|
|
300
300
|
var U = "SliderThumb", ie = c.forwardRef(
|
|
301
301
|
(e, t) => {
|
|
302
|
-
const o =
|
|
302
|
+
const o = Se(e.__scopeSlider), [n, r] = c.useState(null), l = C(t, (s) => r(s)), i = c.useMemo(
|
|
303
303
|
() => n ? o().findIndex((s) => s.ref.current === n) : -1,
|
|
304
304
|
[o, n]
|
|
305
305
|
);
|
|
@@ -307,7 +307,7 @@ var U = "SliderThumb", ie = c.forwardRef(
|
|
|
307
307
|
}
|
|
308
308
|
), ye = c.forwardRef(
|
|
309
309
|
(e, t) => {
|
|
310
|
-
const { __scopeSlider: o, index: n, name: r, ...l } = e, i = T(U, o), s = ee(U, o), [d, w] = c.useState(null),
|
|
310
|
+
const { __scopeSlider: o, index: n, name: r, ...l } = e, i = T(U, o), s = ee(U, o), [d, w] = c.useState(null), S = C(t, (D) => w(D)), a = d ? i.form || !!d.closest("form") : !0, u = pe(d), v = i.values[n], R = v === void 0 ? 0 : se(v, i.min, i.max), g = xe(n, i.values.length), p = u?.[s.size], f = p ? Ee(p, R, s.direction) : 0;
|
|
311
311
|
return c.useEffect(() => {
|
|
312
312
|
if (d)
|
|
313
313
|
return i.thumbs.add(d), () => {
|
|
@@ -335,7 +335,7 @@ var U = "SliderThumb", ie = c.forwardRef(
|
|
|
335
335
|
"data-disabled": i.disabled ? "" : void 0,
|
|
336
336
|
tabIndex: i.disabled ? void 0 : 0,
|
|
337
337
|
...l,
|
|
338
|
-
ref:
|
|
338
|
+
ref: S,
|
|
339
339
|
style: v === void 0 ? { display: "none" } : e.style,
|
|
340
340
|
onFocus: _(e.onFocus, () => {
|
|
341
341
|
i.valueIndexToChangeRef.current = n;
|
|
@@ -363,10 +363,10 @@ var Re = "RadioBubbleInput", ae = c.forwardRef(
|
|
|
363
363
|
return c.useEffect(() => {
|
|
364
364
|
const s = r.current;
|
|
365
365
|
if (!s) return;
|
|
366
|
-
const d = window.HTMLInputElement.prototype,
|
|
367
|
-
if (i !== t &&
|
|
366
|
+
const d = window.HTMLInputElement.prototype, S = Object.getOwnPropertyDescriptor(d, "value").set;
|
|
367
|
+
if (i !== t && S) {
|
|
368
368
|
const a = new Event("input", { bubbles: !0 });
|
|
369
|
-
|
|
369
|
+
S.call(s, t), s.dispatchEvent(a);
|
|
370
370
|
}
|
|
371
371
|
}, [i, t]), /* @__PURE__ */ m(
|
|
372
372
|
B.input,
|
|
@@ -425,7 +425,7 @@ function Ae(e, t) {
|
|
|
425
425
|
return Math.round(e * o) / o;
|
|
426
426
|
}
|
|
427
427
|
var Ke = Q, Ie = ne, Be = re, Te = ie;
|
|
428
|
-
function
|
|
428
|
+
function Xe({
|
|
429
429
|
className: e,
|
|
430
430
|
defaultValue: t,
|
|
431
431
|
value: o,
|
|
@@ -479,5 +479,5 @@ function Ge({
|
|
|
479
479
|
);
|
|
480
480
|
}
|
|
481
481
|
export {
|
|
482
|
-
|
|
482
|
+
Xe as Slider
|
|
483
483
|
};
|
|
@@ -8,7 +8,7 @@ import { u as H } from "../../../index-BZPx6jYI.js";
|
|
|
8
8
|
import { u as A } from "../../../index-BGQepRFJ.js";
|
|
9
9
|
import { P } from "../../../index-CpDnqHCm.js";
|
|
10
10
|
import { c as g } from "../../../utils-Db4QWi-E.js";
|
|
11
|
-
var
|
|
11
|
+
var h = "Switch", [U] = j(h), [q, L] = U(h), N = n.forwardRef(
|
|
12
12
|
(r, e) => {
|
|
13
13
|
const {
|
|
14
14
|
__scopeSwitch: t,
|
|
@@ -20,12 +20,12 @@ var m = "Switch", [U, Z] = j(m), [q, L] = U(m), N = n.forwardRef(
|
|
|
20
20
|
value: u = "on",
|
|
21
21
|
onCheckedChange: v,
|
|
22
22
|
form: i,
|
|
23
|
-
...
|
|
24
|
-
} = r, [l, p] = n.useState(null),
|
|
23
|
+
...k
|
|
24
|
+
} = r, [l, p] = n.useState(null), w = x(e, (m) => p(m)), S = n.useRef(!1), C = l ? i || !!l.closest("form") : !0, [f, T] = z({
|
|
25
25
|
prop: o,
|
|
26
26
|
defaultProp: b ?? !1,
|
|
27
27
|
onChange: v,
|
|
28
|
-
caller:
|
|
28
|
+
caller: h
|
|
29
29
|
});
|
|
30
30
|
return /* @__PURE__ */ y(q, { scope: t, checked: f, disabled: c, children: [
|
|
31
31
|
/* @__PURE__ */ s(
|
|
@@ -39,10 +39,10 @@ var m = "Switch", [U, Z] = j(m), [q, L] = U(m), N = n.forwardRef(
|
|
|
39
39
|
"data-disabled": c ? "" : void 0,
|
|
40
40
|
disabled: c,
|
|
41
41
|
value: u,
|
|
42
|
-
...
|
|
43
|
-
ref:
|
|
44
|
-
onClick: M(r.onClick, (
|
|
45
|
-
T((I) => !I), C && (S.current =
|
|
42
|
+
...k,
|
|
43
|
+
ref: w,
|
|
44
|
+
onClick: M(r.onClick, (m) => {
|
|
45
|
+
T((I) => !I), C && (S.current = m.isPropagationStopped(), S.current || m.stopPropagation());
|
|
46
46
|
})
|
|
47
47
|
}
|
|
48
48
|
),
|
|
@@ -63,7 +63,7 @@ var m = "Switch", [U, Z] = j(m), [q, L] = U(m), N = n.forwardRef(
|
|
|
63
63
|
] });
|
|
64
64
|
}
|
|
65
65
|
);
|
|
66
|
-
N.displayName =
|
|
66
|
+
N.displayName = h;
|
|
67
67
|
var R = "SwitchThumb", E = n.forwardRef(
|
|
68
68
|
(r, e) => {
|
|
69
69
|
const { __scopeSwitch: t, ...a } = r, o = L(R, t);
|
|
@@ -91,13 +91,13 @@ var O = "SwitchBubbleInput", _ = n.forwardRef(
|
|
|
91
91
|
return n.useEffect(() => {
|
|
92
92
|
const i = d.current;
|
|
93
93
|
if (!i) return;
|
|
94
|
-
const
|
|
95
|
-
|
|
94
|
+
const k = window.HTMLInputElement.prototype, p = Object.getOwnPropertyDescriptor(
|
|
95
|
+
k,
|
|
96
96
|
"checked"
|
|
97
97
|
).set;
|
|
98
98
|
if (u !== t && p) {
|
|
99
|
-
const
|
|
100
|
-
p.call(i, t), i.dispatchEvent(
|
|
99
|
+
const w = new Event("click", { bubbles: a });
|
|
100
|
+
p.call(i, t), i.dispatchEvent(w);
|
|
101
101
|
}
|
|
102
102
|
}, [u, t, a]), /* @__PURE__ */ s(
|
|
103
103
|
"input",
|
|
@@ -125,7 +125,7 @@ function B(r) {
|
|
|
125
125
|
return r ? "checked" : "unchecked";
|
|
126
126
|
}
|
|
127
127
|
var D = N, F = E;
|
|
128
|
-
function
|
|
128
|
+
function Z({
|
|
129
129
|
className: r,
|
|
130
130
|
loading: e = !1,
|
|
131
131
|
disabled: t,
|
|
@@ -176,5 +176,5 @@ function ee({
|
|
|
176
176
|
);
|
|
177
177
|
}
|
|
178
178
|
export {
|
|
179
|
-
|
|
179
|
+
Z as Switch
|
|
180
180
|
};
|