@stackframe/stack-ui 2.5.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.
Files changed (101) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/LICENSE +7 -0
  3. package/dist/components/ui/accordion.d.ts +7 -0
  4. package/dist/components/ui/accordion.js +14 -0
  5. package/dist/components/ui/alert.d.ts +8 -0
  6. package/dist/components/ui/alert.js +23 -0
  7. package/dist/components/ui/aspect-ratio.d.ts +4 -0
  8. package/dist/components/ui/aspect-ratio.js +4 -0
  9. package/dist/components/ui/avatar.d.ts +6 -0
  10. package/dist/components/ui/avatar.js +12 -0
  11. package/dist/components/ui/badge.d.ts +9 -0
  12. package/dist/components/ui/badge.js +22 -0
  13. package/dist/components/ui/breadcrumb.d.ts +19 -0
  14. package/dist/components/ui/breadcrumb.js +23 -0
  15. package/dist/components/ui/button.d.ts +15 -0
  16. package/dist/components/ui/button.js +44 -0
  17. package/dist/components/ui/calendar.d.ts +8 -0
  18. package/dist/components/ui/calendar.js +40 -0
  19. package/dist/components/ui/card.d.ts +9 -0
  20. package/dist/components/ui/card.js +18 -0
  21. package/dist/components/ui/checkbox.d.ts +4 -0
  22. package/dist/components/ui/checkbox.js +9 -0
  23. package/dist/components/ui/collapsible.d.ts +6 -0
  24. package/dist/components/ui/collapsible.js +6 -0
  25. package/dist/components/ui/command.d.ts +82 -0
  26. package/dist/components/ui/command.js +29 -0
  27. package/dist/components/ui/container.d.ts +6 -0
  28. package/dist/components/ui/container.js +19 -0
  29. package/dist/components/ui/context-menu.d.ts +27 -0
  30. package/dist/components/ui/context-menu.js +34 -0
  31. package/dist/components/ui/dialog.d.ts +20 -0
  32. package/dist/components/ui/dialog.js +24 -0
  33. package/dist/components/ui/dropdown-menu.d.ts +27 -0
  34. package/dist/components/ui/dropdown-menu.js +36 -0
  35. package/dist/components/ui/form.d.ts +23 -0
  36. package/dist/components/ui/form.js +63 -0
  37. package/dist/components/ui/hover-card.d.ts +6 -0
  38. package/dist/components/ui/hover-card.js +10 -0
  39. package/dist/components/ui/inline-code.d.ts +3 -0
  40. package/dist/components/ui/inline-code.js +29 -0
  41. package/dist/components/ui/input-otp.d.ts +32 -0
  42. package/dist/components/ui/input-otp.js +19 -0
  43. package/dist/components/ui/input.d.ts +9 -0
  44. package/dist/components/ui/input.js +23 -0
  45. package/dist/components/ui/label.d.ts +6 -0
  46. package/dist/components/ui/label.js +12 -0
  47. package/dist/components/ui/link.d.ts +12 -0
  48. package/dist/components/ui/link.js +11 -0
  49. package/dist/components/ui/menubar.d.ts +31 -0
  50. package/dist/components/ui/menubar.js +36 -0
  51. package/dist/components/ui/navigation-menu.d.ts +12 -0
  52. package/dist/components/ui/navigation-menu.js +24 -0
  53. package/dist/components/ui/password-input.d.ts +4 -0
  54. package/dist/components/ui/password-input.js +13 -0
  55. package/dist/components/ui/popover.d.ts +7 -0
  56. package/dist/components/ui/popover.js +11 -0
  57. package/dist/components/ui/progress.d.ts +4 -0
  58. package/dist/components/ui/progress.js +8 -0
  59. package/dist/components/ui/radio-group.d.ts +5 -0
  60. package/dist/components/ui/radio-group.js +15 -0
  61. package/dist/components/ui/scroll-area.d.ts +5 -0
  62. package/dist/components/ui/scroll-area.js +12 -0
  63. package/dist/components/ui/select.d.ts +13 -0
  64. package/dist/components/ui/select.js +27 -0
  65. package/dist/components/ui/separator.d.ts +4 -0
  66. package/dist/components/ui/separator.js +8 -0
  67. package/dist/components/ui/sheet.d.ts +26 -0
  68. package/dist/components/ui/sheet.js +37 -0
  69. package/dist/components/ui/skeleton.d.ts +5 -0
  70. package/dist/components/ui/skeleton.js +38 -0
  71. package/dist/components/ui/slider.d.ts +4 -0
  72. package/dist/components/ui/slider.js +8 -0
  73. package/dist/components/ui/spinner.d.ts +2 -0
  74. package/dist/components/ui/spinner.js +7 -0
  75. package/dist/components/ui/switch.d.ts +11 -0
  76. package/dist/components/ui/switch.js +25 -0
  77. package/dist/components/ui/table.d.ts +10 -0
  78. package/dist/components/ui/table.js +20 -0
  79. package/dist/components/ui/tabs.d.ts +7 -0
  80. package/dist/components/ui/tabs.js +13 -0
  81. package/dist/components/ui/textarea.d.ts +5 -0
  82. package/dist/components/ui/textarea.js +8 -0
  83. package/dist/components/ui/toast.d.ts +15 -0
  84. package/dist/components/ui/toast.js +34 -0
  85. package/dist/components/ui/toaster.d.ts +1 -0
  86. package/dist/components/ui/toaster.js +10 -0
  87. package/dist/components/ui/toggle-group.d.ts +12 -0
  88. package/dist/components/ui/toggle-group.js +21 -0
  89. package/dist/components/ui/toggle.d.ts +12 -0
  90. package/dist/components/ui/toggle.js +26 -0
  91. package/dist/components/ui/tooltip.d.ts +7 -0
  92. package/dist/components/ui/tooltip.js +12 -0
  93. package/dist/components/ui/typography.d.ts +10 -0
  94. package/dist/components/ui/typography.js +33 -0
  95. package/dist/components/ui/use-toast.d.ts +44 -0
  96. package/dist/components/ui/use-toast.js +131 -0
  97. package/dist/index.d.ts +47 -0
  98. package/dist/index.js +47 -0
  99. package/dist/lib/utils.d.ts +2 -0
  100. package/dist/lib/utils.js +5 -0
  101. package/package.json +83 -0
@@ -0,0 +1,20 @@
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"> & React.RefAttributes<HTMLDivElement>>;
9
+ declare const DialogBody: ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element;
10
+ declare const DialogHeader: {
11
+ ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
12
+ displayName: string;
13
+ };
14
+ declare const DialogFooter: {
15
+ ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
16
+ displayName: string;
17
+ };
18
+ declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
19
+ declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
20
+ export { Dialog, DialogPortal, DialogOverlay, DialogTrigger, DialogClose, DialogContent, DialogBody, DialogHeader, DialogFooter, DialogTitle, DialogDescription, };
@@ -0,0 +1,24 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import * as React from "react";
4
+ import * as DialogPrimitive from "@radix-ui/react-dialog";
5
+ import { Cross2Icon } from "@radix-ui/react-icons";
6
+ import { cn } from "../../lib/utils";
7
+ const Dialog = DialogPrimitive.Root;
8
+ const DialogTrigger = DialogPrimitive.Trigger;
9
+ const DialogPortal = DialogPrimitive.Portal;
10
+ const DialogClose = DialogPrimitive.Close;
11
+ const DialogOverlay = React.forwardRef(({ className, ...props }, ref) => (_jsx(DialogPrimitive.Overlay, { ref: ref, className: cn("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", className), ...props })));
12
+ DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
13
+ const DialogContent = React.forwardRef(({ className, children, ...props }, ref) => (_jsxs(DialogPortal, { children: [_jsx(DialogOverlay, {}), _jsxs(DialogPrimitive.Content, { ref: ref, className: cn("fixed left-[50%] top-[50%] max-h-screen z-50 flex flex-col w-full max-w-lg translate-x-[-50%] translate-y-[-50%] border bg-background p-6 shadow-lg duration-100 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-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg", className), ...props, children: [children, _jsxs(DialogPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [_jsx(Cross2Icon, { className: "h-4 w-4" }), _jsx("span", { className: "sr-only", children: "Close" })] })] })] })));
14
+ DialogContent.displayName = DialogPrimitive.Content.displayName;
15
+ const DialogBody = ({ className, ...props }) => (_jsx("div", { className: cn("overflow-y-auto flex flex-col gap-4 w-[calc(100%+3rem)] -mx-6 px-6 my-2 py-2", className), ...props }));
16
+ const DialogHeader = ({ className, ...props }) => (_jsx("div", { className: cn("flex flex-col space-y-1.5 text-center sm:text-left", className), ...props }));
17
+ DialogHeader.displayName = "DialogHeader";
18
+ const DialogFooter = ({ className, ...props }) => (_jsx("div", { className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className), ...props }));
19
+ DialogFooter.displayName = "DialogFooter";
20
+ const DialogTitle = React.forwardRef(({ className, ...props }, ref) => (_jsx(DialogPrimitive.Title, { ref: ref, className: cn("text-lg font-semibold leading-none tracking-tight", className), ...props })));
21
+ DialogTitle.displayName = DialogPrimitive.Title.displayName;
22
+ const DialogDescription = React.forwardRef(({ className, ...props }, ref) => (_jsx(DialogPrimitive.Description, { ref: ref, className: cn("text-sm text-muted-foreground", className), ...props })));
23
+ DialogDescription.displayName = DialogPrimitive.Description.displayName;
24
+ export { Dialog, DialogPortal, DialogOverlay, DialogTrigger, DialogClose, DialogContent, DialogBody, 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 | undefined;
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 | undefined;
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 | undefined;
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,36 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import * as React from "react";
4
+ import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
5
+ import { CheckIcon, ChevronRightIcon, DotFilledIcon, } from "@radix-ui/react-icons";
6
+ import { cn } from "../../lib/utils";
7
+ const DropdownMenu = DropdownMenuPrimitive.Root;
8
+ const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
9
+ const DropdownMenuGroup = DropdownMenuPrimitive.Group;
10
+ const DropdownMenuPortal = DropdownMenuPrimitive.Portal;
11
+ const DropdownMenuSub = DropdownMenuPrimitive.Sub;
12
+ const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
13
+ const DropdownMenuSubTrigger = React.forwardRef(({ className, inset, children, ...props }, ref) => (_jsxs(DropdownMenuPrimitive.SubTrigger, { ref: ref, className: cn("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent", inset && "pl-8", className), ...props, children: [children, _jsx(ChevronRightIcon, { className: "ml-auto h-4 w-4" })] })));
14
+ DropdownMenuSubTrigger.displayName =
15
+ DropdownMenuPrimitive.SubTrigger.displayName;
16
+ const DropdownMenuSubContent = React.forwardRef(({ className, ...props }, ref) => (_jsx(DropdownMenuPrimitive.SubContent, { ref: ref, className: cn("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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 })));
17
+ DropdownMenuSubContent.displayName =
18
+ DropdownMenuPrimitive.SubContent.displayName;
19
+ const DropdownMenuContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => (_jsx(DropdownMenuPrimitive.Portal, { children: _jsx(DropdownMenuPrimitive.Content, { ref: ref, sideOffset: sideOffset, className: cn("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md", "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 }) })));
20
+ DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
21
+ const DropdownMenuItem = React.forwardRef(({ className, inset, ...props }, ref) => (_jsx(DropdownMenuPrimitive.Item, { ref: ref, className: cn("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", inset && "pl-8", className), ...props })));
22
+ DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
23
+ const DropdownMenuCheckboxItem = React.forwardRef(({ className, children, checked, ...props }, ref) => (_jsxs(DropdownMenuPrimitive.CheckboxItem, { ref: ref, className: cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground 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(CheckIcon, { className: "h-4 w-4" }) }) }), children] })));
24
+ DropdownMenuCheckboxItem.displayName =
25
+ DropdownMenuPrimitive.CheckboxItem.displayName;
26
+ const DropdownMenuRadioItem = React.forwardRef(({ className, children, ...props }, ref) => (_jsxs(DropdownMenuPrimitive.RadioItem, { ref: ref, className: cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground 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(DotFilledIcon, { className: "h-4 w-4 fill-current" }) }) }), children] })));
27
+ DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
28
+ const DropdownMenuLabel = React.forwardRef(({ className, inset, ...props }, ref) => (_jsx(DropdownMenuPrimitive.Label, { ref: ref, className: cn("px-2 py-1.5 text-sm font-semibold", inset && "pl-8", className), ...props })));
29
+ DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
30
+ const DropdownMenuSeparator = React.forwardRef(({ className, ...props }, ref) => (_jsx(DropdownMenuPrimitive.Separator, { ref: ref, className: cn("-mx-1 my-1 h-px bg-muted", className), ...props })));
31
+ DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
32
+ const DropdownMenuShortcut = ({ className, ...props }) => {
33
+ return (_jsx("span", { className: cn("ml-auto text-xs tracking-widest opacity-60", className), ...props }));
34
+ };
35
+ DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
36
+ 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 * as LabelPrimitive from "@radix-ui/react-label";
3
+ import { ControllerProps, FieldPath, FieldValues } from "react-hook-form";
4
+ declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues extends FieldValues | undefined = undefined>(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 | undefined;
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,63 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import { Slot } from "@radix-ui/react-slot";
4
+ import { Controller, FormProvider, useFormContext, } from "react-hook-form";
5
+ import { cn } from "../../lib/utils";
6
+ import { SpanLabel } from "./label";
7
+ import { StackAssertionError } from "@stackframe/stack-shared/dist/utils/errors";
8
+ const Form = FormProvider;
9
+ const FormFieldContext = React.createContext(null);
10
+ const FormField = ({ ...props }) => {
11
+ return (_jsx(FormFieldContext.Provider, { value: { name: props.name }, children: _jsx(Controller, { ...props }) }));
12
+ };
13
+ const useFormField = () => {
14
+ const fieldContext = React.useContext(FormFieldContext);
15
+ const itemContext = React.useContext(FormItemContext);
16
+ const { getFieldState, formState } = useFormContext();
17
+ if (!fieldContext) {
18
+ throw new StackAssertionError("useFormField should be used within <FormField>");
19
+ }
20
+ const fieldState = getFieldState(fieldContext.name, formState);
21
+ const { id } = itemContext;
22
+ return {
23
+ id,
24
+ name: fieldContext.name,
25
+ formItemId: `${id}-form-item`,
26
+ formDescriptionId: `${id}-form-item-description`,
27
+ formMessageId: `${id}-form-item-message`,
28
+ ...fieldState,
29
+ };
30
+ };
31
+ const FormItemContext = React.createContext({});
32
+ const FormItem = React.forwardRef(({ className, ...props }, ref) => {
33
+ const id = React.useId();
34
+ return (_jsx(FormItemContext.Provider, { value: { id }, children: _jsx("div", { ref: ref, className: cn("space-y-2", className), ...props }) }));
35
+ });
36
+ FormItem.displayName = "FormItem";
37
+ const FormLabel = React.forwardRef(({ className, ...props }, ref) => {
38
+ const { error } = useFormField();
39
+ return (_jsx(SpanLabel, { ref: ref, className: cn(error && "text-destructive", className), ...props }));
40
+ });
41
+ FormLabel.displayName = "FormLabel";
42
+ const FormControl = React.forwardRef(({ ...props }, ref) => {
43
+ const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
44
+ return (_jsx(Slot, { ref: ref, id: formItemId, "aria-describedby": !error
45
+ ? `${formDescriptionId}`
46
+ : `${formDescriptionId} ${formMessageId}`, "aria-invalid": !!error, ...props }));
47
+ });
48
+ FormControl.displayName = "FormControl";
49
+ const FormDescription = React.forwardRef(({ className, ...props }, ref) => {
50
+ const { formDescriptionId } = useFormField();
51
+ return (_jsx("p", { ref: ref, id: formDescriptionId, className: cn("text-[0.8rem] text-muted-foreground", className), ...props }));
52
+ });
53
+ FormDescription.displayName = "FormDescription";
54
+ const FormMessage = React.forwardRef(({ className, children, ...props }, ref) => {
55
+ const { error, formMessageId } = useFormField();
56
+ const body = error ? String(error.message) : children;
57
+ if (!body) {
58
+ return null;
59
+ }
60
+ return (_jsx("p", { ref: ref, id: formMessageId, className: cn("text-[0.8rem] font-medium text-destructive", className), ...props, children: body }));
61
+ });
62
+ FormMessage.displayName = "FormMessage";
63
+ export { useFormField, Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField, };
@@ -0,0 +1,6 @@
1
+ import * as React from "react";
2
+ import * as HoverCardPrimitive from "@radix-ui/react-hover-card";
3
+ declare const HoverCard: React.FC<HoverCardPrimitive.HoverCardProps>;
4
+ declare const HoverCardTrigger: React.ForwardRefExoticComponent<HoverCardPrimitive.HoverCardTriggerProps & React.RefAttributes<HTMLAnchorElement>>;
5
+ declare const HoverCardContent: React.ForwardRefExoticComponent<Omit<HoverCardPrimitive.HoverCardContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
6
+ export { HoverCard, HoverCardTrigger, HoverCardContent };
@@ -0,0 +1,10 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import * as React from "react";
4
+ import * as HoverCardPrimitive from "@radix-ui/react-hover-card";
5
+ import { cn } from "../../lib/utils";
6
+ const HoverCard = HoverCardPrimitive.Root;
7
+ const HoverCardTrigger = HoverCardPrimitive.Trigger;
8
+ const HoverCardContent = React.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => (_jsx(HoverCardPrimitive.Content, { ref: ref, align: align, sideOffset: sideOffset, className: cn("z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md 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 })));
9
+ HoverCardContent.displayName = HoverCardPrimitive.Content.displayName;
10
+ export { HoverCard, HoverCardTrigger, HoverCardContent };
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ declare const InlineCode: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & React.RefAttributes<HTMLElement>>;
3
+ export { InlineCode };
@@ -0,0 +1,29 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { cn } from "../../lib/utils";
4
+ import React from "react";
5
+ import { hasClickableParent } from "@stackframe/stack-shared/dist/utils/dom";
6
+ import { getNodeText } from "@stackframe/stack-shared/dist/utils/react";
7
+ import { runAsynchronously } from "@stackframe/stack-shared/dist/utils/promises";
8
+ import { useToast } from "./use-toast";
9
+ const InlineCode = React.forwardRef((props, ref) => {
10
+ const { toast } = useToast();
11
+ return _jsx("code", { ref: ref, ...props, className: cn("bg-zinc-200 text-zinc-700 dark:bg-zinc-800 dark:text-zinc-300 rounded-sm px-1 cursor-pointer", props.className), onClick: (e) => {
12
+ props.onClick?.(e);
13
+ if (!hasClickableParent(e.currentTarget)) {
14
+ e.stopPropagation();
15
+ e.preventDefault();
16
+ runAsynchronously(async () => {
17
+ try {
18
+ await navigator.clipboard.writeText(getNodeText(props.children));
19
+ toast({ description: 'Copied to clipboard!' });
20
+ }
21
+ catch (e) {
22
+ toast({ description: 'Failed to copy to clipboard', variant: 'destructive' });
23
+ }
24
+ });
25
+ }
26
+ } });
27
+ });
28
+ InlineCode.displayName = "Code";
29
+ export { InlineCode };
@@ -0,0 +1,32 @@
1
+ import * as React from "react";
2
+ declare const InputOTP: React.ForwardRefExoticComponent<(Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "value" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "containerClassName" | "noScriptCSSFallback"> & {
3
+ value?: string | undefined;
4
+ onChange?: ((newValue: string) => unknown) | undefined;
5
+ maxLength: number;
6
+ textAlign?: "center" | "right" | "left" | undefined;
7
+ onComplete?: ((...args: any[]) => unknown) | undefined;
8
+ pushPasswordManagerStrategy?: "none" | "increase-width" | undefined;
9
+ containerClassName?: string | undefined;
10
+ noScriptCSSFallback?: string | null | undefined;
11
+ } & {
12
+ render: (props: import("input-otp").RenderProps) => React.ReactNode;
13
+ children?: undefined;
14
+ } & React.RefAttributes<HTMLInputElement>, "ref"> | Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "value" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "containerClassName" | "noScriptCSSFallback"> & {
15
+ value?: string | undefined;
16
+ onChange?: ((newValue: string) => unknown) | undefined;
17
+ maxLength: number;
18
+ textAlign?: "center" | "right" | "left" | undefined;
19
+ onComplete?: ((...args: any[]) => unknown) | undefined;
20
+ pushPasswordManagerStrategy?: "none" | "increase-width" | undefined;
21
+ containerClassName?: string | undefined;
22
+ noScriptCSSFallback?: string | null | undefined;
23
+ } & {
24
+ render?: undefined;
25
+ children: React.ReactNode;
26
+ } & React.RefAttributes<HTMLInputElement>, "ref">) & React.RefAttributes<HTMLInputElement>>;
27
+ declare const InputOTPGroup: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
28
+ declare const InputOTPSlot: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
29
+ index: number;
30
+ } & React.RefAttributes<HTMLDivElement>>;
31
+ declare const InputOTPSeparator: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
32
+ export { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator };
@@ -0,0 +1,19 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import * as React from "react";
4
+ import { DashIcon } from "@radix-ui/react-icons";
5
+ import { OTPInput, OTPInputContext } from "input-otp";
6
+ import { cn } from "../../lib/utils";
7
+ const InputOTP = React.forwardRef(({ className, containerClassName, ...props }, ref) => (_jsx(OTPInput, { ref: ref, containerClassName: cn("flex items-center gap-2 has-[:disabled]:opacity-50", containerClassName), className: cn("disabled:cursor-not-allowed", className), ...props })));
8
+ InputOTP.displayName = "InputOTP";
9
+ const InputOTPGroup = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn("flex items-center", className), ...props })));
10
+ InputOTPGroup.displayName = "InputOTPGroup";
11
+ const InputOTPSlot = React.forwardRef(({ index, className, ...props }, ref) => {
12
+ const inputOTPContext = React.useContext(OTPInputContext);
13
+ const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index];
14
+ return (_jsxs("div", { ref: ref, className: cn("relative flex h-9 w-9 items-center justify-center border-y border-r border-input text-sm shadow-sm first:rounded-l-md first:border-l last:rounded-r-md", isActive && "z-10 ring-1 ring-ring", className), ...props, children: [char, hasFakeCaret && (_jsx("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: _jsx("div", { className: "h-4 w-px animate-caret-blink bg-foreground duration-1000" }) }))] }));
15
+ });
16
+ InputOTPSlot.displayName = "InputOTPSlot";
17
+ const InputOTPSeparator = React.forwardRef(({ ...props }, ref) => (_jsx("div", { ref: ref, role: "separator", ...props, children: _jsx(DashIcon, {}) })));
18
+ InputOTPSeparator.displayName = "InputOTPSeparator";
19
+ export { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator };
@@ -0,0 +1,9 @@
1
+ import * as React from "react";
2
+ export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
3
+ }
4
+ declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
5
+ export { Input };
6
+ export interface DelayedInputProps extends InputProps {
7
+ delay?: number;
8
+ }
9
+ export declare const DelayedInput: React.ForwardRefExoticComponent<DelayedInputProps & React.RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,23 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import { cn } from "../../lib/utils";
4
+ const Input = React.forwardRef(({ className, type, ...props }, ref) => {
5
+ return (_jsx("input", { type: type, className: cn("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50", className), ref: ref, ...props }));
6
+ });
7
+ Input.displayName = "Input";
8
+ export { Input };
9
+ export const DelayedInput = React.forwardRef(({ delay = 500, defaultValue, ...props }, ref) => {
10
+ const [value, setValue] = React.useState(defaultValue ?? "");
11
+ const timeout = React.useRef(null);
12
+ const onChange = (e) => {
13
+ setValue(e.target.value);
14
+ if (timeout.current) {
15
+ clearTimeout(timeout.current);
16
+ }
17
+ timeout.current = setTimeout(() => {
18
+ props.onChange?.(e);
19
+ }, delay);
20
+ };
21
+ return _jsx(Input, { ref: ref, ...props, value: value, onChange: onChange });
22
+ });
23
+ DelayedInput.displayName = "DelayedInput";
@@ -0,0 +1,6 @@
1
+ import * as React from "react";
2
+ import * as LabelPrimitive from "@radix-ui/react-label";
3
+ import { type VariantProps } from "class-variance-authority";
4
+ declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: import("class-variance-authority/types").ClassProp | undefined) => string> & React.RefAttributes<HTMLLabelElement>>;
5
+ declare const SpanLabel: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: import("class-variance-authority/types").ClassProp | undefined) => string> & React.RefAttributes<HTMLLabelElement>>;
6
+ export { Label, SpanLabel };
@@ -0,0 +1,12 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import * as React from "react";
4
+ import * as LabelPrimitive from "@radix-ui/react-label";
5
+ import { cva } from "class-variance-authority";
6
+ import { cn } from "../../lib/utils";
7
+ const labelVariants = cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 text-gray-600 dark:text-gray-400");
8
+ const Label = React.forwardRef(({ className, ...props }, ref) => (_jsx("label", { ref: ref, className: cn(labelVariants(), className), ...props })));
9
+ Label.displayName = LabelPrimitive.Root.displayName;
10
+ const SpanLabel = React.forwardRef(({ className, ...props }, ref) => (_jsx("span", { ref: ref, className: cn(labelVariants(), className), ...props })));
11
+ SpanLabel.displayName = LabelPrimitive.Root.displayName;
12
+ export { Label, SpanLabel };
@@ -0,0 +1,12 @@
1
+ /// <reference types="react" />
2
+ type LinkProps = {
3
+ href: string;
4
+ children: React.ReactNode;
5
+ className?: string;
6
+ target?: string;
7
+ onClick?: () => void;
8
+ prefetch?: boolean;
9
+ };
10
+ declare function Link(props: LinkProps): import("react/jsx-runtime").JSX.Element;
11
+ declare function StyledLink(props: LinkProps): import("react/jsx-runtime").JSX.Element;
12
+ export { Link, StyledLink };
@@ -0,0 +1,11 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import NextLink from 'next/link';
4
+ import { cn } from "../../lib/utils";
5
+ function Link(props) {
6
+ return _jsx(NextLink, { href: props.href, target: props.target, className: props.className, prefetch: props.prefetch, children: props.children });
7
+ }
8
+ function StyledLink(props) {
9
+ return (_jsx(Link, { ...props, className: cn("underline font-medium", props.className), children: props.children }));
10
+ }
11
+ export { Link, StyledLink };
@@ -0,0 +1,31 @@
1
+ import * as React from "react";
2
+ import * as MenubarPrimitive from "@radix-ui/react-menubar";
3
+ declare const MenubarMenu: {
4
+ (props: MenubarPrimitive.ScopedProps<MenubarPrimitive.MenubarMenuProps>): JSX.Element;
5
+ displayName: string;
6
+ };
7
+ declare const MenubarGroup: React.ForwardRefExoticComponent<MenubarPrimitive.MenubarGroupProps & React.RefAttributes<HTMLDivElement>>;
8
+ declare const MenubarPortal: React.FC<MenubarPrimitive.MenubarPortalProps>;
9
+ declare const MenubarSub: React.FC<MenubarPrimitive.MenubarSubProps>;
10
+ declare const MenubarRadioGroup: React.ForwardRefExoticComponent<MenubarPrimitive.MenubarRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
11
+ declare const Menubar: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
12
+ declare const MenubarTrigger: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
13
+ declare const MenubarSubTrigger: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarSubTriggerProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
14
+ inset?: boolean | undefined;
15
+ } & React.RefAttributes<HTMLDivElement>>;
16
+ declare const MenubarSubContent: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarSubContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
17
+ declare const MenubarContent: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
18
+ declare const MenubarItem: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
19
+ inset?: boolean | undefined;
20
+ } & React.RefAttributes<HTMLDivElement>>;
21
+ declare const MenubarCheckboxItem: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarCheckboxItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
22
+ declare const MenubarRadioItem: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarRadioItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
23
+ declare const MenubarLabel: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
24
+ inset?: boolean | undefined;
25
+ } & React.RefAttributes<HTMLDivElement>>;
26
+ declare const MenubarSeparator: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
27
+ declare const MenubarShortcut: {
28
+ ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
29
+ displayname: string;
30
+ };
31
+ export { Menubar, MenubarMenu, MenubarTrigger, MenubarContent, MenubarItem, MenubarSeparator, MenubarLabel, MenubarCheckboxItem, MenubarRadioGroup, MenubarRadioItem, MenubarPortal, MenubarSubContent, MenubarSubTrigger, MenubarGroup, MenubarSub, MenubarShortcut, };
@@ -0,0 +1,36 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import * as React from "react";
4
+ import { CheckIcon, ChevronRightIcon, DotFilledIcon, } from "@radix-ui/react-icons";
5
+ import * as MenubarPrimitive from "@radix-ui/react-menubar";
6
+ import { cn } from "../../lib/utils";
7
+ const MenubarMenu = MenubarPrimitive.Menu;
8
+ const MenubarGroup = MenubarPrimitive.Group;
9
+ const MenubarPortal = MenubarPrimitive.Portal;
10
+ const MenubarSub = MenubarPrimitive.Sub;
11
+ const MenubarRadioGroup = MenubarPrimitive.RadioGroup;
12
+ const Menubar = React.forwardRef(({ className, ...props }, ref) => (_jsx(MenubarPrimitive.Root, { ref: ref, className: cn("flex h-9 items-center space-x-1 rounded-md border bg-background p-1 shadow-sm", className), ...props })));
13
+ Menubar.displayName = MenubarPrimitive.Root.displayName;
14
+ const MenubarTrigger = React.forwardRef(({ className, ...props }, ref) => (_jsx(MenubarPrimitive.Trigger, { ref: ref, className: cn("flex cursor-default select-none items-center rounded-sm px-3 py-1 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground", className), ...props })));
15
+ MenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName;
16
+ const MenubarSubTrigger = React.forwardRef(({ className, inset, children, ...props }, ref) => (_jsxs(MenubarPrimitive.SubTrigger, { ref: ref, className: cn("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground", inset && "pl-8", className), ...props, children: [children, _jsx(ChevronRightIcon, { className: "ml-auto h-4 w-4" })] })));
17
+ MenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName;
18
+ const MenubarSubContent = React.forwardRef(({ className, ...props }, ref) => (_jsx(MenubarPrimitive.SubContent, { ref: ref, className: cn("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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 })));
19
+ MenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName;
20
+ const MenubarContent = React.forwardRef(({ className, align = "start", alignOffset = -4, sideOffset = 8, ...props }, ref) => (_jsx(MenubarPrimitive.Portal, { children: _jsx(MenubarPrimitive.Content, { ref: ref, align: align, alignOffset: alignOffset, sideOffset: sideOffset, className: cn("z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in 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 }) })));
21
+ MenubarContent.displayName = MenubarPrimitive.Content.displayName;
22
+ const MenubarItem = React.forwardRef(({ className, inset, ...props }, ref) => (_jsx(MenubarPrimitive.Item, { ref: ref, className: cn("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", inset && "pl-8", className), ...props })));
23
+ MenubarItem.displayName = MenubarPrimitive.Item.displayName;
24
+ const MenubarCheckboxItem = React.forwardRef(({ className, children, checked, ...props }, ref) => (_jsxs(MenubarPrimitive.CheckboxItem, { ref: ref, className: cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground 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(MenubarPrimitive.ItemIndicator, { children: _jsx(CheckIcon, { className: "h-4 w-4" }) }) }), children] })));
25
+ MenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName;
26
+ const MenubarRadioItem = React.forwardRef(({ className, children, ...props }, ref) => (_jsxs(MenubarPrimitive.RadioItem, { ref: ref, className: cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground 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(MenubarPrimitive.ItemIndicator, { children: _jsx(DotFilledIcon, { className: "h-4 w-4 fill-current" }) }) }), children] })));
27
+ MenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName;
28
+ const MenubarLabel = React.forwardRef(({ className, inset, ...props }, ref) => (_jsx(MenubarPrimitive.Label, { ref: ref, className: cn("px-2 py-1.5 text-sm font-semibold", inset && "pl-8", className), ...props })));
29
+ MenubarLabel.displayName = MenubarPrimitive.Label.displayName;
30
+ const MenubarSeparator = React.forwardRef(({ className, ...props }, ref) => (_jsx(MenubarPrimitive.Separator, { ref: ref, className: cn("-mx-1 my-1 h-px bg-muted", className), ...props })));
31
+ MenubarSeparator.displayName = MenubarPrimitive.Separator.displayName;
32
+ const MenubarShortcut = ({ className, ...props }) => {
33
+ return (_jsx("span", { className: cn("ml-auto text-xs tracking-widest text-muted-foreground", className), ...props }));
34
+ };
35
+ MenubarShortcut.displayname = "MenubarShortcut";
36
+ export { Menubar, MenubarMenu, MenubarTrigger, MenubarContent, MenubarItem, MenubarSeparator, MenubarLabel, MenubarCheckboxItem, MenubarRadioGroup, MenubarRadioItem, MenubarPortal, MenubarSubContent, MenubarSubTrigger, MenubarGroup, MenubarSub, MenubarShortcut, };
@@ -0,0 +1,12 @@
1
+ import * as React from "react";
2
+ import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
3
+ declare const NavigationMenu: React.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuProps & React.RefAttributes<HTMLElement>, "ref"> & React.RefAttributes<HTMLElement>>;
4
+ declare const NavigationMenuList: React.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuListProps & React.RefAttributes<HTMLUListElement>, "ref"> & React.RefAttributes<HTMLUListElement>>;
5
+ declare const NavigationMenuItem: React.ForwardRefExoticComponent<NavigationMenuPrimitive.NavigationMenuItemProps & React.RefAttributes<HTMLLIElement>>;
6
+ declare const navigationMenuTriggerStyle: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
7
+ declare const NavigationMenuTrigger: React.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
8
+ declare const NavigationMenuContent: React.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
9
+ declare const NavigationMenuLink: React.ForwardRefExoticComponent<NavigationMenuPrimitive.NavigationMenuLinkProps & React.RefAttributes<HTMLAnchorElement>>;
10
+ declare const NavigationMenuViewport: React.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuViewportProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
11
+ declare const NavigationMenuIndicator: React.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuIndicatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
12
+ export { navigationMenuTriggerStyle, NavigationMenu, NavigationMenuList, NavigationMenuItem, NavigationMenuContent, NavigationMenuTrigger, NavigationMenuLink, NavigationMenuIndicator, NavigationMenuViewport, };
@@ -0,0 +1,24 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import { ChevronDownIcon } from "@radix-ui/react-icons";
4
+ import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
5
+ import { cva } from "class-variance-authority";
6
+ import { cn } from "../../lib/utils";
7
+ const NavigationMenu = React.forwardRef(({ className, children, ...props }, ref) => (_jsxs(NavigationMenuPrimitive.Root, { ref: ref, className: cn("relative z-10 flex max-w-max flex-1 items-center justify-center", className), ...props, children: [children, _jsx(NavigationMenuViewport, {})] })));
8
+ NavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName;
9
+ const NavigationMenuList = React.forwardRef(({ className, ...props }, ref) => (_jsx(NavigationMenuPrimitive.List, { ref: ref, className: cn("group flex flex-1 list-none items-center justify-center space-x-1", className), ...props })));
10
+ NavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName;
11
+ const NavigationMenuItem = NavigationMenuPrimitive.Item;
12
+ const navigationMenuTriggerStyle = cva("group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/50 data-[state=open]:bg-accent/50");
13
+ const NavigationMenuTrigger = React.forwardRef(({ className, children, ...props }, ref) => (_jsxs(NavigationMenuPrimitive.Trigger, { ref: ref, className: cn(navigationMenuTriggerStyle(), "group", className), ...props, children: [children, " ", _jsx(ChevronDownIcon, { className: "relative top-[1px] ml-1 h-3 w-3 duration-300 group-data-[state=open]:rotate-180", "aria-hidden": "true" })] })));
14
+ NavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName;
15
+ const NavigationMenuContent = React.forwardRef(({ className, ...props }, ref) => (_jsx(NavigationMenuPrimitive.Content, { ref: ref, className: cn("left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto ", className), ...props })));
16
+ NavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName;
17
+ const NavigationMenuLink = NavigationMenuPrimitive.Link;
18
+ const NavigationMenuViewport = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { className: cn("absolute left-0 top-full flex justify-center"), children: _jsx(NavigationMenuPrimitive.Viewport, { className: cn("origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]", className), ref: ref, ...props }) })));
19
+ NavigationMenuViewport.displayName =
20
+ NavigationMenuPrimitive.Viewport.displayName;
21
+ const NavigationMenuIndicator = React.forwardRef(({ className, ...props }, ref) => (_jsx(NavigationMenuPrimitive.Indicator, { ref: ref, className: cn("top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in", className), ...props, children: _jsx("div", { className: "relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md" }) })));
22
+ NavigationMenuIndicator.displayName =
23
+ NavigationMenuPrimitive.Indicator.displayName;
24
+ export { navigationMenuTriggerStyle, NavigationMenu, NavigationMenuList, NavigationMenuItem, NavigationMenuContent, NavigationMenuTrigger, NavigationMenuLink, NavigationMenuIndicator, NavigationMenuViewport, };
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { InputProps } from "./input";
3
+ declare const PasswordInput: import("react").ForwardRefExoticComponent<InputProps & import("react").RefAttributes<HTMLInputElement>>;
4
+ export { PasswordInput };
@@ -0,0 +1,13 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { forwardRef, useState } from "react";
4
+ import { EyeIcon, EyeOffIcon } from "lucide-react";
5
+ import { Button } from "./button";
6
+ import { Input } from "./input";
7
+ import { cn } from "../../lib/utils";
8
+ const PasswordInput = forwardRef(({ className, ...props }, ref) => {
9
+ const [showPassword, setShowPassword] = useState(false);
10
+ return (_jsxs("div", { className: "relative", children: [_jsx(Input, { type: showPassword ? "text" : "password", className: cn("hide-password-toggle pr-10", className), ref: ref, ...props }), _jsx(Button, { type: "button", variant: "ghost", size: "sm", className: "absolute right-0 top-0 h-full px-3 py-2 hover:bg-transparent", onClick: () => setShowPassword((prev) => !prev), disabled: props.disabled, "aria-label": showPassword ? "Hide password" : "Show password", tabIndex: -1, children: showPassword ? (_jsx(EyeIcon, { className: "h-4 w-4", "aria-hidden": "true" })) : (_jsx(EyeOffIcon, { className: "h-4 w-4", "aria-hidden": "true" })) })] }));
11
+ });
12
+ PasswordInput.displayName = "PasswordInput";
13
+ export { PasswordInput };
@@ -0,0 +1,7 @@
1
+ import * as React from "react";
2
+ import * as PopoverPrimitive from "@radix-ui/react-popover";
3
+ declare const Popover: React.FC<PopoverPrimitive.PopoverProps>;
4
+ declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
5
+ declare const PopoverAnchor: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverAnchorProps & React.RefAttributes<HTMLDivElement>>;
6
+ declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
7
+ export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };
@@ -0,0 +1,11 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import * as React from "react";
4
+ import * as PopoverPrimitive from "@radix-ui/react-popover";
5
+ import { cn } from "../../lib/utils";
6
+ const Popover = PopoverPrimitive.Root;
7
+ const PopoverTrigger = PopoverPrimitive.Trigger;
8
+ const PopoverAnchor = PopoverPrimitive.Anchor;
9
+ const PopoverContent = React.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => (_jsx(PopoverPrimitive.Portal, { children: _jsx(PopoverPrimitive.Content, { ref: ref, align: align, sideOffset: sideOffset, className: cn("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md 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 }) })));
10
+ PopoverContent.displayName = PopoverPrimitive.Content.displayName;
11
+ export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };
@@ -0,0 +1,4 @@
1
+ import * as React from "react";
2
+ import * as ProgressPrimitive from "@radix-ui/react-progress";
3
+ declare const Progress: React.ForwardRefExoticComponent<Omit<ProgressPrimitive.ProgressProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
4
+ export { Progress };
@@ -0,0 +1,8 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import * as React from "react";
4
+ import * as ProgressPrimitive from "@radix-ui/react-progress";
5
+ import { cn } from "../../lib/utils";
6
+ const Progress = React.forwardRef(({ className, value, ...props }, ref) => (_jsx(ProgressPrimitive.Root, { ref: ref, className: cn("relative h-2 w-full overflow-hidden rounded-full bg-primary/20", className), ...props, children: _jsx(ProgressPrimitive.Indicator, { className: "h-full w-full flex-1 bg-primary transition-all", style: { transform: `translateX(-${100 - (value || 0)}%)` } }) })));
7
+ Progress.displayName = ProgressPrimitive.Root.displayName;
8
+ export { Progress };
@@ -0,0 +1,5 @@
1
+ import * as React from "react";
2
+ import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
3
+ declare const RadioGroup: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
4
+ declare const RadioGroupItem: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupItemProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
5
+ export { RadioGroup, RadioGroupItem };