@teseor/css 1.14.2 → 1.14.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.
Files changed (92) hide show
  1. package/package.json +1 -1
  2. package/src/base/root.docs.json +35 -0
  3. package/src/components/actions/button/button.visual.spec.ts +5 -1
  4. package/src/components/actions/button-group/button-group.visual.spec.ts +5 -1
  5. package/src/components/actions/close-button/close-button.visual.spec.ts +5 -1
  6. package/src/components/content/divider/divider.visual.spec.ts +5 -1
  7. package/src/components/content/scroll-area/scroll-area.visual.spec.ts +5 -1
  8. package/src/components/content/spacer/spacer.visual.spec.ts +1 -1
  9. package/src/components/data-display/avatar/avatar.visual.spec.ts +5 -1
  10. package/src/components/data-display/badge/badge.visual.spec.ts +5 -1
  11. package/src/components/data-display/card/card.visual.spec.ts +5 -1
  12. package/src/components/data-display/data-list/data-list.visual.spec.ts +5 -1
  13. package/src/components/data-display/icon/icon.visual.spec.ts +5 -1
  14. package/src/components/data-display/image/image.visual.spec.ts +5 -1
  15. package/src/components/data-display/stat/stat.visual.spec.ts +5 -1
  16. package/src/components/data-display/status/status.visual.spec.ts +5 -1
  17. package/src/components/data-display/table/table.visual.spec.ts +5 -1
  18. package/src/components/data-display/tag/tag.visual.spec.ts +5 -1
  19. package/src/components/disclosure/accordion/accordion.visual.spec.ts +5 -1
  20. package/src/components/disclosure/disclosure/disclosure.visual.spec.ts +5 -1
  21. package/src/components/feedback/alert/alert.visual.spec.ts +5 -1
  22. package/src/components/feedback/progress/progress.visual.spec.ts +5 -1
  23. package/src/components/feedback/progress-circle/progress-circle.visual.spec.ts +5 -1
  24. package/src/components/feedback/skeleton/skeleton.visual.spec.ts +5 -1
  25. package/src/components/feedback/spinner/spinner.visual.spec.ts +5 -1
  26. package/src/components/feedback/toast/toast.visual.spec.ts +5 -1
  27. package/src/components/forms/checkbox/checkbox.visual.spec.ts +5 -1
  28. package/src/components/forms/checkbox-group/checkbox-group.visual.spec.ts +5 -1
  29. package/src/components/forms/field/field.visual.spec.ts +5 -1
  30. package/src/components/forms/fieldset/fieldset.visual.spec.ts +5 -1
  31. package/src/components/forms/form/form.visual.spec.ts +5 -1
  32. package/src/components/forms/form-error/form-error.visual.spec.ts +5 -1
  33. package/src/components/forms/form-helper/form-helper.visual.spec.ts +5 -1
  34. package/src/components/forms/input/input.visual.spec.ts +5 -1
  35. package/src/components/forms/label/label.visual.spec.ts +5 -1
  36. package/src/components/forms/number-input/number-input.visual.spec.ts +5 -1
  37. package/src/components/forms/password-input/password-input.visual.spec.ts +5 -1
  38. package/src/components/forms/radio/radio.visual.spec.ts +5 -1
  39. package/src/components/forms/radio-group/radio-group.visual.spec.ts +5 -1
  40. package/src/components/forms/search-input/search-input.visual.spec.ts +5 -1
  41. package/src/components/forms/select/select.visual.spec.ts +5 -1
  42. package/src/components/forms/slider/slider.visual.spec.ts +5 -1
  43. package/src/components/forms/textarea/textarea.visual.spec.ts +5 -1
  44. package/src/components/forms/toggle/toggle.visual.spec.ts +5 -1
  45. package/src/components/navigation/breadcrumb/breadcrumb.visual.spec.ts +5 -1
  46. package/src/components/navigation/dropdown-menu/dropdown-menu.visual.spec.ts +5 -1
  47. package/src/components/navigation/menu/menu.visual.spec.ts +5 -1
  48. package/src/components/navigation/nav/nav.visual.spec.ts +5 -1
  49. package/src/components/navigation/pagination/pagination.visual.spec.ts +5 -1
  50. package/src/components/navigation/tabs/tabs.visual.spec.ts +5 -1
  51. package/src/components/overlays/dialog/dialog.visual.spec.ts +5 -1
  52. package/src/components/overlays/drawer/drawer.visual.spec.ts +5 -1
  53. package/src/components/overlays/modal/modal.visual.spec.ts +5 -1
  54. package/src/components/overlays/overlay/overlay.visual.spec.ts +5 -1
  55. package/src/components/overlays/popover/popover.visual.spec.ts +5 -1
  56. package/src/components/overlays/tooltip/tooltip.visual.spec.ts +5 -1
  57. package/src/components/typography/blockquote/blockquote.visual.spec.ts +5 -1
  58. package/src/components/typography/code/code.visual.spec.ts +5 -1
  59. package/src/components/typography/code-block/code-block.visual.spec.ts +5 -1
  60. package/src/components/typography/heading/heading.visual.spec.ts +5 -1
  61. package/src/components/typography/kbd/kbd.visual.spec.ts +5 -1
  62. package/src/components/typography/link/link.visual.spec.ts +5 -1
  63. package/src/components/typography/list/list.visual.spec.ts +5 -1
  64. package/src/components/typography/mark/mark.visual.spec.ts +5 -1
  65. package/src/config/{tokens → guides}/accessibility.docs.json +1 -0
  66. package/src/config/guides/getting-started.docs.json +106 -0
  67. package/src/config/{tokens → guides}/theming.docs.json +1 -0
  68. package/src/config/tokens/design-tokens.docs.json +239 -0
  69. package/src/debug/debug.docs.json +96 -0
  70. package/src/debug/index.scss +81 -1
  71. package/src/layout/app-shell/app-shell.visual.spec.ts +1 -1
  72. package/src/layout/aspect-ratio/aspect-ratio.visual.spec.ts +1 -1
  73. package/src/layout/box/box.visual.spec.ts +1 -1
  74. package/src/layout/center/center.visual.spec.ts +1 -1
  75. package/src/layout/column/column.visual.spec.ts +1 -1
  76. package/src/layout/content/content.visual.spec.ts +1 -1
  77. package/src/layout/footer/footer.visual.spec.ts +1 -1
  78. package/src/layout/grid/grid.visual.spec.ts +1 -1
  79. package/src/layout/nav-rail/nav-rail.visual.spec.ts +1 -1
  80. package/src/layout/page-header/page-header.visual.spec.ts +1 -1
  81. package/src/layout/row/row.visual.spec.ts +1 -1
  82. package/src/layout/sidebar/sidebar.visual.spec.ts +1 -1
  83. package/src/layout/sidebar-nav/sidebar-nav.visual.spec.ts +1 -1
  84. package/src/layout/topbar/topbar.visual.spec.ts +1 -1
  85. package/src/debug/grid-overlay.scss +0 -81
  86. package/src/testing/api-types.ts +0 -20
  87. package/src/testing/grid-alignment.spec.ts +0 -38
  88. package/src/testing/html-generator.ts +0 -151
  89. package/src/testing/index.ts +0 -15
  90. package/src/testing/page-setup.ts +0 -149
  91. package/src/testing/rhythm.ts +0 -146
  92. package/src/testing/scaffold.ts +0 -50
@@ -1,6 +1,10 @@
1
1
  import { resolve } from 'node:path';
2
2
  import { expect, test } from '@playwright/test';
3
- import { saveForLostPixel, setupVisualTestFromDocs, validateGridRhythm } from '../../../testing';
3
+ import {
4
+ saveForLostPixel,
5
+ setupVisualTestFromDocs,
6
+ validateGridRhythm,
7
+ } from '../../../../test-utils';
4
8
 
5
9
  const DOCS_PATH = resolve(__dirname, 'pagination.docs.json');
6
10
 
@@ -1,6 +1,10 @@
1
1
  import { resolve } from 'node:path';
2
2
  import { expect, test } from '@playwright/test';
3
- import { saveForLostPixel, setupVisualTestFromDocs, validateGridRhythm } from '../../../testing';
3
+ import {
4
+ saveForLostPixel,
5
+ setupVisualTestFromDocs,
6
+ validateGridRhythm,
7
+ } from '../../../../test-utils';
4
8
 
5
9
  const DOCS_PATH = resolve(__dirname, 'tabs.docs.json');
6
10
 
@@ -1,6 +1,10 @@
1
1
  import { resolve } from 'node:path';
2
2
  import { expect, test } from '@playwright/test';
3
- import { saveForLostPixel, setupVisualTestFromDocs, validateGridRhythm } from '../../../testing';
3
+ import {
4
+ saveForLostPixel,
5
+ setupVisualTestFromDocs,
6
+ validateGridRhythm,
7
+ } from '../../../../test-utils';
4
8
 
5
9
  const DOCS_PATH = resolve(__dirname, 'dialog.docs.json');
6
10
 
@@ -1,6 +1,10 @@
1
1
  import { resolve } from 'node:path';
2
2
  import { expect, test } from '@playwright/test';
3
- import { saveForLostPixel, setupVisualTestFromDocs, validateGridRhythm } from '../../../testing';
3
+ import {
4
+ saveForLostPixel,
5
+ setupVisualTestFromDocs,
6
+ validateGridRhythm,
7
+ } from '../../../../test-utils';
4
8
 
5
9
  const DOCS_PATH = resolve(__dirname, 'drawer.docs.json');
6
10
 
@@ -1,6 +1,10 @@
1
1
  import { resolve } from 'node:path';
2
2
  import { expect, test } from '@playwright/test';
3
- import { saveForLostPixel, setupVisualTestFromDocs, validateGridRhythm } from '../../../testing';
3
+ import {
4
+ saveForLostPixel,
5
+ setupVisualTestFromDocs,
6
+ validateGridRhythm,
7
+ } from '../../../../test-utils';
4
8
 
5
9
  const DOCS_PATH = resolve(__dirname, 'modal.docs.json');
6
10
 
@@ -1,6 +1,10 @@
1
1
  import { resolve } from 'node:path';
2
2
  import { expect, test } from '@playwright/test';
3
- import { saveForLostPixel, setupVisualTestFromDocs, validateGridRhythm } from '../../../testing';
3
+ import {
4
+ saveForLostPixel,
5
+ setupVisualTestFromDocs,
6
+ validateGridRhythm,
7
+ } from '../../../../test-utils';
4
8
 
5
9
  const DOCS_PATH = resolve(__dirname, 'overlay.docs.json');
6
10
 
@@ -1,6 +1,10 @@
1
1
  import { resolve } from 'node:path';
2
2
  import { expect, test } from '@playwright/test';
3
- import { saveForLostPixel, setupVisualTestFromDocs, validateGridRhythm } from '../../../testing';
3
+ import {
4
+ saveForLostPixel,
5
+ setupVisualTestFromDocs,
6
+ validateGridRhythm,
7
+ } from '../../../../test-utils';
4
8
 
5
9
  const DOCS_PATH = resolve(__dirname, 'popover.docs.json');
6
10
 
@@ -1,6 +1,10 @@
1
1
  import { resolve } from 'node:path';
2
2
  import { expect, test } from '@playwright/test';
3
- import { saveForLostPixel, setupVisualTestFromDocs, validateGridRhythm } from '../../../testing';
3
+ import {
4
+ saveForLostPixel,
5
+ setupVisualTestFromDocs,
6
+ validateGridRhythm,
7
+ } from '../../../../test-utils';
4
8
 
5
9
  const DOCS_PATH = resolve(__dirname, 'tooltip.docs.json');
6
10
 
@@ -1,6 +1,10 @@
1
1
  import { resolve } from 'node:path';
2
2
  import { expect, test } from '@playwright/test';
3
- import { saveForLostPixel, setupVisualTestFromDocs, validateGridRhythm } from '../../../testing';
3
+ import {
4
+ saveForLostPixel,
5
+ setupVisualTestFromDocs,
6
+ validateGridRhythm,
7
+ } from '../../../../test-utils';
4
8
 
5
9
  const DOCS_PATH = resolve(__dirname, 'blockquote.docs.json');
6
10
 
@@ -1,6 +1,10 @@
1
1
  import { resolve } from 'node:path';
2
2
  import { expect, test } from '@playwright/test';
3
- import { saveForLostPixel, setupVisualTestFromDocs, validateGridRhythm } from '../../../testing';
3
+ import {
4
+ saveForLostPixel,
5
+ setupVisualTestFromDocs,
6
+ validateGridRhythm,
7
+ } from '../../../../test-utils';
4
8
 
5
9
  const DOCS_PATH = resolve(__dirname, 'code.docs.json');
6
10
 
@@ -1,6 +1,10 @@
1
1
  import { resolve } from 'node:path';
2
2
  import { expect, test } from '@playwright/test';
3
- import { saveForLostPixel, setupVisualTestFromDocs, validateGridRhythm } from '../../../testing';
3
+ import {
4
+ saveForLostPixel,
5
+ setupVisualTestFromDocs,
6
+ validateGridRhythm,
7
+ } from '../../../../test-utils';
4
8
 
5
9
  const DOCS_PATH = resolve(__dirname, 'code-block.docs.json');
6
10
 
@@ -1,6 +1,10 @@
1
1
  import { resolve } from 'node:path';
2
2
  import { expect, test } from '@playwright/test';
3
- import { saveForLostPixel, setupVisualTestFromDocs, validateGridRhythm } from '../../../testing';
3
+ import {
4
+ saveForLostPixel,
5
+ setupVisualTestFromDocs,
6
+ validateGridRhythm,
7
+ } from '../../../../test-utils';
4
8
 
5
9
  const DOCS_PATH = resolve(__dirname, 'heading.docs.json');
6
10
 
@@ -1,6 +1,10 @@
1
1
  import { resolve } from 'node:path';
2
2
  import { expect, test } from '@playwright/test';
3
- import { saveForLostPixel, setupVisualTestFromDocs, validateGridRhythm } from '../../../testing';
3
+ import {
4
+ saveForLostPixel,
5
+ setupVisualTestFromDocs,
6
+ validateGridRhythm,
7
+ } from '../../../../test-utils';
4
8
 
5
9
  const DOCS_PATH = resolve(__dirname, 'kbd.docs.json');
6
10
 
@@ -1,6 +1,10 @@
1
1
  import { resolve } from 'node:path';
2
2
  import { expect, test } from '@playwright/test';
3
- import { saveForLostPixel, setupVisualTestFromDocs, validateGridRhythm } from '../../../testing';
3
+ import {
4
+ saveForLostPixel,
5
+ setupVisualTestFromDocs,
6
+ validateGridRhythm,
7
+ } from '../../../../test-utils';
4
8
 
5
9
  const DOCS_PATH = resolve(__dirname, 'link.docs.json');
6
10
 
@@ -1,6 +1,10 @@
1
1
  import { resolve } from 'node:path';
2
2
  import { expect, test } from '@playwright/test';
3
- import { saveForLostPixel, setupVisualTestFromDocs, validateGridRhythm } from '../../../testing';
3
+ import {
4
+ saveForLostPixel,
5
+ setupVisualTestFromDocs,
6
+ validateGridRhythm,
7
+ } from '../../../../test-utils';
4
8
 
5
9
  const DOCS_PATH = resolve(__dirname, 'list.docs.json');
6
10
 
@@ -1,6 +1,10 @@
1
1
  import { resolve } from 'node:path';
2
2
  import { expect, test } from '@playwright/test';
3
- import { saveForLostPixel, setupVisualTestFromDocs, validateGridRhythm } from '../../../testing';
3
+ import {
4
+ saveForLostPixel,
5
+ setupVisualTestFromDocs,
6
+ validateGridRhythm,
7
+ } from '../../../../test-utils';
4
8
 
5
9
  const DOCS_PATH = resolve(__dirname, 'mark.docs.json');
6
10
 
@@ -3,6 +3,7 @@
3
3
  "type": "guide",
4
4
  "title": "Accessibility",
5
5
  "description": "Built-in accessibility features: reduced motion, system theme detection, high contrast, and keyboard focus indicators",
6
+ "weight": 3,
6
7
  "skipValidation": true,
7
8
  "sections": [
8
9
  {
@@ -0,0 +1,106 @@
1
+ {
2
+ "id": "getting-started",
3
+ "type": "guide",
4
+ "title": "Getting Started",
5
+ "description": "Install, import, and start using the CSS library in your project",
6
+ "weight": 1,
7
+ "skipValidation": true,
8
+ "sections": [
9
+ {
10
+ "title": "Installation",
11
+ "description": "Install the package from npm.",
12
+ "examples": [
13
+ {
14
+ "title": "npm / pnpm / yarn",
15
+ "code": "npm install @teseor/css\n# or\npnpm add @teseor/css\n# or\nyarn add @teseor/css"
16
+ }
17
+ ]
18
+ },
19
+ {
20
+ "title": "Import",
21
+ "description": "Import the compiled CSS in your app entry point.",
22
+ "examples": [
23
+ {
24
+ "title": "JS / TS entry",
25
+ "code": "import '@teseor/css';\n// or\nimport '@teseor/css/dist/index.css';"
26
+ },
27
+ {
28
+ "title": "HTML link",
29
+ "code": "<link rel=\"stylesheet\" href=\"node_modules/@teseor/css/dist/index.css\">"
30
+ }
31
+ ]
32
+ },
33
+ {
34
+ "title": "Root Class",
35
+ "description": "Add the .ui-root class to set baseline typography and colors.",
36
+ "examples": [
37
+ {
38
+ "items": [
39
+ {
40
+ "tag": "div",
41
+ "class": "ui-root",
42
+ "children": [{ "tag": "p", "text": "Text inherits font, size, color from .ui-root" }]
43
+ }
44
+ ],
45
+ "code": "<html class=\"ui-root\">\n <body>\n <!-- All children inherit base styles -->\n </body>\n</html>"
46
+ }
47
+ ]
48
+ },
49
+ {
50
+ "title": "First Component",
51
+ "description": "Use any component by adding its class. No JS required.",
52
+ "examples": [
53
+ {
54
+ "title": "Button",
55
+ "items": [
56
+ {
57
+ "tag": "div",
58
+ "class": "ui-row ui-row--sm",
59
+ "children": [
60
+ { "tag": "button", "class": "ui-button", "text": "Primary" },
61
+ { "tag": "button", "class": "ui-button ui-button--secondary", "text": "Secondary" },
62
+ { "tag": "button", "class": "ui-button ui-button--danger", "text": "Danger" }
63
+ ]
64
+ }
65
+ ],
66
+ "code": "<button class=\"ui-button\">Primary</button>\n<button class=\"ui-button ui-button--secondary\">Secondary</button>\n<button class=\"ui-button ui-button--danger\">Danger</button>"
67
+ },
68
+ {
69
+ "title": "Card",
70
+ "items": [
71
+ {
72
+ "tag": "div",
73
+ "class": "ui-card",
74
+ "children": [
75
+ { "tag": "h3", "class": "ui-heading ui-heading--4", "text": "Card Title" },
76
+ {
77
+ "tag": "p",
78
+ "text": "Cards use semantic tokens for padding, border, and background."
79
+ }
80
+ ]
81
+ }
82
+ ],
83
+ "code": "<div class=\"ui-card\">\n <h3 class=\"ui-heading ui-heading--4\">Card Title</h3>\n <p>Content goes here.</p>\n</div>"
84
+ }
85
+ ]
86
+ },
87
+ {
88
+ "title": "Customize",
89
+ "description": "Override design tokens with CSS custom properties. No build step required.",
90
+ "examples": [
91
+ {
92
+ "title": "Change brand color",
93
+ "items": [
94
+ {
95
+ "tag": "div",
96
+ "class": "theme-demo",
97
+ "style": { "--ui-hue-primary": "270" },
98
+ "children": [{ "tag": "button", "class": "ui-button", "text": "Purple brand" }]
99
+ }
100
+ ],
101
+ "code": ":root {\n --ui-hue-primary: 270; /* purple */\n}"
102
+ }
103
+ ]
104
+ }
105
+ ]
106
+ }
@@ -3,6 +3,7 @@
3
3
  "type": "guide",
4
4
  "title": "Theming",
5
5
  "description": "Customize the design system with CSS custom properties",
6
+ "weight": 2,
6
7
  "skipValidation": true,
7
8
  "sections": [
8
9
  {
@@ -0,0 +1,239 @@
1
+ {
2
+ "id": "design-tokens",
3
+ "type": "token",
4
+ "title": "Design Tokens",
5
+ "description": "Borders, radius, shadows, motion, z-index, and semantic tokens that form the visual foundation",
6
+ "skipValidation": true,
7
+ "sections": [
8
+ {
9
+ "title": "Borders",
10
+ "description": "Border width tokens derived from the 8px unit.",
11
+ "examples": [
12
+ {
13
+ "layout": "row",
14
+ "items": [
15
+ {
16
+ "tag": "div",
17
+ "style": {
18
+ "width": "var(--ui-space-8)",
19
+ "height": "var(--ui-row-2)",
20
+ "border": "var(--ui-border-width-sm) solid var(--ui-color-border-strong)"
21
+ }
22
+ },
23
+ {
24
+ "tag": "div",
25
+ "style": {
26
+ "width": "var(--ui-space-8)",
27
+ "height": "var(--ui-row-2)",
28
+ "border": "var(--ui-border-width-md) solid var(--ui-color-border-strong)"
29
+ }
30
+ },
31
+ {
32
+ "tag": "div",
33
+ "style": {
34
+ "width": "var(--ui-space-8)",
35
+ "height": "var(--ui-row-2)",
36
+ "border": "var(--ui-border-width-lg) solid var(--ui-color-border-strong)"
37
+ }
38
+ }
39
+ ],
40
+ "code": ":root {\n --ui-border-width-sm: calc(var(--ui-unit) * 0.125); /* 1px */\n --ui-border-width-md: calc(var(--ui-unit) * 0.25); /* 2px */\n --ui-border-width-lg: calc(var(--ui-unit) * 0.5); /* 4px */\n}"
41
+ }
42
+ ]
43
+ },
44
+ {
45
+ "title": "Radius",
46
+ "description": "Border radius tokens derived from the 8px unit.",
47
+ "examples": [
48
+ {
49
+ "layout": "row",
50
+ "items": [
51
+ {
52
+ "tag": "div",
53
+ "class": "ui-column ui-column--xs",
54
+ "style": { "align-items": "center" },
55
+ "children": [
56
+ {
57
+ "tag": "div",
58
+ "style": {
59
+ "width": "var(--ui-row-3)",
60
+ "height": "var(--ui-row-3)",
61
+ "background": "var(--ui-color-primary)",
62
+ "border-radius": "var(--ui-radius-sm)"
63
+ }
64
+ },
65
+ { "tag": "small", "text": "sm (4px)" }
66
+ ]
67
+ },
68
+ {
69
+ "tag": "div",
70
+ "class": "ui-column ui-column--xs",
71
+ "style": { "align-items": "center" },
72
+ "children": [
73
+ {
74
+ "tag": "div",
75
+ "style": {
76
+ "width": "var(--ui-row-3)",
77
+ "height": "var(--ui-row-3)",
78
+ "background": "var(--ui-color-primary)",
79
+ "border-radius": "var(--ui-radius-md)"
80
+ }
81
+ },
82
+ { "tag": "small", "text": "md (8px)" }
83
+ ]
84
+ },
85
+ {
86
+ "tag": "div",
87
+ "class": "ui-column ui-column--xs",
88
+ "style": { "align-items": "center" },
89
+ "children": [
90
+ {
91
+ "tag": "div",
92
+ "style": {
93
+ "width": "var(--ui-row-3)",
94
+ "height": "var(--ui-row-3)",
95
+ "background": "var(--ui-color-primary)",
96
+ "border-radius": "var(--ui-radius-lg)"
97
+ }
98
+ },
99
+ { "tag": "small", "text": "lg (16px)" }
100
+ ]
101
+ },
102
+ {
103
+ "tag": "div",
104
+ "class": "ui-column ui-column--xs",
105
+ "style": { "align-items": "center" },
106
+ "children": [
107
+ {
108
+ "tag": "div",
109
+ "style": {
110
+ "width": "var(--ui-row-3)",
111
+ "height": "var(--ui-row-3)",
112
+ "background": "var(--ui-color-primary)",
113
+ "border-radius": "var(--ui-radius-full)"
114
+ }
115
+ },
116
+ { "tag": "small", "text": "full" }
117
+ ]
118
+ }
119
+ ],
120
+ "code": ":root {\n --ui-radius-sm: calc(var(--ui-unit) * 0.5); /* 4px */\n --ui-radius-md: var(--ui-unit); /* 8px */\n --ui-radius-lg: calc(var(--ui-unit) * 2); /* 16px */\n --ui-radius-full: 9999px;\n}"
121
+ }
122
+ ]
123
+ },
124
+ {
125
+ "title": "Shadows",
126
+ "description": "Elevation shadows using the primary hue for tinted depth.",
127
+ "examples": [
128
+ {
129
+ "layout": "row",
130
+ "items": [
131
+ {
132
+ "tag": "div",
133
+ "class": "ui-column ui-column--xs",
134
+ "style": { "align-items": "center" },
135
+ "children": [
136
+ {
137
+ "tag": "div",
138
+ "style": {
139
+ "width": "var(--ui-space-8)",
140
+ "height": "var(--ui-row-3)",
141
+ "background": "var(--ui-color-bg)",
142
+ "border-radius": "var(--ui-radius-md)",
143
+ "box-shadow": "var(--ui-shadow-sm)"
144
+ }
145
+ },
146
+ { "tag": "small", "text": "sm" }
147
+ ]
148
+ },
149
+ {
150
+ "tag": "div",
151
+ "class": "ui-column ui-column--xs",
152
+ "style": { "align-items": "center" },
153
+ "children": [
154
+ {
155
+ "tag": "div",
156
+ "style": {
157
+ "width": "var(--ui-space-8)",
158
+ "height": "var(--ui-row-3)",
159
+ "background": "var(--ui-color-bg)",
160
+ "border-radius": "var(--ui-radius-md)",
161
+ "box-shadow": "var(--ui-shadow-md)"
162
+ }
163
+ },
164
+ { "tag": "small", "text": "md" }
165
+ ]
166
+ },
167
+ {
168
+ "tag": "div",
169
+ "class": "ui-column ui-column--xs",
170
+ "style": { "align-items": "center" },
171
+ "children": [
172
+ {
173
+ "tag": "div",
174
+ "style": {
175
+ "width": "var(--ui-space-8)",
176
+ "height": "var(--ui-row-3)",
177
+ "background": "var(--ui-color-bg)",
178
+ "border-radius": "var(--ui-radius-md)",
179
+ "box-shadow": "var(--ui-shadow-lg)"
180
+ }
181
+ },
182
+ { "tag": "small", "text": "lg" }
183
+ ]
184
+ }
185
+ ],
186
+ "code": ":root {\n --ui-shadow-sm: 0 1px 2px hsl(var(--ui-hue-primary) 10% 20% / 0.05);\n --ui-shadow-md: 0 4px 6px hsl(var(--ui-hue-primary) 10% 20% / 0.1);\n --ui-shadow-lg: 0 10px 15px hsl(var(--ui-hue-primary) 10% 20% / 0.15);\n}"
187
+ }
188
+ ]
189
+ },
190
+ {
191
+ "title": "Motion",
192
+ "description": "Duration and easing tokens. All durations drop to 0ms when prefers-reduced-motion is active.",
193
+ "examples": [
194
+ {
195
+ "title": "Duration scale",
196
+ "code": ":root {\n --ui-duration-instant: 50ms;\n --ui-duration-fast: 100ms;\n --ui-duration-base: 150ms;\n --ui-duration-normal: 200ms;\n --ui-duration-slow: 250ms;\n --ui-duration-slower: 400ms;\n}\n\n@media (prefers-reduced-motion: reduce) {\n :root {\n --ui-duration-instant: 0ms;\n --ui-duration-fast: 0ms;\n /* ...all set to 0ms */\n }\n}"
197
+ },
198
+ {
199
+ "title": "Easing functions",
200
+ "code": ":root {\n --ui-ease-default: cubic-bezier(0.4, 0, 0.2, 1);\n --ui-ease-in: cubic-bezier(0.4, 0, 1, 1);\n --ui-ease-out: cubic-bezier(0, 0, 0.2, 1);\n --ui-ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);\n}"
201
+ }
202
+ ]
203
+ },
204
+ {
205
+ "title": "Z-index",
206
+ "description": "Layering scale with gaps to allow insertion without renumbering.",
207
+ "examples": [
208
+ {
209
+ "title": "Z-index tokens",
210
+ "code": ":root {\n --ui-z-base: 0;\n --ui-z-sticky: 100;\n --ui-z-dropdown: 200;\n --ui-z-overlay: 300;\n --ui-z-modal: 400;\n --ui-z-popover: 500;\n --ui-z-tooltip: 600;\n --ui-z-toast: 700;\n --ui-z-drawer: 800;\n --ui-z-debug: 9999;\n}"
211
+ }
212
+ ]
213
+ },
214
+ {
215
+ "title": "Semantic Colors",
216
+ "description": "Context-aware color tokens that resolve automatically in light and dark mode via light-dark().",
217
+ "examples": [
218
+ {
219
+ "title": "Text and background",
220
+ "code": ":root {\n color-scheme: light dark;\n --ui-color-text: light-dark(var(--ui-color-neutral-900), var(--ui-color-neutral-100));\n --ui-color-text-muted: light-dark(var(--ui-color-neutral-500), var(--ui-color-neutral-400));\n --ui-color-bg: light-dark(var(--ui-color-neutral-50), var(--ui-color-neutral-900));\n --ui-color-bg-subtle: light-dark(var(--ui-color-neutral-100), var(--ui-color-neutral-800));\n}"
221
+ },
222
+ {
223
+ "title": "Borders and interactive",
224
+ "code": ":root {\n --ui-color-border: light-dark(var(--ui-color-neutral-200), var(--ui-color-neutral-700));\n --ui-color-border-strong: light-dark(var(--ui-color-neutral-300), var(--ui-color-neutral-600));\n --ui-color-interactive: var(--ui-color-primary);\n --ui-color-interactive-hover: var(--ui-color-primary-dark);\n --ui-color-focus: var(--ui-color-primary-light);\n}"
225
+ }
226
+ ]
227
+ },
228
+ {
229
+ "title": "Semantic Spacing",
230
+ "description": "Named spacing aliases that map to the numeric spacing scale for consistent layout patterns.",
231
+ "examples": [
232
+ {
233
+ "title": "Semantic spacing tokens",
234
+ "code": ":root {\n --ui-spacing-xs: var(--ui-space-1); /* 8px */\n --ui-spacing-sm: var(--ui-space-2); /* 16px */\n --ui-spacing-md: var(--ui-space-4); /* 32px */\n --ui-spacing-lg: var(--ui-space-6); /* 48px */\n --ui-spacing-xl: var(--ui-space-8); /* 64px */\n --ui-spacing-gutter: var(--ui-space-4); /* 32px */\n --ui-spacing-section: var(--ui-space-8);/* 64px */\n}"
235
+ }
236
+ ]
237
+ }
238
+ ]
239
+ }
@@ -0,0 +1,96 @@
1
+ {
2
+ "id": "debug",
3
+ "type": "utility",
4
+ "title": "Debug",
5
+ "description": "Visual debugging overlays for grid alignment, baseline rhythm, and element boundaries",
6
+ "skipValidation": true,
7
+ "sections": [
8
+ {
9
+ "title": "Grid Overlay",
10
+ "description": "Shows the 8px unit grid. Add the class to any container.",
11
+ "examples": [
12
+ {
13
+ "title": "Unit grid",
14
+ "items": [
15
+ {
16
+ "tag": "div",
17
+ "class": "ui-debug-grid",
18
+ "style": {
19
+ "height": "var(--ui-row-6)",
20
+ "position": "relative"
21
+ }
22
+ }
23
+ ],
24
+ "code": "<div class=\"ui-debug-grid\">\n <!-- 8px grid lines appear -->\n</div>"
25
+ }
26
+ ]
27
+ },
28
+ {
29
+ "title": "Row Grid",
30
+ "description": "Shows both 8px unit lines and stronger row (16px) lines.",
31
+ "examples": [
32
+ {
33
+ "title": "Unit + row grid",
34
+ "items": [
35
+ {
36
+ "tag": "div",
37
+ "class": "ui-debug-grid-rows",
38
+ "style": {
39
+ "height": "var(--ui-row-6)",
40
+ "position": "relative"
41
+ }
42
+ }
43
+ ],
44
+ "code": "<div class=\"ui-debug-grid-rows\">\n <!-- 8px + 16px grid lines -->\n</div>"
45
+ }
46
+ ]
47
+ },
48
+ {
49
+ "title": "Baseline",
50
+ "description": "Horizontal baseline grid for verifying text alignment.",
51
+ "examples": [
52
+ {
53
+ "title": "Baseline grid",
54
+ "items": [
55
+ {
56
+ "tag": "div",
57
+ "class": "ui-debug-baseline",
58
+ "style": {
59
+ "height": "var(--ui-row-6)",
60
+ "position": "relative"
61
+ }
62
+ }
63
+ ],
64
+ "code": "<div class=\"ui-debug-baseline\">\n <!-- Horizontal 8px baseline lines -->\n</div>"
65
+ }
66
+ ]
67
+ },
68
+ {
69
+ "title": "Outline",
70
+ "description": "Outlines all child elements to reveal layout boundaries.",
71
+ "examples": [
72
+ {
73
+ "title": "Element outlines",
74
+ "items": [
75
+ {
76
+ "tag": "div",
77
+ "class": "ui-debug-outline",
78
+ "children": [
79
+ {
80
+ "tag": "div",
81
+ "class": "ui-row ui-row--sm",
82
+ "children": [
83
+ { "tag": "div", "text": "A", "style": { "padding": "var(--ui-space-1)" } },
84
+ { "tag": "div", "text": "B", "style": { "padding": "var(--ui-space-1)" } },
85
+ { "tag": "div", "text": "C", "style": { "padding": "var(--ui-space-1)" } }
86
+ ]
87
+ }
88
+ ]
89
+ }
90
+ ],
91
+ "code": "<div class=\"ui-debug-outline\">\n <!-- All children get red outlines -->\n</div>"
92
+ }
93
+ ]
94
+ }
95
+ ]
96
+ }