@carbon/react 1.37.0 → 1.38.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 +924 -660
- package/es/components/DataTable/DataTable.js +1 -1
- package/es/components/DataTable/Table.js +21 -1
- package/es/components/Grid/CSSGrid.js +1 -1
- package/es/components/Grid/ColumnHang.js +1 -1
- package/es/components/Grid/GridContext.d.ts +2 -2
- package/es/components/Grid/GridContext.js +1 -1
- package/es/components/Heading/index.d.ts +5 -40
- package/es/components/Heading/index.js +11 -6
- package/es/components/Icon/Icon.Skeleton.d.ts +25 -0
- package/es/components/Icon/Icon.Skeleton.js +1 -4
- package/es/components/Icon/index.d.ts +7 -0
- package/es/components/IconButton/index.js +9 -1
- package/es/components/Layer/index.js +5 -3
- package/es/components/ListBox/ListBoxMenuItem.js +2 -1
- package/es/components/Menu/Menu.js +14 -2
- package/es/components/Menu/MenuItem.js +28 -7
- package/es/components/MenuButton/index.js +1 -1
- package/es/components/MultiSelect/FilterableMultiSelect.js +6 -6
- package/es/components/MultiSelect/MultiSelect.js +6 -0
- package/es/components/Notification/Notification.js +4 -2
- package/es/components/Slider/Slider.d.ts +1 -0
- package/es/components/Slider/Slider.js +16 -5
- package/es/components/Tabs/Tabs.js +6 -8
- package/es/components/Tag/Tag.Skeleton.js +6 -3
- package/es/components/Tag/Tag.js +2 -2
- package/es/components/Text/Text.js +1 -1
- package/es/components/TextInput/PasswordInput.js +3 -1
- package/es/components/Theme/index.d.ts +3 -15
- package/es/components/Theme/index.js +6 -3
- package/es/components/TreeView/TreeNode.js +2 -2
- package/es/components/UIShell/HeaderMenu.js +11 -11
- package/es/components/UIShell/HeaderMenuItem.d.ts +9 -5
- package/es/components/UIShell/HeaderMenuItem.js +2 -3
- package/lib/components/DataTable/DataTable.js +1 -1
- package/lib/components/DataTable/Table.js +20 -0
- package/lib/components/Grid/CSSGrid.js +1 -1
- package/lib/components/Grid/ColumnHang.js +1 -1
- package/lib/components/Grid/GridContext.d.ts +2 -2
- package/lib/components/Grid/GridContext.js +1 -1
- package/lib/components/Heading/index.d.ts +5 -40
- package/lib/components/Heading/index.js +11 -6
- package/lib/components/Icon/Icon.Skeleton.d.ts +25 -0
- package/lib/components/Icon/Icon.Skeleton.js +1 -4
- package/lib/components/Icon/index.d.ts +7 -0
- package/lib/components/IconButton/index.js +9 -1
- package/lib/components/Layer/index.js +5 -3
- package/lib/components/ListBox/ListBoxMenuItem.js +2 -1
- package/lib/components/Menu/Menu.js +14 -2
- package/lib/components/Menu/MenuItem.js +30 -9
- package/lib/components/MenuButton/index.js +1 -1
- package/lib/components/MultiSelect/FilterableMultiSelect.js +5 -5
- package/lib/components/MultiSelect/MultiSelect.js +6 -0
- package/lib/components/Notification/Notification.js +4 -2
- package/lib/components/Slider/Slider.d.ts +1 -0
- package/lib/components/Slider/Slider.js +16 -5
- package/lib/components/Tabs/Tabs.js +6 -8
- package/lib/components/Tag/Tag.Skeleton.js +6 -3
- package/lib/components/Tag/Tag.js +2 -2
- package/lib/components/Text/Text.js +1 -1
- package/lib/components/TextInput/PasswordInput.js +3 -1
- package/lib/components/Theme/index.d.ts +3 -15
- package/lib/components/Theme/index.js +6 -3
- package/lib/components/TreeView/TreeNode.js +2 -2
- package/lib/components/UIShell/HeaderMenu.js +11 -11
- package/lib/components/UIShell/HeaderMenuItem.d.ts +9 -5
- package/lib/components/UIShell/HeaderMenuItem.js +2 -3
- package/package.json +5 -5
|
@@ -163,7 +163,7 @@ const FilterableMultiSelect = /*#__PURE__*/React__default["default"].forwardRef(
|
|
|
163
163
|
case stateChangeTypes.keyDownArrowUp:
|
|
164
164
|
case stateChangeTypes.keyDownHome:
|
|
165
165
|
case stateChangeTypes.keyDownEnd:
|
|
166
|
-
setHighlightedIndex(changes.highlightedIndex !== undefined ? changes.highlightedIndex :
|
|
166
|
+
setHighlightedIndex(changes.highlightedIndex !== undefined ? changes.highlightedIndex : 0);
|
|
167
167
|
if (stateChangeTypes.keyDownArrowDown === type && !isOpen) {
|
|
168
168
|
handleOnMenuChange(true);
|
|
169
169
|
}
|
|
@@ -194,8 +194,8 @@ const FilterableMultiSelect = /*#__PURE__*/React__default["default"].forwardRef(
|
|
|
194
194
|
handleOnMenuChange(false);
|
|
195
195
|
}
|
|
196
196
|
}
|
|
197
|
-
function clearInputValue() {
|
|
198
|
-
setInputValue('');
|
|
197
|
+
function clearInputValue(event) {
|
|
198
|
+
textInput.current.value.length === 1 || match.match(event, keys.Escape) ? setInputValue('') : setInputValue(textInput.current.value);
|
|
199
199
|
if (textInput.current) {
|
|
200
200
|
textInput.current.focus();
|
|
201
201
|
}
|
|
@@ -297,10 +297,10 @@ const FilterableMultiSelect = /*#__PURE__*/React__default["default"].forwardRef(
|
|
|
297
297
|
if (match.match(event, keys.Delete) || match.match(event, keys.Escape)) {
|
|
298
298
|
if (isOpen) {
|
|
299
299
|
handleOnMenuChange(true);
|
|
300
|
-
clearInputValue();
|
|
300
|
+
clearInputValue(event);
|
|
301
301
|
event.stopPropagation();
|
|
302
302
|
} else if (!isOpen) {
|
|
303
|
-
clearInputValue();
|
|
303
|
+
clearInputValue(event);
|
|
304
304
|
clearSelection();
|
|
305
305
|
event.stopPropagation();
|
|
306
306
|
}
|
|
@@ -266,6 +266,12 @@ const MultiSelect = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref
|
|
|
266
266
|
const itemArray = document.querySelectorAll(`li.${prefix}--list-box__menu-item[role="option"]`);
|
|
267
267
|
props.scrollIntoView(itemArray[highlightedIndex]);
|
|
268
268
|
}
|
|
269
|
+
if (highlightedIndex === -1) {
|
|
270
|
+
return {
|
|
271
|
+
...changes,
|
|
272
|
+
highlightedIndex: 0
|
|
273
|
+
};
|
|
274
|
+
}
|
|
269
275
|
return changes;
|
|
270
276
|
case ItemMouseMove:
|
|
271
277
|
return {
|
|
@@ -520,6 +520,7 @@ function ActionableNotification(_ref6) {
|
|
|
520
520
|
const [isOpen, setIsOpen] = React.useState(true);
|
|
521
521
|
const prefix = usePrefix.usePrefix();
|
|
522
522
|
const id = useId.useId('actionable-notification');
|
|
523
|
+
const subtitleId = useId.useId('actionable-notification-subtitle');
|
|
523
524
|
const containerClassName = cx__default["default"](className, {
|
|
524
525
|
[`${prefix}--actionable-notification`]: true,
|
|
525
526
|
[`${prefix}--actionable-notification--toast`]: !inline,
|
|
@@ -550,7 +551,7 @@ function ActionableNotification(_ref6) {
|
|
|
550
551
|
ref: ref,
|
|
551
552
|
role: role,
|
|
552
553
|
className: containerClassName,
|
|
553
|
-
"aria-labelledby": title ? id :
|
|
554
|
+
"aria-labelledby": title ? id : subtitleId
|
|
554
555
|
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
555
556
|
className: `${prefix}--actionable-notification__details`
|
|
556
557
|
}, /*#__PURE__*/React__default["default"].createElement(NotificationIcon, {
|
|
@@ -565,7 +566,8 @@ function ActionableNotification(_ref6) {
|
|
|
565
566
|
className: `${prefix}--actionable-notification__title`,
|
|
566
567
|
id: id
|
|
567
568
|
}, title), subtitle && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
568
|
-
className: `${prefix}--actionable-notification__subtitle
|
|
569
|
+
className: `${prefix}--actionable-notification__subtitle`,
|
|
570
|
+
id: subtitleId
|
|
569
571
|
}, subtitle), children))), actionButtonLabel && /*#__PURE__*/React__default["default"].createElement(NotificationActionButton, {
|
|
570
572
|
onClick: onActionButtonClick,
|
|
571
573
|
inline: inline
|
|
@@ -270,6 +270,7 @@ export default class Slider extends PureComponent<SliderProps> {
|
|
|
270
270
|
left: number;
|
|
271
271
|
needsOnRelease: boolean;
|
|
272
272
|
isValid: boolean;
|
|
273
|
+
isRtl: boolean;
|
|
273
274
|
};
|
|
274
275
|
thumbRef: React.RefObject<HTMLDivElement>;
|
|
275
276
|
filledTrackRef: React.RefObject<HTMLDivElement>;
|
|
@@ -53,7 +53,8 @@ class Slider extends React.PureComponent {
|
|
|
53
53
|
value: this.props.value,
|
|
54
54
|
left: 0,
|
|
55
55
|
needsOnRelease: false,
|
|
56
|
-
isValid: true
|
|
56
|
+
isValid: true,
|
|
57
|
+
isRtl: false
|
|
57
58
|
});
|
|
58
59
|
_rollupPluginBabelHelpers.defineProperty(this, "thumbRef", void 0);
|
|
59
60
|
_rollupPluginBabelHelpers.defineProperty(this, "filledTrackRef", void 0);
|
|
@@ -295,7 +296,7 @@ class Slider extends React.PureComponent {
|
|
|
295
296
|
// use the provided value or state's value to calculate it instead.
|
|
296
297
|
let leftPercent;
|
|
297
298
|
if (clientX != null) {
|
|
298
|
-
const leftOffset = clientX - (boundingRect?.left ?? 0);
|
|
299
|
+
const leftOffset = this.state.isRtl ? (boundingRect?.right ?? 0) - clientX : clientX - (boundingRect?.left ?? 0);
|
|
299
300
|
leftPercent = leftOffset / width;
|
|
300
301
|
} else {
|
|
301
302
|
if (value == null) {
|
|
@@ -336,7 +337,8 @@ class Slider extends React.PureComponent {
|
|
|
336
337
|
});
|
|
337
338
|
this.setState({
|
|
338
339
|
value,
|
|
339
|
-
left
|
|
340
|
+
left,
|
|
341
|
+
isRtl: document?.dir === 'rtl'
|
|
340
342
|
});
|
|
341
343
|
}
|
|
342
344
|
}
|
|
@@ -353,11 +355,20 @@ class Slider extends React.PureComponent {
|
|
|
353
355
|
// Fire onChange event handler if present, if there's a usable value, and
|
|
354
356
|
// if the value is different from the last one
|
|
355
357
|
|
|
358
|
+
// Set alternative positioning if direction is 'rtl'
|
|
356
359
|
if (this.thumbRef.current) {
|
|
357
|
-
this.
|
|
360
|
+
if (this.state.isRtl) {
|
|
361
|
+
this.thumbRef.current.style.insetInlineStart = `calc(${this.state.left}% - 14px)`;
|
|
362
|
+
} else {
|
|
363
|
+
this.thumbRef.current.style.insetInlineStart = `${this.state.left}%`;
|
|
364
|
+
}
|
|
358
365
|
}
|
|
359
366
|
if (this.filledTrackRef.current) {
|
|
360
|
-
|
|
367
|
+
if (this.state.isRtl) {
|
|
368
|
+
this.filledTrackRef.current.style.transform = `translate(100%, -50%) scaleX(-${this.state.left / 100})`;
|
|
369
|
+
} else {
|
|
370
|
+
this.filledTrackRef.current.style.transform = `translate(0%, -50%) scaleX(${this.state.left / 100})`;
|
|
371
|
+
}
|
|
361
372
|
}
|
|
362
373
|
if (prevState.value !== this.state.value && typeof this.props.onChange === 'function') {
|
|
363
374
|
this.props.onChange({
|
|
@@ -40,7 +40,7 @@ var debounce__default = /*#__PURE__*/_interopDefaultLegacy(debounce);
|
|
|
40
40
|
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
41
41
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
42
42
|
|
|
43
|
-
var _ChevronLeft, _ChevronRight
|
|
43
|
+
var _ChevronLeft, _ChevronRight;
|
|
44
44
|
|
|
45
45
|
// Used to manage the overall state of the Tabs
|
|
46
46
|
|
|
@@ -556,21 +556,19 @@ const Tab = /*#__PURE__*/React.forwardRef(function Tab(_ref5, forwardRef) {
|
|
|
556
556
|
}
|
|
557
557
|
onKeyDown?.(event);
|
|
558
558
|
};
|
|
559
|
-
const DismissIcon =
|
|
560
|
-
/*#__PURE__*/
|
|
561
|
-
// eslint-disable-next-line jsx-a11y/click-events-have-key-events
|
|
562
|
-
React__default["default"].createElement("div", {
|
|
563
|
-
role: "button",
|
|
559
|
+
const DismissIcon = /*#__PURE__*/React__default["default"].createElement("div", {
|
|
564
560
|
tabIndex: -1,
|
|
565
561
|
"aria-hidden": true,
|
|
566
562
|
className: cx__default["default"](`${prefix}--tabs__nav-item--close-icon`, {
|
|
567
563
|
[`${prefix}--visually-hidden`]: !dismissable
|
|
568
564
|
}),
|
|
569
565
|
onClick: handleClose,
|
|
570
|
-
"aria-label": "Close tab",
|
|
571
566
|
title: "Close tab",
|
|
572
567
|
ref: dismissIconRef
|
|
573
|
-
},
|
|
568
|
+
}, /*#__PURE__*/React__default["default"].createElement(iconsReact.Close, {
|
|
569
|
+
"aria-hidden": dismissable ? 'false' : 'true',
|
|
570
|
+
"aria-label": "Press delete to close tab"
|
|
571
|
+
}));
|
|
574
572
|
const hasIcon = Icon ?? dismissable;
|
|
575
573
|
return /*#__PURE__*/React__default["default"].createElement(BaseComponent, _rollupPluginBabelHelpers["extends"]({}, rest, {
|
|
576
574
|
"aria-controls": panelId,
|
|
@@ -28,10 +28,13 @@ function TagSkeleton(_ref) {
|
|
|
28
28
|
...rest
|
|
29
29
|
} = _ref;
|
|
30
30
|
const prefix = usePrefix.usePrefix();
|
|
31
|
+
const tagClasses = cx__default["default"](`${prefix}--tag`, `${prefix}--skeleton`, className, {
|
|
32
|
+
[`${prefix}--tag--${size}`]: size,
|
|
33
|
+
// TODO: V12 - Remove this class
|
|
34
|
+
[`${prefix}--layout--size-${size}`]: size
|
|
35
|
+
});
|
|
31
36
|
return /*#__PURE__*/React__default["default"].createElement("span", _rollupPluginBabelHelpers["extends"]({
|
|
32
|
-
className:
|
|
33
|
-
[`${prefix}--tag--${size}`]: size
|
|
34
|
-
})
|
|
37
|
+
className: tagClasses
|
|
35
38
|
}, rest));
|
|
36
39
|
}
|
|
37
40
|
TagSkeleton.propTypes = {
|
|
@@ -47,7 +47,7 @@ const Tag = _ref => {
|
|
|
47
47
|
type,
|
|
48
48
|
filter,
|
|
49
49
|
renderIcon: CustomIconElement,
|
|
50
|
-
title,
|
|
50
|
+
title = 'Clear filter',
|
|
51
51
|
disabled,
|
|
52
52
|
onClose,
|
|
53
53
|
size,
|
|
@@ -85,7 +85,7 @@ const Tag = _ref => {
|
|
|
85
85
|
className: `${prefix}--tag__close-icon`,
|
|
86
86
|
onClick: handleClose,
|
|
87
87
|
disabled: disabled,
|
|
88
|
-
"aria-
|
|
88
|
+
"aria-label": title,
|
|
89
89
|
title: title
|
|
90
90
|
}, _Close || (_Close = /*#__PURE__*/React__default["default"].createElement(iconsReact.Close, null))));
|
|
91
91
|
}
|
|
@@ -76,7 +76,9 @@ const PasswordInput = /*#__PURE__*/React__default["default"].forwardRef(function
|
|
|
76
76
|
[`${prefix}--text-input--light`]: light,
|
|
77
77
|
[`${prefix}--text-input--invalid`]: normalizedProps.invalid,
|
|
78
78
|
[`${prefix}--text-input--warning`]: normalizedProps.warn,
|
|
79
|
-
[`${prefix}--text-input--${size}`]: size
|
|
79
|
+
[`${prefix}--text-input--${size}`]: size,
|
|
80
|
+
// TODO: V12 - Remove this class
|
|
81
|
+
[`${prefix}--layout--size-${size}`]: size
|
|
80
82
|
});
|
|
81
83
|
const sharedTextInputProps = {
|
|
82
84
|
id,
|
|
@@ -5,26 +5,14 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
|
-
import React, { ElementType
|
|
8
|
+
import React, { ElementType } from 'react';
|
|
9
9
|
import { PolymorphicProps } from '../../types/common';
|
|
10
10
|
interface GlobalThemeProps {
|
|
11
11
|
theme?: 'white' | 'g10' | 'g90' | 'g100';
|
|
12
|
+
children?: React.ReactNode;
|
|
12
13
|
}
|
|
13
14
|
export declare const ThemeContext: React.Context<GlobalThemeProps>;
|
|
14
|
-
export declare
|
|
15
|
-
export declare namespace GlobalTheme {
|
|
16
|
-
var propTypes: {
|
|
17
|
-
/**
|
|
18
|
-
* Provide child elements to be rendered inside of `GlobalTheme`, this is
|
|
19
|
-
* typically the root of your app
|
|
20
|
-
*/
|
|
21
|
-
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
22
|
-
/**
|
|
23
|
-
* Specify the global theme for your app
|
|
24
|
-
*/
|
|
25
|
-
theme: PropTypes.Requireable<string>;
|
|
26
|
-
};
|
|
27
|
-
}
|
|
15
|
+
export declare const GlobalTheme: React.ForwardRefExoticComponent<GlobalThemeProps & React.RefAttributes<unknown>>;
|
|
28
16
|
type ThemeBaseProps = GlobalThemeProps & {
|
|
29
17
|
className?: string;
|
|
30
18
|
};
|
|
@@ -25,7 +25,7 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
|
25
25
|
const ThemeContext = /*#__PURE__*/React__default["default"].createContext({
|
|
26
26
|
theme: 'white'
|
|
27
27
|
});
|
|
28
|
-
function GlobalTheme(_ref) {
|
|
28
|
+
const GlobalTheme = /*#__PURE__*/React__default["default"].forwardRef(function GlobalTheme(_ref, ref) {
|
|
29
29
|
let {
|
|
30
30
|
children,
|
|
31
31
|
theme
|
|
@@ -35,10 +35,13 @@ function GlobalTheme(_ref) {
|
|
|
35
35
|
theme
|
|
36
36
|
};
|
|
37
37
|
}, [theme]);
|
|
38
|
+
const childrenWithProps = /*#__PURE__*/React__default["default"].cloneElement(children, {
|
|
39
|
+
ref: ref
|
|
40
|
+
});
|
|
38
41
|
return /*#__PURE__*/React__default["default"].createElement(ThemeContext.Provider, {
|
|
39
42
|
value: value
|
|
40
|
-
},
|
|
41
|
-
}
|
|
43
|
+
}, childrenWithProps);
|
|
44
|
+
});
|
|
42
45
|
GlobalTheme.propTypes = {
|
|
43
46
|
/**
|
|
44
47
|
* Provide child elements to be rendered inside of `GlobalTheme`, this is
|
|
@@ -197,8 +197,8 @@ function TreeNode(_ref) {
|
|
|
197
197
|
return depth + 2.5;
|
|
198
198
|
};
|
|
199
199
|
if (currentNodeLabel.current) {
|
|
200
|
-
currentNodeLabel.current.style.
|
|
201
|
-
currentNodeLabel.current.style.
|
|
200
|
+
currentNodeLabel.current.style.marginInlineStart = `-${calcOffset()}rem`;
|
|
201
|
+
currentNodeLabel.current.style.paddingInlineStart = `${calcOffset()}rem`;
|
|
202
202
|
}
|
|
203
203
|
|
|
204
204
|
// sync props and state
|
|
@@ -67,20 +67,20 @@ class HeaderMenu extends React__default["default"].Component {
|
|
|
67
67
|
});
|
|
68
68
|
/**
|
|
69
69
|
* Handle our blur event from our underlying menuitems. Will mostly be used
|
|
70
|
-
* for
|
|
71
|
-
*
|
|
70
|
+
* for closing our menu in response to a user clicking off or tabbing out of
|
|
71
|
+
* the menu or menubar.
|
|
72
72
|
*/
|
|
73
73
|
_rollupPluginBabelHelpers.defineProperty(this, "handleOnBlur", event => {
|
|
74
|
-
//
|
|
75
|
-
//
|
|
76
|
-
const
|
|
77
|
-
|
|
78
|
-
|
|
74
|
+
// Close the menu on blur when the related target is not a sibling menu item
|
|
75
|
+
// or a child in a submenu
|
|
76
|
+
const siblingItemBlurredTo = this.items.find(element => element === event.relatedTarget);
|
|
77
|
+
const childItemBlurredTo = this._subMenus.current?.contains(event.relatedTarget);
|
|
78
|
+
if (!siblingItemBlurredTo && !childItemBlurredTo) {
|
|
79
|
+
this.setState({
|
|
80
|
+
expanded: false,
|
|
81
|
+
selectedIndex: null
|
|
82
|
+
});
|
|
79
83
|
}
|
|
80
|
-
this.setState({
|
|
81
|
-
expanded: false,
|
|
82
|
-
selectedIndex: null
|
|
83
|
-
});
|
|
84
84
|
});
|
|
85
85
|
/**
|
|
86
86
|
* ref handler for our menu button. If we are supplied a `focusRef` prop, we also
|
|
@@ -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
|
|
7
|
+
import { type ComponentProps, type ForwardedRef, type ReactNode, ElementType, WeakValidationMap } from 'react';
|
|
8
8
|
import { LinkProps } from './Link';
|
|
9
9
|
type HeaderMenuItemProps<E extends ElementType> = LinkProps<E> & {
|
|
10
10
|
className?: string | undefined;
|
|
@@ -15,8 +15,12 @@ type HeaderMenuItemProps<E extends ElementType> = LinkProps<E> & {
|
|
|
15
15
|
role?: ComponentProps<'li'>['role'];
|
|
16
16
|
tabIndex?: number | undefined;
|
|
17
17
|
};
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
};
|
|
18
|
+
export interface HeaderMenuItemComponent {
|
|
19
|
+
<E extends ElementType = 'a'>(props: HeaderMenuItemProps<E> & {
|
|
20
|
+
ref?: ForwardedRef<ElementType>;
|
|
21
|
+
}): JSX.Element | null;
|
|
22
|
+
displayName?: string;
|
|
23
|
+
propTypes?: WeakValidationMap<HeaderMenuItemProps<any>>;
|
|
24
|
+
}
|
|
25
|
+
declare const HeaderMenuItem: HeaderMenuItemComponent;
|
|
22
26
|
export default HeaderMenuItem;
|
|
@@ -23,7 +23,7 @@ var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
|
23
23
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
24
24
|
var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
|
25
25
|
|
|
26
|
-
function HeaderMenuItemRenderFunction(_ref, ref) {
|
|
26
|
+
const HeaderMenuItem = /*#__PURE__*/React.forwardRef(function HeaderMenuItemRenderFunction(_ref, ref) {
|
|
27
27
|
let {
|
|
28
28
|
className,
|
|
29
29
|
isActive,
|
|
@@ -55,8 +55,7 @@ function HeaderMenuItemRenderFunction(_ref, ref) {
|
|
|
55
55
|
}), /*#__PURE__*/React__default["default"].createElement("span", {
|
|
56
56
|
className: `${prefix}--text-truncate--end`
|
|
57
57
|
}, children)));
|
|
58
|
-
}
|
|
59
|
-
const HeaderMenuItem = /*#__PURE__*/React.forwardRef(HeaderMenuItemRenderFunction);
|
|
58
|
+
});
|
|
60
59
|
HeaderMenuItem.displayName = 'HeaderMenuItem';
|
|
61
60
|
HeaderMenuItem.propTypes = {
|
|
62
61
|
/**
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@carbon/react",
|
|
3
3
|
"description": "React components for the Carbon Design System",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.38.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"module": "es/index.js",
|
|
@@ -47,9 +47,9 @@
|
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@babel/runtime": "^7.18.3",
|
|
49
49
|
"@carbon/feature-flags": "^0.16.0",
|
|
50
|
-
"@carbon/icons-react": "^11.
|
|
50
|
+
"@carbon/icons-react": "^11.27.0",
|
|
51
51
|
"@carbon/layout": "^11.19.0",
|
|
52
|
-
"@carbon/styles": "^1.
|
|
52
|
+
"@carbon/styles": "^1.38.0",
|
|
53
53
|
"@carbon/telemetry": "0.1.0",
|
|
54
54
|
"classnames": "2.3.2",
|
|
55
55
|
"copy-to-clipboard": "^3.3.1",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"@babel/preset-react": "^7.22.3",
|
|
78
78
|
"@babel/preset-typescript": "^7.21.5",
|
|
79
79
|
"@carbon/test-utils": "^10.30.0",
|
|
80
|
-
"@carbon/themes": "^11.
|
|
80
|
+
"@carbon/themes": "^11.25.0",
|
|
81
81
|
"@rollup/plugin-babel": "^6.0.0",
|
|
82
82
|
"@rollup/plugin-commonjs": "^25.0.0",
|
|
83
83
|
"@rollup/plugin-node-resolve": "^15.0.0",
|
|
@@ -139,5 +139,5 @@
|
|
|
139
139
|
"**/*.scss",
|
|
140
140
|
"**/*.css"
|
|
141
141
|
],
|
|
142
|
-
"gitHead": "
|
|
142
|
+
"gitHead": "33f414ff39064f1c432898ab8204b89b7b02cfb4"
|
|
143
143
|
}
|