@carbon/ibm-products 2.39.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 +9 -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 +9 -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 +9 -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 +1 -1
- 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.js +4 -3
- package/es/components/DataSpreadsheet/DataSpreadsheetHeader.js +5 -0
- package/es/components/Datagrid/Datagrid/DatagridVirtualBody.js +5 -1
- package/es/components/ExpressiveCard/ExpressiveCard.d.ts +2 -1
- package/es/components/Guidebanner/Guidebanner.d.ts +62 -2
- package/es/components/Guidebanner/Guidebanner.js +8 -7
- 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.js +0 -1
- 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 +17 -2
- 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/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/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/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 +1 -1
- 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.js +4 -3
- package/lib/components/DataSpreadsheet/DataSpreadsheetHeader.js +5 -0
- package/lib/components/Datagrid/Datagrid/DatagridVirtualBody.js +5 -1
- package/lib/components/ExpressiveCard/ExpressiveCard.d.ts +2 -1
- package/lib/components/Guidebanner/Guidebanner.d.ts +62 -2
- package/lib/components/Guidebanner/Guidebanner.js +8 -7
- 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.js +0 -1
- 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 +17 -2
- 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/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/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/package.json +3 -3
- package/scss/components/CoachmarkStack/_coachmark-stack.scss +4 -2
- package/scss/components/SidePanel/_side-panel-variables.scss +1 -0
- package/scss/components/StringFormatter/_string-formatter.scss +1 -1
- package/telemetry.yml +2 -0
@@ -131,7 +131,7 @@ var AddSelectBody = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
131
131
|
};
|
132
132
|
var onCloseHandler = function onCloseHandler() {
|
133
133
|
resetState();
|
134
|
-
onClose();
|
134
|
+
onClose === null || onClose === void 0 || onClose();
|
135
135
|
};
|
136
136
|
var tearsheetClassnames = cx__default["default"](className, blockClass, _rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty({}, "".concat(blockClass, "__single"), !multi), "".concat(blockClass, "__multi"), multi));
|
137
137
|
var globalFilterKeys = Object.keys(appliedGlobalFilters);
|
@@ -145,17 +145,17 @@ var AddSelectBody = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
145
145
|
setAppliedGlobalFilters(filters);
|
146
146
|
};
|
147
147
|
var submitHandler = function submitHandler() {
|
148
|
-
if (multi && appliedModifiers.length > 0) {
|
148
|
+
if (multi && appliedModifiers && (appliedModifiers === null || appliedModifiers === void 0 ? void 0 : appliedModifiers.length) > 0) {
|
149
149
|
var selections = multiSelection.map(function (item) {
|
150
150
|
return appliedModifiers.find(function (mod) {
|
151
151
|
return mod.id === item;
|
152
152
|
});
|
153
153
|
});
|
154
|
-
onSubmit(selections);
|
155
|
-
} else if (multi && appliedModifiers.length === 0) {
|
156
|
-
onSubmit(multiSelection);
|
154
|
+
onSubmit === null || onSubmit === void 0 || onSubmit(selections);
|
155
|
+
} else if (multi && (appliedModifiers === null || appliedModifiers === void 0 ? void 0 : appliedModifiers.length) === 0) {
|
156
|
+
onSubmit === null || onSubmit === void 0 || onSubmit(multiSelection);
|
157
157
|
} else {
|
158
|
-
onSubmit(singleSelection);
|
158
|
+
onSubmit === null || onSubmit === void 0 || onSubmit(singleSelection);
|
159
159
|
}
|
160
160
|
onCloseHandler();
|
161
161
|
};
|
@@ -222,9 +222,9 @@ var AddSelectBody = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
222
222
|
displayMetalPanel: displayMetalPanel,
|
223
223
|
illustrationTheme: illustrationTheme,
|
224
224
|
influencerTitle: influencerTitle,
|
225
|
-
items: useNormalizedItems ? normalizedItems : items.entries,
|
225
|
+
items: useNormalizedItems ? normalizedItems : items === null || items === void 0 ? void 0 : items.entries,
|
226
226
|
metaPanelTitle: metaPanelTitle,
|
227
|
-
modifiers: items.modifiers,
|
227
|
+
modifiers: items === null || items === void 0 ? void 0 : items.modifiers,
|
228
228
|
multiSelection: multiSelection,
|
229
229
|
noSelectionDescription: noSelectionDescription,
|
230
230
|
noSelectionTitle: noSelectionTitle,
|
@@ -266,11 +266,8 @@ var AddSelectBody = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
266
266
|
type: "gray",
|
267
267
|
size: "sm"
|
268
268
|
}, itemsToDisplay.length)), showSort && /*#__PURE__*/React__default["default"].createElement(AddSelectSort.AddSelectSort, {
|
269
|
-
items: itemsToDisplay,
|
270
269
|
setSortAttribute: setSortAttribute,
|
271
270
|
setSortDirection: setSortDirection,
|
272
|
-
sortAttribute: sortAttribute,
|
273
|
-
sortDirection: sortDirection,
|
274
271
|
sortBy: globalSortBy
|
275
272
|
}))), displayColumnView ? /*#__PURE__*/React__default["default"].createElement("div", {
|
276
273
|
className: "".concat(blockClass, "__columns")
|
@@ -282,7 +279,7 @@ var AddSelectBody = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
282
279
|
sortByLabel: sortByLabel
|
283
280
|
}))) : /*#__PURE__*/React__default["default"].createElement("div", null, hasResults ? /*#__PURE__*/React__default["default"].createElement(AddSelectList.AddSelectList, _rollupPluginBabelHelpers["extends"]({}, commonListProps, {
|
284
281
|
filteredItems: itemsToDisplay,
|
285
|
-
modifiers: items.modifiers,
|
282
|
+
modifiers: items === null || items === void 0 ? void 0 : items.modifiers,
|
286
283
|
appliedModifiers: appliedModifiers,
|
287
284
|
setAppliedModifiers: setAppliedModifiers,
|
288
285
|
setParentSelected: parentSelectionHandler,
|
@@ -322,6 +319,7 @@ AddSelectBody.propTypes = {
|
|
322
319
|
globalSortBy: index["default"].array,
|
323
320
|
illustrationTheme: index["default"].oneOf(['light', 'dark']),
|
324
321
|
influencerTitle: index["default"].string,
|
322
|
+
/**@ts-ignore */
|
325
323
|
items: index["default"].shape({
|
326
324
|
modifiers: index["default"].shape({
|
327
325
|
id: index["default"].string,
|
@@ -1,18 +1,17 @@
|
|
1
|
-
export function AddSelectSort({ setSortAttribute, setSortDirection, sortBy, sortByLabel, }: {
|
2
|
-
setSortAttribute: any;
|
3
|
-
setSortDirection: any;
|
4
|
-
sortBy: any;
|
5
|
-
sortByLabel: any;
|
6
|
-
}): import("react/jsx-runtime").JSX.Element;
|
7
|
-
export namespace AddSelectSort {
|
8
|
-
export namespace propTypes {
|
9
|
-
let setSortAttribute: PropTypes.Requireable<(...args: any[]) => any>;
|
10
|
-
let setSortDirection: PropTypes.Requireable<(...args: any[]) => any>;
|
11
|
-
let sortBy: PropTypes.Requireable<any[]>;
|
12
|
-
let sortByLabel: PropTypes.Requireable<string>;
|
13
|
-
}
|
14
|
-
export { componentName as displayName };
|
15
|
-
}
|
16
1
|
import PropTypes from 'prop-types';
|
17
|
-
|
18
|
-
|
2
|
+
export interface AddSelectSortProps {
|
3
|
+
setSortAttribute?: (attribute: any) => void;
|
4
|
+
setSortDirection?: (direction: any) => void;
|
5
|
+
sortBy?: Array<string>;
|
6
|
+
sortByLabel?: string;
|
7
|
+
}
|
8
|
+
export declare const AddSelectSort: {
|
9
|
+
({ setSortAttribute, setSortDirection, sortBy, sortByLabel, }: AddSelectSortProps): import("react/jsx-runtime").JSX.Element;
|
10
|
+
propTypes: {
|
11
|
+
setSortAttribute: PropTypes.Requireable<(...args: any[]) => any>;
|
12
|
+
setSortDirection: PropTypes.Requireable<(...args: any[]) => any>;
|
13
|
+
sortBy: PropTypes.Requireable<any[]>;
|
14
|
+
sortByLabel: PropTypes.Requireable<string>;
|
15
|
+
};
|
16
|
+
displayName: string;
|
17
|
+
};
|
@@ -28,7 +28,7 @@ var AddSelectSort = function AddSelectSort(_ref) {
|
|
28
28
|
setSortDirection = _ref.setSortDirection,
|
29
29
|
sortBy = _ref.sortBy,
|
30
30
|
sortByLabel = _ref.sortByLabel;
|
31
|
-
var sortByOpts = sortBy ? sortBy.reduce(function (acc, cur) {
|
31
|
+
var sortByOpts = sortBy ? sortBy === null || sortBy === void 0 ? void 0 : sortBy.reduce(function (acc, cur) {
|
32
32
|
var opts = [{
|
33
33
|
id: "".concat(cur, "-asc"),
|
34
34
|
itemText: /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, _ArrowUp || (_ArrowUp = /*#__PURE__*/React__default["default"].createElement(icons.ArrowUp, {
|
@@ -51,8 +51,8 @@ var AddSelectSort = function AddSelectSort(_ref) {
|
|
51
51
|
var sortHandler = function sortHandler(_ref2) {
|
52
52
|
var direction = _ref2.direction,
|
53
53
|
attribute = _ref2.attribute;
|
54
|
-
setSortAttribute(attribute);
|
55
|
-
setSortDirection(direction);
|
54
|
+
setSortAttribute === null || setSortAttribute === void 0 || setSortAttribute(attribute);
|
55
|
+
setSortDirection === null || setSortDirection === void 0 || setSortDirection(direction);
|
56
56
|
};
|
57
57
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
58
58
|
className: blockClass
|
@@ -69,8 +69,8 @@ var AddSelectSort = function AddSelectSort(_ref) {
|
|
69
69
|
}, sortByOpts.map(function (opt) {
|
70
70
|
return /*#__PURE__*/React__default["default"].createElement(react.OverflowMenuItem, {
|
71
71
|
className: "".concat(blockClass, "_overflow-item"),
|
72
|
-
key: opt.id,
|
73
|
-
itemText: opt.itemText,
|
72
|
+
key: opt === null || opt === void 0 ? void 0 : opt.id,
|
73
|
+
itemText: opt === null || opt === void 0 ? void 0 : opt.itemText,
|
74
74
|
onClick: function onClick() {
|
75
75
|
return sortHandler(opt);
|
76
76
|
}
|
@@ -0,0 +1,44 @@
|
|
1
|
+
import { ReactNode } from 'react';
|
2
|
+
export type Theme = 'light' | 'dark';
|
3
|
+
export interface Filter {
|
4
|
+
id?: string;
|
5
|
+
label?: string;
|
6
|
+
}
|
7
|
+
export interface Modifier {
|
8
|
+
id?: string;
|
9
|
+
label?: string;
|
10
|
+
options?: string[];
|
11
|
+
}
|
12
|
+
export interface Avatar {
|
13
|
+
alt?: string;
|
14
|
+
icon?: () => void;
|
15
|
+
src?: string;
|
16
|
+
theme?: Theme;
|
17
|
+
}
|
18
|
+
export interface Meta {
|
19
|
+
id?: string;
|
20
|
+
title?: string;
|
21
|
+
value?: string;
|
22
|
+
}
|
23
|
+
export interface Entry {
|
24
|
+
id: string;
|
25
|
+
title: string;
|
26
|
+
value: string;
|
27
|
+
avatar?: Avatar;
|
28
|
+
children?: ReactNode;
|
29
|
+
icon?: () => void | object;
|
30
|
+
meta?: Meta[] | ReactNode;
|
31
|
+
subtitle?: string;
|
32
|
+
}
|
33
|
+
export interface Item {
|
34
|
+
entries: Entry[];
|
35
|
+
modifiers?: Modifier;
|
36
|
+
sortBy?: string[];
|
37
|
+
filterBy?: string[];
|
38
|
+
}
|
39
|
+
export interface SortOption {
|
40
|
+
id?: string;
|
41
|
+
direction?: string;
|
42
|
+
attribute?: string;
|
43
|
+
itemText?: object;
|
44
|
+
}
|
@@ -27,7 +27,11 @@ export namespace BreadcrumbWithOverflow {
|
|
27
27
|
*/
|
28
28
|
label: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
29
29
|
/**
|
30
|
-
*
|
30
|
+
* An optional title label for extra long breadcrumb
|
31
|
+
*/
|
32
|
+
shortTitle: PropTypes.Requireable<string>;
|
33
|
+
/**
|
34
|
+
* A string based alternative to the children, required only if children is not of type string
|
31
35
|
*/
|
32
36
|
title: any;
|
33
37
|
}> | null | undefined)[]>;
|
@@ -28,8 +28,8 @@ var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
|
28
28
|
|
29
29
|
var _TooltipTrigger;
|
30
30
|
var _excluded = ["breadcrumbs", "className", "maxVisible", "noTrailingSlash", "overflowAriaLabel", "overflowTooltipAlign"],
|
31
|
-
_excluded2 = ["label", "key", "title", "id"],
|
32
|
-
_excluded3 = ["className", "key", "label", "title"];
|
31
|
+
_excluded2 = ["label", "key", "title", "id", "shortTitle"],
|
32
|
+
_excluded3 = ["className", "key", "label", "shortTitle", "title"];
|
33
33
|
|
34
34
|
// The block part of our conventional BEM class names (blockClass__E--M).
|
35
35
|
var blockClass = "".concat(settings.pkg.prefix, "--breadcrumb-with-overflow");
|
@@ -115,8 +115,9 @@ exports.BreadcrumbWithOverflow = function BreadcrumbWithOverflow(_ref) {
|
|
115
115
|
var label = _ref3.label,
|
116
116
|
key = _ref3.key,
|
117
117
|
title = _ref3.title,
|
118
|
-
id = _ref3.id
|
119
|
-
|
118
|
+
id = _ref3.id;
|
119
|
+
_ref3.shortTitle;
|
120
|
+
var rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref3, _excluded2);
|
120
121
|
return /*#__PURE__*/React__default["default"].createElement(react.BreadcrumbItem, _rollupPluginBabelHelpers["extends"]({
|
121
122
|
key: key
|
122
123
|
}, rest, {
|
@@ -137,13 +138,14 @@ exports.BreadcrumbWithOverflow = function BreadcrumbWithOverflow(_ref) {
|
|
137
138
|
var className = _ref4.className,
|
138
139
|
key = _ref4.key,
|
139
140
|
label = _ref4.label,
|
141
|
+
shortTitle = _ref4.shortTitle,
|
140
142
|
title = _ref4.title,
|
141
143
|
rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref4, _excluded3);
|
142
144
|
return /*#__PURE__*/React__default["default"].createElement(react.BreadcrumbItem, _rollupPluginBabelHelpers["extends"]({
|
143
145
|
key: key,
|
144
146
|
className: index > 0 || displayCount > 1 ? cx__default["default"]([className, "".concat(blockClass, "__displayed-breadcrumb")]) : className,
|
145
147
|
title: index + 1 === breadcrumbs.length ? title : null
|
146
|
-
}, rest), label);
|
148
|
+
}, rest), shortTitle || label);
|
147
149
|
});
|
148
150
|
|
149
151
|
// The breadcrumb has the form [first item] [overflow] [items 2...(n-1)] [last item].
|
@@ -305,7 +307,11 @@ exports.BreadcrumbWithOverflow.propTypes = {
|
|
305
307
|
*/
|
306
308
|
label: index["default"].node,
|
307
309
|
/**
|
308
|
-
*
|
310
|
+
* An optional title label for extra long breadcrumb
|
311
|
+
*/
|
312
|
+
shortTitle: index["default"].string,
|
313
|
+
/**
|
314
|
+
* A string based alternative to the children, required only if children is not of type string
|
309
315
|
*/
|
310
316
|
title: index["default"].string.isRequired.if(function (_ref5) {
|
311
317
|
var label = _ref5.label;
|
@@ -268,7 +268,7 @@ var Card = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
268
268
|
}, status === 'incomplete' && (_Incomplete || (_Incomplete = /*#__PURE__*/React__default["default"].createElement(icons.Incomplete, null))), status === 'complete' && (_CheckmarkOutline || (_CheckmarkOutline = /*#__PURE__*/React__default["default"].createElement(icons.CheckmarkOutline, null)))), /*#__PURE__*/React__default["default"].createElement("div", {
|
269
269
|
className: "".concat(blockClass, "__content-container")
|
270
270
|
}, /*#__PURE__*/React__default["default"].createElement("div", getHeaderBodyProps(), /*#__PURE__*/React__default["default"].createElement("div", {
|
271
|
-
className: "".concat(blockClass, "__header-
|
271
|
+
className: "".concat(blockClass, "__header-wrapper")
|
272
272
|
}, /*#__PURE__*/React__default["default"].createElement(CardHeader.CardHeader, getHeaderProps()), /*#__PURE__*/React__default["default"].createElement("div", getBodyProps(), children)), getStarted && media && /*#__PURE__*/React__default["default"].createElement("div", {
|
273
273
|
className: "".concat(blockClass, "__media")
|
274
274
|
}, media)), hasBottomBar && /*#__PURE__*/React__default["default"].createElement(CardFooter.CardFooter, getFooterProps())));
|
@@ -71,7 +71,7 @@ var CreateInfluencer = function CreateInfluencer(_ref) {
|
|
71
71
|
return /*#__PURE__*/React__default["default"].createElement(react.ProgressStep, {
|
72
72
|
label: step.title,
|
73
73
|
key: stepIndex,
|
74
|
-
secondaryLabel: step.secondaryLabel,
|
74
|
+
secondaryLabel: step.secondaryLabel || undefined,
|
75
75
|
invalid: step.invalid
|
76
76
|
});
|
77
77
|
})));
|
@@ -1,2 +1,95 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
/**
|
2
|
+
* Copyright IBM Corp. 2021, 2023
|
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, { PropsWithChildren } from 'react';
|
8
|
+
type fieldsetLegendTextProps = {
|
9
|
+
/**
|
10
|
+
* This optional prop will render your form content inside of a fieldset html element
|
11
|
+
* and is defaulted to true.
|
12
|
+
* You can set this prop to `false` if you have multiple fieldset elements or want to control the children of your Full Page's step content.
|
13
|
+
*/
|
14
|
+
hasFieldset: false;
|
15
|
+
/**
|
16
|
+
* This is the required legend text that appears above a fieldset html element for accessibility purposes.
|
17
|
+
* You can set the `hasFieldset` prop to false if you have multiple fieldset elements or want to control the children of your Full Page's step content.
|
18
|
+
* Otherwise, use CSS to hide/remove this label text.
|
19
|
+
*/
|
20
|
+
fieldsetLegendText?: string;
|
21
|
+
} | {
|
22
|
+
/**
|
23
|
+
* This optional prop will render your form content inside of a fieldset html element
|
24
|
+
* and is defaulted to true.
|
25
|
+
* You can set this prop to `false` if you have multiple fieldset elements or want to control the children of your Full Page's step content.
|
26
|
+
*/
|
27
|
+
hasFieldset?: true;
|
28
|
+
/**
|
29
|
+
* This is the required legend text that appears above a fieldset html element for accessibility purposes.
|
30
|
+
* You can set the `hasFieldset` prop to false if you have multiple fieldset elements or want to control the children of your Full Page's step content.
|
31
|
+
* Otherwise, use CSS to hide/remove this label text.
|
32
|
+
*/
|
33
|
+
fieldsetLegendText: string;
|
34
|
+
};
|
35
|
+
interface CreateTearsheetStepBaseProps extends PropsWithChildren {
|
36
|
+
/**
|
37
|
+
* Content that shows in the tearsheet step
|
38
|
+
*/
|
39
|
+
children?: React.ReactNode;
|
40
|
+
/**
|
41
|
+
* Sets an optional className to be added to the tearsheet step
|
42
|
+
*/
|
43
|
+
className?: string;
|
44
|
+
/**
|
45
|
+
* Sets an optional description on the step component
|
46
|
+
*/
|
47
|
+
description?: React.ReactNode;
|
48
|
+
/**
|
49
|
+
* This will conditionally disable the submit button in the multi step Tearsheet
|
50
|
+
*/
|
51
|
+
disableSubmit?: boolean;
|
52
|
+
/**
|
53
|
+
* This prop is used to help track dynamic steps. If this value is `false` then the step is not included in the visible steps or the ProgressIndicator
|
54
|
+
* steps. If this value is `true` then the step will be included in the list of visible steps, as well as being included in the ProgressIndicator step list
|
55
|
+
*/
|
56
|
+
includeStep?: boolean;
|
57
|
+
/**
|
58
|
+
* This prop can be used on the first step to mark it as an intro step, which will not render the progress indicator steps
|
59
|
+
*/
|
60
|
+
introStep?: boolean;
|
61
|
+
/**
|
62
|
+
* This optional prop will indicate an error icon on the progress indicator step item
|
63
|
+
*/
|
64
|
+
invalid?: boolean;
|
65
|
+
/**
|
66
|
+
* Optional function to be called on initial mount of a step.
|
67
|
+
* For example, this can be used to fetch data that is required on a particular step.
|
68
|
+
*/
|
69
|
+
onMount?: () => void;
|
70
|
+
/**
|
71
|
+
* Optional function to be called when you move to the next step.
|
72
|
+
* For example, this can be used to validate input fields before proceeding to the next step.
|
73
|
+
* This function can _optionally_ return a promise that is either resolved or rejected and the CreateTearsheet will handle the submitting state of the next button.
|
74
|
+
*/
|
75
|
+
onNext?: () => Promise<void>;
|
76
|
+
/**
|
77
|
+
* Optional function to be called when you move to the previous step.
|
78
|
+
*/
|
79
|
+
onPrevious?: () => void;
|
80
|
+
/**
|
81
|
+
* Sets the optional secondary label on the progress step component
|
82
|
+
*/
|
83
|
+
secondaryLabel?: string;
|
84
|
+
/**
|
85
|
+
* Sets an optional subtitle on the step component
|
86
|
+
*/
|
87
|
+
subtitle?: string;
|
88
|
+
/**
|
89
|
+
* Sets the title text for a tearsheet step
|
90
|
+
*/
|
91
|
+
title: React.ReactNode;
|
92
|
+
}
|
93
|
+
type CreateTearsheetStepProps = CreateTearsheetStepBaseProps & fieldsetLegendTextProps;
|
94
|
+
export declare let CreateTearsheetStep: React.ForwardRefExoticComponent<CreateTearsheetStepProps & React.RefAttributes<unknown>>;
|
95
|
+
export {};
|
@@ -55,7 +55,7 @@ exports.CreateTearsheetStep = /*#__PURE__*/React.forwardRef(function (_ref, ref)
|
|
55
55
|
rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
|
56
56
|
var stepsContext = React.useContext(CreateTearsheet.StepsContext);
|
57
57
|
var stepNumber = React.useContext(CreateTearsheet.StepNumberContext);
|
58
|
-
var _useState = React.useState(),
|
58
|
+
var _useState = React.useState(includeStep),
|
59
59
|
_useState2 = _rollupPluginBabelHelpers.slicedToArray(_useState, 2),
|
60
60
|
shouldIncludeStep = _useState2[0],
|
61
61
|
setShouldIncludeStep = _useState2[1];
|
@@ -65,11 +65,11 @@ exports.CreateTearsheetStep = /*#__PURE__*/React.forwardRef(function (_ref, ref)
|
|
65
65
|
useRetrieveStepData.useRetrieveStepData({
|
66
66
|
stepsContext: stepsContext,
|
67
67
|
stepNumber: stepNumber,
|
68
|
-
introStep: introStep,
|
68
|
+
introStep: !!introStep,
|
69
69
|
shouldIncludeStep: shouldIncludeStep,
|
70
|
-
secondaryLabel: secondaryLabel,
|
70
|
+
secondaryLabel: secondaryLabel || '',
|
71
71
|
title: title,
|
72
|
-
invalid: invalid
|
72
|
+
invalid: !!invalid
|
73
73
|
});
|
74
74
|
|
75
75
|
// This useEffect reports back the onMount value so that they can be used
|
@@ -89,7 +89,7 @@ exports.CreateTearsheetStep = /*#__PURE__*/React.forwardRef(function (_ref, ref)
|
|
89
89
|
// steps container context so that it can manage the 'Next' button appropriately.
|
90
90
|
React.useEffect(function () {
|
91
91
|
if (stepNumber === (stepsContext === null || stepsContext === void 0 ? void 0 : stepsContext.currentStep)) {
|
92
|
-
stepsContext.setIsDisabled(disableSubmit);
|
92
|
+
stepsContext.setIsDisabled(!!disableSubmit);
|
93
93
|
stepsContext === null || stepsContext === void 0 || stepsContext.setOnNext(onNext); // needs to be updated here otherwise there could be stale state values from only initially setting onNext
|
94
94
|
stepsContext === null || stepsContext === void 0 || stepsContext.setOnPrevious(onPrevious);
|
95
95
|
}
|
@@ -153,6 +153,7 @@ exports.CreateTearsheetStep.propTypes = {
|
|
153
153
|
* You can set the `hasFieldset` prop to false if you have multiple fieldset elements or want to control the children of your Full Page's step content.
|
154
154
|
* Otherwise, use CSS to hide/remove this label text.
|
155
155
|
*/
|
156
|
+
/**@ts-ignore*/
|
156
157
|
fieldsetLegendText: index["default"].string.isRequired.if(function (_ref2) {
|
157
158
|
var hasFieldset = _ref2.hasFieldset;
|
158
159
|
return !!hasFieldset;
|
@@ -162,6 +163,7 @@ exports.CreateTearsheetStep.propTypes = {
|
|
162
163
|
* and is defaulted to true.
|
163
164
|
* You can set this prop to `false` if you have multiple fieldset elements or want to control the children of your Full Page's step content.
|
164
165
|
*/
|
166
|
+
/**@ts-ignore*/
|
165
167
|
hasFieldset: index["default"].bool,
|
166
168
|
/**
|
167
169
|
* This prop is used to help track dynamic steps. If this value is `false` then the step is not included in the visible steps or the ProgressIndicator
|
@@ -214,8 +214,9 @@ exports.DataSpreadsheet = /*#__PURE__*/React__default["default"].forwardRef(func
|
|
214
214
|
}
|
215
215
|
if ((prevCoords === null || prevCoords === void 0 ? void 0 : prevCoords.row) !== (activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.row) || (prevCoords === null || prevCoords === void 0 ? void 0 : prevCoords.column) !== (activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.column)) {
|
216
216
|
if (activeCellCoordinates && (activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.row) !== 'header' && (activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.column) !== 'header') {
|
217
|
+
var _activeCellFullData$r;
|
217
218
|
var activeCellFullData = typeof (activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.column) === 'number' && typeof (activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.row) === 'number' ? rows[activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.row].cells[activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.column] : null;
|
218
|
-
setActiveCellContent(activeCellFullData.render('Cell'));
|
219
|
+
setActiveCellContent((_activeCellFullData$r = activeCellFullData === null || activeCellFullData === void 0 ? void 0 : activeCellFullData.render('Cell')) !== null && _activeCellFullData$r !== void 0 ? _activeCellFullData$r : null);
|
219
220
|
}
|
220
221
|
if (activeCellCoordinates && (activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.row) === 'header' || (activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.column) === 'header') {
|
221
222
|
setActiveCellContent(null);
|
@@ -423,8 +424,8 @@ exports.DataSpreadsheet = /*#__PURE__*/React__default["default"].forwardRef(func
|
|
423
424
|
var activeCellFullData = typeof (activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.column) === 'number' && typeof (activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.row) === 'number' ? rows[activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.row].cells[activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.column] : null;
|
424
425
|
var activeCellValue;
|
425
426
|
if (activeCellFullData && activeCellCoordinates !== null && activeCellCoordinates !== void 0 && activeCellCoordinates.column) {
|
426
|
-
var _activeCellFullData$
|
427
|
-
activeCellValue = activeCellFullData ? (_activeCellFullData$
|
427
|
+
var _activeCellFullData$r2;
|
428
|
+
activeCellValue = activeCellFullData ? (_activeCellFullData$r2 = activeCellFullData.row.cells) === null || _activeCellFullData$r2 === void 0 || (_activeCellFullData$r2 = _activeCellFullData$r2[activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.column]) === null || _activeCellFullData$r2 === void 0 ? void 0 : _activeCellFullData$r2.value : null;
|
428
429
|
}
|
429
430
|
setCellEditorValue(activeCellValue || '');
|
430
431
|
if (cellEditorRulerRef !== null && cellEditorRulerRef !== void 0 && cellEditorRulerRef.current) {
|
@@ -68,6 +68,11 @@ var DataSpreadsheetHeader = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
68
68
|
var scrollContainer = ref === null || ref === void 0 || (_current = ref.current) === null || _current === void 0 ? void 0 : _current.querySelector(".".concat(blockClass, "__list--container"));
|
69
69
|
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);
|
70
70
|
var scrollBarValue = hasScrollBar ? 0 : scrollBarSize;
|
71
|
+
|
72
|
+
// fix for a11y violation element_scrollable_tabbable
|
73
|
+
if (!(scrollContainer !== null && scrollContainer !== void 0 && scrollContainer.getAttribute('tabIndex'))) {
|
74
|
+
scrollContainer === null || scrollContainer === void 0 || scrollContainer.setAttribute('tabIndex', '0');
|
75
|
+
}
|
71
76
|
setScrollBarSizeValue(scrollBarValue);
|
72
77
|
}
|
73
78
|
}, [cellSize, ref, scrollBarSize, previousState === null || previousState === void 0 ? void 0 : previousState.cellSize]);
|
@@ -47,7 +47,8 @@ var DatagridVirtualBody = function DatagridVirtualBody(datagridState) {
|
|
47
47
|
page = datagridState.page,
|
48
48
|
handleResize = datagridState.handleResize,
|
49
49
|
gridRef = datagridState.gridRef,
|
50
|
-
tableId = datagridState.tableId
|
50
|
+
tableId = datagridState.tableId,
|
51
|
+
onVirtualScroll = datagridState.onVirtualScroll;
|
51
52
|
|
52
53
|
/* istanbul ignore next */
|
53
54
|
var handleVirtualGridResize = function handleVirtualGridResize() {
|
@@ -97,6 +98,9 @@ var DatagridVirtualBody = function DatagridVirtualBody(datagridState) {
|
|
97
98
|
},
|
98
99
|
estimatedItemSize: rowHeight,
|
99
100
|
onScroll: onScroll,
|
101
|
+
onItemsRendered: function onItemsRendered(e) {
|
102
|
+
return onVirtualScroll === null || onVirtualScroll === void 0 ? void 0 : onVirtualScroll(e);
|
103
|
+
},
|
100
104
|
innerRef: innerListRef,
|
101
105
|
outerRef: testRef,
|
102
106
|
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
|
*/
|
@@ -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 {};
|
@@ -66,8 +66,8 @@ exports.Guidebanner = /*#__PURE__*/React__default["default"].forwardRef(function
|
|
66
66
|
previousIconDescription = _ref$previousIconDesc === void 0 ? defaults.previousIconDescription : _ref$previousIconDesc,
|
67
67
|
title = _ref.title,
|
68
68
|
rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
|
69
|
-
var scrollRef = React.useRef();
|
70
|
-
var toggleRef = React.useRef();
|
69
|
+
var scrollRef = React.useRef(null);
|
70
|
+
var toggleRef = React.useRef(null);
|
71
71
|
var _useState = React.useState(0),
|
72
72
|
_useState2 = _rollupPluginBabelHelpers.slicedToArray(_useState, 2),
|
73
73
|
scrollPosition = _useState2[0],
|
@@ -86,6 +86,7 @@ exports.Guidebanner = /*#__PURE__*/React__default["default"].forwardRef(function
|
|
86
86
|
});
|
87
87
|
};
|
88
88
|
return /*#__PURE__*/React__default["default"].createElement("div", _rollupPluginBabelHelpers["extends"]({}, rest, {
|
89
|
+
"aria-expanded": !isCollapsed,
|
89
90
|
className: cx__default["default"](blockClass, className, collapsible && "".concat(blockClass, "__collapsible"), isCollapsed && "".concat(blockClass, "__collapsible-collapsed"), withLeftGutter && "".concat(blockClass, "__with-left-gutter")),
|
90
91
|
ref: ref
|
91
92
|
}, devtools.getDevtoolsProps(componentName)), /*#__PURE__*/React__default["default"].createElement(icons.Idea, {
|
@@ -116,8 +117,7 @@ exports.Guidebanner = /*#__PURE__*/React__default["default"].forwardRef(function
|
|
116
117
|
size: "md",
|
117
118
|
className: "".concat(blockClass, "__toggle-button"),
|
118
119
|
onClick: handleClickToggle,
|
119
|
-
ref: toggleRef
|
120
|
-
"aria-expanded": !isCollapsed
|
120
|
+
ref: toggleRef
|
121
121
|
}, isCollapsed ? expandButtonLabel : collapseButtonLabel), showNavigation && /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("span", {
|
122
122
|
className: cx__default["default"]("".concat(blockClass, "__back-button"), [scrollPosition === 0 ? "".concat(blockClass, "__back-button--disabled") : null])
|
123
123
|
}, /*#__PURE__*/React__default["default"].createElement(react.IconButton, {
|
@@ -181,9 +181,10 @@ exports.Guidebanner.propTypes = {
|
|
181
181
|
React__default["default"].Children.forEach(prop, function (child) {
|
182
182
|
if (child.type.displayName !== 'GuidebannerElement') {
|
183
183
|
var _child$type, _child$type2;
|
184
|
-
// If not GuidebannerElement
|
185
|
-
//
|
186
|
-
//
|
184
|
+
// If child element is not `GuidebannerElement`, then show:
|
185
|
+
// Carbon Products component's `displayName` (child.type.displayName) or
|
186
|
+
// React component's `name` (child.type.name) or
|
187
|
+
// HTML element's tag name (child.type).
|
187
188
|
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."));
|
188
189
|
}
|
189
190
|
});
|