feat: initialize Vue component library and aligned documentation

This commit is contained in:
maoyingjie
2026-10-21 09:06:28 +08:00
commit 9d40dc0ecb
149 changed files with 13208 additions and 0 deletions
@@ -0,0 +1,16 @@
<script setup lang="ts">
import { inject } from "vue";
import { switchKey } from "./context";
const ctx = inject(switchKey);
if (!ctx) throw new Error("SwitchControl must be inside Switch");
</script>
<template>
<span class="hv-switch__control" data-slot="switch-control">
<slot
:is-selected="ctx.checked.value"
:is-hovered="ctx.hovered.value"
:is-pressed="ctx.pressed.value"
:is-focus-visible="ctx.focusVisible.value"
/>
</span>
</template>