@kazee-ds/react 0.5.5 → 0.7.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/README.md +3 -1
- package/dist/index.js +4742 -1012
- package/dist/index.js.map +1 -1
- package/dist/types/Alert.d.ts +20 -4
- package/dist/types/Avatar.d.ts +42 -0
- package/dist/types/AvatarGroup.d.ts +18 -0
- package/dist/types/Badge.d.ts +23 -4
- package/dist/types/Breadcrumb.d.ts +24 -2
- package/dist/types/Button.d.ts +4 -3
- package/dist/types/ButtonGroup.d.ts +4 -3
- package/dist/types/Calendar.d.ts +60 -0
- package/dist/types/Card.d.ts +49 -4
- package/dist/types/Chart.d.ts +13 -2
- package/dist/types/Checkbox.d.ts +11 -2
- package/dist/types/Combobox.d.ts +13 -3
- package/dist/types/DataTable.d.ts +23 -2
- package/dist/types/DateRangePicker.d.ts +20 -2
- package/dist/types/Dialog.d.ts +20 -2
- package/dist/types/DropdownMenu.d.ts +23 -3
- package/dist/types/Empty.d.ts +12 -2
- package/dist/types/FieldComponent.d.ts +3 -2
- package/dist/types/Form.d.ts +3 -2
- package/dist/types/Input.d.ts +19 -4
- package/dist/types/Label.d.ts +4 -3
- package/dist/types/Listbox.d.ts +11 -2
- package/dist/types/NumberField.d.ts +12 -2
- package/dist/types/OverlayDirection.d.ts +1 -1
- package/dist/types/Pagination.d.ts +29 -2
- package/dist/types/Popover.d.ts +19 -2
- package/dist/types/RadioGroup.d.ts +12 -2
- package/dist/types/Select.d.ts +19 -7
- package/dist/types/SelectGroup.d.ts +3 -2
- package/dist/types/Separator.d.ts +2 -1
- package/dist/types/Sidebar.d.ts +16 -2
- package/dist/types/Skeleton.d.ts +2 -1
- package/dist/types/Spinner.d.ts +3 -2
- package/dist/types/Switch.d.ts +18 -2
- package/dist/types/Table.d.ts +16 -2
- package/dist/types/Tabs.d.ts +38 -3
- package/dist/types/TemporalField.d.ts +36 -0
- package/dist/types/TemporalPicker.d.ts +137 -0
- package/dist/types/Textarea.d.ts +13 -2
- package/dist/types/TimeControls.d.ts +14 -0
- package/dist/types/Toast.d.ts +31 -7
- package/dist/types/ToggleButton.d.ts +5 -3
- package/dist/types/ToggleButtonGroup.d.ts +4 -1
- package/dist/types/ToggleGroup.d.ts +18 -3
- package/dist/types/Tooltip.d.ts +12 -2
- package/dist/types/choice-composition.d.ts +35 -0
- package/dist/types/combobox-composition.d.ts +22 -0
- package/dist/types/control-composition.d.ts +73 -0
- package/dist/types/date-range-composition.d.ts +46 -0
- package/dist/types/date-range-model.d.ts +3 -1
- package/dist/types/field.d.ts +6 -1
- package/dist/types/index.d.ts +46 -1
- package/dist/types/input-clear.d.ts +24 -0
- package/dist/types/label-context.d.ts +8 -0
- package/dist/types/layout-parts.d.ts +44 -0
- package/dist/types/number-composition.d.ts +24 -0
- package/dist/types/structural-parts.d.ts +56 -0
- package/dist/types/styling.d.ts +8 -0
- package/dist/types/switch-visual.d.ts +21 -0
- package/dist/types/temporal-model.d.ts +44 -0
- package/dist/types/toggle-group-model.d.ts +1 -1
- package/dist/types/visual-slot.d.ts +3 -0
- package/dist/types/visual.d.ts +5 -0
- package/package.json +1 -1
package/dist/types/Alert.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type StylingProps } from './styling.js';
|
|
2
|
+
import type { ReactNode, HTMLAttributes } from 'react';
|
|
2
3
|
import type { BadgeTone } from './Badge.js';
|
|
3
|
-
export
|
|
4
|
-
|
|
4
|
+
export type AlertPart = 'root' | 'title' | 'description' | 'actions';
|
|
5
|
+
export interface AlertProps extends StylingProps<AlertPart> {
|
|
6
|
+
title?: string;
|
|
5
7
|
description?: string;
|
|
6
8
|
tone?: BadgeTone;
|
|
7
9
|
announcement?: 'off' | 'polite' | 'assertive';
|
|
@@ -9,4 +11,18 @@ export interface AlertProps {
|
|
|
9
11
|
actions?: ReactNode;
|
|
10
12
|
id?: string;
|
|
11
13
|
}
|
|
12
|
-
|
|
14
|
+
declare function AlertRoot({ className, style, classNames, title, description, tone, announcement, children, actions, id, }: AlertProps): import("react").JSX.Element;
|
|
15
|
+
export declare function AlertTitle({ className, ...props }: HTMLAttributes<HTMLParagraphElement>): import("react").JSX.Element;
|
|
16
|
+
export declare function AlertDescription({ className, ...props }: HTMLAttributes<HTMLParagraphElement>): import("react").JSX.Element;
|
|
17
|
+
export declare function AlertContent({ className, ...props }: HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
|
|
18
|
+
export declare function AlertActions({ className, ...props }: HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
|
|
19
|
+
export declare function AlertIndicator({ className, ...props }: HTMLAttributes<HTMLSpanElement>): import("react").JSX.Element;
|
|
20
|
+
export declare const Alert: typeof AlertRoot & {
|
|
21
|
+
Root: typeof AlertRoot;
|
|
22
|
+
Title: typeof AlertTitle;
|
|
23
|
+
Description: typeof AlertDescription;
|
|
24
|
+
Content: typeof AlertContent;
|
|
25
|
+
Actions: typeof AlertActions;
|
|
26
|
+
Indicator: typeof AlertIndicator;
|
|
27
|
+
};
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { type HTMLAttributes, type ImgHTMLAttributes, type Ref } from 'react';
|
|
2
|
+
import { type StylingProps } from './styling.js';
|
|
3
|
+
import type { AvatarVariant, ComponentSize, ImageLoadingStatus, IndicatorPlacement, Tone } from './visual.js';
|
|
4
|
+
export declare const AvatarGroupContext: import("react").Context<{
|
|
5
|
+
size?: ComponentSize;
|
|
6
|
+
tone?: Tone;
|
|
7
|
+
variant?: AvatarVariant;
|
|
8
|
+
}>;
|
|
9
|
+
export interface AvatarProps extends HTMLAttributes<HTMLSpanElement>, StylingProps<'image' | 'fallback' | 'badge'> {
|
|
10
|
+
size?: ComponentSize;
|
|
11
|
+
tone?: Tone;
|
|
12
|
+
variant?: AvatarVariant;
|
|
13
|
+
radius?: 'none' | 'sm' | 'md' | 'lg' | 'full';
|
|
14
|
+
asChild?: boolean;
|
|
15
|
+
ref?: Ref<HTMLSpanElement>;
|
|
16
|
+
}
|
|
17
|
+
export declare function AvatarRoot({ size, tone, variant, radius, asChild, children, className, classNames, ...props }: AvatarProps): import("react").JSX.Element;
|
|
18
|
+
export interface AvatarImageProps extends ImgHTMLAttributes<HTMLImageElement> {
|
|
19
|
+
asChild?: boolean;
|
|
20
|
+
onLoadingStatusChange?: (status: ImageLoadingStatus) => void;
|
|
21
|
+
ref?: Ref<HTMLImageElement>;
|
|
22
|
+
}
|
|
23
|
+
export declare function AvatarImage(props: AvatarImageProps): import("react").JSX.Element;
|
|
24
|
+
export interface AvatarFallbackProps extends HTMLAttributes<HTMLSpanElement> {
|
|
25
|
+
delayMs?: number;
|
|
26
|
+
tone?: Tone;
|
|
27
|
+
ref?: Ref<HTMLSpanElement>;
|
|
28
|
+
}
|
|
29
|
+
export declare function AvatarFallback({ delayMs, tone, className, ...props }: AvatarFallbackProps): import("react").JSX.Element | null;
|
|
30
|
+
export interface AvatarBadgeProps extends HTMLAttributes<HTMLSpanElement> {
|
|
31
|
+
size?: ComponentSize;
|
|
32
|
+
tone?: Tone;
|
|
33
|
+
placement?: IndicatorPlacement;
|
|
34
|
+
ref?: Ref<HTMLSpanElement>;
|
|
35
|
+
}
|
|
36
|
+
export declare function AvatarBadge({ size, tone, placement, className, children, ...props }: AvatarBadgeProps): import("react").JSX.Element;
|
|
37
|
+
export declare const Avatar: typeof AvatarRoot & {
|
|
38
|
+
Root: typeof AvatarRoot;
|
|
39
|
+
Image: typeof AvatarImage;
|
|
40
|
+
Fallback: typeof AvatarFallback;
|
|
41
|
+
Badge: typeof AvatarBadge;
|
|
42
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type HTMLAttributes } from 'react';
|
|
2
|
+
import { type AvatarProps } from './Avatar.js';
|
|
3
|
+
import { type StylingProps } from './styling.js';
|
|
4
|
+
import type { AvatarVariant, ComponentSize, Tone } from './visual.js';
|
|
5
|
+
export interface AvatarGroupProps extends HTMLAttributes<HTMLDivElement>, StylingProps<'count'> {
|
|
6
|
+
size?: ComponentSize;
|
|
7
|
+
tone?: Tone;
|
|
8
|
+
variant?: AvatarVariant;
|
|
9
|
+
max?: number;
|
|
10
|
+
isGrid?: boolean;
|
|
11
|
+
overlap?: 'clip' | 'ring';
|
|
12
|
+
}
|
|
13
|
+
export declare function AvatarGroupCount({ className, ...props }: AvatarProps): import("react").JSX.Element;
|
|
14
|
+
export declare function AvatarGroupRoot({ size, tone, variant, max, isGrid, overlap, className, classNames, children, ...props }: AvatarGroupProps): import("react").JSX.Element;
|
|
15
|
+
export declare const AvatarGroup: typeof AvatarGroupRoot & {
|
|
16
|
+
Root: typeof AvatarGroupRoot;
|
|
17
|
+
Count: typeof AvatarGroupCount;
|
|
18
|
+
};
|
package/dist/types/Badge.d.ts
CHANGED
|
@@ -1,7 +1,26 @@
|
|
|
1
|
-
import type
|
|
2
|
-
|
|
1
|
+
import { type HTMLAttributes, type Ref } from 'react';
|
|
2
|
+
import type { ComponentSize, IndicatorPlacement, Tone } from './visual.js';
|
|
3
|
+
export type BadgeTone = Tone;
|
|
4
|
+
export type BadgeVariant = 'default' | 'solid' | 'soft' | 'outline' | 'ghost' | 'link';
|
|
3
5
|
export interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {
|
|
6
|
+
classNames?: Partial<Record<'root' | 'label', string>>;
|
|
4
7
|
tone?: BadgeTone;
|
|
8
|
+
size?: ComponentSize;
|
|
9
|
+
variant?: BadgeVariant;
|
|
10
|
+
placement?: IndicatorPlacement;
|
|
11
|
+
asChild?: boolean;
|
|
12
|
+
ref?: Ref<HTMLSpanElement>;
|
|
5
13
|
}
|
|
6
|
-
/** Static status text.
|
|
7
|
-
export declare function
|
|
14
|
+
/** Static status text; wrap in Badge.Anchor to position it relative to another element. */
|
|
15
|
+
export declare function BadgeRoot({ tone, size, variant, placement, asChild, children, className, classNames, ...props }: BadgeProps): import("react").JSX.Element;
|
|
16
|
+
export declare function BadgeAnchor({ className, ...props }: HTMLAttributes<HTMLSpanElement> & {
|
|
17
|
+
ref?: Ref<HTMLSpanElement>;
|
|
18
|
+
}): import("react").JSX.Element;
|
|
19
|
+
export declare function BadgeLabel({ className, ...props }: HTMLAttributes<HTMLSpanElement> & {
|
|
20
|
+
ref?: Ref<HTMLSpanElement>;
|
|
21
|
+
}): import("react").JSX.Element;
|
|
22
|
+
export declare const Badge: typeof BadgeRoot & {
|
|
23
|
+
Root: typeof BadgeRoot;
|
|
24
|
+
Anchor: typeof BadgeAnchor;
|
|
25
|
+
Label: typeof BadgeLabel;
|
|
26
|
+
};
|
|
@@ -1,8 +1,30 @@
|
|
|
1
|
+
import { type StylingProps } from './styling.js';
|
|
1
2
|
import type { BreadcrumbItem } from './dashboard-types.js';
|
|
2
|
-
|
|
3
|
+
import type { HTMLAttributes, AnchorHTMLAttributes } from 'react';
|
|
4
|
+
export type BreadcrumbPart = 'root' | 'list' | 'item' | 'separator' | 'link' | 'current';
|
|
5
|
+
export interface BreadcrumbProps extends StylingProps<BreadcrumbPart> {
|
|
3
6
|
items: BreadcrumbItem[];
|
|
4
7
|
label?: string;
|
|
5
8
|
dir?: 'ltr' | 'rtl';
|
|
6
9
|
id?: string;
|
|
7
10
|
}
|
|
8
|
-
export declare function
|
|
11
|
+
export declare function BreadcrumbRoot({ className, label, ...props }: HTMLAttributes<HTMLElement> & {
|
|
12
|
+
label?: string;
|
|
13
|
+
}): import("react").JSX.Element;
|
|
14
|
+
export declare function BreadcrumbList(props: HTMLAttributes<HTMLOListElement>): import("react").JSX.Element;
|
|
15
|
+
export declare function BreadcrumbItemPart(props: HTMLAttributes<HTMLLIElement>): import("react").JSX.Element;
|
|
16
|
+
export declare function BreadcrumbLink({ children, ...props }: AnchorHTMLAttributes<HTMLAnchorElement>): import("react").JSX.Element;
|
|
17
|
+
export declare function BreadcrumbCurrent(props: HTMLAttributes<HTMLSpanElement>): import("react").JSX.Element;
|
|
18
|
+
export declare function BreadcrumbSeparator({ className, children, ...props }: HTMLAttributes<HTMLSpanElement>): import("react").JSX.Element;
|
|
19
|
+
declare function BreadcrumbComponent(props: BreadcrumbProps | (HTMLAttributes<HTMLElement> & {
|
|
20
|
+
label?: string;
|
|
21
|
+
})): import("react").JSX.Element;
|
|
22
|
+
export declare const Breadcrumb: typeof BreadcrumbComponent & {
|
|
23
|
+
Root: typeof BreadcrumbRoot;
|
|
24
|
+
List: typeof BreadcrumbList;
|
|
25
|
+
Item: typeof BreadcrumbItemPart;
|
|
26
|
+
Link: typeof BreadcrumbLink;
|
|
27
|
+
Current: typeof BreadcrumbCurrent;
|
|
28
|
+
Separator: typeof BreadcrumbSeparator;
|
|
29
|
+
};
|
|
30
|
+
export {};
|
package/dist/types/Button.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { type StylingProps } from './styling.js';
|
|
1
2
|
import { type ButtonProps as AriaButtonProps } from 'react-aria-components/Button';
|
|
2
3
|
import { type ReactNode } from 'react';
|
|
3
4
|
export type ButtonVariant = 'primary' | 'secondary' | 'danger' | 'outline' | 'tertiary' | 'ghost' | 'danger-soft' | 'ai';
|
|
4
|
-
export type ButtonSize = 'sm' | 'md' | 'lg';
|
|
5
|
+
export type ButtonSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
5
6
|
/** The event passed to `onPress`: pointer type, modifier keys, and the target element. */
|
|
6
7
|
export type ButtonPressEvent = Parameters<NonNullable<AriaButtonProps['onPress']>>[0];
|
|
7
8
|
/** Public flags supplied to the Button render function. */
|
|
@@ -17,7 +18,7 @@ export interface ButtonRenderProps {
|
|
|
17
18
|
* The props the design system supports on `Button`. Anything not listed here is not part of the
|
|
18
19
|
* public API, even if the underlying React Aria button would accept it.
|
|
19
20
|
*/
|
|
20
|
-
export interface ButtonProps {
|
|
21
|
+
export interface ButtonProps extends StylingProps {
|
|
21
22
|
/** Label or content of the button. */
|
|
22
23
|
children?: ReactNode | ((state: ButtonRenderProps) => ReactNode);
|
|
23
24
|
/** Square icon button. Supply aria-label or aria-labelledby. */
|
|
@@ -50,4 +51,4 @@ export interface ButtonProps {
|
|
|
50
51
|
/** Focuses the button when it first renders. */
|
|
51
52
|
autoFocus?: boolean;
|
|
52
53
|
}
|
|
53
|
-
export declare function Button({ variant, size, isIconOnly, isPending, isDisabled, fullWidth, type, children, ...props }: ButtonProps): import("react").JSX.Element;
|
|
54
|
+
export declare function Button({ variant, size, isIconOnly, isPending, isDisabled, fullWidth, type, children, className: consumerClassName, classNames, style, ...props }: ButtonProps): import("react").JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { type StylingProps } from './styling.js';
|
|
1
2
|
import { type ReactNode } from 'react';
|
|
2
3
|
import { type ButtonSize, type ButtonVariant } from './Button.js';
|
|
3
|
-
export interface ButtonGroupProps {
|
|
4
|
+
export interface ButtonGroupProps extends StylingProps {
|
|
4
5
|
label: string;
|
|
5
6
|
children: ReactNode;
|
|
6
7
|
variant?: ButtonVariant;
|
|
@@ -10,8 +11,8 @@ export interface ButtonGroupProps {
|
|
|
10
11
|
orientation?: 'horizontal' | 'vertical';
|
|
11
12
|
dir?: 'ltr' | 'rtl';
|
|
12
13
|
}
|
|
13
|
-
export declare function ButtonGroupSeparator(): import("react").JSX.Element;
|
|
14
|
-
declare function Root({ children, label, variant, size, isDisabled, fullWidth, orientation, dir, }: ButtonGroupProps): import("react").JSX.Element;
|
|
14
|
+
export declare function ButtonGroupSeparator({ className, style, classNames }?: StylingProps): import("react").JSX.Element;
|
|
15
|
+
declare function Root({ children, label, variant, size, isDisabled, fullWidth, orientation, dir, className, style, classNames, }: ButtonGroupProps): import("react").JSX.Element;
|
|
15
16
|
export declare const ButtonGroup: typeof Root & {
|
|
16
17
|
Separator: typeof ButtonGroupSeparator;
|
|
17
18
|
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { type HTMLAttributes } from 'react';
|
|
2
|
+
import { CalendarDate } from '@internationalized/date';
|
|
3
|
+
import { type StylingProps } from './styling.js';
|
|
4
|
+
import type { TemporalRange } from './temporal-model.js';
|
|
5
|
+
export interface MonthPickerProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue'> {
|
|
6
|
+
value?: number;
|
|
7
|
+
year?: number;
|
|
8
|
+
onChange?: (month: number) => void;
|
|
9
|
+
locale?: string;
|
|
10
|
+
minDate?: string;
|
|
11
|
+
maxDate?: string;
|
|
12
|
+
isDisabled?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare function MonthPicker({ value, year, onChange, locale, minDate, maxDate, isDisabled, className, ...props }: MonthPickerProps): import("react").JSX.Element;
|
|
15
|
+
export interface YearPickerProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue'> {
|
|
16
|
+
value?: number;
|
|
17
|
+
onChange?: (year: number) => void;
|
|
18
|
+
locale?: string;
|
|
19
|
+
minDate?: string;
|
|
20
|
+
maxDate?: string;
|
|
21
|
+
isDisabled?: boolean;
|
|
22
|
+
}
|
|
23
|
+
export declare function YearPicker({ value, onChange, locale, minDate, maxDate, isDisabled, className, ...props }: YearPickerProps): import("react").JSX.Element;
|
|
24
|
+
export interface MonthYearNavigationProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
25
|
+
value: string;
|
|
26
|
+
onChange: (value: string) => void;
|
|
27
|
+
locale?: string;
|
|
28
|
+
minDate?: string;
|
|
29
|
+
maxDate?: string;
|
|
30
|
+
isDisabled?: boolean;
|
|
31
|
+
}
|
|
32
|
+
export declare function MonthYearNavigation({ value, onChange, locale, minDate, maxDate, isDisabled, className, ...props }: MonthYearNavigationProps): import("react").JSX.Element;
|
|
33
|
+
/** Reads actual visibleRange rather than assuming the focused day is the first panel. */
|
|
34
|
+
export declare function CalendarViewHeader({ offset, onNavigate, ...props }: Omit<MonthYearNavigationProps, 'value' | 'onChange'> & {
|
|
35
|
+
offset?: number;
|
|
36
|
+
onNavigate: (value: CalendarDate) => void;
|
|
37
|
+
}): import("react").JSX.Element;
|
|
38
|
+
export interface CalendarProps extends StylingProps<'header' | 'grid' | 'day' | 'month'> {
|
|
39
|
+
label?: string;
|
|
40
|
+
value?: string | null;
|
|
41
|
+
defaultValue?: string | null;
|
|
42
|
+
onChange?: (value: string | null) => void;
|
|
43
|
+
locale?: string;
|
|
44
|
+
dir?: 'ltr' | 'rtl';
|
|
45
|
+
minDate?: string;
|
|
46
|
+
maxDate?: string;
|
|
47
|
+
isDateUnavailable?: (value: string) => boolean;
|
|
48
|
+
isDisabled?: boolean;
|
|
49
|
+
isReadOnly?: boolean;
|
|
50
|
+
weekStartsOn?: 0 | 1;
|
|
51
|
+
visibleMonths?: 1 | 2;
|
|
52
|
+
referenceDate?: string;
|
|
53
|
+
}
|
|
54
|
+
export interface RangeCalendarProps extends Omit<CalendarProps, 'value' | 'defaultValue' | 'onChange'> {
|
|
55
|
+
value?: TemporalRange | null;
|
|
56
|
+
defaultValue?: TemporalRange | null;
|
|
57
|
+
onChange?: (value: TemporalRange | null) => void;
|
|
58
|
+
}
|
|
59
|
+
export declare function Calendar(props: CalendarProps): import("react").JSX.Element;
|
|
60
|
+
export declare function RangeCalendar(props: RangeCalendarProps): import("react").JSX.Element;
|
package/dist/types/Card.d.ts
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
|
-
import type { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
-
|
|
1
|
+
import type { HTMLAttributes, ReactNode, AnchorHTMLAttributes } from 'react';
|
|
2
|
+
import { type StylingProps } from './styling.js';
|
|
3
|
+
export type CardPart = 'root' | 'action' | 'header' | 'heading' | 'titleRow' | 'title' | 'description' | 'actions' | 'content' | 'footer';
|
|
4
|
+
export interface CardInteractionProps {
|
|
5
|
+
density?: 'default' | 'compact';
|
|
6
|
+
href?: string;
|
|
7
|
+
target?: AnchorHTMLAttributes<HTMLAnchorElement>['target'];
|
|
8
|
+
rel?: string;
|
|
9
|
+
onPress?: () => void;
|
|
10
|
+
isDisabled?: boolean;
|
|
11
|
+
actionLabel?: string;
|
|
12
|
+
actionLabelledBy?: string;
|
|
13
|
+
actionClassName?: string;
|
|
14
|
+
/** Compose a router link using the supplied native anchor props. */
|
|
15
|
+
renderLink?: (props: AnchorHTMLAttributes<HTMLAnchorElement>) => ReactNode;
|
|
16
|
+
}
|
|
17
|
+
export interface CardProps extends HTMLAttributes<HTMLDivElement>, StylingProps<CardPart>, CardInteractionProps {
|
|
3
18
|
title?: string;
|
|
4
19
|
description?: string;
|
|
5
20
|
headingLevel?: 2 | 3 | 4 | 5 | 6;
|
|
@@ -9,6 +24,36 @@ export interface CardProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
9
24
|
titleExtras?: ReactNode;
|
|
10
25
|
actions?: ReactNode;
|
|
11
26
|
footer?: ReactNode;
|
|
27
|
+
headerAlign?: 'start' | 'center' | 'end';
|
|
28
|
+
dividedHeader?: boolean;
|
|
29
|
+
flushFooter?: boolean;
|
|
12
30
|
}
|
|
13
|
-
|
|
14
|
-
export declare function
|
|
31
|
+
declare function CompactCard({ title, description, headingLevel, actions, header, titleExtras, footer, children, className, classNames, density, href, target, rel, onPress, isDisabled, actionLabel, actionLabelledBy, actionClassName, renderLink, headerAlign, dividedHeader, flushFooter, ...props }: CardProps): import("react").JSX.Element;
|
|
32
|
+
export declare function CardRoot({ className, classNames, children, density, href, target, rel, onPress, isDisabled, actionLabel, actionLabelledBy, actionClassName, renderLink, ...props }: HTMLAttributes<HTMLDivElement> & CardInteractionProps & StylingProps<'action'>): import("react").JSX.Element;
|
|
33
|
+
export declare function CardHeader({ className, align, divided, ...props }: HTMLAttributes<HTMLDivElement> & {
|
|
34
|
+
align?: 'start' | 'center' | 'end';
|
|
35
|
+
divided?: boolean;
|
|
36
|
+
}): import("react").JSX.Element;
|
|
37
|
+
export declare function CardHeading({ className, ...props }: HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
|
|
38
|
+
export declare function CardTitleRow({ className, ...props }: HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
|
|
39
|
+
export declare function CardTitle({ className, headingLevel, ...props }: HTMLAttributes<HTMLHeadingElement> & {
|
|
40
|
+
headingLevel?: 2 | 3 | 4 | 5 | 6;
|
|
41
|
+
}): import("react").JSX.Element;
|
|
42
|
+
export declare function CardDescription({ className, ...props }: HTMLAttributes<HTMLParagraphElement>): import("react").JSX.Element;
|
|
43
|
+
export declare function CardActions({ className, ...props }: HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
|
|
44
|
+
export declare function CardContent({ className, ...props }: HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
|
|
45
|
+
export declare function CardFooter({ className, flush, ...props }: HTMLAttributes<HTMLDivElement> & {
|
|
46
|
+
flush?: boolean;
|
|
47
|
+
}): import("react").JSX.Element;
|
|
48
|
+
export declare const Card: typeof CompactCard & {
|
|
49
|
+
Root: typeof CardRoot;
|
|
50
|
+
Header: typeof CardHeader;
|
|
51
|
+
Heading: typeof CardHeading;
|
|
52
|
+
TitleRow: typeof CardTitleRow;
|
|
53
|
+
Title: typeof CardTitle;
|
|
54
|
+
Description: typeof CardDescription;
|
|
55
|
+
Actions: typeof CardActions;
|
|
56
|
+
Content: typeof CardContent;
|
|
57
|
+
Footer: typeof CardFooter;
|
|
58
|
+
};
|
|
59
|
+
export {};
|
package/dist/types/Chart.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'react';
|
|
2
|
+
import { ChartRoot, ChartTitle, ChartDescription, ChartPlot } from './layout-parts.js';
|
|
3
|
+
import { type StylingProps } from './styling.js';
|
|
1
4
|
import type { ChartDatum } from './dashboard-types.js';
|
|
2
|
-
export
|
|
5
|
+
export type ChartPart = 'root' | 'title' | 'description' | 'plot' | 'axis' | 'line' | 'bar' | 'label' | 'table' | 'empty';
|
|
6
|
+
export interface ChartProps extends StylingProps<ChartPart> {
|
|
3
7
|
label: string;
|
|
4
8
|
data: ChartDatum[];
|
|
5
9
|
type?: 'bar' | 'line';
|
|
@@ -12,4 +16,11 @@ export interface ChartProps {
|
|
|
12
16
|
id?: string;
|
|
13
17
|
dir?: 'ltr' | 'rtl';
|
|
14
18
|
}
|
|
15
|
-
|
|
19
|
+
declare function ChartComponent(props: ChartProps | HTMLAttributes<HTMLElement>): import("react").JSX.Element;
|
|
20
|
+
export declare const Chart: typeof ChartComponent & {
|
|
21
|
+
Root: typeof ChartRoot;
|
|
22
|
+
Title: typeof ChartTitle;
|
|
23
|
+
Description: typeof ChartDescription;
|
|
24
|
+
Plot: typeof ChartPlot;
|
|
25
|
+
};
|
|
26
|
+
export {};
|
package/dist/types/Checkbox.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { CheckboxComposition, CheckboxControl, CheckboxIndicator, ChoiceContent, type CheckboxCompositionProps } from './choice-composition.js';
|
|
2
|
+
import { type StylingProps } from './styling.js';
|
|
1
3
|
import { type FieldFeedbackProps } from './field.js';
|
|
2
|
-
export interface CheckboxProps extends FieldFeedbackProps {
|
|
4
|
+
export interface CheckboxProps extends FieldFeedbackProps, StylingProps<'root' | 'choice' | 'control' | 'indicator' | 'dash' | 'label' | 'description' | 'error'> {
|
|
3
5
|
label: string;
|
|
4
6
|
isSelected?: boolean;
|
|
5
7
|
defaultSelected?: boolean;
|
|
@@ -13,4 +15,11 @@ export interface CheckboxProps extends FieldFeedbackProps {
|
|
|
13
15
|
id?: string;
|
|
14
16
|
dir?: 'ltr' | 'rtl';
|
|
15
17
|
}
|
|
16
|
-
|
|
18
|
+
declare function CheckboxRoot(props: CheckboxProps | CheckboxCompositionProps): import("react").JSX.Element;
|
|
19
|
+
export declare const Checkbox: typeof CheckboxRoot & {
|
|
20
|
+
Root: typeof CheckboxComposition;
|
|
21
|
+
Control: typeof CheckboxControl;
|
|
22
|
+
Indicator: typeof CheckboxIndicator;
|
|
23
|
+
Content: typeof ChoiceContent;
|
|
24
|
+
};
|
|
25
|
+
export type { CheckboxCompositionProps } from './choice-composition.js';
|
package/dist/types/Combobox.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { ComboboxComposition, ComboboxInputGroup, ComboboxInput, ComboboxTrigger, ComboboxPopover, ComboboxClearButton, type ComboboxCompositionProps } from './combobox-composition.js';
|
|
2
|
+
import { type StylingProps } from './styling.js';
|
|
1
3
|
import { type ReactNode } from 'react';
|
|
2
4
|
import { type SelectOption } from './selection-options.js';
|
|
3
|
-
export interface ComboboxProps {
|
|
5
|
+
export interface ComboboxProps extends StylingProps<'root' | 'label' | 'required' | 'control' | 'leading' | 'input' | 'clearButton' | 'clearIcon' | 'trigger' | 'indicator' | 'popover' | 'list' | 'empty' | 'item' | 'itemLabel' | 'itemDescription' | 'itemIndicator' | 'description' | 'error'> {
|
|
4
6
|
label: string;
|
|
5
7
|
options: SelectOption[];
|
|
6
8
|
value?: string | null;
|
|
@@ -23,5 +25,13 @@ export interface ComboboxProps {
|
|
|
23
25
|
dir?: 'ltr' | 'rtl';
|
|
24
26
|
renderOption?: (option: SelectOption) => ReactNode;
|
|
25
27
|
}
|
|
26
|
-
|
|
27
|
-
export declare
|
|
28
|
+
declare function ComboboxRoot(props: ComboboxProps | ComboboxCompositionProps): import("react").JSX.Element;
|
|
29
|
+
export declare const Combobox: typeof ComboboxRoot & {
|
|
30
|
+
Root: typeof ComboboxComposition;
|
|
31
|
+
InputGroup: typeof ComboboxInputGroup;
|
|
32
|
+
Input: typeof ComboboxInput;
|
|
33
|
+
Trigger: typeof ComboboxTrigger;
|
|
34
|
+
Popover: typeof ComboboxPopover;
|
|
35
|
+
ClearButton: typeof ComboboxClearButton;
|
|
36
|
+
};
|
|
37
|
+
export type { ComboboxCompositionProps } from './combobox-composition.js';
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
import { TableRoot, TableHeader, TableBody, TableFooter, TableRow, TableCell, TableCaption, TableScrollContainer } from './structural-parts.js';
|
|
2
|
+
import { DataTableRoot, DataTableSortButton, DataTableStatus, DataTableError, DataTableColumn as DataTableColumnPart, DataTableEmpty } from './layout-parts.js';
|
|
3
|
+
import { type StylingProps } from './styling.js';
|
|
1
4
|
import type { ReactNode } from 'react';
|
|
2
5
|
import type { DataTableColumn, DataTableRow, TableSort } from './data-table-types.js';
|
|
3
|
-
export
|
|
6
|
+
export type DataTablePart = 'root' | 'table' | 'scroll' | 'caption' | 'header' | 'body' | 'row' | 'column' | 'cell' | 'sort' | 'empty' | 'status' | 'error';
|
|
7
|
+
export interface DataTableProps extends StylingProps<DataTablePart> {
|
|
4
8
|
caption: string;
|
|
5
9
|
columns: DataTableColumn[];
|
|
6
10
|
rows: DataTableRow[];
|
|
@@ -15,4 +19,21 @@ export interface DataTableProps {
|
|
|
15
19
|
dir?: 'ltr' | 'rtl';
|
|
16
20
|
id?: string;
|
|
17
21
|
}
|
|
18
|
-
|
|
22
|
+
declare function DataTableComponent(props: DataTableProps | import('./layout-parts.js').DataTableRootProps): import("react").JSX.Element;
|
|
23
|
+
export declare const DataTable: typeof DataTableComponent & {
|
|
24
|
+
Root: typeof DataTableRoot;
|
|
25
|
+
SortButton: typeof DataTableSortButton;
|
|
26
|
+
Status: typeof DataTableStatus;
|
|
27
|
+
Error: typeof DataTableError;
|
|
28
|
+
Table: typeof TableRoot;
|
|
29
|
+
Header: typeof TableHeader;
|
|
30
|
+
Body: typeof TableBody;
|
|
31
|
+
Footer: typeof TableFooter;
|
|
32
|
+
Row: typeof TableRow;
|
|
33
|
+
Column: typeof DataTableColumnPart;
|
|
34
|
+
Empty: typeof DataTableEmpty;
|
|
35
|
+
Cell: typeof TableCell;
|
|
36
|
+
Caption: typeof TableCaption;
|
|
37
|
+
ScrollContainer: typeof TableScrollContainer;
|
|
38
|
+
};
|
|
39
|
+
export {};
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
import { DateRangeTrigger, DateRangeValue, DateRangeIndicator, DateRangePopover, DateRangeContent, DateRangeCalendar, DateRangeInput, DateRangeApplyButton, DateRangeClearButton, DateRangeCancelButton } from './date-range-composition.js';
|
|
2
|
+
import { type StylingProps } from './styling.js';
|
|
3
|
+
import { type ReactNode } from 'react';
|
|
1
4
|
import { type DateRange, type DateRangeOptions } from './date-range-model.js';
|
|
2
|
-
export interface DateRangePickerProps extends DateRangeOptions {
|
|
5
|
+
export interface DateRangePickerProps extends DateRangeOptions, StylingProps<'root' | 'content' | 'intro' | 'summary' | 'body' | 'presets' | 'preset' | 'main' | 'inputs' | 'field' | 'input' | 'inputLabel' | 'monthSelect' | 'yearInput' | 'title' | 'draftError' | 'jump' | 'calendar' | 'navigation' | 'navigationButton' | 'months' | 'month' | 'heading' | 'grid' | 'weekday' | 'day' | 'validation' | 'footer' | 'clearButton' | 'cancelButton' | 'applyButton' | 'label' | 'panel' | 'trigger' | 'icon' | 'value' | 'chevron' | 'dialog' | 'description' | 'error'> {
|
|
3
6
|
value?: DateRange | null;
|
|
4
7
|
onChange?: (value: DateRange | null) => void;
|
|
8
|
+
children?: ReactNode;
|
|
5
9
|
onApply?: (value: DateRange | null) => void;
|
|
6
10
|
onOpenChange?: (open: boolean) => void;
|
|
7
11
|
isDisabled?: boolean;
|
|
@@ -9,4 +13,18 @@ export interface DateRangePickerProps extends DateRangeOptions {
|
|
|
9
13
|
isRequired?: boolean;
|
|
10
14
|
isInvalid?: boolean;
|
|
11
15
|
}
|
|
12
|
-
|
|
16
|
+
declare function DateRangePickerRoot(props: DateRangePickerProps): import("react").JSX.Element;
|
|
17
|
+
export declare const DateRangePicker: typeof DateRangePickerRoot & {
|
|
18
|
+
Root: typeof DateRangePickerRoot;
|
|
19
|
+
Trigger: typeof DateRangeTrigger;
|
|
20
|
+
Value: typeof DateRangeValue;
|
|
21
|
+
Indicator: typeof DateRangeIndicator;
|
|
22
|
+
Popover: typeof DateRangePopover;
|
|
23
|
+
Content: typeof DateRangeContent;
|
|
24
|
+
Calendar: typeof DateRangeCalendar;
|
|
25
|
+
Input: typeof DateRangeInput;
|
|
26
|
+
ApplyButton: typeof DateRangeApplyButton;
|
|
27
|
+
ClearButton: typeof DateRangeClearButton;
|
|
28
|
+
CancelButton: typeof DateRangeCancelButton;
|
|
29
|
+
};
|
|
30
|
+
export {};
|
package/dist/types/Dialog.d.ts
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
import type { DialogRootProps } from './structural-parts.js';
|
|
2
|
+
import { OverlayHeading, DialogCloseButton, DialogRoot, DialogContent, OverlayDescription } from './structural-parts.js';
|
|
3
|
+
import { type StylingProps } from './styling.js';
|
|
1
4
|
import { type ReactNode } from 'react';
|
|
2
5
|
import type { ButtonVariant } from './Button.js';
|
|
3
6
|
import type { DialogSize, DialogPlacement, DialogScroll, DialogBackdrop } from './overlay-model.js';
|
|
4
|
-
export
|
|
7
|
+
export type DialogPart = 'root' | 'trigger' | 'backdrop' | 'panel' | 'content' | 'header' | 'title' | 'description' | 'body' | 'footer' | 'close' | 'footerClose';
|
|
8
|
+
export interface DialogProps extends StylingProps<DialogPart> {
|
|
5
9
|
triggerLabel: string;
|
|
6
10
|
title: string;
|
|
7
11
|
description?: string;
|
|
@@ -26,4 +30,18 @@ export interface DialogProps {
|
|
|
26
30
|
showFooterClose?: boolean;
|
|
27
31
|
closeIconLabel?: string;
|
|
28
32
|
}
|
|
29
|
-
|
|
33
|
+
declare function DialogComponent(props: DialogProps | DialogRootProps): import("react").JSX.Element;
|
|
34
|
+
export declare const Dialog: typeof DialogComponent & {
|
|
35
|
+
Root: typeof DialogRoot;
|
|
36
|
+
Trigger: ({ className, ...props }: import("react-aria-components").ButtonProps & import("react").RefAttributes<HTMLButtonElement>) => import("react").ReactElement<import("react-aria-components").ButtonProps & import("react").RefAttributes<HTMLButtonElement>, string | import("react").JSXElementConstructor<any>>;
|
|
37
|
+
Backdrop: ({ className, ...props }: import("react-aria-components").ModalOverlayProps & import("react").RefAttributes<HTMLDivElement>) => import("react").ReactElement<import("react-aria-components").ModalOverlayProps & import("react").RefAttributes<HTMLDivElement>, string | import("react").JSXElementConstructor<any>>;
|
|
38
|
+
Panel: ({ className, ...props }: import("react-aria-components").ModalOverlayProps & import("react").RefAttributes<HTMLDivElement>) => import("react").ReactElement<import("react-aria-components").ModalOverlayProps & import("react").RefAttributes<HTMLDivElement>, string | import("react").JSXElementConstructor<any>>;
|
|
39
|
+
Content: typeof DialogContent;
|
|
40
|
+
Header: ({ className, ...props }: import("react").HTMLAttributes<HTMLDivElement>) => import("react").JSX.Element;
|
|
41
|
+
Heading: typeof OverlayHeading;
|
|
42
|
+
Description: typeof OverlayDescription;
|
|
43
|
+
Body: ({ className, ...props }: import("react").HTMLAttributes<HTMLDivElement>) => import("react").JSX.Element;
|
|
44
|
+
Footer: ({ className, ...props }: import("react").HTMLAttributes<HTMLDivElement>) => import("react").JSX.Element;
|
|
45
|
+
CloseButton: typeof DialogCloseButton;
|
|
46
|
+
};
|
|
47
|
+
export {};
|
|
@@ -1,8 +1,13 @@
|
|
|
1
|
+
import { DropdownItemIndicator, DropdownSubmenuIndicator, type DropdownRootProps } from './structural-parts.js';
|
|
2
|
+
import { DropdownRoot, DropdownList } from './structural-parts.js';
|
|
3
|
+
import { type StylingProps } from './styling.js';
|
|
1
4
|
import { type ReactNode } from 'react';
|
|
5
|
+
import { type PopoverProps } from 'react-aria-components/Popover';
|
|
2
6
|
import { type MenuSelectionMode, type MenuPlacement } from './overlay-model.js';
|
|
3
7
|
import type { DropdownMenuItem } from './dashboard-types.js';
|
|
4
|
-
import type { ButtonVariant } from './Button.js';
|
|
5
|
-
export
|
|
8
|
+
import type { ButtonVariant, ButtonSize } from './Button.js';
|
|
9
|
+
export type DropdownMenuPart = 'root' | 'trigger' | 'panel' | 'list' | 'item' | 'check' | 'icon' | 'text' | 'description' | 'shortcut' | 'arrow' | 'separator' | 'heading' | 'section';
|
|
10
|
+
export interface DropdownMenuProps extends StylingProps<DropdownMenuPart> {
|
|
6
11
|
triggerLabel: string;
|
|
7
12
|
items: DropdownMenuItem[];
|
|
8
13
|
onAction?: (id: string) => void;
|
|
@@ -14,6 +19,7 @@ export interface DropdownMenuProps {
|
|
|
14
19
|
triggerContent?: ReactNode;
|
|
15
20
|
triggerIconOnly?: boolean;
|
|
16
21
|
triggerVariant?: ButtonVariant;
|
|
22
|
+
triggerSize?: ButtonSize;
|
|
17
23
|
renderIcon?: (item: DropdownMenuItem) => ReactNode;
|
|
18
24
|
selectionMode?: MenuSelectionMode;
|
|
19
25
|
selectedKeys?: string[];
|
|
@@ -22,4 +28,18 @@ export interface DropdownMenuProps {
|
|
|
22
28
|
closeOnSelect?: boolean;
|
|
23
29
|
placement?: MenuPlacement;
|
|
24
30
|
}
|
|
25
|
-
|
|
31
|
+
declare function DropdownMenuComponent(props: DropdownMenuProps | DropdownRootProps): import("react").JSX.Element;
|
|
32
|
+
export declare const DropdownMenu: typeof DropdownMenuComponent & {
|
|
33
|
+
Root: typeof DropdownRoot;
|
|
34
|
+
Trigger: ({ className, ...props }: import("react-aria-components").ButtonProps & import("react").RefAttributes<HTMLButtonElement>) => import("react").ReactElement<import("react-aria-components").ButtonProps & import("react").RefAttributes<HTMLButtonElement>, string | import("react").JSXElementConstructor<any>>;
|
|
35
|
+
Popover: ({ className, ...props }: PopoverProps & import("react").RefAttributes<HTMLElement>) => import("react").ReactElement<PopoverProps & import("react").RefAttributes<HTMLElement>, string | import("react").JSXElementConstructor<any>>;
|
|
36
|
+
Menu: typeof DropdownList;
|
|
37
|
+
Item: ({ className, ...props }: import("react-aria-components").MenuItemProps<unknown> & import("react").RefAttributes<HTMLDivElement>) => import("react").ReactElement<import("react-aria-components").MenuItemProps<unknown> & import("react").RefAttributes<HTMLDivElement>, string | import("react").JSXElementConstructor<any>>;
|
|
38
|
+
Section: <T>(props: import("react-aria-components").MenuSectionProps<T> & React.RefAttributes<HTMLElement>) => import("react").ReactElement | null;
|
|
39
|
+
Heading: ({ className, ...props }: import("react-aria-components").HeaderProps & import("react").RefAttributes<HTMLElement>) => import("react").ReactElement<import("react-aria-components").HeaderProps & import("react").RefAttributes<HTMLElement>, string | import("react").JSXElementConstructor<any>>;
|
|
40
|
+
Separator: ({ className, ...props }: import("react-aria-components").SeparatorProps & import("react").RefAttributes<HTMLElement>) => import("react").ReactElement<import("react-aria-components").SeparatorProps & import("react").RefAttributes<HTMLElement>, string | import("react").JSXElementConstructor<any>>;
|
|
41
|
+
ItemIndicator: typeof DropdownItemIndicator;
|
|
42
|
+
SubmenuTrigger: (props: import("react-aria-components").SubmenuTriggerProps & React.RefAttributes<HTMLDivElement>) => import("react").ReactElement | null;
|
|
43
|
+
SubmenuIndicator: typeof DropdownSubmenuIndicator;
|
|
44
|
+
};
|
|
45
|
+
export {};
|
package/dist/types/Empty.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import { EmptyRoot, EmptyTitle, EmptyDescription, EmptyActions } from './layout-parts.js';
|
|
2
|
+
import { type StylingProps } from './styling.js';
|
|
1
3
|
import type { ReactNode } from 'react';
|
|
2
|
-
export
|
|
4
|
+
export type EmptyPart = 'root' | 'title' | 'description' | 'actions';
|
|
5
|
+
export interface EmptyProps extends StylingProps<EmptyPart> {
|
|
3
6
|
title: string;
|
|
4
7
|
description?: string;
|
|
5
8
|
headingLevel?: 2 | 3 | 4 | 5 | 6;
|
|
@@ -7,4 +10,11 @@ export interface EmptyProps {
|
|
|
7
10
|
children?: ReactNode;
|
|
8
11
|
id?: string;
|
|
9
12
|
}
|
|
10
|
-
|
|
13
|
+
declare function CompactEmpty({ className, style, classNames, title, description, headingLevel, actions, children, id, }: EmptyProps): import("react").JSX.Element;
|
|
14
|
+
export declare const Empty: typeof CompactEmpty & {
|
|
15
|
+
Root: typeof EmptyRoot;
|
|
16
|
+
Title: typeof EmptyTitle;
|
|
17
|
+
Description: typeof EmptyDescription;
|
|
18
|
+
Actions: typeof EmptyActions;
|
|
19
|
+
};
|
|
20
|
+
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type StylingProps } from './styling.js';
|
|
1
2
|
import { type ReactNode } from 'react';
|
|
2
3
|
/** Bind these props to exactly one native input, textarea, or select. */
|
|
3
4
|
export interface FieldControlProps {
|
|
@@ -17,7 +18,7 @@ export interface FieldRenderProps {
|
|
|
17
18
|
errorMessage: string | undefined;
|
|
18
19
|
}
|
|
19
20
|
/** Experimental composition API; the application owns the control value. */
|
|
20
|
-
export interface FieldProps {
|
|
21
|
+
export interface FieldProps extends StylingProps<'root' | 'description' | 'error' | 'label' | 'input'> {
|
|
21
22
|
label: string;
|
|
22
23
|
name: string;
|
|
23
24
|
children: (field: FieldRenderProps) => ReactNode;
|
|
@@ -30,4 +31,4 @@ export interface FieldProps {
|
|
|
30
31
|
isRequired?: boolean;
|
|
31
32
|
dir?: 'ltr' | 'rtl';
|
|
32
33
|
}
|
|
33
|
-
export declare function Field({ label, name, children, id, description, errorMessage, isInvalid, isDisabled, isReadOnly, isRequired, dir, }: FieldProps): import("react").JSX.Element;
|
|
34
|
+
export declare function Field({ label, name, children, id, description, errorMessage, isInvalid, isDisabled, isReadOnly, isRequired, dir, className, style, classNames, }: FieldProps): import("react").JSX.Element;
|
package/dist/types/Form.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { type StylingProps } from './styling.js';
|
|
1
2
|
import type { FormEvent, ReactNode } from 'react';
|
|
2
3
|
import { type ValidationErrors } from './form-context.js';
|
|
3
4
|
/** Experimental client form. Submission always prevents page navigation. */
|
|
4
|
-
export interface FormProps {
|
|
5
|
+
export interface FormProps extends StylingProps<'root'> {
|
|
5
6
|
children: ReactNode;
|
|
6
7
|
validationErrors?: ValidationErrors;
|
|
7
8
|
onSubmit?: (data: FormData, event: FormEvent<HTMLFormElement>) => void;
|
|
@@ -14,4 +15,4 @@ export interface FormProps {
|
|
|
14
15
|
'aria-labelledby'?: string;
|
|
15
16
|
dir?: 'ltr' | 'rtl';
|
|
16
17
|
}
|
|
17
|
-
export declare function Form({ children, validationErrors, onSubmit, onReset, noValidate, id, 'aria-label': ariaLabel, 'aria-labelledby': labelledBy, dir, }: FormProps): import("react").JSX.Element;
|
|
18
|
+
export declare function Form({ children, validationErrors, onSubmit, onReset, noValidate, id, 'aria-label': ariaLabel, 'aria-labelledby': labelledBy, dir, className, style, classNames, }: FormProps): import("react").JSX.Element;
|