Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Generated icon files - these are auto-generated and should not be formatted
packages/react-icons/scripts/icons/rhIcons*.mjs
packages/react-icons/scripts/icons/rhdsIcons*.mjs

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"@eslint/compat": "^1.3.1",
"@eslint/js": "^9.32.0",
"@octokit/rest": "^21.1.1",
"@rhds/icons": "^2.0.0",
"@rollup/plugin-commonjs": "^26.0.3",
"@rollup/plugin-node-resolve": "^15.3.1",
"@rollup/plugin-replace": "^5.0.7",
Expand Down
11 changes: 8 additions & 3 deletions packages/react-docs/patternfly-docs/pages/icons.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
// eslint-disable-next-line
import React from 'react';
import { Content } from '@patternfly/react-core/dist/esm/components/Content';
import { Icon } from '@patternfly/react-core/dist/esm/components/Icon';
import { Grid, GridItem } from '@patternfly/react-core/dist/esm/layouts/Grid';
import { PageSection } from '@patternfly/react-core/dist/esm/components/Page/PageSection';
import { Tooltip } from '@patternfly/react-core/dist/esm/components/Tooltip';
import spacerMd from '@patternfly/react-tokens/dist/esm/t_global_spacer_md';
import spacerSm from '@patternfly/react-tokens/dist/esm/t_global_spacer_sm';
import labelFontSize from '@patternfly/react-tokens/dist/esm/t_global_font_size_sm';
import * as IconsModule from '@patternfly/react-icons/dist/esm';

Expand All @@ -17,7 +19,8 @@ const iconsPage = () => {
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
padding: spacerMd.var
padding: spacerMd.var,
gap: spacerSm.var
};

const labelStyle = {
Expand Down Expand Up @@ -53,10 +56,12 @@ const iconsPage = () => {
// BREAKING CHANGE - remove line below when AnsibeTowerIcon is removed
// hide AnsibeTowerIcon in favor of corrected AnsibleTowerIcon
.filter(([id]) => id !== 'AnsibeTowerIcon')
.map(([id, Icon]) => (
.map(([id, ReactIcon]) => (
<GridItem key={id} style={cellStyle} sm={6} md={4} lg={2}>
<Tooltip content={<div>{id}</div>}>
<Icon size="xl" title={id} />
<Icon size="xl">
<ReactIcon title={id} />
</Icon>
</Tooltip>
<div style={labelStyle}>{getLabel(id)}</div>
</GridItem>
Expand Down
1 change: 1 addition & 0 deletions packages/react-icons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"@fortawesome/free-regular-svg-icons": "^5.15.4",
"@fortawesome/free-solid-svg-icons": "^5.15.4",
"@patternfly/patternfly": "6.5.0-prerelease.27",
"@rhds/icons": "^2.0.0",
"fs-extra": "^11.3.0",
"tslib": "^2.8.1"
},
Expand Down
10 changes: 9 additions & 1 deletion packages/react-icons/scripts/generateIcons.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import faIcons from './icons/fontawesomeIcons.mjs';
import patternflyIcons from './icons/patternflyIcons.mjs';
import customIcons from './icons/customIcons.mjs';
import rhIconsMicrons from './icons/rhIconsMicrons.mjs';
import rhIconsStandard from './icons/rhIconsStandard.mjs';
import rhIconsSocial from './icons/rhIconsSocial.mjs';
import rhIconsUI from './icons/rhIconsUI.mjs';

/**
* Generates icons from FontAwesome, PatternFly CSS, and custom icons in this repo.
Expand All @@ -9,6 +13,10 @@ export function generateIcons() {
return {
...faIcons,
...patternflyIcons,
...customIcons
...customIcons,
...rhIconsMicrons,
...rhIconsStandard,
...rhIconsSocial,
...rhIconsUI
};
}
154 changes: 154 additions & 0 deletions packages/react-icons/scripts/icons/rhIconsMicrons.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
export default {
'rh-microns-arrow-down': {
xOffset: 0,
yOffset: 0,
width: 20,
height: 20,
svgPathData:
'M16.71 11.29a.996.996 0 0 0-1.41 0l-4.29 4.29V2c0-.55-.45-1-1-1s-1 .45-1 1v13.59L4.72 11.3a.987.987 0 0 0-1.41-.02.987.987 0 0 0-.02 1.41l.02.02 5.65 5.65c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.65-5.65a.996.996 0 0 0 0-1.41Z'
},
'rh-microns-arrow-left': {
xOffset: 0,
yOffset: 0,
width: 20,
height: 20,
svgPathData:
'M18 9H4.41L8.7 4.71c.4-.38.41-1.02.02-1.41a.987.987 0 0 0-1.41-.02l-.02.02-5.64 5.64c-.58.59-.58 1.53 0 2.12l5.65 5.65a.996.996 0 1 0 1.41-1.41l-4.29-4.29h13.59c.55 0 1-.45 1-1s-.45-1-1-1Z'
},
'rh-microns-arrow-right': {
xOffset: 0,
yOffset: 0,
width: 20,
height: 20,
svgPathData:
'M18.35 8.94 12.7 3.29a.987.987 0 0 0-1.41-.02.987.987 0 0 0-.02 1.41l.02.02 4.29 4.29H2c-.55 0-1 .45-1 1s.45 1 1 1h13.59l-4.29 4.29a.987.987 0 0 0-.02 1.41c.38.4 1.02.41 1.41.02l.02-.02 5.65-5.65c.59-.59.59-1.53 0-2.12Z'
},
'rh-microns-arrow-up': {
xOffset: 0,
yOffset: 0,
width: 20,
height: 20,
svgPathData:
'm16.71 7.29-5.65-5.64c-.59-.58-1.53-.58-2.12 0L3.29 7.29a.987.987 0 0 0-.02 1.41c.38.4 1.02.41 1.41.02l.02-.02 4.29-4.29V18c0 .55.45 1 1 1s1-.45 1-1V4.41l4.29 4.29a.996.996 0 1 0 1.41-1.41Z'
},
'rh-microns-caret-down-fill': {
xOffset: 0,
yOffset: 0,
width: 20,
height: 20,
svgPathData:
'M18.92 5.62C18.77 5.25 18.4 5 18 5H2a1.003 1.003 0 0 0-.71 1.71l7.65 7.65c.29.29.68.44 1.06.44s.77-.15 1.06-.44l7.65-7.65c.29-.29.37-.72.22-1.09Z'
},
'rh-microns-caret-down': {
xOffset: 0,
yOffset: 0,
width: 20,
height: 20,
svgPathData:
'M18.71 5.29a.996.996 0 0 0-1.41 0l-7.29 7.29-7.3-7.29a.987.987 0 0 0-1.41-.02.987.987 0 0 0-.02 1.41l.02.02 7.65 7.65c.29.29.68.44 1.06.44s.77-.15 1.06-.44l7.65-7.65a.996.996 0 0 0 0-1.41Z'
},
'rh-microns-caret-left-fill': {
xOffset: 0,
yOffset: 0,
width: 20,
height: 20,
svgPathData:
'M13.38 1.08a.988.988 0 0 0-1.09.22L4.64 8.95a1.49 1.49 0 0 0 0 2.12l7.65 7.65a.996.996 0 0 0 1.7-.71V2c0-.4-.24-.77-.62-.92Z'
},
'rh-microns-caret-left': {
xOffset: 0,
yOffset: 0,
width: 20,
height: 20,
svgPathData:
'm6.41 10 7.29-7.29.02-.02c.38-.4.37-1.03-.02-1.41-.4-.38-1.03-.37-1.41.02L4.64 8.95a1.49 1.49 0 0 0 0 2.12l7.65 7.65c.19.19.44.29.71.29.27 0 .52-.11.71-.29a.996.996 0 0 0 0-1.41l-7.29-7.29Z'
},
'rh-microns-caret-right-fill': {
xOffset: 0,
yOffset: 0,
width: 20,
height: 20,
svgPathData:
'M14.35 8.94 6.71 1.29a.996.996 0 0 0-1.7.71v16a1.003 1.003 0 0 0 1.71.71l7.65-7.65c.59-.59.59-1.54 0-2.12Z'
},
'rh-microns-caret-right': {
xOffset: 0,
yOffset: 0,
width: 20,
height: 20,
svgPathData:
'M14.35 8.94 6.71 1.29l-.02-.02c-.4-.38-1.03-.37-1.41.02-.38.4-.37 1.03.02 1.41l7.29 7.29-7.29 7.29a1.003 1.003 0 0 0 1.42 1.42l7.65-7.65c.59-.59.59-1.54 0-2.12Z'
},
'rh-microns-caret-up-fill': {
xOffset: 0,
yOffset: 0,
width: 20,
height: 20,
svgPathData:
'm18.71 13.29-7.65-7.65a1.49 1.49 0 0 0-2.12 0s-7.65 7.65-7.65 7.65a.996.996 0 0 0 .71 1.7h16a1.003 1.003 0 0 0 .71-1.71Z'
},
'rh-microns-caret-up': {
xOffset: 0,
yOffset: 0,
width: 20,
height: 20,
svgPathData:
'm18.71 13.29-7.65-7.65a1.49 1.49 0 0 0-2.12 0l-7.65 7.65-.02.02c-.38.4-.37 1.03.02 1.41.4.38 1.03.37 1.41-.02l7.29-7.29 7.29 7.29c.19.19.44.29.71.29.27 0 .52-.11.71-.29a.996.996 0 0 0 0-1.41Z'
},
'rh-microns-checkbox-complete-fill': {
xOffset: 0,
yOffset: 0,
width: 20,
height: 20,
svgPathData:
'M17.5 1h-15C1.67 1 1 1.67 1 2.5v15c0 .83.67 1.5 1.5 1.5h15c.83 0 1.5-.67 1.5-1.5v-15c0-.83-.67-1.5-1.5-1.5Zm-1.7 6.8-5.65 5.65c-.32.32-.73.47-1.15.47s-.83-.16-1.15-.47L5.2 10.8c-.43-.45-.41-1.16.04-1.59.44-.42 1.12-.42 1.56 0L9 11.42l5.2-5.2c.45-.43 1.16-.41 1.59.04.42.44.42 1.12 0 1.56Z'
},
'rh-microns-checkbox-complete': {
xOffset: 0,
yOffset: 0,
width: 20,
height: 20,
svgPathData:
'm5.29 10.71 2.65 2.65c.29.29.68.44 1.06.44s.77-.15 1.06-.44l4.65-4.65c.4-.38.41-1.02.02-1.41a.987.987 0 0 0-1.41-.02l-.02.02-4.29 4.29L6.72 9.3a.987.987 0 0 0-1.41-.02.987.987 0 0 0-.02 1.41l.02.02ZM17.5 1h-15C1.67 1 1 1.67 1 2.5v15c0 .83.67 1.5 1.5 1.5h15c.83 0 1.5-.67 1.5-1.5v-15c0-.83-.67-1.5-1.5-1.5ZM17 17H3V3h14v14Z'
},
'rh-microns-checkbox-incomplete': {
xOffset: 0,
yOffset: 0,
width: 20,
height: 20,
svgPathData:
'M17.5 1h-15C1.67 1 1 1.67 1 2.5v15c0 .83.67 1.5 1.5 1.5h15c.83 0 1.5-.67 1.5-1.5v-15c0-.83-.67-1.5-1.5-1.5ZM17 17H3V3h14v14Z'
},
'rh-microns-checkmark': {
xOffset: 0,
yOffset: 0,
width: 20,
height: 20,
svgPathData:
'M18.71 4.27c-.4-.38-1.03-.37-1.41.02L7 14.59 2.71 10.3l-.02-.02c-.4-.38-1.03-.37-1.41.02-.38.4-.37 1.03.02 1.41l4.65 4.65a1.499 1.499 0 0 0 2.12 0L18.72 5.71l.02-.02c.38-.4.37-1.03-.02-1.41Z'
},
'rh-microns-close': {
xOffset: 0,
yOffset: 0,
width: 20,
height: 20,
svgPathData:
'M17.8 16.2 11.59 10l6.21-6.21c.42-.46.39-1.17-.07-1.59-.43-.4-1.09-.4-1.52 0l-6.2 6.2-6.22-6.19c-.44-.44-1.15-.44-1.59 0-.44.44-.44 1.15 0 1.59l6.2 6.21-6.2 6.2c-.42.46-.39 1.17.07 1.59.43.4 1.09.4 1.52 0L10 11.59l6.2 6.2c.44.44 1.15.44 1.59 0 .44-.45.44-1.16 0-1.6Z'
},
'rh-microns-external-link': {
xOffset: 0,
yOffset: 0,
width: 20,
height: 20,
svgPathData:
'M18 14c-.55 0-1 .45-1 1v2H3V3h2c.55 0 1-.45 1-1s-.45-1-1-1H2.5C1.67 1 1 1.67 1 2.5v15c0 .83.67 1.5 1.5 1.5h15c.83 0 1.5-.67 1.5-1.5V15c0-.55-.45-1-1-1Zm-.5-13H11c-.55 0-1 .45-1 1s.45 1 1 1h4.59L8.3 10.29a.987.987 0 0 0-.02 1.41c.38.4 1.02.41 1.41.02l.02-.02L17 4.41V9c0 .55.45 1 1 1s1-.45 1-1V2.5c0-.83-.67-1.5-1.5-1.5Z'
},
'rh-microns-search': {
xOffset: 0,
yOffset: 0,
width: 20,
height: 20,
svgPathData:
'm18.8 17.21-4.41-4.41A7.906 7.906 0 0 0 16 8c0-4.41-3.59-8-8-8S0 3.59 0 8s3.59 8 8 8c1.73 0 3.42-.57 4.8-1.61l4.41 4.41c.44.44 1.15.44 1.59 0 .44-.44.44-1.15 0-1.59ZM8 14c-3.31 0-6-2.69-6-6s2.69-6 6-6 6 2.69 6 6-2.69 6-6 6Z'
}
};
Loading
Loading