@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 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.20";
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.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)}", w = ["default", "high-visibility", "inverse"], S = ["small", "medium"], $ = ["leading", "trailing"], P = ["a", "button"], B = ["submit", "button", "reset", "menu"], V = ["default", "reversed"], n = {
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 C = Object.defineProperty, O = Object.getOwnPropertyDescriptor, e = (l, o, h, p) => {
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 && C(o, h, r), 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 = 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;
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
- "c-link--hasVisited": this.hasVisited
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
- e([
99
+ n([
100
100
  i({ type: String }),
101
- a(c, P, n.tag)
101
+ a(c, P, e.tag)
102
102
  ], t.prototype, "tag", 2);
103
- e([
103
+ n([
104
104
  i({ type: String }),
105
- a(c, w, n.variant)
105
+ a(c, w, e.variant)
106
106
  ], t.prototype, "variant", 2);
107
- e([
107
+ n([
108
108
  i({ type: String }),
109
- a(c, S, n.size)
109
+ a(c, S, e.size)
110
110
  ], t.prototype, "size", 2);
111
- e([
111
+ n([
112
112
  i({ type: String }),
113
- a(c, V, n.underline)
113
+ a(c, C, e.underline)
114
114
  ], t.prototype, "underline", 2);
115
- e([
115
+ n([
116
116
  i({ type: String }),
117
- a(c, $, n.iconPlacement)
117
+ a(c, $, e.iconPlacement)
118
118
  ], t.prototype, "iconPlacement", 2);
119
- e([
119
+ n([
120
120
  i({ type: String, reflect: !0 })
121
121
  ], t.prototype, "href", 2);
122
- e([
122
+ n([
123
123
  i({ type: String, reflect: !0 })
124
124
  ], t.prototype, "target", 2);
125
- e([
125
+ n([
126
126
  i({ type: String, reflect: !0 })
127
127
  ], t.prototype, "rel", 2);
128
- e([
128
+ n([
129
129
  i({ type: String })
130
130
  ], t.prototype, "download", 2);
131
- e([
131
+ n([
132
132
  i({ type: Boolean })
133
133
  ], t.prototype, "isBold", 2);
134
- e([
134
+ n([
135
135
  i({ type: Boolean, reflect: !0 })
136
136
  ], t.prototype, "isStandalone", 2);
137
- e([
137
+ n([
138
138
  i({ type: Boolean })
139
139
  ], t.prototype, "hasVisited", 2);
140
- e([
140
+ n([
141
141
  i({ type: String }),
142
- a(c, B, n.type)
142
+ a(c, B, e.type)
143
143
  ], t.prototype, "type", 2);
144
- e([
144
+ n([
145
145
  i({ type: Object })
146
146
  ], t.prototype, "aria", 2);
147
- t = e([
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
- n as defaultProps,
153
+ e as defaultProps,
154
154
  $ as iconPlacements,
155
155
  S as sizes,
156
156
  P as tags,
157
- V as underlineTypes,
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.20",
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": "0.32.0",
49
- "@justeattakeaway/pie-monorepo-utils": "0.7.0",
50
- "@justeattakeaway/pie-wrapper-react": "0.14.3",
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.1",
55
- "@justeattakeaway/pie-webc-core": "12.0.0"
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
- 'c-link--hasVisited': this.hasVisited,
142
+ 'has-visited': this.hasVisited,
143
143
  };
144
144
 
145
145
  if (this.tag === 'button') {
package/src/link.scss CHANGED
@@ -88,7 +88,7 @@
88
88
  width: fit-content;
89
89
  }
90
90
 
91
- &.c-link--hasVisited:visited {
91
+ &.has-visited:visited {
92
92
  color: var(--dt-color-content-link-visited);
93
93
 
94
94
  &.c-link--inverse {