@scania/tegel-lite 0.0.3-rules-beta.9 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -29
- package/dist/assets/icons/scania/microphone.svg +4 -0
- package/dist/assets/icons/scania/microphone_inactive.svg +7 -0
- package/dist/assets/icons/scania/notification_snooze.svg +6 -0
- package/dist/assets/icons/scania/paperclip.svg +3 -0
- package/dist/components.css +2036 -1807
- package/dist/global.css +3 -2
- package/dist/scania-variables.css +8 -0
- package/dist/tl-button.css +19 -0
- package/dist/tl-dropdown.css +36 -1
- package/dist/tl-folder-tabs.css +64 -0
- package/dist/tl-header.css +207 -51
- package/dist/tl-icon.css +16 -0
- package/dist/tl-inline-tabs.css +81 -0
- package/dist/tl-navigation-tabs.css +81 -0
- package/dist/tl-slider.css +1024 -1485
- package/dist/tl-text-field.css +32 -13
- package/package.json +3 -14
- package/.ai/rules/01-design-tokens.mdc +0 -318
- package/.ai/rules/02-components-forms.mdc +0 -396
- package/.ai/rules/03-components-display.mdc +0 -474
- package/.ai/rules/04-components-navigation.mdc +0 -358
- package/.ai/rules/05-guidelines.mdc +0 -144
- package/.ai/rules/06-patterns.mdc +0 -352
- package/.cursor/rules/tegel-lite/01-design-tokens.mdc +0 -317
- package/.cursor/rules/tegel-lite/02-components-forms.mdc +0 -395
- package/.cursor/rules/tegel-lite/03-components-display.mdc +0 -473
- package/.cursor/rules/tegel-lite/04-components-navigation.mdc +0 -357
- package/.cursor/rules/tegel-lite/05-guidelines.mdc +0 -143
- package/.cursor/rules/tegel-lite/06-patterns.mdc +0 -351
- package/.github/copilot-instructions.md +0 -2045
- package/AGENTS.md +0 -2045
- package/CLAUDE.md +0 -2045
- package/bin/setup-ai-rules.js +0 -368
- package/dist/tl-folder-tab.css +0 -87
- package/dist/tl-inline-tab.css +0 -80
- package/dist/tl-navigation-tab.css +0 -114
- package/dist/tl-textarea-mixins.css +0 -0
|
@@ -1,352 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Common page patterns and AI assistant prompt rules for code generation
|
|
3
|
-
alwaysApply: true
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Composed Page Patterns
|
|
7
|
-
|
|
8
|
-
## Login Page
|
|
9
|
-
|
|
10
|
-
```html
|
|
11
|
-
<body class="scania tds-mode-light">
|
|
12
|
-
<div
|
|
13
|
-
style="display: flex; align-items: center; justify-content: center; min-height: 100vh; background-color: var(--color-background-base);"
|
|
14
|
-
>
|
|
15
|
-
<div class="tl-card" style="width: 400px; max-width: 100%;">
|
|
16
|
-
<div class="tl-card__header">
|
|
17
|
-
<div class="tl-card__headings">
|
|
18
|
-
<span class="tl-card__title">Sign In</span>
|
|
19
|
-
<span class="tl-card__subtitle">Enter your credentials</span>
|
|
20
|
-
</div>
|
|
21
|
-
</div>
|
|
22
|
-
<div class="tl-card__body">
|
|
23
|
-
<div class="tl-card__content" style="max-inline-size: unset;">
|
|
24
|
-
<!-- Email field -->
|
|
25
|
-
<div
|
|
26
|
-
class="tl-text-field tl-text-field--lg"
|
|
27
|
-
style="margin-bottom: 16px;"
|
|
28
|
-
>
|
|
29
|
-
<label class="tl-text-field__label" for="login-email">Email</label>
|
|
30
|
-
<input
|
|
31
|
-
class="tl-text-field__input"
|
|
32
|
-
id="login-email"
|
|
33
|
-
type="email"
|
|
34
|
-
placeholder="user@scania.com"
|
|
35
|
-
/>
|
|
36
|
-
</div>
|
|
37
|
-
<!-- Password field -->
|
|
38
|
-
<div
|
|
39
|
-
class="tl-text-field tl-text-field--lg"
|
|
40
|
-
style="margin-bottom: 24px;"
|
|
41
|
-
>
|
|
42
|
-
<label class="tl-text-field__label" for="login-pass"
|
|
43
|
-
>Password</label
|
|
44
|
-
>
|
|
45
|
-
<input
|
|
46
|
-
class="tl-text-field__input"
|
|
47
|
-
id="login-pass"
|
|
48
|
-
type="password"
|
|
49
|
-
placeholder="Enter password"
|
|
50
|
-
/>
|
|
51
|
-
</div>
|
|
52
|
-
<button
|
|
53
|
-
class="tl-button tl-button--primary tl-button--md tl-button--full-width"
|
|
54
|
-
>
|
|
55
|
-
Sign In
|
|
56
|
-
</button>
|
|
57
|
-
</div>
|
|
58
|
-
</div>
|
|
59
|
-
</div>
|
|
60
|
-
</div>
|
|
61
|
-
</body>
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
---
|
|
65
|
-
|
|
66
|
-
## Dashboard Layout (Header + Sidebar + Content)
|
|
67
|
-
|
|
68
|
-
```html
|
|
69
|
-
<body class="scania tds-mode-light">
|
|
70
|
-
<!-- Header -->
|
|
71
|
-
<header class="tl-header">
|
|
72
|
-
<nav class="tl-header__nav">
|
|
73
|
-
<ul class="tl-header__list">
|
|
74
|
-
<li class="tl-header__item">
|
|
75
|
-
<a class="tl-header__item-wrapper" href="/"
|
|
76
|
-
><span class="tl-header__brand"></span
|
|
77
|
-
></a>
|
|
78
|
-
</li>
|
|
79
|
-
<li class="tl-header__item">
|
|
80
|
-
<div class="tl-header__title">
|
|
81
|
-
<span class="tl-header__title-text">Fleet Manager</span>
|
|
82
|
-
</div>
|
|
83
|
-
</li>
|
|
84
|
-
<li class="tl-header__middle-spacer"></li>
|
|
85
|
-
<li class="tl-header__item">
|
|
86
|
-
<button class="tl-header__item-wrapper" aria-label="Notifications">
|
|
87
|
-
<span class="tl-icon tl-icon--notification"></span>
|
|
88
|
-
</button>
|
|
89
|
-
</li>
|
|
90
|
-
</ul>
|
|
91
|
-
</nav>
|
|
92
|
-
</header>
|
|
93
|
-
|
|
94
|
-
<!-- Layout -->
|
|
95
|
-
<div style="display: flex; min-height: calc(100vh - 64px);">
|
|
96
|
-
<!-- Side Menu -->
|
|
97
|
-
<nav
|
|
98
|
-
class="tl-side-menu tl-side-menu--persistent"
|
|
99
|
-
aria-label="Main navigation"
|
|
100
|
-
style="position: static; height: auto;"
|
|
101
|
-
>
|
|
102
|
-
<div class="tl-side-menu__wrapper tl-side-menu__wrapper--open">
|
|
103
|
-
<aside class="tl-side-menu__aside">
|
|
104
|
-
<div class="tl-side-menu__navigation">
|
|
105
|
-
<div class="tl-side-menu__list-wrapper">
|
|
106
|
-
<ul class="tl-side-menu__upper-list">
|
|
107
|
-
<li>
|
|
108
|
-
<a
|
|
109
|
-
class="tl-side-menu__item tl-side-menu__item--selected"
|
|
110
|
-
href="/dashboard"
|
|
111
|
-
>
|
|
112
|
-
<span class="tl-icon tl-icon--dashboard"></span> Dashboard
|
|
113
|
-
</a>
|
|
114
|
-
</li>
|
|
115
|
-
<li>
|
|
116
|
-
<a class="tl-side-menu__item" href="/vehicles">
|
|
117
|
-
<span class="tl-icon tl-icon--truck"></span> Vehicles
|
|
118
|
-
</a>
|
|
119
|
-
</li>
|
|
120
|
-
</ul>
|
|
121
|
-
</div>
|
|
122
|
-
</div>
|
|
123
|
-
</aside>
|
|
124
|
-
</div>
|
|
125
|
-
</nav>
|
|
126
|
-
|
|
127
|
-
<!-- Main Content -->
|
|
128
|
-
<main
|
|
129
|
-
style="flex: 1; padding: var(--dimension-space-medium); background-color: var(--color-background-base);"
|
|
130
|
-
>
|
|
131
|
-
<!-- Cards grid -->
|
|
132
|
-
<div
|
|
133
|
-
style="display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-bottom: 24px;"
|
|
134
|
-
>
|
|
135
|
-
<div class="tl-card">
|
|
136
|
-
<div class="tl-card__header">
|
|
137
|
-
<div class="tl-card__headings">
|
|
138
|
-
<span class="tl-card__title">Total Vehicles</span>
|
|
139
|
-
</div>
|
|
140
|
-
</div>
|
|
141
|
-
<div class="tl-card__body">
|
|
142
|
-
<div
|
|
143
|
-
class="tl-card__content"
|
|
144
|
-
style="max-inline-size: unset; font-size: 32px; font-weight: 700;"
|
|
145
|
-
>
|
|
146
|
-
142
|
|
147
|
-
</div>
|
|
148
|
-
</div>
|
|
149
|
-
</div>
|
|
150
|
-
</div>
|
|
151
|
-
|
|
152
|
-
<!-- Table -->
|
|
153
|
-
<table class="tl-table tl-table--responsive">
|
|
154
|
-
<thead class="tl-table__header">
|
|
155
|
-
<tr class="tl-table__row">
|
|
156
|
-
<th class="tl-table__header-cell">Vehicle</th>
|
|
157
|
-
<th class="tl-table__header-cell">Status</th>
|
|
158
|
-
<th class="tl-table__header-cell">Location</th>
|
|
159
|
-
</tr>
|
|
160
|
-
</thead>
|
|
161
|
-
<tbody class="tl-table__body">
|
|
162
|
-
<tr class="tl-table__row">
|
|
163
|
-
<td class="tl-table__body-cell">SCN-2024-001</td>
|
|
164
|
-
<td class="tl-table__body-cell">Active</td>
|
|
165
|
-
<td class="tl-table__body-cell">Södertälje</td>
|
|
166
|
-
</tr>
|
|
167
|
-
</tbody>
|
|
168
|
-
</table>
|
|
169
|
-
</main>
|
|
170
|
-
</div>
|
|
171
|
-
</body>
|
|
172
|
-
```
|
|
173
|
-
|
|
174
|
-
---
|
|
175
|
-
|
|
176
|
-
## Form Page
|
|
177
|
-
|
|
178
|
-
```html
|
|
179
|
-
<main
|
|
180
|
-
style="max-width: 600px; margin: 0 auto; padding: var(--dimension-space-medium);"
|
|
181
|
-
>
|
|
182
|
-
<h2
|
|
183
|
-
style="font-family: var(--scania-font-family-default); font-weight: var(--scania-font-weight-bold); margin-bottom: 24px;"
|
|
184
|
-
>
|
|
185
|
-
New Vehicle Registration
|
|
186
|
-
</h2>
|
|
187
|
-
|
|
188
|
-
<form>
|
|
189
|
-
<div style="display: flex; flex-direction: column; gap: 16px;">
|
|
190
|
-
<div class="tl-text-field tl-text-field--lg">
|
|
191
|
-
<label class="tl-text-field__label" for="vin">VIN Number</label>
|
|
192
|
-
<input
|
|
193
|
-
class="tl-text-field__input"
|
|
194
|
-
id="vin"
|
|
195
|
-
type="text"
|
|
196
|
-
placeholder="Enter VIN"
|
|
197
|
-
/>
|
|
198
|
-
</div>
|
|
199
|
-
|
|
200
|
-
<div class="tl-dropdown tl-dropdown--lg">
|
|
201
|
-
<label class="tl-dropdown__label" for="type">Vehicle Type</label>
|
|
202
|
-
<select class="tl-dropdown__select" id="type">
|
|
203
|
-
<option value="">Select type</option>
|
|
204
|
-
<option value="truck">Truck</option>
|
|
205
|
-
<option value="bus">Bus</option>
|
|
206
|
-
</select>
|
|
207
|
-
</div>
|
|
208
|
-
|
|
209
|
-
<div class="tl-datetime">
|
|
210
|
-
<label class="tl-datetime__label" for="reg-date"
|
|
211
|
-
>Registration Date</label
|
|
212
|
-
>
|
|
213
|
-
<div class="tl-datetime__wrapper">
|
|
214
|
-
<input class="tl-datetime__input" id="reg-date" type="date" />
|
|
215
|
-
</div>
|
|
216
|
-
</div>
|
|
217
|
-
|
|
218
|
-
<div class="tl-textarea">
|
|
219
|
-
<label class="tl-textarea__label" for="notes">Notes</label>
|
|
220
|
-
<textarea
|
|
221
|
-
class="tl-textarea__input"
|
|
222
|
-
id="notes"
|
|
223
|
-
rows="4"
|
|
224
|
-
placeholder="Additional details..."
|
|
225
|
-
></textarea>
|
|
226
|
-
</div>
|
|
227
|
-
|
|
228
|
-
<label class="tl-checkbox">
|
|
229
|
-
<input class="tl-checkbox__input" type="checkbox" />
|
|
230
|
-
<span class="tl-checkbox__label"
|
|
231
|
-
>I confirm all information is correct</span
|
|
232
|
-
>
|
|
233
|
-
</label>
|
|
234
|
-
|
|
235
|
-
<div style="display: flex; gap: 16px; padding-top: 8px;">
|
|
236
|
-
<button
|
|
237
|
-
type="button"
|
|
238
|
-
class="tl-button tl-button--secondary tl-button--md"
|
|
239
|
-
>
|
|
240
|
-
Cancel
|
|
241
|
-
</button>
|
|
242
|
-
<button
|
|
243
|
-
type="submit"
|
|
244
|
-
class="tl-button tl-button--primary tl-button--md"
|
|
245
|
-
>
|
|
246
|
-
Register
|
|
247
|
-
</button>
|
|
248
|
-
</div>
|
|
249
|
-
</div>
|
|
250
|
-
</form>
|
|
251
|
-
</main>
|
|
252
|
-
```
|
|
253
|
-
|
|
254
|
-
---
|
|
255
|
-
|
|
256
|
-
# AI Assistant Prompt Rules
|
|
257
|
-
|
|
258
|
-
## CRITICAL: NO INLINE STYLES
|
|
259
|
-
|
|
260
|
-
**NEVER EVER use inline `style=""` attributes for design properties on ANY element, especially not on Tegel components.**
|
|
261
|
-
|
|
262
|
-
This includes:
|
|
263
|
-
|
|
264
|
-
- ❌ Colors: `style="color: ..."` or `style="background-color: ..."`
|
|
265
|
-
- ❌ Spacing: `style="padding: ..."` or `style="margin: ..."`
|
|
266
|
-
- ❌ Typography: `style="font-size: ..."` or `style="font-weight: ..."`
|
|
267
|
-
- ❌ Any design tokens: `style="background-color: var(--color-system-success-discrete);"`
|
|
268
|
-
|
|
269
|
-
**ALWAYS create CSS classes instead:**
|
|
270
|
-
|
|
271
|
-
- ✅ Define class in `<style>` section with Tegel tokens
|
|
272
|
-
- ✅ Use BEM naming: `.custom-component--variant`
|
|
273
|
-
- ✅ Mark with comment: `<!-- CUSTOM: Description -->`
|
|
274
|
-
|
|
275
|
-
**If a Tegel component doesn't have the variant you need (e.g., status badges), create a custom component with proper CSS classes, NOT inline styles.**
|
|
276
|
-
|
|
277
|
-
---
|
|
278
|
-
|
|
279
|
-
## Component Generation
|
|
280
|
-
|
|
281
|
-
1. When the user asks for a button, ALWAYS default to `tl-button tl-button--md` (variant is optional).
|
|
282
|
-
2. When the user asks for a button with icon:
|
|
283
|
-
- ALWAYS add `tl-button--icon` modifier
|
|
284
|
-
- ALWAYS put text BEFORE the icon
|
|
285
|
-
- ALWAYS add `aria-hidden="true"` to the icon
|
|
286
|
-
- Example: `<button class="tl-button tl-button--icon tl-button--md">Save<span class="tl-icon tl-icon--save" aria-hidden="true"></span></button>`
|
|
287
|
-
3. When the user asks for an icon-only button:
|
|
288
|
-
- ALWAYS add `tl-button--only-icon` modifier
|
|
289
|
-
- ALWAYS add `aria-label` attribute describing the action
|
|
290
|
-
- Example: `<button class="tl-button tl-button--only-icon tl-button--md" aria-label="Settings"><span class="tl-icon tl-icon--settings"></span></button>`
|
|
291
|
-
4. When the user asks for an input/text field, ALWAYS default to `tl-text-field tl-text-field--lg` with an external label.
|
|
292
|
-
5. When the user asks for a card, ALWAYS include `tl-card__header` and `tl-card__body` sections.
|
|
293
|
-
6. When the user asks for a table, ALWAYS include `tl-table__header` with `th.tl-table__header-cell` and `tl-table__body`.
|
|
294
|
-
|
|
295
|
-
## Code Quality
|
|
296
|
-
|
|
297
|
-
7. Generate ALWAYS complete, production-ready HTML – never pseudocode.
|
|
298
|
-
8. Generate ALWAYS all necessary wrapper elements (e.g., `tl-card__body` > `tl-card__content`).
|
|
299
|
-
9. Include ALWAYS relevant ARIA attributes for accessibility:
|
|
300
|
-
- Decorative icons in buttons with text: `aria-hidden="true"`
|
|
301
|
-
- Icon-only buttons: `aria-label="Action description"`
|
|
302
|
-
- Form labels: proper `for` and `id` attributes
|
|
303
|
-
10. Comment HTML with `<!-- -->` to explain structure sections.
|
|
304
|
-
11. Use ALWAYS the `scania tds-mode-light` classes on the `<body>` or root element.
|
|
305
|
-
|
|
306
|
-
## Token Usage
|
|
307
|
-
|
|
308
|
-
12. Use NEVER hardcoded color values – ALWAYS CSS custom properties.
|
|
309
|
-
13. Use NEVER hardcoded pixel spacing – prefer Tegel spacing tokens.
|
|
310
|
-
14. Use NEVER inline styles for any design properties (color, background, spacing, typography).
|
|
311
|
-
- ❌ `style="color: blue"` or `style="color: var(--color-foreground-text-accent-default)"`
|
|
312
|
-
- ✅ Create CSS class: `.custom-text { color: var(--color-foreground-text-accent-default); }`
|
|
313
|
-
15. Use NEVER `style="background: #f5f5f5"` – create a CSS class instead.
|
|
314
|
-
16. If a Tegel component lacks a needed variant, create a CUSTOM component with BEM classes, not inline styles.
|
|
315
|
-
|
|
316
|
-
## Custom Components
|
|
317
|
-
|
|
318
|
-
17. If the user requests a component that doesn't exist in Tegel Lite, build it using existing tokens and classes, and clearly mark it with a comment: `<!-- CUSTOM: Not a native Tegel Lite component -->`.
|
|
319
|
-
18. Custom components should follow the BEM naming convention: `.tl-custom-{name}__element--modifier`.
|
|
320
|
-
|
|
321
|
-
## File Structure
|
|
322
|
-
|
|
323
|
-
19. Always import CSS files in the correct order: variables → global → components.
|
|
324
|
-
20. Never modify the Tegel Lite source CSS files.
|
|
325
|
-
21. Place custom overrides in a separate stylesheet loaded AFTER the Tegel files.
|
|
326
|
-
|
|
327
|
-
## Dark Mode
|
|
328
|
-
|
|
329
|
-
22. To switch to dark mode, replace `tds-mode-light` with `tds-mode-dark` on the wrapper element.
|
|
330
|
-
23. All components automatically adapt – no additional work needed.
|
|
331
|
-
24. When showing dark mode examples, add `tds-mode-dark` to the root wrapper.
|
|
332
|
-
|
|
333
|
-
## Icon Usage
|
|
334
|
-
|
|
335
|
-
25. Icons use the pattern `tl-icon tl-icon--{name}` and optionally `tl-icon--{size}`.
|
|
336
|
-
26. Icons inherit color from parent. Use `color: var(--color-foreground-icon-strong)` on parent if needed.
|
|
337
|
-
27. Decorative icons in buttons with text MUST have `aria-hidden="true"`.
|
|
338
|
-
28. Icon-only interactive elements MUST have `aria-label` describing the action.
|
|
339
|
-
|
|
340
|
-
## Size Convention
|
|
341
|
-
|
|
342
|
-
29. Component sizes follow this convention (unless stated otherwise):
|
|
343
|
-
- `--xs` = 24px height (buttons only)
|
|
344
|
-
- `--sm` = 40px height
|
|
345
|
-
- `--md` = 48px height
|
|
346
|
-
- `--lg` = 56px height (default for inputs)
|
|
347
|
-
|
|
348
|
-
## Mode Variants
|
|
349
|
-
|
|
350
|
-
30. Components with `--primary` use `var(--color-background-layer-01)`.
|
|
351
|
-
31. Components with `--secondary` use `var(--color-background-layer-02)`.
|
|
352
|
-
32. Variant modifiers (primary, secondary, ghost, danger) are optional for buttons – use based on context.
|
|
@@ -1,317 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: 01-design-tokens
|
|
3
|
-
alwaysApply: true
|
|
4
|
-
---
|
|
5
|
-
# Design Tokens & Variables
|
|
6
|
-
|
|
7
|
-
## RULE: ALWAYS use design tokens instead of hardcoded values.
|
|
8
|
-
|
|
9
|
-
## Primitive Color Tokens (from scania-variables.css)
|
|
10
|
-
|
|
11
|
-
### Blue (Primary Brand)
|
|
12
|
-
|
|
13
|
-
| Token | Value |
|
|
14
|
-
| ------------------------- | --------- |
|
|
15
|
-
| `--scania-color-blue-50` | `#d8dde5` |
|
|
16
|
-
| `--scania-color-blue-100` | `#bacde8` |
|
|
17
|
-
| `--scania-color-blue-200` | `#87afe8` |
|
|
18
|
-
| `--scania-color-blue-300` | `#4a89f3` |
|
|
19
|
-
| `--scania-color-blue-400` | `#2a6ecf` |
|
|
20
|
-
| `--scania-color-blue-500` | `#2058a8` |
|
|
21
|
-
| `--scania-color-blue-600` | `#16417f` |
|
|
22
|
-
| `--scania-color-blue-700` | `#0f3263` |
|
|
23
|
-
| `--scania-color-blue-800` | `#041e42` |
|
|
24
|
-
| `--scania-color-blue-900` | `#001533` |
|
|
25
|
-
|
|
26
|
-
### Red (Secondary Brand / Danger)
|
|
27
|
-
|
|
28
|
-
| Token | Value |
|
|
29
|
-
| ------------------------ | --------- |
|
|
30
|
-
| `--scania-color-red-50` | `#ffdfe3` |
|
|
31
|
-
| `--scania-color-red-100` | `#ffb9b8` |
|
|
32
|
-
| `--scania-color-red-200` | `#fc8a88` |
|
|
33
|
-
| `--scania-color-red-300` | `#ea4851` |
|
|
34
|
-
| `--scania-color-red-400` | `#d1001b` |
|
|
35
|
-
| `--scania-color-red-500` | `#b20018` |
|
|
36
|
-
| `--scania-color-red-600` | `#8a0012` |
|
|
37
|
-
| `--scania-color-red-700` | `#6c0011` |
|
|
38
|
-
| `--scania-color-red-800` | `#480008` |
|
|
39
|
-
| `--scania-color-red-900` | `#350004` |
|
|
40
|
-
|
|
41
|
-
### Green (Success)
|
|
42
|
-
|
|
43
|
-
| Token | Value |
|
|
44
|
-
| -------------------------- | --------- |
|
|
45
|
-
| `--scania-color-green-50` | `#d3eee7` |
|
|
46
|
-
| `--scania-color-green-100` | `#9bd9c2` |
|
|
47
|
-
| `--scania-color-green-200` | `#65bda5` |
|
|
48
|
-
| `--scania-color-green-300` | `#009e7e` |
|
|
49
|
-
| `--scania-color-green-400` | `#008064` |
|
|
50
|
-
| `--scania-color-green-500` | `#00664f` |
|
|
51
|
-
| `--scania-color-green-600` | `#004c3b` |
|
|
52
|
-
| `--scania-color-green-700` | `#0a382e` |
|
|
53
|
-
| `--scania-color-green-800` | `#00251b` |
|
|
54
|
-
| `--scania-color-green-900` | `#001a12` |
|
|
55
|
-
|
|
56
|
-
### Yellow (Warning)
|
|
57
|
-
|
|
58
|
-
| Token | Value |
|
|
59
|
-
| --------------------------- | --------- |
|
|
60
|
-
| `--scania-color-yellow-50` | `#f9eec3` |
|
|
61
|
-
| `--scania-color-yellow-100` | `#f8e596` |
|
|
62
|
-
| `--scania-color-yellow-200` | `#f4d65d` |
|
|
63
|
-
| `--scania-color-yellow-300` | `#f1c21b` |
|
|
64
|
-
| `--scania-color-yellow-400` | `#eaad06` |
|
|
65
|
-
| `--scania-color-yellow-500` | `#b87c14` |
|
|
66
|
-
| `--scania-color-yellow-600` | `#975717` |
|
|
67
|
-
| `--scania-color-yellow-700` | `#6b3b10` |
|
|
68
|
-
| `--scania-color-yellow-800` | `#4d260a` |
|
|
69
|
-
| `--scania-color-yellow-900` | `#361b07` |
|
|
70
|
-
|
|
71
|
-
### Grey (Neutral)
|
|
72
|
-
|
|
73
|
-
| Token | Value |
|
|
74
|
-
| -------------------------- | --------- |
|
|
75
|
-
| `--scania-color-grey-00` | `#fff` |
|
|
76
|
-
| `--scania-color-grey-50` | `#f6f7f9` |
|
|
77
|
-
| `--scania-color-grey-100` | `#edeff3` |
|
|
78
|
-
| `--scania-color-grey-150` | `#e0e5eb` |
|
|
79
|
-
| `--scania-color-grey-200` | `#d1d7e0` |
|
|
80
|
-
| `--scania-color-grey-250` | `#b4becd` |
|
|
81
|
-
| `--scania-color-grey-300` | `#93a2b7` |
|
|
82
|
-
| `--scania-color-grey-350` | `#7e90a9` |
|
|
83
|
-
| `--scania-color-grey-400` | `#6e829f` |
|
|
84
|
-
| `--scania-color-grey-500` | `#5f728c` |
|
|
85
|
-
| `--scania-color-grey-600` | `#4e5e75` |
|
|
86
|
-
| `--scania-color-grey-700` | `#3a4554` |
|
|
87
|
-
| `--scania-color-grey-800` | `#242c37` |
|
|
88
|
-
| `--scania-color-grey-850` | `#1c222b` |
|
|
89
|
-
| `--scania-color-grey-900` | `#15181d` |
|
|
90
|
-
| `--scania-color-grey-950` | `#0e1013` |
|
|
91
|
-
| `--scania-color-grey-1000` | `#000` |
|
|
92
|
-
|
|
93
|
-
## Semantic Color Tokens (Light Mode)
|
|
94
|
-
|
|
95
|
-
Use these instead of primitive colors in layouts:
|
|
96
|
-
|
|
97
|
-
### Backgrounds
|
|
98
|
-
|
|
99
|
-
| Token | Usage |
|
|
100
|
-
| -------------------------------------------------------------------------- | ------------------------------------- |
|
|
101
|
-
| `--color-background-base` | Page/app base background |
|
|
102
|
-
| `--color-background-layer-01` | Primary card/section background |
|
|
103
|
-
| `--color-background-layer-02` | Secondary/nested background |
|
|
104
|
-
| `--color-background-layer-03` | Third-level nested background |
|
|
105
|
-
| `--color-background-overlay` | Modal/drawer backdrop |
|
|
106
|
-
| `--color-background-top` | Top-level surface |
|
|
107
|
-
| `--color-background-accent-primary-default` | Primary button background |
|
|
108
|
-
| `--color-background-accent-primary-hover` | Primary button hover |
|
|
109
|
-
| `--color-background-accent-primary-pressed` | Primary button pressed |
|
|
110
|
-
| `--color-background-accent-primary-disabled` | Disabled button background |
|
|
111
|
-
| `--color-background-accent-danger-default` | Danger action background |
|
|
112
|
-
| `--color-background-surface-100` through `--color-background-surface-1000` | Surface levels for subtle backgrounds |
|
|
113
|
-
|
|
114
|
-
### Text (Foreground)
|
|
115
|
-
|
|
116
|
-
| Token | Usage |
|
|
117
|
-
| ---------------------------------------- | ---------------------- |
|
|
118
|
-
| `--color-foreground-text-strong` | Primary text, headings |
|
|
119
|
-
| `--color-foreground-text-defined` | Secondary text, labels |
|
|
120
|
-
| `--color-foreground-text-soft` | Tertiary text |
|
|
121
|
-
| `--color-foreground-text-subtle` | Placeholder, hint text |
|
|
122
|
-
| `--color-foreground-text-disabled` | Disabled text |
|
|
123
|
-
| `--color-foreground-text-accent-default` | Link text |
|
|
124
|
-
| `--color-foreground-text-accent-visited` | Visited link |
|
|
125
|
-
| `--color-foreground-text-brand` | Brand-colored text |
|
|
126
|
-
|
|
127
|
-
### Borders
|
|
128
|
-
|
|
129
|
-
| Token | Usage |
|
|
130
|
-
| ---------------------------------------- | ---------------------- |
|
|
131
|
-
| `--color-foreground-border-strong` | Strong visible borders |
|
|
132
|
-
| `--color-foreground-border-soft` | Default input borders |
|
|
133
|
-
| `--color-foreground-border-subtle` | Hover borders |
|
|
134
|
-
| `--color-foreground-border-discrete` | Divider lines |
|
|
135
|
-
| `--color-foreground-border-accent-focus` | Focus ring color |
|
|
136
|
-
| `--color-foreground-border-disabled` | Disabled borders |
|
|
137
|
-
|
|
138
|
-
### Icons
|
|
139
|
-
|
|
140
|
-
| Token | Usage |
|
|
141
|
-
| ---------------------------------- | --------------- |
|
|
142
|
-
| `--color-foreground-icon-strong` | Primary icons |
|
|
143
|
-
| `--color-foreground-icon-defined` | Secondary icons |
|
|
144
|
-
| `--color-foreground-icon-soft` | Tertiary icons |
|
|
145
|
-
| `--color-foreground-icon-subtle` | Faint icons |
|
|
146
|
-
| `--color-foreground-icon-disabled` | Disabled icons |
|
|
147
|
-
|
|
148
|
-
### System / Status Colors
|
|
149
|
-
|
|
150
|
-
| Token | Usage |
|
|
151
|
-
| --------------------------------- | ------------------------- |
|
|
152
|
-
| `--color-system-success-default` | Success states (green) |
|
|
153
|
-
| `--color-system-success-discrete` | Success background tint |
|
|
154
|
-
| `--color-system-warning-default` | Warning states (yellow) |
|
|
155
|
-
| `--color-system-warning-discrete` | Warning background tint |
|
|
156
|
-
| `--color-system-danger-default` | Error/danger states (red) |
|
|
157
|
-
| `--color-system-danger-discrete` | Error background tint |
|
|
158
|
-
| `--color-system-info-default` | Info states (blue) |
|
|
159
|
-
| `--color-system-info-discrete` | Info background tint |
|
|
160
|
-
|
|
161
|
-
## Spacing Units
|
|
162
|
-
|
|
163
|
-
| Token | Value |
|
|
164
|
-
| ------------------- | ------- |
|
|
165
|
-
| `--scania-unit-0` | `0` |
|
|
166
|
-
| `--scania-unit-1` | `1px` |
|
|
167
|
-
| `--scania-unit-2` | `2px` |
|
|
168
|
-
| `--scania-unit-4` | `4px` |
|
|
169
|
-
| `--scania-unit-8` | `8px` |
|
|
170
|
-
| `--scania-unit-12` | `12px` |
|
|
171
|
-
| `--scania-unit-16` | `16px` |
|
|
172
|
-
| `--scania-unit-20` | `20px` |
|
|
173
|
-
| `--scania-unit-24` | `24px` |
|
|
174
|
-
| `--scania-unit-32` | `32px` |
|
|
175
|
-
| `--scania-unit-40` | `40px` |
|
|
176
|
-
| `--scania-unit-48` | `48px` |
|
|
177
|
-
| `--scania-unit-56` | `56px` |
|
|
178
|
-
| `--scania-unit-64` | `64px` |
|
|
179
|
-
| `--scania-unit-80` | `80px` |
|
|
180
|
-
| `--scania-unit-96` | `96px` |
|
|
181
|
-
| `--scania-unit-120` | `120px` |
|
|
182
|
-
|
|
183
|
-
## Dimension/Spacing Semantic Tokens
|
|
184
|
-
|
|
185
|
-
| Token | Value | Usage |
|
|
186
|
-
| -------------------------- | ------ | ----------------------- |
|
|
187
|
-
| `--dimension-space-tiny` | `4px` | Micro spacing |
|
|
188
|
-
| `--dimension-space-small` | `16px` | Default element spacing |
|
|
189
|
-
| `--dimension-space-medium` | `24px` | Section padding |
|
|
190
|
-
| `--dimension-space-large` | `48px` | Large gaps |
|
|
191
|
-
| `--dimension-space-huge` | `80px` | Hero sections |
|
|
192
|
-
|
|
193
|
-
## Border Radius Tokens
|
|
194
|
-
|
|
195
|
-
| Token | Value | Usage |
|
|
196
|
-
| ------------------------------------------ | -------- | -------------------------- |
|
|
197
|
-
| `--dimension-radius-narrow` | `4px` | Buttons, inputs, cards |
|
|
198
|
-
| `--dimension-radius-soft` | `8px` | Larger containers |
|
|
199
|
-
| `--dimension-radius-rounded` | `32px` | Chips, pills |
|
|
200
|
-
| `--dimension-radius-circle` | `9999px` | Avatars, circular elements |
|
|
201
|
-
| `--dimension-radius-for-surface-clickable` | `4px` | Clickable elements |
|
|
202
|
-
| `--dimension-radius-for-surface-field` | `4px` | Form fields |
|
|
203
|
-
|
|
204
|
-
## Font Families
|
|
205
|
-
|
|
206
|
-
| Token | Value | Usage |
|
|
207
|
-
| ------------------------------------- | ---------------------------- | ----------------------- |
|
|
208
|
-
| `--scania-font-family-display` | `scania sans headline` | Display/headline text |
|
|
209
|
-
| `--scania-font-family-default` | `scania sans` | Body/default text |
|
|
210
|
-
| `--scania-font-family-semi-condensed` | `scania sans semi condensed` | Side menu, compact text |
|
|
211
|
-
|
|
212
|
-
## Font Weights
|
|
213
|
-
|
|
214
|
-
| Token | Value |
|
|
215
|
-
| ------------------------------ | ----- |
|
|
216
|
-
| `--scania-font-weight-regular` | `400` |
|
|
217
|
-
| `--scania-font-weight-bold` | `700` |
|
|
218
|
-
|
|
219
|
-
## Motion/Animation Tokens
|
|
220
|
-
|
|
221
|
-
| Token | Value | Usage |
|
|
222
|
-
| ----------------------------------- | -------------------------------- | -------------------- |
|
|
223
|
-
| `--tds-motion-duration-fast-01` | `100ms` | Micro-interactions |
|
|
224
|
-
| `--tds-motion-duration-fast-02` | `150ms` | Quick transitions |
|
|
225
|
-
| `--tds-motion-duration-moderate-01` | `200ms` | Standard transitions |
|
|
226
|
-
| `--tds-motion-duration-moderate-02` | `300ms` | Moderate animations |
|
|
227
|
-
| `--tds-motion-duration-slow-01` | `400ms` | Complex animations |
|
|
228
|
-
| `--tds-motion-duration-slow-02` | `500ms` | Full animations |
|
|
229
|
-
| `--tds-motion-easing-scania` | `cubic-bezier(0.4, 0, 0, 1)` | Default easing |
|
|
230
|
-
| `--tds-motion-easing-enter` | `cubic-bezier(0.1, 0.9, 0.2, 1)` | Enter transitions |
|
|
231
|
-
| `--tds-motion-easing-exit` | `cubic-bezier(0.7, 0, 1, 0.5)` | Exit transitions |
|
|
232
|
-
|
|
233
|
-
---
|
|
234
|
-
|
|
235
|
-
# Typography
|
|
236
|
-
|
|
237
|
-
## Typography Scale (defined in scania-variables.css under `.scania`)
|
|
238
|
-
|
|
239
|
-
### Display (Hero/Marketing)
|
|
240
|
-
|
|
241
|
-
- **Display 01**: 216px / 183px LH / uppercase / Scania Sans Headline Bold
|
|
242
|
-
- **Display 02**: 156px / 148px LH / uppercase / Scania Sans Headline Bold
|
|
243
|
-
- **Display 03**: 112px / 106px LH / uppercase / Scania Sans Headline Bold
|
|
244
|
-
- **Display 04**: 80px / 80px LH / uppercase / Scania Sans Headline Bold
|
|
245
|
-
- **Display 05**: 56px / 56px LH / uppercase / Scania Sans Headline Bold
|
|
246
|
-
|
|
247
|
-
### Headlines
|
|
248
|
-
|
|
249
|
-
- **Headline 01**: 40px / 40px LH / uppercase / Scania Sans Headline Bold
|
|
250
|
-
- **Headline 02**: 32px / 32px LH / Scania Sans Bold / ls: -1.28px
|
|
251
|
-
- **Headline 03**: 24px / 24px LH / Scania Sans Bold / ls: -0.72px
|
|
252
|
-
- **Headline 04**: 20px / 24px LH / Scania Sans Bold / ls: -0.4px
|
|
253
|
-
- **Headline 05**: 16px / 24px LH / Scania Sans Bold / ls: -0.32px
|
|
254
|
-
- **Headline 06**: 14px / 16px LH / uppercase / Scania Sans Bold / ls: -0.28px
|
|
255
|
-
|
|
256
|
-
### Paragraphs / Body
|
|
257
|
-
|
|
258
|
-
- **Paragraph 01**: 24px / 32px LH / Scania Sans Regular / ls: -0.72px
|
|
259
|
-
- **Paragraph 02**: 20px / 24px LH / Scania Sans Regular / ls: -0.2px
|
|
260
|
-
- **Body 01**: 16px / 24px LH / Scania Sans Regular / ls: -0.32px
|
|
261
|
-
- **Body 02**: 14px / 20px LH / Scania Sans Regular / ls: -0.14px
|
|
262
|
-
|
|
263
|
-
### Component Text
|
|
264
|
-
|
|
265
|
-
- **Component Text 01**: 14px / 16px LH / ls: -0.14px
|
|
266
|
-
- **Component Text 02**: 14px / 20px LH / ls: -0.14px
|
|
267
|
-
- **Component Label 01**: 12px / 16px LH / ls: 0
|
|
268
|
-
- **Component Label 02**: 10px / 8px LH / ls: 0
|
|
269
|
-
- **Component Title 01**: 14px / 16px LH / ls: -0.14px
|
|
270
|
-
- **Component Title 02**: 10px / 16px LH / uppercase / ls: 0.8px
|
|
271
|
-
|
|
272
|
-
### Links
|
|
273
|
-
|
|
274
|
-
- **Link 01**: 16px / 24px LH / ls: -0.32px
|
|
275
|
-
- **Link 02**: 14px / 20px LH / ls: -0.14px
|
|
276
|
-
|
|
277
|
-
## Typography Usage in Components
|
|
278
|
-
|
|
279
|
-
Components use internal typography tokens like `--detail-02-*`, `--headline-07-*`, `--body-01-*` etc. These are automatically applied. Do NOT manually set font properties on Tegel components.
|
|
280
|
-
|
|
281
|
-
---
|
|
282
|
-
|
|
283
|
-
# Layout & Grid
|
|
284
|
-
|
|
285
|
-
Tegel Lite does not include a CSS grid utility system. Use standard CSS Grid/Flexbox with Tegel tokens:
|
|
286
|
-
|
|
287
|
-
```html
|
|
288
|
-
<div
|
|
289
|
-
class="scania tds-mode-light"
|
|
290
|
-
style="
|
|
291
|
-
display: grid;
|
|
292
|
-
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
|
|
293
|
-
gap: var(--dimension-space-small);
|
|
294
|
-
padding: var(--dimension-space-medium);
|
|
295
|
-
"
|
|
296
|
-
>
|
|
297
|
-
<!-- Grid items -->
|
|
298
|
-
</div>
|
|
299
|
-
```
|
|
300
|
-
|
|
301
|
-
## Layout Components
|
|
302
|
-
|
|
303
|
-
- **Header** (`.tl-header`) – Full-width app bar, fixed at top
|
|
304
|
-
- **Side Menu** (`.tl-side-menu`) – Navigation sidebar, collapsible
|
|
305
|
-
- **Footer** (`.tl-footer`) – Multi-section page footer
|
|
306
|
-
|
|
307
|
-
## Breakpoints (used in components)
|
|
308
|
-
|
|
309
|
-
| Breakpoint | Value | Usage |
|
|
310
|
-
| ---------- | -------- | ------------- |
|
|
311
|
-
| xs | `320px` | Mobile |
|
|
312
|
-
| sm | `384px` | Small mobile |
|
|
313
|
-
| md | `672px` | Tablet |
|
|
314
|
-
| lg | `992px` | Desktop |
|
|
315
|
-
| xl | `1056px` | Large desktop |
|
|
316
|
-
| xxl | `1312px` | Wide desktop |
|
|
317
|
-
| xxxl | `1584px` | Ultra-wide |
|