@rijkshuisstijl-community/design-tokens 1.2.0 → 2.0.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 +27 -0
- package/README.md +153 -12
- package/dist/_variables.scss +94 -78
- package/dist/index.css +94 -78
- package/dist/index.d.ts +48 -32
- package/dist/index.js +94 -78
- package/dist/index.json +93 -77
- package/dist/index.tokens.json +113 -85
- package/dist/root.css +94 -78
- package/dist/tokens.d.ts +67 -39
- package/dist/tokens.js +1285 -921
- package/dist/uitvoerend-groen/_variables.scss +1337 -0
- package/dist/uitvoerend-groen/index.css +1340 -0
- package/dist/{uitvoerend-mintgroen-focus → uitvoerend-groen}/index.d.ts +922 -911
- package/dist/uitvoerend-groen/index.js +1338 -0
- package/dist/uitvoerend-groen/index.json +1335 -0
- package/dist/uitvoerend-groen/index.tokens.json +2049 -0
- package/dist/uitvoerend-groen/root.css +1340 -0
- package/dist/{uitvoerend-mintgroen-focus → uitvoerend-groen}/tokens.d.ts +1508 -1513
- package/dist/uitvoerend-groen/tokens.js +31258 -0
- package/dist/uitvoerend-hemelblauw/_variables.scss +1337 -0
- package/dist/uitvoerend-hemelblauw/index.css +1340 -0
- package/dist/uitvoerend-hemelblauw/index.d.ts +1338 -0
- package/dist/uitvoerend-hemelblauw/index.js +1338 -0
- package/dist/uitvoerend-hemelblauw/index.json +1335 -0
- package/dist/uitvoerend-hemelblauw/index.tokens.json +2049 -0
- package/dist/uitvoerend-hemelblauw/root.css +1340 -0
- package/dist/uitvoerend-hemelblauw/tokens.d.ts +2072 -0
- package/dist/uitvoerend-hemelblauw/tokens.js +31258 -0
- package/dist/{uitvoerend-mintgroen-focus → uitvoerend-mintgroen}/_variables.scss +778 -767
- package/dist/{uitvoerend-mintgroen-focus → uitvoerend-mintgroen}/index.css +779 -768
- package/dist/uitvoerend-mintgroen/index.d.ts +1338 -0
- package/dist/{uitvoerend-mintgroen-focus → uitvoerend-mintgroen}/index.js +981 -970
- package/dist/{uitvoerend-mintgroen-focus → uitvoerend-mintgroen}/index.json +980 -969
- package/dist/{uitvoerend-mintgroen-focus → uitvoerend-mintgroen}/index.tokens.json +1611 -1616
- package/dist/{uitvoerend-mintgroen-focus → uitvoerend-mintgroen}/root.css +778 -767
- package/dist/uitvoerend-mintgroen/tokens.d.ts +2072 -0
- package/dist/{uitvoerend-mintgroen-focus → uitvoerend-mintgroen}/tokens.js +22466 -22247
- package/dist/uitvoerend-oranje/_variables.scss +1337 -0
- package/dist/uitvoerend-oranje/index.css +1340 -0
- package/dist/uitvoerend-oranje/index.d.ts +1338 -0
- package/dist/uitvoerend-oranje/index.js +1338 -0
- package/dist/uitvoerend-oranje/index.json +1335 -0
- package/dist/uitvoerend-oranje/index.tokens.json +2049 -0
- package/dist/uitvoerend-oranje/root.css +1340 -0
- package/dist/uitvoerend-oranje/tokens.d.ts +2072 -0
- package/dist/uitvoerend-oranje/tokens.js +31258 -0
- package/dist/uitvoerend-paars/_variables.scss +1337 -0
- package/dist/uitvoerend-paars/index.css +1340 -0
- package/dist/uitvoerend-paars/index.d.ts +1338 -0
- package/dist/uitvoerend-paars/index.js +1338 -0
- package/dist/uitvoerend-paars/index.json +1335 -0
- package/dist/uitvoerend-paars/index.tokens.json +2049 -0
- package/dist/uitvoerend-paars/root.css +1340 -0
- package/dist/uitvoerend-paars/tokens.d.ts +2072 -0
- package/dist/uitvoerend-paars/tokens.js +31258 -0
- package/dist/uitvoerend-violet/_variables.scss +191 -175
- package/dist/uitvoerend-violet/index.css +191 -175
- package/dist/uitvoerend-violet/index.d.ts +88 -72
- package/dist/uitvoerend-violet/index.js +191 -175
- package/dist/uitvoerend-violet/index.json +190 -174
- package/dist/uitvoerend-violet/index.tokens.json +227 -199
- package/dist/uitvoerend-violet/root.css +191 -175
- package/dist/uitvoerend-violet/tokens.d.ts +123 -95
- package/dist/uitvoerend-violet/tokens.js +16557 -16193
- package/dist/uitvoerend-violet-oud/_variables.scss +191 -174
- package/dist/uitvoerend-violet-oud/index.css +191 -174
- package/dist/uitvoerend-violet-oud/index.d.ts +88 -71
- package/dist/uitvoerend-violet-oud/index.js +191 -174
- package/dist/uitvoerend-violet-oud/index.json +190 -173
- package/dist/uitvoerend-violet-oud/index.tokens.json +227 -198
- package/dist/uitvoerend-violet-oud/root.css +191 -174
- package/dist/uitvoerend-violet-oud/tokens.d.ts +123 -94
- package/dist/uitvoerend-violet-oud/tokens.js +12703 -12318
- package/dist/wetgevend/_variables.scss +131 -115
- package/dist/wetgevend/index.css +131 -115
- package/dist/wetgevend/index.d.ts +88 -72
- package/dist/wetgevend/index.js +131 -115
- package/dist/wetgevend/index.json +130 -114
- package/dist/wetgevend/index.tokens.json +167 -139
- package/dist/wetgevend/root.css +131 -115
- package/dist/wetgevend/tokens.d.ts +123 -95
- package/dist/wetgevend/tokens.js +12053 -11689
- package/figma/figma.tokens.json +840 -294
- package/package.json +1 -1
- package/src/generated/base.tokens.json +240 -163
- package/src/generated/themes.json +30580 -5292
- package/src/generated/uitvoerend-groen/tokens.json +6252 -0
- package/src/generated/uitvoerend-hemelblauw/tokens.json +6252 -0
- package/src/generated/{uitvoerend-mintgroen-focus → uitvoerend-mintgroen}/tokens.json +4384 -4355
- package/src/generated/uitvoerend-oranje/tokens.json +6252 -0
- package/src/generated/uitvoerend-paars/tokens.json +6252 -0
- package/src/generated/uitvoerend-violet/tokens.json +506 -429
- package/src/generated/uitvoerend-violet-oud/tokens.json +512 -431
- package/src/generated/wetgevend/tokens.json +467 -390
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
# @rijkshuisstijl-community/design-tokens
|
|
2
2
|
|
|
3
|
+
## 2.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- 158d711: Added 'Uitvoerend - Paars' Theme
|
|
8
|
+
Deprecated @rijkshuisstijl-community/mijnoverheid-design-tokens
|
|
9
|
+
Deprecated @rijkshuisstijl-community/logius-design-tokens
|
|
10
|
+
Deprecated @rijkshuisstijl-community/digid-design-tokens
|
|
11
|
+
Deprecated @rijkshuisstijl-community/rivm-design-tokens
|
|
12
|
+
These themes are now found in: @rijkshuisstijl-community/design-tokens
|
|
13
|
+
- 5209b0c: ### Nieuwe tokens
|
|
14
|
+
|
|
15
|
+
- `rhc.color.foreground.on-light-color` toegevoegd
|
|
16
|
+
- Rounded corner tokens toegevoegd
|
|
17
|
+
- Nieuwe tokenset `components/blockquote` toegevoegd
|
|
18
|
+
|
|
19
|
+
### Hernoemingen en refactor
|
|
20
|
+
|
|
21
|
+
- `rhc.color.foregrond.onEmphisis` hernoemd naar `rhc.color.foreground.on-dark-color`. (oude naam blijft tijdelijk beschikbaar om bugs te voorkomen)
|
|
22
|
+
- `rhc.border-radius.keep` vervangen door de nieuwe rounded corner tokens
|
|
23
|
+
- Tokenset `common/keep` hernoemd naar `common/keep-oud`
|
|
24
|
+
- Tokenset `components/blockquote` verplaatst naar `components/blockquote-oud` (legacy totdat het component is geüpdatet)
|
|
25
|
+
|
|
26
|
+
### Overige
|
|
27
|
+
|
|
28
|
+
- Stijl en design tokens voor het `blockquote` component geüpdatet
|
|
29
|
+
|
|
3
30
|
## 1.2.0
|
|
4
31
|
|
|
5
32
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -2,26 +2,167 @@
|
|
|
2
2
|
|
|
3
3
|
# Rijkshuisstijl design tokens
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
_Dit project wordt **niet** gesteund door het Ministerie van Algemene Zaken._
|
|
6
6
|
|
|
7
|
-
**
|
|
7
|
+
**Het toepassen van design-elementen uit dit project is strikt verboden voor organisaties die geen deel uitmaken van de
|
|
8
|
+
centrale overheid van Nederland.**
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
Dit project maakt deel uit van een samenwerkingsverband om [NL Design System](https://nldesignsystem.nl)-componenten te gebruiken voor projecten die moeten voldoen aan de Rijkshuisstijl. Organisaties van de centrale overheid van
|
|
11
|
+
Nederland (bijvoorbeeld: [Belastingdienst](https://www.belastingdienst.nl/), [DUO](https://www.duo.nl), [Logius](http://logius.nl), [SVB](https://www.svb.nl/))
|
|
12
|
+
en degenen die door hen zijn ingehuurd voor het ontwikkelen van websites en apps, kunnen via dit project samenwerken.
|
|
10
13
|
|
|
11
|
-
|
|
14
|
+
# Tokens gebruiken in eigen project
|
|
12
15
|
|
|
13
|
-
|
|
16
|
+
Hieronder vind je instructies hoe je de standaard Rijkshuisstijl-community tokens in je project kan toepassen.
|
|
14
17
|
|
|
15
|
-
|
|
18
|
+
1. Installeer je het [design-tokens npm package](https://www.npmjs.com/package/@rijkshuisstijl-community/design-tokens).
|
|
16
19
|
|
|
17
|
-
|
|
20
|
+
```bash
|
|
21
|
+
npm install --save-dev @rijkshuisstijl-community/design-tokens
|
|
18
22
|
|
|
19
|
-
|
|
23
|
+
# En als je CSS classes wilt importeren
|
|
24
|
+
npm install --save-dev @rijkshuisstijl-community/components-css
|
|
25
|
+
```
|
|
20
26
|
|
|
21
|
-
|
|
27
|
+
Dit pakket bevat de CSS-variabelen van het design systeem. Importeer het `index.css`-bestand uit de `dist` map van het pakket, en omring het deel van je applicatie waar je het thema wilt toepassen. Het Rijkshuisstijl-thema is bijvoorbeeld: `rhc-theme`.
|
|
22
28
|
|
|
23
|
-
|
|
29
|
+
2. Pas het thema toe in je project, hieronder een voorbeeld in HTML
|
|
24
30
|
|
|
25
|
-
|
|
31
|
+
```html
|
|
32
|
+
<!-- Als je het default Rijkshuisstijl community thema wilt gebruiken, gebruik .rhc-theme -->
|
|
33
|
+
<link rel="stylesheet" href="node_modules/@rijkshuisstijl-community/design-tokens/dist/index.css" />
|
|
34
|
+
<!-- Of als je een eigen thema wilt importeren, gebruik het thema naam als class name -->
|
|
35
|
+
<link rel="stylesheet" href="@rijkshuisstijl-community/design-tokens/dist/<thema naam>/index.css" />
|
|
36
|
+
<!-- Mogelijk wil je ook de CSS classes importeren als je Rijkshuijsstijl-community componenten gebruikt -->
|
|
37
|
+
<link rel="stylesheet" href="node_modules/@rijkshuisstijl-community/components-css/dist/index.css" />
|
|
26
38
|
|
|
27
|
-
|
|
39
|
+
<body class="rhc-theme">
|
|
40
|
+
<button class="rhc-button">Click Here!</button>
|
|
41
|
+
</div>
|
|
42
|
+
</body>
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
# Nieuw thema toevoegen
|
|
46
|
+
|
|
47
|
+
Er zijn al verschillende bedrijfsthema's in de @rijkshuisstijl-community/design-tokens package waarvoor (gedeeltelijke) support is vanuit de Rijkshuisstijl-community. Hieronder volgt een uitleg hoe nog meer thema's kunnen worden toegevoegd
|
|
48
|
+
|
|
49
|
+
## Nieuwe thema tokens
|
|
50
|
+
|
|
51
|
+
1. Voeg de nieuwe tokens toe aan het [design tokens bestand](https://github.com/nl-design-system/rijkshuisstijl-community/blob/main/proprietary/design-tokens/figma/figma.tokens.json). Mogelijk is het voor designers handiger om dit direct in Figma te doen. Zie hieronder in hoe je een thema direct in JSON toe kan voegen:
|
|
52
|
+
|
|
53
|
+
```json
|
|
54
|
+
{
|
|
55
|
+
// ...
|
|
56
|
+
|
|
57
|
+
// Definieer specifieke set tokens die je wilt overschrijven met een duidelijke naam. Voeg indien nodig meerdere overwrites sets toe.
|
|
58
|
+
"overwrites/primaire kleur/mintgroen": {
|
|
59
|
+
// Geef aan welke tokens overschreven moeten worden
|
|
60
|
+
"rhc": {
|
|
61
|
+
"color": {
|
|
62
|
+
"primary": {
|
|
63
|
+
"50": {
|
|
64
|
+
"value": "{rhc.color.mintgroen.50}",
|
|
65
|
+
"type": "color"
|
|
66
|
+
},
|
|
67
|
+
"100": {
|
|
68
|
+
"value": "{rhc.color.mintgroen.100}",
|
|
69
|
+
"type": "color"
|
|
70
|
+
},
|
|
71
|
+
"200": {
|
|
72
|
+
"value": "{rhc.color.mintgroen.200}",
|
|
73
|
+
"type": "color"
|
|
74
|
+
},
|
|
75
|
+
"300": {
|
|
76
|
+
"value": "{rhc.color.mintgroen.300}",
|
|
77
|
+
"type": "color"
|
|
78
|
+
},
|
|
79
|
+
"400": {
|
|
80
|
+
"value": "{rhc.color.mintgroen.400}",
|
|
81
|
+
"type": "color"
|
|
82
|
+
},
|
|
83
|
+
"500": {
|
|
84
|
+
"value": "{rhc.color.mintgroen.500}",
|
|
85
|
+
"type": "color"
|
|
86
|
+
},
|
|
87
|
+
"hover": {
|
|
88
|
+
"value": "{rhc.color.primary.500}",
|
|
89
|
+
"type": "color",
|
|
90
|
+
"$extensions": {
|
|
91
|
+
"studio.tokens": {
|
|
92
|
+
"modify": {
|
|
93
|
+
"type": "darken",
|
|
94
|
+
"value": "0.3",
|
|
95
|
+
"space": "lch"
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
// Nog een overwrite
|
|
105
|
+
"overwrites/border/geen border radius": {
|
|
106
|
+
"rhc": {
|
|
107
|
+
"border-radius": {
|
|
108
|
+
"sm": {
|
|
109
|
+
"value": "0",
|
|
110
|
+
"type": "borderRadius"
|
|
111
|
+
},
|
|
112
|
+
"md": {
|
|
113
|
+
"value": "0",
|
|
114
|
+
"type": "borderRadius"
|
|
115
|
+
},
|
|
116
|
+
"lg": {
|
|
117
|
+
"value": "0",
|
|
118
|
+
"type": "borderRadius"
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
// ...
|
|
124
|
+
|
|
125
|
+
"$themes": [
|
|
126
|
+
// ...
|
|
127
|
+
{
|
|
128
|
+
"id": "<thema ID>", // Wordt niet gebruikt door een build step, maar wel voor Figma
|
|
129
|
+
"name": "<thema naam>", // Dit wordt ook de class name voor het thema
|
|
130
|
+
"$figmaStyleReferences": {},
|
|
131
|
+
"selectedTokenSets": {
|
|
132
|
+
// Voeg eerst de sets toe die dit thema support
|
|
133
|
+
"<token set 1>": "enabled",
|
|
134
|
+
"<token set 2>": "enabled",
|
|
135
|
+
"<etcetera...>": "enabled",
|
|
136
|
+
// Voeg daarna de overwrites toe die je wilt toevoegen aan je thema
|
|
137
|
+
"overwrites/primaire kleur/mintgroen": "enabled",
|
|
138
|
+
"overwrites/border/geen border radius": "enabled"
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
]
|
|
142
|
+
}
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
2. Voeg het nieuwe thema toe in de [storybook preview.tsx](https://github.com/nl-design-system/rijkshuisstijl-community/blob/main/packages/storybook/config/preview.tsx)
|
|
146
|
+
|
|
147
|
+
```tsx
|
|
148
|
+
// ...
|
|
149
|
+
// Voeg import toe
|
|
150
|
+
import '@rijkshuisstijl-community/design-tokens/dist/<thema naam>/index.css';
|
|
151
|
+
// ...
|
|
152
|
+
|
|
153
|
+
const preview: Preview = {
|
|
154
|
+
decorators: [
|
|
155
|
+
withThemeByClassName({
|
|
156
|
+
themes: {
|
|
157
|
+
// Voeg thema toe in storybook thema dropdown
|
|
158
|
+
'<Thema naam in dropdown>': '<thema naam>',
|
|
159
|
+
// ...
|
|
160
|
+
},
|
|
161
|
+
// ...
|
|
162
|
+
}),
|
|
163
|
+
// ...
|
|
164
|
+
],
|
|
165
|
+
// ...
|
|
166
|
+
};
|
|
167
|
+
export default preview;
|
|
168
|
+
```
|