@patternfly/patternfly 5.1.0-prerelease.9 → 5.2.0-prerelease.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. package/README.md +6 -6
  2. package/base/_common.scss +9 -8
  3. package/base/_variables.scss +5 -1
  4. package/base/patternfly-common.css +4 -11
  5. package/base/patternfly-variables.css +5 -1
  6. package/components/AboutModalBox/about-modal-box.css +5 -0
  7. package/components/AboutModalBox/about-modal-box.scss +7 -0
  8. package/components/Accordion/accordion.css +3 -0
  9. package/components/Accordion/accordion.scss +2 -0
  10. package/components/Alert/alert.css +3 -0
  11. package/components/Alert/alert.scss +2 -0
  12. package/components/BackgroundImage/background-image.css +4 -1
  13. package/components/BackgroundImage/background-image.scss +6 -1
  14. package/components/Banner/banner.css +0 -3
  15. package/components/Breadcrumb/breadcrumb.css +3 -0
  16. package/components/Breadcrumb/breadcrumb.scss +2 -0
  17. package/components/Button/button.css +3 -0
  18. package/components/Button/button.scss +4 -0
  19. package/components/CalendarMonth/calendar-month.css +4 -0
  20. package/components/CalendarMonth/calendar-month.scss +2 -0
  21. package/components/Card/card.css +4 -1
  22. package/components/Card/card.scss +3 -1
  23. package/components/ClipboardCopy/clipboard-copy.css +3 -0
  24. package/components/ClipboardCopy/clipboard-copy.scss +2 -0
  25. package/components/DataList/data-list.css +3 -0
  26. package/components/DataList/data-list.scss +2 -0
  27. package/components/Drawer/drawer.css +45 -1
  28. package/components/Drawer/drawer.scss +43 -9
  29. package/components/DualListSelector/dual-list-selector.css +6 -2
  30. package/components/DualListSelector/dual-list-selector.scss +7 -2
  31. package/components/ExpandableSection/expandable-section.css +4 -0
  32. package/components/ExpandableSection/expandable-section.scss +2 -0
  33. package/components/Form/form.css +3 -0
  34. package/components/Form/form.scss +2 -0
  35. package/components/Icon/icon.scss +1 -1
  36. package/components/JumpLinks/jump-links.css +3 -0
  37. package/components/JumpLinks/jump-links.scss +2 -0
  38. package/components/Menu/menu.css +11 -0
  39. package/components/Menu/menu.scss +12 -2
  40. package/components/Nav/nav.css +20 -0
  41. package/components/Nav/nav.scss +22 -2
  42. package/components/NotificationDrawer/notification-drawer.css +4 -0
  43. package/components/NotificationDrawer/notification-drawer.scss +2 -0
  44. package/components/Page/page.css +4 -0
  45. package/components/Page/page.scss +6 -1
  46. package/components/Pagination/pagination.css +1 -1
  47. package/components/Pagination/pagination.scss +1 -1
  48. package/components/Popover/popover.css +62 -33
  49. package/components/Popover/popover.scss +88 -71
  50. package/components/Progress/progress.css +6 -4
  51. package/components/Progress/progress.scss +9 -4
  52. package/components/Skeleton/skeleton.css +4 -0
  53. package/components/Skeleton/skeleton.scss +2 -0
  54. package/components/Slider/slider.css +30 -6
  55. package/components/Slider/slider.scss +50 -19
  56. package/components/Switch/switch.css +5 -1
  57. package/components/Switch/switch.scss +5 -1
  58. package/components/Table/table-scrollable.css +2 -2
  59. package/components/Table/table-scrollable.scss +4 -2
  60. package/components/Table/table-tree-view.css +5 -1
  61. package/components/Table/table-tree-view.scss +7 -2
  62. package/components/Table/table.css +4 -0
  63. package/components/Table/table.scss +2 -0
  64. package/components/Tabs/tabs.css +10 -0
  65. package/components/Tabs/tabs.scss +8 -0
  66. package/components/Toolbar/toolbar.scss +2 -0
  67. package/components/Tooltip/tooltip.css +55 -26
  68. package/components/Tooltip/tooltip.scss +71 -54
  69. package/components/TreeView/tree-view.css +6 -0
  70. package/components/TreeView/tree-view.scss +10 -3
  71. package/components/Truncate/truncate.css +9 -0
  72. package/components/Truncate/truncate.scss +16 -3
  73. package/components/Wizard/wizard.css +6 -3
  74. package/components/Wizard/wizard.scss +8 -3
  75. package/docs/components/Button/examples/Button.md +15 -3
  76. package/docs/components/Card/examples/Card.md +15 -15
  77. package/docs/components/Check/examples/Check.md +71 -59
  78. package/docs/components/ClipboardCopy/examples/ClipboardCopy.md +106 -0
  79. package/docs/components/CodeEditor/examples/CodeEditor.md +3 -3
  80. package/docs/components/DualListSelector/examples/DualListSelector.md +64 -16
  81. package/docs/components/LogViewer/examples/LogViewer.md +120 -30
  82. package/docs/components/Menu/examples/Menu.css +8 -0
  83. package/docs/components/Menu/examples/Menu.md +90 -73
  84. package/docs/components/MenuToggle/examples/MenuToggle.md +60 -39
  85. package/docs/components/ModalBox/examples/ModalBox.css +3 -8
  86. package/docs/components/Nav/examples/Navigation.css +3 -26
  87. package/docs/components/Nav/examples/Navigation.md +99 -0
  88. package/docs/components/OptionsMenu/deprecated/options-menu.md +12 -3
  89. package/docs/components/Popover/examples/Popover.css +4 -9
  90. package/docs/components/Radio/examples/Radio.md +63 -55
  91. package/docs/components/Select/deprecated/Select.md +184 -177
  92. package/docs/components/Table/examples/Table.md +2 -2
  93. package/docs/components/Toolbar/examples/Toolbar.md +525 -431
  94. package/docs/components/Tooltip/examples/Tooltip.css +4 -0
  95. package/docs/components/Tooltip/examples/Tooltip.md +3 -1
  96. package/docs/components/Truncate/examples/Truncate.md +2 -2
  97. package/docs/demos/Card/examples/Card.md +23 -7
  98. package/docs/demos/CardView/examples/CardView.md +24 -20
  99. package/docs/demos/DataList/examples/DataList.md +8 -2
  100. package/docs/demos/PrimaryDetail/examples/PrimaryDetail.md +160 -124
  101. package/docs/demos/Skeleton/examples/Skeleton.md +7 -35
  102. package/docs/demos/Table/examples/Table.md +336 -252
  103. package/docs/demos/Tabs/examples/Tabs.md +28 -21
  104. package/docs/demos/Toolbar/examples/Toolbar.css +5 -0
  105. package/docs/demos/Toolbar/examples/Toolbar.md +44 -44
  106. package/package.json +6 -5
  107. package/patternfly-base-no-globals-theme-dark-unversioned.css +9 -12
  108. package/patternfly-base-no-globals.css +9 -12
  109. package/patternfly-base-theme-dark-unversioned.css +9 -12
  110. package/patternfly-base.css +9 -12
  111. package/patternfly-no-globals.css +356 -104
  112. package/patternfly-theme-dark-unversioned.css +356 -104
  113. package/patternfly.css +356 -104
  114. package/patternfly.min.css +1 -1
  115. package/patternfly.min.css.map +1 -1
  116. package/sass-utilities/functions.scss +6 -0
  117. package/sass-utilities/mixins.scss +55 -20
  118. package/sass-utilities/themes/dark/mixins.scss +3 -1
@@ -115,3 +115,9 @@
115
115
 
116
116
  @return $new-map;
117
117
  }
118
+
119
+ // Returns a calc() with the inverse of a value used for RTL. Most commonly used as the inverse/negative of a value in a transform function (eg, translate(), rotate(), scale(), etc)
120
+ // Shouldn't be used on an existing LTR style as adding a calc() in an existing style could be breaking. Should used within an RTL selector, which is basically an opt-in.
121
+ @function pf-v5-calc-inverse($val, $multiplier: var(--#{$pf-global}--inverse--multiplier)) {
122
+ @return calc(#{$val} * #{$multiplier});
123
+ }
@@ -310,27 +310,62 @@
310
310
  }
311
311
  }
312
312
 
313
- // Applies custom styles to support RTL
314
- @mixin pf-v5-rtl($transform: null) {
315
- // resets property used to inverse transform values calc()s in RTL
316
- @if $transform == "transform-flip-revert" {
317
- --#{$pf-global}--rtl--transform--flip: 1;
318
- } @else {
319
- // establishes the selectors used to target RTL
320
- // remove .ws-dir-rtl before releasing RTL
321
- @at-root :where(.ws-dir-rtl, .#{$pf-prefix}m-dir-rtl, [dir="rtl"]) #{&} {
322
- // sets property used in calcs to inverse transform values
323
- @if $transform == "transform-flip" {
324
- --#{$pf-global}--rtl--transform--flip: -1;
325
- }
313
+ // RTL helpers
326
314
 
327
- // flips something horizontally/inline. relies upon scale/scale() not already being used for the element
328
- @if $transform == 'flip-inline' {
329
- scale: -1 1;
330
- }
315
+ // Used to create the RTL selector for RTL specific styles
331
316
 
332
- // any custom CSS to apply within the selectors that target RTL
333
- @content
334
- }
317
+ // @include pf-v5-rtl {
318
+ // background: red;
319
+ // }
320
+
321
+ // renders as
322
+
323
+ // [dir="rtl"] {
324
+ // background: red;
325
+ // }
326
+ @mixin pf-v5-rtl {
327
+ @at-root :where(.#{$pf-prefix}m-dir-rtl, [dir="rtl"]) #{&} {
328
+ @content;
335
329
  }
336
330
  }
331
+
332
+ // Used to create the LTR selector for LTR specific styles
333
+ @mixin pf-v5-ltr {
334
+ @at-root :where(.#{$pf-prefix}m-dir-ltr, [dir="ltr"]) #{&} {
335
+ @content;
336
+ }
337
+ }
338
+
339
+ // Creates a default/LTR declaration, and an RTL declaration.
340
+
341
+ // @include pf-v5-bidirectional-style(background, blue, red)
342
+
343
+ // renders as
344
+
345
+ // background: blue;
346
+ // [dir="rtl"] {
347
+ // background: red;
348
+ // }
349
+ @mixin pf-v5-bidirectional-style($prop, $ltr-val, $rtl-val) {
350
+ #{$prop}: #{$ltr-val};
351
+
352
+ @include pf-v5-rtl {
353
+ #{$prop}: #{$rtl-val};
354
+ }
355
+ }
356
+
357
+ // Mirrors/flips something horizontally/inline. Relies upon scale/scale() not already being used for the element. Can be extended to take arguments to use different methods other than scale().
358
+ @mixin pf-v5-mirror-inline {
359
+ scale: -1 1;
360
+ }
361
+
362
+ @mixin pf-v5-mirror-inline-on-rtl {
363
+ @include pf-v5-rtl {
364
+ @include pf-v5-mirror-inline;
365
+ }
366
+ }
367
+
368
+ // Declares a global inverse multiplier var used for returning the inverse of a number. Defined within blocks that reference the global var in calc() functions to conditionally return the default or inverse value of a number.
369
+ @mixin pf-v5-set-inverse($val: true) {
370
+ --#{$pf-global}--inverse--multiplier: #{if($val, -1, 1)};
371
+ }
@@ -1,5 +1,7 @@
1
1
  @mixin pf-v5-theme-dark--t-dark($color: "--#{$pf-global}--Color--100") {
2
- color: var(#{$color});
2
+ @if $color {
3
+ color: var(#{$color});
4
+ }
3
5
 
4
6
  @extend %pf-v5-theme-dark--t-dark;
5
7
  }