@khipu/design-system 0.1.0-alpha.44 → 0.1.0-alpha.46
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 +93 -51
- package/dist/beercss/khipu-beercss.css +894 -5
- package/dist/beercss/khipu-beercss.js +171 -0
- package/dist/beercss/khipu-beercss.min.css +1 -1
- package/dist/beercss/khipu-beercss.min.js +1 -1
- package/dist/beercss/metadata.json +4 -4
- package/dist/index.d.mts +281 -8
- package/dist/index.d.ts +281 -8
- package/dist/index.js +441 -37
- package/dist/index.mjs +412 -21
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ npm install @khipu/design-system
|
|
|
21
21
|
```kotlin
|
|
22
22
|
// build.gradle.kts
|
|
23
23
|
dependencies {
|
|
24
|
-
implementation("com.khipu:design-system:0.1.0-alpha.
|
|
24
|
+
implementation("com.khipu:design-system:0.1.0-alpha.44")
|
|
25
25
|
}
|
|
26
26
|
```
|
|
27
27
|
|
|
@@ -33,24 +33,25 @@ pod 'KhipuDesignSystem'
|
|
|
33
33
|
|
|
34
34
|
## Prerequisites
|
|
35
35
|
|
|
36
|
-
- Node.js >=
|
|
37
|
-
- React >=
|
|
36
|
+
- Node.js >= 20.0.0
|
|
37
|
+
- React >= 18.0.0
|
|
38
|
+
- TypeScript >= 5.0.0
|
|
38
39
|
|
|
39
40
|
## Quick Start
|
|
40
41
|
|
|
41
42
|
### Import Components
|
|
42
43
|
|
|
43
44
|
```tsx
|
|
44
|
-
import {
|
|
45
|
+
import { KdsButton, KdsTextField, KdsCard } from '@khipu/design-system';
|
|
45
46
|
|
|
46
47
|
function App() {
|
|
47
48
|
return (
|
|
48
|
-
<
|
|
49
|
-
<
|
|
50
|
-
<
|
|
49
|
+
<KdsCard>
|
|
50
|
+
<KdsTextField label="Email" placeholder="Enter your email" />
|
|
51
|
+
<KdsButton variant="contained" color="primary">
|
|
51
52
|
Submit
|
|
52
|
-
</
|
|
53
|
-
</
|
|
53
|
+
</KdsButton>
|
|
54
|
+
</KdsCard>
|
|
54
55
|
);
|
|
55
56
|
}
|
|
56
57
|
```
|
|
@@ -75,6 +76,30 @@ const styles = {
|
|
|
75
76
|
import '@khipu/design-system/css';
|
|
76
77
|
```
|
|
77
78
|
|
|
79
|
+
### Using BeerCSS Bundle (For Grails/Legacy Apps)
|
|
80
|
+
|
|
81
|
+
The design system includes a complete **BeerCSS bundle** with Material Design 3 components, ideal for Grails applications or projects that prefer utility-based CSS:
|
|
82
|
+
|
|
83
|
+
```html
|
|
84
|
+
<!-- Via CDN -->
|
|
85
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@khipu/design-system@0.1.0-alpha.44/dist/beercss/khipu-beercss.min.css">
|
|
86
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@khipu/design-system@0.1.0-alpha.44/dist/beercss/khipu-beercss.min.js"></script>
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
```javascript
|
|
90
|
+
// Via npm
|
|
91
|
+
import '@khipu/design-system/beercss/css';
|
|
92
|
+
import '@khipu/design-system/beercss/js';
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
**What's included:**
|
|
96
|
+
- BeerCSS v4.0.1 (Material Design 3)
|
|
97
|
+
- Khipu design tokens (colors, spacing, typography)
|
|
98
|
+
- Custom Khipu components
|
|
99
|
+
- Vanilla JavaScript utilities (modals, snackbars, sidenav)
|
|
100
|
+
|
|
101
|
+
**See:** `src/beercss/README.md` for complete documentation
|
|
102
|
+
|
|
78
103
|
## Running the Project
|
|
79
104
|
|
|
80
105
|
### Setup
|
|
@@ -142,36 +167,43 @@ Open http://localhost:6006 in your browser to explore the component library.
|
|
|
142
167
|
| `@khipu/design-system` | All components and tokens |
|
|
143
168
|
| `@khipu/design-system/tokens` | Design tokens only |
|
|
144
169
|
| `@khipu/design-system/css` | CSS variables |
|
|
170
|
+
| `@khipu/design-system/beercss` | BeerCSS bundle (CSS + JS) |
|
|
171
|
+
| `@khipu/design-system/beercss/css` | BeerCSS CSS only |
|
|
172
|
+
| `@khipu/design-system/beercss/js` | BeerCSS JavaScript only |
|
|
145
173
|
| `@khipu/design-system/components/core` | Core UI components |
|
|
146
174
|
| `@khipu/design-system/components/domain` | Domain-specific components |
|
|
147
175
|
|
|
148
176
|
## Available Components
|
|
149
177
|
|
|
150
|
-
### Core Components
|
|
151
|
-
|
|
152
|
-
Foundational UI primitives:
|
|
153
|
-
|
|
154
|
-
| Component | Description |
|
|
155
|
-
|
|
156
|
-
| `
|
|
157
|
-
| `
|
|
158
|
-
| `
|
|
159
|
-
| `
|
|
160
|
-
| `
|
|
161
|
-
| `
|
|
162
|
-
| `
|
|
178
|
+
### Core Components (17)
|
|
179
|
+
|
|
180
|
+
Foundational UI primitives with Khipu theme:
|
|
181
|
+
|
|
182
|
+
| Component | Description | Storybook |
|
|
183
|
+
|-----------|-------------|-----------|
|
|
184
|
+
| `KdsButton` | Action buttons with variants: `contained`, `outlined`, `text` | ✅ |
|
|
185
|
+
| `KdsTextField` | Text input fields with validation support | ✅ |
|
|
186
|
+
| `KdsCheckbox` | Checkbox input with multiple sizes and colors | ✅ |
|
|
187
|
+
| `KdsRadioGroup` | Radio button group component | ⚪ |
|
|
188
|
+
| `KdsSelect` | Dropdown selection component | ⚪ |
|
|
189
|
+
| `KdsModal` | Dialog/modal windows with sizes and transitions | ✅ |
|
|
190
|
+
| `KdsCard` | Container with header, content, and actions | ✅ |
|
|
191
|
+
| `KdsSpinner` | Loading indicator with multiple sizes | ✅ |
|
|
192
|
+
| `KdsLinearProgress` | Progress bar indicator | ⚪ |
|
|
193
|
+
| `KdsAlert` | Alert/notification messages | ⚪ |
|
|
194
|
+
| `KdsTypography` | Text component with semantic variants | ✅ |
|
|
195
|
+
| `KdsTabs` | Tab navigation component | ✅ |
|
|
196
|
+
| `KdsLogoHeader` | Khipu branded header with logo | ✅ |
|
|
197
|
+
| `KdsChip` | Compact element for tags/labels | ⚪ |
|
|
198
|
+
| `KdsSnackbar` | Toast notifications | ⚪ |
|
|
199
|
+
| `KdsTooltip` | Contextual help tooltips | ⚪ |
|
|
200
|
+
| `KdsAccordion` | Expandable/collapsible panels | ⚪ |
|
|
201
|
+
|
|
202
|
+
**Coverage:** 9/17 components have Storybook stories (53%)
|
|
163
203
|
|
|
164
204
|
### Domain Components
|
|
165
205
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
| Component | Description |
|
|
169
|
-
|-----------|-------------|
|
|
170
|
-
| `BankSelector` | Bank selection interface |
|
|
171
|
-
| `PaymentStepper` | Multi-step payment flow indicator |
|
|
172
|
-
| `MandateStatusBadge` | Status badge for payment mandates |
|
|
173
|
-
| `PayoutSummaryCard` | Payout information display |
|
|
174
|
-
| `EmptyState` | Empty state placeholder |
|
|
206
|
+
_Planned for future releases_ - Domain-specific components for the payment platform will be added as the system matures.
|
|
175
207
|
|
|
176
208
|
## Design Tokens
|
|
177
209
|
|
|
@@ -259,10 +291,10 @@ All components are fully typed. Import types alongside components:
|
|
|
259
291
|
|
|
260
292
|
```tsx
|
|
261
293
|
import {
|
|
262
|
-
|
|
263
|
-
type
|
|
264
|
-
type
|
|
265
|
-
type
|
|
294
|
+
KdsButton,
|
|
295
|
+
type KdsButtonProps,
|
|
296
|
+
type KdsButtonVariant,
|
|
297
|
+
type KdsButtonColor
|
|
266
298
|
} from '@khipu/design-system';
|
|
267
299
|
```
|
|
268
300
|
|
|
@@ -272,23 +304,33 @@ import {
|
|
|
272
304
|
src/
|
|
273
305
|
├── index.ts # Main entry point
|
|
274
306
|
├── tokens/
|
|
275
|
-
│ ├── index.ts # Design tokens
|
|
276
|
-
│
|
|
307
|
+
│ ├── index.ts # Design tokens (source of truth)
|
|
308
|
+
│ ├── tokens.json # Generated - JSON format
|
|
309
|
+
│ └── css-variables.css # Generated - CSS custom properties
|
|
310
|
+
├── theme/
|
|
311
|
+
│ ├── index.ts # MUI theme configuration
|
|
312
|
+
│ └── ThemeProvider.tsx # Theme provider component
|
|
277
313
|
└── components/
|
|
278
|
-
├── core/ # Core UI components
|
|
279
|
-
│ ├──
|
|
280
|
-
│ ├──
|
|
281
|
-
│ ├──
|
|
282
|
-
│ ├──
|
|
283
|
-
│ ├──
|
|
284
|
-
│ ├──
|
|
285
|
-
│
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
314
|
+
├── core/ # 17 Core UI components (Kds* prefix)
|
|
315
|
+
│ ├── KdsButton/
|
|
316
|
+
│ ├── KdsTextField/
|
|
317
|
+
│ ├── KdsCheckbox/
|
|
318
|
+
│ ├── KdsRadioGroup/
|
|
319
|
+
│ ├── KdsSelect/
|
|
320
|
+
│ ├── KdsModal/
|
|
321
|
+
│ ├── KdsCard/
|
|
322
|
+
│ ├── KdsSpinner/
|
|
323
|
+
│ ├── KdsLinearProgress/
|
|
324
|
+
│ ├── KdsAlert/
|
|
325
|
+
│ ├── KdsTypography/
|
|
326
|
+
│ ├── KdsTabs/
|
|
327
|
+
│ ├── KdsLogoHeader/
|
|
328
|
+
│ ├── KdsChip/
|
|
329
|
+
│ ├── KdsSnackbar/
|
|
330
|
+
│ ├── KdsTooltip/
|
|
331
|
+
│ └── KdsAccordion/
|
|
332
|
+
└── domain/ # Future: Domain-specific components
|
|
333
|
+
└── (empty)
|
|
292
334
|
```
|
|
293
335
|
|
|
294
336
|
## License
|