@pine-ds/icons 7.0.1 → 7.2.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 (44) hide show
  1. package/components/pds-icon.js +1 -1
  2. package/components/pds-icon.js.map +1 -1
  3. package/dist/cheatsheet.html +13 -7
  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/course-filled.svg +1 -0
  10. package/dist/collection/components/pds-icon/svg/hd-video.svg +1 -1
  11. package/dist/collection/components/pds-icon/svg/mail.svg +1 -1
  12. package/dist/collection/components/pds-icon/svg/one-off-session.svg +1 -1
  13. package/dist/collection/components/pds-icon/svg/users-filled.svg +1 -0
  14. package/dist/collection/components/pds-icon/test/pds-icon.e2e.js +1 -1
  15. package/dist/collection/components/pds-icon/test/pds-icon.e2e.js.map +1 -1
  16. package/dist/collection/components/pds-icon/test/pds-icon.spec.js +4 -4
  17. package/dist/collection/components/pds-icon/test/pds-icon.spec.js.map +1 -1
  18. package/dist/docs.json +1 -1
  19. package/dist/esm/pds-icon.entry.js +1 -1
  20. package/dist/esm/pds-icon.entry.js.map +1 -1
  21. package/dist/pds-icons/p-20b3c799.entry.js +2 -0
  22. package/dist/pds-icons/p-20b3c799.entry.js.map +1 -0
  23. package/dist/pds-icons/pds-icons.esm.js +1 -1
  24. package/dist/pds-icons/svg/bulb.svg +1 -0
  25. package/dist/pds-icons/svg/course-filled.svg +1 -0
  26. package/dist/pds-icons/svg/hd-video.svg +1 -1
  27. package/dist/pds-icons/svg/mail.svg +1 -1
  28. package/dist/pds-icons/svg/one-off-session.svg +1 -1
  29. package/dist/pds-icons/svg/users-filled.svg +1 -0
  30. package/dist/pds-icons.json +67 -1
  31. package/dist/pds-icons.symbols.svg +7 -4
  32. package/dist/svg/bulb.svg +1 -0
  33. package/dist/svg/course-filled.svg +1 -0
  34. package/dist/svg/hd-video.svg +1 -1
  35. package/dist/svg/mail.svg +1 -1
  36. package/dist/svg/one-off-session.svg +1 -1
  37. package/dist/svg/users-filled.svg +1 -0
  38. package/icons/index.d.ts +4 -1
  39. package/icons/index.js +7 -4
  40. package/icons/index.mjs +7 -4
  41. package/icons/package.json +1 -1
  42. package/package.json +1 -1
  43. package/dist/pds-icons/p-9bdf8fd3.entry.js +0 -2
  44. 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,CAAk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,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":["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,C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,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":["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.0 Cheatsheet</title>
5
+ <title>Pine icons 7.1.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.0 Cheatsheet</h1>
37
- <h3>303 icons</h3>
36
+ <h1>Pine Icons 7.1.0 Cheatsheet</h1>
37
+ <h3>306 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>
@@ -124,6 +125,7 @@
124
125
  <a href="./svg/copy.svg"><svg><use href="#copy" xlink:href="#copy"/></svg></a>
125
126
  <a href="./svg/coupon.svg"><svg><use href="#coupon" xlink:href="#coupon"/></svg></a>
126
127
  <a href="./svg/course.svg"><svg><use href="#course" xlink:href="#course"/></svg></a>
128
+ <a href="./svg/course-filled.svg"><svg><use href="#course-filled" xlink:href="#course-filled"/></svg></a>
127
129
  <a href="./svg/creator-studio.svg"><svg><use href="#creator-studio" xlink:href="#creator-studio"/></svg></a>
128
130
  <a href="./svg/creator-studio-filled.svg"><svg><use href="#creator-studio-filled" xlink:href="#creator-studio-filled"/></svg></a>
129
131
  <a href="./svg/cursor.svg"><svg><use href="#cursor" xlink:href="#cursor"/></svg></a>
@@ -332,6 +334,7 @@
332
334
  <a href="./svg/user-star-filled.svg"><svg><use href="#user-star-filled" xlink:href="#user-star-filled"/></svg></a>
333
335
  <a href="./svg/users.svg"><svg><use href="#users" xlink:href="#users"/></svg></a>
334
336
  <a href="./svg/users-alt.svg"><svg><use href="#users-alt" xlink:href="#users-alt"/></svg></a>
337
+ <a href="./svg/users-filled.svg"><svg><use href="#users-filled" xlink:href="#users-filled"/></svg></a>
335
338
  <a href="./svg/video-off.svg"><svg><use href="#video-off" xlink:href="#video-off"/></svg></a>
336
339
  <a href="./svg/video-on.svg"><svg><use href="#video-on" xlink:href="#video-on"/></svg></a>
337
340
  <a href="./svg/warning.svg"><svg><use href="#warning" xlink:href="#warning"/></svg></a>
@@ -339,7 +342,7 @@
339
342
  <a href="./svg/window-paragraph.svg"><svg><use href="#window-paragraph" xlink:href="#window-paragraph"/></svg></a>
340
343
  <a href="./svg/world.svg"><svg><use href="#world" xlink:href="#world"/></svg></a>
341
344
  <a href="./svg/wrench.svg"><svg><use href="#wrench" xlink:href="#wrench"/></svg></a>
342
- <svg data-pdsicons="7.0.0" style="display:none">
345
+ <svg data-pdsicons="7.1.0" style="display:none">
343
346
  <style>
344
347
  .pdsicon {
345
348
  fill: currentColor;
@@ -384,6 +387,7 @@
384
387
  <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>
385
388
  <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>
386
389
  <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>
390
+ <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>
387
391
  <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>
388
392
  <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>
389
393
  <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>
@@ -439,6 +443,7 @@
439
443
  <symbol id="copy" viewBox="0 0 16 16" class="pdsicon"><g fill-rule="evenodd" clip-path="url(#a)"><path d="M10 5.333c0-.368.299-.666.667-.666h4c.368 0 .666.298.666.666v9.334a.667.667 0 0 1-.666.666H5.333a.667.667 0 0 1-.666-.666v-4a.667.667 0 1 1 1.333 0V14h8V6h-3.333A.667.667 0 0 1 10 5.333"/><path d="M.667 1.333c0-.368.298-.666.666-.666h9.334c.368 0 .666.298.666.666v9.334a.667.667 0 0 1-.666.666H1.333a.667.667 0 0 1-.666-.666zM2 2v8h8V2z"/></g><defs><clipPath id="a"><path d="M0 0h16v16H0z"/></clipPath></defs></symbol>
440
444
  <symbol id="coupon" viewBox="0 0 16 16" class="pdsicon"><path fill-rule="evenodd" d="M.667 2A.667.667 0 0 0 0 2.667V6c0 .368.298.667.667.667C1.432 6.667 2 7.235 2 8S1.432 9.333.667 9.333A.667.667 0 0 0 0 10v3.333c0 .368.298.667.667.667h14.666a.667.667 0 0 0 .667-.667V10a.667.667 0 0 0-.667-.667C14.568 9.333 14 8.765 14 8s.568-1.333 1.333-1.333A.667.667 0 0 0 16 6V2.667A.667.667 0 0 0 15.333 2zm.666 3.413v-2.08h13.334v2.08c-1.166.287-2 1.317-2 2.587s.834 2.3 2 2.587v2.08H1.333v-2.08c1.166-.287 2-1.317 2-2.587s-.834-2.3-2-2.587m9.138 1.058a.667.667 0 1 0-.942-.942l-4 4a.667.667 0 1 0 .942.942zm-4.138.196a1 1 0 1 0 0-2 1 1 0 0 0 0 2m4.334 3.666a1 1 0 1 1-2 0 1 1 0 0 1 2 0"/></symbol>
441
445
  <symbol id="course" viewBox="0 0 16 16" class="pdsicon"><g clip-path="url(#a)"><path fill-rule="evenodd" d="M.667.667A.667.667 0 0 0 0 1.333v13.334c0 .368.298.666.667.666h14.666a.667.667 0 0 0 .667-.666V1.333a.667.667 0 0 0-.667-.666H.667M3.333 2h-2v1.333h2zm1.334 1.333V2h10v1.333zM1.333 4.667h13.334V14H1.333zm1.334 2.666c0-.368.298-.666.666-.666h4c.369 0 .667.298.667.666v4a.667.667 0 0 1-.667.667h-4a.667.667 0 0 1-.666-.667zM4 8v2.667h2.667V8zm6-1.333A.667.667 0 1 0 10 8h2.667a.667.667 0 1 0 0-1.333zM9.333 10c0-.368.299-.667.667-.667h1.333a.667.667 0 1 1 0 1.334H10A.667.667 0 0 1 9.333 10"/></g><defs><clipPath id="a"><path d="M0 0h16v16H0z"/></clipPath></defs></symbol>
446
+ <symbol id="course-filled" viewBox="0 0 16 16" class="pdsicon"><path fill-rule="evenodd" d="M.67.67h14.66a.67.67 0 0 1 .67.66v13.34a.67.67 0 0 1-.67.66H.67a.67.67 0 0 1-.67-.66V1.33A.67.67 0 0 1 .67.67M3.33 2h-2v1.33h2zm4.474 9.804A.67.67 0 0 0 8 11.33v-4a.67.67 0 0 0-.67-.66h-4a.67.67 0 0 0-.66.66v4a.67.67 0 0 0 .66.67h4a.67.67 0 0 0 .474-.196M10 10.67h1.33a.67.67 0 0 0 0-1.34H10a.67.67 0 1 0 0 1.34M10 8h2.67a.67.67 0 0 0 0-1.33H10A.67.67 0 1 0 10 8M4.67 3.33h10V2h-10zM4 8h2.67v2.67H4z"/></symbol>
442
447
  <symbol id="creator-studio" viewBox="0 0 16 16" class="pdsicon"><g clip-path="url(#a)"><path fill-rule="evenodd" d="M4.7 2.7c-.4 0-.7.3-.7.6V10c0 .4.3.7.7.7H14c.4 0 .7-.3.7-.7V3.3c0-.4-.3-.7-.7-.7H4.7zm-2 .6c0-1.1.9-2 2-2H14c1.1 0 2 .9 2 2V10c0 1.1-.9 2-2 2H4.7c-1.1 0-2-.9-2-2zM.7 4c.3 0 .6.3.6.7v8c0 .146.054.24.122.357q.037.064.078.143c.1.1.3.2.5.2h10.7c.4 0 .7.3.7.7s-.3.7-.7.7H2c-.5 0-1-.2-1.4-.6q-.6-.75-.6-1.5v-8c0-.4.3-.7.7-.7m7.6.1q-.3-.15-.6 0c-.2.1-.4.3-.4.6v4c0 .2.2.4.4.6.2.1.5.1.7 0l3.3-2c.2-.1.3-.4.3-.6 0-.3-.1-.5-.4-.6zm.4 3.3V5.8l1.3.9z"/></g><defs><clipPath id="a"><path d="M0 0h16v16H0z"/></clipPath></defs></symbol>
443
448
  <symbol id="creator-studio-filled" viewBox="0 0 16 16" class="pdsicon"><g clip-path="url(#a)"><path fill-rule="evenodd" d="M4.7 1.3H14c1.1 0 2 .9 2 2V10c0 1.1-.9 2-2 2H4.7c-1.1 0-2-.9-2-2V3.3c0-1.1.9-2 2-2m3.7 7.9 3.3-2c.2-.1.3-.3.3-.5 0-.3-.1-.5-.4-.6l-3.3-2c-.2-.1-.4-.1-.7 0-.2.1-.3.4-.3.6v4c0 .2.2.4.4.5s.5.1.7 0M1.3 4.7c0-.4-.3-.7-.6-.7-.4 0-.7.3-.7.7v8q0 .75.6 1.5c.4.4.9.6 1.4.6h10.7c.4 0 .7-.3.7-.7s-.3-.7-.7-.7H2c-.2 0-.4-.1-.5-.2q-.041-.08-.078-.143c-.068-.118-.122-.21-.122-.357z"/></g><defs><clipPath id="a"><path d="M0 0h16v16H0z"/></clipPath></defs></symbol>
444
449
  <symbol id="cursor" viewBox="0 0 16 16" class="pdsicon"><g clip-path="url(#a)"><path fill-rule="evenodd" d="M15.46 4.65.5.5l4.15 15 2.36-5.55 5.11 5.11 2.94-2.94-5.11-5.11zm-2.28 7.47-1.06 1.06-5.56-5.56-1.64 3.83-2.51-9 9 2.51-3.79 1.6z"/></g><defs><clipPath id="a"><path d="M0 0h16v16H0z"/></clipPath></defs></symbol>
@@ -490,7 +495,7 @@
490
495
  <symbol id="handle-2" viewBox="0 0 16 16" class="pdsicon"><path fill-rule="evenodd" d="M1.6 7.2a1.6 1.6 0 1 0 0-3.2 1.6 1.6 0 0 0 0 3.2m0 5.333a1.6 1.6 0 1 0 0-3.2 1.6 1.6 0 0 0 0 3.2m6.4 0a1.6 1.6 0 1 0 0-3.2 1.6 1.6 0 0 0 0 3.2m8-1.6a1.6 1.6 0 1 1-3.2 0 1.6 1.6 0 0 1 3.2 0M9.6 5.6a1.6 1.6 0 1 1-3.2 0 1.6 1.6 0 0 1 3.2 0m4.8 1.6a1.6 1.6 0 1 0 0-3.2 1.6 1.6 0 0 0 0 3.2"/></symbol>
491
496
  <symbol id="handle-2-vertical" viewBox="0 0 16 16" class="pdsicon"><g clip-path="url(#a)"><path fill-rule="evenodd" d="M10.933 0a1.6 1.6 0 1 1 0 3.2 1.6 1.6 0 0 1 0-3.2m1.6 8a1.6 1.6 0 1 0-3.2 0 1.6 1.6 0 0 0 3.2 0m0 6.4a1.6 1.6 0 1 0-3.2 0 1.6 1.6 0 0 0 3.2 0m-5.333 0a1.6 1.6 0 1 0-3.2 0 1.6 1.6 0 0 0 3.2 0m-1.6-8a1.6 1.6 0 1 1 0 3.2 1.6 1.6 0 0 1 0-3.2m1.6-4.8a1.6 1.6 0 1 0-3.2 0 1.6 1.6 0 0 0 3.2 0"/></g><defs><clipPath id="a"><path d="M0 0h16v16H0z"/></clipPath></defs></symbol>
492
497
  <symbol id="hashtag" viewBox="0 0 16 16" class="pdsicon"><path fill-rule="evenodd" d="M7.326 1.432a.667.667 0 0 0-1.319-.198l-.514 3.433h-2.16a.667.667 0 0 0 0 1.333h1.96l-.6 4H2.667a.667.667 0 0 0 0 1.333h1.826l-.486 3.235a.667.667 0 0 0 1.319.198l.515-3.433h3.318l-.485 3.235a.667.667 0 0 0 1.319.198l.515-3.433h2.159a.667.667 0 1 0 0-1.333h-1.96l.6-4h2.026a.667.667 0 1 0 0-1.333h-1.825l.485-3.235a.667.667 0 1 0-1.319-.198l-.515 3.433H6.841zM9.359 10l.6-4H6.641l-.6 4z"/></symbol>
493
- <symbol id="hd-video" viewBox="0 0 16 16" class="pdsicon"><g clip-path="url(#a)"><path fill-rule="evenodd" d="M1.32 1.856h13.36c.73 0 1.32.593 1.32 1.324v9.64c0 .731-.59 1.324-1.32 1.324H1.32c-.73 0-1.32-.593-1.32-1.324V3.18c0-.731.59-1.324 1.32-1.324m.284 10.68h12.792V3.464H1.604zM8.94 5.37l.014-.001.024-.001.609-.002c.472-.002.945-.005 1.417.006.636.014 1.218.206 1.702.638.353.315.583.71.699 1.166.176.691.16 1.376-.12 2.038-.3.71-.845 1.143-1.578 1.348a3 3 0 0 1-.782.107l-1.406.001H8.94zm1.357 4.183q.197.001.39-.002l.074-.002c.133-.003.267-.006.397-.03.518-.097.875-.392 1.037-.902.103-.326.11-.66.048-.995-.125-.692-.629-1.097-1.31-1.132a9 9 0 0 0-.53-.007h-.23l-.034.004-.017.003v3.062zm-6.337 1.114H2.78V5.375h1.179V7.44h2.108V5.374h1.186v5.293H6.07v-2.1H3.96z"/></g><defs><clipPath id="a"><path d="M0 0h16v16H0z"/></clipPath></defs></symbol>
498
+ <symbol id="hd-video" viewBox="0 0 16 16" class="pdsicon"><path fill-rule="evenodd" d="M1.32 1.856h13.36c.73 0 1.32.593 1.32 1.324v9.64c0 .731-.59 1.324-1.32 1.324H1.32c-.73 0-1.32-.593-1.32-1.324V3.18c0-.731.59-1.324 1.32-1.324m.284 10.68h12.792V3.464H1.604zM8.94 5.37l.014-.001.024-.001.609-.002c.472-.002.945-.005 1.417.006.636.014 1.218.206 1.702.638.353.315.583.71.699 1.166.176.691.16 1.376-.12 2.038-.3.71-.845 1.143-1.578 1.348a3 3 0 0 1-.782.107l-1.406.001H8.94zm1.357 4.183q.197.001.39-.002l.074-.002c.133-.003.267-.006.397-.03.518-.097.875-.392 1.037-.902.103-.326.11-.66.048-.995-.125-.692-.629-1.097-1.31-1.132a9 9 0 0 0-.53-.007h-.23l-.034.004-.017.003v3.062zm-6.337 1.114H2.78V5.375h1.179V7.44h2.108V5.374h1.186v5.293H6.07v-2.1H3.96z"/></symbol>
494
499
  <symbol id="heading-1" viewBox="0 0 16 16" class="pdsicon"><path fill-rule="evenodd" d="M7.5 3.5c0-.3.2-.5.5-.5s.5.2.5.5v9c0 .3-.2.5-.5.5s-.5-.2-.5-.5v-4h-5v4c0 .3-.2.5-.5.5s-.5-.2-.5-.5v-9c0-.3.2-.5.5-.5s.5.2.5.5v4h5zm6.2-.4c.1-.1.3-.1.5 0 .2 0 .3.2.2.5v9c0 .3-.2.5-.5.5s-.5-.2-.5-.5V4.5l-2 1.3c-.2.1-.6 0-.7-.2s0-.6.2-.7z"/></symbol>
495
500
  <symbol id="heading-2" viewBox="0 0 16 16" class="pdsicon"><path fill-rule="evenodd" d="M11.1 12.007h4.4c.3 0 .5.2.5.5s-.2.5-.5.5H10c-.2 0-.4-.1-.5-.4-.1-.1 0-.4.1-.5.512-.555.988-1.055 1.411-1.5.57-.599 1.045-1.099 1.389-1.5l.3-.3.212-.23c1.081-1.167 1.788-1.93 1.788-2.87 0-.4-.1-.6-.2-.8-.3-.6-1-.9-1.8-1-1 0-2 .7-2.2 1.7-.1.3-.3.5-.6.4-.3 0-.5-.3-.4-.6.4-1.5 1.8-2.5 3.3-2.4 1.2.1 2.1.6 2.6 1.5.2.4.3.8.3 1.3 0 1.34-.825 2.222-2.123 3.61l-.177.19-.3.3c-.5.5-1.2 1.2-2 2.1M6 3.507c0-.3.2-.5.5-.5s.5.2.5.5v9c0 .3-.2.5-.5.5s-.5-.2-.5-.5v-4H1v4c0 .3-.2.5-.5.5s-.5-.2-.5-.5v-9c0-.3.2-.5.5-.5s.5.2.5.5v4h5z"/></symbol>
496
501
  <symbol id="heading-3" viewBox="0 0 16 16" class="pdsicon"><path fill-rule="evenodd" d="M6 3.5c0-.3.2-.5.5-.5s.5.2.5.5v9c0 .3-.2.5-.5.5s-.5-.2-.5-.5v-4H1v4c0 .3-.2.5-.5.5s-.5-.2-.5-.5v-9c0-.3.2-.5.5-.5s.5.2.5.5v4h5zm9.2 3.7c-.2.3-.6.6-1 .8.256.128.472.298.672.455q.168.135.328.245c.5.5.8 1.1.8 1.7 0 1.4-1.4 2.5-3 2.5-1.3 0-2.4-.6-2.9-1.7-.1-.3 0-.6.2-.7.3-.1.6 0 .7.2.3.8 1.1 1.2 2 1.2 1.2 0 2-.8 2-1.5 0-.3-.2-.7-.5-1-.6-.5-1.5-.9-2.5-.9-.3 0-.5-.2-.5-.5s.2-.5.5-.5c1 0 1.9-.4 2.5-1 .3-.3.5-.7.5-1 0-.7-.8-1.5-2-1.5-.9 0-1.7.5-2 1.2-.2.2-.5.3-.7.2-.3-.1-.4-.4-.2-.7.5-1 1.6-1.7 2.9-1.7 1.6 0 3 1.2 3 2.5 0 .6-.3 1.2-.8 1.7"/></symbol>
@@ -537,7 +542,7 @@
537
542
  <symbol id="logo-twitter-x" viewBox="0 0 16 16" class="pdsicon"><g clip-path="url(#a)"><path fill-rule="evenodd" d="m10.63 15.333-3.7-5.273-4.63 5.273H.34l5.722-6.512L.34.667h5.03l3.488 4.97 4.368-4.97h1.96L9.73 6.877l5.931 8.456zm2.182-1.486h-1.319L3.146 2.153h1.319l3.343 4.682.578.813z"/></g><defs><clipPath id="a"><path d="M0 0h16v16H0z"/></clipPath></defs></symbol>
538
543
  <symbol id="logo-youtube" viewBox="0 0 16 16" class="pdsicon"><path d="M15.867 4.8s-.134-1.133-.667-1.6c-.6-.667-1.267-.667-1.6-.667C11.333 2.4 8 2.4 8 2.4s-3.333 0-5.6.133C2.067 2.6 1.4 2.6.8 3.2.333 3.667.133 4.8.133 4.8S0 6.067 0 7.4v1.2c0 1.267.133 2.6.133 2.6s.134 1.133.667 1.6c.6.667 1.4.6 1.733.667C3.8 13.6 8 13.6 8 13.6s3.333 0 5.6-.2c.333-.067 1-.067 1.6-.667.467-.466.667-1.6.667-1.6S16 9.867 16 8.533v-1.2c0-1.266-.133-2.533-.133-2.533m-9.534 5.267V5.6l4.334 2.267z"/></symbol>
539
544
  <symbol id="loop" viewBox="0 0 16 16" class="pdsicon"><g clip-path="url(#a)"><path d="M15.133 3.533c.134.134.2.267.2.467s-.066.333-.2.467l-2.666 2.666a.644.644 0 0 1-.934 0 .644.644 0 0 1 0-.933l1.534-1.533H2V8c0 .4-.267.667-.667.667S.667 8.4.667 8V4c0-.4.266-.667.666-.667h11.734L11.533 1.8a.644.644 0 0 1 0-.933.644.644 0 0 1 .934 0zM14 8c0-.4.267-.667.667-.667s.666.267.666.667v4c0 .4-.266.667-.666.667H2.933L4.467 14.2a.644.644 0 0 1 0 .933.644.644 0 0 1-.934 0L.867 12.467c-.067-.067-.134-.134-.134-.2-.066-.067-.066-.2-.066-.267s0-.2.066-.267c0-.066.067-.133.134-.2l2.666-2.666a.644.644 0 0 1 .934 0 .644.644 0 0 1 0 .933l-1.534 1.533H14z"/></g><defs><clipPath id="a"><path d="M0 0h16v16H0z"/></clipPath></defs></symbol>
540
- <symbol id="mail" viewBox="0 0 16 16" class="pdsicon"><g clip-path="url(#a)"><path fill-rule="evenodd" d="M.624 1.882c.358-.34.843-.549 1.376-.549h12a2 2 0 0 1 2 2v9.334a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V3.333a2 2 0 0 1 .624-1.45m.71 1.625v9.16c0 .368.298.666.666.666h12a.667.667 0 0 0 .667-.666v-9.16L8.448 9.16a.667.667 0 0 1-.896 0zm12.275-.84H2.39L8 7.766z"/></g><defs><clipPath id="a"><path d="M0 0h16v16H0z"/></clipPath></defs></symbol>
545
+ <symbol id="mail" viewBox="0 0 16 16" class="pdsicon"><path fill-rule="evenodd" d="M.624 1.882c.358-.34.843-.549 1.376-.549h12a2 2 0 0 1 2 2v9.334a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V3.333a2 2 0 0 1 .624-1.45m.71 1.625v9.16c0 .368.298.666.666.666h12a.667.667 0 0 0 .667-.666v-9.16L8.448 9.16a.667.667 0 0 1-.896 0zm12.275-.84H2.39L8 7.766z"/></symbol>
541
546
  <symbol id="mail-filled" viewBox="0 0 16 16" class="pdsicon"><g clip-path="url(#a)"><path d="M14 1.333H2a2 2 0 0 0-2 2v9.334a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V3.333a2 2 0 0 0-2-2m-.2 3.2L8.467 9.2q-.22.113-.467.133a1.2 1.2 0 0 1-.467-.133L2.2 4.533a.662.662 0 1 1 .867-1L7.933 7.8 12.8 3.533a.65.65 0 0 1 .933.067.6.6 0 0 1 .067.933"/></g><defs><clipPath id="a"><path d="M0 0h16v16H0z"/></clipPath></defs></symbol>
542
547
  <symbol id="mail-open" viewBox="0 0 16 16" class="pdsicon"><g clip-path="url(#a)"><path fill-rule="evenodd" d="M8 0 .08 5.76V14a2 2 0 0 0 2 2h11.86a2 2 0 0 0 2-2V5.76zm0 1.63 6.14 4.47L8 10.56 1.86 6.1zm5.94 13.05H2.06A.66.66 0 0 1 1.4 14V7.39L8 12.2l6.6-4.81V14a.66.66 0 0 1-.66.68"/></g><defs><clipPath id="a"><path d="M0 0h16v16H0z"/></clipPath></defs></symbol>
543
548
  <symbol id="map" viewBox="0 0 16 16" class="pdsicon"><g clip-path="url(#a)"><path fill-rule="evenodd" d="M16 14.174V.8l-5.973 1.493-4-1.333L0 2.467V15.84l5.973-1.493 4 1.333zm-14.667-.04V3.507l4-1v10.625zm5.333-.96V2.578l2.667.889v10.594zm4 .96V3.508l4-1v10.625z"/></g><defs><clipPath id="a"><path d="M0 0h16v16H0z"/></clipPath></defs></symbol>
@@ -563,7 +568,7 @@
563
568
  <symbol id="multi-pay" viewBox="0 0 16 16" class="pdsicon"><g fill-rule="evenodd" clip-path="url(#a)"><path d="M0 4.667C0 4.298.298 4 .667 4h14.666c.368 0 .667.298.667.667v10.666a.667.667 0 0 1-.667.667H.667A.667.667 0 0 1 0 15.333zm1.333.666v9.334h13.334V5.333z"/><path d="M8 8.667a1.333 1.333 0 1 0 0 2.667 1.333 1.333 0 0 0 0-2.667M5.334 10a2.667 2.667 0 1 1 5.333 0 2.667 2.667 0 0 1-5.333 0M2 2.667C2 2.298 2.298 2 2.667 2h10.666a.667.667 0 1 1 0 1.333H2.667A.667.667 0 0 1 2 2.667M4.667.667c0-.369.298-.667.666-.667h5.333a.667.667 0 1 1 0 1.333H5.333a.667.667 0 0 1-.667-.666"/></g><defs><clipPath id="a"><path d="M0 0h16v16H0z"/></clipPath></defs></symbol>
564
569
  <symbol id="newsletter" viewBox="0 0 16 16" class="pdsicon"><g clip-path="url(#a)"><path fill-rule="evenodd" d="M13.333 0H2.667v5.06L0 6.993V16h16V6.993L13.333 5.06zM12 8.392l-4 2.182-4-2.182V1.333h8zm2.667.064-5.275 2.877 5.275 2.877zm-13.334 6.21v-6.21l11.386 6.21zm4-11.333h5.334v1.334H5.333zM10.667 6H5.333v1.333h5.334z"/></g><defs><clipPath id="a"><path d="M0 0h16v16H0z"/></clipPath></defs></symbol>
565
570
  <symbol id="newsletter-2" viewBox="0 0 16 16" class="pdsicon"><g clip-path="url(#a)"><path fill-rule="evenodd" d="M2.67 14V0H16v14a2 2 0 0 1-2 2H2a2 2 0 0 1-1.41-.59A2 2 0 0 1 0 14V8h2v1.33h-.67V14a.63.63 0 0 0 .2.47.65.65 0 0 0 .94 0 .63.63 0 0 0 .2-.47m11.8.47a.68.68 0 0 0 .2-.47V1.33H4V14c0 .229-.04.456-.12.67H14a.68.68 0 0 0 .47-.2M13.33 3.33h-8v4h8zM12 6H6.67V4.67H12zM5.33 8.67h8V10h-8zm0 2.66h8v1.33h-8z"/></g><defs><clipPath id="a"><path d="M0 0h16v16H0z"/></clipPath></defs></symbol>
566
- <symbol id="one-off-session" viewBox="0 0 16 16" class="pdsicon"><g clip-path="url(#a)"><path fill-rule="evenodd" d="M.667 1.333a.667.667 0 1 0 0 1.334h14.666a.667.667 0 1 0 0-1.334zM0 4.667C0 4.298.298 4 .667 4h14.666c.368 0 .667.298.667.667v6.666a.667.667 0 0 1-.667.667H.667A.667.667 0 0 1 0 11.333zm1.333.666v5.334h13.334V5.333zM0 14c0-.368.298-.667.667-.667h14.666a.667.667 0 0 1 0 1.334H.667A.667.667 0 0 1 0 14"/></g><defs><clipPath id="a"><path d="M0 0h16v16H0z"/></clipPath></defs></symbol>
571
+ <symbol id="one-off-session" viewBox="0 0 16 16" class="pdsicon"><path fill-rule="evenodd" d="M.667 1.333a.667.667 0 1 0 0 1.334h14.666a.667.667 0 1 0 0-1.334zM0 4.667C0 4.298.298 4 .667 4h14.666c.368 0 .667.298.667.667v6.666a.667.667 0 0 1-.667.667H.667A.667.667 0 0 1 0 11.333zm1.333.666v5.334h13.334V5.333zM0 14c0-.368.298-.667.667-.667h14.666a.667.667 0 0 1 0 1.334H.667A.667.667 0 0 1 0 14"/></symbol>
567
572
  <symbol id="one-time" viewBox="0 0 16 16" class="pdsicon"><path fill-rule="evenodd" d="M0 2.667C0 2.298.298 2 .667 2h14.666c.368 0 .667.298.667.667v10.666a.667.667 0 0 1-.667.667H.667A.667.667 0 0 1 0 13.333zm1.333.666v9.334h13.334V3.333z"/><path fill-rule="evenodd" d="M8 6.667a1.333 1.333 0 1 0 0 2.666 1.333 1.333 0 0 0 0-2.666M5.334 8a2.667 2.667 0 1 1 5.333 0 2.667 2.667 0 0 1-5.333 0"/></symbol>
568
573
  <symbol id="packages" viewBox="0 0 16 16" class="pdsicon"><path fill-rule="evenodd" d="M5.333 0a.667.667 0 0 0 0 1.333h5.334a.667.667 0 1 0 0-1.333zM2.667 3.333c0-.368.298-.666.666-.666h9.334a.667.667 0 1 1 0 1.333H3.333a.667.667 0 0 1-.666-.667M1.333 6c0-.368.299-.667.667-.667h12c.368 0 .667.299.667.667v9.333A.667.667 0 0 1 14 16H2a.667.667 0 0 1-.667-.667zm1.334.667v8h10.666v-8z"/></symbol>
569
574
  <symbol id="pause" viewBox="0 0 16 16" class="pdsicon"><g clip-path="url(#a)"><path d="M4.667.667H1.333a.667.667 0 0 0-.666.666v13.334a.667.667 0 0 0 .666.666h3.334a.667.667 0 0 0 .666-.666V1.333a.667.667 0 0 0-.666-.666M14.667.667h-3.334a.667.667 0 0 0-.666.666v13.334a.667.667 0 0 0 .666.666h3.334a.667.667 0 0 0 .666-.666V1.333a.667.667 0 0 0-.666-.666"/></g><defs><clipPath id="a"><path d="M0 0h16v16H0z"/></clipPath></defs></symbol>
@@ -647,6 +652,7 @@
647
652
  <symbol id="user-star-filled" viewBox="0 0 16 16" class="pdsicon"><path fill-rule="evenodd" d="M6 8.496c-1.84 0-3.333-2.159-3.333-4V3.83a3.334 3.334 0 0 1 6.666 0v.666c0 1.841-1.492 4-3.333 4m2 4c0-.878.247-1.696.668-2.397A14 14 0 0 0 6 9.829c-1.883 0-3.553.426-4.65.796A1.99 1.99 0 0 0 0 12.518v2.645h8.84A4.64 4.64 0 0 1 8 12.496m5.697-1.246-1.03-2.087-1.03 2.087-2.304.335L11 13.21l-.393 2.294 2.06-1.084 2.06 1.084-.394-2.294L16 11.585z"/></symbol>
648
653
  <symbol id="users" viewBox="0 0 16 16" class="pdsicon"><path d="M15.388 14.715H12.71c-.4 0-.668-.267-.668-.669 0-.401.267-.669.668-.669h2.008V11.17l-2.476-1.003c-.267-.067-.468-.268-.602-.468-.134-.201-.2-.469-.2-.736V8.36c0-.268.133-.469.334-.603.334-.2.535-.4.736-.735q.2-.503.2-1.004V4.68c0-.335-.066-.67-.267-1.004a1.94 1.94 0 0 0-.736-.736 2.13 2.13 0 0 0-2.007 0c-.335.201-.736.067-.937-.267-.2-.335-.067-.736.268-.937a3.32 3.32 0 0 1 3.345 0c.535.268.937.736 1.204 1.204.335.536.469 1.138.469 1.74v1.338a3 3 0 0 1-.469 1.673c-.2.401-.535.736-.87 1.003v.2l2.476 1.004c.268.067.468.268.602.469s.2.468.2.736v2.943c.068.335-.2.67-.601.67M10.035 14.715H.67c-.401 0-.669-.267-.669-.669V11.84c0-.268.067-.536.2-.736.135-.201.335-.402.603-.469l2.542-1.07v-.2c-.334-.268-.669-.603-.87-1.004a3 3 0 0 1-.468-1.673V5.349c0-.87.335-1.74 1.004-2.342.602-.669 1.471-1.003 2.341-1.003s1.74.334 2.342 1.003c.669.603 1.003 1.472 1.003 2.342v1.338A3 3 0 0 1 8.23 8.36c-.2.401-.535.736-.87 1.003v.2l2.476 1.004c.267.067.468.268.602.469s.2.468.2.736v2.274c.067.335-.2.67-.602.67m-8.697-1.338h8.028v-1.539l-2.475-1.003c-.268-.067-.468-.268-.602-.468a1.3 1.3 0 0 1-.268-.803v-.602c0-.268.134-.469.335-.602.334-.201.535-.402.736-.736.2-.268.267-.602.267-.937V5.349c0-.535-.2-1.07-.602-1.405-.736-.803-2.074-.803-2.81 0-.401.335-.602.87-.602 1.405v1.338c0 .335.067.67.268 1.004.2.334.401.535.736.736.2.066.334.334.334.535v.602c0 .267-.067.535-.2.736-.134.2-.335.401-.603.468l-2.542 1.07z"/></symbol>
649
654
  <symbol id="users-alt" viewBox="0 0 16 16" class="pdsicon"><g clip-path="url(#a)"><path fill-rule="evenodd" d="M15.167 9.867a1.33 1.33 0 0 1 .833 1.24v3.546h-4V13.32h2.667v-2.213l-2.494-1a1.3 1.3 0 0 1-.606-.487 1.3 1.3 0 0 1-.234-.747V7.9l.334-.187a1.97 1.97 0 0 0 1-1.72V4.66c0-.353-.094-.693-.267-1a2 2 0 0 0-.733-.733 2.02 2.02 0 0 0-2 0l-.58.333-.667-1.153.58-.334a3.38 3.38 0 0 1 3.333 0c.507.294.927.714 1.22 1.22A3.3 3.3 0 0 1 14 4.66v1.333c0 .58-.16 1.16-.447 1.66a3.3 3.3 0 0 1-.886.994v.226zm-7.427-.16 2.087.833c.246.1.46.267.613.493.147.22.227.48.227.747v2.88H0v-2.88a1.34 1.34 0 0 1 .84-1.247L2.927 9.7C1.273 9.253.793 8.407.74 8.293l-.22-.426.34-.347C1.18 7.2 2 6.187 2 5.327c0-.894.347-1.727.973-2.36a3.34 3.34 0 0 1 2.36-.974 3.34 3.34 0 0 1 2.36.974 3.34 3.34 0 0 1 .974 2.36c0 .86.82 1.873 1.14 2.2l.34.34-.22.433c-.062.11-.537.954-2.187 1.407M1.333 11.78v1.54h7.994v-1.547l-2.494-1A1.31 1.31 0 0 1 6 9.54v-.887l.58-.073c.973-.127 1.54-.4 1.847-.613-.454-.58-1.094-1.574-1.094-2.64a1.97 1.97 0 0 0-.586-1.414c-.754-.753-2.074-.753-2.827 0-.38.38-.587.88-.587 1.414 0 1.066-.64 2.066-1.093 2.633.307.213.867.48 1.847.613l.58.08v.887a1.34 1.34 0 0 1-.84 1.24z"/></g><defs><clipPath id="a"><path d="M0 0h16v16H0z"/></clipPath></defs></symbol>
655
+ <symbol id="users-filled" viewBox="0 0 16 16" class="pdsicon"><path fill-rule="evenodd" d="M15.207 9.883c.25.079.463.246.6.47.12.22.18.469.17.72v3a.58.58 0 0 1-.6.67h-2.68a.67.67 0 0 1 0-1.34h2v-2.21l-2.48-1a1.1 1.1 0 0 1-.6-.47 1.4 1.4 0 0 1-.2-.74v-.66a.69.69 0 0 1 .33-.6 1.9 1.9 0 0 0 .74-.74c.128-.318.196-.658.2-1v-1.32a1.9 1.9 0 0 0-.27-1 1.9 1.9 0 0 0-.73-.74 2.16 2.16 0 0 0-2 0 .69.69 0 1 1-.67-1.2 3.3 3.3 0 0 1 3.38 0 3 3 0 0 1 1.2 1.2 3.2 3.2 0 0 1 .47 1.74v1.32a3 3 0 0 1-.47 1.7 3 3 0 0 1-.87 1v.2zm-7.83-.33 2.47 1c.24.083.442.25.57.47.135.219.204.472.2.73v2.28a.58.58 0 0 1-.6.67H.687a.64.64 0 0 1-.67-.67v-2.21a1.4 1.4 0 0 1 .2-.74c.137-.224.35-.391.6-.47l2.54-1.07v-.2a3 3 0 0 1-.87-1 3 3 0 0 1-.47-1.67v-1.34a3.12 3.12 0 0 1 1-2.35 3.13 3.13 0 0 1 2.35-1 3.13 3.13 0 0 1 2.34 1 3.13 3.13 0 0 1 1.01 2.35v1.34a3.07 3.07 0 0 1-.47 1.68 3.1 3.1 0 0 1-.87 1z"/></symbol>
650
656
  <symbol id="video-off" viewBox="0 0 16 16" class="pdsicon"><g clip-path="url(#a)"><path fill-rule="evenodd" d="M15.133 1.8a.644.644 0 0 0 0-.933.644.644 0 0 0-.933 0l-2.867 2.866c-.066-.466-.266-.866-.6-1.133-.333-.4-.866-.6-1.4-.6H2c-.533 0-1.067.2-1.4.6-.4.333-.6.867-.6 1.4v8c0 .533.2 1.067.6 1.4q.3.3.6.4l-.333.333a.645.645 0 0 0 0 .934.645.645 0 0 0 .933 0zM2.4 12.667l7.6-7.6V4c0-.2-.067-.333-.2-.467a.6.6 0 0 0-.467-.2H2c-.2 0-.333.067-.467.2a.6.6 0 0 0-.2.467v8c0 .2.067.333.2.467.134.133.267.2.467.2zm13.333-8.534c.2.134.267.334.267.534v6.666c0 .2-.067.4-.267.534-.133.133-.4.133-.6.133l-3.8-1.133V12c0 .533-.2 1.067-.6 1.4-.333.4-.866.6-1.4.6H5.467c-.4 0-.667-.267-.667-.667s.267-.666.667-.666h3.866c.2 0 .334-.067.467-.2A.6.6 0 0 0 10 12v-2c0-.2.067-.4.267-.533.133-.134.4-.134.6-.134l3.8 1.067V5.533l-.8.2c-.334.134-.734-.133-.8-.466-.134-.334.133-.734.466-.8l1.6-.467c.2 0 .467 0 .6.133"/></g><defs><clipPath id="a"><path d="M0 0h16v16H0z"/></clipPath></defs></symbol>
651
657
  <symbol id="video-on" viewBox="0 0 16 16" class="pdsicon"><path fill-rule="evenodd" d="M1.333 4c0-.4.267-.667.667-.667h7.333c.4 0 .667.267.667.667v8c0 .4-.267.667-.667.667H2c-.4 0-.667-.267-.667-.667zm10 6.333V12c0 1.133-.866 2-2 2H2c-1.133 0-2-.867-2-2V4c0-1.133.867-2 2-2h7.333c1.134 0 2 .867 2 2v1.667l3.734-1.6c.2-.067.466-.067.6.066.2.134.333.334.333.534v6.666c0 .2-.133.4-.267.534-.2.133-.4.133-.6.066zm0-1.466 3.334 1.4V5.6L11.333 7z"/></symbol>
652
658
  <symbol id="warning" viewBox="0 0 16 16" class="pdsicon"><path d="M8 6.667c.368 0 .667.298.667.666V10a.667.667 0 1 1-1.334 0V7.333c0-.368.299-.666.667-.666M8.667 12a.667.667 0 1 1-1.334 0 .667.667 0 0 1 1.334 0"/><path fill-rule="evenodd" d="M8 1.333c.248 0 .475.138.59.357l6.667 12.666a.667.667 0 0 1-.59.977H1.333a.667.667 0 0 1-.59-.977L7.41 1.69A.67.67 0 0 1 8 1.333M13.562 14 8 3.431 2.438 14z"/></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,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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C,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,CAA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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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AAE,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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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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="M.67.67h14.66a.67.67 0 0 1 .67.66v13.34a.67.67 0 0 1-.67.66H.67a.67.67 0 0 1-.67-.66V1.33A.67.67 0 0 1 .67.67M3.33 2h-2v1.33h2zm4.474 9.804A.67.67 0 0 0 8 11.33v-4a.67.67 0 0 0-.67-.66h-4a.67.67 0 0 0-.66.66v4a.67.67 0 0 0 .66.67h4a.67.67 0 0 0 .474-.196M10 10.67h1.33a.67.67 0 0 0 0-1.34H10a.67.67 0 1 0 0 1.34M10 8h2.67a.67.67 0 0 0 0-1.33H10A.67.67 0 1 0 10 8M4.67 3.33h10V2h-10zM4 8h2.67v2.67H4z"/></svg>
@@ -1 +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="M1.32 1.856h13.36c.73 0 1.32.593 1.32 1.324v9.64c0 .731-.59 1.324-1.32 1.324H1.32c-.73 0-1.32-.593-1.32-1.324V3.18c0-.731.59-1.324 1.32-1.324m.284 10.68h12.792V3.464H1.604zM8.94 5.37l.014-.001.024-.001.609-.002c.472-.002.945-.005 1.417.006.636.014 1.218.206 1.702.638.353.315.583.71.699 1.166.176.691.16 1.376-.12 2.038-.3.71-.845 1.143-1.578 1.348a3 3 0 0 1-.782.107l-1.406.001H8.94zm1.357 4.183q.197.001.39-.002l.074-.002c.133-.003.267-.006.397-.03.518-.097.875-.392 1.037-.902.103-.326.11-.66.048-.995-.125-.692-.629-1.097-1.31-1.132a9 9 0 0 0-.53-.007h-.23l-.034.004-.017.003v3.062zm-6.337 1.114H2.78V5.375h1.179V7.44h2.108V5.374h1.186v5.293H6.07v-2.1H3.96z"/></g><defs><clipPath id="a"><path d="M0 0h16v16H0z"/></clipPath></defs></svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" class="pdsicon"><path fill-rule="evenodd" d="M1.32 1.856h13.36c.73 0 1.32.593 1.32 1.324v9.64c0 .731-.59 1.324-1.32 1.324H1.32c-.73 0-1.32-.593-1.32-1.324V3.18c0-.731.59-1.324 1.32-1.324m.284 10.68h12.792V3.464H1.604zM8.94 5.37l.014-.001.024-.001.609-.002c.472-.002.945-.005 1.417.006.636.014 1.218.206 1.702.638.353.315.583.71.699 1.166.176.691.16 1.376-.12 2.038-.3.71-.845 1.143-1.578 1.348a3 3 0 0 1-.782.107l-1.406.001H8.94zm1.357 4.183q.197.001.39-.002l.074-.002c.133-.003.267-.006.397-.03.518-.097.875-.392 1.037-.902.103-.326.11-.66.048-.995-.125-.692-.629-1.097-1.31-1.132a9 9 0 0 0-.53-.007h-.23l-.034.004-.017.003v3.062zm-6.337 1.114H2.78V5.375h1.179V7.44h2.108V5.374h1.186v5.293H6.07v-2.1H3.96z"/></svg>
@@ -1 +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="M.624 1.882c.358-.34.843-.549 1.376-.549h12a2 2 0 0 1 2 2v9.334a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V3.333a2 2 0 0 1 .624-1.45m.71 1.625v9.16c0 .368.298.666.666.666h12a.667.667 0 0 0 .667-.666v-9.16L8.448 9.16a.667.667 0 0 1-.896 0zm12.275-.84H2.39L8 7.766z"/></g><defs><clipPath id="a"><path d="M0 0h16v16H0z"/></clipPath></defs></svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" class="pdsicon"><path fill-rule="evenodd" d="M.624 1.882c.358-.34.843-.549 1.376-.549h12a2 2 0 0 1 2 2v9.334a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V3.333a2 2 0 0 1 .624-1.45m.71 1.625v9.16c0 .368.298.666.666.666h12a.667.667 0 0 0 .667-.666v-9.16L8.448 9.16a.667.667 0 0 1-.896 0zm12.275-.84H2.39L8 7.766z"/></svg>
@@ -1 +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="M.667 1.333a.667.667 0 1 0 0 1.334h14.666a.667.667 0 1 0 0-1.334zM0 4.667C0 4.298.298 4 .667 4h14.666c.368 0 .667.298.667.667v6.666a.667.667 0 0 1-.667.667H.667A.667.667 0 0 1 0 11.333zm1.333.666v5.334h13.334V5.333zM0 14c0-.368.298-.667.667-.667h14.666a.667.667 0 0 1 0 1.334H.667A.667.667 0 0 1 0 14"/></g><defs><clipPath id="a"><path d="M0 0h16v16H0z"/></clipPath></defs></svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" class="pdsicon"><path fill-rule="evenodd" d="M.667 1.333a.667.667 0 1 0 0 1.334h14.666a.667.667 0 1 0 0-1.334zM0 4.667C0 4.298.298 4 .667 4h14.666c.368 0 .667.298.667.667v6.666a.667.667 0 0 1-.667.667H.667A.667.667 0 0 1 0 11.333zm1.333.666v5.334h13.334V5.333zM0 14c0-.368.298-.667.667-.667h14.666a.667.667 0 0 1 0 1.334H.667A.667.667 0 0 1 0 14"/></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="M15.207 9.883c.25.079.463.246.6.47.12.22.18.469.17.72v3a.58.58 0 0 1-.6.67h-2.68a.67.67 0 0 1 0-1.34h2v-2.21l-2.48-1a1.1 1.1 0 0 1-.6-.47 1.4 1.4 0 0 1-.2-.74v-.66a.69.69 0 0 1 .33-.6 1.9 1.9 0 0 0 .74-.74c.128-.318.196-.658.2-1v-1.32a1.9 1.9 0 0 0-.27-1 1.9 1.9 0 0 0-.73-.74 2.16 2.16 0 0 0-2 0 .69.69 0 1 1-.67-1.2 3.3 3.3 0 0 1 3.38 0 3 3 0 0 1 1.2 1.2 3.2 3.2 0 0 1 .47 1.74v1.32a3 3 0 0 1-.47 1.7 3 3 0 0 1-.87 1v.2zm-7.83-.33 2.47 1c.24.083.442.25.57.47.135.219.204.472.2.73v2.28a.58.58 0 0 1-.6.67H.687a.64.64 0 0 1-.67-.67v-2.21a1.4 1.4 0 0 1 .2-.74c.137-.224.35-.391.6-.47l2.54-1.07v-.2a3 3 0 0 1-.87-1 3 3 0 0 1-.47-1.67v-1.34a3.12 3.12 0 0 1 1-2.35 3.13 3.13 0 0 1 2.35-1 3.13 3.13 0 0 1 2.34 1 3.13 3.13 0 0 1 1.01 2.35v1.34a3.07 3.07 0 0 1-.47 1.68 3.1 3.1 0 0 1-.87 1z"/></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>
@@ -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;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,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AAI,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,aA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D,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,WAAW,CAAC;YACjC,UAAU,EAAE,CAAC,OAAO,CAAC;YACrB,IAAI,EAAE,kDAAkD;SACzD,CAAC,CAAC;QACH,MAAM,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC;;;;;;KAMxB,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,2BAA2B,EAAE,KAAK,IAAI,EAAE;QACzC,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,WAAW,CAAC;YACjC,UAAU,EAAE,CAAC,OAAO,CAAC;YACrB,IAAI,EAAE,6DAA6D;SACpE,CAAC,CAAC;QAEH,MAAM,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC;;;;;;KAMxB,CAAC,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 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 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"]}
package/dist/docs.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2024-06-06T12:11:17",
2
+ "timestamp": "2024-07-02T11:04:34",
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