@spear-ai/spectral 1.4.11 → 1.4.13
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/.js +119 -113
- package/dist/Accordion.d.ts +1 -0
- package/dist/Accordion.js +132 -129
- package/dist/Alert.js +5 -2
- package/dist/ButtonIcon.js +3 -0
- package/dist/Checkbox.js +3 -0
- package/dist/Combination-BtmnusWq.js +480 -0
- package/dist/Dialog/DialogBase.js +78 -77
- package/dist/Drawer.js +1 -1
- package/dist/Icons/EditIcon.d.ts +3 -0
- package/dist/Icons/EditIcon.js +31 -0
- package/dist/Icons/IconBase.d.ts +1 -2
- package/dist/Icons/IconBase.js +8 -8
- package/dist/Icons/SortAtoZIcon.d.ts +3 -0
- package/dist/Icons/SortAtoZIcon.js +16 -0
- package/dist/Icons/SortZtoAIcon.d.ts +3 -0
- package/dist/Icons/SortZtoAIcon.js +16 -0
- package/dist/Icons/index.d.ts +3 -0
- package/dist/Icons.js +102 -96
- package/dist/Input.js +18 -15
- package/dist/InputOTP.js +5 -2
- package/dist/MultiSelect/MultiSelectBase.js +3 -0
- package/dist/Popover.js +26 -25
- package/dist/Select.js +14 -11
- package/dist/Textarea.js +9 -6
- package/dist/Tray.js +4 -1
- package/dist/{index-CevVJ05e.js → index-7IR9qVCR.js} +31 -30
- package/dist/{index-CAKA12cC.js → index-Dc8KxzeM.js} +9 -8
- package/dist/index-MZS7zxk4.js +200 -0
- package/dist/primitives/select.js +20 -17
- package/dist/styles/main.css +1 -1
- package/package.json +2 -1
- package/dist/index-B-GQStVW.js +0 -674
package/dist/Textarea.js
CHANGED
|
@@ -20,6 +20,7 @@ import "./Icons/DashboardIcon.js";
|
|
|
20
20
|
import "./Icons/DatabaseIcon.js";
|
|
21
21
|
import "./Icons/DeleteIcon.js";
|
|
22
22
|
import "./Icons/DurationIcon.js";
|
|
23
|
+
import "./Icons/EditIcon.js";
|
|
23
24
|
import "./Icons/EmailIcon.js";
|
|
24
25
|
import "./Icons/EraserIcon.js";
|
|
25
26
|
import "./Icons/ErrorIcon.js";
|
|
@@ -51,7 +52,9 @@ import "./Icons/ReviewedIcon.js";
|
|
|
51
52
|
import "./Icons/ScissorsIcon.js";
|
|
52
53
|
import "./Icons/SettingsIcon.js";
|
|
53
54
|
import "./Icons/SortAscendingIcon.js";
|
|
55
|
+
import "./Icons/SortAtoZIcon.js";
|
|
54
56
|
import "./Icons/SortDescendingIcon.js";
|
|
57
|
+
import "./Icons/SortZtoAIcon.js";
|
|
55
58
|
import "./Icons/StackIcon.js";
|
|
56
59
|
import "./Icons/StarIcon.js";
|
|
57
60
|
import "./Icons/TrashIcon.js";
|
|
@@ -66,18 +69,18 @@ import { useFormFieldId as M, getAriaProps as O, getErrorMessageId as _, getText
|
|
|
66
69
|
import { cn as g } from "./utils/twUtils.js";
|
|
67
70
|
import { forwardRef as H, useRef as J } from "react";
|
|
68
71
|
const K = "absolute right-4 top-4", Q = (t) => t || "off", U = (t, a) => {
|
|
69
|
-
const
|
|
70
|
-
return g(
|
|
72
|
+
const m = "absolute bottom-2 right-3 text-xs pointer-events-none z-10 tabular-nums", o = t >= a ? "text-danger-400" : "text-text-secondary";
|
|
73
|
+
return g(m, o);
|
|
71
74
|
}, W = H(
|
|
72
|
-
({ autoComplete: t, className: a, disabled:
|
|
75
|
+
({ autoComplete: t, className: a, disabled: m, errorMessage: o, id: C, label: c, labelClassName: b, maxLength: i = 280, name: d, onBlur: N, onChange: I, onFocus: F, placeholder: S, required: u, state: r = "default", value: s = "", ...x }, v) => {
|
|
73
76
|
const p = M(C, d), h = _(p), y = J(null), P = v || y, { handleFocus: T, handleBlur: A, handleChange: R, handlePaste: w } = z({
|
|
74
77
|
maxLength: i,
|
|
75
|
-
value:
|
|
78
|
+
value: s,
|
|
76
79
|
onChange: I || (() => {
|
|
77
80
|
}),
|
|
78
81
|
onFocus: F,
|
|
79
82
|
onBlur: N
|
|
80
|
-
}), { isDisabled: f, isLoading: E } = G(
|
|
83
|
+
}), { isDisabled: f, isLoading: E } = G(m, r), L = O(r, h, u, x["aria-describedby"]), l = s?.length || 0, j = $(r, a), k = () => ({
|
|
81
84
|
"--textarea-min-height": "6rem",
|
|
82
85
|
"--textarea-max-height": "12rem",
|
|
83
86
|
"--textarea-border-radius": "0.5rem"
|
|
@@ -105,7 +108,7 @@ const K = "absolute right-4 top-4", Q = (t) => t || "off", U = (t, a) => {
|
|
|
105
108
|
required: u,
|
|
106
109
|
spellCheck: "true",
|
|
107
110
|
style: k(),
|
|
108
|
-
value:
|
|
111
|
+
value: s,
|
|
109
112
|
...L,
|
|
110
113
|
...x
|
|
111
114
|
}
|
package/dist/Tray.js
CHANGED
|
@@ -20,6 +20,7 @@ import "./Icons/DashboardIcon.js";
|
|
|
20
20
|
import "./Icons/DatabaseIcon.js";
|
|
21
21
|
import "./Icons/DeleteIcon.js";
|
|
22
22
|
import "./Icons/DurationIcon.js";
|
|
23
|
+
import "./Icons/EditIcon.js";
|
|
23
24
|
import "./Icons/EmailIcon.js";
|
|
24
25
|
import "./Icons/EraserIcon.js";
|
|
25
26
|
import "./Icons/ErrorIcon.js";
|
|
@@ -51,7 +52,9 @@ import "./Icons/ReviewedIcon.js";
|
|
|
51
52
|
import "./Icons/ScissorsIcon.js";
|
|
52
53
|
import "./Icons/SettingsIcon.js";
|
|
53
54
|
import "./Icons/SortAscendingIcon.js";
|
|
55
|
+
import "./Icons/SortAtoZIcon.js";
|
|
54
56
|
import "./Icons/SortDescendingIcon.js";
|
|
57
|
+
import "./Icons/SortZtoAIcon.js";
|
|
55
58
|
import "./Icons/StackIcon.js";
|
|
56
59
|
import "./Icons/StarIcon.js";
|
|
57
60
|
import "./Icons/TrashIcon.js";
|
|
@@ -65,7 +68,7 @@ import { cn as rt } from "./utils/twUtils.js";
|
|
|
65
68
|
import { c as $r } from "./index-D29mdTf5.js";
|
|
66
69
|
import * as re from "react";
|
|
67
70
|
import { createContext as mt, useRef as z, useLayoutEffect as zr, useEffect as nt, useId as Ye, useContext as O, useInsertionEffect as Zi, useMemo as Y, useCallback as Ji, Children as Hr, isValidElement as _r, useState as Ae, Fragment as Qi, createElement as Gr, forwardRef as q, Component as Xr } from "react";
|
|
68
|
-
import { D as Pt } from "./index-
|
|
71
|
+
import { D as Pt } from "./index-Dc8KxzeM.js";
|
|
69
72
|
const qe = mt({});
|
|
70
73
|
function Ze(t) {
|
|
71
74
|
const e = z(null);
|
|
@@ -5,12 +5,13 @@ import { c as Re } from "./index-rKs9bXHr.js";
|
|
|
5
5
|
import { u as Ee, c as st, a as k, P as M, b as R, d as Y, e as ct } from "./index-BhufZRa2.js";
|
|
6
6
|
import { u as lt, c as at } from "./index-UEFPWH8U.js";
|
|
7
7
|
import { D as it, P as dt } from "./index-B2oBi8ng.js";
|
|
8
|
-
import { h as ut, u as pt,
|
|
8
|
+
import { h as ut, u as pt, F as ft } from "./index-MZS7zxk4.js";
|
|
9
9
|
import { u as Ie } from "./index-CVSxKOPp.js";
|
|
10
|
-
import { c as _e, R as
|
|
11
|
-
import { u as
|
|
12
|
-
import { u as
|
|
13
|
-
import { V as
|
|
10
|
+
import { c as _e, R as mt, A as ht, C as vt, a as gt } from "./index-NzygPVvJ.js";
|
|
11
|
+
import { u as St } from "./index-0ioNhtNM.js";
|
|
12
|
+
import { u as wt } from "./index-BZPx6jYI.js";
|
|
13
|
+
import { V as Ct } from "./index-CGALWSq_.js";
|
|
14
|
+
import { R as xt } from "./Combination-BtmnusWq.js";
|
|
14
15
|
import { jsx as p, jsxs as le, Fragment as Te } from "react/jsx-runtime";
|
|
15
16
|
var yt = [" ", "Enter", "ArrowUp", "ArrowDown"], It = [" ", "Enter"], J = "Select", [ie, de, Tt] = at(J), [te] = st(J, [
|
|
16
17
|
Tt,
|
|
@@ -42,7 +43,7 @@ var yt = [" ", "Enter", "ArrowUp", "ArrowDown"], It = [" ", "Enter"], J = "Selec
|
|
|
42
43
|
onChange: c,
|
|
43
44
|
caller: J
|
|
44
45
|
}), V = t.useRef(null), B = h ? y || !!h.closest("form") : !0, [G, H] = t.useState(/* @__PURE__ */ new Set()), F = Array.from(G).map((_) => _.props.value).join(";");
|
|
45
|
-
return /* @__PURE__ */ p(
|
|
46
|
+
return /* @__PURE__ */ p(mt, { ...i, children: /* @__PURE__ */ le(
|
|
46
47
|
Pt,
|
|
47
48
|
{
|
|
48
49
|
required: T,
|
|
@@ -113,7 +114,7 @@ var Me = "SelectTrigger", Ae = t.forwardRef(
|
|
|
113
114
|
y: Math.round(i.pageY)
|
|
114
115
|
});
|
|
115
116
|
};
|
|
116
|
-
return /* @__PURE__ */ p(
|
|
117
|
+
return /* @__PURE__ */ p(ht, { asChild: !0, ...d, children: /* @__PURE__ */ p(
|
|
117
118
|
M.button,
|
|
118
119
|
{
|
|
119
120
|
type: "button",
|
|
@@ -295,8 +296,8 @@ var O = 10, [Be, q] = te(Q), Nt = "SelectContentImpl", Mt = ct("SelectContent.Re
|
|
|
295
296
|
position: a,
|
|
296
297
|
isPositioned: G,
|
|
297
298
|
searchRef: pe,
|
|
298
|
-
children: /* @__PURE__ */ p(
|
|
299
|
-
|
|
299
|
+
children: /* @__PURE__ */ p(xt, { as: Mt, allowPinchZoom: !0, children: /* @__PURE__ */ p(
|
|
300
|
+
ft,
|
|
300
301
|
{
|
|
301
302
|
asChild: !0,
|
|
302
303
|
trapped: m.open,
|
|
@@ -470,7 +471,7 @@ var Ot = "SelectPopperPosition", Se = t.forwardRef((o, l) => {
|
|
|
470
471
|
...d
|
|
471
472
|
} = o, n = ue(e);
|
|
472
473
|
return /* @__PURE__ */ p(
|
|
473
|
-
|
|
474
|
+
vt,
|
|
474
475
|
{
|
|
475
476
|
...n,
|
|
476
477
|
...d,
|
|
@@ -743,13 +744,13 @@ et.displayName = Bt;
|
|
|
743
744
|
var ye = "SelectArrow", Ht = t.forwardRef(
|
|
744
745
|
(o, l) => {
|
|
745
746
|
const { __scopeSelect: e, ...a } = o, s = ue(e), d = j(ye, e), n = q(ye, e);
|
|
746
|
-
return d.open && n.position === "popper" ? /* @__PURE__ */ p(
|
|
747
|
+
return d.open && n.position === "popper" ? /* @__PURE__ */ p(gt, { ...s, ...a, ref: l }) : null;
|
|
747
748
|
}
|
|
748
749
|
);
|
|
749
750
|
Ht.displayName = ye;
|
|
750
751
|
var Ft = "SelectBubbleInput", tt = t.forwardRef(
|
|
751
752
|
({ __scopeSelect: o, value: l, ...e }, a) => {
|
|
752
|
-
const s = t.useRef(null), d = k(a, s), n =
|
|
753
|
+
const s = t.useRef(null), d = k(a, s), n = wt(l);
|
|
753
754
|
return t.useEffect(() => {
|
|
754
755
|
const r = s.current;
|
|
755
756
|
if (!r) return;
|
|
@@ -765,7 +766,7 @@ var Ft = "SelectBubbleInput", tt = t.forwardRef(
|
|
|
765
766
|
M.select,
|
|
766
767
|
{
|
|
767
768
|
...e,
|
|
768
|
-
style: { ...
|
|
769
|
+
style: { ...Ct, ...e.style },
|
|
769
770
|
ref: d,
|
|
770
771
|
defaultValue: l
|
|
771
772
|
}
|
|
@@ -777,7 +778,7 @@ function ot(o) {
|
|
|
777
778
|
return o === "" || o === void 0;
|
|
778
779
|
}
|
|
779
780
|
function nt(o) {
|
|
780
|
-
const l =
|
|
781
|
+
const l = St(o), e = t.useRef(""), a = t.useRef(0), s = t.useCallback(
|
|
781
782
|
(n) => {
|
|
782
783
|
const r = e.current + n;
|
|
783
784
|
l(r), (function c(f) {
|
|
@@ -802,21 +803,21 @@ function rt(o, l, e) {
|
|
|
802
803
|
function Ut(o, l) {
|
|
803
804
|
return o.map((e, a) => o[(l + a) % o.length]);
|
|
804
805
|
}
|
|
805
|
-
var
|
|
806
|
+
var eo = Ne, to = Ae, oo = De, no = Le, ro = ke, so = Ve, co = Ue, lo = Ke, ao = ze, io = je, uo = qe, po = Ze, fo = $e, mo = Je, ho = et;
|
|
806
807
|
export {
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
808
|
+
so as C,
|
|
809
|
+
lo as G,
|
|
810
|
+
io as I,
|
|
811
|
+
ao as L,
|
|
812
|
+
ro as P,
|
|
813
|
+
eo as R,
|
|
814
|
+
mo as S,
|
|
815
|
+
to as T,
|
|
816
|
+
co as V,
|
|
817
|
+
po as a,
|
|
818
|
+
uo as b,
|
|
819
|
+
fo as c,
|
|
820
|
+
ho as d,
|
|
821
|
+
no as e,
|
|
822
|
+
oo as f
|
|
822
823
|
};
|
|
@@ -4,8 +4,9 @@ import i, { useMemo as Ye, useLayoutEffect as je, useEffect as qe } from "react"
|
|
|
4
4
|
import { c as Xe, e as Ge, P as gt, a as Lt, b as mt, g as Ke, u as Je } from "./index-BhufZRa2.js";
|
|
5
5
|
import { u as At } from "./index-CVSxKOPp.js";
|
|
6
6
|
import { D as Ze, P as Qe } from "./index-B2oBi8ng.js";
|
|
7
|
-
import {
|
|
7
|
+
import { h as tn, u as en, F as nn } from "./index-MZS7zxk4.js";
|
|
8
8
|
import { P as Ft } from "./index-6Abv_Flm.js";
|
|
9
|
+
import { R as rn } from "./Combination-BtmnusWq.js";
|
|
9
10
|
import { jsx as A, jsxs as Zt, Fragment as Qt } from "react/jsx-runtime";
|
|
10
11
|
var Et = "Dialog", [ae] = Xe(Et), [an, q] = ae(Et), oe = (t) => {
|
|
11
12
|
const {
|
|
@@ -78,7 +79,7 @@ var sn = Ge("DialogOverlay.RemoveScroll"), ln = O.forwardRef(
|
|
|
78
79
|
return (
|
|
79
80
|
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
80
81
|
// ie. when `Overlay` and `Content` are siblings
|
|
81
|
-
/* @__PURE__ */ A(
|
|
82
|
+
/* @__PURE__ */ A(rn, { as: sn, allowPinchZoom: !0, shards: [o.contentRef], children: /* @__PURE__ */ A(
|
|
82
83
|
gt.div,
|
|
83
84
|
{
|
|
84
85
|
"data-state": Bt(o.open),
|
|
@@ -101,7 +102,7 @@ var un = O.forwardRef(
|
|
|
101
102
|
const e = q(rt, t.__scopeDialog), a = O.useRef(null), o = Lt(n, e.contentRef, a);
|
|
102
103
|
return O.useEffect(() => {
|
|
103
104
|
const r = a.current;
|
|
104
|
-
if (r) return
|
|
105
|
+
if (r) return tn(r);
|
|
105
106
|
}, []), /* @__PURE__ */ A(
|
|
106
107
|
fe,
|
|
107
108
|
{
|
|
@@ -147,9 +148,9 @@ var un = O.forwardRef(
|
|
|
147
148
|
), fe = O.forwardRef(
|
|
148
149
|
(t, n) => {
|
|
149
150
|
const { __scopeDialog: e, trapFocus: a, onOpenAutoFocus: o, onCloseAutoFocus: r, ...c } = t, s = q(rt, e), v = O.useRef(null), E = Lt(n, v);
|
|
150
|
-
return
|
|
151
|
+
return en(), /* @__PURE__ */ Zt(Qt, { children: [
|
|
151
152
|
/* @__PURE__ */ A(
|
|
152
|
-
|
|
153
|
+
nn,
|
|
153
154
|
{
|
|
154
155
|
asChild: !0,
|
|
155
156
|
loop: !0,
|
|
@@ -209,7 +210,7 @@ we.displayName = he;
|
|
|
209
210
|
function Bt(t) {
|
|
210
211
|
return t ? "open" : "closed";
|
|
211
212
|
}
|
|
212
|
-
var ve = "DialogTitleWarning", [
|
|
213
|
+
var ve = "DialogTitleWarning", [ar, ye] = Ke(ve, {
|
|
213
214
|
contentName: rt,
|
|
214
215
|
titleName: Ht,
|
|
215
216
|
docsSlug: "dialog"
|
|
@@ -1250,7 +1251,7 @@ function Gn(t) {
|
|
|
1250
1251
|
...a
|
|
1251
1252
|
});
|
|
1252
1253
|
}
|
|
1253
|
-
const
|
|
1254
|
+
const or = {
|
|
1254
1255
|
Root: Yn,
|
|
1255
1256
|
Content: Pe,
|
|
1256
1257
|
Overlay: Ae,
|
|
@@ -1261,5 +1262,5 @@ const ar = {
|
|
|
1261
1262
|
Description: bn
|
|
1262
1263
|
};
|
|
1263
1264
|
export {
|
|
1264
|
-
|
|
1265
|
+
or as D
|
|
1265
1266
|
};
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
import "./styles/main.css";
|
|
2
|
+
import * as v from "react";
|
|
3
|
+
import { a as D, P as W } from "./index-BhufZRa2.js";
|
|
4
|
+
import { u as P } from "./index-0ioNhtNM.js";
|
|
5
|
+
import { jsx as H } from "react/jsx-runtime";
|
|
6
|
+
var w = "focusScope.autoFocusOnMount", C = "focusScope.autoFocusOnUnmount", g = { bubbles: !1, cancelable: !0 }, j = "FocusScope", q = v.forwardRef((e, n) => {
|
|
7
|
+
const {
|
|
8
|
+
loop: t = !1,
|
|
9
|
+
trapped: r = !1,
|
|
10
|
+
onMountAutoFocus: f,
|
|
11
|
+
onUnmountAutoFocus: E,
|
|
12
|
+
...A
|
|
13
|
+
} = e, [o, N] = v.useState(null), h = P(f), y = P(E), s = v.useRef(null), a = D(n, (u) => N(u)), c = v.useRef({
|
|
14
|
+
paused: !1,
|
|
15
|
+
pause() {
|
|
16
|
+
this.paused = !0;
|
|
17
|
+
},
|
|
18
|
+
resume() {
|
|
19
|
+
this.paused = !1;
|
|
20
|
+
}
|
|
21
|
+
}).current;
|
|
22
|
+
v.useEffect(() => {
|
|
23
|
+
if (r) {
|
|
24
|
+
let u = function(l) {
|
|
25
|
+
if (c.paused || !o) return;
|
|
26
|
+
const d = l.target;
|
|
27
|
+
o.contains(d) ? s.current = d : m(s.current, { select: !0 });
|
|
28
|
+
}, p = function(l) {
|
|
29
|
+
if (c.paused || !o) return;
|
|
30
|
+
const d = l.relatedTarget;
|
|
31
|
+
d !== null && (o.contains(d) || m(s.current, { select: !0 }));
|
|
32
|
+
}, i = function(l) {
|
|
33
|
+
if (document.activeElement === document.body)
|
|
34
|
+
for (const L of l)
|
|
35
|
+
L.removedNodes.length > 0 && m(o);
|
|
36
|
+
};
|
|
37
|
+
document.addEventListener("focusin", u), document.addEventListener("focusout", p);
|
|
38
|
+
const F = new MutationObserver(i);
|
|
39
|
+
return o && F.observe(o, { childList: !0, subtree: !0 }), () => {
|
|
40
|
+
document.removeEventListener("focusin", u), document.removeEventListener("focusout", p), F.disconnect();
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
}, [r, o, c.paused]), v.useEffect(() => {
|
|
44
|
+
if (o) {
|
|
45
|
+
U.add(c);
|
|
46
|
+
const u = document.activeElement;
|
|
47
|
+
if (!o.contains(u)) {
|
|
48
|
+
const i = new CustomEvent(w, g);
|
|
49
|
+
o.addEventListener(w, h), o.dispatchEvent(i), i.defaultPrevented || (G(Q(K(o)), { select: !0 }), document.activeElement === u && m(o));
|
|
50
|
+
}
|
|
51
|
+
return () => {
|
|
52
|
+
o.removeEventListener(w, h), setTimeout(() => {
|
|
53
|
+
const i = new CustomEvent(C, g);
|
|
54
|
+
o.addEventListener(C, y), o.dispatchEvent(i), i.defaultPrevented || m(u ?? document.body, { select: !0 }), o.removeEventListener(C, y), U.remove(c);
|
|
55
|
+
}, 0);
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
}, [o, h, y, c]);
|
|
59
|
+
const S = v.useCallback(
|
|
60
|
+
(u) => {
|
|
61
|
+
if (!t && !r || c.paused) return;
|
|
62
|
+
const p = u.key === "Tab" && !u.altKey && !u.ctrlKey && !u.metaKey, i = document.activeElement;
|
|
63
|
+
if (p && i) {
|
|
64
|
+
const F = u.currentTarget, [l, d] = V(F);
|
|
65
|
+
l && d ? !u.shiftKey && i === d ? (u.preventDefault(), t && m(l, { select: !0 })) : u.shiftKey && i === l && (u.preventDefault(), t && m(d, { select: !0 })) : i === F && u.preventDefault();
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
[t, r, c.paused]
|
|
69
|
+
);
|
|
70
|
+
return /* @__PURE__ */ H(W.div, { tabIndex: -1, ...A, ref: a, onKeyDown: S });
|
|
71
|
+
});
|
|
72
|
+
q.displayName = j;
|
|
73
|
+
function G(e, { select: n = !1 } = {}) {
|
|
74
|
+
const t = document.activeElement;
|
|
75
|
+
for (const r of e)
|
|
76
|
+
if (m(r, { select: n }), document.activeElement !== t) return;
|
|
77
|
+
}
|
|
78
|
+
function V(e) {
|
|
79
|
+
const n = K(e), t = k(n, e), r = k(n.reverse(), e);
|
|
80
|
+
return [t, r];
|
|
81
|
+
}
|
|
82
|
+
function K(e) {
|
|
83
|
+
const n = [], t = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
|
|
84
|
+
acceptNode: (r) => {
|
|
85
|
+
const f = r.tagName === "INPUT" && r.type === "hidden";
|
|
86
|
+
return r.disabled || r.hidden || f ? NodeFilter.FILTER_SKIP : r.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
for (; t.nextNode(); ) n.push(t.currentNode);
|
|
90
|
+
return n;
|
|
91
|
+
}
|
|
92
|
+
function k(e, n) {
|
|
93
|
+
for (const t of e)
|
|
94
|
+
if (!B(t, { upTo: n })) return t;
|
|
95
|
+
}
|
|
96
|
+
function B(e, { upTo: n }) {
|
|
97
|
+
if (getComputedStyle(e).visibility === "hidden") return !0;
|
|
98
|
+
for (; e; ) {
|
|
99
|
+
if (n !== void 0 && e === n) return !1;
|
|
100
|
+
if (getComputedStyle(e).display === "none") return !0;
|
|
101
|
+
e = e.parentElement;
|
|
102
|
+
}
|
|
103
|
+
return !1;
|
|
104
|
+
}
|
|
105
|
+
function z(e) {
|
|
106
|
+
return e instanceof HTMLInputElement && "select" in e;
|
|
107
|
+
}
|
|
108
|
+
function m(e, { select: n = !1 } = {}) {
|
|
109
|
+
if (e && e.focus) {
|
|
110
|
+
const t = document.activeElement;
|
|
111
|
+
e.focus({ preventScroll: !0 }), e !== t && z(e) && n && e.select();
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
var U = J();
|
|
115
|
+
function J() {
|
|
116
|
+
let e = [];
|
|
117
|
+
return {
|
|
118
|
+
add(n) {
|
|
119
|
+
const t = e[0];
|
|
120
|
+
n !== t && t?.pause(), e = x(e, n), e.unshift(n);
|
|
121
|
+
},
|
|
122
|
+
remove(n) {
|
|
123
|
+
e = x(e, n), e[0]?.resume();
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
function x(e, n) {
|
|
128
|
+
const t = [...e], r = t.indexOf(n);
|
|
129
|
+
return r !== -1 && t.splice(r, 1), t;
|
|
130
|
+
}
|
|
131
|
+
function Q(e) {
|
|
132
|
+
return e.filter((n) => n.tagName !== "A");
|
|
133
|
+
}
|
|
134
|
+
var M = 0;
|
|
135
|
+
function ne() {
|
|
136
|
+
v.useEffect(() => {
|
|
137
|
+
const e = document.querySelectorAll("[data-radix-focus-guard]");
|
|
138
|
+
return document.body.insertAdjacentElement("afterbegin", e[0] ?? R()), document.body.insertAdjacentElement("beforeend", e[1] ?? R()), M++, () => {
|
|
139
|
+
M === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((n) => n.remove()), M--;
|
|
140
|
+
};
|
|
141
|
+
}, []);
|
|
142
|
+
}
|
|
143
|
+
function R() {
|
|
144
|
+
const e = document.createElement("span");
|
|
145
|
+
return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.outline = "none", e.style.opacity = "0", e.style.position = "fixed", e.style.pointerEvents = "none", e;
|
|
146
|
+
}
|
|
147
|
+
var X = function(e) {
|
|
148
|
+
if (typeof document > "u")
|
|
149
|
+
return null;
|
|
150
|
+
var n = Array.isArray(e) ? e[0] : e;
|
|
151
|
+
return n.ownerDocument.body;
|
|
152
|
+
}, b = /* @__PURE__ */ new WeakMap(), T = /* @__PURE__ */ new WeakMap(), O = {}, I = 0, _ = function(e) {
|
|
153
|
+
return e && (e.host || _(e.parentNode));
|
|
154
|
+
}, Y = function(e, n) {
|
|
155
|
+
return n.map(function(t) {
|
|
156
|
+
if (e.contains(t))
|
|
157
|
+
return t;
|
|
158
|
+
var r = _(t);
|
|
159
|
+
return r && e.contains(r) ? r : (console.error("aria-hidden", t, "in not contained inside", e, ". Doing nothing"), null);
|
|
160
|
+
}).filter(function(t) {
|
|
161
|
+
return !!t;
|
|
162
|
+
});
|
|
163
|
+
}, Z = function(e, n, t, r) {
|
|
164
|
+
var f = Y(n, Array.isArray(e) ? e : [e]);
|
|
165
|
+
O[t] || (O[t] = /* @__PURE__ */ new WeakMap());
|
|
166
|
+
var E = O[t], A = [], o = /* @__PURE__ */ new Set(), N = new Set(f), h = function(s) {
|
|
167
|
+
!s || o.has(s) || (o.add(s), h(s.parentNode));
|
|
168
|
+
};
|
|
169
|
+
f.forEach(h);
|
|
170
|
+
var y = function(s) {
|
|
171
|
+
!s || N.has(s) || Array.prototype.forEach.call(s.children, function(a) {
|
|
172
|
+
if (o.has(a))
|
|
173
|
+
y(a);
|
|
174
|
+
else
|
|
175
|
+
try {
|
|
176
|
+
var c = a.getAttribute(r), S = c !== null && c !== "false", u = (b.get(a) || 0) + 1, p = (E.get(a) || 0) + 1;
|
|
177
|
+
b.set(a, u), E.set(a, p), A.push(a), u === 1 && S && T.set(a, !0), p === 1 && a.setAttribute(t, "true"), S || a.setAttribute(r, "true");
|
|
178
|
+
} catch (i) {
|
|
179
|
+
console.error("aria-hidden: cannot operate on ", a, i);
|
|
180
|
+
}
|
|
181
|
+
});
|
|
182
|
+
};
|
|
183
|
+
return y(n), o.clear(), I++, function() {
|
|
184
|
+
A.forEach(function(s) {
|
|
185
|
+
var a = b.get(s) - 1, c = E.get(s) - 1;
|
|
186
|
+
b.set(s, a), E.set(s, c), a || (T.has(s) || s.removeAttribute(r), T.delete(s)), c || s.removeAttribute(t);
|
|
187
|
+
}), I--, I || (b = /* @__PURE__ */ new WeakMap(), b = /* @__PURE__ */ new WeakMap(), T = /* @__PURE__ */ new WeakMap(), O = {});
|
|
188
|
+
};
|
|
189
|
+
}, re = function(e, n, t) {
|
|
190
|
+
t === void 0 && (t = "data-aria-hidden");
|
|
191
|
+
var r = Array.from(Array.isArray(e) ? e : [e]), f = X(e);
|
|
192
|
+
return f ? (r.push.apply(r, Array.from(f.querySelectorAll("[aria-live], script"))), Z(r, f, t, "aria-hidden")) : function() {
|
|
193
|
+
return null;
|
|
194
|
+
};
|
|
195
|
+
};
|
|
196
|
+
export {
|
|
197
|
+
q as F,
|
|
198
|
+
re as h,
|
|
199
|
+
ne as u
|
|
200
|
+
};
|
|
@@ -17,6 +17,7 @@ import "../Icons/DashboardIcon.js";
|
|
|
17
17
|
import "../Icons/DatabaseIcon.js";
|
|
18
18
|
import "../Icons/DeleteIcon.js";
|
|
19
19
|
import "../Icons/DurationIcon.js";
|
|
20
|
+
import "../Icons/EditIcon.js";
|
|
20
21
|
import "../Icons/EmailIcon.js";
|
|
21
22
|
import "../Icons/EraserIcon.js";
|
|
22
23
|
import "../Icons/ErrorIcon.js";
|
|
@@ -48,7 +49,9 @@ import "../Icons/ReviewedIcon.js";
|
|
|
48
49
|
import "../Icons/ScissorsIcon.js";
|
|
49
50
|
import "../Icons/SettingsIcon.js";
|
|
50
51
|
import "../Icons/SortAscendingIcon.js";
|
|
52
|
+
import "../Icons/SortAtoZIcon.js";
|
|
51
53
|
import "../Icons/SortDescendingIcon.js";
|
|
54
|
+
import "../Icons/SortZtoAIcon.js";
|
|
52
55
|
import "../Icons/StackIcon.js";
|
|
53
56
|
import "../Icons/StarIcon.js";
|
|
54
57
|
import "../Icons/TrashIcon.js";
|
|
@@ -58,19 +61,19 @@ import "../Icons/WarningIcon.js";
|
|
|
58
61
|
import "../Icons/ZoomAllIcon.js";
|
|
59
62
|
import "../Icons/ZoomXIcon.js";
|
|
60
63
|
import "../Icons/ZoomYIcon.js";
|
|
61
|
-
import { R as c, P as d, C as u, V as f, G as x, I as g, a as h, b as v, L as b, S as y, c as w, d as S, T as z, e as N, f as I } from "../index-
|
|
64
|
+
import { R as c, P as d, C as u, V as f, G as x, I as g, a as h, b as v, L as b, S as y, c as w, d as S, T as z, e as N, f as I } from "../index-7IR9qVCR.js";
|
|
62
65
|
import { cn as o } from "../utils/twUtils.js";
|
|
63
66
|
import "react";
|
|
64
|
-
function
|
|
67
|
+
function At({ ...t }) {
|
|
65
68
|
return /* @__PURE__ */ e(c, { "data-slot": "select", ...t });
|
|
66
69
|
}
|
|
67
|
-
function
|
|
70
|
+
function Et({ ...t }) {
|
|
68
71
|
return /* @__PURE__ */ e(x, { "data-slot": "select-group", ...t });
|
|
69
72
|
}
|
|
70
|
-
function
|
|
73
|
+
function Ft({ ...t }) {
|
|
71
74
|
return /* @__PURE__ */ e(I, { "data-slot": "select-value", ...t });
|
|
72
75
|
}
|
|
73
|
-
function
|
|
76
|
+
function Ht({
|
|
74
77
|
className: t,
|
|
75
78
|
size: r = "default",
|
|
76
79
|
children: a,
|
|
@@ -98,7 +101,7 @@ function At({
|
|
|
98
101
|
}
|
|
99
102
|
);
|
|
100
103
|
}
|
|
101
|
-
function
|
|
104
|
+
function Jt({ className: t, children: r, position: a = "popper", align: i = "center", ...s }) {
|
|
102
105
|
return /* @__PURE__ */ e(d, { children: /* @__PURE__ */ l(
|
|
103
106
|
u,
|
|
104
107
|
{
|
|
@@ -121,10 +124,10 @@ function Et({ className: t, children: r, position: a = "popper", align: i = "cen
|
|
|
121
124
|
}
|
|
122
125
|
) });
|
|
123
126
|
}
|
|
124
|
-
function
|
|
127
|
+
function Kt({ className: t, ...r }) {
|
|
125
128
|
return /* @__PURE__ */ e(b, { "data-slot": "select-label", className: o("text-text-primary px-2 py-1.5 text-xs", t), ...r });
|
|
126
129
|
}
|
|
127
|
-
function
|
|
130
|
+
function Mt({ className: t, children: r, ...a }) {
|
|
128
131
|
return /* @__PURE__ */ l(
|
|
129
132
|
g,
|
|
130
133
|
{
|
|
@@ -143,7 +146,7 @@ function Ht({ className: t, children: r, ...a }) {
|
|
|
143
146
|
}
|
|
144
147
|
);
|
|
145
148
|
}
|
|
146
|
-
function
|
|
149
|
+
function Ot({ className: t, ...r }) {
|
|
147
150
|
return /* @__PURE__ */ e(S, { "data-slot": "select-separator", className: o("bg-border pointer-events-none -mx-1 my-1 h-px", t), ...r });
|
|
148
151
|
}
|
|
149
152
|
function _({ className: t, ...r }) {
|
|
@@ -153,14 +156,14 @@ function j({ className: t, ...r }) {
|
|
|
153
156
|
return /* @__PURE__ */ e(y, { "data-slot": "select-scroll-down-button", className: o("flex cursor-default items-center justify-center py-1", t), ...r, children: /* @__PURE__ */ e(n, { className: "size-4" }) });
|
|
154
157
|
}
|
|
155
158
|
export {
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
159
|
+
At as Select,
|
|
160
|
+
Jt as SelectContent,
|
|
161
|
+
Et as SelectGroup,
|
|
162
|
+
Mt as SelectItem,
|
|
163
|
+
Kt as SelectLabel,
|
|
161
164
|
j as SelectScrollDownButton,
|
|
162
165
|
_ as SelectScrollUpButton,
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
+
Ot as SelectSeparator,
|
|
167
|
+
Ht as SelectTrigger,
|
|
168
|
+
Ft as SelectValue
|
|
166
169
|
};
|