@stackframe/stack-ui 2.6.28 → 2.6.30
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
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @stackframe/stack-ui
|
|
2
2
|
|
|
3
|
+
## 2.6.30
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
- @stackframe/stack-shared@2.6.30
|
|
9
|
+
|
|
10
|
+
## 2.6.29
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Bugfixes
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
- @stackframe/stack-shared@2.6.29
|
|
17
|
+
|
|
3
18
|
## 2.6.28
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { Alert, Button, Checkbox, Dialog, DialogBody, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, Label } from '..';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
4
3
|
import { CircleAlert, Info } from "lucide-react";
|
|
5
|
-
import React, { useId } from "react";
|
|
4
|
+
import React, { Suspense, useId } from "react";
|
|
5
|
+
import { Alert, Button, Checkbox, Dialog, DialogBody, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, Label, Skeleton } from '..';
|
|
6
6
|
export function ActionDialog(props) {
|
|
7
7
|
const okButton = props.okButton === true ? {} : props.okButton;
|
|
8
8
|
const cancelButton = props.cancelButton === true ? {} : props.cancelButton;
|
|
@@ -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, { 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 () => {
|
|
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: _jsx(Suspense, { fallback: _jsxs(_Fragment, { children: [_jsx(Skeleton, { className: 'h-9 w-2/3 self-center' }), _jsx(Skeleton, { className: 'h-3 w-16 mt-8' }), _jsx(Skeleton, { className: 'h-9 w-full mt-1' }), _jsx(Skeleton, { className: 'h-3 w-24 mt-2' }), _jsx(Skeleton, { className: 'h-9 w-full mt-1' }), _jsx(Skeleton, { className: 'h-9 w-full mt-6' })] }), 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,7 +1,7 @@
|
|
|
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
|
-
export const Spinner = forwardRefIfNeeded((props, ref) => {
|
|
5
|
-
return (_jsx("span", { ref: ref, ...props, children: _jsx(ReloadIcon, { className: "animate-spin" }) }));
|
|
4
|
+
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
6
|
});
|
|
7
7
|
Spinner.displayName = "Spinner";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stackframe/stack-ui",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.30",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -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.6.
|
|
79
|
+
"@stackframe/stack-shared": "2.6.30"
|
|
80
80
|
},
|
|
81
81
|
"devDependencies": {
|
|
82
82
|
"rimraf": "^5.0.10",
|