Files
tools/vue/primitives/playground/src/views/Home.vue
T
robonen 626fbc70d8 fix(primitives): eslint/tsconfig migration, asChild refactor, type fixes
- Migrate to eslint flat config + composite tsconfig.
- Complete the asChild→as="template" refactor (remove asChild prop + :as-child
  bindings across components, matching Primitive's slot model).
- Fix test type errors and source type-safety (useGraceArea hull/point math,
  FocusScope/util ref typing).

Note: ~53 vue-tsc errors remain (HTML attr/event passthrough typing on
transparent wrapper components + a couple of duplicate-export naming
collisions) — not gated by CI (build/lint/test green); pending a
component-attribute-typing design decision.
2026-06-07 16:29:56 +07:00

33 lines
1.5 KiB
Vue

<script setup lang="ts">
import { demos } from '../router';
</script>
<template>
<section class="max-w-3xl">
<h1 class="mb-2 mt-0 text-2xl font-semibold">
@robonen/primitives playground
</h1>
<p class="text-neutral-500 dark:text-neutral-400">
Pick a demo from the sidebar, or drop a new <code class="rounded border border-neutral-200 bg-white px-1.5 py-px text-xs dark:border-neutral-800 dark:bg-neutral-900">.vue</code> file into
<code class="rounded border border-neutral-200 bg-white px-1.5 py-px text-xs dark:border-neutral-800 dark:bg-neutral-900">src/demos/</code> it will be picked up automatically and become
addressable at <code class="rounded border border-neutral-200 bg-white px-1.5 py-px text-xs dark:border-neutral-800 dark:bg-neutral-900">/demo/&lt;FileName&gt;</code>.
</p>
<div class="mt-4 grid gap-2 grid-cols-[repeat(auto-fill,minmax(11.25rem,1fr))]">
<RouterLink
v-for="demo in demos"
:key="demo.name"
:to="demo.routePath"
class="grid gap-1 rounded-lg border border-neutral-200 bg-white p-3 no-underline hover:border-blue-600 dark:border-neutral-800 dark:bg-neutral-900 dark:hover:border-blue-400"
>
<strong>{{ demo.name }}</strong>
<code class="text-neutral-500 dark:text-neutral-400">{{ demo.routePath }}</code>
</RouterLink>
</div>
<p v-if="!demos.length" class="text-neutral-500 dark:text-neutral-400">
No demos found yet.
</p>
</section>
</template>