@equal-experts/kuat-react 0.4.2 → 0.5.0

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.
Files changed (61) hide show
  1. package/README.md +80 -120
  2. package/dist/checkbox-field-Bslh9sHw.js +65 -0
  3. package/dist/checkbox-field.css +1 -0
  4. package/dist/checkbox.d.ts +3 -0
  5. package/dist/checkbox.js +10 -0
  6. package/dist/components/ui/checkbox/checkbox-field.d.ts +23 -0
  7. package/dist/components/ui/checkbox/checkbox.d.ts +5 -0
  8. package/dist/components/ui/checkbox/index.d.ts +4 -0
  9. package/dist/components/ui/field/field.d.ts +28 -0
  10. package/dist/components/ui/field/index.d.ts +2 -0
  11. package/dist/components/ui/input/index.d.ts +2 -0
  12. package/dist/components/ui/input/input.d.ts +20 -0
  13. package/dist/components/ui/radio/index.d.ts +4 -0
  14. package/dist/components/ui/radio/radio-field.d.ts +25 -0
  15. package/dist/components/ui/radio/radio.d.ts +7 -0
  16. package/dist/components/ui/select/constants.d.ts +19 -0
  17. package/dist/components/ui/select/index.d.ts +3 -0
  18. package/dist/components/ui/select/select.d.ts +53 -0
  19. package/dist/components/ui/switch/index.d.ts +4 -0
  20. package/dist/components/ui/switch/switch-field.d.ts +23 -0
  21. package/dist/components/ui/switch/switch.d.ts +5 -0
  22. package/dist/components/ui/textarea/index.d.ts +2 -0
  23. package/dist/components/ui/textarea/textarea.d.ts +9 -0
  24. package/dist/components/ui/toggle/constants.d.ts +4 -0
  25. package/dist/components/ui/toggle/index.d.ts +6 -0
  26. package/dist/components/ui/toggle/toggle-group.d.ts +11 -0
  27. package/dist/components/ui/toggle/toggle.d.ts +9 -0
  28. package/dist/constants-DHz0LWRt.js +49 -0
  29. package/dist/constants.css +1 -0
  30. package/dist/field-DRLopwY4.js +141 -0
  31. package/dist/field.css +1 -0
  32. package/dist/field.d.ts +3 -0
  33. package/dist/field.js +17 -0
  34. package/dist/index.d.ts +16 -0
  35. package/dist/index.js +785 -731
  36. package/dist/input-2x92vprz.js +43 -0
  37. package/dist/input.css +1 -0
  38. package/dist/input.d.ts +3 -0
  39. package/dist/input.js +8 -0
  40. package/dist/radio-field-G8dvdsLE.js +82 -0
  41. package/dist/radio-field.css +1 -0
  42. package/dist/radio.d.ts +3 -0
  43. package/dist/radio.js +11 -0
  44. package/dist/select-Oz2Zj-L0.js +232 -0
  45. package/dist/select.css +1 -0
  46. package/dist/select.d.ts +3 -0
  47. package/dist/select.js +19 -0
  48. package/dist/styles.css +1 -1
  49. package/dist/switch-field-Ce9CiRqk.js +61 -0
  50. package/dist/switch-field.css +1 -0
  51. package/dist/switch.d.ts +1 -0
  52. package/dist/switch.js +7 -0
  53. package/dist/textarea-DiU8h_H0.js +19 -0
  54. package/dist/textarea.css +1 -0
  55. package/dist/textarea.d.ts +3 -0
  56. package/dist/textarea.js +8 -0
  57. package/dist/toggle-group.d.ts +3 -0
  58. package/dist/toggle-group.js +10 -0
  59. package/dist/toggle.d.ts +3 -0
  60. package/dist/toggle.js +9 -0
  61. package/package.json +47 -11
package/README.md CHANGED
@@ -1,24 +1,24 @@
1
1
  # @equal-experts/kuat-react
2
2
 
3
- Custom React components and blocks for the Kuat Design System.
3
+ React components and blocks for the Kuat Design System: **localized primitives** (forms, actions, feedback) and **composed blocks** (header, carousel, logo lockup, etc.). Use **`@equal-experts/kuat-core`** for tokens and the **shadcn CLI** only for UI that Kuat does not ship (for example Dialog, DropdownMenu, Tabs).
4
+
5
+ **When to import from here vs shadcn:** [Choosing components](https://github.com/equalexperts/kuat-mono/blob/master/kuat-docs/setup/choosing-components.md) · [Public API inventory](https://github.com/equalexperts/kuat-mono/blob/master/kuat-docs/setup/public-api-inventory.md)
4
6
 
5
7
  ---
6
8
 
7
9
  ## Architecture
8
10
 
9
- This package provides **custom components** and **blocks** that are unique to Kuat. It also provides a localized **Button** component. For other UI components (e.g. Dialog), install them via shadcn CLI with kuat-core theming.
10
-
11
11
  ```
12
12
  ┌─────────────────────────────────────────────────────┐
13
13
  │ Your Application │
14
14
  ├─────────────────────────────────────────────────────┤
15
- │ Kuat Blocks (from this package)
15
+ │ Kuat blocks (KuatHeader, KuatCarousel, ) ← This package
16
16
  ├─────────────────────────────────────────────────────┤
17
- │ Kuat Components (from this package)
17
+ │ Kuat primitives (Button, Field, Select, …) ← This package
18
18
  ├─────────────────────────────────────────────────────┤
19
- │ shadcn Components (installed directly)
19
+ │ shadcn-only components (Dialog, DropdownMenu, …) ← Installed in your app
20
20
  ├─────────────────────────────────────────────────────┤
21
- │ @equal-experts/kuat-core (design tokens)
21
+ │ @equal-experts/kuat-core
22
22
  └─────────────────────────────────────────────────────┘
23
23
  ```
24
24
 
@@ -27,66 +27,65 @@ This package provides **custom components** and **blocks** that are unique to Ku
27
27
  ## Installation
28
28
 
29
29
  ```bash
30
- # Using pnpm (recommended)
31
- pnpm add @equal-experts/kuat-react
30
+ pnpm add @equal-experts/kuat-core @equal-experts/kuat-react
31
+ ```
32
32
 
33
- # Using npm
34
- npm install @equal-experts/kuat-react
33
+ You need **both** packages: core supplies CSS variables and the Tailwind preset; this package supplies components.
35
34
 
36
- # Using yarn
37
- yarn add @equal-experts/kuat-react
38
- ```
35
+ ### Peer dependencies
39
36
 
40
- ### Peer Dependencies
37
+ `react` and `react-dom` are required. Radix UI and other peers are listed in this package’s `package.json` under `peerDependencies`—install the primitives that match the components you use.
41
38
 
42
39
  ```bash
43
- pnpm add react react-dom @radix-ui/react-slot
40
+ pnpm add react react-dom
41
+ # Add @radix-ui/* and lucide-react as needed for your components — see peerDependencies
44
42
  ```
45
43
 
46
44
  ---
47
45
 
48
- ## What's Included
49
-
50
- ### Custom Components
46
+ ## Whats included
51
47
 
52
- Components unique to Kuat, not available in shadcn:
48
+ ### Utilities
53
49
 
54
- | Component | Description |
55
- |-----------|-------------|
56
- | `Button` | Primary actions with variant (primary, secondary, outline, ghost, ghost-muted, destructive) and color |
57
- | `ButtonGroup` | Groups buttons together with proper styling |
58
- | `ButtonGroupText` | Text element within a button group |
59
- | `ButtonGroupSeparator` | Separator between button group items |
50
+ | Export | Description |
51
+ |--------|-------------|
52
+ | `cn` | `clsx` + `tailwind-merge` helper |
60
53
 
61
- ### Blocks (Coming Soon)
54
+ ### Blocks and layout
62
55
 
63
- Pre-built compositions for common patterns:
56
+ | Area | Examples |
57
+ |------|----------|
58
+ | Header / brand | `KuatHeader`, `EELogo`, `EELogoIcon` |
59
+ | Carousel | `KuatCarousel`, `KuatCarouselContent`, `KuatCarouselItem`, `KuatCarouselPrevious`, `KuatCarouselNext`, `useKuatCarousel` |
60
+ | Logo lockup | `KuatLogoLockup` |
61
+ | Progress | `KuatRadialProgress` |
62
+ | Cards | `ContentCard` |
64
63
 
65
- | Block | Description |
66
- |-------|-------------|
67
- | `KuatHeader` | Brand header with logo, navigation, actions |
68
- | `KuatFooter` | Brand footer with links and legal |
69
- | `KuatSearchPattern` | Search input with suggestions |
64
+ ### Form and actions
70
65
 
71
- ### Utilities
66
+ `Button`, `ButtonGroup`, `ButtonGroupText`, `ButtonGroupSeparator`, `Badge`, `Input`, `Textarea`, `Field` (+ subcomponents), `Select` / `KuatSelect` (+ Select primitives), `Checkbox` / `CheckboxField`, `RadioGroup` / `RadioField`, `Switch` / `SwitchField`, `Toggle`, `ToggleGroup`.
72
67
 
73
- | Utility | Description |
74
- |---------|-------------|
75
- | `cn()` | Class name merger using clsx + tailwind-merge |
68
+ ### Content and navigation
76
69
 
77
- ---
70
+ `Accordion`, `AlertDialog` (+ primitives), `Breadcrumb`.
78
71
 
79
- ## Recommended Setup
72
+ Interactive API details live in **Storybook** in this repo (`apps/storybook-react`).
80
73
 
81
- For the best experience, combine this package with kuat-core and shadcn:
74
+ ### Tree-shakable subpath imports
82
75
 
83
- ### Step 1: Install Dependencies
76
+ `package.json` exposes subpaths such as `./button`, `./field`, `./switch`, `./kuat-radial-progress`, etc. Example:
84
77
 
85
- ```bash
86
- pnpm add @equal-experts/kuat-core @equal-experts/kuat-react
78
+ ```tsx
79
+ import { KuatRadialProgress } from '@equal-experts/kuat-react/kuat-radial-progress';
87
80
  ```
88
81
 
89
- ### Step 2: Configure Tailwind
82
+ 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
+
84
+ ---
85
+
86
+ ## Recommended setup
87
+
88
+ ### 1. Tailwind
90
89
 
91
90
  ```typescript
92
91
  // tailwind.config.ts
@@ -102,36 +101,33 @@ export default {
102
101
  } satisfies Config;
103
102
  ```
104
103
 
105
- ### Step 3: Import Styles
104
+ ### 2. Design tokens (once per app)
106
105
 
107
106
  ```typescript
108
- // main.tsx – design tokens (required once per app)
107
+ // main.tsx
109
108
  import '@equal-experts/kuat-core/variables.css';
110
109
  ```
111
110
 
112
- Each Kuat component (e.g. `KuatRadialProgress`) includes its own CSS when you import it. To load only a specific component and its CSS, use a subpath: `import { KuatRadialProgress } from '@equal-experts/kuat-react/kuat-radial-progress'`.
113
-
114
- ### Step 4: Install shadcn Components
111
+ ### 3. shadcn for gaps only
115
112
 
116
113
  ```bash
117
114
  npx shadcn@latest init
118
- npx shadcn@latest add button dialog dropdown-menu
115
+ npx shadcn@latest add dialog dropdown-menu # examples — skip `button` if you use Kuat Button
119
116
  ```
120
117
 
121
- ### Step 5: Use Components Together
118
+ ### 4. Use Kuat + shadcn together
122
119
 
123
120
  ```tsx
124
- // Kuat custom components from this package
125
- import { ButtonGroup, ButtonGroupText, Button } from '@equal-experts/kuat-react';
121
+ import { Button, ButtonGroup, Field } from '@equal-experts/kuat-react';
122
+ import { Dialog, DialogContent, DialogTrigger } from '@/components/ui/dialog';
126
123
 
127
- // Other shadcn components from your local installation if needed
128
-
129
- function Example() {
124
+ export function Example() {
130
125
  return (
131
126
  <ButtonGroup>
132
- <Button variant="outline">Edit</Button>
133
- <Button variant="outline">Save</Button>
134
- <Button variant="destructive">Delete</Button>
127
+ <DialogTrigger asChild>
128
+ <Button variant="outline">Open</Button>
129
+ </DialogTrigger>
130
+ <Button>Save</Button>
135
131
  </ButtonGroup>
136
132
  );
137
133
  }
@@ -139,94 +135,61 @@ function Example() {
139
135
 
140
136
  ---
141
137
 
142
- ## Component Examples
138
+ ## Component examples
143
139
 
144
140
  ### ButtonGroup
145
141
 
146
- Groups buttons together with seamless borders:
147
-
148
142
  ```tsx
149
- import { ButtonGroup, Button } from '@equal-experts/kuat-react';
143
+ import { ButtonGroup, ButtonGroupText, Button } from '@equal-experts/kuat-react';
150
144
 
151
- // Horizontal (default)
152
145
  <ButtonGroup>
153
146
  <Button variant="outline">Left</Button>
154
- <Button variant="outline">Center</Button>
155
147
  <Button variant="outline">Right</Button>
156
148
  </ButtonGroup>
157
149
 
158
- // Vertical
159
150
  <ButtonGroup orientation="vertical">
160
151
  <Button variant="outline">Top</Button>
161
- <Button variant="outline">Middle</Button>
162
152
  <Button variant="outline">Bottom</Button>
163
153
  </ButtonGroup>
164
154
 
165
- // With text label
166
155
  <ButtonGroup>
167
156
  <ButtonGroupText>Filter:</ButtonGroupText>
168
157
  <Button variant="outline">All</Button>
169
- <Button variant="outline">Active</Button>
170
- <Button variant="outline">Completed</Button>
171
158
  </ButtonGroup>
172
159
  ```
173
160
 
174
- ### cn() Utility
175
-
176
- Merge class names with Tailwind conflict resolution:
161
+ ### `cn()` utility
177
162
 
178
163
  ```tsx
179
164
  import { cn } from '@equal-experts/kuat-react';
180
165
 
181
- function MyComponent({ className, ...props }) {
182
- return (
183
- <div
184
- className={cn(
185
- 'bg-background text-foreground p-4',
186
- className
187
- )}
188
- {...props}
189
- />
190
- );
166
+ export function Box({ className, ...props }: React.ComponentProps<'div'>) {
167
+ return <div className={cn('bg-background p-4', className)} {...props} />;
191
168
  }
192
169
  ```
193
170
 
194
171
  ---
195
172
 
196
- ## Migration Guide
173
+ ## Migration (legacy projects)
197
174
 
198
- If you were importing standard components from this package, migrate to direct shadcn installation:
175
+ Older docs suggested installing **all** primitives via shadcn. Kuat now ships many components from this package.
199
176
 
200
- ### Before (Deprecated)
177
+ **Prefer**
201
178
 
202
- ```tsx
203
- import { Button, Dialog } from '@equal-experts/kuat-react';
204
- ```
205
-
206
- ### After (Recommended)
207
-
208
- ```tsx
209
- // Standard components from your local shadcn installation
210
- import { Button } from '@/components/ui/button';
211
- import { Dialog } from '@/components/ui/dialog';
179
+ - `import { Button, Badge, Field, … } from '@equal-experts/kuat-react'` for published primitives.
180
+ - `import { } from '@/components/ui/dialog'` (etc.) only for **shadcn-only** pieces.
212
181
 
213
- // Kuat-specific components from this package (including Badge)
214
- import { ButtonGroup, Badge } from '@equal-experts/kuat-react';
215
- ```
182
+ **Dialog** is a typical shadcn-only import; **Button** should come from Kuat when you adopt the design system.
216
183
 
217
- ### Migration Steps
184
+ Steps:
218
185
 
219
- 1. Ensure `@equal-experts/kuat-core` is installed
220
- 2. Initialize shadcn: `npx shadcn@latest init`
221
- 3. Install needed components: `npx shadcn@latest add button dialog`
222
- 4. Update imports to use local components
223
- 5. Keep imports for Kuat-specific components (Button, ButtonGroup, Badge, etc.)
186
+ 1. Keep `@equal-experts/kuat-core` and add or update `@equal-experts/kuat-react`.
187
+ 2. Replace duplicate shadcn copies of Kuat primitives with imports from this package where possible.
188
+ 3. Reserve `components/ui/` for components Kuat does not publish.
224
189
 
225
190
  ---
226
191
 
227
- ## TypeScript Support
228
-
229
- All components are fully typed:
192
+ ## TypeScript
230
193
 
231
194
  ```tsx
232
195
  import { ButtonGroup } from '@equal-experts/kuat-react';
@@ -237,25 +200,22 @@ type ButtonGroupProps = ComponentProps<typeof ButtonGroup>;
237
200
 
238
201
  ---
239
202
 
240
- ## Dark Mode
203
+ ## Dark mode
241
204
 
242
- Dark mode is supported via the `.dark` class on your root element:
205
+ Use the `.dark` class on the document root (or an ancestor). Tokens come from `kuat-core`.
243
206
 
244
207
  ```tsx
245
208
  <html className="dark">
246
- <body>
247
- <App />
248
- </body>
209
+ <body>{/* … */}</body>
249
210
  </html>
250
211
  ```
251
212
 
252
- Components automatically adapt when using kuat-core design tokens.
253
-
254
213
  ---
255
214
 
256
- ## Related Documentation
215
+ ## Related documentation
257
216
 
258
- - [Consumer Setup Guide](https://github.com/equalexperts/kuat-mono/blob/master/kuat-docs/setup/consumer-setup.md)
259
- - [kuat-core Integration](https://github.com/equalexperts/kuat-mono/blob/master/kuat-docs/setup/kuat-core-integration.md)
260
- - [Component Patterns](https://github.com/equalexperts/kuat-mono/blob/master/kuat-docs/rules/components/patterns.md)
261
- - [shadcn/ui Documentation](https://ui.shadcn.com)
217
+ - [Consumer setup](https://github.com/equalexperts/kuat-mono/blob/master/kuat-docs/setup/consumer-setup.md)
218
+ - [Choosing components](https://github.com/equalexperts/kuat-mono/blob/master/kuat-docs/setup/choosing-components.md)
219
+ - [kuat-core integration](https://github.com/equalexperts/kuat-mono/blob/master/kuat-docs/setup/kuat-core-integration.md)
220
+ - [Component patterns (contributors)](https://github.com/equalexperts/kuat-mono/blob/master/kuat-docs/rules/components/patterns.md)
221
+ - [shadcn/ui](https://ui.shadcn.com)
@@ -0,0 +1,65 @@
1
+ import { jsx as e, jsxs as o } from "react/jsx-runtime";
2
+ import * as d from "react";
3
+ import { c as h } from "./utils-DLUjLwnh.js";
4
+ import { F as C, e as F, a as u, i as y, b as E } from "./field-DRLopwY4.js";
5
+ import * as s from "@radix-ui/react-checkbox";
6
+ import { Check as I, Minus as R } from "lucide-react";
7
+ const m = d.forwardRef(({ className: a, ...i }, c) => /* @__PURE__ */ e(
8
+ s.Root,
9
+ {
10
+ ref: c,
11
+ className: h("checkbox", a),
12
+ "data-slot": "checkbox",
13
+ ...i,
14
+ children: /* @__PURE__ */ o(s.Indicator, { className: "checkbox__indicator", children: [
15
+ /* @__PURE__ */ e(I, { className: "checkbox__icon checkbox__icon--check", "aria-hidden": !0 }),
16
+ /* @__PURE__ */ e(R, { className: "checkbox__icon checkbox__icon--indeterminate", "aria-hidden": !0 })
17
+ ] })
18
+ }
19
+ ));
20
+ m.displayName = s.Root.displayName;
21
+ const O = ["plain", "card"], S = ["inline", "block"], v = d.forwardRef(
22
+ ({
23
+ className: a,
24
+ label: i,
25
+ secondaryText: c,
26
+ appearance: b = "plain",
27
+ layout: k = "inline",
28
+ flipped: x = !1,
29
+ id: f,
30
+ disabled: n,
31
+ ...l
32
+ }, _) => {
33
+ const p = d.useId(), r = f ?? p, t = c != null, N = l["aria-invalid"] === !0 || l["aria-invalid"] === "true";
34
+ return /* @__PURE__ */ e(
35
+ C,
36
+ {
37
+ className: h(
38
+ "checkbox-field",
39
+ `checkbox-field--appearance-${b}`,
40
+ `checkbox-field--layout-${k}`,
41
+ t && "checkbox-field--has-secondary",
42
+ x && "checkbox-field--flipped",
43
+ n && "checkbox-field--disabled",
44
+ N && "checkbox-field--invalid",
45
+ a
46
+ ),
47
+ "data-slot": "checkbox-field",
48
+ children: /* @__PURE__ */ o(F, { className: "checkbox-field__label", htmlFor: r, children: [
49
+ /* @__PURE__ */ e("span", { className: "checkbox-field__checkbox-wrap", children: /* @__PURE__ */ e(m, { ref: _, id: r, disabled: n, ...l }) }),
50
+ /* @__PURE__ */ o(u, { className: "checkbox-field__text", children: [
51
+ /* @__PURE__ */ e(y, { className: "checkbox-field__primary", children: i }),
52
+ t ? /* @__PURE__ */ e(E, { className: "checkbox-field__secondary", children: c }) : null
53
+ ] })
54
+ ] })
55
+ }
56
+ );
57
+ }
58
+ );
59
+ v.displayName = "CheckboxField";
60
+ export {
61
+ m as C,
62
+ v as a,
63
+ O as b,
64
+ S as c
65
+ };
@@ -0,0 +1 @@
1
+ @layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-duration:initial;--tw-ease:initial}}}.checkbox{transition-property:border-color,box-shadow,opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function,cubic-bezier(.4,0,.2,1)));transition-duration:var(--tw-duration,var(--default-transition-duration,.15s));--tw-duration:.15s;--tw-ease:var(--ease-in-out,cubic-bezier(.4,0,.2,1));transition-duration:.15s;transition-timing-function:var(--ease-in-out,cubic-bezier(.4,0,.2,1));--tw-outline-style:none;width:calc(var(--spacing,.25rem)*4);height:calc(var(--spacing,.25rem)*4);border-radius:calc(var(--radius) - 4px);border:1px solid var(--slate-300);background:var(--input);box-shadow:var(--shadow-xs);outline-style:none;flex-shrink:0;justify-content:center;align-items:center;display:flex}.checkbox:focus-visible{border-color:var(--slate-400);box-shadow:0 0 0 3px var(--ring)}.checkbox[data-state=checked],.checkbox[data-state=indeterminate]{border-color:var(--primary);background:var(--primary);color:var(--primary-foreground);box-shadow:var(--shadow-xs)}.checkbox[data-state=checked]:focus-visible,.checkbox[data-state=indeterminate]:focus-visible{border-color:var(--primary);box-shadow:0 0 0 3px var(--ring)}.checkbox[aria-invalid=true]{border-color:var(--destructive)}.checkbox[aria-invalid=true]:focus-visible{border-color:var(--destructive);box-shadow:0 0 0 3px var(--red-300)}.checkbox[data-state=checked][aria-invalid=true],.checkbox[data-state=indeterminate][aria-invalid=true]{border-color:var(--destructive);background:var(--destructive);color:var(--destructive-foreground)}.checkbox[data-state=checked][aria-invalid=true]:focus-visible,.checkbox[data-state=indeterminate][aria-invalid=true]:focus-visible{box-shadow:0 0 0 3px var(--red-300)}.checkbox:disabled{cursor:not-allowed;opacity:.3}.checkbox__indicator{color:currentColor;justify-content:center;align-items:center;display:flex}.checkbox__icon{width:calc(var(--spacing,.25rem)*3.5);height:calc(var(--spacing,.25rem)*3.5);stroke-width:3px}.checkbox:not([data-state=indeterminate]) .checkbox__icon--indeterminate,.checkbox[data-state=indeterminate] .checkbox__icon--check{display:none}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-leading:initial;--tw-tracking:initial}}}.checkbox-field{width:100%;min-width:calc(var(--spacing,.25rem)*0)}.checkbox-field__label{cursor:pointer;align-items:flex-start;gap:calc(var(--spacing,.25rem)*2);-webkit-user-select:none;user-select:none;display:flex}.checkbox-field--appearance-card .checkbox-field__label{border-style:var(--tw-border-style);--tw-border-style:solid;border-style:solid;border-width:1px;border-color:var(--border);background-color:var(--card);padding-inline:calc(var(--spacing,.25rem)*3);padding-block:calc(var(--spacing,.25rem)*2);border-radius:10px}.checkbox-field--disabled .checkbox-field__label{cursor:not-allowed;opacity:.3}.checkbox-field--invalid .checkbox-field__primary{color:var(--destructive)}.checkbox-field--appearance-card.checkbox-field--invalid .checkbox-field__label{border-color:var(--destructive)}.checkbox-field--flipped .checkbox-field__label{flex-direction:row-reverse}.checkbox-field__checkbox-wrap{padding-top:calc(var(--spacing,.25rem)*.5);flex-shrink:0;justify-content:center;align-items:center;display:flex}.checkbox-field__text{min-height:1px;min-width:calc(var(--spacing,.25rem)*0);align-items:flex-start;gap:calc(var(--spacing,.25rem)*0);text-align:left;flex-direction:column;flex:1;display:flex}.checkbox-field--layout-inline .checkbox-field__text{flex:none}.checkbox-field--layout-inline:not(.checkbox-field--has-secondary) .checkbox-field__primary{white-space:nowrap;flex-shrink:0}.checkbox-field__primary{width:100%;font-family:var(--font-sans,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-size:var(--text-sm,.875rem);line-height:var(--tw-leading,var(--text-sm--line-height,calc(1.25/.875)));--tw-leading:1.5;--tw-tracking:var(--tracking-normal);letter-spacing:var(--tracking-normal);color:var(--foreground);line-height:1.5}.checkbox-field__secondary{width:100%;font-family:var(--font-sans,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-size:var(--text-xs,.75rem);line-height:var(--tw-leading,var(--text-xs--line-height,calc(1/.75)));--tw-leading:calc(var(--spacing,.25rem)*4);line-height:calc(var(--spacing,.25rem)*4);--tw-tracking:calc(var(--tracking-normal) + .025em);letter-spacing:calc(var(--tracking-normal) + .025em);color:var(--muted-foreground)}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}
@@ -0,0 +1,3 @@
1
+ export { cn } from './lib/utils';
2
+ export { Checkbox, CheckboxField, CHECKBOX_FIELD_APPEARANCES, CHECKBOX_FIELD_LAYOUTS, } from './components/ui/checkbox';
3
+ export type { CheckboxProps, CheckboxFieldAppearance, CheckboxFieldLayout, CheckboxFieldProps, } from './components/ui/checkbox';
@@ -0,0 +1,10 @@
1
+ import { c as E } from "./utils-DLUjLwnh.js";
2
+ /* empty css */
3
+ import { b as e, c as r, C as s, a as x } from "./checkbox-field-Bslh9sHw.js";
4
+ export {
5
+ e as CHECKBOX_FIELD_APPEARANCES,
6
+ r as CHECKBOX_FIELD_LAYOUTS,
7
+ s as Checkbox,
8
+ x as CheckboxField,
9
+ E as cn
10
+ };
@@ -0,0 +1,23 @@
1
+ import { Checkbox } from './checkbox';
2
+ import * as React from "react";
3
+ export declare const CHECKBOX_FIELD_APPEARANCES: readonly ["plain", "card"];
4
+ export type CheckboxFieldAppearance = (typeof CHECKBOX_FIELD_APPEARANCES)[number];
5
+ export declare const CHECKBOX_FIELD_LAYOUTS: readonly ["inline", "block"];
6
+ export type CheckboxFieldLayout = (typeof CHECKBOX_FIELD_LAYOUTS)[number];
7
+ /** @deprecated Prefer composing `Field` + `Checkbox` for new form layouts. */
8
+ export interface CheckboxFieldProps extends Omit<React.ComponentPropsWithoutRef<typeof Checkbox>, "id" | "children"> {
9
+ /** Primary label (always shown). */
10
+ label: React.ReactNode;
11
+ /** Optional secondary line (12px muted); works for both plain and card. */
12
+ secondaryText?: React.ReactNode;
13
+ /** `plain` — no border/padding; `card` — bordered padded container (Figma Rich). */
14
+ appearance?: CheckboxFieldAppearance;
15
+ /** `inline` — compact label; `block` — label row can grow (Figma Checkbox Group). */
16
+ layout?: CheckboxFieldLayout;
17
+ /** Place checkbox on the right of the text block. */
18
+ flipped?: boolean;
19
+ id?: string;
20
+ }
21
+ /** @deprecated Prefer composing `Field` + `Checkbox` for new form layouts. */
22
+ declare const CheckboxField: React.ForwardRefExoticComponent<CheckboxFieldProps & React.RefAttributes<HTMLButtonElement>>;
23
+ export { CheckboxField };
@@ -0,0 +1,5 @@
1
+ import * as React from "react";
2
+ import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
3
+ declare const Checkbox: React.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
4
+ export type CheckboxProps = React.ComponentPropsWithoutRef<typeof Checkbox>;
5
+ export { Checkbox };
@@ -0,0 +1,4 @@
1
+ export { Checkbox } from './checkbox';
2
+ export type { CheckboxProps } from './checkbox';
3
+ export { CheckboxField, CHECKBOX_FIELD_APPEARANCES, CHECKBOX_FIELD_LAYOUTS, } from './checkbox-field';
4
+ export type { CheckboxFieldAppearance, CheckboxFieldLayout, CheckboxFieldProps, } from './checkbox-field';
@@ -0,0 +1,28 @@
1
+ import * as React from "react";
2
+ export declare const FIELD_ORIENTATIONS: readonly ["responsive", "vertical", "horizontal"];
3
+ export type FieldOrientation = (typeof FIELD_ORIENTATIONS)[number];
4
+ export interface FieldProps extends React.HTMLAttributes<HTMLDivElement> {
5
+ orientation?: FieldOrientation;
6
+ }
7
+ declare const Field: React.ForwardRefExoticComponent<FieldProps & React.RefAttributes<HTMLDivElement>>;
8
+ declare const FieldSet: React.ForwardRefExoticComponent<React.FieldsetHTMLAttributes<HTMLFieldSetElement> & React.RefAttributes<HTMLFieldSetElement>>;
9
+ export type FieldLegendVariant = "legend" | "label";
10
+ export interface FieldLegendProps extends React.HTMLAttributes<HTMLLegendElement> {
11
+ variant?: FieldLegendVariant;
12
+ }
13
+ declare const FieldLegend: React.ForwardRefExoticComponent<FieldLegendProps & React.RefAttributes<HTMLLegendElement>>;
14
+ declare const FieldGroup: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
15
+ declare const FieldLabel: React.ForwardRefExoticComponent<React.LabelHTMLAttributes<HTMLLabelElement> & React.RefAttributes<HTMLLabelElement>>;
16
+ declare const FieldContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
17
+ declare const FieldTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
18
+ declare const FieldDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
19
+ declare const FieldSeparator: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
20
+ type FieldIssue = {
21
+ message?: string;
22
+ };
23
+ export interface FieldErrorProps extends React.HTMLAttributes<HTMLDivElement> {
24
+ errors?: Array<FieldIssue | undefined> | FieldIssue;
25
+ issues?: Array<FieldIssue | undefined>;
26
+ }
27
+ declare const FieldError: React.ForwardRefExoticComponent<FieldErrorProps & React.RefAttributes<HTMLDivElement>>;
28
+ export { Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, };
@@ -0,0 +1,2 @@
1
+ export { Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, FIELD_ORIENTATIONS, } from './field';
2
+ export type { FieldErrorProps, FieldLegendProps, FieldLegendVariant, FieldOrientation, FieldProps, } from './field';
@@ -0,0 +1,2 @@
1
+ export { Input, INPUT_SIZES } from './input';
2
+ export type { InputProps, InputSize } from './input';
@@ -0,0 +1,20 @@
1
+ import * as React from "react";
2
+ export declare const INPUT_SIZES: readonly ["regular", "large", "small", "mini"];
3
+ export type InputSize = (typeof INPUT_SIZES)[number];
4
+ /**
5
+ * Shared props for the Kuat `Input` wrapper + native field.
6
+ *
7
+ * For `type="file"`, avoid treating the control like a text field: browsers restrict the
8
+ * `value`, and React controlled file inputs are unusual—prefer an uncontrolled input with
9
+ * `ref` and `onChange` (see [shadcn file example](https://ui.shadcn.com/docs/components/radix/input#file)).
10
+ */
11
+ export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size"> {
12
+ /** Visual size; maps to `input--size-*` (not the HTML `size` attribute). */
13
+ size?: InputSize;
14
+ /** Optional content before the field (icon, text, checkbox, etc.). */
15
+ leftDecoration?: React.ReactNode;
16
+ /** Optional content after the field (suffix text, button, icon, etc.). */
17
+ rightDecoration?: React.ReactNode;
18
+ }
19
+ declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
20
+ export { Input };
@@ -0,0 +1,4 @@
1
+ export { RadioGroup, RadioGroupItem } from './radio';
2
+ export type { RadioGroupProps, RadioGroupItemProps } from './radio';
3
+ export { RadioField, RADIO_FIELD_APPEARANCES, RADIO_FIELD_LAYOUTS, } from './radio-field';
4
+ export type { RadioFieldAppearance, RadioFieldLayout, RadioFieldProps, } from './radio-field';
@@ -0,0 +1,25 @@
1
+ import { RadioGroupItem } from './radio';
2
+ import * as React from "react";
3
+ export declare const RADIO_FIELD_APPEARANCES: readonly ["plain", "card"];
4
+ export type RadioFieldAppearance = (typeof RADIO_FIELD_APPEARANCES)[number];
5
+ export declare const RADIO_FIELD_LAYOUTS: readonly ["inline", "block"];
6
+ export type RadioFieldLayout = (typeof RADIO_FIELD_LAYOUTS)[number];
7
+ /** @deprecated Prefer composing `Field` + `RadioGroupItem` for new form layouts. */
8
+ export interface RadioFieldProps extends Omit<React.ComponentPropsWithoutRef<typeof RadioGroupItem>, "id" | "children"> {
9
+ /** Primary label (always shown). */
10
+ label: React.ReactNode;
11
+ /** Optional secondary line (12px muted); works for both plain and card. */
12
+ secondaryText?: React.ReactNode;
13
+ /** `plain` — no border/padding; `card` — bordered padded container (Figma Rich). */
14
+ appearance?: RadioFieldAppearance;
15
+ /** `inline` — compact label; `block` — label row can grow (Figma Radio Group). */
16
+ layout?: RadioFieldLayout;
17
+ /** Place radio on the right of the text block. */
18
+ flipped?: boolean;
19
+ id?: string;
20
+ /** Required — must match a unique option in the parent `RadioGroup`. */
21
+ value: string;
22
+ }
23
+ /** @deprecated Prefer composing `Field` + `RadioGroupItem` for new form layouts. */
24
+ declare const RadioField: React.ForwardRefExoticComponent<RadioFieldProps & React.RefAttributes<HTMLButtonElement>>;
25
+ export { RadioField };
@@ -0,0 +1,7 @@
1
+ import * as React from "react";
2
+ import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
3
+ declare const RadioGroup: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
4
+ declare const RadioGroupItem: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupItemProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
5
+ export type RadioGroupProps = React.ComponentPropsWithoutRef<typeof RadioGroup>;
6
+ export type RadioGroupItemProps = React.ComponentPropsWithoutRef<typeof RadioGroupItem>;
7
+ export { RadioGroup, RadioGroupItem };
@@ -0,0 +1,19 @@
1
+ import type * as React from "react";
2
+ export declare const SELECT_SIZES: readonly ["regular", "large", "small", "mini"];
3
+ export type SelectSize = (typeof SELECT_SIZES)[number];
4
+ export declare const SELECT_LINES: readonly ["single", "double"];
5
+ export type SelectLines = (typeof SELECT_LINES)[number];
6
+ export interface SelectItemOption {
7
+ value: string;
8
+ label: React.ReactNode;
9
+ description?: React.ReactNode;
10
+ disabled?: boolean;
11
+ prepend?: React.ReactNode;
12
+ decoration?: React.ReactNode;
13
+ }
14
+ export interface SelectItemGroup {
15
+ label: React.ReactNode;
16
+ items: SelectItemOption[];
17
+ }
18
+ export type SelectItems = Array<SelectItemOption | SelectItemGroup>;
19
+ export declare function isSelectItemGroup(item: SelectItemOption | SelectItemGroup): item is SelectItemGroup;
@@ -0,0 +1,3 @@
1
+ export { KuatSelect, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, SELECT_LINES, SELECT_SIZES, } from './select';
2
+ export type { KuatSelectProps, SelectContentProps, SelectItemProps, SelectLabelProps, SelectProps, SelectSeparatorProps, SelectTriggerProps, SelectValueProps, } from './select';
3
+ export type { SelectItemGroup, SelectItemOption, SelectItems, SelectLines, SelectSize, } from './constants';