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