@patternfly/react-core 4.202.34 → 4.202.37

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 (44) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/esm/components/Brand/Brand.d.ts +23 -3
  3. package/dist/esm/components/Brand/Brand.d.ts.map +1 -1
  4. package/dist/esm/components/Brand/Brand.js +12 -2
  5. package/dist/esm/components/Brand/Brand.js.map +1 -1
  6. package/dist/esm/components/Tabs/Tabs.d.ts +2 -0
  7. package/dist/esm/components/Tabs/Tabs.d.ts.map +1 -1
  8. package/dist/esm/components/Tabs/Tabs.js +3 -2
  9. package/dist/esm/components/Tabs/Tabs.js.map +1 -1
  10. package/dist/js/components/Brand/Brand.d.ts +23 -3
  11. package/dist/js/components/Brand/Brand.d.ts.map +1 -1
  12. package/dist/js/components/Brand/Brand.js +12 -2
  13. package/dist/js/components/Brand/Brand.js.map +1 -1
  14. package/dist/js/components/Tabs/Tabs.d.ts +2 -0
  15. package/dist/js/components/Tabs/Tabs.d.ts.map +1 -1
  16. package/dist/js/components/Tabs/Tabs.js +3 -2
  17. package/dist/js/components/Tabs/Tabs.js.map +1 -1
  18. package/dist/umd/react-core.css +115 -35
  19. package/dist/umd/react-core.js +145 -123
  20. package/dist/umd/react-core.min.css +80 -0
  21. package/dist/umd/react-core.min.js +4 -4
  22. package/package.json +6 -6
  23. package/src/components/Brand/Brand.tsx +61 -8
  24. package/src/components/Brand/__tests__/Brand.test.tsx +15 -4
  25. package/src/components/Brand/__tests__/__snapshots__/Brand.test.tsx.snap +1 -1
  26. package/src/components/Brand/examples/Brand.md +13 -0
  27. package/src/components/Brand/examples/BrandResponsive.tsx +18 -0
  28. package/src/components/Brand/examples/pf-c-brand--logo-base.jpg +0 -0
  29. package/src/components/Brand/examples/pf-c-brand--logo-on-lg.svg +32 -0
  30. package/src/components/Brand/examples/pf-c-brand--logo-on-md.svg +42 -0
  31. package/src/components/Brand/examples/pf-c-brand--logo-on-sm.svg +17 -0
  32. package/src/components/Brand/examples/pf-c-brand--logo-on-xl.svg +39 -0
  33. package/src/components/Brand/examples/pf-c-brand--logo.svg +10 -0
  34. package/src/components/Tabs/Tabs.tsx +5 -0
  35. package/src/components/Tabs/__tests__/Tabs.test.tsx +17 -0
  36. package/src/components/Tabs/__tests__/__snapshots__/Tabs.test.tsx.snap +153 -0
  37. package/src/components/TextInputGroup/__tests__/TextInputGroup.test.tsx +47 -146
  38. package/src/components/TextInputGroup/__tests__/TextInputGroupMain.test.tsx +302 -0
  39. package/src/components/TextInputGroup/__tests__/TextInputGroupUtilities.test.tsx +34 -0
  40. package/src/components/TextInputGroup/__tests__/__snapshots__/TextInputGroup.test.tsx.snap +2 -203
  41. package/src/components/TextInputGroup/__tests__/__snapshots__/TextInputGroupMain.test.tsx.snap +21 -0
  42. package/src/components/TextInputGroup/__tests__/__snapshots__/TextInputGroupUtilities.test.tsx.snap +13 -0
  43. package/src/demos/Tabs.md +5 -0
  44. package/src/demos/examples/Tabs/TabsAndTablesAutoWidthTabs.tsx +442 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@patternfly/react-core",
3
- "version": "4.202.34",
3
+ "version": "4.202.37",
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,16 +34,16 @@
34
34
  "generate": "node scripts/copyStyles.js"
35
35
  },
36
36
  "dependencies": {
37
- "@patternfly/react-icons": "^4.53.34",
38
- "@patternfly/react-styles": "^4.52.34",
39
- "@patternfly/react-tokens": "^4.54.34",
37
+ "@patternfly/react-icons": "^4.53.37",
38
+ "@patternfly/react-styles": "^4.52.37",
39
+ "@patternfly/react-tokens": "^4.54.37",
40
40
  "focus-trap": "6.2.2",
41
41
  "react-dropzone": "9.0.0",
42
42
  "tippy.js": "5.1.2",
43
43
  "tslib": "^2.0.0"
44
44
  },
45
45
  "devDependencies": {
46
- "@patternfly/patternfly": "4.186.1",
46
+ "@patternfly/patternfly": "4.187.0",
47
47
  "@rollup/plugin-commonjs": "^21.0.0",
48
48
  "@rollup/plugin-node-resolve": "^13.0.0",
49
49
  "@rollup/plugin-replace": "^3.0.0",
@@ -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": "de4c7f23a825d7acacd504503250374f7bb5b302"
63
+ "gitHead": "0a79929febeda57b9988658d258f10f39c47bde4"
64
64
  }
@@ -1,18 +1,71 @@
1
1
  import * as React from 'react';
2
2
  import { css } from '@patternfly/react-styles';
3
-
3
+ import styles from '@patternfly/react-styles/css/components/Brand/brand';
4
+ import { setBreakpointCssVars } from '../../helpers';
4
5
  export interface BrandProps
5
6
  extends React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement> {
6
- /** Additional classes added to the Brand. */
7
+ /** Transforms the Brand into a <picture> element from an <img> element. Container for <source> child elements. */
8
+ children?: React.ReactNode;
9
+ /** Additional classes added to the either type of Brand. */
7
10
  className?: string;
8
- /** Attribute that specifies the URL of the image for the Brand. */
11
+ /** Attribute that specifies the URL of a <img> Brand. For a <picture> Brand this specifies the fallback <img> URL. */
9
12
  src?: string;
10
- /** Attribute that specifies the alt text of the image for the Brand. */
13
+ /** Attribute that specifies the alt text of a <img> Brand. For a <picture> Brand this specifies the fallback <img> alt text. */
11
14
  alt: string;
15
+ /** Widths at various breakpoints for a <picture> Brand. */
16
+ widths?: {
17
+ default?: string;
18
+ sm?: string;
19
+ md?: string;
20
+ lg?: string;
21
+ xl?: string;
22
+ '2xl'?: string;
23
+ };
24
+ /** Heights at various breakpoints for a <picture> Brand. */
25
+ heights?: {
26
+ default?: string;
27
+ sm?: string;
28
+ md?: string;
29
+ lg?: string;
30
+ xl?: string;
31
+ '2xl'?: string;
32
+ };
12
33
  }
13
34
 
14
- export const Brand: React.FunctionComponent<BrandProps> = ({ className = '', src = '', alt, ...props }: BrandProps) => (
15
- /** the brand component currently contains no styling the 'pf-c-brand' string will be used for the className */
16
- <img {...props} className={css('pf-c-brand', className)} src={src} alt={alt} />
17
- );
35
+ export const Brand: React.FunctionComponent<BrandProps> = ({
36
+ className = '',
37
+ src = '',
38
+ alt,
39
+ children,
40
+ widths,
41
+ heights,
42
+ style,
43
+ ...props
44
+ }: BrandProps) => {
45
+ if (children !== undefined && widths !== undefined) {
46
+ style = {
47
+ ...style,
48
+ ...setBreakpointCssVars(widths, '--pf-c-brand--Width')
49
+ };
50
+ }
51
+
52
+ if (children !== undefined && heights !== undefined) {
53
+ style = {
54
+ ...style,
55
+ ...setBreakpointCssVars(heights, '--pf-c-brand--Height')
56
+ };
57
+ }
58
+
59
+ return (
60
+ /** the brand component currently contains no styling the 'pf-c-brand' string will be used for the className */
61
+ children !== undefined ? (
62
+ <picture className={css(styles.brand, styles.modifiers.picture, className)} style={style} {...props}>
63
+ {children}
64
+ <img src={src} alt={alt} />
65
+ </picture>
66
+ ) : (
67
+ <img {...props} className={css(styles.brand, className)} src={src} alt={alt} />
68
+ )
69
+ );
70
+ };
18
71
  Brand.displayName = 'Brand';
@@ -1,8 +1,19 @@
1
1
  import * as React from 'react';
2
- import { render } from '@testing-library/react';
2
+ import { render, screen } from '@testing-library/react';
3
3
  import { Brand } from '../Brand';
4
+ import '@testing-library/jest-dom';
4
5
 
5
- test('simple brand', () => {
6
- const view = render(<Brand alt="brand" />);
7
- expect(view.container).toMatchSnapshot();
6
+ describe('Brand', () => {
7
+ test('simple brand', () => {
8
+ const view = render(<Brand alt="brand" />);
9
+ expect(view.container).toMatchSnapshot();
10
+ });
11
+ test('passing children creates picture brand', () => {
12
+ const view = render(
13
+ <Brand>
14
+ <div>test</div>
15
+ </Brand>
16
+ );
17
+ expect(screen.getByText('test')).toBeInTheDocument();
18
+ });
8
19
  });
@@ -1,6 +1,6 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
- exports[`simple brand 1`] = `
3
+ exports[`Brand simple brand 1`] = `
4
4
  <div>
5
5
  <img
6
6
  alt="brand"
@@ -6,6 +6,12 @@ propComponents: ['Brand']
6
6
  ---
7
7
 
8
8
  import pfLogo from './pfLogo.svg';
9
+ import logoXl from './pf-c-brand--logo-on-xl.svg';
10
+ import logoLg from './pf-c-brand--logo-on-lg.svg';
11
+ import logoMd from './pf-c-brand--logo-on-md.svg';
12
+ import logoSm from './pf-c-brand--logo-on-sm.svg';
13
+ import logo from './pf-c-brand--logo.svg';
14
+ import logoBase from './pf-c-brand--logo-base.jpg';
9
15
 
10
16
  ## Examples
11
17
 
@@ -13,3 +19,10 @@ import pfLogo from './pfLogo.svg';
13
19
 
14
20
  ```ts file="./BrandBasic.tsx"
15
21
  ```
22
+
23
+ ### Responsive
24
+
25
+ Passing `<source>` elements as children to `Brand` will change the component from an `<img>` to a `<picture>` element. In this form, breakpoint modifiers for width and height may be passed to `Brand`. The `src` and `alt` properties should still be passed to populate the fallback `img` of the brand.
26
+
27
+ ```ts file="./BrandResponsive.tsx"
28
+ ```
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+ import { Brand } from '@patternfly/react-core';
3
+ import logoXl from './pf-c-brand--logo-on-xl.svg';
4
+ import logoLg from './pf-c-brand--logo-on-lg.svg';
5
+ import logoMd from './pf-c-brand--logo-on-md.svg';
6
+ import logoSm from './pf-c-brand--logo-on-sm.svg';
7
+ import logo from './pf-c-brand--logo.svg';
8
+ import logoBase from './pf-c-brand--logo-base.jpg';
9
+
10
+ export const BrandBasic: React.FunctionComponent = () => (
11
+ <Brand src={logoBase} alt="Fallback patternfly default logo" widths={{ default: '40px', sm: '60px', md: '220px' }}>
12
+ <source media="(min-width: 1200px)" srcSet={logoXl} />
13
+ <source media="(min-width: 992px)" srcSet={logoLg} />
14
+ <source media="(min-width: 768px)" srcSet={logoMd} />
15
+ <source media="(min-width: 576px)" srcSet={logoSm} />
16
+ <source srcSet={logo} />
17
+ </Brand>
18
+ );
@@ -0,0 +1,32 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 24.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
4
+ viewBox="0 0 220 40" style="enable-background:new 0 0 220 40;" xml:space="preserve">
5
+ <g>
6
+ <path d="M56.4,25.7V14.4h4.8c0.7,0,1.3,0.1,1.8,0.3c0.5,0.2,0.9,0.5,1.2,0.8c0.3,0.3,0.5,0.7,0.7,1.1c0.1,0.4,0.2,0.9,0.2,1.3
7
+ c0,0.3,0,0.5-0.1,0.8c-0.1,0.3-0.2,0.6-0.3,0.8c-0.1,0.3-0.3,0.5-0.5,0.7c-0.2,0.2-0.5,0.4-0.7,0.6c-0.3,0.2-0.6,0.3-1,0.4
8
+ c-0.4,0.1-0.8,0.1-1.2,0.1h-2.7v4.1L56.4,25.7L56.4,25.7z M61.3,19.5c0.3,0,0.5,0,0.7-0.1c0.2-0.1,0.3-0.2,0.5-0.3
9
+ c0.1-0.1,0.2-0.3,0.3-0.5c0.1-0.2,0.1-0.4,0.1-0.5c0-0.2,0-0.3-0.1-0.5c0-0.2-0.1-0.3-0.2-0.5c-0.1-0.1-0.3-0.3-0.5-0.4
10
+ c-0.2-0.1-0.4-0.1-0.7-0.1h-2.8v3L61.3,19.5L61.3,19.5z"/>
11
+ <path d="M80.1,25.7l-0.9-2.3h-4.4L74,25.7h-2.3L76,14.4h2.1l4.3,11.3H80.1z M77.4,18.4c-0.1-0.1-0.1-0.3-0.2-0.5
12
+ c-0.1-0.2-0.1-0.4-0.2-0.5c0,0.2-0.1,0.3-0.2,0.5c-0.1,0.2-0.1,0.4-0.2,0.5l-1.1,2.9h2.9L77.4,18.4z"/>
13
+ <path d="M94.7,16.5v9.2h-2.2v-9.2h-3.2v-2.1h8.6v2.1H94.7z"/>
14
+ <path d="M111.6,16.5v9.2h-2.2v-9.2h-3.2v-2.1h8.6v2.1H111.6z"/>
15
+ <path d="M123.8,25.7V14.4h7.7v2.1h-5.5v2.4h3.2v2.1h-3.2v2.7h5.9v2.1L123.8,25.7L123.8,25.7z"/>
16
+ <path d="M141,25.7V14.4h5.2c0.7,0,1.3,0.1,1.8,0.3c0.5,0.2,0.9,0.5,1.2,0.8c0.3,0.3,0.5,0.7,0.6,1.1c0.1,0.4,0.2,0.9,0.2,1.3
17
+ c0,0.3,0,0.6-0.1,1c-0.1,0.3-0.2,0.6-0.4,0.9c-0.2,0.3-0.4,0.6-0.7,0.8c-0.3,0.2-0.6,0.4-1,0.6l2.2,4.5h-2.4l-2.1-4.2h-2.3v4.2H141
18
+ z M146.2,19.4c0.3,0,0.5,0,0.7-0.1c0.2-0.1,0.3-0.2,0.5-0.3c0.1-0.1,0.2-0.3,0.2-0.5c0.1-0.2,0.1-0.4,0.1-0.6c0-0.2,0-0.4-0.1-0.5
19
+ c0-0.2-0.1-0.3-0.2-0.5c-0.1-0.1-0.3-0.2-0.5-0.3s-0.4-0.1-0.7-0.1h-3.1v2.9L146.2,19.4L146.2,19.4L146.2,19.4z"/>
20
+ <path d="M166.3,25.7l-4.5-6.6c-0.1-0.1-0.2-0.2-0.2-0.4c-0.1-0.2-0.2-0.3-0.2-0.4c0,0.1,0,0.3,0,0.4c0,0.2,0,0.3,0,0.4v6.6h-2.2
21
+ V14.4h2l4.4,6.5c0.1,0.1,0.1,0.2,0.2,0.4c0.1,0.2,0.2,0.3,0.2,0.5c0-0.1,0-0.3,0-0.5c0-0.2,0-0.3,0-0.4v-6.5h2.2v11.3L166.3,25.7
22
+ L166.3,25.7z"/>
23
+ <path d="M178,25.7V14.4h7.6v2.1h-5.4v2.4h3.4v2.1h-3.4v4.8L178,25.7L178,25.7z"/>
24
+ <path d="M194.4,25.7V14.4h2.2v9.2h5.4v2.1H194.4z"/>
25
+ <path d="M212.4,25.7v-4.4l-4.2-6.9h2.5l2.8,4.6l2.8-4.6h2.5l-4.2,6.9v4.4H212.4z"/>
26
+ </g>
27
+ <path d="M41.9,20.7L21,0.2L0,20.7l8.4,11.8l6.4-1.5l6.3,8.8l6.3-8.8l6.3,1.4L41.9,20.7z M20.1,4l-2.7,25.1L12.2,22L20.1,4z
28
+ M11.6,21.2l-3.2-4.4L19.5,3.3L11.6,21.2z M16.5,29.3L16.5,29.3l0.3,0.4l-1.7,0.4l-4-5.6l0.7-1.6L16.5,29.3z M21,3.7l2.7,26.6L21,34
29
+ l-2.7-3.7L21,3.7z M25.4,29.3l4.8-6.5l0.7,1.7l-4,5.6l-1.8-0.4L25.4,29.3L25.4,29.3z M24.6,29.1L21.9,4l7.9,18L24.6,29.1z M22.5,3.3
30
+ l11,13.5l-3.2,4.3L22.5,3.3z M8.7,31.6L1.1,20.8L16,6.2L7.3,16.8l3.9,5.3l-1.1,2.5l4.1,5.7L8.7,31.6z M21,38.5l-5.4-7.6l1.7-0.4
31
+ l3.6,5l3.6-5l1.8,0.4L21,38.5z M27.8,30.4l4.1-5.7l-1.1-2.6l3.8-5.2L25.9,6.2l14.9,14.6l-7.6,10.8L27.8,30.4z"/>
32
+ </svg>
@@ -0,0 +1,42 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 24.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
4
+ viewBox="0 0 232.3 105.8" style="enable-background:new 0 0 232.3 105.8;" xml:space="preserve">
5
+ <style type="text/css">
6
+ .st0{fill:url(#SVGID_1_);}
7
+ .st1{fill:#030303;}
8
+ </style>
9
+ <linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="116.0373" y1="-7.7376" x2="116.0373" y2="65.5427" gradientTransform="matrix(1 0 0 1 0 10)">
10
+ <stop offset="0" style="stop-color:#60EFFF"/>
11
+ <stop offset="1" style="stop-color:#1F89C7"/>
12
+ </linearGradient>
13
+ <path class="st0" d="M158,40.8L116-0.1l-42,40.9l16.9,23.7l12.9-2.9L116,79.2l12.6-17.6l12.6,2.9L158,40.8z M114.2,7.4l-5.4,50.2
14
+ L98.5,43.3L114.2,7.4z M97.4,41.9l-6.5-8.6l22.2-26.9L97.4,41.9z M107.1,58L107.1,58l0.7,0.7l-3.6,0.7l-7.9-11.1l1.4-3.2L107.1,58z
15
+ M116,6.7l5.4,53.1l-5.4,7.5l-5.4-7.5L116,6.7z M125,58l9.7-12.9l1.4,3.2l-7.9,11.1l-3.6-0.7L125,58L125,58z M123.2,57.7l-5.4-50.2
16
+ l15.8,35.9L123.2,57.7z M119.3,6l21.9,27.3l-6.5,8.6L119.3,6z M91.6,62.7L76.6,41.2l29.8-29.1L89.1,33.3L97,44l-2.5,4.7l8.3,11.5
17
+ L91.6,62.7z M116,76.3l-10.8-15.1l3.6-0.7l7.2,10l7.2-10l3.6,0.7L116,76.3z M129.7,60.2l8.3-11.5l-2.2-5l7.5-10.4l-17.2-21.2
18
+ l29.8,29.1l-15.1,21.5L129.7,60.2z"/>
19
+ <g>
20
+ <path class="st1" d="M1.1,104.7v-16H8c1,0,1.9,0.1,2.5,0.5s1.3,0.7,1.7,1.2c0.5,0.5,0.7,1,0.9,1.6c0.2,0.6,0.3,1.2,0.3,1.8
21
+ c0,0.4,0,0.8-0.1,1.2c-0.1,0.4-0.2,0.8-0.4,1.2c-0.2,0.4-0.4,0.7-0.7,1c-0.3,0.3-0.6,0.6-1,0.9c-0.4,0.2-0.9,0.5-1.4,0.6
22
+ c-0.5,0.1-1.1,0.2-1.8,0.2H4.2v5.9L1.1,104.7L1.1,104.7z M8.1,95.9c0.4,0,0.7,0,1-0.2c0.3-0.1,0.5-0.3,0.6-0.5
23
+ c0.2-0.2,0.3-0.4,0.4-0.7c0.1-0.3,0.1-0.5,0.1-0.8c0-0.2,0-0.5-0.1-0.7c0-0.2-0.2-0.5-0.3-0.7c-0.2-0.2-0.4-0.4-0.6-0.5
24
+ c-0.3-0.1-0.6-0.2-1-0.2H4.3v4.3L8.1,95.9L8.1,95.9z"/>
25
+ <path class="st1" d="M34.8,104.7l-1.2-3.3h-6.1l-1.2,3.3h-3.3l6.1-16h3l6.1,16H34.8z M31,94.5c-0.1-0.2-0.2-0.4-0.3-0.7
26
+ c-0.1-0.3-0.2-0.5-0.2-0.8c0,0.2-0.1,0.5-0.2,0.8c-0.1,0.3-0.2,0.5-0.3,0.7l-1.6,4.2h4.2L31,94.5z"/>
27
+ <path class="st1" d="M55.4,91.7v13h-3.1v-13h-4.6v-3H60v3H55.4z"/>
28
+ <path class="st1" d="M79.3,91.7v13h-3.1v-13h-4.6v-3h12.2v3H79.3z"/>
29
+ <path class="st1" d="M96.7,104.7v-16h10.9v2.9h-7.8V95h4.6V98h-4.6v3.8h8.3v2.9L96.7,104.7L96.7,104.7z"/>
30
+ <path class="st1" d="M121,104.7v-16h7.4c1,0,1.9,0.1,2.5,0.4c0.7,0.3,1.2,0.6,1.6,1.1c0.4,0.5,0.7,1,0.9,1.6
31
+ c0.2,0.6,0.3,1.2,0.3,1.9c0,0.5,0,0.9-0.2,1.4c-0.1,0.5-0.3,0.9-0.6,1.3c-0.3,0.4-0.6,0.8-0.9,1.1c-0.4,0.3-0.8,0.6-1.4,0.8
32
+ l3.1,6.4h-3.5l-3-6h-3.2v6C124.1,104.7,121,104.7,121,104.7z M128.5,95.9c0.4,0,0.7,0,1-0.2c0.3-0.1,0.5-0.3,0.6-0.5
33
+ c0.2-0.2,0.3-0.4,0.4-0.7c0.1-0.3,0.1-0.5,0.1-0.8c0-0.3,0-0.5-0.1-0.8c0-0.3-0.2-0.5-0.3-0.7c-0.1-0.2-0.4-0.4-0.6-0.5
34
+ c-0.3-0.1-0.6-0.2-1-0.2h-4.4v4.2C124.1,95.9,128.5,95.9,128.5,95.9z"/>
35
+ <path class="st1" d="M157,104.7l-6.3-9.3c-0.1-0.1-0.2-0.4-0.4-0.6c-0.1-0.2-0.2-0.5-0.3-0.6c0,0.2,0,0.4,0,0.6c0,0.2,0,0.5,0,0.6
36
+ v9.3h-3.1V88.8h2.9L156,98c0.1,0.1,0.2,0.3,0.3,0.5c0.1,0.2,0.2,0.5,0.3,0.6c0-0.2,0-0.5,0-0.6c0-0.2,0-0.4,0-0.5v-9.2h3.1v16
37
+ L157,104.7L157,104.7z"/>
38
+ <path class="st1" d="M173.5,104.7v-16h10.7v2.9h-7.6V95h4.9V98h-4.8v6.8L173.5,104.7L173.5,104.7z"/>
39
+ <path class="st1" d="M196.7,104.7v-16h3.1v13h7.7v3L196.7,104.7L196.7,104.7z"/>
40
+ <path class="st1" d="M222.3,104.7v-6.2l-5.9-9.8h3.5l3.9,6.6l3.9-6.6h3.5l-5.9,9.8v6.2L222.3,104.7L222.3,104.7z"/>
41
+ </g>
42
+ </svg>
@@ -0,0 +1,17 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 24.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
4
+ viewBox="0 0 24 24" style="enable-background:new 0 0 24 24;" xml:space="preserve">
5
+ <style type="text/css">
6
+ .st0{fill:url(#SVGID_1_);}
7
+ </style>
8
+ <linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="12" y1="24.491" x2="12" y2="4.0278" gradientTransform="matrix(1 0 0 -1 0 26)">
9
+ <stop offset="0" style="stop-color:#60EFFF"/>
10
+ <stop offset="1" style="stop-color:#1F89C7"/>
11
+ </linearGradient>
12
+ <path class="st0" d="M23.7,12.3L12,0.8L0.3,12.3L5,18.9l3.6-0.8L12,23l3.5-4.9l3.5,0.8L23.7,12.3z M11.5,3L10,17L7.1,13L11.5,3z
13
+ M6.8,12.6L5,10.1l6.2-7.5L6.8,12.6z M9.5,17.1L9.5,17.1l0.2,0.2l-1,0.2l-2.2-3.1l0.4-0.9L9.5,17.1z M12,2.8l1.5,14.9L12,19.7
14
+ l-1.5-2.1L12,2.8z M14.5,17.1l2.7-3.6l0.4,0.9l-2.2,3.1l-1-0.2L14.5,17.1L14.5,17.1z M14,17l-1.5-14l4.4,10L14,17z M12.9,2.6
15
+ l6.2,7.5l-1.8,2.4L12.9,2.6z M5.2,18.4l-4.3-6l8.3-8.1l-4.8,5.9l2.2,3L6,14.5l2.3,3.2L5.2,18.4z M12,22.2L9,18l1-0.2l2,2.8l2-2.8
16
+ l1,0.2L12,22.2z M15.8,17.7l2.3-3.2L17.5,13l2.1-2.9l-4.8-5.9l8.3,8.1l-4.3,6L15.8,17.7z"/>
17
+ </svg>
@@ -0,0 +1,39 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 24.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
4
+ viewBox="0 0 220 40" style="enable-background:new 0 0 220 40;" xml:space="preserve">
5
+ <style type="text/css">
6
+ .st0{fill:url(#SVGID_1_);}
7
+ </style>
8
+ <g>
9
+ <path d="M56.4,25.7V14.4h4.8c0.7,0,1.3,0.1,1.8,0.3c0.5,0.2,0.9,0.5,1.2,0.8c0.3,0.3,0.5,0.7,0.7,1.1c0.1,0.4,0.2,0.9,0.2,1.3
10
+ c0,0.3,0,0.5-0.1,0.8c-0.1,0.3-0.2,0.6-0.3,0.8c-0.1,0.3-0.3,0.5-0.5,0.7c-0.2,0.2-0.5,0.4-0.7,0.6c-0.3,0.2-0.6,0.3-1,0.4
11
+ c-0.4,0.1-0.8,0.1-1.2,0.1h-2.7v4.1L56.4,25.7L56.4,25.7z M61.3,19.5c0.3,0,0.5,0,0.7-0.1c0.2-0.1,0.3-0.2,0.5-0.3
12
+ c0.1-0.1,0.2-0.3,0.3-0.5c0.1-0.2,0.1-0.4,0.1-0.5c0-0.2,0-0.3-0.1-0.5c0-0.2-0.1-0.3-0.2-0.5c-0.1-0.1-0.3-0.3-0.5-0.4
13
+ c-0.2-0.1-0.4-0.1-0.7-0.1h-2.8v3L61.3,19.5L61.3,19.5z"/>
14
+ <path d="M80.1,25.7l-0.9-2.3h-4.4L74,25.7h-2.3L76,14.4h2.1l4.3,11.3H80.1z M77.4,18.4c-0.1-0.1-0.1-0.3-0.2-0.5
15
+ c-0.1-0.2-0.1-0.4-0.2-0.5c0,0.2-0.1,0.3-0.2,0.5c-0.1,0.2-0.1,0.4-0.2,0.5l-1.1,2.9h2.9L77.4,18.4z"/>
16
+ <path d="M94.7,16.5v9.2h-2.2v-9.2h-3.2v-2.1h8.6v2.1H94.7z"/>
17
+ <path d="M111.6,16.5v9.2h-2.2v-9.2h-3.2v-2.1h8.6v2.1H111.6z"/>
18
+ <path d="M123.8,25.7V14.4h7.7v2.1h-5.5v2.4h3.2v2.1h-3.2v2.7h5.9v2.1L123.8,25.7L123.8,25.7z"/>
19
+ <path d="M141,25.7V14.4h5.2c0.7,0,1.3,0.1,1.8,0.3c0.5,0.2,0.9,0.5,1.2,0.8c0.3,0.3,0.5,0.7,0.6,1.1c0.1,0.4,0.2,0.9,0.2,1.3
20
+ c0,0.3,0,0.6-0.1,1c-0.1,0.3-0.2,0.6-0.4,0.9c-0.2,0.3-0.4,0.6-0.7,0.8c-0.3,0.2-0.6,0.4-1,0.6l2.2,4.5h-2.4l-2.1-4.2h-2.3v4.2H141
21
+ z M146.2,19.4c0.3,0,0.5,0,0.7-0.1c0.2-0.1,0.3-0.2,0.5-0.3c0.1-0.1,0.2-0.3,0.2-0.5c0.1-0.2,0.1-0.4,0.1-0.6c0-0.2,0-0.4-0.1-0.5
22
+ c0-0.2-0.1-0.3-0.2-0.5c-0.1-0.1-0.3-0.2-0.5-0.3s-0.4-0.1-0.7-0.1h-3.1v2.9L146.2,19.4L146.2,19.4L146.2,19.4z"/>
23
+ <path d="M166.3,25.7l-4.5-6.6c-0.1-0.1-0.2-0.2-0.2-0.4c-0.1-0.2-0.2-0.3-0.2-0.4c0,0.1,0,0.3,0,0.4c0,0.2,0,0.3,0,0.4v6.6h-2.2
24
+ V14.4h2l4.4,6.5c0.1,0.1,0.1,0.2,0.2,0.4c0.1,0.2,0.2,0.3,0.2,0.5c0-0.1,0-0.3,0-0.5c0-0.2,0-0.3,0-0.4v-6.5h2.2v11.3L166.3,25.7
25
+ L166.3,25.7z"/>
26
+ <path d="M178,25.7V14.4h7.6v2.1h-5.4v2.4h3.4v2.1h-3.4v4.8L178,25.7L178,25.7z"/>
27
+ <path d="M194.4,25.7V14.4h2.2v9.2h5.4v2.1H194.4z"/>
28
+ <path d="M212.4,25.7v-4.4l-4.2-6.9h2.5l2.8,4.6l2.8-4.6h2.5l-4.2,6.9v4.4H212.4z"/>
29
+ </g>
30
+ <linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="20.9705" y1="40.6069" x2="20.9705" y2="3.9407" gradientTransform="matrix(1 0 0 -1 0 42)">
31
+ <stop offset="0" style="stop-color:#60EFFF"/>
32
+ <stop offset="1" style="stop-color:#1F89C7"/>
33
+ </linearGradient>
34
+ <path class="st0" d="M41.9,20.7L21,0.2L0,20.7l8.4,11.8l6.4-1.5l6.3,8.8l6.3-8.8l6.3,1.4L41.9,20.7z M20.1,4l-2.7,25.1L12.2,22
35
+ L20.1,4z M11.6,21.2l-3.2-4.4L19.5,3.3L11.6,21.2z M16.5,29.3L16.5,29.3l0.3,0.4l-1.7,0.4l-4-5.6l0.7-1.6L16.5,29.3z M21,3.7
36
+ l2.7,26.6L21,34l-2.7-3.7L21,3.7z M25.4,29.3l4.8-6.5l0.7,1.7l-4,5.6l-1.8-0.4L25.4,29.3L25.4,29.3z M24.6,29.1L21.9,4l7.9,18
37
+ L24.6,29.1z M22.5,3.3l11,13.5l-3.2,4.3L22.5,3.3z M8.7,31.6L1.1,20.8L16,6.2L7.3,16.8l3.9,5.3l-1.1,2.5l4.1,5.7L8.7,31.6z M21,38.5
38
+ l-5.4-7.6l1.7-0.4l3.6,5l3.6-5l1.8,0.4L21,38.5z M27.8,30.4l4.1-5.7l-1.1-2.6l3.8-5.2L25.9,6.2l14.9,14.6l-7.6,10.8L27.8,30.4z"/>
39
+ </svg>
@@ -0,0 +1,10 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 24.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
4
+ viewBox="0 0 48.4 46" style="enable-background:new 0 0 48.4 46;" xml:space="preserve">
5
+ <path d="M48.4,23.8L24.2,0.2L0,23.8l9.6,13.7l7.4-1.7L24.2,46l7.2-10.2l7.3,1.7L48.4,23.8z M23.2,4.6l-3.1,29l-6-8.2L23.2,4.6z
6
+ M13.4,24.5l-3.7-5.1L22.5,3.8L13.4,24.5z M19.1,33.8L19.1,33.8l0.3,0.5l-2,0.5l-4.6-6.5l0.8-1.9L19.1,33.8z M24.2,4.2l3.1,30.7
7
+ l-3.2,4.3L21,34.9L24.2,4.2z M29.3,33.8l5.5-7.5l0.9,2l-4.6,6.5L29,34.3L29.3,33.8L29.3,33.8z M28.3,33.5l-3.1-29l9.1,20.7
8
+ L28.3,33.5z M26,3.8l12.7,15.6l-3.7,5L26,3.8z M10.1,36.4L1.3,24L18.5,7.1l-10,12.2l4.5,6.1l-1.3,2.9l4.7,6.6L10.1,36.4z M24.2,44.3
9
+ L18,35.6l2-0.5l4.2,5.7l4.2-5.7l2.1,0.5L24.2,44.3z M32.1,35l4.7-6.6l-1.3-3l4.4-6l-10-12.2L47.1,24l-8.8,12.5L32.1,35z"/>
10
+ </svg>
@@ -41,6 +41,8 @@ export interface TabsProps extends Omit<React.HTMLProps<HTMLElement | HTMLDivEle
41
41
  isBox?: boolean;
42
42
  /** Enables vertical tab styling */
43
43
  isVertical?: boolean;
44
+ /** Enables no border bottom tab styling */
45
+ hasBorderBottom?: boolean;
44
46
  /** Aria-label for the left scroll button */
45
47
  leftScrollAriaLabel?: string;
46
48
  /** Aria-label for the right scroll button */
@@ -135,6 +137,7 @@ export class Tabs extends React.Component<TabsProps, TabsState> {
135
137
  isSecondary: false,
136
138
  isVertical: false,
137
139
  isBox: false,
140
+ hasBorderBottom: true,
138
141
  leftScrollAriaLabel: 'Scroll left',
139
142
  rightScrollAriaLabel: 'Scroll right',
140
143
  component: TabsComponent.div,
@@ -288,6 +291,7 @@ export class Tabs extends React.Component<TabsProps, TabsState> {
288
291
  isSecondary,
289
292
  isVertical,
290
293
  isBox,
294
+ hasBorderBottom,
291
295
  leftScrollAriaLabel,
292
296
  rightScrollAriaLabel,
293
297
  'aria-label': ariaLabel,
@@ -356,6 +360,7 @@ export class Tabs extends React.Component<TabsProps, TabsState> {
356
360
  isBox && styles.modifiers.box,
357
361
  showScrollButtons && !isVertical && styles.modifiers.scrollable,
358
362
  usePageInsets && styles.modifiers.pageInsets,
363
+ !hasBorderBottom && styles.modifiers.noBorderBottom,
359
364
  formatBreakpointMods(inset, styles),
360
365
  variantStyle[variant],
361
366
  className
@@ -276,3 +276,20 @@ test('should render box tabs of light variant', () => {
276
276
  expect(view.container).toMatchSnapshot();
277
277
  });
278
278
 
279
+ test('should render tabs with no bottom border', () => {
280
+ const view = render(
281
+ <Tabs id="noBottomBorderTabs" hasBorderBottom={false}>
282
+ <Tab id="tab1" eventKey={0} title={<TabTitleText>"Tab item 1"</TabTitleText>}>
283
+ Tab 1 section
284
+ </Tab>
285
+ <Tab id="tab2" eventKey={1} title={<TabTitleText>"Tab item 2"</TabTitleText>}>
286
+ Tab 2 section
287
+ </Tab>
288
+ <Tab id="tab3" eventKey={2} title={<TabTitleText>"Tab item 3"</TabTitleText>}>
289
+ Tab 3 section
290
+ </Tab>
291
+ </Tabs>
292
+ );
293
+ expect(view.container).toMatchSnapshot();
294
+ });
295
+
@@ -1543,6 +1543,159 @@ exports[`should render tabs with eventKey Strings 1`] = `
1543
1543
  </div>
1544
1544
  `;
1545
1545
 
1546
+ exports[`should render tabs with no bottom border 1`] = `
1547
+ <div>
1548
+ <div
1549
+ class="pf-c-tabs pf-m-no-border-bottom"
1550
+ data-ouia-component-id="OUIA-Generated-Tabs-14"
1551
+ data-ouia-component-type="PF4/Tabs"
1552
+ data-ouia-safe="true"
1553
+ id="noBottomBorderTabs"
1554
+ >
1555
+ <button
1556
+ aria-hidden="true"
1557
+ aria-label="Scroll left"
1558
+ class="pf-c-tabs__scroll-button"
1559
+ disabled=""
1560
+ >
1561
+ <svg
1562
+ aria-hidden="true"
1563
+ fill="currentColor"
1564
+ height="1em"
1565
+ role="img"
1566
+ style="vertical-align: -0.125em;"
1567
+ viewBox="0 0 256 512"
1568
+ width="1em"
1569
+ >
1570
+ <path
1571
+ d="M31.7 239l136-136c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9L127.9 256l96.4 96.4c9.4 9.4 9.4 24.6 0 33.9L201.7 409c-9.4 9.4-24.6 9.4-33.9 0l-136-136c-9.5-9.4-9.5-24.6-.1-34z"
1572
+ />
1573
+ </svg>
1574
+ </button>
1575
+ <ul
1576
+ class="pf-c-tabs__list"
1577
+ role="tablist"
1578
+ >
1579
+ <li
1580
+ class="pf-c-tabs__item pf-m-current"
1581
+ role="presentation"
1582
+ >
1583
+ <button
1584
+ aria-controls="pf-tab-section-0-tab1"
1585
+ aria-selected="true"
1586
+ class="pf-c-tabs__link"
1587
+ data-ouia-component-type="PF4/TabButton"
1588
+ data-ouia-safe="true"
1589
+ id="pf-tab-0-tab1"
1590
+ role="tab"
1591
+ >
1592
+ <span
1593
+ class="pf-c-tabs__item-text"
1594
+ >
1595
+ "Tab item 1"
1596
+ </span>
1597
+ </button>
1598
+ </li>
1599
+ <li
1600
+ class="pf-c-tabs__item"
1601
+ role="presentation"
1602
+ >
1603
+ <button
1604
+ aria-controls="pf-tab-section-1-tab2"
1605
+ aria-selected="false"
1606
+ class="pf-c-tabs__link"
1607
+ data-ouia-component-type="PF4/TabButton"
1608
+ data-ouia-safe="true"
1609
+ id="pf-tab-1-tab2"
1610
+ role="tab"
1611
+ >
1612
+ <span
1613
+ class="pf-c-tabs__item-text"
1614
+ >
1615
+ "Tab item 2"
1616
+ </span>
1617
+ </button>
1618
+ </li>
1619
+ <li
1620
+ class="pf-c-tabs__item"
1621
+ role="presentation"
1622
+ >
1623
+ <button
1624
+ aria-controls="pf-tab-section-2-tab3"
1625
+ aria-selected="false"
1626
+ class="pf-c-tabs__link"
1627
+ data-ouia-component-type="PF4/TabButton"
1628
+ data-ouia-safe="true"
1629
+ id="pf-tab-2-tab3"
1630
+ role="tab"
1631
+ >
1632
+ <span
1633
+ class="pf-c-tabs__item-text"
1634
+ >
1635
+ "Tab item 3"
1636
+ </span>
1637
+ </button>
1638
+ </li>
1639
+ </ul>
1640
+ <button
1641
+ aria-hidden="true"
1642
+ aria-label="Scroll right"
1643
+ class="pf-c-tabs__scroll-button"
1644
+ disabled=""
1645
+ >
1646
+ <svg
1647
+ aria-hidden="true"
1648
+ fill="currentColor"
1649
+ height="1em"
1650
+ role="img"
1651
+ style="vertical-align: -0.125em;"
1652
+ viewBox="0 0 256 512"
1653
+ width="1em"
1654
+ >
1655
+ <path
1656
+ d="M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"
1657
+ />
1658
+ </svg>
1659
+ </button>
1660
+ </div>
1661
+ <section
1662
+ aria-labelledby="pf-tab-0-tab1"
1663
+ class="pf-c-tab-content"
1664
+ data-ouia-component-type="PF4/TabContent"
1665
+ data-ouia-safe="true"
1666
+ id="pf-tab-section-0-tab1"
1667
+ role="tabpanel"
1668
+ tabindex="0"
1669
+ >
1670
+ Tab 1 section
1671
+ </section>
1672
+ <section
1673
+ aria-labelledby="pf-tab-1-tab2"
1674
+ class="pf-c-tab-content"
1675
+ data-ouia-component-type="PF4/TabContent"
1676
+ data-ouia-safe="true"
1677
+ hidden=""
1678
+ id="pf-tab-section-1-tab2"
1679
+ role="tabpanel"
1680
+ tabindex="0"
1681
+ >
1682
+ Tab 2 section
1683
+ </section>
1684
+ <section
1685
+ aria-labelledby="pf-tab-2-tab3"
1686
+ class="pf-c-tab-content"
1687
+ data-ouia-component-type="PF4/TabContent"
1688
+ data-ouia-safe="true"
1689
+ hidden=""
1690
+ id="pf-tab-section-2-tab3"
1691
+ role="tabpanel"
1692
+ tabindex="0"
1693
+ >
1694
+ Tab 3 section
1695
+ </section>
1696
+ </div>
1697
+ `;
1698
+
1546
1699
  exports[`should render tabs with separate content 1`] = `
1547
1700
  <div>
1548
1701
  <div