@suish/starter-ui 0.1.0

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/LICENSE.txt ADDED
@@ -0,0 +1,8 @@
1
+ Copyright (c) 2026 Sui Shum. All rights reserved.
2
+
3
+ This software and associated documentation files (the "Software") are
4
+ proprietary and confidential. No part of the Software may be reproduced,
5
+ distributed, or transmitted in any form or by any means without the
6
+ prior written permission of the copyright holder.
7
+
8
+ The Software is provided "as is", without warranty of any kind.
package/README.md ADDED
@@ -0,0 +1,332 @@
1
+ <a id="readme-top"></a>
2
+
3
+ <!-- PROJECT SHIELDS -->
4
+ <!--
5
+ *** I'm using markdown "reference style" links for readability.
6
+ *** Reference links are enclosed in brackets [ ] instead of parentheses ( ).
7
+ *** See the bottom of this document for the declaration of the reference variables
8
+ *** for contributors-url, forks-url, etc. This is an optional, concise syntax you may use.
9
+ *** https://www.markdownguide.org/basic-syntax/#reference-style-links
10
+ -->
11
+
12
+ [![Contributors][contributors-shield]][contributors-url]
13
+ [![Forks][forks-shield]][forks-url]
14
+ [![Stargazers][stars-shield]][stars-url]
15
+ [![Issues][issues-shield]][issues-url]
16
+ [![project_license][license-shield]][license-url]
17
+ [![LinkedIn][linkedin-shield]][linkedin-url]
18
+
19
+ <!-- PROJECT LOGO -->
20
+ <br />
21
+ <div align="center">
22
+ <a href="https://github.com/suishum/starter_ui">
23
+ <img src="images/online-library.webp" alt="Logo" width="80" height="80">
24
+ </a>
25
+
26
+ <h3 align="center">Starter UI</h3>
27
+
28
+ <p align="center">
29
+ React + TypeScript component library with Vite, Vitest, generated type declarations, and an npm-ready package.
30
+ <br />
31
+ <a href="https://github.com/suishum/starter_ui"><strong>Explore the docs »</strong></a>
32
+ <br />
33
+ <br />
34
+ <a href="https://github.com/suishum/starter_ui">View Demo</a>
35
+ &middot;
36
+ <a href="https://github.com/suishum/starter_ui/issues/new?labels=bug&template=bug-report---.md">Report Bug</a>
37
+ &middot;
38
+ <a href="https://github.com/suishum/starter_ui/issues/new?labels=enhancement&template=feature-request---.md">Request Feature</a>
39
+ </p>
40
+ </div>
41
+
42
+ <!-- TABLE OF CONTENTS -->
43
+ <details>
44
+ <summary>Table of Contents</summary>
45
+ <ol>
46
+ <li>
47
+ <a href="#about-the-project">About The Project</a>
48
+ <ul>
49
+ <li><a href="#built-with">Built With</a></li>
50
+ </ul>
51
+ </li>
52
+ <li>
53
+ <a href="#getting-started">Getting Started</a>
54
+ <ul>
55
+ <li><a href="#prerequisites">Prerequisites</a></li>
56
+ <li><a href="#installation">Installation</a></li>
57
+ </ul>
58
+ </li>
59
+ <li><a href="#usage">Usage</a></li>
60
+ <li><a href="#roadmap">Roadmap</a></li>
61
+ <li><a href="#contributing">Contributing</a></li>
62
+ <li><a href="#license">License</a></li>
63
+ <li><a href="#contact">Contact</a></li>
64
+ <li><a href="#acknowledgments">Acknowledgments</a></li>
65
+ </ol>
66
+ </details>
67
+
68
+ <!-- ABOUT THE PROJECT -->
69
+
70
+ ## About The Project
71
+
72
+ [![Product Name Screen Shot][product-screenshot]](https://example.com)
73
+
74
+ Starter for a React + Typescript based component library, with Storybook + CI / CD configuration, bundled with Vite & tested with Vitest, npm ready.
75
+
76
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
77
+
78
+ ### Built With
79
+
80
+ - [![React][React.js]][React-url]
81
+
82
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
83
+
84
+ <!-- GETTING STARTED -->
85
+
86
+ ## Installation
87
+
88
+ ### Prerequisites
89
+
90
+ - npm
91
+
92
+ ```sh
93
+ npm install npm@latest -g
94
+ ```
95
+
96
+ ### Prerequisites
97
+
98
+ - Node.js 20+
99
+ - React 18 or React 19
100
+ - React DOM 18 or React DOM 19
101
+
102
+ ## Use the published package
103
+
104
+ Install the latest published version from npm:
105
+
106
+ ```bash
107
+ npm install @suish/ui-library
108
+ ```
109
+
110
+ React is declared as a peer dependency, install it in the consuming application too:
111
+
112
+ ```bash
113
+ npm install react react-dom
114
+ ```
115
+
116
+ ### Usage
117
+
118
+ ```tsx
119
+ import { Button } from "@suish/ui-library";
120
+
121
+ export function Example() {
122
+ return (
123
+ <Card>
124
+ <Button variant="primary">Continue</Button>
125
+ </Card>
126
+ );
127
+ }
128
+ ```
129
+
130
+ ## Develop the library from GitHub
131
+
132
+ Use this workflow when you want to add components, modify the library, run tests, or contribute changes.
133
+
134
+ ### Clone the repository
135
+
136
+ ```bash
137
+ git clone [https://github.com/suishum/starter_ui.git](https://github.com/suishum/starter_ui.git)
138
+ cd starter-ui
139
+ ```
140
+
141
+ Change git remote url to avoid accidental pushes to base project
142
+
143
+ ```sh
144
+ git remote set-url origin your_github_username/your_repo_name
145
+ git remote -v # confirm the changes
146
+ ```
147
+
148
+ ### Install dependencies
149
+
150
+ ```bash
151
+ npm install
152
+ ```
153
+
154
+ ### Start development
155
+
156
+ ```bash
157
+ npm run dev
158
+ ```
159
+
160
+ ### Run tests
161
+
162
+ ```bash
163
+ npm test
164
+ ```
165
+
166
+ ### Build the package
167
+
168
+ ```bash
169
+ npm run build
170
+ ```
171
+
172
+ ### Add a component
173
+
174
+ 1. Create the component under `src/components`.
175
+ 2. Add its public export to the appropriate `index.ts` file.
176
+ 3. Add or update tests.
177
+ 4. Add a usage example or Storybook story.
178
+ 5. Run the checks:
179
+
180
+ ```bash
181
+ # npm run lint
182
+ npm test
183
+ npm run build
184
+ ```
185
+
186
+ ### Inspect npm package before publishing
187
+
188
+ 1. Run
189
+
190
+ ```bash
191
+ npm pack --dry-run
192
+ ```
193
+
194
+ This shows what would be included without creating or publishing anything.
195
+
196
+ 2. (Optional) Create the local tarball
197
+
198
+ ```bash
199
+ npm pack
200
+ ```
201
+
202
+ ## Install a GitHub version
203
+
204
+ Use this only when you want to consume an unreleased version from a branch or commit.
205
+
206
+ ### Install from the default branch
207
+
208
+ ```bash
209
+ npm install github:suishum/starter-ui
210
+ ```
211
+
212
+ ### Install from a branch
213
+
214
+ ```bash
215
+ npm install github:suishum/starter-ui#develop
216
+ ```
217
+
218
+ ### Install from a specific commit
219
+
220
+ ```bash
221
+ npm install github:suishum/starter-ui#COMMIT_SHA
222
+ ```
223
+
224
+ GitHub-based installation is useful for previewing unreleased changes, but published npm versions are recommended for normal application dependencies because they are versioned and reproducible. [156][165]
225
+
226
+ ## Available scripts
227
+
228
+ | Command | Description |
229
+ | ------------------------ | --------------------------------------------------------- | --------------------------------- | --- |
230
+ | <!-- | `npm run dev` | Start the development environment | --> |
231
+ | `npm test` | Run test watcher? |
232
+ | `npm test:run` | Run tests once |
233
+ | `npm run build` | Build the distributable package |
234
+ | `npm run prepublishOnly` | Run TypeScript checks and build the distributable package |
235
+ | <!-- | `npm run lint` | Check source files | --> |
236
+ | `npm run typecheck` | Run TypeScript checks |
237
+
238
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
239
+
240
+ <!-- USAGE EXAMPLES -->
241
+
242
+ ## Usage
243
+
244
+ Use this space to show useful examples of how a project can be used. Additional screenshots, code examples and demos work well in this space. You may also link to more resources.
245
+
246
+ _For more examples, please refer to the [Documentation](https://example.com)_
247
+
248
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
249
+
250
+ <!-- ROADMAP -->
251
+
252
+ ## Roadmap
253
+
254
+ - [ ] Feature 1
255
+ - [ ] Feature 2
256
+ - [ ] Feature 3
257
+ - [ ] Nested Feature
258
+
259
+ See the [open issues](https://github.com/suishum/starter_ui/issues) for a full list of proposed features (and known issues).
260
+
261
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
262
+
263
+ <!-- CONTRIBUTING -->
264
+
265
+ ## Contributing
266
+
267
+ Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.
268
+
269
+ If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
270
+ Don't forget to give the project a star! Thanks again!
271
+
272
+ 1. Fork the Project
273
+ 2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
274
+ 3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
275
+ 4. Push to the Branch (`git push origin feature/AmazingFeature`)
276
+ 5. Open a Pull Request
277
+
278
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
279
+
280
+ ### Top contributors:
281
+
282
+ <a href="https://github.com/suishum/starter_ui/graphs/contributors">
283
+ <img src="https://contrib.rocks/image?repo=suishum/starter_ui" alt="contrib.rocks image" />
284
+ </a>
285
+
286
+ <!-- LICENSE -->
287
+
288
+ ## License
289
+
290
+ Distributed under CUSTOM LICENSE. See `LICENSE.txt` for more information.
291
+
292
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
293
+
294
+ <!-- CONTACT -->
295
+
296
+ ## Contact
297
+
298
+ Project Link: [https://github.com/suishum/starter_ui](https://github.com/suishum/starter_ui)
299
+
300
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
301
+
302
+ <!-- ACKNOWLEDGMENTS -->
303
+
304
+ ## Acknowledgments
305
+
306
+ - []()
307
+ - []()
308
+ - []()
309
+
310
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
311
+
312
+ <!-- MARKDOWN LINKS & IMAGES -->
313
+ <!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->
314
+
315
+ [contributors-shield]: https://img.shields.io/github/contributors/suishum/starter_ui.svg?style=for-the-badge
316
+ [contributors-url]: https://github.com/suishum/starter_ui/graphs/contributors
317
+ [forks-shield]: https://img.shields.io/github/forks/suishum/starter_ui.svg?style=for-the-badge
318
+ [forks-url]: https://github.com/suishum/starter_ui/network/members
319
+ [stars-shield]: https://img.shields.io/github/stars/suishum/starter_ui.svg?style=for-the-badge
320
+ [stars-url]: https://github.com/suishum/starter_ui/stargazers
321
+ [issues-shield]: https://img.shields.io/github/issues/suishum/starter_ui.svg?style=for-the-badge
322
+ [issues-url]: https://github.com/suishum/starter_ui/issues
323
+ [license-shield]: https://img.shields.io/github/license/suishum/starter_ui.svg?style=for-the-badge
324
+ [license-url]: https://github.com/suishum/starter_ui/blob/master/LICENSE.txt
325
+ [linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=for-the-badge&logo=linkedin&colorB=555
326
+ [linkedin-url]: https://linkedin.com/in/suishum
327
+ [product-screenshot]: images/online-library.webp
328
+
329
+ <!-- Shields.io badges. You can a comprehensive list with many more badges at: https://github.com/inttter/md-badges -->
330
+
331
+ [React.js]: https://img.shields.io/badge/React-20232A?style=for-the-badge&logo=react&logoColor=61DAFB
332
+ [React-url]: https://reactjs.org/
@@ -0,0 +1,7 @@
1
+ import { ButtonHTMLAttributes, ReactNode } from 'react';
2
+ export type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & {
3
+ children: ReactNode;
4
+ variant?: "primary" | "secondary";
5
+ };
6
+ export declare function Button({ children, variant, className, ...props }: ButtonProps): import("react").JSX.Element;
7
+ //# sourceMappingURL=Button.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/components/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC7D,OAAO,cAAc,CAAC;AAEtB,MAAM,MAAM,WAAW,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,GAAG;IAClE,QAAQ,EAAE,SAAS,CAAC;IACpB,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC;CACnC,CAAC;AAEF,wBAAgB,MAAM,CAAC,EACrB,QAAQ,EACR,OAAmB,EACnB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,WAAW,+BAUb"}
@@ -0,0 +1,3 @@
1
+ export { Button } from './Button';
2
+ export type { ButtonProps } from './Button';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { Button } from './components/Button';
2
+ export type { ButtonProps } from './components/Button';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("react/jsx-runtime");function t({children:t,variant:n=`primary`,className:r,...i}){let a=[`acme-button`,`acme-button--${n}`,r].filter(Boolean).join(` `);return(0,e.jsx)(`button`,{className:a,...i,children:t})}exports.Button=t;
@@ -0,0 +1,2 @@
1
+ .acme-button{font:inherit;cursor:pointer;border:0;border-radius:.375rem;padding:.625rem 1rem}.acme-button--primary{color:#fff;background:#111827}.acme-button--secondary{color:#111827;background:#e5e7eb}
2
+ /*$vite$:1*/
@@ -0,0 +1,16 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ //#region src/components/Button/Button.tsx
3
+ function t({ children: t, variant: n = "primary", className: r, ...i }) {
4
+ let a = [
5
+ "acme-button",
6
+ `acme-button--${n}`,
7
+ r
8
+ ].filter(Boolean).join(" ");
9
+ return /* @__PURE__ */ e("button", {
10
+ className: a,
11
+ ...i,
12
+ children: t
13
+ });
14
+ }
15
+ //#endregion
16
+ export { t as Button };
package/package.json ADDED
@@ -0,0 +1,58 @@
1
+ {
2
+ "name": "@suish/starter-ui",
3
+ "version": "0.1.0",
4
+ "description": "React component library starter",
5
+ "type": "module",
6
+ "publishConfig": {
7
+ "access": "public"
8
+ },
9
+ "files": [
10
+ "dist",
11
+ "LICENSE.txt",
12
+ "README.md"
13
+ ],
14
+ "main": "./dist/starter-ui.cjs.js",
15
+ "module": "./dist/starter-ui.es.js",
16
+ "types": "./dist/index.d.ts",
17
+ "exports": {
18
+ ".": {
19
+ "types": "./dist/index.d.ts",
20
+ "import": "./dist/starter-ui.es.js",
21
+ "require": "./dist/starter-ui.cjs.js"
22
+ }
23
+ },
24
+ "scripts": {
25
+ "test": "vitest",
26
+ "test:run": "vitest run",
27
+ "typecheck": "tsc --noEmit",
28
+ "build": "npm run typecheck && vite build",
29
+ "prepublishOnly": "npm run test:run && npm run build"
30
+ },
31
+ "keywords": [
32
+ "react",
33
+ "component-library",
34
+ "ui"
35
+ ],
36
+ "author": "",
37
+ "license": "SEE LICENSE IN LICENSE.txt",
38
+ "peerDependencies": {
39
+ "react": "^19.0.0",
40
+ "react-dom": "^19.0.0"
41
+ },
42
+ "devDependencies": {
43
+ "@testing-library/jest-dom": "^7.0.1",
44
+ "@testing-library/react": "^16.3.3",
45
+ "@testing-library/user-event": "^14.6.7",
46
+ "@types/node": "^22.20.2",
47
+ "@types/react": "^19.3.0",
48
+ "@types/react-dom": "^19.3.0",
49
+ "@vitejs/plugin-react": "^6.1.1",
50
+ "jsdom": "^29.1.1",
51
+ "react": "^19.0.0",
52
+ "react-dom": "^19.0.0",
53
+ "typescript": "^6.0.3",
54
+ "vite": "^8.3.0",
55
+ "vite-plugin-dts": "^5.1.0",
56
+ "vitest": "^5.0.0"
57
+ }
58
+ }