@teseor/css 1.14.1 → 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.
- package/dist/compiled.css +1 -1
- package/dist/index.css +1 -1
- package/package.json +1 -1
- package/src/base/index.scss +1 -1
- package/src/base/root.docs.json +35 -0
- package/src/base/{root/root.scss → root.scss} +1 -1
- package/src/components/actions/button/button.visual.spec.ts +5 -1
- package/src/components/actions/button-group/button-group.visual.spec.ts +5 -1
- package/src/components/actions/close-button/close-button.visual.spec.ts +5 -1
- package/src/components/content/divider/divider.visual.spec.ts +5 -1
- package/src/components/content/scroll-area/scroll-area.visual.spec.ts +5 -1
- package/src/components/content/spacer/spacer.visual.spec.ts +1 -1
- package/src/components/data-display/avatar/avatar.visual.spec.ts +5 -1
- package/src/components/data-display/badge/badge.visual.spec.ts +5 -1
- package/src/components/data-display/card/card.visual.spec.ts +5 -1
- package/src/components/data-display/data-list/data-list.visual.spec.ts +5 -1
- package/src/components/data-display/icon/icon.visual.spec.ts +5 -1
- package/src/components/data-display/image/image.visual.spec.ts +5 -1
- package/src/components/data-display/stat/stat.visual.spec.ts +5 -1
- package/src/components/data-display/status/status.visual.spec.ts +5 -1
- package/src/components/data-display/table/table.visual.spec.ts +5 -1
- package/src/components/data-display/tag/tag.visual.spec.ts +5 -1
- package/src/components/disclosure/accordion/accordion.visual.spec.ts +5 -1
- package/src/components/disclosure/disclosure/disclosure.visual.spec.ts +5 -1
- package/src/components/feedback/alert/alert.visual.spec.ts +5 -1
- package/src/components/feedback/progress/progress.visual.spec.ts +5 -1
- package/src/components/feedback/progress-circle/progress-circle.visual.spec.ts +5 -1
- package/src/components/feedback/skeleton/skeleton.visual.spec.ts +5 -1
- package/src/components/feedback/spinner/spinner.visual.spec.ts +5 -1
- package/src/components/feedback/toast/toast.visual.spec.ts +5 -1
- package/src/components/forms/checkbox/checkbox.visual.spec.ts +5 -1
- package/src/components/forms/checkbox-group/checkbox-group.visual.spec.ts +5 -1
- package/src/components/forms/field/field.visual.spec.ts +5 -1
- package/src/components/forms/fieldset/fieldset.visual.spec.ts +5 -1
- package/src/components/forms/form/form.visual.spec.ts +5 -1
- package/src/components/forms/form-error/form-error.visual.spec.ts +5 -1
- package/src/components/forms/form-helper/form-helper.visual.spec.ts +5 -1
- package/src/components/forms/input/input.visual.spec.ts +5 -1
- package/src/components/forms/label/label.visual.spec.ts +5 -1
- package/src/components/forms/number-input/number-input.visual.spec.ts +5 -1
- package/src/components/forms/password-input/password-input.visual.spec.ts +5 -1
- package/src/components/forms/radio/radio.visual.spec.ts +5 -1
- package/src/components/forms/radio-group/radio-group.visual.spec.ts +5 -1
- package/src/components/forms/search-input/search-input.visual.spec.ts +5 -1
- package/src/components/forms/select/select.visual.spec.ts +5 -1
- package/src/components/forms/slider/slider.visual.spec.ts +5 -1
- package/src/components/forms/textarea/textarea.visual.spec.ts +5 -1
- package/src/components/forms/toggle/toggle.visual.spec.ts +5 -1
- package/src/components/navigation/breadcrumb/breadcrumb.visual.spec.ts +5 -1
- package/src/components/navigation/dropdown-menu/dropdown-menu.visual.spec.ts +5 -1
- package/src/components/navigation/menu/menu.visual.spec.ts +5 -1
- package/src/components/navigation/nav/nav.visual.spec.ts +5 -1
- package/src/components/navigation/pagination/pagination.visual.spec.ts +5 -1
- package/src/components/navigation/tabs/tabs.visual.spec.ts +5 -1
- package/src/components/overlays/dialog/dialog.visual.spec.ts +5 -1
- package/src/components/overlays/drawer/drawer.visual.spec.ts +5 -1
- package/src/components/overlays/modal/modal.visual.spec.ts +5 -1
- package/src/components/overlays/overlay/overlay.visual.spec.ts +5 -1
- package/src/components/overlays/popover/popover.visual.spec.ts +5 -1
- package/src/components/overlays/tooltip/tooltip.visual.spec.ts +5 -1
- package/src/components/typography/blockquote/blockquote.visual.spec.ts +5 -1
- package/src/components/typography/code/code.visual.spec.ts +5 -1
- package/src/components/typography/code-block/code-block.visual.spec.ts +5 -1
- package/src/components/typography/heading/heading.visual.spec.ts +5 -1
- package/src/components/typography/kbd/kbd.visual.spec.ts +5 -1
- package/src/components/typography/link/link.visual.spec.ts +5 -1
- package/src/components/typography/list/list.visual.spec.ts +5 -1
- package/src/components/typography/mark/mark.visual.spec.ts +5 -1
- package/src/config/{tokens → guides}/accessibility.docs.json +1 -0
- package/src/config/guides/getting-started.docs.json +106 -0
- package/src/config/{tokens → guides}/theming.docs.json +1 -0
- package/src/config/tokens/_variables.scss +107 -68
- package/src/config/tokens/design-tokens.docs.json +239 -0
- package/src/config/tokens/index.scss +8 -8
- package/src/config/tokens/input.scss +13 -11
- package/src/debug/debug.docs.json +96 -0
- package/src/debug/index.scss +81 -1
- package/src/index.scss +1 -1
- package/src/layout/app-shell/app-shell.visual.spec.ts +1 -1
- package/src/layout/aspect-ratio/aspect-ratio.visual.spec.ts +1 -1
- package/src/layout/box/box.visual.spec.ts +1 -1
- package/src/layout/center/center.visual.spec.ts +1 -1
- package/src/layout/column/column.visual.spec.ts +1 -1
- package/src/layout/content/content.visual.spec.ts +1 -1
- package/src/layout/footer/footer.visual.spec.ts +1 -1
- package/src/layout/grid/grid.visual.spec.ts +1 -1
- package/src/layout/nav-rail/nav-rail.visual.spec.ts +1 -1
- package/src/layout/page-header/page-header.visual.spec.ts +1 -1
- package/src/layout/row/row.visual.spec.ts +1 -1
- package/src/layout/sidebar/sidebar.visual.spec.ts +1 -1
- package/src/layout/sidebar-nav/sidebar-nav.visual.spec.ts +1 -1
- package/src/layout/topbar/topbar.visual.spec.ts +1 -1
- package/src/debug/grid-overlay.scss +0 -81
- package/src/testing/api-types.ts +0 -20
- package/src/testing/grid-alignment.spec.ts +0 -38
- package/src/testing/html-generator.ts +0 -151
- package/src/testing/index.ts +0 -15
- package/src/testing/page-setup.ts +0 -149
- package/src/testing/rhythm.ts +0 -146
- package/src/testing/scaffold.ts +0 -50
- /package/src/config/{layers/layers.scss → layers.scss} +0 -0
- /package/src/config/tokens/{borders/index.scss → borders.scss} +0 -0
- /package/src/config/tokens/{motion/index.scss → motion.scss} +0 -0
- /package/src/config/tokens/{radius/index.scss → radius.scss} +0 -0
- /package/src/config/tokens/{semantic/colors/index.scss → semantic-colors.scss} +0 -0
- /package/src/config/tokens/{semantic/spacing/index.scss → semantic-spacing.scss} +0 -0
- /package/src/config/tokens/{shadows/index.scss → shadows.scss} +0 -0
- /package/src/config/tokens/{typography/index.scss → typography.scss} +0 -0
- /package/src/config/tokens/{zindex/index.scss → zindex.scss} +0 -0
|
@@ -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
|
+
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
// Design tokens - colors, spacing, typography, grid, etc.
|
|
2
2
|
@use './colors/index' as *;
|
|
3
3
|
@use './spacing/index' as *;
|
|
4
|
-
@use './typography
|
|
4
|
+
@use './typography' as *;
|
|
5
5
|
@use './grid/index' as *;
|
|
6
|
-
@use './radius
|
|
7
|
-
@use './borders
|
|
8
|
-
@use './shadows
|
|
9
|
-
@use './zindex
|
|
10
|
-
@use './motion
|
|
11
|
-
@use './semantic
|
|
12
|
-
@use './semantic
|
|
6
|
+
@use './radius' as *;
|
|
7
|
+
@use './borders' as *;
|
|
8
|
+
@use './shadows' as *;
|
|
9
|
+
@use './zindex' as *;
|
|
10
|
+
@use './motion' as *;
|
|
11
|
+
@use './semantic-colors' as *;
|
|
12
|
+
@use './semantic-spacing' as *;
|
|
13
13
|
|
|
14
14
|
// Component tokens
|
|
15
15
|
@use './input' as *;
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
@layer tokens {
|
|
2
|
+
:root {
|
|
3
|
+
--ui-input-height: var(--ui-row-2);
|
|
4
|
+
--ui-input-padding-x: var(--ui-space-2);
|
|
5
|
+
--ui-input-padding-y: var(--ui-space-1);
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
--ui-input-radius: var(--ui-radius-md);
|
|
8
|
+
--ui-input-border-width: var(--ui-border-width-sm);
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
--ui-input-bg: var(--ui-color-bg);
|
|
11
|
+
--ui-input-border: var(--ui-color-border);
|
|
12
|
+
--ui-input-border-focus: var(--ui-color-interactive);
|
|
13
|
+
--ui-input-text: var(--ui-color-text);
|
|
14
|
+
--ui-input-placeholder: var(--ui-color-text-muted);
|
|
15
|
+
}
|
|
14
16
|
}
|
|
@@ -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
|
+
}
|
package/src/debug/index.scss
CHANGED
|
@@ -1 +1,81 @@
|
|
|
1
|
-
@
|
|
1
|
+
@use '../config/tokens/variables' as t;
|
|
2
|
+
// Debug grid overlay - add class="debug-grid" to body or any container
|
|
3
|
+
.debug-grid,
|
|
4
|
+
.debug-grid-rows,
|
|
5
|
+
.debug-baseline {
|
|
6
|
+
position: relative;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.debug-grid {
|
|
10
|
+
// Fallback hue 220 (blue) when --ui-hue-primary not set
|
|
11
|
+
--debug-color: hsl(var(--ui-hue-primary, #{t.$hue-primary}) 80% 50% / 0.15);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.debug-grid::after {
|
|
15
|
+
content: "";
|
|
16
|
+
position: absolute;
|
|
17
|
+
inset-block-start: 0;
|
|
18
|
+
inset-inline-start: 0;
|
|
19
|
+
z-index: var(--ui-z-debug);
|
|
20
|
+
|
|
21
|
+
block-size: 100%;
|
|
22
|
+
inline-size: 100%;
|
|
23
|
+
min-block-size: 100vh;
|
|
24
|
+
|
|
25
|
+
background-image: linear-gradient(to right, var(--debug-color) 1px, transparent 1px),
|
|
26
|
+
linear-gradient(to bottom, var(--debug-color) 1px, transparent 1px);
|
|
27
|
+
pointer-events: none;
|
|
28
|
+
background-size: var(--ui-unit) var(--ui-unit);
|
|
29
|
+
background-position: 0 0;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// Stronger grid at row intervals
|
|
33
|
+
.debug-grid-rows {
|
|
34
|
+
--debug-color: hsl(var(--ui-hue-primary, #{t.$hue-primary}) 80% 50% / 0.1);
|
|
35
|
+
--debug-color-strong: hsl(var(--ui-hue-primary, #{t.$hue-primary}) 80% 50% / 0.25);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.debug-grid-rows::after {
|
|
39
|
+
content: "";
|
|
40
|
+
position: absolute;
|
|
41
|
+
inset-block-start: 0;
|
|
42
|
+
inset-inline-start: 0;
|
|
43
|
+
z-index: var(--ui-z-debug);
|
|
44
|
+
|
|
45
|
+
block-size: 100%;
|
|
46
|
+
inline-size: 100%;
|
|
47
|
+
min-block-size: 100vh;
|
|
48
|
+
|
|
49
|
+
background-image: linear-gradient(to right, var(--debug-color) 1px, transparent 1px),
|
|
50
|
+
linear-gradient(to bottom, var(--debug-color) 1px, transparent 1px),
|
|
51
|
+
linear-gradient(to bottom, var(--debug-color-strong) 1px, transparent 1px);
|
|
52
|
+
pointer-events: none;
|
|
53
|
+
background-size: var(--ui-unit) var(--ui-unit), var(--ui-unit) var(--ui-unit), var(--ui-unit) var(--ui-row);
|
|
54
|
+
background-position: 0 0;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// Baseline grid only (horizontal lines)
|
|
58
|
+
.debug-baseline {
|
|
59
|
+
--debug-color: hsl(var(--ui-hue-danger, 0) 80% 50% / 0.2);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.debug-baseline::after {
|
|
63
|
+
content: "";
|
|
64
|
+
position: absolute;
|
|
65
|
+
inset-block-start: 0;
|
|
66
|
+
inset-inline-start: 0;
|
|
67
|
+
z-index: var(--ui-z-debug);
|
|
68
|
+
|
|
69
|
+
block-size: 100%;
|
|
70
|
+
inline-size: 100%;
|
|
71
|
+
min-block-size: 100vh;
|
|
72
|
+
|
|
73
|
+
background-image: linear-gradient(to bottom, var(--debug-color) 1px, transparent 1px);
|
|
74
|
+
pointer-events: none;
|
|
75
|
+
background-size: 100% var(--ui-unit);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// Element boundaries outline
|
|
79
|
+
.debug-outline * {
|
|
80
|
+
outline: 1px solid hsl(0 100% 50% / 0.5);
|
|
81
|
+
}
|
package/src/index.scss
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { resolve } from 'node:path';
|
|
2
2
|
import { expect, test } from '@playwright/test';
|
|
3
|
-
import { saveForLostPixel, setupVisualTestFromDocs } from '
|
|
3
|
+
import { saveForLostPixel, setupVisualTestFromDocs } from '../../../test-utils';
|
|
4
4
|
|
|
5
5
|
const DOCS_PATH = resolve(__dirname, 'app-shell.docs.json');
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { resolve } from 'node:path';
|
|
2
2
|
import { expect, test } from '@playwright/test';
|
|
3
|
-
import { saveForLostPixel, setupVisualTestFromDocs } from '
|
|
3
|
+
import { saveForLostPixel, setupVisualTestFromDocs } from '../../../test-utils';
|
|
4
4
|
|
|
5
5
|
const DOCS_PATH = resolve(__dirname, 'aspect-ratio.docs.json');
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { resolve } from 'node:path';
|
|
2
2
|
import { expect, test } from '@playwright/test';
|
|
3
|
-
import { saveForLostPixel, setupVisualTestFromDocs } from '
|
|
3
|
+
import { saveForLostPixel, setupVisualTestFromDocs } from '../../../test-utils';
|
|
4
4
|
|
|
5
5
|
const DOCS_PATH = resolve(__dirname, 'box.docs.json');
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { resolve } from 'node:path';
|
|
2
2
|
import { expect, test } from '@playwright/test';
|
|
3
|
-
import { saveForLostPixel, setupVisualTestFromDocs } from '
|
|
3
|
+
import { saveForLostPixel, setupVisualTestFromDocs } from '../../../test-utils';
|
|
4
4
|
|
|
5
5
|
const DOCS_PATH = resolve(__dirname, 'center.docs.json');
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { resolve } from 'node:path';
|
|
2
2
|
import { expect, test } from '@playwright/test';
|
|
3
|
-
import { saveForLostPixel, setupVisualTestFromDocs } from '
|
|
3
|
+
import { saveForLostPixel, setupVisualTestFromDocs } from '../../../test-utils';
|
|
4
4
|
|
|
5
5
|
const DOCS_PATH = resolve(__dirname, 'column.docs.json');
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { resolve } from 'node:path';
|
|
2
2
|
import { expect, test } from '@playwright/test';
|
|
3
|
-
import { saveForLostPixel, setupVisualTestFromDocs, validateGridRhythm } from '
|
|
3
|
+
import { saveForLostPixel, setupVisualTestFromDocs, validateGridRhythm } from '../../../test-utils';
|
|
4
4
|
|
|
5
5
|
const DOCS_PATH = resolve(__dirname, 'content.docs.json');
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { resolve } from 'node:path';
|
|
2
2
|
import { expect, test } from '@playwright/test';
|
|
3
|
-
import { saveForLostPixel, setupVisualTestFromDocs, validateGridRhythm } from '
|
|
3
|
+
import { saveForLostPixel, setupVisualTestFromDocs, validateGridRhythm } from '../../../test-utils';
|
|
4
4
|
|
|
5
5
|
const DOCS_PATH = resolve(__dirname, 'footer.docs.json');
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { resolve } from 'node:path';
|
|
2
2
|
import { expect, test } from '@playwright/test';
|
|
3
|
-
import { saveForLostPixel, setupVisualTestFromDocs } from '
|
|
3
|
+
import { saveForLostPixel, setupVisualTestFromDocs } from '../../../test-utils';
|
|
4
4
|
|
|
5
5
|
const DOCS_PATH = resolve(__dirname, 'grid.docs.json');
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { resolve } from 'node:path';
|
|
2
2
|
import { expect, test } from '@playwright/test';
|
|
3
|
-
import { saveForLostPixel, setupVisualTestFromDocs, validateGridRhythm } from '
|
|
3
|
+
import { saveForLostPixel, setupVisualTestFromDocs, validateGridRhythm } from '../../../test-utils';
|
|
4
4
|
|
|
5
5
|
const DOCS_PATH = resolve(__dirname, 'nav-rail.docs.json');
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { resolve } from 'node:path';
|
|
2
2
|
import { expect, test } from '@playwright/test';
|
|
3
|
-
import { saveForLostPixel, setupVisualTestFromDocs, validateGridRhythm } from '
|
|
3
|
+
import { saveForLostPixel, setupVisualTestFromDocs, validateGridRhythm } from '../../../test-utils';
|
|
4
4
|
|
|
5
5
|
const DOCS_PATH = resolve(__dirname, 'page-header.docs.json');
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { resolve } from 'node:path';
|
|
2
2
|
import { expect, test } from '@playwright/test';
|
|
3
|
-
import { saveForLostPixel, setupVisualTestFromDocs } from '
|
|
3
|
+
import { saveForLostPixel, setupVisualTestFromDocs } from '../../../test-utils';
|
|
4
4
|
|
|
5
5
|
const DOCS_PATH = resolve(__dirname, 'row.docs.json');
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { resolve } from 'node:path';
|
|
2
2
|
import { expect, test } from '@playwright/test';
|
|
3
|
-
import { saveForLostPixel, setupVisualTestFromDocs, validateGridRhythm } from '
|
|
3
|
+
import { saveForLostPixel, setupVisualTestFromDocs, validateGridRhythm } from '../../../test-utils';
|
|
4
4
|
|
|
5
5
|
const DOCS_PATH = resolve(__dirname, 'sidebar.docs.json');
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { resolve } from 'node:path';
|
|
2
2
|
import { expect, test } from '@playwright/test';
|
|
3
|
-
import { saveForLostPixel, setupVisualTestFromDocs, validateGridRhythm } from '
|
|
3
|
+
import { saveForLostPixel, setupVisualTestFromDocs, validateGridRhythm } from '../../../test-utils';
|
|
4
4
|
|
|
5
5
|
const DOCS_PATH = resolve(__dirname, 'sidebar-nav.docs.json');
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { resolve } from 'node:path';
|
|
2
2
|
import { expect, test } from '@playwright/test';
|
|
3
|
-
import { saveForLostPixel, setupVisualTestFromDocs, validateGridRhythm } from '
|
|
3
|
+
import { saveForLostPixel, setupVisualTestFromDocs, validateGridRhythm } from '../../../test-utils';
|
|
4
4
|
|
|
5
5
|
const DOCS_PATH = resolve(__dirname, 'topbar.docs.json');
|
|
6
6
|
|