@spear-ai/spectral 1.9.1 → 1.10.1
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/README.md +6 -5
- package/dist/.js +113 -239
- package/dist/Accordion-CDXdSAST.js +363 -0
- package/dist/Accordion.js +3 -498
- package/dist/Alert/AlertBase.js +69 -152
- package/dist/Alert.js +58 -106
- package/dist/AnimatePresence-D-9jXfgI.js +178 -0
- package/dist/App.js +6 -6
- package/dist/Avatar.js +83 -65
- package/dist/Badge.d.ts +1 -3
- package/dist/Badge.js +21 -25
- package/dist/Button.js +102 -178
- package/dist/ButtonGroup/ButtonGroupButton.js +38 -40
- package/dist/ButtonGroup.js +55 -59
- package/dist/ButtonIcon.js +58 -134
- package/dist/Calendar-s4lyijkn.js +3109 -0
- package/dist/Checkbox/CheckboxBase.js +94 -126
- package/dist/Checkbox.d.ts +1 -1
- package/dist/Checkbox.js +40 -105
- package/dist/Combobox/ComboboxBase.js +2 -79
- package/dist/Combobox.js +106 -172
- package/dist/ComboboxBase-D8Nf4xC-.js +491 -0
- package/dist/ControlGroup/ControlGroupSelect.d.ts +1 -1
- package/dist/ControlGroup/ControlGroupSelect.js +85 -101
- package/dist/ControlGroup.js +45 -48
- package/dist/DataCard/Card.js +37 -12
- package/dist/DataCard.d.ts +1 -1
- package/dist/DataCard.js +36 -16
- package/dist/DateTimePicker/Calendar.js +2 -2967
- package/dist/DateTimePicker/DateTimeDisplayInput.d.ts +1 -1
- package/dist/DateTimePicker/DateTimeDisplayInput.js +379 -275
- package/dist/DateTimePicker/DateTimeInput.d.ts +1 -1
- package/dist/DateTimePicker/DateTimeInput.js +133 -141
- package/dist/DateTimePicker/DateTimeUtils.js +2 -2193
- package/dist/DateTimePicker/TimePeriodSelect.d.ts +1 -1
- package/dist/DateTimePicker/TimePeriodSelect.js +45 -20
- package/dist/DateTimePicker/TimePicker.d.ts +1 -1
- package/dist/DateTimePicker/TimePicker.js +76 -60
- package/dist/DateTimePicker.d.ts +2 -2
- package/dist/DateTimePicker.js +87 -205
- package/dist/DateTimeUtils-DVvG6H-p.js +2098 -0
- package/dist/Dialog.js +74 -74
- package/dist/Drawer.js +67 -37
- package/dist/HoverCard-CYDsIiVK.js +201 -0
- package/dist/HoverCard.d.ts +1 -1
- package/dist/HoverCard.js +2 -218
- package/dist/Icons/AnalyzeIcon.js +50 -57
- package/dist/Icons/AnnotationsIcon.js +20 -15
- package/dist/Icons/ApprovedIcon.js +26 -18
- package/dist/Icons/ArrowDownIcon.js +20 -6
- package/dist/Icons/ArrowUpIcon.js +20 -6
- package/dist/Icons/BoxToolIcon.js +17 -12
- package/dist/Icons/CalendarIcon.js +43 -20
- package/dist/Icons/CheckCircleIcon.js +26 -10
- package/dist/Icons/CheckSquareIcon.js +26 -10
- package/dist/Icons/CheckmarkIcon.js +22 -9
- package/dist/Icons/ChevronDownIcon.js +22 -9
- package/dist/Icons/ChevronUpIcon.js +22 -9
- package/dist/Icons/ClockIcon.js +26 -18
- package/dist/Icons/CloseCircleIcon.js +26 -10
- package/dist/Icons/CloseIcon.js +18 -9
- package/dist/Icons/DashboardIcon.js +36 -10
- package/dist/Icons/DatabaseIcon.js +36 -19
- package/dist/Icons/DeleteIcon.js +36 -19
- package/dist/Icons/DurationIcon.js +57 -22
- package/dist/Icons/EditIcon.js +26 -27
- package/dist/Icons/EmailIcon.js +26 -10
- package/dist/Icons/EraserIcon.js +41 -25
- package/dist/Icons/ErrorIcon.js +27 -11
- package/dist/Icons/EyeClosedIcon.js +29 -13
- package/dist/Icons/EyeClosedIcon2.js +27 -11
- package/dist/Icons/EyeOpenIcon.js +22 -9
- package/dist/Icons/FileDownloadIcon.js +43 -20
- package/dist/Icons/GoToFirstIcon.js +26 -9
- package/dist/Icons/GoToLastIcon.js +26 -9
- package/dist/Icons/HarmonicCursorsIcon.js +23 -9
- package/dist/Icons/IconBase.d.ts +3 -3
- package/dist/Icons/IconBase.js +49 -66
- package/dist/Icons/InfoIcon.js +36 -10
- package/dist/Icons/KeyboardIcon.js +26 -27
- package/dist/Icons/LabelIcon.js +19 -14
- package/dist/Icons/LassoIcon.js +36 -28
- package/dist/Icons/LineToolIcon.js +48 -39
- package/dist/Icons/LiveViewIcon.js +50 -12
- package/dist/Icons/LoaderIcon.js +67 -27
- package/dist/Icons/LocationIcon.js +26 -27
- package/dist/Icons/LogoutIcon.js +20 -15
- package/dist/Icons/MeasureIcon.js +78 -25
- package/dist/Icons/MessagesIcon.js +33 -18
- package/dist/Icons/MetadataIcon.js +20 -15
- package/dist/Icons/MinusIcon.d.ts +1 -1
- package/dist/Icons/MinusIcon.js +18 -6
- package/dist/Icons/OntologyIcon.js +87 -71
- package/dist/Icons/PanelIconClose.js +28 -10
- package/dist/Icons/PanelIconOpen.js +28 -10
- package/dist/Icons/PlayIcon.js +20 -6
- package/dist/Icons/PlusIcon.js +20 -14
- package/dist/Icons/PolygonIcon.js +50 -39
- package/dist/Icons/ProgressCheckIcon.d.ts +5 -0
- package/dist/Icons/ProgressCheckIcon.js +58 -0
- package/dist/Icons/ResetIcon.js +17 -12
- package/dist/Icons/ReviewedIcon.js +36 -19
- package/dist/Icons/ScissorsIcon.js +22 -17
- package/dist/Icons/SearchIcon.js +26 -9
- package/dist/Icons/SettingsIcon.js +26 -27
- package/dist/Icons/SortAscendingIcon.js +50 -12
- package/dist/Icons/SortAtoZIcon.js +50 -12
- package/dist/Icons/SortDescendingIcon.js +50 -12
- package/dist/Icons/SortZtoAIcon.js +50 -12
- package/dist/Icons/StackIcon.js +26 -9
- package/dist/Icons/StarIcon.js +20 -6
- package/dist/Icons/TrashIcon.js +17 -12
- package/dist/Icons/UndoIcon.js +20 -15
- package/dist/Icons/User2Icon.js +26 -10
- package/dist/Icons/UserIcon.js +19 -14
- package/dist/Icons/WarningIcon.js +19 -14
- package/dist/Icons/ZoomAllIcon.js +71 -15
- package/dist/Icons/ZoomXIcon.js +36 -10
- package/dist/Icons/ZoomYIcon.js +36 -10
- package/dist/Icons/index.d.ts +1 -0
- package/dist/Icons.js +68 -136
- package/dist/IconsAnimated/PanelLeftCloseIcon.js +66 -36
- package/dist/IconsAnimated/PanelLeftOpenIcon.js +66 -36
- package/dist/IconsAnimated.js +3 -6
- package/dist/Input/InputUtils.js +51 -52
- package/dist/Input.js +132 -185
- package/dist/InputNumeric.d.ts +14 -0
- package/dist/InputNumeric.js +137 -0
- package/dist/InputOTP-cVn5Bzyp.js +461 -0
- package/dist/InputOTP.js +2 -382
- package/dist/Kbd.d.ts +1 -1
- package/dist/Kbd.js +182 -86
- package/dist/Label.js +12 -14
- package/dist/MultiSelect/MultiSelectBase.js +331 -403
- package/dist/MultiSelect.d.ts +1 -1
- package/dist/MultiSelect.js +23 -23
- package/dist/Popover.js +28 -32
- package/dist/RadioButton.d.ts +17 -0
- package/dist/RadioButton.js +33 -0
- package/dist/RadioButtonGroup/RadioButtonGroupBase.d.ts +3 -1
- package/dist/RadioButtonGroup/RadioButtonGroupBase.js +49 -46
- package/dist/RadioButtonGroup.d.ts +1 -1
- package/dist/RadioButtonGroup.js +11 -8
- package/dist/RadioGroup-w_q6RGEK.js +447 -0
- package/dist/RadioGroup.js +2 -505
- package/dist/Select.js +163 -186
- package/dist/Separator.js +16 -19
- package/dist/Skeleton.js +10 -6
- package/dist/Slider-BzzZT3Zm.js +490 -0
- package/dist/Slider.js +2 -562
- package/dist/SpectralProvider.js +8 -5
- package/dist/Switch/SwitchBase.js +91 -95
- package/dist/Switch-CVzRJ-0n.js +126 -0
- package/dist/Switch.d.ts +1 -1
- package/dist/Switch.js +2 -134
- package/dist/Tabs/TabsBase.js +242 -250
- package/dist/Tabs/tabsUtils.js +65 -73
- package/dist/Tabs.d.ts +1 -1
- package/dist/Tabs.js +73 -103
- package/dist/Textarea/TextareaUtils.js +35 -46
- package/dist/Textarea.js +83 -160
- package/dist/Toast-9zqXxKKO.js +711 -0
- package/dist/Toast.js +2 -885
- package/dist/Toggle/ToggleBase.js +46 -56
- package/dist/Toggle.d.ts +1 -1
- package/dist/Toggle.js +52 -62
- package/dist/ToggleGroup/ToggleGroupBase.js +128 -104
- package/dist/ToggleGroup.d.ts +1 -1
- package/dist/ToggleGroup.js +52 -63
- package/dist/Tooltip-D1K8kY1y.js +389 -0
- package/dist/Tooltip.js +2 -365
- package/dist/Tray.js +174 -217
- package/dist/chunk-h9knIhTc.js +20 -0
- package/dist/clsx-jM1GlMvB.js +16 -0
- package/dist/dist-3Af8168y.js +913 -0
- package/dist/dist-7HRQ5IKN.js +249 -0
- package/dist/dist-B2k1iWFp.js +129 -0
- package/dist/dist-B4FgboI8.js +122 -0
- package/dist/dist-B4g6zpUF.js +33 -0
- package/dist/dist-B9tup-4O.js +216 -0
- package/dist/dist-BK1K0g9W.js +29 -0
- package/dist/dist-Bfjk-jx9.js +28 -0
- package/dist/dist-Bft31cJh.js +65 -0
- package/dist/dist-BtdmHAzK.js +190 -0
- package/dist/dist-C0Hifjgh.js +1287 -0
- package/dist/dist-CGzgmYB9.js +68 -0
- package/dist/dist-ClmepHp4.js +10 -0
- package/dist/dist-D8Wb_MX9.js +6 -0
- package/dist/dist-Dtvmk11N.js +12 -0
- package/dist/dist-fW81qjVl.js +677 -0
- package/dist/dist-s1uWaZYZ.js +11 -0
- package/dist/es2015-YHaMV-St.js +701 -0
- package/dist/hooks/useAccordionAutoScroll.js +66 -67
- package/dist/hooks/useControllableState.js +14 -13
- package/dist/hooks/useConvertToOklch.d.ts +3 -0
- package/dist/hooks/useConvertToOklch.d.ts.map +1 -0
- package/dist/hooks/useConvertToOklch.js +51 -0
- package/dist/hooks/useTheme.js +21 -17
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/main.js +18954 -27224
- package/dist/primitives/button.js +39 -41
- package/dist/primitives/input-group.js +57 -73
- package/dist/primitives/input.js +11 -20
- package/dist/primitives/popover.js +34 -28
- package/dist/primitives/select.js +70 -138
- package/dist/primitives/slot.js +32 -31
- package/dist/primitives/textarea.js +10 -16
- package/dist/proxy-Dn10Pl_g.js +4920 -0
- package/dist/styles/main.css +2 -1
- package/dist/styles/spectral.css +1 -1
- package/dist/twUtils-VNWgstKL.js +1673 -0
- package/dist/use-animation-CBUDycyW.js +57 -0
- package/dist/utils/constants.js +4 -4
- package/dist/utils/formFieldUtils.js +136 -148
- package/dist/utils/sharedUtils.js +26 -7
- package/dist/utils/twUtils.js +2 -2919
- package/package.json +24 -28
- package/dist/ComboboxBase-CxNxYtdT.js +0 -408
- package/dist/clsx-OuTLNxxd.js +0 -16
- package/dist/index-0ioNhtNM.js +0 -10
- package/dist/index-6oYKCvIn.js +0 -677
- package/dist/index-BFOf48AQ.js +0 -69
- package/dist/index-BZPx6jYI.js +0 -8
- package/dist/index-BlHU_t18.js +0 -142
- package/dist/index-Bm1RbF6w.js +0 -1037
- package/dist/index-Bv2OIg5P.js +0 -225
- package/dist/index-CKEI0pDv.js +0 -56
- package/dist/index-CM_hWgfC.js +0 -32
- package/dist/index-C_YVr64u.js +0 -1538
- package/dist/index-Cl8VeY0o.js +0 -149
- package/dist/index-CwSyIPrv.js +0 -13
- package/dist/index-D29mdTf5.js +0 -34
- package/dist/index-DEYs15GP.js +0 -66
- package/dist/index-Dc0No4pV.js +0 -233
- package/dist/index-T6XEa11q.js +0 -822
- package/dist/index-pBCLb6Gr.js +0 -240
- package/dist/index-psiVrsnE.js +0 -27
- package/dist/index-rKs9bXHr.js +0 -6
- package/dist/proxy-CO_-Vget.js +0 -4975
- package/dist/use-animation-DhEPRwZ3.js +0 -62
package/dist/Tray.js
CHANGED
|
@@ -1,222 +1,179 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import "./styles/main.css";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import "./
|
|
6
|
-
import "./
|
|
7
|
-
import "./
|
|
8
|
-
import "./
|
|
9
|
-
import "./
|
|
10
|
-
import "./
|
|
11
|
-
import "
|
|
12
|
-
import "
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
import "./Icons/LocationIcon.js";
|
|
43
|
-
import "./Icons/LogoutIcon.js";
|
|
44
|
-
import "./Icons/MeasureIcon.js";
|
|
45
|
-
import "./Icons/MessagesIcon.js";
|
|
46
|
-
import "./Icons/MetadataIcon.js";
|
|
47
|
-
import "./Icons/MinusIcon.js";
|
|
48
|
-
import "./Icons/OntologyIcon.js";
|
|
49
|
-
import "./Icons/PanelIconClose.js";
|
|
50
|
-
import "./Icons/PanelIconOpen.js";
|
|
51
|
-
import "./Icons/PlayIcon.js";
|
|
52
|
-
import "./Icons/PlusIcon.js";
|
|
53
|
-
import "./Icons/PolygonIcon.js";
|
|
54
|
-
import "./Icons/ResetIcon.js";
|
|
55
|
-
import "./Icons/ReviewedIcon.js";
|
|
56
|
-
import "./Icons/ScissorsIcon.js";
|
|
57
|
-
import "./Icons/SearchIcon.js";
|
|
58
|
-
import "./Icons/SettingsIcon.js";
|
|
59
|
-
import "./Icons/SortAscendingIcon.js";
|
|
60
|
-
import "./Icons/SortAtoZIcon.js";
|
|
61
|
-
import "./Icons/SortDescendingIcon.js";
|
|
62
|
-
import "./Icons/SortZtoAIcon.js";
|
|
63
|
-
import "./Icons/StackIcon.js";
|
|
64
|
-
import "./Icons/StarIcon.js";
|
|
65
|
-
import "./Icons/TrashIcon.js";
|
|
66
|
-
import "./Icons/UndoIcon.js";
|
|
67
|
-
import "./Icons/User2Icon.js";
|
|
68
|
-
import "./Icons/UserIcon.js";
|
|
69
|
-
import "./Icons/WarningIcon.js";
|
|
70
|
-
import "./Icons/ZoomAllIcon.js";
|
|
71
|
-
import "./Icons/ZoomXIcon.js";
|
|
72
|
-
import "./Icons/ZoomYIcon.js";
|
|
73
|
-
import { cn as a } from "./utils/twUtils.js";
|
|
74
|
-
import { c as M } from "./index-D29mdTf5.js";
|
|
75
|
-
import { createContext as H, useRef as f, useMemo as T, useContext as I } from "react";
|
|
76
|
-
import { j as v } from "./index-DEYs15GP.js";
|
|
77
|
-
import { D as m } from "./index-Bm1RbF6w.js";
|
|
78
|
-
import { m as g } from "./proxy-CO_-Vget.js";
|
|
79
|
-
import { A as O } from "./index-Cl8VeY0o.js";
|
|
80
|
-
const j = M("fixed bottom-4 left-1/2 z-10 -translate-x-1/2 overflow-hidden rounded-2xl bg-drawer-bg outline-none w-full sm:max-md:max-w-full", {
|
|
81
|
-
variants: {
|
|
82
|
-
size: {
|
|
83
|
-
sm: "max-w-[400px]",
|
|
84
|
-
md: "max-w-[600px]",
|
|
85
|
-
lg: "max-w-[800px]",
|
|
86
|
-
full: "max-w-full"
|
|
87
|
-
}
|
|
88
|
-
},
|
|
89
|
-
defaultVariants: {
|
|
90
|
-
size: "sm"
|
|
91
|
-
}
|
|
92
|
-
}), N = H(void 0), b = () => {
|
|
93
|
-
const t = I(N);
|
|
94
|
-
if (!t)
|
|
95
|
-
throw new Error("Tray components must be used within Tray root");
|
|
96
|
-
return t;
|
|
97
|
-
}, B = ({ children: t, size: r = "sm", ...o }) => {
|
|
98
|
-
const i = f("default"), n = T(
|
|
99
|
-
() => ({
|
|
100
|
-
animationKey: i.current,
|
|
101
|
-
setAnimationKey: (p) => {
|
|
102
|
-
i.current = p;
|
|
103
|
-
},
|
|
104
|
-
size: r
|
|
105
|
-
}),
|
|
106
|
-
[r]
|
|
107
|
-
);
|
|
108
|
-
return /* @__PURE__ */ e(N.Provider, { value: n, children: /* @__PURE__ */ e(m.Root, { "data-testid": "spectral-tray", ...o, children: t }) });
|
|
3
|
+
import { CloseIcon as e } from "./Icons/CloseIcon.js";
|
|
4
|
+
import { t } from "./twUtils-VNWgstKL.js";
|
|
5
|
+
import { t as n } from "./dist-B4g6zpUF.js";
|
|
6
|
+
import { ButtonIcon as r } from "./ButtonIcon.js";
|
|
7
|
+
import { t as i } from "./dist-3Af8168y.js";
|
|
8
|
+
import { t as a } from "./proxy-Dn10Pl_g.js";
|
|
9
|
+
import { t as o } from "./AnimatePresence-D-9jXfgI.js";
|
|
10
|
+
import { t as s } from "./dist-B4FgboI8.js";
|
|
11
|
+
import { createContext as c, useContext as l, useMemo as u, useRef as d } from "react";
|
|
12
|
+
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
13
|
+
//#region src/components/Tray/Tray.tsx
|
|
14
|
+
var m = n("bottom-4 rounded-2xl sm:max-md:max-w-full fixed left-1/2 z-10 w-full -translate-x-1/2 overflow-hidden bg-drawer-bg outline-none", {
|
|
15
|
+
variants: { size: {
|
|
16
|
+
sm: "max-w-[400px]",
|
|
17
|
+
md: "max-w-[600px]",
|
|
18
|
+
lg: "max-w-[800px]",
|
|
19
|
+
full: "max-w-full"
|
|
20
|
+
} },
|
|
21
|
+
defaultVariants: { size: "sm" }
|
|
22
|
+
}), h = c(void 0), g = () => {
|
|
23
|
+
let e = l(h);
|
|
24
|
+
if (!e) throw Error("Tray components must be used within Tray root");
|
|
25
|
+
return e;
|
|
26
|
+
}, _ = ({ children: e, size: t = "sm", ...n }) => {
|
|
27
|
+
let r = d("default"), a = u(() => ({
|
|
28
|
+
animationKey: r.current,
|
|
29
|
+
setAnimationKey: (e) => {
|
|
30
|
+
r.current = e;
|
|
31
|
+
},
|
|
32
|
+
size: t
|
|
33
|
+
}), [t]);
|
|
34
|
+
return /* @__PURE__ */ f(h.Provider, {
|
|
35
|
+
value: a,
|
|
36
|
+
children: /* @__PURE__ */ f(i.Root, {
|
|
37
|
+
"data-testid": "spectral-tray",
|
|
38
|
+
...n,
|
|
39
|
+
children: e
|
|
40
|
+
})
|
|
41
|
+
});
|
|
109
42
|
};
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
})
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
})
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
43
|
+
_.displayName = "Tray";
|
|
44
|
+
var v = ({ className: e, ref: n, ...r }) => /* @__PURE__ */ f(i.Trigger, {
|
|
45
|
+
className: t(e),
|
|
46
|
+
"data-testid": "spectral-tray-trigger",
|
|
47
|
+
"data-vaul-no-drag": "",
|
|
48
|
+
ref: n,
|
|
49
|
+
...r
|
|
50
|
+
});
|
|
51
|
+
v.displayName = "TrayTrigger";
|
|
52
|
+
var y = ({ className: n, ref: r, ...a }) => /* @__PURE__ */ f(i.Close, {
|
|
53
|
+
asChild: !0,
|
|
54
|
+
className: t(n),
|
|
55
|
+
"data-testid": "spectral-tray-close",
|
|
56
|
+
"data-vaul-no-drag": "",
|
|
57
|
+
ref: r,
|
|
58
|
+
...a,
|
|
59
|
+
children: /* @__PURE__ */ f(e, {})
|
|
60
|
+
});
|
|
61
|
+
y.displayName = "TrayClose";
|
|
62
|
+
var b = ({ className: e, ref: n, ...r }) => /* @__PURE__ */ f(i.Overlay, {
|
|
63
|
+
className: t("inset-0 fixed z-10 bg-overlay", e),
|
|
64
|
+
ref: n,
|
|
65
|
+
...r
|
|
66
|
+
});
|
|
67
|
+
b.displayName = "TrayOverlay";
|
|
68
|
+
var x = ({ "aria-label": e, children: n, className: r, ref: o, size: c, ...l }) => {
|
|
69
|
+
let { size: u } = g(), d = c ?? u, [h, _] = s();
|
|
70
|
+
return /* @__PURE__ */ p(i.Portal, { children: [/* @__PURE__ */ f(b, {}), /* @__PURE__ */ f(i.Content, {
|
|
71
|
+
"aria-describedby": void 0,
|
|
72
|
+
asChild: !0,
|
|
73
|
+
className: t(m({ size: d }), r),
|
|
74
|
+
"data-testid": "spectral-tray-content",
|
|
75
|
+
ref: o,
|
|
76
|
+
...l,
|
|
77
|
+
children: /* @__PURE__ */ p(a.div, {
|
|
78
|
+
animate: {
|
|
79
|
+
height: _.height,
|
|
80
|
+
transition: {
|
|
81
|
+
duration: .27,
|
|
82
|
+
ease: [
|
|
83
|
+
.25,
|
|
84
|
+
1,
|
|
85
|
+
.5,
|
|
86
|
+
1
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
children: [/* @__PURE__ */ f(i.Title, {
|
|
91
|
+
className: "sr-only",
|
|
92
|
+
children: e ?? "Tray"
|
|
93
|
+
}), /* @__PURE__ */ f("div", {
|
|
94
|
+
ref: h,
|
|
95
|
+
className: "px-6 pb-6 pt-2.5 antialiased",
|
|
96
|
+
children: n
|
|
97
|
+
})]
|
|
98
|
+
})
|
|
99
|
+
})] });
|
|
157
100
|
};
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
})
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
101
|
+
x.displayName = "TrayContent";
|
|
102
|
+
var S = ({ children: n, className: i, ref: a, ...o }) => /* @__PURE__ */ p("div", {
|
|
103
|
+
className: t("space-y-1.5 pb-4 relative flex flex-col text-start", i),
|
|
104
|
+
"data-testid": "spectral-tray-header",
|
|
105
|
+
ref: a,
|
|
106
|
+
...o,
|
|
107
|
+
children: [n, /* @__PURE__ */ f(y, {
|
|
108
|
+
className: "text-neutral-400 hover:text-neutral-100 p-1 top-0 absolute right-[-14px] z-10 cursor-pointer rounded-full transition-colors hover:scale-110 hover:bg-level-four",
|
|
109
|
+
children: /* @__PURE__ */ f(r, {
|
|
110
|
+
icon: /* @__PURE__ */ f(e, {}),
|
|
111
|
+
label: "Close tray",
|
|
112
|
+
shape: "circle"
|
|
113
|
+
})
|
|
114
|
+
})]
|
|
115
|
+
});
|
|
116
|
+
S.displayName = "TrayHeader";
|
|
117
|
+
var C = ({ children: e, className: n, ref: r, ...i }) => /* @__PURE__ */ f("h2", {
|
|
118
|
+
className: t("text-xl font-semibold text-text-primary", n),
|
|
119
|
+
"data-testid": "spectral-tray-title",
|
|
120
|
+
ref: r,
|
|
121
|
+
...i,
|
|
122
|
+
children: e
|
|
123
|
+
});
|
|
124
|
+
C.displayName = "TrayTitle";
|
|
125
|
+
var w = ({ className: e, ref: n, ...r }) => /* @__PURE__ */ f("p", {
|
|
126
|
+
className: t("text-sm text-text-secondary", e),
|
|
127
|
+
"data-testid": "spectral-tray-subtitle",
|
|
128
|
+
ref: n,
|
|
129
|
+
...r
|
|
130
|
+
});
|
|
131
|
+
w.displayName = "TraySubtitle";
|
|
132
|
+
var T = ({ animationKey: e, children: n, className: r, ref: i, ...c }) => {
|
|
133
|
+
let { animationKey: l } = g(), p = e ?? l, m = d(null), [h, _] = s(), v = u(() => {
|
|
134
|
+
let e = _.height, t = m.current, n = .15;
|
|
135
|
+
if (!m.current) return m.current = e, n;
|
|
136
|
+
let r = Math.abs(e - (t ?? 0));
|
|
137
|
+
return m.current = e, Math.min(Math.max(r / 500, n), .27);
|
|
138
|
+
}, [_.height]);
|
|
139
|
+
return /* @__PURE__ */ f("div", {
|
|
140
|
+
ref: i,
|
|
141
|
+
"data-testid": "spectral-tray-body",
|
|
142
|
+
className: t(r),
|
|
143
|
+
...c,
|
|
144
|
+
children: /* @__PURE__ */ f(o, {
|
|
145
|
+
initial: !1,
|
|
146
|
+
mode: "popLayout",
|
|
147
|
+
custom: p,
|
|
148
|
+
children: /* @__PURE__ */ f(a.div, {
|
|
149
|
+
animate: {
|
|
150
|
+
opacity: 1,
|
|
151
|
+
scale: 1,
|
|
152
|
+
y: 0
|
|
153
|
+
},
|
|
154
|
+
exit: {
|
|
155
|
+
opacity: 0,
|
|
156
|
+
scale: .96
|
|
157
|
+
},
|
|
158
|
+
initial: {
|
|
159
|
+
opacity: 0,
|
|
160
|
+
scale: .96
|
|
161
|
+
},
|
|
162
|
+
ref: h,
|
|
163
|
+
transition: {
|
|
164
|
+
duration: v,
|
|
165
|
+
ease: [
|
|
166
|
+
.26,
|
|
167
|
+
.08,
|
|
168
|
+
.25,
|
|
169
|
+
1
|
|
170
|
+
]
|
|
171
|
+
},
|
|
172
|
+
children: n
|
|
173
|
+
}, p)
|
|
174
|
+
})
|
|
175
|
+
});
|
|
222
176
|
};
|
|
177
|
+
T.displayName = "TrayBody";
|
|
178
|
+
//#endregion
|
|
179
|
+
export { _ as Tray, T as TrayBody, y as TrayClose, x as TrayContent, S as TrayHeader, w as TraySubtitle, C as TrayTitle, v as TrayTrigger };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
|
+
var e = Object.defineProperty, t = Object.getOwnPropertyDescriptor, n = Object.getOwnPropertyNames, r = Object.prototype.hasOwnProperty, i = (e, t) => () => (e && (t = e(e = 0)), t), a = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), o = (t, n) => {
|
|
3
|
+
let r = {};
|
|
4
|
+
for (var i in t) e(r, i, {
|
|
5
|
+
get: t[i],
|
|
6
|
+
enumerable: !0
|
|
7
|
+
});
|
|
8
|
+
return n || e(r, Symbol.toStringTag, { value: "Module" }), r;
|
|
9
|
+
}, s = (i, a, o, s) => {
|
|
10
|
+
if (a && typeof a == "object" || typeof a == "function") for (var c = n(a), l = 0, u = c.length, d; l < u; l++) d = c[l], !r.call(i, d) && d !== o && e(i, d, {
|
|
11
|
+
get: ((e) => a[e]).bind(null, d),
|
|
12
|
+
enumerable: !(s = t(a, d)) || s.enumerable
|
|
13
|
+
});
|
|
14
|
+
return i;
|
|
15
|
+
}, c = (t) => r.call(t, "module.exports") ? t["module.exports"] : s(e({}, "__esModule", { value: !0 }), t), l = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(e, { get: (e, t) => (typeof require < "u" ? require : e)[t] }) : e)(function(e) {
|
|
16
|
+
if (typeof require < "u") return require.apply(this, arguments);
|
|
17
|
+
throw Error("Calling `require` for \"" + e + "\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.");
|
|
18
|
+
});
|
|
19
|
+
//#endregion
|
|
20
|
+
export { c as a, l as i, i as n, o as r, a as t };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
//#region node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
|
|
2
|
+
function e(t) {
|
|
3
|
+
var n, r, i = "";
|
|
4
|
+
if (typeof t == "string" || typeof t == "number") i += t;
|
|
5
|
+
else if (typeof t == "object") if (Array.isArray(t)) {
|
|
6
|
+
var a = t.length;
|
|
7
|
+
for (n = 0; n < a; n++) t[n] && (r = e(t[n])) && (i && (i += " "), i += r);
|
|
8
|
+
} else for (r in t) t[r] && (i && (i += " "), i += r);
|
|
9
|
+
return i;
|
|
10
|
+
}
|
|
11
|
+
function t() {
|
|
12
|
+
for (var t, n, r = 0, i = "", a = arguments.length; r < a; r++) (t = arguments[r]) && (n = e(t)) && (i && (i += " "), i += n);
|
|
13
|
+
return i;
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
export { t };
|