canny-ui-react 4.0.0 → 6.0.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.
Files changed (61) hide show
  1. package/dist/components/Accordion/Accordion.d.ts +20 -1
  2. package/dist/components/Alert/Alert.types.d.ts +7 -0
  3. package/dist/components/Autocomplete/Autocomplete.types.d.ts +11 -1
  4. package/dist/components/Avatar/Avatar.types.d.ts +7 -0
  5. package/dist/components/Badge/Badge.d.ts +7 -0
  6. package/dist/components/Breadcrumb/Breadcrumb.d.ts +7 -0
  7. package/dist/components/Button/Button.types.d.ts +7 -0
  8. package/dist/components/Button/ToggleButton.d.ts +7 -4
  9. package/dist/components/Card/Card.types.d.ts +7 -0
  10. package/dist/components/Charts/BarChart.d.ts +11 -1
  11. package/dist/components/Charts/LineChart.d.ts +10 -0
  12. package/dist/components/Charts/PieChart.d.ts +11 -1
  13. package/dist/components/Charts/ResponsiveContainer.d.ts +11 -2
  14. package/dist/components/Checkbox/Checkbox.d.ts +8 -0
  15. package/dist/components/Chip/Chip.d.ts +7 -0
  16. package/dist/components/ConfirmDialog/ConfirmDialog.d.ts +12 -2
  17. package/dist/components/DataTable/DataTable.d.ts +11 -1
  18. package/dist/components/DatePicker/DatePicker.types.d.ts +8 -0
  19. package/dist/components/Dialog/Dialog.d.ts +20 -2
  20. package/dist/components/Drawer/Drawer.d.ts +20 -2
  21. package/dist/components/Field/Field.d.ts +9 -1
  22. package/dist/components/FileUploader/FileUploader.d.ts +10 -1
  23. package/dist/components/FileUploader/useFileDrop.d.ts +29 -29
  24. package/dist/components/Input/Input.types.d.ts +8 -0
  25. package/dist/components/Layout/AspectRatio.d.ts +3 -0
  26. package/dist/components/Layout/Box.d.ts +1 -0
  27. package/dist/components/Layout/Divider.d.ts +3 -0
  28. package/dist/components/Layout/Grid.d.ts +18 -2
  29. package/dist/components/Layout/Spacer.d.ts +5 -1
  30. package/dist/components/Layout/index.d.ts +2 -0
  31. package/dist/components/Layout/layout.types.d.ts +10 -0
  32. package/dist/components/Layout/sx.d.ts +31 -0
  33. package/dist/components/List/List.d.ts +7 -0
  34. package/dist/components/Menu/Menu.d.ts +49 -6
  35. package/dist/components/MultiSelect/MultiSelect.d.ts +12 -2
  36. package/dist/components/Navbar/Navbar.types.d.ts +7 -0
  37. package/dist/components/Pagination/Pagination.d.ts +9 -0
  38. package/dist/components/PanelGroup/PanelGroup.d.ts +7 -0
  39. package/dist/components/Popover/Popover.d.ts +16 -1
  40. package/dist/components/Progress/Progress.types.d.ts +13 -0
  41. package/dist/components/Radio/Radio.d.ts +8 -0
  42. package/dist/components/Scroll/Scroll.types.d.ts +7 -0
  43. package/dist/components/Select/Select.d.ts +21 -5
  44. package/dist/components/Sidebar/Sidebar.types.d.ts +7 -0
  45. package/dist/components/Skeleton/Skeleton.types.d.ts +7 -0
  46. package/dist/components/Slider/Slider.d.ts +32 -2
  47. package/dist/components/Stepper/Stepper.d.ts +7 -0
  48. package/dist/components/Switch/Switch.d.ts +8 -0
  49. package/dist/components/Tabs/Tabs.d.ts +28 -5
  50. package/dist/components/Text/Text.d.ts +7 -0
  51. package/dist/components/Textarea/Textarea.d.ts +7 -0
  52. package/dist/components/Timeline/Timeline.d.ts +7 -0
  53. package/dist/components/Toast/Toast.types.d.ts +8 -0
  54. package/dist/components/Tooltip/Tooltip.d.ts +10 -0
  55. package/dist/components/TreeView/TreeView.d.ts +8 -0
  56. package/dist/index.cjs +45 -45
  57. package/dist/index.cjs.map +1 -1
  58. package/dist/index.js +7427 -6914
  59. package/dist/index.js.map +1 -1
  60. package/dist/utils/withSx.d.ts +22 -0
  61. package/package.json +3 -3
@@ -1,5 +1,6 @@
1
- import type { ComponentPropsWithoutRef, ReactNode } from 'react';
1
+ import type { ComponentPropsWithoutRef, CSSProperties, ReactNode } from 'react';
2
2
  import * as RadixSelect from '@radix-ui/react-select';
3
+ import type { SxProp } from '../Layout/sx';
3
4
  export type SelectColor = 'primary' | 'danger' | 'warning' | 'success';
4
5
  export type SelectSize = 'sm' | 'md' | 'lg';
5
6
  type SelectRootProps = ComponentPropsWithoutRef<typeof RadixSelect.Root>;
@@ -24,6 +25,15 @@ export interface SelectProps extends SelectRootProps {
24
25
  'aria-describedby'?: string;
25
26
  /** Apply .danger/.warning/.success via Field's className thread. */
26
27
  className?: string;
28
+ /**
29
+ * One-off CSS, same as `Box`'s `sx`: each value may be a scalar or a
30
+ * responsive breakpoint map (`{ base, sm, md, lg, xl }`). Applied to the
31
+ * trigger (the inline field). Scalar-only sx merges into inline style;
32
+ * responsive sx injects a scoped class.
33
+ */
34
+ sx?: SxProp;
35
+ /** Inline style applied to the trigger (the inline field). */
36
+ style?: CSSProperties;
27
37
  /** `<SelectItem>` / `<SelectGroup>` / `<SelectSeparator>` / `<SelectLabel>` children. */
28
38
  children: ReactNode;
29
39
  }
@@ -37,14 +47,20 @@ export interface SelectProps extends SelectRootProps {
37
47
  * <SelectItem value="staging">Staging</SelectItem>
38
48
  * </Select>
39
49
  */
40
- export declare function Select({ placeholder, size, color, triggerIcon, triggerClassName, contentClassName, id, className, disabled, children, 'aria-invalid': ariaInvalid, 'aria-describedby': ariaDescribedBy, ...rootProps }: SelectProps): import("react/jsx-runtime").JSX.Element;
41
- export interface SelectItemProps extends ComponentPropsWithoutRef<typeof RadixSelect.Item> {
50
+ export declare function Select({ placeholder, size, color, triggerIcon, triggerClassName, contentClassName, id, className, style, sx, disabled, children, 'aria-invalid': ariaInvalid, 'aria-describedby': ariaDescribedBy, ...rootProps }: SelectProps): import("react/jsx-runtime").JSX.Element;
51
+ export interface SelectItemProps extends ComponentPropsWithoutRef<'div'> {
52
+ /** The value submitted when this item is selected. */
53
+ value: string;
54
+ /** Disable selecting this item. */
55
+ disabled?: boolean;
56
+ /** Optional text used for typeahead matching. */
57
+ textValue?: string;
42
58
  }
43
59
  export declare const SelectItem: import("react").ForwardRefExoticComponent<SelectItemProps & import("react").RefAttributes<HTMLDivElement>>;
44
- export interface SelectGroupProps extends ComponentPropsWithoutRef<typeof RadixSelect.Group> {
60
+ export interface SelectGroupProps extends ComponentPropsWithoutRef<'div'> {
45
61
  }
46
62
  export declare const SelectGroup: import("react").ForwardRefExoticComponent<SelectGroupProps & import("react").RefAttributes<HTMLDivElement>>;
47
- export interface SelectLabelProps extends ComponentPropsWithoutRef<typeof RadixSelect.Label> {
63
+ export interface SelectLabelProps extends ComponentPropsWithoutRef<'div'> {
48
64
  }
49
65
  export declare const SelectLabel: import("react").ForwardRefExoticComponent<SelectLabelProps & import("react").RefAttributes<HTMLDivElement>>;
50
66
  export declare const SelectSeparator: import("react").ForwardRefExoticComponent<Omit<RadixSelect.SelectSeparatorProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
@@ -1,10 +1,17 @@
1
1
  import type { AnchorHTMLAttributes, HTMLAttributes, ReactNode } from 'react';
2
+ import type { SxProp } from '../Layout/sx';
2
3
  export type SidebarWidth = 'thin' | 'default' | 'wide';
3
4
  export interface SidebarProps extends HTMLAttributes<HTMLElement> {
4
5
  width?: SidebarWidth;
5
6
  sticky?: boolean;
6
7
  collapsed?: boolean;
7
8
  responsive?: boolean;
9
+ /**
10
+ * One-off CSS, same as `Box`'s `sx`: each value may be a scalar or a
11
+ * responsive breakpoint map (`{ base, sm, md, lg, xl }`). Scalar-only sx
12
+ * merges into inline style; responsive sx injects a scoped class.
13
+ */
14
+ sx?: SxProp;
8
15
  children: ReactNode;
9
16
  }
10
17
  export interface SidebarSectionProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
@@ -1,7 +1,14 @@
1
1
  import type { HTMLAttributes } from 'react';
2
+ import type { SxProp } from '../Layout/sx';
2
3
  export type SkeletonShape = 'text' | 'title' | 'avatar' | 'button';
3
4
  export interface SkeletonProps extends HTMLAttributes<HTMLSpanElement> {
4
5
  shape?: SkeletonShape;
5
6
  width?: number | string;
6
7
  height?: number | string;
8
+ /**
9
+ * One-off CSS, same as `Box`'s `sx`: each value may be a scalar or a
10
+ * responsive breakpoint map (`{ base, sm, md, lg, xl }`). Scalar-only sx
11
+ * merges into inline style; responsive sx injects a scoped class.
12
+ */
13
+ sx?: SxProp;
7
14
  }
@@ -1,12 +1,42 @@
1
1
  import type { ComponentPropsWithoutRef, ReactNode } from 'react';
2
- import * as SliderPrimitive from '@radix-ui/react-slider';
3
- export interface SliderProps extends ComponentPropsWithoutRef<typeof SliderPrimitive.Root> {
2
+ import type { SxProp } from '../Layout/sx';
3
+ export interface SliderProps extends Omit<ComponentPropsWithoutRef<'span'>, 'defaultValue' | 'dir' | 'onChange'> {
4
+ /** Controlled value (one entry per thumb). */
5
+ value?: number[];
6
+ /** Uncontrolled initial value (one entry per thumb). */
7
+ defaultValue?: number[];
8
+ /** Fires continuously as the value changes. */
9
+ onValueChange?: (value: number[]) => void;
10
+ /** Fires when the user finishes dragging. */
11
+ onValueCommit?: (value: number[]) => void;
12
+ /** Minimum value. Default: 0. */
13
+ min?: number;
14
+ /** Maximum value. Default: 100. */
15
+ max?: number;
16
+ /** Step increment. Default: 1. */
17
+ step?: number;
18
+ /** Minimum steps allowed between two thumbs. */
19
+ minStepsBetweenThumbs?: number;
20
+ /** Orientation. Default: `horizontal`. */
21
+ orientation?: 'horizontal' | 'vertical';
22
+ /** Disable the slider. */
23
+ disabled?: boolean;
24
+ /** Reading direction. */
25
+ dir?: 'ltr' | 'rtl';
26
+ /** Name for form submission. */
27
+ name?: string;
4
28
  size?: 'sm' | 'md' | 'lg';
5
29
  color?: 'primary' | 'success' | 'warning' | 'danger';
6
30
  /** Show inline value bubble above the active thumb on hover/focus. */
7
31
  showValue?: boolean;
8
32
  /** Format value for the bubble. Default: `String(v)`. */
9
33
  formatValue?: (v: number) => ReactNode;
34
+ /**
35
+ * One-off CSS, same as `Box`'s `sx`: each value may be a scalar or a
36
+ * responsive breakpoint map (`{ base, sm, md, lg, xl }`). Scalar-only sx
37
+ * merges into inline style; responsive sx injects a scoped class.
38
+ */
39
+ sx?: SxProp;
10
40
  }
11
41
  /**
12
42
  * Slider — single or range value picker. Pass an array length 1 for single,
@@ -1,4 +1,5 @@
1
1
  import type { HTMLAttributes, ReactNode } from 'react';
2
+ import type { SxProp } from '../Layout/sx';
2
3
  export interface StepperStep {
3
4
  label: ReactNode;
4
5
  description?: ReactNode;
@@ -12,5 +13,11 @@ export interface StepperProps extends Omit<HTMLAttributes<HTMLOListElement>, 'ch
12
13
  size?: 'sm' | 'md';
13
14
  /** Fired when a previously-completed step is clicked. */
14
15
  onStepClick?: (index: number) => void;
16
+ /**
17
+ * One-off CSS, same as `Box`'s `sx`: each value may be a scalar or a
18
+ * responsive breakpoint map (`{ base, sm, md, lg, xl }`). Scalar-only sx
19
+ * merges into inline style; responsive sx injects a scoped class.
20
+ */
21
+ sx?: SxProp;
15
22
  }
16
23
  export declare const Stepper: import("react").ForwardRefExoticComponent<StepperProps & import("react").RefAttributes<HTMLOListElement>>;
@@ -1,8 +1,16 @@
1
1
  import type { ComponentPropsWithoutRef, ReactNode } from 'react';
2
2
  import * as RadixSwitch from '@radix-ui/react-switch';
3
+ import type { SxProp } from '../Layout/sx';
3
4
  type SwitchRootProps = ComponentPropsWithoutRef<typeof RadixSwitch.Root>;
4
5
  export interface SwitchProps extends Omit<SwitchRootProps, 'children'> {
5
6
  children?: ReactNode;
7
+ /**
8
+ * One-off CSS, same as `Box`'s `sx`: each value may be a scalar or a
9
+ * responsive breakpoint map (`{ base, sm, md, lg, xl }`). Scalar-only sx
10
+ * merges into inline style; responsive sx injects a scoped class. Applied to
11
+ * the outer label wrapper, or the switch itself when there is no label.
12
+ */
13
+ sx?: SxProp;
6
14
  }
7
15
  export declare const Switch: import("react").ForwardRefExoticComponent<SwitchProps & import("react").RefAttributes<HTMLButtonElement>>;
8
16
  export {};
@@ -1,5 +1,6 @@
1
- import type { ComponentPropsWithoutRef } from 'react';
1
+ import type { ComponentPropsWithoutRef, ReactNode } from 'react';
2
2
  import * as RadixTabs from '@radix-ui/react-tabs';
3
+ import type { SxProp } from '../Layout/sx';
3
4
  export type TabsVariant = 'line' | 'pills' | 'segmented';
4
5
  export type TabsSize = 'sm' | 'md' | 'lg';
5
6
  /**
@@ -16,19 +17,41 @@ export type TabsSize = 'sm' | 'md' | 'lg';
16
17
  * <TabsContent value="activity">…</TabsContent>
17
18
  * </Tabs>
18
19
  */
19
- export interface TabsProps extends ComponentPropsWithoutRef<typeof RadixTabs.Root> {
20
+ export interface TabsProps extends Omit<ComponentPropsWithoutRef<'div'>, 'dir'> {
21
+ /** Controlled active tab value. */
22
+ value?: string;
23
+ /** Uncontrolled initial active tab value. */
24
+ defaultValue?: string;
25
+ /** Fires when the active tab changes. */
26
+ onValueChange?: (value: string) => void;
27
+ /** Orientation of the tab list. Default: `horizontal`. */
28
+ orientation?: 'horizontal' | 'vertical';
29
+ /** Reading direction. */
30
+ dir?: 'ltr' | 'rtl';
31
+ /** Whether tabs activate on focus or only on click. Default: `automatic`. */
32
+ activationMode?: 'automatic' | 'manual';
33
+ /** Tab list and panels. */
34
+ children?: ReactNode;
20
35
  /** Visual style. Default: `line`. */
21
36
  variant?: TabsVariant;
22
37
  /** Size preset. Default: `md`. */
23
38
  size?: TabsSize;
39
+ /**
40
+ * One-off CSS, same as `Box`'s `sx`: each value may be a scalar or a
41
+ * responsive breakpoint map (`{ base, sm, md, lg, xl }`). Scalar-only sx
42
+ * merges into inline style; responsive sx injects a scoped class.
43
+ */
44
+ sx?: SxProp;
24
45
  }
25
46
  export declare const Tabs: import("react").ForwardRefExoticComponent<TabsProps & import("react").RefAttributes<HTMLDivElement>>;
26
47
  export declare const TabsList: import("react").ForwardRefExoticComponent<Omit<RadixTabs.TabsListProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
27
- export interface TabsTriggerProps extends ComponentPropsWithoutRef<typeof RadixTabs.Trigger> {
48
+ export interface TabsTriggerProps extends ComponentPropsWithoutRef<'button'> {
49
+ /** Value identifying which panel this trigger activates. */
50
+ value: string;
28
51
  /** Optional leading icon. */
29
- icon?: React.ReactNode;
52
+ icon?: ReactNode;
30
53
  /** Optional right-aligned badge (count, status). */
31
- badge?: React.ReactNode;
54
+ badge?: ReactNode;
32
55
  }
33
56
  export declare const TabsTrigger: import("react").ForwardRefExoticComponent<TabsTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
34
57
  export declare const TabsContent: import("react").ForwardRefExoticComponent<Omit<RadixTabs.TabsContentProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
@@ -1,4 +1,5 @@
1
1
  import type { ComponentPropsWithoutRef, ElementType, ForwardedRef, ReactElement } from 'react';
2
+ import type { SxProp } from '../Layout/sx';
2
3
  export type TextVariant = 'display' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'lead' | 'body' | 'small' | 'caption' | 'code' | 'kbd';
3
4
  export type TextWeight = 'regular' | 'medium' | 'semibold' | 'bold';
4
5
  export type TextAlign = 'left' | 'center' | 'right' | 'justify';
@@ -10,6 +11,12 @@ export type TextProps<E extends ElementType = ElementType> = Omit<ComponentProps
10
11
  align?: TextAlign;
11
12
  color?: TextColor;
12
13
  truncate?: boolean;
14
+ /**
15
+ * One-off CSS, same as `Box`'s `sx`: each value may be a scalar or a
16
+ * responsive breakpoint map (`{ base, sm, md, lg, xl }`). Scalar-only sx
17
+ * merges into inline style; responsive sx injects a scoped class.
18
+ */
19
+ sx?: SxProp;
13
20
  };
14
21
  /**
15
22
  * Text — typography primitive. `variant` picks the semantic element and the
@@ -1,4 +1,5 @@
1
1
  import type { TextareaHTMLAttributes } from 'react';
2
+ import type { SxProp } from '../Layout/sx';
2
3
  export type TextareaColor = 'primary' | 'danger' | 'warning' | 'success';
3
4
  export type TextareaSize = 'sm' | 'md' | 'lg';
4
5
  export interface TextareaProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'size'> {
@@ -8,6 +9,12 @@ export interface TextareaProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaE
8
9
  autoGrow?: boolean;
9
10
  /** With autoGrow, limits how tall the textarea can get. Default 12. */
10
11
  maxRows?: number;
12
+ /**
13
+ * One-off CSS, same as `Box`'s `sx`: each value may be a scalar or a
14
+ * responsive breakpoint map (`{ base, sm, md, lg, xl }`). Scalar-only sx
15
+ * merges into inline style; responsive sx injects a scoped class.
16
+ */
17
+ sx?: SxProp;
11
18
  }
12
19
  /** Auto-growing textarea. Measures scrollHeight on every change to set height. */
13
20
  export declare const Textarea: import("react").ForwardRefExoticComponent<TextareaProps & import("react").RefAttributes<HTMLTextAreaElement>>;
@@ -1,4 +1,5 @@
1
1
  import type { HTMLAttributes, ReactNode } from 'react';
2
+ import type { SxProp } from '../Layout/sx';
2
3
  export type TimelineDotColor = 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'neutral';
3
4
  /** Which side the content sits on relative to the central rail. */
4
5
  export type TimelinePosition = 'right' | 'left' | 'alternate';
@@ -13,6 +14,12 @@ export interface TimelineProps extends HTMLAttributes<HTMLOListElement> {
13
14
  orientation?: TimelineOrientation;
14
15
  /** Density preset. Default `'md'`. */
15
16
  size?: TimelineSize;
17
+ /**
18
+ * One-off CSS, same as `Box`'s `sx`: each value may be a scalar or a
19
+ * responsive breakpoint map (`{ base, sm, md, lg, xl }`). Scalar-only sx
20
+ * merges into inline style; responsive sx injects a scoped class.
21
+ */
22
+ sx?: SxProp;
16
23
  }
17
24
  export declare const Timeline: import("react").ForwardRefExoticComponent<TimelineProps & import("react").RefAttributes<HTMLOListElement>>;
18
25
  export type TimelineItemProps = HTMLAttributes<HTMLLIElement>;
@@ -1,4 +1,5 @@
1
1
  import type { ReactNode } from 'react';
2
+ import type { SxProp } from '../Layout/sx';
2
3
  export type ToastVariant = 'default' | 'success' | 'info' | 'warning' | 'danger' | 'loading';
3
4
  export type ToastPosition = 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
4
5
  export interface ToastOptions {
@@ -20,6 +21,12 @@ export interface ToastOptions {
20
21
  id?: string;
21
22
  /** Hide the close button. */
22
23
  dismissible?: boolean;
24
+ /**
25
+ * One-off CSS for this toast's root, same as `Box`'s `sx`: each value may be a
26
+ * scalar or a responsive breakpoint map (`{ base, sm, md, lg, xl }`).
27
+ * Scalar-only sx merges into inline style; responsive sx injects a scoped class.
28
+ */
29
+ sx?: SxProp;
23
30
  }
24
31
  export interface ToastInstance extends Required<Pick<ToastOptions, 'variant' | 'duration' | 'dismissible'>> {
25
32
  id: string;
@@ -28,6 +35,7 @@ export interface ToastInstance extends Required<Pick<ToastOptions, 'variant' | '
28
35
  action?: ReactNode;
29
36
  icon?: ReactNode | false;
30
37
  onDismiss?: () => void;
38
+ sx?: SxProp;
31
39
  /** Internal — flips to true when entering exit animation. */
32
40
  exiting?: boolean;
33
41
  }
@@ -1,5 +1,7 @@
1
1
  import type { ReactNode } from 'react';
2
+ import type { CSSProperties } from 'react';
2
3
  import * as RadixTooltip from '@radix-ui/react-tooltip';
4
+ import type { SxProp } from '../Layout/sx';
3
5
  /**
4
6
  * Tooltip provider — wrap your app once. Controls the global delay so the
5
7
  * first tooltip in a group has a longer delay, then subsequent tooltips
@@ -30,6 +32,14 @@ export interface TooltipProps {
30
32
  disabled?: boolean;
31
33
  /** Extra className on the popup. */
32
34
  contentClassName?: string;
35
+ /** Inline style on the tooltip bubble. */
36
+ contentStyle?: CSSProperties;
37
+ /**
38
+ * One-off CSS for the tooltip bubble, same as `Box`'s `sx`: each value may be
39
+ * a scalar or a responsive breakpoint map (`{ base, sm, md, lg, xl }`).
40
+ * Scalar-only sx merges into inline style; responsive sx injects a scoped class.
41
+ */
42
+ sx?: SxProp;
33
43
  }
34
44
  /**
35
45
  * Single-shot tooltip. Pass any element as `children` and it becomes the
@@ -1,4 +1,5 @@
1
1
  import type { HTMLAttributes, ReactNode } from 'react';
2
+ import type { SxProp } from '../Layout/sx';
2
3
  export interface TreeViewProps extends Omit<HTMLAttributes<HTMLUListElement>, 'onSelect'> {
3
4
  /** Controlled set of expanded item ids. */
4
5
  expandedIds?: string[];
@@ -16,6 +17,13 @@ export interface TreeViewProps extends Omit<HTMLAttributes<HTMLUListElement>, 'o
16
17
  onItemExpandToggle?: (id: string, expanded: boolean) => void;
17
18
  /** Auto folder/file icons for items without their own icon. Default `true`. */
18
19
  defaultIcons?: boolean;
20
+ /**
21
+ * One-off CSS, same as `Box`'s `sx`: each value may be a scalar or a
22
+ * responsive breakpoint map (`{ base, sm, md, lg, xl }`). Applied to the
23
+ * root tree container. Scalar-only sx merges into inline style; responsive
24
+ * sx injects a scoped class.
25
+ */
26
+ sx?: SxProp;
19
27
  }
20
28
  export declare const TreeView: import("react").ForwardRefExoticComponent<TreeViewProps & import("react").RefAttributes<HTMLUListElement>>;
21
29
  export interface TreeItemProps extends Omit<HTMLAttributes<HTMLLIElement>, 'id'> {