UNPKG

@playbooks/ui

Version:

An interface library for Playbooks.

128 lines (127 loc) 4.05 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 Section = ({ name = "Section", tailwind, className, children, ...props }) => { const { theme } = html.useInterface(); const base = theme.section(); const formatted = { ...base, ...props, ...tailwind }; const filtered = transforms.computeProps(props); return /* @__PURE__ */ require$$0.jsx(transforms.Section, { name, tailwind: formatted, className, ...filtered, children }); }; const SectionHeader = ({ name = "SectionHeader", tailwind, className, children, ...props }) => { const { theme } = html.useInterface(); const base = theme.sectionHeader(); const computed = { ...base, ...props, tailwind, className, name }; return /* @__PURE__ */ require$$0.jsx(html.Div, { ...computed, children }); }; const SectionPretitle = ({ name = "SectionPretitle", tailwind, className, children, ...props }) => { const { theme } = html.useInterface(); const base = theme.sectionPretitle(); const computed = { ...base, ...props, tailwind, className, name }; return /* @__PURE__ */ require$$0.jsx(html.Small, { ...computed, children }); }; const SectionTitle = ({ name = "SectionTitle", size = "h5", tailwind, className, children, ...props }) => { const { theme } = html.useInterface(); const base = theme.sectionTitle(); const computed = { ...base, ...props, tailwind, className, name }; return /* @__PURE__ */ require$$0.jsx(html.Font, { size, ...computed, children }); }; const SectionSubtitle = ({ name = "SectionSubtitle", size = "h6", tailwind, className, children, ...props }) => { const { theme } = html.useInterface(); const base = theme.sectionSubtitle(); const computed = { ...base, ...props, tailwind, className, name }; return /* @__PURE__ */ require$$0.jsx(html.Font, { size, ...computed, children }); }; const SectionText = ({ name = "SectionText", tailwind, className, children, ...props }) => { const { theme } = html.useInterface(); const base = theme.sectionText(); const computed = { ...base, ...props, tailwind, className, name }; return /* @__PURE__ */ require$$0.jsx(html.P, { ...computed, children }); }; const SectionActions = ({ name = "SectionActions", tailwind, className, children, ...props }) => { const { theme } = html.useInterface(); const base = theme.sectionActions(); const computed = { ...base, ...props, tailwind, className, name }; return /* @__PURE__ */ require$$0.jsx(html.Div, { ...computed, children }); }; const SectionBody = ({ name = "SectionBody", size, tailwind, className, children, ...props }) => { const { theme } = html.useInterface(); const base = theme.sectionBody({ size }); const computed = { ...base, ...props, tailwind, className, name }; return /* @__PURE__ */ require$$0.jsx(html.Div, { ...computed, children }); }; const SectionHr = ({ name = "SectionHr", tailwind, className, ...props }) => { const { theme } = html.useInterface(); const base = theme.sectionHr(); const computed = { ...base, ...props, tailwind, className, name }; return /* @__PURE__ */ require$$0.jsx(html.Hr, { ...computed }); }; const SectionFooter = ({ name = "SectionFooter", tailwind, className, children, ...props }) => { const { theme } = html.useInterface(); const base = theme.sectionFooter(); const computed = { ...base, ...props, tailwind, className, name }; return /* @__PURE__ */ require$$0.jsx(html.Div, { ...computed, children }); }; exports.Section = Section; exports.SectionActions = SectionActions; exports.SectionBody = SectionBody; exports.SectionFooter = SectionFooter; exports.SectionHeader = SectionHeader; exports.SectionHr = SectionHr; exports.SectionPretitle = SectionPretitle; exports.SectionSubtitle = SectionSubtitle; exports.SectionText = SectionText; exports.SectionTitle = SectionTitle;