@patternfly/react-core 4.221.1 → 4.221.4
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 +24 -0
- package/dist/esm/components/AboutModal/AboutModal.d.ts +2 -2
- package/dist/esm/components/AboutModal/AboutModal.d.ts.map +1 -1
- package/dist/esm/components/AboutModal/AboutModalBox.d.ts +2 -2
- package/dist/esm/components/AboutModal/AboutModalBox.d.ts.map +1 -1
- package/dist/esm/components/DataList/DataList.d.ts +9 -0
- package/dist/esm/components/DataList/DataList.d.ts.map +1 -1
- package/dist/esm/components/DataList/DataList.js +3 -2
- package/dist/esm/components/DataList/DataList.js.map +1 -1
- package/dist/esm/components/DataList/DataListItem.d.ts +2 -0
- package/dist/esm/components/DataList/DataListItem.d.ts.map +1 -1
- package/dist/esm/components/DataList/DataListItem.js +13 -6
- package/dist/esm/components/DataList/DataListItem.js.map +1 -1
- package/dist/esm/components/Select/Select.d.ts +2 -0
- package/dist/esm/components/Select/Select.d.ts.map +1 -1
- package/dist/esm/components/Select/Select.js +8 -7
- package/dist/esm/components/Select/Select.js.map +1 -1
- package/dist/js/components/AboutModal/AboutModal.d.ts +2 -2
- package/dist/js/components/AboutModal/AboutModal.d.ts.map +1 -1
- package/dist/js/components/AboutModal/AboutModalBox.d.ts +2 -2
- package/dist/js/components/AboutModal/AboutModalBox.d.ts.map +1 -1
- package/dist/js/components/DataList/DataList.d.ts +9 -0
- package/dist/js/components/DataList/DataList.d.ts.map +1 -1
- package/dist/js/components/DataList/DataList.js +3 -2
- package/dist/js/components/DataList/DataList.js.map +1 -1
- package/dist/js/components/DataList/DataListItem.d.ts +2 -0
- package/dist/js/components/DataList/DataListItem.d.ts.map +1 -1
- package/dist/js/components/DataList/DataListItem.js +13 -6
- package/dist/js/components/DataList/DataListItem.js.map +1 -1
- package/dist/js/components/Select/Select.d.ts +2 -0
- package/dist/js/components/Select/Select.d.ts.map +1 -1
- package/dist/js/components/Select/Select.js +8 -7
- package/dist/js/components/Select/Select.js.map +1 -1
- package/dist/umd/react-core.css +83 -83
- package/dist/umd/react-core.js +24 -15
- package/dist/umd/react-core.min.js +4 -4
- package/package.json +6 -6
- package/src/components/AboutModal/AboutModal.tsx +2 -2
- package/src/components/AboutModal/AboutModalBox.tsx +2 -2
- package/src/components/DataList/DataList.tsx +12 -0
- package/src/components/DataList/DataListItem.tsx +32 -3
- package/src/components/DataList/__tests__/DataList.test.tsx +130 -0
- package/src/components/DataList/examples/DataList.md +1 -0
- package/src/components/DataList/examples/DataListSelectableRows.tsx +5 -0
- package/src/components/Select/Select.tsx +8 -2
- package/src/demos/PrimaryDetail.md +1 -1
package/dist/umd/react-core.css
CHANGED
|
@@ -23107,89 +23107,6 @@ svg.pf-c-spinner.pf-m-xl {
|
|
|
23107
23107
|
--pf-c-droppable--m-dragging--after--BorderColor: var(--pf-c-droppable--m-drag-outside--after--BorderColor);
|
|
23108
23108
|
}
|
|
23109
23109
|
|
|
23110
|
-
.pf-c-panel {
|
|
23111
|
-
--pf-c-panel--Width: auto;
|
|
23112
|
-
--pf-c-panel--MinWidth: auto;
|
|
23113
|
-
--pf-c-panel--MaxWidth: none;
|
|
23114
|
-
--pf-c-panel--ZIndex: auto;
|
|
23115
|
-
--pf-c-panel--BackgroundColor: var(--pf-global--BackgroundColor--100);
|
|
23116
|
-
--pf-c-panel--BoxShadow: none;
|
|
23117
|
-
--pf-c-panel--before--BorderWidth: 0;
|
|
23118
|
-
--pf-c-panel--before--BorderColor: var(--pf-global--BorderColor--100);
|
|
23119
|
-
--pf-c-panel--m-bordered--before--BorderWidth: var(--pf-global--BorderWidth--sm);
|
|
23120
|
-
--pf-c-panel--m-raised--BoxShadow: var(--pf-global--BoxShadow--md);
|
|
23121
|
-
--pf-c-panel--m-raised--ZIndex: var(--pf-global--ZIndex--sm);
|
|
23122
|
-
--pf-c-panel__header--PaddingTop: var(--pf-global--spacer--md);
|
|
23123
|
-
--pf-c-panel__header--PaddingRight: var(--pf-global--spacer--md);
|
|
23124
|
-
--pf-c-panel__header--PaddingBottom: var(--pf-global--spacer--md);
|
|
23125
|
-
--pf-c-panel__header--PaddingLeft: var(--pf-global--spacer--md);
|
|
23126
|
-
--pf-c-panel__main--MaxHeight: none;
|
|
23127
|
-
--pf-c-panel__main--Overflow: visible;
|
|
23128
|
-
--pf-c-panel__main-body--PaddingTop: var(--pf-global--spacer--md);
|
|
23129
|
-
--pf-c-panel__main-body--PaddingRight: var(--pf-global--spacer--md);
|
|
23130
|
-
--pf-c-panel__main-body--PaddingBottom: var(--pf-global--spacer--md);
|
|
23131
|
-
--pf-c-panel__main-body--PaddingLeft: var(--pf-global--spacer--md);
|
|
23132
|
-
--pf-c-panel__footer--PaddingTop: var(--pf-global--spacer--md);
|
|
23133
|
-
--pf-c-panel__footer--PaddingRight: var(--pf-global--spacer--md);
|
|
23134
|
-
--pf-c-panel__footer--PaddingBottom: var(--pf-global--spacer--md);
|
|
23135
|
-
--pf-c-panel__footer--PaddingLeft: var(--pf-global--spacer--md);
|
|
23136
|
-
--pf-c-panel__footer--BoxShadow: none;
|
|
23137
|
-
--pf-c-panel--m-scrollable__main--MaxHeight: 18.75rem;
|
|
23138
|
-
--pf-c-panel--m-scrollable__main--Overflow: auto;
|
|
23139
|
-
--pf-c-panel--m-scrollable__footer--BoxShadow: 0 -0.3125rem 0.25rem -0.25rem rgba(3, 3, 3, 0.16);
|
|
23140
|
-
position: relative;
|
|
23141
|
-
z-index: var(--pf-c-panel--ZIndex);
|
|
23142
|
-
width: var(--pf-c-panel--Width);
|
|
23143
|
-
min-width: var(--pf-c-panel--MinWidth);
|
|
23144
|
-
max-width: var(--pf-c-panel--MaxWidth);
|
|
23145
|
-
background-color: var(--pf-c-panel--BackgroundColor);
|
|
23146
|
-
box-shadow: var(--pf-c-panel--BoxShadow);
|
|
23147
|
-
}
|
|
23148
|
-
|
|
23149
|
-
.pf-c-panel::before {
|
|
23150
|
-
position: absolute;
|
|
23151
|
-
top: 0;
|
|
23152
|
-
right: 0;
|
|
23153
|
-
bottom: 0;
|
|
23154
|
-
left: 0;
|
|
23155
|
-
pointer-events: none;
|
|
23156
|
-
content: "";
|
|
23157
|
-
border: var(--pf-c-panel--before--BorderWidth) solid var(--pf-c-panel--before--BorderColor);
|
|
23158
|
-
}
|
|
23159
|
-
|
|
23160
|
-
.pf-c-panel.pf-m-bordered {
|
|
23161
|
-
--pf-c-panel--before--BorderWidth: var(--pf-c-panel--m-bordered--before--BorderWidth);
|
|
23162
|
-
}
|
|
23163
|
-
|
|
23164
|
-
.pf-c-panel.pf-m-raised {
|
|
23165
|
-
--pf-c-panel--BoxShadow: var(--pf-c-panel--m-raised--BoxShadow);
|
|
23166
|
-
--pf-c-panel--ZIndex: var(--pf-c-panel--m-raised--ZIndex);
|
|
23167
|
-
}
|
|
23168
|
-
|
|
23169
|
-
.pf-c-panel.pf-m-scrollable {
|
|
23170
|
-
--pf-c-panel__main--MaxHeight: var(--pf-c-panel--m-scrollable__main--MaxHeight);
|
|
23171
|
-
--pf-c-panel__main--Overflow: var(--pf-c-panel--m-scrollable__main--Overflow);
|
|
23172
|
-
--pf-c-panel__footer--BoxShadow: var(--pf-c-panel--m-scrollable__footer--BoxShadow);
|
|
23173
|
-
}
|
|
23174
|
-
|
|
23175
|
-
.pf-c-panel__header {
|
|
23176
|
-
padding: var(--pf-c-panel__header--PaddingTop) var(--pf-c-panel__header--PaddingRight) var(--pf-c-panel__header--PaddingBottom) var(--pf-c-panel__header--PaddingLeft);
|
|
23177
|
-
}
|
|
23178
|
-
|
|
23179
|
-
.pf-c-panel__main {
|
|
23180
|
-
max-height: var(--pf-c-panel__main--MaxHeight);
|
|
23181
|
-
overflow: var(--pf-c-panel__main--Overflow);
|
|
23182
|
-
}
|
|
23183
|
-
|
|
23184
|
-
.pf-c-panel__main-body {
|
|
23185
|
-
padding: var(--pf-c-panel__main-body--PaddingTop) var(--pf-c-panel__main-body--PaddingRight) var(--pf-c-panel__main-body--PaddingBottom) var(--pf-c-panel__main-body--PaddingLeft);
|
|
23186
|
-
}
|
|
23187
|
-
|
|
23188
|
-
.pf-c-panel__footer {
|
|
23189
|
-
padding: var(--pf-c-panel__footer--PaddingTop) var(--pf-c-panel__footer--PaddingRight) var(--pf-c-panel__footer--PaddingBottom) var(--pf-c-panel__footer--PaddingLeft);
|
|
23190
|
-
box-shadow: var(--pf-c-panel__footer--BoxShadow);
|
|
23191
|
-
}
|
|
23192
|
-
|
|
23193
23110
|
.pf-c-text-input-group {
|
|
23194
23111
|
--pf-c-text-input-group--BackgroundColor: var(--pf-global--BackgroundColor--100);
|
|
23195
23112
|
--pf-c-text-input-group__text--before--BorderWidth: var(--pf-global--BorderWidth--sm);
|
|
@@ -23362,6 +23279,89 @@ svg.pf-c-spinner.pf-m-xl {
|
|
|
23362
23279
|
display: flex;
|
|
23363
23280
|
}
|
|
23364
23281
|
|
|
23282
|
+
.pf-c-panel {
|
|
23283
|
+
--pf-c-panel--Width: auto;
|
|
23284
|
+
--pf-c-panel--MinWidth: auto;
|
|
23285
|
+
--pf-c-panel--MaxWidth: none;
|
|
23286
|
+
--pf-c-panel--ZIndex: auto;
|
|
23287
|
+
--pf-c-panel--BackgroundColor: var(--pf-global--BackgroundColor--100);
|
|
23288
|
+
--pf-c-panel--BoxShadow: none;
|
|
23289
|
+
--pf-c-panel--before--BorderWidth: 0;
|
|
23290
|
+
--pf-c-panel--before--BorderColor: var(--pf-global--BorderColor--100);
|
|
23291
|
+
--pf-c-panel--m-bordered--before--BorderWidth: var(--pf-global--BorderWidth--sm);
|
|
23292
|
+
--pf-c-panel--m-raised--BoxShadow: var(--pf-global--BoxShadow--md);
|
|
23293
|
+
--pf-c-panel--m-raised--ZIndex: var(--pf-global--ZIndex--sm);
|
|
23294
|
+
--pf-c-panel__header--PaddingTop: var(--pf-global--spacer--md);
|
|
23295
|
+
--pf-c-panel__header--PaddingRight: var(--pf-global--spacer--md);
|
|
23296
|
+
--pf-c-panel__header--PaddingBottom: var(--pf-global--spacer--md);
|
|
23297
|
+
--pf-c-panel__header--PaddingLeft: var(--pf-global--spacer--md);
|
|
23298
|
+
--pf-c-panel__main--MaxHeight: none;
|
|
23299
|
+
--pf-c-panel__main--Overflow: visible;
|
|
23300
|
+
--pf-c-panel__main-body--PaddingTop: var(--pf-global--spacer--md);
|
|
23301
|
+
--pf-c-panel__main-body--PaddingRight: var(--pf-global--spacer--md);
|
|
23302
|
+
--pf-c-panel__main-body--PaddingBottom: var(--pf-global--spacer--md);
|
|
23303
|
+
--pf-c-panel__main-body--PaddingLeft: var(--pf-global--spacer--md);
|
|
23304
|
+
--pf-c-panel__footer--PaddingTop: var(--pf-global--spacer--md);
|
|
23305
|
+
--pf-c-panel__footer--PaddingRight: var(--pf-global--spacer--md);
|
|
23306
|
+
--pf-c-panel__footer--PaddingBottom: var(--pf-global--spacer--md);
|
|
23307
|
+
--pf-c-panel__footer--PaddingLeft: var(--pf-global--spacer--md);
|
|
23308
|
+
--pf-c-panel__footer--BoxShadow: none;
|
|
23309
|
+
--pf-c-panel--m-scrollable__main--MaxHeight: 18.75rem;
|
|
23310
|
+
--pf-c-panel--m-scrollable__main--Overflow: auto;
|
|
23311
|
+
--pf-c-panel--m-scrollable__footer--BoxShadow: 0 -0.3125rem 0.25rem -0.25rem rgba(3, 3, 3, 0.16);
|
|
23312
|
+
position: relative;
|
|
23313
|
+
z-index: var(--pf-c-panel--ZIndex);
|
|
23314
|
+
width: var(--pf-c-panel--Width);
|
|
23315
|
+
min-width: var(--pf-c-panel--MinWidth);
|
|
23316
|
+
max-width: var(--pf-c-panel--MaxWidth);
|
|
23317
|
+
background-color: var(--pf-c-panel--BackgroundColor);
|
|
23318
|
+
box-shadow: var(--pf-c-panel--BoxShadow);
|
|
23319
|
+
}
|
|
23320
|
+
|
|
23321
|
+
.pf-c-panel::before {
|
|
23322
|
+
position: absolute;
|
|
23323
|
+
top: 0;
|
|
23324
|
+
right: 0;
|
|
23325
|
+
bottom: 0;
|
|
23326
|
+
left: 0;
|
|
23327
|
+
pointer-events: none;
|
|
23328
|
+
content: "";
|
|
23329
|
+
border: var(--pf-c-panel--before--BorderWidth) solid var(--pf-c-panel--before--BorderColor);
|
|
23330
|
+
}
|
|
23331
|
+
|
|
23332
|
+
.pf-c-panel.pf-m-bordered {
|
|
23333
|
+
--pf-c-panel--before--BorderWidth: var(--pf-c-panel--m-bordered--before--BorderWidth);
|
|
23334
|
+
}
|
|
23335
|
+
|
|
23336
|
+
.pf-c-panel.pf-m-raised {
|
|
23337
|
+
--pf-c-panel--BoxShadow: var(--pf-c-panel--m-raised--BoxShadow);
|
|
23338
|
+
--pf-c-panel--ZIndex: var(--pf-c-panel--m-raised--ZIndex);
|
|
23339
|
+
}
|
|
23340
|
+
|
|
23341
|
+
.pf-c-panel.pf-m-scrollable {
|
|
23342
|
+
--pf-c-panel__main--MaxHeight: var(--pf-c-panel--m-scrollable__main--MaxHeight);
|
|
23343
|
+
--pf-c-panel__main--Overflow: var(--pf-c-panel--m-scrollable__main--Overflow);
|
|
23344
|
+
--pf-c-panel__footer--BoxShadow: var(--pf-c-panel--m-scrollable__footer--BoxShadow);
|
|
23345
|
+
}
|
|
23346
|
+
|
|
23347
|
+
.pf-c-panel__header {
|
|
23348
|
+
padding: var(--pf-c-panel__header--PaddingTop) var(--pf-c-panel__header--PaddingRight) var(--pf-c-panel__header--PaddingBottom) var(--pf-c-panel__header--PaddingLeft);
|
|
23349
|
+
}
|
|
23350
|
+
|
|
23351
|
+
.pf-c-panel__main {
|
|
23352
|
+
max-height: var(--pf-c-panel__main--MaxHeight);
|
|
23353
|
+
overflow: var(--pf-c-panel__main--Overflow);
|
|
23354
|
+
}
|
|
23355
|
+
|
|
23356
|
+
.pf-c-panel__main-body {
|
|
23357
|
+
padding: var(--pf-c-panel__main-body--PaddingTop) var(--pf-c-panel__main-body--PaddingRight) var(--pf-c-panel__main-body--PaddingBottom) var(--pf-c-panel__main-body--PaddingLeft);
|
|
23358
|
+
}
|
|
23359
|
+
|
|
23360
|
+
.pf-c-panel__footer {
|
|
23361
|
+
padding: var(--pf-c-panel__footer--PaddingTop) var(--pf-c-panel__footer--PaddingRight) var(--pf-c-panel__footer--PaddingBottom) var(--pf-c-panel__footer--PaddingLeft);
|
|
23362
|
+
box-shadow: var(--pf-c-panel__footer--BoxShadow);
|
|
23363
|
+
}
|
|
23364
|
+
|
|
23365
23365
|
.pf-c-truncate {
|
|
23366
23366
|
--pf-c-truncate--MinWidth: 12ch;
|
|
23367
23367
|
--pf-c-truncate__start--MinWidth: 6ch;
|
package/dist/umd/react-core.js
CHANGED
|
@@ -8083,7 +8083,7 @@
|
|
|
8083
8083
|
});
|
|
8084
8084
|
}
|
|
8085
8085
|
render() {
|
|
8086
|
-
const _a = this.props, { children, chipGroupProps, chipGroupComponent, className, customContent, variant, direction, onSelect, onClear, onBlur, toggleId, isOpen, isGrouped, isPlain, isDisabled, hasPlaceholderStyle, validated, selections: selectionsProp, typeAheadAriaLabel, clearSelectionsAriaLabel, toggleAriaLabel, removeSelectionAriaLabel, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, 'aria-describedby': ariaDescribedby, 'aria-invalid': ariaInvalid, placeholderText, width, maxHeight, toggleIcon, ouiaId, ouiaSafe, hasInlineFilter, isCheckboxSelectionBadgeHidden, inlineFilterPlaceholderText,
|
|
8086
|
+
const _a = this.props, { children, chipGroupProps, chipGroupComponent, className, customContent, variant, direction, onSelect, onClear, onBlur, toggleId, isOpen, isGrouped, isPlain, isDisabled, hasPlaceholderStyle, validated, selections: selectionsProp, typeAheadAriaLabel, typeAheadAriaDescribedby, clearSelectionsAriaLabel, toggleAriaLabel, removeSelectionAriaLabel, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, 'aria-describedby': ariaDescribedby, 'aria-invalid': ariaInvalid, placeholderText, width, maxHeight, toggleIcon, ouiaId, ouiaSafe, hasInlineFilter, isCheckboxSelectionBadgeHidden, inlineFilterPlaceholderText,
|
|
8087
8087
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
8088
8088
|
onFilter,
|
|
8089
8089
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
@@ -8093,7 +8093,7 @@
|
|
|
8093
8093
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
8094
8094
|
menuAppendTo, favorites, onFavorite,
|
|
8095
8095
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
8096
|
-
favoritesLabel, footer, loadingVariant, isCreateSelectOptionObject, shouldResetOnSelect, isFlipEnabled } = _a, props = __rest$1(_a, ["children", "chipGroupProps", "chipGroupComponent", "className", "customContent", "variant", "direction", "onSelect", "onClear", "onBlur", "toggleId", "isOpen", "isGrouped", "isPlain", "isDisabled", "hasPlaceholderStyle", "validated", "selections", "typeAheadAriaLabel", "clearSelectionsAriaLabel", "toggleAriaLabel", "removeSelectionAriaLabel", 'aria-label', 'aria-labelledby', 'aria-describedby', 'aria-invalid', "placeholderText", "width", "maxHeight", "toggleIcon", "ouiaId", "ouiaSafe", "hasInlineFilter", "isCheckboxSelectionBadgeHidden", "inlineFilterPlaceholderText", "onFilter", "onTypeaheadInputChanged", "onCreateOption", "isCreatable", "onToggle", "createText", "noResultsFoundText", "customBadgeText", "inputIdPrefix", "inputAutoComplete", "isInputValuePersisted", "isInputFilterPersisted", "menuAppendTo", "favorites", "onFavorite", "favoritesLabel", "footer", "loadingVariant", "isCreateSelectOptionObject", "shouldResetOnSelect", "isFlipEnabled"]);
|
|
8096
|
+
favoritesLabel, footer, loadingVariant, isCreateSelectOptionObject, shouldResetOnSelect, isFlipEnabled } = _a, props = __rest$1(_a, ["children", "chipGroupProps", "chipGroupComponent", "className", "customContent", "variant", "direction", "onSelect", "onClear", "onBlur", "toggleId", "isOpen", "isGrouped", "isPlain", "isDisabled", "hasPlaceholderStyle", "validated", "selections", "typeAheadAriaLabel", "typeAheadAriaDescribedby", "clearSelectionsAriaLabel", "toggleAriaLabel", "removeSelectionAriaLabel", 'aria-label', 'aria-labelledby', 'aria-describedby', 'aria-invalid', "placeholderText", "width", "maxHeight", "toggleIcon", "ouiaId", "ouiaSafe", "hasInlineFilter", "isCheckboxSelectionBadgeHidden", "inlineFilterPlaceholderText", "onFilter", "onTypeaheadInputChanged", "onCreateOption", "isCreatable", "onToggle", "createText", "noResultsFoundText", "customBadgeText", "inputIdPrefix", "inputAutoComplete", "isInputValuePersisted", "isInputFilterPersisted", "menuAppendTo", "favorites", "onFavorite", "favoritesLabel", "footer", "loadingVariant", "isCreateSelectOptionObject", "shouldResetOnSelect", "isFlipEnabled"]);
|
|
8097
8097
|
const { focusFirstOption: openedOnEnter, typeaheadCurrIndex, typeaheadInputValue, typeaheadFilteredChildren, favoritesGroup } = this.state;
|
|
8098
8098
|
const selectToggleId = toggleId || `pf-select-toggle-id-${currentId$1++}`;
|
|
8099
8099
|
const selections = Array.isArray(selectionsProp) ? selectionsProp : [selectionsProp];
|
|
@@ -8267,8 +8267,8 @@
|
|
|
8267
8267
|
" ",
|
|
8268
8268
|
innerMenu,
|
|
8269
8269
|
" ") : innerMenu;
|
|
8270
|
-
const popperContainer = (React__namespace.createElement("div", Object.assign({ className: css(styles$_.select, isOpen && styles$_.modifiers.expanded, validated === exports.ValidatedOptions.success && styles$_.modifiers.success, validated === exports.ValidatedOptions.warning && styles$_.modifiers.warning, validated === exports.ValidatedOptions.error && styles$_.modifiers.invalid, direction === exports.SelectDirection.up && styles$_.modifiers.top, className) }, (width && { style: { width } }), (
|
|
8271
|
-
const mainContainer = (React__namespace.createElement("div", Object.assign({ className: css(styles$_.select, isOpen && styles$_.modifiers.expanded, validated === exports.ValidatedOptions.success && styles$_.modifiers.success, validated === exports.ValidatedOptions.warning && styles$_.modifiers.warning, validated === exports.ValidatedOptions.error && styles$_.modifiers.invalid, direction === exports.SelectDirection.up && styles$_.modifiers.top, className), ref: this.parentRef }, getOUIAProps(Select.displayName, ouiaId !== undefined ? ouiaId : this.state.ouiaStateId, ouiaSafe), (width && { style: { width } }), (
|
|
8270
|
+
const popperContainer = (React__namespace.createElement("div", Object.assign({ className: css(styles$_.select, isOpen && styles$_.modifiers.expanded, validated === exports.ValidatedOptions.success && styles$_.modifiers.success, validated === exports.ValidatedOptions.warning && styles$_.modifiers.warning, validated === exports.ValidatedOptions.error && styles$_.modifiers.invalid, direction === exports.SelectDirection.up && styles$_.modifiers.top, className) }, (width && { style: { width } }), (ariaDescribedby && { 'aria-describedby': ariaDescribedby }), (validated !== exports.ValidatedOptions.default && { 'aria-invalid': ariaInvalid })), isOpen && menuContainer));
|
|
8271
|
+
const mainContainer = (React__namespace.createElement("div", Object.assign({ className: css(styles$_.select, isOpen && styles$_.modifiers.expanded, validated === exports.ValidatedOptions.success && styles$_.modifiers.success, validated === exports.ValidatedOptions.warning && styles$_.modifiers.warning, validated === exports.ValidatedOptions.error && styles$_.modifiers.invalid, direction === exports.SelectDirection.up && styles$_.modifiers.top, className), ref: this.parentRef }, getOUIAProps(Select.displayName, ouiaId !== undefined ? ouiaId : this.state.ouiaStateId, ouiaSafe), (width && { style: { width } }), (ariaDescribedby && { 'aria-describedby': ariaDescribedby }), (validated !== exports.ValidatedOptions.default && { 'aria-invalid': ariaInvalid })),
|
|
8272
8272
|
React__namespace.createElement(SelectToggle, Object.assign({ id: selectToggleId, parentRef: this.parentRef, menuRef: this.menuComponentRef }, (footer && { footerRef: this.footerRef }), { isOpen: isOpen, isPlain: isPlain, hasPlaceholderStyle: hasPlaceholderStyle && (!selections.length || selections[0] === null || isSelectedPlaceholder), onToggle: this.onToggle, onEnter: this.onEnter, onClose: this.onClose, onBlur: onBlur, variant: variant, "aria-labelledby": `${ariaLabelledBy || ''} ${selectToggleId}`, "aria-label": toggleAriaLabel, handleTypeaheadKeys: this.handleTypeaheadKeys, moveFocusToLastMenuItem: this.moveFocusToLastMenuItem, isDisabled: isDisabled, hasClearButton: hasOnClear, hasFooter: footer !== undefined, onClickTypeaheadToggleButton: this.onClickTypeaheadToggleButton }),
|
|
8273
8273
|
customContent && (React__namespace.createElement("div", { className: css(styles$_.selectToggleWrapper) },
|
|
8274
8274
|
toggleIcon && React__namespace.createElement("span", { className: css(styles$_.selectToggleIcon) }, toggleIcon),
|
|
@@ -8288,15 +8288,15 @@
|
|
|
8288
8288
|
variant === exports.SelectVariant.typeahead && !customContent && (React__namespace.createElement(React__namespace.Fragment, null,
|
|
8289
8289
|
React__namespace.createElement("div", { className: css(styles$_.selectToggleWrapper) },
|
|
8290
8290
|
toggleIcon && React__namespace.createElement("span", { className: css(styles$_.selectToggleIcon) }, toggleIcon),
|
|
8291
|
-
React__namespace.createElement("input", { className: css(formStyles.formControl, styles$_.selectToggleTypeahead), "aria-activedescendant": typeaheadActiveChild && typeaheadActiveChild.id, id: `${selectToggleId}-select-typeahead`, "aria-label": typeAheadAriaLabel, placeholder: placeholderText, value: typeaheadInputValue !== null
|
|
8291
|
+
React__namespace.createElement("input", Object.assign({ className: css(formStyles.formControl, styles$_.selectToggleTypeahead), "aria-activedescendant": typeaheadActiveChild && typeaheadActiveChild.id, id: `${selectToggleId}-select-typeahead`, "aria-label": typeAheadAriaLabel }, (typeAheadAriaDescribedby && { 'aria-describedby': typeAheadAriaDescribedby }), { placeholder: placeholderText, value: typeaheadInputValue !== null
|
|
8292
8292
|
? typeaheadInputValue
|
|
8293
|
-
: this.getDisplay(selections[0], 'text') || '', type: "text", onClick: this.onClick, onChange: this.onChange, autoComplete: inputAutoComplete, disabled: isDisabled, ref: this.inputRef })),
|
|
8293
|
+
: this.getDisplay(selections[0], 'text') || '', type: "text", onClick: this.onClick, onChange: this.onChange, autoComplete: inputAutoComplete, disabled: isDisabled, ref: this.inputRef }))),
|
|
8294
8294
|
hasOnClear && (selections[0] || typeaheadInputValue) && clearBtn)),
|
|
8295
8295
|
variant === exports.SelectVariant.typeaheadMulti && !customContent && (React__namespace.createElement(React__namespace.Fragment, null,
|
|
8296
8296
|
React__namespace.createElement("div", { className: css(styles$_.selectToggleWrapper) },
|
|
8297
8297
|
toggleIcon && React__namespace.createElement("span", { className: css(styles$_.selectToggleIcon) }, toggleIcon),
|
|
8298
8298
|
selections && Array.isArray(selections) && selections.length > 0 && selectedChips,
|
|
8299
|
-
React__namespace.createElement("input", { className: css(formStyles.formControl, styles$_.selectToggleTypeahead), "aria-activedescendant": typeaheadActiveChild && typeaheadActiveChild.id, id: `${selectToggleId}-select-multi-typeahead-typeahead`, "aria-label": typeAheadAriaLabel, "aria-invalid": validated === exports.ValidatedOptions.error, placeholder: placeholderText, value: typeaheadInputValue !== null ? typeaheadInputValue : '', type: "text", onChange: this.onChange, onClick: this.onClick, autoComplete: inputAutoComplete, disabled: isDisabled, ref: this.inputRef })),
|
|
8299
|
+
React__namespace.createElement("input", Object.assign({ className: css(formStyles.formControl, styles$_.selectToggleTypeahead), "aria-activedescendant": typeaheadActiveChild && typeaheadActiveChild.id, id: `${selectToggleId}-select-multi-typeahead-typeahead`, "aria-label": typeAheadAriaLabel, "aria-invalid": validated === exports.ValidatedOptions.error }, (typeAheadAriaDescribedby && { 'aria-describedby': typeAheadAriaDescribedby }), { placeholder: placeholderText, value: typeaheadInputValue !== null ? typeaheadInputValue : '', type: "text", onChange: this.onChange, onClick: this.onClick, autoComplete: inputAutoComplete, disabled: isDisabled, ref: this.inputRef }))),
|
|
8300
8300
|
hasOnClear && ((selections && selections.length > 0) || typeaheadInputValue) && clearBtn)),
|
|
8301
8301
|
validated === exports.ValidatedOptions.success && (React__namespace.createElement("span", { className: css(styles$_.selectToggleStatusIcon) },
|
|
8302
8302
|
React__namespace.createElement(CheckCircleIcon$1, { "aria-hidden": "true" }))),
|
|
@@ -8340,6 +8340,7 @@
|
|
|
8340
8340
|
'aria-describedby': '',
|
|
8341
8341
|
'aria-invalid': false,
|
|
8342
8342
|
typeAheadAriaLabel: '',
|
|
8343
|
+
typeAheadAriaDescribedby: '',
|
|
8343
8344
|
clearSelectionsAriaLabel: 'Clear all',
|
|
8344
8345
|
toggleAriaLabel: 'Options menu',
|
|
8345
8346
|
removeSelectionAriaLabel: 'Remove',
|
|
@@ -10046,9 +10047,9 @@
|
|
|
10046
10047
|
render() {
|
|
10047
10048
|
const _a = this.props, { className, children, onSelectDataListItem, selectedDataListItemId, isCompact, wrapModifier,
|
|
10048
10049
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
10049
|
-
onDragStart, onDragMove, onDragCancel, onDragFinish, gridBreakpoint, itemOrder } = _a,
|
|
10050
|
+
onDragStart, onDragMove, onDragCancel, onDragFinish, gridBreakpoint, itemOrder, selectableRow } = _a,
|
|
10050
10051
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
10051
|
-
props = __rest$1(_a, ["className", "children", "onSelectDataListItem", "selectedDataListItemId", "isCompact", "wrapModifier", "onDragStart", "onDragMove", "onDragCancel", "onDragFinish", "gridBreakpoint", "itemOrder"]);
|
|
10052
|
+
props = __rest$1(_a, ["className", "children", "onSelectDataListItem", "selectedDataListItemId", "isCompact", "wrapModifier", "onDragStart", "onDragMove", "onDragCancel", "onDragFinish", "gridBreakpoint", "itemOrder", "selectableRow"]);
|
|
10052
10053
|
const { dragging } = this.state;
|
|
10053
10054
|
const isSelectable = onSelectDataListItem !== undefined;
|
|
10054
10055
|
const updateSelectedDataListItem = (id) => {
|
|
@@ -10063,6 +10064,7 @@
|
|
|
10063
10064
|
isSelectable,
|
|
10064
10065
|
selectedDataListItemId,
|
|
10065
10066
|
updateSelectedDataListItem,
|
|
10067
|
+
selectableRow,
|
|
10066
10068
|
isDraggable: this.html5DragDrop,
|
|
10067
10069
|
dragStart: this.dragStart,
|
|
10068
10070
|
dragEnd: this.dragEnd,
|
|
@@ -10156,8 +10158,8 @@
|
|
|
10156
10158
|
}
|
|
10157
10159
|
class DataListItem extends React__namespace.Component {
|
|
10158
10160
|
render() {
|
|
10159
|
-
const _a = this.props, { children, isExpanded, className, id, 'aria-labelledby': ariaLabelledBy } = _a, props = __rest$1(_a, ["children", "isExpanded", "className", "id", 'aria-labelledby']);
|
|
10160
|
-
return (React__namespace.createElement(DataListContext.Consumer, null, ({ isSelectable, selectedDataListItemId, updateSelectedDataListItem, isDraggable, dragStart, dragEnd, drop }) => {
|
|
10161
|
+
const _a = this.props, { children, isExpanded, className, id, 'aria-labelledby': ariaLabelledBy, selectableInputAriaLabel } = _a, props = __rest$1(_a, ["children", "isExpanded", "className", "id", 'aria-labelledby', "selectableInputAriaLabel"]);
|
|
10162
|
+
return (React__namespace.createElement(DataListContext.Consumer, null, ({ isSelectable, selectedDataListItemId, updateSelectedDataListItem, selectableRow, isDraggable, dragStart, dragEnd, drop }) => {
|
|
10161
10163
|
const selectDataListItem = (event) => {
|
|
10162
10164
|
let target = event.target;
|
|
10163
10165
|
while (event.currentTarget !== target) {
|
|
@@ -10188,10 +10190,17 @@
|
|
|
10188
10190
|
onDragEnd: dragEnd,
|
|
10189
10191
|
onDragStart: dragStart
|
|
10190
10192
|
};
|
|
10191
|
-
|
|
10192
|
-
|
|
10193
|
-
|
|
10194
|
-
}
|
|
10193
|
+
const isSelected = selectedDataListItemId === id;
|
|
10194
|
+
const selectableInputAriaProps = selectableInputAriaLabel
|
|
10195
|
+
? { 'aria-label': selectableInputAriaLabel }
|
|
10196
|
+
: { 'aria-labelledby': ariaLabelledBy };
|
|
10197
|
+
const selectableInputType = (selectableRow === null || selectableRow === void 0 ? void 0 : selectableRow.type) === 'multiple' ? 'checkbox' : 'radio';
|
|
10198
|
+
return (React__namespace.createElement("li", Object.assign({ id: id, className: css(styles$O.dataListItem, isExpanded && styles$O.modifiers.expanded, isSelectable && styles$O.modifiers.selectable, selectedDataListItemId && isSelected && styles$O.modifiers.selected, className), "aria-labelledby": ariaLabelledBy }, (isSelectable && { tabIndex: 0, onClick: selectDataListItem, onKeyDown }), (isSelectable && isSelected && { 'aria-selected': true }), props, dragProps),
|
|
10199
|
+
selectableRow && (React__namespace.createElement("input", Object.assign({ className: "pf-screen-reader", type: selectableInputType, checked: isSelected, onChange: event => selectableRow.onChange(id, event), tabIndex: -1 }, selectableInputAriaProps))),
|
|
10200
|
+
React__namespace.Children.map(children, child => React__namespace.isValidElement(child) &&
|
|
10201
|
+
React__namespace.cloneElement(child, {
|
|
10202
|
+
rowid: ariaLabelledBy
|
|
10203
|
+
}))));
|
|
10195
10204
|
}));
|
|
10196
10205
|
}
|
|
10197
10206
|
}
|