@justeattakeaway/pie-link 0.11.2-next.0 → 0.11.2

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.
Files changed (3) hide show
  1. package/README.md +1 -1
  2. package/dist/react.js +14 -45
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -55,7 +55,7 @@ import '@justeattakeaway/pie-link';
55
55
  ```js
56
56
  // React
57
57
  // For React, you will need to import our React-specific component build
58
- // which wraps the web component using @lit-labs/react
58
+ // which wraps the web component using ​@lit/react
59
59
  import { PieLink } from '@justeattakeaway/pie-link/dist/react';
60
60
  ```
61
61
 
package/dist/react.js CHANGED
@@ -1,53 +1,22 @@
1
- import * as y from "react";
2
- import { PieLink as L } from "./index.js";
3
- import { buttonTypes as C, iconPlacements as M, sizes as T, tags as j, underlineTypes as x, variants as A } from "./index.js";
1
+ import * as e from "react";
2
+ import { createComponent as i } from "@lit/react";
3
+ import { PieLink as t } from "./index.js";
4
+ import { buttonTypes as c, iconPlacements as l, sizes as k, tags as P, underlineTypes as f, variants as L } from "./index.js";
4
5
  import "lit";
5
6
  import "lit/decorators.js";
6
- /**
7
- * @license
8
- * Copyright 2018 Google LLC
9
- * SPDX-License-Identifier: BSD-3-Clause
10
- */
11
- const k = /* @__PURE__ */ new Set(["children", "localName", "ref", "style", "className"]), v = /* @__PURE__ */ new WeakMap(), E = (t, c, o, u, l) => {
12
- const m = l == null ? void 0 : l[c];
13
- m === void 0 || o === u ? (t[c] = o, o == null && c in HTMLElement.prototype && t.removeAttribute(c)) : ((i, r, s) => {
14
- let a = v.get(i);
15
- a === void 0 && v.set(i, a = /* @__PURE__ */ new Map());
16
- let n = a.get(r);
17
- s !== void 0 ? n === void 0 ? (a.set(r, n = { handleEvent: s }), i.addEventListener(r, n)) : n.handleEvent = s : n !== void 0 && (a.delete(r), i.removeEventListener(r, n));
18
- })(t, m, o);
19
- }, N = ({ react: t, tagName: c, elementClass: o, events: u, displayName: l }) => {
20
- const m = new Set(Object.keys(u ?? {})), i = t.forwardRef((r, s) => {
21
- const a = t.useRef(null), n = t.useRef(null), d = {}, p = {};
22
- for (const [e, f] of Object.entries(r))
23
- k.has(e) ? d[e === "className" ? "class" : e] = f : m.has(e) || e in o.prototype ? p[e] = f : d[e] = f;
24
- return t.useLayoutEffect(() => {
25
- if (n.current !== null) {
26
- for (const e in p)
27
- E(n.current, e, r[e], a.current ? a.current[e] : void 0, u);
28
- a.current = r;
29
- }
30
- }), t.useLayoutEffect(() => {
31
- var e;
32
- (e = n.current) == null || e.removeAttribute("defer-hydration");
33
- }, []), d.suppressHydrationWarning = !0, t.createElement(c, { ...d, ref: t.useCallback((e) => {
34
- n.current = e, typeof s == "function" ? s(e) : s !== null && (s.current = e);
35
- }, [s]) });
36
- });
37
- return i.displayName = l ?? o.name, i;
38
- }, w = N({
7
+ const m = i({
39
8
  displayName: "PieLink",
40
- elementClass: L,
41
- react: y,
9
+ elementClass: t,
10
+ react: e,
42
11
  tagName: "pie-link",
43
12
  events: {}
44
13
  });
45
14
  export {
46
- w as PieLink,
47
- C as buttonTypes,
48
- M as iconPlacements,
49
- T as sizes,
50
- j as tags,
51
- x as underlineTypes,
52
- A as variants
15
+ m as PieLink,
16
+ c as buttonTypes,
17
+ l as iconPlacements,
18
+ k as sizes,
19
+ P as tags,
20
+ f as underlineTypes,
21
+ L as variants
53
22
  };
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.11.2-next.0",
4
+ "version": "0.11.2",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
@@ -31,7 +31,7 @@
31
31
  "@justeattakeaway/pie-components-config": "0.6.0"
32
32
  },
33
33
  "dependencies": {
34
- "@justeattakeaway/pie-webc-core": "0.12.0-next.0"
34
+ "@justeattakeaway/pie-webc-core": "0.12.0"
35
35
  },
36
36
  "volta": {
37
37
  "extends": "../../../package.json"