@patternfly/patternfly 4.197.1 → 4.198.2

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.
@@ -84,6 +84,8 @@
84
84
  --pf-c-card__header--m-toggle-right--toggle--MarginRight: calc(var(--pf-global--spacer--form-element) * -1);
85
85
  --pf-c-card__header--m-toggle-right--toggle--MarginLeft: var(--pf-global--spacer--xs);
86
86
  --pf-c-card__header--m-toggle-right--actions--MarginRight: 0;
87
+ --pf-c-card__input--focus--BorderWidth: var(--pf-global--BorderWidth--md);
88
+ --pf-c-card__input--focus--BorderColor: var(--pf-global--primary-color--100);
87
89
  display: flex;
88
90
  flex-direction: column;
89
91
  background-color: var(--pf-c-card--BackgroundColor);
@@ -310,6 +312,16 @@
310
312
  font-size: var(--pf-c-card__footer--FontSize);
311
313
  }
312
314
 
315
+ .pf-c-card__sr-input:focus + .pf-c-card::after {
316
+ position: absolute;
317
+ top: 0;
318
+ right: 0;
319
+ bottom: 0;
320
+ left: 0;
321
+ content: "";
322
+ border: var(--pf-c-card__input--focus--BorderWidth) solid var(--pf-c-card__input--focus--BorderColor);
323
+ }
324
+
313
325
  .pf-m-overpass-font .pf-c-card .pf-c-card__title {
314
326
  font-weight: var(--pf-global--FontWeight--normal);
315
327
  }
@@ -105,6 +105,10 @@
105
105
  --pf-c-card__header--m-toggle-right--toggle--MarginLeft: var(--pf-global--spacer--xs);
106
106
  --pf-c-card__header--m-toggle-right--actions--MarginRight: 0;
107
107
 
108
+ // Card input
109
+ --pf-c-card__input--focus--BorderWidth: var(--pf-global--BorderWidth--md);
110
+ --pf-c-card__input--focus--BorderColor: var(--pf-global--primary-color--100);
111
+
108
112
  display: flex;
109
113
  flex-direction: column;
110
114
  background-color: var(--pf-c-card--BackgroundColor);
@@ -380,6 +384,16 @@
380
384
  font-size: var(--pf-c-card__footer--FontSize);
381
385
  }
382
386
 
387
+ .pf-c-card__sr-input:focus + .pf-c-card::after {
388
+ position: absolute;
389
+ top: 0;
390
+ right: 0;
391
+ bottom: 0;
392
+ left: 0;
393
+ content: "";
394
+ border: var(--pf-c-card__input--focus--BorderWidth) solid var(--pf-c-card__input--focus--BorderColor);
395
+ }
396
+
383
397
  // RedHat Font overrides
384
398
  @include pf-m-overpass-font {
385
399
  .pf-c-card .pf-c-card__title {
@@ -223,6 +223,7 @@
223
223
  font-weight: var(--pf-c-progress-stepper__step-title--FontWeight);
224
224
  color: var(--pf-c-progress-stepper__step-title--Color);
225
225
  text-align: var(--pf-c-progress-stepper__step-title--TextAlign);
226
+ border: 0;
226
227
  }
227
228
  .pf-c-progress-stepper__step-title.pf-m-help-text {
228
229
  text-decoration: underline;
@@ -272,6 +272,7 @@
272
272
  font-weight: var(--pf-c-progress-stepper__step-title--FontWeight);
273
273
  color: var(--pf-c-progress-stepper__step-title--Color);
274
274
  text-align: var(--pf-c-progress-stepper__step-title--TextAlign);
275
+ border: 0;
275
276
 
276
277
  &.pf-m-help-text {
277
278
  text-decoration: underline;
@@ -304,12 +304,14 @@
304
304
  border-bottom: 0;
305
305
  }
306
306
  .pf-c-table.pf-m-sticky-header > thead > tr > * {
307
+ z-index: var(--pf-global--ZIndex--xs);
308
+ }
309
+ .pf-c-table.pf-m-sticky-header > thead:not(.pf-m-nested-column-header) > tr > * {
307
310
  position: sticky;
308
311
  top: 0;
309
- z-index: var(--pf-global--ZIndex--xs);
310
312
  background: var(--pf-c-table--BackgroundColor);
311
313
  }
312
- .pf-c-table.pf-m-sticky-header > thead > tr > *::after {
314
+ .pf-c-table.pf-m-sticky-header > thead:not(.pf-m-nested-column-header) > tr > *::after {
313
315
  position: absolute;
314
316
  right: 0;
315
317
  bottom: 0;
@@ -317,6 +319,27 @@
317
319
  content: "";
318
320
  border-bottom: var(--pf-c-table--border-width--base) solid var(--pf-c-table--BorderColor);
319
321
  }
322
+ .pf-c-table.pf-m-sticky-header > .pf-m-nested-column-header {
323
+ position: sticky;
324
+ top: 0;
325
+ z-index: var(--pf-global--ZIndex--xs);
326
+ background: var(--pf-c-table--BackgroundColor);
327
+ }
328
+ .pf-c-table.pf-m-sticky-header > .pf-m-nested-column-header > .pf-m-border-row {
329
+ height: var(--pf-c-table--border-width--base);
330
+ background-color: var(--pf-c-table--BorderColor);
331
+ }
332
+ .pf-c-table.pf-m-sticky-header > .pf-m-nested-column-header tr:not(:nth-last-child(2)) th:not([rowspan]),
333
+ .pf-c-table.pf-m-sticky-header > .pf-m-nested-column-header tr:not(:nth-last-child(2)) td:not([rowspan]) {
334
+ --pf-c-table--cell--PaddingBottom: var(--pf-c-table--thead--m-nested-column-header--tr--PaddingBottom);
335
+ }
336
+ .pf-c-table:not(.pf-m-sticky-header) > .pf-m-nested-column-header tr:not(:last-child) {
337
+ border-bottom: 0;
338
+ }
339
+ .pf-c-table:not(.pf-m-sticky-header) > .pf-m-nested-column-header tr:not(:last-child) th:not([rowspan]),
340
+ .pf-c-table:not(.pf-m-sticky-header) > .pf-m-nested-column-header tr:not(:last-child) td:not([rowspan]) {
341
+ --pf-c-table--cell--PaddingBottom: var(--pf-c-table--thead--m-nested-column-header--tr--PaddingBottom);
342
+ }
320
343
  .pf-c-table.pf-m-striped:not(.pf-m-expandable) > tbody > tr:nth-child(odd), .pf-c-table.pf-m-striped.pf-m-expandable > tbody:nth-of-type(odd) > tr:not(.pf-c-table__expandable-row),
321
344
  .pf-c-table > .pf-m-striped > tr:nth-child(odd),
322
345
  .pf-c-table > .pf-m-striped-even > tr:nth-child(even),
@@ -414,13 +437,6 @@
414
437
  .pf-c-table thead.pf-m-nested-column-header tr:not(:first-child) td:not([rowspan]) {
415
438
  --pf-c-table--cell--PaddingTop: var(--pf-c-table--thead--m-nested-column-header--tr--PaddingTop);
416
439
  }
417
- .pf-c-table thead.pf-m-nested-column-header tr:not(:last-child) {
418
- --pf-c-table--border-width--base: 0;
419
- }
420
- .pf-c-table thead.pf-m-nested-column-header tr:not(:last-child) th:not([rowspan]),
421
- .pf-c-table thead.pf-m-nested-column-header tr:not(:last-child) td:not([rowspan]) {
422
- --pf-c-table--cell--PaddingBottom: var(--pf-c-table--thead--m-nested-column-header--tr--PaddingBottom);
423
- }
424
440
  .pf-c-table thead .pf-c-table__subhead {
425
441
  --pf-c-table__sort__button__text--Color: var(--pf-c-table__subhead--Color);
426
442
  color: var(--pf-c-table__subhead--Color);
@@ -330,9 +330,15 @@
330
330
  border-bottom: 0;
331
331
 
332
332
  > * {
333
+ z-index: var(--pf-global--ZIndex--xs); // set z-index here to allow sticky column to override
334
+ }
335
+ }
336
+
337
+ // standard sticky headers
338
+ > thead:not(.pf-m-nested-column-header) {
339
+ > tr > * {
333
340
  position: sticky;
334
341
  top: 0;
335
- z-index: var(--pf-global--ZIndex--xs);
336
342
  background: var(--pf-c-table--BackgroundColor);
337
343
 
338
344
  // stylelint-disable-next-line
@@ -346,6 +352,45 @@
346
352
  }
347
353
  }
348
354
  }
355
+
356
+ // nested column header
357
+ > .pf-m-nested-column-header {
358
+ position: sticky;
359
+ top: 0;
360
+ z-index: var(--pf-global--ZIndex--xs);
361
+ background: var(--pf-c-table--BackgroundColor);
362
+
363
+ > .pf-m-border-row {
364
+ height: var(--pf-c-table--border-width--base);
365
+ background-color: var(--pf-c-table--BorderColor);
366
+ }
367
+
368
+ tr:not(:nth-last-child(2)) {
369
+ // stylelint-disable max-nesting-depth
370
+ th,
371
+ td {
372
+ &:not([rowspan]) {
373
+ --pf-c-table--cell--PaddingBottom: var(--pf-c-table--thead--m-nested-column-header--tr--PaddingBottom);
374
+ }
375
+ }
376
+ // stylelint-enable
377
+ }
378
+ }
379
+ }
380
+
381
+ &:not(.pf-m-sticky-header) > .pf-m-nested-column-header {
382
+ tr:not(:last-child) {
383
+ border-bottom: 0; // hard reset tr borders in nested headers
384
+
385
+ // stylelint-disable max-nesting-depth
386
+ th,
387
+ td {
388
+ &:not([rowspan]) {
389
+ --pf-c-table--cell--PaddingBottom: var(--pf-c-table--thead--m-nested-column-header--tr--PaddingBottom);
390
+ }
391
+ }
392
+ // stylelint-enable
393
+ }
349
394
  }
350
395
 
351
396
  // For regular and expandable tables
@@ -488,16 +533,6 @@
488
533
  }
489
534
  }
490
535
 
491
- tr:not(:last-child) {
492
- --pf-c-table--border-width--base: 0; // hard reset tr borders in nested headers
493
-
494
- th,
495
- td {
496
- &:not([rowspan]) {
497
- --pf-c-table--cell--PaddingBottom: var(--pf-c-table--thead--m-nested-column-header--tr--PaddingBottom);
498
- }
499
- }
500
- }
501
536
  }
502
537
  // stylelint-enable
503
538
 
@@ -375,6 +375,27 @@ cssPrefix: pf-c-card
375
375
 
376
376
  ```
377
377
 
378
+ ### Selectable with a hidden input for improved screen reader accessibility
379
+
380
+ ```html
381
+ <input
382
+ class="pf-c-card__sr-input pf-screen-reader"
383
+ type="checkbox"
384
+ tabindex="-1"
385
+ aria-label="Checkbox to improve screen reader accessibility of a selectable card"
386
+ />
387
+ <div
388
+ class="pf-c-card pf-m-selectable-raised"
389
+ tabindex="0"
390
+ id="card-selectable-with-input-example"
391
+ >
392
+ <div class="pf-c-card__title">Title</div>
393
+ <div class="pf-c-card__body">Body</div>
394
+ <div class="pf-c-card__footer">Footer</div>
395
+ </div>
396
+
397
+ ```
398
+
378
399
  ### Non selectable
379
400
 
380
401
  ```html
@@ -886,6 +907,7 @@ A card is a generic rectangular container that can be used to build other compon
886
907
  | `.pf-c-card__actions` | `<div>` | Creates an actions element to be used in the card header. |
887
908
  | `.pf-c-card__header-main` | `<div>` | Creates a wrapper element to be used in the card header when using an image, logo, or text. |
888
909
  | `.pf-c-card__expandable-content` | `<div>` | Creates the expandable card's expandable content. |
910
+ | `.pf-c-card__sr-input` | `<input>` | Creates an input which, when focused, makes a following `.pf-c-card` appear focused. |
889
911
  | `.pf-m-compact` | `.pf-c-card` | Creates a compact variation of the card component that involves smaller font sizes and spacing. This variation is for use on dashboards and where a smaller card is preferred. |
890
912
  | `.pf-m-display-lg` | `.pf-c-card` | Creates a large variation of the card component that involves larger font sizes and spacing. This variation is for marketing use cases. |
891
913
  | `.pf-m-no-fill` | `.pf-c-card__body` | Sets a `.pf-c-card__body` to not fill the available space in `.pf-c-card`. `.pf-m-no-fill` can be added to multiple card bodies. |
@@ -470,12 +470,10 @@ cssPrefix: pf-c-progress-stepper
470
470
  </span>
471
471
  </div>
472
472
  <div class="pf-c-progress-stepper__step-main">
473
- <span
473
+ <button
474
474
  class="pf-c-progress-stepper__step-title pf-m-help-text"
475
- role="button"
476
475
  type="button"
477
- tabindex="0"
478
- >First step</span>
476
+ >First step</button>
479
477
  </div>
480
478
  </li>
481
479
  <li
@@ -488,12 +486,10 @@ cssPrefix: pf-c-progress-stepper
488
486
  </span>
489
487
  </div>
490
488
  <div class="pf-c-progress-stepper__step-main">
491
- <span
489
+ <button
492
490
  class="pf-c-progress-stepper__step-title pf-m-help-text"
493
- role="button"
494
491
  type="button"
495
- tabindex="0"
496
- >Second step</span>
492
+ >Second step</button>
497
493
  </div>
498
494
  </li>
499
495
  <li
@@ -506,12 +502,10 @@ cssPrefix: pf-c-progress-stepper
506
502
  </span>
507
503
  </div>
508
504
  <div class="pf-c-progress-stepper__step-main">
509
- <span
505
+ <button
510
506
  class="pf-c-progress-stepper__step-title pf-m-help-text"
511
- role="button"
512
507
  type="button"
513
- tabindex="0"
514
- >Third step</span>
508
+ >Third step</button>
515
509
  </div>
516
510
  </li>
517
511
  <li
@@ -555,7 +549,7 @@ Steps can be modified with `.pf-m-success`, `.pf-m-warning`, `.pf-m-danger`, and
555
549
  | `.progress-stepper__step-connector` | `<div>` | Creates the connecting line between steps **Required** |
556
550
  | `.progress-stepper__step-icon` | `<span>` | Creates the step node and contains the icon designating the type of step. This element is required, but may be empty if no icon is used for the step. **Required** |
557
551
  | `.progress-stepper__step-main` | `<div>` | Contains the main text content of the step. This element is required, but may be empty if title and description are not used. **Required** |
558
- | `.progress-stepper__step-title` | `<div>` | Contains the title of the step. |
552
+ | `.progress-stepper__step-title` | `<div>`, `<button>` | Contains the title of the step. **Note:** the step title is a `<button>` when it has `.pf-m-help-text` and is used to trigger a popover with help text. |
559
553
  | `.progress-stepper__step-description` | `<div>` | Contains the description of the step. |
560
554
  | `.pf-m-center` | `.pf-c-progress-stepper` | Modifies to center each step. |
561
555
  | `.pf-m-vertical` | `.pf-c-progress-stepper` | Modifies for vertical orientation. |