diff --git a/packages/react-core/src/components/EmptyState/__tests__/Generated/__snapshots__/EmptyStateIcon.test.tsx.snap b/packages/react-core/src/components/EmptyState/__tests__/Generated/__snapshots__/EmptyStateIcon.test.tsx.snap index 3147762552f..70af63945e2 100644 --- a/packages/react-core/src/components/EmptyState/__tests__/Generated/__snapshots__/EmptyStateIcon.test.tsx.snap +++ b/packages/react-core/src/components/EmptyState/__tests__/Generated/__snapshots__/EmptyStateIcon.test.tsx.snap @@ -12,7 +12,7 @@ exports[`EmptyStateIcon should match snapshot (auto-generated) 1`] = ` class="''" fill="currentColor" role="img" - viewBox="0 0 830 1024" + viewBox="0 0 448 512" > <path - d="M0,1024 C7.8,907.1 37.3,664.2 147.8,568.3 C147.8,568.3 207.5,511.5 298.4,511.996718 L530.3,511.996718 C621.3,511.996718 680.9,568.3 680.9,568.3 C680.9,568.3 813.9,680.1 830,1024 L0,1024 Z M639.4,224 C639.4,347.7 539.1,448 415.4,448 C291.7,448 191.4,347.7 191.4,224 C191.4,100.3 291.9,0 415.6,0 C539.3,0 639.4,100.3 639.4,224 L639.4,224 Z" + d="M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z" /> </svg> </div> diff --git a/packages/react-core/src/components/TreeView/__tests__/__snapshots__/TreeView.test.tsx.snap b/packages/react-core/src/components/TreeView/__tests__/__snapshots__/TreeView.test.tsx.snap index bfb04f43364..00226cfaa20 100644 --- a/packages/react-core/src/components/TreeView/__tests__/__snapshots__/TreeView.test.tsx.snap +++ b/packages/react-core/src/components/TreeView/__tests__/__snapshots__/TreeView.test.tsx.snap @@ -2222,10 +2222,10 @@ exports[`tree view renders icons successfully 1`] = ` class="pf-svg" fill="currentColor" role="img" - viewBox="0 0 1217 1024" + viewBox="0 0 576 512" > <path - d="M1199.6,520.6 C1187.8,514.9 1174.4,512 1159.3,512 L412.7,512 C288.5,512 236.7,593.1 236.7,593.1 L75.6,810.6 L150,552.2 C162,520.1 187.3,492.8 225.6,470.4 C263.9,448 304.1,448 345.8,448 L1089,448 L1089,256 C1089,256 1089,192 1025,192 L503.3,192 L470.6,130.1 C470.6,130.1 440,64 374.7,64 L65,64 C1,64 1,128 1,128 L1,960 L807.7,960 C837,960 868.9,952.166667 903.4,936.5 C937.9,920.8 964.6,901.5 983.7,879 L1196.4,593.2 C1210.2,577.7 1217,561.41 1217,549.3 C1217,537.19 1211.3,526.3 1199.6,520.6" + d="M572.694 292.093L500.27 416.248A63.997 63.997 0 0 1 444.989 448H45.025c-18.523 0-30.064-20.093-20.731-36.093l72.424-124.155A64 64 0 0 1 152 256h399.964c18.523 0 30.064 20.093 20.73 36.093zM152 224h328v-48c0-26.51-21.49-48-48-48H272l-64-64H48C21.49 64 0 85.49 0 112v278.046l69.077-118.418C86.214 242.25 117.989 224 152 224z" /> </svg> </span> @@ -2609,10 +2609,10 @@ exports[`tree view renders individual flag options successfully 1`] = ` class="pf-svg" fill="currentColor" role="img" - viewBox="0 0 1217 1024" + viewBox="0 0 576 512" > <path - d="M1199.6,520.6 C1187.8,514.9 1174.4,512 1159.3,512 L412.7,512 C288.5,512 236.7,593.1 236.7,593.1 L75.6,810.6 L150,552.2 C162,520.1 187.3,492.8 225.6,470.4 C263.9,448 304.1,448 345.8,448 L1089,448 L1089,256 C1089,256 1089,192 1025,192 L503.3,192 L470.6,130.1 C470.6,130.1 440,64 374.7,64 L65,64 C1,64 1,128 1,128 L1,960 L807.7,960 C837,960 868.9,952.166667 903.4,936.5 C937.9,920.8 964.6,901.5 983.7,879 L1196.4,593.2 C1210.2,577.7 1217,561.41 1217,549.3 C1217,537.19 1211.3,526.3 1199.6,520.6" + d="M572.694 292.093L500.27 416.248A63.997 63.997 0 0 1 444.989 448H45.025c-18.523 0-30.064-20.093-20.731-36.093l72.424-124.155A64 64 0 0 1 152 256h399.964c18.523 0 30.064 20.093 20.73 36.093zM152 224h328v-48c0-26.51-21.49-48-48-48H272l-64-64H48C21.49 64 0 85.49 0 112v278.046l69.077-118.418C86.214 242.25 117.989 224 152 224z" /> </svg> </span> diff --git a/packages/react-icons/scripts/generateIcons.mjs b/packages/react-icons/scripts/generateIcons.mjs index ec4de31802d..b7324e5e4bd 100644 --- a/packages/react-icons/scripts/generateIcons.mjs +++ b/packages/react-icons/scripts/generateIcons.mjs @@ -1,5 +1,5 @@ import faIcons from './icons/fontawesomeIcons.js'; -import { pfIcons } from '@patternfly/patternfly/icons/pf-icons.mjs'; +import patternflyIcons from './icons/patternflyIcons.mjs'; import customIcons from './icons/customIcons.js'; /** @@ -8,7 +8,7 @@ import customIcons from './icons/customIcons.js'; export function generateIcons() { return { ...faIcons, - ...pfIcons, + ...patternflyIcons, ...customIcons }; } diff --git a/packages/react-icons/scripts/icons/patternflyIcons.mjs b/packages/react-icons/scripts/icons/patternflyIcons.mjs index b715701e290..e8878dfec72 100644 --- a/packages/react-icons/scripts/icons/patternflyIcons.mjs +++ b/packages/react-icons/scripts/icons/patternflyIcons.mjs @@ -18,7 +18,7 @@ const renaming = { /** * @param {object} icons Icons like { screen: { "width": 1024, "height": 1024, "svgPathData": "" } } */ -export function convertIcons(icons) { +function convertIcons(icons) { delete icons.history; Object.entries(renaming).forEach(([oldKey, newKey]) => { @@ -29,3 +29,5 @@ export function convertIcons(icons) { return icons; } +const patternflyIcons = convertIcons(pfIcons) +export default patternflyIcons;