@carbon/ibm-products 2.38.0 → 2.39.0
Sign up to get free protection for your applications and to get access to all the features.
- package/css/index-full-carbon.css +227 -0
- 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 +227 -0
- 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 +227 -0
- 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/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/DataSpreadsheet/DataSpreadsheet.d.ts +67 -2
- package/es/components/DataSpreadsheet/DataSpreadsheet.js +48 -27
- 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 +34 -25
- package/es/components/DataSpreadsheet/types/index.d.ts +30 -0
- 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.js +2 -2
- package/es/components/NotificationsPanel/NotificationsPanel.d.ts +162 -1
- package/es/components/NotificationsPanel/NotificationsPanel.js +10 -10
- package/es/components/SidePanel/SidePanel.js +1 -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/index.d.ts +1 -0
- 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/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/DataSpreadsheet/DataSpreadsheet.d.ts +67 -2
- package/lib/components/DataSpreadsheet/DataSpreadsheet.js +48 -27
- 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 +34 -25
- package/lib/components/DataSpreadsheet/types/index.d.ts +30 -0
- 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.js +2 -2
- package/lib/components/NotificationsPanel/NotificationsPanel.d.ts +162 -1
- package/lib/components/NotificationsPanel/NotificationsPanel.js +10 -10
- package/lib/components/SidePanel/SidePanel.js +1 -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/index.d.ts +1 -0
- 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/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/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 +23 -16
@@ -1,8 +1,106 @@
|
|
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
|
+
/// <reference path="../../../src/custom-typings/index.d.ts" />
|
8
|
+
/**
|
9
|
+
* TODO: Breakdown titles, icons, clickable items into sub-components
|
10
|
+
* See
|
11
|
+
* ModifiedTabs (ModifiedTabLabelNew, ModifiedTabLabelWithClose)
|
12
|
+
* PageHeader (PageHeaderTitle, PageHeaderUtils)
|
13
|
+
*/
|
14
|
+
import React, { ReactNode } from 'react';
|
15
|
+
import { IconButton } from '@carbon/react';
|
16
|
+
import { Kind, Theme } from './Checklist.types';
|
17
|
+
type Task = {
|
18
|
+
kind: Kind;
|
19
|
+
label: string;
|
20
|
+
onClick?(task?: Task): void;
|
21
|
+
};
|
22
|
+
type TaskList = {
|
23
|
+
title?: string;
|
24
|
+
tasks: Array<Task>;
|
25
|
+
};
|
26
|
+
interface ChecklistProps {
|
27
|
+
/**
|
28
|
+
* Define both `chartLabel` and `chartValue` to show the chart and its label together.
|
29
|
+
*/
|
30
|
+
chartLabel?: string;
|
31
|
+
/**
|
32
|
+
* A number between 0 and 1.
|
33
|
+
*
|
34
|
+
* Define both `chartLabel` and `chartValue` to show the chart and its label together.
|
35
|
+
*/
|
36
|
+
chartValue?: number;
|
37
|
+
/**
|
38
|
+
* Aria-label for the Checklist component.
|
39
|
+
*/
|
40
|
+
checklistAriaLabel?: string;
|
41
|
+
/**
|
42
|
+
* Aria-label for the Checklist's toggle component.
|
43
|
+
*/
|
44
|
+
checklistToggleAriaLabel?: string;
|
45
|
+
/**
|
46
|
+
* Provide an optional class to be applied to the containing node.
|
47
|
+
*/
|
48
|
+
className?: string;
|
49
|
+
/**
|
50
|
+
* Whether or not to show the open/close toggle.
|
51
|
+
*/
|
52
|
+
enableToggle?: boolean;
|
53
|
+
/**
|
54
|
+
* Callback for the "View all" button. See also `viewAllLabel`.
|
55
|
+
*/
|
56
|
+
onClickViewAll?(): void;
|
57
|
+
/**
|
58
|
+
* Optional callback for when the list is opened/closed.
|
59
|
+
*/
|
60
|
+
onToggle?(isOpen?: boolean): void;
|
61
|
+
/**
|
62
|
+
* Specifies whether the component is opened or closed.
|
63
|
+
* This can be set during initialization, or changed after being rendered.
|
64
|
+
*/
|
65
|
+
open?: boolean;
|
66
|
+
/**
|
67
|
+
* The task list can be broken down into sub-lists.
|
68
|
+
*
|
69
|
+
* Each sub-list can include an optional `title`.
|
70
|
+
*
|
71
|
+
* Each task must specify the appropriate icon (`kind`) and `label`.
|
72
|
+
*
|
73
|
+
* If any task has an `onClick` callback function defined,
|
74
|
+
* then the `label` will be rendered as a button,
|
75
|
+
* else the `label` will be rendered as plain text.
|
76
|
+
*/
|
77
|
+
taskLists: Array<TaskList>;
|
78
|
+
/**
|
79
|
+
* Determines the theme of the component.
|
80
|
+
*/
|
81
|
+
theme?: Theme;
|
82
|
+
/**
|
83
|
+
* The title of the component.
|
84
|
+
*/
|
85
|
+
title?: ReactNode;
|
86
|
+
/**
|
87
|
+
* The label for the toggle's tooltip.
|
88
|
+
*/
|
89
|
+
toggleLabel?: string;
|
90
|
+
/**
|
91
|
+
* The alignment of the toggle's tooltip.
|
92
|
+
*/
|
93
|
+
toggleLabelAlign?: React.ComponentProps<typeof IconButton>['align'];
|
94
|
+
/**
|
95
|
+
* If defined, will show and enable the "View all (#)" button at the bottom of the list.
|
96
|
+
*/
|
97
|
+
viewAllLabel?: string;
|
98
|
+
}
|
1
99
|
/**
|
2
100
|
* The Checklist tracks a user's progress much like Your Learning or
|
3
101
|
* WalkMe. Each item in the list can be clickable, and each item has
|
4
102
|
* an icon that defines the item's state as "not started", "in progress",
|
5
103
|
* and "complete".
|
6
104
|
*/
|
7
|
-
export let Checklist: React.ForwardRefExoticComponent<React.RefAttributes<
|
8
|
-
|
105
|
+
export declare let Checklist: React.ForwardRefExoticComponent<ChecklistProps & React.RefAttributes<HTMLElement>>;
|
106
|
+
export {};
|
@@ -20,6 +20,7 @@ var react = require('@carbon/react');
|
|
20
20
|
var icons = require('@carbon/react/icons');
|
21
21
|
var ChecklistIcon = require('./ChecklistIcon.js');
|
22
22
|
var ChecklistChart = require('./ChecklistChart.js');
|
23
|
+
var Checklist_types = require('./Checklist.types.js');
|
23
24
|
|
24
25
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
25
26
|
|
@@ -52,7 +53,7 @@ var defaults = {
|
|
52
53
|
open: true,
|
53
54
|
enableToggle: true,
|
54
55
|
taskLists: [],
|
55
|
-
theme:
|
56
|
+
theme: Checklist_types.Themes.light,
|
56
57
|
toggleLabel: 'Toggle',
|
57
58
|
toggleLabelAlign: 'top'
|
58
59
|
};
|
@@ -176,11 +177,13 @@ exports.Checklist = /*#__PURE__*/React__default["default"].forwardRef(function (
|
|
176
177
|
className: "".concat(blockClass, "__list-item"),
|
177
178
|
key: "".concat(item.label, "-").concat(index)
|
178
179
|
}, /*#__PURE__*/React__default["default"].createElement(ChecklistIcon.ChecklistIcon, {
|
179
|
-
kind: item.kind
|
180
|
+
kind: item.kind,
|
181
|
+
theme: theme
|
180
182
|
}), typeof item.onClick === 'function' ? /*#__PURE__*/React__default["default"].createElement(react.Button, {
|
181
183
|
className: cx__default["default"]("".concat(blockClass, "__button"), _rollupPluginBabelHelpers.defineProperty({}, "".concat(blockClass, "__button--error"), item.kind === 'error')),
|
182
184
|
onClick: function onClick() {
|
183
|
-
|
185
|
+
var _item$onClick;
|
186
|
+
(_item$onClick = item.onClick) === null || _item$onClick === void 0 || _item$onClick.call(item, item);
|
184
187
|
},
|
185
188
|
size: "sm",
|
186
189
|
title: item.label
|
@@ -256,10 +259,11 @@ exports.Checklist.propTypes = {
|
|
256
259
|
* then the `label` will be rendered as a button,
|
257
260
|
* else the `label` will be rendered as plain text.
|
258
261
|
*/
|
262
|
+
/**@ts-ignore */
|
259
263
|
taskLists: index["default"].arrayOf(index["default"].shape({
|
260
264
|
title: index["default"].string,
|
261
265
|
tasks: index["default"].arrayOf(index["default"].shape({
|
262
|
-
kind: index["default"].oneOf([
|
266
|
+
kind: index["default"].oneOf([Checklist_types.Kinds.unchecked, Checklist_types.Kinds.indeterminate, Checklist_types.Kinds.checked, Checklist_types.Kinds.disabled, Checklist_types.Kinds.error]).isRequired,
|
263
267
|
label: index["default"].string.isRequired,
|
264
268
|
onClick: index["default"].func
|
265
269
|
})).isRequired
|
@@ -267,7 +271,7 @@ exports.Checklist.propTypes = {
|
|
267
271
|
/**
|
268
272
|
* Determines the theme of the component.
|
269
273
|
*/
|
270
|
-
theme: index["default"].oneOf([
|
274
|
+
theme: index["default"].oneOf([Checklist_types.Themes.light, Checklist_types.Themes.dark]),
|
271
275
|
/**
|
272
276
|
* The title of the component.
|
273
277
|
*/
|
@@ -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,27 @@
|
|
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 Themes = /*#__PURE__*/function (Themes) {
|
13
|
+
Themes["light"] = "light";
|
14
|
+
Themes["dark"] = "dark";
|
15
|
+
return Themes;
|
16
|
+
}({});
|
17
|
+
var Kinds = /*#__PURE__*/function (Kinds) {
|
18
|
+
Kinds["unchecked"] = "unchecked";
|
19
|
+
Kinds["indeterminate"] = "indeterminate";
|
20
|
+
Kinds["checked"] = "checked";
|
21
|
+
Kinds["disabled"] = "disabled";
|
22
|
+
Kinds["error"] = "error";
|
23
|
+
return Kinds;
|
24
|
+
}({});
|
25
|
+
|
26
|
+
exports.Kinds = Kinds;
|
27
|
+
exports.Themes = 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';
|
@@ -11,12 +11,13 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
11
11
|
|
12
12
|
var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
|
13
13
|
var React = require('react');
|
14
|
-
var index = require('../../node_modules/prop-types/index.js');
|
14
|
+
var index$1 = require('../../node_modules/prop-types/index.js');
|
15
15
|
var cx = require('classnames');
|
16
16
|
var clamp = require('lodash/clamp');
|
17
|
-
var index
|
17
|
+
var index = require('../../node_modules/@carbon/colors/es/index.js');
|
18
18
|
var devtools = require('../../global/js/utils/devtools.js');
|
19
19
|
var settings = require('../../settings.js');
|
20
|
+
var Checklist_types = require('./Checklist.types.js');
|
20
21
|
|
21
22
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
22
23
|
|
@@ -28,21 +29,25 @@ var _excluded = ["className", "value", "theme"];
|
|
28
29
|
var blockClass = "".concat(settings.pkg.prefix, "--checklist__chart");
|
29
30
|
var componentName = 'ChecklistChart';
|
30
31
|
var defaults = {
|
31
|
-
theme:
|
32
|
+
theme: Checklist_types.Themes.light
|
32
33
|
};
|
33
34
|
|
34
35
|
/**
|
35
36
|
* Custom chart component used within Checklist PLG component
|
36
37
|
*/
|
37
|
-
var ChecklistChart = /*#__PURE__*/React__default["default"].forwardRef(
|
38
|
+
var ChecklistChart = /*#__PURE__*/React__default["default"].forwardRef(
|
39
|
+
/**
|
40
|
+
* @param {{className?: string, value: number, theme?: import('./Checklist.types').Theme}} props type description
|
41
|
+
*/
|
42
|
+
function (_ref, ref) {
|
38
43
|
var className = _ref.className,
|
39
44
|
value = _ref.value,
|
40
45
|
_ref$theme = _ref.theme,
|
41
46
|
theme = _ref$theme === void 0 ? defaults.theme : _ref$theme,
|
42
47
|
rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
|
43
48
|
var numDegrees = clamp__default["default"](value * 360, 0, 360);
|
44
|
-
var circleColor = theme ===
|
45
|
-
var progressColor = index
|
49
|
+
var circleColor = theme === Checklist_types.Themes.light ? index.gray20 : index.gray70; // $ui-03 (-ish)
|
50
|
+
var progressColor = index.purple50;
|
46
51
|
return /*#__PURE__*/React__default["default"].createElement("div", _rollupPluginBabelHelpers["extends"]({}, rest, {
|
47
52
|
className: cx__default["default"](blockClass, className),
|
48
53
|
style: {
|
@@ -62,15 +67,15 @@ ChecklistChart.propTypes = {
|
|
62
67
|
/**
|
63
68
|
* Optional class name for this component.
|
64
69
|
*/
|
65
|
-
className: index["default"].string,
|
70
|
+
className: index$1["default"].string,
|
66
71
|
/**
|
67
72
|
* Determines the theme of the component.
|
68
73
|
*/
|
69
|
-
theme: index["default"].oneOf([
|
74
|
+
theme: index$1["default"].oneOf([Checklist_types.Themes.light, Checklist_types.Themes.dark]),
|
70
75
|
/**
|
71
76
|
* Number between 0 and 1.
|
72
77
|
*/
|
73
|
-
value: index["default"].number.isRequired
|
78
|
+
value: index$1["default"].number.isRequired
|
74
79
|
};
|
75
80
|
|
76
81
|
exports.ChecklistChart = ChecklistChart;
|
@@ -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';
|
@@ -16,6 +16,7 @@ var cx = require('classnames');
|
|
16
16
|
var devtools = require('../../global/js/utils/devtools.js');
|
17
17
|
var settings = require('../../settings.js');
|
18
18
|
var icons = require('@carbon/react/icons');
|
19
|
+
var Checklist_types = require('./Checklist.types.js');
|
19
20
|
|
20
21
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
21
22
|
|
@@ -41,13 +42,17 @@ var componentName = 'ChecklistIcon';
|
|
41
42
|
|
42
43
|
// Default values for props
|
43
44
|
var defaults = {
|
44
|
-
theme:
|
45
|
+
theme: Checklist_types.Themes.light
|
45
46
|
};
|
46
47
|
|
47
48
|
/**
|
48
49
|
* TODO: A description of the component.
|
49
50
|
*/
|
50
|
-
var ChecklistIcon = /*#__PURE__*/React__default["default"].forwardRef(
|
51
|
+
var ChecklistIcon = /*#__PURE__*/React__default["default"].forwardRef(
|
52
|
+
/**
|
53
|
+
* @param {{className?: string, kind?: import('./Checklist.types').Kind, theme?: import('./Checklist.types').Theme}} props type description
|
54
|
+
*/
|
55
|
+
function (_ref, ref) {
|
51
56
|
var className = _ref.className,
|
52
57
|
kind = _ref.kind,
|
53
58
|
_ref$theme = _ref.theme,
|
@@ -95,11 +100,11 @@ ChecklistIcon.propTypes = {
|
|
95
100
|
/**
|
96
101
|
* The icon to be displayed.
|
97
102
|
*/
|
98
|
-
kind: index["default"].oneOf([
|
103
|
+
kind: index["default"].oneOf([Checklist_types.Kinds.unchecked, Checklist_types.Kinds.indeterminate, Checklist_types.Kinds.checked, Checklist_types.Kinds.disabled, Checklist_types.Kinds.error]),
|
99
104
|
/**
|
100
105
|
* Determines the theme of the component.
|
101
106
|
*/
|
102
|
-
theme: index["default"].oneOf([
|
107
|
+
theme: index["default"].oneOf([Checklist_types.Themes.light, Checklist_types.Themes.dark])
|
103
108
|
};
|
104
109
|
|
105
110
|
exports.ChecklistIcon = 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 {};
|
@@ -28,11 +28,9 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
28
28
|
var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
29
29
|
|
30
30
|
var _excluded = ["className", "children", "isVisible", "media", "nextButtonText", "previousButtonLabel", "closeButtonLabel"];
|
31
|
-
|
32
31
|
// The block part of our conventional BEM class names (blockClass__E--M).
|
33
32
|
var blockClass = "".concat(settings.pkg.prefix, "--coachmark-overlay-elements");
|
34
33
|
var componentName = 'CoachmarkOverlayElements';
|
35
|
-
|
36
34
|
// NOTE: the component SCSS is not imported here: it is rolled up separately.
|
37
35
|
|
38
36
|
// Default values can be included here and then assigned to the prop params,
|
@@ -145,8 +143,9 @@ exports.CoachmarkOverlayElements = /*#__PURE__*/React__default["default"].forwar
|
|
145
143
|
title: previousButtonLabel,
|
146
144
|
disabled: scrollPosition === 0,
|
147
145
|
onClick: function onClick() {
|
146
|
+
var _scrollRef$current, _scrollRef$current$sc;
|
148
147
|
var targetStep = lodash.clamp(currentProgStep - 1, progStepFloor, progStepCeil);
|
149
|
-
scrollRef.current.scrollToView(targetStep);
|
148
|
+
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);
|
150
149
|
setCurrentProgStep(targetStep);
|
151
150
|
}
|
152
151
|
}, previousButtonLabel), currentProgStep < progStepCeil ? /*#__PURE__*/React__default["default"].createElement(react.Button, {
|
@@ -155,8 +154,9 @@ exports.CoachmarkOverlayElements = /*#__PURE__*/React__default["default"].forwar
|
|
155
154
|
title: nextButtonText,
|
156
155
|
disabled: scrollPosition === 1,
|
157
156
|
onClick: function onClick() {
|
157
|
+
var _scrollRef$current2, _scrollRef$current2$s;
|
158
158
|
var targetStep = lodash.clamp(currentProgStep + 1, progStepFloor, progStepCeil);
|
159
|
-
scrollRef.current.scrollToView(targetStep);
|
159
|
+
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);
|
160
160
|
setCurrentProgStep(targetStep);
|
161
161
|
}
|
162
162
|
}, nextButtonText) : closeButtonLabel && /*#__PURE__*/React__default["default"].createElement(react.Button, _rollupPluginBabelHelpers["extends"]({
|
@@ -201,6 +201,7 @@ exports.CoachmarkOverlayElements.propTypes = {
|
|
201
201
|
* If a single media element is required, use `{render}`.
|
202
202
|
* If a stepped animation is required, use `{filePaths}`.
|
203
203
|
*/
|
204
|
+
/**@ts-ignore*/
|
204
205
|
media: index["default"].oneOfType([index["default"].shape({
|
205
206
|
render: index["default"].func
|
206
207
|
}), index["default"].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 {};
|
@@ -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 {};
|