@amsterdam/design-system-tokens 0.16.0 → 1.0.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.
Files changed (36) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/README.md +10 -3
  3. package/dist/compact.css +3 -0
  4. package/dist/compact.d.ts +7 -0
  5. package/dist/compact.json +8 -1
  6. package/dist/compact.mjs +4 -0
  7. package/dist/compact.scss +3 -0
  8. package/dist/compact.theme.css +3 -0
  9. package/dist/index.css +138 -109
  10. package/dist/index.d.ts +136 -93
  11. package/dist/index.json +191 -148
  12. package/dist/index.mjs +162 -140
  13. package/dist/index.scss +129 -100
  14. package/dist/index.theme.css +138 -109
  15. package/package.json +2 -2
  16. package/src/brand/ams/focus.tokens.json +1 -1
  17. package/src/brand/ams/typography.compact.tokens.json +2 -1
  18. package/src/components/ams/alert.tokens.json +6 -7
  19. package/src/components/ams/avatar.tokens.json +9 -0
  20. package/src/components/ams/button.tokens.json +19 -21
  21. package/src/components/ams/checkbox.tokens.json +57 -36
  22. package/src/components/ams/date-input.tokens.json +9 -8
  23. package/src/components/ams/dialog.tokens.json +3 -1
  24. package/src/components/ams/file-input.tokens.json +8 -11
  25. package/src/components/ams/hint.tokens.json +1 -1
  26. package/src/components/ams/page-header.compact.tokens.json +10 -0
  27. package/src/components/ams/page-header.tokens.json +1 -0
  28. package/src/components/ams/password-input.tokens.json +7 -6
  29. package/src/components/ams/radio.tokens.json +0 -2
  30. package/src/components/ams/search-field.tokens.json +7 -4
  31. package/src/components/ams/select.tokens.json +11 -6
  32. package/src/components/ams/switch.tokens.json +2 -2
  33. package/src/components/ams/tabs.tokens.json +3 -3
  34. package/src/components/ams/text-area.tokens.json +7 -6
  35. package/src/components/ams/text-input.tokens.json +7 -6
  36. package/src/components/ams/time-input.tokens.json +9 -8
package/CHANGELOG.md CHANGED
@@ -3,6 +3,39 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [1.0.1](https://github.com/Amsterdam/design-system/compare/design-system-tokens-v1.0.0...design-system-tokens-v1.0.1) (2025-06-06)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **Button:** Restore missing border for secondary button ([#2087](https://github.com/Amsterdam/design-system/issues/2087)) ([18b7a70](https://github.com/Amsterdam/design-system/commit/18b7a70bebe368bba83ce492862ffca70cff11a0))
12
+
13
+ ## [1.0.0](https://github.com/Amsterdam/design-system/compare/design-system-tokens-v0.16.0...design-system-tokens-v1.0.0) (2025-05-28)
14
+
15
+
16
+ ### ⚠ BREAKING CHANGES
17
+
18
+ * **Checkbox:** Use SVG for icon ([#2039](https://github.com/Amsterdam/design-system/issues/2039))
19
+ * Use border property for borders and box shadows only for hovers ([#1998](https://github.com/Amsterdam/design-system/issues/1998))
20
+
21
+ ### Features
22
+
23
+ * **Checkbox:** Use SVG for icon ([#2039](https://github.com/Amsterdam/design-system/issues/2039)) ([713ec04](https://github.com/Amsterdam/design-system/commit/713ec04575e9bbcc59aedad1f93e2ea25c2996ed))
24
+ * **Label:** Change design for (optional) hint ([#2048](https://github.com/Amsterdam/design-system/issues/2048)) ([971757c](https://github.com/Amsterdam/design-system/commit/971757c1ba3f5aef401c0f589ea40815907ab7ac))
25
+ * **Page Header:** Use heading level 2 for brandname in compact theme ([#2044](https://github.com/Amsterdam/design-system/issues/2044)) ([c5530df](https://github.com/Amsterdam/design-system/commit/c5530df647c84578aba9b8f258f84cd36d1b81e6))
26
+ * Use border property for borders and box shadows only for hovers ([#1998](https://github.com/Amsterdam/design-system/issues/1998)) ([f91c2e3](https://github.com/Amsterdam/design-system/commit/f91c2e39294c4b1e48f443ccbba5605c5d2dcfa2))
27
+ * Use medium border width for Inputs, Select and Switch thumb ([#2054](https://github.com/Amsterdam/design-system/issues/2054)) ([8cedce5](https://github.com/Amsterdam/design-system/commit/8cedce5728cbfc47df01d000f7a349ad946cee17))
28
+
29
+
30
+ ### Bug Fixes
31
+
32
+ * **Date Input, Select, Time Input:** Use correct colors for icons ([#2020](https://github.com/Amsterdam/design-system/issues/2020)) ([a49c3d2](https://github.com/Amsterdam/design-system/commit/a49c3d2b5d4337fab812a274dceff1ce926b34ea))
33
+
34
+
35
+ ### Miscellaneous Chores
36
+
37
+ * Release 1.0.0 ([247375d](https://github.com/Amsterdam/design-system/commit/247375df3a0dfd5109726aaf2bb71b56ef62fdd1))
38
+
6
39
  ## [0.16.0](https://github.com/Amsterdam/design-system/compare/design-system-tokens-v0.15.0...design-system-tokens-v0.16.0) (2025-04-25)
7
40
 
8
41
 
package/README.md CHANGED
@@ -27,7 +27,7 @@ npm install @amsterdam/design-system-tokens
27
27
  ## Usage in CSS
28
28
 
29
29
  Tokens are typically used as custom properties in CSS.
30
- Their name starts with a prefix of `--ams-`; that of a component token (see below) with the property that uses it, e.g. `-font-size`.
30
+ Their names start with a prefix of `--ams-`.
31
31
 
32
32
  ### Main stylesheet
33
33
 
@@ -76,13 +76,15 @@ The tokens are organised in three layers: brand, common and component.
76
76
 
77
77
  These express the corporate identity of the City of Amsterdam.
78
78
  They are our fundamental selection from all possible colours, text characteristics, spacing lengths, border widths, etc.
79
+ Their names begin with our prefix, followed by a design category such as ‘color’, ‘typography’, or ‘space’.
80
+
79
81
  Examples:
80
82
 
81
83
  ```css
82
84
  :root {
83
85
  --ams-color-feedback-error: #ec0000;
84
86
  --ams-space-m: 1rem;
85
- --ams-aspect-ratio-wide: 4/3;
87
+ --ams-aspect-ratio-4-3: 4 / 3;
86
88
  --ams-border-width-l: 0.1875rem;
87
89
  }
88
90
  ```
@@ -101,6 +103,8 @@ For instance, `--ams-color-interactive` and `--ams-color-interactive-disabled`.
101
103
  Related components share visual design characteristics.
102
104
  For example, all links have the same colour, and the borders of various form inputs are equally thick.
103
105
  Common tokens express these relations and streamline future changes.
106
+ Their names begin with our prefix, followed by the name of the group that uses them.
107
+ This group name is plural to indicate that several components apply these tokens.
104
108
 
105
109
  Design system components use common tokens where possible.
106
110
  The same goes for custom components that you may create in your application.
@@ -125,6 +129,9 @@ Every design system component defines a token for every property that expresses
125
129
  Use these tokens when recreating an existing component to receive the correct values for them – now and in the future.
126
130
  Do not apply these tokens to other components – components must be independent.
127
131
 
132
+ The name of a component token ends with the CSS property that uses it, e.g. `-font-size`.
133
+ We follow [the NL Design System token naming guidelines](https://nldesignsystem.nl/handboek/design-tokens/#naamgeving) here.
134
+
128
135
  ```html
129
136
  <button class="my-button" type="button">Button label</button>
130
137
  ```
@@ -181,7 +188,7 @@ Use ‘dot notation’ or square brackets to access the tokens.
181
188
  ```tsx
182
189
  import tokens from "@amsterdam/design-system-tokens/dist/index.json"
183
190
 
184
- const buttonBackgroundColor = tokens.ams.color["primary-blue"]
191
+ const buttonBackgroundColor = tokens.ams.color.interactive.default
185
192
  const rowGap = tokens.ams.space.m
186
193
  ```
187
194
 
package/dist/compact.css CHANGED
@@ -16,9 +16,12 @@
16
16
  --ams-typography-heading-0-font-size: clamp(1.6105rem, calc(1.5626rem + 0.2394vw), 1.802rem);
17
17
  --ams-typography-heading-1-font-size: clamp(1.4641rem, calc(1.4297rem + 0.1721vw), 1.6018rem);
18
18
  --ams-typography-heading-2-font-size: clamp(1.331rem, calc(1.3078rem + 0.116vw), 1.4238rem);
19
+ --ams-typography-heading-2-line-height: 1.2133;
19
20
  --ams-typography-heading-3-font-size: clamp(1.21rem, calc(1.1961rem + 0.0695vw), 1.2656rem);
20
21
  --ams-typography-heading-4-font-size: clamp(1.1rem, calc(1.0938rem + 0.0313vw), 1.125rem);
21
22
  --ams-typography-heading-5-font-size: 1rem;
22
23
  --ams-typography-heading-6-font-size: clamp(0.8889rem, calc(0.9141rem + -0.0253vw), 0.9091rem);
23
24
  --ams-grid-padding-inline: var(--ams-space-xl);
25
+ --ams-page-header-brand-name-font-size: var(--ams-typography-heading-2-font-size);
26
+ --ams-page-header-brand-name-line-height: var(--ams-typography-heading-2-line-height);
24
27
  }
package/dist/compact.d.ts CHANGED
@@ -46,6 +46,7 @@ declare const tokens: {
46
46
  };
47
47
  "2": {
48
48
  "font-size": DesignToken;
49
+ "line-height": DesignToken;
49
50
  };
50
51
  "3": {
51
52
  "font-size": DesignToken;
@@ -64,5 +65,11 @@ declare const tokens: {
64
65
  grid: {
65
66
  "padding-inline": DesignToken;
66
67
  };
68
+ "page-header": {
69
+ "brand-name": {
70
+ "font-size": DesignToken;
71
+ "line-height": DesignToken;
72
+ };
73
+ };
67
74
  };
68
75
  };
package/dist/compact.json CHANGED
@@ -29,7 +29,8 @@
29
29
  "font-size": "clamp(1.4641rem, calc(1.4297rem + 0.1721vw), 1.6018rem)"
30
30
  },
31
31
  "2": {
32
- "font-size": "clamp(1.331rem, calc(1.3078rem + 0.116vw), 1.4238rem)"
32
+ "font-size": "clamp(1.331rem, calc(1.3078rem + 0.116vw), 1.4238rem)",
33
+ "line-height": "1.2133"
33
34
  },
34
35
  "3": {
35
36
  "font-size": "clamp(1.21rem, calc(1.1961rem + 0.0695vw), 1.2656rem)"
@@ -47,6 +48,12 @@
47
48
  },
48
49
  "grid": {
49
50
  "padding-inline": "clamp(1.25rem, 1rem + 1.25vw, 2.25rem)"
51
+ },
52
+ "page-header": {
53
+ "brand-name": {
54
+ "font-size": "clamp(1.331rem, calc(1.3078rem + 0.116vw), 1.4238rem)",
55
+ "line-height": "1.2133"
56
+ }
50
57
  }
51
58
  }
52
59
  }
package/dist/compact.mjs CHANGED
@@ -21,6 +21,7 @@ export const amsTypographyHeading_1FontSize =
21
21
  "clamp(1.4641rem, calc(1.4297rem + 0.1721vw), 1.6018rem)";
22
22
  export const amsTypographyHeading_2FontSize =
23
23
  "clamp(1.331rem, calc(1.3078rem + 0.116vw), 1.4238rem)";
24
+ export const amsTypographyHeading_2LineHeight = "1.2133";
24
25
  export const amsTypographyHeading_3FontSize =
25
26
  "clamp(1.21rem, calc(1.1961rem + 0.0695vw), 1.2656rem)";
26
27
  export const amsTypographyHeading_4FontSize =
@@ -29,3 +30,6 @@ export const amsTypographyHeading_5FontSize = "1rem";
29
30
  export const amsTypographyHeading_6FontSize =
30
31
  "clamp(0.8889rem, calc(0.9141rem + -0.0253vw), 0.9091rem)";
31
32
  export const amsGridPaddingInline = "clamp(1.25rem, 1rem + 1.25vw, 2.25rem)";
33
+ export const amsPageHeaderBrandNameFontSize =
34
+ "clamp(1.331rem, calc(1.3078rem + 0.116vw), 1.4238rem)";
35
+ export const amsPageHeaderBrandNameLineHeight = "1.2133";
package/dist/compact.scss CHANGED
@@ -14,8 +14,11 @@ $ams-typography-body-text-x-large-font-size: clamp(1.21rem, calc(1.1961rem + 0.0
14
14
  $ams-typography-heading-0-font-size: clamp(1.6105rem, calc(1.5626rem + 0.2394vw), 1.802rem);
15
15
  $ams-typography-heading-1-font-size: clamp(1.4641rem, calc(1.4297rem + 0.1721vw), 1.6018rem);
16
16
  $ams-typography-heading-2-font-size: clamp(1.331rem, calc(1.3078rem + 0.116vw), 1.4238rem);
17
+ $ams-typography-heading-2-line-height: 1.2133;
17
18
  $ams-typography-heading-3-font-size: clamp(1.21rem, calc(1.1961rem + 0.0695vw), 1.2656rem);
18
19
  $ams-typography-heading-4-font-size: clamp(1.1rem, calc(1.0938rem + 0.0313vw), 1.125rem);
19
20
  $ams-typography-heading-5-font-size: 1rem;
20
21
  $ams-typography-heading-6-font-size: clamp(0.8889rem, calc(0.9141rem + -0.0253vw), 0.9091rem);
21
22
  $ams-grid-padding-inline: $ams-space-xl;
23
+ $ams-page-header-brand-name-font-size: $ams-typography-heading-2-font-size;
24
+ $ams-page-header-brand-name-line-height: $ams-typography-heading-2-line-height;
@@ -16,9 +16,12 @@
16
16
  --ams-typography-heading-0-font-size: clamp(1.6105rem, calc(1.5626rem + 0.2394vw), 1.802rem);
17
17
  --ams-typography-heading-1-font-size: clamp(1.4641rem, calc(1.4297rem + 0.1721vw), 1.6018rem);
18
18
  --ams-typography-heading-2-font-size: clamp(1.331rem, calc(1.3078rem + 0.116vw), 1.4238rem);
19
+ --ams-typography-heading-2-line-height: 1.2133;
19
20
  --ams-typography-heading-3-font-size: clamp(1.21rem, calc(1.1961rem + 0.0695vw), 1.2656rem);
20
21
  --ams-typography-heading-4-font-size: clamp(1.1rem, calc(1.0938rem + 0.0313vw), 1.125rem);
21
22
  --ams-typography-heading-5-font-size: 1rem;
22
23
  --ams-typography-heading-6-font-size: clamp(0.8889rem, calc(0.9141rem + -0.0253vw), 0.9091rem);
23
24
  --ams-grid-padding-inline: var(--ams-space-xl);
25
+ --ams-page-header-brand-name-font-size: var(--ams-typography-heading-2-font-size);
26
+ --ams-page-header-brand-name-line-height: var(--ams-typography-heading-2-line-height);
24
27
  }