@justeattakeaway/pie-link 1.1.0 → 1.1.1

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 CHANGED
@@ -1,20 +1,20 @@
1
- import { LitElement as m, html as h, nothing as u, unsafeCSS as b } from "lit";
2
- import { property as r } from "lit/decorators.js";
3
- import { classMap as v } from "lit/directives/class-map.js";
4
- import { ifDefined as f } from "lit/directives/if-defined.js";
1
+ import { LitElement as m, nothing as v, html as h, unsafeCSS as b } from "lit";
2
+ import { property as o } from "lit/decorators.js";
3
+ import { classMap as u } from "lit/directives/class-map.js";
4
+ import { ifDefined as k } from "lit/directives/if-defined.js";
5
5
  import { validPropertyValues as d, defineCustomElement as x } from "@justeattakeaway/pie-webc-core";
6
6
  var z = Object.defineProperty, S = (c, e, i, g) => {
7
- for (var o = void 0, s = c.length - 1, p; s >= 0; s--)
8
- (p = c[s]) && (o = p(e, i, o) || o);
9
- return o && z(e, i, o), o;
7
+ for (var r = void 0, s = c.length - 1, p; s >= 0; s--)
8
+ (p = c[s]) && (r = p(e, i, r) || r);
9
+ return r && z(e, i, r), r;
10
10
  };
11
11
  class y extends m {
12
12
  constructor() {
13
- super(...arguments), this.v = "1.1.0";
13
+ super(...arguments), this.v = "1.1.1";
14
14
  }
15
15
  }
16
16
  S([
17
- r({ type: String, reflect: !0 })
17
+ o({ type: String, reflect: !0 })
18
18
  ], y.prototype, "v");
19
19
  const $ = "*,*: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.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-size-14) * 1px);--link-line-height: calc(var(--dt-font-size-14-line-height) * 1px);--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-style-underline)}.c-link.c-link--bold{--link-font-weight: var(--dt-font-weight-bold)}.c-link.c-link--standalone{display:block;width:fit-content}.c-link.c-link--hasVisited:visited{color:var(--dt-color-content-link-visited)}.c-link.c-link--hasVisited: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)}", P = ["default", "high-visibility", "inverse"], w = ["small", "medium"], B = ["leading", "trailing"], V = ["a", "button"], C = ["submit", "button", "reset", "menu"], _ = ["default", "reversed"], n = {
20
20
  tag: "a",
@@ -28,11 +28,11 @@ const $ = "*,*:after,*:before{box-sizing:inherit}.c-link{--link-font-family: var
28
28
  type: "submit"
29
29
  };
30
30
  var j = Object.defineProperty, l = (c, e, i, g) => {
31
- for (var o = void 0, s = c.length - 1, p; s >= 0; s--)
32
- (p = c[s]) && (o = p(e, i, o) || o);
33
- return o && j(e, i, o), o;
31
+ for (var r = void 0, s = c.length - 1, p; s >= 0; s--)
32
+ (p = c[s]) && (r = p(e, i, r) || r);
33
+ return r && j(e, i, r), r;
34
34
  };
35
- const a = "pie-link", k = class k extends y {
35
+ const a = "pie-link", f = class f extends y {
36
36
  constructor() {
37
37
  super(...arguments), this.tag = n.tag, this.variant = n.variant, this.size = n.size, this.underline = n.underline, this.iconPlacement = n.iconPlacement, this.isBold = n.isBold, this.isStandalone = n.isStandalone, this.hasVisited = n.hasVisited, this.type = n.type;
38
38
  }
@@ -45,9 +45,9 @@ const a = "pie-link", k = class k extends y {
45
45
  const { iconPlacement: e, isStandalone: i } = this;
46
46
  return h`
47
47
  <span class="c-link-content">
48
- ${i && e === "leading" ? h`<slot name="icon"></slot>` : u}
48
+ ${i && e === "leading" ? h`<slot name="icon"></slot>` : v}
49
49
  <slot></slot>
50
- ${i && e === "trailing" ? h`<slot name="icon"></slot>` : u}
50
+ ${i && e === "trailing" ? h`<slot name="icon"></slot>` : v}
51
51
  </span>`;
52
52
  }
53
53
  /**
@@ -60,9 +60,9 @@ const a = "pie-link", k = class k extends y {
60
60
  return h`
61
61
  <button
62
62
  data-test-id="pie-link-button"
63
- class="${v(e)}"
63
+ class="${u(e)}"
64
64
  type=${this.type}
65
- aria-label=${f((i = this.aria) == null ? void 0 : i.label)}>
65
+ aria-label=${k((i = this.aria) == null ? void 0 : i.label)}>
66
66
  ${this.renderContent()}
67
67
  </button>`;
68
68
  }
@@ -76,11 +76,11 @@ const a = "pie-link", k = class k extends y {
76
76
  return h`
77
77
  <a
78
78
  data-test-id="pie-link-anchor"
79
- class="${v(e)}"
80
- href=${f(this.href)}
81
- target=${f(this.target)}
82
- rel=${f(this.rel)}
83
- aria-label=${f((i = this.aria) == null ? void 0 : i.label)}>
79
+ class="${u(e)}"
80
+ href=${k(this.href)}
81
+ target=${k(this.target)}
82
+ rel=${k(this.rel)}
83
+ aria-label=${k((i = this.aria) == null ? void 0 : i.label)}>
84
84
  ${this.renderContent()}
85
85
  </a>`;
86
86
  }
@@ -97,52 +97,52 @@ const a = "pie-link", k = class k extends y {
97
97
  return this.tag === "button" ? this.renderButton(e) : this.renderAnchor(e);
98
98
  }
99
99
  };
100
- k.styles = b($);
101
- let t = k;
100
+ f.styles = b($);
101
+ let t = f;
102
102
  l([
103
- r({ type: String }),
103
+ o({ type: String }),
104
104
  d(a, V, n.tag)
105
105
  ], t.prototype, "tag");
106
106
  l([
107
- r({ type: String }),
107
+ o({ type: String }),
108
108
  d(a, P, n.variant)
109
109
  ], t.prototype, "variant");
110
110
  l([
111
- r({ type: String }),
111
+ o({ type: String }),
112
112
  d(a, w, n.size)
113
113
  ], t.prototype, "size");
114
114
  l([
115
- r({ type: String }),
115
+ o({ type: String }),
116
116
  d(a, _, n.underline)
117
117
  ], t.prototype, "underline");
118
118
  l([
119
- r({ type: String }),
119
+ o({ type: String }),
120
120
  d(a, B, n.iconPlacement)
121
121
  ], t.prototype, "iconPlacement");
122
122
  l([
123
- r({ type: String, reflect: !0 })
123
+ o({ type: String, reflect: !0 })
124
124
  ], t.prototype, "href");
125
125
  l([
126
- r({ type: String, reflect: !0 })
126
+ o({ type: String, reflect: !0 })
127
127
  ], t.prototype, "target");
128
128
  l([
129
- r({ type: String, reflect: !0 })
129
+ o({ type: String, reflect: !0 })
130
130
  ], t.prototype, "rel");
131
131
  l([
132
- r({ type: Boolean })
132
+ o({ type: Boolean })
133
133
  ], t.prototype, "isBold");
134
134
  l([
135
- r({ type: Boolean })
135
+ o({ type: Boolean })
136
136
  ], t.prototype, "isStandalone");
137
137
  l([
138
- r({ type: Boolean })
138
+ o({ type: Boolean })
139
139
  ], t.prototype, "hasVisited");
140
140
  l([
141
- r({ type: String }),
141
+ o({ type: String }),
142
142
  d(a, C, n.type)
143
143
  ], t.prototype, "type");
144
144
  l([
145
- r({ type: Object })
145
+ o({ type: Object })
146
146
  ], t.prototype, "aria");
147
147
  x(a, t);
148
148
  export {
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.1.0",
4
+ "version": "1.1.1",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/justeattakeaway/pie",
@@ -39,15 +39,15 @@
39
39
  "license": "Apache-2.0",
40
40
  "devDependencies": {
41
41
  "@custom-elements-manifest/analyzer": "0.9.0",
42
- "@justeattakeaway/pie-components-config": "0.19.0",
42
+ "@justeattakeaway/pie-components-config": "0.19.1",
43
43
  "@justeattakeaway/pie-css": "0.16.0",
44
- "@justeattakeaway/pie-icons-webc": "1.6.1",
44
+ "@justeattakeaway/pie-icons-webc": "1.6.2",
45
45
  "@justeattakeaway/pie-monorepo-utils": "0.5.0",
46
46
  "@justeattakeaway/pie-wrapper-react": "0.14.3",
47
47
  "cem-plugin-module-file-extensions": "0.0.5"
48
48
  },
49
49
  "dependencies": {
50
- "@justeattakeaway/pie-webc-core": "0.25.0"
50
+ "@justeattakeaway/pie-webc-core": "0.25.1"
51
51
  },
52
52
  "volta": {
53
53
  "extends": "../../../package.json"
package/declaration.d.ts DELETED
@@ -1,9 +0,0 @@
1
- declare module '*.scss' {
2
- const content: Record<string, string>;
3
- export default content;
4
- }
5
-
6
- declare module '*.scss?inline' {
7
- const content: Record<string, string>;
8
- export default content;
9
- }