@sqlrooms/ui 0.13.1 → 0.14.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-pane.d.ts","sourceRoot":"","sources":["../../src/components/error-pane.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,UAAU,cAAe,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACnE,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,OAAO,CAAC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,QAAA,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"error-pane.d.ts","sourceRoot":"","sources":["../../src/components/error-pane.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,UAAU,cAAe,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACnE,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,OAAO,CAAC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,QAAA,MAAM,SAAS,uFA6Dd,CAAC;AAIF,OAAO,EAAC,SAAS,EAAC,CAAC"}
|
|
@@ -4,8 +4,7 @@ import { RotateCcwIcon, TriangleAlertIcon } from 'lucide-react';
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { cn } from '../lib/utils';
|
|
6
6
|
import { Button } from './button';
|
|
7
|
-
const ErrorPane = React.forwardRef(({ className, embed, title = 'Something went wrong', text = `We are sorry, but something unexpected happened
|
|
8
|
-
and will be working on resolving the issue as soon as possible.`, onRetry, actions = false, onGoToStart, ...props }, ref) => {
|
|
7
|
+
const ErrorPane = React.forwardRef(({ className, embed, title = 'Something went wrong', text = `We are sorry, but something unexpected happened.`, onRetry, actions = false, onGoToStart, ...props }, ref) => {
|
|
9
8
|
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: "text-destructive h-8 w-8" }) }), _jsx(AlertTitle, { className: "text-foreground mb-1 text-xl", children: title }), _jsxs(AlertDescription, { className: "text-foreground mt-3 max-w-sm px-2", children: [_jsx("p", { className: "mb-5 text-left", children: text }), actions && (_jsx("div", { className: "mb-3 mt-6", 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
9
|
});
|
|
11
10
|
ErrorPane.displayName = 'ErrorPane';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-pane.js","sourceRoot":"","sources":["../../src/components/error-pane.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAC,MAAM,SAAS,CAAC;AAC5D,OAAO,EAAC,aAAa,EAAE,iBAAiB,EAAC,MAAM,cAAc,CAAC;AAC9D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAC,EAAE,EAAC,MAAM,cAAc,CAAC;AAChC,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAC;AAYhC,MAAM,SAAS,GAAG,KAAK,CAAC,UAAU,CAChC,CACE,EACE,SAAS,EACT,KAAK,EACL,KAAK,GAAG,sBAAsB,EAC9B,IAAI,GAAG
|
|
1
|
+
{"version":3,"file":"error-pane.js","sourceRoot":"","sources":["../../src/components/error-pane.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAC,MAAM,SAAS,CAAC;AAC5D,OAAO,EAAC,aAAa,EAAE,iBAAiB,EAAC,MAAM,cAAc,CAAC;AAC9D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAC,EAAE,EAAC,MAAM,cAAc,CAAC;AAChC,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAC;AAYhC,MAAM,SAAS,GAAG,KAAK,CAAC,UAAU,CAChC,CACE,EACE,SAAS,EACT,KAAK,EACL,KAAK,GAAG,sBAAsB,EAC9B,IAAI,GAAG,kDAAkD,EACzD,OAAO,EACP,OAAO,GAAG,KAAK,EACf,WAAW,EACX,GAAG,KAAK,EACT,EACD,GAAG,EACH,EAAE;IACF,OAAO,CACL,cACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,qBAAqB,EAAE,SAAS,CAAC,KAC3C,KAAK,YAET,MAAC,KAAK,IACJ,OAAO,EAAC,aAAa,EACrB,SAAS,EAAE,EAAE,CACX,wGAAwG,EACxG,CAAC,KAAK,IAAI,eAAe,CAC1B,aAED,cAAK,SAAS,EAAC,MAAM,YACnB,KAAC,iBAAiB,IAAC,SAAS,EAAC,0BAA0B,GAAG,GACtD,EACN,KAAC,UAAU,IAAC,SAAS,EAAC,8BAA8B,YACjD,KAAK,GACK,EACb,MAAC,gBAAgB,IAAC,SAAS,EAAC,oCAAoC,aAC9D,YAAG,SAAS,EAAC,gBAAgB,YAAE,IAAI,GAAK,EACvC,OAAO,IAAI,CACV,cAAK,SAAS,EAAC,WAAW,YACxB,eAAK,SAAS,EAAC,2BAA2B,aACvC,OAAO,IAAI,CACV,MAAC,MAAM,IACL,IAAI,EAAC,IAAI,EACT,OAAO,EAAE,OAAO,EAChB,SAAS,EAAC,0BAA0B,aAEpC,KAAC,aAAa,IAAC,SAAS,EAAC,cAAc,GAAG,aAEnC,CACV,EACA,CAAC,KAAK,IAAI,WAAW,IAAI,CACxB,KAAC,MAAM,IAAC,IAAI,EAAC,IAAI,EAAC,OAAO,EAAE,WAAW,iCAE7B,CACV,IACG,GACF,CACP,IACgB,IACb,GACJ,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,SAAS,CAAC,WAAW,GAAG,WAAW,CAAC;AAEpC,OAAO,EAAC,SAAS,EAAC,CAAC","sourcesContent":["import {Alert, AlertDescription, AlertTitle} from './alert';\nimport {RotateCcwIcon, TriangleAlertIcon} from 'lucide-react';\nimport * as React from 'react';\nimport {cn} from '../lib/utils';\nimport {Button} from './button';\n\ninterface ErrorPaneProps extends React.HTMLAttributes<HTMLDivElement> {\n embed?: boolean;\n error?: string | Error | unknown;\n title?: string;\n text?: string;\n onRetry?: () => void;\n onGoToStart?: () => void;\n actions?: boolean;\n}\n\nconst ErrorPane = React.forwardRef<HTMLDivElement, ErrorPaneProps>(\n (\n {\n className,\n embed,\n title = 'Something went wrong',\n text = `We are sorry, but something unexpected happened.`,\n onRetry,\n actions = false,\n onGoToStart,\n ...props\n },\n ref,\n ) => {\n return (\n <div\n ref={ref}\n className={cn('flex justify-center', className)}\n {...props}\n >\n <Alert\n variant=\"destructive\"\n className={cn(\n 'flex min-h-[200px] max-w-[450px] flex-col items-center justify-center rounded-lg px-6 py-6 text-center',\n !embed && 'min-w-[350px]',\n )}\n >\n <div className=\"mb-4\">\n <TriangleAlertIcon className=\"text-destructive h-8 w-8\" />\n </div>\n <AlertTitle className=\"text-foreground mb-1 text-xl\">\n {title}\n </AlertTitle>\n <AlertDescription className=\"text-foreground mt-3 max-w-sm px-2\">\n <p className=\"mb-5 text-left\">{text}</p>\n {actions && (\n <div className=\"mb-3 mt-6\">\n <div className=\"flex justify-center gap-2\">\n {onRetry && (\n <Button\n size=\"sm\"\n onClick={onRetry}\n className=\"inline-flex items-center\"\n >\n <RotateCcwIcon className=\"mr-2 h-4 w-4\" />\n Retry\n </Button>\n )}\n {!embed && onGoToStart && (\n <Button size=\"sm\" onClick={onGoToStart}>\n Go to start page\n </Button>\n )}\n </div>\n </div>\n )}\n </AlertDescription>\n </Alert>\n </div>\n );\n },\n);\n\nErrorPane.displayName = 'ErrorPane';\n\nexport {ErrorPane};\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sqlrooms/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"private": false,
|
|
6
6
|
"author": "Ilya Boyandin <ilya@boyandin.me>",
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"autoprefixer": "^10.4.20",
|
|
64
64
|
"tailwindcss": "^3.4.17"
|
|
65
65
|
},
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "fb82a7e1be842348246bafdfeb93b6c41f5f9eb5"
|
|
67
67
|
}
|