@boilerhaus-ui/boilerhaus-ui 0.1.0

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.
Files changed (75) hide show
  1. package/README.md +73 -0
  2. package/dist/components/Accordion/Accordion.d.ts +22 -0
  3. package/dist/components/Accordion/index.d.ts +2 -0
  4. package/dist/components/Alert/Alert.d.ts +34 -0
  5. package/dist/components/Alert/index.d.ts +2 -0
  6. package/dist/components/AspectRatio/AspectRatio.d.ts +23 -0
  7. package/dist/components/AspectRatio/index.d.ts +2 -0
  8. package/dist/components/Avatar/Avatar.d.ts +40 -0
  9. package/dist/components/Avatar/index.d.ts +2 -0
  10. package/dist/components/Badge/Badge.d.ts +14 -0
  11. package/dist/components/Badge/index.d.ts +2 -0
  12. package/dist/components/Breadcrumb/Breadcrumb.d.ts +52 -0
  13. package/dist/components/Breadcrumb/index.d.ts +2 -0
  14. package/dist/components/Button/Button.d.ts +19 -0
  15. package/dist/components/Button/index.d.ts +2 -0
  16. package/dist/components/Card/Card.d.ts +39 -0
  17. package/dist/components/Card/index.d.ts +2 -0
  18. package/dist/components/Checkbox/Checkbox.d.ts +22 -0
  19. package/dist/components/Checkbox/index.d.ts +2 -0
  20. package/dist/components/Combobox/Combobox.d.ts +27 -0
  21. package/dist/components/Combobox/index.d.ts +2 -0
  22. package/dist/components/DataTable/DataTable.d.ts +34 -0
  23. package/dist/components/DataTable/index.d.ts +2 -0
  24. package/dist/components/DatePicker/DatePicker.d.ts +17 -0
  25. package/dist/components/DatePicker/index.d.ts +2 -0
  26. package/dist/components/Dialog/Dialog.d.ts +53 -0
  27. package/dist/components/Dialog/index.d.ts +2 -0
  28. package/dist/components/DropdownMenu/DropdownMenu.d.ts +51 -0
  29. package/dist/components/DropdownMenu/index.d.ts +2 -0
  30. package/dist/components/FileUpload/FileUpload.d.ts +26 -0
  31. package/dist/components/FileUpload/index.d.ts +2 -0
  32. package/dist/components/Input/Input.d.ts +23 -0
  33. package/dist/components/Input/index.d.ts +2 -0
  34. package/dist/components/Label/Label.d.ts +20 -0
  35. package/dist/components/Label/index.d.ts +2 -0
  36. package/dist/components/PageShell/PageShell.d.ts +73 -0
  37. package/dist/components/PageShell/index.d.ts +2 -0
  38. package/dist/components/Popover/Popover.d.ts +24 -0
  39. package/dist/components/Popover/index.d.ts +2 -0
  40. package/dist/components/Progress/Progress.d.ts +26 -0
  41. package/dist/components/Progress/index.d.ts +2 -0
  42. package/dist/components/RadioGroup/RadioGroup.d.ts +29 -0
  43. package/dist/components/RadioGroup/index.d.ts +2 -0
  44. package/dist/components/Select/Select.d.ts +32 -0
  45. package/dist/components/Select/index.d.ts +2 -0
  46. package/dist/components/Skeleton/Skeleton.d.ts +12 -0
  47. package/dist/components/Skeleton/index.d.ts +2 -0
  48. package/dist/components/Spinner/Spinner.d.ts +18 -0
  49. package/dist/components/Spinner/index.d.ts +2 -0
  50. package/dist/components/Stat/Stat.d.ts +22 -0
  51. package/dist/components/Stat/index.d.ts +2 -0
  52. package/dist/components/Stepper/Stepper.d.ts +24 -0
  53. package/dist/components/Stepper/index.d.ts +2 -0
  54. package/dist/components/Switch/Switch.d.ts +17 -0
  55. package/dist/components/Switch/index.d.ts +2 -0
  56. package/dist/components/Table/Table.d.ts +73 -0
  57. package/dist/components/Table/index.d.ts +2 -0
  58. package/dist/components/Tabs/Tabs.d.ts +28 -0
  59. package/dist/components/Tabs/index.d.ts +2 -0
  60. package/dist/components/Textarea/Textarea.d.ts +23 -0
  61. package/dist/components/Textarea/index.d.ts +2 -0
  62. package/dist/components/Toast/Toast.d.ts +17 -0
  63. package/dist/components/Toast/index.d.ts +4 -0
  64. package/dist/components/Toast/use-toast.d.ts +26 -0
  65. package/dist/components/Tooltip/Tooltip.d.ts +24 -0
  66. package/dist/components/Tooltip/index.d.ts +2 -0
  67. package/dist/components/index.d.ts +64 -0
  68. package/dist/index.cjs +51 -0
  69. package/dist/index.cjs.map +1 -0
  70. package/dist/index.d.ts +81 -0
  71. package/dist/index.js +10475 -0
  72. package/dist/index.js.map +1 -0
  73. package/dist/lib/cn.d.ts +7 -0
  74. package/dist/tokens.css +163 -0
  75. package/package.json +91 -0
@@ -0,0 +1,7 @@
1
+ import { type ClassValue } from 'clsx';
2
+ /**
3
+ * Merge Tailwind classes safely.
4
+ * clsx handles conditionals; twMerge resolves conflicting Tailwind utilities
5
+ * (e.g. bg-signal + bg-void → bg-void wins, not both).
6
+ */
7
+ export declare function cn(...inputs: ClassValue[]): string;
@@ -0,0 +1,163 @@
1
+ /* ============================================================
2
+ Boilerhaus Design System — Token Definitions
3
+ Canonical spec: ../boilerhaus-ops/CLAUDE.md
4
+
5
+ Architecture:
6
+ - @theme block → Tailwind generates utility classes (bg-*, text-*, etc.)
7
+ AND adds CSS custom properties to :root.
8
+ - :root block → Pure CSS vars for tokens Tailwind doesn't cover well
9
+ (motion, shadows, semantic aliases, spacing, grid).
10
+ ============================================================ */
11
+
12
+ /* ----------------------------------------------------------
13
+ TAILWIND THEME
14
+ Each entry generates:
15
+ • A CSS custom property on :root (so var() always works)
16
+ • Utility classes: bg-signal, text-void, font-display, etc.
17
+ ---------------------------------------------------------- */
18
+
19
+ @theme {
20
+
21
+ /* Colors — bg-*, text-*, border-*, ring-*, fill-*, stroke-* */
22
+ --color-void: #0C0C0C; /* Near-black — primary text, headers */
23
+ --color-paper: #F7F5F0; /* Warm white — primary background */
24
+ --color-signal: #D92B2B; /* Bauhaus red — primary accent, CTAs */
25
+ --color-signal-alt: #1A52CC; /* Bauhaus blue — links, focus rings */
26
+ --color-rule: #E2DED8; /* Warm grey — borders, dividers */
27
+ --color-smoke: #6B6660; /* Mid grey — secondary text, captions */
28
+ --color-ash: #2E2C2A; /* Dark grey — sidebar, code backgrounds */
29
+ --color-caution: #9A6F00; /* Bauhaus amber — warning, attention states */
30
+ --color-growth: #1B6B3A; /* Forest green — success, completion states */
31
+
32
+ /* Font families — font-display, font-body, font-mono */
33
+ --font-family-display: "Barlow Condensed", sans-serif;
34
+ --font-family-body: "DM Sans", sans-serif;
35
+ --font-family-mono: "JetBrains Mono", monospace;
36
+
37
+ /* Type scale (major third, 1.25 ratio) — text-xs … text-4xl */
38
+ /* Overrides Tailwind defaults to match Boilerhaus spec */
39
+ --font-size-xs: 0.64rem; /* ~10px — labels, metadata */
40
+ --font-size-sm: 0.80rem; /* ~13px — captions, helper text */
41
+ --font-size-base: 1.00rem; /* 16px — body */
42
+ --font-size-md: 1.25rem; /* ~20px — lead text */
43
+ --font-size-lg: 1.56rem; /* ~25px — card headings */
44
+ --font-size-xl: 1.95rem; /* ~31px — section headings */
45
+ --font-size-2xl: 2.44rem; /* ~39px — page headings */
46
+ --font-size-3xl: 3.05rem; /* ~49px — hero display */
47
+ --font-size-4xl: 3.81rem; /* ~61px — brand display */
48
+
49
+ /* Border radius — rounded-none, rounded-sm, rounded-md, rounded-lg, rounded-full */
50
+ --radius-none: 0px;
51
+ --radius-sm: 2px;
52
+ --radius-md: 4px;
53
+ --radius-lg: 8px;
54
+ --radius-full: 9999px;
55
+
56
+ /* Transition durations — duration-fast, duration-base, duration-slow, duration-xslow */
57
+ --transition-duration-fast: 100ms; /* Hover states */
58
+ --transition-duration-base: 200ms; /* Standard transitions */
59
+ --transition-duration-slow: 350ms; /* Entrances, reveals */
60
+ --transition-duration-xslow: 500ms; /* Page transitions */
61
+
62
+ }
63
+
64
+
65
+ /* ----------------------------------------------------------
66
+ PURE CSS VARS
67
+ Tokens Tailwind doesn't generate utilities for.
68
+ All component CSS that can't use a utility class references these.
69
+ ---------------------------------------------------------- */
70
+
71
+ :root {
72
+
73
+ /* Semantic color aliases — use these in component CSS over raw tokens */
74
+ --color-text-primary: var(--color-void);
75
+ --color-text-secondary: var(--color-smoke);
76
+ --color-bg-primary: var(--color-paper);
77
+ --color-bg-inverted: var(--color-void);
78
+ --color-accent: var(--color-signal);
79
+ --color-border: var(--color-rule);
80
+
81
+ /* Status aliases — semantic names for badge/state indicators */
82
+ --color-status-neutral: var(--color-smoke);
83
+ --color-status-active: var(--color-signal-alt);
84
+ --color-status-warning: var(--color-caution);
85
+ --color-status-danger: var(--color-signal);
86
+ --color-status-success: var(--color-growth);
87
+
88
+ /* Font aliases — convenience for non-Tailwind CSS */
89
+ --font-display: var(--font-family-display);
90
+ --font-body: var(--font-family-body);
91
+ --font-mono: var(--font-family-mono);
92
+
93
+ /* Type scale aliases — var(--type-sm) etc. work in component CSS */
94
+ --type-xs: var(--font-size-xs);
95
+ --type-sm: var(--font-size-sm);
96
+ --type-base: var(--font-size-base);
97
+ --type-md: var(--font-size-md);
98
+ --type-lg: var(--font-size-lg);
99
+ --type-xl: var(--font-size-xl);
100
+ --type-2xl: var(--font-size-2xl);
101
+ --type-3xl: var(--font-size-3xl);
102
+ --type-4xl: var(--font-size-4xl);
103
+
104
+ /* Spacing — 8px base unit */
105
+ --space-1: 4px;
106
+ --space-2: 8px;
107
+ --space-3: 12px;
108
+ --space-4: 16px;
109
+ --space-5: 24px;
110
+ --space-6: 32px;
111
+ --space-7: 48px;
112
+ --space-8: 64px;
113
+ --space-9: 96px;
114
+ --space-10: 128px;
115
+
116
+ /* Layout */
117
+ --topbar-height: 48px; /* App shell topbar height — use for sticky offset calculations */
118
+ --sidebar-width: 280px;
119
+
120
+ /* Grid */
121
+ --grid-columns: 12;
122
+ --grid-gutter: var(--space-5);
123
+ --grid-gutter-lg: var(--space-6);
124
+ --grid-max-width: 1280px;
125
+
126
+ /* Borders */
127
+ --border-width: 1px;
128
+ --border-color: var(--color-rule);
129
+
130
+ /* Elevation — shadows use --color-void with low alpha */
131
+ --shadow-sm: 0 1px 2px rgba(12, 12, 12, 0.08);
132
+ --shadow-md: 0 2px 8px rgba(12, 12, 12, 0.10);
133
+ --shadow-lg: 0 8px 24px rgba(12, 12, 12, 0.12);
134
+ --shadow-xl: 0 16px 48px rgba(12, 12, 12, 0.16);
135
+
136
+ /* Motion easing — no bounce, no spring */
137
+ --ease-standard: cubic-bezier(0.4, 0, 0.2, 1); /* General UI */
138
+ --ease-enter: cubic-bezier(0, 0, 0.2, 1); /* Entering */
139
+ --ease-exit: cubic-bezier(0.4, 0, 1, 1); /* Leaving */
140
+
141
+ /* Duration aliases — var(--duration-fast) etc. work in component CSS */
142
+ --duration-fast: var(--transition-duration-fast);
143
+ --duration-base: var(--transition-duration-base);
144
+ --duration-slow: var(--transition-duration-slow);
145
+ --duration-xslow: var(--transition-duration-xslow);
146
+
147
+ /* Composed transition shorthands */
148
+ --transition-fast: var(--duration-fast) var(--ease-standard);
149
+ --transition-base: var(--duration-base) var(--ease-standard);
150
+ --transition-slow: var(--duration-slow) var(--ease-enter);
151
+
152
+ /* Heading style — for non-Tailwind CSS that sets heading styles */
153
+ --heading-font-family: var(--font-display);
154
+ --heading-font-weight: 700;
155
+ --heading-letter-spacing: 0.04em;
156
+ --heading-text-transform: uppercase;
157
+
158
+ /* Body style */
159
+ --body-font-family: var(--font-body);
160
+ --body-font-weight: 400;
161
+ --body-line-height: 1.65;
162
+
163
+ }
package/package.json ADDED
@@ -0,0 +1,91 @@
1
+ {
2
+ "name": "@boilerhaus-ui/boilerhaus-ui",
3
+ "version": "0.1.0",
4
+ "description": "Boilerhaus design system — Bauhaus-inspired tokens and components for ScopeHouse and beyond.",
5
+ "type": "module",
6
+ "exports": {
7
+ ".": {
8
+ "import": "./dist/index.js",
9
+ "require": "./dist/index.cjs",
10
+ "types": "./dist/index.d.ts"
11
+ },
12
+ "./tokens.css": "./dist/tokens.css"
13
+ },
14
+ "main": "./dist/index.cjs",
15
+ "module": "./dist/index.js",
16
+ "types": "./dist/index.d.ts",
17
+ "files": [
18
+ "dist"
19
+ ],
20
+ "sideEffects": [
21
+ "./dist/tokens.css"
22
+ ],
23
+ "keywords": ["design-system", "react", "tailwind", "components", "ui"],
24
+ "license": "MIT",
25
+ "publishConfig": {
26
+ "access": "public"
27
+ },
28
+ "scripts": {
29
+ "dev": "vite",
30
+ "build": "tsc -b && vite build",
31
+ "build:lib": "vite build --config vite.lib.config.ts && tsc -p tsconfig.lib.json",
32
+ "prepublishOnly": "npm run build:lib",
33
+ "lint": "eslint .",
34
+ "preview": "vite preview",
35
+ "storybook": "storybook dev -p 6006",
36
+ "build-storybook": "storybook build"
37
+ },
38
+ "peerDependencies": {
39
+ "react": "^19.0.0",
40
+ "react-dom": "^19.0.0"
41
+ },
42
+ "dependencies": {
43
+ "@radix-ui/react-accordion": "^1.2.12",
44
+ "@radix-ui/react-aspect-ratio": "^1.1.8",
45
+ "@radix-ui/react-avatar": "^1.1.11",
46
+ "@radix-ui/react-checkbox": "^1.3.3",
47
+ "@radix-ui/react-dialog": "^1.1.15",
48
+ "@radix-ui/react-dropdown-menu": "^2.1.16",
49
+ "@radix-ui/react-popover": "^1.1.15",
50
+ "@radix-ui/react-progress": "^1.1.8",
51
+ "@radix-ui/react-radio-group": "^1.3.8",
52
+ "@radix-ui/react-select": "^2.2.6",
53
+ "@radix-ui/react-slot": "^1.2.4",
54
+ "@radix-ui/react-switch": "^1.2.6",
55
+ "@radix-ui/react-tabs": "^1.1.13",
56
+ "@radix-ui/react-toast": "^1.2.15",
57
+ "@radix-ui/react-tooltip": "^1.2.8",
58
+ "clsx": "^2.1.1",
59
+ "tailwind-merge": "^3.5.0"
60
+ },
61
+ "devDependencies": {
62
+ "@chromatic-com/storybook": "^5.1.1",
63
+ "@eslint/js": "^9.39.4",
64
+ "@storybook/addon-a11y": "^10.3.4",
65
+ "@storybook/addon-docs": "^10.3.4",
66
+ "@storybook/addon-onboarding": "^10.3.4",
67
+ "@storybook/addon-vitest": "^10.3.4",
68
+ "@storybook/react-vite": "^10.3.4",
69
+ "@tailwindcss/vite": "^4.2.2",
70
+ "@types/node": "^24.12.0",
71
+ "@types/react": "^19.2.14",
72
+ "@types/react-dom": "^19.2.3",
73
+ "@vitejs/plugin-react": "^6.0.1",
74
+ "@vitest/browser-playwright": "^4.1.2",
75
+ "@vitest/coverage-v8": "^4.1.2",
76
+ "eslint": "^9.39.4",
77
+ "eslint-plugin-react-hooks": "^7.0.1",
78
+ "eslint-plugin-react-refresh": "^0.5.2",
79
+ "eslint-plugin-storybook": "^10.3.4",
80
+ "globals": "^17.4.0",
81
+ "playwright": "^1.59.1",
82
+ "react": "^19.2.4",
83
+ "react-dom": "^19.2.4",
84
+ "storybook": "^10.3.4",
85
+ "tailwindcss": "^4.2.2",
86
+ "typescript": "~5.9.3",
87
+ "typescript-eslint": "^8.57.0",
88
+ "vite": "^8.0.1",
89
+ "vitest": "^4.1.2"
90
+ }
91
+ }