@carbon/ibm-products 2.95.0 → 2.96.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 (134) hide show
  1. package/css/index-full-carbon.css +94 -89
  2. package/css/index-full-carbon.css.map +1 -1
  3. package/css/index-full-carbon.min.css +1 -1
  4. package/css/index-full-carbon.min.css.map +1 -1
  5. package/css/index-without-carbon-released-only.css +15 -11
  6. package/css/index-without-carbon-released-only.css.map +1 -1
  7. package/css/index-without-carbon-released-only.min.css +1 -1
  8. package/css/index-without-carbon-released-only.min.css.map +1 -1
  9. package/css/index-without-carbon.css +94 -89
  10. package/css/index-without-carbon.css.map +1 -1
  11. package/css/index-without-carbon.min.css +1 -1
  12. package/css/index-without-carbon.min.css.map +1 -1
  13. package/css/index.css +15 -11
  14. package/css/index.css.map +1 -1
  15. package/css/index.min.css +1 -1
  16. package/css/index.min.css.map +1 -1
  17. package/es/components/Card/next/Card.d.ts +6 -69
  18. package/es/components/Card/next/Card.d.ts.map +1 -1
  19. package/es/components/Card/next/Card.js +45 -24
  20. package/es/components/Card/next/Card.types.d.ts +12 -3
  21. package/es/components/Card/next/Card.types.d.ts.map +1 -1
  22. package/es/components/Card/next/CardAction.d.ts +7 -15
  23. package/es/components/Card/next/CardAction.d.ts.map +1 -1
  24. package/es/components/Card/next/CardAction.js +10 -4
  25. package/es/components/Card/next/CardActions.d.ts +1 -19
  26. package/es/components/Card/next/CardActions.d.ts.map +1 -1
  27. package/es/components/Card/next/CardActions.js +27 -22
  28. package/es/components/Card/next/CardBody.d.ts +1 -1
  29. package/es/components/Card/next/CardBody.d.ts.map +1 -1
  30. package/es/components/Card/next/CardBody.js +3 -2
  31. package/es/components/Card/next/CardFooter.d.ts +1 -1
  32. package/es/components/Card/next/CardFooter.d.ts.map +1 -1
  33. package/es/components/Card/next/CardFooter.js +3 -2
  34. package/es/components/Card/next/CardHeader.d.ts +8 -2
  35. package/es/components/Card/next/CardHeader.d.ts.map +1 -1
  36. package/es/components/Card/next/CardHeader.js +17 -24
  37. package/es/components/Card/next/CardHeaderMedia.d.ts +1 -15
  38. package/es/components/Card/next/CardHeaderMedia.d.ts.map +1 -1
  39. package/es/components/Card/next/CardHeaderMedia.js +5 -3
  40. package/es/components/Card/next/CardMedia.d.ts +12 -18
  41. package/es/components/Card/next/CardMedia.d.ts.map +1 -1
  42. package/es/components/Card/next/CardMedia.js +22 -13
  43. package/es/components/Card/next/CardTitle.d.ts +27 -33
  44. package/es/components/Card/next/CardTitle.d.ts.map +1 -1
  45. package/es/components/Card/next/CardTitle.js +62 -18
  46. package/es/components/Card/next/CardTitleMedia.d.ts +1 -1
  47. package/es/components/Card/next/CardTitleMedia.d.ts.map +1 -1
  48. package/es/components/Card/next/CardTitleMedia.js +3 -2
  49. package/es/components/Card/next/_story-assets/data.d.ts +7 -0
  50. package/es/components/Card/next/_story-assets/data.d.ts.map +1 -0
  51. package/es/components/Card/next/_story-assets/options.d.ts +48 -0
  52. package/es/components/Card/next/_story-assets/options.d.ts.map +1 -0
  53. package/es/components/Card/next/index.d.ts +2 -2
  54. package/es/components/Card/next/index.d.ts.map +1 -1
  55. package/es/components/Card/next/index.js +0 -4
  56. package/es/components/Tearsheet/next/Tearsheet.d.ts.map +1 -1
  57. package/es/components/Tearsheet/next/Tearsheet.js +5 -2
  58. package/es/components/Tearsheet/next/TearsheetBody.d.ts.map +1 -1
  59. package/es/components/Tearsheet/next/TearsheetBody.js +2 -1
  60. package/es/global/js/package-settings.d.ts +10 -0
  61. package/es/global/js/package-settings.d.ts.map +1 -1
  62. package/es/global/js/package-settings.js +10 -0
  63. package/es/settings.d.ts +10 -0
  64. package/es/settings.d.ts.map +1 -1
  65. package/lib/components/Card/next/Card.d.ts +6 -69
  66. package/lib/components/Card/next/Card.d.ts.map +1 -1
  67. package/lib/components/Card/next/Card.js +44 -23
  68. package/lib/components/Card/next/Card.types.d.ts +12 -3
  69. package/lib/components/Card/next/Card.types.d.ts.map +1 -1
  70. package/lib/components/Card/next/CardAction.d.ts +7 -15
  71. package/lib/components/Card/next/CardAction.d.ts.map +1 -1
  72. package/lib/components/Card/next/CardAction.js +15 -4
  73. package/lib/components/Card/next/CardActions.d.ts +1 -19
  74. package/lib/components/Card/next/CardActions.d.ts.map +1 -1
  75. package/lib/components/Card/next/CardActions.js +32 -22
  76. package/lib/components/Card/next/CardBody.d.ts +1 -1
  77. package/lib/components/Card/next/CardBody.d.ts.map +1 -1
  78. package/lib/components/Card/next/CardBody.js +9 -3
  79. package/lib/components/Card/next/CardFooter.d.ts +1 -1
  80. package/lib/components/Card/next/CardFooter.d.ts.map +1 -1
  81. package/lib/components/Card/next/CardFooter.js +9 -3
  82. package/lib/components/Card/next/CardHeader.d.ts +8 -2
  83. package/lib/components/Card/next/CardHeader.d.ts.map +1 -1
  84. package/lib/components/Card/next/CardHeader.js +22 -24
  85. package/lib/components/Card/next/CardHeaderMedia.d.ts +1 -15
  86. package/lib/components/Card/next/CardHeaderMedia.d.ts.map +1 -1
  87. package/lib/components/Card/next/CardHeaderMedia.js +10 -3
  88. package/lib/components/Card/next/CardMedia.d.ts +12 -18
  89. package/lib/components/Card/next/CardMedia.d.ts.map +1 -1
  90. package/lib/components/Card/next/CardMedia.js +27 -13
  91. package/lib/components/Card/next/CardTitle.d.ts +27 -33
  92. package/lib/components/Card/next/CardTitle.d.ts.map +1 -1
  93. package/lib/components/Card/next/CardTitle.js +67 -18
  94. package/lib/components/Card/next/CardTitleMedia.d.ts +1 -1
  95. package/lib/components/Card/next/CardTitleMedia.d.ts.map +1 -1
  96. package/lib/components/Card/next/CardTitleMedia.js +9 -3
  97. package/lib/components/Card/next/_story-assets/data.d.ts +7 -0
  98. package/lib/components/Card/next/_story-assets/data.d.ts.map +1 -0
  99. package/lib/components/Card/next/_story-assets/options.d.ts +48 -0
  100. package/lib/components/Card/next/_story-assets/options.d.ts.map +1 -0
  101. package/lib/components/Card/next/index.d.ts +2 -2
  102. package/lib/components/Card/next/index.d.ts.map +1 -1
  103. package/lib/components/Card/next/index.js +0 -4
  104. package/lib/components/Tearsheet/next/Tearsheet.d.ts.map +1 -1
  105. package/lib/components/Tearsheet/next/Tearsheet.js +5 -2
  106. package/lib/components/Tearsheet/next/TearsheetBody.d.ts.map +1 -1
  107. package/lib/components/Tearsheet/next/TearsheetBody.js +2 -1
  108. package/lib/global/js/package-settings.d.ts +10 -0
  109. package/lib/global/js/package-settings.d.ts.map +1 -1
  110. package/lib/global/js/package-settings.js +10 -0
  111. package/lib/settings.d.ts +10 -0
  112. package/lib/settings.d.ts.map +1 -1
  113. package/package.json +9 -8
  114. package/scss/components/AboutModal/_about-modal.scss +12 -12
  115. package/scss/components/Card/_card-next.scss +184 -157
  116. package/scss/components/PageHeader/_page-header.scss +1 -1
  117. package/scss/components/Tearsheet/_tearsheet_next.scss +1 -2
  118. package/telemetry.yml +9 -9
  119. package/es/components/Card/next/CardCaption.d.ts +0 -46
  120. package/es/components/Card/next/CardCaption.d.ts.map +0 -1
  121. package/es/components/Card/next/CardCaption.js +0 -52
  122. package/es/components/Card/next/CardLabel.d.ts +0 -46
  123. package/es/components/Card/next/CardLabel.d.ts.map +0 -1
  124. package/es/components/Card/next/CardLabel.js +0 -52
  125. package/es/components/Tearsheet/next/_story-assets/StepTearsheet.d.ts +0 -30
  126. package/es/components/Tearsheet/next/_story-assets/StepTearsheet.d.ts.map +0 -1
  127. package/lib/components/Card/next/CardCaption.d.ts +0 -46
  128. package/lib/components/Card/next/CardCaption.d.ts.map +0 -1
  129. package/lib/components/Card/next/CardCaption.js +0 -54
  130. package/lib/components/Card/next/CardLabel.d.ts +0 -46
  131. package/lib/components/Card/next/CardLabel.d.ts.map +0 -1
  132. package/lib/components/Card/next/CardLabel.js +0 -54
  133. package/lib/components/Tearsheet/next/_story-assets/StepTearsheet.d.ts +0 -30
  134. package/lib/components/Tearsheet/next/_story-assets/StepTearsheet.d.ts.map +0 -1
@@ -54,11 +54,23 @@ $block-class-next: #{c4p-settings.$pkg-prefix}--card-next;
54
54
  }
55
55
 
56
56
  // Header styles
57
+ // Uses a two-column grid so __title-media (left) and __title (right) can sit
58
+ // side-by-side without JS injecting wrapper divs. Each child declares its own
59
+ // grid-column; absent children simply leave their cell empty and it collapses.
60
+ //
61
+ // col 1 (auto) │ col 2 (1fr)
62
+ // ──────────────────────────────────────────
63
+ // __header-media spans 1 / -1 (full width)
64
+ // __title-media col 1 │ __title col 2
65
+ // __actions absolute, not in flow
66
+ //
67
+ // When __title-media is absent, __title gets grid-column: 1 / -1 via :not(:has(...))
57
68
  .#{$block-class-next}__header {
58
69
  position: relative;
59
- display: flex;
60
- flex-direction: column;
61
- gap: $spacing-01; // 2px gap between label, title, and caption
70
+ display: grid;
71
+ column-gap: $spacing-05; // 16px gap between __title-media (col 1) and __title (col 2)
72
+ grid-template-columns: auto 1fr;
73
+ row-gap: 0; // vertical rhythm is handled by margin-block on each child
62
74
  }
63
75
 
64
76
  // Body styles
@@ -135,42 +147,17 @@ $block-class-next: #{c4p-settings.$pkg-prefix}--card-next;
135
147
 
136
148
  // Header primitive components
137
149
 
138
- // Header Media styles (icon slot)
150
+ // CardHeaderMedia icon/pictogram slot above the title row.
151
+ // $spacing-05 padding on all four sides, max-height 64px per design spec.
152
+ // Spans both grid columns so it is always full-width.
139
153
  .#{$block-class-next}__header-media {
140
154
  display: flex;
141
- flex-shrink: 0; // Don't shrink
142
- align-items: flex-start; // Top-align content
143
- justify-content: flex-start; // Left-align content
144
- block-size: auto; // Auto height based on content
145
- inline-size: auto; // Auto width based on content
146
- margin-block-end: $spacing-05; // 16px bottom
147
- margin-block-start: $spacing-05; // 16px top
148
- margin-inline-end: $spacing-05; // 16px right
149
- margin-inline-start: $spacing-05; // 16px left
150
- max-block-size: $spacing-10; // 64px max height for content
151
- }
152
-
153
- // Inline header media margin (when NOT the first child, i.e., not header media slot)
154
- // This ensures inline icons align with label/title/caption text
155
- .#{$block-class-next}__header
156
- > .#{$block-class-next}__header-media:not(:first-child) {
157
- margin-inline-start: $spacing-05; // 16px left to align with text content
158
- }
159
-
160
- // When header media slot is followed by actions, create row layout
161
- .#{$block-class-next}__header:has(
162
- > .#{$block-class-next}__header-media:first-child
163
- + .#{$block-class-next}__actions
164
- ) {
165
- > .#{$block-class-next}__header-media:first-child {
166
- // Header media on the left, remove right margin
167
- margin-inline-end: 0;
168
- }
169
-
170
- > .#{$block-class-next}__actions {
171
- // Actions on the right
172
- margin-inline-start: auto;
173
- }
155
+ align-items: flex-start;
156
+ justify-content: flex-start;
157
+ grid-column: 1 / -1; // span full width
158
+ margin-block: $spacing-05;
159
+ margin-inline: $spacing-05;
160
+ max-block-size: $spacing-10; // 64px max height
174
161
  }
175
162
 
176
163
  // Media styles (uses Carbon AspectRatio)
@@ -178,104 +165,170 @@ $block-class-next: #{c4p-settings.$pkg-prefix}--card-next;
178
165
  inline-size: 100%;
179
166
  }
180
167
 
181
- // Label styles
182
- .#{$block-class-next}__label {
183
- @include type-style('label-01');
168
+ // ──────────────────────────────────────────────────────────────
169
+ // Horizontal layout
170
+ // ──────────────────────────────────────────────────────────────
171
+ // Card root: side-by-side flex row
172
+ .#{$block-class-next}--horizontal {
173
+ display: flex;
174
+ flex-direction: row;
175
+ align-items: stretch;
176
+ }
184
177
 
185
- color: $text-secondary;
178
+ // Media column in horizontal mode.
179
+ // Width is driven by the --ibm-products--card-next--media-width custom property
180
+ // (set by the mediaWidth prop, default 33.33%).
181
+ // Height stretches to match the content column via align-self: stretch.
182
+ .#{$block-class-next}__media--horizontal {
183
+ overflow: hidden;
184
+ flex-basis: var(
185
+ --#{c4p-settings.$pkg-prefix}--card-next--media-width,
186
+ 33.33%
187
+ );
188
+ flex-shrink: 0;
189
+ align-self: stretch;
190
+ }
186
191
 
187
- margin-block-start: $spacing-05; // 16px top
188
- margin-inline: $spacing-05; // 16px left and right
192
+ // Right-hand content column: Header/Body/Footer wrapped in __content, stacks vertically.
193
+ .#{$block-class-next}--horizontal > .#{$block-class-next}__content {
194
+ display: flex;
195
+ flex: 1 1 0;
196
+ flex-direction: column;
197
+ min-inline-size: 0;
198
+ }
189
199
 
190
- &--truncate {
191
- overflow: hidden;
192
- text-overflow: ellipsis;
193
- white-space: nowrap;
194
- }
200
+ // Body grows to fill remaining space when present.
201
+ .#{$block-class-next}--horizontal
202
+ > .#{$block-class-next}__content
203
+ > .#{$block-class-next}__body {
204
+ flex: 1 0 auto;
205
+ }
206
+
207
+ // Footer always pins to the bottom edge, whether or not a body is present.
208
+ .#{$block-class-next}--horizontal
209
+ > .#{$block-class-next}__content
210
+ > .#{$block-class-next}__footer {
211
+ margin-block-start: auto;
212
+ }
213
+
214
+ // __label nested inside __title (via label prop on CardTitle).
215
+ // __title owns the horizontal margins; __label carries only typography + color.
216
+ // Truncation modifiers are standalone rules — &--modifier inside a descendant
217
+ // combinator block compiles to `.parent > .element--modifier` which only
218
+ // matches the sole modifier class, not the element with base + modifier.
219
+ // Standalone rules match both classes correctly.
220
+ .#{$block-class-next}__title > .#{$block-class-next}__label {
221
+ @include type-style('label-01');
222
+
223
+ color: $text-secondary;
195
224
  }
196
225
 
197
- // Remove all inline margins from label when inside title-content (with TitleMedia)
198
- .#{$block-class-next}__title-content > .#{$block-class-next}__label {
199
- margin-inline: 0;
226
+ .#{$block-class-next}__label--truncate {
227
+ overflow: hidden;
228
+ text-overflow: ellipsis;
229
+ white-space: nowrap;
200
230
  }
201
231
 
202
- // Title styles
232
+ .#{$block-class-next}__label--truncate-multi {
233
+ display: -webkit-box;
234
+ overflow: hidden;
235
+ -webkit-box-orient: vertical;
236
+ -webkit-line-clamp: var(
237
+ --#{c4p-settings.$pkg-prefix}--card-next--label-line-clamp
238
+ );
239
+ text-overflow: ellipsis;
240
+ }
241
+
242
+ // Title container — always a flex column so label / text-row / description stack.
243
+ // Never set display on this element: truncation lives on __title-text-row below.
244
+ // min-inline-size: 0 is required because __title is a grid item: grid items
245
+ // default to min-inline-size: auto (i.e. their content width), which means
246
+ // they won't shrink to fit the cell and overflow: hidden on __title-text-row
247
+ // has no effect. Setting 0 allows the grid cell to constrain the item width.
248
+ // overflow: hidden clips any content that still escapes (e.g. unbreakable words).
203
249
  .#{$block-class-next}__title {
250
+ display: flex;
251
+ overflow: hidden;
252
+ flex-direction: column;
204
253
  color: $text-primary;
254
+ gap: $spacing-01; // 2px between label / text-row / description
205
255
  margin-inline: $spacing-05; // 16px left and right
256
+ min-inline-size: 0;
257
+ }
206
258
 
207
- &--truncate {
208
- overflow: hidden;
209
- text-overflow: ellipsis;
210
- white-space: nowrap;
211
- }
212
-
213
- &--truncate-multi {
214
- display: -webkit-box;
215
- overflow: hidden;
216
- -webkit-box-orient: vertical;
217
- text-overflow: ellipsis;
218
- }
259
+ // Title text row — wraps the leading icon, title text, and trailing icon.
260
+ // Truncation modifiers live here so they only clip the text row and never
261
+ // affect the flex column that keeps description visible below.
262
+ .#{$block-class-next}__title-text-row {
263
+ // Default: inline so bare text nodes wrap naturally.
264
+ display: block;
219
265
  }
220
266
 
221
- // Remove all inline margins from title when inside title-content (with TitleMedia)
222
- .#{$block-class-next}__title-content > .#{$block-class-next}__title {
223
- margin-inline: 0;
267
+ .#{$block-class-next}__title-text-row--truncate {
268
+ overflow: hidden;
269
+ max-inline-size: var(
270
+ --#{c4p-settings.$pkg-prefix}--card-next--title-max-width,
271
+ 100%
272
+ );
273
+ text-overflow: ellipsis;
274
+ white-space: nowrap;
224
275
  }
225
276
 
226
- // Title Media styles (icon alongside label+title+caption block)
277
+ .#{$block-class-next}__title-text-row--truncate-multi {
278
+ display: -webkit-box;
279
+ overflow: hidden;
280
+ -webkit-box-orient: vertical;
281
+ -webkit-line-clamp: var(
282
+ --#{c4p-settings.$pkg-prefix}--card-next--title-line-clamp
283
+ );
284
+ max-inline-size: var(
285
+ --#{c4p-settings.$pkg-prefix}--card-next--title-max-width,
286
+ 100%
287
+ );
288
+ text-overflow: ellipsis;
289
+ }
290
+
291
+ // CardTitleMedia — inline icon, left column of the title row.
292
+ // Sits in grid column 1; __title takes column 2 alongside it.
227
293
  .#{$block-class-next}__title-media {
228
294
  display: flex;
229
- flex-shrink: 0; // Don't shrink
230
- align-items: center; // Center content within the media container
231
- justify-content: center; // Center content
232
- margin-block-start: $spacing-05; // 16px top margin to align with label
233
- margin-inline-start: $spacing-05; // 16px left padding
295
+ flex-shrink: 0;
296
+ align-items: flex-start; // top-align so it tracks the first line on long titles
297
+ justify-content: center;
298
+ grid-column: 1; // left column
299
+ margin-block-start: $spacing-05; // aligns top edge with title text top margin
300
+ margin-inline-start: $spacing-05; // 16px from card edge
234
301
  max-block-size: $spacing-10; // 64px max height
235
302
  }
236
303
 
237
- // When header contains title-media, make it a flex row container
238
- // Outer wrapper for TitleMedia + title content (horizontal layout)
239
- .#{$block-class-next}__header-content {
240
- display: flex;
241
- flex: 1; // Take remaining space
242
- flex-direction: row; // Horizontal: TitleMedia on left, title-content on right
243
- align-items: flex-start; // Top-align
244
- gap: $spacing-05; // 16px gap between TitleMedia and title-content
245
- min-inline-size: 0; // Allow content to shrink and wrap
246
- }
247
-
248
- // Inner wrapper for label, title, caption (vertical stack)
249
- .#{$block-class-next}__title-content {
250
- display: flex;
251
- flex: 1; // Take remaining space
252
- flex-direction: column; // Stack label, title, caption vertically
253
- gap: $spacing-01; // 2px gap between label, title, and caption
254
- min-inline-size: 0; // Allow content to shrink and wrap
255
- padding-inline-end: $spacing-05; // 16px right padding only
304
+ // When __title-media is present, __title sits in the right column.
305
+ // When absent, __title spans both columns (full width).
306
+ .#{$block-class-next}__header:has(> .#{$block-class-next}__title-media)
307
+ > .#{$block-class-next}__title {
308
+ grid-column: 2;
309
+ margin-inline-start: 0; // left margin is provided by the gap from __title-media
256
310
  }
257
311
 
258
- // Expressive density uses larger heading
259
- .#{$block-class-next}--expressive .#{$block-class-next}__title {
312
+ // Expressive density uses larger heading — applied to the text row so only the
313
+ // title text itself inherits the type style, not the label or description.
314
+ .#{$block-class-next}--expressive .#{$block-class-next}__title-text-row {
260
315
  @include type-style('heading-03');
261
316
  }
262
317
 
263
318
  // Productive density uses compact heading (must come after expressive to override)
264
- .#{$block-class-next}--productive .#{$block-class-next}__title {
319
+ .#{$block-class-next}--productive .#{$block-class-next}__title-text-row {
265
320
  @include type-style('heading-compact-02');
266
321
  }
267
322
 
268
- // Title with leading icon layout
269
- .#{$block-class-next}__title--with-start-icon {
323
+ // Leading icon: flex row so icon and text sit side-by-side on the same line.
324
+ .#{$block-class-next}__title-text-row--with-start-icon {
270
325
  display: flex;
271
326
  align-items: flex-start;
272
327
  gap: $spacing-03; // 8px between icon and text per design
273
328
  }
274
329
 
275
- // Title with trailing icon - no flex, icon flows inline with text
276
- .#{$block-class-next}__title--with-end-icon {
277
- // No display: flex - let content flow naturally inline
278
- // Ensure inline content can flow
330
+ // Trailing icon - no override needed; icon span is inline-flex inside block text.
331
+ .#{$block-class-next}__title-text-row--with-end-icon {
279
332
  display: block;
280
333
  }
281
334
 
@@ -283,7 +336,7 @@ $block-class-next: #{c4p-settings.$pkg-prefix}--card-next;
283
336
  .#{$block-class-next}__title-start-icon {
284
337
  display: flex;
285
338
  flex-shrink: 0; // Prevent icon from shrinking
286
- margin-block: $spacing-01; // 2px top/bottom padding to center with first line of text
339
+ margin-block-start: $spacing-01; // 2px top/bottom padding to center with first line of text
287
340
  }
288
341
 
289
342
  // Title trailing icon wrapper - inline element that flows with text
@@ -294,47 +347,37 @@ $block-class-next: #{c4p-settings.$pkg-prefix}--card-next;
294
347
  vertical-align: middle; // Align with text baseline
295
348
  }
296
349
 
297
- // Conditional margin for title based on siblings
298
- // When title is standalone (no label before it), add top margin
299
- .#{$block-class-next}__header > .#{$block-class-next}__title:first-child,
300
- .#{$block-class-next}__header
301
- > .#{$block-class-next}__header-media:first-child
302
- + .#{$block-class-next}__title,
303
- .#{$block-class-next}__header
304
- > .#{$block-class-next}__media:first-child
305
- + .#{$block-class-next}__title,
306
- .#{$block-class-next}__title-content
307
- > .#{$block-class-next}__title:first-child {
308
- margin-block-start: $spacing-05; // 16px top
309
- }
310
-
311
- // When title is standalone (no caption after it), add bottom margin
312
- // This applies when title is last child OR when followed by actions (but not caption)
313
- .#{$block-class-next}__header > .#{$block-class-next}__title:last-child,
314
- .#{$block-class-next}__title-content > .#{$block-class-next}__title:last-child,
315
- .#{$block-class-next}__title:not(:has(+ .#{$block-class-next}__caption)) {
316
- margin-block-end: $spacing-05; // 16px bottom
350
+ // __title vertical rhythm.
351
+ // Grid layout makes all sibling-combinator rules unnecessary every __title
352
+ // that is a direct child of __header always needs 16px top and bottom.
353
+ .#{$block-class-next}__header > .#{$block-class-next}__title {
354
+ margin-block: $spacing-05;
317
355
  }
318
356
 
319
- // Caption styles
320
- .#{$block-class-next}__caption {
357
+ // __description nested inside __title (via description prop on CardTitle).
358
+ // __title owns the horizontal margins; __description carries only typography + color.
359
+ // No block margins — the parent flex gap provides the 2px separation from the title text.
360
+ // Truncation modifiers are standalone — see note above __label for why.
361
+ .#{$block-class-next}__title > .#{$block-class-next}__description {
321
362
  @include type-style('label-01');
322
363
 
323
364
  color: $text-secondary;
365
+ }
324
366
 
325
- margin-block-end: $spacing-05; // 16px bottom
326
- margin-inline: $spacing-05; // 16px left and right
327
-
328
- &--truncate {
329
- overflow: hidden;
330
- text-overflow: ellipsis;
331
- white-space: nowrap;
332
- }
367
+ .#{$block-class-next}__description--truncate {
368
+ overflow: hidden;
369
+ text-overflow: ellipsis;
370
+ white-space: nowrap;
333
371
  }
334
372
 
335
- // Remove all inline margins from caption when inside title-content (with TitleMedia)
336
- .#{$block-class-next}__title-content > .#{$block-class-next}__caption {
337
- margin-inline: 0;
373
+ .#{$block-class-next}__description--truncate-multi {
374
+ display: -webkit-box;
375
+ overflow: hidden;
376
+ -webkit-box-orient: vertical;
377
+ -webkit-line-clamp: var(
378
+ --#{c4p-settings.$pkg-prefix}--card-next--description-line-clamp
379
+ );
380
+ text-overflow: ellipsis;
338
381
  }
339
382
 
340
383
  // Actions container styles
@@ -346,19 +389,11 @@ $block-class-next: #{c4p-settings.$pkg-prefix}--card-next;
346
389
  block-size: $spacing-07; // 32px default height
347
390
  gap: $spacing-02;
348
391
  inline-size: 50%; // Limit actions to 50% of available header space per design
349
- inset-block-start: $spacing-03; // 16px from top
350
- inset-inline-end: $spacing-03; // 16px from right
392
+ inset-block-start: $spacing-03; // 8px from top
393
+ inset-inline-end: $spacing-03; // 8px from right edge
351
394
  max-inline-size: 50%; // Enforce 50% maximum width
352
395
  }
353
396
 
354
- // When actions are in header with header media slot, add bottom margin
355
- .#{$block-class-next}__header:has(
356
- > .#{$block-class-next}__header-media:first-child
357
- )
358
- .#{$block-class-next}__actions {
359
- margin-block-end: $spacing-07; // 32px gap below actions to title
360
- }
361
-
362
397
  // Action wrapper styles
363
398
  .#{$block-class-next}__action {
364
399
  display: inline-flex;
@@ -416,14 +451,14 @@ $block-class-next: #{c4p-settings.$pkg-prefix}--card-next;
416
451
  padding-inline-end: $spacing-13;
417
452
  }
418
453
 
419
- // Adjust caption padding when AI label is present
420
- .#{$block-class-next}--has-ai-label .#{$block-class-next}__caption {
454
+ // Adjust description padding when AI label is present
455
+ .#{$block-class-next}--has-ai-label .#{$block-class-next}__description {
421
456
  padding-inline-end: calc($spacing-07 + $spacing-05);
422
457
  }
423
458
 
424
- // When both actions and AI label are present, increase caption padding
459
+ // When both actions and AI label are present, increase description padding
425
460
  .#{$block-class-next}--has-ai-label:has(.#{$block-class-next}__actions)
426
- .#{$block-class-next}__caption {
461
+ .#{$block-class-next}__description {
427
462
  padding-inline-end: $spacing-13;
428
463
  }
429
464
 
@@ -435,14 +470,6 @@ $block-class-next: #{c4p-settings.$pkg-prefix}--card-next;
435
470
  inset-inline-end: calc($spacing-03 + $spacing-06 + $spacing-03);
436
471
  }
437
472
 
438
- // When AI label is present and title has no caption after it, add bottom margin
439
- // This prevents title from overlapping with actions
440
- .#{$block-class-next}--has-ai-label
441
- .#{$block-class-next}__header
442
- > .#{$block-class-next}__title:not(:has(+ .#{$block-class-next}__caption)) {
443
- margin-block-end: $spacing-05; // 16px bottom to prevent overlap with actions
444
- }
445
-
446
473
  // Hover state for clickable cards with AI label
447
474
  .#{$block-class-next}__clickable.#{$block-class-next}--has-ai-label::before {
448
475
  @include utilities.ai-popover-gradient('hover', 0, 'layer');
@@ -734,7 +734,7 @@ $duration: 1000ms;
734
734
 
735
735
  .#{$block-class}__breadcrumb-bar {
736
736
  position: sticky;
737
- z-index: 1;
737
+ z-index: 2;
738
738
  background-color: $layer;
739
739
  block-size: to-rem(40px);
740
740
  /* stylelint-disable-next-line carbon/layout-use */
@@ -485,7 +485,7 @@ $transform-start: translate3d(0, calc(min(95vh, 500px)), 0);
485
485
  .#{$block-class__next}__decorator {
486
486
  position: absolute;
487
487
  inset-block-start: convert.to-rem(10px);
488
- inset-inline-end: convert.to-rem(48px);
488
+ inset-inline-end: $spacing-09;
489
489
  }
490
490
 
491
491
  // ──────────────────────────────────────────────────────────────
@@ -505,7 +505,6 @@ $transform-start: translate3d(0, calc(min(95vh, 500px)), 0);
505
505
  margin-inline-start: -$spacing-05;
506
506
  }
507
507
  }
508
-
509
508
  .#{$block-class__next}__scroller-container {
510
509
  position: absolute;
511
510
  inset-block-end: 0;
package/telemetry.yml CHANGED
@@ -88,7 +88,6 @@ collect:
88
88
  - disableColumnSwapping
89
89
  - disabled
90
90
  - disabledCell
91
- - disableHeaderCollapse
92
91
  - disableSubmit
93
92
  - displayMetalPanel
94
93
  - downloadLinkLabel
@@ -197,7 +196,6 @@ collect:
197
196
  - itemCount
198
197
  - items
199
198
  - itemsLabel
200
- - keepMounted
201
199
  - key
202
200
  - kind
203
201
  - label
@@ -416,7 +414,6 @@ collect:
416
414
  - variableRowHeight
417
415
  - variant
418
416
  - verticalAlign
419
- - verticalGap
420
417
  - verticalPosition
421
418
  - viewAllLabel
422
419
  - viewLessLabel
@@ -586,13 +583,19 @@ collect:
586
583
  - clickable
587
584
  - density
588
585
  - getStarted
586
+ - horizontal
589
587
  # CardFooter
590
588
  - hasButton
591
589
  # CardHeader
592
590
  - inClickableCard
593
591
  - noActionIcons
592
+ # CardMedia
593
+ - mediaWidth
594
594
  # CardTitle
595
+ - descriptionTruncate
596
+ - labelTruncate
595
597
  - maxWidth
598
+ - titleTruncate
596
599
  # Carousel
597
600
  - disableArrowScroll
598
601
  - disableResetOnResize
@@ -1031,8 +1034,11 @@ collect:
1031
1034
  # Tearsheet
1032
1035
  - containerClassName
1033
1036
  - disablePortal
1037
+ - keepMounted
1034
1038
  - summaryContentWidth
1039
+ - verticalGap
1035
1040
  # TearsheetHeader
1041
+ - disableHeaderCollapse
1036
1042
  - onHeaderCollapse
1037
1043
  # TearsheetHeaderActionItem
1038
1044
  - overflowItemLabel
@@ -1049,9 +1055,6 @@ collect:
1049
1055
  - summaryPanelAriaLabel
1050
1056
  - summaryPanelOpen
1051
1057
  - summaryPanelTriggerRef
1052
- # TearsheetWithSteps
1053
- - progressIndicator
1054
- - setOpen
1055
1058
  # Toolbar
1056
1059
  - vertical
1057
1060
  # TruncatedList
@@ -1382,9 +1385,6 @@ collect:
1382
1385
  - lg
1383
1386
  - md
1384
1387
  - sm
1385
- # TearsheetWithSteps - progressIndicator
1386
- - horizontal
1387
- - vertical
1388
1388
  npm:
1389
1389
  dependencies: null
1390
1390
  js:
@@ -1,46 +0,0 @@
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 CardCaptionProps {
10
- /**
11
- * Provide the contents of the CardCaption.
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
- * CardCaption displays secondary text below the title in the card header.
26
- * Uses $label-01 typography token and $text-secondary color.
27
- */
28
- export declare const CardCaption: {
29
- ({ children, className, truncate, ...rest }: CardCaptionProps): React.JSX.Element;
30
- propTypes: {
31
- /**
32
- * Provide the contents of the CardCaption.
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=CardCaption.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CardCaption.d.ts","sourceRoot":"","sources":["../../../../src/components/Card/next/CardCaption.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,SAAS,MAAM,YAAY,CAAC;AAQnC,MAAM,WAAW,gBAAgB;IAC/B;;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,WAAW;iDAKrB,gBAAgB;;QAiBjB;;WAEG;;QAGH;;WAEG;;QAGH;;WAEG;;;;CAfJ,CAAC"}
@@ -1,52 +0,0 @@
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/CardCaption.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 = "CardCaption";
24
- /**
25
- * CardCaption displays secondary text below the title in the card header.
26
- * Uses $label-01 typography token and $text-secondary color.
27
- */
28
- const CardCaption = ({ children, className, truncate = false, ...rest }) => {
29
- const classes = (0, import_classnames.default)(`${blockClass}__caption`, { [`${blockClass}__caption--truncate`]: truncate }, className);
30
- return /* @__PURE__ */ React.createElement("div", {
31
- ...rest,
32
- className: classes,
33
- ...getDevtoolsProps(componentName)
34
- }, children);
35
- };
36
- CardCaption.propTypes = {
37
- /**
38
- * Provide the contents of the CardCaption.
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
- CardCaption.displayName = componentName;
51
- //#endregion
52
- export { CardCaption };