UNPKG

@mysten/dapp-kit

Version:

A collection of React hooks and components for interacting with the Sui blockchain and wallets.

71 lines (67 loc) 3.09 kB
"use strict"; 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/Text.tsx var Text_exports = {}; __export(Text_exports, { Text: () => Text }); module.exports = __toCommonJS(Text_exports); var import_react_slot = require("@radix-ui/react-slot"); var import_clsx = __toESM(require("clsx")); 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__2bv1ur0", variantClassNames: { size: { sm: "Text_textVariants_size_sm__2bv1ur1" }, weight: { normal: "Text_textVariants_weight_normal__2bv1ur2", medium: "Text_textVariants_weight_medium__2bv1ur3", bold: "Text_textVariants_weight_bold__2bv1ur4" }, color: { muted: "Text_textVariants_color_muted__2bv1ur5", danger: "Text_textVariants_color_danger__2bv1ur6" }, mono: { true: "Text_textVariants_mono_true__2bv1ur7" } }, 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"; //# sourceMappingURL=Text.js.map