@owodesign/owoui 0.1.7-beta2 → 0.1.8
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 +29 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +330 -36
- package/dist/index.min.js +2523 -857
- package/dist/storybook/catalog.js +63 -7
- package/dist/storybook/catalog.json +63 -7
- package/dist/storybook/index.css +1 -1
- package/dist/storybook/index.min.js +7823 -4579
- package/dist/storybook-static/assets/index-C4vMyVN0.css +1 -0
- package/dist/storybook-static/assets/index-CBlwgC7b.js +178 -0
- package/dist/storybook-static/index.html +2 -2
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/dist/storybook-static/assets/index-BqGLqINX.css +0 -1
- package/dist/storybook-static/assets/index-DIFPlPRj.js +0 -178
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { HTMLAttributes, ReactNode, ButtonHTMLAttributes, AnchorHTMLAttributes, ReactElement, ElementType, InputHTMLAttributes, TextareaHTMLAttributes } from 'react';
|
|
2
|
+
import { HTMLAttributes, ReactNode, ButtonHTMLAttributes, AnchorHTMLAttributes, ReactElement, ElementType, InputHTMLAttributes, RefObject, TextareaHTMLAttributes } from 'react';
|
|
3
3
|
|
|
4
4
|
type AvatarSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
5
5
|
type AvatarTone = 'neutral' | 'subtle';
|
|
@@ -45,6 +45,26 @@ type ButtonProps = ButtonElementProps | LinkElementProps;
|
|
|
45
45
|
declare function buttonClassName({ className, }: Pick<ButtonProps, 'variant' | 'size' | 'loading' | 'className'>): string;
|
|
46
46
|
declare function Button(props: ButtonProps): react_jsx_runtime.JSX.Element;
|
|
47
47
|
|
|
48
|
+
type CheckboxSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
49
|
+
interface CheckboxProps {
|
|
50
|
+
checked?: boolean;
|
|
51
|
+
defaultChecked?: boolean;
|
|
52
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
53
|
+
indeterminate?: boolean;
|
|
54
|
+
disabled?: boolean;
|
|
55
|
+
required?: boolean;
|
|
56
|
+
invalid?: boolean;
|
|
57
|
+
name?: string;
|
|
58
|
+
value?: string;
|
|
59
|
+
id?: string;
|
|
60
|
+
size?: CheckboxSize;
|
|
61
|
+
className?: string;
|
|
62
|
+
ariaLabel?: string;
|
|
63
|
+
children?: ReactNode;
|
|
64
|
+
'aria-describedby'?: string;
|
|
65
|
+
}
|
|
66
|
+
declare function Checkbox({ checked: checkedProp, defaultChecked, onCheckedChange, indeterminate, disabled, required, invalid, name, value, id, size, className, ariaLabel, children, 'aria-describedby': ariaDescribedBy, }: CheckboxProps): react_jsx_runtime.JSX.Element;
|
|
67
|
+
|
|
48
68
|
type CollapsiblePart = 'trigger' | 'content' | 'triggerInner' | 'triggerIcon' | 'triggerLabel' | 'triggerIndicator' | 'contentInner';
|
|
49
69
|
interface CollapsibleRootProps extends HTMLAttributes<HTMLDivElement> {
|
|
50
70
|
children: ReactNode;
|
|
@@ -195,15 +215,32 @@ interface DrawerProps extends HTMLAttributes<HTMLElement> {
|
|
|
195
215
|
}
|
|
196
216
|
declare function Drawer({ as: Component, open, children, side, position, showBackdrop, onClose, closeLabel, backdropClassName, className, classNames, ...props }: DrawerProps): react_jsx_runtime.JSX.Element;
|
|
197
217
|
|
|
198
|
-
type FieldPart = 'label' | 'help';
|
|
218
|
+
type FieldPart = 'label' | 'description' | 'error' | 'help' | 'required';
|
|
199
219
|
interface FieldProps extends HTMLAttributes<HTMLDivElement> {
|
|
200
220
|
label: ReactNode;
|
|
221
|
+
description?: ReactNode;
|
|
222
|
+
error?: ReactNode;
|
|
201
223
|
help?: ReactNode;
|
|
224
|
+
required?: boolean;
|
|
225
|
+
disabled?: boolean;
|
|
226
|
+
invalid?: boolean;
|
|
202
227
|
htmlFor?: string;
|
|
203
228
|
children: ReactNode;
|
|
204
229
|
classNames?: Partial<Record<FieldPart, string>>;
|
|
205
230
|
}
|
|
206
|
-
declare function Field({ label, help, htmlFor, children, className, classNames, ...props }: FieldProps): react_jsx_runtime.JSX.Element;
|
|
231
|
+
declare function Field({ label, description, error, help, required, disabled, invalid, htmlFor, children, className, classNames, ...props }: FieldProps): react_jsx_runtime.JSX.Element;
|
|
232
|
+
|
|
233
|
+
interface FieldContextValue {
|
|
234
|
+
/** Auto-generated control ID for htmlFor / id association. */
|
|
235
|
+
controlId: string;
|
|
236
|
+
/** Label element ID for controls that need aria-labelledby instead of htmlFor. */
|
|
237
|
+
labelId: string;
|
|
238
|
+
/** Space-separated IDs for aria-describedby (description + error slots). */
|
|
239
|
+
describedBy: string | undefined;
|
|
240
|
+
disabled: boolean;
|
|
241
|
+
invalid: boolean;
|
|
242
|
+
required: boolean;
|
|
243
|
+
}
|
|
207
244
|
|
|
208
245
|
type IconButtonVariant = 'ghost' | 'subtle';
|
|
209
246
|
type IconButtonSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
@@ -227,16 +264,45 @@ type InputBaseProps = {
|
|
|
227
264
|
className?: string;
|
|
228
265
|
tone?: 'default' | 'warning';
|
|
229
266
|
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
267
|
+
invalid?: boolean;
|
|
230
268
|
};
|
|
231
|
-
type
|
|
232
|
-
|
|
269
|
+
type InputProps = InputBaseProps & Omit<InputHTMLAttributes<HTMLInputElement>, 'size'>;
|
|
270
|
+
declare function Input({ className, tone, size, invalid, ...rest }: InputProps): react_jsx_runtime.JSX.Element;
|
|
271
|
+
|
|
272
|
+
type NavRailPart = 'section' | 'item' | 'icon' | 'spacer';
|
|
273
|
+
interface NavRailProps extends Omit<HTMLAttributes<HTMLElement>, 'onChange'> {
|
|
274
|
+
activeKey?: string;
|
|
275
|
+
onChange?: (key: string) => void;
|
|
276
|
+
children: ReactNode;
|
|
277
|
+
classNames?: Partial<Record<NavRailPart, string>>;
|
|
278
|
+
orientation?: 'vertical' | 'horizontal';
|
|
279
|
+
}
|
|
280
|
+
declare function NavRailRoot({ activeKey, onChange, classNames, orientation, className, children, ...props }: NavRailProps): react_jsx_runtime.JSX.Element;
|
|
281
|
+
type CommonItemProps = {
|
|
282
|
+
value: string;
|
|
283
|
+
icon: ReactNode;
|
|
284
|
+
label: string;
|
|
285
|
+
disabled?: boolean;
|
|
286
|
+
className?: string;
|
|
233
287
|
};
|
|
234
|
-
|
|
235
|
-
|
|
288
|
+
interface NavRailSectionProps extends HTMLAttributes<HTMLDivElement> {
|
|
289
|
+
label?: string;
|
|
290
|
+
children: ReactNode;
|
|
291
|
+
}
|
|
292
|
+
interface NavRailButtonItemProps extends CommonItemProps, Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children' | 'value'> {
|
|
293
|
+
href?: never;
|
|
294
|
+
}
|
|
295
|
+
interface NavRailLinkItemProps extends CommonItemProps, Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'children' | 'href'> {
|
|
296
|
+
href: string;
|
|
297
|
+
}
|
|
298
|
+
declare function NavRailItem(props: NavRailButtonItemProps | NavRailLinkItemProps): react_jsx_runtime.JSX.Element;
|
|
299
|
+
declare function NavRailSpacer(): react_jsx_runtime.JSX.Element;
|
|
300
|
+
declare function NavRailSection({ label, className, children, ...props }: NavRailSectionProps): react_jsx_runtime.JSX.Element;
|
|
301
|
+
declare const NavRail: typeof NavRailRoot & {
|
|
302
|
+
Item: typeof NavRailItem;
|
|
303
|
+
Section: typeof NavRailSection;
|
|
304
|
+
Spacer: typeof NavRailSpacer;
|
|
236
305
|
};
|
|
237
|
-
type InputProps = TextInputProps | TextareaProps$1;
|
|
238
|
-
declare function Input(props: TextInputProps): React.JSX.Element;
|
|
239
|
-
declare function Input(props: TextareaProps$1): React.JSX.Element;
|
|
240
306
|
|
|
241
307
|
type PanelVariant = 'default' | 'subtle' | 'raised';
|
|
242
308
|
type PanelPadding = 'none' | 'sm' | 'md' | 'lg';
|
|
@@ -254,53 +320,151 @@ declare function PanelHeader({ className, children, ...props }: PanelSectionProp
|
|
|
254
320
|
declare function PanelBody({ className, children, ...props }: PanelSectionProps): react_jsx_runtime.JSX.Element;
|
|
255
321
|
declare function PanelFooter({ className, children, ...props }: PanelSectionProps): react_jsx_runtime.JSX.Element;
|
|
256
322
|
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
323
|
+
type PopoverTriggerMode = 'click' | 'hover';
|
|
324
|
+
type PopoverPlacement = 'top' | 'bottom' | 'left' | 'right' | 'auto';
|
|
325
|
+
type PopoverSide = 'top' | 'bottom' | 'left' | 'right';
|
|
326
|
+
type PopoverAlign = 'start' | 'center' | 'end';
|
|
327
|
+
type PopoverPart = 'trigger' | 'content' | 'arrow';
|
|
328
|
+
interface PopoverProps {
|
|
329
|
+
open?: boolean;
|
|
330
|
+
defaultOpen?: boolean;
|
|
331
|
+
onOpenChange?: (open: boolean) => void;
|
|
332
|
+
trigger?: PopoverTriggerMode;
|
|
333
|
+
classNames?: Partial<Record<PopoverPart, string>>;
|
|
334
|
+
children: ReactNode;
|
|
335
|
+
}
|
|
336
|
+
declare function PopoverRoot({ open, defaultOpen, onOpenChange, trigger, classNames, children, }: PopoverProps): react_jsx_runtime.JSX.Element;
|
|
337
|
+
interface PopoverTriggerProps {
|
|
338
|
+
asChild?: boolean;
|
|
260
339
|
disabled?: boolean;
|
|
340
|
+
className?: string;
|
|
341
|
+
children: ReactElement;
|
|
261
342
|
}
|
|
262
|
-
|
|
343
|
+
declare function PopoverTrigger({ asChild, disabled, className, children, }: PopoverTriggerProps): react_jsx_runtime.JSX.Element;
|
|
344
|
+
interface PopoverContentProps extends HTMLAttributes<HTMLDivElement> {
|
|
345
|
+
placement?: PopoverPlacement;
|
|
346
|
+
side?: PopoverSide;
|
|
347
|
+
align?: PopoverAlign;
|
|
348
|
+
sideOffset?: number;
|
|
349
|
+
alignOffset?: number;
|
|
350
|
+
collisionPadding?: number;
|
|
351
|
+
portal?: boolean;
|
|
352
|
+
arrow?: boolean;
|
|
353
|
+
matchTriggerWidth?: boolean;
|
|
354
|
+
closeOnInteractOutside?: boolean;
|
|
355
|
+
closeOnEscape?: boolean;
|
|
356
|
+
closeOnPointerDownOutside?: boolean;
|
|
357
|
+
restoreFocus?: boolean;
|
|
358
|
+
initialFocusRef?: RefObject<HTMLElement | null>;
|
|
359
|
+
onInteractOutside?: (target: Node) => void;
|
|
360
|
+
onEscapeKeyDown?: () => void;
|
|
361
|
+
onPointerDownOutside?: (target: Node) => void;
|
|
362
|
+
classNames?: Partial<Record<PopoverPart, string>>;
|
|
363
|
+
}
|
|
364
|
+
declare function PopoverContent({ placement, side, align, sideOffset, alignOffset, collisionPadding, portal, arrow, matchTriggerWidth, closeOnInteractOutside, closeOnEscape, closeOnPointerDownOutside, restoreFocus, initialFocusRef, onInteractOutside, onEscapeKeyDown, onPointerDownOutside, className, classNames, children, onMouseEnter, onMouseLeave, onFocus, onBlur, ...props }: PopoverContentProps): react_jsx_runtime.JSX.Element | null;
|
|
365
|
+
declare const Popover: typeof PopoverRoot & {
|
|
366
|
+
Root: typeof PopoverRoot;
|
|
367
|
+
Trigger: typeof PopoverTrigger;
|
|
368
|
+
Content: typeof PopoverContent;
|
|
369
|
+
};
|
|
370
|
+
|
|
371
|
+
/**
|
|
372
|
+
* Shared option model for single-select controls (Select, SegmentedControl,
|
|
373
|
+
* and future RadioGroup). Using a common type prevents divergent option
|
|
374
|
+
* structures across the form family.
|
|
375
|
+
*/
|
|
376
|
+
type ChoiceOption<T extends string> = {
|
|
263
377
|
value: T;
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
378
|
+
label: ReactNode;
|
|
379
|
+
disabled?: boolean;
|
|
380
|
+
/** Explicit string representation for accessibility and search/filter use
|
|
381
|
+
* cases where `label` is a ReactNode that cannot be inferred as text. */
|
|
382
|
+
textValue?: string;
|
|
383
|
+
};
|
|
384
|
+
|
|
385
|
+
type RadioSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
386
|
+
interface RadioProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'type' | 'onChange'> {
|
|
387
|
+
checked?: boolean;
|
|
388
|
+
defaultChecked?: boolean;
|
|
389
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
390
|
+
size?: RadioSize;
|
|
391
|
+
invalid?: boolean;
|
|
392
|
+
ariaLabel?: string;
|
|
393
|
+
children?: ReactNode;
|
|
394
|
+
}
|
|
395
|
+
declare function Radio({ checked: checkedProp, defaultChecked, onCheckedChange, size, invalid, disabled, required, id, name, value, className, ariaLabel, children, onKeyDown, 'aria-describedby': ariaDescribedBy, ...rest }: RadioProps): react_jsx_runtime.JSX.Element;
|
|
396
|
+
interface RadioGroupProps<T extends string> {
|
|
397
|
+
value?: T;
|
|
398
|
+
defaultValue?: T;
|
|
399
|
+
onValueChange?: (value: T) => void;
|
|
400
|
+
options?: Array<ChoiceOption<T>>;
|
|
401
|
+
size?: RadioSize;
|
|
402
|
+
orientation?: 'vertical' | 'horizontal';
|
|
403
|
+
disabled?: boolean;
|
|
404
|
+
required?: boolean;
|
|
405
|
+
invalid?: boolean;
|
|
406
|
+
id?: string;
|
|
407
|
+
name?: string;
|
|
267
408
|
className?: string;
|
|
268
|
-
ariaLabel
|
|
409
|
+
ariaLabel?: string;
|
|
410
|
+
children?: ReactNode;
|
|
411
|
+
'aria-describedby'?: string;
|
|
269
412
|
}
|
|
270
|
-
declare function
|
|
413
|
+
declare function RadioGroup<T extends string>({ value: valueProp, defaultValue, onValueChange, options, size, orientation, disabled: disabledProp, required, invalid, id, name, className, ariaLabel, children, 'aria-describedby': ariaDescribedBy, }: RadioGroupProps<T>): react_jsx_runtime.JSX.Element;
|
|
271
414
|
|
|
272
|
-
interface
|
|
273
|
-
value
|
|
274
|
-
|
|
415
|
+
interface SegmentedControlProps<T extends string> {
|
|
416
|
+
value?: T;
|
|
417
|
+
defaultValue?: T;
|
|
418
|
+
onValueChange?: (value: T) => void;
|
|
419
|
+
options: Array<ChoiceOption<T>>;
|
|
420
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
275
421
|
disabled?: boolean;
|
|
422
|
+
required?: boolean;
|
|
423
|
+
invalid?: boolean;
|
|
424
|
+
id?: string;
|
|
425
|
+
name?: string;
|
|
426
|
+
className?: string;
|
|
427
|
+
ariaLabel?: string;
|
|
428
|
+
'aria-describedby'?: string;
|
|
276
429
|
}
|
|
430
|
+
declare function SegmentedControl<T extends string>({ value: valueProp, defaultValue, onValueChange, options, size, disabled: disabledProp, required, invalid, id, name, className, ariaLabel, 'aria-describedby': ariaDescribedBy, }: SegmentedControlProps<T>): react_jsx_runtime.JSX.Element;
|
|
431
|
+
|
|
277
432
|
interface SelectRenderValueArgs<T extends string> {
|
|
278
433
|
open: boolean;
|
|
279
434
|
placeholder: string;
|
|
280
|
-
selectedOption?:
|
|
435
|
+
selectedOption?: ChoiceOption<T>;
|
|
281
436
|
}
|
|
282
437
|
interface SelectRenderOptionArgs<T extends string> {
|
|
283
|
-
option:
|
|
438
|
+
option: ChoiceOption<T>;
|
|
284
439
|
index: number;
|
|
285
440
|
selected: boolean;
|
|
286
441
|
highlighted: boolean;
|
|
287
442
|
}
|
|
288
443
|
type SelectPart = 'trigger' | 'chevron' | 'dropdown' | 'option';
|
|
289
444
|
interface SelectProps<T extends string> {
|
|
290
|
-
value
|
|
291
|
-
|
|
292
|
-
|
|
445
|
+
value?: T | null;
|
|
446
|
+
defaultValue?: T | null;
|
|
447
|
+
onValueChange?: (value: T | undefined) => void;
|
|
448
|
+
open?: boolean;
|
|
449
|
+
defaultOpen?: boolean;
|
|
450
|
+
onOpenChange?: (open: boolean) => void;
|
|
451
|
+
options: Array<ChoiceOption<T>>;
|
|
293
452
|
placeholder?: string;
|
|
294
453
|
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
295
454
|
tone?: 'default' | 'warning';
|
|
296
455
|
disabled?: boolean;
|
|
456
|
+
required?: boolean;
|
|
457
|
+
invalid?: boolean;
|
|
458
|
+
id?: string;
|
|
459
|
+
name?: string;
|
|
297
460
|
className?: string;
|
|
298
|
-
ariaLabel
|
|
461
|
+
ariaLabel?: string;
|
|
462
|
+
'aria-describedby'?: string;
|
|
299
463
|
renderValue?: (args: SelectRenderValueArgs<T>) => ReactNode;
|
|
300
464
|
renderOption?: (args: SelectRenderOptionArgs<T>) => ReactNode;
|
|
301
465
|
classNames?: Partial<Record<SelectPart, string>>;
|
|
302
466
|
}
|
|
303
|
-
declare function Select<T extends string>({ value,
|
|
467
|
+
declare function Select<T extends string>({ value: valueProp, defaultValue, onValueChange, open: openProp, defaultOpen, onOpenChange, options, placeholder, size, tone, disabled: disabledProp, required, invalid, id, name, className, ariaLabel, 'aria-describedby': ariaDescribedBy, renderValue, renderOption, classNames, }: SelectProps<T>): react_jsx_runtime.JSX.Element;
|
|
304
468
|
|
|
305
469
|
type SkeletonAnimation = 'pulse' | 'scan';
|
|
306
470
|
type SkeletonTone = 'default' | 'emphasis' | 'warm';
|
|
@@ -339,22 +503,151 @@ declare function StatusNotice({ tone, layout, icon, title, description, action,
|
|
|
339
503
|
|
|
340
504
|
type SwitchSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
341
505
|
interface SwitchProps {
|
|
342
|
-
checked
|
|
343
|
-
|
|
506
|
+
checked?: boolean;
|
|
507
|
+
defaultChecked?: boolean;
|
|
508
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
344
509
|
size?: SwitchSize;
|
|
345
510
|
disabled?: boolean;
|
|
511
|
+
required?: boolean;
|
|
512
|
+
invalid?: boolean;
|
|
513
|
+
id?: string;
|
|
514
|
+
name?: string;
|
|
346
515
|
className?: string;
|
|
347
|
-
ariaLabel
|
|
516
|
+
ariaLabel?: string;
|
|
517
|
+
'aria-describedby'?: string;
|
|
518
|
+
}
|
|
519
|
+
declare function Switch({ checked: checkedProp, defaultChecked, onCheckedChange, size, disabled, required, invalid, id, name, className, ariaLabel, 'aria-describedby': ariaDescribedBy, }: SwitchProps): react_jsx_runtime.JSX.Element;
|
|
520
|
+
|
|
521
|
+
type TableSortDirection = 'asc' | 'desc';
|
|
522
|
+
type TableSortCycle = 'binary' | 'ternary';
|
|
523
|
+
type TablePart = 'headerCell' | 'headerSortButton' | 'headerLabel' | 'resizeHandle' | 'cell' | 'selectionCell' | 'selectionControl' | 'loadingState' | 'emptyState' | 'skeletonCell';
|
|
524
|
+
interface TableSortState {
|
|
525
|
+
key: string;
|
|
526
|
+
direction: TableSortDirection;
|
|
527
|
+
}
|
|
528
|
+
interface TableColumnDef<Row extends Record<string, unknown>> {
|
|
529
|
+
key: string;
|
|
530
|
+
header: ReactNode;
|
|
531
|
+
accessor?: keyof Row | ((row: Row, index: number) => ReactNode);
|
|
532
|
+
cell?: (row: Row, index: number) => ReactNode;
|
|
533
|
+
sortable?: boolean;
|
|
534
|
+
compare?: (a: Row, b: Row, leftIndex: number, rightIndex: number) => number;
|
|
535
|
+
align?: 'start' | 'center' | 'end';
|
|
536
|
+
width?: string | number;
|
|
537
|
+
minWidth?: number;
|
|
538
|
+
resizable?: boolean;
|
|
539
|
+
headerClassName?: string;
|
|
540
|
+
cellClassName?: string;
|
|
541
|
+
renderHeader?: (args: {
|
|
542
|
+
column: TableColumnDef<Row>;
|
|
543
|
+
sorted?: TableSortDirection;
|
|
544
|
+
sortable: boolean;
|
|
545
|
+
}) => ReactNode;
|
|
546
|
+
renderCell?: (args: {
|
|
547
|
+
column: TableColumnDef<Row>;
|
|
548
|
+
row: Row;
|
|
549
|
+
rowId: string;
|
|
550
|
+
index: number;
|
|
551
|
+
selected: boolean;
|
|
552
|
+
value: ReactNode;
|
|
553
|
+
}) => ReactNode;
|
|
554
|
+
}
|
|
555
|
+
interface VirtualizeOptions {
|
|
556
|
+
overscan?: number;
|
|
557
|
+
height?: number;
|
|
558
|
+
}
|
|
559
|
+
interface TableProps<Row extends Record<string, unknown>> {
|
|
560
|
+
columns: Array<TableColumnDef<Row>>;
|
|
561
|
+
data: Row[];
|
|
562
|
+
visibleColumnKeys?: Set<string>;
|
|
563
|
+
defaultVisibleColumnKeys?: Set<string>;
|
|
564
|
+
columnWidths?: Partial<Record<string, number>>;
|
|
565
|
+
defaultColumnWidths?: Partial<Record<string, number>>;
|
|
566
|
+
onColumnWidthsChange?: (widths: Partial<Record<string, number>>) => void;
|
|
567
|
+
getRowId?: (row: Row, index: number) => string;
|
|
568
|
+
selectionMode?: 'single' | 'multiple';
|
|
569
|
+
selectedRows?: Set<string>;
|
|
570
|
+
defaultSelectedRows?: Set<string>;
|
|
571
|
+
onSelectionChange?: (selected: Set<string>) => void;
|
|
572
|
+
sort?: TableSortState | null;
|
|
573
|
+
defaultSort?: TableSortState | null;
|
|
574
|
+
onSort?: (key: string, direction: TableSortDirection | null) => void;
|
|
575
|
+
onSortChange?: (sort: TableSortState | null) => void;
|
|
576
|
+
sortCycle?: TableSortCycle;
|
|
577
|
+
getSortButtonAriaLabel?: (args: {
|
|
578
|
+
column: TableColumnDef<Row>;
|
|
579
|
+
sorted?: TableSortDirection;
|
|
580
|
+
nextDirection: TableSortDirection | null;
|
|
581
|
+
}) => string;
|
|
582
|
+
selectionColumnAriaLabel?: string;
|
|
583
|
+
getRowSelectionAriaLabel?: (args: {
|
|
584
|
+
row: Row;
|
|
585
|
+
rowId: string;
|
|
586
|
+
index: number;
|
|
587
|
+
selected: boolean;
|
|
588
|
+
selectionMode: 'single' | 'multiple';
|
|
589
|
+
}) => string;
|
|
590
|
+
getSelectAllAriaLabel?: (args: {
|
|
591
|
+
allSelected: boolean;
|
|
592
|
+
partiallySelected: boolean;
|
|
593
|
+
selectableCount: number;
|
|
594
|
+
}) => string;
|
|
595
|
+
isRowSelectable?: (row: Row, index: number) => boolean;
|
|
596
|
+
rowHeight?: 'compact' | 'default';
|
|
597
|
+
stickyHeader?: boolean;
|
|
598
|
+
virtualized?: boolean | VirtualizeOptions;
|
|
599
|
+
loading?: boolean;
|
|
600
|
+
loadingState?: ReactNode;
|
|
601
|
+
skeletonRows?: number;
|
|
602
|
+
emptyState?: ReactNode;
|
|
603
|
+
className?: string;
|
|
604
|
+
classNames?: Partial<Record<TablePart, string>>;
|
|
605
|
+
}
|
|
606
|
+
declare function Table<Row extends Record<string, unknown>>({ columns, data, visibleColumnKeys, defaultVisibleColumnKeys, columnWidths, defaultColumnWidths, onColumnWidthsChange, getRowId, selectionMode, selectedRows, defaultSelectedRows, onSelectionChange, sort, defaultSort, onSort, onSortChange, sortCycle, getSortButtonAriaLabel, selectionColumnAriaLabel, getRowSelectionAriaLabel, getSelectAllAriaLabel, isRowSelectable, rowHeight, stickyHeader, virtualized, loading, loadingState, skeletonRows, emptyState, className, classNames, }: TableProps<Row>): react_jsx_runtime.JSX.Element;
|
|
607
|
+
|
|
608
|
+
type TreePart = 'item' | 'button' | 'label' | 'chevron';
|
|
609
|
+
interface TreeNode<T = unknown> {
|
|
610
|
+
key: string;
|
|
611
|
+
label: ReactNode;
|
|
612
|
+
textValue?: string;
|
|
613
|
+
children?: TreeNode<T>[];
|
|
614
|
+
data?: T;
|
|
615
|
+
disabled?: boolean;
|
|
616
|
+
}
|
|
617
|
+
interface TreeRenderArgs<T = unknown> {
|
|
618
|
+
node: TreeNode<T>;
|
|
619
|
+
depth: number;
|
|
620
|
+
expanded: boolean;
|
|
621
|
+
selected: boolean;
|
|
622
|
+
match: boolean;
|
|
623
|
+
}
|
|
624
|
+
interface TreeProps<T = unknown> {
|
|
625
|
+
nodes: TreeNode<T>[];
|
|
626
|
+
expandedKeys?: Set<string>;
|
|
627
|
+
defaultExpandedKeys?: Set<string>;
|
|
628
|
+
onExpand?: (key: string, expanded: boolean) => void;
|
|
629
|
+
onExpandedKeysChange?: (keys: Set<string>) => void;
|
|
630
|
+
selectedKey?: string;
|
|
631
|
+
defaultSelectedKey?: string;
|
|
632
|
+
onSelect?: (key: string) => void;
|
|
633
|
+
renderNode?: (args: TreeRenderArgs<T>) => ReactNode;
|
|
634
|
+
searchQuery?: string;
|
|
635
|
+
className?: string;
|
|
636
|
+
ariaLabel?: string;
|
|
637
|
+
classNames?: Partial<Record<TreePart, string>>;
|
|
348
638
|
}
|
|
349
|
-
declare function
|
|
639
|
+
declare function Tree<T = unknown>({ nodes, expandedKeys, defaultExpandedKeys, onExpand, onExpandedKeysChange, selectedKey, defaultSelectedKey, onSelect, renderNode, searchQuery, className, ariaLabel, classNames, }: TreeProps<T>): react_jsx_runtime.JSX.Element;
|
|
350
640
|
|
|
641
|
+
type TabsPart = 'list' | 'trigger' | 'content';
|
|
351
642
|
interface TabsRootProps extends HTMLAttributes<HTMLDivElement> {
|
|
352
643
|
children: ReactNode;
|
|
353
644
|
value?: string;
|
|
354
645
|
defaultValue?: string;
|
|
355
646
|
onValueChange?: (value: string) => void;
|
|
647
|
+
orientation?: 'horizontal' | 'vertical';
|
|
648
|
+
classNames?: Partial<Record<TabsPart, string>>;
|
|
356
649
|
}
|
|
357
|
-
declare function TabsRoot({ children, value, defaultValue, onValueChange, className, ...props }: TabsRootProps): react_jsx_runtime.JSX.Element;
|
|
650
|
+
declare function TabsRoot({ children, value, defaultValue, onValueChange, orientation, classNames, className, ...props }: TabsRootProps): react_jsx_runtime.JSX.Element;
|
|
358
651
|
interface TabsListProps extends HTMLAttributes<HTMLDivElement> {
|
|
359
652
|
children: ReactNode;
|
|
360
653
|
ariaLabel?: string;
|
|
@@ -383,8 +676,9 @@ interface TextareaProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>
|
|
|
383
676
|
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
384
677
|
resize?: 'none' | 'vertical' | 'both';
|
|
385
678
|
autoResize?: boolean;
|
|
679
|
+
invalid?: boolean;
|
|
386
680
|
}
|
|
387
|
-
declare function Textarea({ className, tone, size, resize, autoResize, style, onInput, rows, ...props }: TextareaProps): react_jsx_runtime.JSX.Element;
|
|
681
|
+
declare function Textarea({ className, tone, size, resize, autoResize, invalid, style, onInput, rows, ...props }: TextareaProps): react_jsx_runtime.JSX.Element;
|
|
388
682
|
|
|
389
683
|
type ToastTone = 'success' | 'warning' | 'danger' | 'info';
|
|
390
684
|
type ToastPart = 'container' | 'toast' | 'icon' | 'content' | 'title' | 'message' | 'close';
|
|
@@ -437,4 +731,4 @@ interface TooltipProps {
|
|
|
437
731
|
}
|
|
438
732
|
declare function Tooltip({ content, placement: preferredPlacement, density, showDelay, hideDelay, arrow, renderArrow, className, children, classNames, }: TooltipProps): react_jsx_runtime.JSX.Element;
|
|
439
733
|
|
|
440
|
-
export { Avatar, Badge, type BadgeProps, Button, type ButtonProps, Collapsible, CollapsibleContent, type CollapsibleContentProps, type CollapsiblePart, CollapsibleRoot, type CollapsibleRootProps, CollapsibleTrigger, type CollapsibleTriggerProps, ConfirmProvider, Dialog, Drawer, DropdownMenu, type DropdownMenuAlign, type DropdownMenuContentProps, type DropdownMenuItemProps, type DropdownMenuProps, type DropdownMenuRole, type DropdownMenuSide, type DropdownMenuTriggerProps, Field, type FieldProps, IconButton, type IconButtonProps, Input, type InputProps, Panel, PanelBody, PanelFooter, PanelHeader, SegmentedControl, type
|
|
734
|
+
export { Avatar, Badge, type BadgeProps, Button, type ButtonProps, Checkbox, type CheckboxProps, type ChoiceOption, Collapsible, CollapsibleContent, type CollapsibleContentProps, type CollapsiblePart, CollapsibleRoot, type CollapsibleRootProps, CollapsibleTrigger, type CollapsibleTriggerProps, ConfirmProvider, Dialog, Drawer, DropdownMenu, type DropdownMenuAlign, type DropdownMenuContentProps, type DropdownMenuItemProps, type DropdownMenuProps, type DropdownMenuRole, type DropdownMenuSide, type DropdownMenuTriggerProps, Field, type FieldContextValue, type FieldPart, type FieldProps, IconButton, type IconButtonProps, Input, type InputProps, NavRail, type NavRailButtonItemProps, NavRailItem, type NavRailLinkItemProps, type NavRailPart, type NavRailProps, NavRailRoot, type NavRailSectionProps, NavRailSpacer, Panel, PanelBody, PanelFooter, PanelHeader, Popover, type PopoverAlign, PopoverContent, type PopoverContentProps, type PopoverPart, type PopoverPlacement, type PopoverProps, PopoverRoot, type PopoverSide, PopoverTrigger, type PopoverTriggerMode, type PopoverTriggerProps, Radio, RadioGroup, type RadioGroupProps, type RadioProps, SegmentedControl, type SegmentedControlProps, Select, type SelectPart, type SelectProps, type SelectRenderOptionArgs, type SelectRenderValueArgs, Skeleton, type SkeletonAnimation, type SkeletonSpeed, type SkeletonTone, Spinner, StatusNotice, type StatusNoticePart, type StatusNoticeProps, Switch, type SwitchProps, Table, type TableColumnDef, type TablePart, type TableProps, type TableSortCycle, type TableSortDirection, type TableSortState, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsPart, TabsRoot, type TabsRootProps, TabsTrigger, type TabsTriggerProps, Textarea, type TextareaProps, type ToastInput, ToastProvider, type ToastRenderArgs, Tooltip, Tree, type TreeNode, type TreePart, type TreeProps, type TreeRenderArgs, type VirtualizeOptions, buttonClassName, useConfirm, useToast };
|