@synergy-design-system/mcp 1.31.0 → 1.33.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/CHANGELOG.md +20 -0
- package/dist/build/build.js +2 -0
- package/dist/build/fonts.d.ts +4 -0
- package/dist/build/fonts.js +49 -0
- package/dist/tools/font-info.d.ts +6 -0
- package/dist/tools/font-info.js +35 -0
- package/dist/tools/index.d.ts +1 -0
- package/dist/tools/index.js +1 -0
- package/dist/utilities/config.d.ts +4 -0
- package/dist/utilities/config.js +4 -0
- package/dist/utilities/fonts.d.ts +2 -0
- package/dist/utilities/fonts.js +3 -0
- package/dist/utilities/index.d.ts +1 -0
- package/dist/utilities/index.js +1 -0
- package/metadata/checksum.txt +1 -1
- package/metadata/packages/assets/README.md +4 -2
- package/metadata/packages/components/components/syn-combobox/component.styles.ts +3 -5
- package/metadata/packages/components/components/syn-optgroup/component.styles.ts +2 -2
- package/metadata/packages/components/components/syn-option/component.custom.styles.ts +44 -13
- package/metadata/packages/components/components/syn-select/component.custom.styles.ts +3 -5
- package/metadata/packages/components/migration/migration-synergy-v3.md +234 -49
- package/metadata/packages/components/static/CHANGELOG.md +9 -0
- package/metadata/packages/fonts/CHANGELOG.md +12 -0
- package/metadata/packages/fonts/README.md +157 -0
- package/metadata/packages/fonts/package.json +72 -0
- package/metadata/static/fonts/index.md +4 -0
- package/metadata/static/setup/prerequisites.md +179 -122
- package/package.json +4 -3
|
@@ -1,24 +1,181 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Synergy 3.0 Migration Guide
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
> ⚠️ **Migration in progress:** Some features may not be fully implemented yet. See the [GitHub migration board](https://github.com/orgs/synergy-design-system/projects/2/views/37) for updates.
|
|
4
4
|
|
|
5
|
-
>
|
|
5
|
+
> It is currently not advised to use the new version in production, as we are still finalizing the migration process.
|
|
6
|
+
> However, you can start preparing your codebase for the upcoming changes.
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
---
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
This migration will ensure that your application remains up-to-date with the latest design standards and functionality improvements.
|
|
10
|
+
## Migration Checklist: Quick Overview
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
- [ ] Update Synergy packages to the latest version
|
|
13
|
+
- [ ] Call `setSystemIconLibrary('sick2025')` before rendering components
|
|
14
|
+
- [ ] Copy new icons to `/assets/icons/`
|
|
15
|
+
- [ ] Import new CSS themes (`sick2025_light.css`, `sick2025_dark.css`)
|
|
16
|
+
- [ ] Update theme switching logic to use new class names
|
|
17
|
+
- [ ] Add SICK Intl font (via `@synergy-design-system/fonts`, CDN, or brand portal)
|
|
14
18
|
|
|
15
|
-
|
|
19
|
+
---
|
|
16
20
|
|
|
17
|
-
##
|
|
21
|
+
## Release Highlights: Synergy 3.0
|
|
18
22
|
|
|
19
|
-
|
|
23
|
+
- **Brand appearance:** Updated colors, roundings, and overall look
|
|
24
|
+
- **Fonts:** New SICK Intl font replaces Open Sans
|
|
25
|
+
- **Icon library:** New outline and filled icons, new naming
|
|
26
|
+
- **CSS tokens/themes:** New theme files and class names
|
|
20
27
|
|
|
21
|
-
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Migration Steps: Detailed Guide
|
|
31
|
+
|
|
32
|
+
### 1. Update Synergy packages
|
|
33
|
+
|
|
34
|
+
Use your package manager to update all `@synergy-design-system/*` packages.
|
|
35
|
+
Also make sure to install `@synergy-design-system/fonts` for the new `SICK Intl` font.
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
### 2. Set the system icon library
|
|
40
|
+
|
|
41
|
+
Call `setSystemIconLibrary('sick2025')` before rendering any Synergy components.
|
|
42
|
+
|
|
43
|
+
**Example:**
|
|
44
|
+
|
|
45
|
+
```js
|
|
46
|
+
import { setSystemIconLibrary } from "@synergy-design-system/components";
|
|
47
|
+
setSystemIconLibrary("sick2025");
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
### 3. Copy new icons to your build output
|
|
53
|
+
|
|
54
|
+
Use your bundler (e.g., Vite) to copy icons from `@synergy-design-system/assets` to `/assets/icons/`.
|
|
55
|
+
|
|
56
|
+
**Example (Vite):**
|
|
57
|
+
|
|
58
|
+
```js
|
|
59
|
+
viteStaticCopy({
|
|
60
|
+
targets: [
|
|
61
|
+
{
|
|
62
|
+
src: "node_modules/@synergy-design-system/assets/src/sick2025/outline/*",
|
|
63
|
+
dest: "./assets/icons/",
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
src: "node_modules/@synergy-design-system/assets/src/sick2025/fill/*",
|
|
67
|
+
dest: "./assets/icons/",
|
|
68
|
+
},
|
|
69
|
+
],
|
|
70
|
+
});
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
### 4. Import new CSS themes
|
|
76
|
+
|
|
77
|
+
Replace old theme imports with:
|
|
78
|
+
|
|
79
|
+
```js
|
|
80
|
+
import "@synergy-design-system/tokens/themes/sick2025_light.css";
|
|
81
|
+
import "@synergy-design-system/tokens/themes/sick2025_dark.css";
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
### 5. Update theme switching logic
|
|
87
|
+
|
|
88
|
+
Use new class names: `syn-sick2025-light` and `syn-sick2025-dark`.
|
|
89
|
+
|
|
90
|
+
**Example:**
|
|
91
|
+
|
|
92
|
+
```js
|
|
93
|
+
// Theme switcher
|
|
94
|
+
const { body } = document;
|
|
95
|
+
if (body.classList.contains("syn-sick2025-dark")) {
|
|
96
|
+
body.classList.remove("syn-sick2025-dark");
|
|
97
|
+
body.classList.add("syn-sick2025-light");
|
|
98
|
+
} else {
|
|
99
|
+
body.classList.remove("syn-sick2025-light");
|
|
100
|
+
body.classList.add("syn-sick2025-dark");
|
|
101
|
+
}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
### 6. Add the SICK Intl font
|
|
107
|
+
|
|
108
|
+
Use one of the following options:
|
|
109
|
+
|
|
110
|
+
**Synergy fonts package (recommended):**
|
|
111
|
+
|
|
112
|
+
```javascript
|
|
113
|
+
import "@synergy-design-system/fonts";
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
**SICK CDN:**
|
|
117
|
+
|
|
118
|
+
```css
|
|
119
|
+
@font-face {
|
|
120
|
+
font-display: swap;
|
|
121
|
+
font-family: "SICK Intl";
|
|
122
|
+
font-style: normal;
|
|
123
|
+
font-weight: 400;
|
|
124
|
+
src: url("https://www.sick.com/media/fonts/sickintl-v2/SICKIntl-Regular.woff2")
|
|
125
|
+
format("woff2");
|
|
126
|
+
}
|
|
127
|
+
@font-face {
|
|
128
|
+
font-display: swap;
|
|
129
|
+
font-family: "SICK Intl";
|
|
130
|
+
font-style: normal;
|
|
131
|
+
font-weight: 600;
|
|
132
|
+
src: url("https://www.sick.com/media/fonts/sickintl-v2/SICKIntl-Semibold.woff2")
|
|
133
|
+
format("woff2");
|
|
134
|
+
}
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
**Brand portal:** Download and host the font yourself, then use a local path in `@font-face`.
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
## Migration: Breaking Changes & Details
|
|
142
|
+
|
|
143
|
+
### Breaking Changes: Icons
|
|
144
|
+
|
|
145
|
+
- **System icon library:** Synergy now ships two system icon libraries for compatibility. Use `setSystemIconLibrary` to switch to the new set.
|
|
146
|
+
- **New SICK 2025 icons:** Outline and filled icons, new naming. Use `<syn-icon name="home">` and `<syn-icon name="home_fill">`.
|
|
147
|
+
- **Migration utilities:** Use `setupIcons("sick2025")` for easy migration, or `migrateIconName` for custom setups.
|
|
148
|
+
|
|
149
|
+
### Breaking Changes: Tokens & Themes
|
|
150
|
+
|
|
151
|
+
- New theme files: `sick2025_light.css`, `sick2025_dark.css`
|
|
152
|
+
- New theme class names: `.syn-sick2025-light`, `.syn-sick2025-dark`
|
|
153
|
+
- Significant visual changes: colors, roundings, font
|
|
154
|
+
|
|
155
|
+
### Breaking Changes: SICK Intl Fonts
|
|
156
|
+
|
|
157
|
+
- New font: SICK Intl (Regular 400, Semi Bold 600)
|
|
158
|
+
- Provided directly by Synergy via `@synergy-design-system/fonts`, CDN, or brand portal
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
## Migration: Troubleshooting
|
|
163
|
+
|
|
164
|
+
- **Icons not showing?** Check asset paths and icon names.
|
|
165
|
+
- **Fonts not loading?** Verify font-face URLs and file locations.
|
|
166
|
+
- **Theme not switching?** Check class names and CSS imports.
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
## Migration: References & Further Reading
|
|
171
|
+
|
|
172
|
+
- [Synergy Docs](https://synergy-design-system.github.io/)
|
|
173
|
+
- [SICK Brand Portal](https://brand.sick.com/document/145#/basiselemente/typografie/sick-intl)
|
|
174
|
+
- [GitHub migration board](https://github.com/orgs/synergy-design-system/projects/2/views/37)
|
|
175
|
+
|
|
176
|
+
### Reference: Icons
|
|
177
|
+
|
|
178
|
+
#### Reference: System Icon Library
|
|
22
179
|
|
|
23
180
|
Some Synergy components depend on a set of icons that must always be available. To make sure those components display correctly, even if the `@synergy-design-system/assets` package is not installed or configured properly, these icons are baked into Synergies core directly.
|
|
24
181
|
|
|
@@ -41,7 +198,7 @@ import { setSystemIconLibrary } from "@synergy-design-system/components";
|
|
|
41
198
|
setSystemIconLibrary("sick2025");
|
|
42
199
|
```
|
|
43
200
|
|
|
44
|
-
#### New SICK 2025
|
|
201
|
+
#### Reference: New SICK 2025 Icons
|
|
45
202
|
|
|
46
203
|
The new SICK 2025 theme comes with an updated icon library that includes both outline and filled versions of icons. These icons are available in the `@synergy-design-system/assets` package and can be used with the `<syn-icon>` or `<syn-icon-button>` component.
|
|
47
204
|
|
|
@@ -85,7 +242,7 @@ export default defineConfig({
|
|
|
85
242
|
});
|
|
86
243
|
```
|
|
87
244
|
|
|
88
|
-
#### Migrating
|
|
245
|
+
#### Reference: Migrating Icon Names
|
|
89
246
|
|
|
90
247
|
Applications that are migrating from Synergy 2 may have used icons that have been renamed in the migration process.
|
|
91
248
|
Those icons will **not** show up after the switch to the new icon library.
|
|
@@ -147,7 +304,7 @@ registerIconLibrary("default", customIconLibrary);
|
|
|
147
304
|
setSystemIconLibrary("sick2025");
|
|
148
305
|
```
|
|
149
306
|
|
|
150
|
-
### Tokens
|
|
307
|
+
### Reference: Tokens & Themes
|
|
151
308
|
|
|
152
309
|
Synergy 3.0 introduces new CSS theme files that implement the updated SICK brand appearance:
|
|
153
310
|
|
|
@@ -195,11 +352,11 @@ To use the new themes in your application:
|
|
|
195
352
|
};
|
|
196
353
|
```
|
|
197
354
|
|
|
198
|
-
### Fonts
|
|
355
|
+
### Reference: SICK Intl Fonts
|
|
199
356
|
|
|
200
357
|
The SICK 2025 theme introduces a new typeface called **SICK Intl** that replaces the previously used Open Sans font. When migrating to Synergy 3.0 with the SICK 2025 theme, you'll need to ensure this font is properly loaded in your application.
|
|
201
358
|
|
|
202
|
-
> **Important**:
|
|
359
|
+
> **Important**: The SICK Intl font is now provided via the dedicated `@synergy-design-system/fonts` package for easy integration.
|
|
203
360
|
|
|
204
361
|
#### Font Requirements
|
|
205
362
|
|
|
@@ -212,32 +369,35 @@ For detailed information about when and how to use the different font styles, re
|
|
|
212
369
|
|
|
213
370
|
#### Usage
|
|
214
371
|
|
|
215
|
-
You have several options to include the SICK Intl font in your project
|
|
372
|
+
You have several options to include the SICK Intl font in your project.
|
|
373
|
+
Each of those has its own advantages.
|
|
216
374
|
|
|
217
|
-
|
|
375
|
+
| Option | Advantages | Disadvantages |
|
|
376
|
+
| :---------------- | :--------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
377
|
+
| Fonts Package | Easy integration, works offline, updates under your control, automatic CSS imports | Requires npm package installation. |
|
|
378
|
+
| CDN | Fast delivery when online, automatic update via CDN | Only works for services that have online connection, font updates may break application layouts. |
|
|
379
|
+
| Brand Portal | Installation from the official source | File exports (other than the original TTF) from the official source are currently misaligned, leading to issues with vertical alignment, especially for components that support or use icons. |
|
|
218
380
|
|
|
219
|
-
|
|
220
|
-
2. Extract the ZIP file to a location accessible by your project (e.g., a `public` folder)
|
|
221
|
-
3. Add the following CSS to your project (replace `PUBLIC_PATH` with your actual path):
|
|
381
|
+
> If you are not sure, we recommend you to use Option 1 as outlined below.
|
|
222
382
|
|
|
223
|
-
|
|
224
|
-
@font-face {
|
|
225
|
-
font-display: swap;
|
|
226
|
-
font-family: "SICK Intl";
|
|
227
|
-
font-style: normal;
|
|
228
|
-
font-weight: 400;
|
|
229
|
-
src: url("/PUBLIC_PATH/SICKIntl/SICKIntl-Regular.ttf") format("truetype");
|
|
230
|
-
}
|
|
383
|
+
##### Option 1: Using @synergy-design-system/fonts (Recommended!)
|
|
231
384
|
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
385
|
+
Synergy now provides the SICK Intl font via the dedicated `@synergy-design-system/fonts` package.
|
|
386
|
+
|
|
387
|
+
**Installation:**
|
|
388
|
+
|
|
389
|
+
```bash
|
|
390
|
+
npm install @synergy-design-system/fonts
|
|
391
|
+
```
|
|
392
|
+
|
|
393
|
+
**Usage:**
|
|
394
|
+
|
|
395
|
+
```javascript
|
|
396
|
+
import "@synergy-design-system/fonts";
|
|
239
397
|
```
|
|
240
398
|
|
|
399
|
+
This automatically imports all required font-face declarations and makes the SICK Intl font available in your application.
|
|
400
|
+
|
|
241
401
|
##### Option 2: Using the SICK CDN
|
|
242
402
|
|
|
243
403
|
For the quickest setup, load the fonts directly from the SICK CDN:
|
|
@@ -249,11 +409,8 @@ For the quickest setup, load the fonts directly from the SICK CDN:
|
|
|
249
409
|
font-family: "SICK Intl";
|
|
250
410
|
font-style: normal;
|
|
251
411
|
font-weight: 400;
|
|
252
|
-
src:
|
|
253
|
-
|
|
254
|
-
format("woff2"),
|
|
255
|
-
url("https://www.sick.com/media/fonts/sickintl-v1/regular/SICKIntl-Regular.ttf")
|
|
256
|
-
format("truetype");
|
|
412
|
+
src: url("https://www.sick.com/media/fonts/sickintl-v2/SICKIntl-Regular.woff2")
|
|
413
|
+
format("woff2");
|
|
257
414
|
}
|
|
258
415
|
|
|
259
416
|
/* Semi Bold */
|
|
@@ -262,11 +419,8 @@ For the quickest setup, load the fonts directly from the SICK CDN:
|
|
|
262
419
|
font-family: "SICK Intl";
|
|
263
420
|
font-style: normal;
|
|
264
421
|
font-weight: 600;
|
|
265
|
-
src:
|
|
266
|
-
|
|
267
|
-
format("woff2"),
|
|
268
|
-
url("https://www.sick.com/media/fonts/sickintl-v1/semibold/SICKIntl-Semibold.ttf")
|
|
269
|
-
format("truetype");
|
|
422
|
+
src: url("https://www.sick.com/media/fonts/sickintl-v2/SICKIntl-Semibold.woff2")
|
|
423
|
+
format("woff2");
|
|
270
424
|
}
|
|
271
425
|
```
|
|
272
426
|
|
|
@@ -275,13 +429,44 @@ For better performance, you can also preload the font:
|
|
|
275
429
|
```html
|
|
276
430
|
<link
|
|
277
431
|
rel="preload"
|
|
278
|
-
href="https://www.sick.com/media/fonts/sickintl-
|
|
432
|
+
href="https://www.sick.com/media/fonts/sickintl-v2/SICKIntl-Regular.woff2"
|
|
433
|
+
as="font"
|
|
434
|
+
type="font/woff2"
|
|
435
|
+
crossorigin
|
|
436
|
+
/>
|
|
437
|
+
<link
|
|
438
|
+
rel="preload"
|
|
439
|
+
href="https://www.sick.com/media/fonts/sickintl-v2/SICKIntl-Semibold.woff2"
|
|
279
440
|
as="font"
|
|
280
441
|
type="font/woff2"
|
|
281
442
|
crossorigin
|
|
282
443
|
/>
|
|
283
444
|
```
|
|
284
445
|
|
|
446
|
+
##### Option 3: Local Installation from brand portal (not recommended!)
|
|
447
|
+
|
|
448
|
+
1. Download the `SICK Intl` font from the [SICK Brand Portal](https://brand.sick.com/document/145#/basiselemente/typografie/sick-intl)
|
|
449
|
+
2. Extract the ZIP file to a location accessible by your project (e.g., a `public` folder)
|
|
450
|
+
3. Add the following CSS to your project (replace `PUBLIC_PATH` with your actual path):
|
|
451
|
+
|
|
452
|
+
```css
|
|
453
|
+
@font-face {
|
|
454
|
+
font-display: swap;
|
|
455
|
+
font-family: "SICK Intl";
|
|
456
|
+
font-style: normal;
|
|
457
|
+
font-weight: 400;
|
|
458
|
+
src: url("/PUBLIC_PATH/SICKIntl/SICKIntl-Regular.ttf") format("truetype");
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
@font-face {
|
|
462
|
+
font-display: swap;
|
|
463
|
+
font-family: "SICK Intl";
|
|
464
|
+
font-style: normal;
|
|
465
|
+
font-weight: 600;
|
|
466
|
+
src: url("/PUBLIC_PATH/SICKIntl/SICKIntl-Semibold.ttf") format("truetype");
|
|
467
|
+
}
|
|
468
|
+
```
|
|
469
|
+
|
|
285
470
|
## Migration Steps
|
|
286
471
|
|
|
287
472
|
These steps are only needed when switching to the new Synergy 3.0 layout.
|
|
@@ -291,4 +476,4 @@ These steps are only needed when switching to the new Synergy 3.0 layout.
|
|
|
291
476
|
3. Adjust your bundler to copy the new icons to your build output. This is necessary to ensure that the new icons are available in your application.
|
|
292
477
|
4. **Update CSS theme imports** to use the new `sick2025_light.css` and `sick2025_dark.css` files instead of the legacy theme files.
|
|
293
478
|
5. **Update theme class names** in your JavaScript theme switching logic to use `syn-sick2025-light` and `syn-sick2025-dark`.
|
|
294
|
-
6. **Add the SICK Intl font** by either
|
|
479
|
+
6. **Add the SICK Intl font** by either using the dedicated `@synergy-design-system/fonts` package (recommended), using the SICK CDN, or downloading it locally. The fonts package automatically provides all required font-face declarations for Regular (400) and Semi Bold (600) weights.
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.69.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#1095](https://github.com/synergy-design-system/synergy-design-system/pull/1095) [`f9f544f`](https://github.com/synergy-design-system/synergy-design-system/commit/f9f544feb2adb3edef95bd1b50a303440e0c8385) Thanks [@schilchSICKAG](https://github.com/schilchSICKAG)! - Released on: 2025-12-04
|
|
8
|
+
|
|
9
|
+
feat: ✨ Brand updates for `<syn-select>`, `<syn-option>` and `<syn-optgroup>` (#988)
|
|
10
|
+
feat: ✨ Brand updates for `<syn-combobox>` (#944)
|
|
11
|
+
|
|
3
12
|
## 2.68.0
|
|
4
13
|
|
|
5
14
|
### Minor Changes
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 1.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [#1099](https://github.com/synergy-design-system/synergy-design-system/pull/1099) [`fc1e550`](https://github.com/synergy-design-system/synergy-design-system/commit/fc1e550fb4aa28eabf0bef6b089993a1dd939ff2) Thanks [@schilchSICKAG](https://github.com/schilchSICKAG)! - Released on: 2025-12-04
|
|
8
|
+
|
|
9
|
+
feat: ✨ add sick intl to fonts (#1085)
|
|
10
|
+
|
|
11
|
+
Add an optimized variant of the `SICK Intl` font as a shared asset to the new `@synergy-design-system/fonts` package.
|
|
12
|
+
It also adds the fonts package to the Synergy MCP server.
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
# @synergy-design-system/fonts
|
|
2
|
+
|
|
3
|
+
This package provides the SICK Intl font family required for Synergy 3.0 and later versions. The font is distributed with pre-built CSS files for easy integration into any project.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
Install the fonts package as a dependency:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install --save @synergy-design-system/fonts
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
### Basic Usage
|
|
16
|
+
|
|
17
|
+
Import the complete font family with all weights:
|
|
18
|
+
|
|
19
|
+
```javascript
|
|
20
|
+
// The default export will load SICK Intl automatically.
|
|
21
|
+
import "@synergy-design-system/fonts";
|
|
22
|
+
|
|
23
|
+
// You may also use a direct import instead.
|
|
24
|
+
// Use this if your bundler does not understand JavaScript module syntax
|
|
25
|
+
import "@synergy-design-system/fonts/src/sick-intl/font.css";
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
This will load both Regular (400) and Semi Bold (600) font weights with proper `@font-face` declarations.
|
|
29
|
+
|
|
30
|
+
### CSS Import
|
|
31
|
+
|
|
32
|
+
If you prefer CSS imports, you can use:
|
|
33
|
+
|
|
34
|
+
```css
|
|
35
|
+
@import "@synergy-design-system/fonts/src/sick-intl/font.css";
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Inline Base64 Version (Self-Contained)
|
|
39
|
+
|
|
40
|
+
For applications that need **fully self-contained CSS without external font file dependencies**, use the automatically generated inline version:
|
|
41
|
+
|
|
42
|
+
```javascript
|
|
43
|
+
import "@synergy-design-system/fonts/sick-intl-inline.css";
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
This version includes the font files as base64-encoded data URIs directly in the CSS, eliminating the need for separate font file hosting. **Note:** This increases CSS file size but removes external dependencies.
|
|
47
|
+
|
|
48
|
+
### Framework Examples
|
|
49
|
+
|
|
50
|
+
#### Vite
|
|
51
|
+
|
|
52
|
+
```javascript
|
|
53
|
+
// main.tsx
|
|
54
|
+
import "@synergy-design-system/fonts";
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
#### Angular
|
|
58
|
+
|
|
59
|
+
```json
|
|
60
|
+
// In angular.json
|
|
61
|
+
"styles": [
|
|
62
|
+
"@synergy-design-system/fonts/src/sick-intl/font.css",
|
|
63
|
+
]
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### CSS Usage
|
|
67
|
+
|
|
68
|
+
After importing the fonts, use the `SICK Intl` font family in your CSS:
|
|
69
|
+
|
|
70
|
+
```css
|
|
71
|
+
body {
|
|
72
|
+
font-family:
|
|
73
|
+
"SICK Intl",
|
|
74
|
+
-apple-system,
|
|
75
|
+
BlinkMacSystemFont,
|
|
76
|
+
sans-serif;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.heading {
|
|
80
|
+
font-family: "SICK Intl";
|
|
81
|
+
font-weight: 600; /* Semi Bold */
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.body-text {
|
|
85
|
+
font-family: "SICK Intl";
|
|
86
|
+
font-weight: 400; /* Regular */
|
|
87
|
+
}
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## Available Font Weights
|
|
91
|
+
|
|
92
|
+
- **400 (Regular):** Used for body text and standard content
|
|
93
|
+
- **600 (Semi Bold):** Used for headings, emphasized text, and UI elements
|
|
94
|
+
|
|
95
|
+
## File Structure
|
|
96
|
+
|
|
97
|
+
```
|
|
98
|
+
dist/
|
|
99
|
+
├── sick-intl-inline.css # Base64 inline version (git ignored)
|
|
100
|
+
src/
|
|
101
|
+
└── sick-intl/
|
|
102
|
+
├── font.css # Default font face definitions
|
|
103
|
+
├── SICKIntl-Regular.woff2 # Regular font
|
|
104
|
+
└── SICKIntl-SemiBold.woff2 # Semibold font
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## Browser Support
|
|
108
|
+
|
|
109
|
+
The font files are provided in WOFF2 format, which is supported by:
|
|
110
|
+
|
|
111
|
+
- Chrome 36+
|
|
112
|
+
- Firefox 39+
|
|
113
|
+
- Safari 12+
|
|
114
|
+
- Edge 14+
|
|
115
|
+
|
|
116
|
+
For older browser support, consider using the CDN version or hosting additional font formats.
|
|
117
|
+
|
|
118
|
+
## CDN Alternative
|
|
119
|
+
|
|
120
|
+
If you prefer not to bundle fonts with your application, you can load them from the SICK CDN:
|
|
121
|
+
|
|
122
|
+
```css
|
|
123
|
+
@font-face {
|
|
124
|
+
font-display: swap;
|
|
125
|
+
font-family: "SICK Intl";
|
|
126
|
+
font-style: normal;
|
|
127
|
+
font-weight: 400;
|
|
128
|
+
src: url("https://www.sick.com/media/fonts/sickintl-v2/SICKIntl-Regular.woff2")
|
|
129
|
+
format("woff2");
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
@font-face {
|
|
133
|
+
font-display: swap;
|
|
134
|
+
font-family: "SICK Intl";
|
|
135
|
+
font-style: normal;
|
|
136
|
+
font-weight: 600;
|
|
137
|
+
src: url("https://www.sick.com/media/fonts/sickintl-v2/SICKIntl-Semibold.woff2")
|
|
138
|
+
format("woff2");
|
|
139
|
+
}
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
## Performance Considerations
|
|
143
|
+
|
|
144
|
+
- **Standard version:** Loads font files separately, better for caching
|
|
145
|
+
- **Inline version:** Self-contained but larger CSS file size
|
|
146
|
+
- **CDN version:** Fastest initial load but requires network connectivity
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
## Development
|
|
151
|
+
|
|
152
|
+
This package uses PostCSS to generate multiple font distribution formats:
|
|
153
|
+
|
|
154
|
+
- Standard CSS with external font files
|
|
155
|
+
- Base64 inline CSS for self-contained usage
|
|
156
|
+
|
|
157
|
+
The inline version is automatically generated during build and includes the font files as data URIs.
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
{
|
|
2
|
+
"author": {
|
|
3
|
+
"name": "SICK Global UX Foundation",
|
|
4
|
+
"url": "https://www.sick.com"
|
|
5
|
+
},
|
|
6
|
+
"description": "Fonts for Synergy, the SICK Design System",
|
|
7
|
+
"devDependencies": {
|
|
8
|
+
"@synergy-design-system/eslint-config-syn": "workspace:^",
|
|
9
|
+
"@synergy-design-system/stylelint-config-syn": "workspace:^",
|
|
10
|
+
"eslint": "^8.57.1",
|
|
11
|
+
"ora": "^8.2.0",
|
|
12
|
+
"postcss": "^8.5.6",
|
|
13
|
+
"postcss-header": "^3.0.3",
|
|
14
|
+
"postcss-import": "^16.1.1",
|
|
15
|
+
"postcss-url": "^10.1.3",
|
|
16
|
+
"stylelint": "^16.24.0"
|
|
17
|
+
},
|
|
18
|
+
"exports": {
|
|
19
|
+
".": {
|
|
20
|
+
"import": "./src/sick-intl/font.css",
|
|
21
|
+
"default": "./src/sick-intl/font.css"
|
|
22
|
+
},
|
|
23
|
+
"./sick-intl.css": {
|
|
24
|
+
"import": "./src/sick-intl/font.css",
|
|
25
|
+
"default": "./src/sick-intl/font.css"
|
|
26
|
+
},
|
|
27
|
+
"./sick-intl-inline.css": {
|
|
28
|
+
"import": "./dist/sick-intl-inline.css",
|
|
29
|
+
"default": "./dist/sick-intl-inline.css"
|
|
30
|
+
},
|
|
31
|
+
"./src/*": {
|
|
32
|
+
"import": "./src/*",
|
|
33
|
+
"default": "./src/*"
|
|
34
|
+
},
|
|
35
|
+
"./dist/*": {
|
|
36
|
+
"import": "./dist/*",
|
|
37
|
+
"default": "./dist/*"
|
|
38
|
+
},
|
|
39
|
+
"./package.json": {
|
|
40
|
+
"import": "./package.json",
|
|
41
|
+
"default": "./package.json"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"files": [
|
|
45
|
+
"dist",
|
|
46
|
+
"src",
|
|
47
|
+
"CHANGELOG.md",
|
|
48
|
+
"NOTICE"
|
|
49
|
+
],
|
|
50
|
+
"homepage": "https://synergy-design-system.github.io",
|
|
51
|
+
"keywords": [
|
|
52
|
+
"SDS",
|
|
53
|
+
"SICK",
|
|
54
|
+
"Synergy Design System",
|
|
55
|
+
"SICK Fonts"
|
|
56
|
+
],
|
|
57
|
+
"license": "MIT",
|
|
58
|
+
"name": "@synergy-design-system/fonts",
|
|
59
|
+
"repository": {
|
|
60
|
+
"type": "git",
|
|
61
|
+
"url": "https://github.com/synergy-design-system/synergy-design-system.git",
|
|
62
|
+
"directory": "packages/fonts"
|
|
63
|
+
},
|
|
64
|
+
"scripts": {
|
|
65
|
+
"build": "node scripts/build.js",
|
|
66
|
+
"lint:css": "stylelint \"src/**/*.css\"",
|
|
67
|
+
"lint:js": "eslint .",
|
|
68
|
+
"lint": "pnpm run /^lint:.*/"
|
|
69
|
+
},
|
|
70
|
+
"type": "module",
|
|
71
|
+
"version": "1.0.0"
|
|
72
|
+
}
|