@hellboy/ds 0.1.2 → 0.1.3

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
@@ -1,65 +1,119 @@
1
- # Hellboy Design System - Core
1
+ # Hellboy Design System
2
2
 
3
- Base package for the Hellboy Design System containing foundational components, tokens, and styling utilities.
3
+ A comprehensive, accessible-first design system built with React, TypeScript, and modern web standards.
4
4
 
5
5
  ## 📦 Package Contents
6
6
 
7
- ### Tokens
8
- - **Colors**: Primary, neutral, and semantic colors
9
- - **Typography**: Font families, sizes, weights, and line heights
10
- - **Spacing**: Consistent spacing scale
7
+ ### 🎨 Design Tokens
8
+ - **Colors**: HSLA-based semantic color system with 7 base hues (primary, secondary, accent, success, warning, error, info)
9
+ - **Typography**: Signika (headings) and Rubik (body) font families with consistent scale
10
+ - **Spacing**: Consistent spacing scale from `--spacing-1` to `--spacing-16`
11
+ - **Motion**: Transition tokens respecting `prefers-reduced-motion`
11
12
 
12
- ### Foundations
13
- - **Global Reset**: Base HTML and element resets
14
- - **Utilities**: Helper functions for style injection
13
+ ### 🧱 Foundations
14
+ - **Global Styles**: Base HTML resets and typography
15
+ - **Theme System**: Light/Dark modes with automatic system preference detection
16
+ - **User Preferences**: Persistent theme and color settings
15
17
 
16
- ### Components
17
- - **Button**: Accessible interactive component with multiple variants and sizes (powered by AriaKit)
18
+ ### 🎯 Components
19
+
20
+ **Layout & Structure**
21
+ - **Layout** - Main application layout with navigation
22
+ - **Page** - Page wrapper with consistent spacing
23
+ - **Header** - Page headers with titles, subtitles, and tags
24
+ - **Section** - Content sections with automatic indexing
25
+ - **Grid** - Responsive grid system
26
+ - **Card** - Content cards with variants
27
+ - **Footer** - Page footer component
28
+
29
+ **Forms & Inputs**
30
+ - **Button** - Interactive buttons with variants, sizes, icons, and loading states
31
+ - **Checkbox** - Accessible checkboxes with label support
32
+ - **Radio** - Radio button groups
33
+ - **Select** - Dropdown selection component
34
+ - **Input** - Text inputs (text, email, password, search, tel, url, number, date, time, datetime)
35
+ - **Slider** - Range slider control
36
+
37
+ **Navigation**
38
+ - **Navbar** - Main navigation bar with routing
39
+ - **FloatingBar** - Floating action bar
40
+
41
+ **Feedback & Display**
42
+ - **Badge** - Status and label badges
43
+ - **Banner** - Alert and notification banners
44
+ - **CodeBlock** - Syntax-highlighted code display
45
+ - **List** - Structured list component
46
+
47
+ **Interactive**
48
+ - **ThemeControl** - Theme switcher component
49
+ - **ColorControl** - Color customization interface
50
+ - **DragHandle** - Drag and drop handles
51
+ - **Icons** - Iconify integration with thousands of icons
18
52
 
19
53
  ## 🚀 Getting Started
20
54
 
21
55
  ### Installation
22
56
 
23
57
  ```bash
24
- npm install @hellboy-ds/core @ariakit/react react react-dom
58
+ npm install @hellboy/ds @ariakit/react react react-dom
25
59
  ```
26
60
 
27
61
  ### Usage
28
62
 
29
63
  ```tsx
30
- import { Button, injectGlobalStyles } from '@hellboy-ds/core';
31
-
32
- // Inject global styles once at app initialization
33
- injectGlobalStyles();
64
+ import { Button, Layout, Page, Header, Section } from '@hellboy/ds';
65
+ import '@hellboy/ds/styles.css';
34
66
 
35
- // Use the Button component
36
67
  export function App() {
37
68
  return (
38
- <div>
39
- <Button>Primary Button</Button>
40
- <Button variant="secondary">Secondary Button</Button>
41
- <Button variant="tertiary">Tertiary Button</Button>
42
- <Button size="lg">Large Button</Button>
43
- <Button isLoading>Loading...</Button>
44
- <Button disabled>Disabled Button</Button>
45
- </div>
69
+ <Layout>
70
+ <Page>
71
+ <Header
72
+ title="Welcome"
73
+ subtitle="Hellboy Design System"
74
+ tags={['React', 'TypeScript', 'Accessible']}
75
+ />
76
+
77
+ <Section title="Getting Started">
78
+ <Button>Primary Button</Button>
79
+ <Button variant="secondary">Secondary Button</Button>
80
+ <Button variant="tertiary">Tertiary Button</Button>
81
+ <Button variant="ghost">Ghost Button</Button>
82
+
83
+ <Button size="xs">Extra Small</Button>
84
+ <Button size="sm">Small</Button>
85
+ <Button size="md">Medium</Button>
86
+ <Button size="lg">Large</Button>
87
+
88
+ <Button isLoading>Loading...</Button>
89
+ <Button startIcon="mdi:check">With Icon</Button>
90
+ </Section>
91
+ </Page>
92
+ </Layout>
46
93
  );
47
94
  }
48
95
  ```
49
96
 
50
- ## 🎨 Customization
97
+ ## 🎨 Theme System
51
98
 
52
- All tokens are exported and can be imported directly:
99
+ Hellboy includes a comprehensive theming system with light/dark modes and customizable colors:
53
100
 
54
101
  ```tsx
55
- import { colors, typography, spacing } from '@hellboy-ds/core';
56
-
57
- // Use tokens in your components
58
- const customStyle = {
59
- color: colors.primary,
60
- fontSize: typography.fontSize.lg,
61
- padding: spacing[4],
62
- };
102
+ import { getUserPreferences, setUserPreferences } from '@hellboy/ds';
103
+
104
+ // Get current preferences
105
+ const prefs = getUserPreferences();
106
+ console.log(prefs.theme); // 'light' | 'dark' | 'auto'
107
+
108
+ // Update theme
109
+ setUserPreferences({ theme: 'dark' });
110
+
111
+ // Customize colors
112
+ setUserPreferences({
113
+ colors: {
114
+ primary: { hue: 220, saturation: 70, lightness: 50 }
115
+ }
116
+ });
63
117
  ```
64
118
 
65
119
  ## 📝 Building
@@ -72,40 +126,133 @@ npm run clean # Clean dist directory
72
126
 
73
127
  ## 📋 Features
74
128
 
75
- - ✅ Built with AriaKit for accessibility
76
- - ✅ Full ARIA support out of the box
77
- - ✅ CSS-in-JS styling with inline tokens
78
- - ✅ Strongly typed TypeScript components
79
- - ✅ Consistent design tokens system
80
- - ✅ Semantic color palette
81
- - ✅ Responsive and accessible components
82
- - ✅ Loading and disabled states
83
-
84
- ## 🔄 Component Variants
85
-
86
- ### Button Variants
87
- - `primary` - Main action button
88
- - `secondary` - Alternative action button
89
- - `tertiary` - Low emphasis action button
90
-
91
- ### Button Sizes
92
- - `sm` - Small (32px height)
93
- - `md` - Medium (40px height) - default
94
- - `lg` - Large (48px height)
95
-
96
- ### Button Props
97
- - `variant` - Button style variant
129
+ - ✅ **Accessibility-First**: Built with WCAG 2.1 AA compliance and AriaKit primitives
130
+ - ✅ **TypeScript Native**: Full type safety and IntelliSense support
131
+ - ✅ **Theme System**: Light/Dark modes with customizable colors (HSLA-based)
132
+ - ✅ **Responsive**: Mobile-first, adaptive components
133
+ - ✅ **Iconify Integration**: Access to thousands of icons
134
+ - ✅ **Persistent Preferences**: User theme and color choices saved locally
135
+ - ✅ **Modern Stack**: React 18+, CSS Custom Properties, Vite-optimized
136
+ - ✅ **Semantic HTML**: Proper markup with ARIA attributes
137
+ - ✅ **Performance**: CSS-first styling, minimal runtime overhead
138
+
139
+ ## 🔄 Component API Examples
140
+
141
+ ### Button
142
+
143
+ **Variants:** `primary` | `secondary` | `tertiary` | `ghost`
144
+
145
+ **Sizes:** `xs` | `sm` | `md` (default) | `lg`
146
+
147
+ **Props:**
148
+ - `variant` - Visual style
98
149
  - `size` - Button size
99
150
  - `isLoading` - Show loading spinner
100
- - `disabled` - Disable the button
101
- - `fullWidth` - Make button full width
102
- - All standard AriaKit button attributes are supported
151
+ - `disabled` - Disable interaction
152
+ - `fullWidth` - Expand to container width
153
+ - `startIcon` / `endIcon` - Icon names from Iconify
154
+ - `iconOnly` - Icon-only button (requires `aria-label`)
155
+
156
+ ```tsx
157
+ <Button size="xs">Extra Small</Button>
158
+ <Button size="sm">Small</Button>
159
+ <Button size="md">Medium (Default)</Button>
160
+ <Button size="lg">Large</Button>
161
+
162
+ <Button variant="primary">Primary</Button>
163
+ <Button variant="secondary">Secondary</Button>
164
+ <Button variant="tertiary">Tertiary</Button>
165
+ <Button variant="ghost">Ghost</Button>
166
+
167
+ <Button startIcon="mdi:check">Save</Button>
168
+ <Button endIcon="mdi:arrow-right">Next</Button>
169
+ <Button iconOnly aria-label="Settings">
170
+ <Icon name="mdi:cog" />
171
+ </Button>
172
+ ```
173
+
174
+ ### Input Types
175
+
176
+ All inputs support standard HTML input props plus:
177
+ - `label` - Input label text
178
+ - `helperText` - Helper text below input
179
+ - `error` - Error message
180
+ - `fullWidth` - Expand to container width
181
+
182
+ ```tsx
183
+ <InputText label="Name" placeholder="Enter your name" />
184
+ <InputEmail label="Email" required />
185
+ <InputPassword label="Password" />
186
+ <InputDate label="Birthday" />
187
+ <InputNumber label="Age" min={0} max={120} />
188
+ ```
189
+
190
+ ### Card
191
+
192
+ ```tsx
193
+ <Card variant="elevated">
194
+ <h3>Card Title</h3>
195
+ <p>Card content goes here</p>
196
+ </Card>
197
+ ```
198
+
199
+ ### Badge
200
+
201
+ ```tsx
202
+ <Badge variant="primary">New</Badge>
203
+ <Badge variant="success">Active</Badge>
204
+ <Badge variant="error">Error</Badge>
205
+ ```
103
206
 
104
207
  ## ♿ Accessibility
105
208
 
106
- All components are built with accessibility in mind:
107
- - Full keyboard navigation support
108
- - ARIA attributes automatically managed
109
- - Screen reader friendly
110
- - Focus management
111
- - Semantic HTML
209
+ Every component is built with accessibility as a core principle:
210
+
211
+ - **Keyboard Navigation**: Full support across all interactive components with logical tab order
212
+ - **Screen Reader Support**: Proper ARIA labels, roles, and live regions
213
+ - **Focus Management**: Visible focus indicators respecting user preferences
214
+ - **Semantic HTML**: Native elements enhanced with ARIA when needed
215
+ - **Color Contrast**: WCAG AA compliant color combinations in both themes
216
+ - **Motion Respect**: Honors `prefers-reduced-motion` for animations
217
+ - **AriaKit Foundation**: Leverages battle-tested accessibility primitives
218
+
219
+ ## 🏗️ Development Status
220
+
221
+ Hellboy Design System is currently in **active development** (v0.1.x). The core architecture and components are production-ready for testing and exploration, with ongoing iterations to enhance functionality and accessibility coverage.
222
+
223
+ **What's Ready:**
224
+ - Core theming system with light/dark modes
225
+ - 25+ production-ready components
226
+ - Full TypeScript support
227
+ - Comprehensive accessibility features
228
+
229
+ **In Progress:**
230
+ - Additional component variants
231
+ - Enhanced customization APIs
232
+ - Expanded documentation
233
+ - Performance optimizations
234
+
235
+ ## 📦 Package Structure
236
+
237
+ ```
238
+ @hellboy/ds
239
+ ├── components/ # All React components
240
+ ├── style/ # CSS and theming
241
+ │ ├── foundations/ # Base styles
242
+ │ ├── themes/ # Light/dark themes
243
+ │ └── components/ # Component styles
244
+ ├── utils/ # Utility functions
245
+ └── contexts/ # React contexts
246
+ ```
247
+
248
+ ## 🤝 Contributing
249
+
250
+ This is an evolving design system. Feedback and contributions are welcome as the system matures toward its comprehensive vision of balanced, accessible, and beautiful design.
251
+
252
+ ## 📄 License
253
+
254
+ MIT
255
+
256
+ ---
257
+
258
+ **Built with the philosophy of balance:** Light and Dark, Chaos and Precision, Beauty and Function. ✨
package/dist/index.css CHANGED
@@ -302,7 +302,7 @@ h6 {
302
302
  font-weight: var(--font-weight-semibold);
303
303
  line-height: var(--line-height-tight);
304
304
  color: var(--color-text-primary);
305
- margin: 0 0 var(--spacing-2) 0;
305
+ margin: var(--spacing-6) 0 var(--spacing-2) 0;
306
306
  }
307
307
  h1 {
308
308
  font-size: var(--font-size-4xl);