import { jsx } from 'react/jsx-runtime';
import { forwardRef } from 'react';
import { c as cva } from './index-Bo3AAQJp.js';
import { c as cn } from './utils-BJnb9o5c.js';
import { S as Slot } from './index-CfriMyrd.js';

const typographyVariants = cva("", {
  variants: {
    variant: {
      jumbo: "text-5xl font-semibold leading-none tracking-tight",
      h1: "text-[2.5rem] font-semibold leading-tight tracking-tight",
      h2: "text-[2rem] font-semibold leading-tight tracking-tight",
      h3: "text-[1.75rem] font-semibold leading-tight",
      h4: "text-2xl font-semibold leading-tight",
      h5: "text-xl font-semibold leading-tight",
      h6: "text-base font-semibold leading-tight",
      body1: "text-base leading-normal",
      body2: "text-[15px] leading-normal",
      body3: "text-sm leading-normal",
      caption: "text-xs leading-normal",
      nano: "text-[10px] leading-normal",
      code: "font-mono text-sm"
    },
    weight: {
      thin: "font-thin",
      extralight: "font-extralight",
      light: "font-light",
      normal: "font-normal",
      medium: "font-medium",
      semibold: "font-semibold",
      bold: "font-bold",
      extrabold: "font-extrabold",
      black: "font-black"
    },
    color: {
      default: "text-foreground",
      muted: "text-muted-foreground",
      primary: "text-primary",
      destructive: "text-destructive",
      inherit: "text-inherit"
    },
    lineClamp: {
      none: "",
      1: "line-clamp-1",
      2: "line-clamp-2",
      3: "line-clamp-3"
    }
  },
  defaultVariants: {
    variant: "body3",
    color: "default"
  }
});
const defaultElementMap = {
  jumbo: "h1",
  h1: "h1",
  h2: "h2",
  h3: "h3",
  h4: "h4",
  h5: "h5",
  h6: "h6",
  body1: "p",
  body2: "p",
  body3: "p",
  caption: "span",
  nano: "span",
  code: "code"
};
const Typography = forwardRef(
  ({
    className,
    variant = "body3",
    weight,
    color = "default",
    lineClamp,
    asChild = false,
    ...props
  }, ref) => {
    const Comp = asChild ? Slot : defaultElementMap[variant ?? "body3"] ?? "p";
    return /* @__PURE__ */ jsx(
      Comp,
      {
        ref,
        "data-slot": "typography",
        "data-variant": variant,
        className: cn(
          typographyVariants({ variant, weight, color, lineClamp, className })
        ),
        ...props
      }
    );
  }
);
Typography.displayName = "Typography";

export { Typography as T, typographyVariants as t };
//# sourceMappingURL=Typography-CiQzW5Fy.js.map
