@spear-ai/spectral 1.6.16 → 1.6.17
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 +84 -80
- package/dist/Accordion.js +65 -63
- package/dist/Alert/AlertBase.js +4 -2
- package/dist/Alert.js +7 -5
- package/dist/ButtonIcon.js +2 -0
- package/dist/Checkbox.js +2 -0
- package/dist/DateTimePicker/Calendar.js +2 -0
- package/dist/DateTimePicker.js +42 -40
- package/dist/Icons/LineToolIcon.js +37 -10
- package/dist/Icons/MeasureIcon.d.ts +5 -0
- package/dist/Icons/MeasureIcon.js +26 -0
- package/dist/Icons/SearchIcon.d.ts +5 -0
- package/dist/Icons/SearchIcon.js +10 -0
- package/dist/Icons/index.d.ts +2 -0
- package/dist/Icons.js +76 -72
- package/dist/Input.js +19 -17
- package/dist/InputOTP.js +28 -26
- package/dist/MultiSelect/MultiSelectBase.js +2 -0
- package/dist/Select.js +2 -0
- package/dist/Textarea.js +11 -9
- package/dist/Tray.js +20 -18
- package/dist/primitives/select.js +18 -16
- package/package.json +1 -1
package/dist/.js
CHANGED
|
@@ -10,9 +10,9 @@ import { DataCard as S } from "./DataCard.js";
|
|
|
10
10
|
import { DateTimePicker as A } from "./DateTimePicker.js";
|
|
11
11
|
import { Dialog as L } from "./Dialog.js";
|
|
12
12
|
import { Drawer as D } from "./Drawer.js";
|
|
13
|
-
import { HoverCard as
|
|
13
|
+
import { HoverCard as h, HoverCardContent as B, HoverCardTrigger as k } from "./HoverCard.js";
|
|
14
14
|
import { Input as y } from "./Input.js";
|
|
15
|
-
import { InputGroup as R, InputGroupAddon as O, InputGroupButton as U, InputGroupInput as Z, InputGroupText as H, InputGroupTextarea as
|
|
15
|
+
import { InputGroup as R, InputGroupAddon as O, InputGroupButton as U, InputGroupInput as Z, InputGroupText as H, InputGroupTextarea as M } from "./InputGroup.js";
|
|
16
16
|
import { InputOTP as q } from "./InputOTP.js";
|
|
17
17
|
import { Kbd as F, KbdGroup as V } from "./Kbd.js";
|
|
18
18
|
import { Label as X } from "./Label.js";
|
|
@@ -29,13 +29,13 @@ import { Textarea as Co } from "./Textarea.js";
|
|
|
29
29
|
import { Toggle as To } from "./Toggle.js";
|
|
30
30
|
import { ToggleGroup as Go, ToggleGroupItem as Ao } from "./ToggleGroup.js";
|
|
31
31
|
import { Tooltip as Lo, TooltipContent as Po, TooltipTrigger as Do } from "./Tooltip.js";
|
|
32
|
-
import { Tray as
|
|
32
|
+
import { Tray as ho } from "./Tray.js";
|
|
33
33
|
import { AnalyzeIcon as ko } from "./Icons/AnalyzeIcon.js";
|
|
34
34
|
import { AnnotationsIcon as yo } from "./Icons/AnnotationsIcon.js";
|
|
35
35
|
import { ApprovedIcon as Ro } from "./Icons/ApprovedIcon.js";
|
|
36
36
|
import { ArrowDownIcon as Uo } from "./Icons/ArrowDownIcon.js";
|
|
37
37
|
import { ArrowUpIcon as Ho } from "./Icons/ArrowUpIcon.js";
|
|
38
|
-
import { CalendarIcon as
|
|
38
|
+
import { CalendarIcon as Ko } from "./Icons/CalendarIcon.js";
|
|
39
39
|
import { CheckCircleIcon as zo } from "./Icons/CheckCircleIcon.js";
|
|
40
40
|
import { CheckSquareIcon as Vo } from "./Icons/CheckSquareIcon.js";
|
|
41
41
|
import { CheckmarkIcon as Xo } from "./Icons/CheckmarkIcon.js";
|
|
@@ -56,51 +56,53 @@ import { EyeClosedIcon as Sr } from "./Icons/EyeClosedIcon.js";
|
|
|
56
56
|
import { EyeClosedIcon2 as Ar } from "./Icons/EyeClosedIcon2.js";
|
|
57
57
|
import { EyeOpenIcon as Lr } from "./Icons/EyeOpenIcon.js";
|
|
58
58
|
import { GoToFirstIcon as Dr } from "./Icons/GoToFirstIcon.js";
|
|
59
|
-
import { GoToLastIcon as
|
|
59
|
+
import { GoToLastIcon as hr } from "./Icons/GoToLastIcon.js";
|
|
60
60
|
import { HarmonicCursorsIcon as kr } from "./Icons/HarmonicCursorsIcon.js";
|
|
61
61
|
import { InfoIcon as yr } from "./Icons/InfoIcon.js";
|
|
62
62
|
import { KeyboardIcon as Rr } from "./Icons/KeyboardIcon.js";
|
|
63
63
|
import { LabelIcon as Ur } from "./Icons/LabelIcon.js";
|
|
64
64
|
import { LassoIcon as Hr } from "./Icons/LassoIcon.js";
|
|
65
|
-
import { LineToolIcon as
|
|
65
|
+
import { LineToolIcon as Kr } from "./Icons/LineToolIcon.js";
|
|
66
66
|
import { LineToolIcon2 as zr } from "./Icons/LineToolIcon2.js";
|
|
67
67
|
import { LiveViewIcon as Vr } from "./Icons/LiveViewIcon.js";
|
|
68
68
|
import { LoaderIcon as Xr } from "./Icons/LoaderIcon.js";
|
|
69
69
|
import { LocationIcon as jr } from "./Icons/LocationIcon.js";
|
|
70
70
|
import { LogoutIcon as Nr } from "./Icons/LogoutIcon.js";
|
|
71
|
-
import {
|
|
72
|
-
import {
|
|
73
|
-
import {
|
|
74
|
-
import {
|
|
75
|
-
import {
|
|
76
|
-
import {
|
|
77
|
-
import {
|
|
78
|
-
import {
|
|
79
|
-
import {
|
|
80
|
-
import {
|
|
81
|
-
import {
|
|
82
|
-
import {
|
|
83
|
-
import {
|
|
84
|
-
import {
|
|
85
|
-
import {
|
|
86
|
-
import {
|
|
87
|
-
import {
|
|
88
|
-
import {
|
|
89
|
-
import {
|
|
90
|
-
import {
|
|
91
|
-
import {
|
|
92
|
-
import {
|
|
93
|
-
import {
|
|
94
|
-
import {
|
|
95
|
-
import {
|
|
96
|
-
import {
|
|
97
|
-
import {
|
|
98
|
-
import {
|
|
99
|
-
import {
|
|
100
|
-
import {
|
|
101
|
-
import {
|
|
102
|
-
import {
|
|
103
|
-
import {
|
|
71
|
+
import { MeasureIcon as _r } from "./Icons/MeasureIcon.js";
|
|
72
|
+
import { MessagesIcon as oe } from "./Icons/MessagesIcon.js";
|
|
73
|
+
import { MetadataIcon as ee } from "./Icons/MetadataIcon.js";
|
|
74
|
+
import { MinusIcon as pe } from "./Icons/MinusIcon.js";
|
|
75
|
+
import { OntologyIcon as me } from "./Icons/OntologyIcon.js";
|
|
76
|
+
import { PanelIconClose as fe } from "./Icons/PanelIconClose.js";
|
|
77
|
+
import { PanelIconOpen as Ie } from "./Icons/PanelIconOpen.js";
|
|
78
|
+
import { PlayIcon as le } from "./Icons/PlayIcon.js";
|
|
79
|
+
import { PlusIcon as ie } from "./Icons/PlusIcon.js";
|
|
80
|
+
import { ResetIcon as de } from "./Icons/ResetIcon.js";
|
|
81
|
+
import { ReviewedIcon as ge } from "./Icons/ReviewedIcon.js";
|
|
82
|
+
import { ScissorsIcon as Se } from "./Icons/ScissorsIcon.js";
|
|
83
|
+
import { SearchIcon as Ae } from "./Icons/SearchIcon.js";
|
|
84
|
+
import { SettingsIcon as Le } from "./Icons/SettingsIcon.js";
|
|
85
|
+
import { SortAscendingIcon as De } from "./Icons/SortAscendingIcon.js";
|
|
86
|
+
import { SortAtoZIcon as he } from "./Icons/SortAtoZIcon.js";
|
|
87
|
+
import { SortDescendingIcon as ke } from "./Icons/SortDescendingIcon.js";
|
|
88
|
+
import { SortZtoAIcon as ye } from "./Icons/SortZtoAIcon.js";
|
|
89
|
+
import { StackIcon as Re } from "./Icons/StackIcon.js";
|
|
90
|
+
import { StarIcon as Ue } from "./Icons/StarIcon.js";
|
|
91
|
+
import { TrashIcon as He } from "./Icons/TrashIcon.js";
|
|
92
|
+
import { UndoIcon as Ke } from "./Icons/UndoIcon.js";
|
|
93
|
+
import { User2Icon as ze } from "./Icons/User2Icon.js";
|
|
94
|
+
import { UserIcon as Ve } from "./Icons/UserIcon.js";
|
|
95
|
+
import { WarningIcon as Xe } from "./Icons/WarningIcon.js";
|
|
96
|
+
import { ZoomAllIcon as je } from "./Icons/ZoomAllIcon.js";
|
|
97
|
+
import { ZoomXIcon as Ne } from "./Icons/ZoomXIcon.js";
|
|
98
|
+
import { ZoomYIcon as _e } from "./Icons/ZoomYIcon.js";
|
|
99
|
+
import { PanelLeftOpenIcon as ot } from "./IconsAnimated/PanelLeftOpenIcon.js";
|
|
100
|
+
import { PanelLeftCloseIcon as et } from "./IconsAnimated/PanelLeftCloseIcon.js";
|
|
101
|
+
import { default as pt, SvgIdContext as nt } from "./Icons/IconBase.js";
|
|
102
|
+
import { useAccordionAutoScroll as xt } from "./hooks/useAccordionAutoScroll.js";
|
|
103
|
+
import { useControllableState as ct } from "./hooks/useControllableState.js";
|
|
104
|
+
import { cn as at } from "./utils/twUtils.js";
|
|
105
|
+
import { SpectralProvider as ut } from "./SpectralProvider.js";
|
|
104
106
|
export {
|
|
105
107
|
e as Accordion,
|
|
106
108
|
p as Alert,
|
|
@@ -116,7 +118,7 @@ export {
|
|
|
116
118
|
u as ButtonGroupItem,
|
|
117
119
|
i as ButtonGroupSeparator,
|
|
118
120
|
d as ButtonIcon,
|
|
119
|
-
|
|
121
|
+
Ko as CalendarIcon,
|
|
120
122
|
zo as CheckCircleIcon,
|
|
121
123
|
Vo as CheckSquareIcon,
|
|
122
124
|
g as Checkbox,
|
|
@@ -142,12 +144,12 @@ export {
|
|
|
142
144
|
Ar as EyeClosedIcon2,
|
|
143
145
|
Lr as EyeOpenIcon,
|
|
144
146
|
Dr as GoToFirstIcon,
|
|
145
|
-
|
|
147
|
+
hr as GoToLastIcon,
|
|
146
148
|
kr as HarmonicCursorsIcon,
|
|
147
|
-
|
|
148
|
-
|
|
149
|
+
h as HoverCard,
|
|
150
|
+
B as HoverCardContent,
|
|
149
151
|
k as HoverCardTrigger,
|
|
150
|
-
|
|
152
|
+
pt as IconBase,
|
|
151
153
|
yr as InfoIcon,
|
|
152
154
|
y as Input,
|
|
153
155
|
R as InputGroup,
|
|
@@ -155,7 +157,7 @@ export {
|
|
|
155
157
|
U as InputGroupButton,
|
|
156
158
|
Z as InputGroupInput,
|
|
157
159
|
H as InputGroupText,
|
|
158
|
-
|
|
160
|
+
M as InputGroupTextarea,
|
|
159
161
|
q as InputOTP,
|
|
160
162
|
F as Kbd,
|
|
161
163
|
V as KbdGroup,
|
|
@@ -163,22 +165,23 @@ export {
|
|
|
163
165
|
X as Label,
|
|
164
166
|
Ur as LabelIcon,
|
|
165
167
|
Hr as LassoIcon,
|
|
166
|
-
|
|
168
|
+
Kr as LineToolIcon,
|
|
167
169
|
zr as LineToolIcon2,
|
|
168
170
|
Vr as LiveViewIcon,
|
|
169
171
|
Xr as LoaderIcon,
|
|
170
172
|
jr as LocationIcon,
|
|
171
173
|
Nr as LogoutIcon,
|
|
172
|
-
_r as
|
|
173
|
-
oe as
|
|
174
|
-
ee as
|
|
175
|
-
pe as
|
|
176
|
-
me as
|
|
177
|
-
fe as
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
le as
|
|
174
|
+
_r as MeasureIcon,
|
|
175
|
+
oe as MessagesIcon,
|
|
176
|
+
ee as MetadataIcon,
|
|
177
|
+
pe as MinusIcon,
|
|
178
|
+
me as OntologyIcon,
|
|
179
|
+
fe as PanelIconClose,
|
|
180
|
+
Ie as PanelIconOpen,
|
|
181
|
+
et as PanelLeftCloseIcon,
|
|
182
|
+
ot as PanelLeftOpenIcon,
|
|
183
|
+
le as PlayIcon,
|
|
184
|
+
ie as PlusIcon,
|
|
182
185
|
j as Popover,
|
|
183
186
|
J as PopoverContent,
|
|
184
187
|
N as PopoverTrigger,
|
|
@@ -186,22 +189,23 @@ export {
|
|
|
186
189
|
$ as RadioButtonGroupItem,
|
|
187
190
|
ro as RadioGroup,
|
|
188
191
|
eo as RadioGroupItem,
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
+
de as ResetIcon,
|
|
193
|
+
ge as ReviewedIcon,
|
|
194
|
+
Se as ScissorsIcon,
|
|
195
|
+
Ae as SearchIcon,
|
|
192
196
|
po as Select,
|
|
193
197
|
mo as Separator,
|
|
194
|
-
|
|
198
|
+
Le as SettingsIcon,
|
|
195
199
|
fo as Skeleton,
|
|
196
200
|
Io as Slider,
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
201
|
+
De as SortAscendingIcon,
|
|
202
|
+
he as SortAtoZIcon,
|
|
203
|
+
ke as SortDescendingIcon,
|
|
204
|
+
ye as SortZtoAIcon,
|
|
205
|
+
ut as SpectralProvider,
|
|
206
|
+
Re as StackIcon,
|
|
207
|
+
Ue as StarIcon,
|
|
208
|
+
nt as SvgIdContext,
|
|
205
209
|
lo as Switch,
|
|
206
210
|
io as Tabs,
|
|
207
211
|
Co as Textarea,
|
|
@@ -211,16 +215,16 @@ export {
|
|
|
211
215
|
Lo as Tooltip,
|
|
212
216
|
Po as TooltipContent,
|
|
213
217
|
Do as TooltipTrigger,
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
218
|
+
He as TrashIcon,
|
|
219
|
+
ho as Tray,
|
|
220
|
+
Ke as UndoIcon,
|
|
221
|
+
ze as User2Icon,
|
|
222
|
+
Ve as UserIcon,
|
|
223
|
+
Xe as WarningIcon,
|
|
224
|
+
je as ZoomAllIcon,
|
|
225
|
+
Ne as ZoomXIcon,
|
|
226
|
+
_e as ZoomYIcon,
|
|
227
|
+
at as cn,
|
|
228
|
+
xt as useAccordionAutoScroll,
|
|
229
|
+
ct as useControllableState
|
|
226
230
|
};
|
package/dist/Accordion.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import "./styles/main.css";
|
|
3
|
-
import { jsx as
|
|
3
|
+
import { jsx as a, jsxs as j } from "react/jsx-runtime";
|
|
4
4
|
import "./Icons/AnalyzeIcon.js";
|
|
5
5
|
import "./Icons/AnnotationsIcon.js";
|
|
6
6
|
import "./Icons/ApprovedIcon.js";
|
|
@@ -39,6 +39,7 @@ import "./Icons/LiveViewIcon.js";
|
|
|
39
39
|
import "./Icons/LoaderIcon.js";
|
|
40
40
|
import "./Icons/LocationIcon.js";
|
|
41
41
|
import "./Icons/LogoutIcon.js";
|
|
42
|
+
import "./Icons/MeasureIcon.js";
|
|
42
43
|
import "./Icons/MessagesIcon.js";
|
|
43
44
|
import "./Icons/MetadataIcon.js";
|
|
44
45
|
import "./Icons/MinusIcon.js";
|
|
@@ -50,6 +51,7 @@ import "./Icons/PlusIcon.js";
|
|
|
50
51
|
import "./Icons/ResetIcon.js";
|
|
51
52
|
import "./Icons/ReviewedIcon.js";
|
|
52
53
|
import "./Icons/ScissorsIcon.js";
|
|
54
|
+
import "./Icons/SearchIcon.js";
|
|
53
55
|
import "./Icons/SettingsIcon.js";
|
|
54
56
|
import "./Icons/SortAscendingIcon.js";
|
|
55
57
|
import "./Icons/SortAtoZIcon.js";
|
|
@@ -78,17 +80,17 @@ var _ = "Collapsible", [Ne, q] = F(_), [Re, V] = Ne(_), J = f.forwardRef(
|
|
|
78
80
|
const {
|
|
79
81
|
__scopeCollapsible: o,
|
|
80
82
|
open: t,
|
|
81
|
-
defaultOpen:
|
|
83
|
+
defaultOpen: i,
|
|
82
84
|
disabled: r,
|
|
83
85
|
onOpenChange: c,
|
|
84
86
|
...l
|
|
85
87
|
} = e, [s, p] = M({
|
|
86
88
|
prop: t,
|
|
87
|
-
defaultProp:
|
|
89
|
+
defaultProp: i ?? !1,
|
|
88
90
|
onChange: c,
|
|
89
91
|
caller: _
|
|
90
92
|
});
|
|
91
|
-
return /* @__PURE__ */
|
|
93
|
+
return /* @__PURE__ */ a(
|
|
92
94
|
Re,
|
|
93
95
|
{
|
|
94
96
|
scope: o,
|
|
@@ -96,7 +98,7 @@ var _ = "Collapsible", [Ne, q] = F(_), [Re, V] = Ne(_), J = f.forwardRef(
|
|
|
96
98
|
contentId: U(),
|
|
97
99
|
open: s,
|
|
98
100
|
onOpenToggle: f.useCallback(() => p((m) => !m), [p]),
|
|
99
|
-
children: /* @__PURE__ */
|
|
101
|
+
children: /* @__PURE__ */ a(
|
|
100
102
|
I.div,
|
|
101
103
|
{
|
|
102
104
|
"data-state": H(s),
|
|
@@ -112,19 +114,19 @@ var _ = "Collapsible", [Ne, q] = F(_), [Re, V] = Ne(_), J = f.forwardRef(
|
|
|
112
114
|
J.displayName = _;
|
|
113
115
|
var Y = "CollapsibleTrigger", Q = f.forwardRef(
|
|
114
116
|
(e, n) => {
|
|
115
|
-
const { __scopeCollapsible: o, ...t } = e,
|
|
116
|
-
return /* @__PURE__ */
|
|
117
|
+
const { __scopeCollapsible: o, ...t } = e, i = V(Y, o);
|
|
118
|
+
return /* @__PURE__ */ a(
|
|
117
119
|
I.button,
|
|
118
120
|
{
|
|
119
121
|
type: "button",
|
|
120
|
-
"aria-controls":
|
|
121
|
-
"aria-expanded":
|
|
122
|
-
"data-state": H(
|
|
123
|
-
"data-disabled":
|
|
124
|
-
disabled:
|
|
122
|
+
"aria-controls": i.contentId,
|
|
123
|
+
"aria-expanded": i.open || !1,
|
|
124
|
+
"data-state": H(i.open),
|
|
125
|
+
"data-disabled": i.disabled ? "" : void 0,
|
|
126
|
+
disabled: i.disabled,
|
|
125
127
|
...t,
|
|
126
128
|
ref: n,
|
|
127
|
-
onClick: z(e.onClick,
|
|
129
|
+
onClick: z(e.onClick, i.onOpenToggle)
|
|
128
130
|
}
|
|
129
131
|
);
|
|
130
132
|
}
|
|
@@ -132,13 +134,13 @@ var Y = "CollapsibleTrigger", Q = f.forwardRef(
|
|
|
132
134
|
Q.displayName = Y;
|
|
133
135
|
var $ = "CollapsibleContent", W = f.forwardRef(
|
|
134
136
|
(e, n) => {
|
|
135
|
-
const { forceMount: o, ...t } = e,
|
|
136
|
-
return /* @__PURE__ */
|
|
137
|
+
const { forceMount: o, ...t } = e, i = V($, e.__scopeCollapsible);
|
|
138
|
+
return /* @__PURE__ */ a(Ie, { present: o || i.open, children: ({ present: r }) => /* @__PURE__ */ a(we, { ...t, ref: n, present: r }) });
|
|
137
139
|
}
|
|
138
140
|
);
|
|
139
141
|
W.displayName = $;
|
|
140
142
|
var we = f.forwardRef((e, n) => {
|
|
141
|
-
const { __scopeCollapsible: o, present: t, children:
|
|
143
|
+
const { __scopeCollapsible: o, present: t, children: i, ...r } = e, c = V($, o), [l, s] = f.useState(t), p = f.useRef(null), m = B(n, p), v = f.useRef(0), x = v.current, g = f.useRef(0), N = g.current, b = c.open || l, A = f.useRef(b), h = f.useRef(void 0);
|
|
142
144
|
return f.useEffect(() => {
|
|
143
145
|
const d = requestAnimationFrame(() => A.current = !1);
|
|
144
146
|
return () => cancelAnimationFrame(d);
|
|
@@ -152,7 +154,7 @@ var we = f.forwardRef((e, n) => {
|
|
|
152
154
|
const y = d.getBoundingClientRect();
|
|
153
155
|
v.current = y.height, g.current = y.width, A.current || (d.style.transitionDuration = h.current.transitionDuration, d.style.animationName = h.current.animationName), s(t);
|
|
154
156
|
}
|
|
155
|
-
}, [c.open, t]), /* @__PURE__ */
|
|
157
|
+
}, [c.open, t]), /* @__PURE__ */ a(
|
|
156
158
|
I.div,
|
|
157
159
|
{
|
|
158
160
|
"data-state": H(c.open),
|
|
@@ -166,7 +168,7 @@ var we = f.forwardRef((e, n) => {
|
|
|
166
168
|
"--radix-collapsible-content-width": N ? `${N}px` : void 0,
|
|
167
169
|
...e.style
|
|
168
170
|
},
|
|
169
|
-
children: b &&
|
|
171
|
+
children: b && i
|
|
170
172
|
}
|
|
171
173
|
);
|
|
172
174
|
});
|
|
@@ -178,8 +180,8 @@ var _e = J, Pe = Q, Ee = W, C = "Accordion", Se = ["Home", "End", "ArrowDown", "
|
|
|
178
180
|
q
|
|
179
181
|
]), G = q(), X = u.forwardRef(
|
|
180
182
|
(e, n) => {
|
|
181
|
-
const { type: o, ...t } = e,
|
|
182
|
-
return /* @__PURE__ */
|
|
183
|
+
const { type: o, ...t } = e, i = t, r = t;
|
|
184
|
+
return /* @__PURE__ */ a(L.Provider, { scope: e.__scopeAccordion, children: o === "multiple" ? /* @__PURE__ */ a(Ve, { ...r, ref: n }) : /* @__PURE__ */ a(Me, { ...i, ref: n }) });
|
|
183
185
|
}
|
|
184
186
|
);
|
|
185
187
|
X.displayName = C;
|
|
@@ -191,24 +193,24 @@ var [Z, ke] = P(C), [ee, De] = P(
|
|
|
191
193
|
const {
|
|
192
194
|
value: o,
|
|
193
195
|
defaultValue: t,
|
|
194
|
-
onValueChange:
|
|
196
|
+
onValueChange: i = () => {
|
|
195
197
|
},
|
|
196
198
|
collapsible: r = !1,
|
|
197
199
|
...c
|
|
198
200
|
} = e, [l, s] = M({
|
|
199
201
|
prop: o,
|
|
200
202
|
defaultProp: t ?? "",
|
|
201
|
-
onChange:
|
|
203
|
+
onChange: i,
|
|
202
204
|
caller: C
|
|
203
205
|
});
|
|
204
|
-
return /* @__PURE__ */
|
|
206
|
+
return /* @__PURE__ */ a(
|
|
205
207
|
Z,
|
|
206
208
|
{
|
|
207
209
|
scope: e.__scopeAccordion,
|
|
208
210
|
value: u.useMemo(() => l ? [l] : [], [l]),
|
|
209
211
|
onItemOpen: s,
|
|
210
212
|
onItemClose: u.useCallback(() => r && s(""), [r, s]),
|
|
211
|
-
children: /* @__PURE__ */
|
|
213
|
+
children: /* @__PURE__ */ a(ee, { scope: e.__scopeAccordion, collapsible: r, children: /* @__PURE__ */ a(oe, { ...c, ref: n }) })
|
|
212
214
|
}
|
|
213
215
|
);
|
|
214
216
|
}
|
|
@@ -216,13 +218,13 @@ var [Z, ke] = P(C), [ee, De] = P(
|
|
|
216
218
|
const {
|
|
217
219
|
value: o,
|
|
218
220
|
defaultValue: t,
|
|
219
|
-
onValueChange:
|
|
221
|
+
onValueChange: i = () => {
|
|
220
222
|
},
|
|
221
223
|
...r
|
|
222
224
|
} = e, [c, l] = M({
|
|
223
225
|
prop: o,
|
|
224
226
|
defaultProp: t ?? [],
|
|
225
|
-
onChange:
|
|
227
|
+
onChange: i,
|
|
226
228
|
caller: C
|
|
227
229
|
}), s = u.useCallback(
|
|
228
230
|
(m) => l((v = []) => [...v, m]),
|
|
@@ -231,19 +233,19 @@ var [Z, ke] = P(C), [ee, De] = P(
|
|
|
231
233
|
(m) => l((v = []) => v.filter((x) => x !== m)),
|
|
232
234
|
[l]
|
|
233
235
|
);
|
|
234
|
-
return /* @__PURE__ */
|
|
236
|
+
return /* @__PURE__ */ a(
|
|
235
237
|
Z,
|
|
236
238
|
{
|
|
237
239
|
scope: e.__scopeAccordion,
|
|
238
240
|
value: c,
|
|
239
241
|
onItemOpen: s,
|
|
240
242
|
onItemClose: p,
|
|
241
|
-
children: /* @__PURE__ */
|
|
243
|
+
children: /* @__PURE__ */ a(ee, { scope: e.__scopeAccordion, collapsible: !0, children: /* @__PURE__ */ a(oe, { ...r, ref: n }) })
|
|
242
244
|
}
|
|
243
245
|
);
|
|
244
246
|
}), [$e, E] = P(C), oe = u.forwardRef(
|
|
245
247
|
(e, n) => {
|
|
246
|
-
const { __scopeAccordion: o, disabled: t, dir:
|
|
248
|
+
const { __scopeAccordion: o, disabled: t, dir: i, orientation: r = "vertical", ...c } = e, l = u.useRef(null), s = B(l, n), p = Oe(o), v = ye(i) === "ltr", x = z(e.onKeyDown, (g) => {
|
|
247
249
|
if (!Se.includes(g.key)) return;
|
|
248
250
|
const N = g.target, b = p().filter((k) => !k.ref.current?.disabled), A = b.findIndex((k) => k.ref.current === N), h = b.length;
|
|
249
251
|
if (A === -1) return;
|
|
@@ -277,14 +279,14 @@ var [Z, ke] = P(C), [ee, De] = P(
|
|
|
277
279
|
const de = d % h;
|
|
278
280
|
b[de].ref.current?.focus();
|
|
279
281
|
});
|
|
280
|
-
return /* @__PURE__ */
|
|
282
|
+
return /* @__PURE__ */ a(
|
|
281
283
|
$e,
|
|
282
284
|
{
|
|
283
285
|
scope: o,
|
|
284
286
|
disabled: t,
|
|
285
|
-
direction:
|
|
287
|
+
direction: i,
|
|
286
288
|
orientation: r,
|
|
287
|
-
children: /* @__PURE__ */
|
|
289
|
+
children: /* @__PURE__ */ a(L.Slot, { scope: o, children: /* @__PURE__ */ a(
|
|
288
290
|
I.div,
|
|
289
291
|
{
|
|
290
292
|
...c,
|
|
@@ -298,21 +300,21 @@ var [Z, ke] = P(C), [ee, De] = P(
|
|
|
298
300
|
}
|
|
299
301
|
), R = "AccordionItem", [He, K] = P(R), te = u.forwardRef(
|
|
300
302
|
(e, n) => {
|
|
301
|
-
const { __scopeAccordion: o, value: t, ...
|
|
302
|
-
return /* @__PURE__ */
|
|
303
|
+
const { __scopeAccordion: o, value: t, ...i } = e, r = E(R, o), c = ke(R, o), l = G(o), s = U(), p = t && c.value.includes(t) || !1, m = r.disabled || e.disabled;
|
|
304
|
+
return /* @__PURE__ */ a(
|
|
303
305
|
He,
|
|
304
306
|
{
|
|
305
307
|
scope: o,
|
|
306
308
|
open: p,
|
|
307
309
|
disabled: m,
|
|
308
310
|
triggerId: s,
|
|
309
|
-
children: /* @__PURE__ */
|
|
311
|
+
children: /* @__PURE__ */ a(
|
|
310
312
|
_e,
|
|
311
313
|
{
|
|
312
314
|
"data-orientation": r.orientation,
|
|
313
315
|
"data-state": le(p),
|
|
314
316
|
...l,
|
|
315
|
-
...
|
|
317
|
+
...i,
|
|
316
318
|
ref: n,
|
|
317
319
|
disabled: m,
|
|
318
320
|
open: p,
|
|
@@ -328,11 +330,11 @@ var [Z, ke] = P(C), [ee, De] = P(
|
|
|
328
330
|
te.displayName = R;
|
|
329
331
|
var re = "AccordionHeader", ne = u.forwardRef(
|
|
330
332
|
(e, n) => {
|
|
331
|
-
const { __scopeAccordion: o, ...t } = e,
|
|
332
|
-
return /* @__PURE__ */
|
|
333
|
+
const { __scopeAccordion: o, ...t } = e, i = E(C, o), r = K(re, o);
|
|
334
|
+
return /* @__PURE__ */ a(
|
|
333
335
|
I.h3,
|
|
334
336
|
{
|
|
335
|
-
"data-orientation":
|
|
337
|
+
"data-orientation": i.orientation,
|
|
336
338
|
"data-state": le(r.open),
|
|
337
339
|
"data-disabled": r.disabled ? "" : void 0,
|
|
338
340
|
...t,
|
|
@@ -342,14 +344,14 @@ var re = "AccordionHeader", ne = u.forwardRef(
|
|
|
342
344
|
}
|
|
343
345
|
);
|
|
344
346
|
ne.displayName = re;
|
|
345
|
-
var D = "AccordionTrigger",
|
|
347
|
+
var D = "AccordionTrigger", ie = u.forwardRef(
|
|
346
348
|
(e, n) => {
|
|
347
|
-
const { __scopeAccordion: o, ...t } = e,
|
|
348
|
-
return /* @__PURE__ */
|
|
349
|
+
const { __scopeAccordion: o, ...t } = e, i = E(C, o), r = K(D, o), c = De(D, o), l = G(o);
|
|
350
|
+
return /* @__PURE__ */ a(L.ItemSlot, { scope: o, children: /* @__PURE__ */ a(
|
|
349
351
|
Pe,
|
|
350
352
|
{
|
|
351
353
|
"aria-disabled": r.open && !c.collapsible || void 0,
|
|
352
|
-
"data-orientation":
|
|
354
|
+
"data-orientation": i.orientation,
|
|
353
355
|
id: r.triggerId,
|
|
354
356
|
...l,
|
|
355
357
|
...t,
|
|
@@ -358,16 +360,16 @@ var D = "AccordionTrigger", ae = u.forwardRef(
|
|
|
358
360
|
) });
|
|
359
361
|
}
|
|
360
362
|
);
|
|
361
|
-
|
|
362
|
-
var
|
|
363
|
+
ie.displayName = D;
|
|
364
|
+
var ae = "AccordionContent", ce = u.forwardRef(
|
|
363
365
|
(e, n) => {
|
|
364
|
-
const { __scopeAccordion: o, ...t } = e,
|
|
365
|
-
return /* @__PURE__ */
|
|
366
|
+
const { __scopeAccordion: o, ...t } = e, i = E(C, o), r = K(ae, o), c = G(o);
|
|
367
|
+
return /* @__PURE__ */ a(
|
|
366
368
|
Ee,
|
|
367
369
|
{
|
|
368
370
|
role: "region",
|
|
369
371
|
"aria-labelledby": r.triggerId,
|
|
370
|
-
"data-orientation":
|
|
372
|
+
"data-orientation": i.orientation,
|
|
371
373
|
...c,
|
|
372
374
|
...t,
|
|
373
375
|
ref: n,
|
|
@@ -380,11 +382,11 @@ var ie = "AccordionContent", ce = u.forwardRef(
|
|
|
380
382
|
);
|
|
381
383
|
}
|
|
382
384
|
);
|
|
383
|
-
ce.displayName =
|
|
385
|
+
ce.displayName = ae;
|
|
384
386
|
function le(e) {
|
|
385
387
|
return e ? "open" : "closed";
|
|
386
388
|
}
|
|
387
|
-
var Le = X, Ge = te, Ke = ne, je =
|
|
389
|
+
var Le = X, Ge = te, Ke = ne, je = ie, Fe = ce;
|
|
388
390
|
const ze = {
|
|
389
391
|
default: "shadow-none",
|
|
390
392
|
contained: "rounded-md border border-level-four",
|
|
@@ -399,21 +401,21 @@ const ze = {
|
|
|
399
401
|
className: o,
|
|
400
402
|
...t
|
|
401
403
|
}) => {
|
|
402
|
-
const { autoScroll:
|
|
403
|
-
autoScroll:
|
|
404
|
+
const { autoScroll: i = "never", scrollPadding: r = -20, children: c, ...l } = t, s = {
|
|
405
|
+
autoScroll: i,
|
|
404
406
|
scrollPadding: r
|
|
405
407
|
}, p = {
|
|
406
408
|
...l,
|
|
407
409
|
ref: e
|
|
408
410
|
};
|
|
409
|
-
return /* @__PURE__ */
|
|
411
|
+
return /* @__PURE__ */ a(se.Provider, { value: { variant: n }, children: /* @__PURE__ */ a(
|
|
410
412
|
Le,
|
|
411
413
|
{
|
|
412
414
|
...p,
|
|
413
415
|
"data-slot": "accordion",
|
|
414
416
|
"data-testid": "spectral-accordion",
|
|
415
417
|
"data-scroll-options": JSON.stringify(s),
|
|
416
|
-
"data-auto-scroll":
|
|
418
|
+
"data-auto-scroll": i,
|
|
417
419
|
"data-scroll-padding": r,
|
|
418
420
|
...t.type === "single" ? { collapsible: !0 } : {},
|
|
419
421
|
className: w("accordion-wrapper flex flex-col", ze[n], o),
|
|
@@ -428,7 +430,7 @@ const qe = ({
|
|
|
428
430
|
...o
|
|
429
431
|
}) => {
|
|
430
432
|
const { variant: t = "default" } = ge(se);
|
|
431
|
-
return /* @__PURE__ */
|
|
433
|
+
return /* @__PURE__ */ a(Ge, { ref: e, "data-slot": "accordion-item", "data-testid": "spectral-accordion-item", className: w("w-full", Be[t], n), ...o });
|
|
432
434
|
};
|
|
433
435
|
qe.displayName = "AccordionItem";
|
|
434
436
|
const Je = ({
|
|
@@ -436,7 +438,7 @@ const Je = ({
|
|
|
436
438
|
className: n,
|
|
437
439
|
title: o,
|
|
438
440
|
subtitle: t,
|
|
439
|
-
...
|
|
441
|
+
...i
|
|
440
442
|
}) => {
|
|
441
443
|
const r = be(null), c = me(r), l = Ae(
|
|
442
444
|
(s) => {
|
|
@@ -444,7 +446,7 @@ const Je = ({
|
|
|
444
446
|
},
|
|
445
447
|
[e]
|
|
446
448
|
);
|
|
447
|
-
return /* @__PURE__ */
|
|
449
|
+
return /* @__PURE__ */ a(Ke, { className: "m-0 flex", children: /* @__PURE__ */ j(
|
|
448
450
|
je,
|
|
449
451
|
{
|
|
450
452
|
ref: l,
|
|
@@ -452,13 +454,13 @@ const Je = ({
|
|
|
452
454
|
"data-testid": "spectral-accordion-trigger",
|
|
453
455
|
className: w("text-text-primary flex flex-1 items-center justify-between text-sm font-normal transition-all hover:no-underline", "disabled:cursor-not-allowed [&[data-state=open]>svg]:rotate-180", n),
|
|
454
456
|
onClick: c,
|
|
455
|
-
...
|
|
457
|
+
...i,
|
|
456
458
|
children: [
|
|
457
459
|
/* @__PURE__ */ j("div", { className: "flex w-full flex-col space-y-0.5 text-start", children: [
|
|
458
|
-
/* @__PURE__ */
|
|
459
|
-
t && /* @__PURE__ */
|
|
460
|
+
/* @__PURE__ */ a("div", { className: "text-text-primary text-base font-medium", children: o }),
|
|
461
|
+
t && /* @__PURE__ */ a("div", { className: "text-text-secondary text-sm font-normal", children: t })
|
|
460
462
|
] }),
|
|
461
|
-
/* @__PURE__ */
|
|
463
|
+
/* @__PURE__ */ a(pe, { className: "shrink-0 transition-transform duration-200" })
|
|
462
464
|
]
|
|
463
465
|
}
|
|
464
466
|
) });
|
|
@@ -469,7 +471,7 @@ const Ye = ({
|
|
|
469
471
|
className: n,
|
|
470
472
|
children: o,
|
|
471
473
|
...t
|
|
472
|
-
}) => /* @__PURE__ */
|
|
474
|
+
}) => /* @__PURE__ */ a(
|
|
473
475
|
Fe,
|
|
474
476
|
{
|
|
475
477
|
ref: e,
|
|
@@ -477,7 +479,7 @@ const Ye = ({
|
|
|
477
479
|
"data-testid": "spectral-accordion-content",
|
|
478
480
|
className: w("motion-safe:data-[state=closed]:animate-accordion-up motion-safe:data-[state=open]:animate-accordion-down overflow-hidden pt-4 text-sm", n),
|
|
479
481
|
...t,
|
|
480
|
-
children: /* @__PURE__ */
|
|
482
|
+
children: /* @__PURE__ */ a("div", { className: "px-1 pt-0 pb-4", "data-slot": "accordion-content-inner", children: o })
|
|
481
483
|
}
|
|
482
484
|
);
|
|
483
485
|
Ye.displayName = "AccordionContent";
|