@spectrum-web-components/link 0.14.4 → 0.14.5

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.
@@ -4,7 +4,7 @@
4
4
  "modules": [
5
5
  {
6
6
  "kind": "javascript-module",
7
- "path": "sp-link.js",
7
+ "path": "sp-link.ts",
8
8
  "declarations": [],
9
9
  "exports": [
10
10
  {
@@ -19,7 +19,7 @@
19
19
  },
20
20
  {
21
21
  "kind": "javascript-module",
22
- "path": "src/Link.js",
22
+ "path": "src/Link.ts",
23
23
  "declarations": [
24
24
  {
25
25
  "kind": "class",
@@ -53,6 +53,18 @@
53
53
  "attribute": "static",
54
54
  "reflects": true
55
55
  },
56
+ {
57
+ "kind": "field",
58
+ "name": "quiet",
59
+ "type": {
60
+ "text": "boolean"
61
+ },
62
+ "privacy": "public",
63
+ "default": "false",
64
+ "description": "Uses quiet styles or not",
65
+ "attribute": "quiet",
66
+ "reflects": true
67
+ },
56
68
  {
57
69
  "kind": "field",
58
70
  "name": "focusElement",
@@ -63,10 +75,6 @@
63
75
  }
64
76
  ],
65
77
  "attributes": [
66
- {
67
- "description": "uses quiet styles or not",
68
- "name": "quiet"
69
- },
70
78
  {
71
79
  "description": "uses over background styles or not",
72
80
  "name": "over-background"
@@ -84,6 +92,15 @@
84
92
  "text": "'black' | 'white' | undefined"
85
93
  },
86
94
  "fieldName": "static"
95
+ },
96
+ {
97
+ "name": "quiet",
98
+ "type": {
99
+ "text": "boolean"
100
+ },
101
+ "default": "false",
102
+ "description": "Uses quiet styles or not",
103
+ "fieldName": "quiet"
87
104
  }
88
105
  ],
89
106
  "mixins": [
@@ -106,7 +123,7 @@
106
123
  "name": "Link",
107
124
  "declaration": {
108
125
  "name": "Link",
109
- "module": "src/Link.js"
126
+ "module": "src/Link.ts"
110
127
  }
111
128
  }
112
129
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spectrum-web-components/link",
3
- "version": "0.14.4",
3
+ "version": "0.14.5",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -69,5 +69,5 @@
69
69
  "./sp-*.js",
70
70
  "./**/*.dev.js"
71
71
  ],
72
- "gitHead": "007a762c0257af4cd74e3781d877a8a8343acfd0"
72
+ "gitHead": "5e11d828243bb3ff572c25b33a8d58844a89f524"
73
73
  }
package/src/Link.d.ts CHANGED
@@ -7,7 +7,6 @@ declare const Link_base: typeof Focusable & {
7
7
  /**
8
8
  * @element sp-link
9
9
  *
10
- * @attr quiet - uses quiet styles or not
11
10
  * @attr over-background - uses over background styles or not
12
11
  */
13
12
  export declare class Link extends Link_base {
@@ -15,6 +14,10 @@ export declare class Link extends Link_base {
15
14
  anchorElement: HTMLAnchorElement;
16
15
  variant: 'secondary' | undefined;
17
16
  static: 'black' | 'white' | undefined;
17
+ /**
18
+ * Uses quiet styles or not
19
+ */
20
+ quiet: boolean;
18
21
  get focusElement(): HTMLElement;
19
22
  protected render(): TemplateResult;
20
23
  }
package/src/Link.dev.js CHANGED
@@ -18,6 +18,10 @@ import { LikeAnchor } from "@spectrum-web-components/shared/src/like-anchor.js";
18
18
  import { Focusable } from "@spectrum-web-components/shared/src/focusable.js";
19
19
  import linkStyles from "./link.css.js";
20
20
  export class Link extends LikeAnchor(Focusable) {
21
+ constructor() {
22
+ super(...arguments);
23
+ this.quiet = false;
24
+ }
21
25
  static get styles() {
22
26
  return [linkStyles];
23
27
  }
@@ -37,4 +41,7 @@ __decorateClass([
37
41
  __decorateClass([
38
42
  property({ type: String, reflect: true })
39
43
  ], Link.prototype, "static", 2);
44
+ __decorateClass([
45
+ property({ type: Boolean, reflect: true, attribute: "quiet" })
46
+ ], Link.prototype, "quiet", 2);
40
47
  //# sourceMappingURL=Link.dev.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["Link.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 { CSSResultArray, TemplateResult } from '@spectrum-web-components/base';\nimport {\n property,\n query,\n} from '@spectrum-web-components/base/src/decorators.js';\nimport { LikeAnchor } from '@spectrum-web-components/shared/src/like-anchor.js';\nimport { Focusable } from '@spectrum-web-components/shared/src/focusable.js';\n\nimport linkStyles from './link.css.js';\n\n/**\n * @element sp-link\n *\n * @attr quiet - uses quiet styles or not\n * @attr over-background - uses over background styles or not\n */\nexport class Link extends LikeAnchor(Focusable) {\n public static override get styles(): CSSResultArray {\n return [linkStyles];\n }\n\n @query('#anchor')\n anchorElement!: HTMLAnchorElement;\n\n @property({ type: String, reflect: true })\n public variant: 'secondary' | undefined;\n\n @property({ type: String, reflect: true })\n public static: 'black' | 'white' | undefined;\n\n public override get focusElement(): HTMLElement {\n return this.anchorElement;\n }\n\n protected override render(): TemplateResult {\n return this.renderAnchor({ id: 'anchor' });\n }\n}\n"],
5
- "mappings": ";;;;;;;;;;;;AAaA;AAAA,EACI;AAAA,EACA;AAAA,OACG;AACP,SAAS,kBAAkB;AAC3B,SAAS,iBAAiB;AAE1B,OAAO,gBAAgB;AAQhB,aAAM,aAAa,WAAW,SAAS,EAAE;AAAA,EAC5C,WAA2B,SAAyB;AAChD,WAAO,CAAC,UAAU;AAAA,EACtB;AAAA,EAWA,IAAoB,eAA4B;AAC5C,WAAO,KAAK;AAAA,EAChB;AAAA,EAEmB,SAAyB;AACxC,WAAO,KAAK,aAAa,EAAE,IAAI,SAAS,CAAC;AAAA,EAC7C;AACJ;AAfI;AAAA,EADC,MAAM,SAAS;AAAA,GALP,KAMT;AAGO;AAAA,EADN,SAAS,EAAE,MAAM,QAAQ,SAAS,KAAK,CAAC;AAAA,GARhC,KASF;AAGA;AAAA,EADN,SAAS,EAAE,MAAM,QAAQ,SAAS,KAAK,CAAC;AAAA,GAXhC,KAYF;",
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 { CSSResultArray, TemplateResult } from '@spectrum-web-components/base';\nimport {\n property,\n query,\n} from '@spectrum-web-components/base/src/decorators.js';\nimport { LikeAnchor } from '@spectrum-web-components/shared/src/like-anchor.js';\nimport { Focusable } from '@spectrum-web-components/shared/src/focusable.js';\n\nimport linkStyles from './link.css.js';\n\n/**\n * @element sp-link\n *\n * @attr over-background - uses over background styles or not\n */\nexport class Link extends LikeAnchor(Focusable) {\n public static override get styles(): CSSResultArray {\n return [linkStyles];\n }\n\n @query('#anchor')\n anchorElement!: HTMLAnchorElement;\n\n @property({ type: String, reflect: true })\n public variant: 'secondary' | undefined;\n\n @property({ type: String, reflect: true })\n public static: 'black' | 'white' | undefined;\n\n /**\n * Uses quiet styles or not\n */\n @property({ type: Boolean, reflect: true, attribute: 'quiet' })\n public quiet = false;\n\n public override get focusElement(): HTMLElement {\n return this.anchorElement;\n }\n\n protected override render(): TemplateResult {\n return this.renderAnchor({ id: 'anchor' });\n }\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;AAaA;AAAA,EACI;AAAA,EACA;AAAA,OACG;AACP,SAAS,kBAAkB;AAC3B,SAAS,iBAAiB;AAE1B,OAAO,gBAAgB;AAOhB,aAAM,aAAa,WAAW,SAAS,EAAE;AAAA,EAAzC;AAAA;AAkBH,SAAO,QAAQ;AAAA;AAAA,EAjBf,WAA2B,SAAyB;AAChD,WAAO,CAAC,UAAU;AAAA,EACtB;AAAA,EAiBA,IAAoB,eAA4B;AAC5C,WAAO,KAAK;AAAA,EAChB;AAAA,EAEmB,SAAyB;AACxC,WAAO,KAAK,aAAa,EAAE,IAAI,SAAS,CAAC;AAAA,EAC7C;AACJ;AArBI;AAAA,EADC,MAAM,SAAS;AAAA,GALP,KAMT;AAGO;AAAA,EADN,SAAS,EAAE,MAAM,QAAQ,SAAS,KAAK,CAAC;AAAA,GARhC,KASF;AAGA;AAAA,EADN,SAAS,EAAE,MAAM,QAAQ,SAAS,KAAK,CAAC;AAAA,GAXhC,KAYF;AAMA;AAAA,EADN,SAAS,EAAE,MAAM,SAAS,SAAS,MAAM,WAAW,QAAQ,CAAC;AAAA,GAjBrD,KAkBF;",
6
6
  "names": []
7
7
  }
package/src/Link.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";var m=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var o=(n,r,i,t)=>{for(var e=t>1?void 0:t?p(r,i):r,l=n.length-1,c;l>=0;l--)(c=n[l])&&(e=(t?c(r,i,e):c(e))||e);return t&&e&&m(r,i,e),e};import{property as u,query as s}from"@spectrum-web-components/base/src/decorators.js";import{LikeAnchor as a}from"@spectrum-web-components/shared/src/like-anchor.js";import{Focusable as d}from"@spectrum-web-components/shared/src/focusable.js";import f from"./link.css.js";export class Link extends a(d){static get styles(){return[f]}get focusElement(){return this.anchorElement}render(){return this.renderAnchor({id:"anchor"})}}o([s("#anchor")],Link.prototype,"anchorElement",2),o([u({type:String,reflect:!0})],Link.prototype,"variant",2),o([u({type:String,reflect:!0})],Link.prototype,"static",2);
1
+ "use strict";var a=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var t=(l,r,i,o)=>{for(var e=o>1?void 0:o?p(r,i):r,n=l.length-1,c;n>=0;n--)(c=l[n])&&(e=(o?c(r,i,e):c(e))||e);return o&&e&&a(r,i,e),e};import{property as u,query as s}from"@spectrum-web-components/base/src/decorators.js";import{LikeAnchor as m}from"@spectrum-web-components/shared/src/like-anchor.js";import{Focusable as d}from"@spectrum-web-components/shared/src/focusable.js";import f from"./link.css.js";export class Link extends m(d){constructor(){super(...arguments);this.quiet=!1}static get styles(){return[f]}get focusElement(){return this.anchorElement}render(){return this.renderAnchor({id:"anchor"})}}t([s("#anchor")],Link.prototype,"anchorElement",2),t([u({type:String,reflect:!0})],Link.prototype,"variant",2),t([u({type:String,reflect:!0})],Link.prototype,"static",2),t([u({type:Boolean,reflect:!0,attribute:"quiet"})],Link.prototype,"quiet",2);
2
2
  //# sourceMappingURL=Link.js.map
package/src/Link.js.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["Link.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 { CSSResultArray, TemplateResult } from '@spectrum-web-components/base';\nimport {\n property,\n query,\n} from '@spectrum-web-components/base/src/decorators.js';\nimport { LikeAnchor } from '@spectrum-web-components/shared/src/like-anchor.js';\nimport { Focusable } from '@spectrum-web-components/shared/src/focusable.js';\n\nimport linkStyles from './link.css.js';\n\n/**\n * @element sp-link\n *\n * @attr quiet - uses quiet styles or not\n * @attr over-background - uses over background styles or not\n */\nexport class Link extends LikeAnchor(Focusable) {\n public static override get styles(): CSSResultArray {\n return [linkStyles];\n }\n\n @query('#anchor')\n anchorElement!: HTMLAnchorElement;\n\n @property({ type: String, reflect: true })\n public variant: 'secondary' | undefined;\n\n @property({ type: String, reflect: true })\n public static: 'black' | 'white' | undefined;\n\n public override get focusElement(): HTMLElement {\n return this.anchorElement;\n }\n\n protected override render(): TemplateResult {\n return this.renderAnchor({ id: 'anchor' });\n }\n}\n"],
5
- "mappings": "qNAaA,OACI,YAAAA,EACA,SAAAC,MACG,kDACP,OAAS,cAAAC,MAAkB,qDAC3B,OAAS,aAAAC,MAAiB,mDAE1B,OAAOC,MAAgB,gBAQhB,aAAM,aAAaF,EAAWC,CAAS,CAAE,CAC5C,WAA2B,QAAyB,CAChD,MAAO,CAACC,CAAU,CACtB,CAWA,IAAoB,cAA4B,CAC5C,OAAO,KAAK,aAChB,CAEmB,QAAyB,CACxC,OAAO,KAAK,aAAa,CAAE,GAAI,QAAS,CAAC,CAC7C,CACJ,CAfIC,EAAA,CADCJ,EAAM,SAAS,GALP,KAMT,6BAGOI,EAAA,CADNL,EAAS,CAAE,KAAM,OAAQ,QAAS,EAAK,CAAC,GARhC,KASF,uBAGAK,EAAA,CADNL,EAAS,CAAE,KAAM,OAAQ,QAAS,EAAK,CAAC,GAXhC,KAYF",
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 { CSSResultArray, TemplateResult } from '@spectrum-web-components/base';\nimport {\n property,\n query,\n} from '@spectrum-web-components/base/src/decorators.js';\nimport { LikeAnchor } from '@spectrum-web-components/shared/src/like-anchor.js';\nimport { Focusable } from '@spectrum-web-components/shared/src/focusable.js';\n\nimport linkStyles from './link.css.js';\n\n/**\n * @element sp-link\n *\n * @attr over-background - uses over background styles or not\n */\nexport class Link extends LikeAnchor(Focusable) {\n public static override get styles(): CSSResultArray {\n return [linkStyles];\n }\n\n @query('#anchor')\n anchorElement!: HTMLAnchorElement;\n\n @property({ type: String, reflect: true })\n public variant: 'secondary' | undefined;\n\n @property({ type: String, reflect: true })\n public static: 'black' | 'white' | undefined;\n\n /**\n * Uses quiet styles or not\n */\n @property({ type: Boolean, reflect: true, attribute: 'quiet' })\n public quiet = false;\n\n public override get focusElement(): HTMLElement {\n return this.anchorElement;\n }\n\n protected override render(): TemplateResult {\n return this.renderAnchor({ id: 'anchor' });\n }\n}\n"],
5
+ "mappings": "qNAaA,OACI,YAAAA,EACA,SAAAC,MACG,kDACP,OAAS,cAAAC,MAAkB,qDAC3B,OAAS,aAAAC,MAAiB,mDAE1B,OAAOC,MAAgB,gBAOhB,aAAM,aAAaF,EAAWC,CAAS,CAAE,CAAzC,kCAkBH,KAAO,MAAQ,GAjBf,WAA2B,QAAyB,CAChD,MAAO,CAACC,CAAU,CACtB,CAiBA,IAAoB,cAA4B,CAC5C,OAAO,KAAK,aAChB,CAEmB,QAAyB,CACxC,OAAO,KAAK,aAAa,CAAE,GAAI,QAAS,CAAC,CAC7C,CACJ,CArBIC,EAAA,CADCJ,EAAM,SAAS,GALP,KAMT,6BAGOI,EAAA,CADNL,EAAS,CAAE,KAAM,OAAQ,QAAS,EAAK,CAAC,GARhC,KASF,uBAGAK,EAAA,CADNL,EAAS,CAAE,KAAM,OAAQ,QAAS,EAAK,CAAC,GAXhC,KAYF,sBAMAK,EAAA,CADNL,EAAS,CAAE,KAAM,QAAS,QAAS,GAAM,UAAW,OAAQ,CAAC,GAjBrD,KAkBF",
6
6
  "names": ["property", "query", "LikeAnchor", "Focusable", "linkStyles", "__decorateClass"]
7
7
  }