@carbon/ibm-products 2.0.0-rc.1 → 2.0.0-rc.3
Sign up to get free protection for your applications and to get access to all the features.
- package/css/index-full-carbon.css +952 -143
- package/css/index-full-carbon.css.map +1 -1
- package/css/index-full-carbon.min.css +4 -2
- package/css/index-full-carbon.min.css.map +1 -1
- package/css/index-without-carbon-released-only.css +783 -19
- package/css/index-without-carbon-released-only.css.map +1 -1
- package/css/index-without-carbon-released-only.min.css +4 -2
- package/css/index-without-carbon-released-only.min.css.map +1 -1
- package/css/index-without-carbon.css +678 -77
- package/css/index-without-carbon.css.map +1 -1
- package/css/index-without-carbon.min.css +4 -2
- package/css/index-without-carbon.min.css.map +1 -1
- package/css/index.css +757 -92
- package/css/index.css.map +1 -1
- package/css/index.min.css +4 -2
- package/css/index.min.css.map +1 -1
- package/es/components/APIKeyModal/APIKeyModal.js +1 -1
- package/es/components/AddSelect/AddSelect.js +0 -3
- package/es/components/AddSelect/AddSelectBody.js +20 -3
- package/es/components/AddSelect/AddSelectBreadcrumbs.js +11 -3
- package/es/components/AddSelect/AddSelectColumn.js +5 -5
- package/es/components/AddSelect/AddSelectFilter.js +5 -4
- package/es/components/AddSelect/AddSelectList.js +61 -27
- package/es/components/AddSelect/AddSelectMetaPanel.js +1 -1
- package/es/components/AddSelect/AddSelectSort.js +1 -1
- package/es/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +4 -6
- package/es/components/Card/Card.js +16 -6
- package/es/components/Card/CardFooter.js +3 -1
- package/es/components/Card/CardHeader.js +20 -1
- package/es/components/ComboButton/ComboButton.js +1 -1
- package/es/components/DataSpreadsheet/DataSpreadsheet.js +63 -11
- package/es/components/DataSpreadsheet/DataSpreadsheetBody.js +2 -1
- package/es/components/DataSpreadsheet/DataSpreadsheetHeader.js +7 -0
- package/es/components/DataSpreadsheet/hooks/useMultipleKeyTracking.js +6 -5
- package/es/components/DataSpreadsheet/utils/handleCellDeletion.js +31 -0
- package/es/components/DataSpreadsheet/utils/handleMultipleKeys.js +1 -1
- package/es/components/Datagrid/Datagrid/Datagrid.js +10 -38
- package/es/components/Datagrid/Datagrid/DatagridContent.js +149 -0
- package/es/components/Datagrid/Datagrid/DatagridExpandedRow.js +9 -1
- package/es/components/Datagrid/Datagrid/DatagridRow.js +10 -2
- package/es/components/Datagrid/Datagrid/DatagridSelectAll.js +10 -3
- package/es/components/Datagrid/Datagrid/DatagridSelectAllWithToggle.js +13 -4
- package/es/components/Datagrid/Datagrid/DatagridToolbar.js +5 -4
- package/es/components/Datagrid/Datagrid/DraggableElement.js +6 -2
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/Actions.js +5 -45
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/ButtonWrapper.js +1 -1
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.js +35 -10
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsModal.js +61 -24
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/ModalWrapper.js +3 -2
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditButton/InlineEditButton.js +60 -0
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditButton/index.js +1 -0
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +534 -0
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/index.js +1 -0
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditContext/InlineEditContext.js +112 -0
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditContext/getCellIdAsObject.js +27 -0
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditContext/index.js +1 -0
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditContext/returnUpdatedActiveCell.js +39 -0
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/handleGridFocus.js +19 -0
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.js +263 -0
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/handleMultipleKeys.js +87 -0
- package/es/components/Datagrid/Datagrid/addons/RowSize/RowSizeDropdown.js +17 -14
- package/es/components/Datagrid/Datagrid/addons/RowSize/RowSizeRadioGroup.js +13 -36
- package/es/components/Datagrid/{Datagrid.stories-helpers → Datagrid.stories}/CustomizeColumnStory.js +0 -0
- package/es/components/Datagrid/{Datagrid.stories-helpers → Datagrid.stories}/LeftPanelStory.js +0 -0
- package/es/components/Datagrid/{Datagrid.stories-helpers → Datagrid.stories}/RowSizeDropdownStory.js +0 -0
- package/es/components/Datagrid/{Datagrid.stories-helpers → Datagrid.stories}/SelectAllWithToggleStory.js +0 -0
- package/es/components/Datagrid/{Datagrid.stories-helpers → Datagrid.stories}/StickyActionsColumnStory.js +0 -0
- package/es/components/Datagrid/{Datagrid.stories-helpers → Datagrid.stories}/common.js +0 -0
- package/es/components/Datagrid/{Datagrid.stories-helpers → Datagrid.stories}/index.js +0 -0
- package/es/components/Datagrid/index.js +3 -1
- package/es/components/Datagrid/useActionsColumn.js +28 -12
- package/es/components/Datagrid/useColumnOrder.js +8 -0
- package/es/components/Datagrid/useCustomizeColumns.js +5 -0
- package/es/components/Datagrid/useDefaultStringRenderer.js +4 -1
- package/es/components/Datagrid/useDisableSelectRows.js +6 -2
- package/es/components/Datagrid/useExpandedRow.js +0 -1
- package/es/components/Datagrid/useInlineEdit.js +71 -0
- package/es/components/Datagrid/useNestedRowExpander.js +42 -0
- package/es/components/Datagrid/useNestedRows.js +2 -2
- package/es/components/Datagrid/useRowExpander.js +1 -1
- package/es/components/Datagrid/useRowSize.js +17 -6
- package/es/components/Datagrid/useSelectAllToggle.js +17 -4
- package/es/components/Datagrid/useSelectRows.js +12 -2
- package/es/components/Datagrid/useSortableColumns.js +1 -1
- package/es/components/Datagrid/useStickyColumn.js +11 -0
- package/es/components/Datagrid/utils/DatagridActions.js +152 -0
- package/es/components/Datagrid/utils/DatagridPagination.js +33 -0
- package/es/components/Datagrid/utils/Wrapper.js +21 -0
- package/es/components/Datagrid/utils/getArgTypes.js +85 -0
- package/es/components/Datagrid/utils/getInlineEditColumns.js +153 -0
- package/es/components/Datagrid/utils/makeData.js +47 -2
- package/es/components/ExportModal/ExportModal.js +1 -1
- package/es/components/ImportModal/ImportModal.js +3 -3
- package/es/components/InlineEdit/InlineEdit.js +11 -9
- package/es/components/ModifiedTabs/ModifiedTabLabelNew.js +1 -1
- package/es/components/ModifiedTabs/ModifiedTabLabelWithClose.js +1 -1
- package/es/components/NotificationsPanel/NotificationsPanel.js +1 -1
- package/es/components/OptionsTile/OptionsTile.js +1 -1
- package/es/components/PageHeader/PageHeader.js +1 -1
- package/es/components/ProductiveCard/ProductiveCard.js +5 -0
- package/es/components/Saving/Saving.js +1 -1
- package/es/components/SidePanel/SidePanel.js +1 -1
- package/es/components/StatusIcon/StatusIcon.js +1 -1
- package/es/components/UserProfileImage/UserProfileImage.js +1 -1
- package/es/components/WebTerminal/WebTerminal.js +2 -2
- package/es/components/WebTerminal/WebTerminalContentWrapper.js +1 -1
- package/es/components/WebTerminal/hooks/index.js +6 -0
- package/es/components/WebTerminal/index.js +6 -0
- package/es/components/WebTerminal/preview-components/Navigation.js +7 -1
- package/es/components/WebTerminal/preview-components/documentationLinks.js +6 -0
- package/es/components/WebTerminal/preview-components/index.js +7 -0
- package/es/components/index.js +1 -1
- package/es/global/js/hooks/useClickOutside.js +1 -1
- package/es/global/js/package-settings.js +3 -3
- package/es/global/js/utils/rangeWithCallback.js +13 -0
- package/es/global/js/utils/story-helper.js +5 -1
- package/es/global/js/utils/uuidv4.spec.js +4 -0
- package/lib/components/APIKeyModal/APIKeyModal.js +4 -4
- package/lib/components/AddSelect/AddSelect.js +0 -4
- package/lib/components/AddSelect/AddSelectBody.js +20 -3
- package/lib/components/AddSelect/AddSelectBreadcrumbs.js +14 -3
- package/lib/components/AddSelect/AddSelectColumn.js +5 -5
- package/lib/components/AddSelect/AddSelectFilter.js +5 -4
- package/lib/components/AddSelect/AddSelectList.js +62 -28
- package/lib/components/AddSelect/AddSelectMetaPanel.js +2 -2
- package/lib/components/AddSelect/AddSelectSort.js +4 -4
- package/lib/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +6 -6
- package/lib/components/Card/Card.js +16 -6
- package/lib/components/Card/CardFooter.js +3 -1
- package/lib/components/Card/CardHeader.js +21 -1
- package/lib/components/ComboButton/ComboButton.js +3 -3
- package/lib/components/DataSpreadsheet/DataSpreadsheet.js +63 -10
- package/lib/components/DataSpreadsheet/DataSpreadsheetBody.js +2 -1
- package/lib/components/DataSpreadsheet/DataSpreadsheetHeader.js +7 -0
- package/lib/components/DataSpreadsheet/hooks/useMultipleKeyTracking.js +6 -5
- package/lib/components/DataSpreadsheet/utils/handleCellDeletion.js +42 -0
- package/lib/components/DataSpreadsheet/utils/handleMultipleKeys.js +1 -1
- package/lib/components/Datagrid/Datagrid/Datagrid.js +12 -45
- package/lib/components/Datagrid/Datagrid/DatagridContent.js +183 -0
- package/lib/components/Datagrid/Datagrid/DatagridExpandedRow.js +9 -1
- package/lib/components/Datagrid/Datagrid/DatagridRow.js +19 -2
- package/lib/components/Datagrid/Datagrid/DatagridSelectAll.js +12 -3
- package/lib/components/Datagrid/Datagrid/DatagridSelectAllWithToggle.js +16 -5
- package/lib/components/Datagrid/Datagrid/DatagridToolbar.js +6 -5
- package/lib/components/Datagrid/Datagrid/DraggableElement.js +7 -3
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/Actions.js +12 -47
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/ButtonWrapper.js +2 -2
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.js +47 -25
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsModal.js +59 -23
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/ModalWrapper.js +3 -2
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditButton/InlineEditButton.js +76 -0
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditButton/index.js +13 -0
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +558 -0
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/index.js +13 -0
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditContext/InlineEditContext.js +129 -0
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditContext/getCellIdAsObject.js +36 -0
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditContext/index.js +19 -0
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditContext/returnUpdatedActiveCell.js +45 -0
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/handleGridFocus.js +28 -0
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.js +272 -0
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/handleMultipleKeys.js +100 -0
- package/lib/components/Datagrid/Datagrid/addons/RowSize/RowSizeDropdown.js +17 -13
- package/lib/components/Datagrid/Datagrid/addons/RowSize/RowSizeRadioGroup.js +13 -35
- package/lib/components/Datagrid/{Datagrid.stories-helpers → Datagrid.stories}/CustomizeColumnStory.js +0 -0
- package/lib/components/Datagrid/{Datagrid.stories-helpers → Datagrid.stories}/LeftPanelStory.js +0 -0
- package/lib/components/Datagrid/{Datagrid.stories-helpers → Datagrid.stories}/RowSizeDropdownStory.js +0 -0
- package/lib/components/Datagrid/{Datagrid.stories-helpers → Datagrid.stories}/SelectAllWithToggleStory.js +0 -0
- package/lib/components/Datagrid/{Datagrid.stories-helpers → Datagrid.stories}/StickyActionsColumnStory.js +0 -0
- package/lib/components/Datagrid/{Datagrid.stories-helpers → Datagrid.stories}/common.js +0 -0
- package/lib/components/Datagrid/{Datagrid.stories-helpers → Datagrid.stories}/index.js +0 -0
- package/lib/components/Datagrid/index.js +17 -1
- package/lib/components/Datagrid/useActionsColumn.js +28 -13
- package/lib/components/Datagrid/useColumnOrder.js +17 -0
- package/lib/components/Datagrid/useCustomizeColumns.js +5 -0
- package/lib/components/Datagrid/useDefaultStringRenderer.js +5 -1
- package/lib/components/Datagrid/useDisableSelectRows.js +6 -2
- package/lib/components/Datagrid/useExpandedRow.js +0 -1
- package/lib/components/Datagrid/useInlineEdit.js +85 -0
- package/lib/components/Datagrid/useNestedRowExpander.js +57 -0
- package/lib/components/Datagrid/useNestedRows.js +3 -3
- package/lib/components/Datagrid/useRowExpander.js +3 -3
- package/lib/components/Datagrid/useRowSize.js +18 -13
- package/lib/components/Datagrid/useSelectAllToggle.js +18 -4
- package/lib/components/Datagrid/useSelectRows.js +12 -2
- package/lib/components/Datagrid/useSortableColumns.js +5 -5
- package/lib/components/Datagrid/useStickyColumn.js +11 -0
- package/lib/components/Datagrid/utils/DatagridActions.js +170 -0
- package/lib/components/Datagrid/utils/DatagridPagination.js +46 -0
- package/lib/components/Datagrid/utils/Wrapper.js +33 -0
- package/lib/components/Datagrid/utils/getArgTypes.js +93 -0
- package/lib/components/Datagrid/utils/getInlineEditColumns.js +168 -0
- package/lib/components/Datagrid/utils/makeData.js +48 -2
- package/lib/components/ExportModal/ExportModal.js +3 -3
- package/lib/components/ImportModal/ImportModal.js +4 -4
- package/lib/components/InlineEdit/InlineEdit.js +16 -14
- package/lib/components/ModifiedTabs/ModifiedTabLabelNew.js +2 -2
- package/lib/components/ModifiedTabs/ModifiedTabLabelWithClose.js +3 -3
- package/lib/components/NotificationsPanel/NotificationsPanel.js +8 -8
- package/lib/components/OptionsTile/OptionsTile.js +6 -6
- package/lib/components/PageHeader/PageHeader.js +2 -2
- package/lib/components/ProductiveCard/ProductiveCard.js +5 -0
- package/lib/components/Saving/Saving.js +5 -5
- package/lib/components/SidePanel/SidePanel.js +3 -3
- package/lib/components/StatusIcon/StatusIcon.js +45 -45
- package/lib/components/UserProfileImage/UserProfileImage.js +7 -7
- package/lib/components/WebTerminal/WebTerminal.js +3 -3
- package/lib/components/WebTerminal/hooks/index.js +6 -0
- package/lib/components/WebTerminal/preview-components/Navigation.js +10 -4
- package/lib/components/WebTerminal/preview-components/documentationLinks.js +6 -0
- package/lib/components/index.js +12 -0
- package/lib/global/js/hooks/useClickOutside.js +1 -1
- package/lib/global/js/package-settings.js +3 -3
- package/lib/global/js/utils/rangeWithCallback.js +22 -0
- package/lib/global/js/utils/story-helper.js +5 -1
- package/lib/global/js/utils/uuidv4.spec.js +4 -0
- package/package.json +15 -15
- package/scss/components/AddSelect/_add-select.scss +127 -28
- package/scss/components/Card/_card.scss +1 -0
- package/scss/components/Cascade/_cascade.scss +1 -1
- package/scss/components/CreateTearsheet/_create-tearsheet.scss +2 -0
- package/scss/components/Datagrid/_datagrid.scss +7 -0
- package/scss/components/Datagrid/_storybook-styles.scss +8 -5
- package/scss/components/Datagrid/styles/_datagrid.scss +38 -14
- package/scss/components/Datagrid/styles/_draggableElement.scss +26 -9
- package/scss/components/Datagrid/styles/_index.scss +1 -0
- package/scss/components/Datagrid/styles/_useActionsColumn.scss +14 -0
- package/scss/components/Datagrid/styles/_useExpandedRow.scss +37 -9
- package/scss/components/Datagrid/styles/_useInlineEdit.scss +404 -0
- package/scss/components/Datagrid/styles/_useNestedRows.scss +16 -1
- package/scss/components/Datagrid/styles/_useStickyColumn.scss +31 -2
- package/scss/components/Datagrid/styles/addons/_CustomizeColumnsModal.scss +45 -6
- package/scss/components/Datagrid/styles/addons/_RowSizeDropdown.scss +9 -1
- package/scss/components/InlineEdit/_inline-edit.scss +4 -2
- package/scss/components/NotificationsPanel/_notifications-panel.scss +3 -6
- package/scss/components/RemoveModal/_remove-modal.scss +0 -4
- package/scss/components/SidePanel/_side-panel.scss +3 -6
- package/scss/components/Tearsheet/_tearsheet.scss +2 -2
- package/scss/components/WebTerminal/_carbon-imports.scss +6 -0
- package/scss/components/WebTerminal/_index.scss +7 -0
- package/scss/components/WebTerminal/_storybook-styles.scss +7 -0
- package/scss/components/_index-released-only.scss +1 -0
@@ -0,0 +1,168 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
+
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
6
|
+
value: true
|
7
|
+
});
|
8
|
+
exports.inlineEditSelectItems = exports.getInlineEditColumns = void 0;
|
9
|
+
|
10
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
11
|
+
|
12
|
+
var _react = _interopRequireDefault(require("react"));
|
13
|
+
|
14
|
+
var _icons = require("@carbon/react/icons");
|
15
|
+
|
16
|
+
/**
|
17
|
+
* Copyright IBM Corp. 2022, 2022
|
18
|
+
*
|
19
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
20
|
+
* LICENSE file in the root directory of this source tree.
|
21
|
+
*/
|
22
|
+
var inlineEditSelectItems = [{
|
23
|
+
id: 'option-0',
|
24
|
+
icon: function icon(props) {
|
25
|
+
return /*#__PURE__*/_react.default.createElement(_icons.ChartColumnFloating, (0, _extends2.default)({
|
26
|
+
size: 16
|
27
|
+
}, props));
|
28
|
+
},
|
29
|
+
text: 'Column Chart'
|
30
|
+
}, {
|
31
|
+
id: 'option-1',
|
32
|
+
icon: function icon(props) {
|
33
|
+
return /*#__PURE__*/_react.default.createElement(_icons.ChartBubble, (0, _extends2.default)({
|
34
|
+
size: 16
|
35
|
+
}, props));
|
36
|
+
},
|
37
|
+
text: 'Bubble Chart'
|
38
|
+
}, {
|
39
|
+
id: 'option-2',
|
40
|
+
icon: function icon(props) {
|
41
|
+
return /*#__PURE__*/_react.default.createElement(_icons.ChartVennDiagram, (0, _extends2.default)({
|
42
|
+
size: 16
|
43
|
+
}, props));
|
44
|
+
},
|
45
|
+
text: 'Venn Diagram'
|
46
|
+
}];
|
47
|
+
exports.inlineEditSelectItems = inlineEditSelectItems;
|
48
|
+
|
49
|
+
var getInlineEditColumns = function getInlineEditColumns() {
|
50
|
+
return [{
|
51
|
+
Header: 'Row Index',
|
52
|
+
accessor: function accessor(row, i) {
|
53
|
+
return i;
|
54
|
+
},
|
55
|
+
id: 'rowIndex' // id is required when accessor is a function.
|
56
|
+
|
57
|
+
}, {
|
58
|
+
Header: 'First Name',
|
59
|
+
accessor: 'firstName',
|
60
|
+
inlineEdit: {
|
61
|
+
type: 'text',
|
62
|
+
// required for including validation, this is used to set the invalid prop internally
|
63
|
+
validator: function validator(n) {
|
64
|
+
return n.length > 40;
|
65
|
+
},
|
66
|
+
// These props are passed to the Carbon component used for inline editing
|
67
|
+
inputProps: {
|
68
|
+
invalidText: 'Invalid text, character count must be less than 40'
|
69
|
+
}
|
70
|
+
}
|
71
|
+
}, {
|
72
|
+
Header: 'Last Name',
|
73
|
+
accessor: 'lastName',
|
74
|
+
inlineEdit: {
|
75
|
+
type: 'text',
|
76
|
+
// required for including validation, this is used to set the invalid prop internally
|
77
|
+
validator: function validator(n) {
|
78
|
+
return n.length > 40;
|
79
|
+
},
|
80
|
+
// These props are passed to the Carbon component used for inline editing
|
81
|
+
inputProps: {
|
82
|
+
invalidText: 'Invalid text, character count must be less than 40'
|
83
|
+
}
|
84
|
+
}
|
85
|
+
}, {
|
86
|
+
Header: 'Age',
|
87
|
+
accessor: 'age',
|
88
|
+
width: 120,
|
89
|
+
inlineEdit: {
|
90
|
+
// required for including validation, this is used to set the invalid prop internally
|
91
|
+
validator: function validator(n) {
|
92
|
+
return n && n < 18;
|
93
|
+
},
|
94
|
+
type: 'number',
|
95
|
+
// These props are passed to the Carbon component used for inline editing
|
96
|
+
inputProps: {
|
97
|
+
invalidText: 'Invalid number, must be 18 or greater'
|
98
|
+
}
|
99
|
+
}
|
100
|
+
}, {
|
101
|
+
Header: 'Visits',
|
102
|
+
accessor: 'visits',
|
103
|
+
width: 120,
|
104
|
+
inlineEdit: {
|
105
|
+
type: 'number',
|
106
|
+
inputProps: {} // These props are passed to the Carbon component used for inline editing
|
107
|
+
|
108
|
+
}
|
109
|
+
}, {
|
110
|
+
Header: 'Active since',
|
111
|
+
accessor: 'activeSince',
|
112
|
+
inlineEdit: {
|
113
|
+
type: 'date',
|
114
|
+
inputProps: {
|
115
|
+
// optionally pass props here to be passed through to Carbon's DatePicker component
|
116
|
+
onChange: function onChange(newDateObj, cell) {
|
117
|
+
console.log(newDateObj, cell);
|
118
|
+
},
|
119
|
+
// optionally pass props here to be passed through to Carbon's DatePickerInput component
|
120
|
+
datePickerInputProps: {
|
121
|
+
labelText: 'Change active since date'
|
122
|
+
}
|
123
|
+
}
|
124
|
+
}
|
125
|
+
}, {
|
126
|
+
Header: 'Chart type',
|
127
|
+
accessor: 'chartType',
|
128
|
+
inlineEdit: {
|
129
|
+
type: 'selection',
|
130
|
+
inputProps: {
|
131
|
+
// These props are passed to the Carbon component used for inline editing
|
132
|
+
items: inlineEditSelectItems,
|
133
|
+
onChange: function onChange(item) {
|
134
|
+
return console.log(item);
|
135
|
+
}
|
136
|
+
}
|
137
|
+
}
|
138
|
+
}, {
|
139
|
+
Header: 'Someone 2',
|
140
|
+
accessor: 'someone2'
|
141
|
+
}, {
|
142
|
+
Header: 'Someone 3',
|
143
|
+
accessor: 'someone3'
|
144
|
+
}, {
|
145
|
+
Header: 'Someone 4',
|
146
|
+
accessor: 'someone4'
|
147
|
+
}, {
|
148
|
+
Header: 'Someone 5',
|
149
|
+
accessor: 'someone5'
|
150
|
+
}, {
|
151
|
+
Header: 'Someone 6',
|
152
|
+
accessor: 'someone6'
|
153
|
+
}, {
|
154
|
+
Header: 'Someone 7',
|
155
|
+
accessor: 'someone7'
|
156
|
+
}, {
|
157
|
+
Header: 'Someone 8',
|
158
|
+
accessor: 'someone8'
|
159
|
+
}, {
|
160
|
+
Header: 'Someone 9',
|
161
|
+
accessor: 'someone9'
|
162
|
+
}, {
|
163
|
+
Header: 'Someone 10',
|
164
|
+
accessor: 'someone10'
|
165
|
+
}];
|
166
|
+
};
|
167
|
+
|
168
|
+
exports.getInlineEditColumns = getInlineEditColumns;
|
@@ -13,10 +13,27 @@ var _react = _interopRequireDefault(require("react"));
|
|
13
13
|
|
14
14
|
var _namor = _interopRequireDefault(require("namor"));
|
15
15
|
|
16
|
+
var _StatusIcon = require("../../StatusIcon");
|
17
|
+
|
18
|
+
var _getInlineEditColumns = require("./getInlineEditColumns");
|
19
|
+
|
16
20
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
17
21
|
|
18
22
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
19
23
|
|
24
|
+
var getRandomInteger = function getRandomInteger(min, max, decimalPlaces) {
|
25
|
+
var roundedMin = Math.ceil(min);
|
26
|
+
var roundedMax = Math.floor(max);
|
27
|
+
var randomNumber = Math.random() * (max - min) + min;
|
28
|
+
|
29
|
+
if (!decimalPlaces) {
|
30
|
+
return Math.floor(Math.random() * (roundedMax - roundedMin + 1)) + roundedMin;
|
31
|
+
}
|
32
|
+
|
33
|
+
var power = Math.pow(10, decimalPlaces);
|
34
|
+
return Math.floor(randomNumber * power) / power;
|
35
|
+
};
|
36
|
+
|
20
37
|
var makeData = function makeData() {
|
21
38
|
for (var _len = arguments.length, lens = new Array(_len), _key = 0; _key < _len; _key++) {
|
22
39
|
lens[_key] = arguments[_key];
|
@@ -49,8 +66,32 @@ var range = function range(len) {
|
|
49
66
|
|
50
67
|
exports.range = range;
|
51
68
|
|
69
|
+
var renderStatusIcon = function renderStatusIcon(statusChance) {
|
70
|
+
var iconProps = {
|
71
|
+
size: 'sm',
|
72
|
+
theme: 'light',
|
73
|
+
kind: statusChance > 0.66 ? 'critical' : statusChance > 0.33 ? 'minor-warning' : 'normal',
|
74
|
+
iconDescription: statusChance > 0.66 ? 'Critical' : statusChance > 0.33 ? 'Minor warning' : 'Normal'
|
75
|
+
};
|
76
|
+
return /*#__PURE__*/_react.default.createElement(_StatusIcon.StatusIcon, iconProps);
|
77
|
+
};
|
78
|
+
|
79
|
+
var renderDocLink = function renderDocLink(statusChance) {
|
80
|
+
var docLinkObj = {
|
81
|
+
href: statusChance > 0.66 ? 'http://carbondesignsystem.com/' : statusChance > 0.33 ? 'https://pages.github.ibm.com/cdai-design/pal/' : 'http://carbon-for-ibm-products.netlify.app/',
|
82
|
+
text: statusChance > 0.66 ? 'Carbon Design System' : statusChance > 0.33 ? 'Carbon for IBM Products PAL' : 'Carbon for IBM Products storybook'
|
83
|
+
};
|
84
|
+
return docLinkObj;
|
85
|
+
};
|
86
|
+
|
52
87
|
var newPerson = function newPerson() {
|
53
88
|
var statusChance = Math.random();
|
89
|
+
var initialChartTypeIndex = getRandomInteger(0, 2);
|
90
|
+
var activeSinceDate = new Date();
|
91
|
+
var yesterdayDate = new Date();
|
92
|
+
yesterdayDate.setDate(yesterdayDate.getDate() - 1);
|
93
|
+
var twoDaysAgoDate = new Date();
|
94
|
+
twoDaysAgoDate.setDate(twoDaysAgoDate.getDate() - 2);
|
54
95
|
return {
|
55
96
|
firstName: _namor.default.generate({
|
56
97
|
words: 1,
|
@@ -104,7 +145,7 @@ var newPerson = function newPerson() {
|
|
104
145
|
numbers: 0
|
105
146
|
}),
|
106
147
|
someone11: _namor.default.generate({
|
107
|
-
words:
|
148
|
+
words: 4,
|
108
149
|
numbers: 0
|
109
150
|
}),
|
110
151
|
someone12: _namor.default.generate({
|
@@ -143,7 +184,12 @@ var newPerson = function newPerson() {
|
|
143
184
|
words: 1,
|
144
185
|
numbers: 0
|
145
186
|
}),
|
146
|
-
status: statusChance > 0.66 ? 'relationship' : statusChance > 0.33 ? 'complicated' : 'single'
|
187
|
+
status: statusChance > 0.66 ? 'relationship' : statusChance > 0.33 ? 'complicated' : 'single',
|
188
|
+
chartType: initialChartTypeIndex === 0 ? _getInlineEditColumns.inlineEditSelectItems[0] : initialChartTypeIndex === 1 ? _getInlineEditColumns.inlineEditSelectItems[1] : _getInlineEditColumns.inlineEditSelectItems[2],
|
189
|
+
activeSince: statusChance > 0.66 ? activeSinceDate : statusChance > 0.33 ? yesterdayDate : twoDaysAgoDate,
|
190
|
+
bonus: "$\r".concat(getRandomInteger(100, 500, 2)),
|
191
|
+
status_icon: renderStatusIcon(statusChance),
|
192
|
+
doc_link: renderDocLink(statusChance)
|
147
193
|
};
|
148
194
|
};
|
149
195
|
|
@@ -23,7 +23,7 @@ var _react2 = require("@carbon/react");
|
|
23
23
|
|
24
24
|
var _classnames = _interopRequireDefault(require("classnames"));
|
25
25
|
|
26
|
-
var
|
26
|
+
var _icons = require("@carbon/react/icons");
|
27
27
|
|
28
28
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
29
29
|
|
@@ -193,10 +193,10 @@ var ExportModal = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
193
193
|
}, loading && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_react2.Loading, {
|
194
194
|
small: true,
|
195
195
|
withOverlay: false
|
196
|
-
}), /*#__PURE__*/_react.default.createElement("p", null, loadingMessage)), successful && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(
|
196
|
+
}), /*#__PURE__*/_react.default.createElement("p", null, loadingMessage)), successful && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_icons.CheckmarkFilled, {
|
197
197
|
size: 16,
|
198
198
|
className: "".concat(blockClass, "__checkmark-icon")
|
199
|
-
}), /*#__PURE__*/_react.default.createElement("p", null, successMessage)), error && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(
|
199
|
+
}), /*#__PURE__*/_react.default.createElement("p", null, successMessage)), error && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_icons.ErrorFilled, {
|
200
200
|
size: 16,
|
201
201
|
className: "".concat(blockClass, "__error-icon")
|
202
202
|
}), /*#__PURE__*/_react.default.createElement("p", null, errorMessage)))), !submitted && /*#__PURE__*/_react.default.createElement(_react2.ModalFooter, {
|
@@ -25,7 +25,7 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
|
|
25
25
|
|
26
26
|
var _react = _interopRequireWildcard(require("react"));
|
27
27
|
|
28
|
-
var
|
28
|
+
var _icons = require("@carbon/react/icons");
|
29
29
|
|
30
30
|
var _react2 = require("@carbon/react");
|
31
31
|
|
@@ -100,9 +100,9 @@ var ImportModal = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
100
100
|
var acceptSet = new Set(accept);
|
101
101
|
var name = file.name;
|
102
102
|
var mimeType = file.type;
|
103
|
-
var extension = name.split('.').pop();
|
103
|
+
var extension = ".".concat(name.split('.').pop());
|
104
104
|
|
105
|
-
if (acceptSet.has(mimeType) || acceptSet.has(extension)) {
|
105
|
+
if (acceptSet.has(mimeType) || acceptSet.has(extension) || accept.length === 0) {
|
106
106
|
return false;
|
107
107
|
}
|
108
108
|
|
@@ -279,7 +279,7 @@ var ImportModal = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
279
279
|
size: "sm",
|
280
280
|
disabled: importButtonDisabled,
|
281
281
|
renderIcon: inputButtonIcon ? function (props) {
|
282
|
-
return /*#__PURE__*/_react.default.createElement(
|
282
|
+
return /*#__PURE__*/_react.default.createElement(_icons.Add, (0, _extends2.default)({
|
283
283
|
size: 20
|
284
284
|
}, props));
|
285
285
|
} : null
|
@@ -31,7 +31,7 @@ var _settings = require("../../settings");
|
|
31
31
|
|
32
32
|
var _react2 = require("@carbon/react");
|
33
33
|
|
34
|
-
var
|
34
|
+
var _icons = require("@carbon/react/icons");
|
35
35
|
|
36
36
|
var _excluded = ["buttonTooltipAlignment", "buttonTooltipPosition", "cancelDescription", "className", "disabled", "editAlwaysVisible", "editDescription", "id", "invalid", "invalidText", "labelText", "light", "onCancel", "onSave", "onChange", "placeholder", "saveDescription", "size", "value"];
|
37
37
|
|
@@ -56,7 +56,7 @@ var buttons = ['cancel', 'edit', 'save'];
|
|
56
56
|
*/
|
57
57
|
|
58
58
|
var InlineEdit = /*#__PURE__*/_react.default.forwardRef(function (_ref, refIn) {
|
59
|
-
var _cx, _refInput$current, _refInput$current$
|
59
|
+
var _cx, _refInput$current, _refInput$current$tex, _cx3;
|
60
60
|
|
61
61
|
var buttonTooltipAlignment = _ref.buttonTooltipAlignment,
|
62
62
|
buttonTooltipPosition = _ref.buttonTooltipPosition,
|
@@ -81,7 +81,9 @@ var InlineEdit = /*#__PURE__*/_react.default.forwardRef(function (_ref, refIn) {
|
|
81
81
|
value = _ref.value,
|
82
82
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
83
83
|
var carbonPrefix = (0, _react2.usePrefix)();
|
84
|
-
var refInput = (0, _react.useRef)(
|
84
|
+
var refInput = (0, _react.useRef)({
|
85
|
+
textContent: value
|
86
|
+
});
|
85
87
|
var localRef = (0, _react.useRef)(null);
|
86
88
|
var ref = refIn || localRef;
|
87
89
|
|
@@ -99,7 +101,7 @@ var InlineEdit = /*#__PURE__*/_react.default.forwardRef(function (_ref, refIn) {
|
|
99
101
|
|
100
102
|
var validationText = invalidText; // || warnText;
|
101
103
|
|
102
|
-
var validationIcon = showValidation ? /*#__PURE__*/_react.default.createElement(
|
104
|
+
var validationIcon = showValidation ? /*#__PURE__*/_react.default.createElement(_icons.WarningFilled, {
|
103
105
|
size: 16
|
104
106
|
}) : null; // sanitize the tooltip values
|
105
107
|
|
@@ -164,15 +166,15 @@ var InlineEdit = /*#__PURE__*/_react.default.forwardRef(function (_ref, refIn) {
|
|
164
166
|
document.getSelection().removeAllRanges();
|
165
167
|
|
166
168
|
if (onSave) {
|
167
|
-
onSave(refInput.current.
|
169
|
+
onSave(refInput.current.textContent);
|
168
170
|
}
|
169
171
|
};
|
170
172
|
|
171
173
|
var handleInput = function handleInput() {
|
172
|
-
setInternalValue(refInput.current.
|
174
|
+
setInternalValue(refInput.current.textContent);
|
173
175
|
|
174
176
|
if (onChange) {
|
175
|
-
onChange(refInput.current.
|
177
|
+
onChange(refInput.current.textContent);
|
176
178
|
}
|
177
179
|
}; // pasting into contentEditable not supported by userEvent
|
178
180
|
|
@@ -207,7 +209,7 @@ var InlineEdit = /*#__PURE__*/_react.default.forwardRef(function (_ref, refIn) {
|
|
207
209
|
};
|
208
210
|
|
209
211
|
var handleCancel = function handleCancel() {
|
210
|
-
refInput.current.
|
212
|
+
refInput.current.textContent = value;
|
211
213
|
handleInput(value);
|
212
214
|
doSetEditing(false);
|
213
215
|
document.getSelection().removeAllRanges();
|
@@ -275,7 +277,7 @@ var InlineEdit = /*#__PURE__*/_react.default.forwardRef(function (_ref, refIn) {
|
|
275
277
|
}, /*#__PURE__*/_react.default.createElement("div", (0, _extends2.default)({}, rest, (0, _devtools.getDevtoolsProps)(componentName), {
|
276
278
|
id: id,
|
277
279
|
size: size,
|
278
|
-
className: (0, _classnames.default)("".concat(blockClass, "__input"), (0, _defineProperty2.default)({}, "".concat(blockClass, "__input--empty"), ((_refInput$current = refInput.current) === null || _refInput$current === void 0 ? void 0 : (_refInput$current$
|
280
|
+
className: (0, _classnames.default)("".concat(blockClass, "__input"), (0, _defineProperty2.default)({}, "".concat(blockClass, "__input--empty"), ((_refInput$current = refInput.current) === null || _refInput$current === void 0 ? void 0 : (_refInput$current$tex = _refInput$current.textContent) === null || _refInput$current$tex === void 0 ? void 0 : _refInput$current$tex.length) === 0)),
|
279
281
|
contentEditable: true,
|
280
282
|
"aria-label": labelText,
|
281
283
|
role: "textbox",
|
@@ -286,7 +288,7 @@ var InlineEdit = /*#__PURE__*/_react.default.forwardRef(function (_ref, refIn) {
|
|
286
288
|
onPaste: handlePaste,
|
287
289
|
suppressContentEditableWarning: true,
|
288
290
|
ref: refInput,
|
289
|
-
"data-placeholder": placeholder
|
291
|
+
"data-placeholder": placeholder
|
290
292
|
}), value), /*#__PURE__*/_react.default.createElement("div", {
|
291
293
|
className: (0, _classnames.default)("".concat(blockClass, "__after-input-elements")) // tabindex -1 fixes blur target test when clicking on after-input-elements background
|
292
294
|
,
|
@@ -305,7 +307,7 @@ var InlineEdit = /*#__PURE__*/_react.default.forwardRef(function (_ref, refIn) {
|
|
305
307
|
iconDescription: cancelDescription,
|
306
308
|
onClick: handleCancel,
|
307
309
|
renderIcon: function renderIcon(props) {
|
308
|
-
return /*#__PURE__*/_react.default.createElement(
|
310
|
+
return /*#__PURE__*/_react.default.createElement(_icons.Close, (0, _extends2.default)({
|
309
311
|
size: 16
|
310
312
|
}, props));
|
311
313
|
}
|
@@ -316,7 +318,7 @@ var InlineEdit = /*#__PURE__*/_react.default.forwardRef(function (_ref, refIn) {
|
|
316
318
|
iconDescription: saveDescription,
|
317
319
|
onClick: handleSave,
|
318
320
|
renderIcon: function renderIcon(props) {
|
319
|
-
return /*#__PURE__*/_react.default.createElement(
|
321
|
+
return /*#__PURE__*/_react.default.createElement(_icons.Checkmark, (0, _extends2.default)({
|
320
322
|
size: 16
|
321
323
|
}, props));
|
322
324
|
},
|
@@ -327,9 +329,9 @@ var InlineEdit = /*#__PURE__*/_react.default.forwardRef(function (_ref, refIn) {
|
|
327
329
|
label: editDescription,
|
328
330
|
onClick: handleEdit,
|
329
331
|
disabled: disabled
|
330
|
-
}, tipPositions.edit), disabled ? /*#__PURE__*/_react.default.createElement(
|
332
|
+
}, tipPositions.edit), disabled ? /*#__PURE__*/_react.default.createElement(_icons.EditOff, {
|
331
333
|
size: 16
|
332
|
-
}) : /*#__PURE__*/_react.default.createElement(
|
334
|
+
}) : /*#__PURE__*/_react.default.createElement(_icons.Edit, {
|
333
335
|
size: 16
|
334
336
|
})))), /*#__PURE__*/_react.default.createElement("div", {
|
335
337
|
className: (0, _classnames.default)("".concat(blockClass, "__disabled-cover"))
|
@@ -11,7 +11,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
11
11
|
|
12
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
13
13
|
|
14
|
-
var
|
14
|
+
var _icons = require("@carbon/react/icons");
|
15
15
|
|
16
16
|
var _settings = require("../../settings");
|
17
17
|
|
@@ -31,7 +31,7 @@ var ModifiedTabLabelNew = function ModifiedTabLabelNew(_ref) {
|
|
31
31
|
className: "".concat(blockClass, "__tab-new__label")
|
32
32
|
}, label), /*#__PURE__*/_react.default.createElement("span", {
|
33
33
|
className: "".concat(blockClass, "__tab-new-img")
|
34
|
-
}, /*#__PURE__*/_react.default.createElement(
|
34
|
+
}, /*#__PURE__*/_react.default.createElement(_icons.Add, {
|
35
35
|
size: 20
|
36
36
|
})));
|
37
37
|
};
|
@@ -11,7 +11,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
11
11
|
|
12
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
13
13
|
|
14
|
-
var
|
14
|
+
var _icons = require("@carbon/react/icons");
|
15
15
|
|
16
16
|
var _settings = require("../../settings");
|
17
17
|
|
@@ -37,9 +37,9 @@ var ModifiedTabLabelWithClose = function ModifiedTabLabelWithClose(_ref) {
|
|
37
37
|
onClick: handleClose,
|
38
38
|
className: "".concat(blockClass, "__tab-close"),
|
39
39
|
type: "button"
|
40
|
-
}, unsavedContent ? /*#__PURE__*/_react.default.createElement(
|
40
|
+
}, unsavedContent ? /*#__PURE__*/_react.default.createElement(_icons.CloseFilled, {
|
41
41
|
size: 16
|
42
|
-
}) : /*#__PURE__*/_react.default.createElement(
|
42
|
+
}) : /*#__PURE__*/_react.default.createElement(_icons.Close, {
|
43
43
|
size: 16
|
44
44
|
})));
|
45
45
|
};
|
@@ -35,7 +35,7 @@ var _NotificationsEmptyState = require("../EmptyStates/NotificationsEmptyState")
|
|
35
35
|
|
36
36
|
var _react2 = require("@carbon/react");
|
37
37
|
|
38
|
-
var
|
38
|
+
var _icons = require("@carbon/react/icons");
|
39
39
|
|
40
40
|
var _excluded = ["className", "data", "daysAgoText", "dismissAllLabel", "dismissSingleNotificationIconDescription", "doNotDisturbDefaultToggled", "doNotDisturbLabel", "emptyStateLabel", "hourAgoText", "hoursAgoText", "minuteAgoText", "minutesAgoText", "monthAgoText", "monthsAgoText", "nowText", "onClickOutside", "onDismissAllNotifications", "onDismissSingleNotification", "onDoNotDisturbChange", "onSettingsClick", "onViewAllClick", "open", "previousLabel", "readLessLabel", "readMoreLabel", "secondsAgoText", "settingsIconDescription", "title", "todayLabel", "viewAllLabel", "yearAgoText", "yearsAgoText", "yesterdayAtText", "yesterdayLabel"];
|
41
41
|
|
@@ -250,7 +250,7 @@ var NotificationsPanel = /*#__PURE__*/_react.default.forwardRef(function (_ref,
|
|
250
250
|
kind: "ghost",
|
251
251
|
size: "sm",
|
252
252
|
renderIcon: function renderIcon(props) {
|
253
|
-
return /*#__PURE__*/_react.default.createElement(
|
253
|
+
return /*#__PURE__*/_react.default.createElement(_icons.ChevronDown, (0, _extends2.default)({
|
254
254
|
size: 16
|
255
255
|
}, props));
|
256
256
|
},
|
@@ -293,16 +293,16 @@ var NotificationsPanel = /*#__PURE__*/_react.default.forwardRef(function (_ref,
|
|
293
293
|
|
294
294
|
event.which === 13 && notification.onNotificationClick(notification);
|
295
295
|
}
|
296
|
-
}, notification.type === 'error' && /*#__PURE__*/_react.default.createElement(
|
296
|
+
}, notification.type === 'error' && /*#__PURE__*/_react.default.createElement(_icons.ErrorFilled, {
|
297
297
|
size: 16,
|
298
298
|
className: (0, _classnames.default)(["".concat(blockClass, "__notification-status-icon"), "".concat(blockClass, "__notification-status-icon-error")])
|
299
|
-
}), notification.type === 'success' && /*#__PURE__*/_react.default.createElement(
|
299
|
+
}), notification.type === 'success' && /*#__PURE__*/_react.default.createElement(_icons.CheckmarkFilled, {
|
300
300
|
size: 16,
|
301
301
|
className: (0, _classnames.default)(["".concat(blockClass, "__notification-status-icon"), "".concat(blockClass, "__notification-status-icon-success")])
|
302
|
-
}), notification.type === 'warning' && /*#__PURE__*/_react.default.createElement(
|
302
|
+
}), notification.type === 'warning' && /*#__PURE__*/_react.default.createElement(_icons.WarningAltFilled, {
|
303
303
|
size: 16,
|
304
304
|
className: (0, _classnames.default)(["".concat(blockClass, "__notification-status-icon"), "".concat(blockClass, "__notification-status-icon-warning")])
|
305
|
-
}), notification.type === 'informational' && /*#__PURE__*/_react.default.createElement(
|
305
|
+
}), notification.type === 'informational' && /*#__PURE__*/_react.default.createElement(_icons.InformationSquareFilled, {
|
306
306
|
size: 16,
|
307
307
|
className: (0, _classnames.default)(["".concat(blockClass, "__notification-status-icon"), "".concat(blockClass, "__notification-status-icon-informational")])
|
308
308
|
}), /*#__PURE__*/_react.default.createElement("div", {
|
@@ -337,7 +337,7 @@ var NotificationsPanel = /*#__PURE__*/_react.default.forwardRef(function (_ref,
|
|
337
337
|
onClick: function onClick(event) {
|
338
338
|
return dismissSingleNotification(event, notification);
|
339
339
|
}
|
340
|
-
}, /*#__PURE__*/_react.default.createElement(
|
340
|
+
}, /*#__PURE__*/_react.default.createElement(_icons.Close, {
|
341
341
|
size: 16
|
342
342
|
})));
|
343
343
|
};
|
@@ -413,7 +413,7 @@ var NotificationsPanel = /*#__PURE__*/_react.default.forwardRef(function (_ref,
|
|
413
413
|
size: "sm",
|
414
414
|
className: "".concat(blockClass, "__settings-button"),
|
415
415
|
renderIcon: function renderIcon(props) {
|
416
|
-
return /*#__PURE__*/_react.default.createElement(
|
416
|
+
return /*#__PURE__*/_react.default.createElement(_icons.Settings, (0, _extends2.default)({
|
417
417
|
size: 16
|
418
418
|
}, props));
|
419
419
|
},
|
@@ -31,7 +31,7 @@ var _settings = require("../../settings");
|
|
31
31
|
|
32
32
|
var _react2 = require("@carbon/react");
|
33
33
|
|
34
|
-
var
|
34
|
+
var _icons = require("@carbon/react/icons");
|
35
35
|
|
36
36
|
var carbonMotion = _interopRequireWildcard(require("@carbon/motion"));
|
37
37
|
|
@@ -194,15 +194,15 @@ var OptionsTile = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
|
|
194
194
|
var summaryClasses = ["".concat(blockClass, "__summary")];
|
195
195
|
|
196
196
|
if (invalid) {
|
197
|
-
Icon =
|
197
|
+
Icon = _icons.WarningFilled;
|
198
198
|
text = invalidText;
|
199
199
|
summaryClasses.push("".concat(blockClass, "__summary--invalid"));
|
200
200
|
} else if (warn) {
|
201
|
-
Icon =
|
201
|
+
Icon = _icons.WarningAltFilled;
|
202
202
|
text = warnText;
|
203
203
|
summaryClasses.push("".concat(blockClass, "__summary--warn"));
|
204
204
|
} else if (locked) {
|
205
|
-
Icon =
|
205
|
+
Icon = _icons.Locked;
|
206
206
|
summaryClasses.push("".concat(blockClass, "__summary--locked"));
|
207
207
|
|
208
208
|
if (!text) {
|
@@ -256,7 +256,7 @@ var OptionsTile = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
|
|
256
256
|
}, /*#__PURE__*/_react.default.createElement("summary", {
|
257
257
|
className: "".concat(blockClass, "__header"),
|
258
258
|
onClick: toggle
|
259
|
-
}, /*#__PURE__*/_react.default.createElement(
|
259
|
+
}, /*#__PURE__*/_react.default.createElement(_icons.ChevronDown, {
|
260
260
|
size: 16,
|
261
261
|
className: "".concat(blockClass, "__chevron")
|
262
262
|
}), renderTitle()), /*#__PURE__*/_react.default.createElement("div", {
|
@@ -264,7 +264,7 @@ var OptionsTile = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
|
|
264
264
|
ref: contentRef
|
265
265
|
}, isLocked && /*#__PURE__*/_react.default.createElement("p", {
|
266
266
|
className: "".concat(blockClass, "__locked-text")
|
267
|
-
}, /*#__PURE__*/_react.default.createElement(
|
267
|
+
}, /*#__PURE__*/_react.default.createElement(_icons.Locked, {
|
268
268
|
size: 16
|
269
269
|
}), lockedText), children)) : /*#__PURE__*/_react.default.createElement("div", {
|
270
270
|
className: "".concat(blockClass, "__static-content")
|
@@ -45,7 +45,7 @@ var _TagSet = require("../TagSet/TagSet");
|
|
45
45
|
|
46
46
|
var _ButtonSetWithOverflow = require("../ButtonSetWithOverflow");
|
47
47
|
|
48
|
-
var
|
48
|
+
var _icons = require("@carbon/react/icons");
|
49
49
|
|
50
50
|
var _PageHeaderUtils = require("./PageHeaderUtils");
|
51
51
|
|
@@ -484,7 +484,7 @@ var PageHeader = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
|
|
484
484
|
kind: "ghost",
|
485
485
|
onClick: handleCollapseToggle,
|
486
486
|
renderIcon: function renderIcon(props) {
|
487
|
-
return /*#__PURE__*/_react.default.createElement(
|
487
|
+
return /*#__PURE__*/_react.default.createElement(_icons.ChevronUp, (0, _extends2.default)({
|
488
488
|
size: 16
|
489
489
|
}, props));
|
490
490
|
},
|
@@ -135,6 +135,11 @@ ProductiveCard.propTypes = {
|
|
135
135
|
*/
|
136
136
|
primaryButtonIcon: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object]),
|
137
137
|
|
138
|
+
/**
|
139
|
+
* Determines if the primary button is on the top or bottom of the card
|
140
|
+
*/
|
141
|
+
primaryButtonPlacement: _propTypes.default.oneOf(['top', 'bottom']),
|
142
|
+
|
138
143
|
/**
|
139
144
|
* The text that's displayed in the primary button
|
140
145
|
*/
|
@@ -21,7 +21,7 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
21
21
|
|
22
22
|
var _react2 = require("@carbon/react");
|
23
23
|
|
24
|
-
var
|
24
|
+
var _icons = require("@carbon/react/icons");
|
25
25
|
|
26
26
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
27
27
|
|
@@ -59,7 +59,7 @@ var Saving = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
59
59
|
text: defaultText,
|
60
60
|
iconDescription: defaultIconDescription,
|
61
61
|
icon: function icon(props) {
|
62
|
-
return /*#__PURE__*/_react.default.createElement(
|
62
|
+
return /*#__PURE__*/_react.default.createElement(_icons.CheckmarkOutline, (0, _extends2.default)({
|
63
63
|
size: 16
|
64
64
|
}, props));
|
65
65
|
}
|
@@ -76,7 +76,7 @@ var Saving = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
76
76
|
text: successText,
|
77
77
|
iconDescription: successIconDescription,
|
78
78
|
icon: function icon(props) {
|
79
|
-
return /*#__PURE__*/_react.default.createElement(
|
79
|
+
return /*#__PURE__*/_react.default.createElement(_icons.Save, (0, _extends2.default)({
|
80
80
|
size: 16
|
81
81
|
}, props));
|
82
82
|
}
|
@@ -84,7 +84,7 @@ var Saving = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
84
84
|
text: failText,
|
85
85
|
iconDescription: failIconDescription,
|
86
86
|
icon: function icon(props) {
|
87
|
-
return /*#__PURE__*/_react.default.createElement(
|
87
|
+
return /*#__PURE__*/_react.default.createElement(_icons.ErrorOutline, (0, _extends2.default)({
|
88
88
|
size: 16
|
89
89
|
}, props));
|
90
90
|
}
|
@@ -97,7 +97,7 @@ var Saving = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
97
97
|
className: "".concat(blockClass, "__message")
|
98
98
|
}, status === 'fail' && /*#__PURE__*/_react.default.createElement("div", {
|
99
99
|
className: "".concat(blockClass, "__error-icon")
|
100
|
-
}, /*#__PURE__*/_react.default.createElement(
|
100
|
+
}, /*#__PURE__*/_react.default.createElement(_icons.ErrorFilled, {
|
101
101
|
size: 16
|
102
102
|
})), /*#__PURE__*/_react.default.createElement("p", {
|
103
103
|
className: "".concat(blockClass, "__text")
|