@roochnetwork/rooch-sdk-kit
Version:
Rooch SDK Kit
127 lines (117 loc) • 5.83 kB
JavaScript
;
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/components/ui/Card.tsx
var Card_exports = {};
__export(Card_exports, {
Card: () => Card
});
module.exports = __toCommonJS(Card_exports);
// src/components/ui/Card.css.ts
var card = "Card_card__1bu3cob0";
var cardBody = "Card_cardBody__1bu3cob4";
var cardFooter = "Card_cardFooter__1bu3cob5";
var cardHeader = "Card_cardHeader__1bu3cob1";
// src/components/ui/Text.tsx
var import_react_slot = require("@radix-ui/react-slot");
var import_clsx = __toESM(require("clsx"), 1);
var import_react = require("react");
// src/components/ui/Text.css.ts
var import_createRuntimeFn = require("@vanilla-extract/recipes/createRuntimeFn");
var textVariants = (0, import_createRuntimeFn.createRuntimeFn)({ defaultClassName: "Text__1utg4wj0", variantClassNames: { size: { sm: "Text_textVariants_size_sm__1utg4wj1" }, weight: { normal: "Text_textVariants_weight_normal__1utg4wj2", medium: "Text_textVariants_weight_medium__1utg4wj3", bold: "Text_textVariants_weight_bold__1utg4wj4" }, color: { muted: "Text_textVariants_color_muted__1utg4wj5", danger: "Text_textVariants_color_danger__1utg4wj6", warning: "Text_textVariants_color_warning__1utg4wj7" }, mono: { true: "Text_textVariants_mono_true__1utg4wj8" } }, defaultVariants: { size: "sm", weight: "normal" }, compoundVariants: [] });
// src/components/ui/Text.tsx
var import_jsx_runtime = require("react/jsx-runtime");
var Text = (0, import_react.forwardRef)(
({
children,
className,
asChild = false,
as: Tag = "div",
size,
weight,
color,
mono,
...textProps
}, forwardedRef) => {
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
import_react_slot.Slot,
{
...textProps,
ref: forwardedRef,
className: (0, import_clsx.default)(textVariants({ size, weight, color, mono }), className),
children: asChild ? children : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Tag, { children })
}
);
}
);
Text.displayName = "Text";
// src/components/ui/Heading.tsx
var import_react_slot2 = require("@radix-ui/react-slot");
var import_clsx2 = __toESM(require("clsx"), 1);
var import_react2 = require("react");
// src/components/ui/Heading.css.ts
var import_createRuntimeFn2 = require("@vanilla-extract/recipes/createRuntimeFn");
var headingVariants = (0, import_createRuntimeFn2.createRuntimeFn)({ defaultClassName: "Heading__1v58k1t0", variantClassNames: { size: { sm: "Heading_headingVariants_size_sm__1v58k1t1", md: "Heading_headingVariants_size_md__1v58k1t2", lg: "Heading_headingVariants_size_lg__1v58k1t3", xl: "Heading_headingVariants_size_xl__1v58k1t4" }, weight: { normal: "Heading_headingVariants_weight_normal__1v58k1t5", bold: "Heading_headingVariants_weight_bold__1v58k1t6" }, truncate: { true: "Heading_headingVariants_truncate_true__1v58k1t7" } }, defaultVariants: { size: "lg", weight: "bold" }, compoundVariants: [] });
// src/components/ui/Heading.tsx
var import_jsx_runtime2 = require("react/jsx-runtime");
var Heading = (0, import_react2.forwardRef)(
({
children,
className,
asChild = false,
as: Tag = "h1",
size,
weight,
truncate,
...headingProps
}, forwardedRef) => {
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
import_react_slot2.Slot,
{
...headingProps,
ref: forwardedRef,
className: (0, import_clsx2.default)(headingVariants({ size, weight, truncate }), className),
children: asChild ? children : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Tag, { children })
}
);
}
);
Heading.displayName = "Heading";
// src/components/ui/Card.tsx
var import_jsx_runtime3 = require("react/jsx-runtime");
function Card({ header, headerRight, children, footer }) {
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: card, children: [
(header || headerRight) && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: cardHeader, children: [
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Heading, { as: "h3", size: "sm", weight: "normal", children: header }),
headerRight && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Text, { weight: "medium", color: "muted", children: headerRight })
] }),
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: cardBody, children }),
footer && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: cardFooter, children: footer })
] });
}
//# sourceMappingURL=Card.js.map