@carbon/ibm-products 2.78.0 → 2.79.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 (99) hide show
  1. package/css/carbon.css +1762 -1036
  2. package/css/carbon.css.map +1 -1
  3. package/css/index-full-carbon.css +2342 -1239
  4. package/css/index-full-carbon.css.map +1 -1
  5. package/css/index-full-carbon.min.css +1 -1
  6. package/css/index-full-carbon.min.css.map +1 -1
  7. package/css/index-without-carbon-released-only.css +450 -98
  8. package/css/index-without-carbon-released-only.css.map +1 -1
  9. package/css/index-without-carbon-released-only.min.css +1 -1
  10. package/css/index-without-carbon-released-only.min.css.map +1 -1
  11. package/css/index-without-carbon.css +624 -247
  12. package/css/index-without-carbon.css.map +1 -1
  13. package/css/index-without-carbon.min.css +1 -1
  14. package/css/index-without-carbon.min.css.map +1 -1
  15. package/css/index.css +1759 -873
  16. package/css/index.css.map +1 -1
  17. package/css/index.min.css +1 -1
  18. package/css/index.min.css.map +1 -1
  19. package/es/components/ConditionBuilder/ConditionBlock/ConditionBlock.js +111 -108
  20. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.js +1 -1
  21. package/es/components/InterstitialScreen/InterstitialScreenBody.js +15 -8
  22. package/es/components/InterstitialScreen/InterstitialScreenFooter.js +6 -1
  23. package/es/components/InterstitialScreen/InterstitialScreenHeader.d.ts +1 -1
  24. package/es/components/InterstitialScreen/InterstitialScreenHeader.js +1 -1
  25. package/es/components/InterstitialScreen/{_story-assets/InterstitialScreenView/InterstitialScreenView.d.ts → InterstitialScreenView.d.ts} +2 -3
  26. package/es/components/InterstitialScreen/InterstitialScreenView.js +60 -0
  27. package/es/components/InterstitialScreen/index.d.ts +1 -0
  28. package/es/components/Tearsheet/next/Tearsheet.d.ts +85 -0
  29. package/es/components/Tearsheet/next/Tearsheet.js +129 -0
  30. package/es/components/Tearsheet/next/TearsheetBody.d.ts +67 -0
  31. package/es/components/Tearsheet/next/TearsheetBody.js +121 -0
  32. package/es/components/Tearsheet/next/TearsheetHeader.d.ts +65 -0
  33. package/es/components/Tearsheet/next/TearsheetHeader.js +121 -0
  34. package/es/components/Tearsheet/next/TearsheetHeaderActions.d.ts +54 -0
  35. package/es/components/Tearsheet/next/TearsheetHeaderActions.js +101 -0
  36. package/es/components/Tearsheet/next/TearsheetHeaderContent.d.ts +28 -0
  37. package/es/components/Tearsheet/next/TearsheetHeaderContent.js +67 -0
  38. package/es/components/Tearsheet/next/_story-assets/StepTearsheet.d.ts +22 -0
  39. package/es/components/Tearsheet/next/context.d.ts +26 -0
  40. package/es/components/Tearsheet/next/context.js +26 -0
  41. package/es/components/Tearsheet/next/index.d.ts +12 -0
  42. package/es/components/Tearsheet/next/index.js +8 -0
  43. package/es/components/Toolbar/Toolbar.js +1 -5
  44. package/es/components/TruncatedText/TruncatedText.d.ts +2 -3
  45. package/es/components/TruncatedText/TruncatedText.js +1 -2
  46. package/es/components/TruncatedText/index.d.ts +1 -0
  47. package/es/components/index.d.ts +2 -1
  48. package/es/global/js/hooks/useCollapsible.d.ts +19 -0
  49. package/es/global/js/hooks/useCollapsible.js +68 -0
  50. package/es/global/js/hooks/useMatchMedia.d.ts +13 -0
  51. package/es/global/js/hooks/useMatchMedia.js +33 -0
  52. package/es/index.js +4 -1
  53. package/es/node_modules/@carbon/icons-react/es/generated/bucket-10.js +845 -805
  54. package/es/node_modules/@carbon/icons-react/es/generated/bucket-3.js +476 -476
  55. package/lib/components/ConditionBuilder/ConditionBlock/ConditionBlock.js +111 -108
  56. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.js +1 -1
  57. package/lib/components/InterstitialScreen/InterstitialScreenBody.js +15 -8
  58. package/lib/components/InterstitialScreen/InterstitialScreenFooter.js +6 -1
  59. package/lib/components/InterstitialScreen/InterstitialScreenHeader.d.ts +1 -1
  60. package/lib/components/InterstitialScreen/InterstitialScreenHeader.js +1 -1
  61. package/lib/components/InterstitialScreen/{_story-assets/InterstitialScreenView/InterstitialScreenView.d.ts → InterstitialScreenView.d.ts} +2 -3
  62. package/lib/components/InterstitialScreen/InterstitialScreenView.js +62 -0
  63. package/lib/components/InterstitialScreen/index.d.ts +1 -0
  64. package/lib/components/Tearsheet/next/Tearsheet.d.ts +85 -0
  65. package/lib/components/Tearsheet/next/Tearsheet.js +131 -0
  66. package/lib/components/Tearsheet/next/TearsheetBody.d.ts +67 -0
  67. package/lib/components/Tearsheet/next/TearsheetBody.js +128 -0
  68. package/lib/components/Tearsheet/next/TearsheetHeader.d.ts +65 -0
  69. package/lib/components/Tearsheet/next/TearsheetHeader.js +127 -0
  70. package/lib/components/Tearsheet/next/TearsheetHeaderActions.d.ts +54 -0
  71. package/lib/components/Tearsheet/next/TearsheetHeaderActions.js +104 -0
  72. package/lib/components/Tearsheet/next/TearsheetHeaderContent.d.ts +28 -0
  73. package/lib/components/Tearsheet/next/TearsheetHeaderContent.js +71 -0
  74. package/lib/components/Tearsheet/next/_story-assets/StepTearsheet.d.ts +22 -0
  75. package/lib/components/Tearsheet/next/context.d.ts +26 -0
  76. package/lib/components/Tearsheet/next/context.js +29 -0
  77. package/lib/components/Tearsheet/next/index.d.ts +12 -0
  78. package/lib/components/Tearsheet/next/index.js +14 -0
  79. package/lib/components/Toolbar/Toolbar.js +1 -5
  80. package/lib/components/TruncatedText/TruncatedText.d.ts +2 -3
  81. package/lib/components/TruncatedText/TruncatedText.js +4 -3
  82. package/lib/components/TruncatedText/index.d.ts +1 -0
  83. package/lib/components/index.d.ts +2 -1
  84. package/lib/global/js/hooks/useCollapsible.d.ts +19 -0
  85. package/lib/global/js/hooks/useCollapsible.js +70 -0
  86. package/lib/global/js/hooks/useMatchMedia.d.ts +13 -0
  87. package/lib/global/js/hooks/useMatchMedia.js +35 -0
  88. package/lib/index.js +15 -14
  89. package/lib/node_modules/@carbon/icons-react/es/generated/bucket-10.js +863 -823
  90. package/lib/node_modules/@carbon/icons-react/es/generated/bucket-3.js +477 -477
  91. package/package.json +16 -15
  92. package/scss/components/FilterSummary/_filter-summary.scss +1 -1
  93. package/scss/components/PageHeader/_page-header.scss +4 -0
  94. package/scss/components/SidePanel/_side-panel.scss +5 -5
  95. package/scss/components/TagOverflow/_tag-overflow.scss +38 -38
  96. package/scss/components/TagSet/_tag-set.scss +28 -12
  97. package/scss/components/Tearsheet/_tearsheet.scss +8 -1
  98. package/scss/components/Tearsheet/_tearsheet_next.scss +408 -0
  99. package/telemetry.yml +32 -6
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Copyright IBM Corp. 2020, 2025
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
+
8
+ import { createContext } from 'react';
9
+ import { pkg } from '../../../settings.js';
10
+
11
+ /**
12
+ * -------------
13
+ * Context setup
14
+ * -------------
15
+ */
16
+
17
+ const TearsheetContext = /*#__PURE__*/createContext({
18
+ hasCloseIcon: true,
19
+ fullyCollapsed: false,
20
+ disableHeaderCollapse: false,
21
+ variant: 'wide',
22
+ isSm: false
23
+ });
24
+ const blockClass = `${pkg.prefix}--tearsheet__next`;
25
+
26
+ export { TearsheetContext, blockClass };
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Copyright IBM Corp. 2025, 2025
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 { Tearsheet } from './Tearsheet';
8
+ export type { TearsheetProps, TearsheetComponentType, FooterProps, } from './Tearsheet';
9
+ export type { MainContentProps, SummaryContentProps, TearsheetBodyProps, InfluencerProps, } from './TearsheetBody';
10
+ export type { TearsheetHeaderProps, TearsheetNavigationBarProps, TearsheetScrollButtonProps, } from './TearsheetHeader';
11
+ export type { TearsheetHeaderActionItemProps, TearsheetHeaderActionsProps, } from './TearsheetHeaderActions';
12
+ export type { TearsheetHeaderContentProps } from './TearsheetHeaderContent';
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Copyright IBM Corp. 2020, 2025
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
+
8
+ export { Tearsheet } from './Tearsheet.js';
@@ -13,11 +13,7 @@ import cx from 'classnames';
13
13
  import { getDevtoolsProps } from '../../global/js/utils/devtools.js';
14
14
  import { pkg } from '../../settings.js';
15
15
 
16
- const {
17
- checkComponentEnabled,
18
- prefix
19
- } = pkg;
20
- const blockClass = `${prefix}--toolbar`;
16
+ const blockClass = `${pkg.prefix}--toolbar`;
21
17
  const ToolbarContext = /*#__PURE__*/createContext({});
22
18
 
23
19
  /** Toolbars are a collection of action items that organize a program’s interaction patterns into a series of closely related commands. */
@@ -6,7 +6,7 @@
6
6
  */
7
7
  import React from 'react';
8
8
  import { PopoverAlignment } from '@carbon/react';
9
- interface TruncatedTextProps {
9
+ export interface TruncatedTextProps {
10
10
  /**
11
11
  * Specify how the tooltip should align with the content in tooltip variant. Refer to Carbon tooltip docs for additional information.
12
12
  */
@@ -44,5 +44,4 @@ interface TruncatedTextProps {
44
44
  */
45
45
  value?: string;
46
46
  }
47
- export declare let TruncatedText: React.ForwardRefExoticComponent<TruncatedTextProps & React.RefAttributes<HTMLDivElement>>;
48
- export {};
47
+ export declare const TruncatedText: React.ForwardRefExoticComponent<TruncatedTextProps & React.RefAttributes<HTMLDivElement>>;
@@ -15,7 +15,7 @@ import useTruncatedText from './useTruncatedText.js';
15
15
 
16
16
  const blockClass = `${pkg.prefix}--truncated-text`;
17
17
  const componentName = 'TruncatedText';
18
- let TruncatedText = /*#__PURE__*/forwardRef((props, ref) => {
18
+ const TruncatedText = /*#__PURE__*/forwardRef((props, ref) => {
19
19
  const {
20
20
  align = 'top',
21
21
  autoAlign = false,
@@ -82,7 +82,6 @@ let TruncatedText = /*#__PURE__*/forwardRef((props, ref) => {
82
82
  ref: ref
83
83
  }, getDevtoolsProps(componentName)), truncated ? truncatedBody : valueBody);
84
84
  });
85
- TruncatedText = pkg.checkComponentEnabled(TruncatedText, componentName);
86
85
  TruncatedText.displayName = componentName;
87
86
 
88
87
  export { TruncatedText };
@@ -5,3 +5,4 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
  export { TruncatedText } from './TruncatedText';
8
+ export type { TruncatedTextProps } from './TruncatedText';
@@ -34,7 +34,6 @@ export * from './StringFormatter';
34
34
  export * from './TagOverflow';
35
35
  export * from './TagSet';
36
36
  export * from './Tearsheet';
37
- export * from './TruncatedText';
38
37
  export * from './UserAvatar';
39
38
  export * from './WebTerminal';
40
39
  /**
@@ -44,8 +43,10 @@ export * from './WebTerminal';
44
43
  export * as preview__Coachmark from './Coachmark/next/Coachmark';
45
44
  export * as preview__CoachmarkTagline from './Coachmark/next/Coachmark/CoachmarkTagline';
46
45
  export * as preview__CoachmarkBeacon from './Coachmark/next/Coachmark/CoachmarkBeacon';
46
+ export { TruncatedText as preview__TruncatedText, type TruncatedTextProps, } from './TruncatedText';
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';
49
+ export * as preview__Tearsheet from './Tearsheet/next';
49
50
  export { BigNumber as previewCandidate__BigNumber, type BigNumberProps, } from './BigNumber';
50
51
  export { Coachmark as previewCandidate__Coachmark, BEACON_KIND, COACHMARK_OVERLAY_KIND, COACHMARK_ALIGNMENT, useCoachmark, type CoachmarkProps, } from './Coachmark';
51
52
  export { CoachmarkBeacon as previewCandidate__CoachmarkBeacon, type CoachmarkBeaconProps, } from './CoachmarkBeacon';
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Copyright IBM Corp. 2025, 2025
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
+ interface UseCollapsibleHeaderOptions {
8
+ container: HTMLDivElement | null;
9
+ triggerCollapse: (collapsed: boolean) => void;
10
+ disableHeaderCollapse?: boolean;
11
+ }
12
+ /**
13
+ * Custom hook to manage collapsible header behavior based on scroll and drag gestures.
14
+ *
15
+ * This avoids relying solely on scroll events because collapsing the header can
16
+ * remove scrollable space, preventing further scroll events from firing.
17
+ */
18
+ export declare function useCollapsible({ container, triggerCollapse, disableHeaderCollapse, }: UseCollapsibleHeaderOptions): void;
19
+ export {};
@@ -0,0 +1,68 @@
1
+ /**
2
+ * Copyright IBM Corp. 2020, 2025
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
+
8
+ import { useEffect } from 'react';
9
+
10
+ /**
11
+ * Custom hook to manage collapsible header behavior based on scroll and drag gestures.
12
+ *
13
+ * This avoids relying solely on scroll events because collapsing the header can
14
+ * remove scrollable space, preventing further scroll events from firing.
15
+ */
16
+ function useCollapsible(_ref) {
17
+ let {
18
+ container,
19
+ triggerCollapse,
20
+ disableHeaderCollapse = false
21
+ } = _ref;
22
+ useEffect(() => {
23
+ if (!container || disableHeaderCollapse) {
24
+ return;
25
+ }
26
+ let startY = null;
27
+ let isDragging = false;
28
+ const onPointerDown = e => {
29
+ startY = e.clientY;
30
+ isDragging = true;
31
+ };
32
+ const onPointerMove = e => {
33
+ if (!isDragging || startY === null) {
34
+ return;
35
+ }
36
+ const diffY = startY - e.clientY;
37
+ if (diffY > 5) {
38
+ triggerCollapse(true);
39
+ } else if (diffY < -5) {
40
+ triggerCollapse(false);
41
+ }
42
+ };
43
+ const onPointerUp = () => {
44
+ isDragging = false;
45
+ startY = null;
46
+ document.body.style.cursor = 'default';
47
+ };
48
+ const onWheel = e => {
49
+ if (e.deltaY > 0) {
50
+ triggerCollapse(true);
51
+ } else if (e.deltaY < 0) {
52
+ triggerCollapse(false);
53
+ }
54
+ };
55
+ container.addEventListener('pointerdown', onPointerDown);
56
+ container.addEventListener('pointermove', onPointerMove);
57
+ container.addEventListener('pointerup', onPointerUp);
58
+ container.addEventListener('wheel', onWheel);
59
+ return () => {
60
+ container.removeEventListener('pointerdown', onPointerDown);
61
+ container.removeEventListener('pointermove', onPointerMove);
62
+ container.removeEventListener('pointerup', onPointerUp);
63
+ container.removeEventListener('wheel', onWheel);
64
+ };
65
+ }, [container, triggerCollapse, disableHeaderCollapse]);
66
+ }
67
+
68
+ export { useCollapsible };
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Copyright IBM Corp. 2025, 2025
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
+ /**
8
+ * Listens to changes in a media query and returns whether it matches.
9
+ * @param mediaQuery - The media query to listen to. For example, `(min-width: 600px)`.
10
+ * @param defaultState - The initial state to return before the media query is evaluated. Defaults to `false`.
11
+ * @returns Whether the media query matches.
12
+ */
13
+ export declare const useMatchMedia: (mediaQuery: string, defaultState?: boolean) => boolean;
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Copyright IBM Corp. 2020, 2025
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
+
8
+ import { useState, useEffect } from 'react';
9
+
10
+ /**
11
+ * Listens to changes in a media query and returns whether it matches.
12
+ * @param mediaQuery - The media query to listen to. For example, `(min-width: 600px)`.
13
+ * @param defaultState - The initial state to return before the media query is evaluated. Defaults to `false`.
14
+ * @returns Whether the media query matches.
15
+ */
16
+ const useMatchMedia = function (mediaQuery) {
17
+ let defaultState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
18
+ const [matches, setMatches] = useState(defaultState);
19
+ useEffect(() => {
20
+ const listener = event => {
21
+ setMatches(event.matches);
22
+ };
23
+ const mediaQueryList = window.matchMedia(mediaQuery);
24
+ mediaQueryList.addEventListener('change', listener);
25
+ setMatches(mediaQueryList.matches);
26
+ return () => {
27
+ mediaQueryList.removeEventListener('change', listener);
28
+ };
29
+ }, [mediaQuery]);
30
+ return matches;
31
+ };
32
+
33
+ export { useMatchMedia };
package/es/index.js CHANGED
@@ -34,6 +34,7 @@ export { ExpressiveCard } from './components/ExpressiveCard/ExpressiveCard.js';
34
34
  export { FullPageError } from './components/FullPageError/FullPageError.js';
35
35
  export { ImportModal } from './components/ImportModal/ImportModal.js';
36
36
  export { InterstitialScreen } from './components/InterstitialScreen/InterstitialScreen.js';
37
+ export { InterstitialScreenView } from './components/InterstitialScreen/InterstitialScreenView.js';
37
38
  export { MultiAddSelect } from './components/MultiAddSelect/MultiAddSelect.js';
38
39
  export { NotificationsPanel } from './components/NotificationsPanel/NotificationsPanel.js';
39
40
  export { OptionsTile } from './components/OptionsTile/OptionsTile.js';
@@ -48,7 +49,6 @@ export { TagOverflow } from './components/TagOverflow/TagOverflow.js';
48
49
  export { TagSet } from './components/TagSet/TagSet.js';
49
50
  export { Tearsheet } from './components/Tearsheet/Tearsheet.js';
50
51
  export { TearsheetNarrow } from './components/Tearsheet/TearsheetNarrow.js';
51
- export { TruncatedText } from './components/TruncatedText/TruncatedText.js';
52
52
  export { WebTerminal } from './components/WebTerminal/WebTerminal.js';
53
53
  export { WebTerminalContentWrapper } from './components/WebTerminal/WebTerminalContentWrapper.js';
54
54
  export { WebTerminalProvider, useWebTerminal } from './components/WebTerminal/hooks/index.js';
@@ -58,9 +58,12 @@ import * as index$1 from './components/Coachmark/next/Coachmark/CoachmarkTagline
58
58
  export { index$1 as preview__CoachmarkTagline };
59
59
  import * as index$2 from './components/Coachmark/next/Coachmark/CoachmarkBeacon/index.js';
60
60
  export { index$2 as preview__CoachmarkBeacon };
61
+ export { TruncatedText as preview__TruncatedText } from './components/TruncatedText/TruncatedText.js';
61
62
  export { FeatureFlags as preview__FeatureFlags, useFeatureFlag as preview__useFeatureFlag, useFeatureFlags as preview__useFeatureFlags } from './components/FeatureFlags/index.js';
62
63
  import * as index$3 from './components/PageHeader/next/index.js';
63
64
  export { index$3 as preview__PageHeader };
65
+ import * as index$4 from './components/Tearsheet/next/index.js';
66
+ export { index$4 as preview__Tearsheet };
64
67
  export { BigNumber as previewCandidate__BigNumber } from './components/BigNumber/BigNumber.js';
65
68
  export { Coachmark as previewCandidate__Coachmark } from './components/Coachmark/Coachmark.js';
66
69
  export { BEACON_KIND, COACHMARK_ALIGNMENT, COACHMARK_OVERLAY_KIND } from './components/Coachmark/utils/enums.js';