stp-ui-kit 0.1.0 → 2.0.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/README.md CHANGED
@@ -1,231 +1,71 @@
1
- # 🎨 stp-ui-kit
1
+ # stp-ui-kit
2
2
 
3
- A comprehensive React UI Kit with 50+ production-ready components for the Smartestprep platform.
4
- Built with TypeScript, Tailwind CSS, and SCSS for consistent design and rapid development.
3
+ > Smartestprep UI Kit for React apps
5
4
 
6
- [![npm version](https://img.shields.io/npm/v/stp-ui-kit.svg)](https://www.npmjs.com/package/stp-ui-kit)
7
- [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](./LICENSE)
5
+ A modern React component library with 50+ production-ready components, design tokens, and comprehensive documentation.
8
6
 
9
- ---
7
+ ## Quick Start
10
8
 
11
- ## ✨ Features
12
-
13
- - 🎨 **50+ Components** - Display, Form, Feedback, Layout, Navigation, Data
14
- - 🎯 **Design System** - Comprehensive design tokens (spacing, colors, typography)
15
- - 📱 **Responsive** - Mobile-first with built-in breakpoints
16
- - 🔧 **TypeScript** - Full type safety with strict mode
17
- - 🎭 **Theming** - CSS custom properties for easy theming
18
- - 🚀 **Tree-shakeable** - ES modules for optimal bundle size
19
- - 📚 **Storybook** - Interactive component documentation
20
- - 🔥 **Hot Reload** - Watch mode for seamless development with npm link
21
-
22
- ---
23
-
24
- ## 📦 Installation
9
+ ### Installation
25
10
 
26
11
  ```bash
27
12
  npm install stp-ui-kit
28
- # or
29
- yarn add stp-ui-kit
30
- # or
31
- pnpm add stp-ui-kit
32
13
  ```
33
14
 
34
- ---
35
-
36
- ## 🚀 Quick Start
15
+ ### Basic Usage
37
16
 
38
17
  ```tsx
39
- // Import styles once in your app entry (main.tsx or App.tsx)
40
- // Import and use components
41
- import { Button, Input, Modal, Typography } from "stp-ui-kit";
18
+ import { Button, Input, Page } from "stp-ui-kit";
42
19
  import "stp-ui-kit/styles";
43
20
 
44
- export default function App() {
21
+ function App() {
45
22
  return (
46
- <div>
47
- <Typography variant='h1'>Welcome</Typography>
48
- <Input
49
- label='Email'
50
- placeholder='Enter your email'
51
- />
52
- <Button variant='primary'>Get Started</Button>
53
- </div>
23
+ <Page title="Dashboard">
24
+ <Input label="Email" placeholder="Enter your email" />
25
+ <Button>Submit</Button>
26
+ </Page>
54
27
  );
55
28
  }
56
29
  ```
57
30
 
58
- ### Using Design Tokens
59
-
60
- **In SCSS files:**
61
-
62
- ```scss
63
- @use "stp-ui-kit/styles/variables" as stp;
64
-
65
- .my-component {
66
- padding: stp.$space-400; // 16px
67
- border-radius: stp.$border-radius-100; // 4px
68
- color: var(--color-neutral-800);
69
- }
70
- ```
71
-
72
- **In JavaScript/TypeScript:**
31
+ ## Documentation
73
32
 
74
- ```typescript
75
- import { breakpoints, spacing, typography } from "stp-ui-kit/tokens";
33
+ | Document | Description |
34
+ |----------|-------------|
35
+ | [Getting Started](./documentation/GETTING_STARTED.md) | Installation, setup, connecting to projects |
36
+ | [Architecture](./documentation/ARCHITECTURE.md) | Project structure, patterns, organization |
37
+ | [Design System](./documentation/DESIGN_SYSTEM.md) | Tokens, spacing, typography, theming |
38
+ | [Components](./documentation/COMPONENTS.md) | Full component index by category |
39
+ | [Development](./documentation/DEVELOPMENT.md) | Contributing, local dev, code style |
40
+ | [Migration](./documentation/MIGRATION.md) | Version upgrades, breaking changes |
41
+ | [Best Practices](./documentation/BEST_PRACTICES.md) | Patterns, anti-patterns, accessibility |
76
42
 
77
- const styles = {
78
- padding: spacing["space-400"], // '16px'
79
- };
80
- ```
43
+ ## Component Categories
81
44
 
82
- ---
83
-
84
- ## 📚 Documentation
85
-
86
- - **[COMPONENTS.md](./COMPONENTS.md)** - Complete component reference with all 50+ components
87
- - **[USAGE_GUIDE.md](./USAGE_GUIDE.md)** - Comprehensive usage guide with examples
88
- - **Layout System:**
89
- - **[PAGE_BUILDING_GUIDE.md](./docs/PAGE_BUILDING_GUIDE.md)** - Complete guide to building pages
90
- - **[PAGE_CHEAT_SHEET.md](./docs/PAGE_CHEAT_SHEET.md)** - Quick reference cheat sheet
91
- - **[SPACING_GUIDE.md](./docs/SPACING_GUIDE.md)** - Visual spacing & layout guide
92
- - **[SCROLL_OVERFLOW_GUIDE.md](./docs/SCROLL_OVERFLOW_GUIDE.md)** - Scroll behavior & overflow handling
93
- - **[MIGRATION_GUIDE.md](./docs/MIGRATION_GUIDE.md)** - ⚠️ Migration guide from old API to v0.0.117+
94
- - **[page-building-schema.json](./docs/page-building-schema.json)** - JSON schema for AI tools
95
- - **[CLAUDE.md](./CLAUDE.md)** - Instructions for AI assistants (Claude Code)
96
- - **Storybook** - Interactive demos (run `npm run storybook`)
97
-
98
- ---
99
-
100
- ## 📂 Project Structure
101
-
102
- ```plaintext
103
- src/
104
- ├─ assets/ # custom icons and static assets
105
- ├─ components/ # UI components
106
- │ ├─ data/
107
- │ ├─ display/
108
- │ ├─ feedback/
109
- │ ├─ form/
110
- │ ├─ layout/
111
- │ ├─ navigation/
112
- │ └─ ui/
113
- ├─ lib/ # helpers, utils
114
- ├─ styles/ # global styles, tokens, variables
115
- │ ├─ _variables.scss
116
- │ ├─ main.scss
117
- │ └─ tokens.ts
118
- ├─ App.tsx # playground / dev entry
119
- └─ index.ts # main export file
120
- ```
45
+ | Category | Components | Description |
46
+ |----------|------------|-------------|
47
+ | **Data** | ProgressLine, ProgressBarAlternative, Table | Data display and visualization |
48
+ | **Display** | Button, Avatar, Typography, Chip, Icon, Dropdown | Visual and interactive elements |
49
+ | **Feedback** | Modal, Spinner, Tooltip, Message, AppLoader | Notifications and loading states |
50
+ | **Form** | Input, Select, Checkbox, RadioButton, Calendar, TextArea | Form inputs and controls |
51
+ | **Layout** | Page, Section, Drawer, BottomBar, TopBar | Page structure and organization |
52
+ | **Navigation** | Link, Collapse, NavigationItem | Navigation elements |
121
53
 
122
- ---
54
+ ## Storybook
123
55
 
124
- ## 🛠 Tech Stack
125
-
126
- - React 18+ / 19+ – core UI framework
127
- - TypeScript – strongly typed components
128
- - TailwindCSS 4 + SCSS – styling and design tokens
129
- - React Hook Form – form handling integration
130
- - Storybook 8 – interactive component documentation
131
- - Vite – development & build tooling
132
-
133
- ---
134
-
135
- ## 📖 Documentation
136
-
137
- Run Storybook to explore and test components interactively:
56
+ Interactive component documentation:
138
57
 
139
58
  ```bash
140
59
  npm run storybook
141
60
  ```
142
61
 
143
- Build the static Storybook docs:
144
-
145
- ```bash
146
- npm run build-storybook
147
- ```
148
-
149
- ---
150
-
151
- ## 🧑‍💻 Development
152
-
153
- - Start in dev mode
154
-
155
- ```bash
156
- npm run dev
157
- ```
158
-
159
- - Build library
160
-
161
- ```bash
162
- npm run build
163
- ```
164
-
165
- - Lint & format
166
-
167
- ```bash
168
- npm run lint
169
- npm run format
170
- ```
171
-
172
- - Generate tokens
173
- ```bash
174
- npm run generate-tokens
175
- ```
176
-
177
- ---
178
-
179
- # 🔑 Principles
180
-
181
- - Fully typed components (.ts / .tsx only)
182
- - Consistent design system powered by tokens according to Figma designs
183
- - Use named exports only (`export const`)
184
- - Remove unused/deprecated components over time
185
- - Do not add new dependencies unless absolutely necessary (to avoid making the project heavy)
186
-
187
- ### 📦 Project Releases
188
-
189
- - Always upgrade the version in `package.json` before publishing
190
- - Do **not** run `npm publish` for every minor change
191
- - Always run `npm run build` before publishing
192
- - All changes must be commited into repository
193
-
194
- ### 🛠 Local Development with Hot Reload
195
-
196
- When developing stp-ui-kit and testing in another project:
197
-
198
- ```bash
199
- # 1. In stp-ui-kit directory
200
- npm link
201
- npm run build:watch # Keep this running - auto-rebuilds on changes!
202
-
203
- # 2. In your project directory
204
- npm link stp-ui-kit
205
- npm start
206
-
207
- # Changes in stp-ui-kit will now auto-reflect in your project! 🔥
208
- ```
209
-
210
- **No need to unlink/relink** - `build:watch` provides hot reload for linked packages.
211
-
212
- ### 📤 Publishing
213
-
214
- - Always run `npm run build` before publishing
215
- - Update version in `package.json` before `npm publish`
216
- - Commit all changes to repository
217
- - Run `npm run format` and `npm run lint` before committing
218
-
219
- ## 🤝 Contributing
220
-
221
- 1. Clone the repo
222
- 2. Install dependencies with `npm install`
223
- 3. Run Storybook (`npm run storybook`)
224
- 4. Add or update a component inside `src/components`
225
- 5. Submit a pull request 🎉
62
+ ## Tech Stack
226
63
 
227
- ---
64
+ - React 18/19
65
+ - TypeScript
66
+ - SCSS with design tokens
67
+ - Vite build system
228
68
 
229
- ## 📜 License
69
+ ## License
230
70
 
231
- MIT © Smartestprep
71
+ MIT
@@ -1,5 +1,4 @@
1
1
  export * from './Checkbox/Checkbox';
2
- export * from './FormItem/FormItem';
3
2
  export * from './InlineError/InlineError';
4
3
  export * from './Input/Input';
5
4
  export * from './Input/TextArea';
@@ -1,4 +1,3 @@
1
- export * from './Banner/Banner';
2
1
  export * from './Drawer/Drawer';
3
2
  export * from './PageHeader/PageHeader';
4
3
  export * from './SectionHeader/SectionHeader';
@@ -1,4 +1,3 @@
1
1
  export * from './Collapse/Collapse';
2
- export * from './CourseCollapse/CourseCollapse';
3
2
  export * from './Link/Link';
4
3
  export * from './NavigationItem/NavigationItem';
@@ -0,0 +1,4 @@
1
+ // Ambient module declarations for style imports
2
+ declare module "stp-ui-kit/styles";
3
+ declare module "stp-ui-kit/styles/variables";
4
+ declare module "stp-ui-kit/styles/main";