{ "manifest": { "name": "@patternfly/react-icons", "version": "5.4.2", "description": "PatternFly 4 Icons as React Components", "main": "dist/js/index.js", "module": "dist/esm/index.js", "types": "dist/esm/index.d.ts", "sideEffects": false, "publishConfig": { "access": "public" }, "repository": { "type": "git", "url": "https://github.com/patternfly/patternfly-react.git" }, "keywords": [ "react", "patternfly" ], "author": { "name": "Red Hat" }, "license": "MIT", "bugs": { "url": "https://github.com/patternfly/patternfly-react/issues" }, "homepage": "https://github.com/patternfly/patternfly-react#readme", "scripts": { "build:single:packages": "node ../../scripts/build-single-packages.js --config single-packages.config.json", "clean": "rimraf dist src/icons src/index.js src/index.d.ts", "generate": "rimraf dist/esm/icons dist/js/icons && node scripts/writeIcons.mjs" }, "devDependencies": { "@fortawesome/free-brands-svg-icons": "^5.15.4", "@fortawesome/free-regular-svg-icons": "^5.15.4", "@fortawesome/free-solid-svg-icons": "^5.15.4", "@patternfly/patternfly": "5.4.2", "fs-extra": "^11.2.0", "tslib": "^2.7.0" }, "peerDependencies": { "react": "^17 || ^18", "react-dom": "^17 || ^18" }, "gitHead": "5d59bea17733b6c2f89a10a28883fb44caf84295", "_registry": "npm", "_loc": "/home/josie/.cache/yarn/v6/npm-@patternfly-react-icons-5.4.2-8937a7167a0b3abdc3c179524f456b4cbd8f0c39-integrity/node_modules/@patternfly/react-icons/package.json", "readmeFilename": "README.md", "readme": "# @patternfly/react-icons\n\nPatternFly Icons as React Components.\n\n## Usage \n\n```jsx\nimport TimesIcon from '@patternfly/react-icons/dist/esm/icons/times-icon';\n\nconst closeIcon = ;\n```\n\nFor a list of the available icons please refer to the [PatternFly react docs](https://react-staging.patternfly.org/icons)\n\n## Styling icons\n\nAll icons from @patternfly/react-icons have the HTML class pf-v5-svg applied and CSS styles applied via @patternfly/react-styles.\n\nIf not using @patternfly/react-icons in conjunction with @patternfly/react-styles, then the following generic styles will need to be applied to the icons: `height=\"1em\", style=\"vertical-align: -0.125em;\" width=\"1em\"`\n\nIf using @patternfly/react-icons in conjunction with @patternfly/react-core, icons can be further styled by wrapping an icon from \n@patternfly/react-icons in a PatternFly icon component.\n\n## Adding icons\n\nIcons for this package are generated from the `@fortawesome/free-solid-svg-icons` package. To add more to what is generated, modify the [icons.js](./build/icons.js) file in the build folder.\n\nIf you have some custom icon defined by svg path the best way to add such icon to this repository is to add its path definition in [pfIcons.js](./build/pfIcons.js) file in the build folder.\n```JS\nmodule.exports = {\n pfIcons: {\n // ... other icon defintions\n bigPlus: {width: 1024, height: 1024, svgPathData: 'M2 1 h1 v1 h1 v1 h-1 v1 h-1 v-1 h-1 v-1 h1 z'}\n }\n}\n```\n\n## Tree shaking\n\nEnsure optimization.sideEffects is set to true within your Webpack config:\n```JS\noptimization: {\n sideEffects: true\n}\n```\n\nUse ESM module imports to enable tree shaking with no additional setup required.\n```JS\nimport TimesIcon from '@patternfly/react-icons/dist/esm/icons/times-icon';\n```\n\nTo enable tree shaking with named imports for CJS modules, utilize [babel-plugin-transform-imports](https://www.npmjs.com/package/babel-plugin-transform-imports) and update a babel.config.js file to utilize the plugin:\n```JS\nmodule.exports = {\n presets: [\"@babel/preset-env\", \"@babel/preset-react\"],\n plugins: [\n [\n \"transform-imports\",\n {\n \"@patternfly/react-icons\": {\n transform: (importName, matches) => `@patternfly/react-icons/dist/js/icons/${importName.split(/(?=[A-Z])/).join('-').toLowerCase()}`,\n preventFullImport: true\n }\n }\n ]\n ]\n}\n```\n\n", "licenseText": "MIT License\n\nCopyright (c) 2019 Red Hat, Inc.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n" }, "artifacts": [], "remote": { "resolved": "https://registry.yarnpkg.com/@patternfly/react-icons/-/react-icons-5.4.2.tgz#8937a7167a0b3abdc3c179524f456b4cbd8f0c39", "type": "tarball", "reference": "https://registry.yarnpkg.com/@patternfly/react-icons/-/react-icons-5.4.2.tgz", "hash": "8937a7167a0b3abdc3c179524f456b4cbd8f0c39", "integrity": "sha512-CMQ5oHYzW6TPVTs2jpNJmP2vGCAKR/YeTPwHGO9dLkAUej1IcIxtCCWK2Fdo2UJsnBjuZihasyw2b6ehvbUm9Q==", "registry": "npm", "packageName": "@patternfly/react-icons", "cacheIntegrity": "sha512-CMQ5oHYzW6TPVTs2jpNJmP2vGCAKR/YeTPwHGO9dLkAUej1IcIxtCCWK2Fdo2UJsnBjuZihasyw2b6ehvbUm9Q== sha1-iTenFnoLOr3DwXlST0VrTL2PDDk=" }, "registry": "npm", "hash": "8937a7167a0b3abdc3c179524f456b4cbd8f0c39" }