@boilerhaus-ui/boilerhaus-ui 0.1.1 → 0.1.4

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.
@@ -0,0 +1,10 @@
1
+ export type Theme = 'light' | 'dark';
2
+ export declare function useTheme(): {
3
+ theme: Theme;
4
+ setTheme: (next: Theme) => void;
5
+ toggle: () => void;
6
+ };
7
+ export interface ThemeToggleProps {
8
+ className?: string;
9
+ }
10
+ export declare function ThemeToggle({ className }: ThemeToggleProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { ThemeToggle, useTheme } from './ThemeToggle';
2
+ export type { ThemeToggleProps, Theme } from './ThemeToggle';
@@ -64,3 +64,5 @@ export { AspectRatio } from './AspectRatio';
64
64
  export type { AspectRatioProps } from './AspectRatio';
65
65
  export { Logo } from './Logo';
66
66
  export type { LogoProps, LogoVariant, LogoLockup, LogoSize } from './Logo';
67
+ export { ThemeToggle, useTheme } from './ThemeToggle';
68
+ export type { ThemeToggleProps, Theme } from './ThemeToggle';
package/dist/tokens.css CHANGED
@@ -161,3 +161,37 @@
161
161
  --body-line-height: 1.65;
162
162
 
163
163
  }
164
+
165
+
166
+ /* ----------------------------------------------------------
167
+ DARK MODE OVERRIDES
168
+ Applied when <html data-theme="dark"> is set.
169
+ Remaps the base color tokens so all Tailwind utilities
170
+ (bg-paper, text-void, border-rule, etc.) adapt automatically.
171
+ Accent colours (signal, signal-alt, caution, growth) are
172
+ unchanged — they're brand identity and work on both surfaces.
173
+ ---------------------------------------------------------- */
174
+
175
+ [data-theme="dark"] {
176
+
177
+ /* Remap surface/text tokens */
178
+ --color-paper: #1A1917; /* Dark warm surface — replaces warm white */
179
+ --color-void: #F0EDE8; /* Light warm text — replaces near-black */
180
+ --color-rule: #38352E; /* Darker dividers */
181
+ --color-smoke: #9A9490; /* Lighter secondary text on dark bg */
182
+ --color-ash: #111110; /* Even darker sidebar/code bg */
183
+
184
+ /* Semantic aliases — keep consistent with remapped base tokens */
185
+ --color-text-primary: #F0EDE8;
186
+ --color-text-secondary: #9A9490;
187
+ --color-bg-primary: #1A1917;
188
+ --color-bg-inverted: #F0EDE8;
189
+ --color-border: #38352E;
190
+
191
+ /* Shadows — deeper alpha on dark surfaces */
192
+ --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.28);
193
+ --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.40);
194
+ --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.56);
195
+ --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.72);
196
+
197
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@boilerhaus-ui/boilerhaus-ui",
3
- "version": "0.1.1",
3
+ "version": "0.1.4",
4
4
  "description": "Boilerhaus design system — Bauhaus-inspired tokens and components for ScopeHouse and beyond.",
5
5
  "type": "module",
6
6
  "exports": {