@ostack.tech/ui 0.15.4 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{en-Buw2XVWt.js → en-DT1KWQei.js} +2 -2
- package/dist/chunks/{en-Buw2XVWt.js.map → en-DT1KWQei.js.map} +1 -1
- package/dist/locales/en-GB.js +1 -1
- package/dist/locales/en-US.js +1 -1
- package/dist/locales/fr-FR.js +1 -1
- package/dist/locales/fr-FR.js.map +1 -1
- package/dist/locales/pt-PT.js +1 -1
- package/dist/locales/pt-PT.js.map +1 -1
- package/dist/ostack-ui.css +128 -85
- package/dist/ostack-ui.js +2205 -1817
- package/dist/ostack-ui.js.map +1 -1
- package/package.json +5 -4
- package/scss/_utils.scss +0 -2
- package/scss/components/Checkbox/_Checkbox-variables.scss +7 -4
- package/scss/components/Checkbox/_Checkbox.scss +34 -9
- package/scss/components/CheckboxGroup/_CheckboxGroup.scss +9 -0
- package/scss/components/Code/_Code-variables.scss +8 -4
- package/scss/components/DateRangeInput/_DateRangeInput.scss +1 -1
- package/scss/components/Feedback/_Feedback-variables.scss +28 -1
- package/scss/components/Feedback/_Feedback.scss +95 -2
- package/scss/components/Field/_Field-variables.scss +0 -1
- package/scss/components/Field/_Field.scss +4 -40
- package/scss/components/HelperText/_HelperText-variables.scss +7 -0
- package/scss/components/HelperText/_HelperText.scss +9 -0
- package/scss/components/RadioGroup/_Radio.scss +13 -0
- package/scss/components/RadioGroup/_RadioGroup.scss +9 -0
- package/scss/components/Select/_Select.scss +2 -2
- package/scss/index.scss +0 -2
- package/scss/scss/placeholders/button/_button.scss +10 -6
- package/scss/scss/placeholders/checkable/_checkable-variables.scss +3 -2
- package/scss/scss/placeholders/checkable/_checkable.scss +25 -7
- package/scss/scss/placeholders/checkable-group/_checkable-group-variables.scss +1 -0
- package/scss/scss/placeholders/checkable-group/_checkable-group.scss +15 -3
- package/scss/scss/placeholders/popover/_popover.scss +3 -0
- package/scss/scss/utils/_breakpoints.scss +1 -1
- package/scss/scss/utils/_declare-var.scss +1 -1
- package/types/components/Alert/Alert.d.ts +12 -15
- package/types/components/Alert/AlertTitle.d.ts +2 -2
- package/types/components/AlertDialog/AlertDialog.d.ts +6 -2
- package/types/components/AlertDialog/AlertDialogAction.d.ts +3 -3
- package/types/components/AlertDialog/AlertDialogBody.d.ts +3 -5
- package/types/components/AlertDialog/AlertDialogCancel.d.ts +3 -3
- package/types/components/AlertDialog/AlertDialogContent.d.ts +6 -6
- package/types/components/AlertDialog/AlertDialogDescription.d.ts +3 -3
- package/types/components/AlertDialog/AlertDialogFooter.d.ts +3 -5
- package/types/components/AlertDialog/AlertDialogHeader.d.ts +3 -4
- package/types/components/AlertDialog/AlertDialogTitle.d.ts +4 -4
- package/types/components/AlertDialog/AlertDialogTrigger.d.ts +3 -3
- package/types/components/Button/Button.d.ts +14 -15
- package/types/components/ButtonGroup/ButtonGroup.d.ts +3 -3
- package/types/components/Calendar/Calendar.d.ts +6 -6
- package/types/components/Calendar/CalendarDay.d.ts +1 -1
- package/types/components/Calendar/CalendarHeader.d.ts +1 -1
- package/types/components/Calendar/CalendarMonthGrid.d.ts +1 -1
- package/types/components/Card/Card.d.ts +3 -3
- package/types/components/Card/CardBody.d.ts +3 -3
- package/types/components/Card/CardFooter.d.ts +3 -3
- package/types/components/Card/CardHeader.d.ts +3 -3
- package/types/components/Card/CardTitle.d.ts +3 -3
- package/types/components/Checkbox/Checkbox.d.ts +22 -14
- package/types/components/CheckboxGroup/CheckboxGroup.d.ts +22 -12
- package/types/components/CheckboxGroup/CheckboxGroupContext.d.ts +15 -9
- package/types/components/CheckboxGroup/checkboxGroupUtils.d.ts +3 -0
- package/types/components/ClearContexts/ClearContexts.d.ts +19 -1
- package/types/components/CloseButton/CloseButton.d.ts +3 -4
- package/types/components/Code/Code.d.ts +3 -3
- package/types/components/Collapsible/Collapsible.d.ts +5 -3
- package/types/components/Collapsible/CollapsibleContent.d.ts +3 -3
- package/types/components/Collapsible/CollapsibleTrigger.d.ts +5 -5
- package/types/components/CommandMenu/CommandMenu.d.ts +18 -20
- package/types/components/CommandMenu/CommandMenuDialog.d.ts +6 -6
- package/types/components/CommandMenu/CommandMenuGroup.d.ts +3 -3
- package/types/components/CommandMenu/CommandMenuItem.d.ts +5 -3
- package/types/components/Container/Container.d.ts +3 -3
- package/types/components/Control/Control.d.ts +13 -13
- package/types/components/Control/ControlWithContainerRef.d.ts +12 -5
- package/types/components/Control/controlUtils.d.ts +24 -0
- package/types/components/ControlAddon/ControlAddon.d.ts +9 -3
- package/types/components/ControlCode/ControlCode.d.ts +3 -3
- package/types/components/DataTable/DataTable.d.ts +32 -21
- package/types/components/DataTable/DataTableBody.d.ts +4 -4
- package/types/components/DataTable/DataTableCell.d.ts +6 -4
- package/types/components/DataTable/DataTableColumn.d.ts +43 -13
- package/types/components/DataTable/DataTableColumnGroup.d.ts +31 -0
- package/types/components/DataTable/DataTableColumns.d.ts +14 -0
- package/types/components/DataTable/DataTableContent.d.ts +8 -8
- package/types/components/DataTable/DataTableContext.d.ts +8 -6
- package/types/components/DataTable/DataTableFilter.d.ts +1 -1
- package/types/components/DataTable/DataTableFoot.d.ts +6 -4
- package/types/components/DataTable/DataTableHead.d.ts +3 -4
- package/types/components/DataTable/DataTablePagination.d.ts +6 -6
- package/types/components/DataTable/DataTableRow.d.ts +3 -4
- package/types/components/DataTable/DataTableRowsPerPage.d.ts +3 -3
- package/types/components/DataTable/DataTableSelectionTrigger.d.ts +4 -4
- package/types/components/DataTable/PagedDataTablePagination.d.ts +3 -3
- package/types/components/DataTable/ScrolledDataTablePagination.d.ts +3 -3
- package/types/components/DataTable/__tests__/spliceWindow.test.d.ts +1 -0
- package/types/components/DataTable/columnUtils.d.ts +4 -3
- package/types/components/DataTable/index.d.ts +2 -0
- package/types/components/DataTable/processRows.d.ts +7 -7
- package/types/components/DataTable/sanitizeProps.d.ts +2 -2
- package/types/components/DataTable/useDataTableSelectionColumn.d.ts +2 -2
- package/types/components/DateInput/DateInput.d.ts +27 -18
- package/types/components/DateRangeInput/DateRangeInput.d.ts +37 -24
- package/types/components/DescriptionList/DescriptionList.d.ts +4 -4
- package/types/components/DescriptionList/DescriptionListItem.d.ts +4 -4
- package/types/components/Dialog/Dialog.d.ts +5 -1
- package/types/components/Dialog/DialogBody.d.ts +3 -4
- package/types/components/Dialog/DialogClose.d.ts +3 -3
- package/types/components/Dialog/DialogContent.d.ts +6 -6
- package/types/components/Dialog/DialogDescription.d.ts +3 -3
- package/types/components/Dialog/DialogFooter.d.ts +3 -4
- package/types/components/Dialog/DialogHeader.d.ts +5 -6
- package/types/components/Dialog/DialogTitle.d.ts +4 -4
- package/types/components/Dialog/DialogTrigger.d.ts +3 -3
- package/types/components/DropdownMenu/DropdownMenu.d.ts +4 -4
- package/types/components/DropdownMenu/DropdownMenuCheckboxItem.d.ts +5 -5
- package/types/components/DropdownMenu/DropdownMenuContent.d.ts +7 -7
- package/types/components/DropdownMenu/DropdownMenuGroup.d.ts +3 -3
- package/types/components/DropdownMenu/DropdownMenuItem.d.ts +4 -4
- package/types/components/DropdownMenu/DropdownMenuRadioGroup.d.ts +3 -3
- package/types/components/DropdownMenu/DropdownMenuRadioItem.d.ts +4 -4
- package/types/components/DropdownMenu/DropdownMenuSub.d.ts +4 -0
- package/types/components/DropdownMenu/DropdownMenuSubContent.d.ts +5 -5
- package/types/components/DropdownMenu/DropdownMenuSubTrigger.d.ts +3 -3
- package/types/components/DropdownMenu/DropdownMenuTrigger.d.ts +3 -3
- package/types/components/ErrorBoundary/ErrorBoundary.d.ts +9 -9
- package/types/components/Feedback/Feedback.d.ts +3 -3
- package/types/components/Feedback/FeedbackContext.d.ts +46 -0
- package/types/components/Feedback/FeedbackList.d.ts +6 -0
- package/types/components/Feedback/FeedbackListContext.d.ts +2 -0
- package/types/components/{FeedbackPopover → Feedback}/FeedbackPopover.d.ts +7 -7
- package/types/components/Feedback/FeedbackProvider.d.ts +13 -0
- package/types/components/Feedback/feedbackUtils.d.ts +19 -0
- package/types/components/Feedback/index.d.ts +4 -0
- package/types/components/Field/Field.d.ts +3 -3
- package/types/components/Field/FieldContext.d.ts +2 -70
- package/types/components/Field/fieldUtils.d.ts +7 -0
- package/types/components/Field/index.d.ts +1 -2
- package/types/components/FieldGroup/FieldGroup.d.ts +3 -3
- package/types/components/FieldGroup/FieldGroupBody.d.ts +3 -3
- package/types/components/FieldGroup/FieldGroupHeader.d.ts +4 -4
- package/types/components/FieldGroup/FieldGroupTitle.d.ts +2 -2
- package/types/components/Form/Form.d.ts +6 -6
- package/types/components/Form/FormContext.d.ts +1 -1
- package/types/components/Form/FormReset.d.ts +2 -2
- package/types/components/Form/FormSubmit.d.ts +2 -2
- package/types/components/Form/HiddenFormControl.d.ts +2 -2
- package/types/components/Form/useRegisterFormControl.d.ts +1 -1
- package/types/components/Grid/Grid.d.ts +4 -4
- package/types/components/Grid/GridContext.d.ts +10 -0
- package/types/components/Heading/Heading.d.ts +2 -2
- package/types/components/HelperText/HelperText.d.ts +3 -3
- package/types/components/HelperText/HelperTextContext.d.ts +38 -0
- package/types/components/HelperText/HelperTextProvider.d.ts +13 -0
- package/types/components/HelperText/helperTextUtils.d.ts +2 -0
- package/types/components/HelperText/index.d.ts +2 -0
- package/types/components/Icon/Icon.d.ts +3 -3
- package/types/components/IconButton/IconButton.d.ts +17 -17
- package/types/components/Input/Input.d.ts +1 -1
- package/types/components/Keybinds/Keybinds.d.ts +8 -3
- package/types/components/Keyboard/Keyboard.d.ts +3 -3
- package/types/components/Label/Label.d.ts +14 -14
- package/types/components/Label/LabelContext.d.ts +45 -0
- package/types/components/Label/LabelProvider.d.ts +13 -0
- package/types/components/Label/index.d.ts +2 -0
- package/types/components/Label/labelUtils.d.ts +23 -0
- package/types/components/Layer/Layer.d.ts +5 -5
- package/types/components/Link/Link.d.ts +4 -5
- package/types/components/Mark/Mark.d.ts +3 -3
- package/types/components/MenuList/MenuList.d.ts +3 -3
- package/types/components/MenuList/MenuListGroup.d.ts +5 -5
- package/types/components/MenuList/MenuListItem.d.ts +13 -14
- package/types/components/NumericInput/NumericInput.d.ts +5 -5
- package/types/components/NumericInput/numericInputUtils.d.ts +2 -2
- package/types/components/Output/Output.d.ts +2 -2
- package/types/components/Overlay/Overlay.d.ts +3 -3
- package/types/components/Popover/Popover.d.ts +4 -0
- package/types/components/Popover/PopoverAnchor.d.ts +4 -0
- package/types/components/Popover/PopoverClose.d.ts +5 -5
- package/types/components/Popover/PopoverContent.d.ts +5 -5
- package/types/components/Popover/PopoverTrigger.d.ts +3 -3
- package/types/components/Portal/Portal.d.ts +3 -3
- package/types/components/Printer/Printer.d.ts +1 -1
- package/types/components/Printer/PrinterContent.d.ts +5 -5
- package/types/components/Printer/PrinterTrigger.d.ts +4 -4
- package/types/components/RadioGroup/Radio.d.ts +23 -13
- package/types/components/RadioGroup/RadioGroup.d.ts +19 -16
- package/types/components/Root/Root.d.ts +9 -9
- package/types/components/Root/RootElement.d.ts +3 -3
- package/types/components/Select/Option.d.ts +3 -4
- package/types/components/Select/OptionsGroup.d.ts +3 -4
- package/types/components/Select/Select.d.ts +17 -13
- package/types/components/Select/SelectContext.d.ts +6 -12
- package/types/components/Select/SelectNative.d.ts +3 -3
- package/types/components/Select/selectUtils.d.ts +3 -0
- package/types/components/Separator/Separator.d.ts +3 -3
- package/types/components/Slot/Slot.d.ts +5 -0
- package/types/components/Slot/Slottable.d.ts +2 -2
- package/types/components/Spinner/Spinner.d.ts +3 -3
- package/types/components/Stack/Stack.d.ts +4 -4
- package/types/components/Stack/StackContext.d.ts +9 -0
- package/types/components/Stepper/Step.d.ts +6 -6
- package/types/components/Stepper/StepContent.d.ts +5 -5
- package/types/components/Stepper/StepList.d.ts +3 -3
- package/types/components/Stepper/Stepper.d.ts +6 -6
- package/types/components/Stepper/StepperFinishTrigger.d.ts +5 -5
- package/types/components/Stepper/StepperNextTrigger.d.ts +5 -5
- package/types/components/Stepper/StepperPreviousTrigger.d.ts +5 -5
- package/types/components/Table/Table.d.ts +15 -10
- package/types/components/Table/TableBody.d.ts +3 -3
- package/types/components/Table/TableCell.d.ts +3 -3
- package/types/components/Table/TableColumn.d.ts +29 -21
- package/types/components/Table/TableColumnGroup.d.ts +38 -0
- package/types/components/Table/TableContext.d.ts +1 -1
- package/types/components/Table/TableFoot.d.ts +3 -3
- package/types/components/Table/TableHead.d.ts +15 -7
- package/types/components/Table/TableRow.d.ts +3 -3
- package/types/components/Table/columnUtils.d.ts +11 -17
- package/types/components/Table/index.d.ts +1 -0
- package/types/components/Tabs/Tab.d.ts +7 -7
- package/types/components/Tabs/TabContent.d.ts +4 -4
- package/types/components/Tabs/TabList.d.ts +8 -8
- package/types/components/Tabs/Tabs.d.ts +8 -6
- package/types/components/Tag/Badge.d.ts +2 -2
- package/types/components/Tag/Tag.d.ts +10 -10
- package/types/components/TextArea/TextArea.d.ts +2 -2
- package/types/components/Toast/Toast.d.ts +13 -13
- package/types/components/Toast/ToastDescription.d.ts +4 -0
- package/types/components/Toast/ToastProvider.d.ts +2 -2
- package/types/components/Toast/ToastTitle.d.ts +3 -3
- package/types/components/Toast/ToastViewport.d.ts +3 -3
- package/types/components/Tooltip/Tooltip.d.ts +5 -5
- package/types/components/Tooltip/TooltipProvider.d.ts +4 -0
- package/types/components/VisuallyHidden/VisuallyHidden.d.ts +2 -2
- package/types/index.d.ts +1 -2
- package/types/providers/AlertDialogProvider/AlertDialogProviderContext.d.ts +12 -12
- package/types/providers/ErrorReportingProvider/ErrorReportingProvider.d.ts +1 -1
- package/types/providers/LocalizationProvider/LocalizationObject.d.ts +2 -3
- package/types/providers/ToastManagerProvider/ToastManagerContext.d.ts +6 -6
- package/types/utils/__tests__/combineEventHandlers.test.d.ts +1 -0
- package/types/utils/__tests__/cx.test.d.ts +1 -0
- package/types/utils/__tests__/numericStringUtils.test.d.ts +1 -0
- package/types/utils/__tests__/useNumericTrasformer.test.d.ts +1 -0
- package/types/utils/documentTitleUtils.d.ts +4 -0
- package/types/utils/filtering.d.ts +1 -1
- package/types/utils/parseChildren.d.ts +64 -0
- package/types/utils/polymorphicTypes.d.ts +2 -13
- package/types/utils/sorting.d.ts +2 -2
- package/types/utils/useLocation.d.ts +3 -3
- package/types/utils/useNumericTransformer.d.ts +9 -6
- package/scss/components/FeedbackList/_FeedbackList-variables.scss +0 -6
- package/scss/components/FeedbackList/_FeedbackList.scss +0 -32
- package/scss/components/FeedbackPopover/_FeedbackPopover-variables.scss +0 -26
- package/scss/components/FeedbackPopover/_FeedbackPopover.scss +0 -66
- package/types/components/FeedbackList/FeedbackList.d.ts +0 -6
- package/types/components/FeedbackList/FeedbackListContext.d.ts +0 -4
- package/types/components/FeedbackList/index.d.ts +0 -2
- package/types/components/FeedbackPopover/index.d.ts +0 -2
- package/types/components/Field/FieldProvider.d.ts +0 -13
- /package/types/components/{FeedbackPopover → Feedback}/FeedbackPopoverContext.d.ts +0 -0
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import {
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import { type CalendarProps } from "../Calendar";
|
|
3
3
|
import { type ControlNonFileInputProps } from "../Control";
|
|
4
|
+
import { type ControlAddonProps } from "../ControlAddon";
|
|
4
5
|
import type { FormValidationMode } from "../Form";
|
|
5
6
|
import { type FormControlValidateFn } from "../Form/useRegisterFormControl.ts";
|
|
6
|
-
import {
|
|
7
|
+
import { type IconProps } from "../Icon";
|
|
8
|
+
import { type PopoverContentProps } from "../Popover";
|
|
9
|
+
import { type TooltipProps } from "../Tooltip";
|
|
7
10
|
/** Properties of the date input component. */
|
|
8
11
|
export interface DateInputProps extends Omit<ControlNonFileInputProps, "defaultValue" | "value" | "onValueChange"> {
|
|
9
12
|
/** Date input's default value. */
|
|
@@ -18,26 +21,26 @@ export interface DateInputProps extends Omit<ControlNonFileInputProps, "defaultV
|
|
|
18
21
|
onValueChange?: (valueRepresentations: DateValueRepresentations) => void;
|
|
19
22
|
/**
|
|
20
23
|
* Minimum date allowed. When a string it provided, it should represent the
|
|
21
|
-
* date in the ISO 8601 format,
|
|
22
|
-
*
|
|
24
|
+
* date in the ISO 8601 format, i.e. `"2020-01-01"` should be provided instead
|
|
25
|
+
* of a formatted `"01/01/2020"`.
|
|
23
26
|
*/
|
|
24
27
|
minDate?: string | Date | null;
|
|
25
28
|
/**
|
|
26
29
|
* Maximum date allowed. When a string it provided, it should represent the
|
|
27
|
-
* date in the ISO 8601 format,
|
|
28
|
-
*
|
|
30
|
+
* date in the ISO 8601 format, i.e. `"2020-01-01"` should be provided instead
|
|
31
|
+
* of a formatted `"01/01/2020"`.
|
|
29
32
|
*/
|
|
30
33
|
maxDate?: string | Date | null;
|
|
31
34
|
/**
|
|
32
35
|
* Minimum month allowed. When a string it provided, it should represent the
|
|
33
|
-
* date in the ISO 8601 format,
|
|
34
|
-
*
|
|
36
|
+
* date in the ISO 8601 format, i.e. `"2020-01"` should be provided instead of
|
|
37
|
+
* a formatted `"01/2020"`.
|
|
35
38
|
*/
|
|
36
39
|
minMonth?: string | Date | null;
|
|
37
40
|
/**
|
|
38
41
|
* Maximum month allowed. When a string it provided, it should represent the
|
|
39
|
-
* date in the ISO 8601 format,
|
|
40
|
-
*
|
|
42
|
+
* date in the ISO 8601 format, i.e. `"2020-01"` should be provided instead of
|
|
43
|
+
* a formatted `"01/2020"`.
|
|
41
44
|
*/
|
|
42
45
|
maxMonth?: string | Date | null;
|
|
43
46
|
/** Minimum year allowed. */
|
|
@@ -74,10 +77,16 @@ export interface DateInputProps extends Omit<ControlNonFileInputProps, "defaultV
|
|
|
74
77
|
calendarButtonLabel?: ReactNode;
|
|
75
78
|
/** Function called whenever the popover's open state changes. */
|
|
76
79
|
onPopoverOpenChange?: (open: boolean) => void;
|
|
80
|
+
/** Properties to pass to the calendar button tooltip component. */
|
|
81
|
+
calendarButtonTooltipProps?: Omit<TooltipProps, "content" | "children">;
|
|
82
|
+
/** Properties to pass to the calendar button component. */
|
|
83
|
+
calendarButtonProps?: Omit<ControlAddonProps<"button">, "as" | "asChild" | "children">;
|
|
84
|
+
/** Properties to pass to the calendar button icon component. */
|
|
85
|
+
calendarButtonIconProps?: Omit<IconProps, "label">;
|
|
77
86
|
/** Properties to pass to the calendar component. */
|
|
78
|
-
calendarProps?: Omit<
|
|
87
|
+
calendarProps?: Omit<CalendarProps, "selectionMode" | "defaultValue" | "value" | "onValueChange" | "minDate" | "maxDate" | "minMonth" | "maxMonth" | "minYear" | "maxYear">;
|
|
79
88
|
/** Properties to pass to the popover content component. */
|
|
80
|
-
popoverContentProps?:
|
|
89
|
+
popoverContentProps?: Omit<PopoverContentProps, "children">;
|
|
81
90
|
}
|
|
82
91
|
/** Representations of the date value. */
|
|
83
92
|
export interface DateValueRepresentations {
|
|
@@ -91,10 +100,10 @@ export interface DateValueRepresentations {
|
|
|
91
100
|
/**
|
|
92
101
|
* The date input component is used to allow a user to enter a date with the aid
|
|
93
102
|
* of a popover calendar. It is built on top of the
|
|
94
|
-
* [`Input`](
|
|
95
|
-
* [`Popover`](
|
|
96
|
-
* [`Calendar`](
|
|
97
|
-
*
|
|
103
|
+
* [`Input`](/docs/ostack-ui-forms-input--docs),
|
|
104
|
+
* [`Popover`](/docs/ostack-ui-overlay-popover--docs), and
|
|
105
|
+
* [`Calendar`](/docs/ostack-ui-data-display-calendar--docs) components (and, by
|
|
106
|
+
* extension, the browser's [`<input>`
|
|
98
107
|
* element](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input)).
|
|
99
108
|
*
|
|
100
109
|
* For accessibility purposes, date inputs are usually included within a `Field`
|
|
@@ -110,4 +119,4 @@ export interface DateValueRepresentations {
|
|
|
110
119
|
* }
|
|
111
120
|
* ```
|
|
112
121
|
*/
|
|
113
|
-
export declare
|
|
122
|
+
export declare function DateInput({ name, value: controlledValue, defaultValue, onValueChange, onChange, onFocus, disabled, loading, readOnly, status, showClearButton, endAdornment, minDate, maxDate, minMonth, maxMonth, minYear, maxYear, required, autoComplete, format, announcedFormat, formatDescription, selectedDateDescription, form, validate, validationMode, calendarButtonLabel, onPopoverOpenChange, onBlurToOutside, containerProps, clearButtonProps, calendarButtonTooltipProps, calendarButtonProps, calendarButtonIconProps, calendarProps, popoverContentProps, className, placeholder, "aria-disabled": ariaDisabled, "aria-describedby": ariaDescribedBy, ref, ...otherProps }: DateInputProps): import("react").JSX.Element;
|
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type ComponentProps, type CSSProperties, type FocusEvent, type ReactNode } from "react";
|
|
2
2
|
import { type Responsive } from "../../utils/useResponsiveValues.ts";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { type CalendarProps, type DateRange } from "../Calendar";
|
|
4
|
+
import { type CloseButtonProps } from "../CloseButton";
|
|
5
5
|
import { type ControlShowClearButton, type ControlStatus, type ControlVariant } from "../Control";
|
|
6
|
-
import {
|
|
6
|
+
import { type ControlAddonProps } from "../ControlAddon";
|
|
7
|
+
import { type ControlCodeProps } from "../ControlCode";
|
|
7
8
|
import type { FormValidationMode } from "../Form";
|
|
8
9
|
import { type FormControlValidateFn } from "../Form/useRegisterFormControl.ts";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
10
|
+
import { type IconProps } from "../Icon";
|
|
11
|
+
import { type PopoverAnchorProps, type PopoverContentProps } from "../Popover";
|
|
12
|
+
import { type SpinnerProps } from "../Spinner";
|
|
13
|
+
import { type TooltipProps } from "../Tooltip";
|
|
11
14
|
/** Date-range using formatted strings as dates. */
|
|
12
15
|
export interface FormattedRange {
|
|
13
16
|
/** Start of the date-range. */
|
|
@@ -23,7 +26,7 @@ export interface StringRange {
|
|
|
23
26
|
end: string | null;
|
|
24
27
|
}
|
|
25
28
|
/** Properties of the date-range input component. */
|
|
26
|
-
export interface DateRangeInputProps extends Omit<
|
|
29
|
+
export interface DateRangeInputProps extends Omit<ComponentProps<"div">, "defaultValue"> {
|
|
27
30
|
/** Name of the control. Both inputs will share the same name. */
|
|
28
31
|
name?: string;
|
|
29
32
|
/**
|
|
@@ -46,7 +49,7 @@ export interface DateRangeInputProps extends Omit<ComponentPropsWithoutRef<"div"
|
|
|
46
49
|
* value.
|
|
47
50
|
*/
|
|
48
51
|
onValueChange?: (valueRepresentations: DateRangeValueRepresentations) => void;
|
|
49
|
-
/**
|
|
52
|
+
/** Whether the data-range input is required. */
|
|
50
53
|
required?: boolean;
|
|
51
54
|
/** Disables the control. */
|
|
52
55
|
disabled?: boolean;
|
|
@@ -69,7 +72,7 @@ export interface DateRangeInputProps extends Omit<ComponentPropsWithoutRef<"div"
|
|
|
69
72
|
*
|
|
70
73
|
* When `true`, the date-range input is “soft-disabled”: it looks disabled and
|
|
71
74
|
* ignores user interaction but remains focusable. By default, spinners are
|
|
72
|
-
* shown (
|
|
75
|
+
* shown (i.e. `showSpinners` is set to `true` unless overridden).
|
|
73
76
|
*
|
|
74
77
|
* The date-range input's accessible description while loading can be
|
|
75
78
|
* controlled via `loadingDescription`.
|
|
@@ -124,6 +127,10 @@ export interface DateRangeInputProps extends Omit<ComponentPropsWithoutRef<"div"
|
|
|
124
127
|
align?: Responsive<CSSProperties["textAlign"]>;
|
|
125
128
|
/** Date-range input's start adornment. */
|
|
126
129
|
startAdornment?: ReactNode;
|
|
130
|
+
/** Date-range input's start-middle adornment. */
|
|
131
|
+
startMiddleAdornment?: ReactNode;
|
|
132
|
+
/** Date-range input's end-middle adornment. */
|
|
133
|
+
endMiddleAdornment?: ReactNode;
|
|
127
134
|
/** Date-range input's end adornment. */
|
|
128
135
|
endAdornment?: ReactNode;
|
|
129
136
|
/**
|
|
@@ -196,27 +203,33 @@ export interface DateRangeInputProps extends Omit<ComponentPropsWithoutRef<"div"
|
|
|
196
203
|
/** Form attribute of the inputs. */
|
|
197
204
|
form?: string;
|
|
198
205
|
/** Properties to pass to the code component. */
|
|
199
|
-
codeProps?:
|
|
206
|
+
codeProps?: ControlCodeProps;
|
|
200
207
|
/** Properties to pass to the popover anchor component. */
|
|
201
|
-
popoverAnchorProps?:
|
|
208
|
+
popoverAnchorProps?: PopoverAnchorProps;
|
|
202
209
|
/** Properties to pass to the start container element. */
|
|
203
|
-
startContainerProps?:
|
|
210
|
+
startContainerProps?: ComponentProps<"div">;
|
|
204
211
|
/** Properties to pass to the end container element. */
|
|
205
|
-
endContainerProps?:
|
|
212
|
+
endContainerProps?: ComponentProps<"div">;
|
|
206
213
|
/** Properties to pass to the input component representing the start date. */
|
|
207
|
-
startInputProps?:
|
|
214
|
+
startInputProps?: ComponentProps<"input">;
|
|
208
215
|
/** Properties to pass to the input component representing the end date. */
|
|
209
|
-
endInputProps?:
|
|
216
|
+
endInputProps?: ComponentProps<"input">;
|
|
210
217
|
/** Properties to pass to the button component that clears the start date. */
|
|
211
|
-
startClearButtonProps?:
|
|
218
|
+
startClearButtonProps?: CloseButtonProps;
|
|
212
219
|
/** Properties to pass to the button component that clears the end date. */
|
|
213
|
-
endClearButtonProps?:
|
|
220
|
+
endClearButtonProps?: CloseButtonProps;
|
|
214
221
|
/** Properties to pass to the spinner component. */
|
|
215
|
-
spinnerProps?: Omit<
|
|
222
|
+
spinnerProps?: Omit<SpinnerProps, "size">;
|
|
223
|
+
/** Properties to pass to the calendar button tooltip component. */
|
|
224
|
+
calendarButtonTooltipProps?: Omit<TooltipProps, "content" | "children">;
|
|
225
|
+
/** Properties to pass to the calendar button component. */
|
|
226
|
+
calendarButtonProps?: Omit<ControlAddonProps<"button">, "as" | "asChild" | "children">;
|
|
227
|
+
/** Properties to pass to the calendar button icon component. */
|
|
228
|
+
calendarButtonIconProps?: Omit<IconProps, "label">;
|
|
216
229
|
/** Properties to pass to the date-range picker component. */
|
|
217
|
-
calendarProps?: Omit<
|
|
230
|
+
calendarProps?: Omit<CalendarProps, "selectionMode" | "defaultValue" | "value" | "onValueChange" | "minDate" | "maxDate" | "minMonth" | "maxMonth" | "minYear" | "maxYear">;
|
|
218
231
|
/** Properties to pass to the popover content component. */
|
|
219
|
-
popoverContentProps?:
|
|
232
|
+
popoverContentProps?: PopoverContentProps;
|
|
220
233
|
}
|
|
221
234
|
/** Representations of the date-range value. */
|
|
222
235
|
export interface DateRangeValueRepresentations {
|
|
@@ -230,9 +243,9 @@ export interface DateRangeValueRepresentations {
|
|
|
230
243
|
/**
|
|
231
244
|
* The date-range input component displays two inputs used to allow a user to
|
|
232
245
|
* specify a date interval with the aid of popover calendars. It is built on top
|
|
233
|
-
* of the [`Popover`](
|
|
234
|
-
* [`Calendar`](
|
|
235
|
-
* as
|
|
246
|
+
* of the [`Popover`](/docs/ostack-ui-overlay-popover--docs) and
|
|
247
|
+
* [`Calendar`](/docs/ostack-ui-data-display-calendar--docs) components, as well
|
|
248
|
+
* as the browser's [`<input>`
|
|
236
249
|
* element](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input).
|
|
237
250
|
*
|
|
238
251
|
* For accessibility purposes, date-range inputs are usually included within a
|
|
@@ -254,4 +267,4 @@ export interface DateRangeValueRepresentations {
|
|
|
254
267
|
* }
|
|
255
268
|
* ```
|
|
256
269
|
*/
|
|
257
|
-
export declare
|
|
270
|
+
export declare function DateRangeInput({ name, variant, status, code, value: controlledValue, defaultValue, onValueChange, required, disabled, readOnly, minDate, maxDate, minMonth, maxMonth, minYear, maxYear, loading, loadingDescription, showSpinners, showStartSpinner, showEndSpinner, align, startAdornment, startMiddleAdornment, endMiddleAdornment, endAdornment, showClearButtons, clearButtonsLabel, format, announcedFormat, formatDescription, startInputLabel, endInputLabel, selectedDateDescription, selectedDateRangeDescription, calendarButtonLabel, placeholder, startPlaceholder, endPlaceholder, className, onPopoverOpenChange, onBlurToOutside, form, validate, validationMode, codeProps, popoverAnchorProps, startContainerProps, endContainerProps, startInputProps, endInputProps, startClearButtonProps, endClearButtonProps, spinnerProps, calendarButtonTooltipProps, calendarButtonProps, calendarButtonIconProps, calendarProps, popoverContentProps, "aria-disabled": ariaDisabled, ...otherProps }: DateRangeInputProps): import("react").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
2
|
import { type GridContainerProps } from "../Grid";
|
|
3
3
|
/** Properties of the description list component. */
|
|
4
|
-
export interface DescriptionListProps extends Pick<GridContainerProps, "asChild" | "columns" | "gap" | "rowGap" | "columnGap">,
|
|
4
|
+
export interface DescriptionListProps extends Pick<GridContainerProps, "asChild" | "columns" | "gap" | "rowGap" | "columnGap">, ComponentProps<"dl"> {
|
|
5
5
|
}
|
|
6
6
|
/**
|
|
7
7
|
* A list of descriptions pairing terms with their associated details. Built on
|
|
@@ -11,7 +11,7 @@ export interface DescriptionListProps extends Pick<GridContainerProps, "asChild"
|
|
|
11
11
|
* and
|
|
12
12
|
* [`<dd>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/dd)
|
|
13
13
|
* elements, as well as the [`Grid`
|
|
14
|
-
* component](
|
|
14
|
+
* component](/docs/ostack-ui-layout-grid--docs) for layout.
|
|
15
15
|
*
|
|
16
16
|
* It composes the following subcomponent:
|
|
17
17
|
*
|
|
@@ -35,4 +35,4 @@ export interface DescriptionListProps extends Pick<GridContainerProps, "asChild"
|
|
|
35
35
|
* }
|
|
36
36
|
* ```
|
|
37
37
|
*/
|
|
38
|
-
export declare
|
|
38
|
+
export declare function DescriptionList({ asChild, columns, gap, rowGap, columnGap, className, ...otherProps }: DescriptionListProps): import("react").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ComponentProps, ReactNode } from "react";
|
|
2
2
|
import { type GridItemProps } from "../Grid";
|
|
3
3
|
/** Properties of the description list item component. */
|
|
4
4
|
export interface DescriptionListItemProps extends GridItemProps {
|
|
@@ -7,9 +7,9 @@ export interface DescriptionListItemProps extends GridItemProps {
|
|
|
7
7
|
/** Details of the description list item. */
|
|
8
8
|
children: ReactNode;
|
|
9
9
|
/** Properties to pass to the description term element. */
|
|
10
|
-
descriptionTermProps?:
|
|
10
|
+
descriptionTermProps?: ComponentProps<"dt">;
|
|
11
11
|
/** Properties to pass to the description details element. */
|
|
12
|
-
descriptionDetailsProps?:
|
|
12
|
+
descriptionDetailsProps?: ComponentProps<"dd">;
|
|
13
13
|
}
|
|
14
14
|
/** Item of the description list: a grouping of a term and its details. */
|
|
15
|
-
export declare
|
|
15
|
+
export declare function DescriptionListItem({ term, children, descriptionTermProps, descriptionDetailsProps, className, ...otherProps }: DescriptionListItemProps): import("react").JSX.Element;
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import { Dialog as DialogPrimitive } from "radix-ui";
|
|
2
|
+
import type { ComponentProps } from "react";
|
|
3
|
+
/** Properties of the dialog component. */
|
|
4
|
+
export interface DialogProps extends ComponentProps<typeof DialogPrimitive.Root> {
|
|
5
|
+
}
|
|
2
6
|
/**
|
|
3
7
|
* The dialog component displays a “window” overlaid on either the main screen
|
|
4
8
|
* or another dialog window, rendering the content underneath inert.
|
|
5
9
|
*
|
|
6
10
|
* Built on top of the [Radix Dialog
|
|
7
11
|
* primitive](https://www.radix-ui.com/primitives/docs/components/dialog), and
|
|
8
|
-
* the [`Card` component](
|
|
12
|
+
* the [`Card` component](/docs/ostack-ui-data-display-card--docs).
|
|
9
13
|
*
|
|
10
14
|
* It composes the following subcomponents:
|
|
11
15
|
*
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import { CardBody } from "../Card";
|
|
1
|
+
import { type CardBodyProps } from "../Card";
|
|
3
2
|
/** Properties of the dialog body component. */
|
|
4
|
-
export interface DialogBodyProps extends
|
|
3
|
+
export interface DialogBodyProps extends CardBodyProps {
|
|
5
4
|
}
|
|
6
5
|
/** Body section of the dialog. */
|
|
7
|
-
export declare
|
|
6
|
+
export declare function DialogBody({ className, ...otherProps }: DialogBodyProps): import("react").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Dialog as DialogPrimitive } from "radix-ui";
|
|
2
|
-
import {
|
|
2
|
+
import type { ComponentProps } from "react";
|
|
3
3
|
/** Properties of the dialog close component. */
|
|
4
|
-
export interface DialogCloseProps extends Omit<
|
|
4
|
+
export interface DialogCloseProps extends Omit<ComponentProps<typeof DialogPrimitive.Close>, "asChild"> {
|
|
5
5
|
}
|
|
6
6
|
/** Button which closes the dialog. */
|
|
7
|
-
export declare
|
|
7
|
+
export declare function DialogClose(props: DialogCloseProps): import("react").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Dialog as DialogPrimitive } from "radix-ui";
|
|
2
|
-
import { type
|
|
2
|
+
import { type ComponentProps } from "react";
|
|
3
3
|
import { type CardColor, type CardVariant } from "../Card";
|
|
4
|
-
import {
|
|
4
|
+
import { type OverlayProps } from "../Overlay";
|
|
5
5
|
/** Dialog content variants. */
|
|
6
6
|
export type DialogContentVariant = CardVariant;
|
|
7
7
|
/** Possible dialog content colors. */
|
|
@@ -9,7 +9,7 @@ export type DialogContentColor = CardColor;
|
|
|
9
9
|
/** Possible dialog content sizes. */
|
|
10
10
|
export type DialogContentSize = "sm" | "md" | "lg" | "xl";
|
|
11
11
|
/** Properties of the dialog content component. */
|
|
12
|
-
export interface DialogContentProps extends
|
|
12
|
+
export interface DialogContentProps extends ComponentProps<typeof DialogPrimitive.Content> {
|
|
13
13
|
/**
|
|
14
14
|
* Dialog content variant.
|
|
15
15
|
*
|
|
@@ -37,9 +37,9 @@ export interface DialogContentProps extends ComponentPropsWithoutRef<typeof Dial
|
|
|
37
37
|
*/
|
|
38
38
|
size?: DialogContentSize;
|
|
39
39
|
/** Properties to pass to the portal component. */
|
|
40
|
-
portalProps?: Omit<
|
|
40
|
+
portalProps?: Omit<ComponentProps<typeof DialogPrimitive.Portal>, "forceMount">;
|
|
41
41
|
/** Properties to pass to the `Overlay` component. */
|
|
42
|
-
overlayProps?:
|
|
42
|
+
overlayProps?: OverlayProps;
|
|
43
43
|
}
|
|
44
44
|
/** Content to be rendered in the open dialog. */
|
|
45
|
-
export declare
|
|
45
|
+
export declare function DialogContent({ asChild, variant, mergeSections, color, size, forceMount, onPointerDownOutside, portalProps, overlayProps, className, children, ...otherProps }: DialogContentProps): import("react").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Dialog as DialogPrimitive } from "radix-ui";
|
|
2
|
-
import {
|
|
2
|
+
import type { ComponentProps } from "react";
|
|
3
3
|
/** Properties of the dialog description component. */
|
|
4
|
-
export interface DialogDescriptionProps extends
|
|
4
|
+
export interface DialogDescriptionProps extends ComponentProps<typeof DialogPrimitive.Description> {
|
|
5
5
|
}
|
|
6
6
|
/**
|
|
7
7
|
* Optional accessible description to be announced when the dialog is opened.
|
|
@@ -10,4 +10,4 @@ export interface DialogDescriptionProps extends ComponentPropsWithoutRef<typeof
|
|
|
10
10
|
* the description entirely, pass `aria-describedby={undefined}` to the
|
|
11
11
|
* `DialogContent` and omit this component.
|
|
12
12
|
*/
|
|
13
|
-
export declare
|
|
13
|
+
export declare function DialogDescription({ className, ...otherProps }: DialogDescriptionProps): import("react").JSX.Element;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import { CardFooter } from "../Card";
|
|
1
|
+
import { type CardFooterProps } from "../Card";
|
|
3
2
|
/** Properties of the dialog footer component. */
|
|
4
|
-
export interface DialogFooterProps extends
|
|
3
|
+
export interface DialogFooterProps extends CardFooterProps {
|
|
5
4
|
}
|
|
6
5
|
/** Footer section of the dialog. */
|
|
7
|
-
export declare
|
|
6
|
+
export declare function DialogFooter({ className, ...otherProps }: DialogFooterProps): import("react").JSX.Element;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import {
|
|
3
|
-
import { CloseButton } from "../CloseButton";
|
|
1
|
+
import { type CardHeaderProps } from "../Card";
|
|
2
|
+
import { type CloseButtonProps } from "../CloseButton";
|
|
4
3
|
/** Properties of the dialog header component. */
|
|
5
|
-
export interface DialogHeaderProps extends
|
|
4
|
+
export interface DialogHeaderProps extends CardHeaderProps {
|
|
6
5
|
/**
|
|
7
6
|
* Whether to show a close button.
|
|
8
7
|
*
|
|
@@ -10,7 +9,7 @@ export interface DialogHeaderProps extends ComponentPropsWithoutRef<typeof CardH
|
|
|
10
9
|
*/
|
|
11
10
|
showCloseButton?: boolean;
|
|
12
11
|
/** Properties to pass to the close button component. */
|
|
13
|
-
closeButtonProps?:
|
|
12
|
+
closeButtonProps?: CloseButtonProps;
|
|
14
13
|
}
|
|
15
14
|
/** Header section of the dialog. */
|
|
16
|
-
export declare
|
|
15
|
+
export declare function DialogHeader({ showCloseButton, closeButtonProps, className, children, ...otherProps }: DialogHeaderProps): import("react").JSX.Element;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Dialog as DialogPrimitive } from "radix-ui";
|
|
2
|
-
import {
|
|
3
|
-
import type {
|
|
2
|
+
import type { ComponentProps } from "react";
|
|
3
|
+
import type { PolymorphicProps } from "../../utils/polymorphicTypes.ts";
|
|
4
4
|
/** Element a dialog title can be rendered as. */
|
|
5
5
|
export type DialogTitleAs = "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "div" | "span";
|
|
6
6
|
/** Properties of the dialog title component. */
|
|
7
7
|
export type DialogTitleProps<TAs extends DialogTitleAs = "h2"> = PolymorphicProps<DialogTitleAs, TAs, "h2", DialogTitleOwnProps>;
|
|
8
8
|
/** Own properties of the dialog title component. */
|
|
9
|
-
export interface DialogTitleOwnProps extends Pick<
|
|
9
|
+
export interface DialogTitleOwnProps extends Pick<ComponentProps<typeof DialogPrimitive.Title>, "asChild"> {
|
|
10
10
|
}
|
|
11
11
|
/** Accessible title to be announced when the dialog is opened. */
|
|
12
|
-
export declare
|
|
12
|
+
export declare function DialogTitle<TAs extends DialogTitleAs = "h2">({ as, asChild, className, ...otherProps }: DialogTitleProps<TAs>): import("react").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Dialog as DialogPrimitive } from "radix-ui";
|
|
2
|
-
import {
|
|
2
|
+
import type { ComponentProps } from "react";
|
|
3
3
|
/** Properties of the dialog trigger component. */
|
|
4
|
-
export interface DialogTriggerProps extends Omit<
|
|
4
|
+
export interface DialogTriggerProps extends Omit<ComponentProps<typeof DialogPrimitive.Trigger>, "asChild"> {
|
|
5
5
|
}
|
|
6
6
|
/** The button which, when pressed, opens the dialog. */
|
|
7
|
-
export declare
|
|
7
|
+
export declare function DialogTrigger(props: DialogTriggerProps): import("react").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui";
|
|
2
|
-
import type {
|
|
2
|
+
import type { ComponentProps, FunctionComponent } from "react";
|
|
3
3
|
/** Properties of the dropdown menu component. */
|
|
4
|
-
export interface DropdownMenuProps extends Omit<
|
|
4
|
+
export interface DropdownMenuProps extends Omit<ComponentProps<typeof DropdownMenuPrimitive.Root>, "dir"> {
|
|
5
5
|
}
|
|
6
6
|
/**
|
|
7
7
|
* Menu displayed within a dropdown, containing a set of actions.
|
|
@@ -9,7 +9,7 @@ export interface DropdownMenuProps extends Omit<ComponentPropsWithoutRef<typeof
|
|
|
9
9
|
* Built on top of the [Radix Dropdown Menu
|
|
10
10
|
* primitive](https://www.radix-ui.com/primitives/docs/components/dropdown-menu)
|
|
11
11
|
* and the [`MenuList`
|
|
12
|
-
* component](
|
|
12
|
+
* component](/docs/ostack-ui-data-display-menu-list--docs).
|
|
13
13
|
*
|
|
14
14
|
* It composes the following subcomponents:
|
|
15
15
|
*
|
|
@@ -63,4 +63,4 @@ export interface DropdownMenuProps extends Omit<ComponentPropsWithoutRef<typeof
|
|
|
63
63
|
* }
|
|
64
64
|
* ```
|
|
65
65
|
*/
|
|
66
|
-
export declare const DropdownMenu:
|
|
66
|
+
export declare const DropdownMenu: FunctionComponent<DropdownMenuProps>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui";
|
|
2
|
-
import { type
|
|
2
|
+
import { type ComponentProps } from "react";
|
|
3
3
|
import type { CheckboxChecked } from "../Checkbox";
|
|
4
|
-
import {
|
|
4
|
+
import { type IconProps } from "../Icon";
|
|
5
5
|
import { type MenuListItemProps } from "../MenuList";
|
|
6
6
|
/** Properties of the dropdown menu checkbox item. */
|
|
7
|
-
export interface DropdownMenuCheckboxItemProps extends Omit<
|
|
7
|
+
export interface DropdownMenuCheckboxItemProps extends Omit<ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>, "asChild" | "color">, Pick<MenuListItemProps, "color" | "loading" | "loadingContent" | "showSpinner" | "iconPlacement" | "keybinds" | "actionProps" | "contentProps" | "iconProps" | "spinnerProps" | "keybindsProps"> {
|
|
8
8
|
/**
|
|
9
9
|
* Whether to show the checkbox.
|
|
10
10
|
*
|
|
@@ -18,7 +18,7 @@ export interface DropdownMenuCheckboxItemProps extends Omit<ComponentPropsWithou
|
|
|
18
18
|
*/
|
|
19
19
|
onCheckedChange?: (value: CheckboxChecked) => void;
|
|
20
20
|
/** Properties to pass to the checkbox indicator component. */
|
|
21
|
-
indicatorProps?: Omit<
|
|
21
|
+
indicatorProps?: Omit<IconProps, "icon">;
|
|
22
22
|
}
|
|
23
23
|
/** A dropdown menu item that can be controlled and rendered like a checkbox. */
|
|
24
|
-
export declare
|
|
24
|
+
export declare function DropdownMenuCheckboxItem({ showCheckbox, defaultChecked, checked: controlledChecked, onCheckedChange, onSelect, color, disabled, loading, loadingContent, showSpinner, iconPlacement, keybinds, actionProps, contentProps, iconProps, spinnerProps, keybindsProps, indicatorProps, className, "aria-disabled": ariaDisabled, ...otherProps }: DropdownMenuCheckboxItemProps): import("react").JSX.Element;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui";
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
2
|
+
import type { ComponentProps } from "react";
|
|
3
|
+
import { type MenuListProps } from "../MenuList";
|
|
4
4
|
/** Properties of the dropdown menu content component. */
|
|
5
|
-
export interface DropdownMenuContentProps extends Omit<
|
|
5
|
+
export interface DropdownMenuContentProps extends Omit<ComponentProps<typeof DropdownMenuPrimitive.Content>, "asChild">, Pick<MenuListProps, "variant" | "iconPlacement"> {
|
|
6
6
|
/**
|
|
7
7
|
* Whether to show an arrow pointing to the anchor.
|
|
8
8
|
*
|
|
@@ -10,11 +10,11 @@ export interface DropdownMenuContentProps extends Omit<ComponentPropsWithoutRef<
|
|
|
10
10
|
*/
|
|
11
11
|
showArrow?: boolean;
|
|
12
12
|
/** Properties to pass to the portal component. */
|
|
13
|
-
portalProps?: Omit<
|
|
13
|
+
portalProps?: Omit<ComponentProps<typeof DropdownMenuPrimitive.Portal>, "forceMount">;
|
|
14
14
|
/** Properties to pass to the arrow component. */
|
|
15
|
-
arrowProps?:
|
|
15
|
+
arrowProps?: ComponentProps<typeof DropdownMenuPrimitive.Arrow>;
|
|
16
16
|
/** Properties to pass to the menu list component. */
|
|
17
|
-
menuListProps?: Omit<
|
|
17
|
+
menuListProps?: Omit<MenuListProps, "variant" | "iconPlacement" | "asChild">;
|
|
18
18
|
}
|
|
19
19
|
/** The component that pops out when the dropdown menu is open. */
|
|
20
|
-
export declare
|
|
20
|
+
export declare function DropdownMenuContent({ variant, iconPlacement, showArrow, sideOffset, collisionPadding, forceMount, className, portalProps, arrowProps, menuListProps, children, ...otherProps }: DropdownMenuContentProps): import("react").JSX.Element;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui";
|
|
2
|
-
import {
|
|
2
|
+
import type { ComponentProps } from "react";
|
|
3
3
|
import { type MenuListGroupProps } from "../MenuList";
|
|
4
4
|
/** Properties of the dropdown menu group. */
|
|
5
|
-
export interface DropdownMenuGroupProps extends Omit<
|
|
5
|
+
export interface DropdownMenuGroupProps extends Omit<ComponentProps<typeof DropdownMenuPrimitive.Group>, "asChild">, Pick<MenuListGroupProps, "label" | "itemProps" | "labelProps"> {
|
|
6
6
|
}
|
|
7
7
|
/** Component used to group multiple dropdown menu items. */
|
|
8
|
-
export declare
|
|
8
|
+
export declare function DropdownMenuGroup({ label, itemProps, labelProps, className, ...otherProps }: DropdownMenuGroupProps): import("react").JSX.Element;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui";
|
|
2
|
-
import { type
|
|
2
|
+
import { type ComponentProps } from "react";
|
|
3
3
|
import { type MenuListItemProps } from "../MenuList";
|
|
4
4
|
/** Properties of the dropdown menu item. */
|
|
5
|
-
export interface DropdownMenuItemProps extends Omit<
|
|
5
|
+
export interface DropdownMenuItemProps extends Omit<ComponentProps<typeof DropdownMenuPrimitive.Item>, "asChild" | "color">, Pick<MenuListItemProps, "selected" | "color" | "loading" | "loadingContent" | "showSpinner" | "icon" | "iconPlacement" | "keybinds" | "href" | "target" | "rel" | "actionProps" | "contentProps" | "iconProps" | "spinnerProps" | "keybindsProps"> {
|
|
6
6
|
/**
|
|
7
7
|
* Render the item as a link. When set, you can pass `href`, `target`, and
|
|
8
8
|
* `rel` properties to the item.
|
|
@@ -11,5 +11,5 @@ export interface DropdownMenuItemProps extends Omit<ComponentPropsWithoutRef<typ
|
|
|
11
11
|
*/
|
|
12
12
|
asLink?: boolean;
|
|
13
13
|
}
|
|
14
|
-
/**
|
|
15
|
-
export declare
|
|
14
|
+
/** Dropdown menu item. */
|
|
15
|
+
export declare function DropdownMenuItem({ onSelect, asLink, selected, color, disabled, loading, loadingContent, showSpinner, icon, iconPlacement, keybinds, href, target, rel, actionProps, contentProps, iconProps, spinnerProps, keybindsProps, className, "aria-disabled": ariaDisabled, ...otherProps }: DropdownMenuItemProps): import("react").JSX.Element;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui";
|
|
2
|
-
import {
|
|
2
|
+
import type { ComponentProps } from "react";
|
|
3
3
|
import { type MenuListGroupProps } from "../MenuList";
|
|
4
4
|
/** Properties of the dropdown menu radio group. */
|
|
5
|
-
export interface DropdownMenuRadioGroupProps extends Omit<
|
|
5
|
+
export interface DropdownMenuRadioGroupProps extends Omit<ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>, "asChild">, Pick<MenuListGroupProps, "label" | "itemProps" | "labelProps"> {
|
|
6
6
|
}
|
|
7
7
|
/** Component used to group multiple dropdown menu radio items. */
|
|
8
|
-
export declare
|
|
8
|
+
export declare function DropdownMenuRadioGroup({ label, itemProps, labelProps, className, ...otherProps }: DropdownMenuRadioGroupProps): import("react").JSX.Element;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui";
|
|
2
|
-
import { type
|
|
2
|
+
import { type ComponentProps } from "react";
|
|
3
3
|
import { type MenuListItemProps } from "../MenuList";
|
|
4
4
|
/** Properties of the dropdown menu radio item. */
|
|
5
|
-
export interface DropdownMenuRadioItemProps extends Omit<
|
|
5
|
+
export interface DropdownMenuRadioItemProps extends Omit<ComponentProps<typeof DropdownMenuPrimitive.RadioItem>, "asChild" | "color">, Pick<MenuListItemProps, "color" | "loading" | "loadingContent" | "showSpinner" | "iconPlacement" | "keybinds" | "actionProps" | "contentProps" | "iconProps" | "spinnerProps" | "keybindsProps"> {
|
|
6
6
|
/**
|
|
7
7
|
* Whether to show the radio.
|
|
8
8
|
*
|
|
@@ -10,7 +10,7 @@ export interface DropdownMenuRadioItemProps extends Omit<ComponentPropsWithoutRe
|
|
|
10
10
|
*/
|
|
11
11
|
showRadio?: boolean;
|
|
12
12
|
/** Properties to pass to the indicator component. */
|
|
13
|
-
indicatorProps?:
|
|
13
|
+
indicatorProps?: ComponentProps<typeof DropdownMenuPrimitive.ItemIndicator>;
|
|
14
14
|
}
|
|
15
15
|
/** A dropdown menu item that can be controlled and rendered like a radio. */
|
|
16
|
-
export declare
|
|
16
|
+
export declare function DropdownMenuRadioItem({ showRadio, onSelect, color, disabled, loading, loadingContent, showSpinner, iconPlacement, keybinds, actionProps, contentProps, iconProps, spinnerProps, keybindsProps, indicatorProps, className, "aria-disabled": ariaDisabled, ...otherProps }: DropdownMenuRadioItemProps): import("react").JSX.Element;
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui";
|
|
2
|
+
import type { ComponentProps } from "react";
|
|
3
|
+
/** Properties of the dropdown menu sub component. */
|
|
4
|
+
export interface DropdownMenuSubProps extends ComponentProps<typeof DropdownMenuPrimitive.Sub> {
|
|
5
|
+
}
|
|
2
6
|
/** Container used to render a submenu. */
|
|
3
7
|
export declare const DropdownMenuSub: import("react").FC<DropdownMenuPrimitive.DropdownMenuSubProps>;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui";
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
2
|
+
import type { ComponentProps } from "react";
|
|
3
|
+
import { type MenuListProps } from "../MenuList";
|
|
4
4
|
/** Properties of the dropdown menu sub content component. */
|
|
5
|
-
export interface DropdownMenuSubContentProps extends Omit<
|
|
5
|
+
export interface DropdownMenuSubContentProps extends Omit<ComponentProps<typeof DropdownMenuPrimitive.SubContent>, "asChild">, Pick<MenuListProps, "variant" | "iconPlacement"> {
|
|
6
6
|
/** Properties to pass to the menu list component. */
|
|
7
|
-
menuListProps?: Omit<
|
|
7
|
+
menuListProps?: Omit<MenuListProps, "variant" | "iconPlacement" | "asChild">;
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
10
|
* The component that pops out when a submenu is open. Must be rendered inside
|
|
11
11
|
* `DropdownMenuSub`.
|
|
12
12
|
*/
|
|
13
|
-
export declare
|
|
13
|
+
export declare function DropdownMenuSubContent({ variant, iconPlacement, sideOffset, alignOffset, className, children, menuListProps, ...otherProps }: DropdownMenuSubContentProps): import("react").JSX.Element;
|