@carbon/react 1.114.0-rc.0 → 1.114.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 (101) hide show
  1. package/.playwright/INTERNAL_AVT_REPORT_DO_NOT_USE.json +984 -984
  2. package/es/components/Card/Card.d.ts +48 -0
  3. package/es/components/Card/Card.js +148 -0
  4. package/es/components/Card/Card.types.d.ts +88 -0
  5. package/es/components/Card/CardAction.d.ts +37 -0
  6. package/es/components/Card/CardAction.js +32 -0
  7. package/es/components/Card/CardActions.d.ts +30 -0
  8. package/es/components/Card/CardActions.js +93 -0
  9. package/es/components/Card/CardBody.d.ts +11 -0
  10. package/es/components/Card/CardBody.js +34 -0
  11. package/es/components/Card/CardContext.d.ts +17 -0
  12. package/es/components/Card/CardContext.js +31 -0
  13. package/es/components/Card/CardFooter.d.ts +11 -0
  14. package/es/components/Card/CardFooter.js +34 -0
  15. package/es/components/Card/CardHeader.d.ts +11 -0
  16. package/es/components/Card/CardHeader.js +44 -0
  17. package/es/components/Card/CardHeaderMedia.d.ts +21 -0
  18. package/es/components/Card/CardHeaderMedia.js +24 -0
  19. package/es/components/Card/CardMedia.d.ts +35 -0
  20. package/es/components/Card/CardMedia.js +42 -0
  21. package/es/components/Card/CardTitle.d.ts +72 -0
  22. package/es/components/Card/CardTitle.js +86 -0
  23. package/es/components/Card/CardTitleMedia.d.ts +23 -0
  24. package/es/components/Card/CardTitleMedia.js +36 -0
  25. package/es/components/Card/_story-assets/data.d.ts +6 -0
  26. package/es/components/Card/_story-assets/options.d.ts +47 -0
  27. package/es/components/Card/index.d.ts +8 -0
  28. package/es/components/Card/index.js +33 -0
  29. package/es/components/Checkbox/Checkbox.js +1 -1
  30. package/es/components/CheckboxGroup/CheckboxGroup.js +1 -1
  31. package/es/components/ComboBox/ComboBox.js +2 -2
  32. package/es/components/ComboButton/index.js +1 -1
  33. package/es/components/ComposedModal/ComposedModal.js +1 -1
  34. package/es/components/DatePicker/DatePicker.js +1 -1
  35. package/es/components/DatePickerInput/DatePickerInput.js +1 -1
  36. package/es/components/Dropdown/Dropdown.js +2 -2
  37. package/es/components/ExpandableSearch/ExpandableSearch.js +1 -1
  38. package/es/components/MenuButton/index.js +1 -1
  39. package/es/components/MultiSelect/FilterableMultiSelect.js +2 -2
  40. package/es/components/MultiSelect/MultiSelect.js +2 -2
  41. package/es/components/NumberInput/NumberInput.js +2 -2
  42. package/es/components/OverflowMenu/next/index.js +1 -1
  43. package/es/components/RadioButton/RadioButton.js +1 -1
  44. package/es/components/RadioButtonGroup/RadioButtonGroup.js +1 -1
  45. package/es/components/Select/Select.js +1 -1
  46. package/es/components/Tag/SelectableTag.js +1 -1
  47. package/es/components/TextArea/TextArea.js +1 -1
  48. package/es/components/TextInput/TextInput.js +1 -1
  49. package/es/index.d.ts +1 -0
  50. package/es/index.js +6 -5
  51. package/lib/components/Card/Card.d.ts +48 -0
  52. package/lib/components/Card/Card.js +161 -0
  53. package/lib/components/Card/Card.types.d.ts +88 -0
  54. package/lib/components/Card/CardAction.d.ts +37 -0
  55. package/lib/components/Card/CardAction.js +41 -0
  56. package/lib/components/Card/CardActions.d.ts +30 -0
  57. package/lib/components/Card/CardActions.js +96 -0
  58. package/lib/components/Card/CardBody.d.ts +11 -0
  59. package/lib/components/Card/CardBody.js +37 -0
  60. package/lib/components/Card/CardContext.d.ts +17 -0
  61. package/lib/components/Card/CardContext.js +32 -0
  62. package/lib/components/Card/CardFooter.d.ts +11 -0
  63. package/lib/components/Card/CardFooter.js +37 -0
  64. package/lib/components/Card/CardHeader.d.ts +11 -0
  65. package/lib/components/Card/CardHeader.js +47 -0
  66. package/lib/components/Card/CardHeaderMedia.d.ts +21 -0
  67. package/lib/components/Card/CardHeaderMedia.js +33 -0
  68. package/lib/components/Card/CardMedia.d.ts +35 -0
  69. package/lib/components/Card/CardMedia.js +51 -0
  70. package/lib/components/Card/CardTitle.d.ts +72 -0
  71. package/lib/components/Card/CardTitle.js +89 -0
  72. package/lib/components/Card/CardTitleMedia.d.ts +23 -0
  73. package/lib/components/Card/CardTitleMedia.js +39 -0
  74. package/lib/components/Card/_story-assets/data.d.ts +6 -0
  75. package/lib/components/Card/_story-assets/options.d.ts +47 -0
  76. package/lib/components/Card/index.d.ts +8 -0
  77. package/lib/components/Card/index.js +48 -0
  78. package/lib/components/Checkbox/Checkbox.js +1 -1
  79. package/lib/components/CheckboxGroup/CheckboxGroup.js +1 -1
  80. package/lib/components/ComboBox/ComboBox.js +2 -2
  81. package/lib/components/ComboButton/index.js +1 -1
  82. package/lib/components/ComposedModal/ComposedModal.js +1 -1
  83. package/lib/components/DatePicker/DatePicker.js +1 -1
  84. package/lib/components/DatePickerInput/DatePickerInput.js +1 -1
  85. package/lib/components/Dropdown/Dropdown.js +2 -2
  86. package/lib/components/ExpandableSearch/ExpandableSearch.js +1 -1
  87. package/lib/components/MenuButton/index.js +1 -1
  88. package/lib/components/MultiSelect/FilterableMultiSelect.js +2 -2
  89. package/lib/components/MultiSelect/MultiSelect.js +2 -2
  90. package/lib/components/NumberInput/NumberInput.js +2 -2
  91. package/lib/components/OverflowMenu/next/index.js +1 -1
  92. package/lib/components/RadioButton/RadioButton.js +1 -1
  93. package/lib/components/RadioButtonGroup/RadioButtonGroup.js +1 -1
  94. package/lib/components/Select/Select.js +1 -1
  95. package/lib/components/Tag/SelectableTag.js +1 -1
  96. package/lib/components/TextArea/TextArea.js +1 -1
  97. package/lib/components/TextInput/TextInput.js +1 -1
  98. package/lib/index.d.ts +1 -0
  99. package/lib/index.js +54 -47
  100. package/package.json +9 -9
  101. package/telemetry.yml +16 -0
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Copyright IBM Corp. 2016, 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
+ const require_runtime = require("../../_virtual/_rolldown/runtime.js");
9
+ const require_usePrefix = require("../../internal/usePrefix.js");
10
+ let react = require("react");
11
+ react = require_runtime.__toESM(react);
12
+ let classnames = require("classnames");
13
+ classnames = require_runtime.__toESM(classnames);
14
+ let react_jsx_runtime = require("react/jsx-runtime");
15
+ //#region src/components/Card/CardBody.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
+ const componentName = "CardBody";
23
+ /**
24
+ * CardBody component - Body section of the card for free-form content
25
+ */
26
+ const CardBody = (0, react.forwardRef)(({ className, children, ...rest }, ref) => {
27
+ const bodyClasses = (0, classnames.default)(`${require_usePrefix.usePrefix()}--card__body`, className);
28
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
29
+ ...rest,
30
+ ref,
31
+ className: bodyClasses,
32
+ children
33
+ });
34
+ });
35
+ CardBody.displayName = componentName;
36
+ //#endregion
37
+ exports.CardBody = CardBody;
@@ -0,0 +1,17 @@
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 { CardContextValue } from './Card.types';
8
+ /**
9
+ * Context for sharing Card state with child components
10
+ */
11
+ export declare const CardContext: import("react").Context<CardContextValue | undefined>;
12
+ /**
13
+ * Hook to access Card context
14
+ * @returns CardContextValue
15
+ * @throws Error if used outside of Card component
16
+ */
17
+ export declare const useCardContext: () => CardContextValue;
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Copyright IBM Corp. 2016, 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
+ let react = require("react");
9
+ //#region src/components/Card/CardContext.tsx
10
+ /**
11
+ * Copyright IBM Corp. 2026
12
+ *
13
+ * This source code is licensed under the Apache-2.0 license found in the
14
+ * LICENSE file in the root directory of this source tree.
15
+ */
16
+ /**
17
+ * Context for sharing Card state with child components
18
+ */
19
+ const CardContext = (0, react.createContext)(void 0);
20
+ /**
21
+ * Hook to access Card context
22
+ * @returns CardContextValue
23
+ * @throws Error if used outside of Card component
24
+ */
25
+ const useCardContext = () => {
26
+ const context = (0, react.useContext)(CardContext);
27
+ if (!context) throw new Error("Card subcomponents must be used within a Card component");
28
+ return context;
29
+ };
30
+ //#endregion
31
+ exports.CardContext = CardContext;
32
+ exports.useCardContext = useCardContext;
@@ -0,0 +1,11 @@
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
+ /**
9
+ * CardFooter component - Footer section of the card
10
+ */
11
+ export declare const CardFooter: React.ForwardRefExoticComponent<import("./Card.types").CardBaseProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Copyright IBM Corp. 2016, 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
+ const require_runtime = require("../../_virtual/_rolldown/runtime.js");
9
+ const require_usePrefix = require("../../internal/usePrefix.js");
10
+ let react = require("react");
11
+ react = require_runtime.__toESM(react);
12
+ let classnames = require("classnames");
13
+ classnames = require_runtime.__toESM(classnames);
14
+ let react_jsx_runtime = require("react/jsx-runtime");
15
+ //#region src/components/Card/CardFooter.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
+ const componentName = "CardFooter";
23
+ /**
24
+ * CardFooter component - Footer section of the card
25
+ */
26
+ const CardFooter = (0, react.forwardRef)(({ className, children, ...rest }, ref) => {
27
+ const footerClasses = (0, classnames.default)(`${require_usePrefix.usePrefix()}--card__footer`, className);
28
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
29
+ ...rest,
30
+ ref,
31
+ className: footerClasses,
32
+ children
33
+ });
34
+ });
35
+ CardFooter.displayName = componentName;
36
+ //#endregion
37
+ exports.CardFooter = CardFooter;
@@ -0,0 +1,11 @@
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
+ /**
9
+ * CardHeader — header section of the card.
10
+ */
11
+ export declare const CardHeader: React.ForwardRefExoticComponent<import("./Card.types").CardBaseProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Copyright IBM Corp. 2016, 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
+ const require_runtime = require("../../_virtual/_rolldown/runtime.js");
9
+ const require_usePrefix = require("../../internal/usePrefix.js");
10
+ const require_CardContext = require("./CardContext.js");
11
+ let react = require("react");
12
+ react = require_runtime.__toESM(react);
13
+ let classnames = require("classnames");
14
+ classnames = require_runtime.__toESM(classnames);
15
+ let react_jsx_runtime = require("react/jsx-runtime");
16
+ //#region src/components/Card/CardHeader.tsx
17
+ /**
18
+ * Copyright IBM Corp. 2026
19
+ *
20
+ * This source code is licensed under the Apache-2.0 license found in the
21
+ * LICENSE file in the root directory of this source tree.
22
+ */
23
+ const componentName = "CardHeader";
24
+ /**
25
+ * CardHeader — header section of the card.
26
+ */
27
+ const CardHeader = (0, react.forwardRef)(({ className, children, ...rest }, ref) => {
28
+ const blockClass = `${require_usePrefix.usePrefix()}--card`;
29
+ const context = require_CardContext.useCardContext();
30
+ const handleDecoratorClick = (0, react.useCallback)((e) => e.stopPropagation(), []);
31
+ const handleDecoratorKeyDown = (0, react.useCallback)((e) => e.stopPropagation(), []);
32
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
33
+ ...rest,
34
+ ref,
35
+ className: (0, classnames.default)(`${blockClass}__header`, className),
36
+ children: [children, context.decorator && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
37
+ className: `${blockClass}__decorator`,
38
+ role: "presentation",
39
+ onClick: handleDecoratorClick,
40
+ onKeyDown: handleDecoratorKeyDown,
41
+ children: context.decorator
42
+ })]
43
+ });
44
+ });
45
+ CardHeader.displayName = componentName;
46
+ //#endregion
47
+ exports.CardHeader = CardHeader;
@@ -0,0 +1,21 @@
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 { ReactNode } from 'react';
8
+ export interface CardHeaderMediaProps {
9
+ /**
10
+ * Provide the contents of the CardHeaderMedia.
11
+ */
12
+ children?: ReactNode;
13
+ /**
14
+ * Provide an optional class to be applied to the containing node.
15
+ */
16
+ className?: string;
17
+ }
18
+ export declare const CardHeaderMedia: {
19
+ ({ children, className, ...rest }: CardHeaderMediaProps): import("react/jsx-runtime").JSX.Element;
20
+ displayName: string;
21
+ };
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Copyright IBM Corp. 2016, 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
+ const require_runtime = require("../../_virtual/_rolldown/runtime.js");
9
+ const require_usePrefix = require("../../internal/usePrefix.js");
10
+ let react = require("react");
11
+ react = require_runtime.__toESM(react);
12
+ let classnames = require("classnames");
13
+ classnames = require_runtime.__toESM(classnames);
14
+ let react_jsx_runtime = require("react/jsx-runtime");
15
+ //#region src/components/Card/CardHeaderMedia.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
+ const componentName = "CardHeaderMedia";
23
+ const CardHeaderMedia = ({ children, className, ...rest }) => {
24
+ const classes = (0, classnames.default)(`${require_usePrefix.usePrefix()}--card__header-media`, className);
25
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
26
+ ...rest,
27
+ className: classes,
28
+ children
29
+ });
30
+ };
31
+ CardHeaderMedia.displayName = componentName;
32
+ //#endregion
33
+ exports.CardHeaderMedia = CardHeaderMedia;
@@ -0,0 +1,35 @@
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 { type AspectRatioProps } from '../AspectRatio/AspectRatio';
9
+ export interface CardMediaProps extends Omit<AspectRatioProps, 'className'> {
10
+ /**
11
+ * Provide the contents of the CardMedia.
12
+ */
13
+ children?: React.ReactNode;
14
+ /**
15
+ * Provide an optional class to be applied to the containing node.
16
+ */
17
+ className?: string;
18
+ /**
19
+ * Width of the media column when the card is in horizontal layout.
20
+ * Accepts any valid CSS width value (e.g. '200px', '40%').
21
+ * Defaults to '33.33%'. Has no effect in vertical (default) layout.
22
+ */
23
+ mediaWidth?: string;
24
+ }
25
+ /**
26
+ * CardMedia is a media slot component that maintains aspect ratio.
27
+ *
28
+ * In vertical (default) mode it delegates to Carbon's AspectRatio.
29
+ * In horizontal mode it renders a plain div sized to `mediaWidth` (default
30
+ * 33.33%) that stretches to the full card height — no aspect-ratio math needed.
31
+ */
32
+ export declare const CardMedia: {
33
+ ({ children, className, ratio, mediaWidth, ...rest }: CardMediaProps): import("react/jsx-runtime").JSX.Element;
34
+ displayName: string;
35
+ };
@@ -0,0 +1,51 @@
1
+ /**
2
+ * Copyright IBM Corp. 2016, 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
+ const require_runtime = require("../../_virtual/_rolldown/runtime.js");
9
+ const require_usePrefix = require("../../internal/usePrefix.js");
10
+ const require_AspectRatio = require("../AspectRatio/AspectRatio.js");
11
+ const require_CardContext = require("./CardContext.js");
12
+ let react = require("react");
13
+ react = require_runtime.__toESM(react);
14
+ let classnames = require("classnames");
15
+ classnames = require_runtime.__toESM(classnames);
16
+ let react_jsx_runtime = require("react/jsx-runtime");
17
+ //#region src/components/Card/CardMedia.tsx
18
+ /**
19
+ * Copyright IBM Corp. 2026
20
+ *
21
+ * This source code is licensed under the Apache-2.0 license found in the
22
+ * LICENSE file in the root directory of this source tree.
23
+ */
24
+ const componentName = "CardMedia";
25
+ /**
26
+ * CardMedia is a media slot component that maintains aspect ratio.
27
+ *
28
+ * In vertical (default) mode it delegates to Carbon's AspectRatio.
29
+ * In horizontal mode it renders a plain div sized to `mediaWidth` (default
30
+ * 33.33%) that stretches to the full card height — no aspect-ratio math needed.
31
+ */
32
+ const CardMedia = ({ children, className, ratio, mediaWidth = "33.33%", ...rest }) => {
33
+ const prefix = require_usePrefix.usePrefix();
34
+ const blockClass = `${prefix}--card`;
35
+ const { horizontal } = require_CardContext.useCardContext();
36
+ const classes = (0, classnames.default)(`${blockClass}__media`, className);
37
+ if (horizontal) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
38
+ className: `${blockClass}__media ${blockClass}__media--horizontal`,
39
+ style: { [`--${prefix}--card--media-width`]: mediaWidth },
40
+ children
41
+ });
42
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_AspectRatio.default, {
43
+ ratio,
44
+ ...rest,
45
+ className: classes,
46
+ children
47
+ });
48
+ };
49
+ CardMedia.displayName = componentName;
50
+ //#endregion
51
+ exports.CardMedia = CardMedia;
@@ -0,0 +1,72 @@
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 CardTitleProps {
9
+ /**
10
+ * Provide the contents of the CardTitle.
11
+ */
12
+ children?: ReactNode;
13
+ /**
14
+ * Provide an optional class to be applied to the containing node.
15
+ */
16
+ className?: string;
17
+ /**
18
+ * Enable text truncation with ellipsis on the title text row.
19
+ * - `true`: Single line truncation
20
+ * - `number`: Multi-line truncation (line clamp)
21
+ * @default false
22
+ */
23
+ titleTruncate?: boolean | number;
24
+ /**
25
+ * Maximum width applied to the title text row when truncation is active.
26
+ * @default '100%'
27
+ */
28
+ maxWidth?: string;
29
+ /**
30
+ * Optional leading icon or content to display before the title text.
31
+ * - Productive density: 16px icon recommended
32
+ * - Expressive density: 24px icon recommended
33
+ */
34
+ titleStart?: ReactNode;
35
+ /**
36
+ * Optional trailing icon or content to display after the title text.
37
+ * - Productive density: 16px icon recommended
38
+ * - Expressive density: 24px icon recommended
39
+ */
40
+ titleEnd?: ReactNode;
41
+ /**
42
+ * Optional label rendered above the title text.
43
+ * Uses $label-01 typography and $text-secondary color.
44
+ */
45
+ label?: ReactNode;
46
+ /**
47
+ * Enable truncation on the label text.
48
+ * - `true`: Single line truncation
49
+ * - `number`: Multi-line truncation (line clamp)
50
+ * @default false
51
+ */
52
+ labelTruncate?: boolean | number;
53
+ /**
54
+ * Optional description rendered below the title text.
55
+ * Uses $label-01 typography and $text-secondary color.
56
+ */
57
+ description?: ReactNode;
58
+ /**
59
+ * Enable truncation on the description text.
60
+ * - `true`: Single line truncation
61
+ * - `number`: Multi-line truncation (line clamp)
62
+ * @default false
63
+ */
64
+ descriptionTruncate?: boolean | number;
65
+ }
66
+ /**
67
+ * CardTitle displays the main title text in the card header.
68
+ * Typography is driven by density on the parent Card:
69
+ * - Productive: $heading-compact-02 (16px/22px)
70
+ * - Expressive: $heading-03 (20px/28px)
71
+ */
72
+ export declare const CardTitle: React.ForwardRefExoticComponent<CardTitleProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,89 @@
1
+ /**
2
+ * Copyright IBM Corp. 2016, 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
+ const require_runtime = require("../../_virtual/_rolldown/runtime.js");
9
+ const require_usePrefix = require("../../internal/usePrefix.js");
10
+ let react = require("react");
11
+ react = require_runtime.__toESM(react);
12
+ let classnames = require("classnames");
13
+ classnames = require_runtime.__toESM(classnames);
14
+ let react_jsx_runtime = require("react/jsx-runtime");
15
+ //#region src/components/Card/CardTitle.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
+ const componentName = "CardTitle";
23
+ /**
24
+ * CardTitle displays the main title text in the card header.
25
+ * Typography is driven by density on the parent Card:
26
+ * - Productive: $heading-compact-02 (16px/22px)
27
+ * - Expressive: $heading-03 (20px/28px)
28
+ */
29
+ const CardTitle = (0, react.forwardRef)(({ children, className, titleTruncate = false, maxWidth = "100%", titleStart, titleEnd, label, labelTruncate = false, description, descriptionTruncate = false, ...rest }, ref) => {
30
+ const prefix = require_usePrefix.usePrefix();
31
+ const blockClass = `${prefix}--card`;
32
+ const isTitleMulti = typeof titleTruncate === "number";
33
+ const isLabelMulti = typeof labelTruncate === "number";
34
+ const isDescMulti = typeof descriptionTruncate === "number";
35
+ const containerClasses = (0, classnames.default)(`${blockClass}__title`, className);
36
+ const textRowClasses = (0, classnames.default)(`${blockClass}__title-text-row`, {
37
+ [`${blockClass}__title-text-row--truncate`]: titleTruncate === true,
38
+ [`${blockClass}__title-text-row--truncate-multi`]: isTitleMulti,
39
+ [`${blockClass}__title-text-row--with-start-icon`]: titleStart,
40
+ [`${blockClass}__title-text-row--with-end-icon`]: titleEnd
41
+ });
42
+ const titleVars = titleTruncate !== false ? {
43
+ [`--${prefix}--card--title-max-width`]: maxWidth,
44
+ ...isTitleMulti && { [`--${prefix}--card--title-line-clamp`]: titleTruncate }
45
+ } : void 0;
46
+ const labelVars = isLabelMulti ? { [`--${prefix}--card--label-line-clamp`]: labelTruncate } : void 0;
47
+ const descVars = isDescMulti ? { [`--${prefix}--card--description-line-clamp`]: descriptionTruncate } : void 0;
48
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
49
+ ...rest,
50
+ ref,
51
+ className: containerClasses,
52
+ children: [
53
+ label && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
54
+ className: (0, classnames.default)(`${blockClass}__label`, {
55
+ [`${blockClass}__label--truncate`]: labelTruncate === true,
56
+ [`${blockClass}__label--truncate-multi`]: isLabelMulti
57
+ }),
58
+ style: labelVars,
59
+ children: label
60
+ }),
61
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
62
+ className: textRowClasses,
63
+ style: titleVars,
64
+ children: [
65
+ titleStart && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
66
+ className: `${blockClass}__title-start-icon`,
67
+ children: titleStart
68
+ }),
69
+ children,
70
+ titleEnd && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
71
+ className: `${blockClass}__title-end-icon`,
72
+ children: titleEnd
73
+ })
74
+ ]
75
+ }),
76
+ description && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
77
+ className: (0, classnames.default)(`${blockClass}__description`, {
78
+ [`${blockClass}__description--truncate`]: descriptionTruncate === true,
79
+ [`${blockClass}__description--truncate-multi`]: isDescMulti
80
+ }),
81
+ style: descVars,
82
+ children: description
83
+ })
84
+ ]
85
+ });
86
+ });
87
+ CardTitle.displayName = componentName;
88
+ //#endregion
89
+ exports.CardTitle = CardTitle;
@@ -0,0 +1,23 @@
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>>;
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Copyright IBM Corp. 2016, 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
+ const require_runtime = require("../../_virtual/_rolldown/runtime.js");
9
+ const require_usePrefix = require("../../internal/usePrefix.js");
10
+ let react = require("react");
11
+ react = require_runtime.__toESM(react);
12
+ let classnames = require("classnames");
13
+ classnames = require_runtime.__toESM(classnames);
14
+ let react_jsx_runtime = require("react/jsx-runtime");
15
+ //#region src/components/Card/CardTitleMedia.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
+ 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 = (0, react.forwardRef)(({ className, children, ...rest }, ref) => {
29
+ const titleMediaClasses = (0, classnames.default)(`${require_usePrefix.usePrefix()}--card__title-media`, className);
30
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
31
+ ...rest,
32
+ ref,
33
+ className: titleMediaClasses,
34
+ children
35
+ });
36
+ });
37
+ CardTitleMedia.displayName = componentName;
38
+ //#endregion
39
+ exports.CardTitleMedia = CardTitleMedia;
@@ -0,0 +1,6 @@
1
+ declare const _default: {
2
+ group: string;
3
+ date: string;
4
+ value: number;
5
+ }[];
6
+ export default _default;
@@ -0,0 +1,47 @@
1
+ declare namespace _default {
2
+ let height: string;
3
+ namespace grid {
4
+ namespace x {
5
+ let enabled: boolean;
6
+ }
7
+ namespace y {
8
+ let enabled_1: boolean;
9
+ export { enabled_1 as enabled };
10
+ }
11
+ }
12
+ namespace axes {
13
+ namespace bottom {
14
+ let visible: boolean;
15
+ let title: string;
16
+ let mapsTo: string;
17
+ let scaleType: string;
18
+ }
19
+ namespace left {
20
+ let visible_1: boolean;
21
+ export { visible_1 as visible };
22
+ let mapsTo_1: string;
23
+ export { mapsTo_1 as mapsTo };
24
+ let scaleType_1: string;
25
+ export { scaleType_1 as scaleType };
26
+ }
27
+ }
28
+ namespace color {
29
+ namespace gradient {
30
+ let enabled_2: boolean;
31
+ export { enabled_2 as enabled };
32
+ }
33
+ }
34
+ namespace points {
35
+ let enabled_3: boolean;
36
+ export { enabled_3 as enabled };
37
+ }
38
+ namespace legend {
39
+ let enabled_4: boolean;
40
+ export { enabled_4 as enabled };
41
+ }
42
+ namespace toolbar {
43
+ let enabled_5: boolean;
44
+ export { enabled_5 as enabled };
45
+ }
46
+ }
47
+ export default _default;
@@ -0,0 +1,8 @@
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
+ export { Card, CardHeader, CardBody, CardFooter, CardHeaderMedia, CardMedia, CardTitle, CardTitleMedia, CardActions, CardAction, } from './Card';
8
+ export type { CardProps, CardHeaderProps, CardBodyProps, CardFooterProps, CardHeaderMediaProps, CardMediaProps, CardTitleProps, CardTitleMediaProps, CardActionsProps, CardActionProps, } from './Card';