burne-ui 1.7.6 → 1.7.7
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/core/Breadcrumbs/breadcrumbsTypes.d.ts +1 -1
- package/dist/components/core/Disclosure/Disclosure.d.ts +4 -4
- package/dist/components/core/Disclosure/disclosureAPI.d.ts +8 -0
- package/dist/components/core/Disclosure/disclosureParts.d.ts +11 -1
- package/dist/components/core/Disclosure/disclosureStyles.d.ts +7 -0
- package/dist/components/core/Disclosure/disclosureTypes.d.ts +13 -7
- package/dist/components/core/Disclosure/index.d.ts +7 -4
- package/dist/components/core/Disclosure/useDisclosureRootState.d.ts +1 -1
- package/dist/components/core/Dropdown/dropdownTypes.d.ts +4 -4
- package/dist/components/core/Field/Field.d.ts +1 -1
- package/dist/components/core/Field/fieldContext.d.ts +4 -4
- package/dist/components/core/Field/fieldParts.d.ts +7 -4
- package/dist/components/core/Field/fieldStyles.d.ts +31 -8
- package/dist/components/core/Field/fieldTypes.d.ts +12 -1
- package/dist/components/core/Field/index.d.ts +3 -3
- package/dist/components/core/Label/Label.d.ts +1 -1
- package/dist/components/core/Label/labelParts.d.ts +1 -1
- package/dist/components/core/Label/labelTypes.d.ts +4 -0
- package/dist/components/core/Link/Link.d.ts +1 -1
- package/dist/components/core/Link/index.d.ts +1 -1
- package/dist/components/core/Link/linkTypes.d.ts +5 -7
- package/dist/components/core/Table/tableTypes.d.ts +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +8435 -8281
- package/dist/ui.css +10 -10
- package/package.json +1 -1
|
@@ -12,7 +12,7 @@ export type BreadcrumbsClassNames = {
|
|
|
12
12
|
/** `<span>` wrapper on `Breadcrumbs.Separator`. */
|
|
13
13
|
separatorWrapper?: string;
|
|
14
14
|
/** Current page content (`aria-current="page"`) — Item sub-slot. */
|
|
15
|
-
|
|
15
|
+
itemActive?: string;
|
|
16
16
|
/** Link / button inside interactive crumb — Item sub-slot. */
|
|
17
17
|
itemLink?: string;
|
|
18
18
|
/** `<span>` wrapper around crumb link — Item sub-slot. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DisclosureContent, DisclosureHandleInner, DisclosureTrigger } from './disclosureParts';
|
|
2
|
-
export type { DisclosureProps, DisclosureGroupProps, DisclosureTriggerProps, DisclosureHandleProps, DisclosureContentProps, DisclosureVariant, DisclosureSize,
|
|
1
|
+
import { DisclosureContent, DisclosureHandleInner, DisclosureTrigger, DisclosureIcon, DisclosureChevron } from './disclosureParts';
|
|
2
|
+
export type { DisclosureProps, DisclosureGroupProps, DisclosureTriggerProps, DisclosureHandleProps, DisclosureContentProps, DisclosureIconProps, DisclosureChevronProps, DisclosureVariant, DisclosureSize, DisclosureChevronPos, DisclosureClassNames, } from './disclosureTypes';
|
|
3
3
|
export declare const DisclosureRoot: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & {
|
|
4
4
|
children?: import('react').ReactNode;
|
|
5
5
|
open?: boolean;
|
|
@@ -9,8 +9,8 @@ export declare const DisclosureRoot: import('react').ForwardRefExoticComponent<i
|
|
|
9
9
|
variant?: import('./disclosureTypes').DisclosureVariant;
|
|
10
10
|
size?: import('./disclosureTypes').DisclosureSize;
|
|
11
11
|
disabled?: boolean;
|
|
12
|
-
|
|
12
|
+
chevronPosition?: import('../utils/iconPosition').IconPosition;
|
|
13
13
|
dragHandle?: boolean;
|
|
14
14
|
classNames?: import('../../..').Prettify<import('./disclosureTypes').DisclosureClassNames>;
|
|
15
15
|
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
16
|
-
export { DisclosureTrigger, DisclosureHandleInner, DisclosureContent, };
|
|
16
|
+
export { DisclosureTrigger, DisclosureHandleInner, DisclosureContent, DisclosureIcon, DisclosureChevron, };
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { DisclosureVariant } from './disclosureTypes';
|
|
3
|
+
export type ResolvedDisclosureTriggerBody = {
|
|
4
|
+
icon: ReactNode | null;
|
|
5
|
+
chevron: ReactNode | null;
|
|
6
|
+
title: ReactNode;
|
|
7
|
+
hasIconPart: boolean;
|
|
8
|
+
hasChevronPart: boolean;
|
|
9
|
+
};
|
|
3
10
|
export declare function isFramedVariant(variant: DisclosureVariant): boolean;
|
|
4
11
|
export declare function readDisclosurePartDisplayName(type: unknown): string | undefined;
|
|
12
|
+
export declare function resolveDisclosureTriggerBody(children: ReactNode): ResolvedDisclosureTriggerBody;
|
|
5
13
|
export declare function orderDragHandleChildren(children: ReactNode): ReactNode[];
|
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
|
+
import { DisclosureChevronProps, DisclosureIconProps } from './disclosureTypes';
|
|
3
|
+
export declare function DisclosureIcon({ className, children, ...props }: DisclosureIconProps): import("react/jsx-runtime").JSX.Element | null;
|
|
4
|
+
export declare namespace DisclosureIcon {
|
|
5
|
+
var displayName: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function DisclosureChevron({ className, children, ...props }: DisclosureChevronProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare namespace DisclosureChevron {
|
|
9
|
+
var displayName: string;
|
|
10
|
+
}
|
|
2
11
|
export declare const DisclosureTrigger: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLButtonElement> & {
|
|
3
12
|
children?: import('react').ReactNode;
|
|
4
|
-
icon?: import('react').ReactNode
|
|
13
|
+
icon?: import('react').ReactNode;
|
|
14
|
+
chevron?: import('react').ReactNode | null;
|
|
5
15
|
asChild?: boolean;
|
|
6
16
|
} & import('react').RefAttributes<HTMLButtonElement>>;
|
|
7
17
|
export { DisclosureHandleInner } from './disclosureHandleInnerPart';
|
|
@@ -5,6 +5,7 @@ export declare const DISCLOSURE_TRIGGER_DISABLED_CLASS = "cursor-not-allowed opa
|
|
|
5
5
|
export declare const DISCLOSURE_TRIGGER_ENABLED_CLASS = "cursor-pointer";
|
|
6
6
|
export declare const DISCLOSURE_TRIGGER_TITLE_LIFT_CLASS = "min-w-0 flex-1 origin-center";
|
|
7
7
|
export declare const DISCLOSURE_TRIGGER_TITLE_CLASS = "block";
|
|
8
|
+
export declare const DISCLOSURE_TRIGGER_ICON_BASE_CLASS = "inline-flex shrink-0 text-primary [&_svg]:size-full";
|
|
8
9
|
export declare const DISCLOSURE_TRIGGER_CHEVRON_BASE_CLASS = "inline-flex shrink-0 origin-center items-center justify-center text-muted";
|
|
9
10
|
export declare const DISCLOSURE_TRIGGER_CHEVRON_ICON_CLASS = "size-full";
|
|
10
11
|
export declare const DISCLOSURE_TRIGGER_CHEVRON_OPEN_CLASS = "text-primary";
|
|
@@ -18,8 +19,14 @@ export declare function disclosureTriggerShell(size: DisclosureSize): {
|
|
|
18
19
|
pad: string;
|
|
19
20
|
text: import('../Text').TextVariant;
|
|
20
21
|
titleClassName: string;
|
|
22
|
+
icon: string;
|
|
21
23
|
chevron: string;
|
|
22
24
|
};
|
|
25
|
+
export declare function disclosureTriggerIconClass({ size, className, slotClass, }: {
|
|
26
|
+
size: DisclosureSize;
|
|
27
|
+
className?: string;
|
|
28
|
+
slotClass?: string;
|
|
29
|
+
}): string;
|
|
23
30
|
export declare function disclosureRootClass({ variant, groupedCardShell, className, slotClass, }: {
|
|
24
31
|
variant: DisclosureVariant;
|
|
25
32
|
groupedCardShell: boolean;
|
|
@@ -5,13 +5,14 @@ import { IconPosition } from '../utils/iconPosition';
|
|
|
5
5
|
export type DisclosureVariant = "default" | "outline" | "secondary" | "card" | "ghost" | "gloss";
|
|
6
6
|
export type DisclosureSize = ComponentSize;
|
|
7
7
|
/** Alias of shared `IconPosition` (chevron start/end). */
|
|
8
|
-
export type
|
|
8
|
+
export type DisclosureChevronPos = IconPosition;
|
|
9
9
|
export type DisclosureClassNames = {
|
|
10
10
|
root?: string;
|
|
11
11
|
trigger?: string;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
titleLift?: string;
|
|
13
|
+
title?: string;
|
|
14
|
+
icon?: string;
|
|
15
|
+
chevron?: string;
|
|
15
16
|
contentShell?: string;
|
|
16
17
|
contentWrap?: string;
|
|
17
18
|
contentPanel?: string;
|
|
@@ -36,7 +37,7 @@ export type DisclosureContextValue = {
|
|
|
36
37
|
variant: DisclosureVariant;
|
|
37
38
|
size: DisclosureSize;
|
|
38
39
|
disabled: boolean;
|
|
39
|
-
|
|
40
|
+
chevronPosition: IconPosition;
|
|
40
41
|
dragHandle: boolean;
|
|
41
42
|
shellRef: RefObject<HTMLDivElement | null>;
|
|
42
43
|
innerRef: RefObject<HTMLDivElement | null>;
|
|
@@ -56,7 +57,7 @@ export type DisclosureProps = HTMLAttributes<HTMLDivElement> & {
|
|
|
56
57
|
variant?: DisclosureVariant;
|
|
57
58
|
size?: DisclosureSize;
|
|
58
59
|
disabled?: boolean;
|
|
59
|
-
|
|
60
|
+
chevronPosition?: IconPosition;
|
|
60
61
|
dragHandle?: boolean;
|
|
61
62
|
classNames?: Prettify<DisclosureClassNames>;
|
|
62
63
|
};
|
|
@@ -73,9 +74,14 @@ export type DisclosureGroupProps = HTMLAttributes<HTMLDivElement> & {
|
|
|
73
74
|
};
|
|
74
75
|
export type DisclosureTriggerProps = HTMLAttributes<HTMLButtonElement> & {
|
|
75
76
|
children?: ReactNode;
|
|
76
|
-
icon
|
|
77
|
+
/** Leading indicator icon (left of title). */
|
|
78
|
+
icon?: ReactNode;
|
|
79
|
+
/** Expand chevron; `null` hides the default chevron. */
|
|
80
|
+
chevron?: ReactNode | null;
|
|
77
81
|
asChild?: boolean;
|
|
78
82
|
};
|
|
83
|
+
export type DisclosureIconProps = HTMLAttributes<HTMLSpanElement>;
|
|
84
|
+
export type DisclosureChevronProps = HTMLAttributes<HTMLSpanElement>;
|
|
79
85
|
export type DisclosureHandleProps = HTMLAttributes<HTMLDivElement>;
|
|
80
86
|
export type DisclosureContentProps = HTMLAttributes<HTMLDivElement> & {
|
|
81
87
|
children?: ReactNode;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DisclosureHandleInner } from './Disclosure';
|
|
1
|
+
import { DisclosureChevron, DisclosureHandleInner, DisclosureIcon } from './Disclosure';
|
|
2
2
|
export declare const Disclosure: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & {
|
|
3
3
|
children?: import('react').ReactNode;
|
|
4
4
|
open?: boolean;
|
|
@@ -8,15 +8,18 @@ export declare const Disclosure: import('react').ForwardRefExoticComponent<impor
|
|
|
8
8
|
variant?: import('./disclosureTypes').DisclosureVariant;
|
|
9
9
|
size?: import('./disclosureTypes').DisclosureSize;
|
|
10
10
|
disabled?: boolean;
|
|
11
|
-
|
|
11
|
+
chevronPosition?: import('../utils/iconPosition').IconPosition;
|
|
12
12
|
dragHandle?: boolean;
|
|
13
13
|
classNames?: import('../../..').Prettify<import('./disclosureTypes').DisclosureClassNames>;
|
|
14
14
|
} & import('react').RefAttributes<HTMLDivElement>> & {
|
|
15
15
|
Trigger: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLButtonElement> & {
|
|
16
16
|
children?: import('react').ReactNode;
|
|
17
|
-
icon?: import('react').ReactNode
|
|
17
|
+
icon?: import('react').ReactNode;
|
|
18
|
+
chevron?: import('react').ReactNode | null;
|
|
18
19
|
asChild?: boolean;
|
|
19
20
|
} & import('react').RefAttributes<HTMLButtonElement>>;
|
|
21
|
+
Icon: typeof DisclosureIcon;
|
|
22
|
+
Chevron: typeof DisclosureChevron;
|
|
20
23
|
Handle: typeof DisclosureHandleInner;
|
|
21
24
|
Content: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & {
|
|
22
25
|
children?: import('react').ReactNode;
|
|
@@ -33,4 +36,4 @@ export declare const Disclosure: import('react').ForwardRefExoticComponent<impor
|
|
|
33
36
|
classNames?: import('../../..').Prettify<import('./disclosureTypes').DisclosureClassNames>;
|
|
34
37
|
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
35
38
|
};
|
|
36
|
-
export type { DisclosureProps, DisclosureGroupProps, DisclosureTriggerProps, DisclosureHandleProps, DisclosureContentProps, DisclosureVariant, DisclosureSize,
|
|
39
|
+
export type { DisclosureProps, DisclosureGroupProps, DisclosureTriggerProps, DisclosureHandleProps, DisclosureContentProps, DisclosureIconProps, DisclosureChevronProps, DisclosureVariant, DisclosureSize, DisclosureChevronPos, DisclosureClassNames, } from './disclosureTypes';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DisclosureContextValue, UseDisclosureRootStateProps } from './disclosureTypes';
|
|
2
|
-
export declare function useDisclosureRootState({ children, open: openProp, defaultOpen, onOpenChange, value, variant: variantProp, size: sizeProp, disabled,
|
|
2
|
+
export declare function useDisclosureRootState({ children, open: openProp, defaultOpen, onOpenChange, value, variant: variantProp, size: sizeProp, disabled, chevronPosition, dragHandle, }: UseDisclosureRootStateProps): {
|
|
3
3
|
contextValue: DisclosureContextValue;
|
|
4
4
|
variant: import('./disclosureTypes').DisclosureVariant;
|
|
5
5
|
groupedCardShell: boolean;
|
|
@@ -23,10 +23,10 @@ export type DropdownClassNames = {
|
|
|
23
23
|
sub?: string;
|
|
24
24
|
subTrigger?: string;
|
|
25
25
|
subTriggerLabelWrap?: string;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
subTriggerIcon?: string;
|
|
27
|
+
subPopover?: string;
|
|
28
|
+
subPopoverGlossPanel?: string;
|
|
29
|
+
subPopoverBody?: string;
|
|
30
30
|
};
|
|
31
31
|
export type DropdownProps = Omit<HTMLAttributes<HTMLDivElement>, "children"> & {
|
|
32
32
|
children: ReactNode;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FieldError, FieldHint, FieldLabel, FieldLegend, FieldLegendHeader, FieldRoot, FieldSetActions, FieldSetGroup } from './fieldParts';
|
|
2
|
-
export type { FieldProps, FieldHintProps, FieldHintStatus, FieldLabelProps, FieldErrorProps, FieldSetProps, FieldSetGroupProps, FieldSetActionsProps, FieldLegendProps, FieldLegendHeaderProps, FieldSetSize, FieldClassNames, FieldSetClassNames, } from './fieldTypes';
|
|
2
|
+
export type { FieldProps, FieldHintProps, FieldHintStatus, FieldLabelProps, FieldErrorProps, FieldSetProps, FieldSetGroupProps, FieldSetActionsProps, FieldLegendProps, FieldLegendHeaderProps, FieldSetSize, FieldSize, FieldClassNames, FieldSetClassNames, } from './fieldTypes';
|
|
3
3
|
export { FieldRoot };
|
|
4
4
|
export declare const FieldSetRoot: import('react').ForwardRefExoticComponent<Omit<import('react').FieldsetHTMLAttributes<HTMLFieldSetElement>, "children"> & {
|
|
5
5
|
children?: import('react').ReactNode;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { FieldClassNames, FieldClassNamesProviderProps, FieldSetClassNames, FieldSetClassNamesProviderProps } from './fieldTypes';
|
|
2
|
+
import { FieldClassNames, FieldClassNamesProviderProps, FieldSetClassNames, FieldSetClassNamesProviderProps, FieldSize } from './fieldTypes';
|
|
4
3
|
export declare function FieldClassNamesProvider({ classNames, children, }: FieldClassNamesProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
5
4
|
export declare function useFieldClassNames(): FieldClassNames;
|
|
6
5
|
export declare function FieldSetClassNamesProvider({ classNames, children, }: FieldSetClassNamesProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
7
6
|
export declare function useFieldSetClassNames(): FieldSetClassNames;
|
|
8
7
|
export declare function FieldSetSizeProvider({ size, children, }: {
|
|
9
|
-
size:
|
|
8
|
+
size: FieldSize;
|
|
10
9
|
children: ReactNode;
|
|
11
10
|
}): import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
export declare function
|
|
11
|
+
export declare function useOptionalFieldSize(): FieldSize | null;
|
|
12
|
+
export declare function useFieldSetSize(): FieldSize;
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { FieldErrorProps, FieldLegendHeaderProps, FieldProps, FieldSetProps, UseFieldSetRootStateResult } from './fieldTypes';
|
|
3
|
-
export declare function FieldRootShell({ className, children, ...rest }: Omit<FieldProps, "classNames">): import("react/jsx-runtime").JSX.Element;
|
|
4
|
-
export declare function FieldRoot({ classNames, ...rest }: FieldProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
import { FieldErrorProps, FieldLabelProps, FieldLegendHeaderProps, FieldProps, FieldSetProps, UseFieldSetRootStateResult } from './fieldTypes';
|
|
3
|
+
export declare function FieldRootShell({ className, size: sizeProp, children, ...rest }: Omit<FieldProps, "classNames">): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare function FieldRoot({ classNames, size, children, ...rest }: FieldProps): import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
export declare const FieldHint: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLElement> & {
|
|
6
6
|
children?: ReactNode;
|
|
7
7
|
status?: import('./fieldTypes').FieldHintStatus;
|
|
8
8
|
as?: "p" | "span";
|
|
9
9
|
variant?: import('../Text').TextVariant;
|
|
10
10
|
} & import('react').RefAttributes<HTMLElement>>;
|
|
11
|
-
export declare
|
|
11
|
+
export declare function FieldLabel({ variant: variantProp, ...rest }: FieldLabelProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare namespace FieldLabel {
|
|
13
|
+
var displayName: string;
|
|
14
|
+
}
|
|
12
15
|
export declare function FieldError({ role, className, ...props }: FieldErrorProps): import("react/jsx-runtime").JSX.Element;
|
|
13
16
|
export declare const FieldLegend: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLLegendElement> & {
|
|
14
17
|
children?: ReactNode;
|
|
@@ -1,37 +1,60 @@
|
|
|
1
|
+
import { TextVariant } from '../Text';
|
|
1
2
|
import { ComponentSize } from '../utils/sizeLayout';
|
|
2
3
|
import { FieldHintStatus } from './fieldTypes';
|
|
3
|
-
export type
|
|
4
|
+
export type FieldSize = ComponentSize;
|
|
5
|
+
export type FieldSizeLayout = {
|
|
6
|
+
/** Gap between Field Label / control / Hint */
|
|
7
|
+
fieldGap: string;
|
|
4
8
|
legendGap: string;
|
|
9
|
+
legendHeaderGap: string;
|
|
5
10
|
stackGap: string;
|
|
6
11
|
groupGap: string;
|
|
7
12
|
actionsGap: string;
|
|
13
|
+
labelVariant: TextVariant;
|
|
14
|
+
hintVariant: TextVariant;
|
|
8
15
|
};
|
|
9
|
-
export declare const
|
|
16
|
+
export declare const FIELD_ROOT_BASE_CLASS = "flex w-full flex-col";
|
|
10
17
|
export declare const FIELD_HINT_STATUS_CLASS: Record<FieldHintStatus, string>;
|
|
11
18
|
export declare const FIELD_SET_CLASS = "m-0 min-w-0 border-0 p-0 disabled:pointer-events-none disabled:opacity-55";
|
|
12
19
|
export declare const FIELD_SET_STACK_BASE_CLASS = "flex min-w-0 w-full flex-col";
|
|
13
20
|
export declare const FIELD_LEGEND_CLASS = "m-0 block w-full max-w-full border-0 p-0";
|
|
14
|
-
export declare const
|
|
21
|
+
export declare const FIELD_LEGEND_HEADER_BASE_CLASS = "flex w-fit flex-col";
|
|
15
22
|
export declare const FIELD_SET_GROUP_BASE_CLASS = "flex min-w-0 w-full flex-col";
|
|
16
|
-
export declare const FIELD_SET_ACTIONS_BASE_CLASS = "flex flex-wrap
|
|
17
|
-
export declare const
|
|
23
|
+
export declare const FIELD_SET_ACTIONS_BASE_CLASS = "flex w-fit flex-wrap items-center";
|
|
24
|
+
export declare const FIELD_SIZE_LAYOUT: Record<FieldSize, FieldSizeLayout>;
|
|
25
|
+
/** Alias — same grid as `FIELD_SIZE_LAYOUT`. */
|
|
26
|
+
export declare const FIELD_SET_SIZE_LAYOUT: Record<ComponentSize, FieldSizeLayout>;
|
|
27
|
+
export declare function resolveFieldSize(size?: FieldSize): FieldSize;
|
|
28
|
+
export declare function fieldSizeLayout(size?: FieldSize): FieldSizeLayout;
|
|
29
|
+
export declare function fieldRootClass({ size, className, slotClass, }: {
|
|
30
|
+
size?: FieldSize;
|
|
31
|
+
className?: string;
|
|
32
|
+
slotClass?: string;
|
|
33
|
+
}): string;
|
|
18
34
|
export declare function fieldHintClass({ status, className, slotClass, }: {
|
|
19
35
|
status: FieldHintStatus;
|
|
20
36
|
className?: string;
|
|
21
37
|
slotClass?: string;
|
|
22
38
|
}): string;
|
|
39
|
+
export declare function fieldHintVariant(size?: FieldSize): TextVariant;
|
|
40
|
+
export declare function fieldLabelVariant(size?: FieldSize): TextVariant;
|
|
41
|
+
export declare function fieldLegendHeaderClass({ size, className, slotClass, }: {
|
|
42
|
+
size?: FieldSize;
|
|
43
|
+
className?: string;
|
|
44
|
+
slotClass?: string;
|
|
45
|
+
}): string;
|
|
23
46
|
export declare function fieldSetStackClass({ size, hasLegend, slotClass, }: {
|
|
24
|
-
size:
|
|
47
|
+
size: FieldSize;
|
|
25
48
|
hasLegend: boolean;
|
|
26
49
|
slotClass?: string;
|
|
27
50
|
}): string;
|
|
28
51
|
export declare function fieldSetGroupClass({ size, className, slotClass, }: {
|
|
29
|
-
size:
|
|
52
|
+
size: FieldSize;
|
|
30
53
|
className?: string;
|
|
31
54
|
slotClass?: string;
|
|
32
55
|
}): string;
|
|
33
56
|
export declare function fieldSetActionsClass({ size, className, slotClass, }: {
|
|
34
|
-
size:
|
|
57
|
+
size: FieldSize;
|
|
35
58
|
className?: string;
|
|
36
59
|
slotClass?: string;
|
|
37
60
|
}): string;
|
|
@@ -5,7 +5,8 @@ import { TextVariant } from '../Text';
|
|
|
5
5
|
import { ComponentSize } from '../utils/sizeLayout';
|
|
6
6
|
import { SemanticStatus } from '../utils/semanticStatusIcons';
|
|
7
7
|
export type FieldHintStatus = SemanticStatus;
|
|
8
|
-
export type
|
|
8
|
+
export type FieldSize = ComponentSize;
|
|
9
|
+
export type FieldSetSize = FieldSize;
|
|
9
10
|
export type FieldClassNames = {
|
|
10
11
|
root?: string;
|
|
11
12
|
hint?: string;
|
|
@@ -22,6 +23,12 @@ export type FieldSetClassNames = {
|
|
|
22
23
|
export type FieldProps = HTMLAttributes<HTMLDivElement> & {
|
|
23
24
|
children?: ReactNode;
|
|
24
25
|
classNames?: Prettify<FieldClassNames>;
|
|
26
|
+
/**
|
|
27
|
+
* Scales Field chrome (gap, Label / Hint / Error type).
|
|
28
|
+
* Inside `Field.Set`, inherits Set size unless overridden.
|
|
29
|
+
* Does not cascade into embedded controls.
|
|
30
|
+
*/
|
|
31
|
+
size?: FieldSize;
|
|
25
32
|
};
|
|
26
33
|
export type FieldClassNamesProviderProps = {
|
|
27
34
|
classNames?: Prettify<FieldClassNames>;
|
|
@@ -55,6 +62,10 @@ export type FieldSetProps = Omit<FieldsetHTMLAttributes<HTMLFieldSetElement>, "c
|
|
|
55
62
|
children?: ReactNode;
|
|
56
63
|
hintId?: string;
|
|
57
64
|
errorId?: string;
|
|
65
|
+
/**
|
|
66
|
+
* Scales Set chrome (stack / group / actions gaps, legend header, Label / Hint type via context).
|
|
67
|
+
* Does not cascade into embedded controls (`Input`, `Button`, …).
|
|
68
|
+
*/
|
|
58
69
|
size?: FieldSetSize;
|
|
59
70
|
classNames?: Prettify<FieldSetClassNames>;
|
|
60
71
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FieldError, FieldLegendHeader, FieldRoot, useFieldSetErrorId, useFieldSetHintId } from './Field';
|
|
1
|
+
import { FieldError, FieldLabel, FieldLegendHeader, FieldRoot, useFieldSetErrorId, useFieldSetHintId } from './Field';
|
|
2
2
|
import { fieldErrorId, fieldHintId, joinFieldDescribedBy } from './fieldA11y';
|
|
3
3
|
export declare const Field: typeof FieldRoot & {
|
|
4
4
|
Hint: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLElement> & {
|
|
@@ -7,7 +7,7 @@ export declare const Field: typeof FieldRoot & {
|
|
|
7
7
|
as?: "p" | "span";
|
|
8
8
|
variant?: import('../Text').TextVariant;
|
|
9
9
|
} & import('react').RefAttributes<HTMLElement>>;
|
|
10
|
-
Label:
|
|
10
|
+
Label: typeof FieldLabel;
|
|
11
11
|
Error: typeof FieldError;
|
|
12
12
|
Set: import('react').ForwardRefExoticComponent<Omit<import('react').FieldsetHTMLAttributes<HTMLFieldSetElement>, "children"> & {
|
|
13
13
|
children?: import('react').ReactNode;
|
|
@@ -39,4 +39,4 @@ export declare const Field: typeof FieldRoot & {
|
|
|
39
39
|
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
40
40
|
};
|
|
41
41
|
export { useFieldSetHintId, useFieldSetErrorId, joinFieldDescribedBy, fieldHintId, fieldErrorId, };
|
|
42
|
-
export type { FieldProps, FieldHintProps, FieldHintStatus, FieldLabelProps, FieldErrorProps, FieldSetProps, FieldSetGroupProps, FieldSetActionsProps, FieldLegendProps, FieldLegendHeaderProps, FieldSetSize, FieldClassNames, FieldSetClassNames, } from './fieldTypes';
|
|
42
|
+
export type { FieldProps, FieldHintProps, FieldHintStatus, FieldLabelProps, FieldErrorProps, FieldSetProps, FieldSetGroupProps, FieldSetActionsProps, FieldLegendProps, FieldLegendHeaderProps, FieldSetSize, FieldSize, FieldClassNames, FieldSetClassNames, } from './fieldTypes';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LabelSlot } from './labelParts';
|
|
2
2
|
import { LabelProps } from './labelTypes';
|
|
3
3
|
export type { LabelProps, LabelClassNames, FieldLabelContextValue, } from './labelTypes';
|
|
4
|
-
export declare function LabelRoot({ children, className, required: requiredProp, htmlFor: htmlForProp, id: idProp, ...rest }: Omit<LabelProps, "classNames">): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare function LabelRoot({ children, className, required: requiredProp, htmlFor: htmlForProp, id: idProp, variant, ...rest }: Omit<LabelProps, "classNames">): import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
export declare function Label({ classNames, ...rest }: LabelProps): import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
export { LabelSlot };
|
|
@@ -3,4 +3,4 @@ export declare function LabelSlot(_props: LabelProps): null;
|
|
|
3
3
|
export declare namespace LabelSlot {
|
|
4
4
|
var displayName: string;
|
|
5
5
|
}
|
|
6
|
-
export declare function LabelContent({ children, required }: LabelContentProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare function LabelContent({ children, required, variant }: LabelContentProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { LabelHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import { TextVariant } from '../Text';
|
|
2
3
|
import { Prettify } from '../../../utils/prettify';
|
|
3
4
|
export type LabelClassNames = {
|
|
4
5
|
root?: string;
|
|
@@ -8,6 +9,8 @@ export type LabelClassNames = {
|
|
|
8
9
|
export type LabelProps = Omit<LabelHTMLAttributes<HTMLLabelElement>, "children"> & {
|
|
9
10
|
children?: ReactNode;
|
|
10
11
|
required?: boolean;
|
|
12
|
+
/** Text size for the label copy. Default `base`. */
|
|
13
|
+
variant?: TextVariant;
|
|
11
14
|
classNames?: Prettify<LabelClassNames>;
|
|
12
15
|
};
|
|
13
16
|
export type LabelClassNamesProviderProps = {
|
|
@@ -23,4 +26,5 @@ export type UseLabelRootStateProps = Pick<LabelProps, "required" | "htmlFor" | "
|
|
|
23
26
|
export type LabelContentProps = {
|
|
24
27
|
children?: ReactNode;
|
|
25
28
|
required: boolean;
|
|
29
|
+
variant?: TextVariant;
|
|
26
30
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LinkIcon } from './linkParts';
|
|
2
2
|
import { LinkProps } from './linkTypes';
|
|
3
|
-
export type { LinkProps, LinkSize,
|
|
3
|
+
export type { LinkProps, LinkSize, LinkIconPos, LinkIconProps, LinkClassNames, } from './linkTypes';
|
|
4
4
|
export { LinkIcon };
|
|
5
5
|
export declare const LinkRoot: import('react').ForwardRefExoticComponent<Omit<LinkProps, "classNames"> & import('react').RefAttributes<HTMLAnchorElement>>;
|
|
6
6
|
export declare const Link: import('react').ForwardRefExoticComponent<LinkProps & import('react').RefAttributes<HTMLAnchorElement>>;
|
|
@@ -6,4 +6,4 @@ export type LinkComponent = ((props: LinkProps & RefAttributes<HTMLAnchorElement
|
|
|
6
6
|
};
|
|
7
7
|
declare const LinkCompound: LinkComponent;
|
|
8
8
|
export { LinkCompound as Link };
|
|
9
|
-
export type { LinkProps, LinkSize,
|
|
9
|
+
export type { LinkProps, LinkSize, LinkIconPos, LinkIconProps, LinkClassNames, } from './linkTypes';
|
|
@@ -3,16 +3,14 @@ import { Prettify } from '../../../utils/prettify';
|
|
|
3
3
|
import { ComponentSize } from '../utils/sizeLayout';
|
|
4
4
|
import { IconPosition } from '../utils/iconPosition';
|
|
5
5
|
export type LinkSize = ComponentSize;
|
|
6
|
-
export type
|
|
6
|
+
export type LinkIconPos = IconPosition;
|
|
7
7
|
export type LinkClassNames = {
|
|
8
8
|
/** Root `<a>`. */
|
|
9
9
|
root?: string;
|
|
10
10
|
/** Link text (`Text`). */
|
|
11
11
|
text?: string;
|
|
12
|
-
/**
|
|
13
|
-
|
|
14
|
-
/** End icon wrapper. */
|
|
15
|
-
iconEnd?: string;
|
|
12
|
+
/** Icon wrapper (both start and end positions). */
|
|
13
|
+
icon?: string;
|
|
16
14
|
};
|
|
17
15
|
type LinkSharedProps = Omit<AnchorHTMLAttributes<HTMLAnchorElement>, "children" | "href"> & {
|
|
18
16
|
children?: ReactNode;
|
|
@@ -22,7 +20,7 @@ type LinkSharedProps = Omit<AnchorHTMLAttributes<HTMLAnchorElement>, "children"
|
|
|
22
20
|
/** @default "start" */
|
|
23
21
|
iconPosition?: IconPosition;
|
|
24
22
|
showDefaultIcon?: boolean;
|
|
25
|
-
defaultIconPosition?:
|
|
23
|
+
defaultIconPosition?: LinkIconPos;
|
|
26
24
|
classNames?: Prettify<LinkClassNames>;
|
|
27
25
|
};
|
|
28
26
|
export type LinkProps = (LinkSharedProps & {
|
|
@@ -34,7 +32,7 @@ export type LinkProps = (LinkSharedProps & {
|
|
|
34
32
|
href: string;
|
|
35
33
|
});
|
|
36
34
|
export type LinkIconProps = {
|
|
37
|
-
|
|
35
|
+
iconPosition?: LinkIconPos;
|
|
38
36
|
children?: ReactNode;
|
|
39
37
|
};
|
|
40
38
|
export type ResolvedLinkIconSlot = {
|