@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.
- package/css/index-full-carbon.css +236 -3
- package/css/index-full-carbon.css.map +1 -1
- package/css/index-full-carbon.min.css +1 -1
- package/css/index-full-carbon.min.css.map +1 -1
- package/css/index-without-carbon-released-only.css +5 -0
- package/css/index-without-carbon-released-only.css.map +1 -1
- package/css/index-without-carbon-released-only.min.css +1 -1
- package/css/index-without-carbon-released-only.min.css.map +1 -1
- package/css/index-without-carbon.css +236 -3
- package/css/index-without-carbon.css.map +1 -1
- package/css/index-without-carbon.min.css +1 -1
- package/css/index-without-carbon.min.css.map +1 -1
- package/css/index.css +236 -3
- package/css/index.css.map +1 -1
- package/css/index.min.css +1 -1
- package/css/index.min.css.map +1 -1
- package/es/components/AddSelect/AddSelect.d.ts +44 -2
- package/es/components/AddSelect/AddSelect.js +8 -4
- package/es/components/AddSelect/AddSelectBody.d.ts +44 -2
- package/es/components/AddSelect/AddSelectBody.js +10 -12
- package/es/components/AddSelect/AddSelectSort.d.ts +16 -17
- package/es/components/AddSelect/AddSelectSort.js +5 -5
- package/es/components/AddSelect/types/index.d.ts +44 -0
- package/es/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.d.ts +5 -1
- package/es/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +12 -6
- package/es/components/Card/Card.js +50 -9
- package/es/components/Card/CardFooter.d.ts +5 -1
- package/es/components/Card/CardFooter.js +11 -1
- package/es/components/Carousel/Carousel.d.ts +6 -2
- package/es/components/Checklist/Checklist.d.ts +100 -2
- package/es/components/Checklist/Checklist.js +9 -5
- package/es/components/Checklist/Checklist.types.d.ts +19 -0
- package/es/components/Checklist/Checklist.types.js +22 -0
- package/es/components/Checklist/ChecklistChart.d.ts +5 -1
- package/es/components/Checklist/ChecklistChart.js +9 -4
- package/es/components/Checklist/ChecklistIcon.d.ts +5 -1
- package/es/components/Checklist/ChecklistIcon.js +9 -4
- package/es/components/CoachmarkButton/CoachmarkButton.d.ts +19 -2
- package/es/components/CoachmarkOverlayElements/CoachmarkOverlayElements.d.ts +46 -2
- package/es/components/CoachmarkOverlayElements/CoachmarkOverlayElements.js +5 -4
- package/es/components/CreateInfluencer/CreateInfluencer.d.ts +55 -17
- package/es/components/CreateInfluencer/CreateInfluencer.js +1 -1
- package/es/components/CreateTearsheet/CreateTearsheetStep.d.ts +95 -2
- package/es/components/CreateTearsheet/CreateTearsheetStep.js +7 -5
- package/es/components/DataSpreadsheet/DataSpreadsheet.d.ts +67 -2
- package/es/components/DataSpreadsheet/DataSpreadsheet.js +50 -28
- package/es/components/DataSpreadsheet/DataSpreadsheetBody.d.ts +139 -2
- package/es/components/DataSpreadsheet/DataSpreadsheetBody.js +46 -31
- package/es/components/DataSpreadsheet/DataSpreadsheetHeader.d.ts +89 -2
- package/es/components/DataSpreadsheet/DataSpreadsheetHeader.js +39 -25
- package/es/components/DataSpreadsheet/types/index.d.ts +30 -0
- package/es/components/Datagrid/Datagrid/DatagridVirtualBody.js +5 -1
- package/es/components/ExpressiveCard/ExpressiveCard.d.ts +2 -1
- package/es/components/GetStartedCard/GetStartedCard.d.ts +5 -0
- package/es/components/GetStartedCard/GetStartedCard.js +82 -0
- package/es/components/GetStartedCard/index.d.ts +1 -0
- package/es/components/Guidebanner/Guidebanner.d.ts +62 -2
- package/es/components/Guidebanner/Guidebanner.js +6 -5
- package/es/components/Guidebanner/GuidebannerElement.d.ts +30 -17
- package/es/components/Guidebanner/GuidebannerElement.js +4 -4
- package/es/components/Guidebanner/GuidebannerElementButton.d.ts +29 -15
- package/es/components/Guidebanner/GuidebannerElementButton.js +10 -4
- package/es/components/Guidebanner/GuidebannerElementLink.d.ts +20 -13
- package/es/components/Guidebanner/GuidebannerElementLink.js +3 -3
- package/es/components/InterstitialScreen/InterstitialScreen.js +3 -1
- package/es/components/MultiAddSelect/MultiAddSelect.d.ts +134 -2
- package/es/components/MultiAddSelect/MultiAddSelect.js +2 -1
- package/es/components/NotificationsPanel/NotificationsPanel.d.ts +162 -1
- package/es/components/NotificationsPanel/NotificationsPanel.js +10 -11
- package/es/components/PageHeader/PageHeader.d.ts +298 -5
- package/es/components/PageHeader/PageHeader.js +98 -47
- package/es/components/PageHeader/PageHeaderUtils.d.ts +1 -1
- package/es/components/PageHeader/PageHeaderUtils.js +4 -1
- package/es/components/SidePanel/SidePanel.d.ts +6 -2
- package/es/components/SidePanel/SidePanel.js +18 -3
- package/es/components/SidePanel/constants.d.ts +1 -0
- package/es/components/SidePanel/constants.js +1 -0
- package/es/components/SingleAddSelect/SingleAddSelect.d.ts +69 -2
- package/es/components/SingleAddSelect/SingleAddSelect.js +2 -1
- package/es/components/TagOverflow/TagOverflow.d.ts +5 -0
- package/es/components/TagOverflow/TagOverflow.js +153 -29
- package/es/components/TagOverflow/TagOverflowModal.d.ts +29 -0
- package/es/components/TagOverflow/TagOverflowModal.js +112 -0
- package/es/components/TagOverflow/TagOverflowPopover.d.ts +2 -0
- package/es/components/TagOverflow/TagOverflowPopover.js +135 -0
- package/es/components/Tearsheet/Tearsheet.d.ts +132 -6
- package/es/components/Tearsheet/Tearsheet.js +25 -13
- package/es/components/Tearsheet/TearsheetShell.d.ts +5 -1
- package/es/components/Tearsheet/TearsheetShell.js +26 -4
- package/es/components/WebTerminal/WebTerminal.d.ts +4 -0
- package/es/components/WebTerminal/WebTerminal.js +11 -3
- package/es/components/index.d.ts +1 -0
- package/es/global/js/hooks/useFocus.d.ts +3 -1
- package/es/global/js/hooks/useFocus.js +6 -3
- package/es/global/js/hooks/useRetrieveStepData.d.ts +1 -1
- package/es/global/js/hooks/useRetrieveStepData.js +1 -1
- package/es/global/js/package-settings.d.ts +1 -0
- package/es/global/js/package-settings.js +1 -0
- package/es/index.js +1 -0
- package/es/settings.d.ts +1 -0
- package/lib/components/AddSelect/AddSelect.d.ts +44 -2
- package/lib/components/AddSelect/AddSelect.js +7 -3
- package/lib/components/AddSelect/AddSelectBody.d.ts +44 -2
- package/lib/components/AddSelect/AddSelectBody.js +10 -12
- package/lib/components/AddSelect/AddSelectSort.d.ts +16 -17
- package/lib/components/AddSelect/AddSelectSort.js +5 -5
- package/lib/components/AddSelect/types/index.d.ts +44 -0
- package/lib/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.d.ts +5 -1
- package/lib/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +12 -6
- package/lib/components/Card/Card.js +50 -9
- package/lib/components/Card/CardFooter.d.ts +5 -1
- package/lib/components/Card/CardFooter.js +11 -1
- package/lib/components/Carousel/Carousel.d.ts +6 -2
- package/lib/components/Checklist/Checklist.d.ts +100 -2
- package/lib/components/Checklist/Checklist.js +9 -5
- package/lib/components/Checklist/Checklist.types.d.ts +19 -0
- package/lib/components/Checklist/Checklist.types.js +27 -0
- package/lib/components/Checklist/ChecklistChart.d.ts +5 -1
- package/lib/components/Checklist/ChecklistChart.js +14 -9
- package/lib/components/Checklist/ChecklistIcon.d.ts +5 -1
- package/lib/components/Checklist/ChecklistIcon.js +9 -4
- package/lib/components/CoachmarkButton/CoachmarkButton.d.ts +19 -2
- package/lib/components/CoachmarkOverlayElements/CoachmarkOverlayElements.d.ts +46 -2
- package/lib/components/CoachmarkOverlayElements/CoachmarkOverlayElements.js +5 -4
- package/lib/components/CreateInfluencer/CreateInfluencer.d.ts +55 -17
- package/lib/components/CreateInfluencer/CreateInfluencer.js +1 -1
- package/lib/components/CreateTearsheet/CreateTearsheetStep.d.ts +95 -2
- package/lib/components/CreateTearsheet/CreateTearsheetStep.js +7 -5
- package/lib/components/DataSpreadsheet/DataSpreadsheet.d.ts +67 -2
- package/lib/components/DataSpreadsheet/DataSpreadsheet.js +50 -28
- package/lib/components/DataSpreadsheet/DataSpreadsheetBody.d.ts +139 -2
- package/lib/components/DataSpreadsheet/DataSpreadsheetBody.js +46 -31
- package/lib/components/DataSpreadsheet/DataSpreadsheetHeader.d.ts +89 -2
- package/lib/components/DataSpreadsheet/DataSpreadsheetHeader.js +39 -25
- package/lib/components/DataSpreadsheet/types/index.d.ts +30 -0
- package/lib/components/Datagrid/Datagrid/DatagridVirtualBody.js +5 -1
- package/lib/components/ExpressiveCard/ExpressiveCard.d.ts +2 -1
- package/lib/components/GetStartedCard/GetStartedCard.d.ts +5 -0
- package/lib/components/GetStartedCard/GetStartedCard.js +88 -0
- package/lib/components/GetStartedCard/index.d.ts +1 -0
- package/lib/components/Guidebanner/Guidebanner.d.ts +62 -2
- package/lib/components/Guidebanner/Guidebanner.js +6 -5
- package/lib/components/Guidebanner/GuidebannerElement.d.ts +30 -17
- package/lib/components/Guidebanner/GuidebannerElement.js +4 -4
- package/lib/components/Guidebanner/GuidebannerElementButton.d.ts +29 -15
- package/lib/components/Guidebanner/GuidebannerElementButton.js +10 -4
- package/lib/components/Guidebanner/GuidebannerElementLink.d.ts +20 -13
- package/lib/components/Guidebanner/GuidebannerElementLink.js +3 -3
- package/lib/components/InterstitialScreen/InterstitialScreen.js +3 -1
- package/lib/components/MultiAddSelect/MultiAddSelect.d.ts +134 -2
- package/lib/components/MultiAddSelect/MultiAddSelect.js +2 -1
- package/lib/components/NotificationsPanel/NotificationsPanel.d.ts +162 -1
- package/lib/components/NotificationsPanel/NotificationsPanel.js +10 -11
- package/lib/components/PageHeader/PageHeader.d.ts +298 -5
- package/lib/components/PageHeader/PageHeader.js +98 -47
- package/lib/components/PageHeader/PageHeaderUtils.d.ts +1 -1
- package/lib/components/PageHeader/PageHeaderUtils.js +4 -1
- package/lib/components/SidePanel/SidePanel.d.ts +6 -2
- package/lib/components/SidePanel/SidePanel.js +18 -3
- package/lib/components/SidePanel/constants.d.ts +1 -0
- package/lib/components/SidePanel/constants.js +1 -0
- package/lib/components/SingleAddSelect/SingleAddSelect.d.ts +69 -2
- package/lib/components/SingleAddSelect/SingleAddSelect.js +2 -1
- package/lib/components/TagOverflow/TagOverflow.d.ts +5 -0
- package/lib/components/TagOverflow/TagOverflow.js +154 -28
- package/lib/components/TagOverflow/TagOverflowModal.d.ts +29 -0
- package/lib/components/TagOverflow/TagOverflowModal.js +121 -0
- package/lib/components/TagOverflow/TagOverflowPopover.d.ts +2 -0
- package/lib/components/TagOverflow/TagOverflowPopover.js +144 -0
- package/lib/components/Tearsheet/Tearsheet.d.ts +132 -6
- package/lib/components/Tearsheet/Tearsheet.js +25 -13
- package/lib/components/Tearsheet/TearsheetShell.d.ts +5 -1
- package/lib/components/Tearsheet/TearsheetShell.js +26 -4
- package/lib/components/WebTerminal/WebTerminal.d.ts +4 -0
- package/lib/components/WebTerminal/WebTerminal.js +11 -3
- package/lib/components/index.d.ts +1 -0
- package/lib/global/js/hooks/useFocus.d.ts +3 -1
- package/lib/global/js/hooks/useFocus.js +6 -3
- package/lib/global/js/hooks/useRetrieveStepData.d.ts +1 -1
- package/lib/global/js/hooks/useRetrieveStepData.js +1 -1
- package/lib/global/js/package-settings.d.ts +1 -0
- package/lib/global/js/package-settings.js +1 -0
- package/lib/index.js +5 -0
- package/lib/settings.d.ts +1 -0
- package/package.json +3 -3
- package/scss/components/CoachmarkStack/_coachmark-stack.scss +4 -2
- package/scss/components/GetStartedCard/_carbon-imports.scss +9 -0
- package/scss/components/GetStartedCard/_get-started-card.scss +135 -0
- package/scss/components/GetStartedCard/_index-with-carbon.scss +9 -0
- package/scss/components/GetStartedCard/_index.scss +8 -0
- package/scss/components/SidePanel/_side-panel-variables.scss +1 -0
- package/scss/components/StringFormatter/_string-formatter.scss +1 -1
- package/scss/components/TagOverflow/_tag-overflow.scss +157 -0
- package/scss/components/_index-with-carbon.scss +1 -0
- package/scss/components/_index.scss +1 -0
- package/telemetry.yml +25 -16
@@ -1,2 +1,89 @@
|
|
1
|
-
|
2
|
-
|
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
|
59
|
-
var scrollContainer = ref === null || ref === void 0 || (
|
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
|
-
|
120
|
-
|
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) :
|
191
|
+
onMouseDown: selectedHeader ? handleHeaderMouseDown(index) : undefined,
|
183
192
|
onMouseUp: selectedHeader ? function () {
|
184
193
|
return setSelectedHeaderReorderActive(false);
|
185
|
-
} :
|
186
|
-
onClick: !selectedHeader ? handleColumnHeaderClick(index) :
|
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?:
|
54
|
+
pictogram?: CarbonIconType;
|
54
55
|
/**
|
55
56
|
* Optionally specify an href for your Button to become an <a> element
|
56
57
|
*/
|
@@ -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<
|
6
|
-
|
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
|
176
|
-
//
|
177
|
-
//
|
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
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
}
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
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
|
-
|
18
|
-
|
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
|
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
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
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
|
-
|
16
|
-
|
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 {};
|