@carbon/react 1.48.1 → 1.49.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/.playwright/INTERNAL_AVT_REPORT_DO_NOT_USE.json +875 -916
- package/es/components/Accordion/Accordion.Skeleton.d.ts +1 -2
- package/es/components/Accordion/Accordion.d.ts +1 -1
- package/es/components/Accordion/AccordionItem.d.ts +1 -1
- package/es/components/Accordion/AccordionItem.js +5 -0
- package/es/components/Accordion/AccordionProvider.d.ts +1 -1
- package/es/components/AspectRatio/AspectRatio.d.ts +1 -1
- package/es/components/Breadcrumb/Breadcrumb.Skeleton.d.ts +1 -1
- package/es/components/Checkbox/Checkbox.Skeleton.d.ts +1 -1
- package/es/components/ClassPrefix/index.d.ts +1 -1
- package/es/components/ComboButton/index.js +1 -0
- package/es/components/ContentSwitcher/ContentSwitcher.d.ts +1 -1
- package/es/components/DataTable/Table.d.ts +1 -1
- package/es/components/DataTable/TableBatchAction.d.ts +1 -1
- package/es/components/DataTable/TableBody.d.ts +1 -1
- package/es/components/DataTable/TableContainer.d.ts +1 -1
- package/es/components/DataTable/TableExpandHeader.d.ts +1 -1
- package/es/components/DataTable/TableExpandedRow.d.ts +1 -1
- package/es/components/DataTable/TableRow.d.ts +1 -1
- package/es/components/DataTable/TableSelectAll.d.ts +1 -1
- package/es/components/DataTable/TableSelectRow.d.ts +1 -1
- package/es/components/DataTable/TableSlugRow.d.ts +1 -1
- package/es/components/DataTable/TableToolbarMenu.d.ts +1 -1
- package/es/components/DataTable/TableToolbarSearch.d.ts +3 -3
- package/es/components/DatePicker/DatePicker.Skeleton.d.ts +1 -1
- package/es/components/DatePicker/DatePicker.d.ts +1 -3
- package/es/components/ExpandableSearch/ExpandableSearch.d.ts +1 -1
- package/es/components/FileUploader/FileUploader.Skeleton.d.ts +1 -2
- package/es/components/FileUploader/FileUploader.d.ts +1 -1
- package/es/components/FileUploader/FileUploaderButton.d.ts +1 -1
- package/es/components/FileUploader/FileUploaderDropContainer.d.ts +1 -1
- package/es/components/FileUploader/FileUploaderItem.d.ts +1 -1
- package/es/components/FileUploader/Filename.d.ts +1 -1
- package/es/components/Form/Form.d.ts +1 -1
- package/es/components/FormGroup/FormGroup.d.ts +1 -1
- package/es/components/FormItem/FormItem.d.ts +1 -1
- package/es/components/FormLabel/FormLabel.d.ts +1 -1
- package/es/components/Heading/index.d.ts +5 -5
- package/es/components/Icon/Icon.Skeleton.d.ts +1 -1
- package/es/components/InlineLoading/InlineLoading.d.ts +1 -1
- package/es/components/ListBox/ListBoxMenu.d.ts +1 -0
- package/es/components/ListItem/ListItem.d.ts +1 -1
- package/es/components/Loading/Loading.d.ts +1 -2
- package/es/components/Loading/Loading.js +2 -2
- package/es/components/Menu/Menu.d.ts +59 -0
- package/es/components/Menu/Menu.js +33 -10
- package/es/components/Menu/MenuContext.d.ts +32 -0
- package/es/components/Menu/MenuItem.d.ts +119 -0
- package/es/components/Menu/MenuItem.js +17 -12
- package/es/components/Menu/index.d.ts +9 -0
- package/es/components/MenuButton/index.js +1 -0
- package/es/components/ModalWrapper/ModalWrapper.d.ts +1 -1
- package/es/components/Notification/Notification.d.ts +8 -6
- package/es/components/Notification/Notification.js +2 -1
- package/es/components/NumberInput/NumberInput.Skeleton.d.ts +1 -1
- package/es/components/OrderedList/OrderedList.d.ts +1 -1
- package/es/components/OverflowMenu/next/index.js +1 -0
- package/es/components/PrimaryButton/PrimaryButton.d.ts +1 -1
- package/es/components/ProgressBar/ProgressBar.d.ts +1 -2
- package/es/components/ProgressIndicator/ProgressIndicator.Skeleton.d.ts +1 -2
- package/es/components/ProgressIndicator/ProgressIndicator.d.ts +2 -2
- package/es/components/RadioButton/RadioButton.Skeleton.d.ts +1 -1
- package/es/components/Search/Search.Skeleton.d.ts +1 -1
- package/es/components/SecondaryButton/SecondaryButton.d.ts +1 -1
- package/es/components/Select/Select.Skeleton.d.ts +1 -1
- package/es/components/Select/Select.d.ts +1 -1
- package/es/components/SelectItem/SelectItem.d.ts +1 -1
- package/es/components/SelectItemGroup/SelectItemGroup.d.ts +1 -1
- package/es/components/SkeletonPlaceholder/SkeletonPlaceholder.d.ts +1 -1
- package/es/components/SkeletonText/SkeletonText.d.ts +1 -1
- package/es/components/Slider/Slider.Skeleton.d.ts +1 -1
- package/es/components/Slider/Slider.d.ts +1 -1
- package/es/components/Slider/SliderHandles.d.ts +4 -4
- package/es/components/Stack/index.d.ts +4 -3
- package/es/components/StructuredList/StructuredList.Skeleton.d.ts +1 -2
- package/es/components/StructuredList/StructuredList.d.ts +6 -6
- package/es/components/TabContent/TabContent.d.ts +1 -1
- package/es/components/Tabs/Tabs.Skeleton.d.ts +1 -1
- package/es/components/Tabs/Tabs.d.ts +3 -3
- package/es/components/Tag/Tag.Skeleton.d.ts +1 -1
- package/es/components/Tag/Tag.d.ts +1 -1
- package/es/components/Text/Text.d.ts +1 -1
- package/es/components/Text/TextDirection.d.ts +1 -1
- package/es/components/Text/createTextComponent.d.ts +1 -1
- package/es/components/Text/index.d.ts +2 -2
- package/es/components/TextArea/TextArea.Skeleton.d.ts +1 -1
- package/es/components/TextInput/TextInput.Skeleton.d.ts +1 -1
- package/es/components/Theme/index.d.ts +4 -2
- package/es/components/TileGroup/TileGroup.d.ts +1 -1
- package/es/components/Toggle/Toggle.d.ts +1 -1
- package/es/components/Toggletip/index.d.ts +5 -5
- package/es/components/Tooltip/Tooltip.d.ts +1 -1
- package/es/components/Tooltip/Tooltip.js +2 -2
- package/es/components/UIShell/Content.d.ts +61 -49
- package/es/components/UIShell/HeaderContainer.d.ts +1 -1
- package/es/components/UIShell/HeaderMenuButton.d.ts +1 -1
- package/es/components/UIShell/HeaderName.d.ts +1 -1
- package/es/components/UIShell/HeaderNavigation.d.ts +1 -1
- package/es/components/UIShell/HeaderSideNavItems.d.ts +1 -1
- package/es/components/UIShell/SideNav.d.ts +1 -1
- package/es/components/UIShell/SideNavDetails.d.ts +1 -1
- package/es/components/UIShell/SideNavFooter.d.ts +1 -1
- package/es/components/UIShell/SideNavLinkText.d.ts +1 -1
- package/es/components/UIShell/SkipToContent.d.ts +1 -1
- package/es/components/UnorderedList/UnorderedList.d.ts +1 -1
- package/es/index.js +2 -2
- package/lib/components/Accordion/Accordion.Skeleton.d.ts +1 -2
- package/lib/components/Accordion/Accordion.d.ts +1 -1
- package/lib/components/Accordion/AccordionItem.d.ts +1 -1
- package/lib/components/Accordion/AccordionItem.js +5 -0
- package/lib/components/Accordion/AccordionProvider.d.ts +1 -1
- package/lib/components/AspectRatio/AspectRatio.d.ts +1 -1
- package/lib/components/Breadcrumb/Breadcrumb.Skeleton.d.ts +1 -1
- package/lib/components/Checkbox/Checkbox.Skeleton.d.ts +1 -1
- package/lib/components/ClassPrefix/index.d.ts +1 -1
- package/lib/components/ComboButton/index.js +1 -0
- package/lib/components/ContentSwitcher/ContentSwitcher.d.ts +1 -1
- package/lib/components/DataTable/Table.d.ts +1 -1
- package/lib/components/DataTable/TableBatchAction.d.ts +1 -1
- package/lib/components/DataTable/TableBody.d.ts +1 -1
- package/lib/components/DataTable/TableContainer.d.ts +1 -1
- package/lib/components/DataTable/TableExpandHeader.d.ts +1 -1
- package/lib/components/DataTable/TableExpandedRow.d.ts +1 -1
- package/lib/components/DataTable/TableRow.d.ts +1 -1
- package/lib/components/DataTable/TableSelectAll.d.ts +1 -1
- package/lib/components/DataTable/TableSelectRow.d.ts +1 -1
- package/lib/components/DataTable/TableSlugRow.d.ts +1 -1
- package/lib/components/DataTable/TableToolbarMenu.d.ts +1 -1
- package/lib/components/DataTable/TableToolbarSearch.d.ts +3 -3
- package/lib/components/DatePicker/DatePicker.Skeleton.d.ts +1 -1
- package/lib/components/DatePicker/DatePicker.d.ts +1 -3
- package/lib/components/ExpandableSearch/ExpandableSearch.d.ts +1 -1
- package/lib/components/FileUploader/FileUploader.Skeleton.d.ts +1 -2
- package/lib/components/FileUploader/FileUploader.d.ts +1 -1
- package/lib/components/FileUploader/FileUploaderButton.d.ts +1 -1
- package/lib/components/FileUploader/FileUploaderDropContainer.d.ts +1 -1
- package/lib/components/FileUploader/FileUploaderItem.d.ts +1 -1
- package/lib/components/FileUploader/Filename.d.ts +1 -1
- package/lib/components/Form/Form.d.ts +1 -1
- package/lib/components/FormGroup/FormGroup.d.ts +1 -1
- package/lib/components/FormItem/FormItem.d.ts +1 -1
- package/lib/components/FormLabel/FormLabel.d.ts +1 -1
- package/lib/components/Heading/index.d.ts +5 -5
- package/lib/components/Icon/Icon.Skeleton.d.ts +1 -1
- package/lib/components/InlineLoading/InlineLoading.d.ts +1 -1
- package/lib/components/ListBox/ListBoxMenu.d.ts +1 -0
- package/lib/components/ListItem/ListItem.d.ts +1 -1
- package/lib/components/Loading/Loading.d.ts +1 -2
- package/lib/components/Loading/Loading.js +2 -2
- package/lib/components/Menu/Menu.d.ts +59 -0
- package/lib/components/Menu/Menu.js +33 -10
- package/lib/components/Menu/MenuContext.d.ts +32 -0
- package/lib/components/Menu/MenuItem.d.ts +119 -0
- package/lib/components/Menu/MenuItem.js +17 -12
- package/lib/components/Menu/index.d.ts +9 -0
- package/lib/components/MenuButton/index.js +1 -0
- package/lib/components/ModalWrapper/ModalWrapper.d.ts +1 -1
- package/lib/components/Notification/Notification.d.ts +8 -6
- package/lib/components/Notification/Notification.js +2 -1
- package/lib/components/NumberInput/NumberInput.Skeleton.d.ts +1 -1
- package/lib/components/OrderedList/OrderedList.d.ts +1 -1
- package/lib/components/OverflowMenu/next/index.js +1 -0
- package/lib/components/PrimaryButton/PrimaryButton.d.ts +1 -1
- package/lib/components/ProgressBar/ProgressBar.d.ts +1 -2
- package/lib/components/ProgressIndicator/ProgressIndicator.Skeleton.d.ts +1 -2
- package/lib/components/ProgressIndicator/ProgressIndicator.d.ts +2 -2
- package/lib/components/RadioButton/RadioButton.Skeleton.d.ts +1 -1
- package/lib/components/Search/Search.Skeleton.d.ts +1 -1
- package/lib/components/SecondaryButton/SecondaryButton.d.ts +1 -1
- package/lib/components/Select/Select.Skeleton.d.ts +1 -1
- package/lib/components/Select/Select.d.ts +1 -1
- package/lib/components/SelectItem/SelectItem.d.ts +1 -1
- package/lib/components/SelectItemGroup/SelectItemGroup.d.ts +1 -1
- package/lib/components/SkeletonPlaceholder/SkeletonPlaceholder.d.ts +1 -1
- package/lib/components/SkeletonText/SkeletonText.d.ts +1 -1
- package/lib/components/Slider/Slider.Skeleton.d.ts +1 -1
- package/lib/components/Slider/Slider.d.ts +1 -1
- package/lib/components/Slider/SliderHandles.d.ts +4 -4
- package/lib/components/Stack/index.d.ts +4 -3
- package/lib/components/StructuredList/StructuredList.Skeleton.d.ts +1 -2
- package/lib/components/StructuredList/StructuredList.d.ts +6 -6
- package/lib/components/TabContent/TabContent.d.ts +1 -1
- package/lib/components/Tabs/Tabs.Skeleton.d.ts +1 -1
- package/lib/components/Tabs/Tabs.d.ts +3 -3
- package/lib/components/Tag/Tag.Skeleton.d.ts +1 -1
- package/lib/components/Tag/Tag.d.ts +1 -1
- package/lib/components/Text/Text.d.ts +1 -1
- package/lib/components/Text/TextDirection.d.ts +1 -1
- package/lib/components/Text/createTextComponent.d.ts +1 -1
- package/lib/components/Text/index.d.ts +2 -2
- package/lib/components/TextArea/TextArea.Skeleton.d.ts +1 -1
- package/lib/components/TextInput/TextInput.Skeleton.d.ts +1 -1
- package/lib/components/Theme/index.d.ts +4 -2
- package/lib/components/TileGroup/TileGroup.d.ts +1 -1
- package/lib/components/Toggle/Toggle.d.ts +1 -1
- package/lib/components/Toggletip/index.d.ts +5 -5
- package/lib/components/Tooltip/Tooltip.d.ts +1 -1
- package/lib/components/Tooltip/Tooltip.js +2 -2
- package/lib/components/UIShell/Content.d.ts +61 -49
- package/lib/components/UIShell/HeaderContainer.d.ts +1 -1
- package/lib/components/UIShell/HeaderMenuButton.d.ts +1 -1
- package/lib/components/UIShell/HeaderName.d.ts +1 -1
- package/lib/components/UIShell/HeaderNavigation.d.ts +1 -1
- package/lib/components/UIShell/HeaderSideNavItems.d.ts +1 -1
- package/lib/components/UIShell/SideNav.d.ts +1 -1
- package/lib/components/UIShell/SideNavDetails.d.ts +1 -1
- package/lib/components/UIShell/SideNavFooter.d.ts +1 -1
- package/lib/components/UIShell/SideNavLinkText.d.ts +1 -1
- package/lib/components/UIShell/SkipToContent.d.ts +1 -1
- package/lib/components/UnorderedList/UnorderedList.d.ts +1 -1
- package/lib/index.js +8 -8
- package/package.json +7 -7
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
|
-
/// <reference types="react" />
|
|
8
7
|
import PropTypes from 'prop-types';
|
|
9
8
|
interface AccordionSkeletonProps {
|
|
10
9
|
/**
|
|
@@ -30,7 +29,7 @@ interface AccordionSkeletonProps {
|
|
|
30
29
|
*/
|
|
31
30
|
open?: boolean;
|
|
32
31
|
}
|
|
33
|
-
declare function AccordionSkeleton({ align, className, count, isFlush, open, ...rest }: AccordionSkeletonProps): JSX.Element;
|
|
32
|
+
declare function AccordionSkeleton({ align, className, count, isFlush, open, ...rest }: AccordionSkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
34
33
|
declare namespace AccordionSkeleton {
|
|
35
34
|
var propTypes: {
|
|
36
35
|
/**
|
|
@@ -33,7 +33,7 @@ interface AccordionProps {
|
|
|
33
33
|
*/
|
|
34
34
|
size?: 'sm' | 'md' | 'lg';
|
|
35
35
|
}
|
|
36
|
-
declare function Accordion({ align, children, className: customClassName, disabled, isFlush, size, ...rest }: PropsWithChildren<AccordionProps>): JSX.Element;
|
|
36
|
+
declare function Accordion({ align, children, className: customClassName, disabled, isFlush, size, ...rest }: PropsWithChildren<AccordionProps>): import("react/jsx-runtime").JSX.Element;
|
|
37
37
|
declare namespace Accordion {
|
|
38
38
|
var propTypes: {
|
|
39
39
|
/**
|
|
@@ -59,7 +59,7 @@ interface AccordionToggleProps {
|
|
|
59
59
|
type?: 'button';
|
|
60
60
|
}
|
|
61
61
|
declare function AccordionItem({ children, className: customClassName, open, onHeadingClick, renderExpando, // remove renderExpando in next major release
|
|
62
|
-
renderToggle, title, disabled: controlledDisabled, handleAnimationEnd, ...rest }: PropsWithChildren<AccordionItemProps>): JSX.Element;
|
|
62
|
+
renderToggle, title, disabled: controlledDisabled, handleAnimationEnd, ...rest }: PropsWithChildren<AccordionItemProps>): import("react/jsx-runtime").JSX.Element;
|
|
63
63
|
declare namespace AccordionItem {
|
|
64
64
|
var propTypes: {
|
|
65
65
|
/**
|
|
@@ -37,6 +37,7 @@ function AccordionItem(_ref) {
|
|
|
37
37
|
...rest
|
|
38
38
|
} = _ref;
|
|
39
39
|
const [isOpen, setIsOpen] = useState(open);
|
|
40
|
+
const [prevIsOpen, setPrevIsOpen] = useState(open);
|
|
40
41
|
const accordionState = useContext(AccordionContext);
|
|
41
42
|
const disabledIsControlled = typeof controlledDisabled === 'boolean';
|
|
42
43
|
const disabled = disabledIsControlled ? controlledDisabled : accordionState.disabled;
|
|
@@ -51,6 +52,10 @@ function AccordionItem(_ref) {
|
|
|
51
52
|
const Toggle = renderToggle || renderExpando; // remove renderExpando in next major release
|
|
52
53
|
|
|
53
54
|
const content = useRef(null);
|
|
55
|
+
if (open !== prevIsOpen) {
|
|
56
|
+
setIsOpen(open);
|
|
57
|
+
setPrevIsOpen(open);
|
|
58
|
+
}
|
|
54
59
|
|
|
55
60
|
// When the AccordionItem heading is clicked, toggle the open state of the
|
|
56
61
|
// panel
|
|
@@ -16,5 +16,5 @@ type AccordionProviderProp = {
|
|
|
16
16
|
export declare const AccordionContext: React.Context<{
|
|
17
17
|
disabled: boolean;
|
|
18
18
|
}>;
|
|
19
|
-
export declare const AccordionProvider: ({ disabled, children, }: PropsWithChildren<AccordionProviderProp>) => JSX.Element;
|
|
19
|
+
export declare const AccordionProvider: ({ disabled, children, }: PropsWithChildren<AccordionProviderProp>) => import("react/jsx-runtime").JSX.Element;
|
|
20
20
|
export {};
|
|
@@ -37,7 +37,7 @@ interface AspectRatioProps {
|
|
|
37
37
|
* images or videos.
|
|
38
38
|
*/
|
|
39
39
|
declare const AspectRatio: {
|
|
40
|
-
({ as: BaseComponent, className: containerClassName, children, ratio, ...rest }: PropsWithChildren<AspectRatioProps>): JSX.Element;
|
|
40
|
+
({ as: BaseComponent, className: containerClassName, children, ratio, ...rest }: PropsWithChildren<AspectRatioProps>): import("react/jsx-runtime").JSX.Element;
|
|
41
41
|
propTypes: {
|
|
42
42
|
/**
|
|
43
43
|
* Provide a custom component or string to be rendered as the outermost node
|
|
@@ -12,7 +12,7 @@ export interface BreadcrumbSkeletonProps extends React.HTMLAttributes<HTMLDivEle
|
|
|
12
12
|
*/
|
|
13
13
|
className?: string;
|
|
14
14
|
}
|
|
15
|
-
declare function BreadcrumbSkeleton({ className, ...rest }: BreadcrumbSkeletonProps): JSX.Element;
|
|
15
|
+
declare function BreadcrumbSkeleton({ className, ...rest }: BreadcrumbSkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
16
16
|
declare namespace BreadcrumbSkeleton {
|
|
17
17
|
var propTypes: {
|
|
18
18
|
/**
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
8
|
import { HTMLAttributes } from 'react';
|
|
9
9
|
declare const CheckboxSkeleton: {
|
|
10
|
-
({ className, ...rest }: HTMLAttributes<HTMLDivElement>): JSX.Element;
|
|
10
|
+
({ className, ...rest }: HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
propTypes: {
|
|
12
12
|
/**
|
|
13
13
|
* Specify an optional className to add.
|
|
@@ -13,7 +13,7 @@ interface ClassPrefixProps {
|
|
|
13
13
|
*/
|
|
14
14
|
prefix: string;
|
|
15
15
|
}
|
|
16
|
-
declare function ClassPrefix({ children, prefix, }: PropsWithChildren<ClassPrefixProps>): JSX.Element;
|
|
16
|
+
declare function ClassPrefix({ children, prefix, }: PropsWithChildren<ClassPrefixProps>): import("react/jsx-runtime").JSX.Element;
|
|
17
17
|
declare namespace ClassPrefix {
|
|
18
18
|
var propTypes: {
|
|
19
19
|
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
@@ -14,6 +14,7 @@ import { IconButton } from '../IconButton/index.js';
|
|
|
14
14
|
import Button from '../Button/Button.js';
|
|
15
15
|
import '../Button/Button.Skeleton.js';
|
|
16
16
|
import { Menu } from '../Menu/Menu.js';
|
|
17
|
+
import '../Menu/MenuItem.js';
|
|
17
18
|
import { useAttachedMenu } from '../../internal/useAttachedMenu.js';
|
|
18
19
|
import { useId } from '../../internal/useId.js';
|
|
19
20
|
import { useMergedRefs } from '../../internal/useMergedRefs.js';
|
|
@@ -99,6 +99,6 @@ export default class ContentSwitcher extends React.Component<ContentSwitcherProp
|
|
|
99
99
|
} | null;
|
|
100
100
|
handleItemRef: (index: any) => (ref: any) => void;
|
|
101
101
|
handleChildChange: (data: any) => void;
|
|
102
|
-
render(): JSX.Element;
|
|
102
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
103
103
|
}
|
|
104
104
|
export {};
|
|
@@ -35,7 +35,7 @@ interface TableProps {
|
|
|
35
35
|
useZebraStyles?: boolean;
|
|
36
36
|
}
|
|
37
37
|
export declare const Table: {
|
|
38
|
-
({ className, children, useZebraStyles, size, isSortable, useStaticWidth, stickyHeader, overflowMenuOnHover, experimentalAutoAlign, ...other }: PropsWithChildren<TableProps>): JSX.Element;
|
|
38
|
+
({ className, children, useZebraStyles, size, isSortable, useStaticWidth, stickyHeader, overflowMenuOnHover, experimentalAutoAlign, ...other }: PropsWithChildren<TableProps>): import("react/jsx-runtime").JSX.Element;
|
|
39
39
|
propTypes: {
|
|
40
40
|
/**
|
|
41
41
|
* Pass in the children that will be rendered within the Table
|
|
@@ -26,7 +26,7 @@ declare const TableBatchAction: {
|
|
|
26
26
|
[x: string]: any;
|
|
27
27
|
renderIcon?: import("@carbon/icons-react/lib/CarbonIcon").CarbonIconType | undefined;
|
|
28
28
|
iconDescription?: string | undefined;
|
|
29
|
-
}): JSX.Element;
|
|
29
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
30
30
|
propTypes: {
|
|
31
31
|
/**
|
|
32
32
|
* Specify if the button is an icon-only button
|
|
@@ -13,7 +13,7 @@ export interface TableBodyProps extends ReactAttr<HTMLTableSectionElement> {
|
|
|
13
13
|
'aria-live'?: 'polite' | 'assertive' | 'off';
|
|
14
14
|
}
|
|
15
15
|
declare const TableBody: {
|
|
16
|
-
({ children, className, ...rest }: TableBodyProps): JSX.Element;
|
|
16
|
+
({ children, className, ...rest }: TableBodyProps): import("react/jsx-runtime").JSX.Element;
|
|
17
17
|
propTypes: {
|
|
18
18
|
/**
|
|
19
19
|
* `polite` Adjust the notification behavior of screen readers
|
|
@@ -26,7 +26,7 @@ export interface TableContainerProps extends Omit<ReactAttr<HTMLDivElement>, 'ti
|
|
|
26
26
|
title?: React.ReactNode;
|
|
27
27
|
}
|
|
28
28
|
declare const TableContainer: {
|
|
29
|
-
({ className, children, title, description, stickyHeader, useStaticWidth, ...rest }: TableContainerProps): JSX.Element;
|
|
29
|
+
({ className, children, title, description, stickyHeader, useStaticWidth, ...rest }: TableContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
30
30
|
propTypes: {
|
|
31
31
|
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
32
32
|
className: PropTypes.Requireable<string>;
|
|
@@ -59,7 +59,7 @@ type TableExpandHeaderPropsWithExpando = Omit<TableExpandHeaderPropsBase, 'ariaL
|
|
|
59
59
|
};
|
|
60
60
|
export type TableExpandHeaderProps = TableExpandHeaderPropsWithToggle | TableExpandHeaderPropsWithExpando | TableExpandHeaderPropsBase;
|
|
61
61
|
declare const TableExpandHeader: {
|
|
62
|
-
({ ["aria-controls"]: ariaControls, ["aria-label"]: ariaLabel, ariaLabel: deprecatedAriaLabel, className: headerClassName, enableExpando, enableToggle, id, isExpanded, onExpand, expandIconDescription, children, ...rest }: TableExpandHeaderProps): JSX.Element;
|
|
62
|
+
({ ["aria-controls"]: ariaControls, ["aria-label"]: ariaLabel, ariaLabel: deprecatedAriaLabel, className: headerClassName, enableExpando, enableToggle, id, isExpanded, onExpand, expandIconDescription, children, ...rest }: TableExpandHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
63
63
|
propTypes: {
|
|
64
64
|
/**
|
|
65
65
|
* Space separated list of one or more ID values referencing the TableExpandedRow(s) being controlled by the TableExpandHeader
|
|
@@ -13,7 +13,7 @@ interface TableExpandedRowProps extends ReactAttr<HTMLTableRowElement> {
|
|
|
13
13
|
colSpan: number;
|
|
14
14
|
}
|
|
15
15
|
declare const TableExpandedRow: {
|
|
16
|
-
({ className: customClassName, children, colSpan, ...rest }: TableExpandedRowProps): JSX.Element;
|
|
16
|
+
({ className: customClassName, children, colSpan, ...rest }: TableExpandedRowProps): import("react/jsx-runtime").JSX.Element;
|
|
17
17
|
propTypes: {
|
|
18
18
|
/**
|
|
19
19
|
* Pass in the contents for your TableExpandedRow
|
|
@@ -17,7 +17,7 @@ export interface TableRowProps extends ReactAttr<HTMLTableRowElement> {
|
|
|
17
17
|
isSelected?: boolean;
|
|
18
18
|
}
|
|
19
19
|
declare const TableRow: {
|
|
20
|
-
(props: TableRowProps): JSX.Element;
|
|
20
|
+
(props: TableRowProps): import("react/jsx-runtime").JSX.Element;
|
|
21
21
|
propTypes: {
|
|
22
22
|
/**
|
|
23
23
|
* Specify an optional className to be applied to the container node
|
|
@@ -41,7 +41,7 @@ interface TableSelectAllProps {
|
|
|
41
41
|
onSelect: React.MouseEventHandler<HTMLInputElement>;
|
|
42
42
|
}
|
|
43
43
|
declare const TableSelectAll: {
|
|
44
|
-
({ ariaLabel, checked, id, indeterminate, name, onSelect, disabled, className, }: TableSelectAllProps): JSX.Element;
|
|
44
|
+
({ ariaLabel, checked, id, indeterminate, name, onSelect, disabled, className, }: TableSelectAllProps): import("react/jsx-runtime").JSX.Element;
|
|
45
45
|
propTypes: {
|
|
46
46
|
/**
|
|
47
47
|
* Specify the aria label for the underlying input control
|
|
@@ -45,7 +45,7 @@ export interface TableSelectRowProps {
|
|
|
45
45
|
radio?: boolean;
|
|
46
46
|
}
|
|
47
47
|
declare const TableSelectRow: {
|
|
48
|
-
({ ariaLabel, checked, id, name, onSelect, onChange, disabled, radio, className, }: TableSelectRowProps): JSX.Element;
|
|
48
|
+
({ ariaLabel, checked, id, name, onSelect, onChange, disabled, radio, className, }: TableSelectRowProps): import("react/jsx-runtime").JSX.Element;
|
|
49
49
|
propTypes: {
|
|
50
50
|
/**
|
|
51
51
|
* Specify the aria label for the underlying input control
|
|
@@ -16,7 +16,7 @@ export interface TableSlugRowProps {
|
|
|
16
16
|
slug?: ReactNodeLike;
|
|
17
17
|
}
|
|
18
18
|
declare const TableSlugRow: {
|
|
19
|
-
({ className, slug }: TableSlugRowProps): JSX.Element;
|
|
19
|
+
({ className, slug }: TableSlugRowProps): import("react/jsx-runtime").JSX.Element;
|
|
20
20
|
propTypes: {
|
|
21
21
|
/**
|
|
22
22
|
* The CSS class names of the cell that wraps the underlying input control
|
|
@@ -18,7 +18,7 @@ export interface TableToolbarMenuProps extends React.HTMLAttributes<HTMLDivEleme
|
|
|
18
18
|
/**
|
|
19
19
|
* Optional prop to allow overriding the default menu icon
|
|
20
20
|
*/
|
|
21
|
-
renderIcon?:
|
|
21
|
+
renderIcon?: any;
|
|
22
22
|
}
|
|
23
23
|
declare const TableToolbarMenu: React.FC<TableToolbarMenuProps>;
|
|
24
24
|
export default TableToolbarMenu;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
|
-
import
|
|
8
|
+
import { ChangeEvent, FocusEvent, ReactNode } from 'react';
|
|
9
9
|
export interface TableToolbarSearchProps {
|
|
10
10
|
children?: ReactNode;
|
|
11
11
|
/**
|
|
@@ -45,7 +45,7 @@ export interface TableToolbarSearchProps {
|
|
|
45
45
|
/**
|
|
46
46
|
* Provide an optional hook that is called each time the input is updated
|
|
47
47
|
*/
|
|
48
|
-
onChange?: (event: '' |
|
|
48
|
+
onChange?: (event: '' | ChangeEvent<HTMLInputElement>, value?: string) => void;
|
|
49
49
|
/**
|
|
50
50
|
* Optional callback called when the search value is cleared.
|
|
51
51
|
*/
|
|
@@ -86,7 +86,7 @@ export interface TableToolbarSearchProps {
|
|
|
86
86
|
translateWithId?: (id: string) => string;
|
|
87
87
|
}
|
|
88
88
|
declare const TableToolbarSearch: {
|
|
89
|
-
({ className, searchContainerClass, onChange: onChangeProp, onClear, translateWithId: t, placeholder, labelText, expanded: expandedProp, defaultExpanded, defaultValue, disabled, onExpand, persistent, id, onBlur, onFocus, size, tabIndex, ...rest }: TableToolbarSearchProps): JSX.Element;
|
|
89
|
+
({ className, searchContainerClass, onChange: onChangeProp, onClear, translateWithId: t, placeholder, labelText, expanded: expandedProp, defaultExpanded, defaultValue, disabled, onExpand, persistent, id, onBlur, onFocus, size, tabIndex, ...rest }: TableToolbarSearchProps): import("react/jsx-runtime").JSX.Element;
|
|
90
90
|
propTypes: {
|
|
91
91
|
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
92
92
|
/**
|
|
@@ -14,7 +14,7 @@ export interface DatePickerSkeletonProps extends HTMLAttributes<HTMLDivElement>
|
|
|
14
14
|
hideLabel?: boolean;
|
|
15
15
|
}
|
|
16
16
|
declare const DatePickerSkeleton: {
|
|
17
|
-
({ range, id, hideLabel, className, ...rest }: DatePickerSkeletonProps): JSX.Element;
|
|
17
|
+
({ range, id, hideLabel, className, ...rest }: DatePickerSkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
18
18
|
propTypes: {
|
|
19
19
|
/**
|
|
20
20
|
* Specify an optional className to add.
|
|
@@ -7,8 +7,6 @@
|
|
|
7
7
|
import { ReactNodeLike } from 'prop-types';
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import flatpickr from 'flatpickr';
|
|
10
|
-
import { ReactAttr } from '../../types/common';
|
|
11
|
-
type ExcludedAttributes = 'value' | 'onChange' | 'locale';
|
|
12
10
|
export type DatePickerTypes = 'simple' | 'single' | 'range';
|
|
13
11
|
export type CalRef = {
|
|
14
12
|
inline: boolean;
|
|
@@ -22,7 +20,7 @@ export type CalRef = {
|
|
|
22
20
|
plugins: [];
|
|
23
21
|
clickOpens: any;
|
|
24
22
|
};
|
|
25
|
-
interface DatePickerProps
|
|
23
|
+
interface DatePickerProps {
|
|
26
24
|
/**
|
|
27
25
|
* Flatpickr prop passthrough enables direct date input, and when set to false,
|
|
28
26
|
* we must clear dates manually by resetting the value prop to empty string making it a controlled input.
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import { type SearchProps } from '../Search';
|
|
9
|
-
declare function ExpandableSearch({ onBlur, onChange, onExpand, onKeyDown, defaultValue, isExpanded, ...props }: SearchProps): JSX.Element;
|
|
9
|
+
declare function ExpandableSearch({ onBlur, onChange, onExpand, onKeyDown, defaultValue, isExpanded, ...props }: SearchProps): import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
declare namespace ExpandableSearch {
|
|
11
11
|
var propTypes: React.WeakValidationMap<SearchProps & React.RefAttributes<HTMLInputElement>> | undefined;
|
|
12
12
|
var displayName: string;
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
|
-
/// <reference types="react" />
|
|
8
7
|
import PropTypes from 'prop-types';
|
|
9
8
|
import { ReactAttr } from '../../types/common';
|
|
10
9
|
export interface FileUploaderSkeletonProps extends ReactAttr<HTMLDivElement> {
|
|
@@ -13,7 +12,7 @@ export interface FileUploaderSkeletonProps extends ReactAttr<HTMLDivElement> {
|
|
|
13
12
|
*/
|
|
14
13
|
className?: string;
|
|
15
14
|
}
|
|
16
|
-
declare function FileUploaderSkeleton({ className, ...rest }: FileUploaderSkeletonProps): JSX.Element;
|
|
15
|
+
declare function FileUploaderSkeleton({ className, ...rest }: FileUploaderSkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
17
16
|
declare namespace FileUploaderSkeleton {
|
|
18
17
|
var propTypes: {
|
|
19
18
|
/**
|
|
@@ -71,7 +71,7 @@ export interface FileUploaderButtonProps extends Omit<ReactAttr<HTMLButtonElemen
|
|
|
71
71
|
tabIndex?: number | string;
|
|
72
72
|
innerRef?: React.RefObject<HTMLLabelElement>;
|
|
73
73
|
}
|
|
74
|
-
declare function FileUploaderButton({ accept, buttonKind, className, disabled, disableLabelChanges, id, labelText: ownerLabelText, multiple, onChange, name, size, innerRef, ...other }: FileUploaderButtonProps): JSX.Element;
|
|
74
|
+
declare function FileUploaderButton({ accept, buttonKind, className, disabled, disableLabelChanges, id, labelText: ownerLabelText, multiple, onChange, name, size, innerRef, ...other }: FileUploaderButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
75
75
|
declare namespace FileUploaderButton {
|
|
76
76
|
var propTypes: {
|
|
77
77
|
/**
|
|
@@ -65,7 +65,7 @@ export interface FileUploaderDropContainerProps extends Omit<ReactAttr<HTMLButto
|
|
|
65
65
|
*/
|
|
66
66
|
tabIndex?: number | string;
|
|
67
67
|
}
|
|
68
|
-
declare function FileUploaderDropContainer({ accept, className, id, disabled, labelText, multiple, name, onAddFiles, onClick, pattern, innerRef, ...rest }: FileUploaderDropContainerProps): JSX.Element;
|
|
68
|
+
declare function FileUploaderDropContainer({ accept, className, id, disabled, labelText, multiple, name, onAddFiles, onClick, pattern, innerRef, ...rest }: FileUploaderDropContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
69
69
|
declare namespace FileUploaderDropContainer {
|
|
70
70
|
var propTypes: {
|
|
71
71
|
/**
|
|
@@ -53,7 +53,7 @@ export interface FileUploaderItemProps extends ReactAttr<HTMLSpanElement> {
|
|
|
53
53
|
*/
|
|
54
54
|
uuid?: string;
|
|
55
55
|
}
|
|
56
|
-
declare function FileUploaderItem({ uuid, name, status, iconDescription, onDelete, invalid, errorSubject, errorBody, size, ...other }: FileUploaderItemProps): JSX.Element;
|
|
56
|
+
declare function FileUploaderItem({ uuid, name, status, iconDescription, onDelete, invalid, errorSubject, errorBody, size, ...other }: FileUploaderItemProps): import("react/jsx-runtime").JSX.Element;
|
|
57
57
|
declare namespace FileUploaderItem {
|
|
58
58
|
var propTypes: {
|
|
59
59
|
/**
|
|
@@ -35,7 +35,7 @@ export interface FilenameProps extends Omit<ReactAttr & SVGAttr, 'tabIndex' | 't
|
|
|
35
35
|
*/
|
|
36
36
|
tabIndex?: number;
|
|
37
37
|
}
|
|
38
|
-
declare function Filename({ iconDescription, status, invalid, name, tabIndex, ['aria-describedby']: ariaDescribedBy, ...rest }: FilenameProps): JSX.Element | null;
|
|
38
|
+
declare function Filename({ iconDescription, status, invalid, name, tabIndex, ['aria-describedby']: ariaDescribedBy, ...rest }: FilenameProps): import("react/jsx-runtime").JSX.Element | null;
|
|
39
39
|
declare namespace Filename {
|
|
40
40
|
var propTypes: {
|
|
41
41
|
/**
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
8
|
import { type ComponentProps } from 'react';
|
|
9
9
|
type FormProps = ComponentProps<'form'>;
|
|
10
|
-
declare function Form({ className, children, ...other }: FormProps): JSX.Element;
|
|
10
|
+
declare function Form({ className, children, ...other }: FormProps): import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
declare namespace Form {
|
|
12
12
|
var propTypes: {
|
|
13
13
|
/**
|
|
@@ -39,7 +39,7 @@ export interface FormGroupProps extends ReactAttr<HTMLFieldSetElement> {
|
|
|
39
39
|
messageText?: string;
|
|
40
40
|
}
|
|
41
41
|
declare const FormGroup: {
|
|
42
|
-
({ legendId, legendText, invalid, children, className, message, messageText, ...rest }: FormGroupProps): JSX.Element;
|
|
42
|
+
({ legendId, legendText, invalid, children, className, message, messageText, ...rest }: FormGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
43
43
|
propTypes: {
|
|
44
44
|
/**
|
|
45
45
|
* Provide the children form elements to be rendered inside of the <fieldset>
|
|
@@ -16,7 +16,7 @@ type FormItemProps = {
|
|
|
16
16
|
*/
|
|
17
17
|
className?: string;
|
|
18
18
|
};
|
|
19
|
-
declare function FormItem({ className, children, ...rest }: FormItemProps): JSX.Element;
|
|
19
|
+
declare function FormItem({ className, children, ...rest }: FormItemProps): import("react/jsx-runtime").JSX.Element;
|
|
20
20
|
declare namespace FormItem {
|
|
21
21
|
var propTypes: {
|
|
22
22
|
/**
|
|
@@ -20,7 +20,7 @@ export interface FormLabelProps extends Omit<React.LabelHTMLAttributes<HTMLLabel
|
|
|
20
20
|
*/
|
|
21
21
|
id?: string;
|
|
22
22
|
}
|
|
23
|
-
declare function FormLabel({ className: customClassName, children, id, ...rest }: FormLabelProps): JSX.Element;
|
|
23
|
+
declare function FormLabel({ className: customClassName, children, id, ...rest }: FormLabelProps): import("react/jsx-runtime").JSX.Element;
|
|
24
24
|
declare namespace FormLabel {
|
|
25
25
|
var propTypes: {
|
|
26
26
|
/**
|
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
|
-
import React from 'react';
|
|
7
|
+
import React, { type ElementType } from 'react';
|
|
8
|
+
import type { PolymorphicProps } from '../../types/common';
|
|
8
9
|
type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
|
|
9
10
|
type SectionBaseProps = {
|
|
10
11
|
level?: HeadingLevel;
|
|
11
12
|
};
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
export declare const Heading: React.ForwardRefExoticComponent<Pick<React.ClassAttributes<HTMLHeadingElement> & React.HTMLAttributes<HTMLHeadingElement>, "key" | keyof React.HTMLAttributes<HTMLHeadingElement>> & React.RefAttributes<HTMLHeadingElement>>;
|
|
13
|
+
type SectionProps<E extends ElementType> = PolymorphicProps<E, SectionBaseProps>;
|
|
14
|
+
export declare const Section: React.ForwardRefExoticComponent<Omit<SectionProps<React.ElementType<any>>, "ref"> & React.RefAttributes<unknown>>;
|
|
15
|
+
export declare const Heading: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
16
16
|
export {};
|
|
@@ -13,7 +13,7 @@ export interface IconSkeletonProps extends ComponentProps<'div'> {
|
|
|
13
13
|
className?: string;
|
|
14
14
|
}
|
|
15
15
|
declare const IconSkeleton: {
|
|
16
|
-
({ className, ...rest }: IconSkeletonProps): JSX.Element;
|
|
16
|
+
({ className, ...rest }: IconSkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
17
17
|
propTypes: {
|
|
18
18
|
/**
|
|
19
19
|
* Specify an optional className to add.
|
|
@@ -36,7 +36,7 @@ export interface InlineLoadingProps extends Omit<React.DetailedHTMLProps<React.H
|
|
|
36
36
|
successDelay?: number;
|
|
37
37
|
}
|
|
38
38
|
declare const InlineLoading: {
|
|
39
|
-
({ className, status, iconDescription, description, onSuccess, successDelay, ...rest }: InlineLoadingProps): JSX.Element;
|
|
39
|
+
({ className, status, iconDescription, description, onSuccess, successDelay, ...rest }: InlineLoadingProps): import("react/jsx-runtime").JSX.Element;
|
|
40
40
|
propTypes: {
|
|
41
41
|
/**
|
|
42
42
|
* Specify a custom className to be applied to the container node
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
8
|
import { type ComponentProps } from 'react';
|
|
9
9
|
type ListItemProps = ComponentProps<'li'>;
|
|
10
|
-
declare function ListItem({ className, children, ...other }: ListItemProps): JSX.Element;
|
|
10
|
+
declare function ListItem({ className, children, ...other }: ListItemProps): import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
declare namespace ListItem {
|
|
12
12
|
var propTypes: {
|
|
13
13
|
/**
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
|
-
/// <reference types="react" />
|
|
8
7
|
import PropTypes from 'prop-types';
|
|
9
8
|
import { ReactAttr } from '../../types/common';
|
|
10
9
|
export interface LoadingProps extends ReactAttr<HTMLDivElement> {
|
|
@@ -33,7 +32,7 @@ export interface LoadingProps extends ReactAttr<HTMLDivElement> {
|
|
|
33
32
|
*/
|
|
34
33
|
withOverlay: boolean;
|
|
35
34
|
}
|
|
36
|
-
declare function Loading({ active, className: customClassName, withOverlay, small, description, ...rest }: LoadingProps): JSX.Element;
|
|
35
|
+
declare function Loading({ active, className: customClassName, withOverlay, small, description, ...rest }: LoadingProps): import("react/jsx-runtime").JSX.Element;
|
|
37
36
|
declare namespace Loading {
|
|
38
37
|
var propTypes: {
|
|
39
38
|
/**
|
|
@@ -42,12 +42,12 @@ function Loading(_ref) {
|
|
|
42
42
|
className: `${prefix}--loading__background`,
|
|
43
43
|
cx: "50%",
|
|
44
44
|
cy: "50%",
|
|
45
|
-
r: "
|
|
45
|
+
r: "42"
|
|
46
46
|
}) : null, /*#__PURE__*/React__default.createElement("circle", {
|
|
47
47
|
className: `${prefix}--loading__stroke`,
|
|
48
48
|
cx: "50%",
|
|
49
49
|
cy: "50%",
|
|
50
|
-
r:
|
|
50
|
+
r: small ? '42' : '44'
|
|
51
51
|
})));
|
|
52
52
|
return withOverlay ? /*#__PURE__*/React__default.createElement("div", {
|
|
53
53
|
className: overlayClassName
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2023
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
import React from 'react';
|
|
8
|
+
interface MenuProps extends React.HTMLAttributes<HTMLUListElement> {
|
|
9
|
+
/**
|
|
10
|
+
* A collection of MenuItems to be rendered within this Menu.
|
|
11
|
+
*/
|
|
12
|
+
children?: React.ReactNode;
|
|
13
|
+
/**
|
|
14
|
+
* Additional CSS class names.
|
|
15
|
+
*/
|
|
16
|
+
className?: string;
|
|
17
|
+
/**
|
|
18
|
+
* A label describing the Menu.
|
|
19
|
+
*/
|
|
20
|
+
label?: string;
|
|
21
|
+
/**
|
|
22
|
+
* The mode of this menu. Defaults to full.
|
|
23
|
+
* `full` supports nesting and selectable menu items, but no icons.
|
|
24
|
+
* `basic` supports icons but no nesting or selectable menu items.
|
|
25
|
+
*
|
|
26
|
+
* **This prop is not intended for use and will be set by the respective implementation (like useContextMenu, MenuButton, and ComboButton).**
|
|
27
|
+
*/
|
|
28
|
+
mode?: 'full' | 'basic';
|
|
29
|
+
/**
|
|
30
|
+
* Provide an optional function to be called when the Menu should be closed.
|
|
31
|
+
*/
|
|
32
|
+
onClose?: () => void;
|
|
33
|
+
/**
|
|
34
|
+
* Provide an optional function to be called when the Menu is opened.
|
|
35
|
+
*/
|
|
36
|
+
onOpen?: () => void;
|
|
37
|
+
/**
|
|
38
|
+
* Whether the Menu is open or not.
|
|
39
|
+
*/
|
|
40
|
+
open?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Specify the size of the Menu.
|
|
43
|
+
*/
|
|
44
|
+
size?: 'xs' | 'sm' | 'md' | 'lg';
|
|
45
|
+
/**
|
|
46
|
+
* Specify a DOM node where the Menu should be rendered in. Defaults to document.body.
|
|
47
|
+
*/
|
|
48
|
+
target?: any;
|
|
49
|
+
/**
|
|
50
|
+
* Specify the x position of the Menu. Either pass a single number or an array with two numbers describing your activator's boundaries ([x1, x2])
|
|
51
|
+
*/
|
|
52
|
+
x?: number | (number | null | undefined)[];
|
|
53
|
+
/**
|
|
54
|
+
* Specify the y position of the Menu. Either pass a single number or an array with two numbers describing your activator's boundaries ([y1, y2])
|
|
55
|
+
*/
|
|
56
|
+
y?: number | (number | null | undefined)[];
|
|
57
|
+
}
|
|
58
|
+
declare const Menu: React.ForwardRefExoticComponent<MenuProps & React.RefAttributes<HTMLUListElement>>;
|
|
59
|
+
export { Menu };
|