@carbon/ibm-products 2.38.0 → 2.40.0
Sign up to get free protection for your applications and to get access to all the features.
- package/css/index-full-carbon.css +236 -3
- package/css/index-full-carbon.css.map +1 -1
- package/css/index-full-carbon.min.css +1 -1
- package/css/index-full-carbon.min.css.map +1 -1
- package/css/index-without-carbon-released-only.css +5 -0
- package/css/index-without-carbon-released-only.css.map +1 -1
- package/css/index-without-carbon-released-only.min.css +1 -1
- package/css/index-without-carbon-released-only.min.css.map +1 -1
- package/css/index-without-carbon.css +236 -3
- package/css/index-without-carbon.css.map +1 -1
- package/css/index-without-carbon.min.css +1 -1
- package/css/index-without-carbon.min.css.map +1 -1
- package/css/index.css +236 -3
- package/css/index.css.map +1 -1
- package/css/index.min.css +1 -1
- package/css/index.min.css.map +1 -1
- package/es/components/AddSelect/AddSelect.d.ts +44 -2
- package/es/components/AddSelect/AddSelect.js +8 -4
- package/es/components/AddSelect/AddSelectBody.d.ts +44 -2
- package/es/components/AddSelect/AddSelectBody.js +10 -12
- package/es/components/AddSelect/AddSelectSort.d.ts +16 -17
- package/es/components/AddSelect/AddSelectSort.js +5 -5
- package/es/components/AddSelect/types/index.d.ts +44 -0
- package/es/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.d.ts +5 -1
- package/es/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +12 -6
- package/es/components/Card/Card.js +50 -9
- package/es/components/Card/CardFooter.d.ts +5 -1
- package/es/components/Card/CardFooter.js +11 -1
- package/es/components/Carousel/Carousel.d.ts +6 -2
- package/es/components/Checklist/Checklist.d.ts +100 -2
- package/es/components/Checklist/Checklist.js +9 -5
- package/es/components/Checklist/Checklist.types.d.ts +19 -0
- package/es/components/Checklist/Checklist.types.js +22 -0
- package/es/components/Checklist/ChecklistChart.d.ts +5 -1
- package/es/components/Checklist/ChecklistChart.js +9 -4
- package/es/components/Checklist/ChecklistIcon.d.ts +5 -1
- package/es/components/Checklist/ChecklistIcon.js +9 -4
- package/es/components/CoachmarkButton/CoachmarkButton.d.ts +19 -2
- package/es/components/CoachmarkOverlayElements/CoachmarkOverlayElements.d.ts +46 -2
- package/es/components/CoachmarkOverlayElements/CoachmarkOverlayElements.js +5 -4
- package/es/components/CreateInfluencer/CreateInfluencer.d.ts +55 -17
- package/es/components/CreateInfluencer/CreateInfluencer.js +1 -1
- package/es/components/CreateTearsheet/CreateTearsheetStep.d.ts +95 -2
- package/es/components/CreateTearsheet/CreateTearsheetStep.js +7 -5
- package/es/components/DataSpreadsheet/DataSpreadsheet.d.ts +67 -2
- package/es/components/DataSpreadsheet/DataSpreadsheet.js +50 -28
- package/es/components/DataSpreadsheet/DataSpreadsheetBody.d.ts +139 -2
- package/es/components/DataSpreadsheet/DataSpreadsheetBody.js +46 -31
- package/es/components/DataSpreadsheet/DataSpreadsheetHeader.d.ts +89 -2
- package/es/components/DataSpreadsheet/DataSpreadsheetHeader.js +39 -25
- package/es/components/DataSpreadsheet/types/index.d.ts +30 -0
- package/es/components/Datagrid/Datagrid/DatagridVirtualBody.js +5 -1
- package/es/components/ExpressiveCard/ExpressiveCard.d.ts +2 -1
- package/es/components/GetStartedCard/GetStartedCard.d.ts +5 -0
- package/es/components/GetStartedCard/GetStartedCard.js +82 -0
- package/es/components/GetStartedCard/index.d.ts +1 -0
- package/es/components/Guidebanner/Guidebanner.d.ts +62 -2
- package/es/components/Guidebanner/Guidebanner.js +6 -5
- package/es/components/Guidebanner/GuidebannerElement.d.ts +30 -17
- package/es/components/Guidebanner/GuidebannerElement.js +4 -4
- package/es/components/Guidebanner/GuidebannerElementButton.d.ts +29 -15
- package/es/components/Guidebanner/GuidebannerElementButton.js +10 -4
- package/es/components/Guidebanner/GuidebannerElementLink.d.ts +20 -13
- package/es/components/Guidebanner/GuidebannerElementLink.js +3 -3
- package/es/components/InterstitialScreen/InterstitialScreen.js +3 -1
- package/es/components/MultiAddSelect/MultiAddSelect.d.ts +134 -2
- package/es/components/MultiAddSelect/MultiAddSelect.js +2 -1
- package/es/components/NotificationsPanel/NotificationsPanel.d.ts +162 -1
- package/es/components/NotificationsPanel/NotificationsPanel.js +10 -11
- package/es/components/PageHeader/PageHeader.d.ts +298 -5
- package/es/components/PageHeader/PageHeader.js +98 -47
- package/es/components/PageHeader/PageHeaderUtils.d.ts +1 -1
- package/es/components/PageHeader/PageHeaderUtils.js +4 -1
- package/es/components/SidePanel/SidePanel.d.ts +6 -2
- package/es/components/SidePanel/SidePanel.js +18 -3
- package/es/components/SidePanel/constants.d.ts +1 -0
- package/es/components/SidePanel/constants.js +1 -0
- package/es/components/SingleAddSelect/SingleAddSelect.d.ts +69 -2
- package/es/components/SingleAddSelect/SingleAddSelect.js +2 -1
- package/es/components/TagOverflow/TagOverflow.d.ts +5 -0
- package/es/components/TagOverflow/TagOverflow.js +153 -29
- package/es/components/TagOverflow/TagOverflowModal.d.ts +29 -0
- package/es/components/TagOverflow/TagOverflowModal.js +112 -0
- package/es/components/TagOverflow/TagOverflowPopover.d.ts +2 -0
- package/es/components/TagOverflow/TagOverflowPopover.js +135 -0
- package/es/components/Tearsheet/Tearsheet.d.ts +132 -6
- package/es/components/Tearsheet/Tearsheet.js +25 -13
- package/es/components/Tearsheet/TearsheetShell.d.ts +5 -1
- package/es/components/Tearsheet/TearsheetShell.js +26 -4
- package/es/components/WebTerminal/WebTerminal.d.ts +4 -0
- package/es/components/WebTerminal/WebTerminal.js +11 -3
- package/es/components/index.d.ts +1 -0
- package/es/global/js/hooks/useFocus.d.ts +3 -1
- package/es/global/js/hooks/useFocus.js +6 -3
- package/es/global/js/hooks/useRetrieveStepData.d.ts +1 -1
- package/es/global/js/hooks/useRetrieveStepData.js +1 -1
- package/es/global/js/package-settings.d.ts +1 -0
- package/es/global/js/package-settings.js +1 -0
- package/es/index.js +1 -0
- package/es/settings.d.ts +1 -0
- package/lib/components/AddSelect/AddSelect.d.ts +44 -2
- package/lib/components/AddSelect/AddSelect.js +7 -3
- package/lib/components/AddSelect/AddSelectBody.d.ts +44 -2
- package/lib/components/AddSelect/AddSelectBody.js +10 -12
- package/lib/components/AddSelect/AddSelectSort.d.ts +16 -17
- package/lib/components/AddSelect/AddSelectSort.js +5 -5
- package/lib/components/AddSelect/types/index.d.ts +44 -0
- package/lib/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.d.ts +5 -1
- package/lib/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +12 -6
- package/lib/components/Card/Card.js +50 -9
- package/lib/components/Card/CardFooter.d.ts +5 -1
- package/lib/components/Card/CardFooter.js +11 -1
- package/lib/components/Carousel/Carousel.d.ts +6 -2
- package/lib/components/Checklist/Checklist.d.ts +100 -2
- package/lib/components/Checklist/Checklist.js +9 -5
- package/lib/components/Checklist/Checklist.types.d.ts +19 -0
- package/lib/components/Checklist/Checklist.types.js +27 -0
- package/lib/components/Checklist/ChecklistChart.d.ts +5 -1
- package/lib/components/Checklist/ChecklistChart.js +14 -9
- package/lib/components/Checklist/ChecklistIcon.d.ts +5 -1
- package/lib/components/Checklist/ChecklistIcon.js +9 -4
- package/lib/components/CoachmarkButton/CoachmarkButton.d.ts +19 -2
- package/lib/components/CoachmarkOverlayElements/CoachmarkOverlayElements.d.ts +46 -2
- package/lib/components/CoachmarkOverlayElements/CoachmarkOverlayElements.js +5 -4
- package/lib/components/CreateInfluencer/CreateInfluencer.d.ts +55 -17
- package/lib/components/CreateInfluencer/CreateInfluencer.js +1 -1
- package/lib/components/CreateTearsheet/CreateTearsheetStep.d.ts +95 -2
- package/lib/components/CreateTearsheet/CreateTearsheetStep.js +7 -5
- package/lib/components/DataSpreadsheet/DataSpreadsheet.d.ts +67 -2
- package/lib/components/DataSpreadsheet/DataSpreadsheet.js +50 -28
- package/lib/components/DataSpreadsheet/DataSpreadsheetBody.d.ts +139 -2
- package/lib/components/DataSpreadsheet/DataSpreadsheetBody.js +46 -31
- package/lib/components/DataSpreadsheet/DataSpreadsheetHeader.d.ts +89 -2
- package/lib/components/DataSpreadsheet/DataSpreadsheetHeader.js +39 -25
- package/lib/components/DataSpreadsheet/types/index.d.ts +30 -0
- package/lib/components/Datagrid/Datagrid/DatagridVirtualBody.js +5 -1
- package/lib/components/ExpressiveCard/ExpressiveCard.d.ts +2 -1
- package/lib/components/GetStartedCard/GetStartedCard.d.ts +5 -0
- package/lib/components/GetStartedCard/GetStartedCard.js +88 -0
- package/lib/components/GetStartedCard/index.d.ts +1 -0
- package/lib/components/Guidebanner/Guidebanner.d.ts +62 -2
- package/lib/components/Guidebanner/Guidebanner.js +6 -5
- package/lib/components/Guidebanner/GuidebannerElement.d.ts +30 -17
- package/lib/components/Guidebanner/GuidebannerElement.js +4 -4
- package/lib/components/Guidebanner/GuidebannerElementButton.d.ts +29 -15
- package/lib/components/Guidebanner/GuidebannerElementButton.js +10 -4
- package/lib/components/Guidebanner/GuidebannerElementLink.d.ts +20 -13
- package/lib/components/Guidebanner/GuidebannerElementLink.js +3 -3
- package/lib/components/InterstitialScreen/InterstitialScreen.js +3 -1
- package/lib/components/MultiAddSelect/MultiAddSelect.d.ts +134 -2
- package/lib/components/MultiAddSelect/MultiAddSelect.js +2 -1
- package/lib/components/NotificationsPanel/NotificationsPanel.d.ts +162 -1
- package/lib/components/NotificationsPanel/NotificationsPanel.js +10 -11
- package/lib/components/PageHeader/PageHeader.d.ts +298 -5
- package/lib/components/PageHeader/PageHeader.js +98 -47
- package/lib/components/PageHeader/PageHeaderUtils.d.ts +1 -1
- package/lib/components/PageHeader/PageHeaderUtils.js +4 -1
- package/lib/components/SidePanel/SidePanel.d.ts +6 -2
- package/lib/components/SidePanel/SidePanel.js +18 -3
- package/lib/components/SidePanel/constants.d.ts +1 -0
- package/lib/components/SidePanel/constants.js +1 -0
- package/lib/components/SingleAddSelect/SingleAddSelect.d.ts +69 -2
- package/lib/components/SingleAddSelect/SingleAddSelect.js +2 -1
- package/lib/components/TagOverflow/TagOverflow.d.ts +5 -0
- package/lib/components/TagOverflow/TagOverflow.js +154 -28
- package/lib/components/TagOverflow/TagOverflowModal.d.ts +29 -0
- package/lib/components/TagOverflow/TagOverflowModal.js +121 -0
- package/lib/components/TagOverflow/TagOverflowPopover.d.ts +2 -0
- package/lib/components/TagOverflow/TagOverflowPopover.js +144 -0
- package/lib/components/Tearsheet/Tearsheet.d.ts +132 -6
- package/lib/components/Tearsheet/Tearsheet.js +25 -13
- package/lib/components/Tearsheet/TearsheetShell.d.ts +5 -1
- package/lib/components/Tearsheet/TearsheetShell.js +26 -4
- package/lib/components/WebTerminal/WebTerminal.d.ts +4 -0
- package/lib/components/WebTerminal/WebTerminal.js +11 -3
- package/lib/components/index.d.ts +1 -0
- package/lib/global/js/hooks/useFocus.d.ts +3 -1
- package/lib/global/js/hooks/useFocus.js +6 -3
- package/lib/global/js/hooks/useRetrieveStepData.d.ts +1 -1
- package/lib/global/js/hooks/useRetrieveStepData.js +1 -1
- package/lib/global/js/package-settings.d.ts +1 -0
- package/lib/global/js/package-settings.js +1 -0
- package/lib/index.js +5 -0
- package/lib/settings.d.ts +1 -0
- package/package.json +3 -3
- package/scss/components/CoachmarkStack/_coachmark-stack.scss +4 -2
- package/scss/components/GetStartedCard/_carbon-imports.scss +9 -0
- package/scss/components/GetStartedCard/_get-started-card.scss +135 -0
- package/scss/components/GetStartedCard/_index-with-carbon.scss +9 -0
- package/scss/components/GetStartedCard/_index.scss +8 -0
- package/scss/components/SidePanel/_side-panel-variables.scss +1 -0
- package/scss/components/StringFormatter/_string-formatter.scss +1 -1
- package/scss/components/TagOverflow/_tag-overflow.scss +157 -0
- package/scss/components/_index-with-carbon.scss +1 -0
- package/scss/components/_index.scss +1 -0
- package/telemetry.yml +25 -16
@@ -16,6 +16,7 @@ import { IconButton, Button } from '@carbon/react';
|
|
16
16
|
import { ChevronUp } from '@carbon/react/icons';
|
17
17
|
import { ChecklistIcon } from './ChecklistIcon.js';
|
18
18
|
import { ChecklistChart } from './ChecklistChart.js';
|
19
|
+
import { Themes, Kinds } from './Checklist.types.js';
|
19
20
|
|
20
21
|
var _excluded = ["chartValue", "chartLabel", "checklistAriaLabel", "checklistToggleAriaLabel", "className", "onClickViewAll", "onToggle", "open", "enableToggle", "taskLists", "theme", "title", "toggleLabel", "toggleLabelAlign", "viewAllLabel"];
|
21
22
|
|
@@ -43,7 +44,7 @@ var defaults = {
|
|
43
44
|
open: true,
|
44
45
|
enableToggle: true,
|
45
46
|
taskLists: [],
|
46
|
-
theme:
|
47
|
+
theme: Themes.light,
|
47
48
|
toggleLabel: 'Toggle',
|
48
49
|
toggleLabelAlign: 'top'
|
49
50
|
};
|
@@ -167,11 +168,13 @@ var Checklist = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
167
168
|
className: "".concat(blockClass, "__list-item"),
|
168
169
|
key: "".concat(item.label, "-").concat(index)
|
169
170
|
}, /*#__PURE__*/React__default.createElement(ChecklistIcon, {
|
170
|
-
kind: item.kind
|
171
|
+
kind: item.kind,
|
172
|
+
theme: theme
|
171
173
|
}), typeof item.onClick === 'function' ? /*#__PURE__*/React__default.createElement(Button, {
|
172
174
|
className: cx("".concat(blockClass, "__button"), _defineProperty({}, "".concat(blockClass, "__button--error"), item.kind === 'error')),
|
173
175
|
onClick: function onClick() {
|
174
|
-
|
176
|
+
var _item$onClick;
|
177
|
+
(_item$onClick = item.onClick) === null || _item$onClick === void 0 || _item$onClick.call(item, item);
|
175
178
|
},
|
176
179
|
size: "sm",
|
177
180
|
title: item.label
|
@@ -247,10 +250,11 @@ Checklist.propTypes = {
|
|
247
250
|
* then the `label` will be rendered as a button,
|
248
251
|
* else the `label` will be rendered as plain text.
|
249
252
|
*/
|
253
|
+
/**@ts-ignore */
|
250
254
|
taskLists: PropTypes.arrayOf(PropTypes.shape({
|
251
255
|
title: PropTypes.string,
|
252
256
|
tasks: PropTypes.arrayOf(PropTypes.shape({
|
253
|
-
kind: PropTypes.oneOf([
|
257
|
+
kind: PropTypes.oneOf([Kinds.unchecked, Kinds.indeterminate, Kinds.checked, Kinds.disabled, Kinds.error]).isRequired,
|
254
258
|
label: PropTypes.string.isRequired,
|
255
259
|
onClick: PropTypes.func
|
256
260
|
})).isRequired
|
@@ -258,7 +262,7 @@ Checklist.propTypes = {
|
|
258
262
|
/**
|
259
263
|
* Determines the theme of the component.
|
260
264
|
*/
|
261
|
-
theme: PropTypes.oneOf([
|
265
|
+
theme: PropTypes.oneOf([Themes.light, Themes.dark]),
|
262
266
|
/**
|
263
267
|
* The title of the component.
|
264
268
|
*/
|
@@ -0,0 +1,19 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright IBM Corp. 2024, 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
|
+
export declare enum Themes {
|
8
|
+
light = "light",
|
9
|
+
dark = "dark"
|
10
|
+
}
|
11
|
+
export type Theme = Themes.light | Themes.dark;
|
12
|
+
export declare enum Kinds {
|
13
|
+
unchecked = "unchecked",
|
14
|
+
indeterminate = "indeterminate",
|
15
|
+
checked = "checked",
|
16
|
+
disabled = "disabled",
|
17
|
+
error = "error"
|
18
|
+
}
|
19
|
+
export type Kind = Kinds.unchecked | Kinds.indeterminate | Kinds.checked | Kinds.disabled | Kinds.error;
|
@@ -0,0 +1,22 @@
|
|
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
|
+
var Themes = /*#__PURE__*/function (Themes) {
|
9
|
+
Themes["light"] = "light";
|
10
|
+
Themes["dark"] = "dark";
|
11
|
+
return Themes;
|
12
|
+
}({});
|
13
|
+
var Kinds = /*#__PURE__*/function (Kinds) {
|
14
|
+
Kinds["unchecked"] = "unchecked";
|
15
|
+
Kinds["indeterminate"] = "indeterminate";
|
16
|
+
Kinds["checked"] = "checked";
|
17
|
+
Kinds["disabled"] = "disabled";
|
18
|
+
Kinds["error"] = "error";
|
19
|
+
return Kinds;
|
20
|
+
}({});
|
21
|
+
|
22
|
+
export { Kinds, Themes };
|
@@ -1,5 +1,9 @@
|
|
1
1
|
/**
|
2
2
|
* Custom chart component used within Checklist PLG component
|
3
3
|
*/
|
4
|
-
export let ChecklistChart: React.ForwardRefExoticComponent<
|
4
|
+
export let ChecklistChart: React.ForwardRefExoticComponent<{
|
5
|
+
className?: string | undefined;
|
6
|
+
value: number;
|
7
|
+
theme?: import("./Checklist.types").Theme | undefined;
|
8
|
+
} & React.RefAttributes<any>>;
|
5
9
|
import React from 'react';
|
@@ -13,25 +13,30 @@ import clamp from 'lodash/clamp';
|
|
13
13
|
import { gray20, gray70, purple50 } from '../../node_modules/@carbon/colors/es/index.js';
|
14
14
|
import { getDevtoolsProps } from '../../global/js/utils/devtools.js';
|
15
15
|
import { pkg } from '../../settings.js';
|
16
|
+
import { Themes } from './Checklist.types.js';
|
16
17
|
|
17
18
|
var _excluded = ["className", "value", "theme"];
|
18
19
|
var blockClass = "".concat(pkg.prefix, "--checklist__chart");
|
19
20
|
var componentName = 'ChecklistChart';
|
20
21
|
var defaults = {
|
21
|
-
theme:
|
22
|
+
theme: Themes.light
|
22
23
|
};
|
23
24
|
|
24
25
|
/**
|
25
26
|
* Custom chart component used within Checklist PLG component
|
26
27
|
*/
|
27
|
-
var ChecklistChart = /*#__PURE__*/React__default.forwardRef(
|
28
|
+
var ChecklistChart = /*#__PURE__*/React__default.forwardRef(
|
29
|
+
/**
|
30
|
+
* @param {{className?: string, value: number, theme?: import('./Checklist.types').Theme}} props type description
|
31
|
+
*/
|
32
|
+
function (_ref, ref) {
|
28
33
|
var className = _ref.className,
|
29
34
|
value = _ref.value,
|
30
35
|
_ref$theme = _ref.theme,
|
31
36
|
theme = _ref$theme === void 0 ? defaults.theme : _ref$theme,
|
32
37
|
rest = _objectWithoutProperties(_ref, _excluded);
|
33
38
|
var numDegrees = clamp(value * 360, 0, 360);
|
34
|
-
var circleColor = theme ===
|
39
|
+
var circleColor = theme === Themes.light ? gray20 : gray70; // $ui-03 (-ish)
|
35
40
|
var progressColor = purple50;
|
36
41
|
return /*#__PURE__*/React__default.createElement("div", _extends({}, rest, {
|
37
42
|
className: cx(blockClass, className),
|
@@ -56,7 +61,7 @@ ChecklistChart.propTypes = {
|
|
56
61
|
/**
|
57
62
|
* Determines the theme of the component.
|
58
63
|
*/
|
59
|
-
theme: PropTypes.oneOf([
|
64
|
+
theme: PropTypes.oneOf([Themes.light, Themes.dark]),
|
60
65
|
/**
|
61
66
|
* Number between 0 and 1.
|
62
67
|
*/
|
@@ -1,5 +1,9 @@
|
|
1
1
|
/**
|
2
2
|
* TODO: A description of the component.
|
3
3
|
*/
|
4
|
-
export let ChecklistIcon: React.ForwardRefExoticComponent<
|
4
|
+
export let ChecklistIcon: React.ForwardRefExoticComponent<{
|
5
|
+
className?: string | undefined;
|
6
|
+
kind?: import("./Checklist.types").Kind | undefined;
|
7
|
+
theme?: import("./Checklist.types").Theme | undefined;
|
8
|
+
} & React.RefAttributes<any>>;
|
5
9
|
import React from 'react';
|
@@ -12,6 +12,7 @@ import cx from 'classnames';
|
|
12
12
|
import { getDevtoolsProps } from '../../global/js/utils/devtools.js';
|
13
13
|
import { pkg } from '../../settings.js';
|
14
14
|
import { CircleDash, CheckmarkOutline, Incomplete, Warning } from '@carbon/react/icons';
|
15
|
+
import { Themes, Kinds } from './Checklist.types.js';
|
15
16
|
|
16
17
|
var _excluded = ["className", "kind", "theme"];
|
17
18
|
|
@@ -32,13 +33,17 @@ var componentName = 'ChecklistIcon';
|
|
32
33
|
|
33
34
|
// Default values for props
|
34
35
|
var defaults = {
|
35
|
-
theme:
|
36
|
+
theme: Themes.light
|
36
37
|
};
|
37
38
|
|
38
39
|
/**
|
39
40
|
* TODO: A description of the component.
|
40
41
|
*/
|
41
|
-
var ChecklistIcon = /*#__PURE__*/React__default.forwardRef(
|
42
|
+
var ChecklistIcon = /*#__PURE__*/React__default.forwardRef(
|
43
|
+
/**
|
44
|
+
* @param {{className?: string, kind?: import('./Checklist.types').Kind, theme?: import('./Checklist.types').Theme}} props type description
|
45
|
+
*/
|
46
|
+
function (_ref, ref) {
|
42
47
|
var className = _ref.className,
|
43
48
|
kind = _ref.kind,
|
44
49
|
_ref$theme = _ref.theme,
|
@@ -86,11 +91,11 @@ ChecklistIcon.propTypes = {
|
|
86
91
|
/**
|
87
92
|
* The icon to be displayed.
|
88
93
|
*/
|
89
|
-
kind: PropTypes.oneOf([
|
94
|
+
kind: PropTypes.oneOf([Kinds.unchecked, Kinds.indeterminate, Kinds.checked, Kinds.disabled, Kinds.error]),
|
90
95
|
/**
|
91
96
|
* Determines the theme of the component.
|
92
97
|
*/
|
93
|
-
theme: PropTypes.oneOf([
|
98
|
+
theme: PropTypes.oneOf([Themes.light, Themes.dark])
|
94
99
|
};
|
95
100
|
|
96
101
|
export { ChecklistIcon };
|
@@ -1,5 +1,22 @@
|
|
1
1
|
/**
|
2
|
-
*
|
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.
|
3
6
|
*/
|
4
|
-
export let CoachmarkButton: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
|
5
7
|
import React from 'react';
|
8
|
+
interface CoachmarkButtonProps {
|
9
|
+
/**
|
10
|
+
* Provide an optional class to be applied to the containing node.
|
11
|
+
*/
|
12
|
+
className?: string;
|
13
|
+
/**
|
14
|
+
* The aria label.
|
15
|
+
*/
|
16
|
+
label: string;
|
17
|
+
}
|
18
|
+
/**
|
19
|
+
* Use CoachmarkButton for the target prop of a Coachmark component.
|
20
|
+
*/
|
21
|
+
export declare let CoachmarkButton: React.ForwardRefExoticComponent<CoachmarkButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
22
|
+
export {};
|
@@ -1,6 +1,50 @@
|
|
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 CoachmarkOverlayElementsProps {
|
9
|
+
/**
|
10
|
+
* CoachmarkOverlayElements should be used with one or many CoachmarkOverlayElement components as children.
|
11
|
+
* @see CoachmarkOverlayElement
|
12
|
+
*/
|
13
|
+
children: ReactNode;
|
14
|
+
/**
|
15
|
+
* Optional class name for this component.
|
16
|
+
*/
|
17
|
+
className?: string;
|
18
|
+
/**
|
19
|
+
* The visibility of CoachmarkOverlayElements is
|
20
|
+
* managed in the parent component.
|
21
|
+
*/
|
22
|
+
isVisible?: boolean;
|
23
|
+
/**
|
24
|
+
* The object describing an image in one of two shapes.
|
25
|
+
* If a single media element is required, use `{render}`.
|
26
|
+
* If a stepped animation is required, use `{filePaths}`.
|
27
|
+
*/
|
28
|
+
media?: {
|
29
|
+
render?: () => ReactNode;
|
30
|
+
filePaths?: string[];
|
31
|
+
};
|
32
|
+
/**
|
33
|
+
* The label for the Next button.
|
34
|
+
*/
|
35
|
+
nextButtonText?: string;
|
36
|
+
/**
|
37
|
+
* The label for the Previous button.
|
38
|
+
*/
|
39
|
+
previousButtonLabel?: string;
|
40
|
+
/**
|
41
|
+
* The label for the Close button.
|
42
|
+
*/
|
43
|
+
closeButtonLabel?: string;
|
44
|
+
}
|
1
45
|
/**
|
2
46
|
* Composable container to allow for the displaying of CoachmarkOverlayElement
|
3
47
|
* components in a carousel fashion.
|
4
48
|
*/
|
5
|
-
export let CoachmarkOverlayElements: React.ForwardRefExoticComponent<React.RefAttributes<
|
6
|
-
|
49
|
+
export declare let CoachmarkOverlayElements: React.ForwardRefExoticComponent<CoachmarkOverlayElementsProps & React.RefAttributes<HTMLDivElement>>;
|
50
|
+
export {};
|
@@ -19,11 +19,9 @@ import { SteppedAnimatedMedia } from '../SteppedAnimatedMedia/SteppedAnimatedMed
|
|
19
19
|
import { Carousel } from '../Carousel/Carousel.js';
|
20
20
|
|
21
21
|
var _excluded = ["className", "children", "isVisible", "media", "nextButtonText", "previousButtonLabel", "closeButtonLabel"];
|
22
|
-
|
23
22
|
// The block part of our conventional BEM class names (blockClass__E--M).
|
24
23
|
var blockClass = "".concat(pkg.prefix, "--coachmark-overlay-elements");
|
25
24
|
var componentName = 'CoachmarkOverlayElements';
|
26
|
-
|
27
25
|
// NOTE: the component SCSS is not imported here: it is rolled up separately.
|
28
26
|
|
29
27
|
// Default values can be included here and then assigned to the prop params,
|
@@ -136,8 +134,9 @@ var CoachmarkOverlayElements = /*#__PURE__*/React__default.forwardRef(function (
|
|
136
134
|
title: previousButtonLabel,
|
137
135
|
disabled: scrollPosition === 0,
|
138
136
|
onClick: function onClick() {
|
137
|
+
var _scrollRef$current, _scrollRef$current$sc;
|
139
138
|
var targetStep = clamp(currentProgStep - 1, progStepFloor, progStepCeil);
|
140
|
-
scrollRef.current.scrollToView(targetStep);
|
139
|
+
scrollRef === null || scrollRef === void 0 || (_scrollRef$current = scrollRef.current) === null || _scrollRef$current === void 0 || (_scrollRef$current$sc = _scrollRef$current.scrollToView) === null || _scrollRef$current$sc === void 0 || _scrollRef$current$sc.call(_scrollRef$current, targetStep);
|
141
140
|
setCurrentProgStep(targetStep);
|
142
141
|
}
|
143
142
|
}, previousButtonLabel), currentProgStep < progStepCeil ? /*#__PURE__*/React__default.createElement(Button, {
|
@@ -146,8 +145,9 @@ var CoachmarkOverlayElements = /*#__PURE__*/React__default.forwardRef(function (
|
|
146
145
|
title: nextButtonText,
|
147
146
|
disabled: scrollPosition === 1,
|
148
147
|
onClick: function onClick() {
|
148
|
+
var _scrollRef$current2, _scrollRef$current2$s;
|
149
149
|
var targetStep = clamp(currentProgStep + 1, progStepFloor, progStepCeil);
|
150
|
-
scrollRef.current.scrollToView(targetStep);
|
150
|
+
scrollRef === null || scrollRef === void 0 || (_scrollRef$current2 = scrollRef.current) === null || _scrollRef$current2 === void 0 || (_scrollRef$current2$s = _scrollRef$current2.scrollToView) === null || _scrollRef$current2$s === void 0 || _scrollRef$current2$s.call(_scrollRef$current2, targetStep);
|
151
151
|
setCurrentProgStep(targetStep);
|
152
152
|
}
|
153
153
|
}, nextButtonText) : closeButtonLabel && /*#__PURE__*/React__default.createElement(Button, _extends({
|
@@ -192,6 +192,7 @@ CoachmarkOverlayElements.propTypes = {
|
|
192
192
|
* If a single media element is required, use `{render}`.
|
193
193
|
* If a stepped animation is required, use `{filePaths}`.
|
194
194
|
*/
|
195
|
+
/**@ts-ignore*/
|
195
196
|
media: PropTypes.oneOfType([PropTypes.shape({
|
196
197
|
render: PropTypes.func
|
197
198
|
}), PropTypes.shape({
|
@@ -1,23 +1,61 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
1
|
+
/**
|
2
|
+
* Copyright IBM Corp. 2021, 2022
|
3
|
+
*
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
import { PropsWithChildren, ReactNode } from 'react';
|
8
|
+
import PropTypes from 'prop-types';
|
9
|
+
import '../../global/js/utils/props-helper';
|
10
|
+
interface Step {
|
11
|
+
introStep?: boolean;
|
12
|
+
secondaryLabel?: string;
|
13
|
+
shouldIncludeStep?: boolean;
|
14
|
+
title?: ReactNode;
|
15
|
+
}
|
16
|
+
interface CreateInfluencerProps {
|
17
|
+
/**
|
18
|
+
* Provide an optional class to be applied to the containing node.
|
19
|
+
*/
|
20
|
+
className?: string;
|
21
|
+
/**
|
22
|
+
* Provide the current step number.
|
23
|
+
*/
|
24
|
+
currentStep: number;
|
25
|
+
/**
|
26
|
+
* Provide the Set Data.
|
27
|
+
*/
|
28
|
+
stepData: Step[];
|
29
|
+
/**
|
30
|
+
* Title.
|
31
|
+
*/
|
32
|
+
title?: string | undefined;
|
33
|
+
}
|
34
|
+
export declare const CreateInfluencer: {
|
35
|
+
({ className, currentStep, stepData, title, }: PropsWithChildren<CreateInfluencerProps>): import("react/jsx-runtime").JSX.Element;
|
36
|
+
displayName: string;
|
37
|
+
propTypes: {
|
38
|
+
/**
|
39
|
+
* Provide an optional class to be applied to the containing node.
|
40
|
+
*/
|
41
|
+
className: PropTypes.Requireable<string>;
|
42
|
+
/**
|
43
|
+
* Used to mark the current step on the ProgressIndicator component
|
44
|
+
*/
|
45
|
+
currentStep: PropTypes.Validator<number>;
|
46
|
+
/**
|
47
|
+
* The step data that renders the progress items
|
48
|
+
*/
|
49
|
+
stepData: PropTypes.Requireable<(PropTypes.InferProps<{
|
13
50
|
introStep: PropTypes.Requireable<boolean>;
|
14
51
|
secondaryLabel: PropTypes.Requireable<string>;
|
15
52
|
shouldIncludeStep: PropTypes.Requireable<boolean>;
|
16
53
|
title: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
17
54
|
}> | null | undefined)[]>;
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
55
|
+
/**
|
56
|
+
* The main title of the full page, displayed in the influencer area.
|
57
|
+
*/
|
58
|
+
title: PropTypes.Requireable<string>;
|
59
|
+
};
|
60
|
+
};
|
23
61
|
export {};
|
@@ -62,7 +62,7 @@ var CreateInfluencer = function CreateInfluencer(_ref) {
|
|
62
62
|
return /*#__PURE__*/React__default.createElement(ProgressStep, {
|
63
63
|
label: step.title,
|
64
64
|
key: stepIndex,
|
65
|
-
secondaryLabel: step.secondaryLabel,
|
65
|
+
secondaryLabel: step.secondaryLabel || undefined,
|
66
66
|
invalid: step.invalid
|
67
67
|
});
|
68
68
|
})));
|
@@ -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 {};
|
@@ -46,7 +46,7 @@ var CreateTearsheetStep = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
46
46
|
rest = _objectWithoutProperties(_ref, _excluded);
|
47
47
|
var stepsContext = useContext(StepsContext);
|
48
48
|
var stepNumber = useContext(StepNumberContext);
|
49
|
-
var _useState = useState(),
|
49
|
+
var _useState = useState(includeStep),
|
50
50
|
_useState2 = _slicedToArray(_useState, 2),
|
51
51
|
shouldIncludeStep = _useState2[0],
|
52
52
|
setShouldIncludeStep = _useState2[1];
|
@@ -56,11 +56,11 @@ var CreateTearsheetStep = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
56
56
|
useRetrieveStepData({
|
57
57
|
stepsContext: stepsContext,
|
58
58
|
stepNumber: stepNumber,
|
59
|
-
introStep: introStep,
|
59
|
+
introStep: !!introStep,
|
60
60
|
shouldIncludeStep: shouldIncludeStep,
|
61
|
-
secondaryLabel: secondaryLabel,
|
61
|
+
secondaryLabel: secondaryLabel || '',
|
62
62
|
title: title,
|
63
|
-
invalid: invalid
|
63
|
+
invalid: !!invalid
|
64
64
|
});
|
65
65
|
|
66
66
|
// This useEffect reports back the onMount value so that they can be used
|
@@ -80,7 +80,7 @@ var CreateTearsheetStep = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
80
80
|
// steps container context so that it can manage the 'Next' button appropriately.
|
81
81
|
useEffect(function () {
|
82
82
|
if (stepNumber === (stepsContext === null || stepsContext === void 0 ? void 0 : stepsContext.currentStep)) {
|
83
|
-
stepsContext.setIsDisabled(disableSubmit);
|
83
|
+
stepsContext.setIsDisabled(!!disableSubmit);
|
84
84
|
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
|
85
85
|
stepsContext === null || stepsContext === void 0 || stepsContext.setOnPrevious(onPrevious);
|
86
86
|
}
|
@@ -144,6 +144,7 @@ CreateTearsheetStep.propTypes = {
|
|
144
144
|
* 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.
|
145
145
|
* Otherwise, use CSS to hide/remove this label text.
|
146
146
|
*/
|
147
|
+
/**@ts-ignore*/
|
147
148
|
fieldsetLegendText: PropTypes.string.isRequired.if(function (_ref2) {
|
148
149
|
var hasFieldset = _ref2.hasFieldset;
|
149
150
|
return !!hasFieldset;
|
@@ -153,6 +154,7 @@ CreateTearsheetStep.propTypes = {
|
|
153
154
|
* and is defaulted to true.
|
154
155
|
* 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.
|
155
156
|
*/
|
157
|
+
/**@ts-ignore*/
|
156
158
|
hasFieldset: PropTypes.bool,
|
157
159
|
/**
|
158
160
|
* 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
|
@@ -1,5 +1,70 @@
|
|
1
1
|
/**
|
2
|
-
*
|
2
|
+
* Copyright IBM Corp. 2022, 2022
|
3
|
+
*
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
3
6
|
*/
|
4
|
-
export let DataSpreadsheet: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
|
5
7
|
import React from 'react';
|
8
|
+
import { Column, Size, Theme } from './types';
|
9
|
+
interface DataSpreadsheetProps {
|
10
|
+
/**
|
11
|
+
* Specifies the cell height
|
12
|
+
*/
|
13
|
+
cellSize?: Size;
|
14
|
+
/**
|
15
|
+
* Provide an optional class to be applied to the containing node.
|
16
|
+
*/
|
17
|
+
className?: string;
|
18
|
+
/**
|
19
|
+
* The data that will build the column headers
|
20
|
+
*/
|
21
|
+
columns?: readonly Column[];
|
22
|
+
/**
|
23
|
+
* The spreadsheet data that will be rendered in the body of the spreadsheet component
|
24
|
+
*/
|
25
|
+
data?: readonly object[];
|
26
|
+
/**
|
27
|
+
* Sets the number of empty rows to be created when there is no data provided
|
28
|
+
*/
|
29
|
+
defaultEmptyRowCount?: number;
|
30
|
+
/**
|
31
|
+
* The spreadsheet id
|
32
|
+
*/
|
33
|
+
id?: number | string;
|
34
|
+
/**
|
35
|
+
* The event handler that is called when the active cell changes
|
36
|
+
*/
|
37
|
+
onActiveCellChange?: () => void;
|
38
|
+
/**
|
39
|
+
* The setter fn for the data prop
|
40
|
+
*/
|
41
|
+
onDataUpdate?: ({ ...args }: {
|
42
|
+
[x: string]: any;
|
43
|
+
}) => void;
|
44
|
+
/**
|
45
|
+
* The event handler that is called when the selection area values change
|
46
|
+
*/
|
47
|
+
onSelectionAreaChange?: () => void;
|
48
|
+
/**
|
49
|
+
* The aria label applied to the Select all button
|
50
|
+
*/
|
51
|
+
selectAllAriaLabel: string;
|
52
|
+
/**
|
53
|
+
* The aria label applied to the Data spreadsheet component
|
54
|
+
*/
|
55
|
+
spreadsheetAriaLabel: string;
|
56
|
+
/**
|
57
|
+
* The theme the DataSpreadsheet should use (only used to render active cell/selection area colors on dark theme)
|
58
|
+
*/
|
59
|
+
theme?: Theme;
|
60
|
+
/**
|
61
|
+
* The total number of columns to be initially visible, additional columns will be rendered and
|
62
|
+
* visible via horizontal scrollbar
|
63
|
+
*/
|
64
|
+
totalVisibleColumns?: number;
|
65
|
+
}
|
66
|
+
/**
|
67
|
+
* DataSpreadsheet: used to organize and display large amounts of structured data, separated by columns and rows in a grid-like format.
|
68
|
+
*/
|
69
|
+
export declare let DataSpreadsheet: React.ForwardRefExoticComponent<DataSpreadsheetProps & React.RefAttributes<HTMLDivElement>>;
|
70
|
+
export {};
|