@stackframe/stack-ui 2.6.16 → 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
CHANGED
|
@@ -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
|
}
|
|
@@ -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",
|