gridsmith-ui 0.4.0 → 0.6.1
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 +63 -3
- package/dist/charts.d.ts +246 -0
- package/dist/charts.js +1028 -0
- package/dist/charts.js.map +1 -0
- package/dist/chunk-CHNY75QI.js +278 -0
- package/dist/chunk-CHNY75QI.js.map +1 -0
- package/dist/chunk-DPF6776I.js +36 -0
- package/dist/chunk-DPF6776I.js.map +1 -0
- package/dist/{chunk-6TMNEBBJ.js → chunk-GX6O72IV.js} +44 -35
- package/dist/chunk-GX6O72IV.js.map +1 -0
- package/dist/{chunk-5XIPPVH7.js → chunk-IUBWNDUK.js} +15 -4
- package/dist/chunk-IUBWNDUK.js.map +1 -0
- package/dist/chunk-OUYJXVLQ.js +41 -0
- package/dist/chunk-OUYJXVLQ.js.map +1 -0
- package/dist/chunk-UYGTAVKR.js +93 -0
- package/dist/chunk-UYGTAVKR.js.map +1 -0
- package/dist/data-grid.d.ts +27 -0
- package/dist/data-grid.js +293 -0
- package/dist/data-grid.js.map +1 -0
- package/dist/editor.d.ts +18 -0
- package/dist/editor.js +632 -0
- package/dist/editor.js.map +1 -0
- package/dist/{feather-432JQGUB.js → feather-U45EQTAU.js} +4 -4
- package/dist/feather-U45EQTAU.js.map +1 -0
- package/dist/{heroicons-CCKJHFZY.js → heroicons-D3G7QU45.js} +4 -4
- package/dist/heroicons-D3G7QU45.js.map +1 -0
- package/dist/icons.d.ts +1 -1
- package/dist/icons.js +1 -2
- package/dist/index.d.ts +430 -133
- package/dist/index.js +10535 -98014
- package/dist/index.js.map +1 -1
- package/dist/kanban.d.ts +25 -0
- package/dist/kanban.js +224 -0
- package/dist/kanban.js.map +1 -0
- package/dist/{lucide-Z74WVRAK.js → lucide-OGUV44TQ.js} +4 -4
- package/dist/lucide-OGUV44TQ.js.map +1 -0
- package/dist/{phosphor-DYUCR5S2.js → phosphor-QG2ZMEMZ.js} +4 -4
- package/dist/phosphor-QG2ZMEMZ.js.map +1 -0
- package/dist/resizable.d.ts +39 -0
- package/dist/resizable.js +89 -0
- package/dist/resizable.js.map +1 -0
- package/dist/roots.css +46 -11
- package/dist/{tabler-GRXDPAHR.js → tabler-MW2HN55L.js} +4 -4
- package/dist/tabler-MW2HN55L.js.map +1 -0
- package/dist/use-breakpoint-Cn51IubK.d.ts +30 -0
- package/dist/utils.js +1 -2
- package/dist/virtualized.d.ts +16 -0
- package/dist/virtualized.js +55 -0
- package/dist/virtualized.js.map +1 -0
- package/package.json +144 -4
- package/dist/chunk-5WRI5ZAA.js +0 -29
- package/dist/chunk-5WRI5ZAA.js.map +0 -1
- package/dist/chunk-5XIPPVH7.js.map +0 -1
- package/dist/chunk-6TMNEBBJ.js.map +0 -1
- package/dist/feather-432JQGUB.js.map +0 -1
- package/dist/heroicons-CCKJHFZY.js.map +0 -1
- package/dist/lucide-Z74WVRAK.js.map +0 -1
- package/dist/phosphor-DYUCR5S2.js.map +0 -1
- package/dist/tabler-GRXDPAHR.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import * as react from 'react';
|
|
3
|
-
import { ButtonHTMLAttributes, ReactNode, InputHTMLAttributes, LabelHTMLAttributes, TextareaHTMLAttributes, Ref, HTMLAttributes,
|
|
2
|
+
import { ButtonHTMLAttributes, ReactNode, InputHTMLAttributes, LabelHTMLAttributes, TextareaHTMLAttributes, Ref, ReactElement, HTMLAttributes, AnchorHTMLAttributes, ComponentType } from 'react';
|
|
3
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import { IconName } from './icons.js';
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
import { Separator, Panel, Group } from 'react-resizable-panels';
|
|
5
|
+
import { B as BreakpointKey } from './use-breakpoint-Cn51IubK.js';
|
|
6
|
+
export { a as BreakpointWidthProvider, u as useBreakpoint } from './use-breakpoint-Cn51IubK.js';
|
|
8
7
|
|
|
9
8
|
type ButtonVariant = "default" | "secondary" | "tertiary" | "outline" | "ghost" | "destructive" | "success" | "warning" | "link";
|
|
10
9
|
type ButtonSize = "sm" | "md" | "lg" | "icon-sm" | "icon" | "icon-lg";
|
|
10
|
+
declare const ButtonSizeContext: react.Context<ButtonSize | null>;
|
|
11
11
|
interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
12
12
|
variant?: ButtonVariant;
|
|
13
13
|
size?: ButtonSize;
|
|
@@ -16,7 +16,7 @@ interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
|
16
16
|
loading?: boolean;
|
|
17
17
|
children?: ReactNode;
|
|
18
18
|
}
|
|
19
|
-
declare
|
|
19
|
+
declare const Button: react.ForwardRefExoticComponent<ButtonProps & react.RefAttributes<HTMLButtonElement>>;
|
|
20
20
|
|
|
21
21
|
type Side = "top" | "right" | "bottom" | "left";
|
|
22
22
|
type Align = "start" | "center" | "end";
|
|
@@ -100,8 +100,10 @@ interface DropdownProps {
|
|
|
100
100
|
ref?: Ref<HTMLDivElement>;
|
|
101
101
|
container?: Element | DocumentFragment;
|
|
102
102
|
error?: boolean;
|
|
103
|
+
/** When multiple, show removable chips below the trigger. Defaults to true. Set false in toolbar contexts where chips are shown elsewhere. */
|
|
104
|
+
showChips?: boolean;
|
|
103
105
|
}
|
|
104
|
-
declare function Dropdown({ options, value, onChange, label, disabled, placeholder, multiple, searchable, size, className, ref, container, error, }: DropdownProps): react_jsx_runtime.JSX.Element;
|
|
106
|
+
declare function Dropdown({ options, value, onChange, label, disabled, placeholder, multiple, searchable, size, className, ref, container, error, showChips, }: DropdownProps): react_jsx_runtime.JSX.Element;
|
|
105
107
|
|
|
106
108
|
interface ComboboxOption {
|
|
107
109
|
value: string;
|
|
@@ -177,8 +179,59 @@ interface DatePickerProps {
|
|
|
177
179
|
label?: string;
|
|
178
180
|
/** Forwarded to the trigger button so an external Label htmlFor can be associated. Defaults to a generated id used by the built-in label. */
|
|
179
181
|
id?: string;
|
|
182
|
+
/** Earliest / latest selectable day (inclusive). Days outside are disabled. */
|
|
183
|
+
min?: Date;
|
|
184
|
+
max?: Date;
|
|
185
|
+
/**
|
|
186
|
+
* Range context for paired "Start date" / "End date" pickers. The other
|
|
187
|
+
* end of the range is shown as selected and the days between are shaded,
|
|
188
|
+
* so choosing an end date shows the start date and the span. When this
|
|
189
|
+
* picker has no value yet, hovering previews the span from the other end.
|
|
190
|
+
*/
|
|
191
|
+
range?: {
|
|
192
|
+
start?: Date | null;
|
|
193
|
+
end?: Date | null;
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
declare function DatePicker({ value, onChange, placeholder, disabled, className, ref, container, error, label, id, min, max, range }: DatePickerProps): react_jsx_runtime.JSX.Element;
|
|
197
|
+
|
|
198
|
+
interface DateRange {
|
|
199
|
+
start: Date | null;
|
|
200
|
+
end: Date | null;
|
|
201
|
+
}
|
|
202
|
+
interface DateRangePreset {
|
|
203
|
+
label: string;
|
|
204
|
+
/** Returns the range to apply; evaluated when clicked so "Last 7 days" is always relative to now. */
|
|
205
|
+
range: () => DateRange;
|
|
206
|
+
}
|
|
207
|
+
interface DateRangePickerProps {
|
|
208
|
+
value: DateRange;
|
|
209
|
+
onChange: (range: DateRange) => void;
|
|
210
|
+
placeholder?: string;
|
|
211
|
+
disabled?: boolean;
|
|
212
|
+
error?: boolean;
|
|
213
|
+
/** Built-in label above the trigger. Omit when wrapping in <Field>. */
|
|
214
|
+
label?: string;
|
|
215
|
+
id?: string;
|
|
216
|
+
className?: string;
|
|
217
|
+
ref?: Ref<HTMLDivElement>;
|
|
218
|
+
container?: Element | DocumentFragment;
|
|
219
|
+
/** Earliest / latest selectable day. */
|
|
220
|
+
min?: Date;
|
|
221
|
+
max?: Date;
|
|
222
|
+
/** Quick ranges listed beside the calendars. Pass [] to hide; omit for the defaults. */
|
|
223
|
+
presets?: DateRangePreset[];
|
|
224
|
+
/** First day of the week. Default 0 (Sunday). */
|
|
225
|
+
weekStartsOn?: 0 | 1;
|
|
180
226
|
}
|
|
181
|
-
declare
|
|
227
|
+
declare const DEFAULT_DATE_RANGE_PRESETS: DateRangePreset[];
|
|
228
|
+
/**
|
|
229
|
+
* Start/end date selection with two side-by-side months, hover preview of
|
|
230
|
+
* the pending range, and quick presets. Click once for the start, again for
|
|
231
|
+
* the end (clicking before the start restarts the selection). Closes on
|
|
232
|
+
* Escape or outside click. Pair with <Field> for label/hint/error wiring.
|
|
233
|
+
*/
|
|
234
|
+
declare function DateRangePicker({ value, onChange, placeholder, disabled, error, label, id, className, ref, container, min, max, presets, weekStartsOn, }: DateRangePickerProps): react_jsx_runtime.JSX.Element;
|
|
182
235
|
|
|
183
236
|
interface FileUploadProps {
|
|
184
237
|
onFiles: (files: File[]) => void;
|
|
@@ -192,6 +245,8 @@ interface FileUploadProps {
|
|
|
192
245
|
declare function FileUpload({ onFiles, accept, multiple, maxSize, className, error, label }: FileUploadProps): react_jsx_runtime.JSX.Element;
|
|
193
246
|
|
|
194
247
|
interface SliderRangeProps {
|
|
248
|
+
/** Accessible name for the slider thumb(s); range sliders announce "<label> minimum" / "<label> maximum". Default "Value". */
|
|
249
|
+
label?: string;
|
|
195
250
|
value: number | [number, number];
|
|
196
251
|
onChange: (value: number | [number, number]) => void;
|
|
197
252
|
min?: number;
|
|
@@ -203,7 +258,7 @@ interface SliderRangeProps {
|
|
|
203
258
|
ref?: Ref<HTMLDivElement>;
|
|
204
259
|
error?: boolean;
|
|
205
260
|
}
|
|
206
|
-
declare function SliderRange({ value, onChange, min, max, step, disabled, showValue, className, ref, error, }: SliderRangeProps): react_jsx_runtime.JSX.Element;
|
|
261
|
+
declare function SliderRange({ value, onChange, min, max, step, disabled, showValue, className, ref, error, label }: SliderRangeProps): react_jsx_runtime.JSX.Element;
|
|
207
262
|
|
|
208
263
|
interface TimePickerProps {
|
|
209
264
|
value: string;
|
|
@@ -233,10 +288,12 @@ interface NumberInputProps {
|
|
|
233
288
|
size?: "sm" | "md" | "lg";
|
|
234
289
|
className?: string;
|
|
235
290
|
error?: boolean;
|
|
291
|
+
/** Allow decimal input. Default: true when step is not an integer, false otherwise. */
|
|
292
|
+
allowDecimals?: boolean;
|
|
236
293
|
/** Forwarded to the inner input element so a Label htmlFor can be associated. */
|
|
237
294
|
id?: string;
|
|
238
295
|
}
|
|
239
|
-
declare function NumberInput({ value, onChange, min, max, step, disabled, placeholder, prefix, suffix, size, className, error, id, }: NumberInputProps): react_jsx_runtime.JSX.Element;
|
|
296
|
+
declare function NumberInput({ value, onChange, min, max, step, disabled, placeholder, prefix, suffix, size, className, error, allowDecimals, id, }: NumberInputProps): react_jsx_runtime.JSX.Element;
|
|
240
297
|
|
|
241
298
|
interface TagInputProps {
|
|
242
299
|
value: string[];
|
|
@@ -248,8 +305,10 @@ interface TagInputProps {
|
|
|
248
305
|
error?: boolean;
|
|
249
306
|
/** Forwarded to the inner input element so a Label htmlFor can be associated. */
|
|
250
307
|
id?: string;
|
|
308
|
+
/** Accessible name for the input when no visible Label is associated via id. Default "Add tag". */
|
|
309
|
+
"aria-label"?: string;
|
|
251
310
|
}
|
|
252
|
-
declare function TagInput({ value, onChange, placeholder, maxTags, disabled, className, error, id, }: TagInputProps): react_jsx_runtime.JSX.Element;
|
|
311
|
+
declare function TagInput({ value, onChange, placeholder, maxTags, disabled, className, error, id, "aria-label": ariaLabel }: TagInputProps): react_jsx_runtime.JSX.Element;
|
|
253
312
|
|
|
254
313
|
interface PinInputProps {
|
|
255
314
|
value: string;
|
|
@@ -295,6 +354,39 @@ interface InlineFieldErrorProps {
|
|
|
295
354
|
}
|
|
296
355
|
declare function InlineFieldError({ message, id, className }: InlineFieldErrorProps): react_jsx_runtime.JSX.Element;
|
|
297
356
|
|
|
357
|
+
interface FieldControlProps {
|
|
358
|
+
id: string;
|
|
359
|
+
"aria-describedby"?: string;
|
|
360
|
+
"aria-invalid"?: true;
|
|
361
|
+
"aria-required"?: true;
|
|
362
|
+
required?: boolean;
|
|
363
|
+
/** Set on Gridsmith form components (Input, Textarea, Dropdown, DatePicker, …). */
|
|
364
|
+
error?: boolean;
|
|
365
|
+
}
|
|
366
|
+
interface FieldProps {
|
|
367
|
+
label: ReactNode;
|
|
368
|
+
/** The single form control. Receives id, aria-describedby, aria-invalid/error and required automatically. */
|
|
369
|
+
children: ReactElement | ((props: FieldControlProps) => ReactNode);
|
|
370
|
+
/** Persistent help text (format requirements, why a field is disabled). Shown below the control, above any error. */
|
|
371
|
+
hint?: ReactNode;
|
|
372
|
+
/** Current validation error. Rendered as InlineFieldError (role="alert") and linked via aria-describedby. */
|
|
373
|
+
error?: string | null | false;
|
|
374
|
+
required?: boolean;
|
|
375
|
+
/** Slot to the right of the label, e.g. a "Forgot password?" Link. */
|
|
376
|
+
labelAction?: ReactNode;
|
|
377
|
+
/** Explicit id for the control; generated when omitted. */
|
|
378
|
+
id?: string;
|
|
379
|
+
className?: string;
|
|
380
|
+
}
|
|
381
|
+
/**
|
|
382
|
+
* Label + control + hint + error, wired together. Guarantees the label is
|
|
383
|
+
* associated (htmlFor/id), that hint and error are announced
|
|
384
|
+
* (aria-describedby), that the control is marked invalid, and that the error
|
|
385
|
+
* sits directly below the field (forms-002/006/009/010). Use one Field per
|
|
386
|
+
* control; do not add a separate <Label> or a label prop on the child.
|
|
387
|
+
*/
|
|
388
|
+
declare function Field({ label, children, hint, error, required, labelAction, id: idProp, className }: FieldProps): react_jsx_runtime.JSX.Element;
|
|
389
|
+
|
|
298
390
|
type ValidationMode = "onBlur" | "onSubmit" | "onChange";
|
|
299
391
|
interface FormErrors {
|
|
300
392
|
[field: string]: string | undefined;
|
|
@@ -333,18 +425,6 @@ interface TransferListProps {
|
|
|
333
425
|
}
|
|
334
426
|
declare function TransferList({ available, selected, onChange, availableTitle, selectedTitle, searchable, className, ref, }: TransferListProps): react_jsx_runtime.JSX.Element;
|
|
335
427
|
|
|
336
|
-
type ToolbarGroup = "blockType" | "fontFamily" | "textSize" | "formatting" | "colors" | "alignment" | "lists" | "blocks" | "insert" | "extras" | "history";
|
|
337
|
-
interface RichTextEditorProps {
|
|
338
|
-
content?: string;
|
|
339
|
-
placeholder?: string;
|
|
340
|
-
onChange?: (html: string) => void;
|
|
341
|
-
editable?: boolean;
|
|
342
|
-
toolbar?: ToolbarGroup[] | "full" | "minimal";
|
|
343
|
-
className?: string;
|
|
344
|
-
ref?: Ref<HTMLDivElement>;
|
|
345
|
-
}
|
|
346
|
-
declare function RichTextEditor({ content, placeholder, onChange, editable, toolbar, className, ref, }: RichTextEditorProps): react_jsx_runtime.JSX.Element | null;
|
|
347
|
-
|
|
348
428
|
interface MentionSuggestion {
|
|
349
429
|
id: string;
|
|
350
430
|
label: string;
|
|
@@ -363,23 +443,35 @@ interface MentionInputProps {
|
|
|
363
443
|
declare function MentionInput({ value: controlledValue, onChange, suggestions, trigger, placeholder, disabled, className, }: MentionInputProps): react_jsx_runtime.JSX.Element;
|
|
364
444
|
|
|
365
445
|
type CardVariant = "default" | "featured" | "interactive" | "outline" | "ghost";
|
|
446
|
+
type CardSelectType = "radio" | "checkbox" | "toggle";
|
|
366
447
|
interface CardProps extends HTMLAttributes<HTMLDivElement> {
|
|
367
448
|
variant?: CardVariant;
|
|
368
449
|
loading?: boolean;
|
|
369
450
|
selected?: boolean;
|
|
370
451
|
selectable?: boolean;
|
|
452
|
+
selectType?: CardSelectType;
|
|
371
453
|
onSelectedChange?: (selected: boolean) => void;
|
|
454
|
+
name?: string;
|
|
455
|
+
indeterminate?: boolean;
|
|
456
|
+
disabled?: boolean;
|
|
457
|
+
checkable?: boolean;
|
|
372
458
|
children: ReactNode;
|
|
373
459
|
}
|
|
374
|
-
declare
|
|
460
|
+
declare const Card: react.ForwardRefExoticComponent<CardProps & react.RefAttributes<HTMLDivElement>>;
|
|
375
461
|
interface CardHeaderProps extends HTMLAttributes<HTMLDivElement> {
|
|
376
462
|
actions?: ReactNode;
|
|
463
|
+
icon?: IconName;
|
|
464
|
+
menuItems?: DropdownMenuEntry[];
|
|
377
465
|
}
|
|
378
|
-
declare
|
|
379
|
-
declare
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
466
|
+
declare const CardHeader: react.ForwardRefExoticComponent<CardHeaderProps & react.RefAttributes<HTMLDivElement>>;
|
|
467
|
+
declare const CardTitle: react.ForwardRefExoticComponent<HTMLAttributes<HTMLHeadingElement> & react.RefAttributes<HTMLHeadingElement>>;
|
|
468
|
+
interface CardDescriptionProps extends HTMLAttributes<HTMLParagraphElement> {
|
|
469
|
+
/** Max lines before clamping. Default 2. Set to 0 for no limit. */
|
|
470
|
+
lines?: number;
|
|
471
|
+
}
|
|
472
|
+
declare const CardDescription: react.ForwardRefExoticComponent<CardDescriptionProps & react.RefAttributes<HTMLParagraphElement>>;
|
|
473
|
+
declare const CardContent: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & react.RefAttributes<HTMLDivElement>>;
|
|
474
|
+
declare const CardFooter: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & react.RefAttributes<HTMLDivElement>>;
|
|
383
475
|
|
|
384
476
|
interface Trend {
|
|
385
477
|
direction: "up" | "down" | "flat";
|
|
@@ -409,6 +501,35 @@ interface DataListProps {
|
|
|
409
501
|
}
|
|
410
502
|
declare function DataList({ items, columns, className }: DataListProps): react_jsx_runtime.JSX.Element;
|
|
411
503
|
|
|
504
|
+
interface DescriptionItem {
|
|
505
|
+
label: string;
|
|
506
|
+
value: ReactNode;
|
|
507
|
+
icon?: IconName;
|
|
508
|
+
tooltip?: string;
|
|
509
|
+
span?: number;
|
|
510
|
+
}
|
|
511
|
+
type DescriptionListOrientation = "horizontal" | "vertical";
|
|
512
|
+
type DescriptionListSize = "sm" | "md" | "lg";
|
|
513
|
+
interface DescriptionListProps {
|
|
514
|
+
items: DescriptionItem[];
|
|
515
|
+
orientation?: DescriptionListOrientation;
|
|
516
|
+
columns?: 1 | 2 | 3 | 4;
|
|
517
|
+
size?: DescriptionListSize;
|
|
518
|
+
dividers?: boolean;
|
|
519
|
+
stackBelow?: "sm" | "md" | "lg";
|
|
520
|
+
className?: string;
|
|
521
|
+
}
|
|
522
|
+
declare const DescriptionList: react.ForwardRefExoticComponent<DescriptionListProps & react.RefAttributes<HTMLDListElement>>;
|
|
523
|
+
|
|
524
|
+
type StatusDotVariant = "success" | "warning" | "error" | "info" | "neutral" | "offline";
|
|
525
|
+
interface StatusDotProps {
|
|
526
|
+
variant?: StatusDotVariant;
|
|
527
|
+
label?: string;
|
|
528
|
+
pulse?: boolean;
|
|
529
|
+
className?: string;
|
|
530
|
+
}
|
|
531
|
+
declare const StatusDot: react.ForwardRefExoticComponent<StatusDotProps & react.RefAttributes<HTMLSpanElement>>;
|
|
532
|
+
|
|
412
533
|
interface AccordionItem {
|
|
413
534
|
trigger: ReactNode;
|
|
414
535
|
content: ReactNode;
|
|
@@ -423,37 +544,17 @@ interface AccordionProps {
|
|
|
423
544
|
}
|
|
424
545
|
declare function Accordion({ items, type, defaultOpen, open: controlledOpen, onOpenChange, className }: AccordionProps): react_jsx_runtime.JSX.Element;
|
|
425
546
|
|
|
426
|
-
declare const DEFAULT_BREAKPOINTS: {
|
|
427
|
-
readonly sm: 640;
|
|
428
|
-
readonly md: 768;
|
|
429
|
-
readonly lg: 1024;
|
|
430
|
-
readonly xl: 1280;
|
|
431
|
-
};
|
|
432
|
-
type BreakpointKey = keyof typeof DEFAULT_BREAKPOINTS;
|
|
433
|
-
/**
|
|
434
|
-
* Provides an override container width for all `useBreakpoint` calls within
|
|
435
|
-
* this subtree. Used by the builder's viewport preview to make components
|
|
436
|
-
* respond to the constrained canvas width instead of the browser viewport.
|
|
437
|
-
*/
|
|
438
|
-
declare function BreakpointWidthProvider({ width, children }: {
|
|
439
|
-
width: number | null;
|
|
440
|
-
children: ReactNode;
|
|
441
|
-
}): react.FunctionComponentElement<react.ProviderProps<number | null>>;
|
|
442
|
-
/**
|
|
443
|
-
* Reactive breakpoint check that reads `--ds-bp-*` CSS variables.
|
|
444
|
-
* Returns true when the viewport (or override container) is at or below the
|
|
445
|
-
* named breakpoint.
|
|
446
|
-
*
|
|
447
|
-
* @example
|
|
448
|
-
* const isMobile = useBreakpoint("md"); // true when ≤768px
|
|
449
|
-
*/
|
|
450
|
-
declare function useBreakpoint(key: BreakpointKey): boolean;
|
|
451
|
-
|
|
452
547
|
interface Column {
|
|
453
548
|
key: string;
|
|
454
549
|
header: string;
|
|
455
550
|
align?: "left" | "center" | "right";
|
|
456
551
|
sortable?: boolean;
|
|
552
|
+
/** Opt-in text truncation. true = 1 line, or { lines: N } for multi-line clamp before truncating. */
|
|
553
|
+
truncate?: boolean | {
|
|
554
|
+
lines: number;
|
|
555
|
+
};
|
|
556
|
+
/** CSS max-width for the column (e.g. "200px", "30ch"). Helps constrain wide text columns. */
|
|
557
|
+
maxWidth?: string;
|
|
457
558
|
}
|
|
458
559
|
type SortDir = "asc" | "desc" | null;
|
|
459
560
|
type TableDensity = "default" | "compact";
|
|
@@ -522,22 +623,32 @@ declare function Calendar({ events, view: controlledView, defaultView, onViewCha
|
|
|
522
623
|
|
|
523
624
|
type BadgeVariant = "default" | "neutral" | "subtle" | "success" | "success-soft" | "warning" | "warning-soft" | "error" | "error-soft" | "outline";
|
|
524
625
|
type BadgeSize = "xs" | "sm" | "md";
|
|
626
|
+
type BadgePaletteColor = 1 | 2 | 3 | 4 | 5;
|
|
525
627
|
interface BadgeProps {
|
|
526
628
|
variant?: BadgeVariant;
|
|
527
629
|
size?: BadgeSize;
|
|
630
|
+
/** Palette colour (1-5). Overrides variant colour with decorative palette tokens. */
|
|
631
|
+
color?: BadgePaletteColor;
|
|
528
632
|
/** Icon to show before the label */
|
|
529
633
|
iconLeft?: IconName;
|
|
530
634
|
/** Icon to show after the label */
|
|
531
635
|
iconRight?: IconName;
|
|
636
|
+
/** Max width before truncation (e.g. "120px", "16ch"). Shows tooltip when truncated. */
|
|
637
|
+
maxWidth?: string;
|
|
532
638
|
className?: string;
|
|
533
639
|
children?: ReactNode;
|
|
534
640
|
}
|
|
535
|
-
declare function Badge({ variant, size, iconLeft, iconRight, className, children }: BadgeProps): react_jsx_runtime.JSX.Element;
|
|
641
|
+
declare function Badge({ variant, size, color, iconLeft, iconRight, maxWidth, className, children }: BadgeProps): react_jsx_runtime.JSX.Element;
|
|
536
642
|
|
|
537
643
|
type TagVariant = "default" | "subtle" | "success" | "warning" | "error" | "outline";
|
|
644
|
+
type TagPaletteColor = 1 | 2 | 3 | 4 | 5;
|
|
538
645
|
interface TagProps {
|
|
539
646
|
variant?: TagVariant;
|
|
540
647
|
size?: "sm" | "md";
|
|
648
|
+
/** Palette colour (1-5). Overrides variant colour with decorative palette tokens. */
|
|
649
|
+
color?: TagPaletteColor;
|
|
650
|
+
/** Max width before truncation (e.g. "120px", "16ch"). Shows tooltip when truncated. */
|
|
651
|
+
maxWidth?: string;
|
|
541
652
|
onRemove?: () => void;
|
|
542
653
|
onClick?: () => void;
|
|
543
654
|
disabled?: boolean;
|
|
@@ -546,16 +657,43 @@ interface TagProps {
|
|
|
546
657
|
}
|
|
547
658
|
declare const Tag: react.ForwardRefExoticComponent<TagProps & react.RefAttributes<HTMLSpanElement>>;
|
|
548
659
|
|
|
660
|
+
type AvatarStatus = "online" | "away" | "busy" | "offline";
|
|
549
661
|
interface AvatarProps {
|
|
550
662
|
initials?: string;
|
|
551
663
|
src?: string;
|
|
552
664
|
alt?: string;
|
|
553
665
|
size?: "sm" | "md" | "lg";
|
|
554
|
-
status?:
|
|
666
|
+
status?: AvatarStatus;
|
|
555
667
|
className?: string;
|
|
556
668
|
}
|
|
557
669
|
declare function Avatar({ initials, src, alt, size, status, className }: AvatarProps): react_jsx_runtime.JSX.Element;
|
|
558
670
|
|
|
671
|
+
interface AvatarGroupItem {
|
|
672
|
+
/** Display name — used for the tooltip and, when initials are omitted, to derive them. */
|
|
673
|
+
name?: string;
|
|
674
|
+
initials?: string;
|
|
675
|
+
src?: string;
|
|
676
|
+
alt?: string;
|
|
677
|
+
status?: AvatarStatus;
|
|
678
|
+
}
|
|
679
|
+
interface AvatarGroupProps {
|
|
680
|
+
items: AvatarGroupItem[];
|
|
681
|
+
/** Avatars shown before collapsing the rest into a "+N" counter. Default 4. */
|
|
682
|
+
max?: number;
|
|
683
|
+
size?: "sm" | "md" | "lg";
|
|
684
|
+
/** Colour of the ring separating overlapping avatars — match the surface the group sits on. Default "canvas". */
|
|
685
|
+
ring?: "canvas" | "surface";
|
|
686
|
+
/** Called when the "+N" counter is clicked (e.g. open a member list). Renders it as a button. */
|
|
687
|
+
onOverflowClick?: () => void;
|
|
688
|
+
className?: string;
|
|
689
|
+
}
|
|
690
|
+
/**
|
|
691
|
+
* Overlapping row of avatars with a "+N" counter for the rest. Use for
|
|
692
|
+
* members, assignees, participants — anywhere several people share one
|
|
693
|
+
* slot. Do not hand-roll this with -space-x and ring classes.
|
|
694
|
+
*/
|
|
695
|
+
declare function AvatarGroup({ items, max, size, ring, onOverflowClick, className }: AvatarGroupProps): react_jsx_runtime.JSX.Element;
|
|
696
|
+
|
|
559
697
|
interface EmptyStateProps {
|
|
560
698
|
icon?: ReactNode;
|
|
561
699
|
title: string;
|
|
@@ -663,39 +801,6 @@ interface CarouselProps {
|
|
|
663
801
|
}
|
|
664
802
|
declare function Carousel({ children, autoPlay, autoPlayInterval, loop, showIndicators, showArrows, className, ref, }: CarouselProps): react_jsx_runtime.JSX.Element;
|
|
665
803
|
|
|
666
|
-
interface DataGridProps<T> {
|
|
667
|
-
data: T[];
|
|
668
|
-
columns: ColumnDef<T, any>[];
|
|
669
|
-
pageSize?: number;
|
|
670
|
-
editable?: boolean;
|
|
671
|
-
onCellEdit?: (rowIndex: number, columnId: string, value: unknown) => void;
|
|
672
|
-
/** Breakpoint at which the grid switches to card layout. Defaults to "md" (768px). */
|
|
673
|
-
mobileBreakpoint?: BreakpointKey;
|
|
674
|
-
className?: string;
|
|
675
|
-
}
|
|
676
|
-
declare function DataGrid<T>({ data, columns, pageSize, editable, onCellEdit, mobileBreakpoint, className, }: DataGridProps<T>): react_jsx_runtime.JSX.Element;
|
|
677
|
-
|
|
678
|
-
interface KanbanCard {
|
|
679
|
-
id: string;
|
|
680
|
-
title: string;
|
|
681
|
-
description?: string;
|
|
682
|
-
tags?: string[];
|
|
683
|
-
avatar?: string;
|
|
684
|
-
}
|
|
685
|
-
interface KanbanColumn {
|
|
686
|
-
id: string;
|
|
687
|
-
title: string;
|
|
688
|
-
cards: KanbanCard[];
|
|
689
|
-
color?: string;
|
|
690
|
-
}
|
|
691
|
-
interface KanbanBoardProps {
|
|
692
|
-
columns: KanbanColumn[];
|
|
693
|
-
onColumnsChange?: (columns: KanbanColumn[]) => void;
|
|
694
|
-
renderCard?: (card: KanbanCard) => ReactNode;
|
|
695
|
-
className?: string;
|
|
696
|
-
}
|
|
697
|
-
declare function KanbanBoard({ columns: controlledCols, onColumnsChange, renderCard, className, }: KanbanBoardProps): react_jsx_runtime.JSX.Element;
|
|
698
|
-
|
|
699
804
|
interface ChatMessage {
|
|
700
805
|
id: string;
|
|
701
806
|
sender: {
|
|
@@ -715,17 +820,6 @@ interface ChatMessageListProps {
|
|
|
715
820
|
}
|
|
716
821
|
declare function ChatMessageList({ messages, typingUser, showInput, onSend, className, }: ChatMessageListProps): react_jsx_runtime.JSX.Element;
|
|
717
822
|
|
|
718
|
-
interface VirtualizedListProps<T> {
|
|
719
|
-
items: T[];
|
|
720
|
-
estimateSize: (index: number) => number;
|
|
721
|
-
renderItem: (item: T, index: number, virtualItem: VirtualItem) => ReactNode;
|
|
722
|
-
overscan?: number;
|
|
723
|
-
height?: number | string;
|
|
724
|
-
className?: string;
|
|
725
|
-
ref?: Ref<HTMLDivElement>;
|
|
726
|
-
}
|
|
727
|
-
declare function VirtualizedList<T>({ items, estimateSize, renderItem, overscan, height, className, ref, }: VirtualizedListProps<T>): react_jsx_runtime.JSX.Element;
|
|
728
|
-
|
|
729
823
|
interface StackedListItem {
|
|
730
824
|
id: string | number;
|
|
731
825
|
leading?: ReactNode;
|
|
@@ -743,13 +837,48 @@ interface StackedListProps {
|
|
|
743
837
|
}
|
|
744
838
|
declare const StackedList: react.ForwardRefExoticComponent<StackedListProps & react.RefAttributes<HTMLUListElement>>;
|
|
745
839
|
|
|
840
|
+
type LinkUnderline = "hover" | "always" | "none";
|
|
841
|
+
type LinkTone = "accent" | "muted" | "inherit";
|
|
842
|
+
interface LinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
843
|
+
href: string;
|
|
844
|
+
children: ReactNode;
|
|
845
|
+
/** When to show the underline. Default "hover". */
|
|
846
|
+
underline?: LinkUnderline;
|
|
847
|
+
/** Colour: accent (default), muted for secondary links, inherit to match surrounding text. */
|
|
848
|
+
tone?: LinkTone;
|
|
849
|
+
/** Opens in a new tab with rel="noopener noreferrer". Default false. */
|
|
850
|
+
external?: boolean;
|
|
851
|
+
/**
|
|
852
|
+
* Render through a router link component instead of a plain anchor
|
|
853
|
+
* (e.g. `component={RouterLink}` from react-router or next/link). The
|
|
854
|
+
* component receives the same props; `href` is also passed as `to` for
|
|
855
|
+
* react-router compatibility.
|
|
856
|
+
*/
|
|
857
|
+
component?: ComponentType<Record<string, unknown>>;
|
|
858
|
+
iconLeft?: ReactNode;
|
|
859
|
+
iconRight?: ReactNode;
|
|
860
|
+
}
|
|
861
|
+
/**
|
|
862
|
+
* Navigation link. Renders a real <a> (or a router link via `component`) so
|
|
863
|
+
* middle-click, open-in-new-tab, right-click "copy link" and screen readers
|
|
864
|
+
* all behave correctly. Visually identical to Button variant="link".
|
|
865
|
+
*
|
|
866
|
+
* Use Link for NAVIGATION (to a page or URL). Use Button variant="link" for an
|
|
867
|
+
* ACTION that should look like a link (show more, resend code). Never use a
|
|
868
|
+
* ghost Button for inline text — its padding breaks the line.
|
|
869
|
+
*/
|
|
870
|
+
declare const Link: react.ForwardRefExoticComponent<LinkProps & react.RefAttributes<HTMLAnchorElement>>;
|
|
871
|
+
|
|
746
872
|
type TabsVariant = "underline" | "pill";
|
|
873
|
+
type TabsOverflow = "scroll" | "hidden" | "truncate";
|
|
747
874
|
interface Tab {
|
|
748
875
|
id: string;
|
|
749
876
|
label: string;
|
|
750
877
|
count?: number;
|
|
751
878
|
icon?: IconName;
|
|
752
879
|
disabled?: boolean;
|
|
880
|
+
/** Truncate long labels and show tooltip on hover. */
|
|
881
|
+
truncate?: boolean;
|
|
753
882
|
}
|
|
754
883
|
interface TabsArrayProps {
|
|
755
884
|
tabs: Tab[];
|
|
@@ -758,6 +887,7 @@ interface TabsArrayProps {
|
|
|
758
887
|
orientation?: "horizontal" | "vertical";
|
|
759
888
|
variant?: TabsVariant;
|
|
760
889
|
fullWidth?: boolean;
|
|
890
|
+
overflow?: TabsOverflow;
|
|
761
891
|
className?: string;
|
|
762
892
|
children?: never;
|
|
763
893
|
}
|
|
@@ -767,6 +897,7 @@ interface TabsCompoundProps {
|
|
|
767
897
|
orientation?: "horizontal" | "vertical";
|
|
768
898
|
variant?: TabsVariant;
|
|
769
899
|
fullWidth?: boolean;
|
|
900
|
+
overflow?: TabsOverflow;
|
|
770
901
|
className?: string;
|
|
771
902
|
children: ReactNode;
|
|
772
903
|
tabs?: never;
|
|
@@ -776,12 +907,13 @@ declare function TabsList({ children, className }: {
|
|
|
776
907
|
children: ReactNode;
|
|
777
908
|
className?: string;
|
|
778
909
|
}): react_jsx_runtime.JSX.Element;
|
|
779
|
-
declare function TabsTrigger({ value, children, count, icon, disabled, className }: {
|
|
910
|
+
declare function TabsTrigger({ value, children, count, icon, disabled, truncate, className }: {
|
|
780
911
|
value: string;
|
|
781
912
|
children: ReactNode;
|
|
782
913
|
count?: number;
|
|
783
914
|
icon?: IconName;
|
|
784
915
|
disabled?: boolean;
|
|
916
|
+
truncate?: boolean;
|
|
785
917
|
className?: string;
|
|
786
918
|
}): react_jsx_runtime.JSX.Element;
|
|
787
919
|
declare function TabsContent({ value, children, className }: {
|
|
@@ -800,13 +932,28 @@ interface BreadcrumbItem$1 {
|
|
|
800
932
|
label: string;
|
|
801
933
|
href?: string;
|
|
802
934
|
onClick?: () => void;
|
|
935
|
+
icon?: IconName;
|
|
803
936
|
}
|
|
937
|
+
type BreadcrumbsVariant = "inline" | "contained" | "pill";
|
|
938
|
+
type BreadcrumbsSeparator = "slash" | "chevron" | "dot" | "arrow";
|
|
939
|
+
type BreadcrumbsSize = "sm" | "md";
|
|
804
940
|
interface BreadcrumbsProps {
|
|
805
941
|
items: BreadcrumbItem$1[];
|
|
806
|
-
separator?:
|
|
942
|
+
separator?: BreadcrumbsSeparator;
|
|
943
|
+
variant?: BreadcrumbsVariant;
|
|
944
|
+
/** Visual treatment of individual breadcrumb items — independent of layout variant. */
|
|
945
|
+
itemVariant?: "default" | "pill";
|
|
946
|
+
size?: BreadcrumbsSize;
|
|
947
|
+
showIcons?: boolean;
|
|
948
|
+
maxItems?: number;
|
|
949
|
+
/** Full-bleed: contained background extends edge-to-edge, breaking out of parent padding. Text stays aligned with sibling content. */
|
|
950
|
+
bleed?: boolean;
|
|
951
|
+
/** Max-width for bleed content alignment. Defaults to --ds-bp-xl. */
|
|
952
|
+
contentMaxWidth?: string;
|
|
807
953
|
className?: string;
|
|
954
|
+
container?: Element | DocumentFragment;
|
|
808
955
|
}
|
|
809
|
-
declare
|
|
956
|
+
declare const Breadcrumbs: react.ForwardRefExoticComponent<BreadcrumbsProps & react.RefAttributes<HTMLElement>>;
|
|
810
957
|
|
|
811
958
|
interface PaginationProps {
|
|
812
959
|
currentPage: number;
|
|
@@ -834,14 +981,16 @@ interface StepperProps {
|
|
|
834
981
|
declare function Stepper({ steps, currentStep, onStepChange, orientation, className }: StepperProps): react_jsx_runtime.JSX.Element;
|
|
835
982
|
|
|
836
983
|
type SidebarType = "traditional" | "compact" | "minimal";
|
|
984
|
+
type SidebarPosition = "flush" | "floating";
|
|
837
985
|
interface SidebarContextValue {
|
|
838
986
|
collapsed: boolean;
|
|
839
987
|
onCollapsedChange: (collapsed: boolean) => void;
|
|
840
988
|
portalContainer: Element | null;
|
|
841
989
|
type: SidebarType;
|
|
990
|
+
navSize?: "sm" | "md";
|
|
842
991
|
}
|
|
843
992
|
declare function useSidebar(): SidebarContextValue | null;
|
|
844
|
-
type SidebarVariant = "default" | "dark"
|
|
993
|
+
type SidebarVariant = "default" | "dark";
|
|
845
994
|
interface SidebarProps {
|
|
846
995
|
header?: ReactNode;
|
|
847
996
|
footer?: ReactNode;
|
|
@@ -855,6 +1004,12 @@ interface SidebarProps {
|
|
|
855
1004
|
mini?: boolean;
|
|
856
1005
|
/** Sidebar layout type: traditional (collapsible), compact (narrow icon+label stacked), minimal (transparent, no border) */
|
|
857
1006
|
type?: SidebarType;
|
|
1007
|
+
/** Position: flush (default, edge-to-edge) or floating (inset with rounded corners and glass surface) */
|
|
1008
|
+
position?: SidebarPosition;
|
|
1009
|
+
/** Whether the adjacent navbar is floating — zeroes top padding in floating mode */
|
|
1010
|
+
navbarFloating?: boolean;
|
|
1011
|
+
/** Item density — passed to context so collapse button matches nav item sizing */
|
|
1012
|
+
navSize?: "sm" | "md";
|
|
858
1013
|
/** Fill available width (100%) instead of using a fixed token width. Use inside Drawers. */
|
|
859
1014
|
fill?: boolean;
|
|
860
1015
|
className?: string;
|
|
@@ -875,6 +1030,7 @@ interface SidebarSection {
|
|
|
875
1030
|
label?: string;
|
|
876
1031
|
items: SidebarItem[];
|
|
877
1032
|
}
|
|
1033
|
+
type SidebarNavSize = "sm" | "md";
|
|
878
1034
|
interface SidebarNavProps {
|
|
879
1035
|
items?: SidebarItem[];
|
|
880
1036
|
sections?: SidebarSection[];
|
|
@@ -888,9 +1044,11 @@ interface SidebarNavProps {
|
|
|
888
1044
|
mode?: "light" | "dark";
|
|
889
1045
|
/** Mobile mode: disables hover flyouts for compact items, renders children inline instead. */
|
|
890
1046
|
mobile?: boolean;
|
|
1047
|
+
/** Item density — "sm" reduces padding, font size, and icon size for menu-heavy sidebars */
|
|
1048
|
+
size?: SidebarNavSize;
|
|
891
1049
|
className?: string;
|
|
892
1050
|
}
|
|
893
|
-
declare function SidebarNav({ items, sections, collapsed: propsCollapsed, onCollapsedChange: propsOnChange, footer, onItemClick, type: propsType, mode, mobile, className, }: SidebarNavProps): react_jsx_runtime.JSX.Element;
|
|
1051
|
+
declare function SidebarNav({ items, sections, collapsed: propsCollapsed, onCollapsedChange: propsOnChange, footer, onItemClick, type: propsType, mode, mobile, size, className, }: SidebarNavProps): react_jsx_runtime.JSX.Element;
|
|
894
1052
|
|
|
895
1053
|
interface SegmentedControlOption {
|
|
896
1054
|
value: string;
|
|
@@ -928,6 +1086,9 @@ interface BreadcrumbItem {
|
|
|
928
1086
|
onClick?: () => void;
|
|
929
1087
|
}
|
|
930
1088
|
type HeadingLevel = "h1" | "h2" | "h3" | "h4";
|
|
1089
|
+
type PageHeaderVariant = "default" | "colourful" | "minimal" | "tabs-integrated";
|
|
1090
|
+
type PageHeaderBehavior = "static" | "snapping";
|
|
1091
|
+
type PageHeaderIntensity = "subtle" | "bold";
|
|
931
1092
|
interface PageHeaderProps {
|
|
932
1093
|
title: string;
|
|
933
1094
|
description?: string;
|
|
@@ -940,8 +1101,43 @@ interface PageHeaderProps {
|
|
|
940
1101
|
bannerImage?: string;
|
|
941
1102
|
as?: HeadingLevel;
|
|
942
1103
|
className?: string;
|
|
943
|
-
|
|
944
|
-
|
|
1104
|
+
variant?: PageHeaderVariant;
|
|
1105
|
+
/** Scroll behavior — independent of visual variant. "snapping" collapses on scroll. */
|
|
1106
|
+
behavior?: PageHeaderBehavior;
|
|
1107
|
+
/** Colourful: "subtle" = light accent tint, "bold" = full accent background (dark) */
|
|
1108
|
+
intensity?: PageHeaderIntensity;
|
|
1109
|
+
/** Colourful: background image URL — overlaid with accent colour */
|
|
1110
|
+
backgroundImage?: string;
|
|
1111
|
+
/** Colourful: extra bottom padding (px) for content overlap. Content below should use -mt-[value] to pull up. */
|
|
1112
|
+
overlapHeight?: number;
|
|
1113
|
+
/** Snapping: content shown only when expanded */
|
|
1114
|
+
expandedContent?: ReactNode;
|
|
1115
|
+
/** Snapping: scroll offset before collapse (px) */
|
|
1116
|
+
collapseOffset?: number;
|
|
1117
|
+
/** Snapping: keep collapsed header pinned at top */
|
|
1118
|
+
pinned?: boolean;
|
|
1119
|
+
/** Constrain inner content to this max-width while the header background spans full width. Used by colourful and snapping variants to align header content with PageContainer body. Defaults to --ds-bp-xl. */
|
|
1120
|
+
contentMaxWidth?: string;
|
|
1121
|
+
/** Tabs-integrated: render a Tabs component at the header bottom edge */
|
|
1122
|
+
tabs?: ReactNode;
|
|
1123
|
+
/** Visual style of inline breadcrumbs */
|
|
1124
|
+
breadcrumbStyle?: "default" | "pill";
|
|
1125
|
+
/** Separator between breadcrumb items */
|
|
1126
|
+
breadcrumbSeparator?: "chevron" | "slash" | "dot" | "arrow";
|
|
1127
|
+
/** Snapping: when true, suppress breadcrumbs in the expanded state (external breadcrumbs provide them). Collapsed state still shows the last crumb for context. */
|
|
1128
|
+
hideExpandedBreadcrumbs?: boolean;
|
|
1129
|
+
/** Position: flush (default, edge-to-edge) or floating (inset with rounded corners and glass surface) */
|
|
1130
|
+
position?: "flush" | "floating";
|
|
1131
|
+
/** Whether the adjacent navbar is floating — zeroes top padding in floating mode */
|
|
1132
|
+
navbarFloating?: boolean;
|
|
1133
|
+
/** Whether the adjacent sidebar is floating — zeroes left padding in floating mode */
|
|
1134
|
+
sidebarFloating?: boolean;
|
|
1135
|
+
/** Suppress the bottom margin on colourful headers (used when the header is inside an external floating block that manages its own spacing) */
|
|
1136
|
+
noBottomMargin?: boolean;
|
|
1137
|
+
/** Snapping + floating: contained breadcrumbs to render inside the floating card when expanded. Keeps breadcrumbs visually inside the same card as the header. */
|
|
1138
|
+
containedBreadcrumbs?: ReactNode;
|
|
1139
|
+
}
|
|
1140
|
+
declare const PageHeader: react.ForwardRefExoticComponent<PageHeaderProps & react.RefAttributes<HTMLElement>>;
|
|
945
1141
|
|
|
946
1142
|
interface DockItem {
|
|
947
1143
|
id: string;
|
|
@@ -960,7 +1156,9 @@ declare function Dock({ items, magnification, baseSize, className, }: DockProps)
|
|
|
960
1156
|
|
|
961
1157
|
type NavbarType = "default" | "underline" | "minimal";
|
|
962
1158
|
type NavbarAlign = "left" | "center" | "right";
|
|
963
|
-
type NavbarVariant = "default" | "transparent" | "compact" | "
|
|
1159
|
+
type NavbarVariant = "default" | "transparent" | "compact" | "elevated" | "blurred";
|
|
1160
|
+
type NavbarSize = "sm" | "md" | "lg";
|
|
1161
|
+
type NavbarPosition = "flush" | "floating";
|
|
964
1162
|
interface NavbarProps {
|
|
965
1163
|
logo?: ReactNode;
|
|
966
1164
|
navLinks?: ReactNode;
|
|
@@ -972,6 +1170,12 @@ interface NavbarProps {
|
|
|
972
1170
|
type?: NavbarType;
|
|
973
1171
|
/** Horizontal alignment of nav links: left (default), center (viewport-centered), right (before actions) */
|
|
974
1172
|
align?: NavbarAlign;
|
|
1173
|
+
/** Height density — sm (compact), md (default), lg (spacious) */
|
|
1174
|
+
size?: NavbarSize;
|
|
1175
|
+
/** Position: flush (default, edge-to-edge) or floating (inset with rounded corners and glass surface) */
|
|
1176
|
+
position?: NavbarPosition;
|
|
1177
|
+
/** Explicit border control — overrides variant default when set */
|
|
1178
|
+
bordered?: boolean;
|
|
975
1179
|
sticky?: boolean;
|
|
976
1180
|
className?: string;
|
|
977
1181
|
onMenuClick?: () => void;
|
|
@@ -1187,9 +1391,12 @@ interface TourProps {
|
|
|
1187
1391
|
declare function Tour({ steps, open, onClose, onComplete, container }: TourProps): react.ReactPortal | null;
|
|
1188
1392
|
|
|
1189
1393
|
type AlertVariant = "info" | "success" | "warning" | "error";
|
|
1394
|
+
type AlertPlacement = "inline" | "page-top" | "section-top";
|
|
1190
1395
|
interface AlertAction {
|
|
1191
1396
|
label: string;
|
|
1192
1397
|
onClick: () => void;
|
|
1398
|
+
variant?: "secondary" | "outline";
|
|
1399
|
+
iconLeft?: ReactNode;
|
|
1193
1400
|
}
|
|
1194
1401
|
interface AlertProps {
|
|
1195
1402
|
variant: AlertVariant;
|
|
@@ -1198,9 +1405,14 @@ interface AlertProps {
|
|
|
1198
1405
|
dismissible?: boolean;
|
|
1199
1406
|
onDismiss?: () => void;
|
|
1200
1407
|
action?: AlertAction;
|
|
1408
|
+
actions?: AlertAction[];
|
|
1409
|
+
/** Scoping: inline (default), page-top (sticky at viewport top), section-top (emphasized, full-width within container) */
|
|
1410
|
+
placement?: AlertPlacement;
|
|
1411
|
+
/** Expandable detail content — collapsed by default */
|
|
1412
|
+
expandableContent?: ReactNode;
|
|
1201
1413
|
className?: string;
|
|
1202
1414
|
}
|
|
1203
|
-
declare
|
|
1415
|
+
declare const Alert: react.ForwardRefExoticComponent<AlertProps & react.RefAttributes<HTMLDivElement>>;
|
|
1204
1416
|
|
|
1205
1417
|
type ToastVariant = "default" | "success" | "warning" | "error";
|
|
1206
1418
|
type ToastPosition = "top-right" | "top-left" | "bottom-right" | "bottom-left" | "top-center" | "bottom-center";
|
|
@@ -1219,8 +1431,62 @@ interface ToastProps {
|
|
|
1219
1431
|
position?: ToastPosition;
|
|
1220
1432
|
mode?: "light" | "dark";
|
|
1221
1433
|
container?: Element | DocumentFragment;
|
|
1434
|
+
/**
|
|
1435
|
+
* Render only the toast card, without the portal and fixed positioning.
|
|
1436
|
+
* Used by ToastProvider, which owns stacking and placement. Standalone
|
|
1437
|
+
* usage should leave this unset.
|
|
1438
|
+
*/
|
|
1439
|
+
inline?: boolean;
|
|
1222
1440
|
}
|
|
1223
|
-
declare function Toast({ variant, message, visible, onDismiss, duration, pauseOnHover, action, position, mode, container }: ToastProps):
|
|
1441
|
+
declare function Toast({ variant, message, visible, onDismiss, duration, pauseOnHover, action, position, mode, container, inline }: ToastProps): react_jsx_runtime.JSX.Element | null;
|
|
1442
|
+
|
|
1443
|
+
interface ToastOptions {
|
|
1444
|
+
variant?: ToastVariant;
|
|
1445
|
+
/** Milliseconds before auto-dismiss. 0 or Infinity keeps the toast until dismissed. */
|
|
1446
|
+
duration?: number;
|
|
1447
|
+
action?: ToastAction;
|
|
1448
|
+
/** Supply to update an existing toast in place instead of adding a new one. */
|
|
1449
|
+
id?: string;
|
|
1450
|
+
}
|
|
1451
|
+
interface PromiseToastMessages<T> {
|
|
1452
|
+
loading: ReactNode;
|
|
1453
|
+
success: ReactNode | ((value: T) => ReactNode);
|
|
1454
|
+
error: ReactNode | ((error: unknown) => ReactNode);
|
|
1455
|
+
}
|
|
1456
|
+
interface ToastApi {
|
|
1457
|
+
/** Enqueue a toast. Returns its id. */
|
|
1458
|
+
toast: (message: ReactNode, options?: ToastOptions) => string;
|
|
1459
|
+
success: (message: ReactNode, options?: Omit<ToastOptions, "variant">) => string;
|
|
1460
|
+
warning: (message: ReactNode, options?: Omit<ToastOptions, "variant">) => string;
|
|
1461
|
+
error: (message: ReactNode, options?: Omit<ToastOptions, "variant">) => string;
|
|
1462
|
+
/** Update a toast in place (message, variant, duration, action). */
|
|
1463
|
+
update: (id: string, message: ReactNode, options?: Omit<ToastOptions, "id">) => void;
|
|
1464
|
+
dismiss: (id: string) => void;
|
|
1465
|
+
dismissAll: () => void;
|
|
1466
|
+
/** Show a persistent loading toast that resolves to success or error. */
|
|
1467
|
+
promise: <T>(promise: Promise<T>, messages: PromiseToastMessages<T>, options?: Omit<ToastOptions, "id" | "variant" | "duration">) => Promise<T>;
|
|
1468
|
+
}
|
|
1469
|
+
interface ToastProviderProps {
|
|
1470
|
+
children: ReactNode;
|
|
1471
|
+
/** Maximum toasts shown at once; further toasts queue until one dismisses. Default 3. */
|
|
1472
|
+
maxVisible?: number;
|
|
1473
|
+
/** Where the stack is anchored. Default "bottom-right". */
|
|
1474
|
+
position?: ToastPosition;
|
|
1475
|
+
/** Default auto-dismiss duration in ms. Default 3000. */
|
|
1476
|
+
duration?: number;
|
|
1477
|
+
/** Independent colour mode for toasts, when the theme configures one. */
|
|
1478
|
+
mode?: "light" | "dark";
|
|
1479
|
+
/** Pause a toast's timer while hovered. Default true. */
|
|
1480
|
+
pauseOnHover?: boolean;
|
|
1481
|
+
}
|
|
1482
|
+
declare function useToast(): ToastApi;
|
|
1483
|
+
/**
|
|
1484
|
+
* Queue-backed toast manager. Wrap the app once (get_app_shell does this),
|
|
1485
|
+
* then call useToast() anywhere. Enforces the configured maximum visible
|
|
1486
|
+
* count, stacks toasts at the configured position, and provides success /
|
|
1487
|
+
* error / promise helpers so pages never hand-roll their own queue.
|
|
1488
|
+
*/
|
|
1489
|
+
declare function ToastProvider({ children, maxVisible, position, duration, mode, pauseOnHover }: ToastProviderProps): react_jsx_runtime.JSX.Element;
|
|
1224
1490
|
|
|
1225
1491
|
type ProgressVariant = "default" | "success" | "warning" | "error";
|
|
1226
1492
|
interface ProgressProps {
|
|
@@ -1230,9 +1496,11 @@ interface ProgressProps {
|
|
|
1230
1496
|
size?: "sm" | "md" | "lg";
|
|
1231
1497
|
indeterminate?: boolean;
|
|
1232
1498
|
showLabel?: boolean;
|
|
1499
|
+
/** Accessible name announced with the value, e.g. "Upload progress". Default "Progress". */
|
|
1500
|
+
label?: string;
|
|
1233
1501
|
className?: string;
|
|
1234
1502
|
}
|
|
1235
|
-
declare function Progress({ value, max, variant, size, indeterminate, showLabel, className }: ProgressProps): react_jsx_runtime.JSX.Element;
|
|
1503
|
+
declare function Progress({ value, max, variant, size, indeterminate, showLabel, label, className }: ProgressProps): react_jsx_runtime.JSX.Element;
|
|
1236
1504
|
|
|
1237
1505
|
declare const sizes: {
|
|
1238
1506
|
readonly sm: "h-4 w-4 border-[1.5px]";
|
|
@@ -1264,29 +1532,10 @@ interface ScrollAreaProps {
|
|
|
1264
1532
|
}
|
|
1265
1533
|
declare function ScrollArea({ children, className, orientation, maxHeight, maxWidth, }: ScrollAreaProps): react_jsx_runtime.JSX.Element;
|
|
1266
1534
|
|
|
1267
|
-
type PanelGroupProps = ComponentProps<typeof Group>;
|
|
1268
|
-
type Direction = "horizontal" | "vertical";
|
|
1269
|
-
interface ResizablePanelGroupProps extends Omit<PanelGroupProps, "className" | "orientation"> {
|
|
1270
|
-
direction?: Direction;
|
|
1271
|
-
stackOnMobile?: boolean;
|
|
1272
|
-
className?: string;
|
|
1273
|
-
}
|
|
1274
|
-
declare function ResizablePanelGroup({ className, direction, stackOnMobile, ...props }: ResizablePanelGroupProps): react_jsx_runtime.JSX.Element;
|
|
1275
|
-
type PanelProps = ComponentProps<typeof Panel>;
|
|
1276
|
-
interface ResizablePanelProps extends Omit<PanelProps, "className"> {
|
|
1277
|
-
className?: string;
|
|
1278
|
-
}
|
|
1279
|
-
declare function ResizablePanel({ className, ...props }: ResizablePanelProps): react_jsx_runtime.JSX.Element;
|
|
1280
|
-
type PanelResizeHandleProps = ComponentProps<typeof Separator>;
|
|
1281
|
-
interface ResizableHandleProps extends Omit<PanelResizeHandleProps, "className"> {
|
|
1282
|
-
withHandle?: boolean;
|
|
1283
|
-
className?: string;
|
|
1284
|
-
}
|
|
1285
|
-
declare function ResizableHandle({ withHandle, className, ...props }: ResizableHandleProps): react_jsx_runtime.JSX.Element;
|
|
1286
|
-
|
|
1287
1535
|
interface AppShellContextValue {
|
|
1288
1536
|
hasSidebar: boolean;
|
|
1289
1537
|
hasMobileMenu: boolean;
|
|
1538
|
+
hasMobileNav: boolean;
|
|
1290
1539
|
sidebarOpen: boolean;
|
|
1291
1540
|
setSidebarOpen: (open: boolean) => void;
|
|
1292
1541
|
isMobile: boolean;
|
|
@@ -1316,9 +1565,13 @@ interface AppShellProps {
|
|
|
1316
1565
|
declare const AppShell: react.ForwardRefExoticComponent<AppShellProps & react.RefAttributes<HTMLDivElement>>;
|
|
1317
1566
|
|
|
1318
1567
|
type MaxWidth = "sm" | "md" | "lg" | "xl" | "full";
|
|
1568
|
+
type PageContainerWidth = "constrained" | "full" | "narrow";
|
|
1319
1569
|
type Padding = "none" | "default" | "wide";
|
|
1320
1570
|
type VerticalPadding = "none" | "default" | "spacious";
|
|
1321
1571
|
interface PageContainerProps {
|
|
1572
|
+
/** Semantic width — maps to maxWidth internally. Takes precedence over maxWidth when both are set. */
|
|
1573
|
+
width?: PageContainerWidth;
|
|
1574
|
+
/** Lower-level max-width escape hatch. Use `width` for standard cases. */
|
|
1322
1575
|
maxWidth?: MaxWidth;
|
|
1323
1576
|
padding?: Padding;
|
|
1324
1577
|
verticalPadding?: VerticalPadding;
|
|
@@ -1353,4 +1606,48 @@ interface ActionPanelGroupProps {
|
|
|
1353
1606
|
}
|
|
1354
1607
|
declare const ActionPanelGroup: react.ForwardRefExoticComponent<ActionPanelGroupProps & react.RefAttributes<HTMLDivElement>>;
|
|
1355
1608
|
|
|
1356
|
-
|
|
1609
|
+
interface TextOverflowProps {
|
|
1610
|
+
/** Max visible lines before truncation. 1 = single-line ellipsis, >1 = line-clamp-N. */
|
|
1611
|
+
lines?: number;
|
|
1612
|
+
/** Show tooltip/hovercard when text is truncated. Default: true. */
|
|
1613
|
+
tooltip?: boolean;
|
|
1614
|
+
/** Custom tooltip content. Defaults to the text content of children. */
|
|
1615
|
+
tooltipContent?: ReactNode;
|
|
1616
|
+
/** Use HoverCard instead of Tooltip for long multi-line content. */
|
|
1617
|
+
expandMode?: "tooltip" | "hovercard";
|
|
1618
|
+
/** The HTML element to render. Default: "div". */
|
|
1619
|
+
as?: "span" | "p" | "div";
|
|
1620
|
+
children: ReactNode;
|
|
1621
|
+
className?: string;
|
|
1622
|
+
}
|
|
1623
|
+
declare const TextOverflow: react.ForwardRefExoticComponent<TextOverflowProps & react.RefAttributes<HTMLElement>>;
|
|
1624
|
+
|
|
1625
|
+
interface UseTextOverflowOptions {
|
|
1626
|
+
/** Number of visible lines before truncation. 1 = single-line ellipsis, >1 = line-clamp. */
|
|
1627
|
+
lines?: number;
|
|
1628
|
+
/** Disable overflow detection (e.g. when component is hidden) */
|
|
1629
|
+
disabled?: boolean;
|
|
1630
|
+
/** Content key — triggers re-check when this value changes (use for dynamic text content) */
|
|
1631
|
+
content?: unknown;
|
|
1632
|
+
}
|
|
1633
|
+
interface UseTextOverflowResult {
|
|
1634
|
+
/** Callback ref — attach to the element that has truncation CSS applied */
|
|
1635
|
+
ref: (node: HTMLElement | null) => void;
|
|
1636
|
+
/** True when the element's text is currently overflowing/truncated */
|
|
1637
|
+
isTruncated: boolean;
|
|
1638
|
+
}
|
|
1639
|
+
/**
|
|
1640
|
+
* Detects whether an element's text content is overflowing (truncated).
|
|
1641
|
+
* Uses a single shared ResizeObserver for all instances on the page.
|
|
1642
|
+
*
|
|
1643
|
+
* @example
|
|
1644
|
+
* const { ref, isTruncated } = useTextOverflow({ lines: 1 });
|
|
1645
|
+
* return (
|
|
1646
|
+
* <Tooltip content={fullText} disabled={!isTruncated}>
|
|
1647
|
+
* <span ref={ref} className="truncate">{fullText}</span>
|
|
1648
|
+
* </Tooltip>
|
|
1649
|
+
* );
|
|
1650
|
+
*/
|
|
1651
|
+
declare function useTextOverflow(options?: UseTextOverflowOptions): UseTextOverflowResult;
|
|
1652
|
+
|
|
1653
|
+
export { Accordion, ActionPanel, ActionPanelGroup, Alert, type AlertPlacement, AppShell, type AppShellContextValue, Avatar, AvatarGroup, type AvatarGroupItem, type AvatarGroupProps, type AvatarStatus, Badge, type BadgePaletteColor, type BadgeSize, type BadgeVariant, BottomNav, type BottomNavItem, type BreadcrumbItem$1 as BreadcrumbItem, Breadcrumbs, type BreadcrumbsSeparator, type BreadcrumbsSize, type BreadcrumbsVariant, BreakpointKey, BulkActionBar, Button, ButtonSizeContext, Calendar, Card, CardContent, CardDescription, CardFooter, CardHeader, type CardSelectType, CardTitle, type CardVariant, Carousel, ChatMessageList, Checkbox, CheckboxGroup, CheckboxGroupItem, CodeBlock, Collapsible, ColorPicker, type Column, Combobox, CommandPalette, ContextMenu, DEFAULT_DATE_RANGE_PRESETS, DataList, DatePicker, type DateRange, DateRangePicker, type DateRangePickerProps, type DateRangePreset, type DescriptionItem, DescriptionList, type DescriptionListOrientation, type DescriptionListSize, Dialog, Divider, Dock, Drawer, Dropdown, DropdownMenu, type DropdownMenuDivider, type DropdownMenuEntry, type DropdownMenuItem, EmptyState, Field, type FieldControlProps, type FieldProps, FileUpload, FormWrapper, HoverCard, InlineFieldError, Input, Kbd, Label, Link, type LinkProps, MentionInput, MobileHeaderMenu, type MobileHeaderMenuItemData, type MobileHeaderMenuType, NavItem, type NavItemProps, type NavItemType, NavMenu, type NavMenuItem, Navbar, type NavbarSize, type NavbarType, type NavbarVariant, NotificationCenter, NumberInput, PageContainer, type PageContainerWidth, PageHeader, type PageHeaderBehavior, type PageHeaderIntensity, type PageHeaderProps, type PageHeaderVariant, Pagination, PinInput, Popover, Progress, type PromiseToastMessages, RadioGroup, Rating, ScrollArea, SectionHeading, SegmentedControl, Sheet, Sidebar, type SidebarContextValue, type SidebarItem, SidebarNav, type SidebarNavSize, type SidebarPosition, type SidebarSection, type SidebarType, Skeleton, SliderRange, Spinner, StackedList, StatsCard, StatusDot, type StatusDotVariant, Stepper, type Tab, Table, type TableDensity, type TableProps, Tabs, Tag, TagInput, type TagPaletteColor, type TagVariant, TextOverflow, type TextOverflowProps, Textarea, TimePicker, Timeline, Toast, type ToastAction, type ToastApi, type ToastOptions, type ToastPosition, ToastProvider, type ToastVariant, Toggle, Tooltip, Tour, TransferList, TreeView, type UseTextOverflowOptions, type UseTextOverflowResult, useAppShell, useFormContext, useSidebar, useTextOverflow, useToast };
|