@ostack.tech/ui 1.1.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
|
@@ -7,13 +7,13 @@ import { type SpinnerProps } from "../Spinner";
|
|
|
7
7
|
/** Properties of the checkbox group component. */
|
|
8
8
|
export interface CheckboxGroupProps extends ComponentProps<"div"> {
|
|
9
9
|
/**
|
|
10
|
-
* Whether to display the checkbox group inline. Defaults to `false` unless
|
|
11
|
-
*
|
|
10
|
+
* Whether to display the checkbox group inline. Defaults to `false` unless when rending inside a
|
|
11
|
+
* table cell.
|
|
12
12
|
*/
|
|
13
13
|
inline?: boolean;
|
|
14
14
|
/**
|
|
15
|
-
* Checkbox group style variant. Defaults to the default variant unless when
|
|
16
|
-
*
|
|
15
|
+
* Checkbox group style variant. Defaults to the default variant unless when rendering inside a
|
|
16
|
+
* table cell (in which it defaults to `"cell"`).
|
|
17
17
|
*/
|
|
18
18
|
variant?: ControlVariant;
|
|
19
19
|
/** Sets the status of the checkbox group. */
|
|
@@ -25,33 +25,28 @@ export interface CheckboxGroupProps extends ComponentProps<"div"> {
|
|
|
25
25
|
/**
|
|
26
26
|
* Renders the checkbox group in a **loading** state.
|
|
27
27
|
*
|
|
28
|
-
* When `true`, the checkbox group is “soft-disabled”: it looks disabled and
|
|
29
|
-
*
|
|
30
|
-
*
|
|
28
|
+
* When `true`, the checkbox group is “soft-disabled”: it looks disabled and ignores user
|
|
29
|
+
* interaction but remains focusable. By default, a spinner is shown (i.e. `showSpinner` is set to
|
|
30
|
+
* `true` unless overridden).
|
|
31
31
|
*
|
|
32
|
-
* The checkbox group's accessible description while loading can be controlled
|
|
33
|
-
*
|
|
32
|
+
* The checkbox group's accessible description while loading can be controlled via
|
|
33
|
+
* `loadingDescription`.
|
|
34
34
|
*
|
|
35
|
-
* To only show a spinner without “soft-disabling” the checkbox group, set
|
|
36
|
-
* `showSpinner` instead.
|
|
35
|
+
* To only show a spinner without “soft-disabling” the checkbox group, set `showSpinner` instead.
|
|
37
36
|
*
|
|
38
37
|
* @default false
|
|
39
38
|
*/
|
|
40
39
|
loading?: boolean;
|
|
41
|
-
/**
|
|
42
|
-
* Accessible description of the checkbox group when it is in a “loading”
|
|
43
|
-
* state.
|
|
44
|
-
*/
|
|
40
|
+
/** Accessible description of the checkbox group when it is in a “loading” state. */
|
|
45
41
|
loadingDescription?: ReactNode;
|
|
46
42
|
/**
|
|
47
43
|
* Whether to show a spinner next to the checkbox group.
|
|
48
44
|
*
|
|
49
|
-
* Defaults to the value of the `loading` property. In most cases, prefer
|
|
50
|
-
*
|
|
45
|
+
* Defaults to the value of the `loading` property. In most cases, prefer `loading`, which also
|
|
46
|
+
* “soft-disables” the checkbox group.
|
|
51
47
|
*
|
|
52
|
-
* Use `showSpinner` when you want a spinner **without** “soft-disabling” the
|
|
53
|
-
*
|
|
54
|
-
* `true` and `showSpinner` to `false`.
|
|
48
|
+
* Use `showSpinner` when you want a spinner **without** “soft-disabling” the checkbox group. To
|
|
49
|
+
* “soft-disable” **without** a spinner, set `loading` to `true` and `showSpinner` to `false`.
|
|
55
50
|
*
|
|
56
51
|
* @default loading
|
|
57
52
|
*/
|
|
@@ -79,19 +74,12 @@ export interface CheckboxGroupProps extends ComponentProps<"div"> {
|
|
|
79
74
|
/**
|
|
80
75
|
* Function called when the focus moves out of the control as a whole.
|
|
81
76
|
*
|
|
82
|
-
* This is useful when there is a need to know when the user stops interacting
|
|
83
|
-
* with the control.
|
|
77
|
+
* This is useful when there is a need to know when the user stops interacting with the control.
|
|
84
78
|
*/
|
|
85
79
|
onBlurToOutside?: (event: FocusEvent) => void;
|
|
86
|
-
/**
|
|
87
|
-
* Custom validation function meant to validate the control when it is part of
|
|
88
|
-
* a `Form`.
|
|
89
|
-
*/
|
|
80
|
+
/** Custom validation function meant to validate the control when it is part of a `Form`. */
|
|
90
81
|
validate?: FormControlValidateFn<string[]>;
|
|
91
|
-
/**
|
|
92
|
-
* Specifies when the control should be validated. Defaults to the value
|
|
93
|
-
* specified in the `Form`.
|
|
94
|
-
*/
|
|
82
|
+
/** Specifies when the control should be validated. Defaults to the value specified in the `Form`. */
|
|
95
83
|
validationMode?: FormValidationMode;
|
|
96
84
|
/** Properties to pass to the code component. */
|
|
97
85
|
codeProps?: ControlCodeProps;
|
|
@@ -105,15 +93,13 @@ export interface CheckboxGroupProps extends ComponentProps<"div"> {
|
|
|
105
93
|
spinnerProps?: Omit<SpinnerProps, "size">;
|
|
106
94
|
}
|
|
107
95
|
/**
|
|
108
|
-
* The `CheckboxGroup` component displays a set of `Checkbox` components,
|
|
109
|
-
*
|
|
96
|
+
* The `CheckboxGroup` component displays a set of `Checkbox` components, allowing a user to check
|
|
97
|
+
* any combination of the included checkboxes.
|
|
110
98
|
*
|
|
111
|
-
* The state of the checkbox group is an array containing the `value` of every
|
|
112
|
-
* checked checkbox.
|
|
99
|
+
* The state of the checkbox group is an array containing the `value` of every checked checkbox.
|
|
113
100
|
*
|
|
114
|
-
* For accessibility purposes, checkbox groups are usually included within a
|
|
115
|
-
* `
|
|
116
|
-
* `Feedback`.
|
|
101
|
+
* For accessibility purposes, checkbox groups are usually included within a `Field` together with a
|
|
102
|
+
* `Label` and optionally `HelperText` and/or `Feedback`.
|
|
117
103
|
*
|
|
118
104
|
* Example usage:
|
|
119
105
|
*
|
|
@@ -131,4 +117,4 @@ export interface CheckboxGroupProps extends ComponentProps<"div"> {
|
|
|
131
117
|
* }
|
|
132
118
|
* ```
|
|
133
119
|
*/
|
|
134
|
-
export declare function CheckboxGroup({ inline, variant, status, code, name, loading, loadingDescription, showSpinner, required, minChecked, maxChecked, disabled, readOnly, defaultValue, value, onValueChange, onBlurToOutside, validate, validationMode, codeProps, containerProps, startContainerProps, endContainerProps, spinnerProps, id, className, startAdornment, endAdornment, onMouseDown, onFocus, tabIndex: controlledTabIndex, children, "aria-disabled": ariaDisabled, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, ref, ...otherProps }: CheckboxGroupProps): import("react").JSX.Element;
|
|
120
|
+
export declare function CheckboxGroup({ inline: inlineProp, variant: variantProp, status: statusProp, code, name, loading, loadingDescription: loadingDescriptionProp, showSpinner, required, minChecked: minCheckedProp, maxChecked, disabled: disabledProp, readOnly, defaultValue, value, onValueChange, onBlurToOutside, validate, validationMode, codeProps, containerProps, startContainerProps, endContainerProps, spinnerProps, id, className, startAdornment, endAdornment, onMouseDown, onFocus, tabIndex: controlledTabIndex, children, "aria-disabled": ariaDisabled, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, ref, ...otherProps }: CheckboxGroupProps): import("react").JSX.Element;
|
|
@@ -47,22 +47,21 @@ export declare function useCreateCheckboxGroupContext({ defaultValue, value, onV
|
|
|
47
47
|
/** Hook returning the checkbox group's context value. */
|
|
48
48
|
export declare function useCheckboxGroupContext(): CheckboxGroupContextValue | null;
|
|
49
49
|
/**
|
|
50
|
-
* Hook which returns the checked state of a checkbox in a checkbox group and a
|
|
51
|
-
*
|
|
50
|
+
* Hook which returns the checked state of a checkbox in a checkbox group and a function to mark it
|
|
51
|
+
* as checked or unchecked.
|
|
52
52
|
*/
|
|
53
53
|
export declare function useIsCheckedInGroup(checkboxValue: string): [boolean | undefined, ((checked: boolean) => void) | undefined];
|
|
54
54
|
/**
|
|
55
55
|
* Returns whether a checkbox within a group should be marked as required.
|
|
56
56
|
*
|
|
57
|
-
* All checkboxes within a group are marked as required when the group itself is
|
|
58
|
-
*
|
|
57
|
+
* All checkboxes within a group are marked as required when the group itself is required and no
|
|
58
|
+
* checkboxes have been checked.
|
|
59
59
|
*/
|
|
60
60
|
export declare function useIsRequiredInGroup(): boolean | undefined;
|
|
61
61
|
/**
|
|
62
62
|
* Returns whether a checkbox within a group should be soft-disabled.
|
|
63
63
|
*
|
|
64
|
-
* Non-checked checkboxes within a group that has reached its `maxChecked` will
|
|
65
|
-
* be soft-disabled.
|
|
64
|
+
* Non-checked checkboxes within a group that has reached its `maxChecked` will be soft-disabled.
|
|
66
65
|
*/
|
|
67
66
|
export declare function useIsSoftDisabledInGroup(isChecked?: boolean): boolean | undefined;
|
|
68
67
|
/**
|
|
@@ -3,4 +3,4 @@ import { type IconButtonProps } from "../IconButton";
|
|
|
3
3
|
export interface CloseButtonProps extends Partial<IconButtonProps> {
|
|
4
4
|
}
|
|
5
5
|
/** Component rendering a “close” button. */
|
|
6
|
-
export declare function CloseButton({ icon, label, className, ...otherProps }: CloseButtonProps): import("react").JSX.Element;
|
|
6
|
+
export declare function CloseButton({ icon, label: labelProp, className, ...otherProps }: CloseButtonProps): import("react").JSX.Element;
|
|
@@ -5,9 +5,9 @@ export type CodeColor = AccentColor;
|
|
|
5
5
|
/** Properties of the code component. */
|
|
6
6
|
export interface CodeProps extends ComponentProps<"code"> {
|
|
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
|
/**
|
|
@@ -18,8 +18,7 @@ export interface CodeProps extends ComponentProps<"code"> {
|
|
|
18
18
|
color?: CodeColor;
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
|
-
* Component used to display inline snippets of code. It is built on top of the
|
|
22
|
-
* browser's [`<code>`
|
|
21
|
+
* Component used to display inline snippets of code. It is built on top of the browser's [`<code>`
|
|
23
22
|
* element](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/code).
|
|
24
23
|
*
|
|
25
24
|
* Example usage:
|
|
@@ -14,23 +14,17 @@ export interface CollapsibleProps extends Omit<ComponentProps<typeof Collapsible
|
|
|
14
14
|
orientation?: CollapsibleOrientation;
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
|
-
* The collapsible component is an interactive component that expands/collapses
|
|
18
|
-
* content.
|
|
17
|
+
* The collapsible component is an interactive component that expands/collapses content.
|
|
19
18
|
*
|
|
20
19
|
* It composes the following subcomponents:
|
|
21
20
|
*
|
|
22
|
-
* - `CollapsibleTrigger`: Trigger that toggles the collapsible content between
|
|
23
|
-
* expanded/collapsed.
|
|
21
|
+
* - `CollapsibleTrigger`: Trigger that toggles the collapsible content between expanded/collapsed.
|
|
24
22
|
* - `CollapsibleContent`: Component containing the collapsible content.
|
|
25
23
|
*
|
|
26
24
|
* Example usage:
|
|
27
25
|
*
|
|
28
26
|
* ```tsx
|
|
29
|
-
* import {
|
|
30
|
-
* Collapsible,
|
|
31
|
-
* CollapsibleContent,
|
|
32
|
-
* CollapsibleTrigger,
|
|
33
|
-
* } from "@ostack.tech/ui";
|
|
27
|
+
* import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "@ostack.tech/ui";
|
|
34
28
|
*
|
|
35
29
|
* function ShowMore() {
|
|
36
30
|
* return (
|
|
@@ -3,10 +3,7 @@ import type { IconProp } from "../Icon/Icon.tsx";
|
|
|
3
3
|
import { type IconButtonProps } from "../IconButton";
|
|
4
4
|
/** Properties of the collapsible trigger component. */
|
|
5
5
|
export type CollapsibleTriggerProps = CollapsibleTriggerChildlessProps | CollapsibleTriggerChildrenProps;
|
|
6
|
-
/**
|
|
7
|
-
* Properties of the collapsible trigger component when rendered without
|
|
8
|
-
* children.
|
|
9
|
-
*/
|
|
6
|
+
/** Properties of the collapsible trigger component when rendered without children. */
|
|
10
7
|
export interface CollapsibleTriggerChildlessProps extends Omit<Partial<IconButtonProps>, "asChild" | "children"> {
|
|
11
8
|
/** Icon used for the trigger icon button when the collapsible is collapsed. */
|
|
12
9
|
expandIcon?: IconProp | ReactElement;
|
|
@@ -18,8 +18,8 @@ export interface CommandMenuProps extends ComponentProps<typeof CommandPrimitive
|
|
|
18
18
|
*/
|
|
19
19
|
variant?: CommandMenuVariant;
|
|
20
20
|
/**
|
|
21
|
-
* Default placement of icons within command menu items. This property can be
|
|
22
|
-
*
|
|
21
|
+
* Default placement of icons within command menu items. This property can be overridden on a
|
|
22
|
+
* per-item basis.
|
|
23
23
|
*
|
|
24
24
|
* @default "start"
|
|
25
25
|
*/
|
|
@@ -60,11 +60,10 @@ export interface CommandMenuProps extends ComponentProps<typeof CommandPrimitive
|
|
|
60
60
|
emptyMessageProps?: ComponentProps<"div">;
|
|
61
61
|
}
|
|
62
62
|
/**
|
|
63
|
-
* The command menu renders a menu of selectable items which can be filtered and
|
|
64
|
-
*
|
|
63
|
+
* The command menu renders a menu of selectable items which can be filtered and sorted via a search
|
|
64
|
+
* query.
|
|
65
65
|
*
|
|
66
|
-
* Built on top of the [cmdk Command primitive](https://github.com/dip/cmdk/)
|
|
67
|
-
* and the [`MenuList`
|
|
66
|
+
* Built on top of the [cmdk Command primitive](https://github.com/dip/cmdk/) and the [`MenuList`
|
|
68
67
|
* component](/docs/ostack-ui-data-display-menu-list--docs).
|
|
69
68
|
*
|
|
70
69
|
* It composes the following subcomponents:
|
|
@@ -89,4 +88,4 @@ export interface CommandMenuProps extends ComponentProps<typeof CommandPrimitive
|
|
|
89
88
|
* }
|
|
90
89
|
* ```
|
|
91
90
|
*/
|
|
92
|
-
export declare function CommandMenu({ variant, iconPlacement, label, searchPlaceholder, searchValue, onSearchValueChange, listLabel, loading, loadingLabel, loadingProgress, emptyMessage, className, searchProps, searchAdornmentProps, searchIconProps, listProps, loadingProps, spinnerProps, emptyMessageProps, children, ...otherProps }: CommandMenuProps): import("react").JSX.Element;
|
|
91
|
+
export declare function CommandMenu({ variant, iconPlacement, label: labelProp, searchPlaceholder: searchPlaceholderProp, searchValue, onSearchValueChange, listLabel: listLabelProp, loading, loadingLabel: loadingLabelProp, loadingProgress, emptyMessage: emptyMessageProp, className, searchProps, searchAdornmentProps, searchIconProps, listProps, loadingProps, spinnerProps, emptyMessageProps, children, ...otherProps }: CommandMenuProps): import("react").JSX.Element;
|
|
@@ -17,21 +17,17 @@ export interface CommandMenuDialogProps extends Omit<ComponentProps<typeof Dialo
|
|
|
17
17
|
*/
|
|
18
18
|
size?: CommandMenuDialogSize;
|
|
19
19
|
/**
|
|
20
|
-
* The open state of the command menu dialog when it is initially rendered.
|
|
21
|
-
*
|
|
20
|
+
* The open state of the command menu dialog when it is initially rendered. Use when you do not
|
|
21
|
+
* need to control its open state.
|
|
22
22
|
*/
|
|
23
23
|
defaultOpen?: boolean;
|
|
24
|
-
/**
|
|
25
|
-
* The controlled open state of the dialog. Should be used in conjunction with
|
|
26
|
-
* `onOpenChange`.
|
|
27
|
-
*/
|
|
24
|
+
/** The controlled open state of the dialog. Should be used in conjunction with `onOpenChange`. */
|
|
28
25
|
open?: boolean;
|
|
29
26
|
/** Event handler called when the open state of the dialog changes. */
|
|
30
27
|
onOpenChange?: (open: boolean) => void;
|
|
31
28
|
/**
|
|
32
|
-
* The modality of the dialog. When set to `true`, interaction with outside
|
|
33
|
-
*
|
|
34
|
-
* readers.
|
|
29
|
+
* The modality of the dialog. When set to `true`, interaction with outside elements will be
|
|
30
|
+
* disabled and only dialog content will be visible to screen readers.
|
|
35
31
|
*
|
|
36
32
|
* @default true
|
|
37
33
|
*/
|
|
@@ -42,4 +38,4 @@ export interface CommandMenuDialogProps extends Omit<ComponentProps<typeof Dialo
|
|
|
42
38
|
overlayProps?: OverlayProps;
|
|
43
39
|
}
|
|
44
40
|
/** Component used to display the command menu within a dialog. */
|
|
45
|
-
export declare function CommandMenuDialog({ title, description, size, open, defaultOpen, onOpenChange, modal, forceMount, portalProps, overlayProps, className, children, ...otherProps }: CommandMenuDialogProps): import("react").JSX.Element;
|
|
41
|
+
export declare function CommandMenuDialog({ title: titleProp, description: descriptionProp, size, open, defaultOpen, onOpenChange, modal, forceMount, portalProps, overlayProps, className, children, ...otherProps }: CommandMenuDialogProps): import("react").JSX.Element;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
2
|
import { type MenuListItemProps } from "../MenuList";
|
|
3
3
|
import { Command as CommandPrimitive } from "./cmdk";
|
|
4
4
|
/** Properties of the command menu item component. */
|
|
5
5
|
export interface CommandMenuItemProps extends Omit<ComponentProps<typeof CommandPrimitive.Item>, "asChild" | "color">, Pick<MenuListItemProps, "selected" | "color" | "loading" | "loadingContent" | "showSpinner" | "icon" | "iconPlacement" | "keybinds" | "href" | "target" | "rel" | "actionProps" | "contentProps" | "iconProps" | "spinnerProps" | "keybindsProps"> {
|
|
6
6
|
/**
|
|
7
|
-
* Render the item as a link. When set, you can pass `href`, `target`, and
|
|
8
|
-
*
|
|
7
|
+
* Render the item as a link. When set, you can pass `href`, `target`, and `rel` properties to the
|
|
8
|
+
* item.
|
|
9
9
|
*
|
|
10
10
|
* @default false
|
|
11
11
|
*/
|
|
@@ -4,9 +4,9 @@ type Children = {
|
|
|
4
4
|
};
|
|
5
5
|
type DivProps = React.ComponentPropsWithoutRef<"div"> & {
|
|
6
6
|
/**
|
|
7
|
-
* Change the component to the HTML tag or custom component of the only child.
|
|
8
|
-
*
|
|
9
|
-
*
|
|
7
|
+
* Change the component to the HTML tag or custom component of the only child. This will merge the
|
|
8
|
+
* original component props with the props of the supplied element/component and change the
|
|
9
|
+
* underlying DOM node.
|
|
10
10
|
*/
|
|
11
11
|
asChild?: boolean;
|
|
12
12
|
};
|
|
@@ -28,25 +28,23 @@ type Group = {
|
|
|
28
28
|
declare const defaultFilter: CommandFilter;
|
|
29
29
|
declare const Command: React.ForwardRefExoticComponent<Children & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
30
30
|
/**
|
|
31
|
-
* Change the component to the HTML tag or custom component of the only child.
|
|
32
|
-
*
|
|
33
|
-
*
|
|
31
|
+
* Change the component to the HTML tag or custom component of the only child. This will merge the
|
|
32
|
+
* original component props with the props of the supplied element/component and change the
|
|
33
|
+
* underlying DOM node.
|
|
34
34
|
*/
|
|
35
35
|
asChild?: boolean;
|
|
36
36
|
} & {
|
|
37
37
|
/** Accessible label for this command menu. Not shown visibly. */
|
|
38
38
|
label?: string;
|
|
39
39
|
/**
|
|
40
|
-
* Optionally set to `false` to turn off the automatic filtering and
|
|
41
|
-
*
|
|
42
|
-
* the search query yourself.
|
|
40
|
+
* Optionally set to `false` to turn off the automatic filtering and sorting. If `false`, you
|
|
41
|
+
* must conditionally render valid items based on the search query yourself.
|
|
43
42
|
*/
|
|
44
43
|
shouldFilter?: boolean;
|
|
45
44
|
/**
|
|
46
|
-
* Custom filter function for whether each command menu item should matches
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
* `command-score` library.
|
|
45
|
+
* Custom filter function for whether each command menu item should matches the given search
|
|
46
|
+
* query. It should return a number between 0 and 1, with 1 being the best match and 0 being
|
|
47
|
+
* hidden entirely. By default, uses the `command-score` library.
|
|
50
48
|
*/
|
|
51
49
|
filter?: CommandFilter;
|
|
52
50
|
/** Optional default item value when it is initially rendered. */
|
|
@@ -55,32 +53,25 @@ declare const Command: React.ForwardRefExoticComponent<Children & Omit<React.Det
|
|
|
55
53
|
value?: string;
|
|
56
54
|
/** Event handler called when the selected item of the menu changes. */
|
|
57
55
|
onValueChange?: (value: string) => void;
|
|
58
|
-
/**
|
|
59
|
-
* Optionally set to `true` to turn on looping around when using the arrow
|
|
60
|
-
* keys.
|
|
61
|
-
*/
|
|
56
|
+
/** Optionally set to `true` to turn on looping around when using the arrow keys. */
|
|
62
57
|
loop?: boolean;
|
|
63
58
|
/** Optionally set to `true` to disable selection via pointer events. */
|
|
64
59
|
disablePointerSelection?: boolean;
|
|
65
60
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
66
61
|
/**
|
|
67
|
-
* Command menu item. Becomes active on pointer enter or through keyboard
|
|
68
|
-
*
|
|
69
|
-
*
|
|
62
|
+
* Command menu item. Becomes active on pointer enter or through keyboard navigation. Preferably
|
|
63
|
+
* pass a `value`, otherwise the value will be inferred from `children` or the rendered item's
|
|
64
|
+
* `textContent`.
|
|
70
65
|
*/
|
|
71
66
|
declare const Item: React.ForwardRefExoticComponent<Children & Omit<DivProps, "disabled" | "value" | "onSelect"> & {
|
|
72
67
|
/** Whether this item is currently disabled. */
|
|
73
68
|
disabled?: boolean;
|
|
74
|
-
/**
|
|
75
|
-
* Event handler for when this item is selected, either via click or
|
|
76
|
-
* keyboard selection.
|
|
77
|
-
*/
|
|
69
|
+
/** Event handler for when this item is selected, either via click or keyboard selection. */
|
|
78
70
|
onSelect?: (value: string) => void;
|
|
79
71
|
/**
|
|
80
|
-
* A unique value for this item. If no value is provided, it will be
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
* unique `value`.
|
|
72
|
+
* A unique value for this item. If no value is provided, it will be inferred from `children` or
|
|
73
|
+
* the rendered `textContent`. If your `textContent` changes between renders, you _must_ provide
|
|
74
|
+
* a stable, unique `value`.
|
|
84
75
|
*/
|
|
85
76
|
value?: string;
|
|
86
77
|
/** Optional keywords to match against when filtering. */
|
|
@@ -88,48 +79,36 @@ declare const Item: React.ForwardRefExoticComponent<Children & Omit<DivProps, "d
|
|
|
88
79
|
/** Whether this item is forcibly rendered regardless of filtering. */
|
|
89
80
|
forceMount?: boolean;
|
|
90
81
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
91
|
-
/**
|
|
92
|
-
* Group command menu items together with a heading. Grouped items are always
|
|
93
|
-
* shown together.
|
|
94
|
-
*/
|
|
82
|
+
/** Group command menu items together with a heading. Grouped items are always shown together. */
|
|
95
83
|
declare const Group: React.ForwardRefExoticComponent<Children & Omit<DivProps, "value" | "heading"> & {
|
|
96
84
|
/** Optional heading to render for this group. */
|
|
97
85
|
heading?: React.ReactNode;
|
|
98
|
-
/**
|
|
99
|
-
* If no heading is provided, you must provide a value that is unique for
|
|
100
|
-
* this group.
|
|
101
|
-
*/
|
|
86
|
+
/** If no heading is provided, you must provide a value that is unique for this group. */
|
|
102
87
|
value?: string;
|
|
103
88
|
/** Whether this group is forcibly rendered regardless of filtering. */
|
|
104
89
|
forceMount?: boolean;
|
|
105
90
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
106
91
|
/**
|
|
107
|
-
* A visual and semantic separator between items or groups. Visible when the
|
|
108
|
-
*
|
|
92
|
+
* A visual and semantic separator between items or groups. Visible when the search query is empty
|
|
93
|
+
* or `alwaysRender` is true, hidden otherwise.
|
|
109
94
|
*/
|
|
110
95
|
declare const Separator: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
111
96
|
/**
|
|
112
|
-
* Change the component to the HTML tag or custom component of the only child.
|
|
113
|
-
*
|
|
114
|
-
*
|
|
97
|
+
* Change the component to the HTML tag or custom component of the only child. This will merge the
|
|
98
|
+
* original component props with the props of the supplied element/component and change the
|
|
99
|
+
* underlying DOM node.
|
|
115
100
|
*/
|
|
116
101
|
asChild?: boolean;
|
|
117
102
|
} & {
|
|
118
|
-
/**
|
|
119
|
-
* Whether this separator should always be rendered. Useful if you disable
|
|
120
|
-
* automatic filtering.
|
|
121
|
-
*/
|
|
103
|
+
/** Whether this separator should always be rendered. Useful if you disable automatic filtering. */
|
|
122
104
|
alwaysRender?: boolean;
|
|
123
105
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
124
|
-
/**
|
|
125
|
-
* Command menu input. All props are forwarded to the underyling `input`
|
|
126
|
-
* element.
|
|
127
|
-
*/
|
|
106
|
+
/** Command menu input. All props are forwarded to the underyling `input` element. */
|
|
128
107
|
declare const Input: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "type" | "value" | "onChange"> & {
|
|
129
108
|
/**
|
|
130
|
-
* Change the component to the HTML tag or custom component of the only child.
|
|
131
|
-
*
|
|
132
|
-
*
|
|
109
|
+
* Change the component to the HTML tag or custom component of the only child. This will merge the
|
|
110
|
+
* original component props with the props of the supplied element/component and change the
|
|
111
|
+
* underlying DOM node.
|
|
133
112
|
*/
|
|
134
113
|
asChild?: boolean;
|
|
135
114
|
/** Optional controlled state for the value of the search input. */
|
|
@@ -138,14 +117,14 @@ declare const Input: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTM
|
|
|
138
117
|
onValueChange?: (search: string) => void;
|
|
139
118
|
} & React.RefAttributes<HTMLInputElement>>;
|
|
140
119
|
/**
|
|
141
|
-
* Contains `Item`, `Group`, and `Separator`. Use the `--cmdk-list-height` CSS
|
|
142
|
-
*
|
|
120
|
+
* Contains `Item`, `Group`, and `Separator`. Use the `--cmdk-list-height` CSS variable to animate
|
|
121
|
+
* height based on the number of results.
|
|
143
122
|
*/
|
|
144
123
|
declare const List: React.ForwardRefExoticComponent<Children & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
145
124
|
/**
|
|
146
|
-
* Change the component to the HTML tag or custom component of the only child.
|
|
147
|
-
*
|
|
148
|
-
*
|
|
125
|
+
* Change the component to the HTML tag or custom component of the only child. This will merge the
|
|
126
|
+
* original component props with the props of the supplied element/component and change the
|
|
127
|
+
* underlying DOM node.
|
|
149
128
|
*/
|
|
150
129
|
asChild?: boolean;
|
|
151
130
|
} & {
|
|
@@ -155,21 +134,18 @@ declare const List: React.ForwardRefExoticComponent<Children & Omit<React.Detail
|
|
|
155
134
|
/** Automatically renders when there are no results for the search query. */
|
|
156
135
|
declare const Empty: React.ForwardRefExoticComponent<Children & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
157
136
|
/**
|
|
158
|
-
* Change the component to the HTML tag or custom component of the only child.
|
|
159
|
-
*
|
|
160
|
-
*
|
|
137
|
+
* Change the component to the HTML tag or custom component of the only child. This will merge the
|
|
138
|
+
* original component props with the props of the supplied element/component and change the
|
|
139
|
+
* underlying DOM node.
|
|
161
140
|
*/
|
|
162
141
|
asChild?: boolean;
|
|
163
142
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
164
|
-
/**
|
|
165
|
-
* You should conditionally render this with `progress` while loading
|
|
166
|
-
* asynchronous items.
|
|
167
|
-
*/
|
|
143
|
+
/** You should conditionally render this with `progress` while loading asynchronous items. */
|
|
168
144
|
declare const Loading: React.ForwardRefExoticComponent<Children & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
169
145
|
/**
|
|
170
|
-
* Change the component to the HTML tag or custom component of the only child.
|
|
171
|
-
*
|
|
172
|
-
*
|
|
146
|
+
* Change the component to the HTML tag or custom component of the only child. This will merge the
|
|
147
|
+
* original component props with the props of the supplied element/component and change the
|
|
148
|
+
* underlying DOM node.
|
|
173
149
|
*/
|
|
174
150
|
asChild?: boolean;
|
|
175
151
|
} & {
|
|
@@ -180,25 +156,23 @@ declare const Loading: React.ForwardRefExoticComponent<Children & Omit<React.Det
|
|
|
180
156
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
181
157
|
declare const pkg: React.ForwardRefExoticComponent<Children & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
182
158
|
/**
|
|
183
|
-
* Change the component to the HTML tag or custom component of the only child.
|
|
184
|
-
*
|
|
185
|
-
*
|
|
159
|
+
* Change the component to the HTML tag or custom component of the only child. This will merge the
|
|
160
|
+
* original component props with the props of the supplied element/component and change the
|
|
161
|
+
* underlying DOM node.
|
|
186
162
|
*/
|
|
187
163
|
asChild?: boolean;
|
|
188
164
|
} & {
|
|
189
165
|
/** Accessible label for this command menu. Not shown visibly. */
|
|
190
166
|
label?: string;
|
|
191
167
|
/**
|
|
192
|
-
* Optionally set to `false` to turn off the automatic filtering and
|
|
193
|
-
*
|
|
194
|
-
* the search query yourself.
|
|
168
|
+
* Optionally set to `false` to turn off the automatic filtering and sorting. If `false`, you
|
|
169
|
+
* must conditionally render valid items based on the search query yourself.
|
|
195
170
|
*/
|
|
196
171
|
shouldFilter?: boolean;
|
|
197
172
|
/**
|
|
198
|
-
* Custom filter function for whether each command menu item should matches
|
|
199
|
-
*
|
|
200
|
-
*
|
|
201
|
-
* `command-score` library.
|
|
173
|
+
* Custom filter function for whether each command menu item should matches the given search
|
|
174
|
+
* query. It should return a number between 0 and 1, with 1 being the best match and 0 being
|
|
175
|
+
* hidden entirely. By default, uses the `command-score` library.
|
|
202
176
|
*/
|
|
203
177
|
filter?: CommandFilter;
|
|
204
178
|
/** Optional default item value when it is initially rendered. */
|
|
@@ -207,19 +181,16 @@ declare const pkg: React.ForwardRefExoticComponent<Children & Omit<React.Detaile
|
|
|
207
181
|
value?: string;
|
|
208
182
|
/** Event handler called when the selected item of the menu changes. */
|
|
209
183
|
onValueChange?: (value: string) => void;
|
|
210
|
-
/**
|
|
211
|
-
* Optionally set to `true` to turn on looping around when using the arrow
|
|
212
|
-
* keys.
|
|
213
|
-
*/
|
|
184
|
+
/** Optionally set to `true` to turn on looping around when using the arrow keys. */
|
|
214
185
|
loop?: boolean;
|
|
215
186
|
/** Optionally set to `true` to disable selection via pointer events. */
|
|
216
187
|
disablePointerSelection?: boolean;
|
|
217
188
|
} & React.RefAttributes<HTMLDivElement>> & {
|
|
218
189
|
List: React.ForwardRefExoticComponent<Children & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
219
190
|
/**
|
|
220
|
-
* Change the component to the HTML tag or custom component of the only child.
|
|
221
|
-
*
|
|
222
|
-
*
|
|
191
|
+
* Change the component to the HTML tag or custom component of the only child. This will merge the
|
|
192
|
+
* original component props with the props of the supplied element/component and change the
|
|
193
|
+
* underlying DOM node.
|
|
223
194
|
*/
|
|
224
195
|
asChild?: boolean;
|
|
225
196
|
} & {
|
|
@@ -229,16 +200,12 @@ declare const pkg: React.ForwardRefExoticComponent<Children & Omit<React.Detaile
|
|
|
229
200
|
Item: React.ForwardRefExoticComponent<Children & Omit<DivProps, "disabled" | "value" | "onSelect"> & {
|
|
230
201
|
/** Whether this item is currently disabled. */
|
|
231
202
|
disabled?: boolean;
|
|
232
|
-
/**
|
|
233
|
-
* Event handler for when this item is selected, either via click or
|
|
234
|
-
* keyboard selection.
|
|
235
|
-
*/
|
|
203
|
+
/** Event handler for when this item is selected, either via click or keyboard selection. */
|
|
236
204
|
onSelect?: (value: string) => void;
|
|
237
205
|
/**
|
|
238
|
-
* A unique value for this item. If no value is provided, it will be
|
|
239
|
-
*
|
|
240
|
-
*
|
|
241
|
-
* unique `value`.
|
|
206
|
+
* A unique value for this item. If no value is provided, it will be inferred from `children` or
|
|
207
|
+
* the rendered `textContent`. If your `textContent` changes between renders, you _must_ provide
|
|
208
|
+
* a stable, unique `value`.
|
|
242
209
|
*/
|
|
243
210
|
value?: string;
|
|
244
211
|
/** Optional keywords to match against when filtering. */
|
|
@@ -248,9 +215,9 @@ declare const pkg: React.ForwardRefExoticComponent<Children & Omit<React.Detaile
|
|
|
248
215
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
249
216
|
Input: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "type" | "value" | "onChange"> & {
|
|
250
217
|
/**
|
|
251
|
-
* Change the component to the HTML tag or custom component of the only child.
|
|
252
|
-
*
|
|
253
|
-
*
|
|
218
|
+
* Change the component to the HTML tag or custom component of the only child. This will merge the
|
|
219
|
+
* original component props with the props of the supplied element/component and change the
|
|
220
|
+
* underlying DOM node.
|
|
254
221
|
*/
|
|
255
222
|
asChild?: boolean;
|
|
256
223
|
/** Optional controlled state for the value of the search input. */
|
|
@@ -261,41 +228,35 @@ declare const pkg: React.ForwardRefExoticComponent<Children & Omit<React.Detaile
|
|
|
261
228
|
Group: React.ForwardRefExoticComponent<Children & Omit<DivProps, "value" | "heading"> & {
|
|
262
229
|
/** Optional heading to render for this group. */
|
|
263
230
|
heading?: React.ReactNode;
|
|
264
|
-
/**
|
|
265
|
-
* If no heading is provided, you must provide a value that is unique for
|
|
266
|
-
* this group.
|
|
267
|
-
*/
|
|
231
|
+
/** If no heading is provided, you must provide a value that is unique for this group. */
|
|
268
232
|
value?: string;
|
|
269
233
|
/** Whether this group is forcibly rendered regardless of filtering. */
|
|
270
234
|
forceMount?: boolean;
|
|
271
235
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
272
236
|
Separator: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
273
237
|
/**
|
|
274
|
-
* Change the component to the HTML tag or custom component of the only child.
|
|
275
|
-
*
|
|
276
|
-
*
|
|
238
|
+
* Change the component to the HTML tag or custom component of the only child. This will merge the
|
|
239
|
+
* original component props with the props of the supplied element/component and change the
|
|
240
|
+
* underlying DOM node.
|
|
277
241
|
*/
|
|
278
242
|
asChild?: boolean;
|
|
279
243
|
} & {
|
|
280
|
-
/**
|
|
281
|
-
* Whether this separator should always be rendered. Useful if you disable
|
|
282
|
-
* automatic filtering.
|
|
283
|
-
*/
|
|
244
|
+
/** Whether this separator should always be rendered. Useful if you disable automatic filtering. */
|
|
284
245
|
alwaysRender?: boolean;
|
|
285
246
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
286
247
|
Empty: React.ForwardRefExoticComponent<Children & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
287
248
|
/**
|
|
288
|
-
* Change the component to the HTML tag or custom component of the only child.
|
|
289
|
-
*
|
|
290
|
-
*
|
|
249
|
+
* Change the component to the HTML tag or custom component of the only child. This will merge the
|
|
250
|
+
* original component props with the props of the supplied element/component and change the
|
|
251
|
+
* underlying DOM node.
|
|
291
252
|
*/
|
|
292
253
|
asChild?: boolean;
|
|
293
254
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
294
255
|
Loading: React.ForwardRefExoticComponent<Children & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
295
256
|
/**
|
|
296
|
-
* Change the component to the HTML tag or custom component of the only child.
|
|
297
|
-
*
|
|
298
|
-
*
|
|
257
|
+
* Change the component to the HTML tag or custom component of the only child. This will merge the
|
|
258
|
+
* original component props with the props of the supplied element/component and change the
|
|
259
|
+
* underlying DOM node.
|
|
299
260
|
*/
|
|
300
261
|
asChild?: boolean;
|
|
301
262
|
} & {
|