@patternfly/react-core 4.192.2 → 4.192.6
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 +35 -0
- package/dist/esm/components/DatePicker/DatePicker.d.ts +2 -0
- package/dist/esm/components/DatePicker/DatePicker.d.ts.map +1 -1
- package/dist/esm/components/DatePicker/DatePicker.js +7 -3
- package/dist/esm/components/DatePicker/DatePicker.js.map +1 -1
- package/dist/esm/components/Menu/MenuContent.js +1 -1
- package/dist/esm/components/Menu/MenuContent.js.map +1 -1
- package/dist/js/components/DatePicker/DatePicker.d.ts +2 -0
- package/dist/js/components/DatePicker/DatePicker.d.ts.map +1 -1
- package/dist/js/components/DatePicker/DatePicker.js +7 -3
- package/dist/js/components/DatePicker/DatePicker.js.map +1 -1
- package/dist/js/components/Menu/MenuContent.js +1 -1
- package/dist/js/components/Menu/MenuContent.js.map +1 -1
- package/dist/umd/react-core.css +910 -910
- package/dist/umd/react-core.js +8 -4
- package/dist/umd/react-core.min.css +72 -72
- package/dist/umd/react-core.min.js +2 -2
- package/index.d.ts +4 -0
- package/package.json +5 -5
- package/src/components/BackToTop/examples/BackToTop.css +3 -3
- package/src/components/BackToTop/examples/BackToTop.md +1 -6
- package/src/components/BackToTop/examples/BackToTopBasic.tsx +4 -0
- package/src/components/Backdrop/examples/Backdrop.md +3 -12
- package/src/components/Backdrop/examples/BackdropBasic.tsx +4 -0
- package/src/components/Backdrop/examples/BackdropSpinner.tsx +10 -0
- package/src/components/BackgroundImage/examples/BackgroundImage.md +2 -21
- package/src/components/BackgroundImage/examples/BackgroundImageBasic.tsx +15 -0
- package/src/components/Badge/examples/Badge.md +3 -24
- package/src/components/Badge/examples/BadgeRead.tsx +19 -0
- package/src/components/Badge/examples/BadgeUnread.tsx +8 -0
- package/src/components/Banner/examples/Banner.md +1 -14
- package/src/components/Banner/examples/BannerBasic.tsx +16 -0
- package/src/components/Brand/examples/Brand.md +3 -5
- package/src/components/Brand/examples/BrandBasic.tsx +5 -0
- package/src/components/Breadcrumb/examples/Breadcrumb.md +4 -105
- package/src/components/Breadcrumb/examples/BreadcrumbBasic.tsx +13 -0
- package/src/components/Breadcrumb/examples/BreadcrumbDropdown.tsx +53 -0
- package/src/components/Breadcrumb/examples/BreadcrumbWithHeading.tsx +12 -0
- package/src/components/Breadcrumb/examples/BreadcrumbWithoutHomeLink.tsx +15 -0
- package/src/components/Button/examples/ButtonAriaDisabled.tsx +33 -37
- package/src/components/Button/examples/ButtonCallToAction.tsx +8 -6
- package/src/components/Button/examples/ButtonDisabled.tsx +33 -37
- package/src/components/Button/examples/ButtonInlineSpanLink.tsx +2 -2
- package/src/components/Button/examples/ButtonLinks.tsx +6 -6
- package/src/components/Button/examples/ButtonProgress.tsx +8 -5
- package/src/components/Button/examples/ButtonSmall.tsx +9 -7
- package/src/components/Button/examples/ButtonTypes.tsx +4 -6
- package/src/components/Button/examples/ButtonVariations.tsx +31 -36
- package/src/components/DatePicker/DatePicker.tsx +10 -2
- package/src/components/DatePicker/examples/DatePicker.md +4 -1
- package/src/components/JumpLinks/examples/JumpLinks.md +0 -1
- package/src/components/Menu/MenuContent.tsx +2 -2
- package/src/components/Menu/examples/Menu.md +7 -7
- package/src/demos/ComposableMenu/ComposableMenu.md +88 -0
- package/src/demos/ComposableMenu/examples/ComposableActionsMenu.tsx +122 -0
- package/src/demos/ComposableMenu/examples/ComposableApplicationLauncher.tsx +282 -0
- package/src/demos/ComposableMenu/examples/ComposableContextSelector.tsx +202 -0
- package/src/demos/ComposableMenu/examples/ComposableDrilldownMenu.tsx +246 -0
- package/src/demos/ComposableMenu/examples/ComposableDropdwnVariants.tsx +235 -0
- package/src/demos/ComposableMenu/examples/ComposableFlyout.tsx +103 -0
- package/src/demos/ComposableMenu/examples/ComposableOptionsMenuVariants.tsx +94 -0
- package/src/demos/ComposableMenu/examples/ComposableSimpleDropdown.tsx +70 -0
- package/src/demos/ComposableMenu/examples/ComposableSimpleSelect.tsx +74 -0
- package/src/demos/ComposableMenu/examples/ComposableTreeViewMenu.tsx +240 -0
- package/src/demos/ComposableMenu/examples/avatarImg.svg +18 -0
- package/src/demos/ComposableMenu/examples/pf-logo-small.svg +23 -0
- package/src/demos/JumpLinks.md +0 -1
- package/src/demos/ComposableMenu.md +0 -1443
- package/src/demos/composable-menu.css +0 -3
package/dist/umd/react-core.js
CHANGED
|
@@ -9244,7 +9244,7 @@
|
|
|
9244
9244
|
.toString()
|
|
9245
9245
|
.padStart(2, '0')}`;
|
|
9246
9246
|
const DatePickerBase = (_a, ref) => {
|
|
9247
|
-
var { className, locale = undefined, dateFormat = yyyyMMddFormat, dateParse = (val) => val.split('-').length === 3 && new Date(`${val}T00:00:00`), isDisabled = false, placeholder = 'YYYY-MM-DD', value: valueProp = '', 'aria-label': ariaLabel = 'Date picker', buttonAriaLabel = 'Toggle date picker', onChange = () => undefined, invalidFormatText = 'Invalid date', helperText, appendTo, popoverProps, monthFormat, weekdayFormat, longWeekdayFormat, dayFormat, weekStart, validators = [], rangeStart, style: styleProps = {}, inputProps = {} } = _a, props = __rest$1(_a, ["className", "locale", "dateFormat", "dateParse", "isDisabled", "placeholder", "value", 'aria-label', "buttonAriaLabel", "onChange", "invalidFormatText", "helperText", "appendTo", "popoverProps", "monthFormat", "weekdayFormat", "longWeekdayFormat", "dayFormat", "weekStart", "validators", "rangeStart", "style", "inputProps"]);
|
|
9247
|
+
var { className, locale = undefined, dateFormat = yyyyMMddFormat, dateParse = (val) => val.split('-').length === 3 && new Date(`${val}T00:00:00`), isDisabled = false, placeholder = 'YYYY-MM-DD', value: valueProp = '', 'aria-label': ariaLabel = 'Date picker', buttonAriaLabel = 'Toggle date picker', onChange = () => undefined, onBlur = () => undefined, invalidFormatText = 'Invalid date', helperText, appendTo, popoverProps, monthFormat, weekdayFormat, longWeekdayFormat, dayFormat, weekStart, validators = [], rangeStart, style: styleProps = {}, inputProps = {} } = _a, props = __rest$1(_a, ["className", "locale", "dateFormat", "dateParse", "isDisabled", "placeholder", "value", 'aria-label', "buttonAriaLabel", "onChange", "onBlur", "invalidFormatText", "helperText", "appendTo", "popoverProps", "monthFormat", "weekdayFormat", "longWeekdayFormat", "dayFormat", "weekStart", "validators", "rangeStart", "style", "inputProps"]);
|
|
9248
9248
|
const [value, setValue] = React__namespace.useState(valueProp);
|
|
9249
9249
|
const [valueDate, setValueDate] = React__namespace.useState(dateParse(value));
|
|
9250
9250
|
const [errorText, setErrorText] = React__namespace.useState('');
|
|
@@ -9258,9 +9258,11 @@
|
|
|
9258
9258
|
setValue(valueProp);
|
|
9259
9259
|
setValueDate(dateParse(valueProp));
|
|
9260
9260
|
}, [valueProp]);
|
|
9261
|
+
React__namespace.useEffect(() => {
|
|
9262
|
+
setPristine(!value);
|
|
9263
|
+
}, [value]);
|
|
9261
9264
|
const setError = (date) => setErrorText(validators.map(validator => validator(date)).join('\n') || '');
|
|
9262
9265
|
const onTextInput = (value) => {
|
|
9263
|
-
setPristine(false);
|
|
9264
9266
|
setValue(value);
|
|
9265
9267
|
setErrorText('');
|
|
9266
9268
|
const newValueDate = dateParse(value);
|
|
@@ -9278,9 +9280,11 @@
|
|
|
9278
9280
|
}
|
|
9279
9281
|
const newValueDate = dateParse(value);
|
|
9280
9282
|
if (isValidDate(newValueDate)) {
|
|
9283
|
+
onBlur(value, new Date(newValueDate));
|
|
9281
9284
|
setError(newValueDate);
|
|
9282
9285
|
}
|
|
9283
9286
|
else {
|
|
9287
|
+
onBlur(value);
|
|
9284
9288
|
setErrorText(invalidFormatText);
|
|
9285
9289
|
}
|
|
9286
9290
|
};
|
|
@@ -9331,7 +9335,7 @@
|
|
|
9331
9335
|
errorText.trim() && React__namespace.createElement("div", { className: css(_default$S.datePickerHelperText, _default$S.modifiers.error) }, errorText)));
|
|
9332
9336
|
};
|
|
9333
9337
|
const DatePicker = React__namespace.forwardRef(DatePickerBase);
|
|
9334
|
-
DatePicker.displayName = '
|
|
9338
|
+
DatePicker.displayName = 'DatePicker';
|
|
9335
9339
|
|
|
9336
9340
|
var _default$Q = {
|
|
9337
9341
|
"descriptionList": "pf-c-description-list",
|
|
@@ -14166,7 +14170,7 @@
|
|
|
14166
14170
|
const refCallback = (el, menuId, onGetMenuHeight) => {
|
|
14167
14171
|
if (el) {
|
|
14168
14172
|
onGetMenuHeight && onGetMenuHeight(menuId, el.clientHeight);
|
|
14169
|
-
getHeight && getHeight(el.clientHeight);
|
|
14173
|
+
getHeight && getHeight(el.clientHeight.toString());
|
|
14170
14174
|
}
|
|
14171
14175
|
return ref || menuContentRef;
|
|
14172
14176
|
};
|
|
@@ -15278,6 +15278,78 @@ ul.pf-c-list {
|
|
|
15278
15278
|
background-color: var(--pf-c-progress__indicator--BackgroundColor);
|
|
15279
15279
|
}
|
|
15280
15280
|
|
|
15281
|
+
.pf-c-radio {
|
|
15282
|
+
--pf-c-radio--GridGap: var(--pf-global--spacer--xs) var(--pf-global--spacer--sm);
|
|
15283
|
+
--pf-c-radio__label--disabled--Color: var(--pf-global--disabled-color--100);
|
|
15284
|
+
--pf-c-radio__label--Color: var(--pf-global--Color--100);
|
|
15285
|
+
--pf-c-radio__label--FontWeight: var(--pf-global--FontWeight--normal);
|
|
15286
|
+
--pf-c-radio__label--FontSize: var(--pf-global--FontSize--md);
|
|
15287
|
+
--pf-c-radio__label--LineHeight: var(--pf-global--LineHeight--sm);
|
|
15288
|
+
--pf-c-radio__input--Height: var(--pf-c-radio__label--FontSize);
|
|
15289
|
+
--pf-c-radio__input--MarginTop: calc(((var(--pf-c-radio__label--FontSize) * var(--pf-c-radio__label--LineHeight)) - var(--pf-c-radio__input--Height)) / 2);
|
|
15290
|
+
--pf-c-radio__input--first-child--MarginLeft: 0.0625rem;
|
|
15291
|
+
--pf-c-radio__input--last-child--MarginRight: 0.0625rem;
|
|
15292
|
+
--pf-c-radio__description--FontSize: var(--pf-global--FontSize--sm);
|
|
15293
|
+
--pf-c-radio__description--Color: var(--pf-global--Color--200);
|
|
15294
|
+
--pf-c-radio__body--MarginTop: var(--pf-global--spacer--sm);
|
|
15295
|
+
display: grid;
|
|
15296
|
+
grid-template-columns: auto 1fr;
|
|
15297
|
+
grid-gap: var(--pf-c-radio--GridGap);
|
|
15298
|
+
align-items: start;
|
|
15299
|
+
justify-items: start;
|
|
15300
|
+
}
|
|
15301
|
+
|
|
15302
|
+
.pf-c-radio.pf-m-standalone {
|
|
15303
|
+
--pf-c-radio--GridGap: 0;
|
|
15304
|
+
--pf-c-radio__input--Height: auto;
|
|
15305
|
+
--pf-c-radio__input--MarginTop: 0;
|
|
15306
|
+
display: inline-grid;
|
|
15307
|
+
line-height: 1;
|
|
15308
|
+
}
|
|
15309
|
+
|
|
15310
|
+
.pf-c-radio__label {
|
|
15311
|
+
font-size: var(--pf-c-radio__label--FontSize);
|
|
15312
|
+
font-weight: var(--pf-c-radio__label--FontWeight);
|
|
15313
|
+
line-height: var(--pf-c-radio__label--LineHeight);
|
|
15314
|
+
color: var(--pf-c-radio__label--Color);
|
|
15315
|
+
}
|
|
15316
|
+
|
|
15317
|
+
.pf-c-radio__input {
|
|
15318
|
+
height: var(--pf-c-radio__input--Height);
|
|
15319
|
+
margin-top: var(--pf-c-radio__input--MarginTop);
|
|
15320
|
+
}
|
|
15321
|
+
|
|
15322
|
+
.pf-c-radio__input:first-child {
|
|
15323
|
+
margin-left: var(--pf-c-radio__input--first-child--MarginLeft);
|
|
15324
|
+
}
|
|
15325
|
+
|
|
15326
|
+
.pf-c-radio__input:last-child {
|
|
15327
|
+
margin-right: var(--pf-c-radio__input--last-child--MarginRight);
|
|
15328
|
+
}
|
|
15329
|
+
|
|
15330
|
+
.pf-c-radio__description {
|
|
15331
|
+
grid-column: 2;
|
|
15332
|
+
font-size: var(--pf-c-radio__description--FontSize);
|
|
15333
|
+
color: var(--pf-c-radio__description--Color);
|
|
15334
|
+
}
|
|
15335
|
+
|
|
15336
|
+
.pf-c-radio__body {
|
|
15337
|
+
grid-column: 2;
|
|
15338
|
+
margin-top: var(--pf-c-radio__body--MarginTop);
|
|
15339
|
+
}
|
|
15340
|
+
|
|
15341
|
+
label.pf-c-radio, .pf-c-radio__label,
|
|
15342
|
+
.pf-c-radio__input {
|
|
15343
|
+
cursor: pointer;
|
|
15344
|
+
}
|
|
15345
|
+
|
|
15346
|
+
.pf-c-radio__label:disabled, .pf-c-radio__label.pf-m-disabled,
|
|
15347
|
+
.pf-c-radio__input:disabled,
|
|
15348
|
+
.pf-c-radio__input.pf-m-disabled {
|
|
15349
|
+
--pf-c-radio__label--Color: var(--pf-c-radio__label--disabled--Color);
|
|
15350
|
+
cursor: not-allowed;
|
|
15351
|
+
}
|
|
15352
|
+
|
|
15281
15353
|
.pf-c-progress-stepper {
|
|
15282
15354
|
--pf-c-progress-stepper--GridAutoFlow: column;
|
|
15283
15355
|
--pf-c-progress-stepper--GridTemplateRows: auto 1fr;
|
|
@@ -15541,78 +15613,6 @@ ul.pf-c-list {
|
|
|
15541
15613
|
text-align: var(--pf-c-progress-stepper__step-description--TextAlign);
|
|
15542
15614
|
}
|
|
15543
15615
|
|
|
15544
|
-
.pf-c-radio {
|
|
15545
|
-
--pf-c-radio--GridGap: var(--pf-global--spacer--xs) var(--pf-global--spacer--sm);
|
|
15546
|
-
--pf-c-radio__label--disabled--Color: var(--pf-global--disabled-color--100);
|
|
15547
|
-
--pf-c-radio__label--Color: var(--pf-global--Color--100);
|
|
15548
|
-
--pf-c-radio__label--FontWeight: var(--pf-global--FontWeight--normal);
|
|
15549
|
-
--pf-c-radio__label--FontSize: var(--pf-global--FontSize--md);
|
|
15550
|
-
--pf-c-radio__label--LineHeight: var(--pf-global--LineHeight--sm);
|
|
15551
|
-
--pf-c-radio__input--Height: var(--pf-c-radio__label--FontSize);
|
|
15552
|
-
--pf-c-radio__input--MarginTop: calc(((var(--pf-c-radio__label--FontSize) * var(--pf-c-radio__label--LineHeight)) - var(--pf-c-radio__input--Height)) / 2);
|
|
15553
|
-
--pf-c-radio__input--first-child--MarginLeft: 0.0625rem;
|
|
15554
|
-
--pf-c-radio__input--last-child--MarginRight: 0.0625rem;
|
|
15555
|
-
--pf-c-radio__description--FontSize: var(--pf-global--FontSize--sm);
|
|
15556
|
-
--pf-c-radio__description--Color: var(--pf-global--Color--200);
|
|
15557
|
-
--pf-c-radio__body--MarginTop: var(--pf-global--spacer--sm);
|
|
15558
|
-
display: grid;
|
|
15559
|
-
grid-template-columns: auto 1fr;
|
|
15560
|
-
grid-gap: var(--pf-c-radio--GridGap);
|
|
15561
|
-
align-items: start;
|
|
15562
|
-
justify-items: start;
|
|
15563
|
-
}
|
|
15564
|
-
|
|
15565
|
-
.pf-c-radio.pf-m-standalone {
|
|
15566
|
-
--pf-c-radio--GridGap: 0;
|
|
15567
|
-
--pf-c-radio__input--Height: auto;
|
|
15568
|
-
--pf-c-radio__input--MarginTop: 0;
|
|
15569
|
-
display: inline-grid;
|
|
15570
|
-
line-height: 1;
|
|
15571
|
-
}
|
|
15572
|
-
|
|
15573
|
-
.pf-c-radio__label {
|
|
15574
|
-
font-size: var(--pf-c-radio__label--FontSize);
|
|
15575
|
-
font-weight: var(--pf-c-radio__label--FontWeight);
|
|
15576
|
-
line-height: var(--pf-c-radio__label--LineHeight);
|
|
15577
|
-
color: var(--pf-c-radio__label--Color);
|
|
15578
|
-
}
|
|
15579
|
-
|
|
15580
|
-
.pf-c-radio__input {
|
|
15581
|
-
height: var(--pf-c-radio__input--Height);
|
|
15582
|
-
margin-top: var(--pf-c-radio__input--MarginTop);
|
|
15583
|
-
}
|
|
15584
|
-
|
|
15585
|
-
.pf-c-radio__input:first-child {
|
|
15586
|
-
margin-left: var(--pf-c-radio__input--first-child--MarginLeft);
|
|
15587
|
-
}
|
|
15588
|
-
|
|
15589
|
-
.pf-c-radio__input:last-child {
|
|
15590
|
-
margin-right: var(--pf-c-radio__input--last-child--MarginRight);
|
|
15591
|
-
}
|
|
15592
|
-
|
|
15593
|
-
.pf-c-radio__description {
|
|
15594
|
-
grid-column: 2;
|
|
15595
|
-
font-size: var(--pf-c-radio__description--FontSize);
|
|
15596
|
-
color: var(--pf-c-radio__description--Color);
|
|
15597
|
-
}
|
|
15598
|
-
|
|
15599
|
-
.pf-c-radio__body {
|
|
15600
|
-
grid-column: 2;
|
|
15601
|
-
margin-top: var(--pf-c-radio__body--MarginTop);
|
|
15602
|
-
}
|
|
15603
|
-
|
|
15604
|
-
label.pf-c-radio, .pf-c-radio__label,
|
|
15605
|
-
.pf-c-radio__input {
|
|
15606
|
-
cursor: pointer;
|
|
15607
|
-
}
|
|
15608
|
-
|
|
15609
|
-
.pf-c-radio__label:disabled, .pf-c-radio__label.pf-m-disabled,
|
|
15610
|
-
.pf-c-radio__input:disabled,
|
|
15611
|
-
.pf-c-radio__input.pf-m-disabled {
|
|
15612
|
-
--pf-c-radio__label--Color: var(--pf-c-radio__label--disabled--Color);
|
|
15613
|
-
cursor: not-allowed;
|
|
15614
|
-
}
|
|
15615
|
-
|
|
15616
15616
|
.pf-c-search-input {
|
|
15617
15617
|
--pf-c-search-input__text--before--BorderWidth: var(--pf-global--BorderWidth--sm);
|
|
15618
15618
|
--pf-c-search-input__text--before--BorderColor: var(--pf-global--BorderColor--300);
|