@spear-ai/spectral 1.4.5 → 1.4.7
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/AlertBase.d.ts +5 -3
- package/dist/Alert/AlertBase.js +31 -31
- package/dist/Alert.js +14 -12
- package/dist/Avatar.js +14 -14
- package/dist/Button.js +1 -7
- package/dist/ButtonGroup/ButtonGroupButton.js +1 -1
- package/dist/ButtonIcon.js +2 -0
- package/dist/Checkbox.js +2 -0
- package/dist/Dialog.js +11 -11
- package/dist/Drawer.d.ts +6 -3
- package/dist/Drawer.js +10 -10
- 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 +5 -2
- package/dist/MultiSelect/MultiSelectBase.js +39 -43
- package/dist/RadioGroup.js +1 -1
- package/dist/Select.js +2 -0
- package/dist/Textarea.js +2 -0
- package/dist/Toggle/ToggleBase.d.ts +1 -1
- package/dist/Toggle/ToggleBase.js +36 -18
- package/dist/Toggle.js +10 -10
- package/dist/Tooltip.d.ts +7 -2
- package/dist/Tooltip.js +156 -143
- package/dist/Tray.js +2 -0
- package/dist/{createLucideIcon-B_8CJpcQ.js → createLucideIcon-D4r5Phnh.js} +0 -24
- package/dist/main.js +0 -36
- package/dist/primitives/select.js +18 -16
- package/dist/styles/base-colors.css +9 -9
- package/dist/styles/main.css +1 -1
- package/package.json +20 -20
package/dist/.js
CHANGED
|
@@ -8,10 +8,10 @@ import { ButtonIcon as s } from "./ButtonIcon.js";
|
|
|
8
8
|
import { Card as g, CardContent as T, CardHeader as S, CardHeaderEndSlot as G, CardTitle as v } from "./Card.js";
|
|
9
9
|
import { Checkbox as B } from "./Checkbox.js";
|
|
10
10
|
import { Dialog as h } from "./Dialog.js";
|
|
11
|
-
import { Drawer as
|
|
12
|
-
import { HoverCard as
|
|
13
|
-
import { Input as
|
|
14
|
-
import { InputGroup as O, InputGroupAddon as
|
|
11
|
+
import { Drawer as P } from "./Drawer.js";
|
|
12
|
+
import { HoverCard as w, HoverCardContent as b, HoverCardTrigger as y } from "./HoverCard.js";
|
|
13
|
+
import { Input as H } from "./Input.js";
|
|
14
|
+
import { InputGroup as O, InputGroupAddon as U, InputGroupButton as M, InputGroupInput as Z, InputGroupText as q, InputGroupTextarea as z } from "./InputGroup.js";
|
|
15
15
|
import { InputOTP as V } from "./InputOTP.js";
|
|
16
16
|
import { Label as X } from "./Label.js";
|
|
17
17
|
import { Popover as j, PopoverContent as J, PopoverTrigger as K } from "./Popover.js";
|
|
@@ -27,75 +27,79 @@ import { Textarea as so } from "./Textarea.js";
|
|
|
27
27
|
import { Toggle as go } from "./Toggle.js";
|
|
28
28
|
import { ToggleGroup as So, ToggleGroupItem as Go } from "./ToggleGroup.js";
|
|
29
29
|
import { Tooltip as Ao, TooltipContent as Bo, TooltipTrigger as Lo } from "./Tooltip.js";
|
|
30
|
-
import { Tray as
|
|
31
|
-
import { AnalyzeIcon as
|
|
32
|
-
import { AnnotationsIcon as
|
|
33
|
-
import { ApprovedIcon as
|
|
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 {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
import {
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
65
|
-
import {
|
|
66
|
-
import {
|
|
67
|
-
import {
|
|
68
|
-
import {
|
|
69
|
-
import {
|
|
70
|
-
import {
|
|
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 {
|
|
30
|
+
import { Tray as Do } from "./Tray.js";
|
|
31
|
+
import { AnalyzeIcon as ko } from "./Icons/AnalyzeIcon.js";
|
|
32
|
+
import { AnnotationsIcon as bo } from "./Icons/AnnotationsIcon.js";
|
|
33
|
+
import { ApprovedIcon as Eo } from "./Icons/ApprovedIcon.js";
|
|
34
|
+
import { ArrowDownIcon as Ro } from "./Icons/ArrowDownIcon.js";
|
|
35
|
+
import { ArrowUpIcon as Uo } from "./Icons/ArrowUpIcon.js";
|
|
36
|
+
import { CalendarIcon as Zo } from "./Icons/CalendarIcon.js";
|
|
37
|
+
import { CheckCircleIcon as zo } from "./Icons/CheckCircleIcon.js";
|
|
38
|
+
import { CheckSquareIcon as Vo } from "./Icons/CheckSquareIcon.js";
|
|
39
|
+
import { CheckmarkIcon as Xo } from "./Icons/CheckmarkIcon.js";
|
|
40
|
+
import { ChevronDownIcon as jo } from "./Icons/ChevronDownIcon.js";
|
|
41
|
+
import { ChevronUpIcon as Ko } from "./Icons/ChevronUpIcon.js";
|
|
42
|
+
import { ClockIcon as Qo } from "./Icons/ClockIcon.js";
|
|
43
|
+
import { CloseCircleIcon as $o } from "./Icons/CloseCircleIcon.js";
|
|
44
|
+
import { CloseIcon as rr } from "./Icons/CloseIcon.js";
|
|
45
|
+
import { DashboardIcon as tr } from "./Icons/DashboardIcon.js";
|
|
46
|
+
import { DatabaseIcon as nr } from "./Icons/DatabaseIcon.js";
|
|
47
|
+
import { DeleteIcon as xr } from "./Icons/DeleteIcon.js";
|
|
48
|
+
import { DurationIcon as cr } from "./Icons/DurationIcon.js";
|
|
49
|
+
import { EmailIcon as ar } from "./Icons/EmailIcon.js";
|
|
50
|
+
import { EraserIcon as ur } from "./Icons/EraserIcon.js";
|
|
51
|
+
import { ErrorIcon as dr } from "./Icons/ErrorIcon.js";
|
|
52
|
+
import { EyeClosedIcon as Cr } from "./Icons/EyeClosedIcon.js";
|
|
53
|
+
import { EyeClosedIcon2 as Tr } from "./Icons/EyeClosedIcon2.js";
|
|
54
|
+
import { EyeOpenIcon as Gr } from "./Icons/EyeOpenIcon.js";
|
|
55
|
+
import { GoToFirstIcon as Ar } from "./Icons/GoToFirstIcon.js";
|
|
56
|
+
import { GoToLastIcon as Lr } from "./Icons/GoToLastIcon.js";
|
|
57
|
+
import { HarmonicCursorsIcon as Dr } from "./Icons/HarmonicCursorsIcon.js";
|
|
58
|
+
import { InfoIcon as kr } from "./Icons/InfoIcon.js";
|
|
59
|
+
import { LabelIcon as br } from "./Icons/LabelIcon.js";
|
|
60
|
+
import { LassoIcon as Er } from "./Icons/LassoIcon.js";
|
|
61
|
+
import { LineToolIcon as Rr } from "./Icons/LineToolIcon.js";
|
|
62
|
+
import { LineToolIcon2 as Ur } from "./Icons/LineToolIcon2.js";
|
|
63
|
+
import { LiveViewIcon as Zr } from "./Icons/LiveViewIcon.js";
|
|
64
|
+
import { LoaderIcon as zr } from "./Icons/LoaderIcon.js";
|
|
65
|
+
import { LocationIcon as Vr } from "./Icons/LocationIcon.js";
|
|
66
|
+
import { LogoutIcon as Xr } from "./Icons/LogoutIcon.js";
|
|
67
|
+
import { MessagesIcon as jr } from "./Icons/MessagesIcon.js";
|
|
68
|
+
import { MetadataIcon as Kr } from "./Icons/MetadataIcon.js";
|
|
69
|
+
import { MinusIcon as Qr } from "./Icons/MinusIcon.js";
|
|
70
|
+
import { OntologyIcon as $r } from "./Icons/OntologyIcon.js";
|
|
71
|
+
import { PanelIconClose as re } from "./Icons/PanelIconClose.js";
|
|
72
|
+
import { PanelIconOpen as te } from "./Icons/PanelIconOpen.js";
|
|
73
|
+
import { PlayIcon as ne } from "./Icons/PlayIcon.js";
|
|
74
|
+
import { PlusIcon as xe } from "./Icons/PlusIcon.js";
|
|
75
|
+
import { ResetIcon as ce } from "./Icons/ResetIcon.js";
|
|
76
|
+
import { ReviewedIcon as ae } from "./Icons/ReviewedIcon.js";
|
|
77
|
+
import { ScissorsIcon as ue } from "./Icons/ScissorsIcon.js";
|
|
78
|
+
import { SettingsIcon as de } from "./Icons/SettingsIcon.js";
|
|
79
|
+
import { SortAscendingIcon as Ce } from "./Icons/SortAscendingIcon.js";
|
|
80
|
+
import { SortDescendingIcon as Te } from "./Icons/SortDescendingIcon.js";
|
|
81
|
+
import { StackIcon as Ge } from "./Icons/StackIcon.js";
|
|
82
|
+
import { StarIcon as Ae } from "./Icons/StarIcon.js";
|
|
83
|
+
import { TrashIcon as Le } from "./Icons/TrashIcon.js";
|
|
84
|
+
import { UndoIcon as De } from "./Icons/UndoIcon.js";
|
|
85
|
+
import { UserIcon as ke } from "./Icons/UserIcon.js";
|
|
86
|
+
import { WarningIcon as be } from "./Icons/WarningIcon.js";
|
|
87
|
+
import { ZoomAllIcon as Ee } from "./Icons/ZoomAllIcon.js";
|
|
88
|
+
import { ZoomXIcon as Re } from "./Icons/ZoomXIcon.js";
|
|
89
|
+
import { ZoomYIcon as Ue } from "./Icons/ZoomYIcon.js";
|
|
90
|
+
import { default as Ze, SvgIdContext as qe } from "./Icons/IconBase.js";
|
|
91
|
+
import { useAccordionAutoScroll as Fe } from "./hooks/useAccordionAutoScroll.js";
|
|
92
|
+
import { useControllableState as We } from "./hooks/useControllableState.js";
|
|
93
|
+
import { cn as Ye } from "./utils/twUtils.js";
|
|
94
|
+
import { SpectralProvider as Je } from "./SpectralProvider.js";
|
|
93
95
|
export {
|
|
94
96
|
e as Accordion,
|
|
95
97
|
p as Alert,
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
98
|
+
ko as AnalyzeIcon,
|
|
99
|
+
bo as AnnotationsIcon,
|
|
100
|
+
Eo as ApprovedIcon,
|
|
101
|
+
Ro as ArrowDownIcon,
|
|
102
|
+
Uo as ArrowUpIcon,
|
|
99
103
|
m as Avatar,
|
|
100
104
|
f as Badge,
|
|
101
105
|
I as Button,
|
|
@@ -103,66 +107,66 @@ export {
|
|
|
103
107
|
u as ButtonGroupItem,
|
|
104
108
|
i as ButtonGroupSeparator,
|
|
105
109
|
s as ButtonIcon,
|
|
106
|
-
|
|
110
|
+
Zo as CalendarIcon,
|
|
107
111
|
g as Card,
|
|
108
112
|
T as CardContent,
|
|
109
113
|
S as CardHeader,
|
|
110
114
|
G as CardHeaderEndSlot,
|
|
111
115
|
v as CardTitle,
|
|
112
|
-
|
|
113
|
-
|
|
116
|
+
zo as CheckCircleIcon,
|
|
117
|
+
Vo as CheckSquareIcon,
|
|
114
118
|
B as Checkbox,
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
119
|
+
Xo as CheckmarkIcon,
|
|
120
|
+
jo as ChevronDownIcon,
|
|
121
|
+
Ko as ChevronUpIcon,
|
|
122
|
+
Qo as ClockIcon,
|
|
123
|
+
$o as CloseCircleIcon,
|
|
124
|
+
rr as CloseIcon,
|
|
125
|
+
tr as DashboardIcon,
|
|
126
|
+
nr as DatabaseIcon,
|
|
127
|
+
xr as DeleteIcon,
|
|
124
128
|
h as Dialog,
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
129
|
+
P as Drawer,
|
|
130
|
+
cr as DurationIcon,
|
|
131
|
+
ar as EmailIcon,
|
|
132
|
+
ur as EraserIcon,
|
|
133
|
+
dr as ErrorIcon,
|
|
134
|
+
Cr as EyeClosedIcon,
|
|
135
|
+
Tr as EyeClosedIcon2,
|
|
136
|
+
Gr as EyeOpenIcon,
|
|
137
|
+
Ar as GoToFirstIcon,
|
|
138
|
+
Lr as GoToLastIcon,
|
|
139
|
+
Dr as HarmonicCursorsIcon,
|
|
140
|
+
w as HoverCard,
|
|
141
|
+
b as HoverCardContent,
|
|
142
|
+
y as HoverCardTrigger,
|
|
143
|
+
Ze as IconBase,
|
|
144
|
+
kr as InfoIcon,
|
|
145
|
+
H as Input,
|
|
142
146
|
O as InputGroup,
|
|
143
|
-
|
|
144
|
-
|
|
147
|
+
U as InputGroupAddon,
|
|
148
|
+
M as InputGroupButton,
|
|
145
149
|
Z as InputGroupInput,
|
|
146
150
|
q as InputGroupText,
|
|
147
151
|
z as InputGroupTextarea,
|
|
148
152
|
V as InputOTP,
|
|
149
153
|
X as Label,
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
154
|
+
br as LabelIcon,
|
|
155
|
+
Er as LassoIcon,
|
|
156
|
+
Rr as LineToolIcon,
|
|
157
|
+
Ur as LineToolIcon2,
|
|
158
|
+
Zr as LiveViewIcon,
|
|
159
|
+
zr as LoaderIcon,
|
|
160
|
+
Vr as LocationIcon,
|
|
161
|
+
Xr as LogoutIcon,
|
|
162
|
+
jr as MessagesIcon,
|
|
163
|
+
Kr as MetadataIcon,
|
|
164
|
+
Qr as MinusIcon,
|
|
165
|
+
$r as OntologyIcon,
|
|
166
|
+
re as PanelIconClose,
|
|
167
|
+
te as PanelIconOpen,
|
|
168
|
+
ne as PlayIcon,
|
|
169
|
+
xe as PlusIcon,
|
|
166
170
|
j as Popover,
|
|
167
171
|
J as PopoverContent,
|
|
168
172
|
K as PopoverTrigger,
|
|
@@ -170,20 +174,20 @@ export {
|
|
|
170
174
|
_ as RadioButtonGroupItem,
|
|
171
175
|
oo as RadioGroup,
|
|
172
176
|
ro as RadioGroupItem,
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
177
|
+
ce as ResetIcon,
|
|
178
|
+
ae as ReviewedIcon,
|
|
179
|
+
ue as ScissorsIcon,
|
|
176
180
|
to as Select,
|
|
177
181
|
no as Separator,
|
|
178
|
-
|
|
182
|
+
de as SettingsIcon,
|
|
179
183
|
xo as Skeleton,
|
|
180
184
|
co as Slider,
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
185
|
+
Ce as SortAscendingIcon,
|
|
186
|
+
Te as SortDescendingIcon,
|
|
187
|
+
Je as SpectralProvider,
|
|
188
|
+
Ge as StackIcon,
|
|
189
|
+
Ae as StarIcon,
|
|
190
|
+
qe as SvgIdContext,
|
|
187
191
|
ao as Switch,
|
|
188
192
|
uo as Tabs,
|
|
189
193
|
so as Textarea,
|
|
@@ -193,15 +197,15 @@ export {
|
|
|
193
197
|
Ao as Tooltip,
|
|
194
198
|
Bo as TooltipContent,
|
|
195
199
|
Lo as TooltipTrigger,
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
200
|
+
Le as TrashIcon,
|
|
201
|
+
Do as Tray,
|
|
202
|
+
De as UndoIcon,
|
|
203
|
+
ke as UserIcon,
|
|
204
|
+
be as WarningIcon,
|
|
205
|
+
Ee as ZoomAllIcon,
|
|
206
|
+
Re as ZoomXIcon,
|
|
207
|
+
Ue as ZoomYIcon,
|
|
208
|
+
Ye as cn,
|
|
209
|
+
Fe as useAccordionAutoScroll,
|
|
210
|
+
We as useControllableState
|
|
207
211
|
};
|
package/dist/Accordion.js
CHANGED
|
@@ -4,6 +4,8 @@ import { jsx as i, jsxs as F } 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";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
2
|
import { HTMLAttributes, ReactNode } from 'react';
|
|
3
|
-
declare const
|
|
3
|
+
declare const variantColors: {
|
|
4
4
|
success: string;
|
|
5
5
|
warning: string;
|
|
6
6
|
danger: string;
|
|
@@ -11,9 +11,11 @@ export declare const AlertBase: import('react').ForwardRefExoticComponent<HTMLAt
|
|
|
11
11
|
variant?: "default" | "success" | "warning" | "danger" | "info" | null | undefined;
|
|
12
12
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string> & import('react').RefAttributes<HTMLDivElement>>;
|
|
13
13
|
export declare const AlertTitle: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLHeadingElement> & {
|
|
14
|
-
variant: keyof typeof
|
|
14
|
+
variant: keyof typeof variantColors;
|
|
15
|
+
} & import('react').RefAttributes<HTMLParagraphElement>>;
|
|
16
|
+
export declare const AlertDescription: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLParagraphElement> & {
|
|
17
|
+
variant: keyof typeof variantColors;
|
|
15
18
|
} & import('react').RefAttributes<HTMLParagraphElement>>;
|
|
16
|
-
export declare const AlertDescription: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLParagraphElement> & import('react').RefAttributes<HTMLParagraphElement>>;
|
|
17
19
|
type AlertPortalProps = {
|
|
18
20
|
children: ReactNode;
|
|
19
21
|
container?: Element | DocumentFragment;
|
package/dist/Alert/AlertBase.js
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import "../styles/main.css";
|
|
3
|
-
import { jsx as
|
|
4
|
-
import { cn as
|
|
5
|
-
import { c as
|
|
6
|
-
import { forwardRef as i, useState as
|
|
7
|
-
import { createPortal as
|
|
8
|
-
const g =
|
|
9
|
-
`fixed top-2 left-1/2 -translate-x-1/2 z-50 w-full max-w-md rounded-md border px-4 py-3 text-sm flex has-[>svg]:grid-cols-[6_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-2 gap-y-0.5
|
|
3
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
4
|
+
import { cn as l } from "../utils/twUtils.js";
|
|
5
|
+
import { c as o } from "../index-D29mdTf5.js";
|
|
6
|
+
import { forwardRef as i, useState as d, useEffect as c } from "react";
|
|
7
|
+
import { createPortal as f } from "react-dom";
|
|
8
|
+
const g = o(
|
|
9
|
+
`fixed top-2 left-1/2 -translate-x-1/2 z-50 w-full max-w-md rounded-md border px-4 py-3 text-sm flex has-[>svg]:grid-cols-[6_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-2 [&>svg]items-start gap-y-0.5
|
|
10
10
|
items-start [&>svg]:size-6 [&>svg]:translate-y-0.5 transform transition-all duration-300 ease-in-out translate-y-0 opacity-100 scale-100 animate-in slide-in-from-top-full fade-in duration-300`,
|
|
11
11
|
{
|
|
12
12
|
variants: {
|
|
13
13
|
variant: {
|
|
14
|
-
default: "bg-alert-bg
|
|
15
|
-
success: "bg-alert-success-bg border-alert-success-border
|
|
16
|
-
warning: "bg-alert-warning-bg border-alert-warning-border
|
|
17
|
-
danger: "bg-alert-danger-bg border-alert-danger-border
|
|
18
|
-
info: "bg-alert-info-bg border-alert-info-border
|
|
14
|
+
default: "bg-alert-bg border-alert-border",
|
|
15
|
+
success: "bg-alert-success-bg border-alert-success-border",
|
|
16
|
+
warning: "bg-alert-warning-bg border-alert-warning-border",
|
|
17
|
+
danger: "bg-alert-danger-bg border-alert-danger-border",
|
|
18
|
+
info: "bg-alert-info-bg border-alert-info-border"
|
|
19
19
|
}
|
|
20
20
|
},
|
|
21
21
|
defaultVariants: {
|
|
22
22
|
variant: "default"
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
-
),
|
|
26
|
-
success: "text-alert-success-text",
|
|
27
|
-
warning: "text-alert-warning-text",
|
|
28
|
-
danger: "text-alert-danger-text",
|
|
29
|
-
info: "text-alert-info-text",
|
|
30
|
-
default: "text-alert-text"
|
|
31
|
-
},
|
|
32
|
-
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
function
|
|
38
|
-
const [a,
|
|
39
|
-
return
|
|
25
|
+
), n = {
|
|
26
|
+
success: "text-alert-success-text [&_p]:!text-alert-success-text",
|
|
27
|
+
warning: "text-alert-warning-text [&_p]:!text-alert-warning-text",
|
|
28
|
+
danger: "text-alert-danger-text [&_p]:!text-alert-danger-text",
|
|
29
|
+
info: "text-alert-info-text [&_p]:!text-alert-info-text",
|
|
30
|
+
default: "text-alert-text [&_p]:!text-alert-text"
|
|
31
|
+
}, m = i(({ className: e, variant: r, ...a }, t) => /* @__PURE__ */ s("div", { className: l(g({ variant: r }), e), "data-slot": "alert", "data-testid": "spectral-alert", ref: t, role: "alert", ...a }));
|
|
32
|
+
m.displayName = "AlertBase";
|
|
33
|
+
const x = i(({ className: e, variant: r, ...a }, t) => /* @__PURE__ */ s("div", { className: l(n[r], "col-start-2 line-clamp-1 min-h-4 font-semibold text-base tracking-tight h-6 flex items-center", e), "data-slot": "alert-title", "data-testid": "spectral-alert-title", ref: t, ...a }));
|
|
34
|
+
x.displayName = "AlertTitle";
|
|
35
|
+
const p = i(({ className: e, variant: r, ...a }, t) => /* @__PURE__ */ s("div", { className: l(n[r], "col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed", e), "data-slot": "alert-description", "data-testid": "spectral-alert-description", ref: t, ...a }));
|
|
36
|
+
p.displayName = "AlertDescription";
|
|
37
|
+
function _({ children: e, container: r }) {
|
|
38
|
+
const [a, t] = d(!1);
|
|
39
|
+
return c(() => (t(!0), () => t(!1)), []), a ? f(e, r ?? document.body) : null;
|
|
40
40
|
}
|
|
41
41
|
export {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
42
|
+
m as AlertBase,
|
|
43
|
+
p as AlertDescription,
|
|
44
|
+
_ as AlertPortal,
|
|
45
|
+
x as AlertTitle
|
|
46
46
|
};
|
package/dist/Alert.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import "./styles/main.css";
|
|
3
3
|
import { jsx as t, jsxs as m } from "react/jsx-runtime";
|
|
4
|
-
import { AlertPortal as y, AlertBase as h, AlertTitle as
|
|
4
|
+
import { AlertPortal as y, AlertBase as h, AlertTitle as A, AlertDescription as v } from "./Alert/AlertBase.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 { CheckSquareIcon as w } from "./Icons/CheckSquareIcon.js";
|
|
@@ -61,34 +63,34 @@ import "./Icons/ZoomXIcon.js";
|
|
|
61
63
|
import "./Icons/ZoomYIcon.js";
|
|
62
64
|
import { cn as g } from "./utils/twUtils.js";
|
|
63
65
|
import { useRef as R, useEffect as T } from "react";
|
|
64
|
-
const
|
|
65
|
-
const
|
|
66
|
+
const qt = ({ id: n, description: s, onClose: a, icon: l, title: c, className: d, variant: r = "default" }) => {
|
|
67
|
+
const o = R(null), u = l || {
|
|
66
68
|
info: /* @__PURE__ */ t(E, {}),
|
|
67
69
|
success: /* @__PURE__ */ t(w, {}),
|
|
68
70
|
warning: /* @__PURE__ */ t(N, {}),
|
|
69
71
|
danger: /* @__PURE__ */ t(b, {}),
|
|
70
72
|
default: null
|
|
71
|
-
}[
|
|
73
|
+
}[r];
|
|
72
74
|
T(() => {
|
|
73
75
|
const e = (p) => {
|
|
74
|
-
p.key === "Escape" &&
|
|
76
|
+
p.key === "Escape" && o.current && (p.preventDefault(), i());
|
|
75
77
|
};
|
|
76
78
|
return document.addEventListener("keydown", e), () => {
|
|
77
79
|
document.removeEventListener("keydown", e);
|
|
78
80
|
};
|
|
79
81
|
}, []);
|
|
80
82
|
const i = () => {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
+
o.current && (o.current.style.opacity = "0", setTimeout(() => {
|
|
84
|
+
o.current && (o.current.style.display = "none"), a?.();
|
|
83
85
|
}, 300));
|
|
84
86
|
}, f = () => {
|
|
85
87
|
i();
|
|
86
|
-
}, I = (/* @__PURE__ */ new Set(["danger", "warning"])).has(
|
|
87
|
-
return /* @__PURE__ */ t(y, { children: /* @__PURE__ */ m(h, { "aria-live": I, className: g("alert-wrapper transition-opacity duration-300", d), "data-slot": "alert", "data-variant":
|
|
88
|
+
}, I = (/* @__PURE__ */ new Set(["danger", "warning"])).has(r) ? "assertive" : "polite";
|
|
89
|
+
return /* @__PURE__ */ t(y, { children: /* @__PURE__ */ m(h, { "aria-live": I, className: g("alert-wrapper transition-opacity duration-300", d), "data-slot": "alert", "data-variant": r, id: n, ref: o, variant: r, children: [
|
|
88
90
|
u,
|
|
89
91
|
/* @__PURE__ */ m("div", { className: "content-wrapper", children: [
|
|
90
|
-
/* @__PURE__ */ t(
|
|
91
|
-
/* @__PURE__ */ t(
|
|
92
|
+
/* @__PURE__ */ t(A, { "data-slot": "alert-title", variant: r, children: c }),
|
|
93
|
+
/* @__PURE__ */ t(v, { "data-slot": "alert-description", variant: r, children: s })
|
|
92
94
|
] }),
|
|
93
95
|
/* @__PURE__ */ t(
|
|
94
96
|
C,
|
|
@@ -105,5 +107,5 @@ const Vt = ({ id: n, description: a, onClose: s, icon: l, title: c, className: d
|
|
|
105
107
|
] }) });
|
|
106
108
|
};
|
|
107
109
|
export {
|
|
108
|
-
|
|
110
|
+
qt as Alert
|
|
109
111
|
};
|
package/dist/Avatar.js
CHANGED
|
@@ -2,26 +2,26 @@
|
|
|
2
2
|
import "./styles/main.css";
|
|
3
3
|
import { jsx as r } from "react/jsx-runtime";
|
|
4
4
|
import { cn as s } from "./utils/twUtils.js";
|
|
5
|
-
import { useState as
|
|
5
|
+
import { useState as g, useEffect as v, isValidElement as w, cloneElement as p } from "react";
|
|
6
6
|
const y = {
|
|
7
7
|
sm: "h-8 w-8",
|
|
8
8
|
md: "h-10 w-10",
|
|
9
9
|
lg: "h-12 w-12"
|
|
10
10
|
}, f = {
|
|
11
|
-
sm: "text-
|
|
12
|
-
md: "text-
|
|
13
|
-
lg: "text-
|
|
11
|
+
sm: "text-xs",
|
|
12
|
+
md: "text-base",
|
|
13
|
+
lg: "text-xl"
|
|
14
14
|
}, b = {
|
|
15
15
|
sm: 24,
|
|
16
16
|
md: 32,
|
|
17
17
|
lg: 40
|
|
18
18
|
}, j = (l) => {
|
|
19
|
-
const
|
|
20
|
-
if (!
|
|
21
|
-
const t =
|
|
19
|
+
const o = l.trim();
|
|
20
|
+
if (!o) return "?";
|
|
21
|
+
const t = o.split(/\s+/).filter(Boolean);
|
|
22
22
|
return t.length === 0 ? "?" : t.length === 1 ? t[0].charAt(0).toUpperCase() : (t[0].charAt(0) + t[t.length - 1].charAt(0)).toUpperCase();
|
|
23
|
-
}, k = ({ alt: l, className:
|
|
24
|
-
const [m, d] =
|
|
23
|
+
}, k = ({ alt: l, className: o, icon: t, imageSource: a, fallback: i, size: n = "md", userFullName: c }) => {
|
|
24
|
+
const [m, d] = g("loading");
|
|
25
25
|
v(() => {
|
|
26
26
|
if (!a) return;
|
|
27
27
|
d("loading");
|
|
@@ -32,7 +32,7 @@ const y = {
|
|
|
32
32
|
}, [a]);
|
|
33
33
|
const h = () => {
|
|
34
34
|
if (c)
|
|
35
|
-
return /* @__PURE__ */ r("span", { "aria-label": `${c} avatar`, className: s("flex items-center justify-center w-full h-full font-bold text-text-primary tracking-tighter", f[n]), "data-testid": "spectral-avatar-initials", children: j(c) });
|
|
35
|
+
return /* @__PURE__ */ r("span", { "aria-label": `${c} avatar`, className: s("flex items-center justify-center w-full h-full font-bold text-text-primary tracking-tighter font-stretch-condensed", f[n]), "data-testid": "spectral-avatar-initials", children: j(c) });
|
|
36
36
|
if (t) {
|
|
37
37
|
const e = b[n];
|
|
38
38
|
return /* @__PURE__ */ r("span", { className: "flex items-center justify-center w-full h-full", children: w(t) ? (() => {
|
|
@@ -41,18 +41,18 @@ const y = {
|
|
|
41
41
|
"aria-hidden": "true"
|
|
42
42
|
};
|
|
43
43
|
if (t.type.displayName?.includes("Icon") ?? !1) {
|
|
44
|
-
const
|
|
44
|
+
const x = {
|
|
45
45
|
...u,
|
|
46
46
|
size: e
|
|
47
47
|
};
|
|
48
|
-
return p(t,
|
|
48
|
+
return p(t, x);
|
|
49
49
|
}
|
|
50
50
|
return p(t, u);
|
|
51
51
|
})() : t });
|
|
52
52
|
}
|
|
53
|
-
return a && m === "loaded" ? /* @__PURE__ */ r("img", { alt: l || "Avatar", "aria-label": l || "Avatar", className: "absolute inset-0 w-full h-full object-cover rounded-full", "data-testid": "spectral-avatar-image", role: "img", src: a }) : a && m === "error" &&
|
|
53
|
+
return a && m === "loaded" ? /* @__PURE__ */ r("img", { alt: l || "Avatar", "aria-label": l || "Avatar", className: "absolute inset-0 w-full h-full object-cover rounded-full", "data-testid": "spectral-avatar-image", role: "img", src: a }) : a && m === "error" && i ? /* @__PURE__ */ r("span", { className: "flex items-center justify-center w-full h-full", "data-testid": "spectral-avatar-img-error-fallback", children: i }) : i ? /* @__PURE__ */ r("span", { className: s("flex items-center justify-center w-full h-full text-text-primary", f[n]), "data-testid": "spectral-avatar-fallback", children: i }) : /* @__PURE__ */ r("span", { className: s("flex items-center justify-center w-full h-full font-bold border-2 border-danger-400 text-danger-400 rounded-full font-bold", f[n]), "data-testid": "spectral-avatar-last-resort", children: "?" });
|
|
54
54
|
};
|
|
55
|
-
return /* @__PURE__ */ r("div", { className: s("relative inline-flex items-center justify-center overflow-hidden rounded-full shrink-0 bg-level-two", y[n],
|
|
55
|
+
return /* @__PURE__ */ r("div", { className: s("relative inline-flex items-center justify-center overflow-hidden rounded-full shrink-0 bg-level-two", y[n], o), "data-slot": "avatar", "data-testid": "spectral-avatar", children: h() });
|
|
56
56
|
};
|
|
57
57
|
export {
|
|
58
58
|
k as Avatar
|
package/dist/Button.js
CHANGED
|
@@ -5,13 +5,7 @@ import { ErrorMessage as y } from "./utils/formFieldUtils.js";
|
|
|
5
5
|
import { cn as u } from "./utils/twUtils.js";
|
|
6
6
|
import { c as h } from "./index-D29mdTf5.js";
|
|
7
7
|
import { forwardRef as f } from "react";
|
|
8
|
-
import { c as N } from "./createLucideIcon-
|
|
9
|
-
/**
|
|
10
|
-
* @license lucide-react v0.546.0 - ISC
|
|
11
|
-
*
|
|
12
|
-
* This source code is licensed under the ISC license.
|
|
13
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
14
|
-
*/
|
|
8
|
+
import { c as N } from "./createLucideIcon-D4r5Phnh.js";
|
|
15
9
|
const w = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]], _ = N("loader-circle", w), j = h(
|
|
16
10
|
`
|
|
17
11
|
!font-sans flex relative items-center justify-center gap-2 whitespace-nowrap transition-colors cursor-pointer rounded-lg border font-semibold focus:outline-none focus:outline-none
|
|
@@ -6,7 +6,7 @@ import { c } from "../index-D29mdTf5.js";
|
|
|
6
6
|
import "react";
|
|
7
7
|
const l = c(
|
|
8
8
|
`inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-[var(--radius,0.375rem)] text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none
|
|
9
|
-
[&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-accent focus-visible:outline-offset-2 focus-visible:outline-2 focus-
|
|
9
|
+
[&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-accent focus-visible:outline-offset-2 focus-visible:outline-2 focus-visible:outline-accent
|
|
10
10
|
aria-invalid:ring-destructive/20 aria-invalid:border-destructive bg-level-one text-text-primary hover:bg-level-two cursor-pointer active:text-accent`,
|
|
11
11
|
{
|
|
12
12
|
variants: {
|
package/dist/ButtonIcon.js
CHANGED
|
@@ -4,6 +4,8 @@ import { jsx as a } 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";
|