@schemavaults/ui 0.14.2 → 0.14.4
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/ui/index.d.ts +2 -0
- package/dist/components/ui/index.js +1 -0
- package/dist/components/ui/index.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/dist/components/ui/password-input/index.d.ts +3 -0
- package/dist/components/ui/password-input/index.js +3 -0
- package/dist/components/ui/password-input/index.js.map +1 -0
- package/dist/components/ui/password-input/password-input.d.ts +10 -0
- package/dist/components/ui/password-input/password-input.js +15 -0
- package/dist/components/ui/password-input/password-input.js.map +1 -0
- package/package.json +1 -1
|
@@ -10,6 +10,8 @@ export * from "./button";
|
|
|
10
10
|
export type * from "./button";
|
|
11
11
|
export * from "./input";
|
|
12
12
|
export type * from "./input";
|
|
13
|
+
export * from "./password-input";
|
|
14
|
+
export type * from "./password-input";
|
|
13
15
|
export * from "./file-input";
|
|
14
16
|
export type * from "./file-input";
|
|
15
17
|
export * from "./label";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/ui/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AAGxB,cAAc,SAAS,CAAC;AAGxB,cAAc,mBAAmB,CAAC;AAGlC,cAAc,0BAA0B,CAAC;AAGzC,cAAc,UAAU,CAAC;AAGzB,cAAc,SAAS,CAAC;AAGxB,cAAc,cAAc,CAAC;AAG7B,cAAc,SAAS,CAAC;AAGxB,cAAc,SAAS,CAAC;AAExB,cAAc,WAAW,CAAC;AAG1B,cAAc,YAAY,CAAC;AAG3B,cAAc,QAAQ,CAAC;AAGvB,cAAc,QAAQ,CAAC;AAGvB,cAAc,aAAa,CAAC;AAG5B,cAAc,iBAAiB,CAAC;AAGhC,cAAc,WAAW,CAAC;AAG1B,cAAc,mBAA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AAGhC,cAAc,WAAW,CAAC;AAG1B,cAAc,mBAAmB,CAAC;AAGlC,cAAc,UAAU,CAAC;AAGzB,cAAc,WAAW,CAAC;AAG1B,cAAc,WAAW,CAAC;AAG1B,cAAc,SAAS,CAAC;AAGxB,cAAc,aAAa,CAAC;AAG5B,cAAc,YAAY,CAAC;AAG3B,cAAc,YAAY,CAAC;AAG3B,cAAc,cAAc,CAAC;AAG7B,cAAc,eAAe,CAAC;AAG9B,cAAc,YAAY,CAAC;AAG3B,cAAc,2BAA2B,CAAC;AAG1C,cAAc,kBAAkB,CAAC;AAGjC,cAAc,gBAAgB,CAAC;AAG/B,cAAc,eAAe,CAAC;AAG9B,cAAc,WAAW,CAAC;AAG1B,cAAc,gBAAgB,CAAC;AAG/B,cAAc,cAAc,CAAC;AAG7B,cAAc,SAAS,CAAC;AAGxB,cAAc,UAAU,CAAC;AAGzB,cAAc,eAAe,CAAC;AAG9B,cAAc,qBAAqB,CAAC;AAGpC,cAAc,oBAAoB,CAAC;AAGnC,cAAc,mBAAmB,CAAC;AAGlC,cAAc,QAAQ,CAAC;AAGvB,cAAc,QAAQ,CAAC;AAGvB,cAAc,UAAU,CAAC;AAGzB,cAAc,UAAU,CAAC;AAGzB,cAAc,gBAAgB,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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/ui/password-input/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AAEjC,OAAO,EAAE,aAAa,IAAI,OAAO,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ReactElement } from "react";
|
|
2
|
+
import { type InputProps } from "../../ui/input";
|
|
3
|
+
export interface PasswordInputProps extends Omit<InputProps, "icon" | "rightButton" | "type"> {
|
|
4
|
+
}
|
|
5
|
+
declare const PasswordInput: {
|
|
6
|
+
({ ...props }: PasswordInputProps): ReactElement;
|
|
7
|
+
displayName: string;
|
|
8
|
+
};
|
|
9
|
+
export { PasswordInput };
|
|
10
|
+
export default PasswordInput;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
import { Eye, EyeOff, KeyRound } from "lucide-react";
|
|
5
|
+
import { Input } from "../../ui/input";
|
|
6
|
+
import { Button } from "../../ui/button";
|
|
7
|
+
const PasswordInput = ({ ...props }) => {
|
|
8
|
+
const [visible, setVisible] = useState(false);
|
|
9
|
+
const ToggleIcon = visible ? EyeOff : Eye;
|
|
10
|
+
return (_jsx(Input, { type: visible ? "text" : "password", icon: KeyRound, rightButton: _jsx(Button, { type: "button", variant: "ghost", size: "icon", className: "h-8 w-8 mr-1", onClick: () => setVisible((prev) => !prev), "aria-label": visible ? "Hide password" : "Show password", children: _jsx(ToggleIcon, { className: "h-4 w-4" }) }), ...props }));
|
|
11
|
+
};
|
|
12
|
+
PasswordInput.displayName = "PasswordInput";
|
|
13
|
+
export { PasswordInput };
|
|
14
|
+
export default PasswordInput;
|
|
15
|
+
//# sourceMappingURL=password-input.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"password-input.js","sourceRoot":"","sources":["../../../../src/components/ui/password-input/password-input.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,QAAQ,EAAqB,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAErD,OAAO,EAAE,KAAK,EAAmB,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAKhD,MAAM,aAAa,GAAG,CAAC,EACrB,GAAG,KAAK,EACW,EAAgB,EAAE;IACrC,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAU,KAAK,CAAC,CAAC;IAEvD,MAAM,UAAU,GAAG,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC;IAE1C,OAAO,CACL,KAAC,KAAK,IACJ,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,UAAU,EACnC,IAAI,EAAE,QAAQ,EACd,WAAW,EACT,KAAC,MAAM,IACL,IAAI,EAAC,QAAQ,EACb,OAAO,EAAC,OAAO,EACf,IAAI,EAAC,MAAM,EACX,SAAS,EAAC,cAAc,EACxB,OAAO,EAAE,GAAS,EAAE,CAAC,UAAU,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,gBACpC,OAAO,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,eAAe,YAEvD,KAAC,UAAU,IAAC,SAAS,EAAC,SAAS,GAAG,GAC3B,KAEP,KAAK,GACT,CACH,CAAC;AACJ,CAAC,CAAC;AACF,aAAa,CAAC,WAAW,GAAG,eAAe,CAAC;AAE5C,OAAO,EAAE,aAAa,EAAE,CAAC;AAEzB,eAAe,aAAa,CAAC"}
|