rebrand to useSend (#210)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/** @type {import("eslint").Linter.Config} */
|
||||
module.exports = {
|
||||
root: true,
|
||||
extends: ["@unsend/eslint-config/react-internal.js"],
|
||||
extends: ["@usesend/eslint-config/react-internal.js"],
|
||||
parser: "@typescript-eslint/parser",
|
||||
parserOptions: {
|
||||
project: "./tsconfig.lint.json",
|
||||
|
@@ -1,4 +1,5 @@
|
||||
import { cn } from "./lib/utils";
|
||||
|
||||
export { cn };
|
||||
export { H1, H2, BodyText } from "./src/typography";
|
||||
export { ThemeProvider, useTheme } from "next-themes";
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "@unsend/ui",
|
||||
"name": "@usesend/ui",
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"main": "./index.ts",
|
||||
@@ -17,10 +17,10 @@
|
||||
"@types/react": "^19.1.2",
|
||||
"@types/react-dom": "^19.1.2",
|
||||
"@types/react-syntax-highlighter": "^15.5.13",
|
||||
"@unsend/eslint-config": "workspace:*",
|
||||
"@unsend/tailwind-config": "workspace:*",
|
||||
"@unsend/typescript-config": "workspace:*",
|
||||
"eslint": "^9.25.1",
|
||||
"@usesend/eslint-config": "workspace:*",
|
||||
"@usesend/tailwind-config": "workspace:*",
|
||||
"@usesend/typescript-config": "workspace:*",
|
||||
"eslint": "^8.57.1",
|
||||
"postcss": "^8.5.3",
|
||||
"prettier": "^3.5.3",
|
||||
"prettier-plugin-tailwindcss": "^0.6.11",
|
||||
@@ -60,4 +60,4 @@
|
||||
"tailwindcss-animate": "^1.0.7",
|
||||
"zod": "^3.24.3"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -39,20 +39,23 @@ const SheetOverlay = React.forwardRef<
|
||||
|
||||
SheetOverlay.displayName = SheetPrimitive.Overlay.displayName;
|
||||
|
||||
const sheetVariants = cva("fixed z-50 gap-4 bg-background p-6 shadow-lg", {
|
||||
variants: {
|
||||
side: {
|
||||
top: "inset-x-0 top-0 border-b",
|
||||
bottom: "inset-x-0 bottom-0 border-t",
|
||||
left: "inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",
|
||||
right:
|
||||
"inset-y-0 right-[32px] h-[95%] rounded-2xl my-auto w-3/4 border-l sm:max-w-sm",
|
||||
const sheetVariants = cva(
|
||||
"fixed z-50 grid gap-4 rounded-2xl border-2 bg-popover p-6 shadow-lg",
|
||||
{
|
||||
variants: {
|
||||
side: {
|
||||
top: "inset-x-0 top-0",
|
||||
bottom: "inset-x-0 bottom-0",
|
||||
left: "inset-y-0 left-0 h-full w-3/4 sm:max-w-sm",
|
||||
right:
|
||||
"inset-y-0 right-[32px] h-[95%] my-auto w-3/4 sm:max-w-sm",
|
||||
},
|
||||
},
|
||||
},
|
||||
defaultVariants: {
|
||||
side: "right",
|
||||
},
|
||||
});
|
||||
defaultVariants: {
|
||||
side: "right",
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
interface SheetContentProps
|
||||
extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>,
|
||||
|
54
packages/ui/src/typography.tsx
Normal file
54
packages/ui/src/typography.tsx
Normal file
@@ -0,0 +1,54 @@
|
||||
import * as React from "react";
|
||||
import { cn } from "../lib/utils";
|
||||
|
||||
// Simple typography primitives: H1, H2, BodyText
|
||||
// H1/H2 use mono font, slightly bolder and larger per request
|
||||
|
||||
export interface TypographyProps extends React.HTMLAttributes<HTMLElement> {
|
||||
asChild?: boolean;
|
||||
}
|
||||
|
||||
export const H1 = React.forwardRef<HTMLHeadingElement, TypographyProps>(
|
||||
({ className, ...props }, ref) => (
|
||||
<h1
|
||||
ref={ref}
|
||||
className={cn(
|
||||
// font-mono, larger and a bit bolder
|
||||
" font-mono text-xl font-medium",
|
||||
className
|
||||
)}
|
||||
{...props}
|
||||
/>
|
||||
)
|
||||
);
|
||||
H1.displayName = "H1";
|
||||
|
||||
export const H2 = React.forwardRef<HTMLHeadingElement, TypographyProps>(
|
||||
({ className, ...props }, ref) => (
|
||||
<h2
|
||||
ref={ref}
|
||||
className={cn(
|
||||
// font-mono, slightly smaller than H1, bold
|
||||
"font-mono text-lg",
|
||||
className
|
||||
)}
|
||||
{...props}
|
||||
/>
|
||||
)
|
||||
);
|
||||
H2.displayName = "H2";
|
||||
|
||||
export const BodyText = React.forwardRef<HTMLParagraphElement, TypographyProps>(
|
||||
({ className, ...props }, ref) => (
|
||||
<p
|
||||
ref={ref}
|
||||
className={cn(
|
||||
// default body text styling
|
||||
"leading-7 text-foreground/90",
|
||||
className
|
||||
)}
|
||||
{...props}
|
||||
/>
|
||||
)
|
||||
);
|
||||
BodyText.displayName = "BodyText";
|
@@ -1,5 +1,5 @@
|
||||
import { type Config } from "tailwindcss";
|
||||
import sharedConfig from "@unsend/tailwind-config/tailwind.config";
|
||||
import sharedConfig from "@usesend/tailwind-config/tailwind.config";
|
||||
|
||||
export default {
|
||||
...sharedConfig,
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"extends": "@unsend/typescript-config/react-library.json",
|
||||
"extends": "@usesend/typescript-config/react-library.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "dist"
|
||||
},
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"extends": "@unsend/typescript-config/react-library.json",
|
||||
"extends": "@usesend/typescript-config/react-library.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "dist"
|
||||
},
|
||||
|
Reference in New Issue
Block a user