@pine-ds/icons 3.2.0 → 3.3.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/components/pds-icon.d.ts +2 -2
- package/components/pds-icon.js +175 -171
- package/components/pds-icon.js.map +1 -1
- package/components/utils.js +65 -45
- package/components/utils.js.map +1 -1
- package/dist/cheatsheet.html +4 -4
- package/dist/cjs/{index-b35d5b0f.js → index-17212f65.js} +81 -21
- package/dist/cjs/index-17212f65.js.map +1 -0
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/pds-icon.cjs.entry.js +152 -150
- package/dist/cjs/pds-icon.cjs.entry.js.map +1 -1
- package/dist/cjs/pds-icons.cjs.js +3 -3
- package/dist/cjs/pds-icons.cjs.js.map +1 -1
- package/dist/cjs/utils-8c57ce6a.js +101 -0
- package/dist/cjs/utils-8c57ce6a.js.map +1 -0
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/pds-icon/pds-icon.js +189 -168
- package/dist/collection/components/pds-icon/pds-icon.js.map +1 -1
- package/dist/collection/components/pds-icon/request.js +21 -21
- package/dist/collection/components/pds-icon/request.js.map +1 -1
- package/dist/collection/components/pds-icon/svg/blog-filled.svg +1 -1
- package/dist/collection/components/pds-icon/test/pds-icon.e2e.js +6 -6
- package/dist/collection/components/pds-icon/test/pds-icon.e2e.js.map +1 -1
- package/dist/collection/components/pds-icon/test/pds-icon.spec.js +69 -31
- package/dist/collection/components/pds-icon/test/pds-icon.spec.js.map +1 -1
- package/dist/collection/components/pds-icon/utils.js +61 -51
- package/dist/collection/components/pds-icon/utils.js.map +1 -1
- package/dist/collection/components/pds-icon/validate.js +35 -35
- package/dist/collection/components/pds-icon/validate.js.map +1 -1
- package/dist/docs.json +23 -2
- package/dist/esm/{index-8effeb27.js → index-d1a605fc.js} +81 -21
- package/dist/esm/index-d1a605fc.js.map +1 -0
- package/dist/esm/index.js +2 -2
- package/dist/esm/loader.js +3 -3
- package/dist/esm/pds-icon.entry.js +152 -150
- package/dist/esm/pds-icon.entry.js.map +1 -1
- package/dist/esm/pds-icons.js +4 -4
- package/dist/esm/pds-icons.js.map +1 -1
- package/dist/esm/utils-15462a67.js +95 -0
- package/dist/esm/utils-15462a67.js.map +1 -0
- package/dist/pds-icons/index.esm.js +1 -1
- package/dist/pds-icons/p-19d7058a.js +3 -0
- package/dist/pds-icons/p-19d7058a.js.map +1 -0
- package/dist/pds-icons/p-229b8f4e.entry.js +2 -0
- package/dist/pds-icons/p-229b8f4e.entry.js.map +1 -0
- package/dist/pds-icons/p-f0b1dbd6.js +2 -0
- package/dist/pds-icons/p-f0b1dbd6.js.map +1 -0
- package/dist/pds-icons/pds-icons.esm.js +1 -1
- package/dist/pds-icons/pds-icons.esm.js.map +1 -1
- package/dist/pds-icons.json +1 -1
- package/dist/pds-icons.symbols.svg +2 -2
- package/dist/svg/blog-filled.svg +1 -1
- package/dist/types/components/pds-icon/pds-icon.d.ts +41 -35
- package/dist/types/components/pds-icon/utils.d.ts +4 -4
- package/dist/types/components.d.ts +8 -0
- package/dist/types/stencil-public-runtime.d.ts +29 -0
- package/icons/index.d.ts +1 -1
- package/icons/index.js +2 -2
- package/icons/index.mjs +2 -2
- package/icons/package.json +1 -1
- package/package.json +6 -6
- package/dist/cjs/index-b35d5b0f.js.map +0 -1
- package/dist/cjs/utils-395a38b7.js +0 -81
- package/dist/cjs/utils-395a38b7.js.map +0 -1
- package/dist/esm/index-8effeb27.js.map +0 -1
- package/dist/esm/utils-a0ad61d0.js +0 -75
- package/dist/esm/utils-a0ad61d0.js.map +0 -1
- package/dist/pds-icons/p-91678731.entry.js +0 -2
- package/dist/pds-icons/p-91678731.entry.js.map +0 -1
- package/dist/pds-icons/p-a3383818.js +0 -3
- package/dist/pds-icons/p-a3383818.js.map +0 -1
- package/dist/pds-icons/p-dc5765cb.js +0 -2
- package/dist/pds-icons/p-dc5765cb.js.map +0 -1
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { g as getAssetPath } from './index-8effeb27.js';
|
|
2
|
-
|
|
3
|
-
let CACHED_MAP;
|
|
4
|
-
const addIcons = (icons) => {
|
|
5
|
-
const map = getIconMap();
|
|
6
|
-
Object.keys(icons).forEach(name => map.set(name, icons[name]));
|
|
7
|
-
};
|
|
8
|
-
const getIconMap = () => {
|
|
9
|
-
if (typeof window === 'undefined') {
|
|
10
|
-
return new Map();
|
|
11
|
-
}
|
|
12
|
-
else {
|
|
13
|
-
if (!CACHED_MAP) {
|
|
14
|
-
const win = window; // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
15
|
-
win.PdsIcons = win.PdsIcons || {};
|
|
16
|
-
CACHED_MAP = win.PdsIcons.map = win.PdsIcons.map || new Map();
|
|
17
|
-
}
|
|
18
|
-
return CACHED_MAP;
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
const getName = (iconName) => {
|
|
22
|
-
if (isStr(iconName)) {
|
|
23
|
-
iconName = toLower(iconName);
|
|
24
|
-
}
|
|
25
|
-
if (!isStr(iconName) || iconName.trim() === '') {
|
|
26
|
-
return null;
|
|
27
|
-
}
|
|
28
|
-
const invalidChars = iconName.replace(/[a-z]|-|\d/gi, '');
|
|
29
|
-
if (invalidChars != '') {
|
|
30
|
-
return null;
|
|
31
|
-
}
|
|
32
|
-
return iconName;
|
|
33
|
-
};
|
|
34
|
-
const getNamedUrl = (iconName) => {
|
|
35
|
-
const url = getIconMap().get(iconName);
|
|
36
|
-
if (url) {
|
|
37
|
-
return url;
|
|
38
|
-
}
|
|
39
|
-
return getAssetPath(`svg/${iconName}.svg`);
|
|
40
|
-
};
|
|
41
|
-
const getUrl = (icon) => {
|
|
42
|
-
const url = getName(icon.name);
|
|
43
|
-
if (url) {
|
|
44
|
-
return getNamedUrl(url);
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
const isStr = (val) => typeof val === 'string'; // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
48
|
-
const toLower = (val) => val.toLowerCase();
|
|
49
|
-
/**
|
|
50
|
-
* Elements inside of web components sometimes need to inherit global attributes
|
|
51
|
-
* set on the host. For example, the inner input in `ion-input` should inherit
|
|
52
|
-
* the `title` attribute that developers set directly on `ion-input`. This
|
|
53
|
-
* helper function should be called in componentWillLoad and assigned to a variable
|
|
54
|
-
* that is later used in the render function.
|
|
55
|
-
*
|
|
56
|
-
* This does not need to be reactive as changing attributes on the host element
|
|
57
|
-
* does not trigger a re-render.
|
|
58
|
-
*/
|
|
59
|
-
const inheritAttributes = (el, attributes = []) => {
|
|
60
|
-
const attributeObject = {}; // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
61
|
-
attributes.forEach(attr => {
|
|
62
|
-
if (el.hasAttribute(attr)) {
|
|
63
|
-
const value = el.getAttribute(attr);
|
|
64
|
-
if (value !== null) {
|
|
65
|
-
attributeObject[attr] = el.getAttribute(attr);
|
|
66
|
-
}
|
|
67
|
-
el.removeAttribute(attr);
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
return attributeObject;
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
export { addIcons as a, inheritAttributes as b, getName as c, getUrl as g, isStr as i };
|
|
74
|
-
|
|
75
|
-
//# sourceMappingURL=utils-a0ad61d0.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"utils-a0ad61d0.js","mappings":";;AAGA,IAAI,UAA+B,CAAC;MAEvB,QAAQ,GAAG,CAAC,KAAkC;EACzD,MAAM,GAAG,GAAG,UAAU,EAAE,CAAC;EACzB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,IAAI,IAAI,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACjE,EAAC;AAEM,MAAM,UAAU,GAAG;EACxB,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IACjC,OAAO,IAAI,GAAG,EAAE,CAAC;GACl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AAM,OAAO,GAAG,CAAC,GAAW,KAAK,GAAG,CAAC,WAAW,EAAE,CAAC;AAE1D;;;;;;;;;;MAUc,iBAAiB,GAAG,CAAC,EAAe,EAAE,aAAuB,EAAE;EAC3E,MAAM,eAAe,GAAyB,EAAE,CAAC;EAEjD,UAAU,CAAC,OAAO,CAAC,IAAI;IACrB,IAAI,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE;MACzB,MAAM,KAAK,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;MACpC,IAAI,KAAK,KAAK,IAAI,EAAE;QAClB,eAAe,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;OAC/C;MACD,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;KAC1B;GACF,CAAC,CAAC;EAEH,OAAO,eAAe,CAAC;AACzB;;;;","names":[],"sources":["src/components/pds-icon/utils.ts"],"sourcesContent":["import { getAssetPath } from '@stencil/core';\nimport { PdsIcon } from './pds-icon';\n\nlet CACHED_MAP: Map<string, string>;\n\nexport const addIcons = (icons: { [name: string]: string; }) => {\n const map = getIconMap();\n Object.keys(icons).forEach(name => map.set(name, icons[name]));\n}\n\nexport const getIconMap = (): Map<string, string> => {\n if (typeof window === 'undefined') {\n return new Map();\n } else {\n if (!CACHED_MAP) {\n const win = window as any; // eslint-disable-line @typescript-eslint/no-explicit-any\n win.PdsIcons = win.PdsIcons || {};\n CACHED_MAP = win.PdsIcons.map = win.PdsIcons.map || new Map();\n }\n\n return CACHED_MAP;\n }\n}\n\nexport const getName = (iconName: string | undefined) => {\n if (isStr(iconName)) {\n iconName = toLower(iconName);\n }\n\n if (!isStr(iconName) || iconName.trim() === '') {\n return null;\n }\n\n const invalidChars = iconName.replace(/[a-z]|-|\\d/gi,'');\n if (invalidChars != '') { return null; }\n\n return iconName;\n}\n\nconst getNamedUrl = (iconName: string) => {\n const url = getIconMap().get(iconName);\n if (url) {\n return url;\n }\n\n return getAssetPath(`svg/${iconName}.svg`);\n};\n\nexport const getSrc = (src: string | undefined) => {\n if (isStr(src)) {\n src = src.trim();\n\n if (isSrc(src)) {\n return src;\n }\n }\n\n return null;\n}\n\nexport const getUrl = (icon: PdsIcon) => {\n const url = getName(icon.name);\n if (url) {\n return getNamedUrl(url);\n }\n};\n\n\nexport const isSrc = (str: string) => str.length > 0 && /(\\/|\\.)/.test(str);\nexport const isStr = (val: any): val is string => typeof val === 'string'; // eslint-disable-line @typescript-eslint/no-explicit-any\nexport const toLower = (val: string) => val.toLowerCase();\n\n/**\n * Elements inside of web components sometimes need to inherit global attributes\n * set on the host. For example, the inner input in `ion-input` should inherit\n * the `title` attribute that developers set directly on `ion-input`. This\n * helper function should be called in componentWillLoad and assigned to a variable\n * that is later used in the render function.\n *\n * This does not need to be reactive as changing attributes on the host element\n * does not trigger a re-render.\n */\n export const inheritAttributes = (el: HTMLElement, attributes: string[] = []) => {\n const attributeObject: { [k: string]: any } = {}; // eslint-disable-line @typescript-eslint/no-explicit-any\n\n attributes.forEach(attr => {\n if (el.hasAttribute(attr)) {\n const value = el.getAttribute(attr);\n if (value !== null) {\n attributeObject[attr] = el.getAttribute(attr);\n }\n el.removeAttribute(attr);\n }\n });\n\n return attributeObject;\n}\n"],"version":3}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as i,h as t,H as s,a as e}from"./p-a3383818.js";import{i as n,b as r,g as o,c}from"./p-dc5765cb.js";const l=i=>{const t=document.createElement("div");t.innerHTML=i;for(let i=t.childNodes.length-1;i>=0;i--){if(t.childNodes[i].nodeName.toLowerCase()!=="svg"){t.removeChild(t.childNodes[i])}}const s=t.firstElementChild;if(s&&s.nodeName.toLowerCase()==="svg"){const i=s.getAttribute("class")||"";s.setAttribute("class",(i+" s-ion-icon").trim());if(a(s)){return t.innerHTML}}return""};const a=i=>{if(i.nodeType===1){if(i.nodeName.toLowerCase()==="script"){return false}for(let t=0;t<i.attributes.length;t++){const s=i.attributes[t].name;if(n(s)&&s.toLowerCase().indexOf("on")===0){return false}}for(let t=0;t<i.childNodes.length;t++){if(!a(i.childNodes[t])){return false}}}return true};const h=new Map;const d=new Map;const f=(i,t=false)=>{let s=d.get(i);if(!s){if(typeof fetch!="undefined"&&typeof document!=="undefined"){s=fetch(i).then((s=>{if(s.ok){return s.text().then((s=>{if(s&&t!==false){s=l(s)}h.set(i,s||"")}))}h.set(i,"")}));d.set(i,s)}else{h.set(i,"");return Promise.resolve()}}return s};const u=":host{contain:strict;display:inline-block;fill:currentColor;height:1em;width:1em}:host .pdsicon{fill:currentColor}.pds-icon-fill-none{fill:none}.icon-inner,.pds-icon,svg{display:block;height:100%;width:100%}";const p=class{constructor(t){i(this,t);this.inheritedAttributes={};this.hasAriaHidden=()=>{const{el:i}=this;return i.hasAttribute("aria-hidden")&&i.getAttribute("aria-hidden")==="true"};this.ariaLabel=undefined;this.isVisible=false;this.svgContent=undefined;this.color=undefined;this.name=undefined;this.size="regular"}iconSize(){const i={small:"12px",regular:"16px",medium:"20px",large:"24px"};if(i[this.size]){return i[this.size]}else{return this.size}}componentWillLoad(){this.inheritedAttributes=r(this.el,["aria-label"])}connectedCallback(){this.waitUntilVisible(this.el,"50px",(()=>{this.isVisible=true;this.loadIcon()}))}disconnectedCallback(){if(this.io){this.io.disconnect();this.io=undefined}}loadIcon(){if(this.isVisible){const i=o(this);if(i){if(h.has(i)){this.svgContent=h.get(i)}else{f(i).then((()=>this.svgContent=h.get(i)))}}}const i=c(this.name);if(i){this.ariaLabel=i.replace(/\-/g," ")}}render(){const{ariaLabel:i,inheritedAttributes:e}=this;const n={height:this.iconSize(),width:this.iconSize(),color:this.color};return t(s,Object.assign({"aria-label":i!==undefined&&!this.hasAriaHidden()?i:null,role:"img",style:n,class:Object.assign({},g(this.color))},e),this.svgContent?t("div",{class:"icon-inner",innerHTML:this.svgContent}):t("div",{class:"icon-inner"}))}waitUntilVisible(i,t,s){if(typeof window!=="undefined"&&window.IntersectionObserver){const e=this.io=new window.IntersectionObserver((i=>{if(i[0].isIntersecting){e.disconnect();this.io=undefined;s()}}),{rootMargin:t});e.observe(i)}else{s()}}static get assetsDirs(){return["svg"]}get el(){return e(this)}static get watchers(){return{name:["loadIcon"]}}};const g=i=>i?{"pds-color":true,[`pds-color-${i}`]:true}:null;p.style=u;export{p as pds_icon};
|
|
2
|
-
//# sourceMappingURL=p-91678731.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["validateContent","svgContent","div","document","createElement","innerHTML","i","childNodes","length","nodeName","toLowerCase","removeChild","svgElm","firstElementChild","svgClass","getAttribute","setAttribute","trim","isValid","elm","nodeType","attributes","name","isStr","indexOf","pdsIconContent","Map","requests","getSvgContent","url","sanitize","req","get","fetch","then","rsp","ok","text","set","Promise","resolve","pdsIconCss","PdsIcon","this","inheritedAttributes","hasAriaHidden","el","hasAttribute","iconSize","sizes","small","regular","medium","large","size","componentWillLoad","inheritAttributes","connectedCallback","waitUntilVisible","isVisible","loadIcon","disconnectedCallback","io","disconnect","undefined","getUrl","has","label","getName","ariaLabel","replace","render","style","height","width","color","h","Host","Object","assign","role","class","createColorClasses","rootMargin","cb","window","IntersectionObserver","data","isIntersecting","observe"],"sources":["src/components/pds-icon/validate.ts","src/components/pds-icon/request.ts","src/components/pds-icon/pds-icon.scss?tag=pds-icon&encapsulation=shadow","src/components/pds-icon/pds-icon.tsx"],"sourcesContent":["import { isStr } from './utils';\n\nexport const validateContent = (svgContent: string) => {\n const div = document.createElement('div');\n div.innerHTML = svgContent;\n\n // setup this way to ensure it works on our buddy IE\n for (let i = div.childNodes.length - 1; i >= 0; i--) {\n if (div.childNodes[i].nodeName.toLowerCase() !== 'svg') {\n div.removeChild(div.childNodes[i]);\n }\n }\n\n // must only have 1 root element\n const svgElm = div.firstElementChild;\n if (svgElm && svgElm.nodeName.toLowerCase() === 'svg') {\n const svgClass = svgElm.getAttribute('class') || '';\n svgElm.setAttribute('class', (svgClass + ' s-ion-icon').trim());\n\n // root element must be an svg\n // lets double check we've got valid elements\n // do not allow scripts\n if (isValid(svgElm as HTMLElement)) {\n return div.innerHTML;\n }\n }\n return '';\n};\n\nexport const isValid = (elm: HTMLElement) => {\n if (elm.nodeType === 1) {\n if (elm.nodeName.toLowerCase() === 'script') {\n return false;\n }\n\n for (let i = 0; i < elm.attributes.length; i++) {\n const name = elm.attributes[i].name;\n if (isStr(name) && name.toLowerCase().indexOf('on') === 0) {\n return false;\n }\n }\n\n for (let i = 0; i < elm.childNodes.length; i++) {\n if (!isValid(elm.childNodes[i] as HTMLElement)) {\n return false;\n }\n }\n }\n return true;\n};\n","import { validateContent } from './validate';\n\nexport const pdsIconContent = new Map<string, string>();\nconst requests = new Map<string, Promise<any>>(); // eslint-disable-line @typescript-eslint/no-explicit-any\n\nexport const getSvgContent = (url: string, sanitize = false) => {\n let req = requests.get(url);\n\n if(!req) {\n if (typeof fetch != 'undefined' && typeof document !== 'undefined') {\n // we don't have a request\n req = fetch(url).then((rsp) => {\n if (rsp.ok) {\n return rsp.text().then((svgContent) => {\n if (svgContent && sanitize !== false) {\n svgContent = validateContent(svgContent);\n }\n pdsIconContent.set(url, svgContent || '');\n });\n }\n pdsIconContent.set(url, '');\n });\n\n requests.set(url, req);\n } else {\n pdsIconContent.set(url, '');\n return Promise.resolve();\n }\n }\n return req;\n}\n",":host {\n contain: strict;\n display: inline-block;\n fill: currentColor;\n height: 1em;\n width: 1em;\n\n .pdsicon {\n fill: currentColor;\n }\n}\n\n.pds-icon-fill-none {\n fill: none;\n}\n\n.icon-inner,\n.pds-icon,\nsvg {\n display: block;\n height: 100%;\n width: 100%;\n}\n","import { Build, Component, Element, Host, Prop, State, Watch, h } from '@stencil/core';\nimport { getSvgContent, pdsIconContent } from './request';\nimport { getName, getUrl, inheritAttributes } from './utils';\n\n@Component({\n tag: 'pds-icon',\n assetsDirs: ['svg'],\n styleUrl: 'pds-icon.scss',\n shadow: true,\n})\nexport class PdsIcon {\n private io?: IntersectionObserver;\n private inheritedAttributes: { [k: string]: any } = {}; // eslint-disable-line @typescript-eslint/no-explicit-any\n\n @Element() el!: HTMLPdsIconElement;\n\n @State() private ariaLabel?: string;\n @State() private isVisible = false;\n @State() private svgContent?: string;\n\n /**\n *\n * The color of the icon\n *\n */\n @Prop() color?: string;\n\n /**\n * The name of the icon to use from\n * the built-in set.\n */\n @Prop({ reflect: true }) name?: string;\n\n /**\n * The size of the icon. This can be\n * 'small', 'regular', 'medium', large, or a\n * custom value (40px, 1rem, etc)\n *\n */\n @Prop({ reflect: true }) size?:\n | 'small' // 12px\n | 'regular' // 16px\n | 'medium' // 20px\n | 'large' // 24px\n | 'auto'\n | string = 'regular'\n\n private iconSize() {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const sizes: { [key: string]: any } = {\n small: '12px',\n regular: '16px',\n medium: '20px',\n large: '24px',\n }\n\n if (sizes[this.size]) {\n return sizes[this.size];\n } else {\n return this.size;\n }\n }\n componentWillLoad() {\n this.inheritedAttributes = inheritAttributes(this.el, ['aria-label']);\n }\n\n connectedCallback() {\n this.waitUntilVisible(this.el, '50px', () => {\n this.isVisible = true;\n this.loadIcon();\n })\n }\n\n disconnectedCallback() {\n if (this.io) {\n this.io.disconnect();\n this.io = undefined;\n }\n }\n\n @Watch('name')\n loadIcon() {\n if (Build.isBrowser && this.isVisible) {\n const url = getUrl(this);\n if (url) {\n if (pdsIconContent.has(url)) {\n this.svgContent = pdsIconContent.get(url);\n } else {\n getSvgContent(url).then(() => (this.svgContent = pdsIconContent.get(url)));\n }\n }\n }\n\n const label = getName(this.name);\n\n if (label) {\n this.ariaLabel = label.replace(/\\-/g, ' ');\n }\n }\n\n render() {\n const { ariaLabel, inheritedAttributes } = this;\n\n const style = {\n height: this.iconSize(),\n width: this.iconSize(),\n color: this.color,\n }\n\n return (\n\n <Host\n aria-label={ariaLabel !== undefined && !this.hasAriaHidden() ? ariaLabel : null }\n role=\"img\"\n style={style}\n class={{\n ...createColorClasses(this.color),\n }}\n {...inheritedAttributes}\n >\n {Build.isBrowser && this.svgContent ? (\n <div class=\"icon-inner\" innerHTML={this.svgContent}></div>\n ) : (\n <div class=\"icon-inner\"></div>\n )}\n </Host>\n )\n }\n\n /*****\n * Private Methods\n ****/\n\n private waitUntilVisible(el: HTMLElement, rootMargin: string, cb: () => void) {\n if (Build.isBrowser && typeof window !== 'undefined' && (window).IntersectionObserver) {\n const io = (this.io = new (window).IntersectionObserver(\n (data: IntersectionObserverEntry[]) => {\n if (data[0].isIntersecting) {\n io.disconnect();\n this.io = undefined;\n cb();\n }\n },\n { rootMargin },\n ));\n\n io.observe(el);\n } else {\n // browser doesn't support IntersectionObserver\n // so just fallback to always show it\n cb();\n }\n }\n\n private hasAriaHidden = () => {\n const { el } = this;\n\n return el.hasAttribute('aria-hidden') && el.getAttribute('aria-hidden') === 'true';\n }\n}\n\nconst createColorClasses = (color: string | undefined) => {\n return color\n ? {\n 'pds-color': true,\n [`pds-color-${color}`]: true,\n }\n : null;\n };\n"],"mappings":"6GAEO,MAAMA,EAAmBC,IAC9B,MAAMC,EAAMC,SAASC,cAAc,OACnCF,EAAIG,UAAYJ,EAGhB,IAAK,IAAIK,EAAIJ,EAAIK,WAAWC,OAAS,EAAGF,GAAK,EAAGA,IAAK,CACnD,GAAIJ,EAAIK,WAAWD,GAAGG,SAASC,gBAAkB,MAAO,CACtDR,EAAIS,YAAYT,EAAIK,WAAWD,G,EAKnC,MAAMM,EAASV,EAAIW,kBACnB,GAAID,GAAUA,EAAOH,SAASC,gBAAkB,MAAO,CACrD,MAAMI,EAAWF,EAAOG,aAAa,UAAY,GACjDH,EAAOI,aAAa,SAAUF,EAAW,eAAeG,QAKxD,GAAIC,EAAQN,GAAwB,CAClC,OAAOV,EAAIG,S,EAGf,MAAO,EAAE,EAGJ,MAAMa,EAAWC,IACtB,GAAIA,EAAIC,WAAa,EAAG,CACtB,GAAID,EAAIV,SAASC,gBAAkB,SAAU,CAC3C,OAAO,K,CAGT,IAAK,IAAIJ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B,EAAGC,aACHpB,KAAKmB,GAAKE,UACVoB,G,IAGJ,CAAED,eAGJrB,EAAG2B,QAAQ3C,E,KACN,CAGLsC,G,kHAWN,MAAMF,EAAsBP,GACnBA,EACJ,CACE,YAAa,KACb,CAAC,aAAaA,KAAU,MAE1B,K"}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
const t="pds-icons";let n;let e;let s=false;let l=false;const o=t=>{const n=new URL(t,$t.t);return n.origin!==ht.location.origin?n.href:n.pathname};const c=(t,n="")=>{{return()=>{}}};const i=(t,n)=>{{return()=>{}}};const f="{visibility:hidden}.hydrated{visibility:inherit}";const r="http://www.w3.org/1999/xlink";const u={};const a=t=>t!=null;const d=t=>{t=typeof t;return t==="object"||t==="function"};function y(t){var n,e,s;return(s=(e=(n=t.head)===null||n===void 0?void 0:n.querySelector('meta[name="csp-nonce"]'))===null||e===void 0?void 0:e.getAttribute("content"))!==null&&s!==void 0?s:undefined}const h=(t,n,...e)=>{let s=null;let l=null;let o=false;let c=false;const i=[];const f=n=>{for(let e=0;e<n.length;e++){s=n[e];if(Array.isArray(s)){f(s)}else if(s!=null&&typeof s!=="boolean"){if(o=typeof t!=="function"&&!d(s)){s=String(s)}if(o&&c){i[i.length-1].l+=s}else{i.push(o?p(null,s):s)}c=o}}};f(e);if(n){if(n.key){l=n.key}{const t=n.className||n.class;if(t){n.class=typeof t!=="object"?t:Object.keys(t).filter((n=>t[n])).join(" ")}}}const r=p(t,null);r.o=n;if(i.length>0){r.i=i}{r.u=l}return r};const p=(t,n)=>{const e={h:0,p:t,l:n,$:null,i:null};{e.o=null}{e.u=null}return e};const $={};const m=t=>t&&t.p===$;const v=(t,n)=>{if(t!=null&&!d(t)){if(n&1){return String(t)}return t}return t};const w=t=>ct(t).m;const b=(t,n,e)=>{const s=$t.ce(n,e);t.dispatchEvent(s);return s};const S=new WeakMap;const g=(t,n,e)=>{let s=yt.get(t);if(vt&&e){s=s||new CSSStyleSheet;if(typeof s==="string"){s=n}else{s.replaceSync(n)}}else{s=n}yt.set(t,s)};const k=(t,n,e)=>{var s;const l=C(n);const o=yt.get(l);t=t.nodeType===11?t:pt;if(o){if(typeof o==="string"){t=t.head||t;let n=S.get(t);let e;if(!n){S.set(t,n=new Set)}if(!n.has(l)){{e=pt.createElement("style");e.innerHTML=o;const n=(s=$t.v)!==null&&s!==void 0?s:y(pt);if(n!=null){e.setAttribute("nonce",n)}t.insertBefore(e,t.querySelector("link"))}if(n){n.add(l)}}}else if(!t.adoptedStyleSheets.includes(o)){t.adoptedStyleSheets=[...t.adoptedStyleSheets,o]}}return l};const j=t=>{const n=t.S;const e=t.m;const s=n.h;const l=c("attachStyles",n.k);const o=k(e.shadowRoot?e.shadowRoot:e.getRootNode(),n);if(s&10){e["s-sc"]=o;e.classList.add(o+"-h")}l()};const C=(t,n)=>"sc-"+t.k;const M=(t,n,e,s,l,o)=>{if(e!==s){let c=rt(t,n);let i=n.toLowerCase();if(n==="class"){const n=t.classList;const l=x(e);const o=x(s);n.remove(...l.filter((t=>t&&!o.includes(t))));n.add(...o.filter((t=>t&&!l.includes(t))))}else if(n==="style"){{for(const n in e){if(!s||s[n]==null){if(n.includes("-")){t.style.removeProperty(n)}else{t.style[n]=""}}}}for(const n in s){if(!e||s[n]!==e[n]){if(n.includes("-")){t.style.setProperty(n,s[n])}else{t.style[n]=s[n]}}}}else if(n==="key");else if(n==="ref"){if(s){s(t)}}else if(!c&&n[0]==="o"&&n[1]==="n"){if(n[2]==="-"){n=n.slice(3)}else if(rt(ht,i)){n=i.slice(2)}else{n=i[2]+n.slice(3)}if(e){$t.rel(t,n,e,false)}if(s){$t.ael(t,n,s,false)}}else{const f=d(s);if((c||f&&s!==null)&&!l){try{if(!t.tagName.includes("-")){const l=s==null?"":s;if(n==="list"){c=false}else if(e==null||t[n]!=l){t[n]=l}}else{t[n]=s}}catch(t){}}let u=false;{if(i!==(i=i.replace(/^xlink\:?/,""))){n=i;u=true}}if(s==null||s===false){if(s!==false||t.getAttribute(n)===""){if(u){t.removeAttributeNS(r,n)}else{t.removeAttribute(n)}}}else if((!c||o&4||l)&&!f){s=s===true?"":s;if(u){t.setAttributeNS(r,n,s)}else{t.setAttribute(n,s)}}}}};const O=/\s/;const x=t=>!t?[]:t.split(O);const P=(t,n,e,s)=>{const l=n.$.nodeType===11&&n.$.host?n.$.host:n.$;const o=t&&t.o||u;const c=n.o||u;{for(s in o){if(!(s in c)){M(l,s,o[s],undefined,e,n.h)}}}for(s in c){M(l,s,o[s],c[s],e,n.h)}};const U=(t,e,l,o)=>{const c=e.i[l];let i=0;let f;let r;if(c.l!==null){f=c.$=pt.createTextNode(c.l)}else{f=c.$=pt.createElement(c.p);{P(null,c,s)}if(a(n)&&f["s-si"]!==n){f.classList.add(f["s-si"]=n)}if(c.i){for(i=0;i<c.i.length;++i){r=U(t,c,i);if(r){f.appendChild(r)}}}}return f};const L=(t,n,s,l,o,c)=>{let i=t;let f;if(i.shadowRoot&&i.tagName===e){i=i.shadowRoot}for(;o<=c;++o){if(l[o]){f=U(null,s,o);if(f){l[o].$=f;i.insertBefore(f,n)}}}};const A=(t,n,e)=>{for(let s=n;s<=e;++s){const n=t[s];if(n){const t=n.$;T(n);if(t){t.remove()}}}};const E=(t,n,e,s)=>{let l=0;let o=0;let c=0;let i=0;let f=n.length-1;let r=n[0];let u=n[f];let a=s.length-1;let d=s[0];let y=s[a];let h;let p;while(l<=f&&o<=a){if(r==null){r=n[++l]}else if(u==null){u=n[--f]}else if(d==null){d=s[++o]}else if(y==null){y=s[--a]}else if(N(r,d)){R(r,d);r=n[++l];d=s[++o]}else if(N(u,y)){R(u,y);u=n[--f];y=s[--a]}else if(N(r,y)){R(r,y);t.insertBefore(r.$,u.$.nextSibling);r=n[++l];y=s[--a]}else if(N(u,d)){R(u,d);t.insertBefore(u.$,r.$);u=n[--f];d=s[++o]}else{c=-1;{for(i=l;i<=f;++i){if(n[i]&&n[i].u!==null&&n[i].u===d.u){c=i;break}}}if(c>=0){p=n[c];if(p.p!==d.p){h=U(n&&n[o],e,c)}else{R(p,d);n[c]=undefined;h=p.$}d=s[++o]}else{h=U(n&&n[o],e,o);d=s[++o]}if(h){{r.$.parentNode.insertBefore(h,r.$)}}}}if(l>f){L(t,s[a+1]==null?null:s[a+1].$,e,s,o,a)}else if(o>a){A(n,l,f)}};const N=(t,n)=>{if(t.p===n.p){{return t.u===n.u}}return false};const R=(t,n)=>{const e=n.$=t.$;const l=t.i;const o=n.i;const c=n.l;if(c===null){{{P(t,n,s)}}if(l!==null&&o!==null){E(e,l,n,o)}else if(o!==null){if(t.l!==null){e.textContent=""}L(e,null,n,o,0,o.length-1)}else if(l!==null){A(l,0,l.length-1)}}else if(t.l!==c){e.data=c}};const T=t=>{{t.o&&t.o.ref&&t.o.ref(null);t.i&&t.i.map(T)}};const W=(t,s,l=false)=>{const o=t.m;const c=t.S;const i=t.j||p(null,null);const f=m(s)?s:h(null,null,s);e=o.tagName;if(c.C){f.o=f.o||{};c.C.map((([t,n])=>f.o[n]=o[t]))}if(l&&f.o){for(const t of Object.keys(f.o)){if(o.hasAttribute(t)&&!["key","ref","style","class"].includes(t)){f.o[t]=o[t]}}}f.p=null;f.h|=4;t.j=f;f.$=i.$=o.shadowRoot||o;{n=o["s-sc"]}R(i,f)};const H=(t,n)=>{if(n&&!t.M&&n["s-p"]){n["s-p"].push(new Promise((n=>t.M=n)))}};const q=(t,n)=>{{t.h|=16}if(t.h&4){t.h|=512;return}H(t,t.O);const e=()=>F(t,n);return Ct(e)};const F=(t,n)=>{const e=c("scheduleUpdate",t.S.k);const s=t.P;let l;if(n){{l=G(s,"componentWillLoad")}}e();return I(l,(()=>_(t,s,n)))};const I=(t,n)=>V(t)?t.then(n):n();const V=t=>t instanceof Promise||t&&t.then&&typeof t.then==="function";const _=async(t,n,e)=>{var s;const l=t.m;const o=c("update",t.S.k);const i=l["s-rc"];if(e){j(t)}const f=c("render",t.S.k);{z(t,n,l,e)}if(i){i.map((t=>t()));l["s-rc"]=undefined}f();o();{const n=(s=l["s-p"])!==null&&s!==void 0?s:[];const e=()=>B(t);if(n.length===0){e()}else{Promise.all(n).then(e);t.h|=4;n.length=0}}};const z=(t,n,e,s)=>{try{n=n.render();{t.h&=~16}{t.h|=2}{{{W(t,n,s)}}}}catch(n){ut(n,t.m)}return null};const B=t=>{const n=t.S.k;const e=t.m;const s=c("postUpdate",n);const l=t.O;if(!(t.h&64)){t.h|=64;{J(e)}s();{t.U(e);if(!l){D()}}}else{s()}{if(t.M){t.M();t.M=undefined}if(t.h&512){jt((()=>q(t,false)))}t.h&=~(4|512)}};const D=n=>{{J(pt.documentElement)}jt((()=>b(ht,"appload",{detail:{namespace:t}})))};const G=(t,n,e)=>{if(t&&t[n]){try{return t[n](e)}catch(t){ut(t)}}return undefined};const J=t=>t.classList.add("hydrated");const K=(t,n)=>ct(t).L.get(n);const Q=(t,n,e,s)=>{const l=ct(t);const o=l.m;const c=l.L.get(n);const i=l.h;const f=l.P;e=v(e,s.A[n][0]);const r=Number.isNaN(c)&&Number.isNaN(e);const u=e!==c&&!r;if((!(i&8)||c===undefined)&&u){l.L.set(n,e);if(f){if(s.N&&i&128){const t=s.N[n];if(t){t.map((t=>{try{f[t](e,c,n)}catch(t){ut(t,o)}}))}}if((i&(2|16))===2){q(l,false)}}}};const X=(t,n,e)=>{var s;if(n.A){if(t.watchers){n.N=t.watchers}const l=Object.entries(n.A);const o=t.prototype;l.map((([t,[s]])=>{if(s&31||e&2&&s&32){Object.defineProperty(o,t,{get(){return K(this,t)},set(e){Q(this,t,e,n)},configurable:true,enumerable:true})}}));if(e&1){const e=new Map;o.attributeChangedCallback=function(t,s,l){$t.jmp((()=>{const c=e.get(t);if(this.hasOwnProperty(c)){l=this[c];delete this[c]}else if(o.hasOwnProperty(c)&&typeof this[c]==="number"&&this[c]==l){return}else if(c==null){const e=ct(this);const o=e===null||e===void 0?void 0:e.h;if(!(o&8)&&o&128&&l!==s){const o=e.P;const c=n.N[t];c===null||c===void 0?void 0:c.forEach((n=>{if(o[n]!=null){o[n].call(o,l,s,t)}}))}return}this[c]=l===null&&typeof this[c]==="boolean"?false:l}))};t.observedAttributes=Array.from(new Set([...Object.keys((s=n.N)!==null&&s!==void 0?s:{}),...l.filter((([t,n])=>n[0]&15)).map((([t,s])=>{const l=s[1]||t;e.set(l,t);if(s[0]&512){n.C.push([t,l])}return l}))]))}}return t};const Y=async(t,n,e,s,l)=>{if((n.h&32)===0){n.h|=32;{l=dt(e);if(l.then){const t=i();l=await l;t()}if(!l.isProxied){{e.N=l.watchers}X(l,e,2);l.isProxied=true}const t=c("createInstance",e.k);{n.h|=8}try{new l(n)}catch(t){ut(t)}{n.h&=~8}{n.h|=128}t();Z(n.P)}if(l.style){let t=l.style;const n=C(e);if(!yt.has(n)){const s=c("registerStyles",e.k);g(n,t,!!(e.h&1));s()}}}const o=n.O;const f=()=>q(n,true);if(o&&o["s-rc"]){o["s-rc"].push(f)}else{f()}};const Z=t=>{{G(t,"connectedCallback")}};const tt=t=>{if(($t.h&1)===0){const n=ct(t);const e=n.S;const s=c("connectedCallback",e.k);if(!(n.h&1)){n.h|=1;{let e=t;while(e=e.parentNode||e.host){if(e["s-p"]){H(n,n.O=e);break}}}if(e.A){Object.entries(e.A).map((([n,[e]])=>{if(e&31&&t.hasOwnProperty(n)){const e=t[n];delete t[n];t[n]=e}}))}{Y(t,n,e)}}else{if(n===null||n===void 0?void 0:n.P){Z(n.P)}else if(n===null||n===void 0?void 0:n.R){n.R.then((()=>Z(n.P)))}}s()}};const nt=t=>{{G(t,"disconnectedCallback")}};const et=async t=>{if(($t.h&1)===0){const n=ct(t);if(n===null||n===void 0?void 0:n.P){nt(n.P)}else if(n===null||n===void 0?void 0:n.R){n.R.then((()=>nt(n.P)))}}};const st=(t,n={})=>{var e;const s=c();const l=[];const o=n.exclude||[];const i=ht.customElements;const r=pt.head;const u=r.querySelector("meta[charset]");const a=pt.createElement("style");const d=[];let h;let p=true;Object.assign($t,n);$t.t=new URL(n.resourcesUrl||"./",pt.baseURI).href;t.map((t=>{t[1].map((n=>{var e;const s={h:n[0],k:n[1],A:n[2],T:n[3]};{s.A=n[2]}{s.C=[]}{s.N=(e=n[4])!==null&&e!==void 0?e:{}}const c=s.k;const f=class extends HTMLElement{constructor(t){super(t);t=this;ft(t,s);if(s.h&1){{{t.attachShadow({mode:"open"})}}}}connectedCallback(){if(h){clearTimeout(h);h=null}if(p){d.push(this)}else{$t.jmp((()=>tt(this)))}}disconnectedCallback(){$t.jmp((()=>et(this)))}componentOnReady(){return ct(this).R}};s.W=t[0];if(!o.includes(c)&&!i.get(c)){l.push(c);i.define(c,X(f,s,1))}}))}));{a.innerHTML=l+f;a.setAttribute("data-styles","");const t=(e=$t.v)!==null&&e!==void 0?e:y(pt);if(t!=null){a.setAttribute("nonce",t)}r.insertBefore(a,u?u.nextSibling:r.firstChild)}p=false;if(d.length){d.map((t=>t.connectedCallback()))}else{{$t.jmp((()=>h=setTimeout(D,30)))}}s()};const lt=t=>$t.v=t;const ot=new WeakMap;const ct=t=>ot.get(t);const it=(t,n)=>ot.set(n.P=t,n);const ft=(t,n)=>{const e={h:0,m:t,S:n,L:new Map};{e.R=new Promise((t=>e.U=t));t["s-p"]=[];t["s-rc"]=[]}return ot.set(t,e)};const rt=(t,n)=>n in t;const ut=(t,n)=>(0,console.error)(t,n);const at=new Map;const dt=(t,n,e)=>{const s=t.k.replace(/-/g,"_");const l=t.W;const o=at.get(l);if(o){return o[s]}
|
|
2
|
-
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/return import(`./${l}.entry.js${""}`).then((t=>{{at.set(l,t)}return t[s]}),ut)};const yt=new Map;const ht=typeof window!=="undefined"?window:{};const pt=ht.document||{head:{}};const $t={h:0,t:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,n,e,s)=>t.addEventListener(n,e,s),rel:(t,n,e,s)=>t.removeEventListener(n,e,s),ce:(t,n)=>new CustomEvent(t,n)};const mt=t=>Promise.resolve(t);const vt=(()=>{try{new CSSStyleSheet;return typeof(new CSSStyleSheet).replaceSync==="function"}catch(t){}return false})();const wt=[];const bt=[];const St=(t,n)=>e=>{t.push(e);if(!l){l=true;if(n&&$t.h&4){jt(kt)}else{$t.raf(kt)}}};const gt=t=>{for(let n=0;n<t.length;n++){try{t[n](performance.now())}catch(t){ut(t)}}t.length=0};const kt=()=>{gt(wt);{gt(bt);if(l=wt.length>0){$t.raf(kt)}}};const jt=t=>mt().then(t);const Ct=St(bt,true);export{$ as H,w as a,st as b,o as g,h,mt as p,it as r,lt as s};
|
|
3
|
-
//# sourceMappingURL=p-a3383818.js.map
|