burne-ui 1.7.5 → 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/composite/Form/Form.d.ts +4 -4
- package/dist/components/composite/Form/formContext.d.ts +7 -4
- package/dist/components/composite/Form/formParts.d.ts +3 -0
- package/dist/components/composite/Form/formStyles.d.ts +23 -6
- package/dist/components/composite/Form/formTypes.d.ts +16 -3
- package/dist/components/composite/Form/index.d.ts +5 -2
- package/dist/components/composite/Form/useFormRootState.d.ts +1 -1
- 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 +4 -4
- package/dist/index.js +9255 -9010
- package/dist/ui.css +29 -11
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { FormActions, FormAnnounce, FormDescription, FormErrorSummary, FormField, FormSection, FormTitle } from './formParts';
|
|
2
|
-
export type { FormProps, FormSectionProps, FormTitleProps, FormDescriptionProps, FormActionsProps, FormErrorSummaryProps, FormAnnounceProps, FormFieldProps, FormClassNames, } from './formTypes';
|
|
1
|
+
import { FormActions, FormAnnounce, FormDescription, FormErrorSummary, FormField, FormHeader, FormSection, FormTitle } from './formParts';
|
|
2
|
+
export type { FormProps, FormSectionProps, FormHeaderProps, FormTitleProps, FormDescriptionProps, FormActionsProps, FormErrorSummaryProps, FormAnnounceProps, FormFieldProps, FormClassNames, FormSize, } from './formTypes';
|
|
3
3
|
export declare const FormRoot: import('react').ForwardRefExoticComponent<Omit<import('react').FormHTMLAttributes<HTMLFormElement>, "onSubmit"> & {
|
|
4
4
|
children?: import('react').ReactNode;
|
|
5
5
|
classNames?: import('../../..').Prettify<import('./formTypes').FormClassNames>;
|
|
@@ -11,9 +11,9 @@ export declare const FormRoot: import('react').ForwardRefExoticComponent<Omit<im
|
|
|
11
11
|
validateMode?: import('./formTypes').FormValidateMode;
|
|
12
12
|
readOnly?: boolean;
|
|
13
13
|
disabled?: boolean;
|
|
14
|
-
size?: import('
|
|
14
|
+
size?: import('./formTypes').FormSize;
|
|
15
15
|
onSubmit?: (values: import('./formTypes').FormValues) => void | Promise<void>;
|
|
16
16
|
onSubmitError?: (errors: Record<string, string>) => void;
|
|
17
17
|
errorSummary?: import('react').ReactNode | ((entries: Array<[string, string]>) => import('react').ReactNode);
|
|
18
18
|
} & import('react').RefAttributes<HTMLFormElement>>;
|
|
19
|
-
export { FormSection, FormTitle, FormDescription, FormActions, FormErrorSummary, FormAnnounce, FormField, };
|
|
19
|
+
export { FormSection, FormHeader, FormTitle, FormDescription, FormActions, FormErrorSummary, FormAnnounce, FormField, };
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { Prettify } from '../../../utils/prettify';
|
|
3
|
-
import { FormBindingContextValue, FormClassNames,
|
|
3
|
+
import { FormBindingContextValue, FormClassNames, FormShellValue, FormSize } from './formTypes';
|
|
4
4
|
declare const FormBindingContext: import('react').Context<FormBindingContextValue | null>;
|
|
5
5
|
export declare function FormClassNamesProvider({ classNames, children, }: {
|
|
6
6
|
classNames?: Prettify<FormClassNames>;
|
|
7
7
|
children: ReactNode;
|
|
8
8
|
}): import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export declare function FormShellProvider({ shellIds, children, }: {
|
|
10
|
-
shellIds:
|
|
9
|
+
export declare function FormShellProvider({ shellIds, size, children, }: {
|
|
10
|
+
shellIds: FormShellValue["shellIds"];
|
|
11
|
+
size?: FormSize;
|
|
11
12
|
children: ReactNode;
|
|
12
13
|
}): import("react/jsx-runtime").JSX.Element;
|
|
13
14
|
export declare function useFormClassNames(): FormClassNames;
|
|
14
|
-
export declare function
|
|
15
|
+
export declare function useFormShell(): FormShellValue | null;
|
|
16
|
+
export declare function useFormShellIds(): import('./formTypes').FormShellIds | null;
|
|
17
|
+
export declare function useFormSize(): FormSize;
|
|
15
18
|
export declare function useOptionalFormBindingContext(): FormBindingContextValue | null;
|
|
16
19
|
export declare function useFormBindingContext(): FormBindingContextValue;
|
|
17
20
|
export { FormBindingContext };
|
|
@@ -2,6 +2,9 @@ import { FormActionsProps, FormDescriptionProps, FormTitleProps } from './formTy
|
|
|
2
2
|
export declare const FormSection: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & {
|
|
3
3
|
classNames?: import('../../..').Prettify<Pick<import('./formTypes').FormClassNames, "section">>;
|
|
4
4
|
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
5
|
+
export declare const FormHeader: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & {
|
|
6
|
+
classNames?: import('../../..').Prettify<Pick<import('./formTypes').FormClassNames, "header">>;
|
|
7
|
+
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
5
8
|
export declare const FormTitle: import('react').ForwardRefExoticComponent<FormTitleProps & import('react').RefAttributes<HTMLHeadingElement>>;
|
|
6
9
|
export declare const FormDescription: import('react').ForwardRefExoticComponent<FormDescriptionProps & import('react').RefAttributes<HTMLParagraphElement>>;
|
|
7
10
|
export declare const FormActions: import('react').ForwardRefExoticComponent<FormActionsProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -1,10 +1,27 @@
|
|
|
1
|
+
import { TextVariant } from '../../core/Text';
|
|
1
2
|
import { Prettify } from '../../../utils/prettify';
|
|
2
|
-
import { FormClassNames } from './formTypes';
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
import { FormClassNames, FormSize } from './formTypes';
|
|
4
|
+
export type { FormSize };
|
|
5
|
+
export type FormSizeLayout = {
|
|
6
|
+
rootGap: string;
|
|
7
|
+
headingGap: string;
|
|
8
|
+
sectionGap: string;
|
|
9
|
+
actionsGap: string;
|
|
10
|
+
actionsPaddingTop: string;
|
|
11
|
+
titleVariant: TextVariant;
|
|
12
|
+
titleClassName: string;
|
|
13
|
+
descClassName: string;
|
|
14
|
+
};
|
|
15
|
+
export declare const FORM_SIZE_LAYOUT: Record<FormSize, FormSizeLayout>;
|
|
16
|
+
export declare function resolveFormSize(size?: FormSize): FormSize;
|
|
17
|
+
export declare function formSizeLayout(size?: FormSize): FormSizeLayout;
|
|
18
|
+
export declare function formRootClass(size?: FormSize, className?: string, classNames?: Prettify<FormClassNames>): string;
|
|
19
|
+
export declare function formHeaderClass(size?: FormSize, className?: string, classNames?: Prettify<FormClassNames>): string;
|
|
20
|
+
export declare function formSectionClass(size?: FormSize, className?: string, classNames?: Prettify<FormClassNames>): string;
|
|
21
|
+
export declare function formTitleClass(size?: FormSize, className?: string, classNames?: Prettify<FormClassNames>): string;
|
|
22
|
+
export declare function formTitleVariant(size?: FormSize): TextVariant;
|
|
23
|
+
export declare function formDescriptionClass(size?: FormSize, className?: string, classNames?: Prettify<FormClassNames>): string;
|
|
24
|
+
export declare function formActionsClass(size?: FormSize, className?: string, classNames?: Prettify<FormClassNames>): string;
|
|
8
25
|
export declare function formErrorSummaryClass(className?: string, classNames?: Prettify<FormClassNames>): string;
|
|
9
26
|
export declare function formAnnounceClass(className?: string, classNames?: Prettify<FormClassNames>): string;
|
|
10
27
|
export declare function formFieldClass(className?: string, classNames?: Prettify<FormClassNames>): string;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { FormHTMLAttributes, HTMLAttributes, ReactNode } from 'react';
|
|
2
|
-
import { Prettify } from '../../../utils/prettify';
|
|
3
2
|
import { ComponentSize } from '../../core/utils/sizeLayout';
|
|
3
|
+
import { Prettify } from '../../../utils/prettify';
|
|
4
4
|
export type FormValues = Record<string, unknown>;
|
|
5
5
|
export type FormValidateMode = "onSubmit" | "onBlur" | "onChange";
|
|
6
|
+
/** Form chrome size — Header / Title / Description / Section / Actions. Not cascaded to fields. */
|
|
7
|
+
export type FormSize = ComponentSize;
|
|
6
8
|
export type FormFieldRules = {
|
|
7
9
|
required?: boolean | string;
|
|
8
10
|
minLength?: {
|
|
@@ -27,7 +29,6 @@ export type FormResolver<TValues extends FormValues = FormValues> = (values: TVa
|
|
|
27
29
|
export type FormBindingContextValue = {
|
|
28
30
|
disabled: boolean;
|
|
29
31
|
readOnly: boolean;
|
|
30
|
-
size?: ComponentSize;
|
|
31
32
|
validateMode: FormValidateMode;
|
|
32
33
|
isSubmitting: boolean;
|
|
33
34
|
submitCount: number;
|
|
@@ -70,6 +71,7 @@ export type UseFormFieldBindingOptions = {
|
|
|
70
71
|
};
|
|
71
72
|
export type FormClassNames = {
|
|
72
73
|
root?: string;
|
|
74
|
+
header?: string;
|
|
73
75
|
section?: string;
|
|
74
76
|
title?: string;
|
|
75
77
|
description?: string;
|
|
@@ -89,7 +91,11 @@ export type FormProps = Omit<FormHTMLAttributes<HTMLFormElement>, "onSubmit"> &
|
|
|
89
91
|
validateMode?: FormValidateMode;
|
|
90
92
|
readOnly?: boolean;
|
|
91
93
|
disabled?: boolean;
|
|
92
|
-
|
|
94
|
+
/**
|
|
95
|
+
* Scales Form chrome only (`Header`, `Title`, `Description`, `Section`, `Actions`).
|
|
96
|
+
* Does not cascade into embedded controls (`Input`, `Button`, …) — set their `size` explicitly.
|
|
97
|
+
*/
|
|
98
|
+
size?: FormSize;
|
|
93
99
|
onSubmit?: (values: FormValues) => void | Promise<void>;
|
|
94
100
|
onSubmitError?: (errors: Record<string, string>) => void;
|
|
95
101
|
/** Passed to the auto-rendered `Form.ErrorSummary` (`children` / render prop). */
|
|
@@ -98,6 +104,9 @@ export type FormProps = Omit<FormHTMLAttributes<HTMLFormElement>, "onSubmit"> &
|
|
|
98
104
|
export type FormSectionProps = HTMLAttributes<HTMLDivElement> & {
|
|
99
105
|
classNames?: Prettify<Pick<FormClassNames, "section">>;
|
|
100
106
|
};
|
|
107
|
+
export type FormHeaderProps = HTMLAttributes<HTMLDivElement> & {
|
|
108
|
+
classNames?: Prettify<Pick<FormClassNames, "header">>;
|
|
109
|
+
};
|
|
101
110
|
export type FormTitleProps = HTMLAttributes<HTMLHeadingElement>;
|
|
102
111
|
export type FormDescriptionProps = HTMLAttributes<HTMLParagraphElement>;
|
|
103
112
|
export type FormActionsProps = HTMLAttributes<HTMLDivElement>;
|
|
@@ -123,3 +132,7 @@ export type FormShellIds = {
|
|
|
123
132
|
errorSummaryId: string;
|
|
124
133
|
announceId: string;
|
|
125
134
|
};
|
|
135
|
+
export type FormShellValue = {
|
|
136
|
+
shellIds: FormShellIds;
|
|
137
|
+
size: FormSize;
|
|
138
|
+
};
|
|
@@ -9,7 +9,7 @@ export declare const Form: import('react').ForwardRefExoticComponent<Omit<import
|
|
|
9
9
|
validateMode?: import('./formTypes').FormValidateMode;
|
|
10
10
|
readOnly?: boolean;
|
|
11
11
|
disabled?: boolean;
|
|
12
|
-
size?: import('
|
|
12
|
+
size?: import('./formTypes').FormSize;
|
|
13
13
|
onSubmit?: (values: import('./formTypes').FormValues) => void | Promise<void>;
|
|
14
14
|
onSubmitError?: (errors: Record<string, string>) => void;
|
|
15
15
|
errorSummary?: import('react').ReactNode | ((entries: Array<[string, string]>) => import('react').ReactNode);
|
|
@@ -17,6 +17,9 @@ export declare const Form: import('react').ForwardRefExoticComponent<Omit<import
|
|
|
17
17
|
Section: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & {
|
|
18
18
|
classNames?: import('../../..').Prettify<Pick<import('./formTypes').FormClassNames, "section">>;
|
|
19
19
|
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
20
|
+
Header: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & {
|
|
21
|
+
classNames?: import('../../..').Prettify<Pick<import('./formTypes').FormClassNames, "header">>;
|
|
22
|
+
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
20
23
|
Title: import('react').ForwardRefExoticComponent<import('./formTypes').FormTitleProps & import('react').RefAttributes<HTMLHeadingElement>>;
|
|
21
24
|
Description: import('react').ForwardRefExoticComponent<import('./formTypes').FormDescriptionProps & import('react').RefAttributes<HTMLParagraphElement>>;
|
|
22
25
|
Actions: import('react').ForwardRefExoticComponent<import('./formTypes').FormActionsProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -32,7 +35,7 @@ export declare const Form: import('react').ForwardRefExoticComponent<Omit<import
|
|
|
32
35
|
classNames?: import('../../..').Prettify<Pick<import('./formTypes').FormClassNames, "field">>;
|
|
33
36
|
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
34
37
|
};
|
|
35
|
-
export type { FormProps, FormSectionProps, FormTitleProps, FormDescriptionProps, FormActionsProps, FormErrorSummaryProps, FormAnnounceProps, FormFieldProps, FormClassNames, } from './Form';
|
|
38
|
+
export type { FormProps, FormSectionProps, FormHeaderProps, FormTitleProps, FormDescriptionProps, FormActionsProps, FormErrorSummaryProps, FormAnnounceProps, FormFieldProps, FormClassNames, FormSize, } from './Form';
|
|
36
39
|
export { useFormField, useFormControlProps, } from './useFormControlProps';
|
|
37
40
|
export { useFormFieldBinding } from './useFormFieldBinding';
|
|
38
41
|
export { useOptionalFormBindingContext, useFormBindingContext, } from './formContext';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FormEvent } from 'react';
|
|
2
2
|
import { FormBindingContextValue, FormShellIds, UseFormRootStateProps } from './formTypes';
|
|
3
|
-
export declare function useFormRootState({ defaultValues, values: valuesProp, onValuesChange, rules: rulesProp, resolver, validateMode, disabled, readOnly,
|
|
3
|
+
export declare function useFormRootState({ defaultValues, values: valuesProp, onValuesChange, rules: rulesProp, resolver, validateMode, disabled, readOnly, onSubmit, onSubmitError, }: UseFormRootStateProps): {
|
|
4
4
|
shellIds: FormShellIds;
|
|
5
5
|
bindingValue: FormBindingContextValue;
|
|
6
6
|
handleSubmit: (event: FormEvent<HTMLFormElement>) => Promise<void>;
|
|
@@ -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';
|