@ostack.tech/ui 1.2.0-beta.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/en-DGLb7rrz.js.map +1 -1
- package/dist/locales/fr-FR.js.map +1 -1
- package/dist/locales/pt-PT.js.map +1 -1
- package/dist/ostack-ui.css +8 -16
- package/dist/ostack-ui.js +26835 -7981
- package/dist/ostack-ui.js.map +1 -1
- package/package.json +15 -13
- package/scss/components/Button/_Button.scss +4 -18
- package/scss/components/ButtonGroup/_ButtonGroup.scss +2 -6
- package/scss/components/Calendar/_Calendar-variables.scss +4 -12
- package/scss/components/Calendar/_Calendar.scss +19 -38
- package/scss/components/Card/_Card-variables.scss +4 -12
- package/scss/components/Card/_Card.scss +8 -28
- package/scss/components/Collapsible/_Collapsible.scss +2 -8
- package/scss/components/CommandMenu/_CommandMenu-variables.scss +2 -6
- package/scss/components/CommandMenu/_CommandMenu.scss +5 -13
- package/scss/components/ControlAddon/_ControlAddon-variables.scss +4 -12
- package/scss/components/ControlAddon/_ControlAddon.scss +16 -52
- package/scss/components/DataTable/_DataTable.scss +1 -2
- package/scss/components/DateRangeInput/_DateRangeInput-variables.scss +1 -3
- package/scss/components/DateRangeInput/_DateRangeInput.scss +7 -21
- package/scss/components/Dialog/_Dialog.scss +6 -19
- package/scss/components/DropdownMenu/_DropdownMenu.scss +1 -2
- package/scss/components/Feedback/_Feedback-variables.scss +1 -6
- package/scss/components/Feedback/_Feedback.scss +8 -33
- package/scss/components/FieldGroup/_FieldGroup.scss +1 -4
- package/scss/components/Grid/_Grid.scss +4 -12
- package/scss/components/HelperText/_HelperText.scss +1 -4
- package/scss/components/Input/_Input.scss +11 -32
- package/scss/components/Label/_Label.scss +2 -6
- package/scss/components/Link/_Link.scss +1 -2
- package/scss/components/MenuList/_MenuList.scss +2 -6
- package/scss/components/Overlay/_Overlay-variables.scss +1 -3
- package/scss/components/Overlay/_Overlay.scss +2 -4
- package/scss/components/Root/_Root.scss +4 -16
- package/scss/components/Select/_Select-variables.scss +4 -12
- package/scss/components/Select/_Select.scss +1 -2
- package/scss/components/Separator/_Separator.scss +2 -8
- package/scss/components/Spinner/_Spinner.scss +2 -8
- package/scss/components/Stepper/_Stepper-variables.scss +5 -15
- package/scss/components/Stepper/_Stepper.scss +2 -5
- package/scss/components/Table/_Table-variables.scss +16 -47
- package/scss/components/Table/_Table.scss +30 -112
- package/scss/components/Tabs/_Tabs-variables.scss +15 -43
- package/scss/components/Tabs/_Tabs.scss +13 -46
- package/scss/components/Tag/_Tag-variables.scss +1 -4
- package/scss/components/Tag/_Tag.scss +5 -14
- package/scss/components/Toast/_Toast.scss +3 -8
- package/scss/components/Tooltip/_Tooltip-variables.scss +1 -3
- package/scss/components/Tooltip/_Tooltip.scss +4 -12
- package/scss/scss/_base-variables.scss +6 -7
- package/scss/scss/placeholders/button/_button.scss +2 -8
- package/scss/scss/placeholders/checkable/_checkable.scss +15 -60
- package/scss/scss/placeholders/control/_control-variables.scss +3 -10
- package/scss/scss/placeholders/control/_control.scss +10 -38
- package/scss/scss/placeholders/menu/_menu-variables.scss +14 -42
- package/scss/scss/placeholders/menu/_menu.scss +22 -82
- package/scss/scss/placeholders/notification/_notification.scss +2 -4
- package/scss/scss/placeholders/popover/_popover-variables.scss +1 -3
- package/scss/scss/placeholders/popover/_popover.scss +4 -11
- package/scss/scss/utils/_breakpoints.scss +1 -4
- package/scss/scss/utils/_responsive-values.scss +2 -5
- package/scss/scss/utils/_spinner.scss +1 -2
- package/types/components/Actions/Action.d.ts +6 -6
- package/types/components/Actions/ActionGroup.d.ts +10 -14
- package/types/components/Actions/ActionMenu.d.ts +13 -17
- package/types/components/Actions/ActionSplit.d.ts +4 -4
- package/types/components/Actions/Actions.d.ts +20 -25
- package/types/components/Actions/ActionsSecondary.d.ts +1 -1
- package/types/components/Alert/Alert.d.ts +8 -9
- package/types/components/Alert/AlertTitle.d.ts +3 -3
- package/types/components/AlertDialog/AlertDialog.d.ts +16 -20
- package/types/components/AlertDialog/AlertDialogAction.d.ts +2 -2
- package/types/components/AlertDialog/AlertDialogCancel.d.ts +2 -2
- package/types/components/AlertDialog/AlertDialogContent.d.ts +2 -3
- package/types/components/AlertDialog/AlertDialogDescription.d.ts +4 -5
- package/types/components/Button/Button.d.ts +32 -39
- package/types/components/ButtonGroup/ButtonGroup.d.ts +3 -3
- package/types/components/Calendar/Calendar.d.ts +2 -3
- package/types/components/Calendar/CalendarDay.d.ts +3 -4
- package/types/components/Calendar/CalendarHeader.d.ts +2 -2
- package/types/components/Card/Card.d.ts +6 -13
- package/types/components/Card/CardBody.d.ts +3 -3
- package/types/components/Card/CardFooter.d.ts +3 -3
- package/types/components/Card/CardHeader.d.ts +3 -3
- package/types/components/Card/CardTitle.d.ts +3 -3
- package/types/components/Checkbox/Checkbox.d.ts +17 -29
- package/types/components/CheckboxGroup/CheckboxGroup.d.ts +24 -38
- package/types/components/CheckboxGroup/CheckboxGroupContext.d.ts +5 -6
- package/types/components/CloseButton/CloseButton.d.ts +1 -1
- package/types/components/Code/Code.d.ts +4 -5
- package/types/components/Collapsible/Collapsible.d.ts +3 -9
- package/types/components/Collapsible/CollapsibleTrigger.d.ts +1 -4
- package/types/components/CommandMenu/CommandMenu.d.ts +6 -7
- package/types/components/CommandMenu/CommandMenuDialog.d.ts +6 -10
- package/types/components/CommandMenu/CommandMenuItem.d.ts +3 -3
- package/types/components/CommandMenu/cmdk/index.d.ts +73 -112
- package/types/components/Container/Container.d.ts +17 -21
- package/types/components/Control/Control.d.ts +21 -27
- package/types/components/Control/ControlWithContainerRef.d.ts +5 -6
- package/types/components/ControlAddon/ControlAddon.d.ts +9 -13
- package/types/components/ControlCode/ControlCode.d.ts +5 -8
- package/types/components/DataTable/DataTable.d.ts +59 -90
- package/types/components/DataTable/DataTableApi.d.ts +11 -12
- package/types/components/DataTable/DataTableColumn.d.ts +18 -21
- package/types/components/DataTable/DataTableColumnGroup.d.ts +3 -4
- package/types/components/DataTable/DataTableColumns.d.ts +4 -4
- package/types/components/DataTable/DataTableContent.d.ts +2 -5
- package/types/components/DataTable/DataTableEmptyOrLoadingRows.d.ts +1 -4
- package/types/components/DataTable/DataTableFilter.d.ts +3 -3
- package/types/components/DataTable/DataTablePagination.d.ts +5 -9
- package/types/components/DataTable/DataTableRowsPerPage.d.ts +4 -5
- package/types/components/DataTable/DataTableSelectionTrigger.d.ts +5 -11
- package/types/components/DataTable/PagedDataTablePagination.d.ts +1 -1
- package/types/components/DataTable/PagedDataTableRows.d.ts +1 -1
- package/types/components/DataTable/ScrolledDataTableRows.d.ts +1 -1
- package/types/components/DataTable/index.d.ts +1 -1
- package/types/components/DataTable/{getRowKey.d.ts → keyUtils.d.ts} +2 -0
- package/types/components/DataTable/spliceWindow.d.ts +3 -4
- package/types/components/DateInput/DateInput.d.ts +21 -34
- package/types/components/DateRangeInput/DateRangeInput.d.ts +41 -70
- package/types/components/DescriptionList/DescriptionList.d.ts +5 -10
- package/types/components/Dialog/Dialog.d.ts +9 -11
- package/types/components/Dialog/DialogContent.d.ts +3 -4
- package/types/components/Dialog/DialogDescription.d.ts +2 -3
- package/types/components/DropdownMenu/DropdownMenu.d.ts +10 -21
- package/types/components/DropdownMenu/DropdownMenuCheckboxItem.d.ts +1 -1
- package/types/components/DropdownMenu/DropdownMenuItem.d.ts +3 -3
- package/types/components/DropdownMenu/DropdownMenuRadioItem.d.ts +1 -1
- package/types/components/DropdownMenu/DropdownMenuSubContent.d.ts +1 -4
- package/types/components/DropdownMenu/DropdownMenuSubTrigger.d.ts +1 -4
- package/types/components/ErrorBoundary/ErrorBoundary.d.ts +21 -27
- package/types/components/Feedback/Feedback.d.ts +6 -6
- package/types/components/Feedback/FeedbackPopover.d.ts +3 -3
- package/types/components/Feedback/FeedbackProvider.d.ts +3 -4
- package/types/components/Feedback/feedbackUtils.d.ts +5 -8
- package/types/components/Field/Field.d.ts +9 -11
- package/types/components/Field/fieldUtils.d.ts +2 -2
- package/types/components/FieldGroup/FieldGroup.d.ts +4 -5
- package/types/components/FieldGroup/FieldGroupBody.d.ts +3 -3
- package/types/components/FieldGroup/FieldGroupHeader.d.ts +4 -4
- package/types/components/FieldGroup/FieldGroupTitle.d.ts +3 -3
- package/types/components/Form/Form.d.ts +25 -40
- package/types/components/Form/FormContext.d.ts +2 -2
- package/types/components/Form/FormError.d.ts +6 -11
- package/types/components/Form/FormState.d.ts +2 -2
- package/types/components/Form/formUtils.d.ts +1 -1
- package/types/components/Form/useRegisterFormControl.d.ts +1 -1
- package/types/components/Grid/Grid.d.ts +19 -24
- package/types/components/Heading/Heading.d.ts +9 -10
- package/types/components/HelperText/HelperText.d.ts +3 -3
- package/types/components/HelperText/HelperTextProvider.d.ts +3 -4
- package/types/components/Icon/Icon.d.ts +9 -16
- package/types/components/IconButton/IconButton.d.ts +35 -53
- package/types/components/Input/Input.d.ts +5 -12
- package/types/components/Keybinds/KeyPress.d.ts +1 -1
- package/types/components/Keybinds/Keybind.d.ts +1 -1
- package/types/components/Keybinds/Keybinds.d.ts +3 -9
- package/types/components/Keyboard/Keyboard.d.ts +7 -8
- package/types/components/Label/Label.d.ts +5 -6
- package/types/components/Label/LabelProvider.d.ts +3 -4
- package/types/components/Label/labelUtils.d.ts +2 -2
- package/types/components/Layer/Layer.d.ts +4 -4
- package/types/components/Link/Link.d.ts +13 -13
- package/types/components/Mark/Mark.d.ts +6 -7
- package/types/components/MenuList/MenuList.d.ts +6 -7
- package/types/components/MenuList/MenuListGroup.d.ts +5 -6
- package/types/components/MenuList/MenuListItem.d.ts +21 -25
- package/types/components/NumericInput/NumericInput.d.ts +20 -34
- package/types/components/NumericInput/numericInputUtils.d.ts +4 -5
- package/types/components/Output/Output.d.ts +12 -13
- package/types/components/Popover/Popover.d.ts +6 -13
- package/types/components/Popover/PopoverAnchor.d.ts +2 -2
- package/types/components/Popover/PopoverTrigger.d.ts +2 -2
- package/types/components/Portal/Portal.d.ts +3 -4
- package/types/components/Printer/Printer.d.ts +40 -54
- package/types/components/Printer/PrinterContent.d.ts +6 -6
- package/types/components/Printer/PrinterContentContext.d.ts +4 -5
- package/types/components/Printer/PrinterContext.d.ts +4 -4
- package/types/components/Printer/PrinterTrigger.d.ts +5 -6
- package/types/components/Printer/index.d.ts +1 -1
- package/types/components/RadioGroup/Radio.d.ts +10 -13
- package/types/components/RadioGroup/RadioGroup.d.ts +21 -34
- package/types/components/Root/Root.d.ts +21 -27
- package/types/components/Root/RootContext.d.ts +1 -4
- package/types/components/Select/Option.d.ts +3 -3
- package/types/components/Select/Select.d.ts +14 -26
- package/types/components/Select/SelectNative.d.ts +1 -1
- package/types/components/Separator/Separator.d.ts +3 -4
- package/types/components/Slot/Slottable.d.ts +1 -4
- package/types/components/Spinner/Spinner.d.ts +5 -12
- package/types/components/Stack/Stack.d.ts +9 -13
- package/types/components/Stepper/Step.d.ts +6 -6
- package/types/components/Stepper/StepContent.d.ts +3 -3
- package/types/components/Stepper/StepList.d.ts +4 -5
- package/types/components/Stepper/Stepper.d.ts +4 -5
- package/types/components/Stepper/StepperFinishTrigger.d.ts +3 -9
- package/types/components/Stepper/StepperNextTrigger.d.ts +3 -6
- package/types/components/Stepper/StepperPreviousTrigger.d.ts +4 -10
- package/types/components/Table/Table.d.ts +42 -58
- package/types/components/Table/TableCell.d.ts +15 -19
- package/types/components/Table/TableColumn.d.ts +15 -27
- package/types/components/Table/TableColumnGroup.d.ts +2 -3
- package/types/components/Table/TableHead.d.ts +5 -5
- package/types/components/Tabs/TabContent.d.ts +2 -2
- package/types/components/Tabs/TabList.d.ts +1 -1
- package/types/components/Tabs/Tabs.d.ts +4 -8
- package/types/components/Tag/Tag.d.ts +8 -8
- package/types/components/TextArea/TextArea.d.ts +7 -13
- package/types/components/Toast/Toast.d.ts +25 -38
- package/types/components/Toast/ToastProvider.d.ts +2 -5
- package/types/components/Toast/ToastViewport.d.ts +2 -5
- package/types/components/Tooltip/Tooltip.d.ts +11 -11
- package/types/components/VisuallyHidden/VisuallyHidden.d.ts +7 -11
- package/types/index.d.ts +2 -1
- package/types/providers/AlertDialogProvider/AlertDialogProviderContext.d.ts +17 -19
- package/types/providers/AlertDialogProvider/useAlertDialog.d.ts +50 -58
- package/types/providers/DocumentTitleProvider/DocumentTitle.d.ts +1 -4
- package/types/providers/ErrorReportingProvider/ErrorReport.d.ts +4 -7
- package/types/providers/ErrorReportingProvider/ErrorReportingProvider.d.ts +12 -17
- package/types/providers/LocalizationProvider/useLocale.d.ts +1 -4
- package/types/providers/PrefixProvider/defaultPrefix.d.ts +2 -3
- package/types/providers/PrefixProvider/usePrefix.d.ts +3 -6
- package/types/providers/ToastManagerProvider/ToastManagerContext.d.ts +3 -3
- package/types/providers/ToastManagerProvider/useToastManager.d.ts +11 -14
- package/types/utils/__tests__/useCombinedRef.test.d.ts +1 -0
- package/types/utils/breakpoints.d.ts +5 -6
- package/types/utils/combineAriaIds.d.ts +1 -1
- package/types/utils/cx.d.ts +2 -5
- package/types/utils/filtering.d.ts +2 -2
- package/types/utils/keyboardShortcut.d.ts +18 -25
- package/types/utils/navigate.d.ts +2 -2
- package/types/utils/numericStringUtils.d.ts +6 -13
- package/types/utils/parseChildren.d.ts +5 -9
- package/types/utils/reactCompilerUtils.d.ts +7 -0
- package/types/utils/setNativeProperty.d.ts +2 -3
- package/types/utils/sorting.d.ts +2 -2
- package/types/utils/useCombinedEventHandler.d.ts +30 -0
- package/types/utils/useCombinedRef.d.ts +6 -4
- package/types/utils/useCssVars.d.ts +9 -20
- package/types/utils/useDateTransformer.d.ts +4 -8
- package/types/utils/useIntersectionObserver.d.ts +2 -5
- package/types/utils/useLatestRef.d.ts +1 -2
- package/types/utils/useLocation.d.ts +5 -8
- package/types/utils/useMeasure.d.ts +2 -5
- package/types/utils/useMediaQuery.d.ts +1 -4
- package/types/utils/useNumericTransformer.d.ts +12 -19
- package/types/utils/usePrevious.d.ts +3 -4
- package/types/utils/useResponsiveValues.d.ts +7 -10
- package/types/utils/useScrollPosition.d.ts +1 -6
- package/types/utils/useSearchParam.d.ts +2 -6
- package/types/utils/useSearchParams.d.ts +1 -4
- package/types/utils/useSpacing.d.ts +1 -4
- package/types/utils/zustandUtils.d.ts +3 -2
- package/types/utils/combineEventHandlers.d.ts +0 -24
- /package/types/utils/__tests__/{combineEventHandlers.test.d.ts → useCombinedEventHandler.test.d.ts} +0 -0
|
@@ -11,35 +11,33 @@ export type ActionsGroup = boolean | ActionsSecondaryLayout;
|
|
|
11
11
|
/** Properties of the actions component. */
|
|
12
12
|
export interface ActionsProps extends Omit<StackProps, "direction" | "divider" | "wrap"> {
|
|
13
13
|
/**
|
|
14
|
-
* Layout of primary actions. An array of layouts indicates the allowed
|
|
15
|
-
*
|
|
14
|
+
* Layout of primary actions. An array of layouts indicates the allowed layouts for primary
|
|
15
|
+
* actions, which change according to available space.
|
|
16
16
|
*
|
|
17
|
-
* The layout of primary actions is only ever changed if all secondary layouts
|
|
18
|
-
*
|
|
17
|
+
* The layout of primary actions is only ever changed if all secondary layouts have been exhausted
|
|
18
|
+
* and the actions still do not fit in their container.
|
|
19
19
|
*
|
|
20
20
|
* @default "horizontal"
|
|
21
21
|
*/
|
|
22
22
|
primaryLayout?: Responsive<ActionsPrimaryLayout | ActionsPrimaryLayout[]>;
|
|
23
23
|
/**
|
|
24
|
-
* Layout of secondary actions. An array of layouts indicates the allowed
|
|
25
|
-
*
|
|
24
|
+
* Layout of secondary actions. An array of layouts indicates the allowed layouts for secondary
|
|
25
|
+
* actions, which change according to available space.
|
|
26
26
|
*
|
|
27
|
-
* The layout of secondary actions is always changed prior to that of primary
|
|
28
|
-
* actions.
|
|
27
|
+
* The layout of secondary actions is always changed prior to that of primary actions.
|
|
29
28
|
*
|
|
30
29
|
* @default ["horizontal", "dropdown"]
|
|
31
30
|
*/
|
|
32
31
|
secondaryLayout?: Responsive<ActionsSecondaryLayout | ActionsSecondaryLayout[]>;
|
|
33
32
|
/**
|
|
34
|
-
* Whether to group all actions in a `ButtonGroup`. It can take either a
|
|
35
|
-
*
|
|
33
|
+
* Whether to group all actions in a `ButtonGroup`. It can take either a boolean or a type of
|
|
34
|
+
* secondary layout.
|
|
36
35
|
*
|
|
37
|
-
* If a secondary layout is provided, then the buttons will be grouped
|
|
38
|
-
*
|
|
39
|
-
* provided layout.
|
|
36
|
+
* If a secondary layout is provided, then the buttons will be grouped whenever the secondary
|
|
37
|
+
* layout of the actions is smaller or equal than the provided layout.
|
|
40
38
|
*
|
|
41
|
-
* E.g. if `"icon"` is provided, then the actions will be grouped when the
|
|
42
|
-
*
|
|
39
|
+
* E.g. if `"icon"` is provided, then the actions will be grouped when the secondary layout is
|
|
40
|
+
* `"icon"` or `"dropdown"`.
|
|
43
41
|
*
|
|
44
42
|
* @default "dropdown"
|
|
45
43
|
*/
|
|
@@ -48,23 +46,20 @@ export interface ActionsProps extends Omit<StackProps, "direction" | "divider" |
|
|
|
48
46
|
containerProps?: ComponentProps<"div">;
|
|
49
47
|
}
|
|
50
48
|
/**
|
|
51
|
-
* The actions component provides a way of defining a set of actions whose
|
|
52
|
-
*
|
|
49
|
+
* The actions component provides a way of defining a set of actions whose layout scales according
|
|
50
|
+
* to available space.
|
|
53
51
|
*
|
|
54
52
|
* It composes the following subcomponents:
|
|
55
53
|
*
|
|
56
54
|
* - `ActionsSecondary`: A wrapper for defining secondary actions.
|
|
57
55
|
* - `Action`: A single action.
|
|
58
56
|
* - `ActionGroup`: Used to group related actions.
|
|
59
|
-
* - `ActionSplit`: A split action consisting of a main action, together with an
|
|
60
|
-
*
|
|
61
|
-
* - `ActionMenu`: An action which triggers dropdown menu containing other actions
|
|
62
|
-
*
|
|
63
|
-
* - `ActionMenuCheckboxItem`: A menu item that can be controlled and rendered
|
|
64
|
-
* like a checkbox.
|
|
57
|
+
* - `ActionSplit`: A split action consisting of a main action, together with an action menu
|
|
58
|
+
* containing other related actions.
|
|
59
|
+
* - `ActionMenu`: An action which triggers dropdown menu containing other actions or menu items.
|
|
60
|
+
* - `ActionMenuCheckboxItem`: A menu item that can be controlled and rendered like a checkbox.
|
|
65
61
|
* - `ActionMenuRadioGroup`: Used to group multiple radio items.
|
|
66
|
-
* - `ActionMenuRadioItem`: A menu item that can be controlled and rendered like a
|
|
67
|
-
* radio.
|
|
62
|
+
* - `ActionMenuRadioItem`: A menu item that can be controlled and rendered like a radio.
|
|
68
63
|
*
|
|
69
64
|
* Example usage:
|
|
70
65
|
*
|
|
@@ -3,4 +3,4 @@ import { type ActionMenuProps } from "./ActionMenu.tsx";
|
|
|
3
3
|
export interface ActionsSecondaryProps extends Omit<Partial<ActionMenuProps>, "collapsedLayout" | "dropdownMenuGroupProps" | "dropdownMenuSubProps" | "dropdownMenuSubTriggerProps" | "dropdownMenuSubContentProps"> {
|
|
4
4
|
}
|
|
5
5
|
/** Container for secondary actions. */
|
|
6
|
-
export declare function ActionsSecondary({ label, children, ...otherProps }: ActionsSecondaryProps): import("react").JSX.Element;
|
|
6
|
+
export declare function ActionsSecondary({ label: labelProp, children, ...otherProps }: ActionsSecondaryProps): import("react").JSX.Element;
|
|
@@ -26,13 +26,12 @@ export interface AlertProps extends ComponentProps<"div"> {
|
|
|
26
26
|
* Controls how the alert is announced to screen reader users:
|
|
27
27
|
*
|
|
28
28
|
* - `off`: The alert is silent. Recommended for static messages.
|
|
29
|
-
* - `polite`: Sets `role="status"`. The screen reader will announce the alert
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
* errors that appear and should stop the user's flow).
|
|
29
|
+
* - `polite`: Sets `role="status"`. The screen reader will announce the alert at the next available
|
|
30
|
+
* opportunity without interrupting the user (recommended for non-critical feedback that appears
|
|
31
|
+
* _after_ a user action).
|
|
32
|
+
* - `assertive`: Sets `role="alert"`. The screen reader will interrupt any current speech to
|
|
33
|
+
* announce this immediately (recommended for critical errors that appear and should stop the
|
|
34
|
+
* user's flow).
|
|
36
35
|
*
|
|
37
36
|
* @default "off"
|
|
38
37
|
*/
|
|
@@ -46,8 +45,8 @@ export interface AlertProps extends ComponentProps<"div"> {
|
|
|
46
45
|
*/
|
|
47
46
|
defaultOpen?: boolean;
|
|
48
47
|
/**
|
|
49
|
-
* Property controlling whether the alert should be open. Use together with
|
|
50
|
-
*
|
|
48
|
+
* Property controlling whether the alert should be open. Use together with `onOpenChange` to
|
|
49
|
+
* control the alert's open state.
|
|
51
50
|
*/
|
|
52
51
|
open?: boolean;
|
|
53
52
|
/** Function called when the open state changes. */
|
|
@@ -6,9 +6,9 @@ export type AlertTitleProps<TAs extends AlertTitleAs = "div"> = PolymorphicProps
|
|
|
6
6
|
/** Own properties of the alert title component. */
|
|
7
7
|
export interface AlertTitleOwnProps {
|
|
8
8
|
/**
|
|
9
|
-
* Change the component to the HTML tag or custom component of the only child.
|
|
10
|
-
*
|
|
11
|
-
*
|
|
9
|
+
* Change the component to the HTML tag or custom component of the only child. This will merge the
|
|
10
|
+
* original component props with the props of the supplied element/component and change the
|
|
11
|
+
* underlying DOM node.
|
|
12
12
|
*/
|
|
13
13
|
asChild?: boolean;
|
|
14
14
|
}
|
|
@@ -4,34 +4,31 @@ import type { ComponentProps } from "react";
|
|
|
4
4
|
export interface AlertDialogProps extends ComponentProps<typeof AlertDialogPrimitive.Root> {
|
|
5
5
|
}
|
|
6
6
|
/**
|
|
7
|
-
* The alert dialog component displays an important overlaid “window” to the
|
|
8
|
-
*
|
|
7
|
+
* The alert dialog component displays an important overlaid “window” to the user and expects a
|
|
8
|
+
* response.
|
|
9
9
|
*
|
|
10
10
|
* Built on top of the [Radix Alert Dialog
|
|
11
|
-
* primitive](https://www.radix-ui.com/primitives/docs/components/alert-dialog),
|
|
12
|
-
*
|
|
11
|
+
* primitive](https://www.radix-ui.com/primitives/docs/components/alert-dialog), and the [`Card`
|
|
12
|
+
* component](/docs/ostack-ui-data-display-card--docs).
|
|
13
13
|
*
|
|
14
14
|
* It composes the following subcomponents:
|
|
15
15
|
*
|
|
16
16
|
* - `AlertDialogTrigger`: The button which, when pressed, opens the alert dialog.
|
|
17
17
|
* - `AlertDialogContent`: Content to display when the alert dialog is open.
|
|
18
18
|
* - `AlertDialogHeader`: Header section of the alert dialog.
|
|
19
|
-
* - `AlertDialogTitle`: An accessible title to be announced when the alert dialog
|
|
20
|
-
* is opened.
|
|
19
|
+
* - `AlertDialogTitle`: An accessible title to be announced when the alert dialog is opened.
|
|
21
20
|
* - `AlertDialogBody`: Body section of the alert dialog.
|
|
22
|
-
* - `AlertDialogDescription`: An optional accessible description to be announced
|
|
23
|
-
*
|
|
21
|
+
* - `AlertDialogDescription`: An optional accessible description to be announced when the alert
|
|
22
|
+
* dialog is opened.
|
|
24
23
|
*
|
|
25
|
-
* To hide the description, wrap it within `<VisuallyHidden asChild>`. To remove
|
|
26
|
-
*
|
|
27
|
-
*
|
|
24
|
+
* To hide the description, wrap it within `<VisuallyHidden asChild>`. To remove the description
|
|
25
|
+
* entirely, pass `aria-describedby={undefined}` to the `AlertDialogContent` and omit this
|
|
26
|
+
* component.
|
|
28
27
|
* - `AlertDialogFooter`: Footer section of the alert dialog.
|
|
29
|
-
* - `AlertDialogCancel`: A button which closes the alert dialog by cancelling the
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
* action. These buttons should be distinguished visually from
|
|
34
|
-
* `AlertDialogCancel` buttons.
|
|
28
|
+
* - `AlertDialogCancel`: A button which closes the alert dialog by cancelling the action. These
|
|
29
|
+
* buttons should be distinguished visually from `AlertDialogAction` buttons.
|
|
30
|
+
* - `AlertDialogAction`: A button which closes the alert dialog by accepting the action. These
|
|
31
|
+
* buttons should be distinguished visually from `AlertDialogCancel` buttons.
|
|
35
32
|
*
|
|
36
33
|
* Example usage:
|
|
37
34
|
*
|
|
@@ -83,8 +80,7 @@ export interface AlertDialogProps extends ComponentProps<typeof AlertDialogPrimi
|
|
|
83
80
|
* ```
|
|
84
81
|
*
|
|
85
82
|
* > **Note:** In many scenarios you might prefer to use the [`useAlertDialog`
|
|
86
|
-
* > hook](/docs/ostack-ui-overlay-alert-dialog--docs#usealertdialog-hook)
|
|
87
|
-
* >
|
|
88
|
-
* > or “prompt” dialogs.
|
|
83
|
+
* > hook](/docs/ostack-ui-overlay-alert-dialog--docs#usealertdialog-hook) instead, which provides an
|
|
84
|
+
* > imperative API for triggering “alert”, “confirm”, or “prompt” dialogs.
|
|
89
85
|
*/
|
|
90
86
|
export declare const AlertDialog: import("react").FC<AlertDialogPrimitive.AlertDialogProps>;
|
|
@@ -4,7 +4,7 @@ import type { ComponentProps } from "react";
|
|
|
4
4
|
export interface AlertDialogActionProps extends Omit<ComponentProps<typeof AlertDialogPrimitive.Action>, "asChild"> {
|
|
5
5
|
}
|
|
6
6
|
/**
|
|
7
|
-
* Button which closes the alert dialog by accepting the action. These buttons
|
|
8
|
-
*
|
|
7
|
+
* Button which closes the alert dialog by accepting the action. These buttons should be
|
|
8
|
+
* distinguished visually from `AlertDialogCancel` buttons.
|
|
9
9
|
*/
|
|
10
10
|
export declare function AlertDialogAction(props: AlertDialogActionProps): import("react").JSX.Element;
|
|
@@ -4,7 +4,7 @@ import type { ComponentProps } from "react";
|
|
|
4
4
|
export interface AlertDialogCancelProps extends Omit<ComponentProps<typeof AlertDialogPrimitive.Cancel>, "asChild"> {
|
|
5
5
|
}
|
|
6
6
|
/**
|
|
7
|
-
* Button which closes the alert dialog by cancelling the action. These buttons
|
|
8
|
-
*
|
|
7
|
+
* Button which closes the alert dialog by cancelling the action. These buttons should be
|
|
8
|
+
* distinguished visually from `AlertDialogAction` buttons.
|
|
9
9
|
*/
|
|
10
10
|
export declare function AlertDialogCancel(props: AlertDialogCancelProps): import("react").JSX.Element;
|
|
@@ -17,9 +17,8 @@ export interface AlertDialogContentProps extends ComponentProps<typeof AlertDial
|
|
|
17
17
|
*/
|
|
18
18
|
variant?: AlertDialogContentVariant;
|
|
19
19
|
/**
|
|
20
|
-
* Whether sections should be merged together, as opposed to them being
|
|
21
|
-
*
|
|
22
|
-
* border or solid background colour.
|
|
20
|
+
* Whether sections should be merged together, as opposed to them being clearly delimited. By
|
|
21
|
+
* default, each section is clearly delimited via a border or solid background colour.
|
|
23
22
|
*
|
|
24
23
|
* @default false
|
|
25
24
|
*/
|
|
@@ -4,11 +4,10 @@ import type { ComponentProps } from "react";
|
|
|
4
4
|
export interface AlertDialogDescriptionProps extends ComponentProps<typeof AlertDialogPrimitive.Description> {
|
|
5
5
|
}
|
|
6
6
|
/**
|
|
7
|
-
* Optional accessible description to be announced when the alert dialog is
|
|
8
|
-
* opened.
|
|
7
|
+
* Optional accessible description to be announced when the alert dialog is opened.
|
|
9
8
|
*
|
|
10
|
-
* To hide the description, wrap it within `<VisuallyHidden asChild>`. To remove
|
|
11
|
-
*
|
|
12
|
-
*
|
|
9
|
+
* To hide the description, wrap it within `<VisuallyHidden asChild>`. To remove the description
|
|
10
|
+
* entirely, pass `aria-describedby={undefined}` to the `AlertDialogContent` and omit this
|
|
11
|
+
* component.
|
|
13
12
|
*/
|
|
14
13
|
export declare function AlertDialogDescription({ className, ...otherProps }: AlertDialogDescriptionProps): import("react").JSX.Element;
|
|
@@ -21,9 +21,9 @@ export type ButtonProps<TAs extends ButtonAs = "button"> = PolymorphicProps<Butt
|
|
|
21
21
|
/** Own properties of the button component. */
|
|
22
22
|
export interface ButtonOwnProps {
|
|
23
23
|
/**
|
|
24
|
-
* Change the component to the HTML tag or custom component of the only child.
|
|
25
|
-
*
|
|
26
|
-
*
|
|
24
|
+
* Change the component to the HTML tag or custom component of the only child. This will merge the
|
|
25
|
+
* original component props with the props of the supplied element/component and change the
|
|
26
|
+
* underlying DOM node.
|
|
27
27
|
*/
|
|
28
28
|
asChild?: boolean;
|
|
29
29
|
/**
|
|
@@ -45,22 +45,22 @@ export interface ButtonOwnProps {
|
|
|
45
45
|
*/
|
|
46
46
|
size?: ButtonSize;
|
|
47
47
|
/**
|
|
48
|
-
* Whether to display the button content vertically. This property should only
|
|
49
|
-
*
|
|
48
|
+
* Whether to display the button content vertically. This property should only be set when an icon
|
|
49
|
+
* is also specified.
|
|
50
50
|
*
|
|
51
51
|
* @default false
|
|
52
52
|
*/
|
|
53
53
|
vertical?: boolean;
|
|
54
54
|
/**
|
|
55
|
-
* Font Awesome icon to show within the button. The position of the icon may
|
|
56
|
-
*
|
|
55
|
+
* Font Awesome icon to show within the button. The position of the icon may be controlled via
|
|
56
|
+
* `iconPlacement`.
|
|
57
57
|
*
|
|
58
58
|
* @default null
|
|
59
59
|
*/
|
|
60
60
|
icon?: IconProp | ReactElement | null;
|
|
61
61
|
/**
|
|
62
|
-
* Whether to display the icon at the start or end of the button. This
|
|
63
|
-
*
|
|
62
|
+
* Whether to display the icon at the start or end of the button. This property also affects the
|
|
63
|
+
* placement of the spinner.
|
|
64
64
|
*
|
|
65
65
|
* @default "start"
|
|
66
66
|
*/
|
|
@@ -80,41 +80,36 @@ export interface ButtonOwnProps {
|
|
|
80
80
|
/**
|
|
81
81
|
* Renders the button in a **loading** state.
|
|
82
82
|
*
|
|
83
|
-
* When `true`, the button is “soft-disabled”: it looks disabled and ignores
|
|
84
|
-
*
|
|
85
|
-
*
|
|
83
|
+
* When `true`, the button is “soft-disabled”: it looks disabled and ignores user interaction but
|
|
84
|
+
* remains focusable. By default, a spinner is shown as the button's icon (i.e. `showSpinner` is
|
|
85
|
+
* set to `true` unless overridden).
|
|
86
86
|
*
|
|
87
|
-
* The button's content while loading can be controlled via `loadingContent`.
|
|
88
|
-
*
|
|
87
|
+
* The button's content while loading can be controlled via `loadingContent`. The position of the
|
|
88
|
+
* spinner may be controlled via `iconPlacement`.
|
|
89
89
|
*
|
|
90
|
-
* To only show a spinner without “soft-disabling” the button, set
|
|
91
|
-
* `showSpinner` instead.
|
|
90
|
+
* To only show a spinner without “soft-disabling” the button, set `showSpinner` instead.
|
|
92
91
|
*
|
|
93
92
|
* @example
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
* Save
|
|
98
|
-
* </Button>;
|
|
99
|
-
* ```
|
|
93
|
+
* <Button loading={saving} loadingContent="Saving…">
|
|
94
|
+
* Save
|
|
95
|
+
* </Button>;
|
|
100
96
|
*
|
|
101
97
|
* @default false
|
|
102
98
|
*/
|
|
103
99
|
loading?: boolean;
|
|
104
100
|
/**
|
|
105
|
-
* Content of the button when it is in “loading” state. If not provided, the
|
|
106
|
-
*
|
|
101
|
+
* Content of the button when it is in “loading” state. If not provided, the button content will
|
|
102
|
+
* remain unchanged.
|
|
107
103
|
*/
|
|
108
104
|
loadingContent?: ReactNode;
|
|
109
105
|
/**
|
|
110
106
|
* Whether to show a spinner as the button's icon.
|
|
111
107
|
*
|
|
112
|
-
* Defaults to the value of the `loading` property. In most cases, prefer
|
|
113
|
-
*
|
|
108
|
+
* Defaults to the value of the `loading` property. In most cases, prefer `loading`, which also
|
|
109
|
+
* “soft-disables” the button.
|
|
114
110
|
*
|
|
115
|
-
* Use `showSpinner` when you want a spinner **without** “soft-disabling” the
|
|
116
|
-
*
|
|
117
|
-
* and `showSpinner` to `false`.
|
|
111
|
+
* Use `showSpinner` when you want a spinner **without** “soft-disabling” the button. To
|
|
112
|
+
* “soft-disable” **without** a spinner, set `loading` to `true` and `showSpinner` to `false`.
|
|
118
113
|
*
|
|
119
114
|
* The position of the spinner may be controlled via `iconPlacement`.
|
|
120
115
|
*
|
|
@@ -124,14 +119,12 @@ export interface ButtonOwnProps {
|
|
|
124
119
|
/** Content to display in a tooltip when hovering over or focusing the button. */
|
|
125
120
|
tooltipContent?: ReactNode;
|
|
126
121
|
/**
|
|
127
|
-
* [`tinykeys`](https://jamiebuilds.github.io/tinykeys) keyboard shortcut
|
|
128
|
-
*
|
|
129
|
-
*
|
|
130
|
-
*
|
|
131
|
-
*
|
|
132
|
-
* >
|
|
133
|
-
* > shortcut to run the button's action. This should be done manually via e.g.
|
|
134
|
-
* > the `useKeyboardShortcut` hook.
|
|
122
|
+
* [`tinykeys`](https://jamiebuilds.github.io/tinykeys) keyboard shortcut keybinds used to trigger
|
|
123
|
+
* the action performed by the button. Rendered at the end of the button's tooltip for visual
|
|
124
|
+
* users and announced to screen readers via `aria-keyshortcuts`.
|
|
125
|
+
*
|
|
126
|
+
* > **Note:** This property does **not** automatically register a keyboard shortcut to run the
|
|
127
|
+
* > button's action. This should be done manually via e.g. the `useKeyboardShortcut` hook.
|
|
135
128
|
*/
|
|
136
129
|
keybinds?: KeyboardShortcutKeybinds;
|
|
137
130
|
/** Properties to pass to the icon component. */
|
|
@@ -144,8 +137,8 @@ export interface ButtonOwnProps {
|
|
|
144
137
|
keybindsProps?: Omit<KeybindsProps, "keybinds">;
|
|
145
138
|
}
|
|
146
139
|
/**
|
|
147
|
-
* The button component is used to trigger actions or events, such as opening a
|
|
148
|
-
*
|
|
140
|
+
* The button component is used to trigger actions or events, such as opening a dialog or submitting
|
|
141
|
+
* a form. It is built on top of the browser's [`<button>`
|
|
149
142
|
* element](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/button).
|
|
150
143
|
*
|
|
151
144
|
* Example usage:
|
|
@@ -2,9 +2,9 @@ import { type ComponentProps, type ReactNode } from "react";
|
|
|
2
2
|
/** Properties of the button group component. */
|
|
3
3
|
export interface ButtonGroupProps 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
|
/** Group's label (for assistive technologies). */
|
|
@@ -102,8 +102,7 @@ export interface CalendarRangeSelectionProps extends CalendarPropsBase<DateRange
|
|
|
102
102
|
selectionMode: "range" | "range-start" | "range-end";
|
|
103
103
|
}
|
|
104
104
|
/**
|
|
105
|
-
* Interactive calendar built on top of the [React
|
|
106
|
-
* DayPicker](https://daypicker.dev/) library.
|
|
105
|
+
* Interactive calendar built on top of the [React DayPicker](https://daypicker.dev/) library.
|
|
107
106
|
*
|
|
108
107
|
* Example usage:
|
|
109
108
|
*
|
|
@@ -115,4 +114,4 @@ export interface CalendarRangeSelectionProps extends CalendarPropsBase<DateRange
|
|
|
115
114
|
* }
|
|
116
115
|
* ```
|
|
117
116
|
*/
|
|
118
|
-
export declare function Calendar({ selectionMode, defaultValue, value: controlledValue, onValueChange, required, minDate, maxDate, minMonth, maxMonth, minYear, maxYear, monthSelectLabel, yearSelectLabel, previousMonthLabel, nextMonthLabel, defaultMonth, month: controlledMonth, onMonthChange, onDayClick, onDayFocus, onDayMouseEnter, numberOfMonths, fixedWeeks, showOutsideDays, disableNavigation, disabled, modifiers, apiRef, headerProps, headerLabelProps, previousButtonProps, nextButtonProps, monthSelectProps, yearSelectProps, pagedNavigation, ...otherProps }: CalendarProps): import("react").JSX.Element;
|
|
117
|
+
export declare function Calendar({ selectionMode, defaultValue, value: controlledValue, onValueChange, required, minDate, maxDate, minMonth, maxMonth, minYear, maxYear, monthSelectLabel: monthSelectLabelProp, yearSelectLabel: yearSelectLabelProp, previousMonthLabel: previousMonthLabelProp, nextMonthLabel: nextMonthLabelProp, defaultMonth, month: controlledMonth, onMonthChange, onDayClick, onDayFocus, onDayMouseEnter, numberOfMonths, fixedWeeks, showOutsideDays, disableNavigation, disabled, modifiers, apiRef, headerProps, headerLabelProps, previousButtonProps, nextButtonProps, monthSelectProps, yearSelectProps, pagedNavigation, ...otherProps }: CalendarProps): import("react").JSX.Element;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { type DayProps } from "@daypicker/react";
|
|
2
2
|
/**
|
|
3
|
-
* Reimplementation of the React Day Picker's day component to provide a
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* button.
|
|
3
|
+
* Reimplementation of the React Day Picker's day component to provide a consistent inner element
|
|
4
|
+
* (even when the day isn't interactive), as well as a wrapper over the day text which lets us style
|
|
5
|
+
* it without styling the whole button.
|
|
7
6
|
*/
|
|
8
7
|
export declare function CalendarDay({ day: _day, modifiers, children, ...otherProps }: DayProps): import("react").JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type MonthCaptionProps } from "@daypicker/react";
|
|
2
2
|
/**
|
|
3
|
-
* Reimplementation of the React Day Picker's caption component to provide both
|
|
4
|
-
*
|
|
3
|
+
* Reimplementation of the React Day Picker's caption component to provide both navigation arrows
|
|
4
|
+
* and dropdown selections.
|
|
5
5
|
*/
|
|
6
6
|
export declare function CalendarHeader({ calendarMonth, displayIndex, ...otherProps }: MonthCaptionProps): import("react").JSX.Element;
|
|
@@ -7,9 +7,9 @@ export type CardColor = AccentColor;
|
|
|
7
7
|
/** Properties of the card component. */
|
|
8
8
|
export interface CardProps 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,9 +19,8 @@ export interface CardProps extends ComponentProps<"div"> {
|
|
|
19
19
|
*/
|
|
20
20
|
variant?: CardVariant;
|
|
21
21
|
/**
|
|
22
|
-
* Whether sections should be merged together, as opposed to them being
|
|
23
|
-
*
|
|
24
|
-
* border or solid background colour.
|
|
22
|
+
* Whether sections should be merged together, as opposed to them being clearly delimited. By
|
|
23
|
+
* default, each section is clearly delimited via a border or solid background colour.
|
|
25
24
|
*
|
|
26
25
|
* @default false
|
|
27
26
|
*/
|
|
@@ -46,13 +45,7 @@ export interface CardProps extends ComponentProps<"div"> {
|
|
|
46
45
|
* Example usage:
|
|
47
46
|
*
|
|
48
47
|
* ```tsx
|
|
49
|
-
* import {
|
|
50
|
-
* Card,
|
|
51
|
-
* CardBody,
|
|
52
|
-
* CardFooter,
|
|
53
|
-
* CardHeader,
|
|
54
|
-
* CardTitle,
|
|
55
|
-
* } from "@ostack.tech/ui";
|
|
48
|
+
* import { Card, CardBody, CardFooter, CardHeader, CardTitle } from "@ostack.tech/ui";
|
|
56
49
|
*
|
|
57
50
|
* function UserCard() {
|
|
58
51
|
* return (
|
|
@@ -2,9 +2,9 @@ import type { ComponentProps } from "react";
|
|
|
2
2
|
/** Properties of the card body component. */
|
|
3
3
|
export interface CardBodyProps 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
|
}
|
|
@@ -2,9 +2,9 @@ import type { ComponentProps } from "react";
|
|
|
2
2
|
/** Properties of the card footer component. */
|
|
3
3
|
export interface CardFooterProps 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
|
}
|
|
@@ -2,9 +2,9 @@ import type { ComponentProps } from "react";
|
|
|
2
2
|
/** Properties of the card header component. */
|
|
3
3
|
export interface CardHeaderProps 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
|
}
|
|
@@ -6,9 +6,9 @@ export type CardTitleProps<TAs extends CardTitleAs = "div"> = PolymorphicProps<C
|
|
|
6
6
|
/** Own properties of the card title component. */
|
|
7
7
|
export interface CardTitleOwnProps {
|
|
8
8
|
/**
|
|
9
|
-
* Change the component to the HTML tag or custom component of the only child.
|
|
10
|
-
*
|
|
11
|
-
*
|
|
9
|
+
* Change the component to the HTML tag or custom component of the only child. This will merge the
|
|
10
|
+
* original component props with the props of the supplied element/component and change the
|
|
11
|
+
* underlying DOM node.
|
|
12
12
|
*/
|
|
13
13
|
asChild?: boolean;
|
|
14
14
|
}
|
|
@@ -12,8 +12,8 @@ export type CheckboxChecked = CheckboxPrimitive.CheckedState;
|
|
|
12
12
|
/** Properties of the checkbox component. */
|
|
13
13
|
export interface CheckboxProps extends Omit<ComponentProps<typeof CheckboxPrimitive.Root>, "asChild"> {
|
|
14
14
|
/**
|
|
15
|
-
* Checkbox style variant. Defaults to the default variant unless when
|
|
16
|
-
*
|
|
15
|
+
* Checkbox style variant. Defaults to the default variant unless when rendering inside a table
|
|
16
|
+
* cell (in which case it defaults to `"cell"`).
|
|
17
17
|
*/
|
|
18
18
|
variant?: ControlVariant;
|
|
19
19
|
/** Sets the status of the checkbox. */
|
|
@@ -29,15 +29,13 @@ export interface CheckboxProps extends Omit<ComponentProps<typeof CheckboxPrimit
|
|
|
29
29
|
/**
|
|
30
30
|
* Renders the checkbox in a **loading** state.
|
|
31
31
|
*
|
|
32
|
-
* When `true`, the checkbox is “soft-disabled”: it looks disabled and ignores
|
|
33
|
-
*
|
|
34
|
-
*
|
|
32
|
+
* When `true`, the checkbox is “soft-disabled”: it looks disabled and ignores user interaction
|
|
33
|
+
* but remains focusable. By default, a spinner is shown (i.e. `showSpinner` is set to `true`
|
|
34
|
+
* unless overridden).
|
|
35
35
|
*
|
|
36
|
-
* The checkbox's accessible description while loading can be controlled via
|
|
37
|
-
* `loadingDescription`.
|
|
36
|
+
* The checkbox's accessible description while loading can be controlled via `loadingDescription`.
|
|
38
37
|
*
|
|
39
|
-
* To only show a spinner without “soft-disabling” the checkbox, set
|
|
40
|
-
* `showSpinner` instead.
|
|
38
|
+
* To only show a spinner without “soft-disabling” the checkbox, set `showSpinner` instead.
|
|
41
39
|
*
|
|
42
40
|
* @default false
|
|
43
41
|
*/
|
|
@@ -47,12 +45,11 @@ export interface CheckboxProps extends Omit<ComponentProps<typeof CheckboxPrimit
|
|
|
47
45
|
/**
|
|
48
46
|
* Whether to show a spinner next to the checkbox.
|
|
49
47
|
*
|
|
50
|
-
* Defaults to the value of the `loading` property. In most cases, prefer
|
|
51
|
-
*
|
|
48
|
+
* Defaults to the value of the `loading` property. In most cases, prefer `loading`, which also
|
|
49
|
+
* “soft-disables” the checkbox.
|
|
52
50
|
*
|
|
53
|
-
* Use `showSpinner` when you want a spinner **without** “soft-disabling” the
|
|
54
|
-
*
|
|
55
|
-
* and `showSpinner` to `false`.
|
|
51
|
+
* Use `showSpinner` when you want a spinner **without** “soft-disabling” the checkbox. To
|
|
52
|
+
* “soft-disable” **without** a spinner, set `loading` to `true` and `showSpinner` to `false`.
|
|
56
53
|
*
|
|
57
54
|
* @default loading
|
|
58
55
|
*/
|
|
@@ -60,19 +57,12 @@ export interface CheckboxProps extends Omit<ComponentProps<typeof CheckboxPrimit
|
|
|
60
57
|
/**
|
|
61
58
|
* Function called when the focus moves out of the control as a whole.
|
|
62
59
|
*
|
|
63
|
-
* This is useful when there is a need to know when the user stops interacting
|
|
64
|
-
* with the control.
|
|
60
|
+
* This is useful when there is a need to know when the user stops interacting with the control.
|
|
65
61
|
*/
|
|
66
62
|
onBlurToOutside?: (event: FocusEvent) => void;
|
|
67
|
-
/**
|
|
68
|
-
* Custom validation function meant to validate the control when it is part of
|
|
69
|
-
* a `Form`.
|
|
70
|
-
*/
|
|
63
|
+
/** Custom validation function meant to validate the control when it is part of a `Form`. */
|
|
71
64
|
validate?: FormControlValidateFn<CheckboxChecked>;
|
|
72
|
-
/**
|
|
73
|
-
* Specifies when the control should be validated. Defaults to the value
|
|
74
|
-
* specified in the `Form`.
|
|
75
|
-
*/
|
|
65
|
+
/** Specifies when the control should be validated. Defaults to the value specified in the `Form`. */
|
|
76
66
|
validationMode?: FormValidationMode;
|
|
77
67
|
/** Properties to pass to the root component. */
|
|
78
68
|
rootProps?: ComponentProps<"div">;
|
|
@@ -92,11 +82,9 @@ export interface CheckboxProps extends Omit<ComponentProps<typeof CheckboxPrimit
|
|
|
92
82
|
spinnerProps?: Omit<SpinnerProps, "size">;
|
|
93
83
|
}
|
|
94
84
|
/**
|
|
95
|
-
* The `Checkbox` component allows a user to toggle a “button” between checked
|
|
96
|
-
* and not checked.
|
|
85
|
+
* The `Checkbox` component allows a user to toggle a “button” between checked and not checked.
|
|
97
86
|
*
|
|
98
|
-
* It can be used standalone or as part of a checkbox group (see the
|
|
99
|
-
* `CheckboxGroup` component).
|
|
87
|
+
* It can be used standalone or as part of a checkbox group (see the `CheckboxGroup` component).
|
|
100
88
|
*
|
|
101
89
|
* Example usage:
|
|
102
90
|
*
|
|
@@ -108,4 +96,4 @@ export interface CheckboxProps extends Omit<ComponentProps<typeof CheckboxPrimit
|
|
|
108
96
|
* }
|
|
109
97
|
* ```
|
|
110
98
|
*/
|
|
111
|
-
export declare function Checkbox({ variant, status, code, loading, loadingDescription, showSpinner, onBlurToOutside, validate, validationMode, children, rootProps, containerProps, codeProps, indicatorProps, labelProps, spinnerProps, value, defaultChecked, checked: controlledChecked, onCheckedChange, onFocus, onBlur, id, name, className, required, disabled, readOnly, startAdornment, endAdornment, "aria-disabled": ariaDisabled, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, startContainerProps, endContainerProps, ref, ...otherProps }: CheckboxProps): import("react").JSX.Element;
|
|
99
|
+
export declare function Checkbox({ variant, status: statusProp, code, loading, loadingDescription: loadingDescriptionProp, showSpinner, onBlurToOutside, validate, validationMode, children, rootProps, containerProps, codeProps, indicatorProps, labelProps, spinnerProps, value, defaultChecked, checked: controlledChecked, onCheckedChange, onFocus, onBlur, id, name, className, required, disabled: disabledProp, readOnly: readOnlyProp, startAdornment, endAdornment, "aria-disabled": ariaDisabled, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, startContainerProps, endContainerProps, ref, ...otherProps }: CheckboxProps): import("react").JSX.Element;
|