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