UNPKG

@playbooks/ui

Version:

An interface library for Playbooks.

71 lines (70 loc) 3 kB
"use strict"; Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" }); const require$$0 = require("react/jsx-runtime"); const transforms = require("./transforms-Ca9m4pGF.cjs"); const html = require("./toast-context-kVz4KXNu.cjs"); const links = require("./links.cjs"); const Nav = ({ name = "Nav", tailwind, className, children, ...props }) => { const { theme } = html.useInterface(); const base = theme.nav(); const formatted = { ...base, ...props, ...tailwind }; const filtered = transforms.computeProps(props); return /* @__PURE__ */ require$$0.jsx(transforms.Nav, { name, tailwind: formatted, className, ...filtered, children }); }; const NavHeader = ({ name = "NavHeader", tailwind, className, children, ...props }) => { const { theme } = html.useInterface(); const base = theme.navHeader(); const computed = { ...base, ...props, tailwind, className, name }; return /* @__PURE__ */ require$$0.jsx(html.Div, { ...computed, children }); }; const NavTitle = ({ name = "NavTitle", size = "h6", tailwind, className, children, ...props }) => { const { theme } = html.useInterface(); const base = theme.navTitle(); const computed = { ...base, ...props, tailwind, className, name }; return /* @__PURE__ */ require$$0.jsx(html.Font, { size, ...computed, children }); }; const NavBody = ({ name = "NavBody", size, tailwind, className, children, ...props }) => { const { theme } = html.useInterface(); const base = theme.navBody({ size }); const computed = { ...base, ...props, tailwind, className, name }; return /* @__PURE__ */ require$$0.jsx(html.Div, { ...computed, children }); }; const NavList = ({ tailwind, children, ...props }) => { const { theme } = html.useInterface(); const base = theme.navList(); const computed = { ...base, ...props, tailwind }; return /* @__PURE__ */ require$$0.jsx(html.Ul, { ...computed, children }); }; const NavItem = ({ tailwind, children, ...props }) => { const { theme } = html.useInterface(); const base = theme.navItem(); const computed = { ...base, ...props, tailwind }; return /* @__PURE__ */ require$$0.jsx(html.Li, { ...computed, children }); }; const NavBtn = ({ name = "NavBtn", tailwind, className, children, ...props }) => { const { theme } = html.useInterface(); const base = theme.navBtn(); const computed = { ...base, ...props, tailwind, className, children, name }; return /* @__PURE__ */ require$$0.jsx(html.AccentBtn, { ...computed }); }; const NavLink = ({ name = "NavLink", tailwind, className, children, ...props }) => { const { theme } = html.useInterface(); const base = theme.navLink(); const computed = { ...base, ...props, tailwind, className, children, name }; return /* @__PURE__ */ require$$0.jsx(links.AccentLink, { ...computed }); }; exports.Nav = Nav; exports.NavBody = NavBody; exports.NavBtn = NavBtn; exports.NavHeader = NavHeader; exports.NavItem = NavItem; exports.NavLink = NavLink; exports.NavList = NavList; exports.NavTitle = NavTitle;