Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
220cecd
Added: Button Type Added.
Arifulislam5577 Dec 25, 2023
cdb47a1
Added: Chart tooltip button configuration added.
Arifulislam5577 Dec 25, 2023
a8105f5
Merge branch 'main' of https://github.com/StaticMania/keep-react into…
Arifulislam5577 Jan 1, 2024
4126fe4
Tested: Button component restructured.
Arifulislam5577 Jan 2, 2024
fdf5cf7
Updated: Button component updated.
Arifulislam5577 Jan 12, 2024
6746c5f
Merge branch 'main' of https://github.com/StaticMania/keep-react into…
Arifulislam5577 Jan 12, 2024
e2cbfc3
Updated: Carousel component updated.
Arifulislam5577 Jan 12, 2024
0a1f415
Updated: Accordion Component Updated.
Arifulislam5577 Jan 14, 2024
8d8f61a
Updated: Alert component updated.
Arifulislam5577 Jan 16, 2024
9f114a1
Start Updating avatar component.
Arifulislam5577 Jan 17, 2024
3a27eb1
Updated: Breadcrumb component updated.
Arifulislam5577 Jan 19, 2024
2513526
Updated: Breadcrumb component updated.
Arifulislam5577 Jan 19, 2024
b300c6c
Removed: Remove component global context.
Arifulislam5577 Jan 21, 2024
0651bf5
Updated: Next server component.
Arifulislam5577 Jan 22, 2024
3b88060
Replace phosphor icon to svg icon.
Arifulislam5577 Jan 23, 2024
f0df737
Merge branch 'main' of https://github.com/StaticMania/keep-react into…
Arifulislam5577 Jan 24, 2024
d279fee
Updated: Update Slider component.
Arifulislam5577 Jan 24, 2024
7a44545
Updated: avatar component updated.
Arifulislam5577 Jan 28, 2024
2eb6983
Updated: Empty component updated.
Arifulislam5577 Jan 28, 2024
a05dbeb
Updated: Progress component updated.
Arifulislam5577 Feb 4, 2024
929cd53
Updated: Badge component updated.
Arifulislam5577 Feb 4, 2024
6d5c55f
Updated: Play component updated.
Arifulislam5577 Feb 5, 2024
0f08832
Added: Divider component added.
Arifulislam5577 Feb 6, 2024
0cee076
Updated: Upload component updated processing.
Arifulislam5577 Feb 7, 2024
1b592b7
Updated: Upload component updated.
Arifulislam5577 Feb 8, 2024
e6e552e
Fixed: Sonalint error fixed.
Arifulislam5577 Feb 8, 2024
322dfa2
Updated: Tabs component updated.
Arifulislam5577 Feb 11, 2024
44ece6c
Deleted: CSS Theme preview deleted.
Arifulislam5577 Feb 11, 2024
de3d340
Updated: Pagination component updated.
Arifulislam5577 Feb 12, 2024
82a0af6
Updated: Skeleton Component updated.
Arifulislam5577 Feb 12, 2024
722886c
Added: Pagination theme interface added.
Arifulislam5577 Feb 12, 2024
1eb64d3
Updated: Rating component updated.
Arifulislam5577 Feb 12, 2024
e7f1aa3
Updated: Popover component updated.
Arifulislam5577 Feb 14, 2024
1787dcc
Fixed: Progress component Issue fixed.
Arifulislam5577 Feb 14, 2024
37b3080
Updated: Dropdown component updating.
Arifulislam5577 Feb 18, 2024
ce72d53
Updated: Dropdown component updated.
Arifulislam5577 Feb 20, 2024
116f8c6
Updated: Typography component updated.
Arifulislam5577 Feb 20, 2024
0d7c2e7
Updated: Component API Table updated.
Arifulislam5577 Feb 20, 2024
09b2ccd
Fixed: Conflict Issue fixed.
Arifulislam5577 Feb 21, 2024
d49c2fa
Updated: Typography update in latest component.
Arifulislam5577 Feb 21, 2024
6d574ee
Updated: Input component updated.
Arifulislam5577 Feb 22, 2024
f59c2d3
Updated: Checkbox component updated.
Arifulislam5577 Feb 25, 2024
e78994e
Updated: Text area component udated.
Arifulislam5577 Feb 25, 2024
435a64c
Updated: Number Input Updated.
Arifulislam5577 Feb 26, 2024
1245249
Removed: Remove unused code.
Arifulislam5577 Feb 26, 2024
ac4bd0c
Updated: Number Input documentation updated.
Arifulislam5577 Feb 27, 2024
7efdcc8
Updated: Sidebar component updated.
Arifulislam5577 Feb 27, 2024
a057f18
Updated: Empty component updated.
Arifulislam5577 Mar 1, 2024
7ec8c85
Updated: Accordion Component.
Arifulislam5577 Mar 1, 2024
8f2e8d5
Updated: Alert, Avatar & Badge updated.
Arifulislam5577 Mar 1, 2024
9fcdc76
Updated: Button and button group updated.
Arifulislam5577 Mar 1, 2024
843c31e
Updated: skeleton pagination play spinner tabs.
Arifulislam5577 Mar 1, 2024
68d3972
Updated: Modal component updated.
Arifulislam5577 Mar 2, 2024
65d04a9
Fixed: Interface export issue fixed.
Arifulislam5577 Mar 2, 2024
057021e
Updated: Update Home page design.
Arifulislam5577 Mar 4, 2024
690b547
Fixed: Component Issue Fixed.
Arifulislam5577 Mar 4, 2024
99601f1
Deleted: Unused code deleted.
Arifulislam5577 Mar 4, 2024
da917c5
Updated: Card Component updated.
Arifulislam5577 Mar 5, 2024
82f8bb8
Updated: Card Component updated.
Arifulislam5577 Mar 5, 2024
16d6e5e
Updated: Notification component updated.
Arifulislam5577 Mar 6, 2024
53ea8e3
Updated: Tag component updated.
Arifulislam5577 Mar 6, 2024
01f4242
Updated: Redme file updated.
Arifulislam5577 Mar 6, 2024
01a9a33
Updated: Home Page updated.
Arifulislam5577 Mar 8, 2024
dbe5c1b
Udated: community style updated.
Arifulislam5577 Mar 11, 2024
b3ca5c1
Updated: Home page updated.
Arifulislam5577 Mar 11, 2024
76e6d5b
Fixed: Checkbox issue fixed.
Arifulislam5577 Mar 11, 2024
ce8ae62
Fixed: Checkbox Issue fixed.
Arifulislam5577 Mar 11, 2024
2750caa
Link Added: Footer figma link added.
Arifulislam5577 Mar 11, 2024
230caaf
Fixed: Checkbox spelling typo issue fixed.
Arifulislam5577 Mar 11, 2024
ce8c3b1
Fixed: Checkbox spelling typo issue fixed.
Arifulislam5577 Mar 11, 2024
eff02c0
Fixed: Checkbox spelling typo issue fixed.
Arifulislam5577 Mar 11, 2024
e966e54
Fixed: Checkbox spelling typo issue fixed.
Arifulislam5577 Mar 11, 2024
043496c
Fixed: Test area spelling typo issue fixed.
Arifulislam5577 Mar 11, 2024
73d797a
Fixed: Textarea spelling import mistake fixed.
Arifulislam5577 Mar 11, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
24 changes: 0 additions & 24 deletions .storybook/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -1056,30 +1056,6 @@ input[type='number'] {
letter-spacing: -0.5px;
}

.description-1 {
font-size: 1.875rem;
line-height: 2.625rem;
letter-spacing: -0.5px;
}

.description-2 {
font-size: 1.75rem;
line-height: 2.625rem;
letter-spacing: -0.5px;
}

.description-3 {
font-size: 1.625rem;
line-height: 2.5rem;
letter-spacing: -0.5px;
}

.description-4 {
font-size: 1.5rem;
line-height: 2.25rem;
letter-spacing: -0.5px;
}

.body-1 {
font-size: 1.375rem;
line-height: 1.875rem;
Expand Down
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"css.lint.unknownAtRules": "ignore"
"css.lint.unknownAtRules": "ignore",
"cSpell.words": ["embla", "Nuxt"]
}
59 changes: 34 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,48 +19,54 @@ Keep React is an open-source component library built on Tailwind CSS and React.j

## Installation

### Vite React Application
## Vite React Application

After creating a React application with Vite, follow these steps to
install Keep React:
Setting Up Keep React in Vite React Application

`Step 1:` Install Tailwind CSS
`Step 1:` Create a Vite React Application

```console
npm create vite@latest my-project -- --template react
cd my-project
```

`Step 2:` Install Tailwind CSS

```console
npm i autoprefixer postcss tailwindcss
npx tailwindcss init -p
```

`Step 2:` Install Keep React:
`Step 3:` Install Keep React:

```console
npm i keep-react
npm i keep-react phosphor-react
```

Or with Yarn

```console
yarn add keep-react
yarn add keep-react phosphor-react
```

Or with Pnpm

```console
pnpm add keep-react
pnpm add keep-react phosphor-react
```

`Step 3:` Go to the `tailwind.config.js` file and paste the
`Step 4:` Go to the `tailwind.config.js` file and paste the
following code:

```jsx
import keepPreset from 'keep-react/preset'
export default {
content: ['node_modules/keep-react/**/*.{js,jsx,ts,tsx}'],
content: ['./index.html', './src/**/*.{js,ts,jsx,tsx}', 'node_modules/keep-react/**/*.{js,jsx,ts,tsx}'],
presets: [keepPreset],
}
```

`Step 4:` Add Tailwind CSS to index.css File:
`Step 5:` Add Tailwind CSS to index.css File:

```css
@import 'keep-react/css';
Expand All @@ -69,49 +75,52 @@ export default {
@tailwind utilities;
```

### Next JS Application
## Next JS Application

You can easily integrate `keep-react` into your Next.js application. Starting from Next.js version 13.4, the app router automatically installs Tailwind CSS, eliminating the need for a separate Tailwind CSS installation. If you have already installed Tailwind CSS as part of the Next.js application setup, you can proceed with Step 2. Otherwise, start with Step 1.
You can easily integrate `keep-react` into your Next.js application.

After creating a Next JS application, follow these steps to
install Keep React:

`Step 1:` Install Tailwind CSS
`Step 1:` Install Next Js Application

```console
npm i autoprefixer postcss tailwindcss
npx tailwindcss init -p
npx create-next-app@latest
```

Ensure that you select `tailwindcss` as a dependency for your application during the setup.

`Would you like to use Tailwind CSS? -- Yes`

`Step 2:` Install Keep React

```console
npm i keep-react
npm i keep-react phosphor-react
```

Or with Yarn

```console
yarn add keep-react
yarn add keep-react phosphor-react
```

Or with Pnpm

```console
pnpm add keep-react
pnpm add keep-react phosphor-react
```

`Step 3:` Go to the `tailwind.config.js` file and paste the
following code

```js
module.exports = {
content: ['node_modules/keep-react/**/*.{js,jsx,ts,tsx}'],
content: [
// ... (existing content)
'./node_modules/keep-react/**/*.{js,jsx,ts,tsx}',
],
presets: [require('keep-react/preset')],
}
```

`Step 4:` Add Tailwind CSS to globals.css File:
`Step 4:` Add Tailwind CSS to `globals.css` File:

```css
@import 'keep-react/css';
Expand All @@ -128,7 +137,7 @@ Congratulations! You have successfully installed the Keep React. Now you can imp
'use client'
import { Button } from 'keep-react'
const App = () => {
return <Button size="md">Default</Button>
return <Button>Button</Button>
}
export default App
```
Expand Down
14 changes: 8 additions & 6 deletions app/components/CodePreview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,27 @@ import { ReactNode, useState } from 'react'
import { PrismLight as SyntaxHighlighter } from 'react-syntax-highlighter'
import { coldarkDark } from 'react-syntax-highlighter/dist/esm/styles/prism'
import useCopy from '../../hooks/useCopy'
import { cn } from '../src/helpers/cn'

interface CodePreviewProps {
children: ReactNode
code: string
github?: string
className?: string
}

const CodePreview = ({ children, code, github }: CodePreviewProps) => {
const CodePreview = ({ children, code, github, className }: CodePreviewProps) => {
const [active, setActive] = useState(0)
const { copy, copyToClipboard } = useCopy()
const githubUrl = `https://github.com/StaticMania/keep-react/tree/main/app/src/components/${github}`

return (
<div className="my-10 w-full overflow-hidden rounded-md border border-metal-200 shadow-small">
<div className="my-10 w-full overflow-hidden rounded-xl border border-metal-200 shadow-small">
<div className="-mb-px flex flex-wrap border-b border-metal-200 bg-metal-900 px-5 text-center">
<button
type="button"
onClick={() => setActive(0)}
className={`-mb-[0.7px] flex items-center justify-center border-b border-b-transparent px-5 py-3 text-body-5 font-medium text-metal-400 first:ml-0 ${
className={`-mb-[0.7px] flex items-center justify-center border-b border-b-transparent px-5 py-3 text-body-4 font-medium text-metal-400 first:ml-0 ${
active === 0 ? '!border-b-white text-white' : ''
}`}
id="preview-btn">
Expand All @@ -32,7 +34,7 @@ const CodePreview = ({ children, code, github }: CodePreviewProps) => {
<button
id="code-btn"
onClick={() => setActive(1)}
className={` flex items-center justify-center border-b border-b-transparent px-5 py-3 text-body-5 font-medium text-metal-400 first:ml-0 ${
className={` flex items-center justify-center border-b border-b-transparent px-5 py-3 text-body-4 font-medium text-metal-400 first:ml-0 ${
active === 1 ? '!border-b-metal-100 text-white' : ''
}`}>
Code
Expand All @@ -54,7 +56,7 @@ const CodePreview = ({ children, code, github }: CodePreviewProps) => {
className="flex h-8 w-8 items-center justify-center rounded-md border-2 border-metal-800 bg-metal-900 transition-all duration-300 hover:border-transparent hover:bg-metal-700 md:h-9 md:w-9"
onClick={() => copyToClipboard(code)}>
{copy ? (
<span className="flex items-center text-body-6">
<span className="flex items-center text-body-5">
<Check size={20} color="white" />
</span>
) : (
Expand All @@ -81,7 +83,7 @@ const CodePreview = ({ children, code, github }: CodePreviewProps) => {
</SyntaxHighlighter>
</div>
) : (
<div className="flex w-full items-center justify-center bg-white px-2 py-3 md:p-6">
<div className={cn('flex w-full items-center justify-center bg-white px-2 py-3 md:p-6', className)}>
<div className="h-full w-full overflow-auto">{children}</div>
</div>
)}
Expand Down
Loading