@carbon/react 1.101.0 → 1.102.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (152) hide show
  1. package/.playwright/INTERNAL_AVT_REPORT_DO_NOT_USE.json +998 -963
  2. package/es/components/Accordion/AccordionItem.js +8 -6
  3. package/es/components/ComboBox/ComboBox.js +3 -3
  4. package/es/components/ComposedModal/ComposedModal.js +0 -1
  5. package/es/components/ContainedList/ContainedList.d.ts +1 -1
  6. package/es/components/ContainedList/ContainedList.js +9 -34
  7. package/es/components/ContentSwitcher/ContentSwitcher.d.ts +3 -3
  8. package/es/components/ContentSwitcher/ContentSwitcher.js +1 -2
  9. package/es/components/DataTable/DataTable.d.ts +6 -2
  10. package/es/components/DataTable/DataTable.js +3 -1
  11. package/es/components/DataTable/Table.js +1 -1
  12. package/es/components/DataTable/TableToolbarSearch.d.ts +11 -2
  13. package/es/components/DataTable/TableToolbarSearch.js +10 -3
  14. package/es/components/DataTable/stories/examples/TableToolbarFilter.d.ts +3 -0
  15. package/es/components/DataTableSkeleton/DataTableSkeleton.d.ts +2 -12
  16. package/es/components/DataTableSkeleton/DataTableSkeleton.js +1 -8
  17. package/es/components/DatePicker/DatePicker.js +4 -1
  18. package/es/components/DatePickerInput/DatePickerInput.d.ts +2 -5
  19. package/es/components/DatePickerInput/DatePickerInput.js +2 -13
  20. package/es/components/Dropdown/Dropdown.js +1 -0
  21. package/es/components/ExpandableSearch/ExpandableSearch.js +2 -1
  22. package/es/components/ExpandableSearch/index.js +12 -0
  23. package/es/components/FluidSelect/FluidSelect.d.ts +3 -3
  24. package/es/components/FluidTextArea/FluidTextArea.d.ts +2 -4
  25. package/es/components/FluidTextArea/FluidTextArea.js +1 -2
  26. package/es/components/FluidTimePickerSelect/FluidTimePickerSelect.d.ts +3 -3
  27. package/es/components/Grid/Column.d.ts +1 -1
  28. package/es/components/Grid/Column.js +2 -2
  29. package/es/components/Loading/Loading.d.ts +1 -1
  30. package/es/components/Loading/Loading.js +3 -1
  31. package/es/components/Menu/Menu.d.ts +1 -1
  32. package/es/components/Menu/Menu.js +6 -2
  33. package/es/components/Menu/MenuItem.js +2 -2
  34. package/es/components/Modal/Modal.js +0 -1
  35. package/es/components/MultiSelect/FilterableMultiSelect.js +4 -3
  36. package/es/components/MultiSelect/MultiSelect.js +5 -8
  37. package/es/components/MultiSelect/MultiSelectPropTypes.d.ts +6 -8
  38. package/es/components/MultiSelect/tools/sorting.d.ts +16 -9
  39. package/es/components/MultiSelect/tools/sorting.js +10 -14
  40. package/es/components/OverflowMenu/OverflowMenu.js +1 -0
  41. package/es/components/OverflowMenuItem/OverflowMenuItem.d.ts +5 -1
  42. package/es/components/OverflowMenuItem/OverflowMenuItem.js +12 -2
  43. package/es/components/Popover/index.js +3 -3
  44. package/es/components/RadioButtonGroup/RadioButtonGroup.d.ts +1 -1
  45. package/es/components/RadioButtonGroup/RadioButtonGroup.js +8 -11
  46. package/es/components/Search/Search.js +3 -2
  47. package/es/components/Search/utils.d.ts +7 -0
  48. package/es/components/Search/utils.js +10 -0
  49. package/es/components/Select/Select.d.ts +2 -2
  50. package/es/components/Select/Select.js +1 -1
  51. package/es/components/SelectItem/SelectItem.d.ts +3 -3
  52. package/es/components/StructuredList/StructuredList.js +2 -2
  53. package/es/components/Tabs/Tabs.js +9 -4
  54. package/es/components/Tag/DismissibleTag.d.ts +1 -1
  55. package/es/components/Tag/DismissibleTag.js +2 -2
  56. package/es/components/Tag/OperationalTag.d.ts +1 -1
  57. package/es/components/Tag/OperationalTag.js +2 -2
  58. package/es/components/Tag/SelectableTag.d.ts +1 -1
  59. package/es/components/Tag/SelectableTag.js +2 -2
  60. package/es/components/Tag/Tag.d.ts +1 -1
  61. package/es/components/Tag/Tag.js +2 -2
  62. package/es/components/TextArea/TextArea.d.ts +1 -2
  63. package/es/components/TextArea/TextArea.js +4 -5
  64. package/es/components/TextInput/ControlledPasswordInput.js +1 -1
  65. package/es/components/TimePickerSelect/TimePickerSelect.d.ts +4 -4
  66. package/es/components/Toggletip/index.js +1 -2
  67. package/es/components/TreeView/TreeNode.js +2 -2
  68. package/es/components/TreeView/TreeView.d.ts +1 -1
  69. package/es/components/UIShell/HeaderPanel.d.ts +1 -1
  70. package/es/components/UIShell/HeaderPanel.js +4 -2
  71. package/es/components/UIShell/SideNav.js +3 -3
  72. package/es/components/UIShell/Switcher.d.ts +1 -1
  73. package/es/components/UIShell/Switcher.js +1 -1
  74. package/es/feature-flags.js +2 -2
  75. package/es/internal/FloatingMenu.js +3 -3
  76. package/lib/components/Accordion/AccordionItem.js +7 -5
  77. package/lib/components/ComboBox/ComboBox.js +3 -3
  78. package/lib/components/ComposedModal/ComposedModal.js +0 -1
  79. package/lib/components/ContainedList/ContainedList.d.ts +1 -1
  80. package/lib/components/ContainedList/ContainedList.js +9 -34
  81. package/lib/components/ContentSwitcher/ContentSwitcher.d.ts +3 -3
  82. package/lib/components/ContentSwitcher/ContentSwitcher.js +1 -2
  83. package/lib/components/DataTable/DataTable.d.ts +6 -2
  84. package/lib/components/DataTable/DataTable.js +3 -1
  85. package/lib/components/DataTable/Table.js +1 -1
  86. package/lib/components/DataTable/TableToolbarSearch.d.ts +11 -2
  87. package/lib/components/DataTable/TableToolbarSearch.js +10 -3
  88. package/lib/components/DataTable/stories/examples/TableToolbarFilter.d.ts +3 -0
  89. package/lib/components/DataTableSkeleton/DataTableSkeleton.d.ts +2 -12
  90. package/lib/components/DataTableSkeleton/DataTableSkeleton.js +1 -8
  91. package/lib/components/DatePicker/DatePicker.js +4 -1
  92. package/lib/components/DatePickerInput/DatePickerInput.d.ts +2 -5
  93. package/lib/components/DatePickerInput/DatePickerInput.js +2 -13
  94. package/lib/components/Dropdown/Dropdown.js +1 -0
  95. package/lib/components/ExpandableSearch/ExpandableSearch.js +2 -1
  96. package/lib/components/ExpandableSearch/index.js +17 -0
  97. package/lib/components/FeatureFlags/index.js +5 -5
  98. package/lib/components/FluidSelect/FluidSelect.d.ts +3 -3
  99. package/lib/components/FluidTextArea/FluidTextArea.d.ts +2 -4
  100. package/lib/components/FluidTextArea/FluidTextArea.js +1 -2
  101. package/lib/components/FluidTimePickerSelect/FluidTimePickerSelect.d.ts +3 -3
  102. package/lib/components/Grid/Column.d.ts +1 -1
  103. package/lib/components/Grid/Column.js +2 -21
  104. package/lib/components/Loading/Loading.d.ts +1 -1
  105. package/lib/components/Loading/Loading.js +3 -1
  106. package/lib/components/Menu/Menu.d.ts +1 -1
  107. package/lib/components/Menu/Menu.js +6 -2
  108. package/lib/components/Menu/MenuItem.js +2 -2
  109. package/lib/components/Modal/Modal.js +0 -1
  110. package/lib/components/MultiSelect/FilterableMultiSelect.js +4 -3
  111. package/lib/components/MultiSelect/MultiSelect.js +5 -8
  112. package/lib/components/MultiSelect/MultiSelectPropTypes.d.ts +6 -8
  113. package/lib/components/MultiSelect/tools/sorting.d.ts +16 -9
  114. package/lib/components/MultiSelect/tools/sorting.js +10 -14
  115. package/lib/components/OverflowMenu/OverflowMenu.js +1 -0
  116. package/lib/components/OverflowMenuItem/OverflowMenuItem.d.ts +5 -1
  117. package/lib/components/OverflowMenuItem/OverflowMenuItem.js +12 -2
  118. package/lib/components/Popover/index.js +3 -3
  119. package/lib/components/RadioButtonGroup/RadioButtonGroup.d.ts +1 -1
  120. package/lib/components/RadioButtonGroup/RadioButtonGroup.js +7 -10
  121. package/lib/components/Search/Search.js +3 -2
  122. package/lib/components/Search/utils.d.ts +7 -0
  123. package/lib/components/Search/utils.js +12 -0
  124. package/lib/components/Select/Select.d.ts +2 -2
  125. package/lib/components/Select/Select.js +1 -1
  126. package/lib/components/SelectItem/SelectItem.d.ts +3 -3
  127. package/lib/components/StructuredList/StructuredList.js +2 -2
  128. package/lib/components/Tabs/Tabs.js +9 -4
  129. package/lib/components/Tag/DismissibleTag.d.ts +1 -1
  130. package/lib/components/Tag/DismissibleTag.js +2 -2
  131. package/lib/components/Tag/OperationalTag.d.ts +1 -1
  132. package/lib/components/Tag/OperationalTag.js +2 -2
  133. package/lib/components/Tag/SelectableTag.d.ts +1 -1
  134. package/lib/components/Tag/SelectableTag.js +2 -2
  135. package/lib/components/Tag/Tag.d.ts +1 -1
  136. package/lib/components/Tag/Tag.js +2 -2
  137. package/lib/components/TextArea/TextArea.d.ts +1 -2
  138. package/lib/components/TextArea/TextArea.js +4 -5
  139. package/lib/components/TextInput/ControlledPasswordInput.js +1 -1
  140. package/lib/components/TimePickerSelect/TimePickerSelect.d.ts +4 -4
  141. package/lib/components/Toggletip/index.js +1 -2
  142. package/lib/components/TreeView/TreeNode.js +2 -2
  143. package/lib/components/TreeView/TreeView.d.ts +1 -1
  144. package/lib/components/UIShell/HeaderPanel.d.ts +1 -1
  145. package/lib/components/UIShell/HeaderPanel.js +4 -2
  146. package/lib/components/UIShell/SideNav.js +3 -3
  147. package/lib/components/UIShell/Switcher.d.ts +1 -1
  148. package/lib/components/UIShell/Switcher.js +1 -1
  149. package/lib/feature-flags.js +2 -21
  150. package/lib/internal/FloatingMenu.js +3 -22
  151. package/package.json +7 -7
  152. package/telemetry.yml +0 -1
@@ -1,11 +1,11 @@
1
1
  /**
2
- * Copyright IBM Corp. 2016, 2023
2
+ * Copyright IBM Corp. 2016, 2026
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.
6
6
  */
7
7
  import PropTypes from 'prop-types';
8
- import { HTMLAttributes } from 'react';
8
+ import { type HTMLAttributes, type OptionHTMLAttributes } from 'react';
9
9
  export interface SelectItemProps extends HTMLAttributes<HTMLOptionElement> {
10
10
  /**
11
11
  * Specify an optional className to be applied to the node
@@ -26,7 +26,7 @@ export interface SelectItemProps extends HTMLAttributes<HTMLOptionElement> {
26
26
  /**
27
27
  * Specify the value of the <SelectItem>
28
28
  */
29
- value: any;
29
+ value: OptionHTMLAttributes<HTMLOptionElement>['value'];
30
30
  }
31
31
  declare const SelectItem: {
32
32
  ({ className, value, disabled, hidden, text, ...other }: SelectItemProps): import("react/jsx-runtime").JSX.Element;
@@ -152,8 +152,8 @@ function StructuredListRow(props) {
152
152
  ...other
153
153
  } = props;
154
154
  const [hasFocusWithin, setHasFocusWithin] = React.useState(false);
155
- // eslint-disable-next-line react-hooks/rules-of-hooks -- https://github.com/carbon-design-system/carbon/issues/20452
156
- const rowId = id ?? useId.useId('grid-input');
155
+ const generatedRowId = useId.useId('grid-input');
156
+ const rowId = id ?? generatedRowId;
157
157
  const selectedRow = React.useContext(GridSelectedRowStateContext);
158
158
  const setSelectedRow = React.useContext(GridSelectedRowDispatchContext);
159
159
  const prefix = usePrefix.usePrefix();
@@ -850,8 +850,8 @@ const Tab = /*#__PURE__*/React.forwardRef(({
850
850
  if (tabRef.current && tabRef.current.parentElement) {
851
851
  // determine number of tabs, excluding disabled
852
852
  const tabCount = Array.from(tabRef.current.parentElement.childNodes).filter(node => {
853
- const element = node;
854
- return element.classList.contains(`${prefix}--tabs__nav-link`) && !element.classList.contains(`${prefix}--tabs__nav-item--disabled`);
853
+ if (!(node instanceof HTMLElement)) return false;
854
+ return node.classList.contains(`${prefix}--tabs__nav-link`) && !node.classList.contains(`${prefix}--tabs__nav-item--disabled`);
855
855
  }).length;
856
856
 
857
857
  // if not removing last tab focus on next tab
@@ -861,7 +861,10 @@ const Tab = /*#__PURE__*/React.forwardRef(({
861
861
  // if removing last tab focus on previous tab
862
862
  else {
863
863
  const prevTabIndex = (tabCount - 2) * 2;
864
- tabRef.current.parentElement.childNodes[prevTabIndex]?.focus();
864
+ const previousTab = tabRef.current.parentElement.childNodes[prevTabIndex];
865
+ if (previousTab instanceof HTMLElement) {
866
+ previousTab.focus();
867
+ }
865
868
  }
866
869
  }
867
870
  };
@@ -1162,7 +1165,9 @@ function TabPanels({
1162
1165
  // set max height to TabList
1163
1166
  const heights = refs.current.map(ref => ref?.offsetHeight || 0);
1164
1167
  const max = Math.max(...heights);
1165
- tabContainer.style.height = max + 'px';
1168
+ if (tabContainer instanceof HTMLElement) {
1169
+ tabContainer.style.height = max + 'px';
1170
+ }
1166
1171
 
1167
1172
  // re-hide hidden Tab Panels
1168
1173
  refs.current.forEach((ref, index) => {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright IBM Corp. 2016, 2025
2
+ * Copyright IBM Corp. 2016, 2026
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.
@@ -49,8 +49,8 @@ const DismissibleTag = /*#__PURE__*/React.forwardRef(({
49
49
  }, forwardRef) => {
50
50
  const prefix = usePrefix.usePrefix();
51
51
  const tagLabelRef = React.useRef(null);
52
- // eslint-disable-next-line react-hooks/rules-of-hooks -- https://github.com/carbon-design-system/carbon/issues/20452
53
- const tagId = id || `tag-${useId.useId()}`;
52
+ const generatedTagId = useId.useId();
53
+ const tagId = id ?? `tag-${generatedTagId}`;
54
54
  const tagClasses = cx(`${prefix}--tag--filter`, className);
55
55
  const [isEllipsisApplied, setIsEllipsisApplied] = React.useState(false);
56
56
  useIsomorphicEffect.default(() => {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright IBM Corp. 2016, 2025
2
+ * Copyright IBM Corp. 2016, 2026
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.
@@ -49,8 +49,8 @@ const OperationalTag = /*#__PURE__*/React.forwardRef(({
49
49
  }, forwardRef) => {
50
50
  const prefix = usePrefix.usePrefix();
51
51
  const tagRef = React.useRef(null);
52
- // eslint-disable-next-line react-hooks/rules-of-hooks -- https://github.com/carbon-design-system/carbon/issues/20452
53
- const tagId = id || `tag-${useId.useId()}`;
52
+ const generatedTagId = useId.useId();
53
+ const tagId = id ?? `tag-${generatedTagId}`;
54
54
  const tagClasses = cx(`${prefix}--tag--operational`, className);
55
55
  const [isEllipsisApplied, setIsEllipsisApplied] = React.useState(false);
56
56
  useIsomorphicEffect.default(() => {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright IBM Corp. 2016, 2025
2
+ * Copyright IBM Corp. 2016, 2026
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.
@@ -41,8 +41,8 @@ const SelectableTag = /*#__PURE__*/React.forwardRef(({
41
41
  }, forwardRef) => {
42
42
  const prefix = usePrefix.usePrefix();
43
43
  const tagRef = React.useRef(null);
44
- // eslint-disable-next-line react-hooks/rules-of-hooks -- https://github.com/carbon-design-system/carbon/issues/20452
45
- const tagId = id || `tag-${useId.useId()}`;
44
+ const generatedTagId = useId.useId();
45
+ const tagId = id ?? `tag-${generatedTagId}`;
46
46
  const [selectedTag, setSelectedTag] = useControllableState.useControllableState({
47
47
  value: selected,
48
48
  onChange: onChange,
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright IBM Corp. 2016, 2025
2
+ * Copyright IBM Corp. 2016, 2026
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.
@@ -78,8 +78,8 @@ const TagBase = /*#__PURE__*/React.forwardRef(({
78
78
  console.warn('The `onClose` prop for Tag has been deprecated and will be removed in the next major version. Use DismissibleTag instead.');
79
79
  }
80
80
  const ref = useMergedRefs.useMergedRefs([forwardRef, tagRef]);
81
- // eslint-disable-next-line react-hooks/rules-of-hooks -- https://github.com/carbon-design-system/carbon/issues/20452
82
- const tagId = id || `tag-${useId.useId()}`;
81
+ const generatedTagId = useId.useId();
82
+ const tagId = id ?? `tag-${generatedTagId}`;
83
83
  const [isEllipsisApplied, setIsEllipsisApplied] = React.useState(false);
84
84
  useIsomorphicEffect.default(() => {
85
85
  const newElement = tagRef.current?.getElementsByClassName(`${prefix}--tag__label`)[0];
@@ -7,8 +7,7 @@
7
7
  import React, { type ReactNode } from 'react';
8
8
  export interface TextAreaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
9
9
  /**
10
- * Provide a custom className that is applied directly to the underlying
11
- * `<textarea>` node
10
+ * Provide a custom className that is applied to the wrapper node
12
11
  */
13
12
  className?: string;
14
13
  /**
@@ -42,7 +42,7 @@ const TextArea = frFn((props, forwardRef) => {
42
42
  onKeyDown = noopFn.noopFn,
43
43
  invalid = false,
44
44
  invalidText = '',
45
- helperText = '',
45
+ helperText,
46
46
  light,
47
47
  placeholder = '',
48
48
  enableCounter = false,
@@ -243,7 +243,7 @@ const TextArea = frFn((props, forwardRef) => {
243
243
  ariaDescribedBy = warnId;
244
244
  } else {
245
245
  const ids = [];
246
- if (!isFluid && helperText && helperId) ids.push(helperId);
246
+ if (!isFluid && hasHelper && helperId) ids.push(helperId);
247
247
  if (counterDescriptionId) ids.push(counterDescriptionId);
248
248
  ariaDescribedBy = ids.length > 0 ? ids.join(' ') : undefined;
249
249
  }
@@ -282,7 +282,7 @@ const TextArea = frFn((props, forwardRef) => {
282
282
  }, [ariaAnnouncement, prevAnnouncement, counterMode]);
283
283
  const input = /*#__PURE__*/React.createElement("textarea", _rollupPluginBabelHelpers.extends({}, other, textareaProps, {
284
284
  placeholder: placeholder,
285
- "aria-readonly": Boolean(other.readOnly),
285
+ "aria-readonly": other.readOnly,
286
286
  className: textareaClasses,
287
287
  "aria-invalid": invalid,
288
288
  "aria-describedby": ariaDescribedBy,
@@ -328,8 +328,7 @@ const TextArea = frFn((props, forwardRef) => {
328
328
  TextArea.displayName = 'TextArea';
329
329
  TextArea.propTypes = {
330
330
  /**
331
- * Provide a custom className that is applied directly to the underlying
332
- * `<textarea>` node
331
+ * Provide a custom className that is applied to the wrapper node
333
332
  */
334
333
  className: PropTypes.string,
335
334
  /**
@@ -31,7 +31,7 @@ const ControlledPasswordInput = /*#__PURE__*/React.forwardRef(({
31
31
  hideLabel,
32
32
  invalid = false,
33
33
  invalidText = '',
34
- helperText = '',
34
+ helperText,
35
35
  light,
36
36
  type = 'password',
37
37
  togglePasswordVisibility,
@@ -1,10 +1,10 @@
1
1
  /**
2
- * Copyright IBM Corp. 2016, 2025
2
+ * Copyright IBM Corp. 2016, 2026
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.
6
6
  */
7
- import React from 'react';
7
+ import React, { type SelectHTMLAttributes } from 'react';
8
8
  export type TimePickerSelectProps = {
9
9
  /**
10
10
  * Provide the contents of your TimePickerSelect
@@ -17,7 +17,7 @@ export type TimePickerSelectProps = {
17
17
  /**
18
18
  * Optionally provide the default value of the `<select>`
19
19
  */
20
- defaultValue?: any;
20
+ defaultValue?: SelectHTMLAttributes<HTMLSelectElement>['defaultValue'];
21
21
  /**
22
22
  * Specify whether the control is disabled
23
23
  */
@@ -39,7 +39,7 @@ declare const TimePickerSelect: React.ForwardRefExoticComponent<{
39
39
  /**
40
40
  * Optionally provide the default value of the `<select>`
41
41
  */
42
- defaultValue?: any;
42
+ defaultValue?: SelectHTMLAttributes<HTMLSelectElement>["defaultValue"];
43
43
  /**
44
44
  * Specify whether the control is disabled
45
45
  */
@@ -138,8 +138,7 @@ function Toggletip({
138
138
  const eventType = 'PointerEvent' in window ? 'pointerdown' : 'mousedown';
139
139
  const handleOutsideClick = event => {
140
140
  const node = event.target;
141
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- https://github.com/carbon-design-system/carbon/issues/20452
142
- if (open && node && !ref.current.contains(node)) {
141
+ if (open && node && !ref.current?.contains(node)) {
143
142
  setOpen(false);
144
143
  }
145
144
  };
@@ -245,7 +245,7 @@ const TreeNode = /*#__PURE__*/React.forwardRef(({
245
245
  return node;
246
246
  }
247
247
  if (node.classList.contains(`${prefix}--tree-node-link-parent`)) {
248
- return node.firstChild;
248
+ return node.firstElementChild;
249
249
  }
250
250
  if (node.classList.contains(`${prefix}--tree`)) {
251
251
  return null;
@@ -267,7 +267,7 @@ const TreeNode = /*#__PURE__*/React.forwardRef(({
267
267
  * When focus is on a leaf node or a closed parent node, move focus to
268
268
  * its parent node (unless its depth is level 1)
269
269
  */
270
- const parentNode = findParentTreeNode(href ? currentNode.current?.parentElement?.parentElement : currentNode.current?.parentElement);
270
+ const parentNode = findParentTreeNode((href ? currentNode.current?.parentElement?.parentElement : currentNode.current?.parentElement) ?? null);
271
271
  if (parentNode instanceof HTMLElement) {
272
272
  parentNode.focus();
273
273
  }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright IBM Corp. 2016, 2025
2
+ * Copyright IBM Corp. 2016, 2026
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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright IBM Corp. 2016, 2025
2
+ * Copyright IBM Corp. 2016, 2026
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.
@@ -63,8 +63,10 @@ const HeaderPanel = /*#__PURE__*/React.forwardRef(({
63
63
  };
64
64
  }
65
65
  useEvent.useWindowEvent('click', event => {
66
- const target = event.target;
67
- if (!(target instanceof HTMLElement)) return;
66
+ const {
67
+ target
68
+ } = event;
69
+ if (!(target instanceof Element)) return;
68
70
  setLastClickedElement(target);
69
71
  const isChildASwitcher = /*#__PURE__*/React.isValidElement(children) && typeof children.type !== 'string' && children.type === Switcher.default;
70
72
  if (isChildASwitcher && !target.closest(`.${prefix}--header-panel--expanded`) && !target.closest(`.${prefix}--header__action`) && !headerPanelReference?.current?.classList.contains(`${prefix}--switcher`) && expanded) {
@@ -24,7 +24,7 @@ var useDelayedState = require('../../internal/useDelayedState.js');
24
24
  var layout = require('@carbon/layout');
25
25
  var useMatchMedia = require('../../internal/useMatchMedia.js');
26
26
 
27
- // TO-DO: comment back in when footer is added for rails
27
+ // TODO: comment back in when footer is added for rails
28
28
  // import SideNavFooter from './SideNavFooter';
29
29
 
30
30
  const SideNavContext = /*#__PURE__*/React.createContext({});
@@ -39,7 +39,7 @@ const SideNav = frFn((props, ref) => {
39
39
  children,
40
40
  onToggle,
41
41
  className: customClassName,
42
- // TO-DO: comment back in when footer is added for rails
42
+ // TODO: comment back in when footer is added for rails
43
43
  // translateById: t = (id) => translations[id],
44
44
  href,
45
45
  isFixedNav = false,
@@ -77,7 +77,7 @@ const SideNav = frFn((props, ref) => {
77
77
  'aria-labelledby': ariaLabelledBy
78
78
  };
79
79
 
80
- // TO-DO: comment back in when footer is added for rails
80
+ // TODO: comment back in when footer is added for rails
81
81
  // const assistiveText = expanded
82
82
  // ? t('carbon.sidenav.state.open')
83
83
  // : t('carbon.sidenav.state.closed');
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright IBM Corp. 2016, 2025
2
+ * Copyright IBM Corp. 2016, 2026
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.
@@ -65,7 +65,7 @@ const Switcher = /*#__PURE__*/React.forwardRef((props, forwardRef) => {
65
65
  }
66
66
  })();
67
67
  const switcherItem = switcherRef.current?.children[nextValidIndex]?.children[0];
68
- if (switcherItem) {
68
+ if (switcherItem instanceof HTMLElement) {
69
69
  switcherItem.focus();
70
70
  }
71
71
  };
@@ -7,28 +7,9 @@
7
7
 
8
8
  'use strict';
9
9
 
10
- var FeatureFlags = require('@carbon/feature-flags');
10
+ var featureFlags = require('@carbon/feature-flags');
11
11
 
12
- function _interopNamespaceDefault(e) {
13
- var n = Object.create(null);
14
- if (e) {
15
- Object.keys(e).forEach(function (k) {
16
- if (k !== 'default') {
17
- var d = Object.getOwnPropertyDescriptor(e, k);
18
- Object.defineProperty(n, k, d.get ? d : {
19
- enumerable: true,
20
- get: function () { return e[k]; }
21
- });
22
- }
23
- });
24
- }
25
- n.default = e;
26
- return Object.freeze(n);
27
- }
28
-
29
- var FeatureFlags__namespace = /*#__PURE__*/_interopNamespaceDefault(FeatureFlags);
30
-
31
- FeatureFlags__namespace.merge({
12
+ featureFlags.merge({
32
13
  'enable-css-custom-properties': true,
33
14
  'enable-css-grid': true,
34
15
  'enable-v11-release': true,
@@ -8,7 +8,7 @@
8
8
  'use strict';
9
9
 
10
10
  var React = require('react');
11
- var FeatureFlags = require('@carbon/feature-flags');
11
+ var featureFlags = require('@carbon/feature-flags');
12
12
  var ReactDOM = require('react-dom');
13
13
  var keys = require('./keyboard/keys.js');
14
14
  var match = require('./keyboard/match.js');
@@ -18,25 +18,6 @@ var usePrefix = require('./usePrefix.js');
18
18
  var warning = require('./warning.js');
19
19
  var wrapFocus = require('./wrapFocus.js');
20
20
 
21
- function _interopNamespaceDefault(e) {
22
- var n = Object.create(null);
23
- if (e) {
24
- Object.keys(e).forEach(function (k) {
25
- if (k !== 'default') {
26
- var d = Object.getOwnPropertyDescriptor(e, k);
27
- Object.defineProperty(n, k, d.get ? d : {
28
- enumerable: true,
29
- get: function () { return e[k]; }
30
- });
31
- }
32
- });
33
- }
34
- n.default = e;
35
- return Object.freeze(n);
36
- }
37
-
38
- var FeatureFlags__namespace = /*#__PURE__*/_interopNamespaceDefault(FeatureFlags);
39
-
40
21
  const DIRECTION_LEFT = 'left';
41
22
  const DIRECTION_TOP = 'top';
42
23
  const DIRECTION_RIGHT = 'right';
@@ -295,8 +276,8 @@ const FloatingMenu = ({
295
276
  });
296
277
  }
297
278
  };
298
- const deprecatedFlag = FeatureFlags__namespace.enabled('enable-experimental-focus-wrap-without-sentinels');
299
- const focusTrapWithoutSentinelsFlag = FeatureFlags__namespace.enabled('enable-focus-wrap-without-sentinels');
279
+ const deprecatedFlag = featureFlags.enabled('enable-experimental-focus-wrap-without-sentinels');
280
+ const focusTrapWithoutSentinelsFlag = featureFlags.enabled('enable-focus-wrap-without-sentinels');
300
281
  const focusTrapWithoutSentinels = deprecatedFlag || focusTrapWithoutSentinelsFlag;
301
282
  if (typeof document !== 'undefined') {
302
283
  const portalTarget = target ? target() : document.body;
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.101.0",
4
+ "version": "1.102.0-rc.0",
5
5
  "license": "Apache-2.0",
6
6
  "main": "lib/index.js",
7
7
  "types": "lib/index.d.ts",
@@ -52,10 +52,10 @@
52
52
  },
53
53
  "dependencies": {
54
54
  "@babel/runtime": "^7.27.3",
55
- "@carbon/feature-flags": "1.0.0",
56
- "@carbon/icons-react": "^11.75.0",
55
+ "@carbon/feature-flags": "^1.0.0",
56
+ "@carbon/icons-react": "^11.76.0-rc.0",
57
57
  "@carbon/layout": "^11.48.0",
58
- "@carbon/styles": "^1.100.0",
58
+ "@carbon/styles": "^1.101.0-rc.0",
59
59
  "@carbon/utilities": "^0.16.0",
60
60
  "@floating-ui/react": "^0.27.4",
61
61
  "@ibm/telemetry-js": "^1.5.0",
@@ -79,8 +79,8 @@
79
79
  "@babel/preset-react": "^7.27.1",
80
80
  "@babel/preset-typescript": "^7.27.1",
81
81
  "@carbon/test-utils": "^10.40.0",
82
- "@carbon/themes": "^11.68.0",
83
- "@figma/code-connect": "^1.3.5",
82
+ "@carbon/themes": "^11.69.0-rc.0",
83
+ "@figma/code-connect": "^1.3.13",
84
84
  "@rollup/plugin-babel": "^6.0.0",
85
85
  "@rollup/plugin-commonjs": "^28.0.3",
86
86
  "@rollup/plugin-node-resolve": "^16.0.1",
@@ -131,5 +131,5 @@
131
131
  "**/*.scss",
132
132
  "**/*.css"
133
133
  ],
134
- "gitHead": "6dde90f9edfb378e1585f1954c92484a37f22f02"
134
+ "gitHead": "be65faf18c90ab4e6e60afdfad77d412220bd077"
135
135
  }
package/telemetry.yml CHANGED
@@ -305,7 +305,6 @@ collect:
305
305
  - onAnimationEnd
306
306
  # DataTableSkeleton
307
307
  - columnCount
308
- - compact
309
308
  - showHeader
310
309
  - showToolbar
311
310
  - zebra