@stackframe/stack-ui 2.6.15 → 2.6.17
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 +17 -0
- package/dist/components/action-dialog.d.ts +1 -0
- package/dist/components/action-dialog.js +1 -1
- package/dist/components/data-table/cells.js +1 -1
- package/dist/components/data-table/column-header.js +1 -1
- package/dist/components/data-table/data-table.d.ts +22 -3
- package/dist/components/data-table/data-table.js +25 -7
- package/dist/components/data-table/faceted-filter.js +1 -1
- package/dist/components/data-table/pagination.js +5 -5
- package/dist/components/ui/skeleton.d.ts +1 -3
- package/dist/components/ui/skeleton.js +3 -44
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @stackframe/stack-ui
|
|
2
2
|
|
|
3
|
+
## 2.6.17
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Loading skeletons
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @stackframe/stack-shared@2.6.17
|
|
10
|
+
|
|
11
|
+
## 2.6.16
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- - list user pagination
|
|
16
|
+
- fixed visual glitches
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
- @stackframe/stack-shared@2.6.16
|
|
19
|
+
|
|
3
20
|
## 2.6.15
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -25,7 +25,7 @@ export function ActionDialog(props) {
|
|
|
25
25
|
setOpenState(open);
|
|
26
26
|
props.onOpenChange?.(open);
|
|
27
27
|
};
|
|
28
|
-
return (_jsxs(Dialog, { open: open, onOpenChange: onOpenChange, children: [props.trigger && _jsx(DialogTrigger, { asChild: true, children: props.trigger }), _jsxs(DialogContent, { children: [_jsxs(DialogHeader, { children: [_jsxs(DialogTitle, { className: "flex items-center", children: [_jsx(TitleIcon, { className: "h-4 w-4 mr-2" }), title] }), _jsx(DialogDescription, { children: props.description })] }), _jsxs(DialogBody, { className: "pb-2", children: [_jsx("div", { children: props.children }), props.confirmText && _jsx(Alert, { children: _jsxs(Label, { className: "flex gap-4 items-center", children: [_jsx(Checkbox, { id: confirmId, checked: confirmed, onCheckedChange: (v) => setConfirmed(!!v) }), props.confirmText] }) })] }), anyButton && _jsxs(DialogFooter, { className: "gap-2", children: [cancelButton && (_jsx(Button, { variant: "secondary", color: "neutral", onClick: async () => {
|
|
28
|
+
return (_jsxs(Dialog, { open: open, onOpenChange: onOpenChange, children: [props.trigger && _jsx(DialogTrigger, { asChild: true, children: props.trigger }), _jsxs(DialogContent, { onInteractOutside: props.preventClose ? (e) => e.preventDefault() : undefined, className: props.preventClose ? "[&>button]:hidden" : "", children: [_jsxs(DialogHeader, { children: [_jsxs(DialogTitle, { className: "flex items-center", children: [_jsx(TitleIcon, { className: "h-4 w-4 mr-2" }), title] }), _jsx(DialogDescription, { children: props.description })] }), _jsxs(DialogBody, { className: "pb-2", children: [_jsx("div", { children: props.children }), props.confirmText && _jsx(Alert, { children: _jsxs(Label, { className: "flex gap-4 items-center", children: [_jsx(Checkbox, { id: confirmId, checked: confirmed, onCheckedChange: (v) => setConfirmed(!!v) }), props.confirmText] }) })] }), anyButton && _jsxs(DialogFooter, { className: "gap-2", children: [cancelButton && (_jsx(Button, { variant: "secondary", color: "neutral", onClick: async () => {
|
|
29
29
|
if (await cancelButton.onClick?.() !== "prevent-close") {
|
|
30
30
|
onOpenChange(false);
|
|
31
31
|
}
|
|
@@ -32,7 +32,7 @@ export function DateCell(props) {
|
|
|
32
32
|
return (_jsx(TextCell, { size: 140, children: ignore ? 'Never' : timeString }));
|
|
33
33
|
}
|
|
34
34
|
export function ActionCell(props) {
|
|
35
|
-
return (_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsxs(Button, { variant: "ghost", className: cn("flex h-8 w-8 p-0 data-[state=open]:bg-muted", props.invisible && "invisible"), children: [_jsx(DotsHorizontalIcon, { className: "h-4 w-4" }), _jsx("span", { className: "sr-only", children: "Open menu" })] }) }), _jsx(DropdownMenuContent, { align: "end", className: "min-w-[150px] max-w-[300px]", children: props.items?.map((item, index) => {
|
|
35
|
+
return (_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsxs(Button, { variant: "ghost", className: cn("flex h-8 w-8 p-0 data-[state=open]:bg-muted", props.invisible && "invisible"), children: [_jsx(DotsHorizontalIcon, { className: "h-4 w-4" }), _jsx("span", { className: "sr-only", children: "Open menu" })] }) }), _jsx(DropdownMenuContent, { align: "end", className: "min-w-[150px] max-w-[300px] stack-scope", children: props.items?.map((item, index) => {
|
|
36
36
|
if (item === '-') {
|
|
37
37
|
return _jsx(DropdownMenuSeparator, {}, index);
|
|
38
38
|
}
|
|
@@ -6,5 +6,5 @@ function Item(props) {
|
|
|
6
6
|
return (_jsx(DropdownMenuItem, { onClick: props.onClick, children: _jsxs("div", { className: "flex items-center", children: [_jsx(props.icon, { className: "mr-2 h-3.5 w-3.5 text-muted-foreground/70" }), props.children] }) }));
|
|
7
7
|
}
|
|
8
8
|
export function DataTableColumnHeader({ column, columnTitle, className, }) {
|
|
9
|
-
return (_jsx("div", { className: cn("flex items-center space-x-2", className), children: _jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsxs(Button, { variant: "ghost", size: "sm", className: "-ml-3 h-8 data-[state=open]:bg-accent", children: [_jsx("span", { children: columnTitle }), column.getIsSorted() === "desc" ? (_jsx(ArrowDown, { className: "ml-2 h-4 w-4" })) : column.getIsSorted() === "asc" ? (_jsx(ArrowUp, { className: "ml-2 h-4 w-4" })) : null] }) }), _jsxs(DropdownMenuContent, { align: "start", children: [column.getCanSort() && (_jsxs(_Fragment, { children: [_jsx(Item, { icon: ArrowUp, onClick: () => column.toggleSorting(false), children: "Asc" }), _jsx(Item, { icon: ArrowDown, onClick: () => column.toggleSorting(true), children: "Desc" })] })), _jsx(Item, { icon: EyeOff, onClick: () => column.toggleVisibility(false), children: "Hide" })] })] }) }));
|
|
9
|
+
return (_jsx("div", { className: cn("flex items-center space-x-2", className), children: _jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsxs(Button, { variant: "ghost", size: "sm", className: "-ml-3 h-8 data-[state=open]:bg-accent", children: [_jsx("span", { children: columnTitle }), column.getIsSorted() === "desc" ? (_jsx(ArrowDown, { className: "ml-2 h-4 w-4" })) : column.getIsSorted() === "asc" ? (_jsx(ArrowUp, { className: "ml-2 h-4 w-4" })) : null] }) }), _jsxs(DropdownMenuContent, { align: "start", className: "stack-scope", children: [column.getCanSort() && (_jsxs(_Fragment, { children: [_jsx(Item, { icon: ArrowUp, onClick: () => column.toggleSorting(false), children: "Asc" }), _jsx(Item, { icon: ArrowDown, onClick: () => column.toggleSorting(true), children: "Desc" })] })), _jsx(Item, { icon: EyeOff, onClick: () => column.toggleVisibility(false), children: "Hide" })] })] }) }));
|
|
10
10
|
}
|
|
@@ -1,10 +1,29 @@
|
|
|
1
|
-
import { ColumnDef, Table as TableType, VisibilityState } from "@tanstack/react-table";
|
|
1
|
+
import { ColumnDef, ColumnFiltersState, OnChangeFn, PaginationState, SortingState, Table as TableType, VisibilityState } from "@tanstack/react-table";
|
|
2
2
|
import React from "react";
|
|
3
|
-
|
|
3
|
+
export declare function TableView<TData, TValue>(props: {
|
|
4
|
+
table: TableType<TData>;
|
|
5
|
+
columns: ColumnDef<TData, TValue>[];
|
|
6
|
+
toolbarRender?: (table: TableType<TData>) => React.ReactNode;
|
|
7
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
type DataTableProps<TData, TValue> = {
|
|
4
9
|
columns: ColumnDef<TData, TValue>[];
|
|
5
10
|
data: TData[];
|
|
6
11
|
toolbarRender?: (table: TableType<TData>) => React.ReactNode;
|
|
7
12
|
defaultVisibility?: VisibilityState;
|
|
8
|
-
}
|
|
13
|
+
};
|
|
9
14
|
export declare function DataTable<TData, TValue>({ columns, data, toolbarRender, defaultVisibility, }: DataTableProps<TData, TValue>): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
type DataTableServerProps<TData, TValue> = DataTableProps<TData, TValue> & {
|
|
16
|
+
sorting?: SortingState;
|
|
17
|
+
setSorting?: OnChangeFn<SortingState>;
|
|
18
|
+
pagination?: PaginationState;
|
|
19
|
+
setPagination?: OnChangeFn<PaginationState>;
|
|
20
|
+
rowCount?: number;
|
|
21
|
+
columnFilters?: ColumnFiltersState;
|
|
22
|
+
setColumnFilters?: OnChangeFn<ColumnFiltersState>;
|
|
23
|
+
manualPagination?: boolean;
|
|
24
|
+
manualFiltering?: boolean;
|
|
25
|
+
globalFilter?: any;
|
|
26
|
+
setGlobalFilter?: OnChangeFn<any>;
|
|
27
|
+
};
|
|
28
|
+
export declare function DataTableManual<TData, TValue>({ columns, data, toolbarRender, defaultVisibility, sorting, setSorting, pagination, setPagination, rowCount, columnFilters, setColumnFilters, globalFilter, setGlobalFilter, manualPagination, manualFiltering, }: DataTableServerProps<TData, TValue>): import("react/jsx-runtime").JSX.Element;
|
|
10
29
|
export {};
|
|
@@ -5,11 +5,26 @@ import { GlobalFiltering, flexRender, getCoreRowModel, getFacetedRowModel, getFa
|
|
|
5
5
|
import React from "react";
|
|
6
6
|
import { DataTablePagination } from "./pagination";
|
|
7
7
|
import { DataTableToolbar } from "./toolbar";
|
|
8
|
+
export function TableView(props) {
|
|
9
|
+
return (_jsxs("div", { className: "space-y-4", children: [_jsx(DataTableToolbar, { table: props.table, toolbarRender: props.toolbarRender }), _jsx("div", { className: "rounded-md border", children: _jsxs(Table, { children: [_jsx(TableHeader, { children: props.table.getHeaderGroups().map((headerGroup) => (_jsx(TableRow, { children: headerGroup.headers.map((header) => {
|
|
10
|
+
return (_jsx(TableHead, { colSpan: header.colSpan, children: header.isPlaceholder
|
|
11
|
+
? null
|
|
12
|
+
: flexRender(header.column.columnDef.header, header.getContext()) }, header.id));
|
|
13
|
+
}) }, headerGroup.id))) }), _jsx(TableBody, { children: props.table.getRowModel().rows.length ? (props.table.getRowModel().rows.map((row) => (_jsx(TableRow, { "data-state": row.getIsSelected() && "selected", children: row.getVisibleCells().map((cell) => (_jsx(TableCell, { children: flexRender(cell.column.columnDef.cell, cell.getContext()) }, cell.id))) }, row.id)))) : (_jsx(TableRow, { children: _jsx(TableCell, { colSpan: props.columns.length, className: "h-24 text-center", children: "No results." }) })) })] }) }), _jsx(DataTablePagination, { table: props.table })] }));
|
|
14
|
+
}
|
|
8
15
|
export function DataTable({ columns, data, toolbarRender, defaultVisibility, }) {
|
|
16
|
+
const [sorting, setSorting] = React.useState([]);
|
|
17
|
+
const [columnFilters, setColumnFilters] = React.useState([]);
|
|
18
|
+
const [pagination, setPagination] = React.useState({
|
|
19
|
+
pageIndex: 0,
|
|
20
|
+
pageSize: 10,
|
|
21
|
+
});
|
|
22
|
+
const [globalFilter, setGlobalFilter] = React.useState();
|
|
23
|
+
return _jsx(DataTableManual, { columns: columns, data: data, toolbarRender: toolbarRender, defaultVisibility: defaultVisibility, sorting: sorting, setSorting: setSorting, columnFilters: columnFilters, setColumnFilters: setColumnFilters, manualPagination: false, manualFiltering: false, pagination: pagination, setPagination: setPagination, globalFilter: globalFilter, setGlobalFilter: setGlobalFilter });
|
|
24
|
+
}
|
|
25
|
+
export function DataTableManual({ columns, data, toolbarRender, defaultVisibility, sorting, setSorting, pagination, setPagination, rowCount, columnFilters, setColumnFilters, globalFilter, setGlobalFilter, manualPagination = true, manualFiltering = true, }) {
|
|
9
26
|
const [rowSelection, setRowSelection] = React.useState({});
|
|
10
27
|
const [columnVisibility, setColumnVisibility] = React.useState(defaultVisibility || {});
|
|
11
|
-
const [columnFilters, setColumnFilters] = React.useState([]);
|
|
12
|
-
const [sorting, setSorting] = React.useState([]);
|
|
13
28
|
const table = useReactTable({
|
|
14
29
|
data,
|
|
15
30
|
columns,
|
|
@@ -18,12 +33,16 @@ export function DataTable({ columns, data, toolbarRender, defaultVisibility, })
|
|
|
18
33
|
columnVisibility,
|
|
19
34
|
rowSelection,
|
|
20
35
|
columnFilters,
|
|
36
|
+
pagination,
|
|
37
|
+
globalFilter: globalFilter,
|
|
21
38
|
},
|
|
22
39
|
enableRowSelection: true,
|
|
40
|
+
onGlobalFilterChange: setGlobalFilter,
|
|
23
41
|
onRowSelectionChange: setRowSelection,
|
|
24
42
|
onSortingChange: setSorting,
|
|
25
43
|
onColumnFiltersChange: setColumnFilters,
|
|
26
44
|
onColumnVisibilityChange: setColumnVisibility,
|
|
45
|
+
onPaginationChange: setPagination,
|
|
27
46
|
getColumnCanGlobalFilter: (c) => c.columnDef.enableGlobalFilter ?? GlobalFiltering.getDefaultOptions(table).getColumnCanGlobalFilter(c),
|
|
28
47
|
getCoreRowModel: getCoreRowModel(),
|
|
29
48
|
getFilteredRowModel: getFilteredRowModel(),
|
|
@@ -32,10 +51,9 @@ export function DataTable({ columns, data, toolbarRender, defaultVisibility, })
|
|
|
32
51
|
getFacetedRowModel: getFacetedRowModel(),
|
|
33
52
|
getFacetedUniqueValues: getFacetedUniqueValues(),
|
|
34
53
|
autoResetAll: false,
|
|
54
|
+
manualPagination,
|
|
55
|
+
manualFiltering,
|
|
56
|
+
rowCount,
|
|
35
57
|
});
|
|
36
|
-
return (
|
|
37
|
-
return (_jsx(TableHead, { colSpan: header.colSpan, children: header.isPlaceholder
|
|
38
|
-
? null
|
|
39
|
-
: flexRender(header.column.columnDef.header, header.getContext()) }, header.id));
|
|
40
|
-
}) }, headerGroup.id))) }), _jsx(TableBody, { children: table.getRowModel().rows.length ? (table.getRowModel().rows.map((row) => (_jsx(TableRow, { "data-state": row.getIsSelected() && "selected", children: row.getVisibleCells().map((cell) => (_jsx(TableCell, { children: flexRender(cell.column.columnDef.cell, cell.getContext()) }, cell.id))) }, row.id)))) : (_jsx(TableRow, { children: _jsx(TableCell, { colSpan: columns.length, className: "h-24 text-center", children: "No results." }) })) })] }) }), _jsx(DataTablePagination, { table: table })] }));
|
|
58
|
+
return _jsx(TableView, { table: table, columns: columns, toolbarRender: toolbarRender });
|
|
41
59
|
}
|
|
@@ -21,6 +21,6 @@ export function DataTableFacetedFilter({ column, title, options, }) {
|
|
|
21
21
|
column?.setFilterValue(filterValues.length ? filterValues : undefined);
|
|
22
22
|
}, children: [_jsx("div", { className: cn("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary", isSelected
|
|
23
23
|
? "bg-primary text-primary-foreground"
|
|
24
|
-
: "opacity-50 [&_svg]:invisible"), children: _jsx(CheckIcon, { className: cn("h-4 w-4") }) }), option.icon && (_jsx(option.icon, { className: "mr-2 h-4 w-4 text-muted-foreground" })), _jsx("span", { children: option.label })
|
|
24
|
+
: "opacity-50 [&_svg]:invisible"), children: _jsx(CheckIcon, { className: cn("h-4 w-4") }) }), option.icon && (_jsx(option.icon, { className: "mr-2 h-4 w-4 text-muted-foreground" })), _jsx("span", { children: option.label })] }, option.value));
|
|
25
25
|
}) }), selectedValues.size > 0 && (_jsxs(_Fragment, { children: [_jsx(CommandSeparator, {}), _jsx(CommandGroup, { children: _jsx(CommandItem, { onSelect: () => column?.setFilterValue(undefined), className: "justify-center text-center", children: "Clear filters" }) })] }))] })] }) })] }));
|
|
26
26
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { ChevronLeftIcon, ChevronRightIcon
|
|
2
|
+
import { ChevronLeftIcon, ChevronRightIcon } from "@radix-ui/react-icons";
|
|
3
3
|
import { Button, Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@stackframe/stack-ui";
|
|
4
4
|
export function DataTablePagination({ table, }) {
|
|
5
|
-
return (_jsxs("div", { className: "flex items-center justify-between px-2 flex-col sm:flex-row gap-y-4 sm:gap-y-0", children: [_jsx("div", { className: "flex-1 text-sm text-muted-foreground", children: table.getFilteredSelectedRowModel().rows.length
|
|
6
|
-
`${table.getFilteredRowModel().rows.length} row(s)
|
|
7
|
-
|
|
5
|
+
return (_jsxs("div", { className: "flex items-center justify-between px-2 flex-col sm:flex-row gap-y-4 sm:gap-y-0", children: [_jsx("div", { className: "flex-1 text-sm text-muted-foreground", children: table.getFilteredSelectedRowModel().rows.length !== 0 ?
|
|
6
|
+
`${table.getFilteredSelectedRowModel().rows.length} of ${table.getFilteredRowModel().rows.length} row(s) selected` :
|
|
7
|
+
undefined }), _jsxs("div", { className: "flex items-center gap-x-6 lg:gap-x-8 flex-col sm:flex-row gap-y-4 sm:gap-y-0", children: [_jsxs("div", { className: "flex items-center space-x-2", children: [_jsx("p", { className: "text-sm font-medium", children: "Rows per page" }), _jsxs(Select, { value: `${table.getState().pagination.pageSize}`, onValueChange: (value) => {
|
|
8
8
|
table.setPageSize(Number(value));
|
|
9
|
-
}, children: [_jsx(SelectTrigger, { className: "h-8 w-[70px]", children: _jsx(SelectValue, { placeholder: table.getState().pagination.pageSize }) }), _jsx(SelectContent, { side: "top", children: [10, 20, 30, 40, 50].map((pageSize) => (_jsx(SelectItem, { value: `${pageSize}`, children: pageSize }, pageSize))) })] })] }), _jsxs("div", { className: "flex items-center gap-4", children: [
|
|
9
|
+
}, children: [_jsx(SelectTrigger, { className: "h-8 w-[70px]", children: _jsx(SelectValue, { placeholder: table.getState().pagination.pageSize }) }), _jsx(SelectContent, { side: "top", children: [10, 20, 30, 40, 50].map((pageSize) => (_jsx(SelectItem, { value: `${pageSize}`, children: pageSize }, pageSize))) })] })] }), _jsxs("div", { className: "flex items-center gap-4", children: [_jsx("div", { className: "flex items-center justify-center text-sm font-medium", children: table.getState().pagination.pageIndex + 1 }), _jsxs("div", { className: "flex items-center space-x-2", children: [_jsxs(Button, { variant: "outline", className: "h-8 w-8 p-0", onClick: () => table.previousPage(), disabled: !table.getCanPreviousPage(), children: [_jsx("span", { className: "sr-only", children: "Go to previous page" }), _jsx(ChevronLeftIcon, { className: "h-4 w-4" })] }), _jsxs(Button, { variant: "outline", className: "h-8 w-8 p-0", onClick: () => table.nextPage(), disabled: !table.getCanNextPage(), children: [_jsx("span", { className: "sr-only", children: "Go to next page" }), _jsx(ChevronRightIcon, { className: "h-4 w-4" })] })] })] })] })] }));
|
|
10
10
|
}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
declare
|
|
3
|
-
deactivated?: boolean | undefined;
|
|
4
|
-
} & React.RefAttributes<HTMLSpanElement>>;
|
|
2
|
+
declare function Skeleton({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
5
3
|
export { Skeleton };
|
|
@@ -1,48 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as _jsx
|
|
3
|
-
import React from "react";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
3
|
import { cn } from "../..";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
@keyframes animation-light {
|
|
8
|
-
0% {
|
|
9
|
-
filter: grayscale(1) contrast(0) brightness(0) invert(1) brightness(0.8);
|
|
4
|
+
function Skeleton({ className, ...props }) {
|
|
5
|
+
return (_jsx("div", { className: cn("animate-pulse rounded-md bg-primary/10", className), ...props }));
|
|
10
6
|
}
|
|
11
|
-
100% {
|
|
12
|
-
filter: grayscale(1) contrast(0) brightness(0) invert(1) brightness(0.9);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
@keyframes animation-dark {
|
|
16
|
-
0% {
|
|
17
|
-
filter: grayscale(1) contrast(0) brightness(0) invert(1) brightness(0.2);
|
|
18
|
-
}
|
|
19
|
-
100% {
|
|
20
|
-
filter: grayscale(1) contrast(0) brightness(0) invert(1) brightness(0.1);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.stack-skeleton[data-stack-state="activated"],
|
|
24
|
-
.stack-skeleton[data-stack-state="activated"] * {
|
|
25
|
-
pointer-events: none !important;
|
|
26
|
-
-webkit-user-select: none !important;
|
|
27
|
-
-moz-user-select: none !important;
|
|
28
|
-
user-select: none !important;
|
|
29
|
-
cursor: default !important;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.stack-skeleton[data-stack-state="activated"] {
|
|
33
|
-
animation: animation-light 1s infinite alternate-reverse !important;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
html[data-stack-theme='dark'] .stack-skeleton[data-stack-state="activated"] {
|
|
37
|
-
animation: animation-dark 1s infinite alternate-reverse !important;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
html[data-stack-theme='dark'] .stack-skeleton[data-stack-state="activated"] {
|
|
41
|
-
animation: animation-dark 1s infinite alternate-reverse !important;
|
|
42
|
-
}
|
|
43
|
-
`;
|
|
44
|
-
const Skeleton = React.forwardRef((props, ref) => {
|
|
45
|
-
return (_jsxs(_Fragment, { children: [_jsx("style", { children: styleSheet }), _jsx("span", { ...props, ref: ref, "data-stack-state": props.deactivated ? "deactivated" : "activated", className: cn(props.className, "stack-skeleton") })] }));
|
|
46
|
-
});
|
|
47
|
-
Skeleton.displayName = "Skeleton";
|
|
48
7
|
export { Skeleton };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stackframe/stack-ui",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.17",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"react-hook-form": "^7.51.4",
|
|
69
69
|
"react-resizable-panels": "^2.0.19",
|
|
70
70
|
"tailwind-merge": "^2.3.0",
|
|
71
|
-
"@stackframe/stack-shared": "2.6.
|
|
71
|
+
"@stackframe/stack-shared": "2.6.17"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"@types/react": "^18.2.66",
|