@carbon/ibm-products 2.43.2-canary.184 → 2.43.2-canary.188
Sign up to get free protection for your applications and to get access to all the features.
- package/es/components/TagOverflow/TagOverflow.d.ts +1 -0
- package/es/components/TagOverflow/TagOverflow.js +8 -2
- package/es/components/TagOverflow/TagOverflowPopover.d.ts +1 -0
- package/es/components/TagOverflow/TagOverflowPopover.js +7 -1
- package/lib/components/TagOverflow/TagOverflow.d.ts +1 -0
- package/lib/components/TagOverflow/TagOverflow.js +8 -2
- package/lib/components/TagOverflow/TagOverflowPopover.d.ts +1 -0
- package/lib/components/TagOverflow/TagOverflowPopover.js +7 -1
- package/package.json +4 -4
@@ -20,6 +20,7 @@ export interface TagOverflowProps {
|
|
20
20
|
allTagsModalSearchPlaceholderText?: string;
|
21
21
|
allTagsModalTarget?: ReactNode;
|
22
22
|
allTagsModalTitle?: string;
|
23
|
+
autoAlign?: boolean;
|
23
24
|
className?: string;
|
24
25
|
containingElementRef?: RefObject<HTMLElement>;
|
25
26
|
items: TagOverflowItem[];
|
@@ -18,7 +18,7 @@ import { isRequiredIf } from '../../global/js/utils/props-helper.js';
|
|
18
18
|
import { pkg } from '../../settings.js';
|
19
19
|
import { useResizeObserver } from '../../global/js/hooks/useResizeObserver.js';
|
20
20
|
|
21
|
-
var _excluded = ["align", "allTagsModalSearchLabel", "allTagsModalSearchPlaceholderText", "allTagsModalTarget", "allTagsModalTitle", "className", "containingElementRef", "items", "maxVisible", "measurementOffset", "multiline", "overflowAlign", "overflowClassName", "overflowType", "onOverflowTagChange", "showAllTagsLabel", "tagComponent"],
|
21
|
+
var _excluded = ["align", "allTagsModalSearchLabel", "allTagsModalSearchPlaceholderText", "allTagsModalTarget", "allTagsModalTitle", "autoAlign", "className", "containingElementRef", "items", "maxVisible", "measurementOffset", "multiline", "overflowAlign", "overflowClassName", "overflowType", "onOverflowTagChange", "showAllTagsLabel", "tagComponent"],
|
22
22
|
_excluded2 = ["className", "id"],
|
23
23
|
_excluded3 = ["tagType"],
|
24
24
|
_excluded4 = ["id", "label", "tagType", "onClose"];
|
@@ -32,6 +32,7 @@ var TagOverflow = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
32
32
|
allTagsModalSearchPlaceholderText = props.allTagsModalSearchPlaceholderText,
|
33
33
|
allTagsModalTarget = props.allTagsModalTarget,
|
34
34
|
allTagsModalTitle = props.allTagsModalTitle,
|
35
|
+
autoAlign = props.autoAlign,
|
35
36
|
className = props.className,
|
36
37
|
containingElementRef = props.containingElementRef,
|
37
38
|
items = props.items,
|
@@ -212,7 +213,8 @@ var TagOverflow = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
212
213
|
key: "tag-overflow-popover",
|
213
214
|
ref: overflowRef,
|
214
215
|
popoverOpen: popoverOpen,
|
215
|
-
setPopoverOpen: setPopoverOpen
|
216
|
+
setPopoverOpen: setPopoverOpen,
|
217
|
+
autoAlign: autoAlign
|
216
218
|
}), /*#__PURE__*/React__default.createElement(TagOverflowModal, {
|
217
219
|
allTags: items,
|
218
220
|
open: showAllModalOpen,
|
@@ -266,6 +268,10 @@ TagOverflow.propTypes = {
|
|
266
268
|
* title for the show all modal. **Note: Required if more than 10 tags**
|
267
269
|
*/
|
268
270
|
allTagsModalTitle: string_required_if_more_than_10_tags,
|
271
|
+
/**
|
272
|
+
* Will auto-align the popover on first render if it is not visible. This prop is currently experimental and is subject to future changes.
|
273
|
+
*/
|
274
|
+
autoAlign: PropTypes.bool,
|
269
275
|
/**
|
270
276
|
* Provide an optional class to be applied to the containing node.
|
271
277
|
*/
|
@@ -13,13 +13,14 @@ import { Popover, Tag, 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", "overflowTags", "overflowType", "showAllTagsLabel", "popoverOpen", "setPopoverOpen"],
|
16
|
+
var _excluded = ["allTagsModalSearchThreshold", "autoAlign", "className", "onShowAllClick", "overflowAlign", "overflowTags", "overflowType", "showAllTagsLabel", "popoverOpen", "setPopoverOpen"],
|
17
17
|
_excluded2 = ["label", "id", "tagType", "filter", "onClose"];
|
18
18
|
var componentName = 'TagOverflowPopover';
|
19
19
|
var blockClass = "".concat(pkg.prefix, "--tag-overflow-popover");
|
20
20
|
var TagOverflowPopover = /*#__PURE__*/forwardRef(function (props, ref) {
|
21
21
|
var _overflowTags$length;
|
22
22
|
var allTagsModalSearchThreshold = props.allTagsModalSearchThreshold,
|
23
|
+
autoAlign = props.autoAlign,
|
23
24
|
className = props.className,
|
24
25
|
onShowAllClick = props.onShowAllClick,
|
25
26
|
overflowAlign = props.overflowAlign,
|
@@ -62,6 +63,7 @@ var TagOverflowPopover = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
62
63
|
ref: ref || localRef
|
63
64
|
}), /*#__PURE__*/React__default.createElement(Popover, {
|
64
65
|
align: overflowAlign,
|
66
|
+
autoAlign: autoAlign,
|
65
67
|
className: cx(className, "".concat(blockClass, "__el")),
|
66
68
|
dropShadow: true,
|
67
69
|
highContrast: true,
|
@@ -109,6 +111,10 @@ TagOverflowPopover.propTypes = {
|
|
109
111
|
* count of overflowTags over which a modal is offered
|
110
112
|
*/
|
111
113
|
allTagsModalSearchThreshold: PropTypes.number,
|
114
|
+
/**
|
115
|
+
* Will auto-align the popover on first render if it is not visible. This prop is currently experimental and is subject to future changes.
|
116
|
+
*/
|
117
|
+
autoAlign: PropTypes.bool,
|
112
118
|
/**
|
113
119
|
* className
|
114
120
|
*/
|
@@ -20,6 +20,7 @@ export interface TagOverflowProps {
|
|
20
20
|
allTagsModalSearchPlaceholderText?: string;
|
21
21
|
allTagsModalTarget?: ReactNode;
|
22
22
|
allTagsModalTitle?: string;
|
23
|
+
autoAlign?: boolean;
|
23
24
|
className?: string;
|
24
25
|
containingElementRef?: RefObject<HTMLElement>;
|
25
26
|
items: TagOverflowItem[];
|
@@ -27,7 +27,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
27
27
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
28
28
|
var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
29
29
|
|
30
|
-
var _excluded = ["align", "allTagsModalSearchLabel", "allTagsModalSearchPlaceholderText", "allTagsModalTarget", "allTagsModalTitle", "className", "containingElementRef", "items", "maxVisible", "measurementOffset", "multiline", "overflowAlign", "overflowClassName", "overflowType", "onOverflowTagChange", "showAllTagsLabel", "tagComponent"],
|
30
|
+
var _excluded = ["align", "allTagsModalSearchLabel", "allTagsModalSearchPlaceholderText", "allTagsModalTarget", "allTagsModalTitle", "autoAlign", "className", "containingElementRef", "items", "maxVisible", "measurementOffset", "multiline", "overflowAlign", "overflowClassName", "overflowType", "onOverflowTagChange", "showAllTagsLabel", "tagComponent"],
|
31
31
|
_excluded2 = ["className", "id"],
|
32
32
|
_excluded3 = ["tagType"],
|
33
33
|
_excluded4 = ["id", "label", "tagType", "onClose"];
|
@@ -41,6 +41,7 @@ exports.TagOverflow = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
41
41
|
allTagsModalSearchPlaceholderText = props.allTagsModalSearchPlaceholderText,
|
42
42
|
allTagsModalTarget = props.allTagsModalTarget,
|
43
43
|
allTagsModalTitle = props.allTagsModalTitle,
|
44
|
+
autoAlign = props.autoAlign,
|
44
45
|
className = props.className,
|
45
46
|
containingElementRef = props.containingElementRef,
|
46
47
|
items = props.items,
|
@@ -221,7 +222,8 @@ exports.TagOverflow = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
221
222
|
key: "tag-overflow-popover",
|
222
223
|
ref: overflowRef,
|
223
224
|
popoverOpen: popoverOpen,
|
224
|
-
setPopoverOpen: setPopoverOpen
|
225
|
+
setPopoverOpen: setPopoverOpen,
|
226
|
+
autoAlign: autoAlign
|
225
227
|
}), /*#__PURE__*/React__default["default"].createElement(TagOverflowModal.TagOverflowModal, {
|
226
228
|
allTags: items,
|
227
229
|
open: showAllModalOpen,
|
@@ -275,6 +277,10 @@ exports.TagOverflow.propTypes = {
|
|
275
277
|
* title for the show all modal. **Note: Required if more than 10 tags**
|
276
278
|
*/
|
277
279
|
allTagsModalTitle: string_required_if_more_than_10_tags,
|
280
|
+
/**
|
281
|
+
* Will auto-align the popover on first render if it is not visible. This prop is currently experimental and is subject to future changes.
|
282
|
+
*/
|
283
|
+
autoAlign: index["default"].bool,
|
278
284
|
/**
|
279
285
|
* Provide an optional class to be applied to the containing node.
|
280
286
|
*/
|
@@ -22,13 +22,14 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
22
22
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
23
23
|
var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
24
24
|
|
25
|
-
var _excluded = ["allTagsModalSearchThreshold", "className", "onShowAllClick", "overflowAlign", "overflowTags", "overflowType", "showAllTagsLabel", "popoverOpen", "setPopoverOpen"],
|
25
|
+
var _excluded = ["allTagsModalSearchThreshold", "autoAlign", "className", "onShowAllClick", "overflowAlign", "overflowTags", "overflowType", "showAllTagsLabel", "popoverOpen", "setPopoverOpen"],
|
26
26
|
_excluded2 = ["label", "id", "tagType", "filter", "onClose"];
|
27
27
|
var componentName = 'TagOverflowPopover';
|
28
28
|
var blockClass = "".concat(settings.pkg.prefix, "--tag-overflow-popover");
|
29
29
|
var TagOverflowPopover = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
30
30
|
var _overflowTags$length;
|
31
31
|
var allTagsModalSearchThreshold = props.allTagsModalSearchThreshold,
|
32
|
+
autoAlign = props.autoAlign,
|
32
33
|
className = props.className,
|
33
34
|
onShowAllClick = props.onShowAllClick,
|
34
35
|
overflowAlign = props.overflowAlign,
|
@@ -71,6 +72,7 @@ var TagOverflowPopover = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
71
72
|
ref: ref || localRef
|
72
73
|
}), /*#__PURE__*/React__default["default"].createElement(react.Popover, {
|
73
74
|
align: overflowAlign,
|
75
|
+
autoAlign: autoAlign,
|
74
76
|
className: cx__default["default"](className, "".concat(blockClass, "__el")),
|
75
77
|
dropShadow: true,
|
76
78
|
highContrast: true,
|
@@ -118,6 +120,10 @@ TagOverflowPopover.propTypes = {
|
|
118
120
|
* count of overflowTags over which a modal is offered
|
119
121
|
*/
|
120
122
|
allTagsModalSearchThreshold: index["default"].number,
|
123
|
+
/**
|
124
|
+
* Will auto-align the popover on first render if it is not visible. This prop is currently experimental and is subject to future changes.
|
125
|
+
*/
|
126
|
+
autoAlign: index["default"].bool,
|
121
127
|
/**
|
122
128
|
* className
|
123
129
|
*/
|
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.188+c7d1ef37a",
|
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.7.0
|
84
|
+
"jest-config-ibm-cloud-cognitive": "^1.7.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.20.0",
|
99
|
-
"@carbon/ibm-products-styles": "^2.44.0
|
99
|
+
"@carbon/ibm-products-styles": "^2.44.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": "c7d1ef37a22f3820dd22ad97cd247c169fdc97b4"
|
124
124
|
}
|