@justeattakeaway/pie-spinner
Advanced tools
Comparing version 0.2.2-next.0 to 0.2.2
@@ -1,42 +0,11 @@ | ||
import * as y from "react"; | ||
import { PieSpinner as E } from "./index.js"; | ||
import { sizes as k, variants as C } from "./index.js"; | ||
import * as e from "react"; | ||
import { createComponent as r } from "@lit/react"; | ||
import { PieSpinner as i } from "./index.js"; | ||
import { sizes as c, variants as f } from "./index.js"; | ||
import "lit"; | ||
import "lit/decorators.js"; | ||
/** | ||
* @license | ||
* Copyright 2018 Google LLC | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
*/ | ||
const N = /* @__PURE__ */ new Set(["children", "localName", "ref", "style", "className"]), v = /* @__PURE__ */ new WeakMap(), h = (t, c, o, u, l) => { | ||
const p = l == null ? void 0 : l[c]; | ||
p === void 0 || o === u ? (t[c] = o, o == null && c in HTMLElement.prototype && t.removeAttribute(c)) : ((i, n, s) => { | ||
let a = v.get(i); | ||
a === void 0 && v.set(i, a = /* @__PURE__ */ new Map()); | ||
let r = a.get(n); | ||
s !== void 0 ? r === void 0 ? (a.set(n, r = { handleEvent: s }), i.addEventListener(n, r)) : r.handleEvent = s : r !== void 0 && (a.delete(n), i.removeEventListener(n, r)); | ||
})(t, p, o); | ||
}, S = ({ react: t, tagName: c, elementClass: o, events: u, displayName: l }) => { | ||
const p = new Set(Object.keys(u ?? {})), i = t.forwardRef((n, s) => { | ||
const a = t.useRef(null), r = t.useRef(null), m = {}, d = {}; | ||
for (const [e, f] of Object.entries(n)) | ||
N.has(e) ? m[e === "className" ? "class" : e] = f : p.has(e) || e in o.prototype ? d[e] = f : m[e] = f; | ||
return t.useLayoutEffect(() => { | ||
if (r.current !== null) { | ||
for (const e in d) | ||
h(r.current, e, n[e], a.current ? a.current[e] : void 0, u); | ||
a.current = n; | ||
} | ||
}), t.useLayoutEffect(() => { | ||
var e; | ||
(e = r.current) == null || e.removeAttribute("defer-hydration"); | ||
}, []), m.suppressHydrationWarning = !0, t.createElement(c, { ...m, ref: t.useCallback((e) => { | ||
r.current = e, typeof s == "function" ? s(e) : s !== null && (s.current = e); | ||
}, [s]) }); | ||
}); | ||
return i.displayName = l ?? o.name, i; | ||
}, L = S({ | ||
const m = r({ | ||
displayName: "PieSpinner", | ||
elementClass: E, | ||
react: y, | ||
elementClass: i, | ||
react: e, | ||
tagName: "pie-spinner", | ||
@@ -46,5 +15,5 @@ events: {} | ||
export { | ||
L as PieSpinner, | ||
k as sizes, | ||
C as variants | ||
m as PieSpinner, | ||
c as sizes, | ||
f as variants | ||
}; |
{ | ||
"name": "@justeattakeaway/pie-spinner", | ||
"description": "PIE Design System Spinner built using Web Components", | ||
"version": "0.2.2-next.0", | ||
"version": "0.2.2", | ||
"type": "module", | ||
@@ -34,3 +34,3 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"@justeattakeaway/pie-webc-core": "0.12.0-next.0" | ||
"@justeattakeaway/pie-webc-core": "0.12.0" | ||
}, | ||
@@ -37,0 +37,0 @@ "volta": { |
@@ -58,3 +58,3 @@ <p align="center"> | ||
// For React, you will need to import our React-specific component build | ||
// which wraps the web component using @lit-labs/react | ||
// which wraps the web component using @lit/react | ||
import { PieSpinner } from '@justeattakeaway/pie-spinner/dist/react'; | ||
@@ -61,0 +61,0 @@ ``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
0
15068
233
+ Added@justeattakeaway/pie-webc-core@0.12.0(transitive)
- Removed@justeattakeaway/pie-webc-core@0.12.0-next.0(transitive)