@justeattakeaway/pie-divider 0.9.2-next.0 → 0.9.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 +10 -41
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -56,7 +56,7 @@ import '@justeattakeaway/pie-divider';
56
56
  ```js
57
57
  // React
58
58
  // For React, you will need to import our React-specific component build
59
- // which wraps the web component using @lit-labs/react
59
+ // which wraps the web component using ​@lit/react
60
60
  import { PieDivider } from '@justeattakeaway/pie-divider/dist/react';
61
61
  ```
62
62
 
package/dist/react.js CHANGED
@@ -1,49 +1,18 @@
1
- import * as y from "react";
2
- import { PieDivider as E } from "./index.js";
3
- import { orientations as k, variants as C } from "./index.js";
1
+ import * as e from "react";
2
+ import { createComponent as i } from "@lit/react";
3
+ import { PieDivider as r } from "./index.js";
4
+ import { orientations as d, variants as v } 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"]), p = /* @__PURE__ */ new WeakMap(), h = (t, c, s, u, l) => {
12
- const d = l == null ? void 0 : l[c];
13
- d === void 0 || s === u ? (t[c] = s, s == null && c in HTMLElement.prototype && t.removeAttribute(c)) : ((a, n, i) => {
14
- let o = p.get(a);
15
- o === void 0 && p.set(a, o = /* @__PURE__ */ new Map());
16
- let r = o.get(n);
17
- i !== void 0 ? r === void 0 ? (o.set(n, r = { handleEvent: i }), a.addEventListener(n, r)) : r.handleEvent = i : r !== void 0 && (o.delete(n), a.removeEventListener(n, r));
18
- })(t, d, s);
19
- }, b = ({ react: t, tagName: c, elementClass: s, events: u, displayName: l }) => {
20
- const d = new Set(Object.keys(u ?? {})), a = t.forwardRef((n, i) => {
21
- const o = t.useRef(null), r = t.useRef(null), m = {}, v = {};
22
- for (const [e, f] of Object.entries(n))
23
- N.has(e) ? m[e === "className" ? "class" : e] = f : d.has(e) || e in s.prototype ? v[e] = f : m[e] = f;
24
- return t.useLayoutEffect(() => {
25
- if (r.current !== null) {
26
- for (const e in v)
27
- h(r.current, e, n[e], o.current ? o.current[e] : void 0, u);
28
- o.current = n;
29
- }
30
- }), t.useLayoutEffect(() => {
31
- var e;
32
- (e = r.current) == null || e.removeAttribute("defer-hydration");
33
- }, []), m.suppressHydrationWarning = !0, t.createElement(c, { ...m, ref: t.useCallback((e) => {
34
- r.current = e, typeof i == "function" ? i(e) : i !== null && (i.current = e);
35
- }, [i]) });
36
- });
37
- return a.displayName = l ?? s.name, a;
38
- }, D = b({
7
+ const p = i({
39
8
  displayName: "PieDivider",
40
- elementClass: E,
41
- react: y,
9
+ elementClass: r,
10
+ react: e,
42
11
  tagName: "pie-divider",
43
12
  events: {}
44
13
  });
45
14
  export {
46
- D as PieDivider,
47
- k as orientations,
48
- C as variants
15
+ p as PieDivider,
16
+ d as orientations,
17
+ v as variants
49
18
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@justeattakeaway/pie-divider",
3
3
  "description": "PIE Design System Divider built using Web Components",
4
- "version": "0.9.2-next.0",
4
+ "version": "0.9.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"