@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 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.6")
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 >= 18.0.0
37
- - React >= 17.0.0
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 { Button, TextField, Card } from '@khipu/design-system';
45
+ import { KdsButton, KdsTextField, KdsCard } from '@khipu/design-system';
45
46
 
46
47
  function App() {
47
48
  return (
48
- <Card>
49
- <TextField label="Email" placeholder="Enter your email" />
50
- <Button variant="contained" color="primary">
49
+ <KdsCard>
50
+ <KdsTextField label="Email" placeholder="Enter your email" />
51
+ <KdsButton variant="contained" color="primary">
51
52
  Submit
52
- </Button>
53
- </Card>
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
- | `Button` | Action buttons with variants: `contained`, `outlined`, `text` |
157
- | `TextField` | Text input fields with validation support |
158
- | `Checkbox` | Checkbox input with multiple sizes and colors |
159
- | `Select` | Dropdown selection component |
160
- | `Modal` | Dialog/modal windows |
161
- | `Card` | Container with `CardHeader`, `CardContent`, `CardActions` |
162
- | `Spinner` | Loading indicator |
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
- Khipu-specific components for the payment platform:
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
- Button,
263
- type ButtonProps,
264
- type ButtonVariant,
265
- type ButtonColor
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
- └── css-variables.css # CSS custom properties
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
- │ ├── Button/
280
- │ ├── TextField/
281
- │ ├── Checkbox/
282
- │ ├── Select/
283
- │ ├── Modal/
284
- │ ├── Card/
285
- └── Spinner/
286
- └── domain/ # Domain-specific components
287
- ├── BankSelector/
288
- ├── PaymentStepper/
289
- ├── MandateStatusBadge/
290
- ├── PayoutSummaryCard/
291
- └── EmptyState/
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