@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.
Files changed (38) hide show
  1. package/README.md +0 -29
  2. package/dist/assets/icons/scania/microphone.svg +4 -0
  3. package/dist/assets/icons/scania/microphone_inactive.svg +7 -0
  4. package/dist/assets/icons/scania/notification_snooze.svg +6 -0
  5. package/dist/assets/icons/scania/paperclip.svg +3 -0
  6. package/dist/components.css +2036 -1807
  7. package/dist/global.css +3 -2
  8. package/dist/scania-variables.css +8 -0
  9. package/dist/tl-button.css +19 -0
  10. package/dist/tl-dropdown.css +36 -1
  11. package/dist/tl-folder-tabs.css +64 -0
  12. package/dist/tl-header.css +207 -51
  13. package/dist/tl-icon.css +16 -0
  14. package/dist/tl-inline-tabs.css +81 -0
  15. package/dist/tl-navigation-tabs.css +81 -0
  16. package/dist/tl-slider.css +1024 -1485
  17. package/dist/tl-text-field.css +32 -13
  18. package/package.json +3 -14
  19. package/.ai/rules/01-design-tokens.mdc +0 -318
  20. package/.ai/rules/02-components-forms.mdc +0 -396
  21. package/.ai/rules/03-components-display.mdc +0 -474
  22. package/.ai/rules/04-components-navigation.mdc +0 -358
  23. package/.ai/rules/05-guidelines.mdc +0 -144
  24. package/.ai/rules/06-patterns.mdc +0 -352
  25. package/.cursor/rules/tegel-lite/01-design-tokens.mdc +0 -317
  26. package/.cursor/rules/tegel-lite/02-components-forms.mdc +0 -395
  27. package/.cursor/rules/tegel-lite/03-components-display.mdc +0 -473
  28. package/.cursor/rules/tegel-lite/04-components-navigation.mdc +0 -357
  29. package/.cursor/rules/tegel-lite/05-guidelines.mdc +0 -143
  30. package/.cursor/rules/tegel-lite/06-patterns.mdc +0 -351
  31. package/.github/copilot-instructions.md +0 -2045
  32. package/AGENTS.md +0 -2045
  33. package/CLAUDE.md +0 -2045
  34. package/bin/setup-ai-rules.js +0 -368
  35. package/dist/tl-folder-tab.css +0 -87
  36. package/dist/tl-inline-tab.css +0 -80
  37. package/dist/tl-navigation-tab.css +0 -114
  38. package/dist/tl-textarea-mixins.css +0 -0
@@ -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,13 @@
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;
1259
- }
1260
- .tl-text-field--md {
1261
- height: 48px;
1262
- }
1263
- .tl-text-field--sm {
1264
- height: 40px;
1265
- }
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 {
1271
+ .tl-text-field--readonly:not(.tl-text-field--disabled):not(.tl-text-field--hide-readonly-icon)::before {
1267
1272
  content: "";
1268
1273
  position: absolute;
1269
1274
  top: 50%;
@@ -1373,12 +1378,15 @@
1373
1378
  }
1374
1379
  .tl-text-field--lg .tl-text-field__input {
1375
1380
  padding: var(--tds-spacing-element-20) var(--tds-spacing-element-16);
1381
+ height: 56px;
1376
1382
  }
1377
1383
  .tl-text-field--md .tl-text-field__input {
1378
1384
  padding: var(--tds-spacing-element-16);
1385
+ height: 48px;
1379
1386
  }
1380
1387
  .tl-text-field--sm .tl-text-field__input {
1381
1388
  padding: var(--tds-spacing-element-12) var(--tds-spacing-element-16);
1389
+ height: 40px;
1382
1390
  }
1383
1391
  .tl-text-field--label-inside.tl-text-field--lg .tl-text-field__input {
1384
1392
  padding-top: var(--tds-spacing-element-24);
@@ -1430,7 +1438,6 @@
1430
1438
  letter-spacing: var(--detail-02-letter-spacing);
1431
1439
  text-transform: var(--detail-02-text-transform);
1432
1440
  position: absolute;
1433
- top: 50%;
1434
1441
  left: var(--text-field-label-inside-left, 16px);
1435
1442
  color: var(--text-field-label-inside);
1436
1443
  pointer-events: none;
@@ -1439,6 +1446,18 @@
1439
1446
  transition: transform 0.15s, font-size 0.15s, color 0.15s, top 0.15s;
1440
1447
  z-index: 1;
1441
1448
  }
1449
+ .tl-text-field__label {
1450
+ /* Center label in input row before focus/fill */
1451
+ }
1452
+ .tl-text-field--label-inside.tl-text-field--lg .tl-text-field__label {
1453
+ top: 28px; /* half of 56px input height */
1454
+ }
1455
+ .tl-text-field--label-inside.tl-text-field--md .tl-text-field__label {
1456
+ top: 24px; /* half of 48px input height */
1457
+ }
1458
+ .tl-text-field--label-inside.tl-text-field--sm .tl-text-field__label {
1459
+ top: 20px; /* half of 40px input height */
1460
+ }
1442
1461
  .tl-text-field--label-inside:has(.tl-text-field__prefix--icon) .tl-text-field__label {
1443
1462
  left: 44px;
1444
1463
  }
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",
4
4
  "description": "Styles-only library for Tegel Design System (Beta)",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -76,22 +76,11 @@
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": {
@@ -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 |