Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ on:
release:
types:
- published

jobs:
build-and-deploy:
runs-on: ubuntu-latest

steps:
- name: Check out the repository
uses: actions/checkout@v4

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3

- name: DockerHub login
uses: docker/login-action@v3
with:
Expand All @@ -26,7 +26,7 @@ jobs:
run: |
docker build -t devarifhossain/retroui:1.1.9 ./
docker push devarifhossain/retroui:1.1.9

# - name: Set up SSH
# uses: webfactory/ssh-agent@v0.9.0
# with:
Expand All @@ -35,7 +35,7 @@ jobs:
# - name: Add VPS to known_hosts
# run: |
# ssh-keyscan -H ${{ secrets.VPS_HOST }} >> ~/.ssh/known_hosts

# - name: Deploy to VPS
# run: |
# ssh ${{ secrets.VPS_USERNAME }}@${{ secrets.VPS_HOST }} "cd /root/retroui && git pull && docker compose -f ./infra/docker-compose.prod.yml up web --build -d"
# ssh ${{ secrets.VPS_USERNAME }}@${{ secrets.VPS_HOST }} "cd /root/retroui && git pull && docker compose -f ./infra/docker-compose.prod.yml up web --build -d"
5 changes: 5 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"tabWidth": 2,
"semi": true,
"printWidth": 80
}
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ Thank you for your interest in contributing to RetroUI 🙏. I hope this guide t

## Adding a New Component

1. Create the main component in `/components/ui/NewComponent/NewComponent.tsx`
1. Create the main component in `/components/retroui/NewComponent/NewComponent.tsx`

```ts
export function NewComponent() {
return <div>This is your component.</div>;
}
```

2. Export your component in `/components/ui/NewComponent/index.ts` and `/components/ui/index.ts`
2. Export your component in `/components/retroui/NewComponent/index.ts` and `/components/retroui/index.ts`

```ts
export * from "./NewComponent";
Expand Down
2 changes: 1 addition & 1 deletion app/(docs)/docs/[[...slug]]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { allDocs } from "contentlayer/generated";
import { notFound } from "next/navigation";
import { format } from "date-fns";
import MDX from "@/components/MDX";
import { Text } from "@/components/ui";
import { Text } from "@/components/retroui/Text";
import { Metadata } from "next";
import { MoveRightIcon, MoveUpRightIcon } from "lucide-react";

Expand Down
2 changes: 1 addition & 1 deletion app/(marketing)/blogs/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { allBlogs } from "contentlayer/generated";
import { notFound } from "next/navigation";
import { format } from "date-fns";
import MDX from "@/components/MDX";
import { Avatar, Badge, Button, Text } from "@/components/ui";
import { Avatar, Badge, Button, Text } from "@/components/retroui";
import { Metadata } from "next";
import { MoveRightIcon, MoveUpRightIcon } from "lucide-react";
import Image from "next/image";
Expand Down
2 changes: 1 addition & 1 deletion app/(marketing)/blogs/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { allBlogs } from "@/.contentlayer/generated";
import { Card, Text } from "@/components/ui";
import { Card, Text } from "@/components/retroui";
import Image from "next/image";
import Link from "next/link";
import React from "react";
Expand Down
6 changes: 3 additions & 3 deletions app/(marketing)/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
Card,
Avatar,
Badge,
} from "@/components/ui";
} from "@/components/retroui";
import AccordionStyleDefault from "@/preview/components/accordion-style-default";
import AlertStyleDefaultIcon from "@/preview/components/alert-style-with-icon";
import AvatarStyleCircle from "@/preview/components/avatar-style-circle-sizes";
Expand All @@ -32,7 +32,7 @@ async function getContributors(): Promise<
headers: {
"Content-Type": "application/json",
},
}
},
);

const contributorsList = await request.json();
Expand All @@ -47,7 +47,7 @@ async function getContributors(): Promise<
avatar: c.avatar_url,
username: c.login,
url: c.html_url,
})
}),
),
];
}
Expand Down
4 changes: 2 additions & 2 deletions app/(sink)/demo/components/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import {
TabsPanels,
TabsTrigger,
TabsTriggerList,
} from "@/components/ui";
import { Card } from "@/components/ui/Card";
} from "@/components/retroui";
import { Card } from "@/components/retroui/Card";
import BadgeStyleVariants from "@/preview/components/badge-style-variants";
import TestimonialCard from "@/preview/components/card-style-testimonial";
import { CheckCircle } from "lucide-react";
Expand Down
7 changes: 5 additions & 2 deletions app/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,11 @@

.text-outlined {
letter-spacing: 2px;
text-shadow: 0px 0px 0 var(--color-primary), 0px 0px 0 var(--color-primary),
4px 4px 0 var(--color-primary), 4px 4px 0 var(--color-primary);
text-shadow:
0px 0px 0 var(--color-primary),
0px 0px 0 var(--color-primary),
4px 4px 0 var(--color-primary),
4px 4px 0 var(--color-primary);
}

/* Syntax Highlighting stuff */
Expand Down
14 changes: 7 additions & 7 deletions app/robots.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import type { MetadataRoute } from 'next'
import type { MetadataRoute } from "next";

export default function robots(): MetadataRoute.Robots {
return {
rules: {
userAgent: '*',
allow: '/',
userAgent: "*",
allow: "/",
},
sitemap: 'https://retroui.dev/sitemap.xml',
}
}
sitemap: "https://retroui.dev/sitemap.xml",
};
}
4 changes: 2 additions & 2 deletions components/CodeBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import * as React from "react";
import { cn } from "@/lib/utils";
import { Button } from "@/components/ui";
import { Button } from "@/components/retroui";

interface ICodeBlock extends React.HTMLAttributes<HTMLPreElement> {}

Expand Down Expand Up @@ -33,7 +33,7 @@ export function CodeBlock({ className, children, ...props }: ICodeBlock) {
<pre
className={cn(
"overflow-x-auto rounded-sm bg-[#282A36] mt-3 mb-6 p-4",
className
className,
)}
{...props}
>
Expand Down
2 changes: 1 addition & 1 deletion components/ComponentShowcase.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { componentConfig } from "@/config";
import { TabGroup, TabList, TabPanels, TabPanel, Tab } from "@headlessui/react";
import React, { HTMLAttributes } from "react";
import { Button } from "./ui";
import { Button } from "./retroui";

interface IComponentShowcase extends HTMLAttributes<HTMLDivElement> {
name: keyof typeof componentConfig.examples;
Expand Down
2 changes: 1 addition & 1 deletion components/HamburgerMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { useState } from "react";
import SideNav from "./SideNav";
import { AlignJustify, X } from "lucide-react";
import { Button } from "@/components/ui";
import { Button } from "@/components/retroui";

export default function HamburgerMenu() {
const [isOpen, setIsOpen] = useState(false);
Expand Down
6 changes: 3 additions & 3 deletions components/JoinNewsletter.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";

import { Button, Text, Input } from "@/components/ui";
import { Button, Text, Input } from "@/components/retroui";
import { useState } from "react";

const INIT = "INIT";
Expand Down Expand Up @@ -79,7 +79,7 @@ export function JoinNewsletter() {

// build body
const formBody = `userGroup=${encodeURIComponent(
formStyles.userGroup
formStyles.userGroup,
)}&email=${encodeURIComponent(email)}&mailingLists=`;

// API request to add user to newsletter
Expand Down Expand Up @@ -108,7 +108,7 @@ export function JoinNewsletter() {
// check for cloudflare error
if (error.message === "Failed to fetch") {
setErrorMessage(
"Too many signups, please try again in a little while"
"Too many signups, please try again in a little while",
);
} else if (error.message) {
setErrorMessage(error.message);
Expand Down
4 changes: 2 additions & 2 deletions components/MDX.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";

import { Alert, Badge, Card, Text } from "@/components/ui";
import { Alert, Badge, Card, Text } from "@/components/retroui";
import { useMDXComponent } from "next-contentlayer/hooks";
import React, { AnchorHTMLAttributes, HTMLAttributes } from "react";
import { ComponentShowcase } from "./ComponentShowcase";
Expand Down Expand Up @@ -83,7 +83,7 @@ const components = (type: "doc" | "blog") => ({
<code
className={cn(
"relative rounded-sm bg-[#282A36] p-1 text-primary text-sm",
className
className,
)}
{...props}
>
Expand Down
2 changes: 1 addition & 1 deletion components/SideNav.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use client";

import { navConfig } from "@/config/navigation";
import { Badge, Text } from "@/components/ui";
import { Badge, Text } from "@/components/retroui";
import Link from "next/link";
import { usePathname } from "next/navigation";

Expand Down
2 changes: 1 addition & 1 deletion components/Testimonial.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Text, Card, Avatar } from "@/components/ui";
import { Text, Card, Avatar } from "@/components/retroui";

interface TestimonialCardProps {
quote: string;
Expand Down
2 changes: 1 addition & 1 deletion components/TopNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Link from "next/link";
import Image from "next/image";
import { GithubIcon } from "lucide-react";
import HamburgerMenu from "./HamburgerMenu";
import { Button, Text } from "@/components/ui";
import { Button, Text } from "@/components/retroui";
import { navConfig } from "@/config/navigation";

export default function TopNav() {
Expand Down
2 changes: 1 addition & 1 deletion components/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export * from "./ComponentShowcase";
export * from "./JoinNewsletter";
export * from "./JoinNewsletter";
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const AccordionItem = React.forwardRef<
ref={ref}
className={cn(
"border-2 border-black shadow-md hover:shadow-sm data-[state=open]:shadow-sm transition-all overflow-hidden",
className
className,
)}
{...props}
/>
Expand All @@ -32,7 +32,7 @@ const AccordionHeader = React.forwardRef<
ref={ref}
className={cn(
"flex flex-1 items-start justify-between px-4 py-2 font-head text-black cursor-pointer focus:outline-hidden [&[data-state=open]>svg]:rotate-180",
className
className,
)}
{...props}
>
Expand Down
2 changes: 1 addition & 1 deletion components/ui/Alert.tsx → components/retroui/Alert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { HtmlHTMLAttributes } from "react";
import { cva, type VariantProps } from "class-variance-authority";

import { cn } from "@/lib/utils";
import { Text } from "@/components/ui/Text";
import { Text } from "@/components/retroui/Text";

const alertVariants = cva("relative w-full border-2 border-black p-4", {
variants: {
Expand Down
4 changes: 2 additions & 2 deletions components/ui/Avatar.tsx → components/retroui/Avatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const Avatar = React.forwardRef<
ref={ref}
className={cn(
"relative flex h-14 w-14 border-2 border-black rounded-full overflow-hidden",
className
className,
)}
{...props}
/>
Expand All @@ -38,7 +38,7 @@ const AvatarFallback = React.forwardRef<
ref={ref}
className={cn(
"flex h-full w-full items-center justify-center rounded-full bg-muted bg-primary",
className
className,
)}
{...props}
/>
Expand Down
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions components/ui/Button.tsx → components/retroui/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const buttonVariants = cva(
size: "md",
variant: "default",
},
}
},
);

export interface IButtonProps
Expand All @@ -41,7 +41,7 @@ export const Button = React.forwardRef<HTMLButtonElement, IButtonProps>(
variant = "default",
...props
}: IButtonProps,
forwardedRef
forwardedRef,
) => (
<button
ref={forwardedRef}
Expand All @@ -50,7 +50,7 @@ export const Button = React.forwardRef<HTMLButtonElement, IButtonProps>(
>
{children}
</button>
)
),
);

Button.displayName = "Button";
2 changes: 1 addition & 1 deletion components/ui/Card.tsx → components/retroui/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const Card = ({ className, ...props }: ICardProps) => {
<div
className={cn(
"inline-block border-2 border-black shadow-md transition-all hover:shadow-xs",
className
className,
)}
{...props}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const Checkbox = ({
size,
variant,
}),
className
className,
)}
{...props}
>
Expand Down
Loading