diff --git a/.cursor/rules/component-migration.md b/.cursor/rules/component-migration.md new file mode 100644 index 0000000..1c175c3 --- /dev/null +++ b/.cursor/rules/component-migration.md @@ -0,0 +1,32 @@ +--- +description: Component migration and primitive design guidelines for @trakli/ui-kit +globs: components/**/*.vue, composables/**/*.ts, utils/**/*.ts +--- + +# Component Migration & UI Kit Quality Rules + +When migrating components from `webui` into `@trakli/ui-kit`: + +1. **No String Concatenation for Copy (i18n)**: + - Do NOT construct text via template literals (`You don't have any ${pageName.toLowerCase()}...`). + - Expose explicit `title`, `description`, `actionLabel` props and slots (`#title`, `#description`, `#actions`) so consumers provide translated strings. + +2. **Self-Contained Static Assets**: + - Do NOT reference external public URLs like `/logo.svg` or `/_nuxt/logo.svg`. + - Bundle SVGs/images directly into `assets/` and import them statically (`import logoUrl from '../assets/logo.svg'`). + +3. **Strict Primitive Composition**: + - Do NOT render raw HTML interactive/layout tags (``, `