@ostack.tech/ui 0.15.5 → 0.16.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-Buw2XVWt.js → en-DT1KWQei.js} +2 -2
- package/dist/chunks/{en-Buw2XVWt.js.map → en-DT1KWQei.js.map} +1 -1
- package/dist/locales/en-GB.js +1 -1
- package/dist/locales/en-US.js +1 -1
- package/dist/locales/fr-FR.js +1 -1
- package/dist/locales/fr-FR.js.map +1 -1
- package/dist/locales/pt-PT.js +1 -1
- package/dist/locales/pt-PT.js.map +1 -1
- package/dist/ostack-ui.css +128 -85
- package/dist/ostack-ui.js +2155 -1784
- package/dist/ostack-ui.js.map +1 -1
- package/package.json +5 -4
- package/scss/_utils.scss +0 -2
- package/scss/components/Checkbox/_Checkbox-variables.scss +7 -4
- package/scss/components/Checkbox/_Checkbox.scss +34 -9
- package/scss/components/CheckboxGroup/_CheckboxGroup.scss +9 -0
- package/scss/components/Code/_Code-variables.scss +8 -4
- package/scss/components/DateRangeInput/_DateRangeInput.scss +1 -1
- package/scss/components/Feedback/_Feedback-variables.scss +28 -1
- package/scss/components/Feedback/_Feedback.scss +95 -2
- package/scss/components/Field/_Field-variables.scss +0 -1
- package/scss/components/Field/_Field.scss +4 -40
- package/scss/components/HelperText/_HelperText-variables.scss +7 -0
- package/scss/components/HelperText/_HelperText.scss +9 -0
- package/scss/components/RadioGroup/_Radio.scss +13 -0
- package/scss/components/RadioGroup/_RadioGroup.scss +9 -0
- package/scss/components/Select/_Select.scss +2 -2
- package/scss/index.scss +0 -2
- package/scss/scss/placeholders/button/_button.scss +10 -6
- package/scss/scss/placeholders/checkable/_checkable-variables.scss +3 -2
- package/scss/scss/placeholders/checkable/_checkable.scss +25 -7
- package/scss/scss/placeholders/checkable-group/_checkable-group-variables.scss +1 -0
- package/scss/scss/placeholders/checkable-group/_checkable-group.scss +15 -3
- package/scss/scss/placeholders/popover/_popover.scss +3 -0
- package/scss/scss/utils/_breakpoints.scss +1 -1
- package/scss/scss/utils/_declare-var.scss +1 -1
- package/types/components/Alert/Alert.d.ts +12 -15
- package/types/components/Alert/AlertTitle.d.ts +2 -2
- package/types/components/AlertDialog/AlertDialog.d.ts +6 -2
- package/types/components/AlertDialog/AlertDialogAction.d.ts +3 -3
- package/types/components/AlertDialog/AlertDialogBody.d.ts +3 -5
- package/types/components/AlertDialog/AlertDialogCancel.d.ts +3 -3
- package/types/components/AlertDialog/AlertDialogContent.d.ts +6 -6
- package/types/components/AlertDialog/AlertDialogDescription.d.ts +3 -3
- package/types/components/AlertDialog/AlertDialogFooter.d.ts +3 -5
- package/types/components/AlertDialog/AlertDialogHeader.d.ts +3 -4
- package/types/components/AlertDialog/AlertDialogTitle.d.ts +4 -4
- package/types/components/AlertDialog/AlertDialogTrigger.d.ts +3 -3
- package/types/components/Button/Button.d.ts +14 -15
- package/types/components/ButtonGroup/ButtonGroup.d.ts +3 -3
- package/types/components/Calendar/Calendar.d.ts +6 -6
- package/types/components/Calendar/CalendarDay.d.ts +1 -1
- package/types/components/Calendar/CalendarHeader.d.ts +1 -1
- package/types/components/Calendar/CalendarMonthGrid.d.ts +1 -1
- package/types/components/Card/Card.d.ts +3 -3
- 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 +22 -14
- package/types/components/CheckboxGroup/CheckboxGroup.d.ts +22 -12
- package/types/components/CheckboxGroup/CheckboxGroupContext.d.ts +15 -9
- package/types/components/CheckboxGroup/checkboxGroupUtils.d.ts +3 -0
- package/types/components/ClearContexts/ClearContexts.d.ts +19 -1
- package/types/components/CloseButton/CloseButton.d.ts +3 -4
- package/types/components/Code/Code.d.ts +3 -3
- package/types/components/Collapsible/Collapsible.d.ts +5 -3
- package/types/components/Collapsible/CollapsibleContent.d.ts +3 -3
- package/types/components/Collapsible/CollapsibleTrigger.d.ts +5 -5
- package/types/components/CommandMenu/CommandMenu.d.ts +18 -20
- package/types/components/CommandMenu/CommandMenuDialog.d.ts +6 -6
- package/types/components/CommandMenu/CommandMenuGroup.d.ts +3 -3
- package/types/components/CommandMenu/CommandMenuItem.d.ts +5 -3
- package/types/components/Container/Container.d.ts +3 -3
- package/types/components/Control/Control.d.ts +13 -13
- package/types/components/Control/ControlWithContainerRef.d.ts +12 -5
- package/types/components/Control/controlUtils.d.ts +24 -0
- package/types/components/ControlAddon/ControlAddon.d.ts +9 -3
- package/types/components/ControlCode/ControlCode.d.ts +3 -3
- package/types/components/DataTable/DataTable.d.ts +32 -21
- package/types/components/DataTable/DataTableBody.d.ts +4 -4
- package/types/components/DataTable/DataTableCell.d.ts +6 -4
- package/types/components/DataTable/DataTableColumn.d.ts +32 -11
- package/types/components/DataTable/DataTableColumnGroup.d.ts +31 -0
- package/types/components/DataTable/DataTableColumns.d.ts +14 -0
- package/types/components/DataTable/DataTableContent.d.ts +8 -8
- package/types/components/DataTable/DataTableContext.d.ts +7 -6
- package/types/components/DataTable/DataTableFilter.d.ts +1 -1
- package/types/components/DataTable/DataTableFoot.d.ts +6 -4
- package/types/components/DataTable/DataTableHead.d.ts +3 -4
- package/types/components/DataTable/DataTablePagination.d.ts +6 -6
- package/types/components/DataTable/DataTableRow.d.ts +3 -4
- package/types/components/DataTable/DataTableRowsPerPage.d.ts +3 -3
- package/types/components/DataTable/DataTableSelectionTrigger.d.ts +4 -4
- package/types/components/DataTable/PagedDataTablePagination.d.ts +3 -3
- package/types/components/DataTable/ScrolledDataTablePagination.d.ts +3 -3
- package/types/components/DataTable/__tests__/spliceWindow.test.d.ts +1 -0
- package/types/components/DataTable/columnUtils.d.ts +4 -3
- package/types/components/DataTable/index.d.ts +2 -0
- package/types/components/DataTable/processRows.d.ts +7 -7
- package/types/components/DataTable/sanitizeProps.d.ts +2 -2
- package/types/components/DataTable/useDataTableSelectionColumn.d.ts +2 -2
- package/types/components/DateInput/DateInput.d.ts +27 -18
- package/types/components/DateRangeInput/DateRangeInput.d.ts +37 -24
- package/types/components/DescriptionList/DescriptionList.d.ts +4 -4
- package/types/components/DescriptionList/DescriptionListItem.d.ts +4 -4
- package/types/components/Dialog/Dialog.d.ts +5 -1
- package/types/components/Dialog/DialogBody.d.ts +3 -4
- package/types/components/Dialog/DialogClose.d.ts +3 -3
- package/types/components/Dialog/DialogContent.d.ts +6 -6
- package/types/components/Dialog/DialogDescription.d.ts +3 -3
- package/types/components/Dialog/DialogFooter.d.ts +3 -4
- package/types/components/Dialog/DialogHeader.d.ts +5 -6
- package/types/components/Dialog/DialogTitle.d.ts +4 -4
- package/types/components/Dialog/DialogTrigger.d.ts +3 -3
- package/types/components/DropdownMenu/DropdownMenu.d.ts +4 -4
- package/types/components/DropdownMenu/DropdownMenuCheckboxItem.d.ts +5 -5
- package/types/components/DropdownMenu/DropdownMenuContent.d.ts +7 -7
- package/types/components/DropdownMenu/DropdownMenuGroup.d.ts +3 -3
- package/types/components/DropdownMenu/DropdownMenuItem.d.ts +4 -4
- package/types/components/DropdownMenu/DropdownMenuRadioGroup.d.ts +3 -3
- package/types/components/DropdownMenu/DropdownMenuRadioItem.d.ts +4 -4
- package/types/components/DropdownMenu/DropdownMenuSub.d.ts +4 -0
- package/types/components/DropdownMenu/DropdownMenuSubContent.d.ts +5 -5
- package/types/components/DropdownMenu/DropdownMenuSubTrigger.d.ts +3 -3
- package/types/components/DropdownMenu/DropdownMenuTrigger.d.ts +3 -3
- package/types/components/ErrorBoundary/ErrorBoundary.d.ts +9 -9
- package/types/components/Feedback/Feedback.d.ts +3 -3
- package/types/components/Feedback/FeedbackContext.d.ts +46 -0
- package/types/components/Feedback/FeedbackList.d.ts +6 -0
- package/types/components/Feedback/FeedbackListContext.d.ts +2 -0
- package/types/components/{FeedbackPopover → Feedback}/FeedbackPopover.d.ts +7 -7
- package/types/components/Feedback/FeedbackProvider.d.ts +13 -0
- package/types/components/Feedback/feedbackUtils.d.ts +19 -0
- package/types/components/Feedback/index.d.ts +4 -0
- package/types/components/Field/Field.d.ts +3 -3
- package/types/components/Field/FieldContext.d.ts +2 -70
- package/types/components/Field/fieldUtils.d.ts +7 -0
- package/types/components/Field/index.d.ts +1 -2
- package/types/components/FieldGroup/FieldGroup.d.ts +3 -3
- 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 +2 -2
- package/types/components/Form/Form.d.ts +6 -6
- package/types/components/Form/FormContext.d.ts +1 -1
- package/types/components/Form/FormReset.d.ts +2 -2
- package/types/components/Form/FormSubmit.d.ts +2 -2
- package/types/components/Form/HiddenFormControl.d.ts +2 -2
- package/types/components/Form/useRegisterFormControl.d.ts +1 -1
- package/types/components/Grid/Grid.d.ts +4 -4
- package/types/components/Grid/GridContext.d.ts +10 -0
- package/types/components/Heading/Heading.d.ts +2 -2
- package/types/components/HelperText/HelperText.d.ts +3 -3
- package/types/components/HelperText/HelperTextContext.d.ts +38 -0
- package/types/components/HelperText/HelperTextProvider.d.ts +13 -0
- package/types/components/HelperText/helperTextUtils.d.ts +2 -0
- package/types/components/HelperText/index.d.ts +2 -0
- package/types/components/Icon/Icon.d.ts +3 -3
- package/types/components/IconButton/IconButton.d.ts +17 -17
- package/types/components/Input/Input.d.ts +1 -1
- package/types/components/Keybinds/Keybinds.d.ts +8 -3
- package/types/components/Keyboard/Keyboard.d.ts +3 -3
- package/types/components/Label/Label.d.ts +14 -14
- package/types/components/Label/LabelContext.d.ts +45 -0
- package/types/components/Label/LabelProvider.d.ts +13 -0
- package/types/components/Label/index.d.ts +2 -0
- package/types/components/Label/labelUtils.d.ts +23 -0
- package/types/components/Layer/Layer.d.ts +5 -5
- package/types/components/Link/Link.d.ts +4 -5
- package/types/components/Mark/Mark.d.ts +3 -3
- package/types/components/MenuList/MenuList.d.ts +3 -3
- package/types/components/MenuList/MenuListGroup.d.ts +5 -5
- package/types/components/MenuList/MenuListItem.d.ts +13 -14
- package/types/components/NumericInput/NumericInput.d.ts +5 -5
- package/types/components/NumericInput/numericInputUtils.d.ts +2 -2
- package/types/components/Output/Output.d.ts +2 -2
- package/types/components/Overlay/Overlay.d.ts +3 -3
- package/types/components/Popover/Popover.d.ts +4 -0
- package/types/components/Popover/PopoverAnchor.d.ts +4 -0
- package/types/components/Popover/PopoverClose.d.ts +5 -5
- package/types/components/Popover/PopoverContent.d.ts +5 -5
- package/types/components/Popover/PopoverTrigger.d.ts +3 -3
- package/types/components/Portal/Portal.d.ts +3 -3
- package/types/components/Printer/Printer.d.ts +1 -1
- package/types/components/Printer/PrinterContent.d.ts +5 -5
- package/types/components/Printer/PrinterTrigger.d.ts +4 -4
- package/types/components/RadioGroup/Radio.d.ts +23 -13
- package/types/components/RadioGroup/RadioGroup.d.ts +19 -16
- package/types/components/Root/Root.d.ts +9 -9
- package/types/components/Root/RootElement.d.ts +3 -3
- package/types/components/Select/Option.d.ts +3 -4
- package/types/components/Select/OptionsGroup.d.ts +3 -4
- package/types/components/Select/Select.d.ts +17 -13
- package/types/components/Select/SelectContext.d.ts +6 -12
- package/types/components/Select/SelectNative.d.ts +3 -3
- package/types/components/Select/selectUtils.d.ts +3 -0
- package/types/components/Separator/Separator.d.ts +3 -3
- package/types/components/Slot/Slot.d.ts +5 -0
- package/types/components/Slot/Slottable.d.ts +2 -2
- package/types/components/Spinner/Spinner.d.ts +3 -3
- package/types/components/Stack/Stack.d.ts +4 -4
- package/types/components/Stack/StackContext.d.ts +9 -0
- package/types/components/Stepper/Step.d.ts +6 -6
- package/types/components/Stepper/StepContent.d.ts +5 -5
- package/types/components/Stepper/StepList.d.ts +3 -3
- package/types/components/Stepper/Stepper.d.ts +6 -6
- package/types/components/Stepper/StepperFinishTrigger.d.ts +5 -5
- package/types/components/Stepper/StepperNextTrigger.d.ts +5 -5
- package/types/components/Stepper/StepperPreviousTrigger.d.ts +5 -5
- package/types/components/Table/Table.d.ts +15 -10
- package/types/components/Table/TableBody.d.ts +3 -3
- package/types/components/Table/TableCell.d.ts +3 -3
- package/types/components/Table/TableColumn.d.ts +29 -21
- package/types/components/Table/TableColumnGroup.d.ts +38 -0
- package/types/components/Table/TableContext.d.ts +1 -1
- package/types/components/Table/TableFoot.d.ts +3 -3
- package/types/components/Table/TableHead.d.ts +15 -7
- package/types/components/Table/TableRow.d.ts +3 -3
- package/types/components/Table/columnUtils.d.ts +11 -17
- package/types/components/Table/index.d.ts +1 -0
- package/types/components/Tabs/Tab.d.ts +7 -7
- package/types/components/Tabs/TabContent.d.ts +4 -4
- package/types/components/Tabs/TabList.d.ts +8 -8
- package/types/components/Tabs/Tabs.d.ts +8 -6
- package/types/components/Tag/Badge.d.ts +2 -2
- package/types/components/Tag/Tag.d.ts +10 -10
- package/types/components/TextArea/TextArea.d.ts +2 -2
- package/types/components/Toast/Toast.d.ts +13 -13
- package/types/components/Toast/ToastDescription.d.ts +4 -0
- package/types/components/Toast/ToastProvider.d.ts +2 -2
- package/types/components/Toast/ToastTitle.d.ts +3 -3
- package/types/components/Toast/ToastViewport.d.ts +3 -3
- package/types/components/Tooltip/Tooltip.d.ts +5 -5
- package/types/components/Tooltip/TooltipProvider.d.ts +4 -0
- package/types/components/VisuallyHidden/VisuallyHidden.d.ts +2 -2
- package/types/index.d.ts +1 -2
- package/types/providers/AlertDialogProvider/AlertDialogProviderContext.d.ts +12 -12
- package/types/providers/ErrorReportingProvider/ErrorReportingProvider.d.ts +1 -1
- package/types/providers/LocalizationProvider/LocalizationObject.d.ts +2 -3
- package/types/providers/ToastManagerProvider/ToastManagerContext.d.ts +6 -6
- package/types/utils/__tests__/combineEventHandlers.test.d.ts +1 -0
- package/types/utils/__tests__/cx.test.d.ts +1 -0
- package/types/utils/__tests__/numericStringUtils.test.d.ts +1 -0
- package/types/utils/__tests__/useNumericTrasformer.test.d.ts +1 -0
- package/types/utils/documentTitleUtils.d.ts +4 -0
- package/types/utils/parseChildren.d.ts +64 -0
- package/types/utils/polymorphicTypes.d.ts +2 -13
- package/types/utils/useLocation.d.ts +3 -3
- package/types/utils/useNumericTransformer.d.ts +9 -6
- package/scss/components/FeedbackList/_FeedbackList-variables.scss +0 -6
- package/scss/components/FeedbackList/_FeedbackList.scss +0 -32
- package/scss/components/FeedbackPopover/_FeedbackPopover-variables.scss +0 -26
- package/scss/components/FeedbackPopover/_FeedbackPopover.scss +0 -66
- package/types/components/FeedbackList/FeedbackList.d.ts +0 -6
- package/types/components/FeedbackList/FeedbackListContext.d.ts +0 -4
- package/types/components/FeedbackList/index.d.ts +0 -2
- package/types/components/FeedbackPopover/index.d.ts +0 -2
- package/types/components/Field/FieldProvider.d.ts +0 -13
- /package/types/components/{FeedbackPopover → Feedback}/FeedbackPopoverContext.d.ts +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type ComponentProps } from "react";
|
|
2
2
|
/** Properties of the step list component. */
|
|
3
|
-
export interface StepListProps extends
|
|
3
|
+
export interface StepListProps extends ComponentProps<"ol"> {
|
|
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
|
|
@@ -14,4 +14,4 @@ export interface StepListProps extends ComponentPropsWithoutRef<"ol"> {
|
|
|
14
14
|
* The `index` of each `Step` is automatically added when `Step`s are direct
|
|
15
15
|
* children of `StepList`.
|
|
16
16
|
*/
|
|
17
|
-
export declare
|
|
17
|
+
export declare function StepList({ asChild, className, children, ...otherProps }: StepListProps): import("react").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type ComponentProps, type Ref } from "react";
|
|
2
2
|
import { type StepperApi } from "./StepperContext.ts";
|
|
3
3
|
/** Properties of the stepper component. */
|
|
4
|
-
export interface StepperProps extends
|
|
4
|
+
export interface StepperProps extends ComponentProps<"div"> {
|
|
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
|
|
@@ -62,9 +62,9 @@ export interface StepperProps extends ComponentPropsWithoutRef<"div"> {
|
|
|
62
62
|
* <Step>Payment</Step>
|
|
63
63
|
* <Step>Review</Step>
|
|
64
64
|
* </StepList>
|
|
65
|
-
* <StepContent
|
|
66
|
-
* <StepContent
|
|
67
|
-
* <StepContent
|
|
65
|
+
* <StepContent>Shipping options…</StepContent>
|
|
66
|
+
* <StepContent>Payment options…</StepContent>
|
|
67
|
+
* <StepContent>Finalize checkout…</StepContent>
|
|
68
68
|
* <StepperPreviousTrigger />
|
|
69
69
|
* <StepperNextTrigger />
|
|
70
70
|
* <StepperFinishTrigger onClick={completeCheckout} />
|
|
@@ -73,4 +73,4 @@ export interface StepperProps extends ComponentPropsWithoutRef<"div"> {
|
|
|
73
73
|
* }
|
|
74
74
|
* ```
|
|
75
75
|
*/
|
|
76
|
-
export declare
|
|
76
|
+
export declare function Stepper({ asChild, defaultActiveStep, activeStep: controlledActiveStep, onActiveStepChange, showAllStepsWhilePrinting, className, apiRef, children, ...otherProps }: StepperProps): import("react").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { ComponentProps, ReactNode } from "react";
|
|
2
|
+
import { type ButtonProps } from "../Button";
|
|
3
3
|
/** Properties of the stepper finish trigger component. */
|
|
4
4
|
export type StepperFinishTriggerProps = StepperFinishTriggerChildlessProps | StepperFinishTriggerChildrenProps;
|
|
5
5
|
/** Base properties of the stepper finish trigger component. */
|
|
@@ -21,7 +21,7 @@ export interface StepperFinishTriggerPropsBase {
|
|
|
21
21
|
* Properties of the stepper finish trigger component when rendered without
|
|
22
22
|
* children.
|
|
23
23
|
*/
|
|
24
|
-
export interface StepperFinishTriggerChildlessProps extends StepperFinishTriggerPropsBase, Omit<
|
|
24
|
+
export interface StepperFinishTriggerChildlessProps extends StepperFinishTriggerPropsBase, Omit<ButtonProps, "asChild" | "children"> {
|
|
25
25
|
/** Label displayed on the button. */
|
|
26
26
|
label?: ReactNode;
|
|
27
27
|
children?: never;
|
|
@@ -30,8 +30,8 @@ export interface StepperFinishTriggerChildlessProps extends StepperFinishTrigger
|
|
|
30
30
|
* Properties of the stepper finish trigger component when rendered with
|
|
31
31
|
* children.
|
|
32
32
|
*/
|
|
33
|
-
export interface StepperFinishTriggerChildrenProps extends StepperFinishTriggerPropsBase,
|
|
33
|
+
export interface StepperFinishTriggerChildrenProps extends StepperFinishTriggerPropsBase, ComponentProps<"button"> {
|
|
34
34
|
children: ReactNode;
|
|
35
35
|
}
|
|
36
36
|
/** Trigger used to conclude the stepper. */
|
|
37
|
-
export declare
|
|
37
|
+
export declare function StepperFinishTrigger({ showWhenNotLast, showWhilePrinting, disabled, className, children, ...otherProps }: StepperFinishTriggerProps): import("react").JSX.Element | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import {
|
|
1
|
+
import { type ComponentProps, type ReactNode } from "react";
|
|
2
|
+
import { type ButtonProps } from "../Button";
|
|
3
3
|
/** Properties of the stepper next trigger component. */
|
|
4
4
|
export type StepperNextTriggerProps = StepperNextTriggerChildlessProps | StepperNextTriggerChildrenProps;
|
|
5
5
|
/** Base properties of the stepper next trigger component. */
|
|
@@ -21,14 +21,14 @@ export interface StepperNextTriggerPropsBase {
|
|
|
21
21
|
* Properties of the stepper next trigger component when rendered without
|
|
22
22
|
* children.
|
|
23
23
|
*/
|
|
24
|
-
export interface StepperNextTriggerChildlessProps extends StepperNextTriggerPropsBase, Omit<
|
|
24
|
+
export interface StepperNextTriggerChildlessProps extends StepperNextTriggerPropsBase, Omit<ButtonProps, "asChild" | "children"> {
|
|
25
25
|
/** Label displayed on the button. */
|
|
26
26
|
label?: ReactNode;
|
|
27
27
|
children?: never;
|
|
28
28
|
}
|
|
29
29
|
/** Properties of the stepper next trigger component when rendered with children. */
|
|
30
|
-
export interface StepperNextTriggerChildrenProps extends StepperNextTriggerPropsBase,
|
|
30
|
+
export interface StepperNextTriggerChildrenProps extends StepperNextTriggerPropsBase, ComponentProps<"button"> {
|
|
31
31
|
children: ReactNode;
|
|
32
32
|
}
|
|
33
33
|
/** Trigger used to go to the next step of the stepper. */
|
|
34
|
-
export declare
|
|
34
|
+
export declare function StepperNextTrigger({ showWhenLast, showWhilePrinting, disabled, onClick, className, children, ...otherProps }: StepperNextTriggerProps): import("react").JSX.Element | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import {
|
|
1
|
+
import { type ComponentProps, type ReactNode } from "react";
|
|
2
|
+
import { type ButtonProps } from "../Button";
|
|
3
3
|
/** Properties of the stepper previous trigger component. */
|
|
4
4
|
export type StepperPreviousTriggerProps = StepperPreviousTriggerChildlessProps | StepperPreviousTriggerChildrenProps;
|
|
5
5
|
/** Base properties of the stepper previous trigger component. */
|
|
@@ -21,7 +21,7 @@ export interface StepperPreviousTriggerPropsBase {
|
|
|
21
21
|
* Properties of the stepper previous trigger component when rendered without
|
|
22
22
|
* children.
|
|
23
23
|
*/
|
|
24
|
-
export interface StepperPreviousTriggerChildlessProps extends StepperPreviousTriggerPropsBase, Omit<
|
|
24
|
+
export interface StepperPreviousTriggerChildlessProps extends StepperPreviousTriggerPropsBase, Omit<ButtonProps, "asChild" | "children"> {
|
|
25
25
|
/** Label displayed on the button. */
|
|
26
26
|
label?: ReactNode;
|
|
27
27
|
children?: never;
|
|
@@ -30,8 +30,8 @@ export interface StepperPreviousTriggerChildlessProps extends StepperPreviousTri
|
|
|
30
30
|
* Properties of the stepper previous trigger component when rendered with
|
|
31
31
|
* children.
|
|
32
32
|
*/
|
|
33
|
-
export interface StepperPreviousTriggerChildrenProps extends StepperPreviousTriggerPropsBase,
|
|
33
|
+
export interface StepperPreviousTriggerChildrenProps extends StepperPreviousTriggerPropsBase, ComponentProps<"button"> {
|
|
34
34
|
children: ReactNode;
|
|
35
35
|
}
|
|
36
36
|
/** Trigger used to go to the previous step of the stepper. */
|
|
37
|
-
export declare
|
|
37
|
+
export declare function StepperPreviousTrigger({ showWhenFirst, showWhilePrinting, disabled, onClick, className, children, ...otherProps }: StepperPreviousTriggerProps): import("react").JSX.Element | null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type ComponentProps, type CSSProperties, type ReactNode } from "react";
|
|
2
2
|
import { type ControlStatus } from "../Control";
|
|
3
3
|
/** Default column width in `"fixed"` mode. */
|
|
4
4
|
export declare const DEFAULT_TABLE_COLUMN_WIDTH = 150;
|
|
@@ -9,7 +9,7 @@ export type TableVariant = "default" | "control";
|
|
|
9
9
|
/** Possible table layouts. */
|
|
10
10
|
export type TableLayout = "auto" | "fixed";
|
|
11
11
|
/** Properties of the table component. */
|
|
12
|
-
export interface TableProps extends
|
|
12
|
+
export interface TableProps extends ComponentProps<"table"> {
|
|
13
13
|
/**
|
|
14
14
|
* Caption of the table. This caption is displayed outside the table, above or
|
|
15
15
|
* below it (depending on the value of `captionSide`), in a `<div>` element.
|
|
@@ -79,7 +79,10 @@ export interface TableProps extends ComponentPropsWithoutRef<"table"> {
|
|
|
79
79
|
* `"fixed"` otherwise.
|
|
80
80
|
*/
|
|
81
81
|
layout?: TableLayout;
|
|
82
|
-
/**
|
|
82
|
+
/**
|
|
83
|
+
* Whether the table should be marked as required when it is being used as a
|
|
84
|
+
* control.
|
|
85
|
+
*/
|
|
83
86
|
required?: boolean;
|
|
84
87
|
/**
|
|
85
88
|
* When the table layout is set to `"fixed"`, this property specifies the
|
|
@@ -91,13 +94,13 @@ export interface TableProps extends ComponentPropsWithoutRef<"table"> {
|
|
|
91
94
|
/** Sets the maximum height of the table. */
|
|
92
95
|
maxHeight?: CSSProperties["maxHeight"];
|
|
93
96
|
/** Properties to pass to the container element. */
|
|
94
|
-
containerProps?:
|
|
97
|
+
containerProps?: ComponentProps<"div">;
|
|
95
98
|
/** Properties to pass to the scrollable element. */
|
|
96
|
-
scrollableProps?:
|
|
99
|
+
scrollableProps?: ComponentProps<"div">;
|
|
97
100
|
/** Properties to pass to the visual `<div>` caption element. */
|
|
98
|
-
captionProps?:
|
|
101
|
+
captionProps?: ComponentProps<"div">;
|
|
99
102
|
/** Properties to pass to the visually hidden `<caption>` element. */
|
|
100
|
-
visuallyHiddenCaptionProps?:
|
|
103
|
+
visuallyHiddenCaptionProps?: ComponentProps<"caption">;
|
|
101
104
|
}
|
|
102
105
|
/**
|
|
103
106
|
* Use the table component to display structured data in a tabular format.
|
|
@@ -109,6 +112,8 @@ export interface TableProps extends ComponentPropsWithoutRef<"table"> {
|
|
|
109
112
|
* HTML element).
|
|
110
113
|
* - `TableColumn`: Component used inside `TableHead` to represent a column of the
|
|
111
114
|
* table.
|
|
115
|
+
* - `TableColumnGroup`: Component used inside `TableHead` to group columns of the
|
|
116
|
+
* table.
|
|
112
117
|
* - `TableBody`: Body of the table (corresponds to the
|
|
113
118
|
* [`<tbody>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/tbody)
|
|
114
119
|
* HTML element).
|
|
@@ -141,8 +146,8 @@ export interface TableProps extends ComponentPropsWithoutRef<"table"> {
|
|
|
141
146
|
* return (
|
|
142
147
|
* <Table caption="Price list">
|
|
143
148
|
* <TableHead>
|
|
144
|
-
* <TableColumn header
|
|
145
|
-
* <TableColumn
|
|
149
|
+
* <TableColumn header>Item</TableColumn>
|
|
150
|
+
* <TableColumn>Price</TableColumn>
|
|
146
151
|
* </TableHead>
|
|
147
152
|
* <TableBody>
|
|
148
153
|
* <TableRow>
|
|
@@ -165,4 +170,4 @@ export interface TableProps extends ComponentPropsWithoutRef<"table"> {
|
|
|
165
170
|
* }
|
|
166
171
|
* ```
|
|
167
172
|
*/
|
|
168
|
-
export declare
|
|
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;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
2
|
/** Properties of the table body component. */
|
|
3
|
-
export interface TableBodyProps extends
|
|
3
|
+
export interface TableBodyProps extends ComponentProps<"tbody"> {
|
|
4
4
|
}
|
|
5
5
|
/** Table body component. */
|
|
6
|
-
export declare
|
|
6
|
+
export declare function TableBody({ className, ...otherProps }: TableBodyProps): import("react").JSX.Element;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type ComponentProps, type CSSProperties } from "react";
|
|
2
2
|
import type { ControlStatus } from "../Control";
|
|
3
3
|
/** Type of table cell. */
|
|
4
4
|
export type TableCellVariant = "header" | "data";
|
|
5
5
|
/** Sticky position of the table cell. */
|
|
6
6
|
export type TableCellSticky = "left" | "right";
|
|
7
7
|
/** Properties of the table row component. */
|
|
8
|
-
export interface TableCellProps extends Omit<
|
|
8
|
+
export interface TableCellProps extends Omit<ComponentProps<"td" | "th">, "align"> {
|
|
9
9
|
/**
|
|
10
10
|
* Index of the (leaf) column this cell belongs to. This property is
|
|
11
11
|
* automatically set by the `TableRow` component when the `TableCell` is its
|
|
@@ -57,4 +57,4 @@ export interface TableCellProps extends Omit<ComponentPropsWithoutRef<"td" | "th
|
|
|
57
57
|
sticky?: TableCellSticky;
|
|
58
58
|
}
|
|
59
59
|
/** Table row component. */
|
|
60
|
-
export declare
|
|
60
|
+
export declare function TableCell({ columnIndex, _stickyColumnIndex, id, ref, ...otherProps }: TableCellProps): import("react").JSX.Element;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { ComponentProps, ReactNode } from "react";
|
|
2
2
|
import type { SortDirection } from "../../utils/sorting.ts";
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
5
|
-
import type {
|
|
6
|
-
import type {
|
|
7
|
-
import type {
|
|
8
|
-
import type {
|
|
9
|
-
/**
|
|
10
|
-
export interface
|
|
3
|
+
import type { ButtonProps } from "../Button";
|
|
4
|
+
import type { IconProps } from "../Icon";
|
|
5
|
+
import type { IconButtonProps } from "../IconButton";
|
|
6
|
+
import type { PopoverContentProps, PopoverProps } from "../Popover";
|
|
7
|
+
import type { StackProps } from "../Stack";
|
|
8
|
+
import type { TableCellProps } from "./TableCell.tsx";
|
|
9
|
+
/** Object representation of a table column. */
|
|
10
|
+
export interface TableColumnObject extends Omit<TableCellProps, "columnIndex" | "_stickyColumnIndex" | "rowSpan" | "scope" | "children"> {
|
|
11
11
|
/** Column's label. */
|
|
12
12
|
label?: ReactNode;
|
|
13
|
-
/** String representation of the label (defaults to `label`). */
|
|
14
|
-
labelText?: string;
|
|
15
13
|
/** Optional helper text displayed as a popover triggered by an icon button. */
|
|
16
14
|
helperText?: ReactNode;
|
|
17
15
|
/** Label of the helper button announced to assistive technologies. */
|
|
18
16
|
helperButtonLabel?: string;
|
|
17
|
+
/** Sub-columns of the column. */
|
|
18
|
+
subColumns?: never;
|
|
19
19
|
/**
|
|
20
20
|
* Minimum width of a column (in pixels).
|
|
21
21
|
*
|
|
@@ -55,23 +55,31 @@ export interface TableColumnProps extends Omit<ComponentPropsWithoutRef<typeof T
|
|
|
55
55
|
*/
|
|
56
56
|
onSort?: (direction: SortDirection | null) => void;
|
|
57
57
|
/** Properties to pass to the container component. */
|
|
58
|
-
containerProps?:
|
|
58
|
+
containerProps?: StackProps;
|
|
59
59
|
/** Properties to pass to the label component. */
|
|
60
|
-
labelProps?:
|
|
60
|
+
labelProps?: ComponentProps<"div">;
|
|
61
61
|
/** Properties to pass to the sort button. */
|
|
62
|
-
sortButtonProps?:
|
|
62
|
+
sortButtonProps?: ButtonProps;
|
|
63
63
|
/** Properties to pass to the component containing the sort icons. */
|
|
64
|
-
sortIconContainerProps?:
|
|
64
|
+
sortIconContainerProps?: ComponentProps<"div">;
|
|
65
65
|
/** Properties to pass to the sort ascending icon component. */
|
|
66
|
-
sortAscIconProps?:
|
|
66
|
+
sortAscIconProps?: IconProps;
|
|
67
67
|
/** Properties to pass to the sort descending icon component. */
|
|
68
|
-
sortDescIconProps?:
|
|
68
|
+
sortDescIconProps?: IconProps;
|
|
69
69
|
/** Properties to pass to the helper button component. */
|
|
70
|
-
helperButtonProps?: Omit<
|
|
70
|
+
helperButtonProps?: Omit<IconButtonProps, "icon">;
|
|
71
71
|
/** Properties to pass to the helper popover component. */
|
|
72
|
-
helperPopoverProps?:
|
|
72
|
+
helperPopoverProps?: PopoverProps;
|
|
73
73
|
/** Properties to pass to the helper popover content component. */
|
|
74
|
-
helperPopoverContentProps?:
|
|
74
|
+
helperPopoverContentProps?: PopoverContentProps;
|
|
75
|
+
}
|
|
76
|
+
/** Representation of a table column in object notation. */
|
|
77
|
+
export interface TableColumnProps extends Omit<TableColumnObject, "subColumns"> {
|
|
78
|
+
/**
|
|
79
|
+
* Label of the table column. `label` can also be used for the same purpose.
|
|
80
|
+
* If both `label` and `children` are provided, `label` has priority.
|
|
81
|
+
*/
|
|
82
|
+
children?: ReactNode;
|
|
75
83
|
}
|
|
76
84
|
/**
|
|
77
85
|
* Table column component.
|
|
@@ -80,4 +88,4 @@ export interface TableColumnProps extends Omit<ComponentPropsWithoutRef<typeof T
|
|
|
80
88
|
* `TableHead` component to automatically create an appropriate header based on
|
|
81
89
|
* the columns.
|
|
82
90
|
*/
|
|
83
|
-
export declare
|
|
91
|
+
export declare function TableColumn(_props: TableColumnProps): null;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { ComponentProps, ReactNode } from "react";
|
|
2
|
+
import type { IconButtonProps } from "../IconButton";
|
|
3
|
+
import type { PopoverContentProps, PopoverProps } from "../Popover";
|
|
4
|
+
import type { StackProps } from "../Stack";
|
|
5
|
+
import type { TableCellProps } from "./TableCell.tsx";
|
|
6
|
+
import type { TableColumnObjects } from "./TableHead.tsx";
|
|
7
|
+
/** Object representation of a table column group. */
|
|
8
|
+
export interface TableColumnGroupObject extends Omit<TableCellProps, "columnIndex" | "_stickyColumnIndex" | "colSpan" | "rowSpan" | "scope"> {
|
|
9
|
+
/** Sub-columns of the table column group. */
|
|
10
|
+
subColumns: TableColumnObjects;
|
|
11
|
+
/** Column group's label. */
|
|
12
|
+
label?: ReactNode;
|
|
13
|
+
/** Optional helper text displayed as a popover triggered by an icon button. */
|
|
14
|
+
helperText?: ReactNode;
|
|
15
|
+
/** Label of the helper button announced to assistive technologies. */
|
|
16
|
+
helperButtonLabel?: string;
|
|
17
|
+
/** Properties to pass to the container component. */
|
|
18
|
+
containerProps?: StackProps;
|
|
19
|
+
/** Properties to pass to the label component. */
|
|
20
|
+
labelProps?: ComponentProps<"div">;
|
|
21
|
+
/** Properties to pass to the helper button component. */
|
|
22
|
+
helperButtonProps?: Omit<IconButtonProps, "icon">;
|
|
23
|
+
/** Properties to pass to the helper popover component. */
|
|
24
|
+
helperPopoverProps?: PopoverProps;
|
|
25
|
+
/** Properties to pass to the helper popover content component. */
|
|
26
|
+
helperPopoverContentProps?: PopoverContentProps;
|
|
27
|
+
}
|
|
28
|
+
/** Properties of a table column group. */
|
|
29
|
+
export interface TableColumnGroupProps extends Omit<TableColumnGroupObject, "subColumns"> {
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Table column group component.
|
|
33
|
+
*
|
|
34
|
+
* This component doesn't actually render anything by itself; it is used by the
|
|
35
|
+
* `TableHead` component to automatically create an appropriate header based on
|
|
36
|
+
* the columns.
|
|
37
|
+
*/
|
|
38
|
+
export declare function TableColumnGroup(_props: TableColumnGroupProps): null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ScrollPosition } from "../../utils/useScrollPosition.ts";
|
|
2
2
|
import type { ControlStatus } from "../Control";
|
|
3
|
-
import { type TableColumnObject } from "./columnUtils.ts";
|
|
4
3
|
import type { TableLayout } from "./Table.tsx";
|
|
4
|
+
import type { TableColumnObject } from "./TableColumn.tsx";
|
|
5
5
|
/** Value of the table context. */
|
|
6
6
|
export interface TableContextValue {
|
|
7
7
|
editable: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type ComponentProps } from "react";
|
|
2
2
|
/** Properties of the table foot component. */
|
|
3
|
-
export interface TableFootProps extends
|
|
3
|
+
export interface TableFootProps extends ComponentProps<"tfoot"> {
|
|
4
4
|
/**
|
|
5
5
|
* Whether the table foot should be sticky.
|
|
6
6
|
*
|
|
@@ -9,4 +9,4 @@ export interface TableFootProps extends ComponentPropsWithoutRef<"tfoot"> {
|
|
|
9
9
|
sticky?: boolean;
|
|
10
10
|
}
|
|
11
11
|
/** Table foot component. */
|
|
12
|
-
export declare
|
|
12
|
+
export declare function TableFoot({ sticky, className, ref, ...otherProps }: TableFootProps): import("react").JSX.Element;
|
|
@@ -1,7 +1,16 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type ComponentProps } from "react";
|
|
2
2
|
import type { SortDirection } from "../../utils/sorting.ts";
|
|
3
|
+
import { type TableColumnObject } from "./TableColumn.tsx";
|
|
4
|
+
import { type TableColumnGroupObject } from "./TableColumnGroup.tsx";
|
|
5
|
+
/** Columns of the table in object notation. */
|
|
6
|
+
export type TableColumnObjects = (TableColumnObject | TableColumnGroupObject)[];
|
|
3
7
|
/** Properties of the table head component. */
|
|
4
|
-
export interface TableHeadProps extends
|
|
8
|
+
export interface TableHeadProps extends ComponentProps<"thead"> {
|
|
9
|
+
/**
|
|
10
|
+
* Columns of the table in object notation (prefer using `<TableColumn>` and
|
|
11
|
+
* `<TableColumnGroup>` instead).
|
|
12
|
+
*/
|
|
13
|
+
columns?: TableColumnObjects;
|
|
5
14
|
/**
|
|
6
15
|
* Whether the table head should be sticky.
|
|
7
16
|
*
|
|
@@ -12,12 +21,11 @@ export interface TableHeadProps extends ComponentPropsWithoutRef<"thead"> {
|
|
|
12
21
|
* Function that should return the description of the "sort by" button of each
|
|
13
22
|
* column (passed to each sort button as `aria-description`).
|
|
14
23
|
*
|
|
15
|
-
* @param
|
|
16
|
-
* @param direction Sort direction.
|
|
24
|
+
* @param direction New sort direction.
|
|
17
25
|
*/
|
|
18
|
-
sortByColumnDescription?: (
|
|
26
|
+
sortByColumnDescription?: (sortDirection: SortDirection | null) => string;
|
|
19
27
|
/** Properties to pass to each row component. */
|
|
20
|
-
rowProps?:
|
|
28
|
+
rowProps?: ComponentProps<"tr"> | ((index: number) => ComponentProps<"tr">);
|
|
21
29
|
}
|
|
22
30
|
/** Table head component. */
|
|
23
|
-
export declare
|
|
31
|
+
export declare function TableHead({ columns, sticky, sortByColumnDescription, rowProps, className, children, ref, ...otherProps }: TableHeadProps): import("react").JSX.Element;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type ComponentProps } from "react";
|
|
2
2
|
/** Default table row height (with a single line of text or with form controls). */
|
|
3
3
|
export declare const DEFAULT_TABLE_ROW_HEIGHT = 41;
|
|
4
4
|
/** Properties of the table row component. */
|
|
5
|
-
export interface TableRowProps extends
|
|
5
|
+
export interface TableRowProps extends ComponentProps<"tr"> {
|
|
6
6
|
/** Whether this row should be marked as being selected. */
|
|
7
7
|
selected?: boolean;
|
|
8
8
|
}
|
|
9
9
|
/** Table row component. */
|
|
10
|
-
export declare
|
|
10
|
+
export declare function TableRow({ className, selected, children, ...otherProps }: TableRowProps): import("react").JSX.Element;
|
|
@@ -1,20 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type {
|
|
3
|
-
import {
|
|
4
|
-
/** Representation of a table column in object notation. */
|
|
5
|
-
export type TableColumnObject = Omit<TableColumnProps & RefAttributes<ComponentRef<typeof TableCell>>, "children"> & {
|
|
6
|
-
subColumns: TableColumnObject[];
|
|
7
|
-
};
|
|
8
|
-
/** Gets the list of columns from the head's `children`. */
|
|
9
|
-
export declare function columnsFromChildren(children: ReactNode): TableColumnObject[];
|
|
1
|
+
import type { TableColumnObject } from "./TableColumn.tsx";
|
|
2
|
+
import type { TableColumnGroupObject } from "./TableColumnGroup.tsx";
|
|
3
|
+
import type { TableColumnObjects } from "./TableHead.tsx";
|
|
10
4
|
/** Total number of table rows of the head. */
|
|
11
|
-
export declare function numberOfRows(columns:
|
|
5
|
+
export declare function numberOfRows(columns: TableColumnObjects): number;
|
|
12
6
|
/** Total number of (leaf) table cells of the head. */
|
|
13
|
-
export declare function numberOfColumns(columns:
|
|
7
|
+
export declare function numberOfColumns(columns: TableColumnObjects): number;
|
|
14
8
|
/** List of columns of the row with provided index. */
|
|
15
|
-
export declare function columnsOfRow(columns:
|
|
9
|
+
export declare function columnsOfRow(columns: TableColumnObjects, index: number): TableColumnObjects;
|
|
16
10
|
/** List of "leaf" columns (columns with no children, i.e. the "bottom" ones). */
|
|
17
|
-
export declare function leafColumns(columns:
|
|
11
|
+
export declare function leafColumns(columns: TableColumnObjects): TableColumnObject[];
|
|
18
12
|
/** Minimum table width. */
|
|
19
13
|
export declare function tableMinWidth(leaves: TableColumnObject[], defaultColumnWidth: number): string;
|
|
20
14
|
/** Maximum table width. */
|
|
@@ -24,12 +18,12 @@ export declare function columnWidths(leaves: TableColumnObject[], defaultColumnW
|
|
|
24
18
|
/** Width of a column in "fixed" layout. */
|
|
25
19
|
export declare function columnWidth(column: TableColumnObject, defaultColumnsMinWidth: number): number;
|
|
26
20
|
/** Left-most columns. */
|
|
27
|
-
export declare function leftMostColumns(columns:
|
|
21
|
+
export declare function leftMostColumns(columns: TableColumnObjects): TableColumnObjects;
|
|
28
22
|
/** Right-most columns. */
|
|
29
|
-
export declare function rightMostColumns(columns:
|
|
23
|
+
export declare function rightMostColumns(columns: TableColumnObjects): TableColumnObjects;
|
|
30
24
|
/** Left-most leaf column. */
|
|
31
|
-
export declare function leftMostLeafColumn(column: TableColumnObject): TableColumnObject;
|
|
25
|
+
export declare function leftMostLeafColumn(column: TableColumnGroupObject | TableColumnObject): TableColumnObject;
|
|
32
26
|
/** Right-most leaf column. */
|
|
33
|
-
export declare function rightMostLeafColumn(column: TableColumnObject): TableColumnObject;
|
|
27
|
+
export declare function rightMostLeafColumn(column: TableColumnGroupObject | TableColumnObject): TableColumnObject;
|
|
34
28
|
/** Offsets (`left`/`right` CSS properties) to provide to sticky columns. */
|
|
35
29
|
export declare function stickyColumnOffsets(leaves: TableColumnObject[], defaultColumnWidth: number): (number | undefined)[];
|
|
@@ -2,6 +2,7 @@ export * from "./Table.tsx";
|
|
|
2
2
|
export * from "./TableBody.tsx";
|
|
3
3
|
export * from "./TableCell.tsx";
|
|
4
4
|
export * from "./TableColumn.tsx";
|
|
5
|
+
export * from "./TableColumnGroup.tsx";
|
|
5
6
|
export { useIsInTableCell, useTableNumberOfColumns } from "./TableContext.ts";
|
|
6
7
|
export * from "./TableFoot.tsx";
|
|
7
8
|
export * from "./TableHead.tsx";
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { Tabs as TabsPrimitive } from "radix-ui";
|
|
2
|
-
import { type
|
|
2
|
+
import { type ComponentProps } from "react";
|
|
3
3
|
import { type ControlStatus } from "../Control";
|
|
4
|
-
import {
|
|
4
|
+
import { type TooltipProps } from "../Tooltip";
|
|
5
5
|
/** Properties of the tab component. */
|
|
6
|
-
export interface TabProps extends Omit<
|
|
6
|
+
export interface TabProps extends Omit<ComponentProps<typeof TabsPrimitive.TabsTrigger>, "asChild" | "value"> {
|
|
7
7
|
/** Value representing this tab. */
|
|
8
8
|
value: string | number;
|
|
9
9
|
/** Status of the tab. */
|
|
10
10
|
status?: ControlStatus;
|
|
11
11
|
/** Properties to pass to the tooltip component when the tab text overflows. */
|
|
12
|
-
tooltipProps?: Omit<
|
|
12
|
+
tooltipProps?: Omit<TooltipProps, "content">;
|
|
13
13
|
/** Properties to pass to the inner tab element. */
|
|
14
|
-
tabInnerProps?:
|
|
14
|
+
tabInnerProps?: ComponentProps<"span">;
|
|
15
15
|
/** Properties to pass to the text of the tab element. */
|
|
16
|
-
tabTextProps?:
|
|
16
|
+
tabTextProps?: ComponentProps<"span">;
|
|
17
17
|
}
|
|
18
18
|
/** Tab trigger component. */
|
|
19
|
-
export declare
|
|
19
|
+
export declare function Tab({ value, status, tooltipProps, tabInnerProps, tabTextProps, className, children, ref, ...otherProps }: TabProps): import("react").JSX.Element;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { Tabs as TabsPrimitive } from "radix-ui";
|
|
2
|
-
import
|
|
2
|
+
import type { ComponentProps } from "react";
|
|
3
3
|
/** Properties of the tab content component. */
|
|
4
|
-
export interface TabContentProps extends Omit<
|
|
4
|
+
export interface TabContentProps extends Omit<ComponentProps<typeof TabsPrimitive.TabsContent>, "value"> {
|
|
5
5
|
/** Value of the tab that corresponds to this content. */
|
|
6
6
|
value: string | number;
|
|
7
7
|
/**
|
|
8
8
|
* Properties to pass to the tab content label element (shown when printing
|
|
9
9
|
* with `showAllTabsWhilePrinting` set).
|
|
10
10
|
*/
|
|
11
|
-
tabContentLabelProps?:
|
|
11
|
+
tabContentLabelProps?: ComponentProps<"span">;
|
|
12
12
|
}
|
|
13
13
|
/** Tab content component. */
|
|
14
|
-
export declare
|
|
14
|
+
export declare function TabContent({ asChild, value, className, tabContentLabelProps, ...otherProps }: TabContentProps): import("react").JSX.Element;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { Tabs as TabsPrimitive } from "radix-ui";
|
|
2
|
-
import { type
|
|
3
|
-
import {
|
|
2
|
+
import { type ComponentProps, type ReactNode } from "react";
|
|
3
|
+
import { type IconButtonProps } from "../IconButton";
|
|
4
4
|
/** Properties of the tab list component. */
|
|
5
|
-
export interface TabListProps extends
|
|
5
|
+
export interface TabListProps extends ComponentProps<typeof TabsPrimitive.List> {
|
|
6
6
|
/** Label of the scroll left button. */
|
|
7
7
|
scrollLeftButtonLabel?: ReactNode;
|
|
8
8
|
/** Label of the scroll right button. */
|
|
9
9
|
scrollRightButtonLabel?: ReactNode;
|
|
10
10
|
/** Properties to pass to the root element. */
|
|
11
|
-
rootProps?:
|
|
11
|
+
rootProps?: ComponentProps<"div">;
|
|
12
12
|
/** Properties to pass to the container element. */
|
|
13
|
-
containerProps?:
|
|
13
|
+
containerProps?: ComponentProps<"div">;
|
|
14
14
|
/** Properties to pass to the scroll left button component. */
|
|
15
|
-
scrollLeftButtonProps?: Omit<Partial<
|
|
15
|
+
scrollLeftButtonProps?: Omit<Partial<IconButtonProps>, "label">;
|
|
16
16
|
/** Properties to pass to the scroll right button component. */
|
|
17
|
-
scrollRightButtonProps?: Omit<Partial<
|
|
17
|
+
scrollRightButtonProps?: Omit<Partial<IconButtonProps>, "label">;
|
|
18
18
|
}
|
|
19
19
|
/** Component containing all tabs. */
|
|
20
|
-
export declare
|
|
20
|
+
export declare function TabList({ scrollLeftButtonLabel, scrollRightButtonLabel, rootProps, containerProps, scrollLeftButtonProps, scrollRightButtonProps, className, children, ...otherProps }: TabListProps): import("react").JSX.Element;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Tabs as TabsPrimitive } from "radix-ui";
|
|
2
|
-
import { type
|
|
2
|
+
import { type ComponentProps } from "react";
|
|
3
3
|
/** Tabs variants. */
|
|
4
4
|
export type TabsVariant = "default" | "annexes";
|
|
5
5
|
/** Properties of the tabs component. */
|
|
6
|
-
export interface TabsProps extends Omit<
|
|
6
|
+
export interface TabsProps extends Omit<ComponentProps<typeof TabsPrimitive.Root>, "defaultValue" | "value" | "orientation" | "dir"> {
|
|
7
7
|
/**
|
|
8
8
|
* Tabs variant.
|
|
9
9
|
*
|
|
@@ -45,12 +45,14 @@ export interface TabsProps extends Omit<ComponentPropsWithoutRef<typeof TabsPrim
|
|
|
45
45
|
* <Tab value="electricity">Electricity</Tab>
|
|
46
46
|
* <Tab value="gas">Gas</Tab>
|
|
47
47
|
* </TabList>
|
|
48
|
-
* <TabContent value="water"
|
|
49
|
-
* <TabContent value="electricity"
|
|
50
|
-
*
|
|
48
|
+
* <TabContent value="water">Pay your water bill…</TabContent>
|
|
49
|
+
* <TabContent value="electricity">
|
|
50
|
+
* Pay your electricity bill…
|
|
51
|
+
* </TabContent>
|
|
52
|
+
* <TabContent value="gas">Pay your gas bill…</TabContent>
|
|
51
53
|
* </Tabs>
|
|
52
54
|
* );
|
|
53
55
|
* }
|
|
54
56
|
* ```
|
|
55
57
|
*/
|
|
56
|
-
export declare
|
|
58
|
+
export declare function Tabs({ variant, defaultValue, value, onValueChange, showAllTabsWhilePrinting, className, ...otherProps }: TabsProps): import("react").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type TagColor, type TagProps, type TagVariant } from "./Tag.tsx";
|
|
1
|
+
import { Tag, type TagColor, type TagProps, type TagVariant } from "./Tag.tsx";
|
|
2
2
|
/**
|
|
3
3
|
* @deprecated `Badge` component was renamed to `Tag`, please use
|
|
4
4
|
* {@link TagVariant} instead.
|
|
@@ -18,4 +18,4 @@ export type BadgeProps = TagProps;
|
|
|
18
18
|
* @deprecated `Badge` component was renamed to `Tag`, please use {@link Tag}
|
|
19
19
|
* instead.
|
|
20
20
|
*/
|
|
21
|
-
export declare const Badge:
|
|
21
|
+
export declare const Badge: typeof Tag;
|