@patternfly/react-icons 5.0.0-alpha.1 → 5.0.0-alpha.11

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 CHANGED
@@ -3,7 +3,103 @@
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
- # [5.0.0-alpha.1](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-icons@4.92.6...@patternfly/react-icons@5.0.0-alpha.1) (2023-01-10)
6
+ # 5.0.0-alpha.11 (2023-04-25)
7
+
8
+ ### Bug Fixes
9
+
10
+ - bump dependencies and remove ssl option ([#8984](https://github.com/patternfly/patternfly-react/issues/8984)) ([f8f77d2](https://github.com/patternfly/patternfly-react/commit/f8f77d232b386ad8676af609273d9adff5a5feae))
11
+
12
+ # 5.0.0-alpha.10 (2023-04-11)
13
+
14
+ ### Bug Fixes
15
+
16
+ - **icons:** fixed pficons naming overrides ([#8932](https://github.com/patternfly/patternfly-react/issues/8932)) ([1c9c9cb](https://github.com/patternfly/patternfly-react/commit/1c9c9cb7909a26d3bc4ad340d0656c0ec31d9e58))
17
+
18
+ # 5.0.0-alpha.9 (2023-04-06)
19
+
20
+ **Note:** Version bump only for package @patternfly/react-icons
21
+
22
+ # 5.0.0-alpha.8 (2023-04-03)
23
+
24
+ **Note:** Version bump only for package @patternfly/react-icons
25
+
26
+ # 5.0.0-alpha.7 (2023-03-27)
27
+
28
+ **Note:** Version bump only for package @patternfly/react-icons
29
+
30
+ # 5.0.0-alpha.6 (2023-03-18)
31
+
32
+ **Note:** Version bump only for package @patternfly/react-icons
33
+
34
+ # 5.0.0-alpha.5 (2023-03-17)
35
+
36
+ **Note:** Version bump only for package @patternfly/react-icons
37
+
38
+ # 5.0.0-alpha.4 (2023-03-02)
39
+
40
+ ### Bug Fixes
41
+
42
+ - **core:** update core to alpha.24 ([#8768](https://github.com/patternfly/patternfly-react/issues/8768)) ([6dd5e01](https://github.com/patternfly/patternfly-react/commit/6dd5e01e16bc94fe4b954b79ba67adaaab9c7135))
43
+
44
+ # 5.0.0-alpha.3 (2023-02-15)
45
+
46
+ ### Bug Fixes
47
+
48
+ - **deps:** updated to the latest core alpha ([#8688](https://github.com/patternfly/patternfly-react/issues/8688)) ([5f81928](https://github.com/patternfly/patternfly-react/commit/5f819288d7baaa3806b23c0da8fb26dd4ec12d6b))
49
+
50
+ # 5.0.0-alpha.2 (2023-02-08)
51
+
52
+ **Note:** Version bump only for package @patternfly/react-icons
53
+
54
+ ## 4.93.6 (2023-01-23)
55
+
56
+ **Note:** Version bump only for package @patternfly/react-icons
57
+
58
+ ## 4.93.5 (2023-01-19)
59
+
60
+ **Note:** Version bump only for package @patternfly/react-icons
61
+
62
+ ## 4.93.4 (2023-01-18)
63
+
64
+ ### Bug Fixes
65
+
66
+ - **Tabs:** Removed isHelpAction prop from TabsAction ([#8560](https://github.com/patternfly/patternfly-react/issues/8560)) ([05fa1b0](https://github.com/patternfly/patternfly-react/commit/05fa1b0acfe886f09c5bdf4ad9f8e27878ee817e))
67
+
68
+ ## 4.93.3 (2022-12-08)
69
+
70
+ **Note:** Version bump only for package @patternfly/react-icons
71
+
72
+ ## 4.93.2 (2022-12-07)
73
+
74
+ **Note:** Version bump only for package @patternfly/react-icons
75
+
76
+ ## 4.93.1 (2022-12-01)
77
+
78
+ **Note:** Version bump only for package @patternfly/react-icons
79
+
80
+ # 4.93.0 (2022-11-16)
81
+
82
+ ### Features
83
+
84
+ - **Tabs:** add TabAction, update core ver ([#8348](https://github.com/patternfly/patternfly-react/issues/8348)) ([8c584b4](https://github.com/patternfly/patternfly-react/commit/8c584b48f8e545cf226f785b873ee11eda505724))
85
+
86
+ ## 4.92.10 (2022-10-27)
87
+
88
+ **Note:** Version bump only for package @patternfly/react-icons
89
+
90
+ ## 4.92.9 (2022-10-26)
91
+
92
+ **Note:** Version bump only for package @patternfly/react-icons
93
+
94
+ ## [4.92.8](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-icons@4.92.7...@patternfly/react-icons@4.92.8) (2022-10-17)
95
+
96
+ **Note:** Version bump only for package @patternfly/react-icons
97
+
98
+ ## 4.92.7 (2022-10-14)
99
+
100
+ **Note:** Version bump only for package @patternfly/react-icons
101
+
102
+ ## 4.92.6 (2022-10-05)
7
103
 
8
104
  ### Bug Fixes
9
105
 
@@ -1,11 +1,4 @@
1
1
  import * as React from 'react';
2
- export declare enum IconSize {
3
- sm = "sm",
4
- md = "md",
5
- lg = "lg",
6
- xl = "xl"
7
- }
8
- export declare const getSize: (size: IconSize | keyof typeof IconSize) => "1em" | "1.5em" | "2em" | "3em";
9
2
  export interface IconDefinition {
10
3
  name?: string;
11
4
  width: number;
@@ -14,11 +7,8 @@ export interface IconDefinition {
14
7
  xOffset?: number;
15
8
  yOffset?: number;
16
9
  }
17
- export interface SVGIconProps extends Omit<React.HTMLProps<SVGElement>, 'size' | 'ref'> {
18
- color?: string;
19
- size?: IconSize | keyof typeof IconSize;
10
+ export interface SVGIconProps extends Omit<React.HTMLProps<SVGElement>, 'ref'> {
20
11
  title?: string;
21
- noVerticalAlign?: boolean;
22
12
  }
23
13
  /**
24
14
  * Factory to create Icon class components for consumers
@@ -1 +1 @@
1
- {"version":3,"file":"createIcon.d.ts","sourceRoot":"","sources":["../../src/createIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,oBAAY,QAAQ;IAClB,EAAE,OAAO;IACT,EAAE,OAAO;IACT,EAAE,OAAO;IACT,EAAE,OAAO;CACV;AAED,eAAO,MAAM,OAAO,SAAU,QAAQ,GAAG,MAAM,eAAe,oCAa7D,CAAC;AAEF,MAAM,WAAW,cAAc;IAC7B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,YAAa,SAAQ,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IACrF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,QAAQ,GAAG,MAAM,OAAO,QAAQ,CAAC;IACxC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAID;;GAEG;AACH,wBAAgB,UAAU,CAAC,EACzB,IAAI,EACJ,OAAW,EACX,OAAW,EACX,KAAK,EACL,MAAM,EACN,OAAO,EACR,EAAE,cAAc,GAAG,KAAK,CAAC,cAAc,CAAC,YAAY,CAAC,CAsCrD"}
1
+ {"version":3,"file":"createIcon.d.ts","sourceRoot":"","sources":["../../src/createIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,WAAW,cAAc;IAC7B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,YAAa,SAAQ,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,UAAU,CAAC,EAAE,KAAK,CAAC;IAC5E,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAID;;GAEG;AACH,wBAAgB,UAAU,CAAC,EACzB,IAAI,EACJ,OAAW,EACX,OAAW,EACX,KAAK,EACL,MAAM,EACN,OAAO,EACR,EAAE,cAAc,GAAG,KAAK,CAAC,cAAc,CAAC,YAAY,CAAC,CA4BrD"}
@@ -1,26 +1,5 @@
1
1
  import { __rest } from "tslib";
2
2
  import * as React from 'react';
3
- export var IconSize;
4
- (function (IconSize) {
5
- IconSize["sm"] = "sm";
6
- IconSize["md"] = "md";
7
- IconSize["lg"] = "lg";
8
- IconSize["xl"] = "xl";
9
- })(IconSize || (IconSize = {}));
10
- export const getSize = (size) => {
11
- switch (size) {
12
- case IconSize.sm:
13
- return '1em';
14
- case IconSize.md:
15
- return '1.5em';
16
- case IconSize.lg:
17
- return '2em';
18
- case IconSize.xl:
19
- return '3em';
20
- default:
21
- return '1em';
22
- }
23
- };
24
3
  let currentId = 0;
25
4
  /**
26
5
  * Factory to create Icon class components for consumers
@@ -33,23 +12,15 @@ export function createIcon({ name, xOffset = 0, yOffset = 0, width, height, svgP
33
12
  this.id = `icon-title-${currentId++}`;
34
13
  }
35
14
  render() {
36
- const _a = this.props, { size, color, title, noVerticalAlign } = _a, props = __rest(_a, ["size", "color", "title", "noVerticalAlign"]);
15
+ const _a = this.props, { title } = _a, props = __rest(_a, ["title"]);
37
16
  const hasTitle = Boolean(title);
38
- const heightWidth = getSize(size);
39
- const baseAlign = -0.125 * Number.parseFloat(heightWidth);
40
- const style = noVerticalAlign ? null : { verticalAlign: `${baseAlign}em` };
41
17
  const viewBox = [xOffset, yOffset, width, height].join(' ');
42
- return (React.createElement("svg", Object.assign({ style: style, fill: color, height: heightWidth, width: heightWidth, viewBox: viewBox, "aria-labelledby": hasTitle ? this.id : null, "aria-hidden": hasTitle ? null : true, role: "img" }, props),
18
+ return (React.createElement("svg", Object.assign({ className: "pf-svg", viewBox: viewBox, fill: "currentColor", "aria-labelledby": hasTitle ? this.id : null, "aria-hidden": hasTitle ? null : true, role: "img" }, props),
43
19
  hasTitle && React.createElement("title", { id: this.id }, title),
44
20
  React.createElement("path", { d: svgPath })));
45
21
  }
46
22
  },
47
23
  _a.displayName = name,
48
- _a.defaultProps = {
49
- color: 'currentColor',
50
- size: IconSize.sm,
51
- noVerticalAlign: false
52
- },
53
24
  _a;
54
25
  }
55
26
  //# sourceMappingURL=createIcon.js.map
@@ -1 +1 @@
1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CAAC,SAAuB;YAAnD;;gBAGL,OAAE,GAAG,cAAc,SAAS,EAAE,EAAE,CAAC;YAuBnC,CAAC;YArBC,MAAM;gBACJ,MAAM,KAAsB,IAAI,CAAC,KAAK,EAAhC,EAAE,KAAK,OAAyB,EAApB,KAAK,cAAjB,SAAmB,CAAa,CAAC;gBAEvC,MAAM,QAAQ,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;gBAChC,MAAM,OAAO,GAAG,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBAE5D,OAAO,CACL,2CACE,SAAS,EAAC,QAAQ,EAClB,OAAO,EAAE,OAAO,EAChB,IAAI,EAAC,cAAc,qBACF,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,iBAC7B,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EACnC,IAAI,EAAC,KAAK,IACL,KAAiD;oBAErD,QAAQ,IAAI,+BAAO,EAAE,EAAE,IAAI,CAAC,EAAE,IAAG,KAAK,CAAS;oBAChD,8BAAM,CAAC,EAAE,OAAO,GAAI,CAChB,CACP,CAAC;YACJ,CAAC;SACF;QAzBQ,cAAW,GAAG,IAAK;WAyB1B;AACJ,CAAC"}
@@ -0,0 +1,12 @@
1
+ import * as React from 'react';
2
+ import { SVGIconProps } from '../createIcon';
3
+ export declare const DataProcessorIconConfig: {
4
+ name: 'DataProcessorIcon',
5
+ height: 1024,
6
+ width: 1024,
7
+ svgPath: 'M879.0474,64.5 L1024.3914,224.5 L879.0474,384.5 L832.4324,341.094 L909.276499,256.5 L180.1341,256.5 C148.0811,257.327 118.0301,271.052 95.4831,295.334 C72.8821,319.674 60.4361,351.806 60.4361,385.811 L60.4361,386.471 C60.4361,420.381 72.7991,452.159 95.2501,475.95 C117.7211,499.761 147.6961,512.5 179.6531,512.5 L323.373499,512.5 L512.4992,367.3227 L701.624499,512.5 L845.5586,512.5 C892.8806,512.5 937.36031,531.51296 970.971417,566.572676 L971.9866,567.64 C1005.8506,603.526 1024.4996,651.43 1024.4996,702.529 L1024.4996,703.189 C1024.4996,754.188 1005.8886,802.318 972.0946,838.711 C938.5136,874.875 893.7406,895.395 846.0236,896.492 L845.6746,896.5 L31.2476,896.5 C14.7556,896.466 0.4686,881.3 0.499549646,863.652 C0.5316,846.026 14.7836,832.5 31.2476,832.5 L845.0776,832.5 C877.1296,831.673 907.1816,817.948 929.7276,793.666 C952.3286,769.326 964.7756,737.194 964.7756,703.189 L964.7756,702.529 C964.7756,668.619 952.4116,636.841 929.9606,613.05 C907.4896,589.239 877.5156,576.5 845.5586,576.5 L703.333499,576.5 L512.4992,720.9647 L321.665499,576.5 L179.6531,576.5 C132.33011,576.5 87.8513702,557.48704 54.240283,522.427324 L53.2251,521.36 C19.3611,485.474 0.7111,437.57 0.7111,386.471 L0.7111,385.811 C0.7111,334.812 19.3221,286.682 53.1161,250.289 C86.6971,214.125 131.4701,193.605 179.1871,192.508 L179.5371,192.5 L909.276499,192.5 L832.4324,107.906 L879.0474,64.5 Z M512.4992,450.3267 L389.4332,544.7967 L512.4992,637.9607 L635.5662,544.7967 L512.4992,450.3267 Z',
8
+ yOffset: 0,
9
+ xOffset: 0,
10
+ };
11
+ export declare const DataProcessorIcon: React.ComponentClass<SVGIconProps>;
12
+ export default DataProcessorIcon;
@@ -0,0 +1,14 @@
1
+ import { createIcon } from '../createIcon';
2
+
3
+ export const DataProcessorIconConfig = {
4
+ name: 'DataProcessorIcon',
5
+ height: 1024,
6
+ width: 1024,
7
+ svgPath: 'M879.0474,64.5 L1024.3914,224.5 L879.0474,384.5 L832.4324,341.094 L909.276499,256.5 L180.1341,256.5 C148.0811,257.327 118.0301,271.052 95.4831,295.334 C72.8821,319.674 60.4361,351.806 60.4361,385.811 L60.4361,386.471 C60.4361,420.381 72.7991,452.159 95.2501,475.95 C117.7211,499.761 147.6961,512.5 179.6531,512.5 L323.373499,512.5 L512.4992,367.3227 L701.624499,512.5 L845.5586,512.5 C892.8806,512.5 937.36031,531.51296 970.971417,566.572676 L971.9866,567.64 C1005.8506,603.526 1024.4996,651.43 1024.4996,702.529 L1024.4996,703.189 C1024.4996,754.188 1005.8886,802.318 972.0946,838.711 C938.5136,874.875 893.7406,895.395 846.0236,896.492 L845.6746,896.5 L31.2476,896.5 C14.7556,896.466 0.4686,881.3 0.499549646,863.652 C0.5316,846.026 14.7836,832.5 31.2476,832.5 L845.0776,832.5 C877.1296,831.673 907.1816,817.948 929.7276,793.666 C952.3286,769.326 964.7756,737.194 964.7756,703.189 L964.7756,702.529 C964.7756,668.619 952.4116,636.841 929.9606,613.05 C907.4896,589.239 877.5156,576.5 845.5586,576.5 L703.333499,576.5 L512.4992,720.9647 L321.665499,576.5 L179.6531,576.5 C132.33011,576.5 87.8513702,557.48704 54.240283,522.427324 L53.2251,521.36 C19.3611,485.474 0.7111,437.57 0.7111,386.471 L0.7111,385.811 C0.7111,334.812 19.3221,286.682 53.1161,250.289 C86.6971,214.125 131.4701,193.605 179.1871,192.508 L179.5371,192.5 L909.276499,192.5 L832.4324,107.906 L879.0474,64.5 Z M512.4992,450.3267 L389.4332,544.7967 L512.4992,637.9607 L635.5662,544.7967 L512.4992,450.3267 Z',
8
+ yOffset: 0,
9
+ xOffset: 0,
10
+ };
11
+
12
+ export const DataProcessorIcon = createIcon(DataProcessorIconConfig);
13
+
14
+ export default DataProcessorIcon;
@@ -366,6 +366,7 @@ export { DAndDBeyondIcon, DAndDBeyondIconConfig } from './d-and-d-beyond-icon';
366
366
  export { DAndDIcon, DAndDIconConfig } from './d-and-d-icon';
367
367
  export { DailymotionIcon, DailymotionIconConfig } from './dailymotion-icon';
368
368
  export { DashcubeIcon, DashcubeIconConfig } from './dashcube-icon';
369
+ export { DataProcessorIcon, DataProcessorIconConfig } from './data-processor-icon';
369
370
  export { DataSinkIcon, DataSinkIconConfig } from './data-sink-icon';
370
371
  export { DataSourceIcon, DataSourceIconConfig } from './data-source-icon';
371
372
  export { DatabaseIcon, DatabaseIconConfig } from './database-icon';
@@ -366,6 +366,7 @@ export { DAndDBeyondIcon, DAndDBeyondIconConfig } from './d-and-d-beyond-icon';
366
366
  export { DAndDIcon, DAndDIconConfig } from './d-and-d-icon';
367
367
  export { DailymotionIcon, DailymotionIconConfig } from './dailymotion-icon';
368
368
  export { DashcubeIcon, DashcubeIconConfig } from './dashcube-icon';
369
+ export { DataProcessorIcon, DataProcessorIconConfig } from './data-processor-icon';
369
370
  export { DataSinkIcon, DataSinkIconConfig } from './data-sink-icon';
370
371
  export { DataSourceIcon, DataSourceIconConfig } from './data-source-icon';
371
372
  export { DatabaseIcon, DatabaseIconConfig } from './database-icon';
@@ -1,3 +1,2 @@
1
- export { IconSize } from './createIcon';
2
1
  export * from './icons/index';
3
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,cAAc,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC"}
package/dist/esm/index.js CHANGED
@@ -1,3 +1,2 @@
1
- export { IconSize } from './createIcon';
2
1
  export * from './icons/index';
3
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,cAAc,eAAe,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC"}
@@ -1,11 +1,4 @@
1
1
  import * as React from 'react';
2
- export declare enum IconSize {
3
- sm = "sm",
4
- md = "md",
5
- lg = "lg",
6
- xl = "xl"
7
- }
8
- export declare const getSize: (size: IconSize | keyof typeof IconSize) => "1em" | "1.5em" | "2em" | "3em";
9
2
  export interface IconDefinition {
10
3
  name?: string;
11
4
  width: number;
@@ -14,11 +7,8 @@ export interface IconDefinition {
14
7
  xOffset?: number;
15
8
  yOffset?: number;
16
9
  }
17
- export interface SVGIconProps extends Omit<React.HTMLProps<SVGElement>, 'size' | 'ref'> {
18
- color?: string;
19
- size?: IconSize | keyof typeof IconSize;
10
+ export interface SVGIconProps extends Omit<React.HTMLProps<SVGElement>, 'ref'> {
20
11
  title?: string;
21
- noVerticalAlign?: boolean;
22
12
  }
23
13
  /**
24
14
  * Factory to create Icon class components for consumers
@@ -1 +1 @@
1
- {"version":3,"file":"createIcon.d.ts","sourceRoot":"","sources":["../../src/createIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,oBAAY,QAAQ;IAClB,EAAE,OAAO;IACT,EAAE,OAAO;IACT,EAAE,OAAO;IACT,EAAE,OAAO;CACV;AAED,eAAO,MAAM,OAAO,SAAU,QAAQ,GAAG,MAAM,eAAe,oCAa7D,CAAC;AAEF,MAAM,WAAW,cAAc;IAC7B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,YAAa,SAAQ,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IACrF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,QAAQ,GAAG,MAAM,OAAO,QAAQ,CAAC;IACxC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAID;;GAEG;AACH,wBAAgB,UAAU,CAAC,EACzB,IAAI,EACJ,OAAW,EACX,OAAW,EACX,KAAK,EACL,MAAM,EACN,OAAO,EACR,EAAE,cAAc,GAAG,KAAK,CAAC,cAAc,CAAC,YAAY,CAAC,CAsCrD"}
1
+ {"version":3,"file":"createIcon.d.ts","sourceRoot":"","sources":["../../src/createIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,WAAW,cAAc;IAC7B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,YAAa,SAAQ,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,UAAU,CAAC,EAAE,KAAK,CAAC;IAC5E,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAID;;GAEG;AACH,wBAAgB,UAAU,CAAC,EACzB,IAAI,EACJ,OAAW,EACX,OAAW,EACX,KAAK,EACL,MAAM,EACN,OAAO,EACR,EAAE,cAAc,GAAG,KAAK,CAAC,cAAc,CAAC,YAAY,CAAC,CA4BrD"}
@@ -1,30 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createIcon = exports.getSize = exports.IconSize = void 0;
3
+ exports.createIcon = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
- var IconSize;
7
- (function (IconSize) {
8
- IconSize["sm"] = "sm";
9
- IconSize["md"] = "md";
10
- IconSize["lg"] = "lg";
11
- IconSize["xl"] = "xl";
12
- })(IconSize = exports.IconSize || (exports.IconSize = {}));
13
- const getSize = (size) => {
14
- switch (size) {
15
- case IconSize.sm:
16
- return '1em';
17
- case IconSize.md:
18
- return '1.5em';
19
- case IconSize.lg:
20
- return '2em';
21
- case IconSize.xl:
22
- return '3em';
23
- default:
24
- return '1em';
25
- }
26
- };
27
- exports.getSize = getSize;
28
6
  let currentId = 0;
29
7
  /**
30
8
  * Factory to create Icon class components for consumers
@@ -37,23 +15,15 @@ function createIcon({ name, xOffset = 0, yOffset = 0, width, height, svgPath })
37
15
  this.id = `icon-title-${currentId++}`;
38
16
  }
39
17
  render() {
40
- const _a = this.props, { size, color, title, noVerticalAlign } = _a, props = tslib_1.__rest(_a, ["size", "color", "title", "noVerticalAlign"]);
18
+ const _a = this.props, { title } = _a, props = tslib_1.__rest(_a, ["title"]);
41
19
  const hasTitle = Boolean(title);
42
- const heightWidth = exports.getSize(size);
43
- const baseAlign = -0.125 * Number.parseFloat(heightWidth);
44
- const style = noVerticalAlign ? null : { verticalAlign: `${baseAlign}em` };
45
20
  const viewBox = [xOffset, yOffset, width, height].join(' ');
46
- return (React.createElement("svg", Object.assign({ style: style, fill: color, height: heightWidth, width: heightWidth, viewBox: viewBox, "aria-labelledby": hasTitle ? this.id : null, "aria-hidden": hasTitle ? null : true, role: "img" }, props),
21
+ return (React.createElement("svg", Object.assign({ className: "pf-svg", viewBox: viewBox, fill: "currentColor", "aria-labelledby": hasTitle ? this.id : null, "aria-hidden": hasTitle ? null : true, role: "img" }, props),
47
22
  hasTitle && React.createElement("title", { id: this.id }, title),
48
23
  React.createElement("path", { d: svgPath })));
49
24
  }
50
25
  },
51
26
  _a.displayName = name,
52
- _a.defaultProps = {
53
- color: 'currentColor',
54
- size: IconSize.sm,
55
- noVerticalAlign: false
56
- },
57
27
  _a;
58
28
  }
59
29
  exports.createIcon = createIcon;
@@ -1 +1 @@
1
- {"version":3,"file":"createIcon.js","sourceRoot":"","sources":["../../src/createIcon.tsx"],"names":[],"mappings":";;;;AAAA,qDAA+B;AAE/B,IAAY,QAKX;AALD,WAAY,QAAQ;IAClB,qBAAS,CAAA;IACT,qBAAS,CAAA;IACT,q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AAa,CAAC;gBAEvC,MAAM,QAAQ,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;gBAChC,MAAM,OAAO,GAAG,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBAE5D,OAAO,CACL,2CACE,SAAS,EAAC,QAAQ,EAClB,OAAO,EAAE,OAAO,EAChB,IAAI,EAAC,cAAc,qBACF,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,iBAC7B,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EACnC,IAAI,EAAC,KAAK,IACL,KAAiD;oBAErD,QAAQ,IAAI,+BAAO,EAAE,EAAE,IAAI,CAAC,EAAE,IAAG,KAAK,CAAS;oBAChD,8BAAM,CAAC,EAAE,OAAO,GAAI,CAChB,CACP,CAAC;YACJ,CAAC;SACF;QAzBQ,cAAW,GAAG,IAAK;WAyB1B;AACJ,CAAC;AAnCD,gCAmCC"}
@@ -0,0 +1,12 @@
1
+ import * as React from 'react';
2
+ import { SVGIconProps } from '../createIcon';
3
+ export declare const DataProcessorIconConfig: {
4
+ name: 'DataProcessorIcon',
5
+ height: 1024,
6
+ width: 1024,
7
+ svgPath: 'M879.0474,64.5 L1024.3914,224.5 L879.0474,384.5 L832.4324,341.094 L909.276499,256.5 L180.1341,256.5 C148.0811,257.327 118.0301,271.052 95.4831,295.334 C72.8821,319.674 60.4361,351.806 60.4361,385.811 L60.4361,386.471 C60.4361,420.381 72.7991,452.159 95.2501,475.95 C117.7211,499.761 147.6961,512.5 179.6531,512.5 L323.373499,512.5 L512.4992,367.3227 L701.624499,512.5 L845.5586,512.5 C892.8806,512.5 937.36031,531.51296 970.971417,566.572676 L971.9866,567.64 C1005.8506,603.526 1024.4996,651.43 1024.4996,702.529 L1024.4996,703.189 C1024.4996,754.188 1005.8886,802.318 972.0946,838.711 C938.5136,874.875 893.7406,895.395 846.0236,896.492 L845.6746,896.5 L31.2476,896.5 C14.7556,896.466 0.4686,881.3 0.499549646,863.652 C0.5316,846.026 14.7836,832.5 31.2476,832.5 L845.0776,832.5 C877.1296,831.673 907.1816,817.948 929.7276,793.666 C952.3286,769.326 964.7756,737.194 964.7756,703.189 L964.7756,702.529 C964.7756,668.619 952.4116,636.841 929.9606,613.05 C907.4896,589.239 877.5156,576.5 845.5586,576.5 L703.333499,576.5 L512.4992,720.9647 L321.665499,576.5 L179.6531,576.5 C132.33011,576.5 87.8513702,557.48704 54.240283,522.427324 L53.2251,521.36 C19.3611,485.474 0.7111,437.57 0.7111,386.471 L0.7111,385.811 C0.7111,334.812 19.3221,286.682 53.1161,250.289 C86.6971,214.125 131.4701,193.605 179.1871,192.508 L179.5371,192.5 L909.276499,192.5 L832.4324,107.906 L879.0474,64.5 Z M512.4992,450.3267 L389.4332,544.7967 L512.4992,637.9607 L635.5662,544.7967 L512.4992,450.3267 Z',
8
+ yOffset: 0,
9
+ xOffset: 0,
10
+ };
11
+ export declare const DataProcessorIcon: React.ComponentClass<SVGIconProps>;
12
+ export default DataProcessorIcon;
@@ -0,0 +1,12 @@
1
+ "use strict"
2
+ exports.__esModule = true;
3
+ exports.DataProcessorIconConfig = {
4
+ name: 'DataProcessorIcon',
5
+ height: 1024,
6
+ width: 1024,
7
+ svgPath: 'M879.0474,64.5 L1024.3914,224.5 L879.0474,384.5 L832.4324,341.094 L909.276499,256.5 L180.1341,256.5 C148.0811,257.327 118.0301,271.052 95.4831,295.334 C72.8821,319.674 60.4361,351.806 60.4361,385.811 L60.4361,386.471 C60.4361,420.381 72.7991,452.159 95.2501,475.95 C117.7211,499.761 147.6961,512.5 179.6531,512.5 L323.373499,512.5 L512.4992,367.3227 L701.624499,512.5 L845.5586,512.5 C892.8806,512.5 937.36031,531.51296 970.971417,566.572676 L971.9866,567.64 C1005.8506,603.526 1024.4996,651.43 1024.4996,702.529 L1024.4996,703.189 C1024.4996,754.188 1005.8886,802.318 972.0946,838.711 C938.5136,874.875 893.7406,895.395 846.0236,896.492 L845.6746,896.5 L31.2476,896.5 C14.7556,896.466 0.4686,881.3 0.499549646,863.652 C0.5316,846.026 14.7836,832.5 31.2476,832.5 L845.0776,832.5 C877.1296,831.673 907.1816,817.948 929.7276,793.666 C952.3286,769.326 964.7756,737.194 964.7756,703.189 L964.7756,702.529 C964.7756,668.619 952.4116,636.841 929.9606,613.05 C907.4896,589.239 877.5156,576.5 845.5586,576.5 L703.333499,576.5 L512.4992,720.9647 L321.665499,576.5 L179.6531,576.5 C132.33011,576.5 87.8513702,557.48704 54.240283,522.427324 L53.2251,521.36 C19.3611,485.474 0.7111,437.57 0.7111,386.471 L0.7111,385.811 C0.7111,334.812 19.3221,286.682 53.1161,250.289 C86.6971,214.125 131.4701,193.605 179.1871,192.508 L179.5371,192.5 L909.276499,192.5 L832.4324,107.906 L879.0474,64.5 Z M512.4992,450.3267 L389.4332,544.7967 L512.4992,637.9607 L635.5662,544.7967 L512.4992,450.3267 Z',
8
+ yOffset: 0,
9
+ xOffset: 0,
10
+ };
11
+ exports.DataProcessorIcon = require('../createIcon').createIcon(exports.DataProcessorIconConfig);
12
+ exports["default"] = exports.DataProcessorIcon;
@@ -366,6 +366,7 @@ export { DAndDBeyondIcon, DAndDBeyondIconConfig } from './d-and-d-beyond-icon';
366
366
  export { DAndDIcon, DAndDIconConfig } from './d-and-d-icon';
367
367
  export { DailymotionIcon, DailymotionIconConfig } from './dailymotion-icon';
368
368
  export { DashcubeIcon, DashcubeIconConfig } from './dashcube-icon';
369
+ export { DataProcessorIcon, DataProcessorIconConfig } from './data-processor-icon';
369
370
  export { DataSinkIcon, DataSinkIconConfig } from './data-sink-icon';
370
371
  export { DataSourceIcon, DataSourceIconConfig } from './data-source-icon';
371
372
  export { DatabaseIcon, DatabaseIconConfig } from './database-icon';
@@ -371,6 +371,7 @@ __export(require('./d-and-d-beyond-icon'));
371
371
  __export(require('./d-and-d-icon'));
372
372
  __export(require('./dailymotion-icon'));
373
373
  __export(require('./dashcube-icon'));
374
+ __export(require('./data-processor-icon'));
374
375
  __export(require('./data-sink-icon'));
375
376
  __export(require('./data-source-icon'));
376
377
  __export(require('./database-icon'));
@@ -1,3 +1,2 @@
1
- export { IconSize } from './createIcon';
2
1
  export * from './icons/index';
3
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,cAAc,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC"}
package/dist/js/index.js CHANGED
@@ -1,8 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.IconSize = void 0;
4
3
  const tslib_1 = require("tslib");
5
- var createIcon_1 = require("./createIcon");
6
- Object.defineProperty(exports, "IconSize", { enumerable: true, get: function () { return createIcon_1.IconSize; } });
7
4
  tslib_1.__exportStar(require("./icons/index"), exports);
8
5
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;AAAA,2CAAwC;AAA/B,sGAAA,QAAQ,OAAA;AACjB,wDAA8B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,wDAA8B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@patternfly/react-icons",
3
- "version": "5.0.0-alpha.1",
3
+ "version": "5.0.0-alpha.11",
4
4
  "description": "PatternFly 4 Icons as React Components",
5
5
  "main": "dist/js/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -25,23 +25,23 @@
25
25
  },
26
26
  "homepage": "https://github.com/patternfly/patternfly-react#readme",
27
27
  "scripts": {
28
- "generate": "rimraf dist/esm/icons dist/js/icons && node scripts/writeIcons.js",
28
+ "generate": "rimraf dist/esm/icons dist/js/icons && node scripts/writeIcons.mjs",
29
29
  "clean": "rimraf dist src/icons src/index.js src/index.d.ts"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@fortawesome/free-brands-svg-icons": "^5.14.0",
33
33
  "@fortawesome/free-regular-svg-icons": "^5.14.0",
34
34
  "@fortawesome/free-solid-svg-icons": "^5.14.0",
35
- "@patternfly/patternfly": "5.0.0-alpha.3",
36
- "fs-extra": "^6.0.1",
35
+ "@patternfly/patternfly": "5.0.0-alpha.41",
36
+ "fs-extra": "^11.1.0",
37
37
  "glob": "^7.1.2",
38
38
  "rimraf": "^2.6.2",
39
- "tslib": "^2.0.0",
39
+ "tslib": "^2.5.0",
40
40
  "typescript": "^4.7.4"
41
41
  },
42
42
  "peerDependencies": {
43
- "react": "^16.8 || ^17 || ^18",
44
- "react-dom": "^16.8 || ^17 || ^18"
43
+ "react": "^17 || ^18",
44
+ "react-dom": "^17 || ^18"
45
45
  },
46
- "gitHead": "5204f0b671c8030ea8b9c1b80f653a4a2985d883"
46
+ "gitHead": "d9ed9a48d6cd077867203e29d39218feb24d6dd2"
47
47
  }
@@ -0,0 +1,14 @@
1
+ import faIcons from './icons/fontawesomeIcons.js';
2
+ import patternflyIcons from './icons/patternflyIcons.mjs';
3
+ import customIcons from './icons/customIcons.js';
4
+
5
+ /**
6
+ * Generates icons from FontAwesome, PatternFly CSS, and custom icons in this repo.
7
+ */
8
+ export function generateIcons() {
9
+ return {
10
+ ...faIcons,
11
+ ...patternflyIcons,
12
+ ...customIcons
13
+ };
14
+ }
@@ -1,4 +1,4 @@
1
- const pfIcons = require('@patternfly/patternfly/icons/pf-icons.json');
1
+ import { pfIcons } from '@patternfly/patternfly/icons/pf-icons.mjs';
2
2
 
3
3
  const renaming = {
4
4
  save: 'save-alt',
@@ -29,4 +29,5 @@ function convertIcons(icons) {
29
29
  return icons;
30
30
  }
31
31
 
32
- module.exports = convertIcons(pfIcons);
32
+ const patternflyIcons = convertIcons(pfIcons)
33
+ export default patternflyIcons;
@@ -1,6 +1,9 @@
1
- const { join } = require('path');
2
- const { outputFileSync } = require('fs-extra');
3
- const { generateIcons } = require('./generateIcons');
1
+ import { join } from 'path';
2
+ import { outputFileSync } from 'fs-extra/esm';
3
+ import { generateIcons } from './generateIcons.mjs';
4
+
5
+ import * as url from 'url';
6
+ const __dirname = url.fileURLToPath(new URL('.', import.meta.url));
4
7
 
5
8
  const outDir = join(__dirname, '../dist');
6
9
 
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { render, screen } from '@testing-library/react';
3
- import { createIcon, IconSize } from '../createIcon';
3
+ import { createIcon } from '../createIcon';
4
4
 
5
5
  const iconDef = {
6
6
  name: 'IconName',
@@ -28,14 +28,6 @@ test('sets correct svgPath', () => {
28
28
  ).toHaveAttribute('d', iconDef.svgPath);
29
29
  });
30
30
 
31
- test('height and width are set from size', () => {
32
- render(<SVGIcon size={IconSize.sm} />);
33
-
34
- const svg = screen.getByRole('img', { hidden: true });
35
- expect(svg).toHaveAttribute('width', '1em');
36
- expect(svg).toHaveAttribute('height', '1em');
37
- });
38
-
39
31
  test('aria-hidden is true if no title is specified', () => {
40
32
  render(<SVGIcon />);
41
33
  expect(screen.getByRole('img', { hidden: true })).toHaveAttribute('aria-hidden', 'true');
@@ -63,7 +55,7 @@ test('aria-labelledby matches title id', () => {
63
55
 
64
56
  const svg = screen.getByRole('img', { hidden: true });
65
57
  const labelledby = svg.getAttribute('aria-labelledby');
66
- const titleId = svg.querySelector('title').getAttribute('id');
58
+ const titleId = svg.querySelector('title')?.getAttribute('id');
67
59
 
68
60
  expect(labelledby).toEqual(titleId);
69
61
  });
@@ -1,27 +1,5 @@
1
1
  import * as React from 'react';
2
2
 
3
- export enum IconSize {
4
- sm = 'sm',
5
- md = 'md',
6
- lg = 'lg',
7
- xl = 'xl'
8
- }
9
-
10
- export const getSize = (size: IconSize | keyof typeof IconSize) => {
11
- switch (size) {
12
- case IconSize.sm:
13
- return '1em';
14
- case IconSize.md:
15
- return '1.5em';
16
- case IconSize.lg:
17
- return '2em';
18
- case IconSize.xl:
19
- return '3em';
20
- default:
21
- return '1em';
22
- }
23
- };
24
-
25
3
  export interface IconDefinition {
26
4
  name?: string;
27
5
  width: number;
@@ -31,11 +9,8 @@ export interface IconDefinition {
31
9
  yOffset?: number;
32
10
  }
33
11
 
34
- export interface SVGIconProps extends Omit<React.HTMLProps<SVGElement>, 'size' | 'ref'> {
35
- color?: string;
36
- size?: IconSize | keyof typeof IconSize;
12
+ export interface SVGIconProps extends Omit<React.HTMLProps<SVGElement>, 'ref'> {
37
13
  title?: string;
38
- noVerticalAlign?: boolean;
39
14
  }
40
15
 
41
16
  let currentId = 0;
@@ -53,30 +28,20 @@ export function createIcon({
53
28
  }: IconDefinition): React.ComponentClass<SVGIconProps> {
54
29
  return class SVGIcon extends React.Component<SVGIconProps> {
55
30
  static displayName = name;
56
- static defaultProps = {
57
- color: 'currentColor',
58
- size: IconSize.sm,
59
- noVerticalAlign: false
60
- };
61
31
 
62
32
  id = `icon-title-${currentId++}`;
63
33
 
64
34
  render() {
65
- const { size, color, title, noVerticalAlign, ...props } = this.props;
35
+ const { title, ...props } = this.props;
66
36
 
67
37
  const hasTitle = Boolean(title);
68
- const heightWidth = getSize(size);
69
- const baseAlign = -0.125 * Number.parseFloat(heightWidth);
70
- const style = noVerticalAlign ? null : { verticalAlign: `${baseAlign}em` };
71
38
  const viewBox = [xOffset, yOffset, width, height].join(' ');
72
39
 
73
40
  return (
74
41
  <svg
75
- style={style}
76
- fill={color}
77
- height={heightWidth}
78
- width={heightWidth}
42
+ className="pf-svg"
79
43
  viewBox={viewBox}
44
+ fill="currentColor"
80
45
  aria-labelledby={hasTitle ? this.id : null}
81
46
  aria-hidden={hasTitle ? null : true}
82
47
  role="img"
package/src/index.ts CHANGED
@@ -1,2 +1 @@
1
- export { IconSize } from './createIcon';
2
1
  export * from './icons/index';
@@ -1,18 +0,0 @@
1
- const faIcons = require('./icons/fontawesomeIcons');
2
- const patternflyIcons = require('./icons/patternflyIcons');
3
- const customIcons = require('./icons/customIcons');
4
-
5
- /**
6
- * Generates icons from FontAwesome, PatternFly CSS, and custom icons in this repo.
7
- */
8
- function generateIcons() {
9
- return {
10
- ...faIcons,
11
- ...patternflyIcons,
12
- ...customIcons
13
- };
14
- }
15
-
16
- module.exports = {
17
- generateIcons
18
- };