@weichenlin/swell-ui 0.2.0 → 0.4.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/dist/index.d.ts CHANGED
@@ -1,6 +1,68 @@
1
+ import { ChangeEvent, ComponentProps, MouseEvent, MouseEventHandler, ReactElement, ReactNode } from "react";
1
2
  import { ClassValue } from "clsx";
2
3
  import { VariantProps } from "class-variance-authority";
3
- import { ComponentProps, MouseEvent, ReactElement, ReactNode } from "react";
4
+ //#region src/components/accordion/accordion.d.ts
5
+ type AccordionVariant = 'line' | 'outline';
6
+ type Selection$1<T> = {
7
+ value: T;
8
+ defaultValue?: never;
9
+ onValueChange?: (value: T) => void;
10
+ } | {
11
+ value?: undefined;
12
+ defaultValue?: T;
13
+ onValueChange?: (value: T) => void;
14
+ };
15
+ type AccordionProps = Omit<ComponentProps<'div'>, 'defaultValue' | 'onChange'> & ((Selection$1<string | null> & {
16
+ type?: 'single';
17
+ collapsible?: boolean;
18
+ }) | (Selection$1<readonly string[]> & {
19
+ type: 'multiple';
20
+ collapsible?: never;
21
+ })) & {
22
+ variant?: AccordionVariant;
23
+ /** Native heading level around each trigger. */
24
+ headingLevel?: 2 | 3 | 4 | 5 | 6;
25
+ /** Disables triggers, without changing values or disabling content fields. */
26
+ disabled?: boolean;
27
+ };
28
+ /** Vertical disclosure group. Changing type requires a new React key. */
29
+ export declare function Accordion({ type, value, defaultValue, onValueChange, collapsible, variant, headingLevel, disabled, className, children, ref, onKeyDown, ...props }: AccordionProps): import("react").JSX.Element;
30
+ type AccordionItemProps = ComponentProps<'div'> & {
31
+ /** Unique, non-empty value in this group. */
32
+ value: string;
33
+ disabled?: boolean;
34
+ };
35
+ export declare function AccordionItem({ value, disabled, className, children, ref, ...props }: AccordionItemProps): import("react").JSX.Element;
36
+ type AccordionTriggerProps = Omit<ComponentProps<'button'>, 'id' | 'type' | 'disabled' | 'aria-expanded' | 'aria-controls' | 'aria-disabled' | 'aria-labelledby'> & {
37
+ /** Supplementary text, announced as the description rather than the title. */
38
+ description?: ReactNode;
39
+ };
40
+ export declare function AccordionTrigger({ children, description, className, onClick, 'aria-describedby': describedBy, ...props }: AccordionTriggerProps): import("react").JSX.Element;
41
+ type AccordionContentProps = Omit<ComponentProps<'div'>, 'id' | 'hidden' | 'inert' | 'role' | 'aria-hidden' | 'aria-labelledby'> & {
42
+ /** Defaults to true. false unmounts children after closing, but keeps the ARIA target. */
43
+ keepMounted?: boolean;
44
+ /** Opt in to a named landmark for complex content; avoid excessive regions. */
45
+ region?: boolean;
46
+ /** Outer height wrapper classes. className styles the inner padded content. */
47
+ contentClassName?: string;
48
+ };
49
+ export declare function AccordionContent({ keepMounted, region, className, contentClassName, children, ref, ...props }: AccordionContentProps): import("react").JSX.Element;
50
+ //#endregion
51
+ //#region src/components/alert/alert.d.ts
52
+ type AlertTone = 'neutral' | 'info' | 'success' | 'warning' | 'danger';
53
+ type AlertProps = Omit<ComponentProps<'div'>, 'title'> & {
54
+ tone?: AlertTone;
55
+ title?: ReactNode;
56
+ /** An action such as a retry button or a link to settings. */
57
+ action?: ReactNode;
58
+ /** Shows the dismiss button. The caller controls whether the Alert stays mounted. */
59
+ onDismiss?: MouseEventHandler<HTMLButtonElement>;
60
+ /** Accessible name of the dismiss button. */
61
+ dismissLabel?: string;
62
+ };
63
+ /** A persistent message shown next to the content it describes. Use a live region for updates that need announcing. */
64
+ export declare function Alert({ tone, title, action, onDismiss, dismissLabel, className, children, ...props }: AlertProps): import("react").JSX.Element;
65
+ //#endregion
4
66
  //#region src/components/badge/badge.d.ts
5
67
  type BadgeTone = 'neutral' | 'info' | 'success' | 'warning' | 'danger';
6
68
  type BadgeVariant = 'subtle' | 'outline' | 'solid';
@@ -19,7 +81,7 @@ type BadgeProps = Omit<ComponentProps<'span'>, 'onClick'> & {
19
81
  export declare function Badge({ tone, variant, size, icon, busy, context, className, children, ...props }: BadgeProps): import("react").JSX.Element;
20
82
  //#endregion
21
83
  //#region src/components/tooltip.d.ts
22
- type Side = 'top' | 'bottom' | 'left' | 'right';
84
+ type Side$1 = 'top' | 'bottom' | 'left' | 'right';
23
85
  type TriggerProps = {
24
86
  'aria-describedby'?: string;
25
87
  };
@@ -27,7 +89,7 @@ type TooltipProps = {
27
89
  /** Nothing renders (and no aria-describedby is added) when empty. */
28
90
  content?: ReactNode;
29
91
  /** Preferred side; flips to the opposite one when it doesn't fit the viewport. */
30
- side?: Side;
92
+ side?: Side$1;
31
93
  /**
32
94
  * Link the tooltip to the trigger via aria-describedby. Turn off when the
33
95
  * tooltip only repeats the trigger's accessible name (e.g. icon button labels).
@@ -63,14 +125,28 @@ type BaseProps = Omit<ComponentProps<'button'>, 'children'> & Omit<VariantProps<
63
125
  /** Material-style press ripple; on by default. */
64
126
  ripple?: boolean;
65
127
  };
128
+ /** With `asChild` the host is your element (a router Link): loading and `type` are button-only. */
129
+ type AsChildProps = {
130
+ /**
131
+ * Render the only child (e.g. a router Link) instead of a `<button>`, with the button's props,
132
+ * classes, ref and content merged into it.
133
+ */
134
+ asChild: true;
135
+ children: ReactElement;
136
+ loading?: never;
137
+ loadingText?: never;
138
+ type?: never;
139
+ };
66
140
  type TextButtonProps = BaseProps & {
67
141
  icon?: never;
68
142
  iconLeft?: ReactNode;
69
143
  iconRight?: ReactNode;
70
- children?: ReactNode;
71
144
  tooltip?: never;
72
145
  tooltipSide?: never;
73
- };
146
+ } & ({
147
+ asChild?: false;
148
+ children?: ReactNode;
149
+ } | AsChildProps);
74
150
  type IconOnlyButtonProps = Omit<BaseProps, 'aria-label' | 'fullWidth'> & {
75
151
  /** Renders a square icon-only button. */
76
152
  icon: NonNullable<ReactNode>;
@@ -80,10 +156,12 @@ type IconOnlyButtonProps = Omit<BaseProps, 'aria-label' | 'fullWidth'> & {
80
156
  tooltip?: boolean;
81
157
  tooltipSide?: TooltipProps['side'];
82
158
  fullWidth?: never;
83
- children?: never;
84
159
  iconLeft?: never;
85
160
  iconRight?: never;
86
- };
161
+ } & ({
162
+ asChild?: false;
163
+ children?: never;
164
+ } | AsChildProps);
87
165
  type ButtonProps = TextButtonProps | IconOnlyButtonProps;
88
166
  export declare function Button(props: ButtonProps): import("react").JSX.Element;
89
167
  //#endregion
@@ -158,6 +236,123 @@ type CheckboxGroupProps = Omit<ComponentProps<'fieldset'>, 'children'> & {
158
236
  /** A `<fieldset>` + `<legend>` around related checkboxes; holds no value of its own. */
159
237
  export declare function CheckboxGroup({ legend, description, error, orientation, className, 'aria-describedby': describedByProp, children, ...props }: CheckboxGroupProps): import("react").JSX.Element;
160
238
  //#endregion
239
+ //#region src/components/input/field.d.ts
240
+ type FieldSize = 'sm' | 'md' | 'lg';
241
+ type NativeInputProps = Omit<ComponentProps<'input'>, 'size' | 'children'>;
242
+ /** Props every input in the family shares. */
243
+ type FieldProps = NativeInputProps & {
244
+ /** Visible label, rendered as a real `<label>` above the field. */
245
+ label: string;
246
+ /** Outlined floating label: rests inside the field and moves onto the top border. */
247
+ floating?: boolean;
248
+ helperText?: ReactNode;
249
+ /** Truthy puts the field in the error state; the text replaces helperText. */
250
+ error?: ReactNode;
251
+ size?: FieldSize;
252
+ /** Decorative leading icon (aria-hidden) or plain text prefix such as `https://`. */
253
+ start?: ReactNode;
254
+ /** Decorative trailing icon (aria-hidden) or plain text suffix. */
255
+ end?: ReactNode;
256
+ /** Monospace with spellcheck/autocorrect off, for tags, SHAs and hostnames. */
257
+ mono?: boolean;
258
+ /** Shows a spinner and announces validatingText; the field stays editable. */
259
+ validating?: boolean;
260
+ validatingText?: string;
261
+ /** Classes for the `<input>`; `className` goes to the outer wrapper. */
262
+ inputClassName?: string;
263
+ };
264
+ /**
265
+ * Either a visible label, or only an aria-label when the context already names the field
266
+ * (a table cell, a toolbar filter). Floating needs a visible label.
267
+ */
268
+ type FieldLabelProps = {
269
+ label: string;
270
+ floating?: boolean;
271
+ } | {
272
+ label?: never;
273
+ floating?: never;
274
+ 'aria-label': string;
275
+ };
276
+ //#endregion
277
+ //#region src/components/combobox/types.d.ts
278
+ type ComboboxOption = {
279
+ /** Stable, unique, non-empty submitted ID. Labels need not be unique. */
280
+ value: string;
281
+ label: string;
282
+ description?: ReactNode;
283
+ /** Decorative; hidden from assistive technology. */
284
+ icon?: ReactNode;
285
+ keywords?: readonly string[];
286
+ disabled?: boolean;
287
+ };
288
+ type ComboboxGroup = {
289
+ label: string;
290
+ options: readonly ComboboxOption[];
291
+ };
292
+ type ComboboxValueChangeDetails = {
293
+ reason: 'select' | 'clear';
294
+ option: ComboboxOption | null;
295
+ };
296
+ type ComboboxInputChangeDetails = {
297
+ reason: 'input' | 'selection' | 'clear' | 'revert' | 'reset';
298
+ };
299
+ type ComboboxOpenChangeDetails = {
300
+ reason: 'input' | 'trigger' | 'keyboard' | 'select' | 'escape' | 'blur' | 'outside' | 'clear';
301
+ };
302
+ type NativeProps = Omit<ComponentProps<'input'>, 'size' | 'type' | 'children' | 'value' | 'defaultValue' | 'onChange' | 'list' | 'role' | 'aria-autocomplete' | 'aria-controls' | 'aria-expanded' | 'aria-activedescendant'>;
303
+ type Selection = {
304
+ value: string | null;
305
+ defaultValue?: never;
306
+ } | {
307
+ value?: undefined;
308
+ defaultValue?: string | null;
309
+ };
310
+ type Disclosure = {
311
+ open: boolean;
312
+ defaultOpen?: never;
313
+ } | {
314
+ open?: undefined;
315
+ defaultOpen?: boolean;
316
+ };
317
+ type ComboboxProps = NativeProps & FieldLabelProps & Selection & Disclosure & {
318
+ options: readonly (ComboboxOption | ComboboxGroup)[];
319
+ onValueChange?: (value: string | null, details: ComboboxValueChangeDetails) => void;
320
+ inputValue?: string;
321
+ /** Only reason="input" should issue a search request. */
322
+ onInputValueChange?: (text: string, details: ComboboxInputChangeDetails) => void;
323
+ onOpenChange?: (open: boolean, details: ComboboxOpenChangeDetails) => void;
324
+ /** false for externally filtered results. Default: label + keywords, case/accent insensitive. */
325
+ filter?: false | ((option: ComboboxOption, query: string) => boolean);
326
+ /** Supplies a label when the selected ID is not in the current search results. */
327
+ selectedOption?: ComboboxOption | null;
328
+ loading?: boolean;
329
+ loadingText?: string;
330
+ searchError?: ReactNode;
331
+ onRetry?: () => void;
332
+ retryText?: string;
333
+ emptyText?: ReactNode;
334
+ clearable?: boolean;
335
+ openOnFocus?: boolean;
336
+ clearLabel?: string;
337
+ openLabel?: string;
338
+ closeLabel?: string;
339
+ /** Native constraint-validation message: selection is required, not just typed text. */
340
+ requiredText?: string;
341
+ unresolvedText?: string;
342
+ /** Localize the polite result-count announcement. */
343
+ getResultsText?: (count: number) => string;
344
+ helperText?: ReactNode;
345
+ error?: ReactNode;
346
+ size?: FieldSize;
347
+ start?: ReactNode;
348
+ mono?: boolean;
349
+ inputClassName?: string;
350
+ contentClassName?: string;
351
+ };
352
+ //#endregion
353
+ //#region src/components/combobox/combobox.d.ts
354
+ export declare function Combobox({ options, value, defaultValue, onValueChange, inputValue, onInputValueChange, open: openProp, defaultOpen, onOpenChange, filter, selectedOption, loading, loadingText, searchError, onRetry, retryText, emptyText, clearable, openOnFocus, clearLabel, openLabel, closeLabel, requiredText, unresolvedText, getResultsText, label, floating, helperText, error, size, start, mono, inputClassName, contentClassName, className, name, form, disabled, readOnly, required, ref, id: idProp, onClick, onFocus, onBlur, onKeyDown, onCompositionStart, onCompositionEnd, onInvalid, ...props }: ComboboxProps): import("react").JSX.Element;
355
+ //#endregion
161
356
  //#region src/components/modal/modal-shell.d.ts
162
357
  /**
163
358
  * Why the modal asks to close. `programmatic` is never sent by the modal itself; it is there for
@@ -243,43 +438,38 @@ type DrawerCloseProps = Omit<ComponentProps<'button'>, 'children' | 'type' | 'ar
243
438
  /** A ghost icon button that closes the drawer, for custom headers. */
244
439
  export declare function DrawerClose({ size, icon, ...props }: DrawerCloseProps): import("react").JSX.Element;
245
440
  //#endregion
246
- //#region src/components/input/field.d.ts
247
- type FieldSize = 'sm' | 'md' | 'lg';
248
- type NativeInputProps = Omit<ComponentProps<'input'>, 'size' | 'children'>;
249
- /** Props every input in the family shares. */
250
- type FieldProps = NativeInputProps & {
251
- /** Visible label, rendered as a real `<label>` above the field. */
252
- label: string;
253
- /** Outlined floating label: rests inside the field and moves onto the top border. */
254
- floating?: boolean;
255
- helperText?: ReactNode;
256
- /** Truthy puts the field in the error state; the text replaces helperText. */
257
- error?: ReactNode;
258
- size?: FieldSize;
259
- /** Decorative leading icon (aria-hidden) or plain text prefix such as `https://`. */
260
- start?: ReactNode;
261
- /** Decorative trailing icon (aria-hidden) or plain text suffix. */
262
- end?: ReactNode;
263
- /** Monospace with spellcheck/autocorrect off, for tags, SHAs and hostnames. */
264
- mono?: boolean;
265
- /** Shows a spinner and announces validatingText; the field stays editable. */
266
- validating?: boolean;
267
- validatingText?: string;
268
- /** Classes for the `<input>`; `className` goes to the outer wrapper. */
269
- inputClassName?: string;
441
+ //#region src/components/dropdown-menu/dropdown-menu.d.ts
442
+ type DropdownMenuChangeReason = 'trigger' | 'item-select' | 'escape' | 'outside' | 'tab';
443
+ type DropdownMenuProps = {
444
+ children: ReactNode;
445
+ open?: boolean;
446
+ defaultOpen?: boolean;
447
+ onOpenChange?: (open: boolean, reason: DropdownMenuChangeReason) => void;
270
448
  };
271
- /**
272
- * Either a visible label, or only an aria-label when the context already names the field
273
- * (a table cell, a toolbar filter). Floating needs a visible label.
274
- */
275
- type FieldLabelProps = {
276
- label: string;
277
- floating?: boolean;
278
- } | {
279
- label?: never;
280
- floating?: never;
281
- 'aria-label': string;
449
+ export declare function DropdownMenu({ children, open: controlled, defaultOpen, onOpenChange }: DropdownMenuProps): import("react").JSX.Element;
450
+ type DropdownMenuTriggerProps = ComponentProps<'button'> & {
451
+ asChild?: boolean;
282
452
  };
453
+ export declare function DropdownMenuTrigger({ asChild, ref, onClick, onClickCapture, onKeyDown, disabled, ...props }: DropdownMenuTriggerProps): import("react").JSX.Element;
454
+ type Side = 'top' | 'bottom' | 'left' | 'right';
455
+ type DropdownMenuContentProps = ComponentProps<'div'> & {
456
+ side?: Side;
457
+ align?: 'start' | 'center' | 'end';
458
+ sideOffset?: number;
459
+ };
460
+ export declare function DropdownMenuContent(props: DropdownMenuContentProps): import("react").JSX.Element | null;
461
+ type DropdownMenuItemProps = Omit<ComponentProps<'button'>, 'onSelect'> & {
462
+ asChild?: boolean;
463
+ iconLeft?: ReactNode;
464
+ tone?: 'default' | 'danger';
465
+ textValue?: string;
466
+ /** Runs for pointer and keyboard activation. Call preventDefault() to keep the menu open. */
467
+ onSelect?: (event: Event) => void;
468
+ };
469
+ export declare function DropdownMenuItem({ asChild, iconLeft, tone, textValue, disabled, onSelect, onClick, onClickCapture, onAuxClickCapture, onKeyDown, onPointerMove, children, className, ...props }: DropdownMenuItemProps): import("react").JSX.Element;
470
+ export declare function DropdownMenuGroup({ className, ...props }: ComponentProps<'div'>): import("react").JSX.Element;
471
+ export declare function DropdownMenuLabel({ className, ...props }: ComponentProps<'div'>): import("react").JSX.Element;
472
+ export declare function DropdownMenuSeparator({ className, ...props }: ComponentProps<'hr'>): import("react").JSX.Element;
283
473
  //#endregion
284
474
  //#region src/components/input/copy-input.d.ts
285
475
  type CopyInputProps = Omit<FieldProps, 'type' | 'value' | 'defaultValue' | 'readOnly' | 'onChange'> & {
@@ -337,6 +527,39 @@ type MeterProps = Omit<ComponentProps<'div'>, 'children'> & {
337
527
  */
338
528
  export declare function Meter({ label, summary, segments, className, ...props }: MeterProps): import("react").JSX.Element;
339
529
  //#endregion
530
+ //#region src/components/radio-group/radio-group.d.ts
531
+ type SelectionProps = {
532
+ value: string | null;
533
+ defaultValue?: never;
534
+ } | {
535
+ value?: undefined;
536
+ defaultValue?: string;
537
+ };
538
+ type RadioGroupProps = Omit<ComponentProps<'fieldset'>, 'name' | 'onChange' | 'defaultValue' | 'children'> & SelectionProps & {
539
+ /** Native group and submitted field name. Independent groups need different names. */
540
+ name: string;
541
+ legend: ReactNode;
542
+ description?: ReactNode;
543
+ /** Shows one group message; marks the group invalid. `true` omits the message. */
544
+ error?: ReactNode;
545
+ required?: boolean;
546
+ onValueChange?: (value: string, event: ChangeEvent<HTMLInputElement>) => void;
547
+ variant?: 'default' | 'card';
548
+ /** Layout only; both orientations keep native radio keyboard behavior. */
549
+ orientation?: 'vertical' | 'horizontal';
550
+ itemsClassName?: string;
551
+ children: ReactNode;
552
+ };
553
+ export declare function RadioGroup({ name, legend, description, error, value, defaultValue, onValueChange, variant, orientation, itemsClassName, children, className, disabled, required, form, ref, 'aria-invalid': ariaInvalid, 'aria-describedby': describedByProp, ...props }: RadioGroupProps): import("react").JSX.Element;
554
+ type RadioProps = Omit<ComponentProps<'input'>, 'type' | 'size' | 'children' | 'value' | 'readOnly' | 'name' | 'checked' | 'defaultChecked' | 'required' | 'form' | 'aria-label' | 'aria-invalid'> & ChoiceLabelProps & {
555
+ /** A unique, non-empty value within the parent RadioGroup. */
556
+ value: string;
557
+ description?: ReactNode;
558
+ /** Classes for the native input; className belongs to the row or card. */
559
+ inputClassName?: string;
560
+ };
561
+ export declare function Radio({ value, label, description, disabled, className, inputClassName, ref, onChange, 'aria-describedby': describedBy, ...props }: RadioProps): import("react").JSX.Element;
562
+ //#endregion
340
563
  //#region src/components/select/select.d.ts
341
564
  /** `value` must be non-empty: `''` is reserved for "nothing chosen". */
342
565
  type SelectOption = {
@@ -438,6 +661,66 @@ export declare function SidebarIcon({ className, ...props }: ComponentProps<'spa
438
661
  /** Count at the end of a SidebarItem, as a small neutral Badge; part of the name ("Projects 8"). */
439
662
  export declare function SidebarBadge({ className, ...props }: BadgeProps): import("react").JSX.Element;
440
663
  //#endregion
664
+ //#region src/components/slider/types.d.ts
665
+ type RangeSliderValue = readonly [number, number];
666
+ type SliderChangeDetails = {
667
+ thumbIndex: 0 | 1;
668
+ reason: 'pointer' | 'keyboard' | 'input' | 'cancel';
669
+ };
670
+ type SliderCommitDetails = Omit<SliderChangeDetails, 'reason'> & {
671
+ reason: 'pointer' | 'keyboard' | 'input';
672
+ };
673
+ type SliderMark = {
674
+ value: number;
675
+ label?: ReactNode;
676
+ };
677
+ type ValueProps<T> = ({
678
+ value: T;
679
+ defaultValue?: never;
680
+ } | {
681
+ value?: undefined;
682
+ defaultValue?: T;
683
+ }) & {
684
+ onValueChange?: (value: T, details: SliderChangeDetails) => void;
685
+ onValueCommit?: (value: T, details: SliderCommitDetails) => void;
686
+ };
687
+ type LabelProps = {
688
+ label: ReactNode;
689
+ 'aria-label'?: string;
690
+ } | {
691
+ label?: never;
692
+ 'aria-label': string;
693
+ };
694
+ type SliderCommonProps = Omit<ComponentProps<'div'>, 'defaultValue' | 'onChange' | 'children' | 'aria-label' | 'role'> & LabelProps & {
695
+ min?: number;
696
+ max?: number;
697
+ /** Positive step; (max - min) must be a whole number of steps. */
698
+ step?: number;
699
+ disabled?: boolean;
700
+ helperText?: ReactNode;
701
+ error?: ReactNode;
702
+ showValue?: boolean;
703
+ /** Formats both visible output and spoken value by default. */
704
+ formatValue?: (value: number) => string;
705
+ getValueText?: (value: number, thumbIndex: 0 | 1) => string;
706
+ /** Visual markers only; all step-aligned values remain selectable. */
707
+ marks?: readonly SliderMark[];
708
+ form?: string;
709
+ };
710
+ type SliderProps = SliderCommonProps & ValueProps<number> & {
711
+ name?: string;
712
+ };
713
+ type RangeSliderProps = SliderCommonProps & ValueProps<RangeSliderValue> & {
714
+ thumbLabels: readonly [string, string];
715
+ name?: readonly [string, string];
716
+ /** Thumbs stop at this distance; they never swap or push each other. */
717
+ minStepsBetweenThumbs?: number;
718
+ };
719
+ //#endregion
720
+ //#region src/components/slider/slider.d.ts
721
+ export declare function Slider({ value, defaultValue, name, onValueChange, onValueCommit, ...props }: SliderProps): import("react").JSX.Element;
722
+ export declare function RangeSlider({ value, defaultValue, name, onValueChange, onValueCommit, ...props }: RangeSliderProps): import("react").JSX.Element;
723
+ //#endregion
441
724
  //#region src/components/switch/switch.d.ts
442
725
  type SwitchSize = 'sm' | 'md';
443
726
  type NativeSwitchProps = Omit<ComponentProps<'input'>, 'type' | 'size' | 'children' | 'role' | 'aria-checked' | 'aria-label'>;
@@ -460,6 +743,75 @@ type SwitchProps = NativeSwitchProps & ChoiceLabelProps & {
460
743
  };
461
744
  export declare function Switch({ label, description, error, size, loading, labelPosition, className, inputClassName, disabled, onChange, 'aria-describedby': describedBy, 'aria-invalid': ariaInvalid, ...props }: SwitchProps): import("react").JSX.Element;
462
745
  //#endregion
746
+ //#region src/components/table/table.d.ts
747
+ type TableColumn<T> = {
748
+ id: string;
749
+ header: ReactNode;
750
+ cell: (row: T) => ReactNode;
751
+ sortable?: boolean;
752
+ align?: 'start' | 'center' | 'end';
753
+ numeric?: boolean;
754
+ rowHeader?: boolean;
755
+ className?: string;
756
+ headerClassName?: string;
757
+ };
758
+ type TableSort = {
759
+ id: string;
760
+ direction: 'asc' | 'desc';
761
+ };
762
+ declare const labels: {
763
+ search: string;
764
+ clearSelection: string;
765
+ selectPage: string;
766
+ selectRow: (id: string) => string;
767
+ selectionCount: (count: number) => string;
768
+ scrollRegion: string;
769
+ pagination: string;
770
+ previousPage: string;
771
+ nextPage: string;
772
+ page: (page: number, count: number) => string;
773
+ range: (first: number, last: number, total: number) => string;
774
+ emptyState: string;
775
+ noResults: string;
776
+ };
777
+ type TableProps<T> = Omit<ComponentProps<'table'>, 'title' | 'children' | 'className'> & {
778
+ /** Rows to render on the current page, in display order. */
779
+ data: readonly T[];
780
+ columns: readonly TableColumn<T>[];
781
+ getRowId: (row: T) => string;
782
+ title?: ReactNode;
783
+ emptyState?: ReactNode;
784
+ noResults?: ReactNode;
785
+ /** Indicates filtering when the caller applies filters outside the search field. */
786
+ filtered?: boolean;
787
+ /** Controlled UI. The caller supplies the resulting data. */
788
+ search?: {
789
+ value: string;
790
+ onChange: (value: string) => void;
791
+ };
792
+ sorting?: {
793
+ value: TableSort | null;
794
+ onChange: (value: TableSort | null) => void;
795
+ };
796
+ pagination?: {
797
+ /** Zero-based page index. */
798
+ pageIndex: number;
799
+ pageSize: number;
800
+ rowCount: number;
801
+ onPageChange: (pageIndex: number) => void;
802
+ };
803
+ selection?: {
804
+ ids: ReadonlySet<string>;
805
+ onChange: (ids: Set<string>) => void;
806
+ canSelectRow?: (row: T) => boolean;
807
+ };
808
+ /** Root element classes. Use `tableClassName` for column layout or minimum width. */
809
+ className?: string;
810
+ tableClassName?: string;
811
+ labels?: Partial<typeof labels>;
812
+ };
813
+ export declare function Table<T>({ data, columns, getRowId, title, emptyState, noResults, filtered, search, sorting, pagination, selection, className, tableClassName, labels: labelOverrides, ...props }: TableProps<T>): import("react").JSX.Element;
814
+ //#endregion
463
815
  //#region src/components/tabs/shared.d.ts
464
816
  type TabsVariant = 'line' | 'segmented';
465
817
  type TabsSize = 'sm' | 'md';
@@ -549,6 +901,33 @@ type TabPanelProps = Omit<ComponentProps<'div'>, 'role' | 'hidden'> & {
549
901
  };
550
902
  export declare function TabPanel({ value, keepMounted, className, ...props }: TabPanelProps): import("react").JSX.Element | null;
551
903
  //#endregion
904
+ //#region src/components/textarea/textarea.d.ts
905
+ type HeightProps = {
906
+ autoResize?: false;
907
+ rows?: number;
908
+ resize?: 'vertical' | 'none';
909
+ minRows?: never;
910
+ maxRows?: never;
911
+ } | {
912
+ autoResize: true;
913
+ minRows?: number;
914
+ maxRows?: number;
915
+ rows?: never;
916
+ resize?: never;
917
+ };
918
+ type TextareaProps = Omit<ComponentProps<'textarea'>, 'children' | 'rows'> & FieldLabelProps & HeightProps & {
919
+ helperText?: ReactNode;
920
+ /** Replaces helperText and marks the field invalid. `true` shows only the error outline. */
921
+ error?: ReactNode;
922
+ size?: FieldSize;
923
+ /** UTF-16 length, matching native maxLength. Never truncates controlled values. */
924
+ showCount?: boolean;
925
+ mono?: boolean;
926
+ /** Classes for the textarea; className belongs to the outer field. */
927
+ textareaClassName?: string;
928
+ };
929
+ export declare function Textarea({ label, floating, helperText, error, size, autoResize, rows, minRows, maxRows, resize, showCount, mono, className, textareaClassName, ref, id, required, disabled, readOnly, placeholder, value, defaultValue, maxLength, onChange, 'aria-describedby': describedBy, 'aria-invalid': ariaInvalid, ...props }: TextareaProps): import("react").JSX.Element;
930
+ //#endregion
552
931
  //#region src/components/theme-switcher/use-theme.d.ts
553
932
  type Theme = 'system' | 'light' | 'dark';
554
933
  type UseThemeOptions = {
@@ -656,4 +1035,4 @@ export declare function Toaster(props: ToasterProps): import("react").ReactPorta
656
1035
  //#region src/lib/cn.d.ts
657
1036
  export declare function cn(...inputs: ClassValue[]): string;
658
1037
  //#endregion
659
- export type { BadgeProps, BadgeTone, ButtonProps, CardHeaderProps, CardProps, CheckboxGroupProps, CheckboxProps, CopyInputProps, DialogCloseReason, DialogHeaderProps, DialogProps, DialogSize, DrawerCloseProps, DrawerCloseReason, DrawerHeaderProps, DrawerProps, DrawerSide, DrawerSize, InputProps, MeterProps, MeterSegment, MeterTone, PasswordInputProps, SearchInputProps, SelectGroup, SelectOption, SelectProps, SidebarGroupProps, SidebarItemProps, SidebarProps, SidebarTriggerProps, SwitchProps, SwitchSize, TabListProps, TabNavLinkProps, TabNavProps, TabPanelProps, TabProps, TabsActivationMode, TabsProps, TabsSize, TabsVariant, Theme, ThemeSwitcherProps, ToastActionButton, ToastOptions, ToastPatch, ToastPosition, ToastPromiseOptions, ToastType, ToasterProps, TooltipProps, UseThemeOptions };
1038
+ export type { AccordionContentProps, AccordionItemProps, AccordionProps, AccordionTriggerProps, AccordionVariant, AlertProps, AlertTone, BadgeProps, BadgeTone, ButtonProps, CardHeaderProps, CardProps, CheckboxGroupProps, CheckboxProps, ComboboxGroup, ComboboxInputChangeDetails, ComboboxOpenChangeDetails, ComboboxOption, ComboboxProps, ComboboxValueChangeDetails, CopyInputProps, DialogCloseReason, DialogHeaderProps, DialogProps, DialogSize, DrawerCloseProps, DrawerCloseReason, DrawerHeaderProps, DrawerProps, DrawerSide, DrawerSize, DropdownMenuChangeReason, DropdownMenuContentProps, DropdownMenuItemProps, DropdownMenuProps, DropdownMenuTriggerProps, InputProps, MeterProps, MeterSegment, MeterTone, PasswordInputProps, RadioGroupProps, RadioProps, RangeSliderProps, RangeSliderValue, SearchInputProps, SelectGroup, SelectOption, SelectProps, SidebarGroupProps, SidebarItemProps, SidebarProps, SidebarTriggerProps, SliderChangeDetails, SliderCommitDetails, SliderCommonProps, SliderMark, SliderProps, SwitchProps, SwitchSize, TabListProps, TabNavLinkProps, TabNavProps, TabPanelProps, TabProps, TableColumn, TableProps, TableSort, TabsActivationMode, TabsProps, TabsSize, TabsVariant, TextareaProps, Theme, ThemeSwitcherProps, ToastActionButton, ToastOptions, ToastPatch, ToastPosition, ToastPromiseOptions, ToastType, ToasterProps, TooltipProps, UseThemeOptions };