@patternfly/react-core 4.221.12 → 4.221.15

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 (29) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/esm/components/DualListSelector/DualListSelector.d.ts +4 -0
  3. package/dist/esm/components/DualListSelector/DualListSelector.d.ts.map +1 -1
  4. package/dist/esm/components/DualListSelector/DualListSelector.js +13 -2
  5. package/dist/esm/components/DualListSelector/DualListSelector.js.map +1 -1
  6. package/dist/js/components/DualListSelector/DualListSelector.d.ts +4 -0
  7. package/dist/js/components/DualListSelector/DualListSelector.d.ts.map +1 -1
  8. package/dist/js/components/DualListSelector/DualListSelector.js +13 -2
  9. package/dist/js/components/DualListSelector/DualListSelector.js.map +1 -1
  10. package/dist/umd/react-core.css +144 -144
  11. package/dist/umd/react-core.js +13 -2
  12. package/dist/umd/react-core.min.js +1 -1
  13. package/package.json +5 -5
  14. package/src/components/DualListSelector/DualListSelector.tsx +14 -2
  15. package/src/components/DualListSelector/examples/DualListSelector.md +38 -767
  16. package/src/components/DualListSelector/examples/DualListSelectorBasic.tsx +26 -0
  17. package/src/components/DualListSelector/examples/DualListSelectorBasicSearch.tsx +27 -0
  18. package/src/components/DualListSelector/examples/DualListSelectorBasicTooltips.tsx +34 -0
  19. package/src/components/DualListSelector/examples/DualListSelectorComplexOptionsActions.tsx +146 -0
  20. package/src/components/DualListSelector/examples/DualListSelectorComposable.tsx +214 -0
  21. package/src/components/DualListSelector/examples/DualListSelectorComposableDragDrop.tsx +190 -0
  22. package/src/components/DualListSelector/examples/{ComposableTree.tsx → DualListSelectorComposableTree.tsx} +3 -3
  23. package/src/components/DualListSelector/examples/DualListSelectorTree.tsx +91 -0
  24. package/src/components/FormSelect/examples/FormSelect.md +5 -291
  25. package/src/components/FormSelect/examples/FormSelectBasic.tsx +28 -0
  26. package/src/components/FormSelect/examples/FormSelectDisabled.tsx +28 -0
  27. package/src/components/FormSelect/examples/FormSelectGrouped.tsx +49 -0
  28. package/src/components/FormSelect/examples/FormSelectIconSpriteVariant.tsx +57 -0
  29. package/src/components/FormSelect/examples/FormSelectValidated.tsx +69 -0
@@ -9951,150 +9951,6 @@ label.pf-c-input-group__text {
9951
9951
  --pf-c-sidebar__panel--FlexBasis: 100%;
9952
9952
  }
9953
9953
  }
9954
- .pf-c-label-group {
9955
- --pf-c-label-group__list--MarginBottom: calc(var(--pf-global--spacer--xs) * -1);
9956
- --pf-c-label-group__list--MarginRight: calc(var(--pf-global--spacer--xs) * -1);
9957
- --pf-c-label-group--m-category--PaddingTop: var(--pf-global--spacer--xs);
9958
- --pf-c-label-group--m-category--PaddingRight: var(--pf-global--spacer--xs);
9959
- --pf-c-label-group--m-category--PaddingBottom: var(--pf-global--spacer--xs);
9960
- --pf-c-label-group--m-category--PaddingLeft: var(--pf-global--spacer--sm);
9961
- --pf-c-label-group--m-vertical--m-category--PaddingRight: var(--pf-global--spacer--sm);
9962
- --pf-c-label-group--m-category--BorderRadius: var(--pf-global--BorderRadius--sm);
9963
- --pf-c-label-group--m-category--BorderWidth: var(--pf-global--BorderWidth--sm);
9964
- --pf-c-label-group--m-category--BorderColor: var(--pf-global--BorderColor--300);
9965
- --pf-c-label-group--m-category--BackgroundColor: var(--pf-global--BackgroundColor--100);
9966
- --pf-c-label-group__label--MarginRight: var(--pf-global--spacer--sm);
9967
- --pf-c-label-group__label--MarginBottom: 0;
9968
- --pf-c-label-group--m-vertical__label--MarginBottom: var(--pf-global--spacer--sm);
9969
- --pf-c-label-group__label--FontSize: var(--pf-global--FontSize--sm);
9970
- --pf-c-label-group__label--MaxWidth: 18ch;
9971
- --pf-c-label-group__close--MarginTop: calc(var(--pf-global--spacer--xs) * -1);
9972
- --pf-c-label-group__close--MarginBottom: calc(var(--pf-global--spacer--xs) * -1);
9973
- --pf-c-label-group--m-vertical__close--MarginTop: calc(var(--pf-global--spacer--form-element) * -1);
9974
- --pf-c-label-group--m-vertical__close--MarginRight: calc(var(--pf-global--spacer--form-element) * -1);
9975
- --pf-c-label-group--m-vertical__close--MarginLeft: var(--pf-global--spacer--sm);
9976
- --pf-c-label-group--m-vertical__close--c-button--PaddingRight: var(--pf-global--spacer--sm);
9977
- --pf-c-label-group--m-vertical__close--c-button--PaddingLeft: var(--pf-global--spacer--sm);
9978
- --pf-c-label-group__list-item--MarginRight: var(--pf-global--spacer--xs);
9979
- --pf-c-label-group__list-item--MarginBottom: var(--pf-global--spacer--xs);
9980
- --pf-c-label-group__textarea--MinWidth: 12.5rem;
9981
- --pf-c-label-group__textarea--PaddingTop: 0.125rem;
9982
- --pf-c-label-group__textarea--PaddingRight: var(--pf-global--spacer--xs);
9983
- --pf-c-label-group__textarea--PaddingBottom: 0;
9984
- --pf-c-label-group__textarea--PaddingLeft: var(--pf-global--spacer--xs);
9985
- display: inline-flex;
9986
- align-items: center;
9987
- }
9988
-
9989
- .pf-c-label-group.pf-m-category {
9990
- padding-top: var(--pf-c-label-group--m-category--PaddingTop);
9991
- padding-right: var(--pf-c-label-group--m-category--PaddingRight);
9992
- padding-bottom: var(--pf-c-label-group--m-category--PaddingBottom);
9993
- padding-left: var(--pf-c-label-group--m-category--PaddingLeft);
9994
- background-color: var(--pf-c-label-group--m-category--BackgroundColor);
9995
- border: var(--pf-c-label-group--m-category--BorderWidth) solid var(--pf-c-label-group--m-category--BorderColor);
9996
- border-radius: var(--pf-c-label-group--m-category--BorderRadius);
9997
- }
9998
-
9999
- .pf-c-label-group.pf-m-vertical {
10000
- --pf-c-label-group__list--MarginRight: 0;
10001
- --pf-c-label-group__list--MarginBottom: 0;
10002
- --pf-c-label-group__list-item--MarginRight: 0;
10003
- --pf-c-label-group__label--MarginRight: 0;
10004
- --pf-c-label-group__label--MarginBottom: var(--pf-c-label-group--m-vertical__label--MarginBottom);
10005
- --pf-c-label-group__close--MarginTop: var(--pf-c-label-group--m-vertical__close--MarginTop);
10006
- --pf-c-label-group__close--MarginLeft: var(--pf-c-label-group--m-vertical__close--MarginLeft);
10007
- --pf-c-label-group__close--MarginBottom: 0;
10008
- --pf-c-label-group__close--MarginRight: var(--pf-c-label-group--m-vertical__close--MarginRight);
10009
- --pf-c-label-group--m-category--PaddingRight: var(--pf-c-label-group--m-vertical--m-category--PaddingRight);
10010
- }
10011
-
10012
- .pf-c-label-group.pf-m-vertical.pf-c-label-group {
10013
- align-items: flex-start;
10014
- }
10015
-
10016
- .pf-c-label-group.pf-m-vertical .pf-c-label-group__list {
10017
- flex-direction: column;
10018
- align-items: flex-start;
10019
- }
10020
-
10021
- .pf-c-label-group.pf-m-vertical .pf-c-label-group__main {
10022
- flex-direction: column;
10023
- }
10024
-
10025
- .pf-c-label-group.pf-m-vertical .pf-c-label-group__list-item:last-child {
10026
- --pf-c-label-group__list-item--MarginBottom: 0;
10027
- }
10028
-
10029
- .pf-c-label-group.pf-m-vertical .pf-c-label-group__close .pf-c-button {
10030
- --pf-c-button--PaddingLeft: var(--pf-c-label-group--m-vertical__close--c-button--PaddingLeft);
10031
- --pf-c-button--PaddingRight: var(--pf-c-label-group--m-vertical__close--c-button--PaddingRight);
10032
- }
10033
-
10034
- .pf-c-label-group.pf-m-editable,
10035
- .pf-c-label-group.pf-m-editable .pf-c-label-group__main,
10036
- .pf-c-label-group.pf-m-editable .pf-c-label-group__list {
10037
- display: flex;
10038
- }
10039
-
10040
- .pf-c-label-group.pf-m-editable .pf-c-label-group__main,
10041
- .pf-c-label-group.pf-m-editable .pf-c-label-group__list,
10042
- .pf-c-label-group.pf-m-editable .pf-c-label-group__list-item.pf-m-textarea,
10043
- .pf-c-label-group.pf-m-editable .pf-c-label-group__textarea {
10044
- flex: 1;
10045
- }
10046
-
10047
- .pf-c-label-group__main {
10048
- display: flex;
10049
- flex: 1;
10050
- flex-wrap: wrap;
10051
- align-items: baseline;
10052
- }
10053
-
10054
- .pf-c-label-group__list {
10055
- display: inline-flex;
10056
- flex-wrap: wrap;
10057
- margin-right: var(--pf-c-label-group__list--MarginRight);
10058
- margin-bottom: var(--pf-c-label-group__list--MarginBottom);
10059
- }
10060
-
10061
- .pf-c-label-group__list-item {
10062
- display: inline-flex;
10063
- margin-right: var(--pf-c-label-group__list-item--MarginRight);
10064
- margin-bottom: var(--pf-c-label-group__list-item--MarginBottom);
10065
- }
10066
-
10067
- .pf-c-label-group__label {
10068
- overflow: hidden;
10069
- text-overflow: ellipsis;
10070
- white-space: nowrap;
10071
- max-width: var(--pf-c-label-group__label--MaxWidth);
10072
- margin-right: var(--pf-c-label-group__label--MarginRight);
10073
- margin-bottom: var(--pf-c-label-group__label--MarginBottom);
10074
- font-size: var(--pf-c-label-group__label--FontSize);
10075
- }
10076
-
10077
- .pf-c-label-group__close {
10078
- margin-top: var(--pf-c-label-group__close--MarginTop);
10079
- margin-right: var(--pf-c-label-group__close--MarginRight);
10080
- margin-bottom: var(--pf-c-label-group__close--MarginBottom);
10081
- margin-left: var(--pf-c-label-group__close--MarginLeft);
10082
- }
10083
-
10084
- .pf-c-label-group__textarea {
10085
- min-width: var(--pf-c-label-group__textarea--MinWidth);
10086
- padding: var(--pf-c-label-group__textarea--PaddingTop) var(--pf-c-label-group__textarea--PaddingRight) var(--pf-c-label-group__textarea--PaddingBottom) var(--pf-c-label-group__textarea--PaddingLeft);
10087
- white-space: nowrap;
10088
- resize: none;
10089
- border: 0;
10090
- -ms-overflow-style: none;
10091
- scrollbar-width: none;
10092
- }
10093
-
10094
- .pf-c-label-group__textarea::-webkit-scrollbar {
10095
- display: none;
10096
- }
10097
-
10098
9954
  .pf-c-label {
10099
9955
  --pf-c-label--PaddingTop: var(--pf-global--spacer--xs);
10100
9956
  --pf-c-label--PaddingRight: var(--pf-global--spacer--sm);
@@ -10558,6 +10414,150 @@ button.pf-c-label__content:focus {
10558
10414
  --pf-c-label--m-outline--m-cyan__content--link--focus--before--BorderColor: var(--pf-global--palette--cyan-100);
10559
10415
  }
10560
10416
 
10417
+ .pf-c-label-group {
10418
+ --pf-c-label-group__list--MarginBottom: calc(var(--pf-global--spacer--xs) * -1);
10419
+ --pf-c-label-group__list--MarginRight: calc(var(--pf-global--spacer--xs) * -1);
10420
+ --pf-c-label-group--m-category--PaddingTop: var(--pf-global--spacer--xs);
10421
+ --pf-c-label-group--m-category--PaddingRight: var(--pf-global--spacer--xs);
10422
+ --pf-c-label-group--m-category--PaddingBottom: var(--pf-global--spacer--xs);
10423
+ --pf-c-label-group--m-category--PaddingLeft: var(--pf-global--spacer--sm);
10424
+ --pf-c-label-group--m-vertical--m-category--PaddingRight: var(--pf-global--spacer--sm);
10425
+ --pf-c-label-group--m-category--BorderRadius: var(--pf-global--BorderRadius--sm);
10426
+ --pf-c-label-group--m-category--BorderWidth: var(--pf-global--BorderWidth--sm);
10427
+ --pf-c-label-group--m-category--BorderColor: var(--pf-global--BorderColor--300);
10428
+ --pf-c-label-group--m-category--BackgroundColor: var(--pf-global--BackgroundColor--100);
10429
+ --pf-c-label-group__label--MarginRight: var(--pf-global--spacer--sm);
10430
+ --pf-c-label-group__label--MarginBottom: 0;
10431
+ --pf-c-label-group--m-vertical__label--MarginBottom: var(--pf-global--spacer--sm);
10432
+ --pf-c-label-group__label--FontSize: var(--pf-global--FontSize--sm);
10433
+ --pf-c-label-group__label--MaxWidth: 18ch;
10434
+ --pf-c-label-group__close--MarginTop: calc(var(--pf-global--spacer--xs) * -1);
10435
+ --pf-c-label-group__close--MarginBottom: calc(var(--pf-global--spacer--xs) * -1);
10436
+ --pf-c-label-group--m-vertical__close--MarginTop: calc(var(--pf-global--spacer--form-element) * -1);
10437
+ --pf-c-label-group--m-vertical__close--MarginRight: calc(var(--pf-global--spacer--form-element) * -1);
10438
+ --pf-c-label-group--m-vertical__close--MarginLeft: var(--pf-global--spacer--sm);
10439
+ --pf-c-label-group--m-vertical__close--c-button--PaddingRight: var(--pf-global--spacer--sm);
10440
+ --pf-c-label-group--m-vertical__close--c-button--PaddingLeft: var(--pf-global--spacer--sm);
10441
+ --pf-c-label-group__list-item--MarginRight: var(--pf-global--spacer--xs);
10442
+ --pf-c-label-group__list-item--MarginBottom: var(--pf-global--spacer--xs);
10443
+ --pf-c-label-group__textarea--MinWidth: 12.5rem;
10444
+ --pf-c-label-group__textarea--PaddingTop: 0.125rem;
10445
+ --pf-c-label-group__textarea--PaddingRight: var(--pf-global--spacer--xs);
10446
+ --pf-c-label-group__textarea--PaddingBottom: 0;
10447
+ --pf-c-label-group__textarea--PaddingLeft: var(--pf-global--spacer--xs);
10448
+ display: inline-flex;
10449
+ align-items: center;
10450
+ }
10451
+
10452
+ .pf-c-label-group.pf-m-category {
10453
+ padding-top: var(--pf-c-label-group--m-category--PaddingTop);
10454
+ padding-right: var(--pf-c-label-group--m-category--PaddingRight);
10455
+ padding-bottom: var(--pf-c-label-group--m-category--PaddingBottom);
10456
+ padding-left: var(--pf-c-label-group--m-category--PaddingLeft);
10457
+ background-color: var(--pf-c-label-group--m-category--BackgroundColor);
10458
+ border: var(--pf-c-label-group--m-category--BorderWidth) solid var(--pf-c-label-group--m-category--BorderColor);
10459
+ border-radius: var(--pf-c-label-group--m-category--BorderRadius);
10460
+ }
10461
+
10462
+ .pf-c-label-group.pf-m-vertical {
10463
+ --pf-c-label-group__list--MarginRight: 0;
10464
+ --pf-c-label-group__list--MarginBottom: 0;
10465
+ --pf-c-label-group__list-item--MarginRight: 0;
10466
+ --pf-c-label-group__label--MarginRight: 0;
10467
+ --pf-c-label-group__label--MarginBottom: var(--pf-c-label-group--m-vertical__label--MarginBottom);
10468
+ --pf-c-label-group__close--MarginTop: var(--pf-c-label-group--m-vertical__close--MarginTop);
10469
+ --pf-c-label-group__close--MarginLeft: var(--pf-c-label-group--m-vertical__close--MarginLeft);
10470
+ --pf-c-label-group__close--MarginBottom: 0;
10471
+ --pf-c-label-group__close--MarginRight: var(--pf-c-label-group--m-vertical__close--MarginRight);
10472
+ --pf-c-label-group--m-category--PaddingRight: var(--pf-c-label-group--m-vertical--m-category--PaddingRight);
10473
+ }
10474
+
10475
+ .pf-c-label-group.pf-m-vertical.pf-c-label-group {
10476
+ align-items: flex-start;
10477
+ }
10478
+
10479
+ .pf-c-label-group.pf-m-vertical .pf-c-label-group__list {
10480
+ flex-direction: column;
10481
+ align-items: flex-start;
10482
+ }
10483
+
10484
+ .pf-c-label-group.pf-m-vertical .pf-c-label-group__main {
10485
+ flex-direction: column;
10486
+ }
10487
+
10488
+ .pf-c-label-group.pf-m-vertical .pf-c-label-group__list-item:last-child {
10489
+ --pf-c-label-group__list-item--MarginBottom: 0;
10490
+ }
10491
+
10492
+ .pf-c-label-group.pf-m-vertical .pf-c-label-group__close .pf-c-button {
10493
+ --pf-c-button--PaddingLeft: var(--pf-c-label-group--m-vertical__close--c-button--PaddingLeft);
10494
+ --pf-c-button--PaddingRight: var(--pf-c-label-group--m-vertical__close--c-button--PaddingRight);
10495
+ }
10496
+
10497
+ .pf-c-label-group.pf-m-editable,
10498
+ .pf-c-label-group.pf-m-editable .pf-c-label-group__main,
10499
+ .pf-c-label-group.pf-m-editable .pf-c-label-group__list {
10500
+ display: flex;
10501
+ }
10502
+
10503
+ .pf-c-label-group.pf-m-editable .pf-c-label-group__main,
10504
+ .pf-c-label-group.pf-m-editable .pf-c-label-group__list,
10505
+ .pf-c-label-group.pf-m-editable .pf-c-label-group__list-item.pf-m-textarea,
10506
+ .pf-c-label-group.pf-m-editable .pf-c-label-group__textarea {
10507
+ flex: 1;
10508
+ }
10509
+
10510
+ .pf-c-label-group__main {
10511
+ display: flex;
10512
+ flex: 1;
10513
+ flex-wrap: wrap;
10514
+ align-items: baseline;
10515
+ }
10516
+
10517
+ .pf-c-label-group__list {
10518
+ display: inline-flex;
10519
+ flex-wrap: wrap;
10520
+ margin-right: var(--pf-c-label-group__list--MarginRight);
10521
+ margin-bottom: var(--pf-c-label-group__list--MarginBottom);
10522
+ }
10523
+
10524
+ .pf-c-label-group__list-item {
10525
+ display: inline-flex;
10526
+ margin-right: var(--pf-c-label-group__list-item--MarginRight);
10527
+ margin-bottom: var(--pf-c-label-group__list-item--MarginBottom);
10528
+ }
10529
+
10530
+ .pf-c-label-group__label {
10531
+ overflow: hidden;
10532
+ text-overflow: ellipsis;
10533
+ white-space: nowrap;
10534
+ max-width: var(--pf-c-label-group__label--MaxWidth);
10535
+ margin-right: var(--pf-c-label-group__label--MarginRight);
10536
+ margin-bottom: var(--pf-c-label-group__label--MarginBottom);
10537
+ font-size: var(--pf-c-label-group__label--FontSize);
10538
+ }
10539
+
10540
+ .pf-c-label-group__close {
10541
+ margin-top: var(--pf-c-label-group__close--MarginTop);
10542
+ margin-right: var(--pf-c-label-group__close--MarginRight);
10543
+ margin-bottom: var(--pf-c-label-group__close--MarginBottom);
10544
+ margin-left: var(--pf-c-label-group__close--MarginLeft);
10545
+ }
10546
+
10547
+ .pf-c-label-group__textarea {
10548
+ min-width: var(--pf-c-label-group__textarea--MinWidth);
10549
+ padding: var(--pf-c-label-group__textarea--PaddingTop) var(--pf-c-label-group__textarea--PaddingRight) var(--pf-c-label-group__textarea--PaddingBottom) var(--pf-c-label-group__textarea--PaddingLeft);
10550
+ white-space: nowrap;
10551
+ resize: none;
10552
+ border: 0;
10553
+ -ms-overflow-style: none;
10554
+ scrollbar-width: none;
10555
+ }
10556
+
10557
+ .pf-c-label-group__textarea::-webkit-scrollbar {
10558
+ display: none;
10559
+ }
10560
+
10561
10561
  .pf-c-list {
10562
10562
  --pf-c-list--PaddingLeft: var(--pf-global--spacer--lg);
10563
10563
  --pf-c-list--nested--MarginTop: var(--pf-global--spacer--sm);
@@ -11294,6 +11294,15 @@
11294
11294
  this.addSelectedButtonRef = React__namespace.createRef();
11295
11295
  this.removeSelectedButtonRef = React__namespace.createRef();
11296
11296
  this.removeAllButtonRef = React__namespace.createRef();
11297
+ /** In dev environment, prevents circular structure during JSON stringification when
11298
+ * options passed in to the dual list selector include HTML elements.
11299
+ */
11300
+ this.replacer = (key, value) => {
11301
+ if (key[0] === '_') {
11302
+ return undefined;
11303
+ }
11304
+ return value;
11305
+ };
11297
11306
  this.onFilterUpdate = (newFilteredOptions, paneType, isSearchReset) => {
11298
11307
  const { isTree } = this.props;
11299
11308
  if (paneType === 'available') {
@@ -11643,8 +11652,10 @@
11643
11652
  : null;
11644
11653
  }
11645
11654
  componentDidUpdate() {
11646
- if (JSON.stringify(this.props.availableOptions) !== JSON.stringify(this.state.availableOptions) ||
11647
- JSON.stringify(this.props.chosenOptions) !== JSON.stringify(this.state.chosenOptions)) {
11655
+ if (JSON.stringify(this.props.availableOptions, this.replacer) !==
11656
+ JSON.stringify(this.state.availableOptions, this.replacer) ||
11657
+ JSON.stringify(this.props.chosenOptions, this.replacer) !==
11658
+ JSON.stringify(this.state.chosenOptions, this.replacer)) {
11648
11659
  this.setState({
11649
11660
  availableOptions: [...this.props.availableOptions],
11650
11661
  chosenOptions: [...this.props.chosenOptions]