@spectrum-web-components/icon 0.35.1-rc.26 → 0.35.1-rc.41

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spectrum-web-components/icon",
3
- "version": "0.35.1-rc.26+05bd08374",
3
+ "version": "0.35.1-rc.41+6ac4e82f0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -71,8 +71,8 @@
71
71
  "lit-html"
72
72
  ],
73
73
  "dependencies": {
74
- "@spectrum-web-components/base": "^0.35.1-rc.26+05bd08374",
75
- "@spectrum-web-components/iconset": "^0.35.1-rc.26+05bd08374"
74
+ "@spectrum-web-components/base": "^0.35.1-rc.41+6ac4e82f0",
75
+ "@spectrum-web-components/iconset": "^0.35.1-rc.41+6ac4e82f0"
76
76
  },
77
77
  "devDependencies": {
78
78
  "@spectrum-css/icon": "^3.0.49"
@@ -83,5 +83,5 @@
83
83
  "./sp-*.js",
84
84
  "./**/*.dev.js"
85
85
  ],
86
- "gitHead": "05bd0837417e287acdf2685d1ca05ab4d138fc95"
86
+ "gitHead": "6ac4e82f0a4a68eb50b5dd4b96a562060162ac6f"
87
87
  }
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["Icon.ts"],
4
4
  "sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport { html, TemplateResult } from '@spectrum-web-components/base';\nimport {\n property,\n query,\n} from '@spectrum-web-components/base/src/decorators.js';\nimport { ifDefined } from '@spectrum-web-components/base/src/directives.js';\n\nimport { IconsetRegistry } from '@spectrum-web-components/iconset/src/iconset-registry.js';\n\nimport { IconBase } from './IconBase.dev.js'\n\n/**\n * @element sp-icon\n */\nexport class Icon extends IconBase {\n @property()\n public src?: string;\n\n @property()\n public name?: string;\n\n @query('#container')\n private iconContainer?: HTMLElement;\n\n private updateIconPromise?: Promise<void>;\n\n public override connectedCallback(): void {\n super.connectedCallback();\n window.addEventListener('sp-iconset-added', this.iconsetListener);\n }\n\n public override disconnectedCallback(): void {\n super.disconnectedCallback();\n window.removeEventListener('sp-iconset-added', this.iconsetListener);\n }\n\n public override firstUpdated(): void {\n this.updateIconPromise = this.updateIcon();\n }\n\n public override attributeChangedCallback(\n name: string,\n old: string,\n value: string\n ): void {\n super.attributeChangedCallback(name, old, value);\n this.updateIconPromise = this.updateIcon(); // any of our attributes change, update our icon\n }\n\n private iconsetListener = (event: CustomEvent): void => {\n if (!this.name) {\n return;\n }\n // parse the icon name to get iconset name\n const icon = this.parseIcon(this.name);\n if (event.detail.name === icon.iconset) {\n this.updateIconPromise = this.updateIcon();\n }\n };\n\n private announceIconImageSrcError(): void {\n this.dispatchEvent(\n new Event('error', {\n cancelable: false,\n bubbles: false,\n composed: false,\n })\n );\n }\n\n protected override render(): TemplateResult {\n if (this.name) {\n return html`\n <div id=\"container\"></div>\n `;\n } else if (this.src) {\n return html`\n <img\n src=\"${this.src}\"\n alt=${ifDefined(this.label)}\n @error=${this.announceIconImageSrcError}\n />\n `;\n }\n return super.render();\n }\n\n private async updateIcon(): Promise<void> {\n if (this.updateIconPromise) {\n await this.updateIconPromise;\n }\n if (!this.name) {\n return Promise.resolve();\n }\n // parse the icon name to get iconset name\n const icon = this.parseIcon(this.name);\n // try to retrieve the iconset\n const iconset = IconsetRegistry.getInstance().getIconset(icon.iconset);\n if (!iconset) {\n // we can stop here as there's nothing to be done till we get the iconset\n return Promise.resolve();\n }\n if (!this.iconContainer) {\n return Promise.resolve();\n }\n this.iconContainer.innerHTML = '';\n return iconset.applyIconToElement(\n this.iconContainer,\n icon.icon,\n this.size || '',\n this.label ? this.label : ''\n );\n }\n\n private parseIcon(icon: string): { iconset: string; icon: string } {\n const iconParts = icon.split(':');\n let iconsetName = 'default';\n let iconName = icon;\n if (iconParts.length > 1) {\n iconsetName = iconParts[0];\n iconName = iconParts[1];\n }\n return { iconset: iconsetName, icon: iconName };\n }\n\n protected override async getUpdateComplete(): Promise<boolean> {\n const complete = (await super.getUpdateComplete()) as boolean;\n await this.updateIconPromise;\n return complete;\n }\n}\n"],
5
- "mappings": ";;;;;;;;;;;;AAYA,SAAS,YAA4B;AACrC;AAAA,EACI;AAAA,EACA;AAAA,OACG;AACP,SAAS,iBAAiB;AAE1B,SAAS,uBAAuB;AAEhC,SAAS,gBAAgB;AAKlB,aAAM,aAAa,SAAS;AAAA,EAA5B;AAAA;AAmCH,SAAQ,kBAAkB,CAAC,UAA6B;AACpD,UAAI,CAAC,KAAK,MAAM;AACZ;AAAA,MACJ;AAEA,YAAM,OAAO,KAAK,UAAU,KAAK,IAAI;AACrC,UAAI,MAAM,OAAO,SAAS,KAAK,SAAS;AACpC,aAAK,oBAAoB,KAAK,WAAW;AAAA,MAC7C;AAAA,IACJ;AAAA;AAAA,EAhCgB,oBAA0B;AACtC,UAAM,kBAAkB;AACxB,WAAO,iBAAiB,oBAAoB,KAAK,eAAe;AAAA,EACpE;AAAA,EAEgB,uBAA6B;AACzC,UAAM,qBAAqB;AAC3B,WAAO,oBAAoB,oBAAoB,KAAK,eAAe;AAAA,EACvE;AAAA,EAEgB,eAAqB;AACjC,SAAK,oBAAoB,KAAK,WAAW;AAAA,EAC7C;AAAA,EAEgB,yBACZ,MACA,KACA,OACI;AACJ,UAAM,yBAAyB,MAAM,KAAK,KAAK;AAC/C,SAAK,oBAAoB,KAAK,WAAW;AAAA,EAC7C;AAAA,EAaQ,4BAAkC;AACtC,SAAK;AAAA,MACD,IAAI,MAAM,SAAS;AAAA,QACf,YAAY;AAAA,QACZ,SAAS;AAAA,QACT,UAAU;AAAA,MACd,CAAC;AAAA,IACL;A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file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport { html, TemplateResult } from '@spectrum-web-components/base';\nimport {\n property,\n query,\n} from '@spectrum-web-components/base/src/decorators.js';\nimport { ifDefined } from '@spectrum-web-components/base/src/directives.js';\n\nimport { IconsetRegistry } from '@spectrum-web-components/iconset/src/iconset-registry.js';\n\nimport { IconBase } from './IconBase.js';\n\n/**\n * @element sp-icon\n */\nexport class Icon extends IconBase {\n @property()\n public src?: string;\n\n @property()\n public name?: string;\n\n @query('#container')\n private iconContainer?: HTMLElement;\n\n private updateIconPromise?: Promise<void>;\n\n public override connectedCallback(): void {\n super.connectedCallback();\n window.addEventListener('sp-iconset-added', this.iconsetListener);\n }\n\n public override disconnectedCallback(): void {\n super.disconnectedCallback();\n window.removeEventListener('sp-iconset-added', this.iconsetListener);\n }\n\n public override firstUpdated(): void {\n this.updateIconPromise = this.updateIcon();\n }\n\n public override attributeChangedCallback(\n name: string,\n old: string,\n value: string\n ): void {\n super.attributeChangedCallback(name, old, value);\n this.updateIconPromise = this.updateIcon(); // any of our attributes change, update our icon\n }\n\n private iconsetListener = (event: CustomEvent): void => {\n if (!this.name) {\n return;\n }\n // parse the icon name to get iconset name\n const icon = this.parseIcon(this.name);\n if (event.detail.name === icon.iconset) {\n this.updateIconPromise = this.updateIcon();\n }\n };\n\n private announceIconImageSrcError(): void {\n this.dispatchEvent(\n new Event('error', {\n cancelable: false,\n bubbles: false,\n composed: false,\n })\n );\n }\n\n protected override render(): TemplateResult {\n if (this.name) {\n return html`\n <div id=\"container\"></div>\n `;\n } else if (this.src) {\n return html`\n <img\n src=\"${this.src}\"\n alt=${ifDefined(this.label)}\n @error=${this.announceIconImageSrcError}\n />\n `;\n }\n return super.render();\n }\n\n private async updateIcon(): Promise<void> {\n if (this.updateIconPromise) {\n await this.updateIconPromise;\n }\n if (!this.name) {\n return Promise.resolve();\n }\n // parse the icon name to get iconset name\n const icon = this.parseIcon(this.name);\n // try to retrieve the iconset\n const iconset = IconsetRegistry.getInstance().getIconset(icon.iconset);\n if (!iconset) {\n // we can stop here as there's nothing to be done till we get the iconset\n return Promise.resolve();\n }\n if (!this.iconContainer) {\n return Promise.resolve();\n }\n this.iconContainer.innerHTML = '';\n return iconset.applyIconToElement(\n this.iconContainer,\n icon.icon,\n this.size || '',\n this.label ? this.label : ''\n );\n }\n\n private parseIcon(icon: string): { iconset: string; icon: string } {\n const iconParts = icon.split(':');\n let iconsetName = 'default';\n let iconName = icon;\n if (iconParts.length > 1) {\n iconsetName = iconParts[0];\n iconName = iconParts[1];\n }\n return { iconset: iconsetName, icon: iconName };\n }\n\n protected override async getUpdateComplete(): Promise<boolean> {\n const complete = (await super.getUpdateComplete()) as boolean;\n await this.updateIconPromise;\n return complete;\n }\n}\n"],
5
- "mappings": "qNAYA,OAAS,QAAAA,MAA4B,gCACrC,OACI,YAAAC,EACA,SAAAC,MACG,kDACP,OAAS,aAAAC,MAAiB,kDAE1B,OAAS,mBAAAC,MAAuB,2DAEhC,OAAS,YAAAC,MAAgB,gBAKlB,aAAM,aAAaA,CAAS,CAA5B,kCAmCH,KAAQ,gBAAmBC,GAA6B,CACpD,GAAI,CAAC,KAAK,KACN,OAGJ,MAAMC,EAAO,KAAK,UAAU,KAAK,IAAI,EACjCD,EAAM,OAAO,OAASC,EAAK,UAC3B,KAAK,kBAAoB,KAAK,WAAW,EAEjD,EAhCgB,mBAA0B,CACtC,MAAM,kBAAkB,EACxB,OAAO,iBAAiB,mBAAoB,KAAK,eAAe,CACpE,CAEgB,sBAA6B,CACzC,MAAM,qBAAqB,EAC3B,OAAO,oBAAoB,mBAAoB,KAAK,eAAe,CACvE,CAEgB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E,WAAWG,EAAK,OAAO,EAKrE,MAJI,CAACI,GAID,CAAC,KAAK,cACC,QAAQ,QAAQ,GAE3B,KAAK,cAAc,UAAY,GACxBA,EAAQ,mBACX,KAAK,cACLJ,EAAK,KACL,KAAK,MAAQ,GACb,KAAK,MAAQ,KAAK,MAAQ,EAC9B,EACJ,CAEQ,UAAUA,EAAiD,CAC/D,MAAMK,EAAYL,EAAK,MAAM,GAAG,EAChC,IAAIM,EAAc,UACdC,EAAWP,EACf,OAAIK,EAAU,OAAS,IACnBC,EAAcD,EAAU,CAAC,EACzBE,EAAWF,EAAU,CAAC,GAEnB,CAAE,QAASC,EAAa,KAAMC,CAAS,CAClD,CAEA,MAAyB,mBAAsC,CAC3D,MAAMC,EAAY,MAAM,MAAM,kBAAkB,EAChD,aAAM,KAAK,kBACJA,CACX,CACJ,CAlHWC,EAAA,CADNf,EAAS,GADD,KAEF,mBAGAe,EAAA,CADNf,EAAS,GAJD,KAKF,oBAGCe,EAAA,CADPd,EAAM,YAAY,GAPV,KAQD",
6
6
  "names": ["html", "property", "query", "ifDefined", "IconsetRegistry", "IconBase", "event", "icon", "name", "old", "value", "iconset", "iconParts", "iconsetName", "iconName", "complete", "__decorateClass"]
7
7
  }
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["icon.stories.ts"],
4
4
  "sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { html, TemplateResult } from '@spectrum-web-components/base';\n\nimport '@spectrum-web-components/icon/sp-icon.js';\nimport { back } from './images';\nimport '@spectrum-web-components/icons/sp-icons-medium.js';\nimport '@spectrum-web-components/icons/sp-icons-large.js';\n\nconst sizes = ['s', 'm', 'l', 'xl', 'xxl'];\n\nexport default {\n component: 'sp-icon',\n title: 'Icon',\n};\n\nexport const Medium = (): TemplateResult => {\n return html`\n <sp-icons-medium></sp-icons-medium>\n ${sizes.map(\n (size) => html`\n <sp-icon size=${size} name=\"ui:Chevron200\"></sp-icon>\n `\n )}\n `;\n};\n\nexport const Large = (): TemplateResult => {\n return html`\n <sp-icons-large></sp-icons-large>\n ${sizes.map(\n (size) => html`\n <sp-icon size=${size} name=\"ui:Chevron400\"></sp-icon>\n `\n )}\n `;\n};\n\nexport const imageIcon = (): TemplateResult => {\n return html`\n ${sizes.map(\n (size) => html`\n <sp-icon label=\"Back\" size=${size} src=${back}></sp-icon>\n `\n )}\n `;\n};\n\nimageIcon.storyName = 'Image Icon';\n\nexport const imageIconSrcError = (): TemplateResult => {\n const invalidImgSrc = 'invalid-image-src';\n const error = (): void => {\n console.error('Invalid sp-icon src provided');\n };\n\n return html`\n ${sizes.map(\n (size) => html`\n <sp-icon\n label=\"Back\"\n size=${size}\n src=${invalidImgSrc}\n @error=${error}\n ></sp-icon>\n `\n )}\n `;\n};\n\nimageIconSrcError.storyName = 'Image Icon src invalid error';\n\nimageIconSrcError.swc_vrt = {\n skip: true,\n};\n\nexport const svgIcon = (): TemplateResult => {\n return html`\n ${sizes.map(\n (size) => html`\n <sp-icon size=${size}>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 22 22\"\n fill=\"currentColor\"\n height=\"18\"\n width=\"18\"\n aria-hidden=\"true\"\n >\n <path\n d=\"M19.75,10.04h-15l5.97-5.97a.483.483,0,0,0,0-.7l-.35-.36a.513.513,0,0,0-.71,0L2.24,10.44a.513.513,0,0,0,0,.71l7.39,7.84a.513.513,0,0,0,.71,0l.35-.35a.513.513,0,0,0,0-.71L4.76,11.5H19.75a.25.25,0,0,0,.25-.25v-.96A.25.25,0,0,0,19.75,10.04Z\"\n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  "sources": ["icon.test.ts"],
4
4
  "sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport Sinon from 'sinon';\nimport { isWebKit } from '@spectrum-web-components/shared';\nimport '@spectrum-web-components/icon/sp-icon.js';\nimport { Icon } from '@spectrum-web-components/icon';\nimport '@spectrum-web-components/icons/sp-icons-medium.js';\nimport {\n elementUpdated,\n expect,\n fixture,\n html,\n waitUntil,\n} from '@open-wc/testing';\nimport { testForLitDevWarnings } from '../../../test/testing-helpers.js';\n\ndescribe('Icon', () => {\n before(async () => {\n const icons = document.createElement('sp-icons-medium');\n document.body.append(icons);\n\n await elementUpdated(icons);\n });\n\n it('loads', async () => {\n const el = await fixture<Icon>(\n html`\n <sp-icon name=\"ui:Chevron200\"></sp-icon>\n `\n );\n\n await elementUpdated(el);\n expect(el).to.not.be.undefined;\n const container = el.shadowRoot\n ? (el.shadowRoot.querySelector('#container') as HTMLDivElement)\n : (el.querySelector('#container') as HTMLDivElement);\n expect(container).to.exist;\n const icon = container.querySelector('svg') as SVGElement;\n expect(icon).to.exist;\n expect(icon.getAttribute('aria-hidden')).to.equal('true');\n });\n\n testForLitDevWarnings(\n async () =>\n await fixture<Icon>(\n html`\n <sp-icon\n label=\"Image Icon\"\n src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAGCAYAAADgzO9IAAAMSWlDQ1BJQ0MgUHJvZmlsZQAASImVVwdUU8kanltSSWiBCEgJvYlSpEsJoUUQkCrYCEkgocSYEETsyrIKrl1EQF3RVREXXQsga0Vd66JgX8uLsqisrIsFGypvUkDX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bnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6ZXhpZj0iaHR0cDovL25zLmFkb2JlLmNvbS9leGlmLzEuMC8iPgogICAgICAgICA8ZXhpZjpQaXhlbFhEaW1lbnNpb24+NjwvZXhpZjpQaXhlbFhEaW1lbnNpb24+CiAgICAgICAgIDxleGlmOlBpeGVsWURpbWVuc2lvbj42PC9leGlmOlBpeGVsWURpbWVuc2lvbj4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+CvQIiZ0AAAAcaURPVAAAAAIAAAAAAAAAAwAAACgAAAADAAAAAwAAAEhuvWMmAAAAFElEQVQYGWK8devyfwYsgJFkCQAAAAD//6KX71AAAAARSURBVGO8devyfwYsgJFkCQAGyBUrQ95HqQAAAABJRU5ErkJggg==\"\n ></sp-icon>\n `\n )\n );\n\n it('loads w/ src', async () => {\n const el = await fixture<Icon>(\n html`\n <sp-icon\n label=\"Image Icon\"\n src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAGCAYAAADgzO9IAAAMSWlDQ1BJQ0MgUHJvZmlsZQAASImVVwdUU8kanltSSWiBCEgJvYlSpEsJoUUQkCrYCEkgocSYEETsyrIKrl1EQF3RVREXXQsga0Vd66JgX8uLsqisrIsFGypvUkDXPe+98/5z5s6Xf/75/pK5c2cA0KvlSaX5qD4ABZJCWWJUGGtSegaL1AUwoAsogAUQHl8uZSckxAIoQ/3f5fUNgKj6q24qrn+O/1cxEAjlfACQBIizBHJ+AcQHAcBL+VJZIQBEP6i3nVUoVeEpEBvJYIAQS1U4R4NLVThLg6vUNsmJHIj3AECm8XiyHAB0W6CeVcTPgTy6tyB2lwjEEgD0yBAH80U8AcTREI8qKJihwtAOOGV9wZPzN86sYU4eL2cYa3JRCzlcLJfm82b/n+X431KQrxjy4QAbTSSLTlTlDOt2K29GjArTIO6VZMXFQ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OlJERj4KPC94OnhtcG1ldGE+CvQIiZ0AAAAcaURPVAAAAAIAAAAAAAAAAwAAACgAAAADAAAAAwAAAEhuvWMmAAAAFElEQVQYGWK8devyfwYsgJFkCQAAAAD//6KX71AAAAARSURBVGO8devyfwYsgJFkCQAGyBUrQ95HqQAAAABJRU5ErkJggg==\"\n ></sp-icon>\n `\n );\n\n await elementUpdated(el);\n\n await expect(el).to.be.accessible();\n });\n\n it('loads w/ invalid src, error dispatching', async () => {\n const error = Sinon.spy();\n const el = await fixture<Icon>(\n html`\n <sp-icon\n label=\"Image Icon\"\n src=\"invalid-image-src\"\n @error=${error}\n ></sp-icon>\n `\n );\n\n await elementUpdated(el);\n\n await expect(el).to.be.accessible();\n\n // Skipping the test case expectation for webkit because of error event not dispatching bug for the same, https://github.com/microsoft/playwright/issues/22332\n if (!isWebKit()) {\n await waitUntil(() => error.calledOnce, 'The error was thrown.');\n }\n });\n\n it('loads w/ label', async () => {\n const label = 'Chevron';\n const el = await fixture<Icon>(\n html`\n <sp-icon name=\"ui:Chevron200\" label=${label}></sp-icon>\n `\n );\n\n await elementUpdated(el);\n expect(el).to.not.be.undefined;\n const container = el.shadowRoot\n ? (el.shadowRoot.querySelector('#container') as HTMLDivElement)\n : (el.querySelector('#container') as HTMLDivElement);\n expect(container).to.exist;\n const icon = container.querySelector('svg') as SVGElement;\n expect(icon).to.exist;\n expect(icon.hasAttribute('aria-hidden')).to.be.false;\n expect(icon.getAttribute('aria-label')).to.equal(label);\n });\n\n it('does not error when name is missing', async () => {\n const el = await fixture<Icon>(\n html`\n <sp-icon></sp-icon>\n `\n );\n\n return elementUpdated(el);\n });\n\n it('does not error with unknown set', async () => {\n const el = await fixture<Icon>(html`\n <sp-icon name=\"unknown-icon\"></sp-icon>\n `);\n\n return elementUpdated(el);\n });\n\n it('does error with unknown icon', async () => {\n const el = document.createElement('sp-icon');\n el.name = 'ui:unknown-icon';\n try {\n document.body.appendChild(el);\n await elementUpdated(el);\n expect('failed').to.not.equal('failed');\n } catch (error) {\n expect(() => {\n throw error;\n }).to.throw();\n }\n el.remove();\n });\n\n it('does not add multiple SVGs when removed and re-added to DOM', async () => {\n const el = await fixture<Icon>(\n html`\n <sp-icon name=\"ui:Chevron200\"></sp-icon>\n `\n );\n\n await elementUpdated(el);\n expect(el).to.not.be.undefined;\n\n const parent = el.parentNode as HTMLElement;\n parent.removeChild(el);\n parent.appendChild(el);\n\n // wait for updates\n await el.updateComplete;\n\n const count = el.shadowRoot.querySelectorAll('svg').length;\n expect(count).to.equal(1);\n });\n});\n"],
5
- "mappings": ";AAYA,OAAO,WAAW;AAClB,SAAS,gBAAgB;AACzB,OAAO;AAEP,OAAO;AACP;AAAA,EACI;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACG;AACP,SAAS,6BAA6B;AAEtC,SAAS,QAAQ,MAAM;AACnB,SAAO,YAAY;AACf,UAAM,QAAQ,SAAS,cAAc,iBAAiB;AACtD,aAAS,KAAK,OAAO,KAAK;AAE1B,UAAM,eAAe,KAAK;AAAA,EAC9B,CAAC;AAED,KAAG,SAAS,YAAY;AACpB,UAAM,KAAK,MAAM;AAAA,MACb;AAAA;AAAA;AAAA,IAGJ;AAEA,UAAM,eAAe,EAAE;AACvB,WAAO,EAAE,EAAE,GAAG,IAAI,GAAG;AACrB,UAAM,YAAY,GAAG,aACd,GAAG,WAAW,cAAc,YAAY,IACxC,GAAG,cAAc,YAAY;AACpC,WAAO,SAAS,EAAE,GAAG;AACrB,UAAM,OAAO,UAAU,cAAc,KAAK;AAC1C,WAAO,IAAI,EAAE,GAAG;AAChB,WAAO,KAAK,aAAa,aAAa,CAAC,EAAE,GAAG,MAAM,MAAM;AAAA,EAC5D,CAAC;AAED;AAAA,IACI,YACI,MAAM;AAAA,MACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMJ;AAAA,EACR;AAEA,KAAG,gBAAgB,YAAY;AAC3B,UAAM,KAAK,MAAM;AAAA,MACb;AAAA;A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AAG,MAAM,KAAK;AAAA,EAC1D,CAAC;AAED,KAAG,uCAAuC,YAAY;AAClD,UAAM,KAAK,MAAM;AAAA,MACb;AAAA;AAAA;AAAA,IAGJ;AAEA,WAAO,eAAe,EAAE;AAAA,EAC5B,CAAC;AAED,KAAG,mCAAmC,YAAY;AAC9C,UAAM,KAAK,MAAM,QAAc;AAAA;AAAA,SAE9B;AAED,WAAO,eAAe,EAAE;AAAA,EAC5B,CAAC;AAED,KAAG,gCAAgC,YAAY;AAC3C,UAAM,KAAK,SAAS,cAAc,SAAS;AAC3C,OAAG,OAAO;AACV,QAAI;AACA,eAAS,KAAK,YAAY,EAAE;AAC5B,YAAM,eAAe,EAAE;AACvB,aAAO,QAAQ,EAAE,GAAG,IAAI,MAAM,QAAQ;AAAA,IAC1C,SAAS,OAAO;AACZ,aAAO,MAAM;AACT,cAAM;AAAA,MACV,CAAC,EAAE,GAAG,MAAM;AAAA,IAChB;AACA,OAAG,OAAO;AAAA,EACd,CAAC;AAED,KAAG,+DAA+D,YAAY;AAC1E,UAAM,KAAK,MAAM;AAAA,MACb;AAAA;AAAA;AAAA,IAGJ;AAEA,UAAM,eAAe,EAAE;AACvB,WAAO,EAAE,EAAE,GAAG,IAAI,GAAG;AAErB,UAAM,SAAS,GAAG;AAClB,WAAO,YAAY,EAAE;AACrB,WAAO,YAAY,EAAE;AAGrB,UAAM,GAAG;AAET,UAAM,QAAQ,GAAG,WAAW,iBAAiB,KAAK,EAAE;AACpD,WAAO,KAAK,EAAE,GAAG,MAAM,CAAC;AAAA,EAC5B,CAAC;AACL,CAAC;",
6
6
  "names": []
7
7
  }
@@ -1,276 +0,0 @@
1
- {
2
- "schemaVersion": "1.0.0",
3
- "readme": "",
4
- "modules": [
5
- {
6
- "kind": "javascript-module",
7
- "path": "sp-icon.ts",
8
- "declarations": [],
9
- "exports": [
10
- {
11
- "kind": "custom-element-definition",
12
- "name": "sp-icon",
13
- "declaration": {
14
- "name": "Icon",
15
- "module": "/src/Icon.js"
16
- }
17
- }
18
- ]
19
- },
20
- {
21
- "kind": "javascript-module",
22
- "path": "src/Icon.ts",
23
- "declarations": [
24
- {
25
- "kind": "class",
26
- "description": "",
27
- "name": "Icon",
28
- "members": [
29
- {
30
- "kind": "field",
31
- "name": "src",
32
- "type": {
33
- "text": "string | undefined"
34
- },
35
- "privacy": "public",
36
- "attribute": "src"
37
- },
38
- {
39
- "kind": "field",
40
- "name": "name",
41
- "type": {
42
- "text": "string | undefined"
43
- },
44
- "privacy": "public",
45
- "attribute": "name"
46
- },
47
- {
48
- "kind": "field",
49
- "name": "iconContainer",
50
- "type": {
51
- "text": "HTMLElement | undefined"
52
- },
53
- "privacy": "private"
54
- },
55
- {
56
- "kind": "field",
57
- "name": "updateIconPromise",
58
- "type": {
59
- "text": "Promise<void> | undefined"
60
- },
61
- "privacy": "private"
62
- },
63
- {
64
- "kind": "field",
65
- "name": "iconsetListener",
66
- "privacy": "private"
67
- },
68
- {
69
- "kind": "method",
70
- "name": "announceIconImageSrcError",
71
- "privacy": "private",
72
- "return": {
73
- "type": {
74
- "text": "void"
75
- }
76
- }
77
- },
78
- {
79
- "kind": "method",
80
- "name": "updateIcon",
81
- "privacy": "private",
82
- "return": {
83
- "type": {
84
- "text": "Promise<void>"
85
- }
86
- }
87
- },
88
- {
89
- "kind": "method",
90
- "name": "parseIcon",
91
- "privacy": "private",
92
- "return": {
93
- "type": {
94
- "text": "{ iconset: string; icon: string }"
95
- }
96
- },
97
- "parameters": [
98
- {
99
- "name": "icon",
100
- "type": {
101
- "text": "string"
102
- }
103
- }
104
- ]
105
- },
106
- {
107
- "kind": "method",
108
- "name": "getUpdateComplete",
109
- "privacy": "protected",
110
- "return": {
111
- "type": {
112
- "text": "Promise<boolean>"
113
- }
114
- }
115
- },
116
- {
117
- "kind": "field",
118
- "name": "label",
119
- "type": {
120
- "text": "string"
121
- },
122
- "privacy": "public",
123
- "default": "''",
124
- "attribute": "label",
125
- "inheritedFrom": {
126
- "name": "IconBase",
127
- "module": "src/IconBase.ts"
128
- }
129
- },
130
- {
131
- "kind": "field",
132
- "name": "size",
133
- "type": {
134
- "text": "'s' | 'm' | 'l' | 'xl' | 'xxl' | undefined"
135
- },
136
- "privacy": "public",
137
- "attribute": "size",
138
- "reflects": true,
139
- "inheritedFrom": {
140
- "name": "IconBase",
141
- "module": "src/IconBase.ts"
142
- }
143
- }
144
- ],
145
- "events": [
146
- {
147
- "name": "error",
148
- "type": {
149
- "text": "Event"
150
- }
151
- }
152
- ],
153
- "attributes": [
154
- {
155
- "name": "src",
156
- "type": {
157
- "text": "string | undefined"
158
- },
159
- "fieldName": "src"
160
- },
161
- {
162
- "name": "name",
163
- "type": {
164
- "text": "string | undefined"
165
- },
166
- "fieldName": "name"
167
- },
168
- {
169
- "name": "label",
170
- "type": {
171
- "text": "string"
172
- },
173
- "default": "''",
174
- "fieldName": "label",
175
- "inheritedFrom": {
176
- "name": "IconBase",
177
- "module": "src/IconBase.ts"
178
- }
179
- },
180
- {
181
- "name": "size",
182
- "type": {
183
- "text": "'s' | 'm' | 'l' | 'xl' | 'xxl' | undefined"
184
- },
185
- "fieldName": "size",
186
- "inheritedFrom": {
187
- "name": "IconBase",
188
- "module": "src/IconBase.ts"
189
- }
190
- }
191
- ],
192
- "superclass": {
193
- "name": "IconBase",
194
- "module": "/src/IconBase.js"
195
- },
196
- "tagName": "sp-icon",
197
- "customElement": true
198
- }
199
- ],
200
- "exports": [
201
- {
202
- "kind": "js",
203
- "name": "Icon",
204
- "declaration": {
205
- "name": "Icon",
206
- "module": "src/Icon.ts"
207
- }
208
- }
209
- ]
210
- },
211
- {
212
- "kind": "javascript-module",
213
- "path": "src/IconBase.ts",
214
- "declarations": [
215
- {
216
- "kind": "class",
217
- "description": "",
218
- "name": "IconBase",
219
- "members": [
220
- {
221
- "kind": "field",
222
- "name": "label",
223
- "type": {
224
- "text": "string"
225
- },
226
- "privacy": "public",
227
- "default": "''",
228
- "attribute": "label"
229
- },
230
- {
231
- "kind": "field",
232
- "name": "size",
233
- "type": {
234
- "text": "'s' | 'm' | 'l' | 'xl' | 'xxl' | undefined"
235
- },
236
- "privacy": "public",
237
- "attribute": "size",
238
- "reflects": true
239
- }
240
- ],
241
- "attributes": [
242
- {
243
- "name": "label",
244
- "type": {
245
- "text": "string"
246
- },
247
- "default": "''",
248
- "fieldName": "label"
249
- },
250
- {
251
- "name": "size",
252
- "type": {
253
- "text": "'s' | 'm' | 'l' | 'xl' | 'xxl' | undefined"
254
- },
255
- "fieldName": "size"
256
- }
257
- ],
258
- "superclass": {
259
- "name": "SpectrumElement",
260
- "package": "@spectrum-web-components/base"
261
- }
262
- }
263
- ],
264
- "exports": [
265
- {
266
- "kind": "js",
267
- "name": "IconBase",
268
- "declaration": {
269
- "name": "IconBase",
270
- "module": "src/IconBase.ts"
271
- }
272
- }
273
- ]
274
- }
275
- ]
276
- }