@carbon/react 1.78.0-rc.0 → 1.78.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.playwright/INTERNAL_AVT_REPORT_DO_NOT_USE.json +851 -816
- package/es/components/Accordion/AccordionItem.js +2 -2
- package/es/components/Button/Button.d.ts +2 -3
- package/es/components/Button/Button.js +1 -2
- package/es/components/Button/ButtonBase.js +1 -1
- package/es/components/ChatButton/ChatButton.d.ts +2 -3
- package/es/components/ChatButton/ChatButton.js +1 -2
- package/es/components/ComboBox/ComboBox.js +40 -30
- package/es/components/ComboButton/index.js +0 -1
- package/es/components/ComposedModal/ComposedModal.js +65 -51
- package/es/components/ContainedList/ContainedListItem/ContainedListItem.d.ts +2 -2
- package/es/components/ContainedList/ContainedListItem/ContainedListItem.js +1 -1
- package/es/components/ContentSwitcher/ContentSwitcher.js +3 -3
- package/es/components/ContextMenu/useContextMenu.d.ts +0 -1
- package/es/components/ContextMenu/useContextMenu.js +1 -2
- package/es/components/DataTable/TableBatchAction.d.ts +3 -3
- package/es/components/DataTable/TableBatchAction.js +1 -1
- package/es/components/DataTable/TableContainer.d.ts +1 -1
- package/es/components/DataTable/TableContainer.js +3 -3
- package/es/components/DataTable/TableExpandHeader.d.ts +6 -5
- package/es/components/DataTable/TableToolbarMenu.d.ts +2 -2
- package/es/components/DataTable/TableToolbarMenu.js +1 -1
- package/es/components/DatePicker/DatePicker.js +2 -2
- package/es/components/DatePicker/plugins/fixEventsPlugin.js +1 -1
- package/es/components/Dialog/index.d.ts +42 -4
- package/es/components/Dialog/index.js +177 -0
- package/es/components/ExpandableSearch/ExpandableSearch.js +2 -2
- package/es/components/FeatureFlags/index.d.ts +3 -1
- package/es/components/FeatureFlags/index.js +3 -0
- package/es/components/FileUploader/FileUploader.d.ts +1 -1
- package/es/components/FileUploader/FileUploader.js +2 -2
- package/es/components/FileUploader/FileUploaderButton.js +2 -2
- package/es/components/FileUploader/FileUploaderDropContainer.d.ts +1 -1
- package/es/components/FileUploader/FileUploaderDropContainer.js +6 -4
- package/es/components/FileUploader/FileUploaderItem.d.ts +1 -1
- package/es/components/FileUploader/FileUploaderItem.js +2 -2
- package/es/components/Grid/CSSGrid.js +18 -14
- package/es/components/Grid/FlexGrid.js +7 -6
- package/es/components/Grid/GridTypes.d.ts +5 -3
- package/es/components/IconButton/index.js +3 -3
- package/es/components/Layer/index.d.ts +4 -6
- package/es/components/Layer/index.js +5 -6
- package/es/components/Link/Link.d.ts +2 -3
- package/es/components/Link/Link.js +1 -2
- package/es/components/ListBox/ListBoxMenuItem.d.ts +3 -3
- package/es/components/ListBox/ListBoxMenuItem.js +37 -15
- package/es/components/Menu/Menu.d.ts +1 -0
- package/es/components/Menu/Menu.js +7 -9
- package/es/components/Menu/MenuContext.d.ts +4 -4
- package/es/components/Menu/MenuContext.js +6 -1
- package/es/components/Menu/MenuItem.d.ts +2 -2
- package/es/components/Menu/MenuItem.js +16 -24
- package/es/components/MenuButton/index.js +14 -2
- package/es/components/Modal/Modal.js +121 -49
- package/es/components/ModalWrapper/ModalWrapper.js +1 -1
- package/es/components/MultiSelect/FilterableMultiSelect.js +3 -3
- package/es/components/MultiSelect/MultiSelect.js +2 -2
- package/es/components/Notification/Notification.d.ts +5 -13
- package/es/components/Notification/Notification.js +7 -9
- package/es/components/OverflowMenu/OverflowMenu.d.ts +4 -8
- package/es/components/OverflowMenu/OverflowMenu.js +3 -3
- package/es/components/OverflowMenu/next/index.d.ts +2 -2
- package/es/components/OverflowMenu/next/index.js +1 -1
- package/es/components/OverflowMenuItem/OverflowMenuItem.js +2 -2
- package/es/components/ProgressIndicator/ProgressIndicator.js +2 -2
- package/es/components/RadioTile/RadioTile.js +2 -2
- package/es/components/Search/Search.d.ts +2 -3
- package/es/components/Search/Search.js +4 -6
- package/es/components/Slider/Slider.d.ts +16 -15
- package/es/components/Slider/Slider.js +22 -22
- package/es/components/Tabs/Tabs.d.ts +3 -6
- package/es/components/Tabs/Tabs.js +8 -9
- package/es/components/Tag/DismissibleTag.d.ts +3 -5
- package/es/components/Tag/DismissibleTag.js +1 -2
- package/es/components/Tag/OperationalTag.d.ts +2 -3
- package/es/components/Tag/OperationalTag.js +1 -2
- package/es/components/Tag/SelectableTag.d.ts +3 -5
- package/es/components/Tag/SelectableTag.js +1 -2
- package/es/components/Tag/Tag.d.ts +2 -3
- package/es/components/Tag/Tag.js +1 -2
- package/es/components/Tile/Tile.d.ts +3 -5
- package/es/components/Tile/Tile.js +8 -6
- package/es/components/Toggletip/index.js +2 -2
- package/es/components/Tooltip/DefinitionTooltip.js +2 -2
- package/es/components/Tooltip/Tooltip.d.ts +1 -1
- package/es/components/Tooltip/Tooltip.js +2 -2
- package/es/components/TreeView/TreeNode.d.ts +3 -5
- package/es/components/TreeView/TreeNode.js +3 -4
- package/es/components/TreeView/TreeView.js +2 -2
- package/es/components/UIShell/HeaderContainer.js +2 -2
- package/es/components/UIShell/HeaderMenu.js +2 -2
- package/es/components/UIShell/HeaderPanel.js +2 -2
- package/es/components/UIShell/SideNav.d.ts +1 -1
- package/es/components/UIShell/SideNav.js +2 -2
- package/es/components/UIShell/SideNavHeader.d.ts +2 -3
- package/es/components/UIShell/SideNavHeader.js +1 -2
- package/es/components/UIShell/SideNavLink.d.ts +2 -2
- package/es/components/UIShell/SideNavLink.js +1 -1
- package/es/components/UIShell/SideNavMenu.d.ts +2 -2
- package/es/components/UIShell/SideNavMenu.js +3 -3
- package/es/components/UIShell/SwitcherItem.js +2 -2
- package/es/internal/FloatingMenu.js +4 -4
- package/es/internal/OptimizedResize.d.ts +18 -0
- package/es/internal/OptimizedResize.js +21 -24
- package/es/internal/keyboard/index.d.ts +9 -0
- package/es/internal/keyboard/keys.d.ts +23 -0
- package/es/internal/keyboard/keys.js +2 -2
- package/es/internal/keyboard/match.d.ts +26 -0
- package/es/internal/keyboard/match.js +17 -41
- package/es/internal/keyboard/navigation.d.ts +37 -0
- package/es/internal/keyboard/navigation.js +15 -27
- package/es/internal/useMergedRefs.js +3 -0
- package/lib/components/Accordion/AccordionItem.js +2 -2
- package/lib/components/Button/Button.d.ts +2 -3
- package/lib/components/Button/Button.js +1 -2
- package/lib/components/Button/ButtonBase.js +1 -1
- package/lib/components/ChatButton/ChatButton.d.ts +2 -3
- package/lib/components/ChatButton/ChatButton.js +1 -2
- package/lib/components/ComboBox/ComboBox.js +40 -30
- package/lib/components/ComboButton/index.js +0 -1
- package/lib/components/ComposedModal/ComposedModal.js +64 -50
- package/lib/components/ContainedList/ContainedListItem/ContainedListItem.d.ts +2 -2
- package/lib/components/ContainedList/ContainedListItem/ContainedListItem.js +1 -1
- package/lib/components/ContentSwitcher/ContentSwitcher.js +3 -3
- package/lib/components/ContextMenu/useContextMenu.d.ts +0 -1
- package/lib/components/ContextMenu/useContextMenu.js +1 -2
- package/lib/components/DataTable/TableBatchAction.d.ts +3 -3
- package/lib/components/DataTable/TableBatchAction.js +1 -1
- package/lib/components/DataTable/TableContainer.d.ts +1 -1
- package/lib/components/DataTable/TableContainer.js +3 -3
- package/lib/components/DataTable/TableExpandHeader.d.ts +6 -5
- package/lib/components/DataTable/TableToolbarMenu.d.ts +2 -2
- package/lib/components/DataTable/TableToolbarMenu.js +1 -1
- package/lib/components/DatePicker/DatePicker.js +2 -2
- package/lib/components/DatePicker/plugins/fixEventsPlugin.js +1 -1
- package/lib/components/Dialog/index.d.ts +42 -4
- package/lib/components/Dialog/index.js +190 -0
- package/lib/components/ExpandableSearch/ExpandableSearch.js +2 -2
- package/lib/components/FeatureFlags/index.d.ts +3 -1
- package/lib/components/FeatureFlags/index.js +3 -0
- package/lib/components/FileUploader/FileUploader.d.ts +1 -1
- package/lib/components/FileUploader/FileUploader.js +2 -2
- package/lib/components/FileUploader/FileUploaderButton.js +2 -2
- package/lib/components/FileUploader/FileUploaderDropContainer.d.ts +1 -1
- package/lib/components/FileUploader/FileUploaderDropContainer.js +6 -4
- package/lib/components/FileUploader/FileUploaderItem.d.ts +1 -1
- package/lib/components/FileUploader/FileUploaderItem.js +2 -2
- package/lib/components/Grid/CSSGrid.js +18 -14
- package/lib/components/Grid/FlexGrid.js +7 -6
- package/lib/components/Grid/GridTypes.d.ts +5 -3
- package/lib/components/IconButton/index.js +3 -3
- package/lib/components/Layer/index.d.ts +4 -6
- package/lib/components/Layer/index.js +5 -6
- package/lib/components/Link/Link.d.ts +2 -3
- package/lib/components/Link/Link.js +1 -2
- package/lib/components/ListBox/ListBoxMenuItem.d.ts +3 -3
- package/lib/components/ListBox/ListBoxMenuItem.js +36 -14
- package/lib/components/Menu/Menu.d.ts +1 -0
- package/lib/components/Menu/Menu.js +7 -9
- package/lib/components/Menu/MenuContext.d.ts +4 -4
- package/lib/components/Menu/MenuContext.js +6 -1
- package/lib/components/Menu/MenuItem.d.ts +2 -2
- package/lib/components/Menu/MenuItem.js +15 -23
- package/lib/components/MenuButton/index.js +14 -2
- package/lib/components/Modal/Modal.js +123 -51
- package/lib/components/ModalWrapper/ModalWrapper.js +1 -1
- package/lib/components/MultiSelect/FilterableMultiSelect.js +3 -3
- package/lib/components/MultiSelect/MultiSelect.js +2 -2
- package/lib/components/Notification/Notification.d.ts +5 -13
- package/lib/components/Notification/Notification.js +7 -9
- package/lib/components/OverflowMenu/OverflowMenu.d.ts +4 -8
- package/lib/components/OverflowMenu/OverflowMenu.js +3 -3
- package/lib/components/OverflowMenu/next/index.d.ts +2 -2
- package/lib/components/OverflowMenu/next/index.js +1 -1
- package/lib/components/OverflowMenuItem/OverflowMenuItem.js +2 -2
- package/lib/components/ProgressIndicator/ProgressIndicator.js +2 -2
- package/lib/components/RadioTile/RadioTile.js +2 -2
- package/lib/components/Search/Search.d.ts +2 -3
- package/lib/components/Search/Search.js +4 -6
- package/lib/components/Slider/Slider.d.ts +16 -15
- package/lib/components/Slider/Slider.js +22 -22
- package/lib/components/Tabs/Tabs.d.ts +3 -6
- package/lib/components/Tabs/Tabs.js +8 -9
- package/lib/components/Tag/DismissibleTag.d.ts +3 -5
- package/lib/components/Tag/DismissibleTag.js +1 -2
- package/lib/components/Tag/OperationalTag.d.ts +2 -3
- package/lib/components/Tag/OperationalTag.js +1 -2
- package/lib/components/Tag/SelectableTag.d.ts +3 -5
- package/lib/components/Tag/SelectableTag.js +1 -2
- package/lib/components/Tag/Tag.d.ts +2 -3
- package/lib/components/Tag/Tag.js +1 -2
- package/lib/components/Tile/Tile.d.ts +3 -5
- package/lib/components/Tile/Tile.js +8 -6
- package/lib/components/Toggletip/index.js +2 -2
- package/lib/components/Tooltip/DefinitionTooltip.js +2 -2
- package/lib/components/Tooltip/Tooltip.d.ts +1 -1
- package/lib/components/Tooltip/Tooltip.js +2 -2
- package/lib/components/TreeView/TreeNode.d.ts +3 -5
- package/lib/components/TreeView/TreeNode.js +3 -4
- package/lib/components/TreeView/TreeView.js +2 -2
- package/lib/components/UIShell/HeaderContainer.js +2 -2
- package/lib/components/UIShell/HeaderMenu.js +2 -2
- package/lib/components/UIShell/HeaderPanel.js +2 -2
- package/lib/components/UIShell/SideNav.d.ts +1 -1
- package/lib/components/UIShell/SideNav.js +2 -2
- package/lib/components/UIShell/SideNavHeader.d.ts +2 -3
- package/lib/components/UIShell/SideNavHeader.js +1 -2
- package/lib/components/UIShell/SideNavLink.d.ts +2 -2
- package/lib/components/UIShell/SideNavLink.js +1 -1
- package/lib/components/UIShell/SideNavMenu.d.ts +2 -2
- package/lib/components/UIShell/SideNavMenu.js +3 -3
- package/lib/components/UIShell/SwitcherItem.js +2 -2
- package/lib/internal/FloatingMenu.js +5 -5
- package/lib/internal/OptimizedResize.d.ts +18 -0
- package/lib/internal/OptimizedResize.js +21 -24
- package/lib/internal/keyboard/index.d.ts +9 -0
- package/lib/internal/keyboard/keys.d.ts +23 -0
- package/lib/internal/keyboard/keys.js +2 -2
- package/lib/internal/keyboard/match.d.ts +26 -0
- package/lib/internal/keyboard/match.js +17 -41
- package/lib/internal/keyboard/navigation.d.ts +37 -0
- package/lib/internal/keyboard/navigation.js +15 -27
- package/lib/internal/useMergedRefs.js +3 -0
- package/package.json +7 -7
- package/scss/components/dialog/_dialog.scss +9 -0
- package/scss/components/dialog/_index.scss +9 -0
- package/telemetry.yml +1 -0
- package/es/components/Modal/next/index.d.ts +0 -171
- package/es/internal/focus/index.js +0 -15
- package/lib/components/Modal/next/index.d.ts +0 -171
- package/lib/internal/focus/index.js +0 -19
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright IBM Corp. 2016,
|
|
2
|
+
* Copyright IBM Corp. 2016, 2025
|
|
3
3
|
*
|
|
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.
|
|
@@ -355,11 +355,13 @@ declare class Slider extends PureComponent<SliderProps> {
|
|
|
355
355
|
*/
|
|
356
356
|
clamp(val: any, min: any, max: any): number;
|
|
357
357
|
/**
|
|
358
|
-
*
|
|
359
|
-
*
|
|
360
|
-
*
|
|
358
|
+
* Rounds a given value to the nearest step defined by the slider's `step`
|
|
359
|
+
* prop.
|
|
360
|
+
*
|
|
361
|
+
* @param value - The value to adjust to the nearest step. Defaults to `0`.
|
|
362
|
+
* @returns The value rounded to the precision determined by the step.
|
|
361
363
|
*/
|
|
362
|
-
nearestStepValue(value
|
|
364
|
+
nearestStepValue(value?: number): number;
|
|
363
365
|
/**
|
|
364
366
|
* Sets up "drag" event handlers and calls `this.onDrag` in case dragging
|
|
365
367
|
* started on somewhere other than the thumb without a corresponding "move"
|
|
@@ -442,17 +444,16 @@ declare class Slider extends PureComponent<SliderProps> {
|
|
|
442
444
|
};
|
|
443
445
|
calcDistanceToHandle: (handle: HandlePosition, clientX: any) => number;
|
|
444
446
|
/**
|
|
445
|
-
*
|
|
447
|
+
* Calculates a new slider value based on the current value, a change delta,
|
|
448
|
+
* and a step.
|
|
446
449
|
*
|
|
447
|
-
* @param
|
|
448
|
-
*
|
|
449
|
-
* @param
|
|
450
|
-
*
|
|
451
|
-
*
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
*/
|
|
455
|
-
calcValueForDelta: (currentValue: any, delta: any, step?: number) => any;
|
|
450
|
+
* @param currentValue - The starting value from which the slider is moving.
|
|
451
|
+
* @param delta - The amount to adjust the current value by.
|
|
452
|
+
* @param step - The step. Defaults to `1`.
|
|
453
|
+
* @returns The new slider value, rounded to the same number of decimal places
|
|
454
|
+
* as the step.
|
|
455
|
+
*/
|
|
456
|
+
calcValueForDelta: (currentValue: number, delta: number, step?: number) => number;
|
|
456
457
|
/**
|
|
457
458
|
* Sets state relevant to the given handle position.
|
|
458
459
|
*
|
|
@@ -14,6 +14,7 @@ var React = require('react');
|
|
|
14
14
|
var PropTypes = require('prop-types');
|
|
15
15
|
var cx = require('classnames');
|
|
16
16
|
var keys = require('../../internal/keyboard/keys.js');
|
|
17
|
+
var match = require('../../internal/keyboard/match.js');
|
|
17
18
|
var usePrefix = require('../../internal/usePrefix.js');
|
|
18
19
|
var deprecate = require('../../prop-types/deprecate.js');
|
|
19
20
|
var index = require('../FeatureFlags/index.js');
|
|
@@ -23,7 +24,6 @@ require('../Tooltip/DefinitionTooltip.js');
|
|
|
23
24
|
var Tooltip = require('../Tooltip/Tooltip.js');
|
|
24
25
|
var SliderHandles = require('./SliderHandles.js');
|
|
25
26
|
var throttle = require('../../node_modules/es-toolkit/dist/compat/function/throttle.mjs.js');
|
|
26
|
-
var match = require('../../internal/keyboard/match.js');
|
|
27
27
|
var Text = require('../Text/Text.js');
|
|
28
28
|
|
|
29
29
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
@@ -326,7 +326,7 @@ class Slider extends React.PureComponent {
|
|
|
326
326
|
value,
|
|
327
327
|
left
|
|
328
328
|
} = this.calcValue({
|
|
329
|
-
value: this.calcValueForDelta(currentValue, delta, this.props.step)
|
|
329
|
+
value: this.calcValueForDelta(currentValue ?? this.props.min, delta, this.props.step)
|
|
330
330
|
});
|
|
331
331
|
this.setValueLeftForHandle(this.state.activeHandle, {
|
|
332
332
|
value: this.nearestStepValue(value),
|
|
@@ -603,19 +603,21 @@ class Slider extends React.PureComponent {
|
|
|
603
603
|
return Math.abs(handleX - clientX);
|
|
604
604
|
});
|
|
605
605
|
/**
|
|
606
|
-
*
|
|
606
|
+
* Calculates a new slider value based on the current value, a change delta,
|
|
607
|
+
* and a step.
|
|
607
608
|
*
|
|
608
|
-
* @param
|
|
609
|
-
*
|
|
610
|
-
* @param
|
|
611
|
-
*
|
|
612
|
-
*
|
|
613
|
-
* A value determining how much the value should increase/decrease by moving
|
|
614
|
-
* the thumb by mouse.
|
|
609
|
+
* @param currentValue - The starting value from which the slider is moving.
|
|
610
|
+
* @param delta - The amount to adjust the current value by.
|
|
611
|
+
* @param step - The step. Defaults to `1`.
|
|
612
|
+
* @returns The new slider value, rounded to the same number of decimal places
|
|
613
|
+
* as the step.
|
|
615
614
|
*/
|
|
616
615
|
_rollupPluginBabelHelpers.defineProperty(this, "calcValueForDelta", function (currentValue, delta) {
|
|
617
616
|
let step = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
|
|
618
|
-
|
|
617
|
+
const base = delta > 0 ? Math.floor(currentValue / step) * step : currentValue;
|
|
618
|
+
const newValue = base + delta;
|
|
619
|
+
const decimals = (step.toString().split('.')[1] || '').length;
|
|
620
|
+
return Number(newValue.toFixed(decimals));
|
|
619
621
|
});
|
|
620
622
|
/**
|
|
621
623
|
* Sets state relevant to the given handle position.
|
|
@@ -879,18 +881,16 @@ class Slider extends React.PureComponent {
|
|
|
879
881
|
}
|
|
880
882
|
|
|
881
883
|
/**
|
|
882
|
-
*
|
|
883
|
-
*
|
|
884
|
-
*
|
|
884
|
+
* Rounds a given value to the nearest step defined by the slider's `step`
|
|
885
|
+
* prop.
|
|
886
|
+
*
|
|
887
|
+
* @param value - The value to adjust to the nearest step. Defaults to `0`.
|
|
888
|
+
* @returns The value rounded to the precision determined by the step.
|
|
885
889
|
*/
|
|
886
|
-
nearestStepValue(
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
tempInput.max = `${this.props.max}`;
|
|
891
|
-
tempInput.step = `${this.props.step}`;
|
|
892
|
-
tempInput.value = `${value}`;
|
|
893
|
-
return parseFloat(tempInput.value);
|
|
890
|
+
nearestStepValue() {
|
|
891
|
+
let value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
892
|
+
const decimals = (this.props.step?.toString().split('.')[1] || '').length;
|
|
893
|
+
return Number(value.toFixed(decimals));
|
|
894
894
|
}
|
|
895
895
|
getClientXFromEvent(event) {
|
|
896
896
|
let clientX;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright IBM Corp. 2016,
|
|
2
|
+
* Copyright IBM Corp. 2016, 2025
|
|
3
3
|
*
|
|
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.
|
|
@@ -340,12 +340,9 @@ export interface TabProps extends HTMLAttributes<HTMLElement> {
|
|
|
340
340
|
*/
|
|
341
341
|
renderButton?(): ReactNode;
|
|
342
342
|
/**
|
|
343
|
-
*
|
|
344
|
-
* Can be a React component class
|
|
343
|
+
* A component used to render an icon.
|
|
345
344
|
*/
|
|
346
|
-
renderIcon?:
|
|
347
|
-
size: number;
|
|
348
|
-
}>;
|
|
345
|
+
renderIcon?: React.ElementType;
|
|
349
346
|
/**
|
|
350
347
|
* An optional label to render under the primary tab label.
|
|
351
348
|
* Only useful for contained tabs.
|
|
@@ -31,6 +31,8 @@ var useIsomorphicEffect = require('../../internal/useIsomorphicEffect.js');
|
|
|
31
31
|
var useMergedRefs = require('../../internal/useMergedRefs.js');
|
|
32
32
|
var useNoInteractiveChildren = require('../../internal/useNoInteractiveChildren.js');
|
|
33
33
|
var usePrefix = require('../../internal/usePrefix.js');
|
|
34
|
+
var keys = require('../../internal/keyboard/keys.js');
|
|
35
|
+
var match = require('../../internal/keyboard/match.js');
|
|
34
36
|
var usePressable = require('./usePressable.js');
|
|
35
37
|
var deprecate = require('../../prop-types/deprecate.js');
|
|
36
38
|
var useEvent = require('../../internal/useEvent.js');
|
|
@@ -38,9 +40,7 @@ var useMatchMedia = require('../../internal/useMatchMedia.js');
|
|
|
38
40
|
require('../Text/index.js');
|
|
39
41
|
var index = require('../BadgeIndicator/index.js');
|
|
40
42
|
var debounce = require('../../node_modules/es-toolkit/dist/compat/function/debounce.mjs.js');
|
|
41
|
-
var match = require('../../internal/keyboard/match.js');
|
|
42
43
|
var Text = require('../Text/Text.js');
|
|
43
|
-
var keys = require('../../internal/keyboard/keys.js');
|
|
44
44
|
|
|
45
45
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
46
46
|
|
|
@@ -1017,22 +1017,21 @@ Tab.propTypes = {
|
|
|
1017
1017
|
* Provide a handler that is invoked on the key down event for the control
|
|
1018
1018
|
*/
|
|
1019
1019
|
onKeyDown: PropTypes__default["default"].func,
|
|
1020
|
-
|
|
1020
|
+
/**
|
|
1021
1021
|
* An optional parameter to allow overriding the anchor rendering.
|
|
1022
1022
|
* Useful for using Tab along with react-router or other client
|
|
1023
1023
|
* side router libraries.
|
|
1024
|
-
|
|
1024
|
+
*/
|
|
1025
1025
|
renderButton: PropTypes__default["default"].func,
|
|
1026
1026
|
/**
|
|
1027
|
-
*
|
|
1028
|
-
* Can be a React component class
|
|
1027
|
+
* A component used to render an icon.
|
|
1029
1028
|
*/
|
|
1030
1029
|
// @ts-expect-error: Invalid prop type derivation
|
|
1031
1030
|
renderIcon: PropTypes__default["default"].oneOfType([PropTypes__default["default"].func, PropTypes__default["default"].object]),
|
|
1032
|
-
|
|
1031
|
+
/**
|
|
1033
1032
|
* An optional label to render under the primary tab label.
|
|
1034
|
-
|
|
1035
|
-
|
|
1033
|
+
* Only useful for contained tabs.
|
|
1034
|
+
*/
|
|
1036
1035
|
secondaryLabel: PropTypes__default["default"].string
|
|
1037
1036
|
};
|
|
1038
1037
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright IBM Corp. 2016,
|
|
2
|
+
* Copyright IBM Corp. 2016, 2025
|
|
3
3
|
*
|
|
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.
|
|
@@ -30,8 +30,7 @@ export interface DismissibleTagBaseProps {
|
|
|
30
30
|
*/
|
|
31
31
|
onClose?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
32
32
|
/**
|
|
33
|
-
*
|
|
34
|
-
* Can be a React component class
|
|
33
|
+
* A component used to render an icon.
|
|
35
34
|
*/
|
|
36
35
|
renderIcon?: React.ElementType;
|
|
37
36
|
/**
|
|
@@ -86,8 +85,7 @@ declare const DismissibleTag: {
|
|
|
86
85
|
*/
|
|
87
86
|
onClose: PropTypes.Requireable<(...args: any[]) => any>;
|
|
88
87
|
/**
|
|
89
|
-
*
|
|
90
|
-
* Can be a React component class
|
|
88
|
+
* A component used to render an icon.
|
|
91
89
|
*/
|
|
92
90
|
renderIcon: PropTypes.Requireable<object>;
|
|
93
91
|
/**
|
|
@@ -129,8 +129,7 @@ DismissibleTag.propTypes = {
|
|
|
129
129
|
*/
|
|
130
130
|
onClose: PropTypes__default["default"].func,
|
|
131
131
|
/**
|
|
132
|
-
*
|
|
133
|
-
* Can be a React component class
|
|
132
|
+
* A component used to render an icon.
|
|
134
133
|
*/
|
|
135
134
|
renderIcon: PropTypes__default["default"].oneOfType([PropTypes__default["default"].func, PropTypes__default["default"].object]),
|
|
136
135
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright IBM Corp. 2016,
|
|
2
|
+
* Copyright IBM Corp. 2016, 2025
|
|
3
3
|
*
|
|
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.
|
|
@@ -33,8 +33,7 @@ export interface OperationalTagBaseProps {
|
|
|
33
33
|
*/
|
|
34
34
|
id?: string;
|
|
35
35
|
/**
|
|
36
|
-
*
|
|
37
|
-
* Can be a React component class
|
|
36
|
+
* A component used to render an icon.
|
|
38
37
|
*/
|
|
39
38
|
renderIcon?: React.ElementType;
|
|
40
39
|
onClick?: MouseEventHandler;
|
|
@@ -111,8 +111,7 @@ OperationalTag.propTypes = {
|
|
|
111
111
|
*/
|
|
112
112
|
id: PropTypes__default["default"].string,
|
|
113
113
|
/**
|
|
114
|
-
*
|
|
115
|
-
* Can be a React component class
|
|
114
|
+
* A component used to render an icon.
|
|
116
115
|
*/
|
|
117
116
|
renderIcon: PropTypes__default["default"].oneOfType([PropTypes__default["default"].func, PropTypes__default["default"].object]),
|
|
118
117
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright IBM Corp. 2016,
|
|
2
|
+
* Copyright IBM Corp. 2016, 2025
|
|
3
3
|
*
|
|
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.
|
|
@@ -22,8 +22,7 @@ export interface SelectableTagBaseProps {
|
|
|
22
22
|
*/
|
|
23
23
|
id?: string;
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
26
|
-
* Can be a React component class
|
|
25
|
+
* A component used to render an icon.
|
|
27
26
|
*/
|
|
28
27
|
renderIcon?: React.ElementType;
|
|
29
28
|
/**
|
|
@@ -65,8 +64,7 @@ declare const SelectableTag: {
|
|
|
65
64
|
*/
|
|
66
65
|
id: PropTypes.Requireable<string>;
|
|
67
66
|
/**
|
|
68
|
-
*
|
|
69
|
-
* Can be a React component class
|
|
67
|
+
* A component used to render an icon.
|
|
70
68
|
*/
|
|
71
69
|
renderIcon: PropTypes.Requireable<object>;
|
|
72
70
|
/**
|
|
@@ -108,8 +108,7 @@ SelectableTag.propTypes = {
|
|
|
108
108
|
*/
|
|
109
109
|
id: PropTypes__default["default"].string,
|
|
110
110
|
/**
|
|
111
|
-
*
|
|
112
|
-
* Can be a React component class
|
|
111
|
+
* A component used to render an icon.
|
|
113
112
|
*/
|
|
114
113
|
renderIcon: PropTypes__default["default"].oneOfType([PropTypes__default["default"].func, PropTypes__default["default"].object]),
|
|
115
114
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright IBM Corp. 2016,
|
|
2
|
+
* Copyright IBM Corp. 2016, 2025
|
|
3
3
|
*
|
|
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.
|
|
@@ -58,8 +58,7 @@ export interface TagBaseProps {
|
|
|
58
58
|
*/
|
|
59
59
|
onClose?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
60
60
|
/**
|
|
61
|
-
*
|
|
62
|
-
* Can be a React component class
|
|
61
|
+
* A component used to render an icon.
|
|
63
62
|
*/
|
|
64
63
|
renderIcon?: React.ElementType;
|
|
65
64
|
/**
|
|
@@ -186,8 +186,7 @@ Tag.propTypes = {
|
|
|
186
186
|
*/
|
|
187
187
|
onClose: deprecate["default"](PropTypes__default["default"].func, 'The `onClose` prop has been deprecated and will be removed in the next major version. Use DismissibleTag instead.'),
|
|
188
188
|
/**
|
|
189
|
-
*
|
|
190
|
-
* Can be a React component class
|
|
189
|
+
* A component used to render an icon.
|
|
191
190
|
*/
|
|
192
191
|
renderIcon: PropTypes__default["default"].oneOfType([PropTypes__default["default"].func, PropTypes__default["default"].object]),
|
|
193
192
|
/**
|
|
@@ -4,7 +4,7 @@
|
|
|
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, { type ReactNode, type MouseEvent, type KeyboardEvent, type HTMLAttributes, type ChangeEvent
|
|
7
|
+
import React, { type ReactNode, type MouseEvent, type KeyboardEvent, type HTMLAttributes, type ChangeEvent } from 'react';
|
|
8
8
|
export interface TileProps extends HTMLAttributes<HTMLDivElement> {
|
|
9
9
|
children?: ReactNode;
|
|
10
10
|
className?: string;
|
|
@@ -53,11 +53,9 @@ export interface ClickableTileProps extends HTMLAttributes<HTMLAnchorElement> {
|
|
|
53
53
|
*/
|
|
54
54
|
href?: string;
|
|
55
55
|
/**
|
|
56
|
-
*
|
|
56
|
+
* A component used to render an icon.
|
|
57
57
|
*/
|
|
58
|
-
renderIcon?:
|
|
59
|
-
className?: string;
|
|
60
|
-
}>;
|
|
58
|
+
renderIcon?: React.ElementType;
|
|
61
59
|
/**
|
|
62
60
|
* Specify the function to run when the ClickableTile is clicked
|
|
63
61
|
*/
|
|
@@ -15,6 +15,8 @@ var PropTypes = require('prop-types');
|
|
|
15
15
|
var cx = require('classnames');
|
|
16
16
|
var iconsReact = require('@carbon/icons-react');
|
|
17
17
|
var Link = require('../Link/Link.js');
|
|
18
|
+
var keys = require('../../internal/keyboard/keys.js');
|
|
19
|
+
var match = require('../../internal/keyboard/match.js');
|
|
18
20
|
var deprecate = require('../../prop-types/deprecate.js');
|
|
19
21
|
var events = require('../../tools/events.js');
|
|
20
22
|
var usePrefix = require('../../internal/usePrefix.js');
|
|
@@ -24,9 +26,7 @@ var useMergedRefs = require('../../internal/useMergedRefs.js');
|
|
|
24
26
|
var index = require('../FeatureFlags/index.js');
|
|
25
27
|
var useId = require('../../internal/useId.js');
|
|
26
28
|
require('../Text/index.js');
|
|
27
|
-
var match = require('../../internal/keyboard/match.js');
|
|
28
29
|
var Text = require('../Text/Text.js');
|
|
29
|
-
var keys = require('../../internal/keyboard/keys.js');
|
|
30
30
|
|
|
31
31
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
32
32
|
|
|
@@ -211,8 +211,7 @@ ClickableTile.propTypes = {
|
|
|
211
211
|
*/
|
|
212
212
|
rel: PropTypes__default["default"].string,
|
|
213
213
|
/**
|
|
214
|
-
*
|
|
215
|
-
* Can be a React component class
|
|
214
|
+
* A component used to render an icon.
|
|
216
215
|
*/
|
|
217
216
|
// @ts-expect-error: Invalid derived prop type, seemingly no real solution.
|
|
218
217
|
renderIcon: PropTypes__default["default"].oneOfType([PropTypes__default["default"].func, PropTypes__default["default"].object])
|
|
@@ -255,9 +254,12 @@ const SelectableTile = /*#__PURE__*/React__default["default"].forwardRef(functio
|
|
|
255
254
|
if (normalizedDecorator && decoratorRef.current && decoratorRef.current.contains(evt.target)) {
|
|
256
255
|
return;
|
|
257
256
|
}
|
|
258
|
-
setIsSelected(
|
|
257
|
+
setIsSelected(prevSelected => {
|
|
258
|
+
const newSelected = !prevSelected;
|
|
259
|
+
onChange(evt, newSelected, id);
|
|
260
|
+
return newSelected;
|
|
261
|
+
});
|
|
259
262
|
clickHandler(evt);
|
|
260
|
-
onChange(evt, isSelected, id);
|
|
261
263
|
}
|
|
262
264
|
function handleKeyDown(evt) {
|
|
263
265
|
evt?.persist?.();
|
|
@@ -14,11 +14,11 @@ var cx = require('classnames');
|
|
|
14
14
|
var PropTypes = require('prop-types');
|
|
15
15
|
var React = require('react');
|
|
16
16
|
var index = require('../Popover/index.js');
|
|
17
|
+
var keys = require('../../internal/keyboard/keys.js');
|
|
18
|
+
var match = require('../../internal/keyboard/match.js');
|
|
17
19
|
var useEvent = require('../../internal/useEvent.js');
|
|
18
20
|
var useId = require('../../internal/useId.js');
|
|
19
21
|
var usePrefix = require('../../internal/usePrefix.js');
|
|
20
|
-
var match = require('../../internal/keyboard/match.js');
|
|
21
|
-
var keys = require('../../internal/keyboard/keys.js');
|
|
22
22
|
|
|
23
23
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
24
24
|
|
|
@@ -14,11 +14,11 @@ var cx = require('classnames');
|
|
|
14
14
|
var PropTypes = require('prop-types');
|
|
15
15
|
var React = require('react');
|
|
16
16
|
var index = require('../Popover/index.js');
|
|
17
|
+
var keys = require('../../internal/keyboard/keys.js');
|
|
18
|
+
var match = require('../../internal/keyboard/match.js');
|
|
17
19
|
var useId = require('../../internal/useId.js');
|
|
18
20
|
var usePrefix = require('../../internal/usePrefix.js');
|
|
19
21
|
var deprecate = require('../../prop-types/deprecate.js');
|
|
20
|
-
var match = require('../../internal/keyboard/match.js');
|
|
21
|
-
var keys = require('../../internal/keyboard/keys.js');
|
|
22
22
|
|
|
23
23
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
24
24
|
|
|
@@ -14,13 +14,13 @@ var cx = require('classnames');
|
|
|
14
14
|
var PropTypes = require('prop-types');
|
|
15
15
|
var React = require('react');
|
|
16
16
|
var index = require('../Popover/index.js');
|
|
17
|
+
var keys = require('../../internal/keyboard/keys.js');
|
|
18
|
+
var match = require('../../internal/keyboard/match.js');
|
|
17
19
|
var useDelayedState = require('../../internal/useDelayedState.js');
|
|
18
20
|
var useId = require('../../internal/useId.js');
|
|
19
21
|
var useNoInteractiveChildren = require('../../internal/useNoInteractiveChildren.js');
|
|
20
22
|
var usePrefix = require('../../internal/usePrefix.js');
|
|
21
23
|
var useIsomorphicEffect = require('../../internal/useIsomorphicEffect.js');
|
|
22
|
-
var match = require('../../internal/keyboard/match.js');
|
|
23
|
-
var keys = require('../../internal/keyboard/keys.js');
|
|
24
24
|
|
|
25
25
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
26
26
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright IBM Corp. 2016,
|
|
2
|
+
* Copyright IBM Corp. 2016, 2025
|
|
3
3
|
*
|
|
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.
|
|
@@ -62,8 +62,7 @@ export type TreeNodeProps = {
|
|
|
62
62
|
*/
|
|
63
63
|
onTreeSelect?: (event: React.MouseEvent, node?: TreeNodeProps) => void;
|
|
64
64
|
/**
|
|
65
|
-
*
|
|
66
|
-
* Can be a React component class
|
|
65
|
+
* A component used to render an icon.
|
|
67
66
|
*/
|
|
68
67
|
renderIcon?: ComponentType | FunctionComponent;
|
|
69
68
|
/**
|
|
@@ -137,8 +136,7 @@ declare const TreeNode: React.ForwardRefExoticComponent<{
|
|
|
137
136
|
*/
|
|
138
137
|
onTreeSelect?: (event: React.MouseEvent, node?: TreeNodeProps) => void;
|
|
139
138
|
/**
|
|
140
|
-
*
|
|
141
|
-
* Can be a React component class
|
|
139
|
+
* A component used to render an icon.
|
|
142
140
|
*/
|
|
143
141
|
renderIcon?: ComponentType | FunctionComponent;
|
|
144
142
|
/**
|
|
@@ -14,12 +14,12 @@ var iconsReact = require('@carbon/icons-react');
|
|
|
14
14
|
var cx = require('classnames');
|
|
15
15
|
var PropTypes = require('prop-types');
|
|
16
16
|
var React = require('react');
|
|
17
|
+
var keys = require('../../internal/keyboard/keys.js');
|
|
18
|
+
var match = require('../../internal/keyboard/match.js');
|
|
17
19
|
var useControllableState = require('../../internal/useControllableState.js');
|
|
18
20
|
var usePrefix = require('../../internal/usePrefix.js');
|
|
19
21
|
var uniqueId = require('../../tools/uniqueId.js');
|
|
20
22
|
var index = require('../FeatureFlags/index.js');
|
|
21
|
-
var match = require('../../internal/keyboard/match.js');
|
|
22
|
-
var keys = require('../../internal/keyboard/keys.js');
|
|
23
23
|
|
|
24
24
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
25
25
|
|
|
@@ -410,8 +410,7 @@ TreeNode.propTypes = {
|
|
|
410
410
|
*/
|
|
411
411
|
onTreeSelect: PropTypes__default["default"].func,
|
|
412
412
|
/**
|
|
413
|
-
*
|
|
414
|
-
* Can be a React component class
|
|
413
|
+
* A component used to render an icon.
|
|
415
414
|
*/
|
|
416
415
|
// @ts-ignore
|
|
417
416
|
renderIcon: PropTypes__default["default"].oneOfType([PropTypes__default["default"].func, PropTypes__default["default"].object]),
|
|
@@ -13,13 +13,13 @@ var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelper
|
|
|
13
13
|
var cx = require('classnames');
|
|
14
14
|
var PropTypes = require('prop-types');
|
|
15
15
|
var React = require('react');
|
|
16
|
+
var keys = require('../../internal/keyboard/keys.js');
|
|
17
|
+
var match = require('../../internal/keyboard/match.js');
|
|
16
18
|
var useControllableState = require('../../internal/useControllableState.js');
|
|
17
19
|
var usePrefix = require('../../internal/usePrefix.js');
|
|
18
20
|
var uniqueId = require('../../tools/uniqueId.js');
|
|
19
21
|
var index = require('../FeatureFlags/index.js');
|
|
20
22
|
var TreeNode = require('./TreeNode.js');
|
|
21
|
-
var match = require('../../internal/keyboard/match.js');
|
|
22
|
-
var keys = require('../../internal/keyboard/keys.js');
|
|
23
23
|
|
|
24
24
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
25
25
|
|
|
@@ -12,9 +12,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
12
12
|
var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
|
|
13
13
|
var PropTypes = require('prop-types');
|
|
14
14
|
var React = require('react');
|
|
15
|
-
var useEvent = require('../../internal/useEvent.js');
|
|
16
|
-
var match = require('../../internal/keyboard/match.js');
|
|
17
15
|
var keys = require('../../internal/keyboard/keys.js');
|
|
16
|
+
var match = require('../../internal/keyboard/match.js');
|
|
17
|
+
var useEvent = require('../../internal/useEvent.js');
|
|
18
18
|
|
|
19
19
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
20
20
|
|
|
@@ -14,12 +14,12 @@ var iconsReact = require('@carbon/icons-react');
|
|
|
14
14
|
var cx = require('classnames');
|
|
15
15
|
var React = require('react');
|
|
16
16
|
var PropTypes = require('prop-types');
|
|
17
|
+
var keys = require('../../internal/keyboard/keys.js');
|
|
18
|
+
var match = require('../../internal/keyboard/match.js');
|
|
17
19
|
var AriaPropTypes = require('../../prop-types/AriaPropTypes.js');
|
|
18
20
|
var usePrefix = require('../../internal/usePrefix.js');
|
|
19
21
|
var deprecate = require('../../prop-types/deprecate.js');
|
|
20
22
|
var events = require('../../tools/events.js');
|
|
21
|
-
var match = require('../../internal/keyboard/match.js');
|
|
22
|
-
var keys = require('../../internal/keyboard/keys.js');
|
|
23
23
|
|
|
24
24
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
25
25
|
|
|
@@ -14,10 +14,10 @@ var cx = require('classnames');
|
|
|
14
14
|
var PropTypes = require('prop-types');
|
|
15
15
|
var React = require('react');
|
|
16
16
|
var usePrefix = require('../../internal/usePrefix.js');
|
|
17
|
+
var keys = require('../../internal/keyboard/keys.js');
|
|
18
|
+
var match = require('../../internal/keyboard/match.js');
|
|
17
19
|
var useEvent = require('../../internal/useEvent.js');
|
|
18
20
|
var useMergedRefs = require('../../internal/useMergedRefs.js');
|
|
19
|
-
var match = require('../../internal/keyboard/match.js');
|
|
20
|
-
var keys = require('../../internal/keyboard/keys.js');
|
|
21
21
|
|
|
22
22
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
23
23
|
|
|
@@ -16,13 +16,13 @@ var PropTypes = require('prop-types');
|
|
|
16
16
|
var AriaPropTypes = require('../../prop-types/AriaPropTypes.js');
|
|
17
17
|
var _utils = require('./_utils.js');
|
|
18
18
|
var usePrefix = require('../../internal/usePrefix.js');
|
|
19
|
+
var keys = require('../../internal/keyboard/keys.js');
|
|
20
|
+
var match = require('../../internal/keyboard/match.js');
|
|
19
21
|
var useMergedRefs = require('../../internal/useMergedRefs.js');
|
|
20
22
|
var useEvent = require('../../internal/useEvent.js');
|
|
21
23
|
var useDelayedState = require('../../internal/useDelayedState.js');
|
|
22
24
|
var layout = require('@carbon/layout');
|
|
23
25
|
var useMatchMedia = require('../../internal/useMatchMedia.js');
|
|
24
|
-
var match = require('../../internal/keyboard/match.js');
|
|
25
|
-
var keys = require('../../internal/keyboard/keys.js');
|
|
26
26
|
|
|
27
27
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
28
28
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright IBM Corp. 2016,
|
|
2
|
+
* Copyright IBM Corp. 2016, 2025
|
|
3
3
|
*
|
|
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.
|
|
@@ -20,8 +20,7 @@ export interface SideNavHeaderProps {
|
|
|
20
20
|
*/
|
|
21
21
|
isSideNavExpanded?: boolean;
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
24
|
-
* a React class.
|
|
23
|
+
* A component used to render an icon.
|
|
25
24
|
*/
|
|
26
25
|
renderIcon: React.ComponentType;
|
|
27
26
|
}
|
|
@@ -49,8 +49,7 @@ SideNavHeader.propTypes = {
|
|
|
49
49
|
*/
|
|
50
50
|
isSideNavExpanded: PropTypes__default["default"].bool,
|
|
51
51
|
/**
|
|
52
|
-
*
|
|
53
|
-
* a React class.
|
|
52
|
+
* A component used to render an icon.
|
|
54
53
|
*/
|
|
55
54
|
// @ts-expect-error - PropTypes are unable to cover this case.
|
|
56
55
|
renderIcon: PropTypes__default["default"].oneOfType([PropTypes__default["default"].func, PropTypes__default["default"].object]).isRequired
|