@justeattakeaway/pie-notification 0.1.2-next.0 → 0.1.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.
package/README.md CHANGED
@@ -55,7 +55,7 @@ import '@justeattakeaway/pie-notification';
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 { PieNotification } from '@justeattakeaway/pie-notification/dist/react';
60
60
  ```
61
61
 
package/dist/react.js CHANGED
@@ -1,45 +1,14 @@
1
- import * as y from "react";
2
- import { PieNotification as N } from "./index.js";
1
+ import * as i from "react";
2
+ import { createComponent as t } from "@lit/react";
3
+ import { PieNotification as o } from "./index.js";
3
4
  import "lit";
4
- /**
5
- * @license
6
- * Copyright 2018 Google LLC
7
- * SPDX-License-Identifier: BSD-3-Clause
8
- */
9
- const E = /* @__PURE__ */ new Set(["children", "localName", "ref", "style", "className"]), v = /* @__PURE__ */ new WeakMap(), h = (t, c, i, u, l) => {
10
- const f = l == null ? void 0 : l[c];
11
- f === void 0 || i === u ? (t[c] = i, i == null && c in HTMLElement.prototype && t.removeAttribute(c)) : ((s, r, o) => {
12
- let a = v.get(s);
13
- a === void 0 && v.set(s, a = /* @__PURE__ */ new Map());
14
- let n = a.get(r);
15
- o !== void 0 ? n === void 0 ? (a.set(r, n = { handleEvent: o }), s.addEventListener(r, n)) : n.handleEvent = o : n !== void 0 && (a.delete(r), s.removeEventListener(r, n));
16
- })(t, f, i);
17
- }, b = ({ react: t, tagName: c, elementClass: i, events: u, displayName: l }) => {
18
- const f = new Set(Object.keys(u ?? {})), s = t.forwardRef((r, o) => {
19
- const a = t.useRef(null), n = t.useRef(null), m = {}, p = {};
20
- for (const [e, d] of Object.entries(r))
21
- E.has(e) ? m[e === "className" ? "class" : e] = d : f.has(e) || e in i.prototype ? p[e] = d : m[e] = d;
22
- return t.useLayoutEffect(() => {
23
- if (n.current !== null) {
24
- for (const e in p)
25
- h(n.current, e, r[e], a.current ? a.current[e] : void 0, u);
26
- a.current = r;
27
- }
28
- }), t.useLayoutEffect(() => {
29
- var e;
30
- (e = n.current) == null || e.removeAttribute("defer-hydration");
31
- }, []), m.suppressHydrationWarning = !0, t.createElement(c, { ...m, ref: t.useCallback((e) => {
32
- n.current = e, typeof o == "function" ? o(e) : o !== null && (o.current = e);
33
- }, [o]) });
34
- });
35
- return s.displayName = l ?? i.name, s;
36
- }, L = b({
5
+ const n = t({
37
6
  displayName: "PieNotification",
38
- elementClass: N,
39
- react: y,
7
+ elementClass: o,
8
+ react: i,
40
9
  tagName: "pie-notification",
41
10
  events: {}
42
11
  });
43
12
  export {
44
- L as PieNotification
13
+ n as PieNotification
45
14
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@justeattakeaway/pie-notification",
3
3
  "description": "PIE Design System Notification built using Web Components",
4
- "version": "0.1.2-next.0",
4
+ "version": "0.1.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"