@carbon/ibm-products 2.76.0 → 2.77.0

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.
Files changed (72) hide show
  1. package/es/components/AddSelect/AddSelect.d.ts +1 -0
  2. package/es/components/AddSelect/AddSelectBody.d.ts +1 -0
  3. package/es/components/AddSelect/AddSelectBody.js +4 -0
  4. package/es/components/BigNumber/index.d.ts +1 -0
  5. package/es/components/Coachmark/next/Coachmark/CoachmarkContent.js +5 -5
  6. package/es/components/Coachmark/next/Coachmark/CoachmarkTagline/CoachmarkTagline.d.ts +4 -0
  7. package/es/components/Coachmark/next/Coachmark/CoachmarkTagline/CoachmarkTagline.js +6 -1
  8. package/es/components/ConditionBuilder/index.d.ts +8 -2
  9. package/es/components/EmptyStates/EmptyState.d.ts +2 -2
  10. package/es/components/EmptyStates/EmptyState.js +2 -2
  11. package/es/components/EmptyStates/EmptyStateContent.d.ts +2 -2
  12. package/es/components/EmptyStates/EmptyStateContent.js +2 -2
  13. package/es/components/Guidebanner/Guidebanner.d.ts +9 -1
  14. package/es/components/Guidebanner/Guidebanner.js +18 -7
  15. package/es/components/MultiAddSelect/MultiAddSelect.d.ts +4 -0
  16. package/es/components/MultiAddSelect/MultiAddSelect.js +4 -0
  17. package/es/components/PageHeader/next/PageHeader.js +6 -5
  18. package/es/components/PageHeader/next/overflowHandler.d.ts +5 -0
  19. package/es/components/PageHeader/next/overflowHandler.js +8 -0
  20. package/es/components/SingleAddSelect/SingleAddSelect.d.ts +4 -0
  21. package/es/components/SingleAddSelect/SingleAddSelect.js +4 -0
  22. package/es/components/TruncatedList/TruncatedList.d.ts +1 -1
  23. package/es/components/index.d.ts +10 -9
  24. package/es/global/js/utils/carousel/types.d.ts +1 -0
  25. package/es/index.d.ts +1 -1
  26. package/es/index.js +10 -18
  27. package/lib/components/AddSelect/AddSelect.d.ts +1 -0
  28. package/lib/components/AddSelect/AddSelectBody.d.ts +1 -0
  29. package/lib/components/AddSelect/AddSelectBody.js +4 -0
  30. package/lib/components/BigNumber/index.d.ts +1 -0
  31. package/lib/components/Coachmark/next/Coachmark/CoachmarkContent.js +5 -5
  32. package/lib/components/Coachmark/next/Coachmark/CoachmarkTagline/CoachmarkTagline.d.ts +4 -0
  33. package/lib/components/Coachmark/next/Coachmark/CoachmarkTagline/CoachmarkTagline.js +6 -1
  34. package/lib/components/ConditionBuilder/index.d.ts +8 -2
  35. package/lib/components/EmptyStates/EmptyState.d.ts +2 -2
  36. package/lib/components/EmptyStates/EmptyState.js +2 -2
  37. package/lib/components/EmptyStates/EmptyStateContent.d.ts +2 -2
  38. package/lib/components/EmptyStates/EmptyStateContent.js +2 -2
  39. package/lib/components/Guidebanner/Guidebanner.d.ts +9 -1
  40. package/lib/components/Guidebanner/Guidebanner.js +18 -7
  41. package/lib/components/MultiAddSelect/MultiAddSelect.d.ts +4 -0
  42. package/lib/components/MultiAddSelect/MultiAddSelect.js +4 -0
  43. package/lib/components/PageHeader/next/PageHeader.js +5 -4
  44. package/lib/components/PageHeader/next/overflowHandler.d.ts +5 -0
  45. package/lib/components/PageHeader/next/overflowHandler.js +8 -0
  46. package/lib/components/SingleAddSelect/SingleAddSelect.d.ts +4 -0
  47. package/lib/components/SingleAddSelect/SingleAddSelect.js +4 -0
  48. package/lib/components/TruncatedList/TruncatedList.d.ts +1 -1
  49. package/lib/components/index.d.ts +10 -9
  50. package/lib/global/js/utils/carousel/types.d.ts +1 -0
  51. package/lib/index.d.ts +1 -1
  52. package/lib/index.js +31 -27
  53. package/package.json +7 -6
  54. package/telemetry.yml +1 -0
  55. package/es/components/BigNumber/index.js +0 -8
  56. package/es/components/ConditionBuilder/index.js +0 -8
  57. package/es/components/DataSpreadsheet/index.js +0 -8
  58. package/es/components/Decorator/index.js +0 -8
  59. package/es/components/DelimitedList/index.js +0 -8
  60. package/es/components/GetStartedCard/index.js +0 -8
  61. package/es/components/NonLinearReading/index.js +0 -8
  62. package/es/components/SearchBar/index.js +0 -8
  63. package/es/components/TruncatedList/index.js +0 -8
  64. package/lib/components/BigNumber/index.js +0 -14
  65. package/lib/components/ConditionBuilder/index.js +0 -14
  66. package/lib/components/DataSpreadsheet/index.js +0 -14
  67. package/lib/components/Decorator/index.js +0 -17
  68. package/lib/components/DelimitedList/index.js +0 -14
  69. package/lib/components/GetStartedCard/index.js +0 -14
  70. package/lib/components/NonLinearReading/index.js +0 -14
  71. package/lib/components/SearchBar/index.js +0 -14
  72. package/lib/components/TruncatedList/index.js +0 -14
@@ -28,6 +28,7 @@ export interface AddSelectProps {
28
28
  noResultsTitle: string;
29
29
  noSelectionDescription?: string;
30
30
  noSelectionTitle?: string;
31
+ noTearsheet?: boolean;
31
32
  onClose: () => void;
32
33
  onCloseButtonText: string;
33
34
  onSubmit: () => void;
@@ -29,6 +29,7 @@ export interface AddSelectBodyProps {
29
29
  noResultsTitle?: string;
30
30
  noSelectionDescription?: string;
31
31
  noSelectionTitle?: string;
32
+ noTearsheet?: boolean;
32
33
  normalizedItems?: object;
33
34
  onClose?: () => void;
34
35
  onCloseButtonText?: string;
@@ -64,6 +64,7 @@ const AddSelectBody = /*#__PURE__*/forwardRef((_ref, ref) => {
64
64
  noResultsTitle,
65
65
  noSelectionDescription,
66
66
  noSelectionTitle,
67
+ noTearsheet = false,
67
68
  normalizedItems,
68
69
  onClose,
69
70
  onCloseButtonText,
@@ -279,6 +280,9 @@ const AddSelectBody = /*#__PURE__*/forwardRef((_ref, ref) => {
279
280
  title: noResultsTitle,
280
281
  illustrationTheme: illustrationTheme
281
282
  }))));
283
+ if (noTearsheet) {
284
+ return body;
285
+ }
282
286
  if (multi) {
283
287
  return /*#__PURE__*/React__default.createElement(Tearsheet, _extends({}, commonTearsheetProps, {
284
288
  influencer: multi && /*#__PURE__*/React__default.createElement(AddSelectSidebar, sidebarProps),
@@ -5,3 +5,4 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
  export { BigNumber } from './BigNumber';
8
+ export type { BigNumberProps } from './BigNumber';
@@ -36,9 +36,9 @@ const CoachmarkContent = /*#__PURE__*/forwardRef((props, ref) => {
36
36
  } = useContext(CoachmarkContext);
37
37
  const targetId = open ? triggerRef?.current?.id : null;
38
38
  const handleRef = useRef(null);
39
- const bubbleRef = ref && typeof ref !== 'function' ? ref : handleRef;
39
+ const bubbleRef = ref || handleRef;
40
40
  useEffect(() => {
41
- if (open && bubbleRef.current) {
41
+ if (open && 'current' in bubbleRef && bubbleRef.current) {
42
42
  requestAnimationFrame(() => {
43
43
  const contentBody = bubbleRef.current?.querySelector(`.${contentBodyClass}`);
44
44
  if (contentBody) {
@@ -52,7 +52,7 @@ const CoachmarkContent = /*#__PURE__*/forwardRef((props, ref) => {
52
52
  useEffect(() => {
53
53
  const handleOutsideClick = event => {
54
54
  const targetElement = document.getElementById(targetId || '');
55
- const bubbleElement = bubbleRef.current;
55
+ const bubbleElement = bubbleRef && 'current' in bubbleRef ? bubbleRef.current : null;
56
56
  if (bubbleElement && !bubbleElement.contains(event.target) && targetElement && !targetElement.contains(event.target)) {
57
57
  setOpen?.(false);
58
58
  }
@@ -73,14 +73,14 @@ const CoachmarkContent = /*#__PURE__*/forwardRef((props, ref) => {
73
73
  // eslint-disable-next-line react-hooks/exhaustive-deps
74
74
  }, [open, targetId, setOpen]);
75
75
  useEffect(() => {
76
- if (open && bubbleRef.current) {
76
+ if (open && 'current' in bubbleRef && bubbleRef.current) {
77
77
  const dragContainer = bubbleRef.current.querySelector(`.${pkg.prefix}__bubble`);
78
78
  if (dragContainer instanceof HTMLElement) {
79
79
  setContentRef(dragContainer);
80
80
  }
81
81
  }
82
82
  // eslint-disable-next-line react-hooks/exhaustive-deps
83
- }, [open, bubbleRef.current]);
83
+ }, [open, bubbleRef]);
84
84
  return open && /*#__PURE__*/React__default.createElement("div", {
85
85
  ref: bubbleRef
86
86
  }, /*#__PURE__*/React__default.createElement(CoachmarkBubble, _extends({
@@ -30,6 +30,10 @@ export interface CoachmarkTaglineProps {
30
30
  * button props
31
31
  */
32
32
  buttonProps?: CoachmarkButtonProps;
33
+ /**
34
+ * Optional class name for this component.
35
+ */
36
+ className?: string;
33
37
  isOpen?: boolean;
34
38
  }
35
39
  /**
@@ -34,10 +34,11 @@ const CoachmarkTagline = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
34
34
  title,
35
35
  buttonProps,
36
36
  isOpen,
37
+ className,
37
38
  ...rest
38
39
  } = _ref;
39
40
  return /*#__PURE__*/React__default.createElement("div", _extends({}, rest, {
40
- className: cx(blockClass, isOpen && `${blockClass}--is-open`),
41
+ className: cx(blockClass, isOpen && `${blockClass}--is-open`, className),
41
42
  ref: ref
42
43
  }, getDevtoolsProps(componentName)), /*#__PURE__*/React__default.createElement("button", _extends({
43
44
  className: `${blockClass}__cta`,
@@ -80,6 +81,10 @@ CoachmarkTagline.propTypes = {
80
81
  tabIndex: PropTypes.number,
81
82
  ['aria-expanded']: PropTypes.bool
82
83
  }),
84
+ /**
85
+ * Optional class name for this component.
86
+ */
87
+ className: PropTypes.string,
83
88
  /**
84
89
  * Tooltip text and aria label for the Close button icon.
85
90
  */
@@ -1,2 +1,8 @@
1
- export { ConditionBuilder } from "./ConditionBuilder";
2
- export * from "./ConditionBuilder.types";
1
+ /**
2
+ * Copyright IBM Corp. 2024, 2024
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
+ export { ConditionBuilder } from './ConditionBuilder';
8
+ export * from './ConditionBuilder.types';
@@ -61,11 +61,11 @@ export interface EmptyStateProps {
61
61
  /**
62
62
  * Empty state subtitle
63
63
  */
64
- subtitle?: string | ReactNode;
64
+ subtitle?: ReactNode;
65
65
  /**
66
66
  * Empty state title
67
67
  */
68
- title: string | ReactNode;
68
+ title: ReactNode;
69
69
  /**
70
70
  * **Deprecated:** Designates which version of the EmptyState component is being used. Refer to V2 documentation separately.
71
71
  * @deprecated
@@ -121,11 +121,11 @@ EmptyState.propTypes = {
121
121
  /**
122
122
  * Empty state subtext
123
123
  */
124
- subtitle: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
124
+ subtitle: PropTypes.node,
125
125
  /**
126
126
  * Empty state heading
127
127
  */
128
- title: PropTypes.oneOfType([PropTypes.string, PropTypes.node]).isRequired,
128
+ title: PropTypes.node.isRequired,
129
129
  /**
130
130
  * **Deprecated:** Designates which version of the EmptyState component is being used. Refer to V2 documentation separately.
131
131
  * @deprecated
@@ -26,11 +26,11 @@ interface EmptyStateProps {
26
26
  /**
27
27
  * Empty state subtitle
28
28
  */
29
- subtitle?: string | ReactNode;
29
+ subtitle?: ReactNode;
30
30
  /**
31
31
  * Empty state title
32
32
  */
33
- title: string | ReactNode;
33
+ title: ReactNode;
34
34
  }
35
35
  export declare const EmptyStateContent: {
36
36
  (props: EmptyStateProps): React.JSX.Element;
@@ -83,11 +83,11 @@ EmptyStateContent.propTypes = {
83
83
  /**
84
84
  * Empty state subtitle
85
85
  */
86
- subtitle: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
86
+ subtitle: PropTypes.node,
87
87
  /**
88
88
  * Empty state title
89
89
  */
90
- title: PropTypes.oneOfType([PropTypes.string, PropTypes.node]).isRequired
90
+ title: PropTypes.node.isRequired
91
91
  };
92
92
 
93
93
  export { EmptyStateContent };
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright IBM Corp. 2023, 2024
2
+ * Copyright IBM Corp. 2023, 2025
3
3
  *
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.
@@ -57,6 +57,14 @@ export interface GuidebannerProps {
57
57
  * content on the page under special circumstances.
58
58
  */
59
59
  withLeftGutter?: boolean;
60
+ /**
61
+ * A handler for managing the controlled state of open prop. If not passed the open prop will not be honored and an uncontrolled state will be used.
62
+ */
63
+ onChange?: (value: boolean) => void;
64
+ /**
65
+ * For controlled usage of the tile open state. This prop only works when an onChange prop is also passed, otherwise an uncontrolled state is used.
66
+ */
67
+ open?: boolean;
60
68
  }
61
69
  /**
62
70
  * The guide banner sits at the top of a page, or page-level tab,
@@ -17,6 +17,7 @@ import cx from 'classnames';
17
17
  import { getDevtoolsProps } from '../../global/js/utils/devtools.js';
18
18
  import { pkg } from '../../settings.js';
19
19
  import uuidv4 from '../../global/js/utils/uuidv4.js';
20
+ import { useControllableState } from '../../global/js/hooks/useControllableState.js';
20
21
 
21
22
  var _CaretLeft, _CaretRight, _Close;
22
23
 
@@ -52,20 +53,22 @@ const Guidebanner = /*#__PURE__*/React__default.forwardRef((props, ref) => {
52
53
  nextIconDescription = defaults.nextIconDescription,
53
54
  previousIconDescription = defaults.previousIconDescription,
54
55
  title,
56
+ onChange,
57
+ open: userOpen,
55
58
  ...rest
56
59
  } = props;
57
60
  const scrollRef = useRef(null);
58
61
  const toggleRef = useRef(null);
59
62
  const [scrollPosition, setScrollPosition] = useState(0);
60
63
  const [showNavigation, setShowNavigation] = useState(false);
61
- const [isCollapsed, setIsCollapsed] = useState(collapsible ? true : false);
64
+ const [open, setOpen] = useControllableState(userOpen ?? false, onChange);
62
65
  const handleClickToggle = () => {
63
- setIsCollapsed(prevState => !prevState);
66
+ setOpen(!open);
64
67
  };
65
68
  const carouselContentId = `${uuidv4()}--carousel-content-id`;
66
69
  return /*#__PURE__*/React__default.createElement("div", _extends({}, rest, {
67
- "aria-owns": !isCollapsed ? carouselContentId : undefined,
68
- className: cx(blockClass, className, collapsible && `${blockClass}__collapsible`, isCollapsed && `${blockClass}__collapsible-collapsed`, withLeftGutter && `${blockClass}__with-left-gutter`),
70
+ "aria-owns": open ? carouselContentId : undefined,
71
+ className: cx(blockClass, className, collapsible && `${blockClass}__collapsible`, !open && `${blockClass}__collapsible-collapsed`, withLeftGutter && `${blockClass}__with-left-gutter`),
69
72
  ref: ref
70
73
  }, getDevtoolsProps(componentName)), /*#__PURE__*/React__default.createElement(Idea, {
71
74
  size: 20,
@@ -98,9 +101,9 @@ const Guidebanner = /*#__PURE__*/React__default.forwardRef((props, ref) => {
98
101
  className: `${blockClass}__toggle-button`,
99
102
  onClick: handleClickToggle,
100
103
  ref: toggleRef,
101
- "aria-controls": !isCollapsed ? carouselContentId : undefined,
102
- "aria-expanded": !isCollapsed
103
- }, isCollapsed ? expandButtonLabel : collapseButtonLabel), showNavigation && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("span", {
104
+ "aria-controls": !open ? carouselContentId : undefined,
105
+ "aria-expanded": !open
106
+ }, open ? expandButtonLabel : collapseButtonLabel), showNavigation && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("span", {
104
107
  className: cx(`${blockClass}__back-button`, [scrollPosition === 0 ? `${blockClass}__back-button--disabled` : null])
105
108
  }, /*#__PURE__*/React__default.createElement(IconButton, {
106
109
  align: "top",
@@ -181,11 +184,19 @@ Guidebanner.propTypes = {
181
184
  * Tooltip text and aria label for the Next button icon.
182
185
  */
183
186
  nextIconDescription: PropTypes.string,
187
+ /**
188
+ * A handler for managing the controlled state of open prop. If not passed the open prop will not be honored and an uncontrolled state will be used.
189
+ */
190
+ onChange: PropTypes.func,
184
191
  /**
185
192
  * If defined, a Close button will render in the top-right corner and a
186
193
  * callback function will be triggered when button is clicked.
187
194
  */
188
195
  onClose: PropTypes.func,
196
+ /**
197
+ * Specify whether the Guidebanner is currently open.
198
+ */
199
+ open: PropTypes.bool,
189
200
  /**
190
201
  * Tooltip text and aria label for the Back button icon.
191
202
  */
@@ -105,6 +105,10 @@ export interface MultiAddSelectProps {
105
105
  * title that displays in the sidebar when nothing is selected
106
106
  */
107
107
  noSelectionTitle?: string;
108
+ /**
109
+ * Determines if the component should be rendered within a Tearsheet component
110
+ */
111
+ noTearsheet?: boolean;
108
112
  /**
109
113
  * function to call when the close button clicked
110
114
  */
@@ -119,6 +119,10 @@ MultiAddSelect.propTypes = {
119
119
  * title that displays in the sidebar when nothing is selected
120
120
  */
121
121
  noSelectionTitle: PropTypes.string,
122
+ /**
123
+ * Determines if the component should be rendered within a Tearsheet component
124
+ */
125
+ noTearsheet: PropTypes.bool,
122
126
  /**
123
127
  * function to call when the close button clicked
124
128
  */
@@ -9,7 +9,7 @@ import { extends as _extends } from '../../../_virtual/_rollupPluginBabelHelpers
9
9
  import React__default, { forwardRef, useState, useRef, useEffect, useLayoutEffect, useCallback } from 'react';
10
10
  import PropTypes from '../../../_virtual/index.js';
11
11
  import cx from 'classnames';
12
- import { Grid, Column, DefinitionTooltip, unstable_Text, Popover, PopoverContent, IconButton, BreadcrumbItem, usePrefix, Breadcrumb, MenuButton, MenuItem, AspectRatio } from '@carbon/react';
12
+ import { Grid, Column, Section, DefinitionTooltip, unstable_Text, Heading, Popover, PopoverContent, IconButton, BreadcrumbItem, usePrefix, Breadcrumb, MenuButton, MenuItem, AspectRatio } from '@carbon/react';
13
13
  import { breakpoints } from '@carbon/layout';
14
14
  import { blockClass } from '../PageHeaderUtils.js';
15
15
  import { createOverflowHandler } from './overflowHandler.js';
@@ -251,7 +251,8 @@ const PageHeaderContent = /*#__PURE__*/React__default.forwardRef(function PageHe
251
251
  useLayoutEffect(() => {
252
252
  titleRef.current && isEllipsisActive(titleRef.current);
253
253
  }, [title]);
254
- return /*#__PURE__*/React__default.createElement("div", _extends({
254
+ return /*#__PURE__*/React__default.createElement(Section, _extends({
255
+ as: "div",
255
256
  className: classNames,
256
257
  ref: componentRef
257
258
  }, other), /*#__PURE__*/React__default.createElement(Grid, null, /*#__PURE__*/React__default.createElement(Column, {
@@ -270,11 +271,11 @@ const PageHeaderContent = /*#__PURE__*/React__default.forwardRef(function PageHe
270
271
  definition: title
271
272
  }, /*#__PURE__*/React__default.createElement(unstable_Text, {
272
273
  ref: titleRef,
273
- as: "h4",
274
+ as: Heading,
274
275
  className: `${blockClass}__content__title`
275
276
  }, title)) : /*#__PURE__*/React__default.createElement(unstable_Text, {
276
277
  ref: titleRef,
277
- as: "h4",
278
+ as: Heading,
278
279
  className: `${blockClass}__content__title`
279
280
  }, title)), contextualActions && /*#__PURE__*/React__default.createElement("div", {
280
281
  className: `${blockClass}__content__contextual-actions`
@@ -507,7 +508,7 @@ const PageHeaderTabBar = /*#__PURE__*/React__default.forwardRef(function PageHea
507
508
  let {
508
509
  className,
509
510
  children,
510
- tags = [],
511
+ tags,
511
512
  scroller,
512
513
  ...other
513
514
  } = _ref7;
@@ -4,6 +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
+ /**
8
+ * This file has test coverage in @carbon/utilities. This is a copy of the utility
9
+ * that adds margin calculations to an element's size. This should ideally be
10
+ * merged back into the utility.
11
+ */
7
12
  /**
8
13
  * Calculates the size (width or height) of a given HTML element.
9
14
  *
@@ -5,6 +5,14 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
+ /**
9
+ * This file has test coverage in @carbon/utilities. This is a copy of the utility
10
+ * that adds margin calculations to an element's size. This should ideally be
11
+ * merged back into the utility.
12
+ */
13
+
14
+ /* istanbul ignore file */
15
+
8
16
  /**
9
17
  * Calculates the size (width or height) of a given HTML element.
10
18
  *
@@ -36,6 +36,10 @@ export interface SingleAddSelectProps {
36
36
  * title to display when no results are found from the global search
37
37
  */
38
38
  noResultsTitle?: string;
39
+ /**
40
+ * Determines if the component should be rendered within a Tearsheet component
41
+ */
42
+ noTearsheet?: boolean;
39
43
  /**
40
44
  * function to call when the close button clicked
41
45
  */
@@ -68,6 +68,10 @@ SingleAddSelect.propTypes = {
68
68
  * title to display when no results are found from the global search
69
69
  */
70
70
  noResultsTitle: PropTypes.string,
71
+ /**
72
+ * Determines if the component should be rendered within a Tearsheet component
73
+ */
74
+ noTearsheet: PropTypes.bool,
71
75
  /**
72
76
  * function to call when the close button clicked
73
77
  */
@@ -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) => ReactNode;
44
+ viewMoreLabel?: (value: number) => ReactNode;
45
45
  }
46
46
  /**
47
47
  * The `TruncatedList` allows consumers to control how many items are
@@ -46,7 +46,7 @@ export * as preview__Coachmark from './Coachmark/next/Coachmark';
46
46
  export * as preview__CoachmarkTagline from './Coachmark/next/Coachmark/CoachmarkTagline';
47
47
  export { FeatureFlags as preview__FeatureFlags, useFeatureFlag as preview__useFeatureFlag, useFeatureFlags as preview__useFeatureFlags, } from './FeatureFlags';
48
48
  export * as preview__PageHeader from './PageHeader/next/PageHeader';
49
- export * as previewCandidate__BigNumber from './BigNumber';
49
+ export { BigNumber as previewCandidate__BigNumber, type BigNumberProps, } from './BigNumber';
50
50
  export { Coachmark as previewCandidate__Coachmark, BEACON_KIND, COACHMARK_OVERLAY_KIND, COACHMARK_ALIGNMENT, useCoachmark, type CoachmarkProps, } from './Coachmark';
51
51
  export { CoachmarkBeacon as previewCandidate__CoachmarkBeacon, type CoachmarkBeaconProps, } from './CoachmarkBeacon';
52
52
  export { CoachmarkButton as previewCandidate__CoachmarkButton, type CoachmarkButtonProps, } from './CoachmarkButton';
@@ -54,17 +54,18 @@ export { CoachmarkFixed as previewCandidate__CoachmarkFixed, type CoachmarkFixed
54
54
  export { CoachmarkOverlayElement as previewCandidate__CoachmarkOverlayElement, type CoachmarkOverlayElementProps, } from './CoachmarkOverlayElement';
55
55
  export { CoachmarkOverlayElements as previewCandidate__CoachmarkOverlayElements, type CoachmarkOverlayElementsProps, } from './CoachmarkOverlayElements';
56
56
  export { CoachmarkStack as previewCandidate__CoachmarkStack } from './CoachmarkStack';
57
- export * as previewCandidate__ConditionBuilder from './ConditionBuilder';
58
- export * as previewCandidate__DataSpreadsheet from './DataSpreadsheet';
59
- export * as previewCandidate__DelimitedList from './DelimitedList';
60
- export * as previewCandidate__Decorator from './Decorator';
61
- export * as previewCandidate__GetStartedCard from './GetStartedCard';
57
+ export { ConditionBuilder as previewCandidate__ConditionBuilder } from './ConditionBuilder';
58
+ export * from './ConditionBuilder/ConditionBuilder.types';
59
+ export { DataSpreadsheet as previewCandidate__DataSpreadsheet, type DataSpreadsheetProps, } from './DataSpreadsheet';
60
+ export { DelimitedList as previewCandidate__DelimitedList, type DelimitedListProps, } from './DelimitedList';
61
+ export { Decorator as previewCandidate__Decorator } from './Decorator';
62
+ export { GetStartedCard as previewCandidate__GetStartedCard, type GetStartedCardProps, } from './GetStartedCard';
62
63
  export { Guidebanner as previewCandidate__Guidebanner, GuidebannerElement as previewCandidate__GuidebannerElement, GuidebannerElementButton as previewCandidate__GuidebannerElementButton, GuidebannerElementLink as previewCandidate__GuidebannerElementLink, type GuidebannerProps, type GuidebannerElementProps, type GuidebannerElementButtonProps, type GuidebannerElementLinkProps, } from './Guidebanner';
63
64
  export { InlineTip as previewCandidate__InlineTip, InlineTipButton as previewCandidate__InlineTipButton, InlineTipLink as previewCandidate__InlineTipLink, type InlineTipProps, type InlineTipButtonProps, type InlineTipLinkProps, } from './InlineTip';
64
- export * as previewCandidate__NonLinearReading from './NonLinearReading';
65
- export * as previewCandidate__SearchBar from './SearchBar';
65
+ export { NonLinearReading as previewCandidate__NonLinearReading, type NonLinearReadingProps, } from './NonLinearReading';
66
+ export { SearchBar as previewCandidate__SearchBar, type SearchBarProps, } from './SearchBar';
66
67
  export { Toolbar as previewCandidate__Toolbar, ToolbarButton as previewCandidate__ToolbarButton, ToolbarGroup as previewCandidate__ToolbarGroup, type ToolbarProps, type ToolbarButtonProps, type ToolbarGroupProps, } from './Toolbar';
67
- export * as previewCandidate__TruncatedList from './TruncatedList';
68
+ export { TruncatedList as previewCandidate__TruncatedList, type TruncatedListProps, } from './TruncatedList';
68
69
  /**
69
70
  * Deprecated
70
71
  */
@@ -24,6 +24,7 @@ export type Config = {
24
24
  onViewChangeStart?: (args: CarouselResponse) => void;
25
25
  onViewChangeEnd?: (args: CarouselResponse) => void;
26
26
  excludeSwipeSupport?: boolean;
27
+ useMaxHeight?: boolean;
27
28
  };
28
29
  interface InitCarousel {
29
30
  next: () => void;
package/es/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright IBM Corp. 2024, 2024
2
+ * Copyright IBM Corp. 2024, 2025
3
3
  *
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.
package/es/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  /**
2
3
  * Copyright IBM Corp. 2020, 2025
3
4
  *
@@ -59,8 +60,7 @@ export { index$1 as preview__CoachmarkTagline };
59
60
  export { FeatureFlags as preview__FeatureFlags, useFeatureFlag as preview__useFeatureFlag, useFeatureFlags as preview__useFeatureFlags } from './components/FeatureFlags/index.js';
60
61
  import * as PageHeader from './components/PageHeader/next/PageHeader.js';
61
62
  export { PageHeader as preview__PageHeader };
62
- import * as index$2 from './components/BigNumber/index.js';
63
- export { index$2 as previewCandidate__BigNumber };
63
+ export { BigNumber as previewCandidate__BigNumber } from './components/BigNumber/BigNumber.js';
64
64
  export { Coachmark as previewCandidate__Coachmark } from './components/Coachmark/Coachmark.js';
65
65
  export { BEACON_KIND, COACHMARK_ALIGNMENT, COACHMARK_OVERLAY_KIND } from './components/Coachmark/utils/enums.js';
66
66
  export { useCoachmark } from './components/Coachmark/utils/context.js';
@@ -70,16 +70,10 @@ export { CoachmarkButton as previewCandidate__CoachmarkButton } from './componen
70
70
  export { CoachmarkFixed as previewCandidate__CoachmarkFixed } from './components/CoachmarkFixed/CoachmarkFixed.js';
71
71
  export { CoachmarkOverlayElement as previewCandidate__CoachmarkOverlayElement } from './components/CoachmarkOverlayElement/CoachmarkOverlayElement.js';
72
72
  export { CoachmarkOverlayElements as previewCandidate__CoachmarkOverlayElements } from './components/CoachmarkOverlayElements/CoachmarkOverlayElements.js';
73
- import * as index$3 from './components/ConditionBuilder/index.js';
74
- export { index$3 as previewCandidate__ConditionBuilder };
75
- import * as index$4 from './components/DataSpreadsheet/index.js';
76
- export { index$4 as previewCandidate__DataSpreadsheet };
77
- import * as index$5 from './components/DelimitedList/index.js';
78
- export { index$5 as previewCandidate__DelimitedList };
79
- import * as index$6 from './components/Decorator/index.js';
80
- export { index$6 as previewCandidate__Decorator };
81
- import * as index$7 from './components/GetStartedCard/index.js';
82
- export { index$7 as previewCandidate__GetStartedCard };
73
+ export { ConditionBuilder as previewCandidate__ConditionBuilder } from './components/ConditionBuilder/ConditionBuilder.js';
74
+ export { DataSpreadsheet as previewCandidate__DataSpreadsheet } from './components/DataSpreadsheet/DataSpreadsheet.js';
75
+ export { DelimitedList as previewCandidate__DelimitedList } from './components/DelimitedList/DelimitedList.js';
76
+ export { GetStartedCard as previewCandidate__GetStartedCard } from './components/GetStartedCard/GetStartedCard.js';
83
77
  export { Guidebanner as previewCandidate__Guidebanner } from './components/Guidebanner/Guidebanner.js';
84
78
  export { GuidebannerElement as previewCandidate__GuidebannerElement } from './components/Guidebanner/GuidebannerElement.js';
85
79
  export { GuidebannerElementButton as previewCandidate__GuidebannerElementButton } from './components/Guidebanner/GuidebannerElementButton.js';
@@ -87,15 +81,12 @@ export { GuidebannerElementLink as previewCandidate__GuidebannerElementLink } fr
87
81
  export { InlineTip as previewCandidate__InlineTip } from './components/InlineTip/InlineTip.js';
88
82
  export { InlineTipButton as previewCandidate__InlineTipButton } from './components/InlineTip/InlineTipButton.js';
89
83
  export { InlineTipLink as previewCandidate__InlineTipLink } from './components/InlineTip/InlineTipLink.js';
90
- import * as index$8 from './components/NonLinearReading/index.js';
91
- export { index$8 as previewCandidate__NonLinearReading };
92
- import * as index$9 from './components/SearchBar/index.js';
93
- export { index$9 as previewCandidate__SearchBar };
84
+ export { NonLinearReading as previewCandidate__NonLinearReading } from './components/NonLinearReading/NonLinearReading.js';
85
+ export { SearchBar as previewCandidate__SearchBar } from './components/SearchBar/SearchBar.js';
94
86
  export { Toolbar as previewCandidate__Toolbar } from './components/Toolbar/Toolbar.js';
95
87
  export { ToolbarButton as previewCandidate__ToolbarButton } from './components/Toolbar/ToolbarButton.js';
96
88
  export { ToolbarGroup as previewCandidate__ToolbarGroup } from './components/Toolbar/ToolbarGroup.js';
97
- import * as index$a from './components/TruncatedList/index.js';
98
- export { index$a as previewCandidate__TruncatedList };
89
+ export { TruncatedList as previewCandidate__TruncatedList } from './components/TruncatedList/TruncatedList.js';
99
90
  export { ComboButton } from './components/ComboButton/ComboButton.js';
100
91
  export { ComboButtonItem } from './components/ComboButton/ComboButtonItem/index.js';
101
92
  export { Datagrid } from './components/Datagrid/Datagrid/Datagrid.js';
@@ -127,6 +118,7 @@ export { default as useFilterContext } from './components/Datagrid/Datagrid/addo
127
118
  export { usePrefix } from './global/js/hooks/usePrefix.js';
128
119
  export { ActionBar } from './components/ActionBar/ActionBar.js';
129
120
  export { CoachmarkStack as previewCandidate__CoachmarkStack } from './components/CoachmarkStack/CoachmarkStack.js';
121
+ export { Decorator as previewCandidate__Decorator } from './components/Decorator/Decorator.js';
130
122
  export { ScrollGradient } from './components/ScrollGradient/ScrollGradient.js';
131
123
  export { StringFormatter } from './components/StringFormatter/StringFormatter.js';
132
124
  export { UserAvatar } from './components/UserAvatar/UserAvatar.js';
@@ -28,6 +28,7 @@ export interface AddSelectProps {
28
28
  noResultsTitle: string;
29
29
  noSelectionDescription?: string;
30
30
  noSelectionTitle?: string;
31
+ noTearsheet?: boolean;
31
32
  onClose: () => void;
32
33
  onCloseButtonText: string;
33
34
  onSubmit: () => void;
@@ -29,6 +29,7 @@ export interface AddSelectBodyProps {
29
29
  noResultsTitle?: string;
30
30
  noSelectionDescription?: string;
31
31
  noSelectionTitle?: string;
32
+ noTearsheet?: boolean;
32
33
  normalizedItems?: object;
33
34
  onClose?: () => void;
34
35
  onCloseButtonText?: string;
@@ -66,6 +66,7 @@ const AddSelectBody = /*#__PURE__*/React.forwardRef((_ref, ref) => {
66
66
  noResultsTitle,
67
67
  noSelectionDescription,
68
68
  noSelectionTitle,
69
+ noTearsheet = false,
69
70
  normalizedItems,
70
71
  onClose,
71
72
  onCloseButtonText,
@@ -281,6 +282,9 @@ const AddSelectBody = /*#__PURE__*/React.forwardRef((_ref, ref) => {
281
282
  title: noResultsTitle,
282
283
  illustrationTheme: illustrationTheme
283
284
  }))));
285
+ if (noTearsheet) {
286
+ return body;
287
+ }
284
288
  if (multi) {
285
289
  return /*#__PURE__*/React.createElement(Tearsheet.Tearsheet, _rollupPluginBabelHelpers.extends({}, commonTearsheetProps, {
286
290
  influencer: multi && /*#__PURE__*/React.createElement(AddSelectSidebar.AddSelectSidebar, sidebarProps),
@@ -5,3 +5,4 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
  export { BigNumber } from './BigNumber';
8
+ export type { BigNumberProps } from './BigNumber';
@@ -40,9 +40,9 @@ const CoachmarkContent = /*#__PURE__*/React.forwardRef((props, ref) => {
40
40
  } = React.useContext(context.CoachmarkContext);
41
41
  const targetId = open ? triggerRef?.current?.id : null;
42
42
  const handleRef = React.useRef(null);
43
- const bubbleRef = ref && typeof ref !== 'function' ? ref : handleRef;
43
+ const bubbleRef = ref || handleRef;
44
44
  React.useEffect(() => {
45
- if (open && bubbleRef.current) {
45
+ if (open && 'current' in bubbleRef && bubbleRef.current) {
46
46
  requestAnimationFrame(() => {
47
47
  const contentBody = bubbleRef.current?.querySelector(`.${contentBodyClass}`);
48
48
  if (contentBody) {
@@ -56,7 +56,7 @@ const CoachmarkContent = /*#__PURE__*/React.forwardRef((props, ref) => {
56
56
  React.useEffect(() => {
57
57
  const handleOutsideClick = event => {
58
58
  const targetElement = document.getElementById(targetId || '');
59
- const bubbleElement = bubbleRef.current;
59
+ const bubbleElement = bubbleRef && 'current' in bubbleRef ? bubbleRef.current : null;
60
60
  if (bubbleElement && !bubbleElement.contains(event.target) && targetElement && !targetElement.contains(event.target)) {
61
61
  setOpen?.(false);
62
62
  }
@@ -77,14 +77,14 @@ const CoachmarkContent = /*#__PURE__*/React.forwardRef((props, ref) => {
77
77
  // eslint-disable-next-line react-hooks/exhaustive-deps
78
78
  }, [open, targetId, setOpen]);
79
79
  React.useEffect(() => {
80
- if (open && bubbleRef.current) {
80
+ if (open && 'current' in bubbleRef && bubbleRef.current) {
81
81
  const dragContainer = bubbleRef.current.querySelector(`.${settings.pkg.prefix}__bubble`);
82
82
  if (dragContainer instanceof HTMLElement) {
83
83
  setContentRef(dragContainer);
84
84
  }
85
85
  }
86
86
  // eslint-disable-next-line react-hooks/exhaustive-deps
87
- }, [open, bubbleRef.current]);
87
+ }, [open, bubbleRef]);
88
88
  return open && /*#__PURE__*/React.createElement("div", {
89
89
  ref: bubbleRef
90
90
  }, /*#__PURE__*/React.createElement(CoachmarkBubble.CoachmarkBubble, _rollupPluginBabelHelpers.extends({
@@ -30,6 +30,10 @@ export interface CoachmarkTaglineProps {
30
30
  * button props
31
31
  */
32
32
  buttonProps?: CoachmarkButtonProps;
33
+ /**
34
+ * Optional class name for this component.
35
+ */
36
+ className?: string;
33
37
  isOpen?: boolean;
34
38
  }
35
39
  /**