@pine-ds/icons 9.5.1 → 9.6.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 (34) hide show
  1. package/components/pds-icon.js +24 -133
  2. package/components/pds-icon.js.map +1 -1
  3. package/dist/cheatsheet.html +7 -5
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/cjs/pds-icon.cjs.entry.js +23 -132
  6. package/dist/cjs/pds-icon.cjs.entry.js.map +1 -1
  7. package/dist/cjs/pds-icon.entry.cjs.js.map +1 -1
  8. package/dist/cjs/pds-icons.cjs.js +1 -1
  9. package/dist/collection/components/pds-icon/pds-icon.js +17 -82
  10. package/dist/collection/components/pds-icon/pds-icon.js.map +1 -1
  11. package/dist/collection/components/pds-icon/request.js +9 -53
  12. package/dist/collection/components/pds-icon/request.js.map +1 -1
  13. package/dist/docs.json +5 -5
  14. package/dist/esm/loader.js +1 -1
  15. package/dist/esm/pds-icon.entry.js +23 -132
  16. package/dist/esm/pds-icon.entry.js.map +1 -1
  17. package/dist/esm/pds-icons.js +1 -1
  18. package/dist/pds-icons/p-5a3a5e3c.entry.js +2 -0
  19. package/dist/pds-icons/p-5a3a5e3c.entry.js.map +1 -0
  20. package/dist/pds-icons/pds-icon.entry.esm.js.map +1 -1
  21. package/dist/pds-icons/pds-icons.esm.js +1 -1
  22. package/dist/pds-icons.json +11 -1
  23. package/dist/pds-icons.symbols.svg +2 -1
  24. package/dist/svg/switch-vertical.svg +1 -0
  25. package/dist/types/components/pds-icon/pds-icon.d.ts +1 -2
  26. package/dist/types/components/pds-icon/request.d.ts +1 -1
  27. package/dist/types/components.d.ts +2 -2
  28. package/icons/index.d.ts +2 -1
  29. package/icons/index.js +2 -1
  30. package/icons/index.mjs +2 -1
  31. package/icons/package.json +1 -1
  32. package/package.json +1 -1
  33. package/dist/pds-icons/p-560fb565.entry.js +0 -2
  34. package/dist/pds-icons/p-560fb565.entry.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"pds-icon.entry.esm.js","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, retryCount = 0) => {\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 try {\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 } else {\n console.warn(`No SVG found in data URL: ${url}`);\n pdsIconContent.set(url, '');\n }\n } catch (error) {\n console.error(`Failed to parse SVG data URL: ${url}`, error);\n pdsIconContent.set(url, '');\n }\n\n return Promise.resolve();\n } else {\n // Add retry logic and better error handling\n req = fetch(url, {\n method: 'GET',\n headers: {\n 'Accept': 'image/svg+xml,text/plain,*/*'\n },\n cache: 'force-cache' // Aggressive caching for icons\n }).then((rsp) => {\n if (rsp.ok) {\n return rsp.text().then((svgContent) => {\n if (svgContent && sanitize !== false) {\n svgContent = validateContent(svgContent);\n }\n if (svgContent) {\n pdsIconContent.set(url, svgContent);\n } else {\n console.warn(`Empty SVG content received for: ${url}`);\n pdsIconContent.set(url, '');\n }\n });\n } else {\n throw new Error(`HTTP ${rsp.status}: ${rsp.statusText}`);\n }\n }).catch((error) => {\n console.error(`Failed to fetch icon ${url}:`, error);\n\n // Retry logic - attempt up to 3 times with exponential backoff\n if (retryCount < 3) {\n const delay = Math.pow(2, retryCount) * 1000; // 1s, 2s, 4s\n console.log(`Retrying icon load in ${delay}ms (attempt ${retryCount + 1}/3): ${url}`);\n\n return new Promise((resolve) => {\n setTimeout(() => {\n // Clear the failed request from cache to allow retry\n requests.delete(url);\n resolve(getSvgContent(url, sanitize, retryCount + 1));\n }, delay);\n });\n } else {\n // Final failure - set empty content to prevent infinite loading\n pdsIconContent.set(url, '');\n throw error;\n }\n });\n\n requests.set(url, req);\n }\n } else {\n console.warn('Fetch or document not available, setting empty icon content');\n pdsIconContent.set(url, '');\n return Promise.resolve();\n }\n }\n\n return req;\n}\n",":host {\n --dimension-icon-height: 16px;\n --dimension-icon-width: 16px;\n --color-icon-fill: currentColor;\n\n contain: strict;\n display: inline-block;\n fill: var(--color-icon-fill);\n flex-shrink: 0;\n height: var(--dimension-icon-height);\n width: var(--dimension-icon-width);\n\n .pdsicon {\n fill: var(--color-icon-fill);\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\n/* :host-context is supported in chromium; :dir is supported in safari & firefox */\n:host(.flip-rtl):host-context([dir='rtl']) .icon-inner {\n transform: scaleX(-1);\n}\n\n:host(.flip-rtl:dir(rtl)) .icon-inner {\n transform: scaleX(-1);\n}\n\n/**\n * This is needed for WebKit otherwise the fallback\n * will always cause the icon to be flipped if the document\n * loads in RTL.\n */\n:host(.flip-rtl:dir(ltr)) .icon-inner {\n transform: scaleX(1);\n}\n\n","import { Build, Component, Element, Host, Prop, State, Watch, h } from '@stencil/core';\nimport { getSvgContent, pdsIconContent } from './request';\nimport { getName, getUrl, inheritAttributes, isRTL, shouldRtlFlipIcon } 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 didLoadIcon = false;\n private iconName: string | null = null;\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 * Determines if the icon should be flipped when the `dir` is right-to-left (`\"rtl\"`).\n * This is automatically enabled for icons that are in the `ICONS_TO_FLIP` list and\n * when the `dir` is `\"rtl\"`. If `flipRtl` is set to `false`, the icon will not be flipped\n * even if the `dir` is `\"rtl\"`.\n */\n @Prop() flipRtl?: boolean;\n\n /**\n * This is 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 sets the `name` property.\n */\n @Prop() icon?: string;\n\n /**\n * The name of the icon to use from\n * the built-in set.\n */\n @Prop({ reflect: true }) name?: string;\n\n /**\n * The size of the icon. This can be\n * 'small', 'regular', 'medium', 'large', or a\n * custom value (40px, 1rem, etc)\n *\n */\n @Prop({ reflect: true }) size?:\n | 'small' // 12px\n | 'regular' // 16px\n | 'medium' // 20px\n | 'large' // 24px\n | 'auto'\n | string = 'regular'\n\n /**\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\n componentDidLoad() {\n this.setCSSVariables();\n\n // Always attempt to load icon, but add delay for IntersectionObserver to complete\n setTimeout(() => {\n if (!this.didLoadIcon || !this.svgContent) {\n console.warn('Icon not loaded after component mount, forcing load attempt');\n this.isVisible = true; // Force visibility for fallback loading\n this.loadIcon();\n }\n }, 50);\n }\n\n componentWillLoad() {\n this.inheritedAttributes = inheritAttributes(this.el, ['aria-label']);\n this.setCSSVariables();\n }\n\n setCSSVariables() {\n this.el.style.setProperty(`--dimension-icon-height`, this.iconSize());\n this.el.style.setProperty(`--dimension-icon-width`, this.iconSize());\n this.el.style.setProperty(`--color-icon-fill`, typeof this.color !== 'undefined' ? this.color : 'currentColor');\n }\n\n connectedCallback() {\n // Set a fallback timeout in case IntersectionObserver never fires\n // This prevents icons from never loading due to intersection issues\n const fallbackTimeout = setTimeout(() => {\n if (!this.isVisible) {\n console.warn('IntersectionObserver timeout, forcing icon visibility');\n this.isVisible = true;\n this.loadIcon();\n }\n }, 100); // 100ms fallback\n\n this.waitUntilVisible(this.el, '50px', () => {\n clearTimeout(fallbackTimeout);\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('size')\n @Watch('color')\n updateStyles() {\n this.setCSSVariables();\n }\n\n @Watch('name')\n @Watch('src')\n @Watch('icon')\n loadIcon() {\n if (Build.isBrowser) {\n const url = getUrl(this);\n if (url) {\n if (pdsIconContent.has(url)) {\n this.svgContent = pdsIconContent.get(url);\n } else {\n // Add comprehensive error handling and timeout\n const timeoutPromise = new Promise((_, reject) => {\n setTimeout(() => reject(new Error('Icon loading timeout')), 10000); // 10 second timeout\n });\n\n Promise.race([getSvgContent(url), timeoutPromise])\n .then(() => {\n this.svgContent = pdsIconContent.get(url);\n // Force re-render if content was loaded after initial render\n if (!this.svgContent) {\n console.warn(`Icon content not found after successful load: ${url}`);\n }\n })\n .catch((error) => {\n console.error(`Failed to load icon: ${url}`, error);\n // Set empty content to prevent infinite loading state\n pdsIconContent.set(url, '');\n this.svgContent = '';\n });\n }\n this.didLoadIcon = true;\n }\n }\n\n this.iconName = getName(this.name, this.icon);\n\n if (this.iconName) {\n this.ariaLabel = this.iconName.replace(/\\-/g, ' ');\n }\n }\n\n render() {\n const { ariaLabel, flipRtl, iconName,inheritedAttributes } = this;\n const shouldIconAutoFlip = iconName\n ? shouldRtlFlipIcon(iconName, this.el) && flipRtl !== false\n : false;\n const shouldFlip = flipRtl || shouldIconAutoFlip;\n\n // Debug information when enabled\n this.debugIconState();\n\n return (\n\n <Host\n aria-label={ariaLabel !== undefined && !this.hasAriaHidden() ? ariaLabel : null }\n alt=\"\"\n role=\"img\"\n class={{\n ...createColorClasses(this.color),\n 'flip-rtl': shouldFlip,\n 'icon-rtl': shouldFlip && isRTL(this.el)\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 debugIconState() {\n if (typeof window !== 'undefined' && (window as Window & { __PDS_ICON_DEBUG__?: boolean }).__PDS_ICON_DEBUG__) {\n console.log('PDS Icon Debug:', {\n name: this.name,\n src: this.src,\n icon: this.icon,\n isVisible: this.isVisible,\n didLoadIcon: this.didLoadIcon,\n svgContent: this.svgContent ? 'loaded' : 'empty',\n url: getUrl(this),\n hasIntersectionObserver: !!this.io,\n element: this.el\n });\n }\n }\n\n private waitUntilVisible(el: HTMLElement, rootMargin: string, cb: () => void) {\n if (Build.isBrowser && typeof window !== 'undefined' && (window).IntersectionObserver) {\n try {\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\n // Add a safety timeout for IntersectionObserver\n setTimeout(() => {\n if (this.io) {\n console.warn('IntersectionObserver did not trigger within 5 seconds, forcing callback');\n this.io.disconnect();\n this.io = undefined;\n cb();\n }\n }, 5000);\n } catch (error) {\n console.error('IntersectionObserver initialization failed:', error);\n // Fall back to immediate execution\n cb();\n }\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"],"names":[],"mappings":";;;AAEO,MAAM,eAAe,GAAG,CAAC,UAAkB,KAAI;IACpD,MAAM,GAAG,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC;AACzC,IAAA,GAAG,CAAC,SAAS,GAAG,UAAU;;AAG1B,IAAA,KAAK,IAAI,CAAC,GAAG,GAAG,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE;AACnD,QAAA,IAAI,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,QAAQ,CAA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AAE,EAAc,EAAA;AAC1E,QAAA,IAAuB,OAAO,MAAM,KAAK,WAAW,IAAI,CAAC,MAAM,EAAE,oBAAoB,EAAE;AACrF,YAAA,IAAI;AACF,gBAAA,MAAM,EAAE,IAAI,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,MAAM,EAAE,oBAAoB,CACrD,CAAC,IAAiC,KAAI;AACpC,oBAAA,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,cAAc,EAAE;wBAC1B,EAAE,CAAC,UAAU,EAAE;AACf,wBAAA,IAAI,CAAC,EAAE,GAAG,SAAS;AACnB,wBAAA,EAAE,EAAE;;AAER,iBAAC,EACD,EAAE,UAAU,EAAE,CACf,CAAC;AAEF,gBAAA,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;;gBAGd,UAAU,CAAC,MAAK;AACd,oBAAA,IAAI,IAAI,CAAC,EAAE,EAAE;AACX,wBAAA,OAAO,CAAC,IAAI,CAAC,yEAAyE,CAAC;AACvF,wBAAA,IAAI,CAAC,EAAE,CAAC,UAAU,EAAE;AACpB,wBAAA,IAAI,CAAC,EAAE,GAAG,SAAS;AACnB,wBAAA,EAAE,EAAE;;iBAEP,EAAE,IAAI,CAAC;;YACR,OAAO,KAAK,EAAE;AACd,gBAAA,OAAO,CAAC,KAAK,CAAC,6CAA6C,EAAE,KAAK,CAAC;;AAEnE,gBAAA,EAAE,EAAE;;;aAED;;;AAGL,YAAA,EAAE,EAAE;;;;;;;;;;;;;AAWV,MAAM,kBAAkB,GAAG,CAAC,KAAyB,KAAI;AACvD,IAAA,OAAO;AACN,UAAE;AACE,YAAA,WAAW,EAAE,IAAI;AACjB,YAAA,CAAC,CAAa,UAAA,EAAA,KAAK,CAAE,CAAA,GAAG,IAAI;AAC7B;UACD,IAAI;AACR,CAAC;;;;;"}
1
+ {"version":3,"file":"pds-icon.entry.esm.js","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 --dimension-icon-height: 16px;\n --dimension-icon-width: 16px;\n --color-icon-fill: currentColor;\n\n contain: strict;\n display: inline-block;\n fill: var(--color-icon-fill);\n flex-shrink: 0;\n height: var(--dimension-icon-height);\n width: var(--dimension-icon-width);\n\n .pdsicon {\n fill: var(--color-icon-fill);\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\n/* :host-context is supported in chromium; :dir is supported in safari & firefox */\n:host(.flip-rtl):host-context([dir='rtl']) .icon-inner {\n transform: scaleX(-1);\n}\n\n:host(.flip-rtl:dir(rtl)) .icon-inner {\n transform: scaleX(-1);\n}\n\n/**\n * This is needed for WebKit otherwise the fallback\n * will always cause the icon to be flipped if the document\n * loads in RTL.\n */\n:host(.flip-rtl:dir(ltr)) .icon-inner {\n transform: scaleX(1);\n}\n\n","import { Build, Component, Element, Host, Prop, State, Watch, h } from '@stencil/core';\nimport { getSvgContent, pdsIconContent } from './request';\nimport { getName, getUrl, inheritAttributes, isRTL, shouldRtlFlipIcon } 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 didLoadIcon = false;\n private iconName: string | null = null;\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 * Determines if the icon should be flipped when the `dir` is right-to-left (`\"rtl\"`).\n * This is automatically enabled for icons that are in the `ICONS_TO_FLIP` list and\n * when the `dir` is `\"rtl\"`. If `flipRtl` is set to `false`, the icon will not be flipped\n * even if the `dir` is `\"rtl\"`.\n */\n @Prop() flipRtl?: boolean;\n\n /**\n * This is 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 sets 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\n componentDidLoad() {\n this.setCSSVariables();\n\n if (!this.didLoadIcon) {\n this.loadIcon();\n }\n }\n\n componentWillLoad() {\n this.inheritedAttributes = inheritAttributes(this.el, ['aria-label']);\n this.setCSSVariables();\n }\n\n setCSSVariables() {\n this.el.style.setProperty(`--dimension-icon-height`, this.iconSize());\n this.el.style.setProperty(`--dimension-icon-width`, this.iconSize());\n this.el.style.setProperty(`--color-icon-fill`, typeof this.color !== 'undefined' ? this.color : 'currentColor');\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('size')\n @Watch('color')\n updateStyles() {\n this.setCSSVariables();\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 this.didLoadIcon = true;\n }\n }\n\n this.iconName = getName(this.name, this.icon);\n\n if (this.iconName) {\n this.ariaLabel = this.iconName.replace(/\\-/g, ' ');\n }\n }\n\n render() {\n const { ariaLabel, flipRtl, iconName,inheritedAttributes } = this;\n const shouldIconAutoFlip = iconName\n ? shouldRtlFlipIcon(iconName, this.el) && flipRtl !== false\n : false;\n const shouldFlip = flipRtl || shouldIconAutoFlip;\n\n return (\n\n <Host\n aria-label={ariaLabel !== undefined && !this.hasAriaHidden() ? ariaLabel : null }\n alt=\"\"\n role=\"img\"\n class={{\n ...createColorClasses(this.color),\n 'flip-rtl': shouldFlip,\n 'icon-rtl': shouldFlip && isRTL(this.el)\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"],"names":[],"mappings":";;;AAEO,MAAM,eAAe,GAAG,CAAC,UAAkB,KAAI;IACpD,MAAM,GAAG,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC;AACzC,IAAA,GAAG,CAAC,SAAS,GAAG,UAAU;;AAG1B,IAAA,KAAK,IAAI,CAAC,GAAG,GAAG,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE;AACnD,QAAA,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;;;;AAKtC,IAAA,MAAM,MAAM,GAAG,GAAG,CAAC,iBAAiB;IACpC,IAAI,MAAM,IAAI,MAAM,CAAC,QAAQ,CAAC,WAAW,EAAE,KAAK,KAAK,EAAE;QACrD,MAAM,QAAQ,GAAG,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,IAAI,EAAE;AACnD,QAAA,MAAM,CAAC,YAAY,CAAC,OAAO,EAAE,CAAC,QAAQ,GAAG,aAAa,EAAE,IAAI,EAAE,CAAC;;;;AAK/D,QAAA,IAAI,OAAO,CAAC,MAAqB,CAAC,EAAE;YAClC,OAAO,GAAG,CAAC,SAAS;;;AAGxB,IAAA,OAAO,EAAE;AACX,CAAC;AAEM,MAAM,OAAO,GAAG,CAAC,GAAgB,KAAI;AAC1C,IAAA,IAAI,GAAG,CAAC,QAAQ,KAAK,CAAC,EAAE;QACtB,IAAI,GAAG,CAAC,QAAQ,CAAC,WAAW,EAAE,KAAK,QAAQ,EAAE;AAC3C,YAA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AAc,EAAE;oBAC1B,EAAE,CAAC,UAAU,EAAE;AACf,oBAAA,IAAI,CAAC,EAAE,GAAG,SAAS;AACnB,oBAAA,EAAE,EAAE;;AAER,aAAC,EACD,EAAE,UAAU,EAAE,CACf,CAAC;AAEF,YAAA,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;;aACT;;;AAGL,YAAA,EAAE,EAAE;;;;;;;;;;;;;AAWV,MAAM,kBAAkB,GAAG,CAAC,KAAyB,KAAI;AACvD,IAAA,OAAO;AACN,UAAE;AACE,YAAA,WAAW,EAAE,IAAI;AACjB,YAAA,CAAC,CAAa,UAAA,EAAA,KAAK,CAAE,CAAA,GAAG,IAAI;AAC7B;UACD,IAAI;AACR,CAAC;;;;;"}
@@ -1,2 +1,2 @@
1
- import{p as o,b as t}from"./p-BtVkVfWm.js";export{s as setNonce}from"./p-BtVkVfWm.js";import{g as a}from"./p-DQuL1Twl.js";var e=()=>{const s=import.meta.url;const t={};if(s!==""){t.resourcesUrl=new URL(".",s).href}return o(t)};e().then((async o=>{await a();return t([["p-560fb565",[[1,"pds-icon",{color:[1],flipRtl:[4,"flip-rtl"],icon:[1],name:[513],size:[513],src:[1],ariaLabel:[32],isVisible:[32],svgContent:[32]},null,{size:["updateStyles"],color:["updateStyles"],name:["loadIcon"],src:["loadIcon"],icon:["loadIcon"]}]]]],o)}));
1
+ import{p as o,b as a}from"./p-BtVkVfWm.js";export{s as setNonce}from"./p-BtVkVfWm.js";import{g as t}from"./p-DQuL1Twl.js";var e=()=>{const s=import.meta.url;const a={};if(s!==""){a.resourcesUrl=new URL(".",s).href}return o(a)};e().then((async o=>{await t();return a([["p-5a3a5e3c",[[1,"pds-icon",{color:[1],flipRtl:[4,"flip-rtl"],icon:[8],name:[513],size:[513],src:[1],ariaLabel:[32],isVisible:[32],svgContent:[32]},null,{size:["updateStyles"],color:["updateStyles"],name:["loadIcon"],src:["loadIcon"],icon:["loadIcon"]}]]]],o)}));
2
2
  //# sourceMappingURL=pds-icons.esm.js.map
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pds-icons",
3
- "version": "9.5.0",
3
+ "version": "9.5.1",
4
4
  "icons": [
5
5
  {
6
6
  "name": "access-key",
@@ -3854,6 +3854,16 @@
3854
3854
  "type"
3855
3855
  ]
3856
3856
  },
3857
+ {
3858
+ "name": "switch-vertical",
3859
+ "category": "actions",
3860
+ "tags": [
3861
+ "arrows",
3862
+ "swap",
3863
+ "switch",
3864
+ "vertical"
3865
+ ]
3866
+ },
3857
3867
  {
3858
3868
  "name": "sync",
3859
3869
  "category": "actions",
@@ -1,4 +1,4 @@
1
- <svg data-pdsicons="9.5.0" style="display:none">
1
+ <svg data-pdsicons="9.5.1" style="display:none">
2
2
  <style>
3
3
  .pdsicon {
4
4
  fill: currentColor;
@@ -333,6 +333,7 @@
333
333
  <symbol id="subscriptions" viewBox="0 0 24 24" class="pdsicon"><path d="M18.404 3.071A11 11 0 0 1 21.72 6.86 11 11 0 1 1 1 12a.92.92 0 1 1 1.83 0 9.16 9.16 0 0 0 14.43 7.53 9.161 9.161 0 1 0-12-13.74L8.02 5a.928.928 0 0 1 .49 1.79L3.22 8.2a.9.9 0 0 1-.28 0h-.07a.9.9 0 0 1-.31-.09L2.39 8l-.08-.08a1.2 1.2 0 0 1-.15-.27.13.13 0 0 0 0-.06 1 1 0 0 1 0-.27v-.08l.67-5.28a.92.92 0 0 1 1-.8.93.93 0 0 1 .8 1l-.24 1.92a11 11 0 0 1 14.014-1.009"/><path d="M10.98 15.49h1.87a1.31 1.31 0 0 0 0-2.62h-1.74a3.05 3.05 0 1 1 0-6.1v-.43a.87.87 0 0 1 1.74 0v.43h.14a2.91 2.91 0 0 1 2.91 2.91.87.87 0 0 1-1.74 0 1.16 1.16 0 0 0-1.12-1.16h-1.88a1.31 1.31 0 1 0 0 2.61h1.74a3.05 3.05 0 1 1 0 6.1v.43a.87.87 0 0 1-1.74 0v-.43h-.18a2.9 2.9 0 0 1-2.9-2.91.87.87 0 0 1 1.74 0 1.16 1.16 0 0 0 1.16 1.17"/></symbol>
334
334
  <symbol id="super-admin" viewBox="0 0 24 24" class="pdsicon"><path d="M11.542 7.417c1.008 0 1.833.825 1.833 1.833v.458c0 .55-.183 1.1-.55 1.559S12 12 11.542 12c-.459 0-.917-.275-1.284-.733a2.5 2.5 0 0 1-.55-1.559V9.25c0-1.008.825-1.833 1.834-1.833M15.208 12.917c.275 0 .459.183.459.458v.917h-.917v-.917c0-.275.183-.458.458-.458M13.833 16.583v-1.375h2.75v1.375z"/><path fill-rule="evenodd" d="M12 1C5.95 1 1 5.95 1 12s4.95 11 11 11 11-4.95 11-11S18.05 1 12 1m-.458 11.917a8.9 8.9 0 0 0-3.025.55.88.88 0 0 0-.642.825v1.375h3.208c.275 0 .459.183.459.458s-.184.458-.459.458H7.417c-.275 0-.459-.183-.459-.458v-1.833c0-.825.459-1.467 1.284-1.742.285-.114.606-.193.962-.28q.324-.078.688-.178l-.275-.275c-.459-.642-.734-1.375-.734-2.109V9.25c0-1.558 1.192-2.75 2.75-2.75s2.75 1.192 2.75 2.75v.458c0 .734-.275 1.559-.733 2.109-.642.641-1.283 1.1-2.108 1.1m5.958 4.125c0 .275-.183.458-.458.458h-3.667c-.275 0-.458-.183-.458-.458V14.75c0-.275.183-.458.458-.458h.458v-.917c0-.733.642-1.375 1.375-1.375.734 0 1.375.642 1.375 1.375v.917h.459c.275 0 .458.183.458.458z"/></symbol>
335
335
  <symbol id="superscript" viewBox="0 0 24 24" class="pdsicon"><path d="M17 11.002h4c.265 0 .52-.056.707-.243A1 1 0 0 0 21 9.05h-2.85c.13-.27.38-.4.8-.6q.037-.016.073-.034C20.17 7.875 22 7.009 22 5.05a3 3 0 0 0-.73-2 3.1 3.1 0 0 0-3.87-.64 3 3 0 0 0-1.34 1.6 1.002 1.002 0 0 0 .985 1.394 1 1 0 0 0 .895-.724 1 1 0 0 1 .45-.53 1.11 1.11 0 0 1 1.37.22.94.94 0 0 1 .24.63c0 .6-.86 1.1-1.93 1.6a3.22 3.22 0 0 0-2.07 3.4 1 1 0 0 0 1 1M12.616 17.926A1 1 0 0 0 13 18a1 1 0 0 0 .71-1.71L9.41 12l4.3-4.29A1.005 1.005 0 0 0 13 5.996a1 1 0 0 0-.71.294L8 10.59l-4.29-4.3a1.004 1.004 0 0 0-1.42 1.42L6.59 12l-4.3 4.29a1.004 1.004 0 0 0 1.42 1.42L8 13.41l4.29 4.3a1 1 0 0 0 .326.216"/></symbol>
336
+ <symbol id="switch-vertical" viewBox="0 0 24 24" class="pdsicon"><path d="M6 20V6.414L3.707 8.707a1 1 0 1 1-1.414-1.414l4-4 .076-.068a1 1 0 0 1 1.338.068l4 4 .068.076a1 1 0 0 1-1.406 1.406l-.076-.068L8 6.414V20a1 1 0 1 1-2 0M16 4a1 1 0 1 1 2 0v13.586l2.293-2.293a1 1 0 1 1 1.414 1.414l-4 4a1 1 0 0 1-1.414 0l-4-4-.068-.076a1 1 0 0 1 1.406-1.406l.076.068L16 17.586z"/></symbol>
336
337
  <symbol id="sync" viewBox="0 0 24 24" class="pdsicon"><path fill-rule="evenodd" d="M17.645 7.06a7.502 7.502 0 0 0-13.104 4.153A1 1 0 0 1 2.55 11 9.49 9.49 0 0 1 7.25 3.773c4.129-2.384 9.303-1.316 12.182 2.308l.109-.406a1 1 0 1 1 1.931.518l-.732 2.732a1 1 0 0 1-1.224.707L16.784 8.9a1 1 0 1 1 .517-1.932zM20.56 11.9a1 1 0 0 1 .888 1.1 9.49 9.49 0 0 1-4.698 7.228c-4.128 2.384-9.302 1.317-12.181-2.307l-.109.405a1 1 0 0 1-1.932-.518l.732-2.732a1 1 0 0 1 1.225-.707l2.732.732a1 1 0 0 1-.518 1.932l-.344-.092a7.503 7.503 0 0 0 13.105-4.153 1 1 0 0 1 1.1-.888"/></symbol>
337
338
  <symbol id="tablet-landscape" viewBox="0 0 24 24" class="pdsicon"><path fill-rule="evenodd" d="M1 16.839V7.16c0-.527 0-.981.03-1.356.033-.395.104-.789.297-1.167a3 3 0 0 1 1.311-1.311c.378-.193.772-.264 1.167-.296C4.18 3 4.635 3 5.161 3H18.84c.527 0 .982 0 1.356.03.395.033.789.104 1.167.297a3 3 0 0 1 1.311 1.311c.193.378.264.772.296 1.167.031.375.031.83.031 1.356v9.678c0 .527 0 .982-.03 1.356-.033.395-.104.789-.297 1.167a3 3 0 0 1-1.311 1.311c-.378.193-.772.264-1.167.296-.375.031-.83.031-1.357.031H5.162c-.527 0-.981 0-1.356-.03-.395-.033-.789-.104-1.167-.297a3 3 0 0 1-1.311-1.311c-.193-.378-.264-.772-.296-1.167C1 17.82 1 17.365 1 16.838m2.024 1.193c.022.272.06.372.085.422a1 1 0 0 0 .437.437c.05.025.15.063.422.085C4.25 19 4.623 19 5.2 19h13.6c.577 0 .949 0 1.232-.024.272-.022.373-.06.422-.085a1 1 0 0 0 .437-.437c.025-.05.063-.15.085-.422C21 17.75 21 17.377 21 16.8V7.2c0-.577 0-.949-.024-1.232-.022-.272-.06-.373-.085-.422a1 1 0 0 0-.437-.437c-.05-.025-.15-.063-.422-.085C19.75 5 19.377 5 18.8 5H5.2c-.577 0-.949 0-1.232.024-.272.022-.373.06-.422.085a1 1 0 0 0-.437.437c-.025.05-.063.15-.085.422C3 6.25 3 6.623 3 7.2v9.6c0 .577 0 .949.024 1.232M17.5 13.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3"/></symbol>
338
339
  <symbol id="tablet-portrait" viewBox="0 0 24 24" class="pdsicon"><path fill-rule="evenodd" d="M7.161 1h9.678c.527 0 .982 0 1.356.03.395.033.789.104 1.167.297a3 3 0 0 1 1.311 1.311c.193.378.264.772.296 1.167.031.375.031.83.031 1.356V18.84c0 .527 0 .982-.03 1.356-.033.395-.104.789-.297 1.167a3 3 0 0 1-1.311 1.311c-.378.193-.772.264-1.167.296-.375.031-.83.031-1.356.031H7.16c-.527 0-.981 0-1.356-.03-.395-.033-.789-.104-1.167-.297a3 3 0 0 1-1.311-1.311c-.193-.378-.264-.772-.296-1.167A18 18 0 0 1 3 18.838V5.162c0-.527 0-.981.03-1.356.033-.395.104-.789.297-1.167a3 3 0 0 1 1.311-1.311c.378-.193.772-.264 1.167-.296C6.18 1 6.635 1 7.161 1M5.968 3.024c-.272.022-.373.06-.422.085a1 1 0 0 0-.437.437c-.025.05-.063.15-.085.422C5 4.25 5 4.623 5 5.2v13.6c0 .577 0 .949.024 1.232.022.272.06.373.085.422a1 1 0 0 0 .437.437c.05.025.15.063.422.085C6.25 21 6.623 21 7.2 21h9.6c.577 0 .949 0 1.232-.024.272-.022.372-.06.422-.085a1 1 0 0 0 .437-.437c.025-.05.063-.15.085-.422C19 19.75 19 19.377 19 18.8V5.2c0-.577 0-.949-.024-1.232-.022-.272-.06-.373-.085-.422a1 1 0 0 0-.437-.437c-.05-.025-.15-.063-.422-.085C17.75 3 17.377 3 16.8 3H7.2c-.577 0-.949 0-1.232.024M10.5 17.5a1.5 1.5 0 1 1 3 0 1.5 1.5 0 0 1-3 0"/></symbol>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="pdsicon"><path d="M6 20V6.414L3.707 8.707a1 1 0 1 1-1.414-1.414l4-4 .076-.068a1 1 0 0 1 1.338.068l4 4 .068.076a1 1 0 0 1-1.406 1.406l-.076-.068L8 6.414V20a1 1 0 1 1-2 0M16 4a1 1 0 1 1 2 0v13.586l2.293-2.293a1 1 0 1 1 1.414 1.414l-4 4a1 1 0 0 1-1.414 0l-4-4-.068-.076a1 1 0 0 1 1.406-1.406l.076.068L16 17.586z"/></svg>
@@ -25,7 +25,7 @@ export declare class PdsIcon {
25
25
  * it will set the `src` property. Otherwise it assumes it's a built-in named
26
26
  * SVG and sets the `name` property.
27
27
  */
28
- icon?: string;
28
+ icon?: any;
29
29
  /**
30
30
  * The name of the icon to use from
31
31
  * the built-in set.
@@ -55,7 +55,6 @@ export declare class PdsIcon {
55
55
  /*****
56
56
  * Private Methods
57
57
  ****/
58
- private debugIconState;
59
58
  private waitUntilVisible;
60
59
  private hasAriaHidden;
61
60
  }
@@ -1,2 +1,2 @@
1
1
  export declare const pdsIconContent: Map<string, string>;
2
- export declare const getSvgContent: (url: string, sanitize?: boolean, retryCount?: number) => Promise<any>;
2
+ export declare const getSvgContent: (url: string, sanitize?: boolean) => Promise<any>;
@@ -18,7 +18,7 @@ export namespace Components {
18
18
  /**
19
19
  * This is a combination of both `name` and `src`. If a `src` URL is detected, it will set the `src` property. Otherwise it assumes it's a built-in named SVG and sets the `name` property.
20
20
  */
21
- "icon"?: string;
21
+ "icon"?: any;
22
22
  /**
23
23
  * The name of the icon to use from the built-in set.
24
24
  */
@@ -62,7 +62,7 @@ declare namespace LocalJSX {
62
62
  /**
63
63
  * This is a combination of both `name` and `src`. If a `src` URL is detected, it will set the `src` property. Otherwise it assumes it's a built-in named SVG and sets the `name` property.
64
64
  */
65
- "icon"?: string;
65
+ "icon"?: any;
66
66
  /**
67
67
  * The name of the icon to use from the built-in set.
68
68
  */
package/icons/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- /* pds-icons v9.5.0, Types */
1
+ /* pds-icons v9.5.1, Types */
2
2
 
3
3
  export declare var accessKey: string
4
4
  export declare var activity: string
@@ -323,6 +323,7 @@ export declare var subscript: string
323
323
  export declare var subscriptions: string
324
324
  export declare var superAdmin: string
325
325
  export declare var superscript: string
326
+ export declare var switchVertical: string
326
327
  export declare var sync: string
327
328
  export declare var tabletLandscape: string
328
329
  export declare var tabletPortrait: string
package/icons/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /* pds-icons v9.5.0, CommonJs */
1
+ /* pds-icons v9.5.1, CommonJs */
2
2
 
3
3
  exports.accessKey = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' class='pdsicon'><path fill-rule='evenodd' d='M8 9a7 7 0 1 1 6.06 6.937 14 14 0 0 0-.514-.062l-.01.008a9 9 0 0 0-.25.245l-1.579 1.58A1 1 0 0 1 11 18h-1v1a1 1 0 0 1-1 1H8v1a1 1 0 0 1-1 1H4.568c-.252 0-.498 0-.706-.017a2 2 0 0 1-.77-.201 2 2 0 0 1-.874-.874 2 2 0 0 1-.201-.77C2 19.93 2 19.684 2 19.432v-1.82c0-.19-.001-.43.055-.665a2 2 0 0 1 .24-.578c.126-.206.296-.375.43-.509l.036-.036 5.111-5.11c.126-.126.196-.197.245-.25l.008-.01-.003-.045c-.01-.103-.03-.244-.06-.469A7 7 0 0 1 8 9m0 9v-1a1 1 0 0 1 1-1h1.586l1.286-1.286.052-.053c.18-.18.398-.4.646-.539a1.8 1.8 0 0 1 .693-.234c.193-.027.382-.014.52 0 .145.014.324.038.525.065l.018.002q.33.045.674.045a5 5 0 1 0-4.955-4.326l.002.018c.027.201.051.38.065.524.014.14.027.328 0 .521-.038.265-.104.46-.234.693-.14.248-.359.466-.54.646l-.052.052-5.11 5.11a6 6 0 0 0-.171.175l-.002.002v.004a6 6 0 0 0-.003.244V19.4a8 8 0 0 0 .011.588l.014.002c.116.01.278.01.575.01H6v-1a1 1 0 0 1 1-1zm6-11a1 1 0 0 1 1-1c.766 0 1.536.293 2.121.879.586.585.879 1.355.879 2.12A1 1 0 1 1 16 9a1 1 0 0 0-.293-.707A1 1 0 0 0 15 8a1 1 0 0 1-1-1'/></svg>"
4
4
  exports.activity = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' class='pdsicon'><path fill-rule='evenodd' d='M9 2a1 1 0 0 1 .949.684L15 17.838l2.051-6.154A1 1 0 0 1 18 11h4a1 1 0 1 1 0 2h-3.28l-2.771 8.316a1 1 0 0 1-1.898 0L9 6.162l-2.051 6.154A1 1 0 0 1 6 13H2a1 1 0 1 1 0-2h3.28L8.05 2.684A1 1 0 0 1 9 2'/></svg>"
@@ -323,6 +323,7 @@ exports.subscript = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/
323
323
  exports.subscriptions = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' class='pdsicon'><path d='M18.404 3.071A11 11 0 0 1 21.72 6.86 11 11 0 1 1 1 12a.92.92 0 1 1 1.83 0 9.16 9.16 0 0 0 14.43 7.53 9.161 9.161 0 1 0-12-13.74L8.02 5a.928.928 0 0 1 .49 1.79L3.22 8.2a.9.9 0 0 1-.28 0h-.07a.9.9 0 0 1-.31-.09L2.39 8l-.08-.08a1.2 1.2 0 0 1-.15-.27.13.13 0 0 0 0-.06 1 1 0 0 1 0-.27v-.08l.67-5.28a.92.92 0 0 1 1-.8.93.93 0 0 1 .8 1l-.24 1.92a11 11 0 0 1 14.014-1.009'/><path d='M10.98 15.49h1.87a1.31 1.31 0 0 0 0-2.62h-1.74a3.05 3.05 0 1 1 0-6.1v-.43a.87.87 0 0 1 1.74 0v.43h.14a2.91 2.91 0 0 1 2.91 2.91.87.87 0 0 1-1.74 0 1.16 1.16 0 0 0-1.12-1.16h-1.88a1.31 1.31 0 1 0 0 2.61h1.74a3.05 3.05 0 1 1 0 6.1v.43a.87.87 0 0 1-1.74 0v-.43h-.18a2.9 2.9 0 0 1-2.9-2.91.87.87 0 0 1 1.74 0 1.16 1.16 0 0 0 1.16 1.17'/></svg>"
324
324
  exports.superAdmin = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' class='pdsicon'><path d='M11.542 7.417c1.008 0 1.833.825 1.833 1.833v.458c0 .55-.183 1.1-.55 1.559S12 12 11.542 12c-.459 0-.917-.275-1.284-.733a2.5 2.5 0 0 1-.55-1.559V9.25c0-1.008.825-1.833 1.834-1.833M15.208 12.917c.275 0 .459.183.459.458v.917h-.917v-.917c0-.275.183-.458.458-.458M13.833 16.583v-1.375h2.75v1.375z'/><path fill-rule='evenodd' d='M12 1C5.95 1 1 5.95 1 12s4.95 11 11 11 11-4.95 11-11S18.05 1 12 1m-.458 11.917a8.9 8.9 0 0 0-3.025.55.88.88 0 0 0-.642.825v1.375h3.208c.275 0 .459.183.459.458s-.184.458-.459.458H7.417c-.275 0-.459-.183-.459-.458v-1.833c0-.825.459-1.467 1.284-1.742.285-.114.606-.193.962-.28q.324-.078.688-.178l-.275-.275c-.459-.642-.734-1.375-.734-2.109V9.25c0-1.558 1.192-2.75 2.75-2.75s2.75 1.192 2.75 2.75v.458c0 .734-.275 1.559-.733 2.109-.642.641-1.283 1.1-2.108 1.1m5.958 4.125c0 .275-.183.458-.458.458h-3.667c-.275 0-.458-.183-.458-.458V14.75c0-.275.183-.458.458-.458h.458v-.917c0-.733.642-1.375 1.375-1.375.734 0 1.375.642 1.375 1.375v.917h.459c.275 0 .458.183.458.458z'/></svg>"
325
325
  exports.superscript = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' class='pdsicon'><path d='M17 11.002h4c.265 0 .52-.056.707-.243A1 1 0 0 0 21 9.05h-2.85c.13-.27.38-.4.8-.6q.037-.016.073-.034C20.17 7.875 22 7.009 22 5.05a3 3 0 0 0-.73-2 3.1 3.1 0 0 0-3.87-.64 3 3 0 0 0-1.34 1.6 1.002 1.002 0 0 0 .985 1.394 1 1 0 0 0 .895-.724 1 1 0 0 1 .45-.53 1.11 1.11 0 0 1 1.37.22.94.94 0 0 1 .24.63c0 .6-.86 1.1-1.93 1.6a3.22 3.22 0 0 0-2.07 3.4 1 1 0 0 0 1 1M12.616 17.926A1 1 0 0 0 13 18a1 1 0 0 0 .71-1.71L9.41 12l4.3-4.29A1.005 1.005 0 0 0 13 5.996a1 1 0 0 0-.71.294L8 10.59l-4.29-4.3a1.004 1.004 0 0 0-1.42 1.42L6.59 12l-4.3 4.29a1.004 1.004 0 0 0 1.42 1.42L8 13.41l4.29 4.3a1 1 0 0 0 .326.216'/></svg>"
326
+ exports.switchVertical = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' class='pdsicon'><path d='M6 20V6.414L3.707 8.707a1 1 0 1 1-1.414-1.414l4-4 .076-.068a1 1 0 0 1 1.338.068l4 4 .068.076a1 1 0 0 1-1.406 1.406l-.076-.068L8 6.414V20a1 1 0 1 1-2 0M16 4a1 1 0 1 1 2 0v13.586l2.293-2.293a1 1 0 1 1 1.414 1.414l-4 4a1 1 0 0 1-1.414 0l-4-4-.068-.076a1 1 0 0 1 1.406-1.406l.076.068L16 17.586z'/></svg>"
326
327
  exports.sync = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' class='pdsicon'><path fill-rule='evenodd' d='M17.645 7.06a7.502 7.502 0 0 0-13.104 4.153A1 1 0 0 1 2.55 11 9.49 9.49 0 0 1 7.25 3.773c4.129-2.384 9.303-1.316 12.182 2.308l.109-.406a1 1 0 1 1 1.931.518l-.732 2.732a1 1 0 0 1-1.224.707L16.784 8.9a1 1 0 1 1 .517-1.932zM20.56 11.9a1 1 0 0 1 .888 1.1 9.49 9.49 0 0 1-4.698 7.228c-4.128 2.384-9.302 1.317-12.181-2.307l-.109.405a1 1 0 0 1-1.932-.518l.732-2.732a1 1 0 0 1 1.225-.707l2.732.732a1 1 0 0 1-.518 1.932l-.344-.092a7.503 7.503 0 0 0 13.105-4.153 1 1 0 0 1 1.1-.888'/></svg>"
327
328
  exports.tabletLandscape = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' class='pdsicon'><path fill-rule='evenodd' d='M1 16.839V7.16c0-.527 0-.981.03-1.356.033-.395.104-.789.297-1.167a3 3 0 0 1 1.311-1.311c.378-.193.772-.264 1.167-.296C4.18 3 4.635 3 5.161 3H18.84c.527 0 .982 0 1.356.03.395.033.789.104 1.167.297a3 3 0 0 1 1.311 1.311c.193.378.264.772.296 1.167.031.375.031.83.031 1.356v9.678c0 .527 0 .982-.03 1.356-.033.395-.104.789-.297 1.167a3 3 0 0 1-1.311 1.311c-.378.193-.772.264-1.167.296-.375.031-.83.031-1.357.031H5.162c-.527 0-.981 0-1.356-.03-.395-.033-.789-.104-1.167-.297a3 3 0 0 1-1.311-1.311c-.193-.378-.264-.772-.296-1.167C1 17.82 1 17.365 1 16.838m2.024 1.193c.022.272.06.372.085.422a1 1 0 0 0 .437.437c.05.025.15.063.422.085C4.25 19 4.623 19 5.2 19h13.6c.577 0 .949 0 1.232-.024.272-.022.373-.06.422-.085a1 1 0 0 0 .437-.437c.025-.05.063-.15.085-.422C21 17.75 21 17.377 21 16.8V7.2c0-.577 0-.949-.024-1.232-.022-.272-.06-.373-.085-.422a1 1 0 0 0-.437-.437c-.05-.025-.15-.063-.422-.085C19.75 5 19.377 5 18.8 5H5.2c-.577 0-.949 0-1.232.024-.272.022-.373.06-.422.085a1 1 0 0 0-.437.437c-.025.05-.063.15-.085.422C3 6.25 3 6.623 3 7.2v9.6c0 .577 0 .949.024 1.232M17.5 13.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3'/></svg>"
328
329
  exports.tabletPortrait = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' class='pdsicon'><path fill-rule='evenodd' d='M7.161 1h9.678c.527 0 .982 0 1.356.03.395.033.789.104 1.167.297a3 3 0 0 1 1.311 1.311c.193.378.264.772.296 1.167.031.375.031.83.031 1.356V18.84c0 .527 0 .982-.03 1.356-.033.395-.104.789-.297 1.167a3 3 0 0 1-1.311 1.311c-.378.193-.772.264-1.167.296-.375.031-.83.031-1.356.031H7.16c-.527 0-.981 0-1.356-.03-.395-.033-.789-.104-1.167-.297a3 3 0 0 1-1.311-1.311c-.193-.378-.264-.772-.296-1.167A18 18 0 0 1 3 18.838V5.162c0-.527 0-.981.03-1.356.033-.395.104-.789.297-1.167a3 3 0 0 1 1.311-1.311c.378-.193.772-.264 1.167-.296C6.18 1 6.635 1 7.161 1M5.968 3.024c-.272.022-.373.06-.422.085a1 1 0 0 0-.437.437c-.025.05-.063.15-.085.422C5 4.25 5 4.623 5 5.2v13.6c0 .577 0 .949.024 1.232.022.272.06.373.085.422a1 1 0 0 0 .437.437c.05.025.15.063.422.085C6.25 21 6.623 21 7.2 21h9.6c.577 0 .949 0 1.232-.024.272-.022.372-.06.422-.085a1 1 0 0 0 .437-.437c.025-.05.063-.15.085-.422C19 19.75 19 19.377 19 18.8V5.2c0-.577 0-.949-.024-1.232-.022-.272-.06-.373-.085-.422a1 1 0 0 0-.437-.437c-.05-.025-.15-.063-.422-.085C17.75 3 17.377 3 16.8 3H7.2c-.577 0-.949 0-1.232.024M10.5 17.5a1.5 1.5 0 1 1 3 0 1.5 1.5 0 0 1-3 0'/></svg>"
package/icons/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- /* pds-icons v9.5.0, ES Modules */
1
+ /* pds-icons v9.5.1, ES Modules */
2
2
 
3
3
  export const accessKey = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' class='pdsicon'><path fill-rule='evenodd' d='M8 9a7 7 0 1 1 6.06 6.937 14 14 0 0 0-.514-.062l-.01.008a9 9 0 0 0-.25.245l-1.579 1.58A1 1 0 0 1 11 18h-1v1a1 1 0 0 1-1 1H8v1a1 1 0 0 1-1 1H4.568c-.252 0-.498 0-.706-.017a2 2 0 0 1-.77-.201 2 2 0 0 1-.874-.874 2 2 0 0 1-.201-.77C2 19.93 2 19.684 2 19.432v-1.82c0-.19-.001-.43.055-.665a2 2 0 0 1 .24-.578c.126-.206.296-.375.43-.509l.036-.036 5.111-5.11c.126-.126.196-.197.245-.25l.008-.01-.003-.045c-.01-.103-.03-.244-.06-.469A7 7 0 0 1 8 9m0 9v-1a1 1 0 0 1 1-1h1.586l1.286-1.286.052-.053c.18-.18.398-.4.646-.539a1.8 1.8 0 0 1 .693-.234c.193-.027.382-.014.52 0 .145.014.324.038.525.065l.018.002q.33.045.674.045a5 5 0 1 0-4.955-4.326l.002.018c.027.201.051.38.065.524.014.14.027.328 0 .521-.038.265-.104.46-.234.693-.14.248-.359.466-.54.646l-.052.052-5.11 5.11a6 6 0 0 0-.171.175l-.002.002v.004a6 6 0 0 0-.003.244V19.4a8 8 0 0 0 .011.588l.014.002c.116.01.278.01.575.01H6v-1a1 1 0 0 1 1-1zm6-11a1 1 0 0 1 1-1c.766 0 1.536.293 2.121.879.586.585.879 1.355.879 2.12A1 1 0 1 1 16 9a1 1 0 0 0-.293-.707A1 1 0 0 0 15 8a1 1 0 0 1-1-1'/></svg>"
4
4
  export const activity = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' class='pdsicon'><path fill-rule='evenodd' d='M9 2a1 1 0 0 1 .949.684L15 17.838l2.051-6.154A1 1 0 0 1 18 11h4a1 1 0 1 1 0 2h-3.28l-2.771 8.316a1 1 0 0 1-1.898 0L9 6.162l-2.051 6.154A1 1 0 0 1 6 13H2a1 1 0 1 1 0-2h3.28L8.05 2.684A1 1 0 0 1 9 2'/></svg>"
@@ -323,6 +323,7 @@ export const subscript = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/
323
323
  export const subscriptions = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' class='pdsicon'><path d='M18.404 3.071A11 11 0 0 1 21.72 6.86 11 11 0 1 1 1 12a.92.92 0 1 1 1.83 0 9.16 9.16 0 0 0 14.43 7.53 9.161 9.161 0 1 0-12-13.74L8.02 5a.928.928 0 0 1 .49 1.79L3.22 8.2a.9.9 0 0 1-.28 0h-.07a.9.9 0 0 1-.31-.09L2.39 8l-.08-.08a1.2 1.2 0 0 1-.15-.27.13.13 0 0 0 0-.06 1 1 0 0 1 0-.27v-.08l.67-5.28a.92.92 0 0 1 1-.8.93.93 0 0 1 .8 1l-.24 1.92a11 11 0 0 1 14.014-1.009'/><path d='M10.98 15.49h1.87a1.31 1.31 0 0 0 0-2.62h-1.74a3.05 3.05 0 1 1 0-6.1v-.43a.87.87 0 0 1 1.74 0v.43h.14a2.91 2.91 0 0 1 2.91 2.91.87.87 0 0 1-1.74 0 1.16 1.16 0 0 0-1.12-1.16h-1.88a1.31 1.31 0 1 0 0 2.61h1.74a3.05 3.05 0 1 1 0 6.1v.43a.87.87 0 0 1-1.74 0v-.43h-.18a2.9 2.9 0 0 1-2.9-2.91.87.87 0 0 1 1.74 0 1.16 1.16 0 0 0 1.16 1.17'/></svg>"
324
324
  export const superAdmin = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' class='pdsicon'><path d='M11.542 7.417c1.008 0 1.833.825 1.833 1.833v.458c0 .55-.183 1.1-.55 1.559S12 12 11.542 12c-.459 0-.917-.275-1.284-.733a2.5 2.5 0 0 1-.55-1.559V9.25c0-1.008.825-1.833 1.834-1.833M15.208 12.917c.275 0 .459.183.459.458v.917h-.917v-.917c0-.275.183-.458.458-.458M13.833 16.583v-1.375h2.75v1.375z'/><path fill-rule='evenodd' d='M12 1C5.95 1 1 5.95 1 12s4.95 11 11 11 11-4.95 11-11S18.05 1 12 1m-.458 11.917a8.9 8.9 0 0 0-3.025.55.88.88 0 0 0-.642.825v1.375h3.208c.275 0 .459.183.459.458s-.184.458-.459.458H7.417c-.275 0-.459-.183-.459-.458v-1.833c0-.825.459-1.467 1.284-1.742.285-.114.606-.193.962-.28q.324-.078.688-.178l-.275-.275c-.459-.642-.734-1.375-.734-2.109V9.25c0-1.558 1.192-2.75 2.75-2.75s2.75 1.192 2.75 2.75v.458c0 .734-.275 1.559-.733 2.109-.642.641-1.283 1.1-2.108 1.1m5.958 4.125c0 .275-.183.458-.458.458h-3.667c-.275 0-.458-.183-.458-.458V14.75c0-.275.183-.458.458-.458h.458v-.917c0-.733.642-1.375 1.375-1.375.734 0 1.375.642 1.375 1.375v.917h.459c.275 0 .458.183.458.458z'/></svg>"
325
325
  export const superscript = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' class='pdsicon'><path d='M17 11.002h4c.265 0 .52-.056.707-.243A1 1 0 0 0 21 9.05h-2.85c.13-.27.38-.4.8-.6q.037-.016.073-.034C20.17 7.875 22 7.009 22 5.05a3 3 0 0 0-.73-2 3.1 3.1 0 0 0-3.87-.64 3 3 0 0 0-1.34 1.6 1.002 1.002 0 0 0 .985 1.394 1 1 0 0 0 .895-.724 1 1 0 0 1 .45-.53 1.11 1.11 0 0 1 1.37.22.94.94 0 0 1 .24.63c0 .6-.86 1.1-1.93 1.6a3.22 3.22 0 0 0-2.07 3.4 1 1 0 0 0 1 1M12.616 17.926A1 1 0 0 0 13 18a1 1 0 0 0 .71-1.71L9.41 12l4.3-4.29A1.005 1.005 0 0 0 13 5.996a1 1 0 0 0-.71.294L8 10.59l-4.29-4.3a1.004 1.004 0 0 0-1.42 1.42L6.59 12l-4.3 4.29a1.004 1.004 0 0 0 1.42 1.42L8 13.41l4.29 4.3a1 1 0 0 0 .326.216'/></svg>"
326
+ export const switchVertical = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' class='pdsicon'><path d='M6 20V6.414L3.707 8.707a1 1 0 1 1-1.414-1.414l4-4 .076-.068a1 1 0 0 1 1.338.068l4 4 .068.076a1 1 0 0 1-1.406 1.406l-.076-.068L8 6.414V20a1 1 0 1 1-2 0M16 4a1 1 0 1 1 2 0v13.586l2.293-2.293a1 1 0 1 1 1.414 1.414l-4 4a1 1 0 0 1-1.414 0l-4-4-.068-.076a1 1 0 0 1 1.406-1.406l.076.068L16 17.586z'/></svg>"
326
327
  export const sync = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' class='pdsicon'><path fill-rule='evenodd' d='M17.645 7.06a7.502 7.502 0 0 0-13.104 4.153A1 1 0 0 1 2.55 11 9.49 9.49 0 0 1 7.25 3.773c4.129-2.384 9.303-1.316 12.182 2.308l.109-.406a1 1 0 1 1 1.931.518l-.732 2.732a1 1 0 0 1-1.224.707L16.784 8.9a1 1 0 1 1 .517-1.932zM20.56 11.9a1 1 0 0 1 .888 1.1 9.49 9.49 0 0 1-4.698 7.228c-4.128 2.384-9.302 1.317-12.181-2.307l-.109.405a1 1 0 0 1-1.932-.518l.732-2.732a1 1 0 0 1 1.225-.707l2.732.732a1 1 0 0 1-.518 1.932l-.344-.092a7.503 7.503 0 0 0 13.105-4.153 1 1 0 0 1 1.1-.888'/></svg>"
327
328
  export const tabletLandscape = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' class='pdsicon'><path fill-rule='evenodd' d='M1 16.839V7.16c0-.527 0-.981.03-1.356.033-.395.104-.789.297-1.167a3 3 0 0 1 1.311-1.311c.378-.193.772-.264 1.167-.296C4.18 3 4.635 3 5.161 3H18.84c.527 0 .982 0 1.356.03.395.033.789.104 1.167.297a3 3 0 0 1 1.311 1.311c.193.378.264.772.296 1.167.031.375.031.83.031 1.356v9.678c0 .527 0 .982-.03 1.356-.033.395-.104.789-.297 1.167a3 3 0 0 1-1.311 1.311c-.378.193-.772.264-1.167.296-.375.031-.83.031-1.357.031H5.162c-.527 0-.981 0-1.356-.03-.395-.033-.789-.104-1.167-.297a3 3 0 0 1-1.311-1.311c-.193-.378-.264-.772-.296-1.167C1 17.82 1 17.365 1 16.838m2.024 1.193c.022.272.06.372.085.422a1 1 0 0 0 .437.437c.05.025.15.063.422.085C4.25 19 4.623 19 5.2 19h13.6c.577 0 .949 0 1.232-.024.272-.022.373-.06.422-.085a1 1 0 0 0 .437-.437c.025-.05.063-.15.085-.422C21 17.75 21 17.377 21 16.8V7.2c0-.577 0-.949-.024-1.232-.022-.272-.06-.373-.085-.422a1 1 0 0 0-.437-.437c-.05-.025-.15-.063-.422-.085C19.75 5 19.377 5 18.8 5H5.2c-.577 0-.949 0-1.232.024-.272.022-.373.06-.422.085a1 1 0 0 0-.437.437c-.025.05-.063.15-.085.422C3 6.25 3 6.623 3 7.2v9.6c0 .577 0 .949.024 1.232M17.5 13.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3'/></svg>"
328
329
  export const tabletPortrait = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' class='pdsicon'><path fill-rule='evenodd' d='M7.161 1h9.678c.527 0 .982 0 1.356.03.395.033.789.104 1.167.297a3 3 0 0 1 1.311 1.311c.193.378.264.772.296 1.167.031.375.031.83.031 1.356V18.84c0 .527 0 .982-.03 1.356-.033.395-.104.789-.297 1.167a3 3 0 0 1-1.311 1.311c-.378.193-.772.264-1.167.296-.375.031-.83.031-1.356.031H7.16c-.527 0-.981 0-1.356-.03-.395-.033-.789-.104-1.167-.297a3 3 0 0 1-1.311-1.311c-.193-.378-.264-.772-.296-1.167A18 18 0 0 1 3 18.838V5.162c0-.527 0-.981.03-1.356.033-.395.104-.789.297-1.167a3 3 0 0 1 1.311-1.311c.378-.193.772-.264 1.167-.296C6.18 1 6.635 1 7.161 1M5.968 3.024c-.272.022-.373.06-.422.085a1 1 0 0 0-.437.437c-.025.05-.063.15-.085.422C5 4.25 5 4.623 5 5.2v13.6c0 .577 0 .949.024 1.232.022.272.06.373.085.422a1 1 0 0 0 .437.437c.05.025.15.063.422.085C6.25 21 6.623 21 7.2 21h9.6c.577 0 .949 0 1.232-.024.272-.022.372-.06.422-.085a1 1 0 0 0 .437-.437c.025-.05.063-.15.085-.422C19 19.75 19 19.377 19 18.8V5.2c0-.577 0-.949-.024-1.232-.022-.272-.06-.373-.085-.422a1 1 0 0 0-.437-.437c-.05-.025-.15-.063-.422-.085C17.75 3 17.377 3 16.8 3H7.2c-.577 0-.949 0-1.232.024M10.5 17.5a1.5 1.5 0 1 1 3 0 1.5 1.5 0 0 1-3 0'/></svg>"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pine-ds/icons/icons",
3
- "version": "9.5.0",
3
+ "version": "9.5.1",
4
4
  "module": "index.mjs",
5
5
  "main": "index.js",
6
6
  "typings": "index.d.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pine-ds/icons",
3
- "version": "9.5.1",
3
+ "version": "9.6.0",
4
4
  "license": "MIT",
5
5
  "description": "Pine Icon Library",
6
6
  "author": " Kajabi Design System Services",
@@ -1,2 +0,0 @@
1
- import{r as t,h as i,H as e,g as s}from"./p-BtVkVfWm.js";import{i as n,a as o,g as r,b as c,s as l,c as a}from"./p-6DkR999u.js";const h=t=>{const i=document.createElement("div");i.innerHTML=t;for(let t=i.childNodes.length-1;t>=0;t--){if(i.childNodes[t].nodeName.toLowerCase()!=="svg"){i.removeChild(i.childNodes[t])}}const e=i.firstElementChild;if(e&&e.nodeName.toLowerCase()==="svg"){const t=e.getAttribute("class")||"";e.setAttribute("class",(t+" s-pds-icon").trim());if(d(e)){return i.innerHTML}}return""};const d=t=>{if(t.nodeType===1){if(t.nodeName.toLowerCase()==="script"){return false}for(let i=0;i<t.attributes.length;i++){const e=t.attributes[i].name;if(n(e)&&e.toLowerCase().indexOf("on")===0){return false}}for(let i=0;i<t.childNodes.length;i++){if(!d(t.childNodes[i])){return false}}}return true};const f=t=>t.startsWith("data:image/svg+xml");const u=t=>t.indexOf(";utf8,")!==-1;const m=new Map;const p=new Map;let g;const b=(t,i=false,e=0)=>{let s=p.get(t);if(!s){if(typeof fetch!="undefined"&&typeof document!=="undefined"){if(f(t)&&u(t)){if(!g){g=new DOMParser}try{const i=g.parseFromString(t,"text/html");const e=i.querySelector("svg");if(e){m.set(t,e.outerHTML)}else{console.warn(`No SVG found in data URL: ${t}`);m.set(t,"")}}catch(i){console.error(`Failed to parse SVG data URL: ${t}`,i);m.set(t,"")}return Promise.resolve()}else{s=fetch(t,{method:"GET",headers:{Accept:"image/svg+xml,text/plain,*/*"},cache:"force-cache"}).then((e=>{if(e.ok){return e.text().then((e=>{if(e&&i!==false){e=h(e)}if(e){m.set(t,e)}else{console.warn(`Empty SVG content received for: ${t}`);m.set(t,"")}}))}else{throw new Error(`HTTP ${e.status}: ${e.statusText}`)}})).catch((s=>{console.error(`Failed to fetch icon ${t}:`,s);if(e<3){const s=Math.pow(2,e)*1e3;console.log(`Retrying icon load in ${s}ms (attempt ${e+1}/3): ${t}`);return new Promise((n=>{setTimeout((()=>{p.delete(t);n(b(t,i,e+1))}),s)}))}else{m.set(t,"");throw s}}));p.set(t,s)}}else{console.warn("Fetch or document not available, setting empty icon content");m.set(t,"");return Promise.resolve()}}return s};const w=":host{--dimension-icon-height:16px;--dimension-icon-width:16px;--color-icon-fill:currentColor;contain:strict;display:inline-block;fill:var(--color-icon-fill);flex-shrink:0;height:var(--dimension-icon-height);width:var(--dimension-icon-width)}:host .pdsicon{fill:var(--color-icon-fill)}.pds-icon-fill-none{fill:none}.icon-inner,.pds-icon,svg{display:block;height:100%;width:100%}:host(.flip-rtl):host-context([dir=rtl]) .icon-inner{transform:scaleX(-1)}:host(.flip-rtl:dir(rtl)) .icon-inner{transform:scaleX(-1)}:host(.flip-rtl:dir(ltr)) .icon-inner{transform:scaleX(1)}";const v=class{constructor(i){t(this,i);this.didLoadIcon=false;this.iconName=null;this.inheritedAttributes={};this.isVisible=false;this.size="regular";this.hasAriaHidden=()=>{const{el:t}=this;return t.hasAttribute("aria-hidden")&&t.getAttribute("aria-hidden")==="true"}}iconSize(){const t={small:"12px",regular:"16px",medium:"20px",large:"24px"};if(t[this.size]){return t[this.size]}else{return this.size}}componentDidLoad(){this.setCSSVariables();setTimeout((()=>{if(!this.didLoadIcon||!this.svgContent){console.warn("Icon not loaded after component mount, forcing load attempt");this.isVisible=true;this.loadIcon()}}),50)}componentWillLoad(){this.inheritedAttributes=o(this.el,["aria-label"]);this.setCSSVariables()}setCSSVariables(){this.el.style.setProperty(`--dimension-icon-height`,this.iconSize());this.el.style.setProperty(`--dimension-icon-width`,this.iconSize());this.el.style.setProperty(`--color-icon-fill`,typeof this.color!=="undefined"?this.color:"currentColor")}connectedCallback(){const t=setTimeout((()=>{if(!this.isVisible){console.warn("IntersectionObserver timeout, forcing icon visibility");this.isVisible=true;this.loadIcon()}}),100);this.waitUntilVisible(this.el,"50px",(()=>{clearTimeout(t);this.isVisible=true;this.loadIcon()}))}disconnectedCallback(){if(this.io){this.io.disconnect();this.io=undefined}}updateStyles(){this.setCSSVariables()}loadIcon(){{const t=r(this);if(t){if(m.has(t)){this.svgContent=m.get(t)}else{const i=new Promise(((t,i)=>{setTimeout((()=>i(new Error("Icon loading timeout"))),1e4)}));Promise.race([b(t),i]).then((()=>{this.svgContent=m.get(t);if(!this.svgContent){console.warn(`Icon content not found after successful load: ${t}`)}})).catch((i=>{console.error(`Failed to load icon: ${t}`,i);m.set(t,"");this.svgContent=""}))}this.didLoadIcon=true}}this.iconName=c(this.name,this.icon);if(this.iconName){this.ariaLabel=this.iconName.replace(/\-/g," ")}}render(){const{ariaLabel:t,flipRtl:s,iconName:n,inheritedAttributes:o}=this;const r=n?l(n,this.el)&&s!==false:false;const c=s||r;this.debugIconState();return i(e,Object.assign({key:"82420f9d474c932c9ed82bbf61b075cbbc67b6db","aria-label":t!==undefined&&!this.hasAriaHidden()?t:null,alt:"",role:"img",class:Object.assign(Object.assign({},y(this.color)),{"flip-rtl":c,"icon-rtl":c&&a(this.el)})},o),this.svgContent?i("div",{class:"icon-inner",innerHTML:this.svgContent}):i("div",{class:"icon-inner"}))}debugIconState(){if(typeof window!=="undefined"&&window.__PDS_ICON_DEBUG__){console.log("PDS Icon Debug:",{name:this.name,src:this.src,icon:this.icon,isVisible:this.isVisible,didLoadIcon:this.didLoadIcon,svgContent:this.svgContent?"loaded":"empty",url:r(this),hasIntersectionObserver:!!this.io,element:this.el})}}waitUntilVisible(t,i,e){if(typeof window!=="undefined"&&window.IntersectionObserver){try{const s=this.io=new window.IntersectionObserver((t=>{if(t[0].isIntersecting){s.disconnect();this.io=undefined;e()}}),{rootMargin:i});s.observe(t);setTimeout((()=>{if(this.io){console.warn("IntersectionObserver did not trigger within 5 seconds, forcing callback");this.io.disconnect();this.io=undefined;e()}}),5e3)}catch(t){console.error("IntersectionObserver initialization failed:",t);e()}}else{e()}}static get assetsDirs(){return["svg"]}get el(){return s(this)}static get watchers(){return{size:["updateStyles"],color:["updateStyles"],name:["loadIcon"],src:["loadIcon"],icon:["loadIcon"]}}};const y=t=>t?{"pds-color":true,[`pds-color-${t}`]:true}:null;v.style=w;export{v as pds_icon};
2
- //# sourceMappingURL=p-560fb565.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["validateContent","svgContent","div","document","createElement","innerHTML","i","childNodes","length","nodeName","toLowerCase","removeChild","svgElm","firstElementChild","svgClass","getAttribute","setAttribute","trim","isValid","elm","nodeType","attributes","name","isStr","indexOf","isSvgDataUrl","url","startsWith","isEncodedDataUrl","pdsIconContent","Map","requests","parser","getSvgContent","sanitize","retryCount","req","get","fetch","DOMParser","doc","parseFromString","svg","querySelector","set","outerHTML","console","warn","error","Promise","resolve","method","headers","Accept","cache","then","rsp","ok","text","Error","status","statusText","catch","delay","Math","pow","log","setTimeout","delete","pdsIconCss","PdsIcon","constructor","hostRef","this","didLoadIcon","iconName","inheritedAttributes","isVisible","size","hasAriaHidden","el","hasAttribute","iconSize","sizes","small","regular","medium","large","componentDidLoad","setCSSVariables","loadIcon","componentWillLoad","inheritAttributes","style","setProperty","color","connectedCallback","fallbackTimeout","waitUntilVisible","clearTimeout","disconnectedCallback","io","disconnect","undefined","updateStyles","getUrl","has","timeoutPromise","_","reject","race","getName","icon","ariaLabel","replace","render","flipRtl","shouldIconAutoFlip","shouldRtlFlipIcon","shouldFlip","debugIconState","h","Host","Object","assign","key","alt","role","class","createColorClasses","isRTL","window","__PDS_ICON_DEBUG__","src","hasIntersectionObserver","element","rootMargin","cb","IntersectionObserver","data","isIntersecting","observe"],"sources":["src/components/pds-icon/validate.ts","src/components/pds-icon/request.ts","src/components/pds-icon/pds-icon.scss?tag=pds-icon&encapsulation=shadow","src/components/pds-icon/pds-icon.tsx"],"sourcesContent":["import { isStr } from './utils';\n\nexport const validateContent = (svgContent: string) => {\n const div = document.createElement('div');\n div.innerHTML = svgContent;\n\n // setup this way to ensure it works on our buddy IE\n for (let i = div.childNodes.length - 1; i >= 0; i--) {\n if (div.childNodes[i].nodeName.toLowerCase() !== 'svg') {\n div.removeChild(div.childNodes[i]);\n }\n }\n\n // must only have 1 root element\n const svgElm = div.firstElementChild;\n if (svgElm && svgElm.nodeName.toLowerCase() === 'svg') {\n const svgClass = svgElm.getAttribute('class') || '';\n svgElm.setAttribute('class', (svgClass + ' s-pds-icon').trim());\n\n // root element must be an svg\n // lets double check we've got valid elements\n // do not allow scripts\n if (isValid(svgElm as HTMLElement)) {\n return div.innerHTML;\n }\n }\n return '';\n};\n\nexport const isValid = (elm: HTMLElement) => {\n if (elm.nodeType === 1) {\n if (elm.nodeName.toLowerCase() === 'script') {\n return false;\n }\n\n for (let i = 0; i < elm.attributes.length; i++) {\n const name = elm.attributes[i].name;\n if (isStr(name) && name.toLowerCase().indexOf('on') === 0) {\n return false;\n }\n }\n\n for (let i = 0; i < elm.childNodes.length; i++) {\n if (!isValid(elm.childNodes[i] as HTMLElement)) {\n return false;\n }\n }\n }\n return true;\n};\n\nexport const isSvgDataUrl = (url: string) => url.startsWith('data:image/svg+xml');\nexport const isEncodedDataUrl = (url: string) => url.indexOf(';utf8,') !== -1;\n","import { isEncodedDataUrl, isSvgDataUrl, validateContent } from './validate';\n\nexport const pdsIconContent = new Map<string, string>();\nconst requests = new Map<string, Promise<any>>(); // eslint-disable-line @typescript-eslint/no-explicit-any\n\nlet parser: DOMParser;\n\nexport const getSvgContent = (url: string, sanitize = false, retryCount = 0) => {\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 try {\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 } else {\n console.warn(`No SVG found in data URL: ${url}`);\n pdsIconContent.set(url, '');\n }\n } catch (error) {\n console.error(`Failed to parse SVG data URL: ${url}`, error);\n pdsIconContent.set(url, '');\n }\n\n return Promise.resolve();\n } else {\n // Add retry logic and better error handling\n req = fetch(url, {\n method: 'GET',\n headers: {\n 'Accept': 'image/svg+xml,text/plain,*/*'\n },\n cache: 'force-cache' // Aggressive caching for icons\n }).then((rsp) => {\n if (rsp.ok) {\n return rsp.text().then((svgContent) => {\n if (svgContent && sanitize !== false) {\n svgContent = validateContent(svgContent);\n }\n if (svgContent) {\n pdsIconContent.set(url, svgContent);\n } else {\n console.warn(`Empty SVG content received for: ${url}`);\n pdsIconContent.set(url, '');\n }\n });\n } else {\n throw new Error(`HTTP ${rsp.status}: ${rsp.statusText}`);\n }\n }).catch((error) => {\n console.error(`Failed to fetch icon ${url}:`, error);\n\n // Retry logic - attempt up to 3 times with exponential backoff\n if (retryCount < 3) {\n const delay = Math.pow(2, retryCount) * 1000; // 1s, 2s, 4s\n console.log(`Retrying icon load in ${delay}ms (attempt ${retryCount + 1}/3): ${url}`);\n\n return new Promise((resolve) => {\n setTimeout(() => {\n // Clear the failed request from cache to allow retry\n requests.delete(url);\n resolve(getSvgContent(url, sanitize, retryCount + 1));\n }, delay);\n });\n } else {\n // Final failure - set empty content to prevent infinite loading\n pdsIconContent.set(url, '');\n throw error;\n }\n });\n\n requests.set(url, req);\n }\n } else {\n console.warn('Fetch or document not available, setting empty icon content');\n pdsIconContent.set(url, '');\n return Promise.resolve();\n }\n }\n\n return req;\n}\n",":host {\n --dimension-icon-height: 16px;\n --dimension-icon-width: 16px;\n --color-icon-fill: currentColor;\n\n contain: strict;\n display: inline-block;\n fill: var(--color-icon-fill);\n flex-shrink: 0;\n height: var(--dimension-icon-height);\n width: var(--dimension-icon-width);\n\n .pdsicon {\n fill: var(--color-icon-fill);\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\n/* :host-context is supported in chromium; :dir is supported in safari & firefox */\n:host(.flip-rtl):host-context([dir='rtl']) .icon-inner {\n transform: scaleX(-1);\n}\n\n:host(.flip-rtl:dir(rtl)) .icon-inner {\n transform: scaleX(-1);\n}\n\n/**\n * This is needed for WebKit otherwise the fallback\n * will always cause the icon to be flipped if the document\n * loads in RTL.\n */\n:host(.flip-rtl:dir(ltr)) .icon-inner {\n transform: scaleX(1);\n}\n\n","import { Build, Component, Element, Host, Prop, State, Watch, h } from '@stencil/core';\nimport { getSvgContent, pdsIconContent } from './request';\nimport { getName, getUrl, inheritAttributes, isRTL, shouldRtlFlipIcon } 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 didLoadIcon = false;\n private iconName: string | null = null;\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 * Determines if the icon should be flipped when the `dir` is right-to-left (`\"rtl\"`).\n * This is automatically enabled for icons that are in the `ICONS_TO_FLIP` list and\n * when the `dir` is `\"rtl\"`. If `flipRtl` is set to `false`, the icon will not be flipped\n * even if the `dir` is `\"rtl\"`.\n */\n @Prop() flipRtl?: boolean;\n\n /**\n * This is 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 sets the `name` property.\n */\n @Prop() icon?: string;\n\n /**\n * The name of the icon to use from\n * the built-in set.\n */\n @Prop({ reflect: true }) name?: string;\n\n /**\n * The size of the icon. This can be\n * 'small', 'regular', 'medium', 'large', or a\n * custom value (40px, 1rem, etc)\n *\n */\n @Prop({ reflect: true }) size?:\n | 'small' // 12px\n | 'regular' // 16px\n | 'medium' // 20px\n | 'large' // 24px\n | 'auto'\n | string = 'regular'\n\n /**\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\n componentDidLoad() {\n this.setCSSVariables();\n\n // Always attempt to load icon, but add delay for IntersectionObserver to complete\n setTimeout(() => {\n if (!this.didLoadIcon || !this.svgContent) {\n console.warn('Icon not loaded after component mount, forcing load attempt');\n this.isVisible = true; // Force visibility for fallback loading\n this.loadIcon();\n }\n }, 50);\n }\n\n componentWillLoad() {\n this.inheritedAttributes = inheritAttributes(this.el, ['aria-label']);\n this.setCSSVariables();\n }\n\n setCSSVariables() {\n this.el.style.setProperty(`--dimension-icon-height`, this.iconSize());\n this.el.style.setProperty(`--dimension-icon-width`, this.iconSize());\n this.el.style.setProperty(`--color-icon-fill`, typeof this.color !== 'undefined' ? this.color : 'currentColor');\n }\n\n connectedCallback() {\n // Set a fallback timeout in case IntersectionObserver never fires\n // This prevents icons from never loading due to intersection issues\n const fallbackTimeout = setTimeout(() => {\n if (!this.isVisible) {\n console.warn('IntersectionObserver timeout, forcing icon visibility');\n this.isVisible = true;\n this.loadIcon();\n }\n }, 100); // 100ms fallback\n\n this.waitUntilVisible(this.el, '50px', () => {\n clearTimeout(fallbackTimeout);\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('size')\n @Watch('color')\n updateStyles() {\n this.setCSSVariables();\n }\n\n @Watch('name')\n @Watch('src')\n @Watch('icon')\n loadIcon() {\n if (Build.isBrowser) {\n const url = getUrl(this);\n if (url) {\n if (pdsIconContent.has(url)) {\n this.svgContent = pdsIconContent.get(url);\n } else {\n // Add comprehensive error handling and timeout\n const timeoutPromise = new Promise((_, reject) => {\n setTimeout(() => reject(new Error('Icon loading timeout')), 10000); // 10 second timeout\n });\n\n Promise.race([getSvgContent(url), timeoutPromise])\n .then(() => {\n this.svgContent = pdsIconContent.get(url);\n // Force re-render if content was loaded after initial render\n if (!this.svgContent) {\n console.warn(`Icon content not found after successful load: ${url}`);\n }\n })\n .catch((error) => {\n console.error(`Failed to load icon: ${url}`, error);\n // Set empty content to prevent infinite loading state\n pdsIconContent.set(url, '');\n this.svgContent = '';\n });\n }\n this.didLoadIcon = true;\n }\n }\n\n this.iconName = getName(this.name, this.icon);\n\n if (this.iconName) {\n this.ariaLabel = this.iconName.replace(/\\-/g, ' ');\n }\n }\n\n render() {\n const { ariaLabel, flipRtl, iconName,inheritedAttributes } = this;\n const shouldIconAutoFlip = iconName\n ? shouldRtlFlipIcon(iconName, this.el) && flipRtl !== false\n : false;\n const shouldFlip = flipRtl || shouldIconAutoFlip;\n\n // Debug information when enabled\n this.debugIconState();\n\n return (\n\n <Host\n aria-label={ariaLabel !== undefined && !this.hasAriaHidden() ? ariaLabel : null }\n alt=\"\"\n role=\"img\"\n class={{\n ...createColorClasses(this.color),\n 'flip-rtl': shouldFlip,\n 'icon-rtl': shouldFlip && isRTL(this.el)\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 debugIconState() {\n if (typeof window !== 'undefined' && (window as Window & { __PDS_ICON_DEBUG__?: boolean }).__PDS_ICON_DEBUG__) {\n console.log('PDS Icon Debug:', {\n name: this.name,\n src: this.src,\n icon: this.icon,\n isVisible: this.isVisible,\n didLoadIcon: this.didLoadIcon,\n svgContent: this.svgContent ? 'loaded' : 'empty',\n url: getUrl(this),\n hasIntersectionObserver: !!this.io,\n element: this.el\n });\n }\n }\n\n private waitUntilVisible(el: HTMLElement, rootMargin: string, cb: () => void) {\n if (Build.isBrowser && typeof window !== 'undefined' && (window).IntersectionObserver) {\n try {\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\n // Add a safety timeout for IntersectionObserver\n setTimeout(() => {\n if (this.io) {\n console.warn('IntersectionObserver did not trigger within 5 seconds, forcing callback');\n this.io.disconnect();\n this.io = undefined;\n cb();\n }\n }, 5000);\n } catch (error) {\n console.error('IntersectionObserver initialization failed:', error);\n // Fall back to immediate execution\n cb();\n }\n } else {\n // browser doesn't support IntersectionObserver\n // so just fallback to always show it\n cb();\n }\n }\n\n private hasAriaHidden = () => {\n const { el } = this;\n\n return el.hasAttribute('aria-hidden') && el.getAttribute('aria-hidden') === 'true';\n }\n}\n\nconst createColorClasses = (color: string | undefined) => {\n return color\n ? {\n 'pds-color': true,\n [`pds-color-${color}`]: true,\n }\n : null;\n };\n"],"mappings":"gIAEO,MAAMA,EAAmBC,IAC9B,MAAMC,EAAMC,SAASC,cAAc,OACnCF,EAAIG,UAAYJ,EAGhB,IAAK,IAAIK,EAAIJ,EAAIK,WAAWC,OAAS,EAAGF,GAAK,EAAGA,IAAK,CACnD,GAAIJ,EAAIK,WAAWD,GAAGG,SAASC,gBAAkB,MAAO,CACtDR,EAAIS,YAAYT,EAAIK,WAAWD,G,EAKnC,MAAMM,EAASV,EAAIW,kBACnB,GAAID,GAAUA,EAAOH,SAASC,gBAAkB,MAAO,CACrD,MAAMI,EAAWF,EAAOG,aAAa,UAAY,GACjDH,EAAOI,aAAa,SAAUF,EAAW,eAAeG,QAKxD,GAAIC,EAAQN,GAAwB,CAClC,OAAOV,EAAIG,S,EAGf,MAAO,EAAE,EAGJ,MAAMa,EAAWC,IACtB,GAAIA,EAAIC,WAAa,EAAG,CACtB,GAAID,EAAIV,SAASC,gBAAkB,SAAU,CAC3C,OAAO,K,CAGT,IAAK,IAAI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