@carbon/ibm-products 2.32.0 → 2.34.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (178) hide show
  1. package/css/index-full-carbon.css +351 -3
  2. package/css/index-full-carbon.css.map +1 -1
  3. package/css/index-full-carbon.min.css +1 -1
  4. package/css/index-full-carbon.min.css.map +1 -1
  5. package/css/index-without-carbon.css +351 -3
  6. package/css/index-without-carbon.css.map +1 -1
  7. package/css/index-without-carbon.min.css +1 -1
  8. package/css/index-without-carbon.min.css.map +1 -1
  9. package/css/index.css +351 -3
  10. package/css/index.css.map +1 -1
  11. package/css/index.min.css +1 -1
  12. package/css/index.min.css.map +1 -1
  13. package/es/components/ActionBar/ActionBar.js +8 -1
  14. package/es/components/CreateSidePanel/CreateSidePanel.d.ts +81 -2
  15. package/es/components/CreateSidePanel/CreateSidePanel.js +5 -2
  16. package/es/components/CreateTearsheet/CreateTearsheetDivider.d.ts +12 -1
  17. package/es/components/CreateTearsheet/CreateTearsheetDivider.js +1 -1
  18. package/es/components/DataSpreadsheet/DataSpreadsheet.js +39 -145
  19. package/es/components/DataSpreadsheet/DataSpreadsheetBody.js +60 -112
  20. package/es/components/DataSpreadsheet/hooks/useMoveActiveCell.d.ts +3 -1
  21. package/es/components/DataSpreadsheet/hooks/useMoveActiveCell.js +10 -3
  22. package/es/components/DataSpreadsheet/utils/commonEventHandlers.d.ts +4 -0
  23. package/es/components/DataSpreadsheet/utils/commonEventHandlers.js +304 -0
  24. package/es/components/Datagrid/Datagrid/DatagridContent.js +2 -1
  25. package/es/components/Datagrid/Datagrid/DatagridEmptyBody.js +4 -1
  26. package/es/components/Datagrid/Datagrid/DatagridRefBody.js +3 -1
  27. package/es/components/Datagrid/Datagrid/DatagridSimpleBody.js +4 -1
  28. package/es/components/Datagrid/Datagrid/DatagridVirtualBody.js +6 -2
  29. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.d.ts +1 -1
  30. package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +4 -0
  31. package/es/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.d.ts +2 -1
  32. package/es/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.js +4 -3
  33. package/es/components/Datagrid/Datagrid/addons/RowSize/RowSizeRadioGroup.js +5 -5
  34. package/es/components/Datagrid/useRowSize.js +4 -2
  35. package/es/components/DescriptionList/DescriptionList.d.ts +0 -37
  36. package/es/components/DescriptionList/DescriptionList.js +7 -12
  37. package/es/components/DescriptionList/DescriptionListBody.d.ts +2 -0
  38. package/es/components/DescriptionList/DescriptionListBody.js +39 -0
  39. package/es/components/DescriptionList/DescriptionListCell.d.ts +2 -0
  40. package/es/components/DescriptionList/DescriptionListCell.js +39 -0
  41. package/es/components/DescriptionList/DescriptionListRow.d.ts +2 -0
  42. package/es/components/DescriptionList/DescriptionListRow.js +41 -0
  43. package/es/components/DescriptionList/index.d.ts +4 -1
  44. package/es/components/EditSidePanel/EditSidePanel.d.ts +92 -2
  45. package/es/components/EditSidePanel/EditSidePanel.js +8 -10
  46. package/es/components/FilterPanel/FilterPanel.d.ts +5 -0
  47. package/es/components/FilterPanel/FilterPanel.js +55 -0
  48. package/es/components/FilterPanel/FilterPanelAccordion/FilterPanelAccordion.d.ts +5 -0
  49. package/es/components/FilterPanel/FilterPanelAccordion/FilterPanelAccordion.js +83 -0
  50. package/es/components/FilterPanel/FilterPanelAccordionItem/FilterPanelAccordionItem.d.ts +5 -0
  51. package/es/components/FilterPanel/FilterPanelAccordionItem/FilterPanelAccordionItem.js +94 -0
  52. package/es/components/FilterPanel/FilterPanelCheckbox/FilterPanelCheckbox.d.ts +5 -0
  53. package/es/components/FilterPanel/FilterPanelCheckbox/FilterPanelCheckbox.js +80 -0
  54. package/es/components/FilterPanel/FilterPanelCheckbox/index.d.ts +1 -0
  55. package/es/components/FilterPanel/FilterPanelCheckboxWithOverflow/FilterPanelCheckboxWithOverflow.d.ts +10 -0
  56. package/es/components/FilterPanel/FilterPanelCheckboxWithOverflow/FilterPanelCheckboxWithOverflow.js +157 -0
  57. package/es/components/FilterPanel/FilterPanelGroup/FilterPanelGroup.d.ts +5 -0
  58. package/es/components/FilterPanel/FilterPanelGroup/FilterPanelGroup.js +72 -0
  59. package/es/components/FilterPanel/FilterPanelLabel/FilterPanelLabel.d.ts +5 -0
  60. package/es/components/FilterPanel/FilterPanelLabel/FilterPanelLabel.js +63 -0
  61. package/es/components/FilterPanel/FilterPanelLabel/index.d.ts +1 -0
  62. package/es/components/FilterPanel/index.d.ts +7 -0
  63. package/es/components/OptionsTile/OptionsTile.d.ts +77 -3
  64. package/es/components/OptionsTile/OptionsTile.js +9 -20
  65. package/es/components/RemoveModal/RemoveModal.d.ts +81 -7
  66. package/es/components/RemoveModal/RemoveModal.js +1 -0
  67. package/es/components/ScrollGradient/ScrollGradient.d.ts +5 -0
  68. package/es/components/ScrollGradient/ScrollGradient.js +156 -0
  69. package/es/components/ScrollGradient/constants.d.ts +15 -0
  70. package/es/components/ScrollGradient/constants.js +121 -0
  71. package/es/components/ScrollGradient/index.d.ts +1 -0
  72. package/es/components/SidePanel/SidePanel.d.ts +144 -2
  73. package/es/components/SidePanel/SidePanel.js +88 -112
  74. package/es/components/StatusIcon/StatusIcon.d.ts +34 -2
  75. package/es/components/StatusIcon/StatusIcon.js +97 -95
  76. package/es/components/Tearsheet/TearsheetShell.js +9 -1
  77. package/es/components/Toolbar/ToolbarGroup.d.ts +17 -2
  78. package/es/components/Toolbar/ToolbarGroup.js +0 -1
  79. package/es/components/TruncatedList/TruncatedList.js +5 -3
  80. package/es/components/UserAvatar/UserAvatar.js +3 -2
  81. package/es/components/index.d.ts +4 -1
  82. package/es/global/js/hooks/useFocus.js +9 -2
  83. package/es/global/js/package-settings.d.ts +12 -0
  84. package/es/global/js/package-settings.js +12 -0
  85. package/es/index.js +12 -0
  86. package/es/settings.d.ts +12 -0
  87. package/lib/components/ActionBar/ActionBar.js +11 -6
  88. package/lib/components/CreateSidePanel/CreateSidePanel.d.ts +81 -2
  89. package/lib/components/CreateSidePanel/CreateSidePanel.js +5 -2
  90. package/lib/components/CreateTearsheet/CreateTearsheetDivider.d.ts +12 -1
  91. package/lib/components/CreateTearsheet/CreateTearsheetDivider.js +1 -1
  92. package/lib/components/DataSpreadsheet/DataSpreadsheet.js +39 -145
  93. package/lib/components/DataSpreadsheet/DataSpreadsheetBody.js +60 -112
  94. package/lib/components/DataSpreadsheet/hooks/useMoveActiveCell.d.ts +3 -1
  95. package/lib/components/DataSpreadsheet/hooks/useMoveActiveCell.js +9 -2
  96. package/lib/components/DataSpreadsheet/utils/commonEventHandlers.d.ts +4 -0
  97. package/lib/components/DataSpreadsheet/utils/commonEventHandlers.js +311 -0
  98. package/lib/components/Datagrid/Datagrid/DatagridContent.js +2 -1
  99. package/lib/components/Datagrid/Datagrid/DatagridEmptyBody.js +4 -1
  100. package/lib/components/Datagrid/Datagrid/DatagridRefBody.js +3 -1
  101. package/lib/components/Datagrid/Datagrid/DatagridSimpleBody.js +4 -1
  102. package/lib/components/Datagrid/Datagrid/DatagridVirtualBody.js +5 -1
  103. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.d.ts +1 -1
  104. package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +4 -0
  105. package/lib/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.d.ts +2 -1
  106. package/lib/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.js +4 -3
  107. package/lib/components/Datagrid/Datagrid/addons/RowSize/RowSizeRadioGroup.js +5 -5
  108. package/lib/components/Datagrid/useRowSize.js +4 -2
  109. package/lib/components/DescriptionList/DescriptionList.d.ts +0 -37
  110. package/lib/components/DescriptionList/DescriptionList.js +6 -11
  111. package/lib/components/DescriptionList/DescriptionListBody.d.ts +2 -0
  112. package/lib/components/DescriptionList/DescriptionListBody.js +46 -0
  113. package/lib/components/DescriptionList/DescriptionListCell.d.ts +2 -0
  114. package/lib/components/DescriptionList/DescriptionListCell.js +46 -0
  115. package/lib/components/DescriptionList/DescriptionListRow.d.ts +2 -0
  116. package/lib/components/DescriptionList/DescriptionListRow.js +48 -0
  117. package/lib/components/DescriptionList/index.d.ts +4 -1
  118. package/lib/components/EditSidePanel/EditSidePanel.d.ts +92 -2
  119. package/lib/components/EditSidePanel/EditSidePanel.js +8 -10
  120. package/lib/components/FilterPanel/FilterPanel.d.ts +5 -0
  121. package/lib/components/FilterPanel/FilterPanel.js +62 -0
  122. package/lib/components/FilterPanel/FilterPanelAccordion/FilterPanelAccordion.d.ts +5 -0
  123. package/lib/components/FilterPanel/FilterPanelAccordion/FilterPanelAccordion.js +90 -0
  124. package/lib/components/FilterPanel/FilterPanelAccordionItem/FilterPanelAccordionItem.d.ts +5 -0
  125. package/lib/components/FilterPanel/FilterPanelAccordionItem/FilterPanelAccordionItem.js +101 -0
  126. package/lib/components/FilterPanel/FilterPanelCheckbox/FilterPanelCheckbox.d.ts +5 -0
  127. package/lib/components/FilterPanel/FilterPanelCheckbox/FilterPanelCheckbox.js +87 -0
  128. package/lib/components/FilterPanel/FilterPanelCheckbox/index.d.ts +1 -0
  129. package/lib/components/FilterPanel/FilterPanelCheckboxWithOverflow/FilterPanelCheckboxWithOverflow.d.ts +10 -0
  130. package/lib/components/FilterPanel/FilterPanelCheckboxWithOverflow/FilterPanelCheckboxWithOverflow.js +164 -0
  131. package/lib/components/FilterPanel/FilterPanelGroup/FilterPanelGroup.d.ts +5 -0
  132. package/lib/components/FilterPanel/FilterPanelGroup/FilterPanelGroup.js +79 -0
  133. package/lib/components/FilterPanel/FilterPanelLabel/FilterPanelLabel.d.ts +5 -0
  134. package/lib/components/FilterPanel/FilterPanelLabel/FilterPanelLabel.js +70 -0
  135. package/lib/components/FilterPanel/FilterPanelLabel/index.d.ts +1 -0
  136. package/lib/components/FilterPanel/index.d.ts +7 -0
  137. package/lib/components/OptionsTile/OptionsTile.d.ts +77 -3
  138. package/lib/components/OptionsTile/OptionsTile.js +9 -20
  139. package/lib/components/RemoveModal/RemoveModal.d.ts +81 -7
  140. package/lib/components/RemoveModal/RemoveModal.js +1 -0
  141. package/lib/components/ScrollGradient/ScrollGradient.d.ts +5 -0
  142. package/lib/components/ScrollGradient/ScrollGradient.js +163 -0
  143. package/lib/components/ScrollGradient/constants.d.ts +15 -0
  144. package/lib/components/ScrollGradient/constants.js +128 -0
  145. package/lib/components/ScrollGradient/index.d.ts +1 -0
  146. package/lib/components/SidePanel/SidePanel.d.ts +144 -2
  147. package/lib/components/SidePanel/SidePanel.js +88 -112
  148. package/lib/components/StatusIcon/StatusIcon.d.ts +34 -2
  149. package/lib/components/StatusIcon/StatusIcon.js +97 -95
  150. package/lib/components/Tearsheet/TearsheetShell.js +9 -1
  151. package/lib/components/Toolbar/ToolbarGroup.d.ts +17 -2
  152. package/lib/components/Toolbar/ToolbarGroup.js +0 -1
  153. package/lib/components/TruncatedList/TruncatedList.js +5 -3
  154. package/lib/components/UserAvatar/UserAvatar.js +3 -2
  155. package/lib/components/index.d.ts +4 -1
  156. package/lib/global/js/hooks/useFocus.js +9 -2
  157. package/lib/global/js/package-settings.d.ts +12 -0
  158. package/lib/global/js/package-settings.js +12 -0
  159. package/lib/index.js +60 -0
  160. package/lib/settings.d.ts +12 -0
  161. package/package.json +3 -3
  162. package/scss/components/FilterPanel/_carbon-imports.scss +9 -0
  163. package/scss/components/FilterPanel/_filter-panel-accordion-item.scss +56 -0
  164. package/scss/components/FilterPanel/_filter-panel-accordion.scss +6 -0
  165. package/scss/components/FilterPanel/_filter-panel-checkbox-with-overflow.scss +62 -0
  166. package/scss/components/FilterPanel/_filter-panel-checkbox.scss +54 -0
  167. package/scss/components/FilterPanel/_filter-panel-group.scss +39 -0
  168. package/scss/components/FilterPanel/_filter-panel-label.scss +39 -0
  169. package/scss/components/FilterPanel/_filter-panel.scss +31 -0
  170. package/scss/components/FilterPanel/_index-with-carbon.scss +15 -0
  171. package/scss/components/FilterPanel/_index.scss +14 -0
  172. package/scss/components/ScrollGradient/_carbon-imports.scss +9 -0
  173. package/scss/components/ScrollGradient/_index-with-carbon.scss +9 -0
  174. package/scss/components/ScrollGradient/_index.scss +8 -0
  175. package/scss/components/ScrollGradient/_scroll-gradient.scss +102 -0
  176. package/scss/components/UserAvatar/_user-avatar.scss +37 -4
  177. package/scss/components/_index-with-carbon.scss +2 -0
  178. package/scss/components/_index.scss +2 -0
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- import { objectSpread2 as _objectSpread2 } from '../../../_virtual/_rollupPluginBabelHelpers.js';
8
+ import { extends as _extends, objectSpread2 as _objectSpread2 } from '../../../_virtual/_rollupPluginBabelHelpers.js';
9
9
  import React__default, { useEffect, useRef } from 'react';
10
10
  import { VariableSizeList } from 'react-window';
11
11
  import { TableBody } from '@carbon/react';
@@ -77,7 +77,11 @@ var DatagridVirtualBody = function DatagridVirtualBody(datagridState) {
77
77
  width: (_gridRef$current = gridRef.current) === null || _gridRef$current === void 0 ? void 0 : _gridRef$current.clientWidth,
78
78
  overflow: 'hidden'
79
79
  }
80
- }, /*#__PURE__*/React__default.createElement(DatagridHead, datagridState)), /*#__PURE__*/React__default.createElement(TableBody, getTableBodyProps(), /*#__PURE__*/React__default.createElement(VariableSizeList, {
80
+ }, /*#__PURE__*/React__default.createElement(DatagridHead, datagridState)), /*#__PURE__*/React__default.createElement(TableBody, _extends({}, getTableBodyProps({
81
+ role: undefined
82
+ }), {
83
+ "aria-live": null
84
+ }), /*#__PURE__*/React__default.createElement(VariableSizeList, {
81
85
  height: virtualHeight || tableHeight,
82
86
  itemCount: visibleRows.length,
83
87
  itemSize: function itemSize(index) {
@@ -1,5 +1,5 @@
1
1
  export default Columns;
2
- declare function Columns({ getVisibleColumnsCount, filterString, columns, setColumnsObject, onSelectColumn, assistiveTextInstructionsLabel, assistiveTextDisabledInstructionsLabel, selectAllLabel, customizeTearsheetHeadingLabel }: {
2
+ declare function Columns({ getVisibleColumnsCount, filterString, columns, setColumnsObject, onSelectColumn, assistiveTextInstructionsLabel, assistiveTextDisabledInstructionsLabel, selectAllLabel, customizeTearsheetHeadingLabel, }: {
3
3
  getVisibleColumnsCount: any;
4
4
  filterString: any;
5
5
  columns: any;
@@ -153,6 +153,10 @@ var InlineEditCell = function InlineEditCell(_ref) {
153
153
  if (type === 'number') {
154
154
  numberInputRef.current.focus();
155
155
  }
156
+ if (type === 'selection') {
157
+ var _dropdownRef$current;
158
+ dropdownRef === null || dropdownRef === void 0 || (_dropdownRef$current = dropdownRef.current) === null || _dropdownRef$current === void 0 || _dropdownRef$current.focus();
159
+ }
156
160
  }
157
161
  }, [inEditMode, type]);
158
162
 
@@ -1,8 +1,9 @@
1
- export function handleGridKeyPress({ event, dispatch, state, instance, keysPressedList, usingMac, }: {
1
+ export function handleGridKeyPress({ event, dispatch, state, instance, keysPressedList, usingMac, ref, }: {
2
2
  event: any;
3
3
  dispatch: any;
4
4
  state: any;
5
5
  instance: any;
6
6
  keysPressedList: any;
7
7
  usingMac: any;
8
+ ref: any;
8
9
  }): void;
@@ -17,7 +17,8 @@ var handleGridKeyPress = function handleGridKeyPress(_ref) {
17
17
  state = _ref.state,
18
18
  instance = _ref.instance,
19
19
  keysPressedList = _ref.keysPressedList,
20
- usingMac = _ref.usingMac;
20
+ usingMac = _ref.usingMac,
21
+ ref = _ref.ref;
21
22
  var key = event.key;
22
23
  var gridActive = state.gridActive,
23
24
  activeCellId = state.activeCellId,
@@ -54,8 +55,8 @@ var handleGridKeyPress = function handleGridKeyPress(_ref) {
54
55
 
55
56
  // Checks if the dropdown menu is open
56
57
  var dropdownIsActive = function dropdownIsActive() {
57
- var focusedElementRole = document.activeElement.getAttribute('role');
58
- if (focusedElementRole === 'listbox' && document.activeElement.classList.contains("".concat(carbon.prefix, "--list-box__menu"))) {
58
+ var selectedDropdown = ref === null || ref === void 0 ? void 0 : ref.current.querySelector("\n #".concat(instance.tableId, " .").concat(blockClass, "__table-with-inline-edit [data-cell-id=\"").concat(activeCellId, "\"] button[role='combobox']\n "));
59
+ if (selectedDropdown) {
59
60
  // Prevents arrow keys from scrolling any other content when dropdown menu is open
60
61
  event.preventDefault();
61
62
  return true;
@@ -15,7 +15,6 @@ var blockClass = "".concat(pkg.prefix, "--datagrid__row-size");
15
15
  var RowSizeRadioGroup = /*#__PURE__*/forwardRef(function (_ref, ref) {
16
16
  var rowSizes = _ref.rowSizes,
17
17
  selectedOption = _ref.selectedOption,
18
- datagridName = _ref.datagridName,
19
18
  onChange = _ref.onChange,
20
19
  legendText = _ref.legendText,
21
20
  _ref$rowSizeLabels = _ref.rowSizeLabels,
@@ -25,7 +24,8 @@ var RowSizeRadioGroup = /*#__PURE__*/forwardRef(function (_ref, ref) {
25
24
  md: 'Medium',
26
25
  sm: 'Small',
27
26
  xs: 'Extra small'
28
- } : _ref$rowSizeLabels;
27
+ } : _ref$rowSizeLabels,
28
+ tableId = _ref.tableId;
29
29
  return /*#__PURE__*/React__default.createElement("div", {
30
30
  className: "".concat(blockClass, "-dropdown"),
31
31
  role: "presentation",
@@ -48,7 +48,7 @@ var RowSizeRadioGroup = /*#__PURE__*/forwardRef(function (_ref, ref) {
48
48
  key: option.value,
49
49
  labelText: labelText,
50
50
  value: option.value,
51
- id: "".concat(datagridName || 'datagrid', "--row-density--").concat(option.value)
51
+ id: "".concat(tableId || 'datagrid', "--row-density--").concat(option.value)
52
52
  });
53
53
  })));
54
54
  });
@@ -78,12 +78,12 @@ RowSizeRadioGroup.defaultProps = {
78
78
  selectedOption: 'lg'
79
79
  };
80
80
  RowSizeRadioGroup.propTypes = {
81
- datagridName: PropTypes.string,
82
81
  legendText: PropTypes.string,
83
82
  onChange: PropTypes.func.isRequired,
84
83
  rowSizeLabels: PropTypes.object,
85
84
  rowSizes: PropTypes.array.isRequired,
86
- selectedOption: PropTypes.string.isRequired
85
+ selectedOption: PropTypes.string.isRequired,
86
+ tableId: PropTypes.string.isRequired
87
87
  };
88
88
  var RowSizeRadioGroup$1 = RowSizeRadioGroup;
89
89
 
@@ -18,7 +18,8 @@ var useRowSize = function useRowSize(hooks) {
18
18
  var rowSizeProps = instance.rowSizeProps,
19
19
  rowSizes = instance.rowSizes,
20
20
  rowSize = instance.rowSize,
21
- onRowSizeChange = instance.onRowSizeChange;
21
+ onRowSizeChange = instance.onRowSizeChange,
22
+ tableId = instance.tableId;
22
23
  var _ref = rowSizeProps || {},
23
24
  labels = _ref.labels;
24
25
  Object.assign(instance, {
@@ -32,7 +33,8 @@ var useRowSize = function useRowSize(hooks) {
32
33
  if (typeof onRowSizeChange === 'function') {
33
34
  onRowSizeChange(value);
34
35
  }
35
- }
36
+ },
37
+ tableId: tableId
36
38
  }),
37
39
  RowSizeDropdown: RowSizeDropdown
38
40
  });
@@ -2,41 +2,4 @@
2
2
  * Type layouts provide an orderly layout of terms and definitions.
3
3
  */
4
4
  export let DescriptionList: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
5
- export function DescriptionListBody({ children, className, ...rest }: {
6
- [x: string]: any;
7
- children: any;
8
- className: any;
9
- }): import("react/jsx-runtime").JSX.Element;
10
- export namespace DescriptionListBody {
11
- export namespace propTypes {
12
- let children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
13
- let className: PropTypes.Requireable<string>;
14
- }
15
- export { componentNameBody as displayName };
16
- }
17
- export function DescriptionListRow({ children, className, ...other }: {
18
- [x: string]: any;
19
- children: any;
20
- className: any;
21
- }): import("react/jsx-runtime").JSX.Element;
22
- export namespace DescriptionListRow {
23
- export namespace propTypes_1 { }
24
- export { propTypes_1 as propTypes };
25
- export { componentNameRow as displayName };
26
- }
27
- export function DescriptionListCell({ children, className, ...rest }: {
28
- [x: string]: any;
29
- children: any;
30
- className: any;
31
- }): import("react/jsx-runtime").JSX.Element;
32
- export namespace DescriptionListCell {
33
- export namespace propTypes_2 { }
34
- export { propTypes_2 as propTypes };
35
- export { componentNameCell as displayName };
36
- }
37
5
  import React from 'react';
38
- import PropTypes from 'prop-types';
39
- declare const componentNameBody: "DescriptionListBody";
40
- declare const componentNameRow: "DescriptionListRow";
41
- declare const componentNameCell: "DescriptionListCell";
42
- export {};
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- import { objectWithoutProperties as _objectWithoutProperties, extends as _extends, defineProperty as _defineProperty, objectSpread2 as _objectSpread2 } from '../../_virtual/_rollupPluginBabelHelpers.js';
8
+ import { objectWithoutProperties as _objectWithoutProperties, extends as _extends, defineProperty as _defineProperty } from '../../_virtual/_rollupPluginBabelHelpers.js';
9
9
  import React__default from 'react';
10
10
  import PropTypes from '../../node_modules/prop-types/index.js';
11
11
  import cx from 'classnames';
@@ -65,24 +65,19 @@ DescriptionList = pkg.checkComponentEnabled(DescriptionList, componentName);
65
65
  // The display name of the component, used by React. Note that displayName
66
66
  // is used in preference to relying on function.name.
67
67
  DescriptionList.displayName = componentName;
68
- var propTypes = {
69
- /** Provide the contents of the node */
70
- children: PropTypes.node,
71
- /** Provide an optional class to be applied to the containing node */
72
- className: PropTypes.string
73
- };
74
68
 
75
69
  // The types and DocGen commentary for the component props,
76
70
  // in alphabetical order (for consistency).
77
71
  // See https://www.npmjs.com/package/prop-types#usage.
78
- DescriptionList.propTypes = _objectSpread2(_objectSpread2({}, propTypes), {}, {
72
+ DescriptionList.propTypes = {
79
73
  /** Specify if the type layout has a border */
80
74
  border: PropTypes.bool,
75
+ /** Provide the contents of the node */
76
+ children: PropTypes.node,
77
+ /** Provide an optional class to be applied to the containing node */
78
+ className: PropTypes.string,
81
79
  /** Specify the size of the type layout, from a list of available sizes */
82
80
  size: PropTypes.oneOf(Object.values(DescriptionListSize))
83
- });
84
- _objectSpread2({}, propTypes);
85
- _objectSpread2({}, propTypes);
86
- _objectSpread2({}, propTypes);
81
+ };
87
82
 
88
83
  export { DescriptionList };
@@ -0,0 +1,2 @@
1
+ export let DescriptionListBody: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
2
+ import React from 'react';
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Copyright IBM Corp. 2020, 2024
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
+ import { objectWithoutProperties as _objectWithoutProperties, extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
9
+ import React__default from 'react';
10
+ import PropTypes from '../../node_modules/prop-types/index.js';
11
+ import cx from 'classnames';
12
+ import { getDevtoolsProps } from '../../global/js/utils/devtools.js';
13
+ import { pkg } from '../../settings.js';
14
+ import { StructuredListBody } from '@carbon/react';
15
+
16
+ var _excluded = ["children", "className"];
17
+
18
+ // The block part of our conventional BEM class names (blockClass__E--M).
19
+ var blockClass = "".concat(pkg.prefix, "--description-list__body");
20
+ var componentName = 'DescriptionListBody';
21
+ var DescriptionListBody = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
22
+ var children = _ref.children,
23
+ className = _ref.className,
24
+ rest = _objectWithoutProperties(_ref, _excluded);
25
+ return /*#__PURE__*/React__default.createElement(StructuredListBody, _extends({
26
+ className: cx(blockClass, className),
27
+ ref: ref
28
+ }, getDevtoolsProps(componentName), rest), children);
29
+ });
30
+ DescriptionListBody.propTypes = {
31
+ /** Provide the contents of the node */
32
+ children: PropTypes.node,
33
+ /** Provide an optional class to be applied to the containing node */
34
+ className: PropTypes.string
35
+ };
36
+ DescriptionListBody = pkg.checkComponentEnabled(DescriptionListBody, componentName);
37
+ DescriptionListBody.displayName = componentName;
38
+
39
+ export { DescriptionListBody };
@@ -0,0 +1,2 @@
1
+ export let DescriptionListCell: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
2
+ import React from 'react';
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Copyright IBM Corp. 2020, 2024
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
+ import { objectWithoutProperties as _objectWithoutProperties, extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
9
+ import React__default from 'react';
10
+ import PropTypes from '../../node_modules/prop-types/index.js';
11
+ import cx from 'classnames';
12
+ import { getDevtoolsProps } from '../../global/js/utils/devtools.js';
13
+ import { pkg } from '../../settings.js';
14
+ import { StructuredListCell } from '@carbon/react';
15
+
16
+ var _excluded = ["children", "className"];
17
+
18
+ // The block part of our conventional BEM class names (blockClass__E--M).
19
+ var blockClass = "".concat(pkg.prefix, "--description-list__cell");
20
+ var componentName = 'DescriptionListCell';
21
+ var DescriptionListCell = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
22
+ var children = _ref.children,
23
+ className = _ref.className,
24
+ rest = _objectWithoutProperties(_ref, _excluded);
25
+ return /*#__PURE__*/React__default.createElement(StructuredListCell, _extends({
26
+ className: cx(blockClass, className),
27
+ ref: ref
28
+ }, getDevtoolsProps(componentName), rest), children);
29
+ });
30
+ DescriptionListCell.propTypes = {
31
+ /** Provide the contents of the node */
32
+ children: PropTypes.node,
33
+ /** Provide an optional class to be applied to the containing node */
34
+ className: PropTypes.string
35
+ };
36
+ DescriptionListCell = pkg.checkComponentEnabled(DescriptionListCell, componentName);
37
+ DescriptionListCell.displayName = componentName;
38
+
39
+ export { DescriptionListCell };
@@ -0,0 +1,2 @@
1
+ export let DescriptionListRow: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
2
+ import React from 'react';
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Copyright IBM Corp. 2020, 2024
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
+ import { objectWithoutProperties as _objectWithoutProperties, extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
9
+ import React__default from 'react';
10
+ import PropTypes from '../../node_modules/prop-types/index.js';
11
+ import cx from 'classnames';
12
+ import { getDevtoolsProps } from '../../global/js/utils/devtools.js';
13
+ import { pkg } from '../../settings.js';
14
+ import { StructuredListRow } from '@carbon/react';
15
+
16
+ var _excluded = ["children", "className"];
17
+
18
+ // The block part of our conventional BEM class names (blockClass__E--M).
19
+ var blockClass = "".concat(pkg.prefix, "--description-list__row");
20
+ var componentName = 'DescriptionListRow';
21
+ var DescriptionListRow = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
22
+ var children = _ref.children,
23
+ className = _ref.className,
24
+ rest = _objectWithoutProperties(_ref, _excluded);
25
+ return /*#__PURE__*/React__default.createElement(StructuredListRow, _extends({
26
+ className: cx(blockClass, className)
27
+ // role="row"
28
+ ,
29
+ ref: ref
30
+ }, getDevtoolsProps(componentName), rest), children);
31
+ });
32
+ DescriptionListRow.propTypes = {
33
+ /** Provide the contents of the node */
34
+ children: PropTypes.node,
35
+ /** Provide an optional class to be applied to the containing node */
36
+ className: PropTypes.string
37
+ };
38
+ DescriptionListRow = pkg.checkComponentEnabled(DescriptionListRow, componentName);
39
+ DescriptionListRow.displayName = componentName;
40
+
41
+ export { DescriptionListRow };
@@ -1 +1,4 @@
1
- export { DescriptionList, DescriptionListBody, DescriptionListRow, DescriptionListCell } from "./DescriptionList";
1
+ export { DescriptionList } from "./DescriptionList";
2
+ export { DescriptionListBody } from "./DescriptionListBody";
3
+ export { DescriptionListCell } from "./DescriptionListCell";
4
+ export { DescriptionListRow } from "./DescriptionListRow";
@@ -1,5 +1,95 @@
1
+ /**
2
+ * Copyright IBM Corp. 2021, 2021
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ import React, { ReactNode } from 'react';
8
+ import '../../global/js/utils/props-helper';
9
+ interface EditSidePanelProps {
10
+ /**
11
+ * Sets the body content of the create side panel
12
+ */
13
+ children: ReactNode;
14
+ /**
15
+ * Provide an optional class to be applied to the containing node.
16
+ */
17
+ className?: string;
18
+ /**
19
+ * Specifies a boolean for disabling or enabling the primary button. This is important for form validation
20
+ * Returning `true` prevents the primary button from being clicked until required fields are completed.
21
+ */
22
+ disableSubmit?: boolean;
23
+ /**
24
+ * Specifies an optional field that provides a additional context for a form
25
+ */
26
+ formDescription?: ReactNode;
27
+ /**
28
+ * Specifies a required field that provides a title for a form
29
+ */
30
+ formTitle: ReactNode;
31
+ /**
32
+ * Unique identifier
33
+ */
34
+ id?: string;
35
+ /**
36
+ * Specifies an optional handler which is called when the CreateSidePanel
37
+ * is closed.
38
+ */
39
+ onRequestClose?: () => void;
40
+ /**
41
+ * Specifies an optional handler which is called when the CreateSidePanel
42
+ * primary button is pressed.
43
+ */
44
+ onRequestSubmit?: () => void;
45
+ /**
46
+ * Specifies whether the CreateSidePanel is open or not.
47
+ */
48
+ open: boolean;
49
+ /**
50
+ * Determines if the side panel is on the right or left
51
+ */
52
+ placement?: 'left' | 'right';
53
+ /**
54
+ * Specifies the primary button's text in the modal.
55
+ */
56
+ primaryButtonText: string;
57
+ /**
58
+ * Specifies the secondary button's text in the modal.
59
+ */
60
+ secondaryButtonText: string;
61
+ /**
62
+ * This is the selector to the element that contains all of the page content that will shrink if the panel is a slide in.
63
+ * This prop is required when using the `slideIn` variant of the side panel.
64
+ */
65
+ selectorPageContent?: string;
66
+ /**
67
+ * Specifies which DOM element in the form should be focused.
68
+ */
69
+ selectorPrimaryFocus?: string;
70
+ /**
71
+ * Sets the size of the side panel
72
+ */
73
+ size?: 'xs' | 'sm' | 'md' | 'lg' | '2xl';
74
+ /**
75
+ * Specifies which DOM element in the form should be focused.
76
+ */
77
+ slideIn?: boolean;
78
+ /**
79
+ * **Experimental:** Provide a `Slug` component to be rendered inside the `SidePanel` component
80
+ */
81
+ slug?: ReactNode;
82
+ /**
83
+ * The subtitle of the CreateSidePanel is optional and serves to provide more information about the modal.
84
+ */
85
+ subtitle?: ReactNode;
86
+ /**
87
+ * The title of the CreateSidePanel is usually the product or service name.
88
+ */
89
+ title: string;
90
+ }
1
91
  /**
2
92
  * Use with medium complexity edits if the user needs page context.
3
93
  */
4
- export let EditSidePanel: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
5
- import React from 'react';
94
+ export declare let EditSidePanel: React.ForwardRefExoticComponent<EditSidePanelProps & React.RefAttributes<HTMLDivElement>>;
95
+ export {};
@@ -24,12 +24,6 @@ var componentName = 'EditSidePanel';
24
24
 
25
25
  // NOTE: the component SCSS is not imported here: it is rolled up separately.
26
26
 
27
- // Default values for props
28
- var defaults = {
29
- placement: 'right',
30
- size: 'md'
31
- };
32
-
33
27
  /**
34
28
  * Use with medium complexity edits if the user needs page context.
35
29
  */
@@ -44,13 +38,13 @@ var EditSidePanel = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
44
38
  onRequestSubmit = _ref.onRequestSubmit,
45
39
  open = _ref.open,
46
40
  _ref$placement = _ref.placement,
47
- placement = _ref$placement === void 0 ? defaults.placement : _ref$placement,
41
+ placement = _ref$placement === void 0 ? 'right' : _ref$placement,
48
42
  primaryButtonText = _ref.primaryButtonText,
49
43
  secondaryButtonText = _ref.secondaryButtonText,
50
44
  selectorPrimaryFocus = _ref.selectorPrimaryFocus,
51
45
  selectorPageContent = _ref.selectorPageContent,
52
46
  _ref$size = _ref.size,
53
- size = _ref$size === void 0 ? defaults.size : _ref$size,
47
+ size = _ref$size === void 0 ? 'md' : _ref$size,
54
48
  slideIn = _ref.slideIn,
55
49
  subtitle = _ref.subtitle,
56
50
  title = _ref.title,
@@ -59,7 +53,7 @@ var EditSidePanel = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
59
53
  label: primaryButtonText,
60
54
  onClick: function onClick(event) {
61
55
  event.preventDefault();
62
- onRequestSubmit();
56
+ onRequestSubmit && onRequestSubmit();
63
57
  },
64
58
  kind: 'primary',
65
59
  disabled: disableSubmit,
@@ -112,6 +106,7 @@ EditSidePanel.propTypes = {
112
106
  /**
113
107
  * Sets the body content of the create side panel
114
108
  */
109
+ /**@ts-ignore*/
115
110
  children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]).isRequired,
116
111
  /**
117
112
  * Provide an optional class to be applied to the containing node.
@@ -147,7 +142,7 @@ EditSidePanel.propTypes = {
147
142
  /**
148
143
  * Specifies whether the CreateSidePanel is open or not.
149
144
  */
150
- open: PropTypes.bool,
145
+ open: PropTypes.bool.isRequired,
151
146
  /**
152
147
  * Determines if the side panel is on the right or left
153
148
  */
@@ -164,6 +159,7 @@ EditSidePanel.propTypes = {
164
159
  * This is the selector to the element that contains all of the page content that will shrink if the panel is a slide in.
165
160
  * This prop is required when using the `slideIn` variant of the side panel.
166
161
  */
162
+ /**@ts-ignore*/
167
163
  selectorPageContent: PropTypes.string.isRequired.if(function (_ref2) {
168
164
  var slideIn = _ref2.slideIn;
169
165
  return slideIn;
@@ -171,6 +167,7 @@ EditSidePanel.propTypes = {
171
167
  /**
172
168
  * Specifies which DOM element in the form should be focused.
173
169
  */
170
+ /**@ts-ignore*/
174
171
  selectorPrimaryFocus: PropTypes.node.isRequired,
175
172
  /**
176
173
  * Sets the size of the side panel
@@ -191,6 +188,7 @@ EditSidePanel.propTypes = {
191
188
  /**
192
189
  * The title of the CreateSidePanel is usually the product or service name.
193
190
  */
191
+ /**@ts-ignore*/
194
192
  title: PropTypes.node.isRequired
195
193
  };
196
194
 
@@ -0,0 +1,5 @@
1
+ /**
2
+ * The container for filter panel subcomponents.
3
+ */
4
+ export let FilterPanel: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
5
+ import React from 'react';
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Copyright IBM Corp. 2020, 2024
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
+ import { objectWithoutProperties as _objectWithoutProperties, extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
9
+ import React__default from 'react';
10
+ import PropTypes from '../../node_modules/prop-types/index.js';
11
+ import cx from 'classnames';
12
+ import { getDevtoolsProps } from '../../global/js/utils/devtools.js';
13
+ import { pkg } from '../../settings.js';
14
+
15
+ var _excluded = ["children", "className", "title"];
16
+
17
+ // The block part of our conventional BEM class names (blockClass__E--M).
18
+ var blockClass = "".concat(pkg.prefix, "--filter-panel");
19
+ var componentName = 'FilterPanel';
20
+
21
+ /**
22
+ * The container for filter panel subcomponents.
23
+ */
24
+ var FilterPanel = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
25
+ var children = _ref.children,
26
+ className = _ref.className,
27
+ title = _ref.title,
28
+ rest = _objectWithoutProperties(_ref, _excluded);
29
+ return /*#__PURE__*/React__default.createElement("section", _extends({}, rest, {
30
+ className: cx(blockClass, className),
31
+ ref: ref
32
+ }, getDevtoolsProps(componentName)), title && /*#__PURE__*/React__default.createElement("h1", {
33
+ className: "".concat(blockClass, "__title")
34
+ }, title), children);
35
+ });
36
+
37
+ // Return a placeholder if not released and not enabled by feature flag
38
+ FilterPanel = pkg.checkComponentEnabled(FilterPanel, componentName);
39
+ FilterPanel.displayName = componentName;
40
+ FilterPanel.propTypes = {
41
+ /**
42
+ * Provide the contents of the FilterPanel.
43
+ */
44
+ children: PropTypes.node,
45
+ /**
46
+ * Provide an optional class to be applied to the containing node.
47
+ */
48
+ className: PropTypes.string,
49
+ /**
50
+ * Title text for the filter panel.
51
+ */
52
+ title: PropTypes.node
53
+ };
54
+
55
+ export { FilterPanel };
@@ -0,0 +1,5 @@
1
+ /**
2
+ * A container with a label and optional count.
3
+ */
4
+ export let FilterPanelAccordion: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
5
+ import React from 'react';