@stackframe/stack-ui 2.6.19 → 2.6.21

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 (84) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/components/copy-button.d.ts +4 -2
  3. package/dist/components/copy-button.js +2 -2
  4. package/dist/components/data-table/data-table.d.ts +14 -16
  5. package/dist/components/data-table/data-table.js +36 -4
  6. package/dist/components/ui/accordion.d.ts +9 -3
  7. package/dist/components/ui/accordion.js +4 -4
  8. package/dist/components/ui/alert.d.ts +10 -4
  9. package/dist/components/ui/alert.js +4 -4
  10. package/dist/components/ui/avatar.d.ts +9 -3
  11. package/dist/components/ui/avatar.js +4 -4
  12. package/dist/components/ui/badge.d.ts +3 -1
  13. package/dist/components/ui/badge.js +2 -2
  14. package/dist/components/ui/breadcrumb.d.ts +17 -7
  15. package/dist/components/ui/breadcrumb.js +6 -6
  16. package/dist/components/ui/button.d.ts +3 -1
  17. package/dist/components/ui/button.js +3 -3
  18. package/dist/components/ui/card.d.ts +24 -8
  19. package/dist/components/ui/card.js +9 -9
  20. package/dist/components/ui/checkbox.d.ts +3 -1
  21. package/dist/components/ui/checkbox.js +2 -2
  22. package/dist/components/ui/command.d.ts +8 -72
  23. package/dist/components/ui/command.js +8 -8
  24. package/dist/components/ui/context-menu.d.ts +27 -11
  25. package/dist/components/ui/context-menu.js +9 -9
  26. package/dist/components/ui/dialog.d.ts +12 -4
  27. package/dist/components/ui/dialog.js +5 -5
  28. package/dist/components/ui/dropdown-menu.d.ts +30 -12
  29. package/dist/components/ui/dropdown-menu.js +10 -9
  30. package/dist/components/ui/form.d.ts +15 -5
  31. package/dist/components/ui/form.js +6 -5
  32. package/dist/components/ui/hover-card.d.ts +3 -1
  33. package/dist/components/ui/hover-card.js +2 -2
  34. package/dist/components/ui/inline-code.d.ts +3 -1
  35. package/dist/components/ui/inline-code.js +2 -2
  36. package/dist/components/ui/input-otp.d.ts +12 -29
  37. package/dist/components/ui/input-otp.js +5 -4
  38. package/dist/components/ui/input.d.ts +6 -2
  39. package/dist/components/ui/input.js +3 -2
  40. package/dist/components/ui/label.d.ts +6 -2
  41. package/dist/components/ui/label.js +3 -3
  42. package/dist/components/ui/menubar.d.ts +4 -5
  43. package/dist/components/ui/menubar.js +2 -1
  44. package/dist/components/ui/navigation-menu.d.ts +18 -6
  45. package/dist/components/ui/navigation-menu.js +7 -7
  46. package/dist/components/ui/password-input.d.ts +3 -1
  47. package/dist/components/ui/password-input.js +3 -2
  48. package/dist/components/ui/popover.d.ts +3 -1
  49. package/dist/components/ui/popover.js +2 -2
  50. package/dist/components/ui/progress.d.ts +3 -1
  51. package/dist/components/ui/progress.js +2 -2
  52. package/dist/components/ui/radio-group.d.ts +6 -2
  53. package/dist/components/ui/radio-group.js +3 -3
  54. package/dist/components/ui/scroll-area.d.ts +6 -2
  55. package/dist/components/ui/scroll-area.js +3 -3
  56. package/dist/components/ui/select.d.ts +21 -7
  57. package/dist/components/ui/select.js +8 -8
  58. package/dist/components/ui/separator.d.ts +3 -1
  59. package/dist/components/ui/separator.js +2 -2
  60. package/dist/components/ui/sheet.d.ts +12 -4
  61. package/dist/components/ui/sheet.js +5 -5
  62. package/dist/components/ui/slider.d.ts +3 -1
  63. package/dist/components/ui/slider.js +2 -2
  64. package/dist/components/ui/spinner.d.ts +3 -1
  65. package/dist/components/ui/spinner.js +2 -2
  66. package/dist/components/ui/switch.d.ts +3 -1
  67. package/dist/components/ui/switch.js +3 -3
  68. package/dist/components/ui/table.d.ts +24 -8
  69. package/dist/components/ui/table.js +9 -9
  70. package/dist/components/ui/tabs.d.ts +9 -3
  71. package/dist/components/ui/tabs.js +4 -4
  72. package/dist/components/ui/textarea.d.ts +3 -1
  73. package/dist/components/ui/textarea.js +2 -2
  74. package/dist/components/ui/toast.d.ts +19 -7
  75. package/dist/components/ui/toast.js +7 -7
  76. package/dist/components/ui/toggle-group.d.ts +8 -4
  77. package/dist/components/ui/toggle-group.js +3 -2
  78. package/dist/components/ui/toggle.d.ts +4 -2
  79. package/dist/components/ui/toggle.js +2 -2
  80. package/dist/components/ui/tooltip.d.ts +6 -2
  81. package/dist/components/ui/tooltip.js +3 -3
  82. package/dist/components/ui/typography.d.ts +3 -1
  83. package/dist/components/ui/typography.js +2 -2
  84. package/package.json +52 -44
@@ -1,12 +1,12 @@
1
1
  "use client";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
- import React from "react";
3
+ import { forwardRefIfNeeded } from "@stackframe/stack-shared/dist/utils/react";
4
4
  import * as LabelPrimitive from "@radix-ui/react-label";
5
5
  import { cva } from "class-variance-authority";
6
6
  import { cn } from "../../lib/utils";
7
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 })));
8
+ const Label = forwardRefIfNeeded(({ className, ...props }, ref) => (_jsx("label", { ref: ref, className: cn(labelVariants(), className), ...props })));
9
9
  Label.displayName = LabelPrimitive.Root.displayName;
10
- const SpanLabel = React.forwardRef(({ className, ...props }, ref) => (_jsx("span", { ref: ref, className: cn(labelVariants(), className), ...props })));
10
+ const SpanLabel = forwardRefIfNeeded(({ className, ...props }, ref) => (_jsx("span", { ref: ref, className: cn(labelVariants(), className), ...props })));
11
11
  SpanLabel.displayName = LabelPrimitive.Root.displayName;
12
12
  export { Label, SpanLabel };
@@ -1,9 +1,6 @@
1
1
  import React from "react";
2
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
- };
3
+ declare const MenubarMenu: any;
7
4
  declare const MenubarGroup: React.ForwardRefExoticComponent<MenubarPrimitive.MenubarGroupProps & React.RefAttributes<HTMLDivElement>>;
8
5
  declare const MenubarPortal: React.FC<MenubarPrimitive.MenubarPortalProps>;
9
6
  declare const MenubarSub: React.FC<MenubarPrimitive.MenubarSubProps>;
@@ -23,7 +20,9 @@ declare const MenubarRadioItem: React.ForwardRefExoticComponent<Omit<MenubarPrim
23
20
  declare const MenubarLabel: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
24
21
  inset?: boolean | undefined;
25
22
  } & React.RefAttributes<HTMLDivElement>>;
26
- declare const MenubarSeparator: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
23
+ declare const MenubarSeparator: React.FC<Omit<MenubarPrimitive.MenubarSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
24
+ ref?: React.Ref<HTMLDivElement> | undefined;
25
+ }>;
27
26
  declare const MenubarShortcut: {
28
27
  ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
29
28
  displayname: string;
@@ -1,6 +1,7 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import React from "react";
4
+ import { forwardRefIfNeeded } from "@stackframe/stack-shared/dist/utils/react";
4
5
  import { CheckIcon, ChevronRightIcon, DotFilledIcon, } from "@radix-ui/react-icons";
5
6
  import * as MenubarPrimitive from "@radix-ui/react-menubar";
6
7
  import { cn } from "../../lib/utils";
@@ -27,7 +28,7 @@ const MenubarRadioItem = React.forwardRef(({ className, children, ...props }, re
27
28
  MenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName;
28
29
  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
30
  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
+ const MenubarSeparator = forwardRefIfNeeded(({ className, ...props }, ref) => (_jsx(MenubarPrimitive.Separator, { ref: ref, className: cn("-mx-1 my-1 h-px bg-muted", className), ...props })));
31
32
  MenubarSeparator.displayName = MenubarPrimitive.Separator.displayName;
32
33
  const MenubarShortcut = ({ className, ...props }) => {
33
34
  return (_jsx("span", { className: cn("ml-auto text-xs tracking-widest text-muted-foreground", className), ...props }));
@@ -1,12 +1,24 @@
1
1
  import React from "react";
2
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>>;
3
+ declare const NavigationMenu: React.FC<Omit<NavigationMenuPrimitive.NavigationMenuProps & React.RefAttributes<HTMLElement>, "ref"> & {
4
+ ref?: React.Ref<HTMLElement> | undefined;
5
+ }>;
6
+ declare const NavigationMenuList: React.FC<Omit<NavigationMenuPrimitive.NavigationMenuListProps & React.RefAttributes<HTMLUListElement>, "ref"> & {
7
+ ref?: React.Ref<HTMLUListElement> | undefined;
8
+ }>;
5
9
  declare const NavigationMenuItem: React.ForwardRefExoticComponent<NavigationMenuPrimitive.NavigationMenuItemProps & React.RefAttributes<HTMLLIElement>>;
6
10
  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>>;
11
+ declare const NavigationMenuTrigger: React.FC<Omit<NavigationMenuPrimitive.NavigationMenuTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & {
12
+ ref?: React.Ref<HTMLButtonElement> | undefined;
13
+ }>;
14
+ declare const NavigationMenuContent: React.FC<Omit<NavigationMenuPrimitive.NavigationMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
15
+ ref?: React.Ref<HTMLDivElement> | undefined;
16
+ }>;
9
17
  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>>;
18
+ declare const NavigationMenuViewport: React.FC<Omit<NavigationMenuPrimitive.NavigationMenuViewportProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
19
+ ref?: React.Ref<HTMLDivElement> | undefined;
20
+ }>;
21
+ declare const NavigationMenuIndicator: React.FC<Omit<NavigationMenuPrimitive.NavigationMenuIndicatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
22
+ ref?: React.Ref<HTMLDivElement> | undefined;
23
+ }>;
12
24
  export { navigationMenuTriggerStyle, NavigationMenu, NavigationMenuList, NavigationMenuItem, NavigationMenuContent, NavigationMenuTrigger, NavigationMenuLink, NavigationMenuIndicator, NavigationMenuViewport, };
@@ -1,25 +1,25 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import React from "react";
3
+ import { forwardRefIfNeeded } from "@stackframe/stack-shared/dist/utils/react";
4
4
  import { ChevronDownIcon } from "@radix-ui/react-icons";
5
5
  import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
6
6
  import { cva } from "class-variance-authority";
7
7
  import { cn } from "../../lib/utils";
8
- 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
+ const NavigationMenu = forwardRefIfNeeded(({ 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, {})] })));
9
9
  NavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName;
10
- 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
+ const NavigationMenuList = forwardRefIfNeeded(({ 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 })));
11
11
  NavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName;
12
12
  const NavigationMenuItem = NavigationMenuPrimitive.Item;
13
13
  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");
14
- 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
+ const NavigationMenuTrigger = forwardRefIfNeeded(({ 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" })] })));
15
15
  NavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName;
16
- 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
+ const NavigationMenuContent = forwardRefIfNeeded(({ 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 })));
17
17
  NavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName;
18
18
  const NavigationMenuLink = NavigationMenuPrimitive.Link;
19
- 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
+ const NavigationMenuViewport = forwardRefIfNeeded(({ 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 }) })));
20
20
  NavigationMenuViewport.displayName =
21
21
  NavigationMenuPrimitive.Viewport.displayName;
22
- 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
+ const NavigationMenuIndicator = forwardRefIfNeeded(({ 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" }) })));
23
23
  NavigationMenuIndicator.displayName =
24
24
  NavigationMenuPrimitive.Indicator.displayName;
25
25
  export { navigationMenuTriggerStyle, NavigationMenu, NavigationMenuList, NavigationMenuItem, NavigationMenuContent, NavigationMenuTrigger, NavigationMenuLink, NavigationMenuIndicator, NavigationMenuViewport, };
@@ -1,4 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { InputProps } from "./input";
3
- declare const PasswordInput: import("react").ForwardRefExoticComponent<InputProps & import("react").RefAttributes<HTMLInputElement>>;
3
+ declare const PasswordInput: import("react").FC<InputProps & {
4
+ ref?: import("react").Ref<HTMLInputElement> | undefined;
5
+ }>;
4
6
  export { PasswordInput };
@@ -1,11 +1,12 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { forwardRef, useState } from "react";
3
+ import { useState } from "react";
4
4
  import { EyeIcon, EyeOffIcon } from "lucide-react";
5
5
  import { Button } from "./button";
6
6
  import { Input } from "./input";
7
7
  import { cn } from "../../lib/utils";
8
- const PasswordInput = forwardRef(({ className, ...props }, ref) => {
8
+ import { forwardRefIfNeeded } from "@stackframe/stack-shared/dist/utils/react";
9
+ const PasswordInput = forwardRefIfNeeded(({ className, ...props }, ref) => {
9
10
  const [showPassword, setShowPassword] = useState(false);
10
11
  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
  });
@@ -3,5 +3,7 @@ import * as PopoverPrimitive from "@radix-ui/react-popover";
3
3
  declare const Popover: React.FC<PopoverPrimitive.PopoverProps>;
4
4
  declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
5
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>>;
6
+ declare const PopoverContent: React.FC<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
7
+ ref?: React.Ref<HTMLDivElement> | undefined;
8
+ }>;
7
9
  export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };
@@ -1,11 +1,11 @@
1
1
  "use client";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
- import React from "react";
3
+ import { forwardRefIfNeeded } from "@stackframe/stack-shared/dist/utils/react";
4
4
  import * as PopoverPrimitive from "@radix-ui/react-popover";
5
5
  import { cn } from "../../lib/utils";
6
6
  const Popover = PopoverPrimitive.Root;
7
7
  const PopoverTrigger = PopoverPrimitive.Trigger;
8
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 }) })));
9
+ const PopoverContent = forwardRefIfNeeded(({ 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
10
  PopoverContent.displayName = PopoverPrimitive.Content.displayName;
11
11
  export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };
@@ -1,4 +1,6 @@
1
1
  import React from "react";
2
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>>;
3
+ declare const Progress: React.FC<Omit<ProgressPrimitive.ProgressProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
4
+ ref?: React.Ref<HTMLDivElement> | undefined;
5
+ }>;
4
6
  export { Progress };
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
- import React from "react";
3
+ import { forwardRefIfNeeded } from "@stackframe/stack-shared/dist/utils/react";
4
4
  import * as ProgressPrimitive from "@radix-ui/react-progress";
5
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)}%)` } }) })));
6
+ const Progress = forwardRefIfNeeded(({ 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
7
  Progress.displayName = ProgressPrimitive.Root.displayName;
8
8
  export { Progress };
@@ -1,5 +1,9 @@
1
1
  import React from "react";
2
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>>;
3
+ declare const RadioGroup: React.FC<Omit<RadioGroupPrimitive.RadioGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
4
+ ref?: React.Ref<HTMLDivElement> | undefined;
5
+ }>;
6
+ declare const RadioGroupItem: React.FC<Omit<RadioGroupPrimitive.RadioGroupItemProps & React.RefAttributes<HTMLButtonElement>, "ref"> & {
7
+ ref?: React.Ref<HTMLButtonElement> | undefined;
8
+ }>;
5
9
  export { RadioGroup, RadioGroupItem };
@@ -1,14 +1,14 @@
1
1
  "use client";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
- import React from "react";
3
+ import { forwardRefIfNeeded } from "@stackframe/stack-shared/dist/utils/react";
4
4
  import { CheckIcon } from "@radix-ui/react-icons";
5
5
  import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
6
6
  import { cn } from "../../lib/utils";
7
- const RadioGroup = React.forwardRef(({ className, ...props }, ref) => {
7
+ const RadioGroup = forwardRefIfNeeded(({ className, ...props }, ref) => {
8
8
  return (_jsx(RadioGroupPrimitive.Root, { className: cn("grid gap-2", className), ...props, ref: ref }));
9
9
  });
10
10
  RadioGroup.displayName = RadioGroupPrimitive.Root.displayName;
11
- const RadioGroupItem = React.forwardRef(({ className, ...props }, ref) => {
11
+ const RadioGroupItem = forwardRefIfNeeded(({ className, ...props }, ref) => {
12
12
  return (_jsx(RadioGroupPrimitive.Item, { ref: ref, className: cn("aspect-square h-4 w-4 rounded-full border border-primary text-primary shadow focus:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50", className), ...props, children: _jsx(RadioGroupPrimitive.Indicator, { className: "flex items-center justify-center", children: _jsx(CheckIcon, { className: "h-3.5 w-3.5 fill-primary" }) }) }));
13
13
  });
14
14
  RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
@@ -1,5 +1,9 @@
1
1
  import React from "react";
2
2
  import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
3
- declare const ScrollArea: React.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
4
- declare const ScrollBar: React.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaScrollbarProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
3
+ declare const ScrollArea: React.FC<Omit<ScrollAreaPrimitive.ScrollAreaProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
4
+ ref?: React.Ref<HTMLDivElement> | undefined;
5
+ }>;
6
+ declare const ScrollBar: React.FC<Omit<ScrollAreaPrimitive.ScrollAreaScrollbarProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
7
+ ref?: React.Ref<HTMLDivElement> | undefined;
8
+ }>;
5
9
  export { ScrollArea, ScrollBar };
@@ -1,11 +1,11 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import React from "react";
3
+ import { forwardRefIfNeeded } from "@stackframe/stack-shared/dist/utils/react";
4
4
  import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
5
5
  import { cn } from "../../lib/utils";
6
- const ScrollArea = React.forwardRef(({ className, children, ...props }, ref) => (_jsxs(ScrollAreaPrimitive.Root, { ref: ref, className: cn("relative overflow-hidden", className), ...props, children: [_jsx(ScrollAreaPrimitive.Viewport, { className: "h-full w-full rounded-[inherit]", children: children }), _jsx(ScrollBar, {}), _jsx(ScrollAreaPrimitive.Corner, {})] })));
6
+ const ScrollArea = forwardRefIfNeeded(({ className, children, ...props }, ref) => (_jsxs(ScrollAreaPrimitive.Root, { ref: ref, className: cn("relative overflow-hidden", className), ...props, children: [_jsx(ScrollAreaPrimitive.Viewport, { className: "h-full w-full rounded-[inherit]", children: children }), _jsx(ScrollBar, {}), _jsx(ScrollAreaPrimitive.Corner, {})] })));
7
7
  ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
8
- const ScrollBar = React.forwardRef(({ className, orientation = "vertical", ...props }, ref) => (_jsx(ScrollAreaPrimitive.ScrollAreaScrollbar, { ref: ref, orientation: orientation, className: cn("flex touch-none select-none", orientation === "vertical" &&
8
+ const ScrollBar = forwardRefIfNeeded(({ className, orientation = "vertical", ...props }, ref) => (_jsx(ScrollAreaPrimitive.ScrollAreaScrollbar, { ref: ref, orientation: orientation, className: cn("flex touch-none select-none", orientation === "vertical" &&
9
9
  "h-full w-2.5 border-l border-l-transparent p-[1px]", orientation === "horizontal" &&
10
10
  "h-2.5 flex-col border-t border-t-transparent p-[1px]", className), ...props, children: _jsx(ScrollAreaPrimitive.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" }) })));
11
11
  ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
@@ -3,11 +3,25 @@ import * as SelectPrimitive from "@radix-ui/react-select";
3
3
  declare const Select: React.FC<SelectPrimitive.SelectProps>;
4
4
  declare const SelectGroup: React.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & React.RefAttributes<HTMLDivElement>>;
5
5
  declare const SelectValue: React.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & React.RefAttributes<HTMLSpanElement>>;
6
- declare const SelectTrigger: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
7
- declare const SelectScrollUpButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollUpButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
8
- declare const SelectScrollDownButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollDownButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
9
- declare const SelectContent: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
10
- declare const SelectLabel: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
11
- declare const SelectItem: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
12
- declare const SelectSeparator: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
6
+ declare const SelectTrigger: React.FC<Omit<SelectPrimitive.SelectTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & {
7
+ ref?: React.Ref<HTMLButtonElement> | undefined;
8
+ }>;
9
+ declare const SelectScrollUpButton: React.FC<Omit<SelectPrimitive.SelectScrollUpButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
10
+ ref?: React.Ref<HTMLDivElement> | undefined;
11
+ }>;
12
+ declare const SelectScrollDownButton: React.FC<Omit<SelectPrimitive.SelectScrollDownButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
13
+ ref?: React.Ref<HTMLDivElement> | undefined;
14
+ }>;
15
+ declare const SelectContent: React.FC<Omit<SelectPrimitive.SelectContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
16
+ ref?: React.Ref<HTMLDivElement> | undefined;
17
+ }>;
18
+ declare const SelectLabel: React.FC<Omit<SelectPrimitive.SelectLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
19
+ ref?: React.Ref<HTMLDivElement> | undefined;
20
+ }>;
21
+ declare const SelectItem: React.FC<Omit<SelectPrimitive.SelectItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
22
+ ref?: React.Ref<HTMLDivElement> | undefined;
23
+ }>;
24
+ declare const SelectSeparator: React.FC<Omit<SelectPrimitive.SelectSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
25
+ ref?: React.Ref<HTMLDivElement> | undefined;
26
+ }>;
13
27
  export { Select, SelectGroup, SelectValue, SelectTrigger, SelectContent, SelectLabel, SelectItem, SelectSeparator, SelectScrollUpButton, SelectScrollDownButton, };
@@ -1,27 +1,27 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import React from "react";
3
+ import { forwardRefIfNeeded } from "@stackframe/stack-shared/dist/utils/react";
4
4
  import { CaretSortIcon, CheckIcon, ChevronDownIcon, ChevronUpIcon, } from "@radix-ui/react-icons";
5
5
  import * as SelectPrimitive from "@radix-ui/react-select";
6
6
  import { cn } from "../../lib/utils";
7
7
  const Select = SelectPrimitive.Root;
8
8
  const SelectGroup = SelectPrimitive.Group;
9
9
  const SelectValue = SelectPrimitive.Value;
10
- const SelectTrigger = React.forwardRef(({ className, children, ...props }, ref) => (_jsxs(SelectPrimitive.Trigger, { ref: ref, className: cn("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1", className), ...props, children: [children, _jsx(SelectPrimitive.Icon, { asChild: true, children: _jsx(CaretSortIcon, { className: "h-4 w-4 opacity-50" }) })] })));
10
+ const SelectTrigger = forwardRefIfNeeded(({ className, children, ...props }, ref) => (_jsxs(SelectPrimitive.Trigger, { ref: ref, className: cn("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1", className), ...props, children: [children, _jsx(SelectPrimitive.Icon, { asChild: true, children: _jsx(CaretSortIcon, { className: "h-4 w-4 opacity-50" }) })] })));
11
11
  SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
12
- const SelectScrollUpButton = React.forwardRef(({ className, ...props }, ref) => (_jsx(SelectPrimitive.ScrollUpButton, { ref: ref, className: cn("flex cursor-default items-center justify-center py-1", className), ...props, children: _jsx(ChevronUpIcon, {}) })));
12
+ const SelectScrollUpButton = forwardRefIfNeeded(({ className, ...props }, ref) => (_jsx(SelectPrimitive.ScrollUpButton, { ref: ref, className: cn("flex cursor-default items-center justify-center py-1", className), ...props, children: _jsx(ChevronUpIcon, {}) })));
13
13
  SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
14
- const SelectScrollDownButton = React.forwardRef(({ className, ...props }, ref) => (_jsx(SelectPrimitive.ScrollDownButton, { ref: ref, className: cn("flex cursor-default items-center justify-center py-1", className), ...props, children: _jsx(ChevronDownIcon, {}) })));
14
+ const SelectScrollDownButton = forwardRefIfNeeded(({ className, ...props }, ref) => (_jsx(SelectPrimitive.ScrollDownButton, { ref: ref, className: cn("flex cursor-default items-center justify-center py-1", className), ...props, children: _jsx(ChevronDownIcon, {}) })));
15
15
  SelectScrollDownButton.displayName =
16
16
  SelectPrimitive.ScrollDownButton.displayName;
17
- const SelectContent = React.forwardRef(({ className, children, position = "popper", ...props }, ref) => (_jsx(SelectPrimitive.Portal, { children: _jsxs(SelectPrimitive.Content, { ref: ref, className: cn("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover 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", position === "popper" &&
17
+ const SelectContent = forwardRefIfNeeded(({ className, children, position = "popper", ...props }, ref) => (_jsx(SelectPrimitive.Portal, { children: _jsxs(SelectPrimitive.Content, { ref: ref, className: cn("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover 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", position === "popper" &&
18
18
  "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", className), position: position, ...props, children: [_jsx(SelectScrollUpButton, {}), _jsx(SelectPrimitive.Viewport, { className: cn("p-1", position === "popper" &&
19
19
  "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"), children: children }), _jsx(SelectScrollDownButton, {})] }) })));
20
20
  SelectContent.displayName = SelectPrimitive.Content.displayName;
21
- const SelectLabel = React.forwardRef(({ className, ...props }, ref) => (_jsx(SelectPrimitive.Label, { ref: ref, className: cn("px-2 py-1.5 text-sm font-semibold", className), ...props })));
21
+ const SelectLabel = forwardRefIfNeeded(({ className, ...props }, ref) => (_jsx(SelectPrimitive.Label, { ref: ref, className: cn("px-2 py-1.5 text-sm font-semibold", className), ...props })));
22
22
  SelectLabel.displayName = SelectPrimitive.Label.displayName;
23
- const SelectItem = React.forwardRef(({ className, children, ...props }, ref) => (_jsxs(SelectPrimitive.Item, { ref: ref, className: cn("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 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 right-2 flex h-3.5 w-3.5 items-center justify-center", children: _jsx(SelectPrimitive.ItemIndicator, { children: _jsx(CheckIcon, { className: "h-4 w-4" }) }) }), _jsx(SelectPrimitive.ItemText, { children: children })] })));
23
+ const SelectItem = forwardRefIfNeeded(({ className, children, ...props }, ref) => (_jsxs(SelectPrimitive.Item, { ref: ref, className: cn("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 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 right-2 flex h-3.5 w-3.5 items-center justify-center", children: _jsx(SelectPrimitive.ItemIndicator, { children: _jsx(CheckIcon, { className: "h-4 w-4" }) }) }), _jsx(SelectPrimitive.ItemText, { children: children })] })));
24
24
  SelectItem.displayName = SelectPrimitive.Item.displayName;
25
- const SelectSeparator = React.forwardRef(({ className, ...props }, ref) => (_jsx(SelectPrimitive.Separator, { ref: ref, className: cn("-mx-1 my-1 h-px bg-muted", className), ...props })));
25
+ const SelectSeparator = forwardRefIfNeeded(({ className, ...props }, ref) => (_jsx(SelectPrimitive.Separator, { ref: ref, className: cn("-mx-1 my-1 h-px bg-muted", className), ...props })));
26
26
  SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
27
27
  export { Select, SelectGroup, SelectValue, SelectTrigger, SelectContent, SelectLabel, SelectItem, SelectSeparator, SelectScrollUpButton, SelectScrollDownButton, };
@@ -1,4 +1,6 @@
1
1
  import React from "react";
2
2
  import * as SeparatorPrimitive from "@radix-ui/react-separator";
3
- declare const Separator: React.ForwardRefExoticComponent<Omit<SeparatorPrimitive.SeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
3
+ declare const Separator: React.FC<Omit<SeparatorPrimitive.SeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
4
+ ref?: React.Ref<HTMLDivElement> | undefined;
5
+ }>;
4
6
  export { Separator };
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
- import React from "react";
3
+ import { forwardRefIfNeeded } from "@stackframe/stack-shared/dist/utils/react";
4
4
  import * as SeparatorPrimitive from "@radix-ui/react-separator";
5
5
  import { cn } from "../../lib/utils";
6
- const Separator = React.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => (_jsx(SeparatorPrimitive.Root, { ref: ref, decorative: decorative, orientation: orientation, className: cn("shrink-0 bg-border", orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]", className), ...props })));
6
+ const Separator = forwardRefIfNeeded(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => (_jsx(SeparatorPrimitive.Root, { ref: ref, decorative: decorative, orientation: orientation, className: cn("shrink-0 bg-border", orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]", className), ...props })));
7
7
  Separator.displayName = SeparatorPrimitive.Root.displayName;
8
8
  export { Separator };
@@ -5,14 +5,18 @@ declare const Sheet: React.FC<SheetPrimitive.DialogProps>;
5
5
  declare const SheetTrigger: React.ForwardRefExoticComponent<SheetPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
6
6
  declare const SheetClose: React.ForwardRefExoticComponent<SheetPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
7
7
  declare const SheetPortal: React.FC<SheetPrimitive.DialogPortalProps>;
8
- declare const SheetOverlay: React.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
8
+ declare const SheetOverlay: React.FC<Omit<SheetPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
9
+ ref?: React.Ref<HTMLDivElement> | undefined;
10
+ }>;
9
11
  declare const sheetVariants: (props?: ({
10
12
  side?: "top" | "right" | "bottom" | "left" | null | undefined;
11
13
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
12
14
  interface SheetContentProps extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>, VariantProps<typeof sheetVariants> {
13
15
  hasCloseButton?: boolean;
14
16
  }
15
- declare const SheetContent: React.ForwardRefExoticComponent<SheetContentProps & React.RefAttributes<HTMLDivElement>>;
17
+ declare const SheetContent: React.FC<SheetContentProps & {
18
+ ref?: React.Ref<HTMLDivElement> | undefined;
19
+ }>;
16
20
  declare const SheetHeader: {
17
21
  ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
18
22
  displayName: string;
@@ -21,6 +25,10 @@ declare const SheetFooter: {
21
25
  ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
22
26
  displayName: string;
23
27
  };
24
- declare const SheetTitle: React.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
25
- declare const SheetDescription: React.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
28
+ declare const SheetTitle: React.FC<Omit<SheetPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & {
29
+ ref?: React.Ref<HTMLHeadingElement> | undefined;
30
+ }>;
31
+ declare const SheetDescription: React.FC<Omit<SheetPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & {
32
+ ref?: React.Ref<HTMLParagraphElement> | undefined;
33
+ }>;
26
34
  export { Sheet, SheetPortal, SheetOverlay, SheetTrigger, SheetClose, SheetContent, SheetHeader, SheetFooter, SheetTitle, SheetDescription, };
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import React from "react";
3
+ import { forwardRefIfNeeded } from "@stackframe/stack-shared/dist/utils/react";
4
4
  import * as SheetPrimitive from "@radix-ui/react-dialog";
5
5
  import { Cross2Icon } from "@radix-ui/react-icons";
6
6
  import { cva } from "class-variance-authority";
@@ -9,7 +9,7 @@ const Sheet = SheetPrimitive.Root;
9
9
  const SheetTrigger = SheetPrimitive.Trigger;
10
10
  const SheetClose = SheetPrimitive.Close;
11
11
  const SheetPortal = SheetPrimitive.Portal;
12
- const SheetOverlay = React.forwardRef(({ className, ...props }, ref) => (_jsx(SheetPrimitive.Overlay, { 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, ref: ref })));
12
+ const SheetOverlay = forwardRefIfNeeded(({ className, ...props }, ref) => (_jsx(SheetPrimitive.Overlay, { 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, ref: ref })));
13
13
  SheetOverlay.displayName = SheetPrimitive.Overlay.displayName;
14
14
  const sheetVariants = cva("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-100 data-[state=open]:duration-100", {
15
15
  variants: {
@@ -24,14 +24,14 @@ const sheetVariants = cva("fixed z-50 gap-4 bg-background p-6 shadow-lg transiti
24
24
  side: "right",
25
25
  },
26
26
  });
27
- const SheetContent = React.forwardRef(({ side = "right", hasCloseButton = true, className, children, ...props }, ref) => (_jsxs(SheetPortal, { children: [_jsx(SheetOverlay, {}), _jsxs(SheetPrimitive.Content, { ref: ref, className: cn(sheetVariants({ side }), className), ...props, children: [children, hasCloseButton ? _jsxs(SheetPrimitive.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-secondary", children: [_jsx(Cross2Icon, { className: "h-4 w-4" }), _jsx("span", { className: "sr-only", children: "Close" })] }) : null] })] })));
27
+ const SheetContent = forwardRefIfNeeded(({ side = "right", hasCloseButton = true, className, children, ...props }, ref) => (_jsxs(SheetPortal, { children: [_jsx(SheetOverlay, {}), _jsxs(SheetPrimitive.Content, { ref: ref, className: cn(sheetVariants({ side }), className), ...props, children: [children, hasCloseButton ? _jsxs(SheetPrimitive.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-secondary", children: [_jsx(Cross2Icon, { className: "h-4 w-4" }), _jsx("span", { className: "sr-only", children: "Close" })] }) : null] })] })));
28
28
  SheetContent.displayName = SheetPrimitive.Content.displayName;
29
29
  const SheetHeader = ({ className, ...props }) => (_jsx("div", { className: cn("flex flex-col space-y-2 text-center sm:text-left", className), ...props }));
30
30
  SheetHeader.displayName = "SheetHeader";
31
31
  const SheetFooter = ({ className, ...props }) => (_jsx("div", { className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className), ...props }));
32
32
  SheetFooter.displayName = "SheetFooter";
33
- const SheetTitle = React.forwardRef(({ className, ...props }, ref) => (_jsx(SheetPrimitive.Title, { ref: ref, className: cn("text-lg font-semibold text-foreground", className), ...props })));
33
+ const SheetTitle = forwardRefIfNeeded(({ className, ...props }, ref) => (_jsx(SheetPrimitive.Title, { ref: ref, className: cn("text-lg font-semibold text-foreground", className), ...props })));
34
34
  SheetTitle.displayName = SheetPrimitive.Title.displayName;
35
- const SheetDescription = React.forwardRef(({ className, ...props }, ref) => (_jsx(SheetPrimitive.Description, { ref: ref, className: cn("text-sm text-muted-foreground", className), ...props })));
35
+ const SheetDescription = forwardRefIfNeeded(({ className, ...props }, ref) => (_jsx(SheetPrimitive.Description, { ref: ref, className: cn("text-sm text-muted-foreground", className), ...props })));
36
36
  SheetDescription.displayName = SheetPrimitive.Description.displayName;
37
37
  export { Sheet, SheetPortal, SheetOverlay, SheetTrigger, SheetClose, SheetContent, SheetHeader, SheetFooter, SheetTitle, SheetDescription, };
@@ -1,4 +1,6 @@
1
1
  import React from "react";
2
2
  import * as SliderPrimitive from "@radix-ui/react-slider";
3
- declare const Slider: React.ForwardRefExoticComponent<Omit<SliderPrimitive.SliderProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
3
+ declare const Slider: React.FC<Omit<SliderPrimitive.SliderProps & React.RefAttributes<HTMLSpanElement>, "ref"> & {
4
+ ref?: React.Ref<HTMLSpanElement> | undefined;
5
+ }>;
4
6
  export { Slider };
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import React from "react";
3
+ import { forwardRefIfNeeded } from "@stackframe/stack-shared/dist/utils/react";
4
4
  import * as SliderPrimitive from "@radix-ui/react-slider";
5
5
  import { cn } from "../../lib/utils";
6
- const Slider = React.forwardRef(({ className, ...props }, ref) => (_jsxs(SliderPrimitive.Root, { ref: ref, className: cn("relative flex w-full touch-none select-none items-center", className), ...props, children: [_jsx(SliderPrimitive.Track, { className: "relative h-1.5 w-full grow overflow-hidden rounded-full bg-primary/20", children: _jsx(SliderPrimitive.Range, { className: "absolute h-full bg-primary" }) }), _jsx(SliderPrimitive.Thumb, { className: "block h-4 w-4 rounded-full border border-primary/50 bg-background shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50" })] })));
6
+ const Slider = forwardRefIfNeeded(({ className, ...props }, ref) => (_jsxs(SliderPrimitive.Root, { ref: ref, className: cn("relative flex w-full touch-none select-none items-center", className), ...props, children: [_jsx(SliderPrimitive.Track, { className: "relative h-1.5 w-full grow overflow-hidden rounded-full bg-primary/20", children: _jsx(SliderPrimitive.Range, { className: "absolute h-full bg-primary" }) }), _jsx(SliderPrimitive.Thumb, { className: "block h-4 w-4 rounded-full border border-primary/50 bg-background shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50" })] })));
7
7
  Slider.displayName = SliderPrimitive.Root.displayName;
8
8
  export { Slider };
@@ -1,2 +1,4 @@
1
1
  import React from "react";
2
- export declare const Spinner: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
2
+ export declare const Spinner: React.FC<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
3
+ ref?: React.Ref<HTMLSpanElement> | undefined;
4
+ }>;
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { ReloadIcon } from "@radix-ui/react-icons";
3
- import React from "react";
4
- export const Spinner = React.forwardRef((props, ref) => {
3
+ import { forwardRefIfNeeded } from "@stackframe/stack-shared/dist/utils/react";
4
+ export const Spinner = forwardRefIfNeeded((props, ref) => {
5
5
  return (_jsx("span", { ref: ref, ...props, children: _jsx(ReloadIcon, { className: "animate-spin" }) }));
6
6
  });
7
7
  Spinner.displayName = "Spinner";
@@ -7,5 +7,7 @@ interface AsyncSwitchProps extends OriginalSwitchProps {
7
7
  onClick?: (e: React.MouseEvent<HTMLButtonElement>) => Promise<void> | void;
8
8
  loading?: boolean;
9
9
  }
10
- declare const Switch: React.ForwardRefExoticComponent<Omit<AsyncSwitchProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
10
+ declare const Switch: React.FC<AsyncSwitchProps & {
11
+ ref?: React.Ref<HTMLButtonElement> | undefined;
12
+ }>;
11
13
  export { Switch };
@@ -1,14 +1,14 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import React from "react";
3
+ import { forwardRefIfNeeded } from "@stackframe/stack-shared/dist/utils/react";
4
4
  import * as SwitchPrimitives from "@radix-ui/react-switch";
5
5
  import { cn } from "../../lib/utils";
6
6
  import { runAsynchronouslyWithAlert } from "@stackframe/stack-shared/dist/utils/promises";
7
7
  import { useAsyncCallback } from "@stackframe/stack-shared/dist/hooks/use-async-callback";
8
8
  import { Spinner } from "./spinner";
9
- const OriginalSwitch = React.forwardRef(({ className, ...props }, ref) => (_jsx(SwitchPrimitives.Root, { className: cn("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input", className), ...props, ref: ref, children: _jsx(SwitchPrimitives.Thumb, { className: cn("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0") }) })));
9
+ const OriginalSwitch = forwardRefIfNeeded(({ className, ...props }, ref) => (_jsx(SwitchPrimitives.Root, { className: cn("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input", className), ...props, ref: ref, children: _jsx(SwitchPrimitives.Thumb, { className: cn("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0") }) })));
10
10
  OriginalSwitch.displayName = SwitchPrimitives.Root.displayName;
11
- const Switch = React.forwardRef(({ loading: loadingProp, onClick, onCheckedChange, ...props }, ref) => {
11
+ const Switch = forwardRefIfNeeded(({ loading: loadingProp, onClick, onCheckedChange, ...props }, ref) => {
12
12
  const [handleClick, isLoadingClick] = useAsyncCallback(async (e) => {
13
13
  await onClick?.(e);
14
14
  }, [onClick]);
@@ -1,10 +1,26 @@
1
1
  import React from "react";
2
- declare const Table: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableElement> & React.RefAttributes<HTMLTableElement>>;
3
- declare const TableHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
4
- declare const TableBody: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
5
- declare const TableFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
6
- declare const TableRow: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableRowElement> & React.RefAttributes<HTMLTableRowElement>>;
7
- declare const TableHead: React.ForwardRefExoticComponent<React.ThHTMLAttributes<HTMLTableCellElement> & React.RefAttributes<HTMLTableCellElement>>;
8
- declare const TableCell: React.ForwardRefExoticComponent<React.TdHTMLAttributes<HTMLTableCellElement> & React.RefAttributes<HTMLTableCellElement>>;
9
- declare const TableCaption: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableCaptionElement> & React.RefAttributes<HTMLTableCaptionElement>>;
2
+ declare const Table: React.FC<React.HTMLAttributes<HTMLTableElement> & {
3
+ ref?: React.Ref<HTMLTableElement> | undefined;
4
+ }>;
5
+ declare const TableHeader: React.FC<React.HTMLAttributes<HTMLTableSectionElement> & {
6
+ ref?: React.Ref<HTMLTableSectionElement> | undefined;
7
+ }>;
8
+ declare const TableBody: React.FC<React.HTMLAttributes<HTMLTableSectionElement> & {
9
+ ref?: React.Ref<HTMLTableSectionElement> | undefined;
10
+ }>;
11
+ declare const TableFooter: React.FC<React.HTMLAttributes<HTMLTableSectionElement> & {
12
+ ref?: React.Ref<HTMLTableSectionElement> | undefined;
13
+ }>;
14
+ declare const TableRow: React.FC<React.HTMLAttributes<HTMLTableRowElement> & {
15
+ ref?: React.Ref<HTMLTableRowElement> | undefined;
16
+ }>;
17
+ declare const TableHead: React.FC<React.ThHTMLAttributes<HTMLTableCellElement> & {
18
+ ref?: React.Ref<HTMLTableCellElement> | undefined;
19
+ }>;
20
+ declare const TableCell: React.FC<React.TdHTMLAttributes<HTMLTableCellElement> & {
21
+ ref?: React.Ref<HTMLTableCellElement> | undefined;
22
+ }>;
23
+ declare const TableCaption: React.FC<React.HTMLAttributes<HTMLTableCaptionElement> & {
24
+ ref?: React.Ref<HTMLTableCaptionElement> | undefined;
25
+ }>;
10
26
  export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption, };