@justeattakeaway/pie-link 0.4.0 → 0.5.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 CHANGED
@@ -1,6 +1,5 @@
1
1
  import { unsafeCSS as g, LitElement as k, html as u, nothing as s } from "lit";
2
2
  import { property as i } from "lit/decorators.js";
3
- import "lit/decorators/property.js";
4
3
  const d = (h, t, c) => function(o, r) {
5
4
  const l = `#${r}`;
6
5
  Object.defineProperty(o, r, {
package/dist/react.js CHANGED
@@ -1,30 +1,29 @@
1
1
  import * as L from "react";
2
2
  import { PieLink as g } from "./index.js";
3
- import { buttonTypes as D, iconPlacements as G, sizes as O, tags as S, underlineTypes as _, variants as z } from "./index.js";
3
+ import { buttonTypes as j, iconPlacements as D, sizes as G, tags as O, underlineTypes as S, variants as _ } from "./index.js";
4
4
  import "lit";
5
5
  import "lit/decorators.js";
6
- import "lit/decorators/property.js";
7
6
  /**
8
7
  * @license
9
8
  * Copyright 2018 Google LLC
10
9
  * SPDX-License-Identifier: BSD-3-Clause
11
10
  */
12
- const E = /* @__PURE__ */ new Set(["children", "localName", "ref", "style", "className"]), w = /* @__PURE__ */ new WeakMap(), P = (p, l, d, m, h) => {
11
+ const E = /* @__PURE__ */ new Set(["children", "localName", "ref", "style", "className"]), w = /* @__PURE__ */ new WeakMap(), P = (d, l, p, m, h) => {
13
12
  const n = h == null ? void 0 : h[l];
14
- n === void 0 || d === m ? d == null && l in HTMLElement.prototype ? p.removeAttribute(l) : p[l] = d : ((s, t, u) => {
13
+ n === void 0 || p === m ? p == null && l in HTMLElement.prototype ? d.removeAttribute(l) : d[l] = p : ((s, t, u) => {
15
14
  let o = w.get(s);
16
15
  o === void 0 && w.set(s, o = /* @__PURE__ */ new Map());
17
16
  let a = o.get(t);
18
17
  u !== void 0 ? a === void 0 ? (o.set(t, a = { handleEvent: u }), s.addEventListener(t, a)) : a.handleEvent = u : a !== void 0 && (o.delete(t), s.removeEventListener(t, a));
19
- })(p, n, d);
18
+ })(d, n, p);
20
19
  };
21
- function b(p = window.React, l, d, m, h) {
20
+ function b(d = window.React, l, p, m, h) {
22
21
  let n, s, t;
23
22
  if (l === void 0) {
24
- const r = p;
23
+ const r = d;
25
24
  ({ tagName: s, elementClass: t, events: m, displayName: h } = r), n = r.react;
26
25
  } else
27
- n = p, t = d, s = l;
26
+ n = d, t = p, s = l;
28
27
  const u = n.Component, o = n.createElement, a = new Set(Object.keys(m ?? {}));
29
28
  class f extends u {
30
29
  constructor() {
@@ -58,7 +57,7 @@ function b(p = window.React, l, d, m, h) {
58
57
  const N = n.forwardRef((r, e) => o(f, { ...r, _$Gl: e }, r == null ? void 0 : r.children));
59
58
  return N.displayName = f.displayName, N;
60
59
  }
61
- const T = b({
60
+ const R = b({
62
61
  displayName: "PieLink",
63
62
  elementClass: g,
64
63
  react: L,
@@ -66,11 +65,11 @@ const T = b({
66
65
  events: {}
67
66
  });
68
67
  export {
69
- T as PieLink,
70
- D as buttonTypes,
71
- G as iconPlacements,
72
- O as sizes,
73
- S as tags,
74
- _ as underlineTypes,
75
- z as variants
68
+ R as PieLink,
69
+ j as buttonTypes,
70
+ D as iconPlacements,
71
+ G as sizes,
72
+ O as tags,
73
+ S as underlineTypes,
74
+ _ as variants
76
75
  };
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.0",
4
+ "version": "0.5.0",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
package/src/index.ts CHANGED
@@ -5,8 +5,14 @@ import { property } from 'lit/decorators.js';
5
5
  import { validPropertyValues } from '@justeattakeaway/pie-webc-core';
6
6
  import styles from './link.scss?inline';
7
7
  import {
8
- LinkProps, variants, sizes, iconPlacements,
9
- tags, buttonTypes, underlineTypes, type AriaProps,
8
+ LinkProps,
9
+ variants,
10
+ sizes,
11
+ iconPlacements,
12
+ tags,
13
+ buttonTypes,
14
+ underlineTypes,
15
+ type AriaProps,
10
16
  } from './defs';
11
17
 
12
18
  // Valid values available to consumers