@stackframe/stack-ui 2.8.3 → 2.8.6

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 (40) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/components/ui/accordion.js +2 -2
  3. package/dist/components/ui/alert.js +1 -1
  4. package/dist/components/ui/avatar.js +1 -1
  5. package/dist/components/ui/badge.js +1 -1
  6. package/dist/components/ui/breadcrumb.js +1 -1
  7. package/dist/components/ui/button.js +1 -1
  8. package/dist/components/ui/calendar.js +1 -1
  9. package/dist/components/ui/card.js +1 -1
  10. package/dist/components/ui/checkbox.js +1 -1
  11. package/dist/components/ui/context-menu.js +1 -1
  12. package/dist/components/ui/dialog.js +6 -6
  13. package/dist/components/ui/dropdown-menu.js +4 -4
  14. package/dist/components/ui/hover-card.js +1 -1
  15. package/dist/components/ui/inline-code.js +1 -1
  16. package/dist/components/ui/input-otp.js +1 -1
  17. package/dist/components/ui/input.js +1 -1
  18. package/dist/components/ui/label.js +1 -1
  19. package/dist/components/ui/menubar.js +1 -1
  20. package/dist/components/ui/navigation-menu.js +6 -6
  21. package/dist/components/ui/password-input.js +1 -1
  22. package/dist/components/ui/popover.js +1 -1
  23. package/dist/components/ui/progress.js +1 -1
  24. package/dist/components/ui/radio-group.js +1 -1
  25. package/dist/components/ui/scroll-area.js +1 -1
  26. package/dist/components/ui/separator.js +1 -1
  27. package/dist/components/ui/sheet.js +1 -1
  28. package/dist/components/ui/skeleton.js +1 -1
  29. package/dist/components/ui/slider.js +1 -1
  30. package/dist/components/ui/spinner.js +2 -1
  31. package/dist/components/ui/switch.js +1 -1
  32. package/dist/components/ui/table.js +1 -1
  33. package/dist/components/ui/tabs.js +1 -1
  34. package/dist/components/ui/textarea.js +1 -1
  35. package/dist/components/ui/toast.js +2 -2
  36. package/dist/components/ui/toaster.js +1 -1
  37. package/dist/components/ui/toggle.js +1 -1
  38. package/dist/components/ui/tooltip.js +1 -1
  39. package/dist/components/ui/typography.js +1 -1
  40. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # @stackframe/stack-ui
2
2
 
3
+ ## 2.8.6
4
+
5
+ ### Patch Changes
6
+
7
+ - Various changes
8
+ - Updated dependencies
9
+ - @stackframe/stack-shared@2.8.6
10
+
11
+ ## 2.8.5
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies
16
+ - @stackframe/stack-shared@2.8.5
17
+
18
+ ## 2.8.4
19
+
20
+ ### Patch Changes
21
+
22
+ - Updated dependencies
23
+ - @stackframe/stack-shared@2.8.4
24
+
3
25
  ## 2.8.3
4
26
 
5
27
  ### Patch Changes
@@ -7,8 +7,8 @@ import { cn } from "../../lib/utils";
7
7
  const Accordion = AccordionPrimitive.Root;
8
8
  const AccordionItem = forwardRefIfNeeded(({ className, ...props }, ref) => (_jsx(AccordionPrimitive.Item, { ref: ref, className: cn("border-b", className), ...props })));
9
9
  AccordionItem.displayName = "AccordionItem";
10
- const AccordionTrigger = forwardRefIfNeeded(({ className, children, disabled, ...props }, ref) => (_jsx(AccordionPrimitive.Header, { className: "flex", children: _jsxs(AccordionPrimitive.Trigger, { ref: ref, className: cn("flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180", className), ...props, children: [children, !disabled && _jsx(ChevronDownIcon, { className: "h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200" })] }) })));
10
+ const AccordionTrigger = forwardRefIfNeeded(({ className, children, disabled, ...props }, ref) => (_jsx(AccordionPrimitive.Header, { className: "stack-scope flex", children: _jsxs(AccordionPrimitive.Trigger, { ref: ref, className: cn("flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180", className), ...props, children: [children, !disabled && _jsx(ChevronDownIcon, { className: "h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200" })] }) })));
11
11
  AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
12
- const AccordionContent = forwardRefIfNeeded(({ className, children, ...props }, ref) => (_jsx(AccordionPrimitive.Content, { ref: ref, className: "text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down", ...props, children: _jsx("div", { className: cn("pb-4 pt-0", className), children: children }) })));
12
+ const AccordionContent = forwardRefIfNeeded(({ className, children, ...props }, ref) => (_jsx(AccordionPrimitive.Content, { ref: ref, className: "stack-scope text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down", ...props, children: _jsx("div", { className: cn("pb-4 pt-0", className), children: children }) })));
13
13
  AccordionContent.displayName = AccordionPrimitive.Content.displayName;
14
14
  export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { forwardRefIfNeeded } from "@stackframe/stack-shared/dist/utils/react";
3
3
  import { cva } from "class-variance-authority";
4
4
  import { cn } from "../../lib/utils";
5
- const alertVariants = cva("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7", {
5
+ const alertVariants = cva("stack-scope relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7", {
6
6
  variants: {
7
7
  variant: {
8
8
  default: "bg-background text-foreground",
@@ -3,7 +3,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import { forwardRefIfNeeded } from "@stackframe/stack-shared/dist/utils/react";
4
4
  import * as AvatarPrimitive from "@radix-ui/react-avatar";
5
5
  import { cn } from "../../lib/utils";
6
- const Avatar = forwardRefIfNeeded(({ className, ...props }, ref) => (_jsx(AvatarPrimitive.Root, { ref: ref, className: cn("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full", className), ...props })));
6
+ const Avatar = forwardRefIfNeeded(({ className, ...props }, ref) => (_jsx(AvatarPrimitive.Root, { ref: ref, className: cn("stack-scope relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full", className), ...props })));
7
7
  Avatar.displayName = AvatarPrimitive.Root.displayName;
8
8
  const AvatarImage = forwardRefIfNeeded(({ className, ...props }, ref) => (_jsx(AvatarPrimitive.Image, { ref: ref, className: cn("aspect-square h-full w-full", className), ...props })));
9
9
  AvatarImage.displayName = AvatarPrimitive.Image.displayName;
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { forwardRefIfNeeded } from "@stackframe/stack-shared/dist/utils/react";
3
3
  import { cva } from "class-variance-authority";
4
4
  import { cn } from "../../lib/utils";
5
- const badgeVariants = cva("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2", {
5
+ const badgeVariants = cva("stack-scope inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2", {
6
6
  variants: {
7
7
  variant: {
8
8
  default: "border-transparent bg-primary text-primary-foreground shadow",
@@ -5,7 +5,7 @@ import { Slot } from "@radix-ui/react-slot";
5
5
  import { cn } from "../../lib/utils";
6
6
  const Breadcrumb = forwardRefIfNeeded(({ ...props }, ref) => _jsx("nav", { ref: ref, "aria-label": "breadcrumb", ...props }));
7
7
  Breadcrumb.displayName = "Breadcrumb";
8
- const BreadcrumbList = forwardRefIfNeeded(({ className, ...props }, ref) => (_jsx("ol", { ref: ref, className: cn("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5", className), ...props })));
8
+ const BreadcrumbList = forwardRefIfNeeded(({ className, ...props }, ref) => (_jsx("ol", { ref: ref, className: cn("stack-scope flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5", className), ...props })));
9
9
  BreadcrumbList.displayName = "BreadcrumbList";
10
10
  const BreadcrumbItem = forwardRefIfNeeded(({ className, ...props }, ref) => (_jsx("li", { ref: ref, className: cn("inline-flex items-center gap-1.5", className), ...props })));
11
11
  BreadcrumbItem.displayName = "BreadcrumbItem";
@@ -6,7 +6,7 @@ import { useAsyncCallback } from "@stackframe/stack-shared/dist/hooks/use-async-
6
6
  import { runAsynchronouslyWithAlert } from "@stackframe/stack-shared/dist/utils/promises";
7
7
  import { cn } from "../../lib/utils";
8
8
  import { Spinner } from "./spinner";
9
- const buttonVariants = cva("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50", {
9
+ const buttonVariants = cva("stack-scope inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50", {
10
10
  variants: {
11
11
  variant: {
12
12
  default: "bg-primary text-primary-foreground hover:bg-primary/90",
@@ -5,7 +5,7 @@ import { DayPicker } from "react-day-picker";
5
5
  import { cn } from "../../lib/utils";
6
6
  import { buttonVariants } from "./button";
7
7
  function Calendar({ className, classNames, showOutsideDays = true, ...props }) {
8
- return (_jsx(DayPicker, { showOutsideDays: showOutsideDays, className: cn("p-3", className), classNames: {
8
+ return (_jsx(DayPicker, { showOutsideDays: showOutsideDays, className: cn("stack-scope p-3", className), classNames: {
9
9
  months: "flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",
10
10
  month: "space-y-4",
11
11
  caption: "flex justify-center pt-1 relative items-center",
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { forwardRefIfNeeded } from "@stackframe/stack-shared/dist/utils/react";
3
3
  import { cn } from "../../lib/utils";
4
- const Card = forwardRefIfNeeded(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn("rounded-xl border bg-card text-card-foreground shadow-sm", className), ...props })));
4
+ const Card = forwardRefIfNeeded(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn("stack-scope rounded-xl border bg-card text-card-foreground shadow-sm", className), ...props })));
5
5
  Card.displayName = "Card";
6
6
  const CardHeader = forwardRefIfNeeded(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn("flex flex-col space-y-1.5 p-6 pb-0", className), ...props })));
7
7
  CardHeader.displayName = "CardHeader";
@@ -4,6 +4,6 @@ import { forwardRefIfNeeded } from "@stackframe/stack-shared/dist/utils/react";
4
4
  import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
5
5
  import { CheckIcon } from "@radix-ui/react-icons";
6
6
  import { cn } from "../../lib/utils";
7
- const Checkbox = forwardRefIfNeeded(({ className, ...props }, ref) => (_jsx(CheckboxPrimitive.Root, { ref: ref, className: cn("peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground", className), ...props, children: _jsx(CheckboxPrimitive.Indicator, { className: cn("flex items-center justify-center text-current"), children: _jsx(CheckIcon, { className: "h-4 w-4" }) }) })));
7
+ const Checkbox = forwardRefIfNeeded(({ className, ...props }, ref) => (_jsx(CheckboxPrimitive.Root, { ref: ref, className: cn("stack-scope peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground", className), ...props, children: _jsx(CheckboxPrimitive.Indicator, { className: cn("flex items-center justify-center text-current"), children: _jsx(CheckIcon, { className: "h-4 w-4" }) }) })));
8
8
  Checkbox.displayName = CheckboxPrimitive.Root.displayName;
9
9
  export { Checkbox };
@@ -10,7 +10,7 @@ const ContextMenuGroup = ContextMenuPrimitive.Group;
10
10
  const ContextMenuPortal = ContextMenuPrimitive.Portal;
11
11
  const ContextMenuSub = ContextMenuPrimitive.Sub;
12
12
  const ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;
13
- const ContextMenuSubTrigger = forwardRefIfNeeded(({ className, inset, children, ...props }, ref) => (_jsxs(ContextMenuPrimitive.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" })] })));
13
+ const ContextMenuSubTrigger = forwardRefIfNeeded(({ className, inset, children, ...props }, ref) => (_jsxs(ContextMenuPrimitive.SubTrigger, { ref: ref, className: cn("stack-scope 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" })] })));
14
14
  ContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName;
15
15
  const ContextMenuSubContent = forwardRefIfNeeded(({ className, ...props }, ref) => (_jsx(ContextMenuPrimitive.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 })));
16
16
  ContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName;
@@ -8,17 +8,17 @@ const Dialog = DialogPrimitive.Root;
8
8
  const DialogTrigger = DialogPrimitive.Trigger;
9
9
  const DialogPortal = DialogPrimitive.Portal;
10
10
  const DialogClose = DialogPrimitive.Close;
11
- const DialogOverlay = forwardRefIfNeeded(({ 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 })));
11
+ const DialogOverlay = forwardRefIfNeeded(({ className, ...props }, ref) => (_jsx(DialogPrimitive.Overlay, { ref: ref, className: cn("stack-scope 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
12
  DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
13
13
  const DialogContent = forwardRefIfNeeded(({ className, children, ...props }, ref) => (_jsxs(DialogPortal, { children: [_jsx(DialogOverlay, {}), _jsxs(DialogPrimitive.Content, { ref: ref, className: cn("stack-scope 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
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 }));
15
+ const DialogBody = ({ className, ...props }) => (_jsx("div", { className: cn("stack-scope 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("stack-scope flex flex-col space-y-1.5 text-center sm:text-left", className), ...props }));
17
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 }));
18
+ const DialogFooter = ({ className, ...props }) => (_jsx("div", { className: cn("stack-scope flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className), ...props }));
19
19
  DialogFooter.displayName = "DialogFooter";
20
- const DialogTitle = forwardRefIfNeeded(({ className, ...props }, ref) => (_jsx(DialogPrimitive.Title, { ref: ref, className: cn("text-lg font-semibold leading-none tracking-tight", className), ...props })));
20
+ const DialogTitle = forwardRefIfNeeded(({ className, ...props }, ref) => (_jsx(DialogPrimitive.Title, { ref: ref, className: cn("stack-scope text-lg font-semibold leading-none tracking-tight", className), ...props })));
21
21
  DialogTitle.displayName = DialogPrimitive.Title.displayName;
22
- const DialogDescription = forwardRefIfNeeded(({ className, ...props }, ref) => (_jsx(DialogPrimitive.Description, { ref: ref, className: cn("text-sm text-muted-foreground", className), ...props })));
22
+ const DialogDescription = forwardRefIfNeeded(({ className, ...props }, ref) => (_jsx(DialogPrimitive.Description, { ref: ref, className: cn("stack-scope text-sm text-muted-foreground", className), ...props })));
23
23
  DialogDescription.displayName = DialogPrimitive.Description.displayName;
24
24
  export { Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
@@ -29,10 +29,10 @@ const DropdownMenuGroup = DropdownMenuPrimitive.Group;
29
29
  const DropdownMenuPortal = DropdownMenuPrimitive.Portal;
30
30
  const DropdownMenuSub = DropdownMenuPrimitive.Sub;
31
31
  const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
32
- const DropdownMenuSubTrigger = forwardRefIfNeeded(({ 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" })] })));
32
+ const DropdownMenuSubTrigger = forwardRefIfNeeded(({ className, inset, children, ...props }, ref) => (_jsxs(DropdownMenuPrimitive.SubTrigger, { ref: ref, className: cn("stack-scope 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" })] })));
33
33
  DropdownMenuSubTrigger.displayName =
34
34
  DropdownMenuPrimitive.SubTrigger.displayName;
35
- const DropdownMenuSubContent = forwardRefIfNeeded(({ 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 })));
35
+ const DropdownMenuSubContent = forwardRefIfNeeded(({ className, ...props }, ref) => (_jsx(DropdownMenuPrimitive.SubContent, { ref: ref, className: cn("stack-scope 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 })));
36
36
  DropdownMenuSubContent.displayName =
37
37
  DropdownMenuPrimitive.SubContent.displayName;
38
38
  const DropdownMenuContent = forwardRefIfNeeded(({ className, sideOffset = 4, ...props }, ref) => (_jsx(DropdownMenuPrimitive.Portal, { children: _jsx(DropdownMenuPrimitive.Content, { ref: ref, sideOffset: sideOffset, className: cn("stack-scope 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 }) })));
@@ -43,7 +43,7 @@ const DropdownMenuItem = forwardRefIfNeeded(({ className, inset, ...props }, ref
43
43
  await props.onClick?.(e);
44
44
  setOpen(false);
45
45
  }, [props.onClick]);
46
- return _jsxs(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, disabled: isLoading || props.disabled, onClick: props.onClick ? (e) => {
46
+ return _jsxs(DropdownMenuPrimitive.Item, { ref: ref, className: cn("stack-scope 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, disabled: isLoading || props.disabled, onClick: props.onClick ? (e) => {
47
47
  e.preventDefault();
48
48
  e.stopPropagation();
49
49
  runAsynchronouslyWithAlert(handleClick(e));
@@ -60,7 +60,7 @@ DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
60
60
  const DropdownMenuSeparator = forwardRefIfNeeded(({ className, ...props }, ref) => (_jsx(DropdownMenuPrimitive.Separator, { ref: ref, className: cn("-mx-1 my-1 h-px bg-muted", className), ...props })));
61
61
  DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
62
62
  const DropdownMenuShortcut = ({ className, ...props }) => {
63
- return (_jsx("span", { className: cn("ml-auto text-xs tracking-widest opacity-60", className), ...props }));
63
+ return (_jsx("span", { className: cn("stack-scope ml-auto text-xs tracking-widest opacity-60", className), ...props }));
64
64
  };
65
65
  DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
66
66
  export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger };
@@ -5,6 +5,6 @@ import * as HoverCardPrimitive from "@radix-ui/react-hover-card";
5
5
  import { cn } from "../../lib/utils";
6
6
  const HoverCard = HoverCardPrimitive.Root;
7
7
  const HoverCardTrigger = HoverCardPrimitive.Trigger;
8
- const HoverCardContent = forwardRefIfNeeded(({ 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 })));
8
+ const HoverCardContent = forwardRefIfNeeded(({ className, align = "center", sideOffset = 4, ...props }, ref) => (_jsx(HoverCardPrimitive.Content, { ref: ref, align: align, sideOffset: sideOffset, className: cn("stack-scope 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
9
  HoverCardContent.displayName = HoverCardPrimitive.Content.displayName;
10
10
  export { HoverCard, HoverCardTrigger, HoverCardContent };
@@ -8,7 +8,7 @@ import { runAsynchronously } from "@stackframe/stack-shared/dist/utils/promises"
8
8
  import { useToast } from "./use-toast";
9
9
  const InlineCode = forwardRefIfNeeded((props, ref) => {
10
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) => {
11
+ return _jsx("code", { ref: ref, ...props, className: cn("stack-scope 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
12
  props.onClick?.(e);
13
13
  if (!hasClickableParent(e.currentTarget)) {
14
14
  e.stopPropagation();
@@ -5,7 +5,7 @@ import { forwardRefIfNeeded } from "@stackframe/stack-shared/dist/utils/react";
5
5
  import { DashIcon } from "@radix-ui/react-icons";
6
6
  import { OTPInput, OTPInputContext } from "input-otp";
7
7
  import { cn } from "../../lib/utils";
8
- const InputOTP = forwardRefIfNeeded(({ 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
+ const InputOTP = forwardRefIfNeeded(({ className, containerClassName, ...props }, ref) => (_jsx(OTPInput, { ref: ref, containerClassName: cn("stack-scope flex items-center gap-2 has-[:disabled]:opacity-50", containerClassName), className: cn("disabled:cursor-not-allowed", className), ...props })));
9
9
  InputOTP.displayName = "InputOTP";
10
10
  const InputOTPGroup = forwardRefIfNeeded(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn("flex items-center gap-1", className), ...props })));
11
11
  InputOTPGroup.displayName = "InputOTPGroup";
@@ -3,7 +3,7 @@ import { forwardRefIfNeeded } from "@stackframe/stack-shared/dist/utils/react";
3
3
  import React from "react";
4
4
  import { cn } from "../../lib/utils";
5
5
  export const Input = forwardRefIfNeeded(({ className, type, prefixItem, ...props }, ref) => {
6
- const baseClasses = "flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-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";
6
+ const baseClasses = "stack-scope flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-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";
7
7
  if (prefixItem) {
8
8
  return (_jsxs("div", { className: "flex flex-row items-center", children: [_jsx("div", { className: 'flex self-stretch justify-center items-center text-muted-foreground pl-3 select-none bg-muted/70 pr-3 border-r border-input rounded-l-md', children: prefixItem }), _jsx("input", { type: type, className: cn(baseClasses, 'rounded-l-none', className), ref: ref, ...props })] }));
9
9
  }
@@ -4,7 +4,7 @@ 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
- 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");
7
+ const labelVariants = cva("stack-scope text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 text-gray-600 dark:text-gray-400");
8
8
  const Label = forwardRefIfNeeded(({ className, ...props }, ref) => (_jsx("label", { ref: ref, className: cn(labelVariants(), className), ...props })));
9
9
  Label.displayName = LabelPrimitive.Root.displayName;
10
10
  const SpanLabel = forwardRefIfNeeded(({ className, ...props }, ref) => (_jsx("span", { ref: ref, className: cn(labelVariants(), className), ...props })));
@@ -10,7 +10,7 @@ const MenubarGroup = MenubarPrimitive.Group;
10
10
  const MenubarPortal = MenubarPrimitive.Portal;
11
11
  const MenubarSub = MenubarPrimitive.Sub;
12
12
  const MenubarRadioGroup = MenubarPrimitive.RadioGroup;
13
- 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
+ const Menubar = React.forwardRef(({ className, ...props }, ref) => (_jsx(MenubarPrimitive.Root, { ref: ref, className: cn("stack-scope flex h-9 items-center space-x-1 rounded-md border bg-background p-1 shadow-sm", className), ...props })));
14
14
  Menubar.displayName = MenubarPrimitive.Root.displayName;
15
15
  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 })));
16
16
  MenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName;
@@ -5,21 +5,21 @@ 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 = 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, {})] })));
8
+ const NavigationMenu = forwardRefIfNeeded(({ className, children, ...props }, ref) => (_jsxs(NavigationMenuPrimitive.Root, { ref: ref, className: cn("stack-scope 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 = 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 })));
10
+ const NavigationMenuList = forwardRefIfNeeded(({ className, ...props }, ref) => (_jsx(NavigationMenuPrimitive.List, { ref: ref, className: cn("stack-scope 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
- 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 navigationMenuTriggerStyle = cva("stack-scope 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
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 = 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 })));
16
+ const NavigationMenuContent = forwardRefIfNeeded(({ className, ...props }, ref) => (_jsx(NavigationMenuPrimitive.Content, { ref: ref, className: cn("stack-scope 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 = 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 }) })));
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("stack-scope 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 = 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" }) })));
22
+ const NavigationMenuIndicator = forwardRefIfNeeded(({ className, ...props }, ref) => (_jsx(NavigationMenuPrimitive.Indicator, { ref: ref, className: cn("stack-scope 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, };
@@ -8,7 +8,7 @@ import { cn } from "../../lib/utils";
8
8
  import { forwardRefIfNeeded } from "@stackframe/stack-shared/dist/utils/react";
9
9
  const PasswordInput = forwardRefIfNeeded(({ className, ...props }, ref) => {
10
10
  const [showPassword, setShowPassword] = useState(false);
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
+ return (_jsxs("div", { className: "relative", children: [_jsx(Input, { type: showPassword ? "text" : "password", className: cn("stack-scope 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" })) })] }));
12
12
  });
13
13
  PasswordInput.displayName = "PasswordInput";
14
14
  export { PasswordInput };
@@ -6,6 +6,6 @@ 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 = 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 }) })));
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("stack-scope 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 };
@@ -3,6 +3,6 @@ import { jsx as _jsx } from "react/jsx-runtime";
3
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 = 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)}%)` } }) })));
6
+ const Progress = forwardRefIfNeeded(({ className, value, ...props }, ref) => (_jsx(ProgressPrimitive.Root, { ref: ref, className: cn("stack-scope 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 };
@@ -5,7 +5,7 @@ import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
5
5
  import { forwardRefIfNeeded } from "@stackframe/stack-shared/dist/utils/react";
6
6
  import { cn } from "../../lib/utils";
7
7
  const RadioGroup = forwardRefIfNeeded(({ className, ...props }, ref) => {
8
- return (_jsx(RadioGroupPrimitive.Root, { className: cn("grid gap-2", className), ...props, ref: ref }));
8
+ return (_jsx(RadioGroupPrimitive.Root, { className: cn("stack-scope grid gap-2", className), ...props, ref: ref }));
9
9
  });
10
10
  RadioGroup.displayName = RadioGroupPrimitive.Root.displayName;
11
11
  const RadioGroupItem = forwardRefIfNeeded(({ className, ...props }, ref) => {
@@ -3,7 +3,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
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 = 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, {})] })));
6
+ const ScrollArea = forwardRefIfNeeded(({ className, children, ...props }, ref) => (_jsxs(ScrollAreaPrimitive.Root, { ref: ref, className: cn("stack-scope 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
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" &&
@@ -3,6 +3,6 @@ import { jsx as _jsx } from "react/jsx-runtime";
3
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 = 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 })));
6
+ const Separator = forwardRefIfNeeded(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => (_jsx(SeparatorPrimitive.Root, { ref: ref, decorative: decorative, orientation: orientation, className: cn("stack-scope 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 };
@@ -11,7 +11,7 @@ const SheetClose = SheetPrimitive.Close;
11
11
  const SheetPortal = SheetPrimitive.Portal;
12
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
- 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", {
14
+ const sheetVariants = cva("stack-scope 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: {
16
16
  side: {
17
17
  top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
@@ -2,6 +2,6 @@
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import { cn } from "../../lib/utils";
4
4
  function Skeleton({ className, ...props }) {
5
- return (_jsx("div", { className: cn("animate-pulse rounded-md bg-primary/10", className), ...props }));
5
+ return (_jsx("div", { className: cn("stack-scope animate-pulse rounded-md bg-primary/10", className), ...props }));
6
6
  }
7
7
  export { Skeleton };
@@ -3,6 +3,6 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
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 = 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" })] })));
6
+ const Slider = forwardRefIfNeeded(({ className, ...props }, ref) => (_jsxs(SliderPrimitive.Root, { ref: ref, className: cn("stack-scope 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,7 +1,8 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { ReloadIcon } from "@radix-ui/react-icons";
3
3
  import { forwardRefIfNeeded } from "@stackframe/stack-shared/dist/utils/react";
4
+ import { cn } from "../../lib/utils";
4
5
  export const Spinner = forwardRefIfNeeded(({ size = 15, ...props }, ref) => {
5
- return (_jsx("span", { ref: ref, ...props, children: _jsx(ReloadIcon, { className: "animate-spin", width: size, height: size }) }));
6
+ return (_jsx("span", { ref: ref, ...props, className: cn("stack-scope", props.className), children: _jsx(ReloadIcon, { className: "animate-spin", width: size, height: size }) }));
6
7
  });
7
8
  Spinner.displayName = "Spinner";
@@ -6,7 +6,7 @@ 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 = 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") }) })));
9
+ const OriginalSwitch = forwardRefIfNeeded(({ className, ...props }, ref) => (_jsx(SwitchPrimitives.Root, { className: cn("stack-scope 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
11
  const Switch = forwardRefIfNeeded(({ loading: loadingProp, onClick, onCheckedChange, ...props }, ref) => {
12
12
  const [handleClick, isLoadingClick] = useAsyncCallback(async (e) => {
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { forwardRefIfNeeded } from "@stackframe/stack-shared/dist/utils/react";
3
3
  import { cn } from "../../lib/utils";
4
- const Table = forwardRefIfNeeded(({ className, ...props }, ref) => (_jsx("div", { className: "relative w-full overflow-auto", children: _jsx("table", { ref: ref, className: cn("w-full caption-bottom text-sm", className), ...props }) })));
4
+ const Table = forwardRefIfNeeded(({ className, ...props }, ref) => (_jsx("div", { className: "relative w-full overflow-auto", children: _jsx("table", { ref: ref, className: cn("stack-scope w-full caption-bottom text-sm", className), ...props }) })));
5
5
  Table.displayName = "Table";
6
6
  const TableHeader = forwardRefIfNeeded(({ className, ...props }, ref) => (_jsx("thead", { ref: ref, className: cn("[&_tr]:border-b", className), ...props })));
7
7
  TableHeader.displayName = "TableHeader";
@@ -4,7 +4,7 @@ import { forwardRefIfNeeded } from "@stackframe/stack-shared/dist/utils/react";
4
4
  import * as TabsPrimitive from "@radix-ui/react-tabs";
5
5
  import { cn } from "../../lib/utils";
6
6
  const Tabs = TabsPrimitive.Root;
7
- const TabsList = forwardRefIfNeeded(({ className, ...props }, ref) => (_jsx(TabsPrimitive.List, { ref: ref, className: cn("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground", className), ...props })));
7
+ const TabsList = forwardRefIfNeeded(({ className, ...props }, ref) => (_jsx(TabsPrimitive.List, { ref: ref, className: cn("stack-scope inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground", className), ...props })));
8
8
  TabsList.displayName = TabsPrimitive.List.displayName;
9
9
  const TabsTrigger = forwardRefIfNeeded(({ className, ...props }, ref) => (_jsx(TabsPrimitive.Trigger, { ref: ref, className: cn("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm", className), ...props })));
10
10
  TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { forwardRefIfNeeded } from "@stackframe/stack-shared/dist/utils/react";
3
3
  import { cn } from "../../lib/utils";
4
4
  const Textarea = forwardRefIfNeeded(({ className, ...props }, ref) => {
5
- return (_jsx("textarea", { className: cn("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm 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 }));
5
+ return (_jsx("textarea", { className: cn("stack-scope flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm 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
6
  });
7
7
  Textarea.displayName = "Textarea";
8
8
  export { Textarea };
@@ -6,9 +6,9 @@ import * as ToastPrimitives from "@radix-ui/react-toast";
6
6
  import { cva } from "class-variance-authority";
7
7
  import { cn } from "../../lib/utils";
8
8
  const ToastProvider = ToastPrimitives.Provider;
9
- const ToastViewport = forwardRefIfNeeded(({ className, ...props }, ref) => (_jsx(ToastPrimitives.Viewport, { ref: ref, className: cn("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]", className), ...props })));
9
+ const ToastViewport = forwardRefIfNeeded(({ className, ...props }, ref) => (_jsx(ToastPrimitives.Viewport, { ref: ref, className: cn("stack-scope fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]", className), ...props })));
10
10
  ToastViewport.displayName = ToastPrimitives.Viewport.displayName;
11
- const toastVariants = cva("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full", {
11
+ const toastVariants = cva("stack-scope group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full", {
12
12
  variants: {
13
13
  variant: {
14
14
  default: "border border-border bg-background text-foreground shadow-lg dark:border-gray-600 dark:bg-gray-800 dark:text-foreground",
@@ -5,6 +5,6 @@ import { useToast } from "./use-toast";
5
5
  export function Toaster() {
6
6
  const { toasts } = useToast();
7
7
  return (_jsxs(ToastProvider, { children: [toasts.map(function ({ id, title, description, action, ...props }) {
8
- return (_jsxs(Toast, { ...props, children: [_jsxs("div", { className: "grid gap-1", children: [title && _jsx(ToastTitle, { children: title }), description && (_jsx(ToastDescription, { children: description }))] }), action, _jsx(ToastClose, {})] }, id));
8
+ return (_jsxs(Toast, { ...props, children: [_jsxs("div", { className: "stack-scope grid gap-1", children: [title && _jsx(ToastTitle, { children: title }), description && (_jsx(ToastDescription, { children: description }))] }), action, _jsx(ToastClose, {})] }, id));
9
9
  }), _jsx(ToastViewport, {})] }));
10
10
  }
@@ -4,7 +4,7 @@ import { forwardRefIfNeeded } from "@stackframe/stack-shared/dist/utils/react";
4
4
  import * as TogglePrimitive from "@radix-ui/react-toggle";
5
5
  import { cva } from "class-variance-authority";
6
6
  import { cn } from "../../lib/utils";
7
- const toggleVariants = cva("inline-flex items-center justify-center rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground", {
7
+ const toggleVariants = cva("stack-scope inline-flex items-center justify-center rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground", {
8
8
  variants: {
9
9
  variant: {
10
10
  default: "bg-transparent",
@@ -7,6 +7,6 @@ const TooltipProvider = forwardRefIfNeeded((props, ref) => (_jsx(TooltipPrimitiv
7
7
  TooltipProvider.displayName = TooltipPrimitive.Provider.displayName;
8
8
  const Tooltip = TooltipPrimitive.Root;
9
9
  const TooltipTrigger = TooltipPrimitive.Trigger;
10
- const TooltipContent = forwardRefIfNeeded(({ className, sideOffset = 4, ...props }, ref) => (_jsx(TooltipPrimitive.Content, { ref: ref, sideOffset: sideOffset, className: cn("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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
+ const TooltipContent = forwardRefIfNeeded(({ className, sideOffset = 4, ...props }, ref) => (_jsx(TooltipPrimitive.Content, { ref: ref, sideOffset: sideOffset, className: cn("stack-scope z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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 })));
11
11
  TooltipContent.displayName = TooltipPrimitive.Content.displayName;
12
12
  export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { cn } from "../../lib/utils";
3
3
  import { cva } from "class-variance-authority";
4
4
  import { forwardRefIfNeeded } from "@stackframe/stack-shared/dist/utils/react";
5
- const typographyVariants = cva("text-md", {
5
+ const typographyVariants = cva("stack-scope text-md", {
6
6
  variants: {
7
7
  type: {
8
8
  h1: "text-3xl font-bold",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stackframe/stack-ui",
3
- "version": "2.8.3",
3
+ "version": "2.8.6",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "sideEffects": false,
@@ -76,7 +76,7 @@
76
76
  "react-hook-form": "^7.53.1",
77
77
  "react-resizable-panels": "^2.1.6",
78
78
  "tailwind-merge": "^2.5.4",
79
- "@stackframe/stack-shared": "2.8.3"
79
+ "@stackframe/stack-shared": "2.8.6"
80
80
  },
81
81
  "devDependencies": {
82
82
  "@types/react": "^18.2.12",