@spear-ai/spectral 1.4.6 → 1.4.8
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 +142 -138
- package/dist/Accordion.js +2 -0
- package/dist/Alert.js +4 -2
- package/dist/Button.d.ts +11 -11
- package/dist/Button.js +18 -20
- package/dist/ButtonIcon.js +2 -0
- package/dist/Checkbox.js +2 -0
- package/dist/Icons/ArrowDownIcon.d.ts +3 -0
- package/dist/Icons/ArrowDownIcon.js +10 -0
- package/dist/Icons/ArrowUpIcon.d.ts +3 -0
- package/dist/Icons/ArrowUpIcon.js +10 -0
- package/dist/Icons/index.d.ts +2 -0
- package/dist/Icons.js +112 -108
- package/dist/Input.js +2 -0
- package/dist/InputOTP.js +4 -2
- package/dist/MultiSelect/MultiSelectBase.js +38 -36
- package/dist/Select.js +2 -0
- package/dist/Textarea.js +2 -0
- package/dist/Tray.js +2 -0
- package/dist/primitives/select.js +18 -16
- package/dist/styles/main.css +1 -1
- package/package.json +1 -1
package/dist/Icons.js
CHANGED
|
@@ -1,116 +1,120 @@
|
|
|
1
1
|
import { AnalyzeIcon as e } from "./Icons/AnalyzeIcon.js";
|
|
2
2
|
import { AnnotationsIcon as t } from "./Icons/AnnotationsIcon.js";
|
|
3
3
|
import { ApprovedIcon as m } from "./Icons/ApprovedIcon.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
4
|
+
import { ArrowDownIcon as f } from "./Icons/ArrowDownIcon.js";
|
|
5
|
+
import { ArrowUpIcon as x } from "./Icons/ArrowUpIcon.js";
|
|
6
|
+
import { CalendarIcon as s } from "./Icons/CalendarIcon.js";
|
|
7
|
+
import { CheckCircleIcon as i } from "./Icons/CheckCircleIcon.js";
|
|
8
|
+
import { CheckSquareIcon as d } from "./Icons/CheckSquareIcon.js";
|
|
9
|
+
import { CheckmarkIcon as g } from "./Icons/CheckmarkIcon.js";
|
|
10
|
+
import { ChevronDownIcon as A } from "./Icons/ChevronDownIcon.js";
|
|
11
|
+
import { ChevronUpIcon as S } from "./Icons/ChevronUpIcon.js";
|
|
12
|
+
import { ClockIcon as u } from "./Icons/ClockIcon.js";
|
|
13
|
+
import { CloseCircleIcon as y } from "./Icons/CloseCircleIcon.js";
|
|
14
|
+
import { CloseIcon as v } from "./Icons/CloseIcon.js";
|
|
15
|
+
import { DashboardIcon as P } from "./Icons/DashboardIcon.js";
|
|
16
|
+
import { DatabaseIcon as b } from "./Icons/DatabaseIcon.js";
|
|
17
|
+
import { DeleteIcon as O } from "./Icons/DeleteIcon.js";
|
|
18
|
+
import { DurationIcon as G } from "./Icons/DurationIcon.js";
|
|
19
|
+
import { EmailIcon as q } from "./Icons/EmailIcon.js";
|
|
20
|
+
import { EraserIcon as F } from "./Icons/EraserIcon.js";
|
|
21
|
+
import { ErrorIcon as V } from "./Icons/ErrorIcon.js";
|
|
22
|
+
import { EyeClosedIcon as X } from "./Icons/EyeClosedIcon.js";
|
|
23
|
+
import { EyeClosedIcon2 as j } from "./Icons/EyeClosedIcon2.js";
|
|
24
|
+
import { EyeOpenIcon as J } from "./Icons/EyeOpenIcon.js";
|
|
25
|
+
import { GoToFirstIcon as N } from "./Icons/GoToFirstIcon.js";
|
|
26
|
+
import { GoToLastIcon as _ } from "./Icons/GoToLastIcon.js";
|
|
27
|
+
import { HarmonicCursorsIcon as oo } from "./Icons/HarmonicCursorsIcon.js";
|
|
28
|
+
import { InfoIcon as eo } from "./Icons/InfoIcon.js";
|
|
29
|
+
import { LabelIcon as to } from "./Icons/LabelIcon.js";
|
|
30
|
+
import { LassoIcon as mo } from "./Icons/LassoIcon.js";
|
|
31
|
+
import { LineToolIcon as fo } from "./Icons/LineToolIcon.js";
|
|
32
|
+
import { LineToolIcon2 as xo } from "./Icons/LineToolIcon2.js";
|
|
33
|
+
import { LiveViewIcon as so } from "./Icons/LiveViewIcon.js";
|
|
34
|
+
import { LoaderIcon as io } from "./Icons/LoaderIcon.js";
|
|
35
|
+
import { LocationIcon as Lo } from "./Icons/LocationIcon.js";
|
|
36
|
+
import { LogoutIcon as ho } from "./Icons/LogoutIcon.js";
|
|
37
|
+
import { MessagesIcon as Do } from "./Icons/MessagesIcon.js";
|
|
38
|
+
import { MetadataIcon as ko } from "./Icons/MetadataIcon.js";
|
|
39
|
+
import { MinusIcon as wo } from "./Icons/MinusIcon.js";
|
|
40
|
+
import { OntologyIcon as Eo } from "./Icons/OntologyIcon.js";
|
|
41
|
+
import { PanelIconClose as To } from "./Icons/PanelIconClose.js";
|
|
42
|
+
import { PanelIconOpen as Uo } from "./Icons/PanelIconOpen.js";
|
|
43
|
+
import { PlayIcon as Mo } from "./Icons/PlayIcon.js";
|
|
44
|
+
import { PlusIcon as Zo } from "./Icons/PlusIcon.js";
|
|
45
|
+
import { ResetIcon as Ro } from "./Icons/ResetIcon.js";
|
|
46
|
+
import { ReviewedIcon as zo } from "./Icons/ReviewedIcon.js";
|
|
47
|
+
import { ScissorsIcon as Ho } from "./Icons/ScissorsIcon.js";
|
|
48
|
+
import { SettingsIcon as Wo } from "./Icons/SettingsIcon.js";
|
|
49
|
+
import { SortAscendingIcon as Yo } from "./Icons/SortAscendingIcon.js";
|
|
50
|
+
import { SortDescendingIcon as Bo } from "./Icons/SortDescendingIcon.js";
|
|
51
|
+
import { StackIcon as Ko } from "./Icons/StackIcon.js";
|
|
52
|
+
import { StarIcon as Qo } from "./Icons/StarIcon.js";
|
|
53
|
+
import { TrashIcon as $o } from "./Icons/TrashIcon.js";
|
|
54
|
+
import { UndoIcon as rr } from "./Icons/UndoIcon.js";
|
|
55
|
+
import { UserIcon as nr } from "./Icons/UserIcon.js";
|
|
56
|
+
import { WarningIcon as cr } from "./Icons/WarningIcon.js";
|
|
57
|
+
import { ZoomAllIcon as pr } from "./Icons/ZoomAllIcon.js";
|
|
58
|
+
import { ZoomXIcon as Ir } from "./Icons/ZoomXIcon.js";
|
|
59
|
+
import { ZoomYIcon as ar } from "./Icons/ZoomYIcon.js";
|
|
58
60
|
export {
|
|
59
61
|
e as AnalyzeIcon,
|
|
60
62
|
t as AnnotationsIcon,
|
|
61
63
|
m as ApprovedIcon,
|
|
62
|
-
f as
|
|
63
|
-
x as
|
|
64
|
-
s as
|
|
65
|
-
i as
|
|
66
|
-
d as
|
|
67
|
-
g as
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
G as
|
|
77
|
-
q as
|
|
78
|
-
F as
|
|
79
|
-
V as
|
|
80
|
-
X as
|
|
81
|
-
j as
|
|
82
|
-
J as
|
|
83
|
-
N as
|
|
84
|
-
_ as
|
|
85
|
-
oo as
|
|
86
|
-
eo as
|
|
87
|
-
to as
|
|
88
|
-
mo as
|
|
89
|
-
fo as
|
|
90
|
-
xo as
|
|
91
|
-
so as
|
|
92
|
-
io as
|
|
93
|
-
Lo as
|
|
94
|
-
ho as
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
Zo as
|
|
103
|
-
Ro as
|
|
104
|
-
zo as
|
|
105
|
-
Ho as
|
|
106
|
-
Wo as
|
|
107
|
-
Yo as
|
|
108
|
-
Bo as
|
|
109
|
-
Ko as
|
|
110
|
-
Qo as
|
|
111
|
-
$o as
|
|
112
|
-
rr as
|
|
113
|
-
nr as
|
|
114
|
-
cr as
|
|
115
|
-
pr as
|
|
64
|
+
f as ArrowDownIcon,
|
|
65
|
+
x as ArrowUpIcon,
|
|
66
|
+
s as CalendarIcon,
|
|
67
|
+
i as CheckCircleIcon,
|
|
68
|
+
d as CheckSquareIcon,
|
|
69
|
+
g as CheckmarkIcon,
|
|
70
|
+
A as ChevronDownIcon,
|
|
71
|
+
S as ChevronUpIcon,
|
|
72
|
+
u as ClockIcon,
|
|
73
|
+
y as CloseCircleIcon,
|
|
74
|
+
v as CloseIcon,
|
|
75
|
+
P as DashboardIcon,
|
|
76
|
+
b as DatabaseIcon,
|
|
77
|
+
O as DeleteIcon,
|
|
78
|
+
G as DurationIcon,
|
|
79
|
+
q as EmailIcon,
|
|
80
|
+
F as EraserIcon,
|
|
81
|
+
V as ErrorIcon,
|
|
82
|
+
X as EyeClosedIcon,
|
|
83
|
+
j as EyeClosedIcon2,
|
|
84
|
+
J as EyeOpenIcon,
|
|
85
|
+
N as GoToFirstIcon,
|
|
86
|
+
_ as GoToLastIcon,
|
|
87
|
+
oo as HarmonicCursorsIcon,
|
|
88
|
+
eo as InfoIcon,
|
|
89
|
+
to as LabelIcon,
|
|
90
|
+
mo as LassoIcon,
|
|
91
|
+
fo as LineToolIcon,
|
|
92
|
+
xo as LineToolIcon2,
|
|
93
|
+
so as LiveViewIcon,
|
|
94
|
+
io as LoaderIcon,
|
|
95
|
+
Lo as LocationIcon,
|
|
96
|
+
ho as LogoutIcon,
|
|
97
|
+
Do as MessagesIcon,
|
|
98
|
+
ko as MetadataIcon,
|
|
99
|
+
wo as MinusIcon,
|
|
100
|
+
Eo as OntologyIcon,
|
|
101
|
+
To as PanelIconClose,
|
|
102
|
+
Uo as PanelIconOpen,
|
|
103
|
+
Mo as PlayIcon,
|
|
104
|
+
Zo as PlusIcon,
|
|
105
|
+
Ro as ResetIcon,
|
|
106
|
+
zo as ReviewedIcon,
|
|
107
|
+
Ho as ScissorsIcon,
|
|
108
|
+
Wo as SettingsIcon,
|
|
109
|
+
Yo as SortAscendingIcon,
|
|
110
|
+
Bo as SortDescendingIcon,
|
|
111
|
+
Ko as StackIcon,
|
|
112
|
+
Qo as StarIcon,
|
|
113
|
+
$o as TrashIcon,
|
|
114
|
+
rr as UndoIcon,
|
|
115
|
+
nr as UserIcon,
|
|
116
|
+
cr as WarningIcon,
|
|
117
|
+
pr as ZoomAllIcon,
|
|
118
|
+
Ir as ZoomXIcon,
|
|
119
|
+
ar as ZoomYIcon
|
|
116
120
|
};
|
package/dist/Input.js
CHANGED
|
@@ -5,6 +5,8 @@ import { usePasswordVisibility as tt, usePrefixWidth as et, useClearOnFocus as r
|
|
|
5
5
|
import "./Icons/AnalyzeIcon.js";
|
|
6
6
|
import "./Icons/AnnotationsIcon.js";
|
|
7
7
|
import "./Icons/ApprovedIcon.js";
|
|
8
|
+
import "./Icons/ArrowDownIcon.js";
|
|
9
|
+
import "./Icons/ArrowUpIcon.js";
|
|
8
10
|
import "./Icons/CalendarIcon.js";
|
|
9
11
|
import { CheckCircleIcon as ot } from "./Icons/CheckCircleIcon.js";
|
|
10
12
|
import "./Icons/CheckSquareIcon.js";
|
package/dist/InputOTP.js
CHANGED
|
@@ -4,6 +4,8 @@ import { jsx as T, jsxs as vt } from "react/jsx-runtime";
|
|
|
4
4
|
import "./Icons/AnalyzeIcon.js";
|
|
5
5
|
import "./Icons/AnnotationsIcon.js";
|
|
6
6
|
import "./Icons/ApprovedIcon.js";
|
|
7
|
+
import "./Icons/ArrowDownIcon.js";
|
|
8
|
+
import "./Icons/ArrowUpIcon.js";
|
|
7
9
|
import "./Icons/CalendarIcon.js";
|
|
8
10
|
import "./Icons/CheckCircleIcon.js";
|
|
9
11
|
import "./Icons/CheckSquareIcon.js";
|
|
@@ -328,11 +330,11 @@ const Rt = Q(({ ...t }, n) => {
|
|
|
328
330
|
return /* @__PURE__ */ T("div", { ref: n, role: "separator", ...t, "data-testid": "spectral-input-otp-separator", "data-variant": a, children: /* @__PURE__ */ T(_t, { size: 24, color: a === "filled" ? "var(--color-input-otp-filled-separator)" : "var(--color-input-otp-border)" }) });
|
|
329
331
|
});
|
|
330
332
|
Rt.displayName = "InputOTP.Separator";
|
|
331
|
-
const
|
|
333
|
+
const dr = Object.assign(Mt, {
|
|
332
334
|
Group: Tt,
|
|
333
335
|
Slot: kt,
|
|
334
336
|
Separator: Rt
|
|
335
337
|
});
|
|
336
338
|
export {
|
|
337
|
-
|
|
339
|
+
dr as InputOTP
|
|
338
340
|
};
|
|
@@ -4,6 +4,8 @@ import { jsxs as o, jsx as r, Fragment as de } from "react/jsx-runtime";
|
|
|
4
4
|
import "../Icons/AnalyzeIcon.js";
|
|
5
5
|
import "../Icons/AnnotationsIcon.js";
|
|
6
6
|
import "../Icons/ApprovedIcon.js";
|
|
7
|
+
import "../Icons/ArrowDownIcon.js";
|
|
8
|
+
import "../Icons/ArrowUpIcon.js";
|
|
7
9
|
import "../Icons/CalendarIcon.js";
|
|
8
10
|
import "../Icons/CheckCircleIcon.js";
|
|
9
11
|
import "../Icons/CheckSquareIcon.js";
|
|
@@ -65,47 +67,47 @@ import { c as he } from "../createLucideIcon-D4r5Phnh.js";
|
|
|
65
67
|
const xe = [
|
|
66
68
|
["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
|
|
67
69
|
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
|
|
68
|
-
], ye = he("search", xe), ve = "h-4 w-4", we = (
|
|
70
|
+
], ye = he("search", xe), ve = "h-4 w-4", we = (s) => ({
|
|
69
71
|
error: "border-danger hover:border-danger focus-visible:border-danger focus-visible:ring-danger",
|
|
70
72
|
loading: "cursor-wait border-input-border--disabled",
|
|
71
73
|
disabled: "cursor-not-allowed opacity-50 border-input-border--disabled bg-input-bg--disabled",
|
|
72
74
|
default: ""
|
|
73
|
-
})[
|
|
75
|
+
})[s], Ne = (s, l, d) => f(
|
|
74
76
|
"flex h-12 w-full items-center justify-between rounded-lg border border-input-border bg-input-bg px-4 py-3 text-sm",
|
|
75
77
|
"hover:border-input-border--hover focus:border-input-border--focus focus:outline-none",
|
|
76
78
|
"focus:ring-2 focus:ring-black focus:ring-offset-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-black focus-visible:ring-offset-2",
|
|
77
79
|
"disabled:cursor-not-allowed disabled:opacity-50 disabled:border-input-border--disabled disabled:bg-input-bg--disabled",
|
|
78
80
|
"transition duration-200 text-input-text",
|
|
79
81
|
l && "border-input-border--focus ring-2 ring-black ring-offset-2",
|
|
80
|
-
we(
|
|
82
|
+
we(s),
|
|
81
83
|
d
|
|
82
|
-
), ke = (
|
|
84
|
+
), ke = (s) => f(
|
|
83
85
|
"absolute top-full left-0 right-0 z-50 mt-1 max-h-80 overflow-hidden rounded-lg border border-input-border bg-input-bg shadow-lg",
|
|
84
86
|
"transition-all duration-200 origin-top",
|
|
85
|
-
|
|
86
|
-
), Ce = (
|
|
87
|
+
s ? "scale-100 opacity-100 translate-y-0" : "scale-95 opacity-0 -translate-y-1 pointer-events-none"
|
|
88
|
+
), Ce = (s) => {
|
|
87
89
|
const l = _(null);
|
|
88
90
|
return ge(() => {
|
|
89
91
|
const d = (n) => {
|
|
90
|
-
l.current && !l.current.contains(n.target) &&
|
|
92
|
+
l.current && !l.current.contains(n.target) && s();
|
|
91
93
|
};
|
|
92
94
|
return document.addEventListener("mousedown", d), () => document.removeEventListener("mousedown", d);
|
|
93
|
-
}, [
|
|
94
|
-
}, Ie = (
|
|
95
|
+
}, [s]), l;
|
|
96
|
+
}, Ie = (s, l, d) => {
|
|
95
97
|
const [n, g] = L(-1), I = b(
|
|
96
98
|
(u) => {
|
|
97
99
|
const v = {
|
|
98
100
|
ArrowDown: () => {
|
|
99
|
-
u.preventDefault(), g((h) => Math.min(h + 1,
|
|
101
|
+
u.preventDefault(), g((h) => Math.min(h + 1, s.length - 1));
|
|
100
102
|
},
|
|
101
103
|
ArrowUp: () => {
|
|
102
104
|
u.preventDefault(), g((h) => Math.max(h - 1, -1));
|
|
103
105
|
},
|
|
104
106
|
Enter: () => {
|
|
105
|
-
u.preventDefault(), n >= 0 &&
|
|
107
|
+
u.preventDefault(), n >= 0 && s[n] && l(s[n].value);
|
|
106
108
|
},
|
|
107
109
|
" ": () => {
|
|
108
|
-
u.preventDefault(), n >= 0 &&
|
|
110
|
+
u.preventDefault(), n >= 0 && s[n] && l(s[n].value);
|
|
109
111
|
},
|
|
110
112
|
Escape: () => {
|
|
111
113
|
u.preventDefault(), d();
|
|
@@ -113,12 +115,12 @@ const xe = [
|
|
|
113
115
|
}[u.key];
|
|
114
116
|
v && v();
|
|
115
117
|
},
|
|
116
|
-
[
|
|
118
|
+
[s, n, l, d]
|
|
117
119
|
);
|
|
118
120
|
return { focusedIndex: n, setFocusedIndex: g, handleKeyDown: I };
|
|
119
121
|
}, Se = be(
|
|
120
122
|
({
|
|
121
|
-
className:
|
|
123
|
+
className: s,
|
|
122
124
|
clearAllLabel: l = "Clear all",
|
|
123
125
|
closeOnSelect: d = !1,
|
|
124
126
|
emptyMessage: n = "No options found",
|
|
@@ -144,13 +146,13 @@ const xe = [
|
|
|
144
146
|
...z
|
|
145
147
|
}, J) => {
|
|
146
148
|
const Q = fe(), S = I || `${h}-${Q}`, K = `${S}-error`, [y, k] = L(!1), [D, W] = L(""), X = Ce(() => k(!1)), A = _(null), O = z.disabled || x === "disabled", Y = x === "loading", ee = x === "error", w = T(() => {
|
|
147
|
-
let e = m.filter((
|
|
148
|
-
return R && (e = [...e].sort((
|
|
149
|
+
let e = m.filter((i) => i.label.toLowerCase().includes(D.toLowerCase()));
|
|
150
|
+
return R && (e = [...e].sort((i, t) => i.label.localeCompare(t.label))), e;
|
|
149
151
|
}, [m, D, R]), N = T(() => {
|
|
150
|
-
const e = {},
|
|
152
|
+
const e = {}, i = [];
|
|
151
153
|
return w.forEach((t) => {
|
|
152
|
-
t.group ? (e[t.group] || (e[t.group] = []), e[t.group].push(t)) :
|
|
153
|
-
}), { groups: e, ungrouped:
|
|
154
|
+
t.group ? (e[t.group] || (e[t.group] = []), e[t.group].push(t)) : i.push(t);
|
|
155
|
+
}), { groups: e, ungrouped: i, hasGroups: Object.keys(e).length > 0 };
|
|
154
156
|
}, [w]), C = b(
|
|
155
157
|
(e) => {
|
|
156
158
|
if (m.find((c) => c.value === e)?.disabled) return;
|
|
@@ -158,24 +160,24 @@ const xe = [
|
|
|
158
160
|
p(t), d && k(!1);
|
|
159
161
|
},
|
|
160
162
|
[m, a, p, d]
|
|
161
|
-
), { focusedIndex: te, handleKeyDown: re } = Ie(w, C, () => k(!1)),
|
|
163
|
+
), { focusedIndex: te, handleKeyDown: re } = Ie(w, C, () => k(!1)), ie = b(() => {
|
|
162
164
|
O || k((e) => (e || setTimeout(() => A.current?.focus(), 0), !e));
|
|
163
|
-
}, [O]),
|
|
164
|
-
const e = m.filter((t) => !t.disabled).map((t) => t.value),
|
|
165
|
-
p(
|
|
165
|
+
}, [O]), se = b(() => {
|
|
166
|
+
const e = m.filter((t) => !t.disabled).map((t) => t.value), i = e.every((t) => a.includes(t));
|
|
167
|
+
p(i ? [] : e);
|
|
166
168
|
}, [m, a, p]), j = b(() => {
|
|
167
169
|
p([]);
|
|
168
170
|
}, [p]), oe = b((e) => {
|
|
169
171
|
W(e.target.value);
|
|
170
172
|
}, []), le = b(
|
|
171
|
-
(e,
|
|
172
|
-
|
|
173
|
+
(e, i) => {
|
|
174
|
+
i.stopPropagation(), C(e);
|
|
173
175
|
},
|
|
174
176
|
[C]
|
|
175
177
|
), ne = () => {
|
|
176
178
|
if (a.length === 0)
|
|
177
179
|
return /* @__PURE__ */ r("span", { className: "text-input-text-placeholder", children: $ });
|
|
178
|
-
const e = a.slice(0, v),
|
|
180
|
+
const e = a.slice(0, v), i = a.length - v;
|
|
179
181
|
return /* @__PURE__ */ o("div", { className: "flex items-center gap-1 flex-wrap", children: [
|
|
180
182
|
e.map((t) => {
|
|
181
183
|
const c = m.find((E) => E.value === t);
|
|
@@ -184,13 +186,13 @@ const xe = [
|
|
|
184
186
|
/* @__PURE__ */ r("button", { "aria-label": `Remove ${c.label}`, className: "hover:text-danger focus:outline-none", "data-testid": "spectral-multiselect-remove-item-button", onClick: (E) => le(t, E), type: "button", children: /* @__PURE__ */ r(P, { size: 12 }) })
|
|
185
187
|
] }, t) : null;
|
|
186
188
|
}),
|
|
187
|
-
|
|
189
|
+
i > 0 && /* @__PURE__ */ o("span", { className: "text-input-text-secondary text-xs", children: [
|
|
188
190
|
"+",
|
|
189
|
-
|
|
191
|
+
i,
|
|
190
192
|
" more"
|
|
191
193
|
] })
|
|
192
194
|
] });
|
|
193
|
-
}, F = (e,
|
|
195
|
+
}, F = (e, i) => {
|
|
194
196
|
const t = a.includes(e.value);
|
|
195
197
|
return /* @__PURE__ */ o(
|
|
196
198
|
"button",
|
|
@@ -198,7 +200,7 @@ const xe = [
|
|
|
198
200
|
className: f(
|
|
199
201
|
"w-full flex items-center gap-3 px-3 py-2 text-sm text-left hover:bg-input-bg--hover focus:bg-input-bg--hover focus:outline-none",
|
|
200
202
|
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
201
|
-
|
|
203
|
+
i === te && "bg-input-bg--hover",
|
|
202
204
|
t && "text-input-text font-medium"
|
|
203
205
|
),
|
|
204
206
|
disabled: e.disabled,
|
|
@@ -225,13 +227,13 @@ const xe = [
|
|
|
225
227
|
"aria-describedby": f(ee && K, q),
|
|
226
228
|
"aria-expanded": y,
|
|
227
229
|
"aria-label": Z || u,
|
|
228
|
-
className: Ne(x, y,
|
|
230
|
+
className: Ne(x, y, s),
|
|
229
231
|
"data-state": x,
|
|
230
232
|
"data-testid": "spectral-multiselect-trigger",
|
|
231
233
|
disabled: O,
|
|
232
234
|
id: S,
|
|
233
235
|
name: h,
|
|
234
|
-
onClick:
|
|
236
|
+
onClick: ie,
|
|
235
237
|
ref: J,
|
|
236
238
|
role: "combobox",
|
|
237
239
|
style: ae(),
|
|
@@ -288,18 +290,18 @@ const xe = [
|
|
|
288
290
|
{
|
|
289
291
|
className: "w-full flex items-center gap-3 px-3 py-2 text-sm font-medium text-input-text-secondary hover:bg-input-bg--hover focus:bg-input-bg--hover focus:outline-none",
|
|
290
292
|
"data-testid": "spectral-multiselect-select-all-button",
|
|
291
|
-
onClick:
|
|
293
|
+
onClick: se,
|
|
292
294
|
type: "button",
|
|
293
295
|
children: H
|
|
294
296
|
}
|
|
295
297
|
),
|
|
296
298
|
/* @__PURE__ */ r("div", { className: "mx-3 my-1 h-px bg-input-border" })
|
|
297
299
|
] }),
|
|
298
|
-
N.ungrouped.length > 0 && /* @__PURE__ */ r("div", { className: "mb-1", children: N.ungrouped.map((e,
|
|
299
|
-
Object.entries(N.groups).map(([e,
|
|
300
|
+
N.ungrouped.length > 0 && /* @__PURE__ */ r("div", { className: "mb-1", children: N.ungrouped.map((e, i) => F(e, i)) }),
|
|
301
|
+
Object.entries(N.groups).map(([e, i]) => /* @__PURE__ */ o("div", { className: "mb-1", "data-testid": "spectral-multiselect-group", children: [
|
|
300
302
|
(N.ungrouped.length > 0 || Object.keys(N.groups).indexOf(e) > 0) && /* @__PURE__ */ r("div", { className: "mx-3 my-1 h-px bg-input-border" }),
|
|
301
303
|
/* @__PURE__ */ r("div", { "data-testid": "spectral-multiselect-group-name", className: "px-3 py-1 text-xs font-semibold text-input-text-secondary uppercase tracking-wide", children: e }),
|
|
302
|
-
|
|
304
|
+
i.map((t, c) => F(t, w.indexOf(t)))
|
|
303
305
|
] }, e)),
|
|
304
306
|
V && a.length > 0 && /* @__PURE__ */ o("div", { className: "mt-1", children: [
|
|
305
307
|
/* @__PURE__ */ r("div", { className: "mx-3 my-1 h-px bg-input-border" }),
|
package/dist/Select.js
CHANGED
|
@@ -4,6 +4,8 @@ import { jsxs as r, jsx as t, Fragment as S } from "react/jsx-runtime";
|
|
|
4
4
|
import "./Icons/AnalyzeIcon.js";
|
|
5
5
|
import "./Icons/AnnotationsIcon.js";
|
|
6
6
|
import "./Icons/ApprovedIcon.js";
|
|
7
|
+
import "./Icons/ArrowDownIcon.js";
|
|
8
|
+
import "./Icons/ArrowUpIcon.js";
|
|
7
9
|
import "./Icons/CalendarIcon.js";
|
|
8
10
|
import "./Icons/CheckCircleIcon.js";
|
|
9
11
|
import "./Icons/CheckSquareIcon.js";
|
package/dist/Textarea.js
CHANGED
|
@@ -5,6 +5,8 @@ import { useTextarea as z } from "./Textarea/TextareaUtils.js";
|
|
|
5
5
|
import "./Icons/AnalyzeIcon.js";
|
|
6
6
|
import "./Icons/AnnotationsIcon.js";
|
|
7
7
|
import "./Icons/ApprovedIcon.js";
|
|
8
|
+
import "./Icons/ArrowDownIcon.js";
|
|
9
|
+
import "./Icons/ArrowUpIcon.js";
|
|
8
10
|
import "./Icons/CalendarIcon.js";
|
|
9
11
|
import "./Icons/CheckCircleIcon.js";
|
|
10
12
|
import "./Icons/CheckSquareIcon.js";
|
package/dist/Tray.js
CHANGED
|
@@ -5,6 +5,8 @@ import { ButtonIcon as Wr } from "./ButtonIcon.js";
|
|
|
5
5
|
import "./Icons/AnalyzeIcon.js";
|
|
6
6
|
import "./Icons/AnnotationsIcon.js";
|
|
7
7
|
import "./Icons/ApprovedIcon.js";
|
|
8
|
+
import "./Icons/ArrowDownIcon.js";
|
|
9
|
+
import "./Icons/ArrowUpIcon.js";
|
|
8
10
|
import "./Icons/CalendarIcon.js";
|
|
9
11
|
import "./Icons/CheckCircleIcon.js";
|
|
10
12
|
import "./Icons/CheckSquareIcon.js";
|
|
@@ -2,6 +2,8 @@ import { jsx as e, jsxs as l } from "react/jsx-runtime";
|
|
|
2
2
|
import "../Icons/AnalyzeIcon.js";
|
|
3
3
|
import "../Icons/AnnotationsIcon.js";
|
|
4
4
|
import "../Icons/ApprovedIcon.js";
|
|
5
|
+
import "../Icons/ArrowDownIcon.js";
|
|
6
|
+
import "../Icons/ArrowUpIcon.js";
|
|
5
7
|
import "../Icons/CalendarIcon.js";
|
|
6
8
|
import "../Icons/CheckCircleIcon.js";
|
|
7
9
|
import "../Icons/CheckSquareIcon.js";
|
|
@@ -59,16 +61,16 @@ import "../Icons/ZoomYIcon.js";
|
|
|
59
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-CevVJ05e.js";
|
|
60
62
|
import { cn as o } from "../utils/twUtils.js";
|
|
61
63
|
import "react";
|
|
62
|
-
function
|
|
64
|
+
function Pt({ ...t }) {
|
|
63
65
|
return /* @__PURE__ */ e(c, { "data-slot": "select", ...t });
|
|
64
66
|
}
|
|
65
|
-
function
|
|
67
|
+
function Rt({ ...t }) {
|
|
66
68
|
return /* @__PURE__ */ e(x, { "data-slot": "select-group", ...t });
|
|
67
69
|
}
|
|
68
|
-
function
|
|
70
|
+
function qt({ ...t }) {
|
|
69
71
|
return /* @__PURE__ */ e(I, { "data-slot": "select-value", ...t });
|
|
70
72
|
}
|
|
71
|
-
function
|
|
73
|
+
function At({
|
|
72
74
|
className: t,
|
|
73
75
|
size: r = "default",
|
|
74
76
|
children: a,
|
|
@@ -96,7 +98,7 @@ function Rt({
|
|
|
96
98
|
}
|
|
97
99
|
);
|
|
98
100
|
}
|
|
99
|
-
function
|
|
101
|
+
function Et({ className: t, children: r, position: a = "popper", align: i = "center", ...s }) {
|
|
100
102
|
return /* @__PURE__ */ e(d, { children: /* @__PURE__ */ l(
|
|
101
103
|
u,
|
|
102
104
|
{
|
|
@@ -119,10 +121,10 @@ function qt({ className: t, children: r, position: a = "popper", align: i = "cen
|
|
|
119
121
|
}
|
|
120
122
|
) });
|
|
121
123
|
}
|
|
122
|
-
function
|
|
124
|
+
function Ft({ className: t, ...r }) {
|
|
123
125
|
return /* @__PURE__ */ e(b, { "data-slot": "select-label", className: o("text-text-primary px-2 py-1.5 text-xs", t), ...r });
|
|
124
126
|
}
|
|
125
|
-
function
|
|
127
|
+
function Ht({ className: t, children: r, ...a }) {
|
|
126
128
|
return /* @__PURE__ */ l(
|
|
127
129
|
g,
|
|
128
130
|
{
|
|
@@ -141,7 +143,7 @@ function Et({ className: t, children: r, ...a }) {
|
|
|
141
143
|
}
|
|
142
144
|
);
|
|
143
145
|
}
|
|
144
|
-
function
|
|
146
|
+
function Jt({ className: t, ...r }) {
|
|
145
147
|
return /* @__PURE__ */ e(S, { "data-slot": "select-separator", className: o("bg-border pointer-events-none -mx-1 my-1 h-px", t), ...r });
|
|
146
148
|
}
|
|
147
149
|
function _({ className: t, ...r }) {
|
|
@@ -151,14 +153,14 @@ function j({ className: t, ...r }) {
|
|
|
151
153
|
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" }) });
|
|
152
154
|
}
|
|
153
155
|
export {
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
156
|
+
Pt as Select,
|
|
157
|
+
Et as SelectContent,
|
|
158
|
+
Rt as SelectGroup,
|
|
159
|
+
Ht as SelectItem,
|
|
160
|
+
Ft as SelectLabel,
|
|
159
161
|
j as SelectScrollDownButton,
|
|
160
162
|
_ as SelectScrollUpButton,
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
163
|
+
Jt as SelectSeparator,
|
|
164
|
+
At as SelectTrigger,
|
|
165
|
+
qt as SelectValue
|
|
164
166
|
};
|