@patternfly/react-core 4.233.0 → 4.233.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.
@@ -20156,12 +20156,23 @@
20156
20156
  React__namespace.createElement(MenuContent, { maxMenuHeight: "200px" },
20157
20157
  React__namespace.createElement(MenuList, { "aria-label": ariaLabel }, options.map((option, index) => (React__namespace.createElement(MenuItem, { onClick: this.onSelect, key: option, id: `${randomId}-option-${index}` }, option)))))));
20158
20158
  const textInput = (React__namespace.createElement(TextInput, Object.assign({ "aria-haspopup": "menu", className: css(formStyles.formControl), id: `${randomId}-input`, "aria-label": ariaLabel, validated: isInvalid ? 'error' : 'default', placeholder: placeholder, value: timeState || '', type: "text", iconVariant: "clock", onClick: this.onInputClick, onChange: this.onInputChange, onBlur: this.onBlur, autoComplete: "off", isDisabled: isDisabled, ref: this.inputRef }, inputProps)));
20159
+ let calculatedAppendTo;
20160
+ switch (menuAppendTo) {
20161
+ case 'inline':
20162
+ calculatedAppendTo = () => this.toggleRef.current;
20163
+ break;
20164
+ case 'parent':
20165
+ calculatedAppendTo = getParentElement;
20166
+ break;
20167
+ default:
20168
+ calculatedAppendTo = menuAppendTo;
20169
+ }
20159
20170
  return (React__namespace.createElement("div", { ref: this.baseComponentRef, className: css(datePickerStyles.datePicker, className) },
20160
20171
  React__namespace.createElement("div", Object.assign({ className: css(datePickerStyles.datePickerInput), style: style }, props),
20161
20172
  React__namespace.createElement(InputGroup, null,
20162
20173
  React__namespace.createElement("div", { id: randomId },
20163
- React__namespace.createElement("div", { ref: this.toggleRef, style: { paddingLeft: '0' } }, menuAppendTo !== 'inline' ? (React__namespace.createElement(Popper, { appendTo: menuAppendTo === 'parent' ? getParentElement() : menuAppendTo, trigger: textInput, popper: menuContainer, isVisible: isTimeOptionsOpen })) : (textInput)),
20164
- isTimeOptionsOpen && menuAppendTo === 'inline' && menuContainer)),
20174
+ React__namespace.createElement("div", { ref: this.toggleRef, style: { paddingLeft: '0' } },
20175
+ React__namespace.createElement(Popper, { appendTo: calculatedAppendTo, trigger: textInput, popper: menuContainer, isVisible: isTimeOptionsOpen })))),
20165
20176
  isInvalid && (React__namespace.createElement("div", { className: css(datePickerStyles.datePickerHelperText, datePickerStyles.modifiers.error) }, !isValidFormat ? invalidFormatErrorMessage : invalidMinMaxErrorMessage)))));
20166
20177
  }
20167
20178
  }
@@ -20182,6 +20193,7 @@
20182
20193
  inputProps: {},
20183
20194
  minTime: '',
20184
20195
  maxTime: '',
20196
+ isOpen: false,
20185
20197
  setIsOpen: () => { }
20186
20198
  };
20187
20199