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

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.
@@ -1,7 +1,7 @@
1
- import { PropsWithChildren } from "react";
1
+ import { ComponentProps, PropsWithoutRef } from "react";
2
2
  import { ButtonVariantProps } from "../Buttons";
3
3
  import { AccentColorProps } from "../typings";
4
- export interface ButtonGroupProps extends PropsWithChildren, ButtonVariantProps, AccentColorProps {
4
+ export interface ButtonGroupProps extends PropsWithoutRef<ComponentProps<"div">>, ButtonVariantProps, AccentColorProps {
5
5
  }
6
6
  export declare const ButtonGroup: {
7
7
  (props: ButtonGroupProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { ComponentProps, PropsWithoutRef } from "react";
2
+ import { AccentColorProps } from "../typings";
3
+ import { HeadingVariantProps } from "./typings";
4
+ export interface HeadingProps extends PropsWithoutRef<ComponentProps<"h1">>, HeadingVariantProps, AccentColorProps {
5
+ }
6
+ export declare const Heading: import("react").ForwardRefExoticComponent<HeadingProps & import("react").RefAttributes<HTMLHeadingElement>>;
@@ -0,0 +1,2 @@
1
+ import { HeadingLevel } from "./typings";
2
+ export declare const headingLevelTagMapping: Record<HeadingLevel, "h1" | "h2" | "h3" | "h4" | "h5" | "h6">;
@@ -0,0 +1,5 @@
1
+ export declare const headingCva: (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 "./Heading";
2
+ export * from "./typings";
@@ -0,0 +1,15 @@
1
+ import { VariantProps } from "class-variance-authority";
2
+ import { headingCva } from "./cva";
3
+ type HeadingVariants = VariantProps<typeof headingCva>;
4
+ export type HeadingSize = NonNullable<HeadingVariants["size"]>;
5
+ export type HeadingWeight = NonNullable<HeadingVariants["weight"]>;
6
+ export type HeadingAlign = NonNullable<HeadingVariants["align"]>;
7
+ export type HeadingLevel = "1" | "2" | "3" | "4" | "5" | "6";
8
+ export interface HeadingVariantProps {
9
+ size?: HeadingSize;
10
+ weight?: HeadingWeight;
11
+ align?: HeadingAlign;
12
+ level?: HeadingLevel;
13
+ highContrast?: boolean;
14
+ }
15
+ export {};
@@ -24,7 +24,6 @@ export interface MenuRootProps extends PropsWithChildren {
24
24
  align?: MenuAlignment;
25
25
  offset?: number;
26
26
  loop?: boolean;
27
- dialog?: boolean;
28
27
  modal?: boolean;
29
28
  }
30
29
  export interface MenuContentProps extends ComponentProps<PropsWithoutRef<"div">>, AccentColorProps, MenuVariantProps {
@@ -1,5 +1,5 @@
1
1
  export declare const textCva: (props?: ({
2
- size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
2
+ size?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | null | undefined;
3
3
  weight?: "bold" | "medium" | "light" | "regular" | null | undefined;
4
4
  align?: "right" | "left" | "center" | null | undefined;
5
5
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
@@ -8,5 +8,6 @@ export interface TextVariantProps {
8
8
  size?: TextSize;
9
9
  weight?: TextWeight;
10
10
  align?: TextAlign;
11
+ highContrast?: boolean;
11
12
  }
12
13
  export {};
package/dist/blocks.js CHANGED
@@ -196,7 +196,8 @@ const ButtonGroup = (props) => {
196
196
  variant = "solid",
197
197
  size: size2 = "md",
198
198
  radius = providerContext.radius,
199
- accentColor = providerContext.accentColor
199
+ accentColor = providerContext.accentColor,
200
+ ...rest
200
201
  } = props;
201
202
  const value = useMemo(
202
203
  () => ({
@@ -207,7 +208,7 @@ const ButtonGroup = (props) => {
207
208
  }),
208
209
  [accentColor, radius, size2, variant]
209
210
  );
210
- return /* @__PURE__ */ jsx(ButtonGroupContext.Provider, { value, children });
211
+ return /* @__PURE__ */ jsx("div", { ...rest, children: /* @__PURE__ */ jsx(ButtonGroupContext.Provider, { value, children }) });
211
212
  };
212
213
  ButtonGroup.displayName = "Buttons";
213
214
  const useButtonGroup = () => useContext(ButtonGroupContext);
@@ -1064,6 +1065,61 @@ const Dialog = {
1064
1065
  Trigger: RadixDialog.Trigger,
1065
1066
  Close: RadixDialog.Close
1066
1067
  };
1068
+ const headingLevelTagMapping = {
1069
+ "1": "h1",
1070
+ "2": "h2",
1071
+ "3": "h3",
1072
+ "4": "h4",
1073
+ "5": "h5",
1074
+ "6": "h6"
1075
+ };
1076
+ const headingCva = cva([], {
1077
+ variants: {
1078
+ size: {
1079
+ xs: ["text-xs"],
1080
+ sm: ["text-sm"],
1081
+ md: ["text-base"],
1082
+ lg: ["text-lg"],
1083
+ xl: ["text-xl"],
1084
+ "2xl": ["text-2xl"],
1085
+ "3xl": ["text-3xl"],
1086
+ "4xl": ["text-4xl"],
1087
+ "5xl": ["text-5xl"],
1088
+ "6xl": ["text-6xl"],
1089
+ "7xl": ["text-7xl"],
1090
+ "8xl": ["text-8xl"],
1091
+ "9xl": ["text-9xl"]
1092
+ },
1093
+ weight: {
1094
+ light: ["font-light"],
1095
+ regular: ["font-normal"],
1096
+ medium: ["font-medium"],
1097
+ bold: ["font-bold"]
1098
+ },
1099
+ align: {
1100
+ left: ["text-left"],
1101
+ center: ["text-center"],
1102
+ right: ["text-right"]
1103
+ }
1104
+ }
1105
+ });
1106
+ const Heading = forwardRef((props, ref) => {
1107
+ const { className, level = "1", size: size2, weight, align, accentColor, highContrast = false, ...rest } = props;
1108
+ const Tag = headingLevelTagMapping[level];
1109
+ return /* @__PURE__ */ jsx(
1110
+ Tag,
1111
+ {
1112
+ ref,
1113
+ className: cx(className, headingCva({ size: size2, weight, align }), {
1114
+ "text-(--accent-a11)": !!accentColor,
1115
+ "text-(--accent-a12)": highContrast
1116
+ }),
1117
+ "data-accent-color": accentColor,
1118
+ ...rest
1119
+ }
1120
+ );
1121
+ });
1122
+ Heading.displayName = "Heading";
1067
1123
  const HoverCardArrow = forwardRef((props, ref) => {
1068
1124
  const { className, ...rest } = props;
1069
1125
  return /* @__PURE__ */ jsx(RadixHoverCard.Arrow, { className: cx(className, "fill-(--base-6)"), ref, ...rest });
@@ -8836,14 +8892,22 @@ const Tabs = {
8836
8892
  Trigger: TabsTrigger,
8837
8893
  Content: RadixTabs.Content
8838
8894
  };
8839
- const textCva = cva(["text-(--accent-a11)"], {
8895
+ const textCva = cva([], {
8840
8896
  variants: {
8841
8897
  size: {
8842
8898
  xs: ["text-xs"],
8843
8899
  sm: ["text-sm"],
8844
8900
  md: ["text-base"],
8845
8901
  lg: ["text-lg"],
8846
- xl: ["text-xl"]
8902
+ xl: ["text-xl"],
8903
+ "2xl": ["text-2xl"],
8904
+ "3xl": ["text-3xl"],
8905
+ "4xl": ["text-4xl"],
8906
+ "5xl": ["text-5xl"],
8907
+ "6xl": ["text-6xl"],
8908
+ "7xl": ["text-7xl"],
8909
+ "8xl": ["text-8xl"],
8910
+ "9xl": ["text-9xl"]
8847
8911
  },
8848
8912
  weight: {
8849
8913
  light: ["font-light"],
@@ -8859,12 +8923,15 @@ const textCva = cva(["text-(--accent-a11)"], {
8859
8923
  }
8860
8924
  });
8861
8925
  const Text = forwardRef((props, ref) => {
8862
- const { className, size: size2, weight, align, accentColor, ...rest } = props;
8926
+ const { className, size: size2, weight, align, accentColor, highContrast = false, ...rest } = props;
8863
8927
  return /* @__PURE__ */ jsx(
8864
8928
  "span",
8865
8929
  {
8866
8930
  ref,
8867
- className: cx(className, textCva({ size: size2, weight, align })),
8931
+ className: cx(className, textCva({ size: size2, weight, align }), {
8932
+ "text-(--accent-a11)": !!accentColor,
8933
+ "text-(--accent-a12)": highContrast
8934
+ }),
8868
8935
  "data-accent-color": accentColor,
8869
8936
  ...rest
8870
8937
  }
@@ -9336,6 +9403,7 @@ export {
9336
9403
  Dialog,
9337
9404
  DialogContent,
9338
9405
  DialogRoot,
9406
+ Heading,
9339
9407
  HoverCard,
9340
9408
  HoverCardArrow,
9341
9409
  HoverCardContent,