Commit 22f39f1
authored
🎨 Palette: Add password visibility toggle (#212)
* feat: add password visibility toggle to Input component
- Added Eye/EyeOff icons from lucide-react
- Implemented state to toggle input type
- Added proper aria-labels for accessibility
- Styled for both Neo and Glass themes
* fix: associate label with input using useId
- Addressed review comment to improve accessibility
- Used React.useId() to generate unique IDs for inputs
- Linked label and input via htmlFor/id attributes
- Preserved existing ID prop behavior
* fix: destructure id prop in Input component
- Destructure id from props to prevent override issues
- Ensure inputId is correctly determined from props or generated
- Clean up props spreading on input element
---------
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>1 parent a035ec0 commit 22f39f1
2 files changed
+37
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
10 | | - | |
| 11 | + | |
11 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
12 | 19 | | |
13 | 20 | | |
14 | 21 | | |
| |||
18 | 25 | | |
19 | 26 | | |
20 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
21 | 32 | | |
22 | 33 | | |
23 | | - | |
24 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
25 | 57 | | |
26 | 58 | | |
27 | 59 | | |
| |||
0 commit comments