@carbon/ibm-products 2.63.0 → 2.64.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.map +1 -1
- package/css/index-full-carbon.min.css.map +1 -1
- package/css/index-without-carbon-released-only.css.map +1 -1
- package/css/index-without-carbon-released-only.min.css.map +1 -1
- package/css/index-without-carbon.css.map +1 -1
- package/css/index-without-carbon.min.css.map +1 -1
- package/css/index.css.map +1 -1
- package/css/index.min.css.map +1 -1
- package/es/components/APIKeyModal/APIKeyModal.js +6 -9
- package/es/components/AboutModal/AboutModal.js +5 -4
- package/es/components/ConditionBuilder/ConditionBlock/ConditionBlock.js +1 -3
- package/es/components/ConditionBuilder/ConditionBuilder.types.d.ts +8 -7
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.js +1 -3
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemDate/ConditionBuilderItemDate.d.ts +3 -1
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemDate/ConditionBuilderItemDate.js +71 -16
- package/es/components/ConditionBuilder/utils/handleKeyboardEvents.js +1 -0
- package/es/components/ConditionBuilder/utils/util.js +10 -45
- package/es/components/CreateFullPage/CreateFullPageStep.js +4 -4
- package/es/components/CreateInfluencer/CreateInfluencer.js +3 -3
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +0 -3
- package/es/components/Datagrid/useSortableColumns.js +1 -1
- package/es/components/EmptyStates/EmptyState.d.ts +6 -7
- package/es/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.d.ts +3 -48
- package/es/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +1 -0
- package/es/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.d.ts +3 -48
- package/es/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.d.ts +3 -48
- package/es/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +1 -0
- package/es/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.d.ts +3 -48
- package/es/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +1 -0
- package/es/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.d.ts +3 -48
- package/es/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js +1 -0
- package/es/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.d.ts +3 -48
- package/es/components/InterstitialScreen/InterstitialScreen.js +4 -2
- package/es/components/InterstitialScreenView/InterstitialScreenView.d.ts +4 -0
- package/es/components/InterstitialScreenView/InterstitialScreenView.js +9 -4
- package/es/components/OptionsTile/OptionsTile.js +3 -3
- package/es/components/ProductiveCard/ProductiveCard.d.ts +9 -5
- package/es/components/SimpleHeader/SimpleHeader.js +2 -2
- package/es/components/Tearsheet/TearsheetShell.js +80 -50
- package/es/global/js/hooks/useFocus.d.ts +1 -1
- package/es/global/js/hooks/useFocus.js +23 -31
- package/es/node_modules/@carbon/icons-react/es/Icon.js +1 -1
- package/es/node_modules/@carbon/{icon-helpers → icons-react/node_modules/@carbon/icon-helpers}/es/index.js +1 -1
- package/lib/components/APIKeyModal/APIKeyModal.js +5 -8
- package/lib/components/AboutModal/AboutModal.js +4 -3
- package/lib/components/ConditionBuilder/ConditionBlock/ConditionBlock.js +1 -3
- package/lib/components/ConditionBuilder/ConditionBuilder.types.d.ts +8 -7
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.js +1 -3
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemDate/ConditionBuilderItemDate.d.ts +3 -1
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemDate/ConditionBuilderItemDate.js +68 -13
- package/lib/components/ConditionBuilder/utils/handleKeyboardEvents.js +1 -0
- package/lib/components/ConditionBuilder/utils/util.js +10 -45
- package/lib/components/CreateFullPage/CreateFullPageStep.js +3 -3
- package/lib/components/CreateInfluencer/CreateInfluencer.js +2 -2
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +0 -3
- package/lib/components/Datagrid/useSortableColumns.js +1 -1
- package/lib/components/EmptyStates/EmptyState.d.ts +6 -7
- package/lib/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.d.ts +3 -48
- package/lib/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +1 -0
- package/lib/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.d.ts +3 -48
- package/lib/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.d.ts +3 -48
- package/lib/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +1 -0
- package/lib/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.d.ts +3 -48
- package/lib/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +1 -0
- package/lib/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.d.ts +3 -48
- package/lib/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js +1 -0
- package/lib/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.d.ts +3 -48
- package/lib/components/InterstitialScreen/InterstitialScreen.js +4 -2
- package/lib/components/InterstitialScreenView/InterstitialScreenView.d.ts +4 -0
- package/lib/components/InterstitialScreenView/InterstitialScreenView.js +9 -4
- package/lib/components/OptionsTile/OptionsTile.js +2 -2
- package/lib/components/ProductiveCard/ProductiveCard.d.ts +9 -5
- package/lib/components/SimpleHeader/SimpleHeader.js +1 -1
- package/lib/components/Tearsheet/TearsheetShell.js +78 -48
- package/lib/global/js/hooks/useFocus.d.ts +1 -1
- package/lib/global/js/hooks/useFocus.js +22 -31
- package/lib/node_modules/@carbon/icons-react/es/Icon.js +1 -1
- package/lib/node_modules/@carbon/{icon-helpers → icons-react/node_modules/@carbon/icon-helpers}/es/index.js +1 -1
- package/package.json +11 -12
- package/telemetry.yml +1 -1
@@ -4,31 +4,9 @@
|
|
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 React
|
8
|
-
import {
|
9
|
-
|
10
|
-
export interface NoTagsEmptyStateProps {
|
11
|
-
/**
|
12
|
-
* Empty state action button
|
13
|
-
*/
|
14
|
-
action?: {
|
15
|
-
kind?: 'primary' | 'secondary' | 'tertiary';
|
16
|
-
renderIcon?: CarbonIconType;
|
17
|
-
onClick?: ButtonProps<React.ElementType>['onClick'];
|
18
|
-
text?: string;
|
19
|
-
};
|
20
|
-
/**
|
21
|
-
* Provide an optional class to be applied to the containing node.
|
22
|
-
*/
|
23
|
-
className?: string;
|
24
|
-
/**
|
25
|
-
* The alt text for empty state svg images. If not provided , title will be used.
|
26
|
-
*/
|
27
|
-
illustrationDescription?: string;
|
28
|
-
/**
|
29
|
-
* Designates the position of the illustration relative to the content
|
30
|
-
*/
|
31
|
-
illustrationPosition?: 'top' | 'right' | 'bottom' | 'left';
|
7
|
+
import React from 'react';
|
8
|
+
import { EmptyStatePresetProps } from '../EmptyState';
|
9
|
+
export interface NoTagsEmptyStateProps extends EmptyStatePresetProps {
|
32
10
|
/**
|
33
11
|
* Empty state illustration theme variations.
|
34
12
|
* To ensure you use the correct themed illustrations, you can conditionally specify light or dark
|
@@ -36,29 +14,6 @@ export interface NoTagsEmptyStateProps {
|
|
36
14
|
* `illustrationTheme={appTheme === ('carbon--g100' || 'carbon--g90') ? 'dark' : 'light'}`
|
37
15
|
*/
|
38
16
|
illustrationTheme?: 'light' | 'dark';
|
39
|
-
/**
|
40
|
-
* Empty state link object
|
41
|
-
*/
|
42
|
-
link?: {
|
43
|
-
text?: string | ReactNode;
|
44
|
-
href?: string;
|
45
|
-
};
|
46
|
-
/**
|
47
|
-
* Empty state headingAs allows you to customize the type of heading element
|
48
|
-
*/
|
49
|
-
headingAs?: (() => ReactNode) | string | ElementType;
|
50
|
-
/**
|
51
|
-
* Empty state size
|
52
|
-
*/
|
53
|
-
size?: 'lg' | 'sm';
|
54
|
-
/**
|
55
|
-
* Empty state subtitle
|
56
|
-
*/
|
57
|
-
subtitle?: string | ReactNode;
|
58
|
-
/**
|
59
|
-
* Empty state title
|
60
|
-
*/
|
61
|
-
title: string | ReactNode;
|
62
17
|
}
|
63
18
|
/**
|
64
19
|
* The `EmptyState` component follows the Carbon guidelines for empty states with some added specifications around illustration usage. For additional usage guidelines and documentation please refer to the links above.
|
@@ -17,6 +17,7 @@ import { NoTagsIllustration } from '../assets/NoTagsIllustration.js';
|
|
17
17
|
import { defaults } from '../EmptyState.js';
|
18
18
|
|
19
19
|
var _excluded = ["action", "className", "illustrationPosition", "illustrationTheme", "illustrationDescription", "link", "size", "headingAs", "subtitle", "title"];
|
20
|
+
|
20
21
|
// The block part of our conventional BEM class names (blockClass__E--M).
|
21
22
|
var blockClass = "".concat(pkg.prefix, "--empty-state");
|
22
23
|
var componentName = 'NoTagsEmptyState';
|
@@ -4,31 +4,9 @@
|
|
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 React
|
8
|
-
import {
|
9
|
-
|
10
|
-
export interface NotFoundEmptyStateProps {
|
11
|
-
/**
|
12
|
-
* Empty state action button
|
13
|
-
*/
|
14
|
-
action?: {
|
15
|
-
kind?: 'primary' | 'secondary' | 'tertiary';
|
16
|
-
renderIcon?: CarbonIconType;
|
17
|
-
onClick?: ButtonProps<React.ElementType>['onClick'];
|
18
|
-
text?: string;
|
19
|
-
};
|
20
|
-
/**
|
21
|
-
* Provide an optional class to be applied to the containing node.
|
22
|
-
*/
|
23
|
-
className?: string;
|
24
|
-
/**
|
25
|
-
* The alt text for empty state svg images. If not provided , title will be used.
|
26
|
-
*/
|
27
|
-
illustrationDescription?: string;
|
28
|
-
/**
|
29
|
-
* Designates the position of the illustration relative to the content
|
30
|
-
*/
|
31
|
-
illustrationPosition?: 'top' | 'right' | 'bottom' | 'left';
|
7
|
+
import React from 'react';
|
8
|
+
import { EmptyStatePresetProps } from '../EmptyState';
|
9
|
+
export interface NotFoundEmptyStateProps extends EmptyStatePresetProps {
|
32
10
|
/**
|
33
11
|
* Empty state illustration theme variations.
|
34
12
|
* To ensure you use the correct themed illustrations, you can conditionally specify light or dark
|
@@ -36,29 +14,6 @@ export interface NotFoundEmptyStateProps {
|
|
36
14
|
* `illustrationTheme={appTheme === ('carbon--g100' || 'carbon--g90') ? 'dark' : 'light'}`
|
37
15
|
*/
|
38
16
|
illustrationTheme?: 'light' | 'dark';
|
39
|
-
/**
|
40
|
-
* Empty state link object
|
41
|
-
*/
|
42
|
-
link?: {
|
43
|
-
text?: string | ReactNode;
|
44
|
-
href?: string;
|
45
|
-
};
|
46
|
-
/**
|
47
|
-
* Empty state headingAs allows you to customize the type of heading element
|
48
|
-
*/
|
49
|
-
headingAs?: (() => ReactNode) | string | ElementType;
|
50
|
-
/**
|
51
|
-
* Empty state size
|
52
|
-
*/
|
53
|
-
size?: 'lg' | 'sm';
|
54
|
-
/**
|
55
|
-
* Empty state subtitle
|
56
|
-
*/
|
57
|
-
subtitle: string | ReactNode;
|
58
|
-
/**
|
59
|
-
* Empty state title
|
60
|
-
*/
|
61
|
-
title: string | ReactNode;
|
62
17
|
}
|
63
18
|
/**
|
64
19
|
* The `EmptyState` component follows the Carbon guidelines for empty states with some added specifications around illustration usage. For additional usage guidelines and documentation please refer to the links above.
|
@@ -17,6 +17,7 @@ import { NotFoundIllustration } from '../assets/NotFoundIllustration.js';
|
|
17
17
|
import { defaults } from '../EmptyState.js';
|
18
18
|
|
19
19
|
var _excluded = ["action", "className", "illustrationPosition", "illustrationTheme", "illustrationDescription", "link", "size", "headingAs", "subtitle", "title"];
|
20
|
+
|
20
21
|
// The block part of our conventional BEM class names (blockClass__E--M).
|
21
22
|
var blockClass = "".concat(pkg.prefix, "--empty-state");
|
22
23
|
var componentName = 'NotFoundEmptyState';
|
@@ -4,31 +4,9 @@
|
|
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 React
|
8
|
-
import {
|
9
|
-
|
10
|
-
export interface NotificationsEmptyStateProps {
|
11
|
-
/**
|
12
|
-
* Empty state action button
|
13
|
-
*/
|
14
|
-
action?: {
|
15
|
-
kind?: 'primary' | 'secondary' | 'tertiary';
|
16
|
-
renderIcon?: CarbonIconType;
|
17
|
-
onClick?: ButtonProps<React.ElementType>['onClick'];
|
18
|
-
text?: string;
|
19
|
-
};
|
20
|
-
/**
|
21
|
-
* Provide an optional class to be applied to the containing node.
|
22
|
-
*/
|
23
|
-
className?: string;
|
24
|
-
/**
|
25
|
-
* The alt text for empty state svg images. If not provided , title will be used.
|
26
|
-
*/
|
27
|
-
illustrationDescription?: string;
|
28
|
-
/**
|
29
|
-
* Designates the position of the illustration relative to the content
|
30
|
-
*/
|
31
|
-
illustrationPosition?: 'top' | 'right' | 'bottom' | 'left';
|
7
|
+
import React from 'react';
|
8
|
+
import { EmptyStatePresetProps } from '../EmptyState';
|
9
|
+
export interface NotificationsEmptyStateProps extends EmptyStatePresetProps {
|
32
10
|
/**
|
33
11
|
* Empty state illustration theme variations.
|
34
12
|
* To ensure you use the correct themed illustrations, you can conditionally specify light or dark
|
@@ -36,29 +14,6 @@ export interface NotificationsEmptyStateProps {
|
|
36
14
|
* `illustrationTheme={appTheme === ('carbon--g100' || 'carbon--g90') ? 'dark' : 'light'}`
|
37
15
|
*/
|
38
16
|
illustrationTheme?: 'light' | 'dark';
|
39
|
-
/**
|
40
|
-
* Empty state link object
|
41
|
-
*/
|
42
|
-
link?: {
|
43
|
-
text?: string | ReactNode;
|
44
|
-
href?: string;
|
45
|
-
};
|
46
|
-
/**
|
47
|
-
* Empty state headingAs allows you to customize the type of heading element
|
48
|
-
*/
|
49
|
-
headingAs?: (() => ReactNode) | string | ElementType;
|
50
|
-
/**
|
51
|
-
* Empty state size
|
52
|
-
*/
|
53
|
-
size?: 'lg' | 'sm';
|
54
|
-
/**
|
55
|
-
* Empty state subtitle
|
56
|
-
*/
|
57
|
-
subtitle: ReactNode;
|
58
|
-
/**
|
59
|
-
* Empty state title
|
60
|
-
*/
|
61
|
-
title: ReactNode;
|
62
17
|
}
|
63
18
|
/**
|
64
19
|
* The `EmptyState` component follows the Carbon guidelines for empty states with some added specifications around illustration usage. For additional usage guidelines and documentation please refer to the links above.
|
@@ -17,6 +17,7 @@ import { NotificationsIllustration } from '../assets/NotificationsIllustration.j
|
|
17
17
|
import { defaults } from '../EmptyState.js';
|
18
18
|
|
19
19
|
var _excluded = ["action", "className", "illustrationPosition", "illustrationTheme", "illustrationDescription", "link", "size", "headingAs", "subtitle", "title"];
|
20
|
+
|
20
21
|
// The block part of our conventional BEM class names (blockClass__E--M).
|
21
22
|
var blockClass = "".concat(pkg.prefix, "--empty-state");
|
22
23
|
var componentName = 'NotificationsEmptyState';
|
@@ -4,31 +4,9 @@
|
|
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 React
|
8
|
-
import {
|
9
|
-
|
10
|
-
export interface UnauthorizedEmptyStateProps {
|
11
|
-
/**
|
12
|
-
* Empty state action button
|
13
|
-
*/
|
14
|
-
action?: {
|
15
|
-
kind?: 'primary' | 'secondary' | 'tertiary';
|
16
|
-
renderIcon?: CarbonIconType;
|
17
|
-
onClick?: ButtonProps<React.ElementType>['onClick'];
|
18
|
-
text?: string;
|
19
|
-
};
|
20
|
-
/**
|
21
|
-
* Provide an optional class to be applied to the containing node.
|
22
|
-
*/
|
23
|
-
className?: string;
|
24
|
-
/**
|
25
|
-
* The alt text for empty state svg images. If not provided , title will be used.
|
26
|
-
*/
|
27
|
-
illustrationDescription?: string;
|
28
|
-
/**
|
29
|
-
* Designates the position of the illustration relative to the content
|
30
|
-
*/
|
31
|
-
illustrationPosition?: 'top' | 'right' | 'bottom' | 'left';
|
7
|
+
import React from 'react';
|
8
|
+
import { EmptyStatePresetProps } from '../EmptyState';
|
9
|
+
export interface UnauthorizedEmptyStateProps extends EmptyStatePresetProps {
|
32
10
|
/**
|
33
11
|
* Empty state illustration theme variations.
|
34
12
|
* To ensure you use the correct themed illustrations, you can conditionally specify light or dark
|
@@ -36,29 +14,6 @@ export interface UnauthorizedEmptyStateProps {
|
|
36
14
|
* `illustrationTheme={appTheme === ('carbon--g100' || 'carbon--g90') ? 'dark' : 'light'}`
|
37
15
|
*/
|
38
16
|
illustrationTheme?: 'light' | 'dark';
|
39
|
-
/**
|
40
|
-
* Empty state link object
|
41
|
-
*/
|
42
|
-
link?: {
|
43
|
-
text?: string | ReactNode;
|
44
|
-
href?: string;
|
45
|
-
};
|
46
|
-
/**
|
47
|
-
* Empty state headingAs allows you to customize the type of heading element
|
48
|
-
*/
|
49
|
-
headingAs?: (() => ReactNode) | string | ElementType;
|
50
|
-
/**
|
51
|
-
* Empty state size
|
52
|
-
*/
|
53
|
-
size?: 'lg' | 'sm';
|
54
|
-
/**
|
55
|
-
* Empty state subtitle
|
56
|
-
*/
|
57
|
-
subtitle: string | ReactNode;
|
58
|
-
/**
|
59
|
-
* Empty state title
|
60
|
-
*/
|
61
|
-
title: string | ReactNode;
|
62
17
|
}
|
63
18
|
/**
|
64
19
|
* The `EmptyState` component follows the Carbon guidelines for empty states with some added specifications around illustration usage. For additional usage guidelines and documentation please refer to the links above.
|
@@ -202,7 +202,8 @@ var InterstitialScreen = /*#__PURE__*/React__default.forwardRef(function (props,
|
|
202
202
|
if (/*#__PURE__*/isValidElement(child)) {
|
203
203
|
return /*#__PURE__*/React__default.createElement(ProgressStep, {
|
204
204
|
key: idx,
|
205
|
-
label: child.props.stepTitle || ''
|
205
|
+
label: child.props.stepTitle || '',
|
206
|
+
translateWithId: child.props.translateWithId
|
206
207
|
});
|
207
208
|
}
|
208
209
|
})))), /*#__PURE__*/React__default.createElement(ModalBody, {
|
@@ -234,7 +235,8 @@ var InterstitialScreen = /*#__PURE__*/React__default.forwardRef(function (props,
|
|
234
235
|
if (/*#__PURE__*/isValidElement(child)) {
|
235
236
|
return /*#__PURE__*/React__default.createElement(ProgressStep, {
|
236
237
|
key: idx,
|
237
|
-
label: child.props.stepTitle || ''
|
238
|
+
label: child.props.stepTitle || '',
|
239
|
+
translateWithId: child.props.translateWithId
|
238
240
|
});
|
239
241
|
}
|
240
242
|
})))), childElements, renderFooter()));
|
@@ -18,6 +18,10 @@ export interface InterstitialScreenViewProps extends PropsWithChildren {
|
|
18
18
|
* The label to pass to the ProgressStep component.
|
19
19
|
*/
|
20
20
|
stepTitle: string;
|
21
|
+
/**
|
22
|
+
* Optional method that takes in a message id and returns an internationalized string.
|
23
|
+
*/
|
24
|
+
translateWithId?: (id: string) => string;
|
21
25
|
}
|
22
26
|
/**
|
23
27
|
* An Onboarding component intended to be used as the child elements of the InterstitialScreen component.
|
@@ -12,7 +12,7 @@ import cx from 'classnames';
|
|
12
12
|
import { getDevtoolsProps } from '../../global/js/utils/devtools.js';
|
13
13
|
import { pkg } from '../../settings.js';
|
14
14
|
|
15
|
-
var _excluded = ["children", "className", "stepTitle"];
|
15
|
+
var _excluded = ["children", "className", "stepTitle", "translateWithId"];
|
16
16
|
|
17
17
|
// Carbon and package components we use.
|
18
18
|
/* TODO: @import(s) of carbon components and other package components. */
|
@@ -26,8 +26,9 @@ var componentName = 'InterstitialScreenView';
|
|
26
26
|
var InterstitialScreenView = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
27
27
|
var children = _ref.children,
|
28
28
|
className = _ref.className,
|
29
|
-
stepTitle = _ref.stepTitle
|
30
|
-
|
29
|
+
stepTitle = _ref.stepTitle;
|
30
|
+
_ref.translateWithId;
|
31
|
+
var rest = _objectWithoutProperties(_ref, _excluded);
|
31
32
|
return /*#__PURE__*/React__default.createElement("div", _extends({
|
32
33
|
role: "complementary",
|
33
34
|
"aria-label": stepTitle
|
@@ -67,7 +68,11 @@ InterstitialScreenView.propTypes = {
|
|
67
68
|
/**
|
68
69
|
* The label to pass to the ProgressStep component.
|
69
70
|
*/
|
70
|
-
stepTitle: PropTypes.string.isRequired
|
71
|
+
stepTitle: PropTypes.string.isRequired,
|
72
|
+
/**
|
73
|
+
* Optional method that takes in a message id and returns an internationalized string.
|
74
|
+
*/
|
75
|
+
translateWithId: PropTypes.func
|
71
76
|
};
|
72
77
|
|
73
78
|
export { InterstitialScreenView };
|
@@ -8,7 +8,7 @@
|
|
8
8
|
import { objectWithoutProperties as _objectWithoutProperties, slicedToArray as _slicedToArray, extends as _extends, defineProperty as _defineProperty } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
9
9
|
import * as carbonMotion from '@carbon/motion';
|
10
10
|
import { ChevronDown, Locked, WarningFilled, WarningAltFilled } from '@carbon/react/icons';
|
11
|
-
import { Toggle, Layer } from '@carbon/react';
|
11
|
+
import { Toggle, Layer, Section, Heading } from '@carbon/react';
|
12
12
|
import React__default, { useState, useRef } from 'react';
|
13
13
|
import PropTypes from '../../_virtual/index.js';
|
14
14
|
import cx from 'classnames';
|
@@ -148,9 +148,9 @@ var OptionsTile = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
148
148
|
var hasValidationState = invalid || warn || locked;
|
149
149
|
var summaryHidden = !hasValidationState && enabled === false;
|
150
150
|
var summaryClasses = cx("".concat(blockClass, "__summary"), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(blockClass, "__summary--closing"), closing), "".concat(blockClass, "__summary--open"), open), "".concat(blockClass, "__summary--invalid"), invalid), "".concat(blockClass, "__summary--warn"), warn), "".concat(blockClass, "__summary--locked"), locked), "".concat(blockClass, "__summary--hidden"), summaryHidden));
|
151
|
-
return /*#__PURE__*/React__default.createElement(
|
151
|
+
return /*#__PURE__*/React__default.createElement(Section, {
|
152
152
|
className: "".concat(blockClass, "__heading")
|
153
|
-
}, /*#__PURE__*/React__default.createElement(
|
153
|
+
}, /*#__PURE__*/React__default.createElement(Heading, {
|
154
154
|
id: titleId,
|
155
155
|
className: "".concat(blockClass, "__title")
|
156
156
|
}, title), text && /*#__PURE__*/React__default.createElement("span", {
|
@@ -3,16 +3,16 @@ import { CarbonIconType } from '@carbon/icons-react/lib/CarbonIcon';
|
|
3
3
|
type ActionIcon = {
|
4
4
|
id?: string;
|
5
5
|
icon?: CarbonIconType;
|
6
|
-
|
7
|
-
|
6
|
+
onClick?: (event: MouseEvent) => void;
|
7
|
+
onKeydown?: (event: KeyboardEvent) => void;
|
8
8
|
iconDescription?: string;
|
9
9
|
href?: string;
|
10
10
|
};
|
11
11
|
type overflowAction = {
|
12
12
|
id?: string;
|
13
13
|
itemText?: string;
|
14
|
-
onClick?: () => void;
|
15
|
-
onKeydown?: () => void;
|
14
|
+
onClick?: (event: MouseEvent) => void;
|
15
|
+
onKeydown?: (event: KeyboardEvent) => void;
|
16
16
|
};
|
17
17
|
type PlacementType = 'top' | 'bottom';
|
18
18
|
type ClickZoneType = 'one' | 'two' | 'three';
|
@@ -52,7 +52,11 @@ export interface ProductiveCardProps extends PropsWithChildren {
|
|
52
52
|
/**
|
53
53
|
* Provides the callback for a clickable card
|
54
54
|
*/
|
55
|
-
onClick?: () => void;
|
55
|
+
onClick?: (event: MouseEvent) => void;
|
56
|
+
/**
|
57
|
+
* Provides the callback for keydown events on the card
|
58
|
+
*/
|
59
|
+
onKeyDown?: (event: KeyboardEvent) => void;
|
56
60
|
/**
|
57
61
|
* Function that's called from the primary button or action icon
|
58
62
|
*/
|
@@ -12,7 +12,7 @@ import cx from 'classnames';
|
|
12
12
|
import { pkg } from '../../settings.js';
|
13
13
|
import pconsole from '../../global/js/utils/pconsole.js';
|
14
14
|
import { isRequiredIf } from '../../global/js/utils/props-helper.js';
|
15
|
-
import { Tooltip } from '@carbon/react';
|
15
|
+
import { Heading, Tooltip } from '@carbon/react';
|
16
16
|
import { BreadcrumbWithOverflow } from '../BreadcrumbWithOverflow/BreadcrumbWithOverflow.js';
|
17
17
|
|
18
18
|
var _excluded = ["breadcrumbs", "className", "title", "noTrailingSlash", "maxVisible", "overflowAriaLabel", "overflowTooltipAlign"];
|
@@ -57,7 +57,7 @@ var SimpleHeader = function SimpleHeader(_ref) {
|
|
57
57
|
maxVisible: maxVisible,
|
58
58
|
overflowAriaLabel: overflowAriaLabel,
|
59
59
|
overflowTooltipAlign: overflowTooltipAlign
|
60
|
-
}), title && /*#__PURE__*/React__default.createElement(
|
60
|
+
}), title && /*#__PURE__*/React__default.createElement(Heading, {
|
61
61
|
className: cx("".concat(blockClass, "__title"))
|
62
62
|
}, title));
|
63
63
|
};
|
@@ -15,15 +15,16 @@ import pconsole from '../../global/js/utils/pconsole.js';
|
|
15
15
|
import { getNodeTextContent as _getNodeTextContent } from '../../global/js/utils/getNodeTextContent.js';
|
16
16
|
import { deprecateProp } from '../../global/js/utils/props-helper.js';
|
17
17
|
import { checkHeightOverflow } from '../../global/js/utils/checkForOverflow.js';
|
18
|
-
import { Button, usePrefix, unstable_FeatureFlags, ComposedModal, ModalHeader, Layer, DefinitionTooltip } from '@carbon/react';
|
18
|
+
import { Button, usePrefix, unstable_FeatureFlags, ComposedModal, ModalHeader, Layer, DefinitionTooltip, Section } from '@carbon/react';
|
19
19
|
import { ActionSet } from '../ActionSet/ActionSet.js';
|
20
20
|
import { Wrap } from '../../global/js/utils/Wrap.js';
|
21
21
|
import { usePortalTarget } from '../../global/js/hooks/usePortalTarget.js';
|
22
|
-
import { useFocus
|
22
|
+
import { useFocus } from '../../global/js/hooks/useFocus.js';
|
23
23
|
import { usePreviousValue } from '../../global/js/hooks/usePreviousValue.js';
|
24
24
|
import { useIsomorphicEffect } from '../../global/js/hooks/useIsomorphicEffect.js';
|
25
25
|
|
26
|
-
var _excluded = ["
|
26
|
+
var _excluded = ["children"],
|
27
|
+
_excluded2 = ["actions", "decorator", "ariaLabel", "children", "className", "closeIconDescription", "currentStep", "description", "hasCloseIcon", "hasError", "headerActions", "influencer", "influencerPosition", "influencerWidth", "label", "navigation", "onClose", "open", "portalTarget", "selectorPrimaryFocus", "selectorsFloatingMenus", "size", "slug", "title", "verticalPosition", "launcherButtonRef"];
|
27
28
|
// The block part of our conventional BEM class names (bc__E--M).
|
28
29
|
var bc = "".concat(pkg.prefix, "--tearsheet");
|
29
30
|
var componentName = 'TearsheetShell';
|
@@ -56,6 +57,18 @@ var tearsheetHasCloseIcon = function tearsheetHasCloseIcon(actions, hasCloseIcon
|
|
56
57
|
return hasCloseIcon !== null && hasCloseIcon !== void 0 ? hasCloseIcon : tearsheetIsPassive(actions);
|
57
58
|
};
|
58
59
|
|
60
|
+
/**
|
61
|
+
* Since the Tearsheet has an H3 heading, any headings inside the Tearsheet should start at H4.
|
62
|
+
* This is a helper to do that.
|
63
|
+
*/
|
64
|
+
var SectionLevel3 = function SectionLevel3(_ref) {
|
65
|
+
var children = _ref.children,
|
66
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
67
|
+
return /*#__PURE__*/React__default.createElement(Section, _extends({
|
68
|
+
level: 3
|
69
|
+
}, rest), children);
|
70
|
+
};
|
71
|
+
|
59
72
|
/**
|
60
73
|
* TearSheetShell is used internally by TearSheet and TearSheetNarrow
|
61
74
|
*
|
@@ -63,36 +76,36 @@ var tearsheetHasCloseIcon = function tearsheetHasCloseIcon(actions, hasCloseIcon
|
|
63
76
|
*
|
64
77
|
* See the canvas tab for the component API details.
|
65
78
|
* */
|
66
|
-
var TearsheetShell = /*#__PURE__*/React__default.forwardRef(function (
|
67
|
-
var actions =
|
68
|
-
decorator =
|
69
|
-
ariaLabel =
|
70
|
-
children =
|
71
|
-
className =
|
72
|
-
|
73
|
-
closeIconDescription =
|
74
|
-
currentStep =
|
75
|
-
description =
|
76
|
-
hasCloseIcon =
|
77
|
-
hasError =
|
78
|
-
headerActions =
|
79
|
-
influencer =
|
80
|
-
influencerPosition =
|
81
|
-
influencerWidth =
|
82
|
-
label =
|
83
|
-
navigation =
|
84
|
-
onClose =
|
85
|
-
open =
|
86
|
-
portalTargetIn =
|
87
|
-
selectorPrimaryFocus =
|
88
|
-
|
89
|
-
selectorsFloatingMenus =
|
90
|
-
size =
|
91
|
-
deprecated_slug =
|
92
|
-
title =
|
93
|
-
verticalPosition =
|
94
|
-
launcherButtonRef =
|
95
|
-
rest = _objectWithoutProperties(
|
79
|
+
var TearsheetShell = /*#__PURE__*/React__default.forwardRef(function (_ref2, ref) {
|
80
|
+
var actions = _ref2.actions,
|
81
|
+
decorator = _ref2.decorator,
|
82
|
+
ariaLabel = _ref2.ariaLabel,
|
83
|
+
children = _ref2.children,
|
84
|
+
className = _ref2.className,
|
85
|
+
_ref2$closeIconDescri = _ref2.closeIconDescription,
|
86
|
+
closeIconDescription = _ref2$closeIconDescri === void 0 ? 'Close' : _ref2$closeIconDescri,
|
87
|
+
currentStep = _ref2.currentStep,
|
88
|
+
description = _ref2.description,
|
89
|
+
hasCloseIcon = _ref2.hasCloseIcon,
|
90
|
+
hasError = _ref2.hasError,
|
91
|
+
headerActions = _ref2.headerActions,
|
92
|
+
influencer = _ref2.influencer,
|
93
|
+
influencerPosition = _ref2.influencerPosition,
|
94
|
+
influencerWidth = _ref2.influencerWidth,
|
95
|
+
label = _ref2.label,
|
96
|
+
navigation = _ref2.navigation,
|
97
|
+
onClose = _ref2.onClose,
|
98
|
+
open = _ref2.open,
|
99
|
+
portalTargetIn = _ref2.portalTarget,
|
100
|
+
selectorPrimaryFocus = _ref2.selectorPrimaryFocus,
|
101
|
+
_ref2$selectorsFloati = _ref2.selectorsFloatingMenus,
|
102
|
+
selectorsFloatingMenus = _ref2$selectorsFloati === void 0 ? [] : _ref2$selectorsFloati,
|
103
|
+
size = _ref2.size,
|
104
|
+
deprecated_slug = _ref2.slug,
|
105
|
+
title = _ref2.title,
|
106
|
+
verticalPosition = _ref2.verticalPosition,
|
107
|
+
launcherButtonRef = _ref2.launcherButtonRef,
|
108
|
+
rest = _objectWithoutProperties(_ref2, _excluded2);
|
96
109
|
var carbonPrefix = usePrefix();
|
97
110
|
var bcModalHeader = "".concat(carbonPrefix, "--modal-header");
|
98
111
|
var renderPortalUse = usePortalTarget(portalTargetIn);
|
@@ -104,9 +117,9 @@ var TearsheetShell = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
|
|
104
117
|
width = _useResizeObserver.width;
|
105
118
|
var prevOpen = usePreviousValue(open);
|
106
119
|
var _useFocus = useFocus(modalRef, selectorPrimaryFocus),
|
107
|
-
|
108
|
-
|
109
|
-
|
120
|
+
keyDownListener = _useFocus.keyDownListener,
|
121
|
+
claimFocus = _useFocus.claimFocus;
|
122
|
+
modalRef.current;
|
110
123
|
var descriptionRef = useRef(null);
|
111
124
|
var isOverflowing = checkHeightOverflow(descriptionRef.current);
|
112
125
|
var descriptionContent = /*#__PURE__*/React__default.createElement("span", {
|
@@ -142,18 +155,32 @@ var TearsheetShell = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
|
|
142
155
|
setPosition(newPosition);
|
143
156
|
}
|
144
157
|
useEffect(function () {
|
145
|
-
if (open
|
146
|
-
|
147
|
-
claimFocus(firstElement, modalRef, selectorPrimaryFocus);
|
158
|
+
if (open) {
|
159
|
+
claimFocus();
|
148
160
|
}
|
149
|
-
}, [
|
161
|
+
}, [open, currentStep, effectiveHasCloseIcon, claimFocus]);
|
150
162
|
useEffect(function () {
|
151
|
-
if (prevOpen && !open && launcherButtonRef) {
|
163
|
+
if (prevOpen && !open && launcherButtonRef !== null && launcherButtonRef !== void 0 && launcherButtonRef.current) {
|
152
164
|
setTimeout(function () {
|
153
|
-
launcherButtonRef.current.focus();
|
165
|
+
launcherButtonRef === null || launcherButtonRef === void 0 || launcherButtonRef.current.focus();
|
154
166
|
}, 0);
|
155
167
|
}
|
156
|
-
}, [
|
168
|
+
}, [open, prevOpen, launcherButtonRef]);
|
169
|
+
useEffect(function () {
|
170
|
+
requestAnimationFrame(function () {
|
171
|
+
var _modalRef$current;
|
172
|
+
if (open && depth === position && !(modalRef !== null && modalRef !== void 0 && (_modalRef$current = modalRef.current) !== null && _modalRef$current !== void 0 && _modalRef$current.contains(document.activeElement))) {
|
173
|
+
claimFocus();
|
174
|
+
}
|
175
|
+
});
|
176
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
177
|
+
}, [claimFocus, depth, modalRef, position]);
|
178
|
+
useEffect(function () {
|
179
|
+
var _modalRef$current2;
|
180
|
+
if (hasError && !(modalRef !== null && modalRef !== void 0 && (_modalRef$current2 = modalRef.current) !== null && _modalRef$current2 !== void 0 && _modalRef$current2.contains(document.activeElement))) {
|
181
|
+
claimFocus();
|
182
|
+
}
|
183
|
+
}, [claimFocus, hasError, modalRef]);
|
157
184
|
useEffect(function () {
|
158
185
|
var notify = function notify() {
|
159
186
|
return stack.all.forEach(function (handler) {
|
@@ -203,10 +230,10 @@ var TearsheetShell = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
|
|
203
230
|
return _defineProperty(_defineProperty({}, "--".concat(bc, "--stacking-scale-factor-single"), (width - 32) / width), "--".concat(bc, "--stacking-scale-factor-double"), (width - 64) / width);
|
204
231
|
};
|
205
232
|
if (modalRef.current) {
|
206
|
-
Object.entries(setScaleValues()).map(function (
|
207
|
-
var
|
208
|
-
key =
|
209
|
-
value =
|
233
|
+
Object.entries(setScaleValues()).map(function (_ref5) {
|
234
|
+
var _ref6 = _slicedToArray(_ref5, 2),
|
235
|
+
key = _ref6[0],
|
236
|
+
value = _ref6[1];
|
210
237
|
modalRef.current.style.setProperty(key, String(value));
|
211
238
|
});
|
212
239
|
}
|
@@ -270,7 +297,8 @@ var TearsheetShell = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
|
|
270
297
|
className: "".concat(carbonPrefix, "--modal-content ").concat(bc, "__body")
|
271
298
|
}, /*#__PURE__*/React__default.createElement(Wrap, {
|
272
299
|
className: cx(_defineProperty(_defineProperty({}, "".concat(bc, "__influencer"), true), "".concat(bc, "__influencer--wide"), influencerWidth === 'wide')),
|
273
|
-
neverRender: influencerPosition === 'right'
|
300
|
+
neverRender: influencerPosition === 'right',
|
301
|
+
element: SectionLevel3
|
274
302
|
}, influencer), /*#__PURE__*/React__default.createElement(Wrap, {
|
275
303
|
className: "".concat(bc, "__right")
|
276
304
|
}, /*#__PURE__*/React__default.createElement(Wrap, {
|
@@ -279,10 +307,12 @@ var TearsheetShell = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
|
|
279
307
|
}, /*#__PURE__*/React__default.createElement(Wrap, {
|
280
308
|
className: "".concat(bc, "__content"),
|
281
309
|
alwaysRender: !!(influencer && influencerPosition === 'right'),
|
282
|
-
tabIndex: -1
|
310
|
+
tabIndex: -1,
|
311
|
+
element: SectionLevel3
|
283
312
|
}, children), /*#__PURE__*/React__default.createElement(Wrap, {
|
284
313
|
className: cx(_defineProperty(_defineProperty({}, "".concat(bc, "__influencer"), true), "".concat(bc, "__influencer--wide"), influencerWidth === 'wide')),
|
285
|
-
neverRender: influencerPosition !== 'right'
|
314
|
+
neverRender: influencerPosition !== 'right',
|
315
|
+
element: SectionLevel3
|
286
316
|
}, influencer)), includeActions && /*#__PURE__*/React__default.createElement(Wrap, {
|
287
317
|
className: "".concat(bc, "__button-container")
|
288
318
|
}, /*#__PURE__*/React__default.createElement(ActionSet, {
|