@spectrum-web-components/icon 0.42.2 → 0.42.4
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +5 -5
- package/src/Icon.dev.js +1 -2
- package/src/Icon.dev.js.map +1 -1
- package/src/IconBase.dev.js +1 -2
- package/src/IconBase.dev.js.map +1 -1
- package/src/icon.css.dev.js +1 -1
- package/src/icon.css.dev.js.map +1 -1
- package/src/icon.css.js +1 -1
- package/src/icon.css.js.map +1 -1
- package/src/spectrum-icon.css.dev.js +1 -1
- package/src/spectrum-icon.css.dev.js.map +1 -1
- package/src/spectrum-icon.css.js +1 -1
- package/src/spectrum-icon.css.js.map +1 -1
- package/test/icon-memory.test.js +8 -0
- package/test/icon-memory.test.js.map +7 -0
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@spectrum-web-components/icon",
|
3
|
-
"version": "0.42.
|
3
|
+
"version": "0.42.4",
|
4
4
|
"publishConfig": {
|
5
5
|
"access": "public"
|
6
6
|
},
|
@@ -71,11 +71,11 @@
|
|
71
71
|
"lit-html"
|
72
72
|
],
|
73
73
|
"dependencies": {
|
74
|
-
"@spectrum-web-components/base": "^0.42.
|
75
|
-
"@spectrum-web-components/iconset": "^0.42.
|
74
|
+
"@spectrum-web-components/base": "^0.42.4",
|
75
|
+
"@spectrum-web-components/iconset": "^0.42.4"
|
76
76
|
},
|
77
77
|
"devDependencies": {
|
78
|
-
"@spectrum-css/icon": "^
|
78
|
+
"@spectrum-css/icon": "^7.1.0"
|
79
79
|
},
|
80
80
|
"types": "./src/index.d.ts",
|
81
81
|
"customElements": "custom-elements.json",
|
@@ -83,5 +83,5 @@
|
|
83
83
|
"./sp-*.js",
|
84
84
|
"./**/*.dev.js"
|
85
85
|
],
|
86
|
-
"gitHead": "
|
86
|
+
"gitHead": "4924ffd06681ced537edaed873a9ce8b42cf155c"
|
87
87
|
}
|
package/src/Icon.dev.js
CHANGED
@@ -6,8 +6,7 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
6
6
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
7
7
|
if (decorator = decorators[i])
|
8
8
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
9
|
-
if (kind && result)
|
10
|
-
__defProp(target, key, result);
|
9
|
+
if (kind && result) __defProp(target, key, result);
|
11
10
|
return result;
|
12
11
|
};
|
13
12
|
import { html } from "@spectrum-web-components/base";
|
package/src/Icon.dev.js.map
CHANGED
@@ -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": "
|
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;AAAA,EACJ;AAAA,EAEmB,SAAyB;AACxC,QAAI,KAAK,MAAM;AACX,aAAO;AAAA;AAAA;AAAA,IAGX,WAAW,KAAK,KAAK;AACjB,aAAO;AAAA;AAAA,2BAEQ,KAAK,GAAG;AAAA,0BACT,UAAU,KAAK,KAAK,CAAC;AAAA,6BAClB,KAAK,yBAAyB;AAAA;AAAA;AAAA,IAGnD;AACA,WAAO,MAAM,OAAO;AAAA,EACxB;AAAA,EAEA,MAAc,aAA4B;AACtC,QAAI,KAAK,mBAAmB;AACxB,YAAM,KAAK;AAAA,IACf;AACA,QAAI,CAAC,KAAK,MAAM;AACZ,aAAO,QAAQ,QAAQ;AAAA,IAC3B;AAEA,UAAM,OAAO,KAAK,UAAU,KAAK,IAAI;AAErC,UAAM,UAAU,gBAAgB,YAAY,EAAE,WAAW,KAAK,OAAO;AACrE,QAAI,CAAC,SAAS;AAEV,aAAO,QAAQ,QAAQ;AAAA,IAC3B;AACA,QAAI,CAAC,KAAK,eAAe;AACrB,aAAO,QAAQ,QAAQ;AAAA,IAC3B;AACA,SAAK,cAAc,YAAY;AAC/B,WAAO,QAAQ;AAAA,MACX,KAAK;AAAA,MACL,KAAK;AAAA,MACL,KAAK,QAAQ;AAAA,MACb,KAAK,QAAQ,KAAK,QAAQ;AAAA,IAC9B;AAAA,EACJ;AAAA,EAEQ,UAAU,MAAiD;AAC/D,UAAM,YAAY,KAAK,MAAM,GAAG;AAChC,QAAI,cAAc;AAClB,QAAI,WAAW;AACf,QAAI,UAAU,SAAS,GAAG;AACtB,oBAAc,UAAU,CAAC;AACzB,iBAAW,UAAU,CAAC;AAAA,IAC1B;AACA,WAAO,EAAE,SAAS,aAAa,MAAM,SAAS;AAAA,EAClD;AAAA,EAEA,MAAyB,oBAAsC;AAC3D,UAAM,WAAY,MAAM,MAAM,kBAAkB;AAChD,UAAM,KAAK;AACX,WAAO;AAAA,EACX;AACJ;AAlHW;AAAA,EADN,SAAS;AAAA,GADD,KAEF;AAGA;AAAA,EADN,SAAS;AAAA,GAJD,KAKF;AAGC;AAAA,EADP,MAAM,YAAY;AAAA,GAPV,KAQD;",
|
6
6
|
"names": []
|
7
7
|
}
|
package/src/IconBase.dev.js
CHANGED
@@ -6,8 +6,7 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
6
6
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
7
7
|
if (decorator = decorators[i])
|
8
8
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
9
|
-
if (kind && result)
|
10
|
-
__defProp(target, key, result);
|
9
|
+
if (kind && result) __defProp(target, key, result);
|
11
10
|
return result;
|
12
11
|
};
|
13
12
|
import {
|
package/src/IconBase.dev.js.map
CHANGED
@@ -2,6 +2,6 @@
|
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["IconBase.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 {\n CSSResultArray,\n html,\n PropertyValues,\n SpectrumElement,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\n\nimport iconStyles from './icon.css.js';\n\nexport class IconBase extends SpectrumElement {\n public static override get styles(): CSSResultArray {\n return [iconStyles];\n }\n\n @property()\n public label = '';\n\n @property({ reflect: true })\n public size?: 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl';\n\n protected override update(changes: PropertyValues): void {\n if (changes.has('label')) {\n if (this.label) {\n this.removeAttribute('aria-hidden');\n } else {\n this.setAttribute('aria-hidden', 'true');\n }\n }\n super.update(changes);\n }\n\n protected override render(): TemplateResult {\n return html`\n <slot></slot>\n `;\n }\n}\n"],
|
5
|
-
"mappings": "
|
5
|
+
"mappings": ";;;;;;;;;;;AAYA;AAAA,EAEI;AAAA,EAEA;AAAA,OAEG;AACP,SAAS,gBAAgB;AAEzB,OAAO,gBAAgB;AAEhB,aAAM,iBAAiB,gBAAgB;AAAA,EAAvC;AAAA;AAMH,SAAO,QAAQ;AAAA;AAAA,EALf,WAA2B,SAAyB;AAChD,WAAO,CAAC,UAAU;AAAA,EACtB;AAAA,EAQmB,OAAO,SAA+B;AACrD,QAAI,QAAQ,IAAI,OAAO,GAAG;AACtB,UAAI,KAAK,OAAO;AACZ,aAAK,gBAAgB,aAAa;AAAA,MACtC,OAAO;AACH,aAAK,aAAa,eAAe,MAAM;AAAA,MAC3C;AAAA,IACJ;AACA,UAAM,OAAO,OAAO;AAAA,EACxB;AAAA,EAEmB,SAAyB;AACxC,WAAO;AAAA;AAAA;AAAA,EAGX;AACJ;AArBW;AAAA,EADN,SAAS;AAAA,GALD,SAMF;AAGA;AAAA,EADN,SAAS,EAAE,SAAS,KAAK,CAAC;AAAA,GARlB,SASF;",
|
6
6
|
"names": []
|
7
7
|
}
|
package/src/icon.css.dev.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
import { css } from "@spectrum-web-components/base";
|
3
3
|
const styles = css`
|
4
|
-
:host{--spectrum-icon-inline-size:var(--mod-icon-inline-size,var(--mod-icon-size,var(--spectrum-icon-size)));--spectrum-icon-block-size:var(--mod-icon-block-size,var(--mod-icon-size,var(--spectrum-icon-size)));inline-size:var(--spectrum-icon-inline-size);block-size:var(--spectrum-icon-block-size);color:var(--mod-icon-color,inherit);fill:currentColor;display:inline-block}:host(:not(:root)){overflow:hidden}
|
4
|
+
:host{--spectrum-icon-inline-size:var(--mod-icon-inline-size,var(--mod-icon-size,var(--spectrum-icon-size)));--spectrum-icon-block-size:var(--mod-icon-block-size,var(--mod-icon-size,var(--spectrum-icon-size)));inline-size:var(--spectrum-icon-inline-size);block-size:var(--spectrum-icon-block-size);color:var(--mod-icon-color,inherit);fill:currentColor;pointer-events:none;display:inline-block}:host(:not(:root)){overflow:hidden}@media (forced-colors:active){:host{forced-color-adjust:auto}}:host{--spectrum-icon-size:var(--spectrum-workflow-icon-size-100)}:host([size=xxs]){--spectrum-icon-size:var(--spectrum-workflow-icon-size-xxs)}:host([size=xs]){--spectrum-icon-size:var(--spectrum-workflow-icon-size-50)}:host([size=s]){--spectrum-icon-size:var(--spectrum-workflow-icon-size-75)}:host([size=l]){--spectrum-icon-size:var(--spectrum-workflow-icon-size-200)}:host([size=xl]){--spectrum-icon-size:var(--spectrum-workflow-icon-size-300)}:host([size=xxl]){--spectrum-icon-size:var(--spectrum-workflow-icon-size-xxl)}:host{--spectrum-icon-size:inherit;--spectrum-icon-inline-size:var(--mod-icon-inline-size,var(--mod-icon-size,var(--_spectrum-icon-size)));--spectrum-icon-block-size:var(--mod-icon-block-size,var(--mod-icon-size,var(--_spectrum-icon-size)));--_spectrum-icon-size:var(--spectrum-icon-size,var(--spectrum-workflow-icon-size-100))}#container{height:100%}img,svg,::slotted(*){vertical-align:top;color:inherit;width:100%;height:100%}@media (forced-colors:active){img,svg,::slotted(*){forced-color-adjust:auto}}:host([size=xxs]){--_spectrum-icon-size:var(--spectrum-icon-size,var(--spectrum-workflow-icon-size-xxs))}:host([size=xs]){--_spectrum-icon-size:var(--spectrum-icon-size,var(--spectrum-workflow-icon-size-50))}:host([size=s]){--_spectrum-icon-size:var(--spectrum-icon-size,var(--spectrum-workflow-icon-size-75))}:host([size=l]){--_spectrum-icon-size:var(--spectrum-icon-size,var(--spectrum-workflow-icon-size-200))}:host([size=xl]){--_spectrum-icon-size:var(--spectrum-icon-size,var(--spectrum-workflow-icon-size-300))}:host([size=xxl]){--_spectrum-icon-size:var(--spectrum-icon-size,var(--spectrum-workflow-icon-size-xxl))}
|
5
5
|
`;
|
6
6
|
export default styles;
|
7
7
|
//# sourceMappingURL=icon.css.dev.js.map
|
package/src/icon.css.dev.js.map
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["icon.css.ts"],
|
4
|
-
"sourcesContent": ["/*\nCopyright 2024 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 { css } from '@spectrum-web-components/base';\nconst styles = css`\n :host{--spectrum-icon-inline-size:var(--mod-icon-inline-size,var(--mod-icon-size,var(--spectrum-icon-size)));--spectrum-icon-block-size:var(--mod-icon-block-size,var(--mod-icon-size,var(--spectrum-icon-size)));inline-size:var(--spectrum-icon-inline-size);block-size:var(--spectrum-icon-block-size);color:var(--mod-icon-color,inherit);fill:currentColor;display:inline-block}:host(:not(:root)){overflow:hidden}
|
4
|
+
"sourcesContent": ["/*\nCopyright 2024 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 { css } from '@spectrum-web-components/base';\nconst styles = css`\n :host{--spectrum-icon-inline-size:var(--mod-icon-inline-size,var(--mod-icon-size,var(--spectrum-icon-size)));--spectrum-icon-block-size:var(--mod-icon-block-size,var(--mod-icon-size,var(--spectrum-icon-size)));inline-size:var(--spectrum-icon-inline-size);block-size:var(--spectrum-icon-block-size);color:var(--mod-icon-color,inherit);fill:currentColor;pointer-events:none;display:inline-block}:host(:not(:root)){overflow:hidden}@media (forced-colors:active){:host{forced-color-adjust:auto}}:host{--spectrum-icon-size:var(--spectrum-workflow-icon-size-100)}:host([size=xxs]){--spectrum-icon-size:var(--spectrum-workflow-icon-size-xxs)}:host([size=xs]){--spectrum-icon-size:var(--spectrum-workflow-icon-size-50)}:host([size=s]){--spectrum-icon-size:var(--spectrum-workflow-icon-size-75)}:host([size=l]){--spectrum-icon-size:var(--spectrum-workflow-icon-size-200)}:host([size=xl]){--spectrum-icon-size:var(--spectrum-workflow-icon-size-300)}:host([size=xxl]){--spectrum-icon-size:var(--spectrum-workflow-icon-size-xxl)}:host{--spectrum-icon-size:inherit;--spectrum-icon-inline-size:var(--mod-icon-inline-size,var(--mod-icon-size,var(--_spectrum-icon-size)));--spectrum-icon-block-size:var(--mod-icon-block-size,var(--mod-icon-size,var(--_spectrum-icon-size)));--_spectrum-icon-size:var(--spectrum-icon-size,var(--spectrum-workflow-icon-size-100))}#container{height:100%}img,svg,::slotted(*){vertical-align:top;color:inherit;width:100%;height:100%}@media (forced-colors:active){img,svg,::slotted(*){forced-color-adjust:auto}}:host([size=xxs]){--_spectrum-icon-size:var(--spectrum-icon-size,var(--spectrum-workflow-icon-size-xxs))}:host([size=xs]){--_spectrum-icon-size:var(--spectrum-icon-size,var(--spectrum-workflow-icon-size-50))}:host([size=s]){--_spectrum-icon-size:var(--spectrum-icon-size,var(--spectrum-workflow-icon-size-75))}:host([size=l]){--_spectrum-icon-size:var(--spectrum-icon-size,var(--spectrum-workflow-icon-size-200))}:host([size=xl]){--_spectrum-icon-size:var(--spectrum-icon-size,var(--spectrum-workflow-icon-size-300))}:host([size=xxl]){--_spectrum-icon-size:var(--spectrum-icon-size,var(--spectrum-workflow-icon-size-xxl))}\n`;\nexport default styles;"],
|
5
5
|
"mappings": ";AAWA,SAAS,WAAW;AACpB,MAAM,SAAS;AAAA;AAAA;AAGf,eAAe;",
|
6
6
|
"names": []
|
7
7
|
}
|
package/src/icon.css.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
1
|
"use strict";import{css as i}from"@spectrum-web-components/base";const s=i`
|
2
|
-
:host{--spectrum-icon-inline-size:var(--mod-icon-inline-size,var(--mod-icon-size,var(--spectrum-icon-size)));--spectrum-icon-block-size:var(--mod-icon-block-size,var(--mod-icon-size,var(--spectrum-icon-size)));inline-size:var(--spectrum-icon-inline-size);block-size:var(--spectrum-icon-block-size);color:var(--mod-icon-color,inherit);fill:currentColor;display:inline-block}:host(:not(:root)){overflow:hidden}
|
2
|
+
:host{--spectrum-icon-inline-size:var(--mod-icon-inline-size,var(--mod-icon-size,var(--spectrum-icon-size)));--spectrum-icon-block-size:var(--mod-icon-block-size,var(--mod-icon-size,var(--spectrum-icon-size)));inline-size:var(--spectrum-icon-inline-size);block-size:var(--spectrum-icon-block-size);color:var(--mod-icon-color,inherit);fill:currentColor;pointer-events:none;display:inline-block}:host(:not(:root)){overflow:hidden}@media (forced-colors:active){:host{forced-color-adjust:auto}}:host{--spectrum-icon-size:var(--spectrum-workflow-icon-size-100)}:host([size=xxs]){--spectrum-icon-size:var(--spectrum-workflow-icon-size-xxs)}:host([size=xs]){--spectrum-icon-size:var(--spectrum-workflow-icon-size-50)}:host([size=s]){--spectrum-icon-size:var(--spectrum-workflow-icon-size-75)}:host([size=l]){--spectrum-icon-size:var(--spectrum-workflow-icon-size-200)}:host([size=xl]){--spectrum-icon-size:var(--spectrum-workflow-icon-size-300)}:host([size=xxl]){--spectrum-icon-size:var(--spectrum-workflow-icon-size-xxl)}:host{--spectrum-icon-size:inherit;--spectrum-icon-inline-size:var(--mod-icon-inline-size,var(--mod-icon-size,var(--_spectrum-icon-size)));--spectrum-icon-block-size:var(--mod-icon-block-size,var(--mod-icon-size,var(--_spectrum-icon-size)));--_spectrum-icon-size:var(--spectrum-icon-size,var(--spectrum-workflow-icon-size-100))}#container{height:100%}img,svg,::slotted(*){vertical-align:top;color:inherit;width:100%;height:100%}@media (forced-colors:active){img,svg,::slotted(*){forced-color-adjust:auto}}:host([size=xxs]){--_spectrum-icon-size:var(--spectrum-icon-size,var(--spectrum-workflow-icon-size-xxs))}:host([size=xs]){--_spectrum-icon-size:var(--spectrum-icon-size,var(--spectrum-workflow-icon-size-50))}:host([size=s]){--_spectrum-icon-size:var(--spectrum-icon-size,var(--spectrum-workflow-icon-size-75))}:host([size=l]){--_spectrum-icon-size:var(--spectrum-icon-size,var(--spectrum-workflow-icon-size-200))}:host([size=xl]){--_spectrum-icon-size:var(--spectrum-icon-size,var(--spectrum-workflow-icon-size-300))}:host([size=xxl]){--_spectrum-icon-size:var(--spectrum-icon-size,var(--spectrum-workflow-icon-size-xxl))}
|
3
3
|
`;export default s;
|
4
4
|
//# sourceMappingURL=icon.css.js.map
|
package/src/icon.css.js.map
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["icon.css.ts"],
|
4
|
-
"sourcesContent": ["/*\nCopyright 2024 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 { css } from '@spectrum-web-components/base';\nconst styles = css`\n :host{--spectrum-icon-inline-size:var(--mod-icon-inline-size,var(--mod-icon-size,var(--spectrum-icon-size)));--spectrum-icon-block-size:var(--mod-icon-block-size,var(--mod-icon-size,var(--spectrum-icon-size)));inline-size:var(--spectrum-icon-inline-size);block-size:var(--spectrum-icon-block-size);color:var(--mod-icon-color,inherit);fill:currentColor;display:inline-block}:host(:not(:root)){overflow:hidden}
|
4
|
+
"sourcesContent": ["/*\nCopyright 2024 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 { css } from '@spectrum-web-components/base';\nconst styles = css`\n :host{--spectrum-icon-inline-size:var(--mod-icon-inline-size,var(--mod-icon-size,var(--spectrum-icon-size)));--spectrum-icon-block-size:var(--mod-icon-block-size,var(--mod-icon-size,var(--spectrum-icon-size)));inline-size:var(--spectrum-icon-inline-size);block-size:var(--spectrum-icon-block-size);color:var(--mod-icon-color,inherit);fill:currentColor;pointer-events:none;display:inline-block}:host(:not(:root)){overflow:hidden}@media (forced-colors:active){:host{forced-color-adjust:auto}}:host{--spectrum-icon-size:var(--spectrum-workflow-icon-size-100)}:host([size=xxs]){--spectrum-icon-size:var(--spectrum-workflow-icon-size-xxs)}:host([size=xs]){--spectrum-icon-size:var(--spectrum-workflow-icon-size-50)}:host([size=s]){--spectrum-icon-size:var(--spectrum-workflow-icon-size-75)}:host([size=l]){--spectrum-icon-size:var(--spectrum-workflow-icon-size-200)}:host([size=xl]){--spectrum-icon-size:var(--spectrum-workflow-icon-size-300)}:host([size=xxl]){--spectrum-icon-size:var(--spectrum-workflow-icon-size-xxl)}:host{--spectrum-icon-size:inherit;--spectrum-icon-inline-size:var(--mod-icon-inline-size,var(--mod-icon-size,var(--_spectrum-icon-size)));--spectrum-icon-block-size:var(--mod-icon-block-size,var(--mod-icon-size,var(--_spectrum-icon-size)));--_spectrum-icon-size:var(--spectrum-icon-size,var(--spectrum-workflow-icon-size-100))}#container{height:100%}img,svg,::slotted(*){vertical-align:top;color:inherit;width:100%;height:100%}@media (forced-colors:active){img,svg,::slotted(*){forced-color-adjust:auto}}:host([size=xxs]){--_spectrum-icon-size:var(--spectrum-icon-size,var(--spectrum-workflow-icon-size-xxs))}:host([size=xs]){--_spectrum-icon-size:var(--spectrum-icon-size,var(--spectrum-workflow-icon-size-50))}:host([size=s]){--_spectrum-icon-size:var(--spectrum-icon-size,var(--spectrum-workflow-icon-size-75))}:host([size=l]){--_spectrum-icon-size:var(--spectrum-icon-size,var(--spectrum-workflow-icon-size-200))}:host([size=xl]){--_spectrum-icon-size:var(--spectrum-icon-size,var(--spectrum-workflow-icon-size-300))}:host([size=xxl]){--_spectrum-icon-size:var(--spectrum-icon-size,var(--spectrum-workflow-icon-size-xxl))}\n`;\nexport default styles;"],
|
5
5
|
"mappings": "aAWA,OAAS,OAAAA,MAAW,gCACpB,MAAMC,EAASD;AAAA;AAAA,EAGf,eAAeC",
|
6
6
|
"names": ["css", "styles"]
|
7
7
|
}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
import { css } from "@spectrum-web-components/base";
|
3
3
|
const styles = css`
|
4
|
-
:host{--spectrum-icon-inline-size:var(--mod-icon-inline-size,var(--mod-icon-size,var(--spectrum-icon-size)));--spectrum-icon-block-size:var(--mod-icon-block-size,var(--mod-icon-size,var(--spectrum-icon-size)));inline-size:var(--spectrum-icon-inline-size);block-size:var(--spectrum-icon-block-size);color:var(--mod-icon-color,inherit);fill:currentColor;display:inline-block}:host(:not(:root)){overflow:hidden}
|
4
|
+
:host{--spectrum-icon-inline-size:var(--mod-icon-inline-size,var(--mod-icon-size,var(--spectrum-icon-size)));--spectrum-icon-block-size:var(--mod-icon-block-size,var(--mod-icon-size,var(--spectrum-icon-size)));inline-size:var(--spectrum-icon-inline-size);block-size:var(--spectrum-icon-block-size);color:var(--mod-icon-color,inherit);fill:currentColor;pointer-events:none;display:inline-block}:host(:not(:root)){overflow:hidden}@media (forced-colors:active){:host{forced-color-adjust:auto}}:host{--spectrum-icon-size:var(--spectrum-workflow-icon-size-100)}:host([size=xxs]){--spectrum-icon-size:var(--spectrum-workflow-icon-size-xxs)}:host([size=xs]){--spectrum-icon-size:var(--spectrum-workflow-icon-size-50)}:host([size=s]){--spectrum-icon-size:var(--spectrum-workflow-icon-size-75)}:host([size=l]){--spectrum-icon-size:var(--spectrum-workflow-icon-size-200)}:host([size=xl]){--spectrum-icon-size:var(--spectrum-workflow-icon-size-300)}:host([size=xxl]){--spectrum-icon-size:var(--spectrum-workflow-icon-size-xxl)}
|
5
5
|
`;
|
6
6
|
export default styles;
|
7
7
|
//# sourceMappingURL=spectrum-icon.css.dev.js.map
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["spectrum-icon.css.ts"],
|
4
|
-
"sourcesContent": ["/*\nCopyright 2024 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 { css } from '@spectrum-web-components/base';\nconst styles = css`\n :host{--spectrum-icon-inline-size:var(--mod-icon-inline-size,var(--mod-icon-size,var(--spectrum-icon-size)));--spectrum-icon-block-size:var(--mod-icon-block-size,var(--mod-icon-size,var(--spectrum-icon-size)));inline-size:var(--spectrum-icon-inline-size);block-size:var(--spectrum-icon-block-size);color:var(--mod-icon-color,inherit);fill:currentColor;display:inline-block}:host(:not(:root)){overflow:hidden}
|
4
|
+
"sourcesContent": ["/*\nCopyright 2024 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 { css } from '@spectrum-web-components/base';\nconst styles = css`\n :host{--spectrum-icon-inline-size:var(--mod-icon-inline-size,var(--mod-icon-size,var(--spectrum-icon-size)));--spectrum-icon-block-size:var(--mod-icon-block-size,var(--mod-icon-size,var(--spectrum-icon-size)));inline-size:var(--spectrum-icon-inline-size);block-size:var(--spectrum-icon-block-size);color:var(--mod-icon-color,inherit);fill:currentColor;pointer-events:none;display:inline-block}:host(:not(:root)){overflow:hidden}@media (forced-colors:active){:host{forced-color-adjust:auto}}:host{--spectrum-icon-size:var(--spectrum-workflow-icon-size-100)}:host([size=xxs]){--spectrum-icon-size:var(--spectrum-workflow-icon-size-xxs)}:host([size=xs]){--spectrum-icon-size:var(--spectrum-workflow-icon-size-50)}:host([size=s]){--spectrum-icon-size:var(--spectrum-workflow-icon-size-75)}:host([size=l]){--spectrum-icon-size:var(--spectrum-workflow-icon-size-200)}:host([size=xl]){--spectrum-icon-size:var(--spectrum-workflow-icon-size-300)}:host([size=xxl]){--spectrum-icon-size:var(--spectrum-workflow-icon-size-xxl)}\n`;\nexport default styles;"],
|
5
5
|
"mappings": ";AAWA,SAAS,WAAW;AACpB,MAAM,SAAS;AAAA;AAAA;AAGf,eAAe;",
|
6
6
|
"names": []
|
7
7
|
}
|
package/src/spectrum-icon.css.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
1
|
"use strict";import{css as o}from"@spectrum-web-components/base";const i=o`
|
2
|
-
:host{--spectrum-icon-inline-size:var(--mod-icon-inline-size,var(--mod-icon-size,var(--spectrum-icon-size)));--spectrum-icon-block-size:var(--mod-icon-block-size,var(--mod-icon-size,var(--spectrum-icon-size)));inline-size:var(--spectrum-icon-inline-size);block-size:var(--spectrum-icon-block-size);color:var(--mod-icon-color,inherit);fill:currentColor;display:inline-block}:host(:not(:root)){overflow:hidden}
|
2
|
+
:host{--spectrum-icon-inline-size:var(--mod-icon-inline-size,var(--mod-icon-size,var(--spectrum-icon-size)));--spectrum-icon-block-size:var(--mod-icon-block-size,var(--mod-icon-size,var(--spectrum-icon-size)));inline-size:var(--spectrum-icon-inline-size);block-size:var(--spectrum-icon-block-size);color:var(--mod-icon-color,inherit);fill:currentColor;pointer-events:none;display:inline-block}:host(:not(:root)){overflow:hidden}@media (forced-colors:active){:host{forced-color-adjust:auto}}:host{--spectrum-icon-size:var(--spectrum-workflow-icon-size-100)}:host([size=xxs]){--spectrum-icon-size:var(--spectrum-workflow-icon-size-xxs)}:host([size=xs]){--spectrum-icon-size:var(--spectrum-workflow-icon-size-50)}:host([size=s]){--spectrum-icon-size:var(--spectrum-workflow-icon-size-75)}:host([size=l]){--spectrum-icon-size:var(--spectrum-workflow-icon-size-200)}:host([size=xl]){--spectrum-icon-size:var(--spectrum-workflow-icon-size-300)}:host([size=xxl]){--spectrum-icon-size:var(--spectrum-workflow-icon-size-xxl)}
|
3
3
|
`;export default i;
|
4
4
|
//# sourceMappingURL=spectrum-icon.css.js.map
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["spectrum-icon.css.ts"],
|
4
|
-
"sourcesContent": ["/*\nCopyright 2024 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 { css } from '@spectrum-web-components/base';\nconst styles = css`\n :host{--spectrum-icon-inline-size:var(--mod-icon-inline-size,var(--mod-icon-size,var(--spectrum-icon-size)));--spectrum-icon-block-size:var(--mod-icon-block-size,var(--mod-icon-size,var(--spectrum-icon-size)));inline-size:var(--spectrum-icon-inline-size);block-size:var(--spectrum-icon-block-size);color:var(--mod-icon-color,inherit);fill:currentColor;display:inline-block}:host(:not(:root)){overflow:hidden}
|
4
|
+
"sourcesContent": ["/*\nCopyright 2024 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 { css } from '@spectrum-web-components/base';\nconst styles = css`\n :host{--spectrum-icon-inline-size:var(--mod-icon-inline-size,var(--mod-icon-size,var(--spectrum-icon-size)));--spectrum-icon-block-size:var(--mod-icon-block-size,var(--mod-icon-size,var(--spectrum-icon-size)));inline-size:var(--spectrum-icon-inline-size);block-size:var(--spectrum-icon-block-size);color:var(--mod-icon-color,inherit);fill:currentColor;pointer-events:none;display:inline-block}:host(:not(:root)){overflow:hidden}@media (forced-colors:active){:host{forced-color-adjust:auto}}:host{--spectrum-icon-size:var(--spectrum-workflow-icon-size-100)}:host([size=xxs]){--spectrum-icon-size:var(--spectrum-workflow-icon-size-xxs)}:host([size=xs]){--spectrum-icon-size:var(--spectrum-workflow-icon-size-50)}:host([size=s]){--spectrum-icon-size:var(--spectrum-workflow-icon-size-75)}:host([size=l]){--spectrum-icon-size:var(--spectrum-workflow-icon-size-200)}:host([size=xl]){--spectrum-icon-size:var(--spectrum-workflow-icon-size-300)}:host([size=xxl]){--spectrum-icon-size:var(--spectrum-workflow-icon-size-xxl)}\n`;\nexport default styles;"],
|
5
5
|
"mappings": "aAWA,OAAS,OAAAA,MAAW,gCACpB,MAAMC,EAASD;AAAA;AAAA,EAGf,eAAeC",
|
6
6
|
"names": ["css", "styles"]
|
7
7
|
}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
"use strict";
|
2
|
+
import { html } from "@open-wc/testing";
|
3
|
+
import "@spectrum-web-components/icon/sp-icon.js";
|
4
|
+
import { testForMemoryLeaks } from "../../../test/testing-helpers.js";
|
5
|
+
testForMemoryLeaks(html`
|
6
|
+
<sp-icon name="ui:Chevron200"></sp-icon>
|
7
|
+
`);
|
8
|
+
//# sourceMappingURL=icon-memory.test.js.map
|
@@ -0,0 +1,7 @@
|
|
1
|
+
{
|
2
|
+
"version": 3,
|
3
|
+
"sources": ["icon-memory.test.ts"],
|
4
|
+
"sourcesContent": ["/*\nCopyright 2023 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\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 } from '@open-wc/testing';\nimport '@spectrum-web-components/icon/sp-icon.js';\nimport { testForMemoryLeaks } from '../../../test/testing-helpers.js';\n\ntestForMemoryLeaks(html`\n <sp-icon name=\"ui:Chevron200\"></sp-icon>\n`);\n"],
|
5
|
+
"mappings": ";AAWA,SAAS,YAAY;AACrB,OAAO;AACP,SAAS,0BAA0B;AAEnC,mBAAmB;AAAA;AAAA,CAElB;",
|
6
|
+
"names": []
|
7
|
+
}
|