@ostack.tech/ui 1.2.0-beta.0 → 1.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-DGLb7rrz.js.map +1 -1
- package/dist/locales/fr-FR.js.map +1 -1
- package/dist/locales/pt-PT.js.map +1 -1
- package/dist/ostack-ui.css +8 -16
- package/dist/ostack-ui.js +26835 -7981
- package/dist/ostack-ui.js.map +1 -1
- package/package.json +15 -13
- package/scss/components/Button/_Button.scss +4 -18
- package/scss/components/ButtonGroup/_ButtonGroup.scss +2 -6
- package/scss/components/Calendar/_Calendar-variables.scss +4 -12
- package/scss/components/Calendar/_Calendar.scss +19 -38
- package/scss/components/Card/_Card-variables.scss +4 -12
- package/scss/components/Card/_Card.scss +8 -28
- package/scss/components/Collapsible/_Collapsible.scss +2 -8
- package/scss/components/CommandMenu/_CommandMenu-variables.scss +2 -6
- package/scss/components/CommandMenu/_CommandMenu.scss +5 -13
- package/scss/components/ControlAddon/_ControlAddon-variables.scss +4 -12
- package/scss/components/ControlAddon/_ControlAddon.scss +16 -52
- package/scss/components/DataTable/_DataTable.scss +1 -2
- package/scss/components/DateRangeInput/_DateRangeInput-variables.scss +1 -3
- package/scss/components/DateRangeInput/_DateRangeInput.scss +7 -21
- package/scss/components/Dialog/_Dialog.scss +6 -19
- package/scss/components/DropdownMenu/_DropdownMenu.scss +1 -2
- package/scss/components/Feedback/_Feedback-variables.scss +1 -6
- package/scss/components/Feedback/_Feedback.scss +8 -33
- package/scss/components/FieldGroup/_FieldGroup.scss +1 -4
- package/scss/components/Grid/_Grid.scss +4 -12
- package/scss/components/HelperText/_HelperText.scss +1 -4
- package/scss/components/Input/_Input.scss +11 -32
- package/scss/components/Label/_Label.scss +2 -6
- package/scss/components/Link/_Link.scss +1 -2
- package/scss/components/MenuList/_MenuList.scss +2 -6
- package/scss/components/Overlay/_Overlay-variables.scss +1 -3
- package/scss/components/Overlay/_Overlay.scss +2 -4
- package/scss/components/Root/_Root.scss +4 -16
- package/scss/components/Select/_Select-variables.scss +4 -12
- package/scss/components/Select/_Select.scss +1 -2
- package/scss/components/Separator/_Separator.scss +2 -8
- package/scss/components/Spinner/_Spinner.scss +2 -8
- package/scss/components/Stepper/_Stepper-variables.scss +5 -15
- package/scss/components/Stepper/_Stepper.scss +2 -5
- package/scss/components/Table/_Table-variables.scss +16 -47
- package/scss/components/Table/_Table.scss +30 -112
- package/scss/components/Tabs/_Tabs-variables.scss +15 -43
- package/scss/components/Tabs/_Tabs.scss +13 -46
- package/scss/components/Tag/_Tag-variables.scss +1 -4
- package/scss/components/Tag/_Tag.scss +5 -14
- package/scss/components/Toast/_Toast.scss +3 -8
- package/scss/components/Tooltip/_Tooltip-variables.scss +1 -3
- package/scss/components/Tooltip/_Tooltip.scss +4 -12
- package/scss/scss/_base-variables.scss +6 -7
- package/scss/scss/placeholders/button/_button.scss +2 -8
- package/scss/scss/placeholders/checkable/_checkable.scss +15 -60
- package/scss/scss/placeholders/control/_control-variables.scss +3 -10
- package/scss/scss/placeholders/control/_control.scss +10 -38
- package/scss/scss/placeholders/menu/_menu-variables.scss +14 -42
- package/scss/scss/placeholders/menu/_menu.scss +22 -82
- package/scss/scss/placeholders/notification/_notification.scss +2 -4
- package/scss/scss/placeholders/popover/_popover-variables.scss +1 -3
- package/scss/scss/placeholders/popover/_popover.scss +4 -11
- package/scss/scss/utils/_breakpoints.scss +1 -4
- package/scss/scss/utils/_responsive-values.scss +2 -5
- package/scss/scss/utils/_spinner.scss +1 -2
- package/types/components/Actions/Action.d.ts +6 -6
- package/types/components/Actions/ActionGroup.d.ts +10 -14
- package/types/components/Actions/ActionMenu.d.ts +13 -17
- package/types/components/Actions/ActionSplit.d.ts +4 -4
- package/types/components/Actions/Actions.d.ts +20 -25
- package/types/components/Actions/ActionsSecondary.d.ts +1 -1
- package/types/components/Alert/Alert.d.ts +8 -9
- package/types/components/Alert/AlertTitle.d.ts +3 -3
- package/types/components/AlertDialog/AlertDialog.d.ts +16 -20
- package/types/components/AlertDialog/AlertDialogAction.d.ts +2 -2
- package/types/components/AlertDialog/AlertDialogCancel.d.ts +2 -2
- package/types/components/AlertDialog/AlertDialogContent.d.ts +2 -3
- package/types/components/AlertDialog/AlertDialogDescription.d.ts +4 -5
- package/types/components/Button/Button.d.ts +32 -39
- package/types/components/ButtonGroup/ButtonGroup.d.ts +3 -3
- package/types/components/Calendar/Calendar.d.ts +2 -3
- package/types/components/Calendar/CalendarDay.d.ts +3 -4
- package/types/components/Calendar/CalendarHeader.d.ts +2 -2
- package/types/components/Card/Card.d.ts +6 -13
- package/types/components/Card/CardBody.d.ts +3 -3
- package/types/components/Card/CardFooter.d.ts +3 -3
- package/types/components/Card/CardHeader.d.ts +3 -3
- package/types/components/Card/CardTitle.d.ts +3 -3
- package/types/components/Checkbox/Checkbox.d.ts +17 -29
- package/types/components/CheckboxGroup/CheckboxGroup.d.ts +24 -38
- package/types/components/CheckboxGroup/CheckboxGroupContext.d.ts +5 -6
- package/types/components/CloseButton/CloseButton.d.ts +1 -1
- package/types/components/Code/Code.d.ts +4 -5
- package/types/components/Collapsible/Collapsible.d.ts +3 -9
- package/types/components/Collapsible/CollapsibleTrigger.d.ts +1 -4
- package/types/components/CommandMenu/CommandMenu.d.ts +6 -7
- package/types/components/CommandMenu/CommandMenuDialog.d.ts +6 -10
- package/types/components/CommandMenu/CommandMenuItem.d.ts +3 -3
- package/types/components/CommandMenu/cmdk/index.d.ts +73 -112
- package/types/components/Container/Container.d.ts +17 -21
- package/types/components/Control/Control.d.ts +21 -27
- package/types/components/Control/ControlWithContainerRef.d.ts +5 -6
- package/types/components/ControlAddon/ControlAddon.d.ts +9 -13
- package/types/components/ControlCode/ControlCode.d.ts +5 -8
- package/types/components/DataTable/DataTable.d.ts +59 -90
- package/types/components/DataTable/DataTableApi.d.ts +11 -12
- package/types/components/DataTable/DataTableColumn.d.ts +18 -21
- package/types/components/DataTable/DataTableColumnGroup.d.ts +3 -4
- package/types/components/DataTable/DataTableColumns.d.ts +4 -4
- package/types/components/DataTable/DataTableContent.d.ts +2 -5
- package/types/components/DataTable/DataTableEmptyOrLoadingRows.d.ts +1 -4
- package/types/components/DataTable/DataTableFilter.d.ts +3 -3
- package/types/components/DataTable/DataTablePagination.d.ts +5 -9
- package/types/components/DataTable/DataTableRowsPerPage.d.ts +4 -5
- package/types/components/DataTable/DataTableSelectionTrigger.d.ts +5 -11
- package/types/components/DataTable/PagedDataTablePagination.d.ts +1 -1
- package/types/components/DataTable/PagedDataTableRows.d.ts +1 -1
- package/types/components/DataTable/ScrolledDataTableRows.d.ts +1 -1
- package/types/components/DataTable/index.d.ts +1 -1
- package/types/components/DataTable/{getRowKey.d.ts → keyUtils.d.ts} +2 -0
- package/types/components/DataTable/spliceWindow.d.ts +3 -4
- package/types/components/DateInput/DateInput.d.ts +21 -34
- package/types/components/DateRangeInput/DateRangeInput.d.ts +41 -70
- package/types/components/DescriptionList/DescriptionList.d.ts +5 -10
- package/types/components/Dialog/Dialog.d.ts +9 -11
- package/types/components/Dialog/DialogContent.d.ts +3 -4
- package/types/components/Dialog/DialogDescription.d.ts +2 -3
- package/types/components/DropdownMenu/DropdownMenu.d.ts +10 -21
- package/types/components/DropdownMenu/DropdownMenuCheckboxItem.d.ts +1 -1
- package/types/components/DropdownMenu/DropdownMenuItem.d.ts +3 -3
- package/types/components/DropdownMenu/DropdownMenuRadioItem.d.ts +1 -1
- package/types/components/DropdownMenu/DropdownMenuSubContent.d.ts +1 -4
- package/types/components/DropdownMenu/DropdownMenuSubTrigger.d.ts +1 -4
- package/types/components/ErrorBoundary/ErrorBoundary.d.ts +21 -27
- package/types/components/Feedback/Feedback.d.ts +6 -6
- package/types/components/Feedback/FeedbackPopover.d.ts +3 -3
- package/types/components/Feedback/FeedbackProvider.d.ts +3 -4
- package/types/components/Feedback/feedbackUtils.d.ts +5 -8
- package/types/components/Field/Field.d.ts +9 -11
- package/types/components/Field/fieldUtils.d.ts +2 -2
- package/types/components/FieldGroup/FieldGroup.d.ts +4 -5
- package/types/components/FieldGroup/FieldGroupBody.d.ts +3 -3
- package/types/components/FieldGroup/FieldGroupHeader.d.ts +4 -4
- package/types/components/FieldGroup/FieldGroupTitle.d.ts +3 -3
- package/types/components/Form/Form.d.ts +25 -40
- package/types/components/Form/FormContext.d.ts +2 -2
- package/types/components/Form/FormError.d.ts +6 -11
- package/types/components/Form/FormState.d.ts +2 -2
- package/types/components/Form/formUtils.d.ts +1 -1
- package/types/components/Form/useRegisterFormControl.d.ts +1 -1
- package/types/components/Grid/Grid.d.ts +19 -24
- package/types/components/Heading/Heading.d.ts +9 -10
- package/types/components/HelperText/HelperText.d.ts +3 -3
- package/types/components/HelperText/HelperTextProvider.d.ts +3 -4
- package/types/components/Icon/Icon.d.ts +9 -16
- package/types/components/IconButton/IconButton.d.ts +35 -53
- package/types/components/Input/Input.d.ts +5 -12
- package/types/components/Keybinds/KeyPress.d.ts +1 -1
- package/types/components/Keybinds/Keybind.d.ts +1 -1
- package/types/components/Keybinds/Keybinds.d.ts +3 -9
- package/types/components/Keyboard/Keyboard.d.ts +7 -8
- package/types/components/Label/Label.d.ts +5 -6
- package/types/components/Label/LabelProvider.d.ts +3 -4
- package/types/components/Label/labelUtils.d.ts +2 -2
- package/types/components/Layer/Layer.d.ts +4 -4
- package/types/components/Link/Link.d.ts +13 -13
- package/types/components/Mark/Mark.d.ts +6 -7
- package/types/components/MenuList/MenuList.d.ts +6 -7
- package/types/components/MenuList/MenuListGroup.d.ts +5 -6
- package/types/components/MenuList/MenuListItem.d.ts +21 -25
- package/types/components/NumericInput/NumericInput.d.ts +20 -34
- package/types/components/NumericInput/numericInputUtils.d.ts +4 -5
- package/types/components/Output/Output.d.ts +12 -13
- package/types/components/Popover/Popover.d.ts +6 -13
- package/types/components/Popover/PopoverAnchor.d.ts +2 -2
- package/types/components/Popover/PopoverTrigger.d.ts +2 -2
- package/types/components/Portal/Portal.d.ts +3 -4
- package/types/components/Printer/Printer.d.ts +40 -54
- package/types/components/Printer/PrinterContent.d.ts +6 -6
- package/types/components/Printer/PrinterContentContext.d.ts +4 -5
- package/types/components/Printer/PrinterContext.d.ts +4 -4
- package/types/components/Printer/PrinterTrigger.d.ts +5 -6
- package/types/components/Printer/index.d.ts +1 -1
- package/types/components/RadioGroup/Radio.d.ts +10 -13
- package/types/components/RadioGroup/RadioGroup.d.ts +21 -34
- package/types/components/Root/Root.d.ts +21 -27
- package/types/components/Root/RootContext.d.ts +1 -4
- package/types/components/Select/Option.d.ts +3 -3
- package/types/components/Select/Select.d.ts +14 -26
- package/types/components/Select/SelectNative.d.ts +1 -1
- package/types/components/Separator/Separator.d.ts +3 -4
- package/types/components/Slot/Slottable.d.ts +1 -4
- package/types/components/Spinner/Spinner.d.ts +5 -12
- package/types/components/Stack/Stack.d.ts +9 -13
- package/types/components/Stepper/Step.d.ts +6 -6
- package/types/components/Stepper/StepContent.d.ts +3 -3
- package/types/components/Stepper/StepList.d.ts +4 -5
- package/types/components/Stepper/Stepper.d.ts +4 -5
- package/types/components/Stepper/StepperFinishTrigger.d.ts +3 -9
- package/types/components/Stepper/StepperNextTrigger.d.ts +3 -6
- package/types/components/Stepper/StepperPreviousTrigger.d.ts +4 -10
- package/types/components/Table/Table.d.ts +42 -58
- package/types/components/Table/TableCell.d.ts +15 -19
- package/types/components/Table/TableColumn.d.ts +15 -27
- package/types/components/Table/TableColumnGroup.d.ts +2 -3
- package/types/components/Table/TableHead.d.ts +5 -5
- package/types/components/Tabs/TabContent.d.ts +2 -2
- package/types/components/Tabs/TabList.d.ts +1 -1
- package/types/components/Tabs/Tabs.d.ts +4 -8
- package/types/components/Tag/Tag.d.ts +8 -8
- package/types/components/TextArea/TextArea.d.ts +7 -13
- package/types/components/Toast/Toast.d.ts +25 -38
- package/types/components/Toast/ToastProvider.d.ts +2 -5
- package/types/components/Toast/ToastViewport.d.ts +2 -5
- package/types/components/Tooltip/Tooltip.d.ts +11 -11
- package/types/components/VisuallyHidden/VisuallyHidden.d.ts +7 -11
- package/types/index.d.ts +2 -1
- package/types/providers/AlertDialogProvider/AlertDialogProviderContext.d.ts +17 -19
- package/types/providers/AlertDialogProvider/useAlertDialog.d.ts +50 -58
- package/types/providers/DocumentTitleProvider/DocumentTitle.d.ts +1 -4
- package/types/providers/ErrorReportingProvider/ErrorReport.d.ts +4 -7
- package/types/providers/ErrorReportingProvider/ErrorReportingProvider.d.ts +12 -17
- package/types/providers/LocalizationProvider/useLocale.d.ts +1 -4
- package/types/providers/PrefixProvider/defaultPrefix.d.ts +2 -3
- package/types/providers/PrefixProvider/usePrefix.d.ts +3 -6
- package/types/providers/ToastManagerProvider/ToastManagerContext.d.ts +3 -3
- package/types/providers/ToastManagerProvider/useToastManager.d.ts +11 -14
- package/types/utils/__tests__/useCombinedRef.test.d.ts +1 -0
- package/types/utils/breakpoints.d.ts +5 -6
- package/types/utils/combineAriaIds.d.ts +1 -1
- package/types/utils/cx.d.ts +2 -5
- package/types/utils/filtering.d.ts +2 -2
- package/types/utils/keyboardShortcut.d.ts +18 -25
- package/types/utils/navigate.d.ts +2 -2
- package/types/utils/numericStringUtils.d.ts +6 -13
- package/types/utils/parseChildren.d.ts +5 -9
- package/types/utils/reactCompilerUtils.d.ts +7 -0
- package/types/utils/setNativeProperty.d.ts +2 -3
- package/types/utils/sorting.d.ts +2 -2
- package/types/utils/useCombinedEventHandler.d.ts +30 -0
- package/types/utils/useCombinedRef.d.ts +6 -4
- package/types/utils/useCssVars.d.ts +9 -20
- package/types/utils/useDateTransformer.d.ts +4 -8
- package/types/utils/useIntersectionObserver.d.ts +2 -5
- package/types/utils/useLatestRef.d.ts +1 -2
- package/types/utils/useLocation.d.ts +5 -8
- package/types/utils/useMeasure.d.ts +2 -5
- package/types/utils/useMediaQuery.d.ts +1 -4
- package/types/utils/useNumericTransformer.d.ts +12 -19
- package/types/utils/usePrevious.d.ts +3 -4
- package/types/utils/useResponsiveValues.d.ts +7 -10
- package/types/utils/useScrollPosition.d.ts +1 -6
- package/types/utils/useSearchParam.d.ts +2 -6
- package/types/utils/useSearchParams.d.ts +1 -4
- package/types/utils/useSpacing.d.ts +1 -4
- package/types/utils/zustandUtils.d.ts +3 -2
- package/types/utils/combineEventHandlers.d.ts +0 -24
- /package/types/utils/__tests__/{combineEventHandlers.test.d.ts → useCombinedEventHandler.test.d.ts} +0 -0
|
@@ -2,16 +2,15 @@ import { type ComponentProps } from "react";
|
|
|
2
2
|
/** Properties of the step list component. */
|
|
3
3
|
export interface StepListProps extends ComponentProps<"ol"> {
|
|
4
4
|
/**
|
|
5
|
-
* Change the component to the HTML tag or custom component of the only child.
|
|
6
|
-
*
|
|
7
|
-
*
|
|
5
|
+
* Change the component to the HTML tag or custom component of the only child. This will merge the
|
|
6
|
+
* original component props with the props of the supplied element/component and change the
|
|
7
|
+
* underlying DOM node.
|
|
8
8
|
*/
|
|
9
9
|
asChild?: boolean;
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
12
|
* Component containing the list of steps.
|
|
13
13
|
*
|
|
14
|
-
* The `index` of each `Step` is automatically added when `Step`s are direct
|
|
15
|
-
* children of `StepList`.
|
|
14
|
+
* The `index` of each `Step` is automatically added when `Step`s are direct children of `StepList`.
|
|
16
15
|
*/
|
|
17
16
|
export declare function StepList({ asChild, className, children, ...otherProps }: StepListProps): import("react").JSX.Element;
|
|
@@ -3,9 +3,9 @@ import { type StepperApi } from "./StepperContext.ts";
|
|
|
3
3
|
/** Properties of the stepper component. */
|
|
4
4
|
export interface StepperProps extends ComponentProps<"div"> {
|
|
5
5
|
/**
|
|
6
|
-
* Change the component to the HTML tag or custom component of the only child.
|
|
7
|
-
*
|
|
8
|
-
*
|
|
6
|
+
* Change the component to the HTML tag or custom component of the only child. This will merge the
|
|
7
|
+
* original component props with the props of the supplied element/component and change the
|
|
8
|
+
* underlying DOM node.
|
|
9
9
|
*/
|
|
10
10
|
asChild?: boolean;
|
|
11
11
|
/**
|
|
@@ -38,8 +38,7 @@ export interface StepperProps extends ComponentProps<"div"> {
|
|
|
38
38
|
* - `StepperPreviousTrigger`: Trigger to navigate to the previous step.
|
|
39
39
|
* - `StepperNextTrigger`: Trigger to navigate to the next step.
|
|
40
40
|
* - `StepperFinishTrigger`: Trigger to finish the stepper.
|
|
41
|
-
* - `StepperState`: Utility component providing access to the state of the
|
|
42
|
-
* stepper and its API.
|
|
41
|
+
* - `StepperState`: Utility component providing access to the state of the stepper and its API.
|
|
43
42
|
*
|
|
44
43
|
* Example usage:
|
|
45
44
|
*
|
|
@@ -17,19 +17,13 @@ export interface StepperFinishTriggerPropsBase {
|
|
|
17
17
|
*/
|
|
18
18
|
showWhilePrinting?: boolean;
|
|
19
19
|
}
|
|
20
|
-
/**
|
|
21
|
-
|
|
22
|
-
* children.
|
|
23
|
-
*/
|
|
24
|
-
export interface StepperFinishTriggerChildlessProps extends StepperFinishTriggerPropsBase, Omit<ButtonProps, "asChild" | "children"> {
|
|
20
|
+
/** Properties of the stepper finish trigger component when rendered without children. */
|
|
21
|
+
export interface StepperFinishTriggerChildlessProps extends StepperFinishTriggerPropsBase, Omit<ButtonProps, "as" | "asChild" | "children"> {
|
|
25
22
|
/** Label displayed on the button. */
|
|
26
23
|
label?: ReactNode;
|
|
27
24
|
children?: never;
|
|
28
25
|
}
|
|
29
|
-
/**
|
|
30
|
-
* Properties of the stepper finish trigger component when rendered with
|
|
31
|
-
* children.
|
|
32
|
-
*/
|
|
26
|
+
/** Properties of the stepper finish trigger component when rendered with children. */
|
|
33
27
|
export interface StepperFinishTriggerChildrenProps extends StepperFinishTriggerPropsBase, ComponentProps<"button"> {
|
|
34
28
|
children: ReactNode;
|
|
35
29
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ComponentProps, ReactNode } from "react";
|
|
2
2
|
import { type ButtonProps } from "../Button";
|
|
3
3
|
/** Properties of the stepper next trigger component. */
|
|
4
4
|
export type StepperNextTriggerProps = StepperNextTriggerChildlessProps | StepperNextTriggerChildrenProps;
|
|
@@ -17,11 +17,8 @@ export interface StepperNextTriggerPropsBase {
|
|
|
17
17
|
*/
|
|
18
18
|
showWhilePrinting?: boolean;
|
|
19
19
|
}
|
|
20
|
-
/**
|
|
21
|
-
|
|
22
|
-
* children.
|
|
23
|
-
*/
|
|
24
|
-
export interface StepperNextTriggerChildlessProps extends StepperNextTriggerPropsBase, Omit<ButtonProps, "asChild" | "children"> {
|
|
20
|
+
/** Properties of the stepper next trigger component when rendered without children. */
|
|
21
|
+
export interface StepperNextTriggerChildlessProps extends StepperNextTriggerPropsBase, Omit<ButtonProps, "as" | "asChild" | "children"> {
|
|
25
22
|
/** Label displayed on the button. */
|
|
26
23
|
label?: ReactNode;
|
|
27
24
|
children?: never;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ComponentProps, ReactNode } from "react";
|
|
2
2
|
import { type ButtonProps } from "../Button";
|
|
3
3
|
/** Properties of the stepper previous trigger component. */
|
|
4
4
|
export type StepperPreviousTriggerProps = StepperPreviousTriggerChildlessProps | StepperPreviousTriggerChildrenProps;
|
|
@@ -17,19 +17,13 @@ export interface StepperPreviousTriggerPropsBase {
|
|
|
17
17
|
*/
|
|
18
18
|
showWhilePrinting?: boolean;
|
|
19
19
|
}
|
|
20
|
-
/**
|
|
21
|
-
|
|
22
|
-
* children.
|
|
23
|
-
*/
|
|
24
|
-
export interface StepperPreviousTriggerChildlessProps extends StepperPreviousTriggerPropsBase, Omit<ButtonProps, "asChild" | "children"> {
|
|
20
|
+
/** Properties of the stepper previous trigger component when rendered without children. */
|
|
21
|
+
export interface StepperPreviousTriggerChildlessProps extends StepperPreviousTriggerPropsBase, Omit<ButtonProps, "as" | "asChild" | "children"> {
|
|
25
22
|
/** Label displayed on the button. */
|
|
26
23
|
label?: ReactNode;
|
|
27
24
|
children?: never;
|
|
28
25
|
}
|
|
29
|
-
/**
|
|
30
|
-
* Properties of the stepper previous trigger component when rendered with
|
|
31
|
-
* children.
|
|
32
|
-
*/
|
|
26
|
+
/** Properties of the stepper previous trigger component when rendered with children. */
|
|
33
27
|
export interface StepperPreviousTriggerChildrenProps extends StepperPreviousTriggerPropsBase, ComponentProps<"button"> {
|
|
34
28
|
children: ReactNode;
|
|
35
29
|
}
|
|
@@ -11,25 +11,22 @@ export type TableLayout = "auto" | "fixed";
|
|
|
11
11
|
/** Properties of the table component. */
|
|
12
12
|
export interface TableProps extends ComponentProps<"table"> {
|
|
13
13
|
/**
|
|
14
|
-
* Caption of the table. This caption is displayed outside the table, above or
|
|
15
|
-
*
|
|
14
|
+
* Caption of the table. This caption is displayed outside the table, above or below it (depending
|
|
15
|
+
* on the value of `captionSide`), in a `<div>` element.
|
|
16
16
|
*
|
|
17
|
-
* This value is also used as the default value of the `visuallyHiddenCaption`
|
|
18
|
-
*
|
|
19
|
-
* table for accessibility purposes.
|
|
17
|
+
* This value is also used as the default value of the `visuallyHiddenCaption` property, which
|
|
18
|
+
* renders a visually hidden `<caption>` element within the table for accessibility purposes.
|
|
20
19
|
*
|
|
21
|
-
* It is not necessary to specify this property (or `visuallyHiddenCaption`)
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
* of the `Label`'s `children`.
|
|
20
|
+
* It is not necessary to specify this property (or `visuallyHiddenCaption`) when rendering the
|
|
21
|
+
* `Table` within a `Field` component containing a `Label`, as the `visuallyHiddenCaption`
|
|
22
|
+
* property is automatically set with the value of the `Label`'s `children`.
|
|
25
23
|
*
|
|
26
|
-
* > **Note:** The visible caption is rendered as a `<div>` because of the
|
|
27
|
-
* >
|
|
24
|
+
* > **Note:** The visible caption is rendered as a `<div>` because of the difficulty in styling a
|
|
25
|
+
* > `<caption>` element.
|
|
28
26
|
*/
|
|
29
27
|
caption?: ReactNode;
|
|
30
28
|
/**
|
|
31
|
-
* Side in which to place the caption, when the `caption` property is
|
|
32
|
-
* provided.
|
|
29
|
+
* Side in which to place the caption, when the `caption` property is provided.
|
|
33
30
|
*
|
|
34
31
|
* @default "bottom"
|
|
35
32
|
*/
|
|
@@ -37,33 +34,28 @@ export interface TableProps extends ComponentProps<"table"> {
|
|
|
37
34
|
/**
|
|
38
35
|
* Content of the visually hidden `<caption>` element.
|
|
39
36
|
*
|
|
40
|
-
* By default, this is set to the value of the `caption` property when
|
|
41
|
-
* provided
|
|
42
|
-
*
|
|
43
|
-
* `children` is used instead.
|
|
37
|
+
* By default, this is set to the value of the `caption` property when provided. If a `caption` is
|
|
38
|
+
* not provided and the `Table` is rendered within a `Field` component containing a `Label`, the
|
|
39
|
+
* value of the `Label`'s `children` is used instead.
|
|
44
40
|
*
|
|
45
|
-
* Prefer using either the `caption` property or wrapping the table in a
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
41
|
+
* Prefer using either the `caption` property or wrapping the table in a labelled field. Manually
|
|
42
|
+
* set this property either to specify an accessible caption that differs from the visible one, or
|
|
43
|
+
* when wanting to provide an accessible caption without displaying the default caption or a
|
|
44
|
+
* `Label`.
|
|
49
45
|
*/
|
|
50
46
|
visuallyHiddenCaption?: ReactNode;
|
|
51
47
|
/**
|
|
52
|
-
* Marks the table as being meant for editable content (cells containing form
|
|
53
|
-
* controls).
|
|
48
|
+
* Marks the table as being meant for editable content (cells containing form controls).
|
|
54
49
|
*
|
|
55
|
-
* In effect, this changes the default table variant to `"control"` and
|
|
56
|
-
*
|
|
57
|
-
* `paddingless`.
|
|
50
|
+
* In effect, this changes the default table variant to `"control"` and defaults all cells as
|
|
51
|
+
* `framed`, as well as all non-header cells as `paddingless`.
|
|
58
52
|
*/
|
|
59
53
|
editable?: boolean;
|
|
60
54
|
/**
|
|
61
|
-
* Table's style variant. The default variant should typically be used for
|
|
62
|
-
*
|
|
63
|
-
* controls) for writable data.
|
|
55
|
+
* Table's style variant. The default variant should typically be used for readable data, while
|
|
56
|
+
* the control variant (which resembles other form controls) for writable data.
|
|
64
57
|
*
|
|
65
|
-
* Defaults to `"default"` for non-`editable` tables and to `"control"`
|
|
66
|
-
* otherwise.
|
|
58
|
+
* Defaults to `"default"` for non-`editable` tables and to `"control"` otherwise.
|
|
67
59
|
*/
|
|
68
60
|
variant?: TableVariant;
|
|
69
61
|
/** Sets the status of the table. */
|
|
@@ -71,22 +63,17 @@ export interface TableProps extends ComponentProps<"table"> {
|
|
|
71
63
|
/**
|
|
72
64
|
* How to lay out the table:
|
|
73
65
|
*
|
|
74
|
-
* - `"auto"` lets the browser automatically adjust the size of cells to fit
|
|
75
|
-
* their content.
|
|
66
|
+
* - `"auto"` lets the browser automatically adjust the size of cells to fit their content.
|
|
76
67
|
* - `"fixed"` sizes each cell according to the width provided by each column.
|
|
77
68
|
*
|
|
78
|
-
* The table layout defaults to `"auto"` when the table isn't editable, and
|
|
79
|
-
* `"fixed"` otherwise.
|
|
69
|
+
* The table layout defaults to `"auto"` when the table isn't editable, and `"fixed"` otherwise.
|
|
80
70
|
*/
|
|
81
71
|
layout?: TableLayout;
|
|
82
|
-
/**
|
|
83
|
-
* Whether the table should be marked as required when it is being used as a
|
|
84
|
-
* control.
|
|
85
|
-
*/
|
|
72
|
+
/** Whether the table should be marked as required when it is being used as a control. */
|
|
86
73
|
required?: boolean;
|
|
87
74
|
/**
|
|
88
|
-
* When the table layout is set to `"fixed"`, this property specifies the
|
|
89
|
-
*
|
|
75
|
+
* When the table layout is set to `"fixed"`, this property specifies the default minimum width of
|
|
76
|
+
* all columns (in pixels).
|
|
90
77
|
*
|
|
91
78
|
* @default 150
|
|
92
79
|
*/
|
|
@@ -108,26 +95,23 @@ export interface TableProps extends ComponentProps<"table"> {
|
|
|
108
95
|
* It composes the following subcomponents:
|
|
109
96
|
*
|
|
110
97
|
* - `TableHead`: Header of the table (corresponds to the
|
|
111
|
-
* [`<thead>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/thead)
|
|
112
|
-
*
|
|
113
|
-
* - `TableColumn`: Component used inside `TableHead` to represent a column of the
|
|
114
|
-
*
|
|
115
|
-
* - `TableColumnGroup`: Component used inside `TableHead` to group columns of the
|
|
116
|
-
* table.
|
|
98
|
+
* [`<thead>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/thead) HTML
|
|
99
|
+
* element).
|
|
100
|
+
* - `TableColumn`: Component used inside `TableHead` to represent a column of the table.
|
|
101
|
+
* - `TableColumnGroup`: Component used inside `TableHead` to group columns of the table.
|
|
117
102
|
* - `TableBody`: Body of the table (corresponds to the
|
|
118
|
-
* [`<tbody>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/tbody)
|
|
119
|
-
*
|
|
103
|
+
* [`<tbody>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/tbody) HTML
|
|
104
|
+
* element).
|
|
120
105
|
* - `TableFoot`: Footer of the table (corresponds to the
|
|
121
|
-
* [`<tfoot>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/tfoot)
|
|
122
|
-
*
|
|
106
|
+
* [`<tfoot>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/tfoot) HTML
|
|
107
|
+
* element).
|
|
123
108
|
* - `TableRow`: Row of the table (corresponds to the
|
|
124
|
-
* [`<tr>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/tr)
|
|
125
|
-
*
|
|
109
|
+
* [`<tr>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/tr) HTML
|
|
110
|
+
* element).
|
|
126
111
|
* - `TableCell`: Cell of the table (corresponds to the
|
|
127
|
-
* [`<th>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/th)
|
|
128
|
-
*
|
|
129
|
-
*
|
|
130
|
-
* HTML elements). Set the `header` property to switch from `td` to `th`.
|
|
112
|
+
* [`<th>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/th) and
|
|
113
|
+
* [`<td>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/td) HTML
|
|
114
|
+
* elements). Set the `header` property to switch from `td` to `th`.
|
|
131
115
|
*
|
|
132
116
|
* Example usage:
|
|
133
117
|
*
|
|
@@ -170,4 +154,4 @@ export interface TableProps extends ComponentProps<"table"> {
|
|
|
170
154
|
* }
|
|
171
155
|
* ```
|
|
172
156
|
*/
|
|
173
|
-
export declare function Table({ caption, captionSide, visuallyHiddenCaption, editable, variant, status, layout, required, defaultColumnWidth, maxHeight, containerProps, scrollableProps, captionProps, visuallyHiddenCaptionProps, className, children, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, ref, ...otherProps }: TableProps): import("react").JSX.Element;
|
|
157
|
+
export declare function Table({ caption, captionSide, visuallyHiddenCaption: visuallyHiddenCaptionProp, editable, variant, status, layout, required, defaultColumnWidth, maxHeight, containerProps, scrollableProps, captionProps, visuallyHiddenCaptionProps, className, children, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, ref, ...otherProps }: TableProps): import("react").JSX.Element;
|
|
@@ -7,12 +7,11 @@ export type TableCellSticky = "left" | "right";
|
|
|
7
7
|
/** Properties of the table row component. */
|
|
8
8
|
export interface TableCellProps extends Omit<ComponentProps<"td" | "th">, "align"> {
|
|
9
9
|
/**
|
|
10
|
-
* Index of the (leaf) column this cell belongs to. This property is
|
|
11
|
-
*
|
|
12
|
-
* direct child.
|
|
10
|
+
* Index of the (leaf) column this cell belongs to. This property is automatically set by the
|
|
11
|
+
* `TableRow` component when the `TableCell` is its direct child.
|
|
13
12
|
*
|
|
14
|
-
* When set, the cell automatically inherits properties defined in the
|
|
15
|
-
*
|
|
13
|
+
* When set, the cell automatically inherits properties defined in the corresponding column, such
|
|
14
|
+
* as `align` or `sticky`.
|
|
16
15
|
*/
|
|
17
16
|
columnIndex?: number | null;
|
|
18
17
|
/**
|
|
@@ -22,35 +21,32 @@ export interface TableCellProps extends Omit<ComponentProps<"td" | "th">, "align
|
|
|
22
21
|
*/
|
|
23
22
|
_stickyColumnIndex?: number | null;
|
|
24
23
|
/**
|
|
25
|
-
* Whether this cell should be rendered as a table header cell (`th` element).
|
|
26
|
-
*
|
|
24
|
+
* Whether this cell should be rendered as a table header cell (`th` element). By default, `true`
|
|
25
|
+
* within a `TableHead` component, and `false` otherwise.
|
|
27
26
|
*/
|
|
28
27
|
header?: boolean;
|
|
29
|
-
/**
|
|
30
|
-
* Specifies how to align the cell's content. Numeric fields should typically
|
|
31
|
-
* be right aligned.
|
|
32
|
-
*/
|
|
28
|
+
/** Specifies how to align the cell's content. Numeric fields should typically be right aligned. */
|
|
33
29
|
align?: CSSProperties["textAlign"];
|
|
34
30
|
/**
|
|
35
|
-
* Style variant to use. By default, defaults to `"header"` when the cell is a
|
|
36
|
-
* `
|
|
31
|
+
* Style variant to use. By default, defaults to `"header"` when the cell is a `header`, and to
|
|
32
|
+
* `"data"` otherwise.
|
|
37
33
|
*/
|
|
38
34
|
variant?: TableCellVariant;
|
|
39
35
|
/**
|
|
40
|
-
* Cell status, used to render the cell in the style of the given status, when
|
|
41
|
-
*
|
|
36
|
+
* Cell status, used to render the cell in the style of the given status, when the table is of the
|
|
37
|
+
* "control" variant.
|
|
42
38
|
*
|
|
43
39
|
* By default, `header` cells inherit the `Table`'s `status`.
|
|
44
40
|
*/
|
|
45
41
|
status?: ControlStatus | null;
|
|
46
42
|
/**
|
|
47
|
-
* Renders the cell with borders. This property defaults to `true` when the
|
|
48
|
-
*
|
|
43
|
+
* Renders the cell with borders. This property defaults to `true` when the table is editable and
|
|
44
|
+
* to `false` otherwise.
|
|
49
45
|
*/
|
|
50
46
|
framed?: boolean;
|
|
51
47
|
/**
|
|
52
|
-
* Removes the cell's padding. This property defaults to `true` when the table
|
|
53
|
-
*
|
|
48
|
+
* Removes the cell's padding. This property defaults to `true` when the table is editable and the
|
|
49
|
+
* cell is not a `header`, and to `false` otherwise.
|
|
54
50
|
*/
|
|
55
51
|
paddingless?: boolean;
|
|
56
52
|
/** Makes the table cell stick to one of the sides of table. */
|
|
@@ -19,39 +19,28 @@ export interface TableColumnObject extends Omit<TableCellProps, "columnIndex" |
|
|
|
19
19
|
/**
|
|
20
20
|
* Minimum width of a column (in pixels).
|
|
21
21
|
*
|
|
22
|
-
* In "fixed" layout, this property is only relevant when applied to "leaf"
|
|
23
|
-
*
|
|
22
|
+
* In "fixed" layout, this property is only relevant when applied to "leaf" columns (columns that
|
|
23
|
+
* don't contain other columns).
|
|
24
24
|
*
|
|
25
|
-
* An array may be provided (with a length matching `colSpan`) to specify the
|
|
26
|
-
*
|
|
25
|
+
* An array may be provided (with a length matching `colSpan`) to specify the `width` of each
|
|
26
|
+
* column that this column spans over.
|
|
27
27
|
*/
|
|
28
28
|
width?: number | number[];
|
|
29
|
-
/**
|
|
30
|
-
* When the table has a "fixed" layout, this property specifies that a column
|
|
31
|
-
* should not grow.
|
|
32
|
-
*/
|
|
29
|
+
/** When the table has a "fixed" layout, this property specifies that a column should not grow. */
|
|
33
30
|
fixed?: boolean;
|
|
34
|
-
/**
|
|
35
|
-
* Marks the column as sortable by displaying a sorting icon and listening to
|
|
36
|
-
* click events on it.
|
|
37
|
-
*/
|
|
31
|
+
/** Marks the column as sortable by displaying a sorting icon and listening to click events on it. */
|
|
38
32
|
sortable?: boolean;
|
|
39
33
|
/**
|
|
40
|
-
* Direction to initially sort the column by when first clicking on the sort
|
|
41
|
-
* button.
|
|
34
|
+
* Direction to initially sort the column by when first clicking on the sort button.
|
|
42
35
|
*
|
|
43
36
|
* @default "asc"
|
|
44
37
|
*/
|
|
45
38
|
defaultSortDirection?: SortDirection;
|
|
46
|
-
/**
|
|
47
|
-
* Whether the data is currently sorted by this column and, if so, in which
|
|
48
|
-
* direction.
|
|
49
|
-
*/
|
|
39
|
+
/** Whether the data is currently sorted by this column and, if so, in which direction. */
|
|
50
40
|
sorted?: SortDirection;
|
|
51
41
|
/**
|
|
52
|
-
* Callback called when the sort button is clicked. The direction provided is
|
|
53
|
-
*
|
|
54
|
-
* longer be sorted by this column.
|
|
42
|
+
* Callback called when the sort button is clicked. The direction provided is the new sort
|
|
43
|
+
* direction for the column or `null` when the table should no longer be sorted by this column.
|
|
55
44
|
*/
|
|
56
45
|
onSort?: (direction: SortDirection | null) => void;
|
|
57
46
|
/** Properties to pass to the container component. */
|
|
@@ -59,7 +48,7 @@ export interface TableColumnObject extends Omit<TableCellProps, "columnIndex" |
|
|
|
59
48
|
/** Properties to pass to the label component. */
|
|
60
49
|
labelProps?: ComponentProps<"div">;
|
|
61
50
|
/** Properties to pass to the sort button. */
|
|
62
|
-
sortButtonProps?: ButtonProps
|
|
51
|
+
sortButtonProps?: Omit<ButtonProps, "as">;
|
|
63
52
|
/** Properties to pass to the component containing the sort icons. */
|
|
64
53
|
sortIconContainerProps?: ComponentProps<"div">;
|
|
65
54
|
/** Properties to pass to the sort ascending icon component. */
|
|
@@ -76,16 +65,15 @@ export interface TableColumnObject extends Omit<TableCellProps, "columnIndex" |
|
|
|
76
65
|
/** Representation of a table column in object notation. */
|
|
77
66
|
export interface TableColumnProps extends Omit<TableColumnObject, "subColumns"> {
|
|
78
67
|
/**
|
|
79
|
-
* Label of the table column. `label` can also be used for the same purpose.
|
|
80
|
-
*
|
|
68
|
+
* Label of the table column. `label` can also be used for the same purpose. If both `label` and
|
|
69
|
+
* `children` are provided, `label` has priority.
|
|
81
70
|
*/
|
|
82
71
|
children?: ReactNode;
|
|
83
72
|
}
|
|
84
73
|
/**
|
|
85
74
|
* Table column component.
|
|
86
75
|
*
|
|
87
|
-
* This component doesn't actually render anything by itself; it is used by the
|
|
88
|
-
*
|
|
89
|
-
* the columns.
|
|
76
|
+
* This component doesn't actually render anything by itself; it is used by the `TableHead`
|
|
77
|
+
* component to automatically create an appropriate header based on the columns.
|
|
90
78
|
*/
|
|
91
79
|
export declare function TableColumn(_props: TableColumnProps): null;
|
|
@@ -31,8 +31,7 @@ export interface TableColumnGroupProps extends Omit<TableColumnGroupObject, "sub
|
|
|
31
31
|
/**
|
|
32
32
|
* Table column group component.
|
|
33
33
|
*
|
|
34
|
-
* This component doesn't actually render anything by itself; it is used by the
|
|
35
|
-
*
|
|
36
|
-
* the columns.
|
|
34
|
+
* This component doesn't actually render anything by itself; it is used by the `TableHead`
|
|
35
|
+
* component to automatically create an appropriate header based on the columns.
|
|
37
36
|
*/
|
|
38
37
|
export declare function TableColumnGroup(_props: TableColumnGroupProps): null;
|
|
@@ -7,8 +7,8 @@ export type TableColumnObjects = (TableColumnObject | TableColumnGroupObject)[];
|
|
|
7
7
|
/** Properties of the table head component. */
|
|
8
8
|
export interface TableHeadProps extends ComponentProps<"thead"> {
|
|
9
9
|
/**
|
|
10
|
-
* Columns of the table in object notation (prefer using `<TableColumn>` and
|
|
11
|
-
*
|
|
10
|
+
* Columns of the table in object notation (prefer using `<TableColumn>` and `<TableColumnGroup>`
|
|
11
|
+
* instead).
|
|
12
12
|
*/
|
|
13
13
|
columns?: TableColumnObjects;
|
|
14
14
|
/**
|
|
@@ -18,8 +18,8 @@ export interface TableHeadProps extends ComponentProps<"thead"> {
|
|
|
18
18
|
*/
|
|
19
19
|
sticky?: boolean;
|
|
20
20
|
/**
|
|
21
|
-
* Function that should return the description of the "sort by" button of each
|
|
22
|
-
*
|
|
21
|
+
* Function that should return the description of the "sort by" button of each column (passed to
|
|
22
|
+
* each sort button as `aria-description`).
|
|
23
23
|
*
|
|
24
24
|
* @param direction New sort direction.
|
|
25
25
|
*/
|
|
@@ -28,4 +28,4 @@ export interface TableHeadProps extends ComponentProps<"thead"> {
|
|
|
28
28
|
rowProps?: ComponentProps<"tr"> | ((index: number) => ComponentProps<"tr">);
|
|
29
29
|
}
|
|
30
30
|
/** Table head component. */
|
|
31
|
-
export declare function TableHead({ columns, sticky, sortByColumnDescription, rowProps, className, children, ref, ...otherProps }: TableHeadProps): import("react").JSX.Element;
|
|
31
|
+
export declare function TableHead({ columns: columnsProp, sticky, sortByColumnDescription: sortByColumnDescriptionProp, rowProps, className, children, ref, ...otherProps }: TableHeadProps): import("react").JSX.Element;
|
|
@@ -5,8 +5,8 @@ export interface TabContentProps extends Omit<ComponentProps<typeof TabsPrimitiv
|
|
|
5
5
|
/** Value of the tab that corresponds to this content. */
|
|
6
6
|
value: string | number;
|
|
7
7
|
/**
|
|
8
|
-
* Properties to pass to the tab content label element (shown when printing
|
|
9
|
-
*
|
|
8
|
+
* Properties to pass to the tab content label element (shown when printing with
|
|
9
|
+
* `showAllTabsWhilePrinting` set).
|
|
10
10
|
*/
|
|
11
11
|
tabContentLabelProps?: ComponentProps<"span">;
|
|
12
12
|
}
|
|
@@ -17,4 +17,4 @@ export interface TabListProps extends ComponentProps<typeof TabsPrimitive.List>
|
|
|
17
17
|
scrollRightButtonProps?: Omit<Partial<IconButtonProps>, "label">;
|
|
18
18
|
}
|
|
19
19
|
/** Component containing all tabs. */
|
|
20
|
-
export declare function TabList({ scrollLeftButtonLabel, scrollRightButtonLabel, rootProps, containerProps, scrollLeftButtonProps, scrollRightButtonProps, className, children, ...otherProps }: TabListProps): import("react").JSX.Element;
|
|
20
|
+
export declare function TabList({ scrollLeftButtonLabel: scrollLeftButtonLabelProp, scrollRightButtonLabel: scrollRightButtonLabelProp, rootProps, containerProps, scrollLeftButtonProps, scrollRightButtonProps, className, children, ...otherProps }: TabListProps): import("react").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Tabs as TabsPrimitive } from "radix-ui";
|
|
2
|
-
import {
|
|
2
|
+
import type { ComponentProps } from "react";
|
|
3
3
|
/** Tabs variants. */
|
|
4
4
|
export type TabsVariant = "default" | "annexes";
|
|
5
5
|
/** Properties of the tabs component. */
|
|
@@ -18,13 +18,11 @@ export interface TabsProps extends Omit<ComponentProps<typeof TabsPrimitive.Root
|
|
|
18
18
|
showAllTabsWhilePrinting?: boolean;
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
|
-
* The `Tabs` component allows content to be organised in tabs and displayed one
|
|
22
|
-
* at a time.
|
|
21
|
+
* The `Tabs` component allows content to be organised in tabs and displayed one at a time.
|
|
23
22
|
*
|
|
24
23
|
* The `value` set on each tab should match the `value` of its content.
|
|
25
24
|
*
|
|
26
|
-
* Built on top of the [Radix Tabs
|
|
27
|
-
* primitive](https://radix-ui.com/primitives/docs/components/tabs).
|
|
25
|
+
* Built on top of the [Radix Tabs primitive](https://radix-ui.com/primitives/docs/components/tabs).
|
|
28
26
|
*
|
|
29
27
|
* It composes the following subcomponents:
|
|
30
28
|
*
|
|
@@ -46,9 +44,7 @@ export interface TabsProps extends Omit<ComponentProps<typeof TabsPrimitive.Root
|
|
|
46
44
|
* <Tab value="gas">Gas</Tab>
|
|
47
45
|
* </TabList>
|
|
48
46
|
* <TabContent value="water">Pay your water bill…</TabContent>
|
|
49
|
-
* <TabContent value="electricity">
|
|
50
|
-
* Pay your electricity bill…
|
|
51
|
-
* </TabContent>
|
|
47
|
+
* <TabContent value="electricity">Pay your electricity bill…</TabContent>
|
|
52
48
|
* <TabContent value="gas">Pay your gas bill…</TabContent>
|
|
53
49
|
* </Tabs>
|
|
54
50
|
* );
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
2
|
import type { AccentColor } from "../../utils/accent.ts";
|
|
3
3
|
import { type CloseButtonProps } from "../CloseButton";
|
|
4
4
|
import { type CollapsibleContentProps } from "../Collapsible";
|
|
@@ -12,9 +12,9 @@ export type TagIconPlacement = "start" | "end";
|
|
|
12
12
|
/** Properties of the tag component. */
|
|
13
13
|
export interface TagProps extends ComponentProps<"span"> {
|
|
14
14
|
/**
|
|
15
|
-
* Change the component to the HTML tag or custom component of the only child.
|
|
16
|
-
*
|
|
17
|
-
*
|
|
15
|
+
* Change the component to the HTML tag or custom component of the only child. This will merge the
|
|
16
|
+
* original component props with the props of the supplied element/component and change the
|
|
17
|
+
* underlying DOM node.
|
|
18
18
|
*/
|
|
19
19
|
asChild?: boolean;
|
|
20
20
|
/**
|
|
@@ -36,15 +36,15 @@ export interface TagProps extends ComponentProps<"span"> {
|
|
|
36
36
|
*/
|
|
37
37
|
defaultOpen?: boolean;
|
|
38
38
|
/**
|
|
39
|
-
* Property controlling whether the tag should be open. Use together with
|
|
40
|
-
*
|
|
39
|
+
* Property controlling whether the tag should be open. Use together with `onOpenChange` to
|
|
40
|
+
* control the tag's open state.
|
|
41
41
|
*/
|
|
42
42
|
open?: boolean;
|
|
43
43
|
/** Function called when the open state changes. */
|
|
44
44
|
onOpenChange?: (open: boolean) => void;
|
|
45
45
|
/**
|
|
46
|
-
* Font Awesome icon to show within the tag. The position of the icon may be
|
|
47
|
-
*
|
|
46
|
+
* Font Awesome icon to show within the tag. The position of the icon may be controlled via
|
|
47
|
+
* `iconPlacement`.
|
|
48
48
|
*
|
|
49
49
|
* @default null
|
|
50
50
|
*/
|
|
@@ -3,24 +3,18 @@ import type { FormValidationMode } from "../Form";
|
|
|
3
3
|
import { type FormControlValidateFn } from "../Form/useRegisterFormControl.ts";
|
|
4
4
|
/** Properties of the text area component. */
|
|
5
5
|
export interface TextAreaProps extends Omit<ControlTextAreaProps, "asChild"> {
|
|
6
|
-
/**
|
|
7
|
-
* Custom validation function meant to validate the control when it is part of
|
|
8
|
-
* a `Form`.
|
|
9
|
-
*/
|
|
6
|
+
/** Custom validation function meant to validate the control when it is part of a `Form`. */
|
|
10
7
|
validate?: FormControlValidateFn<string>;
|
|
11
|
-
/**
|
|
12
|
-
* Specifies when the control should be validated. Defaults to the value
|
|
13
|
-
* specified in the `Form`.
|
|
14
|
-
*/
|
|
8
|
+
/** Specifies when the control should be validated. Defaults to the value specified in the `Form`. */
|
|
15
9
|
validationMode?: FormValidationMode;
|
|
16
10
|
}
|
|
17
11
|
/**
|
|
18
|
-
* The text area component is used to collect multi-line user input. It is built
|
|
19
|
-
*
|
|
12
|
+
* The text area component is used to collect multi-line user input. It is built on top of the
|
|
13
|
+
* browser's [`<textarea>`
|
|
20
14
|
* element](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/textarea).
|
|
21
15
|
*
|
|
22
|
-
* For accessibility purposes, text areas are usually included within a `Field`
|
|
23
|
-
*
|
|
16
|
+
* For accessibility purposes, text areas are usually included within a `Field` together with a
|
|
17
|
+
* `Label` and optionally `HelperText` and/or `Feedback`.
|
|
24
18
|
*
|
|
25
19
|
* Example usage:
|
|
26
20
|
*
|
|
@@ -32,4 +26,4 @@ export interface TextAreaProps extends Omit<ControlTextAreaProps, "asChild"> {
|
|
|
32
26
|
* }
|
|
33
27
|
* ```
|
|
34
28
|
*/
|
|
35
|
-
export declare function TextArea({ name, defaultValue, value, status, disabled, validate, validationMode, rows, onValueChange, onBlurToOutside, ...otherProps }: TextAreaProps): import("react").JSX.Element;
|
|
29
|
+
export declare function TextArea({ name, defaultValue, value, status, disabled, validate, validationMode, rows: rowsProp, onValueChange, onBlurToOutside, ...otherProps }: TextAreaProps): import("react").JSX.Element;
|