@amsterdam/design-system-tokens 1.0.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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,13 @@
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
+
6
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)
7
14
 
8
15
 
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/index.css CHANGED
@@ -83,6 +83,7 @@
83
83
  --ams-breadcrumb-separator-block-size: 1ex;
84
84
  --ams-breadcrumb-separator-inline-size: 1ex;
85
85
  --ams-button-border-style: solid;
86
+ --ams-button-secondary-border-color: currentColor;
86
87
  --ams-button-tertiary-background-color: transparent;
87
88
  --ams-button-tertiary-border-color: transparent;
88
89
  --ams-button-tertiary-hover-border-color: currentColor;
@@ -275,6 +276,8 @@
275
276
  --ams-button-padding-block: var(--ams-space-s);
276
277
  --ams-button-padding-inline: var(--ams-space-m);
277
278
  --ams-button-disabled-cursor: var(--ams-cursor-disabled);
279
+ --ams-button-icon-only-padding-block: var(--ams-space-s);
280
+ --ams-button-icon-only-padding-inline: var(--ams-space-s);
278
281
  --ams-button-primary-background-color: var(--ams-color-interactive);
279
282
  --ams-button-primary-border-color: var(--ams-color-interactive);
280
283
  --ams-button-primary-color: var(--ams-color-text-inverse);
@@ -284,14 +287,13 @@
284
287
  --ams-button-primary-hover-border-color: var(--ams-color-interactive-hover);
285
288
  --ams-button-secondary-background-color: var(--ams-color-background);
286
289
  --ams-button-secondary-color: var(--ams-color-interactive);
290
+ --ams-button-secondary-disabled-border-color: var(--ams-color-interactive-disabled);
291
+ --ams-button-secondary-disabled-color: var(--ams-color-interactive-disabled);
287
292
  --ams-button-secondary-hover-box-shadow: inset 0 0 0 var(--ams-border-width-s);
288
293
  --ams-button-secondary-hover-color: var(--ams-color-interactive-hover);
289
- --ams-button-secondary-disabled-color: var(--ams-color-interactive-disabled);
290
294
  --ams-button-tertiary-color: var(--ams-color-interactive);
291
- --ams-button-tertiary-hover-color: var(--ams-color-interactive-hover);
292
295
  --ams-button-tertiary-disabled-color: var(--ams-color-interactive-disabled);
293
- --ams-button-icon-only-padding-block: var(--ams-space-s);
294
- --ams-button-icon-only-padding-inline: var(--ams-space-s);
296
+ --ams-button-tertiary-hover-color: var(--ams-color-interactive-hover);
295
297
  --ams-card-heading-margin-block-end: var(--ams-space-xs);
296
298
  --ams-card-heading-group-gap: var(--ams-space-xs);
297
299
  --ams-card-heading-group-margin-block-end: var(--ams-space-xs);
package/dist/index.d.ts CHANGED
@@ -359,6 +359,10 @@ declare const tokens: {
359
359
  disabled: {
360
360
  cursor: DesignToken;
361
361
  };
362
+ "icon-only": {
363
+ "padding-block": DesignToken;
364
+ "padding-inline": DesignToken;
365
+ };
362
366
  primary: {
363
367
  "background-color": DesignToken;
364
368
  "border-color": DesignToken;
@@ -374,12 +378,14 @@ declare const tokens: {
374
378
  };
375
379
  secondary: {
376
380
  "background-color": DesignToken;
381
+ "border-color": DesignToken;
377
382
  color: DesignToken;
378
- hover: {
379
- "box-shadow": DesignToken;
383
+ disabled: {
384
+ "border-color": DesignToken;
380
385
  color: DesignToken;
381
386
  };
382
- disabled: {
387
+ hover: {
388
+ "box-shadow": DesignToken;
383
389
  color: DesignToken;
384
390
  };
385
391
  };
@@ -387,18 +393,14 @@ declare const tokens: {
387
393
  "background-color": DesignToken;
388
394
  "border-color": DesignToken;
389
395
  color: DesignToken;
390
- hover: {
391
- "border-color": DesignToken;
396
+ disabled: {
392
397
  color: DesignToken;
393
398
  };
394
- disabled: {
399
+ hover: {
400
+ "border-color": DesignToken;
395
401
  color: DesignToken;
396
402
  };
397
403
  };
398
- "icon-only": {
399
- "padding-block": DesignToken;
400
- "padding-inline": DesignToken;
401
- };
402
404
  };
403
405
  card: {
404
406
  heading: {
package/dist/index.json CHANGED
@@ -343,6 +343,10 @@
343
343
  "disabled": {
344
344
  "cursor": "not-allowed"
345
345
  },
346
+ "icon-only": {
347
+ "padding-block": "clamp(0.5625rem, 0.5156rem + 0.2344vw, 0.75rem)",
348
+ "padding-inline": "clamp(0.5625rem, 0.5156rem + 0.2344vw, 0.75rem)"
349
+ },
346
350
  "primary": {
347
351
  "background-color": "#004699",
348
352
  "border-color": "#004699",
@@ -358,30 +362,28 @@
358
362
  },
359
363
  "secondary": {
360
364
  "background-color": "#ffffff",
365
+ "border-color": "currentColor",
361
366
  "color": "#004699",
367
+ "disabled": {
368
+ "border-color": "#767676",
369
+ "color": "#767676"
370
+ },
362
371
  "hover": {
363
372
  "box-shadow": "inset 0 0 0 0.0625rem",
364
373
  "color": "#003677"
365
- },
366
- "disabled": {
367
- "color": "#767676"
368
374
  }
369
375
  },
370
376
  "tertiary": {
371
377
  "background-color": "transparent",
372
378
  "border-color": "transparent",
373
379
  "color": "#004699",
380
+ "disabled": {
381
+ "color": "#767676"
382
+ },
374
383
  "hover": {
375
384
  "border-color": "currentColor",
376
385
  "color": "#003677"
377
- },
378
- "disabled": {
379
- "color": "#767676"
380
386
  }
381
- },
382
- "icon-only": {
383
- "padding-block": "clamp(0.5625rem, 0.5156rem + 0.2344vw, 0.75rem)",
384
- "padding-inline": "clamp(0.5625rem, 0.5156rem + 0.2344vw, 0.75rem)"
385
387
  }
386
388
  },
387
389
  "card": {
package/dist/index.mjs CHANGED
@@ -235,6 +235,10 @@ export const amsButtonPaddingBlock =
235
235
  export const amsButtonPaddingInline =
236
236
  "clamp(1.125rem, 1.0313rem + 0.4688vw, 1.5rem)";
237
237
  export const amsButtonDisabledCursor = "not-allowed";
238
+ export const amsButtonIconOnlyPaddingBlock =
239
+ "clamp(0.5625rem, 0.5156rem + 0.2344vw, 0.75rem)";
240
+ export const amsButtonIconOnlyPaddingInline =
241
+ "clamp(0.5625rem, 0.5156rem + 0.2344vw, 0.75rem)";
238
242
  export const amsButtonPrimaryBackgroundColor = "#004699";
239
243
  export const amsButtonPrimaryBorderColor = "#004699";
240
244
  export const amsButtonPrimaryColor = "#ffffff";
@@ -243,20 +247,18 @@ export const amsButtonPrimaryDisabledBorderColor = "#767676";
243
247
  export const amsButtonPrimaryHoverBackgroundColor = "#003677";
244
248
  export const amsButtonPrimaryHoverBorderColor = "#003677";
245
249
  export const amsButtonSecondaryBackgroundColor = "#ffffff";
250
+ export const amsButtonSecondaryBorderColor = "currentColor";
246
251
  export const amsButtonSecondaryColor = "#004699";
252
+ export const amsButtonSecondaryDisabledBorderColor = "#767676";
253
+ export const amsButtonSecondaryDisabledColor = "#767676";
247
254
  export const amsButtonSecondaryHoverBoxShadow = "inset 0 0 0 0.0625rem";
248
255
  export const amsButtonSecondaryHoverColor = "#003677";
249
- export const amsButtonSecondaryDisabledColor = "#767676";
250
256
  export const amsButtonTertiaryBackgroundColor = "transparent";
251
257
  export const amsButtonTertiaryBorderColor = "transparent";
252
258
  export const amsButtonTertiaryColor = "#004699";
259
+ export const amsButtonTertiaryDisabledColor = "#767676";
253
260
  export const amsButtonTertiaryHoverBorderColor = "currentColor";
254
261
  export const amsButtonTertiaryHoverColor = "#003677";
255
- export const amsButtonTertiaryDisabledColor = "#767676";
256
- export const amsButtonIconOnlyPaddingBlock =
257
- "clamp(0.5625rem, 0.5156rem + 0.2344vw, 0.75rem)";
258
- export const amsButtonIconOnlyPaddingInline =
259
- "clamp(0.5625rem, 0.5156rem + 0.2344vw, 0.75rem)";
260
262
  export const amsCardHeadingMarginBlockEnd =
261
263
  "clamp(0.2813rem, 0.2578rem + 0.1172vw, 0.375rem)";
262
264
  export const amsCardHeadingGroupGap =
package/dist/index.scss CHANGED
@@ -81,6 +81,7 @@ $ams-breadcrumb-separator-background-image: url("data:image/svg+xml;utf8,<svg xm
81
81
  $ams-breadcrumb-separator-block-size: 1ex;
82
82
  $ams-breadcrumb-separator-inline-size: 1ex;
83
83
  $ams-button-border-style: solid;
84
+ $ams-button-secondary-border-color: currentColor;
84
85
  $ams-button-tertiary-background-color: transparent;
85
86
  $ams-button-tertiary-border-color: transparent;
86
87
  $ams-button-tertiary-hover-border-color: currentColor;
@@ -273,6 +274,8 @@ $ams-button-outline-offset: $ams-focus-outline-offset;
273
274
  $ams-button-padding-block: $ams-space-s;
274
275
  $ams-button-padding-inline: $ams-space-m;
275
276
  $ams-button-disabled-cursor: $ams-cursor-disabled;
277
+ $ams-button-icon-only-padding-block: $ams-space-s;
278
+ $ams-button-icon-only-padding-inline: $ams-space-s;
276
279
  $ams-button-primary-background-color: $ams-color-interactive;
277
280
  $ams-button-primary-border-color: $ams-color-interactive;
278
281
  $ams-button-primary-color: $ams-color-text-inverse;
@@ -282,14 +285,13 @@ $ams-button-primary-hover-background-color: $ams-color-interactive-hover;
282
285
  $ams-button-primary-hover-border-color: $ams-color-interactive-hover;
283
286
  $ams-button-secondary-background-color: $ams-color-background;
284
287
  $ams-button-secondary-color: $ams-color-interactive;
288
+ $ams-button-secondary-disabled-border-color: $ams-color-interactive-disabled;
289
+ $ams-button-secondary-disabled-color: $ams-color-interactive-disabled;
285
290
  $ams-button-secondary-hover-box-shadow: inset 0 0 0 $ams-border-width-s;
286
291
  $ams-button-secondary-hover-color: $ams-color-interactive-hover;
287
- $ams-button-secondary-disabled-color: $ams-color-interactive-disabled;
288
292
  $ams-button-tertiary-color: $ams-color-interactive;
289
- $ams-button-tertiary-hover-color: $ams-color-interactive-hover;
290
293
  $ams-button-tertiary-disabled-color: $ams-color-interactive-disabled;
291
- $ams-button-icon-only-padding-block: $ams-space-s;
292
- $ams-button-icon-only-padding-inline: $ams-space-s;
294
+ $ams-button-tertiary-hover-color: $ams-color-interactive-hover;
293
295
  $ams-card-heading-margin-block-end: $ams-space-xs;
294
296
  $ams-card-heading-group-gap: $ams-space-xs;
295
297
  $ams-card-heading-group-margin-block-end: $ams-space-xs;
@@ -83,6 +83,7 @@
83
83
  --ams-breadcrumb-separator-block-size: 1ex;
84
84
  --ams-breadcrumb-separator-inline-size: 1ex;
85
85
  --ams-button-border-style: solid;
86
+ --ams-button-secondary-border-color: currentColor;
86
87
  --ams-button-tertiary-background-color: transparent;
87
88
  --ams-button-tertiary-border-color: transparent;
88
89
  --ams-button-tertiary-hover-border-color: currentColor;
@@ -275,6 +276,8 @@
275
276
  --ams-button-padding-block: var(--ams-space-s);
276
277
  --ams-button-padding-inline: var(--ams-space-m);
277
278
  --ams-button-disabled-cursor: var(--ams-cursor-disabled);
279
+ --ams-button-icon-only-padding-block: var(--ams-space-s);
280
+ --ams-button-icon-only-padding-inline: var(--ams-space-s);
278
281
  --ams-button-primary-background-color: var(--ams-color-interactive);
279
282
  --ams-button-primary-border-color: var(--ams-color-interactive);
280
283
  --ams-button-primary-color: var(--ams-color-text-inverse);
@@ -284,14 +287,13 @@
284
287
  --ams-button-primary-hover-border-color: var(--ams-color-interactive-hover);
285
288
  --ams-button-secondary-background-color: var(--ams-color-background);
286
289
  --ams-button-secondary-color: var(--ams-color-interactive);
290
+ --ams-button-secondary-disabled-border-color: var(--ams-color-interactive-disabled);
291
+ --ams-button-secondary-disabled-color: var(--ams-color-interactive-disabled);
287
292
  --ams-button-secondary-hover-box-shadow: inset 0 0 0 var(--ams-border-width-s);
288
293
  --ams-button-secondary-hover-color: var(--ams-color-interactive-hover);
289
- --ams-button-secondary-disabled-color: var(--ams-color-interactive-disabled);
290
294
  --ams-button-tertiary-color: var(--ams-color-interactive);
291
- --ams-button-tertiary-hover-color: var(--ams-color-interactive-hover);
292
295
  --ams-button-tertiary-disabled-color: var(--ams-color-interactive-disabled);
293
- --ams-button-icon-only-padding-block: var(--ams-space-s);
294
- --ams-button-icon-only-padding-inline: var(--ams-space-s);
296
+ --ams-button-tertiary-hover-color: var(--ams-color-interactive-hover);
295
297
  --ams-card-heading-margin-block-end: var(--ams-space-xs);
296
298
  --ams-card-heading-group-gap: var(--ams-space-xs);
297
299
  --ams-card-heading-group-margin-block-end: var(--ams-space-xs);
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.0.0",
2
+ "version": "1.0.1",
3
3
  "author": "Design System Team, City of Amsterdam <designsystem@amsterdam.nl>",
4
4
  "description": "All design tokens from the Amsterdam Design System. Use it to apply its visual design to your website or application.",
5
5
  "homepage": "https://designsystem.amsterdam",
@@ -15,6 +15,10 @@
15
15
  "disabled": {
16
16
  "cursor": { "value": "{ams.cursor.disabled}" }
17
17
  },
18
+ "icon-only": {
19
+ "padding-block": { "value": "{ams.space.s}" },
20
+ "padding-inline": { "value": "{ams.space.s}" }
21
+ },
18
22
  "primary": {
19
23
  "background-color": { "value": "{ams.color.interactive.default}" },
20
24
  "border-color": { "value": "{ams.color.interactive.default}" },
@@ -30,30 +34,28 @@
30
34
  },
31
35
  "secondary": {
32
36
  "background-color": { "value": "{ams.color.background}" },
37
+ "border-color": { "value": "currentColor" },
33
38
  "color": { "value": "{ams.color.interactive.default}" },
39
+ "disabled": {
40
+ "border-color": { "value": "{ams.color.interactive.disabled}" },
41
+ "color": { "value": "{ams.color.interactive.disabled}" }
42
+ },
34
43
  "hover": {
35
44
  "box-shadow": { "value": "inset 0 0 0 {ams.border.width.s}" },
36
45
  "color": { "value": "{ams.color.interactive.hover}" }
37
- },
38
- "disabled": {
39
- "color": { "value": "{ams.color.interactive.disabled}" }
40
46
  }
41
47
  },
42
48
  "tertiary": {
43
49
  "background-color": { "value": "transparent" },
44
50
  "border-color": { "value": "transparent" },
45
51
  "color": { "value": "{ams.color.interactive.default}" },
52
+ "disabled": {
53
+ "color": { "value": "{ams.color.interactive.disabled}" }
54
+ },
46
55
  "hover": {
47
56
  "border-color": { "value": "currentColor" },
48
57
  "color": { "value": "{ams.color.interactive.hover}" }
49
- },
50
- "disabled": {
51
- "color": { "value": "{ams.color.interactive.disabled}" }
52
58
  }
53
- },
54
- "icon-only": {
55
- "padding-block": { "value": "{ams.space.s}" },
56
- "padding-inline": { "value": "{ams.space.s}" }
57
59
  }
58
60
  }
59
61
  }