@sirlund/mindset-ui 0.1.0 โ†’ 0.1.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.
Files changed (2) hide show
  1. package/README.md +54 -285
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,307 +1,76 @@
1
- # MindSet Design System# MindSet Design System
1
+ # MindSet Design System
2
2
 
3
+ A comprehensive React component library for the MindSet Design System, featuring components extracted from Figma with full specifications.
3
4
 
5
+ **Figma Source:** [MindSet Design System](https://www.figma.com/design/XVdVpzEXk8FK4GaXgT1Gi8/%E2%9D%96-MindSet-Design-System)
4
6
 
5
- A comprehensive Storybook documentation repository for the MindSet Design System, featuring components extracted from Figma with full specifications and interactive examples.A comprehensive Storybook documentation repository for the MindSet Design System, featuring components extracted from Figma with full specifications and interactive examples.
6
-
7
-
8
-
9
- **Figma Source:** [MindSet Design System](https://www.figma.com/design/XVdVpzEXk8FK4GaXgT1Gi8/%E2%9D%96-MindSet-Design-System)**Figma Source:** [MindSet Design System](https://www.figma.com/design/XVdVpzEXk8FK4GaXgT1Gi8/%E2%9D%96-MindSet-Design-System)
10
-
11
-
12
-
13
- ## ๐Ÿ“š Overview## ๐Ÿ“š Overview
14
-
15
-
16
-
17
- This repository documents and implements the MindSet Design System components as defined in Figma. It serves as:This repository documents and implements the MindSet Design System components as defined in Figma. It serves as:
18
-
19
-
20
-
21
- - ๐ŸŽจ **Component Documentation** - Interactive Storybook showcasing all component variants- ๐ŸŽจ **Component Documentation** - Interactive Storybook showcasing all component variants
22
-
23
- - ๐Ÿ“‹ **Design Reference** - Direct mapping to Figma component specifications- ๐Ÿ“‹ **Design Reference** - Direct mapping to Figma component specifications
24
-
25
- - ๐Ÿ”ง **Implementation Guide** - Production-ready React components with TypeScript- ๐Ÿ”ง **Implementation Guide** - Production-ready React components with TypeScript
26
-
27
- - โ™ฟ **Accessibility** - Built-in a11y testing and documentation- โ™ฟ **Accessibility** - Built-in a11y testing and documentation
28
-
29
-
30
-
31
- ## ๐Ÿงฉ Components## ๐Ÿงฉ Components
32
-
33
-
34
-
35
- ### Button Components (140 Total Variants)### Button Components (140 Total Variants)
36
-
37
-
38
-
39
- #### 1. **Button** - 80 Variants#### 1. **Button** - 80 Variants
40
-
41
- - **Types**: Primary, Accent (Secondary), Ghost (Tertiary), Text- **Types**: Primary, Accent (Secondary), Ghost (Tertiary), Text
42
-
43
- - **Sizes**: XSmall, Small, Medium, Large- **Sizes**: XSmall, Small, Medium, Large
44
-
45
- - **States**: Default, Hover, Active, Focus, Disabled- **States**: Default, Hover, Active, Focus, Disabled
46
-
47
- - **Figma Node ID**: `90:1131`- **Figma Node ID**: `90:1131`
48
-
49
-
50
-
51
- #### 2. **IconButton** - 48 Variants#### 2. **IconButton** - 48 Variants
52
-
53
- - **Types**: Primary, Accent, Ghost, Text- **Types**: Primary, Accent, Ghost, Text
54
-
55
- - **Sizes**: Small, XSmall- **Sizes**: Small, XSmall
56
-
57
- - **Shapes**: Square, Circle- **Shapes**: Square, Circle
58
-
59
- - **Figma Node ID**: `90:2972`- **Figma Node ID**: `90:2972`
60
-
61
-
62
-
63
- #### 3. **ToggleButton** - 12 Variants#### 3. **ToggleButton** - 12 Variants
64
-
65
- - **Types**: Default, Icon Only- **Types**: Default, Icon Only
66
-
67
- - **Sizes**: Large, Small, XSmall- **Sizes**: Large, Small, XSmall
68
-
69
- - **Figma Node ID**: `454:8432`- **Figma Node ID**: `454:8432`
70
-
71
-
72
-
73
- ### Additional Components### Additional Components
74
-
75
- - **Card** - Pricing card components with variants- **Card** - Pricing card components with variants
76
-
77
- - **Icon** - Icon system with multiple implementations- **Icon** - Icon system with multiple implementations
78
-
79
-
80
-
81
- ## ๐Ÿš€ Getting Started## ๐Ÿš€ Getting Started
82
-
83
-
84
-
85
- ### PrerequisitesCurrently, two official plugins are available:
86
-
87
-
88
-
89
- - Node.js 16+ - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) for Fast Refresh
90
-
91
- - npm or yarn- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
92
-
93
-
94
-
95
- ### Installation## Expanding the ESLint configuration
96
-
97
-
98
-
99
- ```bashIf you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
100
-
101
- # Clone the repository
102
-
103
- git clone <repository-url>```js
104
-
105
- cd MindsetDSexport default tseslint.config([
106
-
107
- globalIgnores(['dist']),
108
-
109
- # Install dependencies {
110
-
111
- npm install files: ['**/*.{ts,tsx}'],
112
-
113
- ``` extends: [
114
-
115
- // Other configs...
116
-
117
- ### Running Storybook
118
-
119
- // Remove tseslint.configs.recommended and replace with this
120
-
121
- ```bash ...tseslint.configs.recommendedTypeChecked,
122
-
123
- # Start Storybook development server // Alternatively, use this for stricter rules
124
-
125
- npm run storybook ...tseslint.configs.strictTypeChecked,
126
-
127
- // Optionally, add this for stylistic rules
128
-
129
- # Storybook will be available at http://localhost:6006 ...tseslint.configs.stylisticTypeChecked,
130
-
131
- ```
132
-
133
- // Other configs...
134
-
135
- ### Building Storybook ],
136
-
137
- languageOptions: {
138
-
139
- ```bash parserOptions: {
140
-
141
- # Build static Storybook site project: ['./tsconfig.node.json', './tsconfig.app.json'],
142
-
143
- npm run build-storybook tsconfigRootDir: import.meta.dirname,
144
-
145
- },
146
-
147
- # Output will be in storybook-static/ // other options...
148
-
149
- ``` },
150
-
151
- },
152
-
153
- ## ๐Ÿ“ฆ Project Structure])
7
+ ## Installation
154
8
 
9
+ ```bash
10
+ npm install @sirlund/mindset-ui
155
11
  ```
156
12
 
13
+ ## Usage
14
+
15
+ ```tsx
16
+ // Import styles once in your app root
17
+ import '@sirlund/mindset-ui/styles.css';
18
+
19
+ // Import components
20
+ import { Button, Card, Icon } from '@sirlund/mindset-ui';
21
+
22
+ function App() {
23
+ return (
24
+ <div>
25
+ <Button variant="primary" size="medium">
26
+ Click me
27
+ </Button>
28
+ <Card title="Example Card">
29
+ Content here
30
+ </Card>
31
+ <Icon name="check" size="md" />
32
+ </div>
33
+ );
34
+ }
157
35
  ```
158
36
 
159
- mindset-design-system/You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:
160
-
161
- โ”œโ”€โ”€ .storybook/ # Storybook configuration
162
-
163
- โ”‚ โ”œโ”€โ”€ main.ts # Main config with addons```js
164
-
165
- โ”‚ โ”œโ”€โ”€ preview.ts # Global decorators and parameters// eslint.config.js
166
-
167
- โ”‚ โ””โ”€โ”€ vitest.setup.ts # Test configurationimport reactX from 'eslint-plugin-react-x'
168
-
169
- โ”œโ”€โ”€ src/import reactDom from 'eslint-plugin-react-dom'
170
-
171
- โ”‚ โ””โ”€โ”€ components/ # Component library
172
-
173
- โ”‚ โ”œโ”€โ”€ Button/export default tseslint.config([
174
-
175
- โ”‚ โ”‚ โ”œโ”€โ”€ Button.tsx # Main button component globalIgnores(['dist']),
176
-
177
- โ”‚ โ”‚ โ”œโ”€โ”€ Button.css # Button styles {
37
+ ## Components
178
38
 
179
- โ”‚ โ”‚ โ”œโ”€โ”€ Button.stories.tsx # Button documentation (80 variants) files: ['**/*.{ts,tsx}'],
39
+ ### Button
40
+ - **Variants**: Primary, Accent, Ghost, Text
41
+ - **Sizes**: XSmall, Small, Medium, Large
42
+ - **States**: Default, Hover, Active, Focus, Disabled
180
43
 
181
- โ”‚ โ”‚ โ”œโ”€โ”€ IconButton.stories.tsx # IconButton docs (48 variants) extends: [
44
+ ### Card
45
+ - Pricing card components with variants
182
46
 
183
- โ”‚ โ”‚ โ”œโ”€โ”€ ToggleButton.stories.tsx # ToggleButton docs (12 variants) // Other configs...
47
+ ### Icon
48
+ - Icon system with multiple sizes
184
49
 
185
- โ”‚ โ”‚ โ””โ”€โ”€ index.ts # Exports // Enable lint rules for React
50
+ ## Design Tokens
186
51
 
187
- โ”‚ โ”œโ”€โ”€ Card/ reactX.configs['recommended-typescript'],
52
+ The library exports design tokens for consistent styling:
188
53
 
189
- โ”‚ โ”‚ โ”œโ”€โ”€ Card.tsx // Enable lint rules for React DOM
190
-
191
- โ”‚ โ”‚ โ”œโ”€โ”€ Card.css reactDom.configs.recommended,
192
-
193
- โ”‚ โ”‚ โ”œโ”€โ”€ Card.stories.tsx ],
194
-
195
- โ”‚ โ”‚ โ””โ”€โ”€ index.ts languageOptions: {
196
-
197
- โ”‚ โ””โ”€โ”€ Icon/ parserOptions: {
198
-
199
- โ”‚ โ”œโ”€โ”€ Icon.tsx project: ['./tsconfig.node.json', './tsconfig.app.json'],
200
-
201
- โ”‚ โ”œโ”€โ”€ Icon.css tsconfigRootDir: import.meta.dirname,
202
-
203
- โ”‚ โ”œโ”€โ”€ Icon.stories.tsx },
204
-
205
- โ”‚ โ””โ”€โ”€ index.ts // other options...
206
-
207
- โ”œโ”€โ”€ MINDSET_DESIGN_SYSTEM.md # Complete design system documentation },
208
-
209
- โ”œโ”€โ”€ package.json },
210
-
211
- โ””โ”€โ”€ README.md])
212
-
213
- ``````
214
-
215
-
216
- ## ๐Ÿ“– Documentation
217
-
218
- ### Component Documentation
219
-
220
- Each component includes comprehensive Storybook stories with:
221
- - **Interactive controls** - Modify props in real-time
222
- - **Multiple examples** - All variants and use cases
223
- - **Design mapping** - Links to Figma node IDs
224
- - **Code examples** - Copy-paste ready implementations
225
- - **Accessibility notes** - a11y best practices
226
-
227
- ### Design System Documentation
228
-
229
- See [MINDSET_DESIGN_SYSTEM.md](./MINDSET_DESIGN_SYSTEM.md) for:
230
- - Complete component specifications from Figma
231
- - Variant matrices and property tables
232
- - Figma node ID reference
233
- - Typography and color tokens
234
- - Implementation guidelines
235
-
236
- ## ๐Ÿ› ๏ธ Available Scripts
237
-
238
- | Command | Description |
239
- |---------|-------------|
240
- | `npm run storybook` | Start Storybook dev server on port 6006 |
241
- | `npm run build-storybook` | Build static Storybook site |
242
- | `npm run lint` | Run ESLint on the codebase |
243
- | `npm run dev` | Alias for `npm run storybook` |
244
- | `npm run build` | Alias for `npm run build-storybook` |
245
-
246
- ## ๐Ÿงช Testing
247
-
248
- Storybook includes the following testing addons:
249
- - **@storybook/addon-a11y** - Accessibility testing
250
- - **@storybook/addon-vitest** - Component testing with Vitest
251
-
252
- ## ๐ŸŽจ Design Tokens
253
-
254
- The design system uses the following design tokens:
255
-
256
- ### Typography
257
- - **UI-Label/XS** - Extra small labels
258
- - **UI-Label/S** - Small labels
259
- - **UI-Label/M** - Medium labels (default)
260
- - Each with Regular & Strong weights
261
-
262
- ### Colors
263
- Defined in CSS variables, mapped from Figma:
264
- - Primary colors for main actions
265
- - Accent colors for secondary actions
266
- - Ghost/Tertiary for subtle interactions
267
- - Semantic colors (danger, success, warning)
268
-
269
- ## ๐Ÿ”— Figma Integration
270
-
271
- This repository is designed to work with the Figma design system:
272
- - Component names match Figma layer names
273
- - Props map to Figma component properties
274
- - Variants mirror Figma variant structure
275
- - Node IDs documented for programmatic access
276
-
277
- ## ๐Ÿ“ Contributing
54
+ ```tsx
55
+ import { tokens, colors, spacing, getCSSVar } from '@sirlund/mindset-ui';
56
+ ```
278
57
 
279
- When adding new components:
280
- 1. Create component files in `src/components/[ComponentName]/`
281
- 2. Include `.tsx`, `.css`, `.stories.tsx`, and `index.ts`
282
- 3. Document Figma node IDs in stories
283
- 4. Update `MINDSET_DESIGN_SYSTEM.md` with specifications
284
- 5. Add comprehensive stories covering all variants
58
+ ## Storybook Documentation
285
59
 
286
- ## ๐Ÿ”ง Technology Stack
60
+ View the live component documentation:
287
61
 
288
- - **React 19** - UI library
289
- - **TypeScript 5.8** - Type safety
290
- - **Storybook 9.1** - Component documentation
291
- - **Vite 7** - Build tool
292
- - **Vitest 3** - Testing framework
293
- - **ESLint** - Code linting
62
+ ```bash
63
+ # Clone the repo
64
+ git clone https://github.com/sirlund/MindsetDS.git
65
+ cd MindsetDS
66
+ npm install
67
+ npm run storybook
68
+ ```
294
69
 
295
- ## ๐Ÿ“„ License
70
+ ## License
296
71
 
297
- [Add your license here]
72
+ MIT
298
73
 
299
- ## ๐Ÿ‘ฅ Team
74
+ ## Team
300
75
 
301
76
  MindSet Team
302
-
303
- ---
304
-
305
- **Last Updated:** October 16, 2025
306
- **Storybook Version:** 9.1.5
307
- **Design System Version:** Based on Figma file 2025-10-15
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sirlund/mindset-ui",
3
3
  "description": "MindSet Design System - Storybook documentation and component library extracted from Figma",
4
- "version": "0.1.0",
4
+ "version": "0.1.1",
5
5
  "type": "module",
6
6
  "author": "MindSet Team",
7
7
  "main": "./dist/index.cjs",