@carbon/ibm-products 2.71.0 → 2.72.0-rc.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 (222) hide show
  1. package/css/carbon.css +50 -0
  2. package/css/carbon.css.map +1 -1
  3. package/css/index-full-carbon.css +560 -185
  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 +132 -1
  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 +570 -245
  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 +358 -33
  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/{BigNumbers/BigNumbers.d.ts → BigNumber/BigNumber.d.ts} +5 -5
  20. package/es/components/{BigNumbers/BigNumbers.js → BigNumber/BigNumber.js} +12 -12
  21. package/es/components/BigNumber/BigNumberSkeleton.d.ts +17 -0
  22. package/es/components/{BigNumbers/BigNumbersSkeleton.js → BigNumber/BigNumberSkeleton.js} +16 -16
  23. package/es/components/{BigNumbers → BigNumber}/constants.d.ts +3 -3
  24. package/es/components/{BigNumbers → BigNumber}/constants.js +6 -6
  25. package/es/components/{BigNumbers → BigNumber}/index.d.ts +2 -2
  26. package/es/components/Coachmark/next/Coachmark/Coachmark.d.ts +72 -0
  27. package/es/components/Coachmark/next/Coachmark/Coachmark.js +185 -0
  28. package/es/components/Coachmark/next/Coachmark/CoachmarkBeacon/CoachmarkBeacon.d.ts +44 -0
  29. package/es/components/Coachmark/next/Coachmark/CoachmarkBeacon/index.d.ts +8 -0
  30. package/es/components/Coachmark/next/Coachmark/CoachmarkBubble/CoachmarkBubble.d.ts +38 -0
  31. package/es/components/Coachmark/next/Coachmark/CoachmarkBubble/CoachmarkBubble.js +125 -0
  32. package/es/components/Coachmark/next/Coachmark/CoachmarkBubble/CoachmarkBubbleHeader.d.ts +24 -0
  33. package/es/components/Coachmark/next/Coachmark/CoachmarkBubble/CoachmarkBubbleHeader.js +25 -0
  34. package/es/components/Coachmark/next/Coachmark/CoachmarkBubble/index.d.ts +10 -0
  35. package/es/components/Coachmark/next/Coachmark/CoachmarkContent.d.ts +34 -0
  36. package/es/components/Coachmark/next/Coachmark/CoachmarkContent.js +118 -0
  37. package/es/components/Coachmark/next/Coachmark/ContentBody.d.ts +23 -0
  38. package/es/components/Coachmark/next/Coachmark/ContentBody.js +37 -0
  39. package/es/components/Coachmark/next/Coachmark/ContentHeader.d.ts +21 -0
  40. package/es/components/Coachmark/next/Coachmark/ContentHeader.js +89 -0
  41. package/{lib/components/BigNumbers → es/components/Coachmark/next/Coachmark}/index.d.ts +2 -2
  42. package/es/components/CoachmarkBeacon/CoachmarkBeacon.js +0 -1
  43. package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +2 -1
  44. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.js +11 -5
  45. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemDate/ConditionBuilderItemDate.js +1 -1
  46. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemNumber/ConditionBuilderItemNumber.js +11 -4
  47. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.js +2 -2
  48. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOptionForValueField.js +1 -1
  49. package/es/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.js +42 -3
  50. package/es/components/ConditionBuilder/ConditionPreview/ConditionPreview.d.ts +3 -1
  51. package/es/components/ConditionBuilder/ConditionPreview/ConditionPreview.js +5 -3
  52. package/es/components/ConditionBuilder/utils/useTranslations.js +1 -1
  53. package/es/components/EditInPlace/EditInPlace.js +0 -3
  54. package/es/components/EmptyStates/EmptyState.d.ts +2 -2
  55. package/es/components/EmptyStates/EmptyState.js +2 -8
  56. package/es/components/FilterPanel/FilterPanelGroup/index.d.ts +1 -0
  57. package/es/components/InterstitialScreen/InterstitialScreen.d.ts +1 -25
  58. package/es/components/InterstitialScreen/InterstitialScreen.js +3 -19
  59. package/es/components/InterstitialScreen/InterstitialScreenBody.d.ts +1 -1
  60. package/es/components/InterstitialScreen/InterstitialScreenBody.js +1 -1
  61. package/es/components/InterstitialScreen/InterstitialScreenFooter.d.ts +1 -1
  62. package/es/components/InterstitialScreen/InterstitialScreenFooter.js +1 -1
  63. package/es/components/InterstitialScreen/InterstitialScreenHeader.d.ts +6 -0
  64. package/es/components/InterstitialScreen/InterstitialScreenHeader.js +1 -1
  65. package/es/components/InterstitialScreen/_story-assets/InterstitialScreenViewModule/InterstitialScreenViewModule.d.ts +1 -1
  66. package/es/components/InterstitialScreen/context.d.ts +31 -0
  67. package/es/components/InterstitialScreen/context.js +18 -0
  68. package/es/components/InterstitialScreen/index.d.ts +3 -2
  69. package/es/components/NotificationsPanel/NotificationsPanel.js +36 -13
  70. package/es/components/PageHeader/PageHeader.d.ts +2 -1
  71. package/es/components/PageHeader/PageHeader.js +2 -1
  72. package/es/components/PageHeader/next/PageHeader.d.ts +18 -3
  73. package/es/components/PageHeader/next/PageHeader.js +260 -12
  74. package/es/components/PageHeader/next/context.d.ts +25 -0
  75. package/es/components/PageHeader/next/context.js +30 -0
  76. package/es/components/PageHeader/next/index.d.ts +3 -3
  77. package/es/components/PageHeader/next/overflowHandler.d.ts +95 -0
  78. package/es/components/PageHeader/next/overflowHandler.js +162 -0
  79. package/es/components/PageHeader/next/utils.d.ts +19 -0
  80. package/es/components/PageHeader/next/utils.js +68 -0
  81. package/es/components/ProductiveCard/ProductiveCard.js +2 -1
  82. package/es/components/ScrollGradient/ScrollGradient.js +1 -2
  83. package/es/components/SidePanel/SidePanel.d.ts +4 -0
  84. package/es/components/SidePanel/SidePanel.js +8 -2
  85. package/es/components/Tearsheet/TearsheetShell.js +8 -5
  86. package/es/components/TruncatedText/TruncatedText.d.ts +48 -0
  87. package/es/components/TruncatedText/TruncatedText.js +86 -0
  88. package/es/components/TruncatedText/index.d.ts +7 -0
  89. package/es/components/TruncatedText/useTruncatedText.d.ts +16 -0
  90. package/es/components/TruncatedText/useTruncatedText.js +41 -0
  91. package/es/components/index.d.ts +4 -2
  92. package/es/global/js/hooks/useOverflowString.d.ts +2 -2
  93. package/es/global/js/hooks/useResizeObserver.d.ts +1 -1
  94. package/es/global/js/package-settings.d.ts +2 -1
  95. package/es/global/js/package-settings.js +3 -2
  96. package/es/global/js/utils/checkForOverflow.js +21 -0
  97. package/es/global/js/utils/makeDraggable/index.d.ts +1 -0
  98. package/es/global/js/utils/makeDraggable/makeDraggable.d.ts +19 -0
  99. package/es/global/js/utils/makeDraggable/makeDraggable.js +91 -0
  100. package/es/global/js/utils/makeDraggable/makeDraggable.stories.d.ts +22 -0
  101. package/es/index.js +4 -2
  102. package/es/node_modules/@floating-ui/core/dist/floating-ui.core.js +592 -0
  103. package/es/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +713 -0
  104. package/es/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +95 -0
  105. package/es/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +161 -0
  106. package/es/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +142 -0
  107. package/es/settings.d.ts +2 -1
  108. package/lib/components/{BigNumbers/BigNumbers.d.ts → BigNumber/BigNumber.d.ts} +5 -5
  109. package/lib/components/{BigNumbers/BigNumbers.js → BigNumber/BigNumber.js} +11 -11
  110. package/lib/components/BigNumber/BigNumberSkeleton.d.ts +17 -0
  111. package/lib/components/{BigNumbers/BigNumbersSkeleton.js → BigNumber/BigNumberSkeleton.js} +15 -15
  112. package/lib/components/{BigNumbers → BigNumber}/constants.d.ts +3 -3
  113. package/lib/components/{BigNumbers → BigNumber}/constants.js +6 -6
  114. package/lib/components/BigNumber/index.d.ts +7 -0
  115. package/lib/components/Coachmark/Coachmark.js +2 -2
  116. package/lib/components/Coachmark/next/Coachmark/Coachmark.d.ts +72 -0
  117. package/lib/components/Coachmark/next/Coachmark/Coachmark.js +189 -0
  118. package/lib/components/Coachmark/next/Coachmark/CoachmarkBeacon/CoachmarkBeacon.d.ts +44 -0
  119. package/lib/components/Coachmark/next/Coachmark/CoachmarkBeacon/index.d.ts +8 -0
  120. package/lib/components/Coachmark/next/Coachmark/CoachmarkBubble/CoachmarkBubble.d.ts +38 -0
  121. package/lib/components/Coachmark/next/Coachmark/CoachmarkBubble/CoachmarkBubble.js +127 -0
  122. package/lib/components/Coachmark/next/Coachmark/CoachmarkBubble/CoachmarkBubbleHeader.d.ts +24 -0
  123. package/lib/components/Coachmark/next/Coachmark/CoachmarkBubble/CoachmarkBubbleHeader.js +27 -0
  124. package/lib/components/Coachmark/next/Coachmark/CoachmarkBubble/index.d.ts +10 -0
  125. package/lib/components/Coachmark/next/Coachmark/CoachmarkContent.d.ts +34 -0
  126. package/lib/components/Coachmark/next/Coachmark/CoachmarkContent.js +122 -0
  127. package/lib/components/Coachmark/next/Coachmark/ContentBody.d.ts +23 -0
  128. package/lib/components/Coachmark/next/Coachmark/ContentBody.js +41 -0
  129. package/lib/components/Coachmark/next/Coachmark/ContentHeader.d.ts +21 -0
  130. package/lib/components/Coachmark/next/Coachmark/ContentHeader.js +93 -0
  131. package/lib/components/Coachmark/next/Coachmark/index.d.ts +7 -0
  132. package/lib/components/CoachmarkBeacon/CoachmarkBeacon.js +0 -1
  133. package/lib/components/CoachmarkFixed/CoachmarkFixed.js +2 -2
  134. package/lib/components/CoachmarkStack/CoachmarkStack.js +2 -2
  135. package/lib/components/CoachmarkStack/CoachmarkStackHome.js +2 -2
  136. package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +2 -1
  137. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.js +11 -5
  138. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemDate/ConditionBuilderItemDate.js +1 -1
  139. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemNumber/ConditionBuilderItemNumber.js +11 -4
  140. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.js +2 -2
  141. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOptionForValueField.js +1 -1
  142. package/lib/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.js +41 -2
  143. package/lib/components/ConditionBuilder/ConditionPreview/ConditionPreview.d.ts +3 -1
  144. package/lib/components/ConditionBuilder/ConditionPreview/ConditionPreview.js +5 -3
  145. package/lib/components/ConditionBuilder/utils/useTranslations.js +1 -1
  146. package/lib/components/EditInPlace/EditInPlace.js +0 -3
  147. package/lib/components/EmptyStates/EmptyState.d.ts +2 -2
  148. package/lib/components/EmptyStates/EmptyState.js +2 -8
  149. package/lib/components/FilterPanel/FilterPanelGroup/index.d.ts +1 -0
  150. package/lib/components/InterstitialScreen/InterstitialScreen.d.ts +1 -25
  151. package/lib/components/InterstitialScreen/InterstitialScreen.js +6 -25
  152. package/lib/components/InterstitialScreen/InterstitialScreenBody.d.ts +1 -1
  153. package/lib/components/InterstitialScreen/InterstitialScreenBody.js +6 -6
  154. package/lib/components/InterstitialScreen/InterstitialScreenFooter.d.ts +1 -1
  155. package/lib/components/InterstitialScreen/InterstitialScreenFooter.js +9 -9
  156. package/lib/components/InterstitialScreen/InterstitialScreenHeader.d.ts +6 -0
  157. package/lib/components/InterstitialScreen/InterstitialScreenHeader.js +5 -5
  158. package/lib/components/InterstitialScreen/_story-assets/InterstitialScreenViewModule/InterstitialScreenViewModule.d.ts +1 -1
  159. package/lib/components/InterstitialScreen/context.d.ts +31 -0
  160. package/lib/components/InterstitialScreen/context.js +21 -0
  161. package/lib/components/InterstitialScreen/index.d.ts +3 -2
  162. package/lib/components/NotificationsPanel/NotificationsPanel.js +36 -13
  163. package/lib/components/PageHeader/PageHeader.d.ts +2 -1
  164. package/lib/components/PageHeader/PageHeader.js +2 -1
  165. package/lib/components/PageHeader/next/PageHeader.d.ts +18 -3
  166. package/lib/components/PageHeader/next/PageHeader.js +261 -7
  167. package/lib/components/PageHeader/next/context.d.ts +25 -0
  168. package/lib/components/PageHeader/next/context.js +33 -0
  169. package/lib/components/PageHeader/next/index.d.ts +3 -3
  170. package/lib/components/PageHeader/next/overflowHandler.d.ts +95 -0
  171. package/lib/components/PageHeader/next/overflowHandler.js +166 -0
  172. package/lib/components/PageHeader/next/utils.d.ts +19 -0
  173. package/lib/components/PageHeader/next/utils.js +71 -0
  174. package/lib/components/ProductiveCard/ProductiveCard.js +2 -1
  175. package/lib/components/ScrollGradient/ScrollGradient.js +1 -2
  176. package/lib/components/SidePanel/SidePanel.d.ts +4 -0
  177. package/lib/components/SidePanel/SidePanel.js +8 -2
  178. package/lib/components/Tearsheet/TearsheetShell.js +8 -5
  179. package/lib/components/TruncatedText/TruncatedText.d.ts +48 -0
  180. package/lib/components/TruncatedText/TruncatedText.js +86 -0
  181. package/lib/components/TruncatedText/index.d.ts +7 -0
  182. package/lib/components/TruncatedText/useTruncatedText.d.ts +16 -0
  183. package/lib/components/TruncatedText/useTruncatedText.js +45 -0
  184. package/lib/components/index.d.ts +4 -2
  185. package/lib/global/js/hooks/useOverflowString.d.ts +2 -2
  186. package/lib/global/js/hooks/usePortalTarget.js +2 -2
  187. package/lib/global/js/hooks/useResizeObserver.d.ts +1 -1
  188. package/lib/global/js/package-settings.d.ts +2 -1
  189. package/lib/global/js/package-settings.js +3 -2
  190. package/lib/global/js/utils/checkForOverflow.js +23 -0
  191. package/lib/global/js/utils/makeDraggable/index.d.ts +1 -0
  192. package/lib/global/js/utils/makeDraggable/makeDraggable.d.ts +19 -0
  193. package/lib/global/js/utils/makeDraggable/makeDraggable.js +93 -0
  194. package/lib/global/js/utils/makeDraggable/makeDraggable.stories.d.ts +22 -0
  195. package/lib/index.js +11 -4
  196. package/lib/node_modules/@floating-ui/core/dist/floating-ui.core.js +600 -0
  197. package/lib/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +722 -0
  198. package/lib/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +102 -0
  199. package/lib/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +182 -0
  200. package/lib/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +164 -0
  201. package/lib/settings.d.ts +2 -1
  202. package/package.json +10 -11
  203. package/scss/components/{BigNumbers/_big-numbers.scss → BigNumber/_big-number.scss} +5 -5
  204. package/scss/components/{BigNumbers → BigNumber}/_carbon-imports.scss +3 -3
  205. package/scss/components/{BigNumbers → BigNumber}/_index-with-carbon.scss +2 -2
  206. package/scss/components/{BigNumbers → BigNumber}/_index.scss +2 -2
  207. package/scss/components/Card/_card.scss +2 -0
  208. package/scss/components/Coachmark/_bubble.scss +62 -0
  209. package/scss/components/Coachmark/_coachmark-beacon.scss +164 -0
  210. package/scss/components/Coachmark/_coachmark.scss +15 -0
  211. package/scss/components/ConditionBuilder/_condition-builder.scss +8 -0
  212. package/scss/components/PageHeader/_page-header.scss +144 -1
  213. package/scss/components/Tearsheet/_tearsheet.scss +6 -0
  214. package/scss/components/TruncatedText/_carbon-imports.scss +6 -0
  215. package/scss/components/TruncatedText/_index-with-carbon.scss +9 -0
  216. package/scss/components/TruncatedText/_index.scss +8 -0
  217. package/scss/components/TruncatedText/_truncated-text.scss +26 -0
  218. package/scss/components/_index-with-carbon.scss +3 -2
  219. package/scss/components/_index.scss +3 -2
  220. package/telemetry.yml +24 -5
  221. package/es/components/BigNumbers/BigNumbersSkeleton.d.ts +0 -17
  222. package/lib/components/BigNumbers/BigNumbersSkeleton.d.ts +0 -17
@@ -5,8 +5,8 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
  import React, { ReactNode } from 'react';
8
- import { BigNumbersSizeValues } from './constants';
9
- export interface BigNumbersProps {
8
+ import { BigNumberSizeValues } from './constants';
9
+ export interface BigNumberProps {
10
10
  className?: string;
11
11
  forceShowTotal?: boolean;
12
12
  fractionDigits?: number;
@@ -15,7 +15,7 @@ export interface BigNumbersProps {
15
15
  label: string;
16
16
  locale?: string;
17
17
  percentage?: boolean;
18
- size?: BigNumbersSizeValues;
18
+ size?: BigNumberSizeValues;
19
19
  tooltipDescription?: string;
20
20
  total?: number;
21
21
  trending?: boolean;
@@ -23,7 +23,7 @@ export interface BigNumbersProps {
23
23
  value?: number;
24
24
  }
25
25
  /**
26
- * BigNumbers is used to display large values in a small area. The display of
26
+ * BigNumber is used to display large values in a small area. The display of
27
27
  * values can be the value itself, or grouped in a `numerator/denominator` fashion.
28
28
  * Control over the total fraction decimals displayed as well as how the
29
29
  * values/totals are displayed are done via a locale prop. Other optional props
@@ -31,4 +31,4 @@ export interface BigNumbersProps {
31
31
  * of a button as well as tool tip functionality.
32
32
  * The default locale is English (`en-US`) if one is not provided or if the provided one is not supported.
33
33
  */
34
- export declare let BigNumbers: React.ForwardRefExoticComponent<BigNumbersProps & React.RefAttributes<HTMLDivElement>>;
34
+ export declare let BigNumber: React.ForwardRefExoticComponent<BigNumberProps & React.RefAttributes<HTMLDivElement>>;
@@ -14,18 +14,18 @@ import { getSupportedLocale } from '../../global/js/utils/getSupportedLocale.js'
14
14
  import { pkg } from '../../settings.js';
15
15
  import { Information, ArrowUp } from '@carbon/react/icons';
16
16
  import { Tooltip } from '@carbon/react';
17
- import { BigNumbersSkeleton } from './BigNumbersSkeleton.js';
17
+ import { BigNumberSkeleton } from './BigNumberSkeleton.js';
18
18
  import { DefaultLocale, formatValue, Characters, getIconSize } from './constants.js';
19
19
  import { TooltipTrigger } from '../TooltipTrigger/TooltipTrigger.js';
20
20
 
21
21
  var _Information;
22
- const blockClass = `${pkg.prefix}--big-numbers`;
23
- const componentName = 'BigNumbers';
22
+ const blockClass = `${pkg.prefix}--big-number`;
23
+ const componentName = 'BigNumber';
24
24
 
25
25
  // NOTE: the component SCSS is not imported here: it is rolled up separately.
26
26
 
27
27
  /**
28
- * BigNumbers is used to display large values in a small area. The display of
28
+ * BigNumber is used to display large values in a small area. The display of
29
29
  * values can be the value itself, or grouped in a `numerator/denominator` fashion.
30
30
  * Control over the total fraction decimals displayed as well as how the
31
31
  * values/totals are displayed are done via a locale prop. Other optional props
@@ -33,7 +33,7 @@ const componentName = 'BigNumbers';
33
33
  * of a button as well as tool tip functionality.
34
34
  * The default locale is English (`en-US`) if one is not provided or if the provided one is not supported.
35
35
  */
36
- let BigNumbers = /*#__PURE__*/forwardRef((_ref, ref) => {
36
+ let BigNumber = /*#__PURE__*/forwardRef((_ref, ref) => {
37
37
  let {
38
38
  // The component props, in alphabetical order (for consistency).
39
39
  className,
@@ -53,7 +53,7 @@ let BigNumbers = /*#__PURE__*/forwardRef((_ref, ref) => {
53
53
  // Collect any other property values passed in.
54
54
  ...rest
55
55
  } = _ref;
56
- const bigNumbersClasses = cx(className, {
56
+ const bigNumberClasses = cx(className, {
57
57
  [`${blockClass}--lg`]: size === 'lg',
58
58
  [`${blockClass}--xl`]: size === 'xl'
59
59
  });
@@ -62,14 +62,14 @@ let BigNumbers = /*#__PURE__*/forwardRef((_ref, ref) => {
62
62
  const truncatedTotal = formatValue(supportedLocale, total, fractionDigits, truncate) ?? 'Unknown';
63
63
  const shouldDisplayDenominator = forceShowTotal || !percentage && total && value && total > value && truncatedValue !== truncatedTotal;
64
64
  if (loading) {
65
- return /*#__PURE__*/React__default.createElement(BigNumbersSkeleton, _extends({}, rest, {
65
+ return /*#__PURE__*/React__default.createElement(BigNumberSkeleton, _extends({}, rest, {
66
66
  ref: ref,
67
67
  className: className,
68
68
  size: size
69
69
  }, getDevtoolsProps(componentName)));
70
70
  }
71
71
  return /*#__PURE__*/React__default.createElement("div", _extends({}, rest, {
72
- className: cx(blockClass, bigNumbersClasses, className),
72
+ className: cx(blockClass, bigNumberClasses, className),
73
73
  ref: ref
74
74
  }, getDevtoolsProps(componentName)), /*#__PURE__*/React__default.createElement("span", {
75
75
  className: `${blockClass}__row`
@@ -103,16 +103,16 @@ let BigNumbers = /*#__PURE__*/forwardRef((_ref, ref) => {
103
103
  });
104
104
 
105
105
  // Return a placeholder if not released and not enabled by feature flag
106
- BigNumbers = pkg.checkComponentEnabled(BigNumbers, componentName);
106
+ BigNumber = pkg.checkComponentEnabled(BigNumber, componentName);
107
107
 
108
108
  // The display name of the component, used by React. Note that displayName
109
109
  // is used in preference to relying on function.name.
110
- BigNumbers.displayName = componentName;
110
+ BigNumber.displayName = componentName;
111
111
 
112
112
  // The types and DocGen commentary for the component props,
113
113
  // in alphabetical order (for consistency).
114
114
  // See https://www.npmjs.com/package/prop-types#usage.
115
- BigNumbers.propTypes = {
115
+ BigNumber.propTypes = {
116
116
  /**
117
117
  * Provide an optional class to be applied to the containing node.
118
118
  */
@@ -177,4 +177,4 @@ BigNumbers.propTypes = {
177
177
  value: PropTypes.number
178
178
  };
179
179
 
180
- export { BigNumbers };
180
+ export { BigNumber };
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Copyright IBM Corp. 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
+ import React from 'react';
8
+ import { BigNumberProps } from './BigNumber';
9
+ /**
10
+ * SkeletonBigNumber is used to display a skeleton version while
11
+ * content is loading (handled by the BigNumber prop `loading').
12
+ *
13
+ * Note: This component is only used within BigNumber.
14
+ */
15
+ type BigNumberSkeletonProps = Pick<BigNumberProps, 'className' | 'size'>;
16
+ export declare const BigNumberSkeleton: React.ForwardRefExoticComponent<BigNumberSkeletonProps & React.RefAttributes<HTMLDivElement>>;
17
+ export {};
@@ -12,33 +12,33 @@ import cx from 'classnames';
12
12
  import { getDevtoolsProps } from '../../global/js/utils/devtools.js';
13
13
  import { pkg } from '../../settings.js';
14
14
  import { SkeletonText } from '@carbon/react';
15
- import { BigNumbersSize } from './constants.js';
15
+ import { BigNumberSize } from './constants.js';
16
16
 
17
17
  // The block part of our conventional BEM class names (blockClass__E--M).
18
- const blockClass = `${pkg.prefix}--big-numbers-skeleton`;
19
- const componentName = 'BigNumbersSkeleton';
18
+ const blockClass = `${pkg.prefix}--big-number-skeleton`;
19
+ const componentName = 'BigNumberSkeleton';
20
20
 
21
21
  /**
22
- * SkeletonBigNumbers is used to display a skeleton version while
23
- * content is loading (handled by the BigNumbers prop `loading').
22
+ * SkeletonBigNumber is used to display a skeleton version while
23
+ * content is loading (handled by the BigNumber prop `loading').
24
24
  *
25
- * Note: This component is only used within BigNumbers.
25
+ * Note: This component is only used within BigNumber.
26
26
  */
27
27
 
28
- // Use the same properties and values as parent BigNumbersProps
28
+ // Use the same properties and values as parent BigNumberProps
29
29
 
30
- const BigNumbersSkeleton = /*#__PURE__*/forwardRef((_ref, ref) => {
30
+ const BigNumberSkeleton = /*#__PURE__*/forwardRef((_ref, ref) => {
31
31
  let {
32
32
  className,
33
33
  size,
34
34
  ...rest
35
35
  } = _ref;
36
- const bigNumbersSkeletonClasses = cx(className, blockClass, {
37
- [`${blockClass}--lg`]: size === BigNumbersSize.Large,
38
- [`${blockClass}--xl`]: size === BigNumbersSize.XLarge
36
+ const bigNumberSkeletonClasses = cx(className, blockClass, {
37
+ [`${blockClass}--lg`]: size === BigNumberSize.Large,
38
+ [`${blockClass}--xl`]: size === BigNumberSize.XLarge
39
39
  });
40
40
  return /*#__PURE__*/React__default.createElement("div", _extends({}, rest, {
41
- className: bigNumbersSkeletonClasses,
41
+ className: bigNumberSkeletonClasses,
42
42
  ref: ref
43
43
  }, getDevtoolsProps(componentName)), /*#__PURE__*/React__default.createElement(SkeletonText, {
44
44
  className: `${blockClass}__label`
@@ -51,8 +51,8 @@ const BigNumbersSkeleton = /*#__PURE__*/forwardRef((_ref, ref) => {
51
51
 
52
52
  // The display name of the component, used by React. Note that displayName
53
53
  // is used in preference to relying on function.name.
54
- BigNumbersSkeleton.displayName = componentName;
55
- BigNumbersSkeleton.propTypes = {
54
+ BigNumberSkeleton.displayName = componentName;
55
+ BigNumberSkeleton.propTypes = {
56
56
  /**
57
57
  * Provide an optional class to be applied to the containing node.
58
58
  */
@@ -60,7 +60,7 @@ BigNumbersSkeleton.propTypes = {
60
60
  /**
61
61
  *
62
62
  */
63
- size: PropTypes.oneOf([BigNumbersSize.Default, BigNumbersSize.Large, BigNumbersSize.XLarge])
63
+ size: PropTypes.oneOf([BigNumberSize.Default, BigNumberSize.Large, BigNumberSize.XLarge])
64
64
  };
65
65
 
66
- export { BigNumbersSkeleton };
66
+ export { BigNumberSkeleton };
@@ -4,16 +4,16 @@
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
- export declare enum BigNumbersSize {
7
+ export declare enum BigNumberSize {
8
8
  Default = "default",
9
9
  Large = "lg",
10
10
  XLarge = "xl"
11
11
  }
12
- export type BigNumbersSizeValues = `${BigNumbersSize}`;
12
+ export type BigNumberSizeValues = `${BigNumberSize}`;
13
13
  export declare enum Characters {
14
14
  Dash = "\u2013",
15
15
  Slash = "/"
16
16
  }
17
17
  export declare const DefaultLocale = "en-US";
18
18
  export declare const formatValue: (locale: Intl.LocalesArgument, value: number | null | undefined, fractionDigits: number, truncate: boolean) => string | null | undefined;
19
- export declare const getIconSize: (size: BigNumbersSizeValues) => number;
19
+ export declare const getIconSize: (size: BigNumberSizeValues) => number;
@@ -5,11 +5,11 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- let BigNumbersSize = /*#__PURE__*/function (BigNumbersSize) {
9
- BigNumbersSize["Default"] = "default";
10
- BigNumbersSize["Large"] = "lg";
11
- BigNumbersSize["XLarge"] = "xl";
12
- return BigNumbersSize;
8
+ let BigNumberSize = /*#__PURE__*/function (BigNumberSize) {
9
+ BigNumberSize["Default"] = "default";
10
+ BigNumberSize["Large"] = "lg";
11
+ BigNumberSize["XLarge"] = "xl";
12
+ return BigNumberSize;
13
13
  }({});
14
14
 
15
15
  // = 'default' | 'lg' | 'xl'
@@ -41,4 +41,4 @@ const getIconSize = size => {
41
41
  }
42
42
  };
43
43
 
44
- export { BigNumbersSize, Characters, DefaultLocale, formatValue, getIconSize };
44
+ export { BigNumberSize, Characters, DefaultLocale, formatValue, getIconSize };
@@ -1,7 +1,7 @@
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.
6
6
  */
7
- export { BigNumbers } from './BigNumbers';
7
+ export { BigNumber } from './BigNumber';
@@ -0,0 +1,72 @@
1
+ /**
2
+ * Copyright IBM Corp. 2024, 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
+ import React, { FC, ForwardRefExoticComponent, ReactNode, RefAttributes, RefObject } from 'react';
8
+ import { CoachmarkContentProps } from './CoachmarkContent';
9
+ import { NewPopoverAlignment } from '@carbon/react';
10
+ export declare const blockClass: string;
11
+ export interface CoachmarkProps {
12
+ /**
13
+ * Provide the contents of the Coachmark.
14
+ */
15
+ children: ReactNode;
16
+ /**
17
+ * Provide an optional class to be applied to the containing node.
18
+ */
19
+ className?: string;
20
+ /**
21
+ * The aria label applied to the Coachmark component
22
+ */
23
+ ariaLabel?: string;
24
+ /**
25
+ * Specifies whether the component is currently open.
26
+ */
27
+ open?: boolean;
28
+ /**
29
+ * Function to call when the close button is clicked.
30
+ */
31
+ onClose?: () => void;
32
+ /**
33
+ * Where to render the Coachmark relative to its target.
34
+ */
35
+ align?: NewPopoverAlignment;
36
+ /**
37
+ * Fine tune the position of the target in pixels.
38
+ */
39
+ position?: {
40
+ x: number;
41
+ y: number;
42
+ };
43
+ /**
44
+ * Specifies whether the component is floating or not.
45
+ */
46
+ floating?: boolean;
47
+ }
48
+ export type CoachmarkComponent = ForwardRefExoticComponent<CoachmarkProps & RefAttributes<HTMLDivElement>> & {
49
+ Content: FC<CoachmarkContentProps>;
50
+ };
51
+ interface CoachmarkContextType {
52
+ onClose?: () => void;
53
+ open?: boolean;
54
+ setOpen: (value: boolean) => void;
55
+ align?: NewPopoverAlignment;
56
+ triggerRef: RefObject<HTMLElement | null>;
57
+ position: {
58
+ x: number;
59
+ y: number;
60
+ };
61
+ contentRef: HTMLElement | null;
62
+ setContentRef: (value: any) => void;
63
+ floating?: boolean;
64
+ }
65
+ export declare const CoachmarkContext: React.Context<CoachmarkContextType>;
66
+ /**
67
+ * Coachmarks are used to call out specific functionality or concepts
68
+ * within the UI that may not be intuitive but are important for the
69
+ * user to gain understanding of the product's main value and discover new use cases.
70
+ */
71
+ export declare const Coachmark: CoachmarkComponent;
72
+ export {};
@@ -0,0 +1,185 @@
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 { extends as _extends } from '../../../../_virtual/_rollupPluginBabelHelpers.js';
9
+ import React__default, { createContext, forwardRef, useRef, useState, useEffect } from 'react';
10
+ import PropTypes from '../../../../_virtual/index.js';
11
+ import cx from 'classnames';
12
+ import { getDevtoolsProps } from '../../../../global/js/utils/devtools.js';
13
+ import { pkg } from '../../../../settings.js';
14
+ import CoachmarkContent from './CoachmarkContent.js';
15
+ import { useIsomorphicEffect } from '../../../../global/js/hooks/useIsomorphicEffect.js';
16
+
17
+ // The block part of our conventional BEM class names (blockClass__E--M).
18
+ const blockClass = `${pkg.prefix}--coachmark__next`;
19
+ const componentName = 'Coachmark';
20
+
21
+ // NOTE: the component SCSS is not imported here: it is rolled up separately.
22
+
23
+ // Default values can be included here and then assigned to the prop params,
24
+ // e.g. prop = defaults.prop,
25
+ // This gathers default values together neatly and ensures non-primitive
26
+ // values are initialized early to avoid react making unnecessary re-renders.
27
+ // Note that default values are not required for props that are 'required',
28
+ // nor for props where the component can apply undefined values reasonably.
29
+ // Default values should be provided when the component needs to make a choice
30
+ // or assumption when a prop is not supplied.
31
+
32
+ // Define the type for Coachmark, extending it to include Trigger and Content
33
+
34
+ const CoachmarkContext = /*#__PURE__*/createContext({
35
+ open: false,
36
+ setOpen: () => {},
37
+ align: 'bottom',
38
+ triggerRef: {
39
+ current: null
40
+ },
41
+ position: {
42
+ x: 0,
43
+ y: 0
44
+ },
45
+ contentRef: null,
46
+ setContentRef: value => {},
47
+ floating: false
48
+ });
49
+ /**
50
+ * Coachmarks are used to call out specific functionality or concepts
51
+ * within the UI that may not be intuitive but are important for the
52
+ * user to gain understanding of the product's main value and discover new use cases.
53
+ */
54
+ const Coachmark = /*#__PURE__*/forwardRef((props, ref) => {
55
+ const {
56
+ children,
57
+ className,
58
+ ariaLabel,
59
+ onClose,
60
+ align = 'bottom',
61
+ open,
62
+ position = {
63
+ x: 0,
64
+ y: 0
65
+ },
66
+ floating,
67
+ ...rest
68
+ } = props;
69
+ const triggerRef = useRef(null);
70
+ const internalRef = useRef(null);
71
+ const [contentRef, setContentRef] = useState(null);
72
+ const [openState, setOpenState] = useState(false);
73
+ const setOpen = value => {
74
+ if (!value) {
75
+ onClose?.();
76
+ }
77
+ if (open === undefined) {
78
+ setOpenState(value);
79
+ }
80
+ };
81
+ const currentOpen = open ?? openState;
82
+ useEffect(() => {
83
+ const container = internalRef.current;
84
+ if (!container) {
85
+ return;
86
+ }
87
+ const focusableElements = Array.from(container.querySelectorAll('*'));
88
+ const firstFocusable = focusableElements.find(el => el.tabIndex >= 0 && !el.hasAttribute('disabled'));
89
+ if (firstFocusable) {
90
+ triggerRef.current = firstFocusable;
91
+ }
92
+ }, [children]);
93
+ useIsomorphicEffect(() => {
94
+ const {
95
+ x = 0,
96
+ y = 0
97
+ } = position ?? {};
98
+ const el = internalRef.current;
99
+ if (el && (x !== 0 || y !== 0)) {
100
+ el.style.transform = `translate(${x}px, ${y}px)`;
101
+ }
102
+ }, [position]);
103
+ const setRef = node => {
104
+ internalRef.current = node;
105
+ if (typeof ref === 'function') {
106
+ ref(node);
107
+ } else if (ref) {
108
+ ref.current = node;
109
+ }
110
+ };
111
+ return /*#__PURE__*/React__default.createElement(CoachmarkContext.Provider, {
112
+ value: {
113
+ onClose,
114
+ open: currentOpen,
115
+ setOpen,
116
+ align,
117
+ triggerRef,
118
+ position,
119
+ contentRef,
120
+ setContentRef,
121
+ floating
122
+ }
123
+ }, /*#__PURE__*/React__default.createElement("div", _extends({}, rest, {
124
+ className: cx(blockClass,
125
+ // Apply the block class to the main HTML element
126
+ className,
127
+ // Apply any supplied class names to the main HTML element.
128
+ {
129
+ [`${blockClass}--floating`]: floating
130
+ }),
131
+ "aria-label": ariaLabel,
132
+ ref: setRef
133
+ }, getDevtoolsProps(componentName)), /*#__PURE__*/React__default.createElement("div", {
134
+ className: `${blockClass}--container`
135
+ }, children)));
136
+ });
137
+ Coachmark.Content = CoachmarkContent;
138
+
139
+ // The display name of the component, used by React. Note that displayName
140
+ // is used in preference to relying on function.name.
141
+ Coachmark.displayName = componentName;
142
+
143
+ // The types and DocGen commentary for the component props,
144
+ // in alphabetical order (for consistency).
145
+ // See https://www.npmjs.com/package/prop-types#usage.
146
+ Coachmark.propTypes = {
147
+ /**
148
+ * Where to render the Coachmark relative to its target.
149
+ */
150
+ align: PropTypes.string,
151
+ /**
152
+ * The aria label applied to the Coachmark component
153
+ */
154
+ ariaLabel: PropTypes.string,
155
+ /**
156
+ * Provide the contents of the CoachmarkV2.
157
+ */
158
+ children: PropTypes.node.isRequired,
159
+ /**
160
+ * Provide an optional class to be applied to the containing node.
161
+ */
162
+ className: PropTypes.string,
163
+ /**
164
+ * Specifies whether the component is currently open.
165
+ */
166
+ defaultOpen: PropTypes.bool,
167
+ /**
168
+ * Specifies whether the component is floating or not.
169
+ */
170
+ floating: PropTypes.bool,
171
+ /**
172
+ * Function to call when the close button is clicked.
173
+ */
174
+ onClose: PropTypes.func,
175
+ /**
176
+ * Fine tune the position of the target in pixels. Applies only to Beacons.
177
+ */
178
+ // @ts-ignore
179
+ position: PropTypes.shape({
180
+ x: PropTypes.number,
181
+ y: PropTypes.number
182
+ })
183
+ };
184
+
185
+ export { Coachmark, CoachmarkContext, blockClass };
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Copyright IBM Corp. 2024, 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
+ import React, { ElementType } from 'react';
8
+ import { ButtonProps } from '@carbon/react';
9
+ /**
10
+ * Reserved for future expansion, i.e. "RING".
11
+ */
12
+ export declare enum BEACON_KIND {
13
+ DEFAULT = "default"
14
+ }
15
+ export interface CoachmarkButtonProps extends ButtonProps<ElementType> {
16
+ onClick?(): void;
17
+ onDoubleClick?(): void;
18
+ tabIndex?: number;
19
+ ['aria-expanded']?: boolean;
20
+ }
21
+ export interface CoachmarkBeaconProps {
22
+ /**
23
+ * Optional class name for this component.
24
+ */
25
+ className?: string;
26
+ /**
27
+ * What style of beacon.
28
+ * BEACON_KIND is an enum from the Coachmark and can be used for this value.
29
+ * @see {@link BEACON_KIND}
30
+ */
31
+ kind?: BEACON_KIND;
32
+ /**
33
+ * The aria label.
34
+ */
35
+ label: string;
36
+ /**
37
+ * button props
38
+ */
39
+ buttonProps?: CoachmarkButtonProps;
40
+ }
41
+ /**
42
+ * Use beacon for the target prop of a Coachmark component.
43
+ */
44
+ export declare const CoachmarkBeacon: React.ForwardRefExoticComponent<CoachmarkBeaconProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Copyright IBM Corp. 2024, 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 { CoachmarkBeacon } from './CoachmarkBeacon';
8
+ export type { CoachmarkBeaconProps } from './CoachmarkBeacon';
@@ -0,0 +1,38 @@
1
+ /**
2
+ * @license
3
+ *
4
+ * Copyright IBM Corp. 2025
5
+ *
6
+ * This source code is licensed under the Apache-2.0 license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ */
9
+ import { NewPopoverAlignment } from '@carbon/react';
10
+ import React, { HTMLProps, RefObject } from 'react';
11
+ interface BubbleProps extends Omit<HTMLProps<HTMLDivElement>, 'target'> {
12
+ /**
13
+ * 'top' | 'bottom' | 'left' | 'right' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end' | 'left-end' | 'left-start' | 'right-end' | 'right-start';
14
+ **/
15
+ align?: NewPopoverAlignment;
16
+ /**
17
+ * Values can range from an Element, a ref of an Element, a string which will use query selector to select an Element.
18
+ **/
19
+ target: Element | RefObject<Element> | string | null | undefined;
20
+ /**
21
+ * Specify whether the component should be rendered on high-contrast.
22
+ */
23
+ highContrast?: boolean;
24
+ /**
25
+ * Specify whether a drop shadow should be rendered on the popover.
26
+ */
27
+ dropShadow?: boolean;
28
+ /**
29
+ * Specifies whether the component is currently open.
30
+ */
31
+ open: boolean;
32
+ /**
33
+ * Specify whether a caret should be rendered.
34
+ */
35
+ caret?: boolean;
36
+ }
37
+ declare const CoachmarkBubble: React.ForwardRefExoticComponent<Omit<BubbleProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
38
+ export { CoachmarkBubble };