@equal-experts/kuat-vue 0.8.0 → 0.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -27,12 +27,39 @@ Vue 3 components and blocks for the Kuat Design System: **localized primitives**
27
27
  ## Installation
28
28
 
29
29
  ```bash
30
- pnpm add @equal-experts/kuat-core @equal-experts/kuat-vue
30
+ pnpm add vue @equal-experts/kuat-core @equal-experts/kuat-vue
31
+ ```
32
+
33
+ ### Agent Guardrails
34
+
35
+ Add this to your project `AGENTS.md` (or `.cursorrules`) so agent workflows stay Kuat-first:
36
+
37
+ ```markdown
38
+ ## Kuat UX and UI Decision Rules
39
+ 1. Load bundled rules entrypoints from `@equal-experts/kuat-core`:
40
+ - `node_modules/@equal-experts/kuat-core/agent-docs/kuat-docs/rules/README.md`
41
+ - `node_modules/@equal-experts/kuat-core/agent-docs/external/kuat-agent-rules/kuat-docs/rules/LOADING.md`
42
+ 2. Use bundled Equal Experts foundations and web rules for wider UX/UI decisions (layout, navigation, hierarchy, spacing, typography, content, accessibility), not just component choice (`.../external/kuat-agent-rules/.../foundations/*` and `.../types/web/*`).
43
+ 3. For implementation, read `kuat-docs/setup/choosing-components.md` before building UI.
44
+ 4. Choose component sources in order: Kuat blocks -> Kuat components -> shadcn-vue gaps -> custom.
45
+ 5. Verify exports in `@equal-experts/kuat-vue` before implementing.
46
+ 6. Document both design decision rationale and chosen component source in PR notes.
31
47
  ```
32
48
 
33
49
  ### Peer dependencies
34
50
 
35
- See this package’s `package.json` `peerDependencies` (for example `vue`, `radix-vue` / `reka-ui` as appropriate to your stack).
51
+ Install peers for the components you use before running `dev` or `build`.
52
+
53
+ | Components you use | Required peers |
54
+ |---|---|
55
+ | Core components (`Button`, `Field`, `Select`, `Switch`, `Accordion`) | `radix-vue`, `reka-ui`, `lucide-vue-next` |
56
+ | `Sonner` | `vue-sonner` |
57
+
58
+ Example peer install:
59
+
60
+ ```bash
61
+ pnpm add radix-vue reka-ui lucide-vue-next vue-sonner
62
+ ```
36
63
 
37
64
  ---
38
65
 
@@ -74,6 +101,16 @@ import { Switch } from '@equal-experts/kuat-vue/switch';
74
101
 
75
102
  See `package.json` `exports` and [public-api-inventory.md](https://github.com/equalexperts/kuat-mono/blob/master/kuat-docs/setup/public-api-inventory.md).
76
103
 
104
+ `KuatCarousel` is exported from both the root barrel and subpath:
105
+
106
+ ```vue
107
+ <script setup lang="ts">
108
+ import { KuatCarousel } from '@equal-experts/kuat-vue';
109
+ // or
110
+ // import { KuatCarousel } from '@equal-experts/kuat-vue/kuat-carousel';
111
+ </script>
112
+ ```
113
+
77
114
  ---
78
115
 
79
116
  ## Recommended setup
@@ -94,21 +131,34 @@ export default {
94
131
  } satisfies Config;
95
132
  ```
96
133
 
97
- ### 2. Design tokens
134
+ ### 2. Tailwind runtime stylesheet (required for Tailwind v4)
135
+
136
+ Create a global stylesheet and load Tailwind:
137
+
138
+ ```css
139
+ /* src/tailwind.css */
140
+ @import "tailwindcss";
141
+ ```
142
+
143
+ ### 3. Design tokens and Kuat styles
98
144
 
99
145
  ```typescript
100
146
  // main.ts
101
147
  import '@equal-experts/kuat-core/variables.css';
148
+ import '@equal-experts/kuat-vue/styles';
149
+ import './tailwind.css';
102
150
  ```
103
151
 
104
- ### 3. shadcn-vue for gaps
152
+ If you scaffolded from a starter template (for example Vite), remove or neutralize template CSS that resets fonts/layout globally (for example `src/style.css` with `:root { font: ... }`, `body { ... }`, `#app { ... }`). These rules can override Kuat typography and spacing.
153
+
154
+ ### 4. shadcn-vue for gaps
105
155
 
106
156
  ```bash
107
157
  npx shadcn-vue@latest init
108
158
  npx shadcn-vue@latest add dialog dropdown-menu
109
159
  ```
110
160
 
111
- ### 4. Use Kuat + shadcn-vue together
161
+ ### 5. Use Kuat + shadcn-vue together
112
162
 
113
163
  ```vue
114
164
  <script setup lang="ts">
@@ -165,6 +215,66 @@ const containerClass = cn('bg-background text-foreground p-4', props.class);
165
215
 
166
216
  ---
167
217
 
218
+ ## Verification test (human or agent)
219
+
220
+ Use this quick smoke test after installation to verify imports, styles, and Tailwind are wired correctly.
221
+
222
+ ### 1. Add a smoke component
223
+
224
+ ```vue
225
+ <script setup lang="ts">
226
+ import {
227
+ Button,
228
+ Field,
229
+ KuatCarousel,
230
+ KuatCarouselContent,
231
+ KuatCarouselItem,
232
+ KuatCarouselPrevious,
233
+ KuatCarouselNext,
234
+ } from '@equal-experts/kuat-vue';
235
+ </script>
236
+
237
+ <template>
238
+ <main class="mx-auto max-w-4xl space-y-8 p-8">
239
+ <h1 class="text-4xl font-bold">Kuat install smoke test</h1>
240
+
241
+ <Field>
242
+ <label for="name">Name</label>
243
+ <input id="name" placeholder="Test input" />
244
+ </Field>
245
+
246
+ <Button variant="primary">Primary action</Button>
247
+
248
+ <KuatCarousel>
249
+ <KuatCarouselContent>
250
+ <KuatCarouselItem><div class="rounded border p-6">Slide 1</div></KuatCarouselItem>
251
+ <KuatCarouselItem><div class="rounded border p-6">Slide 2</div></KuatCarouselItem>
252
+ </KuatCarouselContent>
253
+ <KuatCarouselPrevious />
254
+ <KuatCarouselNext />
255
+ </KuatCarousel>
256
+ </main>
257
+ </template>
258
+ ```
259
+
260
+ ### 2. Run checks
261
+
262
+ ```bash
263
+ pnpm build
264
+ pnpm dev
265
+ ```
266
+
267
+ ### 3. Pass/fail criteria
268
+
269
+ - Pass: no unresolved import errors for `@equal-experts/kuat-vue/styles` or component imports.
270
+ - Pass: heading renders visibly larger and bold (`text-4xl font-bold` applied).
271
+ - Pass: `Button`, `Field`, and `KuatCarousel` render with Kuat styles (not plain browser defaults).
272
+ - Pass: typography uses Kuat font stack (Lexend for sans) rather than template defaults.
273
+ - Fail: any need to import internal `dist/*.css` files manually.
274
+ - Fail: selecting custom/shadcn-vue carousel without documenting why `@equal-experts/kuat-vue` carousel exports were not used.
275
+
276
+ ---
277
+
168
278
  ## Migration (legacy projects)
169
279
 
170
280
  **Prefer** imports from `@equal-experts/kuat-vue` for primitives this package publishes. Use **shadcn-vue** under `@/components/ui` for components **not** in Kuat (for example Dialog).