@spear-ai/spectral 1.3.63 → 1.3.64
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 +194 -170
- package/dist/Accordion.js +9 -0
- package/dist/Alert.js +19 -10
- package/dist/Button.d.ts +3 -3
- package/dist/Button.js +33 -26
- package/dist/ButtonIcon.js +9 -0
- package/dist/Card.d.ts +16 -0
- package/dist/Card.js +32 -0
- package/dist/Checkbox.js +14 -5
- package/dist/Dialog/DialogBase.d.ts +5 -2
- package/dist/Dialog/DialogBase.js +113 -98
- package/dist/Dialog.d.ts +1 -1
- package/dist/Dialog.js +41 -35
- package/dist/Icons/AnalyzeIcon.d.ts +3 -0
- package/dist/Icons/AnalyzeIcon.js +73 -0
- package/dist/Icons/AnnotationsIcon.js +4 -4
- package/dist/Icons/ApprovedIcon.d.ts +3 -0
- package/dist/Icons/ApprovedIcon.js +43 -0
- package/dist/Icons/CalendarIcon.js +7 -7
- package/dist/Icons/CheckCircleIcon.js +14 -14
- package/dist/Icons/CheckSquareIcon.js +14 -14
- package/dist/Icons/CheckmarkIcon.js +9 -9
- package/dist/Icons/ChevronDownIcon.js +6 -6
- package/dist/Icons/ChevronUpIcon.js +7 -7
- package/dist/Icons/ClockIcon.js +10 -10
- package/dist/Icons/CloseCircleIcon.js +10 -10
- package/dist/Icons/CloseIcon.js +5 -5
- package/dist/Icons/DashboardIcon.js +4 -4
- package/dist/Icons/DatabaseIcon.d.ts +3 -0
- package/dist/Icons/DatabaseIcon.js +53 -0
- package/dist/Icons/DeleteIcon.js +24 -6
- package/dist/Icons/DurationIcon.js +7 -7
- package/dist/Icons/EmailIcon.js +4 -4
- package/dist/Icons/EraserIcon.js +20 -11
- package/dist/Icons/ErrorIcon.js +3 -3
- package/dist/Icons/EyeClosedIcon.js +2 -2
- package/dist/Icons/EyeClosedIcon2.js +18 -18
- package/dist/Icons/EyeOpenIcon.js +8 -8
- package/dist/Icons/GoToFirstIcon.js +1 -1
- package/dist/Icons/GoToLastIcon.js +3 -3
- package/dist/Icons/HarmonicCursorsIcon.js +4 -4
- package/dist/Icons/IconBase.d.ts +1 -1
- package/dist/Icons/IconBase.js +15 -17
- package/dist/Icons/InfoIcon.js +4 -4
- package/dist/Icons/LabelIcon.js +6 -6
- package/dist/Icons/LassoIcon.js +6 -6
- package/dist/Icons/LineToolIcon.js +22 -93
- package/dist/Icons/LineToolIcon2.d.ts +3 -0
- package/dist/Icons/LineToolIcon2.js +73 -0
- package/dist/Icons/LiveViewIcon.js +5 -5
- package/dist/Icons/LoaderIcon.js +5 -5
- package/dist/Icons/LocationIcon.js +5 -5
- package/dist/Icons/LogoutIcon.js +11 -11
- package/dist/Icons/MessagesIcon.js +22 -19
- package/dist/Icons/MetadataIcon.js +5 -5
- package/dist/Icons/MinusIcon.js +9 -9
- package/dist/Icons/OntologyIcon.js +74 -21
- package/dist/Icons/PanelIconClose.js +11 -11
- package/dist/Icons/PanelIconOpen.js +11 -11
- package/dist/Icons/PlayIcon.js +5 -5
- package/dist/Icons/PlusIcon.js +9 -8
- package/dist/Icons/ResetIcon.js +6 -6
- package/dist/Icons/ReviewedIcon.d.ts +3 -0
- package/dist/Icons/ReviewedIcon.js +44 -0
- package/dist/Icons/ScissorsIcon.js +9 -9
- package/dist/Icons/SettingsIcon.js +20 -22
- package/dist/Icons/SortAscendingIcon.d.ts +3 -0
- package/dist/Icons/SortAscendingIcon.js +73 -0
- package/dist/Icons/SortDescendingIcon.d.ts +3 -0
- package/dist/Icons/SortDescendingIcon.js +73 -0
- package/dist/Icons/StackIcon.d.ts +3 -0
- package/dist/Icons/StackIcon.js +43 -0
- package/dist/Icons/StarIcon.d.ts +3 -0
- package/dist/Icons/StarIcon.js +31 -0
- package/dist/Icons/TrashIcon.js +10 -10
- package/dist/Icons/UndoIcon.js +1 -1
- package/dist/Icons/UserIcon.js +1 -1
- package/dist/Icons/WarningIcon.js +9 -9
- package/dist/Icons/ZoomAllIcon.js +97 -57
- package/dist/Icons/ZoomXIcon.js +6 -6
- package/dist/Icons/ZoomYIcon.js +17 -8
- package/dist/Icons/index.d.ts +9 -0
- package/dist/Icons.js +114 -96
- package/dist/Input.js +30 -21
- package/dist/InputOTP.js +11 -2
- package/dist/MultiSelect/MultiSelectBase.js +6 -6
- package/dist/Select.d.ts +12 -12
- package/dist/Select.js +77 -68
- package/dist/Textarea.js +25 -16
- package/dist/Tray.js +25 -16
- package/dist/analyzer/network.webp +0 -0
- package/dist/analyzer/sunburst.webp +0 -0
- package/dist/analyzer/visual.webp +0 -0
- package/dist/components/Button/Button.d.ts +3 -3
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/Card/Card.d.ts +16 -0
- package/dist/components/Card/Card.d.ts.map +1 -0
- package/dist/components/Dialog/Dialog.d.ts +1 -1
- package/dist/components/Dialog/Dialog.d.ts.map +1 -1
- package/dist/components/Dialog/DialogBase.d.ts +5 -2
- package/dist/components/Dialog/DialogBase.d.ts.map +1 -1
- package/dist/components/Icons/AnalyzeIcon.d.ts +3 -0
- package/dist/components/Icons/AnalyzeIcon.d.ts.map +1 -0
- package/dist/components/Icons/ApprovedIcon.d.ts +3 -0
- package/dist/components/Icons/ApprovedIcon.d.ts.map +1 -0
- package/dist/components/Icons/DatabaseIcon.d.ts +3 -0
- package/dist/components/Icons/DatabaseIcon.d.ts.map +1 -0
- package/dist/components/Icons/DeleteIcon.d.ts.map +1 -1
- package/dist/components/Icons/EraserIcon.d.ts.map +1 -1
- package/dist/components/Icons/IconBase.d.ts +1 -1
- package/dist/components/Icons/IconBase.d.ts.map +1 -1
- package/dist/components/Icons/LineToolIcon.d.ts.map +1 -1
- package/dist/components/Icons/LineToolIcon2.d.ts +3 -0
- package/dist/components/Icons/LineToolIcon2.d.ts.map +1 -0
- package/dist/components/Icons/OntologyIcon.d.ts.map +1 -1
- package/dist/components/Icons/PlusIcon.d.ts.map +1 -1
- package/dist/components/Icons/ReviewedIcon.d.ts +3 -0
- package/dist/components/Icons/ReviewedIcon.d.ts.map +1 -0
- package/dist/components/Icons/SettingsIcon.d.ts.map +1 -1
- package/dist/components/Icons/SortAscendingIcon.d.ts +3 -0
- package/dist/components/Icons/SortAscendingIcon.d.ts.map +1 -0
- package/dist/components/Icons/SortDescendingIcon.d.ts +3 -0
- package/dist/components/Icons/SortDescendingIcon.d.ts.map +1 -0
- package/dist/components/Icons/StackIcon.d.ts +3 -0
- package/dist/components/Icons/StackIcon.d.ts.map +1 -0
- package/dist/components/Icons/StarIcon.d.ts +3 -0
- package/dist/components/Icons/StarIcon.d.ts.map +1 -0
- package/dist/components/Icons/ZoomAllIcon.d.ts.map +1 -1
- package/dist/components/Icons/ZoomYIcon.d.ts.map +1 -1
- package/dist/components/Icons/index.d.ts +9 -0
- package/dist/components/Icons/index.d.ts.map +1 -1
- package/dist/components/Select/Select.d.ts +12 -12
- package/dist/components/Select/Select.d.ts.map +1 -1
- package/dist/{createLucideIcon-CI1yJrZf.js → createLucideIcon-B_8CJpcQ.js} +4 -4
- package/dist/features/AuthCard/ForgotPasswordEmailForm.js +11 -2
- package/dist/features/AuthCard/PasswordInput.js +19 -10
- package/dist/features/AuthCard/SignInForm.js +21 -12
- package/dist/features/AuthCard/SignUpForm.js +21 -12
- package/dist/features/LabelingTools.js +11 -2
- package/dist/features/SensorMetadata.js +14 -5
- package/dist/features/SettingsPopover.js +21 -12
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/{loader-circle-CvdzOiQ_.js → loader-circle-CdRVlFhN.js} +2 -2
- package/dist/main.js +15630 -13510
- package/dist/primitives/select.js +41 -32
- package/dist/styles/main.css +1 -1
- package/dist/{x-BBpi7a_7.js → x-Dl66o_vF.js} +2 -2
- package/package.json +22 -22
- /package/dist/{list.yml.webp → analyzer/list.yml.webp} +0 -0
package/dist/Button.js
CHANGED
|
@@ -4,23 +4,28 @@ import { jsxs as s, jsx as o } from "react/jsx-runtime";
|
|
|
4
4
|
import { cn as u } from "./utils/twUtils.js";
|
|
5
5
|
import { c as y } from "./index-D29mdTf5.js";
|
|
6
6
|
import { forwardRef as h } from "react";
|
|
7
|
-
import { L as f } from "./loader-circle-
|
|
8
|
-
const
|
|
7
|
+
import { L as f } from "./loader-circle-CdRVlFhN.js";
|
|
8
|
+
const w = y(
|
|
9
9
|
`
|
|
10
|
-
!font-sans flex relative items-center justify-center gap-2 whitespace-nowrap transition-colors cursor-pointer rounded-lg border font-semibold
|
|
11
|
-
focus
|
|
10
|
+
!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
|
|
11
|
+
focus-visible:outline-1 focus-visible:outline-offset-2 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0
|
|
12
12
|
`,
|
|
13
13
|
{
|
|
14
14
|
variants: {
|
|
15
15
|
variant: {
|
|
16
|
-
primary:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
primary: `bg-button-primary-bg text-button-primary-text border-button-primary-border hover:bg-button-primary-bg--hover hover:text-button-primary-text--hover hover:border-button-primary-border--hover
|
|
17
|
+
focus-visible:outline-button-primary-border disabled:bg-button-primary-bg--disabled disabled:text-button-primary-text--disabled disabled:border-button-primary-border--disabled`,
|
|
18
|
+
secondary: `bg-button-secondary-bg border-button-secondary-border text-button-secondary-text hover:bg-button-secondary-bg--hover hover:text-button-secondary-text--hover
|
|
19
|
+
focus-visible:outline-button-secondary-border disabled:bg-button-secondary-bg--disabled disabled:text-button-secondary-text--disabled disabled:border-button-secondary-border--disabled`,
|
|
20
|
+
outline: `bg-button-outline-bg border-button-outline-border text-button-outline-text hover:bg-button-outline-bg--hover hover:text-button-outline-text--hover focus-visible:outline-button-outline-border
|
|
21
|
+
disabled:text-button-outline-text--disabled disabled:border-button-outline-border--disabled`,
|
|
22
|
+
ghost: "bg-button-ghost-bg border-none text-button-ghost-text hover:bg-button-ghost-bg--hover hover:text-button-ghost-text--hover focus-visible:outline-none disabled:text-button-ghost-text--disabled",
|
|
23
|
+
card: "bg-button-card-bg border-button-card-border"
|
|
20
24
|
},
|
|
21
25
|
size: {
|
|
22
26
|
default: "py-2 px-6 w-fit",
|
|
23
|
-
fullWidth: "py-2 px-6 w-full"
|
|
27
|
+
fullWidth: "py-2 px-6 w-full",
|
|
28
|
+
card: "py-2 px-3 w-fit"
|
|
24
29
|
},
|
|
25
30
|
state: {
|
|
26
31
|
default: "",
|
|
@@ -34,38 +39,40 @@ const N = y(
|
|
|
34
39
|
size: "default"
|
|
35
40
|
}
|
|
36
41
|
}
|
|
37
|
-
),
|
|
42
|
+
), N = h(
|
|
38
43
|
({
|
|
39
44
|
className: l,
|
|
40
45
|
dataTestId: g,
|
|
41
46
|
disabled: n,
|
|
42
47
|
endIcon: b,
|
|
43
|
-
errorMessage:
|
|
48
|
+
errorMessage: d,
|
|
44
49
|
label: p,
|
|
45
50
|
size: r,
|
|
46
|
-
startIcon:
|
|
51
|
+
startIcon: a,
|
|
47
52
|
state: t,
|
|
48
|
-
type:
|
|
53
|
+
type: c = "button",
|
|
49
54
|
variant: e,
|
|
50
|
-
...
|
|
55
|
+
...x
|
|
51
56
|
}, v) => {
|
|
52
|
-
const
|
|
57
|
+
const i = {
|
|
53
58
|
error: {
|
|
54
59
|
primary: "bg-button-danger border-button-danger text-button-primary-text pointer-events-none",
|
|
55
60
|
secondary: "bg-button-danger border-button-danger text-button-secondary-text pointer-events-none",
|
|
56
61
|
outline: "bg-transparent border-button-danger text-button-danger pointer-events-none",
|
|
57
|
-
ghost: "bg-transparent text-button-danger pointer-events-none"
|
|
62
|
+
ghost: "bg-transparent text-button-danger pointer-events-none",
|
|
63
|
+
card: "bg-transparent border-button-danger text-button-danger pointer-events-none"
|
|
58
64
|
},
|
|
59
65
|
loading: {
|
|
60
66
|
primary: "bg-button-primary-bg--disabled border-button-primary-border--disabled text-button-primary-text--disabled pointer-events-none",
|
|
61
67
|
secondary: "bg-button-secondary-bg--disabled border-button-secondary-border--disabled text-button-secondary-text--disabled pointer-events-none",
|
|
62
68
|
outline: "bg-button-outline-bg--disabled border-button-outline-border--disabled text-button-outline-text--disabled pointer-events-none",
|
|
63
|
-
ghost: "bg-transparent text-button-ghost-text--disabled pointer-events-none"
|
|
69
|
+
ghost: "bg-transparent text-button-ghost-text--disabled pointer-events-none",
|
|
70
|
+
card: "bg-button-card-bg--disabled border-button-card-border--disabled text-button-card-text--disabled pointer-events-none"
|
|
64
71
|
}
|
|
65
72
|
}, m = u(
|
|
66
|
-
|
|
67
|
-
t === "error" &&
|
|
68
|
-
t === "loading" &&
|
|
73
|
+
w({ variant: e, state: t, size: r }),
|
|
74
|
+
t === "error" && i.error[e || "primary"],
|
|
75
|
+
t === "loading" && i.loading[e || "primary"],
|
|
69
76
|
r,
|
|
70
77
|
l
|
|
71
78
|
);
|
|
@@ -79,21 +86,21 @@ const N = y(
|
|
|
79
86
|
"data-testid": g || `button-${e}`,
|
|
80
87
|
disabled: n,
|
|
81
88
|
ref: v,
|
|
82
|
-
type:
|
|
83
|
-
...
|
|
89
|
+
type: c,
|
|
90
|
+
...x,
|
|
84
91
|
children: [
|
|
85
|
-
|
|
92
|
+
a && /* @__PURE__ */ o("span", { className: "flex pr-2", "aria-hidden": !0, children: a }),
|
|
86
93
|
t === "loading" && /* @__PURE__ */ o(f, { className: "ml-2 animate-spin", size: 16 }),
|
|
87
94
|
b && t !== "loading" && /* @__PURE__ */ o("span", { className: "flex pl-2", "aria-hidden": !0, children: b }),
|
|
88
95
|
p
|
|
89
96
|
]
|
|
90
97
|
}
|
|
91
98
|
),
|
|
92
|
-
t === "error" &&
|
|
99
|
+
t === "error" && d && /* @__PURE__ */ o("p", { className: "text-danger-100 mt-2 text-xs", role: "alert", "aria-live": "assertive", children: d })
|
|
93
100
|
] });
|
|
94
101
|
}
|
|
95
102
|
);
|
|
96
|
-
|
|
103
|
+
N.displayName = "Button";
|
|
97
104
|
export {
|
|
98
|
-
|
|
105
|
+
N as Button
|
|
99
106
|
};
|
package/dist/ButtonIcon.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import "./styles/main.css";
|
|
3
3
|
import { jsx as a } from "react/jsx-runtime";
|
|
4
|
+
import "./Icons/AnalyzeIcon.js";
|
|
4
5
|
import "./Icons/AnnotationsIcon.js";
|
|
6
|
+
import "./Icons/ApprovedIcon.js";
|
|
5
7
|
import "./Icons/CalendarIcon.js";
|
|
6
8
|
import "./Icons/CheckCircleIcon.js";
|
|
7
9
|
import "./Icons/CheckSquareIcon.js";
|
|
@@ -12,6 +14,7 @@ import "./Icons/ClockIcon.js";
|
|
|
12
14
|
import "./Icons/CloseCircleIcon.js";
|
|
13
15
|
import "./Icons/CloseIcon.js";
|
|
14
16
|
import "./Icons/DashboardIcon.js";
|
|
17
|
+
import "./Icons/DatabaseIcon.js";
|
|
15
18
|
import "./Icons/DeleteIcon.js";
|
|
16
19
|
import "./Icons/DurationIcon.js";
|
|
17
20
|
import "./Icons/EmailIcon.js";
|
|
@@ -27,6 +30,7 @@ import "./Icons/InfoIcon.js";
|
|
|
27
30
|
import "./Icons/LabelIcon.js";
|
|
28
31
|
import "./Icons/LassoIcon.js";
|
|
29
32
|
import "./Icons/LineToolIcon.js";
|
|
33
|
+
import "./Icons/LineToolIcon2.js";
|
|
30
34
|
import "./Icons/LiveViewIcon.js";
|
|
31
35
|
import { LoaderIcon as N } from "./Icons/LoaderIcon.js";
|
|
32
36
|
import "./Icons/LocationIcon.js";
|
|
@@ -40,8 +44,13 @@ import "./Icons/PanelIconOpen.js";
|
|
|
40
44
|
import "./Icons/PlayIcon.js";
|
|
41
45
|
import "./Icons/PlusIcon.js";
|
|
42
46
|
import "./Icons/ResetIcon.js";
|
|
47
|
+
import "./Icons/ReviewedIcon.js";
|
|
43
48
|
import "./Icons/ScissorsIcon.js";
|
|
44
49
|
import "./Icons/SettingsIcon.js";
|
|
50
|
+
import "./Icons/SortAscendingIcon.js";
|
|
51
|
+
import "./Icons/SortDescendingIcon.js";
|
|
52
|
+
import "./Icons/StackIcon.js";
|
|
53
|
+
import "./Icons/StarIcon.js";
|
|
45
54
|
import "./Icons/TrashIcon.js";
|
|
46
55
|
import "./Icons/UndoIcon.js";
|
|
47
56
|
import "./Icons/UserIcon.js";
|
package/dist/Card.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import { ComponentProps } from 'react';
|
|
3
|
+
export type CardProps = ComponentProps<'div'> & VariantProps<typeof cardVariants> & {
|
|
4
|
+
asChild?: boolean;
|
|
5
|
+
};
|
|
6
|
+
declare const cardVariants: (props?: ({
|
|
7
|
+
variant?: "small" | "default" | null | undefined;
|
|
8
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
9
|
+
export declare const CardBase: ({ ...props }: CardProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const CardHeader: ({ className, ...props }: CardProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare const CardTitle: ({ className, asChild, ...props }: CardProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare const CardHeaderEndSlot: ({ className, asChild, ...props }: CardProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare const CardContent: ({ className, ...props }: CardProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare const Card: ({ className, variant, asChild, children, ...props }: CardProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=Card.d.ts.map
|
package/dist/Card.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import "./styles/main.css";
|
|
2
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
3
|
+
import { Slot as n } from "./primitives/slot.js";
|
|
4
|
+
import { cn as o } from "./utils/twUtils.js";
|
|
5
|
+
import { c } from "./index-D29mdTf5.js";
|
|
6
|
+
import "react";
|
|
7
|
+
const l = c("text-text-primary flex flex-col w-full card-effects p-3", {
|
|
8
|
+
variants: {
|
|
9
|
+
variant: {
|
|
10
|
+
default: "gap-6 rounded-xl content-card",
|
|
11
|
+
small: "data-card gap-2"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
defaultVariants: {
|
|
15
|
+
variant: "default"
|
|
16
|
+
}
|
|
17
|
+
}), v = ({ ...a }) => /* @__PURE__ */ r("div", { "data-slot": "card", ...a }), x = ({ className: a, ...t }) => /* @__PURE__ */ r(
|
|
18
|
+
"div",
|
|
19
|
+
{
|
|
20
|
+
"data-slot": "card-header",
|
|
21
|
+
className: o("@container/card-header flex items-center justify-between pb-4", a),
|
|
22
|
+
...t
|
|
23
|
+
}
|
|
24
|
+
), N = ({ className: a, asChild: t = !1, ...e }) => /* @__PURE__ */ r(t ? n : "div", { "data-slot": "card-title", className: o("text-xl leading-none font-semibold", a), ...e }), b = ({ className: a, asChild: t = !1, ...e }) => /* @__PURE__ */ r(t ? n : "div", { "data-slot": "card-action", className: o("justify-self-end", a), ...e }), g = ({ className: a, ...t }) => /* @__PURE__ */ r("div", { "data-slot": "card-content", className: a, ...t }), j = ({ className: a, variant: t, asChild: e = !1, children: d, ...s }) => /* @__PURE__ */ r(e ? n : "div", { "data-slot": "card", className: o(l({ variant: t }), a), ...s, children: d });
|
|
25
|
+
export {
|
|
26
|
+
j as Card,
|
|
27
|
+
v as CardBase,
|
|
28
|
+
g as CardContent,
|
|
29
|
+
x as CardHeader,
|
|
30
|
+
b as CardHeaderEndSlot,
|
|
31
|
+
N as CardTitle
|
|
32
|
+
};
|
package/dist/Checkbox.js
CHANGED
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
import "./styles/main.css";
|
|
3
3
|
import { jsxs as d, jsx as o } from "react/jsx-runtime";
|
|
4
4
|
import { CheckboxBase as l, CheckboxIndicator as b } from "./Checkbox/CheckboxBase.js";
|
|
5
|
+
import "./Icons/AnalyzeIcon.js";
|
|
5
6
|
import "./Icons/AnnotationsIcon.js";
|
|
7
|
+
import "./Icons/ApprovedIcon.js";
|
|
6
8
|
import "./Icons/CalendarIcon.js";
|
|
7
9
|
import "./Icons/CheckCircleIcon.js";
|
|
8
10
|
import "./Icons/CheckSquareIcon.js";
|
|
@@ -13,6 +15,7 @@ import "./Icons/ClockIcon.js";
|
|
|
13
15
|
import "./Icons/CloseCircleIcon.js";
|
|
14
16
|
import "./Icons/CloseIcon.js";
|
|
15
17
|
import "./Icons/DashboardIcon.js";
|
|
18
|
+
import "./Icons/DatabaseIcon.js";
|
|
16
19
|
import "./Icons/DeleteIcon.js";
|
|
17
20
|
import "./Icons/DurationIcon.js";
|
|
18
21
|
import "./Icons/EmailIcon.js";
|
|
@@ -28,6 +31,7 @@ import "./Icons/InfoIcon.js";
|
|
|
28
31
|
import "./Icons/LabelIcon.js";
|
|
29
32
|
import "./Icons/LassoIcon.js";
|
|
30
33
|
import "./Icons/LineToolIcon.js";
|
|
34
|
+
import "./Icons/LineToolIcon2.js";
|
|
31
35
|
import "./Icons/LiveViewIcon.js";
|
|
32
36
|
import "./Icons/LoaderIcon.js";
|
|
33
37
|
import "./Icons/LocationIcon.js";
|
|
@@ -41,8 +45,13 @@ import "./Icons/PanelIconOpen.js";
|
|
|
41
45
|
import "./Icons/PlayIcon.js";
|
|
42
46
|
import "./Icons/PlusIcon.js";
|
|
43
47
|
import "./Icons/ResetIcon.js";
|
|
48
|
+
import "./Icons/ReviewedIcon.js";
|
|
44
49
|
import "./Icons/ScissorsIcon.js";
|
|
45
50
|
import "./Icons/SettingsIcon.js";
|
|
51
|
+
import "./Icons/SortAscendingIcon.js";
|
|
52
|
+
import "./Icons/SortDescendingIcon.js";
|
|
53
|
+
import "./Icons/StackIcon.js";
|
|
54
|
+
import "./Icons/StarIcon.js";
|
|
46
55
|
import "./Icons/TrashIcon.js";
|
|
47
56
|
import "./Icons/UndoIcon.js";
|
|
48
57
|
import "./Icons/UserIcon.js";
|
|
@@ -53,7 +62,7 @@ import "./Icons/ZoomYIcon.js";
|
|
|
53
62
|
import { cn as t } from "./utils/twUtils.js";
|
|
54
63
|
import { forwardRef as x } from "react";
|
|
55
64
|
const k = x(
|
|
56
|
-
({ className:
|
|
65
|
+
({ className: i, id: r, labelText: e, onCheckedChange: m, checked: p, required: c, ...a }, s) => /* @__PURE__ */ d("div", { className: "flex items-center gap-2", children: [
|
|
57
66
|
/* @__PURE__ */ o(
|
|
58
67
|
l,
|
|
59
68
|
{
|
|
@@ -63,12 +72,12 @@ const k = x(
|
|
|
63
72
|
"focus-visible:outline-checkbox-border--focus focus:outline-none focus-visible:outline-1 focus-visible:outline-offset-2 disabled:cursor-not-allowed",
|
|
64
73
|
"data-[state=checked]:border-checkbox-border--checked disabled:opacity-50"
|
|
65
74
|
].join(" "),
|
|
66
|
-
|
|
75
|
+
i
|
|
67
76
|
),
|
|
68
77
|
"data-testid": "checkbox",
|
|
69
78
|
id: r,
|
|
70
79
|
"aria-labelledby": `${r}-label`,
|
|
71
|
-
"aria-required":
|
|
80
|
+
"aria-required": c,
|
|
72
81
|
onCheckedChange: m,
|
|
73
82
|
ref: s,
|
|
74
83
|
...a,
|
|
@@ -76,7 +85,7 @@ const k = x(
|
|
|
76
85
|
b,
|
|
77
86
|
{
|
|
78
87
|
className: t("checkbox-indicator text-checkbox-indicator--checked flex items-center justify-center"),
|
|
79
|
-
children:
|
|
88
|
+
children: p === "indeterminate" ? /* @__PURE__ */ o(h, { className: "checkbox-indeterminate", size: 16, strokeWidth: 4 }) : /* @__PURE__ */ o(n, { className: "checkbox-check", size: 16, strokeWidth: 4 })
|
|
80
89
|
}
|
|
81
90
|
)
|
|
82
91
|
}
|
|
@@ -87,7 +96,7 @@ const k = x(
|
|
|
87
96
|
htmlFor: r,
|
|
88
97
|
className: "text-md text-text-primary peer-disabled:text-neutral-400",
|
|
89
98
|
"data-testid": "checkbox-label",
|
|
90
|
-
children:
|
|
99
|
+
children: e
|
|
91
100
|
}
|
|
92
101
|
)
|
|
93
102
|
] })
|
|
@@ -5,6 +5,7 @@ export type DialogBaseProps = {
|
|
|
5
5
|
readonly defaultOpen?: boolean;
|
|
6
6
|
onOpenChange?: (isOpen: boolean) => void;
|
|
7
7
|
readonly children: ReactNode;
|
|
8
|
+
readonly modal?: boolean;
|
|
8
9
|
};
|
|
9
10
|
export type DialogContextValue = {
|
|
10
11
|
isOpen: boolean;
|
|
@@ -12,12 +13,13 @@ export type DialogContextValue = {
|
|
|
12
13
|
contentId: string;
|
|
13
14
|
titleId: string;
|
|
14
15
|
descriptionId: string;
|
|
16
|
+
modal: boolean;
|
|
15
17
|
};
|
|
16
18
|
export type TriggerableElement = ReactElement<{
|
|
17
19
|
onClick?: (...args: unknown[]) => void;
|
|
18
20
|
}>;
|
|
19
21
|
export declare function useDialogContext(): DialogContextValue;
|
|
20
|
-
export declare function DialogBase({ isOpen: controlledOpen, defaultOpen, onOpenChange, children }: DialogBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export declare function DialogBase({ isOpen: controlledOpen, defaultOpen, onOpenChange, children, modal, }: DialogBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
21
23
|
type DialogTriggerProps = {
|
|
22
24
|
readonly children: ReactNode;
|
|
23
25
|
readonly asChild?: boolean;
|
|
@@ -46,9 +48,10 @@ export type DialogContentProps = {
|
|
|
46
48
|
className?: string;
|
|
47
49
|
readonly size?: DialogSize;
|
|
48
50
|
onPointerDownOutside?: (event: PointerEvent) => void;
|
|
51
|
+
onInteractOutside?: (event: PointerEvent | KeyboardEvent) => void;
|
|
49
52
|
onEscapeKeyDown?: (event: KeyboardEvent) => void;
|
|
50
53
|
} & VariantProps<typeof contentVariants>;
|
|
51
|
-
export declare function DialogContentBase({ children, className, size, onPointerDownOutside, onEscapeKeyDown, }: DialogContentProps): import("react/jsx-runtime").JSX.Element | null;
|
|
54
|
+
export declare function DialogContentBase({ children, className, size, onPointerDownOutside, onInteractOutside, onEscapeKeyDown, }: DialogContentProps): import("react/jsx-runtime").JSX.Element | null;
|
|
52
55
|
type DialogTitleProps = {
|
|
53
56
|
readonly children: ReactNode;
|
|
54
57
|
className?: string;
|
|
@@ -1,62 +1,69 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import "../styles/main.css";
|
|
3
|
-
import { jsx as s, jsxs as
|
|
4
|
-
import { cn as
|
|
5
|
-
import { c as
|
|
6
|
-
import { createContext as
|
|
7
|
-
import { createPortal as
|
|
8
|
-
import { X as
|
|
9
|
-
const
|
|
10
|
-
function
|
|
11
|
-
const e = z
|
|
3
|
+
import { jsx as s, jsxs as E } from "react/jsx-runtime";
|
|
4
|
+
import { cn as f } from "../utils/twUtils.js";
|
|
5
|
+
import { c as P } from "../index-D29mdTf5.js";
|
|
6
|
+
import { createContext as V, useContext as L, useState as N, useMemo as I, useCallback as y, cloneElement as O, useEffect as w, useRef as k, isValidElement as B } from "react";
|
|
7
|
+
import { createPortal as j } from "react-dom";
|
|
8
|
+
import { X as A } from "../x-Dl66o_vF.js";
|
|
9
|
+
const z = V(null);
|
|
10
|
+
function m() {
|
|
11
|
+
const e = L(z);
|
|
12
12
|
if (!e)
|
|
13
13
|
throw new Error("Dialog components must be used within <Dialog>");
|
|
14
14
|
return e;
|
|
15
15
|
}
|
|
16
|
-
function
|
|
17
|
-
return
|
|
16
|
+
function R(e) {
|
|
17
|
+
return B(e) && typeof e.type != "string" ? !0 : B(e);
|
|
18
18
|
}
|
|
19
|
-
let
|
|
20
|
-
function
|
|
21
|
-
|
|
19
|
+
let D = 0;
|
|
20
|
+
function J({
|
|
21
|
+
isOpen: e,
|
|
22
|
+
defaultOpen: t = !1,
|
|
23
|
+
onOpenChange: n,
|
|
24
|
+
children: o,
|
|
25
|
+
modal: r = !0
|
|
26
|
+
}) {
|
|
27
|
+
const [u, i] = N(t), d = e !== void 0, g = d ? e : u, x = I(
|
|
22
28
|
() => ({
|
|
23
|
-
contentId: `dialog-content-${++
|
|
24
|
-
titleId: `dialog-title-${
|
|
25
|
-
descriptionId: `dialog-description-${
|
|
29
|
+
contentId: `dialog-content-${++D}`,
|
|
30
|
+
titleId: `dialog-title-${D}`,
|
|
31
|
+
descriptionId: `dialog-description-${D}`
|
|
26
32
|
}),
|
|
27
33
|
[]
|
|
28
|
-
),
|
|
34
|
+
), b = y(
|
|
29
35
|
(l) => {
|
|
30
|
-
|
|
36
|
+
d || i(l), n?.(l);
|
|
31
37
|
},
|
|
32
|
-
[
|
|
33
|
-
),
|
|
38
|
+
[d, n]
|
|
39
|
+
), C = I(
|
|
34
40
|
() => ({
|
|
35
|
-
isOpen:
|
|
36
|
-
setIsOpen:
|
|
37
|
-
|
|
41
|
+
isOpen: g,
|
|
42
|
+
setIsOpen: b,
|
|
43
|
+
modal: r,
|
|
44
|
+
...x
|
|
38
45
|
}),
|
|
39
|
-
[
|
|
46
|
+
[g, b, r, x]
|
|
40
47
|
);
|
|
41
|
-
return /* @__PURE__ */ s(
|
|
48
|
+
return /* @__PURE__ */ s(z.Provider, { value: C, children: o });
|
|
42
49
|
}
|
|
43
|
-
function
|
|
44
|
-
const { setIsOpen: n } =
|
|
50
|
+
function K({ children: e, asChild: t = !0 }) {
|
|
51
|
+
const { setIsOpen: n } = m(), o = y(() => {
|
|
45
52
|
n(!0);
|
|
46
53
|
}, [n]);
|
|
47
54
|
if (!t)
|
|
48
55
|
return /* @__PURE__ */ s("button", { onClick: o, children: e });
|
|
49
|
-
if (!
|
|
56
|
+
if (!R(e))
|
|
50
57
|
throw new Error("DialogTrigger expects a single React element as child");
|
|
51
58
|
const r = e.props.onClick;
|
|
52
|
-
return
|
|
53
|
-
onClick: (...
|
|
54
|
-
r?.(...
|
|
59
|
+
return O(e, {
|
|
60
|
+
onClick: (...u) => {
|
|
61
|
+
r?.(...u), o();
|
|
55
62
|
}
|
|
56
63
|
});
|
|
57
64
|
}
|
|
58
|
-
function
|
|
59
|
-
const { setIsOpen: n } =
|
|
65
|
+
function $({ children: e, asChild: t = !0 }) {
|
|
66
|
+
const { setIsOpen: n } = m(), o = y(() => {
|
|
60
67
|
n(!1);
|
|
61
68
|
}, [n]);
|
|
62
69
|
if (!t)
|
|
@@ -69,30 +76,30 @@ function L({ children: e, asChild: t = !0 }) {
|
|
|
69
76
|
children: e
|
|
70
77
|
}
|
|
71
78
|
);
|
|
72
|
-
if (!
|
|
79
|
+
if (!R(e))
|
|
73
80
|
throw new Error("DialogClose expects a single React element as child");
|
|
74
81
|
const r = e.props.onClick;
|
|
75
|
-
return
|
|
76
|
-
onClick: (...
|
|
77
|
-
r?.(...
|
|
82
|
+
return O(e, {
|
|
83
|
+
onClick: (...u) => {
|
|
84
|
+
r?.(...u), o();
|
|
78
85
|
}
|
|
79
86
|
});
|
|
80
87
|
}
|
|
81
|
-
function
|
|
82
|
-
const [n, o] =
|
|
83
|
-
return
|
|
88
|
+
function T({ children: e, container: t }) {
|
|
89
|
+
const [n, o] = N(!1);
|
|
90
|
+
return w(() => (o(!0), () => o(!1)), []), n ? j(e, t ?? document.body) : null;
|
|
84
91
|
}
|
|
85
|
-
function
|
|
86
|
-
const { isOpen: t, setIsOpen: n } =
|
|
92
|
+
function Q({ className: e }) {
|
|
93
|
+
const { isOpen: t, setIsOpen: n } = m(), o = y(
|
|
87
94
|
(r) => {
|
|
88
95
|
r.target === r.currentTarget && n(!1);
|
|
89
96
|
},
|
|
90
97
|
[n]
|
|
91
98
|
);
|
|
92
|
-
return t ? /* @__PURE__ */ s(
|
|
99
|
+
return t ? /* @__PURE__ */ s(T, { children: /* @__PURE__ */ s(
|
|
93
100
|
"div",
|
|
94
101
|
{
|
|
95
|
-
className:
|
|
102
|
+
className: f(
|
|
96
103
|
"data-[state=open]:animate-in data-[state=open]:fade-in-0 fixed inset-0 z-40 bg-black/50 backdrop-blur-sm",
|
|
97
104
|
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0",
|
|
98
105
|
e
|
|
@@ -103,7 +110,7 @@ function X({ className: e }) {
|
|
|
103
110
|
}
|
|
104
111
|
) }) : null;
|
|
105
112
|
}
|
|
106
|
-
const
|
|
113
|
+
const M = P(
|
|
107
114
|
[
|
|
108
115
|
"fixed left-1/2 top-1/2 z-50 w-full -translate-x-1/2 -translate-y-1/2 rounded-lg p-6 shadow-lg outline-none data-[state=open]:animate-in data-[state=open]:fade-in-0",
|
|
109
116
|
"data-[state=open]:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95"
|
|
@@ -123,58 +130,66 @@ const R = B(
|
|
|
123
130
|
}
|
|
124
131
|
}
|
|
125
132
|
);
|
|
126
|
-
function
|
|
133
|
+
function W({
|
|
127
134
|
children: e,
|
|
128
135
|
className: t,
|
|
129
136
|
size: n,
|
|
130
137
|
onPointerDownOutside: o,
|
|
131
|
-
|
|
138
|
+
onInteractOutside: r,
|
|
139
|
+
onEscapeKeyDown: u
|
|
132
140
|
}) {
|
|
133
|
-
const { isOpen:
|
|
134
|
-
return
|
|
135
|
-
if (!
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
141
|
+
const { isOpen: i, setIsOpen: d, contentId: g, titleId: x, descriptionId: b, modal: C } = m(), l = k(null), p = k(null), v = k(!1);
|
|
142
|
+
return w(() => {
|
|
143
|
+
if (!i) {
|
|
144
|
+
v.current && p.current && typeof p.current.focus == "function" && p.current.focus(), p.current = null, v.current = !1;
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
if (!l.current || v.current) return;
|
|
148
|
+
v.current = !0;
|
|
149
|
+
const c = l.current;
|
|
150
|
+
p.current = document.activeElement, setTimeout(() => {
|
|
151
|
+
if (!c || !l.current) return;
|
|
152
|
+
const a = document.activeElement;
|
|
153
|
+
(!c.contains(a) || a === document.body) && c.focus();
|
|
154
|
+
}, 0);
|
|
155
|
+
}, [i]), w(() => {
|
|
156
|
+
if (!i) return;
|
|
157
|
+
const c = (a) => {
|
|
158
|
+
a.key === "Escape" && (u?.(a), r?.(a), a.defaultPrevented || (a.preventDefault(), d(!1)));
|
|
144
159
|
};
|
|
145
|
-
return document.addEventListener("keydown",
|
|
146
|
-
document.removeEventListener("keydown",
|
|
160
|
+
return document.addEventListener("keydown", c, { capture: !0 }), () => {
|
|
161
|
+
document.removeEventListener("keydown", c, { capture: !0 });
|
|
147
162
|
};
|
|
148
|
-
}, [
|
|
149
|
-
if (!
|
|
150
|
-
const
|
|
151
|
-
const
|
|
152
|
-
|
|
163
|
+
}, [i, u, r, d]), w(() => {
|
|
164
|
+
if (!i) return;
|
|
165
|
+
const c = (a) => {
|
|
166
|
+
const h = a.target;
|
|
167
|
+
l.current && !l.current.contains(h) && (h.closest('[role="dialog"]') !== null || (o?.(a), r?.(a), !C && !a.defaultPrevented && d(!1)));
|
|
153
168
|
};
|
|
154
|
-
return document.addEventListener("pointerdown",
|
|
155
|
-
}, [
|
|
169
|
+
return document.addEventListener("pointerdown", c), () => document.removeEventListener("pointerdown", c);
|
|
170
|
+
}, [i, o, r, d, C]), i ? /* @__PURE__ */ s(T, { children: /* @__PURE__ */ E(
|
|
156
171
|
"div",
|
|
157
172
|
{
|
|
158
|
-
ref:
|
|
159
|
-
id:
|
|
173
|
+
ref: l,
|
|
174
|
+
id: g,
|
|
160
175
|
role: "dialog",
|
|
161
176
|
"aria-modal": "true",
|
|
162
|
-
"aria-labelledby":
|
|
163
|
-
"aria-describedby":
|
|
164
|
-
"data-state":
|
|
177
|
+
"aria-labelledby": x,
|
|
178
|
+
"aria-describedby": b,
|
|
179
|
+
"data-state": i ? "open" : "closed",
|
|
165
180
|
tabIndex: -1,
|
|
166
|
-
className:
|
|
181
|
+
className: f(M({ size: n }), t),
|
|
167
182
|
children: [
|
|
168
|
-
/* @__PURE__ */ s(
|
|
183
|
+
/* @__PURE__ */ s($, { asChild: !0, children: /* @__PURE__ */ E(
|
|
169
184
|
"button",
|
|
170
185
|
{
|
|
171
|
-
className:
|
|
186
|
+
className: f(
|
|
172
187
|
"ring-offset-background absolute top-4 right-4 rounded-sm opacity-70 transition-opacity hover:opacity-100",
|
|
173
188
|
"focus:ring-ring focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none"
|
|
174
189
|
),
|
|
175
190
|
"aria-label": "Close dialog",
|
|
176
191
|
children: [
|
|
177
|
-
/* @__PURE__ */ s(
|
|
192
|
+
/* @__PURE__ */ s(A, { className: "h-4 w-4" }),
|
|
178
193
|
/* @__PURE__ */ s("span", { className: "sr-only", children: "Close" })
|
|
179
194
|
]
|
|
180
195
|
}
|
|
@@ -184,30 +199,30 @@ function q({
|
|
|
184
199
|
}
|
|
185
200
|
) }) : null;
|
|
186
201
|
}
|
|
187
|
-
function
|
|
188
|
-
const { titleId: n } =
|
|
189
|
-
return /* @__PURE__ */ s("h2", { id: n, className:
|
|
202
|
+
function Y({ children: e, className: t }) {
|
|
203
|
+
const { titleId: n } = m();
|
|
204
|
+
return /* @__PURE__ */ s("h2", { id: n, className: f("text-base leading-none font-semibold tracking-tight", t), children: e });
|
|
190
205
|
}
|
|
191
|
-
function
|
|
192
|
-
const { descriptionId: n } =
|
|
193
|
-
return /* @__PURE__ */ s("p", { id: n, className:
|
|
206
|
+
function Z({ children: e, className: t }) {
|
|
207
|
+
const { descriptionId: n } = m();
|
|
208
|
+
return /* @__PURE__ */ s("p", { id: n, className: f("text-text-secondary text-sm", t), children: e });
|
|
194
209
|
}
|
|
195
|
-
function
|
|
196
|
-
return /* @__PURE__ */ s("div", { className:
|
|
210
|
+
function _({ children: e, className: t }) {
|
|
211
|
+
return /* @__PURE__ */ s("div", { className: f("flex flex-col space-y-1.5 text-center text-left", t), children: e });
|
|
197
212
|
}
|
|
198
|
-
function
|
|
199
|
-
return /* @__PURE__ */ s("div", { className:
|
|
213
|
+
function ee({ children: e, className: t }) {
|
|
214
|
+
return /* @__PURE__ */ s("div", { className: f("flex flex-col-reverse flex-row justify-end space-x-2", t), children: e });
|
|
200
215
|
}
|
|
201
216
|
export {
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
217
|
+
J as DialogBase,
|
|
218
|
+
$ as DialogCloseBase,
|
|
219
|
+
W as DialogContentBase,
|
|
220
|
+
Z as DialogDescriptionBase,
|
|
221
|
+
ee as DialogFooterBase,
|
|
222
|
+
_ as DialogHeaderBase,
|
|
223
|
+
Q as DialogOverlayBase,
|
|
224
|
+
T as DialogPortalBase,
|
|
225
|
+
Y as DialogTitleBase,
|
|
226
|
+
K as DialogTriggerBase,
|
|
227
|
+
m as useDialogContext
|
|
213
228
|
};
|
package/dist/Dialog.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ declare function DialogTrigger({ ...props }: ComponentProps<typeof DialogTrigger
|
|
|
5
5
|
declare function DialogPortal({ ...props }: ComponentProps<typeof DialogPortalBase>): import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
declare function DialogClose({ ...props }: ComponentProps<typeof DialogCloseBase>): import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
declare function DialogOverlay({ className, ...props }: ComponentProps<typeof DialogOverlayBase>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
declare function DialogContent({ className, children, ...props }: ComponentProps<typeof DialogContentBase> & {
|
|
8
|
+
declare function DialogContent({ className, children, onInteractOutside, onPointerDownOutside, onEscapeKeyDown, ...props }: ComponentProps<typeof DialogContentBase> & {
|
|
9
9
|
showCloseButton?: boolean;
|
|
10
10
|
}): import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
declare function DialogHeader({ className, ...props }: ComponentProps<typeof DialogHeaderBase>): import("react/jsx-runtime").JSX.Element;
|