@synergy-design-system/mcp 1.1.0 → 1.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 +14 -0
- package/metadata/checksum.txt +1 -1
- package/metadata/packages/components/components/syn-combobox/component.styles.ts +2 -1
- package/metadata/packages/components/components/syn-menu-label/component.angular.ts +2 -2
- package/metadata/packages/components/components/syn-menu-label/component.react.ts +2 -2
- package/metadata/packages/components/components/syn-menu-label/component.ts +2 -2
- package/metadata/packages/components/components/syn-menu-label/component.vue +2 -2
- package/metadata/packages/components/components/syn-select/component.custom.styles.ts +2 -1
- package/metadata/packages/components/components/syn-tab-group/component.angular.ts +1 -1
- package/metadata/packages/components/components/syn-tab-group/component.react.ts +1 -1
- package/metadata/packages/components/components/syn-tab-group/component.ts +1 -1
- package/metadata/packages/components/components/syn-tab-group/component.vue +1 -1
- package/metadata/packages/components/migration/migration-synergy-v3.md +95 -1
- package/metadata/packages/components/static/CHANGELOG.md +7 -0
- package/metadata/packages/components/static/README.md +44 -0
- package/metadata/packages/tokens/CHANGELOG.md +7 -0
- package/metadata/packages/tokens/README.md +40 -17
- package/metadata/packages/tokens/dark.css +6 -6
- package/metadata/packages/tokens/index.js +1 -1
- package/metadata/packages/tokens/light.css +6 -6
- package/metadata/packages/tokens/sick2018_dark.css +268 -0
- package/metadata/packages/tokens/sick2018_light.css +268 -0
- package/metadata/packages/tokens/sick2025_dark.css +268 -0
- package/metadata/packages/tokens/sick2025_light.css +268 -0
- package/metadata/static/components/syn-dialog/docs.md +1 -3
- package/metadata/static/components/syn-drawer/docs.md +1 -3
- package/metadata/static/setup/icon-usage.md +136 -1
- package/package.json +8 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
|
+
# [@synergy-design-system/mcp-v1.2.1](https://github.com/synergy-design-system/synergy-design-system/compare/mcp/1.2.0...mcp/1.2.1) (2025-08-21)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* 🐛 Placeholder is clipped for syn-select multiple ([#992](https://github.com/synergy-design-system/synergy-design-system/issues/992)) ([973933e](https://github.com/synergy-design-system/synergy-design-system/commit/973933e477a2cba1611c2f73f77e4e79d755c8a1))
|
|
7
|
+
|
|
1
8
|
# Changelog
|
|
2
9
|
|
|
10
|
+
# [@synergy-design-system/mcp-v1.2.0](https://github.com/synergy-design-system/synergy-design-system/compare/mcp/1.1.0...mcp/1.2.0) (2025-08-19)
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
* ✨ export new sick2025 themes ([#985](https://github.com/synergy-design-system/synergy-design-system/issues/985)) ([148730d](https://github.com/synergy-design-system/synergy-design-system/commit/148730d68037ea74dc241ca6627aa6a32af876ab))
|
|
15
|
+
|
|
16
|
+
|
|
3
17
|
# [@synergy-design-system/mcp-v1.1.0](https://github.com/synergy-design-system/synergy-design-system/compare/mcp/1.0.0...mcp/1.1.0) (2025-08-08)
|
|
4
18
|
|
|
5
19
|
|
package/metadata/checksum.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
2020f706c051179afe10d645a03c27a4
|
|
@@ -381,8 +381,9 @@ export default css`
|
|
|
381
381
|
* #850: Allow to measure the size of the combobox.
|
|
382
382
|
* This is needed so we can automatically size and truncate the tags in the <syn-combobox multiple> component.
|
|
383
383
|
* Scoped to multiple to not break the single combobox per accident.
|
|
384
|
+
* Scoped to when placeholder is not visible to not break the placeholder visualization
|
|
384
385
|
*/
|
|
385
|
-
:host([multiple]) .combobox__tags {
|
|
386
|
+
:host([multiple]) :not(.combobox--placeholder-visible) > .combobox__inputs > .combobox__tags {
|
|
386
387
|
min-width: 100px;
|
|
387
388
|
overflow: hidden;
|
|
388
389
|
}
|
|
@@ -22,14 +22,14 @@ import '@synergy-design-system/components/components/menu-label/menu-label.js';
|
|
|
22
22
|
* @status stable
|
|
23
23
|
* @since 2.0
|
|
24
24
|
*
|
|
25
|
-
* @dependency syn-divider
|
|
26
|
-
*
|
|
27
25
|
* @slot - The menu label's content.
|
|
28
26
|
*
|
|
29
27
|
* @csspart base - The component's base wrapper.
|
|
30
28
|
* @csspart divider - The divider that is displayed above the content
|
|
31
29
|
* @csspart label - The label that is displayed below the divider
|
|
32
30
|
*
|
|
31
|
+
* @dependency syn-divider
|
|
32
|
+
*
|
|
33
33
|
* @cssproperty --display-divider - Display property of the divider. Defaults to "block"
|
|
34
34
|
*/
|
|
35
35
|
@Component({
|
|
@@ -16,14 +16,14 @@ Component.define('syn-menu-label');
|
|
|
16
16
|
* @status stable
|
|
17
17
|
* @since 2.0
|
|
18
18
|
*
|
|
19
|
-
* @dependency syn-divider
|
|
20
|
-
*
|
|
21
19
|
* @slot - The menu label's content.
|
|
22
20
|
*
|
|
23
21
|
* @csspart base - The component's base wrapper.
|
|
24
22
|
* @csspart divider - The divider that is displayed above the content
|
|
25
23
|
* @csspart label - The label that is displayed below the divider
|
|
26
24
|
*
|
|
25
|
+
* @dependency syn-divider
|
|
26
|
+
*
|
|
27
27
|
* @cssproperty --display-divider - Display property of the divider. Defaults to "block"
|
|
28
28
|
*/
|
|
29
29
|
export const SynMenuLabel = createComponent({
|
|
@@ -20,14 +20,14 @@ import type { CSSResultGroup } from 'lit';
|
|
|
20
20
|
* @status stable
|
|
21
21
|
* @since 2.0
|
|
22
22
|
*
|
|
23
|
-
* @dependency syn-divider
|
|
24
|
-
*
|
|
25
23
|
* @slot - The menu label's content.
|
|
26
24
|
*
|
|
27
25
|
* @csspart base - The component's base wrapper.
|
|
28
26
|
* @csspart divider - The divider that is displayed above the content
|
|
29
27
|
* @csspart label - The label that is displayed below the divider
|
|
30
28
|
*
|
|
29
|
+
* @dependency syn-divider
|
|
30
|
+
*
|
|
31
31
|
* @cssproperty --display-divider - Display property of the divider. Defaults to "block"
|
|
32
32
|
*/
|
|
33
33
|
export default class SynMenuLabel extends SynergyElement {
|
|
@@ -11,14 +11,14 @@
|
|
|
11
11
|
* @status stable
|
|
12
12
|
* @since 2.0
|
|
13
13
|
*
|
|
14
|
-
* @dependency syn-divider
|
|
15
|
-
*
|
|
16
14
|
* @slot - The menu label's content.
|
|
17
15
|
*
|
|
18
16
|
* @csspart base - The component's base wrapper.
|
|
19
17
|
* @csspart divider - The divider that is displayed above the content
|
|
20
18
|
* @csspart label - The label that is displayed below the divider
|
|
21
19
|
*
|
|
20
|
+
* @dependency syn-divider
|
|
21
|
+
*
|
|
22
22
|
* @cssproperty --display-divider - Display property of the divider. Defaults to "block"
|
|
23
23
|
*/
|
|
24
24
|
import { computed, ref } from 'vue';
|
|
@@ -149,8 +149,9 @@ export default css`
|
|
|
149
149
|
* #850: Allow to measure the size of the combobox.
|
|
150
150
|
* This is needed so we can automatically size and truncate the tags in the <syn-select multiple> component.
|
|
151
151
|
* Scoped to multiple to not break the single select per accident.
|
|
152
|
+
* Scoped to when placeholder is not visible to not break the placeholder visualization
|
|
152
153
|
*/
|
|
153
|
-
:host([multiple]) .select__tags {
|
|
154
|
+
:host([multiple]) :not(.select--placeholder-visible) > .select__combobox > .select__tags {
|
|
154
155
|
min-width: 100px;
|
|
155
156
|
overflow: hidden;
|
|
156
157
|
}
|
|
@@ -42,9 +42,9 @@ import '@synergy-design-system/components/components/tab-group/tab-group.js';
|
|
|
42
42
|
* @csspart scroll-button__base - The scroll button's exported `base` part.
|
|
43
43
|
*
|
|
44
44
|
* @cssproperty --indicator-color - The color of the active tab indicator.
|
|
45
|
-
* @cssproperty --indicator-width - The width of the active tab indicator.
|
|
46
45
|
* @cssproperty --track-color - The color of the indicator's track (the line that separates tabs from panels).
|
|
47
46
|
* @cssproperty --track-width - The width of the indicator's track (the line that separates tabs from panels).
|
|
47
|
+
* @cssproperty --indicator-width - The width of the active tab indicator.
|
|
48
48
|
*/
|
|
49
49
|
@Component({
|
|
50
50
|
selector: 'syn-tab-group',
|
|
@@ -39,9 +39,9 @@ Component.define('syn-tab-group');
|
|
|
39
39
|
* @csspart scroll-button__base - The scroll button's exported `base` part.
|
|
40
40
|
*
|
|
41
41
|
* @cssproperty --indicator-color - The color of the active tab indicator.
|
|
42
|
-
* @cssproperty --indicator-width - The width of the active tab indicator.
|
|
43
42
|
* @cssproperty --track-color - The color of the indicator's track (the line that separates tabs from panels).
|
|
44
43
|
* @cssproperty --track-width - The width of the indicator's track (the line that separates tabs from panels).
|
|
44
|
+
* @cssproperty --indicator-width - The width of the active tab indicator.
|
|
45
45
|
*/
|
|
46
46
|
export const SynTabGroup = createComponent({
|
|
47
47
|
displayName: 'SynTabGroup',
|
|
@@ -48,9 +48,9 @@ import type SynTabPanel from '../tab-panel/tab-panel.js';
|
|
|
48
48
|
* @csspart scroll-button__base - The scroll button's exported `base` part.
|
|
49
49
|
*
|
|
50
50
|
* @cssproperty --indicator-color - The color of the active tab indicator.
|
|
51
|
-
* @cssproperty --indicator-width - The width of the active tab indicator.
|
|
52
51
|
* @cssproperty --track-color - The color of the indicator's track (the line that separates tabs from panels).
|
|
53
52
|
* @cssproperty --track-width - The width of the indicator's track (the line that separates tabs from panels).
|
|
53
|
+
* @cssproperty --indicator-width - The width of the active tab indicator.
|
|
54
54
|
*/
|
|
55
55
|
export default class SynTabGroup extends SynergyElement {
|
|
56
56
|
static styles: CSSResultGroup = [componentStyles, styles, customStyles];
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
* @csspart scroll-button__base - The scroll button's exported `base` part.
|
|
31
31
|
*
|
|
32
32
|
* @cssproperty --indicator-color - The color of the active tab indicator.
|
|
33
|
-
* @cssproperty --indicator-width - The width of the active tab indicator.
|
|
34
33
|
* @cssproperty --track-color - The color of the indicator's track (the line that separates tabs from panels).
|
|
35
34
|
* @cssproperty --track-width - The width of the indicator's track (the line that separates tabs from panels).
|
|
35
|
+
* @cssproperty --indicator-width - The width of the active tab indicator.
|
|
36
36
|
*/
|
|
37
37
|
import { computed, ref } from 'vue';
|
|
38
38
|
import '@synergy-design-system/components/components/tab-group/tab-group.js';
|
|
@@ -9,7 +9,7 @@ This document outlines the changes and migration steps required to upgrade from
|
|
|
9
9
|
We are currently working on the migration to Synergy 3.0, which includes significant updates to the brand appearance, fonts and icon library.
|
|
10
10
|
This migration will ensure that your application remains up-to-date with the latest design standards and functionality improvements.
|
|
11
11
|
|
|
12
|
-
It is currently not
|
|
12
|
+
It is currently not advised to use the new version in production, as we are still finalizing the migration process.
|
|
13
13
|
However, you can start preparing your codebase for the upcoming changes.
|
|
14
14
|
|
|
15
15
|
A roadmap and current status of the migration can be found in our [GitHub repository](https://github.com/orgs/synergy-design-system/projects/2/views/37).
|
|
@@ -41,6 +41,98 @@ import { setSystemIconLibrary } from "@synergy-design-system/icons";
|
|
|
41
41
|
setSystemIconLibrary("sick2025");
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
+
#### New SICK 2025 icons
|
|
45
|
+
|
|
46
|
+
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
|
+
|
|
48
|
+
The new icon library provides two main styles:
|
|
49
|
+
|
|
50
|
+
- **Outline icons**: These are the standard outlined icons, which are the default
|
|
51
|
+
- **Filled icons**: These are filled versions of the same icons. The icons have the same name as the outline icons but with a suffix of `_fill`
|
|
52
|
+
|
|
53
|
+
To use the new SICK 2025 icons in your application, you have several options:
|
|
54
|
+
|
|
55
|
+
The outline and fill version can be used simultaneously.
|
|
56
|
+
|
|
57
|
+
```html
|
|
58
|
+
<!-- Outline version -->
|
|
59
|
+
<syn-icon name="home"></syn-icon>
|
|
60
|
+
|
|
61
|
+
<!-- Filled version -->
|
|
62
|
+
<syn-icon name="home_fill"></syn-icon>
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
```javascript
|
|
66
|
+
// Example vite config
|
|
67
|
+
import { defineConfig } from "vite";
|
|
68
|
+
import { viteStaticCopy } from "vite-plugin-static-copy";
|
|
69
|
+
|
|
70
|
+
export default defineConfig({
|
|
71
|
+
plugins: [
|
|
72
|
+
viteStaticCopy({
|
|
73
|
+
targets: [
|
|
74
|
+
{
|
|
75
|
+
src: "node_modules/@synergy-design-system/assets/src/sick2025/outline/*",
|
|
76
|
+
dest: "./assets/icons/",
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
src: "node_modules/@synergy-design-system/assets/src/sick2025/fill/*",
|
|
80
|
+
dest: "./assets/icons/",
|
|
81
|
+
},
|
|
82
|
+
],
|
|
83
|
+
}),
|
|
84
|
+
],
|
|
85
|
+
});
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Tokens
|
|
89
|
+
|
|
90
|
+
Synergy 3.0 introduces new CSS theme files that implement the updated SICK brand appearance:
|
|
91
|
+
|
|
92
|
+
- **`sick2025_light.css`**: The new light theme featuring the SICK 2025 brand identity
|
|
93
|
+
- **`sick2025_dark.css`**: The new dark theme featuring the SICK 2025 brand identity
|
|
94
|
+
|
|
95
|
+
These new themes include significant visual changes compared to the existing themes e.g. changed colors and new color palettes, components with roundings, new font etc.
|
|
96
|
+
|
|
97
|
+
We added new css class selectors, so it is easy to switch between different themes.
|
|
98
|
+
|
|
99
|
+
- SICK 2018 light theme: `.syn-sick2018-light`
|
|
100
|
+
- SICK 2018 dark theme: `.syn-sick2018-dark`
|
|
101
|
+
- SICK 2025 light theme: `.syn-sick2025-light`
|
|
102
|
+
- SICK 2025 dark theme: `.syn-sick2025-dark`
|
|
103
|
+
|
|
104
|
+
To use the new themes in your application:
|
|
105
|
+
|
|
106
|
+
1. **Replace theme imports** in your HTML or CSS:
|
|
107
|
+
|
|
108
|
+
```javascript
|
|
109
|
+
// New Synergy 3.0 themes
|
|
110
|
+
import "@synergy-design-system/tokens/themes/sick2025_light.css";
|
|
111
|
+
import "@synergy-design-system/tokens/themes/sick2025_dark.css";
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
2. **Update theme switching logic** if you support runtime theme changes:
|
|
115
|
+
|
|
116
|
+
```javascript
|
|
117
|
+
// Rename the class names for theme switching
|
|
118
|
+
const switchTheme = () => {
|
|
119
|
+
const { body } = document;
|
|
120
|
+
const currentTheme = body.classList.contains("syn-sick2025-dark")
|
|
121
|
+
? "dark"
|
|
122
|
+
: "light";
|
|
123
|
+
|
|
124
|
+
if (currentTheme === "light") {
|
|
125
|
+
// Light theme
|
|
126
|
+
body.classList.remove("syn-sick2025-light");
|
|
127
|
+
body.classList.add("syn-sick2025-dark");
|
|
128
|
+
} else {
|
|
129
|
+
// Dark theme
|
|
130
|
+
body.classList.remove("syn-sick2025-dark");
|
|
131
|
+
body.classList.add("syn-sick2025-light");
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
```
|
|
135
|
+
|
|
44
136
|
## Migration Steps
|
|
45
137
|
|
|
46
138
|
These steps are only needed when switching to the new Synergy 3.0 layout.
|
|
@@ -48,3 +140,5 @@ These steps are only needed when switching to the new Synergy 3.0 layout.
|
|
|
48
140
|
1. Always make sure to use the latest versions of the Synergy packages. You can check for updates using your package manager.
|
|
49
141
|
2. Call `setSystemIconLibrary` with `sick2025` to enable the new system icons.
|
|
50
142
|
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.
|
|
143
|
+
4. **Update CSS theme imports** to use the new `sick2025_light.css` and `sick2025_dark.css` files instead of the legacy theme files.
|
|
144
|
+
5. **Update theme class names** in your JavaScript theme switching logic to use `syn-sick2025-light` and `syn-sick2025-dark`.
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [@synergy-design-system/components-v2.40.1](https://github.com/synergy-design-system/synergy-design-system/compare/components/2.40.0...components/2.40.1) (2025-08-21)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* 🐛 Placeholder is clipped for syn-select multiple ([#992](https://github.com/synergy-design-system/synergy-design-system/issues/992)) ([973933e](https://github.com/synergy-design-system/synergy-design-system/commit/973933e477a2cba1611c2f73f77e4e79d755c8a1))
|
|
7
|
+
|
|
1
8
|
# [@synergy-design-system/components-v2.40.0](https://github.com/synergy-design-system/synergy-design-system/compare/components/2.39.2...components/2.40.0) (2025-08-08)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -246,3 +246,47 @@ All shoelace files are per default readonly and are disabled from being changed.
|
|
|
246
246
|
### Adding events to the output
|
|
247
247
|
|
|
248
248
|
To add events to the component output, make sure to add them to `src/scripts/vendorism.js` into the `events` array that is defined there. After a new build run `via pnpm build`, you will see the new event files and the `events/events.ts` file will be regenerated.
|
|
249
|
+
|
|
250
|
+
### Adding metadata to components
|
|
251
|
+
|
|
252
|
+
Components can be enriched with metadata that automatically generates JSDoc annotations during the build process. The `add-metadata-to-components.js` script processes `*.component.ts` files and looks for corresponding `metadata.json` files to inject JSDoc tags.
|
|
253
|
+
|
|
254
|
+
#### Supported metadata types
|
|
255
|
+
|
|
256
|
+
- `@animation` - Component animations
|
|
257
|
+
- `@event` - Custom events
|
|
258
|
+
- `@slot` - Content slots
|
|
259
|
+
- `@dependency` - Dependencies
|
|
260
|
+
- `@csspart` - CSS parts for styling
|
|
261
|
+
- `@cssproperty` - CSS custom properties
|
|
262
|
+
|
|
263
|
+
#### Usage
|
|
264
|
+
|
|
265
|
+
Create a `metadata.json` file in your component directory:
|
|
266
|
+
|
|
267
|
+
```json
|
|
268
|
+
{
|
|
269
|
+
"@event": [
|
|
270
|
+
{ "name": "syn-change", "description": "Emitted when value changes" }
|
|
271
|
+
],
|
|
272
|
+
"@slot": [{ "name": "default", "description": "Main content" }],
|
|
273
|
+
"@csspart": [{ "name": "base", "description": "Base wrapper" }]
|
|
274
|
+
}
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
This will generate the following JSDoc annotations in your component:
|
|
278
|
+
|
|
279
|
+
```typescript
|
|
280
|
+
/**
|
|
281
|
+
* @summary Your component description
|
|
282
|
+
*
|
|
283
|
+
* @event syn-change - Emitted when value changes
|
|
284
|
+
* @slot default - Main content
|
|
285
|
+
* @csspart base - Base wrapper
|
|
286
|
+
*/
|
|
287
|
+
export default class YourComponent extends SynergyElement {
|
|
288
|
+
// Component implementation...
|
|
289
|
+
}
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
Each metadata object requires a `name` property and optionally accepts a `description`. Run `pnpm vendor.set` to process the metadata and automatically add JSDoc annotations to your component's class comment.
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [@synergy-design-system/tokens-v2.23.0](https://github.com/synergy-design-system/synergy-design-system/compare/tokens/2.22.0...tokens/2.23.0) (2025-08-19)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* ✨ export new sick2025 themes ([#985](https://github.com/synergy-design-system/synergy-design-system/issues/985)) ([148730d](https://github.com/synergy-design-system/synergy-design-system/commit/148730d68037ea74dc241ca6627aa6a32af876ab))
|
|
7
|
+
|
|
1
8
|
# [@synergy-design-system/tokens-v2.22.0](https://github.com/synergy-design-system/synergy-design-system/compare/tokens/2.21.0...tokens/2.22.0) (2025-08-07)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -23,8 +23,8 @@ As projects may use various forms of applying styles, we provide different ways
|
|
|
23
23
|
|
|
24
24
|
### Using CSS themes
|
|
25
25
|
|
|
26
|
-
Provides the css variables that are used in synergy components as css variables and is **required** if you are using `@synergy-design-system/components` or
|
|
27
|
-
The tokens package ships with two
|
|
26
|
+
Provides the css variables that are used in synergy components as css variables and is **required** if you are using `@synergy-design-system/components` or one of the framework packages like `@synergy-design-system/react`.
|
|
27
|
+
The tokens package ships two **themes** (sick2018 and sick2025), with each providing two **modes**: 🌞 light and 🌛 dark.
|
|
28
28
|
|
|
29
29
|
> The css styles are used as a single source of truth, also when working with the provided JavaScript or SASS exports!
|
|
30
30
|
> Always make sure to load one of the css themes!
|
|
@@ -34,9 +34,11 @@ The tokens package ships with two themes: 🌞 light and 🌛 dark.
|
|
|
34
34
|
<head>
|
|
35
35
|
<!-- Example 1: Referencing directly in a HTML document -->
|
|
36
36
|
<!-- Make sure to add the stylesheet before using any components -->
|
|
37
|
+
<!-- Note that "light.css" will point to the default theme of the tokens package. See table below for defaults -->
|
|
37
38
|
<link rel="stylesheet" href="/node_modules/@synergy-design-system/tokens/dist/themes/light.css" />
|
|
38
39
|
|
|
39
40
|
<!-- Alternative: Use the dark theme -->
|
|
41
|
+
<!-- Note that "dark.css" will point to the default theme of the tokens package. See table below for defaults -->
|
|
40
42
|
<link rel="stylesheet" href="/node_modules/@synergy-design-system/tokens/dist/themes/dark.css" />
|
|
41
43
|
</head>
|
|
42
44
|
<body>
|
|
@@ -51,10 +53,12 @@ The tokens package ships with two themes: 🌞 light and 🌛 dark.
|
|
|
51
53
|
|
|
52
54
|
You are also able to switch themes during the runtime. For the time being, we do not ship a utility function for this, as it is easy to implement. Each theme applies the variables via a `:root` selector, as well as a `className` that may be added to the `document.body`.
|
|
53
55
|
|
|
54
|
-
| Theme | Stylesheet to use
|
|
55
|
-
| :---- |
|
|
56
|
-
| light | `tokens/themes/
|
|
57
|
-
| dark | `tokens/themes/
|
|
56
|
+
| Theme | Mode | Stylesheet to use | Corresponding classNames | Default for Version |
|
|
57
|
+
| :------- | :---- | :--------------------------------- | :-------------------------------------- | :-----------------: |
|
|
58
|
+
| sick2018 | light | `tokens/themes/sick2018_light.css` | `syn-theme-light`, `syn-sick2018-light` | `2.0.0` |
|
|
59
|
+
| sick2018 | dark | `tokens/themes/sick2018_dark.css` | `syn-theme-dark`, `syn-sick2018-dark` | |
|
|
60
|
+
| sick2025 | light | `tokens/themes/sick2025_light.css` | `syn-sick2025-light` | `3.0.0` |
|
|
61
|
+
| sick2025 | dark | `tokens/themes/sick2025_dark.css` | `syn-sick2025-dark` | |
|
|
58
62
|
|
|
59
63
|
To switch the theme, proceed in the following way:
|
|
60
64
|
|
|
@@ -103,7 +107,12 @@ To switch the theme, proceed in the following way:
|
|
|
103
107
|
// Use this way when you already use a build system like webpack or vite
|
|
104
108
|
// to make it part of your bundle.
|
|
105
109
|
// Note this import should happen BEFORE you render any components!
|
|
110
|
+
|
|
111
|
+
// Light theme
|
|
106
112
|
import "@synergy-design-system/tokens/themes/light.css";
|
|
113
|
+
|
|
114
|
+
// Dark theme
|
|
115
|
+
import "@synergy-design-system/tokens/themes/dark.css";
|
|
107
116
|
```
|
|
108
117
|
|
|
109
118
|
---
|
|
@@ -200,13 +209,13 @@ Figma
|
|
|
200
209
|
↓
|
|
201
210
|
Figma REST API
|
|
202
211
|
↓
|
|
203
|
-
Raw JSON Files (src/figma-variables/)
|
|
212
|
+
Raw JSON Files (src/figma-variables/variableTokens.json + styleTokens.json)
|
|
204
213
|
↓
|
|
205
214
|
Transform Scripts (scripts/figma/)
|
|
206
215
|
↓
|
|
207
|
-
Style Dictionary compliant JSON Files (src/figma-variables/output)
|
|
216
|
+
Style Dictionary compliant JSON Files (src/figma-variables/output/)
|
|
208
217
|
↓
|
|
209
|
-
Style Dictionary Processing
|
|
218
|
+
Style Dictionary Processing (scripts/build.js)
|
|
210
219
|
↓
|
|
211
220
|
Build Output (dist/)
|
|
212
221
|
```
|
|
@@ -233,8 +242,17 @@ pnpm fetch:figma
|
|
|
233
242
|
# Only fetch variables and transform into Style Dictionary format
|
|
234
243
|
pnpm fetch:variables
|
|
235
244
|
|
|
236
|
-
# Only fetch styles
|
|
245
|
+
# Only fetch styles and transform into Style Dictionary format
|
|
237
246
|
pnpm fetch:styles
|
|
247
|
+
|
|
248
|
+
# Transform already fetched variables into Style Dictionary format
|
|
249
|
+
pnpm build:variables
|
|
250
|
+
|
|
251
|
+
# Transform already fetched styles into Style Dictionary format
|
|
252
|
+
pnpm build:styles
|
|
253
|
+
|
|
254
|
+
# Process transformed tokens with Style Dictionary (build final output)
|
|
255
|
+
pnpm build
|
|
238
256
|
```
|
|
239
257
|
|
|
240
258
|
#### Figma variables
|
|
@@ -244,6 +262,8 @@ Currently supported modes are:
|
|
|
244
262
|
|
|
245
263
|
- **sick2018-light**
|
|
246
264
|
- **sick2018-dark**
|
|
265
|
+
- **sick2025-light**
|
|
266
|
+
- **sick2025-dark**
|
|
247
267
|
|
|
248
268
|
For each mode a json file is created, with the corresponding tokens and values.
|
|
249
269
|
|
|
@@ -254,7 +274,7 @@ For the styles a separate `styles.json` is created.
|
|
|
254
274
|
#### Output
|
|
255
275
|
|
|
256
276
|
Outputs of the tokens are created using [Style Dictionary](https://amzn.github.io/style-dictionary/).
|
|
257
|
-
You can trigger a build using `pnpm build` in the `tokens` package root. This will create the css themes (located in `dist/themes
|
|
277
|
+
You can trigger a build using `pnpm build` in the `tokens` package root. This will create the css themes (located in `dist/themes/` with files like `light.css`, `dark.css`, `sick2018_light.css`, `sick2018_dark.css`, `sick2025_light.css`, and `sick2025_dark.css`), as well as the JavaScript exports (located at `dist/js/index.js`) and scss variables (`dist/scss/_tokens.scss`).
|
|
258
278
|
|
|
259
279
|
---
|
|
260
280
|
|
|
@@ -262,17 +282,20 @@ You can trigger a build using `pnpm build` in the `tokens` package root. This wi
|
|
|
262
282
|
|
|
263
283
|
#### `/src/figma-variables/`
|
|
264
284
|
|
|
265
|
-
- **`
|
|
285
|
+
- **`variableTokens.json`**: Raw data of Figma Variables and Collections, directly fetched from the Figma API
|
|
286
|
+
- **`styleTokens.json`**: Raw data of Figma Styles, directly fetched from the Figma API
|
|
266
287
|
- **`output/`**: Transformed token files in Style Dictionary-compatible formats
|
|
267
|
-
- `sick2018-light.json`: Light Theme Tokens
|
|
268
|
-
- `sick2018-dark.json`: Dark Theme Tokens
|
|
269
|
-
- `
|
|
288
|
+
- `sick2018-light.json`: Light Theme Tokens for SICK 2018
|
|
289
|
+
- `sick2018-dark.json`: Dark Theme Tokens for SICK 2018
|
|
290
|
+
- `sick2025-light.json`: Light Theme Tokens for SICK 2025
|
|
291
|
+
- `sick2025-dark.json`: Dark Theme Tokens for SICK 2025
|
|
270
292
|
|
|
271
293
|
#### `/scripts/figma/`
|
|
272
294
|
|
|
273
295
|
- **`fetch-variables.js`**: Downloads Figma Variables via the REST API
|
|
274
|
-
- **`transform-tokens.js`**: Transforms Figma Variables into Style Dictionary format
|
|
275
296
|
- **`style-dict-outputter.js`**: Custom outputter for Figma Styles export
|
|
297
|
+
- **`transform-tokens.js`**: Transforms Figma Variables into Style Dictionary format
|
|
298
|
+
- **`transform-styles.js`**: Transforms Figma Styles into Style Dictionary format
|
|
276
299
|
- **`helpers.js`**: Utility functions
|
|
277
300
|
|
|
278
301
|
#### `/scripts/add-missing-tokens.js`
|
|
@@ -314,7 +337,7 @@ The workflow is manually triggered using `workflow_dispatch` with configurable i
|
|
|
314
337
|
|
|
315
338
|
1. **Repository Setup**: Checks out the repository with full history
|
|
316
339
|
2. **Environment Setup**: Installs pnpm, Node.js 22, and project dependencies
|
|
317
|
-
3. **Token Synchronization**: Runs `pnpm -C ./packages/tokens fetch:figma` to fetch and transform Figma data
|
|
340
|
+
3. **Token Synchronization**: Runs `pnpm -C ./packages/tokens fetch:figma && pnpm -C ./packages/tokens build:figma` to fetch and transform Figma data
|
|
318
341
|
4. **Quality Assurance**: Builds and tests the updated tokens to ensure integrity
|
|
319
342
|
5. **Pull Request Creation**: Creates a new branch and pull request with the changes
|
|
320
343
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @synergy-design-system/tokens version 2.
|
|
2
|
+
* @synergy-design-system/tokens version 2.23.0
|
|
3
3
|
* SICK Global UX Foundation
|
|
4
4
|
* Do not edit directly, this file was auto-generated.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
:root, .syn-theme-dark {
|
|
7
|
+
:root, .syn-sick2018-dark, .syn-theme-dark {
|
|
8
8
|
color-scheme: dark;
|
|
9
9
|
|
|
10
10
|
--syn-border-radius-circle: 9999px;
|
|
@@ -242,10 +242,10 @@
|
|
|
242
242
|
--syn-shadow-medium: 0px 1px 2px 0px rgba(49, 55, 58, 0.08), 0px 1px 4px 0px rgba(49, 55, 58, 0.08), 0px 2px 8px 0px rgba(49, 55, 58, 0.08);
|
|
243
243
|
--syn-shadow-large: 0px 0px 3px 0px rgba(49, 55, 58, 0.12), 0px 2px 6px 0px rgba(49, 55, 58, 0.12), 0px 3px 8px 0px rgba(49, 55, 58, 0.16);
|
|
244
244
|
--syn-shadow-x-large: 0px 1px 4px 0px rgba(49, 55, 58, 0.12), 0px 8px 24px 0px rgba(49, 55, 58, 0.12), 0px 16px 48px 0px rgba(49, 55, 58, 0.16);
|
|
245
|
-
--syn-shadow-overflow-down: 0px 1px 4px 0px rgba(49, 55, 58, 0.12), 0px 3px 8px 0px rgba(49, 55, 58, 0.12), 0px 4px 12px 0px rgba(49, 55, 58, 0.16);
|
|
246
|
-
--syn-shadow-overflow-up: 0px -1px 4px 0px rgba(49, 55, 58, 0.12), 0px -3px 8px 0px rgba(49, 55, 58, 0.12), 0px -4px 12px 0px rgba(49, 55, 58, 0.16);
|
|
247
|
-
--syn-shadow-overflow-left: -1px 0px 4px 0px rgba(49, 55, 58, 0.12), -3px 0px 8px 0px rgba(49, 55, 58, 0.12), -4px 0px 12px 0px rgba(49, 55, 58, 0.16);
|
|
248
|
-
--syn-shadow-overflow-right: 1px 0px 4px 0px rgba(49, 55, 58, 0.12), 3px 0px 8px 0px rgba(49, 55, 58, 0.12), 4px 0px 12px 0px rgba(49, 55, 58, 0.16);
|
|
245
|
+
--syn-shadow-overflow-down: 0px 1px 4px 0px rgba(49, 55, 58, 0.12), 0px 3px 8px 0px rgba(49, 55, 58, 0.12), 0px 4px 12px 0px rgba(49, 55, 58, 0.16);
|
|
246
|
+
--syn-shadow-overflow-up: 0px -1px 4px 0px rgba(49, 55, 58, 0.12), 0px -3px 8px 0px rgba(49, 55, 58, 0.12), 0px -4px 12px 0px rgba(49, 55, 58, 0.16);
|
|
247
|
+
--syn-shadow-overflow-left: -1px 0px 4px 0px rgba(49, 55, 58, 0.12), -3px 0px 8px 0px rgba(49, 55, 58, 0.12), -4px 0px 12px 0px rgba(49, 55, 58, 0.16);
|
|
248
|
+
--syn-shadow-overflow-right: 1px 0px 4px 0px rgba(49, 55, 58, 0.12), 3px 0px 8px 0px rgba(49, 55, 58, 0.12), 4px 0px 12px 0px rgba(49, 55, 58, 0.16);
|
|
249
249
|
--syn-shadow-x-small: 0px 1px 2px 0px rgba(49, 55, 58, 0.04), 0px 1px 4px 0px rgba(49, 55, 58, 0.04), 0px 2px 8px 0px rgba(49, 55, 58, 0.04);
|
|
250
250
|
--syn-shadow-small: 0px 1px 2px 0px rgba(49, 55, 58, 0.06), 0px 1px 4px 0px rgba(49, 55, 58, 0.06), 0px 2px 8px 0px rgba(49, 55, 58, 0.06);
|
|
251
251
|
--syn-body-x-small-regular: 400 12px/1.4 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @synergy-design-system/tokens version 2.
|
|
2
|
+
* @synergy-design-system/tokens version 2.23.0
|
|
3
3
|
* SICK Global UX Foundation
|
|
4
4
|
* Do not edit directly, this file was auto-generated.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
:root, .syn-theme-light {
|
|
7
|
+
:root, .syn-sick2018-light, .syn-theme-light {
|
|
8
8
|
color-scheme: light;
|
|
9
9
|
|
|
10
10
|
--syn-border-radius-circle: 9999px;
|
|
@@ -242,10 +242,10 @@
|
|
|
242
242
|
--syn-shadow-medium: 0px 1px 2px 0px rgba(49, 55, 58, 0.08), 0px 1px 4px 0px rgba(49, 55, 58, 0.08), 0px 2px 8px 0px rgba(49, 55, 58, 0.08);
|
|
243
243
|
--syn-shadow-large: 0px 0px 3px 0px rgba(49, 55, 58, 0.12), 0px 2px 6px 0px rgba(49, 55, 58, 0.12), 0px 3px 8px 0px rgba(49, 55, 58, 0.16);
|
|
244
244
|
--syn-shadow-x-large: 0px 1px 4px 0px rgba(49, 55, 58, 0.12), 0px 8px 24px 0px rgba(49, 55, 58, 0.12), 0px 16px 48px 0px rgba(49, 55, 58, 0.16);
|
|
245
|
-
--syn-shadow-overflow-down: 0px 1px 4px 0px rgba(49, 55, 58, 0.12), 0px 3px 8px 0px rgba(49, 55, 58, 0.12), 0px 4px 12px 0px rgba(49, 55, 58, 0.16);
|
|
246
|
-
--syn-shadow-overflow-up: 0px -1px 4px 0px rgba(49, 55, 58, 0.12), 0px -3px 8px 0px rgba(49, 55, 58, 0.12), 0px -4px 12px 0px rgba(49, 55, 58, 0.16);
|
|
247
|
-
--syn-shadow-overflow-left: -1px 0px 4px 0px rgba(49, 55, 58, 0.12), -3px 0px 8px 0px rgba(49, 55, 58, 0.12), -4px 0px 12px 0px rgba(49, 55, 58, 0.16);
|
|
248
|
-
--syn-shadow-overflow-right: 1px 0px 4px 0px rgba(49, 55, 58, 0.12), 3px 0px 8px 0px rgba(49, 55, 58, 0.12), 4px 0px 12px 0px rgba(49, 55, 58, 0.16);
|
|
245
|
+
--syn-shadow-overflow-down: 0px 1px 4px 0px rgba(49, 55, 58, 0.12), 0px 3px 8px 0px rgba(49, 55, 58, 0.12), 0px 4px 12px 0px rgba(49, 55, 58, 0.16);
|
|
246
|
+
--syn-shadow-overflow-up: 0px -1px 4px 0px rgba(49, 55, 58, 0.12), 0px -3px 8px 0px rgba(49, 55, 58, 0.12), 0px -4px 12px 0px rgba(49, 55, 58, 0.16);
|
|
247
|
+
--syn-shadow-overflow-left: -1px 0px 4px 0px rgba(49, 55, 58, 0.12), -3px 0px 8px 0px rgba(49, 55, 58, 0.12), -4px 0px 12px 0px rgba(49, 55, 58, 0.16);
|
|
248
|
+
--syn-shadow-overflow-right: 1px 0px 4px 0px rgba(49, 55, 58, 0.12), 3px 0px 8px 0px rgba(49, 55, 58, 0.12), 4px 0px 12px 0px rgba(49, 55, 58, 0.16);
|
|
249
249
|
--syn-shadow-x-small: 0px 1px 2px 0px rgba(49, 55, 58, 0.04), 0px 1px 4px 0px rgba(49, 55, 58, 0.04), 0px 2px 8px 0px rgba(49, 55, 58, 0.04);
|
|
250
250
|
--syn-shadow-small: 0px 1px 2px 0px rgba(49, 55, 58, 0.06), 0px 1px 4px 0px rgba(49, 55, 58, 0.06), 0px 2px 8px 0px rgba(49, 55, 58, 0.06);
|
|
251
251
|
--syn-body-x-small-regular: 400 12px/1.4 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
|