@brightweblabs/ui 0.2.0 → 0.3.1
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/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brightweblabs/ui",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.3.1",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"types": "./src/index.ts",
|
|
7
7
|
"files": [
|
|
@@ -35,13 +35,13 @@
|
|
|
35
35
|
"class-variance-authority": "^0.7.1",
|
|
36
36
|
"clsx": "^2.1.1",
|
|
37
37
|
"date-fns": "^4.1.0",
|
|
38
|
-
"lucide-react": "^0.
|
|
39
|
-
"next": "16.1.
|
|
38
|
+
"lucide-react": "^0.577.0",
|
|
39
|
+
"next": "16.1.6",
|
|
40
40
|
"next-themes": "^0.4.6",
|
|
41
41
|
"radix-ui": "^1.4.3",
|
|
42
|
-
"react": "19.2.
|
|
42
|
+
"react": "19.2.4",
|
|
43
43
|
"react-day-picker": "^9.13.2",
|
|
44
|
-
"react-dom": "19.2.
|
|
44
|
+
"react-dom": "19.2.4",
|
|
45
45
|
"recharts": "^2.15.4",
|
|
46
46
|
"sonner": "^2.0.7",
|
|
47
47
|
"tailwind-merge": "^3.4.0"
|
|
@@ -9,22 +9,24 @@ interface PasswordInputProps extends Omit<React.ComponentProps<"input">, "type">
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
const PasswordInput = React.forwardRef<HTMLInputElement, PasswordInputProps>(
|
|
12
|
-
({ className, showToggle = true, ...props }, ref) => {
|
|
12
|
+
({ className, disabled, showToggle = true, ...props }, ref) => {
|
|
13
13
|
const [showPassword, setShowPassword] = React.useState(false);
|
|
14
14
|
|
|
15
15
|
return (
|
|
16
|
-
<div className="relative">
|
|
16
|
+
<div className="relative w-full">
|
|
17
17
|
<Input
|
|
18
18
|
type={showPassword ? "text" : "password"}
|
|
19
|
-
className={cn("pr-
|
|
19
|
+
className={cn(showToggle && "pr-12", className)}
|
|
20
|
+
disabled={disabled}
|
|
20
21
|
ref={ref}
|
|
21
22
|
{...props}
|
|
22
23
|
/>
|
|
23
24
|
{showToggle && (
|
|
24
25
|
<button
|
|
25
26
|
type="button"
|
|
26
|
-
onClick={() => setShowPassword(!
|
|
27
|
-
className="absolute right-
|
|
27
|
+
onClick={() => setShowPassword((current) => !current)}
|
|
28
|
+
className="absolute right-2 top-1/2 flex size-8 -translate-y-1/2 items-center justify-center text-foreground/40 transition-colors hover:text-foreground/70 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/40 disabled:pointer-events-none disabled:opacity-50"
|
|
29
|
+
disabled={disabled}
|
|
28
30
|
aria-label={showPassword ? "Ocultar palavra-passe" : "Mostrar palavra-passe"}
|
|
29
31
|
tabIndex={-1}
|
|
30
32
|
>
|