@hellboy/ds 0.1.2
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 +111 -0
- package/dist/index.css +3699 -0
- package/dist/index.css.map +1 -0
- package/dist/index.d.mts +1087 -0
- package/dist/index.d.ts +1087 -0
- package/dist/index.js +3391 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +3287 -0
- package/dist/index.mjs.map +1 -0
- package/dist/theme.css +55 -0
- package/hellboy-ds-0.1.2.tgz +0 -0
- package/package.json +42 -0
- package/src/components/badge/Badge.tsx +29 -0
- package/src/components/badge/index.ts +1 -0
- package/src/components/banner/Banner.tsx +48 -0
- package/src/components/banner/banner.css +44 -0
- package/src/components/banner/index.ts +1 -0
- package/src/components/button/button.tsx +127 -0
- package/src/components/button/index.ts +1 -0
- package/src/components/card/card.tsx +57 -0
- package/src/components/card/index.ts +1 -0
- package/src/components/checkbox/Checkbox.tsx +98 -0
- package/src/components/checkbox/index.ts +1 -0
- package/src/components/code-block/code-block.tsx +44 -0
- package/src/components/code-block/index.ts +1 -0
- package/src/components/color-control/color-control.tsx +322 -0
- package/src/components/color-control/index.ts +1 -0
- package/src/components/drag-handle/DragHandle.tsx +78 -0
- package/src/components/drag-handle/index.ts +1 -0
- package/src/components/drawer/drawer.tsx +82 -0
- package/src/components/drawer/index.ts +1 -0
- package/src/components/floating-bar/floating-bar.tsx +52 -0
- package/src/components/floating-bar/index.ts +2 -0
- package/src/components/footer/footer.tsx +28 -0
- package/src/components/footer/index.ts +1 -0
- package/src/components/grid/Grid.tsx +53 -0
- package/src/components/grid/index.ts +1 -0
- package/src/components/header/header.tsx +57 -0
- package/src/components/header/index.ts +1 -0
- package/src/components/icons/icons.tsx +44 -0
- package/src/components/icons/index.ts +1 -0
- package/src/components/index.ts +29 -0
- package/src/components/input/DatePicker.tsx +133 -0
- package/src/components/input/Input.tsx +220 -0
- package/src/components/input/InputDate.tsx +10 -0
- package/src/components/input/InputDateTime.tsx +10 -0
- package/src/components/input/InputEmail.tsx +10 -0
- package/src/components/input/InputField.tsx +137 -0
- package/src/components/input/InputNumber.tsx +10 -0
- package/src/components/input/InputPassword.tsx +10 -0
- package/src/components/input/InputSearch.tsx +10 -0
- package/src/components/input/InputTel.tsx +10 -0
- package/src/components/input/InputText.tsx +10 -0
- package/src/components/input/InputTime.tsx +10 -0
- package/src/components/input/InputUrl.tsx +10 -0
- package/src/components/input/TimePicker.tsx +151 -0
- package/src/components/input/index.ts +11 -0
- package/src/components/layout/Layout.tsx +244 -0
- package/src/components/layout/index.ts +1 -0
- package/src/components/list/List.tsx +159 -0
- package/src/components/list/index.ts +1 -0
- package/src/components/navbar/MenuCategory.tsx +20 -0
- package/src/components/navbar/MenuGroup.tsx +288 -0
- package/src/components/navbar/MenuItem.tsx +65 -0
- package/src/components/navbar/Navbar.tsx +23 -0
- package/src/components/navbar/index.ts +4 -0
- package/src/components/page/index.ts +1 -0
- package/src/components/page/page.tsx +46 -0
- package/src/components/page-index/PageIndex.tsx +275 -0
- package/src/components/page-index/index.ts +1 -0
- package/src/components/popover/index.ts +1 -0
- package/src/components/popover/popover.tsx +199 -0
- package/src/components/radio/Radio.tsx +176 -0
- package/src/components/radio/index.ts +1 -0
- package/src/components/section/index.ts +1 -0
- package/src/components/section/section.tsx +66 -0
- package/src/components/select/Select.tsx +212 -0
- package/src/components/select/index.ts +1 -0
- package/src/components/slider/Slider.tsx +267 -0
- package/src/components/slider/index.ts +1 -0
- package/src/components/switch/index.ts +1 -0
- package/src/components/switch/switch.tsx +99 -0
- package/src/components/table/Table.tsx +147 -0
- package/src/components/table/index.ts +1 -0
- package/src/components/theme-control/index.ts +1 -0
- package/src/components/theme-control/theme-control.tsx +78 -0
- package/src/components/tooltip/index.ts +1 -0
- package/src/components/tooltip/tooltip.tsx +207 -0
- package/src/contexts/NavbarTooltipContext.tsx +48 -0
- package/src/contexts/index.ts +1 -0
- package/src/foundations/motion.md +136 -0
- package/src/index.ts +40 -0
- package/src/style/_shared/field.css +69 -0
- package/src/style/components/badge/badge.css +74 -0
- package/src/style/components/button/button.css +244 -0
- package/src/style/components/card/card.css +69 -0
- package/src/style/components/checkbox.css +142 -0
- package/src/style/components/code-block/code-block.css +34 -0
- package/src/style/components/color-control/color-control.css +126 -0
- package/src/style/components/drag-handle/drag-handle.css +68 -0
- package/src/style/components/drawer/drawer.css +210 -0
- package/src/style/components/floating-bar/floating-bar.css +39 -0
- package/src/style/components/footer/footer.css +108 -0
- package/src/style/components/grid/grid.css +33 -0
- package/src/style/components/header/header.css +44 -0
- package/src/style/components/icons/icons.css +44 -0
- package/src/style/components/input/input.css +393 -0
- package/src/style/components/layout/layout.css +205 -0
- package/src/style/components/list/list.css +140 -0
- package/src/style/components/navbar/navbar.css +342 -0
- package/src/style/components/page/page.css +46 -0
- package/src/style/components/page-index/page-index.css +158 -0
- package/src/style/components/popover/popover.css +44 -0
- package/src/style/components/radio.css +178 -0
- package/src/style/components/section/section.css +67 -0
- package/src/style/components/select/select.css +143 -0
- package/src/style/components/slider/slider.css +159 -0
- package/src/style/components/switch/switch.css +267 -0
- package/src/style/components/table/table.css +108 -0
- package/src/style/components/theme-control/theme-control.css +35 -0
- package/src/style/components/tooltip/tooltip.css +52 -0
- package/src/style/foundations/global.css +316 -0
- package/src/style/foundations/motion.css +164 -0
- package/src/style/foundations/spacing.css +51 -0
- package/src/style/foundations/typography.css +39 -0
- package/src/style/foundations/z-index.css +81 -0
- package/src/style/modes/dark.css +146 -0
- package/src/style/modes/light.css +147 -0
- package/src/style/semantic.css +52 -0
- package/src/style/styles.css +51 -0
- package/src/style/themes/theme.json +37 -0
- package/src/utils/README.md +305 -0
- package/src/utils/USER_PREFERENCES.md +558 -0
- package/src/utils/theme.ts +127 -0
- package/src/utils/user-preferences.ts +577 -0
- package/tsconfig.json +25 -0
- package/tsup.config.ts +52 -0
package/README.md
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# Hellboy Design System - Core
|
|
2
|
+
|
|
3
|
+
Base package for the Hellboy Design System containing foundational components, tokens, and styling utilities.
|
|
4
|
+
|
|
5
|
+
## 📦 Package Contents
|
|
6
|
+
|
|
7
|
+
### Tokens
|
|
8
|
+
- **Colors**: Primary, neutral, and semantic colors
|
|
9
|
+
- **Typography**: Font families, sizes, weights, and line heights
|
|
10
|
+
- **Spacing**: Consistent spacing scale
|
|
11
|
+
|
|
12
|
+
### Foundations
|
|
13
|
+
- **Global Reset**: Base HTML and element resets
|
|
14
|
+
- **Utilities**: Helper functions for style injection
|
|
15
|
+
|
|
16
|
+
### Components
|
|
17
|
+
- **Button**: Accessible interactive component with multiple variants and sizes (powered by AriaKit)
|
|
18
|
+
|
|
19
|
+
## 🚀 Getting Started
|
|
20
|
+
|
|
21
|
+
### Installation
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npm install @hellboy-ds/core @ariakit/react react react-dom
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Usage
|
|
28
|
+
|
|
29
|
+
```tsx
|
|
30
|
+
import { Button, injectGlobalStyles } from '@hellboy-ds/core';
|
|
31
|
+
|
|
32
|
+
// Inject global styles once at app initialization
|
|
33
|
+
injectGlobalStyles();
|
|
34
|
+
|
|
35
|
+
// Use the Button component
|
|
36
|
+
export function App() {
|
|
37
|
+
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>
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## 🎨 Customization
|
|
51
|
+
|
|
52
|
+
All tokens are exported and can be imported directly:
|
|
53
|
+
|
|
54
|
+
```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
|
+
};
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## 📝 Building
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
npm run build # Build the package
|
|
69
|
+
npm run dev # Watch mode
|
|
70
|
+
npm run clean # Clean dist directory
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## 📋 Features
|
|
74
|
+
|
|
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
|
|
98
|
+
- `size` - Button size
|
|
99
|
+
- `isLoading` - Show loading spinner
|
|
100
|
+
- `disabled` - Disable the button
|
|
101
|
+
- `fullWidth` - Make button full width
|
|
102
|
+
- All standard AriaKit button attributes are supported
|
|
103
|
+
|
|
104
|
+
## ♿ Accessibility
|
|
105
|
+
|
|
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
|