@stackframe/stack-ui 2.6.33 → 2.6.36
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 +22 -0
- package/dist/components/copy-button.d.ts +9 -1
- package/dist/components/data-table/column-header.d.ts +2 -2
- package/dist/components/data-table/faceted-filter.d.ts +2 -2
- package/dist/components/data-table/pagination.d.ts +2 -2
- package/dist/components/data-table/toolbar.d.ts +2 -2
- package/dist/components/data-table/view-options.d.ts +2 -2
- package/dist/components/ui/badge.d.ts +5 -4
- package/dist/components/ui/button.d.ts +15 -7
- package/dist/components/ui/button.js +3 -3
- package/dist/components/ui/command.d.ts +1 -2
- package/dist/components/ui/input.d.ts +12 -6
- package/dist/components/ui/input.js +1 -1
- package/dist/components/ui/password-input.d.ts +3 -2
- package/dist/components/ui/radio-group.d.ts +1 -1
- package/dist/components/ui/radio-group.js +1 -1
- package/dist/components/ui/sheet.d.ts +4 -6
- package/dist/components/ui/switch.d.ts +5 -8
- package/dist/components/ui/textarea.d.ts +2 -3
- package/dist/components/ui/typography.d.ts +2 -5
- package/dist/components/ui/use-toast.d.ts +2 -2
- package/package.json +4 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @stackframe/stack-ui
|
|
2
2
|
|
|
3
|
+
## 2.6.36
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
- @stackframe/stack-shared@2.6.36
|
|
9
|
+
|
|
10
|
+
## 2.6.35
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Bugfixes
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
- @stackframe/stack-shared@2.6.35
|
|
17
|
+
|
|
18
|
+
## 2.6.34
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- Updated dependencies
|
|
23
|
+
- @stackframe/stack-shared@2.6.34
|
|
24
|
+
|
|
3
25
|
## 2.6.33
|
|
4
26
|
|
|
5
27
|
### Patch Changes
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
declare const CopyButton: React.FC<
|
|
2
|
+
declare const CopyButton: React.FC<{
|
|
3
|
+
onClick?: ((e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void | Promise<void>) | undefined;
|
|
4
|
+
loading?: boolean | undefined;
|
|
5
|
+
} & {
|
|
6
|
+
asChild?: boolean | undefined;
|
|
7
|
+
} & React.ButtonHTMLAttributes<HTMLButtonElement> & import("class-variance-authority").VariantProps<(props?: ({
|
|
8
|
+
variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
|
|
9
|
+
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
10
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string> & {
|
|
3
11
|
ref?: React.Ref<HTMLButtonElement> | undefined;
|
|
4
12
|
} & {
|
|
5
13
|
content: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { Column } from "@tanstack/react-table";
|
|
3
|
-
|
|
3
|
+
type DataTableColumnHeaderProps<TData, TValue> = {
|
|
4
4
|
column: Column<TData, TValue>;
|
|
5
5
|
columnTitle: React.ReactNode;
|
|
6
|
-
}
|
|
6
|
+
} & React.HTMLAttributes<HTMLDivElement>;
|
|
7
7
|
export declare function DataTableColumnHeader<TData, TValue>({ column, columnTitle, className, }: DataTableColumnHeaderProps<TData, TValue>): import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Column } from "@tanstack/react-table";
|
|
2
2
|
import React from "react";
|
|
3
|
-
|
|
3
|
+
type DataTableFacetedFilterProps<TData, TValue> = {
|
|
4
4
|
column?: Column<TData, TValue>;
|
|
5
5
|
title?: string;
|
|
6
6
|
options: {
|
|
@@ -10,6 +10,6 @@ interface DataTableFacetedFilterProps<TData, TValue> {
|
|
|
10
10
|
className?: string;
|
|
11
11
|
}>;
|
|
12
12
|
}[];
|
|
13
|
-
}
|
|
13
|
+
};
|
|
14
14
|
export declare function DataTableFacetedFilter<TData, TValue>({ column, title, options, }: DataTableFacetedFilterProps<TData, TValue>): import("react/jsx-runtime").JSX.Element;
|
|
15
15
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Table } from "@tanstack/react-table";
|
|
2
|
-
|
|
2
|
+
type DataTablePaginationProps<TData> = {
|
|
3
3
|
table: Table<TData>;
|
|
4
|
-
}
|
|
4
|
+
};
|
|
5
5
|
export declare function DataTablePagination<TData>({ table, }: DataTablePaginationProps<TData>): import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
export {};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ColumnFiltersState, SortingState, Table } from "@tanstack/react-table";
|
|
3
|
-
|
|
3
|
+
type DataTableToolbarProps<TData> = {
|
|
4
4
|
table: Table<TData>;
|
|
5
5
|
toolbarRender?: (table: Table<TData>) => React.ReactNode;
|
|
6
6
|
showDefaultToolbar?: boolean;
|
|
7
7
|
defaultColumnFilters: ColumnFiltersState;
|
|
8
8
|
defaultSorting: SortingState;
|
|
9
|
-
}
|
|
9
|
+
};
|
|
10
10
|
export declare function DataTableToolbar<TData>({ table, toolbarRender, showDefaultToolbar, defaultColumnFilters, defaultSorting, }: DataTableToolbarProps<TData>): import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Table } from "@tanstack/react-table";
|
|
2
|
-
|
|
2
|
+
type DataTableViewOptionsProps<TData> = {
|
|
3
3
|
table: Table<TData>;
|
|
4
|
-
}
|
|
4
|
+
};
|
|
5
5
|
export declare function DataTableViewOptions<TData>({ table, }: DataTableViewOptionsProps<TData>): import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
export {};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
import React from "react";
|
|
3
3
|
declare const badgeVariants: (props?: ({
|
|
4
4
|
variant?: "default" | "destructive" | "outline" | "secondary" | null | undefined;
|
|
5
5
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
export type BadgeProps = React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof badgeVariants>;
|
|
7
|
+
declare const Badge: React.FC<React.HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
|
|
8
|
+
variant?: "default" | "destructive" | "outline" | "secondary" | null | undefined;
|
|
9
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string> & {
|
|
9
10
|
ref?: React.Ref<HTMLDivElement> | undefined;
|
|
10
11
|
}>;
|
|
11
12
|
export { Badge, badgeVariants };
|
|
@@ -1,17 +1,25 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
import React from "react";
|
|
3
3
|
declare const buttonVariants: (props?: ({
|
|
4
4
|
variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
|
|
5
5
|
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
-
export
|
|
7
|
+
export type OriginalButtonProps = {
|
|
8
8
|
asChild?: boolean;
|
|
9
|
-
}
|
|
10
|
-
|
|
9
|
+
} & React.ButtonHTMLAttributes<HTMLButtonElement> & VariantProps<typeof buttonVariants>;
|
|
10
|
+
type ButtonProps = {
|
|
11
11
|
onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void | Promise<void>;
|
|
12
12
|
loading?: boolean;
|
|
13
|
-
}
|
|
14
|
-
declare const Button: React.FC<
|
|
13
|
+
} & OriginalButtonProps;
|
|
14
|
+
declare const Button: React.FC<{
|
|
15
|
+
onClick?: ((e: React.MouseEvent<HTMLButtonElement>) => void | Promise<void>) | undefined;
|
|
16
|
+
loading?: boolean | undefined;
|
|
17
|
+
} & {
|
|
18
|
+
asChild?: boolean | undefined;
|
|
19
|
+
} & React.ButtonHTMLAttributes<HTMLButtonElement> & VariantProps<(props?: ({
|
|
20
|
+
variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
|
|
21
|
+
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
22
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string> & {
|
|
15
23
|
ref?: React.Ref<HTMLButtonElement> | undefined;
|
|
16
24
|
}>;
|
|
17
|
-
export { Button,
|
|
25
|
+
export { Button, ButtonProps, buttonVariants };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRefIfNeeded } from "@stackframe/stack-shared/dist/utils/react";
|
|
3
2
|
import { Slot } from "@radix-ui/react-slot";
|
|
3
|
+
import { forwardRefIfNeeded } from "@stackframe/stack-shared/dist/utils/react";
|
|
4
4
|
import { cva } from "class-variance-authority";
|
|
5
|
-
import {
|
|
5
|
+
import { useAsyncCallback } from "@stackframe/stack-shared/dist/hooks/use-async-callback";
|
|
6
6
|
import { runAsynchronouslyWithAlert } from "@stackframe/stack-shared/dist/utils/promises";
|
|
7
|
+
import { cn } from "../../lib/utils";
|
|
7
8
|
import { Spinner } from "./spinner";
|
|
8
|
-
import { useAsyncCallback } from "@stackframe/stack-shared/dist/hooks/use-async-callback";
|
|
9
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", {
|
|
10
10
|
variants: {
|
|
11
11
|
variant: {
|
|
@@ -2,8 +2,7 @@ import React from "react";
|
|
|
2
2
|
import { type DialogProps } from "@radix-ui/react-dialog";
|
|
3
3
|
import { Command as CommandPrimitive } from "cmdk";
|
|
4
4
|
declare const Command: React.FC<React.ComponentPropsWithoutRef<typeof CommandPrimitive>>;
|
|
5
|
-
|
|
6
|
-
}
|
|
5
|
+
type CommandDialogProps = {} & DialogProps;
|
|
7
6
|
declare const CommandDialog: ({ children, ...props }: CommandDialogProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
7
|
declare const CommandInput: React.FC<React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>>;
|
|
9
8
|
declare const CommandList: React.FC<React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>>;
|
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
export
|
|
2
|
+
export type InputProps = {
|
|
3
3
|
prefixItem?: React.ReactNode;
|
|
4
|
-
}
|
|
5
|
-
export declare const Input: React.FC<
|
|
4
|
+
} & React.InputHTMLAttributes<HTMLInputElement>;
|
|
5
|
+
export declare const Input: React.FC<{
|
|
6
|
+
prefixItem?: React.ReactNode;
|
|
7
|
+
} & React.InputHTMLAttributes<HTMLInputElement> & {
|
|
6
8
|
ref?: React.Ref<HTMLInputElement> | undefined;
|
|
7
9
|
}>;
|
|
8
|
-
export
|
|
10
|
+
export type DelayedInputProps = {
|
|
9
11
|
delay?: number;
|
|
10
|
-
}
|
|
11
|
-
export declare const DelayedInput: React.FC<
|
|
12
|
+
} & InputProps;
|
|
13
|
+
export declare const DelayedInput: React.FC<{
|
|
14
|
+
delay?: number | undefined;
|
|
15
|
+
} & {
|
|
16
|
+
prefixItem?: React.ReactNode;
|
|
17
|
+
} & React.InputHTMLAttributes<HTMLInputElement> & {
|
|
12
18
|
ref?: React.Ref<HTMLInputElement> | undefined;
|
|
13
19
|
}>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import React from "react";
|
|
3
2
|
import { forwardRefIfNeeded } from "@stackframe/stack-shared/dist/utils/react";
|
|
3
|
+
import React from "react";
|
|
4
4
|
import { cn } from "../../lib/utils";
|
|
5
5
|
export const Input = forwardRefIfNeeded(({ className, type, prefixItem, ...props }, ref) => {
|
|
6
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";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
declare const PasswordInput: import("react").FC<{
|
|
3
|
+
prefixItem?: import("react").ReactNode;
|
|
4
|
+
} & import("react").InputHTMLAttributes<HTMLInputElement> & {
|
|
4
5
|
ref?: import("react").Ref<HTMLInputElement> | undefined;
|
|
5
6
|
}>;
|
|
6
7
|
export { PasswordInput };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
2
|
+
import React from "react";
|
|
3
3
|
declare const RadioGroup: React.FC<Omit<RadioGroupPrimitive.RadioGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
4
4
|
ref?: React.Ref<HTMLDivElement> | undefined;
|
|
5
5
|
}>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { forwardRefIfNeeded } from "@stackframe/stack-shared/dist/utils/react";
|
|
4
3
|
import { CheckIcon } from "@radix-ui/react-icons";
|
|
5
4
|
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
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
8
|
return (_jsx(RadioGroupPrimitive.Root, { className: cn("grid gap-2", className), ...props, ref: ref }));
|
|
@@ -8,13 +8,11 @@ declare const SheetPortal: React.FC<SheetPrimitive.DialogPortalProps>;
|
|
|
8
8
|
declare const SheetOverlay: React.FC<Omit<SheetPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
9
9
|
ref?: React.Ref<HTMLDivElement> | undefined;
|
|
10
10
|
}>;
|
|
11
|
-
declare const
|
|
11
|
+
declare const SheetContent: React.FC<{
|
|
12
|
+
hasCloseButton?: boolean | undefined;
|
|
13
|
+
} & Omit<SheetPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & VariantProps<(props?: ({
|
|
12
14
|
side?: "top" | "right" | "bottom" | "left" | null | undefined;
|
|
13
|
-
} & import("class-variance-authority/types").ClassProp) | undefined) => string
|
|
14
|
-
interface SheetContentProps extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>, VariantProps<typeof sheetVariants> {
|
|
15
|
-
hasCloseButton?: boolean;
|
|
16
|
-
}
|
|
17
|
-
declare const SheetContent: React.FC<SheetContentProps & {
|
|
15
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string> & {
|
|
18
16
|
ref?: React.Ref<HTMLDivElement> | undefined;
|
|
19
17
|
}>;
|
|
20
18
|
declare const SheetHeader: {
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import * as SwitchPrimitives from "@radix-ui/react-switch";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
loading?: boolean;
|
|
9
|
-
}
|
|
10
|
-
declare const Switch: React.FC<AsyncSwitchProps & {
|
|
3
|
+
declare const Switch: React.FC<{
|
|
4
|
+
onCheckedChange?: ((checked: boolean) => Promise<void> | void) | undefined;
|
|
5
|
+
onClick?: ((e: React.MouseEvent<HTMLButtonElement>) => Promise<void> | void) | undefined;
|
|
6
|
+
loading?: boolean | undefined;
|
|
7
|
+
} & SwitchPrimitives.SwitchProps & React.RefAttributes<HTMLButtonElement> & {
|
|
11
8
|
ref?: React.Ref<HTMLButtonElement> | undefined;
|
|
12
9
|
}>;
|
|
13
10
|
export { Switch };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
declare const Textarea: React.FC<TextareaProps & {
|
|
2
|
+
export type TextareaProps = {} & React.TextareaHTMLAttributes<HTMLTextAreaElement>;
|
|
3
|
+
declare const Textarea: React.FC<React.TextareaHTMLAttributes<HTMLTextAreaElement> & {
|
|
5
4
|
ref?: React.Ref<HTMLTextAreaElement> | undefined;
|
|
6
5
|
}>;
|
|
7
6
|
export { Textarea };
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import { type VariantProps } from "class-variance-authority";
|
|
2
2
|
import React from "react";
|
|
3
|
-
declare const
|
|
3
|
+
declare const Typography: React.FC<React.HTMLAttributes<HTMLHeadingElement> & VariantProps<(props?: ({
|
|
4
4
|
type?: "h1" | "h2" | "h3" | "h4" | "label" | "p" | "footnote" | null | undefined;
|
|
5
5
|
variant?: "destructive" | "secondary" | "success" | "primary" | null | undefined;
|
|
6
|
-
} & import("class-variance-authority/types").ClassProp) | undefined) => string
|
|
7
|
-
interface TypographyProps extends React.HTMLAttributes<HTMLHeadingElement>, VariantProps<typeof typographyVariants> {
|
|
8
|
-
}
|
|
9
|
-
declare const Typography: React.FC<TypographyProps & {
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string> & {
|
|
10
7
|
ref?: React.Ref<HTMLHeadingElement> | undefined;
|
|
11
8
|
}>;
|
|
12
9
|
export { Typography };
|
|
@@ -26,9 +26,9 @@ type Action = {
|
|
|
26
26
|
type: ActionType["REMOVE_TOAST"];
|
|
27
27
|
toastId?: ToasterToast["id"];
|
|
28
28
|
};
|
|
29
|
-
|
|
29
|
+
type State = {
|
|
30
30
|
toasts: ToasterToast[];
|
|
31
|
-
}
|
|
31
|
+
};
|
|
32
32
|
export declare const reducer: (state: State, action: Action) => State;
|
|
33
33
|
type Toast = Omit<ToasterToast, "id">;
|
|
34
34
|
declare function toast({ ...props }: Toast): {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stackframe/stack-ui",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.36",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -76,12 +76,14 @@
|
|
|
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.6.
|
|
79
|
+
"@stackframe/stack-shared": "2.6.36"
|
|
80
80
|
},
|
|
81
81
|
"devDependencies": {
|
|
82
82
|
"rimraf": "^5.0.10",
|
|
83
83
|
"react": "^18.2",
|
|
84
84
|
"react-dom": "^18.2",
|
|
85
|
+
"@types/react": "^18.2.12",
|
|
86
|
+
"@types/react-dom": "^18.2.12",
|
|
85
87
|
"next": "^14.1.0"
|
|
86
88
|
},
|
|
87
89
|
"scripts": {
|