@carbon/ibm-products 2.94.0 → 2.95.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 (252) hide show
  1. package/css/carbon.css +92 -103
  2. package/css/carbon.css.map +1 -1
  3. package/css/index-full-carbon.css +605 -186
  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 +43 -7
  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 +513 -83
  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 +308 -178
  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/APIKeyModal/APIKeyModal.d.ts +3 -0
  20. package/es/components/APIKeyModal/APIKeyModal.d.ts.map +1 -1
  21. package/es/components/APIKeyModal/APIKeyModal.js +8 -0
  22. package/es/components/AddSelect/next/AddSelect.d.ts +7 -9
  23. package/es/components/AddSelect/next/AddSelect.d.ts.map +1 -1
  24. package/es/components/AddSelect/next/AddSelect.js +0 -2
  25. package/es/components/AddSelect/next/AddSelectBody.d.ts +4 -0
  26. package/es/components/AddSelect/next/AddSelectBody.d.ts.map +1 -1
  27. package/es/components/AddSelect/next/AddSelectBody.js +80 -4
  28. package/es/components/AddSelect/next/AddSelectColumn.d.ts +1 -1
  29. package/es/components/AddSelect/next/AddSelectRow.d.ts +6 -0
  30. package/es/components/AddSelect/next/AddSelectRow.d.ts.map +1 -1
  31. package/es/components/AddSelect/next/AddSelectRow.js +10 -3
  32. package/es/components/AddSelect/next/AddSelectSelectionSummaryItem.d.ts.map +1 -1
  33. package/es/components/AddSelect/next/AddSelectSelectionSummaryItem.js +5 -3
  34. package/es/components/AddSelect/next/index.d.ts +0 -1
  35. package/es/components/AddSelect/next/index.d.ts.map +1 -1
  36. package/es/components/BigNumber/BigNumber.d.ts +1 -1
  37. package/es/components/BigNumber/BigNumber.d.ts.map +1 -1
  38. package/es/components/BigNumber/BigNumber.js +2 -2
  39. package/es/components/Card/next/Card.d.ts +87 -11
  40. package/es/components/Card/next/Card.d.ts.map +1 -1
  41. package/es/components/Card/next/Card.js +62 -8
  42. package/es/components/Card/next/Card.types.d.ts +13 -0
  43. package/es/components/Card/next/Card.types.d.ts.map +1 -1
  44. package/es/components/Card/next/CardAction.d.ts +43 -0
  45. package/es/components/Card/next/CardAction.d.ts.map +1 -0
  46. package/es/components/Card/next/CardAction.js +51 -0
  47. package/es/components/Card/next/CardActions.d.ts +46 -0
  48. package/es/components/Card/next/CardActions.d.ts.map +1 -0
  49. package/es/components/Card/next/CardActions.js +107 -0
  50. package/es/components/Card/next/CardCaption.d.ts +46 -0
  51. package/es/components/Card/next/CardCaption.d.ts.map +1 -0
  52. package/es/components/Card/next/CardCaption.js +52 -0
  53. package/es/components/Card/next/CardContext.js +12 -2
  54. package/es/components/Card/next/CardFooter.d.ts.map +1 -1
  55. package/es/components/Card/next/CardHeader.d.ts.map +1 -1
  56. package/es/components/Card/next/CardHeader.js +25 -2
  57. package/es/components/Card/next/CardHeaderMedia.d.ts +33 -0
  58. package/es/components/Card/next/CardHeaderMedia.d.ts.map +1 -0
  59. package/es/components/Card/next/CardHeaderMedia.js +44 -0
  60. package/es/components/Card/next/CardLabel.d.ts +46 -0
  61. package/es/components/Card/next/CardLabel.d.ts.map +1 -0
  62. package/es/components/Card/next/CardLabel.js +52 -0
  63. package/es/components/Card/next/CardMedia.d.ts +39 -0
  64. package/es/components/Card/next/CardMedia.d.ts.map +1 -0
  65. package/es/components/Card/next/CardMedia.js +50 -0
  66. package/es/components/Card/next/CardTitle.d.ts +82 -0
  67. package/es/components/Card/next/CardTitle.d.ts.map +1 -0
  68. package/es/components/Card/next/CardTitle.js +77 -0
  69. package/es/components/Card/next/CardTitleMedia.d.ts +24 -0
  70. package/es/components/Card/next/CardTitleMedia.d.ts.map +1 -0
  71. package/es/components/Card/next/CardTitleMedia.js +48 -0
  72. package/es/components/Card/next/index.d.ts +2 -3
  73. package/es/components/Card/next/index.d.ts.map +1 -1
  74. package/es/components/Card/next/index.js +17 -5
  75. package/es/components/Coachmark/next/Coachmark/Coachmark.d.ts +9 -3
  76. package/es/components/Coachmark/next/Coachmark/Coachmark.d.ts.map +1 -1
  77. package/es/components/Coachmark/next/Coachmark/Coachmark.js +6 -13
  78. package/es/components/Coachmark/next/Coachmark/CoachmarkContent.d.ts +1 -1
  79. package/es/components/Coachmark/next/Coachmark/CoachmarkContent.d.ts.map +1 -1
  80. package/es/components/Coachmark/next/Coachmark/CoachmarkContent.js +16 -32
  81. package/es/components/Coachmark/next/Coachmark/context.d.ts +2 -2
  82. package/es/components/Coachmark/next/Coachmark/context.d.ts.map +1 -1
  83. package/es/components/Coachmark/next/Coachmark/context.js +1 -2
  84. package/es/components/ExportModal/ExportModal.d.ts +1 -0
  85. package/es/components/ExportModal/ExportModal.d.ts.map +1 -1
  86. package/es/components/ExportModal/ExportModal.js +6 -0
  87. package/es/components/ImportModal/ImportModal.d.ts +3 -0
  88. package/es/components/ImportModal/ImportModal.d.ts.map +1 -1
  89. package/es/components/ImportModal/ImportModal.js +8 -0
  90. package/es/components/PageHeader/PageHeader.d.ts +6 -0
  91. package/es/components/PageHeader/PageHeader.d.ts.map +1 -1
  92. package/es/components/PageHeader/PageHeader.js +11 -0
  93. package/es/components/Tearsheet/next/StackContext.d.ts +2 -2
  94. package/es/components/Tearsheet/next/StackContext.d.ts.map +1 -1
  95. package/es/components/Tearsheet/next/Tearsheet.d.ts +30 -28
  96. package/es/components/Tearsheet/next/Tearsheet.d.ts.map +1 -1
  97. package/es/components/Tearsheet/next/Tearsheet.js +4 -2
  98. package/es/components/Tearsheet/next/TearsheetBody.d.ts +20 -14
  99. package/es/components/Tearsheet/next/TearsheetBody.d.ts.map +1 -1
  100. package/es/components/Tearsheet/next/TearsheetBody.js +4 -0
  101. package/es/components/Tearsheet/next/TearsheetHeader.d.ts +15 -14
  102. package/es/components/Tearsheet/next/TearsheetHeader.d.ts.map +1 -1
  103. package/es/components/Tearsheet/next/TearsheetHeader.js +14 -7
  104. package/es/components/Tearsheet/next/TearsheetHeaderActions.d.ts +10 -6
  105. package/es/components/Tearsheet/next/TearsheetHeaderActions.d.ts.map +1 -1
  106. package/es/components/Tearsheet/next/TearsheetHeaderActions.js +6 -3
  107. package/es/components/Tearsheet/next/TearsheetHeaderContent.d.ts.map +1 -1
  108. package/es/components/Tearsheet/next/TearsheetHeaderContent.js +7 -4
  109. package/es/components/Tearsheet/next/_story-assets/StepTearsheet.d.ts +7 -1
  110. package/es/components/Tearsheet/next/_story-assets/StepTearsheet.d.ts.map +1 -1
  111. package/es/components/Tearsheet/next/context.d.ts +2 -1
  112. package/es/components/Tearsheet/next/context.d.ts.map +1 -1
  113. package/es/components/index.d.ts +1 -1
  114. package/es/components/index.d.ts.map +1 -1
  115. package/es/node_modules/@carbon/icons-react/es/generated/bucket-11.js +283 -294
  116. package/es/node_modules/@carbon/icons-react/es/generated/bucket-3.js +25 -41
  117. package/es/node_modules/@carbon/icons-react/es/{iconPropTypes-BElKp6Sn.js → iconPropTypes-CdMBxq3Y.js} +1 -1
  118. package/lib/components/APIKeyModal/APIKeyModal.d.ts +3 -0
  119. package/lib/components/APIKeyModal/APIKeyModal.d.ts.map +1 -1
  120. package/lib/components/APIKeyModal/APIKeyModal.js +8 -0
  121. package/lib/components/AddSelect/next/AddSelect.d.ts +7 -9
  122. package/lib/components/AddSelect/next/AddSelect.d.ts.map +1 -1
  123. package/lib/components/AddSelect/next/AddSelect.js +0 -2
  124. package/lib/components/AddSelect/next/AddSelectBody.d.ts +4 -0
  125. package/lib/components/AddSelect/next/AddSelectBody.d.ts.map +1 -1
  126. package/lib/components/AddSelect/next/AddSelectBody.js +78 -2
  127. package/lib/components/AddSelect/next/AddSelectColumn.d.ts +1 -1
  128. package/lib/components/AddSelect/next/AddSelectRow.d.ts +6 -0
  129. package/lib/components/AddSelect/next/AddSelectRow.d.ts.map +1 -1
  130. package/lib/components/AddSelect/next/AddSelectRow.js +9 -2
  131. package/lib/components/AddSelect/next/AddSelectSelectionSummaryItem.d.ts.map +1 -1
  132. package/lib/components/AddSelect/next/AddSelectSelectionSummaryItem.js +5 -3
  133. package/lib/components/AddSelect/next/index.d.ts +0 -1
  134. package/lib/components/AddSelect/next/index.d.ts.map +1 -1
  135. package/lib/components/BigNumber/BigNumber.d.ts +1 -1
  136. package/lib/components/BigNumber/BigNumber.d.ts.map +1 -1
  137. package/lib/components/BigNumber/BigNumber.js +2 -2
  138. package/lib/components/Card/next/Card.d.ts +87 -11
  139. package/lib/components/Card/next/Card.d.ts.map +1 -1
  140. package/lib/components/Card/next/Card.js +61 -11
  141. package/lib/components/Card/next/Card.types.d.ts +13 -0
  142. package/lib/components/Card/next/Card.types.d.ts.map +1 -1
  143. package/lib/components/Card/next/CardAction.d.ts +43 -0
  144. package/lib/components/Card/next/CardAction.d.ts.map +1 -0
  145. package/lib/components/Card/next/CardAction.js +53 -0
  146. package/lib/components/Card/next/CardActions.d.ts +46 -0
  147. package/lib/components/Card/next/CardActions.d.ts.map +1 -0
  148. package/lib/components/Card/next/CardActions.js +109 -0
  149. package/lib/components/Card/next/CardCaption.d.ts +46 -0
  150. package/lib/components/Card/next/CardCaption.d.ts.map +1 -0
  151. package/lib/components/Card/next/CardCaption.js +54 -0
  152. package/lib/components/Card/next/CardContext.js +13 -1
  153. package/lib/components/Card/next/CardFooter.d.ts.map +1 -1
  154. package/lib/components/Card/next/CardHeader.d.ts.map +1 -1
  155. package/lib/components/Card/next/CardHeader.js +24 -1
  156. package/lib/components/Card/next/CardHeaderMedia.d.ts +33 -0
  157. package/lib/components/Card/next/CardHeaderMedia.d.ts.map +1 -0
  158. package/lib/components/Card/next/CardHeaderMedia.js +46 -0
  159. package/lib/components/Card/next/CardLabel.d.ts +46 -0
  160. package/lib/components/Card/next/CardLabel.d.ts.map +1 -0
  161. package/lib/components/Card/next/CardLabel.js +54 -0
  162. package/lib/components/Card/next/CardMedia.d.ts +39 -0
  163. package/lib/components/Card/next/CardMedia.d.ts.map +1 -0
  164. package/lib/components/Card/next/CardMedia.js +52 -0
  165. package/lib/components/Card/next/CardTitle.d.ts +82 -0
  166. package/lib/components/Card/next/CardTitle.d.ts.map +1 -0
  167. package/lib/components/Card/next/CardTitle.js +79 -0
  168. package/lib/components/Card/next/CardTitleMedia.d.ts +24 -0
  169. package/lib/components/Card/next/CardTitleMedia.d.ts.map +1 -0
  170. package/lib/components/Card/next/CardTitleMedia.js +50 -0
  171. package/lib/components/Card/next/index.d.ts +2 -3
  172. package/lib/components/Card/next/index.d.ts.map +1 -1
  173. package/lib/components/Card/next/index.js +16 -4
  174. package/lib/components/Coachmark/next/Coachmark/Coachmark.d.ts +9 -3
  175. package/lib/components/Coachmark/next/Coachmark/Coachmark.d.ts.map +1 -1
  176. package/lib/components/Coachmark/next/Coachmark/Coachmark.js +6 -13
  177. package/lib/components/Coachmark/next/Coachmark/CoachmarkContent.d.ts +1 -1
  178. package/lib/components/Coachmark/next/Coachmark/CoachmarkContent.d.ts.map +1 -1
  179. package/lib/components/Coachmark/next/Coachmark/CoachmarkContent.js +16 -32
  180. package/lib/components/Coachmark/next/Coachmark/context.d.ts +2 -2
  181. package/lib/components/Coachmark/next/Coachmark/context.d.ts.map +1 -1
  182. package/lib/components/Coachmark/next/Coachmark/context.js +1 -2
  183. package/lib/components/ExportModal/ExportModal.d.ts +1 -0
  184. package/lib/components/ExportModal/ExportModal.d.ts.map +1 -1
  185. package/lib/components/ExportModal/ExportModal.js +6 -0
  186. package/lib/components/ImportModal/ImportModal.d.ts +3 -0
  187. package/lib/components/ImportModal/ImportModal.d.ts.map +1 -1
  188. package/lib/components/ImportModal/ImportModal.js +8 -0
  189. package/lib/components/PageHeader/PageHeader.d.ts +6 -0
  190. package/lib/components/PageHeader/PageHeader.d.ts.map +1 -1
  191. package/lib/components/PageHeader/PageHeader.js +11 -0
  192. package/lib/components/Tearsheet/next/StackContext.d.ts +2 -2
  193. package/lib/components/Tearsheet/next/StackContext.d.ts.map +1 -1
  194. package/lib/components/Tearsheet/next/Tearsheet.d.ts +30 -28
  195. package/lib/components/Tearsheet/next/Tearsheet.d.ts.map +1 -1
  196. package/lib/components/Tearsheet/next/Tearsheet.js +4 -2
  197. package/lib/components/Tearsheet/next/TearsheetBody.d.ts +20 -14
  198. package/lib/components/Tearsheet/next/TearsheetBody.d.ts.map +1 -1
  199. package/lib/components/Tearsheet/next/TearsheetBody.js +4 -0
  200. package/lib/components/Tearsheet/next/TearsheetHeader.d.ts +15 -14
  201. package/lib/components/Tearsheet/next/TearsheetHeader.d.ts.map +1 -1
  202. package/lib/components/Tearsheet/next/TearsheetHeader.js +14 -7
  203. package/lib/components/Tearsheet/next/TearsheetHeaderActions.d.ts +10 -6
  204. package/lib/components/Tearsheet/next/TearsheetHeaderActions.d.ts.map +1 -1
  205. package/lib/components/Tearsheet/next/TearsheetHeaderActions.js +4 -1
  206. package/lib/components/Tearsheet/next/TearsheetHeaderContent.d.ts.map +1 -1
  207. package/lib/components/Tearsheet/next/TearsheetHeaderContent.js +7 -4
  208. package/lib/components/Tearsheet/next/_story-assets/StepTearsheet.d.ts +7 -1
  209. package/lib/components/Tearsheet/next/_story-assets/StepTearsheet.d.ts.map +1 -1
  210. package/lib/components/Tearsheet/next/context.d.ts +2 -1
  211. package/lib/components/Tearsheet/next/context.d.ts.map +1 -1
  212. package/lib/components/index.d.ts +1 -1
  213. package/lib/components/index.d.ts.map +1 -1
  214. package/lib/node_modules/@carbon/icons-react/lib/{Icon-2zUDcllO.js → Icon.js} +8 -37
  215. package/lib/node_modules/@carbon/icons-react/lib/generated/bucket-0.js +133 -131
  216. package/lib/node_modules/@carbon/icons-react/lib/generated/bucket-1.js +140 -138
  217. package/lib/node_modules/@carbon/icons-react/lib/generated/bucket-10.js +393 -403
  218. package/lib/node_modules/@carbon/icons-react/lib/generated/bucket-11.js +417 -426
  219. package/lib/node_modules/@carbon/icons-react/lib/generated/bucket-12.js +447 -441
  220. package/lib/node_modules/@carbon/icons-react/lib/generated/bucket-13.js +449 -470
  221. package/lib/node_modules/@carbon/icons-react/lib/generated/bucket-14.js +487 -456
  222. package/lib/node_modules/@carbon/icons-react/lib/generated/bucket-15.js +550 -548
  223. package/lib/node_modules/@carbon/icons-react/lib/generated/bucket-16.js +680 -733
  224. package/lib/node_modules/@carbon/icons-react/lib/generated/bucket-17.js +810 -828
  225. package/lib/node_modules/@carbon/icons-react/lib/generated/bucket-18.js +754 -670
  226. package/lib/node_modules/@carbon/icons-react/lib/generated/bucket-19.js +622 -726
  227. package/lib/node_modules/@carbon/icons-react/lib/generated/bucket-2.js +150 -148
  228. package/lib/node_modules/@carbon/icons-react/lib/generated/bucket-20.js +752 -752
  229. package/lib/node_modules/@carbon/icons-react/lib/generated/bucket-21.js +724 -55
  230. package/lib/node_modules/@carbon/icons-react/lib/generated/bucket-3.js +176 -190
  231. package/lib/node_modules/@carbon/icons-react/lib/generated/bucket-4.js +198 -180
  232. package/lib/node_modules/@carbon/icons-react/lib/generated/bucket-5.js +217 -227
  233. package/lib/node_modules/@carbon/icons-react/lib/generated/bucket-6.js +270 -335
  234. package/lib/node_modules/@carbon/icons-react/lib/generated/bucket-7.js +405 -339
  235. package/lib/node_modules/@carbon/icons-react/lib/generated/bucket-8.js +400 -577
  236. package/lib/node_modules/@carbon/icons-react/lib/generated/bucket-9.js +578 -388
  237. package/lib/node_modules/@carbon/icons-react/lib/{iconPropTypes-DaTOKOBs.js → iconPropTypes-Dkz7B3UR.js} +6 -6
  238. package/lib/node_modules/@carbon/icons-react/lib/index.js +465 -423
  239. package/lib/node_modules/@carbon/icons-react/lib/rolldown-runtime-DyAcNxqs.js +51 -0
  240. package/package.json +18 -18
  241. package/scss/components/AboutModal/_about-modal.scss +12 -3
  242. package/scss/components/AddSelect/_add-select_next.scss +238 -99
  243. package/scss/components/BigNumber/_big-number.scss +4 -0
  244. package/scss/components/Card/_card-next.scss +394 -8
  245. package/scss/components/Tearsheet/_tearsheet_next.scss +38 -4
  246. package/telemetry.yml +24 -18
  247. package/es/components/AddSelect/next/AddSelectContent.d.ts +0 -26
  248. package/es/components/AddSelect/next/AddSelectContent.d.ts.map +0 -1
  249. package/es/components/AddSelect/next/AddSelectContent.js +0 -113
  250. package/lib/components/AddSelect/next/AddSelectContent.d.ts +0 -26
  251. package/lib/components/AddSelect/next/AddSelectContent.d.ts.map +0 -1
  252. package/lib/components/AddSelect/next/AddSelectContent.js +0 -115
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Copyright IBM Corp. 2020, 2026
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 { __toESM } from "../../../_virtual/_rolldown/runtime.js";
9
+ import { require_classnames } from "../../../node_modules/classnames/index.js";
10
+ import { pkg } from "../../../settings.js";
11
+ import { getDevtoolsProps } from "../../../global/js/utils/devtools.js";
12
+ import React from "react";
13
+ import PropTypes from "prop-types";
14
+ //#region src/components/Card/next/CardHeaderMedia.tsx
15
+ /**
16
+ * Copyright IBM Corp. 2026
17
+ *
18
+ * This source code is licensed under the Apache-2.0 license found in the
19
+ * LICENSE file in the root directory of this source tree.
20
+ */
21
+ var import_classnames = /* @__PURE__ */ __toESM(require_classnames());
22
+ const blockClass = `${pkg.prefix}--card-next`;
23
+ const componentName = "CardHeaderMedia";
24
+ const CardHeaderMedia = ({ children, className, ...rest }) => {
25
+ const classes = (0, import_classnames.default)(`${blockClass}__header-media`, className);
26
+ return /* @__PURE__ */ React.createElement("div", {
27
+ ...rest,
28
+ className: classes,
29
+ ...getDevtoolsProps(componentName)
30
+ }, children);
31
+ };
32
+ CardHeaderMedia.propTypes = {
33
+ /**
34
+ * Provide the contents of the CardHeaderMedia.
35
+ */
36
+ children: PropTypes.node,
37
+ /**
38
+ * Provide an optional class to be applied to the containing node.
39
+ */
40
+ className: PropTypes.string
41
+ };
42
+ CardHeaderMedia.displayName = componentName;
43
+ //#endregion
44
+ export { CardHeaderMedia };
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Copyright IBM Corp. 2026
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, { ReactNode } from 'react';
8
+ import PropTypes from 'prop-types';
9
+ export interface CardLabelProps {
10
+ /**
11
+ * Provide the contents of the CardLabel.
12
+ */
13
+ children?: ReactNode;
14
+ /**
15
+ * Provide an optional class to be applied to the containing node.
16
+ */
17
+ className?: string;
18
+ /**
19
+ * Enable text truncation with ellipsis.
20
+ * @default false
21
+ */
22
+ truncate?: boolean;
23
+ }
24
+ /**
25
+ * CardLabel displays secondary text above the title in the card header.
26
+ * Uses $label-01 typography token and $text-secondary color.
27
+ */
28
+ export declare const CardLabel: {
29
+ ({ children, className, truncate, ...rest }: CardLabelProps): React.JSX.Element;
30
+ propTypes: {
31
+ /**
32
+ * Provide the contents of the CardLabel.
33
+ */
34
+ children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
35
+ /**
36
+ * Provide an optional class to be applied to the containing node.
37
+ */
38
+ className: PropTypes.Requireable<string>;
39
+ /**
40
+ * Enable text truncation with ellipsis.
41
+ */
42
+ truncate: PropTypes.Requireable<boolean>;
43
+ };
44
+ displayName: string;
45
+ };
46
+ //# sourceMappingURL=CardLabel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CardLabel.d.ts","sourceRoot":"","sources":["../../../../src/components/Card/next/CardLabel.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,SAAS,MAAM,YAAY,CAAC;AAQnC,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;GAGG;AACH,eAAO,MAAM,SAAS;iDAKnB,cAAc;;QAiBf;;WAEG;;QAGH;;WAEG;;QAGH;;WAEG;;;;CAfJ,CAAC"}
@@ -0,0 +1,52 @@
1
+ /**
2
+ * Copyright IBM Corp. 2020, 2026
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 { __toESM } from "../../../_virtual/_rolldown/runtime.js";
9
+ import { require_classnames } from "../../../node_modules/classnames/index.js";
10
+ import { pkg } from "../../../settings.js";
11
+ import { getDevtoolsProps } from "../../../global/js/utils/devtools.js";
12
+ import React from "react";
13
+ import PropTypes from "prop-types";
14
+ //#region src/components/Card/next/CardLabel.tsx
15
+ /**
16
+ * Copyright IBM Corp. 2026
17
+ *
18
+ * This source code is licensed under the Apache-2.0 license found in the
19
+ * LICENSE file in the root directory of this source tree.
20
+ */
21
+ var import_classnames = /* @__PURE__ */ __toESM(require_classnames());
22
+ const blockClass = `${pkg.prefix}--card-next`;
23
+ const componentName = "CardLabel";
24
+ /**
25
+ * CardLabel displays secondary text above the title in the card header.
26
+ * Uses $label-01 typography token and $text-secondary color.
27
+ */
28
+ const CardLabel = ({ children, className, truncate = false, ...rest }) => {
29
+ const classes = (0, import_classnames.default)(`${blockClass}__label`, { [`${blockClass}__label--truncate`]: truncate }, className);
30
+ return /* @__PURE__ */ React.createElement("div", {
31
+ ...rest,
32
+ className: classes,
33
+ ...getDevtoolsProps(componentName)
34
+ }, children);
35
+ };
36
+ CardLabel.propTypes = {
37
+ /**
38
+ * Provide the contents of the CardLabel.
39
+ */
40
+ children: PropTypes.node,
41
+ /**
42
+ * Provide an optional class to be applied to the containing node.
43
+ */
44
+ className: PropTypes.string,
45
+ /**
46
+ * Enable text truncation with ellipsis.
47
+ */
48
+ truncate: PropTypes.bool
49
+ };
50
+ CardLabel.displayName = componentName;
51
+ //#endregion
52
+ export { CardLabel };
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Copyright IBM Corp. 2026
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 PropTypes from 'prop-types';
9
+ import { AspectRatioProps } from '@carbon/react';
10
+ export interface CardMediaProps extends Omit<AspectRatioProps, 'className'> {
11
+ /**
12
+ * Provide the contents of the CardMedia.
13
+ */
14
+ children?: React.ReactNode;
15
+ /**
16
+ * Provide an optional class to be applied to the containing node.
17
+ */
18
+ className?: string;
19
+ }
20
+ /**
21
+ * CardMedia is a media slot component that maintains aspect ratio using Carbon's AspectRatio.
22
+ * Used for images, profiles, tags, large pictograms, and other substantial content in the card.
23
+ * Supports all Carbon AspectRatio props including ratio: '1x1', '2x1', '2x3', '3x2', '4x3', '9x16', '16x9'
24
+ */
25
+ export declare const CardMedia: {
26
+ ({ children, className, ...rest }: CardMediaProps): React.JSX.Element;
27
+ propTypes: {
28
+ /**
29
+ * Provide the contents of the CardMedia.
30
+ */
31
+ children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
32
+ /**
33
+ * Provide an optional class to be applied to the containing node.
34
+ */
35
+ className: PropTypes.Requireable<string>;
36
+ };
37
+ displayName: string;
38
+ };
39
+ //# sourceMappingURL=CardMedia.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CardMedia.d.ts","sourceRoot":"","sources":["../../../../src/components/Card/next/CardMedia.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAe,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAO9D,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,gBAAgB,EAAE,WAAW,CAAC;IACzE;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE3B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;GAIG;AACH,eAAO,MAAM,SAAS;uCAAsC,cAAc;;QAexE;;WAEG;;QAGH;;WAEG;;;;CAVJ,CAAC"}
@@ -0,0 +1,50 @@
1
+ /**
2
+ * Copyright IBM Corp. 2020, 2026
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 { __toESM } from "../../../_virtual/_rolldown/runtime.js";
9
+ import { require_classnames } from "../../../node_modules/classnames/index.js";
10
+ import { pkg } from "../../../settings.js";
11
+ import { getDevtoolsProps } from "../../../global/js/utils/devtools.js";
12
+ import React from "react";
13
+ import PropTypes from "prop-types";
14
+ import { AspectRatio } from "@carbon/react";
15
+ //#region src/components/Card/next/CardMedia.tsx
16
+ /**
17
+ * Copyright IBM Corp. 2026
18
+ *
19
+ * This source code is licensed under the Apache-2.0 license found in the
20
+ * LICENSE file in the root directory of this source tree.
21
+ */
22
+ var import_classnames = /* @__PURE__ */ __toESM(require_classnames());
23
+ const blockClass = `${pkg.prefix}--card-next`;
24
+ const componentName = "CardMedia";
25
+ /**
26
+ * CardMedia is a media slot component that maintains aspect ratio using Carbon's AspectRatio.
27
+ * Used for images, profiles, tags, large pictograms, and other substantial content in the card.
28
+ * Supports all Carbon AspectRatio props including ratio: '1x1', '2x1', '2x3', '3x2', '4x3', '9x16', '16x9'
29
+ */
30
+ const CardMedia = ({ children, className, ...rest }) => {
31
+ const classes = (0, import_classnames.default)(`${blockClass}__media`, className);
32
+ return /* @__PURE__ */ React.createElement(AspectRatio, {
33
+ ...rest,
34
+ className: classes,
35
+ ...getDevtoolsProps(componentName)
36
+ }, children);
37
+ };
38
+ CardMedia.propTypes = {
39
+ /**
40
+ * Provide the contents of the CardMedia.
41
+ */
42
+ children: PropTypes.node,
43
+ /**
44
+ * Provide an optional class to be applied to the containing node.
45
+ */
46
+ className: PropTypes.string
47
+ };
48
+ CardMedia.displayName = componentName;
49
+ //#endregion
50
+ export { CardMedia };
@@ -0,0 +1,82 @@
1
+ /**
2
+ * Copyright IBM Corp. 2026
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, { ReactNode } from 'react';
8
+ import PropTypes from 'prop-types';
9
+ export interface CardTitleProps {
10
+ /**
11
+ * Provide the contents of the CardTitle.
12
+ */
13
+ children?: ReactNode;
14
+ /**
15
+ * Provide an optional class to be applied to the containing node.
16
+ */
17
+ className?: string;
18
+ /**
19
+ * Enable text truncation with ellipsis.
20
+ * - `true`: Single line truncation
21
+ * - `number`: Multi-line truncation (line clamp)
22
+ * @default false
23
+ */
24
+ truncate?: boolean | number;
25
+ /**
26
+ * Maximum width for the title.
27
+ * @default '640px'
28
+ */
29
+ maxWidth?: string;
30
+ /**
31
+ * Optional leading icon or content to display before the title text.
32
+ * Typically used for icons that adapt to title size:
33
+ * - Productive density: 16px icon recommended
34
+ * - Expressive density: 24px icon recommended
35
+ */
36
+ titleStart?: ReactNode;
37
+ /**
38
+ * Optional trailing icon or content to display after the title text.
39
+ * Typically used for icons that adapt to title size:
40
+ * - Productive density: 16px icon recommended
41
+ * - Expressive density: 24px icon recommended
42
+ */
43
+ titleEnd?: ReactNode;
44
+ }
45
+ /**
46
+ * CardTitle displays the main title text in the card header.
47
+ * Typography is controlled via className:
48
+ * - Productive: Use $heading-compact-02 (16px/22px)
49
+ * - Expressive: Use $heading-03 (20px/28px)
50
+ * Color uses $text-primary token.
51
+ */
52
+ export declare const CardTitle: {
53
+ ({ children, className, truncate, maxWidth, titleStart, titleEnd, ...rest }: CardTitleProps): React.JSX.Element;
54
+ propTypes: {
55
+ /**
56
+ * Provide the contents of the CardTitle.
57
+ */
58
+ children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
59
+ /**
60
+ * Provide an optional class to be applied to the containing node.
61
+ */
62
+ className: PropTypes.Requireable<string>;
63
+ /**
64
+ * Maximum width for the title.
65
+ */
66
+ maxWidth: PropTypes.Requireable<string>;
67
+ /**
68
+ * Optional trailing icon or content to display after the title text.
69
+ */
70
+ titleEnd: PropTypes.Requireable<PropTypes.ReactNodeLike>;
71
+ /**
72
+ * Optional leading icon or content to display before the title text.
73
+ */
74
+ titleStart: PropTypes.Requireable<PropTypes.ReactNodeLike>;
75
+ /**
76
+ * Enable text truncation with ellipsis.
77
+ */
78
+ truncate: PropTypes.Requireable<NonNullable<number | boolean>>;
79
+ };
80
+ displayName: string;
81
+ };
82
+ //# sourceMappingURL=CardTitle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CardTitle.d.ts","sourceRoot":"","sources":["../../../../src/components/Card/next/CardTitle.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,SAAS,MAAM,YAAY,CAAC;AAQnC,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAE5B;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC;IAEvB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,SAAS;iFAQnB,cAAc;;QAuCf;;WAEG;;QAGH;;WAEG;;QAGH;;WAEG;;QAGH;;WAEG;;QAGH;;WAEG;;QAGH;;WAEG;;;;CA9BJ,CAAC"}
@@ -0,0 +1,77 @@
1
+ /**
2
+ * Copyright IBM Corp. 2020, 2026
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 { __toESM } from "../../../_virtual/_rolldown/runtime.js";
9
+ import { require_classnames } from "../../../node_modules/classnames/index.js";
10
+ import { pkg } from "../../../settings.js";
11
+ import { getDevtoolsProps } from "../../../global/js/utils/devtools.js";
12
+ import React from "react";
13
+ import PropTypes from "prop-types";
14
+ //#region src/components/Card/next/CardTitle.tsx
15
+ /**
16
+ * Copyright IBM Corp. 2026
17
+ *
18
+ * This source code is licensed under the Apache-2.0 license found in the
19
+ * LICENSE file in the root directory of this source tree.
20
+ */
21
+ var import_classnames = /* @__PURE__ */ __toESM(require_classnames());
22
+ const blockClass = `${pkg.prefix}--card-next`;
23
+ const componentName = "CardTitle";
24
+ /**
25
+ * CardTitle displays the main title text in the card header.
26
+ * Typography is controlled via className:
27
+ * - Productive: Use $heading-compact-02 (16px/22px)
28
+ * - Expressive: Use $heading-03 (20px/28px)
29
+ * Color uses $text-primary token.
30
+ */
31
+ const CardTitle = ({ children, className, truncate = false, maxWidth = "640px", titleStart, titleEnd, ...rest }) => {
32
+ const classes = (0, import_classnames.default)(`${blockClass}__title`, {
33
+ [`${blockClass}__title--truncate`]: truncate === true,
34
+ [`${blockClass}__title--truncate-multi`]: typeof truncate === "number",
35
+ [`${blockClass}__title--with-start-icon`]: titleStart,
36
+ [`${blockClass}__title--with-end-icon`]: titleEnd
37
+ }, className);
38
+ const style = typeof truncate === "number" ? {
39
+ WebkitLineClamp: truncate,
40
+ maxWidth
41
+ } : { maxWidth };
42
+ return /* @__PURE__ */ React.createElement("div", {
43
+ ...rest,
44
+ className: classes,
45
+ style,
46
+ ...getDevtoolsProps(componentName)
47
+ }, titleStart && /* @__PURE__ */ React.createElement("span", { className: `${blockClass}__title-start-icon` }, titleStart), children, titleEnd && /* @__PURE__ */ React.createElement("span", { className: `${blockClass}__title-end-icon` }, titleEnd));
48
+ };
49
+ CardTitle.propTypes = {
50
+ /**
51
+ * Provide the contents of the CardTitle.
52
+ */
53
+ children: PropTypes.node,
54
+ /**
55
+ * Provide an optional class to be applied to the containing node.
56
+ */
57
+ className: PropTypes.string,
58
+ /**
59
+ * Maximum width for the title.
60
+ */
61
+ maxWidth: PropTypes.string,
62
+ /**
63
+ * Optional trailing icon or content to display after the title text.
64
+ */
65
+ titleEnd: PropTypes.node,
66
+ /**
67
+ * Optional leading icon or content to display before the title text.
68
+ */
69
+ titleStart: PropTypes.node,
70
+ /**
71
+ * Enable text truncation with ellipsis.
72
+ */
73
+ truncate: PropTypes.oneOfType([PropTypes.bool, PropTypes.number])
74
+ };
75
+ CardTitle.displayName = componentName;
76
+ //#endregion
77
+ export { CardTitle };
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Copyright IBM Corp. 2026
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, { ReactNode } from 'react';
8
+ export interface CardTitleMediaProps {
9
+ /**
10
+ * Content to be rendered in the title media slot (typically an icon or small image)
11
+ */
12
+ children?: ReactNode;
13
+ /**
14
+ * Optional class name for custom styling
15
+ */
16
+ className?: string;
17
+ }
18
+ /**
19
+ * CardTitleMedia provides a media slot positioned to the left of the card title.
20
+ * The media slot adapts to the heading area height (min 48px, max 64px) and stays
21
+ * top-aligned when the title wraps to multiple lines.
22
+ */
23
+ export declare const CardTitleMedia: React.ForwardRefExoticComponent<CardTitleMediaProps & React.RefAttributes<HTMLDivElement>>;
24
+ //# sourceMappingURL=CardTitleMedia.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CardTitleMedia.d.ts","sourceRoot":"","sources":["../../../../src/components/Card/next/CardTitleMedia.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,EAAc,SAAS,EAAE,MAAM,OAAO,CAAC;AAQrD,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;GAIG;AACH,eAAO,MAAM,cAAc,4FAU1B,CAAC"}
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Copyright IBM Corp. 2020, 2026
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 { __toESM } from "../../../_virtual/_rolldown/runtime.js";
9
+ import { require_classnames } from "../../../node_modules/classnames/index.js";
10
+ import { pkg } from "../../../settings.js";
11
+ import React, { forwardRef } from "react";
12
+ import PropTypes from "prop-types";
13
+ //#region src/components/Card/next/CardTitleMedia.tsx
14
+ /**
15
+ * Copyright IBM Corp. 2026
16
+ *
17
+ * This source code is licensed under the Apache-2.0 license found in the
18
+ * LICENSE file in the root directory of this source tree.
19
+ */
20
+ var import_classnames = /* @__PURE__ */ __toESM(require_classnames());
21
+ const blockClass = `${pkg.prefix}--card-next__title-media`;
22
+ const componentName = "CardTitleMedia";
23
+ /**
24
+ * CardTitleMedia provides a media slot positioned to the left of the card title.
25
+ * The media slot adapts to the heading area height (min 48px, max 64px) and stays
26
+ * top-aligned when the title wraps to multiple lines.
27
+ */
28
+ const CardTitleMedia = forwardRef(({ className, children, ...rest }, ref) => {
29
+ const titleMediaClasses = (0, import_classnames.default)(blockClass, className);
30
+ return /* @__PURE__ */ React.createElement("div", {
31
+ ...rest,
32
+ ref,
33
+ className: titleMediaClasses
34
+ }, children);
35
+ });
36
+ CardTitleMedia.displayName = componentName;
37
+ CardTitleMedia.propTypes = {
38
+ /**
39
+ * Content to be rendered in the title media slot (typically an icon or small image)
40
+ */
41
+ children: PropTypes.node,
42
+ /**
43
+ * Optional class name for custom styling
44
+ */
45
+ className: PropTypes.string
46
+ };
47
+ //#endregion
48
+ export { CardTitleMedia };
@@ -4,7 +4,6 @@
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 { Card, CardHeader, CardBody, CardFooter, Root, Header, Body, Footer, } from './Card';
8
- export type { CardHeaderProps, CardBodyProps, CardFooterProps } from './Card';
9
- export type { CardProps } from './Card';
7
+ export { Card, CardHeader, CardBody, CardFooter, CardHeaderMedia, CardMedia, CardLabel, CardTitle, CardTitleMedia, CardCaption, CardActions, CardAction, } from './Card';
8
+ export type { CardProps, CardHeaderProps, CardBodyProps, CardFooterProps, CardHeaderMediaProps, CardMediaProps, CardLabelProps, CardTitleProps, CardTitleMediaProps, CardCaptionProps, CardActionsProps, CardActionProps, } from './Card';
10
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Card/next/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EACL,IAAI,EACJ,UAAU,EACV,QAAQ,EACR,UAAU,EAEV,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,MAAM,GACP,MAAM,QAAQ,CAAC;AAChB,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAC9E,YAAY,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Card/next/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EACL,IAAI,EACJ,UAAU,EACV,QAAQ,EACR,UAAU,EACV,eAAe,EACf,SAAS,EACT,SAAS,EACT,SAAS,EACT,cAAc,EACd,WAAW,EACX,WAAW,EACX,UAAU,GACX,MAAM,QAAQ,CAAC;AAEhB,YAAY,EACV,SAAS,EACT,eAAe,EACf,aAAa,EACb,eAAe,EACf,oBAAoB,EACpB,cAAc,EACd,cAAc,EACd,cAAc,EACd,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,GAChB,MAAM,QAAQ,CAAC"}
@@ -9,17 +9,29 @@ import { __exportAll } from "../../../_virtual/_rolldown/runtime.js";
9
9
  import { CardHeader } from "./CardHeader.js";
10
10
  import { CardBody } from "./CardBody.js";
11
11
  import { CardFooter } from "./CardFooter.js";
12
- import { Body, Card, Footer, Header, Root } from "./Card.js";
12
+ import { CardHeaderMedia } from "./CardHeaderMedia.js";
13
+ import { CardMedia } from "./CardMedia.js";
14
+ import { CardLabel } from "./CardLabel.js";
15
+ import { CardTitle } from "./CardTitle.js";
16
+ import { CardTitleMedia } from "./CardTitleMedia.js";
17
+ import { CardCaption } from "./CardCaption.js";
18
+ import { CardActions } from "./CardActions.js";
19
+ import { CardAction } from "./CardAction.js";
20
+ import { Card } from "./Card.js";
13
21
  //#region src/components/Card/next/index.ts
14
22
  var next_exports = /* @__PURE__ */ __exportAll({
15
- Body: () => Body,
16
23
  Card: () => Card,
24
+ CardAction: () => CardAction,
25
+ CardActions: () => CardActions,
17
26
  CardBody: () => CardBody,
27
+ CardCaption: () => CardCaption,
18
28
  CardFooter: () => CardFooter,
19
29
  CardHeader: () => CardHeader,
20
- Footer: () => Footer,
21
- Header: () => Header,
22
- Root: () => Root
30
+ CardHeaderMedia: () => CardHeaderMedia,
31
+ CardLabel: () => CardLabel,
32
+ CardMedia: () => CardMedia,
33
+ CardTitle: () => CardTitle,
34
+ CardTitleMedia: () => CardTitleMedia
23
35
  });
24
36
  //#endregion
25
37
  export { next_exports };
@@ -4,7 +4,7 @@
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
- import { FC, ForwardRefExoticComponent, ReactNode, RefAttributes } from 'react';
7
+ import { FC, ForwardRefExoticComponent, ReactNode, RefAttributes, RefObject } from 'react';
8
8
  import { CoachmarkContentProps } from './CoachmarkContent';
9
9
  import { NewPopoverAlignment } from '@carbon/react';
10
10
  import { CoachmarkContentHeaderProps } from './CoachmarkContentHeader';
@@ -31,7 +31,7 @@ export interface CoachmarkPropsNext {
31
31
  */
32
32
  align?: NewPopoverAlignment;
33
33
  /**
34
- * Fine tune the position of the target in pixels.
34
+ * Fine tune the position of the target in pixels. Applies only to Beacons.
35
35
  */
36
36
  position?: {
37
37
  x: number;
@@ -55,13 +55,19 @@ export interface CoachmarkPropsNext {
55
55
  caret?: boolean;
56
56
  /**
57
57
  * CSS selector for the element that should receive focus when the coachmark opens.
58
- * If not provided, no automatic focus management will occur.
59
58
  */
60
59
  selectorPrimaryFocus?: string;
61
60
  /**
62
61
  * Prevents the Coachmark from closing when clicking outside of it.
63
62
  */
64
63
  preventCloseOnClickOutside?: boolean;
64
+ /**
65
+ * A ref to the trigger element that launched the Coachmark. When provided,
66
+ * focus returns to this element when the Coachmark closes, and `aria-expanded`
67
+ * is automatically managed on that element — do not set `aria-expanded`
68
+ * directly on the trigger when using this prop.
69
+ */
70
+ launcherButtonRef?: RefObject<HTMLElement | null>;
65
71
  }
66
72
  export type CoachmarkComponent = ForwardRefExoticComponent<CoachmarkPropsNext & RefAttributes<HTMLDivElement>> & {
67
73
  Content: FC<CoachmarkContentProps>;
@@ -1 +1 @@
1
- {"version":3,"file":"Coachmark.d.ts","sourceRoot":"","sources":["../../../../../src/components/Coachmark/next/Coachmark/Coachmark.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAc,EACZ,EAAE,EACF,yBAAyB,EACzB,SAAS,EACT,aAAa,EAMd,MAAM,OAAO,CAAC;AAOf,OAAyB,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC7E,OAAO,EAAW,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAE7D,OAAO,EAEL,2BAA2B,EAC5B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAEL,yBAAyB,EAC1B,MAAM,wBAAwB,CAAC;AAiBhC,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IAEpB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;OAEG;IACH,KAAK,CAAC,EAAE,mBAAmB,CAAC;IAC5B;;OAEG;IACH,QAAQ,CAAC,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACpC;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;OAGG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B;;OAEG;IACH,0BAA0B,CAAC,EAAE,OAAO,CAAC;CACtC;AAGD,MAAM,MAAM,kBAAkB,GAAG,yBAAyB,CACxD,kBAAkB,GAAG,aAAa,CAAC,cAAc,CAAC,CACnD,GAAG;IACF,OAAO,EAAE,EAAE,CAAC,qBAAqB,CAAC,CAAC;IACnC,aAAa,EAAE,EAAE,CAAC,2BAA2B,CAAC,CAAC;IAC/C,WAAW,EAAE,EAAE,CAAC,yBAAyB,CAAC,CAAC;CAC5C,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,SAAS,EA4IjB,kBAAkB,CAAC"}
1
+ {"version":3,"file":"Coachmark.d.ts","sourceRoot":"","sources":["../../../../../src/components/Coachmark/next/Coachmark/Coachmark.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAc,EACZ,EAAE,EACF,yBAAyB,EACzB,SAAS,EACT,aAAa,EACb,SAAS,EAKV,MAAM,OAAO,CAAC;AAOf,OAAyB,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC7E,OAAO,EAAW,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAE7D,OAAO,EAEL,2BAA2B,EAC5B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAEL,yBAAyB,EAC1B,MAAM,wBAAwB,CAAC;AAiBhC,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IAEpB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;OAEG;IACH,KAAK,CAAC,EAAE,mBAAmB,CAAC;IAC5B;;OAEG;IACH,QAAQ,CAAC,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACpC;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;OAEG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B;;OAEG;IACH,0BAA0B,CAAC,EAAE,OAAO,CAAC;IACrC;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;CACnD;AAGD,MAAM,MAAM,kBAAkB,GAAG,yBAAyB,CACxD,kBAAkB,GAAG,aAAa,CAAC,cAAc,CAAC,CACnD,GAAG;IACF,OAAO,EAAE,EAAE,CAAC,qBAAqB,CAAC,CAAC;IACnC,aAAa,EAAE,EAAE,CAAC,2BAA2B,CAAC,CAAC;IAC/C,WAAW,EAAE,EAAE,CAAC,yBAAyB,CAAC,CAAC;CAC5C,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,SAAS,EAwHjB,kBAAkB,CAAC"}
@@ -34,8 +34,7 @@ const Coachmark = forwardRef((props, ref) => {
34
34
  const { children, className, onClose, align = "bottom", open, position = {
35
35
  x: 0,
36
36
  y: 0
37
- }, floating, dropShadow, highContrast, caret, selectorPrimaryFocus, preventCloseOnClickOutside, ...rest } = props;
38
- const triggerRef = useRef(null);
37
+ }, floating, dropShadow, highContrast, caret, selectorPrimaryFocus, preventCloseOnClickOutside, launcherButtonRef, ...rest } = props;
39
38
  const internalRef = useRef(null);
40
39
  const [contentRef, setContentRef] = useState(null);
41
40
  const [openState, setOpenState] = useState(false);
@@ -47,15 +46,9 @@ const Coachmark = forwardRef((props, ref) => {
47
46
  const currentOpen = open ?? openState;
48
47
  const caretValue = caret !== void 0 ? caret : floating === true ? false : true;
49
48
  useEffect(() => {
50
- const container = internalRef.current;
51
- if (!container) return;
52
- const firstFocusable = Array.from(container.querySelectorAll("*")).find((el) => el.tabIndex >= 0 && !el.hasAttribute("disabled"));
53
- if (firstFocusable) triggerRef.current = firstFocusable;
54
- }, [children, triggerRef]);
55
- useEffect(() => {
56
- const el = triggerRef.current;
57
- if (el) el.setAttribute("aria-expanded", String(!!open));
58
- }, [open, triggerRef]);
49
+ const el = launcherButtonRef?.current;
50
+ if (el) el.setAttribute("aria-expanded", String(currentOpen));
51
+ }, [currentOpen, launcherButtonRef]);
59
52
  useEffect(() => {
60
53
  if (!open && contentRef && floating) {
61
54
  contentRef.style.transform = "none";
@@ -87,18 +80,18 @@ const Coachmark = forwardRef((props, ref) => {
87
80
  open: currentOpen,
88
81
  setOpen,
89
82
  align,
90
- triggerRef,
83
+ launcherButtonRef,
91
84
  position,
92
85
  contentRef,
93
86
  setContentRef,
94
87
  floating,
95
88
  selectorPrimaryFocus
96
89
  } }, /* @__PURE__ */ React.createElement("div", {
97
- ...rest,
98
90
  ref: setRef,
99
91
  className: (0, import_classnames.default)(blockClass, className, { [`${blockClass}--floating`]: floating }),
100
92
  ...getDevtoolsProps(componentName)
101
93
  }, /* @__PURE__ */ React.createElement(Popover, {
94
+ ...rest,
102
95
  open: currentOpen,
103
96
  onRequestClose: handleRequestClose,
104
97
  align,
@@ -20,7 +20,7 @@ export interface CoachmarkContentProps {
20
20
  /**
21
21
  * Accessible label for the coachmark content region.
22
22
  */
23
- 'aria-label': string;
23
+ 'aria-label'?: string;
24
24
  }
25
25
  export type CoachmarkContentComponent = ForwardRefExoticComponent<CoachmarkContentProps & RefAttributes<HTMLDivElement>> & {
26
26
  Header: FC<CoachmarkContentHeaderProps>;
@@ -1 +1 @@
1
- {"version":3,"file":"CoachmarkContent.d.ts","sourceRoot":"","sources":["../../../../../src/components/Coachmark/next/Coachmark/CoachmarkContent.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAc,EACZ,EAAE,EAEF,yBAAyB,EACzB,YAAY,EACZ,SAAS,EACT,aAAa,EAId,MAAM,OAAO,CAAC;AAGf,OAAO,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AACvE,OAAO,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAMnE,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,QAAQ,EAAE,YAAY,GAAG,SAAS,CAAC;IACnC;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,MAAM,yBAAyB,GAAG,yBAAyB,CAC/D,qBAAqB,GAAG,aAAa,CAAC,cAAc,CAAC,CACtD,GAAG;IACF,MAAM,EAAE,EAAE,CAAC,2BAA2B,CAAC,CAAC;IACxC,IAAI,EAAE,EAAE,CAAC,yBAAyB,CAAC,CAAC;CACrC,CAAC;AAEF,QAAA,MAAM,gBAAgB,EAwHjB,yBAAyB,CAAC;AAE/B,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"CoachmarkContent.d.ts","sourceRoot":"","sources":["../../../../../src/components/Coachmark/next/Coachmark/CoachmarkContent.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAc,EACZ,EAAE,EAEF,yBAAyB,EACzB,YAAY,EACZ,SAAS,EACT,aAAa,EAId,MAAM,OAAO,CAAC;AAGf,OAAO,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AACvE,OAAO,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAMnE,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,QAAQ,EAAE,YAAY,GAAG,SAAS,CAAC;IACnC;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,MAAM,yBAAyB,GAAG,yBAAyB,CAC/D,qBAAqB,GAAG,aAAa,CAAC,cAAc,CAAC,CACtD,GAAG;IACF,MAAM,EAAE,EAAE,CAAC,2BAA2B,CAAC,CAAC;IACxC,IAAI,EAAE,EAAE,CAAC,yBAAyB,CAAC,CAAC;CACrC,CAAC;AAEF,QAAA,MAAM,gBAAgB,EAkHjB,yBAAyB,CAAC;AAE/B,eAAe,gBAAgB,CAAC"}