@carbon/ibm-products 2.43.2-canary.304 → 2.43.2-canary.306
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 +12 -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 +12 -6
- 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 +12 -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 +12 -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/APIKeyModal/APIKeyDownloader.d.ts +2 -1
- package/es/components/ActionBar/ActionBarOverflowItems.d.ts +2 -2
- package/es/components/AddSelect/AddSelectBreadcrumbs.d.ts +2 -1
- package/es/components/AddSelect/AddSelectColumn.d.ts +2 -1
- package/es/components/AddSelect/AddSelectFilter.d.ts +2 -1
- package/es/components/AddSelect/AddSelectFilter.js +5 -5
- package/es/components/AddSelect/AddSelectFormControl.d.ts +2 -1
- package/es/components/AddSelect/AddSelectList.d.ts +2 -1
- package/es/components/AddSelect/AddSelectMetaPanel.d.ts +2 -1
- package/es/components/AddSelect/AddSelectRow.d.ts +2 -1
- package/es/components/AddSelect/AddSelectSidebar.d.ts +2 -1
- package/es/components/AddSelect/AddSelectSort.d.ts +2 -1
- package/es/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.d.ts +2 -1
- package/es/components/ButtonSetWithOverflow/ButtonSetWithOverflow.d.ts +2 -1
- package/es/components/Card/Card.d.ts +5 -1
- package/es/components/Card/Card.js +9 -2
- package/es/components/Card/CardFooter.d.ts +1 -1
- package/es/components/Card/CardHeader.d.ts +12 -2
- package/es/components/Card/CardHeader.js +17 -9
- package/es/components/ComboButton/ComboButtonItem/index.d.ts +2 -1
- package/es/components/ConditionBuilder/ConditionBlock/ConditionBlock.d.ts +1 -1
- package/es/components/ConditionBuilder/ConditionBuilderActions/ConditionBuilderActions.d.ts +2 -1
- package/es/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.d.ts +2 -1
- package/es/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.d.ts +1 -1
- package/es/components/ConditionBuilder/ConditionBuilderConnector/ConditionConnector.d.ts +2 -1
- package/es/components/ConditionBuilder/ConditionBuilderConnector/GroupConnector.d.ts +2 -1
- package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.d.ts +2 -1
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.d.ts +1 -1
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemDate/ConditionBuilderItemDate.d.ts +2 -1
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemNumber/ConditionBuilderItemNumber.d.ts +2 -1
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.d.ts +2 -1
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOptionForValueField.d.ts +2 -1
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemText/ConditionBuilderItemText.d.ts +2 -1
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemTime/ConditionBuilderItemTime.d.ts +2 -1
- package/es/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.d.ts +2 -1
- package/es/components/ConditionBuilder/ConditionPreview/ConditionPreview.d.ts +2 -1
- package/es/components/CreateInfluencer/CreateInfluencer.d.ts +2 -2
- package/es/components/Datagrid/Datagrid/DatagridBody.d.ts +2 -1
- package/es/components/Datagrid/Datagrid/DatagridContent.d.ts +2 -1
- package/es/components/Datagrid/Datagrid/DatagridEmptyBody.d.ts +2 -1
- package/es/components/Datagrid/Datagrid/DatagridExpandedRow.d.ts +2 -2
- package/es/components/Datagrid/Datagrid/DatagridHead.d.ts +2 -1
- package/es/components/Datagrid/Datagrid/DatagridRefBody.d.ts +2 -1
- package/es/components/Datagrid/Datagrid/DatagridRow.d.ts +2 -1
- package/es/components/Datagrid/Datagrid/DatagridSelectAll.d.ts +2 -1
- package/es/components/Datagrid/Datagrid/DatagridSelectAllWithToggle.d.ts +2 -1
- package/es/components/Datagrid/Datagrid/DatagridSimpleBody.d.ts +2 -1
- package/es/components/Datagrid/Datagrid/DatagridToolbar.d.ts +2 -1
- package/es/components/Datagrid/Datagrid/DatagridVirtualBody.d.ts +2 -1
- package/es/components/Datagrid/Datagrid/DraggableElement.d.ts +2 -2
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/Actions.d.ts +2 -1
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/ButtonWrapper.d.ts +2 -1
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.d.ts +2 -1
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.d.ts +2 -1
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/DraggableItemsList.d.ts +2 -1
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/TearsheetWrapper.d.ts +2 -1
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.d.ts +2 -1
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.d.ts +2 -1
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterProvider.d.ts +1 -1
- package/es/components/Datagrid/Datagrid/addons/Filtering/OverflowCheckboxes.d.ts +2 -1
- package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.d.ts +1 -1
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditButton/InlineEditButton.d.ts +2 -1
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.d.ts +2 -1
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditContext/InlineEditContext.d.ts +1 -1
- package/es/components/Datagrid/Datagrid/addons/RowSize/RowSizeDropdown.d.ts +2 -1
- package/es/components/EmptyStates/EmptyStateContent.d.ts +2 -1
- package/es/components/EmptyStates/EmptyStateIllustration.d.ts +2 -1
- package/es/components/EmptyStates/assets/ErrorIllustration.d.ts +2 -1
- package/es/components/EmptyStates/assets/NoDataIllustration.d.ts +2 -1
- package/es/components/EmptyStates/assets/NoTagsIllustration.d.ts +2 -1
- package/es/components/EmptyStates/assets/NotFoundIllustration.d.ts +2 -1
- package/es/components/EmptyStates/assets/NotificationsIllustration.d.ts +2 -1
- package/es/components/EmptyStates/assets/UnauthorizedIllustration.d.ts +2 -1
- package/es/components/ExpressiveCard/ExpressiveCard.d.ts +5 -0
- package/es/components/ExpressiveCard/ExpressiveCard.js +5 -0
- package/es/components/FeatureFlags/index.d.ts +1 -1
- package/es/components/FullPageError/assets/Error403SVG.d.ts +2 -1
- package/es/components/FullPageError/assets/Error404SVG.d.ts +2 -1
- package/es/components/FullPageError/assets/ErrorGenericSVG.d.ts +2 -1
- package/es/components/HTTPErrors/HTTPErrorContent.d.ts +2 -1
- package/es/components/HTTPErrors/assets/HTTPErrorSvg403.d.ts +2 -1
- package/es/components/HTTPErrors/assets/HTTPErrorSvg404.d.ts +2 -1
- package/es/components/HTTPErrors/assets/HTTPErrorSvgOther.d.ts +2 -1
- package/es/components/Nav/NavItem.d.ts +2 -1
- package/es/components/PageHeader/PageHeaderTitle.d.ts +2 -1
- package/es/components/ProductiveCard/ProductiveCard.d.ts +5 -0
- package/es/components/ProductiveCard/ProductiveCard.js +4 -0
- package/es/components/SimpleHeader/SimpleHeader.d.ts +2 -1
- package/es/components/TagOverflow/TagOverflow.d.ts +3 -0
- package/es/components/TagOverflow/TagOverflow.js +9 -4
- package/es/components/TagOverflow/TagOverflowModal.d.ts +6 -1
- package/es/components/TagOverflow/TagOverflowModal.js +17 -6
- package/es/components/TagOverflow/TagOverflowPopover.js +17 -9
- package/es/components/TagSet/TagSet.d.ts +4 -0
- package/es/components/TagSet/TagSet.js +20 -8
- package/es/components/TagSet/TagSetModal.js +0 -1
- package/es/components/TooltipTrigger/TooltipTrigger.d.ts +2 -1
- package/es/components/_Canary/Canary.d.ts +2 -1
- package/lib/components/APIKeyModal/APIKeyDownloader.d.ts +2 -1
- package/lib/components/ActionBar/ActionBarOverflowItems.d.ts +2 -2
- package/lib/components/AddSelect/AddSelectBreadcrumbs.d.ts +2 -1
- package/lib/components/AddSelect/AddSelectColumn.d.ts +2 -1
- package/lib/components/AddSelect/AddSelectFilter.d.ts +2 -1
- package/lib/components/AddSelect/AddSelectFilter.js +4 -4
- package/lib/components/AddSelect/AddSelectFormControl.d.ts +2 -1
- package/lib/components/AddSelect/AddSelectList.d.ts +2 -1
- package/lib/components/AddSelect/AddSelectMetaPanel.d.ts +2 -1
- package/lib/components/AddSelect/AddSelectRow.d.ts +2 -1
- package/lib/components/AddSelect/AddSelectSidebar.d.ts +2 -1
- package/lib/components/AddSelect/AddSelectSort.d.ts +2 -1
- package/lib/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.d.ts +2 -1
- package/lib/components/ButtonSetWithOverflow/ButtonSetWithOverflow.d.ts +2 -1
- package/lib/components/Card/Card.d.ts +5 -1
- package/lib/components/Card/Card.js +9 -2
- package/lib/components/Card/CardFooter.d.ts +1 -1
- package/lib/components/Card/CardHeader.d.ts +12 -2
- package/lib/components/Card/CardHeader.js +17 -9
- package/lib/components/ComboButton/ComboButtonItem/index.d.ts +2 -1
- package/lib/components/ConditionBuilder/ConditionBlock/ConditionBlock.d.ts +1 -1
- package/lib/components/ConditionBuilder/ConditionBuilderActions/ConditionBuilderActions.d.ts +2 -1
- package/lib/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.d.ts +2 -1
- package/lib/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.d.ts +1 -1
- package/lib/components/ConditionBuilder/ConditionBuilderConnector/ConditionConnector.d.ts +2 -1
- package/lib/components/ConditionBuilder/ConditionBuilderConnector/GroupConnector.d.ts +2 -1
- package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.d.ts +2 -1
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.d.ts +1 -1
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemDate/ConditionBuilderItemDate.d.ts +2 -1
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemNumber/ConditionBuilderItemNumber.d.ts +2 -1
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.d.ts +2 -1
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOptionForValueField.d.ts +2 -1
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemText/ConditionBuilderItemText.d.ts +2 -1
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemTime/ConditionBuilderItemTime.d.ts +2 -1
- package/lib/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.d.ts +2 -1
- package/lib/components/ConditionBuilder/ConditionPreview/ConditionPreview.d.ts +2 -1
- package/lib/components/CreateInfluencer/CreateInfluencer.d.ts +2 -2
- package/lib/components/Datagrid/Datagrid/DatagridBody.d.ts +2 -1
- package/lib/components/Datagrid/Datagrid/DatagridContent.d.ts +2 -1
- package/lib/components/Datagrid/Datagrid/DatagridEmptyBody.d.ts +2 -1
- package/lib/components/Datagrid/Datagrid/DatagridExpandedRow.d.ts +2 -2
- package/lib/components/Datagrid/Datagrid/DatagridHead.d.ts +2 -1
- package/lib/components/Datagrid/Datagrid/DatagridRefBody.d.ts +2 -1
- package/lib/components/Datagrid/Datagrid/DatagridRow.d.ts +2 -1
- package/lib/components/Datagrid/Datagrid/DatagridSelectAll.d.ts +2 -1
- package/lib/components/Datagrid/Datagrid/DatagridSelectAllWithToggle.d.ts +2 -1
- package/lib/components/Datagrid/Datagrid/DatagridSimpleBody.d.ts +2 -1
- package/lib/components/Datagrid/Datagrid/DatagridToolbar.d.ts +2 -1
- package/lib/components/Datagrid/Datagrid/DatagridVirtualBody.d.ts +2 -1
- package/lib/components/Datagrid/Datagrid/DraggableElement.d.ts +2 -2
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/Actions.d.ts +2 -1
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/ButtonWrapper.d.ts +2 -1
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.d.ts +2 -1
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.d.ts +2 -1
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/DraggableItemsList.d.ts +2 -1
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/TearsheetWrapper.d.ts +2 -1
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.d.ts +2 -1
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.d.ts +2 -1
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterProvider.d.ts +1 -1
- package/lib/components/Datagrid/Datagrid/addons/Filtering/OverflowCheckboxes.d.ts +2 -1
- package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.d.ts +1 -1
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditButton/InlineEditButton.d.ts +2 -1
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.d.ts +2 -1
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditContext/InlineEditContext.d.ts +1 -1
- package/lib/components/Datagrid/Datagrid/addons/RowSize/RowSizeDropdown.d.ts +2 -1
- package/lib/components/EmptyStates/EmptyStateContent.d.ts +2 -1
- package/lib/components/EmptyStates/EmptyStateIllustration.d.ts +2 -1
- package/lib/components/EmptyStates/assets/ErrorIllustration.d.ts +2 -1
- package/lib/components/EmptyStates/assets/NoDataIllustration.d.ts +2 -1
- package/lib/components/EmptyStates/assets/NoTagsIllustration.d.ts +2 -1
- package/lib/components/EmptyStates/assets/NotFoundIllustration.d.ts +2 -1
- package/lib/components/EmptyStates/assets/NotificationsIllustration.d.ts +2 -1
- package/lib/components/EmptyStates/assets/UnauthorizedIllustration.d.ts +2 -1
- package/lib/components/ExpressiveCard/ExpressiveCard.d.ts +5 -0
- package/lib/components/ExpressiveCard/ExpressiveCard.js +5 -0
- package/lib/components/FeatureFlags/index.d.ts +1 -1
- package/lib/components/FullPageError/assets/Error403SVG.d.ts +2 -1
- package/lib/components/FullPageError/assets/Error404SVG.d.ts +2 -1
- package/lib/components/FullPageError/assets/ErrorGenericSVG.d.ts +2 -1
- package/lib/components/HTTPErrors/HTTPErrorContent.d.ts +2 -1
- package/lib/components/HTTPErrors/assets/HTTPErrorSvg403.d.ts +2 -1
- package/lib/components/HTTPErrors/assets/HTTPErrorSvg404.d.ts +2 -1
- package/lib/components/HTTPErrors/assets/HTTPErrorSvgOther.d.ts +2 -1
- package/lib/components/Nav/NavItem.d.ts +2 -1
- package/lib/components/PageHeader/PageHeaderTitle.d.ts +2 -1
- package/lib/components/ProductiveCard/ProductiveCard.d.ts +5 -0
- package/lib/components/ProductiveCard/ProductiveCard.js +4 -0
- package/lib/components/SimpleHeader/SimpleHeader.d.ts +2 -1
- package/lib/components/TagOverflow/TagOverflow.d.ts +3 -0
- package/lib/components/TagOverflow/TagOverflow.js +8 -3
- package/lib/components/TagOverflow/TagOverflowModal.d.ts +6 -1
- package/lib/components/TagOverflow/TagOverflowModal.js +16 -5
- package/lib/components/TagOverflow/TagOverflowPopover.js +16 -8
- package/lib/components/TagSet/TagSet.d.ts +4 -0
- package/lib/components/TagSet/TagSet.js +19 -7
- package/lib/components/TagSet/TagSetModal.js +0 -1
- package/lib/components/TooltipTrigger/TooltipTrigger.d.ts +2 -1
- package/lib/components/_Canary/Canary.d.ts +2 -1
- package/package.json +3 -3
- package/scss/components/Card/_card.scss +14 -6
@@ -50,6 +50,10 @@ exports.ProductiveCard.propTypes = {
|
|
50
50
|
* Determines if the action icons are on the top or bottom of the card
|
51
51
|
*/
|
52
52
|
actionsPlacement: index.default.oneOf(['top', 'bottom']),
|
53
|
+
/**
|
54
|
+
* Optional prop that is intended for any scenario where something is being generated by AI to reinforce AI transparency, accountability, and explainability at the UI level.
|
55
|
+
*/
|
56
|
+
aiLabel: index.default.oneOfType([index.default.node, index.default.bool]),
|
53
57
|
/**
|
54
58
|
* Content that shows in the body of the card
|
55
59
|
*/
|
@@ -20,7 +20,7 @@ export function SimpleHeader({ breadcrumbs, className, title, noTrailingSlash, m
|
|
20
20
|
maxVisible: any;
|
21
21
|
overflowAriaLabel: any;
|
22
22
|
overflowTooltipAlign: any;
|
23
|
-
}):
|
23
|
+
}): React.JSX.Element;
|
24
24
|
export namespace SimpleHeader {
|
25
25
|
namespace propTypes {
|
26
26
|
export let breadcrumbs: PropTypes.Requireable<(PropTypes.InferProps<{
|
@@ -43,4 +43,5 @@ export namespace SimpleHeader {
|
|
43
43
|
export let title: PropTypes.Requireable<string>;
|
44
44
|
}
|
45
45
|
}
|
46
|
+
import React from 'react';
|
46
47
|
import PropTypes from 'prop-types';
|
@@ -7,6 +7,9 @@
|
|
7
7
|
import React, { ReactNode, RefObject } from 'react';
|
8
8
|
export interface TagOverflowItem {
|
9
9
|
className?: string;
|
10
|
+
/**
|
11
|
+
* @deprecated The `filter` prop is no longer going to be used. To use DismissibleTags, pass in an onClose function.
|
12
|
+
*/
|
10
13
|
filter?: boolean;
|
11
14
|
id: string;
|
12
15
|
label: string;
|
@@ -23,7 +23,7 @@ var useResizeObserver = require('../../global/js/hooks/useResizeObserver.js');
|
|
23
23
|
var _excluded = ["align", "allTagsModalAriaLabel", "allTagsModalSearchLabel", "allTagsModalSearchPlaceholderText", "allTagsModalTarget", "allTagsModalTitle", "autoAlign", "className", "containingElementRef", "items", "maxVisible", "measurementOffset", "multiline", "overflowAlign", "overflowClassName", "overflowType", "onOverflowTagChange", "showAllTagsLabel", "tagComponent"],
|
24
24
|
_excluded2 = ["className", "id"],
|
25
25
|
_excluded3 = ["tagType"],
|
26
|
-
_excluded4 = ["id", "label", "tagType", "onClose"];
|
26
|
+
_excluded4 = ["id", "label", "tagType", "onClose", "filter"];
|
27
27
|
var blockClass = "".concat(settings.pkg.prefix, "--tag-overflow");
|
28
28
|
var componentName = 'TagOverflow';
|
29
29
|
var allTagsModalSearchThreshold = 10;
|
@@ -183,6 +183,7 @@ exports.TagOverflow = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
183
183
|
label = item.label,
|
184
184
|
tagType = item.tagType,
|
185
185
|
_onClose = item.onClose,
|
186
|
+
filter = item.filter,
|
186
187
|
other = _rollupPluginBabelHelpers.objectWithoutProperties(item, _excluded4);
|
187
188
|
// If there is no template prop, then render items as Tags
|
188
189
|
return /*#__PURE__*/React.createElement("div", {
|
@@ -193,12 +194,16 @@ exports.TagOverflow = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
193
194
|
}, /*#__PURE__*/React.createElement(react.Tooltip, {
|
194
195
|
align: overflowAlign,
|
195
196
|
label: label
|
196
|
-
}, /*#__PURE__*/React.createElement(react.
|
197
|
+
}, typeof _onClose === 'function' || filter ? /*#__PURE__*/React.createElement(react.DismissibleTag, _rollupPluginBabelHelpers.extends({}, other, {
|
197
198
|
className: "".concat(blockClass, "__item--tag"),
|
198
199
|
type: tagType,
|
199
200
|
onClose: function onClose() {
|
200
201
|
return handleTagOnClose(_onClose, index);
|
201
|
-
}
|
202
|
+
},
|
203
|
+
text: label
|
204
|
+
})) : /*#__PURE__*/React.createElement(react.Tag, _rollupPluginBabelHelpers.extends({}, other, {
|
205
|
+
className: "".concat(blockClass, "__item--tag"),
|
206
|
+
type: tagType
|
202
207
|
}), label)));
|
203
208
|
}
|
204
209
|
}), /*#__PURE__*/React.createElement("span", {
|
@@ -11,6 +11,10 @@ interface TagOverflowModalProps {
|
|
11
11
|
className?: string;
|
12
12
|
modalAriaLabel?: string;
|
13
13
|
onClose?: () => void;
|
14
|
+
onTagClose?: (params: {
|
15
|
+
label: string;
|
16
|
+
id: any;
|
17
|
+
}) => void;
|
14
18
|
open?: boolean;
|
15
19
|
overflowType?: 'default' | 'tag';
|
16
20
|
portalTarget?: ReactNode;
|
@@ -19,13 +23,14 @@ interface TagOverflowModalProps {
|
|
19
23
|
title?: string;
|
20
24
|
}
|
21
25
|
export declare const TagOverflowModal: {
|
22
|
-
({ allTags, className, title, modalAriaLabel, onClose, open, overflowType, portalTarget: portalTargetIn, searchLabel, searchPlaceholder, ...rest }: TagOverflowModalProps): any;
|
26
|
+
({ allTags, className, title, modalAriaLabel, onClose, onTagClose, open, overflowType, portalTarget: portalTargetIn, searchLabel, searchPlaceholder, ...rest }: TagOverflowModalProps): any;
|
23
27
|
propTypes: {
|
24
28
|
allTags: PropTypes.Requireable<(PropTypes.InferProps<{
|
25
29
|
label: PropTypes.Validator<string>;
|
26
30
|
}> | null | undefined)[]>;
|
27
31
|
className: PropTypes.Requireable<string>;
|
28
32
|
onClose: PropTypes.Requireable<(...args: any[]) => any>;
|
33
|
+
onTagClose: PropTypes.Requireable<(...args: any[]) => any>;
|
29
34
|
open: PropTypes.Requireable<boolean>;
|
30
35
|
overflowType: PropTypes.Requireable<string>;
|
31
36
|
portalTarget: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
@@ -16,7 +16,7 @@ var settings = require('../../settings.js');
|
|
16
16
|
var propsHelper = require('../../global/js/utils/props-helper.js');
|
17
17
|
var usePortalTarget = require('../../global/js/hooks/usePortalTarget.js');
|
18
18
|
|
19
|
-
var _excluded = ["allTags", "className", "title", "modalAriaLabel", "onClose", "open", "overflowType", "portalTarget", "searchLabel", "searchPlaceholder"];
|
19
|
+
var _excluded = ["allTags", "className", "title", "modalAriaLabel", "onClose", "onTagClose", "open", "overflowType", "portalTarget", "searchLabel", "searchPlaceholder"];
|
20
20
|
var componentName = 'TagOverflowModal';
|
21
21
|
var blockClass = "".concat(settings.pkg.prefix, "--tag-overflow-modal");
|
22
22
|
|
@@ -34,6 +34,7 @@ var TagOverflowModal = function TagOverflowModal(_ref) {
|
|
34
34
|
_ref$modalAriaLabel = _ref.modalAriaLabel,
|
35
35
|
modalAriaLabel = _ref$modalAriaLabel === void 0 ? defaults.modalAriaLabel : _ref$modalAriaLabel,
|
36
36
|
onClose = _ref.onClose,
|
37
|
+
onTagClose = _ref.onTagClose,
|
37
38
|
open = _ref.open,
|
38
39
|
overflowType = _ref.overflowType,
|
39
40
|
portalTargetIn = _ref.portalTarget,
|
@@ -84,11 +85,20 @@ var TagOverflowModal = function TagOverflowModal(_ref) {
|
|
84
85
|
}, getFilteredItems().map(function (_ref2) {
|
85
86
|
var label = _ref2.label,
|
86
87
|
id = _ref2.id,
|
87
|
-
filter = _ref2.filter
|
88
|
-
|
89
|
-
|
88
|
+
filter = _ref2.filter,
|
89
|
+
onClose = _ref2.onClose;
|
90
|
+
var isFilterable = overflowType === 'tag' && (typeof onClose === 'function' || filter);
|
91
|
+
return isFilterable ? /*#__PURE__*/React.createElement(react.DismissibleTag, {
|
90
92
|
key: id,
|
91
|
-
|
93
|
+
text: label,
|
94
|
+
onClose: function onClose() {
|
95
|
+
return onTagClose === null || onTagClose === void 0 ? void 0 : onTagClose({
|
96
|
+
label: label,
|
97
|
+
id: id
|
98
|
+
});
|
99
|
+
}
|
100
|
+
}) : /*#__PURE__*/React.createElement(react.Tag, {
|
101
|
+
key: id
|
92
102
|
}, label);
|
93
103
|
}), /*#__PURE__*/React.createElement("div", {
|
94
104
|
className: "".concat(blockClass, "__fade")
|
@@ -100,6 +110,7 @@ TagOverflowModal.propTypes = {
|
|
100
110
|
}))),
|
101
111
|
className: index.default.string,
|
102
112
|
onClose: index.default.func,
|
113
|
+
onTagClose: index.default.func,
|
103
114
|
open: index.default.bool,
|
104
115
|
overflowType: index.default.oneOf(['default', 'tag']),
|
105
116
|
portalTarget: index.default.node,
|
@@ -90,17 +90,25 @@ var TagOverflowPopover = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
90
90
|
_onClose = _ref.onClose,
|
91
91
|
other = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded2);
|
92
92
|
var typeValue = overflowType === 'tag' ? 'high-contrast' : tagType;
|
93
|
-
var isFilterable = overflowType === 'tag'
|
93
|
+
var isFilterable = overflowType === 'tag' && (typeof _onClose === 'function' || filter);
|
94
|
+
var tag;
|
95
|
+
if (isFilterable) {
|
96
|
+
tag = /*#__PURE__*/React.createElement(react.DismissibleTag, _rollupPluginBabelHelpers.extends({}, other, {
|
97
|
+
onClose: function onClose() {
|
98
|
+
return _onClose === null || _onClose === void 0 ? void 0 : _onClose();
|
99
|
+
},
|
100
|
+
type: typeValue,
|
101
|
+
text: label
|
102
|
+
}));
|
103
|
+
} else {
|
104
|
+
tag = /*#__PURE__*/React.createElement(react.Tag, _rollupPluginBabelHelpers.extends({}, other, {
|
105
|
+
type: typeValue
|
106
|
+
}), label);
|
107
|
+
}
|
94
108
|
return /*#__PURE__*/React.createElement("li", {
|
95
109
|
className: cx("".concat(blockClass, "__tag-item"), _rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty({}, "".concat(blockClass, "__tag-item--default"), overflowType === 'default'), "".concat(blockClass, "__tag-item--tag"), overflowType === 'tag')),
|
96
110
|
key: id
|
97
|
-
}, overflowType === 'tag' ?
|
98
|
-
onClose: function onClose() {
|
99
|
-
return _onClose === null || _onClose === void 0 ? void 0 : _onClose();
|
100
|
-
},
|
101
|
-
type: typeValue,
|
102
|
-
filter: isFilterable
|
103
|
-
}), label) : label);
|
111
|
+
}, overflowType === 'tag' ? tag : label);
|
104
112
|
})), ((_overflowTags$length = overflowTags === null || overflowTags === void 0 ? void 0 : overflowTags.length) !== null && _overflowTags$length !== void 0 ? _overflowTags$length : 0) > (allTagsModalSearchThreshold !== null && allTagsModalSearchThreshold !== void 0 ? allTagsModalSearchThreshold : 0) && /*#__PURE__*/React.createElement(react.Link, {
|
105
113
|
className: "".concat(blockClass, "__show-all-tags-link"),
|
106
114
|
href: "",
|
@@ -6,6 +6,10 @@ type OverflowType = 'default' | 'tag';
|
|
6
6
|
type TagType = {
|
7
7
|
label: string;
|
8
8
|
type?: keyof typeof tagTypes;
|
9
|
+
/**
|
10
|
+
* @deprecated Use the `onClose` function instead to render as a DismissibleTag
|
11
|
+
*/
|
12
|
+
filter?: boolean;
|
9
13
|
} & TagBaseProps;
|
10
14
|
export interface TagSetProps extends PropsWithChildren {
|
11
15
|
/**
|
@@ -20,8 +20,8 @@ var settings = require('../../settings.js');
|
|
20
20
|
var useResizeObserver = require('../../global/js/hooks/useResizeObserver.js');
|
21
21
|
|
22
22
|
var _excluded = ["align", "allTagsModalTarget", "className", "maxVisible", "multiline", "overflowAutoAlign", "overflowAlign", "overflowClassName", "overflowType", "allTagsModalAriaLabel", "allTagsModalTitle", "allTagsModalSearchLabel", "allTagsModalSearchPlaceholderText", "showAllTagsLabel", "onOverflowClick", "tags", "containingElementRef", "measurementOffset", "onOverflowTagChange"],
|
23
|
-
_excluded2 = ["label", "id"],
|
24
|
-
_excluded3 = ["label", "onClose"];
|
23
|
+
_excluded2 = ["label", "id", "filter", "onClose"],
|
24
|
+
_excluded3 = ["label", "onClose", "filter"];
|
25
25
|
var componentName = 'TagSet';
|
26
26
|
var blockClass = "".concat(settings.pkg.prefix, "--tag-set");
|
27
27
|
var allTagsModalSearchThreshold = 10;
|
@@ -110,6 +110,8 @@ exports.TagSet = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
110
110
|
setHiddenSizingTags(tags && tags.length > 0 ? tags.map(function (_ref2, index) {
|
111
111
|
var label = _ref2.label,
|
112
112
|
id = _ref2.id,
|
113
|
+
filter = _ref2.filter,
|
114
|
+
onClose = _ref2.onClose,
|
113
115
|
other = _rollupPluginBabelHelpers.objectWithoutProperties(_ref2, _excluded2);
|
114
116
|
return /*#__PURE__*/React.createElement("div", {
|
115
117
|
key: index,
|
@@ -119,7 +121,10 @@ exports.TagSet = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
119
121
|
newSizingTags[index] = el;
|
120
122
|
}
|
121
123
|
}
|
122
|
-
}, /*#__PURE__*/React.createElement(react.
|
124
|
+
}, typeof onClose === 'function' || filter ? /*#__PURE__*/React.createElement(react.DismissibleTag, _rollupPluginBabelHelpers.extends({}, other, {
|
125
|
+
"data-original-id": id,
|
126
|
+
text: label
|
127
|
+
})) : /*#__PURE__*/React.createElement(react.Tag, _rollupPluginBabelHelpers.extends({}, other, {
|
123
128
|
// ensure id is not duplicated
|
124
129
|
"data-original-id": id
|
125
130
|
}), label));
|
@@ -138,15 +143,22 @@ exports.TagSet = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
138
143
|
var newDisplayedTags = tags && tags.length > 0 ? tags.map(function (_ref3, index) {
|
139
144
|
var label = _ref3.label,
|
140
145
|
_onClose = _ref3.onClose,
|
146
|
+
filter = _ref3.filter,
|
141
147
|
other = _rollupPluginBabelHelpers.objectWithoutProperties(_ref3, _excluded3);
|
142
148
|
if (index == tags.length - 1 && other.size) {
|
143
149
|
size = other.size;
|
144
150
|
}
|
151
|
+
if (typeof _onClose === 'function' || filter) {
|
152
|
+
return /*#__PURE__*/React.createElement(react.DismissibleTag, _rollupPluginBabelHelpers.extends({}, other, {
|
153
|
+
key: "displayed-tag-".concat(index),
|
154
|
+
onClose: function onClose() {
|
155
|
+
return handleTagOnClose(_onClose, index);
|
156
|
+
},
|
157
|
+
text: label
|
158
|
+
}));
|
159
|
+
}
|
145
160
|
return /*#__PURE__*/React.createElement(react.Tag, _rollupPluginBabelHelpers.extends({}, other, {
|
146
|
-
key: "displayed-tag-".concat(index)
|
147
|
-
onClose: function onClose() {
|
148
|
-
return handleTagOnClose(_onClose, index);
|
149
|
-
}
|
161
|
+
key: "displayed-tag-".concat(index)
|
150
162
|
}), label);
|
151
163
|
}) : [];
|
152
164
|
|
@@ -98,7 +98,6 @@ var TagSetModal = function TagSetModal(_ref) {
|
|
98
98
|
var label = _ref2.label,
|
99
99
|
other = _rollupPluginBabelHelpers.objectWithoutProperties(_ref2, _excluded2);
|
100
100
|
return /*#__PURE__*/React.createElement(react.Tag, _rollupPluginBabelHelpers.extends({}, other, {
|
101
|
-
filter: false,
|
102
101
|
key: "all-tags-".concat(index)
|
103
102
|
}), label);
|
104
103
|
}), /*#__PURE__*/React.createElement("div", {
|
@@ -2,7 +2,7 @@ export function TooltipTrigger({ children, className, ...rest }: {
|
|
2
2
|
[x: string]: any;
|
3
3
|
children: any;
|
4
4
|
className: any;
|
5
|
-
}):
|
5
|
+
}): React.JSX.Element;
|
6
6
|
export namespace TooltipTrigger {
|
7
7
|
export { componentName as displayName };
|
8
8
|
export namespace propTypes {
|
@@ -10,6 +10,7 @@ export namespace TooltipTrigger {
|
|
10
10
|
let className: PropTypes.Requireable<string>;
|
11
11
|
}
|
12
12
|
}
|
13
|
+
import React from 'react';
|
13
14
|
declare const componentName: "TooltipTrigger";
|
14
15
|
import PropTypes from 'prop-types';
|
15
16
|
export {};
|
@@ -2,11 +2,12 @@ export function Canary({ className, componentName, ...rest }: {
|
|
2
2
|
[x: string]: any;
|
3
3
|
className: any;
|
4
4
|
componentName: any;
|
5
|
-
}):
|
5
|
+
}): React.JSX.Element;
|
6
6
|
export namespace Canary {
|
7
7
|
namespace propTypes {
|
8
8
|
let className: PropTypes.Requireable<string>;
|
9
9
|
let componentName: PropTypes.Validator<string>;
|
10
10
|
}
|
11
11
|
}
|
12
|
+
import React from 'react';
|
12
13
|
import PropTypes from 'prop-types';
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@carbon/ibm-products",
|
3
3
|
"description": "Carbon for IBM Products",
|
4
|
-
"version": "2.43.2-canary.
|
4
|
+
"version": "2.43.2-canary.306+18b47c72f",
|
5
5
|
"license": "Apache-2.0",
|
6
6
|
"main": "lib/index.js",
|
7
7
|
"module": "es/index.js",
|
@@ -96,7 +96,7 @@
|
|
96
96
|
"dependencies": {
|
97
97
|
"@babel/runtime": "^7.23.9",
|
98
98
|
"@carbon/feature-flags": "^0.22.0",
|
99
|
-
"@carbon/ibm-products-styles": "^2.
|
99
|
+
"@carbon/ibm-products-styles": "^2.48.0-rc.0",
|
100
100
|
"@carbon/telemetry": "^0.1.0",
|
101
101
|
"@dnd-kit/core": "^6.0.8",
|
102
102
|
"@dnd-kit/modifiers": "^7.0.0",
|
@@ -120,5 +120,5 @@
|
|
120
120
|
"react": "^16.8.6 || ^17.0.1 || ^18.2.0",
|
121
121
|
"react-dom": "^16.8.6 || ^17.0.1 || ^18.2.0"
|
122
122
|
},
|
123
|
-
"gitHead": "
|
123
|
+
"gitHead": "18b47c72ff381db130897da6a2d1f0aa86fd6d85"
|
124
124
|
}
|
@@ -5,6 +5,8 @@
|
|
5
5
|
// LICENSE file in the root directory of this source tree.
|
6
6
|
//
|
7
7
|
|
8
|
+
// NOTE: Please do not remove the duplicate `slug` and `ai-label` classes. We need both until slug is fully deprecated
|
9
|
+
|
8
10
|
// Standard imports.
|
9
11
|
@use '@carbon/styles/scss/theme' as *;
|
10
12
|
@use '@carbon/styles/scss/spacing' as *;
|
@@ -148,16 +150,19 @@ $block-class: #{c4p-settings.$pkg-prefix}--card;
|
|
148
150
|
right: $spacing-05;
|
149
151
|
}
|
150
152
|
|
151
|
-
.#{$block-class}__header-container--has-slug
|
153
|
+
.#{$block-class}__header-container--has-slug,
|
154
|
+
.#{$block-class}__header-container--has-ai-label {
|
152
155
|
width: 100%;
|
153
156
|
padding-right: $spacing-07;
|
154
157
|
}
|
155
158
|
|
156
|
-
.#{$block-class}__header-container--has-slug.#{$block-class}__header-container--has-actions
|
159
|
+
.#{$block-class}__header-container--has-slug.#{$block-class}__header-container--has-actions,
|
160
|
+
.#{$block-class}__header-container--has-ai-label.#{$block-class}__header-container--has-actions {
|
157
161
|
padding-right: $spacing-08;
|
158
162
|
}
|
159
163
|
|
160
|
-
.#{$block-class}__header-container--has-slug.#{$block-class}__header-container--large-tile-or-label
|
164
|
+
.#{$block-class}__header-container--has-slug.#{$block-class}__header-container--large-tile-or-label,
|
165
|
+
.#{$block-class}__header-container--has-ai-label.#{$block-class}__header-container--large-tile-or-label {
|
161
166
|
padding-right: $spacing-09;
|
162
167
|
}
|
163
168
|
|
@@ -170,7 +175,8 @@ $block-class: #{c4p-settings.$pkg-prefix}--card;
|
|
170
175
|
pointer-events: none;
|
171
176
|
}
|
172
177
|
|
173
|
-
.#{$block-class}--has-slug
|
178
|
+
.#{$block-class}--has-slug,
|
179
|
+
.#{$block-class}--has-ai-label {
|
174
180
|
@include utilities.ai-popover-gradient('default', 0, 'layer');
|
175
181
|
|
176
182
|
border: 1px solid transparent;
|
@@ -178,7 +184,8 @@ $block-class: #{c4p-settings.$pkg-prefix}--card;
|
|
178
184
|
0 4px 10px 2px $ai-drop-shadow;
|
179
185
|
}
|
180
186
|
|
181
|
-
.#{$block-class}__clickable.#{$block-class}--has-slug::before
|
187
|
+
.#{$block-class}__clickable.#{$block-class}--has-slug::before,
|
188
|
+
.#{$block-class}__clickable.#{$block-class}--has-ai-label::before {
|
182
189
|
@include utilities.ai-popover-gradient('hover', 0, 'layer');
|
183
190
|
|
184
191
|
position: absolute;
|
@@ -193,7 +200,8 @@ $block-class: #{c4p-settings.$pkg-prefix}--card;
|
|
193
200
|
transition: opacity $duration-fast-02 motion(standard, productive);
|
194
201
|
}
|
195
202
|
|
196
|
-
.#{$block-class}__clickable.#{$block-class}--has-slug:hover::before
|
203
|
+
.#{$block-class}__clickable.#{$block-class}--has-slug:hover::before,
|
204
|
+
.#{$block-class}__clickable.#{$block-class}--has-ai-label:hover::before {
|
197
205
|
opacity: 1;
|
198
206
|
}
|
199
207
|
|