@carbon/ibm-products 2.38.0 → 2.40.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (196) hide show
  1. package/css/index-full-carbon.css +236 -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-released-only.css +5 -0
  6. package/css/index-without-carbon-released-only.css.map +1 -1
  7. package/css/index-without-carbon-released-only.min.css +1 -1
  8. package/css/index-without-carbon-released-only.min.css.map +1 -1
  9. package/css/index-without-carbon.css +236 -3
  10. package/css/index-without-carbon.css.map +1 -1
  11. package/css/index-without-carbon.min.css +1 -1
  12. package/css/index-without-carbon.min.css.map +1 -1
  13. package/css/index.css +236 -3
  14. package/css/index.css.map +1 -1
  15. package/css/index.min.css +1 -1
  16. package/css/index.min.css.map +1 -1
  17. package/es/components/AddSelect/AddSelect.d.ts +44 -2
  18. package/es/components/AddSelect/AddSelect.js +8 -4
  19. package/es/components/AddSelect/AddSelectBody.d.ts +44 -2
  20. package/es/components/AddSelect/AddSelectBody.js +10 -12
  21. package/es/components/AddSelect/AddSelectSort.d.ts +16 -17
  22. package/es/components/AddSelect/AddSelectSort.js +5 -5
  23. package/es/components/AddSelect/types/index.d.ts +44 -0
  24. package/es/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.d.ts +5 -1
  25. package/es/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +12 -6
  26. package/es/components/Card/Card.js +50 -9
  27. package/es/components/Card/CardFooter.d.ts +5 -1
  28. package/es/components/Card/CardFooter.js +11 -1
  29. package/es/components/Carousel/Carousel.d.ts +6 -2
  30. package/es/components/Checklist/Checklist.d.ts +100 -2
  31. package/es/components/Checklist/Checklist.js +9 -5
  32. package/es/components/Checklist/Checklist.types.d.ts +19 -0
  33. package/es/components/Checklist/Checklist.types.js +22 -0
  34. package/es/components/Checklist/ChecklistChart.d.ts +5 -1
  35. package/es/components/Checklist/ChecklistChart.js +9 -4
  36. package/es/components/Checklist/ChecklistIcon.d.ts +5 -1
  37. package/es/components/Checklist/ChecklistIcon.js +9 -4
  38. package/es/components/CoachmarkButton/CoachmarkButton.d.ts +19 -2
  39. package/es/components/CoachmarkOverlayElements/CoachmarkOverlayElements.d.ts +46 -2
  40. package/es/components/CoachmarkOverlayElements/CoachmarkOverlayElements.js +5 -4
  41. package/es/components/CreateInfluencer/CreateInfluencer.d.ts +55 -17
  42. package/es/components/CreateInfluencer/CreateInfluencer.js +1 -1
  43. package/es/components/CreateTearsheet/CreateTearsheetStep.d.ts +95 -2
  44. package/es/components/CreateTearsheet/CreateTearsheetStep.js +7 -5
  45. package/es/components/DataSpreadsheet/DataSpreadsheet.d.ts +67 -2
  46. package/es/components/DataSpreadsheet/DataSpreadsheet.js +50 -28
  47. package/es/components/DataSpreadsheet/DataSpreadsheetBody.d.ts +139 -2
  48. package/es/components/DataSpreadsheet/DataSpreadsheetBody.js +46 -31
  49. package/es/components/DataSpreadsheet/DataSpreadsheetHeader.d.ts +89 -2
  50. package/es/components/DataSpreadsheet/DataSpreadsheetHeader.js +39 -25
  51. package/es/components/DataSpreadsheet/types/index.d.ts +30 -0
  52. package/es/components/Datagrid/Datagrid/DatagridVirtualBody.js +5 -1
  53. package/es/components/ExpressiveCard/ExpressiveCard.d.ts +2 -1
  54. package/es/components/GetStartedCard/GetStartedCard.d.ts +5 -0
  55. package/es/components/GetStartedCard/GetStartedCard.js +82 -0
  56. package/es/components/GetStartedCard/index.d.ts +1 -0
  57. package/es/components/Guidebanner/Guidebanner.d.ts +62 -2
  58. package/es/components/Guidebanner/Guidebanner.js +6 -5
  59. package/es/components/Guidebanner/GuidebannerElement.d.ts +30 -17
  60. package/es/components/Guidebanner/GuidebannerElement.js +4 -4
  61. package/es/components/Guidebanner/GuidebannerElementButton.d.ts +29 -15
  62. package/es/components/Guidebanner/GuidebannerElementButton.js +10 -4
  63. package/es/components/Guidebanner/GuidebannerElementLink.d.ts +20 -13
  64. package/es/components/Guidebanner/GuidebannerElementLink.js +3 -3
  65. package/es/components/InterstitialScreen/InterstitialScreen.js +3 -1
  66. package/es/components/MultiAddSelect/MultiAddSelect.d.ts +134 -2
  67. package/es/components/MultiAddSelect/MultiAddSelect.js +2 -1
  68. package/es/components/NotificationsPanel/NotificationsPanel.d.ts +162 -1
  69. package/es/components/NotificationsPanel/NotificationsPanel.js +10 -11
  70. package/es/components/PageHeader/PageHeader.d.ts +298 -5
  71. package/es/components/PageHeader/PageHeader.js +98 -47
  72. package/es/components/PageHeader/PageHeaderUtils.d.ts +1 -1
  73. package/es/components/PageHeader/PageHeaderUtils.js +4 -1
  74. package/es/components/SidePanel/SidePanel.d.ts +6 -2
  75. package/es/components/SidePanel/SidePanel.js +18 -3
  76. package/es/components/SidePanel/constants.d.ts +1 -0
  77. package/es/components/SidePanel/constants.js +1 -0
  78. package/es/components/SingleAddSelect/SingleAddSelect.d.ts +69 -2
  79. package/es/components/SingleAddSelect/SingleAddSelect.js +2 -1
  80. package/es/components/TagOverflow/TagOverflow.d.ts +5 -0
  81. package/es/components/TagOverflow/TagOverflow.js +153 -29
  82. package/es/components/TagOverflow/TagOverflowModal.d.ts +29 -0
  83. package/es/components/TagOverflow/TagOverflowModal.js +112 -0
  84. package/es/components/TagOverflow/TagOverflowPopover.d.ts +2 -0
  85. package/es/components/TagOverflow/TagOverflowPopover.js +135 -0
  86. package/es/components/Tearsheet/Tearsheet.d.ts +132 -6
  87. package/es/components/Tearsheet/Tearsheet.js +25 -13
  88. package/es/components/Tearsheet/TearsheetShell.d.ts +5 -1
  89. package/es/components/Tearsheet/TearsheetShell.js +26 -4
  90. package/es/components/WebTerminal/WebTerminal.d.ts +4 -0
  91. package/es/components/WebTerminal/WebTerminal.js +11 -3
  92. package/es/components/index.d.ts +1 -0
  93. package/es/global/js/hooks/useFocus.d.ts +3 -1
  94. package/es/global/js/hooks/useFocus.js +6 -3
  95. package/es/global/js/hooks/useRetrieveStepData.d.ts +1 -1
  96. package/es/global/js/hooks/useRetrieveStepData.js +1 -1
  97. package/es/global/js/package-settings.d.ts +1 -0
  98. package/es/global/js/package-settings.js +1 -0
  99. package/es/index.js +1 -0
  100. package/es/settings.d.ts +1 -0
  101. package/lib/components/AddSelect/AddSelect.d.ts +44 -2
  102. package/lib/components/AddSelect/AddSelect.js +7 -3
  103. package/lib/components/AddSelect/AddSelectBody.d.ts +44 -2
  104. package/lib/components/AddSelect/AddSelectBody.js +10 -12
  105. package/lib/components/AddSelect/AddSelectSort.d.ts +16 -17
  106. package/lib/components/AddSelect/AddSelectSort.js +5 -5
  107. package/lib/components/AddSelect/types/index.d.ts +44 -0
  108. package/lib/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.d.ts +5 -1
  109. package/lib/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +12 -6
  110. package/lib/components/Card/Card.js +50 -9
  111. package/lib/components/Card/CardFooter.d.ts +5 -1
  112. package/lib/components/Card/CardFooter.js +11 -1
  113. package/lib/components/Carousel/Carousel.d.ts +6 -2
  114. package/lib/components/Checklist/Checklist.d.ts +100 -2
  115. package/lib/components/Checklist/Checklist.js +9 -5
  116. package/lib/components/Checklist/Checklist.types.d.ts +19 -0
  117. package/lib/components/Checklist/Checklist.types.js +27 -0
  118. package/lib/components/Checklist/ChecklistChart.d.ts +5 -1
  119. package/lib/components/Checklist/ChecklistChart.js +14 -9
  120. package/lib/components/Checklist/ChecklistIcon.d.ts +5 -1
  121. package/lib/components/Checklist/ChecklistIcon.js +9 -4
  122. package/lib/components/CoachmarkButton/CoachmarkButton.d.ts +19 -2
  123. package/lib/components/CoachmarkOverlayElements/CoachmarkOverlayElements.d.ts +46 -2
  124. package/lib/components/CoachmarkOverlayElements/CoachmarkOverlayElements.js +5 -4
  125. package/lib/components/CreateInfluencer/CreateInfluencer.d.ts +55 -17
  126. package/lib/components/CreateInfluencer/CreateInfluencer.js +1 -1
  127. package/lib/components/CreateTearsheet/CreateTearsheetStep.d.ts +95 -2
  128. package/lib/components/CreateTearsheet/CreateTearsheetStep.js +7 -5
  129. package/lib/components/DataSpreadsheet/DataSpreadsheet.d.ts +67 -2
  130. package/lib/components/DataSpreadsheet/DataSpreadsheet.js +50 -28
  131. package/lib/components/DataSpreadsheet/DataSpreadsheetBody.d.ts +139 -2
  132. package/lib/components/DataSpreadsheet/DataSpreadsheetBody.js +46 -31
  133. package/lib/components/DataSpreadsheet/DataSpreadsheetHeader.d.ts +89 -2
  134. package/lib/components/DataSpreadsheet/DataSpreadsheetHeader.js +39 -25
  135. package/lib/components/DataSpreadsheet/types/index.d.ts +30 -0
  136. package/lib/components/Datagrid/Datagrid/DatagridVirtualBody.js +5 -1
  137. package/lib/components/ExpressiveCard/ExpressiveCard.d.ts +2 -1
  138. package/lib/components/GetStartedCard/GetStartedCard.d.ts +5 -0
  139. package/lib/components/GetStartedCard/GetStartedCard.js +88 -0
  140. package/lib/components/GetStartedCard/index.d.ts +1 -0
  141. package/lib/components/Guidebanner/Guidebanner.d.ts +62 -2
  142. package/lib/components/Guidebanner/Guidebanner.js +6 -5
  143. package/lib/components/Guidebanner/GuidebannerElement.d.ts +30 -17
  144. package/lib/components/Guidebanner/GuidebannerElement.js +4 -4
  145. package/lib/components/Guidebanner/GuidebannerElementButton.d.ts +29 -15
  146. package/lib/components/Guidebanner/GuidebannerElementButton.js +10 -4
  147. package/lib/components/Guidebanner/GuidebannerElementLink.d.ts +20 -13
  148. package/lib/components/Guidebanner/GuidebannerElementLink.js +3 -3
  149. package/lib/components/InterstitialScreen/InterstitialScreen.js +3 -1
  150. package/lib/components/MultiAddSelect/MultiAddSelect.d.ts +134 -2
  151. package/lib/components/MultiAddSelect/MultiAddSelect.js +2 -1
  152. package/lib/components/NotificationsPanel/NotificationsPanel.d.ts +162 -1
  153. package/lib/components/NotificationsPanel/NotificationsPanel.js +10 -11
  154. package/lib/components/PageHeader/PageHeader.d.ts +298 -5
  155. package/lib/components/PageHeader/PageHeader.js +98 -47
  156. package/lib/components/PageHeader/PageHeaderUtils.d.ts +1 -1
  157. package/lib/components/PageHeader/PageHeaderUtils.js +4 -1
  158. package/lib/components/SidePanel/SidePanel.d.ts +6 -2
  159. package/lib/components/SidePanel/SidePanel.js +18 -3
  160. package/lib/components/SidePanel/constants.d.ts +1 -0
  161. package/lib/components/SidePanel/constants.js +1 -0
  162. package/lib/components/SingleAddSelect/SingleAddSelect.d.ts +69 -2
  163. package/lib/components/SingleAddSelect/SingleAddSelect.js +2 -1
  164. package/lib/components/TagOverflow/TagOverflow.d.ts +5 -0
  165. package/lib/components/TagOverflow/TagOverflow.js +154 -28
  166. package/lib/components/TagOverflow/TagOverflowModal.d.ts +29 -0
  167. package/lib/components/TagOverflow/TagOverflowModal.js +121 -0
  168. package/lib/components/TagOverflow/TagOverflowPopover.d.ts +2 -0
  169. package/lib/components/TagOverflow/TagOverflowPopover.js +144 -0
  170. package/lib/components/Tearsheet/Tearsheet.d.ts +132 -6
  171. package/lib/components/Tearsheet/Tearsheet.js +25 -13
  172. package/lib/components/Tearsheet/TearsheetShell.d.ts +5 -1
  173. package/lib/components/Tearsheet/TearsheetShell.js +26 -4
  174. package/lib/components/WebTerminal/WebTerminal.d.ts +4 -0
  175. package/lib/components/WebTerminal/WebTerminal.js +11 -3
  176. package/lib/components/index.d.ts +1 -0
  177. package/lib/global/js/hooks/useFocus.d.ts +3 -1
  178. package/lib/global/js/hooks/useFocus.js +6 -3
  179. package/lib/global/js/hooks/useRetrieveStepData.d.ts +1 -1
  180. package/lib/global/js/hooks/useRetrieveStepData.js +1 -1
  181. package/lib/global/js/package-settings.d.ts +1 -0
  182. package/lib/global/js/package-settings.js +1 -0
  183. package/lib/index.js +5 -0
  184. package/lib/settings.d.ts +1 -0
  185. package/package.json +3 -3
  186. package/scss/components/CoachmarkStack/_coachmark-stack.scss +4 -2
  187. package/scss/components/GetStartedCard/_carbon-imports.scss +9 -0
  188. package/scss/components/GetStartedCard/_get-started-card.scss +135 -0
  189. package/scss/components/GetStartedCard/_index-with-carbon.scss +9 -0
  190. package/scss/components/GetStartedCard/_index.scss +8 -0
  191. package/scss/components/SidePanel/_side-panel-variables.scss +1 -0
  192. package/scss/components/StringFormatter/_string-formatter.scss +1 -1
  193. package/scss/components/TagOverflow/_tag-overflow.scss +157 -0
  194. package/scss/components/_index-with-carbon.scss +1 -0
  195. package/scss/components/_index.scss +1 -0
  196. package/telemetry.yml +25 -16
@@ -1,2 +1,89 @@
1
- export const DataSpreadsheetHeader: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
2
- import React from 'react';
1
+ /**
2
+ * Copyright IBM Corp. 2022, 2022
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, { Dispatch, SetStateAction } from 'react';
8
+ import { ActiveCellCoordinates, Column, ItemType, Size } from './types';
9
+ interface DataSpreadsheetHeaderProps {
10
+ /**
11
+ * Object containing the active cell coordinates
12
+ */
13
+ activeCellCoordinates?: ActiveCellCoordinates | null;
14
+ /**
15
+ * Specifies the cell height
16
+ */
17
+ cellSize?: Size;
18
+ /**
19
+ * All of the spreadsheet columns
20
+ */
21
+ columns?: readonly Column[];
22
+ /**
23
+ * uuid that corresponds to the current selection area
24
+ */
25
+ currentMatcher?: string;
26
+ /**
27
+ * Default spreadsheet sizing values
28
+ */
29
+ defaultColumn?: Column;
30
+ /**
31
+ * Whether or not a click/hold is active on a header cell
32
+ */
33
+ headerCellHoldActive?: boolean;
34
+ /**
35
+ * Headers provided from useTable hook
36
+ */
37
+ headerGroups?: any[];
38
+ /**
39
+ * All of the spreadsheet row data
40
+ */
41
+ rows?: object[];
42
+ /**
43
+ * The scrollbar width
44
+ */
45
+ scrollBarSize?: number;
46
+ /**
47
+ * The aria label applied to the Select all button
48
+ */
49
+ selectAllAriaLabel: string;
50
+ /**
51
+ * All of the cell selection area items
52
+ */
53
+ selectionAreas?: ItemType[];
54
+ /**
55
+ * Setter fn for activeCellCoordinates value
56
+ */
57
+ setActiveCellCoordinates?: Dispatch<SetStateAction<ActiveCellCoordinates | null>>;
58
+ /**
59
+ * Setter fn for currentMatcher value
60
+ */
61
+ setCurrentMatcher?: Dispatch<SetStateAction<string>>;
62
+ /**
63
+ * Setter fn for header cell hold active value
64
+ */
65
+ setHeaderCellHoldActive?: (arg: boolean) => void;
66
+ /**
67
+ * Setter fn for selectionAreaData state value
68
+ */
69
+ setSelectionAreaData?: Dispatch<SetStateAction<object[]>>;
70
+ /**
71
+ * Setter fn for selectionAreas value
72
+ */
73
+ setSelectionAreas?: Dispatch<SetStateAction<object[]>>;
74
+ /**
75
+ * The total number of columns to be initially visible, additional columns will be rendered and
76
+ * visible via horizontal scrollbar
77
+ */
78
+ totalVisibleColumns?: number;
79
+ /**
80
+ * Function used to update the active cell coordinates
81
+ */
82
+ updateActiveCellCoordinates?: (arg: any) => void;
83
+ /**
84
+ * Array of visible columns provided by react-table useTable hook
85
+ */
86
+ visibleColumns?: [];
87
+ }
88
+ export declare const DataSpreadsheetHeader: React.ForwardRefExoticComponent<DataSpreadsheetHeaderProps & React.RefAttributes<HTMLDivElement>>;
89
+ export {};
@@ -52,13 +52,18 @@ var DataSpreadsheetHeader = /*#__PURE__*/forwardRef(function (_ref, ref) {
52
52
  setSelectedHeaderReorderActive = _useState4[1];
53
53
  var previousState = usePreviousValue({
54
54
  cellSize: cellSize
55
- });
55
+ }) || {};
56
56
  useEffect(function () {
57
57
  if ((previousState === null || previousState === void 0 ? void 0 : previousState.cellSize) !== cellSize) {
58
- var _ref$current;
59
- var scrollContainer = ref === null || ref === void 0 || (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.querySelector(".".concat(blockClass, "__list--container"));
60
- var hasScrollBar = (scrollContainer === null || scrollContainer === void 0 ? void 0 : scrollContainer.scrollHeight) > (scrollContainer === null || scrollContainer === void 0 ? void 0 : scrollContainer.clientHeight);
58
+ var _current;
59
+ var scrollContainer = ref === null || ref === void 0 || (_current = ref.current) === null || _current === void 0 ? void 0 : _current.querySelector(".".concat(blockClass, "__list--container"));
60
+ var hasScrollBar = (scrollContainer === null || scrollContainer === void 0 ? void 0 : scrollContainer.scrollHeight) && (scrollContainer === null || scrollContainer === void 0 ? void 0 : scrollContainer.clientHeight) && (scrollContainer === null || scrollContainer === void 0 ? void 0 : scrollContainer.scrollHeight) > (scrollContainer === null || scrollContainer === void 0 ? void 0 : scrollContainer.clientHeight);
61
61
  var scrollBarValue = hasScrollBar ? 0 : scrollBarSize;
62
+
63
+ // fix for a11y violation element_scrollable_tabbable
64
+ if (!(scrollContainer !== null && scrollContainer !== void 0 && scrollContainer.getAttribute('tabIndex'))) {
65
+ scrollContainer === null || scrollContainer === void 0 || scrollContainer.setAttribute('tabIndex', '0');
66
+ }
62
67
  setScrollBarSizeValue(scrollBarValue);
63
68
  }
64
69
  }, [cellSize, ref, scrollBarSize, previousState === null || previousState === void 0 ? void 0 : previousState.cellSize]);
@@ -71,15 +76,16 @@ var DataSpreadsheetHeader = /*#__PURE__*/forwardRef(function (_ref, ref) {
71
76
  activeCellCoordinates: activeCellCoordinates,
72
77
  rows: rows,
73
78
  columns: columns,
79
+ currentMatcher: currentMatcher,
74
80
  setActiveCellCoordinates: setActiveCellCoordinates,
75
81
  setCurrentMatcher: setCurrentMatcher,
76
82
  setSelectionAreas: setSelectionAreas,
77
83
  spreadsheetRef: ref,
78
84
  index: index,
85
+ isKeyboard: undefined,
79
86
  setSelectionAreaData: setSelectionAreaData,
80
87
  isHoldingCommandKey: isHoldingCommandKey,
81
- isHoldingShiftKey: isHoldingShiftKey,
82
- currentMatcher: currentMatcher
88
+ isHoldingShiftKey: isHoldingShiftKey
83
89
  });
84
90
  };
85
91
  };
@@ -96,34 +102,36 @@ var DataSpreadsheetHeader = /*#__PURE__*/forwardRef(function (_ref, ref) {
96
102
  };
97
103
  var handleHeaderMouseDown = function handleHeaderMouseDown(index) {
98
104
  return function (event) {
99
- var _selectionAreaToClone;
105
+ var _selectionAreaToClone, _selectionAreaToClone2, _selectionAreaToClone3, _document;
100
106
  if (event.shiftKey) {
101
107
  // Remove columns, need to call handleHeaderCellSelection
102
108
  return;
103
109
  }
104
110
  setSelectedHeaderReorderActive(true);
105
- var selectionAreaToClone = selectionAreas.filter(function (item) {
111
+ var selectionAreaToClone = selectionAreas === null || selectionAreas === void 0 ? void 0 : selectionAreas.filter(function (item) {
106
112
  return (item === null || item === void 0 ? void 0 : item.matcher) === currentMatcher;
107
113
  });
108
- var selectionAreaElement = ref.current.querySelector("[data-matcher-id=\"".concat((_selectionAreaToClone = selectionAreaToClone[0]) === null || _selectionAreaToClone === void 0 ? void 0 : _selectionAreaToClone.matcher, "\"]"));
114
+ var selectionAreaElement = ref.current.querySelector("[data-matcher-id=\"".concat(selectionAreaToClone === null || selectionAreaToClone === void 0 || (_selectionAreaToClone = selectionAreaToClone[0]) === null || _selectionAreaToClone === void 0 ? void 0 : _selectionAreaToClone.matcher, "\"]"));
109
115
  var clickXPosition = event.clientX;
110
116
  var headerButtonCoords = event.target.getBoundingClientRect();
111
117
  var headerIndex = event.target.getAttribute('data-column-index');
112
118
  var offsetXValue = clickXPosition - headerButtonCoords.left;
113
- var lowestColumnIndexFromSelectionArea = Math.min(selectionAreaToClone[0].point1.column, selectionAreaToClone[0].point2.column);
114
- var selectionAreaCoords = selectionAreaElement.getBoundingClientRect();
115
- var updatedOffsetDifference = lowestColumnIndexFromSelectionArea < parseInt(headerIndex) ? offsetXValue + (headerButtonCoords.left - selectionAreaCoords.left) : offsetXValue;
116
- var bodyContainer = document.querySelector(".".concat(blockClass, "__list--container")).firstElementChild;
117
- var selectionAreaClonedElement = selectionAreaElement.cloneNode();
118
- var reorderIndicatorLine = selectionAreaElement.cloneNode();
119
- reorderIndicatorLine.className = "".concat(blockClass, "__reorder-indicator-line");
120
- reorderIndicatorLine.style.width = px(2);
119
+ var lowestColumnIndexFromSelectionArea = Math.min((selectionAreaToClone === null || selectionAreaToClone === void 0 || (_selectionAreaToClone2 = selectionAreaToClone[0]) === null || _selectionAreaToClone2 === void 0 || (_selectionAreaToClone2 = _selectionAreaToClone2.point1) === null || _selectionAreaToClone2 === void 0 ? void 0 : _selectionAreaToClone2.column) || 0, (selectionAreaToClone === null || selectionAreaToClone === void 0 || (_selectionAreaToClone3 = selectionAreaToClone[0]) === null || _selectionAreaToClone3 === void 0 || (_selectionAreaToClone3 = _selectionAreaToClone3.point2) === null || _selectionAreaToClone3 === void 0 ? void 0 : _selectionAreaToClone3.column) || 0);
120
+ var selectionAreaCoords = (selectionAreaElement === null || selectionAreaElement === void 0 ? void 0 : selectionAreaElement.getBoundingClientRect()) || new DOMRect();
121
+ var updatedOffsetDifference = lowestColumnIndexFromSelectionArea < parseInt(headerIndex) ? offsetXValue + (headerButtonCoords.left - (selectionAreaCoords === null || selectionAreaCoords === void 0 ? void 0 : selectionAreaCoords.left)) : offsetXValue;
122
+ var bodyContainer = (_document = document) === null || _document === void 0 || (_document = _document.querySelector(".".concat(blockClass, "__list--container"))) === null || _document === void 0 ? void 0 : _document.firstElementChild;
123
+ var selectionAreaClonedElement = selectionAreaElement === null || selectionAreaElement === void 0 ? void 0 : selectionAreaElement.cloneNode();
124
+ var reorderIndicatorLine = selectionAreaElement === null || selectionAreaElement === void 0 ? void 0 : selectionAreaElement.cloneNode();
125
+ if (reorderIndicatorLine) {
126
+ reorderIndicatorLine.className = "".concat(blockClass, "__reorder-indicator-line");
127
+ reorderIndicatorLine.style.width = px(2);
128
+ }
121
129
  selectionAreaClonedElement.classList.add("".concat(blockClass, "__selection-area--element-cloned"));
122
- selectionAreaClonedElement.setAttribute('data-clone-offset-x', updatedOffsetDifference);
130
+ selectionAreaClonedElement.setAttribute('data-clone-offset-x', "".concat(updatedOffsetDifference));
123
131
  selectionAreaClonedElement.setAttribute('data-column-index-original', index);
124
- bodyContainer.appendChild(selectionAreaClonedElement);
125
- bodyContainer.appendChild(reorderIndicatorLine);
126
- setHeaderCellHoldActive(true);
132
+ bodyContainer === null || bodyContainer === void 0 || bodyContainer.appendChild(selectionAreaClonedElement);
133
+ bodyContainer === null || bodyContainer === void 0 || bodyContainer.appendChild(reorderIndicatorLine);
134
+ setHeaderCellHoldActive === null || setHeaderCellHoldActive === void 0 || setHeaderCellHoldActive(true);
127
135
  };
128
136
  };
129
137
  useSpreadsheetMouseMove({
@@ -134,7 +142,7 @@ var DataSpreadsheetHeader = /*#__PURE__*/forwardRef(function (_ref, ref) {
134
142
  return /*#__PURE__*/React__default.createElement("div", {
135
143
  className: cx("".concat(blockClass, "__header--container")),
136
144
  role: "rowgroup"
137
- }, headerGroups.map(function (headerGroup, index) {
145
+ }, headerGroups === null || headerGroups === void 0 ? void 0 : headerGroups.map(function (headerGroup, index) {
138
146
  var headerProps = prepareProps(headerGroup.getHeaderGroupProps(), 'key');
139
147
  return /*#__PURE__*/React__default.createElement("div", _extends({
140
148
  key: "header_".concat(index)
@@ -146,6 +154,7 @@ var DataSpreadsheetHeader = /*#__PURE__*/forwardRef(function (_ref, ref) {
146
154
  scrollBarSizeValue: scrollBarSizeValue,
147
155
  totalVisibleColumns: totalVisibleColumns,
148
156
  defaultColumn: defaultColumn,
157
+ totalColumnsWidth: undefined,
149
158
  visibleColumns: visibleColumns
150
159
  }),
151
160
  overflow: 'hidden'
@@ -179,11 +188,11 @@ var DataSpreadsheetHeader = /*#__PURE__*/forwardRef(function (_ref, ref) {
179
188
  "data-row-index": "header",
180
189
  "data-column-index": index,
181
190
  tabIndex: -1,
182
- onMouseDown: selectedHeader ? handleHeaderMouseDown(index) : null,
191
+ onMouseDown: selectedHeader ? handleHeaderMouseDown(index) : undefined,
183
192
  onMouseUp: selectedHeader ? function () {
184
193
  return setSelectedHeaderReorderActive(false);
185
- } : null,
186
- onClick: !selectedHeader ? handleColumnHeaderClick(index) : null,
194
+ } : undefined,
195
+ onClick: !selectedHeader ? handleColumnHeaderClick(index) : undefined,
187
196
  style: {
188
197
  height: defaultColumn === null || defaultColumn === void 0 ? void 0 : defaultColumn.rowHeight,
189
198
  width: (column === null || column === void 0 ? void 0 : column.width) || (defaultColumn === null || defaultColumn === void 0 ? void 0 : defaultColumn.width)
@@ -198,6 +207,7 @@ DataSpreadsheetHeader.propTypes = {
198
207
  /**
199
208
  * Object containing the active cell coordinates
200
209
  */
210
+ /**@ts-ignore */
201
211
  activeCellCoordinates: PropTypes.shape({
202
212
  row: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
203
213
  column: PropTypes.oneOfType([PropTypes.number, PropTypes.string])
@@ -217,6 +227,7 @@ DataSpreadsheetHeader.propTypes = {
217
227
  /**
218
228
  * Default spreadsheet sizing values
219
229
  */
230
+ /**@ts-ignore */
220
231
  defaultColumn: PropTypes.shape({
221
232
  rowHeight: PropTypes.number,
222
233
  rowHeaderWidth: PropTypes.number,
@@ -233,6 +244,7 @@ DataSpreadsheetHeader.propTypes = {
233
244
  /**
234
245
  * All of the spreadsheet row data
235
246
  */
247
+ /**@ts-ignore */
236
248
  rows: PropTypes.arrayOf(PropTypes.object),
237
249
  /**
238
250
  * The scrollbar width
@@ -245,6 +257,7 @@ DataSpreadsheetHeader.propTypes = {
245
257
  /**
246
258
  * All of the cell selection area items
247
259
  */
260
+ /**@ts-ignore */
248
261
  selectionAreas: PropTypes.arrayOf(PropTypes.object),
249
262
  /**
250
263
  * Setter fn for activeCellCoordinates value
@@ -278,6 +291,7 @@ DataSpreadsheetHeader.propTypes = {
278
291
  /**
279
292
  * Array of visible columns provided by react-table useTable hook
280
293
  */
294
+ /**@ts-ignore */
281
295
  visibleColumns: PropTypes.array
282
296
  };
283
297
 
@@ -0,0 +1,30 @@
1
+ export type Size = 'xs' | 'sm' | 'md' | 'lg';
2
+ export type Theme = 'light' | 'dark';
3
+ export interface Column {
4
+ Header?: string;
5
+ accessor?: string | (() => void);
6
+ Cell?: () => void;
7
+ rowHeight?: number;
8
+ rowHeaderWidth?: number;
9
+ width?: number;
10
+ }
11
+ export interface ActiveCellCoordinates {
12
+ row?: number | string;
13
+ column?: number | string;
14
+ }
15
+ export interface PrevState {
16
+ activeCellCoordinates?: ActiveCellCoordinates;
17
+ isEditing?: boolean;
18
+ selectionAreaData?: object[];
19
+ clickAndHoldActive?: boolean;
20
+ rowHeight?: number;
21
+ cellSize?: Size;
22
+ }
23
+ export interface Point {
24
+ column?: number;
25
+ }
26
+ export interface ItemType {
27
+ matcher?: string;
28
+ point1?: Point;
29
+ point2?: Point;
30
+ }
@@ -39,7 +39,8 @@ var DatagridVirtualBody = function DatagridVirtualBody(datagridState) {
39
39
  page = datagridState.page,
40
40
  handleResize = datagridState.handleResize,
41
41
  gridRef = datagridState.gridRef,
42
- tableId = datagridState.tableId;
42
+ tableId = datagridState.tableId,
43
+ onVirtualScroll = datagridState.onVirtualScroll;
43
44
 
44
45
  /* istanbul ignore next */
45
46
  var handleVirtualGridResize = function handleVirtualGridResize() {
@@ -89,6 +90,9 @@ var DatagridVirtualBody = function DatagridVirtualBody(datagridState) {
89
90
  },
90
91
  estimatedItemSize: rowHeight,
91
92
  onScroll: onScroll,
93
+ onItemsRendered: function onItemsRendered(e) {
94
+ return onVirtualScroll === null || onVirtualScroll === void 0 ? void 0 : onVirtualScroll(e);
95
+ },
92
96
  innerRef: innerListRef,
93
97
  outerRef: testRef,
94
98
  ref: listRef,
@@ -1,4 +1,5 @@
1
1
  import React, { PropsWithChildren, ReactNode } from 'react';
2
+ import { CarbonIconType } from '@carbon/icons-react/lib/CarbonIcon';
2
3
  type ActionIcon = {
3
4
  id?: string;
4
5
  icon?: () => void | object;
@@ -50,7 +51,7 @@ interface ExpressiveCardProps extends PropsWithChildren {
50
51
  /**
51
52
  * Provides the icon that's displayed at the top of the card
52
53
  */
53
- pictogram?: () => void | object;
54
+ pictogram?: CarbonIconType;
54
55
  /**
55
56
  * Optionally specify an href for your Button to become an <a> element
56
57
  */
@@ -0,0 +1,5 @@
1
+ /**
2
+ * GetStartedCard a card with icon, number, and media variants
3
+ */
4
+ export let GetStartedCard: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
5
+ import React from 'react';
@@ -0,0 +1,82 @@
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 { extends as _extends, objectDestructuringEmpty as _objectDestructuringEmpty } from '../../_virtual/_rollupPluginBabelHelpers.js';
9
+ import React__default from 'react';
10
+ import PropTypes from '../../node_modules/prop-types/index.js';
11
+ import { getDevtoolsProps } from '../../global/js/utils/devtools.js';
12
+ import { pkg } from '../../settings.js';
13
+ import { Card } from '../Card/Card.js';
14
+
15
+ var componentName = 'GetStartedCard';
16
+
17
+ /**
18
+ * GetStartedCard a card with icon, number, and media variants
19
+ */
20
+ var GetStartedCard = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
21
+ var rest = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
22
+ return /*#__PURE__*/React__default.createElement(Card, _extends({
23
+ getStarted: true,
24
+ ref: ref
25
+ }, rest, getDevtoolsProps(componentName)));
26
+ });
27
+
28
+ // Return a placeholder if not released and not enabled by feature flag
29
+ GetStartedCard = pkg.checkComponentEnabled(GetStartedCard, componentName);
30
+ GetStartedCard.displayName = componentName;
31
+ GetStartedCard.propTypes = {
32
+ /**
33
+ * Provide an optional class to be applied to the containing node.
34
+ */
35
+ className: PropTypes.string,
36
+ /**
37
+ * Optional if the card should be disabled
38
+ */
39
+ disabled: PropTypes.bool,
40
+ /**
41
+ * Provides the action icon that's displayed at the footer of the card
42
+ */
43
+ footerActionIcon: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
44
+ /**
45
+ * Optional label for the top of the card
46
+ */
47
+ label: PropTypes.oneOfType([PropTypes.string, PropTypes.object, PropTypes.node]),
48
+ /**
49
+ * Optional media content like an image to be placed in the card
50
+ */
51
+ media: PropTypes.node,
52
+ /**
53
+ * Icons that are displayed on the card showing the time and skill needed
54
+ */
55
+ metadata: PropTypes.arrayOf(PropTypes.shape({
56
+ id: PropTypes.string,
57
+ icon: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
58
+ iconDescription: PropTypes.string
59
+ })),
60
+ /**
61
+ * Provides the callback for a clickable card
62
+ */
63
+ onClick: PropTypes.func.isRequired,
64
+ /**
65
+ * Provides the icon that's displayed at the top of the card
66
+ */
67
+ pictogram: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
68
+ /**
69
+ * Provides number for card for tasks in a sequential order
70
+ */
71
+ sequence: PropTypes.number,
72
+ /**
73
+ * Provides the status that's displayed at the top of the card
74
+ */
75
+ status: PropTypes.oneOf(['complete', 'incomplete']),
76
+ /**
77
+ * Title that's displayed at the top of the card
78
+ */
79
+ title: PropTypes.oneOfType([PropTypes.string, PropTypes.object, PropTypes.node])
80
+ };
81
+
82
+ export { GetStartedCard };
@@ -0,0 +1 @@
1
+ export { GetStartedCard } from "./GetStartedCard";
@@ -1,6 +1,66 @@
1
+ /**
2
+ * Copyright IBM Corp. 2023, 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
+ import React, { ReactNode } from 'react';
8
+ interface GuidebannerProps {
9
+ /**
10
+ * Provide the contents of the Guidebanner.
11
+ * One or more GuidebannerElement components are required.
12
+ */
13
+ children: ReactNode;
14
+ /**
15
+ * Provide an optional class to be applied to the containing node.
16
+ */
17
+ className?: string;
18
+ /**
19
+ * Tooltip text and aria label for the Close button icon.
20
+ */
21
+ closeIconDescription?: string;
22
+ /**
23
+ * Text label for the Collapse button.
24
+ */
25
+ collapseButtonLabel?: string;
26
+ /**
27
+ * When true, the Guidebanner will initialize in a collapsed state,
28
+ * showing the title and the Expand button.
29
+ *
30
+ * When expanded, it will show the GuidebannerElement child components and the Collapse button.
31
+ */
32
+ collapsible?: boolean;
33
+ /**
34
+ * Text label for the Expand button.
35
+ */
36
+ expandButtonLabel?: string;
37
+ /**
38
+ * Tooltip text and aria label for the Next button icon.
39
+ */
40
+ nextIconDescription?: string;
41
+ /**
42
+ * If defined, a Close button will render in the top-right corner and a
43
+ * callback function will be triggered when button is clicked.
44
+ */
45
+ onClose?: () => void;
46
+ /**
47
+ * Tooltip text and aria label for the Back button icon.
48
+ */
49
+ previousIconDescription?: string;
50
+ /**
51
+ * Title text.
52
+ */
53
+ title: string;
54
+ /**
55
+ * If true, insert 1 rem of "space" on the left of the component.
56
+ * This will allow the component's content to line up with other
57
+ * content on the page under special circumstances.
58
+ */
59
+ withLeftGutter?: boolean;
60
+ }
1
61
  /**
2
62
  * The guide banner sits at the top of a page, or page-level tab,
3
63
  * to introduce foundational concepts related to the page's content.
4
64
  */
5
- export let Guidebanner: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
6
- import React from 'react';
65
+ export declare let Guidebanner: React.ForwardRefExoticComponent<GuidebannerProps & React.RefAttributes<HTMLDivElement>>;
66
+ export {};
@@ -57,8 +57,8 @@ var Guidebanner = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
57
57
  previousIconDescription = _ref$previousIconDesc === void 0 ? defaults.previousIconDescription : _ref$previousIconDesc,
58
58
  title = _ref.title,
59
59
  rest = _objectWithoutProperties(_ref, _excluded);
60
- var scrollRef = useRef();
61
- var toggleRef = useRef();
60
+ var scrollRef = useRef(null);
61
+ var toggleRef = useRef(null);
62
62
  var _useState = useState(0),
63
63
  _useState2 = _slicedToArray(_useState, 2),
64
64
  scrollPosition = _useState2[0],
@@ -172,9 +172,10 @@ Guidebanner.propTypes = {
172
172
  React__default.Children.forEach(prop, function (child) {
173
173
  if (child.type.displayName !== 'GuidebannerElement') {
174
174
  var _child$type, _child$type2;
175
- // If not GuidebannerElement, then show:
176
- // React component name(child.type?.name) or
177
- // HTML element name(child.type).
175
+ // If child element is not `GuidebannerElement`, then show:
176
+ // Carbon Products component's `displayName` (child.type.displayName) or
177
+ // React component's `name` (child.type.name) or
178
+ // HTML element's tag name (child.type).
178
179
  error = new Error("`Guidebanner` only accepts children of type `GuidebannerElement`, found `".concat(((_child$type = child.type) === null || _child$type === void 0 ? void 0 : _child$type.displayName) || ((_child$type2 = child.type) === null || _child$type2 === void 0 ? void 0 : _child$type2.name) || child.type, "` instead."));
179
180
  }
180
181
  });
@@ -1,19 +1,32 @@
1
- export function GuidebannerElement({ button, className, description, title, ...rest }: {
2
- [x: string]: any;
3
- button: any;
4
- className: any;
5
- description: any;
6
- title: any;
7
- }): import("react/jsx-runtime").JSX.Element;
8
- export namespace GuidebannerElement {
9
- export { componentName as displayName };
10
- export namespace propTypes {
11
- let button: PropTypes.Requireable<PropTypes.ReactNodeLike>;
12
- let className: PropTypes.Requireable<string>;
13
- let description: PropTypes.Validator<NonNullable<NonNullable<PropTypes.ReactNodeLike>>>;
14
- let title: PropTypes.Requireable<string>;
15
- }
1
+ /**
2
+ * Copyright IBM Corp. 2023, 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
+ import React, { ReactNode } from 'react';
8
+ interface GuidebannerElementProps {
9
+ /**
10
+ * An optional button can be rendered below the description.
11
+ * This can be a link, button, Coachmark button, etc.
12
+ */
13
+ button?: ReactNode;
14
+ /**
15
+ * Provide an optional class to be applied to the containing node.
16
+ */
17
+ className?: string;
18
+ /**
19
+ * The description of the element.
20
+ */
21
+ description: ReactNode;
22
+ /**
23
+ * The title of the element.
24
+ */
25
+ title?: string;
16
26
  }
17
- declare const componentName: "GuidebannerElement";
18
- import PropTypes from 'prop-types';
27
+ /**
28
+ * The GuidebannerElement is a required child component of the Guidebanner,
29
+ * and acts as a container for a CarouselItem.
30
+ */
31
+ export declare let GuidebannerElement: React.ForwardRefExoticComponent<GuidebannerElementProps & React.RefAttributes<HTMLDivElement>>;
19
32
  export {};
@@ -17,19 +17,19 @@ var _excluded = ["button", "className", "description", "title"];
17
17
  // The block part of our conventional BEM class names (blockClass__E--M).
18
18
  var blockClass = "".concat(pkg.prefix, "--guidebanner__element");
19
19
  var componentName = 'GuidebannerElement';
20
-
21
20
  /**
22
21
  * The GuidebannerElement is a required child component of the Guidebanner,
23
22
  * and acts as a container for a CarouselItem.
24
23
  */
25
- var GuidebannerElement = function GuidebannerElement(_ref) {
24
+ var GuidebannerElement = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
26
25
  var button = _ref.button,
27
26
  className = _ref.className,
28
27
  description = _ref.description,
29
28
  title = _ref.title,
30
29
  rest = _objectWithoutProperties(_ref, _excluded);
31
30
  return /*#__PURE__*/React__default.createElement("div", _extends({}, rest, {
32
- className: cx(blockClass, className)
31
+ className: cx(blockClass, className),
32
+ ref: ref
33
33
  }, getDevtoolsProps(componentName)), title && /*#__PURE__*/React__default.createElement("h2", {
34
34
  className: "".concat(blockClass, "-title")
35
35
  }, title), description && /*#__PURE__*/React__default.createElement("p", {
@@ -37,7 +37,7 @@ var GuidebannerElement = function GuidebannerElement(_ref) {
37
37
  }, description), button && /*#__PURE__*/React__default.createElement("div", {
38
38
  className: "".concat(blockClass, "-buttons")
39
39
  }, button));
40
- };
40
+ });
41
41
 
42
42
  // Return a placeholder if not released and not enabled by feature flag
43
43
  GuidebannerElement = pkg.checkComponentEnabled(GuidebannerElement, componentName);
@@ -1,17 +1,31 @@
1
- export function GuidebannerElementButton({ children, className, type, ...rest }: {
2
- [x: string]: any;
3
- children: any;
4
- className: any;
5
- type: any;
6
- }): import("react/jsx-runtime").JSX.Element;
7
- export namespace GuidebannerElementButton {
8
- export { componentName as displayName };
9
- export namespace propTypes {
10
- let children: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>;
11
- let className: PropTypes.Requireable<string>;
12
- let type: PropTypes.Requireable<string>;
13
- }
1
+ /**
2
+ * Copyright IBM Corp. 2023, 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
+ import React, { ReactNode } from 'react';
8
+ interface GuidebannerElementButtonProps {
9
+ /**
10
+ * Provide the contents of the GuidebannerElementLink.
11
+ */
12
+ children: ReactNode;
13
+ /**
14
+ * Provide an optional class to be applied to the containing node.
15
+ */
16
+ className?: string;
17
+ /**
18
+ * Provide a description for the icon.
19
+ */
20
+ iconDescription?: string;
21
+ /**
22
+ * If type is "primary", then return a tertiary button with the "crossroads" icon,
23
+ * else return a ghost button.
24
+ */
25
+ type?: string;
14
26
  }
15
- declare const componentName: "GuidebannerElementButton";
16
- import PropTypes from 'prop-types';
27
+ /**
28
+ * One of two buttons styled specifically for the GuidebannerElement.
29
+ */
30
+ export declare let GuidebannerElementButton: React.ForwardRefExoticComponent<GuidebannerElementButtonProps & React.RefAttributes<Button>>;
17
31
  export {};