lldlab-ui 0.1.0 → 0.3.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 +706 -51
- package/dist/index.d.ts +952 -89
- package/dist/index.js +2020 -345
- package/dist/index.js.map +1 -1
- package/dist/theme.css +102 -2
- package/package.json +30 -12
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { ElementType, ComponentPropsWithRef, ReactNode, RefObject, KeyboardEvent } from 'react';
|
|
2
|
+
import { ElementType, ComponentPropsWithRef, ReactNode, RefObject, KeyboardEvent, ReactElement, MouseEvent, FocusEvent, Ref } from 'react';
|
|
3
3
|
|
|
4
4
|
declare const BREAKPOINTS: readonly ["base", "sm", "md", "lg", "xl"];
|
|
5
5
|
type Breakpoint = (typeof BREAKPOINTS)[number];
|
|
@@ -35,7 +35,7 @@ type ThemeProps<E extends ElementType = 'div'> = PolyProps<E, {
|
|
|
35
35
|
/** Scopes the colour tokens: everything inside renders in `tone`. */
|
|
36
36
|
declare function Theme<E extends ElementType = 'div'>({ as, tone, ...rest }: ThemeProps<E>): react.JSX.Element;
|
|
37
37
|
|
|
38
|
-
type SurfaceTone = 'surface' | 'subtle' | 'elevated' | 'low' | 'inverse';
|
|
38
|
+
type SurfaceTone = 'surface' | 'subtle' | 'elevated' | 'low' | 'container' | 'inverse';
|
|
39
39
|
declare const RADIUS: {
|
|
40
40
|
readonly none: "";
|
|
41
41
|
readonly sm: "rounded";
|
|
@@ -47,7 +47,7 @@ declare const BORDER: {
|
|
|
47
47
|
readonly subtle: "border border-border-subtle";
|
|
48
48
|
readonly strong: "border border-border-strong";
|
|
49
49
|
};
|
|
50
|
-
declare const SHADOW: {
|
|
50
|
+
declare const SHADOW$1: {
|
|
51
51
|
readonly none: "";
|
|
52
52
|
readonly sm: "shadow-sm";
|
|
53
53
|
readonly md: "shadow-md";
|
|
@@ -57,10 +57,12 @@ type BoxOwnProps = {
|
|
|
57
57
|
radius?: keyof typeof RADIUS;
|
|
58
58
|
tone?: SurfaceTone;
|
|
59
59
|
border?: keyof typeof BORDER;
|
|
60
|
-
shadow?: keyof typeof SHADOW;
|
|
60
|
+
shadow?: keyof typeof SHADOW$1;
|
|
61
|
+
/** Greys out and disables the content (inert), e.g. a panel waiting on a runtime. */
|
|
62
|
+
dimmed?: boolean;
|
|
61
63
|
};
|
|
62
64
|
type BoxProps<E extends ElementType = 'div'> = PolyProps<E, BoxOwnProps>;
|
|
63
|
-
declare function Box<E extends ElementType = 'div'>({ as, padding, radius, tone, border, shadow, ...rest }: BoxProps<E>): react.JSX.Element;
|
|
65
|
+
declare function Box<E extends ElementType = 'div'>({ as, padding, radius, tone, border, shadow, dimmed, ...rest }: BoxProps<E>): react.JSX.Element;
|
|
64
66
|
|
|
65
67
|
type StackOwnProps = {
|
|
66
68
|
direction?: Responsive<Direction>;
|
|
@@ -78,18 +80,24 @@ type GridProps<E extends ElementType = 'div'> = PolyProps<E, {
|
|
|
78
80
|
}>;
|
|
79
81
|
/** Single column below md unless `cols` sets `base` explicitly. */
|
|
80
82
|
declare function Grid<E extends ElementType = 'div'>({ as, cols, gap, ...rest }: GridProps<E>): react.JSX.Element;
|
|
83
|
+
type GridItemProps<E extends ElementType = 'div'> = PolyProps<E, {
|
|
84
|
+
span?: Responsive<Cols>;
|
|
85
|
+
}>;
|
|
86
|
+
/** A grid cell that spans several columns (e.g. a brand column over 2 of 5). */
|
|
87
|
+
declare function GridItem<E extends ElementType = 'div'>({ as, span, ...rest }: GridItemProps<E>): react.JSX.Element;
|
|
81
88
|
|
|
82
|
-
declare const SIZE$
|
|
89
|
+
declare const SIZE$e: {
|
|
83
90
|
readonly md: "max-w-3xl";
|
|
84
91
|
readonly lg: "max-w-5xl";
|
|
85
92
|
readonly xl: "max-w-7xl";
|
|
86
93
|
};
|
|
87
94
|
type ContainerProps<E extends ElementType = 'div'> = PolyProps<E, {
|
|
88
|
-
size?: keyof typeof SIZE$
|
|
95
|
+
size?: keyof typeof SIZE$e;
|
|
89
96
|
}>;
|
|
90
97
|
declare function Container<E extends ElementType = 'div'>({ as, size, ...rest }: ContainerProps<E>): react.JSX.Element;
|
|
91
98
|
|
|
92
99
|
declare const PADDING: {
|
|
100
|
+
readonly none: "";
|
|
93
101
|
readonly md: "py-section-md";
|
|
94
102
|
readonly lg: "py-section-lg";
|
|
95
103
|
readonly xl: "py-section-xl";
|
|
@@ -97,38 +105,54 @@ declare const PADDING: {
|
|
|
97
105
|
declare const PATTERN$1: {
|
|
98
106
|
readonly none: "";
|
|
99
107
|
readonly dots: "bg-pattern-dots";
|
|
108
|
+
readonly 'dots-brand': "bg-pattern-dots-brand";
|
|
100
109
|
readonly grid: "bg-pattern-grid";
|
|
101
110
|
};
|
|
102
111
|
type SectionProps<E extends ElementType = 'section'> = PolyProps<E, {
|
|
103
112
|
tone?: SurfaceTone;
|
|
113
|
+
/** Fluid section rhythm; ignored on a side when paddingTop/paddingBottom is set. */
|
|
104
114
|
padding?: keyof typeof PADDING;
|
|
115
|
+
/** Fixed spacing-scale padding, for mockup-exact rhythm (e.g. 40px top, 64px bottom). */
|
|
116
|
+
paddingTop?: Responsive<Space>;
|
|
117
|
+
paddingBottom?: Responsive<Space>;
|
|
105
118
|
pattern?: keyof typeof PATTERN$1;
|
|
106
119
|
}>;
|
|
107
|
-
declare function Section<E extends ElementType = 'section'>({ as, tone, padding, pattern, ...rest }: SectionProps<E>): react.JSX.Element;
|
|
120
|
+
declare function Section<E extends ElementType = 'section'>({ as, tone, padding, paddingTop, paddingBottom, pattern, ...rest }: SectionProps<E>): react.JSX.Element;
|
|
108
121
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
readonly
|
|
112
|
-
readonly
|
|
122
|
+
type Ratio = '8/4' | '1/1' | '9/3' | '7/5' | '5/7';
|
|
123
|
+
declare const STICKY_ASIDE: {
|
|
124
|
+
readonly none: "xl:sticky xl:top-space-lg xl:self-start";
|
|
125
|
+
readonly appbar: "xl:sticky xl:top-[calc(var(--spacing-appbar)+1rem)] xl:self-start";
|
|
113
126
|
};
|
|
114
127
|
type SplitProps = NativeProps<'div', {
|
|
115
|
-
ratio?:
|
|
128
|
+
ratio?: Ratio;
|
|
129
|
+
/** Where the two columns stop stacking (default xl). */
|
|
130
|
+
breakpoint?: 'lg' | 'xl';
|
|
131
|
+
/** Render the side column as a plain div when it isn't complementary content (e.g. a hero stats card). */
|
|
132
|
+
asideAs?: 'aside' | 'div';
|
|
116
133
|
aside: ReactNode;
|
|
134
|
+
/** Leading rail (e.g. a table of contents) shown from lg; with it the layout is 3/7/2… columns and `ratio` is ignored. */
|
|
135
|
+
start?: ReactNode;
|
|
117
136
|
sticky?: boolean;
|
|
137
|
+
/** Clear a sticky AppBar when sticking. */
|
|
138
|
+
stickyOffset?: keyof typeof STICKY_ASIDE;
|
|
118
139
|
gap?: Responsive<Space>;
|
|
119
140
|
children: ReactNode;
|
|
120
141
|
}>;
|
|
121
|
-
/** Main + aside
|
|
122
|
-
declare function Split({ ratio, aside, sticky, gap, children, ...rest }: SplitProps): react.JSX.Element;
|
|
142
|
+
/** Main + aside (stacked below xl); optional start rail from lg. */
|
|
143
|
+
declare function Split({ ratio, breakpoint, asideAs, aside, start, sticky, stickyOffset, gap, children, ...rest }: SplitProps): react.JSX.Element;
|
|
123
144
|
|
|
124
|
-
declare const SIZE$
|
|
145
|
+
declare const SIZE$d: {
|
|
146
|
+
readonly xs: "text-[14px]";
|
|
125
147
|
readonly sm: "text-[16px]";
|
|
148
|
+
readonly ms: "text-[18px]";
|
|
126
149
|
readonly md: "text-[20px]";
|
|
127
150
|
readonly lg: "text-[24px]";
|
|
151
|
+
readonly xl: "text-[32px]";
|
|
128
152
|
};
|
|
129
153
|
type IconProps = NativeProps<'span', {
|
|
130
154
|
name: string;
|
|
131
|
-
size?: keyof typeof SIZE$
|
|
155
|
+
size?: keyof typeof SIZE$d;
|
|
132
156
|
tone?: Tone | 'inherit';
|
|
133
157
|
filled?: boolean;
|
|
134
158
|
spin?: boolean;
|
|
@@ -138,24 +162,27 @@ type IconProps = NativeProps<'span', {
|
|
|
138
162
|
/** Material Symbols Outlined ligature icon. The app loads the font. */
|
|
139
163
|
declare function Icon({ name, size, tone, filled, spin, label, ...rest }: IconProps): react.JSX.Element;
|
|
140
164
|
|
|
141
|
-
declare const SIZE$
|
|
165
|
+
declare const SIZE$c: {
|
|
142
166
|
readonly sm: "size-1.5";
|
|
143
167
|
readonly md: "size-2";
|
|
168
|
+
readonly lg: "size-3";
|
|
144
169
|
};
|
|
145
170
|
type DotProps = NativeProps<'span', {
|
|
146
171
|
tone?: StatusTone;
|
|
147
|
-
size?: keyof typeof SIZE$
|
|
172
|
+
size?: keyof typeof SIZE$c;
|
|
148
173
|
pulse?: boolean;
|
|
149
174
|
children?: never;
|
|
150
175
|
}>;
|
|
151
176
|
declare function Dot({ tone, size, pulse, ...rest }: DotProps): react.JSX.Element;
|
|
152
177
|
|
|
153
|
-
declare const VARIANT$
|
|
178
|
+
declare const VARIANT$8: {
|
|
154
179
|
readonly 'body-lead': "font-body-lead text-body-lead";
|
|
155
180
|
readonly 'body-md': "font-body-md text-body-md";
|
|
156
181
|
readonly 'body-sm': "font-body-sm text-body-sm";
|
|
157
|
-
readonly label: "font-label-mono text-label-mono
|
|
182
|
+
readonly label: "font-label-mono text-label-mono";
|
|
158
183
|
readonly code: "font-code-inline text-code-inline";
|
|
184
|
+
/** Inherits font and size from the parent (inline highlights inside a Heading). */
|
|
185
|
+
readonly inherit: "";
|
|
159
186
|
};
|
|
160
187
|
declare const WEIGHT: {
|
|
161
188
|
readonly regular: "";
|
|
@@ -168,15 +195,27 @@ declare const CLAMP: {
|
|
|
168
195
|
readonly 3: "line-clamp-3";
|
|
169
196
|
readonly 4: "line-clamp-4";
|
|
170
197
|
};
|
|
198
|
+
declare const ALIGN$1: {
|
|
199
|
+
readonly start: "text-start";
|
|
200
|
+
readonly center: "text-center";
|
|
201
|
+
readonly end: "text-end";
|
|
202
|
+
};
|
|
171
203
|
type TextOwnProps = {
|
|
172
|
-
variant?: keyof typeof VARIANT$
|
|
204
|
+
variant?: keyof typeof VARIANT$8;
|
|
173
205
|
tone?: Tone;
|
|
174
206
|
weight?: keyof typeof WEIGHT;
|
|
175
207
|
truncate?: boolean;
|
|
176
208
|
clamp?: keyof typeof CLAMP;
|
|
209
|
+
align?: keyof typeof ALIGN$1;
|
|
210
|
+
/** Limit line length to a readable measure. */
|
|
211
|
+
measure?: boolean;
|
|
212
|
+
/** Defaults to true for `label`, false otherwise. */
|
|
213
|
+
uppercase?: boolean;
|
|
214
|
+
/** Decorative wavy underline (hero highlight). */
|
|
215
|
+
underline?: 'wavy';
|
|
177
216
|
};
|
|
178
217
|
type TextProps<E extends ElementType = 'p'> = PolyProps<E, TextOwnProps>;
|
|
179
|
-
declare function Text<E extends ElementType = 'p'>({ as, variant, tone, weight, truncate, clamp, ...rest }: TextProps<E>): react.JSX.Element;
|
|
218
|
+
declare function Text<E extends ElementType = 'p'>({ as, variant, tone, weight, truncate, clamp, align, measure, uppercase, underline, ...rest }: TextProps<E>): react.JSX.Element;
|
|
180
219
|
|
|
181
220
|
declare const TAG: {
|
|
182
221
|
readonly 1: "h1";
|
|
@@ -184,111 +223,208 @@ declare const TAG: {
|
|
|
184
223
|
readonly 3: "h3";
|
|
185
224
|
readonly 4: "h4";
|
|
186
225
|
};
|
|
187
|
-
declare const TONE$
|
|
226
|
+
declare const TONE$b: {
|
|
188
227
|
readonly default: "text-ink";
|
|
189
228
|
readonly muted: "text-on-surface-variant";
|
|
190
229
|
readonly brand: "text-fg-brand";
|
|
191
230
|
readonly inverse: "text-on-primary";
|
|
231
|
+
readonly success: "text-fg-success";
|
|
232
|
+
readonly danger: "text-fg-danger";
|
|
233
|
+
readonly warning: "text-fg-warning";
|
|
234
|
+
};
|
|
235
|
+
declare const ALIGN: {
|
|
236
|
+
readonly start: "";
|
|
237
|
+
readonly center: "text-center";
|
|
192
238
|
};
|
|
193
239
|
type HeadingProps = NativeProps<'h2', {
|
|
194
240
|
level: keyof typeof TAG;
|
|
195
241
|
size?: Responsive<HeadingSize>;
|
|
196
|
-
tone?: keyof typeof TONE$
|
|
242
|
+
tone?: keyof typeof TONE$b;
|
|
243
|
+
truncate?: boolean;
|
|
244
|
+
align?: keyof typeof ALIGN;
|
|
245
|
+
/** Balanced line breaks (default true). */
|
|
246
|
+
balance?: boolean;
|
|
247
|
+
/** Override the size's line height (none: 1, for tight hero headlines). */
|
|
248
|
+
leading?: 'none';
|
|
197
249
|
}>;
|
|
198
|
-
declare function Heading({ level, size, tone, ...rest }: HeadingProps): react.JSX.Element;
|
|
250
|
+
declare function Heading({ level, size, tone, truncate, align, balance, leading, ...rest }: HeadingProps): react.JSX.Element;
|
|
199
251
|
|
|
252
|
+
declare const VARIANT$7: {
|
|
253
|
+
readonly pill: "rounded-full bg-surface-elevated shadow-sm px-space-sm py-space-2xs";
|
|
254
|
+
readonly tinted: "rounded-full bg-surface-container px-space-sm py-space-2xs";
|
|
255
|
+
readonly plain: "";
|
|
256
|
+
};
|
|
200
257
|
type EyebrowProps = NativeProps<'span', {
|
|
201
258
|
tone?: StatusTone;
|
|
259
|
+
pulse?: boolean;
|
|
260
|
+
variant?: keyof typeof VARIANT$7;
|
|
261
|
+
dot?: boolean;
|
|
202
262
|
children: ReactNode;
|
|
203
263
|
}>;
|
|
204
|
-
|
|
264
|
+
/** Mono kicker above a heading; the text takes the tone colour, as in the Stitch mockups. */
|
|
265
|
+
declare function Eyebrow({ tone, pulse, variant, dot, children, ...rest }: EyebrowProps): react.JSX.Element;
|
|
205
266
|
|
|
206
267
|
type CodeProps = NativeProps<'code', {
|
|
207
268
|
children: ReactNode;
|
|
208
269
|
}>;
|
|
209
270
|
declare function Code({ children, ...rest }: CodeProps): react.JSX.Element;
|
|
210
271
|
|
|
272
|
+
declare const TONE$a: {
|
|
273
|
+
readonly dark: {
|
|
274
|
+
readonly root: "bg-brand-obsidian";
|
|
275
|
+
readonly header: "border-white/10 text-slate-300";
|
|
276
|
+
};
|
|
277
|
+
readonly subtle: {
|
|
278
|
+
readonly root: "code-subtle border border-border-subtle bg-code-bg-subtle";
|
|
279
|
+
readonly header: "border-border-subtle text-on-surface-variant";
|
|
280
|
+
};
|
|
281
|
+
};
|
|
211
282
|
type CodeBlockProps = NativeProps<'figure', {
|
|
212
283
|
language?: string;
|
|
284
|
+
/** Syntax-highlight string children (ts, tsx, js, jsx, python, go, java, json, bash). */
|
|
285
|
+
highlight?: boolean;
|
|
286
|
+
title?: ReactNode;
|
|
287
|
+
meta?: ReactNode;
|
|
288
|
+
actions?: ReactNode;
|
|
289
|
+
lineNumbers?: boolean;
|
|
290
|
+
tone?: keyof typeof TONE$a;
|
|
213
291
|
children: ReactNode;
|
|
292
|
+
/** Code only: no caption bar, frame or padding (inside a pane that provides them). */
|
|
293
|
+
bare?: boolean;
|
|
214
294
|
}>;
|
|
215
|
-
/**
|
|
216
|
-
declare function CodeBlock({ language, children, ...rest }: CodeBlockProps): react.JSX.Element;
|
|
295
|
+
/** Code block; scrolls inside itself so long lines never widen the page. */
|
|
296
|
+
declare function CodeBlock({ language, highlight, title, meta, actions, lineNumbers, tone, bare, children, ...rest }: CodeBlockProps): react.JSX.Element;
|
|
217
297
|
|
|
218
298
|
type MarkdownProps = NativeProps<'div', {
|
|
219
299
|
children: string;
|
|
220
300
|
}>;
|
|
221
301
|
declare function Markdown({ children, ...rest }: MarkdownProps): react.JSX.Element;
|
|
222
302
|
|
|
223
|
-
type BadgeTone = 'neutral' | 'brand' | 'success' | 'warning' | 'danger' | 'info';
|
|
224
|
-
declare const SIZE$
|
|
303
|
+
type BadgeTone = 'neutral' | 'subtle' | 'container' | 'brand' | 'success' | 'warning' | 'danger' | 'info';
|
|
304
|
+
declare const SIZE$b: {
|
|
305
|
+
readonly xs: "px-space-xs py-space-2xs text-[10px]";
|
|
225
306
|
readonly sm: "px-space-xs py-space-2xs";
|
|
226
307
|
readonly md: "px-space-sm py-space-xs";
|
|
227
308
|
};
|
|
309
|
+
declare const SHAPE$3: {
|
|
310
|
+
readonly square: "rounded";
|
|
311
|
+
readonly pill: "rounded-full";
|
|
312
|
+
};
|
|
228
313
|
type BadgeProps = NativeProps<'span', {
|
|
229
314
|
tone?: BadgeTone;
|
|
230
315
|
uppercase?: boolean;
|
|
231
|
-
size?: keyof typeof SIZE$
|
|
316
|
+
size?: keyof typeof SIZE$b;
|
|
317
|
+
/** square: 2px corners; pill: fully rounded (nav counts, eyebrows). */
|
|
318
|
+
shape?: keyof typeof SHAPE$3;
|
|
319
|
+
/** Hairline border in the tone's own colour. */
|
|
320
|
+
outlined?: boolean;
|
|
321
|
+
icon?: string;
|
|
322
|
+
dot?: StatusTone;
|
|
323
|
+
pulse?: boolean;
|
|
232
324
|
children: ReactNode;
|
|
233
325
|
}>;
|
|
234
|
-
declare function Badge({ tone, uppercase, size, children, ...rest }: BadgeProps): react.JSX.Element;
|
|
326
|
+
declare function Badge({ tone, uppercase, size, shape, outlined, icon, dot, pulse, children, ...rest }: BadgeProps): react.JSX.Element;
|
|
235
327
|
|
|
236
|
-
declare const TONE$
|
|
328
|
+
declare const TONE$9: {
|
|
237
329
|
readonly neutral: "border-border-subtle text-on-surface";
|
|
238
330
|
readonly brand: "border-brand-cobalt/40 text-fg-brand";
|
|
331
|
+
readonly info: "border-brand-cobalt/40 text-fg-brand";
|
|
332
|
+
readonly success: "border-fg-success/40 text-fg-success";
|
|
333
|
+
readonly warning: "border-fg-warning/40 text-fg-warning";
|
|
334
|
+
readonly danger: "border-fg-danger/40 text-fg-danger";
|
|
239
335
|
};
|
|
240
336
|
type ChipProps = NativeProps<'span', {
|
|
241
|
-
tone?: keyof typeof TONE$
|
|
337
|
+
tone?: keyof typeof TONE$9;
|
|
242
338
|
icon?: string;
|
|
339
|
+
/** A status tone, or any CSS colour (e.g. a language brand colour). */
|
|
340
|
+
dot?: StatusTone | string;
|
|
243
341
|
onRemove?: () => void;
|
|
244
342
|
children: string;
|
|
245
343
|
}>;
|
|
246
|
-
declare function Chip({ tone, icon, onRemove, children, ...rest }: ChipProps): react.JSX.Element;
|
|
344
|
+
declare function Chip({ tone, icon, dot, onRemove, children, ...rest }: ChipProps): react.JSX.Element;
|
|
247
345
|
|
|
346
|
+
declare const ICON_TONE: {
|
|
347
|
+
readonly muted: "text-on-surface-variant";
|
|
348
|
+
readonly brand: "text-brand-cobalt";
|
|
349
|
+
readonly success: "text-brand-emerald";
|
|
350
|
+
readonly warning: "text-brand-amber";
|
|
351
|
+
readonly danger: "text-brand-crimson";
|
|
352
|
+
};
|
|
353
|
+
declare const VARIANT$6: {
|
|
354
|
+
readonly plain: "gap-space-sm";
|
|
355
|
+
readonly tile: "gap-space-xs rounded-lg bg-surface-subtle px-space-md py-space-xs shadow-sm";
|
|
356
|
+
};
|
|
248
357
|
type StatProps = NativeProps<'div', {
|
|
249
358
|
icon: string;
|
|
250
359
|
label: ReactNode;
|
|
251
360
|
value: ReactNode;
|
|
361
|
+
variant?: keyof typeof VARIANT$6;
|
|
362
|
+
iconTone?: keyof typeof ICON_TONE;
|
|
252
363
|
}>;
|
|
253
|
-
declare function Stat({ icon, label, value, ...rest }: StatProps): react.JSX.Element;
|
|
364
|
+
declare function Stat({ icon, label, value, variant, iconTone, ...rest }: StatProps): react.JSX.Element;
|
|
254
365
|
|
|
255
|
-
declare const TONE$
|
|
366
|
+
declare const TONE$8: {
|
|
256
367
|
readonly brand: "bg-brand-cobalt";
|
|
257
368
|
readonly success: "bg-brand-emerald";
|
|
258
369
|
readonly warning: "bg-brand-amber";
|
|
259
370
|
readonly danger: "bg-brand-crimson";
|
|
260
371
|
};
|
|
372
|
+
declare const SIZE$a: {
|
|
373
|
+
readonly sm: "h-1";
|
|
374
|
+
readonly md: "h-1.5";
|
|
375
|
+
};
|
|
261
376
|
type ProgressBarProps = NativeProps<'div', {
|
|
262
377
|
value: number;
|
|
263
378
|
max?: number;
|
|
264
|
-
tone?: keyof typeof TONE$
|
|
265
|
-
label:
|
|
379
|
+
tone?: keyof typeof TONE$8;
|
|
380
|
+
label: ReactNode;
|
|
266
381
|
hideLabel?: boolean;
|
|
382
|
+
/** Replaces the computed percentage (e.g. "7 of 12"). */
|
|
383
|
+
valueLabel?: ReactNode;
|
|
384
|
+
caption?: ReactNode;
|
|
385
|
+
size?: keyof typeof SIZE$a;
|
|
267
386
|
}>;
|
|
268
|
-
declare function ProgressBar({ value, max, tone, label, hideLabel, ...rest }: ProgressBarProps): react.JSX.Element;
|
|
387
|
+
declare function ProgressBar({ value, max, tone, label, hideLabel, valueLabel, caption, size, ...rest }: ProgressBarProps): react.JSX.Element;
|
|
269
388
|
|
|
270
389
|
type SectionHeaderProps = NativeProps<'div', {
|
|
271
390
|
title: ReactNode;
|
|
272
391
|
level?: 2 | 3;
|
|
273
392
|
dot?: StatusTone;
|
|
274
393
|
tag?: ReactNode;
|
|
394
|
+
tagTone?: BadgeTone;
|
|
275
395
|
meta?: ReactNode;
|
|
396
|
+
description?: ReactNode;
|
|
397
|
+
icon?: string;
|
|
398
|
+
accent?: StatusTone;
|
|
399
|
+
size?: 'sm' | 'md';
|
|
400
|
+
/** Rule under the header (default true). Without it the dot grows to 12px, as on catalog tier headers. */
|
|
401
|
+
divider?: boolean;
|
|
402
|
+
metaUppercase?: boolean;
|
|
276
403
|
}>;
|
|
277
|
-
declare function SectionHeader({ title, level, dot, tag, meta, ...rest }: SectionHeaderProps): react.JSX.Element;
|
|
404
|
+
declare function SectionHeader({ title, level, dot, tag, tagTone, meta, description, icon, accent, size, divider, metaUppercase, ...rest }: SectionHeaderProps): react.JSX.Element;
|
|
278
405
|
|
|
279
|
-
declare const TONE$
|
|
406
|
+
declare const TONE$7: {
|
|
280
407
|
readonly danger: "bg-badge-advanced-bg text-badge-advanced-text";
|
|
281
408
|
readonly info: "bg-badge-intermediate-bg text-badge-intermediate-text";
|
|
282
409
|
readonly success: "bg-badge-beginner-bg text-badge-beginner-text";
|
|
283
410
|
readonly warning: "bg-badge-amber-bg text-badge-amber-text";
|
|
284
411
|
};
|
|
412
|
+
declare const SIZE$9: {
|
|
413
|
+
readonly sm: "gap-space-xs rounded-lg p-space-sm";
|
|
414
|
+
readonly md: "gap-space-sm rounded-xl p-space-md";
|
|
415
|
+
};
|
|
285
416
|
type CalloutProps = NativeProps<'div', {
|
|
286
|
-
tone?: keyof typeof TONE$
|
|
417
|
+
tone?: keyof typeof TONE$7;
|
|
287
418
|
title?: ReactNode;
|
|
288
419
|
action?: ReactNode;
|
|
420
|
+
/** false for static content (pros/cons): no status/alert role. */
|
|
421
|
+
live?: boolean;
|
|
422
|
+
icon?: string;
|
|
423
|
+
size?: keyof typeof SIZE$9;
|
|
424
|
+
accent?: boolean;
|
|
289
425
|
children: ReactNode;
|
|
290
426
|
}>;
|
|
291
|
-
declare function Callout({ tone, title, action, children, ...rest }: CalloutProps): react.JSX.Element;
|
|
427
|
+
declare function Callout({ tone, title, action, live, icon, size, accent, children, ...rest }: CalloutProps): react.JSX.Element;
|
|
292
428
|
|
|
293
429
|
declare const STATUS: {
|
|
294
430
|
readonly pass: {
|
|
@@ -301,19 +437,32 @@ declare const STATUS: {
|
|
|
301
437
|
readonly tone: "danger";
|
|
302
438
|
readonly label: "Failed";
|
|
303
439
|
};
|
|
440
|
+
readonly warning: {
|
|
441
|
+
readonly icon: "warning";
|
|
442
|
+
readonly tone: "warning";
|
|
443
|
+
readonly label: "Warning";
|
|
444
|
+
};
|
|
304
445
|
readonly pending: {
|
|
305
446
|
readonly icon: "schedule";
|
|
306
447
|
readonly tone: "muted";
|
|
307
448
|
readonly label: "Pending";
|
|
308
449
|
};
|
|
309
450
|
};
|
|
451
|
+
declare const VARIANT$5: {
|
|
452
|
+
readonly plain: "items-start py-space-sm";
|
|
453
|
+
readonly boxed: "items-center rounded bg-surface-subtle p-space-sm";
|
|
454
|
+
};
|
|
310
455
|
type ResultRowProps = NativeProps<'div', {
|
|
311
456
|
status: keyof typeof STATUS;
|
|
312
457
|
title: ReactNode;
|
|
313
458
|
detail?: ReactNode;
|
|
314
459
|
meta?: ReactNode;
|
|
460
|
+
badge?: ReactNode;
|
|
461
|
+
variant?: keyof typeof VARIANT$5;
|
|
462
|
+
selected?: boolean;
|
|
463
|
+
titleMono?: boolean;
|
|
315
464
|
}>;
|
|
316
|
-
declare function ResultRow({ status, title, detail, meta, ...rest }: ResultRowProps): react.JSX.Element;
|
|
465
|
+
declare function ResultRow({ status, title, detail, meta, badge, variant, selected, titleMono, ...rest }: ResultRowProps): react.JSX.Element;
|
|
317
466
|
|
|
318
467
|
type MessageProps = NativeProps<'p', {
|
|
319
468
|
tone?: 'default' | 'danger';
|
|
@@ -322,23 +471,58 @@ type MessageProps = NativeProps<'p', {
|
|
|
322
471
|
/** Short loading / error / empty text. Danger announces as an alert. */
|
|
323
472
|
declare function Message({ tone, children, ...rest }: MessageProps): react.JSX.Element;
|
|
324
473
|
|
|
474
|
+
declare const TONE$6: {
|
|
475
|
+
readonly default: {
|
|
476
|
+
readonly tile: "bg-surface-muted text-on-surface-variant";
|
|
477
|
+
readonly text: "text-on-surface-variant";
|
|
478
|
+
};
|
|
479
|
+
readonly danger: {
|
|
480
|
+
readonly tile: "bg-badge-advanced-bg text-badge-advanced-text";
|
|
481
|
+
readonly text: "text-fg-danger";
|
|
482
|
+
};
|
|
483
|
+
};
|
|
325
484
|
type EmptyStateProps = NativeProps<'div', {
|
|
326
485
|
icon?: string;
|
|
327
486
|
title: ReactNode;
|
|
328
487
|
description?: ReactNode;
|
|
329
488
|
action?: ReactNode;
|
|
489
|
+
/** Illustration that replaces the icon. */
|
|
490
|
+
media?: ReactNode;
|
|
491
|
+
/** Large mono numeral such as "404"; replaces the icon. */
|
|
492
|
+
code?: string;
|
|
493
|
+
tone?: keyof typeof TONE$6;
|
|
494
|
+
/** Heading level for the title (1 when the state is the whole page). */
|
|
495
|
+
headingLevel?: 1 | 2 | 3;
|
|
330
496
|
}>;
|
|
331
|
-
declare function EmptyState({ icon, title, description, action, ...rest }: EmptyStateProps): react.JSX.Element;
|
|
497
|
+
declare function EmptyState({ icon, title, description, action, media, code, tone, headingLevel, ...rest }: EmptyStateProps): react.JSX.Element;
|
|
332
498
|
|
|
333
499
|
type CheckListProps = NativeProps<'ul', {
|
|
334
500
|
items: ReactNode[];
|
|
501
|
+
icon?: string;
|
|
502
|
+
tone?: Tone;
|
|
335
503
|
children?: never;
|
|
336
504
|
}>;
|
|
337
|
-
declare function CheckList({ items, ...rest }: CheckListProps): react.JSX.Element;
|
|
505
|
+
declare function CheckList({ items, icon, tone, ...rest }: CheckListProps): react.JSX.Element;
|
|
338
506
|
|
|
339
|
-
declare const TONE$
|
|
340
|
-
readonly default: "bg-surface-elevated
|
|
341
|
-
readonly
|
|
507
|
+
declare const TONE$5: {
|
|
508
|
+
readonly default: "bg-surface-elevated text-on-surface";
|
|
509
|
+
readonly subtle: "bg-surface-subtle text-on-surface";
|
|
510
|
+
readonly inverse: "bg-brand-obsidian text-on-primary";
|
|
511
|
+
};
|
|
512
|
+
declare const SHADOW: {
|
|
513
|
+
readonly none: "";
|
|
514
|
+
readonly sm: "shadow-sm";
|
|
515
|
+
readonly md: "shadow-md";
|
|
516
|
+
readonly xl: "shadow-xl";
|
|
517
|
+
};
|
|
518
|
+
declare const BAR_TONE: {
|
|
519
|
+
readonly default: "bg-surface-subtle";
|
|
520
|
+
readonly slate: "bg-brand-slate";
|
|
521
|
+
readonly none: "";
|
|
522
|
+
};
|
|
523
|
+
declare const BAR_DENSITY: {
|
|
524
|
+
readonly md: "px-space-lg py-space-sm";
|
|
525
|
+
readonly sm: "px-space-md py-space-sm";
|
|
342
526
|
};
|
|
343
527
|
declare const PATTERN: {
|
|
344
528
|
readonly none: "";
|
|
@@ -350,107 +534,210 @@ declare const ASPECT: {
|
|
|
350
534
|
readonly wide: "aspect-[21/9]";
|
|
351
535
|
readonly square: "aspect-square";
|
|
352
536
|
};
|
|
537
|
+
declare const HEIGHT$3: {
|
|
538
|
+
readonly sm: "h-30";
|
|
539
|
+
readonly md: "h-35";
|
|
540
|
+
};
|
|
541
|
+
type BarProps = {
|
|
542
|
+
/** Hairline between the bar and the body (default false: Stitch bars are tinted, not ruled). */
|
|
543
|
+
divider?: boolean;
|
|
544
|
+
/** md: 24px sides; sm: 16px sides. */
|
|
545
|
+
density?: keyof typeof BAR_DENSITY;
|
|
546
|
+
/** slate: the #1E293B toolbar used on dark workbench cards. */
|
|
547
|
+
tone?: keyof typeof BAR_TONE;
|
|
548
|
+
};
|
|
549
|
+
type CardHeaderProps = NativeProps<'div', BarProps & {
|
|
550
|
+
start?: ReactNode;
|
|
551
|
+
end?: ReactNode;
|
|
552
|
+
children?: ReactNode;
|
|
553
|
+
}>;
|
|
353
554
|
type CardMediaProps = NativeProps<'div', {
|
|
354
555
|
pattern?: keyof typeof PATTERN;
|
|
355
556
|
aspect?: keyof typeof ASPECT;
|
|
557
|
+
/** Fixed height instead of an aspect ratio (120px / 140px). */
|
|
558
|
+
height?: keyof typeof HEIGHT$3;
|
|
559
|
+
caption?: ReactNode;
|
|
356
560
|
children?: ReactNode;
|
|
357
561
|
}>;
|
|
358
|
-
type CardFooterProps = NativeProps<'div', {
|
|
562
|
+
type CardFooterProps = NativeProps<'div', BarProps & {
|
|
359
563
|
children: ReactNode;
|
|
360
564
|
}>;
|
|
361
|
-
declare function
|
|
362
|
-
declare function
|
|
565
|
+
declare function CardHeader({ start, end, children, divider, density, tone, ...rest }: CardHeaderProps): react.JSX.Element;
|
|
566
|
+
declare function CardMedia({ pattern, aspect, height, caption, children, ...rest }: CardMediaProps): react.JSX.Element;
|
|
567
|
+
declare function CardFooter({ children, divider, density, tone, ...rest }: CardFooterProps): react.JSX.Element;
|
|
363
568
|
type CardOwnProps = {
|
|
364
569
|
padding?: Responsive<Space>;
|
|
365
570
|
interactive?: boolean;
|
|
366
|
-
tone?: keyof typeof TONE$
|
|
571
|
+
tone?: keyof typeof TONE$5;
|
|
572
|
+
pattern?: keyof typeof PATTERN;
|
|
573
|
+
/** Resting shadow (default sm). */
|
|
574
|
+
shadow?: keyof typeof SHADOW;
|
|
575
|
+
/** Adds a 1px border-subtle hairline. */
|
|
576
|
+
outlined?: boolean;
|
|
577
|
+
/** Gap between body children (default sm, 8px). */
|
|
578
|
+
gap?: Responsive<Space>;
|
|
367
579
|
children?: ReactNode;
|
|
368
580
|
};
|
|
369
581
|
type CardProps<E extends ElementType = 'div'> = PolyProps<E, CardOwnProps>;
|
|
370
|
-
declare function CardRoot<E extends ElementType = 'div'>({ as, padding, interactive, tone, children, ...rest }: CardProps<E>): react.JSX.Element;
|
|
582
|
+
declare function CardRoot<E extends ElementType = 'div'>({ as, padding, interactive, tone, pattern, shadow, outlined, gap, children, ...rest }: CardProps<E>): react.JSX.Element;
|
|
371
583
|
declare const Card: typeof CardRoot & {
|
|
584
|
+
Header: typeof CardHeader;
|
|
372
585
|
Media: typeof CardMedia;
|
|
373
586
|
Footer: typeof CardFooter;
|
|
374
587
|
};
|
|
375
588
|
|
|
376
|
-
type ButtonVariant = 'primary' | 'secondary' | 'subtle' | 'ghost' | 'danger';
|
|
377
|
-
declare const SIZE$
|
|
589
|
+
type ButtonVariant = 'primary' | 'secondary' | 'raised' | 'subtle' | 'ghost' | 'slate' | 'danger' | 'brand' | 'accent';
|
|
590
|
+
declare const SIZE$8: {
|
|
591
|
+
readonly xs: "px-space-md py-space-xs";
|
|
592
|
+
readonly ms: "px-space-lg py-space-sm";
|
|
378
593
|
readonly sm: "h-8 px-space-md";
|
|
379
594
|
readonly md: "h-10 px-space-lg";
|
|
380
595
|
readonly lg: "h-12 px-space-lg";
|
|
381
596
|
};
|
|
382
597
|
type ButtonOwnProps = {
|
|
383
598
|
variant?: ButtonVariant;
|
|
384
|
-
size?: keyof typeof SIZE$
|
|
599
|
+
size?: keyof typeof SIZE$8;
|
|
385
600
|
icon?: string;
|
|
386
601
|
iconRight?: string;
|
|
602
|
+
iconTone?: Tone;
|
|
603
|
+
iconFilled?: boolean;
|
|
604
|
+
/** Custom leading content (e.g. a brand logo); replaces `icon`. */
|
|
605
|
+
leading?: ReactNode;
|
|
387
606
|
fullWidth?: boolean;
|
|
388
607
|
loading?: boolean;
|
|
389
608
|
disabled?: boolean;
|
|
390
609
|
children: ReactNode;
|
|
391
610
|
};
|
|
392
611
|
type ButtonProps<E extends ElementType = 'button'> = PolyProps<E, ButtonOwnProps>;
|
|
393
|
-
declare function Button<E extends ElementType = 'button'>({ as, variant, size, icon, iconRight, fullWidth, loading, disabled, children, ...rest }: ButtonProps<E>): react.JSX.Element;
|
|
612
|
+
declare function Button<E extends ElementType = 'button'>({ as, variant, size, icon, iconRight, iconTone, iconFilled, leading, fullWidth, loading, disabled, children, ...rest }: ButtonProps<E>): react.JSX.Element;
|
|
394
613
|
|
|
395
|
-
declare const VARIANT: {
|
|
614
|
+
declare const VARIANT$4: {
|
|
396
615
|
readonly ghost: "text-on-surface-variant hover:bg-surface-muted hover:text-on-surface";
|
|
397
|
-
readonly subtle: "bg-surface-subtle text-on-surface hover:bg-surface-
|
|
616
|
+
readonly subtle: "bg-surface-subtle text-on-surface-variant hover:bg-surface-container hover:text-on-surface";
|
|
617
|
+
readonly secondary: "border border-border-subtle bg-surface-elevated text-on-surface hover:bg-surface-muted";
|
|
398
618
|
readonly primary: "bg-ink text-on-ink hover:bg-ink-hover";
|
|
399
619
|
};
|
|
400
|
-
declare const SIZE$
|
|
620
|
+
declare const SIZE$7: {
|
|
621
|
+
readonly xs: "size-6";
|
|
401
622
|
readonly sm: "size-8";
|
|
623
|
+
readonly ms: "size-9";
|
|
402
624
|
readonly md: "size-10";
|
|
403
625
|
};
|
|
404
|
-
type
|
|
626
|
+
type IconButtonOwnProps = {
|
|
405
627
|
icon: string;
|
|
628
|
+
/** Accessible name and tooltip. Include what `dot`/`badge` mean (e.g. "Notifications, 3 unread"). */
|
|
406
629
|
label: string;
|
|
407
|
-
variant?: keyof typeof VARIANT;
|
|
408
|
-
size?: keyof typeof SIZE$
|
|
630
|
+
variant?: keyof typeof VARIANT$4;
|
|
631
|
+
size?: keyof typeof SIZE$7;
|
|
632
|
+
dot?: StatusTone;
|
|
633
|
+
badge?: ReactNode;
|
|
409
634
|
children?: never;
|
|
410
|
-
}
|
|
411
|
-
|
|
635
|
+
};
|
|
636
|
+
type IconButtonProps<E extends ElementType = 'button'> = PolyProps<E, IconButtonOwnProps>;
|
|
637
|
+
declare function IconButton<E extends ElementType = 'button'>({ as, icon, label, variant, size, dot, badge, ...rest }: IconButtonProps<E>): react.JSX.Element;
|
|
412
638
|
|
|
639
|
+
declare const VARIANT$3: {
|
|
640
|
+
readonly outline: "rounded border border-border-subtle bg-surface-subtle";
|
|
641
|
+
readonly raised: "rounded bg-surface-elevated shadow-sm";
|
|
642
|
+
};
|
|
413
643
|
type KbdProps = NativeProps<'kbd', {
|
|
644
|
+
variant?: keyof typeof VARIANT$3;
|
|
414
645
|
children: ReactNode;
|
|
415
646
|
}>;
|
|
416
|
-
declare function Kbd({ children, ...rest }: KbdProps): react.JSX.Element;
|
|
647
|
+
declare function Kbd({ variant, children, ...rest }: KbdProps): react.JSX.Element;
|
|
417
648
|
|
|
649
|
+
declare const SIZE$6: {
|
|
650
|
+
readonly sm: "h-8 px-space-sm";
|
|
651
|
+
readonly ms: "h-9 px-space-sm";
|
|
652
|
+
readonly md: "h-10 px-space-sm";
|
|
653
|
+
readonly lg: "h-11 px-space-md";
|
|
654
|
+
};
|
|
655
|
+
declare const WIDTH$1: {
|
|
656
|
+
readonly auto: "";
|
|
657
|
+
readonly full: "w-full";
|
|
658
|
+
readonly sm: "w-64";
|
|
659
|
+
readonly md: "w-80";
|
|
660
|
+
readonly lg: "w-full max-w-xl";
|
|
661
|
+
};
|
|
662
|
+
declare const VARIANT$2: {
|
|
663
|
+
readonly outline: "border bg-surface-subtle focus-within:ring-2";
|
|
664
|
+
readonly filled: "bg-surface-subtle hover:bg-surface-container/40 focus-within:ring-1";
|
|
665
|
+
readonly raised: "bg-surface-elevated shadow-sm focus-within:ring-2";
|
|
666
|
+
};
|
|
418
667
|
type TextFieldProps = NativeProps<'input', {
|
|
419
668
|
label: string;
|
|
420
669
|
hideLabel?: boolean;
|
|
421
670
|
icon?: string;
|
|
422
671
|
hint?: ReactNode;
|
|
423
672
|
error?: string;
|
|
673
|
+
/** Content at the end of the label row (e.g. a "Forgot password?" link). */
|
|
674
|
+
labelEnd?: ReactNode;
|
|
675
|
+
/** Adds a show/hide toggle for password fields. */
|
|
676
|
+
revealable?: boolean;
|
|
677
|
+
size?: keyof typeof SIZE$6;
|
|
678
|
+
variant?: keyof typeof VARIANT$2;
|
|
679
|
+
/** Put the icon after the input instead of before it. */
|
|
680
|
+
iconPosition?: 'start' | 'end';
|
|
681
|
+
/** Field width: sm 16rem, md 20rem, lg fills up to 36rem, full; default auto. */
|
|
682
|
+
width?: keyof typeof WIDTH$1;
|
|
424
683
|
}>;
|
|
425
|
-
declare function TextField({ label, hideLabel, icon, hint, error, id, ...rest }: TextFieldProps): react.JSX.Element;
|
|
684
|
+
declare function TextField({ label, hideLabel, icon, hint, error, labelEnd, revealable, size, variant, iconPosition, width, id, type, ...rest }: TextFieldProps): react.JSX.Element;
|
|
426
685
|
|
|
427
686
|
type SelectOption = {
|
|
428
687
|
value: string;
|
|
429
688
|
label: string;
|
|
430
689
|
};
|
|
690
|
+
declare const VARIANT$1: {
|
|
691
|
+
readonly outline: "border border-border-subtle bg-surface-subtle";
|
|
692
|
+
readonly raised: "bg-surface-elevated shadow-sm";
|
|
693
|
+
};
|
|
694
|
+
declare const SIZE$5: {
|
|
695
|
+
readonly md: "h-10 pl-space-sm font-body-md text-body-md";
|
|
696
|
+
readonly lg: "h-11 pl-space-md font-body-sm text-body-sm";
|
|
697
|
+
};
|
|
431
698
|
type SelectProps = NativeProps<'select', {
|
|
432
699
|
label: string;
|
|
433
700
|
hideLabel?: boolean;
|
|
434
701
|
options: SelectOption[];
|
|
702
|
+
variant?: keyof typeof VARIANT$1;
|
|
703
|
+
size?: keyof typeof SIZE$5;
|
|
435
704
|
children?: never;
|
|
436
705
|
}>;
|
|
437
|
-
declare function Select({ label, hideLabel, options, id, ...rest }: SelectProps): react.JSX.Element;
|
|
706
|
+
declare function Select({ label, hideLabel, options, variant, size, id, ...rest }: SelectProps): react.JSX.Element;
|
|
438
707
|
|
|
439
708
|
/** `panelId` links a tablist tab to a `<TabPanel id={panelId}>` (aria-controls / aria-labelledby). */
|
|
440
709
|
type TabItem = {
|
|
441
710
|
id: string;
|
|
442
711
|
label: ReactNode;
|
|
443
|
-
count?:
|
|
712
|
+
count?: ReactNode;
|
|
713
|
+
/** Colour of the count pill (nav variant). */
|
|
714
|
+
countTone?: BadgeTone;
|
|
715
|
+
badge?: ReactNode;
|
|
444
716
|
dot?: StatusTone;
|
|
717
|
+
icon?: string;
|
|
445
718
|
href?: string;
|
|
446
719
|
as?: ElementType;
|
|
447
720
|
panelId?: string;
|
|
721
|
+
/** Not available yet: rendered as text with aria-disabled, never as a link or selectable tab. */
|
|
722
|
+
disabled?: boolean;
|
|
723
|
+
/** Native tooltip (e.g. "Coming soon" on a disabled item). */
|
|
724
|
+
title?: string;
|
|
725
|
+
/** Hide this item below a breakpoint (lower-priority nav entries on crowded bars). */
|
|
726
|
+
hideBelow?: keyof typeof HIDE_BELOW;
|
|
727
|
+
};
|
|
728
|
+
declare const HIDE_BELOW: {
|
|
729
|
+
readonly sm: "hidden sm:flex";
|
|
730
|
+
readonly md: "hidden md:flex";
|
|
731
|
+
readonly lg: "hidden lg:flex";
|
|
732
|
+
readonly xl: "hidden xl:flex";
|
|
733
|
+
readonly '2xl': "hidden 2xl:flex";
|
|
448
734
|
};
|
|
735
|
+
type Variant = 'underline' | 'pills' | 'nav' | 'solid' | 'label';
|
|
449
736
|
type TabsProps = NativeProps<'div', {
|
|
450
737
|
items: TabItem[];
|
|
451
738
|
value: string;
|
|
452
739
|
onChange?: (id: string) => void;
|
|
453
|
-
variant?:
|
|
740
|
+
variant?: Variant;
|
|
454
741
|
label: string;
|
|
455
742
|
children?: never;
|
|
456
743
|
}>;
|
|
@@ -464,21 +751,29 @@ type TabPanelProps = NativeProps<'div', {
|
|
|
464
751
|
/** Content for the tab whose `panelId` is `id`; hidden (not unmounted) when inactive. */
|
|
465
752
|
declare function TabPanel({ id, active, children, ...rest }: TabPanelProps): react.JSX.Element;
|
|
466
753
|
|
|
754
|
+
/** `hideLabel` shows only the icon; `label` stays the accessible name. */
|
|
467
755
|
type SegmentedOption = {
|
|
468
756
|
value: string;
|
|
469
757
|
label: string;
|
|
470
758
|
icon?: string;
|
|
759
|
+
hideLabel?: boolean;
|
|
760
|
+
dot?: StatusTone;
|
|
761
|
+
};
|
|
762
|
+
declare const TRACK: {
|
|
763
|
+
readonly default: "rounded-lg border border-border-subtle bg-surface-subtle p-space-2xs";
|
|
764
|
+
readonly label: "";
|
|
471
765
|
};
|
|
472
766
|
type SegmentedControlProps = NativeProps<'div', {
|
|
473
767
|
label: string;
|
|
474
768
|
options: SegmentedOption[];
|
|
475
769
|
value: string;
|
|
476
770
|
onChange: (value: string) => void;
|
|
771
|
+
variant?: keyof typeof TRACK;
|
|
477
772
|
children?: never;
|
|
478
773
|
}>;
|
|
479
|
-
declare function SegmentedControl({ label, options, value, onChange, ...rest }: SegmentedControlProps): react.JSX.Element;
|
|
774
|
+
declare function SegmentedControl({ label, options, value, onChange, variant, ...rest }: SegmentedControlProps): react.JSX.Element;
|
|
480
775
|
|
|
481
|
-
declare const SIZE$
|
|
776
|
+
declare const SIZE$4: {
|
|
482
777
|
readonly sm: "max-w-sm";
|
|
483
778
|
readonly md: "max-w-md";
|
|
484
779
|
readonly lg: "max-w-2xl";
|
|
@@ -489,7 +784,7 @@ type DialogProps = NativeProps<'div', {
|
|
|
489
784
|
title: ReactNode;
|
|
490
785
|
description?: ReactNode;
|
|
491
786
|
footer?: ReactNode;
|
|
492
|
-
size?: keyof typeof SIZE$
|
|
787
|
+
size?: keyof typeof SIZE$4;
|
|
493
788
|
children?: ReactNode;
|
|
494
789
|
}>;
|
|
495
790
|
/** Native props (id, data-*, aria-*) go to the dialog panel. */
|
|
@@ -502,7 +797,13 @@ type MenuItem = {
|
|
|
502
797
|
href?: string;
|
|
503
798
|
as?: ElementType;
|
|
504
799
|
tone?: 'default' | 'danger';
|
|
800
|
+
meta?: ReactNode;
|
|
801
|
+
shortcut?: string;
|
|
802
|
+
};
|
|
803
|
+
type MenuSeparator = {
|
|
804
|
+
type: 'separator';
|
|
505
805
|
};
|
|
806
|
+
type MenuEntry = MenuItem | MenuSeparator;
|
|
506
807
|
type MenuTriggerProps = {
|
|
507
808
|
ref: RefObject<HTMLButtonElement | null>;
|
|
508
809
|
id: string;
|
|
@@ -515,11 +816,14 @@ type MenuTriggerProps = {
|
|
|
515
816
|
type MenuProps = NativeProps<'div', {
|
|
516
817
|
label: string;
|
|
517
818
|
trigger: (props: MenuTriggerProps) => ReactNode;
|
|
518
|
-
items:
|
|
819
|
+
items: MenuEntry[];
|
|
519
820
|
align?: 'start' | 'end';
|
|
821
|
+
/** Rendered above the menu items, outside the menu role (e.g. the signed-in user). */
|
|
822
|
+
header?: ReactNode;
|
|
823
|
+
footer?: ReactNode;
|
|
520
824
|
children?: never;
|
|
521
825
|
}>;
|
|
522
|
-
declare function Menu({ label, trigger, items, align, ...rest }: MenuProps): react.JSX.Element;
|
|
826
|
+
declare function Menu({ label, trigger, items, align, header, footer, ...rest }: MenuProps): react.JSX.Element;
|
|
523
827
|
|
|
524
828
|
type Crumb = {
|
|
525
829
|
label: string;
|
|
@@ -533,7 +837,7 @@ type BreadcrumbsProps = NativeProps<'nav', {
|
|
|
533
837
|
}>;
|
|
534
838
|
declare function Breadcrumbs({ items, label, ...rest }: BreadcrumbsProps): react.JSX.Element;
|
|
535
839
|
|
|
536
|
-
declare const TONE$
|
|
840
|
+
declare const TONE$4: {
|
|
537
841
|
readonly default: "";
|
|
538
842
|
readonly success: string;
|
|
539
843
|
readonly danger: string;
|
|
@@ -542,47 +846,76 @@ declare const TONE$1: {
|
|
|
542
846
|
};
|
|
543
847
|
type StatusItemProps = NativeProps<'span', {
|
|
544
848
|
icon?: string;
|
|
545
|
-
tone?: keyof typeof TONE$
|
|
849
|
+
tone?: keyof typeof TONE$4;
|
|
546
850
|
children: ReactNode;
|
|
547
851
|
}>;
|
|
548
852
|
declare function StatusItem({ icon, tone, children, ...rest }: StatusItemProps): react.JSX.Element;
|
|
853
|
+
declare const BAR: {
|
|
854
|
+
readonly default: "h-7 border-t border-border-subtle bg-surface-subtle";
|
|
855
|
+
readonly raised: "h-9 bg-surface-container";
|
|
856
|
+
};
|
|
549
857
|
type StatusBarProps = NativeProps<'footer', {
|
|
550
858
|
start?: ReactNode;
|
|
551
859
|
end?: ReactNode;
|
|
552
860
|
label?: string;
|
|
861
|
+
tone?: keyof typeof BAR;
|
|
553
862
|
children?: never;
|
|
554
863
|
}>;
|
|
555
|
-
declare function StatusBarRoot({ start, end, label, ...rest }: StatusBarProps): react.JSX.Element;
|
|
864
|
+
declare function StatusBarRoot({ start, end, label, tone, ...rest }: StatusBarProps): react.JSX.Element;
|
|
556
865
|
declare const StatusBar: typeof StatusBarRoot & {
|
|
557
866
|
Item: typeof StatusItem;
|
|
558
867
|
};
|
|
559
868
|
|
|
560
|
-
declare const TONE: {
|
|
869
|
+
declare const TONE$3: {
|
|
561
870
|
readonly success: "text-fg-success";
|
|
562
871
|
readonly danger: "text-fg-danger";
|
|
872
|
+
readonly warning: "text-fg-warning";
|
|
873
|
+
readonly brand: "text-fg-brand";
|
|
563
874
|
readonly neutral: "text-ink";
|
|
564
875
|
};
|
|
565
876
|
type MetricTileProps = NativeProps<'div', {
|
|
566
877
|
label: ReactNode;
|
|
567
878
|
value: ReactNode;
|
|
568
|
-
tone?: keyof typeof TONE;
|
|
879
|
+
tone?: keyof typeof TONE$3;
|
|
569
880
|
icon?: string;
|
|
881
|
+
hint?: ReactNode;
|
|
882
|
+
hintTone?: Tone;
|
|
883
|
+
/** centered: big value over a small label (hero stats). */
|
|
884
|
+
variant?: 'default' | 'centered';
|
|
570
885
|
}>;
|
|
571
|
-
declare function MetricTile({ label, value, tone, icon, ...rest }: MetricTileProps): react.JSX.Element;
|
|
886
|
+
declare function MetricTile({ label, value, tone, icon, hint, hintTone, variant, ...rest }: MetricTileProps): react.JSX.Element;
|
|
572
887
|
|
|
573
|
-
declare const
|
|
888
|
+
declare const AVATAR_SIZE: {
|
|
574
889
|
readonly sm: "size-7 text-[11px]";
|
|
890
|
+
readonly ms: "size-8 text-xs";
|
|
575
891
|
readonly md: "size-9 text-xs";
|
|
892
|
+
readonly ml: "size-10 text-sm";
|
|
576
893
|
readonly lg: "size-12 text-sm";
|
|
577
894
|
};
|
|
895
|
+
declare const SHAPE$2: {
|
|
896
|
+
readonly circle: "rounded-full";
|
|
897
|
+
readonly square: "rounded-lg";
|
|
898
|
+
};
|
|
899
|
+
declare const TONE$2: {
|
|
900
|
+
readonly ink: "bg-ink text-on-ink";
|
|
901
|
+
readonly brand: "bg-brand-cobalt text-white";
|
|
902
|
+
readonly success: "bg-badge-beginner-text text-badge-beginner-bg";
|
|
903
|
+
readonly warning: "bg-badge-amber-text text-badge-amber-bg";
|
|
904
|
+
readonly danger: "bg-badge-advanced-text text-badge-advanced-bg";
|
|
905
|
+
};
|
|
578
906
|
type AvatarProps = NativeProps<'span', {
|
|
579
907
|
name: string;
|
|
580
908
|
src?: string;
|
|
581
|
-
size?: keyof typeof
|
|
909
|
+
size?: keyof typeof AVATAR_SIZE;
|
|
910
|
+
shape?: keyof typeof SHAPE$2;
|
|
911
|
+
tone?: keyof typeof TONE$2;
|
|
582
912
|
badge?: ReactNode;
|
|
913
|
+
/** Presence dot at the corner. Pair with `statusLabel` so it isn't colour-only. */
|
|
914
|
+
status?: StatusTone;
|
|
915
|
+
statusLabel?: string;
|
|
583
916
|
children?: never;
|
|
584
917
|
}>;
|
|
585
|
-
declare function Avatar({ name, src, size, badge, ...rest }: AvatarProps): react.JSX.Element;
|
|
918
|
+
declare function Avatar({ name, src, size, shape, tone, badge, status, statusLabel, ...rest }: AvatarProps): react.JSX.Element;
|
|
586
919
|
|
|
587
920
|
type EditorTab = {
|
|
588
921
|
id: string;
|
|
@@ -608,15 +941,21 @@ type CountdownProps = NativeProps<'span', {
|
|
|
608
941
|
warnAt?: number;
|
|
609
942
|
onExpire?: () => void;
|
|
610
943
|
label?: string;
|
|
944
|
+
/** chip: tinted pill with mono digits and a brand timer icon (workspace bar). */
|
|
945
|
+
variant?: 'plain' | 'chip';
|
|
611
946
|
children?: never;
|
|
612
947
|
}>;
|
|
613
|
-
declare function Countdown({ seconds, until, direction, warnAt, onExpire, label, ...rest }: CountdownProps): react.JSX.Element;
|
|
948
|
+
declare function Countdown({ seconds, until, direction, warnAt, onExpire, label, variant, ...rest }: CountdownProps): react.JSX.Element;
|
|
614
949
|
|
|
615
950
|
type FileNode = {
|
|
616
951
|
path: string;
|
|
617
952
|
kind: 'file' | 'dir';
|
|
618
953
|
readOnly?: boolean;
|
|
619
954
|
modified?: boolean;
|
|
955
|
+
/** Material Symbol overriding the extension icon. */
|
|
956
|
+
icon?: string;
|
|
957
|
+
status?: 'success' | 'warning' | 'danger' | 'info';
|
|
958
|
+
meta?: ReactNode;
|
|
620
959
|
};
|
|
621
960
|
|
|
622
961
|
type FileTreeProps = NativeProps<'ul', {
|
|
@@ -654,4 +993,528 @@ declare const Workbench: typeof WorkbenchRoot & {
|
|
|
654
993
|
Toggle: typeof Toggle;
|
|
655
994
|
};
|
|
656
995
|
|
|
657
|
-
|
|
996
|
+
declare const SIDE: {
|
|
997
|
+
readonly left: "left-0 border-r";
|
|
998
|
+
readonly right: "right-0 border-l";
|
|
999
|
+
};
|
|
1000
|
+
declare const SIZE$3: {
|
|
1001
|
+
readonly sm: "w-[min(85vw,20rem)]";
|
|
1002
|
+
readonly md: "w-[min(90vw,28rem)]";
|
|
1003
|
+
};
|
|
1004
|
+
type DrawerProps = NativeProps<'div', {
|
|
1005
|
+
open: boolean;
|
|
1006
|
+
onClose: () => void;
|
|
1007
|
+
title: ReactNode;
|
|
1008
|
+
side?: keyof typeof SIDE;
|
|
1009
|
+
size?: keyof typeof SIZE$3;
|
|
1010
|
+
children?: ReactNode;
|
|
1011
|
+
}>;
|
|
1012
|
+
/** Modal slide-over (mobile navigation, side panels). Native props go to the panel. */
|
|
1013
|
+
declare function Drawer({ open, onClose, title, side, size, children, ...rest }: DrawerProps): react.ReactPortal | null;
|
|
1014
|
+
|
|
1015
|
+
declare const TONE$1: {
|
|
1016
|
+
readonly brand: "text-fg-brand hover:text-fg-brand-hover";
|
|
1017
|
+
readonly default: "text-on-surface hover:text-ink";
|
|
1018
|
+
readonly muted: "text-on-surface-variant hover:text-on-surface";
|
|
1019
|
+
readonly danger: "text-fg-danger";
|
|
1020
|
+
readonly success: "text-fg-success";
|
|
1021
|
+
readonly warning: "text-fg-warning";
|
|
1022
|
+
};
|
|
1023
|
+
declare const SIZE$2: {
|
|
1024
|
+
readonly sm: "font-body-sm text-body-sm";
|
|
1025
|
+
readonly md: "font-body-md text-body-md";
|
|
1026
|
+
};
|
|
1027
|
+
declare const UNDERLINE: {
|
|
1028
|
+
readonly hover: "underline-offset-2 hover:underline";
|
|
1029
|
+
readonly always: "underline underline-offset-2";
|
|
1030
|
+
readonly none: "";
|
|
1031
|
+
};
|
|
1032
|
+
type TextLinkOwnProps = {
|
|
1033
|
+
tone?: keyof typeof TONE$1;
|
|
1034
|
+
size?: keyof typeof SIZE$2;
|
|
1035
|
+
icon?: string;
|
|
1036
|
+
iconRight?: string;
|
|
1037
|
+
underline?: keyof typeof UNDERLINE;
|
|
1038
|
+
children: ReactNode;
|
|
1039
|
+
};
|
|
1040
|
+
type TextLinkProps<E extends ElementType = 'a'> = PolyProps<E, TextLinkOwnProps>;
|
|
1041
|
+
declare function TextLink<E extends ElementType = 'a'>({ as, tone, size, icon, iconRight, underline, children, ...rest }: TextLinkProps<E>): react.JSX.Element;
|
|
1042
|
+
|
|
1043
|
+
type DividerProps = NativeProps<'div', {
|
|
1044
|
+
orientation?: 'horizontal' | 'vertical';
|
|
1045
|
+
label?: ReactNode;
|
|
1046
|
+
spacing?: Space;
|
|
1047
|
+
children?: never;
|
|
1048
|
+
}>;
|
|
1049
|
+
declare function Divider({ orientation, label, spacing, ...rest }: DividerProps): react.JSX.Element;
|
|
1050
|
+
|
|
1051
|
+
type IconTileTone = 'neutral' | 'brand' | 'success' | 'warning' | 'danger';
|
|
1052
|
+
declare const SIZE$1: {
|
|
1053
|
+
readonly sm: "size-8";
|
|
1054
|
+
readonly md: "size-10";
|
|
1055
|
+
readonly lg: "size-12";
|
|
1056
|
+
readonly xl: "size-14";
|
|
1057
|
+
};
|
|
1058
|
+
declare const SHAPE$1: {
|
|
1059
|
+
readonly square: "rounded-lg";
|
|
1060
|
+
readonly circle: "rounded-full";
|
|
1061
|
+
};
|
|
1062
|
+
type IconTileProps = NativeProps<'span', {
|
|
1063
|
+
icon: string;
|
|
1064
|
+
tone?: IconTileTone;
|
|
1065
|
+
size?: keyof typeof SIZE$1;
|
|
1066
|
+
shape?: keyof typeof SHAPE$1;
|
|
1067
|
+
filled?: boolean;
|
|
1068
|
+
label?: string;
|
|
1069
|
+
children?: never;
|
|
1070
|
+
}>;
|
|
1071
|
+
declare function IconTile({ icon, tone, size, shape, filled, label, ...rest }: IconTileProps): react.JSX.Element;
|
|
1072
|
+
|
|
1073
|
+
type AvatarGroupProps = NativeProps<'div', {
|
|
1074
|
+
children: ReactNode;
|
|
1075
|
+
max?: number;
|
|
1076
|
+
size?: keyof typeof AVATAR_SIZE;
|
|
1077
|
+
label?: string;
|
|
1078
|
+
}>;
|
|
1079
|
+
declare function AvatarGroup({ children, max, size, label, ...rest }: AvatarGroupProps): react.JSX.Element;
|
|
1080
|
+
|
|
1081
|
+
declare const POSITION: {
|
|
1082
|
+
readonly sticky: "sticky top-0";
|
|
1083
|
+
readonly fixed: "fixed inset-x-0 top-0";
|
|
1084
|
+
readonly static: "relative";
|
|
1085
|
+
};
|
|
1086
|
+
declare const HEIGHT$2: {
|
|
1087
|
+
readonly sm: "h-12";
|
|
1088
|
+
readonly md: "h-16";
|
|
1089
|
+
};
|
|
1090
|
+
declare const DIVIDER: {
|
|
1091
|
+
readonly shadow: "shadow-appbar";
|
|
1092
|
+
readonly border: "border-b border-border-subtle";
|
|
1093
|
+
};
|
|
1094
|
+
type AppBarProps = NativeProps<'header', {
|
|
1095
|
+
position?: keyof typeof POSITION;
|
|
1096
|
+
start?: ReactNode;
|
|
1097
|
+
center?: ReactNode;
|
|
1098
|
+
end?: ReactNode;
|
|
1099
|
+
blur?: boolean;
|
|
1100
|
+
/** md (64px) matches --spacing-appbar, which Split stickyOffset="appbar" clears. */
|
|
1101
|
+
height?: keyof typeof HEIGHT$2;
|
|
1102
|
+
/** Constrain the content to the 80rem page column. */
|
|
1103
|
+
contained?: boolean;
|
|
1104
|
+
/** How the bar separates from the page (default a soft shadow, as in Stitch). */
|
|
1105
|
+
divider?: keyof typeof DIVIDER;
|
|
1106
|
+
children?: never;
|
|
1107
|
+
}>;
|
|
1108
|
+
declare function AppBar({ position, start, center, end, blur, height, contained, divider, ...rest }: AppBarProps): react.JSX.Element;
|
|
1109
|
+
|
|
1110
|
+
type NavItem = {
|
|
1111
|
+
id: string;
|
|
1112
|
+
label: ReactNode;
|
|
1113
|
+
icon?: string;
|
|
1114
|
+
href?: string;
|
|
1115
|
+
as?: ElementType;
|
|
1116
|
+
count?: ReactNode;
|
|
1117
|
+
onSelect?: () => void;
|
|
1118
|
+
};
|
|
1119
|
+
declare const VARIANT: {
|
|
1120
|
+
readonly sidebar: {
|
|
1121
|
+
readonly item: "rounded-lg px-space-sm py-space-xs font-body-md text-body-md";
|
|
1122
|
+
readonly active: "bg-surface-container-high font-medium text-ink";
|
|
1123
|
+
readonly idle: "text-on-surface-variant hover:bg-surface-muted hover:text-on-surface";
|
|
1124
|
+
};
|
|
1125
|
+
readonly toc: {
|
|
1126
|
+
readonly item: "border-l-2 px-space-sm py-space-2xs font-body-sm text-body-sm";
|
|
1127
|
+
readonly active: "border-brand-cobalt bg-badge-intermediate-bg font-medium text-badge-intermediate-text";
|
|
1128
|
+
readonly idle: "border-transparent text-on-surface-variant hover:border-border-strong hover:text-on-surface";
|
|
1129
|
+
};
|
|
1130
|
+
};
|
|
1131
|
+
type NavListProps = NativeProps<'nav', {
|
|
1132
|
+
label: string;
|
|
1133
|
+
items: NavItem[];
|
|
1134
|
+
current?: string;
|
|
1135
|
+
heading?: ReactNode;
|
|
1136
|
+
variant?: keyof typeof VARIANT;
|
|
1137
|
+
children?: never;
|
|
1138
|
+
}>;
|
|
1139
|
+
/** Vertical navigation: app sidebar or in-page table of contents. */
|
|
1140
|
+
declare function NavList({ label, items, current, heading, variant, ...rest }: NavListProps): react.JSX.Element;
|
|
1141
|
+
|
|
1142
|
+
/** Page numbers to show: first, last, a window of `siblingCount` around `page`, and gaps. */
|
|
1143
|
+
declare function pageRange(page: number, pageCount: number, siblingCount?: number): Array<number | 'gap'>;
|
|
1144
|
+
type PaginationProps = NativeProps<'nav', {
|
|
1145
|
+
page: number;
|
|
1146
|
+
pageCount: number;
|
|
1147
|
+
onChange: (page: number) => void;
|
|
1148
|
+
siblingCount?: number;
|
|
1149
|
+
summary?: ReactNode;
|
|
1150
|
+
label?: string;
|
|
1151
|
+
children?: never;
|
|
1152
|
+
}>;
|
|
1153
|
+
/** Below md only the current page and "/ total" show between the arrows. */
|
|
1154
|
+
declare function Pagination({ page, pageCount, onChange, siblingCount, summary, label, ...rest }: PaginationProps): react.JSX.Element | null;
|
|
1155
|
+
|
|
1156
|
+
type TableColumn = {
|
|
1157
|
+
key: string;
|
|
1158
|
+
header: ReactNode;
|
|
1159
|
+
align?: 'start' | 'end';
|
|
1160
|
+
mono?: boolean;
|
|
1161
|
+
width?: 'auto' | 'min';
|
|
1162
|
+
};
|
|
1163
|
+
declare const PAD: {
|
|
1164
|
+
readonly compact: "px-space-sm py-space-xs";
|
|
1165
|
+
readonly normal: "px-space-md py-space-sm";
|
|
1166
|
+
};
|
|
1167
|
+
type TableProps = NativeProps<'div', {
|
|
1168
|
+
caption: string;
|
|
1169
|
+
showCaption?: boolean;
|
|
1170
|
+
columns: TableColumn[];
|
|
1171
|
+
rows: Array<Record<string, ReactNode>>;
|
|
1172
|
+
rowKey?: (row: Record<string, ReactNode>, index: number) => string;
|
|
1173
|
+
density?: keyof typeof PAD;
|
|
1174
|
+
empty?: ReactNode;
|
|
1175
|
+
children?: never;
|
|
1176
|
+
}>;
|
|
1177
|
+
/** Semantic table inside a focusable horizontal scroller, so wide tables never widen the page. */
|
|
1178
|
+
declare function Table({ caption, showCaption, columns, rows, rowKey, density, empty, ...rest }: TableProps): react.JSX.Element;
|
|
1179
|
+
|
|
1180
|
+
declare const LAYOUT: {
|
|
1181
|
+
readonly stacked: "flex flex-col gap-space-sm";
|
|
1182
|
+
readonly inline: "grid grid-cols-1 gap-x-space-md gap-y-space-xs sm:grid-cols-[minmax(0,auto)_minmax(0,1fr)]";
|
|
1183
|
+
};
|
|
1184
|
+
type DescriptionListProps = NativeProps<'dl', {
|
|
1185
|
+
items: Array<{
|
|
1186
|
+
term: ReactNode;
|
|
1187
|
+
detail: ReactNode;
|
|
1188
|
+
}>;
|
|
1189
|
+
/** inline = term and detail side by side from sm. */
|
|
1190
|
+
layout?: keyof typeof LAYOUT;
|
|
1191
|
+
mono?: boolean;
|
|
1192
|
+
children?: never;
|
|
1193
|
+
}>;
|
|
1194
|
+
declare function DescriptionList({ items, layout, mono, ...rest }: DescriptionListProps): react.JSX.Element;
|
|
1195
|
+
|
|
1196
|
+
type TimelineStatus = 'done' | 'current' | 'locked' | 'success' | 'warning' | 'danger' | 'pending';
|
|
1197
|
+
type TimelineItem = {
|
|
1198
|
+
id: string;
|
|
1199
|
+
status: TimelineStatus;
|
|
1200
|
+
title: ReactNode;
|
|
1201
|
+
badge?: ReactNode;
|
|
1202
|
+
description?: ReactNode;
|
|
1203
|
+
meta?: ReactNode;
|
|
1204
|
+
};
|
|
1205
|
+
type TimelineProps = NativeProps<'ol', {
|
|
1206
|
+
label: string;
|
|
1207
|
+
items: TimelineItem[];
|
|
1208
|
+
children?: never;
|
|
1209
|
+
}>;
|
|
1210
|
+
declare function Timeline({ label, items, ...rest }: TimelineProps): react.JSX.Element;
|
|
1211
|
+
|
|
1212
|
+
type DisclosureProps = NativeProps<'div', {
|
|
1213
|
+
/** Button content; keep it free of other interactive elements. */
|
|
1214
|
+
summary: ReactNode;
|
|
1215
|
+
children: ReactNode;
|
|
1216
|
+
open?: boolean;
|
|
1217
|
+
defaultOpen?: boolean;
|
|
1218
|
+
onOpenChange?: (open: boolean) => void;
|
|
1219
|
+
selected?: boolean;
|
|
1220
|
+
variant?: 'plain' | 'row';
|
|
1221
|
+
}>;
|
|
1222
|
+
declare function Disclosure({ summary, children, open, defaultOpen, onOpenChange, selected, variant, ...rest }: DisclosureProps): react.JSX.Element;
|
|
1223
|
+
|
|
1224
|
+
declare const SHAPE: {
|
|
1225
|
+
readonly line: "rounded";
|
|
1226
|
+
readonly pill: "rounded-full";
|
|
1227
|
+
readonly rect: "rounded-xl";
|
|
1228
|
+
readonly circle: "rounded-full aspect-square";
|
|
1229
|
+
};
|
|
1230
|
+
declare const WIDTH: {
|
|
1231
|
+
readonly full: "w-full";
|
|
1232
|
+
readonly '3/4': "w-3/4";
|
|
1233
|
+
readonly '1/2': "w-1/2";
|
|
1234
|
+
readonly '1/3': "w-1/3";
|
|
1235
|
+
readonly '1/4': "w-1/4";
|
|
1236
|
+
};
|
|
1237
|
+
declare const HEIGHT$1: {
|
|
1238
|
+
readonly xs: "h-2";
|
|
1239
|
+
readonly sm: "h-3";
|
|
1240
|
+
readonly md: "h-4";
|
|
1241
|
+
readonly lg: "h-8";
|
|
1242
|
+
readonly xl: "h-24";
|
|
1243
|
+
};
|
|
1244
|
+
type SkeletonProps = NativeProps<'div', {
|
|
1245
|
+
shape?: keyof typeof SHAPE;
|
|
1246
|
+
width?: keyof typeof WIDTH;
|
|
1247
|
+
height?: keyof typeof HEIGHT$1;
|
|
1248
|
+
/** Render n text lines (the last one shorter). */
|
|
1249
|
+
lines?: number;
|
|
1250
|
+
children?: never;
|
|
1251
|
+
}>;
|
|
1252
|
+
/** Loading placeholder. Hidden from assistive tech: pair it with a <Message> saying what is loading. */
|
|
1253
|
+
declare function Skeleton({ shape, width, height, lines, ...rest }: SkeletonProps): react.JSX.Element;
|
|
1254
|
+
|
|
1255
|
+
type TerminalLine = {
|
|
1256
|
+
kind: 'command' | 'plain' | 'error' | 'warning' | 'hint' | 'success';
|
|
1257
|
+
text: string;
|
|
1258
|
+
};
|
|
1259
|
+
declare const MAX: {
|
|
1260
|
+
readonly sm: "max-h-40";
|
|
1261
|
+
readonly md: "max-h-72";
|
|
1262
|
+
readonly lg: "max-h-[32rem]";
|
|
1263
|
+
readonly none: "";
|
|
1264
|
+
};
|
|
1265
|
+
type TerminalOutputProps = NativeProps<'figure', {
|
|
1266
|
+
lines: TerminalLine[];
|
|
1267
|
+
title?: ReactNode;
|
|
1268
|
+
status?: ReactNode;
|
|
1269
|
+
maxHeight?: keyof typeof MAX;
|
|
1270
|
+
children?: never;
|
|
1271
|
+
}>;
|
|
1272
|
+
declare function TerminalOutput({ lines, title, status, maxHeight, ...rest }: TerminalOutputProps): react.JSX.Element;
|
|
1273
|
+
|
|
1274
|
+
declare const TITLE: {
|
|
1275
|
+
readonly success: "text-fg-success";
|
|
1276
|
+
readonly danger: "text-fg-danger";
|
|
1277
|
+
readonly warning: "text-fg-warning";
|
|
1278
|
+
};
|
|
1279
|
+
type VerdictBannerProps = NativeProps<'section', {
|
|
1280
|
+
tone: keyof typeof TITLE;
|
|
1281
|
+
icon: string;
|
|
1282
|
+
title: ReactNode;
|
|
1283
|
+
badge?: ReactNode;
|
|
1284
|
+
meta?: ReactNode[];
|
|
1285
|
+
actions?: ReactNode;
|
|
1286
|
+
children?: never;
|
|
1287
|
+
}>;
|
|
1288
|
+
/** Result hero ("Accepted"): stacks below md, a row from md. */
|
|
1289
|
+
declare function VerdictBanner({ tone, icon, title, badge, meta, actions, ...rest }: VerdictBannerProps): react.JSX.Element;
|
|
1290
|
+
|
|
1291
|
+
type CheckboxProps = NativeProps<'input', {
|
|
1292
|
+
label: ReactNode;
|
|
1293
|
+
description?: ReactNode;
|
|
1294
|
+
/** sm: 13px label for compact side-rail lists. */
|
|
1295
|
+
size?: 'sm' | 'md';
|
|
1296
|
+
/** Strike the label through while checked (task lists). */
|
|
1297
|
+
strikeWhenChecked?: boolean;
|
|
1298
|
+
indeterminate?: boolean;
|
|
1299
|
+
}>;
|
|
1300
|
+
declare function Checkbox({ label, description, strikeWhenChecked, indeterminate, size, id, ...rest }: CheckboxProps): react.JSX.Element;
|
|
1301
|
+
|
|
1302
|
+
type SwitchProps = NativeProps<'button', {
|
|
1303
|
+
label: string;
|
|
1304
|
+
checked: boolean;
|
|
1305
|
+
onChange: (checked: boolean) => void;
|
|
1306
|
+
description?: ReactNode;
|
|
1307
|
+
children?: never;
|
|
1308
|
+
}>;
|
|
1309
|
+
declare function Switch({ label, checked, onChange, description, ...rest }: SwitchProps): react.JSX.Element;
|
|
1310
|
+
|
|
1311
|
+
type OverlayProps = NativeProps<'div', {
|
|
1312
|
+
children: ReactNode;
|
|
1313
|
+
overlay: ReactNode;
|
|
1314
|
+
blur?: boolean;
|
|
1315
|
+
}>;
|
|
1316
|
+
/** Covers content (e.g. a signed-out gate): covered content is inert and hidden from assistive tech. */
|
|
1317
|
+
declare function Overlay({ children, overlay, blur, ...rest }: OverlayProps): react.JSX.Element;
|
|
1318
|
+
|
|
1319
|
+
type CopyButtonProps = NativeProps<'button', {
|
|
1320
|
+
value: string;
|
|
1321
|
+
label?: string;
|
|
1322
|
+
copiedLabel?: string;
|
|
1323
|
+
size?: 'sm' | 'md';
|
|
1324
|
+
variant?: ButtonVariant;
|
|
1325
|
+
children?: never;
|
|
1326
|
+
}>;
|
|
1327
|
+
/** Copies `value` to the clipboard; shows success or failure for 2s. Never throws. */
|
|
1328
|
+
declare function CopyButton({ value, label, copiedLabel, size, variant, ...rest }: CopyButtonProps): react.JSX.Element;
|
|
1329
|
+
|
|
1330
|
+
type DiffViewerProps = NativeProps<'figure', {
|
|
1331
|
+
oldValue: string;
|
|
1332
|
+
newValue: string;
|
|
1333
|
+
oldTitle?: ReactNode;
|
|
1334
|
+
newTitle?: ReactNode;
|
|
1335
|
+
/** split collapses to unified below lg. */
|
|
1336
|
+
mode?: 'unified' | 'split';
|
|
1337
|
+
children?: never;
|
|
1338
|
+
}>;
|
|
1339
|
+
declare function DiffViewer({ oldValue, newValue, oldTitle, newTitle, mode, ...rest }: DiffViewerProps): react.JSX.Element;
|
|
1340
|
+
|
|
1341
|
+
declare const HEIGHT: {
|
|
1342
|
+
readonly sm: "h-16";
|
|
1343
|
+
readonly md: "h-28";
|
|
1344
|
+
};
|
|
1345
|
+
declare const TONE: {
|
|
1346
|
+
readonly brand: "bg-brand-cobalt";
|
|
1347
|
+
readonly success: "bg-brand-emerald";
|
|
1348
|
+
};
|
|
1349
|
+
type BarChartProps = NativeProps<'figure', {
|
|
1350
|
+
label: string;
|
|
1351
|
+
bars: Array<{
|
|
1352
|
+
value: number;
|
|
1353
|
+
label?: string;
|
|
1354
|
+
}>;
|
|
1355
|
+
highlight?: number;
|
|
1356
|
+
highlightLabel?: string;
|
|
1357
|
+
axis?: [ReactNode, ReactNode, ReactNode];
|
|
1358
|
+
height?: keyof typeof HEIGHT;
|
|
1359
|
+
tone?: keyof typeof TONE;
|
|
1360
|
+
children?: never;
|
|
1361
|
+
}>;
|
|
1362
|
+
/** CSS bar chart; the data is also available as a visually hidden table. */
|
|
1363
|
+
declare function BarChart({ label, bars, highlight, highlightLabel, axis, height, tone, ...rest }: BarChartProps): react.JSX.Element;
|
|
1364
|
+
|
|
1365
|
+
declare const EMPHASIS: {
|
|
1366
|
+
readonly default: "border border-border-strong";
|
|
1367
|
+
readonly brand: "border-2 border-brand-cobalt";
|
|
1368
|
+
readonly strong: "border-2 border-ink";
|
|
1369
|
+
};
|
|
1370
|
+
declare const SIZE: {
|
|
1371
|
+
readonly sm: {
|
|
1372
|
+
readonly text: "text-[11px] leading-4";
|
|
1373
|
+
readonly pad: "px-space-xs py-space-2xs";
|
|
1374
|
+
};
|
|
1375
|
+
readonly md: {
|
|
1376
|
+
readonly text: "text-code-inline";
|
|
1377
|
+
readonly pad: "px-space-sm py-space-xs";
|
|
1378
|
+
};
|
|
1379
|
+
};
|
|
1380
|
+
type UmlClassProps = NativeProps<'div', {
|
|
1381
|
+
name: string;
|
|
1382
|
+
stereotype?: string;
|
|
1383
|
+
attributes?: string[];
|
|
1384
|
+
methods?: string[];
|
|
1385
|
+
tag?: ReactNode;
|
|
1386
|
+
emphasis?: keyof typeof EMPHASIS;
|
|
1387
|
+
size?: keyof typeof SIZE;
|
|
1388
|
+
dashed?: boolean;
|
|
1389
|
+
/** tinted: borderless card with a tinted title block (marketing/preview diagrams). */
|
|
1390
|
+
variant?: 'box' | 'tinted';
|
|
1391
|
+
/** Title block tint for the tinted variant. */
|
|
1392
|
+
headerTone?: keyof typeof HEADER_TONE;
|
|
1393
|
+
/** Member columns for the tinted variant. */
|
|
1394
|
+
columns?: 1 | 2;
|
|
1395
|
+
children?: never;
|
|
1396
|
+
}>;
|
|
1397
|
+
declare const HEADER_TONE: {
|
|
1398
|
+
readonly container: "bg-surface-container";
|
|
1399
|
+
readonly info: "bg-badge-intermediate-bg";
|
|
1400
|
+
readonly strong: "bg-surface-container-high";
|
|
1401
|
+
};
|
|
1402
|
+
/** UML class box: name compartment, attributes, methods. */
|
|
1403
|
+
declare function UmlClass({ name, stereotype, attributes, methods, tag, emphasis, size, dashed, variant, headerTone, columns, ...rest }: UmlClassProps): react.JSX.Element;
|
|
1404
|
+
|
|
1405
|
+
type UmlNode = {
|
|
1406
|
+
id: string;
|
|
1407
|
+
name: string;
|
|
1408
|
+
stereotype?: string;
|
|
1409
|
+
attributes?: string[];
|
|
1410
|
+
methods?: string[];
|
|
1411
|
+
tag?: ReactNode;
|
|
1412
|
+
emphasis?: 'default' | 'brand' | 'strong';
|
|
1413
|
+
dashed?: boolean;
|
|
1414
|
+
};
|
|
1415
|
+
type UmlEdgeKind = 'association' | 'dependency' | 'realization' | 'inheritance' | 'aggregation' | 'composition';
|
|
1416
|
+
type UmlEdge = {
|
|
1417
|
+
from: string;
|
|
1418
|
+
to: string;
|
|
1419
|
+
kind: UmlEdgeKind;
|
|
1420
|
+
label?: string;
|
|
1421
|
+
fromMultiplicity?: string;
|
|
1422
|
+
toMultiplicity?: string;
|
|
1423
|
+
};
|
|
1424
|
+
/** Plain-language description of a diagram for screen readers. */
|
|
1425
|
+
declare function describeDiagram(label: string, nodes: UmlNode[], edges: UmlEdge[]): string;
|
|
1426
|
+
type UmlDiagramProps = NativeProps<'figure', {
|
|
1427
|
+
label: string;
|
|
1428
|
+
nodes: UmlNode[];
|
|
1429
|
+
edges: UmlEdge[];
|
|
1430
|
+
direction?: 'TB' | 'LR';
|
|
1431
|
+
zoomable?: boolean;
|
|
1432
|
+
/** Small inline diagram: no zoom controls, scaled to fit the width. */
|
|
1433
|
+
compact?: boolean;
|
|
1434
|
+
pattern?: 'dots' | 'none';
|
|
1435
|
+
children?: never;
|
|
1436
|
+
}>;
|
|
1437
|
+
declare function UmlDiagram({ label, nodes, edges, direction, zoomable, compact, pattern, ...rest }: UmlDiagramProps): react.JSX.Element;
|
|
1438
|
+
|
|
1439
|
+
type TriggerProps = {
|
|
1440
|
+
'aria-describedby'?: string;
|
|
1441
|
+
onMouseEnter?: (e: MouseEvent) => void;
|
|
1442
|
+
onMouseLeave?: (e: MouseEvent) => void;
|
|
1443
|
+
onFocus?: (e: FocusEvent) => void;
|
|
1444
|
+
onBlur?: (e: FocusEvent) => void;
|
|
1445
|
+
ref?: Ref<HTMLElement>;
|
|
1446
|
+
};
|
|
1447
|
+
type TooltipProps = {
|
|
1448
|
+
content: ReactNode;
|
|
1449
|
+
children: ReactElement<TriggerProps>;
|
|
1450
|
+
side?: 'top' | 'bottom' | 'left' | 'right';
|
|
1451
|
+
delay?: number;
|
|
1452
|
+
};
|
|
1453
|
+
/** Short, non-interactive hint for a trigger. Never put essential information only in a tooltip. */
|
|
1454
|
+
declare function Tooltip({ content, children, side, delay }: TooltipProps): react.JSX.Element;
|
|
1455
|
+
|
|
1456
|
+
type ToastOptions = {
|
|
1457
|
+
title: ReactNode;
|
|
1458
|
+
description?: ReactNode;
|
|
1459
|
+
tone?: 'default' | 'success' | 'danger';
|
|
1460
|
+
action?: ReactNode;
|
|
1461
|
+
duration?: number;
|
|
1462
|
+
};
|
|
1463
|
+
declare function useToast(): {
|
|
1464
|
+
show: (options: ToastOptions) => number;
|
|
1465
|
+
dismiss: (id: number) => void;
|
|
1466
|
+
};
|
|
1467
|
+
type ToasterProps = {
|
|
1468
|
+
label?: string;
|
|
1469
|
+
};
|
|
1470
|
+
/** Mount once at the app root. Bottom-right from md, full width below. */
|
|
1471
|
+
declare function Toaster({ label }: ToasterProps): react.JSX.Element;
|
|
1472
|
+
|
|
1473
|
+
type CommandItem = {
|
|
1474
|
+
id: string;
|
|
1475
|
+
label: ReactNode;
|
|
1476
|
+
icon?: string;
|
|
1477
|
+
meta?: ReactNode;
|
|
1478
|
+
onSelect: () => void;
|
|
1479
|
+
};
|
|
1480
|
+
type CommandGroup = {
|
|
1481
|
+
label: string;
|
|
1482
|
+
items: CommandItem[];
|
|
1483
|
+
};
|
|
1484
|
+
type CommandPaletteProps = NativeProps<'div', {
|
|
1485
|
+
open: boolean;
|
|
1486
|
+
onClose: () => void;
|
|
1487
|
+
query: string;
|
|
1488
|
+
onQueryChange: (query: string) => void;
|
|
1489
|
+
groups: CommandGroup[];
|
|
1490
|
+
placeholder?: string;
|
|
1491
|
+
emptyText?: ReactNode;
|
|
1492
|
+
label?: string;
|
|
1493
|
+
children?: never;
|
|
1494
|
+
}>;
|
|
1495
|
+
/** ⌘K palette: a dialog with an APG combobox over grouped results. The caller filters `groups`. */
|
|
1496
|
+
declare function CommandPalette({ open, onClose, query, onQueryChange, groups, placeholder, emptyText, label, ...rest }: CommandPaletteProps): react.ReactPortal | null;
|
|
1497
|
+
|
|
1498
|
+
declare const ABOVE: {
|
|
1499
|
+
readonly sm: "hidden sm:contents";
|
|
1500
|
+
readonly md: "hidden md:contents";
|
|
1501
|
+
readonly lg: "hidden lg:contents";
|
|
1502
|
+
readonly xl: "hidden xl:contents";
|
|
1503
|
+
readonly '2xl': "hidden 2xl:contents";
|
|
1504
|
+
};
|
|
1505
|
+
declare const BELOW: {
|
|
1506
|
+
readonly sm: "contents sm:hidden";
|
|
1507
|
+
readonly md: "contents md:hidden";
|
|
1508
|
+
readonly lg: "contents lg:hidden";
|
|
1509
|
+
readonly xl: "contents xl:hidden";
|
|
1510
|
+
readonly '2xl': "contents 2xl:hidden";
|
|
1511
|
+
};
|
|
1512
|
+
type ShowProps = NativeProps<'div', {
|
|
1513
|
+
above?: keyof typeof ABOVE;
|
|
1514
|
+
below?: keyof typeof BELOW;
|
|
1515
|
+
children: ReactNode;
|
|
1516
|
+
}>;
|
|
1517
|
+
/** Render children only from `above` up, or only below `below`. Uses display: contents, so it adds no box. */
|
|
1518
|
+
declare function Show({ above, below, children, ...rest }: ShowProps): react.JSX.Element;
|
|
1519
|
+
|
|
1520
|
+
export { type Align, AppBar, type AppBarProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, Badge, type BadgeProps, type BadgeTone, BarChart, type BarChartProps, Box, type BoxProps, Breadcrumbs, type BreadcrumbsProps, type Breakpoint, Button, type ButtonProps, type ButtonVariant, Callout, type CalloutProps, Card, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, CardMedia, type CardMediaProps, type CardProps, CheckList, type CheckListProps, Checkbox, type CheckboxProps, Chip, type ChipProps, Code, CodeBlock, type CodeBlockProps, type CodeProps, type Cols, type CommandGroup, type CommandItem, CommandPalette, type CommandPaletteProps, Container, type ContainerProps, CopyButton, type CopyButtonProps, Countdown, type CountdownProps, type Crumb, DescriptionList, type DescriptionListProps, Dialog, type DialogProps, DiffViewer, type DiffViewerProps, type Direction, Disclosure, type DisclosureProps, Divider, type DividerProps, Dot, type DotProps, Drawer, type DrawerProps, type EditorTab, EditorTabs, type EditorTabsProps, EmptyState, type EmptyStateProps, Eyebrow, type EyebrowProps, type FileNode, FileTree, type FileTreeProps, Grid, GridItem, type GridItemProps, type GridProps, Heading, type HeadingProps, type HeadingSize, Icon, IconButton, type IconButtonProps, type IconProps, IconTile, type IconTileProps, type IconTileTone, type Justify, Kbd, type KbdProps, Markdown, type MarkdownProps, Menu, type MenuEntry, type MenuItem, type MenuProps, type MenuSeparator, type MenuTriggerProps, Message, type MessageProps, MetricTile, type MetricTileProps, type NavItem, NavList, type NavListProps, Overlay, type OverlayProps, Pagination, type PaginationProps, ProgressBar, type ProgressBarProps, type Responsive, ResultRow, type ResultRowProps, Section, SectionHeader, type SectionHeaderProps, type SectionProps, SegmentedControl, type SegmentedControlProps, type SegmentedOption, Select, type SelectOption, type SelectProps, Show, type ShowProps, Skeleton, type SkeletonProps, type Space, Split, type SplitProps, Stack, type StackProps, Stat, type StatProps, StatusBar, type StatusBarProps, type StatusItemProps, type StatusTone, type SurfaceTone, Switch, type SwitchProps, type TabItem, TabPanel, type TabPanelProps, Table, type TableColumn, type TableProps, Tabs, type TabsProps, type TerminalLine, TerminalOutput, type TerminalOutputProps, Text, TextField, type TextFieldProps, TextLink, type TextLinkProps, type TextProps, Theme, type ThemeProps, type ThemeTone, Timeline, type TimelineItem, type TimelineProps, type TimelineStatus, type ToastOptions, Toaster, type ToasterProps, type Tone, Tooltip, type TooltipProps, UmlClass, type UmlClassProps, UmlDiagram, type UmlDiagramProps, type UmlEdge, type UmlEdgeKind, type UmlNode, VerdictBanner, type VerdictBannerProps, Workbench, type WorkbenchLimits, type WorkbenchProps, type WorkbenchSizes, describeDiagram, pageRange, useThemeTone, useToast };
|