@overmap-ai/blocks 1.0.31-tailwind-components.10 → 1.0.31-tailwind-components.11
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.
- package/dist/Text/Text.d.ts +6 -0
- package/dist/Text/cva.d.ts +5 -0
- package/dist/Text/index.d.ts +2 -0
- package/dist/Text/typings.d.ts +12 -0
- package/dist/blocks.js +36 -0
- package/dist/blocks.js.map +1 -1
- package/dist/blocks.umd.cjs +36 -0
- package/dist/blocks.umd.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ComponentProps, PropsWithoutRef } from "react";
|
|
2
|
+
import { AccentColorProps } from "../typings";
|
|
3
|
+
import { TextVariantProps } from "./typings";
|
|
4
|
+
export interface TextProps extends PropsWithoutRef<ComponentProps<"span">>, AccentColorProps, TextVariantProps {
|
|
5
|
+
}
|
|
6
|
+
export declare const Text: import("react").ForwardRefExoticComponent<TextProps & import("react").RefAttributes<HTMLSpanElement>>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const textCva: (props?: ({
|
|
2
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
3
|
+
weight?: "bold" | "medium" | "light" | "regular" | null | undefined;
|
|
4
|
+
align?: "center" | "right" | "left" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { VariantProps } from "class-variance-authority";
|
|
2
|
+
import { textCva } from "./cva";
|
|
3
|
+
type TextVariants = VariantProps<typeof textCva>;
|
|
4
|
+
export type TextSize = NonNullable<TextVariants["size"]>;
|
|
5
|
+
export type TextWeight = NonNullable<TextVariants["weight"]>;
|
|
6
|
+
export type TextAlign = NonNullable<TextVariants["align"]>;
|
|
7
|
+
export interface TextVariantProps {
|
|
8
|
+
size?: TextSize;
|
|
9
|
+
weight?: TextWeight;
|
|
10
|
+
align?: TextAlign;
|
|
11
|
+
}
|
|
12
|
+
export {};
|
package/dist/blocks.js
CHANGED
|
@@ -8744,6 +8744,41 @@ const Spinner = memo(() => {
|
|
|
8744
8744
|
return /* @__PURE__ */ jsx("div", { className: "size-5 rounded-full border border-2 border-(--base-a12) border-b-transparent animate-spin" });
|
|
8745
8745
|
});
|
|
8746
8746
|
Spinner.displayName = "Spinner";
|
|
8747
|
+
const textCva = cva(["text-(--accent-a11)"], {
|
|
8748
|
+
variants: {
|
|
8749
|
+
size: {
|
|
8750
|
+
xs: ["text-xs"],
|
|
8751
|
+
sm: ["text-sm"],
|
|
8752
|
+
md: ["text-base"],
|
|
8753
|
+
lg: ["text-lg"],
|
|
8754
|
+
xl: ["text-xl"]
|
|
8755
|
+
},
|
|
8756
|
+
weight: {
|
|
8757
|
+
light: ["font-light"],
|
|
8758
|
+
regular: ["font-normal"],
|
|
8759
|
+
medium: ["font-medium"],
|
|
8760
|
+
bold: ["font-bold"]
|
|
8761
|
+
},
|
|
8762
|
+
align: {
|
|
8763
|
+
left: ["text-left"],
|
|
8764
|
+
center: ["text-center"],
|
|
8765
|
+
right: ["text-right"]
|
|
8766
|
+
}
|
|
8767
|
+
}
|
|
8768
|
+
});
|
|
8769
|
+
const Text = forwardRef((props, ref) => {
|
|
8770
|
+
const { className, size: size2, weight, align, accentColor, ...rest } = props;
|
|
8771
|
+
return /* @__PURE__ */ jsx(
|
|
8772
|
+
"span",
|
|
8773
|
+
{
|
|
8774
|
+
ref,
|
|
8775
|
+
className: cx(className, textCva({ size: size2, weight, align })),
|
|
8776
|
+
"data-accent-color": accentColor,
|
|
8777
|
+
...rest
|
|
8778
|
+
}
|
|
8779
|
+
);
|
|
8780
|
+
});
|
|
8781
|
+
Text.displayName = "Text";
|
|
8747
8782
|
const textAreaCva = cva(
|
|
8748
8783
|
[
|
|
8749
8784
|
"focus:ring-2",
|
|
@@ -9262,6 +9297,7 @@ export {
|
|
|
9262
9297
|
SlideOutV2,
|
|
9263
9298
|
SlideOutV3,
|
|
9264
9299
|
Spinner,
|
|
9300
|
+
Text,
|
|
9265
9301
|
TextArea,
|
|
9266
9302
|
Toast,
|
|
9267
9303
|
ToastContext,
|