canny-ui-react 5.0.0 → 6.1.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 (57) hide show
  1. package/dist/components/Accordion/Accordion.d.ts +45 -16
  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/ToggleButtonGroup.d.ts +39 -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 +21 -3
  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 +16 -4
  20. package/dist/components/Drawer/Drawer.d.ts +16 -4
  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/Divider.d.ts +3 -0
  27. package/dist/components/Layout/Spacer.d.ts +5 -1
  28. package/dist/components/List/List.d.ts +7 -0
  29. package/dist/components/Menu/Menu.d.ts +34 -8
  30. package/dist/components/MultiSelect/MultiSelect.d.ts +12 -2
  31. package/dist/components/Navbar/Navbar.types.d.ts +7 -0
  32. package/dist/components/Pagination/Pagination.d.ts +9 -0
  33. package/dist/components/PanelGroup/PanelGroup.d.ts +7 -0
  34. package/dist/components/Popover/Popover.d.ts +17 -6
  35. package/dist/components/Progress/Progress.types.d.ts +13 -0
  36. package/dist/components/Radio/Radio.d.ts +24 -4
  37. package/dist/components/Scroll/Scroll.types.d.ts +7 -0
  38. package/dist/components/Select/Select.d.ts +27 -5
  39. package/dist/components/Sidebar/Sidebar.types.d.ts +7 -0
  40. package/dist/components/Skeleton/Skeleton.types.d.ts +7 -0
  41. package/dist/components/Slider/Slider.d.ts +7 -0
  42. package/dist/components/Stepper/Stepper.d.ts +7 -0
  43. package/dist/components/Switch/Switch.d.ts +20 -3
  44. package/dist/components/Tabs/Tabs.d.ts +19 -3
  45. package/dist/components/Text/Text.d.ts +7 -0
  46. package/dist/components/Textarea/Textarea.d.ts +7 -0
  47. package/dist/components/Timeline/Timeline.d.ts +7 -0
  48. package/dist/components/Toast/Toast.types.d.ts +8 -0
  49. package/dist/components/Tooltip/Tooltip.d.ts +33 -6
  50. package/dist/components/TreeView/TreeView.d.ts +8 -0
  51. package/dist/index.cjs +45 -45
  52. package/dist/index.cjs.map +1 -1
  53. package/dist/index.js +7410 -6974
  54. package/dist/index.js.map +1 -1
  55. package/dist/utils/primitiveProps.d.ts +94 -0
  56. package/dist/utils/withSx.d.ts +22 -0
  57. package/package.json +6 -5
@@ -1,25 +1,51 @@
1
1
  import type { ComponentPropsWithoutRef, ReactNode } from 'react';
2
- import * as AccordionPrimitive from '@radix-ui/react-accordion';
3
- type RootSingle = ComponentPropsWithoutRef<typeof AccordionPrimitive.Root> & {
2
+ import type { Direction } from '../../utils/primitiveProps';
3
+ import type { SxProp } from '../Layout/sx';
4
+ interface AccordionRootBase extends Omit<ComponentPropsWithoutRef<'div'>, 'defaultValue' | 'onChange' | 'dir'> {
5
+ /** Disable every item. */
6
+ disabled?: boolean;
7
+ /** Reading direction. */
8
+ dir?: Direction;
9
+ /** Layout axis. Default: `vertical`. */
10
+ orientation?: 'horizontal' | 'vertical';
11
+ }
12
+ type RootSingle = AccordionRootBase & {
4
13
  type: 'single';
14
+ /** Controlled open item. */
15
+ value?: string;
16
+ /** Uncontrolled initial open item. */
17
+ defaultValue?: string;
18
+ /** Fires when the open item changes. */
19
+ onValueChange?: (value: string) => void;
20
+ /** Allow closing the open item by clicking it again. */
21
+ collapsible?: boolean;
5
22
  };
6
- type RootMultiple = ComponentPropsWithoutRef<typeof AccordionPrimitive.Root> & {
23
+ type RootMultiple = AccordionRootBase & {
7
24
  type: 'multiple';
25
+ /** Controlled set of open items. */
26
+ value?: string[];
27
+ /** Uncontrolled initial set of open items. */
28
+ defaultValue?: string[];
29
+ /** Fires when the open set changes. */
30
+ onValueChange?: (value: string[]) => void;
8
31
  };
9
32
  export type AccordionProps = (RootSingle | RootMultiple) & {
10
33
  variant?: 'plain' | 'bordered' | 'separated';
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;
11
40
  };
12
- export declare const Accordion: import("react").ForwardRefExoticComponent<((Omit<AccordionPrimitive.AccordionSingleProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
13
- type: "single";
14
- } & {
15
- variant?: "plain" | "bordered" | "separated";
16
- }) | (Omit<AccordionPrimitive.AccordionMultipleProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
17
- type: "multiple";
18
- } & {
19
- variant?: "plain" | "bordered" | "separated";
20
- })) & import("react").RefAttributes<HTMLDivElement>>;
21
- export type AccordionItemProps = ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>;
22
- export declare const AccordionItem: import("react").ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionItemProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
41
+ export declare const Accordion: import("react").ForwardRefExoticComponent<AccordionProps & import("react").RefAttributes<HTMLDivElement>>;
42
+ export interface AccordionItemProps extends ComponentPropsWithoutRef<'div'> {
43
+ /** Value identifying this item. */
44
+ value: string;
45
+ /** Disables just this item. */
46
+ disabled?: boolean;
47
+ }
48
+ export declare const AccordionItem: import("react").ForwardRefExoticComponent<AccordionItemProps & import("react").RefAttributes<HTMLDivElement>>;
23
49
  export interface AccordionTriggerProps extends ComponentPropsWithoutRef<'button'> {
24
50
  /** Optional leading icon in the trigger row. */
25
51
  icon?: ReactNode;
@@ -27,6 +53,9 @@ export interface AccordionTriggerProps extends ComponentPropsWithoutRef<'button'
27
53
  hideIndicator?: boolean;
28
54
  }
29
55
  export declare const AccordionTrigger: import("react").ForwardRefExoticComponent<AccordionTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
30
- export type AccordionContentProps = ComponentPropsWithoutRef<typeof AccordionPrimitive.Content>;
31
- export declare const AccordionContent: import("react").ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionContentProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
56
+ export interface AccordionContentProps extends ComponentPropsWithoutRef<'div'> {
57
+ /** Keep mounted while collapsed (useful for animations). */
58
+ forceMount?: true;
59
+ }
60
+ export declare const AccordionContent: import("react").ForwardRefExoticComponent<AccordionContentProps & import("react").RefAttributes<HTMLDivElement>>;
32
61
  export {};
@@ -1,8 +1,15 @@
1
1
  import type { HTMLAttributes, ReactNode } from 'react';
2
+ import type { SxProp } from '../Layout/sx';
2
3
  export type AlertColor = 'info' | 'success' | 'warning' | 'danger';
3
4
  export interface AlertProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
4
5
  color?: AlertColor;
5
6
  solid?: boolean;
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.
11
+ */
12
+ sx?: SxProp;
6
13
  title?: ReactNode;
7
14
  children?: ReactNode;
8
15
  /** Custom icon node. Pass `false` to hide the default icon. */
@@ -1,4 +1,5 @@
1
- import type { ReactNode } from 'react';
1
+ import type { CSSProperties, ReactNode } from 'react';
2
+ import type { SxProp } from '../Layout/sx';
2
3
  export interface AutocompleteOption {
3
4
  /** Stable identifier — what gets stored in `value`. */
4
5
  value: string;
@@ -46,6 +47,15 @@ interface AutocompleteBase {
46
47
  'aria-label'?: string;
47
48
  /** Custom className on the trigger. */
48
49
  className?: string;
50
+ /** Inline style applied to the trigger (the inline field). */
51
+ style?: CSSProperties;
52
+ /**
53
+ * One-off CSS, same as `Box`'s `sx`: each value may be a scalar or a
54
+ * responsive breakpoint map (`{ base, sm, md, lg, xl }`). Applied to the
55
+ * trigger. Scalar-only sx merges into inline style; responsive sx injects
56
+ * a scoped class.
57
+ */
58
+ sx?: SxProp;
49
59
  }
50
60
  export interface AutocompleteSingleProps extends AutocompleteBase {
51
61
  multiple?: false;
@@ -1,4 +1,5 @@
1
1
  import type { HTMLAttributes, ReactNode } from 'react';
2
+ import type { SxProp } from '../Layout/sx';
2
3
  export type AvatarSize = 'xs' | 'sm' | 'md' | 'lg';
3
4
  export type AvatarStatus = 'online' | 'busy' | 'offline';
4
5
  export interface AvatarProps extends HTMLAttributes<HTMLSpanElement> {
@@ -6,6 +7,12 @@ export interface AvatarProps extends HTMLAttributes<HTMLSpanElement> {
6
7
  status?: AvatarStatus;
7
8
  src?: string;
8
9
  alt?: string;
10
+ /**
11
+ * One-off CSS, same as `Box`'s `sx`: each value may be a scalar or a
12
+ * responsive breakpoint map (`{ base, sm, md, lg, xl }`). Scalar-only sx
13
+ * merges into inline style; responsive sx injects a scoped class.
14
+ */
15
+ sx?: SxProp;
9
16
  children?: ReactNode;
10
17
  }
11
18
  export interface AvatarStackProps extends HTMLAttributes<HTMLDivElement> {
@@ -1,4 +1,5 @@
1
1
  import type { HTMLAttributes, ReactNode } from 'react';
2
+ import type { SxProp } from '../Layout/sx';
2
3
  export type BadgeColor = 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'neutral';
3
4
  export type BadgePlacement = 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left';
4
5
  export interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {
@@ -16,6 +17,12 @@ export interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {
16
17
  placement?: BadgePlacement;
17
18
  /** Render the indicator inline with no anchored child. */
18
19
  standalone?: 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 }`). Scalar-only sx
23
+ * merges into inline style; responsive sx injects a scoped class.
24
+ */
25
+ sx?: SxProp;
19
26
  children?: ReactNode;
20
27
  }
21
28
  export declare const Badge: import("react").ForwardRefExoticComponent<BadgeProps & import("react").RefAttributes<HTMLSpanElement>>;
@@ -1,4 +1,5 @@
1
1
  import type { HTMLAttributes, ReactNode } from 'react';
2
+ import type { SxProp } from '../Layout/sx';
2
3
  export interface BreadcrumbItem {
3
4
  label: ReactNode;
4
5
  href?: string;
@@ -10,5 +11,11 @@ export interface BreadcrumbProps extends Omit<HTMLAttributes<HTMLElement>, 'chil
10
11
  /** Separator node between items. Default: chevron. */
11
12
  separator?: ReactNode;
12
13
  size?: 'sm' | 'md';
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
  export declare const Breadcrumb: import("react").ForwardRefExoticComponent<BreadcrumbProps & import("react").RefAttributes<HTMLElement>>;
@@ -1,4 +1,5 @@
1
1
  import type { ButtonHTMLAttributes, ReactNode } from 'react';
2
+ import type { SxProp } from '../Layout/sx';
2
3
  export type ButtonVariant = 'solid' | 'secondary' | 'outline' | 'dashed' | 'ghost' | 'soft' | 'link';
3
4
  export type ButtonColor = 'primary' | 'danger' | 'warning' | 'success' | 'info';
4
5
  export type ButtonSize = 'sm' | 'md' | 'lg';
@@ -23,5 +24,11 @@ export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
23
24
  iconPosition?: ButtonIconPosition;
24
25
  /** Disable the MUI-style click ripple. Default: `false`. */
25
26
  disableRipple?: boolean;
27
+ /**
28
+ * One-off CSS, same as `Box`'s `sx`: each value may be a scalar or a
29
+ * responsive breakpoint map (`{ base, sm, md, lg, xl }`). Scalar-only sx
30
+ * merges into inline style; responsive sx injects a scoped class.
31
+ */
32
+ sx?: SxProp;
26
33
  children?: ReactNode;
27
34
  }
@@ -1,8 +1,43 @@
1
- import type { ComponentPropsWithoutRef, ReactNode } from 'react';
2
- import { Root as RadixToggleGroup, Item as RadixToggleGroupItem } from '@radix-ui/react-toggle-group';
1
+ import type { ButtonHTMLAttributes, HTMLAttributes, ReactNode } from 'react';
2
+ import type { Direction } from '../../utils/primitiveProps';
3
3
  import type { ButtonColor, ButtonShape, ButtonSize, ButtonVariant } from './Button.types';
4
- type GroupRootProps = ComponentPropsWithoutRef<typeof RadixToggleGroup>;
5
- type GroupItemProps = ComponentPropsWithoutRef<typeof RadixToggleGroupItem>;
4
+ interface GroupRootBase extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue' | 'dir'> {
5
+ /** Disable every item in the group. */
6
+ disabled?: boolean;
7
+ /** Reading direction. */
8
+ dir?: Direction;
9
+ /** Layout axis. Default: `horizontal`. */
10
+ orientation?: 'horizontal' | 'vertical';
11
+ /** Allow arrow-key navigation to wrap around. Default: true. */
12
+ loop?: boolean;
13
+ /** Keep at least one item pressed. */
14
+ rovingFocus?: boolean;
15
+ }
16
+ type GroupSingle = GroupRootBase & {
17
+ type?: 'single';
18
+ /** Controlled pressed value. */
19
+ value?: string;
20
+ /** Uncontrolled initial pressed value. */
21
+ defaultValue?: string;
22
+ /** Fires when the pressed value changes. */
23
+ onValueChange?: (value: string) => void;
24
+ };
25
+ type GroupMultiple = GroupRootBase & {
26
+ type: 'multiple';
27
+ /** Controlled set of pressed values. */
28
+ value?: string[];
29
+ /** Uncontrolled initial set of pressed values. */
30
+ defaultValue?: string[];
31
+ /** Fires when the pressed set changes. */
32
+ onValueChange?: (value: string[]) => void;
33
+ };
34
+ type GroupRootProps = GroupSingle | GroupMultiple;
35
+ interface GroupItemProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'value' | 'type'> {
36
+ /** Value identifying this item within the group. */
37
+ value: string;
38
+ /** Disables just this item. */
39
+ disabled?: boolean;
40
+ }
6
41
  type GroupVariant = Extract<ButtonVariant, 'ghost' | 'outline' | 'soft' | 'dashed'>;
7
42
  export type ToggleButtonGroupProps = GroupRootProps & {
8
43
  variant?: GroupVariant;
@@ -1,6 +1,13 @@
1
1
  import type { HTMLAttributes, ReactNode } from 'react';
2
+ import type { SxProp } from '../Layout/sx';
2
3
  export type CardColor = 'default' | 'danger' | 'warning' | 'success' | 'info';
3
4
  export interface CardProps extends HTMLAttributes<HTMLDivElement> {
4
5
  color?: CardColor;
6
+ /**
7
+ * One-off CSS, same as `Box`'s `sx`: each value may be a scalar or a
8
+ * responsive breakpoint map (`{ base, sm, md, lg, xl }`). Scalar-only sx
9
+ * merges into inline style; responsive sx injects a scoped class.
10
+ */
11
+ sx?: SxProp;
5
12
  children: ReactNode;
6
13
  }
@@ -1,4 +1,6 @@
1
1
  import type { ReactNode } from 'react';
2
+ import type { CSSProperties } from 'react';
3
+ import type { SxProp } from '../Layout/sx';
2
4
  export interface BarSeries {
3
5
  /** Key into each datum for this series' value. */
4
6
  key: string;
@@ -27,5 +29,13 @@ export interface BarChartProps<D extends Record<string, unknown> = Record<string
27
29
  datum: D;
28
30
  }) => ReactNode;
29
31
  className?: string;
32
+ style?: CSSProperties;
33
+ /**
34
+ * One-off CSS, same as `Box`'s `sx`: each value may be a scalar or a
35
+ * responsive breakpoint map (`{ base, sm, md, lg, xl }`). Scalar-only sx
36
+ * merges into inline style; responsive sx injects a scoped class. Applied to
37
+ * the chart's outer container.
38
+ */
39
+ sx?: SxProp;
30
40
  }
31
- export declare function BarChart<D extends Record<string, unknown>>({ data, xKey, series, height, stacked, grid, legend, yTickFormatter, xTickFormatter, renderTooltip, className, }: BarChartProps<D>): import("react/jsx-runtime").JSX.Element;
41
+ export declare function BarChart<D extends Record<string, unknown>>({ data, xKey, series, height, stacked, grid, legend, yTickFormatter, xTickFormatter, renderTooltip, className, style, sx, }: BarChartProps<D>): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,6 @@
1
1
  import type { ReactNode } from 'react';
2
+ import type { CSSProperties } from 'react';
3
+ import type { SxProp } from '../Layout/sx';
2
4
  import type { BarSeries } from './BarChart';
3
5
  export interface LineChartProps<D extends Record<string, unknown> = Record<string, unknown>> {
4
6
  data: D[];
@@ -20,6 +22,14 @@ export interface LineChartProps<D extends Record<string, unknown> = Record<strin
20
22
  datum: D;
21
23
  }) => ReactNode;
22
24
  className?: string;
25
+ style?: CSSProperties;
26
+ /**
27
+ * One-off CSS, same as `Box`'s `sx`: each value may be a scalar or a
28
+ * responsive breakpoint map (`{ base, sm, md, lg, xl }`). Scalar-only sx
29
+ * merges into inline style; responsive sx injects a scoped class. Applied to
30
+ * the chart's outer container.
31
+ */
32
+ sx?: SxProp;
23
33
  }
24
34
  export declare function LineChart<D extends Record<string, unknown>>(props: LineChartProps<D>): import("react/jsx-runtime").JSX.Element;
25
35
  export declare function AreaChart<D extends Record<string, unknown>>(props: LineChartProps<D>): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,6 @@
1
1
  import type { ReactNode } from 'react';
2
+ import type { CSSProperties } from 'react';
3
+ import type { SxProp } from '../Layout/sx';
2
4
  export interface PieDatum {
3
5
  label: string;
4
6
  value: number;
@@ -18,5 +20,13 @@ export interface PieChartProps {
18
20
  /** Center label (e.g. a total) for donut charts. */
19
21
  centerLabel?: ReactNode;
20
22
  className?: string;
23
+ style?: CSSProperties;
24
+ /**
25
+ * One-off CSS, same as `Box`'s `sx`: each value may be a scalar or a
26
+ * responsive breakpoint map (`{ base, sm, md, lg, xl }`). Scalar-only sx
27
+ * merges into inline style; responsive sx injects a scoped class. Applied to
28
+ * the chart's outer container.
29
+ */
30
+ sx?: SxProp;
21
31
  }
22
- export declare function PieChart({ data, height, innerRadius, legend, renderTooltip, centerLabel, className, }: PieChartProps): import("react/jsx-runtime").JSX.Element;
32
+ export declare function PieChart({ data, height, innerRadius, legend, renderTooltip, centerLabel, className, style, sx, }: PieChartProps): import("react/jsx-runtime").JSX.Element;
@@ -1,12 +1,21 @@
1
- import type { ReactNode } from 'react';
1
+ import type { CSSProperties, ReactNode } from 'react';
2
+ import type { SxProp } from '../Layout/sx';
2
3
  export interface ResponsiveContainerProps {
3
4
  /** Chart height in px. */
4
5
  height?: number;
5
6
  children: ReactNode;
6
7
  className?: string;
8
+ style?: CSSProperties;
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. Applied to
13
+ * the sizing wrapper.
14
+ */
15
+ sx?: SxProp;
7
16
  }
8
17
  /**
9
18
  * Sizing wrapper kept for `recharts` compatibility. Canny charts already fill
10
19
  * their parent's width; this passes `height` down and stretches to 100% width.
11
20
  */
12
- export declare function ResponsiveContainer({ height, children, className }: ResponsiveContainerProps): import("react/jsx-runtime").JSX.Element;
21
+ export declare function ResponsiveContainer({ height, children, className, style, sx, }: ResponsiveContainerProps): import("react/jsx-runtime").JSX.Element;
@@ -1,9 +1,27 @@
1
- import type { ComponentPropsWithoutRef, ReactNode } from 'react';
2
- import * as RadixCheckbox from '@radix-ui/react-checkbox';
3
- type CheckboxRootProps = ComponentPropsWithoutRef<typeof RadixCheckbox.Root>;
1
+ import type { ButtonHTMLAttributes, ReactNode } from 'react';
2
+ import type { FormControlProps } from '../../utils/primitiveProps';
3
+ import type { SxProp } from '../Layout/sx';
4
+ export type CheckedState = boolean | 'indeterminate';
5
+ interface CheckboxRootProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'value' | 'onChange' | 'checked' | 'defaultChecked' | 'type'>, FormControlProps {
6
+ /** Controlled checked state; `'indeterminate'` renders the dash. */
7
+ checked?: CheckedState;
8
+ /** Uncontrolled initial checked state. */
9
+ defaultChecked?: CheckedState;
10
+ /** Fires when the checked state changes. */
11
+ onCheckedChange?: (checked: CheckedState) => void;
12
+ /** Value submitted with the form when checked. Default: `'on'`. */
13
+ value?: string;
14
+ }
4
15
  export interface CheckboxProps extends Omit<CheckboxRootProps, 'children'> {
5
16
  /** Label text or node rendered next to the box. */
6
17
  children?: ReactNode;
18
+ /**
19
+ * One-off CSS, same as `Box`'s `sx`: each value may be a scalar or a
20
+ * responsive breakpoint map (`{ base, sm, md, lg, xl }`). Scalar-only sx
21
+ * merges into inline style; responsive sx injects a scoped class. Applied to
22
+ * the outer label wrapper, or the checkbox itself when there is no label.
23
+ */
24
+ sx?: SxProp;
7
25
  }
8
26
  /** Accessible checkbox — tri-state (`checked | 'indeterminate' | false`). */
9
27
  export declare const Checkbox: import("react").ForwardRefExoticComponent<CheckboxProps & import("react").RefAttributes<HTMLButtonElement>>;
@@ -1,4 +1,5 @@
1
1
  import type { HTMLAttributes, MouseEventHandler, ReactNode } from 'react';
2
+ import type { SxProp } from '../Layout/sx';
2
3
  export type ChipColor = 'default' | 'primary' | 'success' | 'info' | 'warning' | 'danger';
3
4
  export type ChipSize = 'sm' | 'md';
4
5
  export type ChipVariant = 'soft' | 'outline' | 'solid';
@@ -21,6 +22,12 @@ export interface ChipProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'onSele
21
22
  onClick?: MouseEventHandler<HTMLSpanElement>;
22
23
  /** Disabled visual + non-interactive. */
23
24
  disabled?: boolean;
25
+ /**
26
+ * One-off CSS, same as `Box`'s `sx`: each value may be a scalar or a
27
+ * responsive breakpoint map (`{ base, sm, md, lg, xl }`). Scalar-only sx
28
+ * merges into inline style; responsive sx injects a scoped class.
29
+ */
30
+ sx?: SxProp;
24
31
  /** The chip's text/content. */
25
32
  children: ReactNode;
26
33
  }
@@ -1,4 +1,5 @@
1
- import type { ReactNode } from 'react';
1
+ import type { CSSProperties, ReactNode } from 'react';
2
+ import type { SxProp } from '../Layout/sx';
2
3
  export interface ConfirmDialogProps {
3
4
  /** Controlled open state. */
4
5
  open: boolean;
@@ -23,9 +24,18 @@ export interface ConfirmDialogProps {
23
24
  /** Fired when the cancel button is clicked (before close). */
24
25
  onCancel?: () => void;
25
26
  className?: string;
27
+ /** Inline style forwarded to the underlying Dialog content panel. */
28
+ style?: CSSProperties;
29
+ /**
30
+ * One-off CSS forwarded to the underlying Dialog content panel, same as
31
+ * `Box`'s `sx`: each value may be a scalar or a responsive breakpoint map
32
+ * (`{ base, sm, md, lg, xl }`). Scalar-only sx merges into inline style;
33
+ * responsive sx injects a scoped class.
34
+ */
35
+ sx?: SxProp;
26
36
  }
27
37
  /**
28
38
  * ConfirmDialog — a small Dialog preset for destructive / confirmation prompts.
29
39
  * Composes the base `Dialog` and `Button`.
30
40
  */
31
- export declare function ConfirmDialog({ open, onOpenChange, title, message, children, confirmLabel, cancelLabel, danger, loading, onConfirm, onCancel, className, }: ConfirmDialogProps): import("react/jsx-runtime").JSX.Element;
41
+ export declare function ConfirmDialog({ open, onOpenChange, title, message, children, confirmLabel, cancelLabel, danger, loading, onConfirm, onCancel, className, style, sx, }: ConfirmDialogProps): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,5 @@
1
- import type { ReactElement, ReactNode, Ref } from 'react';
1
+ import type { CSSProperties, ReactElement, ReactNode, Ref } from 'react';
2
+ import type { SxProp } from '../Layout/sx';
2
3
  export type DataTableAlign = 'left' | 'center' | 'right';
3
4
  export type RowId = string | number;
4
5
  export interface DataTableColumn<R = Record<string, unknown>> {
@@ -63,6 +64,15 @@ export interface DataTableProps<R = Record<string, unknown>> {
63
64
  /** Turn off column resizing for every column. */
64
65
  disableColumnResize?: boolean;
65
66
  className?: string;
67
+ /** Inline style applied to the outer table container. */
68
+ style?: CSSProperties;
69
+ /**
70
+ * One-off CSS, same as `Box`'s `sx`: each value may be a scalar or a
71
+ * responsive breakpoint map (`{ base, sm, md, lg, xl }`). Applied to the
72
+ * outer table container. Scalar-only sx merges into inline style; responsive
73
+ * sx injects a scoped class.
74
+ */
75
+ sx?: SxProp;
66
76
  }
67
77
  export declare const DataTable: <R = Record<string, unknown>>(props: DataTableProps<R> & {
68
78
  ref?: Ref<HTMLDivElement>;
@@ -1,4 +1,5 @@
1
1
  import type { HTMLAttributes, ReactNode } from 'react';
2
+ import type { SxProp } from '../Layout/sx';
2
3
  import type { WeekDay } from './dateUtils';
3
4
  export type DatePickerSize = 'sm' | 'md' | 'lg';
4
5
  export type DatePickerColor = 'primary' | 'danger' | 'warning' | 'success';
@@ -80,4 +81,11 @@ export interface DatePickerProps extends Omit<HTMLAttributes<HTMLDivElement>, 'o
80
81
  open?: boolean;
81
82
  /** Called when open state changes. */
82
83
  onOpenChange?: (open: boolean) => void;
84
+ /**
85
+ * One-off CSS, same as `Box`'s `sx`: each value may be a scalar or a
86
+ * responsive breakpoint map (`{ base, sm, md, lg, xl }`). Applied to the
87
+ * outer field wrapper (not the popover calendar). Scalar-only sx merges into
88
+ * inline style; responsive sx injects a scoped class.
89
+ */
90
+ sx?: SxProp;
83
91
  }
@@ -1,5 +1,7 @@
1
- import type { ReactNode } from 'react';
2
- import * as RadixDialog from '@radix-ui/react-dialog';
1
+ import type { FC, ReactNode } from 'react';
2
+ import type { TriggerProps } from '../../utils/primitiveProps';
3
+ import type { SxProp } from '../Layout/sx';
4
+ import type { CSSProperties } from 'react';
3
5
  export type DialogSize = 'sm' | 'md' | 'lg' | 'xl' | 'full';
4
6
  export interface DialogProps {
5
7
  /** Controlled open state. */
@@ -24,6 +26,14 @@ export interface DialogProps {
24
26
  hideClose?: boolean;
25
27
  /** Extra className on the dialog content. */
26
28
  className?: string;
29
+ /** Inline style on the dialog content panel. */
30
+ style?: CSSProperties;
31
+ /**
32
+ * One-off CSS for the dialog content panel, same as `Box`'s `sx`: each value
33
+ * may be a scalar or a responsive breakpoint map (`{ base, sm, md, lg, xl }`).
34
+ * Scalar-only sx merges into inline style; responsive sx injects a scoped class.
35
+ */
36
+ sx?: SxProp;
27
37
  }
28
38
  /**
29
39
  * Modal dialog built on @radix-ui/react-dialog. Includes a backdrop, focus trap,
@@ -37,6 +47,8 @@ export interface DialogProps {
37
47
  */
38
48
  export declare const Dialog: import("react").ForwardRefExoticComponent<DialogProps & import("react").RefAttributes<HTMLDivElement>>;
39
49
  /** Trigger button to open a Dialog when wired with a controlled root. */
40
- export declare const DialogTrigger: import("react").ForwardRefExoticComponent<RadixDialog.DialogTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
50
+ export type DialogTriggerProps = TriggerProps;
51
+ export declare const DialogTrigger: FC<DialogTriggerProps>;
41
52
  /** Close button — typically used inside the body or footer. */
42
- export declare const DialogClose: import("react").ForwardRefExoticComponent<RadixDialog.DialogCloseProps & import("react").RefAttributes<HTMLButtonElement>>;
53
+ export type DialogCloseProps = TriggerProps;
54
+ export declare const DialogClose: FC<DialogCloseProps>;
@@ -1,5 +1,7 @@
1
- import type { ReactNode } from 'react';
2
- import * as RadixDialog from '@radix-ui/react-dialog';
1
+ import type { FC, ReactNode } from 'react';
2
+ import type { TriggerProps } from '../../utils/primitiveProps';
3
+ import type { SxProp } from '../Layout/sx';
4
+ import type { CSSProperties } from 'react';
3
5
  export type DrawerSide = 'left' | 'right' | 'top' | 'bottom';
4
6
  export type DrawerSize = 'sm' | 'md' | 'lg' | 'xl';
5
7
  export interface DrawerProps {
@@ -27,6 +29,14 @@ export interface DrawerProps {
27
29
  hideClose?: boolean;
28
30
  /** Extra className on the drawer content. */
29
31
  className?: string;
32
+ /** Inline style on the drawer content panel. */
33
+ style?: CSSProperties;
34
+ /**
35
+ * One-off CSS for the drawer content panel, same as `Box`'s `sx`: each value
36
+ * may be a scalar or a responsive breakpoint map (`{ base, sm, md, lg, xl }`).
37
+ * Scalar-only sx merges into inline style; responsive sx injects a scoped class.
38
+ */
39
+ sx?: SxProp;
30
40
  }
31
41
  /**
32
42
  * Off-canvas drawer / sheet. Slides in from any edge. Built on
@@ -39,5 +49,7 @@ export interface DrawerProps {
39
49
  * </Drawer>
40
50
  */
41
51
  export declare const Drawer: import("react").ForwardRefExoticComponent<DrawerProps & import("react").RefAttributes<HTMLDivElement>>;
42
- export declare const DrawerTrigger: import("react").ForwardRefExoticComponent<RadixDialog.DialogTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
43
- export declare const DrawerClose: import("react").ForwardRefExoticComponent<RadixDialog.DialogCloseProps & import("react").RefAttributes<HTMLButtonElement>>;
52
+ export type DrawerTriggerProps = TriggerProps;
53
+ export declare const DrawerTrigger: FC<DrawerTriggerProps>;
54
+ export type DrawerCloseProps = TriggerProps;
55
+ export declare const DrawerClose: FC<DrawerCloseProps>;
@@ -1,4 +1,5 @@
1
1
  import type { HTMLAttributes, ReactElement, ReactNode } from 'react';
2
+ import type { SxProp } from '../Layout/sx';
2
3
  export type FieldValidationState = 'default' | 'danger' | 'warning' | 'success';
3
4
  export interface FieldProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
4
5
  /** Label text. */
@@ -17,6 +18,13 @@ export interface FieldProps extends Omit<HTMLAttributes<HTMLDivElement>, 'childr
17
18
  maxLength?: number;
18
19
  /** Override validation styling explicitly. */
19
20
  state?: FieldValidationState;
21
+ /**
22
+ * One-off CSS, same as `Box`'s `sx`: each value may be a scalar or a
23
+ * responsive breakpoint map (`{ base, sm, md, lg, xl }`). Scalar-only sx
24
+ * merges into inline style; responsive sx injects a scoped class. Applied
25
+ * to the outer field wrapper.
26
+ */
27
+ sx?: SxProp;
20
28
  /** Single form control element. The `id` is threaded to the label and aria-describedby. */
21
29
  children: ReactElement;
22
30
  }
@@ -28,4 +36,4 @@ export interface FieldProps extends Omit<HTMLAttributes<HTMLDivElement>, 'childr
28
36
  * • ARIA wiring: `htmlFor`, `aria-describedby`, `aria-invalid`
29
37
  * • Validation state propagation to the child control via className
30
38
  */
31
- export declare function Field({ label, hint, error, required, optional, counter, maxLength, state, className, children, ...rest }: FieldProps): import("react/jsx-runtime").JSX.Element;
39
+ export declare function Field({ label, hint, error, required, optional, counter, maxLength, state, className, style, sx, children, ...rest }: FieldProps): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,5 @@
1
- import type { ReactNode } from 'react';
1
+ import type { CSSProperties, ReactNode } from 'react';
2
+ import type { SxProp } from '../Layout/sx';
2
3
  import type { FileRejection, UseFileDropOptions } from './useFileDrop';
3
4
  export interface FileUploaderProps extends Omit<UseFileDropOptions, 'onDrop' | 'onDropAccepted' | 'onDropRejected'> {
4
5
  /** Fired with `(accepted, rejected)` after each drop or browse. */
@@ -15,5 +16,13 @@ export interface FileUploaderProps extends Omit<UseFileDropOptions, 'onDrop' | '
15
16
  buttonLabel?: ReactNode | false;
16
17
  size?: 'sm' | 'md';
17
18
  className?: string;
19
+ /** Inline style applied to the dropzone root. */
20
+ style?: CSSProperties;
21
+ /**
22
+ * One-off CSS, same as `Box`'s `sx`: each value may be a scalar or a
23
+ * responsive breakpoint map (`{ base, sm, md, lg, xl }`). Scalar-only sx
24
+ * merges into inline style; responsive sx injects a scoped class.
25
+ */
26
+ sx?: SxProp;
18
27
  }
19
28
  export declare const FileUploader: import("react").ForwardRefExoticComponent<FileUploaderProps & import("react").RefAttributes<HTMLDivElement>>;