@equal-experts/kuat-react 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 +120 -7
- package/dist/accordion.js +6 -7
- package/dist/alert-dialog.js +13 -14
- package/dist/badge.js +3 -4
- package/dist/button-group.js +6 -7
- package/dist/button.js +3 -4
- package/dist/carousel-vRCoMeVE.js +1401 -0
- package/dist/carousel.d.ts +2 -0
- package/dist/carousel.js +9 -0
- package/dist/{checkbox-field-Bslh9sHw.js → checkbox-field-7OmstdY0.js} +1 -1
- package/dist/checkbox.js +6 -7
- package/dist/field.js +11 -12
- package/dist/index.d.ts +1 -13
- package/dist/index.js +448 -1839
- package/dist/input.js +5 -6
- package/dist/kuat-carousel-DsHwXGpb.js +16 -0
- package/dist/kuat-carousel.d.ts +2 -0
- package/dist/kuat-carousel.js +9 -0
- package/dist/kuat-radial-progress.js +1 -1
- package/dist/{radio-field-G8dvdsLE.js → radio-field-BD77QCpO.js} +1 -1
- package/dist/radio.js +6 -7
- package/dist/select.js +12 -13
- package/dist/sonner.js +1 -1
- package/dist/style.css +1 -0
- package/dist/style.css.d.ts +2 -0
- package/dist/{switch-field-Ce9CiRqk.js → switch-field-xn_CPJH7.js} +1 -1
- package/dist/switch.js +1 -1
- package/dist/textarea.js +1 -2
- package/dist/toggle-group.js +5 -6
- package/dist/toggle.js +6 -7
- package/package.json +17 -5
- package/dist/accordion.css +0 -1
- package/dist/alert-dialog.css +0 -1
- package/dist/badge.css +0 -1
- package/dist/button-group.css +0 -1
- package/dist/button.css +0 -1
- package/dist/checkbox-field.css +0 -1
- package/dist/constants.css +0 -1
- package/dist/field.css +0 -1
- package/dist/index.css +0 -1
- package/dist/input.css +0 -1
- package/dist/kuat-radial-progress.css +0 -1
- package/dist/radio-field.css +0 -1
- package/dist/select.css +0 -1
- package/dist/sonner-content.css +0 -1
- package/dist/styles.css +0 -1
- package/dist/switch-field.css +0 -1
- package/dist/textarea.css +0 -1
- /package/dist/{accordion-DwQCxX_5.js → accordion-CUlVo4uo.js} +0 -0
- /package/dist/{alert-dialog-CT9DCCMH.js → alert-dialog-yHaNWLGX.js} +0 -0
- /package/dist/{badge-Yftb6Tdy.js → badge-BZgdEQSD.js} +0 -0
- /package/dist/{button-DqdoNQqx.js → button-C0a1gFoV.js} +0 -0
- /package/dist/{button-group-BNfxHMty.js → button-group-enIzvVeN.js} +0 -0
- /package/dist/{constants-DHz0LWRt.js → constants-Cfitvm6L.js} +0 -0
- /package/dist/{field-DRLopwY4.js → field-CpIBifwy.js} +0 -0
- /package/dist/{input-2x92vprz.js → input-DmkHok33.js} +0 -0
- /package/dist/{kuat-radial-progress-B3nQqPFW.js → kuat-radial-progress-YcpYzHjk.js} +0 -0
- /package/dist/{select-Oz2Zj-L0.js → select-CkwcI4vN.js} +0 -0
- /package/dist/{sonner-content-B6xwQO7z.js → sonner-content-CXBD6jNn.js} +0 -0
- /package/dist/{textarea-DiU8h_H0.js → textarea-B0irOcAM.js} +0 -0
package/README.md
CHANGED
|
@@ -27,18 +27,47 @@ React 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-react
|
|
30
|
+
pnpm add react react-dom @equal-experts/kuat-core @equal-experts/kuat-react
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
You need **both** packages: core supplies CSS variables and the Tailwind preset; this package supplies components.
|
|
34
34
|
|
|
35
|
+
### Agent Guardrails
|
|
36
|
+
|
|
37
|
+
Add this to your project `AGENTS.md` (or `.cursorrules`) so agent workflows stay Kuat-first:
|
|
38
|
+
|
|
39
|
+
```markdown
|
|
40
|
+
## Kuat UI Component Selection Rules
|
|
41
|
+
1. Load bundled rules entrypoints from `@equal-experts/kuat-core`:
|
|
42
|
+
- `node_modules/@equal-experts/kuat-core/agent-docs/kuat-docs/rules/README.md`
|
|
43
|
+
- `node_modules/@equal-experts/kuat-core/agent-docs/external/kuat-agent-rules/kuat-docs/rules/LOADING.md`
|
|
44
|
+
2. Ensure decisions reference both bundled Equal Experts foundations and web rules (`.../external/kuat-agent-rules/.../foundations/*` and `.../types/web/*`).
|
|
45
|
+
3. Read `kuat-docs/setup/choosing-components.md` before building UI.
|
|
46
|
+
4. Choose sources in order: Kuat blocks -> Kuat components -> shadcn gaps -> custom.
|
|
47
|
+
5. Verify exports in `@equal-experts/kuat-react` before implementing.
|
|
48
|
+
6. Document the chosen source and any exception rationale in PR notes.
|
|
49
|
+
```
|
|
50
|
+
|
|
35
51
|
### Peer dependencies
|
|
36
52
|
|
|
37
|
-
|
|
53
|
+
Install peers for the components you use before running `dev` or `build`.
|
|
54
|
+
|
|
55
|
+
| Components you use | Required peers |
|
|
56
|
+
|---|---|
|
|
57
|
+
| `Button`, `KuatHeader` | `@radix-ui/react-slot`, `lucide-react` |
|
|
58
|
+
| `Accordion` | `@radix-ui/react-accordion` |
|
|
59
|
+
| `AlertDialog` | `@radix-ui/react-alert-dialog` |
|
|
60
|
+
| `Select` / `KuatSelect` | `@radix-ui/react-select`, `@radix-ui/react-separator` |
|
|
61
|
+
| `Checkbox` / `CheckboxField` | `@radix-ui/react-checkbox` |
|
|
62
|
+
| `RadioGroup` / `RadioField` | `@radix-ui/react-radio-group` |
|
|
63
|
+
| `Switch` / `SwitchField` | `@radix-ui/react-switch` |
|
|
64
|
+
| `Toggle` / `ToggleGroup` | `@radix-ui/react-toggle`, `@radix-ui/react-toggle-group` |
|
|
65
|
+
| `Sonner` | `sonner` |
|
|
66
|
+
|
|
67
|
+
Example peer install for a broad setup:
|
|
38
68
|
|
|
39
69
|
```bash
|
|
40
|
-
pnpm add react react-
|
|
41
|
-
# Add @radix-ui/* and lucide-react as needed for your components — see peerDependencies
|
|
70
|
+
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 sonner
|
|
42
71
|
```
|
|
43
72
|
|
|
44
73
|
---
|
|
@@ -81,6 +110,14 @@ import { KuatRadialProgress } from '@equal-experts/kuat-react/kuat-radial-progre
|
|
|
81
110
|
|
|
82
111
|
See [public-api-inventory.md](https://github.com/equalexperts/kuat-mono/blob/master/kuat-docs/setup/public-api-inventory.md) for the full subpath list.
|
|
83
112
|
|
|
113
|
+
`KuatCarousel` is exported from both the root barrel and subpath:
|
|
114
|
+
|
|
115
|
+
```tsx
|
|
116
|
+
import { KuatCarousel } from '@equal-experts/kuat-react';
|
|
117
|
+
// or
|
|
118
|
+
import { KuatCarousel } from '@equal-experts/kuat-react/kuat-carousel';
|
|
119
|
+
```
|
|
120
|
+
|
|
84
121
|
---
|
|
85
122
|
|
|
86
123
|
## Recommended setup
|
|
@@ -101,21 +138,47 @@ export default {
|
|
|
101
138
|
} satisfies Config;
|
|
102
139
|
```
|
|
103
140
|
|
|
104
|
-
### 2.
|
|
141
|
+
### 2. Tailwind runtime stylesheet (required for Tailwind v4)
|
|
142
|
+
|
|
143
|
+
Create a global stylesheet and load Tailwind:
|
|
144
|
+
|
|
145
|
+
```css
|
|
146
|
+
/* src/tailwind.css */
|
|
147
|
+
@import "tailwindcss";
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
### 3. Design tokens and Kuat styles (once per app entrypoint)
|
|
105
151
|
|
|
106
152
|
```typescript
|
|
107
153
|
// main.tsx
|
|
108
154
|
import '@equal-experts/kuat-core/variables.css';
|
|
155
|
+
import '@equal-experts/kuat-react/styles';
|
|
156
|
+
import './tailwind.css';
|
|
157
|
+
import './app.css';
|
|
109
158
|
```
|
|
110
159
|
|
|
111
|
-
|
|
160
|
+
Import order matters: load Kuat tokens and Kuat styles before app-specific styles.
|
|
161
|
+
|
|
162
|
+
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.
|
|
163
|
+
|
|
164
|
+
Typical cleanup for a smoke setup:
|
|
165
|
+
|
|
166
|
+
```typescript
|
|
167
|
+
// Keep in main.tsx
|
|
168
|
+
import '@equal-experts/kuat-core/variables.css';
|
|
169
|
+
import '@equal-experts/kuat-react/styles';
|
|
170
|
+
import './tailwind.css';
|
|
171
|
+
// Remove template global CSS import if it overrides root/body fonts or layout
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
### 4. shadcn for gaps only
|
|
112
175
|
|
|
113
176
|
```bash
|
|
114
177
|
npx shadcn@latest init
|
|
115
178
|
npx shadcn@latest add dialog dropdown-menu # examples — skip `button` if you use Kuat Button
|
|
116
179
|
```
|
|
117
180
|
|
|
118
|
-
###
|
|
181
|
+
### 5. Use Kuat + shadcn together
|
|
119
182
|
|
|
120
183
|
```tsx
|
|
121
184
|
import { Button, ButtonGroup, Field } from '@equal-experts/kuat-react';
|
|
@@ -170,6 +233,56 @@ export function Box({ className, ...props }: React.ComponentProps<'div'>) {
|
|
|
170
233
|
|
|
171
234
|
---
|
|
172
235
|
|
|
236
|
+
## Verification test (human or agent)
|
|
237
|
+
|
|
238
|
+
Use this quick smoke test after installation to verify imports, styles, and Tailwind are wired correctly.
|
|
239
|
+
|
|
240
|
+
### 1. Add a smoke component
|
|
241
|
+
|
|
242
|
+
```tsx
|
|
243
|
+
import { Button, Field, KuatCarousel, KuatCarouselContent, KuatCarouselItem } from '@equal-experts/kuat-react';
|
|
244
|
+
|
|
245
|
+
export function KuatInstallSmoke() {
|
|
246
|
+
return (
|
|
247
|
+
<div className="space-y-6 p-6">
|
|
248
|
+
<h1 className="text-4xl font-bold">Kuat install smoke test</h1>
|
|
249
|
+
|
|
250
|
+
<Field>
|
|
251
|
+
<label htmlFor="name">Name</label>
|
|
252
|
+
<input id="name" placeholder="Test input" />
|
|
253
|
+
</Field>
|
|
254
|
+
|
|
255
|
+
<Button variant="primary">Primary action</Button>
|
|
256
|
+
|
|
257
|
+
<KuatCarousel opts={{ loop: false }}>
|
|
258
|
+
<KuatCarouselContent>
|
|
259
|
+
<KuatCarouselItem>Slide 1</KuatCarouselItem>
|
|
260
|
+
<KuatCarouselItem>Slide 2</KuatCarouselItem>
|
|
261
|
+
</KuatCarouselContent>
|
|
262
|
+
</KuatCarousel>
|
|
263
|
+
</div>
|
|
264
|
+
);
|
|
265
|
+
}
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
### 2. Run checks
|
|
269
|
+
|
|
270
|
+
```bash
|
|
271
|
+
pnpm build
|
|
272
|
+
pnpm dev
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
### 3. Pass/fail criteria
|
|
276
|
+
|
|
277
|
+
- Pass: no unresolved import errors for `@equal-experts/kuat-react/styles` or component imports.
|
|
278
|
+
- Pass: heading renders visibly larger and bold (`text-4xl font-bold` applied).
|
|
279
|
+
- Pass: `Button`, `Field`, and `KuatCarousel` render with Kuat styles (not plain browser defaults).
|
|
280
|
+
- Pass: typography uses Kuat font stack (Lexend for sans) rather than template defaults.
|
|
281
|
+
- Fail: any need to import internal `dist/*.css` files manually.
|
|
282
|
+
- Fail: selecting custom/shadcn carousel without documenting why `@equal-experts/kuat-react` carousel exports were not used.
|
|
283
|
+
|
|
284
|
+
---
|
|
285
|
+
|
|
173
286
|
## Migration (legacy projects)
|
|
174
287
|
|
|
175
288
|
Older docs suggested installing **all** primitives via shadcn. Kuat now ships many components from this package.
|
package/dist/accordion.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { c as
|
|
2
|
-
|
|
3
|
-
import { A as i, c as t, a as e, b as s } from "./accordion-DwQCxX_5.js";
|
|
1
|
+
import { c as r } from "./utils-DLUjLwnh.js";
|
|
2
|
+
import { A as a, c as e, a as i, b as s } from "./accordion-CUlVo4uo.js";
|
|
4
3
|
export {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
a as Accordion,
|
|
5
|
+
e as AccordionContent,
|
|
6
|
+
i as AccordionItem,
|
|
8
7
|
s as AccordionTrigger,
|
|
9
|
-
|
|
8
|
+
r as cn
|
|
10
9
|
};
|
package/dist/alert-dialog.js
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import { c as
|
|
2
|
-
|
|
3
|
-
import { A as t, i, j as g, d as s, h as A, f as D, e as c, b as n, a as p, g as f, c as m } from "./alert-dialog-CT9DCCMH.js";
|
|
1
|
+
import { c as e } from "./utils-DLUjLwnh.js";
|
|
2
|
+
import { A as o, i as t, j as i, d as g, h as s, f as A, e as D, b as c, a as n, g as f, c as p } from "./alert-dialog-yHaNWLGX.js";
|
|
4
3
|
export {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
4
|
+
o as AlertDialog,
|
|
5
|
+
t as AlertDialogAction,
|
|
6
|
+
i as AlertDialogCancel,
|
|
7
|
+
g as AlertDialogContent,
|
|
8
|
+
s as AlertDialogDescription,
|
|
9
|
+
A as AlertDialogFooter,
|
|
10
|
+
D as AlertDialogHeader,
|
|
11
|
+
c as AlertDialogOverlay,
|
|
12
|
+
n as AlertDialogPortal,
|
|
14
13
|
f as AlertDialogTitle,
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
p as AlertDialogTrigger,
|
|
15
|
+
e as cn
|
|
17
16
|
};
|
package/dist/badge.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { c as e } from "./utils-DLUjLwnh.js";
|
|
2
|
-
|
|
3
|
-
import { B as t, b as m } from "./badge-Yftb6Tdy.js";
|
|
2
|
+
import { B as s, b as t } from "./badge-BZgdEQSD.js";
|
|
4
3
|
export {
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
s as Badge,
|
|
5
|
+
t as badgeVariants,
|
|
7
6
|
e as cn
|
|
8
7
|
};
|
package/dist/button-group.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { c as
|
|
2
|
-
|
|
3
|
-
import { B as u, a as n, b as s, c as e } from "./button-group-BNfxHMty.js";
|
|
1
|
+
import { c as r } from "./utils-DLUjLwnh.js";
|
|
2
|
+
import { B as u, a as p, b as n, c as s } from "./button-group-enIzvVeN.js";
|
|
4
3
|
export {
|
|
5
4
|
u as ButtonGroup,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
p as ButtonGroupSeparator,
|
|
6
|
+
n as ButtonGroupText,
|
|
7
|
+
s as buttonGroupVariants,
|
|
8
|
+
r as cn
|
|
10
9
|
};
|
package/dist/button.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { c as a } from "./utils-DLUjLwnh.js";
|
|
2
|
-
|
|
3
|
-
import { B as s, b as m } from "./button-DqdoNQqx.js";
|
|
2
|
+
import { B as n, b as s } from "./button-C0a1gFoV.js";
|
|
4
3
|
export {
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
n as Button,
|
|
5
|
+
s as buttonVariants,
|
|
7
6
|
a as cn
|
|
8
7
|
};
|