@ostack.tech/ui 1.2.0-beta.0 → 1.2.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/en-DGLb7rrz.js.map +1 -1
- package/dist/locales/fr-FR.js.map +1 -1
- package/dist/locales/pt-PT.js.map +1 -1
- package/dist/ostack-ui.css +8 -16
- package/dist/ostack-ui.js +26831 -7981
- package/dist/ostack-ui.js.map +1 -1
- package/package.json +15 -13
- package/scss/components/Button/_Button.scss +4 -18
- package/scss/components/ButtonGroup/_ButtonGroup.scss +2 -6
- package/scss/components/Calendar/_Calendar-variables.scss +4 -12
- package/scss/components/Calendar/_Calendar.scss +19 -38
- package/scss/components/Card/_Card-variables.scss +4 -12
- package/scss/components/Card/_Card.scss +8 -28
- package/scss/components/Collapsible/_Collapsible.scss +2 -8
- package/scss/components/CommandMenu/_CommandMenu-variables.scss +2 -6
- package/scss/components/CommandMenu/_CommandMenu.scss +5 -13
- package/scss/components/ControlAddon/_ControlAddon-variables.scss +4 -12
- package/scss/components/ControlAddon/_ControlAddon.scss +16 -52
- package/scss/components/DataTable/_DataTable.scss +1 -2
- package/scss/components/DateRangeInput/_DateRangeInput-variables.scss +1 -3
- package/scss/components/DateRangeInput/_DateRangeInput.scss +7 -21
- package/scss/components/Dialog/_Dialog.scss +6 -19
- package/scss/components/DropdownMenu/_DropdownMenu.scss +1 -2
- package/scss/components/Feedback/_Feedback-variables.scss +1 -6
- package/scss/components/Feedback/_Feedback.scss +8 -33
- package/scss/components/FieldGroup/_FieldGroup.scss +1 -4
- package/scss/components/Grid/_Grid.scss +4 -12
- package/scss/components/HelperText/_HelperText.scss +1 -4
- package/scss/components/Input/_Input.scss +11 -32
- package/scss/components/Label/_Label.scss +2 -6
- package/scss/components/Link/_Link.scss +1 -2
- package/scss/components/MenuList/_MenuList.scss +2 -6
- package/scss/components/Overlay/_Overlay-variables.scss +1 -3
- package/scss/components/Overlay/_Overlay.scss +2 -4
- package/scss/components/Root/_Root.scss +4 -16
- package/scss/components/Select/_Select-variables.scss +4 -12
- package/scss/components/Select/_Select.scss +1 -2
- package/scss/components/Separator/_Separator.scss +2 -8
- package/scss/components/Spinner/_Spinner.scss +2 -8
- package/scss/components/Stepper/_Stepper-variables.scss +5 -15
- package/scss/components/Stepper/_Stepper.scss +2 -5
- package/scss/components/Table/_Table-variables.scss +16 -47
- package/scss/components/Table/_Table.scss +30 -112
- package/scss/components/Tabs/_Tabs-variables.scss +15 -43
- package/scss/components/Tabs/_Tabs.scss +13 -46
- package/scss/components/Tag/_Tag-variables.scss +1 -4
- package/scss/components/Tag/_Tag.scss +5 -14
- package/scss/components/Toast/_Toast.scss +3 -8
- package/scss/components/Tooltip/_Tooltip-variables.scss +1 -3
- package/scss/components/Tooltip/_Tooltip.scss +4 -12
- package/scss/scss/_base-variables.scss +6 -7
- package/scss/scss/placeholders/button/_button.scss +2 -8
- package/scss/scss/placeholders/checkable/_checkable.scss +15 -60
- package/scss/scss/placeholders/control/_control-variables.scss +3 -10
- package/scss/scss/placeholders/control/_control.scss +10 -38
- package/scss/scss/placeholders/menu/_menu-variables.scss +14 -42
- package/scss/scss/placeholders/menu/_menu.scss +22 -82
- package/scss/scss/placeholders/notification/_notification.scss +2 -4
- package/scss/scss/placeholders/popover/_popover-variables.scss +1 -3
- package/scss/scss/placeholders/popover/_popover.scss +4 -11
- package/scss/scss/utils/_breakpoints.scss +1 -4
- package/scss/scss/utils/_responsive-values.scss +2 -5
- package/scss/scss/utils/_spinner.scss +1 -2
- package/types/components/Actions/Action.d.ts +6 -6
- package/types/components/Actions/ActionGroup.d.ts +10 -14
- package/types/components/Actions/ActionMenu.d.ts +13 -17
- package/types/components/Actions/ActionSplit.d.ts +4 -4
- package/types/components/Actions/Actions.d.ts +20 -25
- package/types/components/Actions/ActionsSecondary.d.ts +1 -1
- package/types/components/Alert/Alert.d.ts +8 -9
- package/types/components/Alert/AlertTitle.d.ts +3 -3
- package/types/components/AlertDialog/AlertDialog.d.ts +16 -20
- package/types/components/AlertDialog/AlertDialogAction.d.ts +2 -2
- package/types/components/AlertDialog/AlertDialogCancel.d.ts +2 -2
- package/types/components/AlertDialog/AlertDialogContent.d.ts +2 -3
- package/types/components/AlertDialog/AlertDialogDescription.d.ts +4 -5
- package/types/components/Button/Button.d.ts +32 -39
- package/types/components/ButtonGroup/ButtonGroup.d.ts +3 -3
- package/types/components/Calendar/Calendar.d.ts +2 -3
- package/types/components/Calendar/CalendarDay.d.ts +3 -4
- package/types/components/Calendar/CalendarHeader.d.ts +2 -2
- package/types/components/Card/Card.d.ts +6 -13
- package/types/components/Card/CardBody.d.ts +3 -3
- package/types/components/Card/CardFooter.d.ts +3 -3
- package/types/components/Card/CardHeader.d.ts +3 -3
- package/types/components/Card/CardTitle.d.ts +3 -3
- package/types/components/Checkbox/Checkbox.d.ts +17 -29
- package/types/components/CheckboxGroup/CheckboxGroup.d.ts +24 -38
- package/types/components/CheckboxGroup/CheckboxGroupContext.d.ts +5 -6
- package/types/components/CloseButton/CloseButton.d.ts +1 -1
- package/types/components/Code/Code.d.ts +4 -5
- package/types/components/Collapsible/Collapsible.d.ts +3 -9
- package/types/components/Collapsible/CollapsibleTrigger.d.ts +1 -4
- package/types/components/CommandMenu/CommandMenu.d.ts +6 -7
- package/types/components/CommandMenu/CommandMenuDialog.d.ts +6 -10
- package/types/components/CommandMenu/CommandMenuItem.d.ts +3 -3
- package/types/components/CommandMenu/cmdk/index.d.ts +73 -112
- package/types/components/Container/Container.d.ts +17 -21
- package/types/components/Control/Control.d.ts +21 -27
- package/types/components/Control/ControlWithContainerRef.d.ts +5 -6
- package/types/components/ControlAddon/ControlAddon.d.ts +9 -13
- package/types/components/ControlCode/ControlCode.d.ts +5 -8
- package/types/components/DataTable/DataTable.d.ts +59 -90
- package/types/components/DataTable/DataTableApi.d.ts +11 -12
- package/types/components/DataTable/DataTableColumn.d.ts +18 -21
- package/types/components/DataTable/DataTableColumnGroup.d.ts +3 -4
- package/types/components/DataTable/DataTableColumns.d.ts +4 -4
- package/types/components/DataTable/DataTableContent.d.ts +2 -5
- package/types/components/DataTable/DataTableEmptyOrLoadingRows.d.ts +1 -4
- package/types/components/DataTable/DataTableFilter.d.ts +3 -3
- package/types/components/DataTable/DataTablePagination.d.ts +5 -9
- package/types/components/DataTable/DataTableRowsPerPage.d.ts +4 -5
- package/types/components/DataTable/DataTableSelectionTrigger.d.ts +5 -11
- package/types/components/DataTable/PagedDataTablePagination.d.ts +1 -1
- package/types/components/DataTable/PagedDataTableRows.d.ts +1 -1
- package/types/components/DataTable/ScrolledDataTableRows.d.ts +1 -1
- package/types/components/DataTable/index.d.ts +1 -1
- package/types/components/DataTable/{getRowKey.d.ts → keyUtils.d.ts} +2 -0
- package/types/components/DataTable/spliceWindow.d.ts +3 -4
- package/types/components/DateInput/DateInput.d.ts +21 -34
- package/types/components/DateRangeInput/DateRangeInput.d.ts +41 -70
- package/types/components/DescriptionList/DescriptionList.d.ts +5 -10
- package/types/components/Dialog/Dialog.d.ts +9 -11
- package/types/components/Dialog/DialogContent.d.ts +3 -4
- package/types/components/Dialog/DialogDescription.d.ts +2 -3
- package/types/components/DropdownMenu/DropdownMenu.d.ts +10 -21
- package/types/components/DropdownMenu/DropdownMenuCheckboxItem.d.ts +1 -1
- package/types/components/DropdownMenu/DropdownMenuItem.d.ts +3 -3
- package/types/components/DropdownMenu/DropdownMenuRadioItem.d.ts +1 -1
- package/types/components/DropdownMenu/DropdownMenuSubContent.d.ts +1 -4
- package/types/components/DropdownMenu/DropdownMenuSubTrigger.d.ts +1 -4
- package/types/components/ErrorBoundary/ErrorBoundary.d.ts +21 -27
- package/types/components/Feedback/Feedback.d.ts +6 -6
- package/types/components/Feedback/FeedbackPopover.d.ts +3 -3
- package/types/components/Feedback/FeedbackProvider.d.ts +3 -4
- package/types/components/Feedback/feedbackUtils.d.ts +5 -8
- package/types/components/Field/Field.d.ts +9 -11
- package/types/components/Field/fieldUtils.d.ts +2 -2
- package/types/components/FieldGroup/FieldGroup.d.ts +4 -5
- package/types/components/FieldGroup/FieldGroupBody.d.ts +3 -3
- package/types/components/FieldGroup/FieldGroupHeader.d.ts +4 -4
- package/types/components/FieldGroup/FieldGroupTitle.d.ts +3 -3
- package/types/components/Form/Form.d.ts +25 -40
- package/types/components/Form/FormContext.d.ts +2 -2
- package/types/components/Form/FormError.d.ts +6 -11
- package/types/components/Form/FormState.d.ts +2 -2
- package/types/components/Form/formUtils.d.ts +1 -1
- package/types/components/Form/useRegisterFormControl.d.ts +1 -1
- package/types/components/Grid/Grid.d.ts +19 -24
- package/types/components/Heading/Heading.d.ts +9 -10
- package/types/components/HelperText/HelperText.d.ts +3 -3
- package/types/components/HelperText/HelperTextProvider.d.ts +3 -4
- package/types/components/Icon/Icon.d.ts +9 -16
- package/types/components/IconButton/IconButton.d.ts +35 -53
- package/types/components/Input/Input.d.ts +5 -12
- package/types/components/Keybinds/KeyPress.d.ts +1 -1
- package/types/components/Keybinds/Keybind.d.ts +1 -1
- package/types/components/Keybinds/Keybinds.d.ts +3 -9
- package/types/components/Keyboard/Keyboard.d.ts +7 -8
- package/types/components/Label/Label.d.ts +5 -6
- package/types/components/Label/LabelProvider.d.ts +3 -4
- package/types/components/Label/labelUtils.d.ts +2 -2
- package/types/components/Layer/Layer.d.ts +4 -4
- package/types/components/Link/Link.d.ts +13 -13
- package/types/components/Mark/Mark.d.ts +6 -7
- package/types/components/MenuList/MenuList.d.ts +6 -7
- package/types/components/MenuList/MenuListGroup.d.ts +5 -6
- package/types/components/MenuList/MenuListItem.d.ts +21 -25
- package/types/components/NumericInput/NumericInput.d.ts +20 -34
- package/types/components/NumericInput/numericInputUtils.d.ts +4 -5
- package/types/components/Output/Output.d.ts +12 -13
- package/types/components/Popover/Popover.d.ts +6 -13
- package/types/components/Popover/PopoverAnchor.d.ts +2 -2
- package/types/components/Popover/PopoverTrigger.d.ts +2 -2
- package/types/components/Portal/Portal.d.ts +3 -4
- package/types/components/Printer/Printer.d.ts +40 -54
- package/types/components/Printer/PrinterContent.d.ts +6 -6
- package/types/components/Printer/PrinterContentContext.d.ts +4 -5
- package/types/components/Printer/PrinterContext.d.ts +4 -4
- package/types/components/Printer/PrinterTrigger.d.ts +5 -6
- package/types/components/Printer/index.d.ts +1 -1
- package/types/components/RadioGroup/Radio.d.ts +10 -13
- package/types/components/RadioGroup/RadioGroup.d.ts +21 -34
- package/types/components/Root/Root.d.ts +21 -27
- package/types/components/Root/RootContext.d.ts +1 -4
- package/types/components/Select/Option.d.ts +3 -3
- package/types/components/Select/Select.d.ts +14 -26
- package/types/components/Select/SelectNative.d.ts +1 -1
- package/types/components/Separator/Separator.d.ts +3 -4
- package/types/components/Slot/Slottable.d.ts +1 -4
- package/types/components/Spinner/Spinner.d.ts +5 -12
- package/types/components/Stack/Stack.d.ts +9 -13
- package/types/components/Stepper/Step.d.ts +6 -6
- package/types/components/Stepper/StepContent.d.ts +3 -3
- package/types/components/Stepper/StepList.d.ts +4 -5
- package/types/components/Stepper/Stepper.d.ts +4 -5
- package/types/components/Stepper/StepperFinishTrigger.d.ts +3 -9
- package/types/components/Stepper/StepperNextTrigger.d.ts +3 -6
- package/types/components/Stepper/StepperPreviousTrigger.d.ts +4 -10
- package/types/components/Table/Table.d.ts +42 -58
- package/types/components/Table/TableCell.d.ts +15 -19
- package/types/components/Table/TableColumn.d.ts +15 -27
- package/types/components/Table/TableColumnGroup.d.ts +2 -3
- package/types/components/Table/TableHead.d.ts +5 -5
- package/types/components/Tabs/TabContent.d.ts +2 -2
- package/types/components/Tabs/TabList.d.ts +1 -1
- package/types/components/Tabs/Tabs.d.ts +4 -8
- package/types/components/Tag/Tag.d.ts +8 -8
- package/types/components/TextArea/TextArea.d.ts +7 -13
- package/types/components/Toast/Toast.d.ts +25 -38
- package/types/components/Toast/ToastProvider.d.ts +2 -5
- package/types/components/Toast/ToastViewport.d.ts +2 -5
- package/types/components/Tooltip/Tooltip.d.ts +11 -11
- package/types/components/VisuallyHidden/VisuallyHidden.d.ts +7 -11
- package/types/index.d.ts +2 -1
- package/types/providers/AlertDialogProvider/AlertDialogProviderContext.d.ts +17 -19
- package/types/providers/AlertDialogProvider/useAlertDialog.d.ts +50 -58
- package/types/providers/DocumentTitleProvider/DocumentTitle.d.ts +1 -4
- package/types/providers/ErrorReportingProvider/ErrorReport.d.ts +4 -7
- package/types/providers/ErrorReportingProvider/ErrorReportingProvider.d.ts +12 -17
- package/types/providers/LocalizationProvider/useLocale.d.ts +1 -4
- package/types/providers/PrefixProvider/defaultPrefix.d.ts +2 -3
- package/types/providers/PrefixProvider/usePrefix.d.ts +3 -6
- package/types/providers/ToastManagerProvider/ToastManagerContext.d.ts +3 -3
- package/types/providers/ToastManagerProvider/useToastManager.d.ts +11 -14
- package/types/utils/__tests__/useCombinedRef.test.d.ts +1 -0
- package/types/utils/breakpoints.d.ts +5 -6
- package/types/utils/combineAriaIds.d.ts +1 -1
- package/types/utils/cx.d.ts +2 -5
- package/types/utils/filtering.d.ts +2 -2
- package/types/utils/keyboardShortcut.d.ts +18 -25
- package/types/utils/navigate.d.ts +2 -2
- package/types/utils/numericStringUtils.d.ts +6 -13
- package/types/utils/parseChildren.d.ts +5 -9
- package/types/utils/reactCompilerUtils.d.ts +7 -0
- package/types/utils/setNativeProperty.d.ts +2 -3
- package/types/utils/sorting.d.ts +2 -2
- package/types/utils/useCombinedEventHandler.d.ts +30 -0
- package/types/utils/useCombinedRef.d.ts +6 -4
- package/types/utils/useCssVars.d.ts +9 -20
- package/types/utils/useDateTransformer.d.ts +4 -8
- package/types/utils/useIntersectionObserver.d.ts +2 -5
- package/types/utils/useLatestRef.d.ts +1 -2
- package/types/utils/useLocation.d.ts +5 -8
- package/types/utils/useMeasure.d.ts +2 -5
- package/types/utils/useMediaQuery.d.ts +1 -4
- package/types/utils/useNumericTransformer.d.ts +12 -19
- package/types/utils/usePrevious.d.ts +3 -4
- package/types/utils/useResponsiveValues.d.ts +7 -10
- package/types/utils/useScrollPosition.d.ts +1 -6
- package/types/utils/useSearchParam.d.ts +2 -6
- package/types/utils/useSearchParams.d.ts +1 -4
- package/types/utils/useSpacing.d.ts +1 -4
- package/types/utils/zustandUtils.d.ts +3 -2
- package/types/utils/combineEventHandlers.d.ts +0 -24
- /package/types/utils/__tests__/{combineEventHandlers.test.d.ts → useCombinedEventHandler.test.d.ts} +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
2
|
import { type PortalProps } from "../Portal";
|
|
3
3
|
/** Properties of the printer content. */
|
|
4
4
|
export interface PrinterContentProps extends ComponentProps<"div"> {
|
|
5
5
|
/**
|
|
6
|
-
* Change the component to the HTML tag or custom component of the only child.
|
|
7
|
-
*
|
|
8
|
-
*
|
|
6
|
+
* Change the component to the HTML tag or custom component of the only child. This will merge the
|
|
7
|
+
* original component props with the props of the supplied element/component and change the
|
|
8
|
+
* underlying DOM node.
|
|
9
9
|
*/
|
|
10
10
|
asChild?: boolean;
|
|
11
11
|
/** Whether the provided `children` should only be rendered while printing. */
|
|
@@ -16,7 +16,7 @@ export interface PrinterContentProps extends ComponentProps<"div"> {
|
|
|
16
16
|
/**
|
|
17
17
|
* Content to be printed.
|
|
18
18
|
*
|
|
19
|
-
* All “element” properties provided to this component will be forwarded to a
|
|
20
|
-
*
|
|
19
|
+
* All “element” properties provided to this component will be forwarded to a wrapper element which
|
|
20
|
+
* **only** exists during printing.
|
|
21
21
|
*/
|
|
22
22
|
export declare function PrinterContent({ asChild, printOnly, portalContainer, className, children, ref, ...otherProps }: PrinterContentProps): import("react").JSX.Element;
|
|
@@ -28,11 +28,10 @@ export interface UseStartPrintingTaskOptions {
|
|
|
28
28
|
enabled?: boolean;
|
|
29
29
|
}
|
|
30
30
|
/**
|
|
31
|
-
* Marks a printing task as having started and returns a function that should be
|
|
32
|
-
*
|
|
33
|
-
* before printing.
|
|
31
|
+
* Marks a printing task as having started and returns a function that should be called when it
|
|
32
|
+
* finishes. The printer will wait for any ongoing printing tasks before printing.
|
|
34
33
|
*
|
|
35
|
-
* > **Note:** This hook **can** be called outside the printer context, in which
|
|
36
|
-
* >
|
|
34
|
+
* > **Note:** This hook **can** be called outside the printer context, in which case
|
|
35
|
+
* > starting/finishing printing tasks will be no-ops but **won't** fail.
|
|
37
36
|
*/
|
|
38
37
|
export declare function useStartPrintingTask({ enabled, }?: UseStartPrintingTaskOptions): () => void;
|
|
@@ -21,13 +21,13 @@ export declare function usePrinterDocumentTitle(): PrinterProps["documentTitle"]
|
|
|
21
21
|
/**
|
|
22
22
|
* Returns whether printing is currently in progress.
|
|
23
23
|
*
|
|
24
|
-
* > **Note:** This hook can be called even when a printer context is **not** in
|
|
25
|
-
* >
|
|
24
|
+
* > **Note:** This hook can be called even when a printer context is **not** in scope, in which case
|
|
25
|
+
* > `false` will be returned.
|
|
26
26
|
*/
|
|
27
27
|
export declare function usePrintInProgress(): boolean;
|
|
28
28
|
/**
|
|
29
|
-
* Hook providing access to the print function. This hook will throw if called
|
|
30
|
-
*
|
|
29
|
+
* Hook providing access to the print function. This hook will throw if called outside the printer
|
|
30
|
+
* context.
|
|
31
31
|
*/
|
|
32
32
|
export declare function usePrint(): PrinterContextValue["print"];
|
|
33
33
|
export {};
|
|
@@ -2,8 +2,8 @@ import type { ComponentProps, ReactElement } from "react";
|
|
|
2
2
|
/** Properties of the printer trigger. */
|
|
3
3
|
export interface PrinterTriggerProps extends ComponentProps<"button"> {
|
|
4
4
|
/**
|
|
5
|
-
* By default, the trigger will be hidden while printing, even when inside the
|
|
6
|
-
*
|
|
5
|
+
* By default, the trigger will be hidden while printing, even when inside the print content. Set
|
|
6
|
+
* this to `true` to show it.
|
|
7
7
|
*
|
|
8
8
|
* @default false
|
|
9
9
|
*/
|
|
@@ -11,10 +11,9 @@ export interface PrinterTriggerProps extends ComponentProps<"button"> {
|
|
|
11
11
|
children: ReactElement<ComponentProps<"button">>;
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
|
-
* Trigger to print the content of the printer. The provided `children` should
|
|
15
|
-
* be a button.
|
|
14
|
+
* Trigger to print the content of the printer. The provided `children` should be a button.
|
|
16
15
|
*
|
|
17
|
-
* This trigger will **not** show in the print, even when inside the print
|
|
18
|
-
*
|
|
16
|
+
* This trigger will **not** show in the print, even when inside the print content, unless
|
|
17
|
+
* `showWhenPrinting` is set to `true`.
|
|
19
18
|
*/
|
|
20
19
|
export declare function PrinterTrigger({ showWhenPrinting, className, onClick, ref, ...otherProps }: PrinterTriggerProps): import("react").JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * from "./Printer.tsx";
|
|
2
2
|
export * from "./PrinterContent.tsx";
|
|
3
3
|
export { usePrinting, useStartPrintingTask } from "./PrinterContentContext.tsx";
|
|
4
|
-
export { usePrint, usePrinterDocumentTitle, usePrintInProgress
|
|
4
|
+
export { usePrint, usePrinterDocumentTitle, usePrintInProgress } from "./PrinterContext.ts";
|
|
5
5
|
export * from "./PrinterTrigger.tsx";
|
|
6
6
|
export * from "./usePrintClassNames.ts";
|
|
@@ -21,15 +21,13 @@ export interface RadioProps extends Omit<ComponentProps<typeof RadioGroupPrimiti
|
|
|
21
21
|
/**
|
|
22
22
|
* Renders the radio in a **loading** state.
|
|
23
23
|
*
|
|
24
|
-
* When `true`, the radio is “soft-disabled”: it looks disabled and ignores
|
|
25
|
-
*
|
|
26
|
-
*
|
|
24
|
+
* When `true`, the radio is “soft-disabled”: it looks disabled and ignores user interaction but
|
|
25
|
+
* remains focusable. By default, a spinner is shown (i.e. `showSpinner` is set to `true` unless
|
|
26
|
+
* overridden).
|
|
27
27
|
*
|
|
28
|
-
* The radio's accessible description while loading can be controlled via
|
|
29
|
-
* `loadingDescription`.
|
|
28
|
+
* The radio's accessible description while loading can be controlled via `loadingDescription`.
|
|
30
29
|
*
|
|
31
|
-
* To only show a spinner without “soft-disabling” the radio, set
|
|
32
|
-
* `showSpinner` instead.
|
|
30
|
+
* To only show a spinner without “soft-disabling” the radio, set `showSpinner` instead.
|
|
33
31
|
*
|
|
34
32
|
* @default false
|
|
35
33
|
*/
|
|
@@ -39,12 +37,11 @@ export interface RadioProps extends Omit<ComponentProps<typeof RadioGroupPrimiti
|
|
|
39
37
|
/**
|
|
40
38
|
* Whether to show a spinner next to the radio.
|
|
41
39
|
*
|
|
42
|
-
* Defaults to the value of the `loading` property. In most cases, prefer
|
|
43
|
-
*
|
|
40
|
+
* Defaults to the value of the `loading` property. In most cases, prefer `loading`, which also
|
|
41
|
+
* “soft-disables” the radio.
|
|
44
42
|
*
|
|
45
|
-
* Use `showSpinner` when you want a spinner **without** “soft-disabling” the
|
|
46
|
-
*
|
|
47
|
-
* `showSpinner` to `false`.
|
|
43
|
+
* Use `showSpinner` when you want a spinner **without** “soft-disabling” the radio. To
|
|
44
|
+
* “soft-disable” **without** a spinner, set `loading` to `true` and `showSpinner` to `false`.
|
|
48
45
|
*
|
|
49
46
|
* @default loading
|
|
50
47
|
*/
|
|
@@ -67,4 +64,4 @@ export interface RadioProps extends Omit<ComponentProps<typeof RadioGroupPrimiti
|
|
|
67
64
|
spinnerProps?: Omit<SpinnerProps, "size">;
|
|
68
65
|
}
|
|
69
66
|
/** Radio component. Must be used within a radio group. */
|
|
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;
|
|
67
|
+
export declare function Radio({ value, status: statusProp, code, loading, loadingDescription: loadingDescriptionProp, showSpinner, children, rootProps, codeProps, indicatorProps, labelProps, spinnerProps, id, disabled: disabledProp, readOnly: readOnlyProp, startAdornment, endAdornment, containerProps, startContainerProps, endContainerProps, onClick, className, "aria-disabled": ariaDisabled, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, ref, ...otherProps }: RadioProps): import("react").JSX.Element;
|
|
@@ -11,8 +11,8 @@ export interface RadioGroupProps extends Omit<ComponentProps<typeof RadioGroupPr
|
|
|
11
11
|
/** Whether to display the radio group inline. */
|
|
12
12
|
inline?: boolean;
|
|
13
13
|
/**
|
|
14
|
-
* Radio group style variant. Defaults to the default variant unless when
|
|
15
|
-
*
|
|
14
|
+
* Radio group style variant. Defaults to the default variant unless when rendering inside a table
|
|
15
|
+
* cell (in which it defaults to `"cell"`).
|
|
16
16
|
*/
|
|
17
17
|
variant?: ControlVariant;
|
|
18
18
|
/** Sets the status of the radio group. */
|
|
@@ -22,15 +22,14 @@ export interface RadioGroupProps extends Omit<ComponentProps<typeof RadioGroupPr
|
|
|
22
22
|
/**
|
|
23
23
|
* Renders the radio group in a **loading** state.
|
|
24
24
|
*
|
|
25
|
-
* When `true`, the radio group is “soft-disabled”: it looks disabled and
|
|
26
|
-
*
|
|
27
|
-
*
|
|
25
|
+
* When `true`, the radio group is “soft-disabled”: it looks disabled and ignores user interaction
|
|
26
|
+
* but remains focusable. By default, a spinner is shown (i.e. `showSpinner` is set to `true`
|
|
27
|
+
* unless overridden).
|
|
28
28
|
*
|
|
29
|
-
* The radio group's accessible description while loading can be controlled
|
|
30
|
-
*
|
|
29
|
+
* The radio group's accessible description while loading can be controlled via
|
|
30
|
+
* `loadingDescription`.
|
|
31
31
|
*
|
|
32
|
-
* To only show a spinner without “soft-disabling” the radio group, set
|
|
33
|
-
* `showSpinner` instead.
|
|
32
|
+
* To only show a spinner without “soft-disabling” the radio group, set `showSpinner` instead.
|
|
34
33
|
*
|
|
35
34
|
* @default false
|
|
36
35
|
*/
|
|
@@ -40,12 +39,11 @@ export interface RadioGroupProps extends Omit<ComponentProps<typeof RadioGroupPr
|
|
|
40
39
|
/**
|
|
41
40
|
* Whether to show a spinner next to the radio group.
|
|
42
41
|
*
|
|
43
|
-
* Defaults to the value of the `loading` property. In most cases, prefer
|
|
44
|
-
*
|
|
42
|
+
* Defaults to the value of the `loading` property. In most cases, prefer `loading`, which also
|
|
43
|
+
* “soft-disables” the radio group.
|
|
45
44
|
*
|
|
46
|
-
* Use `showSpinner` when you want a spinner **without** “soft-disabling” the
|
|
47
|
-
*
|
|
48
|
-
* `true` and `showSpinner` to `false`.
|
|
45
|
+
* Use `showSpinner` when you want a spinner **without** “soft-disabling” the radio group. To
|
|
46
|
+
* “soft-disable” **without** a spinner, set `loading` to `true` and `showSpinner` to `false`.
|
|
49
47
|
*
|
|
50
48
|
* @default loading
|
|
51
49
|
*/
|
|
@@ -58,10 +56,7 @@ export interface RadioGroupProps extends Omit<ComponentProps<typeof RadioGroupPr
|
|
|
58
56
|
* @default false
|
|
59
57
|
*/
|
|
60
58
|
showClearButton?: ControlShowClearButton;
|
|
61
|
-
/**
|
|
62
|
-
* Accessible description for how to clear the radio group when the clear
|
|
63
|
-
* button is visible.
|
|
64
|
-
*/
|
|
59
|
+
/** Accessible description for how to clear the radio group when the clear button is visible. */
|
|
65
60
|
clearDescription?: ReactNode;
|
|
66
61
|
/** Label of the clear button announced to assistive technologies. */
|
|
67
62
|
clearButtonLabel?: string;
|
|
@@ -74,19 +69,12 @@ export interface RadioGroupProps extends Omit<ComponentProps<typeof RadioGroupPr
|
|
|
74
69
|
/**
|
|
75
70
|
* Function called when the focus moves out of the control as a whole.
|
|
76
71
|
*
|
|
77
|
-
* This is useful when there is a need to know when the user stops interacting
|
|
78
|
-
* with the control.
|
|
72
|
+
* This is useful when there is a need to know when the user stops interacting with the control.
|
|
79
73
|
*/
|
|
80
74
|
onBlurToOutside?: (event: FocusEvent) => void;
|
|
81
|
-
/**
|
|
82
|
-
* Custom validation function meant to validate the control when it is part of
|
|
83
|
-
* a `Form`.
|
|
84
|
-
*/
|
|
75
|
+
/** Custom validation function meant to validate the control when it is part of a `Form`. */
|
|
85
76
|
validate?: FormControlValidateFn<string | null>;
|
|
86
|
-
/**
|
|
87
|
-
* Specifies when the control should be validated. Defaults to the value
|
|
88
|
-
* specified in the `Form`.
|
|
89
|
-
*/
|
|
77
|
+
/** Specifies when the control should be validated. Defaults to the value specified in the `Form`. */
|
|
90
78
|
validationMode?: FormValidationMode;
|
|
91
79
|
/** Properties to pass to the code component. */
|
|
92
80
|
codeProps?: ControlCodeProps;
|
|
@@ -102,12 +90,11 @@ export interface RadioGroupProps extends Omit<ComponentProps<typeof RadioGroupPr
|
|
|
102
90
|
spinnerProps?: Omit<SpinnerProps, "size">;
|
|
103
91
|
}
|
|
104
92
|
/**
|
|
105
|
-
* The `RadioGroup` component displays a set of `Radio` button components,
|
|
106
|
-
*
|
|
93
|
+
* The `RadioGroup` component displays a set of `Radio` button components, allowing a user to check
|
|
94
|
+
* at most one of the included radio buttons.
|
|
107
95
|
*
|
|
108
|
-
* For accessibility purposes, radio groups are usually included within a
|
|
109
|
-
* `
|
|
110
|
-
* `Feedback`.
|
|
96
|
+
* For accessibility purposes, radio groups are usually included within a `Field` together with a
|
|
97
|
+
* `Label` and optionally `HelperText` and/or `Feedback`.
|
|
111
98
|
*
|
|
112
99
|
* Example usage:
|
|
113
100
|
*
|
|
@@ -125,4 +112,4 @@ export interface RadioGroupProps extends Omit<ComponentProps<typeof RadioGroupPr
|
|
|
125
112
|
* }
|
|
126
113
|
* ```
|
|
127
114
|
*/
|
|
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;
|
|
115
|
+
export declare function RadioGroup({ defaultValue, value: controlledValue, onValueChange, inline: inlineProp, variant: variantProp, status: statusProp, loading, loadingDescription: loadingDescriptionProp, showSpinner, code, showClearButton, clearDescription: clearDescriptionProp, clearButtonLabel: clearButtonLabelProp, onBlurToOutside, validate, validationMode, startAdornment, endAdornment, codeProps, containerProps, startContainerProps, endContainerProps, clearButtonProps, spinnerProps, id, name, required, disabled: disabledProp, readOnly, className, children, "aria-disabled": ariaDisabled, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, ref, ...otherProps }: RadioGroupProps): import("react").JSX.Element;
|
|
@@ -7,9 +7,9 @@ import { type ToastSwipeDirection, type ToastViewportPosition } from "../Toast";
|
|
|
7
7
|
/** Properties of the ostack/UI root component. */
|
|
8
8
|
export interface RootProps extends ComponentProps<"div">, Pick<ErrorReportingProviderProps, "reportError" | "errorReportingUrl" | "errorReportingMethod" | "encodeErrorReport" | "encodedErrorReportMimeType" | "errorReportingOptions">, Pick<DocumentTitleProviderProps, "baseDocumentTitle"> {
|
|
9
9
|
/**
|
|
10
|
-
* Change the component to the HTML tag or custom component of the only child.
|
|
11
|
-
*
|
|
12
|
-
*
|
|
10
|
+
* Change the component to the HTML tag or custom component of the only child. This will merge the
|
|
11
|
+
* original component props with the props of the supplied element/component and change the
|
|
12
|
+
* underlying DOM node.
|
|
13
13
|
*/
|
|
14
14
|
asChild?: boolean;
|
|
15
15
|
/**
|
|
@@ -19,8 +19,8 @@ export interface RootProps extends ComponentProps<"div">, Pick<ErrorReportingPro
|
|
|
19
19
|
*/
|
|
20
20
|
prefix?: string;
|
|
21
21
|
/**
|
|
22
|
-
* Whether error reporting should be enabled. By default, error reporting is
|
|
23
|
-
*
|
|
22
|
+
* Whether error reporting should be enabled. By default, error reporting is enabled in
|
|
23
|
+
* production.
|
|
24
24
|
*/
|
|
25
25
|
enableErrorReporting?: boolean;
|
|
26
26
|
/** Uncontrolled locale to use. */
|
|
@@ -52,30 +52,27 @@ export interface RootProps extends ComponentProps<"div">, Pick<ErrorReportingPro
|
|
|
52
52
|
*/
|
|
53
53
|
portalsContainer?: Element | DocumentFragment | null;
|
|
54
54
|
/**
|
|
55
|
-
* The duration from when the pointer enters the trigger until the tooltip
|
|
56
|
-
* gets opened.
|
|
55
|
+
* The duration from when the pointer enters the trigger until the tooltip gets opened.
|
|
57
56
|
*
|
|
58
57
|
* @default 700
|
|
59
58
|
*/
|
|
60
59
|
tooltipsDelayDuration?: number;
|
|
61
60
|
/**
|
|
62
|
-
* How much time a user has to enter another trigger without incurring a delay
|
|
63
|
-
* again.
|
|
61
|
+
* How much time a user has to enter another trigger without incurring a delay again.
|
|
64
62
|
*
|
|
65
63
|
* @default 300
|
|
66
64
|
*/
|
|
67
65
|
tooltipsSkipDelayDuration?: number;
|
|
68
66
|
/**
|
|
69
|
-
* When set, trying to hover the content will result in the tooltip closing as
|
|
70
|
-
* the
|
|
67
|
+
* When set, trying to hover the content will result in the tooltip closing as the pointer leaves
|
|
68
|
+
* the trigger.
|
|
71
69
|
*
|
|
72
70
|
* @default false
|
|
73
71
|
*/
|
|
74
72
|
disableTooltipsHoverableContent?: boolean;
|
|
75
73
|
/**
|
|
76
|
-
* A label for each toast. Used to help screen-reader users associate the
|
|
77
|
-
*
|
|
78
|
-
* “Notification” is used.
|
|
74
|
+
* A label for each toast. Used to help screen-reader users associate the interruption with a
|
|
75
|
+
* toast. By default, a translated version of the word “Notification” is used.
|
|
79
76
|
*/
|
|
80
77
|
toastsLabel?: string;
|
|
81
78
|
/**
|
|
@@ -85,8 +82,8 @@ export interface RootProps extends ComponentProps<"div">, Pick<ErrorReportingPro
|
|
|
85
82
|
*/
|
|
86
83
|
toastsDuration?: number;
|
|
87
84
|
/**
|
|
88
|
-
* Direction of pointer swipe that should close the toast. Defaults to
|
|
89
|
-
* `
|
|
85
|
+
* Direction of pointer swipe that should close the toast. Defaults to `"right"` when
|
|
86
|
+
* `toastViewportPosition` is `"right"` or `"left"` otherwise.
|
|
90
87
|
*/
|
|
91
88
|
toastsSwipeDirection?: ToastSwipeDirection;
|
|
92
89
|
/**
|
|
@@ -102,17 +99,15 @@ export interface RootProps extends ComponentProps<"div">, Pick<ErrorReportingPro
|
|
|
102
99
|
*/
|
|
103
100
|
toastViewportPosition?: ToastViewportPosition;
|
|
104
101
|
/**
|
|
105
|
-
* The keys to use as the keyboard shortcut that will move focus to the toast
|
|
106
|
-
* viewport.
|
|
102
|
+
* The keys to use as the keyboard shortcut that will move focus to the toast viewport.
|
|
107
103
|
*
|
|
108
104
|
* @default ["F8"]
|
|
109
105
|
*/
|
|
110
106
|
toastViewportHotkey?: string[];
|
|
111
107
|
/**
|
|
112
|
-
* A label for the toast viewport to provide context for screen reader users
|
|
113
|
-
*
|
|
114
|
-
*
|
|
115
|
-
* “Notifications ({hotkey})” is used.
|
|
108
|
+
* A label for the toast viewport to provide context for screen reader users when navigating page
|
|
109
|
+
* landmarks. The available `{hotkey}` placeholder will be automatically replaced. By default, a
|
|
110
|
+
* translated version of “Notifications ({hotkey})” is used.
|
|
116
111
|
*/
|
|
117
112
|
toastViewportLabel?: string;
|
|
118
113
|
/** Properties to pass to the `ToastViewport` component. */
|
|
@@ -121,10 +116,9 @@ export interface RootProps extends ComponentProps<"div">, Pick<ErrorReportingPro
|
|
|
121
116
|
errorBoundaryProps?: ErrorBoundaryProps;
|
|
122
117
|
}
|
|
123
118
|
/**
|
|
124
|
-
* Root component that should wrap an ostack/UI application, exposing all
|
|
125
|
-
*
|
|
119
|
+
* Root component that should wrap an ostack/UI application, exposing all ostack/UI providers and
|
|
120
|
+
* base styles.
|
|
126
121
|
*
|
|
127
|
-
* It further wraps the whole application in an error boundary with support for
|
|
128
|
-
* error reporting.
|
|
122
|
+
* It further wraps the whole application in an error boundary with support for error reporting.
|
|
129
123
|
*/
|
|
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;
|
|
124
|
+
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: toastsSwipeDirectionProp, toastViewportHotkey, toastViewportLabel, toastViewportProps, errorBoundaryProps, ...otherProps }: RootProps): import("react").JSX.Element;
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
/** Root context. */
|
|
2
2
|
export declare const RootContext: import("react").Context<boolean>;
|
|
3
|
-
/**
|
|
4
|
-
* Hook exposing whether a component is being rendered within the `Root`
|
|
5
|
-
* component.
|
|
6
|
-
*/
|
|
3
|
+
/** Hook exposing whether a component is being rendered within the `Root` component. */
|
|
7
4
|
export declare function useIsInRoot(): boolean;
|
|
@@ -2,9 +2,9 @@ import { type CommandMenuItemProps } from "../CommandMenu";
|
|
|
2
2
|
/** Properties of the option component. */
|
|
3
3
|
export interface OptionProps extends Omit<CommandMenuItemProps, "value" | "asLink" | "onSelect" | "selected" | "icon" | "target" | "href"> {
|
|
4
4
|
/**
|
|
5
|
-
* A unique value for this item. If no value is provided, it will be inferred
|
|
6
|
-
*
|
|
7
|
-
*
|
|
5
|
+
* A unique value for this item. If no value is provided, it will be inferred from `children` or
|
|
6
|
+
* the rendered `textContent`. If your `textContent` changes between renders, you must provide a
|
|
7
|
+
* stable, unique `value`.
|
|
8
8
|
*/
|
|
9
9
|
value?: string | number;
|
|
10
10
|
}
|
|
@@ -12,15 +12,9 @@ type SelectPopoverTriggerProps = Omit<PopoverTriggerProps, "defaultValue" | "val
|
|
|
12
12
|
interface SelectPropsBase<TValue> extends SelectPopoverTriggerProps, Pick<CommandMenuProps, "searchPlaceholder" | "searchValue" | "onSearchValueChange"> {
|
|
13
13
|
/** Maximum number of options that can be selected when `multiple` is set. */
|
|
14
14
|
maxSelected?: number;
|
|
15
|
-
/**
|
|
16
|
-
* Custom validation function meant to validate the control when it is part of
|
|
17
|
-
* a `Form`.
|
|
18
|
-
*/
|
|
15
|
+
/** Custom validation function meant to validate the control when it is part of a `Form`. */
|
|
19
16
|
validate?: FormControlValidateFn<TValue>;
|
|
20
|
-
/**
|
|
21
|
-
* Specifies when the control should be validated. Defaults to the value
|
|
22
|
-
* specified in the `Form`.
|
|
23
|
-
*/
|
|
17
|
+
/** Specifies when the control should be validated. Defaults to the value specified in the `Form`. */
|
|
24
18
|
validationMode?: FormValidationMode;
|
|
25
19
|
/**
|
|
26
20
|
* Default (uncontrolled) open state of the popover.
|
|
@@ -28,10 +22,7 @@ interface SelectPropsBase<TValue> extends SelectPopoverTriggerProps, Pick<Comman
|
|
|
28
22
|
* @default false
|
|
29
23
|
*/
|
|
30
24
|
defaultOpen?: boolean;
|
|
31
|
-
/**
|
|
32
|
-
* Controlled open state of the popover. Should be used together with
|
|
33
|
-
* `onOpenChange`.
|
|
34
|
-
*/
|
|
25
|
+
/** Controlled open state of the popover. Should be used together with `onOpenChange`. */
|
|
35
26
|
open?: boolean;
|
|
36
27
|
/** Function called whenever the menu's open state changes. */
|
|
37
28
|
onOpenChange?: (open: boolean) => void;
|
|
@@ -56,9 +47,8 @@ interface SelectPropsBase<TValue> extends SelectPopoverTriggerProps, Pick<Comman
|
|
|
56
47
|
/** Label of the close button shown on each value tag. */
|
|
57
48
|
valueTagCloseButtonLabel?: ReactNode;
|
|
58
49
|
/**
|
|
59
|
-
* When `multiple` is set, this property controls the maximum width the
|
|
60
|
-
*
|
|
61
|
-
* default, selected value tags have no width limit.
|
|
50
|
+
* When `multiple` is set, this property controls the maximum width the content of a value tag
|
|
51
|
+
* representing a selected option can reach. By default, selected value tags have no width limit.
|
|
62
52
|
*/
|
|
63
53
|
valueTagMaxWidth?: CSSProperties["maxWidth"];
|
|
64
54
|
/** Properties to pass to the element holding the whole value or placeholder. */
|
|
@@ -83,18 +73,16 @@ export interface SelectMultipleProps extends Omit<ControlSelectMultipleProps, ke
|
|
|
83
73
|
/** Properties of the select component. */
|
|
84
74
|
export type SelectProps = SelectSingleProps | SelectMultipleProps;
|
|
85
75
|
/**
|
|
86
|
-
* Control which displays a menu of options for the user to pick from. Provides
|
|
87
|
-
*
|
|
88
|
-
* element](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/select)
|
|
89
|
-
*
|
|
90
|
-
* `
|
|
76
|
+
* Control which displays a menu of options for the user to pick from. Provides an alternative to
|
|
77
|
+
* the browser's [`<select>`
|
|
78
|
+
* element](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/select) while also
|
|
79
|
+
* allowing users to search for options. It is built on top of the `Input`, `Popover`, and
|
|
80
|
+
* `CommandMenu` components.
|
|
91
81
|
*
|
|
92
|
-
* It supports the selection of more than one option by setting the `multiple`
|
|
93
|
-
* property.
|
|
82
|
+
* It supports the selection of more than one option by setting the `multiple` property.
|
|
94
83
|
*
|
|
95
|
-
* For accessibility purposes, select components are usually included within a
|
|
96
|
-
*
|
|
97
|
-
* `Feedback`.
|
|
84
|
+
* For accessibility purposes, select components are usually included within a `Field` together with
|
|
85
|
+
* a `Label` and optionally `HelperText` and/or `Feedback`.
|
|
98
86
|
*
|
|
99
87
|
* It composes the following subcomponents:
|
|
100
88
|
*
|
|
@@ -117,5 +105,5 @@ export type SelectProps = SelectSingleProps | SelectMultipleProps;
|
|
|
117
105
|
* }
|
|
118
106
|
* ```
|
|
119
107
|
*/
|
|
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;
|
|
108
|
+
export declare function Select({ multiple, defaultValue, value: controlledValue, onValueChange, defaultOpen, open: controlledOpen, onOpenChange, searchPlaceholder: searchPlaceholderProp, searchValue: controlledSearchValue, onSearchValueChange, name, placeholder: placeholderProp, disabled: disabledProp, readOnly, required, maxSelected, loading, loadingDescription, variant, status: statusProp, code, startAdornment, endAdornment, showClearButton, clearDescription: clearDescriptionProp, searchLabel: searchLabelProp, optionsLabel: optionsLabelProp, loadingOptions, loadingOptionsLabel: loadingOptionsLabelProp, loadingOptionsProgress, showSpinner, emptyMessage: emptyMessageProp, valueTagCloseButtonLabel: valueTagCloseButtonLabelProp, 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;
|
|
121
109
|
export {};
|
|
@@ -12,16 +12,15 @@ export interface SeparatorProps extends ComponentProps<typeof SeparatorPrimitive
|
|
|
12
12
|
*/
|
|
13
13
|
color?: SeparatorColor;
|
|
14
14
|
/**
|
|
15
|
-
* Length of the separator. When a number is provided, each unit corresponds
|
|
16
|
-
*
|
|
15
|
+
* Length of the separator. When a number is provided, each unit corresponds to
|
|
16
|
+
* `var(--o-ui-space)`.
|
|
17
17
|
*
|
|
18
18
|
* Defaults to `"100%"` when horizontal, and `4` when vertical.
|
|
19
19
|
*/
|
|
20
20
|
length?: number | string;
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
|
-
* Component that visually or semantically separates content. Built on top of
|
|
24
|
-
* the [Radix Separator
|
|
23
|
+
* Component that visually or semantically separates content. Built on top of the [Radix Separator
|
|
25
24
|
* primitive](https://www.radix-ui.com/primitives/docs/components/separator)
|
|
26
25
|
*
|
|
27
26
|
* Example usage:
|
|
@@ -3,8 +3,5 @@ import type { FunctionComponent, ReactNode } from "react";
|
|
|
3
3
|
export interface SlottableProps {
|
|
4
4
|
children?: ReactNode;
|
|
5
5
|
}
|
|
6
|
-
/**
|
|
7
|
-
* Component that can be used a child of `Slot`, where the content shall be
|
|
8
|
-
* rendered.
|
|
9
|
-
*/
|
|
6
|
+
/** Component that can be used a child of `Slot`, where the content shall be rendered. */
|
|
10
7
|
export declare const Slottable: FunctionComponent<SlottableProps>;
|
|
@@ -6,27 +6,20 @@ export type SpinnerSize = "3xs" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2x
|
|
|
6
6
|
export type SpinnerColor = AccentColor;
|
|
7
7
|
/** Properties of the spinner component. */
|
|
8
8
|
export interface SpinnerProps extends ComponentProps<"span"> {
|
|
9
|
-
/**
|
|
10
|
-
* Size of the spinner. By default, the spinner will be sized according to the
|
|
11
|
-
* current font size.
|
|
12
|
-
*/
|
|
9
|
+
/** Size of the spinner. By default, the spinner will be sized according to the current font size. */
|
|
13
10
|
size?: SpinnerSize;
|
|
14
|
-
/**
|
|
15
|
-
* Colour of the spinner. By default, the spinner will have the current font's
|
|
16
|
-
* colour.
|
|
17
|
-
*/
|
|
11
|
+
/** Colour of the spinner. By default, the spinner will have the current font's colour. */
|
|
18
12
|
color?: SpinnerColor;
|
|
19
13
|
/**
|
|
20
14
|
* Optional accessible label for the spinner.
|
|
21
15
|
*
|
|
22
|
-
* When provided, a visually hidden label is added so that assistive
|
|
23
|
-
*
|
|
16
|
+
* When provided, a visually hidden label is added so that assistive technologies correctly
|
|
17
|
+
* announce it.
|
|
24
18
|
*/
|
|
25
19
|
label?: ReactNode;
|
|
26
20
|
}
|
|
27
21
|
/**
|
|
28
|
-
* The spinner component provides a visual cue that an action is currently being
|
|
29
|
-
* processed.
|
|
22
|
+
* The spinner component provides a visual cue that an action is currently being processed.
|
|
30
23
|
*
|
|
31
24
|
* Example usage:
|
|
32
25
|
*
|
|
@@ -7,9 +7,9 @@ export type StackWrap = boolean | "reverse";
|
|
|
7
7
|
/** Properties of the stack component. */
|
|
8
8
|
export interface StackProps extends ComponentProps<"div"> {
|
|
9
9
|
/**
|
|
10
|
-
* Change the component to the HTML tag or custom component of the only child.
|
|
11
|
-
*
|
|
12
|
-
*
|
|
10
|
+
* Change the component to the HTML tag or custom component of the only child. This will merge the
|
|
11
|
+
* original component props with the props of the supplied element/component and change the
|
|
12
|
+
* underlying DOM node.
|
|
13
13
|
*/
|
|
14
14
|
asChild?: boolean;
|
|
15
15
|
/**
|
|
@@ -19,8 +19,7 @@ export interface StackProps extends ComponentProps<"div"> {
|
|
|
19
19
|
*/
|
|
20
20
|
direction?: Responsive<StackDirection>;
|
|
21
21
|
/**
|
|
22
|
-
* Spacing between items. When a number is provided, each unit corresponds to
|
|
23
|
-
* `var(--o-ui-space)`.
|
|
22
|
+
* Spacing between items. When a number is provided, each unit corresponds to `var(--o-ui-space)`.
|
|
24
23
|
*
|
|
25
24
|
* @default 5
|
|
26
25
|
*/
|
|
@@ -33,17 +32,14 @@ export interface StackProps extends ComponentProps<"div"> {
|
|
|
33
32
|
wrap?: Responsive<StackWrap>;
|
|
34
33
|
}
|
|
35
34
|
/**
|
|
36
|
-
* The stack component manages the layout of immediate children along the
|
|
37
|
-
*
|
|
38
|
-
* each child.
|
|
35
|
+
* The stack component manages the layout of immediate children along the vertical or horizontal
|
|
36
|
+
* axis with optional spacing and/or dividers between each child.
|
|
39
37
|
*
|
|
40
38
|
* It uses a flex display together with a variant of the [lobotomised
|
|
41
|
-
* owl](https://css-tricks.com/lobotomized-owls/) selector (`* + *`) for
|
|
42
|
-
* spacing.
|
|
39
|
+
* owl](https://css-tricks.com/lobotomized-owls/) selector (`* + *`) for spacing.
|
|
43
40
|
*
|
|
44
|
-
* The stack component is mostly concerned with one-dimension layouts. For
|
|
45
|
-
*
|
|
46
|
-
* component](/docs/ostack-ui-layout-grid--docs) instead.
|
|
41
|
+
* The stack component is mostly concerned with one-dimension layouts. For two-dimensional layouts,
|
|
42
|
+
* you might prefer to use the [`Grid` component](/docs/ostack-ui-layout-grid--docs) instead.
|
|
47
43
|
*
|
|
48
44
|
* Example usage:
|
|
49
45
|
*
|
|
@@ -5,16 +5,16 @@ import { type LabelProps } from "../Label";
|
|
|
5
5
|
/** Properties of the step component. */
|
|
6
6
|
export interface StepProps extends ComponentProps<"li">, Pick<ButtonProps, "variant" | "disabled" | "loading" | "showSpinner" | "spinnerProps"> {
|
|
7
7
|
/**
|
|
8
|
-
* Change the component to the HTML tag or custom component of the only child.
|
|
9
|
-
*
|
|
10
|
-
*
|
|
8
|
+
* Change the component to the HTML tag or custom component of the only child. This will merge the
|
|
9
|
+
* original component props with the props of the supplied element/component and change the
|
|
10
|
+
* underlying DOM node.
|
|
11
11
|
*/
|
|
12
12
|
asChild?: boolean;
|
|
13
13
|
/** Index of the step. */
|
|
14
14
|
index?: number;
|
|
15
15
|
/**
|
|
16
|
-
* Whether the step is completed. By default, a step is marked as completed if
|
|
17
|
-
*
|
|
16
|
+
* Whether the step is completed. By default, a step is marked as completed if its index is less
|
|
17
|
+
* than the currently active step.
|
|
18
18
|
*/
|
|
19
19
|
completed?: boolean;
|
|
20
20
|
/** Status of the step. */
|
|
@@ -29,4 +29,4 @@ export interface StepProps extends ComponentProps<"li">, Pick<ButtonProps, "vari
|
|
|
29
29
|
labelProps?: Omit<LabelProps, "htmlFor">;
|
|
30
30
|
}
|
|
31
31
|
/** Step trigger component. */
|
|
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;
|
|
32
|
+
export declare function Step({ asChild, index, completed, status, stepNumberLabel: stepNumberLabelProp, completedLabel: completedLabelProp, variant, disabled, loading, showSpinner, className, children, buttonProps, labelProps, ...otherProps }: StepProps): import("react").JSX.Element;
|
|
@@ -2,9 +2,9 @@ import { type ComponentProps } from "react";
|
|
|
2
2
|
/** Properties of the step content component. */
|
|
3
3
|
export interface StepContentProps extends ComponentProps<"div"> {
|
|
4
4
|
/**
|
|
5
|
-
* Change the component to the HTML tag or custom component of the only child.
|
|
6
|
-
*
|
|
7
|
-
*
|
|
5
|
+
* Change the component to the HTML tag or custom component of the only child. This will merge the
|
|
6
|
+
* original component props with the props of the supplied element/component and change the
|
|
7
|
+
* underlying DOM node.
|
|
8
8
|
*/
|
|
9
9
|
asChild?: boolean;
|
|
10
10
|
/** Index of the step that corresponds to this content. */
|