@pine-ds/icons 7.1.0 → 7.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.
Files changed (35) hide show
  1. package/components/pds-icon.js +1 -1
  2. package/components/pds-icon.js.map +1 -1
  3. package/dist/cheatsheet.html +10 -4
  4. package/dist/cjs/pds-icon.cjs.entry.js +1 -1
  5. package/dist/cjs/pds-icon.cjs.entry.js.map +1 -1
  6. package/dist/collection/components/pds-icon/pds-icon.js +1 -1
  7. package/dist/collection/components/pds-icon/pds-icon.js.map +1 -1
  8. package/dist/collection/components/pds-icon/svg/bulb.svg +1 -0
  9. package/dist/collection/components/pds-icon/svg/file-02.svg +1 -0
  10. package/dist/collection/components/pds-icon/svg/trophy-filled.svg +1 -0
  11. package/dist/collection/components/pds-icon/test/pds-icon.e2e.js +1 -1
  12. package/dist/collection/components/pds-icon/test/pds-icon.e2e.js.map +1 -1
  13. package/dist/collection/components/pds-icon/test/pds-icon.spec.js +8 -8
  14. package/dist/collection/components/pds-icon/test/pds-icon.spec.js.map +1 -1
  15. package/dist/docs.json +1 -1
  16. package/dist/esm/pds-icon.entry.js +1 -1
  17. package/dist/esm/pds-icon.entry.js.map +1 -1
  18. package/dist/pds-icons/p-20b3c799.entry.js +2 -0
  19. package/dist/pds-icons/p-20b3c799.entry.js.map +1 -0
  20. package/dist/pds-icons/pds-icons.esm.js +1 -1
  21. package/dist/pds-icons/svg/bulb.svg +1 -0
  22. package/dist/pds-icons/svg/file-02.svg +1 -0
  23. package/dist/pds-icons/svg/trophy-filled.svg +1 -0
  24. package/dist/pds-icons.json +28 -1
  25. package/dist/pds-icons.symbols.svg +4 -1
  26. package/dist/svg/bulb.svg +1 -0
  27. package/dist/svg/file-02.svg +1 -0
  28. package/dist/svg/trophy-filled.svg +1 -0
  29. package/icons/index.d.ts +4 -1
  30. package/icons/index.js +4 -1
  31. package/icons/index.mjs +4 -1
  32. package/icons/package.json +1 -1
  33. package/package.json +1 -1
  34. package/dist/pds-icons/p-9bdf8fd3.entry.js +0 -2
  35. package/dist/pds-icons/p-9bdf8fd3.entry.js.map +0 -1
@@ -292,7 +292,7 @@ const PdsIcon$1 = /*@__PURE__*/ proxyCustomElement(class PdsIcon extends HTMLEle
292
292
  width: this.iconSize(),
293
293
  color: this.color,
294
294
  };
295
- return (h(Host, Object.assign({ key: '450a12ddbe225916752aeb9323ff1a11d11bc4b3', "aria-label": ariaLabel !== undefined && !this.hasAriaHidden() ? ariaLabel : null, role: "img", style: style, class: Object.assign({}, createColorClasses(this.color)) }, inheritedAttributes), Build.isBrowser && this.svgContent ? (h("div", { class: "icon-inner", innerHTML: this.svgContent })) : (h("div", { class: "icon-inner" }))));
295
+ return (h(Host, Object.assign({ key: '8b9838e26ed7c79b98edeec06b912db75c420045', "aria-label": ariaLabel !== undefined && !this.hasAriaHidden() ? ariaLabel : null, alt: "", role: "img", style: style, class: Object.assign({}, createColorClasses(this.color)) }, inheritedAttributes), Build.isBrowser && this.svgContent ? (h("div", { class: "icon-inner", innerHTML: this.svgContent })) : (h("div", { class: "icon-inner" }))));
296
296
  }
297
297
  /*****
298
298
  * Private Methods
@@ -1 +1 @@
1
- {"file":"pds-icon.js","mappings":";;AAEA,IAAI,uBAAuB,GAAG,KAAK,CAAC;AAQpC;;;;;;;;;AASO,MAAM,YAAY,GAAG,CAAC,IAAY;;IACvC,MAAM,iBAAiB,GAAG,MAAA,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAkB,4BAA4B,CAAC,0CAAE,OAAO,CAAC,aAAa,CAAC;;IAG5H,MAAM,eAAe,GAAG,MAAM,CAAC,mBAAmB,CAAC;;IAGnD,MAAM,YAAY,GAAG,6DAA6D,CAAC;IAEnF,MAAM,aAAa,GAAI,KAAK,CAAC,SAAS,GAAG,iBAAiB,GAAG,iBAAiB,IAAI,eAAe,IAAI,YAAY,IAAI,GAAG,CAAA;;IAGxH,IAAK,aAAa,CAAC,UAAU,CAAC,+BAA+B,CAAC,IAAI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AAG,CAAC,KAAyB;IACnD,OAAO,KAAK;UACT;YACE,WAAW,EAAE,IAAI;YACjB,CAAC,aAAa,KAAK,EAAE,GAAG,IAAI;SAC7B;UACD,IAAI,CAAC;AACT,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;","names":["PdsIcon"],"sources":["src/components/pds-icon/assetPath.ts","src/components/pds-icon/utils.ts","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 { Build } from '@stencil/core';\n\nlet missingAssetPathWarning = false;\n\ndeclare global {\n interface Window {\n __PINE_ASSET_PATH__?: string\n }\n}\n\n/**\n *\n * Reads the component asset path config from meta tag or a global variable.\n * This is a temporary workaround until these issues have been addressed:\n *\n * https://github.com/ionic-team/stencil/issues/2826/\n * https://github.com/ionic-team/stencil/issues/3470\n * https://github.com/ionic-team/stencil-ds-output-targets/issues/186\n */\nexport const getAssetPath = (path: string) => {\n const metaPineAssetPath = document.head.querySelector<HTMLMetaElement>('meta[data-pine-asset-path]')?.dataset.pineAssetPath;\n\n // Get the asset path from the window object if available\n const windowAssetPath = window.__PINE_ASSET_PATH__;\n\n // Set the CDN Asset path using the latest version\n const cdnAssetPath = 'https://cdn.jsdelivr.net/npm/@pine-ds/icons/dist/pds-icons/';\n\n const assetBasePath = Build.isTesting ? '/dist/pds-icons' : metaPineAssetPath || windowAssetPath || cdnAssetPath || '/'\n\n // Display a warning if the assets are fetched from the CDN.\n if ( assetBasePath.startsWith('https://cdn.jsdelivr.net/npm/') && !missingAssetPathWarning ) {\n missingAssetPathWarning = true;\n console.warn(`\n Fetching Pine asssets from jsDelivr CDN.\\n\\n It's recommended that you bundle Pine Assets with your application and setting the path accordingly.\\n\\nFor more information you read the documentation: \\nhttps://pine-design-system.netlify.app/?path=/docs/resources-assets--docs\n `)\n }\n\n let assetPath = path;\n\n if ( path.startsWith ('./') ) {\n assetPath = path.substring(2);\n }\n\n if ( !assetBasePath.endsWith('/') ) {\n assetPath = '/' + assetPath;\n }\n\n return assetBasePath + assetPath;\n}\n\n\nexport {};\n","import { getAssetPath } from './assetPath';\n\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 = (\n iconName: string | undefined,\n icon: string | undefined\n ) => {\n\n if(!iconName && icon && !isSrc(icon)) {\n iconName = icon;\n }\n\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 = (pdsIcon: PdsIcon) => {\n let url = getSrc(pdsIcon.src);\n if (url) {\n return url;\n }\n\n url = getName(pdsIcon.name, pdsIcon.icon);\n if (url) {\n return getNamedUrl(url);\n }\n\n if (pdsIcon.icon) {\n url = getSrc(pdsIcon.icon);\n\n if(url) {\n return url;\n }\n }\n\n return null;\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","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-pds-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\nexport const isSvgDataUrl = (url: string) => url.startsWith('data:image/svg+xml');\nexport const isEncodedDataUrl = (url: string) => url.indexOf(';utf8,') !== -1;\n","import { isEncodedDataUrl, isSvgDataUrl, 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\nlet parser: DOMParser;\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 if (isSvgDataUrl(url) && isEncodedDataUrl(url)) {\n if (!parser) {\n parser = new DOMParser();\n }\n\n const doc = parser.parseFromString(url, 'text/html');\n const svg = doc.querySelector('svg');\n\n if (svg) {\n pdsIconContent.set(url, svg.outerHTML);\n }\n\n return Promise.resolve();\n } else {\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 }\n } else {\n pdsIconContent.set(url, '');\n return Promise.resolve();\n }\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 * This a combination of both `name` and `src`. If a `src` url is detected\n * it will set the `src` property. Otherwise it assumes it's a built-in named\n * SVG and set the `name` property.\n */\n @Prop() icon?: any;\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 /**\n *\n * Specifies the exact `src` of an SVG file to use.\n */\n @Prop() src?: string;\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 @Watch('src')\n @Watch('icon')\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, this.icon);\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"],"version":3}
1
+ {"file":"pds-icon.js","mappings":";;AAEA,IAAI,uBAAuB,GAAG,KAAK,CAAC;AAQpC;;;;;;;;;AASO,MAAM,YAAY,GAAG,CAAC,IAAY;;IACvC,MAAM,iBAAiB,GAAG,MAAA,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAkB,4BAA4B,CAAC,0CAAE,OAAO,CAAC,aAAa,CAAC;;IAG5H,MAAM,eAAe,GAAG,MAAM,CAAC,mBAAmB,CAAC;;IAGnD,MAAM,YAAY,GAAG,6DAA6D,CAAC;IAEnF,MAAM,aAAa,GAAI,KAAK,CAAC,SAAS,GAAG,iBAAiB,GAAG,iBAAiB,IAAI,eAAe,IAAI,YAAY,IAAI,GAAG,CAAA;;IAGxH,IAAK,aAAa,CAAC,UAA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ACF;;;;;;;;;;;;;;;;;;;;;;;AASH,MAAM,kBAAkB,GAAG,CAAC,KAAyB;IACnD,OAAO,KAAK;UACT;YACE,WAAW,EAAE,IAAI;YACjB,CAAC,aAAa,KAAK,EAAE,GAAG,IAAI;SAC7B;UACD,IAAI,CAAC;AACT,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;","names":["PdsIcon"],"sources":["src/components/pds-icon/assetPath.ts","src/components/pds-icon/utils.ts","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 { Build } from '@stencil/core';\n\nlet missingAssetPathWarning = false;\n\ndeclare global {\n interface Window {\n __PINE_ASSET_PATH__?: string\n }\n}\n\n/**\n *\n * Reads the component asset path config from meta tag or a global variable.\n * This is a temporary workaround until these issues have been addressed:\n *\n * https://github.com/ionic-team/stencil/issues/2826/\n * https://github.com/ionic-team/stencil/issues/3470\n * https://github.com/ionic-team/stencil-ds-output-targets/issues/186\n */\nexport const getAssetPath = (path: string) => {\n const metaPineAssetPath = document.head.querySelector<HTMLMetaElement>('meta[data-pine-asset-path]')?.dataset.pineAssetPath;\n\n // Get the asset path from the window object if available\n const windowAssetPath = window.__PINE_ASSET_PATH__;\n\n // Set the CDN Asset path using the latest version\n const cdnAssetPath = 'https://cdn.jsdelivr.net/npm/@pine-ds/icons/dist/pds-icons/';\n\n const assetBasePath = Build.isTesting ? '/dist/pds-icons' : metaPineAssetPath || windowAssetPath || cdnAssetPath || '/'\n\n // Display a warning if the assets are fetched from the CDN.\n if ( assetBasePath.startsWith('https://cdn.jsdelivr.net/npm/') && !missingAssetPathWarning ) {\n missingAssetPathWarning = true;\n console.warn(`\n Fetching Pine asssets from jsDelivr CDN.\\n\\n It's recommended that you bundle Pine Assets with your application and setting the path accordingly.\\n\\nFor more information you read the documentation: \\nhttps://pine-design-system.netlify.app/?path=/docs/resources-assets--docs\n `)\n }\n\n let assetPath = path;\n\n if ( path.startsWith ('./') ) {\n assetPath = path.substring(2);\n }\n\n if ( !assetBasePath.endsWith('/') ) {\n assetPath = '/' + assetPath;\n }\n\n return assetBasePath + assetPath;\n}\n\n\nexport {};\n","import { getAssetPath } from './assetPath';\n\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 = (\n iconName: string | undefined,\n icon: string | undefined\n ) => {\n\n if(!iconName && icon && !isSrc(icon)) {\n iconName = icon;\n }\n\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 = (pdsIcon: PdsIcon) => {\n let url = getSrc(pdsIcon.src);\n if (url) {\n return url;\n }\n\n url = getName(pdsIcon.name, pdsIcon.icon);\n if (url) {\n return getNamedUrl(url);\n }\n\n if (pdsIcon.icon) {\n url = getSrc(pdsIcon.icon);\n\n if(url) {\n return url;\n }\n }\n\n return null;\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","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-pds-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\nexport const isSvgDataUrl = (url: string) => url.startsWith('data:image/svg+xml');\nexport const isEncodedDataUrl = (url: string) => url.indexOf(';utf8,') !== -1;\n","import { isEncodedDataUrl, isSvgDataUrl, 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\nlet parser: DOMParser;\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 if (isSvgDataUrl(url) && isEncodedDataUrl(url)) {\n if (!parser) {\n parser = new DOMParser();\n }\n\n const doc = parser.parseFromString(url, 'text/html');\n const svg = doc.querySelector('svg');\n\n if (svg) {\n pdsIconContent.set(url, svg.outerHTML);\n }\n\n return Promise.resolve();\n } else {\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 }\n } else {\n pdsIconContent.set(url, '');\n return Promise.resolve();\n }\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 * This a combination of both `name` and `src`. If a `src` url is detected\n * it will set the `src` property. Otherwise it assumes it's a built-in named\n * SVG and set the `name` property.\n */\n @Prop() icon?: any;\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 /**\n *\n * Specifies the exact `src` of an SVG file to use.\n */\n @Prop() src?: string;\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 @Watch('src')\n @Watch('icon')\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, this.icon);\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 alt=\"\"\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"],"version":3}
@@ -2,7 +2,7 @@
2
2
  <html>
3
3
  <head>
4
4
  <meta charset="utf-8">
5
- <title>Pine icons 7.0.1 Cheatsheet</title>
5
+ <title>Pine icons 7.2.0 Cheatsheet</title>
6
6
  <style>
7
7
  body {
8
8
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
@@ -33,8 +33,8 @@
33
33
  </style>
34
34
  </head>
35
35
  <body>
36
- <h1>Pine Icons 7.0.1 Cheatsheet</h1>
37
- <h3>305 icons</h3>
36
+ <h1>Pine Icons 7.2.0 Cheatsheet</h1>
37
+ <h3>308 icons</h3>
38
38
 
39
39
  <a href="./svg/access-key.svg"><svg><use href="#access-key" xlink:href="#access-key"/></svg></a>
40
40
  <a href="./svg/add.svg"><svg><use href="#add" xlink:href="#add"/></svg></a>
@@ -69,6 +69,7 @@
69
69
  <a href="./svg/blog-filled.svg"><svg><use href="#blog-filled" xlink:href="#blog-filled"/></svg></a>
70
70
  <a href="./svg/bold.svg"><svg><use href="#bold" xlink:href="#bold"/></svg></a>
71
71
  <a href="./svg/broadcast.svg"><svg><use href="#broadcast" xlink:href="#broadcast"/></svg></a>
72
+ <a href="./svg/bulb.svg"><svg><use href="#bulb" xlink:href="#bulb"/></svg></a>
72
73
  <a href="./svg/button.svg"><svg><use href="#button" xlink:href="#button"/></svg></a>
73
74
  <a href="./svg/calendar-date.svg"><svg><use href="#calendar-date" xlink:href="#calendar-date"/></svg></a>
74
75
  <a href="./svg/calendar-schedule.svg"><svg><use href="#calendar-schedule" xlink:href="#calendar-schedule"/></svg></a>
@@ -156,6 +157,7 @@
156
157
  <a href="./svg/favorite.svg"><svg><use href="#favorite" xlink:href="#favorite"/></svg></a>
157
158
  <a href="./svg/feedback.svg"><svg><use href="#feedback" xlink:href="#feedback"/></svg></a>
158
159
  <a href="./svg/file.svg"><svg><use href="#file" xlink:href="#file"/></svg></a>
160
+ <a href="./svg/file-02.svg"><svg><use href="#file-02" xlink:href="#file-02"/></svg></a>
159
161
  <a href="./svg/file-money.svg"><svg><use href="#file-money" xlink:href="#file-money"/></svg></a>
160
162
  <a href="./svg/filter.svg"><svg><use href="#filter" xlink:href="#filter"/></svg></a>
161
163
  <a href="./svg/flag.svg"><svg><use href="#flag" xlink:href="#flag"/></svg></a>
@@ -318,6 +320,7 @@
318
320
  <a href="./svg/thumb-up-filled.svg"><svg><use href="#thumb-up-filled" xlink:href="#thumb-up-filled"/></svg></a>
319
321
  <a href="./svg/trash.svg"><svg><use href="#trash" xlink:href="#trash"/></svg></a>
320
322
  <a href="./svg/trophy.svg"><svg><use href="#trophy" xlink:href="#trophy"/></svg></a>
323
+ <a href="./svg/trophy-filled.svg"><svg><use href="#trophy-filled" xlink:href="#trophy-filled"/></svg></a>
321
324
  <a href="./svg/underline.svg"><svg><use href="#underline" xlink:href="#underline"/></svg></a>
322
325
  <a href="./svg/undo.svg"><svg><use href="#undo" xlink:href="#undo"/></svg></a>
323
326
  <a href="./svg/unlock.svg"><svg><use href="#unlock" xlink:href="#unlock"/></svg></a>
@@ -341,7 +344,7 @@
341
344
  <a href="./svg/window-paragraph.svg"><svg><use href="#window-paragraph" xlink:href="#window-paragraph"/></svg></a>
342
345
  <a href="./svg/world.svg"><svg><use href="#world" xlink:href="#world"/></svg></a>
343
346
  <a href="./svg/wrench.svg"><svg><use href="#wrench" xlink:href="#wrench"/></svg></a>
344
- <svg data-pdsicons="7.0.1" style="display:none">
347
+ <svg data-pdsicons="7.2.0" style="display:none">
345
348
  <style>
346
349
  .pdsicon {
347
350
  fill: currentColor;
@@ -386,6 +389,7 @@
386
389
  <symbol id="blog-filled" viewBox="0 0 16 16" class="pdsicon"><path d="M14 0H2a.667.667 0 0 0-.667.667v14.666c0 .368.299.667.667.667h12a.667.667 0 0 0 .667-.667V.667A.667.667 0 0 0 14 0m-2 13c0 .184-.15.333-.333.333H4.333A.333.333 0 0 1 4 13v-.667c0-.184.15-.333.333-.333h7.334c.184 0 .333.15.333.333zm0-3.333c0 .184-.15.333-.333.333H4.333A.333.333 0 0 1 4 9.667V9c0-.184.15-.333.333-.333h7.334c.184 0 .333.149.333.333zm0-3.334c0 .184-.15.334-.333.334H4.333A.333.333 0 0 1 4 6.333V3c0-.184.15-.333.333-.333h7.334c.184 0 .333.149.333.333z"/></symbol>
387
390
  <symbol id="bold" viewBox="0 0 16 16" class="pdsicon"><path fill-rule="evenodd" d="M1.333.667C1.333.298 1.632 0 2 0h7.333A4 4 0 0 1 11.9 7.07 4.668 4.668 0 0 1 10 16H2a.667.667 0 0 1 0-1.333h.667V1.333H2a.667.667 0 0 1-.667-.666m2.667 6h5.333a2.667 2.667 0 1 0 0-5.334H4zM4 8v6.667h6A3.333 3.333 0 0 0 10 8H4"/></symbol>
388
391
  <symbol id="broadcast" viewBox="0 0 16 16" class="pdsicon"><path fill-rule="evenodd" d="M11.057 1.46a.67.67 0 0 1 .276.54v10.667a.667.667 0 0 1-.877.632l-3.123-1.04V14a.667.667 0 0 1-.85.641l-4.666-1.333a.67.67 0 0 1-.484-.641v-2.409l-.877-.292A.67.67 0 0 1 0 9.333v-4c0-.287.184-.541.456-.632l10-3.333a.67.67 0 0 1 .6.091m-4.195 9.236.03.01L10 11.742V2.925L1.333 5.814v3.039zM6 13.116v-1.302l-3.333-1.111v1.46zm8-6.45A.667.667 0 1 0 14 8h1.333a.667.667 0 1 0 0-1.333zm.908-3.337a.667.667 0 0 1-.237.912l-1.133.667a.667.667 0 1 1-.676-1.15l1.133-.666a.667.667 0 0 1 .913.237m-1.37 6.43a.667.667 0 1 0-.676 1.149l1.133.667a.667.667 0 1 0 .676-1.15z"/></symbol>
392
+ <symbol id="bulb" viewBox="0 0 16 16" class="pdsicon"><g clip-path="url(#a)"><path fill-rule="evenodd" d="M8.667 0v2.667H7.333V0zM4.7 3.757 2.815 1.872l-.943.943L3.757 4.7zM2.667 7.333H0v1.334h2.667zM12.243 4.7l1.885-1.885-.943-.943L11.3 3.757zm1.09 2.633H16v1.334h-2.667zM8 3.333A4.666 4.666 0 0 0 3.333 8 4.66 4.66 0 0 0 6 12.212v3.121h4v-3.12A4.66 4.66 0 0 0 12.667 8 4.666 4.666 0 0 0 8 3.333M4.667 8a3.333 3.333 0 1 1 6.666 0 3.33 3.33 0 0 1-2.222 3.139l-.444.157V14H7.333v-2.704l-.444-.157A3.33 3.33 0 0 1 4.667 8"/></g><defs><clipPath id="a"><path d="M0 0h16v16H0z"/></clipPath></defs></symbol>
389
393
  <symbol id="button" viewBox="0 0 16 16" class="pdsicon"><path fill-rule="evenodd" d="M.667 5.333a2 2 0 0 1 2-2h10.666a2 2 0 0 1 2 2v5.334a2 2 0 0 1-2 2H2.667a2 2 0 0 1-2-2zm2-.666A.667.667 0 0 0 2 5.333v5.334c0 .368.299.666.667.666h10.666a.667.667 0 0 0 .667-.666V5.333a.667.667 0 0 0-.667-.666z"/></symbol>
390
394
  <symbol id="calendar-date" viewBox="0 0 16 16" class="pdsicon"><g clip-path="url(#a)"><path d="M3.333 7.667a.667.667 0 0 0-.666.666V9c0 .368.298.667.666.667h1.334A.667.667 0 0 0 5.333 9v-.667a.667.667 0 0 0-.666-.666zM7.333 7.667a.667.667 0 0 0-.666.666V9c0 .368.298.667.666.667h1.334A.667.667 0 0 0 9.333 9v-.667a.667.667 0 0 0-.666-.666zM2.667 11.667c0-.368.298-.667.666-.667h1.334c.368 0 .666.299.666.667v.666a.667.667 0 0 1-.666.667H3.333a.667.667 0 0 1-.666-.667zM7.333 11a.667.667 0 0 0-.666.667v.666c0 .368.298.667.666.667h1.334a.667.667 0 0 0 .666-.667v-.666A.667.667 0 0 0 8.667 11zM10.667 8.333c0-.368.298-.666.666-.666h1.334c.368 0 .666.298.666.666V9a.667.667 0 0 1-.666.667h-1.334A.667.667 0 0 1 10.667 9z"/><path fill-rule="evenodd" d="M12 1a.667.667 0 0 0-1.333 0v1.333H5.333V1A.667.667 0 1 0 4 1v1.333H.667A.667.667 0 0 0 0 3v12c0 .368.298.667.667.667h14.666A.667.667 0 0 0 16 15V3a.667.667 0 0 0-.667-.667H12zm2.667 4V3.667H1.333V5zM1.333 6.333h13.334v8H1.333z"/></g><defs><clipPath id="a"><path d="M0 0h16v16H0z"/></clipPath></defs></symbol>
391
395
  <symbol id="calendar-schedule" viewBox="0 0 16 16" class="pdsicon"><g clip-path="url(#a)"><path fill-rule="evenodd" d="M5.333.667A.667.667 0 1 0 4 .667V2H.667A.667.667 0 0 0 0 2.667v12c0 .368.298.666.667.666H6A.667.667 0 1 0 6 14H1.333V6h13.334v1.333a.667.667 0 1 0 1.333 0V2.667A.667.667 0 0 0 15.333 2H12V.667a.667.667 0 0 0-1.333 0V2H5.333zm9.334 4V3.333H1.333v1.334z"/><path d="M12 10.667a.667.667 0 0 0-1.333 0V12c0 .368.298.667.666.667h1.334a.667.667 0 0 0 0-1.334H12z"/><path fill-rule="evenodd" d="M11.333 8a4 4 0 1 0 0 8 4 4 0 0 0 0-8m-2.666 4A2.667 2.667 0 1 1 14 12a2.667 2.667 0 0 1-5.333 0"/></g><defs><clipPath id="a"><path d="M0 0h16v16H0z"/></clipPath></defs></symbol>
@@ -473,6 +477,7 @@
473
477
  <symbol id="favorite" viewBox="0 0 16 16" class="pdsicon"><path fill-rule="evenodd" d="M1.4 2C3.2.2 6.133.2 8 2v.067V2C9.8.2 12.8.2 14.6 2s1.8 4.8 0 6.6l-6.133 6.133a.6.6 0 0 1-.467.2.6.6 0 0 1-.467-.2L1.4 8.6C-.467 6.8-.467 3.867 1.4 2M7 3C5.667 1.667 3.6 1.667 2.267 3c-1.334 1.333-1.334 3.4 0 4.733L7.933 13.4 13.6 7.733c1.333-1.333 1.333-3.4 0-4.733s-3.4-1.333-4.733 0c-.067.133-.2.333-.334.467-.133.2-.333.266-.533.266s-.4-.133-.533-.266C7.333 3.333 7.2 3.133 7 3"/></symbol>
474
478
  <symbol id="feedback" viewBox="0 0 16 16" class="pdsicon"><g clip-path="url(#a)"><path fill-rule="evenodd" d="M0 7.333C0 3.513 3.697.667 8 .667s8 2.846 8 6.666v.016a6.14 6.14 0 0 1-1.7 4.096l.362 3.145a.667.667 0 0 1-.913.694l-3.726-1.516a7.7 7.7 0 0 1-2.03.232C3.693 13.997 0 11.152 0 7.333M8 2C4.17 2 1.333 4.487 1.333 7.333S4.17 12.667 8 12.667h.014a6.4 6.4 0 0 0 1.87-.242.67.67 0 0 1 .434.024l2.89 1.176-.27-2.349a.67.67 0 0 1 .207-.563 4.8 4.8 0 0 0 1.522-3.388C14.66 4.483 11.827 2 8 2m0 1.333c.368 0 .667.299.667.667v4a.667.667 0 1 1-1.334 0V4c0-.368.299-.667.667-.667m.667 7.334a.667.667 0 1 1-1.334 0 .667.667 0 0 1 1.334 0"/></g><defs><clipPath id="a"><path d="M0 0h16v16H0z"/></clipPath></defs></symbol>
475
479
  <symbol id="file" viewBox="0 0 16 16" class="pdsicon"><g fill-rule="evenodd" clip-path="url(#a)"><path d="M10.438 0H2a.667.667 0 0 0-.667.667v14.666c0 .368.299.667.667.667h12a.667.667 0 0 0 .667-.667V4.667c0-.164-.06-.321-.169-.443l-3.555-4A.67.67 0 0 0 10.438 0m-.66 1.333v3.334c0 .368.298.666.666.666h2.89v9.334H2.666V1.333z"/><path d="M4 6c0-.368.298-.667.667-.667H8a.667.667 0 0 1 0 1.334H4.667A.667.667 0 0 1 4 6M4 8.667C4 8.298 4.298 8 4.667 8h6.666a.667.667 0 1 1 0 1.333H4.667A.667.667 0 0 1 4 8.667M4 11.333c0-.368.298-.666.667-.666h6.666a.667.667 0 1 1 0 1.333H4.667A.667.667 0 0 1 4 11.333"/></g><defs><clipPath id="a"><path d="M0 0h16v16H0z"/></clipPath></defs></symbol>
480
+ <symbol id="file-02" viewBox="0 0 16 16" class="pdsicon"><path fill-rule="evenodd" d="M8.667 2.013A9 9 0 0 0 8.007 2h-2.14c-.571 0-.96 0-1.26.025-.292.024-.441.067-.546.12-.25.128-.455.332-.582.583-.053.104-.097.254-.12.546-.025.3-.026.688-.026 1.26v6.933c0 .57 0 .959.025 1.259.024.292.068.442.12.546.128.25.332.455.583.583.105.053.254.096.546.12.3.024.689.025 1.26.025h4.266c.571 0 .96 0 1.26-.025.292-.024.441-.067.546-.12.25-.128.454-.332.582-.583.053-.104.097-.254.12-.546.025-.3.026-.688.026-1.26V6.66c0-.352-.002-.535-.014-.659H10.38c-.168 0-.332 0-.471-.011a1.4 1.4 0 0 1-.513-.134 1.33 1.33 0 0 1-.583-.583 1.4 1.4 0 0 1-.134-.513c-.011-.139-.011-.303-.011-.471zM9.594.9A2.7 2.7 0 0 0 9.127.74C8.82.666 8.5.666 8.076.667H5.839c-.537 0-.98 0-1.34.03-.375.03-.72.095-1.043.26-.502.256-.91.664-1.165 1.166-.165.323-.23.668-.262 1.042C2 3.526 2 3.97 2 4.505v6.99c0 .536 0 .979.03 1.34.03.374.096.719.26 1.042.256.502.664.91 1.166 1.166.324.165.668.23 1.043.26.36.03.803.03 1.34.03h4.322c.537 0 .98 0 1.34-.03.375-.03.72-.096 1.043-.26.502-.256.91-.664 1.165-1.166.165-.323.23-.668.261-1.042.03-.361.03-.804.03-1.34V6.59c0-.423 0-.743-.074-1.052a2.7 2.7 0 0 0-.319-.77c-.166-.271-.392-.497-.691-.796l-.049-.048-2.125-2.126-.048-.048c-.3-.3-.525-.526-.796-.691a3 3 0 0 0-.304-.161M10 2.943v1.324c0 .197 0 .306.007.383v.009h.01c.077.007.185.008.383.008h1.324z"/></symbol>
476
481
  <symbol id="file-money" viewBox="0 0 16 16" class="pdsicon"><path fill-rule="evenodd" d="M1.333 0h13.334v16H1.333zm1.334 1.333v13.334h10.666V1.333zm6 10.595v1.405H7.333v-1.35a8.7 8.7 0 0 1-2.225-.489l-.628-.226.451-1.254.628.225c.566.204 1.191.35 1.774.405v-2.34c-.433-.153-.9-.347-1.287-.63C5.499 7.27 5.1 6.678 5.1 5.82c0-.73.32-1.288.83-1.649.413-.29.917-.431 1.404-.489V2.667h1.334V3.69c.748.086 1.457.291 1.904.537l.584.322-.642 1.168-.584-.321c-.255-.14-.73-.286-1.262-.362v2.313c.378.133.775.293 1.107.506.54.348.98.887.98 1.713 0 .699-.233 1.278-.677 1.698-.394.372-.9.57-1.41.663m0-1.369c.22-.066.382-.157.494-.263.143-.135.26-.346.26-.729 0-.254-.099-.418-.37-.592a2.6 2.6 0 0 0-.384-.2zM7.333 6.874V5.03c-.276.048-.49.13-.635.232-.16.113-.266.267-.266.56 0 .367.141.584.403.776.14.103.306.192.498.276"/></symbol>
477
482
  <symbol id="filter" viewBox="0 0 16 16" class="pdsicon"><path fill-rule="evenodd" d="M12.71 4.3a1.26 1.26 0 1 0 0 2.518 1.26 1.26 0 0 0 0-2.518m-11.06 2h8.609A2.56 2.56 0 1 0 10.21 5H1.65a.65.65 0 1 0 0 1.3m1.91 5.518a1.26 1.26 0 1 0 0-2.518 1.26 1.26 0 0 0 0 2.518m11.058-2H6.01a2.56 2.56 0 1 0 .048 1.3h8.561a.65.65 0 1 0 0-1.3"/></symbol>
478
483
  <symbol id="flag" viewBox="0 0 16 16" class="pdsicon"><g clip-path="url(#a)"><path fill-rule="evenodd" d="M2 .667a.667.667 0 0 0-1.333 0v14.666a.667.667 0 1 0 1.333 0V10h8a.667.667 0 0 0 .667-.667V4.667h3.075L12.7 7.789a.67.67 0 0 0 0 .422l1.04 3.122H6a.667.667 0 0 0 0 1.334h8.667a.666.666 0 0 0 .632-.878L14.036 8 15.3 4.21a.667.667 0 0 0-.632-.877h-4v-2A.667.667 0 0 0 10 .667zM2 2v6.667h7.333V2z"/></g><defs><clipPath id="a"><path d="M0 0h16v16H0z"/></clipPath></defs></symbol>
@@ -635,6 +640,7 @@
635
640
  <symbol id="thumb-up-filled" viewBox="0 0 16 16" class="pdsicon"><g clip-path="url(#a)"><path fill-rule="evenodd" d="M14.115 6.245a2.67 2.67 0 0 1 1.522 2.827l-.717 4.667A2.65 2.65 0 0 1 12.284 16H4V7.333L6.023.491A.67.67 0 0 1 6.667 0c1.47 0 2 1.196 2 2.667V6H13c.385 0 .765.084 1.115.245M.667 7.333h2V16h-2A.666.666 0 0 1 0 15.333V8a.667.667 0 0 1 .667-.667"/></g><defs><clipPath id="a"><path d="M0 0h16v16H0z"/></clipPath></defs></symbol>
636
641
  <symbol id="trash" viewBox="0 0 16 16" class="pdsicon"><g clip-path="url(#a)"><path fill-rule="evenodd" d="M5.333 0a.667.667 0 0 0-.666.667v2h-4A.667.667 0 1 0 .667 4h14.666a.667.667 0 1 0 0-1.333h-4v-2A.667.667 0 0 0 10.667 0zM10 2.667V1.333H6v1.334z"/><path d="M2.667 5.333c.368 0 .666.299.666.667v8a.667.667 0 0 0 .667.667h8a.667.667 0 0 0 .667-.667V6A.667.667 0 1 1 14 6v8a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6c0-.368.298-.667.667-.667"/><path d="M10.471 7.519c.26.26.26.682 0 .942L8.943 9.99l1.528 1.529a.667.667 0 1 1-.942.942L8 10.933 6.471 12.46a.667.667 0 0 1-.942-.942L7.057 9.99 5.53 8.461a.667.667 0 0 1 .942-.942L8 9.047 9.529 7.52c.26-.26.682-.26.942 0"/></g><defs><clipPath id="a"><path d="M0 0h16v16H0z"/></clipPath></defs></symbol>
637
642
  <symbol id="trophy" viewBox="0 0 16 16" class="pdsicon"><g clip-path="url(#a)"><path fill-rule="evenodd" d="M12.67 0h-12v4a2.66 2.66 0 0 0 2.66 2.67h.07a4.58 4.58 0 0 0 3.93 3.93V12h-.66a3.35 3.35 0 0 0-3.34 3.33V16h9.34v-.67A3.35 3.35 0 0 0 9.33 12h-.66v-1.4a4.58 4.58 0 0 0 3.93-3.93h.07A2.66 2.66 0 0 0 15.33 4V0zM2.39 4.94A1.33 1.33 0 0 1 2 4V1.33h1.33v4c-.353 0-.69-.14-.94-.39m8.36 9a2 2 0 0 1 .47.75H4.78a2 2 0 0 1 1.89-1.34h2.66a2 2 0 0 1 1.42.57zM11.33 6a3.34 3.34 0 0 1-5.69 2.36A3.37 3.37 0 0 1 4.67 6V1.33h6.66zM14 4a1.33 1.33 0 0 1-1.33 1.33v-4H14z"/></g><defs><clipPath id="a"><path d="M0 0h16v16H0z"/></clipPath></defs></symbol>
643
+ <symbol id="trophy-filled" viewBox="0 0 16 16" class="pdsicon"><g clip-path="url(#a)"><path fill-rule="evenodd" d="M12.67 0h-12v4a2.66 2.66 0 0 0 2.66 2.67h.07a4.58 4.58 0 0 0 3.93 3.93V12h-.66a3.35 3.35 0 0 0-3.34 3.33V16h9.34v-.67A3.35 3.35 0 0 0 9.33 12h-.66v-1.4a4.58 4.58 0 0 0 3.93-3.93h.07A2.66 2.66 0 0 0 15.33 4V0zM2.39 4.94A1.33 1.33 0 0 1 2 4V1.33h1.33v4c-.353 0-.69-.14-.94-.39M14 4a1.33 1.33 0 0 1-1.33 1.33v-4H14z"/></g><defs><clipPath id="a"><path d="M0 0h16v16H0z"/></clipPath></defs></symbol>
638
644
  <symbol id="underline" viewBox="0 0 16 16" class="pdsicon"><g clip-path="url(#a)"><path fill-rule="evenodd" d="M4.667 1.333H4V8a4 4 0 0 0 8 0V1.333h-.667a.667.667 0 1 1 0-1.333H14a.667.667 0 1 1 0 1.333h-.667V8A5.333 5.333 0 1 1 2.667 8V1.333H2A.667.667 0 1 1 2 0h2.667a.667.667 0 0 1 0 1.333m-4 13.334a.667.667 0 1 0 0 1.333h14.666a.667.667 0 0 0 0-1.333z"/></g><defs><clipPath id="a"><path d="M0 0h16v16H0z"/></clipPath></defs></symbol>
639
645
  <symbol id="undo" viewBox="0 0 16 16" class="pdsicon"><path fill-rule="evenodd" d="M2.888 4.878a.667.667 0 0 0-1.312-.236l-.83 4.629a.67.67 0 0 0 .542.786l4.635.831a.667.667 0 1 0 .235-1.312l-3.257-.584a8.67 8.67 0 0 1 11.227.88.667.667 0 1 0 .943-.943A10 10 0 0 0 2.377 7.73z"/></symbol>
640
646
  <symbol id="unlock" viewBox="0 0 16 16" class="pdsicon"><g clip-path="url(#a)"><path fill-rule="evenodd" d="M8.073 0h-.07A3.967 3.967 0 0 0 4 3.927v2.74H2a.667.667 0 0 0-.667.666v8c0 .368.299.667.667.667h12a.667.667 0 0 0 .667-.667v-8A.667.667 0 0 0 14 6.667H5.333v-2.73a2.634 2.634 0 0 1 2.66-2.604h.07a2.634 2.634 0 0 1 2.604 2.66.667.667 0 1 0 1.333.014A3.967 3.967 0 0 0 8.073 0M4.668 8H2.666v6.667h10.667V8zM8 10.667A.667.667 0 1 0 8 12a.667.667 0 0 0 0-1.333m-2 .666a2 2 0 1 1 4 0 2 2 0 0 1-4 0"/></g><defs><clipPath id="a"><path d="M0 0h16v16H0z"/></clipPath></defs></symbol>
@@ -166,7 +166,7 @@ const PdsIcon = class {
166
166
  width: this.iconSize(),
167
167
  color: this.color,
168
168
  };
169
- return (index.h(index.Host, Object.assign({ key: '450a12ddbe225916752aeb9323ff1a11d11bc4b3', "aria-label": ariaLabel !== undefined && !this.hasAriaHidden() ? ariaLabel : null, role: "img", style: style, class: Object.assign({}, createColorClasses(this.color)) }, inheritedAttributes), this.svgContent ? (index.h("div", { class: "icon-inner", innerHTML: this.svgContent })) : (index.h("div", { class: "icon-inner" }))));
169
+ return (index.h(index.Host, Object.assign({ key: '8b9838e26ed7c79b98edeec06b912db75c420045', "aria-label": ariaLabel !== undefined && !this.hasAriaHidden() ? ariaLabel : null, alt: "", role: "img", style: style, class: Object.assign({}, createColorClasses(this.color)) }, inheritedAttributes), this.svgContent ? (index.h("div", { class: "icon-inner", innerHTML: this.svgContent })) : (index.h("div", { class: "icon-inner" }))));
170
170
  }
171
171
  /*****
172
172
  * Private Methods
@@ -1 +1 @@
1
- {"file":"pds-icon.entry.cjs.js","mappings":";;;;;;;AAEO,MAAM,eAAe,GAAG,CAAC,UAAkB;IAChD,MAAM,GAAG,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAC1C,GAAG,CAAC,SAAS,GAAG,UAAU,CAAC;;IAG3B,KAAK,IAAI,CAAC,GAAG,GAAG,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE;QACnD,IAAI,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,WAAW,EAAE,KAAK,KAAK,EAAE;YACtD,GAAG,CAAC,WAAW,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;SACpC;KACF;;IAGD,MAAM,MAAM,GAAG,GAAG,CAAC,iBAAiB,CAAC;IACrC,IAAI,MAAM,IAAI,MAAM,CAAC,QAAQ,CAAC,WAAW,EAAE,KAAK,KAAK,EAAE;QACrD,MAAM,QAAQ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K,oBACA,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,KAE/B,mBAAmB,GAEH,IAAI,CAAC,UAAU,IACjCD,iBAAK,KAAK,EAAC,YAAY,EAAC,SAAS,EAAE,IAAI,CAAC,UAAU,GAAQ,KAE1DA,iBAAK,KAAK,EAAC,YAAY,GAAO,CAC/B,CACI,EACR;KACF;;;;IAMO,gBAAgB,CAAC,EAAe,EAAE,UAAkB,EAAE,EAAc;QAC1E,IAAuB,OAAO,MAAM,KAAK,WAAW,IAAI,CAAC,MAAM,EAAE,oBAAoB,EAAE;YACrF,MAAM,EAAE,IAAI,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,MAAM,EAAE,oBAAoB,CACrD,CAAC,IAAiC;gBAChC,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,cAAc,EAAE;oBAC1B,EAAE,CAAC,UAAU,EAAE,CAAC;oBAChB,IAAI,CAAC,EAAE,GAAG,SAAS,CAAC;oBACpB,EAAE,EAAE,CAAC;iBACN;aACF,EACD,EAAE,UAAU,EAAE,CACf,CAAC,CAAC;YAEH,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;SAChB;aAAM;;;YAGL,EAAE,EAAE,CAAC;SACN;KACF;;;;;;;;;AASH,MAAM,kBAAkB,GAAG,CAAC,KAAyB;IACnD,OAAO,KAAK;UACT;YACE,WAAW,EAAE,IAAI;YACjB,CAAC,aAAa,KAAK,EAAE,GAAG,IAAI;SAC7B;UACD,IAAI,CAAC;AACT,CAAC,CAAC;;;;;","names":["isStr","inheritAttributes","getUrl","getName","h","Host"],"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-pds-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\nexport const isSvgDataUrl = (url: string) => url.startsWith('data:image/svg+xml');\nexport const isEncodedDataUrl = (url: string) => url.indexOf(';utf8,') !== -1;\n","import { isEncodedDataUrl, isSvgDataUrl, 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\nlet parser: DOMParser;\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 if (isSvgDataUrl(url) && isEncodedDataUrl(url)) {\n if (!parser) {\n parser = new DOMParser();\n }\n\n const doc = parser.parseFromString(url, 'text/html');\n const svg = doc.querySelector('svg');\n\n if (svg) {\n pdsIconContent.set(url, svg.outerHTML);\n }\n\n return Promise.resolve();\n } else {\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 }\n } else {\n pdsIconContent.set(url, '');\n return Promise.resolve();\n }\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 * This a combination of both `name` and `src`. If a `src` url is detected\n * it will set the `src` property. Otherwise it assumes it's a built-in named\n * SVG and set the `name` property.\n */\n @Prop() icon?: any;\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 /**\n *\n * Specifies the exact `src` of an SVG file to use.\n */\n @Prop() src?: string;\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 @Watch('src')\n @Watch('icon')\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, this.icon);\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"],"version":3}
1
+ {"file":"pds-icon.entry.cjs.js","mappings":";;;;;;;AAEO,MAAM,eAAe,GAAG,CAAC,UAAkB;IAChD,MAAM,GAAG,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAC1C,GAAG,CAAC,SAAS,GAAG,UAAU,CAAC;;IAG3B,KAAK,IAAI,CAAC,GAAG,GAAG,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE;QACnD,IAAI,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,WAAW,EAAE,KAAK,KAAK,EAAE;YACtD,GAAG,CAAC,WAAW,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;SACpC;KACF;;IAGD,MAAM,MAAM,GAAG,GAAG,CAAC,iBAAiB,CAAC;IACrC,IAAI,MAAM,IAAI,MAAM,CAAC,QAAQ,CAAC,WAAW,EAAE,KAAK,KAAK,EAAE;QACrD,MAAM,QAAQ,GAAG,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;QACpD,MAAM,CAAC,YAAY,CAAC,OAAO,EAAE,CAAC,QAAQ,GAAG,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;;;;QAKhE,IAAI,OAAO,CAAC,MAAqB,CAAC,EAAE;YAClC,OAAO,GAAG,CAAC,SAAS,CAAC;SACtB;KACF;IACD,OAAO,EAAE,CAAC;AACZ,CAAC,CAAC;AAEK,MAAM,OAAO,GAAG,CAAC,GAAgB;IACtC,IAAI,GAAG,CAAC,QAAQ,KAAK,CAAC,EAAE;QACtB,IAAI,GAAG,CAAC,QAAQ,CAAC,WAAW,EAAE,KAAK,QAAQ,E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AAE,oBAAoB,CACrD,CAAC,IAAiC;gBAChC,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,cAAc,EAAE;oBAC1B,EAAE,CAAC,UAAU,EAAE,CAAC;oBAChB,IAAI,CAAC,EAAE,GAAG,SAAS,CAAC;oBACpB,EAAE,EAAE,CAAC;iBACN;aACF,EACD,EAAE,UAAU,EAAE,CACf,CAAC,CAAC;YAEH,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;SAChB;aAAM;;;YAGL,EAAE,EAAE,CAAC;SACN;KACF;;;;;;;;;AASH,MAAM,kBAAkB,GAAG,CAAC,KAAyB;IACnD,OAAO,KAAK;UACT;YACE,WAAW,EAAE,IAAI;YACjB,CAAC,aAAa,KAAK,EAAE,GAAG,IAAI;SAC7B;UACD,IAAI,CAAC;AACT,CAAC,CAAC;;;;;","names":["isStr","inheritAttributes","getUrl","getName","h","Host"],"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-pds-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\nexport const isSvgDataUrl = (url: string) => url.startsWith('data:image/svg+xml');\nexport const isEncodedDataUrl = (url: string) => url.indexOf(';utf8,') !== -1;\n","import { isEncodedDataUrl, isSvgDataUrl, 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\nlet parser: DOMParser;\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 if (isSvgDataUrl(url) && isEncodedDataUrl(url)) {\n if (!parser) {\n parser = new DOMParser();\n }\n\n const doc = parser.parseFromString(url, 'text/html');\n const svg = doc.querySelector('svg');\n\n if (svg) {\n pdsIconContent.set(url, svg.outerHTML);\n }\n\n return Promise.resolve();\n } else {\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 }\n } else {\n pdsIconContent.set(url, '');\n return Promise.resolve();\n }\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 * This a combination of both `name` and `src`. If a `src` url is detected\n * it will set the `src` property. Otherwise it assumes it's a built-in named\n * SVG and set the `name` property.\n */\n @Prop() icon?: any;\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 /**\n *\n * Specifies the exact `src` of an SVG file to use.\n */\n @Prop() src?: string;\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 @Watch('src')\n @Watch('icon')\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, this.icon);\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 alt=\"\"\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"],"version":3}
@@ -71,7 +71,7 @@ export class PdsIcon {
71
71
  width: this.iconSize(),
72
72
  color: this.color,
73
73
  };
74
- return (h(Host, Object.assign({ key: '450a12ddbe225916752aeb9323ff1a11d11bc4b3', "aria-label": ariaLabel !== undefined && !this.hasAriaHidden() ? ariaLabel : null, role: "img", style: style, class: Object.assign({}, createColorClasses(this.color)) }, inheritedAttributes), Build.isBrowser && this.svgContent ? (h("div", { class: "icon-inner", innerHTML: this.svgContent })) : (h("div", { class: "icon-inner" }))));
74
+ return (h(Host, Object.assign({ key: '8b9838e26ed7c79b98edeec06b912db75c420045', "aria-label": ariaLabel !== undefined && !this.hasAriaHidden() ? ariaLabel : null, alt: "", role: "img", style: style, class: Object.assign({}, createColorClasses(this.color)) }, inheritedAttributes), Build.isBrowser && this.svgContent ? (h("div", { class: "icon-inner", innerHTML: this.svgContent })) : (h("div", { class: "icon-inner" }))));
75
75
  }
76
76
  /*****
77
77
  * Private Methods
@@ -1 +1 @@
1
- {"version":3,"file":"pds-icon.js","sourceRoot":"","sources":["../../../src/components/pds-icon/pds-icon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AACvF,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAQ7D,MAAM,OAAO,OAAO;;QAEV,wBAAmB,GAAyB,EAAE,CAAC,CAAC,yDAAyD;QA6JzG,kBAAa,GAAG,GAAG,EAAE;YAC3B,MAAM,EAAE,EAAE,EAAE,GAAG,IAAI,CAAC;YAEpB,OAAO,EAAE,CAAC,YAAY,CAAC,aAAa,CAAC,IAAI,EAAE,CAAC,YAAY,CAAC,aAAa,CAAC,KAAK,MAAM,CAAC;QACrF,CAAC,CAAA;;yBA5J4B,KAAK;;;;;oBAmCrB,SAAS;;;IAQd,QAAQ;QACd,8DAA8D;QAC9D,MAAM,KAAK,GAA2B;YACpC,KAAK,EAAE,MAAM;YACb,OAAO,EAAE,MAAM;YACf,MAAM,EAAE,MAAM;YACd,KAAK,EAAE,MAAM;SACd,CAAA;QAED,IAAI,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;YACrB,OAAO,KA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,CAAC,UAAU,EAAE,CAAC;oBAChB,IAAI,CAAC,EAAE,GAAG,SAAS,CAAC;oBACpB,EAAE,EAAE,CAAC;gBACP,CAAC;YACH,CAAC,EACD,EAAE,UAAU,EAAE,CACf,CAAC,CAAC;YAEH,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QACjB,CAAC;aAAM,CAAC;YACN,+CAA+C;YAC/C,qCAAqC;YACrC,EAAE,EAAE,CAAC;QACP,CAAC;IACH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOF;AAED,MAAM,kBAAkB,GAAG,CAAC,KAAyB,EAAE,EAAE;IACvD,OAAO,KAAK;QACX,CAAC,CAAC;YACE,WAAW,EAAE,IAAI;YACjB,CAAC,aAAa,KAAK,EAAE,CAAC,EAAE,IAAI;SAC7B;QACH,CAAC,CAAC,IAAI,CAAC;AACT,CAAC,CAAC","sourcesContent":["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 * This a combination of both `name` and `src`. If a `src` url is detected\n * it will set the `src` property. Otherwise it assumes it's a built-in named\n * SVG and set the `name` property.\n */\n @Prop() icon?: any;\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 /**\n *\n * Specifies the exact `src` of an SVG file to use.\n */\n @Prop() src?: string;\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 @Watch('src')\n @Watch('icon')\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, this.icon);\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"]}
1
+ {"version":3,"file":"pds-icon.js","sourceRoot":"","sources":["../../../src/components/pds-icon/pds-icon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AACvF,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAQ7D,MAAM,OAAO,OAAO;;QAEV,wBAAmB,GAAyB,EAAE,CAAC,CAAC,yDAAyD;QA8JzG,kBAAa,GAAG,GAAG,EAAE;YAC3B,MAAM,EAAE,EAAE,EAAE,GAAG,IAAI,CAAC;YAEpB,OAAO,EAAE,CAAC,YAAY,CAAC,aAAa,CAAC,IAAI,EAAE,CAAC,YAAY,CAAC,aAAa,CAAC,KAAK,MAAM,CAAC;QACrF,CAAC,CAAA;;yBA7J4B,KAAK;;;;;oBAmCrB,SAAS;;;IAQd,QAAQ;QACd,8DAA8D;QAC9D,MAAM,KAAK,GAA2B;YACpC,KAAK,EAAE,MAAM;YACb,OAAO,EAAE,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C,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,oBAAoB,CACrD,CAAC,IAAiC,EAAE,EAAE;gBACpC,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,cAAc,EAAE,CAAC;oBAC3B,EAAE,CAAC,UAAU,EAAE,CAAC;oBAChB,IAAI,CAAC,EAAE,GAAG,SAAS,CAAC;oBACpB,EAAE,EAAE,CAAC;gBACP,CAAC;YACH,CAAC,EACD,EAAE,UAAU,EAAE,CACf,CAAC,CAAC;YAEH,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QACjB,CAAC;aAAM,CAAC;YACN,+CAA+C;YAC/C,qCAAqC;YACrC,EAAE,EAAE,CAAC;QACP,CAAC;IACH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOF;AAED,MAAM,kBAAkB,GAAG,CAAC,KAAyB,EAAE,EAAE;IACvD,OAAO,KAAK;QACX,CAAC,CAAC;YACE,WAAW,EAAE,IAAI;YACjB,CAAC,aAAa,KAAK,EAAE,CAAC,EAAE,IAAI;SAC7B;QACH,CAAC,CAAC,IAAI,CAAC;AACT,CAAC,CAAC","sourcesContent":["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 * This a combination of both `name` and `src`. If a `src` url is detected\n * it will set the `src` property. Otherwise it assumes it's a built-in named\n * SVG and set the `name` property.\n */\n @Prop() icon?: any;\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 /**\n *\n * Specifies the exact `src` of an SVG file to use.\n */\n @Prop() src?: string;\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 @Watch('src')\n @Watch('icon')\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, this.icon);\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 alt=\"\"\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"]}
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" class="pdsicon"><g clip-path="url(#a)"><path fill-rule="evenodd" d="M8.667 0v2.667H7.333V0zM4.7 3.757 2.815 1.872l-.943.943L3.757 4.7zM2.667 7.333H0v1.334h2.667zM12.243 4.7l1.885-1.885-.943-.943L11.3 3.757zm1.09 2.633H16v1.334h-2.667zM8 3.333A4.666 4.666 0 0 0 3.333 8 4.66 4.66 0 0 0 6 12.212v3.121h4v-3.12A4.66 4.66 0 0 0 12.667 8 4.666 4.666 0 0 0 8 3.333M4.667 8a3.333 3.333 0 1 1 6.666 0 3.33 3.33 0 0 1-2.222 3.139l-.444.157V14H7.333v-2.704l-.444-.157A3.33 3.33 0 0 1 4.667 8"/></g><defs><clipPath id="a"><path d="M0 0h16v16H0z"/></clipPath></defs></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" class="pdsicon"><path fill-rule="evenodd" d="M8.667 2.013A9 9 0 0 0 8.007 2h-2.14c-.571 0-.96 0-1.26.025-.292.024-.441.067-.546.12-.25.128-.455.332-.582.583-.053.104-.097.254-.12.546-.025.3-.026.688-.026 1.26v6.933c0 .57 0 .959.025 1.259.024.292.068.442.12.546.128.25.332.455.583.583.105.053.254.096.546.12.3.024.689.025 1.26.025h4.266c.571 0 .96 0 1.26-.025.292-.024.441-.067.546-.12.25-.128.454-.332.582-.583.053-.104.097-.254.12-.546.025-.3.026-.688.026-1.26V6.66c0-.352-.002-.535-.014-.659H10.38c-.168 0-.332 0-.471-.011a1.4 1.4 0 0 1-.513-.134 1.33 1.33 0 0 1-.583-.583 1.4 1.4 0 0 1-.134-.513c-.011-.139-.011-.303-.011-.471zM9.594.9A2.7 2.7 0 0 0 9.127.74C8.82.666 8.5.666 8.076.667H5.839c-.537 0-.98 0-1.34.03-.375.03-.72.095-1.043.26-.502.256-.91.664-1.165 1.166-.165.323-.23.668-.262 1.042C2 3.526 2 3.97 2 4.505v6.99c0 .536 0 .979.03 1.34.03.374.096.719.26 1.042.256.502.664.91 1.166 1.166.324.165.668.23 1.043.26.36.03.803.03 1.34.03h4.322c.537 0 .98 0 1.34-.03.375-.03.72-.096 1.043-.26.502-.256.91-.664 1.165-1.166.165-.323.23-.668.261-1.042.03-.361.03-.804.03-1.34V6.59c0-.423 0-.743-.074-1.052a2.7 2.7 0 0 0-.319-.77c-.166-.271-.392-.497-.691-.796l-.049-.048-2.125-2.126-.048-.048c-.3-.3-.525-.526-.796-.691a3 3 0 0 0-.304-.161M10 2.943v1.324c0 .197 0 .306.007.383v.009h.01c.077.007.185.008.383.008h1.324z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" class="pdsicon"><g clip-path="url(#a)"><path fill-rule="evenodd" d="M12.67 0h-12v4a2.66 2.66 0 0 0 2.66 2.67h.07a4.58 4.58 0 0 0 3.93 3.93V12h-.66a3.35 3.35 0 0 0-3.34 3.33V16h9.34v-.67A3.35 3.35 0 0 0 9.33 12h-.66v-1.4a4.58 4.58 0 0 0 3.93-3.93h.07A2.66 2.66 0 0 0 15.33 4V0zM2.39 4.94A1.33 1.33 0 0 1 2 4V1.33h1.33v4c-.353 0-.69-.14-.94-.39M14 4a1.33 1.33 0 0 1-1.33 1.33v-4H14z"/></g><defs><clipPath id="a"><path d="M0 0h16v16H0z"/></clipPath></defs></svg>
@@ -2,7 +2,7 @@ import { newE2EPage } from "@stencil/core/testing";
2
2
  describe('pds-icon', () => {
3
3
  it('renders', async () => {
4
4
  const page = await newE2EPage();
5
- await page.setContent('<pds-icon role="img" style="height: 16px; width: 16px;"></pds-icon>');
5
+ await page.setContent('<pds-icon alt="" role="img" style="height: 16px; width: 16px;"></pds-icon>');
6
6
  const element = await page.find('pds-icon');
7
7
  expect(element).toHaveClass('hydrated');
8
8
  });
@@ -1 +1 @@
1
- {"version":3,"file":"pds-icon.e2e.js","sourceRoot":"","sources":["../../../../src/components/pds-icon/test/pds-icon.e2e.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,QAAQ,CAAC,UAAU,EAAE,GAAG,EAAE;IACxB,EAAE,CAAC,SAAS,EAAE,KAAK,IAAI,EAAE;QACvB,MAAM,IAAI,GAAG,MAAM,UAAU,EAAE,CAAC;QAEhC,MAAM,IAAI,CAAC,UAAU,CAAC,qEAAqE,CAAC,CAAC;QAC7F,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAC5C,MAAM,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;IAC1C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { newE2EPage } from '@stencil/core/testing';\n\ndescribe('pds-icon', () => {\n it('renders', async () => {\n const page = await newE2EPage();\n\n await page.setContent('<pds-icon role=\"img\" style=\"height: 16px; width: 16px;\"></pds-icon>');\n const element = await page.find('pds-icon');\n expect(element).toHaveClass('hydrated');\n });\n});\n"]}
1
+ {"version":3,"file":"pds-icon.e2e.js","sourceRoot":"","sources":["../../../../src/components/pds-icon/test/pds-icon.e2e.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,QAAQ,CAAC,UAAU,EAAE,GAAG,EAAE;IACxB,EAAE,CAAC,SAAS,EAAE,KAAK,IAAI,EAAE;QACvB,MAAM,IAAI,GAAG,MAAM,UAAU,EAAE,CAAC;QAEhC,MAAM,IAAI,CAAC,UAAU,CAAC,4EAA4E,CAAC,CAAC;QACpG,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAC5C,MAAM,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;IAC1C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { newE2EPage } from '@stencil/core/testing';\n\ndescribe('pds-icon', () => {\n it('renders', async () => {\n const page = await newE2EPage();\n\n await page.setContent('<pds-icon alt=\"\" role=\"img\" style=\"height: 16px; width: 16px;\"></pds-icon>');\n const element = await page.find('pds-icon');\n expect(element).toHaveClass('hydrated');\n });\n});\n"]}
@@ -7,7 +7,7 @@ describe('pds-icon', () => {
7
7
  html: '<pds-icon></pds-icon>',
8
8
  });
9
9
  expect(root).toEqualHtml(`
10
- <pds-icon role="img" size="regular" style="height: 16px; width: 16px;">
10
+ <pds-icon alt="" role="img" size="regular" style="height: 16px; width: 16px;">
11
11
  <mock:shadow-root>
12
12
  <div class="icon-inner"></div>
13
13
  </mock:shadow-root>
@@ -20,7 +20,7 @@ describe('pds-icon', () => {
20
20
  html: '<pds-icon size="small"></pds-icon>',
21
21
  });
22
22
  expect(root).toEqualHtml(`
23
- <pds-icon role="img" size="small" style="height: 12px; width: 12px;">
23
+ <pds-icon alt="" role="img" size="small" style="height: 12px; width: 12px;">
24
24
  <mock:shadow-root>
25
25
  <div class="icon-inner"></div>
26
26
  </mock:shadow-root>
@@ -33,7 +33,7 @@ describe('pds-icon', () => {
33
33
  html: '<pds-icon size="32px"></pds-icon>',
34
34
  });
35
35
  expect(root).toEqualHtml(`
36
- <pds-icon role="img" size="32px" style="height: 32px; width: 32px;">
36
+ <pds-icon alt="" role="img" size="32px" style="height: 32px; width: 32px;">
37
37
  <mock:shadow-root>
38
38
  <div class="icon-inner"></div>
39
39
  </mock:shadow-root>
@@ -46,7 +46,7 @@ describe('pds-icon', () => {
46
46
  html: '<pds-icon name="archive"></pds-icon>',
47
47
  });
48
48
  expect(root).toEqualHtml(`
49
- <pds-icon aria-label="archive" name="archive" role="img" size="regular" style="height: 16px; width: 16px;">
49
+ <pds-icon alt="" aria-label="archive" name="archive" role="img" size="regular" style="height: 16px; width: 16px;">
50
50
  <mock:shadow-root>
51
51
  <div class="icon-inner"></div>
52
52
  </mock:shadow-root>
@@ -59,7 +59,7 @@ describe('pds-icon', () => {
59
59
  html: '<pds-icon name="archive" color="red"></pds-icon>',
60
60
  });
61
61
  expect(root).toEqualHtml(`
62
- <pds-icon aria-label="archive" class="pds-color pds-color-red" color="red" name="archive" role="img" size="regular" style="height: 16px; width: 16px; color: red">
62
+ <pds-icon alt="" aria-label="archive" class="pds-color pds-color-red" color="red" name="archive" role="img" size="regular" style="height: 16px; width: 16px; color: red">
63
63
  <mock:shadow-root>
64
64
  <div class="icon-inner"></div>
65
65
  </mock:shadow-root>
@@ -72,7 +72,7 @@ describe('pds-icon', () => {
72
72
  html: `<pds-icon name="star" aria-label="custom label"></pds-icon>`,
73
73
  });
74
74
  expect(root).toEqualHtml(`
75
- <pds-icon name="star" role="img" aria-label="custom label" size="regular" style="height: 16px; width: 16px;">
75
+ <pds-icon alt="" name="star" role="img" aria-label="custom label" size="regular" style="height: 16px; width: 16px;">
76
76
  <mock:shadow-root>
77
77
  <div class="icon-inner"></div>
78
78
  </mock:shadow-root>
@@ -86,7 +86,7 @@ describe('pds-icon', () => {
86
86
  });
87
87
  const icon = page.root;
88
88
  expect(icon).toEqualHtml(`
89
- <pds-icon name="youtube" role="img" aria-label="custom label" size="regular" style="height: 16px; width: 16px;">
89
+ <pds-icon alt="" name="youtube" role="img" aria-label="custom label" size="regular" style="height: 16px; width: 16px;">
90
90
  <mock:shadow-root>
91
91
  <div class="icon-inner"></div>
92
92
  </mock:shadow-root>
@@ -97,7 +97,7 @@ describe('pds-icon', () => {
97
97
  }
98
98
  await page.waitForChanges();
99
99
  expect(icon).toEqualHtml(`
100
- <pds-icon name="trash" role="img" aria-label="custom label" size="regular" style="height: 16px; width: 16px;">
100
+ <pds-icon alt="" name="trash" role="img" aria-label="custom label" size="regular" style="height: 16px; width: 16px;">
101
101
  <mock:shadow-root>
102
102
  <div class="icon-inner"></div>
103
103
  </mock:shadow-root>
@@ -1 +1 @@
1
- {"version":3,"file":"pds-icon.spec.js","sourceRoot":"","sources":["../../../../src/components/pds-icon/test/pds-icon.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,QAAQ,CAAC,UAAU,EAAE,GAAG,EAAE;IACxB,EAAE,CAAC,SAAS,EAAE,KAAK,IAAI,EAAE;QACvB,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,WAAW,CAAC;YACjC,UAAU,EAAE,CAAC,OAAO,CAAC;YACrB,IAAI,EAAE,uBAAuB;SAC9B,CAAC,CAAC;QACH,MAAM,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC;;;;;;KAMxB,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,sCAAsC,EAAE,KAAK,IAAI,EAAE;QACpD,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,WAAW,CAAC;YACjC,UAAU,EAAE,CAAC,OAAO,CAAC;YACr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,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,4CAA4C,EAAE,KAAK,IAAI,EAAE;QAC1D,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;YAC7B,UAAU,EAAE,CAAC,OAAO,CAAC;YACrB,IAAI,EAAE,gEAAgE;SACvE,CAAC,CAAC;QAEH,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QAEvB,MAAM,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC;;;;;;KAMxB,CAAC,CAAC;QAEH,IAAI,IAAI,EAAE,CAAC;YACT,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC;QACtB,CAAC;QACD,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;QAE5B,MAAM,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC;;;;;;KAMxB,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AAGL,CAAC,CAAC,CAAC","sourcesContent":["import { newSpecPage } from '@stencil/core/testing';\nimport { PdsIcon } from '../pds-icon';\n\ndescribe('pds-icon', () => {\n it('renders', async () => {\n const { root } = await newSpecPage({\n components: [PdsIcon],\n html: '<pds-icon></pds-icon>',\n });\n expect(root).toEqualHtml(`\n <pds-icon role=\"img\" size=\"regular\" style=\"height: 16px; width: 16px;\">\n <mock:shadow-root>\n <div class=\"icon-inner\"></div>\n </mock:shadow-root>\n </pds-icon>\n `);\n });\n\n it('renders the correct size when passed', async () => {\n const { root } = await newSpecPage({\n components: [PdsIcon],\n html: '<pds-icon size=\"small\"></pds-icon>',\n });\n expect(root).toEqualHtml(`\n <pds-icon role=\"img\" size=\"small\" style=\"height: 12px; width: 12px;\">\n <mock:shadow-root>\n <div class=\"icon-inner\"></div>\n </mock:shadow-root>\n </pds-icon>\n `);\n });\n\n it('allows custom size', async () => {\n const { root } = await newSpecPage({\n components: [PdsIcon],\n html: '<pds-icon size=\"32px\"></pds-icon>',\n });\n expect(root).toEqualHtml(`\n <pds-icon role=\"img\" size=\"32px\" style=\"height: 32px; width: 32px;\">\n <mock:shadow-root>\n <div class=\"icon-inner\"></div>\n </mock:shadow-root>\n </pds-icon>\n `);\n });\n\n it('renders icon when found', async () => {\n const { root } = await newSpecPage({\n components: [PdsIcon],\n html: '<pds-icon name=\"archive\"></pds-icon>',\n });\n expect(root).toEqualHtml(`\n <pds-icon aria-label=\"archive\" name=\"archive\" role=\"img\" size=\"regular\" style=\"height: 16px; width: 16px;\">\n <mock:shadow-root>\n <div class=\"icon-inner\"></div>\n </mock:shadow-root>\n </pds-icon>\n `);\n });\n\n it('add correct styles when color specified', async () => {\n const { root } = await newSpecPage({\n components: [PdsIcon],\n html: '<pds-icon name=\"archive\" color=\"red\"></pds-icon>',\n });\n expect(root).toEqualHtml(`\n <pds-icon aria-label=\"archive\" class=\"pds-color pds-color-red\" color=\"red\" name=\"archive\" role=\"img\" size=\"regular\" style=\"height: 16px; width: 16px; color: red\">\n <mock:shadow-root>\n <div class=\"icon-inner\"></div>\n </mock:shadow-root>\n </pds-icon>\n `);\n });\n\n it('renders custom aria-label', async () => {\n const { root } = await newSpecPage({\n components: [PdsIcon],\n html: `<pds-icon name=\"star\" aria-label=\"custom label\"></pds-icon>`,\n });\n\n expect(root).toEqualHtml(`\n <pds-icon name=\"star\" role=\"img\" aria-label=\"custom label\" size=\"regular\" style=\"height: 16px; width: 16px;\">\n <mock:shadow-root>\n <div class=\"icon-inner\"></div>\n </mock:shadow-root>\n </pds-icon>\n `);\n });\n\n it('renders custom label after changing source', async () => {\n const page = await newSpecPage({\n components: [PdsIcon],\n html: `<pds-icon name=\"youtube\" aria-label=\"custom label\"></pds-icon>`,\n });\n\n const icon = page.root;\n\n expect(icon).toEqualHtml(`\n <pds-icon name=\"youtube\" role=\"img\" aria-label=\"custom label\" size=\"regular\" style=\"height: 16px; width: 16px;\">\n <mock:shadow-root>\n <div class=\"icon-inner\"></div>\n </mock:shadow-root>\n </pds-icon>\n `);\n\n if (icon) {\n icon.name = 'trash';\n }\n await page.waitForChanges();\n\n expect(icon).toEqualHtml(`\n <pds-icon name=\"trash\" role=\"img\" aria-label=\"custom label\" size=\"regular\" style=\"height: 16px; width: 16px;\">\n <mock:shadow-root>\n <div class=\"icon-inner\"></div>\n </mock:shadow-root>\n </pds-icon>\n `);\n });\n\n\n});\n"]}
1
+ {"version":3,"file":"pds-icon.spec.js","sourceRoot":"","sources":["../../../../src/components/pds-icon/test/pds-icon.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,QAAQ,CAAC,UAAU,EAAE,GAAG,EAAE;IACxB,EAAE,CAAC,SAAS,EAAE,KAAK,IAAI,EAAE;QACvB,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,WAAW,CAAC;YACjC,UAAU,EAAE,CAAC,OAAO,CAAC;YACrB,IAAI,EAAE,uBAAuB;SAC9B,CAAC,CAAC;QACH,MAAM,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC;;;;;;KAMxB,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,sCAAsC,EAAE,KAAK,IAAI,EAAE;QACpD,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,WAAW,CAAC;YACjC,UAAU,EAAE,CAAC,OAAO,CAAC;YACrB,IAAI,EAAE,oCAAoC;SAC3C,CAAC,CAAC;QACH,MAAM,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC;;;;;;KAMxB,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,oBAAoB,EAAE,KAAK,IAAI,EAAE;QAClC,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,WAAW,CAAC;YACjC,UAAU,EAAE,CAAC,OAAO,CAAC;YACrB,IAAI,EAAE,mCAAmC;SAC1C,CAAC,CAAC;QACH,MAAM,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC;;;;;;KAMxB,CAAC,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AO,CAAC;QACtB,CAAC;QACD,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;QAE5B,MAAM,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC;;;;;;KAMxB,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AAGL,CAAC,CAAC,CAAC","sourcesContent":["import { newSpecPage } from '@stencil/core/testing';\nimport { PdsIcon } from '../pds-icon';\n\ndescribe('pds-icon', () => {\n it('renders', async () => {\n const { root } = await newSpecPage({\n components: [PdsIcon],\n html: '<pds-icon></pds-icon>',\n });\n expect(root).toEqualHtml(`\n <pds-icon alt=\"\" role=\"img\" size=\"regular\" style=\"height: 16px; width: 16px;\">\n <mock:shadow-root>\n <div class=\"icon-inner\"></div>\n </mock:shadow-root>\n </pds-icon>\n `);\n });\n\n it('renders the correct size when passed', async () => {\n const { root } = await newSpecPage({\n components: [PdsIcon],\n html: '<pds-icon size=\"small\"></pds-icon>',\n });\n expect(root).toEqualHtml(`\n <pds-icon alt=\"\" role=\"img\" size=\"small\" style=\"height: 12px; width: 12px;\">\n <mock:shadow-root>\n <div class=\"icon-inner\"></div>\n </mock:shadow-root>\n </pds-icon>\n `);\n });\n\n it('allows custom size', async () => {\n const { root } = await newSpecPage({\n components: [PdsIcon],\n html: '<pds-icon size=\"32px\"></pds-icon>',\n });\n expect(root).toEqualHtml(`\n <pds-icon alt=\"\" role=\"img\" size=\"32px\" style=\"height: 32px; width: 32px;\">\n <mock:shadow-root>\n <div class=\"icon-inner\"></div>\n </mock:shadow-root>\n </pds-icon>\n `);\n });\n\n it('renders icon when found', async () => {\n const { root } = await newSpecPage({\n components: [PdsIcon],\n html: '<pds-icon name=\"archive\"></pds-icon>',\n });\n expect(root).toEqualHtml(`\n <pds-icon alt=\"\" aria-label=\"archive\" name=\"archive\" role=\"img\" size=\"regular\" style=\"height: 16px; width: 16px;\">\n <mock:shadow-root>\n <div class=\"icon-inner\"></div>\n </mock:shadow-root>\n </pds-icon>\n `);\n });\n\n it('add correct styles when color specified', async () => {\n const { root } = await newSpecPage({\n components: [PdsIcon],\n html: '<pds-icon name=\"archive\" color=\"red\"></pds-icon>',\n });\n expect(root).toEqualHtml(`\n <pds-icon alt=\"\" aria-label=\"archive\" class=\"pds-color pds-color-red\" color=\"red\" name=\"archive\" role=\"img\" size=\"regular\" style=\"height: 16px; width: 16px; color: red\">\n <mock:shadow-root>\n <div class=\"icon-inner\"></div>\n </mock:shadow-root>\n </pds-icon>\n `);\n });\n\n it('renders custom aria-label', async () => {\n const { root } = await newSpecPage({\n components: [PdsIcon],\n html: `<pds-icon name=\"star\" aria-label=\"custom label\"></pds-icon>`,\n });\n\n expect(root).toEqualHtml(`\n <pds-icon alt=\"\" name=\"star\" role=\"img\" aria-label=\"custom label\" size=\"regular\" style=\"height: 16px; width: 16px;\">\n <mock:shadow-root>\n <div class=\"icon-inner\"></div>\n </mock:shadow-root>\n </pds-icon>\n `);\n });\n\n it('renders custom label after changing source', async () => {\n const page = await newSpecPage({\n components: [PdsIcon],\n html: `<pds-icon name=\"youtube\" aria-label=\"custom label\"></pds-icon>`,\n });\n\n const icon = page.root;\n\n expect(icon).toEqualHtml(`\n <pds-icon alt=\"\" name=\"youtube\" role=\"img\" aria-label=\"custom label\" size=\"regular\" style=\"height: 16px; width: 16px;\">\n <mock:shadow-root>\n <div class=\"icon-inner\"></div>\n </mock:shadow-root>\n </pds-icon>\n `);\n\n if (icon) {\n icon.name = 'trash';\n }\n await page.waitForChanges();\n\n expect(icon).toEqualHtml(`\n <pds-icon alt=\"\" name=\"trash\" role=\"img\" aria-label=\"custom label\" size=\"regular\" style=\"height: 16px; width: 16px;\">\n <mock:shadow-root>\n <div class=\"icon-inner\"></div>\n </mock:shadow-root>\n </pds-icon>\n `);\n });\n\n\n});\n"]}
package/dist/docs.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2024-06-27T11:04:33",
2
+ "timestamp": "2024-07-30T11:09:19",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
5
  "version": "4.18.3",
@@ -162,7 +162,7 @@ const PdsIcon = class {
162
162
  width: this.iconSize(),
163
163
  color: this.color,
164
164
  };
165
- return (h(Host, Object.assign({ key: '450a12ddbe225916752aeb9323ff1a11d11bc4b3', "aria-label": ariaLabel !== undefined && !this.hasAriaHidden() ? ariaLabel : null, role: "img", style: style, class: Object.assign({}, createColorClasses(this.color)) }, inheritedAttributes), this.svgContent ? (h("div", { class: "icon-inner", innerHTML: this.svgContent })) : (h("div", { class: "icon-inner" }))));
165
+ return (h(Host, Object.assign({ key: '8b9838e26ed7c79b98edeec06b912db75c420045', "aria-label": ariaLabel !== undefined && !this.hasAriaHidden() ? ariaLabel : null, alt: "", role: "img", style: style, class: Object.assign({}, createColorClasses(this.color)) }, inheritedAttributes), this.svgContent ? (h("div", { class: "icon-inner", innerHTML: this.svgContent })) : (h("div", { class: "icon-inner" }))));
166
166
  }
167
167
  /*****
168
168
  * Private Methods
@@ -1 +1 @@
1
- {"file":"pds-icon.entry.js","mappings":";;;AAEO,MAAM,eAAe,GAAG,CAAC,UAAkB;IAChD,MAAM,GAAG,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAC1C,GAAG,CAAC,SAAS,GAAG,UAAU,CAAC;;IAG3B,KAAK,IAAI,CAAC,GAAG,GAAG,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE;QACnD,IAAI,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,WAAW,EAAE,KAAK,KAAK,EAAE;YACtD,GAAG,CAAC,WAAW,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;SACpC;KACF;;IAGD,MAAM,MAAM,GAAG,GAAG,CAAC,iBAAiB,CAAC;IACrC,IAAI,MAAM,IAAI,MAAM,CAAC,QAAQ,CAAC,WAAW,EAAE,KAAK,KAAK,EAAE;QACrD,MAAM,QAA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ACA,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,KAE/B,mBAAmB,GAEH,IAAI,CAAC,UAAU,IACjC,WAAK,KAAK,EAAC,YAAY,EAAC,SAAS,EAAE,IAAI,CAAC,UAAU,GAAQ,KAE1D,WAAK,KAAK,EAAC,YAAY,GAAO,CAC/B,CACI,EACR;KACF;;;;IAMO,gBAAgB,CAAC,EAAe,EAAE,UAAkB,EAAE,EAAc;QAC1E,IAAuB,OAAO,MAAM,KAAK,WAAW,IAAI,CAAC,MAAM,EAAE,oBAAoB,EAAE;YACrF,MAAM,EAAE,IAAI,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,MAAM,EAAE,oBAAoB,CACrD,CAAC,IAAiC;gBAChC,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,cAAc,EAAE;oBAC1B,EAAE,CAAC,UAAU,EAAE,CAAC;oBAChB,IAAI,CAAC,EAAE,GAAG,SAAS,CAAC;oBACpB,EAAE,EAAE,CAAC;iBACN;aACF,EACD,EAAE,UAAU,EAAE,CACf,CAAC,CAAC;YAEH,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;SAChB;aAAM;;;YAGL,EAAE,EAAE,CAAC;SACN;KACF;;;;;;;;;AASH,MAAM,kBAAkB,GAAG,CAAC,KAAyB;IACnD,OAAO,KAAK;UACT;YACE,WAAW,EAAE,IAAI;YACjB,CAAC,aAAa,KAAK,EAAE,GAAG,IAAI;SAC7B;UACD,IAAI,CAAC;AACT,CAAC,CAAC;;;;;","names":[],"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-pds-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\nexport const isSvgDataUrl = (url: string) => url.startsWith('data:image/svg+xml');\nexport const isEncodedDataUrl = (url: string) => url.indexOf(';utf8,') !== -1;\n","import { isEncodedDataUrl, isSvgDataUrl, 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\nlet parser: DOMParser;\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 if (isSvgDataUrl(url) && isEncodedDataUrl(url)) {\n if (!parser) {\n parser = new DOMParser();\n }\n\n const doc = parser.parseFromString(url, 'text/html');\n const svg = doc.querySelector('svg');\n\n if (svg) {\n pdsIconContent.set(url, svg.outerHTML);\n }\n\n return Promise.resolve();\n } else {\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 }\n } else {\n pdsIconContent.set(url, '');\n return Promise.resolve();\n }\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 * This a combination of both `name` and `src`. If a `src` url is detected\n * it will set the `src` property. Otherwise it assumes it's a built-in named\n * SVG and set the `name` property.\n */\n @Prop() icon?: any;\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 /**\n *\n * Specifies the exact `src` of an SVG file to use.\n */\n @Prop() src?: string;\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 @Watch('src')\n @Watch('icon')\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, this.icon);\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"],"version":3}
1
+ {"file":"pds-icon.entry.js","mappings":";;;AAEO,MAAM,eAAe,GAAG,CAAC,UAAkB;IAChD,MAAM,GAAG,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAC1C,GAAG,CAAC,SAAS,GAAG,UAAU,CAAC;;IAG3B,KAAK,IAAI,CAAC,GAAG,GAAG,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE;QACnD,IAAI,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,WAAW,EAAE,KAAK,KAAK,EAAE;YACtD,GAAG,CAAC,WAAW,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;SACpC;KACF;;IAGD,MAAM,MAAM,GAAG,GAAG,CAAC,iBAAiB,CAAC;IACrC,IAAI,MAAM,IAAI,MAAM,CAAC,QAAQ,CAAC,WAAW,EAAE,KAAK,KAAK,EAAE;QACrD,MAAM,QAAQ,GAAG,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;QACpD,MAAM,CAAC,YAAY,CAAC,OAAO,EAAE,CAAC,QAAQ,GAAG,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;;;;QAKhE,IAAI,OAAO,CAAC,MAAqB,CAAC,EAAE;YAClC,OAAO,GAAG,CAAC,SAAS,CAAC;SACtB;KACF;IACD,OAAO,EAAE,CAAC;AACZ,CAAC,CAAC;AAEK,MAAM,OAAO,GAAG,CAAC,GAAgB;IACtC,IAAI,GAAG,CAAC,QAAQ,KAAK,CAAC,EAAE;QACtB,IAAI,GAAG,CAAC,QAAQ,CAAC,WAAW,EAAE,KAAK,QAAQ,EAAE;YAC3C,OAAO,KAAK,CAAC;SACd;QAED,KAAK,IAA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AC,CAAC,CAAC,cAAc,EAAE;oBAC1B,EAAE,CAAC,UAAU,EAAE,CAAC;oBAChB,IAAI,CAAC,EAAE,GAAG,SAAS,CAAC;oBACpB,EAAE,EAAE,CAAC;iBACN;aACF,EACD,EAAE,UAAU,EAAE,CACf,CAAC,CAAC;YAEH,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;SAChB;aAAM;;;YAGL,EAAE,EAAE,CAAC;SACN;KACF;;;;;;;;;AASH,MAAM,kBAAkB,GAAG,CAAC,KAAyB;IACnD,OAAO,KAAK;UACT;YACE,WAAW,EAAE,IAAI;YACjB,CAAC,aAAa,KAAK,EAAE,GAAG,IAAI;SAC7B;UACD,IAAI,CAAC;AACT,CAAC,CAAC;;;;;","names":[],"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-pds-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\nexport const isSvgDataUrl = (url: string) => url.startsWith('data:image/svg+xml');\nexport const isEncodedDataUrl = (url: string) => url.indexOf(';utf8,') !== -1;\n","import { isEncodedDataUrl, isSvgDataUrl, 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\nlet parser: DOMParser;\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 if (isSvgDataUrl(url) && isEncodedDataUrl(url)) {\n if (!parser) {\n parser = new DOMParser();\n }\n\n const doc = parser.parseFromString(url, 'text/html');\n const svg = doc.querySelector('svg');\n\n if (svg) {\n pdsIconContent.set(url, svg.outerHTML);\n }\n\n return Promise.resolve();\n } else {\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 }\n } else {\n pdsIconContent.set(url, '');\n return Promise.resolve();\n }\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 * This a combination of both `name` and `src`. If a `src` url is detected\n * it will set the `src` property. Otherwise it assumes it's a built-in named\n * SVG and set the `name` property.\n */\n @Prop() icon?: any;\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 /**\n *\n * Specifies the exact `src` of an SVG file to use.\n */\n @Prop() src?: string;\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 @Watch('src')\n @Watch('icon')\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, this.icon);\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 alt=\"\"\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"],"version":3}
@@ -0,0 +1,2 @@
1
+ import{r as t,h as i,H as e,g as s}from"./p-152ef3bc.js";import{i as n,b as r,g as o,c}from"./p-fb6974fd.js";const l=t=>{const i=document.createElement("div");i.innerHTML=t;for(let t=i.childNodes.length-1;t>=0;t--){if(i.childNodes[t].nodeName.toLowerCase()!=="svg"){i.removeChild(i.childNodes[t])}}const e=i.firstElementChild;if(e&&e.nodeName.toLowerCase()==="svg"){const t=e.getAttribute("class")||"";e.setAttribute("class",(t+" s-pds-icon").trim());if(d(e)){return i.innerHTML}}return""};const d=t=>{if(t.nodeType===1){if(t.nodeName.toLowerCase()==="script"){return false}for(let i=0;i<t.attributes.length;i++){const e=t.attributes[i].name;if(n(e)&&e.toLowerCase().indexOf("on")===0){return false}}for(let i=0;i<t.childNodes.length;i++){if(!d(t.childNodes[i])){return false}}}return true};const a=t=>t.startsWith("data:image/svg+xml");const h=t=>t.indexOf(";utf8,")!==-1;const f=new Map;const u=new Map;let p;const g=(t,i=false)=>{let e=u.get(t);if(!e){if(typeof fetch!="undefined"&&typeof document!=="undefined"){if(a(t)&&h(t)){if(!p){p=new DOMParser}const i=p.parseFromString(t,"text/html");const e=i.querySelector("svg");if(e){f.set(t,e.outerHTML)}return Promise.resolve()}else{e=fetch(t).then((e=>{if(e.ok){return e.text().then((e=>{if(e&&i!==false){e=l(e)}f.set(t,e||"")}))}f.set(t,"")}));u.set(t,e)}}else{f.set(t,"");return Promise.resolve()}}return e};const m=":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 b=m;const w=class{constructor(i){t(this,i);this.inheritedAttributes={};this.hasAriaHidden=()=>{const{el:t}=this;return t.hasAttribute("aria-hidden")&&t.getAttribute("aria-hidden")==="true"};this.ariaLabel=undefined;this.isVisible=false;this.svgContent=undefined;this.color=undefined;this.icon=undefined;this.name=undefined;this.size="regular";this.src=undefined}iconSize(){const t={small:"12px",regular:"16px",medium:"20px",large:"24px"};if(t[this.size]){return t[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 t=o(this);if(t){if(f.has(t)){this.svgContent=f.get(t)}else{g(t).then((()=>this.svgContent=f.get(t)))}}}const t=c(this.name,this.icon);if(t){this.ariaLabel=t.replace(/\-/g," ")}}render(){const{ariaLabel:t,inheritedAttributes:s}=this;const n={height:this.iconSize(),width:this.iconSize(),color:this.color};return i(e,Object.assign({key:"8b9838e26ed7c79b98edeec06b912db75c420045","aria-label":t!==undefined&&!this.hasAriaHidden()?t:null,alt:"",role:"img",style:n,class:Object.assign({},v(this.color))},s),this.svgContent?i("div",{class:"icon-inner",innerHTML:this.svgContent}):i("div",{class:"icon-inner"}))}waitUntilVisible(t,i,e){if(typeof window!=="undefined"&&window.IntersectionObserver){const s=this.io=new window.IntersectionObserver((t=>{if(t[0].isIntersecting){s.disconnect();this.io=undefined;e()}}),{rootMargin:i});s.observe(t)}else{e()}}static get assetsDirs(){return["svg"]}get el(){return s(this)}static get watchers(){return{name:["loadIcon"],src:["loadIcon"],icon:["loadIcon"]}}};const v=t=>t?{"pds-color":true,[`pds-color-${t}`]:true}:null;w.style=b;export{w as pds_icon};
2
+ //# sourceMappingURL=p-20b3c799.entry.js.map
@@ -0,0 +1 @@
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","isSvgDataUrl","url","startsWith","isEncodedDataUrl","pdsIconContent","Map","requests","parser","getSvgContent","sanitize","req","get","fetch","DOMParser","doc","parseFromString","svg","querySelector","set","outerHTML","Promise","resolve","then","rsp","ok","text","pdsIconCss","PdsIconStyle0","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","icon","ariaLabel","replace","render","style","height","width","color","h","Host","Object","assign","key","alt","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-pds-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\nexport const isSvgDataUrl = (url: string) => url.startsWith('data:image/svg+xml');\nexport const isEncodedDataUrl = (url: string) => url.indexOf(';utf8,') !== -1;\n","import { isEncodedDataUrl, isSvgDataUrl, 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\nlet parser: DOMParser;\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 if (isSvgDataUrl(url) && isEncodedDataUrl(url)) {\n if (!parser) {\n parser = new DOMParser();\n }\n\n const doc = parser.parseFromString(url, 'text/html');\n const svg = doc.querySelector('svg');\n\n if (svg) {\n pdsIconContent.set(url, svg.outerHTML);\n }\n\n return Promise.resolve();\n } else {\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 }\n } else {\n pdsIconContent.set(url, '');\n return Promise.resolve();\n }\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 * This a combination of both `name` and `src`. If a `src` url is detected\n * it will set the `src` property. Otherwise it assumes it's a built-in named\n * SVG and set the `name` property.\n */\n @Prop() icon?: any;\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 /**\n *\n * Specifies the exact `src` of an SVG file to use.\n */\n @Prop() src?: string;\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 @Watch('src')\n @Watch('icon')\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, this.icon);\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 alt=\"\"\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,EAAI,EAAGA,EAAIa,EAAIE,WAAWb,OAAQF,IAAK,CAC9C,MAAMgB,EAAOH,EAAIE,WAAWf,GAAGgB,KAC/B,GAAIC,EAAMD,IAASA,EAAKZ,cAAcc,QAAQ,QAAU,EAAG,CACzD,OAAO,K,EAIX,IAAK,IAAIlB,EAAI,EAAGA,EAAIa,EAAIZ,WAAWC,OAAQF,IAAK,CAC9C,IAAKY,EAAQC,EAAIZ,WAAWD,IAAoB,CAC9C,OAAO,K,GAIb,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AW,aAAe,OAASC,qBAAsB,CACrF,MAAM3B,EAAMnB,KAAKmB,GAAK,IAAI,OAAS2B,sBAChCC,IACC,GAAIA,EAAK,GAAGC,eAAgB,CAC1B7B,EAAGC,aACHpB,KAAKmB,GAAKE,UACVuB,G,IAGJ,CAAED,eAGJxB,EAAG8B,QAAQ9C,E,KACN,CAGLyC,G,qJAWN,MAAMF,EAAsBT,GACnBA,EACJ,CACE,YAAa,KACb,CAAC,aAAaA,KAAU,MAE1B,K","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- import{p as o,b as n}from"./p-152ef3bc.js";export{s as setNonce}from"./p-152ef3bc.js";import{g as a}from"./p-e1255160.js";var e=()=>{const s=import.meta.url;const n={};if(s!==""){n.resourcesUrl=new URL(".",s).href}return o(n)};e().then((async o=>{await a();return n([["p-9bdf8fd3",[[1,"pds-icon",{color:[1],icon:[8],name:[513],size:[513],src:[1],ariaLabel:[32],isVisible:[32],svgContent:[32]},null,{name:["loadIcon"],src:["loadIcon"],icon:["loadIcon"]}]]]],o)}));
1
+ import{p as o,b as n}from"./p-152ef3bc.js";export{s as setNonce}from"./p-152ef3bc.js";import{g as a}from"./p-e1255160.js";var c=()=>{const s=import.meta.url;const n={};if(s!==""){n.resourcesUrl=new URL(".",s).href}return o(n)};c().then((async o=>{await a();return n([["p-20b3c799",[[1,"pds-icon",{color:[1],icon:[8],name:[513],size:[513],src:[1],ariaLabel:[32],isVisible:[32],svgContent:[32]},null,{name:["loadIcon"],src:["loadIcon"],icon:["loadIcon"]}]]]],o)}));
2
2
  //# sourceMappingURL=pds-icons.esm.js.map
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" class="pdsicon"><g clip-path="url(#a)"><path fill-rule="evenodd" d="M8.667 0v2.667H7.333V0zM4.7 3.757 2.815 1.872l-.943.943L3.757 4.7zM2.667 7.333H0v1.334h2.667zM12.243 4.7l1.885-1.885-.943-.943L11.3 3.757zm1.09 2.633H16v1.334h-2.667zM8 3.333A4.666 4.666 0 0 0 3.333 8 4.66 4.66 0 0 0 6 12.212v3.121h4v-3.12A4.66 4.66 0 0 0 12.667 8 4.666 4.666 0 0 0 8 3.333M4.667 8a3.333 3.333 0 1 1 6.666 0 3.33 3.33 0 0 1-2.222 3.139l-.444.157V14H7.333v-2.704l-.444-.157A3.33 3.33 0 0 1 4.667 8"/></g><defs><clipPath id="a"><path d="M0 0h16v16H0z"/></clipPath></defs></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" class="pdsicon"><path fill-rule="evenodd" d="M8.667 2.013A9 9 0 0 0 8.007 2h-2.14c-.571 0-.96 0-1.26.025-.292.024-.441.067-.546.12-.25.128-.455.332-.582.583-.053.104-.097.254-.12.546-.025.3-.026.688-.026 1.26v6.933c0 .57 0 .959.025 1.259.024.292.068.442.12.546.128.25.332.455.583.583.105.053.254.096.546.12.3.024.689.025 1.26.025h4.266c.571 0 .96 0 1.26-.025.292-.024.441-.067.546-.12.25-.128.454-.332.582-.583.053-.104.097-.254.12-.546.025-.3.026-.688.026-1.26V6.66c0-.352-.002-.535-.014-.659H10.38c-.168 0-.332 0-.471-.011a1.4 1.4 0 0 1-.513-.134 1.33 1.33 0 0 1-.583-.583 1.4 1.4 0 0 1-.134-.513c-.011-.139-.011-.303-.011-.471zM9.594.9A2.7 2.7 0 0 0 9.127.74C8.82.666 8.5.666 8.076.667H5.839c-.537 0-.98 0-1.34.03-.375.03-.72.095-1.043.26-.502.256-.91.664-1.165 1.166-.165.323-.23.668-.262 1.042C2 3.526 2 3.97 2 4.505v6.99c0 .536 0 .979.03 1.34.03.374.096.719.26 1.042.256.502.664.91 1.166 1.166.324.165.668.23 1.043.26.36.03.803.03 1.34.03h4.322c.537 0 .98 0 1.34-.03.375-.03.72-.096 1.043-.26.502-.256.91-.664 1.165-1.166.165-.323.23-.668.261-1.042.03-.361.03-.804.03-1.34V6.59c0-.423 0-.743-.074-1.052a2.7 2.7 0 0 0-.319-.77c-.166-.271-.392-.497-.691-.796l-.049-.048-2.125-2.126-.048-.048c-.3-.3-.525-.526-.796-.691a3 3 0 0 0-.304-.161M10 2.943v1.324c0 .197 0 .306.007.383v.009h.01c.077.007.185.008.383.008h1.324z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" class="pdsicon"><g clip-path="url(#a)"><path fill-rule="evenodd" d="M12.67 0h-12v4a2.66 2.66 0 0 0 2.66 2.67h.07a4.58 4.58 0 0 0 3.93 3.93V12h-.66a3.35 3.35 0 0 0-3.34 3.33V16h9.34v-.67A3.35 3.35 0 0 0 9.33 12h-.66v-1.4a4.58 4.58 0 0 0 3.93-3.93h.07A2.66 2.66 0 0 0 15.33 4V0zM2.39 4.94A1.33 1.33 0 0 1 2 4V1.33h1.33v4c-.353 0-.69-.14-.94-.39M14 4a1.33 1.33 0 0 1-1.33 1.33v-4H14z"/></g><defs><clipPath id="a"><path d="M0 0h16v16H0z"/></clipPath></defs></svg>
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pds-icons",
3
- "version": "7.0.1",
3
+ "version": "7.2.0",
4
4
  "icons": [
5
5
  {
6
6
  "name": "access-key",
@@ -521,6 +521,13 @@
521
521
  "voice"
522
522
  ]
523
523
  },
524
+ {
525
+ "name": "bulb",
526
+ "category": "actions",
527
+ "tags": [
528
+ "bulb"
529
+ ]
530
+ },
524
531
  {
525
532
  "name": "button",
526
533
  "category": "text-editor",
@@ -1902,6 +1909,18 @@
1902
1909
  "text"
1903
1910
  ]
1904
1911
  },
1912
+ {
1913
+ "name": "file-02",
1914
+ "category": "actions",
1915
+ "tags": [
1916
+ "attachment",
1917
+ "file",
1918
+ "paper",
1919
+ "pdf",
1920
+ "report",
1921
+ "text"
1922
+ ]
1923
+ },
1905
1924
  {
1906
1925
  "name": "file-money",
1907
1926
  "category": "site-settings",
@@ -4403,6 +4422,14 @@
4403
4422
  "trophy"
4404
4423
  ]
4405
4424
  },
4425
+ {
4426
+ "name": "trophy-filled",
4427
+ "category": "features",
4428
+ "tags": [
4429
+ "filled",
4430
+ "trophy"
4431
+ ]
4432
+ },
4406
4433
  {
4407
4434
  "name": "underline",
4408
4435
  "category": "text-editor",
@@ -1,4 +1,4 @@
1
- <svg data-pdsicons="7.0.1" style="display:none">
1
+ <svg data-pdsicons="7.2.0" style="display:none">
2
2
  <style>
3
3
  .pdsicon {
4
4
  fill: currentColor;
@@ -43,6 +43,7 @@
43
43
  <symbol id="blog-filled" viewBox="0 0 16 16" class="pdsicon"><path d="M14 0H2a.667.667 0 0 0-.667.667v14.666c0 .368.299.667.667.667h12a.667.667 0 0 0 .667-.667V.667A.667.667 0 0 0 14 0m-2 13c0 .184-.15.333-.333.333H4.333A.333.333 0 0 1 4 13v-.667c0-.184.15-.333.333-.333h7.334c.184 0 .333.15.333.333zm0-3.333c0 .184-.15.333-.333.333H4.333A.333.333 0 0 1 4 9.667V9c0-.184.15-.333.333-.333h7.334c.184 0 .333.149.333.333zm0-3.334c0 .184-.15.334-.333.334H4.333A.333.333 0 0 1 4 6.333V3c0-.184.15-.333.333-.333h7.334c.184 0 .333.149.333.333z"/></symbol>
44
44
  <symbol id="bold" viewBox="0 0 16 16" class="pdsicon"><path fill-rule="evenodd" d="M1.333.667C1.333.298 1.632 0 2 0h7.333A4 4 0 0 1 11.9 7.07 4.668 4.668 0 0 1 10 16H2a.667.667 0 0 1 0-1.333h.667V1.333H2a.667.667 0 0 1-.667-.666m2.667 6h5.333a2.667 2.667 0 1 0 0-5.334H4zM4 8v6.667h6A3.333 3.333 0 0 0 10 8H4"/></symbol>
45
45
  <symbol id="broadcast" viewBox="0 0 16 16" class="pdsicon"><path fill-rule="evenodd" d="M11.057 1.46a.67.67 0 0 1 .276.54v10.667a.667.667 0 0 1-.877.632l-3.123-1.04V14a.667.667 0 0 1-.85.641l-4.666-1.333a.67.67 0 0 1-.484-.641v-2.409l-.877-.292A.67.67 0 0 1 0 9.333v-4c0-.287.184-.541.456-.632l10-3.333a.67.67 0 0 1 .6.091m-4.195 9.236.03.01L10 11.742V2.925L1.333 5.814v3.039zM6 13.116v-1.302l-3.333-1.111v1.46zm8-6.45A.667.667 0 1 0 14 8h1.333a.667.667 0 1 0 0-1.333zm.908-3.337a.667.667 0 0 1-.237.912l-1.133.667a.667.667 0 1 1-.676-1.15l1.133-.666a.667.667 0 0 1 .913.237m-1.37 6.43a.667.667 0 1 0-.676 1.149l1.133.667a.667.667 0 1 0 .676-1.15z"/></symbol>
46
+ <symbol id="bulb" viewBox="0 0 16 16" class="pdsicon"><g clip-path="url(#a)"><path fill-rule="evenodd" d="M8.667 0v2.667H7.333V0zM4.7 3.757 2.815 1.872l-.943.943L3.757 4.7zM2.667 7.333H0v1.334h2.667zM12.243 4.7l1.885-1.885-.943-.943L11.3 3.757zm1.09 2.633H16v1.334h-2.667zM8 3.333A4.666 4.666 0 0 0 3.333 8 4.66 4.66 0 0 0 6 12.212v3.121h4v-3.12A4.66 4.66 0 0 0 12.667 8 4.666 4.666 0 0 0 8 3.333M4.667 8a3.333 3.333 0 1 1 6.666 0 3.33 3.33 0 0 1-2.222 3.139l-.444.157V14H7.333v-2.704l-.444-.157A3.33 3.33 0 0 1 4.667 8"/></g><defs><clipPath id="a"><path d="M0 0h16v16H0z"/></clipPath></defs></symbol>
46
47
  <symbol id="button" viewBox="0 0 16 16" class="pdsicon"><path fill-rule="evenodd" d="M.667 5.333a2 2 0 0 1 2-2h10.666a2 2 0 0 1 2 2v5.334a2 2 0 0 1-2 2H2.667a2 2 0 0 1-2-2zm2-.666A.667.667 0 0 0 2 5.333v5.334c0 .368.299.666.667.666h10.666a.667.667 0 0 0 .667-.666V5.333a.667.667 0 0 0-.667-.666z"/></symbol>
47
48
  <symbol id="calendar-date" viewBox="0 0 16 16" class="pdsicon"><g clip-path="url(#a)"><path d="M3.333 7.667a.667.667 0 0 0-.666.666V9c0 .368.298.667.666.667h1.334A.667.667 0 0 0 5.333 9v-.667a.667.667 0 0 0-.666-.666zM7.333 7.667a.667.667 0 0 0-.666.666V9c0 .368.298.667.666.667h1.334A.667.667 0 0 0 9.333 9v-.667a.667.667 0 0 0-.666-.666zM2.667 11.667c0-.368.298-.667.666-.667h1.334c.368 0 .666.299.666.667v.666a.667.667 0 0 1-.666.667H3.333a.667.667 0 0 1-.666-.667zM7.333 11a.667.667 0 0 0-.666.667v.666c0 .368.298.667.666.667h1.334a.667.667 0 0 0 .666-.667v-.666A.667.667 0 0 0 8.667 11zM10.667 8.333c0-.368.298-.666.666-.666h1.334c.368 0 .666.298.666.666V9a.667.667 0 0 1-.666.667h-1.334A.667.667 0 0 1 10.667 9z"/><path fill-rule="evenodd" d="M12 1a.667.667 0 0 0-1.333 0v1.333H5.333V1A.667.667 0 1 0 4 1v1.333H.667A.667.667 0 0 0 0 3v12c0 .368.298.667.667.667h14.666A.667.667 0 0 0 16 15V3a.667.667 0 0 0-.667-.667H12zm2.667 4V3.667H1.333V5zM1.333 6.333h13.334v8H1.333z"/></g><defs><clipPath id="a"><path d="M0 0h16v16H0z"/></clipPath></defs></symbol>
48
49
  <symbol id="calendar-schedule" viewBox="0 0 16 16" class="pdsicon"><g clip-path="url(#a)"><path fill-rule="evenodd" d="M5.333.667A.667.667 0 1 0 4 .667V2H.667A.667.667 0 0 0 0 2.667v12c0 .368.298.666.667.666H6A.667.667 0 1 0 6 14H1.333V6h13.334v1.333a.667.667 0 1 0 1.333 0V2.667A.667.667 0 0 0 15.333 2H12V.667a.667.667 0 0 0-1.333 0V2H5.333zm9.334 4V3.333H1.333v1.334z"/><path d="M12 10.667a.667.667 0 0 0-1.333 0V12c0 .368.298.667.666.667h1.334a.667.667 0 0 0 0-1.334H12z"/><path fill-rule="evenodd" d="M11.333 8a4 4 0 1 0 0 8 4 4 0 0 0 0-8m-2.666 4A2.667 2.667 0 1 1 14 12a2.667 2.667 0 0 1-5.333 0"/></g><defs><clipPath id="a"><path d="M0 0h16v16H0z"/></clipPath></defs></symbol>
@@ -130,6 +131,7 @@
130
131
  <symbol id="favorite" viewBox="0 0 16 16" class="pdsicon"><path fill-rule="evenodd" d="M1.4 2C3.2.2 6.133.2 8 2v.067V2C9.8.2 12.8.2 14.6 2s1.8 4.8 0 6.6l-6.133 6.133a.6.6 0 0 1-.467.2.6.6 0 0 1-.467-.2L1.4 8.6C-.467 6.8-.467 3.867 1.4 2M7 3C5.667 1.667 3.6 1.667 2.267 3c-1.334 1.333-1.334 3.4 0 4.733L7.933 13.4 13.6 7.733c1.333-1.333 1.333-3.4 0-4.733s-3.4-1.333-4.733 0c-.067.133-.2.333-.334.467-.133.2-.333.266-.533.266s-.4-.133-.533-.266C7.333 3.333 7.2 3.133 7 3"/></symbol>
131
132
  <symbol id="feedback" viewBox="0 0 16 16" class="pdsicon"><g clip-path="url(#a)"><path fill-rule="evenodd" d="M0 7.333C0 3.513 3.697.667 8 .667s8 2.846 8 6.666v.016a6.14 6.14 0 0 1-1.7 4.096l.362 3.145a.667.667 0 0 1-.913.694l-3.726-1.516a7.7 7.7 0 0 1-2.03.232C3.693 13.997 0 11.152 0 7.333M8 2C4.17 2 1.333 4.487 1.333 7.333S4.17 12.667 8 12.667h.014a6.4 6.4 0 0 0 1.87-.242.67.67 0 0 1 .434.024l2.89 1.176-.27-2.349a.67.67 0 0 1 .207-.563 4.8 4.8 0 0 0 1.522-3.388C14.66 4.483 11.827 2 8 2m0 1.333c.368 0 .667.299.667.667v4a.667.667 0 1 1-1.334 0V4c0-.368.299-.667.667-.667m.667 7.334a.667.667 0 1 1-1.334 0 .667.667 0 0 1 1.334 0"/></g><defs><clipPath id="a"><path d="M0 0h16v16H0z"/></clipPath></defs></symbol>
132
133
  <symbol id="file" viewBox="0 0 16 16" class="pdsicon"><g fill-rule="evenodd" clip-path="url(#a)"><path d="M10.438 0H2a.667.667 0 0 0-.667.667v14.666c0 .368.299.667.667.667h12a.667.667 0 0 0 .667-.667V4.667c0-.164-.06-.321-.169-.443l-3.555-4A.67.67 0 0 0 10.438 0m-.66 1.333v3.334c0 .368.298.666.666.666h2.89v9.334H2.666V1.333z"/><path d="M4 6c0-.368.298-.667.667-.667H8a.667.667 0 0 1 0 1.334H4.667A.667.667 0 0 1 4 6M4 8.667C4 8.298 4.298 8 4.667 8h6.666a.667.667 0 1 1 0 1.333H4.667A.667.667 0 0 1 4 8.667M4 11.333c0-.368.298-.666.667-.666h6.666a.667.667 0 1 1 0 1.333H4.667A.667.667 0 0 1 4 11.333"/></g><defs><clipPath id="a"><path d="M0 0h16v16H0z"/></clipPath></defs></symbol>
134
+ <symbol id="file-02" viewBox="0 0 16 16" class="pdsicon"><path fill-rule="evenodd" d="M8.667 2.013A9 9 0 0 0 8.007 2h-2.14c-.571 0-.96 0-1.26.025-.292.024-.441.067-.546.12-.25.128-.455.332-.582.583-.053.104-.097.254-.12.546-.025.3-.026.688-.026 1.26v6.933c0 .57 0 .959.025 1.259.024.292.068.442.12.546.128.25.332.455.583.583.105.053.254.096.546.12.3.024.689.025 1.26.025h4.266c.571 0 .96 0 1.26-.025.292-.024.441-.067.546-.12.25-.128.454-.332.582-.583.053-.104.097-.254.12-.546.025-.3.026-.688.026-1.26V6.66c0-.352-.002-.535-.014-.659H10.38c-.168 0-.332 0-.471-.011a1.4 1.4 0 0 1-.513-.134 1.33 1.33 0 0 1-.583-.583 1.4 1.4 0 0 1-.134-.513c-.011-.139-.011-.303-.011-.471zM9.594.9A2.7 2.7 0 0 0 9.127.74C8.82.666 8.5.666 8.076.667H5.839c-.537 0-.98 0-1.34.03-.375.03-.72.095-1.043.26-.502.256-.91.664-1.165 1.166-.165.323-.23.668-.262 1.042C2 3.526 2 3.97 2 4.505v6.99c0 .536 0 .979.03 1.34.03.374.096.719.26 1.042.256.502.664.91 1.166 1.166.324.165.668.23 1.043.26.36.03.803.03 1.34.03h4.322c.537 0 .98 0 1.34-.03.375-.03.72-.096 1.043-.26.502-.256.91-.664 1.165-1.166.165-.323.23-.668.261-1.042.03-.361.03-.804.03-1.34V6.59c0-.423 0-.743-.074-1.052a2.7 2.7 0 0 0-.319-.77c-.166-.271-.392-.497-.691-.796l-.049-.048-2.125-2.126-.048-.048c-.3-.3-.525-.526-.796-.691a3 3 0 0 0-.304-.161M10 2.943v1.324c0 .197 0 .306.007.383v.009h.01c.077.007.185.008.383.008h1.324z"/></symbol>
133
135
  <symbol id="file-money" viewBox="0 0 16 16" class="pdsicon"><path fill-rule="evenodd" d="M1.333 0h13.334v16H1.333zm1.334 1.333v13.334h10.666V1.333zm6 10.595v1.405H7.333v-1.35a8.7 8.7 0 0 1-2.225-.489l-.628-.226.451-1.254.628.225c.566.204 1.191.35 1.774.405v-2.34c-.433-.153-.9-.347-1.287-.63C5.499 7.27 5.1 6.678 5.1 5.82c0-.73.32-1.288.83-1.649.413-.29.917-.431 1.404-.489V2.667h1.334V3.69c.748.086 1.457.291 1.904.537l.584.322-.642 1.168-.584-.321c-.255-.14-.73-.286-1.262-.362v2.313c.378.133.775.293 1.107.506.54.348.98.887.98 1.713 0 .699-.233 1.278-.677 1.698-.394.372-.9.57-1.41.663m0-1.369c.22-.066.382-.157.494-.263.143-.135.26-.346.26-.729 0-.254-.099-.418-.37-.592a2.6 2.6 0 0 0-.384-.2zM7.333 6.874V5.03c-.276.048-.49.13-.635.232-.16.113-.266.267-.266.56 0 .367.141.584.403.776.14.103.306.192.498.276"/></symbol>
134
136
  <symbol id="filter" viewBox="0 0 16 16" class="pdsicon"><path fill-rule="evenodd" d="M12.71 4.3a1.26 1.26 0 1 0 0 2.518 1.26 1.26 0 0 0 0-2.518m-11.06 2h8.609A2.56 2.56 0 1 0 10.21 5H1.65a.65.65 0 1 0 0 1.3m1.91 5.518a1.26 1.26 0 1 0 0-2.518 1.26 1.26 0 0 0 0 2.518m11.058-2H6.01a2.56 2.56 0 1 0 .048 1.3h8.561a.65.65 0 1 0 0-1.3"/></symbol>
135
137
  <symbol id="flag" viewBox="0 0 16 16" class="pdsicon"><g clip-path="url(#a)"><path fill-rule="evenodd" d="M2 .667a.667.667 0 0 0-1.333 0v14.666a.667.667 0 1 0 1.333 0V10h8a.667.667 0 0 0 .667-.667V4.667h3.075L12.7 7.789a.67.67 0 0 0 0 .422l1.04 3.122H6a.667.667 0 0 0 0 1.334h8.667a.666.666 0 0 0 .632-.878L14.036 8 15.3 4.21a.667.667 0 0 0-.632-.877h-4v-2A.667.667 0 0 0 10 .667zM2 2v6.667h7.333V2z"/></g><defs><clipPath id="a"><path d="M0 0h16v16H0z"/></clipPath></defs></symbol>
@@ -292,6 +294,7 @@
292
294
  <symbol id="thumb-up-filled" viewBox="0 0 16 16" class="pdsicon"><g clip-path="url(#a)"><path fill-rule="evenodd" d="M14.115 6.245a2.67 2.67 0 0 1 1.522 2.827l-.717 4.667A2.65 2.65 0 0 1 12.284 16H4V7.333L6.023.491A.67.67 0 0 1 6.667 0c1.47 0 2 1.196 2 2.667V6H13c.385 0 .765.084 1.115.245M.667 7.333h2V16h-2A.666.666 0 0 1 0 15.333V8a.667.667 0 0 1 .667-.667"/></g><defs><clipPath id="a"><path d="M0 0h16v16H0z"/></clipPath></defs></symbol>
293
295
  <symbol id="trash" viewBox="0 0 16 16" class="pdsicon"><g clip-path="url(#a)"><path fill-rule="evenodd" d="M5.333 0a.667.667 0 0 0-.666.667v2h-4A.667.667 0 1 0 .667 4h14.666a.667.667 0 1 0 0-1.333h-4v-2A.667.667 0 0 0 10.667 0zM10 2.667V1.333H6v1.334z"/><path d="M2.667 5.333c.368 0 .666.299.666.667v8a.667.667 0 0 0 .667.667h8a.667.667 0 0 0 .667-.667V6A.667.667 0 1 1 14 6v8a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6c0-.368.298-.667.667-.667"/><path d="M10.471 7.519c.26.26.26.682 0 .942L8.943 9.99l1.528 1.529a.667.667 0 1 1-.942.942L8 10.933 6.471 12.46a.667.667 0 0 1-.942-.942L7.057 9.99 5.53 8.461a.667.667 0 0 1 .942-.942L8 9.047 9.529 7.52c.26-.26.682-.26.942 0"/></g><defs><clipPath id="a"><path d="M0 0h16v16H0z"/></clipPath></defs></symbol>
294
296
  <symbol id="trophy" viewBox="0 0 16 16" class="pdsicon"><g clip-path="url(#a)"><path fill-rule="evenodd" d="M12.67 0h-12v4a2.66 2.66 0 0 0 2.66 2.67h.07a4.58 4.58 0 0 0 3.93 3.93V12h-.66a3.35 3.35 0 0 0-3.34 3.33V16h9.34v-.67A3.35 3.35 0 0 0 9.33 12h-.66v-1.4a4.58 4.58 0 0 0 3.93-3.93h.07A2.66 2.66 0 0 0 15.33 4V0zM2.39 4.94A1.33 1.33 0 0 1 2 4V1.33h1.33v4c-.353 0-.69-.14-.94-.39m8.36 9a2 2 0 0 1 .47.75H4.78a2 2 0 0 1 1.89-1.34h2.66a2 2 0 0 1 1.42.57zM11.33 6a3.34 3.34 0 0 1-5.69 2.36A3.37 3.37 0 0 1 4.67 6V1.33h6.66zM14 4a1.33 1.33 0 0 1-1.33 1.33v-4H14z"/></g><defs><clipPath id="a"><path d="M0 0h16v16H0z"/></clipPath></defs></symbol>
297
+ <symbol id="trophy-filled" viewBox="0 0 16 16" class="pdsicon"><g clip-path="url(#a)"><path fill-rule="evenodd" d="M12.67 0h-12v4a2.66 2.66 0 0 0 2.66 2.67h.07a4.58 4.58 0 0 0 3.93 3.93V12h-.66a3.35 3.35 0 0 0-3.34 3.33V16h9.34v-.67A3.35 3.35 0 0 0 9.33 12h-.66v-1.4a4.58 4.58 0 0 0 3.93-3.93h.07A2.66 2.66 0 0 0 15.33 4V0zM2.39 4.94A1.33 1.33 0 0 1 2 4V1.33h1.33v4c-.353 0-.69-.14-.94-.39M14 4a1.33 1.33 0 0 1-1.33 1.33v-4H14z"/></g><defs><clipPath id="a"><path d="M0 0h16v16H0z"/></clipPath></defs></symbol>
295
298
  <symbol id="underline" viewBox="0 0 16 16" class="pdsicon"><g clip-path="url(#a)"><path fill-rule="evenodd" d="M4.667 1.333H4V8a4 4 0 0 0 8 0V1.333h-.667a.667.667 0 1 1 0-1.333H14a.667.667 0 1 1 0 1.333h-.667V8A5.333 5.333 0 1 1 2.667 8V1.333H2A.667.667 0 1 1 2 0h2.667a.667.667 0 0 1 0 1.333m-4 13.334a.667.667 0 1 0 0 1.333h14.666a.667.667 0 0 0 0-1.333z"/></g><defs><clipPath id="a"><path d="M0 0h16v16H0z"/></clipPath></defs></symbol>
296
299
  <symbol id="undo" viewBox="0 0 16 16" class="pdsicon"><path fill-rule="evenodd" d="M2.888 4.878a.667.667 0 0 0-1.312-.236l-.83 4.629a.67.67 0 0 0 .542.786l4.635.831a.667.667 0 1 0 .235-1.312l-3.257-.584a8.67 8.67 0 0 1 11.227.88.667.667 0 1 0 .943-.943A10 10 0 0 0 2.377 7.73z"/></symbol>
297
300
  <symbol id="unlock" viewBox="0 0 16 16" class="pdsicon"><g clip-path="url(#a)"><path fill-rule="evenodd" d="M8.073 0h-.07A3.967 3.967 0 0 0 4 3.927v2.74H2a.667.667 0 0 0-.667.666v8c0 .368.299.667.667.667h12a.667.667 0 0 0 .667-.667v-8A.667.667 0 0 0 14 6.667H5.333v-2.73a2.634 2.634 0 0 1 2.66-2.604h.07a2.634 2.634 0 0 1 2.604 2.66.667.667 0 1 0 1.333.014A3.967 3.967 0 0 0 8.073 0M4.668 8H2.666v6.667h10.667V8zM8 10.667A.667.667 0 1 0 8 12a.667.667 0 0 0 0-1.333m-2 .666a2 2 0 1 1 4 0 2 2 0 0 1-4 0"/></g><defs><clipPath id="a"><path d="M0 0h16v16H0z"/></clipPath></defs></symbol>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" class="pdsicon"><g clip-path="url(#a)"><path fill-rule="evenodd" d="M8.667 0v2.667H7.333V0zM4.7 3.757 2.815 1.872l-.943.943L3.757 4.7zM2.667 7.333H0v1.334h2.667zM12.243 4.7l1.885-1.885-.943-.943L11.3 3.757zm1.09 2.633H16v1.334h-2.667zM8 3.333A4.666 4.666 0 0 0 3.333 8 4.66 4.66 0 0 0 6 12.212v3.121h4v-3.12A4.66 4.66 0 0 0 12.667 8 4.666 4.666 0 0 0 8 3.333M4.667 8a3.333 3.333 0 1 1 6.666 0 3.33 3.33 0 0 1-2.222 3.139l-.444.157V14H7.333v-2.704l-.444-.157A3.33 3.33 0 0 1 4.667 8"/></g><defs><clipPath id="a"><path d="M0 0h16v16H0z"/></clipPath></defs></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" class="pdsicon"><path fill-rule="evenodd" d="M8.667 2.013A9 9 0 0 0 8.007 2h-2.14c-.571 0-.96 0-1.26.025-.292.024-.441.067-.546.12-.25.128-.455.332-.582.583-.053.104-.097.254-.12.546-.025.3-.026.688-.026 1.26v6.933c0 .57 0 .959.025 1.259.024.292.068.442.12.546.128.25.332.455.583.583.105.053.254.096.546.12.3.024.689.025 1.26.025h4.266c.571 0 .96 0 1.26-.025.292-.024.441-.067.546-.12.25-.128.454-.332.582-.583.053-.104.097-.254.12-.546.025-.3.026-.688.026-1.26V6.66c0-.352-.002-.535-.014-.659H10.38c-.168 0-.332 0-.471-.011a1.4 1.4 0 0 1-.513-.134 1.33 1.33 0 0 1-.583-.583 1.4 1.4 0 0 1-.134-.513c-.011-.139-.011-.303-.011-.471zM9.594.9A2.7 2.7 0 0 0 9.127.74C8.82.666 8.5.666 8.076.667H5.839c-.537 0-.98 0-1.34.03-.375.03-.72.095-1.043.26-.502.256-.91.664-1.165 1.166-.165.323-.23.668-.262 1.042C2 3.526 2 3.97 2 4.505v6.99c0 .536 0 .979.03 1.34.03.374.096.719.26 1.042.256.502.664.91 1.166 1.166.324.165.668.23 1.043.26.36.03.803.03 1.34.03h4.322c.537 0 .98 0 1.34-.03.375-.03.72-.096 1.043-.26.502-.256.91-.664 1.165-1.166.165-.323.23-.668.261-1.042.03-.361.03-.804.03-1.34V6.59c0-.423 0-.743-.074-1.052a2.7 2.7 0 0 0-.319-.77c-.166-.271-.392-.497-.691-.796l-.049-.048-2.125-2.126-.048-.048c-.3-.3-.525-.526-.796-.691a3 3 0 0 0-.304-.161M10 2.943v1.324c0 .197 0 .306.007.383v.009h.01c.077.007.185.008.383.008h1.324z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" class="pdsicon"><g clip-path="url(#a)"><path fill-rule="evenodd" d="M12.67 0h-12v4a2.66 2.66 0 0 0 2.66 2.67h.07a4.58 4.58 0 0 0 3.93 3.93V12h-.66a3.35 3.35 0 0 0-3.34 3.33V16h9.34v-.67A3.35 3.35 0 0 0 9.33 12h-.66v-1.4a4.58 4.58 0 0 0 3.93-3.93h.07A2.66 2.66 0 0 0 15.33 4V0zM2.39 4.94A1.33 1.33 0 0 1 2 4V1.33h1.33v4c-.353 0-.69-.14-.94-.39M14 4a1.33 1.33 0 0 1-1.33 1.33v-4H14z"/></g><defs><clipPath id="a"><path d="M0 0h16v16H0z"/></clipPath></defs></svg>
package/icons/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- /* pds-icons v7.0.1, Types */
1
+ /* pds-icons v7.2.0, Types */
2
2
 
3
3
  export declare var accessKey: string
4
4
  export declare var add: string
@@ -33,6 +33,7 @@ export declare var blog: string
33
33
  export declare var blogFilled: string
34
34
  export declare var bold: string
35
35
  export declare var broadcast: string
36
+ export declare var bulb: string
36
37
  export declare var button: string
37
38
  export declare var calendarDate: string
38
39
  export declare var calendarSchedule: string
@@ -120,6 +121,7 @@ export declare var expand: string
120
121
  export declare var favorite: string
121
122
  export declare var feedback: string
122
123
  export declare var file: string
124
+ export declare var file02: string
123
125
  export declare var fileMoney: string
124
126
  export declare var filter: string
125
127
  export declare var flag: string
@@ -282,6 +284,7 @@ export declare var thumbUp: string
282
284
  export declare var thumbUpFilled: string
283
285
  export declare var trash: string
284
286
  export declare var trophy: string
287
+ export declare var trophyFilled: string
285
288
  export declare var underline: string
286
289
  export declare var undo: string
287
290
  export declare var unlock: string
package/icons/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /* pds-icons v7.0.1, CommonJs */
1
+ /* pds-icons v7.2.0, CommonJs */
2
2
 
3
3
  exports.accessKey = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' class='pdsicon'><g clip-path='url(#a)'><path fill-rule='evenodd' d='m14.193 2.75 1.571-1.572c.315-.314.315-.733 0-.942-.314-.315-.733-.315-.942 0L12.727 2.33l-2.095 2.095-2.933 2.828c-1.886-1.467-4.609-1.257-6.285.419-1.885 1.885-1.885 5.028 0 6.913s5.028 1.885 6.913 0a4.817 4.817 0 0 0 .42-6.39l2.409-2.409 1.57 1.571c.315.315.734.315.943 0l2.095-2.094c.315-.315.315-.734 0-.943zM7.28 13.643a3.477 3.477 0 0 1-4.923 0 3.477 3.477 0 0 1 0-4.923 3.477 3.477 0 0 1 4.923 0 3.477 3.477 0 0 1 0 4.923m5.97-7.646-1.152-1.152 1.152-1.153 1.153 1.153z'/></g><defs><clipPath id='a'><path d='M0 0h16v16H0z'/></clipPath></defs></svg>"
4
4
  exports.add = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' class='pdsicon'><path fill-rule='evenodd' d='M8 2a.63.63 0 0 0-.628.628v4.744H2.628a.628.628 0 0 0 0 1.256h4.744v4.744a.628.628 0 1 0 1.256 0V8.628h4.744a.628.628 0 1 0 0-1.256H8.628V2.628A.63.63 0 0 0 8 2'/></svg>"
@@ -33,6 +33,7 @@ exports.blog = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg'
33
33
  exports.blogFilled = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' class='pdsicon'><path d='M14 0H2a.667.667 0 0 0-.667.667v14.666c0 .368.299.667.667.667h12a.667.667 0 0 0 .667-.667V.667A.667.667 0 0 0 14 0m-2 13c0 .184-.15.333-.333.333H4.333A.333.333 0 0 1 4 13v-.667c0-.184.15-.333.333-.333h7.334c.184 0 .333.15.333.333zm0-3.333c0 .184-.15.333-.333.333H4.333A.333.333 0 0 1 4 9.667V9c0-.184.15-.333.333-.333h7.334c.184 0 .333.149.333.333zm0-3.334c0 .184-.15.334-.333.334H4.333A.333.333 0 0 1 4 6.333V3c0-.184.15-.333.333-.333h7.334c.184 0 .333.149.333.333z'/></svg>"
34
34
  exports.bold = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' class='pdsicon'><path fill-rule='evenodd' d='M1.333.667C1.333.298 1.632 0 2 0h7.333A4 4 0 0 1 11.9 7.07 4.668 4.668 0 0 1 10 16H2a.667.667 0 0 1 0-1.333h.667V1.333H2a.667.667 0 0 1-.667-.666m2.667 6h5.333a2.667 2.667 0 1 0 0-5.334H4zM4 8v6.667h6A3.333 3.333 0 0 0 10 8H4'/></svg>"
35
35
  exports.broadcast = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' class='pdsicon'><path fill-rule='evenodd' d='M11.057 1.46a.67.67 0 0 1 .276.54v10.667a.667.667 0 0 1-.877.632l-3.123-1.04V14a.667.667 0 0 1-.85.641l-4.666-1.333a.67.67 0 0 1-.484-.641v-2.409l-.877-.292A.67.67 0 0 1 0 9.333v-4c0-.287.184-.541.456-.632l10-3.333a.67.67 0 0 1 .6.091m-4.195 9.236.03.01L10 11.742V2.925L1.333 5.814v3.039zM6 13.116v-1.302l-3.333-1.111v1.46zm8-6.45A.667.667 0 1 0 14 8h1.333a.667.667 0 1 0 0-1.333zm.908-3.337a.667.667 0 0 1-.237.912l-1.133.667a.667.667 0 1 1-.676-1.15l1.133-.666a.667.667 0 0 1 .913.237m-1.37 6.43a.667.667 0 1 0-.676 1.149l1.133.667a.667.667 0 1 0 .676-1.15z'/></svg>"
36
+ exports.bulb = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' class='pdsicon'><g clip-path='url(#a)'><path fill-rule='evenodd' d='M8.667 0v2.667H7.333V0zM4.7 3.757 2.815 1.872l-.943.943L3.757 4.7zM2.667 7.333H0v1.334h2.667zM12.243 4.7l1.885-1.885-.943-.943L11.3 3.757zm1.09 2.633H16v1.334h-2.667zM8 3.333A4.666 4.666 0 0 0 3.333 8 4.66 4.66 0 0 0 6 12.212v3.121h4v-3.12A4.66 4.66 0 0 0 12.667 8 4.666 4.666 0 0 0 8 3.333M4.667 8a3.333 3.333 0 1 1 6.666 0 3.33 3.33 0 0 1-2.222 3.139l-.444.157V14H7.333v-2.704l-.444-.157A3.33 3.33 0 0 1 4.667 8'/></g><defs><clipPath id='a'><path d='M0 0h16v16H0z'/></clipPath></defs></svg>"
36
37
  exports.button = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' class='pdsicon'><path fill-rule='evenodd' d='M.667 5.333a2 2 0 0 1 2-2h10.666a2 2 0 0 1 2 2v5.334a2 2 0 0 1-2 2H2.667a2 2 0 0 1-2-2zm2-.666A.667.667 0 0 0 2 5.333v5.334c0 .368.299.666.667.666h10.666a.667.667 0 0 0 .667-.666V5.333a.667.667 0 0 0-.667-.666z'/></svg>"
37
38
  exports.calendarDate = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' class='pdsicon'><g clip-path='url(#a)'><path d='M3.333 7.667a.667.667 0 0 0-.666.666V9c0 .368.298.667.666.667h1.334A.667.667 0 0 0 5.333 9v-.667a.667.667 0 0 0-.666-.666zM7.333 7.667a.667.667 0 0 0-.666.666V9c0 .368.298.667.666.667h1.334A.667.667 0 0 0 9.333 9v-.667a.667.667 0 0 0-.666-.666zM2.667 11.667c0-.368.298-.667.666-.667h1.334c.368 0 .666.299.666.667v.666a.667.667 0 0 1-.666.667H3.333a.667.667 0 0 1-.666-.667zM7.333 11a.667.667 0 0 0-.666.667v.666c0 .368.298.667.666.667h1.334a.667.667 0 0 0 .666-.667v-.666A.667.667 0 0 0 8.667 11zM10.667 8.333c0-.368.298-.666.666-.666h1.334c.368 0 .666.298.666.666V9a.667.667 0 0 1-.666.667h-1.334A.667.667 0 0 1 10.667 9z'/><path fill-rule='evenodd' d='M12 1a.667.667 0 0 0-1.333 0v1.333H5.333V1A.667.667 0 1 0 4 1v1.333H.667A.667.667 0 0 0 0 3v12c0 .368.298.667.667.667h14.666A.667.667 0 0 0 16 15V3a.667.667 0 0 0-.667-.667H12zm2.667 4V3.667H1.333V5zM1.333 6.333h13.334v8H1.333z'/></g><defs><clipPath id='a'><path d='M0 0h16v16H0z'/></clipPath></defs></svg>"
38
39
  exports.calendarSchedule = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' class='pdsicon'><g clip-path='url(#a)'><path fill-rule='evenodd' d='M5.333.667A.667.667 0 1 0 4 .667V2H.667A.667.667 0 0 0 0 2.667v12c0 .368.298.666.667.666H6A.667.667 0 1 0 6 14H1.333V6h13.334v1.333a.667.667 0 1 0 1.333 0V2.667A.667.667 0 0 0 15.333 2H12V.667a.667.667 0 0 0-1.333 0V2H5.333zm9.334 4V3.333H1.333v1.334z'/><path d='M12 10.667a.667.667 0 0 0-1.333 0V12c0 .368.298.667.666.667h1.334a.667.667 0 0 0 0-1.334H12z'/><path fill-rule='evenodd' d='M11.333 8a4 4 0 1 0 0 8 4 4 0 0 0 0-8m-2.666 4A2.667 2.667 0 1 1 14 12a2.667 2.667 0 0 1-5.333 0'/></g><defs><clipPath id='a'><path d='M0 0h16v16H0z'/></clipPath></defs></svg>"
@@ -120,6 +121,7 @@ exports.expand = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg
120
121
  exports.favorite = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' class='pdsicon'><path fill-rule='evenodd' d='M1.4 2C3.2.2 6.133.2 8 2v.067V2C9.8.2 12.8.2 14.6 2s1.8 4.8 0 6.6l-6.133 6.133a.6.6 0 0 1-.467.2.6.6 0 0 1-.467-.2L1.4 8.6C-.467 6.8-.467 3.867 1.4 2M7 3C5.667 1.667 3.6 1.667 2.267 3c-1.334 1.333-1.334 3.4 0 4.733L7.933 13.4 13.6 7.733c1.333-1.333 1.333-3.4 0-4.733s-3.4-1.333-4.733 0c-.067.133-.2.333-.334.467-.133.2-.333.266-.533.266s-.4-.133-.533-.266C7.333 3.333 7.2 3.133 7 3'/></svg>"
121
122
  exports.feedback = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' class='pdsicon'><g clip-path='url(#a)'><path fill-rule='evenodd' d='M0 7.333C0 3.513 3.697.667 8 .667s8 2.846 8 6.666v.016a6.14 6.14 0 0 1-1.7 4.096l.362 3.145a.667.667 0 0 1-.913.694l-3.726-1.516a7.7 7.7 0 0 1-2.03.232C3.693 13.997 0 11.152 0 7.333M8 2C4.17 2 1.333 4.487 1.333 7.333S4.17 12.667 8 12.667h.014a6.4 6.4 0 0 0 1.87-.242.67.67 0 0 1 .434.024l2.89 1.176-.27-2.349a.67.67 0 0 1 .207-.563 4.8 4.8 0 0 0 1.522-3.388C14.66 4.483 11.827 2 8 2m0 1.333c.368 0 .667.299.667.667v4a.667.667 0 1 1-1.334 0V4c0-.368.299-.667.667-.667m.667 7.334a.667.667 0 1 1-1.334 0 .667.667 0 0 1 1.334 0'/></g><defs><clipPath id='a'><path d='M0 0h16v16H0z'/></clipPath></defs></svg>"
122
123
  exports.file = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' class='pdsicon'><g fill-rule='evenodd' clip-path='url(#a)'><path d='M10.438 0H2a.667.667 0 0 0-.667.667v14.666c0 .368.299.667.667.667h12a.667.667 0 0 0 .667-.667V4.667c0-.164-.06-.321-.169-.443l-3.555-4A.67.67 0 0 0 10.438 0m-.66 1.333v3.334c0 .368.298.666.666.666h2.89v9.334H2.666V1.333z'/><path d='M4 6c0-.368.298-.667.667-.667H8a.667.667 0 0 1 0 1.334H4.667A.667.667 0 0 1 4 6M4 8.667C4 8.298 4.298 8 4.667 8h6.666a.667.667 0 1 1 0 1.333H4.667A.667.667 0 0 1 4 8.667M4 11.333c0-.368.298-.666.667-.666h6.666a.667.667 0 1 1 0 1.333H4.667A.667.667 0 0 1 4 11.333'/></g><defs><clipPath id='a'><path d='M0 0h16v16H0z'/></clipPath></defs></svg>"
124
+ exports.file02 = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' class='pdsicon'><path fill-rule='evenodd' d='M8.667 2.013A9 9 0 0 0 8.007 2h-2.14c-.571 0-.96 0-1.26.025-.292.024-.441.067-.546.12-.25.128-.455.332-.582.583-.053.104-.097.254-.12.546-.025.3-.026.688-.026 1.26v6.933c0 .57 0 .959.025 1.259.024.292.068.442.12.546.128.25.332.455.583.583.105.053.254.096.546.12.3.024.689.025 1.26.025h4.266c.571 0 .96 0 1.26-.025.292-.024.441-.067.546-.12.25-.128.454-.332.582-.583.053-.104.097-.254.12-.546.025-.3.026-.688.026-1.26V6.66c0-.352-.002-.535-.014-.659H10.38c-.168 0-.332 0-.471-.011a1.4 1.4 0 0 1-.513-.134 1.33 1.33 0 0 1-.583-.583 1.4 1.4 0 0 1-.134-.513c-.011-.139-.011-.303-.011-.471zM9.594.9A2.7 2.7 0 0 0 9.127.74C8.82.666 8.5.666 8.076.667H5.839c-.537 0-.98 0-1.34.03-.375.03-.72.095-1.043.26-.502.256-.91.664-1.165 1.166-.165.323-.23.668-.262 1.042C2 3.526 2 3.97 2 4.505v6.99c0 .536 0 .979.03 1.34.03.374.096.719.26 1.042.256.502.664.91 1.166 1.166.324.165.668.23 1.043.26.36.03.803.03 1.34.03h4.322c.537 0 .98 0 1.34-.03.375-.03.72-.096 1.043-.26.502-.256.91-.664 1.165-1.166.165-.323.23-.668.261-1.042.03-.361.03-.804.03-1.34V6.59c0-.423 0-.743-.074-1.052a2.7 2.7 0 0 0-.319-.77c-.166-.271-.392-.497-.691-.796l-.049-.048-2.125-2.126-.048-.048c-.3-.3-.525-.526-.796-.691a3 3 0 0 0-.304-.161M10 2.943v1.324c0 .197 0 .306.007.383v.009h.01c.077.007.185.008.383.008h1.324z'/></svg>"
123
125
  exports.fileMoney = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' class='pdsicon'><path fill-rule='evenodd' d='M1.333 0h13.334v16H1.333zm1.334 1.333v13.334h10.666V1.333zm6 10.595v1.405H7.333v-1.35a8.7 8.7 0 0 1-2.225-.489l-.628-.226.451-1.254.628.225c.566.204 1.191.35 1.774.405v-2.34c-.433-.153-.9-.347-1.287-.63C5.499 7.27 5.1 6.678 5.1 5.82c0-.73.32-1.288.83-1.649.413-.29.917-.431 1.404-.489V2.667h1.334V3.69c.748.086 1.457.291 1.904.537l.584.322-.642 1.168-.584-.321c-.255-.14-.73-.286-1.262-.362v2.313c.378.133.775.293 1.107.506.54.348.98.887.98 1.713 0 .699-.233 1.278-.677 1.698-.394.372-.9.57-1.41.663m0-1.369c.22-.066.382-.157.494-.263.143-.135.26-.346.26-.729 0-.254-.099-.418-.37-.592a2.6 2.6 0 0 0-.384-.2zM7.333 6.874V5.03c-.276.048-.49.13-.635.232-.16.113-.266.267-.266.56 0 .367.141.584.403.776.14.103.306.192.498.276'/></svg>"
124
126
  exports.filter = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' class='pdsicon'><path fill-rule='evenodd' d='M12.71 4.3a1.26 1.26 0 1 0 0 2.518 1.26 1.26 0 0 0 0-2.518m-11.06 2h8.609A2.56 2.56 0 1 0 10.21 5H1.65a.65.65 0 1 0 0 1.3m1.91 5.518a1.26 1.26 0 1 0 0-2.518 1.26 1.26 0 0 0 0 2.518m11.058-2H6.01a2.56 2.56 0 1 0 .048 1.3h8.561a.65.65 0 1 0 0-1.3'/></svg>"
125
127
  exports.flag = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' class='pdsicon'><g clip-path='url(#a)'><path fill-rule='evenodd' d='M2 .667a.667.667 0 0 0-1.333 0v14.666a.667.667 0 1 0 1.333 0V10h8a.667.667 0 0 0 .667-.667V4.667h3.075L12.7 7.789a.67.67 0 0 0 0 .422l1.04 3.122H6a.667.667 0 0 0 0 1.334h8.667a.666.666 0 0 0 .632-.878L14.036 8 15.3 4.21a.667.667 0 0 0-.632-.877h-4v-2A.667.667 0 0 0 10 .667zM2 2v6.667h7.333V2z'/></g><defs><clipPath id='a'><path d='M0 0h16v16H0z'/></clipPath></defs></svg>"
@@ -282,6 +284,7 @@ exports.thumbUp = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/sv
282
284
  exports.thumbUpFilled = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' class='pdsicon'><g clip-path='url(#a)'><path fill-rule='evenodd' d='M14.115 6.245a2.67 2.67 0 0 1 1.522 2.827l-.717 4.667A2.65 2.65 0 0 1 12.284 16H4V7.333L6.023.491A.67.67 0 0 1 6.667 0c1.47 0 2 1.196 2 2.667V6H13c.385 0 .765.084 1.115.245M.667 7.333h2V16h-2A.666.666 0 0 1 0 15.333V8a.667.667 0 0 1 .667-.667'/></g><defs><clipPath id='a'><path d='M0 0h16v16H0z'/></clipPath></defs></svg>"
283
285
  exports.trash = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' class='pdsicon'><g clip-path='url(#a)'><path fill-rule='evenodd' d='M5.333 0a.667.667 0 0 0-.666.667v2h-4A.667.667 0 1 0 .667 4h14.666a.667.667 0 1 0 0-1.333h-4v-2A.667.667 0 0 0 10.667 0zM10 2.667V1.333H6v1.334z'/><path d='M2.667 5.333c.368 0 .666.299.666.667v8a.667.667 0 0 0 .667.667h8a.667.667 0 0 0 .667-.667V6A.667.667 0 1 1 14 6v8a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6c0-.368.298-.667.667-.667'/><path d='M10.471 7.519c.26.26.26.682 0 .942L8.943 9.99l1.528 1.529a.667.667 0 1 1-.942.942L8 10.933 6.471 12.46a.667.667 0 0 1-.942-.942L7.057 9.99 5.53 8.461a.667.667 0 0 1 .942-.942L8 9.047 9.529 7.52c.26-.26.682-.26.942 0'/></g><defs><clipPath id='a'><path d='M0 0h16v16H0z'/></clipPath></defs></svg>"
284
286
  exports.trophy = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' class='pdsicon'><g clip-path='url(#a)'><path fill-rule='evenodd' d='M12.67 0h-12v4a2.66 2.66 0 0 0 2.66 2.67h.07a4.58 4.58 0 0 0 3.93 3.93V12h-.66a3.35 3.35 0 0 0-3.34 3.33V16h9.34v-.67A3.35 3.35 0 0 0 9.33 12h-.66v-1.4a4.58 4.58 0 0 0 3.93-3.93h.07A2.66 2.66 0 0 0 15.33 4V0zM2.39 4.94A1.33 1.33 0 0 1 2 4V1.33h1.33v4c-.353 0-.69-.14-.94-.39m8.36 9a2 2 0 0 1 .47.75H4.78a2 2 0 0 1 1.89-1.34h2.66a2 2 0 0 1 1.42.57zM11.33 6a3.34 3.34 0 0 1-5.69 2.36A3.37 3.37 0 0 1 4.67 6V1.33h6.66zM14 4a1.33 1.33 0 0 1-1.33 1.33v-4H14z'/></g><defs><clipPath id='a'><path d='M0 0h16v16H0z'/></clipPath></defs></svg>"
287
+ exports.trophyFilled = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' class='pdsicon'><g clip-path='url(#a)'><path fill-rule='evenodd' d='M12.67 0h-12v4a2.66 2.66 0 0 0 2.66 2.67h.07a4.58 4.58 0 0 0 3.93 3.93V12h-.66a3.35 3.35 0 0 0-3.34 3.33V16h9.34v-.67A3.35 3.35 0 0 0 9.33 12h-.66v-1.4a4.58 4.58 0 0 0 3.93-3.93h.07A2.66 2.66 0 0 0 15.33 4V0zM2.39 4.94A1.33 1.33 0 0 1 2 4V1.33h1.33v4c-.353 0-.69-.14-.94-.39M14 4a1.33 1.33 0 0 1-1.33 1.33v-4H14z'/></g><defs><clipPath id='a'><path d='M0 0h16v16H0z'/></clipPath></defs></svg>"
285
288
  exports.underline = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' class='pdsicon'><g clip-path='url(#a)'><path fill-rule='evenodd' d='M4.667 1.333H4V8a4 4 0 0 0 8 0V1.333h-.667a.667.667 0 1 1 0-1.333H14a.667.667 0 1 1 0 1.333h-.667V8A5.333 5.333 0 1 1 2.667 8V1.333H2A.667.667 0 1 1 2 0h2.667a.667.667 0 0 1 0 1.333m-4 13.334a.667.667 0 1 0 0 1.333h14.666a.667.667 0 0 0 0-1.333z'/></g><defs><clipPath id='a'><path d='M0 0h16v16H0z'/></clipPath></defs></svg>"
286
289
  exports.undo = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' class='pdsicon'><path fill-rule='evenodd' d='M2.888 4.878a.667.667 0 0 0-1.312-.236l-.83 4.629a.67.67 0 0 0 .542.786l4.635.831a.667.667 0 1 0 .235-1.312l-3.257-.584a8.67 8.67 0 0 1 11.227.88.667.667 0 1 0 .943-.943A10 10 0 0 0 2.377 7.73z'/></svg>"
287
290
  exports.unlock = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' class='pdsicon'><g clip-path='url(#a)'><path fill-rule='evenodd' d='M8.073 0h-.07A3.967 3.967 0 0 0 4 3.927v2.74H2a.667.667 0 0 0-.667.666v8c0 .368.299.667.667.667h12a.667.667 0 0 0 .667-.667v-8A.667.667 0 0 0 14 6.667H5.333v-2.73a2.634 2.634 0 0 1 2.66-2.604h.07a2.634 2.634 0 0 1 2.604 2.66.667.667 0 1 0 1.333.014A3.967 3.967 0 0 0 8.073 0M4.668 8H2.666v6.667h10.667V8zM8 10.667A.667.667 0 1 0 8 12a.667.667 0 0 0 0-1.333m-2 .666a2 2 0 1 1 4 0 2 2 0 0 1-4 0'/></g><defs><clipPath id='a'><path d='M0 0h16v16H0z'/></clipPath></defs></svg>"
package/icons/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- /* pds-icons v7.0.1, ES Modules */
1
+ /* pds-icons v7.2.0, ES Modules */
2
2
 
3
3
  export const accessKey = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' class='pdsicon'><g clip-path='url(#a)'><path fill-rule='evenodd' d='m14.193 2.75 1.571-1.572c.315-.314.315-.733 0-.942-.314-.315-.733-.315-.942 0L12.727 2.33l-2.095 2.095-2.933 2.828c-1.886-1.467-4.609-1.257-6.285.419-1.885 1.885-1.885 5.028 0 6.913s5.028 1.885 6.913 0a4.817 4.817 0 0 0 .42-6.39l2.409-2.409 1.57 1.571c.315.315.734.315.943 0l2.095-2.094c.315-.315.315-.734 0-.943zM7.28 13.643a3.477 3.477 0 0 1-4.923 0 3.477 3.477 0 0 1 0-4.923 3.477 3.477 0 0 1 4.923 0 3.477 3.477 0 0 1 0 4.923m5.97-7.646-1.152-1.152 1.152-1.153 1.153 1.153z'/></g><defs><clipPath id='a'><path d='M0 0h16v16H0z'/></clipPath></defs></svg>"
4
4
  export const add = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' class='pdsicon'><path fill-rule='evenodd' d='M8 2a.63.63 0 0 0-.628.628v4.744H2.628a.628.628 0 0 0 0 1.256h4.744v4.744a.628.628 0 1 0 1.256 0V8.628h4.744a.628.628 0 1 0 0-1.256H8.628V2.628A.63.63 0 0 0 8 2'/></svg>"
@@ -33,6 +33,7 @@ export const blog = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/
33
33
  export const blogFilled = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' class='pdsicon'><path d='M14 0H2a.667.667 0 0 0-.667.667v14.666c0 .368.299.667.667.667h12a.667.667 0 0 0 .667-.667V.667A.667.667 0 0 0 14 0m-2 13c0 .184-.15.333-.333.333H4.333A.333.333 0 0 1 4 13v-.667c0-.184.15-.333.333-.333h7.334c.184 0 .333.15.333.333zm0-3.333c0 .184-.15.333-.333.333H4.333A.333.333 0 0 1 4 9.667V9c0-.184.15-.333.333-.333h7.334c.184 0 .333.149.333.333zm0-3.334c0 .184-.15.334-.333.334H4.333A.333.333 0 0 1 4 6.333V3c0-.184.15-.333.333-.333h7.334c.184 0 .333.149.333.333z'/></svg>"
34
34
  export const bold = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' class='pdsicon'><path fill-rule='evenodd' d='M1.333.667C1.333.298 1.632 0 2 0h7.333A4 4 0 0 1 11.9 7.07 4.668 4.668 0 0 1 10 16H2a.667.667 0 0 1 0-1.333h.667V1.333H2a.667.667 0 0 1-.667-.666m2.667 6h5.333a2.667 2.667 0 1 0 0-5.334H4zM4 8v6.667h6A3.333 3.333 0 0 0 10 8H4'/></svg>"
35
35
  export const broadcast = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' class='pdsicon'><path fill-rule='evenodd' d='M11.057 1.46a.67.67 0 0 1 .276.54v10.667a.667.667 0 0 1-.877.632l-3.123-1.04V14a.667.667 0 0 1-.85.641l-4.666-1.333a.67.67 0 0 1-.484-.641v-2.409l-.877-.292A.67.67 0 0 1 0 9.333v-4c0-.287.184-.541.456-.632l10-3.333a.67.67 0 0 1 .6.091m-4.195 9.236.03.01L10 11.742V2.925L1.333 5.814v3.039zM6 13.116v-1.302l-3.333-1.111v1.46zm8-6.45A.667.667 0 1 0 14 8h1.333a.667.667 0 1 0 0-1.333zm.908-3.337a.667.667 0 0 1-.237.912l-1.133.667a.667.667 0 1 1-.676-1.15l1.133-.666a.667.667 0 0 1 .913.237m-1.37 6.43a.667.667 0 1 0-.676 1.149l1.133.667a.667.667 0 1 0 .676-1.15z'/></svg>"
36
+ export const bulb = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' class='pdsicon'><g clip-path='url(#a)'><path fill-rule='evenodd' d='M8.667 0v2.667H7.333V0zM4.7 3.757 2.815 1.872l-.943.943L3.757 4.7zM2.667 7.333H0v1.334h2.667zM12.243 4.7l1.885-1.885-.943-.943L11.3 3.757zm1.09 2.633H16v1.334h-2.667zM8 3.333A4.666 4.666 0 0 0 3.333 8 4.66 4.66 0 0 0 6 12.212v3.121h4v-3.12A4.66 4.66 0 0 0 12.667 8 4.666 4.666 0 0 0 8 3.333M4.667 8a3.333 3.333 0 1 1 6.666 0 3.33 3.33 0 0 1-2.222 3.139l-.444.157V14H7.333v-2.704l-.444-.157A3.33 3.33 0 0 1 4.667 8'/></g><defs><clipPath id='a'><path d='M0 0h16v16H0z'/></clipPath></defs></svg>"
36
37
  export const button = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' class='pdsicon'><path fill-rule='evenodd' d='M.667 5.333a2 2 0 0 1 2-2h10.666a2 2 0 0 1 2 2v5.334a2 2 0 0 1-2 2H2.667a2 2 0 0 1-2-2zm2-.666A.667.667 0 0 0 2 5.333v5.334c0 .368.299.666.667.666h10.666a.667.667 0 0 0 .667-.666V5.333a.667.667 0 0 0-.667-.666z'/></svg>"
37
38
  export const calendarDate = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' class='pdsicon'><g clip-path='url(#a)'><path d='M3.333 7.667a.667.667 0 0 0-.666.666V9c0 .368.298.667.666.667h1.334A.667.667 0 0 0 5.333 9v-.667a.667.667 0 0 0-.666-.666zM7.333 7.667a.667.667 0 0 0-.666.666V9c0 .368.298.667.666.667h1.334A.667.667 0 0 0 9.333 9v-.667a.667.667 0 0 0-.666-.666zM2.667 11.667c0-.368.298-.667.666-.667h1.334c.368 0 .666.299.666.667v.666a.667.667 0 0 1-.666.667H3.333a.667.667 0 0 1-.666-.667zM7.333 11a.667.667 0 0 0-.666.667v.666c0 .368.298.667.666.667h1.334a.667.667 0 0 0 .666-.667v-.666A.667.667 0 0 0 8.667 11zM10.667 8.333c0-.368.298-.666.666-.666h1.334c.368 0 .666.298.666.666V9a.667.667 0 0 1-.666.667h-1.334A.667.667 0 0 1 10.667 9z'/><path fill-rule='evenodd' d='M12 1a.667.667 0 0 0-1.333 0v1.333H5.333V1A.667.667 0 1 0 4 1v1.333H.667A.667.667 0 0 0 0 3v12c0 .368.298.667.667.667h14.666A.667.667 0 0 0 16 15V3a.667.667 0 0 0-.667-.667H12zm2.667 4V3.667H1.333V5zM1.333 6.333h13.334v8H1.333z'/></g><defs><clipPath id='a'><path d='M0 0h16v16H0z'/></clipPath></defs></svg>"
38
39
  export const calendarSchedule = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' class='pdsicon'><g clip-path='url(#a)'><path fill-rule='evenodd' d='M5.333.667A.667.667 0 1 0 4 .667V2H.667A.667.667 0 0 0 0 2.667v12c0 .368.298.666.667.666H6A.667.667 0 1 0 6 14H1.333V6h13.334v1.333a.667.667 0 1 0 1.333 0V2.667A.667.667 0 0 0 15.333 2H12V.667a.667.667 0 0 0-1.333 0V2H5.333zm9.334 4V3.333H1.333v1.334z'/><path d='M12 10.667a.667.667 0 0 0-1.333 0V12c0 .368.298.667.666.667h1.334a.667.667 0 0 0 0-1.334H12z'/><path fill-rule='evenodd' d='M11.333 8a4 4 0 1 0 0 8 4 4 0 0 0 0-8m-2.666 4A2.667 2.667 0 1 1 14 12a2.667 2.667 0 0 1-5.333 0'/></g><defs><clipPath id='a'><path d='M0 0h16v16H0z'/></clipPath></defs></svg>"
@@ -120,6 +121,7 @@ export const expand = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/200
120
121
  export const favorite = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' class='pdsicon'><path fill-rule='evenodd' d='M1.4 2C3.2.2 6.133.2 8 2v.067V2C9.8.2 12.8.2 14.6 2s1.8 4.8 0 6.6l-6.133 6.133a.6.6 0 0 1-.467.2.6.6 0 0 1-.467-.2L1.4 8.6C-.467 6.8-.467 3.867 1.4 2M7 3C5.667 1.667 3.6 1.667 2.267 3c-1.334 1.333-1.334 3.4 0 4.733L7.933 13.4 13.6 7.733c1.333-1.333 1.333-3.4 0-4.733s-3.4-1.333-4.733 0c-.067.133-.2.333-.334.467-.133.2-.333.266-.533.266s-.4-.133-.533-.266C7.333 3.333 7.2 3.133 7 3'/></svg>"
121
122
  export const feedback = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' class='pdsicon'><g clip-path='url(#a)'><path fill-rule='evenodd' d='M0 7.333C0 3.513 3.697.667 8 .667s8 2.846 8 6.666v.016a6.14 6.14 0 0 1-1.7 4.096l.362 3.145a.667.667 0 0 1-.913.694l-3.726-1.516a7.7 7.7 0 0 1-2.03.232C3.693 13.997 0 11.152 0 7.333M8 2C4.17 2 1.333 4.487 1.333 7.333S4.17 12.667 8 12.667h.014a6.4 6.4 0 0 0 1.87-.242.67.67 0 0 1 .434.024l2.89 1.176-.27-2.349a.67.67 0 0 1 .207-.563 4.8 4.8 0 0 0 1.522-3.388C14.66 4.483 11.827 2 8 2m0 1.333c.368 0 .667.299.667.667v4a.667.667 0 1 1-1.334 0V4c0-.368.299-.667.667-.667m.667 7.334a.667.667 0 1 1-1.334 0 .667.667 0 0 1 1.334 0'/></g><defs><clipPath id='a'><path d='M0 0h16v16H0z'/></clipPath></defs></svg>"
122
123
  export const file = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' class='pdsicon'><g fill-rule='evenodd' clip-path='url(#a)'><path d='M10.438 0H2a.667.667 0 0 0-.667.667v14.666c0 .368.299.667.667.667h12a.667.667 0 0 0 .667-.667V4.667c0-.164-.06-.321-.169-.443l-3.555-4A.67.67 0 0 0 10.438 0m-.66 1.333v3.334c0 .368.298.666.666.666h2.89v9.334H2.666V1.333z'/><path d='M4 6c0-.368.298-.667.667-.667H8a.667.667 0 0 1 0 1.334H4.667A.667.667 0 0 1 4 6M4 8.667C4 8.298 4.298 8 4.667 8h6.666a.667.667 0 1 1 0 1.333H4.667A.667.667 0 0 1 4 8.667M4 11.333c0-.368.298-.666.667-.666h6.666a.667.667 0 1 1 0 1.333H4.667A.667.667 0 0 1 4 11.333'/></g><defs><clipPath id='a'><path d='M0 0h16v16H0z'/></clipPath></defs></svg>"
124
+ export const file02 = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' class='pdsicon'><path fill-rule='evenodd' d='M8.667 2.013A9 9 0 0 0 8.007 2h-2.14c-.571 0-.96 0-1.26.025-.292.024-.441.067-.546.12-.25.128-.455.332-.582.583-.053.104-.097.254-.12.546-.025.3-.026.688-.026 1.26v6.933c0 .57 0 .959.025 1.259.024.292.068.442.12.546.128.25.332.455.583.583.105.053.254.096.546.12.3.024.689.025 1.26.025h4.266c.571 0 .96 0 1.26-.025.292-.024.441-.067.546-.12.25-.128.454-.332.582-.583.053-.104.097-.254.12-.546.025-.3.026-.688.026-1.26V6.66c0-.352-.002-.535-.014-.659H10.38c-.168 0-.332 0-.471-.011a1.4 1.4 0 0 1-.513-.134 1.33 1.33 0 0 1-.583-.583 1.4 1.4 0 0 1-.134-.513c-.011-.139-.011-.303-.011-.471zM9.594.9A2.7 2.7 0 0 0 9.127.74C8.82.666 8.5.666 8.076.667H5.839c-.537 0-.98 0-1.34.03-.375.03-.72.095-1.043.26-.502.256-.91.664-1.165 1.166-.165.323-.23.668-.262 1.042C2 3.526 2 3.97 2 4.505v6.99c0 .536 0 .979.03 1.34.03.374.096.719.26 1.042.256.502.664.91 1.166 1.166.324.165.668.23 1.043.26.36.03.803.03 1.34.03h4.322c.537 0 .98 0 1.34-.03.375-.03.72-.096 1.043-.26.502-.256.91-.664 1.165-1.166.165-.323.23-.668.261-1.042.03-.361.03-.804.03-1.34V6.59c0-.423 0-.743-.074-1.052a2.7 2.7 0 0 0-.319-.77c-.166-.271-.392-.497-.691-.796l-.049-.048-2.125-2.126-.048-.048c-.3-.3-.525-.526-.796-.691a3 3 0 0 0-.304-.161M10 2.943v1.324c0 .197 0 .306.007.383v.009h.01c.077.007.185.008.383.008h1.324z'/></svg>"
123
125
  export const fileMoney = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' class='pdsicon'><path fill-rule='evenodd' d='M1.333 0h13.334v16H1.333zm1.334 1.333v13.334h10.666V1.333zm6 10.595v1.405H7.333v-1.35a8.7 8.7 0 0 1-2.225-.489l-.628-.226.451-1.254.628.225c.566.204 1.191.35 1.774.405v-2.34c-.433-.153-.9-.347-1.287-.63C5.499 7.27 5.1 6.678 5.1 5.82c0-.73.32-1.288.83-1.649.413-.29.917-.431 1.404-.489V2.667h1.334V3.69c.748.086 1.457.291 1.904.537l.584.322-.642 1.168-.584-.321c-.255-.14-.73-.286-1.262-.362v2.313c.378.133.775.293 1.107.506.54.348.98.887.98 1.713 0 .699-.233 1.278-.677 1.698-.394.372-.9.57-1.41.663m0-1.369c.22-.066.382-.157.494-.263.143-.135.26-.346.26-.729 0-.254-.099-.418-.37-.592a2.6 2.6 0 0 0-.384-.2zM7.333 6.874V5.03c-.276.048-.49.13-.635.232-.16.113-.266.267-.266.56 0 .367.141.584.403.776.14.103.306.192.498.276'/></svg>"
124
126
  export const filter = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' class='pdsicon'><path fill-rule='evenodd' d='M12.71 4.3a1.26 1.26 0 1 0 0 2.518 1.26 1.26 0 0 0 0-2.518m-11.06 2h8.609A2.56 2.56 0 1 0 10.21 5H1.65a.65.65 0 1 0 0 1.3m1.91 5.518a1.26 1.26 0 1 0 0-2.518 1.26 1.26 0 0 0 0 2.518m11.058-2H6.01a2.56 2.56 0 1 0 .048 1.3h8.561a.65.65 0 1 0 0-1.3'/></svg>"
125
127
  export const flag = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' class='pdsicon'><g clip-path='url(#a)'><path fill-rule='evenodd' d='M2 .667a.667.667 0 0 0-1.333 0v14.666a.667.667 0 1 0 1.333 0V10h8a.667.667 0 0 0 .667-.667V4.667h3.075L12.7 7.789a.67.67 0 0 0 0 .422l1.04 3.122H6a.667.667 0 0 0 0 1.334h8.667a.666.666 0 0 0 .632-.878L14.036 8 15.3 4.21a.667.667 0 0 0-.632-.877h-4v-2A.667.667 0 0 0 10 .667zM2 2v6.667h7.333V2z'/></g><defs><clipPath id='a'><path d='M0 0h16v16H0z'/></clipPath></defs></svg>"
@@ -282,6 +284,7 @@ export const thumbUp = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/20
282
284
  export const thumbUpFilled = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' class='pdsicon'><g clip-path='url(#a)'><path fill-rule='evenodd' d='M14.115 6.245a2.67 2.67 0 0 1 1.522 2.827l-.717 4.667A2.65 2.65 0 0 1 12.284 16H4V7.333L6.023.491A.67.67 0 0 1 6.667 0c1.47 0 2 1.196 2 2.667V6H13c.385 0 .765.084 1.115.245M.667 7.333h2V16h-2A.666.666 0 0 1 0 15.333V8a.667.667 0 0 1 .667-.667'/></g><defs><clipPath id='a'><path d='M0 0h16v16H0z'/></clipPath></defs></svg>"
283
285
  export const trash = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' class='pdsicon'><g clip-path='url(#a)'><path fill-rule='evenodd' d='M5.333 0a.667.667 0 0 0-.666.667v2h-4A.667.667 0 1 0 .667 4h14.666a.667.667 0 1 0 0-1.333h-4v-2A.667.667 0 0 0 10.667 0zM10 2.667V1.333H6v1.334z'/><path d='M2.667 5.333c.368 0 .666.299.666.667v8a.667.667 0 0 0 .667.667h8a.667.667 0 0 0 .667-.667V6A.667.667 0 1 1 14 6v8a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6c0-.368.298-.667.667-.667'/><path d='M10.471 7.519c.26.26.26.682 0 .942L8.943 9.99l1.528 1.529a.667.667 0 1 1-.942.942L8 10.933 6.471 12.46a.667.667 0 0 1-.942-.942L7.057 9.99 5.53 8.461a.667.667 0 0 1 .942-.942L8 9.047 9.529 7.52c.26-.26.682-.26.942 0'/></g><defs><clipPath id='a'><path d='M0 0h16v16H0z'/></clipPath></defs></svg>"
284
286
  export const trophy = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' class='pdsicon'><g clip-path='url(#a)'><path fill-rule='evenodd' d='M12.67 0h-12v4a2.66 2.66 0 0 0 2.66 2.67h.07a4.58 4.58 0 0 0 3.93 3.93V12h-.66a3.35 3.35 0 0 0-3.34 3.33V16h9.34v-.67A3.35 3.35 0 0 0 9.33 12h-.66v-1.4a4.58 4.58 0 0 0 3.93-3.93h.07A2.66 2.66 0 0 0 15.33 4V0zM2.39 4.94A1.33 1.33 0 0 1 2 4V1.33h1.33v4c-.353 0-.69-.14-.94-.39m8.36 9a2 2 0 0 1 .47.75H4.78a2 2 0 0 1 1.89-1.34h2.66a2 2 0 0 1 1.42.57zM11.33 6a3.34 3.34 0 0 1-5.69 2.36A3.37 3.37 0 0 1 4.67 6V1.33h6.66zM14 4a1.33 1.33 0 0 1-1.33 1.33v-4H14z'/></g><defs><clipPath id='a'><path d='M0 0h16v16H0z'/></clipPath></defs></svg>"
287
+ export const trophyFilled = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' class='pdsicon'><g clip-path='url(#a)'><path fill-rule='evenodd' d='M12.67 0h-12v4a2.66 2.66 0 0 0 2.66 2.67h.07a4.58 4.58 0 0 0 3.93 3.93V12h-.66a3.35 3.35 0 0 0-3.34 3.33V16h9.34v-.67A3.35 3.35 0 0 0 9.33 12h-.66v-1.4a4.58 4.58 0 0 0 3.93-3.93h.07A2.66 2.66 0 0 0 15.33 4V0zM2.39 4.94A1.33 1.33 0 0 1 2 4V1.33h1.33v4c-.353 0-.69-.14-.94-.39M14 4a1.33 1.33 0 0 1-1.33 1.33v-4H14z'/></g><defs><clipPath id='a'><path d='M0 0h16v16H0z'/></clipPath></defs></svg>"
285
288
  export const underline = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' class='pdsicon'><g clip-path='url(#a)'><path fill-rule='evenodd' d='M4.667 1.333H4V8a4 4 0 0 0 8 0V1.333h-.667a.667.667 0 1 1 0-1.333H14a.667.667 0 1 1 0 1.333h-.667V8A5.333 5.333 0 1 1 2.667 8V1.333H2A.667.667 0 1 1 2 0h2.667a.667.667 0 0 1 0 1.333m-4 13.334a.667.667 0 1 0 0 1.333h14.666a.667.667 0 0 0 0-1.333z'/></g><defs><clipPath id='a'><path d='M0 0h16v16H0z'/></clipPath></defs></svg>"
286
289
  export const undo = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' class='pdsicon'><path fill-rule='evenodd' d='M2.888 4.878a.667.667 0 0 0-1.312-.236l-.83 4.629a.67.67 0 0 0 .542.786l4.635.831a.667.667 0 1 0 .235-1.312l-3.257-.584a8.67 8.67 0 0 1 11.227.88.667.667 0 1 0 .943-.943A10 10 0 0 0 2.377 7.73z'/></svg>"
287
290
  export const unlock = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' class='pdsicon'><g clip-path='url(#a)'><path fill-rule='evenodd' d='M8.073 0h-.07A3.967 3.967 0 0 0 4 3.927v2.74H2a.667.667 0 0 0-.667.666v8c0 .368.299.667.667.667h12a.667.667 0 0 0 .667-.667v-8A.667.667 0 0 0 14 6.667H5.333v-2.73a2.634 2.634 0 0 1 2.66-2.604h.07a2.634 2.634 0 0 1 2.604 2.66.667.667 0 1 0 1.333.014A3.967 3.967 0 0 0 8.073 0M4.668 8H2.666v6.667h10.667V8zM8 10.667A.667.667 0 1 0 8 12a.667.667 0 0 0 0-1.333m-2 .666a2 2 0 1 1 4 0 2 2 0 0 1-4 0'/></g><defs><clipPath id='a'><path d='M0 0h16v16H0z'/></clipPath></defs></svg>"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pine-ds/icons/icons",
3
- "version": "7.0.1",
3
+ "version": "7.2.0",
4
4
  "module": "index.mjs",
5
5
  "main": "index.js",
6
6
  "typings": "index.d.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pine-ds/icons",
3
- "version": "7.1.0",
3
+ "version": "7.3.0",
4
4
  "license": "MIT",
5
5
  "description": "Pine Icon Library",
6
6
  "author": " Kajabi Design System Services",
@@ -1,2 +0,0 @@
1
- import{r as t,h as i,H as s,g as e}from"./p-152ef3bc.js";import{i as n,b as r,g as o,c}from"./p-fb6974fd.js";const l=t=>{const i=document.createElement("div");i.innerHTML=t;for(let t=i.childNodes.length-1;t>=0;t--){if(i.childNodes[t].nodeName.toLowerCase()!=="svg"){i.removeChild(i.childNodes[t])}}const s=i.firstElementChild;if(s&&s.nodeName.toLowerCase()==="svg"){const t=s.getAttribute("class")||"";s.setAttribute("class",(t+" s-pds-icon").trim());if(a(s)){return i.innerHTML}}return""};const a=t=>{if(t.nodeType===1){if(t.nodeName.toLowerCase()==="script"){return false}for(let i=0;i<t.attributes.length;i++){const s=t.attributes[i].name;if(n(s)&&s.toLowerCase().indexOf("on")===0){return false}}for(let i=0;i<t.childNodes.length;i++){if(!a(t.childNodes[i])){return false}}}return true};const d=t=>t.startsWith("data:image/svg+xml");const f=t=>t.indexOf(";utf8,")!==-1;const h=new Map;const u=new Map;let p;const g=(t,i=false)=>{let s=u.get(t);if(!s){if(typeof fetch!="undefined"&&typeof document!=="undefined"){if(d(t)&&f(t)){if(!p){p=new DOMParser}const i=p.parseFromString(t,"text/html");const s=i.querySelector("svg");if(s){h.set(t,s.outerHTML)}return Promise.resolve()}else{s=fetch(t).then((s=>{if(s.ok){return s.text().then((s=>{if(s&&i!==false){s=l(s)}h.set(t,s||"")}))}h.set(t,"")}));u.set(t,s)}}else{h.set(t,"");return Promise.resolve()}}return s};const m=":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 b=m;const w=class{constructor(i){t(this,i);this.inheritedAttributes={};this.hasAriaHidden=()=>{const{el:t}=this;return t.hasAttribute("aria-hidden")&&t.getAttribute("aria-hidden")==="true"};this.ariaLabel=undefined;this.isVisible=false;this.svgContent=undefined;this.color=undefined;this.icon=undefined;this.name=undefined;this.size="regular";this.src=undefined}iconSize(){const t={small:"12px",regular:"16px",medium:"20px",large:"24px"};if(t[this.size]){return t[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 t=o(this);if(t){if(h.has(t)){this.svgContent=h.get(t)}else{g(t).then((()=>this.svgContent=h.get(t)))}}}const t=c(this.name,this.icon);if(t){this.ariaLabel=t.replace(/\-/g," ")}}render(){const{ariaLabel:t,inheritedAttributes:e}=this;const n={height:this.iconSize(),width:this.iconSize(),color:this.color};return i(s,Object.assign({key:"450a12ddbe225916752aeb9323ff1a11d11bc4b3","aria-label":t!==undefined&&!this.hasAriaHidden()?t:null,role:"img",style:n,class:Object.assign({},v(this.color))},e),this.svgContent?i("div",{class:"icon-inner",innerHTML:this.svgContent}):i("div",{class:"icon-inner"}))}waitUntilVisible(t,i,s){if(typeof window!=="undefined"&&window.IntersectionObserver){const e=this.io=new window.IntersectionObserver((t=>{if(t[0].isIntersecting){e.disconnect();this.io=undefined;s()}}),{rootMargin:i});e.observe(t)}else{s()}}static get assetsDirs(){return["svg"]}get el(){return e(this)}static get watchers(){return{name:["loadIcon"],src:["loadIcon"],icon:["loadIcon"]}}};const v=t=>t?{"pds-color":true,[`pds-color-${t}`]:true}:null;w.style=b;export{w as pds_icon};
2
- //# sourceMappingURL=p-9bdf8fd3.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","isSvgDataUrl","url","startsWith","isEncodedDataUrl","pdsIconContent","Map","requests","parser","getSvgContent","sanitize","req","get","fetch","DOMParser","doc","parseFromString","svg","querySelector","set","outerHTML","Promise","resolve","then","rsp","ok","text","pdsIconCss","PdsIconStyle0","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","icon","ariaLabel","replace","render","style","height","width","color","h","Host","Object","assign","key","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-pds-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\nexport const isSvgDataUrl = (url: string) => url.startsWith('data:image/svg+xml');\nexport const isEncodedDataUrl = (url: string) => url.indexOf(';utf8,') !== -1;\n","import { isEncodedDataUrl, isSvgDataUrl, 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\nlet parser: DOMParser;\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 if (isSvgDataUrl(url) && isEncodedDataUrl(url)) {\n if (!parser) {\n parser = new DOMParser();\n }\n\n const doc = parser.parseFromString(url, 'text/html');\n const svg = doc.querySelector('svg');\n\n if (svg) {\n pdsIconContent.set(url, svg.outerHTML);\n }\n\n return Promise.resolve();\n } else {\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 }\n } else {\n pdsIconContent.set(url, '');\n return Promise.resolve();\n }\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 * This a combination of both `name` and `src`. If a `src` url is detected\n * it will set the `src` property. Otherwise it assumes it's a built-in named\n * SVG and set the `name` property.\n */\n @Prop() icon?: any;\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 /**\n *\n * Specifies the exact `src` of an SVG file to use.\n */\n @Prop() src?: string;\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 @Watch('src')\n @Watch('icon')\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, this.icon);\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,M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