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
1
  import type { ComponentPropsWithoutRef, ReactNode } from 'react';
2
2
  import * as AccordionPrimitive from '@radix-ui/react-accordion';
3
+ import type { SxProp } from '../Layout/sx';
3
4
  type RootSingle = ComponentPropsWithoutRef<typeof AccordionPrimitive.Root> & {
4
5
  type: 'single';
5
6
  };
@@ -8,19 +9,37 @@ type RootMultiple = ComponentPropsWithoutRef<typeof AccordionPrimitive.Root> & {
8
9
  };
9
10
  export type AccordionProps = (RootSingle | RootMultiple) & {
10
11
  variant?: 'plain' | 'bordered' | 'separated';
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
  export declare const Accordion: import("react").ForwardRefExoticComponent<((Omit<AccordionPrimitive.AccordionSingleProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
13
20
  type: "single";
14
21
  } & {
15
22
  variant?: "plain" | "bordered" | "separated";
23
+ /**
24
+ * One-off CSS, same as `Box`'s `sx`: each value may be a scalar or a
25
+ * responsive breakpoint map (`{ base, sm, md, lg, xl }`). Scalar-only sx
26
+ * merges into inline style; responsive sx injects a scoped class.
27
+ */
28
+ sx?: SxProp;
16
29
  }) | (Omit<AccordionPrimitive.AccordionMultipleProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
17
30
  type: "multiple";
18
31
  } & {
19
32
  variant?: "plain" | "bordered" | "separated";
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.
37
+ */
38
+ sx?: SxProp;
20
39
  })) & import("react").RefAttributes<HTMLDivElement>>;
21
40
  export type AccordionItemProps = ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>;
22
41
  export declare const AccordionItem: import("react").ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionItemProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
23
- export interface AccordionTriggerProps extends ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger> {
42
+ export interface AccordionTriggerProps extends ComponentPropsWithoutRef<'button'> {
24
43
  /** Optional leading icon in the trigger row. */
25
44
  icon?: ReactNode;
26
45
  /** Hide the chevron indicator. */
@@ -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,12 @@
1
1
  import type { ComponentPropsWithoutRef, ReactNode } from 'react';
2
- import { Root as RadixToggle } from '@radix-ui/react-toggle';
3
2
  import type { ButtonColor, ButtonShape, ButtonSize, ButtonVariant } from './Button.types';
4
- type RadixToggleProps = ComponentPropsWithoutRef<typeof RadixToggle>;
5
- export interface ToggleButtonProps extends Omit<RadixToggleProps, 'asChild'> {
3
+ export interface ToggleButtonProps extends ComponentPropsWithoutRef<'button'> {
4
+ /** Controlled pressed state. */
5
+ pressed?: boolean;
6
+ /** Uncontrolled initial pressed state. */
7
+ defaultPressed?: boolean;
8
+ /** Fires when the pressed state changes. */
9
+ onPressedChange?: (pressed: boolean) => void;
6
10
  variant?: Extract<ButtonVariant, 'ghost' | 'outline' | 'soft' | 'dashed'>;
7
11
  color?: ButtonColor;
8
12
  size?: ButtonSize;
@@ -15,4 +19,3 @@ export interface ToggleButtonProps extends Omit<RadixToggleProps, 'asChild'> {
15
19
  * Handles `aria-pressed` / `data-state` natively; CSS hooks into both.
16
20
  */
17
21
  export declare const ToggleButton: import("react").ForwardRefExoticComponent<ToggleButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
18
- export {};
@@ -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,17 @@
1
1
  import type { ComponentPropsWithoutRef, ReactNode } from 'react';
2
2
  import * as RadixCheckbox from '@radix-ui/react-checkbox';
3
+ import type { SxProp } from '../Layout/sx';
3
4
  type CheckboxRootProps = ComponentPropsWithoutRef<typeof RadixCheckbox.Root>;
4
5
  export interface CheckboxProps extends Omit<CheckboxRootProps, 'children'> {
5
6
  /** Label text or node rendered next to the box. */
6
7
  children?: ReactNode;
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. Applied to
12
+ * the outer label wrapper, or the checkbox itself when there is no label.
13
+ */
14
+ sx?: SxProp;
7
15
  }
8
16
  /** Accessible checkbox — tri-state (`checked | 'indeterminate' | false`). */
9
17
  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,7 +1,17 @@
1
- import type { ComponentPropsWithoutRef, ReactNode } from 'react';
1
+ import type { ReactNode } from 'react';
2
2
  import * as RadixDialog from '@radix-ui/react-dialog';
3
+ import type { SxProp } from '../Layout/sx';
4
+ import type { CSSProperties } from 'react';
3
5
  export type DialogSize = 'sm' | 'md' | 'lg' | 'xl' | 'full';
4
- export interface DialogProps extends ComponentPropsWithoutRef<typeof RadixDialog.Root> {
6
+ export interface DialogProps {
7
+ /** Controlled open state. */
8
+ open?: boolean;
9
+ /** Uncontrolled initial open state. */
10
+ defaultOpen?: boolean;
11
+ /** Fires when the open state changes (Esc, backdrop, or close button). */
12
+ onOpenChange?: (open: boolean) => void;
13
+ /** Whether the dialog blocks interaction with the rest of the page. Default: true. */
14
+ modal?: boolean;
5
15
  /** Title rendered as the visible h2. Required for accessibility. */
6
16
  title: ReactNode;
7
17
  /** Optional descriptive subhead under the title. */
@@ -16,6 +26,14 @@ export interface DialogProps extends ComponentPropsWithoutRef<typeof RadixDialog
16
26
  hideClose?: boolean;
17
27
  /** Extra className on the dialog content. */
18
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;
19
37
  }
20
38
  /**
21
39
  * Modal dialog built on @radix-ui/react-dialog. Includes a backdrop, focus trap,
@@ -1,8 +1,18 @@
1
- import type { ComponentPropsWithoutRef, ReactNode } from 'react';
1
+ import type { ReactNode } from 'react';
2
2
  import * as RadixDialog from '@radix-ui/react-dialog';
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
- export interface DrawerProps extends ComponentPropsWithoutRef<typeof RadixDialog.Root> {
7
+ export interface DrawerProps {
8
+ /** Controlled open state. */
9
+ open?: boolean;
10
+ /** Uncontrolled initial open state. */
11
+ defaultOpen?: boolean;
12
+ /** Fires when the open state changes (Esc, backdrop, or close button). */
13
+ onOpenChange?: (open: boolean) => void;
14
+ /** Whether the drawer blocks interaction with the rest of the page. Default: true. */
15
+ modal?: boolean;
6
16
  /** Visible heading for the drawer. Required for AT. */
7
17
  title: ReactNode;
8
18
  /** Optional subhead under the title. */
@@ -19,6 +29,14 @@ export interface DrawerProps extends ComponentPropsWithoutRef<typeof RadixDialog
19
29
  hideClose?: boolean;
20
30
  /** Extra className on the drawer content. */
21
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;
22
40
  }
23
41
  /**
24
42
  * Off-canvas drawer / sheet. Slides in from any edge. Built on
@@ -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>>;