@spectrum-web-components/shared 0.15.1 → 0.15.3

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spectrum-web-components/shared",
3
- "version": "0.15.1",
3
+ "version": "0.15.3",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -89,14 +89,13 @@
89
89
  ],
90
90
  "dependencies": {
91
91
  "@lit-labs/observers": "^1.0.1",
92
- "@spectrum-web-components/base": "^0.7.0",
93
- "focus-visible": "^5.1.0",
94
- "tslib": "^2.0.0"
92
+ "@spectrum-web-components/base": "^0.7.2",
93
+ "focus-visible": "^5.1.0"
95
94
  },
96
95
  "types": "./src/index.d.ts",
97
96
  "customElements": "custom-elements.json",
98
97
  "sideEffects": [
99
98
  "./**/*.dev.js"
100
99
  ],
101
- "gitHead": "96da2eef637c5d50dd04a75d40a46353116787b4"
100
+ "gitHead": "370295c7ce89dd64d3d9a4373fd84e861904ec5a"
102
101
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["like-anchor.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*/\nimport {\n html,\n ReactiveElement,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\nimport { ifDefined } from '@spectrum-web-components/base/src/directives.js';\n\ntype Constructor<T = Record<string, unknown>> = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n new (...args: any[]): T;\n prototype: T;\n};\n\ntype RenderAnchorOptions = {\n id: string;\n className?: string;\n ariaHidden?: boolean;\n anchorContent?: TemplateResult | TemplateResult[];\n labelledby?: string;\n tabindex?: -1 | 0;\n};\n\nexport interface LikeAnchorInterface {\n download?: string;\n label?: string;\n href?: string;\n rel?: string;\n target?: '_blank' | '_parent' | '_self' | '_top';\n renderAnchor(options: RenderAnchorOptions): TemplateResult;\n}\n\nexport function LikeAnchor<T extends Constructor<ReactiveElement>>(\n constructor: T\n): T & Constructor<LikeAnchorInterface> {\n class LikeAnchorElement extends constructor {\n @property({ reflect: true })\n public download?: string;\n\n @property()\n public label?: string;\n\n @property({ reflect: true })\n public href?: string;\n\n @property({ reflect: true })\n public target?: '_blank' | '_parent' | '_self' | '_top';\n\n @property({ reflect: true })\n public rel?: string;\n\n public renderAnchor({\n id,\n className,\n ariaHidden,\n labelledby,\n tabindex,\n // prettier-ignore\n anchorContent = html`<slot></slot>`,\n }: RenderAnchorOptions): TemplateResult {\n // prettier-ignore\n return html\n `<a\n id=${id}\n class=${ifDefined(className)}\n href=${ifDefined(this.href)}\n download=${ifDefined(this.download)}\n target=${ifDefined(this.target)}\n aria-label=${ifDefined(this.label)}\n aria-labelledby=${ifDefined(labelledby)}\n aria-hidden=${ifDefined(ariaHidden ? 'true' : undefined)}\n tabindex=${ifDefined(tabindex)}\n rel=${ifDefined(this.rel)}\n >${anchorContent}</a>`;\n }\n }\n return LikeAnchorElement;\n}\n"],
5
- "mappings": ";;;;;;;;;;;;AAWA;AAAA,EACI;AAAA,OAGG;AACP,SAAS,gBAAgB;AACzB,SAAS,iBAAiB;AA0BnB,gBAAS,WACZ,aACoC;AACpC,QAAM,0BAA0B,YAAY;AAAA,IAgBjC,aAAa;AAAA,MAChB;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MAEA,gBAAgB;AAAA,IACpB,GAAwC;AAEpC,aAAO;AAAA,yBAEM;AAAA,4BACG,UAAU,SAAS;AAAA,2BACpB,UAAU,KAAK,IAAI;AAAA,+BACf,UAAU,KAAK,QAAQ;AAAA,6BACzB,UAAU,KAAK,MAAM;AAAA,iCACjB,UAAU,KAAK,KAAK;AAAA,sCACf,UAAU,UAAU;AAAA,kCACxB,UAAU,aAAa,SAAS,MAAS;AAAA,+BAC5C,UAAU,QAAQ;AAAA,0BACvB,UAAU,KAAK,GAAG;AAAA,mBACzB;AAAA,IACX;AAAA,EACJ;AAtCW;AAAA,IADN,SAAS,EAAE,SAAS,KAAK,CAAC;AAAA,KADzB,kBAEK;AAGA;AAAA,IADN,SAAS;AAAA,KAJR,kBAKK;AAGA;AAAA,IADN,SAAS,EAAE,SAAS,KAAK,CAAC;AAAA,KAPzB,kBAQK;AAGA;AAAA,IADN,SAAS,EAAE,SAAS,KAAK,CAAC;AAAA,KAVzB,kBAWK;AAGA;AAAA,IADN,SAAS,EAAE,SAAS,KAAK,CAAC;AAAA,KAbzB,kBAcK;AA2BX,SAAO;AACX;",
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 {\n html,\n ReactiveElement,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\nimport { ifDefined } from '@spectrum-web-components/base/src/directives.js';\n\ntype Constructor<T = Record<string, unknown>> = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n new (...args: any[]): T;\n prototype: T;\n};\n\ntype RenderAnchorOptions = {\n id: string;\n className?: string;\n ariaHidden?: boolean;\n anchorContent?: TemplateResult | TemplateResult[];\n labelledby?: string;\n tabindex?: -1 | 0;\n};\n\nexport interface LikeAnchorInterface {\n download?: string;\n label?: string;\n href?: string;\n rel?: string;\n target?: '_blank' | '_parent' | '_self' | '_top';\n renderAnchor(options: RenderAnchorOptions): TemplateResult;\n}\n\nexport function LikeAnchor<T extends Constructor<ReactiveElement>>(\n constructor: T\n): T & Constructor<LikeAnchorInterface> {\n class LikeAnchorElement extends constructor {\n @property({ reflect: true })\n public download?: string;\n\n /**\n * An accessible label that describes the component.\n * It will be applied to aria-label, but not visually rendered.\n */\n @property()\n public label?: string;\n\n @property({ reflect: true })\n public href?: string;\n\n @property({ reflect: true })\n public target?: '_blank' | '_parent' | '_self' | '_top';\n\n @property({ reflect: true })\n public rel?: string;\n\n public renderAnchor({\n id,\n className,\n ariaHidden,\n labelledby,\n tabindex,\n // prettier-ignore\n anchorContent = html`<slot></slot>`,\n }: RenderAnchorOptions): TemplateResult {\n // prettier-ignore\n return html\n `<a\n id=${id}\n class=${ifDefined(className)}\n href=${ifDefined(this.href)}\n download=${ifDefined(this.download)}\n target=${ifDefined(this.target)}\n aria-label=${ifDefined(this.label)}\n aria-labelledby=${ifDefined(labelledby)}\n aria-hidden=${ifDefined(ariaHidden ? 'true' : undefined)}\n tabindex=${ifDefined(tabindex)}\n rel=${ifDefined(this.rel)}\n >${anchorContent}</a>`;\n }\n }\n return LikeAnchorElement;\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;AAWA;AAAA,EACI;AAAA,OAGG;AACP,SAAS,gBAAgB;AACzB,SAAS,iBAAiB;AA0BnB,gBAAS,WACZ,aACoC;AACpC,QAAM,0BAA0B,YAAY;AAAA,IAoBjC,aAAa;AAAA,MAChB;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MAEA,gBAAgB;AAAA,IACpB,GAAwC;AAEpC,aAAO;AAAA,yBAEM;AAAA,4BACG,UAAU,SAAS;AAAA,2BACpB,UAAU,KAAK,IAAI;AAAA,+BACf,UAAU,KAAK,QAAQ;AAAA,6BACzB,UAAU,KAAK,MAAM;AAAA,iCACjB,UAAU,KAAK,KAAK;AAAA,sCACf,UAAU,UAAU;AAAA,kCACxB,UAAU,aAAa,SAAS,MAAS;AAAA,+BAC5C,UAAU,QAAQ;AAAA,0BACvB,UAAU,KAAK,GAAG;AAAA,mBACzB;AAAA,IACX;AAAA,EACJ;AA1CW;AAAA,IADN,SAAS,EAAE,SAAS,KAAK,CAAC;AAAA,KADzB,kBAEK;AAOA;AAAA,IADN,SAAS;AAAA,KARR,kBASK;AAGA;AAAA,IADN,SAAS,EAAE,SAAS,KAAK,CAAC;AAAA,KAXzB,kBAYK;AAGA;AAAA,IADN,SAAS,EAAE,SAAS,KAAK,CAAC;AAAA,KAdzB,kBAeK;AAGA;AAAA,IADN,SAAS,EAAE,SAAS,KAAK,CAAC;AAAA,KAjBzB,kBAkBK;AA2BX,SAAO;AACX;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["like-anchor.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*/\nimport {\n html,\n ReactiveElement,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\nimport { ifDefined } from '@spectrum-web-components/base/src/directives.js';\n\ntype Constructor<T = Record<string, unknown>> = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n new (...args: any[]): T;\n prototype: T;\n};\n\ntype RenderAnchorOptions = {\n id: string;\n className?: string;\n ariaHidden?: boolean;\n anchorContent?: TemplateResult | TemplateResult[];\n labelledby?: string;\n tabindex?: -1 | 0;\n};\n\nexport interface LikeAnchorInterface {\n download?: string;\n label?: string;\n href?: string;\n rel?: string;\n target?: '_blank' | '_parent' | '_self' | '_top';\n renderAnchor(options: RenderAnchorOptions): TemplateResult;\n}\n\nexport function LikeAnchor<T extends Constructor<ReactiveElement>>(\n constructor: T\n): T & Constructor<LikeAnchorInterface> {\n class LikeAnchorElement extends constructor {\n @property({ reflect: true })\n public download?: string;\n\n @property()\n public label?: string;\n\n @property({ reflect: true })\n public href?: string;\n\n @property({ reflect: true })\n public target?: '_blank' | '_parent' | '_self' | '_top';\n\n @property({ reflect: true })\n public rel?: string;\n\n public renderAnchor({\n id,\n className,\n ariaHidden,\n labelledby,\n tabindex,\n // prettier-ignore\n anchorContent = html`<slot></slot>`,\n }: RenderAnchorOptions): TemplateResult {\n // prettier-ignore\n return html\n `<a\n id=${id}\n class=${ifDefined(className)}\n href=${ifDefined(this.href)}\n download=${ifDefined(this.download)}\n target=${ifDefined(this.target)}\n aria-label=${ifDefined(this.label)}\n aria-labelledby=${ifDefined(labelledby)}\n aria-hidden=${ifDefined(ariaHidden ? 'true' : undefined)}\n tabindex=${ifDefined(tabindex)}\n rel=${ifDefined(this.rel)}\n >${anchorContent}</a>`;\n }\n }\n return LikeAnchorElement;\n}\n"],
5
- "mappings": "qNAWA,OACI,QAAAA,MAGG,gCACP,OAAS,YAAAC,MAAgB,kDACzB,OAAS,aAAAC,MAAiB,kDA0BnB,gBAAS,WACZC,EACoC,CACpC,MAAMC,UAA0BD,CAAY,CAgBjC,aAAa,CAChB,GAAAE,EACA,UAAAC,EACA,WAAAC,EACA,WAAAC,EACA,SAAAC,EAEA,cAAAC,EAAgBV,gBACpB,EAAwC,CAEpC,OAAOA;AAAA,yBAEMK;AAAA,4BACGH,EAAUI,CAAS;AAAA,2BACpBJ,EAAU,KAAK,IAAI;AAAA,+BACfA,EAAU,KAAK,QAAQ;AAAA,6BACzBA,EAAU,KAAK,MAAM;AAAA,iCACjBA,EAAU,KAAK,KAAK;AAAA,sCACfA,EAAUM,CAAU;AAAA,kCACxBN,EAAUK,EAAa,OAAS,MAAS;AAAA,+BAC5CL,EAAUO,CAAQ;AAAA,0BACvBP,EAAU,KAAK,GAAG;AAAA,mBACzBQ,OACX,CACJ,CAtCW,OAAAC,EAAA,CADNV,EAAS,CAAE,QAAS,EAAK,CAAC,GADzBG,EAEK,wBAGAO,EAAA,CADNV,EAAS,GAJRG,EAKK,qBAGAO,EAAA,CADNV,EAAS,CAAE,QAAS,EAAK,CAAC,GAPzBG,EAQK,oBAGAO,EAAA,CADNV,EAAS,CAAE,QAAS,EAAK,CAAC,GAVzBG,EAWK,sBAGAO,EAAA,CADNV,EAAS,CAAE,QAAS,EAAK,CAAC,GAbzBG,EAcK,mBA2BJA,CACX",
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 {\n html,\n ReactiveElement,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\nimport { ifDefined } from '@spectrum-web-components/base/src/directives.js';\n\ntype Constructor<T = Record<string, unknown>> = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n new (...args: any[]): T;\n prototype: T;\n};\n\ntype RenderAnchorOptions = {\n id: string;\n className?: string;\n ariaHidden?: boolean;\n anchorContent?: TemplateResult | TemplateResult[];\n labelledby?: string;\n tabindex?: -1 | 0;\n};\n\nexport interface LikeAnchorInterface {\n download?: string;\n label?: string;\n href?: string;\n rel?: string;\n target?: '_blank' | '_parent' | '_self' | '_top';\n renderAnchor(options: RenderAnchorOptions): TemplateResult;\n}\n\nexport function LikeAnchor<T extends Constructor<ReactiveElement>>(\n constructor: T\n): T & Constructor<LikeAnchorInterface> {\n class LikeAnchorElement extends constructor {\n @property({ reflect: true })\n public download?: string;\n\n /**\n * An accessible label that describes the component.\n * It will be applied to aria-label, but not visually rendered.\n */\n @property()\n public label?: string;\n\n @property({ reflect: true })\n public href?: string;\n\n @property({ reflect: true })\n public target?: '_blank' | '_parent' | '_self' | '_top';\n\n @property({ reflect: true })\n public rel?: string;\n\n public renderAnchor({\n id,\n className,\n ariaHidden,\n labelledby,\n tabindex,\n // prettier-ignore\n anchorContent = html`<slot></slot>`,\n }: RenderAnchorOptions): TemplateResult {\n // prettier-ignore\n return html\n `<a\n id=${id}\n class=${ifDefined(className)}\n href=${ifDefined(this.href)}\n download=${ifDefined(this.download)}\n target=${ifDefined(this.target)}\n aria-label=${ifDefined(this.label)}\n aria-labelledby=${ifDefined(labelledby)}\n aria-hidden=${ifDefined(ariaHidden ? 'true' : undefined)}\n tabindex=${ifDefined(tabindex)}\n rel=${ifDefined(this.rel)}\n >${anchorContent}</a>`;\n }\n }\n return LikeAnchorElement;\n}\n"],
5
+ "mappings": "qNAWA,OACI,QAAAA,MAGG,gCACP,OAAS,YAAAC,MAAgB,kDACzB,OAAS,aAAAC,MAAiB,kDA0BnB,gBAAS,WACZC,EACoC,CACpC,MAAMC,UAA0BD,CAAY,CAoBjC,aAAa,CAChB,GAAAE,EACA,UAAAC,EACA,WAAAC,EACA,WAAAC,EACA,SAAAC,EAEA,cAAAC,EAAgBV,gBACpB,EAAwC,CAEpC,OAAOA;AAAA,yBAEMK;AAAA,4BACGH,EAAUI,CAAS;AAAA,2BACpBJ,EAAU,KAAK,IAAI;AAAA,+BACfA,EAAU,KAAK,QAAQ;AAAA,6BACzBA,EAAU,KAAK,MAAM;AAAA,iCACjBA,EAAU,KAAK,KAAK;AAAA,sCACfA,EAAUM,CAAU;AAAA,kCACxBN,EAAUK,EAAa,OAAS,MAAS;AAAA,+BAC5CL,EAAUO,CAAQ;AAAA,0BACvBP,EAAU,KAAK,GAAG;AAAA,mBACzBQ,OACX,CACJ,CA1CW,OAAAC,EAAA,CADNV,EAAS,CAAE,QAAS,EAAK,CAAC,GADzBG,EAEK,wBAOAO,EAAA,CADNV,EAAS,GARRG,EASK,qBAGAO,EAAA,CADNV,EAAS,CAAE,QAAS,EAAK,CAAC,GAXzBG,EAYK,oBAGAO,EAAA,CADNV,EAAS,CAAE,QAAS,EAAK,CAAC,GAdzBG,EAeK,sBAGAO,EAAA,CADNV,EAAS,CAAE,QAAS,EAAK,CAAC,GAjBzBG,EAkBK,mBA2BJA,CACX",
6
6
  "names": ["html", "property", "ifDefined", "constructor", "LikeAnchorElement", "id", "className", "ariaHidden", "labelledby", "tabindex", "anchorContent", "__decorateClass"]
7
7
  }
@@ -1 +0,0 @@
1
- declare module 'focus-visible';