@utrecht/design-tokens 1.0.0-alpha.21 → 1.0.0-alpha.210
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/README.md +19 -9
- package/dist/_variables.scss +377 -146
- package/dist/custom.css +14 -0
- package/dist/custom.css.map +1 -1
- package/dist/index.css +377 -146
- package/dist/index.d.ts +612 -0
- package/dist/index.js +396 -165
- package/dist/index.json +16148 -10734
- package/dist/index.tokens.json +17980 -0
- package/dist/{properties.css → property.css} +187 -28
- package/dist/root.css +614 -0
- package/dist/tokens.d.ts +1809 -0
- package/dist/tokens.js +17985 -0
- package/dist/variables.less +611 -0
- package/package.json +9 -6
- package/src/arrow-dropdown.svg +1 -0
- package/src/brand/utrecht/{color.style-dictionary.json → color.tokens.json} +8 -3
- package/src/brand/utrecht/typography.tokens.json +46 -0
- package/src/common/utrecht/action.tokens.json +10 -0
- package/src/common/utrecht/{border.style-dictionary.json → border.tokens.json} +0 -0
- package/src/common/utrecht/{feedback-variant.style-dictionary.json → feedback-variant.tokens.json} +18 -18
- package/src/common/utrecht/{feedback.style-dictionary.json → feedback.tokens.json} +27 -27
- package/src/common/utrecht/focus.tokens.json +15 -0
- package/src/common/utrecht/{space.style-dictionary.json → space.tokens.json} +21 -20
- package/src/component/den-haag/process-steps.tokens.json +97 -0
- package/src/component/utrecht/{article/block.style-dictionary.json → article.tokens.json} +0 -0
- package/src/component/utrecht/backdrop.tokens.json +15 -0
- package/src/component/utrecht/{badge-counter/block.style-dictionary.json → badge-counter.tokens.json} +5 -2
- package/src/component/utrecht/{badge-data/block.style-dictionary.json → badge-data.tokens.json} +0 -0
- package/src/component/utrecht/{badge-status/block.style-dictionary.json → badge-status.tokens.json} +0 -0
- package/src/component/utrecht/badge.tokens.json +25 -0
- package/src/component/utrecht/{blockquote/block.style-dictionary.json → blockquote.tokens.json} +9 -1
- package/src/component/utrecht/breadcrumb.tokens.json +47 -0
- package/src/component/utrecht/button.tokens.json +53 -0
- package/src/component/utrecht/custom-checkbox.tokens.json +56 -0
- package/src/component/utrecht/{document/block.style-dictionary.json → document.tokens.json} +4 -4
- package/src/component/utrecht/{emphasis/modifier.style-dictionary.json → emphasis.tokens.json} +1 -1
- package/src/component/utrecht/{form-field/block.style-dictionary.json → form-field.tokens.json} +2 -2
- package/src/component/utrecht/form-fieldset.tokens.json +18 -0
- package/src/component/utrecht/form-input.tokens.json +34 -0
- package/src/component/utrecht/{form-label/modifier.style-dictionary.json → form-label.tokens.json} +4 -2
- package/src/component/utrecht/form-toggle.tokens.json +43 -0
- package/src/component/utrecht/heading-1.tokens.json +15 -0
- package/src/component/utrecht/heading-2.tokens.json +15 -0
- package/src/component/utrecht/heading-3.tokens.json +15 -0
- package/src/component/utrecht/heading-4.tokens.json +15 -0
- package/src/component/utrecht/heading-5.tokens.json +15 -0
- package/src/component/utrecht/heading-6.tokens.json +15 -0
- package/src/component/utrecht/{form-label/block.style-dictionary.json → heading.tokens.json} +4 -3
- package/src/component/utrecht/link-list.tokens.json +19 -0
- package/src/component/utrecht/link.tokens.json +24 -0
- package/src/component/utrecht/logo.tokens.json +8 -0
- package/src/component/utrecht/mapcontrolbutton.tokens.json +44 -0
- package/src/component/utrecht/menulijst.tokens.json +12 -0
- package/src/component/utrecht/ordered-list.tokens.json +26 -0
- package/src/component/utrecht/page-content.tokens.json +8 -0
- package/src/component/utrecht/page-footer/_custom.scss +2 -0
- package/src/component/utrecht/{page-footer/block.style-dictionary.json → page-footer.tokens.json} +3 -3
- package/src/component/utrecht/page-header.tokens.json +10 -0
- package/src/component/utrecht/page.tokens.json +15 -0
- package/src/component/utrecht/pagination.tokens.json +59 -0
- package/src/component/utrecht/paragraph.tokens.json +17 -0
- package/src/component/utrecht/pre-heading.tokens.json +20 -0
- package/src/component/utrecht/search-bar.tokens.json +38 -0
- package/src/component/utrecht/{textbox/modifier.style-dictionary.json → select.tokens.json} +3 -2
- package/src/component/utrecht/separator.tokens.json +10 -0
- package/src/component/utrecht/sidenav.tokens.json +27 -0
- package/src/component/utrecht/surface.tokens.json +8 -0
- package/src/component/utrecht/{table/element.style-dictionary.json → table.tokens.json} +17 -7
- package/src/component/utrecht/{textarea/modifier.style-dictionary.json → textarea.tokens.json} +2 -1
- package/src/component/utrecht/textbox.tokens.json +7 -0
- package/src/component/utrecht/topnav.tokens.json +25 -0
- package/src/component/utrecht/toptask-link.tokens.json +28 -0
- package/src/component/utrecht/toptask-nav.tokens.json +14 -0
- package/src/component/utrecht/unordered-list/{block.style-dictionary.json → block.tokens.json} +0 -0
- package/src/component/utrecht/unordered-list/{element.style-dictionary.json → element.tokens.json} +1 -1
- package/src/component/utrecht/unordered-list.tokens.json +15 -0
- package/src/custom.scss +13 -0
- package/src/icoon-zoek-rood.svg +1 -0
- package/src/json-list-formatter.js +14 -0
- package/src/pijltje-wit.svg +1 -0
- package/src/pijltje-zwart.svg +1 -0
- package/src/pijltje.svg +1 -0
- package/src/style-dictionary-config.js +21 -6
- package/style-dictionary.config.json +32 -5
- package/dist/index.less +0 -380
- package/dist/theme/index.css +0 -383
- package/src/brand/utrecht/typography.style-dictionary.json +0 -23
- package/src/common/utrecht/focus.style-dictionary.json +0 -15
- package/src/component/utrecht/badge/block.style-dictionary.json +0 -22
- package/src/component/utrecht/blockquote/element.style-dictionary.json +0 -14
- package/src/component/utrecht/breadcrumb/block.style-dictionary.json +0 -12
- package/src/component/utrecht/breadcrumb/element-modifier.style-dictionary.json +0 -16
- package/src/component/utrecht/breadcrumb/element.style-dictionary.json +0 -33
- package/src/component/utrecht/button/block.style-dictionary.json +0 -18
- package/src/component/utrecht/button/modifier-state.style-dictionary.json +0 -24
- package/src/component/utrecht/button/modifier.style-dictionary.json +0 -16
- package/src/component/utrecht/button/state.style-dictionary.json +0 -15
- package/src/component/utrecht/form-input/block.style-dictionary.json +0 -10
- package/src/component/utrecht/form-input/element.style-dictionary.json +0 -9
- package/src/component/utrecht/form-input/modifier.style-dictionary.json +0 -9
- package/src/component/utrecht/heading/block.style-dictionary.json +0 -71
- package/src/component/utrecht/link/block.style-dictionary.json +0 -8
- package/src/component/utrecht/link/modifier.style-dictionary.json +0 -20
- package/src/component/utrecht/mapcontrolbutton/block.style-dictionary.json +0 -22
- package/src/component/utrecht/mapcontrolbutton/state.style-dictionary.json +0 -24
- package/src/component/utrecht/menulijst/element-state.style-dictionary.json +0 -11
- package/src/component/utrecht/menulijst/element.style-dictionary.json +0 -9
- package/src/component/utrecht/navigatie/element-modifier.style-dictionary.json +0 -37
- package/src/component/utrecht/navigatie/element.style-dictionary.json +0 -28
- package/src/component/utrecht/paragraph/block.style-dictionary.json +0 -12
- package/src/component/utrecht/paragraph/modifier.style-dictionary.json +0 -11
- package/src/component/utrecht/separator/block.style-dictionary.json +0 -9
- package/src/component/utrecht/table/block.style-dictionary.json +0 -8
- package/src/component/utrecht/table/element-modifier.style-dictionary.json +0 -16
- package/src/component/utrecht/textarea/block.style-dictionary.json +0 -18
- package/src/component/utrecht/textbox/block.style-dictionary.json +0 -18
package/README.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
<!-- @license CC0-1.0 -->
|
|
2
|
+
|
|
1
3
|
# Design Tokens for the Utrecht Design System
|
|
2
4
|
|
|
3
|
-
**This project is very much WORK IN PROGRESS and
|
|
5
|
+
**This project is very much WORK IN PROGRESS and most parts are released as _alpha_ version. Always define the exact version you want to use, and test for breaking changes before upgrading to a newer alpha release.**
|
|
4
6
|
|
|
5
7
|
Design tokens are design decisions for our design system, in this case maintained in JSON files, and distributed in various other code languages for easy reuse.
|
|
6
8
|
|
|
@@ -8,7 +10,7 @@ The design tokens in this package serve as single source of truth for the look a
|
|
|
8
10
|
|
|
9
11
|
## List of all design tokens
|
|
10
12
|
|
|
11
|
-
To find out what design tokens are available, browser through the `.
|
|
13
|
+
To find out what design tokens are available, browser through the `.tokens.json` files in the `src/` directory.
|
|
12
14
|
|
|
13
15
|
We currently don't have any additional documentation for every specific design token.
|
|
14
16
|
|
|
@@ -26,7 +28,7 @@ Design decisions at a component level, to make components look a very specific w
|
|
|
26
28
|
|
|
27
29
|
## Files in this package
|
|
28
30
|
|
|
29
|
-
### `dist/
|
|
31
|
+
### `dist/index.css`
|
|
30
32
|
|
|
31
33
|
Opt-in way to apply all the CSS variables to HTML elements with the `utrecht-theme` class name:
|
|
32
34
|
|
|
@@ -39,7 +41,7 @@ Opt-in way to apply all the CSS variables to HTML elements with the `utrecht-the
|
|
|
39
41
|
|
|
40
42
|
This method is the preferred way to style the page.
|
|
41
43
|
|
|
42
|
-
### `dist/
|
|
44
|
+
### `dist/root.css`
|
|
43
45
|
|
|
44
46
|
Automatically applies all the CSS variables to HTML elements to the `:root` element:
|
|
45
47
|
|
|
@@ -52,12 +54,12 @@ Automatically applies all the CSS variables to HTML elements to the `:root` elem
|
|
|
52
54
|
|
|
53
55
|
This method should only be used in case there is no control over the HTML template and the `utrecht-theme` class name cannot be included.
|
|
54
56
|
|
|
55
|
-
### `dist/
|
|
57
|
+
### `dist/property.css`
|
|
56
58
|
|
|
57
59
|
Experimental CSS `@property` definitions for the design tokens that are configurable via CSS custom properties. Including these definitions is not necessarily side-effect free: with `syntax` _invalid values for custom properties will be ignored_, and `inherits` and `initial-value` declarations can influence behavior. Because [not all browsers support the `@property` declaration](https://caniuse.com/mdn-css_at-rules_property), including this file can result in rendering differences between browsers.
|
|
58
60
|
|
|
59
61
|
```html
|
|
60
|
-
<link rel="stylesheet" href="https://unpkg.com/@utrecht/design-tokens/dist/
|
|
62
|
+
<link rel="stylesheet" href="https://unpkg.com/@utrecht/design-tokens/dist/property.css" />
|
|
61
63
|
```
|
|
62
64
|
|
|
63
65
|
This file should only be included when you have visual regression test for both browsers that do and don't support `@property`.
|
|
@@ -109,6 +111,14 @@ To use the design tokens in your site via CSS variables, first include the desig
|
|
|
109
111
|
<link rel="stylesheet" href="https://unpkg.com/@utrecht/design-tokens/dist/index.css" />
|
|
110
112
|
```
|
|
111
113
|
|
|
114
|
+
Then add the `utrecht-theme` class name to your page:
|
|
115
|
+
|
|
116
|
+
```html
|
|
117
|
+
<html class="utrecht-theme">
|
|
118
|
+
...
|
|
119
|
+
</html>
|
|
120
|
+
```
|
|
121
|
+
|
|
112
122
|
Now the CSS variables will be available and you can use of all the design tokens:
|
|
113
123
|
|
|
114
124
|
```css
|
|
@@ -122,7 +132,7 @@ Now the CSS variables will be available and you can use of all the design tokens
|
|
|
122
132
|
|
|
123
133
|
## Contributing
|
|
124
134
|
|
|
125
|
-
The design tokens are stored in JSON files so we can use the design token translation tool [Style Dictionary](https://amzn.github.io/style-dictionary/) to make them available in many code languages. We use `.
|
|
135
|
+
The design tokens are stored in JSON files so we can use the design token translation tool [Style Dictionary](https://amzn.github.io/style-dictionary/) to make them available in many code languages. We use `.tokens.json` as file extension for our design token definitions, to tell them apart from regular and unrelated `.json` files.
|
|
126
136
|
|
|
127
137
|
Style Dictionary [only recognizes one nesting level per file](https://github.com/amzn/style-dictionary/issues/366), so be careful to not to mix nesting levels in one file and separate them into multiple files.
|
|
128
138
|
|
|
@@ -143,7 +153,7 @@ The following example doesn't work, because the CSS output would only be `--utre
|
|
|
143
153
|
|
|
144
154
|
Organize the design tokens in multiple files instead:
|
|
145
155
|
|
|
146
|
-
`block.
|
|
156
|
+
`block.tokens.json`:
|
|
147
157
|
|
|
148
158
|
```json
|
|
149
159
|
{
|
|
@@ -158,7 +168,7 @@ Organize the design tokens in multiple files instead:
|
|
|
158
168
|
}
|
|
159
169
|
```
|
|
160
170
|
|
|
161
|
-
`modifier.
|
|
171
|
+
`modifier.tokens.json`:
|
|
162
172
|
|
|
163
173
|
```json
|
|
164
174
|
{
|