| | |
| | | <script setup lang="ts"> |
| | | import { ref, useSlots } from 'vue'; |
| | | |
| | | import { Eye, EyeOff } from '..\..\..\..\..\base\icons\src'; |
| | | import { cn } from '..\..\..\..\..\base\shared\src\utils'; |
| | | import { Eye, EyeOff } from '../../../../../base/icons/src'; |
| | | import { cn } from '../../../../../base/shared/src/utils'; |
| | | |
| | | import { Input } from '../../ui'; |
| | | import PasswordStrength from './password-strength.vue'; |
| | |
| | | <slot name="strengthText"> </slot> |
| | | </p> |
| | | </template> |
| | | <div |
| | | <button |
| | | :class="{ |
| | | 'top-3': !!passwordStrength, |
| | | 'top-1/2 -translate-y-1/2 items-center': !passwordStrength, |
| | | }" |
| | | class="text-foreground/60 hover:text-foreground absolute inset-y-0 right-0 flex cursor-pointer pr-3 text-lg leading-5" |
| | | type="button" |
| | | aria-label="切换密码可见性" |
| | | class="text-foreground/60 hover:text-foreground absolute inset-y-0 right-0 flex cursor-pointer rounded-sm border-0 bg-transparent p-0 pr-3 text-lg leading-5 focus-visible:ring-2 focus-visible:ring-emerald-500/50 focus-visible:outline-none" |
| | | @click="show = !show" |
| | | > |
| | | <Eye v-if="show" class="size-4" /> |
| | | <EyeOff v-else class="size-4" /> |
| | | </div> |
| | | </button> |
| | | </div> |
| | | </template> |