@carbon/ibm-products 2.43.2-canary.209 → 2.43.2-canary.210

Sign up to get free protection for your applications and to get access to all the features.
@@ -58,6 +58,10 @@ export interface TagSetProps extends PropsWithChildren {
58
58
  * overflowAlign from the standard tooltip. Default center.
59
59
  */
60
60
  overflowAlign?: OverflowAlign;
61
+ /**
62
+ * Will auto-align the popover on first render if it is not visible. This prop is currently experimental and is subject to future changes.
63
+ */
64
+ overflowAutoAlign?: boolean;
61
65
  /**
62
66
  * overflowClassName for the tooltip popup
63
67
  */
@@ -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", "overflowAlign", "overflowClassName", "overflowType", "allTagsModalTitle", "allTagsModalSearchLabel", "allTagsModalSearchPlaceholderText", "showAllTagsLabel", "tags", "containingElementRef", "measurementOffset", "onOverflowTagChange"],
20
+ var _excluded = ["align", "allTagsModalTarget", "className", "maxVisible", "multiline", "overflowAutoAlign", "overflowAlign", "overflowClassName", "overflowType", "allTagsModalTitle", "allTagsModalSearchLabel", "allTagsModalSearchPlaceholderText", "showAllTagsLabel", "tags", "containingElementRef", "measurementOffset", "onOverflowTagChange"],
21
21
  _excluded2 = ["label", "id"],
22
22
  _excluded3 = ["label", "onClose"];
23
23
  var componentName = 'TagSet';
@@ -39,6 +39,7 @@ var TagSet = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
39
39
  className = _ref.className,
40
40
  maxVisible = _ref.maxVisible,
41
41
  multiline = _ref.multiline,
42
+ overflowAutoAlign = _ref.overflowAutoAlign,
42
43
  _ref$overflowAlign = _ref.overflowAlign,
43
44
  overflowAlign = _ref$overflowAlign === void 0 ? 'bottom' : _ref$overflowAlign,
44
45
  overflowClassName = _ref.overflowClassName,
@@ -145,6 +146,7 @@ var TagSet = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
145
146
  });
146
147
  newDisplayedTags.push( /*#__PURE__*/React__default.createElement(TagSetOverflow, {
147
148
  allTagsModalSearchThreshold: allTagsModalSearchThreshold,
149
+ overflowAutoAlign: overflowAutoAlign,
148
150
  className: overflowClassName,
149
151
  onShowAllClick: handleShowAllClick,
150
152
  overflowTags: newOverflowTags,
@@ -158,7 +160,7 @@ var TagSet = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
158
160
  }));
159
161
  onOverflowTagChange === null || onOverflowTagChange === void 0 || onOverflowTagChange(newOverflowTags);
160
162
  setDisplayedTags(newDisplayedTags);
161
- }, [displayCount, overflowAlign, overflowClassName, overflowType, showAllTagsLabel, tags, onOverflowTagChange, popoverOpen, handleTagOnClose]);
163
+ }, [displayCount, overflowAlign, overflowClassName, overflowType, showAllTagsLabel, tags, onOverflowTagChange, popoverOpen, handleTagOnClose, overflowAutoAlign]);
162
164
  var checkFullyVisibleTags = useCallback(function () {
163
165
  if (multiline) {
164
166
  return setDisplayCount(maxVisible || 3);
@@ -321,6 +323,10 @@ TagSet.propTypes = {
321
323
  * overflowAlign from the standard tooltip. Default center.
322
324
  */
323
325
  overflowAlign: PropTypes.oneOf(['top', 'top-left', 'top-right', 'bottom', 'bottom-left', 'bottom-right', 'left', 'left-bottom', 'left-top', 'right', 'right-bottom', 'right-top']),
326
+ /**
327
+ * Will auto-align the popover on first render if it is not visible. This prop is currently experimental and is subject to future changes.
328
+ */
329
+ overflowAutoAlign: PropTypes.bool,
324
330
  /**
325
331
  * overflowClassName for the tooltip popup
326
332
  */
@@ -26,6 +26,10 @@ interface TagSetOverflowProps {
26
26
  * Type of rendering displayed inside of the tag overflow component
27
27
  */
28
28
  overflowType?: OverflowType;
29
+ /**
30
+ * Will auto-align the popover on first render if it is not visible. This prop is currently experimental and is subject to future changes.
31
+ */
32
+ overflowAutoAlign?: boolean;
29
33
  /**
30
34
  * Open state of the popover
31
35
  */
@@ -13,7 +13,7 @@ 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", "className", "onShowAllClick", "overflowAlign", "overflowAutoAlign", "overflowTags", "overflowType", "showAllTagsLabel", "popoverOpen", "setPopoverOpen"];
17
17
  var componentName = 'TagSetOverflow';
18
18
  var blockClass = "".concat(pkg.prefix, "--tag-set-overflow");
19
19
 
@@ -28,6 +28,7 @@ var TagSetOverflow = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
28
28
  onShowAllClick = _ref.onShowAllClick,
29
29
  _ref$overflowAlign = _ref.overflowAlign,
30
30
  overflowAlign = _ref$overflowAlign === void 0 ? 'bottom' : _ref$overflowAlign,
31
+ overflowAutoAlign = _ref.overflowAutoAlign,
31
32
  overflowTags = _ref.overflowTags,
32
33
  overflowType = _ref.overflowType,
33
34
  showAllTagsLabel = _ref.showAllTagsLabel,
@@ -63,7 +64,8 @@ var TagSetOverflow = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
63
64
  dropShadow: true,
64
65
  highContrast: true,
65
66
  onKeyDown: handleEscKeyPress,
66
- open: popoverOpen
67
+ open: popoverOpen,
68
+ autoAlign: overflowAutoAlign
67
69
  }, /*#__PURE__*/React__default.createElement(Tag, {
68
70
  onClick: function onClick() {
69
71
  return setPopoverOpen === null || setPopoverOpen === void 0 ? void 0 : setPopoverOpen(!popoverOpen);
@@ -115,6 +117,10 @@ TagSetOverflow.propTypes = {
115
117
  * overflowAlign from the standard tooltip
116
118
  */
117
119
  overflowAlign: PropTypes.oneOf(['top', 'top-left', 'top-right', 'bottom', 'bottom-left', 'bottom-right', 'left', 'left-bottom', 'left-top', 'right', 'right-bottom', 'right-top']),
120
+ /**
121
+ * Will auto-align the popover on first render if it is not visible. This prop is currently experimental and is subject to future changes.
122
+ */
123
+ overflowAutoAlign: PropTypes.bool,
118
124
  /**
119
125
  * tags shown in overflow
120
126
  */
@@ -58,6 +58,10 @@ export interface TagSetProps extends PropsWithChildren {
58
58
  * overflowAlign from the standard tooltip. Default center.
59
59
  */
60
60
  overflowAlign?: OverflowAlign;
61
+ /**
62
+ * Will auto-align the popover on first render if it is not visible. This prop is currently experimental and is subject to future changes.
63
+ */
64
+ overflowAutoAlign?: boolean;
61
65
  /**
62
66
  * overflowClassName for the tooltip popup
63
67
  */
@@ -26,7 +26,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
26
26
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
27
27
  var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
28
28
 
29
- var _excluded = ["align", "allTagsModalTarget", "className", "maxVisible", "multiline", "overflowAlign", "overflowClassName", "overflowType", "allTagsModalTitle", "allTagsModalSearchLabel", "allTagsModalSearchPlaceholderText", "showAllTagsLabel", "tags", "containingElementRef", "measurementOffset", "onOverflowTagChange"],
29
+ var _excluded = ["align", "allTagsModalTarget", "className", "maxVisible", "multiline", "overflowAutoAlign", "overflowAlign", "overflowClassName", "overflowType", "allTagsModalTitle", "allTagsModalSearchLabel", "allTagsModalSearchPlaceholderText", "showAllTagsLabel", "tags", "containingElementRef", "measurementOffset", "onOverflowTagChange"],
30
30
  _excluded2 = ["label", "id"],
31
31
  _excluded3 = ["label", "onClose"];
32
32
  var componentName = 'TagSet';
@@ -48,6 +48,7 @@ exports.TagSet = /*#__PURE__*/React__default["default"].forwardRef(function (_re
48
48
  className = _ref.className,
49
49
  maxVisible = _ref.maxVisible,
50
50
  multiline = _ref.multiline,
51
+ overflowAutoAlign = _ref.overflowAutoAlign,
51
52
  _ref$overflowAlign = _ref.overflowAlign,
52
53
  overflowAlign = _ref$overflowAlign === void 0 ? 'bottom' : _ref$overflowAlign,
53
54
  overflowClassName = _ref.overflowClassName,
@@ -154,6 +155,7 @@ exports.TagSet = /*#__PURE__*/React__default["default"].forwardRef(function (_re
154
155
  });
155
156
  newDisplayedTags.push( /*#__PURE__*/React__default["default"].createElement(TagSetOverflow.TagSetOverflow, {
156
157
  allTagsModalSearchThreshold: allTagsModalSearchThreshold,
158
+ overflowAutoAlign: overflowAutoAlign,
157
159
  className: overflowClassName,
158
160
  onShowAllClick: handleShowAllClick,
159
161
  overflowTags: newOverflowTags,
@@ -167,7 +169,7 @@ exports.TagSet = /*#__PURE__*/React__default["default"].forwardRef(function (_re
167
169
  }));
168
170
  onOverflowTagChange === null || onOverflowTagChange === void 0 || onOverflowTagChange(newOverflowTags);
169
171
  setDisplayedTags(newDisplayedTags);
170
- }, [displayCount, overflowAlign, overflowClassName, overflowType, showAllTagsLabel, tags, onOverflowTagChange, popoverOpen, handleTagOnClose]);
172
+ }, [displayCount, overflowAlign, overflowClassName, overflowType, showAllTagsLabel, tags, onOverflowTagChange, popoverOpen, handleTagOnClose, overflowAutoAlign]);
171
173
  var checkFullyVisibleTags = React.useCallback(function () {
172
174
  if (multiline) {
173
175
  return setDisplayCount(maxVisible || 3);
@@ -330,6 +332,10 @@ exports.TagSet.propTypes = {
330
332
  * overflowAlign from the standard tooltip. Default center.
331
333
  */
332
334
  overflowAlign: index["default"].oneOf(['top', 'top-left', 'top-right', 'bottom', 'bottom-left', 'bottom-right', 'left', 'left-bottom', 'left-top', 'right', 'right-bottom', 'right-top']),
335
+ /**
336
+ * Will auto-align the popover on first render if it is not visible. This prop is currently experimental and is subject to future changes.
337
+ */
338
+ overflowAutoAlign: index["default"].bool,
333
339
  /**
334
340
  * overflowClassName for the tooltip popup
335
341
  */
@@ -26,6 +26,10 @@ interface TagSetOverflowProps {
26
26
  * Type of rendering displayed inside of the tag overflow component
27
27
  */
28
28
  overflowType?: OverflowType;
29
+ /**
30
+ * Will auto-align the popover on first render if it is not visible. This prop is currently experimental and is subject to future changes.
31
+ */
32
+ overflowAutoAlign?: boolean;
29
33
  /**
30
34
  * Open state of the popover
31
35
  */
@@ -22,7 +22,7 @@ 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", "className", "onShowAllClick", "overflowAlign", "overflowAutoAlign", "overflowTags", "overflowType", "showAllTagsLabel", "popoverOpen", "setPopoverOpen"];
26
26
  var componentName = 'TagSetOverflow';
27
27
  var blockClass = "".concat(settings.pkg.prefix, "--tag-set-overflow");
28
28
 
@@ -37,6 +37,7 @@ var TagSetOverflow = /*#__PURE__*/React__default["default"].forwardRef(function
37
37
  onShowAllClick = _ref.onShowAllClick,
38
38
  _ref$overflowAlign = _ref.overflowAlign,
39
39
  overflowAlign = _ref$overflowAlign === void 0 ? 'bottom' : _ref$overflowAlign,
40
+ overflowAutoAlign = _ref.overflowAutoAlign,
40
41
  overflowTags = _ref.overflowTags,
41
42
  overflowType = _ref.overflowType,
42
43
  showAllTagsLabel = _ref.showAllTagsLabel,
@@ -72,7 +73,8 @@ var TagSetOverflow = /*#__PURE__*/React__default["default"].forwardRef(function
72
73
  dropShadow: true,
73
74
  highContrast: true,
74
75
  onKeyDown: handleEscKeyPress,
75
- open: popoverOpen
76
+ open: popoverOpen,
77
+ autoAlign: overflowAutoAlign
76
78
  }, /*#__PURE__*/React__default["default"].createElement(react.Tag, {
77
79
  onClick: function onClick() {
78
80
  return setPopoverOpen === null || setPopoverOpen === void 0 ? void 0 : setPopoverOpen(!popoverOpen);
@@ -124,6 +126,10 @@ TagSetOverflow.propTypes = {
124
126
  * overflowAlign from the standard tooltip
125
127
  */
126
128
  overflowAlign: index["default"].oneOf(['top', 'top-left', 'top-right', 'bottom', 'bottom-left', 'bottom-right', 'left', 'left-bottom', 'left-top', 'right', 'right-bottom', 'right-top']),
129
+ /**
130
+ * Will auto-align the popover on first render if it is not visible. This prop is currently experimental and is subject to future changes.
131
+ */
132
+ overflowAutoAlign: index["default"].bool,
127
133
  /**
128
134
  * tags shown in overflow
129
135
  */
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.209+068a7df53",
4
+ "version": "2.43.2-canary.210+fac868b0b",
5
5
  "license": "Apache-2.0",
6
6
  "main": "lib/index.js",
7
7
  "module": "es/index.js",
@@ -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": "068a7df53265e71193ef583145c69d17b3f76535"
123
+ "gitHead": "fac868b0bb3382aac79ab2780480d58e901da517"
124
124
  }