-
-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
725 changed files
with
48,190 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
/.idea | ||
/__registry__ | ||
/public/registry | ||
ignore | ||
/.vercel | ||
/note.md | ||
delete-me.txt | ||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
.yarn/install-state.gz | ||
|
||
# testing | ||
/coverage | ||
|
||
/components/docs/generated/previews.json | ||
# next.js | ||
/.next/ | ||
/out/ | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
*.pem | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# local env files | ||
.env*.local | ||
.env | ||
|
||
# vercel | ||
.vercel | ||
|
||
# typescript | ||
*.tsbuildinfo | ||
next-env.d.ts | ||
|
||
# velite files | ||
.velite | ||
|
||
public/static |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Code of Conduct | ||
|
||
The Justd code of conduct is inspired by the Laravel and Ruby code of conduct. Any violations of this code may be reported to Irsyad ([email protected]): | ||
|
||
- Participants will respect and be tolerant of differing views and opinions. | ||
- Participants must ensure that their language and actions remain professional and free of personal attacks or disparaging remarks. | ||
- When interpreting the words and actions of others, participants should always assume good intentions. | ||
- Behavior that can reasonably be considered harassment or discrimination will not be tolerated. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
## Contribution Guide | ||
|
||
Thanks for jumping in to contribute at getjustd.com—we’re thrilled to have you on board! | ||
|
||
Quick ask: take a moment to review this doc before submitting your first pull request. Also, check out the open issues and pull requests to avoid doubling up on any efforts. | ||
|
||
## Getting Started | ||
|
||
1. Fork the repository. | ||
2. Clone the forked repository. | ||
3. Install the dependencies with `bun install`. | ||
4. Run the development server with `bun run dev`. | ||
5. Create a new branch: `git checkout -b my-branch-name`. | ||
6. Make your changes. | ||
7. Commit your changes: `git commit -m 'Add some feature'`. | ||
8. Push to the branch: `git push origin my-branch-name`. | ||
9. Submit a pull request. | ||
|
||
## Code of Conduct | ||
|
||
This project and everyone participating in it is governed by the [Justd Code of Conduct](https://github.com/justdlabs/justd/blob/main/CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to [[email protected]](mailto:[email protected]). | ||
|
||
## How to Contribute | ||
|
||
### Reporting Bugs | ||
|
||
Before creating bug reports, please check the existing issues as you might find out that you don't need to create one. When you are creating a bug report, please include as many details as possible. | ||
|
||
### Suggesting Enhancements | ||
|
||
Enhancement suggestions are tracked as GitHub issues. When you are creating an enhancement suggestion, please include as many details as possible. | ||
|
||
### Pull Requests | ||
|
||
Please follow these guidelines when submitting pull requests: | ||
|
||
1. Fork the repository and create your branch from `main`. | ||
2. Run `bun run lint` to check your code for linting errors. | ||
3. If you've added code that should be tested, add tests. | ||
4. Format your code with `bun run format`. | ||
5. Ensure everything is working as expected by running `bun run b` which will build the registry and generate the sidebar. | ||
6. Make sure your code lints. | ||
7. Make sure your commit messages are clear. | ||
|
||
## Folder Structure | ||
|
||
The folder structure is as follows: | ||
### Components | ||
The components folder is the core of this project, it contains `ui`, `docs` and `blocks` folders. | ||
``` | ||
components | ||
├── blocks | ||
├── code | ||
├── docs | ||
│ ├── anatomies | ||
│ ├── buttons ... | ||
│ ├── charts ... | ||
│ ├── collections ... | ||
│ ├── colors ... | ||
│ ├── controls ... | ||
│ ├── date-and-time ... | ||
│ ├── drag-and-drop ... | ||
│ ├── forms ... | ||
│ ├── media ... | ||
│ ├── navigation ... | ||
│ ├── outside ... | ||
│ ├── overlays ... | ||
│ ├── pickers ... | ||
│ ├── statuses ... | ||
│ └── surfaces ... | ||
├── experimental | ||
└── ui | ||
``` | ||
The core ui is inside `components/ui`, and the demo you see on the docs is inside `components/docs`. | ||
|
||
### Registry | ||
The registry is a file that contains all the components and their files. It is used to generate the `demo`, `ui`, `blocks` and `anatomies` on the docs. | ||
``` | ||
public/registry | ||
├── anatomies | ||
├── blocks | ||
│ ├── navbar ... | ||
│ └── sidebar ... | ||
├── demo | ||
│ ├── buttons ... | ||
│ ├── charts ... | ||
│ ├── collections ... | ||
│ ├── colors ... | ||
│ ├── controls ... | ||
│ ├── date-and-time ... | ||
│ ├── drag-and-drop | ||
│ ├── forms ... | ||
│ ├── media | ||
│ ├── navigation ... | ||
│ ├── outside | ||
│ ├── overlays ... | ||
│ ├── pickers ... | ||
│ ├── statuses ... | ||
│ └── surfaces ... | ||
├── docs | ||
│ └── installation | ||
└── ui | ||
``` | ||
|
||
All of this is generated by the `resources/scripts/build-registry.ts` script by running `bun run b`. | ||
|
||
## Code of Conduct | ||
|
||
The Justd code of conduct is inspired by the Laravel and Ruby code of conduct. Any violations of this code may be reported to Irsyad ([email protected]): | ||
|
||
- Participants will respect and be tolerant of differing views and opinions. | ||
- Participants must ensure that their language and actions remain professional and free of personal attacks or disparaging remarks. | ||
- When interpreting the words and actions of others, participants should always assume good intentions. | ||
- Behavior that can reasonably be considered harassment or discrimination will not be tolerated. | ||
|
||
|
||
## License | ||
|
||
By contributing to Justd, you agree that your contributions will be licensed under its MIT license. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,199 @@ | ||
import { BlockSandbox } from "@/components/code/block-sandbox" | ||
import { Header } from "@/components/header" | ||
import { Container } from "ui" | ||
|
||
export const metadata = { | ||
title: "Blocks", | ||
description: | ||
"Blocks offers a comprehensive collection of example guides demonstrating how to effectively use components in their entirety.", | ||
} | ||
|
||
export default function Page() { | ||
return ( | ||
<div> | ||
<Header> | ||
Blo | ||
<span className="text-muted-fg">cks</span> | ||
</Header> | ||
<Container className="py-6 space-y-16 sm:py-16"> | ||
<div className="flex flex-col gap-1"> | ||
<BlockSandbox | ||
{...{ | ||
isIframe: true, | ||
title: "Default Sidebar", | ||
defaultSelected: "app-sidebar.tsx", | ||
fullscreen: "/blocks/sidebar/sidebar-01", | ||
preview: "/blocks/sidebar/sidebar-01", | ||
expandKeys: ["components", "app"], | ||
initialRegistry: "blocks/sidebar/sidebar-01/app-sidebar", | ||
folders: { | ||
components: { | ||
ui: { | ||
"badge.tsx": "ui/badge", | ||
"separator.tsx": "ui/separator", | ||
"sheet.tsx": "ui/sheet", | ||
"tooltip.tsx": "ui/tooltip", | ||
"primitive.tsx": "ui/primitive", | ||
"button.tsx": "ui/button", | ||
"sidebar.tsx": "ui/sidebar", | ||
}, | ||
|
||
"app-sidebar.tsx": "blocks/sidebar/sidebar-01/app-sidebar", | ||
}, | ||
app: { | ||
"page.tsx": "blocks/sidebar/sidebar-01/page", | ||
"layout.tsx": "blocks/sidebar/sidebar-01/layout", | ||
"global.css": "docs/installation/main.css", | ||
}, | ||
}, | ||
}} | ||
/> | ||
|
||
<BlockSandbox | ||
{...{ | ||
isIframe: true, | ||
title: "Inset Sidebar", | ||
defaultSelected: "app-sidebar.tsx", | ||
fullscreen: "/blocks/sidebar/sidebar-03", | ||
preview: "/blocks/sidebar/sidebar-03", | ||
expandKeys: ["components", "app"], | ||
initialRegistry: "blocks/sidebar/app-sidebar", | ||
folders: { | ||
components: { | ||
ui: { | ||
"badge.tsx": "ui/badge", | ||
"separator.tsx": "ui/separator", | ||
"sheet.tsx": "ui/sheet", | ||
"tooltip.tsx": "ui/tooltip", | ||
"primitive.tsx": "ui/primitive", | ||
"button.tsx": "ui/button", | ||
"sidebar.tsx": "ui/sidebar", | ||
}, | ||
"app-sidebar.tsx": "blocks/sidebar/app-sidebar", | ||
}, | ||
app: { | ||
"page.tsx": "blocks/sidebar/sidebar-03/page", | ||
"layout.tsx": "blocks/sidebar/sidebar-03/layout", | ||
"global.css": "docs/installation/main.css", | ||
}, | ||
}, | ||
}} | ||
/> | ||
|
||
<BlockSandbox | ||
{...{ | ||
isIframe: true, | ||
title: "Floating Sidebar", | ||
defaultSelected: "app-sidebar.tsx", | ||
fullscreen: "/blocks/sidebar/sidebar-04", | ||
preview: "/blocks/sidebar/sidebar-04", | ||
expandKeys: ["components", "app"], | ||
initialRegistry: "blocks/sidebar/app-sidebar", | ||
folders: { | ||
components: { | ||
ui: { | ||
"badge.tsx": "ui/badge", | ||
"separator.tsx": "ui/separator", | ||
"sheet.tsx": "ui/sheet", | ||
"tooltip.tsx": "ui/tooltip", | ||
"primitive.tsx": "ui/primitive", | ||
"button.tsx": "ui/button", | ||
"sidebar.tsx": "ui/sidebar", | ||
}, | ||
"app-sidebar.tsx": "blocks/sidebar/app-sidebar", | ||
}, | ||
app: { | ||
"page.tsx": "blocks/sidebar/sidebar-04/page", | ||
"layout.tsx": "blocks/sidebar/sidebar-04/layout", | ||
"global.css": "docs/installation/main.css", | ||
}, | ||
}, | ||
}} | ||
/> | ||
|
||
<BlockSandbox | ||
{...{ | ||
title: "Default Navbar", | ||
defaultSelected: "navbar.tsx", | ||
fullscreen: "/blocks/navbar/navbar-00", | ||
preview: "blocks/navbar/navbar-00/app-navbar", | ||
expandKeys: ["components", "ui", "app"], | ||
initialRegistry: "ui/navbar", | ||
folders: { | ||
components: { | ||
ui: { | ||
"primitive.tsx": "ui/primitive", | ||
"button.tsx": "ui/button", | ||
"sheet.tsx": "ui/sheet", | ||
"navbar.tsx": "ui/navbar", | ||
}, | ||
"app-navbar.tsx": "blocks/navbar/navbar-00/app-navbar", | ||
}, | ||
app: { | ||
"global.css": "docs/installation/main.css", | ||
"page.tsx": "blocks/navbar/navbar-00/page", | ||
"layout.tsx": "blocks/navbar/navbar-00/layout", | ||
}, | ||
}, | ||
}} | ||
/> | ||
|
||
<BlockSandbox | ||
{...{ | ||
isIframe: true, | ||
title: "Inset Navbar", | ||
defaultSelected: "navbar.tsx", | ||
fullscreen: "/blocks/navbar/navbar-03", | ||
preview: "blocks/navbar/navbar-03", | ||
expandKeys: ["components", "ui", "app"], | ||
initialRegistry: "ui/navbar", | ||
folders: { | ||
components: { | ||
ui: { | ||
"primitive.tsx": "ui/primitive", | ||
"button.tsx": "ui/button", | ||
"sheet.tsx": "ui/sheet", | ||
"navbar.tsx": "ui/navbar", | ||
}, | ||
"app-navbar.tsx": "blocks/navbar/navbar-03/app-navbar", | ||
}, | ||
app: { | ||
"global.css": "docs/installation/main.css", | ||
"page.tsx": "blocks/navbar/navbar-03/page", | ||
"layout.tsx": "blocks/navbar/navbar-03/layout", | ||
}, | ||
}, | ||
}} | ||
/> | ||
|
||
<BlockSandbox | ||
{...{ | ||
title: "Floating Navbar", | ||
defaultSelected: "navbar.tsx", | ||
fullscreen: "/blocks/navbar/navbar-02", | ||
preview: "blocks/navbar/navbar-02/app-navbar", | ||
expandKeys: ["components", "ui", "app"], | ||
initialRegistry: "ui/navbar", | ||
folders: { | ||
components: { | ||
ui: { | ||
"primitive.tsx": "ui/primitive", | ||
"button.tsx": "ui/button", | ||
"sheet.tsx": "ui/sheet", | ||
"navbar.tsx": "ui/navbar", | ||
}, | ||
"app-navbar.tsx": "blocks/navbar/navbar-02/app-navbar", | ||
}, | ||
app: { | ||
"global.css": "docs/installation/main.css", | ||
"page.tsx": "blocks/navbar/navbar-02/page", | ||
"layout.tsx": "blocks/navbar/navbar-02/layout", | ||
}, | ||
}, | ||
}} | ||
/> | ||
</div> | ||
</Container> | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export default function Layout({ children }: { children: React.ReactNode }) { | ||
return ( | ||
<div className="flex flex-col w-full"> | ||
<div className="flex relative flex-auto justify-center mx-auto w-full lg:px-6 lg:max-w-6xl">{children}</div> | ||
</div> | ||
) | ||
} |
Oops, something went wrong.