@patternfly/react-core 4.221.14 → 4.221.17
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/CalendarMonth/CalendarMonth.d.ts.map +1 -1
- package/dist/esm/components/CalendarMonth/CalendarMonth.js +35 -30
- package/dist/esm/components/CalendarMonth/CalendarMonth.js.map +1 -1
- package/dist/esm/components/DualListSelector/DualListSelector.d.ts +4 -0
- package/dist/esm/components/DualListSelector/DualListSelector.d.ts.map +1 -1
- package/dist/esm/components/DualListSelector/DualListSelector.js +13 -2
- package/dist/esm/components/DualListSelector/DualListSelector.js.map +1 -1
- package/dist/js/components/CalendarMonth/CalendarMonth.d.ts.map +1 -1
- package/dist/js/components/CalendarMonth/CalendarMonth.js +35 -30
- package/dist/js/components/CalendarMonth/CalendarMonth.js.map +1 -1
- package/dist/js/components/DualListSelector/DualListSelector.d.ts +4 -0
- package/dist/js/components/DualListSelector/DualListSelector.d.ts.map +1 -1
- package/dist/js/components/DualListSelector/DualListSelector.js +13 -2
- package/dist/js/components/DualListSelector/DualListSelector.js.map +1 -1
- package/dist/umd/react-core.js +290 -288
- package/dist/umd/react-core.min.js +4 -4
- package/package.json +5 -5
- package/src/components/CalendarMonth/CalendarMonth.tsx +57 -51
- package/src/components/DualListSelector/DualListSelector.tsx +14 -2
- package/src/components/DualListSelector/examples/DualListSelector.md +38 -767
- package/src/components/DualListSelector/examples/DualListSelectorBasic.tsx +26 -0
- package/src/components/DualListSelector/examples/DualListSelectorBasicSearch.tsx +27 -0
- package/src/components/DualListSelector/examples/DualListSelectorBasicTooltips.tsx +34 -0
- package/src/components/DualListSelector/examples/DualListSelectorComplexOptionsActions.tsx +146 -0
- package/src/components/DualListSelector/examples/DualListSelectorComposable.tsx +214 -0
- package/src/components/DualListSelector/examples/DualListSelectorComposableDragDrop.tsx +190 -0
- package/src/components/DualListSelector/examples/{ComposableTree.tsx → DualListSelectorComposableTree.tsx} +3 -3
- package/src/components/DualListSelector/examples/DualListSelectorTree.tsx +91 -0
- package/src/components/FileUpload/examples/FileUpload.md +6 -270
- package/src/components/FileUpload/examples/FileUploadCustomPreview.tsx +40 -0
- package/src/components/FileUpload/examples/FileUploadCustomUpload.tsx +116 -0
- package/src/components/FileUpload/examples/FileUploadSimpleFile.tsx +31 -0
- package/src/components/FileUpload/examples/FileUploadSimpleText.tsx +51 -0
- package/src/components/FileUpload/examples/FileUploadTextWithEdits.tsx +51 -0
- package/src/components/FileUpload/examples/FileUploadTextWithRestrictions.tsx +71 -0
package/dist/umd/react-core.js
CHANGED
|
@@ -8374,34 +8374,170 @@
|
|
|
8374
8374
|
isFlipEnabled: false
|
|
8375
8375
|
};
|
|
8376
8376
|
|
|
8377
|
-
|
|
8378
|
-
|
|
8379
|
-
|
|
8380
|
-
|
|
8381
|
-
|
|
8382
|
-
|
|
8383
|
-
|
|
8377
|
+
Promise.resolve().then(function () { return inputGroup; });
|
|
8378
|
+
var styles$V = {
|
|
8379
|
+
"formControl": "pf-c-form-control",
|
|
8380
|
+
"inputGroup": "pf-c-input-group",
|
|
8381
|
+
"inputGroupText": "pf-c-input-group__text",
|
|
8382
|
+
"modifiers": {
|
|
8383
|
+
"plain": "pf-m-plain"
|
|
8384
|
+
},
|
|
8385
|
+
"themeDark": "pf-theme-dark"
|
|
8386
|
+
};
|
|
8387
|
+
|
|
8388
|
+
class FormSelect extends React__namespace.Component {
|
|
8389
|
+
constructor(props) {
|
|
8390
|
+
super(props);
|
|
8391
|
+
this.handleChange = (event) => {
|
|
8392
|
+
this.props.onChange(event.currentTarget.value, event);
|
|
8393
|
+
};
|
|
8394
|
+
if (!props.id && !props['aria-label']) {
|
|
8395
|
+
// eslint-disable-next-line no-console
|
|
8396
|
+
console.error('FormSelect requires either an id or aria-label to be specified');
|
|
8397
|
+
}
|
|
8398
|
+
this.state = {
|
|
8399
|
+
ouiaStateId: getDefaultOUIAId(FormSelect.displayName, props.validated)
|
|
8400
|
+
};
|
|
8401
|
+
}
|
|
8402
|
+
render() {
|
|
8403
|
+
const _a = this.props, { children, className, value, validated, isDisabled, isRequired, isIconSprite, ouiaId, ouiaSafe } = _a, props = __rest$1(_a, ["children", "className", "value", "validated", "isDisabled", "isRequired", "isIconSprite", "ouiaId", "ouiaSafe"]);
|
|
8404
|
+
/* find selected option and get placeholder flag */
|
|
8405
|
+
const selectedOption = React__namespace.Children.toArray(children).find((option) => option.props.value === value);
|
|
8406
|
+
const isSelectedPlaceholder = selectedOption && selectedOption.props.isPlaceholder;
|
|
8407
|
+
return (React__namespace.createElement("select", Object.assign({}, props, { className: css(formStyles.formControl, isIconSprite && formStyles.modifiers.iconSprite, className, validated === exports.ValidatedOptions.success && formStyles.modifiers.success, validated === exports.ValidatedOptions.warning && formStyles.modifiers.warning, isSelectedPlaceholder && formStyles.modifiers.placeholder), "aria-invalid": validated === exports.ValidatedOptions.error }, getOUIAProps(FormSelect.displayName, ouiaId !== undefined ? ouiaId : this.state.ouiaStateId, ouiaSafe), { onChange: this.handleChange, disabled: isDisabled, required: isRequired, value: value }), children));
|
|
8408
|
+
}
|
|
8409
|
+
}
|
|
8410
|
+
FormSelect.displayName = 'FormSelect';
|
|
8411
|
+
FormSelect.defaultProps = {
|
|
8412
|
+
className: '',
|
|
8413
|
+
value: '',
|
|
8414
|
+
validated: 'default',
|
|
8415
|
+
isDisabled: false,
|
|
8416
|
+
isRequired: false,
|
|
8417
|
+
isIconSprite: false,
|
|
8418
|
+
onBlur: () => undefined,
|
|
8419
|
+
onFocus: () => undefined,
|
|
8420
|
+
onChange: () => undefined,
|
|
8421
|
+
ouiaSafe: true
|
|
8384
8422
|
};
|
|
8385
8423
|
|
|
8386
|
-
const
|
|
8424
|
+
const FormSelectOption = (_a) => {
|
|
8425
|
+
var { className = '', value = '', isDisabled = false, label,
|
|
8426
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
8427
|
+
isPlaceholder = false } = _a, props = __rest$1(_a, ["className", "value", "isDisabled", "label", "isPlaceholder"]);
|
|
8428
|
+
return (React__namespace.createElement("option", Object.assign({}, props, { className: className, value: value, disabled: isDisabled }), label));
|
|
8429
|
+
};
|
|
8430
|
+
FormSelectOption.displayName = 'FormSelectOption';
|
|
8387
8431
|
|
|
8388
|
-
|
|
8432
|
+
const FormSelectOptionGroup = (_a) => {
|
|
8433
|
+
var { children = null, className = '', isDisabled = false, label } = _a, props = __rest$1(_a, ["children", "className", "isDisabled", "label"]);
|
|
8434
|
+
return (React__namespace.createElement("optgroup", Object.assign({}, props, { disabled: !!isDisabled, className: className, label: label }), children));
|
|
8435
|
+
};
|
|
8436
|
+
FormSelectOptionGroup.displayName = 'FormSelectOptionGroup';
|
|
8389
8437
|
|
|
8390
|
-
const
|
|
8391
|
-
name:
|
|
8438
|
+
const c_form_control_textarea_Height = {
|
|
8439
|
+
"name": "--pf-c-form-control--textarea--Height",
|
|
8440
|
+
"value": "auto",
|
|
8441
|
+
"var": "var(--pf-c-form-control--textarea--Height)"
|
|
8442
|
+
};
|
|
8443
|
+
var heightToken = c_form_control_textarea_Height;
|
|
8444
|
+
|
|
8445
|
+
exports.TextAreResizeOrientation = void 0;
|
|
8446
|
+
(function (TextAreResizeOrientation) {
|
|
8447
|
+
TextAreResizeOrientation["horizontal"] = "horizontal";
|
|
8448
|
+
TextAreResizeOrientation["vertical"] = "vertical";
|
|
8449
|
+
TextAreResizeOrientation["both"] = "both";
|
|
8450
|
+
})(exports.TextAreResizeOrientation || (exports.TextAreResizeOrientation = {}));
|
|
8451
|
+
class TextAreaBase extends React__namespace.Component {
|
|
8452
|
+
constructor(props) {
|
|
8453
|
+
super(props);
|
|
8454
|
+
this.handleChange = (event) => {
|
|
8455
|
+
// https://gomakethings.com/automatically-expand-a-textarea-as-the-user-types-using-vanilla-javascript/
|
|
8456
|
+
const field = event.currentTarget;
|
|
8457
|
+
if (this.props.autoResize && canUseDOM) {
|
|
8458
|
+
field.style.setProperty(heightToken.name, 'inherit');
|
|
8459
|
+
const computed = window.getComputedStyle(field);
|
|
8460
|
+
// Calculate the height
|
|
8461
|
+
const height = parseInt(computed.getPropertyValue('border-top-width')) +
|
|
8462
|
+
parseInt(computed.getPropertyValue('padding-top')) +
|
|
8463
|
+
field.scrollHeight +
|
|
8464
|
+
parseInt(computed.getPropertyValue('padding-bottom')) +
|
|
8465
|
+
parseInt(computed.getPropertyValue('border-bottom-width'));
|
|
8466
|
+
field.style.setProperty(heightToken.name, `${height}px`);
|
|
8467
|
+
}
|
|
8468
|
+
if (this.props.onChange) {
|
|
8469
|
+
this.props.onChange(field.value, event);
|
|
8470
|
+
}
|
|
8471
|
+
};
|
|
8472
|
+
if (!props.id && !props['aria-label']) {
|
|
8473
|
+
// eslint-disable-next-line no-console
|
|
8474
|
+
console.error('TextArea: TextArea requires either an id or aria-label to be specified');
|
|
8475
|
+
}
|
|
8476
|
+
}
|
|
8477
|
+
render() {
|
|
8478
|
+
const _a = this.props, { className, value, validated, isRequired, isDisabled, isIconSprite, isReadOnly, resizeOrientation, innerRef, readOnly, disabled,
|
|
8479
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
8480
|
+
autoResize, onChange } = _a,
|
|
8481
|
+
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
8482
|
+
props = __rest$1(_a, ["className", "value", "validated", "isRequired", "isDisabled", "isIconSprite", "isReadOnly", "resizeOrientation", "innerRef", "readOnly", "disabled", "autoResize", "onChange"]);
|
|
8483
|
+
const orientation = `resize${capitalize(resizeOrientation)}`;
|
|
8484
|
+
return (React__namespace.createElement("textarea", Object.assign({ className: css(formStyles.formControl, isIconSprite && formStyles.modifiers.iconSprite, className, resizeOrientation !== exports.TextAreResizeOrientation.both && formStyles.modifiers[orientation], validated === exports.ValidatedOptions.success && formStyles.modifiers.success, validated === exports.ValidatedOptions.warning && formStyles.modifiers.warning), onChange: this.handleChange }, (typeof this.props.defaultValue !== 'string' && { value }), { "aria-invalid": validated === exports.ValidatedOptions.error, required: isRequired, disabled: isDisabled || disabled, readOnly: isReadOnly || readOnly, ref: innerRef }, props)));
|
|
8485
|
+
}
|
|
8486
|
+
}
|
|
8487
|
+
TextAreaBase.displayName = 'TextArea';
|
|
8488
|
+
TextAreaBase.defaultProps = {
|
|
8489
|
+
innerRef: React__namespace.createRef(),
|
|
8490
|
+
className: '',
|
|
8491
|
+
isRequired: false,
|
|
8492
|
+
isDisabled: false,
|
|
8493
|
+
isIconSprite: false,
|
|
8494
|
+
validated: 'default',
|
|
8495
|
+
resizeOrientation: 'both',
|
|
8496
|
+
'aria-label': null
|
|
8497
|
+
};
|
|
8498
|
+
const TextArea = React__namespace.forwardRef((props, ref) => (React__namespace.createElement(TextAreaBase, Object.assign({}, props, { innerRef: ref }))));
|
|
8499
|
+
TextArea.displayName = 'TextArea';
|
|
8500
|
+
|
|
8501
|
+
const InputGroup = (_a) => {
|
|
8502
|
+
var { className = '', children, innerRef } = _a, props = __rest$1(_a, ["className", "children", "innerRef"]);
|
|
8503
|
+
const formCtrls = [FormSelect, TextArea, TextInput].map(comp => comp.displayName);
|
|
8504
|
+
const idItem = React__namespace.Children.toArray(children).find((child) => !formCtrls.includes(child.type.displayName) && child.props.id);
|
|
8505
|
+
const inputGroupRef = innerRef || React__namespace.useRef(null);
|
|
8506
|
+
return (React__namespace.createElement("div", Object.assign({ ref: inputGroupRef, className: css(styles$V.inputGroup, className) }, props), idItem
|
|
8507
|
+
? React__namespace.Children.map(children, (child) => formCtrls.includes(child.type.displayName)
|
|
8508
|
+
? React__namespace.cloneElement(child, { 'aria-describedby': idItem.props.id })
|
|
8509
|
+
: child)
|
|
8510
|
+
: children));
|
|
8511
|
+
};
|
|
8512
|
+
InputGroup.displayName = 'InputGroup';
|
|
8513
|
+
|
|
8514
|
+
exports.InputGroupTextVariant = void 0;
|
|
8515
|
+
(function (InputGroupTextVariant) {
|
|
8516
|
+
InputGroupTextVariant["default"] = "default";
|
|
8517
|
+
InputGroupTextVariant["plain"] = "plain";
|
|
8518
|
+
})(exports.InputGroupTextVariant || (exports.InputGroupTextVariant = {}));
|
|
8519
|
+
const InputGroupText = (_a) => {
|
|
8520
|
+
var { className = '', component = 'span', children, variant = exports.InputGroupTextVariant.default } = _a, props = __rest$1(_a, ["className", "component", "children", "variant"]);
|
|
8521
|
+
const Component = component;
|
|
8522
|
+
return (React__namespace.createElement(Component, Object.assign({ className: css(styles$V.inputGroupText, variant === exports.InputGroupTextVariant.plain && styles$V.modifiers.plain, className) }, props), children));
|
|
8523
|
+
};
|
|
8524
|
+
InputGroupText.displayName = 'InputGroupText';
|
|
8525
|
+
|
|
8526
|
+
const AngleLeftIconConfig = {
|
|
8527
|
+
name: 'AngleLeftIcon',
|
|
8392
8528
|
height: 512,
|
|
8393
|
-
width:
|
|
8394
|
-
svgPath: '
|
|
8529
|
+
width: 256,
|
|
8530
|
+
svgPath: 'M31.7 239l136-136c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9L127.9 256l96.4 96.4c9.4 9.4 9.4 24.6 0 33.9L201.7 409c-9.4 9.4-24.6 9.4-33.9 0l-136-136c-9.5-9.4-9.5-24.6-.1-34z',
|
|
8395
8531
|
yOffset: 0,
|
|
8396
8532
|
xOffset: 0,
|
|
8397
8533
|
};
|
|
8398
8534
|
|
|
8399
|
-
const
|
|
8535
|
+
const AngleLeftIcon = createIcon(AngleLeftIconConfig);
|
|
8400
8536
|
|
|
8401
|
-
var
|
|
8537
|
+
var AngleLeftIcon$1 = AngleLeftIcon;
|
|
8402
8538
|
|
|
8403
8539
|
Promise.resolve().then(function () { return calendarMonth; });
|
|
8404
|
-
var styles$
|
|
8540
|
+
var styles$U = {
|
|
8405
8541
|
"calendarMonth": "pf-c-calendar-month",
|
|
8406
8542
|
"calendarMonthCalendar": "pf-c-calendar-month__calendar",
|
|
8407
8543
|
"calendarMonthDate": "pf-c-calendar-month__date",
|
|
@@ -8445,7 +8581,7 @@
|
|
|
8445
8581
|
const defaultDate = new Date(year, month);
|
|
8446
8582
|
const firstDayOfWeek = new Date(defaultDate);
|
|
8447
8583
|
firstDayOfWeek.setDate(firstDayOfWeek.getDate() - firstDayOfWeek.getDay() + weekStart);
|
|
8448
|
-
// We will
|
|
8584
|
+
// We will show a maximum of 6 weeks like Google calendar
|
|
8449
8585
|
// Assume we just want the numbers for now...
|
|
8450
8586
|
const calendarWeeks = [];
|
|
8451
8587
|
for (let i = 0; i < 6; i++) {
|
|
@@ -8459,6 +8595,9 @@
|
|
|
8459
8595
|
firstDayOfWeek.setDate(firstDayOfWeek.getDate() + 1);
|
|
8460
8596
|
}
|
|
8461
8597
|
calendarWeeks.push(week);
|
|
8598
|
+
if (firstDayOfWeek.getMonth() !== defaultDate.getMonth()) {
|
|
8599
|
+
break;
|
|
8600
|
+
}
|
|
8462
8601
|
}
|
|
8463
8602
|
return calendarWeeks;
|
|
8464
8603
|
};
|
|
@@ -8558,50 +8697,51 @@
|
|
|
8558
8697
|
const isHoveredDateValid = isValidated(hoveredDate);
|
|
8559
8698
|
const monthFormatted = monthFormat(focusedDate);
|
|
8560
8699
|
const yearFormatted = yearFormat(focusedDate);
|
|
8561
|
-
return (React__default["default"].createElement("div", Object.assign({ className: css(styles$
|
|
8562
|
-
React__default["default"].createElement("div", { className: styles$
|
|
8563
|
-
React__default["default"].createElement("div", { className: css(styles$
|
|
8700
|
+
return (React__default["default"].createElement("div", Object.assign({ className: css(styles$U.calendarMonth, className) }, props),
|
|
8701
|
+
React__default["default"].createElement("div", { className: styles$U.calendarMonthHeader },
|
|
8702
|
+
React__default["default"].createElement("div", { className: css(styles$U.calendarMonthHeaderNavControl, styles$U.modifiers.prevMonth) },
|
|
8564
8703
|
React__default["default"].createElement(Button, { variant: "plain", "aria-label": prevMonthAriaLabel, onClick: () => onMonthClick(prevMonth) },
|
|
8565
|
-
React__default["default"].createElement(
|
|
8566
|
-
React__default["default"].createElement(
|
|
8567
|
-
React__default["default"].createElement("
|
|
8568
|
-
|
|
8569
|
-
|
|
8570
|
-
, {
|
|
8704
|
+
React__default["default"].createElement(AngleLeftIcon$1, { "aria-hidden": true }))),
|
|
8705
|
+
React__default["default"].createElement(InputGroup, null,
|
|
8706
|
+
React__default["default"].createElement("div", { className: styles$U.calendarMonthHeaderMonth },
|
|
8707
|
+
React__default["default"].createElement("span", { id: hiddenMonthId, hidden: true }, "Month"),
|
|
8708
|
+
React__default["default"].createElement(Select
|
|
8571
8709
|
// Max width with "September"
|
|
8572
|
-
|
|
8573
|
-
|
|
8574
|
-
|
|
8575
|
-
|
|
8576
|
-
|
|
8577
|
-
|
|
8578
|
-
|
|
8579
|
-
|
|
8580
|
-
|
|
8710
|
+
, {
|
|
8711
|
+
// Max width with "September"
|
|
8712
|
+
width: "140px", "aria-labelledby": hiddenMonthId, isOpen: isSelectOpen, onToggle: () => {
|
|
8713
|
+
setIsSelectOpen(!isSelectOpen);
|
|
8714
|
+
onSelectToggle(!isSelectOpen);
|
|
8715
|
+
}, onSelect: (_ev, monthNum) => {
|
|
8716
|
+
// When we put CalendarMonth in a Popover we want the Popover's onDocumentClick
|
|
8717
|
+
// to see the SelectOption as a child so it doesn't close the Popover.
|
|
8718
|
+
setTimeout(() => {
|
|
8719
|
+
setIsSelectOpen(false);
|
|
8720
|
+
onSelectToggle(false);
|
|
8721
|
+
const newDate = new Date(focusedDate);
|
|
8722
|
+
newDate.setMonth(Number(monthNum));
|
|
8723
|
+
setFocusedDate(newDate);
|
|
8724
|
+
setHoveredDate(newDate);
|
|
8725
|
+
setShouldFocus(false);
|
|
8726
|
+
}, 0);
|
|
8727
|
+
}, variant: "single", selections: monthFormatted }, longMonths.map((longMonth, index) => (React__default["default"].createElement(SelectOption, { key: index, value: index, isSelected: longMonth === monthFormatted }, longMonth))))),
|
|
8728
|
+
React__default["default"].createElement("div", { className: styles$U.calendarMonthHeaderYear },
|
|
8729
|
+
React__default["default"].createElement(TextInput, { "aria-label": yearInputAriaLabel, type: "number", value: yearFormatted, onChange: year => {
|
|
8581
8730
|
const newDate = new Date(focusedDate);
|
|
8582
|
-
newDate.
|
|
8731
|
+
newDate.setFullYear(+year);
|
|
8583
8732
|
setFocusedDate(newDate);
|
|
8584
8733
|
setHoveredDate(newDate);
|
|
8585
8734
|
setShouldFocus(false);
|
|
8586
|
-
}
|
|
8587
|
-
|
|
8588
|
-
React__default["default"].createElement("div", { className: styles$V.calendarMonthHeaderYear },
|
|
8589
|
-
React__default["default"].createElement(TextInput, { "aria-label": yearInputAriaLabel, type: "number", value: yearFormatted, onChange: year => {
|
|
8590
|
-
const newDate = new Date(focusedDate);
|
|
8591
|
-
newDate.setFullYear(+year);
|
|
8592
|
-
setFocusedDate(newDate);
|
|
8593
|
-
setHoveredDate(newDate);
|
|
8594
|
-
setShouldFocus(false);
|
|
8595
|
-
} })),
|
|
8596
|
-
React__default["default"].createElement("div", { className: css(styles$V.calendarMonthHeaderNavControl, styles$V.modifiers.nextMonth) },
|
|
8735
|
+
} }))),
|
|
8736
|
+
React__default["default"].createElement("div", { className: css(styles$U.calendarMonthHeaderNavControl, styles$U.modifiers.nextMonth) },
|
|
8597
8737
|
React__default["default"].createElement(Button, { variant: "plain", "aria-label": nextMonthAriaLabel, onClick: () => onMonthClick(nextMonth) },
|
|
8598
|
-
React__default["default"].createElement(
|
|
8599
|
-
React__default["default"].createElement("table", { className: styles$
|
|
8600
|
-
React__default["default"].createElement("thead", { className: styles$
|
|
8601
|
-
React__default["default"].createElement("tr", null, calendar[0].map(({ date }, index) => (React__default["default"].createElement("th", { key: index, className: styles$
|
|
8738
|
+
React__default["default"].createElement(AngleRightIcon$1, { "aria-hidden": true })))),
|
|
8739
|
+
React__default["default"].createElement("table", { className: styles$U.calendarMonthCalendar },
|
|
8740
|
+
React__default["default"].createElement("thead", { className: styles$U.calendarMonthDays },
|
|
8741
|
+
React__default["default"].createElement("tr", null, calendar[0].map(({ date }, index) => (React__default["default"].createElement("th", { key: index, className: styles$U.calendarMonthDay, scope: "col" },
|
|
8602
8742
|
React__default["default"].createElement("span", { className: "pf-screen-reader" }, longWeekdayFormat(date)),
|
|
8603
8743
|
React__default["default"].createElement("span", { "aria-hidden": true }, weekdayFormat(date))))))),
|
|
8604
|
-
React__default["default"].createElement("tbody", { onKeyDown: onKeyDown }, calendar.map((week, index) => (React__default["default"].createElement("tr", { key: index, className: styles$
|
|
8744
|
+
React__default["default"].createElement("tbody", { onKeyDown: onKeyDown }, calendar.map((week, index) => (React__default["default"].createElement("tr", { key: index, className: styles$U.calendarMonthDatesRow }, week.map(({ date, isValid }, index) => {
|
|
8605
8745
|
const dayFormatted = dayFormat(date);
|
|
8606
8746
|
const isToday = isSameDate(date, today);
|
|
8607
8747
|
const isSelected = isValidDate(dateProp) && isSameDate(date, dateProp);
|
|
@@ -8622,13 +8762,13 @@
|
|
|
8622
8762
|
// Don't handle focused dates before start dates for now.
|
|
8623
8763
|
// Core would likely need new styles
|
|
8624
8764
|
}
|
|
8625
|
-
return (React__default["default"].createElement("td", { key: index, className: css(styles$
|
|
8626
|
-
React__default["default"].createElement("button", Object.assign({ className: css(styles$
|
|
8765
|
+
return (React__default["default"].createElement("td", { key: index, className: css(styles$U.calendarMonthDatesCell, isAdjacentMonth && styles$U.modifiers.adjacentMonth, isToday && styles$U.modifiers.current, (isSelected || isRangeStart) && styles$U.modifiers.selected, !isValid && styles$U.modifiers.disabled, (isInRange || isRangeStart || isRangeEnd) && styles$U.modifiers.inRange, isRangeStart && styles$U.modifiers.startRange, isRangeEnd && styles$U.modifiers.endRange) },
|
|
8766
|
+
React__default["default"].createElement("button", Object.assign({ className: css(styles$U.calendarMonthDate, isRangeEnd && styles$U.modifiers.hover, !isValid && styles$U.modifiers.disabled), type: "button", onClick: () => onChange(date), onMouseOver: () => setHoveredDate(date), tabIndex: isFocused ? 0 : -1, disabled: !isValid, "aria-label": cellAriaLabel ? cellAriaLabel(date) : `${dayFormatted} ${monthFormatted} ${yearFormatted}` }, (isFocused && { ref: focusRef })), dayFormatted)));
|
|
8627
8767
|
}))))))));
|
|
8628
8768
|
};
|
|
8629
8769
|
|
|
8630
8770
|
Promise.resolve().then(function () { return card; });
|
|
8631
|
-
var styles$
|
|
8771
|
+
var styles$T = {
|
|
8632
8772
|
"card": "pf-c-card",
|
|
8633
8773
|
"cardActions": "pf-c-card__actions",
|
|
8634
8774
|
"cardBody": "pf-c-card__body",
|
|
@@ -8679,13 +8819,13 @@
|
|
|
8679
8819
|
}
|
|
8680
8820
|
const getSelectableModifiers = () => {
|
|
8681
8821
|
if (isDisabledRaised) {
|
|
8682
|
-
return css(styles$
|
|
8822
|
+
return css(styles$T.modifiers.nonSelectableRaised);
|
|
8683
8823
|
}
|
|
8684
8824
|
if (isSelectableRaised) {
|
|
8685
|
-
return css(styles$
|
|
8825
|
+
return css(styles$T.modifiers.selectableRaised, isSelected && styles$T.modifiers.selectedRaised);
|
|
8686
8826
|
}
|
|
8687
8827
|
if (isSelectable || isHoverable) {
|
|
8688
|
-
return css(styles$
|
|
8828
|
+
return css(styles$T.modifiers.selectable, isSelected && styles$T.modifiers.selected);
|
|
8689
8829
|
}
|
|
8690
8830
|
return '';
|
|
8691
8831
|
};
|
|
@@ -8713,33 +8853,33 @@
|
|
|
8713
8853
|
isExpanded
|
|
8714
8854
|
} },
|
|
8715
8855
|
hasSelectableInput && (React__namespace.createElement("input", Object.assign({ className: "pf-screen-reader", id: `${id}-input` }, ariaProps, { type: "checkbox", checked: isSelected, onChange: event => onSelectableInputChange(id, event), disabled: isDisabledRaised, tabIndex: -1 }))),
|
|
8716
|
-
React__namespace.createElement(Component, Object.assign({ id: id, className: css(styles$
|
|
8856
|
+
React__namespace.createElement(Component, Object.assign({ id: id, className: css(styles$T.card, isCompact && styles$T.modifiers.compact, isExpanded && styles$T.modifiers.expanded, isFlat && styles$T.modifiers.flat, isRounded && styles$T.modifiers.rounded, isLarge && styles$T.modifiers.displayLg, isFullHeight && styles$T.modifiers.fullHeight, isPlain && styles$T.modifiers.plain, getSelectableModifiers(), className), tabIndex: isSelectable || isSelectableRaised ? '0' : undefined }, props, ouiaProps), children)));
|
|
8717
8857
|
};
|
|
8718
8858
|
Card.displayName = 'Card';
|
|
8719
8859
|
|
|
8720
8860
|
const CardActions = (_a) => {
|
|
8721
8861
|
var { children = null, className = '', hasNoOffset = false } = _a, props = __rest$1(_a, ["children", "className", "hasNoOffset"]);
|
|
8722
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(styles$
|
|
8862
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(styles$T.cardActions, hasNoOffset && styles$T.modifiers.noOffset, className) }, props), children));
|
|
8723
8863
|
};
|
|
8724
8864
|
CardActions.displayName = 'CardActions';
|
|
8725
8865
|
|
|
8726
8866
|
const CardBody = (_a) => {
|
|
8727
8867
|
var { children = null, className = '', component = 'div', isFilled = true } = _a, props = __rest$1(_a, ["children", "className", "component", "isFilled"]);
|
|
8728
8868
|
const Component = component;
|
|
8729
|
-
return (React__namespace.createElement(Component, Object.assign({ className: css(styles$
|
|
8869
|
+
return (React__namespace.createElement(Component, Object.assign({ className: css(styles$T.cardBody, !isFilled && styles$T.modifiers.noFill, className) }, props), children));
|
|
8730
8870
|
};
|
|
8731
8871
|
CardBody.displayName = 'CardBody';
|
|
8732
8872
|
|
|
8733
8873
|
const CardExpandableContent = (_a) => {
|
|
8734
8874
|
var { children = null, className = '' } = _a, props = __rest$1(_a, ["children", "className"]);
|
|
8735
|
-
return (React__namespace.createElement(CardContext.Consumer, null, ({ isExpanded }) => isExpanded ? (React__namespace.createElement("div", Object.assign({ className: css(styles$
|
|
8875
|
+
return (React__namespace.createElement(CardContext.Consumer, null, ({ isExpanded }) => isExpanded ? (React__namespace.createElement("div", Object.assign({ className: css(styles$T.cardExpandableContent, className) }, props), children)) : null));
|
|
8736
8876
|
};
|
|
8737
8877
|
CardExpandableContent.displayName = 'CardExpandableContent';
|
|
8738
8878
|
|
|
8739
8879
|
const CardFooter = (_a) => {
|
|
8740
8880
|
var { children = null, className = '', component = 'div' } = _a, props = __rest$1(_a, ["children", "className", "component"]);
|
|
8741
8881
|
const Component = component;
|
|
8742
|
-
return (React__namespace.createElement(Component, Object.assign({ className: css(styles$
|
|
8882
|
+
return (React__namespace.createElement(Component, Object.assign({ className: css(styles$T.cardFooter, className) }, props), children));
|
|
8743
8883
|
};
|
|
8744
8884
|
CardFooter.displayName = 'CardFooter';
|
|
8745
8885
|
|
|
@@ -8752,20 +8892,20 @@
|
|
|
8752
8892
|
registerTitleId(titleId);
|
|
8753
8893
|
return () => registerTitleId('');
|
|
8754
8894
|
}, [registerTitleId, titleId]);
|
|
8755
|
-
return (React__namespace.createElement(Component, Object.assign({ className: css(styles$
|
|
8895
|
+
return (React__namespace.createElement(Component, Object.assign({ className: css(styles$T.cardTitle, className), id: titleId || undefined }, props), children));
|
|
8756
8896
|
};
|
|
8757
8897
|
CardTitle.displayName = 'CardTitle';
|
|
8758
8898
|
|
|
8759
8899
|
const CardHeader = (_a) => {
|
|
8760
8900
|
var { children = null, className = '', id, onExpand, toggleButtonProps, isToggleRightAligned } = _a, props = __rest$1(_a, ["children", "className", "id", "onExpand", "toggleButtonProps", "isToggleRightAligned"]);
|
|
8761
8901
|
return (React__namespace.createElement(CardContext.Consumer, null, ({ cardId }) => {
|
|
8762
|
-
const cardHeaderToggle = (React__namespace.createElement("div", { className: css(styles$
|
|
8902
|
+
const cardHeaderToggle = (React__namespace.createElement("div", { className: css(styles$T.cardHeaderToggle) },
|
|
8763
8903
|
React__namespace.createElement(Button, Object.assign({ variant: "plain", type: "button", onClick: evt => {
|
|
8764
8904
|
onExpand(evt, cardId);
|
|
8765
8905
|
} }, toggleButtonProps),
|
|
8766
|
-
React__namespace.createElement("span", { className: css(styles$
|
|
8906
|
+
React__namespace.createElement("span", { className: css(styles$T.cardHeaderToggleIcon) },
|
|
8767
8907
|
React__namespace.createElement(AngleRightIcon$1, { "aria-hidden": "true" })))));
|
|
8768
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(styles$
|
|
8908
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(styles$T.cardHeader, isToggleRightAligned && styles$T.modifiers.toggleRight, className), id: id }, props),
|
|
8769
8909
|
onExpand && !isToggleRightAligned && cardHeaderToggle,
|
|
8770
8910
|
children,
|
|
8771
8911
|
onExpand && isToggleRightAligned && cardHeaderToggle));
|
|
@@ -8827,7 +8967,7 @@
|
|
|
8827
8967
|
};
|
|
8828
8968
|
|
|
8829
8969
|
Promise.resolve().then(function () { return clipboardCopy; });
|
|
8830
|
-
var styles$
|
|
8970
|
+
var styles$S = {
|
|
8831
8971
|
"button": "pf-c-button",
|
|
8832
8972
|
"clipboardCopy": "pf-c-clipboard-copy",
|
|
8833
8973
|
"clipboardCopyActions": "pf-c-clipboard-copy__actions",
|
|
@@ -8846,7 +8986,7 @@
|
|
|
8846
8986
|
};
|
|
8847
8987
|
|
|
8848
8988
|
Promise.resolve().then(function () { return popover; });
|
|
8849
|
-
var styles$
|
|
8989
|
+
var styles$R = {
|
|
8850
8990
|
"button": "pf-c-button",
|
|
8851
8991
|
"modifiers": {
|
|
8852
8992
|
"noPadding": "pf-m-no-padding",
|
|
@@ -8886,25 +9026,25 @@
|
|
|
8886
9026
|
|
|
8887
9027
|
const PopoverContent = (_a) => {
|
|
8888
9028
|
var { className = null, children } = _a, props = __rest$1(_a, ["className", "children"]);
|
|
8889
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(styles$
|
|
9029
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(styles$R.popoverContent, className) }, props), children));
|
|
8890
9030
|
};
|
|
8891
9031
|
PopoverContent.displayName = 'PopoverContent';
|
|
8892
9032
|
|
|
8893
9033
|
const PopoverBody = (_a) => {
|
|
8894
9034
|
var { children, id, className } = _a, props = __rest$1(_a, ["children", "id", "className"]);
|
|
8895
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(styles$
|
|
9035
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(styles$R.popoverBody, className), id: id }, props), children));
|
|
8896
9036
|
};
|
|
8897
9037
|
PopoverBody.displayName = 'PopoverBody';
|
|
8898
9038
|
|
|
8899
9039
|
const PopoverHeaderIcon = (_a) => {
|
|
8900
9040
|
var { children, className } = _a, props = __rest$1(_a, ["children", "className"]);
|
|
8901
|
-
return (React__namespace.createElement("span", Object.assign({ className: css(styles$
|
|
9041
|
+
return (React__namespace.createElement("span", Object.assign({ className: css(styles$R.popoverTitleIcon, className) }, props), children));
|
|
8902
9042
|
};
|
|
8903
9043
|
PopoverHeaderIcon.displayName = 'PopoverHeaderIcon';
|
|
8904
9044
|
|
|
8905
9045
|
const PopoverHeaderText = (_a) => {
|
|
8906
9046
|
var { children, className } = _a, props = __rest$1(_a, ["children", "className"]);
|
|
8907
|
-
return (React__namespace.createElement("span", Object.assign({ className: css(styles$
|
|
9047
|
+
return (React__namespace.createElement("span", Object.assign({ className: css(styles$R.popoverTitleText, className) }, props), children));
|
|
8908
9048
|
};
|
|
8909
9049
|
PopoverHeaderText.displayName = 'PopoverHeaderText';
|
|
8910
9050
|
|
|
@@ -8912,7 +9052,7 @@
|
|
|
8912
9052
|
var { children, icon, className, titleHeadingLevel = 'h6', alertSeverityVariant, id, alertSeverityScreenReaderText } = _a, props = __rest$1(_a, ["children", "icon", "className", "titleHeadingLevel", "alertSeverityVariant", "id", "alertSeverityScreenReaderText"]);
|
|
8913
9053
|
const HeadingLevel = titleHeadingLevel;
|
|
8914
9054
|
return icon || alertSeverityVariant ? (React__namespace.createElement("header", Object.assign({ className: css('pf-c-popover__header', className), id: id }, props),
|
|
8915
|
-
React__namespace.createElement(HeadingLevel, { className: css(styles$
|
|
9055
|
+
React__namespace.createElement(HeadingLevel, { className: css(styles$R.popoverTitle, icon && styles$R.modifiers.icon) },
|
|
8916
9056
|
icon && React__namespace.createElement(PopoverHeaderIcon, null, icon),
|
|
8917
9057
|
alertSeverityVariant && alertSeverityScreenReaderText && (React__namespace.createElement("span", { className: "pf-u-screen-reader" }, alertSeverityScreenReaderText)),
|
|
8918
9058
|
React__namespace.createElement(PopoverHeaderText, null, children)))) : (React__namespace.createElement(Title, Object.assign({ headingLevel: titleHeadingLevel, size: exports.TitleSizes.md, id: id, className: className }, props), children));
|
|
@@ -8921,7 +9061,7 @@
|
|
|
8921
9061
|
|
|
8922
9062
|
const PopoverFooter = (_a) => {
|
|
8923
9063
|
var { children, className = '' } = _a, props = __rest$1(_a, ["children", "className"]);
|
|
8924
|
-
return (React__namespace.createElement("footer", Object.assign({ className: css(styles$
|
|
9064
|
+
return (React__namespace.createElement("footer", Object.assign({ className: css(styles$R.popoverFooter, className) }, props), children));
|
|
8925
9065
|
};
|
|
8926
9066
|
PopoverFooter.displayName = 'PopoverFooter';
|
|
8927
9067
|
|
|
@@ -8942,7 +9082,7 @@
|
|
|
8942
9082
|
|
|
8943
9083
|
const PopoverArrow = (_a) => {
|
|
8944
9084
|
var { className = '' } = _a, props = __rest$1(_a, ["className"]);
|
|
8945
|
-
return React__namespace.createElement("div", Object.assign({ className: css(styles$
|
|
9085
|
+
return React__namespace.createElement("div", Object.assign({ className: css(styles$R.popoverArrow, className) }, props));
|
|
8946
9086
|
};
|
|
8947
9087
|
PopoverArrow.displayName = 'PopoverArrow';
|
|
8948
9088
|
|
|
@@ -8977,11 +9117,11 @@
|
|
|
8977
9117
|
PopoverPosition["rightEnd"] = "right-end";
|
|
8978
9118
|
})(exports.PopoverPosition || (exports.PopoverPosition = {}));
|
|
8979
9119
|
const alertStyle = {
|
|
8980
|
-
default: styles$
|
|
8981
|
-
info: styles$
|
|
8982
|
-
success: styles$
|
|
8983
|
-
warning: styles$
|
|
8984
|
-
danger: styles$
|
|
9120
|
+
default: styles$R.modifiers.default,
|
|
9121
|
+
info: styles$R.modifiers.info,
|
|
9122
|
+
success: styles$R.modifiers.success,
|
|
9123
|
+
warning: styles$R.modifiers.warning,
|
|
9124
|
+
danger: styles$R.modifiers.danger
|
|
8985
9125
|
};
|
|
8986
9126
|
const Popover = (_a) => {
|
|
8987
9127
|
var { children, position = 'top', enableFlip = true, className = '', isVisible = null, shouldClose = () => null, shouldOpen = () => null, 'aria-label': ariaLabel = '', bodyContent, headerContent = null, headerComponent = 'h6', headerIcon = null, alertSeverityVariant, alertSeverityScreenReaderText, footerContent = null, appendTo = () => document.body, hideOnOutsideClick = true, onHide = () => null, onHidden = () => null, onShow = () => null, onShown = () => null, onMount = () => null, zIndex = 9999, minWidth = popoverMinWidth && popoverMinWidth.value, maxWidth = popoverMaxWidth && popoverMaxWidth.value, closeBtnAriaLabel = 'Close', showClose = true, distance = 25,
|
|
@@ -9045,18 +9185,18 @@
|
|
|
9045
9185
|
}, 0);
|
|
9046
9186
|
};
|
|
9047
9187
|
const positionModifiers = {
|
|
9048
|
-
top: styles$
|
|
9049
|
-
bottom: styles$
|
|
9050
|
-
left: styles$
|
|
9051
|
-
right: styles$
|
|
9052
|
-
'top-start': styles$
|
|
9053
|
-
'top-end': styles$
|
|
9054
|
-
'bottom-start': styles$
|
|
9055
|
-
'bottom-end': styles$
|
|
9056
|
-
'left-start': styles$
|
|
9057
|
-
'left-end': styles$
|
|
9058
|
-
'right-start': styles$
|
|
9059
|
-
'right-end': styles$
|
|
9188
|
+
top: styles$R.modifiers.top,
|
|
9189
|
+
bottom: styles$R.modifiers.bottom,
|
|
9190
|
+
left: styles$R.modifiers.left,
|
|
9191
|
+
right: styles$R.modifiers.right,
|
|
9192
|
+
'top-start': styles$R.modifiers.topLeft,
|
|
9193
|
+
'top-end': styles$R.modifiers.topRight,
|
|
9194
|
+
'bottom-start': styles$R.modifiers.bottomLeft,
|
|
9195
|
+
'bottom-end': styles$R.modifiers.bottomRight,
|
|
9196
|
+
'left-start': styles$R.modifiers.leftTop,
|
|
9197
|
+
'left-end': styles$R.modifiers.leftBottom,
|
|
9198
|
+
'right-start': styles$R.modifiers.rightTop,
|
|
9199
|
+
'right-end': styles$R.modifiers.rightBottom
|
|
9060
9200
|
};
|
|
9061
9201
|
const hasCustomMinWidth = minWidth !== popoverMinWidth.value;
|
|
9062
9202
|
const hasCustomMaxWidth = maxWidth !== popoverMaxWidth.value;
|
|
@@ -9133,7 +9273,7 @@
|
|
|
9133
9273
|
}
|
|
9134
9274
|
return node;
|
|
9135
9275
|
}
|
|
9136
|
-
}, preventScrollOnDeactivate: true, className: css(styles$
|
|
9276
|
+
}, preventScrollOnDeactivate: true, className: css(styles$R.popover, alertSeverityVariant && alertStyle[alertSeverityVariant], hasNoPadding && styles$R.modifiers.noPadding, hasAutoWidth && styles$R.modifiers.widthAuto, className), role: "dialog", "aria-modal": "true", "aria-label": headerContent ? undefined : ariaLabel, "aria-labelledby": headerContent ? `popover-${uniqueId}-header` : undefined, "aria-describedby": `popover-${uniqueId}-body`, onMouseDown: onContentMouseDown, style: {
|
|
9137
9277
|
minWidth: hasCustomMinWidth ? minWidth : null,
|
|
9138
9278
|
maxWidth: hasCustomMaxWidth ? maxWidth : null,
|
|
9139
9279
|
opacity,
|
|
@@ -9196,7 +9336,7 @@
|
|
|
9196
9336
|
}
|
|
9197
9337
|
render() {
|
|
9198
9338
|
const _a = this.props, { className, children, onChange, isReadOnly, isCode } = _a, props = __rest$1(_a, ["className", "children", "onChange", "isReadOnly", "isCode"]);
|
|
9199
|
-
return (React__namespace.createElement("div", Object.assign({ suppressContentEditableWarning: true, className: css(styles$
|
|
9339
|
+
return (React__namespace.createElement("div", Object.assign({ suppressContentEditableWarning: true, className: css(styles$S.clipboardCopyExpandableContent, className), onInput: (e) => onChange(e.target.innerText, e), contentEditable: !isReadOnly }, props), isCode ? React__namespace.createElement("pre", null, children) : children));
|
|
9200
9340
|
}
|
|
9201
9341
|
}
|
|
9202
9342
|
ClipboardCopyExpanded.displayName = 'ClipboardCopyExpanded';
|
|
@@ -9256,12 +9396,12 @@
|
|
|
9256
9396
|
const textIdPrefix = 'text-input-';
|
|
9257
9397
|
const toggleIdPrefix = 'toggle-';
|
|
9258
9398
|
const contentIdPrefix = 'content-';
|
|
9259
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(styles$
|
|
9399
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(styles$S.clipboardCopy, variant === 'inline-compact' && styles$S.modifiers.inline, isBlock && styles$S.modifiers.block, this.state.expanded && styles$S.modifiers.expanded, className) }, divProps),
|
|
9260
9400
|
variant === 'inline-compact' && (React__namespace.createElement(GenerateId, { prefix: "" }, id => (React__namespace.createElement(React__namespace.Fragment, null,
|
|
9261
|
-
!isCode && (React__namespace.createElement("span", { className: css(styles$
|
|
9262
|
-
isCode && (React__namespace.createElement("code", { className: css(styles$
|
|
9263
|
-
React__namespace.createElement("span", { className: css(styles$
|
|
9264
|
-
React__namespace.createElement("span", { className: css(styles$
|
|
9401
|
+
!isCode && (React__namespace.createElement("span", { className: css(styles$S.clipboardCopyText), id: `${textIdPrefix}${id}` }, this.state.text)),
|
|
9402
|
+
isCode && (React__namespace.createElement("code", { className: css(styles$S.clipboardCopyText, styles$S.modifiers.code), id: `${textIdPrefix}${id}` }, this.state.text)),
|
|
9403
|
+
React__namespace.createElement("span", { className: css(styles$S.clipboardCopyActions) },
|
|
9404
|
+
React__namespace.createElement("span", { className: css(styles$S.clipboardCopyActionsItem) },
|
|
9265
9405
|
React__namespace.createElement(ClipboardCopyButton, { variant: "plain", exitDelay: exitDelay, entryDelay: entryDelay, maxWidth: maxWidth, position: position, id: `copy-button-${id}`, textId: `text-input-${id}`, "aria-label": hoverTip, onClick: (event) => {
|
|
9266
9406
|
if (this.timer) {
|
|
9267
9407
|
window.clearTimeout(this.timer);
|
|
@@ -9277,7 +9417,7 @@
|
|
|
9277
9417
|
} }, this.state.copied ? clickTip : hoverTip)),
|
|
9278
9418
|
additionalActions && additionalActions))))),
|
|
9279
9419
|
variant !== 'inline-compact' && (React__namespace.createElement(GenerateId, { prefix: "" }, id => (React__namespace.createElement(React__namespace.Fragment, null,
|
|
9280
|
-
React__namespace.createElement("div", { className: css(styles$
|
|
9420
|
+
React__namespace.createElement("div", { className: css(styles$S.clipboardCopyGroup) },
|
|
9281
9421
|
variant === 'expansion' && (React__namespace.createElement(ClipboardCopyToggle, { isExpanded: this.state.expanded, onClick: this.expandContent, id: `${toggleIdPrefix}${id}`, textId: `${textIdPrefix}${id}`, contentId: `${contentIdPrefix}${id}`, "aria-label": toggleAriaLabel })),
|
|
9282
9422
|
React__namespace.createElement(TextInput, { isReadOnly: isReadOnly || this.state.expanded, onChange: this.updateText, value: this.state.text, id: `text-input-${id}`, "aria-label": textAriaLabel }),
|
|
9283
9423
|
React__namespace.createElement(ClipboardCopyButton, { exitDelay: exitDelay, entryDelay: entryDelay, maxWidth: maxWidth, position: position, id: `copy-button-${id}`, textId: `text-input-${id}`, "aria-label": hoverTip, onClick: (event) => {
|
|
@@ -9326,12 +9466,12 @@
|
|
|
9326
9466
|
|
|
9327
9467
|
const ClipboardCopyAction = (_a) => {
|
|
9328
9468
|
var { children = null, className = '' } = _a, props = __rest$1(_a, ["children", "className"]);
|
|
9329
|
-
return (React__namespace.createElement("span", Object.assign({ className: css(styles$
|
|
9469
|
+
return (React__namespace.createElement("span", Object.assign({ className: css(styles$S.clipboardCopyActionsItem, className) }, props), children));
|
|
9330
9470
|
};
|
|
9331
9471
|
ClipboardCopyAction.displayName = 'ClipboardCopyAction';
|
|
9332
9472
|
|
|
9333
9473
|
Promise.resolve().then(function () { return codeBlock; });
|
|
9334
|
-
var styles$
|
|
9474
|
+
var styles$Q = {
|
|
9335
9475
|
"codeBlock": "pf-c-code-block",
|
|
9336
9476
|
"codeBlockActions": "pf-c-code-block__actions",
|
|
9337
9477
|
"codeBlockCode": "pf-c-code-block__code",
|
|
@@ -9342,17 +9482,17 @@
|
|
|
9342
9482
|
|
|
9343
9483
|
const CodeBlock = (_a) => {
|
|
9344
9484
|
var { children = null, className, actions = null } = _a, props = __rest$1(_a, ["children", "className", "actions"]);
|
|
9345
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(styles$
|
|
9346
|
-
React__namespace.createElement("div", { className: css(styles$
|
|
9347
|
-
React__namespace.createElement("div", { className: css(styles$
|
|
9348
|
-
React__namespace.createElement("div", { className: css(styles$
|
|
9485
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(styles$Q.codeBlock, className) }, props),
|
|
9486
|
+
React__namespace.createElement("div", { className: css(styles$Q.codeBlockHeader) },
|
|
9487
|
+
React__namespace.createElement("div", { className: css(styles$Q.codeBlockActions) }, actions && actions)),
|
|
9488
|
+
React__namespace.createElement("div", { className: css(styles$Q.codeBlockContent) }, children)));
|
|
9349
9489
|
};
|
|
9350
9490
|
CodeBlock.displayName = 'CodeBlock';
|
|
9351
9491
|
|
|
9352
9492
|
const CodeBlockCode = (_a) => {
|
|
9353
9493
|
var { children = null, className, codeClassName } = _a, props = __rest$1(_a, ["children", "className", "codeClassName"]);
|
|
9354
|
-
return (React__namespace.createElement("pre", Object.assign({ className: css(styles$
|
|
9355
|
-
React__namespace.createElement("code", { className: css(styles$
|
|
9494
|
+
return (React__namespace.createElement("pre", Object.assign({ className: css(styles$Q.codeBlockPre, className) }, props),
|
|
9495
|
+
React__namespace.createElement("code", { className: css(styles$Q.codeBlockCode, codeClassName) }, children)));
|
|
9356
9496
|
};
|
|
9357
9497
|
CodeBlockCode.displayName = 'CodeBlockCode';
|
|
9358
9498
|
|
|
@@ -9363,7 +9503,7 @@
|
|
|
9363
9503
|
CodeBlockAction.displayName = 'CodeBlockAction';
|
|
9364
9504
|
|
|
9365
9505
|
Promise.resolve().then(function () { return contextSelector; });
|
|
9366
|
-
var styles$
|
|
9506
|
+
var styles$P = {
|
|
9367
9507
|
"contextSelector": "pf-c-context-selector",
|
|
9368
9508
|
"contextSelectorMenu": "pf-c-context-selector__menu",
|
|
9369
9509
|
"contextSelectorMenuFooter": "pf-c-context-selector__menu-footer",
|
|
@@ -9450,9 +9590,9 @@
|
|
|
9450
9590
|
isActive, onEnter, parentRef } = _a,
|
|
9451
9591
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
9452
9592
|
props = __rest$1(_a, ["className", "toggleText", "isOpen", "onToggle", "id", "isPlain", "isText", "isActive", "onEnter", "parentRef"]);
|
|
9453
|
-
return (React__namespace.createElement("button", Object.assign({}, props, { id: id, ref: this.toggle, className: css(styles$
|
|
9454
|
-
React__namespace.createElement("span", { className: css(styles$
|
|
9455
|
-
React__namespace.createElement("span", { className: css(styles$
|
|
9593
|
+
return (React__namespace.createElement("button", Object.assign({}, props, { id: id, ref: this.toggle, className: css(styles$P.contextSelectorToggle, isActive && styles$P.modifiers.active, isPlain && styles$P.modifiers.plain, isText && styles$P.modifiers.text, className), type: "button", onClick: event => onToggle(event, !isOpen), "aria-expanded": isOpen, onKeyDown: this.onKeyDown }),
|
|
9594
|
+
React__namespace.createElement("span", { className: css(styles$P.contextSelectorToggleText) }, toggleText),
|
|
9595
|
+
React__namespace.createElement("span", { className: css(styles$P.contextSelectorToggleIcon) },
|
|
9456
9596
|
React__namespace.createElement(CaretDownIcon$1, { "aria-hidden": true }))));
|
|
9457
9597
|
}
|
|
9458
9598
|
}
|
|
@@ -9478,7 +9618,7 @@
|
|
|
9478
9618
|
this.render = () => {
|
|
9479
9619
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
9480
9620
|
const _a = this.props, { className, isOpen, children } = _a, props = __rest$1(_a, ["className", "isOpen", "children"]);
|
|
9481
|
-
return (React__namespace.createElement("ul", Object.assign({ className: css(styles$
|
|
9621
|
+
return (React__namespace.createElement("ul", Object.assign({ className: css(styles$P.contextSelectorMenuList, className), hidden: !isOpen, role: "menu" }, props), this.extendChildren()));
|
|
9482
9622
|
};
|
|
9483
9623
|
}
|
|
9484
9624
|
extendChildren() {
|
|
@@ -9500,155 +9640,6 @@
|
|
|
9500
9640
|
onSelect: (event, value) => undefined
|
|
9501
9641
|
});
|
|
9502
9642
|
|
|
9503
|
-
Promise.resolve().then(function () { return inputGroup; });
|
|
9504
|
-
var styles$P = {
|
|
9505
|
-
"formControl": "pf-c-form-control",
|
|
9506
|
-
"inputGroup": "pf-c-input-group",
|
|
9507
|
-
"inputGroupText": "pf-c-input-group__text",
|
|
9508
|
-
"modifiers": {
|
|
9509
|
-
"plain": "pf-m-plain"
|
|
9510
|
-
},
|
|
9511
|
-
"themeDark": "pf-theme-dark"
|
|
9512
|
-
};
|
|
9513
|
-
|
|
9514
|
-
class FormSelect extends React__namespace.Component {
|
|
9515
|
-
constructor(props) {
|
|
9516
|
-
super(props);
|
|
9517
|
-
this.handleChange = (event) => {
|
|
9518
|
-
this.props.onChange(event.currentTarget.value, event);
|
|
9519
|
-
};
|
|
9520
|
-
if (!props.id && !props['aria-label']) {
|
|
9521
|
-
// eslint-disable-next-line no-console
|
|
9522
|
-
console.error('FormSelect requires either an id or aria-label to be specified');
|
|
9523
|
-
}
|
|
9524
|
-
this.state = {
|
|
9525
|
-
ouiaStateId: getDefaultOUIAId(FormSelect.displayName, props.validated)
|
|
9526
|
-
};
|
|
9527
|
-
}
|
|
9528
|
-
render() {
|
|
9529
|
-
const _a = this.props, { children, className, value, validated, isDisabled, isRequired, isIconSprite, ouiaId, ouiaSafe } = _a, props = __rest$1(_a, ["children", "className", "value", "validated", "isDisabled", "isRequired", "isIconSprite", "ouiaId", "ouiaSafe"]);
|
|
9530
|
-
/* find selected option and get placeholder flag */
|
|
9531
|
-
const selectedOption = React__namespace.Children.toArray(children).find((option) => option.props.value === value);
|
|
9532
|
-
const isSelectedPlaceholder = selectedOption && selectedOption.props.isPlaceholder;
|
|
9533
|
-
return (React__namespace.createElement("select", Object.assign({}, props, { className: css(formStyles.formControl, isIconSprite && formStyles.modifiers.iconSprite, className, validated === exports.ValidatedOptions.success && formStyles.modifiers.success, validated === exports.ValidatedOptions.warning && formStyles.modifiers.warning, isSelectedPlaceholder && formStyles.modifiers.placeholder), "aria-invalid": validated === exports.ValidatedOptions.error }, getOUIAProps(FormSelect.displayName, ouiaId !== undefined ? ouiaId : this.state.ouiaStateId, ouiaSafe), { onChange: this.handleChange, disabled: isDisabled, required: isRequired, value: value }), children));
|
|
9534
|
-
}
|
|
9535
|
-
}
|
|
9536
|
-
FormSelect.displayName = 'FormSelect';
|
|
9537
|
-
FormSelect.defaultProps = {
|
|
9538
|
-
className: '',
|
|
9539
|
-
value: '',
|
|
9540
|
-
validated: 'default',
|
|
9541
|
-
isDisabled: false,
|
|
9542
|
-
isRequired: false,
|
|
9543
|
-
isIconSprite: false,
|
|
9544
|
-
onBlur: () => undefined,
|
|
9545
|
-
onFocus: () => undefined,
|
|
9546
|
-
onChange: () => undefined,
|
|
9547
|
-
ouiaSafe: true
|
|
9548
|
-
};
|
|
9549
|
-
|
|
9550
|
-
const FormSelectOption = (_a) => {
|
|
9551
|
-
var { className = '', value = '', isDisabled = false, label,
|
|
9552
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
9553
|
-
isPlaceholder = false } = _a, props = __rest$1(_a, ["className", "value", "isDisabled", "label", "isPlaceholder"]);
|
|
9554
|
-
return (React__namespace.createElement("option", Object.assign({}, props, { className: className, value: value, disabled: isDisabled }), label));
|
|
9555
|
-
};
|
|
9556
|
-
FormSelectOption.displayName = 'FormSelectOption';
|
|
9557
|
-
|
|
9558
|
-
const FormSelectOptionGroup = (_a) => {
|
|
9559
|
-
var { children = null, className = '', isDisabled = false, label } = _a, props = __rest$1(_a, ["children", "className", "isDisabled", "label"]);
|
|
9560
|
-
return (React__namespace.createElement("optgroup", Object.assign({}, props, { disabled: !!isDisabled, className: className, label: label }), children));
|
|
9561
|
-
};
|
|
9562
|
-
FormSelectOptionGroup.displayName = 'FormSelectOptionGroup';
|
|
9563
|
-
|
|
9564
|
-
const c_form_control_textarea_Height = {
|
|
9565
|
-
"name": "--pf-c-form-control--textarea--Height",
|
|
9566
|
-
"value": "auto",
|
|
9567
|
-
"var": "var(--pf-c-form-control--textarea--Height)"
|
|
9568
|
-
};
|
|
9569
|
-
var heightToken = c_form_control_textarea_Height;
|
|
9570
|
-
|
|
9571
|
-
exports.TextAreResizeOrientation = void 0;
|
|
9572
|
-
(function (TextAreResizeOrientation) {
|
|
9573
|
-
TextAreResizeOrientation["horizontal"] = "horizontal";
|
|
9574
|
-
TextAreResizeOrientation["vertical"] = "vertical";
|
|
9575
|
-
TextAreResizeOrientation["both"] = "both";
|
|
9576
|
-
})(exports.TextAreResizeOrientation || (exports.TextAreResizeOrientation = {}));
|
|
9577
|
-
class TextAreaBase extends React__namespace.Component {
|
|
9578
|
-
constructor(props) {
|
|
9579
|
-
super(props);
|
|
9580
|
-
this.handleChange = (event) => {
|
|
9581
|
-
// https://gomakethings.com/automatically-expand-a-textarea-as-the-user-types-using-vanilla-javascript/
|
|
9582
|
-
const field = event.currentTarget;
|
|
9583
|
-
if (this.props.autoResize && canUseDOM) {
|
|
9584
|
-
field.style.setProperty(heightToken.name, 'inherit');
|
|
9585
|
-
const computed = window.getComputedStyle(field);
|
|
9586
|
-
// Calculate the height
|
|
9587
|
-
const height = parseInt(computed.getPropertyValue('border-top-width')) +
|
|
9588
|
-
parseInt(computed.getPropertyValue('padding-top')) +
|
|
9589
|
-
field.scrollHeight +
|
|
9590
|
-
parseInt(computed.getPropertyValue('padding-bottom')) +
|
|
9591
|
-
parseInt(computed.getPropertyValue('border-bottom-width'));
|
|
9592
|
-
field.style.setProperty(heightToken.name, `${height}px`);
|
|
9593
|
-
}
|
|
9594
|
-
if (this.props.onChange) {
|
|
9595
|
-
this.props.onChange(field.value, event);
|
|
9596
|
-
}
|
|
9597
|
-
};
|
|
9598
|
-
if (!props.id && !props['aria-label']) {
|
|
9599
|
-
// eslint-disable-next-line no-console
|
|
9600
|
-
console.error('TextArea: TextArea requires either an id or aria-label to be specified');
|
|
9601
|
-
}
|
|
9602
|
-
}
|
|
9603
|
-
render() {
|
|
9604
|
-
const _a = this.props, { className, value, validated, isRequired, isDisabled, isIconSprite, isReadOnly, resizeOrientation, innerRef, readOnly, disabled,
|
|
9605
|
-
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
9606
|
-
autoResize, onChange } = _a,
|
|
9607
|
-
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
9608
|
-
props = __rest$1(_a, ["className", "value", "validated", "isRequired", "isDisabled", "isIconSprite", "isReadOnly", "resizeOrientation", "innerRef", "readOnly", "disabled", "autoResize", "onChange"]);
|
|
9609
|
-
const orientation = `resize${capitalize(resizeOrientation)}`;
|
|
9610
|
-
return (React__namespace.createElement("textarea", Object.assign({ className: css(formStyles.formControl, isIconSprite && formStyles.modifiers.iconSprite, className, resizeOrientation !== exports.TextAreResizeOrientation.both && formStyles.modifiers[orientation], validated === exports.ValidatedOptions.success && formStyles.modifiers.success, validated === exports.ValidatedOptions.warning && formStyles.modifiers.warning), onChange: this.handleChange }, (typeof this.props.defaultValue !== 'string' && { value }), { "aria-invalid": validated === exports.ValidatedOptions.error, required: isRequired, disabled: isDisabled || disabled, readOnly: isReadOnly || readOnly, ref: innerRef }, props)));
|
|
9611
|
-
}
|
|
9612
|
-
}
|
|
9613
|
-
TextAreaBase.displayName = 'TextArea';
|
|
9614
|
-
TextAreaBase.defaultProps = {
|
|
9615
|
-
innerRef: React__namespace.createRef(),
|
|
9616
|
-
className: '',
|
|
9617
|
-
isRequired: false,
|
|
9618
|
-
isDisabled: false,
|
|
9619
|
-
isIconSprite: false,
|
|
9620
|
-
validated: 'default',
|
|
9621
|
-
resizeOrientation: 'both',
|
|
9622
|
-
'aria-label': null
|
|
9623
|
-
};
|
|
9624
|
-
const TextArea = React__namespace.forwardRef((props, ref) => (React__namespace.createElement(TextAreaBase, Object.assign({}, props, { innerRef: ref }))));
|
|
9625
|
-
TextArea.displayName = 'TextArea';
|
|
9626
|
-
|
|
9627
|
-
const InputGroup = (_a) => {
|
|
9628
|
-
var { className = '', children, innerRef } = _a, props = __rest$1(_a, ["className", "children", "innerRef"]);
|
|
9629
|
-
const formCtrls = [FormSelect, TextArea, TextInput].map(comp => comp.displayName);
|
|
9630
|
-
const idItem = React__namespace.Children.toArray(children).find((child) => !formCtrls.includes(child.type.displayName) && child.props.id);
|
|
9631
|
-
const inputGroupRef = innerRef || React__namespace.useRef(null);
|
|
9632
|
-
return (React__namespace.createElement("div", Object.assign({ ref: inputGroupRef, className: css(styles$P.inputGroup, className) }, props), idItem
|
|
9633
|
-
? React__namespace.Children.map(children, (child) => formCtrls.includes(child.type.displayName)
|
|
9634
|
-
? React__namespace.cloneElement(child, { 'aria-describedby': idItem.props.id })
|
|
9635
|
-
: child)
|
|
9636
|
-
: children));
|
|
9637
|
-
};
|
|
9638
|
-
InputGroup.displayName = 'InputGroup';
|
|
9639
|
-
|
|
9640
|
-
exports.InputGroupTextVariant = void 0;
|
|
9641
|
-
(function (InputGroupTextVariant) {
|
|
9642
|
-
InputGroupTextVariant["default"] = "default";
|
|
9643
|
-
InputGroupTextVariant["plain"] = "plain";
|
|
9644
|
-
})(exports.InputGroupTextVariant || (exports.InputGroupTextVariant = {}));
|
|
9645
|
-
const InputGroupText = (_a) => {
|
|
9646
|
-
var { className = '', component = 'span', children, variant = exports.InputGroupTextVariant.default } = _a, props = __rest$1(_a, ["className", "component", "children", "variant"]);
|
|
9647
|
-
const Component = component;
|
|
9648
|
-
return (React__namespace.createElement(Component, Object.assign({ className: css(styles$P.inputGroupText, variant === exports.InputGroupTextVariant.plain && styles$P.modifiers.plain, className) }, props), children));
|
|
9649
|
-
};
|
|
9650
|
-
InputGroupText.displayName = 'InputGroupText';
|
|
9651
|
-
|
|
9652
9643
|
// seed for the aria-labelledby ID
|
|
9653
9644
|
let currentId = 0;
|
|
9654
9645
|
const newId = currentId++;
|
|
@@ -9671,8 +9662,8 @@
|
|
|
9671
9662
|
const screenReaderLabelId = `pf-context-selector-label-id-${newId}`;
|
|
9672
9663
|
const searchButtonId = `pf-context-selector-search-button-id-${newId}`;
|
|
9673
9664
|
const _a = this.props, { children, className, isOpen, isFullHeight, onToggle, onSelect, screenReaderLabel, toggleText, searchButtonAriaLabel, searchInputValue, onSearchInputChange, searchInputPlaceholder, onSearchButtonClick, menuAppendTo, ouiaId, ouiaSafe, isPlain, isText, footer, disableFocusTrap, isFlipEnabled } = _a, props = __rest$1(_a, ["children", "className", "isOpen", "isFullHeight", "onToggle", "onSelect", "screenReaderLabel", "toggleText", "searchButtonAriaLabel", "searchInputValue", "onSearchInputChange", "searchInputPlaceholder", "onSearchButtonClick", "menuAppendTo", "ouiaId", "ouiaSafe", "isPlain", "isText", "footer", "disableFocusTrap", "isFlipEnabled"]);
|
|
9674
|
-
const menuContainer = (React__namespace.createElement("div", Object.assign({ className: css(styles$
|
|
9675
|
-
React__namespace.createElement("div", { className: css(styles$
|
|
9665
|
+
const menuContainer = (React__namespace.createElement("div", Object.assign({ className: css(styles$P.contextSelectorMenu) }, (isFlipEnabled && { style: { position: 'revert' } })), isOpen && (React__namespace.createElement(FocusTrap, { active: !disableFocusTrap, focusTrapOptions: { clickOutsideDeactivates: true, tabbableOptions: { displayCheck: 'none' } } },
|
|
9666
|
+
React__namespace.createElement("div", { className: css(styles$P.contextSelectorMenuSearch) },
|
|
9676
9667
|
React__namespace.createElement(InputGroup, null,
|
|
9677
9668
|
React__namespace.createElement(TextInput, { value: searchInputValue, type: "search", placeholder: searchInputPlaceholder, onChange: onSearchInputChange, onKeyPress: this.onEnterPressed, "aria-labelledby": searchButtonId }),
|
|
9678
9669
|
React__namespace.createElement(Button, { variant: exports.ButtonVariant.control, "aria-label": searchButtonAriaLabel, id: searchButtonId, onClick: onSearchButtonClick },
|
|
@@ -9680,8 +9671,8 @@
|
|
|
9680
9671
|
React__namespace.createElement(ContextSelectorContext.Provider, { value: { onSelect } },
|
|
9681
9672
|
React__namespace.createElement(ContextSelectorMenuList, { isOpen: isOpen }, children)),
|
|
9682
9673
|
footer))));
|
|
9683
|
-
const popperContainer = (React__namespace.createElement("div", Object.assign({ className: css(styles$
|
|
9684
|
-
const mainContainer = (React__namespace.createElement("div", Object.assign({ className: css(styles$
|
|
9674
|
+
const popperContainer = (React__namespace.createElement("div", Object.assign({ className: css(styles$P.contextSelector, isOpen && styles$P.modifiers.expanded, className), ref: this.popperRef }, props), isOpen && menuContainer));
|
|
9675
|
+
const mainContainer = (React__namespace.createElement("div", Object.assign({ className: css(styles$P.contextSelector, isOpen && styles$P.modifiers.expanded, isFullHeight && styles$P.modifiers.fullHeight, className), ref: this.parentRef }, getOUIAProps(ContextSelector.displayName, ouiaId !== undefined ? ouiaId : this.state.ouiaStateId, ouiaSafe), props),
|
|
9685
9676
|
screenReaderLabel && (React__namespace.createElement("span", { id: screenReaderLabelId, hidden: true }, screenReaderLabel)),
|
|
9686
9677
|
React__namespace.createElement(ContextSelectorToggle, { onToggle: onToggle, isOpen: isOpen, toggleText: toggleText, id: toggleId, parentRef: menuAppendTo === 'inline' ? this.parentRef : this.popperRef, "aria-labelledby": `${screenReaderLabelId} ${toggleId}`, isPlain: isPlain, isText: isText }),
|
|
9687
9678
|
isOpen && menuAppendTo === 'inline' && menuContainer));
|
|
@@ -9732,7 +9723,7 @@
|
|
|
9732
9723
|
const Component = href ? 'a' : 'button';
|
|
9733
9724
|
const isDisabledLink = href && isDisabled;
|
|
9734
9725
|
return (React__namespace.createElement(ContextSelectorContext.Consumer, null, ({ onSelect }) => (React__namespace.createElement("li", { role: "none" },
|
|
9735
|
-
React__namespace.createElement(Component, Object.assign({ className: css(styles$
|
|
9726
|
+
React__namespace.createElement(Component, Object.assign({ className: css(styles$P.contextSelectorMenuListItem, isDisabledLink && styles$P.modifiers.disabled, className), ref: this.ref, onClick: event => {
|
|
9736
9727
|
if (!isDisabled) {
|
|
9737
9728
|
onClick(event);
|
|
9738
9729
|
onSelect(event, children);
|
|
@@ -9753,7 +9744,7 @@
|
|
|
9753
9744
|
|
|
9754
9745
|
const ContextSelectorFooter = (_a) => {
|
|
9755
9746
|
var { children = null, className = '' } = _a, props = __rest$1(_a, ["children", "className"]);
|
|
9756
|
-
return (React__namespace.createElement("div", Object.assign({}, props, { className: css(styles$
|
|
9747
|
+
return (React__namespace.createElement("div", Object.assign({}, props, { className: css(styles$P.contextSelectorMenuFooter, className) }), children));
|
|
9757
9748
|
};
|
|
9758
9749
|
ContextSelectorFooter.displayName = 'ContextSelectorFooter';
|
|
9759
9750
|
|
|
@@ -10900,19 +10891,6 @@
|
|
|
10900
10891
|
|
|
10901
10892
|
var AngleDoubleLeftIcon$1 = AngleDoubleLeftIcon;
|
|
10902
10893
|
|
|
10903
|
-
const AngleLeftIconConfig = {
|
|
10904
|
-
name: 'AngleLeftIcon',
|
|
10905
|
-
height: 512,
|
|
10906
|
-
width: 256,
|
|
10907
|
-
svgPath: 'M31.7 239l136-136c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9L127.9 256l96.4 96.4c9.4 9.4 9.4 24.6 0 33.9L201.7 409c-9.4 9.4-24.6 9.4-33.9 0l-136-136c-9.5-9.4-9.5-24.6-.1-34z',
|
|
10908
|
-
yOffset: 0,
|
|
10909
|
-
xOffset: 0,
|
|
10910
|
-
};
|
|
10911
|
-
|
|
10912
|
-
const AngleLeftIcon = createIcon(AngleLeftIconConfig);
|
|
10913
|
-
|
|
10914
|
-
var AngleLeftIcon$1 = AngleLeftIcon;
|
|
10915
|
-
|
|
10916
10894
|
const AngleDoubleRightIconConfig = {
|
|
10917
10895
|
name: 'AngleDoubleRightIcon',
|
|
10918
10896
|
height: 512,
|
|
@@ -11294,6 +11272,15 @@
|
|
|
11294
11272
|
this.addSelectedButtonRef = React__namespace.createRef();
|
|
11295
11273
|
this.removeSelectedButtonRef = React__namespace.createRef();
|
|
11296
11274
|
this.removeAllButtonRef = React__namespace.createRef();
|
|
11275
|
+
/** In dev environment, prevents circular structure during JSON stringification when
|
|
11276
|
+
* options passed in to the dual list selector include HTML elements.
|
|
11277
|
+
*/
|
|
11278
|
+
this.replacer = (key, value) => {
|
|
11279
|
+
if (key[0] === '_') {
|
|
11280
|
+
return undefined;
|
|
11281
|
+
}
|
|
11282
|
+
return value;
|
|
11283
|
+
};
|
|
11297
11284
|
this.onFilterUpdate = (newFilteredOptions, paneType, isSearchReset) => {
|
|
11298
11285
|
const { isTree } = this.props;
|
|
11299
11286
|
if (paneType === 'available') {
|
|
@@ -11643,8 +11630,10 @@
|
|
|
11643
11630
|
: null;
|
|
11644
11631
|
}
|
|
11645
11632
|
componentDidUpdate() {
|
|
11646
|
-
if (JSON.stringify(this.props.availableOptions
|
|
11647
|
-
JSON.stringify(this.
|
|
11633
|
+
if (JSON.stringify(this.props.availableOptions, this.replacer) !==
|
|
11634
|
+
JSON.stringify(this.state.availableOptions, this.replacer) ||
|
|
11635
|
+
JSON.stringify(this.props.chosenOptions, this.replacer) !==
|
|
11636
|
+
JSON.stringify(this.state.chosenOptions, this.replacer)) {
|
|
11648
11637
|
this.setState({
|
|
11649
11638
|
availableOptions: [...this.props.availableOptions],
|
|
11650
11639
|
chosenOptions: [...this.props.chosenOptions]
|
|
@@ -18168,6 +18157,19 @@
|
|
|
18168
18157
|
"themeDark": "pf-theme-dark"
|
|
18169
18158
|
};
|
|
18170
18159
|
|
|
18160
|
+
const ArrowRightIconConfig = {
|
|
18161
|
+
name: 'ArrowRightIcon',
|
|
18162
|
+
height: 512,
|
|
18163
|
+
width: 448,
|
|
18164
|
+
svgPath: 'M190.5 66.9l22.2-22.2c9.4-9.4 24.6-9.4 33.9 0L441 239c9.4 9.4 9.4 24.6 0 33.9L246.6 467.3c-9.4 9.4-24.6 9.4-33.9 0l-22.2-22.2c-9.5-9.5-9.3-25 .4-34.3L311.4 296H24c-13.3 0-24-10.7-24-24v-32c0-13.3 10.7-24 24-24h287.4L190.9 101.2c-9.8-9.3-10-24.8-.4-34.3z',
|
|
18165
|
+
yOffset: 0,
|
|
18166
|
+
xOffset: 0,
|
|
18167
|
+
};
|
|
18168
|
+
|
|
18169
|
+
const ArrowRightIcon = createIcon(ArrowRightIconConfig);
|
|
18170
|
+
|
|
18171
|
+
var ArrowRightIcon$1 = ArrowRightIcon;
|
|
18172
|
+
|
|
18171
18173
|
Promise.resolve().then(function () { return panel; });
|
|
18172
18174
|
var styles$m = {
|
|
18173
18175
|
"modifiers": {
|
|
@@ -22471,6 +22473,10 @@
|
|
|
22471
22473
|
__proto__: null
|
|
22472
22474
|
});
|
|
22473
22475
|
|
|
22476
|
+
var inputGroup = /*#__PURE__*/Object.freeze({
|
|
22477
|
+
__proto__: null
|
|
22478
|
+
});
|
|
22479
|
+
|
|
22474
22480
|
var calendarMonth = /*#__PURE__*/Object.freeze({
|
|
22475
22481
|
__proto__: null
|
|
22476
22482
|
});
|
|
@@ -22495,10 +22501,6 @@
|
|
|
22495
22501
|
__proto__: null
|
|
22496
22502
|
});
|
|
22497
22503
|
|
|
22498
|
-
var inputGroup = /*#__PURE__*/Object.freeze({
|
|
22499
|
-
__proto__: null
|
|
22500
|
-
});
|
|
22501
|
-
|
|
22502
22504
|
var dataList = /*#__PURE__*/Object.freeze({
|
|
22503
22505
|
__proto__: null
|
|
22504
22506
|
});
|