UNPKG

laif-ds

Version:

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

54 lines (53 loc) 1.68 kB
"use client"; import c from "react"; import { clsx as v } from "../../../clsx/dist/clsx.js"; import { filterProps as d } from "../util/ReactUtils.js"; var m = ["children", "width", "height", "viewBox", "className", "style", "title", "desc"]; function o() { return o = Object.assign ? Object.assign.bind() : function(t) { for (var n = 1; n < arguments.length; n++) { var i = arguments[n]; for (var e in i) Object.prototype.hasOwnProperty.call(i, e) && (t[e] = i[e]); } return t; }, o.apply(this, arguments); } function w(t, n) { if (t == null) return {}; var i = O(t, n), e, r; if (Object.getOwnPropertySymbols) { var a = Object.getOwnPropertySymbols(t); for (r = 0; r < a.length; r++) e = a[r], !(n.indexOf(e) >= 0) && Object.prototype.propertyIsEnumerable.call(t, e) && (i[e] = t[e]); } return i; } function O(t, n) { if (t == null) return {}; var i = {}; for (var e in t) if (Object.prototype.hasOwnProperty.call(t, e)) { if (n.indexOf(e) >= 0) continue; i[e] = t[e]; } return i; } function j(t) { var n = t.children, i = t.width, e = t.height, r = t.viewBox, a = t.className, h = t.style, f = t.title, s = t.desc, u = w(t, m), l = r || { width: i, height: e, x: 0, y: 0 }, g = v("recharts-surface", a); return /* @__PURE__ */ c.createElement("svg", o({}, d(u, !0, "svg"), { className: g, width: i, height: e, style: h, viewBox: "".concat(l.x, " ").concat(l.y, " ").concat(l.width, " ").concat(l.height) }), /* @__PURE__ */ c.createElement("title", null, f), /* @__PURE__ */ c.createElement("desc", null, s), n); } export { j as Surface };