@spectrum-web-components/link 0.12.7 → 0.12.8
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/custom-elements.json +3 -3
- package/package.json +21 -8
- package/sp-link.dev.js +3 -0
- package/sp-link.dev.js.map +7 -0
- package/sp-link.js +3 -14
- package/sp-link.js.map +7 -1
- package/src/Link.dev.js +41 -0
- package/src/Link.dev.js.map +7 -0
- package/src/Link.js +38 -40
- package/src/Link.js.map +7 -1
- package/src/index.dev.js +2 -0
- package/src/index.dev.js.map +7 -0
- package/src/index.js +2 -13
- package/src/index.js.map +7 -1
- package/src/link.css.dev.js +32 -0
- package/src/link.css.dev.js.map +7 -0
- package/src/link.css.js +3 -14
- package/src/link.css.js.map +7 -1
- package/src/spectrum-link.css.dev.js +32 -0
- package/src/spectrum-link.css.dev.js.map +7 -0
- package/src/spectrum-link.css.js +3 -14
- package/src/spectrum-link.css.js.map +7 -1
- package/stories/link-sizes.stories.js +9 -20
- package/stories/link-sizes.stories.js.map +7 -1
- package/stories/link.stories.js +16 -33
- package/stories/link.stories.js.map +7 -1
- package/test/benchmark/test-basic.js +5 -16
- package/test/benchmark/test-basic.js.map +7 -1
- package/test/link-sizes.test-vrt.js +4 -15
- package/test/link-sizes.test-vrt.js.map +7 -1
- package/test/link.test-vrt.js +4 -15
- package/test/link.test-vrt.js.map +7 -1
- package/test/link.test.js +47 -54
- package/test/link.test.js.map +7 -1
package/custom-elements.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"modules": [
|
|
5
5
|
{
|
|
6
6
|
"kind": "javascript-module",
|
|
7
|
-
"path": "sp-link.
|
|
7
|
+
"path": "sp-link.js",
|
|
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.
|
|
22
|
+
"path": "src/Link.js",
|
|
23
23
|
"declarations": [
|
|
24
24
|
{
|
|
25
25
|
"kind": "class",
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
"name": "Link",
|
|
94
94
|
"declaration": {
|
|
95
95
|
"name": "Link",
|
|
96
|
-
"module": "src/Link.
|
|
96
|
+
"module": "src/Link.js"
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spectrum-web-components/link",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.8",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -20,11 +20,24 @@
|
|
|
20
20
|
"module": "./src/index.js",
|
|
21
21
|
"type": "module",
|
|
22
22
|
"exports": {
|
|
23
|
-
".":
|
|
24
|
-
|
|
23
|
+
".": {
|
|
24
|
+
"development": "./src/index.dev.js",
|
|
25
|
+
"default": "./src/index.js"
|
|
26
|
+
},
|
|
25
27
|
"./package.json": "./package.json",
|
|
26
|
-
"./
|
|
27
|
-
|
|
28
|
+
"./src/Link.js": {
|
|
29
|
+
"development": "./src/Link.dev.js",
|
|
30
|
+
"default": "./src/Link.js"
|
|
31
|
+
},
|
|
32
|
+
"./src/index.js": {
|
|
33
|
+
"development": "./src/index.dev.js",
|
|
34
|
+
"default": "./src/index.js"
|
|
35
|
+
},
|
|
36
|
+
"./src/link.css.js": "./src/link.css.js",
|
|
37
|
+
"./sp-link.js": {
|
|
38
|
+
"development": "./sp-link.dev.js",
|
|
39
|
+
"default": "./sp-link.js"
|
|
40
|
+
}
|
|
28
41
|
},
|
|
29
42
|
"scripts": {
|
|
30
43
|
"test": "echo \"Error: run tests from mono-repo root.\" && exit 1"
|
|
@@ -44,8 +57,8 @@
|
|
|
44
57
|
"lit-html"
|
|
45
58
|
],
|
|
46
59
|
"dependencies": {
|
|
47
|
-
"@spectrum-web-components/base": "^0.
|
|
48
|
-
"@spectrum-web-components/shared": "^0.14.
|
|
60
|
+
"@spectrum-web-components/base": "^0.6.0",
|
|
61
|
+
"@spectrum-web-components/shared": "^0.14.5",
|
|
49
62
|
"tslib": "^2.0.0"
|
|
50
63
|
},
|
|
51
64
|
"devDependencies": {
|
|
@@ -56,5 +69,5 @@
|
|
|
56
69
|
"sideEffects": [
|
|
57
70
|
"./sp-*.js"
|
|
58
71
|
],
|
|
59
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "50cac779bbb0d6735c2061f1eceb86b9daf9b22b"
|
|
60
73
|
}
|
package/sp-link.dev.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["sp-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*/\nimport { Link } from './src/Link.dev.js'\n\ncustomElements.define('sp-link', Link);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-link': Link;\n }\n}\n"],
|
|
5
|
+
"mappings": "AAWA;AAEA,eAAe,OAAO,WAAW,IAAI;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/sp-link.js
CHANGED
|
@@ -1,14 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
-
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
-
|
|
7
|
-
Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
-
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
-
OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
-
governing permissions and limitations under the License.
|
|
11
|
-
*/
|
|
12
|
-
import { Link } from './src/Link.js';
|
|
13
|
-
customElements.define('sp-link', Link);
|
|
14
|
-
//# sourceMappingURL=sp-link.js.map
|
|
1
|
+
import { Link } from "./src/Link.js";
|
|
2
|
+
customElements.define("sp-link", Link);
|
|
3
|
+
//# sourceMappingURL=sp-link.js.map
|
package/sp-link.js.map
CHANGED
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["sp-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*/\nimport { Link } from './src/Link.js';\n\ncustomElements.define('sp-link', Link);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-link': Link;\n }\n}\n"],
|
|
5
|
+
"mappings": "AAWA;AAEA,eAAe,OAAO,WAAW,IAAI;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/src/Link.dev.js
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
4
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
5
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6
|
+
if (decorator = decorators[i])
|
|
7
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8
|
+
if (kind && result)
|
|
9
|
+
__defProp(target, key, result);
|
|
10
|
+
return result;
|
|
11
|
+
};
|
|
12
|
+
import {
|
|
13
|
+
SizedMixin
|
|
14
|
+
} from "@spectrum-web-components/base";
|
|
15
|
+
import {
|
|
16
|
+
property,
|
|
17
|
+
query
|
|
18
|
+
} from "@spectrum-web-components/base/src/decorators.js";
|
|
19
|
+
import { LikeAnchor } from "@spectrum-web-components/shared/src/like-anchor.js";
|
|
20
|
+
import { Focusable } from "@spectrum-web-components/shared/src/focusable.js";
|
|
21
|
+
import linkStyles from "./link.css.js";
|
|
22
|
+
export class Link extends SizedMixin(LikeAnchor(Focusable), {
|
|
23
|
+
noDefaultSize: true
|
|
24
|
+
}) {
|
|
25
|
+
static get styles() {
|
|
26
|
+
return [linkStyles];
|
|
27
|
+
}
|
|
28
|
+
get focusElement() {
|
|
29
|
+
return this.anchorElement;
|
|
30
|
+
}
|
|
31
|
+
render() {
|
|
32
|
+
return this.renderAnchor({ id: "anchor" });
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
__decorateClass([
|
|
36
|
+
query("#anchor")
|
|
37
|
+
], Link.prototype, "anchorElement", 2);
|
|
38
|
+
__decorateClass([
|
|
39
|
+
property({ type: String, reflect: true })
|
|
40
|
+
], Link.prototype, "variant", 2);
|
|
41
|
+
//# sourceMappingURL=Link.dev.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 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 {\n CSSResultArray,\n SizedMixin,\n TemplateResult,\n} 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 SizedMixin(LikeAnchor(Focusable), {\n noDefaultSize: true,\n}) {\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 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": ";;;;;;;;;;;AAYA;AAAA;AAAA;AAKA;AAAA;AAAA;AAAA;AAIA;AACA;AAEA;AAQO,aAAM,aAAa,WAAW,WAAW,SAAS,GAAG;AAAA,EACxD,eAAe;AACnB,CAAC,EAAE;AAAA,aAC4B,SAAyB;AAChD,WAAO,CAAC,UAAU;AAAA,EACtB;AAAA,MAQoB,eAA4B;AAC5C,WAAO,KAAK;AAAA,EAChB;AAAA,EAEmB,SAAyB;AACxC,WAAO,KAAK,aAAa,EAAE,IAAI,SAAS,CAAC;AAAA,EAC7C;AACJ;AAZI;AAAA,EADA,AAAC,MAAM,SAAS;AAAA,GAChB,AARG,KAQH;AAGO;AAAA,EADP,AAAC,SAAS,EAAE,MAAM,QAAQ,SAAS,KAAK,CAAC;AAAA,GAClC,AAXJ,KAWI;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/src/Link.js
CHANGED
|
@@ -1,43 +1,41 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
import {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
* @attr over-background - uses over background styles or not
|
|
23
|
-
*/
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
4
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
5
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6
|
+
if (decorator = decorators[i])
|
|
7
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8
|
+
if (kind && result)
|
|
9
|
+
__defProp(target, key, result);
|
|
10
|
+
return result;
|
|
11
|
+
};
|
|
12
|
+
import {
|
|
13
|
+
SizedMixin
|
|
14
|
+
} from "@spectrum-web-components/base";
|
|
15
|
+
import {
|
|
16
|
+
property,
|
|
17
|
+
query
|
|
18
|
+
} from "@spectrum-web-components/base/src/decorators.js";
|
|
19
|
+
import { LikeAnchor } from "@spectrum-web-components/shared/src/like-anchor.js";
|
|
20
|
+
import { Focusable } from "@spectrum-web-components/shared/src/focusable.js";
|
|
21
|
+
import linkStyles from "./link.css.js";
|
|
24
22
|
export class Link extends SizedMixin(LikeAnchor(Focusable), {
|
|
25
|
-
|
|
23
|
+
noDefaultSize: true
|
|
26
24
|
}) {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
25
|
+
static get styles() {
|
|
26
|
+
return [linkStyles];
|
|
27
|
+
}
|
|
28
|
+
get focusElement() {
|
|
29
|
+
return this.anchorElement;
|
|
30
|
+
}
|
|
31
|
+
render() {
|
|
32
|
+
return this.renderAnchor({ id: "anchor" });
|
|
33
|
+
}
|
|
36
34
|
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
], Link.prototype, "anchorElement",
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
], Link.prototype, "variant",
|
|
43
|
-
//# sourceMappingURL=Link.js.map
|
|
35
|
+
__decorateClass([
|
|
36
|
+
query("#anchor")
|
|
37
|
+
], Link.prototype, "anchorElement", 2);
|
|
38
|
+
__decorateClass([
|
|
39
|
+
property({ type: String, reflect: true })
|
|
40
|
+
], Link.prototype, "variant", 2);
|
|
41
|
+
//# sourceMappingURL=Link.js.map
|
package/src/Link.js.map
CHANGED
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 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 {\n CSSResultArray,\n SizedMixin,\n TemplateResult,\n} 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 SizedMixin(LikeAnchor(Focusable), {\n noDefaultSize: true,\n}) {\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 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": ";;;;;;;;;;;AAYA;AAAA;AAAA;AAKA;AAAA;AAAA;AAAA;AAIA;AACA;AAEA;AAQO,aAAM,aAAa,WAAW,WAAW,SAAS,GAAG;AAAA,EACxD,eAAe;AACnB,CAAC,EAAE;AAAA,aAC4B,SAAyB;AAChD,WAAO,CAAC,UAAU;AAAA,EACtB;AAAA,MAQoB,eAA4B;AAC5C,WAAO,KAAK;AAAA,EAChB;AAAA,EAEmB,SAAyB;AACxC,WAAO,KAAK,aAAa,EAAE,IAAI,SAAS,CAAC;AAAA,EAC7C;AACJ;AAZI;AAAA,EADA,AAAC,MAAM,SAAS;AAAA,GAChB,AARG,KAQH;AAGO;AAAA,EADP,AAAC,SAAS,EAAE,MAAM,QAAQ,SAAS,KAAK,CAAC;AAAA,GAClC,AAXJ,KAWI;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/src/index.dev.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["index.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*/\nexport * from './Link.dev.js'\n"],
|
|
5
|
+
"mappings": "AAWA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/src/index.js
CHANGED
|
@@ -1,13 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
-
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
-
|
|
7
|
-
Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
-
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
-
OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
-
governing permissions and limitations under the License.
|
|
11
|
-
*/
|
|
12
|
-
export * from './Link.js';
|
|
13
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
export * from "./Link.js";
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
package/src/index.js.map
CHANGED
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["index.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*/\nexport * from './Link.js';\n"],
|
|
5
|
+
"mappings": "AAWA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { css } from "@spectrum-web-components/base";
|
|
2
|
+
const styles = css`
|
|
3
|
+
:host([size=s]){--spectrum-link-primary-text-size:var(
|
|
4
|
+
--spectrum-link-s-primary-text-size,var(--spectrum-global-dimension-font-size-75)
|
|
5
|
+
)}:host([size=m]){--spectrum-link-primary-text-size:var(
|
|
6
|
+
--spectrum-link-m-primary-text-size,var(--spectrum-global-dimension-font-size-100)
|
|
7
|
+
)}:host([size=l]){--spectrum-link-primary-text-size:var(
|
|
8
|
+
--spectrum-link-l-primary-text-size,var(--spectrum-global-dimension-font-size-200)
|
|
9
|
+
)}:host([size=xl]){--spectrum-link-primary-text-size:var(
|
|
10
|
+
--spectrum-link-xl-primary-text-size,var(--spectrum-global-dimension-font-size-300)
|
|
11
|
+
)}a{-webkit-text-decoration-skip:objects;background-color:transparent;cursor:pointer;font-size:var(--spectrum-link-primary-text-size);outline:none;transition:color var(--spectrum-global-animation-duration-100,.13s) ease-in-out}a,a.focus-visible,a.focus-visible{text-decoration:underline}a.focus-visible{-webkit-text-decoration-style:double;text-decoration-style:double}a:focus-visible{text-decoration:underline;-webkit-text-decoration-style:double;text-decoration-style:double}:host([quiet]) a{text-decoration:none}:host([quiet]) a:hover{text-decoration:underline}a{color:var(
|
|
12
|
+
--spectrum-link-m-primary-text-color,var(--spectrum-alias-link-primary-text-color-default)
|
|
13
|
+
)}a:hover{color:var(
|
|
14
|
+
--spectrum-link-m-primary-text-color-hover,var(--spectrum-alias-link-primary-text-color-hover)
|
|
15
|
+
)}a:active{color:var(
|
|
16
|
+
--spectrum-link-m-primary-text-color-down,var(--spectrum-alias-link-primary-text-color-down)
|
|
17
|
+
)}a.focus-visible{color:var(
|
|
18
|
+
--spectrum-link-m-primary-text-color-key-focus,var(--spectrum-alias-link-primary-text-color-key-focus)
|
|
19
|
+
)}a:focus-visible{color:var(
|
|
20
|
+
--spectrum-link-m-primary-text-color-key-focus,var(--spectrum-alias-link-primary-text-color-key-focus)
|
|
21
|
+
)}:host([variant=secondary]) a{color:inherit}:host([variant=secondary]) a:hover{color:inherit}:host([variant=secondary]) a:active{color:inherit}:host([variant=secondary]) a:focus{color:inherit}:host([over-background]) a{color:var(
|
|
22
|
+
--spectrum-link-m-primary-overbackground-text-color,var(--spectrum-alias-text-color-overbackground)
|
|
23
|
+
)}:host([over-background]) a:hover{color:var(
|
|
24
|
+
--spectrum-link-m-primary-overbackground-text-color-hover,var(--spectrum-alias-text-color-overbackground)
|
|
25
|
+
)}:host([over-background]) a:active{color:var(
|
|
26
|
+
--spectrum-link-m-primary-overbackground-text-color-down,var(--spectrum-alias-text-color-overbackground)
|
|
27
|
+
)}:host([over-background]) a:focus{color:var(
|
|
28
|
+
--spectrum-link-m-primary-overbackground-text-color-key-focus,var(--spectrum-alias-text-color-overbackground)
|
|
29
|
+
)}@media (forced-colors:active){:host([variant=secondary]) a{color:linktext}:host([variant=secondary]) a:hover{color:linktext}:host([variant=secondary]) a:active{color:linktext}:host([variant=secondary]) a:focus{color:linktext}}:host{display:inline}:host(:focus){outline:none}:host([href]) a.focus-visible{text-decoration:underline;-webkit-text-decoration-style:double;text-decoration-style:double}:host([href]) a:focus-visible{text-decoration:underline;-webkit-text-decoration-style:double;text-decoration-style:double}
|
|
30
|
+
`;
|
|
31
|
+
export default styles;
|
|
32
|
+
//# sourceMappingURL=link.css.dev.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["link.css.ts"],
|
|
4
|
+
"sourcesContent": ["/*\nCopyright 2022 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([size=s]){--spectrum-link-primary-text-size:var(\n--spectrum-link-s-primary-text-size,var(--spectrum-global-dimension-font-size-75)\n)}:host([size=m]){--spectrum-link-primary-text-size:var(\n--spectrum-link-m-primary-text-size,var(--spectrum-global-dimension-font-size-100)\n)}:host([size=l]){--spectrum-link-primary-text-size:var(\n--spectrum-link-l-primary-text-size,var(--spectrum-global-dimension-font-size-200)\n)}:host([size=xl]){--spectrum-link-primary-text-size:var(\n--spectrum-link-xl-primary-text-size,var(--spectrum-global-dimension-font-size-300)\n)}a{-webkit-text-decoration-skip:objects;background-color:transparent;cursor:pointer;font-size:var(--spectrum-link-primary-text-size);outline:none;transition:color var(--spectrum-global-animation-duration-100,.13s) ease-in-out}a,a.focus-visible,a.focus-visible{text-decoration:underline}a.focus-visible{-webkit-text-decoration-style:double;text-decoration-style:double}a:focus-visible{text-decoration:underline;-webkit-text-decoration-style:double;text-decoration-style:double}:host([quiet]) a{text-decoration:none}:host([quiet]) a:hover{text-decoration:underline}a{color:var(\n--spectrum-link-m-primary-text-color,var(--spectrum-alias-link-primary-text-color-default)\n)}a:hover{color:var(\n--spectrum-link-m-primary-text-color-hover,var(--spectrum-alias-link-primary-text-color-hover)\n)}a:active{color:var(\n--spectrum-link-m-primary-text-color-down,var(--spectrum-alias-link-primary-text-color-down)\n)}a.focus-visible{color:var(\n--spectrum-link-m-primary-text-color-key-focus,var(--spectrum-alias-link-primary-text-color-key-focus)\n)}a:focus-visible{color:var(\n--spectrum-link-m-primary-text-color-key-focus,var(--spectrum-alias-link-primary-text-color-key-focus)\n)}:host([variant=secondary]) a{color:inherit}:host([variant=secondary]) a:hover{color:inherit}:host([variant=secondary]) a:active{color:inherit}:host([variant=secondary]) a:focus{color:inherit}:host([over-background]) a{color:var(\n--spectrum-link-m-primary-overbackground-text-color,var(--spectrum-alias-text-color-overbackground)\n)}:host([over-background]) a:hover{color:var(\n--spectrum-link-m-primary-overbackground-text-color-hover,var(--spectrum-alias-text-color-overbackground)\n)}:host([over-background]) a:active{color:var(\n--spectrum-link-m-primary-overbackground-text-color-down,var(--spectrum-alias-text-color-overbackground)\n)}:host([over-background]) a:focus{color:var(\n--spectrum-link-m-primary-overbackground-text-color-key-focus,var(--spectrum-alias-text-color-overbackground)\n)}@media (forced-colors:active){:host([variant=secondary]) a{color:linktext}:host([variant=secondary]) a:hover{color:linktext}:host([variant=secondary]) a:active{color:linktext}:host([variant=secondary]) a:focus{color:linktext}}:host{display:inline}:host(:focus){outline:none}:host([href]) a.focus-visible{text-decoration:underline;-webkit-text-decoration-style:double;text-decoration-style:double}:host([href]) a:focus-visible{text-decoration:underline;-webkit-text-decoration-style:double;text-decoration-style:double}\n`;\nexport default styles;"],
|
|
5
|
+
"mappings": "AAWA;AACA,MAAM,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA6Bf,eAAe;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/src/link.css.js
CHANGED
|
@@ -1,16 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
-
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
-
|
|
7
|
-
Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
-
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
-
OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
-
governing permissions and limitations under the License.
|
|
11
|
-
*/
|
|
12
|
-
import { css } from '@spectrum-web-components/base';
|
|
13
|
-
const styles = css `
|
|
1
|
+
import { css } from "@spectrum-web-components/base";
|
|
2
|
+
const styles = css`
|
|
14
3
|
:host([size=s]){--spectrum-link-primary-text-size:var(
|
|
15
4
|
--spectrum-link-s-primary-text-size,var(--spectrum-global-dimension-font-size-75)
|
|
16
5
|
)}:host([size=m]){--spectrum-link-primary-text-size:var(
|
|
@@ -40,4 +29,4 @@ const styles = css `
|
|
|
40
29
|
)}@media (forced-colors:active){:host([variant=secondary]) a{color:linktext}:host([variant=secondary]) a:hover{color:linktext}:host([variant=secondary]) a:active{color:linktext}:host([variant=secondary]) a:focus{color:linktext}}:host{display:inline}:host(:focus){outline:none}:host([href]) a.focus-visible{text-decoration:underline;-webkit-text-decoration-style:double;text-decoration-style:double}:host([href]) a:focus-visible{text-decoration:underline;-webkit-text-decoration-style:double;text-decoration-style:double}
|
|
41
30
|
`;
|
|
42
31
|
export default styles;
|
|
43
|
-
//# sourceMappingURL=link.css.js.map
|
|
32
|
+
//# sourceMappingURL=link.css.js.map
|
package/src/link.css.js.map
CHANGED
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["link.css.ts"],
|
|
4
|
+
"sourcesContent": ["/*\nCopyright 2022 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([size=s]){--spectrum-link-primary-text-size:var(\n--spectrum-link-s-primary-text-size,var(--spectrum-global-dimension-font-size-75)\n)}:host([size=m]){--spectrum-link-primary-text-size:var(\n--spectrum-link-m-primary-text-size,var(--spectrum-global-dimension-font-size-100)\n)}:host([size=l]){--spectrum-link-primary-text-size:var(\n--spectrum-link-l-primary-text-size,var(--spectrum-global-dimension-font-size-200)\n)}:host([size=xl]){--spectrum-link-primary-text-size:var(\n--spectrum-link-xl-primary-text-size,var(--spectrum-global-dimension-font-size-300)\n)}a{-webkit-text-decoration-skip:objects;background-color:transparent;cursor:pointer;font-size:var(--spectrum-link-primary-text-size);outline:none;transition:color var(--spectrum-global-animation-duration-100,.13s) ease-in-out}a,a.focus-visible,a.focus-visible{text-decoration:underline}a.focus-visible{-webkit-text-decoration-style:double;text-decoration-style:double}a:focus-visible{text-decoration:underline;-webkit-text-decoration-style:double;text-decoration-style:double}:host([quiet]) a{text-decoration:none}:host([quiet]) a:hover{text-decoration:underline}a{color:var(\n--spectrum-link-m-primary-text-color,var(--spectrum-alias-link-primary-text-color-default)\n)}a:hover{color:var(\n--spectrum-link-m-primary-text-color-hover,var(--spectrum-alias-link-primary-text-color-hover)\n)}a:active{color:var(\n--spectrum-link-m-primary-text-color-down,var(--spectrum-alias-link-primary-text-color-down)\n)}a.focus-visible{color:var(\n--spectrum-link-m-primary-text-color-key-focus,var(--spectrum-alias-link-primary-text-color-key-focus)\n)}a:focus-visible{color:var(\n--spectrum-link-m-primary-text-color-key-focus,var(--spectrum-alias-link-primary-text-color-key-focus)\n)}:host([variant=secondary]) a{color:inherit}:host([variant=secondary]) a:hover{color:inherit}:host([variant=secondary]) a:active{color:inherit}:host([variant=secondary]) a:focus{color:inherit}:host([over-background]) a{color:var(\n--spectrum-link-m-primary-overbackground-text-color,var(--spectrum-alias-text-color-overbackground)\n)}:host([over-background]) a:hover{color:var(\n--spectrum-link-m-primary-overbackground-text-color-hover,var(--spectrum-alias-text-color-overbackground)\n)}:host([over-background]) a:active{color:var(\n--spectrum-link-m-primary-overbackground-text-color-down,var(--spectrum-alias-text-color-overbackground)\n)}:host([over-background]) a:focus{color:var(\n--spectrum-link-m-primary-overbackground-text-color-key-focus,var(--spectrum-alias-text-color-overbackground)\n)}@media (forced-colors:active){:host([variant=secondary]) a{color:linktext}:host([variant=secondary]) a:hover{color:linktext}:host([variant=secondary]) a:active{color:linktext}:host([variant=secondary]) a:focus{color:linktext}}:host{display:inline}:host(:focus){outline:none}:host([href]) a.focus-visible{text-decoration:underline;-webkit-text-decoration-style:double;text-decoration-style:double}:host([href]) a:focus-visible{text-decoration:underline;-webkit-text-decoration-style:double;text-decoration-style:double}\n`;\nexport default styles;"],
|
|
5
|
+
"mappings": "AAWA;AACA,MAAM,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA6Bf,eAAe;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { css } from "@spectrum-web-components/base";
|
|
2
|
+
const styles = css`
|
|
3
|
+
:host([size=s]){--spectrum-link-primary-text-size:var(
|
|
4
|
+
--spectrum-link-s-primary-text-size,var(--spectrum-global-dimension-font-size-75)
|
|
5
|
+
)}:host([size=m]){--spectrum-link-primary-text-size:var(
|
|
6
|
+
--spectrum-link-m-primary-text-size,var(--spectrum-global-dimension-font-size-100)
|
|
7
|
+
)}:host([size=l]){--spectrum-link-primary-text-size:var(
|
|
8
|
+
--spectrum-link-l-primary-text-size,var(--spectrum-global-dimension-font-size-200)
|
|
9
|
+
)}:host([size=xl]){--spectrum-link-primary-text-size:var(
|
|
10
|
+
--spectrum-link-xl-primary-text-size,var(--spectrum-global-dimension-font-size-300)
|
|
11
|
+
)}a{-webkit-text-decoration-skip:objects;background-color:transparent;cursor:pointer;font-size:var(--spectrum-link-primary-text-size);outline:none;transition:color var(--spectrum-global-animation-duration-100,.13s) ease-in-out}a,a.focus-visible,a.focus-visible{text-decoration:underline}a.focus-visible{-webkit-text-decoration-style:double;text-decoration-style:double}a:focus-visible{text-decoration:underline;-webkit-text-decoration-style:double;text-decoration-style:double}:host([quiet]) a{text-decoration:none}:host([quiet]) a:hover{text-decoration:underline}a{color:var(
|
|
12
|
+
--spectrum-link-m-primary-text-color,var(--spectrum-alias-link-primary-text-color-default)
|
|
13
|
+
)}a:hover{color:var(
|
|
14
|
+
--spectrum-link-m-primary-text-color-hover,var(--spectrum-alias-link-primary-text-color-hover)
|
|
15
|
+
)}a:active{color:var(
|
|
16
|
+
--spectrum-link-m-primary-text-color-down,var(--spectrum-alias-link-primary-text-color-down)
|
|
17
|
+
)}a.focus-visible{color:var(
|
|
18
|
+
--spectrum-link-m-primary-text-color-key-focus,var(--spectrum-alias-link-primary-text-color-key-focus)
|
|
19
|
+
)}a:focus-visible{color:var(
|
|
20
|
+
--spectrum-link-m-primary-text-color-key-focus,var(--spectrum-alias-link-primary-text-color-key-focus)
|
|
21
|
+
)}:host([variant=secondary]) a{color:inherit}:host([variant=secondary]) a:hover{color:inherit}:host([variant=secondary]) a:active{color:inherit}:host([variant=secondary]) a:focus{color:inherit}:host([over-background]) a{color:var(
|
|
22
|
+
--spectrum-link-m-primary-overbackground-text-color,var(--spectrum-alias-text-color-overbackground)
|
|
23
|
+
)}:host([over-background]) a:hover{color:var(
|
|
24
|
+
--spectrum-link-m-primary-overbackground-text-color-hover,var(--spectrum-alias-text-color-overbackground)
|
|
25
|
+
)}:host([over-background]) a:active{color:var(
|
|
26
|
+
--spectrum-link-m-primary-overbackground-text-color-down,var(--spectrum-alias-text-color-overbackground)
|
|
27
|
+
)}:host([over-background]) a:focus{color:var(
|
|
28
|
+
--spectrum-link-m-primary-overbackground-text-color-key-focus,var(--spectrum-alias-text-color-overbackground)
|
|
29
|
+
)}@media (forced-colors:active){:host([variant=secondary]) a{color:linktext}:host([variant=secondary]) a:hover{color:linktext}:host([variant=secondary]) a:active{color:linktext}:host([variant=secondary]) a:focus{color:linktext}}
|
|
30
|
+
`;
|
|
31
|
+
export default styles;
|
|
32
|
+
//# sourceMappingURL=spectrum-link.css.dev.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["spectrum-link.css.ts"],
|
|
4
|
+
"sourcesContent": ["/*\nCopyright 2022 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([size=s]){--spectrum-link-primary-text-size:var(\n--spectrum-link-s-primary-text-size,var(--spectrum-global-dimension-font-size-75)\n)}:host([size=m]){--spectrum-link-primary-text-size:var(\n--spectrum-link-m-primary-text-size,var(--spectrum-global-dimension-font-size-100)\n)}:host([size=l]){--spectrum-link-primary-text-size:var(\n--spectrum-link-l-primary-text-size,var(--spectrum-global-dimension-font-size-200)\n)}:host([size=xl]){--spectrum-link-primary-text-size:var(\n--spectrum-link-xl-primary-text-size,var(--spectrum-global-dimension-font-size-300)\n)}a{-webkit-text-decoration-skip:objects;background-color:transparent;cursor:pointer;font-size:var(--spectrum-link-primary-text-size);outline:none;transition:color var(--spectrum-global-animation-duration-100,.13s) ease-in-out}a,a.focus-visible,a.focus-visible{text-decoration:underline}a.focus-visible{-webkit-text-decoration-style:double;text-decoration-style:double}a:focus-visible{text-decoration:underline;-webkit-text-decoration-style:double;text-decoration-style:double}:host([quiet]) a{text-decoration:none}:host([quiet]) a:hover{text-decoration:underline}a{color:var(\n--spectrum-link-m-primary-text-color,var(--spectrum-alias-link-primary-text-color-default)\n)}a:hover{color:var(\n--spectrum-link-m-primary-text-color-hover,var(--spectrum-alias-link-primary-text-color-hover)\n)}a:active{color:var(\n--spectrum-link-m-primary-text-color-down,var(--spectrum-alias-link-primary-text-color-down)\n)}a.focus-visible{color:var(\n--spectrum-link-m-primary-text-color-key-focus,var(--spectrum-alias-link-primary-text-color-key-focus)\n)}a:focus-visible{color:var(\n--spectrum-link-m-primary-text-color-key-focus,var(--spectrum-alias-link-primary-text-color-key-focus)\n)}:host([variant=secondary]) a{color:inherit}:host([variant=secondary]) a:hover{color:inherit}:host([variant=secondary]) a:active{color:inherit}:host([variant=secondary]) a:focus{color:inherit}:host([over-background]) a{color:var(\n--spectrum-link-m-primary-overbackground-text-color,var(--spectrum-alias-text-color-overbackground)\n)}:host([over-background]) a:hover{color:var(\n--spectrum-link-m-primary-overbackground-text-color-hover,var(--spectrum-alias-text-color-overbackground)\n)}:host([over-background]) a:active{color:var(\n--spectrum-link-m-primary-overbackground-text-color-down,var(--spectrum-alias-text-color-overbackground)\n)}:host([over-background]) a:focus{color:var(\n--spectrum-link-m-primary-overbackground-text-color-key-focus,var(--spectrum-alias-text-color-overbackground)\n)}@media (forced-colors:active){:host([variant=secondary]) a{color:linktext}:host([variant=secondary]) a:hover{color:linktext}:host([variant=secondary]) a:active{color:linktext}:host([variant=secondary]) a:focus{color:linktext}}\n`;\nexport default styles;"],
|
|
5
|
+
"mappings": "AAWA;AACA,MAAM,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA6Bf,eAAe;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/src/spectrum-link.css.js
CHANGED
|
@@ -1,16 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
-
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
-
|
|
7
|
-
Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
-
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
-
OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
-
governing permissions and limitations under the License.
|
|
11
|
-
*/
|
|
12
|
-
import { css } from '@spectrum-web-components/base';
|
|
13
|
-
const styles = css `
|
|
1
|
+
import { css } from "@spectrum-web-components/base";
|
|
2
|
+
const styles = css`
|
|
14
3
|
:host([size=s]){--spectrum-link-primary-text-size:var(
|
|
15
4
|
--spectrum-link-s-primary-text-size,var(--spectrum-global-dimension-font-size-75)
|
|
16
5
|
)}:host([size=m]){--spectrum-link-primary-text-size:var(
|
|
@@ -40,4 +29,4 @@ const styles = css `
|
|
|
40
29
|
)}@media (forced-colors:active){:host([variant=secondary]) a{color:linktext}:host([variant=secondary]) a:hover{color:linktext}:host([variant=secondary]) a:active{color:linktext}:host([variant=secondary]) a:focus{color:linktext}}
|
|
41
30
|
`;
|
|
42
31
|
export default styles;
|
|
43
|
-
//# sourceMappingURL=spectrum-link.css.js.map
|
|
32
|
+
//# sourceMappingURL=spectrum-link.css.js.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["spectrum-link.css.ts"],
|
|
4
|
+
"sourcesContent": ["/*\nCopyright 2022 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([size=s]){--spectrum-link-primary-text-size:var(\n--spectrum-link-s-primary-text-size,var(--spectrum-global-dimension-font-size-75)\n)}:host([size=m]){--spectrum-link-primary-text-size:var(\n--spectrum-link-m-primary-text-size,var(--spectrum-global-dimension-font-size-100)\n)}:host([size=l]){--spectrum-link-primary-text-size:var(\n--spectrum-link-l-primary-text-size,var(--spectrum-global-dimension-font-size-200)\n)}:host([size=xl]){--spectrum-link-primary-text-size:var(\n--spectrum-link-xl-primary-text-size,var(--spectrum-global-dimension-font-size-300)\n)}a{-webkit-text-decoration-skip:objects;background-color:transparent;cursor:pointer;font-size:var(--spectrum-link-primary-text-size);outline:none;transition:color var(--spectrum-global-animation-duration-100,.13s) ease-in-out}a,a.focus-visible,a.focus-visible{text-decoration:underline}a.focus-visible{-webkit-text-decoration-style:double;text-decoration-style:double}a:focus-visible{text-decoration:underline;-webkit-text-decoration-style:double;text-decoration-style:double}:host([quiet]) a{text-decoration:none}:host([quiet]) a:hover{text-decoration:underline}a{color:var(\n--spectrum-link-m-primary-text-color,var(--spectrum-alias-link-primary-text-color-default)\n)}a:hover{color:var(\n--spectrum-link-m-primary-text-color-hover,var(--spectrum-alias-link-primary-text-color-hover)\n)}a:active{color:var(\n--spectrum-link-m-primary-text-color-down,var(--spectrum-alias-link-primary-text-color-down)\n)}a.focus-visible{color:var(\n--spectrum-link-m-primary-text-color-key-focus,var(--spectrum-alias-link-primary-text-color-key-focus)\n)}a:focus-visible{color:var(\n--spectrum-link-m-primary-text-color-key-focus,var(--spectrum-alias-link-primary-text-color-key-focus)\n)}:host([variant=secondary]) a{color:inherit}:host([variant=secondary]) a:hover{color:inherit}:host([variant=secondary]) a:active{color:inherit}:host([variant=secondary]) a:focus{color:inherit}:host([over-background]) a{color:var(\n--spectrum-link-m-primary-overbackground-text-color,var(--spectrum-alias-text-color-overbackground)\n)}:host([over-background]) a:hover{color:var(\n--spectrum-link-m-primary-overbackground-text-color-hover,var(--spectrum-alias-text-color-overbackground)\n)}:host([over-background]) a:active{color:var(\n--spectrum-link-m-primary-overbackground-text-color-down,var(--spectrum-alias-text-color-overbackground)\n)}:host([over-background]) a:focus{color:var(\n--spectrum-link-m-primary-overbackground-text-color-key-focus,var(--spectrum-alias-text-color-overbackground)\n)}@media (forced-colors:active){:host([variant=secondary]) a{color:linktext}:host([variant=secondary]) a:hover{color:linktext}:host([variant=secondary]) a:active{color:linktext}:host([variant=secondary]) a:focus{color:linktext}}\n`;\nexport default styles;"],
|
|
5
|
+
"mappings": "AAWA;AACA,MAAM,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA6Bf,eAAe;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,30 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
-
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
-
|
|
7
|
-
Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
-
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
-
OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
-
governing permissions and limitations under the License.
|
|
11
|
-
*/
|
|
12
|
-
import { html } from '@spectrum-web-components/base';
|
|
13
|
-
import '../sp-link.js';
|
|
1
|
+
import { html } from "@spectrum-web-components/base";
|
|
2
|
+
import "@spectrum-web-components/link/sp-link.js";
|
|
14
3
|
export default {
|
|
15
|
-
|
|
16
|
-
|
|
4
|
+
component: "sp-link",
|
|
5
|
+
title: "Link/Sizes"
|
|
17
6
|
};
|
|
18
|
-
export const s = () => html
|
|
7
|
+
export const s = () => html`
|
|
19
8
|
<sp-link size="s" href="#">small link</sp-link>
|
|
20
9
|
`;
|
|
21
|
-
export const m = () => html
|
|
10
|
+
export const m = () => html`
|
|
22
11
|
<sp-link size="m" href="#">medium link</sp-link>
|
|
23
12
|
`;
|
|
24
|
-
export const L = () => html
|
|
13
|
+
export const L = () => html`
|
|
25
14
|
<sp-link size="l" href="#">large link</sp-link>
|
|
26
15
|
`;
|
|
27
|
-
export const XL = () => html
|
|
16
|
+
export const XL = () => html`
|
|
28
17
|
<sp-link size="xl" href="#">extra large link</sp-link>
|
|
29
18
|
`;
|
|
30
|
-
//# sourceMappingURL=link-sizes.stories.js.map
|
|
19
|
+
//# sourceMappingURL=link-sizes.stories.js.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["link-sizes.stories.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 { html, TemplateResult } from '@spectrum-web-components/base';\n\nimport '@spectrum-web-components/link/sp-link.js';\n\nexport default {\n component: 'sp-link',\n title: 'Link/Sizes',\n};\n\nexport const s = (): TemplateResult => html`\n <sp-link size=\"s\" href=\"#\">small link</sp-link>\n`;\n\nexport const m = (): TemplateResult => html`\n <sp-link size=\"m\" href=\"#\">medium link</sp-link>\n`;\n\nexport const L = (): TemplateResult => html`\n <sp-link size=\"l\" href=\"#\">large link</sp-link>\n`;\n\nexport const XL = (): TemplateResult => html`\n <sp-link size=\"xl\" href=\"#\">extra large link</sp-link>\n`;\n"],
|
|
5
|
+
"mappings": "AAWA;AAEA;AAEA,eAAe;AAAA,EACX,WAAW;AAAA,EACX,OAAO;AACX;AAEO,aAAM,IAAI,MAAsB;AAAA;AAAA;AAIhC,aAAM,IAAI,MAAsB;AAAA;AAAA;AAIhC,aAAM,IAAI,MAAsB;AAAA;AAAA;AAIhC,aAAM,KAAK,MAAsB;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/stories/link.stories.js
CHANGED
|
@@ -1,46 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
-
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
-
|
|
7
|
-
Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
-
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
-
OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
-
governing permissions and limitations under the License.
|
|
11
|
-
*/
|
|
12
|
-
import { html } from '@spectrum-web-components/base';
|
|
13
|
-
import '../sp-link.js';
|
|
1
|
+
import { html } from "@spectrum-web-components/base";
|
|
2
|
+
import "@spectrum-web-components/link/sp-link.js";
|
|
14
3
|
export default {
|
|
15
|
-
|
|
16
|
-
|
|
4
|
+
component: "sp-link",
|
|
5
|
+
title: "Link"
|
|
17
6
|
};
|
|
18
7
|
export const Default = () => {
|
|
19
|
-
|
|
20
|
-
return html `
|
|
8
|
+
return html`
|
|
21
9
|
This is a <sp-link href="#">link</sp-link> in a sentence.
|
|
22
10
|
`;
|
|
23
11
|
};
|
|
24
12
|
export const Quiet = () => {
|
|
25
|
-
|
|
26
|
-
return html `
|
|
13
|
+
return html`
|
|
27
14
|
This is a <sp-link quiet href="#">quiet link</sp-link> in a sentence.
|
|
28
15
|
`;
|
|
29
16
|
};
|
|
30
17
|
export const secondary = () => {
|
|
31
|
-
|
|
32
|
-
return html `
|
|
18
|
+
return html`
|
|
33
19
|
This is a <sp-link variant="secondary" href="#">link</sp-link> in a sentence.
|
|
34
20
|
`;
|
|
35
21
|
};
|
|
36
22
|
export const secondaryQuiet = () => {
|
|
37
|
-
|
|
38
|
-
return html `
|
|
23
|
+
return html`
|
|
39
24
|
This is a <sp-link variant="secondary" quiet href="#">quiet link</sp-link> in a sentence.
|
|
40
25
|
`;
|
|
41
26
|
};
|
|
42
27
|
export const overBackground = () => {
|
|
43
|
-
|
|
28
|
+
return html`
|
|
44
29
|
<div
|
|
45
30
|
style="background-color: rgb(15, 121, 125); padding: 15px 20px; display: inline-block;"
|
|
46
31
|
>
|
|
@@ -53,7 +38,7 @@ export const overBackground = () => {
|
|
|
53
38
|
`;
|
|
54
39
|
};
|
|
55
40
|
export const overBackgroundQuiet = () => {
|
|
56
|
-
|
|
41
|
+
return html`
|
|
57
42
|
<div
|
|
58
43
|
style="background-color: rgb(15, 121, 125); padding: 15px 20px; display: inline-block;"
|
|
59
44
|
>
|
|
@@ -66,10 +51,10 @@ export const overBackgroundQuiet = () => {
|
|
|
66
51
|
`;
|
|
67
52
|
};
|
|
68
53
|
export const Download = () => {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
54
|
+
const blob = new Blob(["some text for the file"], {
|
|
55
|
+
type: "text/plain;charset=utf-8"
|
|
56
|
+
});
|
|
57
|
+
return html`
|
|
73
58
|
This is a
|
|
74
59
|
<sp-link download="somefile.txt" href="${URL.createObjectURL(blob)}">
|
|
75
60
|
downloadable file
|
|
@@ -77,7 +62,5 @@ export const Download = () => {
|
|
|
77
62
|
for you to click on.
|
|
78
63
|
`;
|
|
79
64
|
};
|
|
80
|
-
overBackground.
|
|
81
|
-
|
|
82
|
-
};
|
|
83
|
-
//# sourceMappingURL=link.stories.js.map
|
|
65
|
+
overBackground.storyName = "Over Background";
|
|
66
|
+
//# sourceMappingURL=link.stories.js.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["link.stories.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 { html, TemplateResult } from '@spectrum-web-components/base';\n\nimport '@spectrum-web-components/link/sp-link.js';\n\nexport default {\n component: 'sp-link',\n title: 'Link',\n};\n\nexport const Default = (): TemplateResult => {\n // prettier-ignore\n return html`\n This is a <sp-link href=\"#\">link</sp-link> in a sentence.\n `;\n};\n\nexport const Quiet = (): TemplateResult => {\n // prettier-ignore\n return html`\n This is a <sp-link quiet href=\"#\">quiet link</sp-link> in a sentence.\n `;\n};\n\nexport const secondary = (): TemplateResult => {\n // prettier-ignore\n return html`\n This is a <sp-link variant=\"secondary\" href=\"#\">link</sp-link> in a sentence.\n `;\n};\n\nexport const secondaryQuiet = (): TemplateResult => {\n // prettier-ignore\n return html`\n This is a <sp-link variant=\"secondary\" quiet href=\"#\">quiet link</sp-link> in a sentence.\n `;\n};\n\nexport const overBackground = (): TemplateResult => {\n return html`\n <div\n style=\"background-color: rgb(15, 121, 125); padding: 15px 20px; display: inline-block;\"\n >\n <p style=\"color: rgb(240, 240, 240);\">\n This\n <sp-link over-background href=\"#\">link</sp-link>\n has a background.\n </p>\n </div>\n `;\n};\n\nexport const overBackgroundQuiet = (): TemplateResult => {\n return html`\n <div\n style=\"background-color: rgb(15, 121, 125); padding: 15px 20px; display: inline-block;\"\n >\n <p style=\"color: rgb(240, 240, 240);\">\n This\n <sp-link over-background quiet href=\"#\">link</sp-link>\n has a background.\n </p>\n </div>\n `;\n};\n\nexport const Download = (): TemplateResult => {\n const blob = new Blob(['some text for the file'], {\n type: 'text/plain;charset=utf-8',\n });\n return html`\n This is a\n <sp-link download=\"somefile.txt\" href=\"${URL.createObjectURL(blob)}\">\n downloadable file\n </sp-link>\n for you to click on.\n `;\n};\n\noverBackground.storyName = 'Over Background';\n"],
|
|
5
|
+
"mappings": "AAWA;AAEA;AAEA,eAAe;AAAA,EACX,WAAW;AAAA,EACX,OAAO;AACX;AAEO,aAAM,UAAU,MAAsB;AAEzC,SAAO;AAAA;AAAA;AAGX;AAEO,aAAM,QAAQ,MAAsB;AAEvC,SAAO;AAAA;AAAA;AAGX;AAEO,aAAM,YAAY,MAAsB;AAE3C,SAAO;AAAA;AAAA;AAGX;AAEO,aAAM,iBAAiB,MAAsB;AAEhD,SAAO;AAAA;AAAA;AAGX;AAEO,aAAM,iBAAiB,MAAsB;AAChD,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWX;AAEO,aAAM,sBAAsB,MAAsB;AACrD,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWX;AAEO,aAAM,WAAW,MAAsB;AAC1C,QAAM,OAAO,IAAI,KAAK,CAAC,wBAAwB,GAAG;AAAA,IAC9C,MAAM;AAAA,EACV,CAAC;AACD,SAAO;AAAA;AAAA,iDAEsC,IAAI,gBAAgB,IAAI;AAAA;AAAA;AAAA;AAAA;AAKzE;AAEA,eAAe,YAAY;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,18 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
-
|
|
7
|
-
Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
-
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
-
OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
-
governing permissions and limitations under the License.
|
|
11
|
-
*/
|
|
12
|
-
import '@spectrum-web-components/link/sp-link.js';
|
|
13
|
-
import { html } from 'lit';
|
|
14
|
-
import { measureFixtureCreation } from '../../../../test/benchmark/helpers.js';
|
|
15
|
-
measureFixtureCreation(html `
|
|
1
|
+
import "@spectrum-web-components/link/sp-link.js";
|
|
2
|
+
import { html } from "lit";
|
|
3
|
+
import { measureFixtureCreation } from "../../../../test/benchmark/helpers.js";
|
|
4
|
+
measureFixtureCreation(html`
|
|
16
5
|
<sp-link href="test_url" download="somefile.txt">Default Link</sp-link>
|
|
17
6
|
`);
|
|
18
|
-
//# sourceMappingURL=test-basic.js.map
|
|
7
|
+
//# sourceMappingURL=test-basic.js.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["test-basic.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 '@spectrum-web-components/link/sp-link.js';\nimport { html } from 'lit';\nimport { measureFixtureCreation } from '../../../../test/benchmark/helpers.js';\n\nmeasureFixtureCreation(html`\n <sp-link href=\"test_url\" download=\"somefile.txt\">Default Link</sp-link>\n`);\n"],
|
|
5
|
+
"mappings": "AAYA;AACA;AACA;AAEA,uBAAuB;AAAA;AAAA,CAEtB;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,15 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
-
|
|
7
|
-
Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
-
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
-
OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
-
governing permissions and limitations under the License.
|
|
11
|
-
*/
|
|
12
|
-
import * as stories from '../stories/link-sizes.stories.js';
|
|
13
|
-
import { regressVisuals } from '../../../test/visual/test.js';
|
|
14
|
-
regressVisuals('LinkSizesStories', stories);
|
|
15
|
-
//# sourceMappingURL=link-sizes.test-vrt.js.map
|
|
1
|
+
import * as stories from "../stories/link-sizes.stories.js";
|
|
2
|
+
import { regressVisuals } from "../../../test/visual/test.js";
|
|
3
|
+
regressVisuals("LinkSizesStories", stories);
|
|
4
|
+
//# sourceMappingURL=link-sizes.test-vrt.js.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["link-sizes.test-vrt.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 * as stories from '../stories/link-sizes.stories.js';\nimport { regressVisuals } from '../../../test/visual/test.js';\n\nregressVisuals('LinkSizesStories', stories);\n"],
|
|
5
|
+
"mappings": "AAYA;AACA;AAEA,eAAe,oBAAoB,OAAO;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/test/link.test-vrt.js
CHANGED
|
@@ -1,15 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
-
|
|
7
|
-
Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
-
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
-
OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
-
governing permissions and limitations under the License.
|
|
11
|
-
*/
|
|
12
|
-
import * as stories from '../stories/link.stories.js';
|
|
13
|
-
import { regressVisuals } from '../../../test/visual/test.js';
|
|
14
|
-
regressVisuals('LinkStories', stories);
|
|
15
|
-
//# sourceMappingURL=link.test-vrt.js.map
|
|
1
|
+
import * as stories from "../stories/link.stories.js";
|
|
2
|
+
import { regressVisuals } from "../../../test/visual/test.js";
|
|
3
|
+
regressVisuals("LinkStories", stories);
|
|
4
|
+
//# sourceMappingURL=link.test-vrt.js.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["link.test-vrt.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 * as stories from '../stories/link.stories.js';\nimport { regressVisuals } from '../../../test/visual/test.js';\n\nregressVisuals('LinkStories', stories);\n"],
|
|
5
|
+
"mappings": "AAYA;AACA;AAEA,eAAe,eAAe,OAAO;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/test/link.test.js
CHANGED
|
@@ -1,65 +1,58 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
governing permissions and limitations under the License.
|
|
11
|
-
*/
|
|
12
|
-
import '../sp-link.js';
|
|
13
|
-
import { elementUpdated, expect, fixture, html } from '@open-wc/testing';
|
|
14
|
-
describe('Link', () => {
|
|
15
|
-
it('loads', async () => {
|
|
16
|
-
const el = await fixture(html `
|
|
1
|
+
import "@spectrum-web-components/link/sp-link.js";
|
|
2
|
+
import { elementUpdated, expect, fixture, html } from "@open-wc/testing";
|
|
3
|
+
import { testForLitDevWarnings } from "../../../test/testing-helpers.js";
|
|
4
|
+
describe("Link", () => {
|
|
5
|
+
testForLitDevWarnings(async () => await fixture(html`
|
|
6
|
+
<sp-link href="test_url">Default Link</sp-link>
|
|
7
|
+
`));
|
|
8
|
+
it("loads", async () => {
|
|
9
|
+
const el = await fixture(html`
|
|
17
10
|
<sp-link href="test_url">Default Link</sp-link>
|
|
18
11
|
`);
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
12
|
+
await elementUpdated(el);
|
|
13
|
+
expect(el).to.not.be.undefined;
|
|
14
|
+
expect(el.textContent).to.include("Default Link");
|
|
15
|
+
await expect(el).to.be.accessible();
|
|
16
|
+
});
|
|
17
|
+
it("loads[download]", async () => {
|
|
18
|
+
const el = await fixture(html`
|
|
26
19
|
<sp-link href="test_url" download="somefile.txt">
|
|
27
20
|
Default Link
|
|
28
21
|
</sp-link>
|
|
29
22
|
`);
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
23
|
+
await elementUpdated(el);
|
|
24
|
+
expect(el).to.not.be.undefined;
|
|
25
|
+
expect(el.textContent).to.include("Default Link");
|
|
26
|
+
await expect(el).to.be.accessible();
|
|
27
|
+
});
|
|
28
|
+
it("loads[rel]", async () => {
|
|
29
|
+
const el = await fixture(html`
|
|
37
30
|
<sp-link href="test_url" rel="external">Default Link</sp-link>
|
|
38
31
|
`);
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
32
|
+
await elementUpdated(el);
|
|
33
|
+
expect(el).to.not.be.undefined;
|
|
34
|
+
expect(el.focusElement.getAttribute("rel")).to.eq("external");
|
|
35
|
+
await expect(el).to.be.accessible();
|
|
36
|
+
});
|
|
37
|
+
it("manages the `size` atrbute", async () => {
|
|
38
|
+
const el = await fixture(html`
|
|
46
39
|
<sp-link href="test_url">Default Link</sp-link>
|
|
47
40
|
`);
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
41
|
+
await elementUpdated(el);
|
|
42
|
+
expect(el.size, "property 0: m").to.equal("m");
|
|
43
|
+
expect(el.getAttribute("size"), "attribute 0: null").to.be.null;
|
|
44
|
+
el.setAttribute("size", "xl");
|
|
45
|
+
await elementUpdated(el);
|
|
46
|
+
expect(el.size, "property 1: xl").to.equal("xl");
|
|
47
|
+
expect(el.getAttribute("size"), "attribute 1: xl").to.equal("xl");
|
|
48
|
+
el.removeAttribute("size");
|
|
49
|
+
await elementUpdated(el);
|
|
50
|
+
expect(el.size, "property 2: m").to.equal("m");
|
|
51
|
+
expect(el.getAttribute("size"), "attribute 2: null").to.be.null;
|
|
52
|
+
el.setAttribute("size", "m");
|
|
53
|
+
await elementUpdated(el);
|
|
54
|
+
expect(el.size, "property 3: m").to.equal("m");
|
|
55
|
+
expect(el.getAttribute("size"), "attribute 3: m").to.equal("m");
|
|
56
|
+
});
|
|
64
57
|
});
|
|
65
|
-
//# sourceMappingURL=link.test.js.map
|
|
58
|
+
//# sourceMappingURL=link.test.js.map
|
package/test/link.test.js.map
CHANGED
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["link.test.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 '@spectrum-web-components/link/sp-link.js';\nimport { Link } from '@spectrum-web-components/link';\nimport { elementUpdated, expect, fixture, html } from '@open-wc/testing';\nimport { testForLitDevWarnings } from '../../../test/testing-helpers.js';\n\ndescribe('Link', () => {\n testForLitDevWarnings(\n async () =>\n await fixture<Link>(\n html`\n <sp-link href=\"test_url\">Default Link</sp-link>\n `\n )\n );\n it('loads', async () => {\n const el = await fixture<Link>(\n html`\n <sp-link href=\"test_url\">Default Link</sp-link>\n `\n );\n\n await elementUpdated(el);\n expect(el).to.not.be.undefined;\n expect(el.textContent).to.include('Default Link');\n\n await expect(el).to.be.accessible();\n });\n\n it('loads[download]', async () => {\n const el = await fixture<Link>(\n html`\n <sp-link href=\"test_url\" download=\"somefile.txt\">\n Default Link\n </sp-link>\n `\n );\n\n await elementUpdated(el);\n expect(el).to.not.be.undefined;\n expect(el.textContent).to.include('Default Link');\n\n await expect(el).to.be.accessible();\n });\n\n it('loads[rel]', async () => {\n const el = await fixture<Link>(\n html`\n <sp-link href=\"test_url\" rel=\"external\">Default Link</sp-link>\n `\n );\n\n await elementUpdated(el);\n expect(el).to.not.be.undefined;\n expect(el.focusElement.getAttribute('rel')).to.eq('external');\n\n await expect(el).to.be.accessible();\n });\n\n it('manages the `size` atrbute', async () => {\n const el = await fixture<Link>(\n html`\n <sp-link href=\"test_url\">Default Link</sp-link>\n `\n );\n\n await elementUpdated(el);\n expect(el.size, 'property 0: m').to.equal('m');\n expect(el.getAttribute('size'), 'attribute 0: null').to.be.null;\n\n el.setAttribute('size', 'xl');\n await elementUpdated(el);\n expect(el.size, 'property 1: xl').to.equal('xl');\n expect(el.getAttribute('size'), 'attribute 1: xl').to.equal('xl');\n\n el.removeAttribute('size');\n await elementUpdated(el);\n expect(el.size, 'property 2: m').to.equal('m');\n expect(el.getAttribute('size'), 'attribute 2: null').to.be.null;\n\n el.setAttribute('size', 'm');\n await elementUpdated(el);\n expect(el.size, 'property 3: m').to.equal('m');\n expect(el.getAttribute('size'), 'attribute 3: m').to.equal('m');\n });\n});\n"],
|
|
5
|
+
"mappings": "AAYA;AAEA;AACA;AAEA,SAAS,QAAQ,MAAM;AACnB,wBACI,YACI,MAAM,QACF;AAAA;AAAA,iBAGJ,CACR;AACA,KAAG,SAAS,YAAY;AACpB,UAAM,KAAK,MAAM,QACb;AAAA;AAAA,aAGJ;AAEA,UAAM,eAAe,EAAE;AACvB,WAAO,EAAE,EAAE,GAAG,IAAI,GAAG;AACrB,WAAO,GAAG,WAAW,EAAE,GAAG,QAAQ,cAAc;AAEhD,UAAM,OAAO,EAAE,EAAE,GAAG,GAAG,WAAW;AAAA,EACtC,CAAC;AAED,KAAG,mBAAmB,YAAY;AAC9B,UAAM,KAAK,MAAM,QACb;AAAA;AAAA;AAAA;AAAA,aAKJ;AAEA,UAAM,eAAe,EAAE;AACvB,WAAO,EAAE,EAAE,GAAG,IAAI,GAAG;AACrB,WAAO,GAAG,WAAW,EAAE,GAAG,QAAQ,cAAc;AAEhD,UAAM,OAAO,EAAE,EAAE,GAAG,GAAG,WAAW;AAAA,EACtC,CAAC;AAED,KAAG,cAAc,YAAY;AACzB,UAAM,KAAK,MAAM,QACb;AAAA;AAAA,aAGJ;AAEA,UAAM,eAAe,EAAE;AACvB,WAAO,EAAE,EAAE,GAAG,IAAI,GAAG;AACrB,WAAO,GAAG,aAAa,aAAa,KAAK,CAAC,EAAE,GAAG,GAAG,UAAU;AAE5D,UAAM,OAAO,EAAE,EAAE,GAAG,GAAG,WAAW;AAAA,EACtC,CAAC;AAED,KAAG,8BAA8B,YAAY;AACzC,UAAM,KAAK,MAAM,QACb;AAAA;AAAA,aAGJ;AAEA,UAAM,eAAe,EAAE;AACvB,WAAO,GAAG,MAAM,eAAe,EAAE,GAAG,MAAM,GAAG;AAC7C,WAAO,GAAG,aAAa,MAAM,GAAG,mBAAmB,EAAE,GAAG,GAAG;AAE3D,OAAG,aAAa,QAAQ,IAAI;AAC5B,UAAM,eAAe,EAAE;AACvB,WAAO,GAAG,MAAM,gBAAgB,EAAE,GAAG,MAAM,IAAI;AAC/C,WAAO,GAAG,aAAa,MAAM,GAAG,iBAAiB,EAAE,GAAG,MAAM,IAAI;AAEhE,OAAG,gBAAgB,MAAM;AACzB,UAAM,eAAe,EAAE;AACvB,WAAO,GAAG,MAAM,eAAe,EAAE,GAAG,MAAM,GAAG;AAC7C,WAAO,GAAG,aAAa,MAAM,GAAG,mBAAmB,EAAE,GAAG,GAAG;AAE3D,OAAG,aAAa,QAAQ,GAAG;AAC3B,UAAM,eAAe,EAAE;AACvB,WAAO,GAAG,MAAM,eAAe,EAAE,GAAG,MAAM,GAAG;AAC7C,WAAO,GAAG,aAAa,MAAM,GAAG,gBAAgB,EAAE,GAAG,MAAM,GAAG;AAAA,EAClE,CAAC;AACL,CAAC;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|