@spectrum-web-components/link 0.14.5-overlay.37 → 0.14.6
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 +132 -0
- package/package.json +3 -3
- package/src/Link.d.ts +4 -1
- package/src/Link.dev.js +7 -0
- package/src/Link.dev.js.map +2 -2
- package/src/Link.js +1 -1
- package/src/Link.js.map +2 -2
- package/src/link.css.dev.js +2 -4
- package/src/link.css.dev.js.map +2 -2
- package/src/link.css.js +2 -4
- package/src/link.css.js.map +2 -2
- package/src/spectrum-config.js +155 -31
- package/src/spectrum-link.css.dev.js +2 -4
- package/src/spectrum-link.css.dev.js.map +2 -2
- package/src/spectrum-link.css.js +2 -4
- package/src/spectrum-link.css.js.map +2 -2
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": "1.0.0",
|
|
3
|
+
"readme": "",
|
|
4
|
+
"modules": [
|
|
5
|
+
{
|
|
6
|
+
"kind": "javascript-module",
|
|
7
|
+
"path": "sp-link.js",
|
|
8
|
+
"declarations": [],
|
|
9
|
+
"exports": [
|
|
10
|
+
{
|
|
11
|
+
"kind": "custom-element-definition",
|
|
12
|
+
"name": "sp-link",
|
|
13
|
+
"declaration": {
|
|
14
|
+
"name": "Link",
|
|
15
|
+
"module": "/src/Link.js"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"kind": "javascript-module",
|
|
22
|
+
"path": "src/Link.js",
|
|
23
|
+
"declarations": [
|
|
24
|
+
{
|
|
25
|
+
"kind": "class",
|
|
26
|
+
"description": "",
|
|
27
|
+
"name": "Link",
|
|
28
|
+
"members": [
|
|
29
|
+
{
|
|
30
|
+
"kind": "field",
|
|
31
|
+
"name": "anchorElement",
|
|
32
|
+
"type": {
|
|
33
|
+
"text": "HTMLAnchorElement"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"kind": "field",
|
|
38
|
+
"name": "variant",
|
|
39
|
+
"type": {
|
|
40
|
+
"text": "'secondary' | undefined"
|
|
41
|
+
},
|
|
42
|
+
"privacy": "public",
|
|
43
|
+
"attribute": "variant",
|
|
44
|
+
"reflects": true
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"kind": "field",
|
|
48
|
+
"name": "static",
|
|
49
|
+
"type": {
|
|
50
|
+
"text": "'black' | 'white' | undefined"
|
|
51
|
+
},
|
|
52
|
+
"privacy": "public",
|
|
53
|
+
"attribute": "static",
|
|
54
|
+
"reflects": true
|
|
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
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"kind": "field",
|
|
70
|
+
"name": "focusElement",
|
|
71
|
+
"type": {
|
|
72
|
+
"text": "HTMLElement"
|
|
73
|
+
},
|
|
74
|
+
"privacy": "public"
|
|
75
|
+
}
|
|
76
|
+
],
|
|
77
|
+
"attributes": [
|
|
78
|
+
{
|
|
79
|
+
"description": "uses over background styles or not",
|
|
80
|
+
"name": "over-background"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"name": "variant",
|
|
84
|
+
"type": {
|
|
85
|
+
"text": "'secondary' | undefined"
|
|
86
|
+
},
|
|
87
|
+
"fieldName": "variant"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"name": "static",
|
|
91
|
+
"type": {
|
|
92
|
+
"text": "'black' | 'white' | undefined"
|
|
93
|
+
},
|
|
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"
|
|
104
|
+
}
|
|
105
|
+
],
|
|
106
|
+
"mixins": [
|
|
107
|
+
{
|
|
108
|
+
"name": "LikeAnchor",
|
|
109
|
+
"package": "@spectrum-web-components/shared/src/like-anchor.js"
|
|
110
|
+
}
|
|
111
|
+
],
|
|
112
|
+
"superclass": {
|
|
113
|
+
"name": "Focusable",
|
|
114
|
+
"package": "@spectrum-web-components/shared/src/focusable.js"
|
|
115
|
+
},
|
|
116
|
+
"tagName": "sp-link",
|
|
117
|
+
"customElement": true
|
|
118
|
+
}
|
|
119
|
+
],
|
|
120
|
+
"exports": [
|
|
121
|
+
{
|
|
122
|
+
"kind": "js",
|
|
123
|
+
"name": "Link",
|
|
124
|
+
"declaration": {
|
|
125
|
+
"name": "Link",
|
|
126
|
+
"module": "src/Link.js"
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
]
|
|
130
|
+
}
|
|
131
|
+
]
|
|
132
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spectrum-web-components/link",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.6",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
],
|
|
59
59
|
"dependencies": {
|
|
60
60
|
"@spectrum-web-components/base": "^0.7.4",
|
|
61
|
-
"@spectrum-web-components/shared": "^0.15.
|
|
61
|
+
"@spectrum-web-components/shared": "^0.15.5"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
64
|
"@spectrum-css/link": "^4.0.11"
|
|
@@ -69,5 +69,5 @@
|
|
|
69
69
|
"./sp-*.js",
|
|
70
70
|
"./**/*.dev.js"
|
|
71
71
|
],
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "1e25ee121f3bc838dbb99bac62f3c95857570f7a"
|
|
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
|
package/src/Link.dev.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
|
|
5
|
-
"mappings": ";;;;;;;;;;;;AAaA;AAAA,EACI;AAAA,EACA;AAAA,OACG;AACP,SAAS,kBAAkB;AAC3B,SAAS,iBAAiB;AAE1B,OAAO,gBAAgB;
|
|
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
|
|
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
|
|
5
|
-
"mappings": "qNAaA,OACI,YAAAA,EACA,SAAAC,MACG,kDACP,OAAS,cAAAC,MAAkB,qDAC3B,OAAS,aAAAC,MAAiB,mDAE1B,OAAOC,MAAgB,
|
|
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
|
}
|
package/src/link.css.dev.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
import { css } from "@spectrum-web-components/base";
|
|
3
3
|
const styles = css`
|
|
4
|
-
:host{--spectrum-link-animation-duration:var(
|
|
5
|
-
--spectrum-animation-duration-100
|
|
6
|
-
);--spectrum-link-text-color-primary-default:var(
|
|
4
|
+
:host{--spectrum-link-animation-duration:var(--spectrum-animation-duration-100);--spectrum-link-text-color-primary-default:var(
|
|
7
5
|
--spectrum-accent-content-color-default
|
|
8
6
|
);--spectrum-link-text-color-primary-hover:var(
|
|
9
7
|
--spectrum-accent-content-color-hover
|
|
@@ -19,7 +17,7 @@ const styles = css`
|
|
|
19
17
|
--spectrum-neutral-content-color-down
|
|
20
18
|
);--spectrum-link-text-color-secondary-focus:var(
|
|
21
19
|
--spectrum-neutral-content-color-key-focus
|
|
22
|
-
);--spectrum-link-text-color-white:var(--spectrum-white);--spectrum-link-text-color-black:var(--spectrum-black)}@media (forced-colors:active){
|
|
20
|
+
);--spectrum-link-text-color-white:var(--spectrum-white);--spectrum-link-text-color-black:var(--spectrum-black)}@media (forced-colors:active){:host{--highcontrast-link-text-color-primary-default:LinkText;--highcontrast-link-text-color-primary-hover:LinkText;--highcontrast-link-text-color-primary-active:LinkText;--highcontrast-link-text-color-primary-focus:LinkText;--highcontrast-link-text-color-secondary-default:LinkText;--highcontrast-link-text-color-secondary-hover:LinkText;--highcontrast-link-text-color-secondary-active:LinkText;--highcontrast-link-text-color-secondary-focus:LinkText;--highcontrast-link-text-color-white:LinkText;--highcontrast-link-text-color-black:LinkText}}a{-webkit-text-decoration-skip:objects;background-color:#0000;color:var(
|
|
23
21
|
--highcontrast-link-text-color-primary-default,var(
|
|
24
22
|
--mod-link-text-color-primary-default,var(--spectrum-link-text-color-primary-default)
|
|
25
23
|
)
|
package/src/link.css.dev.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["link.css.ts"],
|
|
4
|
-
"sourcesContent": ["/*\nCopyright 2023 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { css } from '@spectrum-web-components/base';\nconst styles = css`\n:host{--spectrum-link-animation-duration:var(
|
|
5
|
-
"mappings": ";AAWA,SAAS,WAAW;AACpB,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;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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;
|
|
4
|
+
"sourcesContent": ["/*\nCopyright 2023 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { css } from '@spectrum-web-components/base';\nconst styles = css`\n:host{--spectrum-link-animation-duration:var(--spectrum-animation-duration-100);--spectrum-link-text-color-primary-default:var(\n--spectrum-accent-content-color-default\n);--spectrum-link-text-color-primary-hover:var(\n--spectrum-accent-content-color-hover\n);--spectrum-link-text-color-primary-active:var(\n--spectrum-accent-content-color-down\n);--spectrum-link-text-color-primary-focus:var(\n--spectrum-accent-content-color-key-focus\n);--spectrum-link-text-color-secondary-default:var(\n--spectrum-neutral-content-color-default\n);--spectrum-link-text-color-secondary-hover:var(\n--spectrum-neutral-content-color-hover\n);--spectrum-link-text-color-secondary-active:var(\n--spectrum-neutral-content-color-down\n);--spectrum-link-text-color-secondary-focus:var(\n--spectrum-neutral-content-color-key-focus\n);--spectrum-link-text-color-white:var(--spectrum-white);--spectrum-link-text-color-black:var(--spectrum-black)}@media (forced-colors:active){:host{--highcontrast-link-text-color-primary-default:LinkText;--highcontrast-link-text-color-primary-hover:LinkText;--highcontrast-link-text-color-primary-active:LinkText;--highcontrast-link-text-color-primary-focus:LinkText;--highcontrast-link-text-color-secondary-default:LinkText;--highcontrast-link-text-color-secondary-hover:LinkText;--highcontrast-link-text-color-secondary-active:LinkText;--highcontrast-link-text-color-secondary-focus:LinkText;--highcontrast-link-text-color-white:LinkText;--highcontrast-link-text-color-black:LinkText}}a{-webkit-text-decoration-skip:objects;background-color:#0000;color:var(\n--highcontrast-link-text-color-primary-default,var(\n--mod-link-text-color-primary-default,var(--spectrum-link-text-color-primary-default)\n)\n);cursor:pointer;outline:none;text-decoration:underline;transition:color var(\n--mod-link-animation-duration,var(--spectrum-link-animation-duration)\n) ease-in-out}a:hover{color:var(\n--highcontrast-link-text-color-primary-hover,var(\n--mod-link-text-color-primary-hover,var(--spectrum-link-text-color-primary-hover)\n)\n)}a:active{color:var(\n--highcontrast-link-text-color-primary-active,var(\n--mod-link-text-color-primary-active,var(--spectrum-link-text-color-primary-active)\n)\n)}a.focus-visible{color:var(\n--highcontrast-link-text-color-primary-focus,var(\n--mod-link-text-color-primary-focus,var(--spectrum-link-text-color-primary-focus)\n)\n);text-decoration:underline;text-decoration-color:var(--highcontrast-link-focus-color,inherit);text-decoration-style:double}a:focus-visible{color:var(\n--highcontrast-link-text-color-primary-focus,var(\n--mod-link-text-color-primary-focus,var(--spectrum-link-text-color-primary-focus)\n)\n);text-decoration:underline;text-decoration-color:var(--highcontrast-link-focus-color,inherit);text-decoration-style:double}:host([variant=secondary]) a{color:var(\n--highcontrast-link-text-color-secondary-default,var(\n--mod-link-text-color-secondary-default,var(--spectrum-link-text-color-secondary-default)\n)\n)}:host([variant=secondary]) a:hover{color:var(\n--highcontrast-link-text-color-secondary-hover,var(\n--mod-link-text-color-secondary-hover,var(--spectrum-link-text-color-secondary-hover)\n)\n)}:host([variant=secondary]) a:active{color:var(\n--highcontrast-link-text-color-secondary-active,var(\n--mod-link-text-color-secondary-active,var(--spectrum-link-text-color-secondary-active)\n)\n)}:host([variant=secondary]) a:focus{color:var(\n--highcontrast-link-text-color-secondary-focus,var(\n--mod-link-text-color-secondary-focus,var(--spectrum-link-text-color-secondary-focus)\n)\n)}:host([quiet]) a{text-decoration:none}:host([quiet]) a:hover{text-decoration:underline}:host([static=white]) a{color:var(\n--highcontrast-link-text-color-white,var(--mod-link-text-color-white,var(--spectrum-link-text-color-white))\n)}:host([static=white]) a:active,:host([static=white]) a:focus,:host([static=white]) a:hover{color:var(\n--highcontrast-link-text-color-white,var(--mod-link-text-color-white,var(--spectrum-link-text-color-white))\n)}:host([static=black]) a{color:var(\n--highcontrast-link-text-color-black,var(--mod-link-text-color-black,var(--spectrum-link-text-color-black))\n)}:host([static=black]) a:active,:host([static=black]) a:focus,:host([static=black]) a:hover{color:var(\n--highcontrast-link-text-color-black,var(--mod-link-text-color-black,var(--spectrum-link-text-color-black))\n)}:host{display:inline}:host(:focus){outline:none}:host([href]) a.focus-visible{text-decoration:underline;text-decoration-style:double}:host([href]) a:focus-visible{text-decoration:underline;text-decoration-style:double}\n`;\nexport default styles;"],
|
|
5
|
+
"mappings": ";AAWA,SAAS,WAAW;AACpB,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;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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAiEf,eAAe;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/src/link.css.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"use strict";import{css as t}from"@spectrum-web-components/base";const o=t`
|
|
2
|
-
:host{--spectrum-link-animation-duration:var(
|
|
3
|
-
--spectrum-animation-duration-100
|
|
4
|
-
);--spectrum-link-text-color-primary-default:var(
|
|
2
|
+
:host{--spectrum-link-animation-duration:var(--spectrum-animation-duration-100);--spectrum-link-text-color-primary-default:var(
|
|
5
3
|
--spectrum-accent-content-color-default
|
|
6
4
|
);--spectrum-link-text-color-primary-hover:var(
|
|
7
5
|
--spectrum-accent-content-color-hover
|
|
@@ -17,7 +15,7 @@
|
|
|
17
15
|
--spectrum-neutral-content-color-down
|
|
18
16
|
);--spectrum-link-text-color-secondary-focus:var(
|
|
19
17
|
--spectrum-neutral-content-color-key-focus
|
|
20
|
-
);--spectrum-link-text-color-white:var(--spectrum-white);--spectrum-link-text-color-black:var(--spectrum-black)}@media (forced-colors:active){
|
|
18
|
+
);--spectrum-link-text-color-white:var(--spectrum-white);--spectrum-link-text-color-black:var(--spectrum-black)}@media (forced-colors:active){:host{--highcontrast-link-text-color-primary-default:LinkText;--highcontrast-link-text-color-primary-hover:LinkText;--highcontrast-link-text-color-primary-active:LinkText;--highcontrast-link-text-color-primary-focus:LinkText;--highcontrast-link-text-color-secondary-default:LinkText;--highcontrast-link-text-color-secondary-hover:LinkText;--highcontrast-link-text-color-secondary-active:LinkText;--highcontrast-link-text-color-secondary-focus:LinkText;--highcontrast-link-text-color-white:LinkText;--highcontrast-link-text-color-black:LinkText}}a{-webkit-text-decoration-skip:objects;background-color:#0000;color:var(
|
|
21
19
|
--highcontrast-link-text-color-primary-default,var(
|
|
22
20
|
--mod-link-text-color-primary-default,var(--spectrum-link-text-color-primary-default)
|
|
23
21
|
)
|
package/src/link.css.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["link.css.ts"],
|
|
4
|
-
"sourcesContent": ["/*\nCopyright 2023 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { css } from '@spectrum-web-components/base';\nconst styles = css`\n:host{--spectrum-link-animation-duration:var(
|
|
5
|
-
"mappings": "aAWA,OAAS,OAAAA,MAAW,gCACpB,MAAMC,EAASD;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;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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA
|
|
4
|
+
"sourcesContent": ["/*\nCopyright 2023 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { css } from '@spectrum-web-components/base';\nconst styles = css`\n:host{--spectrum-link-animation-duration:var(--spectrum-animation-duration-100);--spectrum-link-text-color-primary-default:var(\n--spectrum-accent-content-color-default\n);--spectrum-link-text-color-primary-hover:var(\n--spectrum-accent-content-color-hover\n);--spectrum-link-text-color-primary-active:var(\n--spectrum-accent-content-color-down\n);--spectrum-link-text-color-primary-focus:var(\n--spectrum-accent-content-color-key-focus\n);--spectrum-link-text-color-secondary-default:var(\n--spectrum-neutral-content-color-default\n);--spectrum-link-text-color-secondary-hover:var(\n--spectrum-neutral-content-color-hover\n);--spectrum-link-text-color-secondary-active:var(\n--spectrum-neutral-content-color-down\n);--spectrum-link-text-color-secondary-focus:var(\n--spectrum-neutral-content-color-key-focus\n);--spectrum-link-text-color-white:var(--spectrum-white);--spectrum-link-text-color-black:var(--spectrum-black)}@media (forced-colors:active){:host{--highcontrast-link-text-color-primary-default:LinkText;--highcontrast-link-text-color-primary-hover:LinkText;--highcontrast-link-text-color-primary-active:LinkText;--highcontrast-link-text-color-primary-focus:LinkText;--highcontrast-link-text-color-secondary-default:LinkText;--highcontrast-link-text-color-secondary-hover:LinkText;--highcontrast-link-text-color-secondary-active:LinkText;--highcontrast-link-text-color-secondary-focus:LinkText;--highcontrast-link-text-color-white:LinkText;--highcontrast-link-text-color-black:LinkText}}a{-webkit-text-decoration-skip:objects;background-color:#0000;color:var(\n--highcontrast-link-text-color-primary-default,var(\n--mod-link-text-color-primary-default,var(--spectrum-link-text-color-primary-default)\n)\n);cursor:pointer;outline:none;text-decoration:underline;transition:color var(\n--mod-link-animation-duration,var(--spectrum-link-animation-duration)\n) ease-in-out}a:hover{color:var(\n--highcontrast-link-text-color-primary-hover,var(\n--mod-link-text-color-primary-hover,var(--spectrum-link-text-color-primary-hover)\n)\n)}a:active{color:var(\n--highcontrast-link-text-color-primary-active,var(\n--mod-link-text-color-primary-active,var(--spectrum-link-text-color-primary-active)\n)\n)}a.focus-visible{color:var(\n--highcontrast-link-text-color-primary-focus,var(\n--mod-link-text-color-primary-focus,var(--spectrum-link-text-color-primary-focus)\n)\n);text-decoration:underline;text-decoration-color:var(--highcontrast-link-focus-color,inherit);text-decoration-style:double}a:focus-visible{color:var(\n--highcontrast-link-text-color-primary-focus,var(\n--mod-link-text-color-primary-focus,var(--spectrum-link-text-color-primary-focus)\n)\n);text-decoration:underline;text-decoration-color:var(--highcontrast-link-focus-color,inherit);text-decoration-style:double}:host([variant=secondary]) a{color:var(\n--highcontrast-link-text-color-secondary-default,var(\n--mod-link-text-color-secondary-default,var(--spectrum-link-text-color-secondary-default)\n)\n)}:host([variant=secondary]) a:hover{color:var(\n--highcontrast-link-text-color-secondary-hover,var(\n--mod-link-text-color-secondary-hover,var(--spectrum-link-text-color-secondary-hover)\n)\n)}:host([variant=secondary]) a:active{color:var(\n--highcontrast-link-text-color-secondary-active,var(\n--mod-link-text-color-secondary-active,var(--spectrum-link-text-color-secondary-active)\n)\n)}:host([variant=secondary]) a:focus{color:var(\n--highcontrast-link-text-color-secondary-focus,var(\n--mod-link-text-color-secondary-focus,var(--spectrum-link-text-color-secondary-focus)\n)\n)}:host([quiet]) a{text-decoration:none}:host([quiet]) a:hover{text-decoration:underline}:host([static=white]) a{color:var(\n--highcontrast-link-text-color-white,var(--mod-link-text-color-white,var(--spectrum-link-text-color-white))\n)}:host([static=white]) a:active,:host([static=white]) a:focus,:host([static=white]) a:hover{color:var(\n--highcontrast-link-text-color-white,var(--mod-link-text-color-white,var(--spectrum-link-text-color-white))\n)}:host([static=black]) a{color:var(\n--highcontrast-link-text-color-black,var(--mod-link-text-color-black,var(--spectrum-link-text-color-black))\n)}:host([static=black]) a:active,:host([static=black]) a:focus,:host([static=black]) a:hover{color:var(\n--highcontrast-link-text-color-black,var(--mod-link-text-color-black,var(--spectrum-link-text-color-black))\n)}:host{display:inline}:host(:focus){outline:none}:host([href]) a.focus-visible{text-decoration:underline;text-decoration-style:double}:host([href]) a:focus-visible{text-decoration:underline;text-decoration-style:double}\n`;\nexport default styles;"],
|
|
5
|
+
"mappings": "aAWA,OAAS,OAAAA,MAAW,gCACpB,MAAMC,EAASD;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;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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAiEf,eAAeC",
|
|
6
6
|
"names": ["css", "styles"]
|
|
7
7
|
}
|
package/src/spectrum-config.js
CHANGED
|
@@ -1,55 +1,179 @@
|
|
|
1
|
+
// @ts-check
|
|
1
2
|
/*
|
|
2
|
-
Copyright
|
|
3
|
-
This file is licensed to you under the Apache License, Version 2.0 (the
|
|
3
|
+
Copyright 2023 Adobe. All rights reserved.
|
|
4
|
+
This file is licensed to you under the Apache License, Version 2.0 (the 'License');
|
|
4
5
|
you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
6
|
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
7
|
|
|
7
8
|
Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
-
the License is distributed on an
|
|
9
|
+
the License is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
10
|
OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
11
|
governing permissions and limitations under the License.
|
|
11
12
|
*/
|
|
12
13
|
|
|
14
|
+
import {
|
|
15
|
+
builder,
|
|
16
|
+
converterFor,
|
|
17
|
+
} from '../../../tasks/process-spectrum-utils.js';
|
|
18
|
+
|
|
19
|
+
const converter = converterFor('spectrum-Link');
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* @returns {import('../../../tasks/spectrum-css-converter').ComplexSelectorConversion}
|
|
23
|
+
*/
|
|
24
|
+
const includeAnchor = (className, attribute, value) => ({
|
|
25
|
+
find: [
|
|
26
|
+
/** @type {import('lightningcss').SelectorComponent} */ (
|
|
27
|
+
builder.class(className)
|
|
28
|
+
),
|
|
29
|
+
],
|
|
30
|
+
replace: [
|
|
31
|
+
{
|
|
32
|
+
replace: /** @type {import('lightningcss').SelectorComponent} */ ({
|
|
33
|
+
type: 'pseudo-class',
|
|
34
|
+
kind: 'host',
|
|
35
|
+
selectors: [builder.attribute(attribute, value)],
|
|
36
|
+
}),
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
replace: builder.combinator('descendant'),
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
replace: builder.element('a'),
|
|
43
|
+
},
|
|
44
|
+
],
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
*
|
|
49
|
+
* @param {string} pseudo
|
|
50
|
+
* @param {string} className
|
|
51
|
+
* @param {string} attribute
|
|
52
|
+
* @param {string} value
|
|
53
|
+
* @returns {import('../../../tasks/spectrum-css-converter').ComplexSelectorConversion}
|
|
54
|
+
*/
|
|
55
|
+
const includeAnchorWithPseudoClass = (pseudo, className, attribute, value) => {
|
|
56
|
+
const component = includeAnchor(className, attribute, value);
|
|
57
|
+
const pseudoComponent =
|
|
58
|
+
/** @type {import('lightningcss').SelectorComponent} */ (
|
|
59
|
+
builder.pseudoClass(pseudo)
|
|
60
|
+
);
|
|
61
|
+
component.find.push(pseudoComponent);
|
|
62
|
+
component.replace.push({
|
|
63
|
+
replace: pseudoComponent,
|
|
64
|
+
});
|
|
65
|
+
return component;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* @type { import('../../../tasks/spectrum-css-converter').SpectrumCSSConverter }
|
|
70
|
+
*/
|
|
13
71
|
const config = {
|
|
14
|
-
|
|
15
|
-
components: [
|
|
72
|
+
conversions: [
|
|
16
73
|
{
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
attributes: [
|
|
23
|
-
{
|
|
24
|
-
type: 'boolean',
|
|
25
|
-
selector: '.spectrum-Link--quiet',
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
type: 'boolean',
|
|
29
|
-
name: 'over-background',
|
|
30
|
-
selector: '.spectrum-Link--overBackground',
|
|
31
|
-
},
|
|
74
|
+
inPackage: '@spectrum-css/link',
|
|
75
|
+
outPackage: 'link',
|
|
76
|
+
fileName: 'link',
|
|
77
|
+
hoistCustomPropertiesFrom: 'spectrum-Link',
|
|
78
|
+
components: [
|
|
32
79
|
{
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
80
|
+
find: [
|
|
81
|
+
builder.class('spectrum-Link'),
|
|
82
|
+
builder.pseudoClass('active'),
|
|
83
|
+
],
|
|
84
|
+
replace: [],
|
|
36
85
|
},
|
|
37
86
|
{
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
87
|
+
find: [
|
|
88
|
+
builder.class('spectrum-Link'),
|
|
89
|
+
builder.pseudoClass('hover'),
|
|
90
|
+
],
|
|
91
|
+
replace: [
|
|
41
92
|
{
|
|
42
|
-
|
|
43
|
-
selector: '.spectrum-Link--staticBlack',
|
|
93
|
+
replace: builder.element('a'),
|
|
44
94
|
},
|
|
45
95
|
{
|
|
46
|
-
|
|
47
|
-
selector: '.spectrum-Link--staticWhite',
|
|
96
|
+
replace: builder.pseudoClass('hover'),
|
|
48
97
|
},
|
|
49
98
|
],
|
|
50
99
|
},
|
|
100
|
+
includeAnchor('spectrum-Link--quiet', 'quiet'),
|
|
101
|
+
includeAnchorWithPseudoClass(
|
|
102
|
+
'hover',
|
|
103
|
+
'spectrum-Link--quiet',
|
|
104
|
+
'quiet'
|
|
105
|
+
),
|
|
106
|
+
includeAnchor(
|
|
107
|
+
'spectrum-Link--secondary',
|
|
108
|
+
'variant',
|
|
109
|
+
'secondary'
|
|
110
|
+
),
|
|
111
|
+
includeAnchorWithPseudoClass(
|
|
112
|
+
'hover',
|
|
113
|
+
'spectrum-Link--secondary',
|
|
114
|
+
'variant',
|
|
115
|
+
'secondary'
|
|
116
|
+
),
|
|
117
|
+
includeAnchorWithPseudoClass(
|
|
118
|
+
'active',
|
|
119
|
+
'spectrum-Link--secondary',
|
|
120
|
+
'variant',
|
|
121
|
+
'secondary'
|
|
122
|
+
),
|
|
123
|
+
includeAnchorWithPseudoClass(
|
|
124
|
+
'focus',
|
|
125
|
+
'spectrum-Link--secondary',
|
|
126
|
+
'variant',
|
|
127
|
+
'secondary'
|
|
128
|
+
),
|
|
129
|
+
includeAnchor('spectrum-Link--staticWhite', 'static', 'white'),
|
|
130
|
+
includeAnchorWithPseudoClass(
|
|
131
|
+
'hover',
|
|
132
|
+
'spectrum-Link--staticWhite',
|
|
133
|
+
'static',
|
|
134
|
+
'white'
|
|
135
|
+
),
|
|
136
|
+
includeAnchorWithPseudoClass(
|
|
137
|
+
'active',
|
|
138
|
+
'spectrum-Link--staticWhite',
|
|
139
|
+
'static',
|
|
140
|
+
'white'
|
|
141
|
+
),
|
|
142
|
+
includeAnchorWithPseudoClass(
|
|
143
|
+
'focus',
|
|
144
|
+
'spectrum-Link--staticWhite',
|
|
145
|
+
'static',
|
|
146
|
+
'white'
|
|
147
|
+
),
|
|
148
|
+
includeAnchor('spectrum-Link--staticBlack', 'static', 'black'),
|
|
149
|
+
includeAnchorWithPseudoClass(
|
|
150
|
+
'hover',
|
|
151
|
+
'spectrum-Link--staticBlack',
|
|
152
|
+
'static',
|
|
153
|
+
'black'
|
|
154
|
+
),
|
|
155
|
+
includeAnchorWithPseudoClass(
|
|
156
|
+
'active',
|
|
157
|
+
'spectrum-Link--staticBlack',
|
|
158
|
+
'static',
|
|
159
|
+
'black'
|
|
160
|
+
),
|
|
161
|
+
includeAnchorWithPseudoClass(
|
|
162
|
+
'focus',
|
|
163
|
+
'spectrum-Link--staticBlack',
|
|
164
|
+
'static',
|
|
165
|
+
'black'
|
|
166
|
+
),
|
|
167
|
+
{
|
|
168
|
+
find: builder.class('spectrum-Link'),
|
|
169
|
+
replace: builder.element('a'),
|
|
170
|
+
},
|
|
171
|
+
converter.classToAttribute('spectrum-Link--quiet'),
|
|
172
|
+
converter.classToAttribute(
|
|
173
|
+
'spectrum-Link--overBackground',
|
|
174
|
+
'over-background'
|
|
175
|
+
),
|
|
51
176
|
],
|
|
52
|
-
exclude: [/\.is-disabled/, /\.spectrum-Link--subtle/],
|
|
53
177
|
},
|
|
54
178
|
],
|
|
55
179
|
};
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
import { css } from "@spectrum-web-components/base";
|
|
3
3
|
const styles = css`
|
|
4
|
-
:host{--spectrum-link-animation-duration:var(
|
|
5
|
-
--spectrum-animation-duration-100
|
|
6
|
-
);--spectrum-link-text-color-primary-default:var(
|
|
4
|
+
:host{--spectrum-link-animation-duration:var(--spectrum-animation-duration-100);--spectrum-link-text-color-primary-default:var(
|
|
7
5
|
--spectrum-accent-content-color-default
|
|
8
6
|
);--spectrum-link-text-color-primary-hover:var(
|
|
9
7
|
--spectrum-accent-content-color-hover
|
|
@@ -19,7 +17,7 @@ const styles = css`
|
|
|
19
17
|
--spectrum-neutral-content-color-down
|
|
20
18
|
);--spectrum-link-text-color-secondary-focus:var(
|
|
21
19
|
--spectrum-neutral-content-color-key-focus
|
|
22
|
-
);--spectrum-link-text-color-white:var(--spectrum-white);--spectrum-link-text-color-black:var(--spectrum-black)}@media (forced-colors:active){
|
|
20
|
+
);--spectrum-link-text-color-white:var(--spectrum-white);--spectrum-link-text-color-black:var(--spectrum-black)}@media (forced-colors:active){:host{--highcontrast-link-text-color-primary-default:LinkText;--highcontrast-link-text-color-primary-hover:LinkText;--highcontrast-link-text-color-primary-active:LinkText;--highcontrast-link-text-color-primary-focus:LinkText;--highcontrast-link-text-color-secondary-default:LinkText;--highcontrast-link-text-color-secondary-hover:LinkText;--highcontrast-link-text-color-secondary-active:LinkText;--highcontrast-link-text-color-secondary-focus:LinkText;--highcontrast-link-text-color-white:LinkText;--highcontrast-link-text-color-black:LinkText}}a{-webkit-text-decoration-skip:objects;background-color:#0000;color:var(
|
|
23
21
|
--highcontrast-link-text-color-primary-default,var(
|
|
24
22
|
--mod-link-text-color-primary-default,var(--spectrum-link-text-color-primary-default)
|
|
25
23
|
)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["spectrum-link.css.ts"],
|
|
4
|
-
"sourcesContent": ["/*\nCopyright 2023 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { css } from '@spectrum-web-components/base';\nconst styles = css`\n:host{--spectrum-link-animation-duration:var(
|
|
5
|
-
"mappings": ";AAWA,SAAS,WAAW;AACpB,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;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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;
|
|
4
|
+
"sourcesContent": ["/*\nCopyright 2023 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { css } from '@spectrum-web-components/base';\nconst styles = css`\n:host{--spectrum-link-animation-duration:var(--spectrum-animation-duration-100);--spectrum-link-text-color-primary-default:var(\n--spectrum-accent-content-color-default\n);--spectrum-link-text-color-primary-hover:var(\n--spectrum-accent-content-color-hover\n);--spectrum-link-text-color-primary-active:var(\n--spectrum-accent-content-color-down\n);--spectrum-link-text-color-primary-focus:var(\n--spectrum-accent-content-color-key-focus\n);--spectrum-link-text-color-secondary-default:var(\n--spectrum-neutral-content-color-default\n);--spectrum-link-text-color-secondary-hover:var(\n--spectrum-neutral-content-color-hover\n);--spectrum-link-text-color-secondary-active:var(\n--spectrum-neutral-content-color-down\n);--spectrum-link-text-color-secondary-focus:var(\n--spectrum-neutral-content-color-key-focus\n);--spectrum-link-text-color-white:var(--spectrum-white);--spectrum-link-text-color-black:var(--spectrum-black)}@media (forced-colors:active){:host{--highcontrast-link-text-color-primary-default:LinkText;--highcontrast-link-text-color-primary-hover:LinkText;--highcontrast-link-text-color-primary-active:LinkText;--highcontrast-link-text-color-primary-focus:LinkText;--highcontrast-link-text-color-secondary-default:LinkText;--highcontrast-link-text-color-secondary-hover:LinkText;--highcontrast-link-text-color-secondary-active:LinkText;--highcontrast-link-text-color-secondary-focus:LinkText;--highcontrast-link-text-color-white:LinkText;--highcontrast-link-text-color-black:LinkText}}a{-webkit-text-decoration-skip:objects;background-color:#0000;color:var(\n--highcontrast-link-text-color-primary-default,var(\n--mod-link-text-color-primary-default,var(--spectrum-link-text-color-primary-default)\n)\n);cursor:pointer;outline:none;text-decoration:underline;transition:color var(\n--mod-link-animation-duration,var(--spectrum-link-animation-duration)\n) ease-in-out}a:hover{color:var(\n--highcontrast-link-text-color-primary-hover,var(\n--mod-link-text-color-primary-hover,var(--spectrum-link-text-color-primary-hover)\n)\n)}a:active{color:var(\n--highcontrast-link-text-color-primary-active,var(\n--mod-link-text-color-primary-active,var(--spectrum-link-text-color-primary-active)\n)\n)}a.focus-visible{color:var(\n--highcontrast-link-text-color-primary-focus,var(\n--mod-link-text-color-primary-focus,var(--spectrum-link-text-color-primary-focus)\n)\n);text-decoration:underline;text-decoration-color:var(--highcontrast-link-focus-color,inherit);text-decoration-style:double}a:focus-visible{color:var(\n--highcontrast-link-text-color-primary-focus,var(\n--mod-link-text-color-primary-focus,var(--spectrum-link-text-color-primary-focus)\n)\n);text-decoration:underline;text-decoration-color:var(--highcontrast-link-focus-color,inherit);text-decoration-style:double}:host([variant=secondary]) a{color:var(\n--highcontrast-link-text-color-secondary-default,var(\n--mod-link-text-color-secondary-default,var(--spectrum-link-text-color-secondary-default)\n)\n)}:host([variant=secondary]) a:hover{color:var(\n--highcontrast-link-text-color-secondary-hover,var(\n--mod-link-text-color-secondary-hover,var(--spectrum-link-text-color-secondary-hover)\n)\n)}:host([variant=secondary]) a:active{color:var(\n--highcontrast-link-text-color-secondary-active,var(\n--mod-link-text-color-secondary-active,var(--spectrum-link-text-color-secondary-active)\n)\n)}:host([variant=secondary]) a:focus{color:var(\n--highcontrast-link-text-color-secondary-focus,var(\n--mod-link-text-color-secondary-focus,var(--spectrum-link-text-color-secondary-focus)\n)\n)}:host([quiet]) a{text-decoration:none}:host([quiet]) a:hover{text-decoration:underline}:host([static=white]) a{color:var(\n--highcontrast-link-text-color-white,var(--mod-link-text-color-white,var(--spectrum-link-text-color-white))\n)}:host([static=white]) a:active,:host([static=white]) a:focus,:host([static=white]) a:hover{color:var(\n--highcontrast-link-text-color-white,var(--mod-link-text-color-white,var(--spectrum-link-text-color-white))\n)}:host([static=black]) a{color:var(\n--highcontrast-link-text-color-black,var(--mod-link-text-color-black,var(--spectrum-link-text-color-black))\n)}:host([static=black]) a:active,:host([static=black]) a:focus,:host([static=black]) a:hover{color:var(\n--highcontrast-link-text-color-black,var(--mod-link-text-color-black,var(--spectrum-link-text-color-black))\n)}\n`;\nexport default styles;"],
|
|
5
|
+
"mappings": ";AAWA,SAAS,WAAW;AACpB,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;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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAiEf,eAAe;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/src/spectrum-link.css.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"use strict";import{css as t}from"@spectrum-web-components/base";const o=t`
|
|
2
|
-
:host{--spectrum-link-animation-duration:var(
|
|
3
|
-
--spectrum-animation-duration-100
|
|
4
|
-
);--spectrum-link-text-color-primary-default:var(
|
|
2
|
+
:host{--spectrum-link-animation-duration:var(--spectrum-animation-duration-100);--spectrum-link-text-color-primary-default:var(
|
|
5
3
|
--spectrum-accent-content-color-default
|
|
6
4
|
);--spectrum-link-text-color-primary-hover:var(
|
|
7
5
|
--spectrum-accent-content-color-hover
|
|
@@ -17,7 +15,7 @@
|
|
|
17
15
|
--spectrum-neutral-content-color-down
|
|
18
16
|
);--spectrum-link-text-color-secondary-focus:var(
|
|
19
17
|
--spectrum-neutral-content-color-key-focus
|
|
20
|
-
);--spectrum-link-text-color-white:var(--spectrum-white);--spectrum-link-text-color-black:var(--spectrum-black)}@media (forced-colors:active){
|
|
18
|
+
);--spectrum-link-text-color-white:var(--spectrum-white);--spectrum-link-text-color-black:var(--spectrum-black)}@media (forced-colors:active){:host{--highcontrast-link-text-color-primary-default:LinkText;--highcontrast-link-text-color-primary-hover:LinkText;--highcontrast-link-text-color-primary-active:LinkText;--highcontrast-link-text-color-primary-focus:LinkText;--highcontrast-link-text-color-secondary-default:LinkText;--highcontrast-link-text-color-secondary-hover:LinkText;--highcontrast-link-text-color-secondary-active:LinkText;--highcontrast-link-text-color-secondary-focus:LinkText;--highcontrast-link-text-color-white:LinkText;--highcontrast-link-text-color-black:LinkText}}a{-webkit-text-decoration-skip:objects;background-color:#0000;color:var(
|
|
21
19
|
--highcontrast-link-text-color-primary-default,var(
|
|
22
20
|
--mod-link-text-color-primary-default,var(--spectrum-link-text-color-primary-default)
|
|
23
21
|
)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["spectrum-link.css.ts"],
|
|
4
|
-
"sourcesContent": ["/*\nCopyright 2023 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { css } from '@spectrum-web-components/base';\nconst styles = css`\n:host{--spectrum-link-animation-duration:var(
|
|
5
|
-
"mappings": "aAWA,OAAS,OAAAA,MAAW,gCACpB,MAAMC,EAASD;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;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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA
|
|
4
|
+
"sourcesContent": ["/*\nCopyright 2023 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { css } from '@spectrum-web-components/base';\nconst styles = css`\n:host{--spectrum-link-animation-duration:var(--spectrum-animation-duration-100);--spectrum-link-text-color-primary-default:var(\n--spectrum-accent-content-color-default\n);--spectrum-link-text-color-primary-hover:var(\n--spectrum-accent-content-color-hover\n);--spectrum-link-text-color-primary-active:var(\n--spectrum-accent-content-color-down\n);--spectrum-link-text-color-primary-focus:var(\n--spectrum-accent-content-color-key-focus\n);--spectrum-link-text-color-secondary-default:var(\n--spectrum-neutral-content-color-default\n);--spectrum-link-text-color-secondary-hover:var(\n--spectrum-neutral-content-color-hover\n);--spectrum-link-text-color-secondary-active:var(\n--spectrum-neutral-content-color-down\n);--spectrum-link-text-color-secondary-focus:var(\n--spectrum-neutral-content-color-key-focus\n);--spectrum-link-text-color-white:var(--spectrum-white);--spectrum-link-text-color-black:var(--spectrum-black)}@media (forced-colors:active){:host{--highcontrast-link-text-color-primary-default:LinkText;--highcontrast-link-text-color-primary-hover:LinkText;--highcontrast-link-text-color-primary-active:LinkText;--highcontrast-link-text-color-primary-focus:LinkText;--highcontrast-link-text-color-secondary-default:LinkText;--highcontrast-link-text-color-secondary-hover:LinkText;--highcontrast-link-text-color-secondary-active:LinkText;--highcontrast-link-text-color-secondary-focus:LinkText;--highcontrast-link-text-color-white:LinkText;--highcontrast-link-text-color-black:LinkText}}a{-webkit-text-decoration-skip:objects;background-color:#0000;color:var(\n--highcontrast-link-text-color-primary-default,var(\n--mod-link-text-color-primary-default,var(--spectrum-link-text-color-primary-default)\n)\n);cursor:pointer;outline:none;text-decoration:underline;transition:color var(\n--mod-link-animation-duration,var(--spectrum-link-animation-duration)\n) ease-in-out}a:hover{color:var(\n--highcontrast-link-text-color-primary-hover,var(\n--mod-link-text-color-primary-hover,var(--spectrum-link-text-color-primary-hover)\n)\n)}a:active{color:var(\n--highcontrast-link-text-color-primary-active,var(\n--mod-link-text-color-primary-active,var(--spectrum-link-text-color-primary-active)\n)\n)}a.focus-visible{color:var(\n--highcontrast-link-text-color-primary-focus,var(\n--mod-link-text-color-primary-focus,var(--spectrum-link-text-color-primary-focus)\n)\n);text-decoration:underline;text-decoration-color:var(--highcontrast-link-focus-color,inherit);text-decoration-style:double}a:focus-visible{color:var(\n--highcontrast-link-text-color-primary-focus,var(\n--mod-link-text-color-primary-focus,var(--spectrum-link-text-color-primary-focus)\n)\n);text-decoration:underline;text-decoration-color:var(--highcontrast-link-focus-color,inherit);text-decoration-style:double}:host([variant=secondary]) a{color:var(\n--highcontrast-link-text-color-secondary-default,var(\n--mod-link-text-color-secondary-default,var(--spectrum-link-text-color-secondary-default)\n)\n)}:host([variant=secondary]) a:hover{color:var(\n--highcontrast-link-text-color-secondary-hover,var(\n--mod-link-text-color-secondary-hover,var(--spectrum-link-text-color-secondary-hover)\n)\n)}:host([variant=secondary]) a:active{color:var(\n--highcontrast-link-text-color-secondary-active,var(\n--mod-link-text-color-secondary-active,var(--spectrum-link-text-color-secondary-active)\n)\n)}:host([variant=secondary]) a:focus{color:var(\n--highcontrast-link-text-color-secondary-focus,var(\n--mod-link-text-color-secondary-focus,var(--spectrum-link-text-color-secondary-focus)\n)\n)}:host([quiet]) a{text-decoration:none}:host([quiet]) a:hover{text-decoration:underline}:host([static=white]) a{color:var(\n--highcontrast-link-text-color-white,var(--mod-link-text-color-white,var(--spectrum-link-text-color-white))\n)}:host([static=white]) a:active,:host([static=white]) a:focus,:host([static=white]) a:hover{color:var(\n--highcontrast-link-text-color-white,var(--mod-link-text-color-white,var(--spectrum-link-text-color-white))\n)}:host([static=black]) a{color:var(\n--highcontrast-link-text-color-black,var(--mod-link-text-color-black,var(--spectrum-link-text-color-black))\n)}:host([static=black]) a:active,:host([static=black]) a:focus,:host([static=black]) a:hover{color:var(\n--highcontrast-link-text-color-black,var(--mod-link-text-color-black,var(--spectrum-link-text-color-black))\n)}\n`;\nexport default styles;"],
|
|
5
|
+
"mappings": "aAWA,OAAS,OAAAA,MAAW,gCACpB,MAAMC,EAASD;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;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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAiEf,eAAeC",
|
|
6
6
|
"names": ["css", "styles"]
|
|
7
7
|
}
|