cleanplate 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,104 +1,237 @@
1
- # cleanplate
1
+ # CleanPlate
2
2
 
3
- CleanPlate - Headless React UI Framework
3
+ **A headless React UI framework** — reusable, accessible components you can style to match your brand. No opinionated theme; you bring the look and feel.
4
4
 
5
- ### Installation
5
+ - [Installation](#installation)
6
+ - [Quick start](#quick-start)
7
+ - [Available components](#available-components)
8
+ - [Documentation](#documentation)
9
+ - [TypeScript](#typescript)
10
+ - [LLM / AI-friendly docs & agents](#llm--ai-friendly-docs--agents)
11
+ - [GitHub MCP server](#github-mcp-server)
6
12
 
7
- ```
8
- npm install cleanplate
9
- ```
13
+ ---
10
14
 
11
- Check all versions at [NPM](https://www.npmjs.com/package/cleanplate).
15
+ ## Requirements
12
16
 
13
- ### Usage
17
+ - **React** 18 or higher
18
+ - **React DOM** 18 or higher
14
19
 
15
- All components can be consumed by `import` using their respective names from `cleanplate` package.
20
+ ---
16
21
 
17
- #### Initial Setup
22
+ ## Installation
18
23
 
19
- Import the CSS Reset and minimal cleanplate styles at top most level or root level.
20
-
21
- ```
22
- import "cleanplate/dist/index.css";
24
+ ```bash
25
+ npm install cleanplate
23
26
  ```
24
27
 
25
- #### Button
28
+ Or with Yarn:
26
29
 
30
+ ```bash
31
+ yarn add cleanplate
27
32
  ```
28
- import { Button } from "cleanplate";
29
33
 
30
- <Button variant="primary" onClick={() => {}}>Save</Button>
31
- <Button variant="secondary" onClick={() => {}}>Save</Button>
32
- <Button variant="nude" onClick={() => {}}>Save</Button>
33
- <Button variant="special" onClick={() => {}}>Save</Button>
34
- ```
34
+ Published packages: [npm — cleanplate](https://www.npmjs.com/package/cleanplate)
35
35
 
36
- #### Typography
36
+ ---
37
37
 
38
- ```
39
- import { Typography } from "cleanplate";
38
+ ## Quick start
40
39
 
41
- <Typography variant="h1">Hello World!</Typography>
42
- <Typography variant="h2">Hello World!</Typography>
43
- <Typography variant="h3">Hello World!</Typography>
44
- <Typography variant="h4">Hello World!</Typography>
45
- <Typography variant="h5">Hello World!</Typography>
46
- <Typography variant="h6">Hello World!</Typography>
47
- <Typography variant="p">Hello World!</Typography>
48
- <Typography variant="small">Hello World!</Typography>
40
+ ### 1. Add styles
49
41
 
42
+ Import the reset and base styles **once** at your app root (e.g. `main.jsx`, `App.jsx`, or `index.js`):
43
+
44
+ ```jsx
45
+ import "cleanplate/dist/index.css";
50
46
  ```
51
47
 
52
- #### Badge
48
+ ### 2. Import and use components
53
49
 
54
- ```
55
- import { Badge } from "cleanplate";
50
+ All components are **named exports** from `cleanplate`:
56
51
 
57
- <Badge label="New" />
52
+ ```jsx
53
+ import { Button, Typography, Container } from "cleanplate";
54
+
55
+ function App() {
56
+ return (
57
+ <Container padding="4">
58
+ <Typography variant="h1">Hello</Typography>
59
+ <Button variant="solid" onClick={() => alert("Saved!")}>
60
+ Save
61
+ </Button>
62
+ </Container>
63
+ );
64
+ }
58
65
  ```
59
66
 
60
- #### AppShell
67
+ ### Example: Button
61
68
 
62
- ```
63
- import { AppShell } from "cleanplate";
69
+ ```jsx
70
+ import { Button } from "cleanplate";
64
71
 
65
- <AppShell />
72
+ <Button variant="solid">Primary action</Button>
73
+ <Button variant="outline">Secondary</Button>
74
+ <Button variant="ghost">Tertiary</Button>
66
75
  ```
67
76
 
68
- #### Form Controls
77
+ Variants: `solid`, `outline`, `ghost`, `icon`. Sizes: `small`, `medium`.
78
+
79
+ ### Example: Typography
69
80
 
81
+ ```jsx
82
+ import { Typography } from "cleanplate";
83
+
84
+ <Typography variant="h1">Heading 1</Typography>
85
+ <Typography variant="h4">Heading 4</Typography>
86
+ <Typography variant="p">Body paragraph.</Typography>
70
87
  ```
71
- import { FormControl } from "cleanplate";
72
88
 
73
- <FormControl.Input
74
- name="email"
75
- onChange={(e) => handleChange(e)}
76
- value={values.email}
89
+ Variants: `h1`–`h6`, `p`, `span`, `small`.
90
+
91
+ ### Example: Form controls
92
+
93
+ ```jsx
94
+ import { FormControls } from "cleanplate";
95
+
96
+ <FormControls.Input
97
+ label="Email"
98
+ value={email}
99
+ onChange={(e) => setEmail(e.target.value)}
77
100
  />
78
101
 
79
- <FormControl.TextArea
80
- name="bio"
81
- onChange={(e) => handleChange(e)}
82
- value={values.bio}
102
+ <FormControls.Select
103
+ label="Country"
104
+ options={[
105
+ { label: "United States", value: "us" },
106
+ { label: "Canada", value: "ca" },
107
+ ]}
108
+ value={country}
109
+ onChange={(e) => setCountry(e.target.value)}
83
110
  />
84
111
  ```
85
112
 
86
- #### Icon
113
+ Other form primitives: `TextArea`, `Checkbox`, `Radio`, `Date`, `File`, `Toggle`, etc.
87
114
 
88
- ```
115
+ ### Example: Icon
116
+
117
+ Uses [Google Material Symbols](https://fonts.google.com/icons). Include the font in your app; then:
118
+
119
+ ```jsx
89
120
  import { Icon } from "cleanplate";
90
121
 
91
- <Icon name="settings" size="small" color="balck">
122
+ <Icon name="settings" size="small" color="black" />
123
+ <Icon name="check_circle" size="medium" />
124
+ ```
125
+
126
+ ---
127
+
128
+ ## Available components
129
+
130
+ | Component | Use case |
131
+ |----------------|----------|
132
+ | Accordion | Collapsible panels, FAQ sections |
133
+ | Alert | Inline feedback (success, error, warning, info) |
134
+ | Animated | Scroll-triggered animations |
135
+ | AppShell | Full-page layout with Header, Footer, sidebar |
136
+ | Avatar | User initials, image, or icon |
137
+ | Badge | Status labels, tags |
138
+ | BottomSheet | Slide-up panel |
139
+ | BreadCrumb | Navigation trail |
140
+ | Button | Actions and buttons |
141
+ | ConfirmDialog | Confirmation modals |
142
+ | Container | Layout, spacing, flex |
143
+ | Dropdown | Menus, floating panels |
144
+ | Footer | App footer |
145
+ | FormControls | Input, Select, TextArea, Checkbox, etc. |
146
+ | Header | App header with nav |
147
+ | Icon | Material Symbols icons |
148
+ | MediaObject | Media + title + description |
149
+ | MenuList | Navigation lists |
150
+ | Modal | Dialogs, overlays |
151
+ | PageHeader | Page title + CTA + more menu |
152
+ | Pagination | Page navigation |
153
+ | Pills | Tags/chips |
154
+ | ProgressBar | Progress indicator |
155
+ | Spinner | Loading indicator |
156
+ | Stepper | Multi-step flows |
157
+ | Table | Tabular data |
158
+ | Toast | Transient messages |
159
+ | Typography | Headings and text |
160
+
161
+ Import any of them from `cleanplate`:
162
+
163
+ ```jsx
164
+ import {
165
+ Button,
166
+ Typography,
167
+ Container,
168
+ Header,
169
+ PageHeader,
170
+ BreadCrumb,
171
+ Table,
172
+ FormControls,
173
+ // ... etc.
174
+ } from "cleanplate";
175
+ ```
176
+
177
+ ---
178
+
179
+ ## Documentation
180
+
181
+ - **Storybook** — Interactive playground and docs for every component:
182
+ [https://cleanplate.sivadass.in](https://cleanplate.sivadass.in)
183
+ - **GitHub** — Source and issue tracker:
184
+ [github.com/sivadass/cleanplate](https://github.com/sivadass/cleanplate)
185
+
186
+ ---
187
+
188
+ ## TypeScript
189
+
190
+ CleanPlate is written in TypeScript and ships type definitions. Types are included in the package (`dist/index.d.ts`). No extra `@types` package needed.
191
+
192
+ ```tsx
193
+ import { Button } from "cleanplate";
194
+ import type { ButtonProps } from "cleanplate";
92
195
  ```
93
196
 
94
- View all the available icon names from [Google Material Icons](https://fonts.google.com/icons).
197
+ ---
95
198
 
96
- #### Modal
199
+ ## LLM / AI-friendly docs & agents
97
200
 
98
- ```
99
- import { Modal } from "cleanplate";
100
- ```
201
+ Documentation for **coding agents** and LLMs ships with the npm package alongside the compiled library.
202
+
203
+ ### After `npm install cleanplate`
204
+
205
+ - **Index:** `node_modules/cleanplate/llms.txt` — component list, conventions, and links to each doc file.
206
+ - **Per-component docs:** `node_modules/cleanplate/docs/<ComponentName>.md` — props, types, examples, behavior.
207
+
208
+ **Agent workflow:** read `node_modules/cleanplate/llms.txt` first, then open the specific files under `node_modules/cleanplate/docs/` (not imports alone).
209
+
210
+ ### Version-pinned URLs (no download step)
211
+
212
+ CDN mirrors of the published tarball work well for prompts and CI; pin the semver you depend on:
213
+
214
+ - **Latest:** [unpkg — `llms.txt`](https://unpkg.com/cleanplate@latest/llms.txt) · [jsDelivr — `llms.txt`](https://cdn.jsdelivr.net/npm/cleanplate@latest/llms.txt)
215
+ - **Pinned example:** `https://unpkg.com/cleanplate@0.2.0/llms.txt` and `https://unpkg.com/cleanplate@0.2.0/docs/Button.md` (substitute your installed version)
216
+
217
+ Human-facing Storybook: [cleanplate.sivadass.in](https://cleanplate.sivadass.in).
218
+
219
+ ---
220
+
221
+ ## GitHub MCP server
222
+
223
+ This repository is **compatible with the [GitHub MCP server](https://github.com/github/github-mcp-server)** (Model Context Protocol). The GitHub MCP server lets AI assistants (e.g. in Cursor or VS Code) access GitHub—repos, issues, pull requests, and workflows—so you can work with this codebase using natural language.
224
+
225
+ - **Compatibility:** CleanPlate is a standard GitHub repo with no special constraints. The GitHub MCP server can read and interact with it once connected.
226
+ - **Setup:** Add the GitHub MCP server in your editor:
227
+ - **Cursor:** Settings → Tools & MCP → add the GitHub MCP server (or add it to `~/.cursor/mcp.json`). Use [Cursor’s MCP docs](https://cursor.com/docs/context/mcp) for the exact config.
228
+ - **VS Code (1.101+):** Use the MCP servers UI or add the server to `.vscode/mcp.json`. See [GitHub: Using the GitHub MCP Server](https://docs.github.com/en/copilot/how-tos/provide-context/use-mcp/use-the-github-mcp-server).
229
+ - **Auth:** You’ll need to authenticate with GitHub (OAuth or a Personal Access Token with the scopes the MCP server needs).
230
+
231
+ No project-level MCP config is required; configure the GitHub MCP server in your editor or global config and point it at this repo.
232
+
233
+ ---
101
234
 
102
- ### Documentation & Demo
235
+ ## License
103
236
 
104
- Storybook playground is available for all components at [https://cleanplate.sivadass.in](https://cleanplate.sivadass.in).
237
+ MIT © Sivadass N