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