@playbooks/ui
Version:
An interface library for Playbooks.
118 lines (117 loc) • 4.13 kB
JavaScript
;
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 Hero = ({ name = "Hero", size = "", tailwind, className, children, ...props }) => {
const { theme } = html.useInterface();
const base = theme.hero({ size });
const formatted = { ...base, ...props, ...tailwind };
const filtered = transforms.computeProps(props);
return /* @__PURE__ */ require$$0.jsx(transforms.Header, { name, tailwind: formatted, className, ...filtered, children });
};
const HeroBg = ({ name = "HeroBg", ref, tailwind, className, children, ...props }) => {
const { theme } = html.useInterface();
const base = theme.heroBg();
const computed = { ...base, ...props, tailwind, className, name };
return /* @__PURE__ */ require$$0.jsx(html.Div, { ...computed, children });
};
const HeroImg = ({
name = "HeroImg",
alt = "thumbnail",
size = "lg",
src,
tailwind,
className,
...props
}) => {
const { theme } = html.useInterface();
const base = theme.heroImg({ size });
const computed = { ...base, ...props, tailwind, className, name };
return /* @__PURE__ */ require$$0.jsx(html.Div, { ...computed, children: /* @__PURE__ */ require$$0.jsx(html.Img, { src, alt, tailwind: { width: "w-full" } }) });
};
const HeroIcon = ({
name = "HeroIcon",
size = "lg",
icon = "code",
tailwind,
className,
...props
}) => {
const { theme } = html.useInterface();
const base = theme.heroIcon({ size });
const computed = { ...base, ...props, tailwind, className, name };
return /* @__PURE__ */ require$$0.jsx(html.Div, { ...computed, children: /* @__PURE__ */ require$$0.jsx(html.FadIcon, { icon, tailwind: { fontSize: "text-3xl" } }) });
};
const HeroBody = ({ name = "HeroBody", tailwind, className, children, ...props }) => {
const { theme } = html.useInterface();
const base = theme.heroBody();
const computed = { ...base, ...props, tailwind, className, name };
return /* @__PURE__ */ require$$0.jsx(html.Div, { ...computed, children });
};
const HeroPretitle = ({
name = "HeroPretitle",
tailwind,
className,
children,
...props
}) => {
const { theme } = html.useInterface();
const base = theme.heroPretitle();
const computed = { ...base, ...props, tailwind, className, name };
return /* @__PURE__ */ require$$0.jsx(html.Small, { ...computed, children });
};
const HeroTitle = ({
name = "HeroTitle",
size = "h1",
tailwind,
className,
children,
...props
}) => {
const { theme } = html.useInterface();
const base = theme.heroTitle();
const computed = { ...base, ...props, tailwind, className, name };
return /* @__PURE__ */ require$$0.jsx(html.Font, { size, ...computed, children });
};
const HeroSubtitle = ({
name = "HeroSubtitle",
size = "h5",
tailwind,
className,
children,
...props
}) => {
const { theme } = html.useInterface();
const base = theme.heroSubtitle();
const computed = { ...base, ...props, tailwind, className, name };
return /* @__PURE__ */ require$$0.jsx(html.Font, { size, ...computed, children });
};
const HeroText = ({ name = "HeroText", tailwind, className, children, ...props }) => {
const { theme } = html.useInterface();
const base = theme.heroText();
const computed = { ...base, ...props, tailwind, className, name };
return /* @__PURE__ */ require$$0.jsx(html.P, { ...computed, children });
};
const HeroActions = ({
name = "HeroActions",
tailwind,
className,
children,
...props
}) => {
const { theme } = html.useInterface();
const base = theme.heroActions();
const computed = { ...base, ...props, tailwind, className, name };
return /* @__PURE__ */ require$$0.jsx(html.Div, { ...computed, children });
};
exports.Hero = Hero;
exports.HeroActions = HeroActions;
exports.HeroBg = HeroBg;
exports.HeroBody = HeroBody;
exports.HeroIcon = HeroIcon;
exports.HeroImg = HeroImg;
exports.HeroPretitle = HeroPretitle;
exports.HeroSubtitle = HeroSubtitle;
exports.HeroText = HeroText;
exports.HeroTitle = HeroTitle;