@scania/tegel-lite 0.0.3-rules-beta.9 → 0.1.0-beta.5

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 (58) hide show
  1. package/README.md +0 -29
  2. package/dist/assets/icons/scania/configurator.svg +1 -0
  3. package/dist/assets/icons/scania/microphone.svg +4 -0
  4. package/dist/assets/icons/scania/microphone_inactive.svg +7 -0
  5. package/dist/assets/icons/scania/notification_snooze.svg +6 -0
  6. package/dist/assets/icons/scania/paperclip.svg +3 -0
  7. package/dist/components.css +2443 -2023
  8. package/dist/global.css +3128 -4749
  9. package/dist/scania-variables.css +16 -4
  10. package/dist/tl-accordion.css +8 -8
  11. package/dist/tl-badge.css +15 -0
  12. package/dist/tl-banner.css +2 -2
  13. package/dist/tl-button.css +20 -0
  14. package/dist/tl-card.css +16 -6
  15. package/dist/tl-checkbox-vars.css +1 -1
  16. package/dist/tl-checkbox.css +1 -1
  17. package/dist/tl-chip.css +6 -6
  18. package/dist/tl-datetime.css +7 -4
  19. package/dist/tl-dropdown.css +55 -3
  20. package/dist/tl-folder-tabs.css +64 -0
  21. package/dist/tl-footer.css +64 -0
  22. package/dist/tl-header.css +214 -60
  23. package/dist/tl-icon.css +18 -2
  24. package/dist/tl-inline-tabs.css +81 -0
  25. package/dist/tl-modal.css +35 -0
  26. package/dist/tl-navigation-tabs.css +81 -0
  27. package/dist/tl-radio-button.css +1 -1
  28. package/dist/tl-side-menu.css +74 -0
  29. package/dist/tl-slider.css +565 -1016
  30. package/dist/tl-spinner.css +8 -0
  31. package/dist/tl-step.css +8 -0
  32. package/dist/tl-stepper.css +8 -0
  33. package/dist/tl-table.css +18 -21
  34. package/dist/tl-text-field.css +34 -63
  35. package/dist/tl-toggle.css +1 -1
  36. package/dist/traton-variables.css +4 -2
  37. package/package.json +4 -15
  38. package/.ai/rules/01-design-tokens.mdc +0 -318
  39. package/.ai/rules/02-components-forms.mdc +0 -396
  40. package/.ai/rules/03-components-display.mdc +0 -474
  41. package/.ai/rules/04-components-navigation.mdc +0 -358
  42. package/.ai/rules/05-guidelines.mdc +0 -144
  43. package/.ai/rules/06-patterns.mdc +0 -352
  44. package/.cursor/rules/tegel-lite/01-design-tokens.mdc +0 -317
  45. package/.cursor/rules/tegel-lite/02-components-forms.mdc +0 -395
  46. package/.cursor/rules/tegel-lite/03-components-display.mdc +0 -473
  47. package/.cursor/rules/tegel-lite/04-components-navigation.mdc +0 -357
  48. package/.cursor/rules/tegel-lite/05-guidelines.mdc +0 -143
  49. package/.cursor/rules/tegel-lite/06-patterns.mdc +0 -351
  50. package/.github/copilot-instructions.md +0 -2045
  51. package/AGENTS.md +0 -2045
  52. package/CLAUDE.md +0 -2045
  53. package/bin/setup-ai-rules.js +0 -368
  54. package/dist/tl-folder-tab.css +0 -87
  55. package/dist/tl-inline-tab.css +0 -80
  56. package/dist/tl-navigation-tab.css +0 -114
  57. package/dist/tl-textarea-mixins.css +0 -0
  58. /package/dist/assets/icons/scania/{gift inactive.svg → gift_inactive.svg} +0 -0
@@ -1,3 +1,11 @@
1
+ /**
2
+ * Do not edit directly, this file was auto-generated.
3
+ */
4
+ .tl-spinner,
5
+ tds-spinner {
6
+ --component-spinner-color: var(--color-system-info-default);
7
+ }
8
+
1
9
  /* Component variables */
2
10
  .tl-spinner {
3
11
  --tl-spinner-background: var(--component-spinner-color);
package/dist/tl-step.css CHANGED
@@ -1,4 +1,12 @@
1
1
  /* Typography Usage mixins */
2
+ /**
3
+ * Do not edit directly, this file was auto-generated.
4
+ */
5
+ .tl-stepper,
6
+ tds-stepper {
7
+ --component-stepper-success: var(--color-system-success-default);
8
+ }
9
+
2
10
  .tl-stepper {
3
11
  --stepper-current-number-with-border: var(--color-foreground-border-strong);
4
12
  --stepper-icon-step-border-warning: var(--color-system-danger-default);
@@ -1,3 +1,11 @@
1
+ /**
2
+ * Do not edit directly, this file was auto-generated.
3
+ */
4
+ .tl-stepper,
5
+ tds-stepper {
6
+ --component-stepper-success: var(--color-system-success-default);
7
+ }
8
+
1
9
  .tl-stepper {
2
10
  --stepper-current-number-with-border: var(--color-foreground-border-strong);
3
11
  --stepper-icon-step-border-warning: var(--color-system-danger-default);
package/dist/tl-table.css CHANGED
@@ -11,6 +11,23 @@ body {
11
11
  scrollbar-width: thin;
12
12
  }
13
13
 
14
+ /**
15
+ * Do not edit directly, this file was auto-generated.
16
+ */
17
+ .tl-table,
18
+ tds-table {
19
+ --component-table-secondary-cell: var(--color-background-layer-02);
20
+ --component-table-pagination-dropdown: var(--color-background-layer-01);
21
+ --component-table-pagination-base: var(--color-background-surface-200);
22
+ --component-table-cell-hover: var(--color-background-surface-100);
23
+ --component-table-cell: var(--color-background-layer-01);
24
+ }
25
+
26
+ .traton .tl-table,
27
+ .traton tds-table {
28
+ --component-table-pagination-base: var(--color-background-surface-300);
29
+ }
30
+
14
31
  .tl-table {
15
32
  /* Table-text */
16
33
  --table-text: var(--color-foreground-text-strong);
@@ -67,7 +84,7 @@ body {
67
84
  --table-zebra-mode: var(--component-table-cell);
68
85
  }
69
86
 
70
- .tds-mode-dark .tl-table.tl-table--secondary {
87
+ .tl-mode-dark .tl-table.tl-table--secondary {
71
88
  --table-body-cell-hover: var(--color-background-surface-300);
72
89
  --table-body-row-hover: var(--color-background-surface-300);
73
90
  }
@@ -129,26 +146,6 @@ body {
129
146
  font-family: var(--detail-02-font-family);
130
147
  }
131
148
 
132
- .tl-table__rows-per-page-select {
133
- background-color: var(--table-footer-page-selector-input);
134
- color: var(--table-text);
135
- height: 30px;
136
- border: none;
137
- border-radius: var(--tds-spacing-element-4);
138
- padding: 0 var(--tds-spacing-element-8);
139
- transition: background-color 250ms ease;
140
- font-family: var(--detail-02-font-family);
141
- }
142
- .tl-table__rows-per-page-select:hover {
143
- background-color: var(--table-footer-page-selector-input-hover);
144
- }
145
- .tl-table__rows-per-page-select:disabled {
146
- color: var(--table-footer-page-selector-input-color-disabled);
147
- }
148
- .tl-table--compact .tl-table__rows-per-page-select {
149
- height: var(--tds-spacing-element-24);
150
- }
151
-
152
149
  .tl-table__page-selector-input {
153
150
  background-color: var(--table-footer-page-selector-input);
154
151
  border-radius: var(--tds-spacing-element-4);
@@ -524,8 +524,8 @@
524
524
  mask-image: var(--icon-gift-svg);
525
525
  background-color: currentcolor;
526
526
  }
527
- .tl-icon--gift inactive {
528
- mask-image: var(--icon-gift inactive-svg);
527
+ .tl-icon--gift_inactive {
528
+ mask-image: var(--icon-gift_inactive-svg);
529
529
  background-color: currentcolor;
530
530
  }
531
531
  .tl-icon--global {
@@ -696,6 +696,14 @@
696
696
  mask-image: var(--icon-message_inactive-svg);
697
697
  background-color: currentcolor;
698
698
  }
699
+ .tl-icon--microphone {
700
+ mask-image: var(--icon-microphone-svg);
701
+ background-color: currentcolor;
702
+ }
703
+ .tl-icon--microphone_inactive {
704
+ mask-image: var(--icon-microphone_inactive-svg);
705
+ background-color: currentcolor;
706
+ }
699
707
  .tl-icon--mileage {
700
708
  mask-image: var(--icon-mileage-svg);
701
709
  background-color: currentcolor;
@@ -728,6 +736,10 @@
728
736
  mask-image: var(--icon-notification_inactive-svg);
729
737
  background-color: currentcolor;
730
738
  }
739
+ .tl-icon--notification_snooze {
740
+ mask-image: var(--icon-notification_snooze-svg);
741
+ background-color: currentcolor;
742
+ }
731
743
  .tl-icon--oil_level {
732
744
  mask-image: var(--icon-oil_level-svg);
733
745
  background-color: currentcolor;
@@ -736,6 +748,10 @@
736
748
  mask-image: var(--icon-oil_level_inactive-svg);
737
749
  background-color: currentcolor;
738
750
  }
751
+ .tl-icon--paperclip {
752
+ mask-image: var(--icon-paperclip-svg);
753
+ background-color: currentcolor;
754
+ }
739
755
  .tl-icon--pause {
740
756
  mask-image: var(--icon-pause-svg);
741
757
  background-color: currentcolor;
@@ -1246,24 +1262,26 @@
1246
1262
  position: relative;
1247
1263
  width: 100%;
1248
1264
  min-width: 208px;
1249
- height: 56px;
1250
- padding-bottom: 1px;
1251
1265
  border-radius: var(--text-field-border-radius);
1252
1266
  box-sizing: border-box;
1253
1267
  }
1254
1268
  .tl-text-field--no-min-width {
1255
1269
  min-width: auto;
1256
1270
  }
1257
- .tl-text-field--lg {
1258
- height: 56px;
1271
+ .tl-text-field:has(.tl-text-field__input:disabled) {
1272
+ cursor: not-allowed;
1259
1273
  }
1260
- .tl-text-field--md {
1261
- height: 48px;
1274
+ .tl-text-field .tl-icon {
1275
+ background-color: var(--text-field-affix);
1262
1276
  }
1263
- .tl-text-field--sm {
1264
- height: 40px;
1277
+ :has(.tl-text-field__input:disabled) .tl-text-field .tl-icon {
1278
+ background-color: var(--text-field-affix-disabled);
1265
1279
  }
1266
- .tl-text-field:has(.tl-text-field__input[readonly]):not(:has(.tl-text-field__input:disabled)):not(.tl-text-field--hide-readonly-icon)::before {
1280
+
1281
+ .tl-text-field__input-wrapper {
1282
+ position: relative;
1283
+ }
1284
+ .tl-text-field:has(.tl-text-field__input[readonly]):not(:has(.tl-text-field__input:disabled)):not(.tl-text-field--hide-readonly-icon) .tl-text-field__input-wrapper::before {
1267
1285
  content: "";
1268
1286
  position: absolute;
1269
1287
  top: 50%;
@@ -1278,18 +1296,6 @@
1278
1296
  transform: translateY(-50%);
1279
1297
  z-index: 1;
1280
1298
  }
1281
- .tl-text-field:not(.tl-text-field--label-inside):has(.tl-text-field__label):has(.tl-text-field__input[readonly]):not(:has(.tl-text-field__input:disabled)):not(.tl-text-field--hide-readonly-icon)::before {
1282
- top: calc(50% + 24px);
1283
- }
1284
- .tl-text-field:has(.tl-text-field__input:disabled) {
1285
- cursor: not-allowed;
1286
- }
1287
- .tl-text-field .tl-icon {
1288
- background-color: var(--text-field-affix);
1289
- }
1290
- :has(.tl-text-field__input:disabled) .tl-text-field .tl-icon {
1291
- background-color: var(--text-field-affix-disabled);
1292
- }
1293
1299
 
1294
1300
  .tl-text-field__input {
1295
1301
  all: unset;
@@ -1373,12 +1379,15 @@
1373
1379
  }
1374
1380
  .tl-text-field--lg .tl-text-field__input {
1375
1381
  padding: var(--tds-spacing-element-20) var(--tds-spacing-element-16);
1382
+ height: 56px;
1376
1383
  }
1377
1384
  .tl-text-field--md .tl-text-field__input {
1378
1385
  padding: var(--tds-spacing-element-16);
1386
+ height: 48px;
1379
1387
  }
1380
1388
  .tl-text-field--sm .tl-text-field__input {
1381
1389
  padding: var(--tds-spacing-element-12) var(--tds-spacing-element-16);
1390
+ height: 40px;
1382
1391
  }
1383
1392
  .tl-text-field--label-inside.tl-text-field--lg .tl-text-field__input {
1384
1393
  padding-top: var(--tds-spacing-element-24);
@@ -1563,12 +1572,9 @@
1563
1572
  position: absolute;
1564
1573
  left: 16px;
1565
1574
  top: 50%;
1566
- transform: translateY(calc(-50% - 1px));
1575
+ transform: translateY(-50%);
1567
1576
  z-index: 1;
1568
1577
  }
1569
- .tl-text-field:has(.tl-text-field__label):not(.tl-text-field--label-inside) .tl-text-field__prefix--text, .tl-text-field:has(.tl-text-field__label):not(.tl-text-field--label-inside) .tl-text-field__prefix--icon {
1570
- transform: translateY(calc(-50% + 24px));
1571
- }
1572
1578
  :has(.tl-text-field__input:disabled) .tl-text-field__prefix--text, :has(.tl-text-field__input:disabled) .tl-text-field__prefix--icon {
1573
1579
  color: var(--text-field-affix-disabled);
1574
1580
  }
@@ -1600,12 +1606,9 @@
1600
1606
  position: absolute;
1601
1607
  right: 16px;
1602
1608
  top: 50%;
1603
- transform: translateY(calc(-50% - 1px));
1609
+ transform: translateY(-50%);
1604
1610
  z-index: 1;
1605
1611
  }
1606
- .tl-text-field:has(.tl-text-field__label):not(.tl-text-field--label-inside) .tl-text-field__suffix--text, .tl-text-field:has(.tl-text-field__label):not(.tl-text-field--label-inside) .tl-text-field__suffix--icon {
1607
- transform: translateY(calc(-50% + 24px));
1608
- }
1609
1612
  :has(.tl-text-field__input:disabled) .tl-text-field__suffix--text, :has(.tl-text-field__input:disabled) .tl-text-field__suffix--icon {
1610
1613
  color: var(--text-field-affix-disabled);
1611
1614
  }
@@ -1617,38 +1620,6 @@
1617
1620
  :has(.tl-text-field__input:disabled) .tl-text-field__suffix--icon > .tl-icon {
1618
1621
  background-color: var(--text-field-affix-disabled) !important;
1619
1622
  }
1620
-
1621
- .tl-text-field__suffix {
1622
- font-family: var(--detail-02-font-family);
1623
- font-size: var(--detail-02-font-size);
1624
- line-height: var(--detail-02-line-height);
1625
- font-weight: var(--detail-02-font-weight);
1626
- letter-spacing: var(--detail-02-letter-spacing);
1627
- text-transform: var(--detail-02-text-transform);
1628
- color: var(--text-field-affix);
1629
- align-self: center;
1630
- display: flex;
1631
- align-items: center;
1632
- z-index: 1;
1633
- position: relative;
1634
- right: 16px;
1635
- padding-right: 0;
1636
- z-index: 1;
1637
- }
1638
- .tl-text-field:has(.tl-text-field__label):not(.tl-text-field--label-inside) .tl-text-field__suffix--text, .tl-text-field:has(.tl-text-field__label):not(.tl-text-field--label-inside) .tl-text-field__suffix--icon {
1639
- transform: translateY(calc(-50% + 24px));
1640
- }
1641
- :has(.tl-text-field__input:disabled) .tl-text-field__suffix--text, :has(.tl-text-field__input:disabled) .tl-text-field__suffix--icon {
1642
- color: var(--text-field-affix-disabled);
1643
- }
1644
- :has(.tl-text-field__input:disabled) .tl-text-field__suffix--text > *, :has(.tl-text-field__input:disabled) .tl-text-field__suffix--icon > * {
1645
- color: var(--text-field-affix-disabled);
1646
- }
1647
- :has(.tl-text-field__input:disabled) .tl-text-field__suffix--text .tl-icon,
1648
- :has(.tl-text-field__input:disabled) .tl-text-field__suffix--text > .tl-icon, :has(.tl-text-field__input:disabled) .tl-text-field__suffix--icon .tl-icon,
1649
- :has(.tl-text-field__input:disabled) .tl-text-field__suffix--icon > .tl-icon {
1650
- background-color: var(--text-field-affix-disabled);
1651
- }
1652
1623
  :has(.tl-text-field__input:disabled) .tl-text-field__suffix--icon.tl-icon {
1653
1624
  background-color: var(--text-field-affix-disabled);
1654
1625
  }
@@ -118,7 +118,7 @@
118
118
  color: var(--toggle-text);
119
119
  margin-bottom: 12px;
120
120
  }
121
- :has(input[type=checkbox]:disabled) .tl-toggle__headline {
121
+ .tl-toggle:has(input[type=checkbox]:disabled) .tl-toggle__headline {
122
122
  color: var(--toggle-disabled);
123
123
  user-select: none;
124
124
  cursor: not-allowed;
@@ -376,7 +376,8 @@
376
376
  * Do not edit directly, this file was auto-generated.
377
377
  */
378
378
  .traton,
379
- .traton .tds-mode-light {
379
+ .traton .tds-mode-light,
380
+ .traton .tl-mode-light {
380
381
  --color-background-base: var(--traton-color-grey-50);
381
382
  --color-background-accent-primary-default: var(--traton-color-blue-800);
382
383
  --color-background-accent-primary-disabled: var(--traton-color-blue-100);
@@ -507,7 +508,8 @@
507
508
  /**
508
509
  * Do not edit directly, this file was auto-generated.
509
510
  */
510
- .traton .tds-mode-dark {
511
+ .traton .tds-mode-dark,
512
+ .traton .tl-mode-dark {
511
513
  --color-background-base: var(--traton-color-blue-1000);
512
514
  --color-background-accent-primary-default: var(--traton-color-grey-300);
513
515
  --color-background-accent-primary-disabled: var(--traton-color-grey-900);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scania/tegel-lite",
3
- "version": "0.0.3-rules-beta.9",
3
+ "version": "0.1.0-beta.5",
4
4
  "description": "Styles-only library for Tegel Design System (Beta)",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -76,26 +76,15 @@
76
76
  "publishConfig": {
77
77
  "access": "public"
78
78
  },
79
- "bin": {
80
- "tegel-lite-setup-rules": "./bin/setup-ai-rules.js"
81
- },
82
79
  "files": [
83
- "dist/",
84
- ".cursor/",
85
- ".ai/",
86
- ".github/",
87
- "bin/",
88
- "CLAUDE.md",
89
- "AGENTS.md"
80
+ "dist/"
90
81
  ],
91
82
  "scripts": {
92
- "generate:ai-rules": "node scripts/generate-ai-rules.js",
93
- "prepublishOnly": "npm run generate:ai-rules && echo 'Warning: Run npm run build:tegel-lite from root before publishing'",
94
- "postinstall": "echo \"\\n💡 Run npx tegel-lite-setup-rules to install AI coding rules for @scania/tegel-lite\\n\"",
83
+ "prepublishOnly": "echo 'Warning: Run npm run build:tegel-lite from root before publishing'",
95
84
  "test": "npx playwright test"
96
85
  },
97
86
  "devDependencies": {
98
- "@playwright/test": "^1.57.0",
87
+ "@playwright/test": "^1.58.2",
99
88
  "@types/node": "^24.3.1",
100
89
  "serve": "^14.2.5"
101
90
  },
@@ -1,318 +0,0 @@
1
- ---
2
- description: Design tokens, variables, colors, spacing, typography, and layout standards
3
- alwaysApply: true
4
- ---
5
-
6
- # Design Tokens & Variables
7
-
8
- ## RULE: ALWAYS use design tokens instead of hardcoded values.
9
-
10
- ## Primitive Color Tokens (from scania-variables.css)
11
-
12
- ### Blue (Primary Brand)
13
-
14
- | Token | Value |
15
- | ------------------------- | --------- |
16
- | `--scania-color-blue-50` | `#d8dde5` |
17
- | `--scania-color-blue-100` | `#bacde8` |
18
- | `--scania-color-blue-200` | `#87afe8` |
19
- | `--scania-color-blue-300` | `#4a89f3` |
20
- | `--scania-color-blue-400` | `#2a6ecf` |
21
- | `--scania-color-blue-500` | `#2058a8` |
22
- | `--scania-color-blue-600` | `#16417f` |
23
- | `--scania-color-blue-700` | `#0f3263` |
24
- | `--scania-color-blue-800` | `#041e42` |
25
- | `--scania-color-blue-900` | `#001533` |
26
-
27
- ### Red (Secondary Brand / Danger)
28
-
29
- | Token | Value |
30
- | ------------------------ | --------- |
31
- | `--scania-color-red-50` | `#ffdfe3` |
32
- | `--scania-color-red-100` | `#ffb9b8` |
33
- | `--scania-color-red-200` | `#fc8a88` |
34
- | `--scania-color-red-300` | `#ea4851` |
35
- | `--scania-color-red-400` | `#d1001b` |
36
- | `--scania-color-red-500` | `#b20018` |
37
- | `--scania-color-red-600` | `#8a0012` |
38
- | `--scania-color-red-700` | `#6c0011` |
39
- | `--scania-color-red-800` | `#480008` |
40
- | `--scania-color-red-900` | `#350004` |
41
-
42
- ### Green (Success)
43
-
44
- | Token | Value |
45
- | -------------------------- | --------- |
46
- | `--scania-color-green-50` | `#d3eee7` |
47
- | `--scania-color-green-100` | `#9bd9c2` |
48
- | `--scania-color-green-200` | `#65bda5` |
49
- | `--scania-color-green-300` | `#009e7e` |
50
- | `--scania-color-green-400` | `#008064` |
51
- | `--scania-color-green-500` | `#00664f` |
52
- | `--scania-color-green-600` | `#004c3b` |
53
- | `--scania-color-green-700` | `#0a382e` |
54
- | `--scania-color-green-800` | `#00251b` |
55
- | `--scania-color-green-900` | `#001a12` |
56
-
57
- ### Yellow (Warning)
58
-
59
- | Token | Value |
60
- | --------------------------- | --------- |
61
- | `--scania-color-yellow-50` | `#f9eec3` |
62
- | `--scania-color-yellow-100` | `#f8e596` |
63
- | `--scania-color-yellow-200` | `#f4d65d` |
64
- | `--scania-color-yellow-300` | `#f1c21b` |
65
- | `--scania-color-yellow-400` | `#eaad06` |
66
- | `--scania-color-yellow-500` | `#b87c14` |
67
- | `--scania-color-yellow-600` | `#975717` |
68
- | `--scania-color-yellow-700` | `#6b3b10` |
69
- | `--scania-color-yellow-800` | `#4d260a` |
70
- | `--scania-color-yellow-900` | `#361b07` |
71
-
72
- ### Grey (Neutral)
73
-
74
- | Token | Value |
75
- | -------------------------- | --------- |
76
- | `--scania-color-grey-00` | `#fff` |
77
- | `--scania-color-grey-50` | `#f6f7f9` |
78
- | `--scania-color-grey-100` | `#edeff3` |
79
- | `--scania-color-grey-150` | `#e0e5eb` |
80
- | `--scania-color-grey-200` | `#d1d7e0` |
81
- | `--scania-color-grey-250` | `#b4becd` |
82
- | `--scania-color-grey-300` | `#93a2b7` |
83
- | `--scania-color-grey-350` | `#7e90a9` |
84
- | `--scania-color-grey-400` | `#6e829f` |
85
- | `--scania-color-grey-500` | `#5f728c` |
86
- | `--scania-color-grey-600` | `#4e5e75` |
87
- | `--scania-color-grey-700` | `#3a4554` |
88
- | `--scania-color-grey-800` | `#242c37` |
89
- | `--scania-color-grey-850` | `#1c222b` |
90
- | `--scania-color-grey-900` | `#15181d` |
91
- | `--scania-color-grey-950` | `#0e1013` |
92
- | `--scania-color-grey-1000` | `#000` |
93
-
94
- ## Semantic Color Tokens (Light Mode)
95
-
96
- Use these instead of primitive colors in layouts:
97
-
98
- ### Backgrounds
99
-
100
- | Token | Usage |
101
- | -------------------------------------------------------------------------- | ------------------------------------- |
102
- | `--color-background-base` | Page/app base background |
103
- | `--color-background-layer-01` | Primary card/section background |
104
- | `--color-background-layer-02` | Secondary/nested background |
105
- | `--color-background-layer-03` | Third-level nested background |
106
- | `--color-background-overlay` | Modal/drawer backdrop |
107
- | `--color-background-top` | Top-level surface |
108
- | `--color-background-accent-primary-default` | Primary button background |
109
- | `--color-background-accent-primary-hover` | Primary button hover |
110
- | `--color-background-accent-primary-pressed` | Primary button pressed |
111
- | `--color-background-accent-primary-disabled` | Disabled button background |
112
- | `--color-background-accent-danger-default` | Danger action background |
113
- | `--color-background-surface-100` through `--color-background-surface-1000` | Surface levels for subtle backgrounds |
114
-
115
- ### Text (Foreground)
116
-
117
- | Token | Usage |
118
- | ---------------------------------------- | ---------------------- |
119
- | `--color-foreground-text-strong` | Primary text, headings |
120
- | `--color-foreground-text-defined` | Secondary text, labels |
121
- | `--color-foreground-text-soft` | Tertiary text |
122
- | `--color-foreground-text-subtle` | Placeholder, hint text |
123
- | `--color-foreground-text-disabled` | Disabled text |
124
- | `--color-foreground-text-accent-default` | Link text |
125
- | `--color-foreground-text-accent-visited` | Visited link |
126
- | `--color-foreground-text-brand` | Brand-colored text |
127
-
128
- ### Borders
129
-
130
- | Token | Usage |
131
- | ---------------------------------------- | ---------------------- |
132
- | `--color-foreground-border-strong` | Strong visible borders |
133
- | `--color-foreground-border-soft` | Default input borders |
134
- | `--color-foreground-border-subtle` | Hover borders |
135
- | `--color-foreground-border-discrete` | Divider lines |
136
- | `--color-foreground-border-accent-focus` | Focus ring color |
137
- | `--color-foreground-border-disabled` | Disabled borders |
138
-
139
- ### Icons
140
-
141
- | Token | Usage |
142
- | ---------------------------------- | --------------- |
143
- | `--color-foreground-icon-strong` | Primary icons |
144
- | `--color-foreground-icon-defined` | Secondary icons |
145
- | `--color-foreground-icon-soft` | Tertiary icons |
146
- | `--color-foreground-icon-subtle` | Faint icons |
147
- | `--color-foreground-icon-disabled` | Disabled icons |
148
-
149
- ### System / Status Colors
150
-
151
- | Token | Usage |
152
- | --------------------------------- | ------------------------- |
153
- | `--color-system-success-default` | Success states (green) |
154
- | `--color-system-success-discrete` | Success background tint |
155
- | `--color-system-warning-default` | Warning states (yellow) |
156
- | `--color-system-warning-discrete` | Warning background tint |
157
- | `--color-system-danger-default` | Error/danger states (red) |
158
- | `--color-system-danger-discrete` | Error background tint |
159
- | `--color-system-info-default` | Info states (blue) |
160
- | `--color-system-info-discrete` | Info background tint |
161
-
162
- ## Spacing Units
163
-
164
- | Token | Value |
165
- | ------------------- | ------- |
166
- | `--scania-unit-0` | `0` |
167
- | `--scania-unit-1` | `1px` |
168
- | `--scania-unit-2` | `2px` |
169
- | `--scania-unit-4` | `4px` |
170
- | `--scania-unit-8` | `8px` |
171
- | `--scania-unit-12` | `12px` |
172
- | `--scania-unit-16` | `16px` |
173
- | `--scania-unit-20` | `20px` |
174
- | `--scania-unit-24` | `24px` |
175
- | `--scania-unit-32` | `32px` |
176
- | `--scania-unit-40` | `40px` |
177
- | `--scania-unit-48` | `48px` |
178
- | `--scania-unit-56` | `56px` |
179
- | `--scania-unit-64` | `64px` |
180
- | `--scania-unit-80` | `80px` |
181
- | `--scania-unit-96` | `96px` |
182
- | `--scania-unit-120` | `120px` |
183
-
184
- ## Dimension/Spacing Semantic Tokens
185
-
186
- | Token | Value | Usage |
187
- | -------------------------- | ------ | ----------------------- |
188
- | `--dimension-space-tiny` | `4px` | Micro spacing |
189
- | `--dimension-space-small` | `16px` | Default element spacing |
190
- | `--dimension-space-medium` | `24px` | Section padding |
191
- | `--dimension-space-large` | `48px` | Large gaps |
192
- | `--dimension-space-huge` | `80px` | Hero sections |
193
-
194
- ## Border Radius Tokens
195
-
196
- | Token | Value | Usage |
197
- | ------------------------------------------ | -------- | -------------------------- |
198
- | `--dimension-radius-narrow` | `4px` | Buttons, inputs, cards |
199
- | `--dimension-radius-soft` | `8px` | Larger containers |
200
- | `--dimension-radius-rounded` | `32px` | Chips, pills |
201
- | `--dimension-radius-circle` | `9999px` | Avatars, circular elements |
202
- | `--dimension-radius-for-surface-clickable` | `4px` | Clickable elements |
203
- | `--dimension-radius-for-surface-field` | `4px` | Form fields |
204
-
205
- ## Font Families
206
-
207
- | Token | Value | Usage |
208
- | ------------------------------------- | ---------------------------- | ----------------------- |
209
- | `--scania-font-family-display` | `scania sans headline` | Display/headline text |
210
- | `--scania-font-family-default` | `scania sans` | Body/default text |
211
- | `--scania-font-family-semi-condensed` | `scania sans semi condensed` | Side menu, compact text |
212
-
213
- ## Font Weights
214
-
215
- | Token | Value |
216
- | ------------------------------ | ----- |
217
- | `--scania-font-weight-regular` | `400` |
218
- | `--scania-font-weight-bold` | `700` |
219
-
220
- ## Motion/Animation Tokens
221
-
222
- | Token | Value | Usage |
223
- | ----------------------------------- | -------------------------------- | -------------------- |
224
- | `--tds-motion-duration-fast-01` | `100ms` | Micro-interactions |
225
- | `--tds-motion-duration-fast-02` | `150ms` | Quick transitions |
226
- | `--tds-motion-duration-moderate-01` | `200ms` | Standard transitions |
227
- | `--tds-motion-duration-moderate-02` | `300ms` | Moderate animations |
228
- | `--tds-motion-duration-slow-01` | `400ms` | Complex animations |
229
- | `--tds-motion-duration-slow-02` | `500ms` | Full animations |
230
- | `--tds-motion-easing-scania` | `cubic-bezier(0.4, 0, 0, 1)` | Default easing |
231
- | `--tds-motion-easing-enter` | `cubic-bezier(0.1, 0.9, 0.2, 1)` | Enter transitions |
232
- | `--tds-motion-easing-exit` | `cubic-bezier(0.7, 0, 1, 0.5)` | Exit transitions |
233
-
234
- ---
235
-
236
- # Typography
237
-
238
- ## Typography Scale (defined in scania-variables.css under `.scania`)
239
-
240
- ### Display (Hero/Marketing)
241
-
242
- - **Display 01**: 216px / 183px LH / uppercase / Scania Sans Headline Bold
243
- - **Display 02**: 156px / 148px LH / uppercase / Scania Sans Headline Bold
244
- - **Display 03**: 112px / 106px LH / uppercase / Scania Sans Headline Bold
245
- - **Display 04**: 80px / 80px LH / uppercase / Scania Sans Headline Bold
246
- - **Display 05**: 56px / 56px LH / uppercase / Scania Sans Headline Bold
247
-
248
- ### Headlines
249
-
250
- - **Headline 01**: 40px / 40px LH / uppercase / Scania Sans Headline Bold
251
- - **Headline 02**: 32px / 32px LH / Scania Sans Bold / ls: -1.28px
252
- - **Headline 03**: 24px / 24px LH / Scania Sans Bold / ls: -0.72px
253
- - **Headline 04**: 20px / 24px LH / Scania Sans Bold / ls: -0.4px
254
- - **Headline 05**: 16px / 24px LH / Scania Sans Bold / ls: -0.32px
255
- - **Headline 06**: 14px / 16px LH / uppercase / Scania Sans Bold / ls: -0.28px
256
-
257
- ### Paragraphs / Body
258
-
259
- - **Paragraph 01**: 24px / 32px LH / Scania Sans Regular / ls: -0.72px
260
- - **Paragraph 02**: 20px / 24px LH / Scania Sans Regular / ls: -0.2px
261
- - **Body 01**: 16px / 24px LH / Scania Sans Regular / ls: -0.32px
262
- - **Body 02**: 14px / 20px LH / Scania Sans Regular / ls: -0.14px
263
-
264
- ### Component Text
265
-
266
- - **Component Text 01**: 14px / 16px LH / ls: -0.14px
267
- - **Component Text 02**: 14px / 20px LH / ls: -0.14px
268
- - **Component Label 01**: 12px / 16px LH / ls: 0
269
- - **Component Label 02**: 10px / 8px LH / ls: 0
270
- - **Component Title 01**: 14px / 16px LH / ls: -0.14px
271
- - **Component Title 02**: 10px / 16px LH / uppercase / ls: 0.8px
272
-
273
- ### Links
274
-
275
- - **Link 01**: 16px / 24px LH / ls: -0.32px
276
- - **Link 02**: 14px / 20px LH / ls: -0.14px
277
-
278
- ## Typography Usage in Components
279
-
280
- 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.
281
-
282
- ---
283
-
284
- # Layout & Grid
285
-
286
- Tegel Lite does not include a CSS grid utility system. Use standard CSS Grid/Flexbox with Tegel tokens:
287
-
288
- ```html
289
- <div
290
- class="scania tds-mode-light"
291
- style="
292
- display: grid;
293
- grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
294
- gap: var(--dimension-space-small);
295
- padding: var(--dimension-space-medium);
296
- "
297
- >
298
- <!-- Grid items -->
299
- </div>
300
- ```
301
-
302
- ## Layout Components
303
-
304
- - **Header** (`.tl-header`) – Full-width app bar, fixed at top
305
- - **Side Menu** (`.tl-side-menu`) – Navigation sidebar, collapsible
306
- - **Footer** (`.tl-footer`) – Multi-section page footer
307
-
308
- ## Breakpoints (used in components)
309
-
310
- | Breakpoint | Value | Usage |
311
- | ---------- | -------- | ------------- |
312
- | xs | `320px` | Mobile |
313
- | sm | `384px` | Small mobile |
314
- | md | `672px` | Tablet |
315
- | lg | `992px` | Desktop |
316
- | xl | `1056px` | Large desktop |
317
- | xxl | `1312px` | Wide desktop |
318
- | xxxl | `1584px` | Ultra-wide |