@plusscommunities/pluss-icons 1.0.3-beta.0 → 1.0.4-beta.0

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/dist/index.js CHANGED
@@ -48,7 +48,7 @@ var TYPE_TO_PREFIX = {
48
48
  function Icon(_ref) {
49
49
  var {
50
50
  icon,
51
- type = "regular",
51
+ type = "solid",
52
52
  pulse,
53
53
  fixedWidth,
54
54
  spin,
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../src/components/Icon.js"],"sourcesContent":["/**\n * @fileoverview Universal icon component for Pluss Communities platform.\n * Uses FontAwesome Pro 7 icons with support for multiple icon styles.\n *\n * @module @plusscommunities/pluss-icons\n * @author Pluss Communities\n * @version 1.0.1\n *\n * @requires @fortawesome/react-fontawesome\n * @requires @fortawesome/fontawesome-svg-core\n * @requires @fortawesome/pro-solid-svg-icons\n * @requires @fortawesome/pro-regular-svg-icons\n * @requires @fortawesome/pro-light-svg-icons\n * @requires @fortawesome/pro-duotone-svg-icons\n */\n\nimport React from \"react\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { library, config } from \"@fortawesome/fontawesome-svg-core\";\nimport \"@fortawesome/fontawesome-svg-core/styles.css\";\n\n// Disable auto-adding CSS - we import it manually above\nconfig.autoAddCss = false;\n\n// ============================================================================\n// ICON LIBRARY SETUP\n// ============================================================================\nimport * as solidIcons from \"@fortawesome/pro-solid-svg-icons\";\nimport * as regularIcons from \"@fortawesome/pro-regular-svg-icons\";\nimport * as lightIcons from \"@fortawesome/pro-light-svg-icons\";\nimport * as duotoneIcons from \"@fortawesome/pro-duotone-svg-icons\";\n\n// Helper to extract icon definitions from a pack\nconst getIconList = (pack) =>\n\tObject.keys(pack)\n\t\t.filter((key) => key.startsWith(\"fa\") && typeof pack[key] === \"object\")\n\t\t.map((key) => pack[key]);\n\n// Add all icon packs to the library\nlibrary.add(\n\t...getIconList(solidIcons),\n\t...getIconList(regularIcons),\n\t...getIconList(lightIcons),\n\t...getIconList(duotoneIcons),\n);\n\n/**\n * Type to prefix mapping for FontAwesome\n * @type {Object.<string, string>}\n */\nconst TYPE_TO_PREFIX = {\n\tsolid: \"fas\",\n\tregular: \"far\",\n\tlight: \"fal\",\n\tduotone: \"fad\",\n};\n\n/**\n * Universal icon component for the Pluss Communities platform.\n * Uses FontAwesome Pro icons.\n *\n * @param {Object} props - The properties passed to the Icon component\n * @param {string} props.icon - The icon name (e.g., \"house\", \"spinner\", \"user\")\n * @param {string} [props.type='solid'] - The icon type: \"solid\", \"regular\", \"light\", or \"duotone\"\n * @param {boolean} [props.pulse] - Whether the icon should pulse (animate)\n * @param {boolean} [props.fixedWidth] - Whether the icon should have fixed width\n * @param {boolean} [props.spin] - Whether the icon should spin\n * @param {string} [props.className] - Additional CSS classes\n * @returns {JSX.Element} The rendered icon\n */\nfunction Icon({\n\ticon,\n\ttype = \"regular\",\n\tpulse,\n\tfixedWidth,\n\tspin,\n\tclassName,\n\t...rest\n}) {\n\t// Return null if icon is undefined or null\n\tif (!icon) {\n\t\treturn null;\n\t}\n\n\t// Convert type to prefix\n\tconst prefix = TYPE_TO_PREFIX[type] || TYPE_TO_PREFIX.solid;\n\n\t// Build the icon definition for FontAwesome\n\tconst iconDef = [prefix, icon];\n\n\treturn (\n\t\t<FontAwesomeIcon\n\t\t\ticon={iconDef}\n\t\t\tpulse={pulse}\n\t\t\tfixedWidth={fixedWidth}\n\t\t\tspin={spin}\n\t\t\tclassName={className}\n\t\t\t{...rest}\n\t\t/>\n\t);\n}\n\nexport { Icon };\n"],"names":["config","autoAddCss","getIconList","pack","Object","keys","filter","key","startsWith","map","library","add","solidIcons","regularIcons","lightIcons","duotoneIcons","TYPE_TO_PREFIX","solid","regular","light","duotone","Icon","_ref","icon","type","pulse","fixedWidth","spin","className","rest","_objectWithoutProperties","_excluded","prefix","iconDef","_jsx","FontAwesomeIcon","_objectSpread"],"mappings":";;;;;;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AG,CAACD,MAAM,EAAET,IAAI,CAAC,CAAA;AAE9B,EAAA,oBACCW,GAAA,CAACC,eAAe,EAAAC,aAAA,CAAA;AACfb,IAAAA,IAAI,EAAEU,OAAQ;AACdR,IAAAA,KAAK,EAAEA,KAAM;AACbC,IAAAA,UAAU,EAAEA,UAAW;AACvBC,IAAAA,IAAI,EAAEA,IAAK;AACXC,IAAAA,SAAS,EAAEA,SAAAA;GACPC,EAAAA,IAAI,CACR,CAAC,CAAA;AAEJ;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../src/components/Icon.js"],"sourcesContent":["/**\n * @fileoverview Universal icon component for Pluss Communities platform.\n * Uses FontAwesome Pro 7 icons with support for multiple icon styles.\n *\n * @module @plusscommunities/pluss-icons\n * @author Pluss Communities\n * @version 1.0.1\n *\n * @requires @fortawesome/react-fontawesome\n * @requires @fortawesome/fontawesome-svg-core\n * @requires @fortawesome/pro-solid-svg-icons\n * @requires @fortawesome/pro-regular-svg-icons\n * @requires @fortawesome/pro-light-svg-icons\n * @requires @fortawesome/pro-duotone-svg-icons\n */\n\nimport React from \"react\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { library, config } from \"@fortawesome/fontawesome-svg-core\";\nimport \"@fortawesome/fontawesome-svg-core/styles.css\";\n\n// Disable auto-adding CSS - we import it manually above\nconfig.autoAddCss = false;\n\n// ============================================================================\n// ICON LIBRARY SETUP\n// ============================================================================\nimport * as solidIcons from \"@fortawesome/pro-solid-svg-icons\";\nimport * as regularIcons from \"@fortawesome/pro-regular-svg-icons\";\nimport * as lightIcons from \"@fortawesome/pro-light-svg-icons\";\nimport * as duotoneIcons from \"@fortawesome/pro-duotone-svg-icons\";\n\n// Helper to extract icon definitions from a pack\nconst getIconList = (pack) =>\n\tObject.keys(pack)\n\t\t.filter((key) => key.startsWith(\"fa\") && typeof pack[key] === \"object\")\n\t\t.map((key) => pack[key]);\n\n// Add all icon packs to the library\nlibrary.add(\n\t...getIconList(solidIcons),\n\t...getIconList(regularIcons),\n\t...getIconList(lightIcons),\n\t...getIconList(duotoneIcons),\n);\n\n/**\n * Type to prefix mapping for FontAwesome\n * @type {Object.<string, string>}\n */\nconst TYPE_TO_PREFIX = {\n\tsolid: \"fas\",\n\tregular: \"far\",\n\tlight: \"fal\",\n\tduotone: \"fad\",\n};\n\n/**\n * Universal icon component for the Pluss Communities platform.\n * Uses FontAwesome Pro icons.\n *\n * @param {Object} props - The properties passed to the Icon component\n * @param {string} props.icon - The icon name (e.g., \"house\", \"spinner\", \"user\")\n * @param {string} [props.type='solid'] - The icon type: \"solid\", \"regular\", \"light\", or \"duotone\"\n * @param {boolean} [props.pulse] - Whether the icon should pulse (animate)\n * @param {boolean} [props.fixedWidth] - Whether the icon should have fixed width\n * @param {boolean} [props.spin] - Whether the icon should spin\n * @param {string} [props.className] - Additional CSS classes\n * @returns {JSX.Element} The rendered icon\n */\nfunction Icon({\n\ticon,\n\ttype = \"solid\",\n\tpulse,\n\tfixedWidth,\n\tspin,\n\tclassName,\n\t...rest\n}) {\n\t// Return null if icon is undefined or null\n\tif (!icon) {\n\t\treturn null;\n\t}\n\n\t// Convert type to prefix\n\tconst prefix = TYPE_TO_PREFIX[type] || TYPE_TO_PREFIX.solid;\n\n\t// Build the icon definition for FontAwesome\n\tconst iconDef = [prefix, icon];\n\n\treturn (\n\t\t<FontAwesomeIcon\n\t\t\ticon={iconDef}\n\t\t\tpulse={pulse}\n\t\t\tfixedWidth={fixedWidth}\n\t\t\tspin={spin}\n\t\t\tclassName={className}\n\t\t\t{...rest}\n\t\t/>\n\t);\n}\n\nexport { Icon };\n"],"names":["config","autoAddCss","getIconList","pack","Object","keys","filter","key","startsWith","map","library","add","solidIcons","regularIcons","lightIcons","duotoneIcons","TYPE_TO_PREFIX","solid","regular","light","duotone","Icon","_ref","icon","type","pulse","fixedWidth","spin","className","rest","_objectWithoutProperties","_excluded","prefix","iconDef","_jsx","FontAwesomeIcon","_objectSpread"],"mappings":";;;;;;;;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CAACD,MAAM,EAAET,IAAI,CAAC,CAAA;AAE9B,EAAA,oBACCW,GAAA,CAACC,eAAe,EAAAC,aAAA,CAAA;AACfb,IAAAA,IAAI,EAAEU,OAAQ;AACdR,IAAAA,KAAK,EAAEA,KAAM;AACbC,IAAAA,UAAU,EAAEA,UAAW;AACvBC,IAAAA,IAAI,EAAEA,IAAK;AACXC,IAAAA,SAAS,EAAEA,SAAAA;GACPC,EAAAA,IAAI,CACR,CAAC,CAAA;AAEJ;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plusscommunities/pluss-icons",
3
- "version": "1.0.3-beta.0",
3
+ "version": "1.0.4-beta.0",
4
4
  "description": "Universal icon component for Pluss Communities platform using FontAwesome Pro",
5
5
  "main": "./dist/index.js",
6
6
  "exports": {