@moto-nrw/design-system 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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Ganztagshelden / moto-nrw
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,141 @@
1
+ <p align="center">
2
+ <img src="docs/logo.png" alt="Ganztagshelden Logo" width="120" />
3
+ </p>
4
+
5
+ <h1 align="center">Ganztagshelden - Design System</h1>
6
+
7
+ <p align="center">
8
+ Shared component library and design tokens for the Ganztagshelden ecosystem.<br/>
9
+ Consumed by <strong>project-phoenix</strong>, <strong>PyrePortal</strong>, and <strong>website</strong>.
10
+ </p>
11
+
12
+ <p align="center">
13
+ <a href="https://moto-nrw.github.io/design-system/"><strong>📖 Storybook</strong></a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="https://github.com/moto-nrw/design-system/actions"><img src="https://github.com/moto-nrw/design-system/actions/workflows/ci.yml/badge.svg" alt="CI" /></a>
14
+ </p>
15
+
16
+ ---
17
+
18
+ ## Brand Color System
19
+
20
+ <img src="docs/brand-palette.png" alt="Brand Color Palette" width="100%" />
21
+
22
+ | Palette | Steps | Usage |
23
+ |---------|-------|-------|
24
+ | **Steel** | 50–900 (10) | Logo, text, borders, backgrounds |
25
+ | **Sage** | 100–900 (5) | Primary accent — buttons, CTAs, links, success |
26
+ | **Warm** | 50–900 (10) | Secondary accent — warnings, highlights, badges |
27
+ | **Red** | 50–600 (6) | Warm terracotta — error, destructive states |
28
+
29
+ ## Components (26)
30
+
31
+ | Category | Components |
32
+ |----------|-----------|
33
+ | **Brand** | Logo |
34
+ | **Actions** | Button (7 variants, loading) |
35
+ | **Input** | Input (password toggle), Textarea, Select, SearchBar, Checkbox, Radio, Toggle |
36
+ | **Navigation** | Tabs (sliding indicator), FilterChips |
37
+ | **Feedback** | Alert, Toast, Spinner, Skeleton, StatusDot, Pill (6 colors) |
38
+ | **Overlay** | Modal, ConfirmationModal, DropdownMenu |
39
+ | **Data** | Badge, Avatar |
40
+ | **Layout** | Card (hoverable glow), Accordion, Divider |
41
+ | **Icons** | [Lucide](https://lucide.dev) (peer dependency) |
42
+
43
+ ## Quick Start
44
+
45
+ ```bash
46
+ pnpm install
47
+ pnpm storybook # localhost:6006
48
+ ```
49
+
50
+ ## Usage in Consumer Repos
51
+
52
+ ### 1. Setup (one-time)
53
+
54
+ Add `.npmrc` to the repo root:
55
+
56
+ ```
57
+ @moto-nrw:registry=https://npm.pkg.github.com
58
+ ```
59
+
60
+ Install:
61
+
62
+ ```bash
63
+ pnpm add @moto-nrw/design-system lucide-react
64
+ ```
65
+
66
+ ### 2. Import Tokens
67
+
68
+ For **Tailwind v4** consumers (recommended):
69
+
70
+ ```css
71
+ /* globals.css */
72
+ @import "tailwindcss";
73
+ @import "@moto-nrw/design-system/tailwind";
74
+ ```
75
+
76
+ Or import CSS variables directly:
77
+
78
+ ```tsx
79
+ import "@moto-nrw/design-system/tokens";
80
+ ```
81
+
82
+ ### 3. Use Components
83
+
84
+ ```tsx
85
+ import { Button, Card, Modal, Pill } from "@moto-nrw/design-system";
86
+ import { Search, Settings } from "lucide-react";
87
+
88
+ function Example() {
89
+ return (
90
+ <Card hoverable>
91
+ <Button variant="primary">Speichern</Button>
92
+ <Pill label="Aktiv" color="green" />
93
+ </Card>
94
+ );
95
+ }
96
+ ```
97
+
98
+ ### Package Exports
99
+
100
+ ```tsx
101
+ import { Button, Card, ... } from "@moto-nrw/design-system"; // components
102
+ import "@moto-nrw/design-system/tokens"; // CSS variables
103
+ import "@moto-nrw/design-system/tailwind"; // Tailwind v4 theme
104
+ ```
105
+
106
+ ## CI Setup (GitHub Actions)
107
+
108
+ ```yaml
109
+ - uses: actions/setup-node@v6
110
+ with:
111
+ registry-url: https://npm.pkg.github.com
112
+ scope: "@moto-nrw"
113
+
114
+ - run: pnpm install
115
+ env:
116
+ NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
117
+ ```
118
+
119
+ ## Development
120
+
121
+ | Command | Purpose |
122
+ |---------|---------|
123
+ | `pnpm build` | Full production build (tokens + tsup + validation) |
124
+ | `pnpm storybook` | Component playground on localhost:6006 |
125
+ | `pnpm test:run` | Run tests |
126
+ | `pnpm lint` | Lint with Biome |
127
+ | `pnpm tokens` | Regenerate CSS vars from token JSONs |
128
+ | `pnpm knip` | Find unused code |
129
+
130
+ ## Release Workflow
131
+
132
+ 1. Make changes + `pnpm changeset` to describe what changed
133
+ 2. Commit and push to `development`
134
+ 3. CI creates a "Version Packages" PR (bumps version + CHANGELOG)
135
+ 4. Merge that PR — CI publishes to GitHub Packages
136
+
137
+ Consumer repos get auto-updated via Dependabot.
138
+
139
+ ## License
140
+
141
+ MIT