first commit
Some checks failed
tests / ci (8.5) (push) Has been cancelled
linter / quality (push) Has been cancelled
tests / ci (8.3) (push) Has been cancelled
tests / ci (8.4) (push) Has been cancelled

This commit is contained in:
brusnitsyn
2026-04-03 17:20:05 +09:00
commit 3edc8e667e
358 changed files with 39258 additions and 0 deletions

View File

@@ -0,0 +1,46 @@
<script setup lang="ts">
import { Eye, EyeOff } from 'lucide-vue-next';
import { ref, useTemplateRef } from 'vue';
import type { HTMLAttributes } from 'vue';
import { Input } from '@/components/ui/input';
import { cn } from '@/lib/utils';
defineOptions({ inheritAttrs: false });
const props = defineProps<{
class?: HTMLAttributes['class'];
}>();
const showPassword = ref(false);
const inputRef = useTemplateRef('inputRef');
defineExpose({
$el: inputRef,
focus: () => inputRef.value?.$el?.focus(),
});
</script>
<template>
<div class="relative">
<Input
ref="inputRef"
:type="showPassword ? 'text' : 'password'"
:class="cn('pr-10', props.class)"
v-bind="$attrs"
/>
<button
type="button"
@click="showPassword = !showPassword"
:class="
cn(
'absolute inset-y-0 right-0 flex items-center rounded-r-md px-3 text-muted-foreground hover:text-foreground focus-visible:ring-[3px] focus-visible:ring-ring focus-visible:outline-none',
)
"
:aria-label="showPassword ? 'Hide password' : 'Show password'"
:tabindex="-1"
>
<EyeOff v-if="showPassword" class="size-4" />
<Eye v-else class="size-4" />
</button>
</div>
</template>