@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.
Files changed (103) hide show
  1. package/css/index-full-carbon.css +227 -0
  2. package/css/index-full-carbon.css.map +1 -1
  3. package/css/index-full-carbon.min.css +1 -1
  4. package/css/index-full-carbon.min.css.map +1 -1
  5. package/css/index-without-carbon.css +227 -0
  6. package/css/index-without-carbon.css.map +1 -1
  7. package/css/index-without-carbon.min.css +1 -1
  8. package/css/index-without-carbon.min.css.map +1 -1
  9. package/css/index.css +227 -0
  10. package/css/index.css.map +1 -1
  11. package/css/index.min.css +1 -1
  12. package/css/index.min.css.map +1 -1
  13. package/es/components/Card/Card.js +50 -9
  14. package/es/components/Card/CardFooter.d.ts +5 -1
  15. package/es/components/Card/CardFooter.js +11 -1
  16. package/es/components/Carousel/Carousel.d.ts +6 -2
  17. package/es/components/Checklist/Checklist.d.ts +100 -2
  18. package/es/components/Checklist/Checklist.js +9 -5
  19. package/es/components/Checklist/Checklist.types.d.ts +19 -0
  20. package/es/components/Checklist/Checklist.types.js +22 -0
  21. package/es/components/Checklist/ChecklistChart.d.ts +5 -1
  22. package/es/components/Checklist/ChecklistChart.js +9 -4
  23. package/es/components/Checklist/ChecklistIcon.d.ts +5 -1
  24. package/es/components/Checklist/ChecklistIcon.js +9 -4
  25. package/es/components/CoachmarkButton/CoachmarkButton.d.ts +19 -2
  26. package/es/components/CoachmarkOverlayElements/CoachmarkOverlayElements.d.ts +46 -2
  27. package/es/components/CoachmarkOverlayElements/CoachmarkOverlayElements.js +5 -4
  28. package/es/components/CreateInfluencer/CreateInfluencer.d.ts +55 -17
  29. package/es/components/DataSpreadsheet/DataSpreadsheet.d.ts +67 -2
  30. package/es/components/DataSpreadsheet/DataSpreadsheet.js +48 -27
  31. package/es/components/DataSpreadsheet/DataSpreadsheetBody.d.ts +139 -2
  32. package/es/components/DataSpreadsheet/DataSpreadsheetBody.js +46 -31
  33. package/es/components/DataSpreadsheet/DataSpreadsheetHeader.d.ts +89 -2
  34. package/es/components/DataSpreadsheet/DataSpreadsheetHeader.js +34 -25
  35. package/es/components/DataSpreadsheet/types/index.d.ts +30 -0
  36. package/es/components/GetStartedCard/GetStartedCard.d.ts +5 -0
  37. package/es/components/GetStartedCard/GetStartedCard.js +82 -0
  38. package/es/components/GetStartedCard/index.d.ts +1 -0
  39. package/es/components/Guidebanner/Guidebanner.js +2 -2
  40. package/es/components/NotificationsPanel/NotificationsPanel.d.ts +162 -1
  41. package/es/components/NotificationsPanel/NotificationsPanel.js +10 -10
  42. package/es/components/SidePanel/SidePanel.js +1 -1
  43. package/es/components/TagOverflow/TagOverflow.d.ts +5 -0
  44. package/es/components/TagOverflow/TagOverflow.js +153 -29
  45. package/es/components/TagOverflow/TagOverflowModal.d.ts +29 -0
  46. package/es/components/TagOverflow/TagOverflowModal.js +112 -0
  47. package/es/components/TagOverflow/TagOverflowPopover.d.ts +2 -0
  48. package/es/components/TagOverflow/TagOverflowPopover.js +135 -0
  49. package/es/components/index.d.ts +1 -0
  50. package/es/global/js/package-settings.d.ts +1 -0
  51. package/es/global/js/package-settings.js +1 -0
  52. package/es/index.js +1 -0
  53. package/es/settings.d.ts +1 -0
  54. package/lib/components/Card/Card.js +50 -9
  55. package/lib/components/Card/CardFooter.d.ts +5 -1
  56. package/lib/components/Card/CardFooter.js +11 -1
  57. package/lib/components/Carousel/Carousel.d.ts +6 -2
  58. package/lib/components/Checklist/Checklist.d.ts +100 -2
  59. package/lib/components/Checklist/Checklist.js +9 -5
  60. package/lib/components/Checklist/Checklist.types.d.ts +19 -0
  61. package/lib/components/Checklist/Checklist.types.js +27 -0
  62. package/lib/components/Checklist/ChecklistChart.d.ts +5 -1
  63. package/lib/components/Checklist/ChecklistChart.js +14 -9
  64. package/lib/components/Checklist/ChecklistIcon.d.ts +5 -1
  65. package/lib/components/Checklist/ChecklistIcon.js +9 -4
  66. package/lib/components/CoachmarkButton/CoachmarkButton.d.ts +19 -2
  67. package/lib/components/CoachmarkOverlayElements/CoachmarkOverlayElements.d.ts +46 -2
  68. package/lib/components/CoachmarkOverlayElements/CoachmarkOverlayElements.js +5 -4
  69. package/lib/components/CreateInfluencer/CreateInfluencer.d.ts +55 -17
  70. package/lib/components/DataSpreadsheet/DataSpreadsheet.d.ts +67 -2
  71. package/lib/components/DataSpreadsheet/DataSpreadsheet.js +48 -27
  72. package/lib/components/DataSpreadsheet/DataSpreadsheetBody.d.ts +139 -2
  73. package/lib/components/DataSpreadsheet/DataSpreadsheetBody.js +46 -31
  74. package/lib/components/DataSpreadsheet/DataSpreadsheetHeader.d.ts +89 -2
  75. package/lib/components/DataSpreadsheet/DataSpreadsheetHeader.js +34 -25
  76. package/lib/components/DataSpreadsheet/types/index.d.ts +30 -0
  77. package/lib/components/GetStartedCard/GetStartedCard.d.ts +5 -0
  78. package/lib/components/GetStartedCard/GetStartedCard.js +88 -0
  79. package/lib/components/GetStartedCard/index.d.ts +1 -0
  80. package/lib/components/Guidebanner/Guidebanner.js +2 -2
  81. package/lib/components/NotificationsPanel/NotificationsPanel.d.ts +162 -1
  82. package/lib/components/NotificationsPanel/NotificationsPanel.js +10 -10
  83. package/lib/components/SidePanel/SidePanel.js +1 -1
  84. package/lib/components/TagOverflow/TagOverflow.d.ts +5 -0
  85. package/lib/components/TagOverflow/TagOverflow.js +154 -28
  86. package/lib/components/TagOverflow/TagOverflowModal.d.ts +29 -0
  87. package/lib/components/TagOverflow/TagOverflowModal.js +121 -0
  88. package/lib/components/TagOverflow/TagOverflowPopover.d.ts +2 -0
  89. package/lib/components/TagOverflow/TagOverflowPopover.js +144 -0
  90. package/lib/components/index.d.ts +1 -0
  91. package/lib/global/js/package-settings.d.ts +1 -0
  92. package/lib/global/js/package-settings.js +1 -0
  93. package/lib/index.js +5 -0
  94. package/lib/settings.d.ts +1 -0
  95. package/package.json +3 -3
  96. package/scss/components/GetStartedCard/_carbon-imports.scss +9 -0
  97. package/scss/components/GetStartedCard/_get-started-card.scss +135 -0
  98. package/scss/components/GetStartedCard/_index-with-carbon.scss +9 -0
  99. package/scss/components/GetStartedCard/_index.scss +8 -0
  100. package/scss/components/TagOverflow/_tag-overflow.scss +157 -0
  101. package/scss/components/_index-with-carbon.scss +1 -0
  102. package/scss/components/_index.scss +1 -0
  103. package/telemetry.yml +23 -16
@@ -9,12 +9,14 @@ import { objectWithoutProperties as _objectWithoutProperties, objectSpread2 as _
9
9
  import React__default, { forwardRef } from 'react';
10
10
  import cx from 'classnames';
11
11
  import { Layer, OverflowMenu, OverflowMenuItem, Button, IconButton } from '@carbon/react';
12
+ import { Incomplete, CheckmarkOutline } from '@carbon/react/icons';
12
13
  import PropTypes from '../../node_modules/prop-types/index.js';
13
14
  import { CardHeader } from './CardHeader.js';
14
15
  import { CardFooter } from './CardFooter.js';
15
16
  import { pkg } from '../../settings.js';
16
17
 
17
- var _excluded = ["actionIcons", "actionsPlacement", "children", "className", "clickZone", "description", "label", "media", "mediaPosition", "onClick", "onKeyDown", "onPrimaryButtonClick", "overflowActions", "overflowAriaLabel", "onSecondaryButtonClick", "pictogram", "primaryButtonDisabled", "primaryButtonHref", "primaryButtonIcon", "primaryButtonKind", "primaryButtonPlacement", "primaryButtonText", "productive", "secondaryButtonDisabled", "secondaryButtonHref", "secondaryButtonIcon", "secondaryButtonKind", "secondaryButtonPlacement", "secondaryButtonText", "slug", "title", "titleSize"],
18
+ var _Incomplete, _CheckmarkOutline;
19
+ var _excluded = ["actionIcons", "actionsPlacement", "metadata", "children", "className", "clickZone", "description", "disabled", "footerActionIcon", "getStarted", "label", "media", "mediaPosition", "onClick", "onKeyDown", "onPrimaryButtonClick", "overflowActions", "overflowAriaLabel", "onSecondaryButtonClick", "pictogram", "primaryButtonDisabled", "primaryButtonHref", "primaryButtonIcon", "primaryButtonKind", "primaryButtonPlacement", "primaryButtonText", "productive", "secondaryButtonDisabled", "secondaryButtonHref", "secondaryButtonIcon", "secondaryButtonKind", "secondaryButtonPlacement", "secondaryButtonText", "slug", "status", "sequence", "title", "titleSize"],
18
20
  _excluded2 = ["id"],
19
21
  _excluded3 = ["id", "icon", "onClick", "iconDescription", "href"];
20
22
  var componentName = 'Card';
@@ -38,11 +40,16 @@ var Card = /*#__PURE__*/forwardRef(function (_ref, ref) {
38
40
  actionIcons = _ref$actionIcons === void 0 ? defaults.actionIcons : _ref$actionIcons,
39
41
  _ref$actionsPlacement = _ref.actionsPlacement,
40
42
  actionsPlacement = _ref$actionsPlacement === void 0 ? defaults.actionsPlacement : _ref$actionsPlacement,
43
+ _ref$metadata = _ref.metadata,
44
+ metadata = _ref$metadata === void 0 ? defaults.actionIcons : _ref$metadata,
41
45
  children = _ref.children,
42
46
  className = _ref.className,
43
47
  _ref$clickZone = _ref.clickZone,
44
48
  clickZone = _ref$clickZone === void 0 ? defaults.clickZone : _ref$clickZone,
45
49
  description = _ref.description,
50
+ disabled = _ref.disabled,
51
+ footerActionIcon = _ref.footerActionIcon,
52
+ getStarted = _ref.getStarted,
46
53
  label = _ref.label,
47
54
  media = _ref.media,
48
55
  _ref$mediaPosition = _ref.mediaPosition,
@@ -74,12 +81,18 @@ var Card = /*#__PURE__*/forwardRef(function (_ref, ref) {
74
81
  secondaryButtonPlacement = _ref$secondaryButtonP === void 0 ? defaults.secondaryButtonPlacement : _ref$secondaryButtonP,
75
82
  secondaryButtonText = _ref.secondaryButtonText,
76
83
  slug = _ref.slug,
84
+ status = _ref.status,
85
+ sequence = _ref.sequence,
77
86
  title = _ref.title,
78
87
  _ref$titleSize = _ref.titleSize,
79
88
  titleSize = _ref$titleSize === void 0 ? defaults.titleSize : _ref$titleSize,
80
89
  rest = _objectWithoutProperties(_ref, _excluded);
90
+ var getIcons = function getIcons() {
91
+ return getStarted ? metadata : actionIcons;
92
+ };
81
93
  var blockClass = "".concat(pkg.prefix, "--card");
82
- var hasActions = actionIcons.length > 0 || overflowActions.length > 0 || !!primaryButtonText && primaryButtonPlacement === 'top';
94
+ var hasActions = getIcons().length > 0 || overflowActions.length > 0 || !!primaryButtonText && primaryButtonPlacement === 'top';
95
+ var hasHeaderActions = hasActions && actionsPlacement === 'top';
83
96
  var hasFooterActions = hasActions && actionsPlacement === 'bottom';
84
97
  var hasFooterButton = !!secondaryButtonText || !!primaryButtonText && primaryButtonPlacement === 'bottom';
85
98
  var hasBottomBar = hasFooterActions || hasFooterButton;
@@ -111,13 +124,21 @@ var Card = /*#__PURE__*/forwardRef(function (_ref, ref) {
111
124
  }, rest));
112
125
  })));
113
126
  }
114
- var icons = actionIcons.map(function (_ref3) {
127
+ var icons = getIcons().map(function (_ref3) {
115
128
  var id = _ref3.id,
116
129
  Icon = _ref3.icon,
117
130
  onClick = _ref3.onClick,
118
131
  iconDescription = _ref3.iconDescription,
119
132
  href = _ref3.href,
120
133
  rest = _objectWithoutProperties(_ref3, _excluded3);
134
+ if (getStarted) {
135
+ return /*#__PURE__*/React__default.createElement("span", {
136
+ key: id,
137
+ className: "".concat(blockClass, "__icon")
138
+ }, /*#__PURE__*/React__default.createElement(Icon, {
139
+ "aria-label": iconDescription
140
+ }), iconDescription);
141
+ }
121
142
  if (productive) {
122
143
  return /*#__PURE__*/React__default.createElement(Button, _extends({}, rest, {
123
144
  key: id,
@@ -157,7 +178,7 @@ var Card = /*#__PURE__*/forwardRef(function (_ref, ref) {
157
178
  var clickable = hasClickEvent && !productive || hasClickEvent && productive && clickZone === 'one';
158
179
  var cardProps = _objectSpread2(_objectSpread2({}, rest), {}, {
159
180
  ref: ref,
160
- className: cx(blockClass, _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(blockClass, "__productive"), productive), "".concat(blockClass, "__clickable"), clickable), "".concat(blockClass, "__media-left"), mediaPosition === 'left'), "".concat(blockClass, "--has-slug"), !!slug), className)
181
+ className: cx(blockClass, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(blockClass, "__disabled"), disabled), "".concat(blockClass, "__get-started"), getStarted), "".concat(blockClass, "__productive"), productive), "".concat(blockClass, "__clickable"), clickable), "".concat(blockClass, "__media-left"), mediaPosition === 'left'), "".concat(blockClass, "--has-slug"), !!slug), className)
161
182
  }, clickable && clickableProps);
162
183
  return cardProps;
163
184
  };
@@ -173,7 +194,7 @@ var Card = /*#__PURE__*/forwardRef(function (_ref, ref) {
173
194
  var getHeaderProps = function getHeaderProps() {
174
195
  return {
175
196
  actions: actionsPlacement === 'top' ? getActions() : '',
176
- noActionIcons: actionIcons.length > 0 && actionsPlacement === 'top' ? false : true,
197
+ noActionIcons: getIcons().length > 0 && actionsPlacement === 'top' ? false : true,
177
198
  actionsPlacement: actionsPlacement,
178
199
  onPrimaryButtonClick: onPrimaryButtonClick,
179
200
  onSecondaryButtonClick: onSecondaryButtonClick,
@@ -182,7 +203,7 @@ var Card = /*#__PURE__*/forwardRef(function (_ref, ref) {
182
203
  primaryButtonText: primaryButtonText,
183
204
  primaryButtonDisabled: primaryButtonDisabled,
184
205
  description: description,
185
- hasActions: hasActions,
206
+ hasActions: hasHeaderActions,
186
207
  inClickableCard: hasClickEvent,
187
208
  label: label,
188
209
  secondaryButtonDisabled: secondaryButtonDisabled,
@@ -206,6 +227,8 @@ var Card = /*#__PURE__*/forwardRef(function (_ref, ref) {
206
227
  return {
207
228
  actions: actionsPlacement === 'bottom' ? getActions() : '',
208
229
  actionsPlacement: actionsPlacement,
230
+ disabled: disabled,
231
+ footerActionIcon: footerActionIcon,
209
232
  hasActions: hasFooterActions,
210
233
  hasButton: hasFooterButton,
211
234
  onPrimaryButtonClick: onPrimaryButtonClick,
@@ -225,13 +248,21 @@ var Card = /*#__PURE__*/forwardRef(function (_ref, ref) {
225
248
  secondaryButtonText: secondaryButtonText
226
249
  };
227
250
  };
228
- return /*#__PURE__*/React__default.createElement("div", getCardProps(), media && /*#__PURE__*/React__default.createElement("div", {
251
+ return /*#__PURE__*/React__default.createElement("div", getCardProps(), !getStarted && media && /*#__PURE__*/React__default.createElement("div", {
229
252
  className: "".concat(blockClass, "__media")
230
253
  }, media), Pictogram && /*#__PURE__*/React__default.createElement("div", {
231
254
  className: "".concat(blockClass, "__pictogram")
232
- }, /*#__PURE__*/React__default.createElement(Pictogram, null)), /*#__PURE__*/React__default.createElement("div", {
255
+ }, /*#__PURE__*/React__default.createElement(Pictogram, null)), getStarted && sequence && /*#__PURE__*/React__default.createElement("div", {
256
+ className: "".concat(blockClass, "__sequence")
257
+ }, sequence), getStarted && status && /*#__PURE__*/React__default.createElement("div", {
258
+ className: "".concat(blockClass, "__status")
259
+ }, status === 'incomplete' && (_Incomplete || (_Incomplete = /*#__PURE__*/React__default.createElement(Incomplete, null))), status === 'complete' && (_CheckmarkOutline || (_CheckmarkOutline = /*#__PURE__*/React__default.createElement(CheckmarkOutline, null)))), /*#__PURE__*/React__default.createElement("div", {
233
260
  className: "".concat(blockClass, "__content-container")
234
- }, /*#__PURE__*/React__default.createElement("div", getHeaderBodyProps(), /*#__PURE__*/React__default.createElement(CardHeader, getHeaderProps()), /*#__PURE__*/React__default.createElement("div", getBodyProps(), children)), hasBottomBar && /*#__PURE__*/React__default.createElement(CardFooter, getFooterProps())));
261
+ }, /*#__PURE__*/React__default.createElement("div", getHeaderBodyProps(), /*#__PURE__*/React__default.createElement("div", {
262
+ className: "".concat(blockClass, "__header-container")
263
+ }, /*#__PURE__*/React__default.createElement(CardHeader, getHeaderProps()), /*#__PURE__*/React__default.createElement("div", getBodyProps(), children)), getStarted && media && /*#__PURE__*/React__default.createElement("div", {
264
+ className: "".concat(blockClass, "__media")
265
+ }, media)), hasBottomBar && /*#__PURE__*/React__default.createElement(CardFooter, getFooterProps())));
235
266
  });
236
267
  Card.propTypes = {
237
268
  actionIcons: PropTypes.arrayOf(PropTypes.shape({
@@ -247,9 +278,17 @@ Card.propTypes = {
247
278
  className: PropTypes.string,
248
279
  clickZone: PropTypes.oneOf(['one', 'two', 'three']),
249
280
  description: PropTypes.oneOfType([PropTypes.string, PropTypes.object, PropTypes.node]),
281
+ disabled: PropTypes.bool,
282
+ footerActionIcon: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
283
+ getStarted: PropTypes.bool,
250
284
  label: PropTypes.oneOfType([PropTypes.string, PropTypes.object, PropTypes.node]),
251
285
  media: PropTypes.node,
252
286
  mediaPosition: PropTypes.oneOf(['top', 'left']),
287
+ metadata: PropTypes.arrayOf(PropTypes.shape({
288
+ id: PropTypes.string,
289
+ icon: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
290
+ iconDescription: PropTypes.string
291
+ })),
253
292
  onClick: PropTypes.func,
254
293
  onKeyDown: PropTypes.func,
255
294
  onPrimaryButtonClick: PropTypes.func,
@@ -275,11 +314,13 @@ Card.propTypes = {
275
314
  secondaryButtonKind: PropTypes.oneOf(['secondary', 'ghost']),
276
315
  secondaryButtonPlacement: PropTypes.oneOf(['top', 'bottom']),
277
316
  secondaryButtonText: PropTypes.string,
317
+ sequence: PropTypes.number,
278
318
  /**
279
319
  * **Experimental:** For all cases a `Slug` component can be provided.
280
320
  * Clickable tiles only accept a boolean value of true and display a hollow slug.
281
321
  */
282
322
  slug: PropTypes.oneOfType([PropTypes.node, PropTypes.bool]),
323
+ status: PropTypes.oneOf(['complete', 'incomplete']),
283
324
  title: PropTypes.oneOfType([PropTypes.string, PropTypes.object, PropTypes.node]),
284
325
  titleSize: PropTypes.oneOf(['default', 'large'])
285
326
  };
@@ -1,5 +1,7 @@
1
- export function CardFooter({ actions, hasActions, hasButton, onPrimaryButtonClick, onSecondaryButtonClick, primaryButtonDisabled, primaryButtonHref, primaryButtonIcon, primaryButtonKind, primaryButtonPlacement, primaryButtonText, productive, secondaryButtonDisabled, secondaryButtonHref, secondaryButtonIcon, secondaryButtonKind, secondaryButtonPlacement, secondaryButtonText, }: {
1
+ export function CardFooter({ actions, disabled, footerActionIcon: FooterActionIcon, hasActions, hasButton, onPrimaryButtonClick, onSecondaryButtonClick, primaryButtonDisabled, primaryButtonHref, primaryButtonIcon, primaryButtonKind, primaryButtonPlacement, primaryButtonText, productive, secondaryButtonDisabled, secondaryButtonHref, secondaryButtonIcon, secondaryButtonKind, secondaryButtonPlacement, secondaryButtonText, }: {
2
2
  actions?: any[] | undefined;
3
+ disabled: any;
4
+ footerActionIcon: any;
3
5
  hasActions: any;
4
6
  hasButton: any;
5
7
  onPrimaryButtonClick: any;
@@ -21,6 +23,8 @@ export function CardFooter({ actions, hasActions, hasButton, onPrimaryButtonClic
21
23
  export namespace CardFooter {
22
24
  export namespace propTypes {
23
25
  let actions: PropTypes.Requireable<NonNullable<any[] | PropTypes.ReactNodeLike>>;
26
+ let disabled: PropTypes.Requireable<boolean>;
27
+ let footerActionIcon: PropTypes.Requireable<object>;
24
28
  let hasActions: PropTypes.Requireable<boolean>;
25
29
  let hasButton: PropTypes.Requireable<boolean>;
26
30
  let onPrimaryButtonClick: PropTypes.Requireable<(...args: any[]) => any>;
@@ -11,7 +11,9 @@ import cx from 'classnames';
11
11
  import { Button } from '@carbon/react';
12
12
  import PropTypes from '../../node_modules/prop-types/index.js';
13
13
  import { pkg } from '../../settings.js';
14
+ import { Error } from '@carbon/react/icons';
14
15
 
16
+ var _Error;
15
17
  var componentName = 'CardFooter';
16
18
  var defaults = {
17
19
  actions: Object.freeze([]),
@@ -22,6 +24,8 @@ var defaults = {
22
24
  var CardFooter = function CardFooter(_ref) {
23
25
  var _ref$actions = _ref.actions,
24
26
  actions = _ref$actions === void 0 ? defaults.actions : _ref$actions,
27
+ disabled = _ref.disabled,
28
+ FooterActionIcon = _ref.footerActionIcon,
25
29
  hasActions = _ref.hasActions,
26
30
  hasButton = _ref.hasButton,
27
31
  onPrimaryButtonClick = _ref.onPrimaryButtonClick,
@@ -63,10 +67,16 @@ var CardFooter = function CardFooter(_ref) {
63
67
  disabled: primaryButtonDisabled
64
68
  }, primaryButtonText), hasActions && /*#__PURE__*/React__default.createElement("div", {
65
69
  className: "".concat(blockClass, "__actions")
66
- }, actions));
70
+ }, actions), FooterActionIcon && /*#__PURE__*/React__default.createElement("div", {
71
+ className: "".concat(blockClass, "__action-icon")
72
+ }, disabled ? _Error || (_Error = /*#__PURE__*/React__default.createElement(Error, {
73
+ size: 16
74
+ })) : /*#__PURE__*/React__default.createElement(FooterActionIcon, null)));
67
75
  };
68
76
  CardFooter.propTypes = {
69
77
  actions: PropTypes.oneOfType([PropTypes.array, PropTypes.node]),
78
+ disabled: PropTypes.bool,
79
+ footerActionIcon: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
70
80
  hasActions: PropTypes.bool,
71
81
  hasButton: PropTypes.bool,
72
82
  onPrimaryButtonClick: PropTypes.func,
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
  import React, { ReactNode } from 'react';
8
- interface CarouselProps {
8
+ export interface CarouselProps {
9
9
  /**
10
10
  * Provide the contents of the Carousel.
11
11
  */
@@ -41,6 +41,10 @@ interface CarouselProps {
41
41
  * a value between 0 and 1.
42
42
  */
43
43
  onScroll?: (scrollPercent: number) => void;
44
+ /**
45
+ * Additional props passed to the component.
46
+ */
47
+ [key: string]: any;
44
48
  }
45
49
  /**
46
50
  * The Carousel acts as a scaffold for other Novice to Pro content.
@@ -58,5 +62,5 @@ interface CarouselProps {
58
62
  * 2. From the right-aligned position, when scrolling left,
59
63
  * the left-most item should again be left-aligned.
60
64
  */
61
- declare const Carousel: React.ForwardRefExoticComponent<CarouselProps & React.RefAttributes<HTMLDivElement>>;
65
+ declare const Carousel: React.ForwardRefExoticComponent<Omit<CarouselProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
62
66
  export { Carousel };
@@ -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<any>>;
8
- import React from 'react';
105
+ export declare let Checklist: React.ForwardRefExoticComponent<ChecklistProps & React.RefAttributes<HTMLElement>>;
106
+ export {};
@@ -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: 'light',
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
- item.onClick(item);
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(['unchecked', 'indeterminate', 'checked', 'disabled', 'error']).isRequired,
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(['light', 'dark']),
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<React.RefAttributes<any>>;
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: 'light'
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(function (_ref, ref) {
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 === 'light' ? gray20 : gray70; // $ui-03 (-ish)
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(['light', 'dark']),
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<React.RefAttributes<any>>;
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: 'light'
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(function (_ref, ref) {
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(['unchecked', 'indeterminate', 'checked', 'disabled', 'error']),
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(['light', 'dark'])
98
+ theme: PropTypes.oneOf([Themes.light, Themes.dark])
94
99
  };
95
100
 
96
101
  export { ChecklistIcon };
@@ -1,5 +1,22 @@
1
1
  /**
2
- * Use CoachmarkButton for the target prop of a Coachmark component.
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<any>>;
6
- import React from 'react';
49
+ export declare let CoachmarkOverlayElements: React.ForwardRefExoticComponent<CoachmarkOverlayElementsProps & React.RefAttributes<HTMLDivElement>>;
50
+ export {};