@spectrum-web-components/icon 1.1.0-beta.36 → 1.1.0-beta.38

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": "1.1.0-beta.36",
3
+ "version": "1.1.0-beta.38",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -81,8 +81,8 @@
81
81
  "lit-html"
82
82
  ],
83
83
  "dependencies": {
84
- "@spectrum-web-components/base": "^1.1.0-beta.36",
85
- "@spectrum-web-components/iconset": "^1.1.0-beta.36"
84
+ "@spectrum-web-components/base": "^1.1.0-beta.38",
85
+ "@spectrum-web-components/iconset": "^1.1.0-beta.38"
86
86
  },
87
87
  "devDependencies": {
88
88
  "@spectrum-css/icon": "^8.0.0-s2-foundations.17"
@@ -93,5 +93,5 @@
93
93
  "./sp-*.js",
94
94
  "./**/*.dev.js"
95
95
  ],
96
- "gitHead": "aeb7d512c206bb90dc6cbf0f72977f36e6661e7c"
96
+ "gitHead": "0857cc4af7c23d15a7236f18795a3a6dc977855d"
97
97
  }
@@ -66,7 +66,7 @@ __decorateClass([
66
66
  state()
67
67
  ], IconBase.prototype, "spectrumVersion", 2);
68
68
  __decorateClass([
69
- property()
69
+ property({ reflect: true })
70
70
  ], IconBase.prototype, "label", 2);
71
71
  __decorateClass([
72
72
  property({ reflect: true })
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["IconBase.ts"],
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 {\n SystemResolutionController,\n systemResolverUpdatedSymbol,\n} from '@spectrum-web-components/reactive-controllers/src/SystemContextResolution.js';\n\nimport {\n property,\n state,\n} 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 private unsubscribeSystemContext: (() => void) | null = null;\n\n @state()\n public spectrumVersion = 1;\n\n @property()\n public label = '';\n\n @property({ reflect: true })\n public size?: 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl';\n\n public override connectedCallback(): void {\n super.connectedCallback();\n }\n\n public override disconnectedCallback(): void {\n super.disconnectedCallback();\n if (this.unsubscribeSystemContext) {\n this.unsubscribeSystemContext();\n this.unsubscribeSystemContext = null;\n }\n }\n\n private systemResolver = new SystemResolutionController(this);\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\n if (changes.has(systemResolverUpdatedSymbol)) {\n this.spectrumVersion =\n this.systemResolver.system === 'spectrum-two' ? 2 : 1;\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": ";;;;;;;;;;;AAYA;AAAA,EAEI;AAAA,EAEA;AAAA,OAEG;AACP;AAAA,EACI;AAAA,EACA;AAAA,OACG;AAEP;AAAA,EACI;AAAA,EACA;AAAA,OACG;AAEP,OAAO,gBAAgB;AAEhB,aAAM,iBAAiB,gBAAgB;AAAA,EAAvC;AAAA;AAKH,SAAQ,2BAAgD;AAGxD,SAAO,kBAAkB;AAGzB,SAAO,QAAQ;AAiBf,SAAQ,iBAAiB,IAAI,2BAA2B,IAAI;AAAA;AAAA,EA3B5D,WAA2B,SAAyB;AAChD,WAAO,CAAC,UAAU;AAAA,EACtB;AAAA,EAagB,oBAA0B;AACtC,UAAM,kBAAkB;AAAA,EAC5B;AAAA,EAEgB,uBAA6B;AACzC,UAAM,qBAAqB;AAC3B,QAAI,KAAK,0BAA0B;AAC/B,WAAK,yBAAyB;AAC9B,WAAK,2BAA2B;AAAA,IACpC;AAAA,EACJ;AAAA,EAImB,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;AAEA,QAAI,QAAQ,IAAI,2BAA2B,GAAG;AAC1C,WAAK,kBACD,KAAK,eAAe,WAAW,iBAAiB,IAAI;AAAA,IAC5D;AAEA,UAAM,OAAO,OAAO;AAAA,EACxB;AAAA,EAEmB,SAAyB;AACxC,WAAO;AAAA;AAAA;AAAA,EAGX;AACJ;AA5CW;AAAA,EADN,MAAM;AAAA,GAPE,SAQF;AAGA;AAAA,EADN,SAAS;AAAA,GAVD,SAWF;AAGA;AAAA,EADN,SAAS,EAAE,SAAS,KAAK,CAAC;AAAA,GAblB,SAcF;",
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 {\n SystemResolutionController,\n systemResolverUpdatedSymbol,\n} from '@spectrum-web-components/reactive-controllers/src/SystemContextResolution.js';\n\nimport {\n property,\n state,\n} 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 private unsubscribeSystemContext: (() => void) | null = null;\n\n @state()\n public spectrumVersion = 1;\n\n @property({ reflect: true })\n public label = '';\n\n @property({ reflect: true })\n public size?: 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl';\n\n public override connectedCallback(): void {\n super.connectedCallback();\n }\n\n public override disconnectedCallback(): void {\n super.disconnectedCallback();\n if (this.unsubscribeSystemContext) {\n this.unsubscribeSystemContext();\n this.unsubscribeSystemContext = null;\n }\n }\n\n private systemResolver = new SystemResolutionController(this);\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\n if (changes.has(systemResolverUpdatedSymbol)) {\n this.spectrumVersion =\n this.systemResolver.system === 'spectrum-two' ? 2 : 1;\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": ";;;;;;;;;;;AAYA;AAAA,EAEI;AAAA,EAEA;AAAA,OAEG;AACP;AAAA,EACI;AAAA,EACA;AAAA,OACG;AAEP;AAAA,EACI;AAAA,EACA;AAAA,OACG;AAEP,OAAO,gBAAgB;AAEhB,aAAM,iBAAiB,gBAAgB;AAAA,EAAvC;AAAA;AAKH,SAAQ,2BAAgD;AAGxD,SAAO,kBAAkB;AAGzB,SAAO,QAAQ;AAiBf,SAAQ,iBAAiB,IAAI,2BAA2B,IAAI;AAAA;AAAA,EA3B5D,WAA2B,SAAyB;AAChD,WAAO,CAAC,UAAU;AAAA,EACtB;AAAA,EAagB,oBAA0B;AACtC,UAAM,kBAAkB;AAAA,EAC5B;AAAA,EAEgB,uBAA6B;AACzC,UAAM,qBAAqB;AAC3B,QAAI,KAAK,0BAA0B;AAC/B,WAAK,yBAAyB;AAC9B,WAAK,2BAA2B;AAAA,IACpC;AAAA,EACJ;AAAA,EAImB,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;AAEA,QAAI,QAAQ,IAAI,2BAA2B,GAAG;AAC1C,WAAK,kBACD,KAAK,eAAe,WAAW,iBAAiB,IAAI;AAAA,IAC5D;AAEA,UAAM,OAAO,OAAO;AAAA,EACxB;AAAA,EAEmB,SAAyB;AACxC,WAAO;AAAA;AAAA;AAAA,EAGX;AACJ;AA5CW;AAAA,EADN,MAAM;AAAA,GAPE,SAQF;AAGA;AAAA,EADN,SAAS,EAAE,SAAS,KAAK,CAAC;AAAA,GAVlB,SAWF;AAGA;AAAA,EADN,SAAS,EAAE,SAAS,KAAK,CAAC;AAAA,GAblB,SAcF;",
6
6
  "names": []
7
7
  }
package/src/IconBase.js CHANGED
@@ -1,4 +1,4 @@
1
1
  "use strict";var c=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var l=(i,r,e,s)=>{for(var t=s>1?void 0:s?m(r,e):r,o=i.length-1,u;o>=0;o--)(u=i[o])&&(t=(s?u(r,e,t):u(t))||t);return s&&t&&c(r,e,t),t};import{html as n,SpectrumElement as a}from"@spectrum-web-components/base";import{SystemResolutionController as d,systemResolverUpdatedSymbol as b}from"@spectrum-web-components/reactive-controllers/src/SystemContextResolution.js";import{property as p,state as y}from"@spectrum-web-components/base/src/decorators.js";import v from"./icon.css.js";export class IconBase extends a{constructor(){super(...arguments);this.unsubscribeSystemContext=null;this.spectrumVersion=1;this.label="";this.systemResolver=new d(this)}static get styles(){return[v]}connectedCallback(){super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeSystemContext&&(this.unsubscribeSystemContext(),this.unsubscribeSystemContext=null)}update(e){e.has("label")&&(this.label?this.removeAttribute("aria-hidden"):this.setAttribute("aria-hidden","true")),e.has(b)&&(this.spectrumVersion=this.systemResolver.system==="spectrum-two"?2:1),super.update(e)}render(){return n`
2
2
  <slot></slot>
3
- `}}l([y()],IconBase.prototype,"spectrumVersion",2),l([p()],IconBase.prototype,"label",2),l([p({reflect:!0})],IconBase.prototype,"size",2);
3
+ `}}l([y()],IconBase.prototype,"spectrumVersion",2),l([p({reflect:!0})],IconBase.prototype,"label",2),l([p({reflect:!0})],IconBase.prototype,"size",2);
4
4
  //# sourceMappingURL=IconBase.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["IconBase.ts"],
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 {\n SystemResolutionController,\n systemResolverUpdatedSymbol,\n} from '@spectrum-web-components/reactive-controllers/src/SystemContextResolution.js';\n\nimport {\n property,\n state,\n} 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 private unsubscribeSystemContext: (() => void) | null = null;\n\n @state()\n public spectrumVersion = 1;\n\n @property()\n public label = '';\n\n @property({ reflect: true })\n public size?: 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl';\n\n public override connectedCallback(): void {\n super.connectedCallback();\n }\n\n public override disconnectedCallback(): void {\n super.disconnectedCallback();\n if (this.unsubscribeSystemContext) {\n this.unsubscribeSystemContext();\n this.unsubscribeSystemContext = null;\n }\n }\n\n private systemResolver = new SystemResolutionController(this);\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\n if (changes.has(systemResolverUpdatedSymbol)) {\n this.spectrumVersion =\n this.systemResolver.system === 'spectrum-two' ? 2 : 1;\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": "qNAYA,OAEI,QAAAA,EAEA,mBAAAC,MAEG,gCACP,OACI,8BAAAC,EACA,+BAAAC,MACG,+EAEP,OACI,YAAAC,EACA,SAAAC,MACG,kDAEP,OAAOC,MAAgB,gBAEhB,aAAM,iBAAiBL,CAAgB,CAAvC,kCAKH,KAAQ,yBAAgD,KAGxD,KAAO,gBAAkB,EAGzB,KAAO,MAAQ,GAiBf,KAAQ,eAAiB,IAAIC,EAA2B,IAAI,EA3B5D,WAA2B,QAAyB,CAChD,MAAO,CAACI,CAAU,CACtB,CAagB,mBAA0B,CACtC,MAAM,kBAAkB,CAC5B,CAEgB,sBAA6B,CACzC,MAAM,qBAAqB,EACvB,KAAK,2BACL,KAAK,yBAAyB,EAC9B,KAAK,yBAA2B,KAExC,CAImB,OAAOC,EAA+B,CACjDA,EAAQ,IAAI,OAAO,IACf,KAAK,MACL,KAAK,gBAAgB,aAAa,EAElC,KAAK,aAAa,cAAe,MAAM,GAI3CA,EAAQ,IAAIJ,CAA2B,IACvC,KAAK,gBACD,KAAK,eAAe,SAAW,eAAiB,EAAI,GAG5D,MAAM,OAAOI,CAAO,CACxB,CAEmB,QAAyB,CACxC,OAAOP;AAAA;AAAA,SAGX,CACJ,CA5CWQ,EAAA,CADNH,EAAM,GAPE,SAQF,+BAGAG,EAAA,CADNJ,EAAS,GAVD,SAWF,qBAGAI,EAAA,CADNJ,EAAS,CAAE,QAAS,EAAK,CAAC,GAblB,SAcF",
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 {\n SystemResolutionController,\n systemResolverUpdatedSymbol,\n} from '@spectrum-web-components/reactive-controllers/src/SystemContextResolution.js';\n\nimport {\n property,\n state,\n} 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 private unsubscribeSystemContext: (() => void) | null = null;\n\n @state()\n public spectrumVersion = 1;\n\n @property({ reflect: true })\n public label = '';\n\n @property({ reflect: true })\n public size?: 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl';\n\n public override connectedCallback(): void {\n super.connectedCallback();\n }\n\n public override disconnectedCallback(): void {\n super.disconnectedCallback();\n if (this.unsubscribeSystemContext) {\n this.unsubscribeSystemContext();\n this.unsubscribeSystemContext = null;\n }\n }\n\n private systemResolver = new SystemResolutionController(this);\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\n if (changes.has(systemResolverUpdatedSymbol)) {\n this.spectrumVersion =\n this.systemResolver.system === 'spectrum-two' ? 2 : 1;\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": "qNAYA,OAEI,QAAAA,EAEA,mBAAAC,MAEG,gCACP,OACI,8BAAAC,EACA,+BAAAC,MACG,+EAEP,OACI,YAAAC,EACA,SAAAC,MACG,kDAEP,OAAOC,MAAgB,gBAEhB,aAAM,iBAAiBL,CAAgB,CAAvC,kCAKH,KAAQ,yBAAgD,KAGxD,KAAO,gBAAkB,EAGzB,KAAO,MAAQ,GAiBf,KAAQ,eAAiB,IAAIC,EAA2B,IAAI,EA3B5D,WAA2B,QAAyB,CAChD,MAAO,CAACI,CAAU,CACtB,CAagB,mBAA0B,CACtC,MAAM,kBAAkB,CAC5B,CAEgB,sBAA6B,CACzC,MAAM,qBAAqB,EACvB,KAAK,2BACL,KAAK,yBAAyB,EAC9B,KAAK,yBAA2B,KAExC,CAImB,OAAOC,EAA+B,CACjDA,EAAQ,IAAI,OAAO,IACf,KAAK,MACL,KAAK,gBAAgB,aAAa,EAElC,KAAK,aAAa,cAAe,MAAM,GAI3CA,EAAQ,IAAIJ,CAA2B,IACvC,KAAK,gBACD,KAAK,eAAe,SAAW,eAAiB,EAAI,GAG5D,MAAM,OAAOI,CAAO,CACxB,CAEmB,QAAyB,CACxC,OAAOP;AAAA;AAAA,SAGX,CACJ,CA5CWQ,EAAA,CADNH,EAAM,GAPE,SAQF,+BAGAG,EAAA,CADNJ,EAAS,CAAE,QAAS,EAAK,CAAC,GAVlB,SAWF,qBAGAI,EAAA,CADNJ,EAAS,CAAE,QAAS,EAAK,CAAC,GAblB,SAcF",
6
6
  "names": ["html", "SpectrumElement", "SystemResolutionController", "systemResolverUpdatedSymbol", "property", "state", "iconStyles", "changes", "__decorateClass"]
7
7
  }