@kinetixui/ui 0.23.3 → 0.24.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.
- package/README.md +134 -0
- package/dist/index.d.ts +212 -31
- package/dist/index.js +1466 -1118
- package/dist/kx-src-hash.json +3 -0
- package/package.json +7 -7
- package/src/components/accordion.tsx +1 -1
- package/src/components/alert-dialog.tsx +7 -5
- package/src/components/avatar.tsx +4 -1
- package/src/components/banner.tsx +9 -3
- package/src/components/breadcrumb.tsx +1 -1
- package/src/components/button.tsx +1 -1
- package/src/components/card.tsx +77 -6
- package/src/components/checkbox.tsx +42 -8
- package/src/components/collapsible.tsx +41 -1
- package/src/components/command.tsx +2 -2
- package/src/components/context-menu.tsx +21 -13
- package/src/components/dialog.tsx +5 -4
- package/src/components/direction-provider.tsx +85 -1
- package/src/components/drawer.tsx +62 -18
- package/src/components/dropdown-menu.tsx +12 -4
- package/src/components/file-upload.tsx +1 -1
- package/src/components/hover-card.tsx +1 -1
- package/src/components/inform.tsx +9 -3
- package/src/components/input-group.tsx +27 -5
- package/src/components/input-otp.tsx +48 -5
- package/src/components/input.tsx +20 -3
- package/src/components/json-viewer.tsx +1 -1
- package/src/components/menubar.tsx +21 -15
- package/src/components/modal.tsx +3 -2
- package/src/components/multi-select.tsx +14 -5
- package/src/components/native-select.tsx +10 -2
- package/src/components/navigation-bar.tsx +1 -1
- package/src/components/navigation-menu.tsx +6 -6
- package/src/components/number-input.tsx +28 -10
- package/src/components/pagination.tsx +2 -2
- package/src/components/popover.tsx +29 -5
- package/src/components/radio-group.tsx +23 -8
- package/src/components/segmented-control.tsx +20 -4
- package/src/components/select.tsx +25 -8
- package/src/components/sheet.tsx +4 -3
- package/src/components/spinner.tsx +1 -1
- package/src/components/switch.tsx +31 -8
- package/src/components/table.tsx +121 -8
- package/src/components/tabs.tsx +29 -4
- package/src/components/tag.tsx +1 -1
- package/src/components/textarea.tsx +20 -3
- package/src/components/tooltip.tsx +14 -4
- package/src/components/tour.tsx +22 -7
- package/src/components/tree-view.tsx +1 -1
- package/src/components-behavior.test.tsx +74 -0
- package/src/components-direction-portal.test.tsx +482 -0
- package/src/components-form.test.tsx +435 -0
- package/src/components-icons.test.tsx +197 -0
- package/src/components-keyboard.test.tsx +542 -2
- package/src/components-overlay.test.tsx +381 -0
- package/src/components-rtl.test.tsx +258 -0
- package/src/components-selection.test.tsx +207 -0
- package/src/components-table-scroll.test.tsx +363 -0
- package/src/index.ts +2 -0
- package/src/navigation-menu-focus.test.tsx +35 -0
- package/src/stories/Card.stories.tsx +81 -1
- package/src/stories/Checkbox.stories.tsx +23 -1
- package/src/stories/ContextMenu.stories.tsx +1 -1
- package/src/stories/Input.stories.tsx +34 -0
- package/src/stories/InputGroup.stories.tsx +96 -2
- package/src/stories/InputOTP.stories.tsx +24 -1
- package/src/stories/MultiSelect.stories.tsx +25 -1
- package/src/stories/NativeSelect.stories.tsx +24 -1
- package/src/stories/NumberInput.stories.tsx +20 -1
- package/src/stories/Progress.stories.tsx +1 -1
- package/src/stories/RadioGroup.stories.tsx +33 -1
- package/src/stories/SegmentedControl.stories.tsx +21 -1
- package/src/stories/Select.stories.tsx +28 -1
- package/src/stories/Slider.stories.tsx +1 -1
- package/src/stories/Switch.stories.tsx +37 -1
- package/src/stories/Table.stories.tsx +35 -1
- package/src/stories/Tabs.stories.tsx +27 -2
- package/src/stories/Textarea.stories.tsx +34 -0
- package/src/usage/icons.tsx +60 -0
- package/tailwind.config.ts +118 -22
package/README.md
ADDED
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
# @kinetixui/ui
|
|
2
|
+
|
|
3
|
+
The React implementation of KinetixUI — CVA + Radix + Tailwind components styled only against the
|
|
4
|
+
KinetixUI semantic token layer, never a raw hex.
|
|
5
|
+
|
|
6
|
+
**Beta.** The catalogue is settled enough to build on (97 of 98 entries are lifecycle `stable`), but the
|
|
7
|
+
package is pre-1.0 and minor versions can still move an API.
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @kinetixui/ui
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
`@kinetixui/tokens` comes with it as a real dependency, so the token contract is always present and in
|
|
14
|
+
step. React 18 or 19 is a peer you supply.
|
|
15
|
+
|
|
16
|
+
## Two ways to install, and they are genuinely different
|
|
17
|
+
|
|
18
|
+
| | npm package | Registry (copy the source) |
|
|
19
|
+
| --- | --- | --- |
|
|
20
|
+
| Command | `npm install @kinetixui/ui` | `npx @kinetixui/cli add button` |
|
|
21
|
+
| You get | A versioned dependency | The component's source, in your repo |
|
|
22
|
+
| Updates | `npm update` | You own it; re-run `add` to take a newer version |
|
|
23
|
+
| Editing | Wrap or restyle from outside | Edit the file |
|
|
24
|
+
| Cost | The whole library resolves (see **Bundle size** below) | Only the components you asked for |
|
|
25
|
+
|
|
26
|
+
Both compile against the same tokens. Most teams want the registry for components and npm for tokens.
|
|
27
|
+
|
|
28
|
+
## Minimal usage
|
|
29
|
+
|
|
30
|
+
Three things have to be true: the token stylesheet is loaded, the Tailwind preset is applied, and
|
|
31
|
+
`.dark` is on an ancestor when you want the dark set.
|
|
32
|
+
|
|
33
|
+
```css
|
|
34
|
+
/* your global stylesheet */
|
|
35
|
+
@import "@kinetixui/tokens/css";
|
|
36
|
+
@import "@kinetixui/tokens/css/dark";
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
```ts
|
|
40
|
+
// tailwind.config.ts
|
|
41
|
+
import preset from "@kinetixui/ui/tailwind.config";
|
|
42
|
+
|
|
43
|
+
export default {
|
|
44
|
+
presets: [preset],
|
|
45
|
+
content: ["./src/**/*.{ts,tsx}", "./node_modules/@kinetixui/ui/dist/**/*.js"],
|
|
46
|
+
};
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
```tsx
|
|
50
|
+
import { Button, Card, CardContent, Dialog, DialogContent, DialogTrigger } from "@kinetixui/ui";
|
|
51
|
+
|
|
52
|
+
export function Example() {
|
|
53
|
+
return (
|
|
54
|
+
<Card>
|
|
55
|
+
<CardContent>
|
|
56
|
+
<Dialog>
|
|
57
|
+
<DialogTrigger asChild>
|
|
58
|
+
<Button variant="Primary">Open</Button>
|
|
59
|
+
</DialogTrigger>
|
|
60
|
+
<DialogContent>Anything.</DialogContent>
|
|
61
|
+
</Dialog>
|
|
62
|
+
</CardContent>
|
|
63
|
+
</Card>
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Entry points
|
|
69
|
+
|
|
70
|
+
| import | contains |
|
|
71
|
+
| --- | --- |
|
|
72
|
+
| `@kinetixui/ui` | every component and its prop types |
|
|
73
|
+
| `@kinetixui/ui/tailwind.config` | the Tailwind preset — token scales, the `.dark` variant, the animation utilities |
|
|
74
|
+
|
|
75
|
+
There is no per-component subpath today. That is the reason for the note below.
|
|
76
|
+
|
|
77
|
+
## Bundle size
|
|
78
|
+
|
|
79
|
+
**This package does not tree-shake per component.** `dist/` is a single pre-bundled ES module, so a
|
|
80
|
+
bundler cannot drop the components you did not import: measured with esbuild, `import { Button }` alone
|
|
81
|
+
produces roughly 678 KB minified, against roughly 1,015 KB for importing everything. `sideEffects: false`
|
|
82
|
+
is declared and correct, and it does not help — the granularity problem is the single module, not the
|
|
83
|
+
side-effect hint.
|
|
84
|
+
|
|
85
|
+
So: if bundle size is the constraint, use the registry (`npx @kinetixui/cli add button`) and take only
|
|
86
|
+
the components you need. If you are building an app that will use most of the catalogue behind a
|
|
87
|
+
code-split route, the npm package is fine.
|
|
88
|
+
|
|
89
|
+
This is a packaging limitation with a known fix (subpath exports per component, as `@kinetixui/iot`
|
|
90
|
+
already does) and it is tracked in
|
|
91
|
+
[`marketing/audits/TREE-SHAKING.md`](https://github.com/zedalleys/kinetixui/blob/main/marketing/audits/TREE-SHAKING.md).
|
|
92
|
+
|
|
93
|
+
## Environment
|
|
94
|
+
|
|
95
|
+
- **React** 18 or 19 (`react` and `react-dom` are peers)
|
|
96
|
+
- **Tailwind CSS** 3.4, via the exported preset
|
|
97
|
+
- ESM only — the package is `"type": "module"` and ships no CommonJS build
|
|
98
|
+
- TypeScript types are shipped (`dist/index.d.ts`)
|
|
99
|
+
|
|
100
|
+
## Accessibility
|
|
101
|
+
|
|
102
|
+
Interactive components are built on Radix primitives, so keyboard behaviour and ARIA wiring come from a
|
|
103
|
+
maintained implementation rather than a hand-rolled one. Focus is always visible via the `--ring` token
|
|
104
|
+
and `focus-visible`.
|
|
105
|
+
|
|
106
|
+
What is actually verified, per component, is published rather than asserted: every component in this
|
|
107
|
+
package passes axe with **all rules enabled, in light and dark**, with an empty baseline — a new
|
|
108
|
+
violation fails CI, and so does a baselined one that stops occurring. Contrast is a separate gate: every
|
|
109
|
+
semantic token pair is audited against WCAG AA in both themes. The per-component, per-kind evidence
|
|
110
|
+
table is at [kinetixui.com/docs/platforms](https://kinetixui.com/docs/platforms).
|
|
111
|
+
|
|
112
|
+
RTL is in progress. Components are being converted from physical to logical Tailwind utilities and the
|
|
113
|
+
conversion is enforced forward in CI, but it is not complete — see
|
|
114
|
+
[RTL](https://kinetixui.com/docs/rtl) for where it stands.
|
|
115
|
+
|
|
116
|
+
## Limitations worth knowing before you adopt
|
|
117
|
+
|
|
118
|
+
- Pre-1.0: minor versions can move an API.
|
|
119
|
+
- No per-component tree-shaking (above).
|
|
120
|
+
- One catalogue entry, `combobox`, is a documented **recipe** over `Command` rather than a component —
|
|
121
|
+
there is no `Combobox` export. The catalogue is 98 entries, 97 of which are components.
|
|
122
|
+
- No visual-regression suite exists yet, on any platform.
|
|
123
|
+
|
|
124
|
+
## Links
|
|
125
|
+
|
|
126
|
+
- Documentation — <https://kinetixui.com/docs>
|
|
127
|
+
- Components — <https://kinetixui.com/components>
|
|
128
|
+
- Installation — <https://kinetixui.com/docs/installation>
|
|
129
|
+
- Per-platform coverage and evidence — <https://kinetixui.com/docs/platforms>
|
|
130
|
+
- Source — <https://github.com/zedalleys/kinetixui>
|
|
131
|
+
|
|
132
|
+
## License
|
|
133
|
+
|
|
134
|
+
MIT
|
package/dist/index.d.ts
CHANGED
|
@@ -31,7 +31,6 @@ import * as RechartsPrimitive from 'recharts';
|
|
|
31
31
|
import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
|
|
32
32
|
import * as _tanstack_react_table from '@tanstack/react-table';
|
|
33
33
|
import { RowData, ColumnDef } from '@tanstack/react-table';
|
|
34
|
-
import * as vaul from 'vaul';
|
|
35
34
|
import { Drawer as Drawer$1 } from 'vaul';
|
|
36
35
|
import * as react_hook_form from 'react-hook-form';
|
|
37
36
|
import { FieldValues, FieldPath, ControllerProps } from 'react-hook-form';
|
|
@@ -80,9 +79,24 @@ declare const Button: React$1.ForwardRefExoticComponent<ButtonProps & React$1.Re
|
|
|
80
79
|
*
|
|
81
80
|
* Figma's component bundles a label + helper text; those live in the `Field`
|
|
82
81
|
* composition (their colour tracks the control's state). This is the bare
|
|
83
|
-
* control. Tokens: border `--
|
|
82
|
+
* control. Tokens: border `--muted-foreground`, focus `--ring`, error `--destructive`,
|
|
84
83
|
* radius `--radius-sm` (Figma `input` = 4px), padding `--spacing-3`,
|
|
85
84
|
* text = Body Medium (14 / 20, +0.25).
|
|
85
|
+
*
|
|
86
|
+
* It follows the text-entry state contract (TOKENS.md, "Text entry and navigation"):
|
|
87
|
+
*
|
|
88
|
+
* rest edge `--muted-foreground` at 80% — 3.4:1 light / 5.4:1 dark on a card, where `--input` was
|
|
89
|
+
* 2.2:1 / 2.4:1 and was the only thing marking where the field is (SC 1.4.11)
|
|
90
|
+
* hover a pointer that can hover: the edge steps to full `--muted-foreground`. Not on a focused,
|
|
91
|
+
* invalid, read-only or disabled field — hover never takes over a stronger state
|
|
92
|
+
* focus `--action` edge + the `--shadow-focus` ring, the strongest signal, unchanged by the pointer
|
|
93
|
+
* invalid `aria-invalid="true"` → `--destructive` edge and ring, which hover does not replace; the
|
|
94
|
+
* field's error text is the non-colour cue (SC 1.4.1)
|
|
95
|
+
* read-only an inset `--muted` fill, full-strength text, no hover: readable and selectable, not editable
|
|
96
|
+
* disabled `--opacity-disabled`, inert
|
|
97
|
+
*
|
|
98
|
+
* Motion: border-color, box-shadow and background-color over `duration-instant` with `ease-standard`.
|
|
99
|
+
* Reduced motion collapses it (the library floor) and lands on the same end state.
|
|
86
100
|
*/
|
|
87
101
|
declare const inputVariants: (props?: ({
|
|
88
102
|
state?: "Default" | "Focus" | "Disabled" | "Error" | null | undefined;
|
|
@@ -97,7 +111,22 @@ declare const Input: React$1.ForwardRefExoticComponent<InputProps & React$1.RefA
|
|
|
97
111
|
* 01. Form Inputs › Textarea (node 54855:13857).
|
|
98
112
|
*
|
|
99
113
|
* Identical to `Input` except the field is multi-line: `min-h-[100px]`
|
|
100
|
-
* (Figma `h: 100`) and vertical resize. Same state matrix and tokens
|
|
114
|
+
* (Figma `h: 100`) and vertical resize. Same state matrix and tokens as Input:
|
|
115
|
+
*
|
|
116
|
+
* It follows the text-entry state contract (TOKENS.md, "Text entry and navigation"):
|
|
117
|
+
*
|
|
118
|
+
* rest edge `--muted-foreground` at 80% — 3.4:1 light / 5.4:1 dark on a card, where `--input` was
|
|
119
|
+
* 2.2:1 / 2.4:1 and was the only thing marking where the field is (SC 1.4.11)
|
|
120
|
+
* hover a pointer that can hover: the edge steps to full `--muted-foreground`. Not on a focused,
|
|
121
|
+
* invalid, read-only or disabled field — hover never takes over a stronger state
|
|
122
|
+
* focus `--action` edge + the `--shadow-focus` ring, the strongest signal, unchanged by the pointer
|
|
123
|
+
* invalid `aria-invalid="true"` → `--destructive` edge and ring, which hover does not replace; the
|
|
124
|
+
* field's error text is the non-colour cue (SC 1.4.1)
|
|
125
|
+
* read-only an inset `--muted` fill, full-strength text, no hover: readable and selectable, not editable
|
|
126
|
+
* disabled `--opacity-disabled`, inert
|
|
127
|
+
*
|
|
128
|
+
* Motion: border-color, box-shadow and background-color over `duration-instant` with `ease-standard`.
|
|
129
|
+
* Reduced motion collapses it (the library floor) and lands on the same end state.
|
|
101
130
|
*/
|
|
102
131
|
declare const textareaVariants: (props?: ({
|
|
103
132
|
state?: "Default" | "Focus" | "Disabled" | "Error" | null | undefined;
|
|
@@ -119,7 +148,10 @@ declare const AlertDescription: React$1.ForwardRefExoticComponent<React$1.HTMLAt
|
|
|
119
148
|
|
|
120
149
|
declare const AlertDialog: React$1.FC<AlertDialogPrimitive.AlertDialogProps>;
|
|
121
150
|
declare const AlertDialogTrigger: React$1.ForwardRefExoticComponent<AlertDialogPrimitive.AlertDialogTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
122
|
-
declare const AlertDialogPortal:
|
|
151
|
+
declare const AlertDialogPortal: {
|
|
152
|
+
({ container, ...props }: AlertDialogPrimitive.AlertDialogPortalProps): React$1.JSX.Element | null;
|
|
153
|
+
displayName: string;
|
|
154
|
+
};
|
|
123
155
|
declare const AlertDialogOverlay: React$1.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogOverlayProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
124
156
|
declare const AlertDialogContent: React$1.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
125
157
|
declare const AlertDialogHeader: {
|
|
@@ -154,8 +186,19 @@ interface KinetixDirectionProviderProps {
|
|
|
154
186
|
* <html dir={dir}>
|
|
155
187
|
* <KinetixDirectionProvider dir={dir}>{children}</KinetixDirectionProvider>
|
|
156
188
|
* </html>
|
|
189
|
+
*
|
|
190
|
+
* It also scopes: a provider around one section (with `dir` on that section's element) gives that section
|
|
191
|
+
* its own direction, and the overlays opened from inside it portal with that direction too, without
|
|
192
|
+
* touching `<html>`. The nearest provider wins.
|
|
157
193
|
*/
|
|
158
194
|
declare function KinetixDirectionProvider({ dir, children }: KinetixDirectionProviderProps): React$1.JSX.Element;
|
|
195
|
+
/**
|
|
196
|
+
* The element the nearest `KinetixDirectionProvider` wants overlays portaled into. `undefined` outside one
|
|
197
|
+
* (portal to `<body>` as usual); `null` inside one whose host is not attached yet, in which case render
|
|
198
|
+
* nothing and try again, which happens before paint. Every overlay in this library follows this; use it for a
|
|
199
|
+
* custom portal so it gets the same direction.
|
|
200
|
+
*/
|
|
201
|
+
declare function useKinetixPortalContainer(): HTMLElement | null | undefined;
|
|
159
202
|
|
|
160
203
|
declare const Avatar: React$1.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarProps & React$1.RefAttributes<HTMLSpanElement>, "ref"> & React$1.RefAttributes<HTMLSpanElement>>;
|
|
161
204
|
declare const AvatarImage: React$1.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarImageProps & React$1.RefAttributes<HTMLImageElement>, "ref"> & React$1.RefAttributes<HTMLImageElement>>;
|
|
@@ -204,7 +247,13 @@ declare const BreadcrumbEllipsis: {
|
|
|
204
247
|
displayName: string;
|
|
205
248
|
};
|
|
206
249
|
|
|
207
|
-
|
|
250
|
+
interface CardProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
251
|
+
/** Render as the single child element (Radix Slot) instead of a `<div>` — e.g.
|
|
252
|
+
* `<Card asChild><a href="/reports/q3">…</a></Card>`. When that element is an `<a href>` or a `<button>`,
|
|
253
|
+
* the card takes the interactive states; anything else stays static. */
|
|
254
|
+
asChild?: boolean;
|
|
255
|
+
}
|
|
256
|
+
declare const Card: React$1.ForwardRefExoticComponent<CardProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
208
257
|
declare const CardHeader: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
|
|
209
258
|
declare const CardTitle: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
|
|
210
259
|
declare const CardDescription: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
|
|
@@ -212,20 +261,63 @@ declare const CardContent: React$1.ForwardRefExoticComponent<React$1.HTMLAttribu
|
|
|
212
261
|
declare const CardFooter: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
|
|
213
262
|
|
|
214
263
|
/**
|
|
215
|
-
* Checkbox —
|
|
216
|
-
*
|
|
217
|
-
*
|
|
218
|
-
*
|
|
264
|
+
* Checkbox — from the KinetixUI design source, node 54863:483: 18px box, 4px radius, 2px border, checked /
|
|
265
|
+
* indeterminate fill = `--action`, focus = 2px `--ring` offset.
|
|
266
|
+
*
|
|
267
|
+
* It follows the selection-control state contract (TOKENS.md, "Selection controls"):
|
|
268
|
+
*
|
|
269
|
+
* rest unchecked boundary `--muted-foreground`, not `--input`. The box is the only thing that says a
|
|
270
|
+
* checkbox is there, so its edge must clear SC 1.4.11's 3:1 (`--input` is 2.2:1 light / 2.7:1
|
|
271
|
+
* dark — a tracked exception for field outlines, where the field's fill and label carry it).
|
|
272
|
+
* hover a pointer that can hover: a `--foreground` state layer at 8% around the box, and the unchecked
|
|
273
|
+
* edge darkens to `--foreground`; checked fills step to `--action`/90
|
|
274
|
+
* pressed the state layer deepens to 14%; checked fills to `--action`/85
|
|
275
|
+
* checked `--action` fill AND a glyph — shape, not only colour
|
|
276
|
+
* invalid `aria-invalid="true"` → `--destructive` edge (and fill when checked); the field's error text
|
|
277
|
+
* is the non-colour cue
|
|
278
|
+
* focus the 2px offset ring, `!important` so no hover or pressed layer can cover it
|
|
279
|
+
* disabled `--opacity-disabled`, and the hover/pressed layers are keyed on `:enabled`, so it never answers
|
|
280
|
+
*
|
|
281
|
+
* Motion: colour and box-shadow over `duration-instant` (100ms, the press/toggle step) with `ease-standard`.
|
|
282
|
+
* The checked state itself does not animate. Reduced motion collapses the transition (the library floor in
|
|
283
|
+
* tailwind.config.ts) and lands on the same end state.
|
|
219
284
|
*/
|
|
220
285
|
declare const Checkbox: React$1.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
221
286
|
|
|
222
287
|
declare const Collapsible: React$1.ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
223
288
|
declare const CollapsibleTrigger: React$1.ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
224
|
-
|
|
289
|
+
/**
|
|
290
|
+
* The disclosure transition, which this component shipped without.
|
|
291
|
+
*
|
|
292
|
+
* Collapsible was a bare re-export: three primitives passed through untouched. Its content appeared
|
|
293
|
+
* and vanished in a single frame while `Accordion` — the same disclosure gesture on a sibling Radix
|
|
294
|
+
* primitive — animated its height. Measured before this change, the content went 0px to 84px with no
|
|
295
|
+
* animation at all, against the accordion's 0px → 24.64px → 36px over 200ms.
|
|
296
|
+
*
|
|
297
|
+
* Disclosure is the case where motion carries meaning rather than decorating it: the content growing
|
|
298
|
+
* out of the trigger is what says it belongs to the thing you just pressed, and where it will go when
|
|
299
|
+
* you press it again. Appearing instantly makes the page look like it was replaced instead.
|
|
300
|
+
*
|
|
301
|
+
* `overflow-hidden` is load-bearing, not cosmetic — the height animation clips its content as it
|
|
302
|
+
* runs, and without it the text is laid out at full height from the first frame and simply spills
|
|
303
|
+
* out of the collapsing box.
|
|
304
|
+
*
|
|
305
|
+
* Reduced motion needs nothing here. The package's base layer collapses `animation-duration` for
|
|
306
|
+
* everything it ships, and the content still lands at its full height because the keyframe's end
|
|
307
|
+
* state is unchanged — proven in both directions by `scripts/motion.mjs`.
|
|
308
|
+
*
|
|
309
|
+
* Wrapping the primitive rather than re-exporting it adds a `className` that merges with the
|
|
310
|
+
* caller's, which is the convention every other component here follows. The props, the ref and the
|
|
311
|
+
* data attributes are the primitive's own, so nothing a consumer passes today behaves differently.
|
|
312
|
+
*/
|
|
313
|
+
declare const CollapsibleContent: React$1.ForwardRefExoticComponent<Omit<CollapsiblePrimitive.CollapsibleContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
225
314
|
|
|
226
315
|
declare const Dialog: React$1.FC<DialogPrimitive.DialogProps>;
|
|
227
316
|
declare const DialogTrigger: React$1.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
228
|
-
declare const DialogPortal:
|
|
317
|
+
declare const DialogPortal: {
|
|
318
|
+
({ container, ...props }: DialogPrimitive.DialogPortalProps): React$1.JSX.Element | null;
|
|
319
|
+
displayName: string;
|
|
320
|
+
};
|
|
229
321
|
declare const DialogClose: React$1.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
230
322
|
declare const DialogOverlay: React$1.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
231
323
|
declare const DialogContent: React$1.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
@@ -243,7 +335,10 @@ declare const DialogDescription: React$1.ForwardRefExoticComponent<Omit<DialogPr
|
|
|
243
335
|
declare const DropdownMenu: React$1.FC<DropdownMenuPrimitive.DropdownMenuProps>;
|
|
244
336
|
declare const DropdownMenuTrigger: React$1.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
245
337
|
declare const DropdownMenuGroup: React$1.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
246
|
-
declare const DropdownMenuPortal:
|
|
338
|
+
declare const DropdownMenuPortal: {
|
|
339
|
+
({ container, ...props }: DropdownMenuPrimitive.DropdownMenuPortalProps): React$1.JSX.Element | null;
|
|
340
|
+
displayName: string;
|
|
341
|
+
};
|
|
247
342
|
declare const DropdownMenuSub: React$1.FC<DropdownMenuPrimitive.DropdownMenuSubProps>;
|
|
248
343
|
declare const DropdownMenuRadioGroup: React$1.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuRadioGroupProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
249
344
|
declare const DropdownMenuContent: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
@@ -305,9 +400,13 @@ declare const PopoverContent: React$1.ForwardRefExoticComponent<Omit<PopoverPrim
|
|
|
305
400
|
declare const Progress: React$1.ForwardRefExoticComponent<Omit<ProgressPrimitive.ProgressProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
306
401
|
|
|
307
402
|
/**
|
|
308
|
-
* RadioGroup —
|
|
309
|
-
*
|
|
310
|
-
*
|
|
403
|
+
* RadioGroup — from the KinetixUI design source, node 54863:536: 18px circle, 2px border, checked border +
|
|
404
|
+
* dot = `--action`, focus = 2px `--ring` offset.
|
|
405
|
+
*
|
|
406
|
+
* Each item follows the selection-control state contract (TOKENS.md, "Selection controls"), exactly as
|
|
407
|
+
* Checkbox does: a `--muted-foreground` unchecked edge that clears 3:1, an 8% `--foreground` state layer on
|
|
408
|
+
* hover (14% pressed), a dot as the shape cue for checked, `aria-invalid="true"` → `--destructive` edge and
|
|
409
|
+
* dot, a focus ring no other layer can cover, and no response at all while disabled.
|
|
311
410
|
*/
|
|
312
411
|
declare const RadioGroup: React$1.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
313
412
|
declare const RadioGroupItem: React$1.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupItemProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
@@ -315,11 +414,6 @@ declare const RadioGroupItem: React$1.ForwardRefExoticComponent<Omit<RadioGroupP
|
|
|
315
414
|
declare const ScrollArea: React$1.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
316
415
|
declare const ScrollBar: React$1.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaScrollbarProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
317
416
|
|
|
318
|
-
/**
|
|
319
|
-
* Select — reconciled 1:1 with the KinetixUI design source, node 54855:13882.
|
|
320
|
-
* The trigger mirrors Input: `rounded-sm`, `border-input`, `--spacing-3` pad,
|
|
321
|
-
* Body Medium text, a soft `--shadow-focus` glow, `--destructive` on aria-invalid.
|
|
322
|
-
*/
|
|
323
417
|
declare const Select: React$1.FC<SelectPrimitive.SelectProps>;
|
|
324
418
|
declare const SelectGroup: React$1.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
325
419
|
declare const SelectValue: React$1.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & React$1.RefAttributes<HTMLSpanElement>>;
|
|
@@ -334,7 +428,10 @@ declare const Separator: React$1.ForwardRefExoticComponent<Omit<SeparatorPrimiti
|
|
|
334
428
|
declare const Sheet: React$1.FC<DialogPrimitive.DialogProps>;
|
|
335
429
|
declare const SheetTrigger: React$1.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
336
430
|
declare const SheetClose: React$1.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
337
|
-
declare const SheetPortal:
|
|
431
|
+
declare const SheetPortal: {
|
|
432
|
+
({ container, ...props }: DialogPrimitive.DialogPortalProps): React$1.JSX.Element | null;
|
|
433
|
+
displayName: string;
|
|
434
|
+
};
|
|
338
435
|
declare const SheetOverlay: React$1.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
339
436
|
declare const sheetVariants: (props?: ({
|
|
340
437
|
side?: "bottom" | "left" | "right" | "top" | null | undefined;
|
|
@@ -395,9 +492,14 @@ type ToasterProps = React.ComponentProps<typeof Toaster$1>;
|
|
|
395
492
|
declare function Toaster({ theme, ...props }: ToasterProps): React$1.JSX.Element;
|
|
396
493
|
|
|
397
494
|
/**
|
|
398
|
-
* Switch —
|
|
399
|
-
*
|
|
400
|
-
*
|
|
495
|
+
* Switch — from the KinetixUI design source, node 54855:13984: 48×24 pill track, off = `--tertiary`, on =
|
|
496
|
+
* `--action`, 20px `--background` thumb that travels 24px, focus = 2px `--ring` offset.
|
|
497
|
+
*
|
|
498
|
+
* It follows the selection-control state contract (TOKENS.md, "Selection controls"): the same 8% / 14%
|
|
499
|
+
* `--foreground` state layer as Checkbox and Radio on hover and press, the on track steps to `--action`/90
|
|
500
|
+
* under the pointer, the thumb's position is the shape cue for on/off, the focus ring cannot be covered by
|
|
501
|
+
* any other layer, and a disabled switch does not answer the pointer. The off track stays `--tertiary`
|
|
502
|
+
* (2.6:1, a tracked SC 1.4.11 exception in check-contrast.mjs): the thumb and `aria-checked` carry it.
|
|
401
503
|
*/
|
|
402
504
|
declare const Switch: React$1.ForwardRefExoticComponent<Omit<SwitchPrimitive.SwitchProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
403
505
|
|
|
@@ -437,6 +539,26 @@ declare const TableHead: React$1.ForwardRefExoticComponent<React$1.ThHTMLAttribu
|
|
|
437
539
|
declare const TableCell: React$1.ForwardRefExoticComponent<React$1.TdHTMLAttributes<HTMLTableCellElement> & React$1.RefAttributes<HTMLTableCellElement>>;
|
|
438
540
|
declare const TableCaption: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableCaptionElement> & React$1.RefAttributes<HTMLTableCaptionElement>>;
|
|
439
541
|
|
|
542
|
+
/**
|
|
543
|
+
* Tabs — one navigation group, following the navigation state contract (TOKENS.md, "Text entry and
|
|
544
|
+
* navigation") and the surface model:
|
|
545
|
+
*
|
|
546
|
+
* list an inset well, `--surface-grouped` — below a Card in both themes; at large text sizes the tabs
|
|
547
|
+
* wrap inside it rather than running off the page
|
|
548
|
+
* rest unselected tabs in `--muted-foreground`
|
|
549
|
+
* hover an unselected tab gets the selection controls' `--foreground` state layer at 8% and
|
|
550
|
+
* `--foreground` text
|
|
551
|
+
* selected a small raised surface on the well — `--card`, the Card's half-strength `--border` edge and
|
|
552
|
+
* `sm` depth — and `--foreground` text, so it is surface + edge + depth, never colour alone. The
|
|
553
|
+
* list used to be `--muted` with a `--background` tab, which in dark mode put the selected tab
|
|
554
|
+
* BELOW its well (measured: tab L 0.0031, well L 0.0167) — the inversion SegmentedControl had
|
|
555
|
+
* focus the 2px `--ring`, `!important` so the selected tab's edge cannot cover it; the selected
|
|
556
|
+
* surface stays under it
|
|
557
|
+
* disabled `--opacity-disabled`, inert
|
|
558
|
+
*
|
|
559
|
+
* There is no pressed state: Radix selects a tab on pointer-down, so pressing IS selecting.
|
|
560
|
+
* Motion: colour, background and box-shadow over `duration-fast` with `ease-standard`; nothing moves.
|
|
561
|
+
*/
|
|
440
562
|
declare const Tabs: React$1.ForwardRefExoticComponent<TabsPrimitive.TabsProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
441
563
|
declare const TabsList: React$1.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsListProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
442
564
|
declare const TabsTrigger: React$1.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsTriggerProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
@@ -630,7 +752,10 @@ declare const CommandShortcut: {
|
|
|
630
752
|
declare const ContextMenu: React$1.FC<ContextMenuPrimitive.ContextMenuProps>;
|
|
631
753
|
declare const ContextMenuTrigger: React$1.ForwardRefExoticComponent<ContextMenuPrimitive.ContextMenuTriggerProps & React$1.RefAttributes<HTMLSpanElement>>;
|
|
632
754
|
declare const ContextMenuGroup: React$1.ForwardRefExoticComponent<ContextMenuPrimitive.ContextMenuGroupProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
633
|
-
declare const ContextMenuPortal:
|
|
755
|
+
declare const ContextMenuPortal: {
|
|
756
|
+
({ container, ...props }: ContextMenuPrimitive.ContextMenuPortalProps): React$1.JSX.Element | null;
|
|
757
|
+
displayName: string;
|
|
758
|
+
};
|
|
634
759
|
declare const ContextMenuSub: React$1.FC<ContextMenuPrimitive.ContextMenuSubProps>;
|
|
635
760
|
declare const ContextMenuRadioGroup: React$1.ForwardRefExoticComponent<ContextMenuPrimitive.ContextMenuRadioGroupProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
636
761
|
declare const ContextMenuSubTrigger: React$1.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuSubTriggerProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
@@ -683,7 +808,10 @@ declare const Drawer: {
|
|
|
683
808
|
displayName: string;
|
|
684
809
|
};
|
|
685
810
|
declare const DrawerTrigger: React$1.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
686
|
-
declare const DrawerPortal:
|
|
811
|
+
declare const DrawerPortal: {
|
|
812
|
+
({ container, ...props }: DialogPrimitive.DialogPortalProps): React$1.JSX.Element | null;
|
|
813
|
+
displayName: string;
|
|
814
|
+
};
|
|
687
815
|
declare const DrawerClose: React$1.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
688
816
|
declare const DrawerOverlay: React$1.ForwardRefExoticComponent<Omit<Omit<DialogPrimitive.DialogOverlayProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
689
817
|
declare const DrawerContent: React$1.ForwardRefExoticComponent<Omit<Omit<DialogPrimitive.DialogContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
@@ -745,6 +873,18 @@ declare const FormMessage: React$1.ForwardRefExoticComponent<React$1.HTMLAttribu
|
|
|
745
873
|
* source's "Fixed Add-on" pattern. Border / focus glow / invalid state apply to
|
|
746
874
|
* the whole group.
|
|
747
875
|
*
|
|
876
|
+
* The shell follows the text-entry state contract (TOKENS.md, "Composite fields"): it is ONE field, so it
|
|
877
|
+
* carries the field's edge, hover, focus, invalid, read-only and disabled states, read from the input inside
|
|
878
|
+
* it. Add-ons draw no border of their own except an `InputGroupButton`'s quiet internal divider.
|
|
879
|
+
*
|
|
880
|
+
* rest edge `--muted-foreground` at 80% (3:1 on a card; `--input` was 2.2:1)
|
|
881
|
+
* hover the edge steps to full `--muted-foreground` — never over focus, invalid, read-only or disabled
|
|
882
|
+
* focus the INPUT focused → `--action` edge + `--shadow-focus` on the shell. An add-on button focused
|
|
883
|
+
* → that button's own inset ring, and the shell stays at rest: the ring says which part has focus
|
|
884
|
+
* invalid `aria-invalid="true"` on the input → `--destructive` edge, kept under the pointer and focus
|
|
885
|
+
* read-only `readonly` on the input → the inset `--muted` fill
|
|
886
|
+
* disabled a disabled input → `--opacity-disabled`, inert
|
|
887
|
+
*
|
|
748
888
|
* <InputGroup>
|
|
749
889
|
* <InputGroupText>https://</InputGroupText>
|
|
750
890
|
* <InputGroupInput placeholder="kinetixui.com" />
|
|
@@ -801,7 +941,10 @@ declare const PasswordInput: React$1.ForwardRefExoticComponent<Omit<React$1.Inpu
|
|
|
801
941
|
|
|
802
942
|
declare const MenubarMenu: (props: React$1.ComponentProps<typeof MenubarPrimitive.Menu>) => React$1.JSX.Element;
|
|
803
943
|
declare const MenubarGroup: (props: React$1.ComponentProps<typeof MenubarPrimitive.Group>) => React$1.JSX.Element;
|
|
804
|
-
declare const MenubarPortal:
|
|
944
|
+
declare const MenubarPortal: {
|
|
945
|
+
({ container, ...props }: MenubarPrimitive.MenubarPortalProps): React$1.JSX.Element | null;
|
|
946
|
+
displayName: string;
|
|
947
|
+
};
|
|
805
948
|
declare const MenubarSub: (props: React$1.ComponentProps<typeof MenubarPrimitive.Sub>) => React$1.JSX.Element;
|
|
806
949
|
declare const MenubarRadioGroup: (props: React$1.ComponentProps<typeof MenubarPrimitive.RadioGroup>) => React$1.JSX.Element;
|
|
807
950
|
declare const Menubar: React$1.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
@@ -948,6 +1091,12 @@ declare const informVariants: (props?: ({
|
|
|
948
1091
|
interface InformProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof informVariants> {
|
|
949
1092
|
hideIcon?: boolean;
|
|
950
1093
|
onDismiss?: () => void;
|
|
1094
|
+
/**
|
|
1095
|
+
* Replaces the default dismiss mark (lucide's `X`) with your own icon — any icon library or SVG.
|
|
1096
|
+
* The button keeps its accessible name ("Dismiss") and sizes any SVG inside it to 14px, so the icon
|
|
1097
|
+
* needs no size, colour or aria attributes of its own. See /docs/icons.
|
|
1098
|
+
*/
|
|
1099
|
+
dismissIcon?: React$1.ReactNode;
|
|
951
1100
|
/** optional CTA rendered below the message */
|
|
952
1101
|
action?: {
|
|
953
1102
|
label: React$1.ReactNode;
|
|
@@ -1189,9 +1338,19 @@ declare const Metric: React$1.ForwardRefExoticComponent<MetricProps & React$1.Re
|
|
|
1189
1338
|
|
|
1190
1339
|
/**
|
|
1191
1340
|
* NumberInput — a numeric field with increment / decrement controls.
|
|
1192
|
-
*
|
|
1193
|
-
*
|
|
1194
|
-
*
|
|
1341
|
+
*
|
|
1342
|
+
* The wrapper is ONE field and follows the text-entry state contract (TOKENS.md, "Composite fields"); the
|
|
1343
|
+
* steppers sit inside its edge, separated by quiet internal dividers rather than borders of their own.
|
|
1344
|
+
*
|
|
1345
|
+
* rest edge `--muted-foreground` at 80% (3:1 on a card; `--input` was 2.2:1)
|
|
1346
|
+
* hover the edge steps to full `--muted-foreground` — never over focus, invalid, read-only or disabled
|
|
1347
|
+
* focus the INPUT focused → `--action` edge + `--shadow-focus` on the wrapper. A stepper focused → its
|
|
1348
|
+
* own inset `--ring`, and the wrapper stays at rest, so the ring says which part has focus
|
|
1349
|
+
* invalid `aria-invalid="true"` (passed through to the input) → `--destructive` edge, kept under the
|
|
1350
|
+
* pointer and focus
|
|
1351
|
+
* read-only `readOnly` → the inset `--muted` fill, and the steppers are disabled: a read-only value is
|
|
1352
|
+
* not one a button may change either
|
|
1353
|
+
* disabled `--opacity-disabled`, inert
|
|
1195
1354
|
*/
|
|
1196
1355
|
interface NumberInputProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "type" | "value" | "defaultValue" | "onChange"> {
|
|
1197
1356
|
value?: number;
|
|
@@ -1305,6 +1464,12 @@ declare const ButtonGroupText: React$1.ForwardRefExoticComponent<React$1.HTMLAtt
|
|
|
1305
1464
|
* Matches Input's `inputVariants` styling 1:1 so the two are drop-in
|
|
1306
1465
|
* interchangeable in a Field. Gap-fill addition (not in the original
|
|
1307
1466
|
* Figma source) — matches the shadcn/ui Native Select API shape.
|
|
1467
|
+
*
|
|
1468
|
+
* Same text-entry state contract as Input (TOKENS.md, "Text entry and navigation") — rest edge, hover,
|
|
1469
|
+
* focus, invalid, disabled — minus read-only, which `<select>` does not have. Its placeholder is the
|
|
1470
|
+
* empty-valued option: while it is the selection the field's text is `--muted-foreground`, so an unanswered
|
|
1471
|
+
* select reads as unanswered next to a filled one (it used to render in the value's colour). The options in
|
|
1472
|
+
* the open picker keep `--foreground`.
|
|
1308
1473
|
*/
|
|
1309
1474
|
declare const nativeSelectVariants: (props?: ({
|
|
1310
1475
|
state?: "Default" | "Focus" | "Disabled" | "Error" | null | undefined;
|
|
@@ -1353,6 +1518,12 @@ declare const bannerVariants: (props?: ({
|
|
|
1353
1518
|
interface BannerProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof bannerVariants> {
|
|
1354
1519
|
hideIcon?: boolean;
|
|
1355
1520
|
onDismiss?: () => void;
|
|
1521
|
+
/**
|
|
1522
|
+
* Replaces the default dismiss mark (lucide's `X`) with your own icon — any icon library or SVG.
|
|
1523
|
+
* The button keeps its accessible name ("Dismiss") and sizes any SVG inside it to 14px, so the icon
|
|
1524
|
+
* needs no size, colour or aria attributes of its own. See /docs/icons.
|
|
1525
|
+
*/
|
|
1526
|
+
dismissIcon?: React$1.ReactNode;
|
|
1356
1527
|
/** optional CTA rendered inline after the message */
|
|
1357
1528
|
action?: {
|
|
1358
1529
|
label: React$1.ReactNode;
|
|
@@ -1370,6 +1541,16 @@ declare const Banner: React$1.ForwardRefExoticComponent<BannerProps & React$1.Re
|
|
|
1370
1541
|
* is fixed, not exposed — a segmented control that could go fully
|
|
1371
1542
|
* unselected or multi-select isn't the pattern. Gap-fill addition (not in
|
|
1372
1543
|
* the original Figma source).
|
|
1544
|
+
*
|
|
1545
|
+
* Surfaces follow the surface model (TOKENS.md): the track is an inset well, `--surface-grouped`, and the
|
|
1546
|
+
* chosen segment is a small raised surface on it — `--card`, the Card's half-strength `--border` edge and
|
|
1547
|
+
* `sm` depth. The track used to be `--muted` with a `--background` segment, which in dark mode put the
|
|
1548
|
+
* chosen segment BELOW its track (`--background` is the darkest surface), so it read as a hole.
|
|
1549
|
+
*
|
|
1550
|
+
* States (TOKENS.md, "Selection controls"): an unchosen segment answers the pointer with the same
|
|
1551
|
+
* `--foreground` state layer the other selection controls use (8% hover, 14% pressed) and `--foreground`
|
|
1552
|
+
* text; chosen is surface + edge + depth + `--foreground` text, so it is never colour alone; focus is the
|
|
1553
|
+
* ring; disabled is inert.
|
|
1373
1554
|
*/
|
|
1374
1555
|
type SegmentedControlProps = Omit<ToggleGroupPrimitive.ToggleGroupSingleProps, "type">;
|
|
1375
1556
|
declare const SegmentedControl: React$1.ForwardRefExoticComponent<SegmentedControlProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
@@ -1845,4 +2026,4 @@ declare const MarkdownEditor: React$1.ForwardRefExoticComponent<MarkdownEditorPr
|
|
|
1845
2026
|
/** Merges Tailwind class names, resolving conflicts (clsx + tailwind-merge). */
|
|
1846
2027
|
declare function cn(...inputs: ClassValue[]): string;
|
|
1847
2028
|
|
|
1848
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AppBar, AppBarActions, AppBarBrand, AppBarLink, type AppBarLinkProps, AppBarNav, AspectRatio, AudioPlayer, type AudioPlayerProps, Avatar, AvatarFallback, AvatarGroup, type AvatarGroupProps, AvatarImage, Badge, type BadgeProps, Banner, type BannerProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, type ButtonGroupProps, ButtonGroupSeparator, type ButtonGroupSeparatorProps, ButtonGroupText, type ButtonProps, Calendar, type CalendarProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, type ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox, CircularProgress, type CircularProgressProps, CodeBlock, type CodeBlockFile, type CodeBlockProps, Collapsible, CollapsibleContent, CollapsibleTrigger, ColorPicker, type ColorPickerProps, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ComparisonSlider, type ComparisonSliderProps, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DataGrid, type DataGridColumn, type DataGridProps, type DataGridRange, type DataGridSelection, DataTable, DatePicker, type DatePickerProps, DescriptionList, DescriptionListItem, type DescriptionListItemProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DiffViewer, type DiffViewerProps, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, type EmptyMediaProps, EmptyTitle, Fab, type FabProps, Field, FieldControl, FieldDescription, FieldLabel, FieldMessage, FileUpload, FileUploadItem, type FileUploadItemProps, type FileUploadProps, Footer, FooterBottom, FooterColumn, type FooterColumnProps, FooterLink, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, HoverCard, HoverCardContent, HoverCardTrigger, Image, type ImageProps, Inform, type InformProps, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, type InputProps, JsonViewer, type JsonViewerProps, KanbanBoard, type KanbanBoardProps, type KanbanCard, type KanbanColumn, Kbd, KbdGroup, type KbdGroupProps, type KbdProps, KinetixDirectionProvider, type KinetixDirectionProviderProps, Label, List, ListItem, type ListItemProps, MarkdownEditor, type MarkdownEditorProps, Marquee, type MarqueeProps, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, MessageBubble, type MessageBubbleProps, Metric, type MetricProps, Modal, type ModalProps, type ModalType, MultiSelect, type MultiSelectOption, type MultiSelectProps, NativeSelect, NativeSelectOptGroup, type NativeSelectOptGroupProps, NativeSelectOption, type NativeSelectOptionProps, type NativeSelectProps, NavigationBar, type NavigationBarProps, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NotificationCenter, NotificationCenterContent, type NotificationCenterContentProps, NotificationCenterTrigger, type NotificationCenterTriggerProps, NotificationItem, type NotificationItemProps, NumberInput, type NumberInputProps, PageHeader, type PageHeaderProps, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PasswordInput, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, Quote, type QuoteProps, RadioGroup, RadioGroupItem, Rating, type RatingProps, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, SegmentedControl, SegmentedControlItem, type SegmentedControlProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarProvider, SidebarSeparator, SidebarTrigger, Skeleton, Slider, Spinner, type SpinnerProps, Stepper, type StepperProps, type StepperStep, Switch, TabBar, TabBarItem, type TabBarItemProps, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableOfContents, type TableOfContentsProps, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Tag, type TagProps, Textarea, type TextareaProps, Timeline, type TimelineItem, type TimelineProps, Toaster, type TocItem, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Tour, type TourProps, type TourStep, TreeItem, type TreeItemProps, TreeView, type TreeViewProps, TypingIndicator, type UploadFile, VirtualList, type VirtualListProps, badgeVariants, bannerVariants, buttonVariants, cn, emptyMediaVariants, fabVariants, formatBytes, informVariants, inputVariants, messageVariants, nativeSelectVariants, navigationMenuTriggerStyle, spinnerVariants, tagVariants, textareaVariants, toggleVariants, useAppBar, useFormField, useSidebar };
|
|
2029
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AppBar, AppBarActions, AppBarBrand, AppBarLink, type AppBarLinkProps, AppBarNav, AspectRatio, AudioPlayer, type AudioPlayerProps, Avatar, AvatarFallback, AvatarGroup, type AvatarGroupProps, AvatarImage, Badge, type BadgeProps, Banner, type BannerProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, type ButtonGroupProps, ButtonGroupSeparator, type ButtonGroupSeparatorProps, ButtonGroupText, type ButtonProps, Calendar, type CalendarProps, Card, CardContent, CardDescription, CardFooter, CardHeader, type CardProps, CardTitle, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, type ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox, CircularProgress, type CircularProgressProps, CodeBlock, type CodeBlockFile, type CodeBlockProps, Collapsible, CollapsibleContent, CollapsibleTrigger, ColorPicker, type ColorPickerProps, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ComparisonSlider, type ComparisonSliderProps, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DataGrid, type DataGridColumn, type DataGridProps, type DataGridRange, type DataGridSelection, DataTable, DatePicker, type DatePickerProps, DescriptionList, DescriptionListItem, type DescriptionListItemProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DiffViewer, type DiffViewerProps, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, type EmptyMediaProps, EmptyTitle, Fab, type FabProps, Field, FieldControl, FieldDescription, FieldLabel, FieldMessage, FileUpload, FileUploadItem, type FileUploadItemProps, type FileUploadProps, Footer, FooterBottom, FooterColumn, type FooterColumnProps, FooterLink, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, HoverCard, HoverCardContent, HoverCardTrigger, Image, type ImageProps, Inform, type InformProps, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, type InputProps, JsonViewer, type JsonViewerProps, KanbanBoard, type KanbanBoardProps, type KanbanCard, type KanbanColumn, Kbd, KbdGroup, type KbdGroupProps, type KbdProps, KinetixDirectionProvider, type KinetixDirectionProviderProps, Label, List, ListItem, type ListItemProps, MarkdownEditor, type MarkdownEditorProps, Marquee, type MarqueeProps, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, MessageBubble, type MessageBubbleProps, Metric, type MetricProps, Modal, type ModalProps, type ModalType, MultiSelect, type MultiSelectOption, type MultiSelectProps, NativeSelect, NativeSelectOptGroup, type NativeSelectOptGroupProps, NativeSelectOption, type NativeSelectOptionProps, type NativeSelectProps, NavigationBar, type NavigationBarProps, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NotificationCenter, NotificationCenterContent, type NotificationCenterContentProps, NotificationCenterTrigger, type NotificationCenterTriggerProps, NotificationItem, type NotificationItemProps, NumberInput, type NumberInputProps, PageHeader, type PageHeaderProps, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PasswordInput, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, Quote, type QuoteProps, RadioGroup, RadioGroupItem, Rating, type RatingProps, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, SegmentedControl, SegmentedControlItem, type SegmentedControlProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarProvider, SidebarSeparator, SidebarTrigger, Skeleton, Slider, Spinner, type SpinnerProps, Stepper, type StepperProps, type StepperStep, Switch, TabBar, TabBarItem, type TabBarItemProps, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableOfContents, type TableOfContentsProps, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Tag, type TagProps, Textarea, type TextareaProps, Timeline, type TimelineItem, type TimelineProps, Toaster, type TocItem, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Tour, type TourProps, type TourStep, TreeItem, type TreeItemProps, TreeView, type TreeViewProps, TypingIndicator, type UploadFile, VirtualList, type VirtualListProps, badgeVariants, bannerVariants, buttonVariants, cn, emptyMediaVariants, fabVariants, formatBytes, informVariants, inputVariants, messageVariants, nativeSelectVariants, navigationMenuTriggerStyle, spinnerVariants, tagVariants, textareaVariants, toggleVariants, useAppBar, useFormField, useKinetixPortalContainer, useSidebar };
|