spoko-design-system 1.20.0 → 1.21.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 (92) hide show
  1. package/.claude/settings.json +48 -48
  2. package/.github/dependabot.yml +11 -11
  3. package/.github/todo.yml +3 -3
  4. package/.github/workflows/claude.yml +37 -37
  5. package/.github/workflows/code-quality.yml +72 -72
  6. package/.github/workflows/deploy.yml +43 -43
  7. package/.husky/README.md +41 -41
  8. package/.husky/commit-msg +1 -1
  9. package/.husky/pre-commit +40 -40
  10. package/.prettierignore +14 -14
  11. package/.prettierrc +30 -30
  12. package/.stackblitzrc +5 -5
  13. package/.vscode/extensions.json +4 -4
  14. package/.vscode/launch.json +11 -11
  15. package/.vscode/settings.json +21 -21
  16. package/CHANGELOG.md +476 -462
  17. package/CLAUDE.md +268 -268
  18. package/LICENSE +21 -21
  19. package/README.md +303 -303
  20. package/TOOLTIPS.md +236 -236
  21. package/astro.config.mjs +84 -84
  22. package/commitlint.config.js +3 -3
  23. package/dev-dist/sw.js +91 -91
  24. package/dev-dist/workbox-c676b6d3.js +3391 -3391
  25. package/eslint.config.js +70 -70
  26. package/icon.config.ts +348 -348
  27. package/index.ts +78 -78
  28. package/package.json +160 -160
  29. package/public/arrow-bottom.svg +7 -7
  30. package/public/fonts/lg.svg +53 -53
  31. package/public/fonts/vwhead-bold-demo.html +549 -549
  32. package/public/fonts/vwhead-regular-demo.html +549 -549
  33. package/public/fonts/vwtext-bold-demo.html +549 -549
  34. package/public/fonts/vwtext-regular-demo.html +549 -549
  35. package/public/github.svg +3 -3
  36. package/public/grid_dot.svg +4 -4
  37. package/public/linkedin.svg +44 -44
  38. package/public/make-scrollable-code-focusable.js +3 -3
  39. package/public/pagefind.yml +3 -3
  40. package/public/polo.blue.svg +29 -29
  41. package/public/spoko.space.svg +71 -71
  42. package/public/twitter.svg +46 -46
  43. package/renovate.json +6 -6
  44. package/sandbox.config.json +11 -11
  45. package/sonar-project.properties +26 -26
  46. package/src/components/Category/CategoriesCarousel.astro +3 -7
  47. package/src/pages/components/badges.mdx +57 -57
  48. package/src/pages/components/breadcrumbs.mdx +139 -139
  49. package/src/pages/components/buttons.mdx +359 -359
  50. package/src/pages/components/card.mdx +294 -294
  51. package/src/pages/components/carousel.mdx +62 -62
  52. package/src/pages/components/copyright.mdx +42 -42
  53. package/src/pages/components/details-list.mdx +207 -207
  54. package/src/pages/components/features-list.mdx +37 -37
  55. package/src/pages/components/flags.mdx +49 -49
  56. package/src/pages/components/fuck-russia.mdx +39 -39
  57. package/src/pages/components/hand-drive.mdx +78 -78
  58. package/src/pages/components/headline.mdx +337 -337
  59. package/src/pages/components/image.mdx +513 -513
  60. package/src/pages/components/input.mdx +367 -367
  61. package/src/pages/components/jumbotron.mdx +530 -530
  62. package/src/pages/components/modal.mdx +212 -212
  63. package/src/pages/components/post-header.mdx +64 -64
  64. package/src/pages/components/pr-code.mdx +213 -213
  65. package/src/pages/components/product-engine.mdx +418 -418
  66. package/src/pages/components/product-number.mdx +58 -58
  67. package/src/pages/components/product-tile.mdx +51 -51
  68. package/src/pages/components/quote.mdx +33 -33
  69. package/src/pages/components/slimbanner.mdx +260 -260
  70. package/src/pages/components/table.mdx +108 -108
  71. package/src/pages/core/colors.mdx +21 -21
  72. package/src/pages/core/grid.mdx +193 -193
  73. package/src/pages/core/introduction.mdx +77 -77
  74. package/src/pages/core/tooltips.mdx +491 -491
  75. package/src/pages/patterns/introduction.mdx +60 -60
  76. package/src/styles/_variables.scss +70 -70
  77. package/tailwind.config.cjs +8 -8
  78. package/tsconfig.json +28 -28
  79. package/uno-config/index.ts +269 -269
  80. package/uno-config/theme/breakpoints.ts +9 -9
  81. package/uno-config/theme/colors.ts +65 -65
  82. package/uno-config/theme/dimensions.ts +17 -17
  83. package/uno-config/theme/effects.ts +14 -14
  84. package/uno-config/theme/grid.ts +10 -10
  85. package/uno-config/theme/index.ts +26 -26
  86. package/uno-config/theme/shortcuts/buttons.ts +53 -53
  87. package/uno-config/theme/shortcuts/components.ts +124 -124
  88. package/uno-config/theme/shortcuts/index.ts +20 -20
  89. package/uno-config/theme/shortcuts/jumbotron.ts +71 -71
  90. package/uno-config/theme/shortcuts/layout.ts +75 -75
  91. package/uno-config/theme/typography.ts +29 -29
  92. package/uno.config.ts +2 -2
package/README.md CHANGED
@@ -1,303 +1,303 @@
1
- # Spoko Design System
2
-
3
- ![Version](https://img.shields.io/github/package-json/v/polo-blue/sds)
4
-
5
- **Spoko Design System (SDS)** is an Astro-based design system with Vue 3 components and UnoCSS for styling. It's published as `spoko-design-system` on npm and serves as both a documentation site and a component library.
6
-
7
- Live documentation: https://sds.spoko.space/
8
-
9
- The project is still in the development phase, use at your own risk ;-)
10
-
11
- Please feel free to fork it, edit it and let me know what do you think about it.
12
-
13
- ## Requirements
14
-
15
- - **Node.js**: >= 22.17.0
16
- - **Package Manager**: pnpm >= 10.16.1 (v10.17.1 recommended)
17
-
18
- ## Dual-Purpose Architecture
19
-
20
- This project serves two purposes simultaneously:
21
-
22
- 1. **Documentation Site**: Astro-based documentation at https://sds.spoko.space/
23
- 2. **npm Package**: Component library exportable as `spoko-design-system`
24
-
25
- Components must work in BOTH contexts - as part of the Astro site and as importable npm package components.
26
-
27
- ## Getting Started
28
-
29
- ### Installation
30
-
31
- Install as a package:
32
-
33
- ```bash
34
- pnpm add spoko-design-system
35
- ```
36
-
37
- Or clone the repository for development:
38
-
39
- ```bash
40
- git clone https://github.com/polo-blue/sds.git
41
- cd sds
42
- pnpm install
43
- ```
44
-
45
- ### Development Commands
46
-
47
- ```bash
48
- pnpm dev # Start development server (runs on port 1234)
49
- pnpm start # Alias for dev
50
- pnpm build # Build production site
51
- pnpm preview # Preview production build
52
- pnpm check # Run Astro type checking
53
- ```
54
-
55
- ### Code Quality
56
-
57
- ```bash
58
- pnpm lint # Lint all source files
59
- pnpm lint:fix # Lint and auto-fix issues
60
- pnpm format # Format code with Prettier
61
- pnpm format:check # Check code formatting
62
- ```
63
-
64
- ### Publishing
65
-
66
- This project uses automated **semantic-release** for version management and publishing.
67
-
68
- ```bash
69
- pnpm semantic-release # Manual release (usually automated via CI)
70
- pnpm prepublishOnly # Runs build before publish (automatic)
71
- ```
72
-
73
- ## Semantic Release & Commit Conventions
74
-
75
- **All commits MUST follow conventional commits format:**
76
-
77
- ```
78
- <type>[optional scope]: <description>
79
- ```
80
-
81
- ### Commit Types
82
-
83
- - `feat`: New feature → MINOR version bump (0.1.0)
84
- - `fix`: Bug fix → PATCH version bump (0.0.1)
85
- - `perf`, `refactor`, `style`, `docs`: → PATCH version bump
86
- - `test`, `ci`, `chore`: → No release
87
-
88
- **Breaking Changes**: Add `BREAKING CHANGE:` footer → MAJOR version bump (1.0.0)
89
-
90
- ### Examples
91
-
92
- ```bash
93
- feat(components): add Modal component with accessibility features
94
- fix(Input): resolve floating label positioning
95
- docs: update Button component examples
96
- chore: update dependencies [skip ci]
97
- ```
98
-
99
- On merge to `main`, GitHub Actions automatically:
100
- 1. Analyzes commits
101
- 2. Determines version bump
102
- 3. Updates package.json and CHANGELOG.md
103
- 4. Creates GitHub release
104
- 5. Publishes to npm
105
-
106
- ## Features
107
-
108
- - ⚡️ [Vue 3](https://github.com/vuejs/core), [Vite](https://github.com/vitejs/vite), [pnpm](https://pnpm.io/) - born with fastness
109
- - 🎨 [UnoCSS](https://github.com/antfu/unocss) - the instant on-demand atomic CSS engine
110
- - 😃 [astro-icon](https://github.com/natemoo-re/astro-icon) - for local icons, sprites and `@iconify-json/*` sets
111
- - 🍔 [astro-navbar](https://github.com/surjithctly/astro-navbar) - fully responsive and accessible headless navigation bar
112
- - 🔎 [astro-pagefind](https://github.com/shishkin/astro-pagefind) - Astro integration for Pagefind static site search
113
- - 🗒 [astrojs/mdx](https://github.com/withastro/astro/tree/main/packages/integrations/mdx/) - markdown support
114
- - 📦 [Playform compression](https://github.com/Playform/compress) - compression utilities to your Astro project
115
- - 📲 [PWA](https://github.com/vite-pwa/astro) - Zero-config PWA Integration for Astro
116
- - 🏷️ [astro-meta-tags](https://github.com/patrick91/astro-meta-tags) - Meta Tags inside for Astro Dev Toolbar
117
- - 🖨 Static-site generation (SSG)
118
- - 🎡 [Swiper](https://github.com/nolimits4web/swiper) - modern mobile touch slider with hardware accelerated transitions and amazing native behavior
119
- - 🌠 [View Transitions API](https://docs.astro.build/en/guides/view-transitions/#full-site-view-transitions-spa-mode) - makes it easy to change the DOM in a single step, while creating an animated transition between the two states
120
- - ☁️ Deploy on Netlify
121
-
122
- ## Icon System
123
-
124
- The design system uses two separate but coordinated icon systems:
125
-
126
- ### 1. UnoCSS Icons (configured in `uno-config/index.ts`)
127
- - Static imports for all icon JSON files
128
- - Used via `i-{collection}-{name}` classes (e.g., `i-lucide-car`)
129
-
130
- ### 2. astro-icon (configured in `icon.config.ts`)
131
- - Lists specific icons to include from each collection
132
- - Used in Astro components via `<Icon name="collection:icon" />`
133
-
134
- ### Icon Collections
135
-
136
- The design system includes carefully curated icon collections from Iconify:
137
-
138
- - 🎨 [Material Design Icons](https://icon-sets.iconify.design/mdi/) - comprehensive icon set for UI elements
139
- - 🚗 [Ant Design Icons](https://icon-sets.iconify.design/ant-design/) - clean outlined icons
140
- - 📱 [Bootstrap Icons](https://icon-sets.iconify.design/bi/) - simple and consistent icons
141
- - 🎯 [Boxicons](https://icon-sets.iconify.design/bx/) - high quality web icons
142
- - 🌍 [Carbon Icons](https://icon-sets.iconify.design/carbon/) - IBM's design language icons
143
- - 🎪 [Lucide Icons](https://icon-sets.iconify.design/lucide/) - beautiful & consistent icon toolkit
144
- - 🎨 [Streamline Freehand Color](https://icon-sets.iconify.design/streamline-freehand-color/) - hand-drawn style colored icons
145
- - 📟 [VS Code Icons](https://icon-sets.iconify.design/vscode-icons/) - file type and technology icons
146
- - 🏢 [Simple Icons](https://icon-sets.iconify.design/simple-icons/) - brand icons for popular services
147
- - ⚡ [Fluent UI Icons](https://icon-sets.iconify.design/fluent/) - Microsoft's design system icons
148
-
149
- See the complete list and configuration in [`icon.config.ts`](./icon.config.ts).
150
-
151
- ### Adding New Icons
152
-
153
- 1. Add icon name to `icon.config.ts` in the appropriate collection's array
154
- 2. Icon is automatically available in both UnoCSS (class) and astro-icon (component)
155
-
156
- ## UnoCSS Configuration
157
-
158
- **Important**: UnoCSS config is split across two locations:
159
-
160
- 1. **Root `uno.config.ts`**: Simple wrapper that imports the main config
161
- 2. **`uno-config/` directory**: Main configuration system
162
- - `uno-config/index.ts`: Core config with `createSdsConfig()` function
163
- - `uno-config/theme/`: Theme definitions (colors, typography, breakpoints, etc.)
164
- - `uno-config/theme/shortcuts/`: Component shortcuts organized by category
165
-
166
- ### When Modifying UnoCSS
167
-
168
- - **Theme changes**: Modify files in `uno-config/theme/`
169
- - **Shortcut additions**: Add to appropriate file in `uno-config/theme/shortcuts/`
170
- - **Never edit** root `uno.config.ts` directly
171
- - The `createSdsConfig()` function can be imported by consumers to extend the config
172
-
173
- ### Customizing Core (Colors, Typography, Shadows)
174
-
175
- Theme files in `uno-config/theme/`:
176
- - `colors.ts`: Complete color palette
177
- - `typography.ts`: Font families, sizes, weights
178
- - `breakpoints.ts`: Responsive breakpoints
179
- - `dimensions.ts`: Spacing, sizing scales
180
- - `effects.ts`: Shadows, borders, transitions
181
- - `grid.ts`: Grid template configurations
182
- - `container.ts`: Container max-widths and padding
183
-
184
- Feel free to add new pages to the Core section in the documentation.
185
-
186
- ## Adding New Components
187
-
188
- ### 1. Create Component
189
-
190
- Create component in appropriate location:
191
- - Vue: `src/components/ComponentName.vue`
192
- - Astro: `src/components/ComponentName.astro`
193
-
194
- ### 2. Export from Root
195
-
196
- Export from root `index.ts` (note the `./src/` prefix):
197
-
198
- ```typescript
199
- // ✅ Correct
200
- export { default as ComponentName } from './src/components/ComponentName.vue';
201
-
202
- // ❌ Wrong
203
- export { default as ComponentName } from './components/ComponentName.vue';
204
- ```
205
-
206
- ### 3. Add Documentation
207
-
208
- Add documentation page in `src/pages/components/component-name.mdx`
209
-
210
- ### 4. Add to Navigation
211
-
212
- Add to navigation in `src/config.ts`:
213
-
214
- ```javascript
215
- export const SIDEBAR = [
216
- { text: "Core", header: true },
217
- { text: "Introduction", link: "/core/introduction" },
218
- // ...
219
- { text: "Components", header: true },
220
- { text: "Component Name", link: "/components/component-name/" },
221
- ];
222
- ```
223
-
224
- ## Adding New Sections
225
-
226
- Although it's not required, you can create folders for new sections.
227
-
228
- To show the section on the left side navigation, add it to the navigation config file at `src/config.ts`:
229
-
230
- ```javascript
231
- export const SIDEBAR = [
232
- { text: "Core", header: true },
233
- { text: "Introduction", link: "/core/introduction" },
234
- // ...
235
- { text: "Components", header: true },
236
- { text: "Buttons", link: "/components/buttons" },
237
- // ...
238
- { text: "New section", header: true },
239
- { text: "New component", link: "/new-section/new-component/" },
240
- ];
241
- ```
242
-
243
- ## Adding New Pages
244
-
245
- To add new pages just create an `.astro` or `.mdx` file in `src/pages/[section]/my-page.mdx`. Remember to add it to the navigation config in `src/config.ts` so it shows up in the left side navigation.
246
-
247
- You're free to organize the pages however you want.
248
-
249
- ## Component Preview Utility
250
-
251
- There's a class called `.component-preview` that you can use to wrap your component in a grid:
252
-
253
- ```html
254
- <div class="component-preview">
255
- <button class="text-white bg-blue-lightest px-4 py-2 rounded-md">Your component</button>
256
- </div>
257
- ```
258
-
259
- ## Path Aliases
260
-
261
- Three main path aliases defined in `tsconfig.json`:
262
- - `@components/*` → `src/components/*`
263
- - `@utils/*` → `src/utils/*`
264
- - `@types/*` → `src/types/*`
265
-
266
- ## Package Exports
267
-
268
- The package provides multiple export paths:
269
-
270
- ```javascript
271
- import { Button, Input } from 'spoko-design-system'
272
- import { createSdsConfig } from 'spoko-design-system/uno-config'
273
- import { iconConfig } from 'spoko-design-system/icons'
274
- ```
275
-
276
- Available exports:
277
- - `.`: Main component exports
278
- - `./styles/*`: Direct style imports
279
- - `./icons`: Icon configuration
280
- - `./icon-collections`: Icon collection list
281
- - `./uno-config`: UnoCSS config for consumers
282
-
283
- ## Customizing Page Layout
284
-
285
- You can find the css for the pages in `src/styles/content.css`.
286
-
287
- ## Examples
288
-
289
- Documentation and live examples:
290
- - https://sds.spoko.space/
291
-
292
- Most of the components from this repository can be seen in production:
293
- - https://catalog.polo.blue/
294
- - https://polo.blue
295
- - https://polo6r.pl
296
-
297
- ## Have Fun!
298
-
299
- Spoko Design System template was made in Poland by **[@spoko.space](https://spoko.space)** for personal and commercial use.
300
-
301
- ## License
302
-
303
- MIT
1
+ # Spoko Design System
2
+
3
+ ![Version](https://img.shields.io/github/package-json/v/polo-blue/sds)
4
+
5
+ **Spoko Design System (SDS)** is an Astro-based design system with Vue 3 components and UnoCSS for styling. It's published as `spoko-design-system` on npm and serves as both a documentation site and a component library.
6
+
7
+ Live documentation: https://sds.spoko.space/
8
+
9
+ The project is still in the development phase, use at your own risk ;-)
10
+
11
+ Please feel free to fork it, edit it and let me know what do you think about it.
12
+
13
+ ## Requirements
14
+
15
+ - **Node.js**: >= 22.17.0
16
+ - **Package Manager**: pnpm >= 10.16.1 (v10.17.1 recommended)
17
+
18
+ ## Dual-Purpose Architecture
19
+
20
+ This project serves two purposes simultaneously:
21
+
22
+ 1. **Documentation Site**: Astro-based documentation at https://sds.spoko.space/
23
+ 2. **npm Package**: Component library exportable as `spoko-design-system`
24
+
25
+ Components must work in BOTH contexts - as part of the Astro site and as importable npm package components.
26
+
27
+ ## Getting Started
28
+
29
+ ### Installation
30
+
31
+ Install as a package:
32
+
33
+ ```bash
34
+ pnpm add spoko-design-system
35
+ ```
36
+
37
+ Or clone the repository for development:
38
+
39
+ ```bash
40
+ git clone https://github.com/polo-blue/sds.git
41
+ cd sds
42
+ pnpm install
43
+ ```
44
+
45
+ ### Development Commands
46
+
47
+ ```bash
48
+ pnpm dev # Start development server (runs on port 1234)
49
+ pnpm start # Alias for dev
50
+ pnpm build # Build production site
51
+ pnpm preview # Preview production build
52
+ pnpm check # Run Astro type checking
53
+ ```
54
+
55
+ ### Code Quality
56
+
57
+ ```bash
58
+ pnpm lint # Lint all source files
59
+ pnpm lint:fix # Lint and auto-fix issues
60
+ pnpm format # Format code with Prettier
61
+ pnpm format:check # Check code formatting
62
+ ```
63
+
64
+ ### Publishing
65
+
66
+ This project uses automated **semantic-release** for version management and publishing.
67
+
68
+ ```bash
69
+ pnpm semantic-release # Manual release (usually automated via CI)
70
+ pnpm prepublishOnly # Runs build before publish (automatic)
71
+ ```
72
+
73
+ ## Semantic Release & Commit Conventions
74
+
75
+ **All commits MUST follow conventional commits format:**
76
+
77
+ ```
78
+ <type>[optional scope]: <description>
79
+ ```
80
+
81
+ ### Commit Types
82
+
83
+ - `feat`: New feature → MINOR version bump (0.1.0)
84
+ - `fix`: Bug fix → PATCH version bump (0.0.1)
85
+ - `perf`, `refactor`, `style`, `docs`: → PATCH version bump
86
+ - `test`, `ci`, `chore`: → No release
87
+
88
+ **Breaking Changes**: Add `BREAKING CHANGE:` footer → MAJOR version bump (1.0.0)
89
+
90
+ ### Examples
91
+
92
+ ```bash
93
+ feat(components): add Modal component with accessibility features
94
+ fix(Input): resolve floating label positioning
95
+ docs: update Button component examples
96
+ chore: update dependencies [skip ci]
97
+ ```
98
+
99
+ On merge to `main`, GitHub Actions automatically:
100
+ 1. Analyzes commits
101
+ 2. Determines version bump
102
+ 3. Updates package.json and CHANGELOG.md
103
+ 4. Creates GitHub release
104
+ 5. Publishes to npm
105
+
106
+ ## Features
107
+
108
+ - ⚡️ [Vue 3](https://github.com/vuejs/core), [Vite](https://github.com/vitejs/vite), [pnpm](https://pnpm.io/) - born with fastness
109
+ - 🎨 [UnoCSS](https://github.com/antfu/unocss) - the instant on-demand atomic CSS engine
110
+ - 😃 [astro-icon](https://github.com/natemoo-re/astro-icon) - for local icons, sprites and `@iconify-json/*` sets
111
+ - 🍔 [astro-navbar](https://github.com/surjithctly/astro-navbar) - fully responsive and accessible headless navigation bar
112
+ - 🔎 [astro-pagefind](https://github.com/shishkin/astro-pagefind) - Astro integration for Pagefind static site search
113
+ - 🗒 [astrojs/mdx](https://github.com/withastro/astro/tree/main/packages/integrations/mdx/) - markdown support
114
+ - 📦 [Playform compression](https://github.com/Playform/compress) - compression utilities to your Astro project
115
+ - 📲 [PWA](https://github.com/vite-pwa/astro) - Zero-config PWA Integration for Astro
116
+ - 🏷️ [astro-meta-tags](https://github.com/patrick91/astro-meta-tags) - Meta Tags inside for Astro Dev Toolbar
117
+ - 🖨 Static-site generation (SSG)
118
+ - 🎡 [Swiper](https://github.com/nolimits4web/swiper) - modern mobile touch slider with hardware accelerated transitions and amazing native behavior
119
+ - 🌠 [View Transitions API](https://docs.astro.build/en/guides/view-transitions/#full-site-view-transitions-spa-mode) - makes it easy to change the DOM in a single step, while creating an animated transition between the two states
120
+ - ☁️ Deploy on Netlify
121
+
122
+ ## Icon System
123
+
124
+ The design system uses two separate but coordinated icon systems:
125
+
126
+ ### 1. UnoCSS Icons (configured in `uno-config/index.ts`)
127
+ - Static imports for all icon JSON files
128
+ - Used via `i-{collection}-{name}` classes (e.g., `i-lucide-car`)
129
+
130
+ ### 2. astro-icon (configured in `icon.config.ts`)
131
+ - Lists specific icons to include from each collection
132
+ - Used in Astro components via `<Icon name="collection:icon" />`
133
+
134
+ ### Icon Collections
135
+
136
+ The design system includes carefully curated icon collections from Iconify:
137
+
138
+ - 🎨 [Material Design Icons](https://icon-sets.iconify.design/mdi/) - comprehensive icon set for UI elements
139
+ - 🚗 [Ant Design Icons](https://icon-sets.iconify.design/ant-design/) - clean outlined icons
140
+ - 📱 [Bootstrap Icons](https://icon-sets.iconify.design/bi/) - simple and consistent icons
141
+ - 🎯 [Boxicons](https://icon-sets.iconify.design/bx/) - high quality web icons
142
+ - 🌍 [Carbon Icons](https://icon-sets.iconify.design/carbon/) - IBM's design language icons
143
+ - 🎪 [Lucide Icons](https://icon-sets.iconify.design/lucide/) - beautiful & consistent icon toolkit
144
+ - 🎨 [Streamline Freehand Color](https://icon-sets.iconify.design/streamline-freehand-color/) - hand-drawn style colored icons
145
+ - 📟 [VS Code Icons](https://icon-sets.iconify.design/vscode-icons/) - file type and technology icons
146
+ - 🏢 [Simple Icons](https://icon-sets.iconify.design/simple-icons/) - brand icons for popular services
147
+ - ⚡ [Fluent UI Icons](https://icon-sets.iconify.design/fluent/) - Microsoft's design system icons
148
+
149
+ See the complete list and configuration in [`icon.config.ts`](./icon.config.ts).
150
+
151
+ ### Adding New Icons
152
+
153
+ 1. Add icon name to `icon.config.ts` in the appropriate collection's array
154
+ 2. Icon is automatically available in both UnoCSS (class) and astro-icon (component)
155
+
156
+ ## UnoCSS Configuration
157
+
158
+ **Important**: UnoCSS config is split across two locations:
159
+
160
+ 1. **Root `uno.config.ts`**: Simple wrapper that imports the main config
161
+ 2. **`uno-config/` directory**: Main configuration system
162
+ - `uno-config/index.ts`: Core config with `createSdsConfig()` function
163
+ - `uno-config/theme/`: Theme definitions (colors, typography, breakpoints, etc.)
164
+ - `uno-config/theme/shortcuts/`: Component shortcuts organized by category
165
+
166
+ ### When Modifying UnoCSS
167
+
168
+ - **Theme changes**: Modify files in `uno-config/theme/`
169
+ - **Shortcut additions**: Add to appropriate file in `uno-config/theme/shortcuts/`
170
+ - **Never edit** root `uno.config.ts` directly
171
+ - The `createSdsConfig()` function can be imported by consumers to extend the config
172
+
173
+ ### Customizing Core (Colors, Typography, Shadows)
174
+
175
+ Theme files in `uno-config/theme/`:
176
+ - `colors.ts`: Complete color palette
177
+ - `typography.ts`: Font families, sizes, weights
178
+ - `breakpoints.ts`: Responsive breakpoints
179
+ - `dimensions.ts`: Spacing, sizing scales
180
+ - `effects.ts`: Shadows, borders, transitions
181
+ - `grid.ts`: Grid template configurations
182
+ - `container.ts`: Container max-widths and padding
183
+
184
+ Feel free to add new pages to the Core section in the documentation.
185
+
186
+ ## Adding New Components
187
+
188
+ ### 1. Create Component
189
+
190
+ Create component in appropriate location:
191
+ - Vue: `src/components/ComponentName.vue`
192
+ - Astro: `src/components/ComponentName.astro`
193
+
194
+ ### 2. Export from Root
195
+
196
+ Export from root `index.ts` (note the `./src/` prefix):
197
+
198
+ ```typescript
199
+ // ✅ Correct
200
+ export { default as ComponentName } from './src/components/ComponentName.vue';
201
+
202
+ // ❌ Wrong
203
+ export { default as ComponentName } from './components/ComponentName.vue';
204
+ ```
205
+
206
+ ### 3. Add Documentation
207
+
208
+ Add documentation page in `src/pages/components/component-name.mdx`
209
+
210
+ ### 4. Add to Navigation
211
+
212
+ Add to navigation in `src/config.ts`:
213
+
214
+ ```javascript
215
+ export const SIDEBAR = [
216
+ { text: "Core", header: true },
217
+ { text: "Introduction", link: "/core/introduction" },
218
+ // ...
219
+ { text: "Components", header: true },
220
+ { text: "Component Name", link: "/components/component-name/" },
221
+ ];
222
+ ```
223
+
224
+ ## Adding New Sections
225
+
226
+ Although it's not required, you can create folders for new sections.
227
+
228
+ To show the section on the left side navigation, add it to the navigation config file at `src/config.ts`:
229
+
230
+ ```javascript
231
+ export const SIDEBAR = [
232
+ { text: "Core", header: true },
233
+ { text: "Introduction", link: "/core/introduction" },
234
+ // ...
235
+ { text: "Components", header: true },
236
+ { text: "Buttons", link: "/components/buttons" },
237
+ // ...
238
+ { text: "New section", header: true },
239
+ { text: "New component", link: "/new-section/new-component/" },
240
+ ];
241
+ ```
242
+
243
+ ## Adding New Pages
244
+
245
+ To add new pages just create an `.astro` or `.mdx` file in `src/pages/[section]/my-page.mdx`. Remember to add it to the navigation config in `src/config.ts` so it shows up in the left side navigation.
246
+
247
+ You're free to organize the pages however you want.
248
+
249
+ ## Component Preview Utility
250
+
251
+ There's a class called `.component-preview` that you can use to wrap your component in a grid:
252
+
253
+ ```html
254
+ <div class="component-preview">
255
+ <button class="text-white bg-blue-lightest px-4 py-2 rounded-md">Your component</button>
256
+ </div>
257
+ ```
258
+
259
+ ## Path Aliases
260
+
261
+ Three main path aliases defined in `tsconfig.json`:
262
+ - `@components/*` → `src/components/*`
263
+ - `@utils/*` → `src/utils/*`
264
+ - `@types/*` → `src/types/*`
265
+
266
+ ## Package Exports
267
+
268
+ The package provides multiple export paths:
269
+
270
+ ```javascript
271
+ import { Button, Input } from 'spoko-design-system'
272
+ import { createSdsConfig } from 'spoko-design-system/uno-config'
273
+ import { iconConfig } from 'spoko-design-system/icons'
274
+ ```
275
+
276
+ Available exports:
277
+ - `.`: Main component exports
278
+ - `./styles/*`: Direct style imports
279
+ - `./icons`: Icon configuration
280
+ - `./icon-collections`: Icon collection list
281
+ - `./uno-config`: UnoCSS config for consumers
282
+
283
+ ## Customizing Page Layout
284
+
285
+ You can find the css for the pages in `src/styles/content.css`.
286
+
287
+ ## Examples
288
+
289
+ Documentation and live examples:
290
+ - https://sds.spoko.space/
291
+
292
+ Most of the components from this repository can be seen in production:
293
+ - https://catalog.polo.blue/
294
+ - https://polo.blue
295
+ - https://polo6r.pl
296
+
297
+ ## Have Fun!
298
+
299
+ Spoko Design System template was made in Poland by **[@spoko.space](https://spoko.space)** for personal and commercial use.
300
+
301
+ ## License
302
+
303
+ MIT