UNPKG

@lanaco/lnc-react-ui

Version:

React component library

96 lines (94 loc) 2.5 kB
import { jsxs as b, jsx as m } from "react/jsx-runtime"; import { memo as A, forwardRef as g } from "react"; import { s as w } from "./emotion-styled.browser.esm-DfbrHHed.js"; import N from "./DropdownMenu.js"; import k from "./DropdownItem.js"; import v from "./Icon.js"; import { u as x } from "./emotion-element-f0de968e.browser.esm-CkCiQliQ.js"; const H = w.div` font-family: ${(o) => { var r, l; return (l = (r = o.theme) == null ? void 0 : r.typography) == null ? void 0 : l.fontFamily; }}; position: relative; width: 100%; & .column-action-lnc { position: absolute; right: 0; top: 0; cursor: pointer; } & > span { ${(o) => o.clickable && "cursor: pointer;"} } `, j = A( g( ({ item: o, column: r, actionsMenu: l = !1, actions: n = [], onDetails: t = () => { }, color: i = "primary", size: s = "small", className: a = "", style: p = {}, children: c, ...f }, d) => { const u = x(); return /* @__PURE__ */ b( H, { ref: d, theme: u, className: a, style: p, clickable: !!t, ...f, children: [ /* @__PURE__ */ m("span", { onClick: (e) => t(e, o, r), children: c }), l && /* @__PURE__ */ m( N, { className: "column-action-lnc", horizontalAlignment: "right", verticalAlignment: "bottom", color: i, size: s, control: /* @__PURE__ */ m( v, { color: "neutral", className: "column-action-lnc", icon: "ellipsis-v" } ), children: n == null ? void 0 : n.map((e, h) => { if ((e == null ? void 0 : e.show) != !1) return /* @__PURE__ */ m( k, { icon: e.icon, disabled: e.enable == !1, onClick: (y) => { e.onAction(y, o, r); }, children: e.name }, h ); }) } ) ] } ); } ) ); j.displayName = "KANBAN_HEADER"; export { j as default };