@patternfly/react-core 4.252.0 → 4.252.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 +8 -0
- package/dist/umd/react-core.min.css +226 -226
- package/package.json +2 -2
- package/src/components/SimpleList/examples/SimpleList.md +4 -108
- package/src/components/SimpleList/examples/SimpleListBasic.tsx +16 -0
- package/src/components/SimpleList/examples/SimpleListGrouped.tsx +35 -0
- package/src/components/SimpleList/examples/SimpleListUncontrolled.tsx +31 -0
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.252.1](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-core@4.252.0...@patternfly/react-core@4.252.1) (2022-10-18)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @patternfly/react-core
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
# [4.252.0](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-core@4.251.4...@patternfly/react-core@4.252.0) (2022-10-17)
|
|
7
15
|
|
|
8
16
|
|
|
@@ -1634,6 +1634,45 @@ textarea.pf-c-form-control {
|
|
|
1634
1634
|
display: block;
|
|
1635
1635
|
}
|
|
1636
1636
|
|
|
1637
|
+
.pf-c-badge {
|
|
1638
|
+
--pf-c-badge--BorderRadius: var(--pf-global--BorderRadius--lg);
|
|
1639
|
+
--pf-c-badge--FontSize: var(--pf-global--FontSize--xs);
|
|
1640
|
+
--pf-c-badge--FontWeight: var(--pf-global--FontWeight--bold);
|
|
1641
|
+
--pf-c-badge--PaddingRight: var(--pf-global--spacer--sm);
|
|
1642
|
+
--pf-c-badge--PaddingLeft: var(--pf-global--spacer--sm);
|
|
1643
|
+
--pf-c-badge--Color: var(--pf-global--Color--dark-100);
|
|
1644
|
+
--pf-c-badge--MinWidth: var(--pf-global--spacer--xl);
|
|
1645
|
+
--pf-c-badge--m-read--BackgroundColor: var(--pf-global--BackgroundColor--200);
|
|
1646
|
+
--pf-c-badge--m-read--Color: var(--pf-global--Color--dark-100);
|
|
1647
|
+
--pf-c-badge--m-unread--BackgroundColor: var(--pf-global--primary-color--100);
|
|
1648
|
+
--pf-c-badge--m-unread--Color: var(--pf-global--Color--light-100);
|
|
1649
|
+
display: inline-block;
|
|
1650
|
+
min-width: var(--pf-c-badge--MinWidth);
|
|
1651
|
+
padding-right: var(--pf-c-badge--PaddingRight);
|
|
1652
|
+
padding-left: var(--pf-c-badge--PaddingLeft);
|
|
1653
|
+
font-size: var(--pf-c-badge--FontSize);
|
|
1654
|
+
font-weight: var(--pf-c-badge--FontWeight);
|
|
1655
|
+
color: var(--pf-c-badge--Color);
|
|
1656
|
+
text-align: center;
|
|
1657
|
+
background-color: var(--pf-c-badge--BackgroundColor);
|
|
1658
|
+
border-radius: var(--pf-c-badge--BorderRadius);
|
|
1659
|
+
}
|
|
1660
|
+
|
|
1661
|
+
.pf-c-badge.pf-m-read {
|
|
1662
|
+
--pf-c-badge--Color: var(--pf-c-badge--m-read--Color);
|
|
1663
|
+
--pf-c-badge--BackgroundColor: var(--pf-c-badge--m-read--BackgroundColor);
|
|
1664
|
+
}
|
|
1665
|
+
|
|
1666
|
+
.pf-c-badge.pf-m-unread {
|
|
1667
|
+
--pf-c-badge--Color: var(--pf-c-badge--m-unread--Color);
|
|
1668
|
+
--pf-c-badge--BackgroundColor: var(--pf-c-badge--m-unread--BackgroundColor);
|
|
1669
|
+
}
|
|
1670
|
+
|
|
1671
|
+
:where(.pf-theme-dark) .pf-c-badge {
|
|
1672
|
+
--pf-c-badge--m-read--BackgroundColor: var(--pf-global--palette--black-500);
|
|
1673
|
+
--pf-c-badge--m-unread--BackgroundColor: var(--pf-global--primary-color--300);
|
|
1674
|
+
}
|
|
1675
|
+
|
|
1637
1676
|
.pf-c-banner.pf-m-warning, .pf-c-banner.pf-m-gold, .pf-c-banner.pf-m-info, .pf-c-banner.pf-m-blue {
|
|
1638
1677
|
--pf-global--Color--100: var(--pf-global--Color--dark-100);
|
|
1639
1678
|
--pf-global--Color--200: var(--pf-global--Color--dark-200);
|
|
@@ -1812,45 +1851,6 @@ textarea.pf-c-form-control {
|
|
|
1812
1851
|
color: var(--pf-global--palette--black-900);
|
|
1813
1852
|
}
|
|
1814
1853
|
|
|
1815
|
-
.pf-c-badge {
|
|
1816
|
-
--pf-c-badge--BorderRadius: var(--pf-global--BorderRadius--lg);
|
|
1817
|
-
--pf-c-badge--FontSize: var(--pf-global--FontSize--xs);
|
|
1818
|
-
--pf-c-badge--FontWeight: var(--pf-global--FontWeight--bold);
|
|
1819
|
-
--pf-c-badge--PaddingRight: var(--pf-global--spacer--sm);
|
|
1820
|
-
--pf-c-badge--PaddingLeft: var(--pf-global--spacer--sm);
|
|
1821
|
-
--pf-c-badge--Color: var(--pf-global--Color--dark-100);
|
|
1822
|
-
--pf-c-badge--MinWidth: var(--pf-global--spacer--xl);
|
|
1823
|
-
--pf-c-badge--m-read--BackgroundColor: var(--pf-global--BackgroundColor--200);
|
|
1824
|
-
--pf-c-badge--m-read--Color: var(--pf-global--Color--dark-100);
|
|
1825
|
-
--pf-c-badge--m-unread--BackgroundColor: var(--pf-global--primary-color--100);
|
|
1826
|
-
--pf-c-badge--m-unread--Color: var(--pf-global--Color--light-100);
|
|
1827
|
-
display: inline-block;
|
|
1828
|
-
min-width: var(--pf-c-badge--MinWidth);
|
|
1829
|
-
padding-right: var(--pf-c-badge--PaddingRight);
|
|
1830
|
-
padding-left: var(--pf-c-badge--PaddingLeft);
|
|
1831
|
-
font-size: var(--pf-c-badge--FontSize);
|
|
1832
|
-
font-weight: var(--pf-c-badge--FontWeight);
|
|
1833
|
-
color: var(--pf-c-badge--Color);
|
|
1834
|
-
text-align: center;
|
|
1835
|
-
background-color: var(--pf-c-badge--BackgroundColor);
|
|
1836
|
-
border-radius: var(--pf-c-badge--BorderRadius);
|
|
1837
|
-
}
|
|
1838
|
-
|
|
1839
|
-
.pf-c-badge.pf-m-read {
|
|
1840
|
-
--pf-c-badge--Color: var(--pf-c-badge--m-read--Color);
|
|
1841
|
-
--pf-c-badge--BackgroundColor: var(--pf-c-badge--m-read--BackgroundColor);
|
|
1842
|
-
}
|
|
1843
|
-
|
|
1844
|
-
.pf-c-badge.pf-m-unread {
|
|
1845
|
-
--pf-c-badge--Color: var(--pf-c-badge--m-unread--Color);
|
|
1846
|
-
--pf-c-badge--BackgroundColor: var(--pf-c-badge--m-unread--BackgroundColor);
|
|
1847
|
-
}
|
|
1848
|
-
|
|
1849
|
-
:where(.pf-theme-dark) .pf-c-badge {
|
|
1850
|
-
--pf-c-badge--m-read--BackgroundColor: var(--pf-global--palette--black-500);
|
|
1851
|
-
--pf-c-badge--m-unread--BackgroundColor: var(--pf-global--primary-color--300);
|
|
1852
|
-
}
|
|
1853
|
-
|
|
1854
1854
|
.pf-c-brand {
|
|
1855
1855
|
--pf-c-brand--Width: auto;
|
|
1856
1856
|
--pf-c-brand--Height: auto;
|
|
@@ -3323,118 +3323,6 @@ label.pf-c-check, .pf-c-check__label,
|
|
|
3323
3323
|
color: var(--pf-c-check__label-required--Color);
|
|
3324
3324
|
}
|
|
3325
3325
|
|
|
3326
|
-
.pf-c-chip {
|
|
3327
|
-
--pf-global--Color--100: var(--pf-global--Color--dark-100);
|
|
3328
|
-
--pf-global--Color--200: var(--pf-global--Color--dark-200);
|
|
3329
|
-
--pf-global--BorderColor--100: var(--pf-global--BorderColor--dark-100);
|
|
3330
|
-
--pf-global--primary-color--100: var(--pf-global--primary-color--dark-100);
|
|
3331
|
-
--pf-global--link--Color: var(--pf-global--link--Color--dark);
|
|
3332
|
-
--pf-global--link--Color--hover: var(--pf-global--link--Color--dark--hover);
|
|
3333
|
-
--pf-global--BackgroundColor--100: var(--pf-global--BackgroundColor--light-100);
|
|
3334
|
-
}
|
|
3335
|
-
|
|
3336
|
-
.pf-c-chip {
|
|
3337
|
-
--pf-c-chip--PaddingTop: var(--pf-global--spacer--xs);
|
|
3338
|
-
--pf-c-chip--PaddingRight: var(--pf-global--spacer--sm);
|
|
3339
|
-
--pf-c-chip--PaddingBottom: var(--pf-global--spacer--xs);
|
|
3340
|
-
--pf-c-chip--PaddingLeft: var(--pf-global--spacer--sm);
|
|
3341
|
-
--pf-c-chip--BackgroundColor: var(--pf-global--Color--light-100);
|
|
3342
|
-
--pf-c-chip--BorderRadius: var(--pf-global--BorderRadius--sm);
|
|
3343
|
-
--pf-c-chip--before--BorderColor: var(--pf-global--BorderColor--300);
|
|
3344
|
-
--pf-c-chip--before--BorderWidth: var(--pf-global--BorderWidth--sm);
|
|
3345
|
-
--pf-c-chip--before--BorderRadius: var(--pf-c-chip--BorderRadius);
|
|
3346
|
-
--pf-c-chip--m-overflow__text--Color: var(--pf-global--primary-color--100);
|
|
3347
|
-
--pf-c-chip--m-draggable--BackgroundColor: var(--pf-global--BackgroundColor--200);
|
|
3348
|
-
--pf-c-chip--m-draggable--BoxShadow: var(--pf-global--BoxShadow--sm);
|
|
3349
|
-
--pf-c-chip--m-draggable__icon--FontSize: var(--pf-global--icon--FontSize--sm);
|
|
3350
|
-
--pf-c-chip__text--FontSize: var(--pf-global--FontSize--xs);
|
|
3351
|
-
--pf-c-chip__text--Color: var(--pf-global--Color--100);
|
|
3352
|
-
--pf-c-chip__text--MaxWidth: 16ch;
|
|
3353
|
-
--pf-c-chip__c-button--PaddingTop: var(--pf-global--spacer--xs);
|
|
3354
|
-
--pf-c-chip__c-button--PaddingRight: var(--pf-global--spacer--sm);
|
|
3355
|
-
--pf-c-chip__c-button--PaddingBottom: var(--pf-global--spacer--xs);
|
|
3356
|
-
--pf-c-chip__c-button--PaddingLeft: var(--pf-global--spacer--sm);
|
|
3357
|
-
--pf-c-chip__c-button--MarginTop: calc(var(--pf-c-chip--PaddingTop) * -1);
|
|
3358
|
-
--pf-c-chip__c-button--MarginRight: calc(var(--pf-c-chip--PaddingRight) / 2 * -1);
|
|
3359
|
-
--pf-c-chip__c-button--MarginBottom: calc(var(--pf-c-chip--PaddingBottom) * -1);
|
|
3360
|
-
--pf-c-chip__c-button--FontSize: var(--pf-global--FontSize--xs);
|
|
3361
|
-
--pf-c-chip__c-badge--MarginLeft: var(--pf-global--spacer--xs);
|
|
3362
|
-
--pf-c-chip__icon--MarginLeft: var(--pf-global--spacer--sm);
|
|
3363
|
-
color: var(--pf-global--Color--100);
|
|
3364
|
-
position: relative;
|
|
3365
|
-
display: inline-flex;
|
|
3366
|
-
align-items: center;
|
|
3367
|
-
min-width: 0;
|
|
3368
|
-
padding: var(--pf-c-chip--PaddingTop) var(--pf-c-chip--PaddingRight) var(--pf-c-chip--PaddingBottom) var(--pf-c-chip--PaddingLeft);
|
|
3369
|
-
list-style: none;
|
|
3370
|
-
background-color: var(--pf-c-chip--BackgroundColor);
|
|
3371
|
-
border-radius: var(--pf-c-chip--BorderRadius);
|
|
3372
|
-
}
|
|
3373
|
-
|
|
3374
|
-
.pf-c-chip::before {
|
|
3375
|
-
position: absolute;
|
|
3376
|
-
top: 0;
|
|
3377
|
-
right: 0;
|
|
3378
|
-
bottom: 0;
|
|
3379
|
-
left: 0;
|
|
3380
|
-
content: "";
|
|
3381
|
-
border: var(--pf-c-chip--before--BorderWidth) solid var(--pf-c-chip--before--BorderColor);
|
|
3382
|
-
border-radius: var(--pf-c-chip--before--BorderRadius);
|
|
3383
|
-
}
|
|
3384
|
-
|
|
3385
|
-
.pf-c-chip.pf-m-overflow {
|
|
3386
|
-
border: 0;
|
|
3387
|
-
}
|
|
3388
|
-
|
|
3389
|
-
.pf-c-chip.pf-m-overflow .pf-c-chip__text {
|
|
3390
|
-
color: var(--pf-c-chip--m-overflow__text--Color);
|
|
3391
|
-
}
|
|
3392
|
-
|
|
3393
|
-
.pf-c-chip.pf-m-draggable {
|
|
3394
|
-
--pf-c-chip--BackgroundColor: var(--pf-c-chip--m-draggable--BackgroundColor);
|
|
3395
|
-
box-shadow: var(--pf-c-chip--m-draggable--BoxShadow);
|
|
3396
|
-
}
|
|
3397
|
-
|
|
3398
|
-
.pf-c-chip.pf-m-draggable .pf-c-chip__icon {
|
|
3399
|
-
font-size: var(--pf-c-chip--m-draggable__icon--FontSize);
|
|
3400
|
-
}
|
|
3401
|
-
|
|
3402
|
-
.pf-c-chip .pf-c-button {
|
|
3403
|
-
--pf-c-button--PaddingTop: var(--pf-c-chip__c-button--PaddingTop);
|
|
3404
|
-
--pf-c-button--PaddingRight: var(--pf-c-chip__c-button--PaddingRight);
|
|
3405
|
-
--pf-c-button--PaddingBottom: var(--pf-c-chip__c-button--PaddingBottom);
|
|
3406
|
-
--pf-c-button--PaddingLeft: var(--pf-c-chip__c-button--PaddingLeft);
|
|
3407
|
-
--pf-c-button--FontSize: var(--pf-c-chip__c-button--FontSize);
|
|
3408
|
-
margin-top: var(--pf-c-chip__c-button--MarginTop);
|
|
3409
|
-
margin-right: var(--pf-c-chip__c-button--MarginRight);
|
|
3410
|
-
margin-bottom: var(--pf-c-chip__c-button--MarginBottom);
|
|
3411
|
-
}
|
|
3412
|
-
|
|
3413
|
-
.pf-c-chip .pf-c-badge {
|
|
3414
|
-
margin-left: var(--pf-c-chip__c-badge--MarginLeft);
|
|
3415
|
-
}
|
|
3416
|
-
|
|
3417
|
-
.pf-c-chip__text {
|
|
3418
|
-
overflow: hidden;
|
|
3419
|
-
text-overflow: ellipsis;
|
|
3420
|
-
white-space: nowrap;
|
|
3421
|
-
position: relative;
|
|
3422
|
-
max-width: var(--pf-c-chip__text--MaxWidth);
|
|
3423
|
-
font-size: var(--pf-c-chip__text--FontSize);
|
|
3424
|
-
color: var(--pf-c-chip__text--Color);
|
|
3425
|
-
}
|
|
3426
|
-
|
|
3427
|
-
.pf-c-chip__icon + .pf-c-chip__text,
|
|
3428
|
-
.pf-c-chip__text + .pf-c-chip__icon {
|
|
3429
|
-
margin-left: var(--pf-c-chip__icon--MarginLeft);
|
|
3430
|
-
}
|
|
3431
|
-
|
|
3432
|
-
:where(.pf-theme-dark) .pf-c-chip {
|
|
3433
|
-
--pf-c-chip--BackgroundColor: var(--pf-global--BackgroundColor--100);
|
|
3434
|
-
--pf-c-chip--before--BorderColor: var(--pf-global--BorderColor--100);
|
|
3435
|
-
--pf-c-chip--m-draggable--BackgroundColor: var(--pf-global--palette--black-600);
|
|
3436
|
-
}
|
|
3437
|
-
|
|
3438
3326
|
.pf-c-chip-group {
|
|
3439
3327
|
--pf-global--Color--100: var(--pf-global--Color--dark-100);
|
|
3440
3328
|
--pf-global--Color--200: var(--pf-global--Color--dark-200);
|
|
@@ -3628,6 +3516,118 @@ label.pf-c-check, .pf-c-check__label,
|
|
|
3628
3516
|
border: 0;
|
|
3629
3517
|
}
|
|
3630
3518
|
|
|
3519
|
+
.pf-c-chip {
|
|
3520
|
+
--pf-global--Color--100: var(--pf-global--Color--dark-100);
|
|
3521
|
+
--pf-global--Color--200: var(--pf-global--Color--dark-200);
|
|
3522
|
+
--pf-global--BorderColor--100: var(--pf-global--BorderColor--dark-100);
|
|
3523
|
+
--pf-global--primary-color--100: var(--pf-global--primary-color--dark-100);
|
|
3524
|
+
--pf-global--link--Color: var(--pf-global--link--Color--dark);
|
|
3525
|
+
--pf-global--link--Color--hover: var(--pf-global--link--Color--dark--hover);
|
|
3526
|
+
--pf-global--BackgroundColor--100: var(--pf-global--BackgroundColor--light-100);
|
|
3527
|
+
}
|
|
3528
|
+
|
|
3529
|
+
.pf-c-chip {
|
|
3530
|
+
--pf-c-chip--PaddingTop: var(--pf-global--spacer--xs);
|
|
3531
|
+
--pf-c-chip--PaddingRight: var(--pf-global--spacer--sm);
|
|
3532
|
+
--pf-c-chip--PaddingBottom: var(--pf-global--spacer--xs);
|
|
3533
|
+
--pf-c-chip--PaddingLeft: var(--pf-global--spacer--sm);
|
|
3534
|
+
--pf-c-chip--BackgroundColor: var(--pf-global--Color--light-100);
|
|
3535
|
+
--pf-c-chip--BorderRadius: var(--pf-global--BorderRadius--sm);
|
|
3536
|
+
--pf-c-chip--before--BorderColor: var(--pf-global--BorderColor--300);
|
|
3537
|
+
--pf-c-chip--before--BorderWidth: var(--pf-global--BorderWidth--sm);
|
|
3538
|
+
--pf-c-chip--before--BorderRadius: var(--pf-c-chip--BorderRadius);
|
|
3539
|
+
--pf-c-chip--m-overflow__text--Color: var(--pf-global--primary-color--100);
|
|
3540
|
+
--pf-c-chip--m-draggable--BackgroundColor: var(--pf-global--BackgroundColor--200);
|
|
3541
|
+
--pf-c-chip--m-draggable--BoxShadow: var(--pf-global--BoxShadow--sm);
|
|
3542
|
+
--pf-c-chip--m-draggable__icon--FontSize: var(--pf-global--icon--FontSize--sm);
|
|
3543
|
+
--pf-c-chip__text--FontSize: var(--pf-global--FontSize--xs);
|
|
3544
|
+
--pf-c-chip__text--Color: var(--pf-global--Color--100);
|
|
3545
|
+
--pf-c-chip__text--MaxWidth: 16ch;
|
|
3546
|
+
--pf-c-chip__c-button--PaddingTop: var(--pf-global--spacer--xs);
|
|
3547
|
+
--pf-c-chip__c-button--PaddingRight: var(--pf-global--spacer--sm);
|
|
3548
|
+
--pf-c-chip__c-button--PaddingBottom: var(--pf-global--spacer--xs);
|
|
3549
|
+
--pf-c-chip__c-button--PaddingLeft: var(--pf-global--spacer--sm);
|
|
3550
|
+
--pf-c-chip__c-button--MarginTop: calc(var(--pf-c-chip--PaddingTop) * -1);
|
|
3551
|
+
--pf-c-chip__c-button--MarginRight: calc(var(--pf-c-chip--PaddingRight) / 2 * -1);
|
|
3552
|
+
--pf-c-chip__c-button--MarginBottom: calc(var(--pf-c-chip--PaddingBottom) * -1);
|
|
3553
|
+
--pf-c-chip__c-button--FontSize: var(--pf-global--FontSize--xs);
|
|
3554
|
+
--pf-c-chip__c-badge--MarginLeft: var(--pf-global--spacer--xs);
|
|
3555
|
+
--pf-c-chip__icon--MarginLeft: var(--pf-global--spacer--sm);
|
|
3556
|
+
color: var(--pf-global--Color--100);
|
|
3557
|
+
position: relative;
|
|
3558
|
+
display: inline-flex;
|
|
3559
|
+
align-items: center;
|
|
3560
|
+
min-width: 0;
|
|
3561
|
+
padding: var(--pf-c-chip--PaddingTop) var(--pf-c-chip--PaddingRight) var(--pf-c-chip--PaddingBottom) var(--pf-c-chip--PaddingLeft);
|
|
3562
|
+
list-style: none;
|
|
3563
|
+
background-color: var(--pf-c-chip--BackgroundColor);
|
|
3564
|
+
border-radius: var(--pf-c-chip--BorderRadius);
|
|
3565
|
+
}
|
|
3566
|
+
|
|
3567
|
+
.pf-c-chip::before {
|
|
3568
|
+
position: absolute;
|
|
3569
|
+
top: 0;
|
|
3570
|
+
right: 0;
|
|
3571
|
+
bottom: 0;
|
|
3572
|
+
left: 0;
|
|
3573
|
+
content: "";
|
|
3574
|
+
border: var(--pf-c-chip--before--BorderWidth) solid var(--pf-c-chip--before--BorderColor);
|
|
3575
|
+
border-radius: var(--pf-c-chip--before--BorderRadius);
|
|
3576
|
+
}
|
|
3577
|
+
|
|
3578
|
+
.pf-c-chip.pf-m-overflow {
|
|
3579
|
+
border: 0;
|
|
3580
|
+
}
|
|
3581
|
+
|
|
3582
|
+
.pf-c-chip.pf-m-overflow .pf-c-chip__text {
|
|
3583
|
+
color: var(--pf-c-chip--m-overflow__text--Color);
|
|
3584
|
+
}
|
|
3585
|
+
|
|
3586
|
+
.pf-c-chip.pf-m-draggable {
|
|
3587
|
+
--pf-c-chip--BackgroundColor: var(--pf-c-chip--m-draggable--BackgroundColor);
|
|
3588
|
+
box-shadow: var(--pf-c-chip--m-draggable--BoxShadow);
|
|
3589
|
+
}
|
|
3590
|
+
|
|
3591
|
+
.pf-c-chip.pf-m-draggable .pf-c-chip__icon {
|
|
3592
|
+
font-size: var(--pf-c-chip--m-draggable__icon--FontSize);
|
|
3593
|
+
}
|
|
3594
|
+
|
|
3595
|
+
.pf-c-chip .pf-c-button {
|
|
3596
|
+
--pf-c-button--PaddingTop: var(--pf-c-chip__c-button--PaddingTop);
|
|
3597
|
+
--pf-c-button--PaddingRight: var(--pf-c-chip__c-button--PaddingRight);
|
|
3598
|
+
--pf-c-button--PaddingBottom: var(--pf-c-chip__c-button--PaddingBottom);
|
|
3599
|
+
--pf-c-button--PaddingLeft: var(--pf-c-chip__c-button--PaddingLeft);
|
|
3600
|
+
--pf-c-button--FontSize: var(--pf-c-chip__c-button--FontSize);
|
|
3601
|
+
margin-top: var(--pf-c-chip__c-button--MarginTop);
|
|
3602
|
+
margin-right: var(--pf-c-chip__c-button--MarginRight);
|
|
3603
|
+
margin-bottom: var(--pf-c-chip__c-button--MarginBottom);
|
|
3604
|
+
}
|
|
3605
|
+
|
|
3606
|
+
.pf-c-chip .pf-c-badge {
|
|
3607
|
+
margin-left: var(--pf-c-chip__c-badge--MarginLeft);
|
|
3608
|
+
}
|
|
3609
|
+
|
|
3610
|
+
.pf-c-chip__text {
|
|
3611
|
+
overflow: hidden;
|
|
3612
|
+
text-overflow: ellipsis;
|
|
3613
|
+
white-space: nowrap;
|
|
3614
|
+
position: relative;
|
|
3615
|
+
max-width: var(--pf-c-chip__text--MaxWidth);
|
|
3616
|
+
font-size: var(--pf-c-chip__text--FontSize);
|
|
3617
|
+
color: var(--pf-c-chip__text--Color);
|
|
3618
|
+
}
|
|
3619
|
+
|
|
3620
|
+
.pf-c-chip__icon + .pf-c-chip__text,
|
|
3621
|
+
.pf-c-chip__text + .pf-c-chip__icon {
|
|
3622
|
+
margin-left: var(--pf-c-chip__icon--MarginLeft);
|
|
3623
|
+
}
|
|
3624
|
+
|
|
3625
|
+
:where(.pf-theme-dark) .pf-c-chip {
|
|
3626
|
+
--pf-c-chip--BackgroundColor: var(--pf-global--BackgroundColor--100);
|
|
3627
|
+
--pf-c-chip--before--BorderColor: var(--pf-global--BorderColor--100);
|
|
3628
|
+
--pf-c-chip--m-draggable--BackgroundColor: var(--pf-global--palette--black-600);
|
|
3629
|
+
}
|
|
3630
|
+
|
|
3631
3631
|
.pf-c-code-block {
|
|
3632
3632
|
--pf-c-code-block--BackgroundColor: var(--pf-global--BackgroundColor--200);
|
|
3633
3633
|
--pf-c-code-block__header--BorderBottomWidth: var(--pf-global--BorderWidth--sm);
|
|
@@ -8635,81 +8635,6 @@ label.pf-c-check, .pf-c-check__label,
|
|
|
8635
8635
|
font-weight: var(--pf-global--FontWeight--semi-bold);
|
|
8636
8636
|
}
|
|
8637
8637
|
|
|
8638
|
-
.pf-c-file-upload {
|
|
8639
|
-
--pf-c-file-upload--m-loading__file-details--before--BackgroundColor: var(--pf-global--BackgroundColor--100);
|
|
8640
|
-
--pf-c-file-upload--m-loading__file-details--before--Left: var(--pf-global--BorderWidth--sm);
|
|
8641
|
-
--pf-c-file-upload--m-loading__file-details--before--Right: var(--pf-global--BorderWidth--sm);
|
|
8642
|
-
--pf-c-file-upload--m-loading__file-details--before--Bottom: var(--pf-global--BorderWidth--sm);
|
|
8643
|
-
--pf-c-file-upload--m-drag-hover--before--BorderWidth: var(--pf-global--BorderWidth--sm);
|
|
8644
|
-
--pf-c-file-upload--m-drag-hover--before--BorderColor: var(--pf-global--primary-color--100);
|
|
8645
|
-
--pf-c-file-upload--m-drag-hover--before--ZIndex: var(--pf-global--ZIndex--xs);
|
|
8646
|
-
--pf-c-file-upload--m-drag-hover--after--BackgroundColor: var(--pf-global--primary-color--100);
|
|
8647
|
-
--pf-c-file-upload--m-drag-hover--after--Opacity: .1;
|
|
8648
|
-
--pf-c-file-upload__file-details__c-form-control--MinHeight: calc(var(--pf-global--spacer--3xl) * 2);
|
|
8649
|
-
--pf-c-file-upload__file-select__c-button--m-control--OutlineOffset: calc(-1 * var(--pf-global--spacer--xs));
|
|
8650
|
-
position: relative;
|
|
8651
|
-
display: flex;
|
|
8652
|
-
flex-direction: column;
|
|
8653
|
-
}
|
|
8654
|
-
|
|
8655
|
-
.pf-c-file-upload.pf-m-drag-hover::before {
|
|
8656
|
-
position: absolute;
|
|
8657
|
-
top: 0;
|
|
8658
|
-
right: 0;
|
|
8659
|
-
bottom: 0;
|
|
8660
|
-
left: 0;
|
|
8661
|
-
z-index: var(--pf-c-file-upload--m-drag-hover--before--ZIndex);
|
|
8662
|
-
content: "";
|
|
8663
|
-
border: var(--pf-c-file-upload--m-drag-hover--before--BorderWidth) solid var(--pf-c-file-upload--m-drag-hover--before--BorderColor);
|
|
8664
|
-
}
|
|
8665
|
-
|
|
8666
|
-
.pf-c-file-upload.pf-m-drag-hover::after {
|
|
8667
|
-
position: absolute;
|
|
8668
|
-
top: 0;
|
|
8669
|
-
right: 0;
|
|
8670
|
-
bottom: 0;
|
|
8671
|
-
left: 0;
|
|
8672
|
-
content: "";
|
|
8673
|
-
background-color: var(--pf-c-file-upload--m-drag-hover--after--BackgroundColor);
|
|
8674
|
-
opacity: var(--pf-c-file-upload--m-drag-hover--after--Opacity);
|
|
8675
|
-
}
|
|
8676
|
-
|
|
8677
|
-
.pf-c-file-upload.pf-m-loading .pf-c-file-upload__file-details {
|
|
8678
|
-
position: relative;
|
|
8679
|
-
}
|
|
8680
|
-
|
|
8681
|
-
.pf-c-file-upload.pf-m-loading .pf-c-file-upload__file-details::before {
|
|
8682
|
-
position: absolute;
|
|
8683
|
-
top: 0;
|
|
8684
|
-
right: var(--pf-c-file-upload--m-loading__file-details--before--Left);
|
|
8685
|
-
bottom: var(--pf-c-file-upload--m-loading__file-details--before--Left);
|
|
8686
|
-
left: var(--pf-c-file-upload--m-loading__file-details--before--Left);
|
|
8687
|
-
content: "";
|
|
8688
|
-
background-color: var(--pf-c-file-upload--m-loading__file-details--before--BackgroundColor);
|
|
8689
|
-
}
|
|
8690
|
-
|
|
8691
|
-
.pf-c-file-upload__file-select .pf-c-button.pf-m-control {
|
|
8692
|
-
outline-offset: var(--pf-c-file-upload__file-select__c-button--m-control--OutlineOffset);
|
|
8693
|
-
}
|
|
8694
|
-
|
|
8695
|
-
.pf-c-file-upload__file-details {
|
|
8696
|
-
position: relative;
|
|
8697
|
-
display: flex;
|
|
8698
|
-
}
|
|
8699
|
-
|
|
8700
|
-
.pf-c-file-upload__file-details .pf-c-form-control {
|
|
8701
|
-
flex: 1 1 auto;
|
|
8702
|
-
min-height: var(--pf-c-file-upload__file-details__c-form-control--MinHeight);
|
|
8703
|
-
border-top: 0;
|
|
8704
|
-
}
|
|
8705
|
-
|
|
8706
|
-
.pf-c-file-upload__file-details-spinner {
|
|
8707
|
-
position: absolute;
|
|
8708
|
-
top: 50%;
|
|
8709
|
-
left: 50%;
|
|
8710
|
-
transform: translate(-50%, -50%);
|
|
8711
|
-
}
|
|
8712
|
-
|
|
8713
8638
|
.pf-c-form {
|
|
8714
8639
|
--pf-c-form--GridGap: var(--pf-global--gutter--md);
|
|
8715
8640
|
--pf-c-form__group--m-action--MarginTop: var(--pf-global--spacer--xl);
|
|
@@ -9276,6 +9201,81 @@ label.pf-c-check, .pf-c-check__label,
|
|
|
9276
9201
|
--pf-c-form__helper-text--m-success--Color: var(--pf-global--success-color--100);
|
|
9277
9202
|
}
|
|
9278
9203
|
|
|
9204
|
+
.pf-c-file-upload {
|
|
9205
|
+
--pf-c-file-upload--m-loading__file-details--before--BackgroundColor: var(--pf-global--BackgroundColor--100);
|
|
9206
|
+
--pf-c-file-upload--m-loading__file-details--before--Left: var(--pf-global--BorderWidth--sm);
|
|
9207
|
+
--pf-c-file-upload--m-loading__file-details--before--Right: var(--pf-global--BorderWidth--sm);
|
|
9208
|
+
--pf-c-file-upload--m-loading__file-details--before--Bottom: var(--pf-global--BorderWidth--sm);
|
|
9209
|
+
--pf-c-file-upload--m-drag-hover--before--BorderWidth: var(--pf-global--BorderWidth--sm);
|
|
9210
|
+
--pf-c-file-upload--m-drag-hover--before--BorderColor: var(--pf-global--primary-color--100);
|
|
9211
|
+
--pf-c-file-upload--m-drag-hover--before--ZIndex: var(--pf-global--ZIndex--xs);
|
|
9212
|
+
--pf-c-file-upload--m-drag-hover--after--BackgroundColor: var(--pf-global--primary-color--100);
|
|
9213
|
+
--pf-c-file-upload--m-drag-hover--after--Opacity: .1;
|
|
9214
|
+
--pf-c-file-upload__file-details__c-form-control--MinHeight: calc(var(--pf-global--spacer--3xl) * 2);
|
|
9215
|
+
--pf-c-file-upload__file-select__c-button--m-control--OutlineOffset: calc(-1 * var(--pf-global--spacer--xs));
|
|
9216
|
+
position: relative;
|
|
9217
|
+
display: flex;
|
|
9218
|
+
flex-direction: column;
|
|
9219
|
+
}
|
|
9220
|
+
|
|
9221
|
+
.pf-c-file-upload.pf-m-drag-hover::before {
|
|
9222
|
+
position: absolute;
|
|
9223
|
+
top: 0;
|
|
9224
|
+
right: 0;
|
|
9225
|
+
bottom: 0;
|
|
9226
|
+
left: 0;
|
|
9227
|
+
z-index: var(--pf-c-file-upload--m-drag-hover--before--ZIndex);
|
|
9228
|
+
content: "";
|
|
9229
|
+
border: var(--pf-c-file-upload--m-drag-hover--before--BorderWidth) solid var(--pf-c-file-upload--m-drag-hover--before--BorderColor);
|
|
9230
|
+
}
|
|
9231
|
+
|
|
9232
|
+
.pf-c-file-upload.pf-m-drag-hover::after {
|
|
9233
|
+
position: absolute;
|
|
9234
|
+
top: 0;
|
|
9235
|
+
right: 0;
|
|
9236
|
+
bottom: 0;
|
|
9237
|
+
left: 0;
|
|
9238
|
+
content: "";
|
|
9239
|
+
background-color: var(--pf-c-file-upload--m-drag-hover--after--BackgroundColor);
|
|
9240
|
+
opacity: var(--pf-c-file-upload--m-drag-hover--after--Opacity);
|
|
9241
|
+
}
|
|
9242
|
+
|
|
9243
|
+
.pf-c-file-upload.pf-m-loading .pf-c-file-upload__file-details {
|
|
9244
|
+
position: relative;
|
|
9245
|
+
}
|
|
9246
|
+
|
|
9247
|
+
.pf-c-file-upload.pf-m-loading .pf-c-file-upload__file-details::before {
|
|
9248
|
+
position: absolute;
|
|
9249
|
+
top: 0;
|
|
9250
|
+
right: var(--pf-c-file-upload--m-loading__file-details--before--Left);
|
|
9251
|
+
bottom: var(--pf-c-file-upload--m-loading__file-details--before--Left);
|
|
9252
|
+
left: var(--pf-c-file-upload--m-loading__file-details--before--Left);
|
|
9253
|
+
content: "";
|
|
9254
|
+
background-color: var(--pf-c-file-upload--m-loading__file-details--before--BackgroundColor);
|
|
9255
|
+
}
|
|
9256
|
+
|
|
9257
|
+
.pf-c-file-upload__file-select .pf-c-button.pf-m-control {
|
|
9258
|
+
outline-offset: var(--pf-c-file-upload__file-select__c-button--m-control--OutlineOffset);
|
|
9259
|
+
}
|
|
9260
|
+
|
|
9261
|
+
.pf-c-file-upload__file-details {
|
|
9262
|
+
position: relative;
|
|
9263
|
+
display: flex;
|
|
9264
|
+
}
|
|
9265
|
+
|
|
9266
|
+
.pf-c-file-upload__file-details .pf-c-form-control {
|
|
9267
|
+
flex: 1 1 auto;
|
|
9268
|
+
min-height: var(--pf-c-file-upload__file-details__c-form-control--MinHeight);
|
|
9269
|
+
border-top: 0;
|
|
9270
|
+
}
|
|
9271
|
+
|
|
9272
|
+
.pf-c-file-upload__file-details-spinner {
|
|
9273
|
+
position: absolute;
|
|
9274
|
+
top: 50%;
|
|
9275
|
+
left: 50%;
|
|
9276
|
+
transform: translate(-50%, -50%);
|
|
9277
|
+
}
|
|
9278
|
+
|
|
9279
9279
|
.pf-c-helper-text {
|
|
9280
9280
|
--pf-c-helper-text--Gap: var(--pf-global--spacer--xs);
|
|
9281
9281
|
--pf-c-helper-text--FontSize: var(--pf-global--FontSize--sm);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@patternfly/react-core",
|
|
3
|
-
"version": "4.252.
|
|
3
|
+
"version": "4.252.1",
|
|
4
4
|
"description": "This library provides a set of common React components for use with the PatternFly reference implementation.",
|
|
5
5
|
"main": "dist/js/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -70,5 +70,5 @@
|
|
|
70
70
|
"react": "^16.8 || ^17 || ^18",
|
|
71
71
|
"react-dom": "^16.8 || ^17 || ^18"
|
|
72
72
|
},
|
|
73
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "40db44d5598d9bcd5b729613a570fdc1887126b2"
|
|
74
74
|
}
|
|
@@ -9,120 +9,16 @@ propComponents: ['SimpleList', 'SimpleListGroup', 'SimpleListItem']
|
|
|
9
9
|
|
|
10
10
|
### Simple list
|
|
11
11
|
|
|
12
|
-
```
|
|
13
|
-
import React from 'react';
|
|
14
|
-
import { SimpleList, SimpleListItem } from '@patternfly/react-core';
|
|
15
|
-
|
|
16
|
-
class SimpleListDemo extends React.Component {
|
|
17
|
-
onSelect(selectedItem, selectedItemProps) {
|
|
18
|
-
console.log('new selection SimpleListDemo', selectedItem, selectedItemProps);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
render() {
|
|
22
|
-
const items = [
|
|
23
|
-
<SimpleListItem key="item1" isActive>
|
|
24
|
-
List item 1
|
|
25
|
-
</SimpleListItem>,
|
|
26
|
-
<SimpleListItem key="item2" component="a" href="#">
|
|
27
|
-
List item 2
|
|
28
|
-
</SimpleListItem>,
|
|
29
|
-
<SimpleListItem key="item3">List item 3</SimpleListItem>
|
|
30
|
-
];
|
|
31
|
-
|
|
32
|
-
return (
|
|
33
|
-
<SimpleList onSelect={this.onSelect} aria-label="Simple List Example">
|
|
34
|
-
{items}
|
|
35
|
-
</SimpleList>
|
|
36
|
-
);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
12
|
+
```ts file="SimpleListBasic.tsx"
|
|
39
13
|
```
|
|
40
14
|
|
|
41
15
|
### Grouped list
|
|
42
16
|
|
|
43
|
-
```
|
|
44
|
-
import React from 'react';
|
|
45
|
-
import { SimpleList, SimpleListItem, SimpleListGroup } from '@patternfly/react-core';
|
|
46
|
-
|
|
47
|
-
class SimpleListGroupDemo extends React.Component {
|
|
48
|
-
onSelect(selectedItem, selectedItemProps) {
|
|
49
|
-
console.log('new selection SimpleListGroupDemo', selectedItem, selectedItemProps);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
render() {
|
|
53
|
-
const group1Items = [
|
|
54
|
-
<SimpleListItem key="item1" isActive>
|
|
55
|
-
List item 1
|
|
56
|
-
</SimpleListItem>,
|
|
57
|
-
<SimpleListItem key="item2" id="test 2">
|
|
58
|
-
List item 2
|
|
59
|
-
</SimpleListItem>,
|
|
60
|
-
<SimpleListItem key="item3">List item 3</SimpleListItem>,
|
|
61
|
-
<SimpleListItem key="item4">List item 4</SimpleListItem>
|
|
62
|
-
];
|
|
63
|
-
|
|
64
|
-
const group2Items = [
|
|
65
|
-
<SimpleListItem key="item5">List item 1</SimpleListItem>,
|
|
66
|
-
<SimpleListItem key="item6" component="a" href="#">
|
|
67
|
-
List item 2
|
|
68
|
-
</SimpleListItem>,
|
|
69
|
-
<SimpleListItem key="item7" component="a" href="#">
|
|
70
|
-
List item 3
|
|
71
|
-
</SimpleListItem>,
|
|
72
|
-
<SimpleListItem key="item8">List item 4</SimpleListItem>
|
|
73
|
-
];
|
|
74
|
-
|
|
75
|
-
return (
|
|
76
|
-
<SimpleList onSelect={this.onSelect} aria-label="Grouped List Example">
|
|
77
|
-
<SimpleListGroup title="Group 1" id="group-1">
|
|
78
|
-
{group1Items}
|
|
79
|
-
</SimpleListGroup>
|
|
80
|
-
<SimpleListGroup title="Group 2" id="group-2">
|
|
81
|
-
{group2Items}
|
|
82
|
-
</SimpleListGroup>
|
|
83
|
-
</SimpleList>
|
|
84
|
-
);
|
|
85
|
-
}
|
|
86
|
-
}
|
|
17
|
+
```ts file="SimpleListGrouped.tsx"
|
|
87
18
|
```
|
|
88
19
|
|
|
89
20
|
### Uncontrolled simple list
|
|
90
21
|
|
|
91
|
-
```
|
|
92
|
-
import React from 'react';
|
|
93
|
-
import { SimpleList, SimpleListItem } from '@patternfly/react-core';
|
|
94
|
-
|
|
95
|
-
class SimpleListUncontrolledDemo extends React.Component {
|
|
96
|
-
constructor(props) {
|
|
97
|
-
super(props);
|
|
98
|
-
this.state = {
|
|
99
|
-
activeItem: 0
|
|
100
|
-
};
|
|
101
|
-
this.onSelect = (selectedItem, selectedItemProps) => {
|
|
102
|
-
console.log('new selection SimpleListUncontrolledDemo', selectedItem, selectedItemProps);
|
|
103
|
-
this.setState({ activeItem: selectedItemProps.itemId });
|
|
104
|
-
};
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
render() {
|
|
108
|
-
const { activeItem } = this.state;
|
|
109
|
-
const items = [
|
|
110
|
-
<SimpleListItem key="item1" itemId={0} isActive={activeItem === 0}>
|
|
111
|
-
List item 1
|
|
112
|
-
</SimpleListItem>,
|
|
113
|
-
<SimpleListItem key="item2" itemId={1} isActive={activeItem === 1}>
|
|
114
|
-
List item 2
|
|
115
|
-
</SimpleListItem>,
|
|
116
|
-
<SimpleListItem key="item3" itemId={2} isActive={activeItem === 2}>
|
|
117
|
-
List item 3
|
|
118
|
-
</SimpleListItem>
|
|
119
|
-
];
|
|
120
|
-
|
|
121
|
-
return (
|
|
122
|
-
<SimpleList onSelect={this.onSelect} isControlled={false} aria-label="Uncontrolled Simple List Example">
|
|
123
|
-
{items}
|
|
124
|
-
</SimpleList>
|
|
125
|
-
);
|
|
126
|
-
}
|
|
127
|
-
}
|
|
22
|
+
```ts file="SimpleListUncontrolled.tsx"
|
|
128
23
|
```
|
|
24
|
+
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SimpleList, SimpleListItem } from '@patternfly/react-core';
|
|
3
|
+
|
|
4
|
+
export const SimpleListBasic: React.FunctionComponent = () => {
|
|
5
|
+
const items = [
|
|
6
|
+
<SimpleListItem key="item1" isActive>
|
|
7
|
+
List item 1
|
|
8
|
+
</SimpleListItem>,
|
|
9
|
+
<SimpleListItem key="item2" component="a" href="#">
|
|
10
|
+
List item 2
|
|
11
|
+
</SimpleListItem>,
|
|
12
|
+
<SimpleListItem key="item3">List item 3</SimpleListItem>
|
|
13
|
+
];
|
|
14
|
+
|
|
15
|
+
return <SimpleList aria-label="Simple List Example">{items}</SimpleList>;
|
|
16
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SimpleList, SimpleListItem, SimpleListGroup } from '@patternfly/react-core';
|
|
3
|
+
|
|
4
|
+
export const SimpleListGrouped: React.FunctionComponent = () => {
|
|
5
|
+
const group1Items = [
|
|
6
|
+
<SimpleListItem key="item1" isActive>
|
|
7
|
+
List item 1
|
|
8
|
+
</SimpleListItem>,
|
|
9
|
+
<SimpleListItem key="item2">List item 2</SimpleListItem>,
|
|
10
|
+
<SimpleListItem key="item3">List item 3</SimpleListItem>,
|
|
11
|
+
<SimpleListItem key="item4">List item 4</SimpleListItem>
|
|
12
|
+
];
|
|
13
|
+
|
|
14
|
+
const group2Items = [
|
|
15
|
+
<SimpleListItem key="item5">List item 1</SimpleListItem>,
|
|
16
|
+
<SimpleListItem key="item6" component="a" href="#">
|
|
17
|
+
List item 2
|
|
18
|
+
</SimpleListItem>,
|
|
19
|
+
<SimpleListItem key="item7" component="a" href="#">
|
|
20
|
+
List item 3
|
|
21
|
+
</SimpleListItem>,
|
|
22
|
+
<SimpleListItem key="item8">List item 4</SimpleListItem>
|
|
23
|
+
];
|
|
24
|
+
|
|
25
|
+
return (
|
|
26
|
+
<SimpleList aria-label="Grouped simple list example">
|
|
27
|
+
<SimpleListGroup title="Group 1" id="group-1">
|
|
28
|
+
{group1Items}
|
|
29
|
+
</SimpleListGroup>
|
|
30
|
+
<SimpleListGroup title="Group 2" id="group-2">
|
|
31
|
+
{group2Items}
|
|
32
|
+
</SimpleListGroup>
|
|
33
|
+
</SimpleList>
|
|
34
|
+
);
|
|
35
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SimpleList, SimpleListItem, SimpleListItemProps } from '@patternfly/react-core';
|
|
3
|
+
|
|
4
|
+
export const SimpleListUncontrolled: React.FunctionComponent = () => {
|
|
5
|
+
const [activeItem, setActiveItem] = React.useState(0);
|
|
6
|
+
|
|
7
|
+
const onSelect = (
|
|
8
|
+
selectedItem: React.RefObject<HTMLButtonElement> | React.RefObject<HTMLAnchorElement>,
|
|
9
|
+
selectedItemProps: SimpleListItemProps
|
|
10
|
+
) => {
|
|
11
|
+
setActiveItem(selectedItemProps.itemId as number);
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const items = [
|
|
15
|
+
<SimpleListItem key="item1" itemId={0} isActive={activeItem === 0}>
|
|
16
|
+
List item 1
|
|
17
|
+
</SimpleListItem>,
|
|
18
|
+
<SimpleListItem key="item2" itemId={1} isActive={activeItem === 1}>
|
|
19
|
+
List item 2
|
|
20
|
+
</SimpleListItem>,
|
|
21
|
+
<SimpleListItem key="item3" itemId={2} isActive={activeItem === 2}>
|
|
22
|
+
List item 3
|
|
23
|
+
</SimpleListItem>
|
|
24
|
+
];
|
|
25
|
+
|
|
26
|
+
return (
|
|
27
|
+
<SimpleList onSelect={onSelect} isControlled={false} aria-label="Uncontrolled Simple List Example">
|
|
28
|
+
{items}
|
|
29
|
+
</SimpleList>
|
|
30
|
+
);
|
|
31
|
+
};
|