@carbon/ibm-products 2.43.2-canary.323 → 2.43.2-canary.325

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. package/es/components/ActionSet/ActionSet.d.ts +1 -1
  2. package/es/components/ActionSet/ActionSet.js +2 -0
  3. package/es/components/AddSelect/types/index.d.ts +1 -1
  4. package/es/components/Checklist/Checklist.js +2 -3
  5. package/es/components/CreateFullPage/CreateFullPage.d.ts +5 -0
  6. package/es/components/CreateFullPage/CreateFullPage.js +31 -15
  7. package/es/components/CreateFullPage/CreateFullPageStep.d.ts +4 -0
  8. package/es/components/CreateFullPage/CreateFullPageStep.js +8 -2
  9. package/es/components/CreateInfluencer/CreateInfluencer.d.ts +9 -1
  10. package/es/components/CreateInfluencer/CreateInfluencer.js +8 -2
  11. package/es/components/CreateModal/CreateModal.d.ts +2 -2
  12. package/es/components/CreateModal/CreateModal.js +1 -1
  13. package/es/components/Datagrid/Datagrid/DatagridSelectAll.js +1 -0
  14. package/es/components/Datagrid/types/index.d.ts +3 -3
  15. package/es/components/EmptyStates/EmptyState.d.ts +1 -1
  16. package/es/components/EmptyStates/EmptyState.js +2 -0
  17. package/es/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.d.ts +1 -1
  18. package/es/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +2 -0
  19. package/es/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.d.ts +1 -1
  20. package/es/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +2 -0
  21. package/es/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.d.ts +1 -1
  22. package/es/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +2 -0
  23. package/es/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.d.ts +1 -1
  24. package/es/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +2 -0
  25. package/es/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.d.ts +1 -1
  26. package/es/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js +2 -0
  27. package/es/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.d.ts +1 -1
  28. package/es/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +2 -0
  29. package/es/components/ImportModal/ImportModal.d.ts +1 -1
  30. package/es/components/ImportModal/ImportModal.js +3 -8
  31. package/es/components/InlineTip/InlineTipButton.d.ts +1 -1
  32. package/es/components/PageHeader/PageHeader.d.ts +2 -2
  33. package/es/components/PageHeader/PageHeader.js +5 -2
  34. package/es/components/SearchBar/SearchBar.js +1 -1
  35. package/es/components/SidePanel/SidePanel.d.ts +2 -2
  36. package/es/components/TagOverflow/TagOverflowModal.d.ts +1 -1
  37. package/es/components/TagOverflow/TagOverflowPopover.d.ts +3 -1
  38. package/es/components/TagOverflow/TagOverflowPopover.js +1 -1
  39. package/es/components/TagSet/TagSetModal.d.ts +1 -1
  40. package/es/components/Tearsheet/Tearsheet.d.ts +5 -2
  41. package/es/components/Tearsheet/Tearsheet.js +1 -0
  42. package/es/components/Tearsheet/TearsheetNarrow.d.ts +1 -1
  43. package/es/components/Tearsheet/TearsheetNarrow.js +1 -0
  44. package/es/components/Tearsheet/TearsheetShell.d.ts +2 -3
  45. package/es/components/Tearsheet/TearsheetShell.js +0 -1
  46. package/es/components/TooltipTrigger/TooltipTrigger.d.ts +17 -15
  47. package/es/components/TooltipTrigger/TooltipTrigger.js +2 -2
  48. package/es/components/TruncatedList/TruncatedList.d.ts +1 -1
  49. package/es/components/UserProfileImage/UserProfileImage.d.ts +2 -2
  50. package/es/components/UserProfileImage/UserProfileImage.js +1 -5
  51. package/es/components/WebTerminal/WebTerminal.d.ts +1 -1
  52. package/es/components/WebTerminal/WebTerminal.js +1 -0
  53. package/lib/components/ActionSet/ActionSet.d.ts +1 -1
  54. package/lib/components/ActionSet/ActionSet.js +2 -0
  55. package/lib/components/AddSelect/types/index.d.ts +1 -1
  56. package/lib/components/Checklist/Checklist.js +2 -3
  57. package/lib/components/CreateFullPage/CreateFullPage.d.ts +5 -0
  58. package/lib/components/CreateFullPage/CreateFullPage.js +31 -15
  59. package/lib/components/CreateFullPage/CreateFullPageStep.d.ts +4 -0
  60. package/lib/components/CreateFullPage/CreateFullPageStep.js +8 -2
  61. package/lib/components/CreateInfluencer/CreateInfluencer.d.ts +9 -1
  62. package/lib/components/CreateInfluencer/CreateInfluencer.js +8 -2
  63. package/lib/components/CreateModal/CreateModal.d.ts +2 -2
  64. package/lib/components/CreateModal/CreateModal.js +1 -1
  65. package/lib/components/Datagrid/Datagrid/DatagridSelectAll.js +1 -0
  66. package/lib/components/Datagrid/types/index.d.ts +3 -3
  67. package/lib/components/EmptyStates/EmptyState.d.ts +1 -1
  68. package/lib/components/EmptyStates/EmptyState.js +2 -0
  69. package/lib/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.d.ts +1 -1
  70. package/lib/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +2 -0
  71. package/lib/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.d.ts +1 -1
  72. package/lib/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +2 -0
  73. package/lib/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.d.ts +1 -1
  74. package/lib/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +2 -0
  75. package/lib/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.d.ts +1 -1
  76. package/lib/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +2 -0
  77. package/lib/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.d.ts +1 -1
  78. package/lib/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js +2 -0
  79. package/lib/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.d.ts +1 -1
  80. package/lib/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +2 -0
  81. package/lib/components/ImportModal/ImportModal.d.ts +1 -1
  82. package/lib/components/ImportModal/ImportModal.js +3 -8
  83. package/lib/components/InlineTip/InlineTipButton.d.ts +1 -1
  84. package/lib/components/PageHeader/PageHeader.d.ts +2 -2
  85. package/lib/components/PageHeader/PageHeader.js +4 -1
  86. package/lib/components/SearchBar/SearchBar.js +1 -1
  87. package/lib/components/SidePanel/SidePanel.d.ts +2 -2
  88. package/lib/components/TagOverflow/TagOverflowModal.d.ts +1 -1
  89. package/lib/components/TagOverflow/TagOverflowPopover.d.ts +3 -1
  90. package/lib/components/TagOverflow/TagOverflowPopover.js +1 -1
  91. package/lib/components/TagSet/TagSetModal.d.ts +1 -1
  92. package/lib/components/Tearsheet/Tearsheet.d.ts +5 -2
  93. package/lib/components/Tearsheet/Tearsheet.js +1 -0
  94. package/lib/components/Tearsheet/TearsheetNarrow.d.ts +1 -1
  95. package/lib/components/Tearsheet/TearsheetNarrow.js +1 -0
  96. package/lib/components/Tearsheet/TearsheetShell.d.ts +2 -3
  97. package/lib/components/Tearsheet/TearsheetShell.js +0 -1
  98. package/lib/components/TooltipTrigger/TooltipTrigger.d.ts +17 -15
  99. package/lib/components/TooltipTrigger/TooltipTrigger.js +2 -2
  100. package/lib/components/TruncatedList/TruncatedList.d.ts +1 -1
  101. package/lib/components/UserProfileImage/UserProfileImage.d.ts +2 -2
  102. package/lib/components/UserProfileImage/UserProfileImage.js +1 -5
  103. package/lib/components/WebTerminal/WebTerminal.d.ts +1 -1
  104. package/lib/components/WebTerminal/WebTerminal.js +1 -0
  105. package/package.json +2 -2
@@ -16,7 +16,7 @@ export interface ActionSetProps {
16
16
  *
17
17
  * See https://react.carbondesignsystem.com/?path=/docs/components-button--default#component-api
18
18
  */
19
- actions: ButtonProps[];
19
+ actions: ButtonProps<React.ElementType>[];
20
20
  /**
21
21
  * The size of buttons to use for the actions. The allowed values are
22
22
  * those for the size prop of carbon Button. If this prop is specified, all
@@ -170,6 +170,7 @@ ActionSet.propTypes = {
170
170
  label: PropTypes.string,
171
171
  loading: PropTypes.bool,
172
172
  // we duplicate this Button prop to improve the DocGen here
173
+ /**@ts-ignore*/
173
174
  onClick: Button.propTypes.onClick
174
175
  })))]),
175
176
  /**
@@ -178,6 +179,7 @@ ActionSet.propTypes = {
178
179
  * the buttons will be set to this size, overriding any 'size' values (if any)
179
180
  * supplied in the actions array (if any).
180
181
  */
182
+ /**@ts-ignore*/
181
183
  buttonSize: Button.propTypes.size,
182
184
  /**
183
185
  * An optional class or classes to be added to the outermost element.
@@ -46,5 +46,5 @@ export interface SortOption {
46
46
  id?: string;
47
47
  direction?: string;
48
48
  attribute?: string;
49
- itemText?: object;
49
+ itemText?: ReactNode;
50
50
  }
@@ -45,8 +45,7 @@ var defaults = {
45
45
  enableToggle: true,
46
46
  taskLists: [],
47
47
  theme: Themes.light,
48
- toggleLabel: 'Toggle',
49
- toggleLabelAlign: 'top'
48
+ toggleLabel: 'Toggle'
50
49
  };
51
50
 
52
51
  /**
@@ -79,7 +78,7 @@ var Checklist = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
79
78
  _ref$toggleLabel = _ref.toggleLabel,
80
79
  toggleLabel = _ref$toggleLabel === void 0 ? defaults.toggleLabel : _ref$toggleLabel,
81
80
  _ref$toggleLabelAlign = _ref.toggleLabelAlign,
82
- toggleLabelAlign = _ref$toggleLabelAlign === void 0 ? defaults.toggleLabelAlign : _ref$toggleLabelAlign,
81
+ toggleLabelAlign = _ref$toggleLabelAlign === void 0 ? 'top' : _ref$toggleLabelAlign,
83
82
  viewAllLabel = _ref.viewAllLabel,
84
83
  rest = _objectWithoutProperties(_ref, _excluded);
85
84
  var _useState = useState(open),
@@ -90,6 +90,11 @@ type CreateFullPageBaseProps = {
90
90
  * A prop to omit the trailing slash for the breadcrumbs
91
91
  */
92
92
  noTrailingSlash?: boolean;
93
+ /**
94
+ * onChange event for Progress Indicator in the Influencer
95
+ * @param data step index
96
+ */
97
+ onClickInfluencerStep?: (data: number) => void;
93
98
  /**
94
99
  * An optional handler that is called when the user closes the full page (by
95
100
  * clicking the secondary button, located in the modal, which triggers after
@@ -23,7 +23,7 @@ import { useResetCreateComponent } from '../../global/js/hooks/useResetCreateCom
23
23
  import { useCreateComponentStepChange } from '../../global/js/hooks/useCreateComponentStepChange.js';
24
24
  import { CreateInfluencer } from '../CreateInfluencer/CreateInfluencer.js';
25
25
 
26
- var _excluded = ["breadcrumbsOverflowAriaLabel", "breadcrumbs", "backButtonText", "cancelButtonText", "children", "className", "initialStep", "maxVisibleBreadcrumbs", "modalDangerButtonText", "modalDescription", "modalSecondaryButtonText", "modalTitle", "nextButtonText", "onClose", "onRequestSubmit", "firstFocusElement", "submitButtonText", "noTrailingSlash", "title", "secondaryTitle", "breadcrumbOverflowTooltipAlign"];
26
+ var _excluded = ["breadcrumbsOverflowAriaLabel", "breadcrumbs", "backButtonText", "cancelButtonText", "children", "className", "initialStep", "maxVisibleBreadcrumbs", "modalDangerButtonText", "modalDescription", "modalSecondaryButtonText", "modalTitle", "nextButtonText", "onClickInfluencerStep", "onClose", "onRequestSubmit", "firstFocusElement", "submitButtonText", "noTrailingSlash", "title", "secondaryTitle", "breadcrumbOverflowTooltipAlign"];
27
27
  var blockClass = "".concat(pkg.prefix, "--create-full-page");
28
28
  var componentName = 'CreateFullPage';
29
29
 
@@ -61,6 +61,7 @@ var CreateFullPage = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
61
61
  modalSecondaryButtonText = _ref.modalSecondaryButtonText,
62
62
  modalTitle = _ref.modalTitle,
63
63
  nextButtonText = _ref.nextButtonText,
64
+ onClickInfluencerStep = _ref.onClickInfluencerStep,
64
65
  onClose = _ref.onClose,
65
66
  onRequestSubmit = _ref.onRequestSubmit,
66
67
  firstFocusElement = _ref.firstFocusElement,
@@ -102,24 +103,28 @@ var CreateFullPage = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
102
103
  setIsDisabled = _useState12[1];
103
104
  var _useState13 = useState(),
104
105
  _useState14 = _slicedToArray(_useState13, 2),
105
- onNext = _useState14[0],
106
- _setOnNext = _useState14[1];
106
+ onPrevious = _useState14[0],
107
+ _setOnPrevious = _useState14[1];
107
108
  var _useState15 = useState(),
108
109
  _useState16 = _slicedToArray(_useState15, 2),
109
- onMount = _useState16[0],
110
- _setOnMount = _useState16[1];
111
- var _useState17 = useState([]),
110
+ onNext = _useState16[0],
111
+ _setOnNext = _useState16[1];
112
+ var _useState17 = useState(),
112
113
  _useState18 = _slicedToArray(_useState17, 2),
113
- stepData = _useState18[0],
114
- setStepData = _useState18[1];
115
- var _useState19 = useState(1),
114
+ onMount = _useState18[0],
115
+ _setOnMount = _useState18[1];
116
+ var _useState19 = useState([]),
116
117
  _useState20 = _slicedToArray(_useState19, 2),
117
- firstIncludedStep = _useState20[0],
118
- setFirstIncludedStep = _useState20[1];
119
- var _useState21 = useState(),
118
+ stepData = _useState20[0],
119
+ setStepData = _useState20[1];
120
+ var _useState21 = useState(1),
120
121
  _useState22 = _slicedToArray(_useState21, 2),
121
- lastIncludedStep = _useState22[0],
122
- setLastIncludedStep = _useState22[1];
122
+ firstIncludedStep = _useState22[0],
123
+ setFirstIncludedStep = _useState22[1];
124
+ var _useState23 = useState(),
125
+ _useState24 = _slicedToArray(_useState23, 2),
126
+ lastIncludedStep = _useState24[0],
127
+ setLastIncludedStep = _useState24[1];
123
128
  useEffect(function () {
124
129
  var firstItem = stepData.findIndex(function (item) {
125
130
  return item === null || item === void 0 ? void 0 : item.shouldIncludeStep;
@@ -161,6 +166,7 @@ var CreateFullPage = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
161
166
  firstIncludedStep: firstIncludedStep,
162
167
  lastIncludedStep: lastIncludedStep,
163
168
  stepData: stepData,
169
+ onPrevious: onPrevious,
164
170
  onNext: onNext,
165
171
  isSubmitDisabled: isDisabled,
166
172
  setCurrentStep: setCurrentStep,
@@ -201,7 +207,8 @@ var CreateFullPage = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
201
207
  }, /*#__PURE__*/React__default.createElement(CreateInfluencer, {
202
208
  stepData: stepData,
203
209
  currentStep: currentStep,
204
- title: secondaryTitle
210
+ title: secondaryTitle,
211
+ onClickStep: onClickInfluencerStep
205
212
  })), /*#__PURE__*/React__default.createElement("div", {
206
213
  className: "".concat(blockClass, "__body")
207
214
  }, /*#__PURE__*/React__default.createElement("div", {
@@ -215,6 +222,11 @@ var CreateFullPage = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
215
222
  value: {
216
223
  currentStep: currentStep,
217
224
  setIsDisabled: setIsDisabled,
225
+ setOnPrevious: function setOnPrevious(fn) {
226
+ return _setOnPrevious(function () {
227
+ return fn;
228
+ });
229
+ },
218
230
  setOnNext: function setOnNext(fn) {
219
231
  return _setOnNext(function () {
220
232
  return fn;
@@ -346,6 +358,10 @@ CreateFullPage.propTypes = {
346
358
  * A prop to omit the trailing slash for the breadcrumbs
347
359
  */
348
360
  noTrailingSlash: PropTypes.bool,
361
+ /**
362
+ * onChange event for Progress Indicator in the Influencer
363
+ */
364
+ onClickInfluencerStep: PropTypes.func,
349
365
  /**
350
366
  * An optional handler that is called when the user closes the full page (by
351
367
  * clicking the secondary button, located in the modal, which triggers after
@@ -46,6 +46,10 @@ interface CreateFullPageStepBaseProps extends PropsWithChildren {
46
46
  * This function can _optionally_ return a promise that is either resolved or rejected and the CreateFullPage will handle the submitting state of the next button.
47
47
  */
48
48
  onNext?: () => void | Promise<any>;
49
+ /**
50
+ * Optional function to be called when you move to the previous step.
51
+ */
52
+ onPrevious?: () => void;
49
53
  /**
50
54
  * Sets the optional secondary label on the progress step component
51
55
  */
@@ -16,7 +16,7 @@ import pconsole from '../../global/js/utils/pconsole.js';
16
16
  import { usePreviousValue } from '../../global/js/hooks/usePreviousValue.js';
17
17
  import { useRetrieveStepData } from '../../global/js/hooks/useRetrieveStepData.js';
18
18
 
19
- var _excluded = ["children", "className", "subtitle", "description", "disableSubmit", "includeStep", "introStep", "invalid", "title", "hasFieldset", "fieldsetLegendText", "onNext", "onMount", "secondaryLabel"];
19
+ var _excluded = ["children", "className", "subtitle", "description", "disableSubmit", "includeStep", "introStep", "invalid", "title", "hasFieldset", "fieldsetLegendText", "onNext", "onPrevious", "onMount", "secondaryLabel"];
20
20
  var componentName = 'CreateFullPageStep';
21
21
  var blockClass = "".concat(pkg.prefix, "--create-full-page__step");
22
22
 
@@ -43,6 +43,7 @@ var CreateFullPageStep = /*#__PURE__*/forwardRef(function (_ref, ref) {
43
43
  hasFieldset = _ref.hasFieldset,
44
44
  fieldsetLegendText = _ref.fieldsetLegendText,
45
45
  onNext = _ref.onNext,
46
+ onPrevious = _ref.onPrevious,
46
47
  onMount = _ref.onMount,
47
48
  secondaryLabel = _ref.secondaryLabel,
48
49
  rest = _objectWithoutProperties(_ref, _excluded);
@@ -82,8 +83,9 @@ var CreateFullPageStep = /*#__PURE__*/forwardRef(function (_ref, ref) {
82
83
  if (stepNumber === (stepsContext === null || stepsContext === void 0 ? void 0 : stepsContext.currentStep)) {
83
84
  stepsContext.setIsDisabled(disableSubmit);
84
85
  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
86
+ stepsContext === null || stepsContext === void 0 || stepsContext.setOnPrevious(onPrevious);
85
87
  }
86
- }, [stepsContext, stepNumber, disableSubmit, onNext]);
88
+ }, [stepsContext, stepNumber, disableSubmit, onNext, onPrevious]);
87
89
  var span = {
88
90
  span: 50
89
91
  }; // Half.
@@ -176,6 +178,10 @@ CreateFullPageStep.propTypes = {
176
178
  * This function can _optionally_ return a promise that is either resolved or rejected and the CreateFullPage will handle the submitting state of the next button.
177
179
  */
178
180
  onNext: PropTypes.func,
181
+ /**
182
+ * Optional function to be called when you move to the previous step.
183
+ */
184
+ onPrevious: PropTypes.func,
179
185
  /**
180
186
  * Sets the optional secondary label on the progress step component
181
187
  */
@@ -22,6 +22,10 @@ interface CreateInfluencerProps {
22
22
  * Provide the current step number.
23
23
  */
24
24
  currentStep: number;
25
+ /**
26
+ * onChange event for Progress Indicator
27
+ */
28
+ onClickStep?: (step: number) => void;
25
29
  /**
26
30
  * Provide the Set Data.
27
31
  */
@@ -32,7 +36,7 @@ interface CreateInfluencerProps {
32
36
  title?: string | undefined;
33
37
  }
34
38
  export declare const CreateInfluencer: {
35
- ({ className, currentStep, stepData, title, }: PropsWithChildren<CreateInfluencerProps>): React.JSX.Element;
39
+ ({ className, currentStep, onClickStep, stepData, title, }: PropsWithChildren<CreateInfluencerProps>): React.JSX.Element;
36
40
  displayName: string;
37
41
  propTypes: {
38
42
  /**
@@ -43,6 +47,10 @@ export declare const CreateInfluencer: {
43
47
  * Used to mark the current step on the ProgressIndicator component
44
48
  */
45
49
  currentStep: PropTypes.Validator<number>;
50
+ /**
51
+ * onChange event for Progress Indicator
52
+ */
53
+ onClickStep: PropTypes.Requireable<(...args: any[]) => any>;
46
54
  /**
47
55
  * The step data that renders the progress items
48
56
  */
@@ -20,6 +20,7 @@ var componentName = 'CreateInfluencer';
20
20
  var CreateInfluencer = function CreateInfluencer(_ref) {
21
21
  var className = _ref.className,
22
22
  currentStep = _ref.currentStep,
23
+ onClickStep = _ref.onClickStep,
23
24
  stepData = _ref.stepData,
24
25
  title = _ref.title;
25
26
  var getNumberOfDynamicStepsBeforeCurrentStep = function getNumberOfDynamicStepsBeforeCurrentStep(array, key) {
@@ -57,10 +58,11 @@ var CreateInfluencer = function CreateInfluencer(_ref) {
57
58
  ,
58
59
  spaceEqually: true,
59
60
  vertical: true,
60
- className: cx("".concat(blockClass, "__progress-indicator"))
61
+ className: cx("".concat(blockClass, "__progress-indicator")),
62
+ onChange: onClickStep
61
63
  }, progressSteps.map(function (step, stepIndex) {
62
64
  return /*#__PURE__*/React__default.createElement(ProgressStep, {
63
- label: step.title,
65
+ label: step === null || step === void 0 ? void 0 : step.title,
64
66
  key: stepIndex,
65
67
  secondaryLabel: step.secondaryLabel || undefined,
66
68
  invalid: step.invalid
@@ -84,6 +86,10 @@ CreateInfluencer.propTypes = {
84
86
  * Used to mark the current step on the ProgressIndicator component
85
87
  */
86
88
  currentStep: PropTypes.number.isRequired,
89
+ /**
90
+ * onChange event for Progress Indicator
91
+ */
92
+ onClickStep: PropTypes.func,
87
93
  /**
88
94
  * The step data that renders the progress items
89
95
  */
@@ -58,7 +58,7 @@ export interface CreateModalProps extends React.ComponentProps<typeof ComposedMo
58
58
  /**
59
59
  * Specifies which DOM element in the form should be focused.
60
60
  */
61
- selectorPrimaryFocus: ReactNode;
61
+ selectorPrimaryFocus: string;
62
62
  }
63
63
  /**
64
64
  * The `CreateModal` component provides a way for a user to quickly generate a new
@@ -68,4 +68,4 @@ immediately apparent to the user, with a clear and obvious path to completion.
68
68
  */
69
69
  export declare let CreateModal: React.ForwardRefExoticComponent<CreateModalProps & {
70
70
  children?: React.ReactNode;
71
- } & React.RefAttributes<unknown>>;
71
+ } & React.RefAttributes<HTMLDivElement>>;
@@ -136,7 +136,7 @@ CreateModal.propTypes = {
136
136
  /**
137
137
  * Specifies which DOM element in the form should be focused.
138
138
  */
139
- selectorPrimaryFocus: PropTypes.node.isRequired,
139
+ selectorPrimaryFocus: PropTypes.string.isRequired,
140
140
  /**
141
141
  * The subtitle of the CreateModal is optional and serves to provide more information about the modal.
142
142
  */
@@ -70,6 +70,7 @@ var SelectAll = function SelectAll(datagridState) {
70
70
  return onChange === null || onChange === void 0 ? void 0 : onChange(event);
71
71
  };
72
72
  return /*#__PURE__*/React__default.createElement(TableSelectAll, _extends({}, selectProps, {
73
+ checked: (selectProps === null || selectProps === void 0 ? void 0 : selectProps.checked) || false,
73
74
  className: cx("".concat(blockClass, "__head-select-all"), "".concat(blockClass, "__checkbox-cell"), _defineProperty({}, "".concat(blockClass, "__checkbox-cell-sticky-left"), /* istanbul ignore next */
74
75
  isFirstColumnStickyLeft && Number(windowSize) > 671)),
75
76
  name: "".concat(tableId, "-select-all-checkbox-name"),
@@ -155,7 +155,7 @@ export interface RowAction {
155
155
  icon?: ComponentType | FunctionComponent;
156
156
  align?: React.ComponentProps<typeof IconButton>['align'];
157
157
  shouldHideMenuItem?: (...args: any[]) => void;
158
- shouldDisableMenuItem?: (...args: any[]) => void;
158
+ shouldDisableMenuItem?: (...args: any[]) => boolean;
159
159
  disabled?: boolean;
160
160
  onClick?: (...args: any[]) => void;
161
161
  }
@@ -197,7 +197,7 @@ export interface DataGridState<T extends object = any> extends TableCommonProps,
197
197
  emptyStateAction?: {
198
198
  kind?: 'primary' | 'secondary' | 'tertiary';
199
199
  renderIcon?: CarbonIconType;
200
- onClick?: ButtonProps<any>['onClick'];
200
+ onClick?: ButtonProps<React.ElementType>['onClick'];
201
201
  text?: string;
202
202
  };
203
203
  emptyStateLink?: {
@@ -221,7 +221,7 @@ export interface DataGridState<T extends object = any> extends TableCommonProps,
221
221
  allPageRowsLabel?: string | object;
222
222
  allRowsLabel?: string | object;
223
223
  onSelectAllRows?: (val?: boolean) => void;
224
- toolbarBatchActions?: ButtonProps<any>[];
224
+ toolbarBatchActions?: ButtonProps<React.ElementType>[];
225
225
  setGlobalFilter?: (filterValue: FilterValue) => void;
226
226
  batchActionMenuButtonLabel?: string;
227
227
  translateWithIdBatchActions?: TableBatchActionsProps['translateWithId'];
@@ -24,7 +24,7 @@ export interface EmptyStateProps {
24
24
  action?: {
25
25
  kind?: 'primary' | 'secondary' | 'tertiary';
26
26
  renderIcon?: CarbonIconType;
27
- onClick?: ButtonProps['onClick'];
27
+ onClick?: ButtonProps<React.ElementType>['onClick'];
28
28
  text?: string;
29
29
  };
30
30
  /**
@@ -85,6 +85,7 @@ EmptyState.propTypes = {
85
85
  action: PropTypes.shape(_objectSpread2(_objectSpread2({}, Button.propTypes), {}, {
86
86
  kind: PropTypes.oneOf(['primary', 'secondary', 'tertiary']),
87
87
  renderIcon: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
88
+ /**@ts-ignore*/
88
89
  onClick: Button.propTypes.onClick,
89
90
  text: PropTypes.string
90
91
  })),
@@ -112,6 +113,7 @@ EmptyState.propTypes = {
112
113
  /**
113
114
  * Empty state link object
114
115
  */
116
+ /**@ts-ignore*/
115
117
  link: PropTypes.shape(_objectSpread2(_objectSpread2({}, Link.propTypes), {}, {
116
118
  text: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
117
119
  href: PropTypes.string
@@ -15,7 +15,7 @@ export interface ErrorEmptyStateProps {
15
15
  action?: {
16
16
  kind?: 'primary' | 'secondary' | 'tertiary';
17
17
  renderIcon?: CarbonIconType;
18
- onClick?: ButtonProps['onClick'];
18
+ onClick?: ButtonProps<React.ElementType>['onClick'];
19
19
  text?: string;
20
20
  };
21
21
  /**
@@ -69,6 +69,7 @@ ErrorEmptyState.propTypes = {
69
69
  action: PropTypes.shape(_objectSpread2(_objectSpread2({}, Button.propTypes), {}, {
70
70
  kind: PropTypes.oneOf(['primary', 'secondary', 'tertiary']),
71
71
  renderIcon: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
72
+ /**@ts-ignore*/
72
73
  onClick: Button.propTypes.onClick,
73
74
  text: PropTypes.string
74
75
  })),
@@ -94,6 +95,7 @@ ErrorEmptyState.propTypes = {
94
95
  /**
95
96
  * Empty state link object
96
97
  */
98
+ /**@ts-ignore*/
97
99
  link: PropTypes.shape(_objectSpread2(_objectSpread2({}, Link.propTypes), {}, {
98
100
  text: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
99
101
  href: PropTypes.string
@@ -15,7 +15,7 @@ export interface NoDataEmptyStateProps {
15
15
  action?: {
16
16
  kind?: 'primary' | 'secondary' | 'tertiary';
17
17
  renderIcon?: CarbonIconType;
18
- onClick?: ButtonProps['onClick'];
18
+ onClick?: ButtonProps<React.ElementType>['onClick'];
19
19
  text?: string;
20
20
  };
21
21
  /**
@@ -70,6 +70,7 @@ NoDataEmptyState.propTypes = {
70
70
  action: PropTypes.shape(_objectSpread2(_objectSpread2({}, Button.propTypes), {}, {
71
71
  kind: PropTypes.oneOf(['primary', 'secondary', 'tertiary']),
72
72
  renderIcon: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
73
+ /**@ts-ignore */
73
74
  onClick: Button.propTypes.onClick,
74
75
  text: PropTypes.string
75
76
  })),
@@ -95,6 +96,7 @@ NoDataEmptyState.propTypes = {
95
96
  /**
96
97
  * Empty state link object
97
98
  */
99
+ /**@ts-ignore */
98
100
  link: PropTypes.shape(_objectSpread2(_objectSpread2({}, Link.propTypes), {}, {
99
101
  text: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
100
102
  href: PropTypes.string
@@ -15,7 +15,7 @@ export interface NoTagsEmptyStateProps {
15
15
  action?: {
16
16
  kind?: 'primary' | 'secondary' | 'tertiary';
17
17
  renderIcon?: CarbonIconType;
18
- onClick?: ButtonProps['onClick'];
18
+ onClick?: ButtonProps<React.ElementType>['onClick'];
19
19
  text?: string;
20
20
  };
21
21
  /**
@@ -69,6 +69,7 @@ NoTagsEmptyState.propTypes = {
69
69
  action: PropTypes.shape(_objectSpread2(_objectSpread2({}, Button.propTypes), {}, {
70
70
  kind: PropTypes.oneOf(['primary', 'secondary', 'tertiary']),
71
71
  renderIcon: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
72
+ /**@ts-ignore*/
72
73
  onClick: Button.propTypes.onClick,
73
74
  text: PropTypes.string
74
75
  })),
@@ -94,6 +95,7 @@ NoTagsEmptyState.propTypes = {
94
95
  /**
95
96
  * Empty state link object
96
97
  */
98
+ /**@ts-ignore*/
97
99
  link: PropTypes.shape(_objectSpread2(_objectSpread2({}, Link.propTypes), {}, {
98
100
  text: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
99
101
  href: PropTypes.string
@@ -15,7 +15,7 @@ export interface NotFoundEmptyStateProps {
15
15
  action?: {
16
16
  kind?: 'primary' | 'secondary' | 'tertiary';
17
17
  renderIcon?: CarbonIconType;
18
- onClick?: ButtonProps['onClick'];
18
+ onClick?: ButtonProps<React.ElementType>['onClick'];
19
19
  text?: string;
20
20
  };
21
21
  /**
@@ -69,6 +69,7 @@ NotFoundEmptyState.propTypes = {
69
69
  action: PropTypes.shape(_objectSpread2(_objectSpread2({}, Button.propTypes), {}, {
70
70
  kind: PropTypes.oneOf(['primary', 'secondary', 'tertiary']),
71
71
  renderIcon: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
72
+ /**@ts-ignore*/
72
73
  onClick: Button.propTypes.onClick,
73
74
  text: PropTypes.string
74
75
  })),
@@ -94,6 +95,7 @@ NotFoundEmptyState.propTypes = {
94
95
  /**
95
96
  * Empty state link object
96
97
  */
98
+ /**@ts-ignore*/
97
99
  link: PropTypes.shape(_objectSpread2(_objectSpread2({}, Link.propTypes), {}, {
98
100
  text: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
99
101
  href: PropTypes.string
@@ -15,7 +15,7 @@ export interface NotificationsEmptyStateProps {
15
15
  action?: {
16
16
  kind?: 'primary' | 'secondary' | 'tertiary';
17
17
  renderIcon?: CarbonIconType;
18
- onClick?: ButtonProps['onClick'];
18
+ onClick?: ButtonProps<React.ElementType>['onClick'];
19
19
  text?: string;
20
20
  };
21
21
  /**
@@ -69,6 +69,7 @@ NotificationsEmptyState.propTypes = {
69
69
  action: PropTypes.shape(_objectSpread2(_objectSpread2({}, Button.propTypes), {}, {
70
70
  kind: PropTypes.oneOf(['primary', 'secondary', 'tertiary']),
71
71
  renderIcon: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
72
+ /**@ts-ignore*/
72
73
  onClick: Button.propTypes.onClick,
73
74
  text: PropTypes.string
74
75
  })),
@@ -94,6 +95,7 @@ NotificationsEmptyState.propTypes = {
94
95
  /**
95
96
  * Empty state link object
96
97
  */
98
+ /**@ts-ignore*/
97
99
  link: PropTypes.shape(_objectSpread2(_objectSpread2({}, Link.propTypes), {}, {
98
100
  text: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
99
101
  href: PropTypes.string
@@ -15,7 +15,7 @@ export interface UnauthorizedEmptyStateProps {
15
15
  action?: {
16
16
  kind?: 'primary' | 'secondary' | 'tertiary';
17
17
  renderIcon?: CarbonIconType;
18
- onClick?: ButtonProps['onClick'];
18
+ onClick?: ButtonProps<React.ElementType>['onClick'];
19
19
  text?: string;
20
20
  };
21
21
  /**
@@ -70,6 +70,7 @@ UnauthorizedEmptyState.propTypes = {
70
70
  action: PropTypes.shape(_objectSpread2(_objectSpread2({}, Button.propTypes), {}, {
71
71
  kind: PropTypes.oneOf(['primary', 'secondary', 'tertiary']),
72
72
  renderIcon: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
73
+ /**@ts-ignore*/
73
74
  onClick: Button.propTypes.onClick,
74
75
  text: PropTypes.string
75
76
  })),
@@ -95,6 +96,7 @@ UnauthorizedEmptyState.propTypes = {
95
96
  /**
96
97
  * Empty state link object
97
98
  */
99
+ /**@ts-ignore*/
98
100
  link: PropTypes.shape(_objectSpread2(_objectSpread2({}, Link.propTypes), {}, {
99
101
  text: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
100
102
  href: PropTypes.string
@@ -12,7 +12,7 @@ type FileType = {
12
12
  iconDescription?: string;
13
13
  invalidFileType?: boolean;
14
14
  name: string;
15
- status?: string;
15
+ status?: 'uploading' | 'edit' | 'complete';
16
16
  uuid?: string;
17
17
  invalid?: boolean;
18
18
  errorBody?: string;
@@ -18,14 +18,9 @@ import uuidv4 from '../../global/js/utils/uuidv4.js';
18
18
 
19
19
  var _excluded = ["accept", "className", "defaultErrorBody", "defaultErrorHeader", "description", "fetchErrorBody", "fetchErrorHeader", "fileDropHeader", "fileDropLabel", "fileUploadLabel", "inputButtonIcon", "inputButtonText", "inputId", "inputLabel", "inputPlaceholder", "invalidFileTypeErrorBody", "invalidFileTypeErrorHeader", "invalidIconDescription", "maxFileSize", "maxFileSizeErrorBody", "maxFileSizeErrorHeader", "onClose", "onRequestSubmit", "open", "portalTarget", "primaryButtonText", "secondaryButtonText", "title"];
20
20
  var componentName = 'ImportModal';
21
-
22
- // Default values for props
23
- var defaults = {
24
- accept: Object.freeze([])
25
- };
26
21
  var ImportModal = /*#__PURE__*/forwardRef(function (_ref, ref) {
27
22
  var _ref$accept = _ref.accept,
28
- accept = _ref$accept === void 0 ? defaults.accept : _ref$accept,
23
+ accept = _ref$accept === void 0 ? [] : _ref$accept,
29
24
  className = _ref.className,
30
25
  defaultErrorBody = _ref.defaultErrorBody,
31
26
  defaultErrorHeader = _ref.defaultErrorHeader,
@@ -222,7 +217,7 @@ var ImportModal = /*#__PURE__*/forwardRef(function (_ref, ref) {
222
217
  className: "".concat(blockClass, "__input-group")
223
218
  }, /*#__PURE__*/React__default.createElement(TextInput, {
224
219
  labelText: "",
225
- id: inputId,
220
+ id: inputId || '',
226
221
  onChange: inputHandler,
227
222
  placeholder: inputPlaceholder,
228
223
  value: importUrl,
@@ -237,7 +232,7 @@ var ImportModal = /*#__PURE__*/forwardRef(function (_ref, ref) {
237
232
  return /*#__PURE__*/React__default.createElement(Add, _extends({
238
233
  size: 20
239
234
  }, props));
240
- } : null
235
+ } : undefined
241
236
  }, inputButtonText)), /*#__PURE__*/React__default.createElement("div", {
242
237
  className: "".concat(carbonPrefix, "--file-container ").concat(blockClass, "__file-container")
243
238
  }, hasFiles && /*#__PURE__*/React__default.createElement("p", {
@@ -20,4 +20,4 @@ export interface InlineTipButtonProps {
20
20
  */
21
21
  export declare let InlineTipButton: React.ForwardRefExoticComponent<InlineTipButtonProps & {
22
22
  children?: React.ReactNode;
23
- } & React.RefAttributes<HTMLButtonElement>>;
23
+ } & React.RefAttributes<ButtonProps<React.ElementType<any, keyof React.JSX.IntrinsicElements>>>>;
@@ -122,7 +122,7 @@ type PageActionProps = {
122
122
  * - maxWidth: maximum number of pixels the content will grow to
123
123
  * Carbon Button API https://react.carbondesignsystem.com/?path=/docs/components-button--default#component-api
124
124
  */
125
- pageActions: ButtonProps[] | PageAction;
125
+ pageActions: ButtonProps<React.ElementType>[] | PageAction;
126
126
  /**
127
127
  * When there is insufficient space to display all of hte page actions inline a dropdown button menu is shown,
128
128
  * containing the page actions. This label is used as the display content of the dropdown button menu.
@@ -225,7 +225,7 @@ interface PageHeaderBaseProps extends PropsWithChildren {
225
225
  * Content for the navigation area in the PageHeader. Should
226
226
  * be a React element that is normally a Carbon Tabs component. Optional.
227
227
  */
228
- navigation?: object;
228
+ navigation?: ReactNode;
229
229
  /**
230
230
  * class name applied to the page actions overflow options
231
231
  */
@@ -9,7 +9,7 @@ import { objectSpread2 as _objectSpread2, objectWithoutProperties as _objectWith
9
9
  import { Button, Tooltip, Tag, usePrefix, FlexGrid, Row, Column } from '@carbon/react';
10
10
  import React__default, { useState, useRef, useEffect } from 'react';
11
11
  import { string_required_if_more_than_10_tags, TagSet } from '../TagSet/TagSet.js';
12
- import { breakpoints, spacing10, baseFontSize } from '@carbon/layout';
12
+ import { spacing, baseFontSize, breakpoints } from '@carbon/layout';
13
13
  import { blockClass, utilSetCollapsed, utilGetBreadcrumbItemForTitle, utilCheckUpdateVerticalSpace } from './PageHeaderUtils.js';
14
14
  import { deprecateProp, prepareProps } from '../../global/js/utils/props-helper.js';
15
15
  import { ChevronUp } from '@carbon/react/icons';
@@ -306,7 +306,7 @@ var PageHeader = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
306
306
  // Determines the appropriate header background opacity based on the header config/height/scroll and the withoutBackground setting
307
307
  var result = withoutBackground ? 0 : 1;
308
308
  if (!result && metrics !== null && metrics !== void 0 && metrics.headerHeight && metrics.headerHeight > 0 && (breadcrumbs || actionBarItems || tags || navigation)) {
309
- var startAddingAt = parseFloat(spacing10) * parseInt(baseFontSize);
309
+ var startAddingAt = parseFloat("".concat(spacing[9])) * parseInt("".concat(baseFontSize));
310
310
  var scrollRemaining = metrics.headerHeight - scrollYValue;
311
311
 
312
312
  /* don't know how to test resize */
@@ -532,7 +532,9 @@ PageHeader.propTypes = _objectSpread2({
532
532
  /**@ts-ignore */
533
533
  actionBarItems: PropTypes.arrayOf(PropTypes.shape(_objectSpread2(_objectSpread2({}, prepareProps(Button.propTypes, ['kind', 'size', 'tooltipPosition', 'tooltipAlignment'])), {}, {
534
534
  iconDescription: PropTypes.string.isRequired,
535
+ /**@ts-ignore*/
535
536
  onClick: Button.propTypes.onClick,
537
+ /**@ts-ignore*/
536
538
  renderIcon: Button.propTypes.renderIcon.isRequired
537
539
  }))),
538
540
  /**
@@ -715,6 +717,7 @@ PageHeader.propTypes = _objectSpread2({
715
717
  /**@ts-ignore */
716
718
  pageActions: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.shape(_objectSpread2(_objectSpread2({}, Button.propTypes), {}, {
717
719
  key: PropTypes.string.isRequired,
720
+ /**@ts-ignore*/
718
721
  kind: Button.propTypes.kind,
719
722
  label: PropTypes.node,
720
723
  onClick: PropTypes.func