@carbon/react 1.48.1 → 1.49.0-rc.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 +1009 -1009
- 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 +1 -1
- 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/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 +1 -1
- 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/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 +6 -6
|
@@ -0,0 +1,32 @@
|
|
|
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
|
+
type ActionType = {
|
|
9
|
+
type: 'enableIcons' | 'registerItem';
|
|
10
|
+
payload: any;
|
|
11
|
+
};
|
|
12
|
+
type StateType = {
|
|
13
|
+
isRoot: boolean;
|
|
14
|
+
mode: 'full' | 'basic';
|
|
15
|
+
hasIcons: boolean;
|
|
16
|
+
size: 'xs' | 'sm' | 'md' | 'lg' | null;
|
|
17
|
+
items: any[];
|
|
18
|
+
requestCloseRoot: (e: Pick<React.KeyboardEvent<HTMLUListElement>, 'type'>) => void;
|
|
19
|
+
};
|
|
20
|
+
declare function menuReducer(state: StateType, action: ActionType): {
|
|
21
|
+
hasIcons: boolean;
|
|
22
|
+
isRoot: boolean;
|
|
23
|
+
mode: "full" | "basic";
|
|
24
|
+
size: "sm" | "md" | "lg" | "xs" | null;
|
|
25
|
+
items: any[];
|
|
26
|
+
requestCloseRoot: (e: Pick<React.KeyboardEvent<HTMLUListElement>, "type">) => void;
|
|
27
|
+
};
|
|
28
|
+
declare const MenuContext: React.Context<{
|
|
29
|
+
state: StateType;
|
|
30
|
+
dispatch: React.Dispatch<any>;
|
|
31
|
+
}>;
|
|
32
|
+
export { MenuContext, menuReducer };
|
|
@@ -0,0 +1,119 @@
|
|
|
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 MenuItemProps extends React.LiHTMLAttributes<HTMLLIElement> {
|
|
9
|
+
/**
|
|
10
|
+
* Optionally provide another Menu to create a submenu. props.children can't be used to specify the content of the MenuItem itself. Use props.label instead.
|
|
11
|
+
*/
|
|
12
|
+
children?: React.ReactNode;
|
|
13
|
+
/**
|
|
14
|
+
* Additional CSS class names.
|
|
15
|
+
*/
|
|
16
|
+
className?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Specify whether the MenuItem is disabled or not.
|
|
19
|
+
*/
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Specify the kind of the MenuItem.
|
|
23
|
+
*/
|
|
24
|
+
kind?: 'default' | 'danger';
|
|
25
|
+
/**
|
|
26
|
+
* A required label titling the MenuItem. Will be rendered as its text content.
|
|
27
|
+
*/
|
|
28
|
+
label: string;
|
|
29
|
+
/**
|
|
30
|
+
* Provide an optional function to be called when the MenuItem is clicked.
|
|
31
|
+
*/
|
|
32
|
+
onClick?: (event: React.KeyboardEvent<HTMLLIElement> | React.MouseEvent<HTMLLIElement>) => void;
|
|
33
|
+
/**
|
|
34
|
+
* Only applicable if the parent menu is in `basic` mode. Sets the menu item's icon.
|
|
35
|
+
*/
|
|
36
|
+
renderIcon?: any;
|
|
37
|
+
/**
|
|
38
|
+
* Provide a shortcut for the action of this MenuItem. Note that the component will only render it as a hint but not actually register the shortcut.
|
|
39
|
+
*/
|
|
40
|
+
shortcut?: string;
|
|
41
|
+
}
|
|
42
|
+
declare const MenuItem: React.ForwardRefExoticComponent<MenuItemProps & React.RefAttributes<HTMLLIElement>>;
|
|
43
|
+
interface MenuItemSelectableProps {
|
|
44
|
+
/**
|
|
45
|
+
* Additional CSS class names.
|
|
46
|
+
*/
|
|
47
|
+
className?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Specify whether the option should be selected by default.
|
|
50
|
+
*/
|
|
51
|
+
defaultSelected?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* A required label titling this option.
|
|
54
|
+
*/
|
|
55
|
+
label: string;
|
|
56
|
+
/**
|
|
57
|
+
* Provide an optional function to be called when the selection state changes.
|
|
58
|
+
*/
|
|
59
|
+
onChange?: React.ChangeEventHandler<HTMLLIElement>;
|
|
60
|
+
/**
|
|
61
|
+
* Pass a bool to props.selected to control the state of this option.
|
|
62
|
+
*/
|
|
63
|
+
selected?: boolean;
|
|
64
|
+
}
|
|
65
|
+
declare const MenuItemSelectable: React.ForwardRefExoticComponent<MenuItemSelectableProps & React.RefAttributes<HTMLLIElement>>;
|
|
66
|
+
interface MenuItemGroupProps {
|
|
67
|
+
/**
|
|
68
|
+
* A collection of MenuItems to be rendered within this group.
|
|
69
|
+
*/
|
|
70
|
+
children?: React.ReactNode;
|
|
71
|
+
/**
|
|
72
|
+
* Additional CSS class names.
|
|
73
|
+
*/
|
|
74
|
+
className?: string;
|
|
75
|
+
/**
|
|
76
|
+
* A required label titling this group.
|
|
77
|
+
*/
|
|
78
|
+
label: string;
|
|
79
|
+
}
|
|
80
|
+
declare const MenuItemGroup: React.ForwardRefExoticComponent<MenuItemGroupProps & React.RefAttributes<HTMLLIElement>>;
|
|
81
|
+
interface MenuItemRadioGroupProps {
|
|
82
|
+
/**
|
|
83
|
+
* Additional CSS class names.
|
|
84
|
+
*/
|
|
85
|
+
className?: string;
|
|
86
|
+
/**
|
|
87
|
+
* Specify the default selected item. Must match the type of props.items.
|
|
88
|
+
*/
|
|
89
|
+
defaultSelectedItem?: any;
|
|
90
|
+
/**
|
|
91
|
+
* Provide a function to convert an item to the string that will be rendered. Defaults to item.toString().
|
|
92
|
+
*/
|
|
93
|
+
itemToString?: (item: any) => string;
|
|
94
|
+
/**
|
|
95
|
+
* Provide the options for this radio group. Can be of any type, as long as you provide an appropriate props.itemToString function.
|
|
96
|
+
*/
|
|
97
|
+
items?: any[];
|
|
98
|
+
/**
|
|
99
|
+
* A required label titling this radio group.
|
|
100
|
+
*/
|
|
101
|
+
label: string;
|
|
102
|
+
/**
|
|
103
|
+
* Provide an optional function to be called when the selection changes.
|
|
104
|
+
*/
|
|
105
|
+
onChange?: React.ChangeEventHandler<HTMLLIElement>;
|
|
106
|
+
/**
|
|
107
|
+
* Provide props.selectedItem to control the state of this radio group. Must match the type of props.items.
|
|
108
|
+
*/
|
|
109
|
+
selectedItem?: any;
|
|
110
|
+
}
|
|
111
|
+
declare const MenuItemRadioGroup: React.ForwardRefExoticComponent<MenuItemRadioGroupProps & React.RefAttributes<HTMLLIElement>>;
|
|
112
|
+
interface MenuItemDividerProps {
|
|
113
|
+
/**
|
|
114
|
+
* Additional CSS class names.
|
|
115
|
+
*/
|
|
116
|
+
className?: string;
|
|
117
|
+
}
|
|
118
|
+
declare const MenuItemDivider: React.ForwardRefExoticComponent<MenuItemDividerProps & React.RefAttributes<HTMLLIElement>>;
|
|
119
|
+
export { MenuItem, MenuItemSelectable, MenuItemGroup, MenuItemRadioGroup, MenuItemDivider, };
|
|
@@ -39,7 +39,7 @@ const MenuItem = /*#__PURE__*/React__default.forwardRef(function MenuItem(_ref,
|
|
|
39
39
|
} = _ref;
|
|
40
40
|
const prefix = usePrefix();
|
|
41
41
|
const context = useContext(MenuContext);
|
|
42
|
-
const menuItem = useRef();
|
|
42
|
+
const menuItem = useRef(null);
|
|
43
43
|
const ref = useMergedRefs([forwardRef, menuItem]);
|
|
44
44
|
const [boundaries, setBoundaries] = useState({
|
|
45
45
|
x: -1,
|
|
@@ -61,6 +61,9 @@ const MenuItem = /*#__PURE__*/React__default.forwardRef(function MenuItem(_ref,
|
|
|
61
61
|
});
|
|
62
62
|
}
|
|
63
63
|
function openSubmenu() {
|
|
64
|
+
if (!menuItem.current) {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
64
67
|
const {
|
|
65
68
|
x,
|
|
66
69
|
y,
|
|
@@ -105,9 +108,11 @@ const MenuItem = /*#__PURE__*/React__default.forwardRef(function MenuItem(_ref,
|
|
|
105
108
|
}, hoverIntentDelay);
|
|
106
109
|
}
|
|
107
110
|
function handleMouseLeave() {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
+
if (hoverIntentTimeout.current) {
|
|
112
|
+
clearTimeout(hoverIntentTimeout.current);
|
|
113
|
+
closeSubmenu();
|
|
114
|
+
menuItem.current?.focus();
|
|
115
|
+
}
|
|
111
116
|
}
|
|
112
117
|
function handleKeyDown(e) {
|
|
113
118
|
if (hasChildren && match(e, ArrowRight)) {
|
|
@@ -157,13 +162,13 @@ const MenuItem = /*#__PURE__*/React__default.forwardRef(function MenuItem(_ref,
|
|
|
157
162
|
}, rest, {
|
|
158
163
|
ref: ref,
|
|
159
164
|
className: classNames,
|
|
160
|
-
tabIndex:
|
|
161
|
-
"aria-disabled": isDisabled
|
|
162
|
-
"aria-haspopup": hasChildren ||
|
|
163
|
-
"aria-expanded": hasChildren ? submenuOpen :
|
|
165
|
+
tabIndex: -1,
|
|
166
|
+
"aria-disabled": isDisabled,
|
|
167
|
+
"aria-haspopup": hasChildren || undefined,
|
|
168
|
+
"aria-expanded": hasChildren ? submenuOpen : undefined,
|
|
164
169
|
onClick: handleClick,
|
|
165
|
-
onMouseEnter: hasChildren ? handleMouseEnter :
|
|
166
|
-
onMouseLeave: hasChildren ? handleMouseLeave :
|
|
170
|
+
onMouseEnter: hasChildren ? handleMouseEnter : undefined,
|
|
171
|
+
onMouseLeave: hasChildren ? handleMouseLeave : undefined,
|
|
167
172
|
onKeyDown: handleKeyDown
|
|
168
173
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
169
174
|
className: `${prefix}--menu-item__icon`
|
|
@@ -180,7 +185,7 @@ const MenuItem = /*#__PURE__*/React__default.forwardRef(function MenuItem(_ref,
|
|
|
180
185
|
open: submenuOpen,
|
|
181
186
|
onClose: () => {
|
|
182
187
|
closeSubmenu();
|
|
183
|
-
menuItem.current
|
|
188
|
+
menuItem.current?.focus();
|
|
184
189
|
},
|
|
185
190
|
x: boundaries.x,
|
|
186
191
|
y: boundaries.y
|
|
@@ -360,7 +365,7 @@ const MenuItemRadioGroup = /*#__PURE__*/React__default.forwardRef(function MenuI
|
|
|
360
365
|
}, /*#__PURE__*/React__default.createElement("ul", _extends({}, rest, {
|
|
361
366
|
role: "group",
|
|
362
367
|
"aria-label": label
|
|
363
|
-
}), items
|
|
368
|
+
}), items?.map((item, i) => /*#__PURE__*/React__default.createElement(MenuItem, {
|
|
364
369
|
key: i,
|
|
365
370
|
label: itemToString(item),
|
|
366
371
|
role: "menuitemradio",
|
|
@@ -0,0 +1,9 @@
|
|
|
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 { Menu } from './Menu';
|
|
8
|
+
import { MenuItem, MenuItemDivider, MenuItemGroup, MenuItemRadioGroup, MenuItemSelectable } from './MenuItem';
|
|
9
|
+
export { Menu, MenuItem, MenuItemDivider, MenuItemGroup, MenuItemRadioGroup, MenuItemSelectable, };
|
|
@@ -13,6 +13,7 @@ import { ChevronDown } from '@carbon/icons-react';
|
|
|
13
13
|
import Button from '../Button/Button.js';
|
|
14
14
|
import '../Button/Button.Skeleton.js';
|
|
15
15
|
import { Menu } from '../Menu/Menu.js';
|
|
16
|
+
import '../Menu/MenuItem.js';
|
|
16
17
|
import { useAttachedMenu } from '../../internal/useAttachedMenu.js';
|
|
17
18
|
import { useId } from '../../internal/useId.js';
|
|
18
19
|
import { useMergedRefs } from '../../internal/useMergedRefs.js';
|
|
@@ -70,6 +70,6 @@ export default class ModalWrapper extends React.Component<ModalWrapperProps, Mod
|
|
|
70
70
|
handleOpen: () => void;
|
|
71
71
|
handleClose: (evt: React.KeyboardEvent<HTMLDivElement>) => void;
|
|
72
72
|
handleOnRequestSubmit: (evt: React.KeyboardEvent<HTMLDivElement>) => void;
|
|
73
|
-
render(): JSX.Element;
|
|
73
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
74
74
|
}
|
|
75
75
|
export {};
|
|
@@ -25,7 +25,7 @@ export interface NotificationActionButtonProps extends ButtonProps<'button'> {
|
|
|
25
25
|
*/
|
|
26
26
|
onClick?(): void;
|
|
27
27
|
}
|
|
28
|
-
export declare function NotificationActionButton({ children, className: customClassName, onClick, inline, ...rest }: NotificationActionButtonProps): JSX.Element;
|
|
28
|
+
export declare function NotificationActionButton({ children, className: customClassName, onClick, inline, ...rest }: NotificationActionButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
29
29
|
export declare namespace NotificationActionButton {
|
|
30
30
|
var propTypes: {
|
|
31
31
|
/**
|
|
@@ -82,7 +82,7 @@ export interface NotificationButtonProps extends ButtonHTMLAttributes<HTMLButton
|
|
|
82
82
|
name?: string;
|
|
83
83
|
}>;
|
|
84
84
|
}
|
|
85
|
-
export declare function NotificationButton({ 'aria-label': ariaLabel, ariaLabel: deprecatedAriaLabel, className, type, renderIcon: IconTag, name, notificationType, ...rest }: NotificationButtonProps): JSX.Element;
|
|
85
|
+
export declare function NotificationButton({ 'aria-label': ariaLabel, ariaLabel: deprecatedAriaLabel, className, type, renderIcon: IconTag, name, notificationType, ...rest }: NotificationButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
86
86
|
export declare namespace NotificationButton {
|
|
87
87
|
var propTypes: {
|
|
88
88
|
/**
|
|
@@ -186,7 +186,7 @@ export interface ToastNotificationProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
186
186
|
*/
|
|
187
187
|
title?: string;
|
|
188
188
|
}
|
|
189
|
-
export declare function ToastNotification({ ['aria-label']: ariaLabel, ariaLabel: deprecatedAriaLabel, role, onClose, onCloseButtonClick, statusIconDescription, className, children, kind, lowContrast, hideCloseButton, timeout, title, caption, subtitle, ...rest }: ToastNotificationProps): JSX.Element | null;
|
|
189
|
+
export declare function ToastNotification({ ['aria-label']: ariaLabel, ariaLabel: deprecatedAriaLabel, role, onClose, onCloseButtonClick, statusIconDescription, className, children, kind, lowContrast, hideCloseButton, timeout, title, caption, subtitle, ...rest }: ToastNotificationProps): import("react/jsx-runtime").JSX.Element | null;
|
|
190
190
|
export declare namespace ToastNotification {
|
|
191
191
|
var propTypes: {
|
|
192
192
|
/**
|
|
@@ -308,7 +308,7 @@ export interface InlineNotificationProps extends HTMLAttributes<HTMLDivElement>
|
|
|
308
308
|
*/
|
|
309
309
|
title?: string;
|
|
310
310
|
}
|
|
311
|
-
export declare function InlineNotification({ ['aria-label']: ariaLabel, children, title, subtitle, role, onClose, onCloseButtonClick, statusIconDescription, className, kind, lowContrast, hideCloseButton, ...rest }: InlineNotificationProps): JSX.Element | null;
|
|
311
|
+
export declare function InlineNotification({ ['aria-label']: ariaLabel, children, title, subtitle, role, onClose, onCloseButtonClick, statusIconDescription, className, kind, lowContrast, hideCloseButton, ...rest }: InlineNotificationProps): import("react/jsx-runtime").JSX.Element | null;
|
|
312
312
|
export declare namespace InlineNotification {
|
|
313
313
|
var propTypes: {
|
|
314
314
|
/**
|
|
@@ -388,6 +388,7 @@ export interface ActionableNotificationProps extends HTMLAttributes<HTMLDivEleme
|
|
|
388
388
|
*/
|
|
389
389
|
closeOnEscape?: boolean;
|
|
390
390
|
/**
|
|
391
|
+
* @deprecated use StaticNotification once it's available. Issue #15532
|
|
391
392
|
* Specify if focus should be moved to the component when the notification contains actions
|
|
392
393
|
*/
|
|
393
394
|
hasFocus?: boolean;
|
|
@@ -435,7 +436,7 @@ export interface ActionableNotificationProps extends HTMLAttributes<HTMLDivEleme
|
|
|
435
436
|
*/
|
|
436
437
|
title?: string;
|
|
437
438
|
}
|
|
438
|
-
export declare function ActionableNotification({ actionButtonLabel, ['aria-label']: ariaLabel, ariaLabel: deprecatedAriaLabel, children, role, onActionButtonClick, onClose, onCloseButtonClick, statusIconDescription, className, inline, kind, lowContrast, hideCloseButton, hasFocus, closeOnEscape, title, subtitle, ...rest }: ActionableNotificationProps): JSX.Element | null;
|
|
439
|
+
export declare function ActionableNotification({ actionButtonLabel, ['aria-label']: ariaLabel, ariaLabel: deprecatedAriaLabel, children, role, onActionButtonClick, onClose, onCloseButtonClick, statusIconDescription, className, inline, kind, lowContrast, hideCloseButton, hasFocus, closeOnEscape, title, subtitle, ...rest }: ActionableNotificationProps): import("react/jsx-runtime").JSX.Element | null;
|
|
439
440
|
export declare namespace ActionableNotification {
|
|
440
441
|
var propTypes: {
|
|
441
442
|
/**
|
|
@@ -464,9 +465,10 @@ export declare namespace ActionableNotification {
|
|
|
464
465
|
*/
|
|
465
466
|
closeOnEscape: PropTypes.Requireable<boolean>;
|
|
466
467
|
/**
|
|
468
|
+
* Deprecated, please use StaticNotification once it's available. Issue #15532
|
|
467
469
|
* Specify if focus should be moved to the component when the notification contains actions
|
|
468
470
|
*/
|
|
469
|
-
hasFocus:
|
|
471
|
+
hasFocus: (props: any, propName: any, componentName: any, ...rest: any[]) => any;
|
|
470
472
|
/**
|
|
471
473
|
* Specify the close button should be disabled, or not
|
|
472
474
|
*/
|
|
@@ -627,9 +627,10 @@ ActionableNotification.propTypes = {
|
|
|
627
627
|
*/
|
|
628
628
|
closeOnEscape: PropTypes.bool,
|
|
629
629
|
/**
|
|
630
|
+
* Deprecated, please use StaticNotification once it's available. Issue #15532
|
|
630
631
|
* Specify if focus should be moved to the component when the notification contains actions
|
|
631
632
|
*/
|
|
632
|
-
hasFocus: PropTypes.bool,
|
|
633
|
+
hasFocus: deprecate(PropTypes.bool),
|
|
633
634
|
/**
|
|
634
635
|
* Specify the close button should be disabled, or not
|
|
635
636
|
*/
|
|
@@ -16,7 +16,7 @@ export interface NumberInputSkeletonProps extends HTMLAttributes<HTMLDivElement>
|
|
|
16
16
|
*/
|
|
17
17
|
hideLabel?: boolean;
|
|
18
18
|
}
|
|
19
|
-
declare function NumberInputSkeleton({ hideLabel, className, ...rest }: NumberInputSkeletonProps): JSX.Element;
|
|
19
|
+
declare function NumberInputSkeleton({ hideLabel, className, ...rest }: NumberInputSkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
20
20
|
declare namespace NumberInputSkeleton {
|
|
21
21
|
var propTypes: {
|
|
22
22
|
/**
|
|
@@ -11,7 +11,7 @@ interface OrderedListProps extends ComponentProps<'ol'> {
|
|
|
11
11
|
native?: boolean | undefined;
|
|
12
12
|
isExpressive?: boolean | undefined;
|
|
13
13
|
}
|
|
14
|
-
declare function OrderedList({ className, nested, native, isExpressive, ...other }: OrderedListProps): JSX.Element;
|
|
14
|
+
declare function OrderedList({ className, nested, native, isExpressive, ...other }: OrderedListProps): import("react/jsx-runtime").JSX.Element;
|
|
15
15
|
declare namespace OrderedList {
|
|
16
16
|
var propTypes: {
|
|
17
17
|
/**
|
|
@@ -12,6 +12,7 @@ import cx from 'classnames';
|
|
|
12
12
|
import { OverflowMenuVertical } from '@carbon/icons-react';
|
|
13
13
|
import { IconButton } from '../../IconButton/index.js';
|
|
14
14
|
import { Menu } from '../../Menu/Menu.js';
|
|
15
|
+
import '../../Menu/MenuItem.js';
|
|
15
16
|
import { useId } from '../../../internal/useId.js';
|
|
16
17
|
import { usePrefix } from '../../../internal/usePrefix.js';
|
|
17
18
|
import { useAttachedMenu } from '../../../internal/useAttachedMenu.js';
|
|
@@ -6,5 +6,5 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import { ButtonProps } from '../Button';
|
|
9
|
-
declare const PrimaryButton: <T extends React.ElementType<any>>(props: ButtonProps<T>) => JSX.Element;
|
|
9
|
+
declare const PrimaryButton: <T extends React.ElementType<any>>(props: ButtonProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
export default PrimaryButton;
|
|
@@ -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 ProgressBarProps {
|
|
10
9
|
/**
|
|
@@ -44,7 +43,7 @@ interface ProgressBarProps {
|
|
|
44
43
|
*/
|
|
45
44
|
value?: number;
|
|
46
45
|
}
|
|
47
|
-
declare function ProgressBar({ className, helperText, hideLabel, label, max, size, status, type, value, }: ProgressBarProps): JSX.Element;
|
|
46
|
+
declare function ProgressBar({ className, helperText, hideLabel, label, max, size, status, type, value, }: ProgressBarProps): import("react/jsx-runtime").JSX.Element;
|
|
48
47
|
declare namespace ProgressBar {
|
|
49
48
|
var propTypes: {
|
|
50
49
|
/**
|
|
@@ -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 ProgressIndicatorSkeletonProps {
|
|
10
9
|
/**
|
|
@@ -16,7 +15,7 @@ interface ProgressIndicatorSkeletonProps {
|
|
|
16
15
|
*/
|
|
17
16
|
vertical?: boolean;
|
|
18
17
|
}
|
|
19
|
-
declare function ProgressIndicatorSkeleton({ className, vertical, ...rest }: ProgressIndicatorSkeletonProps): JSX.Element;
|
|
18
|
+
declare function ProgressIndicatorSkeleton({ className, vertical, ...rest }: ProgressIndicatorSkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
20
19
|
declare namespace ProgressIndicatorSkeleton {
|
|
21
20
|
var propTypes: {
|
|
22
21
|
/**
|
|
@@ -33,7 +33,7 @@ interface ProgressIndicatorProps extends Omit<React.HTMLAttributes<HTMLUListElem
|
|
|
33
33
|
*/
|
|
34
34
|
vertical?: boolean;
|
|
35
35
|
}
|
|
36
|
-
declare function ProgressIndicator({ children, className: customClassName, currentIndex: controlledIndex, onChange, spaceEqually, vertical, ...rest }: ProgressIndicatorProps): JSX.Element;
|
|
36
|
+
declare function ProgressIndicator({ children, className: customClassName, currentIndex: controlledIndex, onChange, spaceEqually, vertical, ...rest }: ProgressIndicatorProps): import("react/jsx-runtime").JSX.Element;
|
|
37
37
|
declare namespace ProgressIndicator {
|
|
38
38
|
var propTypes: {
|
|
39
39
|
/**
|
|
@@ -118,7 +118,7 @@ interface ProgressStepProps {
|
|
|
118
118
|
*/
|
|
119
119
|
translateWithId?: (id: string) => string;
|
|
120
120
|
}
|
|
121
|
-
declare function ProgressStep({ label, description, className, current, complete, invalid, secondaryLabel, disabled, onClick, translateWithId: t, ...rest }: ProgressStepProps): JSX.Element;
|
|
121
|
+
declare function ProgressStep({ label, description, className, current, complete, invalid, secondaryLabel, disabled, onClick, translateWithId: t, ...rest }: ProgressStepProps): import("react/jsx-runtime").JSX.Element;
|
|
122
122
|
declare namespace ProgressStep {
|
|
123
123
|
var propTypes: {
|
|
124
124
|
/**
|
|
@@ -12,7 +12,7 @@ export interface RadioButtonSkeletonProps extends React.InputHTMLAttributes<HTML
|
|
|
12
12
|
*/
|
|
13
13
|
className?: string;
|
|
14
14
|
}
|
|
15
|
-
declare function RadioButtonSkeleton(props: RadioButtonSkeletonProps): JSX.Element;
|
|
15
|
+
declare function RadioButtonSkeleton(props: RadioButtonSkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
16
16
|
declare namespace RadioButtonSkeleton {
|
|
17
17
|
var propTypes: {
|
|
18
18
|
/**
|
|
@@ -17,7 +17,7 @@ export interface SearchSkeletonProps extends React.HTMLAttributes<HTMLDivElement
|
|
|
17
17
|
small?: boolean;
|
|
18
18
|
}
|
|
19
19
|
declare const SearchSkeleton: {
|
|
20
|
-
({ small, className, ...rest }: SearchSkeletonProps): JSX.Element;
|
|
20
|
+
({ small, className, ...rest }: SearchSkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
21
21
|
propTypes: {
|
|
22
22
|
/**
|
|
23
23
|
* Specify an optional className to add.
|
|
@@ -6,5 +6,5 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import { ButtonProps } from '../Button';
|
|
9
|
-
declare const SecondaryButton: <T extends React.ElementType<any>>(props: ButtonProps<T>) => JSX.Element;
|
|
9
|
+
declare const SecondaryButton: <T extends React.ElementType<any>>(props: ButtonProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
export default SecondaryButton;
|
|
@@ -17,7 +17,7 @@ export interface SelectSkeletonProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
17
17
|
hideLabel?: boolean;
|
|
18
18
|
}
|
|
19
19
|
declare const SelectSkeleton: {
|
|
20
|
-
({ hideLabel, className, ...rest }: SelectSkeletonProps): JSX.Element;
|
|
20
|
+
({ hideLabel, className, ...rest }: SelectSkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
21
21
|
propTypes: {
|
|
22
22
|
/**
|
|
23
23
|
* Specify an optional className to add to the form item wrapper.
|
|
@@ -90,5 +90,5 @@ interface SelectProps extends Omit<ComponentPropsWithRef<'select'>, ExcludedAttr
|
|
|
90
90
|
*/
|
|
91
91
|
warnText?: ReactNode;
|
|
92
92
|
}
|
|
93
|
-
declare const Select: React.ForwardRefExoticComponent<
|
|
93
|
+
declare const Select: React.ForwardRefExoticComponent<Omit<SelectProps, "ref"> & React.RefAttributes<HTMLSelectElement>>;
|
|
94
94
|
export default Select;
|
|
@@ -29,7 +29,7 @@ export interface SelectItemProps extends HTMLAttributes<HTMLOptionElement> {
|
|
|
29
29
|
value: any;
|
|
30
30
|
}
|
|
31
31
|
declare const SelectItem: {
|
|
32
|
-
({ className, value, disabled, hidden, text, ...other }: SelectItemProps): JSX.Element;
|
|
32
|
+
({ className, value, disabled, hidden, text, ...other }: SelectItemProps): import("react/jsx-runtime").JSX.Element;
|
|
33
33
|
propTypes: {
|
|
34
34
|
/**
|
|
35
35
|
* Specify an optional className to be applied to the node
|
|
@@ -25,7 +25,7 @@ export interface SelectItemGroupProps extends HTMLAttributes<HTMLOptGroupElement
|
|
|
25
25
|
label: string;
|
|
26
26
|
}
|
|
27
27
|
declare const SelectItemGroup: {
|
|
28
|
-
({ children, className, disabled, label, ...other }: SelectItemGroupProps): JSX.Element;
|
|
28
|
+
({ children, className, disabled, label, ...other }: SelectItemGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
29
29
|
propTypes: {
|
|
30
30
|
/**
|
|
31
31
|
* Provide the contents of your <SelectItemGroup>
|
|
@@ -12,7 +12,7 @@ export interface SkeletonPlaceholderProps {
|
|
|
12
12
|
className?: string;
|
|
13
13
|
}
|
|
14
14
|
declare const SkeletonPlaceholder: {
|
|
15
|
-
({ className, ...other }: SkeletonPlaceholderProps): JSX.Element;
|
|
15
|
+
({ className, ...other }: SkeletonPlaceholderProps): import("react/jsx-runtime").JSX.Element;
|
|
16
16
|
propTypes: {
|
|
17
17
|
/**
|
|
18
18
|
* Add a custom class to the component
|
|
@@ -28,7 +28,7 @@ interface SkeletonTextProps {
|
|
|
28
28
|
width?: string;
|
|
29
29
|
}
|
|
30
30
|
declare const SkeletonText: {
|
|
31
|
-
({ paragraph, lineCount, width, heading, className, ...rest }: SkeletonTextProps): JSX.Element;
|
|
31
|
+
({ paragraph, lineCount, width, heading, className, ...rest }: SkeletonTextProps): import("react/jsx-runtime").JSX.Element;
|
|
32
32
|
propTypes: {
|
|
33
33
|
/**
|
|
34
34
|
* Specify an optional className to be applied to the container node
|
|
@@ -21,7 +21,7 @@ export interface SliderSkeletonProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
21
21
|
twoHandles?: boolean;
|
|
22
22
|
}
|
|
23
23
|
declare const SliderSkeleton: {
|
|
24
|
-
({ hideLabel, className, twoHandles, ...rest }: SliderSkeletonProps): JSX.Element;
|
|
24
|
+
({ hideLabel, className, twoHandles, ...rest }: SliderSkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
25
25
|
propTypes: {
|
|
26
26
|
/**
|
|
27
27
|
* Specify an optional className to add to the form item wrapper.
|
|
@@ -492,6 +492,6 @@ declare class Slider extends PureComponent<SliderProps> {
|
|
|
492
492
|
getClientXFromEvent(event: MouseEvent | TouchEvent): any;
|
|
493
493
|
hasTwoHandles(): boolean;
|
|
494
494
|
static getDerivedStateFromProps(props: any, state: any): {} | null;
|
|
495
|
-
render(): JSX.Element;
|
|
495
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
496
496
|
}
|
|
497
497
|
export default Slider;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const LowerHandle: () => JSX.Element;
|
|
2
|
-
export declare const LowerHandleFocus: () => JSX.Element;
|
|
3
|
-
export declare const UpperHandle: () => JSX.Element;
|
|
4
|
-
export declare const UpperHandleFocus: () => JSX.Element;
|
|
1
|
+
export declare const LowerHandle: () => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const LowerHandleFocus: () => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare const UpperHandle: () => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare const UpperHandleFocus: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -4,8 +4,9 @@
|
|
|
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
|
|
7
|
+
import { ReactNode } from 'react';
|
|
8
8
|
import { Stack } from './Stack';
|
|
9
|
-
|
|
10
|
-
declare const
|
|
9
|
+
import { ForwardRefReturn } from '../../types/common';
|
|
10
|
+
declare const HStack: ForwardRefReturn<ReactNode>;
|
|
11
|
+
declare const VStack: ForwardRefReturn<ReactNode>;
|
|
11
12
|
export { HStack, Stack, VStack };
|
|
@@ -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
|
export interface StructuredListSkeletonProps {
|
|
10
9
|
/**
|
|
@@ -16,7 +15,7 @@ export interface StructuredListSkeletonProps {
|
|
|
16
15
|
*/
|
|
17
16
|
rowCount?: number;
|
|
18
17
|
}
|
|
19
|
-
declare function StructuredListSkeleton({ rowCount, className, ...rest }: StructuredListSkeletonProps): JSX.Element;
|
|
18
|
+
declare function StructuredListSkeleton({ rowCount, className, ...rest }: StructuredListSkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
20
19
|
declare namespace StructuredListSkeleton {
|
|
21
20
|
var propTypes: {
|
|
22
21
|
/**
|
|
@@ -33,7 +33,7 @@ export interface StructuredListWrapperProps extends DivAttrs {
|
|
|
33
33
|
*/
|
|
34
34
|
selection?: boolean;
|
|
35
35
|
}
|
|
36
|
-
export declare function StructuredListWrapper(props: StructuredListWrapperProps): JSX.Element;
|
|
36
|
+
export declare function StructuredListWrapper(props: StructuredListWrapperProps): import("react/jsx-runtime").JSX.Element;
|
|
37
37
|
export declare namespace StructuredListWrapper {
|
|
38
38
|
var propTypes: {
|
|
39
39
|
/**
|
|
@@ -77,7 +77,7 @@ export interface StructuredListHeadProps extends DivAttrs {
|
|
|
77
77
|
*/
|
|
78
78
|
className?: string;
|
|
79
79
|
}
|
|
80
|
-
export declare function StructuredListHead(props: any): JSX.Element;
|
|
80
|
+
export declare function StructuredListHead(props: any): import("react/jsx-runtime").JSX.Element;
|
|
81
81
|
export declare namespace StructuredListHead {
|
|
82
82
|
var propTypes: {
|
|
83
83
|
/**
|
|
@@ -105,7 +105,7 @@ export interface StructuredListBodyProps extends DivAttrs {
|
|
|
105
105
|
*/
|
|
106
106
|
onKeyDown?(event: KeyboardEvent): void;
|
|
107
107
|
}
|
|
108
|
-
export declare function StructuredListBody(props: StructuredListBodyProps): JSX.Element;
|
|
108
|
+
export declare function StructuredListBody(props: StructuredListBodyProps): import("react/jsx-runtime").JSX.Element;
|
|
109
109
|
export declare namespace StructuredListBody {
|
|
110
110
|
var propTypes: {
|
|
111
111
|
/**
|
|
@@ -145,7 +145,7 @@ export interface StructuredListRowProps extends DivAttrs {
|
|
|
145
145
|
*/
|
|
146
146
|
onKeyDown?(event: KeyboardEvent): void;
|
|
147
147
|
}
|
|
148
|
-
export declare function StructuredListRow(props: StructuredListRowProps): JSX.Element;
|
|
148
|
+
export declare function StructuredListRow(props: StructuredListRowProps): import("react/jsx-runtime").JSX.Element;
|
|
149
149
|
export declare namespace StructuredListRow {
|
|
150
150
|
var propTypes: {
|
|
151
151
|
/**
|
|
@@ -196,7 +196,7 @@ export interface StructuredListInputProps extends DivAttrs {
|
|
|
196
196
|
*/
|
|
197
197
|
title?: string;
|
|
198
198
|
}
|
|
199
|
-
export declare function StructuredListInput(props: StructuredListInputProps): JSX.Element;
|
|
199
|
+
export declare function StructuredListInput(props: StructuredListInputProps): import("react/jsx-runtime").JSX.Element;
|
|
200
200
|
export declare namespace StructuredListInput {
|
|
201
201
|
var propTypes: {
|
|
202
202
|
/**
|
|
@@ -247,7 +247,7 @@ export interface StructuredListCellProps extends DivAttrs {
|
|
|
247
247
|
*/
|
|
248
248
|
noWrap?: boolean;
|
|
249
249
|
}
|
|
250
|
-
export declare function StructuredListCell(props: StructuredListCellProps): JSX.Element;
|
|
250
|
+
export declare function StructuredListCell(props: StructuredListCellProps): import("react/jsx-runtime").JSX.Element;
|
|
251
251
|
export declare namespace StructuredListCell {
|
|
252
252
|
var propTypes: {
|
|
253
253
|
/**
|