Skip to content

Commit 59c3283

Browse files
committed
chore: add the documentation
1 parent 732811e commit 59c3283

Some content is hidden

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

85 files changed

+4132
-0
lines changed

docs/.eslintrc.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
module.exports = {
2+
parser: '@typescript-eslint/parser',
3+
parserOptions: {
4+
sourceType: 'module',
5+
},
6+
plugins: ['@typescript-eslint', 'import', 'react'],
7+
extends: ['plugin:react/recommended'],
8+
settings: {
9+
react: {
10+
version: 'detect',
11+
},
12+
},
13+
rules: {
14+
'import/extensions': ['error', 'never'],
15+
'no-shadow': 'off',
16+
'@typescript-eslint/no-shadow': 'warn',
17+
'linebreak-style': 'error',
18+
'react/display-name': 'off',
19+
'react/prop-types': 'off',
20+
'react/react-in-jsx-scope': 'off',
21+
},
22+
}

docs/.gitignore

Lines changed: 176 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,176 @@
1+
# Based on https://raw.githubusercontent.com/github/gitignore/main/Node.gitignore
2+
3+
# Logs
4+
5+
logs
6+
_.log
7+
npm-debug.log_
8+
yarn-debug.log*
9+
yarn-error.log*
10+
lerna-debug.log*
11+
.pnpm-debug.log*
12+
13+
# Caches
14+
15+
.cache
16+
17+
# Diagnostic reports (https://nodejs.org/api/report.html)
18+
19+
report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json
20+
21+
# Runtime data
22+
23+
pids
24+
_.pid
25+
_.seed
26+
*.pid.lock
27+
28+
# Directory for instrumented libs generated by jscoverage/JSCover
29+
30+
lib-cov
31+
32+
# Coverage directory used by tools like istanbul
33+
34+
coverage
35+
*.lcov
36+
37+
# nyc test coverage
38+
39+
.nyc_output
40+
41+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
42+
43+
.grunt
44+
45+
# Bower dependency directory (https://bower.io/)
46+
47+
bower_components
48+
49+
# node-waf configuration
50+
51+
.lock-wscript
52+
53+
# Compiled binary addons (https://nodejs.org/api/addons.html)
54+
55+
build/Release
56+
57+
# Dependency directories
58+
59+
node_modules/
60+
jspm_packages/
61+
62+
# Snowpack dependency directory (https://snowpack.dev/)
63+
64+
web_modules/
65+
66+
# TypeScript cache
67+
68+
*.tsbuildinfo
69+
70+
# Optional npm cache directory
71+
72+
.npm
73+
74+
# Optional eslint cache
75+
76+
.eslintcache
77+
78+
# Optional stylelint cache
79+
80+
.stylelintcache
81+
82+
# Microbundle cache
83+
84+
.rpt2_cache/
85+
.rts2_cache_cjs/
86+
.rts2_cache_es/
87+
.rts2_cache_umd/
88+
89+
# Optional REPL history
90+
91+
.node_repl_history
92+
93+
# Output of 'npm pack'
94+
95+
*.tgz
96+
97+
# Yarn Integrity file
98+
99+
.yarn-integrity
100+
101+
# dotenv environment variable files
102+
103+
.env
104+
.env.development.local
105+
.env.test.local
106+
.env.production.local
107+
.env.local
108+
109+
# parcel-bundler cache (https://parceljs.org/)
110+
111+
.parcel-cache
112+
113+
# Next.js build output
114+
115+
.next
116+
out
117+
118+
# Nuxt.js build / generate output
119+
120+
.nuxt
121+
dist
122+
123+
# Gatsby files
124+
125+
# Comment in the public line in if your project uses Gatsby and not Next.js
126+
127+
# https://nextjs.org/blog/next-9-1#public-directory-support
128+
129+
# public
130+
131+
# vuepress build output
132+
133+
.vuepress/dist
134+
135+
# vuepress v2.x temp and cache directory
136+
137+
.temp
138+
139+
# Docusaurus cache and generated files
140+
141+
.docusaurus
142+
143+
# Serverless directories
144+
145+
.serverless/
146+
147+
# FuseBox cache
148+
149+
.fusebox/
150+
151+
# DynamoDB Local files
152+
153+
.dynamodb/
154+
155+
# TernJS port file
156+
157+
.tern-port
158+
159+
# Stores VSCode versions used for testing VSCode extensions
160+
161+
.vscode-test
162+
163+
# yarn v2
164+
165+
.yarn/cache
166+
.yarn/unplugged
167+
.yarn/build-state.yml
168+
.yarn/install-state.gz
169+
.pnp.*
170+
171+
# IntelliJ based IDEs
172+
.idea
173+
174+
# Finder (MacOS) folder config
175+
.DS_Store
176+
.htaccess

docs/.prettierrc.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
module.exports = {
2+
parser: 'typescript',
3+
semi: false,
4+
singleQuote: true,
5+
trailingComma: 'all',
6+
printWidth: 100,
7+
arrowParens: 'avoid',
8+
endOfLine: 'auto',
9+
}

docs/bun.lockb

357 KB
Binary file not shown.
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
.root {
2+
margin: 0 auto;
3+
max-width: 1208px;
4+
padding-left: max(env(safe-area-inset-left), 1.5rem);
5+
padding-right: max(env(safe-area-inset-right), 1.5rem);
6+
border-top: 1px solid rgb(229, 231, 235);
7+
8+
:global(.dark) & {
9+
border-top: 1px solid rgb(31, 31, 31);
10+
}
11+
12+
h3 {
13+
position: absolute;
14+
left: 50%;
15+
padding: 0 32px;
16+
transform: translate(-50%, -50%);
17+
text-transform: uppercase;
18+
font-size: 24px;
19+
letter-spacing: 0.1em;
20+
font-weight: 400;
21+
font-weight: 500;
22+
color: hsl(204 12% 45%);
23+
white-space: nowrap;
24+
margin-top: 40px;
25+
26+
:global(.dark) & {
27+
color: hsl(204, 8%, 50%);
28+
}
29+
}
30+
}
31+
32+
.features {
33+
padding: min(12vw, 6rem) 0;
34+
display: grid;
35+
grid-template-columns: repeat(1, 1fr);
36+
place-items: start center;
37+
row-gap: 40px;
38+
39+
@media (min-width: 640px) {
40+
grid-template-columns: repeat(2, 1fr);
41+
}
42+
43+
@media (min-width: 960px) {
44+
grid-template-columns: repeat(3, 1fr);
45+
}
46+
47+
li {
48+
max-width: 300px;
49+
color: hsl(204 12% 45%);
50+
51+
:global(.dark) & {
52+
color: hsl(204, 8%, 50%);
53+
}
54+
55+
@media (min-width: 640px) {
56+
max-width: 256px;
57+
}
58+
59+
svg {
60+
display: inline;
61+
margin-right: 2px;
62+
transform: translate(0, -1px);
63+
}
64+
65+
strong {
66+
display: block;
67+
font-weight: 400;
68+
color: hsl(204 12% 5%);
69+
70+
@media (min-width: 640px) {
71+
display: inline;
72+
73+
&::after {
74+
content: '.';
75+
}
76+
}
77+
78+
:global(.dark) & {
79+
color: hsl(204, 8%, 90%);
80+
}
81+
}
82+
}
83+
}

docs/components/Features.tsx

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
import { ReactNode } from 'react'
2+
import styles from './Features.module.css'
3+
4+
export const Features = () => {
5+
return (
6+
<div className={styles.root}>
7+
<h3>Key Features</h3>
8+
<ul className={styles.features}>
9+
<Feature
10+
title="Reactive UI"
11+
description="The library automatically handles UI updates based on input and events received."
12+
/>
13+
<Feature
14+
title="Flexbox"
15+
description="NuiComponents supports a simple flexbox layout system, which provides a more flexible way to layout UIs."
16+
/>
17+
<Feature
18+
title="State Management"
19+
description="The library provides a state management system that allows managing data and UI state with ease."
20+
/>
21+
22+
<Feature
23+
title="Extensibility"
24+
description="Create your custom components by using Component API."
25+
/>
26+
<Feature
27+
title="Reusability"
28+
description="Reuse components between different parts of UI, reduce the amount of code you need to write."
29+
/>
30+
</ul>
31+
</div>
32+
)
33+
}
34+
35+
type FeatureProps = {
36+
title: string
37+
description: ReactNode
38+
icon?: ReactNode
39+
}
40+
41+
function Feature(props: FeatureProps) {
42+
const { title, description, icon } = props
43+
44+
return (
45+
<li>
46+
<strong>{title}</strong> {description}
47+
</li>
48+
)
49+
}

docs/components/Footer.module.css

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
.root {
2+
flex: 1;
3+
font-size: 14px;
4+
color: rgb(107, 114, 128);
5+
6+
:global(.dark) & {
7+
color: rgba(156, 163, 175, var(--tw-text-opacity));
8+
}
9+
10+
a {
11+
color: rgb(107, 114, 128);
12+
text-decoration: none;
13+
14+
:global(.dark) & {
15+
color: rgba(156, 163, 175, var(--tw-text-opacity));
16+
}
17+
18+
&:hover {
19+
color: rgb(17, 24, 39);
20+
21+
:global(.dark) & {
22+
color: rgb(249, 250, 251);
23+
}
24+
}
25+
}
26+
}
27+
28+
.columns {
29+
margin-bottom: 2rem;
30+
display: grid;
31+
gap: 32px;
32+
grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
33+
34+
h4 {
35+
font-size: 18px;
36+
letter-spacing: -1px !important;
37+
font-family: 'Silkscreen', sans-serif;
38+
text-transform: uppercase;
39+
font-weight: normal !important;
40+
margin-bottom: 20px;
41+
line-height: 20px;
42+
43+
:global(.dark) & {
44+
color: rgb(243, 244, 246);
45+
}
46+
}
47+
48+
li {
49+
line-height: 21px;
50+
margin-bottom: 12px;
51+
}
52+
}

0 commit comments

Comments
 (0)