@patternfly/react-core 4.184.2 → 4.186.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.
@@ -9128,6 +9128,149 @@ label.pf-c-input-group__text {
9128
9128
  --pf-c-sidebar__panel--FlexBasis: 100%;
9129
9129
  }
9130
9130
  }
9131
+ .pf-c-label-group {
9132
+ --pf-c-label-group__list--MarginBottom: calc(var(--pf-global--spacer--xs) * -1);
9133
+ --pf-c-label-group__list--MarginRight: calc(var(--pf-global--spacer--xs) * -1);
9134
+ --pf-c-label-group--m-category--PaddingTop: var(--pf-global--spacer--xs);
9135
+ --pf-c-label-group--m-category--PaddingRight: var(--pf-global--spacer--xs);
9136
+ --pf-c-label-group--m-category--PaddingBottom: var(--pf-global--spacer--xs);
9137
+ --pf-c-label-group--m-category--PaddingLeft: var(--pf-global--spacer--sm);
9138
+ --pf-c-label-group--m-vertical--m-category--PaddingRight: var(--pf-global--spacer--sm);
9139
+ --pf-c-label-group--m-category--BorderRadius: var(--pf-global--BorderRadius--sm);
9140
+ --pf-c-label-group--m-category--BorderWidth: var(--pf-global--BorderWidth--sm);
9141
+ --pf-c-label-group--m-category--BorderColor: var(--pf-global--BorderColor--300);
9142
+ --pf-c-label-group--m-category--BackgroundColor: var(--pf-global--BackgroundColor--100);
9143
+ --pf-c-label-group__label--MarginRight: var(--pf-global--spacer--sm);
9144
+ --pf-c-label-group__label--MarginBottom: 0;
9145
+ --pf-c-label-group--m-vertical__label--MarginBottom: var(--pf-global--spacer--sm);
9146
+ --pf-c-label-group__label--FontSize: var(--pf-global--FontSize--sm);
9147
+ --pf-c-label-group__label--MaxWidth: 18ch;
9148
+ --pf-c-label-group__close--MarginTop: calc(var(--pf-global--spacer--xs) * -1);
9149
+ --pf-c-label-group__close--MarginBottom: calc(var(--pf-global--spacer--xs) * -1);
9150
+ --pf-c-label-group--m-vertical__close--MarginTop: calc(var(--pf-global--spacer--form-element) * -1);
9151
+ --pf-c-label-group--m-vertical__close--MarginRight: calc(var(--pf-global--spacer--form-element) * -1);
9152
+ --pf-c-label-group--m-vertical__close--MarginLeft: var(--pf-global--spacer--sm);
9153
+ --pf-c-label-group--m-vertical__close--c-button--PaddingRight: var(--pf-global--spacer--sm);
9154
+ --pf-c-label-group--m-vertical__close--c-button--PaddingLeft: var(--pf-global--spacer--sm);
9155
+ --pf-c-label-group__list-item--MarginRight: var(--pf-global--spacer--xs);
9156
+ --pf-c-label-group__list-item--MarginBottom: var(--pf-global--spacer--xs);
9157
+ --pf-c-label-group__textarea--MinWidth: 12.5rem;
9158
+ --pf-c-label-group__textarea--PaddingTop: 0.125rem;
9159
+ --pf-c-label-group__textarea--PaddingRight: var(--pf-global--spacer--xs);
9160
+ --pf-c-label-group__textarea--PaddingBottom: 0;
9161
+ --pf-c-label-group__textarea--PaddingLeft: var(--pf-global--spacer--xs);
9162
+ display: inline-flex;
9163
+ }
9164
+
9165
+ .pf-c-label-group.pf-m-category {
9166
+ padding-top: var(--pf-c-label-group--m-category--PaddingTop);
9167
+ padding-right: var(--pf-c-label-group--m-category--PaddingRight);
9168
+ padding-bottom: var(--pf-c-label-group--m-category--PaddingBottom);
9169
+ padding-left: var(--pf-c-label-group--m-category--PaddingLeft);
9170
+ background-color: var(--pf-c-label-group--m-category--BackgroundColor);
9171
+ border: var(--pf-c-label-group--m-category--BorderWidth) solid var(--pf-c-label-group--m-category--BorderColor);
9172
+ border-radius: var(--pf-c-label-group--m-category--BorderRadius);
9173
+ }
9174
+
9175
+ .pf-c-label-group.pf-m-vertical {
9176
+ --pf-c-label-group__list--MarginRight: 0;
9177
+ --pf-c-label-group__list--MarginBottom: 0;
9178
+ --pf-c-label-group__list-item--MarginRight: 0;
9179
+ --pf-c-label-group__label--MarginRight: 0;
9180
+ --pf-c-label-group__label--MarginBottom: var(--pf-c-label-group--m-vertical__label--MarginBottom);
9181
+ --pf-c-label-group__close--MarginTop: var(--pf-c-label-group--m-vertical__close--MarginTop);
9182
+ --pf-c-label-group__close--MarginLeft: var(--pf-c-label-group--m-vertical__close--MarginLeft);
9183
+ --pf-c-label-group__close--MarginBottom: 0;
9184
+ --pf-c-label-group__close--MarginRight: var(--pf-c-label-group--m-vertical__close--MarginRight);
9185
+ --pf-c-label-group--m-category--PaddingRight: var(--pf-c-label-group--m-vertical--m-category--PaddingRight);
9186
+ }
9187
+
9188
+ .pf-c-label-group.pf-m-vertical.pf-c-label-group {
9189
+ align-items: flex-start;
9190
+ }
9191
+
9192
+ .pf-c-label-group.pf-m-vertical .pf-c-label-group__list {
9193
+ flex-direction: column;
9194
+ align-items: flex-start;
9195
+ }
9196
+
9197
+ .pf-c-label-group.pf-m-vertical .pf-c-label-group__main {
9198
+ flex-direction: column;
9199
+ }
9200
+
9201
+ .pf-c-label-group.pf-m-vertical .pf-c-label-group__list-item:last-child {
9202
+ --pf-c-label-group__list-item--MarginBottom: 0;
9203
+ }
9204
+
9205
+ .pf-c-label-group.pf-m-vertical .pf-c-label-group__close .pf-c-button {
9206
+ --pf-c-button--PaddingLeft: var(--pf-c-label-group--m-vertical__close--c-button--PaddingLeft);
9207
+ --pf-c-button--PaddingRight: var(--pf-c-label-group--m-vertical__close--c-button--PaddingRight);
9208
+ }
9209
+
9210
+ .pf-c-label-group.pf-m-editable,
9211
+ .pf-c-label-group.pf-m-editable .pf-c-label-group__main,
9212
+ .pf-c-label-group.pf-m-editable .pf-c-label-group__list {
9213
+ display: flex;
9214
+ }
9215
+
9216
+ .pf-c-label-group.pf-m-editable .pf-c-label-group__main,
9217
+ .pf-c-label-group.pf-m-editable .pf-c-label-group__list,
9218
+ .pf-c-label-group.pf-m-editable .pf-c-label-group__list-item.pf-m-textarea,
9219
+ .pf-c-label-group.pf-m-editable .pf-c-label-group__textarea {
9220
+ flex: 1;
9221
+ }
9222
+
9223
+ .pf-c-label-group__main {
9224
+ display: flex;
9225
+ flex: 1;
9226
+ flex-wrap: wrap;
9227
+ align-items: baseline;
9228
+ }
9229
+
9230
+ .pf-c-label-group__list {
9231
+ display: inline-flex;
9232
+ flex-wrap: wrap;
9233
+ margin-right: var(--pf-c-label-group__list--MarginRight);
9234
+ margin-bottom: var(--pf-c-label-group__list--MarginBottom);
9235
+ }
9236
+
9237
+ .pf-c-label-group__list-item {
9238
+ display: inline-flex;
9239
+ margin-right: var(--pf-c-label-group__list-item--MarginRight);
9240
+ margin-bottom: var(--pf-c-label-group__list-item--MarginBottom);
9241
+ }
9242
+
9243
+ .pf-c-label-group__label {
9244
+ overflow: hidden;
9245
+ text-overflow: ellipsis;
9246
+ white-space: nowrap;
9247
+ max-width: var(--pf-c-label-group__label--MaxWidth);
9248
+ margin-right: var(--pf-c-label-group__label--MarginRight);
9249
+ margin-bottom: var(--pf-c-label-group__label--MarginBottom);
9250
+ font-size: var(--pf-c-label-group__label--FontSize);
9251
+ }
9252
+
9253
+ .pf-c-label-group__close {
9254
+ margin-top: var(--pf-c-label-group__close--MarginTop);
9255
+ margin-right: var(--pf-c-label-group__close--MarginRight);
9256
+ margin-bottom: var(--pf-c-label-group__close--MarginBottom);
9257
+ margin-left: var(--pf-c-label-group__close--MarginLeft);
9258
+ }
9259
+
9260
+ .pf-c-label-group__textarea {
9261
+ min-width: var(--pf-c-label-group__textarea--MinWidth);
9262
+ 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);
9263
+ white-space: nowrap;
9264
+ resize: none;
9265
+ border: 0;
9266
+ -ms-overflow-style: none;
9267
+ scrollbar-width: none;
9268
+ }
9269
+
9270
+ .pf-c-label-group__textarea::-webkit-scrollbar {
9271
+ display: none;
9272
+ }
9273
+
9131
9274
  .pf-c-label {
9132
9275
  --pf-c-label--PaddingTop: var(--pf-global--spacer--xs);
9133
9276
  --pf-c-label--PaddingRight: var(--pf-global--spacer--sm);
@@ -9489,149 +9632,6 @@ button.pf-c-label__content:focus {
9489
9632
  color: var(--pf-c-label__icon--Color);
9490
9633
  }
9491
9634
 
9492
- .pf-c-label-group {
9493
- --pf-c-label-group__list--MarginBottom: calc(var(--pf-global--spacer--xs) * -1);
9494
- --pf-c-label-group__list--MarginRight: calc(var(--pf-global--spacer--xs) * -1);
9495
- --pf-c-label-group--m-category--PaddingTop: var(--pf-global--spacer--xs);
9496
- --pf-c-label-group--m-category--PaddingRight: var(--pf-global--spacer--xs);
9497
- --pf-c-label-group--m-category--PaddingBottom: var(--pf-global--spacer--xs);
9498
- --pf-c-label-group--m-category--PaddingLeft: var(--pf-global--spacer--sm);
9499
- --pf-c-label-group--m-vertical--m-category--PaddingRight: var(--pf-global--spacer--sm);
9500
- --pf-c-label-group--m-category--BorderRadius: var(--pf-global--BorderRadius--sm);
9501
- --pf-c-label-group--m-category--BorderWidth: var(--pf-global--BorderWidth--sm);
9502
- --pf-c-label-group--m-category--BorderColor: var(--pf-global--BorderColor--300);
9503
- --pf-c-label-group--m-category--BackgroundColor: var(--pf-global--BackgroundColor--100);
9504
- --pf-c-label-group__label--MarginRight: var(--pf-global--spacer--sm);
9505
- --pf-c-label-group__label--MarginBottom: 0;
9506
- --pf-c-label-group--m-vertical__label--MarginBottom: var(--pf-global--spacer--sm);
9507
- --pf-c-label-group__label--FontSize: var(--pf-global--FontSize--sm);
9508
- --pf-c-label-group__label--MaxWidth: 18ch;
9509
- --pf-c-label-group__close--MarginTop: calc(var(--pf-global--spacer--xs) * -1);
9510
- --pf-c-label-group__close--MarginBottom: calc(var(--pf-global--spacer--xs) * -1);
9511
- --pf-c-label-group--m-vertical__close--MarginTop: calc(var(--pf-global--spacer--form-element) * -1);
9512
- --pf-c-label-group--m-vertical__close--MarginRight: calc(var(--pf-global--spacer--form-element) * -1);
9513
- --pf-c-label-group--m-vertical__close--MarginLeft: var(--pf-global--spacer--sm);
9514
- --pf-c-label-group--m-vertical__close--c-button--PaddingRight: var(--pf-global--spacer--sm);
9515
- --pf-c-label-group--m-vertical__close--c-button--PaddingLeft: var(--pf-global--spacer--sm);
9516
- --pf-c-label-group__list-item--MarginRight: var(--pf-global--spacer--xs);
9517
- --pf-c-label-group__list-item--MarginBottom: var(--pf-global--spacer--xs);
9518
- --pf-c-label-group__textarea--MinWidth: 12.5rem;
9519
- --pf-c-label-group__textarea--PaddingTop: 0.125rem;
9520
- --pf-c-label-group__textarea--PaddingRight: var(--pf-global--spacer--xs);
9521
- --pf-c-label-group__textarea--PaddingBottom: 0;
9522
- --pf-c-label-group__textarea--PaddingLeft: var(--pf-global--spacer--xs);
9523
- display: inline-flex;
9524
- }
9525
-
9526
- .pf-c-label-group.pf-m-category {
9527
- padding-top: var(--pf-c-label-group--m-category--PaddingTop);
9528
- padding-right: var(--pf-c-label-group--m-category--PaddingRight);
9529
- padding-bottom: var(--pf-c-label-group--m-category--PaddingBottom);
9530
- padding-left: var(--pf-c-label-group--m-category--PaddingLeft);
9531
- background-color: var(--pf-c-label-group--m-category--BackgroundColor);
9532
- border: var(--pf-c-label-group--m-category--BorderWidth) solid var(--pf-c-label-group--m-category--BorderColor);
9533
- border-radius: var(--pf-c-label-group--m-category--BorderRadius);
9534
- }
9535
-
9536
- .pf-c-label-group.pf-m-vertical {
9537
- --pf-c-label-group__list--MarginRight: 0;
9538
- --pf-c-label-group__list--MarginBottom: 0;
9539
- --pf-c-label-group__list-item--MarginRight: 0;
9540
- --pf-c-label-group__label--MarginRight: 0;
9541
- --pf-c-label-group__label--MarginBottom: var(--pf-c-label-group--m-vertical__label--MarginBottom);
9542
- --pf-c-label-group__close--MarginTop: var(--pf-c-label-group--m-vertical__close--MarginTop);
9543
- --pf-c-label-group__close--MarginLeft: var(--pf-c-label-group--m-vertical__close--MarginLeft);
9544
- --pf-c-label-group__close--MarginBottom: 0;
9545
- --pf-c-label-group__close--MarginRight: var(--pf-c-label-group--m-vertical__close--MarginRight);
9546
- --pf-c-label-group--m-category--PaddingRight: var(--pf-c-label-group--m-vertical--m-category--PaddingRight);
9547
- }
9548
-
9549
- .pf-c-label-group.pf-m-vertical.pf-c-label-group {
9550
- align-items: flex-start;
9551
- }
9552
-
9553
- .pf-c-label-group.pf-m-vertical .pf-c-label-group__list {
9554
- flex-direction: column;
9555
- align-items: flex-start;
9556
- }
9557
-
9558
- .pf-c-label-group.pf-m-vertical .pf-c-label-group__main {
9559
- flex-direction: column;
9560
- }
9561
-
9562
- .pf-c-label-group.pf-m-vertical .pf-c-label-group__list-item:last-child {
9563
- --pf-c-label-group__list-item--MarginBottom: 0;
9564
- }
9565
-
9566
- .pf-c-label-group.pf-m-vertical .pf-c-label-group__close .pf-c-button {
9567
- --pf-c-button--PaddingLeft: var(--pf-c-label-group--m-vertical__close--c-button--PaddingLeft);
9568
- --pf-c-button--PaddingRight: var(--pf-c-label-group--m-vertical__close--c-button--PaddingRight);
9569
- }
9570
-
9571
- .pf-c-label-group.pf-m-editable,
9572
- .pf-c-label-group.pf-m-editable .pf-c-label-group__main,
9573
- .pf-c-label-group.pf-m-editable .pf-c-label-group__list {
9574
- display: flex;
9575
- }
9576
-
9577
- .pf-c-label-group.pf-m-editable .pf-c-label-group__main,
9578
- .pf-c-label-group.pf-m-editable .pf-c-label-group__list,
9579
- .pf-c-label-group.pf-m-editable .pf-c-label-group__list-item.pf-m-textarea,
9580
- .pf-c-label-group.pf-m-editable .pf-c-label-group__textarea {
9581
- flex: 1;
9582
- }
9583
-
9584
- .pf-c-label-group__main {
9585
- display: flex;
9586
- flex: 1;
9587
- flex-wrap: wrap;
9588
- align-items: baseline;
9589
- }
9590
-
9591
- .pf-c-label-group__list {
9592
- display: inline-flex;
9593
- flex-wrap: wrap;
9594
- margin-right: var(--pf-c-label-group__list--MarginRight);
9595
- margin-bottom: var(--pf-c-label-group__list--MarginBottom);
9596
- }
9597
-
9598
- .pf-c-label-group__list-item {
9599
- display: inline-flex;
9600
- margin-right: var(--pf-c-label-group__list-item--MarginRight);
9601
- margin-bottom: var(--pf-c-label-group__list-item--MarginBottom);
9602
- }
9603
-
9604
- .pf-c-label-group__label {
9605
- overflow: hidden;
9606
- text-overflow: ellipsis;
9607
- white-space: nowrap;
9608
- max-width: var(--pf-c-label-group__label--MaxWidth);
9609
- margin-right: var(--pf-c-label-group__label--MarginRight);
9610
- margin-bottom: var(--pf-c-label-group__label--MarginBottom);
9611
- font-size: var(--pf-c-label-group__label--FontSize);
9612
- }
9613
-
9614
- .pf-c-label-group__close {
9615
- margin-top: var(--pf-c-label-group__close--MarginTop);
9616
- margin-right: var(--pf-c-label-group__close--MarginRight);
9617
- margin-bottom: var(--pf-c-label-group__close--MarginBottom);
9618
- margin-left: var(--pf-c-label-group__close--MarginLeft);
9619
- }
9620
-
9621
- .pf-c-label-group__textarea {
9622
- min-width: var(--pf-c-label-group__textarea--MinWidth);
9623
- 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);
9624
- white-space: nowrap;
9625
- resize: none;
9626
- border: 0;
9627
- -ms-overflow-style: none;
9628
- scrollbar-width: none;
9629
- }
9630
-
9631
- .pf-c-label-group__textarea::-webkit-scrollbar {
9632
- display: none;
9633
- }
9634
-
9635
9635
  .pf-c-inline-edit {
9636
9636
  --pf-c-inline-edit__group--item--MarginRight: var(--pf-global--spacer--sm);
9637
9637
  --pf-c-inline-edit__action--c-button--m-valid--m-plain--Color: var(--pf-global--link--Color);
@@ -6698,19 +6698,26 @@
6698
6698
  // if viewMoreNextIndex is not -1, view more was clicked, set focus on first newly loaded item
6699
6699
  if (this.state.viewMoreNextIndex !== -1 &&
6700
6700
  this.refCollection.length > this.state.viewMoreNextIndex &&
6701
- this.props.loadingVariant !== 'spinner') {
6701
+ this.props.loadingVariant !== 'spinner' &&
6702
+ this.refCollection[this.state.viewMoreNextIndex][0]) {
6702
6703
  this.refCollection[this.state.viewMoreNextIndex][0].focus();
6703
6704
  }
6704
- // the number or contents of the children has changed, update state.typeaheadFilteredChildren
6705
- if (prevProps.children.length !== this.props.children.length ||
6706
- prevProps.children.some((child, index) => {
6707
- if (child.props && this.props.children[index].props) {
6708
- return child.props.value !== this.props.children[index].props.value;
6705
+ const hasUpdatedChildren = prevProps.children.length !== this.props.children.length ||
6706
+ prevProps.children.some((prevChild, index) => {
6707
+ const prevChildProps = prevChild.props;
6708
+ const currChild = this.props.children[index];
6709
+ const { props: currChildProps } = currChild;
6710
+ if (prevChildProps && currChildProps) {
6711
+ return (prevChildProps.value !== currChildProps.value ||
6712
+ prevChildProps.label !== currChildProps.label ||
6713
+ prevChildProps.isDisabled !== currChildProps.isDisabled ||
6714
+ prevChildProps.isPlaceholder !== currChildProps.isPlaceholder);
6709
6715
  }
6710
6716
  else {
6711
- return child !== this.props.children[index];
6717
+ return prevChild !== currChild;
6712
6718
  }
6713
- })) {
6719
+ });
6720
+ if (hasUpdatedChildren) {
6714
6721
  this.updateTypeAheadFilteredChildren(prevState.typeaheadInputValue || '', null);
6715
6722
  }
6716
6723
  // for menus with favorites,
@@ -18199,16 +18206,6 @@
18199
18206
  "toggleGroupText": "pf-c-toggle-group__text"
18200
18207
  };
18201
18208
 
18202
- const ToggleGroup = (_a) => {
18203
- var { className, children, isCompact = false, 'aria-label': ariaLabel } = _a, props = __rest$1(_a, ["className", "children", "isCompact", 'aria-label']);
18204
- const toggleGroupItemList = [];
18205
- React__namespace.Children.forEach(children, child => {
18206
- toggleGroupItemList.push(child);
18207
- });
18208
- return (React__namespace.createElement("div", Object.assign({ className: css(_default$d.toggleGroup, isCompact && _default$d.modifiers.compact, className), role: "group", "aria-label": ariaLabel }, props), toggleGroupItemList));
18209
- };
18210
- ToggleGroup.displayName = 'ToggleGroup';
18211
-
18212
18209
  var ToggleGroupItemVariant;
18213
18210
  (function (ToggleGroupItemVariant) {
18214
18211
  ToggleGroupItemVariant["icon"] = "icon";
@@ -18233,6 +18230,18 @@
18233
18230
  };
18234
18231
  ToggleGroupItem.displayName = 'ToggleGroupItem';
18235
18232
 
18233
+ const ToggleGroup = (_a) => {
18234
+ var { className, children, isCompact = false, areAllGroupsDisabled = false, 'aria-label': ariaLabel } = _a, props = __rest$1(_a, ["className", "children", "isCompact", "areAllGroupsDisabled", 'aria-label']);
18235
+ const toggleGroupItemList = React__namespace.Children.map(children, child => {
18236
+ const childCompName = child.type.name;
18237
+ return childCompName !== ToggleGroupItem.name
18238
+ ? child
18239
+ : React__namespace.cloneElement(child, areAllGroupsDisabled ? { isDisabled: true } : {});
18240
+ });
18241
+ return (React__namespace.createElement("div", Object.assign({ className: css(_default$d.toggleGroup, isCompact && _default$d.modifiers.compact, className), role: "group", "aria-label": ariaLabel }, props), toggleGroupItemList));
18242
+ };
18243
+ ToggleGroup.displayName = 'ToggleGroup';
18244
+
18236
18245
  var _default$c = {
18237
18246
  "button": "pf-c-button",
18238
18247
  "chipGroup": "pf-c-chip-group",