@carbon/react 1.106.0-rc.0 → 1.107.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 (155) hide show
  1. package/.playwright/INTERNAL_AVT_REPORT_DO_NOT_USE.json +1006 -971
  2. package/es/components/Accordion/AccordionItem.d.ts +2 -2
  3. package/es/components/Button/Button.js +1 -1
  4. package/es/components/Checkbox/Checkbox.js +2 -1
  5. package/es/components/CheckboxGroup/CheckboxGroup.js +2 -1
  6. package/es/components/ComboBox/ComboBox.d.ts +1 -1
  7. package/es/components/ComboBox/ComboBox.js +1 -1
  8. package/es/components/ContentSwitcher/ContentSwitcher.d.ts +1 -1
  9. package/es/components/ContentSwitcher/ContentSwitcher.js +24 -15
  10. package/es/components/DataTable/DataTable.d.ts +3 -3
  11. package/es/components/DataTable/TableActionList.d.ts +1 -1
  12. package/es/components/DataTable/TableHead.d.ts +1 -1
  13. package/es/components/DataTable/TableSlugRow.d.ts +2 -2
  14. package/es/components/DataTable/TableSlugRow.js +8 -11
  15. package/es/components/DataTable/TableToolbarContent.d.ts +1 -1
  16. package/es/components/DataTable/TableToolbarSearch.d.ts +5 -1
  17. package/es/components/DatePicker/DatePicker.js +15 -13
  18. package/es/components/DatePicker/plugins/fixEventsPlugin.js +2 -3
  19. package/es/components/DatePickerInput/DatePickerInput.js +9 -2
  20. package/es/components/Dropdown/Dropdown.d.ts +1 -1
  21. package/es/components/FluidTimePicker/FluidTimePicker.d.ts +1 -1
  22. package/es/components/FluidTimePicker/FluidTimePicker.js +6 -4
  23. package/es/components/FluidTimePickerSelect/FluidTimePickerSelect.d.ts +4 -0
  24. package/es/components/FluidTimePickerSelect/FluidTimePickerSelect.js +2 -1
  25. package/es/components/FluidTimePickerSelect/index.js +18 -0
  26. package/es/components/Grid/CSSGrid.js +11 -6
  27. package/es/components/Grid/Column.d.ts +2 -2
  28. package/es/components/Grid/ColumnHang.d.ts +3 -3
  29. package/es/components/Grid/ColumnHang.js +1 -1
  30. package/es/components/Grid/FlexGrid.js +5 -3
  31. package/es/components/Grid/Grid.js +2 -1
  32. package/es/components/Grid/GridTypes.d.ts +5 -0
  33. package/es/components/Grid/Row.d.ts +3 -3
  34. package/es/components/Grid/Row.js +1 -1
  35. package/es/components/Menu/Menu.js +1 -1
  36. package/es/components/Menu/MenuItem.js +4 -0
  37. package/es/components/Modal/Modal.js +3 -0
  38. package/es/components/MultiSelect/FilterableMultiSelect.d.ts +1 -1
  39. package/es/components/MultiSelect/FilterableMultiSelect.js +3 -2
  40. package/es/components/MultiSelect/MultiSelect.d.ts +1 -1
  41. package/es/components/OverflowMenu/OverflowMenu.js +11 -12
  42. package/es/components/Pagination/Pagination.d.ts +1 -1
  43. package/es/components/Pagination/Pagination.js +2 -0
  44. package/es/components/Popover/index.js +14 -1
  45. package/es/components/RadioButtonGroup/RadioButtonGroup.d.ts +1 -1
  46. package/es/components/RadioButtonGroup/RadioButtonGroup.js +8 -6
  47. package/es/components/Search/Search.Skeleton.d.ts +12 -3
  48. package/es/components/Search/Search.Skeleton.js +16 -8
  49. package/es/components/Search/Search.d.ts +1 -1
  50. package/es/components/Search/Search.js +4 -4
  51. package/es/components/Select/Select.d.ts +1 -1
  52. package/es/components/Select/Select.js +7 -6
  53. package/es/components/Slider/Slider.js +46 -62
  54. package/es/components/Tabs/Tabs.js +2 -2
  55. package/es/components/TextArea/TextArea.js +5 -2
  56. package/es/components/TextInput/ControlledPasswordInput.js +2 -1
  57. package/es/components/TextInput/PasswordInput.d.ts +2 -2
  58. package/es/components/TextInput/PasswordInput.js +33 -21
  59. package/es/components/TextInput/TextInput.Skeleton.d.ts +10 -2
  60. package/es/components/TextInput/TextInput.Skeleton.js +10 -4
  61. package/es/components/TextInput/TextInput.d.ts +1 -1
  62. package/es/components/TextInput/TextInput.js +39 -30
  63. package/es/components/TextInput/util.d.ts +1 -0
  64. package/es/components/TextInput/util.js +1 -1
  65. package/es/components/Theme/index.d.ts +2 -2
  66. package/es/components/Theme/index.js +3 -3
  67. package/es/components/TimePicker/TimePicker.js +5 -2
  68. package/es/components/TreeView/TreeNode.js +2 -2
  69. package/es/components/UIShell/HeaderGlobalBar.d.ts +1 -1
  70. package/es/components/UIShell/HeaderMenu.d.ts +1 -1
  71. package/es/components/UIShell/HeaderMenu.js +5 -3
  72. package/es/index.js +2 -2
  73. package/es/internal/FloatingMenu.d.ts +5 -1
  74. package/es/internal/hasHelperText.d.ts +8 -0
  75. package/es/internal/hasHelperText.js +11 -0
  76. package/es/tools/wrapComponent.d.ts +3 -3
  77. package/es/tools/wrapComponent.js +1 -1
  78. package/lib/components/Accordion/AccordionItem.d.ts +2 -2
  79. package/lib/components/Button/Button.js +1 -1
  80. package/lib/components/Checkbox/Checkbox.js +2 -1
  81. package/lib/components/CheckboxGroup/CheckboxGroup.js +2 -1
  82. package/lib/components/ComboBox/ComboBox.d.ts +1 -1
  83. package/lib/components/ComboBox/ComboBox.js +1 -1
  84. package/lib/components/ContentSwitcher/ContentSwitcher.d.ts +1 -1
  85. package/lib/components/ContentSwitcher/ContentSwitcher.js +22 -13
  86. package/lib/components/DataTable/DataTable.d.ts +3 -3
  87. package/lib/components/DataTable/TableActionList.d.ts +1 -1
  88. package/lib/components/DataTable/TableHead.d.ts +1 -1
  89. package/lib/components/DataTable/TableSlugRow.d.ts +2 -2
  90. package/lib/components/DataTable/TableSlugRow.js +7 -10
  91. package/lib/components/DataTable/TableToolbarContent.d.ts +1 -1
  92. package/lib/components/DataTable/TableToolbarSearch.d.ts +5 -1
  93. package/lib/components/DatePicker/DatePicker.js +15 -13
  94. package/lib/components/DatePicker/plugins/fixEventsPlugin.js +1 -2
  95. package/lib/components/DatePickerInput/DatePickerInput.js +9 -2
  96. package/lib/components/Dropdown/Dropdown.d.ts +1 -1
  97. package/lib/components/FluidTimePicker/FluidTimePicker.d.ts +1 -1
  98. package/lib/components/FluidTimePicker/FluidTimePicker.js +5 -3
  99. package/lib/components/FluidTimePickerSelect/FluidTimePickerSelect.d.ts +4 -0
  100. package/lib/components/FluidTimePickerSelect/FluidTimePickerSelect.js +2 -1
  101. package/lib/components/FluidTimePickerSelect/index.js +17 -0
  102. package/lib/components/Grid/CSSGrid.js +11 -6
  103. package/lib/components/Grid/Column.d.ts +2 -2
  104. package/lib/components/Grid/ColumnHang.d.ts +3 -3
  105. package/lib/components/Grid/ColumnHang.js +1 -1
  106. package/lib/components/Grid/FlexGrid.js +5 -3
  107. package/lib/components/Grid/Grid.js +2 -1
  108. package/lib/components/Grid/GridTypes.d.ts +5 -0
  109. package/lib/components/Grid/Row.d.ts +3 -3
  110. package/lib/components/Grid/Row.js +1 -1
  111. package/lib/components/Menu/Menu.js +1 -1
  112. package/lib/components/Menu/MenuItem.js +4 -0
  113. package/lib/components/Modal/Modal.js +3 -0
  114. package/lib/components/MultiSelect/FilterableMultiSelect.d.ts +1 -1
  115. package/lib/components/MultiSelect/FilterableMultiSelect.js +3 -2
  116. package/lib/components/MultiSelect/MultiSelect.d.ts +1 -1
  117. package/lib/components/OverflowMenu/OverflowMenu.js +10 -11
  118. package/lib/components/Pagination/Pagination.d.ts +1 -1
  119. package/lib/components/Pagination/Pagination.js +2 -0
  120. package/lib/components/Popover/index.js +14 -1
  121. package/lib/components/RadioButtonGroup/RadioButtonGroup.d.ts +1 -1
  122. package/lib/components/RadioButtonGroup/RadioButtonGroup.js +7 -5
  123. package/lib/components/Search/Search.Skeleton.d.ts +12 -3
  124. package/lib/components/Search/Search.Skeleton.js +15 -7
  125. package/lib/components/Search/Search.d.ts +1 -1
  126. package/lib/components/Search/Search.js +4 -4
  127. package/lib/components/Select/Select.d.ts +1 -1
  128. package/lib/components/Select/Select.js +7 -6
  129. package/lib/components/Slider/Slider.js +46 -62
  130. package/lib/components/Tabs/Tabs.js +2 -2
  131. package/lib/components/TextArea/TextArea.js +5 -2
  132. package/lib/components/TextInput/ControlledPasswordInput.js +2 -1
  133. package/lib/components/TextInput/PasswordInput.d.ts +2 -2
  134. package/lib/components/TextInput/PasswordInput.js +33 -21
  135. package/lib/components/TextInput/TextInput.Skeleton.d.ts +10 -2
  136. package/lib/components/TextInput/TextInput.Skeleton.js +10 -4
  137. package/lib/components/TextInput/TextInput.d.ts +1 -1
  138. package/lib/components/TextInput/TextInput.js +39 -30
  139. package/lib/components/TextInput/util.d.ts +1 -0
  140. package/lib/components/TextInput/util.js +1 -1
  141. package/lib/components/Theme/index.d.ts +2 -2
  142. package/lib/components/Theme/index.js +2 -2
  143. package/lib/components/TimePicker/TimePicker.js +5 -2
  144. package/lib/components/TreeView/TreeNode.js +1 -1
  145. package/lib/components/UIShell/HeaderGlobalBar.d.ts +1 -1
  146. package/lib/components/UIShell/HeaderMenu.d.ts +1 -1
  147. package/lib/components/UIShell/HeaderMenu.js +5 -3
  148. package/lib/index.js +2 -2
  149. package/lib/internal/FloatingMenu.d.ts +5 -1
  150. package/lib/internal/hasHelperText.d.ts +8 -0
  151. package/lib/internal/hasHelperText.js +11 -0
  152. package/lib/tools/wrapComponent.d.ts +3 -3
  153. package/lib/tools/wrapComponent.js +1 -1
  154. package/package.json +8 -8
  155. package/telemetry.yml +1 -0
@@ -13,7 +13,7 @@ declare const translationIds: {
13
13
  readonly 'carbon.table.toolbar.search.placeholder': "carbon.table.toolbar.search.placeholder";
14
14
  };
15
15
  type TranslationKey = keyof typeof translationIds;
16
- type ExcludedInheritedProps = 'defaultValue' | 'labelText' | 'onBlur' | 'onChange' | 'onExpand' | 'onFocus' | 'tabIndex';
16
+ type ExcludedInheritedProps = 'defaultValue' | 'labelText' | 'onBlur' | 'onChange' | 'onExpand' | 'onFocus' | 'tabIndex' | 'size';
17
17
  export type TableToolbarSearchHandleExpand = (event: FocusEvent<HTMLInputElement>, newValue?: boolean) => void;
18
18
  /**
19
19
  * @deprecated Passing `''` as the event sentinel is legacy compatibility
@@ -69,6 +69,10 @@ export interface TableToolbarSearchProps extends Omit<SearchProps, ExcludedInher
69
69
  * Provide an optional className for the overall container of the Search
70
70
  */
71
71
  searchContainerClass?: string;
72
+ /**
73
+ * Specify the size of the Search
74
+ */
75
+ size?: 'sm' | 'md' | 'lg';
72
76
  tabIndex?: number | string;
73
77
  }
74
78
  declare const TableToolbarSearch: {
@@ -45,6 +45,7 @@ function initializeWeekdayShorthand() {
45
45
  });
46
46
  }
47
47
  const forEach = Array.prototype.forEach;
48
+ const defaultAriaDateFormat = "l, F j, Y";
48
49
  /**
49
50
  * @param {number} monthNumber The month number.
50
51
  * @param {boolean} shorthand `true` to use shorthand month.
@@ -170,7 +171,6 @@ const DatePicker = (0, react.forwardRef)((props, ref) => {
170
171
  const lastFocusedField = (0, react.useRef)(null);
171
172
  const savedOnChange = require_useSavedCallback.useSavedCallback(onChange);
172
173
  const savedOnOpen = require_useSavedCallback.useSavedCallback(onOpen);
173
- const effectiveWarn = warn && !invalid;
174
174
  const wrapperRef = (0, react.useRef)(null);
175
175
  const datePickerClasses = (0, classnames.default)(`${prefix}--date-picker`, {
176
176
  [`${prefix}--date-picker--short`]: short,
@@ -182,31 +182,35 @@ const DatePicker = (0, react.forwardRef)((props, ref) => {
182
182
  });
183
183
  const wrapperClasses = (0, classnames.default)(`${prefix}--form-item`, { [String(className)]: className });
184
184
  const childrenWithProps = react.default.Children.toArray(children).map((child, index) => {
185
+ const childInvalid = child.props?.invalid;
186
+ const childWarn = child.props?.warn;
187
+ const mergedInvalid = invalid ?? childInvalid;
188
+ const mergedWarn = mergedInvalid ? false : warn ?? childWarn;
185
189
  if (index === 0 && require_utils.isComponentElement(child, require_index.default)) return react.default.cloneElement(child, {
186
190
  datePickerType,
187
191
  ref: startInputField,
188
192
  readOnly,
189
- invalid,
190
- warn: effectiveWarn
193
+ invalid: mergedInvalid,
194
+ warn: mergedWarn
191
195
  });
192
196
  if (index === 1 && require_utils.isComponentElement(child, require_index.default)) return react.default.cloneElement(child, {
193
197
  datePickerType,
194
198
  ref: endInputField,
195
199
  readOnly,
196
- invalid,
197
- warn: effectiveWarn
200
+ invalid: mergedInvalid,
201
+ warn: mergedWarn
198
202
  });
199
203
  if (index === 0) return react.default.cloneElement(child, {
200
204
  ref: startInputField,
201
205
  readOnly,
202
- invalid,
203
- warn: effectiveWarn
206
+ invalid: mergedInvalid,
207
+ warn: mergedWarn
204
208
  });
205
209
  if (index === 1) return react.default.cloneElement(child, {
206
210
  ref: endInputField,
207
211
  readOnly,
208
- invalid,
209
- warn: effectiveWarn
212
+ invalid: mergedInvalid,
213
+ warn: mergedWarn
210
214
  });
211
215
  });
212
216
  (0, react.useEffect)(() => {
@@ -261,6 +265,7 @@ const DatePicker = (0, react.forwardRef)((props, ref) => {
261
265
  inline: inline ?? false,
262
266
  onClose: onCalendarClose,
263
267
  disableMobile: true,
268
+ ariaDateFormat: defaultAriaDateFormat,
264
269
  defaultDate: value,
265
270
  closeOnSelect,
266
271
  mode: datePickerType,
@@ -345,7 +350,6 @@ const DatePicker = (0, react.forwardRef)((props, ref) => {
345
350
  const { target } = event;
346
351
  if (target === start) lastStartValue.current = start.value;
347
352
  if (start.value !== "") return;
348
- if (!calendar.selectedDates) return;
349
353
  if (calendar.selectedDates.length === 0) return;
350
354
  }
351
355
  function handleKeyPress(event) {
@@ -427,9 +431,7 @@ const DatePicker = (0, react.forwardRef)((props, ref) => {
427
431
  }, [value, startInputField]);
428
432
  (0, react.useEffect)(() => {
429
433
  if (calendarRef.current?.set) {
430
- if (value !== void 0) if (value === "" || value === null || Array.isArray(value) && (value.length === 0 || value.every(require_utils$1.isEmptyDateValue))) {
431
- if (calendarRef.current.selectedDates.length > 0) calendarRef.current.clear();
432
- } else calendarRef.current.setDate(value);
434
+ if (!require_utils$1.isEmptyDateValue(value) && (!Array.isArray(value) || value.length > 0 && !value.every(require_utils$1.isEmptyDateValue))) calendarRef.current.setDate(value);
433
435
  updateClassNames(calendarRef.current, prefix);
434
436
  } else if (!calendarRef.current && typeof value !== "undefined" && value !== null) startInputField.current.value = value;
435
437
  }, [
@@ -52,8 +52,7 @@ const fixEventsPlugin = (config) => (fp) => {
52
52
  if (inputTo === target && fp.config.closeOnSelect) requestAnimationFrame(() => {
53
53
  fp.close();
54
54
  });
55
- } else if (require_match.match(event, require_keys.ArrowLeft) || require_match.match(event, require_keys.ArrowRight)) event.stopPropagation();
56
- else if (require_match.match(event, require_keys.ArrowDown)) {
55
+ } else if (require_match.match(event, require_keys.ArrowDown)) {
57
56
  event.preventDefault();
58
57
  fp.open();
59
58
  } else if (!fp.config.allowInput) {
@@ -84,15 +84,22 @@ const DatePickerInput = (0, react.forwardRef)((props, ref) => {
84
84
  [`${prefix}--date-picker--fluid--warn`]: isFluid && normalizedProps.warn
85
85
  });
86
86
  const datePickerInputHelperId = !helperText ? void 0 : `datepicker-input-helper-text-${datePickerInputInstanceId}`;
87
+ let ariaDescribedBy;
88
+ if (normalizedProps.invalid) ariaDescribedBy = normalizedProps.invalidId;
89
+ else if (normalizedProps.warn) ariaDescribedBy = normalizedProps.warnId;
90
+ else ariaDescribedBy = helperText ? datePickerInputHelperId : void 0;
87
91
  const inputProps = {
88
92
  ...rest,
89
93
  ...datePickerInputProps,
90
94
  className: inputClasses,
91
95
  disabled: normalizedProps.disabled,
92
96
  ref,
93
- ["aria-describedby"]: helperText ? datePickerInputHelperId : void 0
97
+ ["aria-describedby"]: ariaDescribedBy
94
98
  };
95
- if (normalizedProps.invalid) inputProps["data-invalid"] = true;
99
+ if (normalizedProps.invalid) {
100
+ inputProps["data-invalid"] = true;
101
+ inputProps["aria-invalid"] = true;
102
+ }
96
103
  const input = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", { ...inputProps });
97
104
  const candidate = slug ?? decorator;
98
105
  const normalizedDecorator = require_utils.isComponentElement(candidate, require_index.AILabel) ? (0, react.cloneElement)(candidate, { size: "mini" }) : candidate;
@@ -152,7 +152,7 @@ export type DropdownTranslationKey = ListBoxMenuIconTranslationKey;
152
152
  interface DropdownComponent {
153
153
  <ItemType>(props: DropdownProps<ItemType> & {
154
154
  ref?: Ref<HTMLButtonElement>;
155
- }): React.ReactElement<any> | null;
155
+ }): React.ReactElement | null;
156
156
  }
157
157
  declare const _default: DropdownComponent;
158
158
  export default _default;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright IBM Corp. 2022
2
+ * Copyright IBM Corp. 2022, 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.
@@ -7,7 +7,9 @@
7
7
 
8
8
  const require_runtime = require("../../_virtual/_rolldown/runtime.js");
9
9
  const require_usePrefix = require("../../internal/usePrefix.js");
10
+ const require_utils = require("../../internal/utils.js");
10
11
  const require_index = require("../FluidTextInput/index.js");
12
+ const require_index$1 = require("../FluidTimePickerSelect/index.js");
11
13
  let classnames = require("classnames");
12
14
  classnames = require_runtime.__toESM(classnames);
13
15
  let react = require("react");
@@ -18,7 +20,7 @@ let react_jsx_runtime = require("react/jsx-runtime");
18
20
  let _carbon_icons_react = require("@carbon/icons-react");
19
21
  //#region src/components/FluidTimePicker/FluidTimePicker.tsx
20
22
  /**
21
- * Copyright IBM Corp. 2022
23
+ * Copyright IBM Corp. 2022, 2026
22
24
  *
23
25
  * This source code is licensed under the Apache-2.0 license found in the
24
26
  * LICENSE file in the root directory of this source tree.
@@ -38,8 +40,8 @@ const FluidTimePicker = react.default.forwardRef(({ className, children, disable
38
40
  };
39
41
  const error = invalid || warn;
40
42
  const childrenWithProps = () => {
41
- if (disabled) return react.default.Children.toArray(children).map((child) => react.default.cloneElement(child, { disabled: true }));
42
- if (readOnly) return react.default.Children.toArray(children).map((child) => react.default.cloneElement(child, { readOnly: true }));
43
+ if (disabled) return react.default.Children.toArray(children).map((child) => require_utils.isComponentElement(child, require_index$1.default) ? (0, react.cloneElement)(child, { disabled: true }) : child);
44
+ if (readOnly) return react.default.Children.toArray(children).map((child) => require_utils.isComponentElement(child, require_index$1.default) ? (0, react.cloneElement)(child, { readOnly: true }) : child);
43
45
  return children;
44
46
  };
45
47
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
@@ -36,6 +36,10 @@ export interface FluidTimePickerSelectProps {
36
36
  * the underlying `<input>` changes
37
37
  */
38
38
  onChange?: React.ChangeEventHandler<HTMLSelectElement>;
39
+ /**
40
+ * Whether the component is read-only.
41
+ */
42
+ readOnly?: boolean;
39
43
  }
40
44
  declare const FluidTimePickerSelect: React.ForwardRefExoticComponent<FluidTimePickerSelectProps & React.RefAttributes<HTMLSelectElement>>;
41
45
  export default FluidTimePickerSelect;
@@ -34,7 +34,8 @@ FluidTimePickerSelect.propTypes = {
34
34
  disabled: prop_types.default.bool,
35
35
  id: prop_types.default.string.isRequired,
36
36
  labelText: prop_types.default.node,
37
- onChange: prop_types.default.func
37
+ onChange: prop_types.default.func,
38
+ readOnly: prop_types.default.bool
38
39
  };
39
40
  //#endregion
40
41
  exports.default = FluidTimePickerSelect;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Copyright IBM Corp. 2016, 2026
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
+
8
+ //#region src/components/FluidTimePickerSelect/index.tsx
9
+ /**
10
+ * Copyright IBM Corp. 2022
11
+ *
12
+ * This source code is licensed under the Apache-2.0 license found in the
13
+ * LICENSE file in the root directory of this source tree.
14
+ */
15
+ var FluidTimePickerSelect_default = require("./FluidTimePickerSelect.js").default;
16
+ //#endregion
17
+ exports.default = FluidTimePickerSelect_default;
@@ -22,7 +22,7 @@ let react_jsx_runtime = require("react/jsx-runtime");
22
22
  * This source code is licensed under the Apache-2.0 license found in the
23
23
  * LICENSE file in the root directory of this source tree.
24
24
  */
25
- const CSSGrid = react.default.forwardRef(({ align, as, children, className: customClassName, condensed = false, fullWidth = false, narrow = false, ...rest }, ref) => {
25
+ const CSSGrid = react.default.forwardRef(({ align, as, children, className: customClassName, condensed = false, fullWidth = false, narrow = false, withRowGap, ...rest }, ref) => {
26
26
  const prefix = require_usePrefix.usePrefix();
27
27
  const { subgrid } = require_GridContext.useGridSettings();
28
28
  let mode = "wide";
@@ -36,6 +36,7 @@ const CSSGrid = react.default.forwardRef(({ align, as, children, className: cust
36
36
  as,
37
37
  className: customClassName,
38
38
  mode,
39
+ withRowGap,
39
40
  ...rest,
40
41
  children
41
42
  })
@@ -46,7 +47,8 @@ const CSSGrid = react.default.forwardRef(({ align, as, children, className: cust
46
47
  [`${prefix}--css-grid--narrow`]: mode === "narrow",
47
48
  [`${prefix}--css-grid--full-width`]: fullWidth,
48
49
  [`${prefix}--css-grid--start`]: align === "start",
49
- [`${prefix}--css-grid--end`]: align === "end"
50
+ [`${prefix}--css-grid--end`]: align === "end",
51
+ [`${prefix}--css-grid--with-row-gap`]: withRowGap
50
52
  });
51
53
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_GridContext.GridSettings, {
52
54
  mode: "css-grid",
@@ -70,15 +72,17 @@ CSSGrid.propTypes = {
70
72
  className: prop_types.default.string,
71
73
  condensed: prop_types.default.bool,
72
74
  fullWidth: prop_types.default.bool,
73
- narrow: prop_types.default.bool
75
+ narrow: prop_types.default.bool,
76
+ withRowGap: prop_types.default.bool
74
77
  };
75
- const Subgrid = react.default.forwardRef(({ as, className: customClassName, children, mode, ...rest }, ref) => {
78
+ const Subgrid = react.default.forwardRef(({ as, className: customClassName, children, mode, withRowGap, ...rest }, ref) => {
76
79
  const prefix = require_usePrefix.usePrefix();
77
80
  const className = (0, classnames.default)(customClassName, {
78
81
  [`${prefix}--subgrid`]: true,
79
82
  [`${prefix}--subgrid--condensed`]: mode === "condensed",
80
83
  [`${prefix}--subgrid--narrow`]: mode === "narrow",
81
- [`${prefix}--subgrid--wide`]: mode === "wide"
84
+ [`${prefix}--subgrid--wide`]: mode === "wide",
85
+ [`${prefix}--subgrid--with-row-gap`]: withRowGap
82
86
  });
83
87
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(as || "div", {
84
88
  ...rest,
@@ -95,7 +99,8 @@ Subgrid.propTypes = {
95
99
  "wide",
96
100
  "narrow",
97
101
  "condensed"
98
- ])
102
+ ]),
103
+ withRowGap: prop_types.default.bool
99
104
  };
100
105
  const CSSGridComponent = CSSGrid;
101
106
  //#endregion
@@ -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 from 'react';
7
+ import React, { type ReactElement } from 'react';
8
8
  import { PolymorphicComponentPropWithRef } from '../../internal/PolymorphicProps';
9
9
  type ColumnSpanPercent = '25%' | '50%' | '75%' | '100%';
10
10
  type ColumnSpanSimple = boolean | number | ColumnSpanPercent;
@@ -67,7 +67,7 @@ export interface ColumnBaseProps {
67
67
  }
68
68
  export type ColumnProps<T extends React.ElementType> = PolymorphicComponentPropWithRef<T, ColumnBaseProps>;
69
69
  export interface ColumnComponent {
70
- <T extends React.ElementType>(props: ColumnProps<T>, context?: any): React.ReactElement<any, any> | null;
70
+ <T extends React.ElementType>(props: ColumnProps<T>, context?: any): ReactElement | null;
71
71
  }
72
72
  declare const _default: ColumnComponent;
73
73
  export default _default;
@@ -1,10 +1,10 @@
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
- import React from 'react';
7
+ import React, { type ReactElement } from 'react';
8
8
  import { PolymorphicProps } from '../../types/common';
9
9
  interface ColumnHangBaseProps {
10
10
  /**
@@ -18,7 +18,7 @@ interface ColumnHangBaseProps {
18
18
  }
19
19
  export type ColumnHangProps<T extends React.ElementType> = PolymorphicProps<T, ColumnHangBaseProps>;
20
20
  export interface ColumnHangComponent {
21
- <T extends React.ElementType>(props: ColumnHangProps<T>, context?: any): React.ReactElement<any, any> | null;
21
+ <T extends React.ElementType>(props: ColumnHangProps<T>, context?: any): ReactElement | null;
22
22
  }
23
23
  declare const ColumnHangComponent: ColumnHangComponent;
24
24
  export { ColumnHangComponent as ColumnHang };
@@ -16,7 +16,7 @@ prop_types = require_runtime.__toESM(prop_types);
16
16
  let react_jsx_runtime = require("react/jsx-runtime");
17
17
  //#region src/components/Grid/ColumnHang.tsx
18
18
  /**
19
- * Copyright IBM Corp. 2016, 2023
19
+ * Copyright IBM Corp. 2016, 2026
20
20
  *
21
21
  * This source code is licensed under the Apache-2.0 license found in the
22
22
  * LICENSE file in the root directory of this source tree.
@@ -22,13 +22,14 @@ let react_jsx_runtime = require("react/jsx-runtime");
22
22
  * This source code is licensed under the Apache-2.0 license found in the
23
23
  * LICENSE file in the root directory of this source tree.
24
24
  */
25
- const FlexGrid = react.default.forwardRef(({ as, condensed = false, narrow = false, fullWidth = false, className: containerClassName, children, ...rest }, ref) => {
25
+ const FlexGrid = react.default.forwardRef(({ as, condensed = false, narrow = false, fullWidth = false, withRowGap = false, className: containerClassName, children, ...rest }, ref) => {
26
26
  const prefix = require_usePrefix.usePrefix();
27
27
  const className = (0, classnames.default)(containerClassName, {
28
28
  [`${prefix}--grid`]: true,
29
29
  [`${prefix}--grid--condensed`]: condensed,
30
30
  [`${prefix}--grid--narrow`]: narrow,
31
- [`${prefix}--grid--full-width`]: fullWidth
31
+ [`${prefix}--grid--full-width`]: fullWidth,
32
+ [`${prefix}--grid--with-row-gap`]: withRowGap
32
33
  });
33
34
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_GridContext.GridSettings, {
34
35
  mode: "flexbox",
@@ -47,7 +48,8 @@ FlexGrid.propTypes = {
47
48
  className: prop_types.default.string,
48
49
  condensed: prop_types.default.bool,
49
50
  fullWidth: prop_types.default.bool,
50
- narrow: prop_types.default.bool
51
+ narrow: prop_types.default.bool,
52
+ withRowGap: prop_types.default.bool
51
53
  };
52
54
  const FlexGridComponent = FlexGrid;
53
55
  //#endregion
@@ -36,7 +36,8 @@ Grid.propTypes = {
36
36
  className: prop_types.default.string,
37
37
  condensed: prop_types.default.bool,
38
38
  fullWidth: prop_types.default.bool,
39
- narrow: prop_types.default.bool
39
+ narrow: prop_types.default.bool,
40
+ withRowGap: prop_types.default.bool
40
41
  };
41
42
  const GridAsGridComponent = Grid;
42
43
  //#endregion
@@ -33,6 +33,11 @@ export interface GridBaseProps {
33
33
  * typographic alignment with and without containers.
34
34
  */
35
35
  narrow?: boolean;
36
+ /**
37
+ * Add a row gap to the grid that matches the current gutter size.
38
+ * This is useful when you want consistent vertical spacing between rows.
39
+ */
40
+ withRowGap?: boolean;
36
41
  }
37
42
  export type GridProps<T extends React.ElementType> = PolymorphicComponentPropWithRef<T, GridBaseProps>;
38
43
  export interface GridComponent {
@@ -1,10 +1,10 @@
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
- import React from 'react';
7
+ import React, { type ReactElement } from 'react';
8
8
  import { PolymorphicProps } from '../../types/common';
9
9
  export interface RowBaseProps {
10
10
  /**
@@ -28,7 +28,7 @@ export interface RowBaseProps {
28
28
  }
29
29
  export type RowProps<T extends React.ElementType> = PolymorphicProps<T, RowBaseProps>;
30
30
  export interface RowComponent {
31
- <T extends React.ElementType>(props: RowProps<T>, context?: any): React.ReactElement<any, any> | null;
31
+ <T extends React.ElementType>(props: RowProps<T>, context?: any): ReactElement | null;
32
32
  }
33
33
  declare const _default: RowComponent;
34
34
  export default _default;
@@ -16,7 +16,7 @@ prop_types = require_runtime.__toESM(prop_types);
16
16
  let react_jsx_runtime = require("react/jsx-runtime");
17
17
  //#region src/components/Grid/Row.tsx
18
18
  /**
19
- * Copyright IBM Corp. 2016, 2023
19
+ * Copyright IBM Corp. 2016, 2026
20
20
  *
21
21
  * This source code is licensed under the Apache-2.0 license found in the
22
22
  * LICENSE file in the root directory of this source tree.
@@ -112,7 +112,7 @@ const Menu = (0, react.forwardRef)(function Menu({ backgroundToken = "layer", bo
112
112
  }
113
113
  }
114
114
  function handleBlur(e) {
115
- if (open && onClose && isRoot && e.relatedTarget && !menu.current?.contains(e.relatedTarget)) handleClose();
115
+ if (open && onClose && isRoot && !menu.current?.contains(e.relatedTarget)) handleClose();
116
116
  }
117
117
  function fitValue(range, axis) {
118
118
  if (!menu.current) return;
@@ -88,6 +88,9 @@ const MenuItem = (0, react.forwardRef)(function MenuItem({ children, className,
88
88
  }
89
89
  const pendingKeyboardClick = (0, react.useRef)(false);
90
90
  const keyboardClickEvent = (e) => require_match.match(e, require_keys.Enter) || require_match.match(e, require_keys.Space);
91
+ function handleMouseDown(e) {
92
+ if (isDisabled) e.preventDefault();
93
+ }
91
94
  function handleKeyDown(e) {
92
95
  if (hasChildren && require_match.match(e, require_keys.ArrowRight)) {
93
96
  openSubmenu();
@@ -142,6 +145,7 @@ const MenuItem = (0, react.forwardRef)(function MenuItem({ children, className,
142
145
  "aria-disabled": isDisabled ?? void 0,
143
146
  "aria-haspopup": hasChildren ?? void 0,
144
147
  "aria-expanded": hasChildren ? submenuOpen : void 0,
148
+ onMouseDown: handleMouseDown,
145
149
  onClick: handleClick,
146
150
  onKeyDown: handleKeyDown,
147
151
  onKeyUp: handleKeyUp,
@@ -140,6 +140,9 @@ const ModalDialog = react.default.forwardRef(function ModalDialog({ "aria-label"
140
140
  }
141
141
  const modalContent = document.querySelector(`.${prefix}--modal-content`);
142
142
  if (!modalContent || !modalContent.classList.contains(`${prefix}--modal-scroll-content`) || !currentActiveNode || !modalContent.contains(currentActiveNode)) return;
143
+ const modalRect = modalContent.getBoundingClientRect();
144
+ const elementRect = currentActiveNode.getBoundingClientRect();
145
+ if (elementRect.top >= modalRect.top && elementRect.bottom <= modalRect.bottom) return;
143
146
  currentActiveNode.scrollIntoView({ block: "center" });
144
147
  }
145
148
  const onSecondaryButtonClick = onSecondarySubmit ? onSecondarySubmit : onRequestClose;
@@ -195,7 +195,7 @@ export interface FilterableMultiSelectProps<ItemType> extends MultiSelectSorting
195
195
  inputProps?: React.InputHTMLAttributes<HTMLInputElement>;
196
196
  }
197
197
  export declare const FilterableMultiSelect: {
198
- <ItemType>(props: FilterableMultiSelectProps<ItemType>): ReactElement<any>;
198
+ <ItemType>(props: FilterableMultiSelectProps<ItemType>): ReactElement;
199
199
  propTypes?: any;
200
200
  contextTypes?: any;
201
201
  defaultProps?: any;
@@ -14,6 +14,7 @@ const require_useId = require("../../internal/useId.js");
14
14
  const require_deprecate = require("../../prop-types/deprecate.js");
15
15
  const require_defaultItemToString = require("../../internal/defaultItemToString.js");
16
16
  const require_utils = require("../../internal/utils.js");
17
+ const require_hasHelperText = require("../../internal/hasHelperText.js");
17
18
  const require_useNormalizedInputProps = require("../../internal/useNormalizedInputProps.js");
18
19
  const require_index = require("../AILabel/index.js");
19
20
  const require_index$1 = require("../Checkbox/index.js");
@@ -181,7 +182,7 @@ const FilterableMultiSelect = (0, react.forwardRef)(function FilterableMultiSele
181
182
  [`${prefix}--list-box__wrapper--decorator`]: decorator,
182
183
  [`${prefix}--autoalign`]: autoAlign
183
184
  });
184
- const hasHelper = typeof helperText !== "undefined" && helperText !== null;
185
+ const hasHelper = require_hasHelperText.hasHelperText(helperText);
185
186
  const helperId = !hasHelper ? void 0 : `filterablemultiselect-helper-text-${filterableMultiSelectInstanceId}`;
186
187
  const labelId = `${id}-label`;
187
188
  const titleClasses = (0, classnames.default)({
@@ -400,7 +401,7 @@ const FilterableMultiSelect = (0, react.forwardRef)(function FilterableMultiSele
400
401
  });
401
402
  const inputProp = getInputProps(getDropdownProps({
402
403
  "aria-controls": isOpen ? menuId : void 0,
403
- "aria-describedby": helperText && showHelperText ? helperId : void 0,
404
+ "aria-describedby": hasHelper && showHelperText ? helperId : void 0,
404
405
  "aria-haspopup": "listbox",
405
406
  "aria-labelledby": void 0,
406
407
  disabled,
@@ -178,6 +178,6 @@ type MultiSelectComponentProps<ItemType> = React.PropsWithChildren<MultiSelectPr
178
178
  interface MultiSelectComponent {
179
179
  propTypes: Record<string, any>;
180
180
  displayName: string;
181
- <ItemType>(props: MultiSelectComponentProps<ItemType>): React.ReactElement<any> | null;
181
+ <ItemType>(props: MultiSelectComponentProps<ItemType>): React.ReactElement | null;
182
182
  }
183
183
  export {};
@@ -13,9 +13,11 @@ const require_setupGetInstanceId = require("../../tools/setupGetInstanceId.js");
13
13
  const require_noopFn = require("../../internal/noopFn.js");
14
14
  const require_deprecate = require("../../prop-types/deprecate.js");
15
15
  const require_deprecateValuesWithin = require("../../prop-types/deprecateValuesWithin.js");
16
+ const require_utils = require("../../internal/utils.js");
16
17
  const require_mapPopoverAlign = require("../../tools/mapPopoverAlign.js");
17
18
  const require_index = require("../IconButton/index.js");
18
19
  const require_mergeRefs = require("../../tools/mergeRefs.js");
20
+ const require_OverflowMenuItem = require("../OverflowMenuItem/OverflowMenuItem.js");
19
21
  const require_FloatingMenu = require("../../internal/FloatingMenu.js");
20
22
  const require_useOutsideClick = require("../../internal/useOutsideClick.js");
21
23
  let classnames = require("classnames");
@@ -227,17 +229,14 @@ const OverflowMenu = (0, react.forwardRef)(({ align, ["aria-label"]: ariaLabel =
227
229
  });
228
230
  const overflowMenuIconClasses = (0, classnames.default)(`${prefix}--overflow-menu__icon`, iconClass);
229
231
  const childrenWithProps = react.Children.toArray(children).map((child, index) => {
230
- if ((0, react.isValidElement)(child)) {
231
- const childElement = child;
232
- return (0, react.cloneElement)(childElement, {
233
- closeMenu: childElement.props.closeMenu || closeMenuAndFocus,
234
- handleOverflowMenuItemFocus,
235
- ref: (el) => {
236
- menuItemRefs.current[index] = el;
237
- },
238
- index
239
- });
240
- }
232
+ if (require_utils.isComponentElement(child, require_OverflowMenuItem.default)) return (0, react.cloneElement)(child, {
233
+ closeMenu: child.props.closeMenu || closeMenuAndFocus,
234
+ handleOverflowMenuItemFocus,
235
+ ref: (el) => {
236
+ menuItemRefs.current[index] = el;
237
+ },
238
+ index
239
+ });
241
240
  return null;
242
241
  });
243
242
  const wrappedMenuBody = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_FloatingMenu.FloatingMenu, {
@@ -96,7 +96,7 @@ export interface PaginationProps extends Omit<React.HTMLAttributes<HTMLDivElemen
96
96
  /**
97
97
  * Specify the size of the Pagination.
98
98
  */
99
- size?: 'sm' | 'md' | 'lg';
99
+ size?: 'xs' | 'sm' | 'md' | 'lg';
100
100
  /**
101
101
  * The total number of items.
102
102
  */
@@ -75,6 +75,7 @@ const Pagination = react.default.forwardRef(({ backwardText = "Previous page", c
75
75
  const className = (0, classnames.default)({
76
76
  [`${prefix}--pagination`]: true,
77
77
  [`${prefix}--pagination--${size}`]: size,
78
+ [`${prefix}--layout--size-${size}`]: size,
78
79
  [customClassName]: !!customClassName
79
80
  });
80
81
  const totalPages = totalItems ? Math.max(Math.ceil(totalItems / pageSize), 1) : 1;
@@ -292,6 +293,7 @@ Pagination.propTypes = {
292
293
  pageText: prop_types.default.func,
293
294
  pagesUnknown: prop_types.default.bool,
294
295
  size: prop_types.default.oneOf([
296
+ "xs",
295
297
  "sm",
296
298
  "md",
297
299
  "lg"
@@ -41,6 +41,18 @@ const Popover = react.default.forwardRef(function PopoverRenderFunction({ isTabT
41
41
  const popover = (0, react.useRef)(null);
42
42
  const enableFloatingStyles = require_index.useFeatureFlag("enable-v12-dynamic-floating-styles") || autoAlign;
43
43
  const lastClickWasInsidePopoverContent = (0, react.useRef)(false);
44
+ const isTargetInDatePickerInsidePopover = (target) => {
45
+ if (!popover.current) return false;
46
+ const calendar = target instanceof Element && target.closest(".flatpickr-calendar");
47
+ if (!calendar) return false;
48
+ const inputs = popover.current.querySelectorAll("input");
49
+ for (const input of inputs) {
50
+ if (!("_flatpickr" in input)) continue;
51
+ const fp = input._flatpickr;
52
+ if (fp && typeof fp === "object" && "calendarContainer" in fp && fp.calendarContainer === calendar) return true;
53
+ }
54
+ return false;
55
+ };
44
56
  let align = require_mapPopoverAlign.mapPopoverAlign(initialAlign);
45
57
  require_useEvent.useEvent(popover, "mousedown", (event) => {
46
58
  const target = event.target;
@@ -58,13 +70,14 @@ const Popover = react.default.forwardRef(function PopoverRenderFunction({ isTabT
58
70
  }
59
71
  onRequestClose?.();
60
72
  } else if (relatedTarget && !popover.current?.contains(relatedTarget)) {
73
+ if (isTargetInDatePickerInsidePopover(relatedTarget)) return;
61
74
  const isOutsideFloating = enableFloatingStyles && refs.floating.current ? !refs.floating.current.contains(relatedTarget) : true;
62
75
  const isFocusableWrapper = relatedTarget && popover.current && relatedTarget.contains(popover.current);
63
76
  if (isOutsideFloating && !isFocusableWrapper) onRequestClose?.();
64
77
  }
65
78
  });
66
79
  require_useEvent.useWindowEvent("click", ({ target }) => {
67
- if (open && target instanceof Node && !popover.current?.contains(target)) onRequestClose?.();
80
+ if (open && target instanceof Node && !popover.current?.contains(target) && !isTargetInDatePickerInsidePopover(target)) onRequestClose?.();
68
81
  });
69
82
  const popoverDimensions = (0, react.useRef)({
70
83
  offset: 10,
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
  import React, { type ReactNode } from 'react';
8
- import type { RadioButtonProps } from '../RadioButton';
8
+ import { type RadioButtonProps } from '../RadioButton';
9
9
  export declare const RadioButtonGroupContext: React.Context<null>;
10
10
  type ExcludedAttributes = 'onChange';
11
11
  export interface RadioButtonGroupProps extends Omit<React.InputHTMLAttributes<HTMLFieldSetElement>, ExcludedAttributes> {