Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@patternfly/pfe-icon

Package Overview
Dependencies
Maintainers
11
Versions
77
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@patternfly/pfe-icon - npm Package Compare versions

Comparing version 1.0.0-prerelease.23 to 1.0.0-prerelease.24

8

package.json

@@ -7,3 +7,3 @@ {

},
"version": "1.0.0-prerelease.23",
"version": "1.0.0-prerelease.24",
"publishConfig": {

@@ -33,7 +33,7 @@ "access": "public"

"dependencies": {
"@patternfly/pfe-sass": "^1.0.0-prerelease.23",
"@patternfly/pfelement": "^1.0.0-prerelease.23"
"@patternfly/pfe-sass": "^1.0.0-prerelease.24",
"@patternfly/pfelement": "^1.0.0-prerelease.24"
},
"generator-pfelement-version": "1.1.0",
"gitHead": "6ab58e37a17326428930c7c5e5751915f2112f90"
"gitHead": "482894ff43a70845af04390bcb05c67bdc17e9bd"
}

@@ -58,3 +58,3 @@ import PFElement from '../pfelement/pfelement.js';

/*!
* PatternFly Elements: PfeIcon 1.0.0-prerelease.23
* PatternFly Elements: PfeIcon 1.0.0-prerelease.24
* @license

@@ -123,3 +123,3 @@ * Copyright 2019 Red Hat, Inc.

static get version() {
return "1.0.0-prerelease.23";
return "1.0.0-prerelease.24";
}

@@ -126,0 +126,0 @@

@@ -1,4 +0,4 @@

import e from"../pfelement/pfelement.min.js";class t{resolveIconName(e){return this._resolveIconName(e,this.name,this.path)}constructor(e,t,o){this.name=e,this.path=t,this._resolveIconName=o}}function o(e,t,o){const[,,r]=/^([^-]+)-(.*)/.exec(e);return`${o}/${`${t}-icon-${r}`}.svg`}class r extends e{static get version(){return"1.0.0-prerelease.23"}get html(){return'<style>:host{--pfe-icon--Spacing:var(--pfe-theme--container-spacer, 1rem);--pfe-icon--Size:var(--pfe-theme--icon-size, 1em);--pfe-icon--Color:var(--pfe-broadcasted--color--text, var(--pfe-theme--color--text, #333));--pfe-icon--BackgroundColor:transparent;--pfe-icon--BorderColor:transparent;display:inline-block;vertical-align:middle;border-radius:50%;background-color:var(--pfe-icon--BackgroundColor);border:var(--pfe-icon--BorderColor);position:relative}:host,:host svg{width:1em;height:1em}@media screen and (-ms-high-contrast:active),screen and (-ms-high-contrast:none){:host{background-color:#fff!important}:host svg filter feFlood{flood-color:#000!important}}@supports (-ms-accelerator:true){:host{background-color:#fff!important}:host svg filter feFlood{flood-color:#000!important}}@supports (-ms-ime-align:auto){:host{background-color:#fff!important}:host svg filter feFlood{flood-color:#000!important}}:host([data-block]){display:block;margin-bottom:var(--pfe-icon--Spacing);margin-top:var(--pfe-icon--Spacing)}:host([data-block]):first-child{margin-top:0}@media screen and (-ms-high-contrast:active),screen and (-ms-high-contrast:none){:host svg image{-webkit-filter:none;filter:none}}:host svg image.load-failed{display:none}:host svg filter feFlood{flood-color:var(--pfe-icon--Color)}:host([size="2x"]),:host([size="2x"]) svg{width:2em;height:2em}:host([size="3x"]),:host([size="3x"]) svg{width:3em;height:3em}:host([size="4x"]),:host([size="4x"]) svg{width:4em;height:4em}:host([size=xl]),:host([size=xl]) svg{width:100px;height:100px}:host([size=lg]),:host([size=lg]) svg{width:64px;height:64px}:host([size=md]),:host([size=md]) svg{width:32px;height:32px}:host([size=sm]),:host([size=sm]) svg{width:14px;height:14px}:host([color=base]){--pfe-broadcasted--color--text:var(--pfe-theme--color--ui-base, #0477a4)}:host([color=complement]){--pfe-broadcasted--color--text:var(--pfe-theme--color--ui-complement, #464646)}:host([color=accent]){--pfe-broadcasted--color--text:var(--pfe-theme--color--ui-accent, #fe460d)}:host([color=critical]){--pfe-broadcasted--color--text:var(--pfe-theme--color--feedback--critical, #bb0000)}:host([color=important]){--pfe-broadcasted--color--text:var(--pfe-theme--color--feedback--important, #d73401)}:host([color=moderate]){--pfe-broadcasted--color--text:var(--pfe-theme--color--feedback--moderate, #ffc024)}:host([color=success]){--pfe-broadcasted--color--text:var(--pfe-theme--color--feedback--success, #2e7d32)}:host([color=info]){--pfe-broadcasted--color--text:var(--pfe-theme--color--feedback--info, #0277bd)}:host([color=default]){--pfe-broadcasted--color--text:var(--pfe-theme--color--feedback--default, #606060)}:host([circled]){--pfe-icon--BackgroundColor:transparent;--pfe-icon--BorderColor:var(--pfe-theme--color--surface--border, #dfdfdf);padding:.05em}:host([circled=base]){--pfe-icon--BackgroundColor:var(--pfe-theme--color--surface--base, #dfdfdf);--pfe-icon--BorderColor:transparent;--pfe-broadcasted--color--text:var(--pfe-theme--color--surface--base--text, #333)}:host([circled=lightest]){--pfe-icon--BackgroundColor:var(--pfe-theme--color--surface--lightest, #fff);--pfe-icon--BorderColor:transparent;--pfe-broadcasted--color--text:var(--pfe-theme--color--surface--lightest--text, #333)}:host([circled=light]){--pfe-icon--BackgroundColor:var(--pfe-theme--color--surface--lighter, #ececec);--pfe-icon--BorderColor:transparent;--pfe-broadcasted--color--text:var(--pfe-theme--color--surface--lighter--text, #333)}:host([circled=dark]){--pfe-icon--BackgroundColor:var(--pfe-theme--color--surface--darker, #464646);--pfe-icon--BorderColor:transparent;--pfe-broadcasted--color--text:var(--pfe-theme--color--surface--darker--text, #fff)}:host([circled=darkest]){--pfe-icon--BackgroundColor:var(--pfe-theme--color--surface--darkest, #131313);--pfe-icon--BorderColor:transparent;--pfe-broadcasted--color--text:var(--pfe-theme--color--surface--darkest--text, #fff)}:host([circled=complement]){--pfe-icon--BackgroundColor:var(--pfe-theme--color--surface--complement, #0477a4);--pfe-icon--BorderColor:transparent;--pfe-broadcasted--color--text:var(--pfe-theme--color--surface--complement--text, #fff)}:host([circled=accent]){--pfe-icon--BackgroundColor:var(--pfe-theme--color--surface--accent, #fe460d);--pfe-icon--BorderColor:transparent;--pfe-broadcasted--color--text:var(--pfe-theme--color--surface--accent--text, #fff)}</style><svg xmlns="http://www.w3.org/2000/svg">\n <filter color-interpolation-filters="sRGB" x="0" y="0" height="100%" width="100%">\n <feFlood result="COLOR" />\n <feComposite operator="in" in="COLOR" in2="SourceAlpha" />\n </filter>\n <image xlink:href="" width="100%" height="100%"></image>\n</svg>'}static get properties(){return{icon:{title:"Icon",type:"string",enum:[],prefixed:!1},size:{title:"Size",type:"string",enum:["default","xl","lg","md","sm","2x","3x","4x"],default:"default",prefixed:!1},color:{title:"Color",type:"string",enum:["default","base","compliment","accent","critical","important","moderate","success","info"],default:"default",prefixed:!1}}}static get slots(){return{}}static get tag(){return"pfe-icon"}get templateUrl(){return"pfe-icon.html"}get styleUrl(){return"pfe-icon.scss"}get schemaUrl(){return"pfe-icon.json"}static get observedAttributes(){return["icon"]}constructor(){super(r),this.image=this.shadowRoot.querySelector("svg image"),this.image.addEventListener("load",()=>(function(e){e.image.classList.remove("load-failed")})(this)),this.image.addEventListener("error",()=>(function(e){e.image.classList.add("load-failed")})(this))}attributeChangedCallback(e,t,o){super.attributeChangedCallback(...arguments),this.updateIcon(o)}updateIcon(e=this.getAttribute("icon")){const{setName:t,set:o}=r.getIconSet(e);if(o){const t=o.resolveIconName(e);this.image.setAttribute("xlink:href",t),
import e from"../pfelement/pfelement.min.js";class t{resolveIconName(e){return this._resolveIconName(e,this.name,this.path)}constructor(e,t,o){this.name=e,this.path=t,this._resolveIconName=o}}function o(e,t,o){const[,,r]=/^([^-]+)-(.*)/.exec(e);return`${o}/${`${t}-icon-${r}`}.svg`}class r extends e{static get version(){return"1.0.0-prerelease.24"}get html(){return'<style>:host{--pfe-icon--Spacing:var(--pfe-theme--container-spacer, 1rem);--pfe-icon--Size:var(--pfe-theme--icon-size, 1em);--pfe-icon--Color:var(--pfe-broadcasted--color--text, var(--pfe-theme--color--text, #333));--pfe-icon--BackgroundColor:transparent;--pfe-icon--BorderColor:transparent;display:inline-block;vertical-align:middle;border-radius:50%;background-color:var(--pfe-icon--BackgroundColor);border:var(--pfe-icon--BorderColor);position:relative}:host,:host svg{width:1em;height:1em}@media screen and (-ms-high-contrast:active),screen and (-ms-high-contrast:none){:host{background-color:#fff!important}:host svg filter feFlood{flood-color:#000!important}}@supports (-ms-accelerator:true){:host{background-color:#fff!important}:host svg filter feFlood{flood-color:#000!important}}@supports (-ms-ime-align:auto){:host{background-color:#fff!important}:host svg filter feFlood{flood-color:#000!important}}:host([data-block]){display:block;margin-bottom:var(--pfe-icon--Spacing);margin-top:var(--pfe-icon--Spacing)}:host([data-block]):first-child{margin-top:0}@media screen and (-ms-high-contrast:active),screen and (-ms-high-contrast:none){:host svg image{-webkit-filter:none;filter:none}}:host svg image.load-failed{display:none}:host svg filter feFlood{flood-color:var(--pfe-icon--Color)}:host([size="2x"]),:host([size="2x"]) svg{width:2em;height:2em}:host([size="3x"]),:host([size="3x"]) svg{width:3em;height:3em}:host([size="4x"]),:host([size="4x"]) svg{width:4em;height:4em}:host([size=xl]),:host([size=xl]) svg{width:100px;height:100px}:host([size=lg]),:host([size=lg]) svg{width:64px;height:64px}:host([size=md]),:host([size=md]) svg{width:32px;height:32px}:host([size=sm]),:host([size=sm]) svg{width:14px;height:14px}:host([color=base]){--pfe-broadcasted--color--text:var(--pfe-theme--color--ui-base, #0477a4)}:host([color=complement]){--pfe-broadcasted--color--text:var(--pfe-theme--color--ui-complement, #464646)}:host([color=accent]){--pfe-broadcasted--color--text:var(--pfe-theme--color--ui-accent, #fe460d)}:host([color=critical]){--pfe-broadcasted--color--text:var(--pfe-theme--color--feedback--critical, #bb0000)}:host([color=important]){--pfe-broadcasted--color--text:var(--pfe-theme--color--feedback--important, #d73401)}:host([color=moderate]){--pfe-broadcasted--color--text:var(--pfe-theme--color--feedback--moderate, #ffc024)}:host([color=success]){--pfe-broadcasted--color--text:var(--pfe-theme--color--feedback--success, #2e7d32)}:host([color=info]){--pfe-broadcasted--color--text:var(--pfe-theme--color--feedback--info, #0277bd)}:host([color=default]){--pfe-broadcasted--color--text:var(--pfe-theme--color--feedback--default, #606060)}:host([circled]){--pfe-icon--BackgroundColor:transparent;--pfe-icon--BorderColor:var(--pfe-theme--color--surface--border, #dfdfdf);padding:.05em}:host([circled=base]){--pfe-icon--BackgroundColor:var(--pfe-theme--color--surface--base, #dfdfdf);--pfe-icon--BorderColor:transparent;--pfe-broadcasted--color--text:var(--pfe-theme--color--surface--base--text, #333)}:host([circled=lightest]){--pfe-icon--BackgroundColor:var(--pfe-theme--color--surface--lightest, #fff);--pfe-icon--BorderColor:transparent;--pfe-broadcasted--color--text:var(--pfe-theme--color--surface--lightest--text, #333)}:host([circled=light]){--pfe-icon--BackgroundColor:var(--pfe-theme--color--surface--lighter, #ececec);--pfe-icon--BorderColor:transparent;--pfe-broadcasted--color--text:var(--pfe-theme--color--surface--lighter--text, #333)}:host([circled=dark]){--pfe-icon--BackgroundColor:var(--pfe-theme--color--surface--darker, #464646);--pfe-icon--BorderColor:transparent;--pfe-broadcasted--color--text:var(--pfe-theme--color--surface--darker--text, #fff)}:host([circled=darkest]){--pfe-icon--BackgroundColor:var(--pfe-theme--color--surface--darkest, #131313);--pfe-icon--BorderColor:transparent;--pfe-broadcasted--color--text:var(--pfe-theme--color--surface--darkest--text, #fff)}:host([circled=complement]){--pfe-icon--BackgroundColor:var(--pfe-theme--color--surface--complement, #0477a4);--pfe-icon--BorderColor:transparent;--pfe-broadcasted--color--text:var(--pfe-theme--color--surface--complement--text, #fff)}:host([circled=accent]){--pfe-icon--BackgroundColor:var(--pfe-theme--color--surface--accent, #fe460d);--pfe-icon--BorderColor:transparent;--pfe-broadcasted--color--text:var(--pfe-theme--color--surface--accent--text, #fff)}</style><svg xmlns="http://www.w3.org/2000/svg">\n <filter color-interpolation-filters="sRGB" x="0" y="0" height="100%" width="100%">\n <feFlood result="COLOR" />\n <feComposite operator="in" in="COLOR" in2="SourceAlpha" />\n </filter>\n <image xlink:href="" width="100%" height="100%"></image>\n</svg>'}static get properties(){return{icon:{title:"Icon",type:"string",enum:[],prefixed:!1},size:{title:"Size",type:"string",enum:["default","xl","lg","md","sm","2x","3x","4x"],default:"default",prefixed:!1},color:{title:"Color",type:"string",enum:["default","base","compliment","accent","critical","important","moderate","success","info"],default:"default",prefixed:!1}}}static get slots(){return{}}static get tag(){return"pfe-icon"}get templateUrl(){return"pfe-icon.html"}get styleUrl(){return"pfe-icon.scss"}get schemaUrl(){return"pfe-icon.json"}static get observedAttributes(){return["icon"]}constructor(){super(r),this.image=this.shadowRoot.querySelector("svg image"),this.image.addEventListener("load",()=>(function(e){e.image.classList.remove("load-failed")})(this)),this.image.addEventListener("error",()=>(function(e){e.image.classList.add("load-failed")})(this))}attributeChangedCallback(e,t,o){super.attributeChangedCallback(...arguments),this.updateIcon(o)}updateIcon(e=this.getAttribute("icon")){const{setName:t,set:o}=r.getIconSet(e);if(o){const t=o.resolveIconName(e);this.image.setAttribute("xlink:href",t),
/*!
* PatternFly Elements: PfeIcon 1.0.0-prerelease.23
* PatternFly Elements: PfeIcon 1.0.0-prerelease.24
* @license

@@ -5,0 +5,0 @@ * Copyright 2019 Red Hat, Inc.

@@ -188,3 +188,3 @@ (function (global, factory) {

/*!
* PatternFly Elements: PfeIcon 1.0.0-prerelease.23
* PatternFly Elements: PfeIcon 1.0.0-prerelease.24
* @license

@@ -269,3 +269,3 @@ * Copyright 2019 Red Hat, Inc.

get: function get$$1() {
return "1.0.0-prerelease.23";
return "1.0.0-prerelease.24";
}

@@ -272,0 +272,0 @@ }, {

@@ -1,2 +0,2 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("../pfelement/pfelement.umd.min")):"function"==typeof define&&define.amd?define(["../pfelement/pfelement.umd.min"],t):e.PfeIcon=t(e.PFElement)}(this,function(e){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e;function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var t=function(e,t,o){return t&&n(e.prototype,t),o&&n(e,o),e};function n(e,t){for(var o=0;o<t.length;o++){var r=t[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var o=[],r=!0,n=!1,a=void 0;try{for(var c,i=e[Symbol.iterator]();!(r=(c=i.next()).done)&&(o.push(c.value),!t||o.length!==t);r=!0);}catch(e){n=!0,a=e}finally{try{!r&&i.return&&i.return()}finally{if(n)throw a}}return o}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},c=(t(i,[{key:"resolveIconName",value:function(e){return this._resolveIconName(e,this.name,this.path)}}]),i);function i(e,t,o){r(this,i),this.name=e,this.path=t,this._resolveIconName=o}function o(e,t,o){var r=/^([^-]+)-(.*)/.exec(e);return o+"/"+(t+"-icon-"+a(r,3)[2])+".svg"}var s,l=(function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(f,e),t(f,[{key:"html",get:function(){return'<style>:host{--pfe-icon--Spacing:var(--pfe-theme--container-spacer, 1rem);--pfe-icon--Size:var(--pfe-theme--icon-size, 1em);--pfe-icon--Color:var(--pfe-broadcasted--color--text, var(--pfe-theme--color--text, #333));--pfe-icon--BackgroundColor:transparent;--pfe-icon--BorderColor:transparent;display:inline-block;vertical-align:middle;border-radius:50%;background-color:var(--pfe-icon--BackgroundColor);border:var(--pfe-icon--BorderColor);position:relative}:host,:host svg{width:1em;height:1em}@media screen and (-ms-high-contrast:active),screen and (-ms-high-contrast:none){:host{background-color:#fff!important}:host svg filter feFlood{flood-color:#000!important}}@supports (-ms-accelerator:true){:host{background-color:#fff!important}:host svg filter feFlood{flood-color:#000!important}}@supports (-ms-ime-align:auto){:host{background-color:#fff!important}:host svg filter feFlood{flood-color:#000!important}}:host([data-block]){display:block;margin-bottom:var(--pfe-icon--Spacing);margin-top:var(--pfe-icon--Spacing)}:host([data-block]):first-child{margin-top:0}@media screen and (-ms-high-contrast:active),screen and (-ms-high-contrast:none){:host svg image{-webkit-filter:none;filter:none}}:host svg image.load-failed{display:none}:host svg filter feFlood{flood-color:var(--pfe-icon--Color)}:host([size="2x"]),:host([size="2x"]) svg{width:2em;height:2em}:host([size="3x"]),:host([size="3x"]) svg{width:3em;height:3em}:host([size="4x"]),:host([size="4x"]) svg{width:4em;height:4em}:host([size=xl]),:host([size=xl]) svg{width:100px;height:100px}:host([size=lg]),:host([size=lg]) svg{width:64px;height:64px}:host([size=md]),:host([size=md]) svg{width:32px;height:32px}:host([size=sm]),:host([size=sm]) svg{width:14px;height:14px}:host([color=base]){--pfe-broadcasted--color--text:var(--pfe-theme--color--ui-base, #0477a4)}:host([color=complement]){--pfe-broadcasted--color--text:var(--pfe-theme--color--ui-complement, #464646)}:host([color=accent]){--pfe-broadcasted--color--text:var(--pfe-theme--color--ui-accent, #fe460d)}:host([color=critical]){--pfe-broadcasted--color--text:var(--pfe-theme--color--feedback--critical, #bb0000)}:host([color=important]){--pfe-broadcasted--color--text:var(--pfe-theme--color--feedback--important, #d73401)}:host([color=moderate]){--pfe-broadcasted--color--text:var(--pfe-theme--color--feedback--moderate, #ffc024)}:host([color=success]){--pfe-broadcasted--color--text:var(--pfe-theme--color--feedback--success, #2e7d32)}:host([color=info]){--pfe-broadcasted--color--text:var(--pfe-theme--color--feedback--info, #0277bd)}:host([color=default]){--pfe-broadcasted--color--text:var(--pfe-theme--color--feedback--default, #606060)}:host([circled]){--pfe-icon--BackgroundColor:transparent;--pfe-icon--BorderColor:var(--pfe-theme--color--surface--border, #dfdfdf);padding:.05em}:host([circled=base]){--pfe-icon--BackgroundColor:var(--pfe-theme--color--surface--base, #dfdfdf);--pfe-icon--BorderColor:transparent;--pfe-broadcasted--color--text:var(--pfe-theme--color--surface--base--text, #333)}:host([circled=lightest]){--pfe-icon--BackgroundColor:var(--pfe-theme--color--surface--lightest, #fff);--pfe-icon--BorderColor:transparent;--pfe-broadcasted--color--text:var(--pfe-theme--color--surface--lightest--text, #333)}:host([circled=light]){--pfe-icon--BackgroundColor:var(--pfe-theme--color--surface--lighter, #ececec);--pfe-icon--BorderColor:transparent;--pfe-broadcasted--color--text:var(--pfe-theme--color--surface--lighter--text, #333)}:host([circled=dark]){--pfe-icon--BackgroundColor:var(--pfe-theme--color--surface--darker, #464646);--pfe-icon--BorderColor:transparent;--pfe-broadcasted--color--text:var(--pfe-theme--color--surface--darker--text, #fff)}:host([circled=darkest]){--pfe-icon--BackgroundColor:var(--pfe-theme--color--surface--darkest, #131313);--pfe-icon--BorderColor:transparent;--pfe-broadcasted--color--text:var(--pfe-theme--color--surface--darkest--text, #fff)}:host([circled=complement]){--pfe-icon--BackgroundColor:var(--pfe-theme--color--surface--complement, #0477a4);--pfe-icon--BorderColor:transparent;--pfe-broadcasted--color--text:var(--pfe-theme--color--surface--complement--text, #fff)}:host([circled=accent]){--pfe-icon--BackgroundColor:var(--pfe-theme--color--surface--accent, #fe460d);--pfe-icon--BorderColor:transparent;--pfe-broadcasted--color--text:var(--pfe-theme--color--surface--accent--text, #fff)}</style><svg xmlns="http://www.w3.org/2000/svg">\n <filter color-interpolation-filters="sRGB" x="0" y="0" height="100%" width="100%">\n <feFlood result="COLOR" />\n <feComposite operator="in" in="COLOR" in2="SourceAlpha" />\n </filter>\n <image xlink:href="" width="100%" height="100%"></image>\n</svg>'}},{key:"templateUrl",get:function(){return"pfe-icon.html"}},{key:"styleUrl",get:function(){return"pfe-icon.scss"}},{key:"schemaUrl",get:function(){return"pfe-icon.json"}}],[{key:"version",get:function(){return"1.0.0-prerelease.23"}},{key:"properties",get:function(){return{icon:{title:"Icon",type:"string",enum:[],prefixed:!1},size:{title:"Size",type:"string",enum:["default","xl","lg","md","sm","2x","3x","4x"],default:"default",prefixed:!1},color:{title:"Color",type:"string",enum:["default","base","compliment","accent","critical","important","moderate","success","info"],default:"default",prefixed:!1}}}},{key:"slots",get:function(){return{}}},{key:"tag",get:function(){return"pfe-icon"}},{key:"observedAttributes",get:function(){return["icon"]}}]),t(f,[{key:"attributeChangedCallback",value:function(e,t,o){(function e(t,o,r){null===t&&(t=Function.prototype);var n=Object.getOwnPropertyDescriptor(t,o);if(void 0===n){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,o,r)}if("value"in n)return n.value;var c=n.get;return void 0!==c?c.call(r):void 0})(f.prototype.__proto__||Object.getPrototypeOf(f.prototype),"attributeChangedCallback",this).apply(this,arguments),this.updateIcon(o)}},{key:"updateIcon",value:function(e){var t=0<arguments.length&&void 0!==e?e:this.getAttribute("icon"),o=f.getIconSet(t),r=o.setName,n=o.set;if(n){var a=n.resolveIconName(t);this.image.setAttribute("xlink:href",a),function(e){var t="filter-"+Math.random().toString().slice(2,10);e.shadowRoot.querySelector("svg image").style.filter="url(#"+t+")",e.shadowRoot.querySelector("svg filter").setAttribute("id",t)}(this)}else this._handleAddIconSet=function(t,o){return function(e){o===e.detail.set.name&&(document.body.removeEventListener(l.EVENTS.ADD_ICON_SET,t._handleAddIconSet),t.updateIcon())}}(this,r),document.body.addEventListener(f.EVENTS.ADD_ICON_SET,this._handleAddIconSet)}}],[{key:"getIconSet",value:function(e){var t=e.split("-"),o=a(t,1)[0];return{setName:o,set:this._iconSets[o]}}},{key:"addIconSet",value:function(e,t,o){if(this._iconSets[e])throw new Error("can't add icon set "+e+"; a set with that name already exists.");this._iconSets[e]=new c(e,t,o),document.body.dispatchEvent(new CustomEvent(this.EVENTS.ADD_ICON_SET,{bubbles:!1,detail:{set:this._iconSets[e]}}))}},{key:"EVENTS",get:function(){return{ADD_ICON_SET:this.tag+":add-icon-set"}}}]),f);function f(){r(this,f);var e=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(f.__proto__||Object.getPrototypeOf(f)).call(this,f));return e.image=e.shadowRoot.querySelector("svg image"),e.image.addEventListener("load",function(){return function(e){e.image.classList.remove("load-failed")}(e)}),e.image.addEventListener("error",function(){return function(e){e.image.classList.add("load-failed")}(e)}),e}return l._iconSets={},s=l,[{name:"web",path:"https://access.redhat.com/webassets/avalon/j/lib/rh-iconfont-svgs"},{name:"rh",path:"https://access.redhat.com/webassets/avalon/j/lib/rh-iconfont-svgs"}].forEach(function(e){return s.addIconSet(e.name,e.path,o)}),e.create(l),l});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("../pfelement/pfelement.umd.min")):"function"==typeof define&&define.amd?define(["../pfelement/pfelement.umd.min"],t):e.PfeIcon=t(e.PFElement)}(this,function(e){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e;function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var t=function(e,t,o){return t&&n(e.prototype,t),o&&n(e,o),e};function n(e,t){for(var o=0;o<t.length;o++){var r=t[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var o=[],r=!0,n=!1,a=void 0;try{for(var c,i=e[Symbol.iterator]();!(r=(c=i.next()).done)&&(o.push(c.value),!t||o.length!==t);r=!0);}catch(e){n=!0,a=e}finally{try{!r&&i.return&&i.return()}finally{if(n)throw a}}return o}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},c=(t(i,[{key:"resolveIconName",value:function(e){return this._resolveIconName(e,this.name,this.path)}}]),i);function i(e,t,o){r(this,i),this.name=e,this.path=t,this._resolveIconName=o}function o(e,t,o){var r=/^([^-]+)-(.*)/.exec(e);return o+"/"+(t+"-icon-"+a(r,3)[2])+".svg"}var s,l=(function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(f,e),t(f,[{key:"html",get:function(){return'<style>:host{--pfe-icon--Spacing:var(--pfe-theme--container-spacer, 1rem);--pfe-icon--Size:var(--pfe-theme--icon-size, 1em);--pfe-icon--Color:var(--pfe-broadcasted--color--text, var(--pfe-theme--color--text, #333));--pfe-icon--BackgroundColor:transparent;--pfe-icon--BorderColor:transparent;display:inline-block;vertical-align:middle;border-radius:50%;background-color:var(--pfe-icon--BackgroundColor);border:var(--pfe-icon--BorderColor);position:relative}:host,:host svg{width:1em;height:1em}@media screen and (-ms-high-contrast:active),screen and (-ms-high-contrast:none){:host{background-color:#fff!important}:host svg filter feFlood{flood-color:#000!important}}@supports (-ms-accelerator:true){:host{background-color:#fff!important}:host svg filter feFlood{flood-color:#000!important}}@supports (-ms-ime-align:auto){:host{background-color:#fff!important}:host svg filter feFlood{flood-color:#000!important}}:host([data-block]){display:block;margin-bottom:var(--pfe-icon--Spacing);margin-top:var(--pfe-icon--Spacing)}:host([data-block]):first-child{margin-top:0}@media screen and (-ms-high-contrast:active),screen and (-ms-high-contrast:none){:host svg image{-webkit-filter:none;filter:none}}:host svg image.load-failed{display:none}:host svg filter feFlood{flood-color:var(--pfe-icon--Color)}:host([size="2x"]),:host([size="2x"]) svg{width:2em;height:2em}:host([size="3x"]),:host([size="3x"]) svg{width:3em;height:3em}:host([size="4x"]),:host([size="4x"]) svg{width:4em;height:4em}:host([size=xl]),:host([size=xl]) svg{width:100px;height:100px}:host([size=lg]),:host([size=lg]) svg{width:64px;height:64px}:host([size=md]),:host([size=md]) svg{width:32px;height:32px}:host([size=sm]),:host([size=sm]) svg{width:14px;height:14px}:host([color=base]){--pfe-broadcasted--color--text:var(--pfe-theme--color--ui-base, #0477a4)}:host([color=complement]){--pfe-broadcasted--color--text:var(--pfe-theme--color--ui-complement, #464646)}:host([color=accent]){--pfe-broadcasted--color--text:var(--pfe-theme--color--ui-accent, #fe460d)}:host([color=critical]){--pfe-broadcasted--color--text:var(--pfe-theme--color--feedback--critical, #bb0000)}:host([color=important]){--pfe-broadcasted--color--text:var(--pfe-theme--color--feedback--important, #d73401)}:host([color=moderate]){--pfe-broadcasted--color--text:var(--pfe-theme--color--feedback--moderate, #ffc024)}:host([color=success]){--pfe-broadcasted--color--text:var(--pfe-theme--color--feedback--success, #2e7d32)}:host([color=info]){--pfe-broadcasted--color--text:var(--pfe-theme--color--feedback--info, #0277bd)}:host([color=default]){--pfe-broadcasted--color--text:var(--pfe-theme--color--feedback--default, #606060)}:host([circled]){--pfe-icon--BackgroundColor:transparent;--pfe-icon--BorderColor:var(--pfe-theme--color--surface--border, #dfdfdf);padding:.05em}:host([circled=base]){--pfe-icon--BackgroundColor:var(--pfe-theme--color--surface--base, #dfdfdf);--pfe-icon--BorderColor:transparent;--pfe-broadcasted--color--text:var(--pfe-theme--color--surface--base--text, #333)}:host([circled=lightest]){--pfe-icon--BackgroundColor:var(--pfe-theme--color--surface--lightest, #fff);--pfe-icon--BorderColor:transparent;--pfe-broadcasted--color--text:var(--pfe-theme--color--surface--lightest--text, #333)}:host([circled=light]){--pfe-icon--BackgroundColor:var(--pfe-theme--color--surface--lighter, #ececec);--pfe-icon--BorderColor:transparent;--pfe-broadcasted--color--text:var(--pfe-theme--color--surface--lighter--text, #333)}:host([circled=dark]){--pfe-icon--BackgroundColor:var(--pfe-theme--color--surface--darker, #464646);--pfe-icon--BorderColor:transparent;--pfe-broadcasted--color--text:var(--pfe-theme--color--surface--darker--text, #fff)}:host([circled=darkest]){--pfe-icon--BackgroundColor:var(--pfe-theme--color--surface--darkest, #131313);--pfe-icon--BorderColor:transparent;--pfe-broadcasted--color--text:var(--pfe-theme--color--surface--darkest--text, #fff)}:host([circled=complement]){--pfe-icon--BackgroundColor:var(--pfe-theme--color--surface--complement, #0477a4);--pfe-icon--BorderColor:transparent;--pfe-broadcasted--color--text:var(--pfe-theme--color--surface--complement--text, #fff)}:host([circled=accent]){--pfe-icon--BackgroundColor:var(--pfe-theme--color--surface--accent, #fe460d);--pfe-icon--BorderColor:transparent;--pfe-broadcasted--color--text:var(--pfe-theme--color--surface--accent--text, #fff)}</style><svg xmlns="http://www.w3.org/2000/svg">\n <filter color-interpolation-filters="sRGB" x="0" y="0" height="100%" width="100%">\n <feFlood result="COLOR" />\n <feComposite operator="in" in="COLOR" in2="SourceAlpha" />\n </filter>\n <image xlink:href="" width="100%" height="100%"></image>\n</svg>'}},{key:"templateUrl",get:function(){return"pfe-icon.html"}},{key:"styleUrl",get:function(){return"pfe-icon.scss"}},{key:"schemaUrl",get:function(){return"pfe-icon.json"}}],[{key:"version",get:function(){return"1.0.0-prerelease.24"}},{key:"properties",get:function(){return{icon:{title:"Icon",type:"string",enum:[],prefixed:!1},size:{title:"Size",type:"string",enum:["default","xl","lg","md","sm","2x","3x","4x"],default:"default",prefixed:!1},color:{title:"Color",type:"string",enum:["default","base","compliment","accent","critical","important","moderate","success","info"],default:"default",prefixed:!1}}}},{key:"slots",get:function(){return{}}},{key:"tag",get:function(){return"pfe-icon"}},{key:"observedAttributes",get:function(){return["icon"]}}]),t(f,[{key:"attributeChangedCallback",value:function(e,t,o){(function e(t,o,r){null===t&&(t=Function.prototype);var n=Object.getOwnPropertyDescriptor(t,o);if(void 0===n){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,o,r)}if("value"in n)return n.value;var c=n.get;return void 0!==c?c.call(r):void 0})(f.prototype.__proto__||Object.getPrototypeOf(f.prototype),"attributeChangedCallback",this).apply(this,arguments),this.updateIcon(o)}},{key:"updateIcon",value:function(e){var t=0<arguments.length&&void 0!==e?e:this.getAttribute("icon"),o=f.getIconSet(t),r=o.setName,n=o.set;if(n){var a=n.resolveIconName(t);this.image.setAttribute("xlink:href",a),function(e){var t="filter-"+Math.random().toString().slice(2,10);e.shadowRoot.querySelector("svg image").style.filter="url(#"+t+")",e.shadowRoot.querySelector("svg filter").setAttribute("id",t)}(this)}else this._handleAddIconSet=function(t,o){return function(e){o===e.detail.set.name&&(document.body.removeEventListener(l.EVENTS.ADD_ICON_SET,t._handleAddIconSet),t.updateIcon())}}(this,r),document.body.addEventListener(f.EVENTS.ADD_ICON_SET,this._handleAddIconSet)}}],[{key:"getIconSet",value:function(e){var t=e.split("-"),o=a(t,1)[0];return{setName:o,set:this._iconSets[o]}}},{key:"addIconSet",value:function(e,t,o){if(this._iconSets[e])throw new Error("can't add icon set "+e+"; a set with that name already exists.");this._iconSets[e]=new c(e,t,o),document.body.dispatchEvent(new CustomEvent(this.EVENTS.ADD_ICON_SET,{bubbles:!1,detail:{set:this._iconSets[e]}}))}},{key:"EVENTS",get:function(){return{ADD_ICON_SET:this.tag+":add-icon-set"}}}]),f);function f(){r(this,f);var e=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(f.__proto__||Object.getPrototypeOf(f)).call(this,f));return e.image=e.shadowRoot.querySelector("svg image"),e.image.addEventListener("load",function(){return function(e){e.image.classList.remove("load-failed")}(e)}),e.image.addEventListener("error",function(){return function(e){e.image.classList.add("load-failed")}(e)}),e}return l._iconSets={},s=l,[{name:"web",path:"https://access.redhat.com/webassets/avalon/j/lib/rh-iconfont-svgs"},{name:"rh",path:"https://access.redhat.com/webassets/avalon/j/lib/rh-iconfont-svgs"}].forEach(function(e){return s.addIconSet(e.name,e.path,o)}),e.create(l),l});
//# sourceMappingURL=pfe-icon.umd.min.js.map

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc