@carbon/react 1.40.0 → 1.41.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 +1564 -872
- package/es/components/Accordion/Accordion.Skeleton.d.ts +0 -5
- package/es/components/Accordion/Accordion.Skeleton.js +0 -5
- package/es/components/Breadcrumb/BreadcrumbItem.js +3 -1
- package/es/components/Checkbox/Checkbox.js +3 -6
- package/es/components/CodeSnippet/CodeSnippet.js +5 -12
- package/es/components/ComboBox/ComboBox.d.ts +1 -5
- package/es/components/ComboBox/ComboBox.js +6 -20
- package/es/components/ComposedModal/ComposedModal.js +1 -5
- package/es/components/ComposedModal/ModalFooter.js +4 -9
- package/es/components/ComposedModal/ModalHeader.js +1 -4
- package/es/components/ContentSwitcher/ContentSwitcher.d.ts +3 -8
- package/es/components/ContentSwitcher/ContentSwitcher.js +7 -11
- package/es/components/Copy/Copy.js +4 -8
- package/es/components/CopyButton/CopyButton.js +8 -7
- package/es/components/DataTable/DataTable.d.ts +3 -39
- package/es/components/DataTable/DataTable.js +10 -18
- package/es/components/DataTable/Table.d.ts +0 -4
- package/es/components/DataTable/Table.js +4 -7
- package/es/components/DataTable/TableBatchAction.js +12 -5
- package/es/components/DataTable/TableBatchActions.js +1 -6
- package/es/components/DataTable/TableBody.d.ts +0 -3
- package/es/components/DataTable/TableBody.js +1 -3
- package/es/components/DataTable/TableExpandHeader.d.ts +1 -1
- package/es/components/DataTable/TableHeader.js +3 -8
- package/es/components/DataTable/TableSelectAll.d.ts +0 -3
- package/es/components/DataTable/TableSelectAll.js +1 -4
- package/es/components/DataTable/TableToolbar.d.ts +10 -0
- package/es/components/DataTable/TableToolbar.js +15 -7
- package/es/components/DataTable/TableToolbarMenu.js +2 -6
- package/es/components/DataTable/TableToolbarSearch.d.ts +2 -8
- package/es/components/DataTable/TableToolbarSearch.js +6 -11
- package/es/components/DataTable/tools/sorting.js +2 -2
- package/es/components/DatePicker/DatePicker.d.ts +4 -4
- package/es/components/DatePicker/DatePicker.js +9 -4
- package/es/components/DatePicker/plugins/fixEventsPlugin.js +6 -0
- package/es/components/DatePickerInput/DatePickerInput.d.ts +1 -1
- package/es/components/DatePickerInput/DatePickerInput.js +12 -6
- package/es/components/Dropdown/Dropdown.js +6 -15
- package/es/components/FileUploader/FileUploader.d.ts +2 -11
- package/es/components/FileUploader/FileUploader.js +15 -19
- package/es/components/FileUploader/FileUploaderButton.js +2 -2
- package/es/components/FileUploader/FileUploaderDropContainer.d.ts +0 -7
- package/es/components/FileUploader/FileUploaderDropContainer.js +2 -8
- package/es/components/FileUploader/FileUploaderItem.d.ts +0 -4
- package/es/components/FileUploader/FileUploaderItem.js +12 -9
- package/es/components/FileUploader/Filename.d.ts +6 -10
- package/es/components/FileUploader/Filename.js +7 -11
- package/es/components/FormGroup/FormGroup.d.ts +0 -5
- package/es/components/FormGroup/FormGroup.js +3 -8
- package/es/components/FormItem/FormItem.d.ts +32 -0
- package/es/components/FormItem/index.d.ts +9 -0
- package/es/components/FormLabel/FormLabel.js +4 -1
- package/es/components/ListBox/ListBox.js +4 -8
- package/es/components/ListBox/ListBoxMenuIcon.js +1 -4
- package/es/components/ListBox/ListBoxMenuItem.js +4 -8
- package/es/components/ListBox/ListBoxSelection.d.ts +5 -5
- package/es/components/ListBox/ListBoxSelection.js +12 -13
- package/es/components/ListBox/next/ListBoxSelection.js +12 -13
- package/es/components/ListBox/next/ListBoxTrigger.js +3 -5
- package/es/components/ListItem/ListItem.d.ts +1 -1
- package/es/components/ListItem/ListItem.js +6 -2
- package/es/components/Menu/MenuItem.js +4 -1
- package/es/components/Modal/Modal.d.ts +137 -0
- package/es/components/Modal/Modal.js +39 -45
- package/es/components/Modal/index.d.ts +9 -0
- package/es/components/ModalWrapper/ModalWrapper.js +13 -19
- package/es/components/MultiSelect/FilterableMultiSelect.js +14 -28
- package/es/components/MultiSelect/MultiSelect.js +17 -33
- package/es/components/MultiSelect/MultiSelectPropTypes.js +2 -2
- package/es/components/MultiSelect/tools/sorting.js +2 -2
- package/es/components/Notification/Notification.d.ts +11 -29
- package/es/components/Notification/Notification.js +38 -57
- package/es/components/NumberInput/NumberInput.js +6 -2
- package/es/components/OverflowMenu/OverflowMenu.js +27 -33
- package/es/components/OverflowMenuItem/OverflowMenuItem.js +4 -1
- package/es/components/Pagination/experimental/PageSelector.js +3 -8
- package/es/components/Pagination/experimental/Pagination.js +16 -34
- package/es/components/ProgressIndicator/ProgressIndicator.js +7 -6
- package/es/components/RadioTile/RadioTile.js +6 -7
- package/es/components/Search/Search.Skeleton.d.ts +0 -3
- package/es/components/Search/Search.Skeleton.js +1 -4
- package/es/components/Select/Select.d.ts +2 -2
- package/es/components/Select/Select.js +13 -16
- package/es/components/SelectItem/SelectItem.d.ts +0 -6
- package/es/components/SelectItem/SelectItem.js +4 -10
- package/es/components/SelectItemGroup/SelectItemGroup.d.ts +0 -3
- package/es/components/SelectItemGroup/SelectItemGroup.js +1 -4
- package/es/components/SkeletonIcon/SkeletonIcon.d.ts +13 -0
- package/es/components/SkeletonIcon/SkeletonIcon.js +2 -3
- package/es/components/SkeletonText/SkeletonText.d.ts +0 -6
- package/es/components/SkeletonText/SkeletonText.js +0 -6
- package/es/components/Slider/Slider.Skeleton.d.ts +9 -1
- package/es/components/Slider/Slider.Skeleton.js +20 -4
- package/es/components/Slider/Slider.d.ts +137 -25
- package/es/components/Slider/Slider.js +779 -186
- package/es/components/StructuredList/StructuredList.js +5 -2
- package/es/components/Switch/Switch.js +3 -7
- package/es/components/Tabs/Tabs.js +5 -2
- package/es/components/Tag/Tag.js +4 -2
- package/es/components/Text/Text.js +1 -1
- package/es/components/Text/TextDirection.d.ts +1 -1
- package/es/components/TextArea/TextArea.js +30 -34
- package/es/components/TextInput/ControlledPasswordInput.js +12 -19
- package/es/components/TextInput/TextInput.js +8 -3
- package/es/components/Tile/Tile.js +5 -3
- package/es/components/TileGroup/TileGroup.js +5 -4
- package/es/components/Toggle/Toggle.js +4 -2
- package/es/components/Toggletip/index.d.ts +6 -1
- package/es/components/Toggletip/index.js +7 -1
- package/es/components/UIShell/Content.js +1 -4
- package/es/components/UIShell/SideNav.d.ts +1 -1
- package/es/components/UIShell/SideNavDetails.d.ts +32 -0
- package/es/components/UIShell/SideNavDetails.js +1 -2
- package/es/components/UIShell/SideNavDivider.d.ts +15 -0
- package/es/components/UIShell/SideNavDivider.js +2 -2
- package/es/components/UIShell/SideNavFooter.js +2 -5
- package/es/components/UIShell/SideNavIcon.d.ts +25 -0
- package/es/components/UIShell/SideNavIcon.js +4 -7
- package/es/components/UIShell/SideNavSwitcher.d.ts +31 -0
- package/es/components/UIShell/SideNavSwitcher.js +6 -5
- package/es/index.js +2 -2
- package/es/internal/FloatingMenu.js +2 -7
- package/es/internal/Selection.js +0 -3
- package/es/internal/noopFn.d.ts +7 -0
- package/es/internal/noopFn.js +10 -0
- package/es/internal/useNormalizedInputProps.js +6 -2
- package/es/internal/wrapFocus.js +5 -5
- package/es/prop-types/requiredIfGivenPropIsTruthy.js +2 -2
- package/lib/components/Accordion/Accordion.Skeleton.d.ts +0 -5
- package/lib/components/Accordion/Accordion.Skeleton.js +0 -5
- package/lib/components/Breadcrumb/BreadcrumbItem.js +3 -1
- package/lib/components/Checkbox/Checkbox.js +3 -6
- package/lib/components/CodeSnippet/CodeSnippet.js +5 -12
- package/lib/components/ComboBox/ComboBox.d.ts +1 -5
- package/lib/components/ComboBox/ComboBox.js +5 -19
- package/lib/components/ComposedModal/ComposedModal.js +1 -5
- package/lib/components/ComposedModal/ModalFooter.js +4 -9
- package/lib/components/ComposedModal/ModalHeader.js +1 -4
- package/lib/components/ContentSwitcher/ContentSwitcher.d.ts +3 -8
- package/lib/components/ContentSwitcher/ContentSwitcher.js +7 -11
- package/lib/components/Copy/Copy.js +4 -8
- package/lib/components/CopyButton/CopyButton.js +8 -7
- package/lib/components/DataTable/DataTable.d.ts +3 -39
- package/lib/components/DataTable/DataTable.js +13 -21
- package/lib/components/DataTable/Table.d.ts +0 -4
- package/lib/components/DataTable/Table.js +3 -6
- package/lib/components/DataTable/TableBatchAction.js +12 -5
- package/lib/components/DataTable/TableBatchActions.js +1 -6
- package/lib/components/DataTable/TableBody.d.ts +0 -3
- package/lib/components/DataTable/TableBody.js +1 -3
- package/lib/components/DataTable/TableExpandHeader.d.ts +1 -1
- package/lib/components/DataTable/TableHeader.js +3 -8
- package/lib/components/DataTable/TableSelectAll.d.ts +0 -3
- package/lib/components/DataTable/TableSelectAll.js +1 -4
- package/lib/components/DataTable/TableToolbar.d.ts +10 -0
- package/lib/components/DataTable/TableToolbar.js +15 -7
- package/lib/components/DataTable/TableToolbarMenu.js +2 -6
- package/lib/components/DataTable/TableToolbarSearch.d.ts +2 -8
- package/lib/components/DataTable/TableToolbarSearch.js +6 -11
- package/lib/components/DataTable/tools/sorting.js +2 -2
- package/lib/components/DatePicker/DatePicker.d.ts +4 -4
- package/lib/components/DatePicker/DatePicker.js +9 -4
- package/lib/components/DatePicker/plugins/fixEventsPlugin.js +6 -0
- package/lib/components/DatePickerInput/DatePickerInput.d.ts +1 -1
- package/lib/components/DatePickerInput/DatePickerInput.js +12 -6
- package/lib/components/Dropdown/Dropdown.js +6 -15
- package/lib/components/FileUploader/FileUploader.d.ts +2 -11
- package/lib/components/FileUploader/FileUploader.js +15 -19
- package/lib/components/FileUploader/FileUploaderButton.js +2 -2
- package/lib/components/FileUploader/FileUploaderDropContainer.d.ts +0 -7
- package/lib/components/FileUploader/FileUploaderDropContainer.js +2 -8
- package/lib/components/FileUploader/FileUploaderItem.d.ts +0 -4
- package/lib/components/FileUploader/FileUploaderItem.js +12 -9
- package/lib/components/FileUploader/Filename.d.ts +6 -10
- package/lib/components/FileUploader/Filename.js +7 -11
- package/lib/components/FormGroup/FormGroup.d.ts +0 -5
- package/lib/components/FormGroup/FormGroup.js +3 -8
- package/lib/components/FormItem/FormItem.d.ts +32 -0
- package/lib/components/FormItem/index.d.ts +9 -0
- package/lib/components/FormLabel/FormLabel.js +4 -1
- package/lib/components/ListBox/ListBox.js +4 -8
- package/lib/components/ListBox/ListBoxMenuIcon.js +1 -4
- package/lib/components/ListBox/ListBoxMenuItem.js +4 -8
- package/lib/components/ListBox/ListBoxSelection.d.ts +5 -5
- package/lib/components/ListBox/ListBoxSelection.js +12 -13
- package/lib/components/ListBox/next/ListBoxSelection.js +12 -13
- package/lib/components/ListBox/next/ListBoxTrigger.js +3 -5
- package/lib/components/ListItem/ListItem.d.ts +1 -1
- package/lib/components/ListItem/ListItem.js +6 -2
- package/lib/components/Menu/MenuItem.js +4 -1
- package/lib/components/Modal/Modal.d.ts +137 -0
- package/lib/components/Modal/Modal.js +40 -45
- package/lib/components/Modal/index.d.ts +9 -0
- package/lib/components/ModalWrapper/ModalWrapper.js +13 -19
- package/lib/components/MultiSelect/FilterableMultiSelect.js +18 -32
- package/lib/components/MultiSelect/MultiSelect.js +16 -32
- package/lib/components/MultiSelect/MultiSelectPropTypes.js +2 -2
- package/lib/components/MultiSelect/tools/sorting.js +2 -2
- package/lib/components/Notification/Notification.d.ts +11 -29
- package/lib/components/Notification/Notification.js +38 -57
- package/lib/components/NumberInput/NumberInput.js +6 -2
- package/lib/components/OverflowMenu/OverflowMenu.js +27 -33
- package/lib/components/OverflowMenuItem/OverflowMenuItem.js +4 -1
- package/lib/components/Pagination/experimental/PageSelector.js +3 -8
- package/lib/components/Pagination/experimental/Pagination.js +16 -34
- package/lib/components/ProgressIndicator/ProgressIndicator.js +7 -6
- package/lib/components/RadioTile/RadioTile.js +6 -7
- package/lib/components/Search/Search.Skeleton.d.ts +0 -3
- package/lib/components/Search/Search.Skeleton.js +1 -4
- package/lib/components/Select/Select.d.ts +2 -2
- package/lib/components/Select/Select.js +13 -16
- package/lib/components/SelectItem/SelectItem.d.ts +0 -6
- package/lib/components/SelectItem/SelectItem.js +4 -10
- package/lib/components/SelectItemGroup/SelectItemGroup.d.ts +0 -3
- package/lib/components/SelectItemGroup/SelectItemGroup.js +1 -4
- package/lib/components/SkeletonIcon/SkeletonIcon.d.ts +13 -0
- package/lib/components/SkeletonIcon/SkeletonIcon.js +2 -3
- package/lib/components/SkeletonText/SkeletonText.d.ts +0 -6
- package/lib/components/SkeletonText/SkeletonText.js +0 -6
- package/lib/components/Slider/Slider.Skeleton.d.ts +9 -1
- package/lib/components/Slider/Slider.Skeleton.js +20 -4
- package/lib/components/Slider/Slider.d.ts +137 -25
- package/lib/components/Slider/Slider.js +778 -185
- package/lib/components/StructuredList/StructuredList.js +5 -2
- package/lib/components/Switch/Switch.js +3 -7
- package/lib/components/Tabs/Tabs.js +5 -2
- package/lib/components/Tag/Tag.js +4 -2
- package/lib/components/Text/Text.js +1 -1
- package/lib/components/Text/TextDirection.d.ts +1 -1
- package/lib/components/TextArea/TextArea.js +30 -34
- package/lib/components/TextInput/ControlledPasswordInput.js +12 -19
- package/lib/components/TextInput/TextInput.js +8 -3
- package/lib/components/Tile/Tile.js +5 -3
- package/lib/components/TileGroup/TileGroup.js +5 -4
- package/lib/components/Toggle/Toggle.js +4 -2
- package/lib/components/Toggletip/index.d.ts +6 -1
- package/lib/components/Toggletip/index.js +7 -1
- package/lib/components/UIShell/Content.js +1 -4
- package/lib/components/UIShell/SideNav.d.ts +1 -1
- package/lib/components/UIShell/SideNavDetails.d.ts +32 -0
- package/lib/components/UIShell/SideNavDetails.js +1 -2
- package/lib/components/UIShell/SideNavDivider.d.ts +15 -0
- package/lib/components/UIShell/SideNavDivider.js +2 -2
- package/lib/components/UIShell/SideNavFooter.js +2 -5
- package/lib/components/UIShell/SideNavIcon.d.ts +25 -0
- package/lib/components/UIShell/SideNavIcon.js +4 -7
- package/lib/components/UIShell/SideNavSwitcher.d.ts +31 -0
- package/lib/components/UIShell/SideNavSwitcher.js +5 -4
- package/lib/index.js +4 -4
- package/lib/internal/FloatingMenu.js +2 -7
- package/lib/internal/Selection.js +0 -3
- package/lib/internal/noopFn.d.ts +7 -0
- package/lib/internal/noopFn.js +14 -0
- package/lib/internal/useNormalizedInputProps.js +6 -2
- package/lib/internal/wrapFocus.js +5 -5
- package/lib/prop-types/requiredIfGivenPropIsTruthy.js +2 -2
- package/package.json +9 -9
- package/scss/components/slug/_index.scss +9 -0
- package/scss/components/slug/_slug.scss +9 -0
|
@@ -11,7 +11,7 @@ import React__default from 'react';
|
|
|
11
11
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
12
12
|
|
|
13
13
|
var _hr;
|
|
14
|
-
|
|
14
|
+
const SideNavDivider = _ref => {
|
|
15
15
|
let {
|
|
16
16
|
className
|
|
17
17
|
} = _ref;
|
|
@@ -20,7 +20,7 @@ function SideNavDivider(_ref) {
|
|
|
20
20
|
return /*#__PURE__*/React__default.createElement("li", {
|
|
21
21
|
className: classNames
|
|
22
22
|
}, _hr || (_hr = /*#__PURE__*/React__default.createElement("hr", null)));
|
|
23
|
-
}
|
|
23
|
+
};
|
|
24
24
|
SideNavDivider.propTypes = {
|
|
25
25
|
/**
|
|
26
26
|
* Provide an optional class to be applied to the containing node
|
|
@@ -20,7 +20,7 @@ var _Close, _ChevronRight;
|
|
|
20
20
|
*/
|
|
21
21
|
function SideNavFooter(_ref) {
|
|
22
22
|
let {
|
|
23
|
-
assistiveText,
|
|
23
|
+
assistiveText = 'Toggle opening or closing the side navigation',
|
|
24
24
|
className: customClassName,
|
|
25
25
|
expanded,
|
|
26
26
|
onToggle
|
|
@@ -50,7 +50,7 @@ SideNavFooter.propTypes = {
|
|
|
50
50
|
* Provide text to be read to screen readers and shown as a tooltip when
|
|
51
51
|
* interacting with the toggle button in the footer
|
|
52
52
|
*/
|
|
53
|
-
assistiveText: PropTypes.string
|
|
53
|
+
assistiveText: PropTypes.string,
|
|
54
54
|
className: PropTypes.string,
|
|
55
55
|
/**
|
|
56
56
|
* Specify whether the side navigation is expanded or collapsed
|
|
@@ -62,8 +62,5 @@ SideNavFooter.propTypes = {
|
|
|
62
62
|
*/
|
|
63
63
|
onToggle: PropTypes.func.isRequired
|
|
64
64
|
};
|
|
65
|
-
SideNavFooter.defaultProps = {
|
|
66
|
-
assistiveText: 'Toggle opening or closing the side navigation'
|
|
67
|
-
};
|
|
68
65
|
|
|
69
66
|
export { SideNavFooter as default };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2016, 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 SideNavIconProps {
|
|
9
|
+
/**
|
|
10
|
+
* Provide a single icon as the child to `SideNavIcon` to render in the
|
|
11
|
+
* container
|
|
12
|
+
*/
|
|
13
|
+
children: React.ReactNode;
|
|
14
|
+
/**
|
|
15
|
+
* Provide an optional class to be applied to the containing node
|
|
16
|
+
*/
|
|
17
|
+
className?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Specify whether the icon should be placed in a smaller bounding box
|
|
20
|
+
* Since the 'small' prop is not provided, we make it optional and set a default value to `false`.
|
|
21
|
+
*/
|
|
22
|
+
small?: boolean;
|
|
23
|
+
}
|
|
24
|
+
declare const SideNavIcon: React.FC<SideNavIconProps>;
|
|
25
|
+
export default SideNavIcon;
|
|
@@ -10,11 +10,11 @@ import PropTypes from 'prop-types';
|
|
|
10
10
|
import React__default from 'react';
|
|
11
11
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
const SideNavIcon = _ref => {
|
|
14
14
|
let {
|
|
15
15
|
children,
|
|
16
16
|
className: customClassName,
|
|
17
|
-
small
|
|
17
|
+
small = false
|
|
18
18
|
} = _ref;
|
|
19
19
|
const prefix = usePrefix();
|
|
20
20
|
const className = cx({
|
|
@@ -25,7 +25,7 @@ function SideNavIcon(_ref) {
|
|
|
25
25
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
26
26
|
className: className
|
|
27
27
|
}, children);
|
|
28
|
-
}
|
|
28
|
+
};
|
|
29
29
|
SideNavIcon.propTypes = {
|
|
30
30
|
/**
|
|
31
31
|
* Provide a single icon as the child to `SideNavIcon` to render in the
|
|
@@ -39,10 +39,7 @@ SideNavIcon.propTypes = {
|
|
|
39
39
|
/**
|
|
40
40
|
* Specify whether the icon should be placed in a smaller bounding box
|
|
41
41
|
*/
|
|
42
|
-
small: PropTypes.bool
|
|
43
|
-
};
|
|
44
|
-
SideNavIcon.defaultProps = {
|
|
45
|
-
small: false
|
|
42
|
+
small: PropTypes.bool
|
|
46
43
|
};
|
|
47
44
|
|
|
48
45
|
export { SideNavIcon as default };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2016, 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, { ChangeEventHandler } from 'react';
|
|
8
|
+
interface SideNavSwitcherProps {
|
|
9
|
+
/**
|
|
10
|
+
* Provide an optional class to be applied to the containing node
|
|
11
|
+
*/
|
|
12
|
+
className?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Provide the label for the switcher. This will be the first visible option
|
|
15
|
+
* when someone views this control
|
|
16
|
+
*/
|
|
17
|
+
labelText: string;
|
|
18
|
+
/**
|
|
19
|
+
* Provide a callback function that is called whenever the switcher value is
|
|
20
|
+
* updated
|
|
21
|
+
*/
|
|
22
|
+
onChange?: ChangeEventHandler<HTMLSelectElement>;
|
|
23
|
+
/**
|
|
24
|
+
* Provide an array of options to be rendered in the switcher as an
|
|
25
|
+
* `<option>`. The text value will be what is displayed to the user and is set
|
|
26
|
+
* as the `value` prop for each `<option>`.
|
|
27
|
+
*/
|
|
28
|
+
options: string[];
|
|
29
|
+
}
|
|
30
|
+
declare const SideNavSwitcher: React.ForwardRefExoticComponent<SideNavSwitcherProps & React.RefAttributes<HTMLSelectElement>>;
|
|
31
|
+
export default SideNavSwitcher;
|
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
import { ChevronDown } from '@carbon/icons-react';
|
|
9
9
|
import cx from 'classnames';
|
|
10
10
|
import PropTypes from 'prop-types';
|
|
11
|
-
import React__default from 'react';
|
|
12
|
-
import { usePrefix } from '../../internal/usePrefix.js';
|
|
11
|
+
import React__default, { forwardRef } from 'react';
|
|
13
12
|
import { useId } from '../../internal/useId.js';
|
|
13
|
+
import { usePrefix } from '../../internal/usePrefix.js';
|
|
14
14
|
|
|
15
15
|
var _ChevronDown;
|
|
16
|
-
const SideNavSwitcher = /*#__PURE__*/
|
|
16
|
+
const SideNavSwitcher = /*#__PURE__*/forwardRef(function SideNavSwitcher(props, ref) {
|
|
17
17
|
const id = useId('side-nav-switcher');
|
|
18
18
|
const prefix = usePrefix();
|
|
19
19
|
const {
|
|
@@ -23,6 +23,7 @@ const SideNavSwitcher = /*#__PURE__*/React__default.forwardRef(function SideNavS
|
|
|
23
23
|
options
|
|
24
24
|
} = props;
|
|
25
25
|
const className = cx(`${prefix}--side-nav__switcher`, customClassName);
|
|
26
|
+
|
|
26
27
|
// Note for usage around `onBlur`: https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-onchange.md
|
|
27
28
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
28
29
|
className: className
|
|
@@ -72,8 +73,8 @@ SideNavSwitcher.propTypes = {
|
|
|
72
73
|
* `<option>`. The text value will be what is displayed to the user and is set
|
|
73
74
|
* as the `value` prop for each `<option>`.
|
|
74
75
|
*/
|
|
76
|
+
// @ts-expect-error
|
|
75
77
|
options: PropTypes.arrayOf(PropTypes.string).isRequired
|
|
76
78
|
};
|
|
77
|
-
var SideNavSwitcher$1 = SideNavSwitcher;
|
|
78
79
|
|
|
79
|
-
export { SideNavSwitcher
|
|
80
|
+
export { SideNavSwitcher as default };
|
package/es/index.js
CHANGED
|
@@ -44,6 +44,7 @@ export { default as FluidForm } from './components/FluidForm/FluidForm.js';
|
|
|
44
44
|
export { FormContext } from './components/FluidForm/FormContext.js';
|
|
45
45
|
export { default as Form } from './components/Form/Form.js';
|
|
46
46
|
export { default as FormGroup } from './components/FormGroup/FormGroup.js';
|
|
47
|
+
export { default as FormItem } from './components/FormItem/FormItem.js';
|
|
47
48
|
export { default as FormLabel } from './components/FormLabel/FormLabel.js';
|
|
48
49
|
export { FlexGrid } from './components/Grid/FlexGrid.js';
|
|
49
50
|
export { Grid } from './components/Grid/Grid.js';
|
|
@@ -57,6 +58,7 @@ export { default as Link } from './components/Link/Link.js';
|
|
|
57
58
|
export { default as ListItem } from './components/ListItem/ListItem.js';
|
|
58
59
|
export { default as Loading } from './components/Loading/Loading.js';
|
|
59
60
|
export { MenuButton } from './components/MenuButton/index.js';
|
|
61
|
+
export { default as Modal } from './components/Modal/Modal.js';
|
|
60
62
|
export { ActionableNotification, InlineNotification, NotificationActionButton, NotificationButton, ToastNotification } from './components/Notification/Notification.js';
|
|
61
63
|
export { default as NumberInputSkeleton } from './components/NumberInput/NumberInput.Skeleton.js';
|
|
62
64
|
export { NumberInput } from './components/NumberInput/NumberInput.js';
|
|
@@ -154,7 +156,6 @@ export { default as useContextMenu } from './components/ContextMenu/useContextMe
|
|
|
154
156
|
export { default as Copy } from './components/Copy/Copy.js';
|
|
155
157
|
export { default as CopyButton } from './components/CopyButton/CopyButton.js';
|
|
156
158
|
export { default as ErrorBoundary } from './components/ErrorBoundary/ErrorBoundary.js';
|
|
157
|
-
export { default as FormItem } from './components/FormItem/FormItem.js';
|
|
158
159
|
export { default as InlineLoading } from './components/InlineLoading/InlineLoading.js';
|
|
159
160
|
export { default as ModalWrapper } from './components/ModalWrapper/ModalWrapper.js';
|
|
160
161
|
export { default as ProgressIndicatorSkeleton } from './components/ProgressIndicator/ProgressIndicator.Skeleton.js';
|
|
@@ -205,7 +206,6 @@ export { ErrorBoundaryContext } from './components/ErrorBoundary/ErrorBoundaryCo
|
|
|
205
206
|
export { default as FilterableMultiSelect } from './components/MultiSelect/FilterableMultiSelect.js';
|
|
206
207
|
export { Menu } from './components/Menu/Menu.js';
|
|
207
208
|
export { MenuItem, MenuItemDivider, MenuItemGroup, MenuItemRadioGroup, MenuItemSelectable } from './components/Menu/MenuItem.js';
|
|
208
|
-
export { default as Modal } from './components/Modal/Modal.js';
|
|
209
209
|
export { default as MultiSelect } from './components/MultiSelect/MultiSelect.js';
|
|
210
210
|
export { default as Pagination } from './components/Pagination/Pagination.js';
|
|
211
211
|
export { default as PaginationNav } from './components/PaginationNav/PaginationNav.js';
|
|
@@ -195,13 +195,13 @@ class FloatingMenu extends React__default.Component {
|
|
|
195
195
|
} = prevProps;
|
|
196
196
|
const {
|
|
197
197
|
menuOffset = {},
|
|
198
|
-
menuDirection
|
|
198
|
+
menuDirection = DIRECTION_BOTTOM
|
|
199
199
|
} = _this.props;
|
|
200
200
|
if (hasChangeInOffset(oldMenuOffset, menuOffset) || oldMenuDirection !== menuDirection || isAdjustment) {
|
|
201
201
|
const {
|
|
202
202
|
flipped,
|
|
203
203
|
triggerRef,
|
|
204
|
-
updateOrientation
|
|
204
|
+
updateOrientation = null
|
|
205
205
|
} = _this.props;
|
|
206
206
|
const {
|
|
207
207
|
current: triggerEl
|
|
@@ -455,11 +455,6 @@ _defineProperty(FloatingMenu, "propTypes", {
|
|
|
455
455
|
*/
|
|
456
456
|
updateOrientation: PropTypes.func
|
|
457
457
|
});
|
|
458
|
-
_defineProperty(FloatingMenu, "defaultProps", {
|
|
459
|
-
menuOffset: {},
|
|
460
|
-
menuDirection: DIRECTION_BOTTOM,
|
|
461
|
-
updateOrientation: null
|
|
462
|
-
});
|
|
463
458
|
var FloatingMenu$1 = FloatingMenu;
|
|
464
459
|
|
|
465
460
|
export { DIRECTION_BOTTOM, DIRECTION_LEFT, DIRECTION_RIGHT, DIRECTION_TOP, FloatingMenu$1 as default };
|
package/es/internal/Selection.js
CHANGED
|
@@ -189,9 +189,6 @@ _defineProperty(Selection, "propTypes", {
|
|
|
189
189
|
onChange: PropTypes.func,
|
|
190
190
|
render: PropTypes.func
|
|
191
191
|
});
|
|
192
|
-
_defineProperty(Selection, "defaultProps", {
|
|
193
|
-
initialSelectedItems: []
|
|
194
|
-
});
|
|
195
192
|
const removeAtIndex = (array, index) => {
|
|
196
193
|
const result = array.slice();
|
|
197
194
|
result.splice(index, 1);
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
import React__default from 'react';
|
|
9
9
|
import { WarningFilled, WarningAltFilled } from '@carbon/icons-react';
|
|
10
10
|
import { usePrefix } from './usePrefix.js';
|
|
11
|
+
import '../components/Text/index.js';
|
|
12
|
+
import { Text } from '../components/Text/Text.js';
|
|
11
13
|
|
|
12
14
|
/**
|
|
13
15
|
* @typedef {object} InputProps
|
|
@@ -68,13 +70,15 @@ function useNormalizedInputProps(_ref) {
|
|
|
68
70
|
};
|
|
69
71
|
if (normalizedProps.invalid) {
|
|
70
72
|
normalizedProps.icon = WarningFilled;
|
|
71
|
-
normalizedProps.validation = /*#__PURE__*/React__default.createElement(
|
|
73
|
+
normalizedProps.validation = /*#__PURE__*/React__default.createElement(Text, {
|
|
74
|
+
as: "div",
|
|
72
75
|
className: `${prefix}--form-requirement`,
|
|
73
76
|
id: normalizedProps.invalidId
|
|
74
77
|
}, invalidText);
|
|
75
78
|
} else if (normalizedProps.warn) {
|
|
76
79
|
normalizedProps.icon = WarningAltFilled;
|
|
77
|
-
normalizedProps.validation = /*#__PURE__*/React__default.createElement(
|
|
80
|
+
normalizedProps.validation = /*#__PURE__*/React__default.createElement(Text, {
|
|
81
|
+
as: "div",
|
|
78
82
|
className: `${prefix}--form-requirement`,
|
|
79
83
|
id: normalizedProps.warnId
|
|
80
84
|
}, warnText);
|
package/es/internal/wrapFocus.js
CHANGED
|
@@ -24,11 +24,11 @@ function elementOrParentIsFloatingMenu(node) {
|
|
|
24
24
|
/**
|
|
25
25
|
* Ensures the focus is kept in the given `modalNode`, implementing "focus-wrap" behavior.
|
|
26
26
|
* @param {object} options The options.
|
|
27
|
-
* @param {
|
|
28
|
-
* @param {
|
|
29
|
-
* @param {
|
|
30
|
-
* @param {
|
|
31
|
-
* @param {
|
|
27
|
+
* @param {Node|null} options.bodyNode
|
|
28
|
+
* @param {Node|null} options.startTrapNode The DOM node of the focus sentinel the is placed earlier next to `modalNode`.
|
|
29
|
+
* @param {Node|null} options.endTrapNode The DOM node of the focus sentinel the is placed next to `modalNode`.
|
|
30
|
+
* @param {Node} options.currentActiveNode The DOM node that has focus.
|
|
31
|
+
* @param {Node} options.oldActiveNode The DOM node that previously had focus.
|
|
32
32
|
* @param {string[]} [options.selectorsFloatingMenus] The CSS selectors that matches floating menus.
|
|
33
33
|
*/
|
|
34
34
|
function wrapFocus(_ref) {
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
/**
|
|
9
9
|
* @param {string} name The name of the prop that must exist to validate
|
|
10
10
|
* the current prop.
|
|
11
|
-
* @param {
|
|
12
|
-
* @returns {
|
|
11
|
+
* @param {React.Validator} propType The original prop type checker.
|
|
12
|
+
* @returns {React.Validator} The new prop type checker for the current prop that
|
|
13
13
|
* becomes required if the prop corresponding to the provided prop name exists.
|
|
14
14
|
*/
|
|
15
15
|
function requiredIfGivenPropIsTruthy(name, propType) {
|
|
@@ -85,11 +85,6 @@ AccordionSkeleton.propTypes = {
|
|
|
85
85
|
*/
|
|
86
86
|
open: PropTypes__default["default"].bool
|
|
87
87
|
};
|
|
88
|
-
AccordionSkeleton.defaultProps = {
|
|
89
|
-
open: true,
|
|
90
|
-
count: 4,
|
|
91
|
-
align: 'end'
|
|
92
|
-
};
|
|
93
88
|
function AccordionSkeletonItem() {
|
|
94
89
|
const prefix = usePrefix.usePrefix();
|
|
95
90
|
return /*#__PURE__*/React__default["default"].createElement("li", {
|
|
@@ -16,6 +16,8 @@ var cx = require('classnames');
|
|
|
16
16
|
var Link = require('../Link/Link.js');
|
|
17
17
|
var iconsReact = require('@carbon/icons-react');
|
|
18
18
|
var usePrefix = require('../../internal/usePrefix.js');
|
|
19
|
+
require('../Text/index.js');
|
|
20
|
+
var Text = require('../Text/Text.js');
|
|
19
21
|
|
|
20
22
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
21
23
|
|
|
@@ -62,7 +64,7 @@ const BreadcrumbItem = /*#__PURE__*/React__default["default"].forwardRef(functio
|
|
|
62
64
|
}, rest), href ? /*#__PURE__*/React__default["default"].createElement(Link["default"], {
|
|
63
65
|
href: href,
|
|
64
66
|
"aria-current": ariaCurrent
|
|
65
|
-
}, children) : /*#__PURE__*/React__default["default"].createElement(
|
|
67
|
+
}, children) : /*#__PURE__*/React__default["default"].createElement(Text.Text, {
|
|
66
68
|
className: `${prefix}--link`
|
|
67
69
|
}, children));
|
|
68
70
|
}
|
|
@@ -17,6 +17,7 @@ require('../Text/index.js');
|
|
|
17
17
|
var usePrefix = require('../../internal/usePrefix.js');
|
|
18
18
|
var iconsReact = require('@carbon/icons-react');
|
|
19
19
|
var setupGetInstanceId = require('../../tools/setupGetInstanceId.js');
|
|
20
|
+
var noopFn = require('../../internal/noopFn.js');
|
|
20
21
|
var Text = require('../Text/Text.js');
|
|
21
22
|
|
|
22
23
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
@@ -32,9 +33,9 @@ const Checkbox = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
32
33
|
helperText,
|
|
33
34
|
id,
|
|
34
35
|
labelText,
|
|
35
|
-
onChange,
|
|
36
|
+
onChange = noopFn.noopFn,
|
|
36
37
|
onClick,
|
|
37
|
-
indeterminate,
|
|
38
|
+
indeterminate = false,
|
|
38
39
|
invalid,
|
|
39
40
|
invalidText,
|
|
40
41
|
hideLabel,
|
|
@@ -187,10 +188,6 @@ Checkbox.propTypes = {
|
|
|
187
188
|
*/
|
|
188
189
|
warnText: PropTypes__default["default"].node
|
|
189
190
|
};
|
|
190
|
-
Checkbox.defaultProps = {
|
|
191
|
-
onChange: () => {},
|
|
192
|
-
indeterminate: false
|
|
193
|
-
};
|
|
194
191
|
Checkbox.displayName = 'Checkbox';
|
|
195
192
|
|
|
196
193
|
exports["default"] = Checkbox;
|
|
@@ -41,21 +41,21 @@ function CodeSnippet(_ref) {
|
|
|
41
41
|
let {
|
|
42
42
|
align = 'bottom',
|
|
43
43
|
className,
|
|
44
|
-
type,
|
|
44
|
+
type = 'single',
|
|
45
45
|
children,
|
|
46
46
|
disabled,
|
|
47
47
|
feedback,
|
|
48
48
|
feedbackTimeout,
|
|
49
49
|
onClick,
|
|
50
|
-
['aria-label']: ariaLabel,
|
|
50
|
+
['aria-label']: ariaLabel = 'Copy to clipboard',
|
|
51
51
|
ariaLabel: deprecatedAriaLabel,
|
|
52
52
|
copyText,
|
|
53
53
|
copyButtonDescription,
|
|
54
54
|
light,
|
|
55
|
-
showMoreText,
|
|
56
|
-
showLessText,
|
|
55
|
+
showMoreText = 'Show more',
|
|
56
|
+
showLessText = 'Show less',
|
|
57
57
|
hideCopyButton,
|
|
58
|
-
wrapText,
|
|
58
|
+
wrapText = false,
|
|
59
59
|
maxCollapsedNumberOfRows = defaultMaxCollapsedNumberOfRows,
|
|
60
60
|
maxExpandedNumberOfRows = defaultMaxExpandedNumberOfRows,
|
|
61
61
|
minCollapsedNumberOfRows = defaultMinCollapsedNumberOfRows,
|
|
@@ -330,12 +330,5 @@ CodeSnippet.propTypes = {
|
|
|
330
330
|
*/
|
|
331
331
|
wrapText: PropTypes__default["default"].bool
|
|
332
332
|
};
|
|
333
|
-
CodeSnippet.defaultProps = {
|
|
334
|
-
['aria-label']: 'Copy to clipboard',
|
|
335
|
-
type: 'single',
|
|
336
|
-
showMoreText: 'Show more',
|
|
337
|
-
showLessText: 'Show less',
|
|
338
|
-
wrapText: false
|
|
339
|
-
};
|
|
340
333
|
|
|
341
334
|
exports["default"] = CodeSnippet;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import Downshift from 'downshift';
|
|
8
8
|
import { type ComponentProps, type ReactNode, type ComponentType, type ReactElement, type RefAttributes, type PropsWithChildren, type PropsWithoutRef, type InputHTMLAttributes, type MouseEvent } from 'react';
|
|
9
|
-
import {
|
|
9
|
+
import { ListBoxSize } from '../ListBox';
|
|
10
10
|
type ExcludedAttributes = 'id' | 'onChange' | 'onClick' | 'type' | 'size';
|
|
11
11
|
interface OnChangeData<ItemType> {
|
|
12
12
|
selectedItem: ItemType | null;
|
|
@@ -139,10 +139,6 @@ export interface ComboBoxProps<ItemType> extends Omit<InputHTMLAttributes<HTMLIn
|
|
|
139
139
|
* and returns the localized string for the message
|
|
140
140
|
*/
|
|
141
141
|
translateWithId?: (id: string) => string;
|
|
142
|
-
/**
|
|
143
|
-
* Currently supports either the default type, or an inline variant
|
|
144
|
-
*/
|
|
145
|
-
type?: ListBoxType;
|
|
146
142
|
/**
|
|
147
143
|
* Specify whether the control is currently in warning state
|
|
148
144
|
*/
|
|
@@ -97,8 +97,8 @@ const ComboBox = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
97
97
|
['aria-label']: ariaLabel = 'Choose an item',
|
|
98
98
|
ariaLabel: deprecatedAriaLabel,
|
|
99
99
|
className: containerClassName,
|
|
100
|
-
direction,
|
|
101
|
-
disabled,
|
|
100
|
+
direction = 'bottom',
|
|
101
|
+
disabled = false,
|
|
102
102
|
downshiftProps,
|
|
103
103
|
helperText,
|
|
104
104
|
id,
|
|
@@ -106,7 +106,7 @@ const ComboBox = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
106
106
|
invalid,
|
|
107
107
|
invalidText,
|
|
108
108
|
items,
|
|
109
|
-
itemToElement,
|
|
109
|
+
itemToElement = null,
|
|
110
110
|
itemToString = defaultItemToString,
|
|
111
111
|
light,
|
|
112
112
|
onChange,
|
|
@@ -119,7 +119,6 @@ const ComboBox = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
119
119
|
size,
|
|
120
120
|
titleText,
|
|
121
121
|
translateWithId,
|
|
122
|
-
type: _type,
|
|
123
122
|
warn,
|
|
124
123
|
warnText,
|
|
125
124
|
...rest
|
|
@@ -324,10 +323,10 @@ const ComboBox = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
324
323
|
event?.persist?.();
|
|
325
324
|
}
|
|
326
325
|
}
|
|
327
|
-
if (match.match(event, keys.Home)) {
|
|
326
|
+
if (match.match(event, keys.Home) && event.code !== 'Numpad7') {
|
|
328
327
|
event.target.setSelectionRange(0, 0);
|
|
329
328
|
}
|
|
330
|
-
if (match.match(event, keys.End)) {
|
|
329
|
+
if (match.match(event, keys.End) && event.code !== 'Numpad1') {
|
|
331
330
|
event.target.setSelectionRange(event.target.value.length, event.target.value.length);
|
|
332
331
|
}
|
|
333
332
|
}
|
|
@@ -546,10 +545,6 @@ ComboBox.propTypes = {
|
|
|
546
545
|
* and returns the localized string for the message
|
|
547
546
|
*/
|
|
548
547
|
translateWithId: PropTypes__default["default"].func,
|
|
549
|
-
/**
|
|
550
|
-
* Currently supports either the default type, or an inline variant
|
|
551
|
-
*/
|
|
552
|
-
type: ListBoxPropTypes.ListBoxType,
|
|
553
548
|
/**
|
|
554
549
|
* Specify whether the control is currently in warning state
|
|
555
550
|
*/
|
|
@@ -559,14 +554,5 @@ ComboBox.propTypes = {
|
|
|
559
554
|
*/
|
|
560
555
|
warnText: PropTypes__default["default"].node
|
|
561
556
|
};
|
|
562
|
-
ComboBox.defaultProps = {
|
|
563
|
-
disabled: false,
|
|
564
|
-
itemToString: defaultItemToString,
|
|
565
|
-
itemToElement: null,
|
|
566
|
-
shouldFilterItem: defaultShouldFilterItem,
|
|
567
|
-
type: 'default',
|
|
568
|
-
['aria-label']: 'Choose an item',
|
|
569
|
-
direction: 'bottom'
|
|
570
|
-
};
|
|
571
557
|
|
|
572
558
|
exports["default"] = ComboBox;
|
|
@@ -55,7 +55,6 @@ ModalBody.propTypes = {
|
|
|
55
55
|
/**
|
|
56
56
|
* Required props for the accessibility label of the header
|
|
57
57
|
*/
|
|
58
|
-
// @ts-expect-error: Built-in prop-types > TS logic doesn't jive well with custom validators
|
|
59
58
|
['aria-label']: requiredIfGivenPropIsTruthy["default"]('hasScrollingContent', PropTypes__default["default"].string),
|
|
60
59
|
/**
|
|
61
60
|
* Specify the content to be placed in the ModalBody
|
|
@@ -88,7 +87,7 @@ const ComposedModal = /*#__PURE__*/React__default["default"].forwardRef(function
|
|
|
88
87
|
onKeyDown,
|
|
89
88
|
open,
|
|
90
89
|
preventCloseOnClickOutside,
|
|
91
|
-
selectorPrimaryFocus,
|
|
90
|
+
selectorPrimaryFocus = '[data-modal-primary-focus]',
|
|
92
91
|
selectorsFloatingMenus,
|
|
93
92
|
size,
|
|
94
93
|
launcherButtonRef,
|
|
@@ -306,9 +305,6 @@ ComposedModal.propTypes = {
|
|
|
306
305
|
*/
|
|
307
306
|
size: PropTypes__default["default"].oneOf(['xs', 'sm', 'md', 'lg'])
|
|
308
307
|
};
|
|
309
|
-
ComposedModal.defaultProps = {
|
|
310
|
-
selectorPrimaryFocus: '[data-modal-primary-focus]'
|
|
311
|
-
};
|
|
312
308
|
|
|
313
309
|
exports.ModalBody = ModalBody;
|
|
314
310
|
exports["default"] = ComposedModal;
|
|
@@ -17,6 +17,7 @@ require('../Button/Button.Skeleton.js');
|
|
|
17
17
|
var ButtonSet = require('../ButtonSet/ButtonSet.js');
|
|
18
18
|
var cx = require('classnames');
|
|
19
19
|
var usePrefix = require('../../internal/usePrefix.js');
|
|
20
|
+
var noopFn = require('../../internal/noopFn.js');
|
|
20
21
|
|
|
21
22
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
22
23
|
|
|
@@ -84,11 +85,11 @@ const ModalFooter = /*#__PURE__*/React__default["default"].forwardRef(function M
|
|
|
84
85
|
let {
|
|
85
86
|
children,
|
|
86
87
|
className: customClassName,
|
|
87
|
-
closeModal,
|
|
88
|
+
closeModal = noopFn.noopFn,
|
|
88
89
|
danger,
|
|
89
90
|
inputref,
|
|
90
|
-
onRequestClose,
|
|
91
|
-
onRequestSubmit,
|
|
91
|
+
onRequestClose = noopFn.noopFn,
|
|
92
|
+
onRequestSubmit = noopFn.noopFn,
|
|
92
93
|
primaryButtonDisabled,
|
|
93
94
|
primaryButtonText,
|
|
94
95
|
primaryClassName,
|
|
@@ -200,11 +201,5 @@ ModalFooter.propTypes = {
|
|
|
200
201
|
*/
|
|
201
202
|
secondaryClassName: PropTypes__default["default"].string
|
|
202
203
|
};
|
|
203
|
-
const noop = () => {};
|
|
204
|
-
ModalFooter.defaultProps = {
|
|
205
|
-
onRequestClose: noop,
|
|
206
|
-
onRequestSubmit: noop,
|
|
207
|
-
closeModal: noop
|
|
208
|
-
};
|
|
209
204
|
|
|
210
205
|
exports.ModalFooter = ModalFooter;
|
|
@@ -30,7 +30,7 @@ const ModalHeader = /*#__PURE__*/React__default["default"].forwardRef(function M
|
|
|
30
30
|
closeClassName,
|
|
31
31
|
closeIconClassName,
|
|
32
32
|
closeModal,
|
|
33
|
-
iconDescription,
|
|
33
|
+
iconDescription = 'Close',
|
|
34
34
|
label,
|
|
35
35
|
labelClassName,
|
|
36
36
|
title,
|
|
@@ -114,8 +114,5 @@ ModalHeader.propTypes = {
|
|
|
114
114
|
*/
|
|
115
115
|
titleClassName: PropTypes__default["default"].string
|
|
116
116
|
};
|
|
117
|
-
ModalHeader.defaultProps = {
|
|
118
|
-
iconDescription: 'Close'
|
|
119
|
-
};
|
|
120
117
|
|
|
121
118
|
exports.ModalHeader = ModalHeader;
|
|
@@ -91,16 +91,11 @@ export default class ContentSwitcher extends React.Component<ContentSwitcherProp
|
|
|
91
91
|
size: PropTypes.Requireable<string>;
|
|
92
92
|
};
|
|
93
93
|
static contextType: React.Context<string>;
|
|
94
|
-
static defaultProps: {
|
|
95
|
-
selectedIndex: number;
|
|
96
|
-
selectionMode: string;
|
|
97
|
-
onChange: () => void;
|
|
98
|
-
};
|
|
99
94
|
static getDerivedStateFromProps({ selectedIndex }: {
|
|
100
|
-
selectedIndex
|
|
95
|
+
selectedIndex?: number | undefined;
|
|
101
96
|
}, state: any): {
|
|
102
|
-
selectedIndex:
|
|
103
|
-
prevSelectedIndex:
|
|
97
|
+
selectedIndex: number;
|
|
98
|
+
prevSelectedIndex: number;
|
|
104
99
|
} | null;
|
|
105
100
|
handleItemRef: (index: any) => (ref: any) => void;
|
|
106
101
|
handleChildChange: (data: any) => void;
|