@carbon/ibm-products 2.43.2-canary.278 → 2.43.2-canary.282
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/TagSet/TagSet.d.ts +4 -0
- package/es/components/TagSet/TagSet.js +10 -4
- package/es/components/TagSet/TagSetOverflow.d.ts +5 -1
- package/es/components/TagSet/TagSetOverflow.js +35 -7
- package/lib/components/TagSet/TagSet.d.ts +4 -0
- package/lib/components/TagSet/TagSet.js +10 -4
- package/lib/components/TagSet/TagSetOverflow.d.ts +5 -1
- package/lib/components/TagSet/TagSetOverflow.js +34 -6
- package/package.json +4 -4
- package/telemetry.yml +4 -3
@@ -54,6 +54,10 @@ export interface TagSetProps extends PropsWithChildren {
|
|
54
54
|
* display tags in multiple lines
|
55
55
|
*/
|
56
56
|
multiline?: boolean;
|
57
|
+
/**
|
58
|
+
* An optional click handler that overrides the default functionality of displaying all tags in a modal
|
59
|
+
*/
|
60
|
+
onOverflowClick?: ((overFlowTags: ReactNode[]) => void) | undefined;
|
57
61
|
/**
|
58
62
|
* Handler to get overflow tags
|
59
63
|
*/
|
@@ -17,7 +17,7 @@ import { isRequiredIf } from '../../global/js/utils/props-helper.js';
|
|
17
17
|
import { pkg } from '../../settings.js';
|
18
18
|
import { useResizeObserver } from '../../global/js/hooks/useResizeObserver.js';
|
19
19
|
|
20
|
-
var _excluded = ["align", "allTagsModalTarget", "className", "maxVisible", "multiline", "overflowAutoAlign", "overflowAlign", "overflowClassName", "overflowType", "allTagsModalAriaLabel", "allTagsModalTitle", "allTagsModalSearchLabel", "allTagsModalSearchPlaceholderText", "showAllTagsLabel", "tags", "containingElementRef", "measurementOffset", "onOverflowTagChange"],
|
20
|
+
var _excluded = ["align", "allTagsModalTarget", "className", "maxVisible", "multiline", "overflowAutoAlign", "overflowAlign", "overflowClassName", "overflowType", "allTagsModalAriaLabel", "allTagsModalTitle", "allTagsModalSearchLabel", "allTagsModalSearchPlaceholderText", "showAllTagsLabel", "onOverflowClick", "tags", "containingElementRef", "measurementOffset", "onOverflowTagChange"],
|
21
21
|
_excluded2 = ["label", "id"],
|
22
22
|
_excluded3 = ["label", "onClose"];
|
23
23
|
var componentName = 'TagSet';
|
@@ -54,6 +54,7 @@ var TagSet = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
54
54
|
allTagsModalSearchPlaceholderText = _ref$allTagsModalSear2 === void 0 ? 'Search all tags' : _ref$allTagsModalSear2,
|
55
55
|
_ref$showAllTagsLabel = _ref.showAllTagsLabel,
|
56
56
|
showAllTagsLabel = _ref$showAllTagsLabel === void 0 ? 'View all tags' : _ref$showAllTagsLabel,
|
57
|
+
onOverflowClick = _ref.onOverflowClick,
|
57
58
|
tags = _ref.tags,
|
58
59
|
containingElementRef = _ref.containingElementRef,
|
59
60
|
_ref$measurementOffse = _ref.measurementOffset,
|
@@ -170,11 +171,12 @@ var TagSet = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
170
171
|
key: "displayed-tag-overflow",
|
171
172
|
ref: overflowTag,
|
172
173
|
popoverOpen: popoverOpen,
|
174
|
+
onOverflowClick: onOverflowClick,
|
173
175
|
setPopoverOpen: setPopoverOpen
|
174
176
|
}));
|
175
177
|
onOverflowTagChange === null || onOverflowTagChange === void 0 || onOverflowTagChange(newOverflowTags);
|
176
178
|
setDisplayedTags(newDisplayedTags);
|
177
|
-
}, [displayCount, overflowAlign, overflowClassName, overflowType, showAllTagsLabel, tags, onOverflowTagChange, popoverOpen, handleTagOnClose, overflowAutoAlign]);
|
179
|
+
}, [displayCount, overflowAlign, overflowClassName, overflowType, showAllTagsLabel, onOverflowClick, tags, onOverflowTagChange, popoverOpen, handleTagOnClose, overflowAutoAlign]);
|
178
180
|
var checkFullyVisibleTags = useCallback(function () {
|
179
181
|
if (multiline) {
|
180
182
|
return setDisplayCount(maxVisibleCount);
|
@@ -245,12 +247,12 @@ var TagSet = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
245
247
|
}, hiddenSizingTags), /*#__PURE__*/React__default.createElement("div", {
|
246
248
|
className: cx(["".concat(blockClass, "__tag-container"), multiline && "".concat(blockClass, "__tag-container--multiline")]),
|
247
249
|
ref: displayedArea
|
248
|
-
}, displayedTags)), /*#__PURE__*/React__default.createElement(TagSetModal, {
|
250
|
+
}, displayedTags)), !onOverflowClick && /*#__PURE__*/React__default.createElement(TagSetModal, {
|
249
251
|
allTags: tags,
|
250
252
|
open: showAllModalOpen,
|
251
253
|
title: allTagsModalTitle,
|
252
|
-
modalAriaLabel: allTagsModalAriaLabel,
|
253
254
|
onClose: handleModalClose,
|
255
|
+
modalAriaLabel: allTagsModalAriaLabel,
|
254
256
|
searchLabel: allTagsModalSearchLabel,
|
255
257
|
searchPlaceholder: allTagsModalSearchPlaceholderText,
|
256
258
|
portalTarget: allTagsModalTarget
|
@@ -334,6 +336,10 @@ TagSet.propTypes = {
|
|
334
336
|
* display tags in multiple lines
|
335
337
|
*/
|
336
338
|
multiline: PropTypes.bool,
|
339
|
+
/**
|
340
|
+
* An optional click handler that overrides the default functionality of displaying all tags in a modal
|
341
|
+
*/
|
342
|
+
onOverflowClick: PropTypes.func,
|
337
343
|
/**
|
338
344
|
* Handler to get overflow tags
|
339
345
|
*/
|
@@ -10,6 +10,10 @@ interface TagSetOverflowProps {
|
|
10
10
|
* className
|
11
11
|
*/
|
12
12
|
className?: string;
|
13
|
+
/**
|
14
|
+
* An optional click handler that overrides the default functionality of displaying all tags in a modal
|
15
|
+
*/
|
16
|
+
onOverflowClick?: ((overFlowTags: ReactNode[]) => void) | undefined;
|
13
17
|
/**
|
14
18
|
* function to execute on clicking show all
|
15
19
|
*/
|
@@ -37,7 +41,7 @@ interface TagSetOverflowProps {
|
|
37
41
|
/**
|
38
42
|
* Setter function for the popoverOpen state value
|
39
43
|
*/
|
40
|
-
setPopoverOpen
|
44
|
+
setPopoverOpen: (value: boolean) => void;
|
41
45
|
/**
|
42
46
|
* label for the overflow show all tags link
|
43
47
|
*/
|
@@ -9,11 +9,11 @@ import { objectWithoutProperties as _objectWithoutProperties, extends as _extend
|
|
9
9
|
import React__default, { useRef } from 'react';
|
10
10
|
import PropTypes from '../../_virtual/index.js';
|
11
11
|
import cx from 'classnames';
|
12
|
-
import {
|
12
|
+
import { OperationalTag, Popover, PopoverContent, Link } from '@carbon/react';
|
13
13
|
import { pkg } from '../../settings.js';
|
14
14
|
import { useClickOutside } from '../../global/js/hooks/useClickOutside.js';
|
15
15
|
|
16
|
-
var _excluded = ["allTagsModalSearchThreshold", "className", "onShowAllClick", "overflowAlign", "overflowAutoAlign", "overflowTags", "overflowType", "showAllTagsLabel", "popoverOpen", "setPopoverOpen", "size"];
|
16
|
+
var _excluded = ["allTagsModalSearchThreshold", "onOverflowClick", "className", "onShowAllClick", "overflowAlign", "overflowAutoAlign", "overflowTags", "overflowType", "showAllTagsLabel", "popoverOpen", "setPopoverOpen", "size"];
|
17
17
|
var componentName = 'TagSetOverflow';
|
18
18
|
var blockClass = "".concat(pkg.prefix, "--tag-set-overflow");
|
19
19
|
|
@@ -24,6 +24,7 @@ var defaults = {
|
|
24
24
|
var TagSetOverflow = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
25
25
|
var _ref$allTagsModalSear = _ref.allTagsModalSearchThreshold,
|
26
26
|
allTagsModalSearchThreshold = _ref$allTagsModalSear === void 0 ? defaults.allTagsModalSearchThreshold : _ref$allTagsModalSear,
|
27
|
+
onOverflowClick = _ref.onOverflowClick,
|
27
28
|
className = _ref.className,
|
28
29
|
onShowAllClick = _ref.onShowAllClick,
|
29
30
|
_ref$overflowAlign = _ref.overflowAlign,
|
@@ -40,21 +41,44 @@ var TagSetOverflow = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
|
|
40
41
|
var overflowTagContent = useRef(null);
|
41
42
|
useClickOutside(ref || localRef, function () {
|
42
43
|
if (popoverOpen) {
|
43
|
-
setPopoverOpen
|
44
|
+
setPopoverOpen(false);
|
44
45
|
}
|
45
46
|
});
|
46
47
|
var handleShowAllTagsClick = function handleShowAllTagsClick(ev) {
|
47
48
|
ev.stopPropagation();
|
48
49
|
ev.preventDefault();
|
49
|
-
setPopoverOpen
|
50
|
+
setPopoverOpen(false);
|
50
51
|
onShowAllClick();
|
51
52
|
};
|
52
53
|
var handleEscKeyPress = function handleEscKeyPress(event) {
|
53
54
|
var key = event.key;
|
54
55
|
if (key === 'Escape') {
|
55
|
-
setPopoverOpen
|
56
|
+
setPopoverOpen(false);
|
56
57
|
}
|
57
58
|
};
|
59
|
+
var handleOverflowClick = function handleOverflowClick() {
|
60
|
+
// If a custom overflow function is provided then trigger that function
|
61
|
+
// on clicking the overflow
|
62
|
+
if (onOverflowClick) {
|
63
|
+
onOverflowClick(overflowTags);
|
64
|
+
} else {
|
65
|
+
setPopoverOpen(!popoverOpen);
|
66
|
+
}
|
67
|
+
};
|
68
|
+
if (onOverflowClick) {
|
69
|
+
return /*#__PURE__*/React__default.createElement("span", _extends({}, rest, {
|
70
|
+
"aria-hidden": overflowTags.length === 0,
|
71
|
+
className: cx("".concat(blockClass), _defineProperty({}, "".concat(blockClass, "--hidden"), overflowTags.length === 0)),
|
72
|
+
ref: ref || localRef
|
73
|
+
}), /*#__PURE__*/React__default.createElement(OperationalTag, {
|
74
|
+
onClick: function onClick() {
|
75
|
+
return handleOverflowClick();
|
76
|
+
},
|
77
|
+
className: "".concat(blockClass, "__popover-trigger"),
|
78
|
+
size: size,
|
79
|
+
text: "+".concat(overflowTags.length)
|
80
|
+
}));
|
81
|
+
}
|
58
82
|
return /*#__PURE__*/React__default.createElement("span", _extends({}, rest, {
|
59
83
|
"aria-hidden": overflowTags.length === 0,
|
60
84
|
className: cx("".concat(blockClass), _defineProperty({}, "".concat(blockClass, "--hidden"), overflowTags.length === 0)),
|
@@ -69,7 +93,7 @@ var TagSetOverflow = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
|
|
69
93
|
autoAlign: overflowAutoAlign
|
70
94
|
}, /*#__PURE__*/React__default.createElement(OperationalTag, {
|
71
95
|
onClick: function onClick() {
|
72
|
-
return setPopoverOpen
|
96
|
+
return setPopoverOpen(!popoverOpen);
|
73
97
|
},
|
74
98
|
className: cx("".concat(blockClass, "__popover-trigger")),
|
75
99
|
size: size,
|
@@ -112,6 +136,10 @@ TagSetOverflow.propTypes = {
|
|
112
136
|
* className
|
113
137
|
*/
|
114
138
|
className: PropTypes.string,
|
139
|
+
/**
|
140
|
+
* An optional click handler that overrides the default functionality of displaying all tags in a modal
|
141
|
+
*/
|
142
|
+
onOverflowClick: PropTypes.func,
|
115
143
|
/**
|
116
144
|
* function to execute on clicking show all
|
117
145
|
*/
|
@@ -140,7 +168,7 @@ TagSetOverflow.propTypes = {
|
|
140
168
|
/**
|
141
169
|
* Setter function for the popoverOpen state value
|
142
170
|
*/
|
143
|
-
setPopoverOpen: PropTypes.func,
|
171
|
+
setPopoverOpen: PropTypes.func.isRequired,
|
144
172
|
/**
|
145
173
|
* label for the overflow show all tags link
|
146
174
|
*/
|
@@ -54,6 +54,10 @@ export interface TagSetProps extends PropsWithChildren {
|
|
54
54
|
* display tags in multiple lines
|
55
55
|
*/
|
56
56
|
multiline?: boolean;
|
57
|
+
/**
|
58
|
+
* An optional click handler that overrides the default functionality of displaying all tags in a modal
|
59
|
+
*/
|
60
|
+
onOverflowClick?: ((overFlowTags: ReactNode[]) => void) | undefined;
|
57
61
|
/**
|
58
62
|
* Handler to get overflow tags
|
59
63
|
*/
|
@@ -19,7 +19,7 @@ var propsHelper = require('../../global/js/utils/props-helper.js');
|
|
19
19
|
var settings = require('../../settings.js');
|
20
20
|
var useResizeObserver = require('../../global/js/hooks/useResizeObserver.js');
|
21
21
|
|
22
|
-
var _excluded = ["align", "allTagsModalTarget", "className", "maxVisible", "multiline", "overflowAutoAlign", "overflowAlign", "overflowClassName", "overflowType", "allTagsModalAriaLabel", "allTagsModalTitle", "allTagsModalSearchLabel", "allTagsModalSearchPlaceholderText", "showAllTagsLabel", "tags", "containingElementRef", "measurementOffset", "onOverflowTagChange"],
|
22
|
+
var _excluded = ["align", "allTagsModalTarget", "className", "maxVisible", "multiline", "overflowAutoAlign", "overflowAlign", "overflowClassName", "overflowType", "allTagsModalAriaLabel", "allTagsModalTitle", "allTagsModalSearchLabel", "allTagsModalSearchPlaceholderText", "showAllTagsLabel", "onOverflowClick", "tags", "containingElementRef", "measurementOffset", "onOverflowTagChange"],
|
23
23
|
_excluded2 = ["label", "id"],
|
24
24
|
_excluded3 = ["label", "onClose"];
|
25
25
|
var componentName = 'TagSet';
|
@@ -56,6 +56,7 @@ exports.TagSet = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
56
56
|
allTagsModalSearchPlaceholderText = _ref$allTagsModalSear2 === void 0 ? 'Search all tags' : _ref$allTagsModalSear2,
|
57
57
|
_ref$showAllTagsLabel = _ref.showAllTagsLabel,
|
58
58
|
showAllTagsLabel = _ref$showAllTagsLabel === void 0 ? 'View all tags' : _ref$showAllTagsLabel,
|
59
|
+
onOverflowClick = _ref.onOverflowClick,
|
59
60
|
tags = _ref.tags,
|
60
61
|
containingElementRef = _ref.containingElementRef,
|
61
62
|
_ref$measurementOffse = _ref.measurementOffset,
|
@@ -172,11 +173,12 @@ exports.TagSet = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
172
173
|
key: "displayed-tag-overflow",
|
173
174
|
ref: overflowTag,
|
174
175
|
popoverOpen: popoverOpen,
|
176
|
+
onOverflowClick: onOverflowClick,
|
175
177
|
setPopoverOpen: setPopoverOpen
|
176
178
|
}));
|
177
179
|
onOverflowTagChange === null || onOverflowTagChange === void 0 || onOverflowTagChange(newOverflowTags);
|
178
180
|
setDisplayedTags(newDisplayedTags);
|
179
|
-
}, [displayCount, overflowAlign, overflowClassName, overflowType, showAllTagsLabel, tags, onOverflowTagChange, popoverOpen, handleTagOnClose, overflowAutoAlign]);
|
181
|
+
}, [displayCount, overflowAlign, overflowClassName, overflowType, showAllTagsLabel, onOverflowClick, tags, onOverflowTagChange, popoverOpen, handleTagOnClose, overflowAutoAlign]);
|
180
182
|
var checkFullyVisibleTags = React.useCallback(function () {
|
181
183
|
if (multiline) {
|
182
184
|
return setDisplayCount(maxVisibleCount);
|
@@ -247,12 +249,12 @@ exports.TagSet = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
247
249
|
}, hiddenSizingTags), /*#__PURE__*/React.createElement("div", {
|
248
250
|
className: cx(["".concat(blockClass, "__tag-container"), multiline && "".concat(blockClass, "__tag-container--multiline")]),
|
249
251
|
ref: displayedArea
|
250
|
-
}, displayedTags)), /*#__PURE__*/React.createElement(TagSetModal.TagSetModal, {
|
252
|
+
}, displayedTags)), !onOverflowClick && /*#__PURE__*/React.createElement(TagSetModal.TagSetModal, {
|
251
253
|
allTags: tags,
|
252
254
|
open: showAllModalOpen,
|
253
255
|
title: allTagsModalTitle,
|
254
|
-
modalAriaLabel: allTagsModalAriaLabel,
|
255
256
|
onClose: handleModalClose,
|
257
|
+
modalAriaLabel: allTagsModalAriaLabel,
|
256
258
|
searchLabel: allTagsModalSearchLabel,
|
257
259
|
searchPlaceholder: allTagsModalSearchPlaceholderText,
|
258
260
|
portalTarget: allTagsModalTarget
|
@@ -336,6 +338,10 @@ exports.TagSet.propTypes = {
|
|
336
338
|
* display tags in multiple lines
|
337
339
|
*/
|
338
340
|
multiline: index.default.bool,
|
341
|
+
/**
|
342
|
+
* An optional click handler that overrides the default functionality of displaying all tags in a modal
|
343
|
+
*/
|
344
|
+
onOverflowClick: index.default.func,
|
339
345
|
/**
|
340
346
|
* Handler to get overflow tags
|
341
347
|
*/
|
@@ -10,6 +10,10 @@ interface TagSetOverflowProps {
|
|
10
10
|
* className
|
11
11
|
*/
|
12
12
|
className?: string;
|
13
|
+
/**
|
14
|
+
* An optional click handler that overrides the default functionality of displaying all tags in a modal
|
15
|
+
*/
|
16
|
+
onOverflowClick?: ((overFlowTags: ReactNode[]) => void) | undefined;
|
13
17
|
/**
|
14
18
|
* function to execute on clicking show all
|
15
19
|
*/
|
@@ -37,7 +41,7 @@ interface TagSetOverflowProps {
|
|
37
41
|
/**
|
38
42
|
* Setter function for the popoverOpen state value
|
39
43
|
*/
|
40
|
-
setPopoverOpen
|
44
|
+
setPopoverOpen: (value: boolean) => void;
|
41
45
|
/**
|
42
46
|
* label for the overflow show all tags link
|
43
47
|
*/
|
@@ -15,7 +15,7 @@ var react = require('@carbon/react');
|
|
15
15
|
var settings = require('../../settings.js');
|
16
16
|
var useClickOutside = require('../../global/js/hooks/useClickOutside.js');
|
17
17
|
|
18
|
-
var _excluded = ["allTagsModalSearchThreshold", "className", "onShowAllClick", "overflowAlign", "overflowAutoAlign", "overflowTags", "overflowType", "showAllTagsLabel", "popoverOpen", "setPopoverOpen", "size"];
|
18
|
+
var _excluded = ["allTagsModalSearchThreshold", "onOverflowClick", "className", "onShowAllClick", "overflowAlign", "overflowAutoAlign", "overflowTags", "overflowType", "showAllTagsLabel", "popoverOpen", "setPopoverOpen", "size"];
|
19
19
|
var componentName = 'TagSetOverflow';
|
20
20
|
var blockClass = "".concat(settings.pkg.prefix, "--tag-set-overflow");
|
21
21
|
|
@@ -26,6 +26,7 @@ var defaults = {
|
|
26
26
|
var TagSetOverflow = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
27
27
|
var _ref$allTagsModalSear = _ref.allTagsModalSearchThreshold,
|
28
28
|
allTagsModalSearchThreshold = _ref$allTagsModalSear === void 0 ? defaults.allTagsModalSearchThreshold : _ref$allTagsModalSear,
|
29
|
+
onOverflowClick = _ref.onOverflowClick,
|
29
30
|
className = _ref.className,
|
30
31
|
onShowAllClick = _ref.onShowAllClick,
|
31
32
|
_ref$overflowAlign = _ref.overflowAlign,
|
@@ -42,21 +43,44 @@ var TagSetOverflow = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
42
43
|
var overflowTagContent = React.useRef(null);
|
43
44
|
useClickOutside.useClickOutside(ref || localRef, function () {
|
44
45
|
if (popoverOpen) {
|
45
|
-
setPopoverOpen
|
46
|
+
setPopoverOpen(false);
|
46
47
|
}
|
47
48
|
});
|
48
49
|
var handleShowAllTagsClick = function handleShowAllTagsClick(ev) {
|
49
50
|
ev.stopPropagation();
|
50
51
|
ev.preventDefault();
|
51
|
-
setPopoverOpen
|
52
|
+
setPopoverOpen(false);
|
52
53
|
onShowAllClick();
|
53
54
|
};
|
54
55
|
var handleEscKeyPress = function handleEscKeyPress(event) {
|
55
56
|
var key = event.key;
|
56
57
|
if (key === 'Escape') {
|
57
|
-
setPopoverOpen
|
58
|
+
setPopoverOpen(false);
|
58
59
|
}
|
59
60
|
};
|
61
|
+
var handleOverflowClick = function handleOverflowClick() {
|
62
|
+
// If a custom overflow function is provided then trigger that function
|
63
|
+
// on clicking the overflow
|
64
|
+
if (onOverflowClick) {
|
65
|
+
onOverflowClick(overflowTags);
|
66
|
+
} else {
|
67
|
+
setPopoverOpen(!popoverOpen);
|
68
|
+
}
|
69
|
+
};
|
70
|
+
if (onOverflowClick) {
|
71
|
+
return /*#__PURE__*/React.createElement("span", _rollupPluginBabelHelpers.extends({}, rest, {
|
72
|
+
"aria-hidden": overflowTags.length === 0,
|
73
|
+
className: cx("".concat(blockClass), _rollupPluginBabelHelpers.defineProperty({}, "".concat(blockClass, "--hidden"), overflowTags.length === 0)),
|
74
|
+
ref: ref || localRef
|
75
|
+
}), /*#__PURE__*/React.createElement(react.OperationalTag, {
|
76
|
+
onClick: function onClick() {
|
77
|
+
return handleOverflowClick();
|
78
|
+
},
|
79
|
+
className: "".concat(blockClass, "__popover-trigger"),
|
80
|
+
size: size,
|
81
|
+
text: "+".concat(overflowTags.length)
|
82
|
+
}));
|
83
|
+
}
|
60
84
|
return /*#__PURE__*/React.createElement("span", _rollupPluginBabelHelpers.extends({}, rest, {
|
61
85
|
"aria-hidden": overflowTags.length === 0,
|
62
86
|
className: cx("".concat(blockClass), _rollupPluginBabelHelpers.defineProperty({}, "".concat(blockClass, "--hidden"), overflowTags.length === 0)),
|
@@ -71,7 +95,7 @@ var TagSetOverflow = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
71
95
|
autoAlign: overflowAutoAlign
|
72
96
|
}, /*#__PURE__*/React.createElement(react.OperationalTag, {
|
73
97
|
onClick: function onClick() {
|
74
|
-
return setPopoverOpen
|
98
|
+
return setPopoverOpen(!popoverOpen);
|
75
99
|
},
|
76
100
|
className: cx("".concat(blockClass, "__popover-trigger")),
|
77
101
|
size: size,
|
@@ -114,6 +138,10 @@ TagSetOverflow.propTypes = {
|
|
114
138
|
* className
|
115
139
|
*/
|
116
140
|
className: index.default.string,
|
141
|
+
/**
|
142
|
+
* An optional click handler that overrides the default functionality of displaying all tags in a modal
|
143
|
+
*/
|
144
|
+
onOverflowClick: index.default.func,
|
117
145
|
/**
|
118
146
|
* function to execute on clicking show all
|
119
147
|
*/
|
@@ -142,7 +170,7 @@ TagSetOverflow.propTypes = {
|
|
142
170
|
/**
|
143
171
|
* Setter function for the popoverOpen state value
|
144
172
|
*/
|
145
|
-
setPopoverOpen: index.default.func,
|
173
|
+
setPopoverOpen: index.default.func.isRequired,
|
146
174
|
/**
|
147
175
|
* label for the overflow show all tags link
|
148
176
|
*/
|
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.282+30596f136",
|
5
5
|
"license": "Apache-2.0",
|
6
6
|
"main": "lib/index.js",
|
7
7
|
"module": "es/index.js",
|
@@ -81,7 +81,7 @@
|
|
81
81
|
"fs-extra": "^11.2.0",
|
82
82
|
"glob": "^10.3.10",
|
83
83
|
"jest": "^29.7.0",
|
84
|
-
"jest-config-ibm-cloud-cognitive": "^1.10.0
|
84
|
+
"jest-config-ibm-cloud-cognitive": "^1.10.0",
|
85
85
|
"jest-environment-jsdom": "^29.7.0",
|
86
86
|
"namor": "^1.1.2",
|
87
87
|
"npm-check-updates": "^16.14.12",
|
@@ -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.47.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": "30596f136ad0ee274e0b4f55bd5fc1f1e4c40530"
|
124
124
|
}
|
package/telemetry.yml
CHANGED
@@ -18,6 +18,7 @@ collect:
|
|
18
18
|
- align
|
19
19
|
- allPageRowsLabel
|
20
20
|
- allRowsLabel
|
21
|
+
- allTagsModalAriaLabel
|
21
22
|
- allTagsModalSearchLabel
|
22
23
|
- allTagsModalSearchPlaceholderText
|
23
24
|
- allTagsModalSearchThreshold
|
@@ -131,6 +132,7 @@ collect:
|
|
131
132
|
- hasCloseIcon
|
132
133
|
- hasCustomRowHeader
|
133
134
|
- hasFieldset
|
135
|
+
- headerActions
|
134
136
|
- headerGroups
|
135
137
|
- HeaderRow
|
136
138
|
- headers
|
@@ -227,6 +229,7 @@ collect:
|
|
227
229
|
- onMouseEnter
|
228
230
|
- onMouseLeave
|
229
231
|
- onNext
|
232
|
+
- onOverflowClick
|
230
233
|
- onOverflowTagChange
|
231
234
|
- onPrimaryButtonClick
|
232
235
|
- onRemove
|
@@ -357,6 +360,7 @@ collect:
|
|
357
360
|
- totalVisibleColumns
|
358
361
|
- translateWithId
|
359
362
|
- translateWithIdBatchActions
|
363
|
+
- triggerButtonRef
|
360
364
|
- truncate
|
361
365
|
- truncateValue
|
362
366
|
- type
|
@@ -768,7 +772,6 @@ collect:
|
|
768
772
|
- secondsAgoText
|
769
773
|
- settingsIconDescription
|
770
774
|
- todayLabel
|
771
|
-
- triggerButtonRef
|
772
775
|
- yearAgoText
|
773
776
|
- yearsAgoText
|
774
777
|
- yesterdayAtText
|
@@ -883,8 +886,6 @@ collect:
|
|
883
886
|
- width
|
884
887
|
# TagOverflow
|
885
888
|
- tagComponent
|
886
|
-
# TearsheetShell
|
887
|
-
- headerActions
|
888
889
|
# Toolbar
|
889
890
|
- vertical
|
890
891
|
# ToolbarButton
|