@justeattakeaway/pie-notification 0.1.1 → 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/index.d.ts CHANGED
File without changes
package/dist/index.js CHANGED
File without changes
package/dist/react.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import type { CSSResult } from 'lit';
2
2
  import type { LitElement } from 'lit';
3
- import type { ReactWebComponent } from '@lit-labs/react';
3
+ import type { ReactWebComponent } from '@lit/react';
4
4
  import type { TemplateResult } from 'lit-html';
5
5
 
6
6
  export declare interface NotificationProps {
package/dist/react.js CHANGED
@@ -1,68 +1,14 @@
1
- import * as g from "react";
2
- import { PieNotification as E } 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 b = /* @__PURE__ */ new Set(["children", "localName", "ref", "style", "className"]), w = /* @__PURE__ */ new WeakMap(), M = (t, i, d, m, p) => {
10
- const s = p == null ? void 0 : p[i];
11
- s === void 0 || d === m ? d == null && i in HTMLElement.prototype ? t.removeAttribute(i) : t[i] = d : ((a, o, h) => {
12
- let r = w.get(a);
13
- r === void 0 && w.set(a, r = /* @__PURE__ */ new Map());
14
- let l = r.get(o);
15
- h !== void 0 ? l === void 0 ? (r.set(o, l = { handleEvent: h }), a.addEventListener(o, l)) : l.handleEvent = h : l !== void 0 && (r.delete(o), a.removeEventListener(o, l));
16
- })(t, s, d);
17
- }, P = (t, i) => {
18
- typeof t == "function" ? t(i) : t.current = i;
19
- };
20
- function C(t = window.React, i, d, m, p) {
21
- let s, a, o;
22
- if (i === void 0) {
23
- const c = t;
24
- ({ tagName: a, elementClass: o, events: m, displayName: p } = c), s = c.react;
25
- } else
26
- s = t, o = d, a = i;
27
- const h = s.Component, r = s.createElement, l = new Set(Object.keys(m ?? {}));
28
- class v extends h {
29
- constructor() {
30
- super(...arguments), this.o = null;
31
- }
32
- t(e) {
33
- if (this.o !== null)
34
- for (const u in this.i)
35
- M(this.o, u, this.props[u], e ? e[u] : void 0, m);
36
- }
37
- componentDidMount() {
38
- var e;
39
- this.t(), (e = this.o) === null || e === void 0 || e.removeAttribute("defer-hydration");
40
- }
41
- componentDidUpdate(e) {
42
- this.t(e);
43
- }
44
- render() {
45
- const { _$Gl: e, ...u } = this.props;
46
- this.h !== e && (this.u = (n) => {
47
- e !== null && P(e, n), this.o = n, this.h = e;
48
- }), this.i = {};
49
- const f = { ref: this.u };
50
- for (const [n, N] of Object.entries(u))
51
- b.has(n) ? f[n === "className" ? "class" : n] = N : l.has(n) || n in o.prototype ? this.i[n] = N : f[n] = N;
52
- return f.suppressHydrationWarning = !0, r(a, f);
53
- }
54
- }
55
- v.displayName = p ?? o.name;
56
- const y = s.forwardRef((c, e) => r(v, { ...c, _$Gl: e }, c == null ? void 0 : c.children));
57
- return y.displayName = v.displayName, y;
58
- }
59
- const $ = C({
5
+ const n = t({
60
6
  displayName: "PieNotification",
61
- elementClass: E,
62
- react: g,
7
+ elementClass: o,
8
+ react: i,
63
9
  tagName: "pie-notification",
64
10
  events: {}
65
11
  });
66
12
  export {
67
- $ as PieNotification
13
+ n as PieNotification
68
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.1",
4
+ "version": "0.1.2",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
@@ -28,10 +28,10 @@
28
28
  "author": "Just Eat Takeaway.com - Design System Team",
29
29
  "license": "Apache-2.0",
30
30
  "devDependencies": {
31
- "@justeattakeaway/pie-components-config": "0.4.0"
31
+ "@justeattakeaway/pie-components-config": "0.6.0"
32
32
  },
33
33
  "dependencies": {
34
- "@justeattakeaway/pie-webc-core": "0.11.0"
34
+ "@justeattakeaway/pie-webc-core": "0.12.0"
35
35
  },
36
36
  "volta": {
37
37
  "extends": "../../../package.json"