@patternfly/react-icons 5.0.0-alpha.2 → 5.0.0-alpha.21

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,6 +3,100 @@
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.21 (2023-06-02)
7
+
8
+ **Note:** Version bump only for package @patternfly/react-icons
9
+
10
+ # 5.0.0-alpha.20 (2023-05-31)
11
+
12
+ **Note:** Version bump only for package @patternfly/react-icons
13
+
14
+ # 5.0.0-alpha.19 (2023-05-19)
15
+
16
+ **Note:** Version bump only for package @patternfly/react-icons
17
+
18
+ # 5.0.0-alpha.18 (2023-05-18)
19
+
20
+ ### Features
21
+
22
+ - **Flex:** add plain gap spacing ([#9143](https://github.com/patternfly/patternfly-react/issues/9143)) ([eceb265](https://github.com/patternfly/patternfly-react/commit/eceb265a5318d4c533a4c54484311bbd9810aa7d))
23
+
24
+ # 5.0.0-alpha.17 (2023-05-18)
25
+
26
+ ### Features
27
+
28
+ - **Table:** added class names for table elements ([#9133](https://github.com/patternfly/patternfly-react/issues/9133)) ([51d6d2b](https://github.com/patternfly/patternfly-react/commit/51d6d2b1a92af7bbfb0075361b375a4d881e110b))
29
+
30
+ # 5.0.0-alpha.16 (2023-05-18)
31
+
32
+ ### Features
33
+
34
+ - **FormControls:** updated logic for rendering icons ([#9132](https://github.com/patternfly/patternfly-react/issues/9132)) ([9f4863f](https://github.com/patternfly/patternfly-react/commit/9f4863f3251e365142c44aace2c1aeba57ba6b3a))
35
+
36
+ # 5.0.0-alpha.15 (2023-05-16)
37
+
38
+ **Note:** Version bump only for package @patternfly/react-icons
39
+
40
+ # [5.0.0-alpha.14](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-icons@5.0.0-alpha.13...@patternfly/react-icons@5.0.0-alpha.14) (2023-05-05)
41
+
42
+ ### Bug Fixes
43
+
44
+ - **deps:** updated Core for v5 versioning ([#9075](https://github.com/patternfly/patternfly-react/issues/9075)) ([3879fc7](https://github.com/patternfly/patternfly-react/commit/3879fc757aefeed80b0694365aa20d5ca856a797))
45
+
46
+ # 5.0.0-alpha.13 (2023-05-05)
47
+
48
+ **Note:** Version bump only for package @patternfly/react-icons
49
+
50
+ # 5.0.0-alpha.12 (2023-04-27)
51
+
52
+ ### Bug Fixes
53
+
54
+ - **createIcon:** Spread className to svg to fix broken images ([#8954](https://github.com/patternfly/patternfly-react/issues/8954)) ([8073115](https://github.com/patternfly/patternfly-react/commit/80731151f6d91299330f580262cb7e0d2ee670b8))
55
+
56
+ # 5.0.0-alpha.11 (2023-04-25)
57
+
58
+ ### Bug Fixes
59
+
60
+ - bump dependencies and remove ssl option ([#8984](https://github.com/patternfly/patternfly-react/issues/8984)) ([f8f77d2](https://github.com/patternfly/patternfly-react/commit/f8f77d232b386ad8676af609273d9adff5a5feae))
61
+
62
+ # 5.0.0-alpha.10 (2023-04-11)
63
+
64
+ ### Bug Fixes
65
+
66
+ - **icons:** fixed pficons naming overrides ([#8932](https://github.com/patternfly/patternfly-react/issues/8932)) ([1c9c9cb](https://github.com/patternfly/patternfly-react/commit/1c9c9cb7909a26d3bc4ad340d0656c0ec31d9e58))
67
+
68
+ # 5.0.0-alpha.9 (2023-04-06)
69
+
70
+ **Note:** Version bump only for package @patternfly/react-icons
71
+
72
+ # 5.0.0-alpha.8 (2023-04-03)
73
+
74
+ **Note:** Version bump only for package @patternfly/react-icons
75
+
76
+ # 5.0.0-alpha.7 (2023-03-27)
77
+
78
+ **Note:** Version bump only for package @patternfly/react-icons
79
+
80
+ # 5.0.0-alpha.6 (2023-03-18)
81
+
82
+ **Note:** Version bump only for package @patternfly/react-icons
83
+
84
+ # 5.0.0-alpha.5 (2023-03-17)
85
+
86
+ **Note:** Version bump only for package @patternfly/react-icons
87
+
88
+ # 5.0.0-alpha.4 (2023-03-02)
89
+
90
+ ### Bug Fixes
91
+
92
+ - **core:** update core to alpha.24 ([#8768](https://github.com/patternfly/patternfly-react/issues/8768)) ([6dd5e01](https://github.com/patternfly/patternfly-react/commit/6dd5e01e16bc94fe4b954b79ba67adaaab9c7135))
93
+
94
+ # 5.0.0-alpha.3 (2023-02-15)
95
+
96
+ ### Bug Fixes
97
+
98
+ - **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))
99
+
6
100
  # 5.0.0-alpha.2 (2023-02-08)
7
101
 
8
102
  **Note:** Version bump only for package @patternfly/react-icons
@@ -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,9 @@ 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;
12
+ className?: string;
22
13
  }
23
14
  /**
24
15
  * 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,oC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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,CA6BrD"}
@@ -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,16 @@ 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, className } = _a, props = __rest(_a, ["title", "className"]);
16
+ const classes = className ? `pf-v5-svg ${className}` : 'pf-v5-svg';
37
17
  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
18
  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),
19
+ return (React.createElement("svg", Object.assign({ className: classes, viewBox: viewBox, fill: "currentColor", "aria-labelledby": hasTitle ? this.id : null, "aria-hidden": hasTitle ? null : true, role: "img" }, props),
43
20
  hasTitle && React.createElement("title", { id: this.id }, title),
44
21
  React.createElement("path", { d: svgPath })));
45
22
  }
46
23
  },
47
24
  _a.displayName = name,
48
- _a.defaultProps = {
49
- color: 'currentColor',
50
- size: IconSize.sm,
51
- noVerticalAlign: false
52
- },
53
25
  _a;
54
26
  }
55
27
  //# sourceMappingURL=createIcon.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"createIcon.js","sourceRoot":"","sources":["../../src/createIcon.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,CAAN,IAAY,QAKX;AALD,WAAY,QAAQ;IAClB,qBAAS,CAAA;IACT,qBAAS,CAAA;IACT,qBAAS,CAAA;IACT,qBAAS,CAAA;AACX,CAAC,EALW,QAAQ,KAAR,QAAQ,QAKnB;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,IAAsC,EAAE,EAAE;IAChE,QAAQ,IAAI,EAAE;QACZ,KAAK,QAAQ,CAAC,EAAE;YACd,OAAO,KAAK,CAAC;QACf,KAAK,QAAQ,CAAC,EAAE;YACd,OAAO,OAAO,CAAC;QACjB,KAAK,QAAQ,CAAC,EAAE;YACd,OAAO,KAAK,CAAC;QACf,KAAK,QAAQ,CAAC,EAAE;YACd,OAAO,KAAK,CAAC;QACf;YACE,OAAO,KAAK,CAAC;KAChB;AACH,CAAC,CAAC;AAkBF,IAAI,SAAS,GAAG,CAAC,CAAC;AAElB;;GAEG;AACH,MAAM,UAAU,UAAU,CAAC,EACzB,IAAI,EACJ,OAAO,GAAG,CAAC,EACX,OAAO,GAAG,CAAC,EACX,KAAK,EACL,MAAM,EACN,OAAO,EACQ;;IACf,YAAO,MAAM,OAAQ,SAAQ,KAAK,CAAC,SAAuB;YAAnD;;gBAQL,OAAE,GAAG,cAAc,SAAS,EAAE,EAAE,CAAC;YA4BnC,CAAC;YA1BC,MAAM;gBACJ,MAAM,KAAoD,IAA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@@ export { MountainIcon, MountainIconConfig } from './mountain-icon';
919
919
  export { MouseIcon, MouseIconConfig } from './mouse-icon';
920
920
  export { MousePointerIcon, MousePointerIconConfig } from './mouse-pointer-icon';
921
921
  export { MugHotIcon, MugHotIconConfig } from './mug-hot-icon';
922
+ export { MulticlusterIcon, MulticlusterIconConfig } from './multicluster-icon';
922
923
  export { MusicIcon, MusicIconConfig } from './music-icon';
923
924
  export { NamespacesIcon, NamespacesIconConfig } from './namespaces-icon';
924
925
  export { NapsterIcon, NapsterIconConfig } from './napster-icon';
@@ -919,6 +919,7 @@ export { MountainIcon, MountainIconConfig } from './mountain-icon';
919
919
  export { MouseIcon, MouseIconConfig } from './mouse-icon';
920
920
  export { MousePointerIcon, MousePointerIconConfig } from './mouse-pointer-icon';
921
921
  export { MugHotIcon, MugHotIconConfig } from './mug-hot-icon';
922
+ export { MulticlusterIcon, MulticlusterIconConfig } from './multicluster-icon';
922
923
  export { MusicIcon, MusicIconConfig } from './music-icon';
923
924
  export { NamespacesIcon, NamespacesIconConfig } from './namespaces-icon';
924
925
  export { NapsterIcon, NapsterIconConfig } from './napster-icon';
@@ -0,0 +1,12 @@
1
+ import * as React from 'react';
2
+ import { SVGIconProps } from '../createIcon';
3
+ export declare const MulticlusterIconConfig: {
4
+ name: 'MulticlusterIcon',
5
+ height: 1024,
6
+ width: 896,
7
+ svgPath: 'M768,768 C732.654,768 704,739.346 704,704 C704,668.654 732.654,640 768,640 C803.346,640 832,668.654 832,704 C832,739.346 803.346,768 768,768 L768,768 Z M768,576 C697.308,576 640,633.308 640,704 C640,774.692 697.308,832 768,832 C838.692,832 896,774.692 896,704 C896,633.308 838.692,576 768,576 L768,576 Z M128,384 C92.654,384 64,355.346 64,320 C64,284.654 92.654,256 128,256 C163.346,256 192,284.654 192,320 C192,355.346 163.346,384 128,384 L128,384 Z M128,192 C57.308,192 0,249.308 0,320 C0,390.692 57.308,448 128,448 C198.692,448 256,390.692 256,320 C256,249.308 198.692,192 128,192 L128,192 Z M658.229,769.862 L448,896 L128,704 L128,448 C151.315,448 173.172,441.763 192,430.872 L192,665.7 L448,819.2 L640.001,704.074 C640.015,728.135 646.671,750.64 658.229,769.862 L658.229,769.862 Z M704,358.7 L551.526,267.275 C564.619,249.299 573.145,227.788 575.397,204.438 L768,320 L768,576 C744.685,576 722.828,582.237 704,593.128 L704,358.7 Z M237.771,254.138 L320.603,204.438 C322.855,227.788 331.381,249.3 344.474,267.275 L255.996,320.328 C255.996,320.218 256,320.109 256,320 C256,295.911 249.341,273.38 237.771,254.138 L237.771,254.138 Z M448,256 C412.654,256 384,227.346 384,192 C384,156.654 412.654,128 448,128 C483.346,128 512,156.654 512,192 C512,227.346 483.346,256 448,256 L448,256 Z M448,64 C377.308,64 320,121.308 320,192 C320,262.692 377.308,320 448,320 C518.692,320 576,262.692 576,192 C576,121.308 518.692,64 448,64 L448,64 Z',
8
+ yOffset: 0,
9
+ xOffset: 0,
10
+ };
11
+ export declare const MulticlusterIcon: React.ComponentClass<SVGIconProps>;
12
+ export default MulticlusterIcon;
@@ -0,0 +1,14 @@
1
+ import { createIcon } from '../createIcon';
2
+
3
+ export const MulticlusterIconConfig = {
4
+ name: 'MulticlusterIcon',
5
+ height: 1024,
6
+ width: 896,
7
+ svgPath: 'M768,768 C732.654,768 704,739.346 704,704 C704,668.654 732.654,640 768,640 C803.346,640 832,668.654 832,704 C832,739.346 803.346,768 768,768 L768,768 Z M768,576 C697.308,576 640,633.308 640,704 C640,774.692 697.308,832 768,832 C838.692,832 896,774.692 896,704 C896,633.308 838.692,576 768,576 L768,576 Z M128,384 C92.654,384 64,355.346 64,320 C64,284.654 92.654,256 128,256 C163.346,256 192,284.654 192,320 C192,355.346 163.346,384 128,384 L128,384 Z M128,192 C57.308,192 0,249.308 0,320 C0,390.692 57.308,448 128,448 C198.692,448 256,390.692 256,320 C256,249.308 198.692,192 128,192 L128,192 Z M658.229,769.862 L448,896 L128,704 L128,448 C151.315,448 173.172,441.763 192,430.872 L192,665.7 L448,819.2 L640.001,704.074 C640.015,728.135 646.671,750.64 658.229,769.862 L658.229,769.862 Z M704,358.7 L551.526,267.275 C564.619,249.299 573.145,227.788 575.397,204.438 L768,320 L768,576 C744.685,576 722.828,582.237 704,593.128 L704,358.7 Z M237.771,254.138 L320.603,204.438 C322.855,227.788 331.381,249.3 344.474,267.275 L255.996,320.328 C255.996,320.218 256,320.109 256,320 C256,295.911 249.341,273.38 237.771,254.138 L237.771,254.138 Z M448,256 C412.654,256 384,227.346 384,192 C384,156.654 412.654,128 448,128 C483.346,128 512,156.654 512,192 C512,227.346 483.346,256 448,256 L448,256 Z M448,64 C377.308,64 320,121.308 320,192 C320,262.692 377.308,320 448,320 C518.692,320 576,262.692 576,192 C576,121.308 518.692,64 448,64 L448,64 Z',
8
+ yOffset: 0,
9
+ xOffset: 0,
10
+ };
11
+
12
+ export const MulticlusterIcon = createIcon(MulticlusterIconConfig);
13
+
14
+ export default MulticlusterIcon;
@@ -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,9 @@ 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;
12
+ className?: string;
22
13
  }
23
14
  /**
24
15
  * 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;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;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,CA6BrD"}
@@ -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,16 @@ 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, className } = _a, props = tslib_1.__rest(_a, ["title", "className"]);
19
+ const classes = className ? `pf-v5-svg ${className}` : 'pf-v5-svg';
41
20
  const hasTitle = Boolean(title);
42
- const heightWidth = (0, exports.getSize)(size);
43
- const baseAlign = -0.125 * Number.parseFloat(heightWidth);
44
- const style = noVerticalAlign ? null : { verticalAlign: `${baseAlign}em` };
45
21
  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),
22
+ return (React.createElement("svg", Object.assign({ className: classes, viewBox: viewBox, fill: "currentColor", "aria-labelledby": hasTitle ? this.id : null, "aria-hidden": hasTitle ? null : true, role: "img" }, props),
47
23
  hasTitle && React.createElement("title", { id: this.id }, title),
48
24
  React.createElement("path", { d: svgPath })));
49
25
  }
50
26
  },
51
27
  _a.displayName = name,
52
- _a.defaultProps = {
53
- color: 'currentColor',
54
- size: IconSize.sm,
55
- noVerticalAlign: false
56
- },
57
28
  _a;
58
29
  }
59
30
  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,qBAAS,CAAA;IACT,qBAAS,CAAA;AACX,CAAC,EALW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAKnB;AAEM,MAAM,OAAO,GAAG,CAAC,IAAsC,EAAE,EAAE;IAChE,QAAQ,IAAI,EAAE;QACZ,KAAK,QAAQ,CAAC,EAAE;YACd,OAAO,KAAK,CAAC;QACf,KAAK,QAAQ,CAAC,EAAE;YACd,OAAO,OAAO,CAAC;QACjB,KAAK,QAAQ,CAAC,EAAE;YACd,OAAO,KAAK,CAAC;QACf,KAAK,QAAQ,CAAC,EAAE;YACd,OAAO,KAAK,CAAC;QACf;YACE,OAAO,KAAK,CAAC;KAChB;AACH,CAAC,CAAC;AAbW,QAAA,OAAO,WAalB;AAkBF,IAAI,SAAS,GAAG,CAAC,CAAC;AAElB;;GAEG;AACH,SAAgB,UAAU,CAAC,EACzB,IAAI,EACJ,OAAO,GAAG,CAAC,EACX,OAAO,GAAG,CAAC,EACX,KAAK,EACL,MAAM,EACN,OAAO,EACQ;;IACf,YAAO,MAAM,OAAQ,SAAQ,KAAK,CAAC,SAAuB;YAAnD;;gBAQL,OAAE,GAAG,cAAc,SAAS,EAAE,EAAE,CAAC;YA4BnC,CAAC;YA1BC,MAAM;gBACJ,MAAM,KAAoD,IAAI,CAAC,KAAK,EAA9D,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,eAAe,OAAyB,EAApB,KAAK,sBAA/C,6CAAiD,CAAa,CAAC;gBAErE,MAAM,QAAQ,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;gBAChC,MAAM,WAAW,GAAG,IAAA,eAAO,EAAC,IAA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;;IACf,YAAO,MAAM,OAAQ,SAAQ,KAAK,CAAC,SAAuB;YAAnD;;gBAGL,OAAE,GAAG,cAAc,SAAS,EAAE,EAAE,CAAC;YAwBnC,CAAC;YAtBC,MAAM;gBACJ,MAAM,KAAiC,IAAI,CAAC,KAAK,EAA3C,EAAE,KAAK,EAAE,SAAS,OAAyB,EAApB,KAAK,sBAA5B,sBAA8B,CAAa,CAAC;gBAClD,MAAM,OAAO,GAAG,SAAS,CAAC,CAAC,CAAC,aAAa,SAAS,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC;gBAEnE,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,EAAE,OAAO,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;QA1BQ,cAAW,GAAG,IAAK;WA0B1B;AACJ,CAAC;AApCD,gCAoCC"}
@@ -919,6 +919,7 @@ export { MountainIcon, MountainIconConfig } from './mountain-icon';
919
919
  export { MouseIcon, MouseIconConfig } from './mouse-icon';
920
920
  export { MousePointerIcon, MousePointerIconConfig } from './mouse-pointer-icon';
921
921
  export { MugHotIcon, MugHotIconConfig } from './mug-hot-icon';
922
+ export { MulticlusterIcon, MulticlusterIconConfig } from './multicluster-icon';
922
923
  export { MusicIcon, MusicIconConfig } from './music-icon';
923
924
  export { NamespacesIcon, NamespacesIconConfig } from './namespaces-icon';
924
925
  export { NapsterIcon, NapsterIconConfig } from './napster-icon';
@@ -924,6 +924,7 @@ __export(require('./mountain-icon'));
924
924
  __export(require('./mouse-icon'));
925
925
  __export(require('./mouse-pointer-icon'));
926
926
  __export(require('./mug-hot-icon'));
927
+ __export(require('./multicluster-icon'));
927
928
  __export(require('./music-icon'));
928
929
  __export(require('./namespaces-icon'));
929
930
  __export(require('./napster-icon'));
@@ -0,0 +1,12 @@
1
+ import * as React from 'react';
2
+ import { SVGIconProps } from '../createIcon';
3
+ export declare const MulticlusterIconConfig: {
4
+ name: 'MulticlusterIcon',
5
+ height: 1024,
6
+ width: 896,
7
+ svgPath: 'M768,768 C732.654,768 704,739.346 704,704 C704,668.654 732.654,640 768,640 C803.346,640 832,668.654 832,704 C832,739.346 803.346,768 768,768 L768,768 Z M768,576 C697.308,576 640,633.308 640,704 C640,774.692 697.308,832 768,832 C838.692,832 896,774.692 896,704 C896,633.308 838.692,576 768,576 L768,576 Z M128,384 C92.654,384 64,355.346 64,320 C64,284.654 92.654,256 128,256 C163.346,256 192,284.654 192,320 C192,355.346 163.346,384 128,384 L128,384 Z M128,192 C57.308,192 0,249.308 0,320 C0,390.692 57.308,448 128,448 C198.692,448 256,390.692 256,320 C256,249.308 198.692,192 128,192 L128,192 Z M658.229,769.862 L448,896 L128,704 L128,448 C151.315,448 173.172,441.763 192,430.872 L192,665.7 L448,819.2 L640.001,704.074 C640.015,728.135 646.671,750.64 658.229,769.862 L658.229,769.862 Z M704,358.7 L551.526,267.275 C564.619,249.299 573.145,227.788 575.397,204.438 L768,320 L768,576 C744.685,576 722.828,582.237 704,593.128 L704,358.7 Z M237.771,254.138 L320.603,204.438 C322.855,227.788 331.381,249.3 344.474,267.275 L255.996,320.328 C255.996,320.218 256,320.109 256,320 C256,295.911 249.341,273.38 237.771,254.138 L237.771,254.138 Z M448,256 C412.654,256 384,227.346 384,192 C384,156.654 412.654,128 448,128 C483.346,128 512,156.654 512,192 C512,227.346 483.346,256 448,256 L448,256 Z M448,64 C377.308,64 320,121.308 320,192 C320,262.692 377.308,320 448,320 C518.692,320 576,262.692 576,192 C576,121.308 518.692,64 448,64 L448,64 Z',
8
+ yOffset: 0,
9
+ xOffset: 0,
10
+ };
11
+ export declare const MulticlusterIcon: React.ComponentClass<SVGIconProps>;
12
+ export default MulticlusterIcon;
@@ -0,0 +1,12 @@
1
+ "use strict"
2
+ exports.__esModule = true;
3
+ exports.MulticlusterIconConfig = {
4
+ name: 'MulticlusterIcon',
5
+ height: 1024,
6
+ width: 896,
7
+ svgPath: 'M768,768 C732.654,768 704,739.346 704,704 C704,668.654 732.654,640 768,640 C803.346,640 832,668.654 832,704 C832,739.346 803.346,768 768,768 L768,768 Z M768,576 C697.308,576 640,633.308 640,704 C640,774.692 697.308,832 768,832 C838.692,832 896,774.692 896,704 C896,633.308 838.692,576 768,576 L768,576 Z M128,384 C92.654,384 64,355.346 64,320 C64,284.654 92.654,256 128,256 C163.346,256 192,284.654 192,320 C192,355.346 163.346,384 128,384 L128,384 Z M128,192 C57.308,192 0,249.308 0,320 C0,390.692 57.308,448 128,448 C198.692,448 256,390.692 256,320 C256,249.308 198.692,192 128,192 L128,192 Z M658.229,769.862 L448,896 L128,704 L128,448 C151.315,448 173.172,441.763 192,430.872 L192,665.7 L448,819.2 L640.001,704.074 C640.015,728.135 646.671,750.64 658.229,769.862 L658.229,769.862 Z M704,358.7 L551.526,267.275 C564.619,249.299 573.145,227.788 575.397,204.438 L768,320 L768,576 C744.685,576 722.828,582.237 704,593.128 L704,358.7 Z M237.771,254.138 L320.603,204.438 C322.855,227.788 331.381,249.3 344.474,267.275 L255.996,320.328 C255.996,320.218 256,320.109 256,320 C256,295.911 249.341,273.38 237.771,254.138 L237.771,254.138 Z M448,256 C412.654,256 384,227.346 384,192 C384,156.654 412.654,128 448,128 C483.346,128 512,156.654 512,192 C512,227.346 483.346,256 448,256 L448,256 Z M448,64 C377.308,64 320,121.308 320,192 C320,262.692 377.308,320 448,320 C518.692,320 576,262.692 576,192 C576,121.308 518.692,64 448,64 L448,64 Z',
8
+ yOffset: 0,
9
+ xOffset: 0,
10
+ };
11
+ exports.MulticlusterIcon = require('../createIcon').createIcon(exports.MulticlusterIconConfig);
12
+ exports["default"] = exports.MulticlusterIcon;
@@ -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.2",
3
+ "version": "5.0.0-alpha.21",
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.12",
36
- "fs-extra": "^6.0.1",
35
+ "@patternfly/patternfly": "5.0.0-alpha.74",
36
+ "fs-extra": "^11.1.1",
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": "dd91c73c726d471205cc7ce2cf463fa8c1a6e593"
46
+ "gitHead": "ed9000303ee57e753010e884ab9f3db6acea5b15"
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/pficons.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,9 @@ 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;
14
+ className?: string;
39
15
  }
40
16
 
41
17
  let currentId = 0;
@@ -53,30 +29,21 @@ export function createIcon({
53
29
  }: IconDefinition): React.ComponentClass<SVGIconProps> {
54
30
  return class SVGIcon extends React.Component<SVGIconProps> {
55
31
  static displayName = name;
56
- static defaultProps = {
57
- color: 'currentColor',
58
- size: IconSize.sm,
59
- noVerticalAlign: false
60
- };
61
32
 
62
33
  id = `icon-title-${currentId++}`;
63
34
 
64
35
  render() {
65
- const { size, color, title, noVerticalAlign, ...props } = this.props;
36
+ const { title, className, ...props } = this.props;
37
+ const classes = className ? `pf-v5-svg ${className}` : 'pf-v5-svg';
66
38
 
67
39
  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
40
  const viewBox = [xOffset, yOffset, width, height].join(' ');
72
41
 
73
42
  return (
74
43
  <svg
75
- style={style}
76
- fill={color}
77
- height={heightWidth}
78
- width={heightWidth}
44
+ className={classes}
79
45
  viewBox={viewBox}
46
+ fill="currentColor"
80
47
  aria-labelledby={hasTitle ? this.id : null}
81
48
  aria-hidden={hasTitle ? null : true}
82
49
  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
- };