@patternfly/react-core 4.222.13 → 4.222.16
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/Label/Label.js +3 -3
- package/dist/esm/components/Label/Label.js.map +1 -1
- package/dist/esm/components/LabelGroup/LabelGroup.d.ts +2 -0
- package/dist/esm/components/LabelGroup/LabelGroup.d.ts.map +1 -1
- package/dist/esm/components/LabelGroup/LabelGroup.js +4 -3
- package/dist/esm/components/LabelGroup/LabelGroup.js.map +1 -1
- package/dist/js/components/Label/Label.js +3 -3
- package/dist/js/components/Label/Label.js.map +1 -1
- package/dist/js/components/LabelGroup/LabelGroup.d.ts +2 -0
- package/dist/js/components/LabelGroup/LabelGroup.d.ts.map +1 -1
- package/dist/js/components/LabelGroup/LabelGroup.js +4 -3
- package/dist/js/components/LabelGroup/LabelGroup.js.map +1 -1
- package/dist/styles/base-no-reset.css +5 -0
- package/dist/styles/base.css +5 -0
- package/dist/umd/react-core.css +666 -99
- package/dist/umd/react-core.js +37 -10
- package/dist/umd/react-core.min.css +1734 -1167
- package/dist/umd/react-core.min.js +5 -5
- package/package.json +6 -6
- package/src/components/Label/Label.tsx +3 -3
- package/src/components/LabelGroup/LabelGroup.tsx +5 -1
- package/src/components/LabelGroup/examples/LabelGroup.md +7 -0
- package/src/components/LabelGroup/examples/LabelGroupEditableAdd.tsx +74 -0
- package/src/components/LabelGroup/examples/LabelGroupEditableAddDropdown.tsx +138 -0
- package/src/components/LabelGroup/examples/LabelGroupEditableAddModal.tsx +356 -0
- package/src/demos/LabelGroupDemos.md +18 -0
package/dist/umd/react-core.js
CHANGED
|
@@ -10415,6 +10415,7 @@
|
|
|
10415
10415
|
|
|
10416
10416
|
Promise.resolve().then(function () { return descriptionList; });
|
|
10417
10417
|
var styles$N = {
|
|
10418
|
+
"card": "pf-c-card",
|
|
10418
10419
|
"descriptionList": "pf-c-description-list",
|
|
10419
10420
|
"descriptionListDescription": "pf-c-description-list__description",
|
|
10420
10421
|
"descriptionListGroup": "pf-c-description-list__group",
|
|
@@ -10428,6 +10429,8 @@
|
|
|
10428
10429
|
"compact": "pf-m-compact",
|
|
10429
10430
|
"fluid": "pf-m-fluid",
|
|
10430
10431
|
"fillColumns": "pf-m-fill-columns",
|
|
10432
|
+
"displayLg": "pf-m-display-lg",
|
|
10433
|
+
"display_2xl": "pf-m-display-2xl",
|
|
10431
10434
|
"helpText": "pf-m-help-text",
|
|
10432
10435
|
"1Col": "pf-m-1-col",
|
|
10433
10436
|
"2Col": "pf-m-2-col",
|
|
@@ -14582,14 +14585,14 @@
|
|
|
14582
14585
|
const editableButtonRef = React__namespace.useRef();
|
|
14583
14586
|
const editableInputRef = React__namespace.useRef();
|
|
14584
14587
|
React__namespace.useEffect(() => {
|
|
14585
|
-
document.addEventListener('
|
|
14588
|
+
document.addEventListener('mousedown', onDocMouseDown);
|
|
14586
14589
|
document.addEventListener('keydown', onKeyDown);
|
|
14587
14590
|
return () => {
|
|
14588
|
-
document.removeEventListener('
|
|
14591
|
+
document.removeEventListener('mousedown', onDocMouseDown);
|
|
14589
14592
|
document.removeEventListener('keydown', onKeyDown);
|
|
14590
14593
|
};
|
|
14591
14594
|
});
|
|
14592
|
-
const
|
|
14595
|
+
const onDocMouseDown = (event) => {
|
|
14593
14596
|
if (isEditableActive &&
|
|
14594
14597
|
editableInputRef &&
|
|
14595
14598
|
editableInputRef.current &&
|
|
@@ -14726,9 +14729,9 @@
|
|
|
14726
14729
|
render() {
|
|
14727
14730
|
const _a = this.props, { categoryName, children, className, isClosable, isCompact, closeBtnAriaLabel, 'aria-label': ariaLabel, onClick, numLabels, expandedText, collapsedText,
|
|
14728
14731
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
14729
|
-
defaultIsOpen, tooltipPosition, isVertical, isEditable, hasEditableTextArea, editableTextAreaProps } = _a,
|
|
14732
|
+
defaultIsOpen, tooltipPosition, isVertical, isEditable, hasEditableTextArea, editableTextAreaProps, addLabelControl } = _a,
|
|
14730
14733
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
14731
|
-
rest = __rest$1(_a, ["categoryName", "children", "className", "isClosable", "isCompact", "closeBtnAriaLabel", 'aria-label', "onClick", "numLabels", "expandedText", "collapsedText", "defaultIsOpen", "tooltipPosition", "isVertical", "isEditable", "hasEditableTextArea", "editableTextAreaProps"]);
|
|
14734
|
+
rest = __rest$1(_a, ["categoryName", "children", "className", "isClosable", "isCompact", "closeBtnAriaLabel", 'aria-label', "onClick", "numLabels", "expandedText", "collapsedText", "defaultIsOpen", "tooltipPosition", "isVertical", "isEditable", "hasEditableTextArea", "editableTextAreaProps", "addLabelControl"]);
|
|
14732
14735
|
const { isOpen } = this.state;
|
|
14733
14736
|
const numChildren = React__namespace.Children.count(children);
|
|
14734
14737
|
const collapsedTextResult = fillTemplate(collapsedText, {
|
|
@@ -14744,6 +14747,7 @@
|
|
|
14744
14747
|
labelArray.map((child, i) => (React__namespace.createElement("li", { className: css(styles$D.labelGroupListItem), key: i }, child))),
|
|
14745
14748
|
numChildren > numLabels && (React__namespace.createElement("li", { className: css(styles$D.labelGroupListItem) },
|
|
14746
14749
|
React__namespace.createElement(Label, { isOverflowLabel: true, onClick: this.toggleCollapse, className: css(isCompact && labelStyles.modifiers.compact) }, isOpen ? expandedText : collapsedTextResult))),
|
|
14750
|
+
addLabelControl && React__namespace.createElement("li", { className: css(styles$D.labelGroupListItem) }, addLabelControl),
|
|
14747
14751
|
isEditable && hasEditableTextArea && (React__namespace.createElement("li", { className: css(styles$D.labelGroupListItem, styles$D.modifiers.textarea) },
|
|
14748
14752
|
React__namespace.createElement("textarea", Object.assign({ className: css(styles$D.labelGroupTextarea), rows: 1, tabIndex: 0 }, editableTextAreaProps)))))));
|
|
14749
14753
|
const close = (React__namespace.createElement("div", { className: css(styles$D.labelGroupClose) },
|
|
@@ -14753,7 +14757,7 @@
|
|
|
14753
14757
|
React__namespace.createElement("div", { className: css(styles$D.labelGroupMain) }, content),
|
|
14754
14758
|
isClosable && close));
|
|
14755
14759
|
};
|
|
14756
|
-
return numChildren === 0 ? null : (React__namespace.createElement(GenerateId, null, randomId => renderLabelGroup(this.props.id || randomId)));
|
|
14760
|
+
return numChildren === 0 && addLabelControl === undefined ? null : (React__namespace.createElement(GenerateId, null, randomId => renderLabelGroup(this.props.id || randomId)));
|
|
14757
14761
|
}
|
|
14758
14762
|
}
|
|
14759
14763
|
LabelGroup.displayName = 'LabelGroup';
|
|
@@ -15084,11 +15088,21 @@
|
|
|
15084
15088
|
"collapsed": "pf-m-collapsed",
|
|
15085
15089
|
"limitWidth": "pf-m-limit-width",
|
|
15086
15090
|
"alignCenter": "pf-m-align-center",
|
|
15087
|
-
"stickyTop": "pf-m-sticky-top",
|
|
15088
|
-
"stickyBottom": "pf-m-sticky-bottom",
|
|
15089
15091
|
"overflowScroll": "pf-m-overflow-scroll",
|
|
15090
15092
|
"shadowBottom": "pf-m-shadow-bottom",
|
|
15091
15093
|
"shadowTop": "pf-m-shadow-top",
|
|
15094
|
+
"stickyTop": "pf-m-sticky-top",
|
|
15095
|
+
"stickyBottom": "pf-m-sticky-bottom",
|
|
15096
|
+
"stickyTopOnSmHeight": "pf-m-sticky-top-on-sm-height",
|
|
15097
|
+
"stickyBottomOnSmHeight": "pf-m-sticky-bottom-on-sm-height",
|
|
15098
|
+
"stickyTopOnMdHeight": "pf-m-sticky-top-on-md-height",
|
|
15099
|
+
"stickyBottomOnMdHeight": "pf-m-sticky-bottom-on-md-height",
|
|
15100
|
+
"stickyTopOnLgHeight": "pf-m-sticky-top-on-lg-height",
|
|
15101
|
+
"stickyBottomOnLgHeight": "pf-m-sticky-bottom-on-lg-height",
|
|
15102
|
+
"stickyTopOnXlHeight": "pf-m-sticky-top-on-xl-height",
|
|
15103
|
+
"stickyBottomOnXlHeight": "pf-m-sticky-bottom-on-xl-height",
|
|
15104
|
+
"stickyTopOn_2xlHeight": "pf-m-sticky-top-on-2xl-height",
|
|
15105
|
+
"stickyBottomOn_2xlHeight": "pf-m-sticky-bottom-on-2xl-height",
|
|
15092
15106
|
"fill": "pf-m-fill",
|
|
15093
15107
|
"noFill": "pf-m-no-fill",
|
|
15094
15108
|
"light_100": "pf-m-light-100",
|
|
@@ -18025,7 +18039,6 @@
|
|
|
18025
18039
|
"faExclamationTriangle": "fa-exclamation-triangle",
|
|
18026
18040
|
"modifiers": {
|
|
18027
18041
|
"center": "pf-m-center",
|
|
18028
|
-
"vertical": "pf-m-vertical",
|
|
18029
18042
|
"compact": "pf-m-compact",
|
|
18030
18043
|
"current": "pf-m-current",
|
|
18031
18044
|
"pending": "pf-m-pending",
|
|
@@ -18033,7 +18046,19 @@
|
|
|
18033
18046
|
"danger": "pf-m-danger",
|
|
18034
18047
|
"warning": "pf-m-warning",
|
|
18035
18048
|
"info": "pf-m-info",
|
|
18036
|
-
"helpText": "pf-m-help-text"
|
|
18049
|
+
"helpText": "pf-m-help-text",
|
|
18050
|
+
"horizontal": "pf-m-horizontal",
|
|
18051
|
+
"vertical": "pf-m-vertical",
|
|
18052
|
+
"horizontalOnSm": "pf-m-horizontal-on-sm",
|
|
18053
|
+
"verticalOnSm": "pf-m-vertical-on-sm",
|
|
18054
|
+
"horizontalOnMd": "pf-m-horizontal-on-md",
|
|
18055
|
+
"verticalOnMd": "pf-m-vertical-on-md",
|
|
18056
|
+
"horizontalOnLg": "pf-m-horizontal-on-lg",
|
|
18057
|
+
"verticalOnLg": "pf-m-vertical-on-lg",
|
|
18058
|
+
"horizontalOnXl": "pf-m-horizontal-on-xl",
|
|
18059
|
+
"verticalOnXl": "pf-m-vertical-on-xl",
|
|
18060
|
+
"horizontalOn_2xl": "pf-m-horizontal-on-2xl",
|
|
18061
|
+
"verticalOn_2xl": "pf-m-vertical-on-2xl"
|
|
18037
18062
|
},
|
|
18038
18063
|
"pficon": "pficon",
|
|
18039
18064
|
"progressStepper": "pf-c-progress-stepper",
|
|
@@ -19041,6 +19066,7 @@
|
|
|
19041
19066
|
"expanded": "pf-m-expanded",
|
|
19042
19067
|
"pageInsets": "pf-m-page-insets",
|
|
19043
19068
|
"action": "pf-m-action",
|
|
19069
|
+
"active": "pf-m-active",
|
|
19044
19070
|
"disabled": "pf-m-disabled",
|
|
19045
19071
|
"ariaDisabled": "pf-m-aria-disabled",
|
|
19046
19072
|
"insetNone": "pf-m-inset-none",
|
|
@@ -19088,6 +19114,7 @@
|
|
|
19088
19114
|
"tabsItemIcon": "pf-c-tabs__item-icon",
|
|
19089
19115
|
"tabsItemText": "pf-c-tabs__item-text",
|
|
19090
19116
|
"tabsLink": "pf-c-tabs__link",
|
|
19117
|
+
"tabsLinkToggleIcon": "pf-c-tabs__link-toggle-icon",
|
|
19091
19118
|
"tabsList": "pf-c-tabs__list",
|
|
19092
19119
|
"tabsScrollButton": "pf-c-tabs__scroll-button",
|
|
19093
19120
|
"tabsToggle": "pf-c-tabs__toggle",
|