@ostack.tech/ui 0.1.2 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/en-lyNzumTm.js +105 -0
- package/dist/chunks/en-lyNzumTm.js.map +1 -0
- package/dist/locales/en-GB.js +16 -0
- package/dist/locales/en-GB.js.map +1 -0
- package/dist/locales/en-US.js +16 -0
- package/dist/locales/en-US.js.map +1 -0
- package/dist/locales/fr.js +110 -0
- package/dist/locales/fr.js.map +1 -0
- package/dist/locales/pt.js +110 -0
- package/dist/locales/pt.js.map +1 -0
- package/dist/ostack-ui.js +6142 -6401
- package/dist/ostack-ui.js.map +1 -1
- package/dist/types/components/Alert/Alert.d.ts +9 -9
- package/dist/types/components/Alert/AlertTitle.d.ts +3 -3
- package/dist/types/components/AlertDialog/AlertDialogAction.d.ts +3 -3
- package/dist/types/components/AlertDialog/AlertDialogBody.d.ts +3 -3
- package/dist/types/components/AlertDialog/AlertDialogCancel.d.ts +3 -3
- package/dist/types/components/AlertDialog/AlertDialogContent.d.ts +5 -5
- package/dist/types/components/AlertDialog/AlertDialogDescription.d.ts +3 -3
- package/dist/types/components/AlertDialog/AlertDialogFooter.d.ts +3 -3
- package/dist/types/components/AlertDialog/AlertDialogHeader.d.ts +3 -3
- package/dist/types/components/AlertDialog/AlertDialogTitle.d.ts +3 -3
- package/dist/types/components/AlertDialog/AlertDialogTrigger.d.ts +3 -3
- package/dist/types/components/Button/Button.d.ts +7 -7
- package/dist/types/components/ButtonGroup/ButtonGroup.d.ts +3 -3
- package/dist/types/components/Calendar/Calendar.d.ts +6 -6
- package/dist/types/components/Calendar/CalendarContext.d.ts +1 -2
- package/dist/types/components/Calendar/CalendarDay.d.ts +2 -3
- package/dist/types/components/Calendar/CalendarMonthCaption.d.ts +2 -3
- package/dist/types/components/Card/Card.d.ts +3 -3
- package/dist/types/components/Card/CardBody.d.ts +3 -3
- package/dist/types/components/Card/CardFooter.d.ts +3 -3
- package/dist/types/components/Card/CardHeader.d.ts +3 -3
- package/dist/types/components/Card/CardTitle.d.ts +3 -3
- package/dist/types/components/Checkbox/Checkbox.d.ts +11 -11
- package/dist/types/components/CheckboxGroup/CheckboxGroup.d.ts +9 -9
- package/dist/types/components/CheckboxGroup/CheckboxGroupContext.d.ts +1 -2
- package/dist/types/components/ClearContexts/ClearContexts.d.ts +3 -3
- package/dist/types/components/CloseButton/CloseButton.d.ts +3 -3
- package/dist/types/components/Code/Code.d.ts +3 -3
- package/dist/types/components/Collapsible/Collapsible.d.ts +3 -3
- package/dist/types/components/Collapsible/CollapsibleContent.d.ts +3 -3
- package/dist/types/components/Collapsible/CollapsibleContext.d.ts +1 -2
- package/dist/types/components/Collapsible/CollapsibleTrigger.d.ts +4 -4
- package/dist/types/components/CommandMenu/CommandMenu.d.ts +11 -11
- package/dist/types/components/CommandMenu/CommandMenuDialog.d.ts +7 -7
- package/dist/types/components/CommandMenu/CommandMenuGroup.d.ts +4 -4
- package/dist/types/components/CommandMenu/CommandMenuItem.d.ts +3 -3
- package/dist/types/components/Container/Container.d.ts +3 -3
- package/dist/types/components/ControlAddon/ControlAddon.d.ts +3 -3
- package/dist/types/components/ControlCode/ControlCode.d.ts +4 -4
- package/dist/types/components/DataTable/DataTable.d.ts +11 -11
- package/dist/types/components/DataTable/DataTableApi.d.ts +2 -2
- package/dist/types/components/DataTable/DataTableBody.d.ts +4 -4
- package/dist/types/components/DataTable/DataTableCell.d.ts +4 -4
- package/dist/types/components/DataTable/DataTableColumn.d.ts +4 -4
- package/dist/types/components/DataTable/DataTableContent.d.ts +9 -9
- package/dist/types/components/DataTable/DataTableContext.d.ts +19 -19
- package/dist/types/components/DataTable/DataTableFilter.d.ts +3 -3
- package/dist/types/components/DataTable/DataTableFoot.d.ts +3 -3
- package/dist/types/components/DataTable/DataTableHead.d.ts +3 -3
- package/dist/types/components/DataTable/DataTablePagination.d.ts +4 -4
- package/dist/types/components/DataTable/DataTableRow.d.ts +3 -3
- package/dist/types/components/DataTable/DataTableRowsPerPage.d.ts +4 -4
- package/dist/types/components/DataTable/DataTableSelectionTrigger.d.ts +5 -5
- package/dist/types/components/DataTable/PagedDataTablePagination.d.ts +3 -3
- package/dist/types/components/DataTable/ScrolledDataTablePagination.d.ts +3 -3
- package/dist/types/components/DataTable/getRowKey.d.ts +2 -2
- package/dist/types/components/DateInput/DateInput.d.ts +5 -5
- package/dist/types/components/DatePicker/DatePicker.d.ts +2 -2
- package/dist/types/components/DateRangeInput/DateRangeInput.d.ts +19 -19
- package/dist/types/components/DateRangePicker/DateRangePicker.d.ts +2 -2
- package/dist/types/components/Dialog/DialogBody.d.ts +3 -3
- package/dist/types/components/Dialog/DialogClose.d.ts +3 -3
- package/dist/types/components/Dialog/DialogContent.d.ts +5 -5
- package/dist/types/components/Dialog/DialogDescription.d.ts +3 -3
- package/dist/types/components/Dialog/DialogFooter.d.ts +3 -3
- package/dist/types/components/Dialog/DialogHeader.d.ts +4 -4
- package/dist/types/components/Dialog/DialogTitle.d.ts +3 -3
- package/dist/types/components/Dialog/DialogTrigger.d.ts +3 -3
- package/dist/types/components/DropdownMenu/DropdownMenu.d.ts +3 -3
- package/dist/types/components/DropdownMenu/DropdownMenuCheckboxItem.d.ts +4 -4
- package/dist/types/components/DropdownMenu/DropdownMenuContent.d.ts +6 -6
- package/dist/types/components/DropdownMenu/DropdownMenuGroup.d.ts +3 -3
- package/dist/types/components/DropdownMenu/DropdownMenuItem.d.ts +3 -3
- package/dist/types/components/DropdownMenu/DropdownMenuRadioGroup.d.ts +3 -3
- package/dist/types/components/DropdownMenu/DropdownMenuRadioItem.d.ts +4 -4
- package/dist/types/components/DropdownMenu/DropdownMenuSubContent.d.ts +4 -4
- package/dist/types/components/DropdownMenu/DropdownMenuSubTrigger.d.ts +3 -3
- package/dist/types/components/DropdownMenu/DropdownMenuTrigger.d.ts +3 -3
- package/dist/types/components/ErrorBoundary/ErrorBoundary.d.ts +10 -10
- package/dist/types/components/Feedback/Feedback.d.ts +4 -4
- package/dist/types/components/FeedbackList/FeedbackList.d.ts +3 -3
- package/dist/types/components/FeedbackList/FeedbackListContext.d.ts +1 -2
- package/dist/types/components/FeedbackPopover/FeedbackPopover.d.ts +6 -6
- package/dist/types/components/FeedbackPopover/FeedbackPopoverContext.d.ts +1 -2
- package/dist/types/components/Field/Field.d.ts +3 -3
- package/dist/types/components/Field/FieldContext.d.ts +5 -5
- package/dist/types/components/FieldGroup/FieldGroup.d.ts +3 -3
- package/dist/types/components/FieldGroup/FieldGroupBody.d.ts +3 -3
- package/dist/types/components/FieldGroup/FieldGroupContext.d.ts +4 -4
- package/dist/types/components/FieldGroup/FieldGroupHeader.d.ts +6 -6
- package/dist/types/components/FieldGroup/FieldGroupTitle.d.ts +3 -3
- package/dist/types/components/Grid/Grid.d.ts +3 -3
- package/dist/types/components/Heading/Heading.d.ts +3 -3
- package/dist/types/components/HelperText/HelperText.d.ts +3 -3
- package/dist/types/components/Icon/Icon.d.ts +4 -4
- package/dist/types/components/IconButton/IconButton.d.ts +9 -9
- package/dist/types/components/Input/Input.d.ts +14 -14
- package/dist/types/components/Input/InputWithContainerRef.d.ts +4 -4
- package/dist/types/components/Keyboard/Keyboard.d.ts +3 -3
- package/dist/types/components/Label/Label.d.ts +10 -10
- package/dist/types/components/Link/Link.d.ts +4 -4
- package/dist/types/components/Link/LinkContext.d.ts +1 -2
- package/dist/types/components/Mark/Mark.d.ts +3 -3
- package/dist/types/components/MenuList/MenuList.d.ts +3 -3
- package/dist/types/components/MenuList/MenuListContext.d.ts +1 -2
- package/dist/types/components/MenuList/MenuListGroup.d.ts +7 -7
- package/dist/types/components/MenuList/MenuListItem.d.ts +13 -13
- package/dist/types/components/NumericInput/NumericInput.d.ts +3 -3
- package/dist/types/components/Output/Output.d.ts +3 -3
- package/dist/types/components/Overlay/Overlay.d.ts +3 -3
- package/dist/types/components/Popover/PopoverClose.d.ts +3 -3
- package/dist/types/components/Popover/PopoverContent.d.ts +5 -5
- package/dist/types/components/Popover/PopoverTrigger.d.ts +3 -3
- package/dist/types/components/Portal/Portal.d.ts +3 -3
- package/dist/types/components/Portal/PortalContext.d.ts +1 -2
- package/dist/types/components/RadioGroup/Radio.d.ts +10 -10
- package/dist/types/components/RadioGroup/RadioGroup.d.ts +10 -10
- package/dist/types/components/Root/Root.d.ts +14 -10
- package/dist/types/components/Root/RootContext.d.ts +1 -2
- package/dist/types/components/Root/RootElement.d.ts +9 -0
- package/dist/types/components/Root/index.d.ts +1 -1
- package/dist/types/components/Select/Option.d.ts +3 -3
- package/dist/types/components/Select/OptionsGroup.d.ts +3 -3
- package/dist/types/components/Select/Select.d.ts +11 -11
- package/dist/types/components/Select/SelectContext.d.ts +6 -6
- package/dist/types/components/Separator/Separator.d.ts +3 -3
- package/dist/types/components/Slot/Slottable.d.ts +3 -3
- package/dist/types/components/Spinner/Spinner.d.ts +3 -3
- package/dist/types/components/Stack/Stack.d.ts +8 -8
- package/dist/types/components/Stepper/Step.d.ts +5 -5
- package/dist/types/components/Stepper/StepContent.d.ts +3 -3
- package/dist/types/components/Stepper/StepList.d.ts +3 -3
- package/dist/types/components/Stepper/Stepper.d.ts +5 -5
- package/dist/types/components/Stepper/StepperContext.d.ts +1 -2
- package/dist/types/components/Table/Table.d.ts +5 -5
- package/dist/types/components/Table/TableBody.d.ts +3 -3
- package/dist/types/components/Table/TableCell.d.ts +4 -4
- package/dist/types/components/Table/TableColumn.d.ts +14 -14
- package/dist/types/components/Table/TableContext.d.ts +4 -5
- package/dist/types/components/Table/TableFoot.d.ts +3 -3
- package/dist/types/components/Table/TableHead.d.ts +4 -4
- package/dist/types/components/Table/TableRow.d.ts +3 -3
- package/dist/types/components/Tabs/Tab.d.ts +4 -4
- package/dist/types/components/Tabs/TabContent.d.ts +3 -3
- package/dist/types/components/Tabs/TabList.d.ts +5 -5
- package/dist/types/components/Tabs/Tabs.d.ts +3 -3
- package/dist/types/components/Tabs/TabsContext.d.ts +1 -2
- package/dist/types/components/Tag/Tag.d.ts +7 -7
- package/dist/types/components/TextArea/TextArea.d.ts +3 -3
- package/dist/types/components/Toast/Toast.d.ts +11 -11
- package/dist/types/components/Toast/ToastProvider.d.ts +2 -2
- package/dist/types/components/Toast/ToastTitle.d.ts +3 -3
- package/dist/types/components/Toast/ToastViewport.d.ts +3 -3
- package/dist/types/components/Tooltip/Tooltip.d.ts +7 -7
- package/dist/types/index.d.ts +1 -1
- package/dist/types/locales/en-GB.d.ts +3 -0
- package/dist/types/locales/en-US.d.ts +3 -0
- package/dist/types/{locale → locales}/en.d.ts +1 -1
- package/dist/types/locales/fr.d.ts +3 -0
- package/dist/types/locales/index.d.ts +4 -0
- package/dist/types/locales/pt.d.ts +3 -0
- package/dist/types/providers/AlertDialogProvider/AlertDialogProvider.d.ts +2 -2
- package/dist/types/providers/AlertDialogProvider/AlertDialogProviderContext.d.ts +17 -17
- package/dist/types/providers/DocumentTitleProvider/DocumentTitle.d.ts +2 -2
- package/dist/types/providers/DocumentTitleProvider/DocumentTitleProvider.d.ts +2 -2
- package/dist/types/providers/DocumentTitleProvider/DocumentTitleProviderContext.d.ts +2 -3
- package/dist/types/providers/ErrorReportingProvider/ErrorReport.d.ts +2 -2
- package/dist/types/providers/ErrorReportingProvider/ErrorReportingContext.d.ts +3 -3
- package/dist/types/providers/ErrorReportingProvider/ErrorReportingProvider.d.ts +2 -2
- package/dist/types/providers/ErrorReportingProvider/useErrorReporter.d.ts +1 -2
- package/dist/types/providers/LocalizationProvider/LocalizationContext.d.ts +6 -4
- package/dist/types/{locale → providers/LocalizationProvider}/LocalizationObject.d.ts +18 -18
- package/dist/types/providers/LocalizationProvider/LocalizationProvider.d.ts +13 -5
- package/dist/types/providers/LocalizationProvider/index.d.ts +1 -0
- package/dist/types/providers/LocalizationProvider/useLocale.d.ts +6 -3
- package/dist/types/providers/PrefixProvider/PrefixContext.d.ts +1 -4
- package/dist/types/providers/PrefixProvider/PrefixProvider.d.ts +3 -3
- package/dist/types/providers/PrefixProvider/defaultPrefix.d.ts +12 -0
- package/dist/types/providers/PrefixProvider/index.d.ts +1 -0
- package/dist/types/providers/PrefixProvider/usePrefix.d.ts +1 -1
- package/dist/types/providers/ToastManagerProvider/ToastManagerContext.d.ts +7 -7
- package/dist/types/providers/ToastManagerProvider/ToastManagerProvider.d.ts +2 -2
- package/dist/types/utils/control.d.ts +1 -2
- package/dist/types/utils/useCombinedRef.d.ts +2 -2
- package/dist/types/utils/useControllableState.d.ts +2 -2
- package/dist/types/utils/useLayoutEffect.d.ts +2 -2
- package/package.json +20 -4
- package/dist/ostack-ui.cjs +0 -11095
- package/dist/ostack-ui.cjs.map +0 -1
- package/dist/types/locale/defaultLocale.d.ts +0 -3
- package/dist/types/locale/en-GB.d.ts +0 -3
- package/dist/types/locale/en-US.d.ts +0 -3
- package/dist/types/locale/fr-FR.d.ts +0 -3
- package/dist/types/locale/index.d.ts +0 -6
- package/dist/types/locale/pt-PT.d.ts +0 -3
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type ComponentPropsWithoutRef, type ReactNode } from "react";
|
|
2
2
|
/** Possible types of feedback. */
|
|
3
3
|
export type FeedbackType = "success" | "error" | "warning";
|
|
4
4
|
/** Properties of the feedback component. */
|
|
5
|
-
export type FeedbackProps =
|
|
5
|
+
export type FeedbackProps = ComponentPropsWithoutRef<"div" | "li"> & {
|
|
6
6
|
/**
|
|
7
7
|
* Change the component to the HTML tag or custom component of the only child.
|
|
8
8
|
* This will merge the original component props with the props of the supplied
|
|
@@ -16,7 +16,7 @@ export type FeedbackProps = React.ComponentPropsWithoutRef<"div" | "li"> & {
|
|
|
16
16
|
*/
|
|
17
17
|
type?: FeedbackType;
|
|
18
18
|
/** Text prefixed to the feedback to be announced by assistive technologies. */
|
|
19
|
-
visuallyHiddenPrefix?:
|
|
19
|
+
visuallyHiddenPrefix?: ReactNode | ((type: FeedbackType) => ReactNode);
|
|
20
20
|
};
|
|
21
21
|
/** Component used to provide some feedback to a form control. */
|
|
22
|
-
export declare const Feedback:
|
|
22
|
+
export declare const Feedback: import("react").ForwardRefExoticComponent<FeedbackProps & import("react").RefAttributes<HTMLDivElement | HTMLLIElement>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type ComponentPropsWithoutRef } from "react";
|
|
2
2
|
/** Properties of the feedback list component. */
|
|
3
|
-
export interface FeedbackListProps extends
|
|
3
|
+
export interface FeedbackListProps extends ComponentPropsWithoutRef<"ul"> {
|
|
4
4
|
}
|
|
5
5
|
/** Component used to provide a list of feedbacks to a form control. */
|
|
6
|
-
export declare const FeedbackList:
|
|
6
|
+
export declare const FeedbackList: import("react").ForwardRefExoticComponent<FeedbackListProps & import("react").RefAttributes<HTMLUListElement>>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
1
|
/** Context present within a feedback list. */
|
|
3
|
-
export declare const FeedbackListContext:
|
|
2
|
+
export declare const FeedbackListContext: import("react").Context<boolean>;
|
|
4
3
|
/** Hook exposing whether a component is being rendered within a feedback list. */
|
|
5
4
|
export declare function useIsInFeedbackList(): boolean;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { type IconProp } from "@fortawesome/fontawesome-svg-core";
|
|
2
|
-
import
|
|
2
|
+
import { type ComponentPropsWithoutRef, type ComponentPropsWithRef, type ReactNode } from "react";
|
|
3
3
|
import { IconButton, type IconButtonSize } from "../IconButton";
|
|
4
4
|
import { PopoverContent } from "../Popover";
|
|
5
5
|
/** Properties of the feedback popover component. */
|
|
6
|
-
export interface FeedbackPopoverProps extends
|
|
6
|
+
export interface FeedbackPopoverProps extends ComponentPropsWithoutRef<typeof PopoverContent> {
|
|
7
7
|
/** Default open state of the feedback popover. */
|
|
8
8
|
defaultOpen?: boolean;
|
|
9
9
|
/** Controlled open state of the feedback popover. */
|
|
@@ -21,14 +21,14 @@ export interface FeedbackPopoverProps extends React.ComponentPropsWithoutRef<typ
|
|
|
21
21
|
/** Icon to show. Each feedback type has its own default icon. */
|
|
22
22
|
icon?: IconProp;
|
|
23
23
|
/** Label of the feedback popover button. */
|
|
24
|
-
label?:
|
|
24
|
+
label?: ReactNode;
|
|
25
25
|
/** Properties to pass to the element containing the button. */
|
|
26
|
-
buttonContainerProps?:
|
|
26
|
+
buttonContainerProps?: ComponentPropsWithRef<"div">;
|
|
27
27
|
/** Properties to pass to the `IconButton` component. */
|
|
28
|
-
iconButtonProps?: Omit<
|
|
28
|
+
iconButtonProps?: Omit<ComponentPropsWithRef<typeof IconButton>, "size" | "icon" | "label">;
|
|
29
29
|
}
|
|
30
30
|
/**
|
|
31
31
|
* Component used to provide feedback to a form control, where the feedback is
|
|
32
32
|
* displayed within a popover.
|
|
33
33
|
*/
|
|
34
|
-
export declare const FeedbackPopover:
|
|
34
|
+
export declare const FeedbackPopover: import("react").ForwardRefExoticComponent<FeedbackPopoverProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
1
|
import { type FeedbackType } from "../Feedback";
|
|
3
2
|
/** Value of the feedback popover context. */
|
|
4
3
|
export interface FeedbackPopoverContextValue {
|
|
@@ -6,6 +5,6 @@ export interface FeedbackPopoverContextValue {
|
|
|
6
5
|
onRemoveFeedback: (type: FeedbackType) => void;
|
|
7
6
|
}
|
|
8
7
|
/** Feedback popover context. */
|
|
9
|
-
export declare const FeedbackPopoverContext:
|
|
8
|
+
export declare const FeedbackPopoverContext: import("react").Context<FeedbackPopoverContextValue | null>;
|
|
10
9
|
/** Hook providing access to the feedback popover context. */
|
|
11
10
|
export declare function useFeedbackPopoverContext(): FeedbackPopoverContextValue | null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type ComponentPropsWithoutRef } from "react";
|
|
2
2
|
/** Properties of the field component. */
|
|
3
|
-
export interface FieldProps extends
|
|
3
|
+
export interface FieldProps extends ComponentPropsWithoutRef<"div"> {
|
|
4
4
|
/**
|
|
5
5
|
* Change the component to the HTML tag or custom component of the only child.
|
|
6
6
|
* This will merge the original component props with the props of the supplied
|
|
@@ -17,4 +17,4 @@ export interface FieldProps extends React.ComponentPropsWithoutRef<"div"> {
|
|
|
17
17
|
* It provides automatic linking of the `Label` to the control, and marks the
|
|
18
18
|
* control as "required" when requested by the control.
|
|
19
19
|
*/
|
|
20
|
-
export declare const Field:
|
|
20
|
+
export declare const Field: import("react").ForwardRefExoticComponent<FieldProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
2
|
/** Value of the field context. */
|
|
3
3
|
export type FieldContextValue = FieldStore;
|
|
4
4
|
/** State of the field. */
|
|
@@ -8,7 +8,7 @@ export interface FieldState {
|
|
|
8
8
|
controlFocused: boolean;
|
|
9
9
|
controlHasCode: boolean;
|
|
10
10
|
controlRequired: boolean;
|
|
11
|
-
label?:
|
|
11
|
+
label?: ReactNode;
|
|
12
12
|
labelId?: string;
|
|
13
13
|
descriptionIds: string[];
|
|
14
14
|
errorMessageIds: string[];
|
|
@@ -24,7 +24,7 @@ export interface FieldActions {
|
|
|
24
24
|
/** Field store. */
|
|
25
25
|
export type FieldStore = ReturnType<typeof useCreateFieldContext>;
|
|
26
26
|
/** Field context. */
|
|
27
|
-
export declare const FieldContext:
|
|
27
|
+
export declare const FieldContext: import("react").Context<(Omit<import("zustand").StoreApi<FieldState>, "subscribe"> & {
|
|
28
28
|
subscribe: {
|
|
29
29
|
(listener: (selectedState: FieldState, previousSelectedState: FieldState) => void): () => void;
|
|
30
30
|
<U>(selector: (state: FieldState) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
|
|
@@ -68,7 +68,7 @@ export declare function useSetFieldControl(controlId: string | undefined, contro
|
|
|
68
68
|
*/
|
|
69
69
|
export declare function useSetFieldControlFocused(): (controlFocused: boolean) => void | undefined;
|
|
70
70
|
/** Hook that makes the field aware of its label. */
|
|
71
|
-
export declare function useSetFieldLabel(label:
|
|
71
|
+
export declare function useSetFieldLabel(label: ReactNode, labelId: string | undefined): string | undefined;
|
|
72
72
|
/** Options available to the {@link useOnFieldLabelChange} hook. */
|
|
73
73
|
export interface UseOnFieldLabelChangeOptions {
|
|
74
74
|
/**
|
|
@@ -79,7 +79,7 @@ export interface UseOnFieldLabelChangeOptions {
|
|
|
79
79
|
fireImmediately?: boolean;
|
|
80
80
|
}
|
|
81
81
|
/** Hook which runs the provided callback whenever the field's label changes. */
|
|
82
|
-
export declare function useOnFieldLabelChange(cb: (label:
|
|
82
|
+
export declare function useOnFieldLabelChange(cb: (label: ReactNode) => (() => void) | void, { fireImmediately }?: UseOnFieldLabelChangeOptions): void;
|
|
83
83
|
/** Hook that makes the field aware of some helper text. */
|
|
84
84
|
export declare function useSetFieldHelperText(helperTextId: string | undefined): string | undefined;
|
|
85
85
|
/** Hook that makes the field aware of some feedback. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type ComponentPropsWithoutRef } from "react";
|
|
2
2
|
/** Properties of the field group component. */
|
|
3
|
-
export interface FieldGroupProps extends
|
|
3
|
+
export interface FieldGroupProps extends ComponentPropsWithoutRef<"div"> {
|
|
4
4
|
/**
|
|
5
5
|
* Change the component to the HTML tag or custom component of the only child.
|
|
6
6
|
* This will merge the original component props with the props of the supplied
|
|
@@ -27,4 +27,4 @@ export interface FieldGroupProps extends React.ComponentPropsWithoutRef<"div"> {
|
|
|
27
27
|
* - `FieldGroupTitle`: Displays the title within the header.
|
|
28
28
|
* - `FieldGroupBody`: The container for all fields and controls within the group.
|
|
29
29
|
*/
|
|
30
|
-
export declare const FieldGroup:
|
|
30
|
+
export declare const FieldGroup: import("react").ForwardRefExoticComponent<FieldGroupProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type ComponentPropsWithoutRef } from "react";
|
|
2
2
|
/** Properties of the field group body component. */
|
|
3
|
-
export interface FieldGroupBodyProps extends
|
|
3
|
+
export interface FieldGroupBodyProps extends ComponentPropsWithoutRef<"div"> {
|
|
4
4
|
/**
|
|
5
5
|
* Change the component to the HTML tag or custom component of the only child.
|
|
6
6
|
* This will merge the original component props with the props of the supplied
|
|
@@ -9,4 +9,4 @@ export interface FieldGroupBodyProps extends React.ComponentPropsWithoutRef<"div
|
|
|
9
9
|
asChild?: boolean;
|
|
10
10
|
}
|
|
11
11
|
/** Component used to display the body of a field group. */
|
|
12
|
-
export declare const FieldGroupBody:
|
|
12
|
+
export declare const FieldGroupBody: import("react").ForwardRefExoticComponent<FieldGroupBodyProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type Dispatch, type SetStateAction } from "react";
|
|
2
2
|
/** Value of the field group context. */
|
|
3
3
|
export interface FieldGroupContextValue {
|
|
4
|
-
setCodeId:
|
|
5
|
-
setTitleId:
|
|
4
|
+
setCodeId: Dispatch<SetStateAction<string | undefined>>;
|
|
5
|
+
setTitleId: Dispatch<SetStateAction<string | undefined>>;
|
|
6
6
|
}
|
|
7
7
|
/** Field group context. */
|
|
8
|
-
export declare const FieldGroupContext:
|
|
8
|
+
export declare const FieldGroupContext: import("react").Context<FieldGroupContextValue | null>;
|
|
9
9
|
/** Hook providing access to the field group context. */
|
|
10
10
|
export declare function useFieldGroupContext(): FieldGroupContextValue;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type ComponentPropsWithoutRef, type ReactNode } from "react";
|
|
2
2
|
/** Properties of the field group header component. */
|
|
3
|
-
export interface FieldGroupHeaderProps extends
|
|
3
|
+
export interface FieldGroupHeaderProps extends ComponentPropsWithoutRef<"div"> {
|
|
4
4
|
/**
|
|
5
5
|
* Change the component to the HTML tag or custom component of the only child.
|
|
6
6
|
* This will merge the original component props with the props of the supplied
|
|
@@ -8,11 +8,11 @@ export interface FieldGroupHeaderProps extends React.ComponentPropsWithoutRef<"d
|
|
|
8
8
|
*/
|
|
9
9
|
asChild?: boolean;
|
|
10
10
|
/** Code associated with the field group. */
|
|
11
|
-
code?:
|
|
11
|
+
code?: ReactNode;
|
|
12
12
|
/** Text prefixed to the code to be announced by assistive technologies. */
|
|
13
|
-
visuallyHiddenCodePrefix?:
|
|
13
|
+
visuallyHiddenCodePrefix?: ReactNode;
|
|
14
14
|
/** Properties to pass to the code element. */
|
|
15
|
-
codeProps?:
|
|
15
|
+
codeProps?: ComponentPropsWithoutRef<"span">;
|
|
16
16
|
}
|
|
17
17
|
/** Component used to display the header of a field group. */
|
|
18
|
-
export declare const FieldGroupHeader:
|
|
18
|
+
export declare const FieldGroupHeader: import("react").ForwardRefExoticComponent<FieldGroupHeaderProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type ComponentPropsWithoutRef } from "react";
|
|
2
2
|
import { type HeadingLevel } from "../Heading";
|
|
3
3
|
/** Properties of the field group title component. */
|
|
4
|
-
export interface FieldGroupTitleProps extends
|
|
4
|
+
export interface FieldGroupTitleProps extends ComponentPropsWithoutRef<"h2"> {
|
|
5
5
|
/**
|
|
6
6
|
* Change the component to the HTML tag or custom component of the only child.
|
|
7
7
|
* This will merge the original component props with the props of the supplied
|
|
@@ -16,4 +16,4 @@ export interface FieldGroupTitleProps extends React.ComponentPropsWithoutRef<"h2
|
|
|
16
16
|
level?: HeadingLevel;
|
|
17
17
|
}
|
|
18
18
|
/** Component used to display the caption of a field group. */
|
|
19
|
-
export declare const FieldGroupTitle:
|
|
19
|
+
export declare const FieldGroupTitle: import("react").ForwardRefExoticComponent<FieldGroupTitleProps & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type ComponentPropsWithoutRef } from "react";
|
|
2
2
|
import { type Responsive } from "../../utils/useResponsiveValues.ts";
|
|
3
3
|
/** Size of a column. */
|
|
4
4
|
export type GridColumnSize = number | "auto" | "content";
|
|
5
5
|
/** Offset of a column. */
|
|
6
6
|
export type GridOffsetSize = number | "auto";
|
|
7
7
|
/** Properties of the grid component. */
|
|
8
|
-
export interface GridProps extends
|
|
8
|
+
export interface GridProps extends ComponentPropsWithoutRef<"div"> {
|
|
9
9
|
/**
|
|
10
10
|
* Change the component to the HTML tag or custom component of the only child.
|
|
11
11
|
* This will merge the original component props with the props of the supplied
|
|
@@ -87,4 +87,4 @@ export interface GridProps extends React.ComponentPropsWithoutRef<"div"> {
|
|
|
87
87
|
* different column spans for each child at various breakpoints, enabling
|
|
88
88
|
* flexible and adaptive designs across screen sizes.
|
|
89
89
|
*/
|
|
90
|
-
export declare const Grid:
|
|
90
|
+
export declare const Grid: import("react").ForwardRefExoticComponent<GridProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type ComponentPropsWithoutRef } from "react";
|
|
2
2
|
/** Heading levels. */
|
|
3
3
|
export type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
|
|
4
4
|
/** Properties of the heading component. */
|
|
5
|
-
export interface HeadingProps extends
|
|
5
|
+
export interface HeadingProps extends ComponentPropsWithoutRef<`h${HeadingLevel}`> {
|
|
6
6
|
/**
|
|
7
7
|
* Change the component to the HTML tag or custom component of the only child.
|
|
8
8
|
* This will merge the original component props with the props of the supplied
|
|
@@ -31,4 +31,4 @@ export interface HeadingProps extends React.ComponentPropsWithoutRef<`h${Heading
|
|
|
31
31
|
* }
|
|
32
32
|
* ```
|
|
33
33
|
*/
|
|
34
|
-
export declare const Heading:
|
|
34
|
+
export declare const Heading: import("react").ForwardRefExoticComponent<HeadingProps & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type ComponentPropsWithoutRef } from "react";
|
|
2
2
|
/** Properties of the helper text component. */
|
|
3
|
-
export interface HelperTextProps extends
|
|
3
|
+
export interface HelperTextProps extends ComponentPropsWithoutRef<"div"> {
|
|
4
4
|
/**
|
|
5
5
|
* Change the component to the HTML tag or custom component of the only child.
|
|
6
6
|
* This will merge the original component props with the props of the supplied
|
|
@@ -9,4 +9,4 @@ export interface HelperTextProps extends React.ComponentPropsWithoutRef<"div"> {
|
|
|
9
9
|
asChild?: boolean;
|
|
10
10
|
}
|
|
11
11
|
/** Component used to provide helper text to a form control. */
|
|
12
|
-
export declare const HelperText:
|
|
12
|
+
export declare const HelperText: import("react").ForwardRefExoticComponent<HelperTextProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type FlipProp, type IconProp } from "@fortawesome/fontawesome-svg-core";
|
|
2
2
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
3
|
-
import
|
|
3
|
+
import { type ComponentPropsWithoutRef } from "react";
|
|
4
4
|
import { type AccentColor } from "../../utils/accent.ts";
|
|
5
5
|
export type { IconProp } from "@fortawesome/fontawesome-svg-core";
|
|
6
6
|
/** Possible sizes of an icon. */
|
|
@@ -8,7 +8,7 @@ export type IconSize = "3xs" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl"
|
|
|
8
8
|
/** Possible colours of an icon. */
|
|
9
9
|
export type IconColor = AccentColor;
|
|
10
10
|
/** Properties of the icon component. */
|
|
11
|
-
export interface IconProps extends Omit<
|
|
11
|
+
export interface IconProps extends Omit<ComponentPropsWithoutRef<typeof FontAwesomeIcon>, "icon" | "size" | "flip"> {
|
|
12
12
|
/** Icon to display. */
|
|
13
13
|
icon: IconProp;
|
|
14
14
|
/**
|
|
@@ -54,4 +54,4 @@ export interface IconProps extends Omit<React.ComponentPropsWithoutRef<typeof Fo
|
|
|
54
54
|
* }
|
|
55
55
|
* ```
|
|
56
56
|
*/
|
|
57
|
-
export declare const Icon:
|
|
57
|
+
export declare const Icon: import("react").NamedExoticComponent<IconProps & import("react").RefAttributes<SVGSVGElement>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type ComponentPropsWithoutRef, type ComponentPropsWithRef, type ReactElement, type ReactNode } from "react";
|
|
2
2
|
import { type ButtonColor, type ButtonSize, type ButtonVariant } from "../Button";
|
|
3
3
|
import { Icon, type IconProp } from "../Icon";
|
|
4
4
|
import { Spinner } from "../Spinner";
|
|
@@ -10,14 +10,14 @@ export type IconButtonColor = ButtonColor;
|
|
|
10
10
|
/** Icon button sizes. */
|
|
11
11
|
export type IconButtonSize = ButtonSize;
|
|
12
12
|
/** Properties of the icon button component. */
|
|
13
|
-
export interface IconButtonProps extends Omit<
|
|
13
|
+
export interface IconButtonProps extends Omit<ComponentPropsWithoutRef<"button">, "children"> {
|
|
14
14
|
/**
|
|
15
15
|
* Change the component to the HTML tag or custom component of the only child.
|
|
16
16
|
* This will merge the original component props with the props of the supplied
|
|
17
17
|
* element/component and change the underlying DOM node.
|
|
18
18
|
*/
|
|
19
19
|
asChild?: boolean;
|
|
20
|
-
children?:
|
|
20
|
+
children?: ReactElement;
|
|
21
21
|
/**
|
|
22
22
|
* Icon button's variant.
|
|
23
23
|
*
|
|
@@ -39,9 +39,9 @@ export interface IconButtonProps extends Omit<React.ComponentPropsWithoutRef<"bu
|
|
|
39
39
|
/** Whether to display the icon button as a circle. */
|
|
40
40
|
circle?: boolean;
|
|
41
41
|
/** Font Awesome icon to show within the button. */
|
|
42
|
-
icon: IconProp |
|
|
42
|
+
icon: IconProp | ReactElement;
|
|
43
43
|
/** Button label provided to the icon button as a tooltip. */
|
|
44
|
-
label:
|
|
44
|
+
label: ReactNode;
|
|
45
45
|
/**
|
|
46
46
|
* Whether to display the button in "active" state.
|
|
47
47
|
*
|
|
@@ -67,11 +67,11 @@ export interface IconButtonProps extends Omit<React.ComponentPropsWithoutRef<"bu
|
|
|
67
67
|
*/
|
|
68
68
|
enabledWhenLoading?: boolean;
|
|
69
69
|
/** Properties to pass to the `Icon` component. */
|
|
70
|
-
iconProps?: Omit<
|
|
70
|
+
iconProps?: Omit<ComponentPropsWithRef<typeof Icon>, "icon" | "label">;
|
|
71
71
|
/** Properties to pass to the `Spinner` component. */
|
|
72
|
-
spinnerProps?:
|
|
72
|
+
spinnerProps?: ComponentPropsWithRef<typeof Spinner>;
|
|
73
73
|
/** Properties to pass to the `Tooltip` component. */
|
|
74
|
-
tooltipProps?: Omit<
|
|
74
|
+
tooltipProps?: Omit<ComponentPropsWithRef<typeof Tooltip>, "content" | "children">;
|
|
75
75
|
}
|
|
76
76
|
/**
|
|
77
77
|
* The icon button component renders a button containing a single icon. Use it
|
|
@@ -98,4 +98,4 @@ export interface IconButtonProps extends Omit<React.ComponentPropsWithoutRef<"bu
|
|
|
98
98
|
* }
|
|
99
99
|
* ```
|
|
100
100
|
*/
|
|
101
|
-
export declare const IconButton:
|
|
101
|
+
export declare const IconButton: import("react").ForwardRefExoticComponent<IconButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type ComponentPropsWithoutRef, type ComponentPropsWithRef, type CSSProperties, type FocusEvent, type ReactElement, type ReactNode } from "react";
|
|
2
2
|
import { type ControlStatus, type ControlVariant } from "../../utils/control.ts";
|
|
3
3
|
import { type Responsive } from "../../utils/useResponsiveValues.ts";
|
|
4
4
|
import { CloseButton } from "../CloseButton";
|
|
@@ -6,7 +6,7 @@ import { type ControlAddon } from "../ControlAddon";
|
|
|
6
6
|
import { Spinner } from "../Spinner";
|
|
7
7
|
/** Accepted values for "show clear button". */
|
|
8
8
|
export type ShowClearButton = boolean | "auto";
|
|
9
|
-
export interface InputProps extends Omit<
|
|
9
|
+
export interface InputProps extends Omit<ComponentPropsWithoutRef<"input">, "children">, InputPropsBase {
|
|
10
10
|
}
|
|
11
11
|
/** Properties of the input component. */
|
|
12
12
|
export interface InputPropsBase {
|
|
@@ -16,7 +16,7 @@ export interface InputPropsBase {
|
|
|
16
16
|
* element/component and change the underlying DOM node.
|
|
17
17
|
*/
|
|
18
18
|
asChild?: boolean;
|
|
19
|
-
children?:
|
|
19
|
+
children?: ReactElement;
|
|
20
20
|
/**
|
|
21
21
|
* Input's style variant. Defaults to the default variant unless when
|
|
22
22
|
* rendering inside a table cell (in which it defaults to `"cell"`).
|
|
@@ -25,7 +25,7 @@ export interface InputPropsBase {
|
|
|
25
25
|
/** Sets the status of the input. */
|
|
26
26
|
status?: ControlStatus;
|
|
27
27
|
/** Input code. */
|
|
28
|
-
code?:
|
|
28
|
+
code?: ReactNode;
|
|
29
29
|
/**
|
|
30
30
|
* Adds a spinner to the input to indicate activity. Note that it doesn't
|
|
31
31
|
* automatically disable the input.
|
|
@@ -34,11 +34,11 @@ export interface InputPropsBase {
|
|
|
34
34
|
*/
|
|
35
35
|
loading?: boolean;
|
|
36
36
|
/** Sets the input's text align. */
|
|
37
|
-
align?: Responsive<
|
|
37
|
+
align?: Responsive<CSSProperties["textAlign"]>;
|
|
38
38
|
/** Input's start adornment. */
|
|
39
|
-
startAdornment?:
|
|
39
|
+
startAdornment?: ReactNode;
|
|
40
40
|
/** Input's end adornment. */
|
|
41
|
-
endAdornment?:
|
|
41
|
+
endAdornment?: ReactNode;
|
|
42
42
|
/**
|
|
43
43
|
* Whether to show a button to clear the input when it has content.
|
|
44
44
|
*
|
|
@@ -59,17 +59,17 @@ export interface InputPropsBase {
|
|
|
59
59
|
* This is useful when there is a need to know when the user stops interacting
|
|
60
60
|
* with the control.
|
|
61
61
|
*/
|
|
62
|
-
onBlurToOutside?: (event:
|
|
62
|
+
onBlurToOutside?: (event: FocusEvent) => void;
|
|
63
63
|
/** Properties to pass to the root component. */
|
|
64
|
-
rootProps?:
|
|
64
|
+
rootProps?: ComponentPropsWithRef<"div">;
|
|
65
65
|
/** Properties to pass to the code component. */
|
|
66
|
-
codeProps?: Omit<
|
|
66
|
+
codeProps?: Omit<ComponentPropsWithRef<typeof ControlAddon>, "status">;
|
|
67
67
|
/** Properties to pass to the container component. */
|
|
68
|
-
containerProps?:
|
|
68
|
+
containerProps?: ComponentPropsWithRef<"div">;
|
|
69
69
|
/** Properties to pass to the clear button component. */
|
|
70
|
-
clearButtonProps?:
|
|
70
|
+
clearButtonProps?: ComponentPropsWithRef<typeof CloseButton>;
|
|
71
71
|
/** Properties to pass to the spinner component. */
|
|
72
|
-
spinnerProps?: Omit<
|
|
72
|
+
spinnerProps?: Omit<ComponentPropsWithRef<typeof Spinner>, "size">;
|
|
73
73
|
}
|
|
74
74
|
/**
|
|
75
75
|
* The input component is used to collect user input. It is built on top of the
|
|
@@ -89,4 +89,4 @@ export interface InputPropsBase {
|
|
|
89
89
|
* }
|
|
90
90
|
* ```
|
|
91
91
|
*/
|
|
92
|
-
export declare const Input:
|
|
92
|
+
export declare const Input: import("react").ForwardRefExoticComponent<InputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type ComponentRef, type Ref } from "react";
|
|
2
2
|
import { Input, type InputProps } from "./Input.tsx";
|
|
3
3
|
/**
|
|
4
4
|
* Utility input component whose `ref` is passed to the input's container. Use
|
|
@@ -9,6 +9,6 @@ import { Input, type InputProps } from "./Input.tsx";
|
|
|
9
9
|
* container (since popovers/menus align themselves based on the element
|
|
10
10
|
* referenced by their trigger).
|
|
11
11
|
*/
|
|
12
|
-
export declare const InputWithContainerRef:
|
|
13
|
-
inputRef?:
|
|
14
|
-
} &
|
|
12
|
+
export declare const InputWithContainerRef: import("react").ForwardRefExoticComponent<InputProps & {
|
|
13
|
+
inputRef?: Ref<ComponentRef<typeof Input>>;
|
|
14
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type ComponentPropsWithoutRef } from "react";
|
|
2
2
|
/** Properties of the keyboard component. */
|
|
3
|
-
export interface KeyboardProps extends
|
|
3
|
+
export interface KeyboardProps extends ComponentPropsWithoutRef<"kbd"> {
|
|
4
4
|
/**
|
|
5
5
|
* Change the component to the HTML tag or custom component of the only child.
|
|
6
6
|
* This will merge the original component props with the props of the supplied
|
|
@@ -12,4 +12,4 @@ export interface KeyboardProps extends React.ComponentPropsWithoutRef<"kbd"> {
|
|
|
12
12
|
* Component used to show which key or combination of keys performs a given
|
|
13
13
|
* action.
|
|
14
14
|
*/
|
|
15
|
-
export declare const Keyboard:
|
|
15
|
+
export declare const Keyboard: import("react").ForwardRefExoticComponent<KeyboardProps & import("react").RefAttributes<HTMLElement>>;
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import { Label as LabelPrimitive } from "radix-ui";
|
|
2
|
-
import
|
|
2
|
+
import { type ComponentPropsWithoutRef, type ComponentPropsWithRef, type ReactNode } from "react";
|
|
3
3
|
import { Icon } from "../Icon";
|
|
4
4
|
import { IconButton } from "../IconButton";
|
|
5
5
|
import { Popover, PopoverContent } from "../Popover";
|
|
6
6
|
/** Properties of the label component. */
|
|
7
|
-
export interface LabelProps extends
|
|
7
|
+
export interface LabelProps extends ComponentPropsWithoutRef<typeof LabelPrimitive.Root> {
|
|
8
8
|
/** Shows a "required" symbol next to the label. */
|
|
9
9
|
required?: boolean;
|
|
10
10
|
/** Optional helper text displayed as a popover triggered by an icon button. */
|
|
11
|
-
helperText?:
|
|
11
|
+
helperText?: ReactNode;
|
|
12
12
|
/** Label of the required icon announced to assistive technologies. */
|
|
13
13
|
requiredIconLabel?: string;
|
|
14
14
|
/** Label of the helper button announced to assistive technologies. */
|
|
15
15
|
helperButtonLabel?: string;
|
|
16
16
|
/** Properties to pass to the container element. */
|
|
17
|
-
containerProps?:
|
|
17
|
+
containerProps?: ComponentPropsWithRef<"div">;
|
|
18
18
|
/** Properties to pass to the required icon container element. */
|
|
19
|
-
requiredIconContainerProps?:
|
|
19
|
+
requiredIconContainerProps?: ComponentPropsWithRef<"span">;
|
|
20
20
|
/** Properties to pass to the required icon component. */
|
|
21
|
-
requiredIconProps?: Omit<
|
|
21
|
+
requiredIconProps?: Omit<ComponentPropsWithRef<typeof Icon>, "icon">;
|
|
22
22
|
/** Properties to pass to the helper button component. */
|
|
23
|
-
helperButtonProps?: Omit<
|
|
23
|
+
helperButtonProps?: Omit<ComponentPropsWithRef<typeof IconButton>, "icon">;
|
|
24
24
|
/** Properties to pass to the helper popover component. */
|
|
25
|
-
helperPopoverProps?:
|
|
25
|
+
helperPopoverProps?: ComponentPropsWithRef<typeof Popover>;
|
|
26
26
|
/** Properties to pass to the helper popover content component. */
|
|
27
|
-
helperPopoverContentProps?:
|
|
27
|
+
helperPopoverContentProps?: ComponentPropsWithRef<typeof PopoverContent>;
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
30
|
* The `Label` component renders an accessible label which can be associated
|
|
@@ -44,4 +44,4 @@ export interface LabelProps extends React.ComponentPropsWithoutRef<typeof LabelP
|
|
|
44
44
|
* }
|
|
45
45
|
* ```
|
|
46
46
|
*/
|
|
47
|
-
export declare const Label:
|
|
47
|
+
export declare const Label: import("react").ForwardRefExoticComponent<LabelProps & import("react").RefAttributes<HTMLLabelElement>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type ComponentPropsWithoutRef, type ComponentPropsWithRef } from "react";
|
|
2
2
|
import { type AccentColor } from "../../utils/accent.ts";
|
|
3
3
|
import { Icon, type IconProp } from "../Icon";
|
|
4
4
|
/** Link variants. */
|
|
@@ -6,7 +6,7 @@ export type LinkVariant = "default" | "alert";
|
|
|
6
6
|
/** Link colours. */
|
|
7
7
|
export type LinkColor = AccentColor;
|
|
8
8
|
/** Properties of the link component. */
|
|
9
|
-
export interface LinkProps extends
|
|
9
|
+
export interface LinkProps extends ComponentPropsWithoutRef<"a"> {
|
|
10
10
|
/**
|
|
11
11
|
* Change the component to the HTML tag or custom component of the only child.
|
|
12
12
|
* This will merge the original component props with the props of the supplied
|
|
@@ -37,7 +37,7 @@ export interface LinkProps extends React.ComponentPropsWithoutRef<"a"> {
|
|
|
37
37
|
/** Link icon. By default, only `external` links have an icon. */
|
|
38
38
|
icon?: IconProp | null;
|
|
39
39
|
/** Properties to pass to the icon component. */
|
|
40
|
-
iconProps?: Omit<
|
|
40
|
+
iconProps?: Omit<ComponentPropsWithRef<typeof Icon>, "icon">;
|
|
41
41
|
}
|
|
42
42
|
/**
|
|
43
43
|
* The link component, with its `href` property, is used to create a hyperlink
|
|
@@ -55,4 +55,4 @@ export interface LinkProps extends React.ComponentPropsWithoutRef<"a"> {
|
|
|
55
55
|
* }
|
|
56
56
|
* ```
|
|
57
57
|
*/
|
|
58
|
-
export declare const Link:
|
|
58
|
+
export declare const Link: import("react").ForwardRefExoticComponent<LinkProps & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
1
|
import { type LinkColor, type LinkVariant } from "./Link.tsx";
|
|
3
2
|
/** Value of the link context. */
|
|
4
3
|
export interface LinkContextValue {
|
|
@@ -10,6 +9,6 @@ export interface LinkContextValue {
|
|
|
10
9
|
/** Default value of the link context. */
|
|
11
10
|
export declare const LINK_CONTEXT_DEFAULT_VALUE: LinkContextValue;
|
|
12
11
|
/** Context for links. */
|
|
13
|
-
export declare const LinkContext:
|
|
12
|
+
export declare const LinkContext: import("react").Context<LinkContextValue>;
|
|
14
13
|
/** Hook providing access to the link context. */
|
|
15
14
|
export declare function useLinkContext(): LinkContextValue;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type ComponentPropsWithoutRef } from "react";
|
|
2
2
|
import { type AccentColor } from "../../utils/accent.ts";
|
|
3
3
|
/** Possible mark colours. */
|
|
4
4
|
export type MarkColor = AccentColor;
|
|
5
5
|
/** Properties of the mark component. */
|
|
6
|
-
export interface MarkProps extends
|
|
6
|
+
export interface MarkProps extends ComponentPropsWithoutRef<"mark"> {
|
|
7
7
|
/**
|
|
8
8
|
* Change the component to the HTML tag or custom component of the only child.
|
|
9
9
|
* This will merge the original component props with the props of the supplied
|
|
@@ -38,4 +38,4 @@ export interface MarkProps extends React.ComponentPropsWithoutRef<"mark"> {
|
|
|
38
38
|
* }
|
|
39
39
|
* ```
|
|
40
40
|
*/
|
|
41
|
-
export declare const Mark:
|
|
41
|
+
export declare const Mark: import("react").ForwardRefExoticComponent<MarkProps & import("react").RefAttributes<HTMLElement>>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type ComponentPropsWithoutRef } from "react";
|
|
2
2
|
/** Menu list variants. */
|
|
3
3
|
export type MenuListVariant = "solid" | "subtle";
|
|
4
4
|
/** Placement of icons within menu list items. */
|
|
5
5
|
export type MenuListIconPlacement = "start" | "end";
|
|
6
6
|
/** Properties of the menu list component. */
|
|
7
|
-
export interface MenuListProps extends
|
|
7
|
+
export interface MenuListProps extends ComponentPropsWithoutRef<"ul"> {
|
|
8
8
|
/**
|
|
9
9
|
* Change the component to the HTML tag or custom component of the only child.
|
|
10
10
|
* This will merge the original component props with the props of the supplied
|
|
@@ -45,4 +45,4 @@ export interface MenuListProps extends React.ComponentPropsWithoutRef<"ul"> {
|
|
|
45
45
|
* }
|
|
46
46
|
* ```
|
|
47
47
|
*/
|
|
48
|
-
export declare const MenuList:
|
|
48
|
+
export declare const MenuList: import("react").ForwardRefExoticComponent<MenuListProps & import("react").RefAttributes<HTMLUListElement>>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
1
|
import { type MenuListIconPlacement, type MenuListVariant } from "./MenuList.tsx";
|
|
3
2
|
/** Value of the menu list context. */
|
|
4
3
|
export interface MenuListContextValue {
|
|
@@ -6,6 +5,6 @@ export interface MenuListContextValue {
|
|
|
6
5
|
variant: MenuListVariant;
|
|
7
6
|
}
|
|
8
7
|
/** Context for menu lists. */
|
|
9
|
-
export declare const MenuListContext:
|
|
8
|
+
export declare const MenuListContext: import("react").Context<MenuListContextValue>;
|
|
10
9
|
/** Hook providing access to the menu list context. */
|
|
11
10
|
export declare function useMenuListContext(): MenuListContextValue;
|