@justeattakeaway/pie-link 1.3.20 → 1.3.22
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/dist/index.js +29 -29
- package/package.json +6 -6
- package/src/index.ts +1 -1
- package/src/link.scss +1 -1
package/dist/index.js
CHANGED
|
@@ -8,9 +8,9 @@ const k = class k extends b {
|
|
|
8
8
|
this.getAttribute("v") || this.setAttribute("v", k.v);
|
|
9
9
|
}
|
|
10
10
|
};
|
|
11
|
-
k.v = "1.3.
|
|
11
|
+
k.v = "1.3.22";
|
|
12
12
|
let y = k;
|
|
13
|
-
const z = "*,*:after,*:before{box-sizing:inherit}:host{display:inline-block;--link-font-weight: var(--dt-font-body-l-link-weight);--link-text-color: var(--dt-color-content-link);--link-text-decoration: var(--dt-font-body-l-link-text-decoration)}:host([isstandalone]){display:block}.c-link{--link-font-family: var(--dt-font-interactive-l-family);--link-font-size: calc(var(--dt-font-body-l-link-size) * 1px);--link-line-height: calc(var(--dt-font-body-l-link-line-height) * 1px);--link-icon-size: 16px;--link-icon-offset-top: var(--dt-spacing-a);display:inline-block;font-family:var(--link-font-family);font-size:var(--link-font-size);line-height:var(--link-line-height);font-weight:var(--link-font-weight);color:var(--link-text-color);text-decoration:var(--link-text-decoration);cursor:pointer}.c-link:hover,.c-link:active{--link-text-decoration: none}.c-link.c-link--high-visibility{--link-text-color: var(--dt-color-content-link-distinct)}.c-link.c-link--inverse{--link-text-color: var(--dt-color-content-link-inverse)}.c-link.c-link--small{--link-font-size: calc(var(--dt-font-body-s-link-size) * 1px);--link-line-height: calc(var(--dt-font-body-s-link-line-height) * 1px);--link-font-weight: var(--dt-font-body-s-link-weight);--link-text-decoration: var(--dt-font-body-s-link-text-decoration);--link-icon-offset-top: 2px}.c-link.c-link--underline-reversed.c-link--standalone{--link-text-decoration: none}.c-link.c-link--underline-reversed.c-link--standalone:hover,.c-link.c-link--underline-reversed.c-link--standalone:active{--link-text-decoration: var(--dt-font-body-l-link-text-decoration)}.c-link.c-link--bold{--link-font-size: calc(var(--dt-font-body-strong-l-link-size) * 1px);--link-line-height: calc(var(--dt-font-body-strong-l-link-line-height) * 1px);--link-font-weight: var(--dt-font-body-strong-l-link-weight)}.c-link.c-link--bold.c-link--small{--link-font-size: calc(var(--dt-font-body-strong-s-link-size) * 1px);--link-line-height: calc(var(--dt-font-body-strong-s-link-line-height) * 1px);--link-font-weight: var(--dt-font-body-strong-s-link-weight)}.c-link.c-link--standalone{display:block;width:fit-content}.c-link.
|
|
13
|
+
const z = "*,*:after,*:before{box-sizing:inherit}:host{display:inline-block;--link-font-weight: var(--dt-font-body-l-link-weight);--link-text-color: var(--dt-color-content-link);--link-text-decoration: var(--dt-font-body-l-link-text-decoration)}:host([isstandalone]){display:block}.c-link{--link-font-family: var(--dt-font-interactive-l-family);--link-font-size: calc(var(--dt-font-body-l-link-size) * 1px);--link-line-height: calc(var(--dt-font-body-l-link-line-height) * 1px);--link-icon-size: 16px;--link-icon-offset-top: var(--dt-spacing-a);display:inline-block;font-family:var(--link-font-family);font-size:var(--link-font-size);line-height:var(--link-line-height);font-weight:var(--link-font-weight);color:var(--link-text-color);text-decoration:var(--link-text-decoration);cursor:pointer}.c-link:hover,.c-link:active{--link-text-decoration: none}.c-link.c-link--high-visibility{--link-text-color: var(--dt-color-content-link-distinct)}.c-link.c-link--inverse{--link-text-color: var(--dt-color-content-link-inverse)}.c-link.c-link--small{--link-font-size: calc(var(--dt-font-body-s-link-size) * 1px);--link-line-height: calc(var(--dt-font-body-s-link-line-height) * 1px);--link-font-weight: var(--dt-font-body-s-link-weight);--link-text-decoration: var(--dt-font-body-s-link-text-decoration);--link-icon-offset-top: 2px}.c-link.c-link--underline-reversed.c-link--standalone{--link-text-decoration: none}.c-link.c-link--underline-reversed.c-link--standalone:hover,.c-link.c-link--underline-reversed.c-link--standalone:active{--link-text-decoration: var(--dt-font-body-l-link-text-decoration)}.c-link.c-link--bold{--link-font-size: calc(var(--dt-font-body-strong-l-link-size) * 1px);--link-line-height: calc(var(--dt-font-body-strong-l-link-line-height) * 1px);--link-font-weight: var(--dt-font-body-strong-l-link-weight)}.c-link.c-link--bold.c-link--small{--link-font-size: calc(var(--dt-font-body-strong-s-link-size) * 1px);--link-line-height: calc(var(--dt-font-body-strong-s-link-line-height) * 1px);--link-font-weight: var(--dt-font-body-strong-s-link-weight)}.c-link.c-link--standalone{display:block;width:fit-content}.c-link.has-visited:visited{color:var(--dt-color-content-link-visited)}.c-link.has-visited:visited.c-link--inverse{color:var(--dt-color-content-link-visited-inverse)}.c-link:focus-visible{outline:none;border-radius:2px;box-shadow:0 0 0 2px var(--dt-color-focus-inner),0 0 0 4px var(--dt-color-focus-outer)}button.c-link{outline:none;border:none;-webkit-user-select:none;user-select:none;background:transparent;padding:0}.c-link-content{display:flex;gap:var(--dt-spacing-a)}::slotted(.c-pieIcon),::slotted(svg){display:inline-flex;margin-block-start:var(--link-icon-offset-top);height:var(--link-icon-size);width:var(--link-icon-size)}", w = ["default", "high-visibility", "inverse"], S = ["small", "medium"], $ = ["leading", "trailing"], P = ["a", "button"], B = ["submit", "button", "reset", "menu"], C = ["default", "reversed"], e = {
|
|
14
14
|
tag: "a",
|
|
15
15
|
variant: "default",
|
|
16
16
|
size: "medium",
|
|
@@ -21,15 +21,15 @@ const z = "*,*:after,*:before{box-sizing:inherit}:host{display:inline-block;--li
|
|
|
21
21
|
iconPlacement: "leading",
|
|
22
22
|
type: "submit"
|
|
23
23
|
};
|
|
24
|
-
var
|
|
24
|
+
var V = Object.defineProperty, O = Object.getOwnPropertyDescriptor, n = (l, o, h, p) => {
|
|
25
25
|
for (var r = p > 1 ? void 0 : p ? O(o, h) : o, f = l.length - 1, v; f >= 0; f--)
|
|
26
26
|
(v = l[f]) && (r = (p ? v(o, h, r) : v(r)) || r);
|
|
27
|
-
return p && r &&
|
|
27
|
+
return p && r && V(o, h, r), r;
|
|
28
28
|
};
|
|
29
29
|
const c = "pie-link";
|
|
30
30
|
let t = class extends y {
|
|
31
31
|
constructor() {
|
|
32
|
-
super(...arguments), this.tag =
|
|
32
|
+
super(...arguments), this.tag = e.tag, this.variant = e.variant, this.size = e.size, this.underline = e.underline, this.iconPlacement = e.iconPlacement, this.isBold = e.isBold, this.isStandalone = e.isStandalone, this.hasVisited = e.hasVisited, this.type = e.type;
|
|
33
33
|
}
|
|
34
34
|
/**
|
|
35
35
|
* Renders the link content.
|
|
@@ -90,70 +90,70 @@ let t = class extends y {
|
|
|
90
90
|
"c-link--underline-reversed": this.underline === "reversed",
|
|
91
91
|
"c-link--bold": this.isBold,
|
|
92
92
|
"c-link--standalone": this.isStandalone,
|
|
93
|
-
"
|
|
93
|
+
"has-visited": this.hasVisited
|
|
94
94
|
};
|
|
95
95
|
return this.tag === "button" ? this.renderButton(l) : this.renderAnchor(l);
|
|
96
96
|
}
|
|
97
97
|
};
|
|
98
98
|
t.styles = m(z);
|
|
99
|
-
|
|
99
|
+
n([
|
|
100
100
|
i({ type: String }),
|
|
101
|
-
a(c, P,
|
|
101
|
+
a(c, P, e.tag)
|
|
102
102
|
], t.prototype, "tag", 2);
|
|
103
|
-
|
|
103
|
+
n([
|
|
104
104
|
i({ type: String }),
|
|
105
|
-
a(c, w,
|
|
105
|
+
a(c, w, e.variant)
|
|
106
106
|
], t.prototype, "variant", 2);
|
|
107
|
-
|
|
107
|
+
n([
|
|
108
108
|
i({ type: String }),
|
|
109
|
-
a(c, S,
|
|
109
|
+
a(c, S, e.size)
|
|
110
110
|
], t.prototype, "size", 2);
|
|
111
|
-
|
|
111
|
+
n([
|
|
112
112
|
i({ type: String }),
|
|
113
|
-
a(c,
|
|
113
|
+
a(c, C, e.underline)
|
|
114
114
|
], t.prototype, "underline", 2);
|
|
115
|
-
|
|
115
|
+
n([
|
|
116
116
|
i({ type: String }),
|
|
117
|
-
a(c, $,
|
|
117
|
+
a(c, $, e.iconPlacement)
|
|
118
118
|
], t.prototype, "iconPlacement", 2);
|
|
119
|
-
|
|
119
|
+
n([
|
|
120
120
|
i({ type: String, reflect: !0 })
|
|
121
121
|
], t.prototype, "href", 2);
|
|
122
|
-
|
|
122
|
+
n([
|
|
123
123
|
i({ type: String, reflect: !0 })
|
|
124
124
|
], t.prototype, "target", 2);
|
|
125
|
-
|
|
125
|
+
n([
|
|
126
126
|
i({ type: String, reflect: !0 })
|
|
127
127
|
], t.prototype, "rel", 2);
|
|
128
|
-
|
|
128
|
+
n([
|
|
129
129
|
i({ type: String })
|
|
130
130
|
], t.prototype, "download", 2);
|
|
131
|
-
|
|
131
|
+
n([
|
|
132
132
|
i({ type: Boolean })
|
|
133
133
|
], t.prototype, "isBold", 2);
|
|
134
|
-
|
|
134
|
+
n([
|
|
135
135
|
i({ type: Boolean, reflect: !0 })
|
|
136
136
|
], t.prototype, "isStandalone", 2);
|
|
137
|
-
|
|
137
|
+
n([
|
|
138
138
|
i({ type: Boolean })
|
|
139
139
|
], t.prototype, "hasVisited", 2);
|
|
140
|
-
|
|
140
|
+
n([
|
|
141
141
|
i({ type: String }),
|
|
142
|
-
a(c, B,
|
|
142
|
+
a(c, B, e.type)
|
|
143
143
|
], t.prototype, "type", 2);
|
|
144
|
-
|
|
144
|
+
n([
|
|
145
145
|
i({ type: Object })
|
|
146
146
|
], t.prototype, "aria", 2);
|
|
147
|
-
t =
|
|
147
|
+
t = n([
|
|
148
148
|
x("pie-link")
|
|
149
149
|
], t);
|
|
150
150
|
export {
|
|
151
151
|
t as PieLink,
|
|
152
152
|
B as buttonTypes,
|
|
153
|
-
|
|
153
|
+
e as defaultProps,
|
|
154
154
|
$ as iconPlacements,
|
|
155
155
|
S as sizes,
|
|
156
156
|
P as tags,
|
|
157
|
-
|
|
157
|
+
C as underlineTypes,
|
|
158
158
|
w as variants
|
|
159
159
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@justeattakeaway/pie-link",
|
|
3
3
|
"description": "PIE Design System Link built using Web Components",
|
|
4
|
-
"version": "1.3.
|
|
4
|
+
"version": "1.3.22",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/justeattakeaway/pie",
|
|
@@ -45,14 +45,14 @@
|
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@custom-elements-manifest/analyzer": "0.9.0",
|
|
47
47
|
"@justeattakeaway/pie-components-config": "0.21.0",
|
|
48
|
-
"@justeattakeaway/pie-css": "
|
|
49
|
-
"@justeattakeaway/pie-monorepo-utils": "0.
|
|
50
|
-
"@justeattakeaway/pie-wrapper-react": "0.14.
|
|
48
|
+
"@justeattakeaway/pie-css": "1.1.0",
|
|
49
|
+
"@justeattakeaway/pie-monorepo-utils": "0.8.0",
|
|
50
|
+
"@justeattakeaway/pie-wrapper-react": "0.14.4",
|
|
51
51
|
"cem-plugin-module-file-extensions": "0.0.5"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@justeattakeaway/pie-icons-webc": "1.21.
|
|
55
|
-
"@justeattakeaway/pie-webc-core": "
|
|
54
|
+
"@justeattakeaway/pie-icons-webc": "1.21.3",
|
|
55
|
+
"@justeattakeaway/pie-webc-core": "14.0.0"
|
|
56
56
|
},
|
|
57
57
|
"volta": {
|
|
58
58
|
"extends": "../../../package.json"
|
package/src/index.ts
CHANGED
|
@@ -139,7 +139,7 @@ export class PieLink extends PieElement implements LinkProps {
|
|
|
139
139
|
'c-link--underline-reversed': this.underline === 'reversed',
|
|
140
140
|
'c-link--bold': this.isBold,
|
|
141
141
|
'c-link--standalone': this.isStandalone,
|
|
142
|
-
'
|
|
142
|
+
'has-visited': this.hasVisited,
|
|
143
143
|
};
|
|
144
144
|
|
|
145
145
|
if (this.tag === 'button') {
|