@patternfly/react-core 4.199.2 → 4.199.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.
Files changed (31) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/umd/react-core.min.css +219 -219
  3. package/package.json +5 -5
  4. package/src/components/AboutModal/__tests__/AboutModal.test.tsx +41 -60
  5. package/src/components/Accordion/__tests__/Accordion.test.tsx +23 -17
  6. package/src/components/Alert/__tests__/Alert.test.tsx +195 -184
  7. package/src/components/Alert/__tests__/Generated/AlertActionCloseButton.test.tsx +19 -17
  8. package/src/components/Alert/__tests__/Generated/__snapshots__/AlertActionCloseButton.test.tsx.snap +26 -4
  9. package/src/components/Alert/__tests__/__snapshots__/Alert.test.tsx.snap +50 -700
  10. package/src/components/AlertGroup/__tests__/AlertGroup.test.tsx +68 -73
  11. package/src/components/AlertGroup/__tests__/__snapshots__/AlertGroup.test.tsx.snap +1 -893
  12. package/src/components/ApplicationLauncher/__tests__/Generated/ApplicationLauncherSeparator.test.tsx +13 -10
  13. package/src/components/ApplicationLauncher/__tests__/Generated/__snapshots__/ApplicationLauncherSeparator.test.tsx.snap +12 -1
  14. package/src/components/Button/__tests__/Button.test.tsx +116 -107
  15. package/src/components/Button/__tests__/__snapshots__/Button.test.tsx.snap +21 -21
  16. package/src/components/Card/__tests__/Card.test.tsx +119 -100
  17. package/src/components/Card/__tests__/CardBody.test.tsx +35 -28
  18. package/src/components/Card/__tests__/CardFooter.test.tsx +28 -24
  19. package/src/components/Card/__tests__/CardHeadMain.test.tsx +19 -14
  20. package/src/components/Card/__tests__/CardHeader.test.tsx +6 -22
  21. package/src/components/Card/__tests__/CardHeaderMain.test.tsx +19 -14
  22. package/src/components/Card/__tests__/CardTitle.test.tsx +25 -0
  23. package/src/components/Card/__tests__/__snapshots__/Card.test.tsx.snap +12 -28
  24. package/src/components/Card/__tests__/__snapshots__/CardBody.test.tsx.snap +2 -4
  25. package/src/components/Card/__tests__/__snapshots__/CardFooter.test.tsx.snap +1 -3
  26. package/src/components/Card/__tests__/__snapshots__/CardHeadMain.test.tsx.snap +1 -11
  27. package/src/components/Card/__tests__/__snapshots__/CardHeader.test.tsx.snap +1 -11
  28. package/src/components/Card/__tests__/__snapshots__/CardHeaderMain.test.tsx.snap +1 -11
  29. package/src/components/Card/__tests__/__snapshots__/CardTitle.test.tsx.snap +3 -0
  30. package/src/components/Checkbox/__tests__/Checkbox.test.tsx +66 -70
  31. package/src/components/Checkbox/__tests__/__snapshots__/Checkbox.test.tsx.snap +9 -204
package/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
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.199.3 (2022-03-17)
7
+
8
+ **Note:** Version bump only for package @patternfly/react-core
9
+
10
+
11
+
12
+
13
+
6
14
  ## 4.199.2 (2022-03-17)
7
15
 
8
16
  **Note:** Version bump only for package @patternfly/react-core
@@ -17310,6 +17310,225 @@ label.pf-c-radio, .pf-c-radio__label,
17310
17310
  left: var(--pf-c-skip-to-content--focus--Left);
17311
17311
  }
17312
17312
 
17313
+ .pf-c-slider {
17314
+ --pf-c-slider--value: 0;
17315
+ --pf-c-slider__rail--PaddingTop: var(--pf-global--spacer--md);
17316
+ --pf-c-slider__rail--PaddingBottom: var(--pf-global--spacer--md);
17317
+ --pf-c-slider__rail-track--Height: 0.25rem;
17318
+ --pf-c-slider__rail-track--before--base--BackgroundColor: var(--pf-global--BorderColor--100);
17319
+ --pf-c-slider__rail-track--before--fill--BackgroundColor: var(--pf-global--active-color--300);
17320
+ --pf-c-slider__rail-track--before--BorderRadius: var(--pf-global--BorderRadius--lg);
17321
+ --pf-c-slider__rail-track--before--fill--BackgroundColor--gradient-stop: var(--pf-c-slider--value);
17322
+ --pf-c-slider__steps--FontSize: var(--pf-global--FontSize--sm);
17323
+ --pf-c-slider__steps--Height: var(--pf-c-slider__steps--FontSize);
17324
+ --pf-c-slider__step-tick--Top: var(--pf-global--spacer--md);
17325
+ --pf-c-slider__step-tick--Width: 0.25rem;
17326
+ --pf-c-slider__step-tick--Height: 0.25rem;
17327
+ --pf-c-slider__step-tick--BackgroundColor: var(--pf-global--BorderColor--200);
17328
+ --pf-c-slider__step-tick--TranslateX: -50%;
17329
+ --pf-c-slider__step-tick--BorderRadius: var(--pf-global--BorderRadius--lg);
17330
+ --pf-c-slider__step--m-active__slider-tick--BackgroundColor: var(--pf-global--primary-color--100);
17331
+ --pf-c-slider__step--first-child__step-tick--TranslateX: 0;
17332
+ --pf-c-slider__step--last-child__step-tick--TranslateX: -100%;
17333
+ --pf-c-slider__step-label--TranslateX: -50%;
17334
+ --pf-c-slider__step-label--Top: calc(var(--pf-global--spacer--xl) + var(--pf-c-slider__rail-track--Height));
17335
+ --pf-c-slider__step--first-child__step-label--TranslateX: 0;
17336
+ --pf-c-slider__step--last-child__step-label--TranslateX: -100%;
17337
+ --pf-c-slider__thumb--Top: calc(var(--pf-c-slider__rail-track--Height) / 2 + var(--pf-global--spacer--md));
17338
+ --pf-c-slider__thumb--Width: 1rem;
17339
+ --pf-c-slider__thumb--Height: 1rem;
17340
+ --pf-c-slider__thumb--Left: var(--pf-c-slider--value);
17341
+ --pf-c-slider__thumb--BackgroundColor: var(--pf-global--primary-color--100);
17342
+ --pf-c-slider__thumb--TranslateX: -50%;
17343
+ --pf-c-slider__thumb--TranslateY: -50%;
17344
+ --pf-c-slider__thumb--BorderRadius: var(--pf-global--BorderRadius--lg);
17345
+ --pf-c-slider__thumb--BoxShadow--base:
17346
+ 0 0 0 2px var(--pf-global--BackgroundColor--100),
17347
+ 0 0 0 3px var(--pf-global--primary-color--100);
17348
+ --pf-c-slider__thumb--hover--BoxShadow: var(--pf-c-slider__thumb--BoxShadow--base);
17349
+ --pf-c-slider__thumb--focus--BoxShadow: var(--pf-c-slider__thumb--BoxShadow--base);
17350
+ --pf-c-slider__thumb--active--BoxShadow:
17351
+ var(--pf-c-slider__thumb--BoxShadow--base),
17352
+ 0 0 2px 5px var(--pf-global--active-color--200);
17353
+ --pf-c-slider__thumb--before--Width: var(--pf-global--target-size--MinWidth);
17354
+ --pf-c-slider__thumb--before--Height: var(--pf-global--target-size--MinHeight);
17355
+ --pf-c-slider__thumb--before--BorderRadius: var(--pf-global--BorderRadius--lg);
17356
+ --pf-c-slider__thumb--before--TranslateX: -50%;
17357
+ --pf-c-slider__thumb--before--TranslateY: -50%;
17358
+ --pf-c-slider__value--MarginLeft: var(--pf-global--spacer--md);
17359
+ --pf-c-slider__value--c-form-control--width-base: 3.5ch;
17360
+ --pf-c-slider__value--c-form-control--width-chars: 3;
17361
+ --pf-c-slider__value--c-form-control--Width: calc(var(--pf-c-slider__value--c-form-control--width-base) + (var(--pf-c-slider__value--c-form-control--width-chars) * 1ch));
17362
+ --pf-c-slider__value--m-floating--TranslateX: -50%;
17363
+ --pf-c-slider__value--m-floating--TranslateY: -100%;
17364
+ --pf-c-slider__value--m-floating--Left: var(--pf-c-slider--value);
17365
+ --pf-c-slider__value--m-floating--ZIndex: var(--pf-global--ZIndex--sm);
17366
+ --pf-c-slider__actions--MarginRight: var(--pf-global--spacer--sm);
17367
+ --pf-c-slider__main--actions--MarginLeft: var(--pf-global--spacer--sm);
17368
+ --pf-c-slider--m-disabled__rail-track--before--fill--BackgroundColor: var(--pf-global--palette--black-500);
17369
+ --pf-c-slider--m-disabled__step--m-active__slider-tick--BackgroundColor: var(--pf-global--palette--black-700);
17370
+ --pf-c-slider--m-disabled__thumb--BackgroundColor: var(--pf-global--palette--black-700);
17371
+ display: flex;
17372
+ }
17373
+
17374
+ .pf-c-slider.pf-m-disabled {
17375
+ --pf-c-slider__rail-track--before--fill--BackgroundColor: var(--pf-c-slider--m-disabled__rail-track--before--fill--BackgroundColor);
17376
+ --pf-c-slider__step--m-active__slider-tick--BackgroundColor: var(--pf-c-slider--m-disabled__step--m-active__slider-tick--BackgroundColor);
17377
+ --pf-c-slider__thumb--BackgroundColor: var(--pf-c-slider--m-disabled__thumb--BackgroundColor);
17378
+ }
17379
+
17380
+ .pf-c-slider.pf-m-disabled .pf-c-slider__rail,
17381
+ .pf-c-slider.pf-m-disabled .pf-c-slider__thumb {
17382
+ cursor: not-allowed;
17383
+ }
17384
+
17385
+ .pf-c-slider.pf-m-disabled .pf-c-slider__thumb {
17386
+ --pf-c-slider__thumb--BoxShadow: none;
17387
+ }
17388
+
17389
+ .pf-c-slider__main {
17390
+ position: relative;
17391
+ flex-grow: 1;
17392
+ }
17393
+
17394
+ .pf-c-slider__rail {
17395
+ padding-top: var(--pf-c-slider__rail--PaddingTop);
17396
+ padding-bottom: var(--pf-c-slider__rail--PaddingBottom);
17397
+ }
17398
+
17399
+ .pf-c-slider__rail-track {
17400
+ position: relative;
17401
+ height: var(--pf-c-slider__rail-track--Height);
17402
+ }
17403
+
17404
+ .pf-c-slider__rail-track::before {
17405
+ position: absolute;
17406
+ top: 0;
17407
+ right: 0;
17408
+ bottom: 0;
17409
+ left: 0;
17410
+ content: "";
17411
+ background: linear-gradient(to right, var(--pf-c-slider__rail-track--before--fill--BackgroundColor), var(--pf-c-slider__rail-track--before--fill--BackgroundColor) var(--pf-c-slider__rail-track--before--fill--BackgroundColor--gradient-stop), var(--pf-c-slider__rail-track--before--base--BackgroundColor) var(--pf-c-slider__rail-track--before--fill--BackgroundColor--gradient-stop));
17412
+ border-radius: var(--pf-c-slider__rail-track--before--BorderRadius);
17413
+ }
17414
+
17415
+ .pf-c-slider__steps {
17416
+ height: var(--pf-c-slider__steps--Height);
17417
+ font-size: var(--pf-c-slider__steps--FontSize);
17418
+ line-height: 1;
17419
+ }
17420
+
17421
+ .pf-c-slider__step {
17422
+ position: absolute;
17423
+ top: 0;
17424
+ left: var(--pf-c-slider__step--Left);
17425
+ content: "";
17426
+ }
17427
+
17428
+ .pf-c-slider__step.pf-m-active {
17429
+ --pf-c-slider__step-tick--BackgroundColor: var(--pf-c-slider__step--m-active__slider-tick--BackgroundColor);
17430
+ }
17431
+
17432
+ .pf-c-slider__step:first-child {
17433
+ --pf-c-slider__step-tick--TranslateX: var(--pf-c-slider__step--first-child__step-tick--TranslateX);
17434
+ --pf-c-slider__step-label--TranslateX: var(--pf-c-slider__step--first-child__step-label--TranslateX);
17435
+ }
17436
+
17437
+ .pf-c-slider__step:last-child {
17438
+ --pf-c-slider__step-tick--TranslateX: var(--pf-c-slider__step--last-child__step-tick--TranslateX);
17439
+ --pf-c-slider__step-label--TranslateX: var(--pf-c-slider__step--last-child__step-label--TranslateX);
17440
+ }
17441
+
17442
+ .pf-c-slider__step-tick {
17443
+ position: absolute;
17444
+ top: var(--pf-c-slider__step-tick--Top);
17445
+ left: 0;
17446
+ width: var(--pf-c-slider__step-tick--Width);
17447
+ height: var(--pf-c-slider__step-tick--Height);
17448
+ background-color: var(--pf-c-slider__step-tick--BackgroundColor);
17449
+ border-radius: var(--pf-c-slider__step-tick--BorderRadius);
17450
+ transform: translateX(var(--pf-c-slider__step-tick--TranslateX));
17451
+ }
17452
+
17453
+ .pf-c-slider__step-label {
17454
+ position: absolute;
17455
+ top: var(--pf-c-slider__step-label--Top);
17456
+ transform: translateX(var(--pf-c-slider__step-label--TranslateX));
17457
+ }
17458
+
17459
+ .pf-c-slider__thumb {
17460
+ position: absolute;
17461
+ top: var(--pf-c-slider__thumb--Top);
17462
+ left: var(--pf-c-slider__thumb--Left);
17463
+ width: var(--pf-c-slider__thumb--Width);
17464
+ height: var(--pf-c-slider__thumb--Height);
17465
+ cursor: pointer;
17466
+ background-color: var(--pf-c-slider__thumb--BackgroundColor);
17467
+ border-radius: var(--pf-c-slider__thumb--BorderRadius);
17468
+ box-shadow: var(--pf-c-slider__thumb--BoxShadow);
17469
+ transform: translate(var(--pf-c-slider__thumb--TranslateX), var(--pf-c-slider__thumb--TranslateY));
17470
+ }
17471
+
17472
+ .pf-c-slider__thumb::before {
17473
+ position: absolute;
17474
+ top: 50%;
17475
+ left: 50%;
17476
+ width: var(--pf-c-slider__thumb--before--Width);
17477
+ height: var(--pf-c-slider__thumb--before--Height);
17478
+ content: "";
17479
+ border-radius: var(--pf-c-slider__thumb--before--BorderRadius);
17480
+ transform: translate(var(--pf-c-slider__thumb--before--TranslateX), var(--pf-c-slider__thumb--before--TranslateY));
17481
+ }
17482
+
17483
+ .pf-c-slider__thumb:hover {
17484
+ --pf-c-slider__thumb--BoxShadow: var(--pf-c-slider__thumb--hover--BoxShadow);
17485
+ }
17486
+
17487
+ .pf-c-slider__thumb:focus {
17488
+ --pf-c-slider__thumb--BoxShadow: var(--pf-c-slider__thumb--focus--BoxShadow);
17489
+ outline: 0;
17490
+ }
17491
+
17492
+ .pf-c-slider__thumb:active {
17493
+ --pf-c-slider__thumb--BoxShadow: var(--pf-c-slider__thumb--active--BoxShadow);
17494
+ }
17495
+
17496
+ .pf-c-slider__value {
17497
+ margin-left: var(--pf-c-slider__value--MarginLeft);
17498
+ }
17499
+
17500
+ .pf-c-slider__value.pf-m-floating {
17501
+ --pf-c-slider__value--MarginLeft: 0;
17502
+ position: absolute;
17503
+ top: 0;
17504
+ left: var(--pf-c-slider__value--m-floating--Left);
17505
+ z-index: var(--pf-c-slider__value--m-floating--ZIndex);
17506
+ transform: translate(var(--pf-c-slider__value--m-floating--TranslateX), var(--pf-c-slider__value--m-floating--TranslateY));
17507
+ }
17508
+
17509
+ .pf-c-slider__value.pf-m-floating .pf-c-input-group {
17510
+ align-items: center;
17511
+ }
17512
+
17513
+ .pf-c-slider__value.pf-m-floating .pf-c-input-group__text {
17514
+ position: absolute;
17515
+ left: 100%;
17516
+ }
17517
+
17518
+ .pf-c-slider__value .pf-c-form-control {
17519
+ width: var(--pf-c-slider__value--c-form-control--Width);
17520
+ }
17521
+
17522
+ .pf-c-slider__actions {
17523
+ display: flex;
17524
+ margin-right: var(--pf-c-slider__actions--MarginRight);
17525
+ }
17526
+
17527
+ .pf-c-slider__main ~ .pf-c-slider__actions {
17528
+ --pf-c-slider__actions--MarginRight: 0;
17529
+ margin-left: var(--pf-c-slider__main--actions--MarginLeft);
17530
+ }
17531
+
17313
17532
  .pf-c-spinner {
17314
17533
  --pf-c-spinner--diameter: var(--pf-global--icon--FontSize--xl);
17315
17534
  --pf-c-spinner--Width: var(--pf-c-spinner--diameter);
@@ -17539,225 +17758,6 @@ svg.pf-c-spinner.pf-m-xl {
17539
17758
  transform: rotate(720deg);
17540
17759
  }
17541
17760
  }
17542
- .pf-c-slider {
17543
- --pf-c-slider--value: 0;
17544
- --pf-c-slider__rail--PaddingTop: var(--pf-global--spacer--md);
17545
- --pf-c-slider__rail--PaddingBottom: var(--pf-global--spacer--md);
17546
- --pf-c-slider__rail-track--Height: 0.25rem;
17547
- --pf-c-slider__rail-track--before--base--BackgroundColor: var(--pf-global--BorderColor--100);
17548
- --pf-c-slider__rail-track--before--fill--BackgroundColor: var(--pf-global--active-color--300);
17549
- --pf-c-slider__rail-track--before--BorderRadius: var(--pf-global--BorderRadius--lg);
17550
- --pf-c-slider__rail-track--before--fill--BackgroundColor--gradient-stop: var(--pf-c-slider--value);
17551
- --pf-c-slider__steps--FontSize: var(--pf-global--FontSize--sm);
17552
- --pf-c-slider__steps--Height: var(--pf-c-slider__steps--FontSize);
17553
- --pf-c-slider__step-tick--Top: var(--pf-global--spacer--md);
17554
- --pf-c-slider__step-tick--Width: 0.25rem;
17555
- --pf-c-slider__step-tick--Height: 0.25rem;
17556
- --pf-c-slider__step-tick--BackgroundColor: var(--pf-global--BorderColor--200);
17557
- --pf-c-slider__step-tick--TranslateX: -50%;
17558
- --pf-c-slider__step-tick--BorderRadius: var(--pf-global--BorderRadius--lg);
17559
- --pf-c-slider__step--m-active__slider-tick--BackgroundColor: var(--pf-global--primary-color--100);
17560
- --pf-c-slider__step--first-child__step-tick--TranslateX: 0;
17561
- --pf-c-slider__step--last-child__step-tick--TranslateX: -100%;
17562
- --pf-c-slider__step-label--TranslateX: -50%;
17563
- --pf-c-slider__step-label--Top: calc(var(--pf-global--spacer--xl) + var(--pf-c-slider__rail-track--Height));
17564
- --pf-c-slider__step--first-child__step-label--TranslateX: 0;
17565
- --pf-c-slider__step--last-child__step-label--TranslateX: -100%;
17566
- --pf-c-slider__thumb--Top: calc(var(--pf-c-slider__rail-track--Height) / 2 + var(--pf-global--spacer--md));
17567
- --pf-c-slider__thumb--Width: 1rem;
17568
- --pf-c-slider__thumb--Height: 1rem;
17569
- --pf-c-slider__thumb--Left: var(--pf-c-slider--value);
17570
- --pf-c-slider__thumb--BackgroundColor: var(--pf-global--primary-color--100);
17571
- --pf-c-slider__thumb--TranslateX: -50%;
17572
- --pf-c-slider__thumb--TranslateY: -50%;
17573
- --pf-c-slider__thumb--BorderRadius: var(--pf-global--BorderRadius--lg);
17574
- --pf-c-slider__thumb--BoxShadow--base:
17575
- 0 0 0 2px var(--pf-global--BackgroundColor--100),
17576
- 0 0 0 3px var(--pf-global--primary-color--100);
17577
- --pf-c-slider__thumb--hover--BoxShadow: var(--pf-c-slider__thumb--BoxShadow--base);
17578
- --pf-c-slider__thumb--focus--BoxShadow: var(--pf-c-slider__thumb--BoxShadow--base);
17579
- --pf-c-slider__thumb--active--BoxShadow:
17580
- var(--pf-c-slider__thumb--BoxShadow--base),
17581
- 0 0 2px 5px var(--pf-global--active-color--200);
17582
- --pf-c-slider__thumb--before--Width: var(--pf-global--target-size--MinWidth);
17583
- --pf-c-slider__thumb--before--Height: var(--pf-global--target-size--MinHeight);
17584
- --pf-c-slider__thumb--before--BorderRadius: var(--pf-global--BorderRadius--lg);
17585
- --pf-c-slider__thumb--before--TranslateX: -50%;
17586
- --pf-c-slider__thumb--before--TranslateY: -50%;
17587
- --pf-c-slider__value--MarginLeft: var(--pf-global--spacer--md);
17588
- --pf-c-slider__value--c-form-control--width-base: 3.5ch;
17589
- --pf-c-slider__value--c-form-control--width-chars: 3;
17590
- --pf-c-slider__value--c-form-control--Width: calc(var(--pf-c-slider__value--c-form-control--width-base) + (var(--pf-c-slider__value--c-form-control--width-chars) * 1ch));
17591
- --pf-c-slider__value--m-floating--TranslateX: -50%;
17592
- --pf-c-slider__value--m-floating--TranslateY: -100%;
17593
- --pf-c-slider__value--m-floating--Left: var(--pf-c-slider--value);
17594
- --pf-c-slider__value--m-floating--ZIndex: var(--pf-global--ZIndex--sm);
17595
- --pf-c-slider__actions--MarginRight: var(--pf-global--spacer--sm);
17596
- --pf-c-slider__main--actions--MarginLeft: var(--pf-global--spacer--sm);
17597
- --pf-c-slider--m-disabled__rail-track--before--fill--BackgroundColor: var(--pf-global--palette--black-500);
17598
- --pf-c-slider--m-disabled__step--m-active__slider-tick--BackgroundColor: var(--pf-global--palette--black-700);
17599
- --pf-c-slider--m-disabled__thumb--BackgroundColor: var(--pf-global--palette--black-700);
17600
- display: flex;
17601
- }
17602
-
17603
- .pf-c-slider.pf-m-disabled {
17604
- --pf-c-slider__rail-track--before--fill--BackgroundColor: var(--pf-c-slider--m-disabled__rail-track--before--fill--BackgroundColor);
17605
- --pf-c-slider__step--m-active__slider-tick--BackgroundColor: var(--pf-c-slider--m-disabled__step--m-active__slider-tick--BackgroundColor);
17606
- --pf-c-slider__thumb--BackgroundColor: var(--pf-c-slider--m-disabled__thumb--BackgroundColor);
17607
- }
17608
-
17609
- .pf-c-slider.pf-m-disabled .pf-c-slider__rail,
17610
- .pf-c-slider.pf-m-disabled .pf-c-slider__thumb {
17611
- cursor: not-allowed;
17612
- }
17613
-
17614
- .pf-c-slider.pf-m-disabled .pf-c-slider__thumb {
17615
- --pf-c-slider__thumb--BoxShadow: none;
17616
- }
17617
-
17618
- .pf-c-slider__main {
17619
- position: relative;
17620
- flex-grow: 1;
17621
- }
17622
-
17623
- .pf-c-slider__rail {
17624
- padding-top: var(--pf-c-slider__rail--PaddingTop);
17625
- padding-bottom: var(--pf-c-slider__rail--PaddingBottom);
17626
- }
17627
-
17628
- .pf-c-slider__rail-track {
17629
- position: relative;
17630
- height: var(--pf-c-slider__rail-track--Height);
17631
- }
17632
-
17633
- .pf-c-slider__rail-track::before {
17634
- position: absolute;
17635
- top: 0;
17636
- right: 0;
17637
- bottom: 0;
17638
- left: 0;
17639
- content: "";
17640
- background: linear-gradient(to right, var(--pf-c-slider__rail-track--before--fill--BackgroundColor), var(--pf-c-slider__rail-track--before--fill--BackgroundColor) var(--pf-c-slider__rail-track--before--fill--BackgroundColor--gradient-stop), var(--pf-c-slider__rail-track--before--base--BackgroundColor) var(--pf-c-slider__rail-track--before--fill--BackgroundColor--gradient-stop));
17641
- border-radius: var(--pf-c-slider__rail-track--before--BorderRadius);
17642
- }
17643
-
17644
- .pf-c-slider__steps {
17645
- height: var(--pf-c-slider__steps--Height);
17646
- font-size: var(--pf-c-slider__steps--FontSize);
17647
- line-height: 1;
17648
- }
17649
-
17650
- .pf-c-slider__step {
17651
- position: absolute;
17652
- top: 0;
17653
- left: var(--pf-c-slider__step--Left);
17654
- content: "";
17655
- }
17656
-
17657
- .pf-c-slider__step.pf-m-active {
17658
- --pf-c-slider__step-tick--BackgroundColor: var(--pf-c-slider__step--m-active__slider-tick--BackgroundColor);
17659
- }
17660
-
17661
- .pf-c-slider__step:first-child {
17662
- --pf-c-slider__step-tick--TranslateX: var(--pf-c-slider__step--first-child__step-tick--TranslateX);
17663
- --pf-c-slider__step-label--TranslateX: var(--pf-c-slider__step--first-child__step-label--TranslateX);
17664
- }
17665
-
17666
- .pf-c-slider__step:last-child {
17667
- --pf-c-slider__step-tick--TranslateX: var(--pf-c-slider__step--last-child__step-tick--TranslateX);
17668
- --pf-c-slider__step-label--TranslateX: var(--pf-c-slider__step--last-child__step-label--TranslateX);
17669
- }
17670
-
17671
- .pf-c-slider__step-tick {
17672
- position: absolute;
17673
- top: var(--pf-c-slider__step-tick--Top);
17674
- left: 0;
17675
- width: var(--pf-c-slider__step-tick--Width);
17676
- height: var(--pf-c-slider__step-tick--Height);
17677
- background-color: var(--pf-c-slider__step-tick--BackgroundColor);
17678
- border-radius: var(--pf-c-slider__step-tick--BorderRadius);
17679
- transform: translateX(var(--pf-c-slider__step-tick--TranslateX));
17680
- }
17681
-
17682
- .pf-c-slider__step-label {
17683
- position: absolute;
17684
- top: var(--pf-c-slider__step-label--Top);
17685
- transform: translateX(var(--pf-c-slider__step-label--TranslateX));
17686
- }
17687
-
17688
- .pf-c-slider__thumb {
17689
- position: absolute;
17690
- top: var(--pf-c-slider__thumb--Top);
17691
- left: var(--pf-c-slider__thumb--Left);
17692
- width: var(--pf-c-slider__thumb--Width);
17693
- height: var(--pf-c-slider__thumb--Height);
17694
- cursor: pointer;
17695
- background-color: var(--pf-c-slider__thumb--BackgroundColor);
17696
- border-radius: var(--pf-c-slider__thumb--BorderRadius);
17697
- box-shadow: var(--pf-c-slider__thumb--BoxShadow);
17698
- transform: translate(var(--pf-c-slider__thumb--TranslateX), var(--pf-c-slider__thumb--TranslateY));
17699
- }
17700
-
17701
- .pf-c-slider__thumb::before {
17702
- position: absolute;
17703
- top: 50%;
17704
- left: 50%;
17705
- width: var(--pf-c-slider__thumb--before--Width);
17706
- height: var(--pf-c-slider__thumb--before--Height);
17707
- content: "";
17708
- border-radius: var(--pf-c-slider__thumb--before--BorderRadius);
17709
- transform: translate(var(--pf-c-slider__thumb--before--TranslateX), var(--pf-c-slider__thumb--before--TranslateY));
17710
- }
17711
-
17712
- .pf-c-slider__thumb:hover {
17713
- --pf-c-slider__thumb--BoxShadow: var(--pf-c-slider__thumb--hover--BoxShadow);
17714
- }
17715
-
17716
- .pf-c-slider__thumb:focus {
17717
- --pf-c-slider__thumb--BoxShadow: var(--pf-c-slider__thumb--focus--BoxShadow);
17718
- outline: 0;
17719
- }
17720
-
17721
- .pf-c-slider__thumb:active {
17722
- --pf-c-slider__thumb--BoxShadow: var(--pf-c-slider__thumb--active--BoxShadow);
17723
- }
17724
-
17725
- .pf-c-slider__value {
17726
- margin-left: var(--pf-c-slider__value--MarginLeft);
17727
- }
17728
-
17729
- .pf-c-slider__value.pf-m-floating {
17730
- --pf-c-slider__value--MarginLeft: 0;
17731
- position: absolute;
17732
- top: 0;
17733
- left: var(--pf-c-slider__value--m-floating--Left);
17734
- z-index: var(--pf-c-slider__value--m-floating--ZIndex);
17735
- transform: translate(var(--pf-c-slider__value--m-floating--TranslateX), var(--pf-c-slider__value--m-floating--TranslateY));
17736
- }
17737
-
17738
- .pf-c-slider__value.pf-m-floating .pf-c-input-group {
17739
- align-items: center;
17740
- }
17741
-
17742
- .pf-c-slider__value.pf-m-floating .pf-c-input-group__text {
17743
- position: absolute;
17744
- left: 100%;
17745
- }
17746
-
17747
- .pf-c-slider__value .pf-c-form-control {
17748
- width: var(--pf-c-slider__value--c-form-control--Width);
17749
- }
17750
-
17751
- .pf-c-slider__actions {
17752
- display: flex;
17753
- margin-right: var(--pf-c-slider__actions--MarginRight);
17754
- }
17755
-
17756
- .pf-c-slider__main ~ .pf-c-slider__actions {
17757
- --pf-c-slider__actions--MarginRight: 0;
17758
- margin-left: var(--pf-c-slider__main--actions--MarginLeft);
17759
- }
17760
-
17761
17761
  .pf-c-switch {
17762
17762
  --pf-c-switch--FontSize: var(--pf-global--FontSize--md);
17763
17763
  --pf-c-switch__label--PaddingLeft: var(--pf-global--spacer--md);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@patternfly/react-core",
3
- "version": "4.199.2",
3
+ "version": "4.199.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",
@@ -34,9 +34,9 @@
34
34
  "generate": "node scripts/copyStyles.js"
35
35
  },
36
36
  "dependencies": {
37
- "@patternfly/react-icons": "^4.50.2",
38
- "@patternfly/react-styles": "^4.49.2",
39
- "@patternfly/react-tokens": "^4.51.2",
37
+ "@patternfly/react-icons": "^4.50.3",
38
+ "@patternfly/react-styles": "^4.49.3",
39
+ "@patternfly/react-tokens": "^4.51.3",
40
40
  "focus-trap": "6.2.2",
41
41
  "react-dropzone": "9.0.0",
42
42
  "tippy.js": "5.1.2",
@@ -60,5 +60,5 @@
60
60
  "react": "^16.8.0 || ^17.0.0",
61
61
  "react-dom": "^16.8.0 || ^17.0.0"
62
62
  },
63
- "gitHead": "57da79b104a7ac151b99b79933cf164ed611cc7d"
63
+ "gitHead": "5ebdd87969330ddee041f3a5b91ef9293be16abd"
64
64
  }
@@ -1,72 +1,53 @@
1
1
  import * as React from 'react';
2
- import * as ReactDOM from 'react-dom';
3
- import { shallow } from 'enzyme';
4
- import { AboutModal } from '../AboutModal';
5
- import { KEY_CODES } from '../../../helpers/constants';
6
2
 
7
- const mockListener = jest.spyOn(ReactDOM, 'createPortal');
8
- jest.spyOn(document, 'createElement');
9
- jest.spyOn(document.body, 'addEventListener');
3
+ import { render, screen } from '@testing-library/react';
4
+ import userEvent from '@testing-library/user-event';
10
5
 
11
- mockListener.mockImplementation(node => node as React.ReactPortal);
6
+ import { AboutModal, AboutModalProps } from '../AboutModal';
12
7
 
13
- const props = {
8
+ const props: AboutModalProps = {
14
9
  onClose: jest.fn(),
15
10
  children: 'modal content',
16
11
  productName: 'Product Name',
17
12
  trademark: 'Trademark and copyright information here',
18
13
  brandImageSrc: 'brandImg...',
19
- brandImageAlt: 'Brand Image',
20
- logoImageSrc: 'logoImg...',
21
- logoImageAlt: 'AboutModal Logo'
14
+ brandImageAlt: 'Brand Image'
22
15
  };
23
16
 
24
- test('AboutModal creates a container element once for div', () => {
25
- const view = shallow(<AboutModal {...props}> Test About Modal </AboutModal>);
26
- view.update();
27
- expect(document.createElement).toBeCalledWith('div');
28
- expect(document.createElement).toHaveBeenCalledTimes(1);
29
- });
30
-
31
- test('About Modal closes with escape', () => {
32
- shallow(
33
- <AboutModal {...props} isOpen>
34
- Test About Modal
35
- </AboutModal>
36
- );
37
- const [event, handler] = (document.body.addEventListener as any).mock.calls[0];
38
- expect(event).toBe('keydown');
39
- handler({ keyCode: KEY_CODES.ESCAPE_KEY });
40
- expect(props.onClose).toBeCalled();
41
- });
42
-
43
- test('modal does not call onClose for esc key if it is not open', () => {
44
- shallow(<AboutModal {...props} />);
45
- const [event, handler] = (document.body.addEventListener as any).mock.calls[0];
46
- expect(event).toBe('keydown');
47
- handler({ keyCode: KEY_CODES.ESCAPE_KEY });
48
- expect(props.onClose).not.toBeCalled();
49
- });
50
-
51
- test('Each modal is given new aria-describedby and aria-labelledby', () => {
52
- const first = new AboutModal(props);
53
- const second = new AboutModal(props);
54
- expect(first.ariaLabelledBy).not.toBe(second.ariaLabelledBy);
55
- expect(first.ariaDescribedBy).not.toBe(second.ariaDescribedBy);
56
- });
57
-
58
- test('Console error is generated when the logoImageSrc is provided without logoImageAlt', () => {
59
- const noImgAltrops = {
60
- onClose: jest.fn(),
61
- children: 'modal content',
62
- productName: 'Product Name',
63
- trademark: 'Trademark and copyright information here',
64
- brandImageSrc: 'brandImg...',
65
- logoImageSrc: 'logoImg...'
66
- };
67
- const myMock = jest.fn() as any;
68
- global.console = { error: myMock } as any;
69
- const JSAboutModal = AboutModal as any;
70
- shallow(<JSAboutModal {...noImgAltrops}> Test About Modal </JSAboutModal>);
71
- expect(myMock).toBeCalled();
17
+ describe('AboutModal', () => {
18
+ test('closes with escape', () => {
19
+ render(<AboutModal {...props} isOpen />);
20
+
21
+ userEvent.type(screen.getByRole('dialog'), '{esc}');
22
+ expect(props.onClose).toBeCalled();
23
+ });
24
+
25
+ test('does not render the modal when isOpen is not specified', () => {
26
+ render(<AboutModal {...props} />);
27
+ expect(screen.queryByRole('dialog')).toBeNull();
28
+ });
29
+
30
+ test('Each modal is given new aria-describedby and aria-labelledby', () => {
31
+ const first = new AboutModal(props);
32
+ const second = new AboutModal(props);
33
+
34
+ expect(first.ariaLabelledBy).not.toBe(second.ariaLabelledBy);
35
+ expect(first.ariaDescribedBy).not.toBe(second.ariaDescribedBy);
36
+ });
37
+
38
+ test('Console error is generated when the logoImageSrc is provided without logoImageAlt', () => {
39
+ const noImgAltrops = {
40
+ onClose: jest.fn(),
41
+ children: 'modal content',
42
+ productName: 'Product Name',
43
+ trademark: 'Trademark and copyright information here',
44
+ brandImageSrc: 'brandImg...',
45
+ logoImageSrc: 'logoImg...'
46
+ } as any;
47
+ const myMock = jest.fn() as any;
48
+ global.console = { error: myMock } as any;
49
+
50
+ render(<AboutModal {...noImgAltrops}>Test About Modal</AboutModal>);
51
+ expect(myMock).toBeCalled();
52
+ });
72
53
  });