@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.
- package/CHANGELOG.md +16 -0
- package/dist/components/copy-button.d.ts +4 -2
- package/dist/components/copy-button.js +2 -2
- package/dist/components/data-table/data-table.d.ts +14 -16
- package/dist/components/data-table/data-table.js +36 -4
- package/dist/components/ui/accordion.d.ts +9 -3
- package/dist/components/ui/accordion.js +4 -4
- package/dist/components/ui/alert.d.ts +10 -4
- package/dist/components/ui/alert.js +4 -4
- package/dist/components/ui/avatar.d.ts +9 -3
- package/dist/components/ui/avatar.js +4 -4
- package/dist/components/ui/badge.d.ts +3 -1
- package/dist/components/ui/badge.js +2 -2
- package/dist/components/ui/breadcrumb.d.ts +17 -7
- package/dist/components/ui/breadcrumb.js +6 -6
- package/dist/components/ui/button.d.ts +3 -1
- package/dist/components/ui/button.js +3 -3
- package/dist/components/ui/card.d.ts +24 -8
- package/dist/components/ui/card.js +9 -9
- package/dist/components/ui/checkbox.d.ts +3 -1
- package/dist/components/ui/checkbox.js +2 -2
- package/dist/components/ui/command.d.ts +8 -72
- package/dist/components/ui/command.js +8 -8
- package/dist/components/ui/context-menu.d.ts +27 -11
- package/dist/components/ui/context-menu.js +9 -9
- package/dist/components/ui/dialog.d.ts +12 -4
- package/dist/components/ui/dialog.js +5 -5
- package/dist/components/ui/dropdown-menu.d.ts +30 -12
- package/dist/components/ui/dropdown-menu.js +10 -9
- package/dist/components/ui/form.d.ts +15 -5
- package/dist/components/ui/form.js +6 -5
- package/dist/components/ui/hover-card.d.ts +3 -1
- package/dist/components/ui/hover-card.js +2 -2
- package/dist/components/ui/inline-code.d.ts +3 -1
- package/dist/components/ui/inline-code.js +2 -2
- package/dist/components/ui/input-otp.d.ts +12 -29
- package/dist/components/ui/input-otp.js +5 -4
- package/dist/components/ui/input.d.ts +6 -2
- package/dist/components/ui/input.js +3 -2
- package/dist/components/ui/label.d.ts +6 -2
- package/dist/components/ui/label.js +3 -3
- package/dist/components/ui/menubar.d.ts +4 -5
- package/dist/components/ui/menubar.js +2 -1
- package/dist/components/ui/navigation-menu.d.ts +18 -6
- package/dist/components/ui/navigation-menu.js +7 -7
- package/dist/components/ui/password-input.d.ts +3 -1
- package/dist/components/ui/password-input.js +3 -2
- package/dist/components/ui/popover.d.ts +3 -1
- package/dist/components/ui/popover.js +2 -2
- package/dist/components/ui/progress.d.ts +3 -1
- package/dist/components/ui/progress.js +2 -2
- package/dist/components/ui/radio-group.d.ts +6 -2
- package/dist/components/ui/radio-group.js +3 -3
- package/dist/components/ui/scroll-area.d.ts +6 -2
- package/dist/components/ui/scroll-area.js +3 -3
- package/dist/components/ui/select.d.ts +21 -7
- package/dist/components/ui/select.js +8 -8
- package/dist/components/ui/separator.d.ts +3 -1
- package/dist/components/ui/separator.js +2 -2
- package/dist/components/ui/sheet.d.ts +12 -4
- package/dist/components/ui/sheet.js +5 -5
- package/dist/components/ui/slider.d.ts +3 -1
- package/dist/components/ui/slider.js +2 -2
- package/dist/components/ui/spinner.d.ts +3 -1
- package/dist/components/ui/spinner.js +2 -2
- package/dist/components/ui/switch.d.ts +3 -1
- package/dist/components/ui/switch.js +3 -3
- package/dist/components/ui/table.d.ts +24 -8
- package/dist/components/ui/table.js +9 -9
- package/dist/components/ui/tabs.d.ts +9 -3
- package/dist/components/ui/tabs.js +4 -4
- package/dist/components/ui/textarea.d.ts +3 -1
- package/dist/components/ui/textarea.js +2 -2
- package/dist/components/ui/toast.d.ts +19 -7
- package/dist/components/ui/toast.js +7 -7
- package/dist/components/ui/toggle-group.d.ts +8 -4
- package/dist/components/ui/toggle-group.js +3 -2
- package/dist/components/ui/toggle.d.ts +4 -2
- package/dist/components/ui/toggle.js +2 -2
- package/dist/components/ui/tooltip.d.ts +6 -2
- package/dist/components/ui/tooltip.js +3 -3
- package/dist/components/ui/typography.d.ts +3 -1
- package/dist/components/ui/typography.js +2 -2
- package/package.json +52 -44
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import { forwardRefIfNeeded } from "@stackframe/stack-shared/dist/utils/react";
|
|
3
3
|
import { cn } from "../../lib/utils";
|
|
4
|
-
const Table =
|
|
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 }) })));
|
|
5
5
|
Table.displayName = "Table";
|
|
6
|
-
const TableHeader =
|
|
6
|
+
const TableHeader = forwardRefIfNeeded(({ className, ...props }, ref) => (_jsx("thead", { ref: ref, className: cn("[&_tr]:border-b", className), ...props })));
|
|
7
7
|
TableHeader.displayName = "TableHeader";
|
|
8
|
-
const TableBody =
|
|
8
|
+
const TableBody = forwardRefIfNeeded(({ className, ...props }, ref) => (_jsx("tbody", { ref: ref, className: cn("[&_tr:last-child]:border-0", className), ...props })));
|
|
9
9
|
TableBody.displayName = "TableBody";
|
|
10
|
-
const TableFooter =
|
|
10
|
+
const TableFooter = forwardRefIfNeeded(({ className, ...props }, ref) => (_jsx("tfoot", { ref: ref, className: cn("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0", className), ...props })));
|
|
11
11
|
TableFooter.displayName = "TableFooter";
|
|
12
|
-
const TableRow =
|
|
12
|
+
const TableRow = forwardRefIfNeeded(({ className, ...props }, ref) => (_jsx("tr", { ref: ref, className: cn("border-b data-[state=selected]:bg-muted", props.onClick ? "hover:bg-muted/50 cursor-pointer" : "", className), ...props })));
|
|
13
13
|
TableRow.displayName = "TableRow";
|
|
14
|
-
const TableHead =
|
|
14
|
+
const TableHead = forwardRefIfNeeded(({ className, ...props }, ref) => (_jsx("th", { ref: ref, className: cn("h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]", className), ...props })));
|
|
15
15
|
TableHead.displayName = "TableHead";
|
|
16
|
-
const TableCell =
|
|
16
|
+
const TableCell = forwardRefIfNeeded(({ className, ...props }, ref) => (_jsx("td", { ref: ref, className: cn("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]", className), ...props })));
|
|
17
17
|
TableCell.displayName = "TableCell";
|
|
18
|
-
const TableCaption =
|
|
18
|
+
const TableCaption = forwardRefIfNeeded(({ className, ...props }, ref) => (_jsx("caption", { ref: ref, className: cn("mt-4 text-sm text-muted-foreground", className), ...props })));
|
|
19
19
|
TableCaption.displayName = "TableCaption";
|
|
20
20
|
export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption, };
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
3
3
|
declare const Tabs: React.ForwardRefExoticComponent<TabsPrimitive.TabsProps & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
-
declare const TabsList: React.
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
declare const TabsList: React.FC<Omit<TabsPrimitive.TabsListProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
5
|
+
ref?: React.Ref<HTMLDivElement> | undefined;
|
|
6
|
+
}>;
|
|
7
|
+
declare const TabsTrigger: React.FC<Omit<TabsPrimitive.TabsTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & {
|
|
8
|
+
ref?: React.Ref<HTMLButtonElement> | undefined;
|
|
9
|
+
}>;
|
|
10
|
+
declare const TabsContent: React.FC<Omit<TabsPrimitive.TabsContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
11
|
+
ref?: React.Ref<HTMLDivElement> | undefined;
|
|
12
|
+
}>;
|
|
7
13
|
export { Tabs, TabsList, TabsTrigger, TabsContent };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import
|
|
3
|
+
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 =
|
|
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 })));
|
|
8
8
|
TabsList.displayName = TabsPrimitive.List.displayName;
|
|
9
|
-
const TabsTrigger =
|
|
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;
|
|
11
|
-
const TabsContent =
|
|
11
|
+
const TabsContent = forwardRefIfNeeded(({ className, ...props }, ref) => (_jsx(TabsPrimitive.Content, { ref: ref, className: cn("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2", className), ...props })));
|
|
12
12
|
TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
13
13
|
export { Tabs, TabsList, TabsTrigger, TabsContent };
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
export interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
3
3
|
}
|
|
4
|
-
declare const Textarea: React.
|
|
4
|
+
declare const Textarea: React.FC<TextareaProps & {
|
|
5
|
+
ref?: React.Ref<HTMLTextAreaElement> | undefined;
|
|
6
|
+
}>;
|
|
5
7
|
export { Textarea };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import { forwardRefIfNeeded } from "@stackframe/stack-shared/dist/utils/react";
|
|
3
3
|
import { cn } from "../../lib/utils";
|
|
4
|
-
const Textarea =
|
|
4
|
+
const Textarea = forwardRefIfNeeded(({ className, ...props }, ref) => {
|
|
5
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 }));
|
|
6
6
|
});
|
|
7
7
|
Textarea.displayName = "Textarea";
|
|
@@ -2,14 +2,26 @@ import React from "react";
|
|
|
2
2
|
import * as ToastPrimitives from "@radix-ui/react-toast";
|
|
3
3
|
import { type VariantProps } from "class-variance-authority";
|
|
4
4
|
declare const ToastProvider: React.FC<ToastPrimitives.ToastProviderProps>;
|
|
5
|
-
declare const ToastViewport: React.
|
|
6
|
-
|
|
5
|
+
declare const ToastViewport: React.FC<Omit<ToastPrimitives.ToastViewportProps & React.RefAttributes<HTMLOListElement>, "ref"> & {
|
|
6
|
+
ref?: React.Ref<HTMLOListElement> | undefined;
|
|
7
|
+
}>;
|
|
8
|
+
declare const Toast: React.FC<Omit<ToastPrimitives.ToastProps & React.RefAttributes<HTMLLIElement>, "ref"> & VariantProps<(props?: ({
|
|
7
9
|
variant?: "default" | "destructive" | "success" | null | undefined;
|
|
8
|
-
} & import("class-variance-authority/types").ClassProp) | undefined) => string> &
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
declare const
|
|
12
|
-
|
|
10
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string> & {
|
|
11
|
+
ref?: React.Ref<HTMLLIElement> | undefined;
|
|
12
|
+
}>;
|
|
13
|
+
declare const ToastAction: React.FC<Omit<ToastPrimitives.ToastActionProps & React.RefAttributes<HTMLButtonElement>, "ref"> & {
|
|
14
|
+
ref?: React.Ref<HTMLButtonElement> | undefined;
|
|
15
|
+
}>;
|
|
16
|
+
declare const ToastClose: React.FC<Omit<ToastPrimitives.ToastCloseProps & React.RefAttributes<HTMLButtonElement>, "ref"> & {
|
|
17
|
+
ref?: React.Ref<HTMLButtonElement> | undefined;
|
|
18
|
+
}>;
|
|
19
|
+
declare const ToastTitle: React.FC<Omit<ToastPrimitives.ToastTitleProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
20
|
+
ref?: React.Ref<HTMLDivElement> | undefined;
|
|
21
|
+
}>;
|
|
22
|
+
declare const ToastDescription: React.FC<Omit<ToastPrimitives.ToastDescriptionProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
23
|
+
ref?: React.Ref<HTMLDivElement> | undefined;
|
|
24
|
+
}>;
|
|
13
25
|
type ToastProps = React.ComponentPropsWithoutRef<typeof Toast>;
|
|
14
26
|
type ToastActionElement = React.ReactElement<typeof ToastAction>;
|
|
15
27
|
export { type ToastProps, type ToastActionElement, ToastProvider, ToastViewport, Toast, ToastTitle, ToastDescription, ToastClose, ToastAction, };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import
|
|
3
|
+
import { forwardRefIfNeeded } from "@stackframe/stack-shared/dist/utils/react";
|
|
4
4
|
import { Cross2Icon } from "@radix-ui/react-icons";
|
|
5
5
|
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 =
|
|
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 })));
|
|
10
10
|
ToastViewport.displayName = ToastPrimitives.Viewport.displayName;
|
|
11
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", {
|
|
12
12
|
variants: {
|
|
@@ -20,16 +20,16 @@ const toastVariants = cva("group pointer-events-auto relative flex w-full items-
|
|
|
20
20
|
variant: "default",
|
|
21
21
|
},
|
|
22
22
|
});
|
|
23
|
-
const Toast =
|
|
23
|
+
const Toast = forwardRefIfNeeded(({ className, variant, ...props }, ref) => {
|
|
24
24
|
return (_jsx(ToastPrimitives.Root, { ref: ref, className: cn(toastVariants({ variant }), className), ...props }));
|
|
25
25
|
});
|
|
26
26
|
Toast.displayName = ToastPrimitives.Root.displayName;
|
|
27
|
-
const ToastAction =
|
|
27
|
+
const ToastAction = forwardRefIfNeeded(({ className, ...props }, ref) => (_jsx(ToastPrimitives.Action, { ref: ref, className: cn("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive", className), ...props })));
|
|
28
28
|
ToastAction.displayName = ToastPrimitives.Action.displayName;
|
|
29
|
-
const ToastClose =
|
|
29
|
+
const ToastClose = forwardRefIfNeeded(({ className, ...props }, ref) => (_jsx(ToastPrimitives.Close, { ref: ref, className: cn('absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100', 'group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600', 'group-[.success]:text-green-300 group-[.success]:hover:text-green-50 group-[.success]:focus:ring-green-400 group-[.success]:focus:ring-offset-green-600', className), "toast-close": '', ...props, children: _jsx(Cross2Icon, { className: "h-4 w-4" }) })));
|
|
30
30
|
ToastClose.displayName = ToastPrimitives.Close.displayName;
|
|
31
|
-
const ToastTitle =
|
|
31
|
+
const ToastTitle = forwardRefIfNeeded(({ className, ...props }, ref) => (_jsx(ToastPrimitives.Title, { ref: ref, className: cn("text-sm font-semibold [&+div]:text-xs", className), ...props })));
|
|
32
32
|
ToastTitle.displayName = ToastPrimitives.Title.displayName;
|
|
33
|
-
const ToastDescription =
|
|
33
|
+
const ToastDescription = forwardRefIfNeeded(({ className, ...props }, ref) => (_jsx(ToastPrimitives.Description, { ref: ref, className: cn("text-sm opacity-90", className), ...props })));
|
|
34
34
|
ToastDescription.displayName = ToastPrimitives.Description.displayName;
|
|
35
35
|
export { ToastProvider, ToastViewport, Toast, ToastTitle, ToastDescription, ToastClose, ToastAction, };
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
|
|
3
3
|
import { VariantProps } from "class-variance-authority";
|
|
4
|
-
declare const ToggleGroup: React.
|
|
4
|
+
declare const ToggleGroup: React.FC<((Omit<ToggleGroupPrimitive.ToggleGroupSingleProps & React.RefAttributes<HTMLDivElement>, "ref"> | Omit<ToggleGroupPrimitive.ToggleGroupMultipleProps & React.RefAttributes<HTMLDivElement>, "ref">) & VariantProps<(props?: ({
|
|
5
5
|
variant?: "default" | "outline" | null | undefined;
|
|
6
6
|
size?: "default" | "sm" | "lg" | null | undefined;
|
|
7
|
-
} & import("class-variance-authority/types").ClassProp) | undefined) => string>) &
|
|
8
|
-
|
|
7
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string>) & {
|
|
8
|
+
ref?: React.Ref<HTMLDivElement> | undefined;
|
|
9
|
+
}>;
|
|
10
|
+
declare const ToggleGroupItem: React.FC<Omit<ToggleGroupPrimitive.ToggleGroupItemProps & React.RefAttributes<HTMLButtonElement>, "ref"> & VariantProps<(props?: ({
|
|
9
11
|
variant?: "default" | "outline" | null | undefined;
|
|
10
12
|
size?: "default" | "sm" | "lg" | null | undefined;
|
|
11
|
-
} & import("class-variance-authority/types").ClassProp) | undefined) => string> &
|
|
13
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string> & {
|
|
14
|
+
ref?: React.Ref<HTMLButtonElement> | undefined;
|
|
15
|
+
}>;
|
|
12
16
|
export { ToggleGroup, ToggleGroupItem };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import React from "react";
|
|
4
|
+
import { forwardRefIfNeeded } from "@stackframe/stack-shared/dist/utils/react";
|
|
4
5
|
import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
|
|
5
6
|
import { cn } from "../../lib/utils";
|
|
6
7
|
import { toggleVariants } from "./toggle";
|
|
@@ -8,9 +9,9 @@ const ToggleGroupContext = React.createContext({
|
|
|
8
9
|
size: "default",
|
|
9
10
|
variant: "default",
|
|
10
11
|
});
|
|
11
|
-
const ToggleGroup =
|
|
12
|
+
const ToggleGroup = forwardRefIfNeeded(({ className, variant, size, children, ...props }, ref) => (_jsx(ToggleGroupPrimitive.Root, { ref: ref, className: cn("flex items-center justify-center gap-1", className), ...props, children: _jsx(ToggleGroupContext.Provider, { value: { variant, size }, children: children }) })));
|
|
12
13
|
ToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;
|
|
13
|
-
const ToggleGroupItem =
|
|
14
|
+
const ToggleGroupItem = forwardRefIfNeeded(({ className, children, variant, size, ...props }, ref) => {
|
|
14
15
|
const context = React.useContext(ToggleGroupContext);
|
|
15
16
|
return (_jsx(ToggleGroupPrimitive.Item, { ref: ref, className: cn(toggleVariants({
|
|
16
17
|
variant: context.variant || variant,
|
|
@@ -5,8 +5,10 @@ declare const toggleVariants: (props?: ({
|
|
|
5
5
|
variant?: "default" | "outline" | null | undefined;
|
|
6
6
|
size?: "default" | "sm" | "lg" | null | undefined;
|
|
7
7
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
|
-
declare const Toggle: React.
|
|
8
|
+
declare const Toggle: React.FC<Omit<TogglePrimitive.ToggleProps & React.RefAttributes<HTMLButtonElement>, "ref"> & VariantProps<(props?: ({
|
|
9
9
|
variant?: "default" | "outline" | null | undefined;
|
|
10
10
|
size?: "default" | "sm" | "lg" | null | undefined;
|
|
11
|
-
} & import("class-variance-authority/types").ClassProp) | undefined) => string> &
|
|
11
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string> & {
|
|
12
|
+
ref?: React.Ref<HTMLButtonElement> | undefined;
|
|
13
|
+
}>;
|
|
12
14
|
export { Toggle, toggleVariants };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import
|
|
3
|
+
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";
|
|
@@ -21,6 +21,6 @@ const toggleVariants = cva("inline-flex items-center justify-center rounded-md t
|
|
|
21
21
|
size: "default",
|
|
22
22
|
},
|
|
23
23
|
});
|
|
24
|
-
const Toggle =
|
|
24
|
+
const Toggle = forwardRefIfNeeded(({ className, variant, size, ...props }, ref) => (_jsx(TogglePrimitive.Root, { ref: ref, className: cn(toggleVariants({ variant, size, className })), ...props })));
|
|
25
25
|
Toggle.displayName = TogglePrimitive.Root.displayName;
|
|
26
26
|
export { Toggle, toggleVariants };
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
3
|
-
declare const TooltipProvider: React.
|
|
3
|
+
declare const TooltipProvider: React.FC<TooltipPrimitive.TooltipProviderProps & {
|
|
4
|
+
ref?: React.Ref<void> | undefined;
|
|
5
|
+
}>;
|
|
4
6
|
declare const Tooltip: React.FC<TooltipPrimitive.TooltipProps>;
|
|
5
7
|
declare const TooltipTrigger: React.ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
6
|
-
declare const TooltipContent: React.
|
|
8
|
+
declare const TooltipContent: React.FC<Omit<TooltipPrimitive.TooltipContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
9
|
+
ref?: React.Ref<HTMLDivElement> | undefined;
|
|
10
|
+
}>;
|
|
7
11
|
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import
|
|
3
|
+
import { forwardRefIfNeeded } from "@stackframe/stack-shared/dist/utils/react";
|
|
4
4
|
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
5
5
|
import { cn } from "../../lib/utils";
|
|
6
|
-
const TooltipProvider =
|
|
6
|
+
const TooltipProvider = forwardRefIfNeeded((props, ref) => (_jsx(TooltipPrimitive.Provider, { delayDuration: 0, ...props })));
|
|
7
7
|
TooltipProvider.displayName = TooltipPrimitive.Provider.displayName;
|
|
8
8
|
const Tooltip = TooltipPrimitive.Root;
|
|
9
9
|
const TooltipTrigger = TooltipPrimitive.Trigger;
|
|
10
|
-
const TooltipContent =
|
|
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 })));
|
|
11
11
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
12
12
|
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
|
|
@@ -6,5 +6,7 @@ declare const typographyVariants: (props?: ({
|
|
|
6
6
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
7
|
interface TypographyProps extends React.HTMLAttributes<HTMLHeadingElement>, VariantProps<typeof typographyVariants> {
|
|
8
8
|
}
|
|
9
|
-
declare const Typography: React.
|
|
9
|
+
declare const Typography: React.FC<TypographyProps & {
|
|
10
|
+
ref?: React.Ref<HTMLHeadingElement> | undefined;
|
|
11
|
+
}>;
|
|
10
12
|
export { Typography };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { cn } from "../../lib/utils";
|
|
3
3
|
import { cva } from "class-variance-authority";
|
|
4
|
-
import
|
|
4
|
+
import { forwardRefIfNeeded } from "@stackframe/stack-shared/dist/utils/react";
|
|
5
5
|
const typographyVariants = cva("text-md", {
|
|
6
6
|
variants: {
|
|
7
7
|
type: {
|
|
@@ -25,7 +25,7 @@ const typographyVariants = cva("text-md", {
|
|
|
25
25
|
variant: "primary",
|
|
26
26
|
},
|
|
27
27
|
});
|
|
28
|
-
const Typography =
|
|
28
|
+
const Typography = forwardRefIfNeeded(({ className, type, variant, ...props }, ref) => {
|
|
29
29
|
const Comp = (type === 'footnote' || type === 'label' ? 'p' : type) || 'p';
|
|
30
30
|
return (_jsx(Comp, { className: cn(typographyVariants({ type, variant, className })), ref: ref, ...props }));
|
|
31
31
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stackframe/stack-ui",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.21",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -17,10 +17,17 @@
|
|
|
17
17
|
},
|
|
18
18
|
"peerDependencies": {
|
|
19
19
|
"react": ">=18.2",
|
|
20
|
+
"react-dom": ">=18.2",
|
|
21
|
+
"@types/react": ">=18.2.12",
|
|
22
|
+
"@types/react-dom": ">=18.2.12",
|
|
23
|
+
"next": ">=14.1.0",
|
|
20
24
|
"yup": "^1.4.0"
|
|
21
25
|
},
|
|
22
26
|
"peerDependenciesMeta": {
|
|
23
|
-
"react": {
|
|
27
|
+
"@types/react": {
|
|
28
|
+
"optional": true
|
|
29
|
+
},
|
|
30
|
+
"@types/react-dom": {
|
|
24
31
|
"optional": true
|
|
25
32
|
},
|
|
26
33
|
"yup": {
|
|
@@ -28,53 +35,54 @@
|
|
|
28
35
|
}
|
|
29
36
|
},
|
|
30
37
|
"dependencies": {
|
|
31
|
-
"@radix-ui/react-accordion": "^1.1
|
|
32
|
-
"@radix-ui/react-alert-dialog": "^1.
|
|
33
|
-
"@radix-ui/react-aspect-ratio": "^1.0
|
|
34
|
-
"@radix-ui/react-avatar": "^1.
|
|
35
|
-
"@radix-ui/react-checkbox": "^1.
|
|
36
|
-
"@radix-ui/react-collapsible": "^1.
|
|
37
|
-
"@radix-ui/react-context
|
|
38
|
-
"@radix-ui/react-
|
|
39
|
-
"@radix-ui/react-
|
|
40
|
-
"@radix-ui/react-
|
|
41
|
-
"@radix-ui/react-
|
|
42
|
-
"@radix-ui/react-
|
|
43
|
-
"@radix-ui/react-
|
|
44
|
-
"@radix-ui/react-
|
|
45
|
-
"@radix-ui/react-
|
|
46
|
-
"@radix-ui/react-
|
|
47
|
-
"@radix-ui/react-
|
|
48
|
-
"@radix-ui/react-
|
|
49
|
-
"@radix-ui/react-
|
|
50
|
-
"@radix-ui/react-
|
|
51
|
-
"@radix-ui/react-
|
|
52
|
-
"@radix-ui/react-
|
|
53
|
-
"@radix-ui/react-
|
|
54
|
-
"@radix-ui/react-
|
|
55
|
-
"@radix-ui/react-
|
|
56
|
-
"@radix-ui/react-
|
|
57
|
-
"@radix-ui/react-toggle
|
|
58
|
-
"@radix-ui/react-
|
|
38
|
+
"@radix-ui/react-accordion": "^1.2.1",
|
|
39
|
+
"@radix-ui/react-alert-dialog": "^1.1.2",
|
|
40
|
+
"@radix-ui/react-aspect-ratio": "^1.1.0",
|
|
41
|
+
"@radix-ui/react-avatar": "^1.1.1",
|
|
42
|
+
"@radix-ui/react-checkbox": "^1.1.2",
|
|
43
|
+
"@radix-ui/react-collapsible": "^1.1.1",
|
|
44
|
+
"@radix-ui/react-context": "^1.1.1",
|
|
45
|
+
"@radix-ui/react-context-menu": "^2.2.2",
|
|
46
|
+
"@radix-ui/react-dialog": "^1.1.2",
|
|
47
|
+
"@radix-ui/react-dropdown-menu": "^2.1.2",
|
|
48
|
+
"@radix-ui/react-hover-card": "^1.1.2",
|
|
49
|
+
"@radix-ui/react-icons": "^1.3.1",
|
|
50
|
+
"@radix-ui/react-label": "^2.1.0",
|
|
51
|
+
"@radix-ui/react-menubar": "^1.1.2",
|
|
52
|
+
"@radix-ui/react-navigation-menu": "^1.2.1",
|
|
53
|
+
"@radix-ui/react-popover": "^1.1.2",
|
|
54
|
+
"@radix-ui/react-progress": "^1.1.0",
|
|
55
|
+
"@radix-ui/react-radio-group": "^1.2.1",
|
|
56
|
+
"@radix-ui/react-scroll-area": "^1.2.0",
|
|
57
|
+
"@radix-ui/react-select": "^2.1.2",
|
|
58
|
+
"@radix-ui/react-separator": "^1.1.0",
|
|
59
|
+
"@radix-ui/react-slider": "^1.2.1",
|
|
60
|
+
"@radix-ui/react-slot": "^1.1.0",
|
|
61
|
+
"@radix-ui/react-switch": "^1.1.1",
|
|
62
|
+
"@radix-ui/react-tabs": "^1.1.1",
|
|
63
|
+
"@radix-ui/react-toast": "^1.2.2",
|
|
64
|
+
"@radix-ui/react-toggle": "^1.1.0",
|
|
65
|
+
"@radix-ui/react-toggle-group": "^1.1.0",
|
|
66
|
+
"@radix-ui/react-tooltip": "^1.1.3",
|
|
67
|
+
"@tanstack/react-table": "^8.20.5",
|
|
59
68
|
"class-variance-authority": "^0.7.0",
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"input-otp": "^1.
|
|
69
|
+
"clsx": "^2.1.1",
|
|
70
|
+
"cmdk": "^1.0.4",
|
|
71
|
+
"date-fns": "^3.6.0",
|
|
72
|
+
"export-to-csv": "^1.4.0",
|
|
73
|
+
"input-otp": "^1.4.1",
|
|
65
74
|
"lucide-react": "^0.378.0",
|
|
66
75
|
"react-day-picker": "^8.10.1",
|
|
67
|
-
"
|
|
68
|
-
"react-
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"@stackframe/stack-shared": "2.6.19"
|
|
76
|
+
"react-hook-form": "^7.53.1",
|
|
77
|
+
"react-resizable-panels": "^2.1.6",
|
|
78
|
+
"tailwind-merge": "^2.5.4",
|
|
79
|
+
"@stackframe/stack-shared": "2.6.21"
|
|
72
80
|
},
|
|
73
81
|
"devDependencies": {
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"react": "^18.2
|
|
77
|
-
"
|
|
82
|
+
"rimraf": "^5.0.10",
|
|
83
|
+
"react": "^18.2",
|
|
84
|
+
"react-dom": "^18.2",
|
|
85
|
+
"next": "^14.1.0"
|
|
78
86
|
},
|
|
79
87
|
"scripts": {
|
|
80
88
|
"build": "tsc",
|