@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,10 +1,10 @@
|
|
|
1
1
|
import { Popover as PopoverPrimitive } from "radix-ui";
|
|
2
|
-
import {
|
|
2
|
+
import type { ComponentProps } from "react";
|
|
3
3
|
/** Properties of the popover trigger component. */
|
|
4
|
-
export interface PopoverTriggerProps extends Omit<
|
|
4
|
+
export interface PopoverTriggerProps extends Omit<ComponentProps<typeof PopoverPrimitive.Trigger>, "asChild"> {
|
|
5
5
|
}
|
|
6
6
|
/**
|
|
7
7
|
* The button that toggles the popover. By default, the `PopoverContent` will
|
|
8
8
|
* position itself against the trigger.
|
|
9
9
|
*/
|
|
10
|
-
export declare
|
|
10
|
+
export declare function PopoverTrigger(props: PopoverTriggerProps): import("react").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Portal as PortalPrimitive } from "radix-ui";
|
|
2
|
-
import {
|
|
2
|
+
import type { ComponentProps } from "react";
|
|
3
3
|
/** Properties of the portal component. */
|
|
4
|
-
export interface PortalProps extends
|
|
4
|
+
export interface PortalProps extends ComponentProps<typeof PortalPrimitive.Root> {
|
|
5
5
|
}
|
|
6
6
|
/**
|
|
7
7
|
* Portal component used to render a React subtree in a different part of the
|
|
@@ -10,4 +10,4 @@ export interface PortalProps extends ComponentPropsWithoutRef<typeof PortalPrimi
|
|
|
10
10
|
* The rendered subtree is automatically wrapped in a `Root` component, so that
|
|
11
11
|
* styles are rendered correctly.
|
|
12
12
|
*/
|
|
13
|
-
export declare
|
|
13
|
+
export declare function Portal({ asChild, children, ...otherProps }: PortalProps): import("react").JSX.Element;
|
|
@@ -92,7 +92,7 @@ export interface PrinterProps extends PrintOptions {
|
|
|
92
92
|
* @param event Before print event. Calling `event.preventDefault()` will
|
|
93
93
|
* prevent printing from occurring.
|
|
94
94
|
*/
|
|
95
|
-
onBeforePrint?: (event: Event) => void |
|
|
95
|
+
onBeforePrint?: (event: Event) => void | PromiseLike<void>;
|
|
96
96
|
/**
|
|
97
97
|
* Function called after printing finishes.
|
|
98
98
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import {
|
|
1
|
+
import { type ComponentProps } from "react";
|
|
2
|
+
import { type PortalProps } from "../Portal";
|
|
3
3
|
/** Properties of the printer content. */
|
|
4
|
-
export interface PrinterContentProps extends
|
|
4
|
+
export interface PrinterContentProps 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
|
|
@@ -11,7 +11,7 @@ export interface PrinterContentProps extends ComponentPropsWithoutRef<"div"> {
|
|
|
11
11
|
/** Whether the provided `children` should only be rendered while printing. */
|
|
12
12
|
printOnly?: boolean;
|
|
13
13
|
/** Container of the portal. */
|
|
14
|
-
portalContainer?:
|
|
14
|
+
portalContainer?: PortalProps["container"];
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
17
|
* Content to be printed.
|
|
@@ -19,4 +19,4 @@ export interface PrinterContentProps extends ComponentPropsWithoutRef<"div"> {
|
|
|
19
19
|
* All “element” properties provided to this component will be forwarded to a
|
|
20
20
|
* wrapper element which **only** exists during printing.
|
|
21
21
|
*/
|
|
22
|
-
export declare
|
|
22
|
+
export declare function PrinterContent({ asChild, printOnly, portalContainer, className, children, ref, ...otherProps }: PrinterContentProps): import("react").JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { ComponentProps, ReactElement } from "react";
|
|
2
2
|
/** Properties of the printer trigger. */
|
|
3
|
-
export interface PrinterTriggerProps extends
|
|
3
|
+
export interface PrinterTriggerProps extends ComponentProps<"button"> {
|
|
4
4
|
/**
|
|
5
5
|
* By default, the trigger will be hidden while printing, even when inside the
|
|
6
6
|
* print content. Set this to `true` to show it.
|
|
@@ -8,7 +8,7 @@ export interface PrinterTriggerProps extends ComponentPropsWithoutRef<"button">
|
|
|
8
8
|
* @default false
|
|
9
9
|
*/
|
|
10
10
|
showWhenPrinting?: boolean;
|
|
11
|
-
children: ReactElement<
|
|
11
|
+
children: ReactElement<ComponentProps<"button">>;
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
14
|
* Trigger to print the content of the printer. The provided `children` should
|
|
@@ -17,4 +17,4 @@ export interface PrinterTriggerProps extends ComponentPropsWithoutRef<"button">
|
|
|
17
17
|
* This trigger will **not** show in the print, even when inside the print
|
|
18
18
|
* content, unless `showWhenPrinting` is set to `true`.
|
|
19
19
|
*/
|
|
20
|
-
export declare
|
|
20
|
+
export declare function PrinterTrigger({ showWhenPrinting, className, onClick, ref, ...otherProps }: PrinterTriggerProps): import("react").JSX.Element;
|
|
@@ -1,25 +1,29 @@
|
|
|
1
1
|
import { RadioGroup as RadioGroupPrimitive } from "radix-ui";
|
|
2
|
-
import { type
|
|
2
|
+
import { type ComponentProps, type ReactNode } from "react";
|
|
3
3
|
import { type ControlStatus } from "../Control";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import { type ControlCodeProps } from "../ControlCode";
|
|
5
|
+
import { type LabelProps } from "../Label";
|
|
6
|
+
import { type SpinnerProps } from "../Spinner";
|
|
7
7
|
/** Properties of a radio component. */
|
|
8
|
-
export interface RadioProps extends Omit<
|
|
8
|
+
export interface RadioProps extends Omit<ComponentProps<typeof RadioGroupPrimitive.Item>, "value"> {
|
|
9
9
|
/** Radio value. */
|
|
10
|
-
value?:
|
|
10
|
+
value?: ComponentProps<"input">["value"];
|
|
11
11
|
/** Sets the status of the radio. */
|
|
12
12
|
status?: ControlStatus;
|
|
13
13
|
/** Radio code. */
|
|
14
14
|
code?: ReactNode;
|
|
15
15
|
/** Sets the radio as read-only. */
|
|
16
16
|
readOnly?: boolean;
|
|
17
|
+
/** Radio start adornment. */
|
|
18
|
+
startAdornment?: ReactNode;
|
|
19
|
+
/** Radio end adornment. */
|
|
20
|
+
endAdornment?: ReactNode;
|
|
17
21
|
/**
|
|
18
22
|
* Renders the radio in a **loading** state.
|
|
19
23
|
*
|
|
20
24
|
* When `true`, the radio is “soft-disabled”: it looks disabled and ignores
|
|
21
25
|
* user interaction but remains focusable. By default, a spinner is shown
|
|
22
|
-
* (
|
|
26
|
+
* (i.e. `showSpinner` is set to `true` unless overridden).
|
|
23
27
|
*
|
|
24
28
|
* The radio's accessible description while loading can be controlled via
|
|
25
29
|
* `loadingDescription`.
|
|
@@ -46,15 +50,21 @@ export interface RadioProps extends Omit<ComponentPropsWithoutRef<typeof RadioGr
|
|
|
46
50
|
*/
|
|
47
51
|
showSpinner?: boolean;
|
|
48
52
|
/** Properties to pass to the root component. */
|
|
49
|
-
rootProps?:
|
|
53
|
+
rootProps?: ComponentProps<"div">;
|
|
54
|
+
/** Properties to pass to the container component. */
|
|
55
|
+
containerProps?: ComponentProps<"div">;
|
|
56
|
+
/** Properties to pass to the start container element. */
|
|
57
|
+
startContainerProps?: ComponentProps<"div">;
|
|
58
|
+
/** Properties to pass to the end container element. */
|
|
59
|
+
endContainerProps?: ComponentProps<"div">;
|
|
50
60
|
/** Properties to pass to the code component. */
|
|
51
|
-
codeProps?:
|
|
61
|
+
codeProps?: ControlCodeProps;
|
|
52
62
|
/** Properties to pass to the indicator component. */
|
|
53
|
-
indicatorProps?:
|
|
63
|
+
indicatorProps?: ComponentProps<typeof RadioGroupPrimitive.Indicator>;
|
|
54
64
|
/** Properties to pass to the label component. */
|
|
55
|
-
labelProps?:
|
|
65
|
+
labelProps?: LabelProps;
|
|
56
66
|
/** Properties to pass to the spinner component. */
|
|
57
|
-
spinnerProps?: Omit<
|
|
67
|
+
spinnerProps?: Omit<SpinnerProps, "size">;
|
|
58
68
|
}
|
|
59
69
|
/** Radio component. Must be used within a radio group. */
|
|
60
|
-
export declare
|
|
70
|
+
export declare function Radio({ value, status, code, loading, loadingDescription, showSpinner, children, rootProps, codeProps, indicatorProps, labelProps, spinnerProps, id, disabled, readOnly, startAdornment, endAdornment, containerProps, startContainerProps, endContainerProps, onClick, className, "aria-disabled": ariaDisabled, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, ref, ...otherProps }: RadioProps): import("react").JSX.Element;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { RadioGroup as RadioGroupPrimitive } from "radix-ui";
|
|
2
|
-
import { type
|
|
3
|
-
import {
|
|
2
|
+
import { type ComponentProps, type FocusEvent, type ReactNode } from "react";
|
|
3
|
+
import { type CloseButtonProps } from "../CloseButton";
|
|
4
4
|
import { type ControlShowClearButton, type ControlStatus, type ControlVariant } from "../Control";
|
|
5
|
-
import {
|
|
5
|
+
import { type ControlCodeProps } from "../ControlCode";
|
|
6
6
|
import type { FormValidationMode } from "../Form";
|
|
7
7
|
import { type FormControlValidateFn } from "../Form/useRegisterFormControl.ts";
|
|
8
|
-
import {
|
|
8
|
+
import { type SpinnerProps } from "../Spinner";
|
|
9
9
|
/** Properties of the radio group component. */
|
|
10
|
-
export interface RadioGroupProps extends Omit<
|
|
10
|
+
export interface RadioGroupProps extends Omit<ComponentProps<typeof RadioGroupPrimitive.Root>, "asChild" | "onValueChange"> {
|
|
11
11
|
/** Whether to display the radio group inline. */
|
|
12
12
|
inline?: boolean;
|
|
13
13
|
/**
|
|
@@ -24,7 +24,7 @@ export interface RadioGroupProps extends Omit<ComponentPropsWithoutRef<typeof Ra
|
|
|
24
24
|
*
|
|
25
25
|
* When `true`, the radio group is “soft-disabled”: it looks disabled and
|
|
26
26
|
* ignores user interaction but remains focusable. By default, a spinner is
|
|
27
|
-
* shown (
|
|
27
|
+
* shown (i.e. `showSpinner` is set to `true` unless overridden).
|
|
28
28
|
*
|
|
29
29
|
* The radio group's accessible description while loading can be controlled
|
|
30
30
|
* via `loadingDescription`.
|
|
@@ -67,6 +67,10 @@ export interface RadioGroupProps extends Omit<ComponentPropsWithoutRef<typeof Ra
|
|
|
67
67
|
clearButtonLabel?: string;
|
|
68
68
|
/** Function called when the value of the radio group changes. */
|
|
69
69
|
onValueChange?: (value: string | null) => void;
|
|
70
|
+
/** Radio group's start adornment. */
|
|
71
|
+
startAdornment?: ReactNode;
|
|
72
|
+
/** Radio group's end adornment. */
|
|
73
|
+
endAdornment?: ReactNode;
|
|
70
74
|
/**
|
|
71
75
|
* Function called when the focus moves out of the control as a whole.
|
|
72
76
|
*
|
|
@@ -85,18 +89,17 @@ export interface RadioGroupProps extends Omit<ComponentPropsWithoutRef<typeof Ra
|
|
|
85
89
|
*/
|
|
86
90
|
validationMode?: FormValidationMode;
|
|
87
91
|
/** Properties to pass to the code component. */
|
|
88
|
-
codeProps?:
|
|
92
|
+
codeProps?: ControlCodeProps;
|
|
89
93
|
/** Properties to pass to the container component. */
|
|
90
|
-
containerProps?:
|
|
91
|
-
/**
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
endContainerProps?: ComponentPropsWithRef<"div">;
|
|
94
|
+
containerProps?: ComponentProps<"div">;
|
|
95
|
+
/** Properties to pass to the start container element. */
|
|
96
|
+
startContainerProps?: ComponentProps<"div">;
|
|
97
|
+
/** Properties to pass to the end container element. */
|
|
98
|
+
endContainerProps?: ComponentProps<"div">;
|
|
96
99
|
/** Properties to pass to the clear button component. */
|
|
97
|
-
clearButtonProps?:
|
|
100
|
+
clearButtonProps?: CloseButtonProps;
|
|
98
101
|
/** Properties to pass to the spinner component. */
|
|
99
|
-
spinnerProps?: Omit<
|
|
102
|
+
spinnerProps?: Omit<SpinnerProps, "size">;
|
|
100
103
|
}
|
|
101
104
|
/**
|
|
102
105
|
* The `RadioGroup` component displays a set of `Radio` button components,
|
|
@@ -122,4 +125,4 @@ export interface RadioGroupProps extends Omit<ComponentPropsWithoutRef<typeof Ra
|
|
|
122
125
|
* }
|
|
123
126
|
* ```
|
|
124
127
|
*/
|
|
125
|
-
export declare
|
|
128
|
+
export declare function RadioGroup({ defaultValue, value: controlledValue, onValueChange, inline, variant, status, loading, loadingDescription, showSpinner, code, showClearButton, clearDescription, clearButtonLabel, onBlurToOutside, validate, validationMode, startAdornment, endAdornment, codeProps, containerProps, startContainerProps, endContainerProps, clearButtonProps, spinnerProps, id, name, required, disabled, readOnly, className, children, "aria-disabled": ariaDisabled, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, ref, ...otherProps }: RadioGroupProps): import("react").JSX.Element;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
|
+
import { type DocumentTitleProviderProps } from "../../providers/DocumentTitleProvider";
|
|
3
|
+
import { type ErrorReportingProviderProps } from "../../providers/ErrorReportingProvider";
|
|
4
4
|
import type { LocalizationObject } from "../../providers/LocalizationProvider";
|
|
5
|
-
import type {
|
|
5
|
+
import type { ErrorBoundaryProps } from "../ErrorBoundary";
|
|
6
6
|
import { type ToastSwipeDirection, type ToastViewportPosition } from "../Toast";
|
|
7
7
|
/** Properties of the ostack/UI root component. */
|
|
8
|
-
export interface RootProps extends
|
|
8
|
+
export interface RootProps extends ComponentProps<"div">, Pick<ErrorReportingProviderProps, "reportError" | "errorReportingUrl" | "errorReportingMethod" | "encodeErrorReport" | "encodedErrorReportMimeType" | "errorReportingOptions">, Pick<DocumentTitleProviderProps, "baseDocumentTitle"> {
|
|
9
9
|
/**
|
|
10
10
|
* Change the component to the HTML tag or custom component of the only child.
|
|
11
11
|
* This will merge the original component props with the props of the supplied
|
|
@@ -13,7 +13,7 @@ export interface RootProps extends ComponentPropsWithoutRef<"div">, Pick<Compone
|
|
|
13
13
|
*/
|
|
14
14
|
asChild?: boolean;
|
|
15
15
|
/**
|
|
16
|
-
* Custom prefix used to prefix all component classes, styles,
|
|
16
|
+
* Custom prefix used to prefix all component classes, styles, etc.
|
|
17
17
|
*
|
|
18
18
|
* This prefix should match the `$prefix` SCSS variable.
|
|
19
19
|
*/
|
|
@@ -116,9 +116,9 @@ export interface RootProps extends ComponentPropsWithoutRef<"div">, Pick<Compone
|
|
|
116
116
|
*/
|
|
117
117
|
toastViewportLabel?: string;
|
|
118
118
|
/** Properties to pass to the `ToastViewport` component. */
|
|
119
|
-
toastViewportProps?:
|
|
119
|
+
toastViewportProps?: ComponentProps<"ol">;
|
|
120
120
|
/** Properties to pass to the `ErrorBoundary` component. */
|
|
121
|
-
errorBoundaryProps?:
|
|
121
|
+
errorBoundaryProps?: ErrorBoundaryProps;
|
|
122
122
|
}
|
|
123
123
|
/**
|
|
124
124
|
* Root component that should wrap an ostack/UI application, exposing all
|
|
@@ -127,4 +127,4 @@ export interface RootProps extends ComponentPropsWithoutRef<"div">, Pick<Compone
|
|
|
127
127
|
* It further wraps the whole application in an error boundary with support for
|
|
128
128
|
* error reporting.
|
|
129
129
|
*/
|
|
130
|
-
export declare
|
|
130
|
+
export declare function Root({ prefix: newPrefix, enableErrorReporting, reportError, errorReportingUrl, errorReportingMethod, encodeErrorReport, encodedErrorReportMimeType, errorReportingOptions, defaultLocale, locale: controlledLocale, onLocaleChange, baseDocumentTitle, documentTitleBaseSeparator, documentTitleBreadcrumbsSeparator, portalsContainer, tooltipsDelayDuration, tooltipsSkipDelayDuration, disableTooltipsHoverableContent, toastsLabel, toastsDuration, toastsSwipeThreshold, toastViewportPosition, toastsSwipeDirection, toastViewportHotkey, toastViewportLabel, toastViewportProps, errorBoundaryProps, ...otherProps }: RootProps): import("react").JSX.Element;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type ComponentProps } from "react";
|
|
2
2
|
import type { RootProps } from "./Root.tsx";
|
|
3
3
|
/** Properties of the root element component. */
|
|
4
|
-
export interface RootElementProps extends
|
|
4
|
+
export interface RootElementProps extends ComponentProps<"div">, Pick<RootProps, "asChild" | "errorBoundaryProps"> {
|
|
5
5
|
/** Whether to wrap children in an error boundary. */
|
|
6
6
|
includeErrorBoundary: boolean;
|
|
7
7
|
}
|
|
8
8
|
/** Root element. */
|
|
9
|
-
export declare
|
|
9
|
+
export declare function RootElement({ asChild, includeErrorBoundary, errorBoundaryProps, className, children, ...otherProps }: RootElementProps): import("react").JSX.Element;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import { CommandMenuItem } from "../CommandMenu";
|
|
1
|
+
import { type CommandMenuItemProps } from "../CommandMenu";
|
|
3
2
|
/** Properties of the option component. */
|
|
4
|
-
export interface OptionProps extends Omit<
|
|
3
|
+
export interface OptionProps extends Omit<CommandMenuItemProps, "value" | "asLink" | "onSelect" | "selected" | "icon" | "target" | "href"> {
|
|
5
4
|
/**
|
|
6
5
|
* A unique value for this item. If no value is provided, it will be inferred
|
|
7
6
|
* from `children` or the rendered `textContent`. If your `textContent`
|
|
@@ -10,4 +9,4 @@ export interface OptionProps extends Omit<ComponentPropsWithoutRef<typeof Comman
|
|
|
10
9
|
value?: string | number;
|
|
11
10
|
}
|
|
12
11
|
/** An option which can be selected in a `Select`. */
|
|
13
|
-
export declare
|
|
12
|
+
export declare function Option({ value, color, disabled, className, actionProps, iconProps, children, "aria-disabled": ariaDisabled, ...otherProps }: OptionProps): import("react").JSX.Element | null;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import { CommandMenuGroup } from "../CommandMenu";
|
|
1
|
+
import { type CommandMenuGroupProps } from "../CommandMenu";
|
|
3
2
|
/** Properties of the options group component. */
|
|
4
|
-
export interface OptionsGroupProps extends
|
|
3
|
+
export interface OptionsGroupProps extends CommandMenuGroupProps {
|
|
5
4
|
}
|
|
6
5
|
/** Component used to group options within a `Select`. */
|
|
7
|
-
export declare
|
|
6
|
+
export declare function OptionsGroup({ children, ...otherProps }: OptionsGroupProps): string | number | bigint | boolean | Iterable<import("react").ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode> | null | undefined> | import("react").JSX.Element | null | undefined;
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import {
|
|
1
|
+
import { type ComponentProps, type CSSProperties, type ReactNode } from "react";
|
|
2
|
+
import { type CommandMenuProps } from "../CommandMenu";
|
|
3
3
|
import { type ControlSelectMultipleProps, type ControlSelectSingleProps } from "../Control";
|
|
4
4
|
import type { FormValidationMode } from "../Form";
|
|
5
5
|
import { type FormControlValidateFn } from "../Form/useRegisterFormControl.ts";
|
|
6
|
-
import type {
|
|
7
|
-
import {
|
|
8
|
-
import type {
|
|
6
|
+
import type { IconButtonProps } from "../IconButton";
|
|
7
|
+
import { type PopoverContentProps, type PopoverTriggerProps } from "../Popover";
|
|
8
|
+
import type { TagProps } from "../Tag";
|
|
9
9
|
/** Select's popover trigger properties. */
|
|
10
|
-
type SelectPopoverTriggerProps = Omit<
|
|
10
|
+
type SelectPopoverTriggerProps = Omit<PopoverTriggerProps, "defaultValue" | "value">;
|
|
11
11
|
/** Base properties of the select component. */
|
|
12
|
-
interface SelectPropsBase<TValue> extends SelectPopoverTriggerProps, Pick<
|
|
12
|
+
interface SelectPropsBase<TValue> extends SelectPopoverTriggerProps, Pick<CommandMenuProps, "searchPlaceholder" | "searchValue" | "onSearchValueChange"> {
|
|
13
|
+
/** Maximum number of options that can be selected when `multiple` is set. */
|
|
14
|
+
maxSelected?: number;
|
|
13
15
|
/**
|
|
14
16
|
* Custom validation function meant to validate the control when it is part of
|
|
15
17
|
* a `Form`.
|
|
@@ -60,21 +62,23 @@ interface SelectPropsBase<TValue> extends SelectPopoverTriggerProps, Pick<Compon
|
|
|
60
62
|
*/
|
|
61
63
|
valueTagMaxWidth?: CSSProperties["maxWidth"];
|
|
62
64
|
/** Properties to pass to the element holding the whole value or placeholder. */
|
|
63
|
-
valueProps?:
|
|
65
|
+
valueProps?: ComponentProps<"div">;
|
|
64
66
|
/** Properties to pass to each `Tag` holding a value, when `multiple` is set. */
|
|
65
|
-
valueTagProps?: Omit<
|
|
67
|
+
valueTagProps?: Omit<TagProps, "defaultOpen" | "open" | "onOpenChange" | "color" | "showCloseButton">;
|
|
66
68
|
/** Properties to pass to the arrow `Icon` component. */
|
|
67
|
-
arrowProps?: Omit<
|
|
69
|
+
arrowProps?: Omit<IconButtonProps, "icon" | "label">;
|
|
68
70
|
/** Properties to pass to the `Popover` component. */
|
|
69
|
-
popoverProps?:
|
|
71
|
+
popoverProps?: PopoverContentProps;
|
|
70
72
|
/** Options to pass to the `CommandMenu` component. */
|
|
71
|
-
commandMenuProps?: Omit<
|
|
73
|
+
commandMenuProps?: Omit<CommandMenuProps, "defaultValue" | "value" | "onValueChange" | "iconPlacement" | "searchPlaceholder" | "searchValue" | "onSearchValueChange" | "label" | "listLabel" | "loading" | "loadingLabel" | "loadingProgress" | "emptyMessage">;
|
|
72
74
|
}
|
|
73
75
|
/** Properties of a single select control. */
|
|
74
76
|
export interface SelectSingleProps extends Omit<ControlSelectSingleProps, keyof SelectPopoverTriggerProps>, SelectPropsBase<string> {
|
|
77
|
+
maxSelected?: never;
|
|
75
78
|
}
|
|
76
79
|
/** Properties of a multiple select control. */
|
|
77
80
|
export interface SelectMultipleProps extends Omit<ControlSelectMultipleProps, keyof SelectPopoverTriggerProps>, SelectPropsBase<string[]> {
|
|
81
|
+
maxSelected?: number;
|
|
78
82
|
}
|
|
79
83
|
/** Properties of the select component. */
|
|
80
84
|
export type SelectProps = SelectSingleProps | SelectMultipleProps;
|
|
@@ -113,5 +117,5 @@ export type SelectProps = SelectSingleProps | SelectMultipleProps;
|
|
|
113
117
|
* }
|
|
114
118
|
* ```
|
|
115
119
|
*/
|
|
116
|
-
export declare
|
|
120
|
+
export declare function Select({ multiple, defaultValue, value: controlledValue, onValueChange, defaultOpen, open: controlledOpen, onOpenChange, searchPlaceholder, searchValue: controlledSearchValue, onSearchValueChange, name, placeholder, disabled, readOnly, required, maxSelected, loading, loadingDescription, variant, status, code, startAdornment, endAdornment, showClearButton, clearDescription, searchLabel, optionsLabel, loadingOptions, loadingOptionsLabel, loadingOptionsProgress, showSpinner, emptyMessage, valueTagCloseButtonLabel, valueTagMaxWidth, onKeyDown, onBlurToOutside, validate, validationMode, className, rootProps, codeProps, containerProps, valueProps, valueTagProps, clearButtonProps, spinnerProps, arrowProps, popoverProps, commandMenuProps, autoComplete, form, style, "aria-disabled": ariaDisabled, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, children, ref, ...otherProps }: SelectProps): import("react").JSX.Element;
|
|
117
121
|
export {};
|
|
@@ -1,18 +1,11 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
2
|
import type { AccentColor } from "../../utils/accent.ts";
|
|
3
|
-
import type { ControlStatus } from "../Control";
|
|
4
3
|
import type { SelectProps } from "./Select.tsx";
|
|
5
4
|
/** Value of the select context. */
|
|
6
|
-
export interface SelectContextValue {
|
|
5
|
+
export interface SelectContextValue extends Pick<SelectProps, "multiple" | "status" | "maxSelected" | "disabled" | "readOnly" | "valueTagCloseButtonLabel" | "valueTagProps"> {
|
|
7
6
|
registering?: boolean;
|
|
8
|
-
multiple: boolean;
|
|
9
7
|
value: string | string[];
|
|
10
8
|
onOptionSelect: (value: string) => void;
|
|
11
|
-
status?: ControlStatus;
|
|
12
|
-
disabled?: boolean;
|
|
13
|
-
readOnly?: boolean;
|
|
14
|
-
valueTagCloseButtonLabel?: SelectProps["valueTagCloseButtonLabel"];
|
|
15
|
-
valueTagProps?: SelectProps["valueTagProps"];
|
|
16
9
|
store: SelectStore;
|
|
17
10
|
}
|
|
18
11
|
/** State of an option. */
|
|
@@ -39,15 +32,16 @@ export declare const SelectContext: import("react").Context<SelectContextValue |
|
|
|
39
32
|
/** Options to pass to the `useCreateSelectContext` hook. */
|
|
40
33
|
export type UseCreateSelectContextOptions = Omit<SelectContextValue, "store">;
|
|
41
34
|
/** Hook which creates the select context. */
|
|
42
|
-
export declare function useCreateSelectContext({ multiple, value, onOptionSelect, status, disabled, readOnly, valueTagCloseButtonLabel, valueTagProps, }: UseCreateSelectContextOptions): {
|
|
43
|
-
multiple: boolean;
|
|
35
|
+
export declare function useCreateSelectContext({ multiple, value, onOptionSelect, status, maxSelected, disabled, readOnly, valueTagCloseButtonLabel, valueTagProps, }: UseCreateSelectContextOptions): {
|
|
36
|
+
multiple: boolean | undefined;
|
|
44
37
|
value: string | string[];
|
|
45
38
|
onOptionSelect: (value: string) => void;
|
|
46
|
-
status: ControlStatus | undefined;
|
|
39
|
+
status: import("../Control/Control.tsx").ControlStatus | undefined;
|
|
40
|
+
maxSelected: number | undefined;
|
|
47
41
|
disabled: boolean | undefined;
|
|
48
42
|
readOnly: boolean | undefined;
|
|
49
43
|
valueTagCloseButtonLabel: ReactNode;
|
|
50
|
-
valueTagProps: Omit<
|
|
44
|
+
valueTagProps: Omit<import("../Tag/Tag.tsx").TagProps, "open" | "defaultOpen" | "onOpenChange" | "color" | "showCloseButton"> | undefined;
|
|
51
45
|
store: Omit<import("zustand").StoreApi<SelectState>, "subscribe"> & {
|
|
52
46
|
subscribe: {
|
|
53
47
|
(listener: (selectedState: SelectState, previousSelectedState: SelectState) => void): () => void;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type ComponentProps } from "react";
|
|
2
2
|
/** Properties of the native `<select>` element. */
|
|
3
|
-
export interface SelectNativeProps extends
|
|
3
|
+
export interface SelectNativeProps extends ComponentProps<"select"> {
|
|
4
4
|
actualElement: HTMLElement | null;
|
|
5
5
|
onValueChange: (value: string | string[]) => void;
|
|
6
6
|
}
|
|
7
7
|
/** Native `<select>` element used by the `Select` component. */
|
|
8
|
-
export declare
|
|
8
|
+
export declare function SelectNative({ actualElement, multiple, onValueChange, value, ...otherProps }: SelectNativeProps): import("react").JSX.Element;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Separator as SeparatorPrimitive } from "radix-ui";
|
|
2
|
-
import {
|
|
2
|
+
import type { ComponentProps } from "react";
|
|
3
3
|
import type { AccentColor } from "../../utils/accent.ts";
|
|
4
4
|
/** Link colours. */
|
|
5
5
|
export type SeparatorColor = AccentColor;
|
|
6
6
|
/** Properties of the separator component. */
|
|
7
|
-
export interface SeparatorProps extends
|
|
7
|
+
export interface SeparatorProps extends ComponentProps<typeof SeparatorPrimitive.Root> {
|
|
8
8
|
/**
|
|
9
9
|
* Colour of the separator.
|
|
10
10
|
*
|
|
@@ -42,4 +42,4 @@ export interface SeparatorProps extends ComponentPropsWithoutRef<typeof Separato
|
|
|
42
42
|
* }
|
|
43
43
|
* ```
|
|
44
44
|
*/
|
|
45
|
-
export declare
|
|
45
|
+
export declare function Separator({ asChild, color, length, className, style, children, ...otherProps }: SeparatorProps): import("react").JSX.Element;
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import { Slot as SlotPrimitive } from "radix-ui";
|
|
2
|
+
import type { ComponentProps } from "react";
|
|
3
|
+
/** Properties of the slot component. */
|
|
4
|
+
export interface SlotProps extends ComponentProps<typeof SlotPrimitive.Root> {
|
|
5
|
+
}
|
|
1
6
|
/**
|
|
2
7
|
* Component that merges its props onto its immediate child.
|
|
3
8
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { FunctionComponent, ReactNode } from "react";
|
|
2
2
|
/** Properties of the `Slottable` component. */
|
|
3
3
|
export interface SlottableProps {
|
|
4
4
|
children?: ReactNode;
|
|
@@ -7,4 +7,4 @@ export interface SlottableProps {
|
|
|
7
7
|
* Component that can be used a child of `Slot`, where the content shall be
|
|
8
8
|
* rendered.
|
|
9
9
|
*/
|
|
10
|
-
export declare const Slottable:
|
|
10
|
+
export declare const Slottable: FunctionComponent<SlottableProps>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ComponentProps, ReactNode } from "react";
|
|
2
2
|
import type { AccentColor } from "../../utils/accent.ts";
|
|
3
3
|
/** Possible sizes of the spinner. */
|
|
4
4
|
export type SpinnerSize = "3xs" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl";
|
|
5
5
|
/** Possible colours of the spinner. */
|
|
6
6
|
export type SpinnerColor = AccentColor;
|
|
7
7
|
/** Properties of the spinner component. */
|
|
8
|
-
export interface SpinnerProps extends
|
|
8
|
+
export interface SpinnerProps extends ComponentProps<"span"> {
|
|
9
9
|
/**
|
|
10
10
|
* Size of the spinner. By default, the spinner will be sized according to the
|
|
11
11
|
* current font size.
|
|
@@ -38,4 +38,4 @@ export interface SpinnerProps extends ComponentPropsWithoutRef<"span"> {
|
|
|
38
38
|
* }
|
|
39
39
|
* ```
|
|
40
40
|
*/
|
|
41
|
-
export declare
|
|
41
|
+
export declare function Spinner({ size, color, label, className, ...otherProps }: SpinnerProps): import("react").JSX.Element;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type ComponentProps, type CSSProperties, type ReactElement } from "react";
|
|
2
2
|
import { type Responsive } from "../../utils/useResponsiveValues.ts";
|
|
3
3
|
/** Possible stack directions. */
|
|
4
4
|
export type StackDirection = "column" | "column-reverse" | "row" | "row-reverse";
|
|
5
5
|
/** Whether to wrap items. */
|
|
6
6
|
export type StackWrap = boolean | "reverse";
|
|
7
7
|
/** Properties of the stack component. */
|
|
8
|
-
export interface StackProps extends
|
|
8
|
+
export interface StackProps extends ComponentProps<"div"> {
|
|
9
9
|
/**
|
|
10
10
|
* Change the component to the HTML tag or custom component of the only child.
|
|
11
11
|
* This will merge the original component props with the props of the supplied
|
|
@@ -43,7 +43,7 @@ export interface StackProps extends ComponentPropsWithoutRef<"div"> {
|
|
|
43
43
|
*
|
|
44
44
|
* The stack component is mostly concerned with one-dimension layouts. For
|
|
45
45
|
* two-dimensional layouts, you might prefer to use the [`Grid`
|
|
46
|
-
* component](
|
|
46
|
+
* component](/docs/ostack-ui-layout-grid--docs) instead.
|
|
47
47
|
*
|
|
48
48
|
* Example usage:
|
|
49
49
|
*
|
|
@@ -61,4 +61,4 @@ export interface StackProps extends ComponentPropsWithoutRef<"div"> {
|
|
|
61
61
|
* }
|
|
62
62
|
* ```
|
|
63
63
|
*/
|
|
64
|
-
export declare
|
|
64
|
+
export declare function Stack({ asChild, direction, gap, divider, justifyContent, alignItems, alignContent, wrap, className, style, children, ...otherProps }: StackProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Responsive } from "../../utils/useResponsiveValues.ts";
|
|
2
|
+
import type { StackDirection } from "./Stack.tsx";
|
|
3
|
+
/** Value of the stack context. */
|
|
4
|
+
export interface StackContextValue {
|
|
5
|
+
direction: Responsive<StackDirection> | undefined;
|
|
6
|
+
gap: Responsive<number | string> | undefined;
|
|
7
|
+
}
|
|
8
|
+
/** Stack context. */
|
|
9
|
+
export declare const StackContext: import("react").Context<StackContextValue | null>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type ComponentProps, type ReactNode } from "react";
|
|
2
2
|
import { type ButtonProps } from "../Button";
|
|
3
3
|
import { type ControlStatus } from "../Control";
|
|
4
|
-
import {
|
|
4
|
+
import { type LabelProps } from "../Label";
|
|
5
5
|
/** Properties of the step component. */
|
|
6
|
-
export interface StepProps extends
|
|
6
|
+
export interface StepProps extends ComponentProps<"li">, Pick<ButtonProps, "variant" | "disabled" | "loading" | "showSpinner" | "spinnerProps"> {
|
|
7
7
|
/**
|
|
8
8
|
* Change the component to the HTML tag or custom component of the only child.
|
|
9
9
|
* This will merge the original component props with the props of the supplied
|
|
@@ -24,9 +24,9 @@ export interface StepProps extends ComponentPropsWithoutRef<"li">, Pick<ButtonPr
|
|
|
24
24
|
/** Visually hidden label for completed steps. */
|
|
25
25
|
completedLabel?: ReactNode;
|
|
26
26
|
/** Properties to pass to the button element. */
|
|
27
|
-
buttonProps?: Omit<
|
|
27
|
+
buttonProps?: Omit<ComponentProps<"button">, "color" | "children" | "disabled">;
|
|
28
28
|
/** Properties to pass to the step's label component. */
|
|
29
|
-
labelProps?: Omit<
|
|
29
|
+
labelProps?: Omit<LabelProps, "htmlFor">;
|
|
30
30
|
}
|
|
31
31
|
/** Step trigger component. */
|
|
32
|
-
export declare
|
|
32
|
+
export declare function Step({ asChild, index, completed, status, stepNumberLabel, completedLabel, variant, disabled, loading, showSpinner, className, children, buttonProps, labelProps, ...otherProps }: StepProps): import("react").JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type ComponentProps } from "react";
|
|
2
2
|
/** Properties of the step content component. */
|
|
3
|
-
export interface StepContentProps extends
|
|
3
|
+
export interface StepContentProps extends ComponentProps<"div"> {
|
|
4
4
|
/**
|
|
5
5
|
* Change the component to the HTML tag or custom component of the only child.
|
|
6
6
|
* This will merge the original component props with the props of the supplied
|
|
@@ -10,9 +10,9 @@ export interface StepContentProps extends ComponentPropsWithoutRef<"div"> {
|
|
|
10
10
|
/** Index of the step that corresponds to this content. */
|
|
11
11
|
index?: number;
|
|
12
12
|
/** Properties to pass to the content label element (print only). */
|
|
13
|
-
stepContentLabelProps?:
|
|
13
|
+
stepContentLabelProps?: ComponentProps<"span">;
|
|
14
14
|
/** Properties to pass to the content label index element (print only). */
|
|
15
|
-
stepContentLabelIndexProps?:
|
|
15
|
+
stepContentLabelIndexProps?: ComponentProps<"span">;
|
|
16
16
|
}
|
|
17
17
|
/** Step content component. */
|
|
18
|
-
export declare
|
|
18
|
+
export declare function StepContent({ asChild, index, id, className, stepContentLabelProps, stepContentLabelIndexProps, ref, ...otherProps }: StepContentProps): import("react").JSX.Element;
|