@overmap-ai/blocks 1.0.31-tailwind-components.16 → 1.0.31-tailwind-components.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,6 @@
1
+ import { ComponentProps, PropsWithoutRef } from "react";
2
+ import { AccentColorProps } from "../typings";
3
+ import { LinkVariantProps } from "./typings";
4
+ export interface LinkProps extends PropsWithoutRef<ComponentProps<"a">>, AccentColorProps, LinkVariantProps {
5
+ }
6
+ export declare const Link: import("react").ForwardRefExoticComponent<LinkProps & import("react").RefAttributes<HTMLAnchorElement>>;
@@ -0,0 +1,5 @@
1
+ export declare const linkCva: (props?: ({
2
+ size?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | null | undefined;
3
+ weight?: "bold" | "medium" | "light" | "regular" | null | undefined;
4
+ align?: "right" | "left" | "center" | null | undefined;
5
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
@@ -0,0 +1,2 @@
1
+ export * from "./Link";
2
+ export * from "./typings";
@@ -0,0 +1,13 @@
1
+ import { VariantProps } from "class-variance-authority";
2
+ import { linkCva } from "./cva";
3
+ type LinkVariants = VariantProps<typeof linkCva>;
4
+ export type LinkSize = NonNullable<LinkVariants["size"]>;
5
+ export type LinkWeight = NonNullable<LinkVariants["weight"]>;
6
+ export type LinkAlign = NonNullable<LinkVariants["align"]>;
7
+ export interface LinkVariantProps {
8
+ size?: LinkSize;
9
+ weight?: LinkWeight;
10
+ align?: LinkAlign;
11
+ highContrast?: boolean;
12
+ }
13
+ export {};
package/dist/blocks.js CHANGED
@@ -1101,10 +1101,24 @@ const headingCva = cva([], {
1101
1101
  center: ["text-center"],
1102
1102
  right: ["text-right"]
1103
1103
  }
1104
+ },
1105
+ defaultVariants: {
1106
+ size: "xl",
1107
+ weight: "medium",
1108
+ align: "left"
1104
1109
  }
1105
1110
  });
1106
1111
  const Heading = forwardRef((props, ref) => {
1107
- const { className, level = "1", size: size2, weight, align, accentColor, highContrast = false, ...rest } = props;
1112
+ const {
1113
+ className,
1114
+ level = "1",
1115
+ size: size2 = "md",
1116
+ weight = "medium",
1117
+ align = "left",
1118
+ highContrast = false,
1119
+ accentColor,
1120
+ ...rest
1121
+ } = props;
1108
1122
  const Tag = headingLevelTagMapping[level];
1109
1123
  return /* @__PURE__ */ jsx(
1110
1124
  Tag,
@@ -1676,6 +1690,66 @@ const Layout = {
1676
1690
  RightSlideOut,
1677
1691
  SlideOutTrigger
1678
1692
  };
1693
+ const linkCva = cva(["cursor-pointer"], {
1694
+ variants: {
1695
+ size: {
1696
+ xs: ["text-xs"],
1697
+ sm: ["text-sm"],
1698
+ md: ["text-base"],
1699
+ lg: ["text-lg"],
1700
+ xl: ["text-xl"],
1701
+ "2xl": ["text-2xl"],
1702
+ "3xl": ["text-3xl"],
1703
+ "4xl": ["text-4xl"],
1704
+ "5xl": ["text-5xl"],
1705
+ "6xl": ["text-6xl"],
1706
+ "7xl": ["text-7xl"],
1707
+ "8xl": ["text-8xl"],
1708
+ "9xl": ["text-9xl"]
1709
+ },
1710
+ weight: {
1711
+ light: ["font-light"],
1712
+ regular: ["font-normal"],
1713
+ medium: ["font-medium"],
1714
+ bold: ["font-bold"]
1715
+ },
1716
+ align: {
1717
+ left: ["text-left"],
1718
+ center: ["text-center"],
1719
+ right: ["text-right"]
1720
+ }
1721
+ },
1722
+ defaultVariants: {
1723
+ size: "xl",
1724
+ weight: "regular",
1725
+ align: "left"
1726
+ }
1727
+ });
1728
+ const Link = forwardRef((props, ref) => {
1729
+ const providerContext = useProvider();
1730
+ const {
1731
+ className,
1732
+ size: size2 = "md",
1733
+ weight = "regular",
1734
+ align = "left",
1735
+ highContrast = false,
1736
+ accentColor = providerContext.accentColor,
1737
+ ...rest
1738
+ } = props;
1739
+ return /* @__PURE__ */ jsx(
1740
+ "a",
1741
+ {
1742
+ ref,
1743
+ className: cx(className, linkCva({ size: size2, weight, align }), {
1744
+ "text-(--accent-a11)": !highContrast,
1745
+ "text-(--accent-a12)": highContrast
1746
+ }),
1747
+ "data-accent-color": accentColor,
1748
+ ...rest
1749
+ }
1750
+ );
1751
+ });
1752
+ Link.displayName = "Link";
1679
1753
  function getNodeName(node) {
1680
1754
  if (isNode(node)) {
1681
1755
  return (node.nodeName || "").toLowerCase();
@@ -9416,6 +9490,7 @@ export {
9416
9490
  InputSlot,
9417
9491
  Layout,
9418
9492
  LayoutContext,
9493
+ Link,
9419
9494
  Menu,
9420
9495
  MenuClickTrigger,
9421
9496
  MenuContent,