@carbon/ibm-products 2.43.2-canary.321 → 2.43.2-canary.325
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/components/APIKeyModal/APIKeyDownloader.d.ts +3 -1
- package/es/components/APIKeyModal/APIKeyDownloader.js +9 -2
- package/es/components/APIKeyModal/APIKeyModal.js +9 -2
- package/es/components/APIKeyModal/APIKeyModal.types.d.ts +4 -0
- package/es/components/ActionSet/ActionSet.d.ts +1 -1
- package/es/components/ActionSet/ActionSet.js +2 -0
- package/es/components/AddSelect/types/index.d.ts +1 -1
- package/es/components/Checklist/Checklist.js +2 -3
- package/es/components/CreateFullPage/CreateFullPage.d.ts +5 -0
- package/es/components/CreateFullPage/CreateFullPage.js +31 -15
- package/es/components/CreateFullPage/CreateFullPageStep.d.ts +4 -0
- package/es/components/CreateFullPage/CreateFullPageStep.js +8 -2
- package/es/components/CreateInfluencer/CreateInfluencer.d.ts +9 -1
- package/es/components/CreateInfluencer/CreateInfluencer.js +8 -2
- package/es/components/CreateModal/CreateModal.d.ts +2 -2
- package/es/components/CreateModal/CreateModal.js +1 -1
- package/es/components/Datagrid/Datagrid/DatagridSelectAll.js +1 -0
- package/es/components/Datagrid/types/index.d.ts +3 -3
- package/es/components/EmptyStates/EmptyState.d.ts +1 -1
- package/es/components/EmptyStates/EmptyState.js +2 -0
- package/es/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.d.ts +1 -1
- package/es/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +2 -0
- package/es/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.d.ts +1 -1
- package/es/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +2 -0
- package/es/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.d.ts +1 -1
- package/es/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +2 -0
- package/es/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.d.ts +1 -1
- package/es/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +2 -0
- package/es/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.d.ts +1 -1
- package/es/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js +2 -0
- package/es/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.d.ts +1 -1
- package/es/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +2 -0
- package/es/components/ImportModal/ImportModal.d.ts +1 -1
- package/es/components/ImportModal/ImportModal.js +3 -8
- package/es/components/InlineTip/InlineTipButton.d.ts +1 -1
- package/es/components/PageHeader/PageHeader.d.ts +2 -2
- package/es/components/PageHeader/PageHeader.js +5 -2
- package/es/components/SearchBar/SearchBar.js +1 -1
- package/es/components/SidePanel/SidePanel.d.ts +2 -2
- package/es/components/TagOverflow/TagOverflowModal.d.ts +1 -1
- package/es/components/TagOverflow/TagOverflowPopover.d.ts +3 -1
- package/es/components/TagOverflow/TagOverflowPopover.js +1 -1
- package/es/components/TagSet/TagSetModal.d.ts +1 -1
- package/es/components/Tearsheet/Tearsheet.d.ts +5 -2
- package/es/components/Tearsheet/Tearsheet.js +1 -0
- package/es/components/Tearsheet/TearsheetNarrow.d.ts +1 -1
- package/es/components/Tearsheet/TearsheetNarrow.js +1 -0
- package/es/components/Tearsheet/TearsheetShell.d.ts +2 -3
- package/es/components/Tearsheet/TearsheetShell.js +0 -1
- package/es/components/TooltipTrigger/TooltipTrigger.d.ts +17 -15
- package/es/components/TooltipTrigger/TooltipTrigger.js +2 -2
- package/es/components/TruncatedList/TruncatedList.d.ts +1 -1
- package/es/components/UserProfileImage/UserProfileImage.d.ts +2 -2
- package/es/components/UserProfileImage/UserProfileImage.js +1 -5
- package/es/components/WebTerminal/WebTerminal.d.ts +1 -1
- package/es/components/WebTerminal/WebTerminal.js +1 -0
- package/lib/components/APIKeyModal/APIKeyDownloader.d.ts +3 -1
- package/lib/components/APIKeyModal/APIKeyDownloader.js +9 -2
- package/lib/components/APIKeyModal/APIKeyModal.js +9 -2
- package/lib/components/APIKeyModal/APIKeyModal.types.d.ts +4 -0
- package/lib/components/ActionSet/ActionSet.d.ts +1 -1
- package/lib/components/ActionSet/ActionSet.js +2 -0
- package/lib/components/AddSelect/types/index.d.ts +1 -1
- package/lib/components/Checklist/Checklist.js +2 -3
- package/lib/components/CreateFullPage/CreateFullPage.d.ts +5 -0
- package/lib/components/CreateFullPage/CreateFullPage.js +31 -15
- package/lib/components/CreateFullPage/CreateFullPageStep.d.ts +4 -0
- package/lib/components/CreateFullPage/CreateFullPageStep.js +8 -2
- package/lib/components/CreateInfluencer/CreateInfluencer.d.ts +9 -1
- package/lib/components/CreateInfluencer/CreateInfluencer.js +8 -2
- package/lib/components/CreateModal/CreateModal.d.ts +2 -2
- package/lib/components/CreateModal/CreateModal.js +1 -1
- package/lib/components/Datagrid/Datagrid/DatagridSelectAll.js +1 -0
- package/lib/components/Datagrid/types/index.d.ts +3 -3
- package/lib/components/EmptyStates/EmptyState.d.ts +1 -1
- package/lib/components/EmptyStates/EmptyState.js +2 -0
- package/lib/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.d.ts +1 -1
- package/lib/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +2 -0
- package/lib/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.d.ts +1 -1
- package/lib/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +2 -0
- package/lib/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.d.ts +1 -1
- package/lib/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +2 -0
- package/lib/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.d.ts +1 -1
- package/lib/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +2 -0
- package/lib/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.d.ts +1 -1
- package/lib/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js +2 -0
- package/lib/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.d.ts +1 -1
- package/lib/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +2 -0
- package/lib/components/ImportModal/ImportModal.d.ts +1 -1
- package/lib/components/ImportModal/ImportModal.js +3 -8
- package/lib/components/InlineTip/InlineTipButton.d.ts +1 -1
- package/lib/components/PageHeader/PageHeader.d.ts +2 -2
- package/lib/components/PageHeader/PageHeader.js +4 -1
- package/lib/components/SearchBar/SearchBar.js +1 -1
- package/lib/components/SidePanel/SidePanel.d.ts +2 -2
- package/lib/components/TagOverflow/TagOverflowModal.d.ts +1 -1
- package/lib/components/TagOverflow/TagOverflowPopover.d.ts +3 -1
- package/lib/components/TagOverflow/TagOverflowPopover.js +1 -1
- package/lib/components/TagSet/TagSetModal.d.ts +1 -1
- package/lib/components/Tearsheet/Tearsheet.d.ts +5 -2
- package/lib/components/Tearsheet/Tearsheet.js +1 -0
- package/lib/components/Tearsheet/TearsheetNarrow.d.ts +1 -1
- package/lib/components/Tearsheet/TearsheetNarrow.js +1 -0
- package/lib/components/Tearsheet/TearsheetShell.d.ts +2 -3
- package/lib/components/Tearsheet/TearsheetShell.js +0 -1
- package/lib/components/TooltipTrigger/TooltipTrigger.d.ts +17 -15
- package/lib/components/TooltipTrigger/TooltipTrigger.js +2 -2
- package/lib/components/TruncatedList/TruncatedList.d.ts +1 -1
- package/lib/components/UserProfileImage/UserProfileImage.d.ts +2 -2
- package/lib/components/UserProfileImage/UserProfileImage.js +1 -5
- package/lib/components/WebTerminal/WebTerminal.d.ts +1 -1
- package/lib/components/WebTerminal/WebTerminal.js +1 -0
- package/package.json +2 -2
@@ -18,14 +18,9 @@ import uuidv4 from '../../global/js/utils/uuidv4.js';
|
|
18
18
|
|
19
19
|
var _excluded = ["accept", "className", "defaultErrorBody", "defaultErrorHeader", "description", "fetchErrorBody", "fetchErrorHeader", "fileDropHeader", "fileDropLabel", "fileUploadLabel", "inputButtonIcon", "inputButtonText", "inputId", "inputLabel", "inputPlaceholder", "invalidFileTypeErrorBody", "invalidFileTypeErrorHeader", "invalidIconDescription", "maxFileSize", "maxFileSizeErrorBody", "maxFileSizeErrorHeader", "onClose", "onRequestSubmit", "open", "portalTarget", "primaryButtonText", "secondaryButtonText", "title"];
|
20
20
|
var componentName = 'ImportModal';
|
21
|
-
|
22
|
-
// Default values for props
|
23
|
-
var defaults = {
|
24
|
-
accept: Object.freeze([])
|
25
|
-
};
|
26
21
|
var ImportModal = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
27
22
|
var _ref$accept = _ref.accept,
|
28
|
-
accept = _ref$accept === void 0 ?
|
23
|
+
accept = _ref$accept === void 0 ? [] : _ref$accept,
|
29
24
|
className = _ref.className,
|
30
25
|
defaultErrorBody = _ref.defaultErrorBody,
|
31
26
|
defaultErrorHeader = _ref.defaultErrorHeader,
|
@@ -222,7 +217,7 @@ var ImportModal = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
222
217
|
className: "".concat(blockClass, "__input-group")
|
223
218
|
}, /*#__PURE__*/React__default.createElement(TextInput, {
|
224
219
|
labelText: "",
|
225
|
-
id: inputId,
|
220
|
+
id: inputId || '',
|
226
221
|
onChange: inputHandler,
|
227
222
|
placeholder: inputPlaceholder,
|
228
223
|
value: importUrl,
|
@@ -237,7 +232,7 @@ var ImportModal = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
237
232
|
return /*#__PURE__*/React__default.createElement(Add, _extends({
|
238
233
|
size: 20
|
239
234
|
}, props));
|
240
|
-
} :
|
235
|
+
} : undefined
|
241
236
|
}, inputButtonText)), /*#__PURE__*/React__default.createElement("div", {
|
242
237
|
className: "".concat(carbonPrefix, "--file-container ").concat(blockClass, "__file-container")
|
243
238
|
}, hasFiles && /*#__PURE__*/React__default.createElement("p", {
|
@@ -20,4 +20,4 @@ export interface InlineTipButtonProps {
|
|
20
20
|
*/
|
21
21
|
export declare let InlineTipButton: React.ForwardRefExoticComponent<InlineTipButtonProps & {
|
22
22
|
children?: React.ReactNode;
|
23
|
-
} & React.RefAttributes<
|
23
|
+
} & React.RefAttributes<ButtonProps<React.ElementType<any, keyof React.JSX.IntrinsicElements>>>>;
|
@@ -122,7 +122,7 @@ type PageActionProps = {
|
|
122
122
|
* - maxWidth: maximum number of pixels the content will grow to
|
123
123
|
* Carbon Button API https://react.carbondesignsystem.com/?path=/docs/components-button--default#component-api
|
124
124
|
*/
|
125
|
-
pageActions: ButtonProps[] | PageAction;
|
125
|
+
pageActions: ButtonProps<React.ElementType>[] | PageAction;
|
126
126
|
/**
|
127
127
|
* When there is insufficient space to display all of hte page actions inline a dropdown button menu is shown,
|
128
128
|
* containing the page actions. This label is used as the display content of the dropdown button menu.
|
@@ -225,7 +225,7 @@ interface PageHeaderBaseProps extends PropsWithChildren {
|
|
225
225
|
* Content for the navigation area in the PageHeader. Should
|
226
226
|
* be a React element that is normally a Carbon Tabs component. Optional.
|
227
227
|
*/
|
228
|
-
navigation?:
|
228
|
+
navigation?: ReactNode;
|
229
229
|
/**
|
230
230
|
* class name applied to the page actions overflow options
|
231
231
|
*/
|
@@ -9,7 +9,7 @@ import { objectSpread2 as _objectSpread2, objectWithoutProperties as _objectWith
|
|
9
9
|
import { Button, Tooltip, Tag, usePrefix, FlexGrid, Row, Column } from '@carbon/react';
|
10
10
|
import React__default, { useState, useRef, useEffect } from 'react';
|
11
11
|
import { string_required_if_more_than_10_tags, TagSet } from '../TagSet/TagSet.js';
|
12
|
-
import {
|
12
|
+
import { spacing, baseFontSize, breakpoints } from '@carbon/layout';
|
13
13
|
import { blockClass, utilSetCollapsed, utilGetBreadcrumbItemForTitle, utilCheckUpdateVerticalSpace } from './PageHeaderUtils.js';
|
14
14
|
import { deprecateProp, prepareProps } from '../../global/js/utils/props-helper.js';
|
15
15
|
import { ChevronUp } from '@carbon/react/icons';
|
@@ -306,7 +306,7 @@ var PageHeader = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
306
306
|
// Determines the appropriate header background opacity based on the header config/height/scroll and the withoutBackground setting
|
307
307
|
var result = withoutBackground ? 0 : 1;
|
308
308
|
if (!result && metrics !== null && metrics !== void 0 && metrics.headerHeight && metrics.headerHeight > 0 && (breadcrumbs || actionBarItems || tags || navigation)) {
|
309
|
-
var startAddingAt = parseFloat(
|
309
|
+
var startAddingAt = parseFloat("".concat(spacing[9])) * parseInt("".concat(baseFontSize));
|
310
310
|
var scrollRemaining = metrics.headerHeight - scrollYValue;
|
311
311
|
|
312
312
|
/* don't know how to test resize */
|
@@ -532,7 +532,9 @@ PageHeader.propTypes = _objectSpread2({
|
|
532
532
|
/**@ts-ignore */
|
533
533
|
actionBarItems: PropTypes.arrayOf(PropTypes.shape(_objectSpread2(_objectSpread2({}, prepareProps(Button.propTypes, ['kind', 'size', 'tooltipPosition', 'tooltipAlignment'])), {}, {
|
534
534
|
iconDescription: PropTypes.string.isRequired,
|
535
|
+
/**@ts-ignore*/
|
535
536
|
onClick: Button.propTypes.onClick,
|
537
|
+
/**@ts-ignore*/
|
536
538
|
renderIcon: Button.propTypes.renderIcon.isRequired
|
537
539
|
}))),
|
538
540
|
/**
|
@@ -715,6 +717,7 @@ PageHeader.propTypes = _objectSpread2({
|
|
715
717
|
/**@ts-ignore */
|
716
718
|
pageActions: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.shape(_objectSpread2(_objectSpread2({}, Button.propTypes), {}, {
|
717
719
|
key: PropTypes.string.isRequired,
|
720
|
+
/**@ts-ignore*/
|
718
721
|
kind: Button.propTypes.kind,
|
719
722
|
label: PropTypes.node,
|
720
723
|
onClick: PropTypes.func
|
@@ -136,7 +136,7 @@ var SearchBar = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
136
136
|
className: "".concat(blockClass, "__input"),
|
137
137
|
closeButtonLabelText: clearButtonLabelText,
|
138
138
|
labelText: labelText,
|
139
|
-
name:
|
139
|
+
name: 'search-input',
|
140
140
|
onChange: handleInputChange,
|
141
141
|
placeholder: placeholderText,
|
142
142
|
value: text,
|
@@ -11,7 +11,7 @@ type SidePanelBaseProps = {
|
|
11
11
|
/**
|
12
12
|
* Sets the action toolbar buttons
|
13
13
|
*/
|
14
|
-
actionToolbarButtons?: ButtonProps<
|
14
|
+
actionToolbarButtons?: ButtonProps<React.ElementType>[];
|
15
15
|
/**
|
16
16
|
* The primary actions to be shown in the side panel. Each action is
|
17
17
|
* specified as an object that will render expressive Buttons. Any Button
|
@@ -20,7 +20,7 @@ type SidePanelBaseProps = {
|
|
20
20
|
*
|
21
21
|
* See https://react.carbondesignsystem.com/?path=/docs/components-button--default#component-api
|
22
22
|
*/
|
23
|
-
actions?: ButtonProps<
|
23
|
+
actions?: ButtonProps<React.ElementType>[];
|
24
24
|
/**
|
25
25
|
* Determines if the title will animate on scroll
|
26
26
|
*/
|
@@ -5,7 +5,7 @@ import { Tag } from '@carbon/react';
|
|
5
5
|
interface TagType {
|
6
6
|
label: string;
|
7
7
|
}
|
8
|
-
type AllTags = (TagType & Omit<React.ComponentProps<Tag>, 'filter'>)[];
|
8
|
+
type AllTags = (TagType & Omit<React.ComponentProps<typeof Tag>, 'filter'>)[];
|
9
9
|
interface TagOverflowModalProps {
|
10
10
|
allTags?: AllTags;
|
11
11
|
className?: string;
|
@@ -1,11 +1,13 @@
|
|
1
|
+
/// <reference path="../../../src/custom-typings/index.d.ts" />
|
1
2
|
import React from 'react';
|
3
|
+
import { PopoverAlignment } from '@carbon/react';
|
2
4
|
import { TagOverflowItem } from './TagOverflow';
|
3
5
|
export interface Props {
|
4
6
|
allTagsModalSearchThreshold?: number;
|
5
7
|
autoAlign?: boolean;
|
6
8
|
className?: string;
|
7
9
|
onShowAllClick: () => void;
|
8
|
-
overflowAlign?:
|
10
|
+
overflowAlign?: PopoverAlignment;
|
9
11
|
overflowTags: TagOverflowItem[];
|
10
12
|
overflowType?: string;
|
11
13
|
popoverOpen?: boolean;
|
@@ -68,7 +68,7 @@ var TagOverflowPopover = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
68
68
|
dropShadow: true,
|
69
69
|
highContrast: true,
|
70
70
|
onKeyDown: handleEscKeyPress,
|
71
|
-
open: popoverOpen
|
71
|
+
open: popoverOpen || false
|
72
72
|
}, /*#__PURE__*/React__default.createElement(OperationalTag, {
|
73
73
|
onClick: function onClick() {
|
74
74
|
return setPopoverOpen === null || setPopoverOpen === void 0 ? void 0 : setPopoverOpen(!popoverOpen);
|
@@ -5,7 +5,7 @@ import { Tag } from '@carbon/react';
|
|
5
5
|
interface TagType {
|
6
6
|
label: string;
|
7
7
|
}
|
8
|
-
type AllTags = TagType[] & Omit<React.ComponentProps<Tag>, 'filter'>[];
|
8
|
+
type AllTags = TagType[] & Omit<React.ComponentProps<typeof Tag>, 'filter'>[];
|
9
9
|
interface TagSetModalProps {
|
10
10
|
allTags?: AllTags;
|
11
11
|
className?: string;
|
@@ -5,7 +5,7 @@
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
6
6
|
*/
|
7
7
|
/// <reference path="../../../src/custom-typings/index.d.ts" />
|
8
|
-
import { ButtonProps } from '@carbon/react';
|
8
|
+
import { type ButtonProps } from '@carbon/react';
|
9
9
|
import React, { PropsWithChildren, ReactNode } from 'react';
|
10
10
|
import PropTypes from 'prop-types';
|
11
11
|
/**
|
@@ -21,6 +21,9 @@ export type CloseIconDescriptionTypes = {
|
|
21
21
|
hasCloseIcon: true;
|
22
22
|
closeIconDescription: string;
|
23
23
|
};
|
24
|
+
export interface TearsheetAction extends ButtonProps<'button'> {
|
25
|
+
label?: string;
|
26
|
+
}
|
24
27
|
export interface TearsheetProps extends PropsWithChildren {
|
25
28
|
/**
|
26
29
|
* The navigation actions to be shown as buttons in the action area at the
|
@@ -35,7 +38,7 @@ export interface TearsheetProps extends PropsWithChildren {
|
|
35
38
|
*
|
36
39
|
* See https://react.carbondesignsystem.com/?path=/docs/components-button--default#component-api
|
37
40
|
*/
|
38
|
-
actions?:
|
41
|
+
actions?: TearsheetAction[];
|
39
42
|
/**
|
40
43
|
* The aria-label for the tearsheet, which is optional.
|
41
44
|
* if it is not passed, the title will be used as the aria-label.
|
@@ -23,7 +23,7 @@ interface TearsheetNarrowBaseProps extends PropsWithChildren {
|
|
23
23
|
*
|
24
24
|
* See https://react.carbondesignsystem.com/?path=/docs/components-button--default#component-api
|
25
25
|
*/
|
26
|
-
actions?: ButtonProps<
|
26
|
+
actions?: ButtonProps<React.ElementType>[];
|
27
27
|
/**
|
28
28
|
* The aria-label for the tearsheet, which is optional.
|
29
29
|
* if it is not passed, the title will be used as the aria-label.
|
@@ -4,12 +4,11 @@
|
|
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
|
-
/// <reference path="../../../src/custom-typings/index.d.ts" />
|
8
7
|
import React, { PropsWithChildren, ReactNode, RefObject } from 'react';
|
9
8
|
import PropTypes from 'prop-types';
|
10
|
-
import {
|
9
|
+
import { TearsheetAction } from './Tearsheet';
|
11
10
|
interface TearsheetShellProps extends PropsWithChildren {
|
12
|
-
actions?:
|
11
|
+
actions?: TearsheetAction[];
|
13
12
|
/**
|
14
13
|
* Optional prop that is intended for any scenario where something is being generated by AI to reinforce AI transparency,
|
15
14
|
* accountability, and explainability at the UI level.
|
@@ -22,7 +22,6 @@ import { useFocus, getSpecificElement } from '../../global/js/hooks/useFocus.js'
|
|
22
22
|
import { usePreviousValue } from '../../global/js/hooks/usePreviousValue.js';
|
23
23
|
|
24
24
|
var _excluded = ["actions", "aiLabel", "ariaLabel", "children", "className", "closeIconDescription", "description", "hasCloseIcon", "headerActions", "influencer", "influencerPosition", "influencerWidth", "label", "navigation", "onClose", "open", "portalTarget", "selectorPrimaryFocus", "selectorsFloatingMenus", "size", "slug", "title", "verticalPosition", "launcherButtonRef"];
|
25
|
-
|
26
25
|
// The block part of our conventional BEM class names (bc__E--M).
|
27
26
|
var bc = "".concat(pkg.prefix, "--tearsheet");
|
28
27
|
var componentName = 'TearsheetShell';
|
@@ -1,16 +1,18 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
1
|
+
/**
|
2
|
+
* Copyright IBM Corp. 2023, 2023
|
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, { PropsWithChildren } from 'react';
|
8
|
+
export interface TooltipTriggerProps extends PropsWithChildren {
|
9
|
+
/**
|
10
|
+
* Provide an optional class to be applied to the containing node.
|
11
|
+
*/
|
12
|
+
className?: string;
|
12
13
|
}
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
14
|
+
/**
|
15
|
+
* This is an tooltip trigger as Carbon Tooltip requires an active element to work but provides
|
16
|
+
* no blanked button.
|
17
|
+
*/
|
18
|
+
export declare let TooltipTrigger: React.ForwardRefExoticComponent<TooltipTriggerProps & React.RefAttributes<HTMLDivElement>>;
|
@@ -23,7 +23,7 @@ var componentName = 'TooltipTrigger';
|
|
23
23
|
* This is an tooltip trigger as Carbon Tooltip requires an active element to work but provides
|
24
24
|
* no blanked button.
|
25
25
|
*/
|
26
|
-
var TooltipTrigger = function
|
26
|
+
var TooltipTrigger = /*#__PURE__*/React__default.forwardRef(function (_ref) {
|
27
27
|
var children = _ref.children,
|
28
28
|
className = _ref.className,
|
29
29
|
rest = _objectWithoutProperties(_ref, _excluded);
|
@@ -35,7 +35,7 @@ var TooltipTrigger = function TooltipTrigger(_ref) {
|
|
35
35
|
className // Apply any supplied class names to the main HTML element.
|
36
36
|
)
|
37
37
|
}), children);
|
38
|
-
};
|
38
|
+
});
|
39
39
|
|
40
40
|
// Return a placeholder if not released and not enabled by feature flag.
|
41
41
|
TooltipTrigger = pkg.checkComponentEnabled(TooltipTrigger, componentName);
|
@@ -41,7 +41,7 @@ export interface TruncatedListProps extends PropsWithChildren {
|
|
41
41
|
/**
|
42
42
|
* Callback function for building the label when the list is collapsed.
|
43
43
|
*/
|
44
|
-
viewMoreLabel?: (value: any) =>
|
44
|
+
viewMoreLabel?: (value: any) => ReactNode;
|
45
45
|
}
|
46
46
|
/**
|
47
47
|
* The `TruncatedList` allows consumers to control how many items are
|
@@ -6,8 +6,8 @@
|
|
6
6
|
*/
|
7
7
|
/// <reference path="../../../src/custom-typings/index.d.ts" />
|
8
8
|
import '../../global/js/utils/props-helper';
|
9
|
+
import { PopoverAlignment } from '@carbon/react';
|
9
10
|
import { CarbonIconType } from '@carbon/icons-react/lib/CarbonIcon';
|
10
|
-
import { IconButton } from '@carbon/react';
|
11
11
|
import React from 'react';
|
12
12
|
type imageProps = {
|
13
13
|
/**
|
@@ -55,7 +55,7 @@ type UserProfileImageBaseProps = {
|
|
55
55
|
/**
|
56
56
|
* Specify how the trigger should align with the tooltip
|
57
57
|
*/
|
58
|
-
tooltipAlignment?:
|
58
|
+
tooltipAlignment?: PopoverAlignment;
|
59
59
|
/**
|
60
60
|
* Pass in the display name to have it shown on hover
|
61
61
|
*/
|
@@ -24,10 +24,6 @@ var componentName = 'UserProfileImage';
|
|
24
24
|
|
25
25
|
// NOTE: the component SCSS is not imported here: it is rolled up separately.
|
26
26
|
|
27
|
-
// Default values for props
|
28
|
-
var defaults = {
|
29
|
-
tooltipAlignment: 'bottom'
|
30
|
-
};
|
31
27
|
/**
|
32
28
|
* The user profile avatar allows for an image of the user to be displayed by passing in the image prop. By default the component will display a user icon on a blue background.
|
33
29
|
*/
|
@@ -44,7 +40,7 @@ var UserProfileImage = /*#__PURE__*/React__default.forwardRef(function (_ref, re
|
|
44
40
|
theme = _ref.theme,
|
45
41
|
tooltipText = _ref.tooltipText,
|
46
42
|
_ref$tooltipAlignment = _ref.tooltipAlignment,
|
47
|
-
tooltipAlignment = _ref$tooltipAlignment === void 0 ?
|
43
|
+
tooltipAlignment = _ref$tooltipAlignment === void 0 ? 'bottom' : _ref$tooltipAlignment,
|
48
44
|
rest = _objectWithoutProperties(_ref, _excluded);
|
49
45
|
var carbonPrefix = usePrefix();
|
50
46
|
var icons = {
|
@@ -190,6 +190,7 @@ WebTerminal.propTypes = {
|
|
190
190
|
/**
|
191
191
|
* Array of objects for each documentation link. Each documentation link uses the prop types of OverflowMenuItems. See more: https://react.carbondesignsystem.com/?path=/docs/components-overflowmenu--default
|
192
192
|
*/
|
193
|
+
/**@ts-ignore */
|
193
194
|
documentationLinks: PropTypes.arrayOf(PropTypes.shape(_objectSpread2({}, OverflowMenuItem.propTypes))),
|
194
195
|
/**
|
195
196
|
* Description for the documentation link overflow menu tooltip
|
@@ -1,15 +1,17 @@
|
|
1
|
-
export function APIKeyDownloader({ apiKey, body, fileName, fileType, linkText, }: {
|
1
|
+
export function APIKeyDownloader({ apiKey, body, fileName, fileType, linkText, downloadLinkLabel, }: {
|
2
2
|
apiKey: any;
|
3
3
|
body: any;
|
4
4
|
fileName: any;
|
5
5
|
fileType: any;
|
6
6
|
linkText: any;
|
7
|
+
downloadLinkLabel: any;
|
7
8
|
}): React.JSX.Element;
|
8
9
|
export namespace APIKeyDownloader {
|
9
10
|
export { componentName as displayName };
|
10
11
|
export namespace propTypes {
|
11
12
|
let apiKey: PropTypes.Validator<string>;
|
12
13
|
let body: PropTypes.Validator<string>;
|
14
|
+
let downloadLinkLabel: PropTypes.Requireable<string>;
|
13
15
|
let fileName: PropTypes.Validator<string>;
|
14
16
|
let fileType: PropTypes.Validator<string>;
|
15
17
|
let linkText: PropTypes.Validator<string>;
|
@@ -18,7 +18,8 @@ var APIKeyDownloader = function APIKeyDownloader(_ref) {
|
|
18
18
|
body = _ref.body,
|
19
19
|
fileName = _ref.fileName,
|
20
20
|
fileType = _ref.fileType,
|
21
|
-
linkText = _ref.linkText
|
21
|
+
linkText = _ref.linkText,
|
22
|
+
downloadLinkLabel = _ref.downloadLinkLabel;
|
22
23
|
var _useState = React.useState({}),
|
23
24
|
_useState2 = _rollupPluginBabelHelpers.slicedToArray(_useState, 2),
|
24
25
|
linkProps = _useState2[0],
|
@@ -63,7 +64,9 @@ var APIKeyDownloader = function APIKeyDownloader(_ref) {
|
|
63
64
|
}, /*#__PURE__*/React.createElement("p", {
|
64
65
|
className: "".concat(settings.pkg.prefix, "--apikey-modal__messaging-text")
|
65
66
|
}, body, ' ', /*#__PURE__*/React.createElement("a", _rollupPluginBabelHelpers.extends({}, linkProps, {
|
66
|
-
className: "".concat(settings.pkg.prefix, "--apikey-modal__download-link")
|
67
|
+
className: "".concat(settings.pkg.prefix, "--apikey-modal__download-link"),
|
68
|
+
"aria-label": downloadLinkLabel !== null && downloadLinkLabel !== void 0 ? downloadLinkLabel : linkText,
|
69
|
+
role: "button"
|
67
70
|
}), linkText)));
|
68
71
|
};
|
69
72
|
APIKeyDownloader.displayName = componentName;
|
@@ -76,6 +79,10 @@ APIKeyDownloader.propTypes = {
|
|
76
79
|
* body content for the downloader
|
77
80
|
*/
|
78
81
|
body: index.default.string.isRequired,
|
82
|
+
/**
|
83
|
+
* aria-label for the download link
|
84
|
+
*/
|
85
|
+
downloadLinkLabel: index.default.string,
|
79
86
|
/**
|
80
87
|
* designates the name of downloadable json file with the key. if not specified will default to 'apikey'
|
81
88
|
*/
|
@@ -21,7 +21,7 @@ var propsHelper = require('../../global/js/utils/props-helper.js');
|
|
21
21
|
var uuidv4 = require('../../global/js/utils/uuidv4.js');
|
22
22
|
|
23
23
|
var _ErrorFilled, _InformationFilled;
|
24
|
-
var _excluded = ["apiKey", "apiKeyLabel", "apiKeyName", "body", "className", "closeButtonText", "copyButtonText", "copyErrorText", "copyIconDescription", "customSteps", "downloadBodyText", "downloadFileName", "downloadFileType", "downloadLinkText", "editButtonText", "editSuccess", "editSuccessTitle", "editing", "error", "errorText", "generateButtonText", "generateSuccessBody", "generateSuccessTitle", "generateTitle", "hasAPIKeyVisibilityToggle", "hasDownloadLink", "hideAPIKeyLabel", "loading", "loadingText", "modalLabel", "nameHelperText", "nameLabel", "namePlaceholder", "nameRequired", "nextStepButtonText", "onClose", "onCopy", "onRequestEdit", "onRequestGenerate", "open", "portalTarget", "previousStepButtonText", "showAPIKeyLabel"];
|
24
|
+
var _excluded = ["apiKey", "apiKeyLabel", "apiKeyName", "body", "className", "closeButtonText", "copyButtonText", "copyErrorText", "copyIconDescription", "customSteps", "downloadBodyText", "downloadFileName", "downloadFileType", "downloadLinkText", "downloadLinkLabel", "editButtonText", "editSuccess", "editSuccessTitle", "editing", "error", "errorText", "generateButtonText", "generateSuccessBody", "generateSuccessTitle", "generateTitle", "hasAPIKeyVisibilityToggle", "hasDownloadLink", "hideAPIKeyLabel", "loading", "loadingText", "modalLabel", "nameHelperText", "nameLabel", "namePlaceholder", "nameRequired", "nextStepButtonText", "onClose", "onCopy", "onRequestEdit", "onRequestGenerate", "open", "portalTarget", "previousStepButtonText", "showAPIKeyLabel"];
|
25
25
|
var componentName = 'APIKeyModal';
|
26
26
|
|
27
27
|
// Default values for props
|
@@ -47,6 +47,8 @@ exports.APIKeyModal = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
47
47
|
downloadFileName = _ref.downloadFileName,
|
48
48
|
downloadFileType = _ref.downloadFileType,
|
49
49
|
downloadLinkText = _ref.downloadLinkText,
|
50
|
+
_ref$downloadLinkLabe = _ref.downloadLinkLabel,
|
51
|
+
downloadLinkLabel = _ref$downloadLinkLabe === void 0 ? downloadLinkText : _ref$downloadLinkLabe,
|
50
52
|
editButtonText = _ref.editButtonText,
|
51
53
|
editSuccess = _ref.editSuccess,
|
52
54
|
editSuccessTitle = _ref.editSuccessTitle,
|
@@ -291,7 +293,8 @@ exports.APIKeyModal = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
291
293
|
body: downloadBodyText,
|
292
294
|
fileName: downloadFileName,
|
293
295
|
linkText: downloadLinkText,
|
294
|
-
fileType: downloadFileType
|
296
|
+
fileType: downloadFileType,
|
297
|
+
downloadLinkLabel: downloadLinkLabel
|
295
298
|
}) : /*#__PURE__*/React.createElement("div", {
|
296
299
|
className: "".concat(blockClass, "__messaging-text")
|
297
300
|
}, generateSuccessBody)))), /*#__PURE__*/React.createElement(react.ModalFooter, {
|
@@ -395,6 +398,10 @@ exports.APIKeyModal.propTypes = {
|
|
395
398
|
* designates the file type for the downloadable key
|
396
399
|
*/
|
397
400
|
downloadFileType: downloadRequiredProps(index.default.oneOf(['txt', 'json'])),
|
401
|
+
/**
|
402
|
+
* aria-label for the download link
|
403
|
+
*/
|
404
|
+
downloadLinkLabel: downloadRequiredProps(index.default.string),
|
398
405
|
/**
|
399
406
|
* anchor text for the download link
|
400
407
|
*/
|
@@ -207,6 +207,10 @@ type HasDownloadLinkProps = {
|
|
207
207
|
* anchor text for the download link
|
208
208
|
*/
|
209
209
|
downloadLinkText: string;
|
210
|
+
/**
|
211
|
+
* Aria-label for the download link
|
212
|
+
*/
|
213
|
+
downloadLinkLabel?: string;
|
210
214
|
};
|
211
215
|
export type APIKeyModalProps = APIKeyModalCommonProps & CustomStepConditionalProps & EditingConditionalProps & HasDownloadLinkProps;
|
212
216
|
export {};
|
@@ -16,7 +16,7 @@ export interface ActionSetProps {
|
|
16
16
|
*
|
17
17
|
* See https://react.carbondesignsystem.com/?path=/docs/components-button--default#component-api
|
18
18
|
*/
|
19
|
-
actions: ButtonProps[];
|
19
|
+
actions: ButtonProps<React.ElementType>[];
|
20
20
|
/**
|
21
21
|
* The size of buttons to use for the actions. The allowed values are
|
22
22
|
* those for the size prop of carbon Button. If this prop is specified, all
|
@@ -172,6 +172,7 @@ ActionSet.propTypes = {
|
|
172
172
|
label: index.default.string,
|
173
173
|
loading: index.default.bool,
|
174
174
|
// we duplicate this Button prop to improve the DocGen here
|
175
|
+
/**@ts-ignore*/
|
175
176
|
onClick: react.Button.propTypes.onClick
|
176
177
|
})))]),
|
177
178
|
/**
|
@@ -180,6 +181,7 @@ ActionSet.propTypes = {
|
|
180
181
|
* the buttons will be set to this size, overriding any 'size' values (if any)
|
181
182
|
* supplied in the actions array (if any).
|
182
183
|
*/
|
184
|
+
/**@ts-ignore*/
|
183
185
|
buttonSize: react.Button.propTypes.size,
|
184
186
|
/**
|
185
187
|
* An optional class or classes to be added to the outermost element.
|
@@ -47,8 +47,7 @@ var defaults = {
|
|
47
47
|
enableToggle: true,
|
48
48
|
taskLists: [],
|
49
49
|
theme: Checklist_types.Themes.light,
|
50
|
-
toggleLabel: 'Toggle'
|
51
|
-
toggleLabelAlign: 'top'
|
50
|
+
toggleLabel: 'Toggle'
|
52
51
|
};
|
53
52
|
|
54
53
|
/**
|
@@ -81,7 +80,7 @@ exports.Checklist = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
81
80
|
_ref$toggleLabel = _ref.toggleLabel,
|
82
81
|
toggleLabel = _ref$toggleLabel === void 0 ? defaults.toggleLabel : _ref$toggleLabel,
|
83
82
|
_ref$toggleLabelAlign = _ref.toggleLabelAlign,
|
84
|
-
toggleLabelAlign = _ref$toggleLabelAlign === void 0 ?
|
83
|
+
toggleLabelAlign = _ref$toggleLabelAlign === void 0 ? 'top' : _ref$toggleLabelAlign,
|
85
84
|
viewAllLabel = _ref.viewAllLabel,
|
86
85
|
rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
|
87
86
|
var _useState = React.useState(open),
|
@@ -90,6 +90,11 @@ type CreateFullPageBaseProps = {
|
|
90
90
|
* A prop to omit the trailing slash for the breadcrumbs
|
91
91
|
*/
|
92
92
|
noTrailingSlash?: boolean;
|
93
|
+
/**
|
94
|
+
* onChange event for Progress Indicator in the Influencer
|
95
|
+
* @param data step index
|
96
|
+
*/
|
97
|
+
onClickInfluencerStep?: (data: number) => void;
|
93
98
|
/**
|
94
99
|
* An optional handler that is called when the user closes the full page (by
|
95
100
|
* clicking the secondary button, located in the modal, which triggers after
|