@patternfly/react-core 4.208.12 → 4.208.13

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 (34) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/esm/components/Tabs/Tabs.d.ts +3 -1
  3. package/dist/esm/components/Tabs/Tabs.d.ts.map +1 -1
  4. package/dist/esm/components/Tabs/Tabs.js +2 -2
  5. package/dist/esm/components/Tabs/Tabs.js.map +1 -1
  6. package/dist/esm/components/Wizard/Wizard.d.ts.map +1 -1
  7. package/dist/esm/components/Wizard/Wizard.js +3 -3
  8. package/dist/esm/components/Wizard/Wizard.js.map +1 -1
  9. package/dist/esm/components/Wizard/WizardNavItem.d.ts +2 -0
  10. package/dist/esm/components/Wizard/WizardNavItem.d.ts.map +1 -1
  11. package/dist/esm/components/Wizard/WizardNavItem.js +2 -2
  12. package/dist/esm/components/Wizard/WizardNavItem.js.map +1 -1
  13. package/dist/js/components/Tabs/Tabs.d.ts +3 -1
  14. package/dist/js/components/Tabs/Tabs.d.ts.map +1 -1
  15. package/dist/js/components/Tabs/Tabs.js +2 -2
  16. package/dist/js/components/Tabs/Tabs.js.map +1 -1
  17. package/dist/js/components/Wizard/Wizard.d.ts.map +1 -1
  18. package/dist/js/components/Wizard/Wizard.js +3 -3
  19. package/dist/js/components/Wizard/Wizard.js.map +1 -1
  20. package/dist/js/components/Wizard/WizardNavItem.d.ts +2 -0
  21. package/dist/js/components/Wizard/WizardNavItem.d.ts.map +1 -1
  22. package/dist/js/components/Wizard/WizardNavItem.js +2 -2
  23. package/dist/js/components/Wizard/WizardNavItem.js.map +1 -1
  24. package/dist/umd/react-core.js +7 -7
  25. package/dist/umd/react-core.min.css +75 -75
  26. package/dist/umd/react-core.min.js +1 -1
  27. package/package.json +5 -5
  28. package/src/components/Tabs/Tabs.tsx +5 -1
  29. package/src/components/Tabs/__tests__/Tabs.test.tsx +40 -1
  30. package/src/components/Wizard/Wizard.tsx +3 -0
  31. package/src/components/Wizard/WizardNavItem.tsx +4 -0
  32. package/src/components/Wizard/__tests__/Wizard.test.tsx +6 -3
  33. package/src/components/Wizard/__tests__/__snapshots__/Wizard.test.tsx.snap +6 -0
  34. package/src/demos/Tabs.md +53 -57
@@ -18477,7 +18477,7 @@
18477
18477
  }
18478
18478
  }
18479
18479
  render() {
18480
- const _a = this.props, { className, children, activeKey, defaultActiveKey, id, isFilled, isSecondary, isVertical, isBox, hasBorderBottom, leftScrollAriaLabel, rightScrollAriaLabel, 'aria-label': ariaLabel, component, ouiaId, ouiaSafe, mountOnEnter, unmountOnExit, usePageInsets, inset, variant, expandable, isExpanded, defaultIsExpanded, toggleText, toggleAriaLabel, onToggle } = _a, props = __rest$1(_a, ["className", "children", "activeKey", "defaultActiveKey", "id", "isFilled", "isSecondary", "isVertical", "isBox", "hasBorderBottom", "leftScrollAriaLabel", "rightScrollAriaLabel", 'aria-label', "component", "ouiaId", "ouiaSafe", "mountOnEnter", "unmountOnExit", "usePageInsets", "inset", "variant", "expandable", "isExpanded", "defaultIsExpanded", "toggleText", "toggleAriaLabel", "onToggle"]);
18480
+ const _a = this.props, { className, children, activeKey, defaultActiveKey, id, isFilled, isSecondary, isVertical, isBox, hasBorderBottom, hasSecondaryBorderBottom, leftScrollAriaLabel, rightScrollAriaLabel, 'aria-label': ariaLabel, component, ouiaId, ouiaSafe, mountOnEnter, unmountOnExit, usePageInsets, inset, variant, expandable, isExpanded, defaultIsExpanded, toggleText, toggleAriaLabel, onToggle } = _a, props = __rest$1(_a, ["className", "children", "activeKey", "defaultActiveKey", "id", "isFilled", "isSecondary", "isVertical", "isBox", "hasBorderBottom", "hasSecondaryBorderBottom", "leftScrollAriaLabel", "rightScrollAriaLabel", 'aria-label', "component", "ouiaId", "ouiaSafe", "mountOnEnter", "unmountOnExit", "usePageInsets", "inset", "variant", "expandable", "isExpanded", "defaultIsExpanded", "toggleText", "toggleAriaLabel", "onToggle"]);
18481
18481
  const { showScrollButtons, disableLeftScrollButton, disableRightScrollButton, shownKeys, uncontrolledActiveKey, uncontrolledIsExpandedLocal } = this.state;
18482
18482
  const filteredChildren = React__namespace.Children.toArray(children)
18483
18483
  .filter(Boolean)
@@ -18503,7 +18503,7 @@
18503
18503
  uniqueId,
18504
18504
  handleTabClick: (...args) => this.handleTabClick(...args)
18505
18505
  } },
18506
- React__namespace.createElement(Component, Object.assign({ "aria-label": ariaLabel, className: css(styles$h.tabs, isFilled && styles$h.modifiers.fill, isSecondary && styles$h.modifiers.secondary, isVertical && styles$h.modifiers.vertical, isVertical && expandable && formatBreakpointMods(expandable, styles$h), isVertical && expandable && isExpandedLocal && styles$h.modifiers.expanded, isBox && styles$h.modifiers.box, showScrollButtons && !isVertical && styles$h.modifiers.scrollable, usePageInsets && styles$h.modifiers.pageInsets, !hasBorderBottom && styles$h.modifiers.noBorderBottom, formatBreakpointMods(inset, styles$h), variantStyle[variant], className) }, getOUIAProps(Tabs.displayName, ouiaId !== undefined ? ouiaId : this.state.ouiaStateId, ouiaSafe), { id: id && id }, props),
18506
+ React__namespace.createElement(Component, Object.assign({ "aria-label": ariaLabel, className: css(styles$h.tabs, isFilled && styles$h.modifiers.fill, isSecondary && styles$h.modifiers.secondary, isVertical && styles$h.modifiers.vertical, isVertical && expandable && formatBreakpointMods(expandable, styles$h), isVertical && expandable && isExpandedLocal && styles$h.modifiers.expanded, isBox && styles$h.modifiers.box, showScrollButtons && !isVertical && styles$h.modifiers.scrollable, usePageInsets && styles$h.modifiers.pageInsets, !hasBorderBottom && styles$h.modifiers.noBorderBottom, hasSecondaryBorderBottom && styles$h.modifiers.borderBottom, formatBreakpointMods(inset, styles$h), variantStyle[variant], className) }, getOUIAProps(Tabs.displayName, ouiaId !== undefined ? ouiaId : this.state.ouiaStateId, ouiaSafe), { id: id && id }, props),
18507
18507
  expandable && isVertical && (React__namespace.createElement(GenerateId, null, randomId => (React__namespace.createElement("div", { className: css(styles$h.tabsToggle) },
18508
18508
  React__namespace.createElement("div", { className: css(styles$h.tabsToggleButton) },
18509
18509
  React__namespace.createElement(Button, { onClick: () => toggleTabs(!isExpandedLocal), variant: "plain", "aria-label": toggleAriaLabel, "aria-expanded": isExpandedLocal, id: `${randomId}-button`, "aria-labelledby": `${randomId}-text ${randomId}-button` },
@@ -20039,7 +20039,7 @@
20039
20039
  WizardNav.displayName = 'WizardNav';
20040
20040
 
20041
20041
  const WizardNavItem = (_a) => {
20042
- var { children = null, content = '', isCurrent = false, isDisabled = false, step, onNavItemClick = () => undefined, navItemComponent = 'button', href = null, isExpandable = false } = _a, rest = __rest$1(_a, ["children", "content", "isCurrent", "isDisabled", "step", "onNavItemClick", "navItemComponent", "href", "isExpandable"]);
20042
+ var { children = null, content = '', isCurrent = false, isDisabled = false, step, onNavItemClick = () => undefined, navItemComponent = 'button', href = null, isExpandable = false, id } = _a, rest = __rest$1(_a, ["children", "content", "isCurrent", "isDisabled", "step", "onNavItemClick", "navItemComponent", "href", "isExpandable", "id"]);
20043
20043
  const NavItemComponent = navItemComponent;
20044
20044
  const [isExpanded, setIsExpanded] = React__namespace.useState(false);
20045
20045
  React__namespace.useEffect(() => {
@@ -20057,7 +20057,7 @@
20057
20057
  href
20058
20058
  };
20059
20059
  return (React__namespace.createElement("li", { className: css(styles$a.wizardNavItem, isExpandable && styles$a.modifiers.expandable, isExpandable && isExpanded && styles$a.modifiers.expanded) },
20060
- React__namespace.createElement(NavItemComponent, Object.assign({}, rest, (navItemComponent === 'a' ? Object.assign({}, linkProps) : Object.assign({}, btnProps)), { onClick: () => (isExpandable ? setIsExpanded(!isExpanded || isCurrent) : onNavItemClick(step)), className: css(styles$a.wizardNavLink, isCurrent && styles$a.modifiers.current, isDisabled && styles$a.modifiers.disabled), "aria-disabled": isDisabled ? true : null, "aria-current": isCurrent && !children ? 'step' : false }, (isExpandable && { 'aria-expanded': isExpanded })), isExpandable ? (React__namespace.createElement(React__namespace.Fragment, null,
20060
+ React__namespace.createElement(NavItemComponent, Object.assign({}, rest, (navItemComponent === 'a' ? Object.assign({}, linkProps) : Object.assign({}, btnProps)), (id && { id: id.toString() }), { onClick: () => (isExpandable ? setIsExpanded(!isExpanded || isCurrent) : onNavItemClick(step)), className: css(styles$a.wizardNavLink, isCurrent && styles$a.modifiers.current, isDisabled && styles$a.modifiers.disabled), "aria-disabled": isDisabled ? true : null, "aria-current": isCurrent && !children ? 'step' : false }, (isExpandable && { 'aria-expanded': isExpanded })), isExpandable ? (React__namespace.createElement(React__namespace.Fragment, null,
20061
20061
  React__namespace.createElement("span", { className: css(styles$a.wizardNavLinkText) }, content),
20062
20062
  React__namespace.createElement("span", { className: css(styles$a.wizardNavLinkToggle) },
20063
20063
  React__namespace.createElement("span", { className: css(styles$a.wizardNavLinkToggleIcon) },
@@ -20282,7 +20282,7 @@
20282
20282
  }
20283
20283
  }
20284
20284
  navItemStep = this.getFlattenedStepsIndex(flattenedSteps, step.steps[0].name);
20285
- return (React__namespace.createElement(WizardNavItem, { key: index, content: step.name, isExpandable: isNavExpandable, isCurrent: hasActiveChild, isDisabled: !canJumpToParent, step: navItemStep, onNavItemClick: this.goToStep },
20285
+ return (React__namespace.createElement(WizardNavItem, { key: index, id: step.id, content: step.name, isExpandable: isNavExpandable, isCurrent: hasActiveChild, isDisabled: !canJumpToParent, step: navItemStep, onNavItemClick: this.goToStep },
20286
20286
  React__namespace.createElement(WizardNav, Object.assign({}, wizNavAProps, { returnList: true }), step.steps.map((childStep, indexChild) => {
20287
20287
  if (childStep.isFinishedStep) {
20288
20288
  // Don't show finished step in the side nav
@@ -20290,12 +20290,12 @@
20290
20290
  }
20291
20291
  navItemStep = this.getFlattenedStepsIndex(flattenedSteps, childStep.name);
20292
20292
  enabled = childStep.canJumpTo;
20293
- return (React__namespace.createElement(WizardNavItem, { key: `child_${indexChild}`, content: childStep.name, isCurrent: activeStep.name === childStep.name, isDisabled: !enabled, step: navItemStep, onNavItemClick: this.goToStep }));
20293
+ return (React__namespace.createElement(WizardNavItem, { key: `child_${indexChild}`, id: childStep.id, content: childStep.name, isCurrent: activeStep.name === childStep.name, isDisabled: !enabled, step: navItemStep, onNavItemClick: this.goToStep }));
20294
20294
  }))));
20295
20295
  }
20296
20296
  navItemStep = this.getFlattenedStepsIndex(flattenedSteps, step.name);
20297
20297
  enabled = step.canJumpTo;
20298
- return (React__namespace.createElement(WizardNavItem, Object.assign({}, step.stepNavItemProps, { key: index, content: step.name, isCurrent: activeStep.name === step.name, isDisabled: !enabled, step: navItemStep, onNavItemClick: this.goToStep })));
20298
+ return (React__namespace.createElement(WizardNavItem, Object.assign({}, step.stepNavItemProps, { key: index, id: step.id, content: step.name, isCurrent: activeStep.name === step.name, isDisabled: !enabled, step: navItemStep, onNavItemClick: this.goToStep })));
20299
20299
  })));
20300
20300
  };
20301
20301
  const context = {
@@ -8040,81 +8040,6 @@ label.pf-c-check, .pf-c-check__label,
8040
8040
  font-size: var(--pf-global--FontSize--lg);
8041
8041
  }
8042
8042
 
8043
- .pf-c-file-upload {
8044
- --pf-c-file-upload--m-loading__file-details--before--BackgroundColor: var(--pf-global--BackgroundColor--100);
8045
- --pf-c-file-upload--m-loading__file-details--before--Left: var(--pf-global--BorderWidth--sm);
8046
- --pf-c-file-upload--m-loading__file-details--before--Right: var(--pf-global--BorderWidth--sm);
8047
- --pf-c-file-upload--m-loading__file-details--before--Bottom: var(--pf-global--BorderWidth--sm);
8048
- --pf-c-file-upload--m-drag-hover--before--BorderWidth: var(--pf-global--BorderWidth--sm);
8049
- --pf-c-file-upload--m-drag-hover--before--BorderColor: var(--pf-global--primary-color--100);
8050
- --pf-c-file-upload--m-drag-hover--before--ZIndex: var(--pf-global--ZIndex--xs);
8051
- --pf-c-file-upload--m-drag-hover--after--BackgroundColor: var(--pf-global--primary-color--100);
8052
- --pf-c-file-upload--m-drag-hover--after--Opacity: .1;
8053
- --pf-c-file-upload__file-details__c-form-control--MinHeight: calc(var(--pf-global--spacer--3xl) * 2);
8054
- --pf-c-file-upload__file-select__c-button--m-control--OutlineOffset: calc(-1 * var(--pf-global--spacer--xs));
8055
- position: relative;
8056
- display: flex;
8057
- flex-direction: column;
8058
- }
8059
-
8060
- .pf-c-file-upload.pf-m-drag-hover::before {
8061
- position: absolute;
8062
- top: 0;
8063
- right: 0;
8064
- bottom: 0;
8065
- left: 0;
8066
- z-index: var(--pf-c-file-upload--m-drag-hover--before--ZIndex);
8067
- content: "";
8068
- border: var(--pf-c-file-upload--m-drag-hover--before--BorderWidth) solid var(--pf-c-file-upload--m-drag-hover--before--BorderColor);
8069
- }
8070
-
8071
- .pf-c-file-upload.pf-m-drag-hover::after {
8072
- position: absolute;
8073
- top: 0;
8074
- right: 0;
8075
- bottom: 0;
8076
- left: 0;
8077
- content: "";
8078
- background-color: var(--pf-c-file-upload--m-drag-hover--after--BackgroundColor);
8079
- opacity: var(--pf-c-file-upload--m-drag-hover--after--Opacity);
8080
- }
8081
-
8082
- .pf-c-file-upload.pf-m-loading .pf-c-file-upload__file-details {
8083
- position: relative;
8084
- }
8085
-
8086
- .pf-c-file-upload.pf-m-loading .pf-c-file-upload__file-details::before {
8087
- position: absolute;
8088
- top: 0;
8089
- right: var(--pf-c-file-upload--m-loading__file-details--before--Left);
8090
- bottom: var(--pf-c-file-upload--m-loading__file-details--before--Left);
8091
- left: var(--pf-c-file-upload--m-loading__file-details--before--Left);
8092
- content: "";
8093
- background-color: var(--pf-c-file-upload--m-loading__file-details--before--BackgroundColor);
8094
- }
8095
-
8096
- .pf-c-file-upload__file-select .pf-c-button.pf-m-control {
8097
- outline-offset: var(--pf-c-file-upload__file-select__c-button--m-control--OutlineOffset);
8098
- }
8099
-
8100
- .pf-c-file-upload__file-details {
8101
- position: relative;
8102
- display: flex;
8103
- }
8104
-
8105
- .pf-c-file-upload__file-details .pf-c-form-control {
8106
- flex: 1 1 auto;
8107
- min-height: var(--pf-c-file-upload__file-details__c-form-control--MinHeight);
8108
- border-top: 0;
8109
- }
8110
-
8111
- .pf-c-file-upload__file-details-spinner {
8112
- position: absolute;
8113
- top: 50%;
8114
- left: 50%;
8115
- transform: translate(-50%, -50%);
8116
- }
8117
-
8118
8043
  .pf-c-expandable-section {
8119
8044
  --pf-c-expandable-section__toggle--PaddingTop: var(--pf-global--spacer--form-element);
8120
8045
  --pf-c-expandable-section__toggle--PaddingRight: var(--pf-global--spacer--md);
@@ -8239,6 +8164,81 @@ label.pf-c-check, .pf-c-check__label,
8239
8164
  font-weight: var(--pf-global--FontWeight--semi-bold);
8240
8165
  }
8241
8166
 
8167
+ .pf-c-file-upload {
8168
+ --pf-c-file-upload--m-loading__file-details--before--BackgroundColor: var(--pf-global--BackgroundColor--100);
8169
+ --pf-c-file-upload--m-loading__file-details--before--Left: var(--pf-global--BorderWidth--sm);
8170
+ --pf-c-file-upload--m-loading__file-details--before--Right: var(--pf-global--BorderWidth--sm);
8171
+ --pf-c-file-upload--m-loading__file-details--before--Bottom: var(--pf-global--BorderWidth--sm);
8172
+ --pf-c-file-upload--m-drag-hover--before--BorderWidth: var(--pf-global--BorderWidth--sm);
8173
+ --pf-c-file-upload--m-drag-hover--before--BorderColor: var(--pf-global--primary-color--100);
8174
+ --pf-c-file-upload--m-drag-hover--before--ZIndex: var(--pf-global--ZIndex--xs);
8175
+ --pf-c-file-upload--m-drag-hover--after--BackgroundColor: var(--pf-global--primary-color--100);
8176
+ --pf-c-file-upload--m-drag-hover--after--Opacity: .1;
8177
+ --pf-c-file-upload__file-details__c-form-control--MinHeight: calc(var(--pf-global--spacer--3xl) * 2);
8178
+ --pf-c-file-upload__file-select__c-button--m-control--OutlineOffset: calc(-1 * var(--pf-global--spacer--xs));
8179
+ position: relative;
8180
+ display: flex;
8181
+ flex-direction: column;
8182
+ }
8183
+
8184
+ .pf-c-file-upload.pf-m-drag-hover::before {
8185
+ position: absolute;
8186
+ top: 0;
8187
+ right: 0;
8188
+ bottom: 0;
8189
+ left: 0;
8190
+ z-index: var(--pf-c-file-upload--m-drag-hover--before--ZIndex);
8191
+ content: "";
8192
+ border: var(--pf-c-file-upload--m-drag-hover--before--BorderWidth) solid var(--pf-c-file-upload--m-drag-hover--before--BorderColor);
8193
+ }
8194
+
8195
+ .pf-c-file-upload.pf-m-drag-hover::after {
8196
+ position: absolute;
8197
+ top: 0;
8198
+ right: 0;
8199
+ bottom: 0;
8200
+ left: 0;
8201
+ content: "";
8202
+ background-color: var(--pf-c-file-upload--m-drag-hover--after--BackgroundColor);
8203
+ opacity: var(--pf-c-file-upload--m-drag-hover--after--Opacity);
8204
+ }
8205
+
8206
+ .pf-c-file-upload.pf-m-loading .pf-c-file-upload__file-details {
8207
+ position: relative;
8208
+ }
8209
+
8210
+ .pf-c-file-upload.pf-m-loading .pf-c-file-upload__file-details::before {
8211
+ position: absolute;
8212
+ top: 0;
8213
+ right: var(--pf-c-file-upload--m-loading__file-details--before--Left);
8214
+ bottom: var(--pf-c-file-upload--m-loading__file-details--before--Left);
8215
+ left: var(--pf-c-file-upload--m-loading__file-details--before--Left);
8216
+ content: "";
8217
+ background-color: var(--pf-c-file-upload--m-loading__file-details--before--BackgroundColor);
8218
+ }
8219
+
8220
+ .pf-c-file-upload__file-select .pf-c-button.pf-m-control {
8221
+ outline-offset: var(--pf-c-file-upload__file-select__c-button--m-control--OutlineOffset);
8222
+ }
8223
+
8224
+ .pf-c-file-upload__file-details {
8225
+ position: relative;
8226
+ display: flex;
8227
+ }
8228
+
8229
+ .pf-c-file-upload__file-details .pf-c-form-control {
8230
+ flex: 1 1 auto;
8231
+ min-height: var(--pf-c-file-upload__file-details__c-form-control--MinHeight);
8232
+ border-top: 0;
8233
+ }
8234
+
8235
+ .pf-c-file-upload__file-details-spinner {
8236
+ position: absolute;
8237
+ top: 50%;
8238
+ left: 50%;
8239
+ transform: translate(-50%, -50%);
8240
+ }
8241
+
8242
8242
  .pf-c-form {
8243
8243
  --pf-c-form--GridGap: var(--pf-global--gutter--md);
8244
8244
  --pf-c-form__group--m-action--MarginTop: var(--pf-global--spacer--xl);