@db-ux/core-foundations 4.2.0 → 4.2.1
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/CHANGELOG.md +5 -1
- package/README.md +12 -12
- package/assets/fonts/generate-eu-fonts.ts +3 -3
- package/build/styles/icons/relative.scss +4 -4
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -112,12 +112,6 @@ In CSS:
|
|
|
112
112
|
In HTML:
|
|
113
113
|
|
|
114
114
|
```html
|
|
115
|
-
<!-- With classes-->
|
|
116
|
-
<div
|
|
117
|
-
data-density="functional"
|
|
118
|
-
class="db-successful-bg-lvl-1 my-container"
|
|
119
|
-
></div>
|
|
120
|
-
|
|
121
115
|
<!-- With data attributes-->
|
|
122
116
|
<div
|
|
123
117
|
class="my-container"
|
|
@@ -126,6 +120,12 @@ In HTML:
|
|
|
126
120
|
></div>
|
|
127
121
|
```
|
|
128
122
|
|
|
123
|
+
<!-- With classes-->
|
|
124
|
+
<div
|
|
125
|
+
data-density="functional"
|
|
126
|
+
class="db-successful-bg-lvl-1 my-container"
|
|
127
|
+
></div>
|
|
128
|
+
|
|
129
129
|
> **Note:** In CSS you might to use the classes or data-attributes even more because you cannot use placeholders or mixins like we have it in **scss**. If you use a 3rd party library and cannot apply classes or data-attributes you might want to copy the content of our helper classes to apply it to the 3rd party class.
|
|
130
130
|
|
|
131
131
|
### SCSS
|
|
@@ -197,12 +197,6 @@ In SCSS with placeholder:
|
|
|
197
197
|
In HTML:
|
|
198
198
|
|
|
199
199
|
```html
|
|
200
|
-
<!-- With classes-->
|
|
201
|
-
<div
|
|
202
|
-
data-density="functional"
|
|
203
|
-
class="db-successful-bg-lvl-1 my-container"
|
|
204
|
-
></div>
|
|
205
|
-
|
|
206
200
|
<!-- With data attributes-->
|
|
207
201
|
<div
|
|
208
202
|
class="my-container"
|
|
@@ -211,6 +205,12 @@ In HTML:
|
|
|
211
205
|
></div>
|
|
212
206
|
```
|
|
213
207
|
|
|
208
|
+
<!-- With classes-->
|
|
209
|
+
<div
|
|
210
|
+
data-density="functional"
|
|
211
|
+
class="db-successful-bg-lvl-1 my-container"
|
|
212
|
+
></div>
|
|
213
|
+
|
|
214
214
|
### Tailwind
|
|
215
215
|
|
|
216
216
|
Check the required imports for [CSS](https://design-system.deutschebahn.com/core-web/review/main/foundations/readme?current=css) to enable all tokens and defaults.
|
|
@@ -2,8 +2,8 @@ import { glob } from 'glob';
|
|
|
2
2
|
import { execFile } from 'node:child_process';
|
|
3
3
|
import { promisify } from 'node:util';
|
|
4
4
|
|
|
5
|
-
import { dirname } from 'path';
|
|
6
|
-
import { fileURLToPath } from 'url';
|
|
5
|
+
import { dirname } from 'node:path';
|
|
6
|
+
import { fileURLToPath } from 'node:url';
|
|
7
7
|
|
|
8
8
|
const __filename = fileURLToPath(import.meta.url);
|
|
9
9
|
const __dirname = dirname(__filename).replaceAll('\\', '/');
|
|
@@ -27,7 +27,7 @@ const generateFonts = async () => {
|
|
|
27
27
|
try {
|
|
28
28
|
const files = await glob(`${__dirname}/*.ttf`);
|
|
29
29
|
|
|
30
|
-
for (const file of files.map(f=> f.replaceAll('\\', '/'))) {
|
|
30
|
+
for (const file of files.map((f) => f.replaceAll('\\', '/'))) {
|
|
31
31
|
// Security: Validate that the file is within the expected directory
|
|
32
32
|
// and has the expected extension to prevent path traversal attacks
|
|
33
33
|
if (!file.startsWith(__dirname) || !file.endsWith('.ttf')) {
|
|
@@ -60,8 +60,8 @@
|
|
|
60
60
|
|
|
61
61
|
/* pre-load icon fallback font */
|
|
62
62
|
html::after {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
63
|
+
content: "";
|
|
64
|
+
position: absolute;
|
|
65
|
+
z-index: -1;
|
|
66
|
+
font-family: icon-font-fallback, sans-serif;
|
|
67
67
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@db-ux/core-foundations",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Provides basic tokens and assets based on DB UX Design System (Version 3).",
|
|
6
6
|
"repository": {
|
|
@@ -52,13 +52,13 @@
|
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@csstools/normalize.css": "12.1.1",
|
|
55
|
-
"@db-ux/icon-font-tools": "0.3.
|
|
55
|
+
"@db-ux/icon-font-tools": "0.3.6",
|
|
56
56
|
"@playwright/test": "1.56.1",
|
|
57
57
|
"cpr": "3.0.1",
|
|
58
58
|
"cssnano": "7.1.2",
|
|
59
59
|
"dotenv": "17.2.3",
|
|
60
60
|
"glob": "11.0.3",
|
|
61
|
-
"nodemon": "3.1.
|
|
61
|
+
"nodemon": "3.1.11",
|
|
62
62
|
"prettier": "3.6.2",
|
|
63
63
|
"sass": "1.85.0",
|
|
64
64
|
"tsx": "4.20.6",
|