@examplary/ui 1.15.0 → 1.16.0
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/components/question-types/format-question-type.d.ts +1 -1
- package/dist/components/ui/alert.d.ts +9 -0
- package/dist/components/ui/alert.js +50 -0
- package/dist/components/ui/card.d.ts +8 -0
- package/dist/components/ui/card.js +56 -0
- package/dist/components/ui/checkbox.js +0 -1
- package/dist/components/ui/dialog.d.ts +21 -0
- package/dist/components/ui/dialog.js +66 -0
- package/dist/components/ui/dropdown.d.ts +27 -0
- package/dist/components/ui/dropdown.js +83 -0
- package/dist/components/ui/form.d.ts +23 -0
- package/dist/components/ui/form.js +82 -0
- package/dist/components/ui/index.d.ts +15 -0
- package/dist/components/ui/index.js +15 -0
- package/dist/components/ui/label.js +0 -1
- package/dist/components/ui/popover.d.ts +10 -0
- package/dist/components/ui/popover.js +37 -0
- package/dist/components/ui/progress-bar.d.ts +3 -0
- package/dist/components/ui/progress-bar.js +5 -0
- package/dist/components/ui/radio-group.js +0 -1
- package/dist/components/ui/resizable.d.ts +10 -0
- package/dist/components/ui/resizable.js +63 -0
- package/dist/components/ui/separator.d.ts +4 -0
- package/dist/components/ui/separator.js +32 -0
- package/dist/components/ui/sheet.d.ts +25 -0
- package/dist/components/ui/sheet.js +76 -0
- package/dist/components/ui/slider.d.ts +4 -0
- package/dist/components/ui/slider.js +38 -0
- package/dist/components/ui/switch.d.ts +4 -0
- package/dist/components/ui/switch.js +32 -0
- package/dist/components/ui/table.d.ts +10 -0
- package/dist/components/ui/table.js +66 -0
- package/dist/components/ui/textarea.d.ts +4 -0
- package/dist/components/ui/textarea.js +31 -0
- package/dist/components/ui/tooltip.d.ts +7 -0
- package/dist/components/ui/tooltip.js +35 -0
- package/dist/src/global.css +1 -1
- package/dist/utils.d.ts +1 -1
- package/package.json +12 -3
|
@@ -16,7 +16,7 @@ export declare const formatQuestionType: (type: QuestionType, i18n: any) => {
|
|
|
16
16
|
value: string;
|
|
17
17
|
}[];
|
|
18
18
|
id: string;
|
|
19
|
-
type: "string" | "number" | "boolean" | "
|
|
19
|
+
type: "string" | "number" | "boolean" | "custom" | "enum" | "string-array" | "scoring-criteria" | "tags" | "question-type";
|
|
20
20
|
description?: string;
|
|
21
21
|
index?: number;
|
|
22
22
|
hidden?: boolean;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
declare const alertVariants: (props?: {
|
|
4
|
+
variant?: "default" | "secondary" | "destructive";
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) => string;
|
|
6
|
+
declare function Alert({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof alertVariants>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function AlertTitle({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function AlertDescription({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export { Alert, AlertTitle, AlertDescription };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
+
import { cva } from "class-variance-authority";
|
|
25
|
+
import { cn } from "../../utils";
|
|
26
|
+
var alertVariants = cva("relative w-full rounded-xl border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current shadow-shadow border-neutral-800", {
|
|
27
|
+
variants: {
|
|
28
|
+
variant: {
|
|
29
|
+
default: "bg-white border-border",
|
|
30
|
+
secondary: "border-0 bg-accent",
|
|
31
|
+
destructive: "bg-red-400 border-0 text-white",
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
defaultVariants: {
|
|
35
|
+
variant: "default",
|
|
36
|
+
},
|
|
37
|
+
});
|
|
38
|
+
function Alert(_a) {
|
|
39
|
+
var className = _a.className, variant = _a.variant, props = __rest(_a, ["className", "variant"]);
|
|
40
|
+
return (_jsx("div", __assign({ "data-slot": "alert", role: "alert", className: cn(alertVariants({ variant: variant }), className) }, props)));
|
|
41
|
+
}
|
|
42
|
+
function AlertTitle(_a) {
|
|
43
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
44
|
+
return (_jsx("div", __assign({ "data-slot": "alert-title", className: cn("col-start-2 line-clamp-1 min-h-4 font-heading font-medium text-base", className) }, props)));
|
|
45
|
+
}
|
|
46
|
+
function AlertDescription(_a) {
|
|
47
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
48
|
+
return (_jsx("div", __assign({ "data-slot": "alert-description", className: cn("col-start-2 grid justify-items-start gap-1 text-sm font-base [&_p]:leading-relaxed", className) }, props)));
|
|
49
|
+
}
|
|
50
|
+
export { Alert, AlertTitle, AlertDescription };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare const Card: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
3
|
+
declare const CardHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
+
declare const CardTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
5
|
+
declare const CardDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
6
|
+
declare const CardContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
declare const CardFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent, };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
+
import * as React from "react";
|
|
25
|
+
import { cn } from "../../utils";
|
|
26
|
+
var Card = React.forwardRef(function (_a, ref) {
|
|
27
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
28
|
+
return (_jsx("div", __assign({ ref: ref, className: cn("rounded-xl border border-border bg-white text-black", className) }, props)));
|
|
29
|
+
});
|
|
30
|
+
Card.displayName = "Card";
|
|
31
|
+
var CardHeader = React.forwardRef(function (_a, ref) {
|
|
32
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
33
|
+
return (_jsx("div", __assign({ ref: ref, className: cn("flex flex-col space-y-1.5 p-6", className) }, props)));
|
|
34
|
+
});
|
|
35
|
+
CardHeader.displayName = "CardHeader";
|
|
36
|
+
var CardTitle = React.forwardRef(function (_a, ref) {
|
|
37
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
38
|
+
return (_jsx("div", __assign({ ref: ref, className: cn("text-xl leading-none font-heading", className) }, props)));
|
|
39
|
+
});
|
|
40
|
+
CardTitle.displayName = "CardTitle";
|
|
41
|
+
var CardDescription = React.forwardRef(function (_a, ref) {
|
|
42
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
43
|
+
return (_jsx("div", __assign({ ref: ref, className: cn("text-sm text-black font-base !mt-3", className) }, props)));
|
|
44
|
+
});
|
|
45
|
+
CardDescription.displayName = "CardDescription";
|
|
46
|
+
var CardContent = React.forwardRef(function (_a, ref) {
|
|
47
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
48
|
+
return (_jsx("div", __assign({ ref: ref, className: cn("p-6 pt-0", className) }, props)));
|
|
49
|
+
});
|
|
50
|
+
CardContent.displayName = "CardContent";
|
|
51
|
+
var CardFooter = React.forwardRef(function (_a, ref) {
|
|
52
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
53
|
+
return (_jsx("div", __assign({ ref: ref, className: cn("flex items-center p-6 pt-0", className) }, props)));
|
|
54
|
+
});
|
|
55
|
+
CardFooter.displayName = "CardFooter";
|
|
56
|
+
export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent, };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
3
|
+
declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
|
|
4
|
+
declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
|
|
6
|
+
declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
7
|
+
declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
9
|
+
showClose?: boolean;
|
|
10
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
declare const DialogHeader: {
|
|
12
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
displayName: string;
|
|
14
|
+
};
|
|
15
|
+
declare const DialogFooter: {
|
|
16
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
displayName: string;
|
|
18
|
+
};
|
|
19
|
+
declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
20
|
+
declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
21
|
+
export { Dialog, DialogPortal, DialogOverlay, DialogClose, DialogTrigger, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, };
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
|
+
import * as React from "react";
|
|
25
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
26
|
+
import { X } from "lucide-react";
|
|
27
|
+
import { Button } from "./button";
|
|
28
|
+
import { cn } from "../../utils";
|
|
29
|
+
var Dialog = DialogPrimitive.Root;
|
|
30
|
+
var DialogTrigger = DialogPrimitive.Trigger;
|
|
31
|
+
var DialogPortal = DialogPrimitive.Portal;
|
|
32
|
+
var DialogClose = DialogPrimitive.Close;
|
|
33
|
+
var DialogOverlay = React.forwardRef(function (_a, ref) {
|
|
34
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
35
|
+
return (_jsx(DialogPrimitive.Overlay, __assign({ ref: ref, className: cn("fixed inset-0 z-50 bg-nav/75 backdrop-blur-xs transition data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", className) }, props)));
|
|
36
|
+
});
|
|
37
|
+
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
38
|
+
var DialogContent = React.forwardRef(function (_a, ref) {
|
|
39
|
+
var className = _a.className, children = _a.children, _b = _a.showClose, showClose = _b === void 0 ? true : _b, props = __rest(_a, ["className", "children", "showClose"]);
|
|
40
|
+
return (_jsxs(DialogPortal, { children: [_jsx(DialogOverlay, {}), _jsxs(DialogPrimitive.Content, __assign({ ref: ref, className: cn("fixed left-[50%] top-[50%] z-50 w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-border-accent rounded-xl bg-bg p-6 lg:p-9 duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-top-[48%]", className), onCloseAutoFocus: function (event) {
|
|
41
|
+
event.preventDefault();
|
|
42
|
+
document.body.style.pointerEvents = "";
|
|
43
|
+
} }, props, { children: [children, showClose && (_jsx(DialogPrimitive.Close, { asChild: true, children: _jsxs(Button, { variant: "roundedSecondary", size: "icon-sm", className: "absolute right-4 lg:right-7 top-4 lg:top-7 bg-white", children: [_jsx(X, { strokeWidth: 2.5 }), _jsx("span", { className: "sr-only", children: "Close" })] }) }))] }))] }));
|
|
44
|
+
});
|
|
45
|
+
DialogContent.displayName = DialogPrimitive.Content.displayName;
|
|
46
|
+
var DialogHeader = function (_a) {
|
|
47
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
48
|
+
return (_jsx("div", __assign({ className: cn("flex flex-col space-y-1.5 text-center sm:text-left", className) }, props)));
|
|
49
|
+
};
|
|
50
|
+
DialogHeader.displayName = "DialogHeader";
|
|
51
|
+
var DialogFooter = function (_a) {
|
|
52
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
53
|
+
return (_jsx("div", __assign({ className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className) }, props)));
|
|
54
|
+
};
|
|
55
|
+
DialogFooter.displayName = "DialogFooter";
|
|
56
|
+
var DialogTitle = React.forwardRef(function (_a, ref) {
|
|
57
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
58
|
+
return (_jsx(DialogPrimitive.Title, __assign({ ref: ref, className: cn("text-2xl font-heading font-medium leading-none mb-3", className) }, props)));
|
|
59
|
+
});
|
|
60
|
+
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
61
|
+
var DialogDescription = React.forwardRef(function (_a, ref) {
|
|
62
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
63
|
+
return (_jsx(DialogPrimitive.Description, __assign({ ref: ref, className: cn("text-sm font-base text-text", className) }, props)));
|
|
64
|
+
});
|
|
65
|
+
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
66
|
+
export { Dialog, DialogPortal, DialogOverlay, DialogClose, DialogTrigger, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
3
|
+
declare const DropdownMenu: React.FC<DropdownMenuPrimitive.DropdownMenuProps>;
|
|
4
|
+
declare const DropdownMenuTrigger: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
declare const DropdownMenuGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
declare const DropdownMenuPortal: React.FC<DropdownMenuPrimitive.DropdownMenuPortalProps>;
|
|
7
|
+
declare const DropdownMenuSub: React.FC<DropdownMenuPrimitive.DropdownMenuSubProps>;
|
|
8
|
+
declare const DropdownMenuRadioGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
declare const DropdownMenuSubTrigger: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubTriggerProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
10
|
+
inset?: boolean;
|
|
11
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
declare const DropdownMenuSubContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
declare const DropdownMenuContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
14
|
+
declare const DropdownMenuItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
15
|
+
inset?: boolean;
|
|
16
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
17
|
+
declare const DropdownMenuCheckboxItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuCheckboxItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
18
|
+
declare const DropdownMenuRadioItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuRadioItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
19
|
+
declare const DropdownMenuLabel: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
20
|
+
inset?: boolean;
|
|
21
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
22
|
+
declare const DropdownMenuSeparator: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
23
|
+
declare const DropdownMenuShortcut: {
|
|
24
|
+
({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
displayName: string;
|
|
26
|
+
};
|
|
27
|
+
export { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuGroup, DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuRadioGroup, };
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
|
+
import * as React from "react";
|
|
25
|
+
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
26
|
+
import { Check, ChevronRight, Circle } from "lucide-react";
|
|
27
|
+
import { cn } from "../../utils";
|
|
28
|
+
var DropdownMenu = DropdownMenuPrimitive.Root;
|
|
29
|
+
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
30
|
+
var DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
31
|
+
var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
|
32
|
+
var DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
|
33
|
+
var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
34
|
+
var DropdownMenuSubTrigger = React.forwardRef(function (_a, ref) {
|
|
35
|
+
var className = _a.className, inset = _a.inset, children = _a.children, props = __rest(_a, ["className", "inset", "children"]);
|
|
36
|
+
return (_jsxs(DropdownMenuPrimitive.SubTrigger, __assign({ ref: ref, className: cn("flex cursor-default select-none items-center rounded-base bg-white px-2 py-1.5 text-sm font-base outline-none gap-2 [&_svg]:pointer-events-none [&_svg]:w-4 [&_svg]:h-4 [&_svg]:shrink-0", inset && "pl-8", className) }, props, { children: [children, _jsx(ChevronRight, { className: "ml-auto" })] })));
|
|
37
|
+
});
|
|
38
|
+
DropdownMenuSubTrigger.displayName =
|
|
39
|
+
DropdownMenuPrimitive.SubTrigger.displayName;
|
|
40
|
+
var DropdownMenuSubContent = React.forwardRef(function (_a, ref) {
|
|
41
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
42
|
+
return (_jsx(DropdownMenuPrimitive.SubContent, __assign({ ref: ref, className: cn("z-50 min-w-[8rem] overflow-hidden rounded-base border border-border-accent bg-white p-1 font-base text-text data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", className) }, props)));
|
|
43
|
+
});
|
|
44
|
+
DropdownMenuSubContent.displayName =
|
|
45
|
+
DropdownMenuPrimitive.SubContent.displayName;
|
|
46
|
+
var DropdownMenuContent = React.forwardRef(function (_a, ref) {
|
|
47
|
+
var className = _a.className, _b = _a.sideOffset, sideOffset = _b === void 0 ? 4 : _b, props = __rest(_a, ["className", "sideOffset"]);
|
|
48
|
+
return (_jsx(DropdownMenuPrimitive.Portal, { children: _jsx(DropdownMenuPrimitive.Content, __assign({ ref: ref, sideOffset: sideOffset, className: cn("z-50 min-w-[8rem] overflow-hidden rounded-lg shadow-xl border border-border-accent bg-white p-1 font-base text-text data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", className) }, props)) }));
|
|
49
|
+
});
|
|
50
|
+
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
51
|
+
var DropdownMenuItem = React.forwardRef(function (_a, ref) {
|
|
52
|
+
var className = _a.className, inset = _a.inset, props = __rest(_a, ["className", "inset"]);
|
|
53
|
+
return (_jsx(DropdownMenuPrimitive.Item, __assign({ ref: ref, className: cn("relative gap-2 [&_svg]:pointer-events-none [&_svg]:w-4 [&_svg]:h-4 [&_svg]:shrink-0 flex select-none items-center rounded-base px-2 py-1.5 text-sm hover:bg-zinc-100 cursor-pointer font-base outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50", inset && "pl-8", className) }, props)));
|
|
54
|
+
});
|
|
55
|
+
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
56
|
+
var DropdownMenuCheckboxItem = React.forwardRef(function (_a, ref) {
|
|
57
|
+
var className = _a.className, children = _a.children, checked = _a.checked, props = __rest(_a, ["className", "children", "checked"]);
|
|
58
|
+
return (_jsxs(DropdownMenuPrimitive.CheckboxItem, __assign({ ref: ref, className: cn("relative flex cursor-pointer select-none items-center rounded-base py-1.5 pl-8 pr-2 text-sm font-base text-text outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className), checked: checked }, props, { children: [_jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: _jsx(DropdownMenuPrimitive.ItemIndicator, { children: _jsx(Check, { className: "h-4 w-4" }) }) }), children] })));
|
|
59
|
+
});
|
|
60
|
+
DropdownMenuCheckboxItem.displayName =
|
|
61
|
+
DropdownMenuPrimitive.CheckboxItem.displayName;
|
|
62
|
+
var DropdownMenuRadioItem = React.forwardRef(function (_a, ref) {
|
|
63
|
+
var className = _a.className, children = _a.children, props = __rest(_a, ["className", "children"]);
|
|
64
|
+
return (_jsxs(DropdownMenuPrimitive.RadioItem, __assign({ ref: ref, className: cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm font-base outline-none transition-colors focus:bg-white focus:text-text data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className) }, props, { children: [_jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: _jsx(DropdownMenuPrimitive.ItemIndicator, { children: _jsx(Circle, { className: "h-2 w-2 fill-current" }) }) }), children] })));
|
|
65
|
+
});
|
|
66
|
+
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
|
67
|
+
var DropdownMenuLabel = React.forwardRef(function (_a, ref) {
|
|
68
|
+
var className = _a.className, inset = _a.inset, props = __rest(_a, ["className", "inset"]);
|
|
69
|
+
return (_jsx(DropdownMenuPrimitive.Label, __assign({ ref: ref, className: cn("px-2 py-1.5 text-sm font-heading font-semibold", inset && "pl-8", className) }, props)));
|
|
70
|
+
});
|
|
71
|
+
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
72
|
+
var DropdownMenuSeparator = React.forwardRef(function (_a, ref) {
|
|
73
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
74
|
+
return (_jsx(DropdownMenuPrimitive.Separator, __assign({ ref: ref, className: cn("-mx-1 my-1 h-[1px] bg-border-accent", className) }, props)));
|
|
75
|
+
});
|
|
76
|
+
DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
|
|
77
|
+
var DropdownMenuShortcut = function (_a) {
|
|
78
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
79
|
+
// TODO: replace ⌘ with Ctrl on Windows
|
|
80
|
+
return (_jsx("span", __assign({ className: cn("ml-auto pl-1 text-xs font-medium text-zinc-400 tracking-widest opacity-100", className) }, props)));
|
|
81
|
+
};
|
|
82
|
+
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
83
|
+
export { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuGroup, DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuRadioGroup, };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { ControllerProps, FieldPath, FieldValues } from "react-hook-form";
|
|
3
|
+
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
4
|
+
declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>(props: import("react-hook-form").FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element;
|
|
5
|
+
declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare const useFormField: () => {
|
|
7
|
+
invalid: boolean;
|
|
8
|
+
isDirty: boolean;
|
|
9
|
+
isTouched: boolean;
|
|
10
|
+
isValidating: boolean;
|
|
11
|
+
error?: import("react-hook-form").FieldError;
|
|
12
|
+
id: string;
|
|
13
|
+
name: string;
|
|
14
|
+
formItemId: string;
|
|
15
|
+
formDescriptionId: string;
|
|
16
|
+
formMessageId: string;
|
|
17
|
+
};
|
|
18
|
+
declare const FormItem: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
19
|
+
declare const FormLabel: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & React.RefAttributes<HTMLLabelElement>>;
|
|
20
|
+
declare const FormControl: React.ForwardRefExoticComponent<Omit<import("@radix-ui/react-slot").SlotProps & React.RefAttributes<HTMLElement>, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
21
|
+
declare const FormDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
22
|
+
declare const FormMessage: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
23
|
+
export { useFormField, Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField, };
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
+
import * as React from "react";
|
|
25
|
+
import { Controller, FormProvider, useFormContext, } from "react-hook-form";
|
|
26
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
27
|
+
import { Label, cn } from "../..";
|
|
28
|
+
var Form = FormProvider;
|
|
29
|
+
var FormFieldContext = React.createContext({});
|
|
30
|
+
var FormField = function (_a) {
|
|
31
|
+
var props = __rest(_a, []);
|
|
32
|
+
return (_jsx(FormFieldContext.Provider, { value: { name: props.name }, children: _jsx(Controller, __assign({}, props)) }));
|
|
33
|
+
};
|
|
34
|
+
var useFormField = function () {
|
|
35
|
+
var fieldContext = React.useContext(FormFieldContext);
|
|
36
|
+
var itemContext = React.useContext(FormItemContext);
|
|
37
|
+
var _a = useFormContext(), getFieldState = _a.getFieldState, formState = _a.formState;
|
|
38
|
+
var fieldState = getFieldState(fieldContext.name, formState);
|
|
39
|
+
if (!fieldContext) {
|
|
40
|
+
throw new Error("useFormField should be used within <FormField>");
|
|
41
|
+
}
|
|
42
|
+
var id = itemContext.id;
|
|
43
|
+
return __assign({ id: id, name: fieldContext.name, formItemId: "".concat(id, "-form-item"), formDescriptionId: "".concat(id, "-form-item-description"), formMessageId: "".concat(id, "-form-item-message") }, fieldState);
|
|
44
|
+
};
|
|
45
|
+
var FormItemContext = React.createContext({});
|
|
46
|
+
var FormItem = React.forwardRef(function (_a, ref) {
|
|
47
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
48
|
+
var id = React.useId();
|
|
49
|
+
return (_jsx(FormItemContext.Provider, { value: { id: id }, children: _jsx("div", __assign({ ref: ref, className: cn("space-y-2", className) }, props)) }));
|
|
50
|
+
});
|
|
51
|
+
FormItem.displayName = "FormItem";
|
|
52
|
+
var FormLabel = React.forwardRef(function (_a, ref) {
|
|
53
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
54
|
+
var _b = useFormField(), error = _b.error, formItemId = _b.formItemId;
|
|
55
|
+
return (_jsx(Label, __assign({ ref: ref, className: cn(error && "text-red-500 dark:text-red-900", className), htmlFor: formItemId }, props)));
|
|
56
|
+
});
|
|
57
|
+
FormLabel.displayName = "FormLabel";
|
|
58
|
+
var FormControl = React.forwardRef(function (_a, ref) {
|
|
59
|
+
var props = __rest(_a, []);
|
|
60
|
+
var _b = useFormField(), error = _b.error, formItemId = _b.formItemId, formDescriptionId = _b.formDescriptionId, formMessageId = _b.formMessageId;
|
|
61
|
+
return (_jsx(Slot, __assign({ ref: ref, id: formItemId, "aria-describedby": !error
|
|
62
|
+
? "".concat(formDescriptionId)
|
|
63
|
+
: "".concat(formDescriptionId, " ").concat(formMessageId), "aria-invalid": !!error }, props)));
|
|
64
|
+
});
|
|
65
|
+
FormControl.displayName = "FormControl";
|
|
66
|
+
var FormDescription = React.forwardRef(function (_a, ref) {
|
|
67
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
68
|
+
var formDescriptionId = useFormField().formDescriptionId;
|
|
69
|
+
return (_jsx("p", __assign({ ref: ref, id: formDescriptionId, className: cn("text-sm text-neutral-500 dark:text-neutral-400", className) }, props)));
|
|
70
|
+
});
|
|
71
|
+
FormDescription.displayName = "FormDescription";
|
|
72
|
+
var FormMessage = React.forwardRef(function (_a, ref) {
|
|
73
|
+
var className = _a.className, children = _a.children, props = __rest(_a, ["className", "children"]);
|
|
74
|
+
var _b = useFormField(), error = _b.error, formMessageId = _b.formMessageId;
|
|
75
|
+
var body = error ? String(error === null || error === void 0 ? void 0 : error.message) : children;
|
|
76
|
+
if (!body) {
|
|
77
|
+
return null;
|
|
78
|
+
}
|
|
79
|
+
return (_jsx("p", __assign({ ref: ref, id: formMessageId, className: cn("text-sm font-medium text-red-500 dark:text-red-900", className) }, props, { children: body })));
|
|
80
|
+
});
|
|
81
|
+
FormMessage.displayName = "FormMessage";
|
|
82
|
+
export { useFormField, Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField, };
|
|
@@ -5,3 +5,18 @@ export * from "./radio-group";
|
|
|
5
5
|
export * from "./label";
|
|
6
6
|
export * from "./checkbox";
|
|
7
7
|
export * from "./badge";
|
|
8
|
+
export * from "./alert";
|
|
9
|
+
export * from "./card";
|
|
10
|
+
export * from "./dialog";
|
|
11
|
+
export * from "./form";
|
|
12
|
+
export * from "./dropdown";
|
|
13
|
+
export * from "./popover";
|
|
14
|
+
export * from "./progress-bar";
|
|
15
|
+
export * from "./resizable";
|
|
16
|
+
export * from "./separator";
|
|
17
|
+
export * from "./sheet";
|
|
18
|
+
export * from "./slider";
|
|
19
|
+
export * from "./switch";
|
|
20
|
+
export * from "./table";
|
|
21
|
+
export * from "./textarea";
|
|
22
|
+
export * from "./tooltip";
|
|
@@ -5,3 +5,18 @@ export * from "./radio-group";
|
|
|
5
5
|
export * from "./label";
|
|
6
6
|
export * from "./checkbox";
|
|
7
7
|
export * from "./badge";
|
|
8
|
+
export * from "./alert";
|
|
9
|
+
export * from "./card";
|
|
10
|
+
export * from "./dialog";
|
|
11
|
+
export * from "./form";
|
|
12
|
+
export * from "./dropdown";
|
|
13
|
+
export * from "./popover";
|
|
14
|
+
export * from "./progress-bar";
|
|
15
|
+
export * from "./resizable";
|
|
16
|
+
export * from "./separator";
|
|
17
|
+
export * from "./sheet";
|
|
18
|
+
export * from "./slider";
|
|
19
|
+
export * from "./switch";
|
|
20
|
+
export * from "./table";
|
|
21
|
+
export * from "./textarea";
|
|
22
|
+
export * from "./tooltip";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
3
|
+
export declare const Popover: React.FC<PopoverPrimitive.PopoverProps>;
|
|
4
|
+
export declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
export declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
export declare const PopoverItem: ({ className, inset, ...props }: {
|
|
7
|
+
[x: string]: any;
|
|
8
|
+
className?: string;
|
|
9
|
+
inset?: boolean;
|
|
10
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
+
import * as React from "react";
|
|
25
|
+
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
26
|
+
import { cn } from "../../utils";
|
|
27
|
+
export var Popover = PopoverPrimitive.Root;
|
|
28
|
+
export var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
29
|
+
export var PopoverContent = React.forwardRef(function (_a, ref) {
|
|
30
|
+
var className = _a.className, _b = _a.align, align = _b === void 0 ? "center" : _b, _c = _a.sideOffset, sideOffset = _c === void 0 ? 4 : _c, props = __rest(_a, ["className", "align", "sideOffset"]);
|
|
31
|
+
return (_jsx(PopoverPrimitive.Portal, { children: _jsx(PopoverPrimitive.Content, __assign({ ref: ref, align: align, sideOffset: sideOffset, className: cn("z-50 min-w-64 max-w-80 rounded-base border shadow-xl border-border-accent bg-main p-4 font-base text-text outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", className) }, props)) }));
|
|
32
|
+
});
|
|
33
|
+
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
34
|
+
export var PopoverItem = function (_a) {
|
|
35
|
+
var _b = _a.className, className = _b === void 0 ? "" : _b, _c = _a.inset, inset = _c === void 0 ? false : _c, props = __rest(_a, ["className", "inset"]);
|
|
36
|
+
return (_jsx("div", __assign({ className: cn("relative gap-2 [&_svg]:pointer-events-none [&_svg]:w-4 [&_svg]:h-4 [&_svg]:shrink-0 flex select-none items-center rounded-base border-2 border-transparent px-2 py-1.5 text-sm hover:bg-zinc-100 cursor-pointer font-base outline-none transition-colors focus:border-border data-[disabled]:pointer-events-none data-[disabled]:opacity-50 disabled:pointer-events-none disabled:opacity-50", inset && "pl-8", className) }, props)));
|
|
37
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
export var ProgressBar = function (_a) {
|
|
3
|
+
var value = _a.value;
|
|
4
|
+
return (_jsx("div", { className: "w-full bg-green-100 border-2 border-zinc-900 rounded-full h-3 overflow-hidden", children: _jsx("div", { className: "bg-green-500 h-full rounded-full transition-all duration-300", style: { width: "".concat(value, "%") } }) }));
|
|
5
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as ResizablePrimitive from "react-resizable-panels";
|
|
2
|
+
declare const ResizablePanelGroup: ({ className, ...props }: React.ComponentProps<typeof ResizablePrimitive.PanelGroup>) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare const ResizablePanel: ({ onResize, ...props }: React.ComponentProps<typeof ResizablePrimitive.Panel>) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare const FloatingResizablePanel: ({ onResize, floatClassName, children, ...props }: React.ComponentProps<typeof ResizablePrimitive.Panel> & {
|
|
5
|
+
floatClassName?: string;
|
|
6
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare const ResizableHandle: ({ withHandle, className, ...props }: React.ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> & {
|
|
8
|
+
withHandle?: boolean;
|
|
9
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export { ResizablePanelGroup, ResizablePanel, ResizableHandle, FloatingResizablePanel, };
|