baseline-kit 2.1.0 → 3.0.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 (38) hide show
  1. package/README.md +141 -9
  2. package/dist/README.md +141 -9
  3. package/dist/baseline-kit.css +151 -0
  4. package/dist/components/Baseline/Baseline.d.ts +0 -23
  5. package/dist/components/Box/Box.d.ts +14 -24
  6. package/dist/components/Config/Config.d.ts +25 -25
  7. package/dist/components/Config/defaults.d.ts +2 -2
  8. package/dist/components/Config/index.d.ts +1 -1
  9. package/dist/components/Guide/Guide.d.ts +2 -16
  10. package/dist/components/Guide/index.d.ts +0 -6
  11. package/dist/components/Guide/types.d.ts +1 -1
  12. package/dist/components/Layout/Layout.d.ts +0 -10
  13. package/dist/components/Padder/Padder.d.ts +8 -19
  14. package/dist/components/Spacer/Spacer.d.ts +0 -4
  15. package/dist/components/Stack/Stack.d.ts +2 -11
  16. package/dist/components/index.d.ts +4 -3
  17. package/dist/components/styles/index.d.ts +11 -0
  18. package/dist/components/types.d.ts +2 -2
  19. package/dist/hooks/useConfig.d.ts +3 -3
  20. package/dist/hooks/useIsClient.d.ts +6 -0
  21. package/dist/index.cjs +1 -31
  22. package/dist/index.cjs.map +1 -1
  23. package/dist/index.d.ts +25 -3
  24. package/dist/index.mjs +1454 -1848
  25. package/dist/index.mjs.map +1 -1
  26. package/dist/styles.css +1 -1
  27. package/dist/styles.d.ts +6 -0
  28. package/dist/theme/dark.css +67 -0
  29. package/dist/theme/default.css +82 -0
  30. package/dist/theme/tokens.css +82 -0
  31. package/dist/theme.css +116 -114
  32. package/dist/theme.d.ts +6 -0
  33. package/dist/utils/convert.d.ts +0 -17
  34. package/dist/utils/math.d.ts +0 -37
  35. package/dist/utils/normalize.d.ts +0 -35
  36. package/dist/utils/parse.d.ts +0 -29
  37. package/dist/utils/ssr.d.ts +0 -7
  38. package/package.json +51 -20
package/README.md CHANGED
@@ -41,6 +41,27 @@ import 'baseline-kit/styles'; // Required core styles
41
41
  import 'baseline-kit/theme'; // Recommended theme (or use your own)
42
42
  ```
43
43
 
44
+ For frameworks like Remix that use URL imports in a links function:
45
+
46
+ ```tsx
47
+ export const links = () => [
48
+ { rel: "stylesheet", href: "baseline-kit/styles" },
49
+ { rel: "stylesheet", href: "baseline-kit/theme" }
50
+ ];
51
+ ```
52
+
53
+ If you prefer a single CSS file that includes everything:
54
+
55
+ ```tsx
56
+ // Alternative: Import everything in one file
57
+ import 'baseline-kit/full';
58
+
59
+ // For Remix:
60
+ export const links = () => [
61
+ { rel: "stylesheet", href: "baseline-kit/full" }
62
+ ];
63
+ ```
64
+
44
65
  Baseline Kit is written in TypeScript and includes built-in type definitions—no additional packages required.
45
66
 
46
67
  ## Quick Start
@@ -210,24 +231,59 @@ debugging = "none" // Removes debug elements entirely
210
231
 
211
232
  ## Theme System
212
233
 
213
- Baseline Kit comes with two CSS files:
234
+ Baseline Kit comes with a flexible CSS structure and theming system:
235
+
236
+ 1. `core.css` - Contains the core component styles required for functionality (imported via `baseline-kit/styles`)
237
+ 2. `theme.css` - Contains color variables and theming with automatic dark mode support (imported via `baseline-kit/theme`)
238
+ 3. `baseline-kit.css` - Combined file with both core and theme styles (imported via `baseline-kit/full`)
239
+
240
+ ### CSS Import Options
241
+
242
+ Baseline Kit gives you flexibility in how you include the styles:
214
243
 
215
- 1. `styles.css` - Contains the core component styles required for functionality
216
- 2. `theme.css` - Contains color variables and theming (optional but recommended)
244
+ ```tsx
245
+ // Option 1: Import core styles and theme separately (recommended)
246
+ import 'baseline-kit/styles';
247
+ import 'baseline-kit/theme';
248
+
249
+ // Option 2: Import everything in one file
250
+ import 'baseline-kit/full';
251
+ ```
217
252
 
218
253
  ### Theme Options
219
254
 
220
- You have three options for using the theme system:
255
+ You now have four options for using the theme system:
221
256
 
222
- #### 1. Use the Built-in Theme
257
+ #### 1. Use the Built-in Theme (with automatic dark mode)
223
258
 
224
259
  ```tsx
225
260
  import 'baseline-kit/theme'; // Default theme with light/dark mode support
226
261
  ```
227
262
 
228
- #### 2. Create a Custom Theme
263
+ #### 2. Use Specific Theme Variants
264
+
265
+ ```tsx
266
+ // Use only the light theme (no dark mode)
267
+ import 'baseline-kit/theme/default';
268
+
269
+ // Use only the dark theme
270
+ import 'baseline-kit/theme/dark';
271
+
272
+ // Example: Apply dark theme regardless of system preference
273
+ import 'baseline-kit/styles';
274
+ import 'baseline-kit/theme/dark';
275
+ ```
276
+
277
+ #### 3. Create a Custom Theme
229
278
 
230
- Create your own theme.css file:
279
+ You can use the tokens template as a starting point:
280
+
281
+ ```tsx
282
+ // First check the token template to see available variables
283
+ import 'baseline-kit/theme/tokens'; // Just for reference (contains no values)
284
+ ```
285
+
286
+ Then create your own custom theme file:
231
287
 
232
288
  ```css
233
289
  /* yourCustomTheme.css */
@@ -253,7 +309,7 @@ import 'baseline-kit/styles'; // Required core styles
253
309
  import './path/to/yourCustomTheme.css'; // Your custom theme
254
310
  ```
255
311
 
256
- #### 3. Override via Config
312
+ #### 4. Override via Config
257
313
 
258
314
  For minor adjustments, use the Config component:
259
315
 
@@ -353,4 +409,80 @@ Please see [CONTRIBUTING.md](./CONTRIBUTING.md) for detailed guidelines.
353
409
 
354
410
  ## License
355
411
 
356
- MIT © [François Denavaut](https://github.com/dnvt)
412
+ MIT © [François Denavaut](https://github.com/dnvt)
413
+
414
+ ## Integration with Remix
415
+
416
+ Baseline Kit is fully compatible with Remix. Follow these steps to integrate it into your Remix application:
417
+
418
+ ### Standard Integration
419
+
420
+ In your Remix application, create a `root.tsx` file with proper links to the CSS:
421
+
422
+ ```tsx
423
+ // app/root.tsx
424
+ import type { LinksFunction } from '@remix-run/node';
425
+
426
+ export const links: LinksFunction = () => [
427
+ // Option 1: Use the combined CSS file (simplest approach)
428
+ { rel: 'stylesheet', href: 'npm:baseline-kit/dist/baseline-kit.css' },
429
+
430
+ // Option 2: Or use core styles and theme separately
431
+ // { rel: 'stylesheet', href: 'npm:baseline-kit/dist/styles.css' },
432
+ // { rel: 'stylesheet', href: 'npm:baseline-kit/dist/theme.css' },
433
+ ];
434
+
435
+ export default function App() {
436
+ return (
437
+ <html lang="en">
438
+ <head>
439
+ <meta charSet="utf-8" />
440
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
441
+ <Links />
442
+ </head>
443
+ <body>
444
+ <Outlet />
445
+ <ScrollRestoration />
446
+ <Scripts />
447
+ <LiveReload />
448
+ </body>
449
+ </html>
450
+ );
451
+ }
452
+ ```
453
+
454
+ Note the use of `npm:` prefix which is the recommended way to reference CSS from node_modules in Remix.
455
+
456
+ ### Troubleshooting CSS in Remix
457
+
458
+ If you're experiencing styling issues with components not showing properly:
459
+
460
+ 1. **Copy to public directory**: For a completely reliable solution, copy the CSS files to your public directory:
461
+ ```shell
462
+ mkdir -p public/css
463
+ cp node_modules/baseline-kit/dist/*.css public/css/
464
+ ```
465
+
466
+ Then reference these local files:
467
+ ```tsx
468
+ export const links: LinksFunction = () => [
469
+ { rel: 'stylesheet', href: '/css/baseline-kit.css' }
470
+ ];
471
+ ```
472
+
473
+ 2. **Check CSS specificity**: Make sure your application's CSS isn't overriding Baseline Kit styles. You may need to adjust specificity or load order of your stylesheets.
474
+
475
+ ### Custom Theme Integration
476
+
477
+ For custom theming:
478
+
479
+ ```tsx
480
+ export const links: LinksFunction = () => [
481
+ // Core styles (required)
482
+ { rel: 'stylesheet', href: 'npm:baseline-kit/dist/styles.css' },
483
+ // Choose one of these theme options:
484
+ { rel: 'stylesheet', href: 'npm:baseline-kit/dist/theme/default.css' }, // Light theme only
485
+ { rel: 'stylesheet', href: 'npm:baseline-kit/dist/theme/dark.css' }, // Dark theme only
486
+ { rel: 'stylesheet', href: '/css/custom-theme.css' }, // Your custom theme
487
+ ];
488
+ ```
package/dist/README.md CHANGED
@@ -41,6 +41,27 @@ import 'baseline-kit/styles'; // Required core styles
41
41
  import 'baseline-kit/theme'; // Recommended theme (or use your own)
42
42
  ```
43
43
 
44
+ For frameworks like Remix that use URL imports in a links function:
45
+
46
+ ```tsx
47
+ export const links = () => [
48
+ { rel: "stylesheet", href: "baseline-kit/styles" },
49
+ { rel: "stylesheet", href: "baseline-kit/theme" }
50
+ ];
51
+ ```
52
+
53
+ If you prefer a single CSS file that includes everything:
54
+
55
+ ```tsx
56
+ // Alternative: Import everything in one file
57
+ import 'baseline-kit/full';
58
+
59
+ // For Remix:
60
+ export const links = () => [
61
+ { rel: "stylesheet", href: "baseline-kit/full" }
62
+ ];
63
+ ```
64
+
44
65
  Baseline Kit is written in TypeScript and includes built-in type definitions—no additional packages required.
45
66
 
46
67
  ## Quick Start
@@ -210,24 +231,59 @@ debugging = "none" // Removes debug elements entirely
210
231
 
211
232
  ## Theme System
212
233
 
213
- Baseline Kit comes with two CSS files:
234
+ Baseline Kit comes with a flexible CSS structure and theming system:
235
+
236
+ 1. `core.css` - Contains the core component styles required for functionality (imported via `baseline-kit/styles`)
237
+ 2. `theme.css` - Contains color variables and theming with automatic dark mode support (imported via `baseline-kit/theme`)
238
+ 3. `baseline-kit.css` - Combined file with both core and theme styles (imported via `baseline-kit/full`)
239
+
240
+ ### CSS Import Options
241
+
242
+ Baseline Kit gives you flexibility in how you include the styles:
214
243
 
215
- 1. `styles.css` - Contains the core component styles required for functionality
216
- 2. `theme.css` - Contains color variables and theming (optional but recommended)
244
+ ```tsx
245
+ // Option 1: Import core styles and theme separately (recommended)
246
+ import 'baseline-kit/styles';
247
+ import 'baseline-kit/theme';
248
+
249
+ // Option 2: Import everything in one file
250
+ import 'baseline-kit/full';
251
+ ```
217
252
 
218
253
  ### Theme Options
219
254
 
220
- You have three options for using the theme system:
255
+ You now have four options for using the theme system:
221
256
 
222
- #### 1. Use the Built-in Theme
257
+ #### 1. Use the Built-in Theme (with automatic dark mode)
223
258
 
224
259
  ```tsx
225
260
  import 'baseline-kit/theme'; // Default theme with light/dark mode support
226
261
  ```
227
262
 
228
- #### 2. Create a Custom Theme
263
+ #### 2. Use Specific Theme Variants
264
+
265
+ ```tsx
266
+ // Use only the light theme (no dark mode)
267
+ import 'baseline-kit/theme/default';
268
+
269
+ // Use only the dark theme
270
+ import 'baseline-kit/theme/dark';
271
+
272
+ // Example: Apply dark theme regardless of system preference
273
+ import 'baseline-kit/styles';
274
+ import 'baseline-kit/theme/dark';
275
+ ```
276
+
277
+ #### 3. Create a Custom Theme
229
278
 
230
- Create your own theme.css file:
279
+ You can use the tokens template as a starting point:
280
+
281
+ ```tsx
282
+ // First check the token template to see available variables
283
+ import 'baseline-kit/theme/tokens'; // Just for reference (contains no values)
284
+ ```
285
+
286
+ Then create your own custom theme file:
231
287
 
232
288
  ```css
233
289
  /* yourCustomTheme.css */
@@ -253,7 +309,7 @@ import 'baseline-kit/styles'; // Required core styles
253
309
  import './path/to/yourCustomTheme.css'; // Your custom theme
254
310
  ```
255
311
 
256
- #### 3. Override via Config
312
+ #### 4. Override via Config
257
313
 
258
314
  For minor adjustments, use the Config component:
259
315
 
@@ -353,4 +409,80 @@ Please see [CONTRIBUTING.md](./CONTRIBUTING.md) for detailed guidelines.
353
409
 
354
410
  ## License
355
411
 
356
- MIT © [François Denavaut](https://github.com/dnvt)
412
+ MIT © [François Denavaut](https://github.com/dnvt)
413
+
414
+ ## Integration with Remix
415
+
416
+ Baseline Kit is fully compatible with Remix. Follow these steps to integrate it into your Remix application:
417
+
418
+ ### Standard Integration
419
+
420
+ In your Remix application, create a `root.tsx` file with proper links to the CSS:
421
+
422
+ ```tsx
423
+ // app/root.tsx
424
+ import type { LinksFunction } from '@remix-run/node';
425
+
426
+ export const links: LinksFunction = () => [
427
+ // Option 1: Use the combined CSS file (simplest approach)
428
+ { rel: 'stylesheet', href: 'npm:baseline-kit/dist/baseline-kit.css' },
429
+
430
+ // Option 2: Or use core styles and theme separately
431
+ // { rel: 'stylesheet', href: 'npm:baseline-kit/dist/styles.css' },
432
+ // { rel: 'stylesheet', href: 'npm:baseline-kit/dist/theme.css' },
433
+ ];
434
+
435
+ export default function App() {
436
+ return (
437
+ <html lang="en">
438
+ <head>
439
+ <meta charSet="utf-8" />
440
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
441
+ <Links />
442
+ </head>
443
+ <body>
444
+ <Outlet />
445
+ <ScrollRestoration />
446
+ <Scripts />
447
+ <LiveReload />
448
+ </body>
449
+ </html>
450
+ );
451
+ }
452
+ ```
453
+
454
+ Note the use of `npm:` prefix which is the recommended way to reference CSS from node_modules in Remix.
455
+
456
+ ### Troubleshooting CSS in Remix
457
+
458
+ If you're experiencing styling issues with components not showing properly:
459
+
460
+ 1. **Copy to public directory**: For a completely reliable solution, copy the CSS files to your public directory:
461
+ ```shell
462
+ mkdir -p public/css
463
+ cp node_modules/baseline-kit/dist/*.css public/css/
464
+ ```
465
+
466
+ Then reference these local files:
467
+ ```tsx
468
+ export const links: LinksFunction = () => [
469
+ { rel: 'stylesheet', href: '/css/baseline-kit.css' }
470
+ ];
471
+ ```
472
+
473
+ 2. **Check CSS specificity**: Make sure your application's CSS isn't overriding Baseline Kit styles. You may need to adjust specificity or load order of your stylesheets.
474
+
475
+ ### Custom Theme Integration
476
+
477
+ For custom theming:
478
+
479
+ ```tsx
480
+ export const links: LinksFunction = () => [
481
+ // Core styles (required)
482
+ { rel: 'stylesheet', href: 'npm:baseline-kit/dist/styles.css' },
483
+ // Choose one of these theme options:
484
+ { rel: 'stylesheet', href: 'npm:baseline-kit/dist/theme/default.css' }, // Light theme only
485
+ { rel: 'stylesheet', href: 'npm:baseline-kit/dist/theme/dark.css' }, // Dark theme only
486
+ { rel: 'stylesheet', href: '/css/custom-theme.css' }, // Your custom theme
487
+ ];
488
+ ```
@@ -0,0 +1,151 @@
1
+ /* Baseline Kit - Combined CSS */
2
+ /* This file contains both core styles and theme */
3
+
4
+ /* Core Styles */
5
+ *,*:before,*:after{box-sizing:border-box;margin:0;padding:0}ul[role=list],ol[role=list]{list-style:none}body{min-height:100vh;text-rendering:optimizeSpeed;line-height:1.5}img,picture{max-width:100%;display:block}@media (prefers-reduced-motion: reduce){html:focus-within{scroll-behavior:auto}*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}:root{--bkb: 8px;--bkzi: 1;--bkzio: 2;--bk-transition-base: .18s ease;--bk-width-default: fit-content;--bk-height-default: fit-content;--bkwf: 100%;--bkhf: 100%;--bkxb: var(--bkb);--bkxw: var(--bk-width-default);--bkxh: var(--bk-height-default);--bkxcl: var(--bk-box-color-line-theme, hsla(300, 60%, 40%, .6));--bkxcf: var(--bk-box-color-flat-theme, hsla(260, 100%, 70%, .2));--bkxci: var(--bk-box-color-text-theme, hsla(300, 60%, 40%, .9));--bkkw: var(--bkwf);--bkkh: var(--bk-height-default);--bkkcl: var(--bk-stack-color-line-theme, hsla(330, 60%, 40%, .6));--bkkcf: var(--bk-stack-color-flat-theme, hsla(0, 100%, 70%, .2));--bkkci: var(--bk-stack-color-text-theme, hsla(330, 60%, 40%, .9));--bkbw: 100%;--bkbh: 100%;--bkrt: 0;--bkrh: 1px;--bkbcl: var(--bk-baseline-color-line-theme, hsla(240, 60%, 40%, .15));--bkbcf: var(--bk-baseline-color-flat-theme, hsla(230, 100%, 70%, .2));--bkgw: 100vw;--bkgh: 100vh;--bkgg: var(--bkb);--bkgj: center;--bkgt: auto;--bkgpb: 0;--bkgpi: 0;--bkgcl: var(--bk-guide-color-line-theme, hsla(240, 60%, 40%, .15));--bkgcp: var(--bk-guide-color-pattern-theme, hsla(230, 100%, 70%, .2));--bkgca: var(--bk-guide-color-auto-theme, hsla(200, 100%, 70%, .15));--bkgcf: var(--bk-guide-color-fixed-theme, hsla(200, 100%, 70%, .15));--bklw: var(--bk-width-default);--bklh: var(--bk-height-default);--bklcl: var(--bk-layout-color-line-theme, hsla(330, 60%, 40%, .6));--bklcf: var(--bk-layout-color-flat-theme, hsla(0, 100%, 70%, .2));--bklci: var(--bk-layout-color-text-theme, hsla(330, 60%, 40%, .9));--bklgtc: repeat(auto-fill, minmax(100px, 1fr));--bklgtr: auto;--bklg: 0;--bklcg: 0;--bklrg: 0;--bklji: stretch;--bklai: stretch;--bkljc: start;--bklac: start;--bkpw: var(--bk-width-default);--bkph: var(--bk-height-default);--bkpc: var(--bk-padder-color-theme, hsla(270, 60%, 40%, .6));--bksw: var(--bkwf);--bksh: var(--bkhf);--bkscl: var(--bk-spacer-color-line-theme, hsla(270, 60%, 40%, .6));--bkscf: var(--bk-spacer-color-flat-theme, hsla(230, 100%, 70%, .2));--bksct: var(--bk-spacer-color-text-theme, hsla(270, 60%, 40%, 1))}.guide{--bkgcl: var(--bk-guide-color-line-theme, hsla(240, 60%, 40%, .15));--bkgcp: var(--bk-guide-color-pattern-theme, hsla(230, 100%, 70%, .2));--bkgca: var(--bk-guide-color-auto-theme, hsla(200, 100%, 70%, .15));--bkgcf: var(--bk-guide-color-fixed-theme, hsla(200, 100%, 70%, .15))}.baseline{--bkbcl: var(--bk-baseline-color-line-theme, hsla(240, 60%, 40%, .15));--bkbcf: var(--bk-baseline-color-flat-theme, hsla(230, 100%, 70%, .2))}.box{--bkxcl: var(--bk-box-color-line-theme, hsla(300, 60%, 40%, .6));--bkxcf: var(--bk-box-color-flat-theme, hsla(260, 100%, 70%, .2));--bkxci: var(--bk-box-color-text-theme, hsla(300, 60%, 40%, .9))}.stack{--bkkcl: var(--bk-stack-color-line-theme, hsla(330, 60%, 40%, .6));--bkkcf: var(--bk-stack-color-flat-theme, hsla(0, 100%, 70%, .2));--bkkci: var(--bk-stack-color-text-theme, hsla(330, 60%, 40%, .9))}.layout{--bklcl: var(--bk-layout-color-line-theme, hsla(330, 60%, 40%, .6));--bklcf: var(--bk-layout-color-flat-theme, hsla(0, 100%, 70%, .2));--bklci: var(--bk-layout-color-text-theme, hsla(330, 60%, 40%, .9))}.box{position:relative;width:var(--bkxw);height:var(--bkxh)}.v:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;border:1px solid var(--bkxcl);pointer-events:none;z-index:var(--bkzi)}.gde{position:absolute;top:0;right:0;bottom:0;left:0;pointer-events:none;padding:var(--bkgpb) var(--bkgpi)}.line{left:-.5px}.cols{position:absolute;top:0;right:0;bottom:0;left:0;display:grid;column-gap:var(--bkgg);grid-template-rows:1fr;grid-template-columns:var(--bkgt);justify-content:var(--bkgj);width:var(--bkwf);height:var(--bkhf);overflow:hidden}.col{min-width:0;width:var(--bkwf);height:var(--bkhf)}.col[data-variant=line]{width:1px;background-color:var(--bkgcl)}.col[data-variant=pattern]{background-color:var(--bkgcp)}.col[data-variant=auto]{background-color:var(--bkgca);overflow:hidden}.col[data-variant=fixed]{background-color:var(--bkgcf)}.ssr{box-sizing:border-box;display:grid;position:relative;z-index:1;pointer-events:none;min-height:100px}.pad{position:relative;display:grid;grid-template-columns:auto 1fr auto;grid-template-rows:auto 1fr auto;width:var(--bkpw, auto);height:var(--bkph, auto)}.v:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;border:1px solid var(--bkpc, var(--bk-padder-color-theme));pointer-events:none;z-index:var(--bkzi)}.spr{position:relative;box-sizing:border-box;width:var(--bksw, 100%);height:var(--bksh, auto);flex-shrink:0;display:block;margin:0;padding:0}.line:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;border:1px solid var(--bkscl, hsla(270, 60%, 40%, .6));z-index:calc(var(--bkzi, 1))}.flat{background-color:var(--bkscf, hsla(230, 100%, 70%, .2))}.stk{display:flex;position:relative;width:var(--bkkw);height:var(--bkkh)}.stk .line:after{border:none}.v:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;border:1px solid var(--bkkcl, hsla(330, 60%, 40%, .6));pointer-events:none;z-index:var(--bkzio, 2)}.flat{background-color:var(--bkkcf, hsla(0, 100%, 70%, .2))}.lay{display:grid;position:relative;box-sizing:border-box;width:var(--bklw, var(--bk-width-default, auto));height:var(--bklh, var(--bk-height-default, auto));grid-template-columns:var( --bklgtc, repeat(auto-fill, minmax(100px, 1fr)) );grid-template-rows:var(--bklgtr, auto);gap:var(--bklg, 0);column-gap:var(--bklcg, 0);row-gap:var(--bklrg, 0);justify-items:var(--bklji, stretch);align-items:var(--bklai, stretch);justify-content:var(--bkljc, start);align-content:var(--bklac, start)}.lay .line:after,.stk .line:after{border:none}.v:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;border:1px solid var(--bklcl, var(--bk-layout-color-line-theme, hsla(330, 60%, 40%, .6)));pointer-events:none;z-index:var(--bkzio, 2)}.bas{position:absolute;top:0;right:0;bottom:0;left:0;pointer-events:none;width:var(--bkbw);height:var(--bkbh);overflow:hidden}.row{left:0;right:0;position:absolute;top:var(--bkrt);height:var(--bkrh);background-color:var(--bkbc)}.ssr{box-sizing:border-box;display:grid;position:relative;z-index:1;pointer-events:none}.v{opacity:1;visibility:visible;transition:opacity var(--bk-transition-base),visibility 0ms linear}.h{opacity:0;visibility:hidden;transition:opacity var(--bk-transition-base),visibility 0ms linear .18s}:root{--bk-color-black-primary: 0, 0%, 10%;--bk-color-black-secondary: 0, 10%, 30%;--bk-color-white-primary: 0, 100%, 90%;--bk-color-white-secondary: 0, 0%, 90%;--bk-color-pink-primary: 300, 60%, 40%;--bk-color-pink-secondary: 260, 100%, 70%;--bk-color-purple-primary: 270, 60%, 40%;--bk-color-purple-secondary: 230, 100%, 70%;--bk-color-blue-primary: 240, 60%, 40%;--bk-color-blue-secondary: 200, 100%, 70%;--bk-color-cyan-primary: 200, 60%, 40%;--bk-color-cyan-secondary: 160, 100%, 70%;--bk-color-green-primary: 160, 60%, 40%;--bk-color-green-secondary: 110, 100%, 70%;--bk-color-yellow-primary: 30, 60%, 40%;--bk-color-yellow-secondary: 70, 100%, 70%;--bk-color-orange-primary: 10, 60%, 40%;--bk-color-orange-secondary: 30, 100%, 70%;--bk-color-red-primary: 330, 60%, 40%;--bk-color-red-secondary: 0, 100%, 70%;--bk-guide-color-line-theme: hsla(var(--bk-color-blue-primary), .15);--bk-guide-color-pattern-theme: hsla(var(--bk-color-purple-secondary), .2);--bk-guide-color-auto-theme: hsla(var(--bk-color-blue-secondary), .15);--bk-guide-color-fixed-theme: hsla(var(--bk-color-blue-secondary), .15);--bk-baseline-color-line-theme: hsla(var(--bk-color-blue-primary), .15);--bk-baseline-color-flat-theme: hsla(var(--bk-color-purple-secondary), .2);--bk-spacer-color-line-theme: hsla(var(--bk-color-purple-primary), .6);--bk-spacer-color-flat-theme: hsla(var(--bk-color-purple-secondary), .2);--bk-spacer-color-text-theme: hsla(var(--bk-color-purple-primary), 1);--bk-box-color-line-theme: hsla(var(--bk-color-pink-primary), .6);--bk-box-color-flat-theme: hsla(var(--bk-color-pink-secondary), .2);--bk-box-color-text-theme: hsla(var(--bk-color-pink-primary), .9);--bk-stack-color-line-theme: hsla(var(--bk-color-red-primary), .6);--bk-stack-color-flat-theme: hsla(var(--bk-color-red-secondary), .2);--bk-stack-color-text-theme: hsla(var(--bk-color-red-primary), .9);--bk-layout-color-line-theme: hsla(var(--bk-color-red-primary), .6);--bk-layout-color-flat-theme: hsla(var(--bk-color-red-secondary), .2);--bk-layout-color-text-theme: hsla(var(--bk-color-red-primary), .9);--bk-padder-color-theme: hsla(var(--bk-color-purple-primary), .6)}@media (prefers-color-scheme: dark){:root{--bk-color-black-primary: 0, 10%, 30%;--bk-color-black-secondary: 0, 0%, 10%;--bk-color-white-primary: 0, 0%, 90%;--bk-color-white-secondary: 0, 100%, 90%;--bk-color-pink-primary: 260, 100%, 70%;--bk-color-pink-secondary: 300, 60%, 40%;--bk-color-purple-primary: 230, 100%, 70%;--bk-color-purple-secondary: 270, 60%, 40%;--bk-color-blue-primary: 200, 100%, 70%;--bk-color-blue-secondary: 240, 60%, 40%;--bk-color-cyan-primary: 160, 100%, 70%;--bk-color-cyan-secondary: 200, 60%, 40%;--bk-color-green-primary: 110, 100%, 70%;--bk-color-green-secondary: 160, 60%, 40%;--bk-color-yellow-primary: 70, 100%, 70%;--bk-color-yellow-secondary: 30, 60%, 40%;--bk-color-orange-primary: 30, 100%, 70%;--bk-color-orange-secondary: 10, 60%, 40%;--bk-color-red-primary: 0, 100%, 70%;--bk-color-red-secondary: 330, 60%, 40%;--bk-baseline-color-line-theme: hsla(var(--bk-color-white-primary), .1);--bk-baseline-color-flat-theme: hsla(var(--bk-color-white-secondary), .2);--bk-box-color-line-theme: hsla(var(--bk-color-pink-primary), .6);--bk-box-color-flat-theme: hsla(var(--bk-color-pink-secondary), .3);--bk-box-color-text-theme: hsla(var(--bk-color-pink-primary), .9);--bk-guide-color-line-theme: hsla(var(--bk-color-white-primary), .1);--bk-guide-color-pattern-theme: hsla(var(--bk-color-purple-secondary), .25);--bk-guide-color-auto-theme: hsla(var(--bk-color-blue-secondary), .2);--bk-guide-color-fixed-theme: hsla(var(--bk-color-blue-secondary), .2);--bk-stack-color-line-theme: hsla(var(--bk-color-red-primary), .6);--bk-stack-color-flat-theme: hsla(var(--bk-color-red-secondary), .3);--bk-stack-color-text-theme: hsla(var(--bk-color-red-primary), .9);--bk-layout-color-line-theme: hsla(var(--bk-color-red-primary), .6);--bk-layout-color-flat-theme: hsla(var(--bk-color-red-secondary), .3);--bk-layout-color-text-theme: hsla(var(--bk-color-red-primary), .9);--bk-spacer-color-line-theme: hsla(var(--bk-color-purple-primary), .7);--bk-spacer-color-flat-theme: hsla(var(--bk-color-purple-secondary), .3);--bk-spacer-color-text-theme: hsla(var(--bk-color-purple-primary), 1)}}.spr_zbcF6{position:relative;box-sizing:border-box;width:var(--bksw, 100%);height:var(--bksh, auto);flex-shrink:0;display:block;margin:0;padding:0}.line_qHW69:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;border:1px solid var(--bkscl, hsla(270, 60%, 40%, .6));z-index:calc(var(--bkzi, 1))}.flat_gqixr{background-color:var(--bkscf, hsla(230, 100%, 70%, .2))}.pad_w2-sL{position:relative;display:grid;grid-template-columns:auto 1fr auto;grid-template-rows:auto 1fr auto;width:var(--bkpw, auto);height:var(--bkph, auto)}.lay_Ew8za .line_ESlzk:after,.stk_7SJoE .line_ESlzk:after{border:none}.v_lhGBy:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;border:1px solid var(--bkpc, var(--bk-padder-color-theme));pointer-events:none;z-index:var(--bkzi)}.lay_5cMu5{display:grid;position:relative;box-sizing:border-box;width:var(--bklw, var(--bk-width-default, auto));height:var(--bklh, var(--bk-height-default, auto));grid-template-columns:var( --bklgtc, repeat(auto-fill, minmax(100px, 1fr)) );grid-template-rows:var(--bklgtr, auto);gap:var(--bklg, 0);column-gap:var(--bklcg, 0);row-gap:var(--bklrg, 0);justify-items:var(--bklji, stretch);align-items:var(--bklai, stretch);justify-content:var(--bkljc, start);align-content:var(--bklac, start)}.lay_5cMu5 .line_j2f8-:after,.stk_3Spwo .line_j2f8-:after{border:none}.v_dprVE:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;border:1px solid var(--bklcl, var(--bk-layout-color-line-theme, hsla(330, 60%, 40%, .6)));pointer-events:none;z-index:var(--bkzio, 2)}.box_rDCRX{position:relative;width:var(--bkxw);height:var(--bkxh)}.v_0MMHD:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;border:1px solid var(--bkxcl);pointer-events:none;z-index:var(--bkzi)}.stk_l-58l{display:flex;position:relative;width:var(--bkkw);height:var(--bkkh)}.stk_l-58l .line_THMgb:after{border:none}.v_-k3qw:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;border:1px solid var(--bkkcl, hsla(330, 60%, 40%, .6));pointer-events:none;z-index:var(--bkzio, 2)}.flat_j15hF{background-color:var(--bkkcf, hsla(0, 100%, 70%, .2))}.gde_-Naxo{position:absolute;top:0;right:0;bottom:0;left:0;pointer-events:none;padding:var(--bkgpb) var(--bkgpi)}.line_-VS-e{left:-.5px}.cols_8lD6D{position:absolute;top:0;right:0;bottom:0;left:0;display:grid;column-gap:var(--bkgg);grid-template-rows:1fr;grid-template-columns:var(--bkgt);justify-content:var(--bkgj);width:var(--bkwf);height:var(--bkhf);overflow:hidden}.col_rlbsL{min-width:0;width:var(--bkwf);height:var(--bkhf)}.col_rlbsL[data-variant=line]{width:1px;background-color:var(--bkgcl)}.col_rlbsL[data-variant=pattern]{background-color:var(--bkgcp)}.col_rlbsL[data-variant=auto]{background-color:var(--bkgca);overflow:hidden}.col_rlbsL[data-variant=fixed]{background-color:var(--bkgcf)}.ssr_VGvpO{box-sizing:border-box;display:grid;position:relative;z-index:1;pointer-events:none;min-height:100px}.bas_e-SXr{position:absolute;top:0;right:0;bottom:0;left:0;pointer-events:none;width:var(--bkbw);height:var(--bkbh);overflow:hidden}.row_q-FZb{left:0;right:0;position:absolute;top:var(--bkrt);height:var(--bkrh);background-color:var(--bkbc)}.ssr_W1N5g{box-sizing:border-box;display:grid;position:relative;z-index:1;pointer-events:none}
6
+
7
+
8
+ /* Theme */
9
+ /**
10
+ * Baseline Kit Theme System
11
+ *
12
+ * This file contains all color variables for theming.
13
+ * For light and dark mode themes separately, see the theme directory.
14
+ */
15
+
16
+ :root {
17
+ /* ───────────────────────────────────────────────────────
18
+ Color Palette - Light Theme
19
+ - Primary: More muted/dimmed colors
20
+ - Secondary: Brighter, more vibrant colors
21
+ ─────────────────────────────────────────────────────── */
22
+
23
+ /* Neutral Colors */
24
+ --bk-color-black-primary: 0, 0%, 10%; /* #1A1A1A */
25
+ --bk-color-black-secondary: 0, 10%, 30%; /* #544545 */
26
+ --bk-color-white-primary: 0, 100%, 90%; /* #FFCCCC */
27
+ --bk-color-white-secondary: 0, 0%, 90%; /* #E6E6E6 */
28
+
29
+ /* Brand Colors */
30
+ --bk-color-pink-primary: 300, 60%, 40%; /* #A329A3 */
31
+ --bk-color-pink-secondary: 260, 100%, 70%; /* #9966FF */
32
+ --bk-color-purple-primary: 270, 60%, 40%; /* #6629A3 */
33
+ --bk-color-purple-secondary: 230, 100%, 70%; /* #6680FF */
34
+ --bk-color-blue-primary: 240, 60%, 40%; /* #2929A3 */
35
+ --bk-color-blue-secondary: 200, 100%, 70%; /* #66CCFF */
36
+
37
+ /* Supporting Colors */
38
+ --bk-color-cyan-primary: 200, 60%, 40%; /* #297AA3 */
39
+ --bk-color-cyan-secondary: 160, 100%, 70%; /* #66FFCC */
40
+ --bk-color-green-primary: 160, 60%, 40%; /* #29A37A */
41
+ --bk-color-green-secondary: 110, 100%, 70%; /* #80FF66 */
42
+ --bk-color-yellow-primary: 30, 60%, 40%; /* #A36629 */
43
+ --bk-color-yellow-secondary: 70, 100%, 70%; /* #A36629 */
44
+ --bk-color-orange-primary: 10, 60%, 40%; /* #A33D29 */
45
+ --bk-color-orange-secondary: 30, 100%, 70%; /* #FFB266 */
46
+ --bk-color-red-primary: 330, 60%, 40%; /* #A32966 */
47
+ --bk-color-red-secondary: 0, 100%, 70%; /* #FF6666 */
48
+
49
+ /* ───────────────────────────────────────────────────────
50
+ Component Theme Colors - Light
51
+ Using consistent alpha values:
52
+ - Line: 0.6 (borders)
53
+ - Flat: 0.2 (backgrounds)
54
+ - text: 0.9-1.0 (indicators)
55
+ ─────────────────────────────────────────────────────── */
56
+
57
+ /* Guide Component Theme */
58
+ --bk-guide-color-line-theme: hsla(var(--bk-color-blue-primary), 0.15);
59
+ --bk-guide-color-pattern-theme: hsla(var(--bk-color-purple-secondary), 0.2);
60
+ --bk-guide-color-auto-theme: hsla(var(--bk-color-blue-secondary), 0.15);
61
+ --bk-guide-color-fixed-theme: hsla(var(--bk-color-blue-secondary), 0.15);
62
+
63
+ /* Baseline Component Theme */
64
+ --bk-baseline-color-line-theme: hsla(var(--bk-color-blue-primary), 0.15);
65
+ --bk-baseline-color-flat-theme: hsla(var(--bk-color-purple-secondary), 0.2);
66
+
67
+ /* Spacer Component Theme */
68
+ --bk-spacer-color-line-theme: hsla(var(--bk-color-purple-primary), 0.6);
69
+ --bk-spacer-color-flat-theme: hsla(var(--bk-color-purple-secondary), 0.2);
70
+ --bk-spacer-color-text-theme: hsla(var(--bk-color-purple-primary), 1);
71
+
72
+ /* Box Component Theme */
73
+ --bk-box-color-line-theme: hsla(var(--bk-color-pink-primary), 0.6);
74
+ --bk-box-color-flat-theme: hsla(var(--bk-color-pink-secondary), 0.2);
75
+ --bk-box-color-text-theme: hsla(var(--bk-color-pink-primary), 0.9);
76
+
77
+ /* Stack Component Theme */
78
+ --bk-stack-color-line-theme: hsla(var(--bk-color-red-primary), 0.6);
79
+ --bk-stack-color-flat-theme: hsla(var(--bk-color-red-secondary), 0.2);
80
+ --bk-stack-color-text-theme: hsla(var(--bk-color-red-primary), 0.9);
81
+
82
+ /* Layout Component Theme */
83
+ --bk-layout-color-line-theme: hsla(var(--bk-color-red-primary), 0.6);
84
+ --bk-layout-color-flat-theme: hsla(var(--bk-color-red-secondary), 0.2);
85
+ --bk-layout-color-text-theme: hsla(var(--bk-color-red-primary), 0.9);
86
+
87
+ /* Padder Component Theme */
88
+ --bk-padder-color-theme: hsla(var(--bk-color-purple-primary), 0.6);
89
+ }
90
+
91
+ /* ───────────────────────────────────────────────────────
92
+ Dark Theme
93
+ - Inverts Primary/Secondary relationships
94
+ - Adjusts alpha values for better contrast
95
+ ─────────────────────────────────────────────────────── */
96
+
97
+ @media (prefers-color-scheme: dark) {
98
+ :root {
99
+ /* Neutral Colors - Dark */
100
+ --bk-color-black-primary: 0, 10%, 30%; /* #544545 */
101
+ --bk-color-black-secondary: 0, 0%, 10%; /* #1A1A1A */
102
+ --bk-color-white-primary: 0, 0%, 90%; /* #E6E6E6 */
103
+ --bk-color-white-secondary: 0, 100%, 90%; /* #FFCCCC */
104
+
105
+ /* Brand Colors - Dark */
106
+ --bk-color-pink-primary: 260, 100%, 70%; /* #9966FF */
107
+ --bk-color-pink-secondary: 300, 60%, 40%; /* #A329A3 */
108
+ --bk-color-purple-primary: 230, 100%, 70%; /* #6680FF */
109
+ --bk-color-purple-secondary: 270, 60%, 40%; /* #6629A3 */
110
+ --bk-color-blue-primary: 200, 100%, 70%; /* #66CCFF */
111
+ --bk-color-blue-secondary: 240, 60%, 40%; /* #2929A3 */
112
+
113
+ /* Supporting Colors - Dark */
114
+ --bk-color-cyan-primary: 160, 100%, 70%; /* #66FFCC */
115
+ --bk-color-cyan-secondary: 200, 60%, 40%; /* #297AA3 */
116
+ --bk-color-green-primary: 110, 100%, 70%; /* #80FF66 */
117
+ --bk-color-green-secondary: 160, 60%, 40%; /* #29A37A */
118
+ --bk-color-yellow-primary: 70, 100%, 70%; /* #A36629 */
119
+ --bk-color-yellow-secondary: 30, 60%, 40%; /* #A36629 */
120
+ --bk-color-orange-primary: 30, 100%, 70%; /* #FFB266 */
121
+ --bk-color-orange-secondary: 10, 60%, 40%; /* #A33D29 */
122
+ --bk-color-red-primary: 0, 100%, 70%; /* #FF6666 */
123
+ --bk-color-red-secondary: 330, 60%, 40%; /* #A32966 */
124
+
125
+ /* Component Theme Overrides - Dark */
126
+ --bk-baseline-color-line-theme: hsla(var(--bk-color-white-primary), 0.1);
127
+ --bk-baseline-color-flat-theme: hsla(var(--bk-color-white-secondary), 0.2);
128
+
129
+ --bk-box-color-line-theme: hsla(var(--bk-color-pink-primary), 0.6);
130
+ --bk-box-color-flat-theme: hsla(var(--bk-color-pink-secondary), 0.3);
131
+ --bk-box-color-text-theme: hsla(var(--bk-color-pink-primary), 0.9);
132
+
133
+ --bk-guide-color-line-theme: hsla(var(--bk-color-white-primary), 0.1);
134
+ --bk-guide-color-pattern-theme: hsla(var(--bk-color-purple-secondary), 0.25);
135
+ --bk-guide-color-auto-theme: hsla(var(--bk-color-blue-secondary), 0.2);
136
+ --bk-guide-color-fixed-theme: hsla(var(--bk-color-blue-secondary), 0.2);
137
+
138
+ --bk-stack-color-line-theme: hsla(var(--bk-color-red-primary), 0.6);
139
+ --bk-stack-color-flat-theme: hsla(var(--bk-color-red-secondary), 0.3);
140
+ --bk-stack-color-text-theme: hsla(var(--bk-color-red-primary), 0.9);
141
+
142
+ --bk-layout-color-line-theme: hsla(var(--bk-color-red-primary), 0.6);
143
+ --bk-layout-color-flat-theme: hsla(var(--bk-color-red-secondary), 0.3);
144
+ --bk-layout-color-text-theme: hsla(var(--bk-color-red-primary), 0.9);
145
+
146
+ --bk-spacer-color-line-theme: hsla(var(--bk-color-purple-primary), 0.7);
147
+ --bk-spacer-color-flat-theme: hsla(var(--bk-color-purple-secondary), 0.3);
148
+ --bk-spacer-color-text-theme: hsla(var(--bk-color-purple-primary), 1);
149
+ }
150
+ }
151
+
@@ -16,28 +16,6 @@ export type BaselineProps = {
16
16
  /** Flag to enable SSR-compatible mode (simplified initial render) */
17
17
  ssrMode?: boolean;
18
18
  } & ComponentsProps;
19
- /** Creates default baseline styles */
20
- export declare const createDefaultBaselineStyles: (base: number, lineColor: string, flatColor: string) => Record<string, string>;
21
- /** Create row styles for baseline lines */
22
- type RowStyleParams = {
23
- /** Row index */
24
- index: number;
25
- /** Base unit for calculations */
26
- base: number;
27
- /** Baseline visual variant */
28
- variant: BaselineVariant;
29
- /** Selected color for the baseline */
30
- chosenColor: string;
31
- /** Theme line color */
32
- lineColor: string;
33
- /** Theme flat color */
34
- flatColor: string;
35
- };
36
- /**
37
- * Creates styles for an individual baseline row.
38
- * Applies positioning and visual styling based on variant.
39
- */
40
- export declare const createBaselineRowStyle: (params: RowStyleParams) => React.CSSProperties;
41
19
  /**
42
20
  * Renders horizontal guidelines for maintaining vertical rhythm and baseline alignment.
43
21
  *
@@ -68,4 +46,3 @@ export declare const createBaselineRowStyle: (params: RowStyleParams) => React.C
68
46
  * ```
69
47
  */
70
48
  export declare const Baseline: React.NamedExoticComponent<BaselineProps>;
71
- export {};
@@ -1,4 +1,5 @@
1
1
  import * as React from 'react';
2
+ import { ComponentsProps } from '../types';
2
3
  /**
3
4
  * Determines how the Box component aligns to the baseline grid.
4
5
  *
@@ -8,29 +9,19 @@ import * as React from 'react';
8
9
  * - `clamp`: Both height and spacing values snap to base unit multiples
9
10
  */
10
11
  export type SnappingMode = 'none' | 'height' | 'clamp';
11
- /**
12
- * Creates default box styles with theme values.
13
- * Sets CSS variables for width, height, base unit, and colors.
14
- */
15
- export declare const createDefaultBoxStyles: (base: number, lineColor: string) => Record<string, string>;
16
- /** Parameters for creating box custom styles */
17
- type BoxCustomStylesParams = {
18
- /** Width property for the box */
19
- width?: React.CSSProperties['width'];
20
- /** Height property for the box */
21
- height?: React.CSSProperties['height'];
22
- /** Base unit for measurements */
23
- base: number;
24
- /** Line color from theme */
25
- lineColor: string;
26
- /** Default styles for comparison */
27
- defaultStyles: Record<string, string>;
28
- };
29
- /**
30
- * Creates custom styles for the box.
31
- * Combines all style properties and only applies changes when needed.
32
- */
33
- export declare const createBoxCustomStyles: ({ width, height, base, lineColor, defaultStyles }: BoxCustomStylesParams) => React.CSSProperties;
12
+ export type BoxProps = {
13
+ /** Number of columns to span in a grid layout */
14
+ colSpan?: number;
15
+ /** Number of rows to span in a grid layout */
16
+ rowSpan?: number;
17
+ /** Shorthand for equal column and row span. Takes precedence over individual spans */
18
+ span?: number;
19
+ /** Controls baseline grid alignment behavior */
20
+ snapping?: SnappingMode;
21
+ /** Flag to enable SSR-compatible mode (simplified initial render) */
22
+ ssrMode?: boolean;
23
+ children?: React.ReactNode;
24
+ } & ComponentsProps;
34
25
  /**
35
26
  * A foundational container component that ensures consistent spacing and baseline alignment.
36
27
  *
@@ -80,4 +71,3 @@ export declare const Box: React.NamedExoticComponent<{
80
71
  height?: React.CSSProperties["height"];
81
72
  width?: React.CSSProperties["width"];
82
73
  } & import("..").SpacingProps & React.RefAttributes<HTMLDivElement>>;
83
- export {};