@equal-experts/kuat-react 0.14.0-beta.0 → 0.14.0-beta.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
|
@@ -53,23 +53,34 @@ Add this to your project `AGENTS.md` (or `.cursorrules`) so agent workflows stay
|
|
|
53
53
|
### Peer dependencies
|
|
54
54
|
|
|
55
55
|
Install peers for the components you use before running `dev` or `build`.
|
|
56
|
+
`react`/`react-dom` are always required. Embla (carousel) and Sonner ship as
|
|
57
|
+
bundled dependencies, so you don't install those.
|
|
56
58
|
|
|
57
|
-
| Components you use |
|
|
59
|
+
| Components you use | Peers to install |
|
|
58
60
|
|---|---|
|
|
59
|
-
| `Button`, `
|
|
60
|
-
| `Accordion` | `@radix-ui/react-accordion` |
|
|
61
|
+
| `Button`, `ButtonGroup`, `IconButton` | `@radix-ui/react-slot` |
|
|
62
|
+
| `Accordion` | `@radix-ui/react-accordion`, `lucide-react` |
|
|
61
63
|
| `AlertDialog` | `@radix-ui/react-alert-dialog` |
|
|
62
|
-
| `Select`
|
|
63
|
-
| `
|
|
64
|
-
| `
|
|
64
|
+
| `Select` | `@radix-ui/react-select`, `lucide-react` |
|
|
65
|
+
| `DropdownMenu` | `@radix-ui/react-dropdown-menu`, `lucide-react` |
|
|
66
|
+
| `Checkbox` / `CheckboxField` | `@radix-ui/react-checkbox`, `lucide-react` |
|
|
67
|
+
| `Radio` / `RadioField` | `@radix-ui/react-radio-group` |
|
|
65
68
|
| `Switch` / `SwitchField` | `@radix-ui/react-switch` |
|
|
66
|
-
| `Toggle
|
|
67
|
-
| `
|
|
69
|
+
| `Toggle`, `ToggleGroup` | `@radix-ui/react-toggle`, `@radix-ui/react-toggle-group` |
|
|
70
|
+
| `Separator` | `@radix-ui/react-separator` |
|
|
71
|
+
| `Carousel`, `KuatCarousel` | `lucide-react` |
|
|
72
|
+
| `Breadcrumb`, `KuatHeader` | `lucide-react` |
|
|
73
|
+
| `Sonner` | — (bundled, no peer to install) |
|
|
74
|
+
| `Badge`, `Field`, `Input`, `Textarea`, `ContentCard`, `KuatRadialProgress` | none |
|
|
75
|
+
|
|
76
|
+
> **Tip:** if you use the Kuat agent plugin in Claude Code, run
|
|
77
|
+
> `/kuat-add <component>` to add a component and install its peers automatically,
|
|
78
|
+
> instead of wiring the table above by hand.
|
|
68
79
|
|
|
69
80
|
Example peer install for a broad setup:
|
|
70
81
|
|
|
71
82
|
```bash
|
|
72
|
-
pnpm add @radix-ui/react-slot @radix-ui/react-accordion @radix-ui/react-alert-dialog @radix-ui/react-select @radix-ui/react-separator @radix-ui/react-checkbox @radix-ui/react-radio-group @radix-ui/react-switch @radix-ui/react-toggle @radix-ui/react-toggle-group lucide-react
|
|
83
|
+
pnpm add @radix-ui/react-slot @radix-ui/react-accordion @radix-ui/react-alert-dialog @radix-ui/react-select @radix-ui/react-dropdown-menu @radix-ui/react-separator @radix-ui/react-checkbox @radix-ui/react-radio-group @radix-ui/react-switch @radix-ui/react-toggle @radix-ui/react-toggle-group lucide-react
|
|
73
84
|
```
|
|
74
85
|
|
|
75
86
|
---
|
|
@@ -124,63 +135,52 @@ import { KuatCarousel } from '@equal-experts/kuat-react/kuat-carousel';
|
|
|
124
135
|
|
|
125
136
|
## Recommended setup
|
|
126
137
|
|
|
127
|
-
### 1. Tailwind
|
|
128
|
-
|
|
129
|
-
```typescript
|
|
130
|
-
// tailwind.config.ts
|
|
131
|
-
import type { Config } from 'tailwindcss';
|
|
132
|
-
import kuatPreset from '@equal-experts/kuat-core';
|
|
133
|
-
|
|
134
|
-
export default {
|
|
135
|
-
presets: [kuatPreset],
|
|
136
|
-
content: [
|
|
137
|
-
'./src/**/*.{js,ts,jsx,tsx}',
|
|
138
|
-
'./node_modules/@equal-experts/kuat-react/**/*.{js,ts,jsx,tsx}',
|
|
139
|
-
],
|
|
140
|
-
} satisfies Config;
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
### 2. Tailwind runtime stylesheet (required for Tailwind v4)
|
|
138
|
+
### 1. Tailwind v4 + Kuat tokens (CSS-first)
|
|
144
139
|
|
|
145
|
-
|
|
140
|
+
Add the Tailwind v4 plugin to your build (e.g. `@tailwindcss/vite`), then create
|
|
141
|
+
a global stylesheet that imports Tailwind and the Kuat tokens. The tokens must
|
|
142
|
+
be pulled in **through Tailwind** (a CSS `@import`) so the `@theme` block in
|
|
143
|
+
`variables.css` is processed and the token utilities (`bg-primary`,
|
|
144
|
+
`text-foreground`, `rounded-lg`, …) are generated:
|
|
146
145
|
|
|
147
146
|
```css
|
|
148
|
-
/* src/
|
|
147
|
+
/* src/index.css */
|
|
148
|
+
@import "@equal-experts/kuat-core/fonts.css"; /* fonts; or a <link> — see kuat-core README */
|
|
149
149
|
@import "tailwindcss";
|
|
150
|
+
@import "@equal-experts/kuat-core/variables.css";
|
|
150
151
|
```
|
|
151
152
|
|
|
152
|
-
|
|
153
|
+
> A plain JS `import "@equal-experts/kuat-core/variables.css"` loads the raw
|
|
154
|
+
> variables but does **not** feed the `@theme` block to Tailwind, so the token
|
|
155
|
+
> utilities never generate (with no error). Always `@import` the tokens through
|
|
156
|
+
> Tailwind, as above.
|
|
157
|
+
>
|
|
158
|
+
> The legacy JS preset (`presets: [kuatPreset]`) is **deprecated** and is not
|
|
159
|
+
> auto-loaded by Tailwind v4 — don't use it. See the kuat-core README.
|
|
160
|
+
|
|
161
|
+
### 2. Component styles (once per app entrypoint)
|
|
162
|
+
|
|
163
|
+
Kuat component CSS is pre-compiled, so a JS import is correct here:
|
|
153
164
|
|
|
154
165
|
```typescript
|
|
155
166
|
// main.tsx
|
|
156
|
-
import '@equal-experts/kuat-
|
|
157
|
-
import '
|
|
158
|
-
import './
|
|
159
|
-
import './app.css';
|
|
167
|
+
import '@equal-experts/kuat-react/styles'; // pre-compiled component CSS
|
|
168
|
+
import './index.css'; // Tailwind + Kuat tokens (from step 1)
|
|
169
|
+
import './app.css'; // your app styles, last
|
|
160
170
|
```
|
|
161
171
|
|
|
162
|
-
Import order matters: load Kuat
|
|
172
|
+
Import order matters: load Kuat styles before app-specific styles.
|
|
163
173
|
|
|
164
174
|
If you scaffolded from a starter template (for example Vite), remove or neutralize template CSS that resets fonts/layout globally (for example `src/index.css` with `:root { font: ... }`, `body { ... }`, `#root { ... }`). These rules can override Kuat typography and spacing.
|
|
165
175
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
```typescript
|
|
169
|
-
// Keep in main.tsx
|
|
170
|
-
import '@equal-experts/kuat-core/variables.css';
|
|
171
|
-
import '@equal-experts/kuat-react/styles';
|
|
172
|
-
import './tailwind.css';
|
|
173
|
-
// Remove template global CSS import if it overrides root/body fonts or layout
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
### 4. shadcn for gaps only
|
|
176
|
+
### 3. shadcn for gaps only
|
|
177
177
|
|
|
178
178
|
```bash
|
|
179
179
|
npx shadcn@latest init
|
|
180
180
|
npx shadcn@latest add dialog dropdown-menu # examples — skip `button` if you use Kuat Button
|
|
181
181
|
```
|
|
182
182
|
|
|
183
|
-
###
|
|
183
|
+
### 4. Use Kuat + shadcn together
|
|
184
184
|
|
|
185
185
|
```tsx
|
|
186
186
|
import { Button, ButtonGroup, Field } from '@equal-experts/kuat-react';
|
|
@@ -242,7 +242,7 @@ Use this quick smoke test after installation to verify imports, styles, and Tail
|
|
|
242
242
|
### 1. Add a smoke component
|
|
243
243
|
|
|
244
244
|
```tsx
|
|
245
|
-
import { Button, Field, KuatCarousel, KuatCarouselContent, KuatCarouselItem } from '@equal-experts/kuat-react';
|
|
245
|
+
import { Button, Field, FieldLabel, Input, KuatCarousel, KuatCarouselContent, KuatCarouselItem } from '@equal-experts/kuat-react';
|
|
246
246
|
|
|
247
247
|
export function KuatInstallSmoke() {
|
|
248
248
|
return (
|
|
@@ -250,8 +250,8 @@ export function KuatInstallSmoke() {
|
|
|
250
250
|
<h1 className="text-4xl font-bold">Kuat install smoke test</h1>
|
|
251
251
|
|
|
252
252
|
<Field>
|
|
253
|
-
<
|
|
254
|
-
<
|
|
253
|
+
<FieldLabel htmlFor="name">Name</FieldLabel>
|
|
254
|
+
<Input id="name" placeholder="Test input" />
|
|
255
255
|
</Field>
|
|
256
256
|
|
|
257
257
|
<Button variant="primary">Primary action</Button>
|
package/agent-docs/AGENTS.md
CHANGED
|
@@ -4,7 +4,7 @@ Rules for this install live under `agent-docs/` in `@equal-experts/kuat-core`, `
|
|
|
4
4
|
|
|
5
5
|
1. Run `ensure-rules.sh` from kuat-agent-docs skills (symlinked) — expect `RULES_SOURCE=package` when cwd has node_modules.
|
|
6
6
|
2. Load `agent-docs/rules/LOADING-consumer.md`.
|
|
7
|
-
3. Load component guides via `agent-docs/components.manifest.json`.
|
|
7
|
+
3. Load component guides via `agent-docs/components/components.manifest.json`.
|
|
8
8
|
4. Skills: `kuat-review`, `kuat-create` from [kuat-agent-docs](https://github.com/equalexperts/kuat-agent-docs).
|
|
9
9
|
|
|
10
|
-
**Version:** 0.14.0-beta.
|
|
10
|
+
**Version:** 0.14.0-beta.2 · **Rules snapshot:** 9b0e773d809b
|
package/agent-docs/README.md
CHANGED
package/agent-docs/manifest.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
|
-
"packageVersion": "0.14.0-beta.
|
|
2
|
+
"packageVersion": "0.14.0-beta.2",
|
|
3
3
|
"rules": {
|
|
4
|
-
"snapshotRef": "
|
|
5
|
-
"snapshotDate": "2026-
|
|
4
|
+
"snapshotRef": "9b0e773d809beedff9cd663ecddc2b6be0b69897",
|
|
5
|
+
"snapshotDate": "2026-07-01T10:17:15.975Z",
|
|
6
6
|
"sourceRepo": "equalexperts/kuat-agent-docs",
|
|
7
7
|
"loadingPath": "agent-docs/rules/LOADING-consumer.md"
|
|
8
8
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as useEmblaCarousel, UseEmblaCarouselType } from 'embla-carousel-react';
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
type CarouselApi = UseEmblaCarouselType[1];
|
|
4
|
-
type CarouselOptions =
|
|
4
|
+
type CarouselOptions = Parameters<typeof useEmblaCarousel>[0];
|
|
5
5
|
type CarouselPlugins = Parameters<typeof useEmblaCarousel>[1];
|
|
6
6
|
type CarouselOrientation = "horizontal" | "vertical";
|
|
7
7
|
export type CarouselItemBasis = 1 | 2 | 3;
|