@elmethis/vue
@elmethis/vue
Vue 3 component library for elmethis.
Components and hooks follow the shared Elmethis component surface:
- design tokens come from
@elmethis/core(import "@elmethis/core/tokens.css"); - theming is native via CSS
light-dark()+color-scheme; - files are
kebab-case, styles use CSS Modules with the.elm-*class convention, and specs are co-located.
Authoring style
Components are authored in TSX, not single-file .vue components, to keep
the surface aligned with the React and Solid siblings. Each component is a
defineComponent whose setup
returns a render function:
import { defineComponent } from "vue";
import styles from "./elm-divider.module.css";
export const ElmDivider = defineComponent({
name: "ElmDivider",
inheritAttrs: false,
setup(_, { attrs }) {
return () => <hr class={styles["elm-divider"]} {...attrs} />;
},
});
TSX is compiled by @vitejs/plugin-vue-jsx; types/.d.ts are emitted with
vue-tsc. Note Vue JSX is its own dialect (class not className, slots as
child functions, v-model is manual modelValue + onUpdate:modelValue).
Scripts
| Script | Purpose |
|---|---|
pnpm dev |
Storybook dev server (port 19231) |
pnpm build |
Build the library (vite build) + types (vue-tsc) |
pnpm test.unit |
Unit specs (happy-dom + Vue Test Utils, SSR) |
pnpm test.browser |
Browser specs (real Chromium via Playwright) |
pnpm lint |
Oxlint |
pnpm lint.css |
Stylelint |
pnpm fmt |
Oxfmt |
Testing layers
*.spec.ts(x)→ unit (pnpm test.unit): pure logic, CSR via Vue Test Utils, and SSR viarenderToStringfromvue/server-renderer.*.browser.spec.tsx→ browser (pnpm test.browser): real Chromium, only for behavior the unit DOM can't fake (native<dialog>/focus/layout, real Web APIs,color-scheme).
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 0.23.0 | ^3.4.0 | ||
| 0.22.1 | ^3.4.0 | ||
| 0.22.0 | ^3.4.0 | ||
| 0.21.0 | ^3.4.0 | ||
| 0.20.0 | ^3.4.0 | ||
| 0.19.1 | ^3.4.0 | ||
| 0.19.0 | ^3.4.0 | ||
| 0.18.0 | ^3.4.0 | ||
| 0.17.0 | ^3.4.0 | ||
| 0.16.0 | ^3.4.0 | ||
| 0.15.0 | ^3.4.0 | ||
| 0.14.0 | ^3.4.0 | ||
| 0.13.0 | ^3.4.0 | ||
| 0.12.0 | ^3.4.0 | ||
| 0.11.0 | ^3.4.0 | ||
| 0.10.0 | ^3.4.0 | ||
| 0.9.0 | ^3.4.0 | ||
| 0.8.0 | ^3.4.0 | ||
| 0.7.0 | ^3.4.0 | ||
| 0.6.0 | ^3.4.0 | ||
| 0.5.1 | ^3.4.0 | ||
| 0.5.0 | ^3.4.0 | ||
| 0.4.2 | ^3.4.0 | ||
| 0.4.1 | ^3.4.0 | ||
| 0.4.0 | ^3.4.0 | ||
| 0.3.2 | ^3.4.0 | ||
| 0.3.1 | ^3.4.0 | ||
| 0.3.0 | ^3.4.0 | ||
| 0.2.12 | ^3.4.0 | ||
| 0.2.11 | ^3.4.0 |
Showing the latest 30 of 42. See every release on npm