UNPKG

@konstructio/ui

Version:

A set of reusable and customizable React components built for konstruct.io

86 lines (85 loc) 2.55 kB
import { o as m } from "./chunk-cI0lbGMq.js"; import { t as g } from "./prop-types-CE0Kfmwk.js"; import { t as c } from "./dist-EV-1XXQr.js"; import { t as y } from "./utils-COaoD3PI.js"; import { hamburgerTriggerVariants as d } from "./components/Sidebar/components/HamburgerTrigger/HamburgerTrigger.variants.js"; import a, { forwardRef as v } from "react"; import { jsx as u, jsxs as b } from "react/jsx-runtime"; var p = /* @__PURE__ */ m(g()); function s() { return s = Object.assign || function(r) { for (var n = 1; n < arguments.length; n++) { var e = arguments[n]; for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && (r[t] = e[t]); } return r; }, s.apply(this, arguments); } function h(r, n) { if (r == null) return {}; var e = x(r, n), t, o; if (Object.getOwnPropertySymbols) { var i = Object.getOwnPropertySymbols(r); for (o = 0; o < i.length; o++) t = i[o], !(n.indexOf(t) >= 0) && Object.prototype.propertyIsEnumerable.call(r, t) && (e[t] = r[t]); } return e; } function x(r, n) { if (r == null) return {}; var e = {}, t = Object.keys(r), o, i; for (i = 0; i < t.length; i++) o = t[i], !(n.indexOf(o) >= 0) && (e[o] = r[o]); return e; } var l = v(function(r, n) { var e = r.color, t = e === void 0 ? "currentColor" : e, o = r.size, i = o === void 0 ? 24 : o, f = h(r, ["color", "size"]); return /* @__PURE__ */ a.createElement("svg", s({ ref: n, xmlns: "http://www.w3.org/2000/svg", width: i, height: i, viewBox: "0 0 24 24", fill: "none", stroke: t, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, f), /* @__PURE__ */ a.createElement("line", { x1: "3", y1: "12", x2: "21", y2: "12" }), /* @__PURE__ */ a.createElement("line", { x1: "3", y1: "6", x2: "21", y2: "6" }), /* @__PURE__ */ a.createElement("line", { x1: "3", y1: "18", x2: "21", y2: "18" })); }); l.propTypes = { color: p.default.string, size: p.default.oneOfType([p.default.string, p.default.number]) }; l.displayName = "Menu"; var O = ({ isOpen: r, onClick: n, className: e }) => /* @__PURE__ */ b("button", { type: "button", "aria-label": "Open navigation", "aria-expanded": r, "aria-haspopup": "menu", className: y(d({ className: e })), onClick: n, children: [/* @__PURE__ */ u(l, { size: 20, "aria-hidden": "true" }), /* @__PURE__ */ u(c, { children: "Open navigation" })] }); O.displayName = "KonstructSidebarHamburgerTrigger"; export { O as t };