Skip to content

Commit 9a85207

Browse files
Update: Keep React Version 1.6.0.
* Added: Select component added. * Added: Input OTP component added. * Fixed: Button Issue fixed. * Fixed: Popover and Modal Issue fixed. * Updated: Drawer component updated. * Updated: Dropdown component updated. * Updated: Component updated. * Fixed: Search Bar Issue fixed. * Update: Search bar padding. * Updated: Steps component updated. * Added: Table data file added. * Updated: Blog page updated. * Fixed: CSS Variable removed. * Fixed: Toast issue fixed. * Added: Introduction page added. * Fixed: Chart tooltip issue fixed.
1 parent b1d6c57 commit 9a85207

File tree

466 files changed

+9965
-8646
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

466 files changed

+9965
-8646
lines changed

.vscode/settings.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
{
22
"css.lint.unknownAtRules": "ignore",
3-
"cSpell.words": ["embla", "Nuxt"]
3+
"cSpell.words": ["embla", "Nuxt"],
4+
"tailwindCSS.experimental.classRegex": [
5+
["keepTw\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"],
6+
["cn\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"]
7+
]
48
}

CHANGELOG.md

Lines changed: 44 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file.
44

55
### v1.0.1
66

7-
We are thrilled to announce the initial release of Keep React, our open-source component library built on React and Tailwind CSS. This release marks the beginning of our journey in providing a collection of pre-designed UI components to simplify web application development.
7+
We are thrilled to announce the initial release of Keep React, our open-source component library built on React and Tailwind CSS. This release marks the beginning of our journey in providing a collection of pre-designed UI components to simplify web application development.
88

99
### Key Features
1010

@@ -16,23 +16,50 @@ All notable changes to this project will be documented in this file.
1616

1717
### v1.0.2 (2023-11-17)
1818

19-
- Fixed Typography Error
20-
- Update Documentation
21-
- Add className Props in every component
22-
- customClass props removed with className props
19+
- Fixed Typography Error
20+
- Update Documentation
21+
- Add className Props in every component
22+
- customClass props removed with className props
2323

24-
### v1.1.0 (2023-12-18)
24+
### v1.1.0 (2023-12-18)
2525

26-
#### Features
27-
- Alert component props and structure changed
28-
- Accordion component props and structure changed
29-
- Notification component props and structure changed
30-
- Popover component props and structure changed
31-
- Added Modal and Notification component open animation
32-
- Added Typography component
33-
- CSS Import Style changed
34-
- Keep Preset import styles changed
26+
#### Features
27+
28+
- Alert component props and structure changed
29+
- Accordion component props and structure changed
30+
- Notification component props and structure changed
31+
- Popover component props and structure changed
32+
- Added Modal and Notification component open animation
33+
- Added Typography component
34+
- CSS Import Style changed
35+
- Keep Preset import styles changed
3536

3637
#### Bug fixes
37-
- Date Picker Type Issue
38-
- Popover width Issue
38+
39+
- Date Picker Type Issue
40+
- Popover width Issue
41+
42+
### v1.6.0 (2024-10-13)
43+
44+
#### Features
45+
46+
- Accordion component restructure
47+
- Alert color update
48+
- Avatar component restructure
49+
- Badge padding update
50+
- Breadcrumb component restructure
51+
- Carousel bug fixed
52+
- Charts new example added
53+
- Checkbox new variant
54+
- Drawer component package changed
55+
- Input OTP component added
56+
- Modal Animation changed
57+
- Notification Animation changed
58+
- Popover component package changed
59+
- Select component added
60+
- Steps component updated
61+
- Slider component color updated
62+
- Spinner component remove extra color variant
63+
- Tabs component package changed
64+
- Tooltip component package changed
65+
- Toast component configure updated

Contribute.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,6 @@ Ready to contribute? Here's how to get started:
4444

4545
- [Fork Keep React on GitHub](https://github.com/StaticMania/keep-react/fork)
4646
- [Browse Open Issues](https://github.com/StaticMania/keep-react/issues)
47-
- [Read the Documentation](https://react.keepdesign.io/docs/getting-started/introduction)
47+
- [Read the Documentation](https://react.keepdesign.io/docs/getting-started/installation)
4848

4949
We're excited to have you as part of the Keep React community! Thank you for your support and contributions.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ export default App
147147

148148
## Components
149149

150-
The Keep React offers a wide range of components to build your user interfaces. For detailed usage and examples of each component, refer to our [component documentation](https://react.keepdesign.io/docs/getting-started/introduction).
150+
The Keep React offers a wide range of components to build your user interfaces. For detailed usage and examples of each component, refer to our [component documentation](https://react.keepdesign.io/docs/getting-started/installation).
151151

152152
## Contributing
153153

app/blog/[slug]/page.tsx

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,34 @@
1-
import Markdown from 'react-markdown'
2-
import getMarkDownContent from '~/utils/GetMarkDownContent'
3-
import getMarkDownData from '~/utils/GetMarkDownData'
1+
import { MDXRemote } from 'next-mdx-remote/rsc'
2+
import { Suspense } from 'react'
3+
import rehypePrettyCode from 'rehype-pretty-code'
4+
import BlogHeader from '~/app/components/BlogHeader'
5+
import { getBlogs } from '~/utils/getMdxContent'
46

57
export async function generateStaticParams() {
6-
const posts = getMarkDownData('data/blogs')
7-
8+
const posts = getBlogs()
89
return posts.map((post) => ({
910
slug: post.slug,
1011
}))
1112
}
1213

1314
const page = async ({ params }: { params: { slug: string } }) => {
14-
const folder = 'data/blogs/'
15-
const slug = params.slug
16-
const post: { [key: string]: any } = getMarkDownContent(folder, slug)
17-
18-
const { title, date } = post.data
15+
const posts = getBlogs()
16+
const post = posts.find((post) => post.slug === params.slug)
1917

2018
return (
2119
<section>
22-
<div className="mx-auto my-12 max-w-7xl px-6 text-center 2xl:px-0">
23-
<div className="py-12 text-left">
24-
<p className="mb-1 text-body-3 font-medium text-primary-500">{date}</p>
25-
<p className="text-heading-5 font-medium text-metal-900 dark:text-white">{title}</p>
26-
<hr className="my-5 block border-b border-b-metal-100 dark:border-b-metal-800" />
27-
<div className="mt-10">
28-
<Markdown className="post">{post.content}</Markdown>
29-
</div>
30-
</div>
20+
<div id="blog-content" className="mx-auto max-w-5xl overflow-hidden px-6 py-12 2xl:px-0">
21+
<Suspense fallback={<>Loading...</>}>
22+
<MDXRemote
23+
components={{ BlogHeader }}
24+
source={post?.content ? post.content : ''}
25+
options={{
26+
mdxOptions: {
27+
rehypePlugins: [[rehypePrettyCode, { theme: 'poimandres' }]],
28+
},
29+
}}
30+
/>
31+
</Suspense>
3132
</div>
3233
</section>
3334
)

app/blog/page.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
import getMarkDownData from '~/utils/GetMarkDownData'
1+
import { getBlogs } from '~/utils/getMdxContent'
22
import Blog from '../components/Blog'
33

44
const page = () => {
5-
const blogs: { slug: string; content: string; [key: string]: any }[] = getMarkDownData('data/blogs')
6-
5+
const blogs = getBlogs()
76
return (
87
<section>
98
<div className="-mt-2 py-20 ">
@@ -16,7 +15,7 @@ const page = () => {
1615
Keep React library continues to evolve with new features, bug fixes, and performance improvements.
1716
</p>
1817
</div>
19-
<div className="mt-12 grid grid-cols-1 gap-5 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4">
18+
<div className="mt-12 grid grid-cols-1 gap-x-6 gap-y-10 md:grid-cols-2 lg:grid-cols-3 ">
2019
{blogs?.map((blog) => <Blog key={blog.slug} {...blog} />)}
2120
</div>
2221
</div>

app/components/Blog.tsx

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,34 @@
11
'use client'
2+
import Image from 'next/image'
23
import Link from 'next/link'
34
import { FC } from 'react'
4-
import { Card, CardContent, CardTitle } from '../src'
5+
import KeepDarkLogo from '../../public/images/keep-dark.svg'
56

67
export interface BlogProps {
78
[key: string]: any
89
}
910

10-
const Blog: FC<BlogProps> = ({ title, date, keyFeatures, slug }) => {
11+
const Blog: FC<BlogProps> = ({ title, date, tag, slug, version }) => {
1112
return (
12-
<Card className="max-w-full lg:col-span-1">
13-
<CardContent className="flex flex-col justify-between gap-y-3 text-left">
14-
<p className="text-body-4 text-metal-600 dark:text-white">{date}</p>
15-
<CardTitle>{title}</CardTitle>
16-
<ul className="!mt-4 ml-5 list-disc space-y-1 text-body-4 font-normal text-metal-600 dark:text-metal-300">
17-
{keyFeatures?.map((item: string) => <li key={item}>{item}</li>)}
18-
</ul>
19-
20-
<Link
21-
href={`/blog/${slug}`}
22-
className="flex w-full items-center justify-center rounded-lg bg-metal-900 px-5 py-2.5 text-body-4 font-medium text-white transition-all duration-150 hover:bg-metal-700 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-metal-200 focus-visible:ring-offset-2 active:focus:scale-95 disabled:cursor-not-allowed disabled:bg-metal-200 dark:bg-metal-800">
23-
Read More
24-
</Link>
25-
</CardContent>
26-
</Card>
13+
<div className="space-y-2.5">
14+
<Link
15+
href={`/blog/${slug}`}
16+
className="blog-post relative flex h-[200px] w-full flex-col items-center justify-center gap-2 rounded-xl border border-metal-800 bg-[#0D1015]">
17+
<Image src={KeepDarkLogo} alt="Keep React" width="100" height="40" />
18+
<p className="text-body-2 font-semibold text-white">{version}</p>
19+
</Link>
20+
<div className="space-y-2.5">
21+
<p className="text-body-5 text-primary-500">{tag}</p>
22+
<div className="flex items-center justify-between">
23+
<Link
24+
href={`/blog/${slug}`}
25+
className="cursor-pointer text-body-3 text-metal-900 dark:text-white dark:hover:text-primary-500">
26+
{title}
27+
</Link>
28+
<p className="text-body-4 text-metal-600 dark:text-metal-300">{date}</p>
29+
</div>
30+
</div>
31+
</div>
2732
)
2833
}
2934

app/components/BlogHeader.tsx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import Image from 'next/image'
2+
import KeepDarkLogo from '../../public/images/keep-dark.svg'
3+
4+
const BlogHeader = ({ title }: { title: string }) => {
5+
return (
6+
<div className="blog-post relative mb-6 flex h-[200px] w-full flex-col items-center justify-center gap-2 rounded-xl border border-metal-800 bg-[#0D1015] lg:h-[300px]">
7+
<Image src={KeepDarkLogo} alt="Keep React" width="130" height="55" />
8+
<h1 className="text-heading-6 font-semibold text-white lg:text-heading-4">{title}</h1>
9+
</div>
10+
)
11+
}
12+
13+
export default BlogHeader

app/components/CodeHighlight.tsx

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { FC, useState } from 'react'
44
import { PrismLight as SyntaxHighlighter } from 'react-syntax-highlighter'
55
import { coldarkDark } from 'react-syntax-highlighter/dist/esm/styles/prism'
66
import useCopy from '~/hooks/useCopy'
7-
import { Tooltip, TooltipAction, TooltipContent } from '../src'
7+
import { toast } from '../src'
88
import { cn } from '../src/utils/cn'
99

1010
interface CodeHighlightProps {
@@ -33,20 +33,19 @@ const CodeHighlight: FC<CodeHighlightProps> = ({ code }) => {
3333
))}
3434
</div>
3535
<div>
36-
<Tooltip placement="top">
37-
<TooltipAction asChild>
38-
<button onClick={() => copyToClipboard(Object.values(code)[codeType])} className="mx-6 my-2.5">
39-
{copy ? (
40-
<Check size={20} weight="light" color="#fff" />
41-
) : (
42-
<Copy size={20} weight="light" color="#fff" />
43-
)}
44-
</button>
45-
</TooltipAction>
46-
<TooltipContent>
47-
<p className="text-body-5 font-medium text-white dark:text-metal-900">{copy ? 'Copied' : 'Copy Code'}</p>
48-
</TooltipContent>
49-
</Tooltip>
36+
<button
37+
onClick={() => {
38+
copyToClipboard(Object.values(code)[codeType])
39+
toast.success('Code Copied!', {
40+
classNames: {
41+
toast:
42+
'dark:!bg-metal-900/30 dark:!text-white dark:!border-metal-800 !bg-white !text-metal-900 !border-metal-50',
43+
},
44+
})
45+
}}
46+
className="mx-6 my-2.5">
47+
{copy ? <Check size={20} weight="light" color="#fff" /> : <Copy size={20} weight="light" color="#fff" />}
48+
</button>
5049
</div>
5150
</div>
5251
<div>

app/components/CodeHighlightPreview.tsx

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { forwardRef, HTMLAttributes, useState } from 'react'
44
import { PrismLight as SyntaxHighlighter } from 'react-syntax-highlighter'
55
import { coldarkDark } from 'react-syntax-highlighter/dist/esm/styles/prism'
66
import useCopy from '~/hooks/useCopy'
7-
import { Tooltip, TooltipAction, TooltipContent } from '../src'
7+
import { toast } from '../src'
88
import { cn } from '../src/utils/cn'
99

1010
interface CodeHighlightPreviewProps extends HTMLAttributes<HTMLDivElement> {
@@ -23,10 +23,10 @@ const CodeHighlightPreview = forwardRef<HTMLDivElement, CodeHighlightPreviewProp
2323
<div
2424
ref={ref}
2525
className={cn(
26-
'my-10 max-w-full overflow-hidden rounded-xl border border-metal-200 dark:border-metal-800 ',
26+
'my-10 max-w-full overflow-hidden rounded-xl border border-metal-200 dark:border-metal-800',
2727
className,
2828
)}>
29-
<div className="flex items-center justify-between bg-[#0D1015] dark:bg-metal-900/60">
29+
<div className="flex items-center justify-between bg-[#0D1015] dark:bg-metal-900/90">
3030
<div className="flex items-center">
3131
<button
3232
type="button"
@@ -55,22 +55,19 @@ const CodeHighlightPreview = forwardRef<HTMLDivElement, CodeHighlightPreviewProp
5555
))}
5656
</div>
5757
<div>
58-
<Tooltip placement="top">
59-
<TooltipAction asChild>
60-
<button
61-
onClick={() => copyToClipboard(Object.values(code)[active === 0 ? 0 : active - 1])}
62-
className="mx-6 my-2.5">
63-
{copy ? (
64-
<Check size={20} weight="light" color="#fff" />
65-
) : (
66-
<Copy size={20} weight="light" color="#fff" />
67-
)}
68-
</button>
69-
</TooltipAction>
70-
<TooltipContent>
71-
<p className="text-body-5 font-medium text-white dark:text-white">{copy ? 'Copied' : 'Copy Code'}</p>
72-
</TooltipContent>
73-
</Tooltip>
58+
<button
59+
onClick={() => {
60+
copyToClipboard(Object.values(code)[active === 0 ? 0 : active - 1])
61+
toast.success('Code Copied!', {
62+
classNames: {
63+
toast:
64+
'dark:!bg-metal-900/30 dark:!text-white dark:!border-metal-800 !bg-white !text-metal-900 !border-metal-50',
65+
},
66+
})
67+
}}
68+
className="mx-6 my-2.5">
69+
{copy ? <Check size={20} weight="light" color="#fff" /> : <Copy size={20} weight="light" color="#fff" />}
70+
</button>
7471
</div>
7572
</div>
7673

0 commit comments

Comments
 (0)