@sqlrooms/ui 0.0.2 → 0.1.0

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.
@@ -6,7 +6,7 @@ import { cn } from '../lib/utils';
6
6
  import { Button } from './button';
7
7
  const ErrorPane = React.forwardRef(({ className, embed, title = 'Something went wrong', text = `We are sorry, but something unexpected happened. We were notified
8
8
  and will be working on resolving the issue as soon as possible.`, onRetry, actions = false, onGoToStart, ...props }, ref) => {
9
- return (_jsx("div", { ref: ref, className: cn('flex justify-center', className), ...props, children: _jsxs(Alert, { variant: "destructive", className: cn('flex min-h-[200px] max-w-[450px] flex-col items-center justify-center rounded-lg bg-gray-700 px-6 py-6 text-center', !embed && 'min-w-[350px]'), children: [_jsx("div", { className: "mb-4", children: _jsx(TriangleAlertIcon, { className: "h-8 w-8 text-destructive" }) }), _jsx(AlertTitle, { className: "mb-1 text-xl", children: title }), _jsxs(AlertDescription, { className: "mt-3 max-w-sm px-2", children: [_jsx("p", { className: "mb-5 text-left", children: text }), actions && (_jsx("div", { className: "mt-6 mb-3", children: _jsxs("div", { className: "flex justify-center gap-2", children: [onRetry && (_jsxs(Button, { size: "sm", onClick: onRetry, className: "inline-flex items-center", children: [_jsx(RotateCcwIcon, { className: "mr-2 h-4 w-4" }), "Retry"] })), !embed && onGoToStart && (_jsx(Button, { size: "sm", onClick: onGoToStart, children: "Go to start page" }))] }) }))] })] }) }));
9
+ return (_jsx("div", { ref: ref, className: cn('flex justify-center', className), ...props, children: _jsxs(Alert, { variant: "destructive", className: cn('flex min-h-[200px] max-w-[450px] flex-col items-center justify-center rounded-lg px-6 py-6 text-center', !embed && 'min-w-[350px]'), children: [_jsx("div", { className: "mb-4", children: _jsx(TriangleAlertIcon, { className: "h-8 w-8 text-destructive" }) }), _jsx(AlertTitle, { className: "mb-1 text-xl", children: title }), _jsxs(AlertDescription, { className: "mt-3 max-w-sm px-2", children: [_jsx("p", { className: "mb-5 text-left", children: text }), actions && (_jsx("div", { className: "mt-6 mb-3", children: _jsxs("div", { className: "flex justify-center gap-2", children: [onRetry && (_jsxs(Button, { size: "sm", onClick: onRetry, className: "inline-flex items-center", children: [_jsx(RotateCcwIcon, { className: "mr-2 h-4 w-4" }), "Retry"] })), !embed && onGoToStart && (_jsx(Button, { size: "sm", onClick: onGoToStart, children: "Go to start page" }))] }) }))] })] }) }));
10
10
  });
11
11
  ErrorPane.displayName = 'ErrorPane';
12
12
  export { ErrorPane };
@@ -1 +1 @@
1
- {"version":3,"file":"progress-modal.d.ts","sourceRoot":"","sources":["../../src/components/progress-modal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,EAAE,EAAC,MAAM,OAAO,CAAC;AAIzB,QAAA,MAAM,aAAa,EAAE,EAAE,CAAC;IACtB,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAmBA,CAAC;AAEF,OAAO,EAAC,aAAa,EAAC,CAAC"}
1
+ {"version":3,"file":"progress-modal.d.ts","sourceRoot":"","sources":["../../src/components/progress-modal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,EAAE,EAAC,MAAM,OAAO,CAAC;AAUzB,QAAA,MAAM,aAAa,EAAE,EAAE,CAAC;IACtB,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAoBA,CAAC;AAEF,OAAO,EAAC,aAAa,EAAC,CAAC"}
@@ -1,8 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Dialog, DialogContent, DialogHeader, DialogTitle } from './dialog';
2
+ import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, } from './dialog';
3
3
  import { Progress } from './progress';
4
4
  const ProgressModal = (props) => {
5
5
  const { isOpen, title, loadingStage, progress } = props;
6
- return (_jsx(Dialog, { open: isOpen, onOpenChange: () => { }, children: _jsxs(DialogContent, { className: "sm:max-w-[425px]", children: [_jsx(DialogHeader, { children: _jsx(DialogTitle, { children: title ?? '' }) }), _jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Progress, { value: progress, className: "w-full" }), _jsxs("div", { className: "flex justify-between text-sm text-muted-foreground", children: [_jsx("span", { children: loadingStage ?? '' }), progress ? _jsxs("span", { children: [progress, "%"] }) : null] })] })] }) }));
6
+ return (_jsxs(Dialog, { open: isOpen, onOpenChange: () => { }, children: [_jsx(DialogDescription, { children: "Progress modal" }), _jsxs(DialogContent, { className: "sm:max-w-[425px]", children: [_jsx(DialogHeader, { children: _jsx(DialogTitle, { children: title ?? '' }) }), _jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Progress, { value: progress, className: "w-full" }), _jsxs("div", { className: "flex justify-between text-sm text-muted-foreground", children: [_jsx("span", { children: loadingStage ?? '' }), progress ? _jsxs("span", { children: [progress, "%"] }) : null] })] })] })] }));
7
7
  };
8
8
  export { ProgressModal };
package/package.json CHANGED
@@ -1,8 +1,14 @@
1
1
  {
2
2
  "name": "@sqlrooms/ui",
3
- "version": "0.0.2",
3
+ "version": "0.1.0",
4
4
  "type": "module",
5
5
  "private": false,
6
+ "author": "Ilya Boyandin <ilya@boyandin.me>",
7
+ "license": "MIT",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "https://github.com/sqlrooms/sqlrooms.git"
11
+ },
6
12
  "files": [
7
13
  "dist"
8
14
  ],
@@ -43,7 +49,7 @@
43
49
  "@radix-ui/react-tooltip": "^1.1.6",
44
50
  "class-variance-authority": "^0.7.1",
45
51
  "clsx": "^2.1.1",
46
- "lucide-react": "^0.473.0",
52
+ "lucide-react": "^0.474.0",
47
53
  "react-hook-form": "^7.54.2",
48
54
  "react-resizable-panels": "^2.1.7",
49
55
  "tailwind-merge": "^2.6.0",
@@ -54,5 +60,5 @@
54
60
  "autoprefixer": "^10.4.20",
55
61
  "tailwindcss": "^3.4.17"
56
62
  },
57
- "gitHead": "32da0b35fe906bdcef42274624d069cc49425a74"
63
+ "gitHead": "2d44f6636dbd53d18c32a422351e93caa182ada6"
58
64
  }