UNPKG

laif-ds

Version:

Design System di Laif con componenti React basati su principi di Atomic Design

23 lines (22 loc) 853 B
"use client"; import { isValidElement as a } from "react"; import { SVGElementPropKeys as f, EventKeys as d, FilteredElementKeyMap as u } from "./types.js"; var c = (i, e, o, t) => { var r, n = (r = t && (u === null || u === void 0 ? void 0 : u[t])) !== null && r !== void 0 ? r : []; return e.startsWith("data-") || typeof i != "function" && (t && n.includes(e) || f.includes(e)) || o && d.includes(e); }, p = (i, e, o) => { if (!i || typeof i == "function" || typeof i == "boolean") return null; var t = i; if (/* @__PURE__ */ a(i) && (t = i.props), typeof t != "object" && typeof t != "function") return null; var r = {}; return Object.keys(t).forEach((n) => { var l; c((l = t) === null || l === void 0 ? void 0 : l[n], n, e, o) && (r[n] = t[n]); }), r; }; export { p as filterProps, c as isValidSpreadableProp };