@vesture/react 0.2.2 → 0.2.4

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,5 +1,5 @@
1
1
  import * as react from 'react';
2
- import { ButtonHTMLAttributes, LabelHTMLAttributes, InputHTMLAttributes, TextareaHTMLAttributes, SelectHTMLAttributes, ReactNode, HTMLAttributes, ReactElement, MutableRefObject, AnchorHTMLAttributes } from 'react';
2
+ import { ButtonHTMLAttributes, LabelHTMLAttributes, InputHTMLAttributes, TextareaHTMLAttributes, SelectHTMLAttributes, ReactNode, HTMLAttributes, ReactElement, MutableRefObject, AnchorHTMLAttributes, CSSProperties } from 'react';
3
3
  import { Placement } from '@floating-ui/react';
4
4
  export { defaultThemeClass, defaultThemeVars, vars } from '@vesture/tokens';
5
5
 
@@ -34,6 +34,7 @@ declare const Select: react.ForwardRefExoticComponent<SelectProps & react.RefAtt
34
34
 
35
35
  interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type"> {
36
36
  label?: ReactNode;
37
+ indeterminate?: boolean;
37
38
  }
38
39
  declare const Checkbox: react.ForwardRefExoticComponent<CheckboxProps & react.RefAttributes<HTMLInputElement>>;
39
40
 
@@ -424,6 +425,7 @@ interface NumberInputProps {
424
425
  id?: string;
425
426
  name?: string;
426
427
  className?: string;
428
+ style?: CSSProperties;
427
429
  "aria-label"?: string;
428
430
  "aria-labelledby"?: string;
429
431
  }
@@ -438,14 +440,16 @@ interface SliderProps {
438
440
  max?: number;
439
441
  step?: number;
440
442
  disabled?: boolean;
443
+ id?: string;
441
444
  className?: string;
445
+ style?: CSSProperties;
442
446
  /** Label for the single thumb, or the [start, end] thumbs in range mode. */
443
447
  "aria-label"?: string | [string, string];
444
448
  /** Formats the value shown to assistive tech and in the value label, e.g. `(v) => \`$\${v}\`` */
445
449
  formatValue?: (value: number) => string;
446
450
  }
447
451
 
448
- declare function Slider({ value: controlledValue, defaultValue, onChange, min, max, step, disabled, className, formatValue, ...rest }: SliderProps): ReactElement;
452
+ declare function Slider({ value: controlledValue, defaultValue, onChange, min, max, step, disabled, id, className, style, formatValue, ...rest }: SliderProps): ReactElement;
449
453
 
450
454
  interface ComboboxOption {
451
455
  value: string;
@@ -476,4 +480,30 @@ interface ComboboxProps {
476
480
 
477
481
  declare function Combobox({ options, multiple, value: controlledValue, defaultValue, onChange, onInputChange, filterOptions, placeholder, noOptionsMessage, disabled, invalid, loading, id, className, ...rest }: ComboboxProps): ReactElement;
478
482
 
479
- export { Accordion, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, type AccordionProps, AccordionTrigger, type AccordionTriggerProps, Alert, type AlertProps, type AlertVariant, Avatar, type AvatarProps, type AvatarSize, type AvatarStatus, Badge, type BadgeProps, type BadgeVariant, Breadcrumbs, BreadcrumbsItem, type BreadcrumbsItemProps, type BreadcrumbsProps, Button, type ButtonProps, type ButtonVariant, Calendar, type CalendarProps, Card, type CardElevation, type CardProps, Checkbox, type CheckboxProps, Combobox, type ComboboxOption, type ComboboxProps, DataGrid, type DataGridColumn, type DataGridProps, DatePicker, type DatePickerProps, type DateRange, DateRangePicker, type DateRangePickerProps, Divider, type DividerOrientation, type DividerProps, DropdownMenu, DropdownMenuItem, type DropdownMenuItemProps, type DropdownMenuProps, Input, type InputProps, Label, type LabelProps, Modal, type ModalProps, NumberInput, type NumberInputProps, Pagination, type PaginationProps, Popover, type PopoverProps, Progress, type ProgressProps, Radio, type RadioProps, Select, type SelectProps, Slider, type SliderProps, type SliderValue, type SortDirection, type SortState, Spinner, type SpinnerProps, type SpinnerSize, Stack, type StackAlign, type StackDirection, type StackGap, type StackJustify, type StackProps, Switch, type SwitchProps, Tabs, TabsList, type TabsListProps, TabsPanel, type TabsPanelProps, type TabsProps, TabsTrigger, type TabsTriggerProps, Textarea, type TextareaProps, type ToastContextValue, type ToastOptions, ToastProvider, type ToastVariant, Tooltip, type TooltipProps, useToast };
483
+ interface TreeNode<T = unknown> {
484
+ id: string;
485
+ label: ReactNode;
486
+ children?: TreeNode<T>[];
487
+ /** Supports lazy-loaded nodes where `children` is undefined until loaded. */
488
+ hasChildren?: boolean;
489
+ data?: T;
490
+ }
491
+ type TreeViewSelectable = "none" | "single" | "multi";
492
+ interface TreeViewProps<T = unknown> {
493
+ nodes: TreeNode<T>[];
494
+ expanded?: Set<string>;
495
+ defaultExpanded?: Set<string>;
496
+ onExpandedChange?: (expanded: Set<string>) => void;
497
+ selected?: Set<string>;
498
+ defaultSelected?: Set<string>;
499
+ onSelectedChange?: (selected: Set<string>) => void;
500
+ selectable?: TreeViewSelectable;
501
+ /** Called when a node with hasChildren: true and children: undefined is expanded. */
502
+ onLoadChildren?: (node: TreeNode<T>) => Promise<TreeNode<T>[]>;
503
+ height?: number;
504
+ rowHeight?: number;
505
+ }
506
+
507
+ declare function TreeView<T = unknown>({ nodes, expanded: controlledExpanded, defaultExpanded, onExpandedChange, selected: controlledSelected, defaultSelected, onSelectedChange, selectable, onLoadChildren, height, rowHeight, }: TreeViewProps<T>): ReactElement;
508
+
509
+ export { Accordion, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, type AccordionProps, AccordionTrigger, type AccordionTriggerProps, Alert, type AlertProps, type AlertVariant, Avatar, type AvatarProps, type AvatarSize, type AvatarStatus, Badge, type BadgeProps, type BadgeVariant, Breadcrumbs, BreadcrumbsItem, type BreadcrumbsItemProps, type BreadcrumbsProps, Button, type ButtonProps, type ButtonVariant, Calendar, type CalendarProps, Card, type CardElevation, type CardProps, Checkbox, type CheckboxProps, Combobox, type ComboboxOption, type ComboboxProps, DataGrid, type DataGridColumn, type DataGridProps, DatePicker, type DatePickerProps, type DateRange, DateRangePicker, type DateRangePickerProps, Divider, type DividerOrientation, type DividerProps, DropdownMenu, DropdownMenuItem, type DropdownMenuItemProps, type DropdownMenuProps, Input, type InputProps, Label, type LabelProps, Modal, type ModalProps, NumberInput, type NumberInputProps, Pagination, type PaginationProps, Popover, type PopoverProps, Progress, type ProgressProps, Radio, type RadioProps, Select, type SelectProps, Slider, type SliderProps, type SliderValue, type SortDirection, type SortState, Spinner, type SpinnerProps, type SpinnerSize, Stack, type StackAlign, type StackDirection, type StackGap, type StackJustify, type StackProps, Switch, type SwitchProps, Tabs, TabsList, type TabsListProps, TabsPanel, type TabsPanelProps, type TabsProps, TabsTrigger, type TabsTriggerProps, Textarea, type TextareaProps, type ToastContextValue, type ToastOptions, ToastProvider, type ToastVariant, Tooltip, type TooltipProps, type TreeNode, TreeView, type TreeViewProps, type TreeViewSelectable, useToast };