@fluid-topics/ft-link 1.3.45 → 1.3.47
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/build/ft-link.light.js +96 -78
- package/build/ft-link.min.js +98 -80
- package/build/ftds-link.d.ts +3 -3
- package/build/ftds-link.js +13 -13
- package/package.json +5 -5
package/build/ftds-link.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ElementDefinitionsMap, FtdsBase } from "@fluid-topics/ft-wc-utils";
|
|
2
|
-
import { FtTypographyVariants } from "@fluid-topics/ft-typography";
|
|
3
1
|
import { ClassInfo } from "lit/directives/class-map.js";
|
|
2
|
+
import { ElementDefinitionsMap, FtdsBase } from "@fluid-topics/ft-wc-utils";
|
|
3
|
+
import { FtdsTypographyVariants } from "@fluid-topics/ft-typography";
|
|
4
4
|
import { FtdsLinkProperties } from "./ftds-link.properties";
|
|
5
5
|
export declare enum LinkTarget {
|
|
6
6
|
SELF = "_self",
|
|
@@ -10,7 +10,7 @@ export declare class FtdsLink extends FtdsBase implements FtdsLinkProperties {
|
|
|
10
10
|
static elementDefinitions: ElementDefinitionsMap;
|
|
11
11
|
get linkClasses(): ClassInfo;
|
|
12
12
|
href: string;
|
|
13
|
-
variant:
|
|
13
|
+
variant: FtdsTypographyVariants;
|
|
14
14
|
underlined: boolean;
|
|
15
15
|
openInNewTabLabel: string;
|
|
16
16
|
target: LinkTarget;
|
package/build/ftds-link.js
CHANGED
|
@@ -8,7 +8,7 @@ import { html } from "lit";
|
|
|
8
8
|
import { property } from "lit/decorators.js";
|
|
9
9
|
import { classMap } from "lit/directives/class-map.js";
|
|
10
10
|
import { FtdsBase, isSafari, safariEllipsisFix } from "@fluid-topics/ft-wc-utils";
|
|
11
|
-
import {
|
|
11
|
+
import { FtdsTypography, FtdsTypographyVariants } from "@fluid-topics/ft-typography";
|
|
12
12
|
import { FtIcon, FtIconVariants } from "@fluid-topics/ft-icon";
|
|
13
13
|
import { designSystemStyles } from "./ftds-link.styles";
|
|
14
14
|
export var LinkTarget;
|
|
@@ -20,7 +20,7 @@ class FtdsLink extends FtdsBase {
|
|
|
20
20
|
constructor() {
|
|
21
21
|
super(...arguments);
|
|
22
22
|
this.href = "";
|
|
23
|
-
this.variant =
|
|
23
|
+
this.variant = FtdsTypographyVariants.body2medium;
|
|
24
24
|
this.underlined = false;
|
|
25
25
|
this.openInNewTabLabel = "This link will be opened in a new tab";
|
|
26
26
|
this.target = LinkTarget.SELF;
|
|
@@ -40,26 +40,26 @@ class FtdsLink extends FtdsBase {
|
|
|
40
40
|
target="${this.target}"
|
|
41
41
|
href="${this.href}"
|
|
42
42
|
class="${classMap(this.linkClasses)}">
|
|
43
|
-
<
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
<ftds-typography part="label"
|
|
44
|
+
variant="${this.variant}"
|
|
45
|
+
element="span"
|
|
46
|
+
class="ftds-link--label ${isSafari ? "ft-safari-ellipsis-fix" : ""}">
|
|
47
47
|
<span><slot @slotchange=${this.onSlotchange}></slot></span>
|
|
48
|
-
</
|
|
48
|
+
</ftds-typography>
|
|
49
49
|
${this.resolveIcon()}
|
|
50
50
|
</a>
|
|
51
51
|
`;
|
|
52
52
|
}
|
|
53
53
|
resolveIcon() {
|
|
54
54
|
return this.target === LinkTarget.BLANK ? html `
|
|
55
|
-
<ft-icon aria-label="${this.openInNewTabLabel}" part="icon" .variant
|
|
55
|
+
<ft-icon aria-label="${this.openInNewTabLabel}" part="icon" .variant=${FtIconVariants.fluid_topics} .value=${this.icon}>
|
|
56
56
|
</ft-icon>
|
|
57
57
|
` : html ``;
|
|
58
58
|
}
|
|
59
59
|
get resolveVariantClasses() {
|
|
60
|
-
|
|
60
|
+
const prefix = "ftds-link--variant-";
|
|
61
61
|
return {
|
|
62
|
-
[prefix + this.variant]: true
|
|
62
|
+
[prefix + this.variant]: true,
|
|
63
63
|
};
|
|
64
64
|
}
|
|
65
65
|
onSlotchange() {
|
|
@@ -67,12 +67,12 @@ class FtdsLink extends FtdsBase {
|
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
FtdsLink.elementDefinitions = {
|
|
70
|
-
"
|
|
71
|
-
"ft-icon": FtIcon
|
|
70
|
+
"ftds-typography": FtdsTypography,
|
|
71
|
+
"ft-icon": FtIcon,
|
|
72
72
|
};
|
|
73
73
|
FtdsLink.styles = [
|
|
74
74
|
safariEllipsisFix,
|
|
75
|
-
designSystemStyles
|
|
75
|
+
designSystemStyles,
|
|
76
76
|
];
|
|
77
77
|
__decorate([
|
|
78
78
|
property()
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-link",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.47",
|
|
4
4
|
"description": "Generic link component",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-icon": "1.3.
|
|
23
|
-
"@fluid-topics/ft-typography": "1.3.
|
|
24
|
-
"@fluid-topics/ft-wc-utils": "1.3.
|
|
22
|
+
"@fluid-topics/ft-icon": "1.3.47",
|
|
23
|
+
"@fluid-topics/ft-typography": "1.3.47",
|
|
24
|
+
"@fluid-topics/ft-wc-utils": "1.3.47",
|
|
25
25
|
"lit": "3.1.0"
|
|
26
26
|
},
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "16ac56d62f3a88a3b03cbc92bcd04dd91951a015"
|
|
28
28
|
}
|