@patternfly/react-core 4.251.1 → 4.251.3
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 +19 -0
- package/dist/umd/react-core.min.css +168 -168
- package/package.json +2 -2
- package/src/components/TextArea/__tests__/TextArea.test.tsx +129 -113
- package/src/components/TextArea/__tests__/__snapshots__/TextArea.test.tsx.snap +5 -120
- package/src/demos/examples/JumpLinks/JumpLinksWithDrawer.js +55 -49
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [4.251.3](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-core@4.251.2...@patternfly/react-core@4.251.3) (2022-10-14)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @patternfly/react-core
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [4.251.2](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-core@4.251.1...@patternfly/react-core@4.251.2) (2022-10-14)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* **JumpLinks:** clean up demo in a drawer ([#8182](https://github.com/patternfly/patternfly-react/issues/8182)) ([d8e5b91](https://github.com/patternfly/patternfly-react/commit/d8e5b91c74957bc0dc4825e519721191f9f0427e))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
## [4.251.1](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-core@4.251.0...@patternfly/react-core@4.251.1) (2022-10-13)
|
|
7
26
|
|
|
8
27
|
**Note:** Version bump only for package @patternfly/react-core
|
|
@@ -3628,6 +3628,44 @@ label.pf-c-check, .pf-c-check__label,
|
|
|
3628
3628
|
border: 0;
|
|
3629
3629
|
}
|
|
3630
3630
|
|
|
3631
|
+
.pf-c-code-block {
|
|
3632
|
+
--pf-c-code-block--BackgroundColor: var(--pf-global--BackgroundColor--200);
|
|
3633
|
+
--pf-c-code-block__header--BorderBottomWidth: var(--pf-global--BorderWidth--sm);
|
|
3634
|
+
--pf-c-code-block__header--BorderBottomColor: var(--pf-global--BorderColor--100);
|
|
3635
|
+
--pf-c-code-block__content--PaddingTop: var(--pf-global--spacer--md);
|
|
3636
|
+
--pf-c-code-block__content--PaddingRight: var(--pf-global--spacer--md);
|
|
3637
|
+
--pf-c-code-block__content--PaddingBottom: var(--pf-global--spacer--md);
|
|
3638
|
+
--pf-c-code-block__content--PaddingLeft: var(--pf-global--spacer--md);
|
|
3639
|
+
--pf-c-code-block__pre--FontFamily: var(--pf-global--FontFamily--monospace);
|
|
3640
|
+
--pf-c-code-block__pre--FontSize: var(--pf-global--FontSize--sm);
|
|
3641
|
+
background-color: var(--pf-c-code-block--BackgroundColor);
|
|
3642
|
+
}
|
|
3643
|
+
|
|
3644
|
+
.pf-c-code-block__header {
|
|
3645
|
+
display: flex;
|
|
3646
|
+
border-bottom: var(--pf-c-code-block__header--BorderBottomWidth) solid var(--pf-c-code-block__header--BorderBottomColor);
|
|
3647
|
+
}
|
|
3648
|
+
|
|
3649
|
+
.pf-c-code-block__actions {
|
|
3650
|
+
display: flex;
|
|
3651
|
+
margin-left: auto;
|
|
3652
|
+
}
|
|
3653
|
+
|
|
3654
|
+
.pf-c-code-block__content {
|
|
3655
|
+
padding: var(--pf-c-code-block__content--PaddingTop) var(--pf-c-code-block__content--PaddingRight) var(--pf-c-code-block__content--PaddingBottom) var(--pf-c-code-block__content--PaddingLeft);
|
|
3656
|
+
}
|
|
3657
|
+
|
|
3658
|
+
.pf-c-code-block__pre {
|
|
3659
|
+
font-family: var(--pf-c-code-block__pre--FontFamily);
|
|
3660
|
+
font-size: var(--pf-c-code-block__pre--FontSize);
|
|
3661
|
+
overflow-wrap: break-word;
|
|
3662
|
+
white-space: pre-wrap;
|
|
3663
|
+
}
|
|
3664
|
+
|
|
3665
|
+
.pf-c-code-block__code {
|
|
3666
|
+
font-family: var(--pf-c-code-block__code--FontFamily, inherit);
|
|
3667
|
+
}
|
|
3668
|
+
|
|
3631
3669
|
.pf-c-context-selector__menu {
|
|
3632
3670
|
--pf-global--Color--100: var(--pf-global--Color--dark-100);
|
|
3633
3671
|
--pf-global--Color--200: var(--pf-global--Color--dark-200);
|
|
@@ -3962,44 +4000,6 @@ label.pf-c-check, .pf-c-check__label,
|
|
|
3962
4000
|
border-top: 1px solid var(--pf-global--BorderColor--300);
|
|
3963
4001
|
}
|
|
3964
4002
|
|
|
3965
|
-
.pf-c-code-block {
|
|
3966
|
-
--pf-c-code-block--BackgroundColor: var(--pf-global--BackgroundColor--200);
|
|
3967
|
-
--pf-c-code-block__header--BorderBottomWidth: var(--pf-global--BorderWidth--sm);
|
|
3968
|
-
--pf-c-code-block__header--BorderBottomColor: var(--pf-global--BorderColor--100);
|
|
3969
|
-
--pf-c-code-block__content--PaddingTop: var(--pf-global--spacer--md);
|
|
3970
|
-
--pf-c-code-block__content--PaddingRight: var(--pf-global--spacer--md);
|
|
3971
|
-
--pf-c-code-block__content--PaddingBottom: var(--pf-global--spacer--md);
|
|
3972
|
-
--pf-c-code-block__content--PaddingLeft: var(--pf-global--spacer--md);
|
|
3973
|
-
--pf-c-code-block__pre--FontFamily: var(--pf-global--FontFamily--monospace);
|
|
3974
|
-
--pf-c-code-block__pre--FontSize: var(--pf-global--FontSize--sm);
|
|
3975
|
-
background-color: var(--pf-c-code-block--BackgroundColor);
|
|
3976
|
-
}
|
|
3977
|
-
|
|
3978
|
-
.pf-c-code-block__header {
|
|
3979
|
-
display: flex;
|
|
3980
|
-
border-bottom: var(--pf-c-code-block__header--BorderBottomWidth) solid var(--pf-c-code-block__header--BorderBottomColor);
|
|
3981
|
-
}
|
|
3982
|
-
|
|
3983
|
-
.pf-c-code-block__actions {
|
|
3984
|
-
display: flex;
|
|
3985
|
-
margin-left: auto;
|
|
3986
|
-
}
|
|
3987
|
-
|
|
3988
|
-
.pf-c-code-block__content {
|
|
3989
|
-
padding: var(--pf-c-code-block__content--PaddingTop) var(--pf-c-code-block__content--PaddingRight) var(--pf-c-code-block__content--PaddingBottom) var(--pf-c-code-block__content--PaddingLeft);
|
|
3990
|
-
}
|
|
3991
|
-
|
|
3992
|
-
.pf-c-code-block__pre {
|
|
3993
|
-
font-family: var(--pf-c-code-block__pre--FontFamily);
|
|
3994
|
-
font-size: var(--pf-c-code-block__pre--FontSize);
|
|
3995
|
-
overflow-wrap: break-word;
|
|
3996
|
-
white-space: pre-wrap;
|
|
3997
|
-
}
|
|
3998
|
-
|
|
3999
|
-
.pf-c-code-block__code {
|
|
4000
|
-
font-family: var(--pf-c-code-block__code--FontFamily, inherit);
|
|
4001
|
-
}
|
|
4002
|
-
|
|
4003
4003
|
.pf-c-data-list {
|
|
4004
4004
|
--pf-global--Color--100: var(--pf-global--Color--dark-100);
|
|
4005
4005
|
--pf-global--Color--200: var(--pf-global--Color--dark-200);
|
|
@@ -5474,67 +5474,6 @@ label.pf-c-check, .pf-c-check__label,
|
|
|
5474
5474
|
overflow-y: visible;
|
|
5475
5475
|
}
|
|
5476
5476
|
}
|
|
5477
|
-
.pf-c-date-picker {
|
|
5478
|
-
--pf-c-date-picker--m-top__calendar--Top: 0;
|
|
5479
|
-
--pf-c-date-picker--m-top__calendar--TranslateY: calc(-100% - var(--pf-global--spacer--xs));
|
|
5480
|
-
--pf-c-date-picker__helper-text--MarginTop: var(--pf-global--spacer--xs);
|
|
5481
|
-
--pf-c-date-picker__helper-text--FontSize: var(--pf-global--FontSize--sm);
|
|
5482
|
-
--pf-c-date-picker__helper-text--Color: var(--pf-global--Color--100);
|
|
5483
|
-
--pf-c-date-picker__helper-text--m-error--Color: var(--pf-global--danger-color--100);
|
|
5484
|
-
--pf-c-date-picker__input--c-form-control--Width: calc(var(--pf-c-date-picker__input--c-form-control--width-chars) * 1ch + var(--pf-c-date-picker__input--c-form-control--width-base));
|
|
5485
|
-
--pf-c-date-picker__input--c-form-control--width-base: calc(var(--pf-global--spacer--xl) + var(--pf-global--spacer--sm));
|
|
5486
|
-
--pf-c-date-picker__input--c-form-control--width-chars: 10;
|
|
5487
|
-
--pf-c-date-picker__calendar--BackgroundColor: var(--pf-global--BackgroundColor--light-100);
|
|
5488
|
-
--pf-c-date-picker__calendar--BoxShadow: var(--pf-global--BoxShadow--md);
|
|
5489
|
-
--pf-c-date-picker__calendar--ZIndex: var(--pf-global--ZIndex--sm);
|
|
5490
|
-
--pf-c-date-picker__calendar--Top: calc(100% + var(--pf-global--spacer--xs));
|
|
5491
|
-
--pf-c-date-picker__calendar--Right: auto;
|
|
5492
|
-
--pf-c-date-picker__calendar--Left: 0;
|
|
5493
|
-
--pf-c-date-picker__calendar--m-align-right--Right: 0;
|
|
5494
|
-
--pf-c-date-picker__calendar--m-align-right--Left: auto;
|
|
5495
|
-
position: relative;
|
|
5496
|
-
display: inline-block;
|
|
5497
|
-
}
|
|
5498
|
-
|
|
5499
|
-
.pf-c-date-picker__helper-text {
|
|
5500
|
-
margin-top: var(--pf-c-date-picker__helper-text--MarginTop);
|
|
5501
|
-
font-size: var(--pf-c-date-picker__helper-text--FontSize);
|
|
5502
|
-
color: var(--pf-c-date-picker__helper-text--Color);
|
|
5503
|
-
}
|
|
5504
|
-
|
|
5505
|
-
.pf-c-date-picker__helper-text.pf-m-error {
|
|
5506
|
-
--pf-c-date-picker__helper-text--Color: var(--pf-c-date-picker__helper-text--m-error--Color);
|
|
5507
|
-
}
|
|
5508
|
-
|
|
5509
|
-
.pf-c-date-picker__input .pf-c-form-control {
|
|
5510
|
-
width: var(--pf-c-date-picker__input--c-form-control--Width);
|
|
5511
|
-
}
|
|
5512
|
-
|
|
5513
|
-
.pf-c-date-picker__calendar {
|
|
5514
|
-
position: absolute;
|
|
5515
|
-
top: var(--pf-c-date-picker__calendar--Top);
|
|
5516
|
-
right: var(--pf-c-date-picker__calendar--Right);
|
|
5517
|
-
left: var(--pf-c-date-picker__calendar--Left);
|
|
5518
|
-
z-index: var(--pf-c-date-picker__calendar--ZIndex);
|
|
5519
|
-
background-color: var(--pf-c-date-picker__calendar--BackgroundColor);
|
|
5520
|
-
box-shadow: var(--pf-c-date-picker__calendar--BoxShadow);
|
|
5521
|
-
}
|
|
5522
|
-
|
|
5523
|
-
.pf-c-date-picker__calendar.pf-m-align-right {
|
|
5524
|
-
--pf-c-date-picker__calendar--Right: var(--pf-c-date-picker__calendar--m-align-right--Right);
|
|
5525
|
-
--pf-c-date-picker__calendar--Left: var(--pf-c-date-picker__calendar--m-align-right--Left);
|
|
5526
|
-
}
|
|
5527
|
-
|
|
5528
|
-
.pf-c-date-picker.pf-m-top .pf-c-date-picker__calendar {
|
|
5529
|
-
--pf-c-date-picker__calendar--Top: var(--pf-c-date-picker--m-top__calendar--Top);
|
|
5530
|
-
transform: translateY(var(--pf-c-date-picker--m-top__calendar--TranslateY));
|
|
5531
|
-
}
|
|
5532
|
-
|
|
5533
|
-
:where(.pf-theme-dark) .pf-c-date-picker {
|
|
5534
|
-
--pf-c-date-picker__calendar--BackgroundColor: var(--pf-global--BackgroundColor--300);
|
|
5535
|
-
--pf-c-date-picker__calendar--Top: 100%;
|
|
5536
|
-
}
|
|
5537
|
-
|
|
5538
5477
|
.pf-c-description-list {
|
|
5539
5478
|
--pf-c-description-list--RowGap: var(--pf-global--gutter--md);
|
|
5540
5479
|
--pf-c-description-list--ColumnGap: var(--pf-global--spacer--lg);
|
|
@@ -7285,6 +7224,67 @@ label.pf-c-check, .pf-c-check__label,
|
|
|
7285
7224
|
--pf-c-drawer__panel--BackgroundColor: var(--pf-global--BackgroundColor--100);
|
|
7286
7225
|
}
|
|
7287
7226
|
|
|
7227
|
+
.pf-c-date-picker {
|
|
7228
|
+
--pf-c-date-picker--m-top__calendar--Top: 0;
|
|
7229
|
+
--pf-c-date-picker--m-top__calendar--TranslateY: calc(-100% - var(--pf-global--spacer--xs));
|
|
7230
|
+
--pf-c-date-picker__helper-text--MarginTop: var(--pf-global--spacer--xs);
|
|
7231
|
+
--pf-c-date-picker__helper-text--FontSize: var(--pf-global--FontSize--sm);
|
|
7232
|
+
--pf-c-date-picker__helper-text--Color: var(--pf-global--Color--100);
|
|
7233
|
+
--pf-c-date-picker__helper-text--m-error--Color: var(--pf-global--danger-color--100);
|
|
7234
|
+
--pf-c-date-picker__input--c-form-control--Width: calc(var(--pf-c-date-picker__input--c-form-control--width-chars) * 1ch + var(--pf-c-date-picker__input--c-form-control--width-base));
|
|
7235
|
+
--pf-c-date-picker__input--c-form-control--width-base: calc(var(--pf-global--spacer--xl) + var(--pf-global--spacer--sm));
|
|
7236
|
+
--pf-c-date-picker__input--c-form-control--width-chars: 10;
|
|
7237
|
+
--pf-c-date-picker__calendar--BackgroundColor: var(--pf-global--BackgroundColor--light-100);
|
|
7238
|
+
--pf-c-date-picker__calendar--BoxShadow: var(--pf-global--BoxShadow--md);
|
|
7239
|
+
--pf-c-date-picker__calendar--ZIndex: var(--pf-global--ZIndex--sm);
|
|
7240
|
+
--pf-c-date-picker__calendar--Top: calc(100% + var(--pf-global--spacer--xs));
|
|
7241
|
+
--pf-c-date-picker__calendar--Right: auto;
|
|
7242
|
+
--pf-c-date-picker__calendar--Left: 0;
|
|
7243
|
+
--pf-c-date-picker__calendar--m-align-right--Right: 0;
|
|
7244
|
+
--pf-c-date-picker__calendar--m-align-right--Left: auto;
|
|
7245
|
+
position: relative;
|
|
7246
|
+
display: inline-block;
|
|
7247
|
+
}
|
|
7248
|
+
|
|
7249
|
+
.pf-c-date-picker__helper-text {
|
|
7250
|
+
margin-top: var(--pf-c-date-picker__helper-text--MarginTop);
|
|
7251
|
+
font-size: var(--pf-c-date-picker__helper-text--FontSize);
|
|
7252
|
+
color: var(--pf-c-date-picker__helper-text--Color);
|
|
7253
|
+
}
|
|
7254
|
+
|
|
7255
|
+
.pf-c-date-picker__helper-text.pf-m-error {
|
|
7256
|
+
--pf-c-date-picker__helper-text--Color: var(--pf-c-date-picker__helper-text--m-error--Color);
|
|
7257
|
+
}
|
|
7258
|
+
|
|
7259
|
+
.pf-c-date-picker__input .pf-c-form-control {
|
|
7260
|
+
width: var(--pf-c-date-picker__input--c-form-control--Width);
|
|
7261
|
+
}
|
|
7262
|
+
|
|
7263
|
+
.pf-c-date-picker__calendar {
|
|
7264
|
+
position: absolute;
|
|
7265
|
+
top: var(--pf-c-date-picker__calendar--Top);
|
|
7266
|
+
right: var(--pf-c-date-picker__calendar--Right);
|
|
7267
|
+
left: var(--pf-c-date-picker__calendar--Left);
|
|
7268
|
+
z-index: var(--pf-c-date-picker__calendar--ZIndex);
|
|
7269
|
+
background-color: var(--pf-c-date-picker__calendar--BackgroundColor);
|
|
7270
|
+
box-shadow: var(--pf-c-date-picker__calendar--BoxShadow);
|
|
7271
|
+
}
|
|
7272
|
+
|
|
7273
|
+
.pf-c-date-picker__calendar.pf-m-align-right {
|
|
7274
|
+
--pf-c-date-picker__calendar--Right: var(--pf-c-date-picker__calendar--m-align-right--Right);
|
|
7275
|
+
--pf-c-date-picker__calendar--Left: var(--pf-c-date-picker__calendar--m-align-right--Left);
|
|
7276
|
+
}
|
|
7277
|
+
|
|
7278
|
+
.pf-c-date-picker.pf-m-top .pf-c-date-picker__calendar {
|
|
7279
|
+
--pf-c-date-picker__calendar--Top: var(--pf-c-date-picker--m-top__calendar--Top);
|
|
7280
|
+
transform: translateY(var(--pf-c-date-picker--m-top__calendar--TranslateY));
|
|
7281
|
+
}
|
|
7282
|
+
|
|
7283
|
+
:where(.pf-theme-dark) .pf-c-date-picker {
|
|
7284
|
+
--pf-c-date-picker__calendar--BackgroundColor: var(--pf-global--BackgroundColor--300);
|
|
7285
|
+
--pf-c-date-picker__calendar--Top: 100%;
|
|
7286
|
+
}
|
|
7287
|
+
|
|
7288
7288
|
.pf-c-dropdown {
|
|
7289
7289
|
--pf-c-dropdown__toggle--PaddingTop: var(--pf-global--spacer--form-element);
|
|
7290
7290
|
--pf-c-dropdown__toggle--PaddingRight: var(--pf-global--spacer--sm);
|
|
@@ -26353,75 +26353,6 @@ label.pf-c-tree-view__node-text {
|
|
|
26353
26353
|
--pf-l-flex--spacer: var(--pf-l-flex--spacer--4xl);
|
|
26354
26354
|
}
|
|
26355
26355
|
}
|
|
26356
|
-
.pf-l-gallery {
|
|
26357
|
-
--pf-l-gallery--m-gutter--GridGap: var(--pf-global--gutter);
|
|
26358
|
-
--pf-l-gallery--GridTemplateColumns--min: 250px;
|
|
26359
|
-
--pf-l-gallery--GridTemplateColumns--minmax--min: var(--pf-l-gallery--GridTemplateColumns--min);
|
|
26360
|
-
--pf-l-gallery--GridTemplateColumns--max: 1fr;
|
|
26361
|
-
--pf-l-gallery--GridTemplateColumns--minmax--max: var(--pf-l-gallery--GridTemplateColumns--max);
|
|
26362
|
-
--pf-l-gallery--GridTemplateColumns: repeat(auto-fill, minmax(var(--pf-l-gallery--GridTemplateColumns--minmax--min), var(--pf-l-gallery--GridTemplateColumns--minmax--max)));
|
|
26363
|
-
--pf-l-gallery--GridTemplateRows: auto;
|
|
26364
|
-
display: grid;
|
|
26365
|
-
grid-template-columns: var(--pf-l-gallery--GridTemplateColumns);
|
|
26366
|
-
grid-template-rows: var(--pf-l-gallery--GridTemplateRows);
|
|
26367
|
-
--pf-l-gallery--GridTemplateColumns--minmax--min: var(--pf-l-gallery--GridTemplateColumns--min);
|
|
26368
|
-
--pf-l-gallery--GridTemplateColumns--minmax--max: var(--pf-l-gallery--GridTemplateColumns--max);
|
|
26369
|
-
}
|
|
26370
|
-
|
|
26371
|
-
.pf-l-gallery.pf-m-gutter {
|
|
26372
|
-
grid-gap: var(--pf-l-gallery--m-gutter--GridGap);
|
|
26373
|
-
}
|
|
26374
|
-
|
|
26375
|
-
@media (min-width: 576px) {
|
|
26376
|
-
.pf-l-gallery {
|
|
26377
|
-
--pf-l-gallery--GridTemplateColumns--minmax--min: var(--pf-l-gallery--GridTemplateColumns--min-on-sm, var(--pf-l-gallery--GridTemplateColumns--min));
|
|
26378
|
-
}
|
|
26379
|
-
}
|
|
26380
|
-
@media (min-width: 768px) {
|
|
26381
|
-
.pf-l-gallery {
|
|
26382
|
-
--pf-l-gallery--GridTemplateColumns--minmax--min: var(--pf-l-gallery--GridTemplateColumns--min-on-md, var(--pf-l-gallery--GridTemplateColumns--min-on-sm, var(--pf-l-gallery--GridTemplateColumns--min)));
|
|
26383
|
-
}
|
|
26384
|
-
}
|
|
26385
|
-
@media (min-width: 992px) {
|
|
26386
|
-
.pf-l-gallery {
|
|
26387
|
-
--pf-l-gallery--GridTemplateColumns--minmax--min: var(--pf-l-gallery--GridTemplateColumns--min-on-lg, var(--pf-l-gallery--GridTemplateColumns--min-on-md, var(--pf-l-gallery--GridTemplateColumns--min-on-sm, var(--pf-l-gallery--GridTemplateColumns--min))));
|
|
26388
|
-
}
|
|
26389
|
-
}
|
|
26390
|
-
@media (min-width: 1200px) {
|
|
26391
|
-
.pf-l-gallery {
|
|
26392
|
-
--pf-l-gallery--GridTemplateColumns--minmax--min: var(--pf-l-gallery--GridTemplateColumns--min-on-xl, var(--pf-l-gallery--GridTemplateColumns--min-on-lg, var(--pf-l-gallery--GridTemplateColumns--min-on-md, var(--pf-l-gallery--GridTemplateColumns--min-on-sm, var(--pf-l-gallery--GridTemplateColumns--min)))));
|
|
26393
|
-
}
|
|
26394
|
-
}
|
|
26395
|
-
@media (min-width: 1450px) {
|
|
26396
|
-
.pf-l-gallery {
|
|
26397
|
-
--pf-l-gallery--GridTemplateColumns--minmax--min: var(--pf-l-gallery--GridTemplateColumns--min-on-2xl, var(--pf-l-gallery--GridTemplateColumns--min-on-xl, var(--pf-l-gallery--GridTemplateColumns--min-on-lg, var(--pf-l-gallery--GridTemplateColumns--min-on-md, var(--pf-l-gallery--GridTemplateColumns--min-on-sm, var(--pf-l-gallery--GridTemplateColumns--min))))));
|
|
26398
|
-
}
|
|
26399
|
-
}
|
|
26400
|
-
@media (min-width: 576px) {
|
|
26401
|
-
.pf-l-gallery {
|
|
26402
|
-
--pf-l-gallery--GridTemplateColumns--minmax--max: var(--pf-l-gallery--GridTemplateColumns--max-on-sm, var(--pf-l-gallery--GridTemplateColumns--max));
|
|
26403
|
-
}
|
|
26404
|
-
}
|
|
26405
|
-
@media (min-width: 768px) {
|
|
26406
|
-
.pf-l-gallery {
|
|
26407
|
-
--pf-l-gallery--GridTemplateColumns--minmax--max: var(--pf-l-gallery--GridTemplateColumns--max-on-md, var(--pf-l-gallery--GridTemplateColumns--max-on-sm, var(--pf-l-gallery--GridTemplateColumns--max)));
|
|
26408
|
-
}
|
|
26409
|
-
}
|
|
26410
|
-
@media (min-width: 992px) {
|
|
26411
|
-
.pf-l-gallery {
|
|
26412
|
-
--pf-l-gallery--GridTemplateColumns--minmax--max: var(--pf-l-gallery--GridTemplateColumns--max-on-lg, var(--pf-l-gallery--GridTemplateColumns--max-on-md, var(--pf-l-gallery--GridTemplateColumns--max-on-sm, var(--pf-l-gallery--GridTemplateColumns--max))));
|
|
26413
|
-
}
|
|
26414
|
-
}
|
|
26415
|
-
@media (min-width: 1200px) {
|
|
26416
|
-
.pf-l-gallery {
|
|
26417
|
-
--pf-l-gallery--GridTemplateColumns--minmax--max: var(--pf-l-gallery--GridTemplateColumns--max-on-xl, var(--pf-l-gallery--GridTemplateColumns--max-on-lg, var(--pf-l-gallery--GridTemplateColumns--max-on-md, var(--pf-l-gallery--GridTemplateColumns--max-on-sm, var(--pf-l-gallery--GridTemplateColumns--max)))));
|
|
26418
|
-
}
|
|
26419
|
-
}
|
|
26420
|
-
@media (min-width: 1450px) {
|
|
26421
|
-
.pf-l-gallery {
|
|
26422
|
-
--pf-l-gallery--GridTemplateColumns--minmax--max: var(--pf-l-gallery--GridTemplateColumns--max-on-2xl, var(--pf-l-gallery--GridTemplateColumns--max-on-xl, var(--pf-l-gallery--GridTemplateColumns--max-on-lg, var(--pf-l-gallery--GridTemplateColumns--max-on-md, var(--pf-l-gallery--GridTemplateColumns--max-on-sm, var(--pf-l-gallery--GridTemplateColumns--max))))));
|
|
26423
|
-
}
|
|
26424
|
-
}
|
|
26425
26356
|
.pf-l-grid {
|
|
26426
26357
|
--pf-l-grid--m-gutter--GridGap: var(--pf-global--gutter);
|
|
26427
26358
|
--pf-l-grid__item--GridColumnStart: auto;
|
|
@@ -27636,6 +27567,75 @@ label.pf-c-tree-view__node-text {
|
|
|
27636
27567
|
grid-gap: var(--pf-l-grid--m-gutter--GridGap);
|
|
27637
27568
|
}
|
|
27638
27569
|
|
|
27570
|
+
.pf-l-gallery {
|
|
27571
|
+
--pf-l-gallery--m-gutter--GridGap: var(--pf-global--gutter);
|
|
27572
|
+
--pf-l-gallery--GridTemplateColumns--min: 250px;
|
|
27573
|
+
--pf-l-gallery--GridTemplateColumns--minmax--min: var(--pf-l-gallery--GridTemplateColumns--min);
|
|
27574
|
+
--pf-l-gallery--GridTemplateColumns--max: 1fr;
|
|
27575
|
+
--pf-l-gallery--GridTemplateColumns--minmax--max: var(--pf-l-gallery--GridTemplateColumns--max);
|
|
27576
|
+
--pf-l-gallery--GridTemplateColumns: repeat(auto-fill, minmax(var(--pf-l-gallery--GridTemplateColumns--minmax--min), var(--pf-l-gallery--GridTemplateColumns--minmax--max)));
|
|
27577
|
+
--pf-l-gallery--GridTemplateRows: auto;
|
|
27578
|
+
display: grid;
|
|
27579
|
+
grid-template-columns: var(--pf-l-gallery--GridTemplateColumns);
|
|
27580
|
+
grid-template-rows: var(--pf-l-gallery--GridTemplateRows);
|
|
27581
|
+
--pf-l-gallery--GridTemplateColumns--minmax--min: var(--pf-l-gallery--GridTemplateColumns--min);
|
|
27582
|
+
--pf-l-gallery--GridTemplateColumns--minmax--max: var(--pf-l-gallery--GridTemplateColumns--max);
|
|
27583
|
+
}
|
|
27584
|
+
|
|
27585
|
+
.pf-l-gallery.pf-m-gutter {
|
|
27586
|
+
grid-gap: var(--pf-l-gallery--m-gutter--GridGap);
|
|
27587
|
+
}
|
|
27588
|
+
|
|
27589
|
+
@media (min-width: 576px) {
|
|
27590
|
+
.pf-l-gallery {
|
|
27591
|
+
--pf-l-gallery--GridTemplateColumns--minmax--min: var(--pf-l-gallery--GridTemplateColumns--min-on-sm, var(--pf-l-gallery--GridTemplateColumns--min));
|
|
27592
|
+
}
|
|
27593
|
+
}
|
|
27594
|
+
@media (min-width: 768px) {
|
|
27595
|
+
.pf-l-gallery {
|
|
27596
|
+
--pf-l-gallery--GridTemplateColumns--minmax--min: var(--pf-l-gallery--GridTemplateColumns--min-on-md, var(--pf-l-gallery--GridTemplateColumns--min-on-sm, var(--pf-l-gallery--GridTemplateColumns--min)));
|
|
27597
|
+
}
|
|
27598
|
+
}
|
|
27599
|
+
@media (min-width: 992px) {
|
|
27600
|
+
.pf-l-gallery {
|
|
27601
|
+
--pf-l-gallery--GridTemplateColumns--minmax--min: var(--pf-l-gallery--GridTemplateColumns--min-on-lg, var(--pf-l-gallery--GridTemplateColumns--min-on-md, var(--pf-l-gallery--GridTemplateColumns--min-on-sm, var(--pf-l-gallery--GridTemplateColumns--min))));
|
|
27602
|
+
}
|
|
27603
|
+
}
|
|
27604
|
+
@media (min-width: 1200px) {
|
|
27605
|
+
.pf-l-gallery {
|
|
27606
|
+
--pf-l-gallery--GridTemplateColumns--minmax--min: var(--pf-l-gallery--GridTemplateColumns--min-on-xl, var(--pf-l-gallery--GridTemplateColumns--min-on-lg, var(--pf-l-gallery--GridTemplateColumns--min-on-md, var(--pf-l-gallery--GridTemplateColumns--min-on-sm, var(--pf-l-gallery--GridTemplateColumns--min)))));
|
|
27607
|
+
}
|
|
27608
|
+
}
|
|
27609
|
+
@media (min-width: 1450px) {
|
|
27610
|
+
.pf-l-gallery {
|
|
27611
|
+
--pf-l-gallery--GridTemplateColumns--minmax--min: var(--pf-l-gallery--GridTemplateColumns--min-on-2xl, var(--pf-l-gallery--GridTemplateColumns--min-on-xl, var(--pf-l-gallery--GridTemplateColumns--min-on-lg, var(--pf-l-gallery--GridTemplateColumns--min-on-md, var(--pf-l-gallery--GridTemplateColumns--min-on-sm, var(--pf-l-gallery--GridTemplateColumns--min))))));
|
|
27612
|
+
}
|
|
27613
|
+
}
|
|
27614
|
+
@media (min-width: 576px) {
|
|
27615
|
+
.pf-l-gallery {
|
|
27616
|
+
--pf-l-gallery--GridTemplateColumns--minmax--max: var(--pf-l-gallery--GridTemplateColumns--max-on-sm, var(--pf-l-gallery--GridTemplateColumns--max));
|
|
27617
|
+
}
|
|
27618
|
+
}
|
|
27619
|
+
@media (min-width: 768px) {
|
|
27620
|
+
.pf-l-gallery {
|
|
27621
|
+
--pf-l-gallery--GridTemplateColumns--minmax--max: var(--pf-l-gallery--GridTemplateColumns--max-on-md, var(--pf-l-gallery--GridTemplateColumns--max-on-sm, var(--pf-l-gallery--GridTemplateColumns--max)));
|
|
27622
|
+
}
|
|
27623
|
+
}
|
|
27624
|
+
@media (min-width: 992px) {
|
|
27625
|
+
.pf-l-gallery {
|
|
27626
|
+
--pf-l-gallery--GridTemplateColumns--minmax--max: var(--pf-l-gallery--GridTemplateColumns--max-on-lg, var(--pf-l-gallery--GridTemplateColumns--max-on-md, var(--pf-l-gallery--GridTemplateColumns--max-on-sm, var(--pf-l-gallery--GridTemplateColumns--max))));
|
|
27627
|
+
}
|
|
27628
|
+
}
|
|
27629
|
+
@media (min-width: 1200px) {
|
|
27630
|
+
.pf-l-gallery {
|
|
27631
|
+
--pf-l-gallery--GridTemplateColumns--minmax--max: var(--pf-l-gallery--GridTemplateColumns--max-on-xl, var(--pf-l-gallery--GridTemplateColumns--max-on-lg, var(--pf-l-gallery--GridTemplateColumns--max-on-md, var(--pf-l-gallery--GridTemplateColumns--max-on-sm, var(--pf-l-gallery--GridTemplateColumns--max)))));
|
|
27632
|
+
}
|
|
27633
|
+
}
|
|
27634
|
+
@media (min-width: 1450px) {
|
|
27635
|
+
.pf-l-gallery {
|
|
27636
|
+
--pf-l-gallery--GridTemplateColumns--minmax--max: var(--pf-l-gallery--GridTemplateColumns--max-on-2xl, var(--pf-l-gallery--GridTemplateColumns--max-on-xl, var(--pf-l-gallery--GridTemplateColumns--max-on-lg, var(--pf-l-gallery--GridTemplateColumns--max-on-md, var(--pf-l-gallery--GridTemplateColumns--max-on-sm, var(--pf-l-gallery--GridTemplateColumns--max))))));
|
|
27637
|
+
}
|
|
27638
|
+
}
|
|
27639
27639
|
.pf-l-level {
|
|
27640
27640
|
--pf-l-level--m-gutter--MarginRight: var(--pf-global--gutter);
|
|
27641
27641
|
display: flex;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@patternfly/react-core",
|
|
3
|
-
"version": "4.251.
|
|
3
|
+
"version": "4.251.3",
|
|
4
4
|
"description": "This library provides a set of common React components for use with the PatternFly reference implementation.",
|
|
5
5
|
"main": "dist/js/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -70,5 +70,5 @@
|
|
|
70
70
|
"react": "^16.8 || ^17 || ^18",
|
|
71
71
|
"react-dom": "^16.8 || ^17 || ^18"
|
|
72
72
|
},
|
|
73
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "e1567ca0fde85ebde768664b8026605b08a47500"
|
|
74
74
|
}
|
|
@@ -3,7 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import { render, screen } from '@testing-library/react';
|
|
4
4
|
import userEvent from '@testing-library/user-event';
|
|
5
5
|
|
|
6
|
-
import { TextArea
|
|
6
|
+
import { TextArea } from '../TextArea';
|
|
7
7
|
import { ValidatedOptions } from '../../../helpers/constants';
|
|
8
8
|
|
|
9
9
|
const props = {
|
|
@@ -11,116 +11,132 @@ const props = {
|
|
|
11
11
|
value: 'test textarea'
|
|
12
12
|
};
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
14
|
+
test('Textarea input passes value and event to onChange handler', async () => {
|
|
15
|
+
const user = userEvent.setup();
|
|
16
|
+
render(<TextArea {...props} value="" aria-label="test textarea" />);
|
|
17
|
+
|
|
18
|
+
await user.type(screen.getByRole('textbox'), 'a');
|
|
19
|
+
|
|
20
|
+
expect(props.onChange).toHaveBeenCalledWith('a', expect.any(Object));
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
test('Renders simple text input', () => {
|
|
24
|
+
render(
|
|
25
|
+
<div data-testid="textarea">
|
|
26
|
+
<TextArea aria-label="simple textarea" />
|
|
27
|
+
</div>
|
|
28
|
+
);
|
|
29
|
+
expect(screen.getByTestId('textarea').firstChild).toBeVisible();
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
test('Renders with custom class passed', () => {
|
|
33
|
+
render(<TextArea aria-label="custom class textarea" className="test-class" />);
|
|
34
|
+
|
|
35
|
+
expect(screen.getByRole('textbox')).toHaveClass('test-class');
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
test('Renders text area with required attribute using isRequired', () => {
|
|
39
|
+
render(<TextArea aria-label="required textarea" isRequired />);
|
|
40
|
+
|
|
41
|
+
expect(screen.getByRole('textbox')).toBeRequired();
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
test('Text area is not required by default', () => {
|
|
45
|
+
render(<TextArea aria-label="not required textarea" />);
|
|
46
|
+
|
|
47
|
+
expect(screen.getByRole('textbox')).not.toBeRequired();
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
test('Renders disabled text area using isDisabled', () => {
|
|
51
|
+
render(<TextArea aria-label="is disabled textarea" isDisabled />);
|
|
52
|
+
expect(screen.getByRole('textbox')).toBeDisabled();
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
test('Text area is not disabled by default', () => {
|
|
56
|
+
render(<TextArea aria-label="not disabled textarea" />);
|
|
57
|
+
expect(screen.getByRole('textbox')).not.toBeDisabled();
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
test('Renders read only text area using readOnlyVariant', () => {
|
|
61
|
+
render(<TextArea aria-label="is read only textarea" readOnlyVariant={'default'} />);
|
|
62
|
+
expect(screen.getByRole('textbox')).toHaveAttribute('readonly');
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
test('Text area is not read only by default', () => {
|
|
66
|
+
render(<TextArea aria-label="not read only textarea" />);
|
|
67
|
+
expect(screen.getByRole('textbox')).not.toHaveAttribute('readonly');
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
test('Renders text area with default class name only', () => {
|
|
71
|
+
render(<TextArea aria-label="validated textarea" />);
|
|
72
|
+
expect(screen.getByRole('textbox')).toHaveClass('pf-c-form-control', { exact: true });
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
test('Renders validated text area with success className', () => {
|
|
76
|
+
render(<TextArea aria-label="validated textarea" validated={ValidatedOptions.success} />);
|
|
77
|
+
expect(screen.getByRole('textbox')).toHaveClass('pf-m-success');
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
test('Renders validated text area with warning className', () => {
|
|
81
|
+
render(<TextArea aria-label="validated textarea" validated={ValidatedOptions.warning} />);
|
|
82
|
+
expect(screen.getByRole('textbox')).toHaveClass('pf-m-warning');
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
test('Renders invalid text area', () => {
|
|
86
|
+
render(<TextArea aria-label="validated textarea" validated={ValidatedOptions.error} />);
|
|
87
|
+
expect(screen.getByRole('textbox')).toBeInvalid();
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
test('Text area is not invalid by default', () => {
|
|
91
|
+
render(<TextArea aria-label="validated textarea" />);
|
|
92
|
+
expect(screen.getByRole('textbox')).not.toBeInvalid();
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
test('Renders vertically resizable text area', () => {
|
|
96
|
+
render(<TextArea aria-label="vertical resize textarea" resizeOrientation="vertical" />);
|
|
97
|
+
expect(screen.getByRole('textbox')).toHaveClass('pf-m-resize-vertical');
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
test('Renders horizontally resizable text area', () => {
|
|
101
|
+
render(<TextArea aria-label="horizontal resize textarea" resizeOrientation="horizontal" />);
|
|
102
|
+
expect(screen.getByRole('textbox')).toHaveClass('pf-m-resize-horizontal');
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
test('Throws console error when no aria-label or id is given', () => {
|
|
106
|
+
jest.spyOn(global.console, 'error');
|
|
107
|
+
|
|
108
|
+
render(<TextArea />);
|
|
109
|
+
|
|
110
|
+
expect(console.error).toHaveBeenCalled();
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
test('Does not throw console error when id is given but no aria-label', () => {
|
|
114
|
+
jest.spyOn(global.console, 'error');
|
|
115
|
+
|
|
116
|
+
render(<TextArea id="5" />);
|
|
117
|
+
|
|
118
|
+
expect(console.error).not.toHaveBeenCalled();
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
test('Does not throw console error when aria-label is given but no id', () => {
|
|
122
|
+
jest.spyOn(global.console, 'error');
|
|
123
|
+
|
|
124
|
+
render(<TextArea aria-label="test textarea" />);
|
|
125
|
+
|
|
126
|
+
expect(console.error).not.toHaveBeenCalled();
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
test('TextArea can be accessed via passed ref', () => {
|
|
130
|
+
const testRef: React.RefObject<HTMLTextAreaElement> = React.createRef();
|
|
131
|
+
render(<TextArea ref={testRef} />);
|
|
132
|
+
global.scrollTo = jest.fn();
|
|
133
|
+
testRef.current?.focus();
|
|
134
|
+
expect(screen.getByRole('textbox')).toHaveFocus();
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
test('Matches the snapshot', () => {
|
|
138
|
+
const { asFragment } = render(
|
|
139
|
+
<TextArea className="custom class" isRequired isDisabled autoResize aria-label="test textarea" />
|
|
140
|
+
);
|
|
141
|
+
expect(asFragment()).toMatchSnapshot();
|
|
126
142
|
});
|
|
@@ -1,129 +1,14 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
-
exports[`
|
|
3
|
+
exports[`Matches the snapshot 1`] = `
|
|
4
4
|
<DocumentFragment>
|
|
5
5
|
<textarea
|
|
6
6
|
aria-invalid="false"
|
|
7
|
-
aria-label="
|
|
8
|
-
class="pf-c-form-control"
|
|
7
|
+
aria-label="test textarea"
|
|
8
|
+
class="pf-c-form-control custom class"
|
|
9
9
|
disabled=""
|
|
10
|
-
>
|
|
11
|
-
test textarea
|
|
12
|
-
</textarea>
|
|
13
|
-
</DocumentFragment>
|
|
14
|
-
`;
|
|
15
|
-
|
|
16
|
-
exports[`TextArea disabled text area using isDisabled 1`] = `
|
|
17
|
-
<DocumentFragment>
|
|
18
|
-
<textarea
|
|
19
|
-
aria-invalid="false"
|
|
20
|
-
aria-label="is disabled textarea"
|
|
21
|
-
class="pf-c-form-control"
|
|
22
|
-
disabled=""
|
|
23
|
-
>
|
|
24
|
-
test textarea
|
|
25
|
-
</textarea>
|
|
26
|
-
</DocumentFragment>
|
|
27
|
-
`;
|
|
28
|
-
|
|
29
|
-
exports[`TextArea horizontally resizable text area 1`] = `
|
|
30
|
-
<DocumentFragment>
|
|
31
|
-
<textarea
|
|
32
|
-
aria-invalid="true"
|
|
33
|
-
aria-label="horizontal resize textarea"
|
|
34
|
-
class="pf-c-form-control pf-m-resize-horizontal"
|
|
35
|
-
required=""
|
|
36
|
-
>
|
|
37
|
-
test textarea
|
|
38
|
-
</textarea>
|
|
39
|
-
</DocumentFragment>
|
|
40
|
-
`;
|
|
41
|
-
|
|
42
|
-
exports[`TextArea read only text area using default readOnlyVariant 1`] = `
|
|
43
|
-
<DocumentFragment>
|
|
44
|
-
<textarea
|
|
45
|
-
aria-invalid="false"
|
|
46
|
-
aria-label="is default read only textarea"
|
|
47
|
-
class="pf-c-form-control"
|
|
48
|
-
readonly=""
|
|
49
|
-
>
|
|
50
|
-
test textarea
|
|
51
|
-
</textarea>
|
|
52
|
-
</DocumentFragment>
|
|
53
|
-
`;
|
|
54
|
-
|
|
55
|
-
exports[`TextArea read only text area using isReadOnly 1`] = `
|
|
56
|
-
<DocumentFragment>
|
|
57
|
-
<textarea
|
|
58
|
-
aria-invalid="false"
|
|
59
|
-
aria-label="is read only textarea"
|
|
60
|
-
class="pf-c-form-control"
|
|
61
|
-
readonly=""
|
|
62
|
-
>
|
|
63
|
-
test textarea
|
|
64
|
-
</textarea>
|
|
65
|
-
</DocumentFragment>
|
|
66
|
-
`;
|
|
67
|
-
|
|
68
|
-
exports[`TextArea read only text area using plain readOnlyVariant 1`] = `
|
|
69
|
-
<DocumentFragment>
|
|
70
|
-
<textarea
|
|
71
|
-
aria-invalid="false"
|
|
72
|
-
aria-label="is plain read only textarea"
|
|
73
|
-
class="pf-c-form-control pf-m-plain"
|
|
74
|
-
readonly=""
|
|
75
|
-
>
|
|
76
|
-
test textarea
|
|
77
|
-
</textarea>
|
|
78
|
-
</DocumentFragment>
|
|
79
|
-
`;
|
|
80
|
-
|
|
81
|
-
exports[`TextArea read only text area using readOnly 1`] = `
|
|
82
|
-
<DocumentFragment>
|
|
83
|
-
<textarea
|
|
84
|
-
aria-invalid="false"
|
|
85
|
-
aria-label="read only textarea"
|
|
86
|
-
class="pf-c-form-control"
|
|
87
|
-
readonly=""
|
|
88
|
-
>
|
|
89
|
-
test textarea
|
|
90
|
-
</textarea>
|
|
91
|
-
</DocumentFragment>
|
|
92
|
-
`;
|
|
93
|
-
|
|
94
|
-
exports[`TextArea simple text area 1`] = `
|
|
95
|
-
<DocumentFragment>
|
|
96
|
-
<textarea
|
|
97
|
-
aria-invalid="false"
|
|
98
|
-
aria-label="simple textarea"
|
|
99
|
-
class="pf-c-form-control"
|
|
100
|
-
>
|
|
101
|
-
test textarea
|
|
102
|
-
</textarea>
|
|
103
|
-
</DocumentFragment>
|
|
104
|
-
`;
|
|
105
|
-
|
|
106
|
-
exports[`TextArea validated text area error 1`] = `
|
|
107
|
-
<DocumentFragment>
|
|
108
|
-
<textarea
|
|
109
|
-
aria-invalid="true"
|
|
110
|
-
aria-label="validated textarea"
|
|
111
|
-
class="pf-c-form-control"
|
|
112
10
|
required=""
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
</textarea>
|
|
116
|
-
</DocumentFragment>
|
|
117
|
-
`;
|
|
118
|
-
|
|
119
|
-
exports[`TextArea vertically resizable text area 1`] = `
|
|
120
|
-
<DocumentFragment>
|
|
121
|
-
<textarea
|
|
122
|
-
aria-invalid="false"
|
|
123
|
-
aria-label="vertical resize textarea"
|
|
124
|
-
class="pf-c-form-control pf-m-resize-vertical"
|
|
125
|
-
>
|
|
126
|
-
test textarea
|
|
127
|
-
</textarea>
|
|
11
|
+
style="--pf-c-form-control--textarea--Height: 6px;"
|
|
12
|
+
/>
|
|
128
13
|
</DocumentFragment>
|
|
129
14
|
`;
|
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
JumpLinksItem,
|
|
13
13
|
JumpLinksList,
|
|
14
14
|
PageSection,
|
|
15
|
+
PageSectionVariants,
|
|
15
16
|
Sidebar,
|
|
16
17
|
SidebarContent,
|
|
17
18
|
SidebarPanel,
|
|
@@ -29,7 +30,7 @@ export const JumpLinksWithDrawer = () => {
|
|
|
29
30
|
|
|
30
31
|
React.useEffect(() => {
|
|
31
32
|
const masthead = document.getElementsByClassName('pf-c-masthead')[0];
|
|
32
|
-
const drawerToggleSection = document.
|
|
33
|
+
const drawerToggleSection = document.getElementById('drawer-toggle');
|
|
33
34
|
|
|
34
35
|
getResizeObserver(masthead, () => {
|
|
35
36
|
setOffsetHeight(masthead.offsetHeight + drawerToggleSection.offsetHeight);
|
|
@@ -61,60 +62,65 @@ export const JumpLinksWithDrawer = () => {
|
|
|
61
62
|
<DashboardWrapper breadcrumb={null} mainContainerId="scrollable-element">
|
|
62
63
|
<Drawer isExpanded={isExpanded}>
|
|
63
64
|
<DrawerContent panelContent={panelContent} id="jump-links-drawer-drawer-scrollable-container">
|
|
64
|
-
<DrawerContentBody
|
|
65
|
+
<DrawerContentBody>
|
|
65
66
|
<Sidebar>
|
|
66
67
|
<SidebarPanel variant="sticky">
|
|
67
|
-
<
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
{
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
68
|
+
<PageSection variant={PageSectionVariants.light}>
|
|
69
|
+
<JumpLinks
|
|
70
|
+
isVertical={true}
|
|
71
|
+
label="Jump to section"
|
|
72
|
+
scrollableSelector="#jump-links-drawer-drawer-scrollable-container"
|
|
73
|
+
offset={offsetHeight}
|
|
74
|
+
expandable={{ default: 'expandable', md: 'nonExpandable' }}
|
|
75
|
+
>
|
|
76
|
+
{headings.map(heading => (
|
|
77
|
+
<JumpLinksItem key={heading} href={`#jump-links-drawer-jump-links-${heading.toLowerCase()}`}>
|
|
78
|
+
{`${heading} section`}
|
|
79
|
+
<JumpLinksList></JumpLinksList>
|
|
80
|
+
</JumpLinksItem>
|
|
81
|
+
))}
|
|
82
|
+
</JumpLinks>
|
|
83
|
+
</PageSection>
|
|
81
84
|
</SidebarPanel>
|
|
82
85
|
<SidebarContent>
|
|
83
|
-
<PageSection
|
|
86
|
+
<PageSection id="drawer-toggle" stickyOnBreakpoint={{ default: 'top' }} variant="light">
|
|
84
87
|
<Button onClick={onToggleClick}>Toggle drawer</Button>
|
|
85
88
|
</PageSection>
|
|
86
|
-
<
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
<
|
|
90
|
-
{
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
89
|
+
<PageSection variant={PageSectionVariants.light}>
|
|
90
|
+
<TextContent>
|
|
91
|
+
{headings.map(heading => (
|
|
92
|
+
<div key={heading} style={{ maxWidth: '800px', marginBottom: '32px' }}>
|
|
93
|
+
<h2 id={`jump-links-drawer-jump-links-${heading.toLowerCase()}`} tabIndex={-1}>
|
|
94
|
+
{`${heading} section`}
|
|
95
|
+
</h2>
|
|
96
|
+
<p>
|
|
97
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas sed dui ullamcorper,
|
|
98
|
+
dignissim purus eu, mattis leo. Curabitur eleifend turpis ipsum, aliquam pretium risus
|
|
99
|
+
efficitur vel. Etiam eget enim vitae quam facilisis pharetra at eget diam. Suspendisse ut
|
|
100
|
+
vulputate magna. Nunc viverra posuere orci sit amet pulvinar. Quisque dui justo, egestas ac
|
|
101
|
+
accumsan suscipit, tristique eu risus. In aliquet libero ante, ac pulvinar lectus pretium in.
|
|
102
|
+
Ut enim tellus, vulputate et lorem et, hendrerit rutrum diam. Cras pharetra dapibus elit vitae
|
|
103
|
+
ullamcorper. Nulla facilisis euismod diam, at sodales sem laoreet hendrerit. Curabitur
|
|
104
|
+
porttitor ex nulla. Proin ligula leo, egestas ac nibh a, pellentesque mollis augue. Donec nec
|
|
105
|
+
augue vehicula eros pulvinar vehicula eget rutrum neque. Duis sit amet interdum lorem. Vivamus
|
|
106
|
+
porttitor nec quam a accumsan. Nam pretium vitae leo vitae rhoncus.
|
|
107
|
+
</p>
|
|
108
|
+
<p>
|
|
109
|
+
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium
|
|
110
|
+
voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati
|
|
111
|
+
cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est
|
|
112
|
+
laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero
|
|
113
|
+
tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime
|
|
114
|
+
placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Temporibus
|
|
115
|
+
autem quibusdam et aut officiis debitis aut rerum necessitatibus saepe eveniet ut et
|
|
116
|
+
voluptates repudiandae sint et molestiae non recusandae. Itaque earum rerum hic tenetur a
|
|
117
|
+
sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis
|
|
118
|
+
doloribus asperiores repellat.
|
|
119
|
+
</p>
|
|
120
|
+
</div>
|
|
121
|
+
))}
|
|
122
|
+
</TextContent>
|
|
123
|
+
</PageSection>
|
|
118
124
|
</SidebarContent>
|
|
119
125
|
</Sidebar>
|
|
120
126
|
</DrawerContentBody>
|