canny-ui-react 5.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.
- package/dist/components/Accordion/Accordion.d.ts +19 -0
- package/dist/components/Alert/Alert.types.d.ts +7 -0
- package/dist/components/Autocomplete/Autocomplete.types.d.ts +11 -1
- package/dist/components/Avatar/Avatar.types.d.ts +7 -0
- package/dist/components/Badge/Badge.d.ts +7 -0
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +7 -0
- package/dist/components/Button/Button.types.d.ts +7 -0
- package/dist/components/Card/Card.types.d.ts +7 -0
- package/dist/components/Charts/BarChart.d.ts +11 -1
- package/dist/components/Charts/LineChart.d.ts +10 -0
- package/dist/components/Charts/PieChart.d.ts +11 -1
- package/dist/components/Charts/ResponsiveContainer.d.ts +11 -2
- package/dist/components/Checkbox/Checkbox.d.ts +8 -0
- package/dist/components/Chip/Chip.d.ts +7 -0
- package/dist/components/ConfirmDialog/ConfirmDialog.d.ts +12 -2
- package/dist/components/DataTable/DataTable.d.ts +11 -1
- package/dist/components/DatePicker/DatePicker.types.d.ts +8 -0
- package/dist/components/Dialog/Dialog.d.ts +10 -0
- package/dist/components/Drawer/Drawer.d.ts +10 -0
- package/dist/components/Field/Field.d.ts +9 -1
- package/dist/components/FileUploader/FileUploader.d.ts +10 -1
- package/dist/components/FileUploader/useFileDrop.d.ts +29 -29
- package/dist/components/Input/Input.types.d.ts +8 -0
- package/dist/components/Layout/AspectRatio.d.ts +3 -0
- package/dist/components/Layout/Divider.d.ts +3 -0
- package/dist/components/Layout/Spacer.d.ts +5 -1
- package/dist/components/List/List.d.ts +7 -0
- package/dist/components/Menu/Menu.d.ts +7 -0
- package/dist/components/MultiSelect/MultiSelect.d.ts +12 -2
- package/dist/components/Navbar/Navbar.types.d.ts +7 -0
- package/dist/components/Pagination/Pagination.d.ts +9 -0
- package/dist/components/PanelGroup/PanelGroup.d.ts +7 -0
- package/dist/components/Popover/Popover.d.ts +7 -0
- package/dist/components/Progress/Progress.types.d.ts +13 -0
- package/dist/components/Radio/Radio.d.ts +8 -0
- package/dist/components/Scroll/Scroll.types.d.ts +7 -0
- package/dist/components/Select/Select.d.ts +12 -2
- package/dist/components/Sidebar/Sidebar.types.d.ts +7 -0
- package/dist/components/Skeleton/Skeleton.types.d.ts +7 -0
- package/dist/components/Slider/Slider.d.ts +7 -0
- package/dist/components/Stepper/Stepper.d.ts +7 -0
- package/dist/components/Switch/Switch.d.ts +8 -0
- package/dist/components/Tabs/Tabs.d.ts +7 -0
- package/dist/components/Text/Text.d.ts +7 -0
- package/dist/components/Textarea/Textarea.d.ts +7 -0
- package/dist/components/Timeline/Timeline.d.ts +7 -0
- package/dist/components/Toast/Toast.types.d.ts +8 -0
- package/dist/components/Tooltip/Tooltip.d.ts +10 -0
- package/dist/components/TreeView/TreeView.d.ts +8 -0
- package/dist/index.cjs +45 -45
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +7395 -6971
- package/dist/index.js.map +1 -1
- package/dist/utils/withSx.d.ts +22 -0
- package/package.json +3 -3
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { InputHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import type { SxProp } from '../Layout/sx';
|
|
2
3
|
export type InputColor = 'primary' | 'danger' | 'warning' | 'success';
|
|
3
4
|
export type InputSize = 'sm' | 'md' | 'lg';
|
|
4
5
|
export interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'prefix'> {
|
|
@@ -15,4 +16,11 @@ export interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>,
|
|
|
15
16
|
onClear?: () => void;
|
|
16
17
|
/** Show a password-visibility toggle. Forces `type="password"` when hidden. */
|
|
17
18
|
showPasswordToggle?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* One-off CSS, same as `Box`'s `sx`: each value may be a scalar or a
|
|
21
|
+
* responsive breakpoint map (`{ base, sm, md, lg, xl }`). Scalar-only sx
|
|
22
|
+
* merges into inline style; responsive sx injects a scoped class.
|
|
23
|
+
* Applied to the outer affix wrapper, or the input itself when no affixes.
|
|
24
|
+
*/
|
|
25
|
+
sx?: SxProp;
|
|
18
26
|
}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import type { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import type { SxProp } from './sx';
|
|
2
3
|
export interface AspectRatioProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
3
4
|
/** Ratio = width / height. e.g. 16/9, 4/3, 1, 21/9. Default 16/9. */
|
|
4
5
|
ratio?: number;
|
|
6
|
+
/** One-off CSS (scalar or responsive breakpoint map), like `Box`'s `sx`. */
|
|
7
|
+
sx?: SxProp;
|
|
5
8
|
children?: ReactNode;
|
|
6
9
|
}
|
|
7
10
|
/**
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import type { HTMLAttributes } from 'react';
|
|
2
|
+
import type { SxProp } from './sx';
|
|
2
3
|
export interface DividerProps extends Omit<HTMLAttributes<HTMLHRElement | HTMLSpanElement>, 'role'> {
|
|
3
4
|
/** Axis. Default: `'horizontal'`. */
|
|
4
5
|
orientation?: 'horizontal' | 'vertical';
|
|
6
|
+
/** One-off CSS (scalar or responsive breakpoint map), like `Box`'s `sx`. */
|
|
7
|
+
sx?: SxProp;
|
|
5
8
|
}
|
|
6
9
|
/**
|
|
7
10
|
* Hairline divider. Renders `<hr>` when horizontal (no accessible name needed)
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import type { HTMLAttributes } from 'react';
|
|
2
|
-
|
|
2
|
+
import type { SxProp } from './sx';
|
|
3
|
+
export interface SpacerProps extends HTMLAttributes<HTMLSpanElement> {
|
|
4
|
+
/** One-off CSS (scalar or responsive breakpoint map), like `Box`'s `sx`. */
|
|
5
|
+
sx?: SxProp;
|
|
6
|
+
}
|
|
3
7
|
/** Flexible filler — `flex: 1 1 auto`. Use inside a `<Row>` or `<Stack>`. */
|
|
4
8
|
export declare const Spacer: import("react").ForwardRefExoticComponent<SpacerProps & import("react").RefAttributes<HTMLSpanElement>>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ElementType, HTMLAttributes, ReactNode, MouseEventHandler } from 'react';
|
|
2
|
+
import type { SxProp } from '../Layout/sx';
|
|
2
3
|
export type ListVariant = 'plain' | 'bordered' | 'dividers';
|
|
3
4
|
export type ListSize = 'sm' | 'md' | 'lg';
|
|
4
5
|
export interface ListProps extends HTMLAttributes<HTMLUListElement> {
|
|
@@ -9,6 +10,12 @@ export interface ListProps extends HTMLAttributes<HTMLUListElement> {
|
|
|
9
10
|
/** Use this when items have explicit dividers via `<ListSeparator>` to
|
|
10
11
|
* disable automatic divider rendering. */
|
|
11
12
|
dense?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* One-off CSS, same as `Box`'s `sx`: each value may be a scalar or a
|
|
15
|
+
* responsive breakpoint map (`{ base, sm, md, lg, xl }`). Scalar-only sx
|
|
16
|
+
* merges into inline style; responsive sx injects a scoped class.
|
|
17
|
+
*/
|
|
18
|
+
sx?: SxProp;
|
|
12
19
|
}
|
|
13
20
|
export declare const List: import("react").ForwardRefExoticComponent<ListProps & import("react").RefAttributes<HTMLUListElement>>;
|
|
14
21
|
export interface ListItemProps {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
2
|
import * as RadixMenu from '@radix-ui/react-dropdown-menu';
|
|
3
|
+
import type { SxProp } from '../Layout/sx';
|
|
3
4
|
export declare const Menu: import("react").FC<RadixMenu.DropdownMenuProps>;
|
|
4
5
|
export declare const MenuTrigger: import("react").ForwardRefExoticComponent<RadixMenu.DropdownMenuTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
5
6
|
export interface MenuContentProps extends ComponentPropsWithoutRef<'div'> {
|
|
@@ -14,6 +15,12 @@ export interface MenuContentProps extends ComponentPropsWithoutRef<'div'> {
|
|
|
14
15
|
alignOffset?: number;
|
|
15
16
|
/** Visual size — controls padding + font size. Default: `md`. */
|
|
16
17
|
size?: 'sm' | 'md';
|
|
18
|
+
/**
|
|
19
|
+
* One-off CSS for the menu content panel, same as `Box`'s `sx`: each value
|
|
20
|
+
* may be a scalar or a responsive breakpoint map (`{ base, sm, md, lg, xl }`).
|
|
21
|
+
* Scalar-only sx merges into inline style; responsive sx injects a scoped class.
|
|
22
|
+
*/
|
|
23
|
+
sx?: SxProp;
|
|
17
24
|
}
|
|
18
25
|
/**
|
|
19
26
|
* The popup panel. Wrap in `<Menu>` and pair with `<MenuTrigger>`.
|
|
@@ -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 type MultiSelectOption = {
|
|
3
4
|
value: string;
|
|
4
5
|
label: string;
|
|
@@ -45,10 +46,19 @@ export interface MultiSelectProps {
|
|
|
45
46
|
'aria-label'?: string;
|
|
46
47
|
/** Extra class on the trigger. */
|
|
47
48
|
className?: string;
|
|
49
|
+
/** Inline style applied to the trigger (the inline field). */
|
|
50
|
+
style?: CSSProperties;
|
|
51
|
+
/**
|
|
52
|
+
* One-off CSS, same as `Box`'s `sx`: each value may be a scalar or a
|
|
53
|
+
* responsive breakpoint map (`{ base, sm, md, lg, xl }`). Applied to the
|
|
54
|
+
* trigger. Scalar-only sx merges into inline style; responsive sx injects
|
|
55
|
+
* a scoped class.
|
|
56
|
+
*/
|
|
57
|
+
sx?: SxProp;
|
|
48
58
|
}
|
|
49
59
|
/**
|
|
50
60
|
* MultiSelect — a combobox with a searchable list and chip tokens for
|
|
51
61
|
* the selected values. Built on @radix-ui/react-popover (positioning +
|
|
52
62
|
* focus management) and cmdk (search + filtering).
|
|
53
63
|
*/
|
|
54
|
-
export declare function MultiSelect({ options, value, defaultValue, onValueChange, placeholder, searchPlaceholder, emptyText, maxItems, size, color, disabled, id, className, 'aria-invalid': ariaInvalid, 'aria-describedby': ariaDescribedBy, 'aria-label': ariaLabel, }: MultiSelectProps): import("react/jsx-runtime").JSX.Element;
|
|
64
|
+
export declare function MultiSelect({ options, value, defaultValue, onValueChange, placeholder, searchPlaceholder, emptyText, maxItems, size, color, disabled, id, className, style, sx, 'aria-invalid': ariaInvalid, 'aria-describedby': ariaDescribedBy, 'aria-label': ariaLabel, }: MultiSelectProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import type { AnchorHTMLAttributes, HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import type { SxProp } from '../Layout/sx';
|
|
2
3
|
export interface NavbarProps extends HTMLAttributes<HTMLElement> {
|
|
3
4
|
solid?: boolean;
|
|
5
|
+
/**
|
|
6
|
+
* One-off CSS, same as `Box`'s `sx`: each value may be a scalar or a
|
|
7
|
+
* responsive breakpoint map (`{ base, sm, md, lg, xl }`). Scalar-only sx
|
|
8
|
+
* merges into inline style; responsive sx injects a scoped class.
|
|
9
|
+
*/
|
|
10
|
+
sx?: SxProp;
|
|
4
11
|
children: ReactNode;
|
|
5
12
|
}
|
|
6
13
|
export interface NavbarBrandProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { CSSProperties } from 'react';
|
|
2
|
+
import type { SxProp } from '../Layout/sx';
|
|
1
3
|
export interface PaginationProps {
|
|
2
4
|
/** Current page (1-based). */
|
|
3
5
|
page: number;
|
|
@@ -13,6 +15,13 @@ export interface PaginationProps {
|
|
|
13
15
|
hideControls?: boolean;
|
|
14
16
|
size?: 'sm' | 'md' | 'lg';
|
|
15
17
|
className?: string;
|
|
18
|
+
style?: CSSProperties;
|
|
19
|
+
/**
|
|
20
|
+
* One-off CSS, same as `Box`'s `sx`: each value may be a scalar or a
|
|
21
|
+
* responsive breakpoint map (`{ base, sm, md, lg, xl }`). Scalar-only sx
|
|
22
|
+
* merges into inline style; responsive sx injects a scoped class.
|
|
23
|
+
*/
|
|
24
|
+
sx?: SxProp;
|
|
16
25
|
'aria-label'?: string;
|
|
17
26
|
}
|
|
18
27
|
/**
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { HTMLAttributes, PointerEvent } from 'react';
|
|
2
|
+
import type { SxProp } from '../Layout/sx';
|
|
2
3
|
export type PanelDirection = 'horizontal' | 'vertical';
|
|
3
4
|
export interface PanelProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
5
|
/** Initial size as a percentage of the group. */
|
|
@@ -26,6 +27,12 @@ export declare const PanelResizeHandle: import("react").ForwardRefExoticComponen
|
|
|
26
27
|
export interface PanelGroupProps extends HTMLAttributes<HTMLDivElement> {
|
|
27
28
|
/** Layout axis. Default `'horizontal'`. */
|
|
28
29
|
direction?: PanelDirection;
|
|
30
|
+
/**
|
|
31
|
+
* One-off CSS, same as `Box`'s `sx`: each value may be a scalar or a
|
|
32
|
+
* responsive breakpoint map (`{ base, sm, md, lg, xl }`). Scalar-only sx
|
|
33
|
+
* merges into inline style; responsive sx injects a scoped class.
|
|
34
|
+
*/
|
|
35
|
+
sx?: SxProp;
|
|
29
36
|
}
|
|
30
37
|
export declare const PanelGroup: import("react").ForwardRefExoticComponent<PanelGroupProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
31
38
|
/** No-op kept for drop-in compatibility with `react-resizable-panels`. */
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ComponentPropsWithoutRef } from 'react';
|
|
2
2
|
import * as RadixPopover from '@radix-ui/react-popover';
|
|
3
|
+
import type { SxProp } from '../Layout/sx';
|
|
3
4
|
/**
|
|
4
5
|
* Popover root. Controlled (`open` + `onOpenChange`) or uncontrolled.
|
|
5
6
|
* Wrap a `<PopoverTrigger>` and `<PopoverContent>`.
|
|
@@ -28,5 +29,11 @@ export interface PopoverContentProps extends ComponentPropsWithoutRef<'div'> {
|
|
|
28
29
|
align?: 'start' | 'center' | 'end';
|
|
29
30
|
/** Offset in px from the aligned edge. */
|
|
30
31
|
alignOffset?: number;
|
|
32
|
+
/**
|
|
33
|
+
* One-off CSS for the popover content panel, same as `Box`'s `sx`: each value
|
|
34
|
+
* may be a scalar or a responsive breakpoint map (`{ base, sm, md, lg, xl }`).
|
|
35
|
+
* Scalar-only sx merges into inline style; responsive sx injects a scoped class.
|
|
36
|
+
*/
|
|
37
|
+
sx?: SxProp;
|
|
31
38
|
}
|
|
32
39
|
export declare const PopoverContent: import("react").ForwardRefExoticComponent<PopoverContentProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,12 +1,25 @@
|
|
|
1
1
|
import type { HTMLAttributes } from 'react';
|
|
2
|
+
import type { SxProp } from '../Layout/sx';
|
|
2
3
|
export type ProgressColor = 'primary' | 'danger' | 'warning' | 'success' | 'info';
|
|
3
4
|
export interface ProgressProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
4
5
|
value?: number;
|
|
5
6
|
color?: ProgressColor;
|
|
6
7
|
indeterminate?: boolean;
|
|
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
|
}
|
|
8
15
|
export interface ProgressRingProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'children'> {
|
|
9
16
|
value: number;
|
|
10
17
|
size?: 'md' | 'lg';
|
|
11
18
|
showLabel?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* One-off CSS, same as `Box`'s `sx`: each value may be a scalar or a
|
|
21
|
+
* responsive breakpoint map (`{ base, sm, md, lg, xl }`). Scalar-only sx
|
|
22
|
+
* merges into inline style; responsive sx injects a scoped class.
|
|
23
|
+
*/
|
|
24
|
+
sx?: SxProp;
|
|
12
25
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
2
|
import * as RadixRadio from '@radix-ui/react-radio-group';
|
|
3
|
+
import type { SxProp } from '../Layout/sx';
|
|
3
4
|
type RadioGroupProps = ComponentPropsWithoutRef<typeof RadixRadio.Root>;
|
|
4
5
|
type RadioItemProps = ComponentPropsWithoutRef<typeof RadixRadio.Item>;
|
|
5
6
|
export interface RadioGroupRootProps extends RadioGroupProps {
|
|
@@ -9,6 +10,13 @@ export interface RadioGroupRootProps extends RadioGroupProps {
|
|
|
9
10
|
export declare const RadioGroup: import("react").ForwardRefExoticComponent<RadioGroupRootProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
10
11
|
export interface RadioProps extends Omit<RadioItemProps, 'children'> {
|
|
11
12
|
children?: ReactNode;
|
|
13
|
+
/**
|
|
14
|
+
* One-off CSS, same as `Box`'s `sx`: each value may be a scalar or a
|
|
15
|
+
* responsive breakpoint map (`{ base, sm, md, lg, xl }`). Scalar-only sx
|
|
16
|
+
* merges into inline style; responsive sx injects a scoped class. Applied to
|
|
17
|
+
* the outer label wrapper, or the radio itself when there is no label.
|
|
18
|
+
*/
|
|
19
|
+
sx?: SxProp;
|
|
12
20
|
}
|
|
13
21
|
export declare const Radio: import("react").ForwardRefExoticComponent<RadioProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
14
22
|
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import type { SxProp } from '../Layout/sx';
|
|
2
3
|
export type ScrollVariant = 'default' | 'thin' | 'subtle' | 'overlay' | 'expand';
|
|
3
4
|
export type ScrollTone = 'neutral' | 'primary';
|
|
4
5
|
export type ScrollAxis = 'both' | 'x' | 'y';
|
|
@@ -9,5 +10,11 @@ export interface ScrollProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
9
10
|
maxHeight?: number | string;
|
|
10
11
|
maxWidth?: number | string;
|
|
11
12
|
region?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* One-off CSS, same as `Box`'s `sx`: each value may be a scalar or a
|
|
15
|
+
* responsive breakpoint map (`{ base, sm, md, lg, xl }`). Scalar-only sx
|
|
16
|
+
* merges into inline style; responsive sx injects a scoped class.
|
|
17
|
+
*/
|
|
18
|
+
sx?: SxProp;
|
|
12
19
|
children: ReactNode;
|
|
13
20
|
}
|
|
@@ -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,7 +47,7 @@ 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;
|
|
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;
|
|
41
51
|
export interface SelectItemProps extends ComponentPropsWithoutRef<'div'> {
|
|
42
52
|
/** The value submitted when this item is selected. */
|
|
43
53
|
value: string;
|
|
@@ -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,4 +1,5 @@
|
|
|
1
1
|
import type { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
+
import type { SxProp } from '../Layout/sx';
|
|
2
3
|
export interface SliderProps extends Omit<ComponentPropsWithoutRef<'span'>, 'defaultValue' | 'dir' | 'onChange'> {
|
|
3
4
|
/** Controlled value (one entry per thumb). */
|
|
4
5
|
value?: number[];
|
|
@@ -30,6 +31,12 @@ export interface SliderProps extends Omit<ComponentPropsWithoutRef<'span'>, 'def
|
|
|
30
31
|
showValue?: boolean;
|
|
31
32
|
/** Format value for the bubble. Default: `String(v)`. */
|
|
32
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;
|
|
33
40
|
}
|
|
34
41
|
/**
|
|
35
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
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
|
/**
|
|
@@ -35,6 +36,12 @@ export interface TabsProps extends Omit<ComponentPropsWithoutRef<'div'>, 'dir'>
|
|
|
35
36
|
variant?: TabsVariant;
|
|
36
37
|
/** Size preset. Default: `md`. */
|
|
37
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;
|
|
38
45
|
}
|
|
39
46
|
export declare const Tabs: import("react").ForwardRefExoticComponent<TabsProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
40
47
|
export declare const TabsList: import("react").ForwardRefExoticComponent<Omit<RadixTabs.TabsListProps & 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'> {
|