@carbon/ibm-products 2.73.1-rc.0 → 2.74.0-rc.0

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 (154) hide show
  1. package/css/index-full-carbon.css +56 -6
  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-released-only.css +5 -1
  6. package/css/index-without-carbon-released-only.css.map +1 -1
  7. package/css/index-without-carbon-released-only.min.css +1 -1
  8. package/css/index-without-carbon-released-only.min.css.map +1 -1
  9. package/css/index-without-carbon.css +56 -6
  10. package/css/index-without-carbon.css.map +1 -1
  11. package/css/index-without-carbon.min.css +1 -1
  12. package/css/index-without-carbon.min.css.map +1 -1
  13. package/css/index.css +56 -6
  14. package/css/index.css.map +1 -1
  15. package/css/index.min.css +1 -1
  16. package/css/index.min.css.map +1 -1
  17. package/es/components/AboutModal/AboutModal.d.ts +17 -23
  18. package/es/components/AboutModal/AboutModal.js +17 -23
  19. package/es/components/AddSelect/AddSelectBody.js +1 -1
  20. package/es/components/Carousel/Carousel.js +1 -1
  21. package/es/components/Coachmark/Coachmark.d.ts +4 -0
  22. package/es/components/Coachmark/Coachmark.js +9 -2
  23. package/es/components/Coachmark/CoachmarkDragbar.d.ts +0 -4
  24. package/es/components/Coachmark/CoachmarkDragbar.js +2 -6
  25. package/es/components/Coachmark/CoachmarkHeader.d.ts +0 -4
  26. package/es/components/Coachmark/CoachmarkHeader.js +2 -2
  27. package/es/components/Coachmark/CoachmarkTagline.js +5 -3
  28. package/es/components/Coachmark/next/Coachmark/Coachmark.d.ts +1 -22
  29. package/es/components/Coachmark/next/Coachmark/Coachmark.js +14 -29
  30. package/es/components/Coachmark/next/Coachmark/CoachmarkBeacon/CoachmarkBeacon.d.ts +1 -0
  31. package/es/components/Coachmark/next/Coachmark/CoachmarkBubble/CoachmarkBubble.js +13 -2
  32. package/es/components/Coachmark/next/Coachmark/CoachmarkContent.js +2 -2
  33. package/es/components/Coachmark/next/Coachmark/ContentBody.js +1 -1
  34. package/es/components/Coachmark/next/Coachmark/ContentHeader.js +15 -1
  35. package/es/components/Coachmark/next/Coachmark/context.d.ts +25 -0
  36. package/es/components/Coachmark/next/Coachmark/context.js +28 -0
  37. package/es/components/Coachmark/utils/context.d.ts +2 -2
  38. package/es/components/CoachmarkFixed/CoachmarkFixed.d.ts +4 -0
  39. package/es/components/CoachmarkFixed/CoachmarkFixed.js +6 -1
  40. package/es/components/CoachmarkStack/CoachmarkStack.d.ts +4 -0
  41. package/es/components/CoachmarkStack/CoachmarkStack.js +7 -1
  42. package/es/components/ConditionBuilder/ConditionBlock/ConditionBlock.js +11 -7
  43. package/es/components/ConditionBuilder/ConditionBuilder.js +11 -2
  44. package/es/components/ConditionBuilder/ConditionBuilder.types.d.ts +10 -0
  45. package/es/components/ConditionBuilder/ConditionBuilderActions/ConditionBuilderActions.js +10 -5
  46. package/es/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.js +14 -3
  47. package/es/components/ConditionBuilder/ConditionBuilderConnector/ConditionConnector.js +2 -2
  48. package/es/components/ConditionBuilder/ConditionBuilderConnector/GroupConnector.js +1 -1
  49. package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +5 -4
  50. package/es/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.js +2 -1
  51. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.js +8 -2
  52. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.d.ts +4 -3
  53. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.js +20 -4
  54. package/es/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.js +1 -1
  55. package/es/components/ConditionBuilder/index.d.ts +1 -0
  56. package/es/components/ConditionBuilder/utils/handleKeyboardEvents.js +12 -7
  57. package/es/components/ConditionBuilder/utils/useDataConfigs.d.ts +1 -1
  58. package/es/components/ConditionBuilder/utils/util.d.ts +1 -1
  59. package/es/components/ConditionBuilder/utils/util.js +2 -2
  60. package/es/components/Datagrid/Datagrid/DatagridEmptyBody.js +1 -1
  61. package/es/components/EmptyStates/EmptyState.js +1 -1
  62. package/es/components/EmptyStates/{EmptyStateV2.js → EmptyStateV2.deprecated.js} +1 -1
  63. package/es/components/EmptyStates/index.d.ts +2 -2
  64. package/es/components/NotificationsPanel/NotificationsPanel.js +1 -1
  65. package/es/components/SidePanel/SidePanel.d.ts +1 -0
  66. package/es/components/SidePanel/SidePanel.js +1 -0
  67. package/es/components/StepFlow/StepContext.d.ts +14 -0
  68. package/es/components/StepFlow/StepGroup.d.ts +10 -0
  69. package/es/components/StepFlow/index.d.ts +9 -0
  70. package/es/components/StepFlow/story-assets/SidePanel/Example.d.ts +8 -0
  71. package/es/components/StepFlow/story-assets/SidePanel/StepSidePanel.d.ts +20 -0
  72. package/es/components/StepFlow/story-assets/StepActions.d.ts +23 -0
  73. package/es/components/StepFlow/story-assets/Tearsheet/Example.d.ts +8 -0
  74. package/es/components/StepFlow/story-assets/Tearsheet/StepTearsheet.d.ts +20 -0
  75. package/es/components/StepFlow/types.d.ts +22 -0
  76. package/es/components/TruncatedText/TruncatedText.js +4 -2
  77. package/es/global/js/utils/makeDraggable/makeDraggable.js +28 -0
  78. package/es/index.js +1 -1
  79. package/lib/components/AboutModal/AboutModal.d.ts +17 -23
  80. package/lib/components/AboutModal/AboutModal.js +17 -23
  81. package/lib/components/AddSelect/AddSelectBody.js +1 -1
  82. package/lib/components/Carousel/Carousel.js +1 -1
  83. package/lib/components/Coachmark/Coachmark.d.ts +4 -0
  84. package/lib/components/Coachmark/Coachmark.js +9 -2
  85. package/lib/components/Coachmark/CoachmarkDragbar.d.ts +0 -4
  86. package/lib/components/Coachmark/CoachmarkDragbar.js +2 -6
  87. package/lib/components/Coachmark/CoachmarkHeader.d.ts +0 -4
  88. package/lib/components/Coachmark/CoachmarkHeader.js +2 -2
  89. package/lib/components/Coachmark/CoachmarkTagline.js +5 -3
  90. package/lib/components/Coachmark/next/Coachmark/Coachmark.d.ts +1 -22
  91. package/lib/components/Coachmark/next/Coachmark/Coachmark.js +16 -33
  92. package/lib/components/Coachmark/next/Coachmark/CoachmarkBeacon/CoachmarkBeacon.d.ts +1 -0
  93. package/lib/components/Coachmark/next/Coachmark/CoachmarkBubble/CoachmarkBubble.js +13 -2
  94. package/lib/components/Coachmark/next/Coachmark/CoachmarkContent.js +5 -5
  95. package/lib/components/Coachmark/next/Coachmark/ContentBody.js +2 -2
  96. package/lib/components/Coachmark/next/Coachmark/ContentHeader.js +17 -3
  97. package/lib/components/Coachmark/next/Coachmark/context.d.ts +25 -0
  98. package/lib/components/Coachmark/next/Coachmark/context.js +31 -0
  99. package/lib/components/Coachmark/utils/context.d.ts +2 -2
  100. package/lib/components/CoachmarkFixed/CoachmarkFixed.d.ts +4 -0
  101. package/lib/components/CoachmarkFixed/CoachmarkFixed.js +6 -1
  102. package/lib/components/CoachmarkStack/CoachmarkStack.d.ts +4 -0
  103. package/lib/components/CoachmarkStack/CoachmarkStack.js +7 -1
  104. package/lib/components/ConditionBuilder/ConditionBlock/ConditionBlock.js +11 -7
  105. package/lib/components/ConditionBuilder/ConditionBuilder.js +11 -2
  106. package/lib/components/ConditionBuilder/ConditionBuilder.types.d.ts +10 -0
  107. package/lib/components/ConditionBuilder/ConditionBuilderActions/ConditionBuilderActions.js +10 -5
  108. package/lib/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.js +13 -2
  109. package/lib/components/ConditionBuilder/ConditionBuilderConnector/ConditionConnector.js +2 -2
  110. package/lib/components/ConditionBuilder/ConditionBuilderConnector/GroupConnector.js +1 -1
  111. package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +5 -4
  112. package/lib/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.js +2 -1
  113. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.js +8 -2
  114. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.d.ts +4 -3
  115. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.js +20 -4
  116. package/lib/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.js +1 -1
  117. package/lib/components/ConditionBuilder/index.d.ts +1 -0
  118. package/lib/components/ConditionBuilder/utils/handleKeyboardEvents.js +11 -6
  119. package/lib/components/ConditionBuilder/utils/useDataConfigs.d.ts +1 -1
  120. package/lib/components/ConditionBuilder/utils/util.d.ts +1 -1
  121. package/lib/components/ConditionBuilder/utils/util.js +2 -2
  122. package/lib/components/Datagrid/Datagrid/DatagridEmptyBody.js +1 -1
  123. package/lib/components/EmptyStates/EmptyState.js +2 -2
  124. package/lib/components/EmptyStates/{EmptyStateV2.js → EmptyStateV2.deprecated.js} +2 -2
  125. package/lib/components/EmptyStates/index.d.ts +2 -2
  126. package/lib/components/NotificationsPanel/NotificationsPanel.js +1 -1
  127. package/lib/components/SidePanel/SidePanel.d.ts +1 -0
  128. package/lib/components/SidePanel/SidePanel.js +1 -0
  129. package/lib/components/StepFlow/StepContext.d.ts +14 -0
  130. package/lib/components/StepFlow/StepGroup.d.ts +10 -0
  131. package/lib/components/StepFlow/index.d.ts +9 -0
  132. package/lib/components/StepFlow/story-assets/SidePanel/Example.d.ts +8 -0
  133. package/lib/components/StepFlow/story-assets/SidePanel/StepSidePanel.d.ts +20 -0
  134. package/lib/components/StepFlow/story-assets/StepActions.d.ts +23 -0
  135. package/lib/components/StepFlow/story-assets/Tearsheet/Example.d.ts +8 -0
  136. package/lib/components/StepFlow/story-assets/Tearsheet/StepTearsheet.d.ts +20 -0
  137. package/lib/components/StepFlow/types.d.ts +22 -0
  138. package/lib/components/TruncatedText/TruncatedText.js +4 -2
  139. package/lib/global/js/utils/makeDraggable/makeDraggable.js +28 -0
  140. package/lib/index.js +2 -2
  141. package/package.json +7 -7
  142. package/scss/components/Coachmark/_coachmark.scss +7 -0
  143. package/scss/components/ConditionBuilder/styles/_conditionBuilderCondition.scss +24 -0
  144. package/scss/components/ConditionBuilder/styles/_conditionBuilderItem.scss +26 -12
  145. package/scss/components/SidePanel/_side-panel.scss +6 -1
  146. package/scss/components/Tearsheet/_tearsheet.scss +1 -0
  147. package/scss/components/TruncatedText/_truncated-text.scss +1 -0
  148. package/telemetry.yml +1 -1
  149. /package/es/components/EmptyStates/{EmptyStateIllustration.d.ts → EmptyStateIllustration.deprecated.d.ts} +0 -0
  150. /package/es/components/EmptyStates/{EmptyStateIllustration.js → EmptyStateIllustration.deprecated.js} +0 -0
  151. /package/es/components/EmptyStates/{EmptyStateV2.d.ts → EmptyStateV2.deprecated.d.ts} +0 -0
  152. /package/lib/components/EmptyStates/{EmptyStateIllustration.d.ts → EmptyStateIllustration.deprecated.d.ts} +0 -0
  153. /package/lib/components/EmptyStates/{EmptyStateIllustration.js → EmptyStateIllustration.deprecated.js} +0 -0
  154. /package/lib/components/EmptyStates/{EmptyStateV2.d.ts → EmptyStateV2.deprecated.d.ts} +0 -0
@@ -30,7 +30,7 @@ const focusThisItem = (currentElement, conditionBuilderRef) => {
30
30
  manageTabIndexAndFocus(currentElement, conditionBuilderRef);
31
31
  }, 0);
32
32
  };
33
- const traverseClockVise = (eachElem, index, allElements, rotate, trapFocus, conditionBuilderRef) => {
33
+ const traverseClockwise = (eachElem, index, allElements, rotate, trapFocus, conditionBuilderRef) => {
34
34
  if (eachElem == document.activeElement) {
35
35
  if (index !== allElements.length - 1) {
36
36
  focusThisItem(allElements[index + 1], conditionBuilderRef);
@@ -91,4 +91,4 @@ const onKeyDownHandlerForSearch = (evt, conditionBuilderRef, closePopover) => {
91
91
  }
92
92
  };
93
93
 
94
- export { HIERARCHICAL_VARIANT, NON_HIERARCHICAL_VARIANT, blockClass, checkForHoldingKey, checkForMultiSelectOperator, checkIsValid, focusThisField, focusThisItem, getValue, manageTabIndexAndFocus, onKeyDownHandlerForSearch, traverseClockVise, traverseReverse };
94
+ export { HIERARCHICAL_VARIANT, NON_HIERARCHICAL_VARIANT, blockClass, checkForHoldingKey, checkForMultiSelectOperator, checkIsValid, focusThisField, focusThisItem, getValue, manageTabIndexAndFocus, onKeyDownHandlerForSearch, traverseClockwise, traverseReverse };
@@ -10,7 +10,7 @@ import React__default from 'react';
10
10
  import { pkg } from '../../../settings.js';
11
11
  import { TableBody, TableRow, TableCell } from '@carbon/react';
12
12
  import { EmptyState } from '../../EmptyStates/EmptyState.js';
13
- import '../../EmptyStates/EmptyStateV2.js';
13
+ import '../../EmptyStates/EmptyStateV2.deprecated.js';
14
14
  import { ErrorEmptyState } from '../../EmptyStates/ErrorEmptyState/ErrorEmptyState.js';
15
15
  import { NoDataEmptyState } from '../../EmptyStates/NoDataEmptyState/NoDataEmptyState.js';
16
16
  import '../../EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js';
@@ -7,7 +7,7 @@
7
7
 
8
8
  import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
9
9
  import React__default from 'react';
10
- import { EmptyStateV2 } from './EmptyStateV2.js';
10
+ import { EmptyStateV2 } from './EmptyStateV2.deprecated.js';
11
11
  import PropTypes from '../../_virtual/index.js';
12
12
  import cx from 'classnames';
13
13
  import { Button } from '@carbon/react';
@@ -13,7 +13,7 @@ import { Button, Link } from '@carbon/react';
13
13
  import { getDevtoolsProps } from '../../global/js/utils/devtools.js';
14
14
  import '../../global/js/utils/props-helper.js';
15
15
  import { pkg } from '../../settings.js';
16
- import EmptyStateIllustration from './EmptyStateIllustration.js';
16
+ import EmptyStateIllustration from './EmptyStateIllustration.deprecated.js';
17
17
 
18
18
  const blockClass = `${pkg.prefix}--empty-state`;
19
19
  const componentName = 'EmptyStateV2';
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
  export { EmptyState } from './EmptyState';
8
- export { EmptyStateV2 } from './EmptyStateV2';
8
+ export { EmptyStateV2 } from './EmptyStateV2.deprecated';
9
9
  export { ErrorEmptyState } from './ErrorEmptyState';
10
10
  export { NoDataEmptyState } from './NoDataEmptyState';
11
11
  export { NoTagsEmptyState } from './NoTagsEmptyState';
@@ -13,7 +13,7 @@ export { NotFoundEmptyState } from './NotFoundEmptyState';
13
13
  export { NotificationsEmptyState } from './NotificationsEmptyState';
14
14
  export { UnauthorizedEmptyState } from './UnauthorizedEmptyState';
15
15
  export type { EmptyStateProps } from './EmptyState';
16
- export type { EmptyStateV2Props } from './EmptyStateV2';
16
+ export type { EmptyStateV2Props } from './EmptyStateV2.deprecated';
17
17
  export type { ErrorEmptyStateProps } from './ErrorEmptyState';
18
18
  export type { NoDataEmptyStateProps } from './NoDataEmptyState';
19
19
  export type { NoTagsEmptyStateProps } from './NoTagsEmptyState';
@@ -11,7 +11,7 @@ import { dateTimeFormat } from '@carbon/utilities';
11
11
  import { Settings, ErrorFilled, CheckmarkFilled, WarningAltFilled, InformationSquareFilled, Close, ChevronDown } from '@carbon/react/icons';
12
12
  import React__default, { useRef, useState, useEffect } from 'react';
13
13
  import '../EmptyStates/EmptyState.js';
14
- import '../EmptyStates/EmptyStateV2.js';
14
+ import '../EmptyStates/EmptyStateV2.deprecated.js';
15
15
  import '../EmptyStates/ErrorEmptyState/ErrorEmptyState.js';
16
16
  import '../EmptyStates/NoDataEmptyState/NoDataEmptyState.js';
17
17
  import '../EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js';
@@ -4,6 +4,7 @@
4
4
  * This source code is licensed under the Apache-2.0 license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
+ import '../../feature-flags';
7
8
  import { ButtonProps } from '@carbon/react';
8
9
  import React, { ReactNode, RefObject } from 'react';
9
10
  type SidePanelBaseProps = {
@@ -7,6 +7,7 @@
7
7
 
8
8
  import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
9
9
  import { ArrowLeft, Close } from '@carbon/react/icons';
10
+ import '../../feature-flags.js';
10
11
  import { Button, Section, IconButton, Heading } from '@carbon/react';
11
12
  import { useFeatureFlag } from '../FeatureFlags/index.js';
12
13
  import React__default, { useState, useRef, useEffect, useCallback } from 'react';
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Copyright IBM Corp. 2025, 2025
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
+ import { StepContextType } from './types';
9
+ interface StepProviderProps {
10
+ children?: ReactNode;
11
+ }
12
+ export declare const StepProvider: React.FC<StepProviderProps>;
13
+ export declare const useStepContext: () => StepContextType;
14
+ export {};
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Copyright IBM Corp. 2025, 2025
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 from 'react';
8
+ export declare const StepGroup: ({ children }: {
9
+ children: any;
10
+ }) => string | number | bigint | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined>;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Copyright IBM Corp. 2025, 2025
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 { StepGroup } from './StepGroup';
8
+ export { StepProvider, useStepContext } from './StepContext';
9
+ export type { StepState, StepContextType } from './types';
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Copyright IBM Corp. 2025, 2025
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 from 'react';
8
+ export declare const Example: () => React.JSX.Element;
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Copyright IBM Corp. 2025, 2025
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
+ import { StepState } from '../..';
9
+ interface Props {
10
+ children?: ReactNode;
11
+ subtitle?: ((a: StepState) => ReactNode) | null;
12
+ open?: boolean;
13
+ onClose?: () => void;
14
+ title?: ReactNode;
15
+ hasCloseIcon?: boolean;
16
+ closeIconDescription?: string;
17
+ selectorPrimaryFocus?: string;
18
+ }
19
+ export declare const StepSidePanel: ({ subtitle, children, open, onClose, title, selectorPrimaryFocus, ...rest }: Props) => React.JSX.Element;
20
+ export {};
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Copyright IBM Corp. 2025, 2025
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 { ReactNode } from 'react';
8
+ import { StepState } from '..';
9
+ export interface StepActionsProps {
10
+ buttonRenderer: (stepData: StepState) => ReactNode;
11
+ className?: string;
12
+ }
13
+ /**
14
+ * This is an alternative approach to creating your own component and using the `useStepContext` hook.
15
+ * @example <StepActions buttonRenderer={(stepData) => <><Button /><Button /><Button /></>}/>
16
+ *
17
+ * In the example above, you can see how to retrieve the step data in order to update your buttons
18
+ * (disabled states, changing text, ie Next to Submit, etc.).
19
+ */
20
+ export declare const StepActions: {
21
+ ({ buttonRenderer }: StepActionsProps): ReactNode;
22
+ displayName: string;
23
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Copyright IBM Corp. 2025, 2025
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 from 'react';
8
+ export declare const Example: () => React.JSX.Element;
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Copyright IBM Corp. 2025, 2025
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
+ import { StepState } from '../../types';
9
+ interface Props {
10
+ children?: ReactNode;
11
+ influencer?: ((a: StepState) => ReactNode) | null;
12
+ open?: boolean;
13
+ onClose?: () => void;
14
+ title?: ReactNode;
15
+ hasCloseIcon?: boolean;
16
+ closeIconDescription?: string;
17
+ selectorPrimaryFocus?: string;
18
+ }
19
+ export declare const StepTearsheet: ({ children, open, onClose, influencer, title, hasCloseIcon, closeIconDescription, selectorPrimaryFocus, ...rest }: Props) => React.JSX.Element;
20
+ export {};
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Copyright IBM Corp. 2025, 2025
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 { Dispatch, SetStateAction } from 'react';
8
+ export type StepContextType = StepState;
9
+ interface formStateType {
10
+ [key: string]: any;
11
+ }
12
+ export interface StepState {
13
+ formState: formStateType;
14
+ setFormState: Dispatch<SetStateAction<formStateType>>;
15
+ totalSteps: number | undefined;
16
+ setTotalSteps: Dispatch<SetStateAction<number | undefined>>;
17
+ currentStep: number;
18
+ handleGoToStep: (a: number) => void;
19
+ handleNext: () => void;
20
+ handlePrevious: () => void;
21
+ }
22
+ export {};
@@ -54,12 +54,14 @@ let TruncatedText = /*#__PURE__*/forwardRef((props, ref) => {
54
54
  handleExpand();
55
55
  }
56
56
  };
57
- const valueBody = /*#__PURE__*/React__default.createElement("span", {
57
+ const valueBody = /*#__PURE__*/React__default.createElement("span", _extends({}, type === 'tooltip' ? {
58
+ role: 'button'
59
+ } : {}, {
58
60
  ref: contentRef,
59
61
  className: textContentClasses,
60
62
  id: id,
61
63
  style: textContentStyles
62
- }, value);
64
+ }), value);
63
65
  const tooltipVariant = /*#__PURE__*/React__default.createElement(Tooltip, {
64
66
  align: align,
65
67
  autoAlign: autoAlign,
@@ -32,7 +32,29 @@ function makeDraggable(_ref) {
32
32
  let isDragging = false;
33
33
  let offsetX = 0;
34
34
  let offsetY = 0;
35
+ function dispatch(type) {
36
+ let detail = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
37
+ el.dispatchEvent(new CustomEvent(type, {
38
+ detail,
39
+ bubbles: true
40
+ }));
41
+ }
35
42
  function onKeyDown(e) {
43
+ if (e.key === 'Enter') {
44
+ isDragging = !isDragging;
45
+ }
46
+ if (isDragging) {
47
+ dispatch('dragstart', {
48
+ keyboard: true
49
+ });
50
+ } else {
51
+ dispatch('dragend', {
52
+ keyboard: true
53
+ });
54
+ }
55
+ if (!isDragging) {
56
+ return;
57
+ }
36
58
  const distance = e.shiftKey ? shiftDragStep ?? 32 : dragStep ?? 8;
37
59
  switch (e.key) {
38
60
  case 'Enter':
@@ -61,6 +83,9 @@ function makeDraggable(_ref) {
61
83
  offsetX = e.clientX - el.offsetLeft;
62
84
  offsetY = e.clientY - el.offsetTop;
63
85
  isDragging = true;
86
+ dispatch('dragstart', {
87
+ mouse: true
88
+ });
64
89
  document.addEventListener('mousemove', onMouseMove);
65
90
  document.addEventListener('mouseup', onMouseUp, {
66
91
  once: true
@@ -78,6 +103,9 @@ function makeDraggable(_ref) {
78
103
  return;
79
104
  }
80
105
  isDragging = false;
106
+ dispatch('dragend', {
107
+ mouse: true
108
+ });
81
109
  document.removeEventListener('mousemove', onMouseMove);
82
110
  }
83
111
  if (dragHandle) {
package/es/index.js CHANGED
@@ -21,7 +21,7 @@ export { CreateTearsheetStep } from './components/CreateTearsheet/CreateTearshee
21
21
  export { CreateTearsheetDivider } from './components/CreateTearsheet/CreateTearsheetDivider.js';
22
22
  export { CreateTearsheetNarrow } from './components/CreateTearsheetNarrow/CreateTearsheetNarrow.js';
23
23
  export { EmptyState } from './components/EmptyStates/EmptyState.js';
24
- export { EmptyStateV2 } from './components/EmptyStates/EmptyStateV2.js';
24
+ export { EmptyStateV2 } from './components/EmptyStates/EmptyStateV2.deprecated.js';
25
25
  export { ErrorEmptyState } from './components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js';
26
26
  export { NoDataEmptyState } from './components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js';
27
27
  export { NoTagsEmptyState } from './components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js';
@@ -7,65 +7,59 @@
7
7
  import React, { ReactNode } from 'react';
8
8
  export interface AboutModalProps {
9
9
  /**
10
- * If you are legally required to display logos of technologies used
11
- * to build your product you can provide this in the additionalInfo.
12
- * Additional information will be displayed in the footer.
10
+ * Provide additional detail for the modal footer, such as logos of
11
+ * technologies used in the product, legally required for some products
13
12
  */
14
13
  additionalInfo?: ReactNode;
15
14
  /**
16
- * Provide an optional class to be applied to the modal root node.
15
+ * Specify an optional className to be applied to the modal root node
17
16
  */
18
17
  className?: string;
19
18
  /**
20
- * The accessibility title for the close icon.
19
+ * Provide an accessible name for the close icon
21
20
  */
22
21
  closeIconDescription: string;
23
22
  /**
24
- * Subhead text providing any relevant product disclaimers including
25
- * legal information (optional)
23
+ * Provide any relevant product disclaimers or legal information
26
24
  */
27
25
  content?: ReactNode;
28
26
  /**
29
- * Trademark and copyright information. Displays first year of
30
- * product release to current year.
27
+ * Specify the first year of product release to the current year
31
28
  */
32
29
  copyrightText: string;
33
30
  /**
34
- * An array of Carbon `Link` component if there are additional information
35
- * to call out within the card. The about modal should be used to display
36
- * the product information and not where users go to find help (optional)
31
+ * Provide an array of Carbon `Link`s for additional detail about the
32
+ * product
37
33
  */
38
34
  links?: ReactNode[];
39
35
  /**
40
- * A visual symbol used to represent the product.
36
+ * Provide a visual representation of the product
41
37
  */
42
38
  logo: ReactNode;
43
39
  /**
44
- * Specifies aria label for AboutModal
40
+ * Specify an aria-label for the modal
45
41
  */
46
42
  modalAriaLabel?: string;
47
43
  /**
48
- * Specifies an optional handler which is called when the AboutModal
49
- * is closed. Returning `false` prevents the AboutModal from closing.
44
+ * Specify an optional handler for closing modal. Returning `false`
45
+ * prevents the modal from closing
50
46
  */
51
47
  onClose?: () => void | boolean;
52
48
  /**
53
- * Specifies whether the AboutModal is open or not.
49
+ * Specify whether the modal is currently open
54
50
  */
55
51
  open?: boolean;
56
52
  /**
57
- * The DOM node the tearsheet should be rendered within. Defaults to document.body.
53
+ * Provide the DOM node where the modal should be rendered.
54
+ * Defaults to `document.body`
58
55
  */
59
56
  portalTarget?: ReactNode;
60
57
  /**
61
- * Header text that provides the product name. The IBM Services logo
62
- * consists of two discrete, but required, elements: the iconic
63
- * IBM 8-bar logo represented alongside the IBM Services logotype.
64
- * Please follow these guidelines to ensure proper execution.
58
+ * Provide the product name for the modal header
65
59
  */
66
60
  title: ReactNode;
67
61
  /**
68
- * Text that provides information on the version number of your product.
62
+ * Provide the product’s version number
69
63
  */
70
64
  version: string;
71
65
  }
@@ -120,65 +120,59 @@ exports.AboutModal.displayName = componentName;
120
120
  // See https://www.npmjs.com/package/prop-types#usage.
121
121
  exports.AboutModal.propTypes = {
122
122
  /**
123
- * If you are legally required to display logos of technologies used
124
- * to build your product you can provide this in the additionalInfo.
125
- * Additional information will be displayed in the footer.
123
+ * Provide additional detail for the modal footer, such as logos of
124
+ * technologies used in the product, legally required for some products
126
125
  */
127
126
  additionalInfo: index.default.node,
128
127
  /**
129
- * Provide an optional class to be applied to the modal root node.
128
+ * Specify an optional className to be applied to the modal root node
130
129
  */
131
130
  className: index.default.string,
132
131
  /**
133
- * The accessibility title for the close icon.
132
+ * Provide an accessible name for the close icon
134
133
  */
135
134
  closeIconDescription: index.default.string.isRequired,
136
135
  /**
137
- * Subhead text providing any relevant product disclaimers including
138
- * legal information (optional)
136
+ * Provide any relevant product disclaimers or legal information
139
137
  */
140
138
  content: index.default.node,
141
139
  /**
142
- * Trademark and copyright information. Displays first year of
143
- * product release to current year.
140
+ * Specify the first year of product release to the current year
144
141
  */
145
142
  copyrightText: index.default.string.isRequired,
146
143
  /**
147
- * An array of Carbon `Link` component if there are additional information
148
- * to call out within the card. The about modal should be used to display
149
- * the product information and not where users go to find help (optional)
144
+ * Provide an array of Carbon `Link`s for additional detail about the
145
+ * product
150
146
  */
151
147
  links: index.default.arrayOf(index.default.element),
152
148
  /**
153
- * A visual symbol used to represent the product.
149
+ * Provide a visual representation of the product
154
150
  */
155
151
  logo: index.default.node.isRequired,
156
152
  /**
157
- * Specifies aria label for AboutModal
153
+ * Specify an aria-label for the modal
158
154
  */
159
155
  modalAriaLabel: index.default.string,
160
156
  /**
161
- * Specifies an optional handler which is called when the AboutModal
162
- * is closed. Returning `false` prevents the AboutModal from closing.
157
+ * Specify an optional handler for closing modal. Returning `false`
158
+ * prevents the modal from closing
163
159
  */
164
160
  onClose: index.default.func,
165
161
  /**
166
- * Specifies whether the AboutModal is open or not.
162
+ * Specify whether the modal is currently open
167
163
  */
168
164
  open: index.default.bool,
169
165
  /**
170
- * The DOM node the tearsheet should be rendered within. Defaults to document.body.
166
+ * Provide the DOM node where the modal should be rendered.
167
+ * Defaults to `document.body`
171
168
  */
172
169
  portalTarget: index.default.node,
173
170
  /**
174
- * Header text that provides the product name. The IBM Services logo
175
- * consists of two discrete, but required, elements: the iconic
176
- * IBM 8-bar logo represented alongside the IBM Services logotype.
177
- * Please follow these guidelines to ensure proper execution.
171
+ * Provide the product name for the modal header
178
172
  */
179
173
  title: index.default.node.isRequired,
180
174
  /**
181
- * Text that provides information on the version number of your product.
175
+ * Provide the product’s version number
182
176
  */
183
177
  version: index.default.string.isRequired
184
178
  };
@@ -15,7 +15,7 @@ var react = require('@carbon/react');
15
15
  var Tearsheet = require('../Tearsheet/Tearsheet.js');
16
16
  var TearsheetNarrow = require('../Tearsheet/TearsheetNarrow.js');
17
17
  require('../EmptyStates/EmptyState.js');
18
- require('../EmptyStates/EmptyStateV2.js');
18
+ require('../EmptyStates/EmptyStateV2.deprecated.js');
19
19
  require('../EmptyStates/ErrorEmptyState/ErrorEmptyState.js');
20
20
  require('../EmptyStates/NoDataEmptyState/NoDataEmptyState.js');
21
21
  require('../EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js');
@@ -162,7 +162,7 @@ const Carousel = /*#__PURE__*/React.forwardRef((props, ref) => {
162
162
  }, [handleOnScroll]);
163
163
  const handleScrollToView = React.useCallback(itemNumber => {
164
164
  updateAriaHiddenTabIndex(itemNumber);
165
- childElementsRef.current[itemNumber].scrollIntoView();
165
+ childElementsRef.current[itemNumber]?.scrollIntoView();
166
166
  // eslint-disable-next-line react-hooks/exhaustive-deps
167
167
  }, []);
168
168
  const getFocusableElements = container => {
@@ -78,6 +78,10 @@ export interface CoachmarkProps {
78
78
  * Does nothing if `overlayKind=stacked`.
79
79
  */
80
80
  isOpenByDefault?: boolean;
81
+ /**
82
+ * Tooltip text and aria label for the Close button icon.
83
+ */
84
+ closeIconDescription?: string;
81
85
  }
82
86
  /**
83
87
  * Coachmarks are used to call out specific functionality or concepts
@@ -31,7 +31,8 @@ const defaults = {
31
31
  onClose: () => {},
32
32
  overlayKind: 'tooltip',
33
33
  theme: 'light',
34
- isOpenByDefault: false
34
+ isOpenByDefault: false,
35
+ closeIconDescription: ''
35
36
  };
36
37
  /**
37
38
  * Coachmarks are used to call out specific functionality or concepts
@@ -54,6 +55,7 @@ exports.Coachmark = /*#__PURE__*/React.forwardRef((_ref, ref) => {
54
55
  target,
55
56
  theme = defaults.theme,
56
57
  isOpenByDefault = defaults.isOpenByDefault,
58
+ closeIconDescription = defaults.closeIconDescription,
57
59
  // Collect any other property values passed in.
58
60
  ...rest
59
61
  } = _ref;
@@ -134,7 +136,8 @@ exports.Coachmark = /*#__PURE__*/React.forwardRef((_ref, ref) => {
134
136
  targetOffset: targetOffset,
135
137
  align: align,
136
138
  positionTune: positionTune,
137
- isOpen: isOpen
139
+ isOpen: isOpen,
140
+ closeIconDescription
138
141
  };
139
142
  const handleResize = throttle.throttle(() => {
140
143
  closeOverlay();
@@ -282,6 +285,10 @@ exports.Coachmark.propTypes = {
282
285
  * Optional class name for this component.
283
286
  */
284
287
  className: index.default.string,
288
+ /**
289
+ * Tooltip text and aria label for the Close button icon.
290
+ */
291
+ closeIconDescription: index.default.string,
285
292
  /**
286
293
  * Determines if the coachmark is open by default.
287
294
  * Does nothing if `overlayKind=stacked`.
@@ -10,10 +10,6 @@ interface CoachmarkDragbarProps {
10
10
  * Handler to manage keyboard interactions with the dragbar.
11
11
  */
12
12
  a11yKeyboardHandler: (event: React.KeyboardEvent<HTMLButtonElement>) => void;
13
- /**
14
- * Tooltip text and aria label for the Close button icon.
15
- */
16
- closeIconDescription?: string;
17
13
  /**
18
14
  * Function to call when the close button is clicked.
19
15
  */
@@ -15,6 +15,7 @@ var icons = require('@carbon/react/icons');
15
15
  var react = require('@carbon/react');
16
16
  var devtools = require('../../global/js/utils/devtools.js');
17
17
  var settings = require('../../settings.js');
18
+ var context = require('./utils/context.js');
18
19
 
19
20
  var _Draggable;
20
21
 
@@ -26,7 +27,6 @@ const blockClass = `${settings.pkg.prefix}--coachmark-dragbar`;
26
27
  const overlayBlockClass = `${settings.pkg.prefix}--coachmark-overlay`;
27
28
  const componentName = 'CoachmarkDragbar';
28
29
  const defaults = {
29
- closeIconDescription: 'Close',
30
30
  onDrag: () => {},
31
31
  onClose: () => {},
32
32
  showCloseButton: true,
@@ -39,7 +39,6 @@ const defaults = {
39
39
  exports.CoachmarkDragbar = /*#__PURE__*/React.forwardRef((_ref, ref) => {
40
40
  let {
41
41
  a11yKeyboardHandler,
42
- closeIconDescription = defaults.closeIconDescription,
43
42
  onClose = defaults.onClose,
44
43
  onDrag = defaults.onDrag,
45
44
  showCloseButton = defaults.showCloseButton,
@@ -66,6 +65,7 @@ exports.CoachmarkDragbar = /*#__PURE__*/React.forwardRef((_ref, ref) => {
66
65
  };
67
66
  }, [isDragging, onDrag]);
68
67
  const handleDragStart = () => setIsDragging(true);
68
+ const closeIconDescription = context.useCoachmark()?.closeIconDescription;
69
69
  return /*#__PURE__*/React.createElement("header", _rollupPluginBabelHelpers.extends({}, rest, {
70
70
  className: cx(blockClass,
71
71
  // Apply the block class to the main HTML element
@@ -112,10 +112,6 @@ exports.CoachmarkDragbar.propTypes = {
112
112
  * Handler to manage keyboard interactions with the dragbar.
113
113
  */
114
114
  a11yKeyboardHandler: index.default.func.isRequired,
115
- /**
116
- * Tooltip text and aria label for the Close button icon.
117
- */
118
- closeIconDescription: index.default.string,
119
115
  /**
120
116
  * Function to call when the close button is clicked.
121
117
  */
@@ -6,10 +6,6 @@
6
6
  */
7
7
  import React from 'react';
8
8
  interface CoachmarkHeaderProps {
9
- /**
10
- * Tooltip text and aria label for the Close button icon.
11
- */
12
- closeIconDescription?: string;
13
9
  /**
14
10
  * Function to call when the close button is clicked.
15
11
  */