@schemavaults/ui 0.14.0 → 0.14.3
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/dist/components/error/ErrorPage/ErrorPage.d.ts +2 -0
- package/dist/components/error/ErrorPage/ErrorPage.js +3 -1
- package/dist/components/error/ErrorPage/ErrorPage.js.map +1 -1
- package/dist/components/ui/input/input.d.ts +5 -2
- package/dist/components/ui/input/input.js +9 -3
- package/dist/components/ui/input/input.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import type { ReactElement } from "react";
|
|
2
2
|
export type ErrorPageProps = {
|
|
3
3
|
error: Error;
|
|
4
|
+
reset?: () => void;
|
|
4
5
|
} | {
|
|
5
6
|
error: number | string;
|
|
6
7
|
message: string;
|
|
8
|
+
reset?: () => void;
|
|
7
9
|
};
|
|
8
10
|
export declare function ErrorPage(props: ErrorPageProps): ReactElement;
|
|
9
11
|
export default ErrorPage;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { RotateCcw } from "lucide-react";
|
|
4
|
+
import { Button } from "../../ui/button";
|
|
3
5
|
import { Wordmark } from "../../ui/wordmark";
|
|
4
6
|
export function ErrorPage(props) {
|
|
5
7
|
if (!("error" in props)) {
|
|
@@ -19,7 +21,7 @@ export function ErrorPage(props) {
|
|
|
19
21
|
else {
|
|
20
22
|
errorMsg = "An unknown error occurred!";
|
|
21
23
|
}
|
|
22
|
-
return (_jsxs("div", { className: "w-full grow flex flex-col justify-center items-center min-h-screen p-2 md:p-4 lg:p-8", children: [_jsxs("h1", { className: "text-xl flex flex-row gap-4", children: [_jsx(Wordmark, {}), " Error"] }), _jsx("p", { className: "text-md", children: errorMsg })] }));
|
|
24
|
+
return (_jsxs("div", { className: "w-full grow flex flex-col justify-center items-center min-h-screen p-2 md:p-4 lg:p-8", children: [_jsxs("h1", { className: "text-xl flex flex-row gap-4", children: [_jsx(Wordmark, {}), " Error"] }), _jsx("p", { className: "text-md", children: errorMsg }), props.reset && _jsxs(Button, { onClick: props.reset, className: "mt-4 flex flex-row gap-2", children: [_jsx(RotateCcw, { size: 16 }), " Try Again"] })] }));
|
|
23
25
|
}
|
|
24
26
|
export default ErrorPage;
|
|
25
27
|
//# sourceMappingURL=ErrorPage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorPage.js","sourceRoot":"","sources":["../../../../src/components/error/ErrorPage/ErrorPage.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"ErrorPage.js","sourceRoot":"","sources":["../../../../src/components/error/ErrorPage/ErrorPage.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAWpD,MAAM,UAAU,SAAS,CAAC,KAAqB;IAC7C,IAAI,CAAC,CAAC,OAAO,IAAI,KAAK,CAAC,EAAE,CAAC;QACxB,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAA;IAC9D,CAAC;IAED,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;IAC1B,IAAI,QAAgB,CAAC;IACrB,IACE,OAAO,KAAK,KAAK,QAAQ;;YAEzB,OAAO,KAAK,KAAK,QAAQ,EACzB,CAAC;QACD,MAAM,OAAO,GAAY,KAA4C,CAAC,OAAO,CAAC;QAC9E,QAAQ,GAAG,GAAG,KAAK,KAAK,OAAO,EAAE,CAAC;IACpC,CAAC;SAAM,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;QAClC,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC;IAC3B,CAAC;SAAM,CAAC;QACN,QAAQ,GAAG,4BAAqC,CAAC;IACnD,CAAC;IACD,OAAO,CACL,eAAK,SAAS,EAAC,sFAAsF,aACnG,cAAI,SAAS,EAAC,6BAA6B,aACzC,KAAC,QAAQ,KAAG,cACT,EAEL,YAAG,SAAS,EAAC,SAAS,YAAE,QAAQ,GAAK,EACpC,KAAK,CAAC,KAAK,IAAI,MAAC,MAAM,IAAC,OAAO,EAAE,KAAK,CAAC,KAAK,EAAE,SAAS,EAAC,0BAA0B,aAAC,KAAC,SAAS,IAAC,IAAI,EAAE,EAAE,GAAI,kBAAmB,IACzH,CACP,CAAC;AACJ,CAAC;AAED,eAAe,SAAS,CAAC"}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import type { InputHTMLAttributes, ReactElement } from "react";
|
|
1
|
+
import type { InputHTMLAttributes, ReactElement, ReactNode } from "react";
|
|
2
|
+
import type { LucideIcon } from "lucide-react";
|
|
2
3
|
export interface InputProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
4
|
+
icon?: LucideIcon;
|
|
5
|
+
rightButton?: ReactNode;
|
|
3
6
|
}
|
|
4
7
|
declare const Input: {
|
|
5
|
-
({ className, type, ...props }: InputProps): ReactElement;
|
|
8
|
+
({ className, type, icon: Icon, rightButton, ...props }: InputProps): ReactElement;
|
|
6
9
|
displayName: string;
|
|
7
10
|
};
|
|
8
11
|
export { Input };
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { cn } from "../../../lib/utils";
|
|
4
|
-
const Input = ({ className, type, ...props }) => {
|
|
5
|
-
|
|
4
|
+
const Input = ({ className, type, icon: Icon, rightButton, ...props }) => {
|
|
5
|
+
const hasAdornments = Icon || rightButton;
|
|
6
|
+
const inputElement = (_jsx("input", { type: type, className: cn("flex h-10 w-full text-sm bg-transparent placeholder:text-muted-foreground focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50", hasAdornments
|
|
7
|
+
? cn(Icon ? "pl-9" : "pl-3", rightButton ? "pr-0" : "pr-3", "py-2")
|
|
8
|
+
: "rounded-md border border-input bg-background px-3 py-2 ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2", className), ...props }));
|
|
9
|
+
if (!hasAdornments)
|
|
10
|
+
return inputElement;
|
|
11
|
+
return (_jsxs("div", { className: "relative flex items-center rounded-md border border-input bg-background ring-offset-background focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2", children: [Icon && (_jsx(Icon, { className: "absolute left-3 h-4 w-4 text-muted-foreground pointer-events-none" })), inputElement, rightButton] }));
|
|
6
12
|
};
|
|
7
13
|
Input.displayName = "Input";
|
|
8
14
|
export { Input };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.js","sourceRoot":"","sources":["../../../../src/components/ui/input/input.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;
|
|
1
|
+
{"version":3,"file":"input.js","sourceRoot":"","sources":["../../../../src/components/ui/input/input.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAKb,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAOjC,MAAM,KAAK,GAAG,CAAC,EACb,SAAS,EACT,IAAI,EACJ,IAAI,EAAE,IAAI,EACV,WAAW,EACX,GAAG,KAAK,EACG,EAAgB,EAAE;IAC7B,MAAM,aAAa,GAAG,IAAI,IAAI,WAAW,CAAC;IAE1C,MAAM,YAAY,GAAG,CACnB,gBACE,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,EAAE,CACX,sJAAsJ,EACtJ,aAAa;YACX,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC;YACnE,CAAC,CAAC,wNAAwN,EAC5N,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;IAEF,IAAI,CAAC,aAAa;QAAE,OAAO,YAAY,CAAC;IAExC,OAAO,CACL,eAAK,SAAS,EAAC,sKAAsK,aAClL,IAAI,IAAI,CACP,KAAC,IAAI,IAAC,SAAS,EAAC,mEAAmE,GAAG,CACvF,EACA,YAAY,EACZ,WAAW,IACR,CACP,CAAC;AACJ,CAAC,CAAC;AACF,KAAK,CAAC,WAAW,GAAG,OAAO,CAAC;AAE5B,OAAO,EAAE,KAAK,EAAE,CAAC;AAEjB,eAAe,KAAK,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@schemavaults/ui",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"description": "React.js UI components for SchemaVaults frontend applications",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"clsx": "2.1.1",
|
|
36
36
|
"cmdk": "1.1.1",
|
|
37
37
|
"framer-motion": "12.23.24",
|
|
38
|
-
"lucide-react": "0.
|
|
38
|
+
"lucide-react": "0.575.0",
|
|
39
39
|
"next-themes": "0.4.6",
|
|
40
40
|
"react": "19.0.0",
|
|
41
41
|
"react-dom": "19.0.0",
|