@justeattakeaway/pie-link 0.15.3 → 0.16.0
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 +4 -4
- package/package.json +5 -4
- package/src/link.scss +1 -1
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { unsafeCSS as
|
|
1
|
+
import { unsafeCSS as f, LitElement as v, html as d, nothing as s } from "lit";
|
|
2
2
|
import { property as i } from "lit/decorators.js";
|
|
3
3
|
import { validPropertyValues as a, defineCustomElement as k } from "@justeattakeaway/pie-webc-core";
|
|
4
|
-
const g =
|
|
4
|
+
const g = `*,*:after,*:before{box-sizing:inherit}.c-link{--link-font-family: var(--dt-font-interactive-l-family);--link-font-size: calc(var(--dt-font-size-16) * 1px);--link-line-height: calc(var(--dt-font-size-16-line-height) * 1px);--link-font-weight: var(--dt-font-weight-regular);--link-text-color: var(--dt-color-content-link);--link-text-decoration: var(--dt-font-style-underline);--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[tag=button]{outline:none;border:none;-webkit-user-select:none;user-select:none;background:transparent;padding:0}.c-link[variant=high-visibility]{--link-text-color: var(--dt-color-content-link-distinct)}.c-link[variant=inverse]{--link-text-color: var(--dt-color-content-link-inverse)}.c-link[size=small]{--link-font-size: calc(var(--dt-font-size-14) * 1px);--link-line-height: calc(var(--dt-font-size-14-line-height) * 1px);--link-icon-offset-top: 2px}.c-link[underline=reversed][isStandalone]{--link-text-decoration: none}.c-link[underline=reversed][isStandalone]:hover,.c-link[underline=reversed][isStandalone]:active{--link-text-decoration: var(--dt-font-style-underline)}.c-link[isBold]{--link-font-weight: var(--dt-font-weight-bold)}.c-link[isStandalone]{display:block;width:fit-content}.c-link[hasVisited]:visited{color:var(--dt-color-content-link-visited)}.c-link[hasVisited]:visited[variant=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)}.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)}
|
|
5
5
|
`, y = ["default", "high-visibility", "inverse"], m = ["small", "medium"], b = ["leading", "trailing"], x = ["a", "button"], $ = ["submit", "button", "reset", "menu"], S = ["default", "reversed"];
|
|
6
6
|
var z = Object.defineProperty, B = Object.getOwnPropertyDescriptor, n = (p, e, r, c) => {
|
|
7
7
|
for (var o = c > 1 ? void 0 : c ? B(e, r) : e, h = p.length - 1, u; h >= 0; h--)
|
|
@@ -9,7 +9,7 @@ var z = Object.defineProperty, B = Object.getOwnPropertyDescriptor, n = (p, e, r
|
|
|
9
9
|
return c && o && z(e, r, o), o;
|
|
10
10
|
};
|
|
11
11
|
const l = "pie-link";
|
|
12
|
-
class t extends
|
|
12
|
+
class t extends v {
|
|
13
13
|
constructor() {
|
|
14
14
|
super(...arguments), this.tag = "a", this.variant = "default", this.size = "medium", this.underline = "default", this.iconPlacement = "leading", this.isBold = !1, this.isStandalone = !1, this.hasVisited = !1, this.type = "submit";
|
|
15
15
|
}
|
|
@@ -79,7 +79,7 @@ class t extends f {
|
|
|
79
79
|
return this.tag === "button" ? this.renderButton() : this.renderAnchor();
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
|
-
t.styles =
|
|
82
|
+
t.styles = f(g);
|
|
83
83
|
n([
|
|
84
84
|
i(),
|
|
85
85
|
a(l, x, "a")
|
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": "0.
|
|
4
|
+
"version": "0.16.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
"watch": "run -T vite build --watch",
|
|
24
24
|
"test": "echo \"Error: no test specified\" && exit 0",
|
|
25
25
|
"test:ci": "yarn test",
|
|
26
|
+
"test:browsers-setup": "npx playwright-lit-setup",
|
|
26
27
|
"test:browsers": "npx playwright test -c ./playwright-lit.config.ts",
|
|
27
28
|
"test:browsers:ci": "yarn test:browsers",
|
|
28
29
|
"test:visual": "run -T cross-env-shell PERCY_TOKEN=${PERCY_TOKEN_PIE_LINK} percy exec --allowed-hostname cloudfront.net -- npx playwright test -c ./playwright-lit-visual.config.ts",
|
|
@@ -32,13 +33,13 @@
|
|
|
32
33
|
"license": "Apache-2.0",
|
|
33
34
|
"devDependencies": {
|
|
34
35
|
"@custom-elements-manifest/analyzer": "0.9.0",
|
|
35
|
-
"@justeattakeaway/pie-components-config": "0.
|
|
36
|
-
"@justeattakeaway/pie-icons-webc": "0.
|
|
36
|
+
"@justeattakeaway/pie-components-config": "0.13.0",
|
|
37
|
+
"@justeattakeaway/pie-icons-webc": "0.19.1",
|
|
37
38
|
"@justeattakeaway/pie-wrapper-react": "0.14.0",
|
|
38
39
|
"cem-plugin-module-file-extensions": "0.0.5"
|
|
39
40
|
},
|
|
40
41
|
"dependencies": {
|
|
41
|
-
"@justeattakeaway/pie-webc-core": "0.19.
|
|
42
|
+
"@justeattakeaway/pie-webc-core": "0.19.1"
|
|
42
43
|
},
|
|
43
44
|
"volta": {
|
|
44
45
|
"extends": "../../../package.json"
|
package/src/link.scss
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
.c-link {
|
|
16
|
-
--link-font-family: var(--dt-font-interactive-
|
|
16
|
+
--link-font-family: var(--dt-font-interactive-l-family);
|
|
17
17
|
--link-font-size: #{p.font-size(--dt-font-size-16)};
|
|
18
18
|
--link-line-height: calc(var(--dt-font-size-16-line-height) * 1px);
|
|
19
19
|
--link-font-weight: var(--dt-font-weight-regular);
|