You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Export from *_constants.js: COMPONENT_SIZE_MODIFIERS object with both numeric and t-shirt keys.
Separation of Concerns
Template: Presentation only. No complex expressions (extract to computed). No API calls.
Script: All logic. Use composables for new reusable logic, mixins for legacy.
Styles: Component styles live in packages/dialtone-css/lib/build/less/components/{component-name}.less. Use Dialtone utility classes (d-*) in templates. Reference tokens via var(--dt-*). Never hardcode colors, spacing, or typography.
File Structure (per component directory)
component_name.vue — implementation
component_name_constants.js — exported constants
component_name.test.js — Vitest tests
component_name.stories.js — Storybook stories
component_name.mdx — Storybook docs
index.js — barrel export
utils.js — utility/helper functions (optional)
validators.js — prop/value validators (optional)
modules/ — sub-components for complex components (optional, e.g. emoji_picker, datepicker)
composables/ — composition functions (optional, e.g. useCalendar.js, useKeyboardNavigation.js)
6-Artifact Pipeline
When creating or updating a component, ALL must stay in sync:
Vue source in packages/dialtone-vue/components/
Tests (.test.js) using Vitest + @vue/test-utils
Storybook stories (.stories.js + .mdx)
Component docs JSON via scripts/build-dialtone-vue-docs.mjs
VuePress page in apps/dialtone-documentation/docs/components/
MCP server data via pnpm nx run dialtone-mcp-server:build