@justeattakeaway/pie-form-label 0.8.1 → 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/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';
5
5
 
6
6
  export declare interface FormLabelProps {
package/dist/react.js CHANGED
@@ -1,69 +1,15 @@
1
- import * as w from "react";
2
- import { PieFormLabel as L } 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 g = /* @__PURE__ */ new Set(["children", "localName", "ref", "style", "className"]), b = /* @__PURE__ */ new WeakMap(), E = (t, o, c, d, p) => {
11
- const n = p == null ? void 0 : p[o];
12
- n === void 0 || c === d ? c == null && o in HTMLElement.prototype ? t.removeAttribute(o) : t[o] = c : ((r, i, h) => {
13
- let a = b.get(r);
14
- a === void 0 && b.set(r, a = /* @__PURE__ */ new Map());
15
- let l = a.get(i);
16
- h !== void 0 ? l === void 0 ? (a.set(i, l = { handleEvent: h }), r.addEventListener(i, l)) : l.handleEvent = h : l !== void 0 && (a.delete(i), r.removeEventListener(i, l));
17
- })(t, n, c);
18
- }, F = (t, o) => {
19
- typeof t == "function" ? t(o) : t.current = o;
20
- };
21
- function M(t = window.React, o, c, d, p) {
22
- let n, r, i;
23
- if (o === void 0) {
24
- const m = t;
25
- ({ tagName: r, elementClass: i, events: d, displayName: p } = m), n = m.react;
26
- } else
27
- n = t, i = c, r = o;
28
- const h = n.Component, a = n.createElement, l = new Set(Object.keys(d ?? {}));
29
- class f extends h {
30
- constructor() {
31
- super(...arguments), this.o = null;
32
- }
33
- t(e) {
34
- if (this.o !== null)
35
- for (const u in this.i)
36
- E(this.o, u, this.props[u], e ? e[u] : void 0, d);
37
- }
38
- componentDidMount() {
39
- var e;
40
- this.t(), (e = this.o) === null || e === void 0 || e.removeAttribute("defer-hydration");
41
- }
42
- componentDidUpdate(e) {
43
- this.t(e);
44
- }
45
- render() {
46
- const { _$Gl: e, ...u } = this.props;
47
- this.h !== e && (this.u = (s) => {
48
- e !== null && F(e, s), this.o = s, this.h = e;
49
- }), this.i = {};
50
- const v = { ref: this.u };
51
- for (const [s, y] of Object.entries(u))
52
- g.has(s) ? v[s === "className" ? "class" : s] = y : l.has(s) || s in i.prototype ? this.i[s] = y : v[s] = y;
53
- return v.suppressHydrationWarning = !0, a(r, v);
54
- }
55
- }
56
- f.displayName = p ?? i.name;
57
- const N = n.forwardRef((m, e) => a(f, { ...m, _$Gl: e }, m == null ? void 0 : m.children));
58
- return N.displayName = f.displayName, N;
59
- }
60
- const $ = M({
6
+ const l = m({
61
7
  displayName: "PieFormLabel",
62
- elementClass: L,
63
- react: w,
8
+ elementClass: o,
9
+ react: e,
64
10
  tagName: "pie-form-label",
65
11
  events: {}
66
12
  });
67
13
  export {
68
- $ as PieFormLabel
14
+ l as PieFormLabel
69
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.1",
4
+ "version": "0.8.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"