@carbon/ibm-products 2.73.1 → 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.
- package/css/index-full-carbon.css +56 -6
- package/css/index-full-carbon.css.map +1 -1
- package/css/index-full-carbon.min.css +1 -1
- package/css/index-full-carbon.min.css.map +1 -1
- package/css/index-without-carbon-released-only.css +5 -1
- package/css/index-without-carbon-released-only.css.map +1 -1
- package/css/index-without-carbon-released-only.min.css +1 -1
- package/css/index-without-carbon-released-only.min.css.map +1 -1
- package/css/index-without-carbon.css +56 -6
- package/css/index-without-carbon.css.map +1 -1
- package/css/index-without-carbon.min.css +1 -1
- package/css/index-without-carbon.min.css.map +1 -1
- package/css/index.css +56 -6
- package/css/index.css.map +1 -1
- package/css/index.min.css +1 -1
- package/css/index.min.css.map +1 -1
- package/es/components/AboutModal/AboutModal.d.ts +17 -23
- package/es/components/AboutModal/AboutModal.js +17 -23
- package/es/components/AddSelect/AddSelectBody.js +1 -1
- package/es/components/Carousel/Carousel.js +1 -1
- package/es/components/Coachmark/Coachmark.d.ts +4 -0
- package/es/components/Coachmark/Coachmark.js +9 -2
- package/es/components/Coachmark/CoachmarkDragbar.d.ts +0 -4
- package/es/components/Coachmark/CoachmarkDragbar.js +2 -6
- package/es/components/Coachmark/CoachmarkHeader.d.ts +0 -4
- package/es/components/Coachmark/CoachmarkHeader.js +2 -2
- package/es/components/Coachmark/CoachmarkTagline.js +5 -3
- package/es/components/Coachmark/next/Coachmark/Coachmark.d.ts +1 -22
- package/es/components/Coachmark/next/Coachmark/Coachmark.js +14 -29
- package/es/components/Coachmark/next/Coachmark/CoachmarkBeacon/CoachmarkBeacon.d.ts +1 -0
- package/es/components/Coachmark/next/Coachmark/CoachmarkBubble/CoachmarkBubble.js +13 -2
- package/es/components/Coachmark/next/Coachmark/CoachmarkContent.js +2 -2
- package/es/components/Coachmark/next/Coachmark/ContentBody.js +1 -1
- package/es/components/Coachmark/next/Coachmark/ContentHeader.js +15 -1
- package/es/components/Coachmark/next/Coachmark/context.d.ts +25 -0
- package/es/components/Coachmark/next/Coachmark/context.js +28 -0
- package/es/components/Coachmark/utils/context.d.ts +2 -2
- package/es/components/CoachmarkFixed/CoachmarkFixed.d.ts +4 -0
- package/es/components/CoachmarkFixed/CoachmarkFixed.js +6 -1
- package/es/components/CoachmarkStack/CoachmarkStack.d.ts +4 -0
- package/es/components/CoachmarkStack/CoachmarkStack.js +7 -1
- package/es/components/ConditionBuilder/ConditionBlock/ConditionBlock.js +11 -7
- package/es/components/ConditionBuilder/ConditionBuilder.js +11 -2
- package/es/components/ConditionBuilder/ConditionBuilder.types.d.ts +10 -0
- package/es/components/ConditionBuilder/ConditionBuilderActions/ConditionBuilderActions.js +10 -5
- package/es/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.js +14 -3
- package/es/components/ConditionBuilder/ConditionBuilderConnector/ConditionConnector.js +2 -2
- package/es/components/ConditionBuilder/ConditionBuilderConnector/GroupConnector.js +1 -1
- package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +5 -4
- package/es/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.js +2 -1
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.js +8 -2
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.d.ts +4 -3
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.js +20 -4
- package/es/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.js +1 -1
- package/es/components/ConditionBuilder/index.d.ts +1 -0
- package/es/components/ConditionBuilder/utils/handleKeyboardEvents.js +12 -7
- package/es/components/ConditionBuilder/utils/useDataConfigs.d.ts +1 -1
- package/es/components/ConditionBuilder/utils/util.d.ts +1 -1
- package/es/components/ConditionBuilder/utils/util.js +2 -2
- package/es/components/Datagrid/Datagrid/DatagridEmptyBody.js +1 -1
- package/es/components/EmptyStates/EmptyState.js +1 -1
- package/es/components/EmptyStates/{EmptyStateV2.js → EmptyStateV2.deprecated.js} +1 -1
- package/es/components/EmptyStates/index.d.ts +2 -2
- package/es/components/NotificationsPanel/NotificationsPanel.js +1 -1
- package/es/components/SidePanel/SidePanel.d.ts +1 -0
- package/es/components/SidePanel/SidePanel.js +1 -0
- package/es/components/StepFlow/StepContext.d.ts +14 -0
- package/es/components/StepFlow/StepGroup.d.ts +10 -0
- package/es/components/StepFlow/index.d.ts +9 -0
- package/es/components/StepFlow/story-assets/SidePanel/Example.d.ts +8 -0
- package/es/components/StepFlow/story-assets/SidePanel/StepSidePanel.d.ts +20 -0
- package/es/components/StepFlow/story-assets/StepActions.d.ts +23 -0
- package/es/components/StepFlow/story-assets/Tearsheet/Example.d.ts +8 -0
- package/es/components/StepFlow/story-assets/Tearsheet/StepTearsheet.d.ts +20 -0
- package/es/components/StepFlow/types.d.ts +22 -0
- package/es/components/TruncatedText/TruncatedText.js +4 -2
- package/es/global/js/utils/makeDraggable/makeDraggable.js +28 -0
- package/es/index.js +1 -1
- package/lib/components/AboutModal/AboutModal.d.ts +17 -23
- package/lib/components/AboutModal/AboutModal.js +17 -23
- package/lib/components/AddSelect/AddSelectBody.js +1 -1
- package/lib/components/Carousel/Carousel.js +1 -1
- package/lib/components/Coachmark/Coachmark.d.ts +4 -0
- package/lib/components/Coachmark/Coachmark.js +9 -2
- package/lib/components/Coachmark/CoachmarkDragbar.d.ts +0 -4
- package/lib/components/Coachmark/CoachmarkDragbar.js +2 -6
- package/lib/components/Coachmark/CoachmarkHeader.d.ts +0 -4
- package/lib/components/Coachmark/CoachmarkHeader.js +2 -2
- package/lib/components/Coachmark/CoachmarkTagline.js +5 -3
- package/lib/components/Coachmark/next/Coachmark/Coachmark.d.ts +1 -22
- package/lib/components/Coachmark/next/Coachmark/Coachmark.js +16 -33
- package/lib/components/Coachmark/next/Coachmark/CoachmarkBeacon/CoachmarkBeacon.d.ts +1 -0
- package/lib/components/Coachmark/next/Coachmark/CoachmarkBubble/CoachmarkBubble.js +13 -2
- package/lib/components/Coachmark/next/Coachmark/CoachmarkContent.js +5 -5
- package/lib/components/Coachmark/next/Coachmark/ContentBody.js +2 -2
- package/lib/components/Coachmark/next/Coachmark/ContentHeader.js +17 -3
- package/lib/components/Coachmark/next/Coachmark/context.d.ts +25 -0
- package/lib/components/Coachmark/next/Coachmark/context.js +31 -0
- package/lib/components/Coachmark/utils/context.d.ts +2 -2
- package/lib/components/CoachmarkFixed/CoachmarkFixed.d.ts +4 -0
- package/lib/components/CoachmarkFixed/CoachmarkFixed.js +6 -1
- package/lib/components/CoachmarkStack/CoachmarkStack.d.ts +4 -0
- package/lib/components/CoachmarkStack/CoachmarkStack.js +7 -1
- package/lib/components/ConditionBuilder/ConditionBlock/ConditionBlock.js +11 -7
- package/lib/components/ConditionBuilder/ConditionBuilder.js +11 -2
- package/lib/components/ConditionBuilder/ConditionBuilder.types.d.ts +10 -0
- package/lib/components/ConditionBuilder/ConditionBuilderActions/ConditionBuilderActions.js +10 -5
- package/lib/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.js +13 -2
- package/lib/components/ConditionBuilder/ConditionBuilderConnector/ConditionConnector.js +2 -2
- package/lib/components/ConditionBuilder/ConditionBuilderConnector/GroupConnector.js +1 -1
- package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +5 -4
- package/lib/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.js +2 -1
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.js +8 -2
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.d.ts +4 -3
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.js +20 -4
- package/lib/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.js +1 -1
- package/lib/components/ConditionBuilder/index.d.ts +1 -0
- package/lib/components/ConditionBuilder/utils/handleKeyboardEvents.js +11 -6
- package/lib/components/ConditionBuilder/utils/useDataConfigs.d.ts +1 -1
- package/lib/components/ConditionBuilder/utils/util.d.ts +1 -1
- package/lib/components/ConditionBuilder/utils/util.js +2 -2
- package/lib/components/Datagrid/Datagrid/DatagridEmptyBody.js +1 -1
- package/lib/components/EmptyStates/EmptyState.js +2 -2
- package/lib/components/EmptyStates/{EmptyStateV2.js → EmptyStateV2.deprecated.js} +2 -2
- package/lib/components/EmptyStates/index.d.ts +2 -2
- package/lib/components/NotificationsPanel/NotificationsPanel.js +1 -1
- package/lib/components/SidePanel/SidePanel.d.ts +1 -0
- package/lib/components/SidePanel/SidePanel.js +1 -0
- package/lib/components/StepFlow/StepContext.d.ts +14 -0
- package/lib/components/StepFlow/StepGroup.d.ts +10 -0
- package/lib/components/StepFlow/index.d.ts +9 -0
- package/lib/components/StepFlow/story-assets/SidePanel/Example.d.ts +8 -0
- package/lib/components/StepFlow/story-assets/SidePanel/StepSidePanel.d.ts +20 -0
- package/lib/components/StepFlow/story-assets/StepActions.d.ts +23 -0
- package/lib/components/StepFlow/story-assets/Tearsheet/Example.d.ts +8 -0
- package/lib/components/StepFlow/story-assets/Tearsheet/StepTearsheet.d.ts +20 -0
- package/lib/components/StepFlow/types.d.ts +22 -0
- package/lib/components/TruncatedText/TruncatedText.js +4 -2
- package/lib/global/js/utils/makeDraggable/makeDraggable.js +28 -0
- package/lib/index.js +2 -2
- package/package.json +7 -7
- package/scss/components/Coachmark/_coachmark.scss +7 -0
- package/scss/components/ConditionBuilder/styles/_conditionBuilderCondition.scss +24 -0
- package/scss/components/ConditionBuilder/styles/_conditionBuilderItem.scss +26 -12
- package/scss/components/SidePanel/_side-panel.scss +6 -1
- package/scss/components/Tearsheet/_tearsheet.scss +1 -0
- package/scss/components/TruncatedText/_truncated-text.scss +1 -0
- package/telemetry.yml +1 -1
- /package/es/components/EmptyStates/{EmptyStateIllustration.d.ts → EmptyStateIllustration.deprecated.d.ts} +0 -0
- /package/es/components/EmptyStates/{EmptyStateIllustration.js → EmptyStateIllustration.deprecated.js} +0 -0
- /package/es/components/EmptyStates/{EmptyStateV2.d.ts → EmptyStateV2.deprecated.d.ts} +0 -0
- /package/lib/components/EmptyStates/{EmptyStateIllustration.d.ts → EmptyStateIllustration.deprecated.d.ts} +0 -0
- /package/lib/components/EmptyStates/{EmptyStateIllustration.js → EmptyStateIllustration.deprecated.js} +0 -0
- /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
|
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,
|
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
|
-
*
|
11
|
-
*
|
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
|
-
*
|
15
|
+
* Specify an optional className to be applied to the modal root node
|
17
16
|
*/
|
18
17
|
className?: string;
|
19
18
|
/**
|
20
|
-
*
|
19
|
+
* Provide an accessible name for the close icon
|
21
20
|
*/
|
22
21
|
closeIconDescription: string;
|
23
22
|
/**
|
24
|
-
*
|
25
|
-
* legal information (optional)
|
23
|
+
* Provide any relevant product disclaimers or legal information
|
26
24
|
*/
|
27
25
|
content?: ReactNode;
|
28
26
|
/**
|
29
|
-
*
|
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
|
-
*
|
35
|
-
*
|
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
|
-
*
|
36
|
+
* Provide a visual representation of the product
|
41
37
|
*/
|
42
38
|
logo: ReactNode;
|
43
39
|
/**
|
44
|
-
*
|
40
|
+
* Specify an aria-label for the modal
|
45
41
|
*/
|
46
42
|
modalAriaLabel?: string;
|
47
43
|
/**
|
48
|
-
*
|
49
|
-
*
|
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
|
-
*
|
49
|
+
* Specify whether the modal is currently open
|
54
50
|
*/
|
55
51
|
open?: boolean;
|
56
52
|
/**
|
57
|
-
*
|
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
|
-
*
|
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
|
-
*
|
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
|
-
*
|
124
|
-
*
|
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
|
-
*
|
128
|
+
* Specify an optional className to be applied to the modal root node
|
130
129
|
*/
|
131
130
|
className: index.default.string,
|
132
131
|
/**
|
133
|
-
*
|
132
|
+
* Provide an accessible name for the close icon
|
134
133
|
*/
|
135
134
|
closeIconDescription: index.default.string.isRequired,
|
136
135
|
/**
|
137
|
-
*
|
138
|
-
* legal information (optional)
|
136
|
+
* Provide any relevant product disclaimers or legal information
|
139
137
|
*/
|
140
138
|
content: index.default.node,
|
141
139
|
/**
|
142
|
-
*
|
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
|
-
*
|
148
|
-
*
|
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
|
-
*
|
149
|
+
* Provide a visual representation of the product
|
154
150
|
*/
|
155
151
|
logo: index.default.node.isRequired,
|
156
152
|
/**
|
157
|
-
*
|
153
|
+
* Specify an aria-label for the modal
|
158
154
|
*/
|
159
155
|
modalAriaLabel: index.default.string,
|
160
156
|
/**
|
161
|
-
*
|
162
|
-
*
|
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
|
-
*
|
162
|
+
* Specify whether the modal is currently open
|
167
163
|
*/
|
168
164
|
open: index.default.bool,
|
169
165
|
/**
|
170
|
-
*
|
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
|
-
*
|
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
|
-
*
|
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]
|
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
|
*/
|