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