@patternfly/react-table 4.54.0 → 4.54.1
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.
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## 4.54.1 (2022-01-11)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @patternfly/react-table
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
# 4.54.0 (2022-01-11)
|
|
7
15
|
|
|
8
16
|
|
|
@@ -19323,185 +19323,6 @@ ul.pf-c-list {
|
|
|
19323
19323
|
--pf-c-pagination__total-items--Visibility: var(--pf-c-pagination--m-display-full__total-items--Visibility);
|
|
19324
19324
|
}
|
|
19325
19325
|
}
|
|
19326
|
-
.pf-c-progress {
|
|
19327
|
-
--pf-c-progress--GridGap: var(--pf-global--spacer--md);
|
|
19328
|
-
--pf-c-progress__bar--before--BackgroundColor: var(--pf-global--primary-color--100);
|
|
19329
|
-
--pf-c-progress__bar--Height: var(--pf-global--spacer--md);
|
|
19330
|
-
--pf-c-progress__bar--BackgroundColor: var(--pf-global--BackgroundColor--light-100);
|
|
19331
|
-
--pf-c-progress__measure--m-static-width--MinWidth: 4.5ch;
|
|
19332
|
-
--pf-c-progress__status-icon--Color: var(--pf-global--Color--100);
|
|
19333
|
-
--pf-c-progress__status-icon--MarginLeft: var(--pf-global--spacer--sm);
|
|
19334
|
-
--pf-c-progress__bar--before--Opacity: .2;
|
|
19335
|
-
--pf-c-progress__indicator--Height: var(--pf-c-progress__bar--Height);
|
|
19336
|
-
--pf-c-progress__indicator--BackgroundColor: var(--pf-c-progress__bar--before--BackgroundColor);
|
|
19337
|
-
--pf-c-progress--m-success__bar--BackgroundColor: var(--pf-global--success-color--100);
|
|
19338
|
-
--pf-c-progress--m-warning__bar--BackgroundColor: var(--pf-global--warning-color--100);
|
|
19339
|
-
--pf-c-progress--m-danger__bar--BackgroundColor: var(--pf-global--danger-color--100);
|
|
19340
|
-
--pf-c-progress--m-success__status-icon--Color: var(--pf-global--success-color--100);
|
|
19341
|
-
--pf-c-progress--m-warning__status-icon--Color: var(--pf-global--warning-color--100);
|
|
19342
|
-
--pf-c-progress--m-danger__status-icon--Color: var(--pf-global--danger-color--100);
|
|
19343
|
-
--pf-c-progress--m-inside__indicator--MinWidth: var(--pf-global--spacer--xl);
|
|
19344
|
-
--pf-c-progress--m-inside__measure--Color: var(--pf-global--Color--light-100);
|
|
19345
|
-
--pf-c-progress--m-success--m-inside__measure--Color: var(--pf-global--Color--light-100);
|
|
19346
|
-
--pf-c-progress--m-warning--m-inside__measure--Color: var(--pf-global--Color--dark-100);
|
|
19347
|
-
--pf-c-progress--m-inside__measure--FontSize: var(--pf-global--FontSize--sm);
|
|
19348
|
-
--pf-c-progress--m-outside__measure--FontSize: var(--pf-global--FontSize--sm);
|
|
19349
|
-
--pf-c-progress--m-sm__bar--Height: var(--pf-global--spacer--sm);
|
|
19350
|
-
--pf-c-progress--m-sm__description--FontSize: var(--pf-global--FontSize--sm);
|
|
19351
|
-
--pf-c-progress--m-sm__measure--FontSize: var(--pf-global--FontSize--sm);
|
|
19352
|
-
--pf-c-progress--m-lg__bar--Height: var(--pf-global--spacer--lg);
|
|
19353
|
-
display: grid;
|
|
19354
|
-
align-items: end;
|
|
19355
|
-
grid-gap: var(--pf-c-progress--GridGap);
|
|
19356
|
-
grid-template-columns: auto auto;
|
|
19357
|
-
grid-template-rows: 1fr auto;
|
|
19358
|
-
}
|
|
19359
|
-
|
|
19360
|
-
.pf-c-progress.pf-m-sm {
|
|
19361
|
-
--pf-c-progress__bar--Height: var(--pf-c-progress--m-sm__bar--Height);
|
|
19362
|
-
}
|
|
19363
|
-
|
|
19364
|
-
.pf-c-progress.pf-m-sm .pf-c-progress__description {
|
|
19365
|
-
font-size: var(--pf-c-progress--m-sm__description--FontSize);
|
|
19366
|
-
}
|
|
19367
|
-
|
|
19368
|
-
.pf-c-progress.pf-m-sm .pf-c-progress__measure {
|
|
19369
|
-
font-size: var(--pf-c-progress--m-sm__measure--FontSize);
|
|
19370
|
-
}
|
|
19371
|
-
|
|
19372
|
-
.pf-c-progress.pf-m-lg {
|
|
19373
|
-
--pf-c-progress__bar--Height: var(--pf-c-progress--m-lg__bar--Height);
|
|
19374
|
-
}
|
|
19375
|
-
|
|
19376
|
-
.pf-c-progress.pf-m-inside .pf-c-progress__indicator {
|
|
19377
|
-
display: flex;
|
|
19378
|
-
align-items: center;
|
|
19379
|
-
justify-content: center;
|
|
19380
|
-
min-width: var(--pf-c-progress--m-inside__indicator--MinWidth);
|
|
19381
|
-
}
|
|
19382
|
-
|
|
19383
|
-
.pf-c-progress.pf-m-inside .pf-c-progress__measure {
|
|
19384
|
-
font-size: var(--pf-c-progress--m-inside__measure--FontSize);
|
|
19385
|
-
color: var(--pf-c-progress--m-inside__measure--Color);
|
|
19386
|
-
text-align: center;
|
|
19387
|
-
}
|
|
19388
|
-
|
|
19389
|
-
.pf-c-progress.pf-m-outside .pf-c-progress__description {
|
|
19390
|
-
grid-column: 1/3;
|
|
19391
|
-
}
|
|
19392
|
-
|
|
19393
|
-
.pf-c-progress.pf-m-outside .pf-c-progress__status {
|
|
19394
|
-
grid-column: 2/3;
|
|
19395
|
-
grid-row: 2/3;
|
|
19396
|
-
align-self: center;
|
|
19397
|
-
}
|
|
19398
|
-
|
|
19399
|
-
.pf-c-progress.pf-m-outside .pf-c-progress__measure {
|
|
19400
|
-
display: inline-block;
|
|
19401
|
-
font-size: var(--pf-c-progress--m-outside__measure--FontSize);
|
|
19402
|
-
}
|
|
19403
|
-
|
|
19404
|
-
.pf-c-progress.pf-m-outside .pf-c-progress__measure.pf-m-static-width {
|
|
19405
|
-
min-width: var(--pf-c-progress__measure--m-static-width--MinWidth);
|
|
19406
|
-
text-align: left;
|
|
19407
|
-
}
|
|
19408
|
-
|
|
19409
|
-
.pf-c-progress.pf-m-outside .pf-c-progress__bar,
|
|
19410
|
-
.pf-c-progress.pf-m-outside .pf-c-progress__indicator {
|
|
19411
|
-
grid-column: 1/2;
|
|
19412
|
-
}
|
|
19413
|
-
|
|
19414
|
-
.pf-c-progress.pf-m-singleline {
|
|
19415
|
-
grid-template-rows: 1fr;
|
|
19416
|
-
}
|
|
19417
|
-
|
|
19418
|
-
.pf-c-progress.pf-m-singleline .pf-c-progress__description {
|
|
19419
|
-
display: none;
|
|
19420
|
-
visibility: hidden;
|
|
19421
|
-
}
|
|
19422
|
-
|
|
19423
|
-
.pf-c-progress.pf-m-singleline .pf-c-progress__bar {
|
|
19424
|
-
grid-row: 1/2;
|
|
19425
|
-
grid-column: 1/2;
|
|
19426
|
-
}
|
|
19427
|
-
|
|
19428
|
-
.pf-c-progress.pf-m-singleline .pf-c-progress__status {
|
|
19429
|
-
grid-row: 1/2;
|
|
19430
|
-
grid-column: 2/3;
|
|
19431
|
-
}
|
|
19432
|
-
|
|
19433
|
-
.pf-c-progress.pf-m-outside, .pf-c-progress.pf-m-singleline {
|
|
19434
|
-
grid-template-columns: 1fr fit-content(50%);
|
|
19435
|
-
}
|
|
19436
|
-
|
|
19437
|
-
.pf-c-progress.pf-m-success {
|
|
19438
|
-
--pf-c-progress__bar--before--BackgroundColor: var(--pf-c-progress--m-success__bar--BackgroundColor);
|
|
19439
|
-
--pf-c-progress__status-icon--Color: var(--pf-c-progress--m-success__status-icon--Color);
|
|
19440
|
-
--pf-c-progress--m-inside__measure--Color: var(--pf-c-progress--m-success--m-inside__measure--Color);
|
|
19441
|
-
}
|
|
19442
|
-
|
|
19443
|
-
.pf-c-progress.pf-m-warning {
|
|
19444
|
-
--pf-c-progress__bar--before--BackgroundColor: var(--pf-c-progress--m-warning__bar--BackgroundColor);
|
|
19445
|
-
--pf-c-progress__status-icon--Color: var(--pf-c-progress--m-warning__status-icon--Color);
|
|
19446
|
-
--pf-c-progress--m-inside__measure--Color: var(--pf-c-progress--m-warning--m-inside__measure--Color);
|
|
19447
|
-
}
|
|
19448
|
-
|
|
19449
|
-
.pf-c-progress.pf-m-danger {
|
|
19450
|
-
--pf-c-progress__bar--before--BackgroundColor: var(--pf-c-progress--m-danger__bar--BackgroundColor);
|
|
19451
|
-
--pf-c-progress__status-icon--Color: var(--pf-c-progress--m-danger__status-icon--Color);
|
|
19452
|
-
}
|
|
19453
|
-
|
|
19454
|
-
.pf-c-progress__description {
|
|
19455
|
-
word-break: break-word;
|
|
19456
|
-
grid-column: 1/2;
|
|
19457
|
-
}
|
|
19458
|
-
|
|
19459
|
-
.pf-c-progress__description.pf-m-truncate {
|
|
19460
|
-
overflow: hidden;
|
|
19461
|
-
text-overflow: ellipsis;
|
|
19462
|
-
white-space: nowrap;
|
|
19463
|
-
}
|
|
19464
|
-
|
|
19465
|
-
.pf-c-progress__status {
|
|
19466
|
-
grid-column: 2/3;
|
|
19467
|
-
grid-row: 1/2;
|
|
19468
|
-
text-align: right;
|
|
19469
|
-
word-break: break-word;
|
|
19470
|
-
}
|
|
19471
|
-
|
|
19472
|
-
.pf-c-progress__status-icon {
|
|
19473
|
-
margin-left: var(--pf-c-progress__status-icon--MarginLeft);
|
|
19474
|
-
color: var(--pf-c-progress__status-icon--Color);
|
|
19475
|
-
}
|
|
19476
|
-
|
|
19477
|
-
.pf-c-progress__bar {
|
|
19478
|
-
position: relative;
|
|
19479
|
-
grid-column: 1/3;
|
|
19480
|
-
grid-row: 2/3;
|
|
19481
|
-
align-self: center;
|
|
19482
|
-
height: var(--pf-c-progress__bar--Height);
|
|
19483
|
-
background-color: var(--pf-c-progress__bar--BackgroundColor);
|
|
19484
|
-
}
|
|
19485
|
-
|
|
19486
|
-
.pf-c-progress__bar::before {
|
|
19487
|
-
position: absolute;
|
|
19488
|
-
top: 0;
|
|
19489
|
-
left: 0;
|
|
19490
|
-
width: 100%;
|
|
19491
|
-
height: 100%;
|
|
19492
|
-
content: "";
|
|
19493
|
-
background-color: var(--pf-c-progress__bar--before--BackgroundColor);
|
|
19494
|
-
opacity: var(--pf-c-progress__bar--before--Opacity);
|
|
19495
|
-
}
|
|
19496
|
-
|
|
19497
|
-
.pf-c-progress__indicator {
|
|
19498
|
-
position: absolute;
|
|
19499
|
-
top: 0;
|
|
19500
|
-
left: 0;
|
|
19501
|
-
height: var(--pf-c-progress__indicator--Height);
|
|
19502
|
-
background-color: var(--pf-c-progress__indicator--BackgroundColor);
|
|
19503
|
-
}
|
|
19504
|
-
|
|
19505
19326
|
.pf-c-popover {
|
|
19506
19327
|
--pf-c-popover--FontSize: var(--pf-global--FontSize--sm);
|
|
19507
19328
|
--pf-c-popover--MinWidth: calc(var(--pf-c-popover__content--PaddingLeft) + var(--pf-c-popover__content--PaddingRight) + 18.75rem);
|
|
@@ -19694,6 +19515,185 @@ ul.pf-c-list {
|
|
|
19694
19515
|
margin-top: var(--pf-c-popover__footer--MarginTop);
|
|
19695
19516
|
}
|
|
19696
19517
|
|
|
19518
|
+
.pf-c-progress {
|
|
19519
|
+
--pf-c-progress--GridGap: var(--pf-global--spacer--md);
|
|
19520
|
+
--pf-c-progress__bar--before--BackgroundColor: var(--pf-global--primary-color--100);
|
|
19521
|
+
--pf-c-progress__bar--Height: var(--pf-global--spacer--md);
|
|
19522
|
+
--pf-c-progress__bar--BackgroundColor: var(--pf-global--BackgroundColor--light-100);
|
|
19523
|
+
--pf-c-progress__measure--m-static-width--MinWidth: 4.5ch;
|
|
19524
|
+
--pf-c-progress__status-icon--Color: var(--pf-global--Color--100);
|
|
19525
|
+
--pf-c-progress__status-icon--MarginLeft: var(--pf-global--spacer--sm);
|
|
19526
|
+
--pf-c-progress__bar--before--Opacity: .2;
|
|
19527
|
+
--pf-c-progress__indicator--Height: var(--pf-c-progress__bar--Height);
|
|
19528
|
+
--pf-c-progress__indicator--BackgroundColor: var(--pf-c-progress__bar--before--BackgroundColor);
|
|
19529
|
+
--pf-c-progress--m-success__bar--BackgroundColor: var(--pf-global--success-color--100);
|
|
19530
|
+
--pf-c-progress--m-warning__bar--BackgroundColor: var(--pf-global--warning-color--100);
|
|
19531
|
+
--pf-c-progress--m-danger__bar--BackgroundColor: var(--pf-global--danger-color--100);
|
|
19532
|
+
--pf-c-progress--m-success__status-icon--Color: var(--pf-global--success-color--100);
|
|
19533
|
+
--pf-c-progress--m-warning__status-icon--Color: var(--pf-global--warning-color--100);
|
|
19534
|
+
--pf-c-progress--m-danger__status-icon--Color: var(--pf-global--danger-color--100);
|
|
19535
|
+
--pf-c-progress--m-inside__indicator--MinWidth: var(--pf-global--spacer--xl);
|
|
19536
|
+
--pf-c-progress--m-inside__measure--Color: var(--pf-global--Color--light-100);
|
|
19537
|
+
--pf-c-progress--m-success--m-inside__measure--Color: var(--pf-global--Color--light-100);
|
|
19538
|
+
--pf-c-progress--m-warning--m-inside__measure--Color: var(--pf-global--Color--dark-100);
|
|
19539
|
+
--pf-c-progress--m-inside__measure--FontSize: var(--pf-global--FontSize--sm);
|
|
19540
|
+
--pf-c-progress--m-outside__measure--FontSize: var(--pf-global--FontSize--sm);
|
|
19541
|
+
--pf-c-progress--m-sm__bar--Height: var(--pf-global--spacer--sm);
|
|
19542
|
+
--pf-c-progress--m-sm__description--FontSize: var(--pf-global--FontSize--sm);
|
|
19543
|
+
--pf-c-progress--m-sm__measure--FontSize: var(--pf-global--FontSize--sm);
|
|
19544
|
+
--pf-c-progress--m-lg__bar--Height: var(--pf-global--spacer--lg);
|
|
19545
|
+
display: grid;
|
|
19546
|
+
align-items: end;
|
|
19547
|
+
grid-gap: var(--pf-c-progress--GridGap);
|
|
19548
|
+
grid-template-columns: auto auto;
|
|
19549
|
+
grid-template-rows: 1fr auto;
|
|
19550
|
+
}
|
|
19551
|
+
|
|
19552
|
+
.pf-c-progress.pf-m-sm {
|
|
19553
|
+
--pf-c-progress__bar--Height: var(--pf-c-progress--m-sm__bar--Height);
|
|
19554
|
+
}
|
|
19555
|
+
|
|
19556
|
+
.pf-c-progress.pf-m-sm .pf-c-progress__description {
|
|
19557
|
+
font-size: var(--pf-c-progress--m-sm__description--FontSize);
|
|
19558
|
+
}
|
|
19559
|
+
|
|
19560
|
+
.pf-c-progress.pf-m-sm .pf-c-progress__measure {
|
|
19561
|
+
font-size: var(--pf-c-progress--m-sm__measure--FontSize);
|
|
19562
|
+
}
|
|
19563
|
+
|
|
19564
|
+
.pf-c-progress.pf-m-lg {
|
|
19565
|
+
--pf-c-progress__bar--Height: var(--pf-c-progress--m-lg__bar--Height);
|
|
19566
|
+
}
|
|
19567
|
+
|
|
19568
|
+
.pf-c-progress.pf-m-inside .pf-c-progress__indicator {
|
|
19569
|
+
display: flex;
|
|
19570
|
+
align-items: center;
|
|
19571
|
+
justify-content: center;
|
|
19572
|
+
min-width: var(--pf-c-progress--m-inside__indicator--MinWidth);
|
|
19573
|
+
}
|
|
19574
|
+
|
|
19575
|
+
.pf-c-progress.pf-m-inside .pf-c-progress__measure {
|
|
19576
|
+
font-size: var(--pf-c-progress--m-inside__measure--FontSize);
|
|
19577
|
+
color: var(--pf-c-progress--m-inside__measure--Color);
|
|
19578
|
+
text-align: center;
|
|
19579
|
+
}
|
|
19580
|
+
|
|
19581
|
+
.pf-c-progress.pf-m-outside .pf-c-progress__description {
|
|
19582
|
+
grid-column: 1/3;
|
|
19583
|
+
}
|
|
19584
|
+
|
|
19585
|
+
.pf-c-progress.pf-m-outside .pf-c-progress__status {
|
|
19586
|
+
grid-column: 2/3;
|
|
19587
|
+
grid-row: 2/3;
|
|
19588
|
+
align-self: center;
|
|
19589
|
+
}
|
|
19590
|
+
|
|
19591
|
+
.pf-c-progress.pf-m-outside .pf-c-progress__measure {
|
|
19592
|
+
display: inline-block;
|
|
19593
|
+
font-size: var(--pf-c-progress--m-outside__measure--FontSize);
|
|
19594
|
+
}
|
|
19595
|
+
|
|
19596
|
+
.pf-c-progress.pf-m-outside .pf-c-progress__measure.pf-m-static-width {
|
|
19597
|
+
min-width: var(--pf-c-progress__measure--m-static-width--MinWidth);
|
|
19598
|
+
text-align: left;
|
|
19599
|
+
}
|
|
19600
|
+
|
|
19601
|
+
.pf-c-progress.pf-m-outside .pf-c-progress__bar,
|
|
19602
|
+
.pf-c-progress.pf-m-outside .pf-c-progress__indicator {
|
|
19603
|
+
grid-column: 1/2;
|
|
19604
|
+
}
|
|
19605
|
+
|
|
19606
|
+
.pf-c-progress.pf-m-singleline {
|
|
19607
|
+
grid-template-rows: 1fr;
|
|
19608
|
+
}
|
|
19609
|
+
|
|
19610
|
+
.pf-c-progress.pf-m-singleline .pf-c-progress__description {
|
|
19611
|
+
display: none;
|
|
19612
|
+
visibility: hidden;
|
|
19613
|
+
}
|
|
19614
|
+
|
|
19615
|
+
.pf-c-progress.pf-m-singleline .pf-c-progress__bar {
|
|
19616
|
+
grid-row: 1/2;
|
|
19617
|
+
grid-column: 1/2;
|
|
19618
|
+
}
|
|
19619
|
+
|
|
19620
|
+
.pf-c-progress.pf-m-singleline .pf-c-progress__status {
|
|
19621
|
+
grid-row: 1/2;
|
|
19622
|
+
grid-column: 2/3;
|
|
19623
|
+
}
|
|
19624
|
+
|
|
19625
|
+
.pf-c-progress.pf-m-outside, .pf-c-progress.pf-m-singleline {
|
|
19626
|
+
grid-template-columns: 1fr fit-content(50%);
|
|
19627
|
+
}
|
|
19628
|
+
|
|
19629
|
+
.pf-c-progress.pf-m-success {
|
|
19630
|
+
--pf-c-progress__bar--before--BackgroundColor: var(--pf-c-progress--m-success__bar--BackgroundColor);
|
|
19631
|
+
--pf-c-progress__status-icon--Color: var(--pf-c-progress--m-success__status-icon--Color);
|
|
19632
|
+
--pf-c-progress--m-inside__measure--Color: var(--pf-c-progress--m-success--m-inside__measure--Color);
|
|
19633
|
+
}
|
|
19634
|
+
|
|
19635
|
+
.pf-c-progress.pf-m-warning {
|
|
19636
|
+
--pf-c-progress__bar--before--BackgroundColor: var(--pf-c-progress--m-warning__bar--BackgroundColor);
|
|
19637
|
+
--pf-c-progress__status-icon--Color: var(--pf-c-progress--m-warning__status-icon--Color);
|
|
19638
|
+
--pf-c-progress--m-inside__measure--Color: var(--pf-c-progress--m-warning--m-inside__measure--Color);
|
|
19639
|
+
}
|
|
19640
|
+
|
|
19641
|
+
.pf-c-progress.pf-m-danger {
|
|
19642
|
+
--pf-c-progress__bar--before--BackgroundColor: var(--pf-c-progress--m-danger__bar--BackgroundColor);
|
|
19643
|
+
--pf-c-progress__status-icon--Color: var(--pf-c-progress--m-danger__status-icon--Color);
|
|
19644
|
+
}
|
|
19645
|
+
|
|
19646
|
+
.pf-c-progress__description {
|
|
19647
|
+
word-break: break-word;
|
|
19648
|
+
grid-column: 1/2;
|
|
19649
|
+
}
|
|
19650
|
+
|
|
19651
|
+
.pf-c-progress__description.pf-m-truncate {
|
|
19652
|
+
overflow: hidden;
|
|
19653
|
+
text-overflow: ellipsis;
|
|
19654
|
+
white-space: nowrap;
|
|
19655
|
+
}
|
|
19656
|
+
|
|
19657
|
+
.pf-c-progress__status {
|
|
19658
|
+
grid-column: 2/3;
|
|
19659
|
+
grid-row: 1/2;
|
|
19660
|
+
text-align: right;
|
|
19661
|
+
word-break: break-word;
|
|
19662
|
+
}
|
|
19663
|
+
|
|
19664
|
+
.pf-c-progress__status-icon {
|
|
19665
|
+
margin-left: var(--pf-c-progress__status-icon--MarginLeft);
|
|
19666
|
+
color: var(--pf-c-progress__status-icon--Color);
|
|
19667
|
+
}
|
|
19668
|
+
|
|
19669
|
+
.pf-c-progress__bar {
|
|
19670
|
+
position: relative;
|
|
19671
|
+
grid-column: 1/3;
|
|
19672
|
+
grid-row: 2/3;
|
|
19673
|
+
align-self: center;
|
|
19674
|
+
height: var(--pf-c-progress__bar--Height);
|
|
19675
|
+
background-color: var(--pf-c-progress__bar--BackgroundColor);
|
|
19676
|
+
}
|
|
19677
|
+
|
|
19678
|
+
.pf-c-progress__bar::before {
|
|
19679
|
+
position: absolute;
|
|
19680
|
+
top: 0;
|
|
19681
|
+
left: 0;
|
|
19682
|
+
width: 100%;
|
|
19683
|
+
height: 100%;
|
|
19684
|
+
content: "";
|
|
19685
|
+
background-color: var(--pf-c-progress__bar--before--BackgroundColor);
|
|
19686
|
+
opacity: var(--pf-c-progress__bar--before--Opacity);
|
|
19687
|
+
}
|
|
19688
|
+
|
|
19689
|
+
.pf-c-progress__indicator {
|
|
19690
|
+
position: absolute;
|
|
19691
|
+
top: 0;
|
|
19692
|
+
left: 0;
|
|
19693
|
+
height: var(--pf-c-progress__indicator--Height);
|
|
19694
|
+
background-color: var(--pf-c-progress__indicator--BackgroundColor);
|
|
19695
|
+
}
|
|
19696
|
+
|
|
19697
19697
|
.pf-c-progress-stepper {
|
|
19698
19698
|
--pf-c-progress-stepper--GridAutoFlow: column;
|
|
19699
19699
|
--pf-c-progress-stepper--GridTemplateRows: auto 1fr;
|
|
@@ -27752,6 +27752,75 @@ label.pf-c-radio, .pf-c-radio__label,
|
|
|
27752
27752
|
--pf-l-flex--spacer: var(--pf-l-flex--spacer--4xl);
|
|
27753
27753
|
}
|
|
27754
27754
|
}
|
|
27755
|
+
.pf-l-gallery {
|
|
27756
|
+
--pf-l-gallery--m-gutter--GridGap: var(--pf-global--gutter);
|
|
27757
|
+
--pf-l-gallery--GridTemplateColumns--min: 250px;
|
|
27758
|
+
--pf-l-gallery--GridTemplateColumns--minmax--min: var(--pf-l-gallery--GridTemplateColumns--min);
|
|
27759
|
+
--pf-l-gallery--GridTemplateColumns--max: 1fr;
|
|
27760
|
+
--pf-l-gallery--GridTemplateColumns--minmax--max: var(--pf-l-gallery--GridTemplateColumns--max);
|
|
27761
|
+
--pf-l-gallery--GridTemplateColumns: repeat(auto-fill, minmax(var(--pf-l-gallery--GridTemplateColumns--minmax--min), var(--pf-l-gallery--GridTemplateColumns--minmax--max)));
|
|
27762
|
+
--pf-l-gallery--GridTemplateRows: auto;
|
|
27763
|
+
display: grid;
|
|
27764
|
+
grid-template-columns: var(--pf-l-gallery--GridTemplateColumns);
|
|
27765
|
+
grid-template-rows: var(--pf-l-gallery--GridTemplateRows);
|
|
27766
|
+
--pf-l-gallery--GridTemplateColumns--minmax--min: var(--pf-l-gallery--GridTemplateColumns--min);
|
|
27767
|
+
--pf-l-gallery--GridTemplateColumns--minmax--max: var(--pf-l-gallery--GridTemplateColumns--max);
|
|
27768
|
+
}
|
|
27769
|
+
|
|
27770
|
+
.pf-l-gallery.pf-m-gutter {
|
|
27771
|
+
grid-gap: var(--pf-l-gallery--m-gutter--GridGap);
|
|
27772
|
+
}
|
|
27773
|
+
|
|
27774
|
+
@media (min-width: 576px) {
|
|
27775
|
+
.pf-l-gallery {
|
|
27776
|
+
--pf-l-gallery--GridTemplateColumns--minmax--min: var(--pf-l-gallery--GridTemplateColumns--min-on-sm, var(--pf-l-gallery--GridTemplateColumns--min));
|
|
27777
|
+
}
|
|
27778
|
+
}
|
|
27779
|
+
@media (min-width: 768px) {
|
|
27780
|
+
.pf-l-gallery {
|
|
27781
|
+
--pf-l-gallery--GridTemplateColumns--minmax--min: var(--pf-l-gallery--GridTemplateColumns--min-on-md, var(--pf-l-gallery--GridTemplateColumns--min-on-sm, var(--pf-l-gallery--GridTemplateColumns--min)));
|
|
27782
|
+
}
|
|
27783
|
+
}
|
|
27784
|
+
@media (min-width: 992px) {
|
|
27785
|
+
.pf-l-gallery {
|
|
27786
|
+
--pf-l-gallery--GridTemplateColumns--minmax--min: var(--pf-l-gallery--GridTemplateColumns--min-on-lg, var(--pf-l-gallery--GridTemplateColumns--min-on-md, var(--pf-l-gallery--GridTemplateColumns--min-on-sm, var(--pf-l-gallery--GridTemplateColumns--min))));
|
|
27787
|
+
}
|
|
27788
|
+
}
|
|
27789
|
+
@media (min-width: 1200px) {
|
|
27790
|
+
.pf-l-gallery {
|
|
27791
|
+
--pf-l-gallery--GridTemplateColumns--minmax--min: var(--pf-l-gallery--GridTemplateColumns--min-on-xl, var(--pf-l-gallery--GridTemplateColumns--min-on-lg, var(--pf-l-gallery--GridTemplateColumns--min-on-md, var(--pf-l-gallery--GridTemplateColumns--min-on-sm, var(--pf-l-gallery--GridTemplateColumns--min)))));
|
|
27792
|
+
}
|
|
27793
|
+
}
|
|
27794
|
+
@media (min-width: 1450px) {
|
|
27795
|
+
.pf-l-gallery {
|
|
27796
|
+
--pf-l-gallery--GridTemplateColumns--minmax--min: var(--pf-l-gallery--GridTemplateColumns--min-on-2xl, var(--pf-l-gallery--GridTemplateColumns--min-on-xl, var(--pf-l-gallery--GridTemplateColumns--min-on-lg, var(--pf-l-gallery--GridTemplateColumns--min-on-md, var(--pf-l-gallery--GridTemplateColumns--min-on-sm, var(--pf-l-gallery--GridTemplateColumns--min))))));
|
|
27797
|
+
}
|
|
27798
|
+
}
|
|
27799
|
+
@media (min-width: 576px) {
|
|
27800
|
+
.pf-l-gallery {
|
|
27801
|
+
--pf-l-gallery--GridTemplateColumns--minmax--max: var(--pf-l-gallery--GridTemplateColumns--max-on-sm, var(--pf-l-gallery--GridTemplateColumns--max));
|
|
27802
|
+
}
|
|
27803
|
+
}
|
|
27804
|
+
@media (min-width: 768px) {
|
|
27805
|
+
.pf-l-gallery {
|
|
27806
|
+
--pf-l-gallery--GridTemplateColumns--minmax--max: var(--pf-l-gallery--GridTemplateColumns--max-on-md, var(--pf-l-gallery--GridTemplateColumns--max-on-sm, var(--pf-l-gallery--GridTemplateColumns--max)));
|
|
27807
|
+
}
|
|
27808
|
+
}
|
|
27809
|
+
@media (min-width: 992px) {
|
|
27810
|
+
.pf-l-gallery {
|
|
27811
|
+
--pf-l-gallery--GridTemplateColumns--minmax--max: var(--pf-l-gallery--GridTemplateColumns--max-on-lg, var(--pf-l-gallery--GridTemplateColumns--max-on-md, var(--pf-l-gallery--GridTemplateColumns--max-on-sm, var(--pf-l-gallery--GridTemplateColumns--max))));
|
|
27812
|
+
}
|
|
27813
|
+
}
|
|
27814
|
+
@media (min-width: 1200px) {
|
|
27815
|
+
.pf-l-gallery {
|
|
27816
|
+
--pf-l-gallery--GridTemplateColumns--minmax--max: var(--pf-l-gallery--GridTemplateColumns--max-on-xl, var(--pf-l-gallery--GridTemplateColumns--max-on-lg, var(--pf-l-gallery--GridTemplateColumns--max-on-md, var(--pf-l-gallery--GridTemplateColumns--max-on-sm, var(--pf-l-gallery--GridTemplateColumns--max)))));
|
|
27817
|
+
}
|
|
27818
|
+
}
|
|
27819
|
+
@media (min-width: 1450px) {
|
|
27820
|
+
.pf-l-gallery {
|
|
27821
|
+
--pf-l-gallery--GridTemplateColumns--minmax--max: var(--pf-l-gallery--GridTemplateColumns--max-on-2xl, var(--pf-l-gallery--GridTemplateColumns--max-on-xl, var(--pf-l-gallery--GridTemplateColumns--max-on-lg, var(--pf-l-gallery--GridTemplateColumns--max-on-md, var(--pf-l-gallery--GridTemplateColumns--max-on-sm, var(--pf-l-gallery--GridTemplateColumns--max))))));
|
|
27822
|
+
}
|
|
27823
|
+
}
|
|
27755
27824
|
.pf-l-grid {
|
|
27756
27825
|
--pf-l-grid--m-gutter--GridGap: var(--pf-global--gutter);
|
|
27757
27826
|
--pf-l-grid__item--GridColumnStart: auto;
|
|
@@ -28966,75 +29035,6 @@ label.pf-c-radio, .pf-c-radio__label,
|
|
|
28966
29035
|
grid-gap: var(--pf-l-grid--m-gutter--GridGap);
|
|
28967
29036
|
}
|
|
28968
29037
|
|
|
28969
|
-
.pf-l-gallery {
|
|
28970
|
-
--pf-l-gallery--m-gutter--GridGap: var(--pf-global--gutter);
|
|
28971
|
-
--pf-l-gallery--GridTemplateColumns--min: 250px;
|
|
28972
|
-
--pf-l-gallery--GridTemplateColumns--minmax--min: var(--pf-l-gallery--GridTemplateColumns--min);
|
|
28973
|
-
--pf-l-gallery--GridTemplateColumns--max: 1fr;
|
|
28974
|
-
--pf-l-gallery--GridTemplateColumns--minmax--max: var(--pf-l-gallery--GridTemplateColumns--max);
|
|
28975
|
-
--pf-l-gallery--GridTemplateColumns: repeat(auto-fill, minmax(var(--pf-l-gallery--GridTemplateColumns--minmax--min), var(--pf-l-gallery--GridTemplateColumns--minmax--max)));
|
|
28976
|
-
--pf-l-gallery--GridTemplateRows: auto;
|
|
28977
|
-
display: grid;
|
|
28978
|
-
grid-template-columns: var(--pf-l-gallery--GridTemplateColumns);
|
|
28979
|
-
grid-template-rows: var(--pf-l-gallery--GridTemplateRows);
|
|
28980
|
-
--pf-l-gallery--GridTemplateColumns--minmax--min: var(--pf-l-gallery--GridTemplateColumns--min);
|
|
28981
|
-
--pf-l-gallery--GridTemplateColumns--minmax--max: var(--pf-l-gallery--GridTemplateColumns--max);
|
|
28982
|
-
}
|
|
28983
|
-
|
|
28984
|
-
.pf-l-gallery.pf-m-gutter {
|
|
28985
|
-
grid-gap: var(--pf-l-gallery--m-gutter--GridGap);
|
|
28986
|
-
}
|
|
28987
|
-
|
|
28988
|
-
@media (min-width: 576px) {
|
|
28989
|
-
.pf-l-gallery {
|
|
28990
|
-
--pf-l-gallery--GridTemplateColumns--minmax--min: var(--pf-l-gallery--GridTemplateColumns--min-on-sm, var(--pf-l-gallery--GridTemplateColumns--min));
|
|
28991
|
-
}
|
|
28992
|
-
}
|
|
28993
|
-
@media (min-width: 768px) {
|
|
28994
|
-
.pf-l-gallery {
|
|
28995
|
-
--pf-l-gallery--GridTemplateColumns--minmax--min: var(--pf-l-gallery--GridTemplateColumns--min-on-md, var(--pf-l-gallery--GridTemplateColumns--min-on-sm, var(--pf-l-gallery--GridTemplateColumns--min)));
|
|
28996
|
-
}
|
|
28997
|
-
}
|
|
28998
|
-
@media (min-width: 992px) {
|
|
28999
|
-
.pf-l-gallery {
|
|
29000
|
-
--pf-l-gallery--GridTemplateColumns--minmax--min: var(--pf-l-gallery--GridTemplateColumns--min-on-lg, var(--pf-l-gallery--GridTemplateColumns--min-on-md, var(--pf-l-gallery--GridTemplateColumns--min-on-sm, var(--pf-l-gallery--GridTemplateColumns--min))));
|
|
29001
|
-
}
|
|
29002
|
-
}
|
|
29003
|
-
@media (min-width: 1200px) {
|
|
29004
|
-
.pf-l-gallery {
|
|
29005
|
-
--pf-l-gallery--GridTemplateColumns--minmax--min: var(--pf-l-gallery--GridTemplateColumns--min-on-xl, var(--pf-l-gallery--GridTemplateColumns--min-on-lg, var(--pf-l-gallery--GridTemplateColumns--min-on-md, var(--pf-l-gallery--GridTemplateColumns--min-on-sm, var(--pf-l-gallery--GridTemplateColumns--min)))));
|
|
29006
|
-
}
|
|
29007
|
-
}
|
|
29008
|
-
@media (min-width: 1450px) {
|
|
29009
|
-
.pf-l-gallery {
|
|
29010
|
-
--pf-l-gallery--GridTemplateColumns--minmax--min: var(--pf-l-gallery--GridTemplateColumns--min-on-2xl, var(--pf-l-gallery--GridTemplateColumns--min-on-xl, var(--pf-l-gallery--GridTemplateColumns--min-on-lg, var(--pf-l-gallery--GridTemplateColumns--min-on-md, var(--pf-l-gallery--GridTemplateColumns--min-on-sm, var(--pf-l-gallery--GridTemplateColumns--min))))));
|
|
29011
|
-
}
|
|
29012
|
-
}
|
|
29013
|
-
@media (min-width: 576px) {
|
|
29014
|
-
.pf-l-gallery {
|
|
29015
|
-
--pf-l-gallery--GridTemplateColumns--minmax--max: var(--pf-l-gallery--GridTemplateColumns--max-on-sm, var(--pf-l-gallery--GridTemplateColumns--max));
|
|
29016
|
-
}
|
|
29017
|
-
}
|
|
29018
|
-
@media (min-width: 768px) {
|
|
29019
|
-
.pf-l-gallery {
|
|
29020
|
-
--pf-l-gallery--GridTemplateColumns--minmax--max: var(--pf-l-gallery--GridTemplateColumns--max-on-md, var(--pf-l-gallery--GridTemplateColumns--max-on-sm, var(--pf-l-gallery--GridTemplateColumns--max)));
|
|
29021
|
-
}
|
|
29022
|
-
}
|
|
29023
|
-
@media (min-width: 992px) {
|
|
29024
|
-
.pf-l-gallery {
|
|
29025
|
-
--pf-l-gallery--GridTemplateColumns--minmax--max: var(--pf-l-gallery--GridTemplateColumns--max-on-lg, var(--pf-l-gallery--GridTemplateColumns--max-on-md, var(--pf-l-gallery--GridTemplateColumns--max-on-sm, var(--pf-l-gallery--GridTemplateColumns--max))));
|
|
29026
|
-
}
|
|
29027
|
-
}
|
|
29028
|
-
@media (min-width: 1200px) {
|
|
29029
|
-
.pf-l-gallery {
|
|
29030
|
-
--pf-l-gallery--GridTemplateColumns--minmax--max: var(--pf-l-gallery--GridTemplateColumns--max-on-xl, var(--pf-l-gallery--GridTemplateColumns--max-on-lg, var(--pf-l-gallery--GridTemplateColumns--max-on-md, var(--pf-l-gallery--GridTemplateColumns--max-on-sm, var(--pf-l-gallery--GridTemplateColumns--max)))));
|
|
29031
|
-
}
|
|
29032
|
-
}
|
|
29033
|
-
@media (min-width: 1450px) {
|
|
29034
|
-
.pf-l-gallery {
|
|
29035
|
-
--pf-l-gallery--GridTemplateColumns--minmax--max: var(--pf-l-gallery--GridTemplateColumns--max-on-2xl, var(--pf-l-gallery--GridTemplateColumns--max-on-xl, var(--pf-l-gallery--GridTemplateColumns--max-on-lg, var(--pf-l-gallery--GridTemplateColumns--max-on-md, var(--pf-l-gallery--GridTemplateColumns--max-on-sm, var(--pf-l-gallery--GridTemplateColumns--max))))));
|
|
29036
|
-
}
|
|
29037
|
-
}
|
|
29038
29038
|
.pf-l-level {
|
|
29039
29039
|
--pf-l-level--m-gutter--MarginRight: var(--pf-global--gutter);
|
|
29040
29040
|
display: flex;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@patternfly/react-table",
|
|
3
|
-
"version": "4.54.
|
|
3
|
+
"version": "4.54.1",
|
|
4
4
|
"description": "This library provides a set of React table components for use with the PatternFly 4",
|
|
5
5
|
"main": "dist/js/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -31,10 +31,10 @@
|
|
|
31
31
|
"clean": "rimraf dist"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@patternfly/react-core": "^4.185.
|
|
35
|
-
"@patternfly/react-icons": "^4.36.
|
|
36
|
-
"@patternfly/react-styles": "^4.35.
|
|
37
|
-
"@patternfly/react-tokens": "^4.37.
|
|
34
|
+
"@patternfly/react-core": "^4.185.1",
|
|
35
|
+
"@patternfly/react-icons": "^4.36.1",
|
|
36
|
+
"@patternfly/react-styles": "^4.35.1",
|
|
37
|
+
"@patternfly/react-tokens": "^4.37.1",
|
|
38
38
|
"lodash": "^4.17.19",
|
|
39
39
|
"tslib": "^2.0.0"
|
|
40
40
|
},
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"react": "^16.8.0 || ^17.0.0",
|
|
47
47
|
"react-dom": "^16.8.0 || ^17.0.0"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "430fd806b786f8869adfd434ea94b1e3b272d833"
|
|
50
50
|
}
|
|
@@ -344,3 +344,8 @@ The second `Tr` represents the second level of sub columns. The `Th` in this row
|
|
|
344
344
|
|
|
345
345
|
```ts file="ComposableTableNestedExpandable.tsx"
|
|
346
346
|
```
|
|
347
|
+
|
|
348
|
+
### Composable: Expandable with nested table
|
|
349
|
+
|
|
350
|
+
```ts file="ComposableTableNestedTableExpandable.tsx"
|
|
351
|
+
```
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
/* eslint-disable no-console */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import {
|
|
4
|
+
TableComposable,
|
|
5
|
+
Thead,
|
|
6
|
+
Tr,
|
|
7
|
+
Th,
|
|
8
|
+
Tbody,
|
|
9
|
+
Td,
|
|
10
|
+
ExpandableRowContent,
|
|
11
|
+
ActionsColumn,
|
|
12
|
+
IAction
|
|
13
|
+
} from '@patternfly/react-table';
|
|
14
|
+
|
|
15
|
+
interface Repository {
|
|
16
|
+
name: string;
|
|
17
|
+
branches: string;
|
|
18
|
+
prs: string;
|
|
19
|
+
nestedComponent?: React.ReactNode;
|
|
20
|
+
link?: React.ReactNode;
|
|
21
|
+
noPadding?: boolean;
|
|
22
|
+
}
|
|
23
|
+
interface NestedRepository {
|
|
24
|
+
name: string;
|
|
25
|
+
branches: string | null;
|
|
26
|
+
prs: string | null;
|
|
27
|
+
workspaces: string | null;
|
|
28
|
+
lastCommit: string | null;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const NestedReposTable: React.FunctionComponent = () => {
|
|
32
|
+
// In real usage, this data would come from some external source like an API via props.
|
|
33
|
+
const prs: NestedRepository[] = [
|
|
34
|
+
{ name: 'Repository 1', branches: '25', prs: '25', workspaces: '5', lastCommit: '2 days ago' },
|
|
35
|
+
{ name: 'Repository 2', branches: '25', prs: '25', workspaces: '5', lastCommit: '2 days ago' },
|
|
36
|
+
{ name: 'Repository 3', branches: '25', prs: '25', workspaces: '5', lastCommit: '2 days ago' },
|
|
37
|
+
{ name: 'Repository 4', branches: '25', prs: '25', workspaces: '5', lastCommit: '2 days ago' }
|
|
38
|
+
];
|
|
39
|
+
|
|
40
|
+
const columnNames = {
|
|
41
|
+
name: 'Repositories',
|
|
42
|
+
branches: 'Branches',
|
|
43
|
+
prs: 'Pull requests',
|
|
44
|
+
workspaces: 'Workspaces',
|
|
45
|
+
lastCommit: 'Last commit'
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
return (
|
|
49
|
+
<TableComposable aria-label="Simple table" variant="compact">
|
|
50
|
+
<Thead>
|
|
51
|
+
<Tr>
|
|
52
|
+
<Th>{columnNames.name}</Th>
|
|
53
|
+
<Th>{columnNames.branches}</Th>
|
|
54
|
+
<Th>{columnNames.prs}</Th>
|
|
55
|
+
<Th>{columnNames.workspaces}</Th>
|
|
56
|
+
<Th>{columnNames.lastCommit}</Th>
|
|
57
|
+
</Tr>
|
|
58
|
+
</Thead>
|
|
59
|
+
<Tbody>
|
|
60
|
+
{prs.map(repo => (
|
|
61
|
+
<Tr key={repo.name}>
|
|
62
|
+
<Td dataLabel={columnNames.name}>{repo.name}</Td>
|
|
63
|
+
<Td dataLabel={columnNames.branches}>{repo.branches}</Td>
|
|
64
|
+
<Td dataLabel={columnNames.prs}>{repo.prs}</Td>
|
|
65
|
+
<Td dataLabel={columnNames.workspaces}>{repo.workspaces}</Td>
|
|
66
|
+
<Td dataLabel={columnNames.lastCommit}>{repo.lastCommit}</Td>
|
|
67
|
+
</Tr>
|
|
68
|
+
))}
|
|
69
|
+
</Tbody>
|
|
70
|
+
</TableComposable>
|
|
71
|
+
);
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
export const ComposableTableExpandable: React.FunctionComponent = () => {
|
|
75
|
+
// In real usage, this data would come from some external source like an API via props.
|
|
76
|
+
const repositories: Repository[] = [
|
|
77
|
+
{ name: 'Node 1', branches: '10', prs: '2', nestedComponent: <NestedReposTable />, link: <a>Link 1</a> },
|
|
78
|
+
{ name: 'Node 2', branches: '3', prs: '4', link: <a>Link 2</a> },
|
|
79
|
+
{
|
|
80
|
+
name: 'Node 3',
|
|
81
|
+
branches: '11',
|
|
82
|
+
prs: '7',
|
|
83
|
+
nestedComponent: (
|
|
84
|
+
<p>
|
|
85
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore
|
|
86
|
+
magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
|
|
87
|
+
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
|
|
88
|
+
pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id
|
|
89
|
+
est laborum.
|
|
90
|
+
</p>
|
|
91
|
+
),
|
|
92
|
+
link: <a>Link 3</a>
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
name: 'Node 4',
|
|
96
|
+
branches: '11',
|
|
97
|
+
prs: '7',
|
|
98
|
+
nestedComponent: 'Expandable row content has no padding.',
|
|
99
|
+
link: <a>Link 4</a>,
|
|
100
|
+
noPadding: true
|
|
101
|
+
}
|
|
102
|
+
];
|
|
103
|
+
|
|
104
|
+
const columnNames = {
|
|
105
|
+
name: 'Repositories',
|
|
106
|
+
branches: 'Branches',
|
|
107
|
+
prs: 'Pull requests',
|
|
108
|
+
link: 'Link',
|
|
109
|
+
action: 'Action'
|
|
110
|
+
};
|
|
111
|
+
// In this example, expanded rows are tracked by the repo names from each row. This could be any unique identifier.
|
|
112
|
+
// This is to prevent state from being based on row order index in case we later add sorting.
|
|
113
|
+
// Note that this behavior is very similar to selection state.
|
|
114
|
+
const initialExpandedRepoNames = repositories.filter(repo => !!repo.nestedComponent).map(repo => repo.name); // Default to all expanded
|
|
115
|
+
const [expandedRepoNames, setExpandedRepoNames] = React.useState<string[]>(initialExpandedRepoNames);
|
|
116
|
+
const setRepoExpanded = (repo: Repository, isExpanding = true) =>
|
|
117
|
+
setExpandedRepoNames(prevExpanded => {
|
|
118
|
+
const otherExpandedRepoNames = prevExpanded.filter(r => r !== repo.name);
|
|
119
|
+
return isExpanding ? [...otherExpandedRepoNames, repo.name] : otherExpandedRepoNames;
|
|
120
|
+
});
|
|
121
|
+
const isRepoExpanded = (repo: Repository) => expandedRepoNames.includes(repo.name);
|
|
122
|
+
|
|
123
|
+
const defaultActions = (repo: Repository): IAction[] => [
|
|
124
|
+
{
|
|
125
|
+
title: 'Some action',
|
|
126
|
+
onClick: () => console.log(`clicked on Some action, on row ${repo.name}`)
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
title: <a href="https://www.patternfly.org">Link action</a>
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
isSeparator: true
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
title: 'Third action',
|
|
136
|
+
onClick: () => console.log(`clicked on Third action, on row ${repo.name}`)
|
|
137
|
+
}
|
|
138
|
+
];
|
|
139
|
+
|
|
140
|
+
return (
|
|
141
|
+
<TableComposable aria-label="Simple table">
|
|
142
|
+
<Thead>
|
|
143
|
+
<Tr>
|
|
144
|
+
<Td />
|
|
145
|
+
<Th>{columnNames.name}</Th>
|
|
146
|
+
<Th>{columnNames.branches}</Th>
|
|
147
|
+
<Th>{columnNames.prs}</Th>
|
|
148
|
+
<Th>{columnNames.link}</Th>
|
|
149
|
+
<Th>{columnNames.action}</Th>
|
|
150
|
+
</Tr>
|
|
151
|
+
</Thead>
|
|
152
|
+
{repositories.map((repo, rowIndex) => (
|
|
153
|
+
<Tbody key={repo.name} isExpanded={isRepoExpanded(repo)}>
|
|
154
|
+
<Tr>
|
|
155
|
+
<Td
|
|
156
|
+
expand={
|
|
157
|
+
repo.nestedComponent
|
|
158
|
+
? {
|
|
159
|
+
rowIndex,
|
|
160
|
+
isExpanded: isRepoExpanded(repo),
|
|
161
|
+
onToggle: () => setRepoExpanded(repo, !isRepoExpanded(repo))
|
|
162
|
+
}
|
|
163
|
+
: undefined
|
|
164
|
+
}
|
|
165
|
+
/>
|
|
166
|
+
<Td dataLabel={columnNames.name}>{repo.name}</Td>
|
|
167
|
+
<Td dataLabel={columnNames.branches}>{repo.branches}</Td>
|
|
168
|
+
<Td dataLabel={columnNames.prs}>{repo.prs}</Td>
|
|
169
|
+
<Td dataLabel={columnNames.link}>{repo.link}</Td>
|
|
170
|
+
<Td dataLabel={columnNames.action}>
|
|
171
|
+
<ActionsColumn items={defaultActions(repo)} />
|
|
172
|
+
</Td>
|
|
173
|
+
</Tr>
|
|
174
|
+
{repo.nestedComponent ? (
|
|
175
|
+
<Tr isExpanded={isRepoExpanded(repo)}>
|
|
176
|
+
<Td
|
|
177
|
+
noPadding={repo.noPadding}
|
|
178
|
+
dataLabel={`${columnNames.name} expended`}
|
|
179
|
+
colSpan={Object.keys(columnNames).length + 1}
|
|
180
|
+
>
|
|
181
|
+
<ExpandableRowContent>{repo.nestedComponent}</ExpandableRowContent>
|
|
182
|
+
</Td>
|
|
183
|
+
</Tr>
|
|
184
|
+
) : null}
|
|
185
|
+
</Tbody>
|
|
186
|
+
))}
|
|
187
|
+
</TableComposable>
|
|
188
|
+
);
|
|
189
|
+
};
|