@amsterdam/design-system-tokens 0.4.0 → 0.5.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 (51) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/build.js +99 -0
  3. package/dist/compact.css +16 -0
  4. package/dist/compact.d.ts +56 -0
  5. package/dist/compact.json +33 -0
  6. package/dist/compact.mjs +14 -0
  7. package/dist/compact.scss +13 -0
  8. package/dist/compact.theme.css +16 -0
  9. package/dist/index.css +102 -201
  10. package/dist/index.d.ts +1103 -580
  11. package/dist/index.json +1082 -567
  12. package/dist/{index.js → index.mjs} +92 -191
  13. package/dist/{_variables.scss → index.scss} +101 -200
  14. package/dist/{root.css → index.theme.css} +102 -201
  15. package/package.json +7 -10
  16. package/src/brand/amsterdam/typography.compact.tokens.json +29 -0
  17. package/src/brand/amsterdam/typography.tokens.json +28 -62
  18. package/src/common/amsterdam/hyphenation.tokens.json +9 -0
  19. package/src/components/amsterdam/accordion.tokens.json +4 -10
  20. package/src/components/amsterdam/alert.tokens.json +0 -13
  21. package/src/components/amsterdam/badge.tokens.json +2 -8
  22. package/src/components/amsterdam/blockquote.tokens.json +3 -9
  23. package/src/components/amsterdam/breadcrumb.tokens.json +2 -8
  24. package/src/components/amsterdam/button.tokens.json +2 -8
  25. package/src/components/amsterdam/checkbox.tokens.json +5 -11
  26. package/src/components/amsterdam/dialog.tokens.json +2 -8
  27. package/src/components/amsterdam/form-label.tokens.json +2 -8
  28. package/src/components/amsterdam/grid.compact.tokens.json +14 -0
  29. package/src/components/amsterdam/grid.tokens.json +6 -18
  30. package/src/components/amsterdam/header.tokens.json +1 -1
  31. package/src/components/amsterdam/heading.tokens.json +22 -50
  32. package/src/components/amsterdam/icon.tokens.json +14 -34
  33. package/src/components/amsterdam/link-list.tokens.json +10 -26
  34. package/src/components/amsterdam/link.tokens.json +2 -25
  35. package/src/components/amsterdam/mega-menu.tokens.json +2 -2
  36. package/src/components/amsterdam/ordered-list.tokens.json +2 -8
  37. package/src/components/amsterdam/page-heading.tokens.json +2 -8
  38. package/src/components/amsterdam/page-menu.tokens.json +2 -8
  39. package/src/components/amsterdam/pagination.tokens.json +2 -8
  40. package/src/components/amsterdam/paragraph.tokens.json +10 -26
  41. package/src/components/amsterdam/search-field.tokens.json +4 -10
  42. package/src/components/amsterdam/skip-link.tokens.json +2 -6
  43. package/src/components/amsterdam/table.tokens.json +2 -2
  44. package/src/components/amsterdam/text-input.tokens.json +2 -8
  45. package/src/components/amsterdam/top-task-link.tokens.json +4 -16
  46. package/src/components/amsterdam/unordered-list.tokens.json +2 -8
  47. package/dist/index.tokens.json +0 -1341
  48. package/dist/tokens.d.ts +0 -1364
  49. package/dist/tokens.js +0 -12927
  50. package/dist/variables.less +0 -571
  51. package/style-dictionary.config.json +0 -101
package/CHANGELOG.md CHANGED
@@ -3,6 +3,29 @@
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
+ ## [0.5.1](https://github.com/Amsterdam/design-system/compare/design-system-tokens-v0.5.0...design-system-tokens-v0.5.1) (2024-02-13)
7
+
8
+
9
+ ### Features
10
+
11
+ * Create unique token classes ([#1071](https://github.com/Amsterdam/design-system/issues/1071)) ([d53d0a9](https://github.com/Amsterdam/design-system/commit/d53d0a93f18238759d85bd897a7b6ee537cc78b0))
12
+
13
+ ## [0.5.0](https://github.com/Amsterdam/design-system/compare/@amsterdam/design-system-tokens@0.4.0...design-system-tokens-v0.5.0) (2024-02-09)
14
+
15
+
16
+ ### ⚠ BREAKING CHANGES
17
+
18
+ * Add theme setup and compact theme ([#1067](https://github.com/Amsterdam/design-system/issues/1067))
19
+ * Remove spacious and compact tokens from component level tokens ([#1067](https://github.com/Amsterdam/design-system/issues/1067))
20
+ * Remove deprecated `inList` variant of Link ([#1064](https://github.com/Amsterdam/design-system/issues/1064))
21
+
22
+ ### Features
23
+
24
+ * Add theme setup and compact theme ([#1067](https://github.com/Amsterdam/design-system/issues/1067)) ([e773434](https://github.com/Amsterdam/design-system/commit/e7734347a9e7205d510a16a543294bde69b9c6f0))
25
+ * Remove spacious and compact tokens from component level tokens ([#1067](https://github.com/Amsterdam/design-system/issues/1067)) ([e773434](https://github.com/Amsterdam/design-system/commit/e7734347a9e7205d510a16a543294bde69b9c6f0))
26
+ * Hyphenate headings and other large text components ([#1056](https://github.com/Amsterdam/design-system/issues/1056)) ([f875171](https://github.com/Amsterdam/design-system/commit/f8751716018d4ed269a086e1764741ad29714fa0))
27
+ * Remove deprecated `inList` variant of Link ([#1064](https://github.com/Amsterdam/design-system/issues/1064)) ([b30784b](https://github.com/Amsterdam/design-system/commit/b30784b352b4a057069ceb397951b79a6e2547f2))
28
+
6
29
  ## [0.4.0](https://github.com/Amsterdam/design-system/compare/@amsterdam/design-system-tokens@0.3.0...@amsterdam/design-system-tokens@0.4.0) (2024-01-31)
7
30
 
8
31
  ### ⚠ BREAKING CHANGES
package/build.js ADDED
@@ -0,0 +1,99 @@
1
+ const StyleDictionary = require('style-dictionary')
2
+
3
+ const modes = ['compact']
4
+
5
+ function generateSharedConfig(mode) {
6
+ const name = mode || 'index'
7
+
8
+ return {
9
+ css: {
10
+ transforms: ['attribute/cti', 'name/cti/kebab', 'color/hsl-4'],
11
+ transformGroup: 'css',
12
+ buildPath: 'dist/',
13
+ files: [
14
+ {
15
+ destination: `${name}.css`,
16
+ format: 'css/variables',
17
+ options: {
18
+ outputReferences: true,
19
+ },
20
+ },
21
+ ],
22
+ },
23
+ cssTheme: {
24
+ transforms: ['attribute/cti', 'name/cti/kebab', 'color/hsl-4'],
25
+ buildPath: 'dist/',
26
+ files: [
27
+ {
28
+ destination: `${name}.theme.css`,
29
+ format: 'css/variables',
30
+ options: {
31
+ selector: `.amsterdam-theme${name === 'index' ? '' : `--${name}`}`,
32
+ outputReferences: true,
33
+ },
34
+ },
35
+ ],
36
+ },
37
+ js: {
38
+ transforms: ['attribute/cti', 'name/cti/camel', 'color/hsl-4'],
39
+ buildPath: 'dist/',
40
+ files: [
41
+ {
42
+ format: 'javascript/es6',
43
+ destination: `${name}.mjs`,
44
+ },
45
+ ],
46
+ },
47
+ json: {
48
+ transforms: ['attribute/cti', 'name/cti/camel', 'color/hsl-4'],
49
+ buildPath: 'dist/',
50
+ files: [
51
+ {
52
+ destination: `${name}.json`,
53
+ format: 'json/nested',
54
+ },
55
+ ],
56
+ },
57
+ scss: {
58
+ transforms: ['attribute/cti', 'name/cti/kebab', 'color/hsl-4'],
59
+ buildPath: 'dist/',
60
+ files: [
61
+ {
62
+ destination: `${name}.scss`,
63
+ format: 'scss/variables',
64
+ options: {
65
+ outputReferences: true,
66
+ },
67
+ },
68
+ ],
69
+ },
70
+ typescript: {
71
+ transforms: ['attribute/cti', 'name/cti/camel', 'color/hsl-4'],
72
+ transformGroup: 'js',
73
+ buildPath: 'dist/',
74
+ files: [
75
+ {
76
+ format: 'typescript/module-declarations',
77
+ destination: `${name}.d.ts`,
78
+ },
79
+ ],
80
+ },
81
+ }
82
+ }
83
+
84
+ console.log('Building default mode...')
85
+ StyleDictionary.extend({
86
+ source: [
87
+ // exclude non-default modes from source
88
+ `./src/**/!(*.${modes.join(`|*.`)}).tokens.json`,
89
+ ],
90
+ platforms: generateSharedConfig(),
91
+ }).buildAllPlatforms()
92
+
93
+ modes.forEach((mode) => {
94
+ console.log(`\n\nBuilding ${mode} mode...`)
95
+ StyleDictionary.extend({
96
+ source: [`./src/**/*.${mode}.tokens.json`],
97
+ platforms: generateSharedConfig(mode),
98
+ }).buildAllPlatforms()
99
+ })
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Do not edit directly
3
+ * Generated on Tue, 13 Feb 2024 11:27:27 GMT
4
+ */
5
+
6
+ :root {
7
+ --amsterdam-grid-padding-inline: clamp(1rem, calc(1.5625vw - 0.0625rem), 2.5rem); /* Equals the gap. */
8
+ --amsterdam-grid-gap: clamp(1rem, calc(1.5625vw - 0.0625rem), 2.5rem); /* Grows from 16px at 1088px wide to 40px at 2624px wide. */
9
+ --amsterdam-typography-text-level-6-font-size: clamp(0.75rem, calc(0.188vw + 0.713rem), 0.9rem);
10
+ --amsterdam-typography-text-level-5-font-size: clamp(0.875rem, calc(0.313vw + 0.813rem), 1.125rem);
11
+ --amsterdam-typography-text-level-4-font-size: clamp(1.021rem, calc(0.481vw + 0.925rem), 1.406rem);
12
+ --amsterdam-typography-text-level-3-font-size: clamp(1.191rem, calc(0.709vw + 1.049rem), 1.758rem);
13
+ --amsterdam-typography-text-level-2-font-size: clamp(1.389rem, calc(1.01vw + 1.187rem), 2.197rem);
14
+ --amsterdam-typography-text-level-1-font-size: clamp(1.621rem, calc(1.408vw + 1.34rem), 2.747rem);
15
+ --amsterdam-typography-text-level-0-font-size: clamp(1.891rem, calc(1.927vw + 1.506rem), 3.433rem);
16
+ }
@@ -0,0 +1,56 @@
1
+ /**
2
+ * Do not edit directly
3
+ * Generated on Tue, 13 Feb 2024 11:27:27 GMT
4
+ */
5
+
6
+ export default tokens;
7
+
8
+ declare interface DesignToken {
9
+ value: any;
10
+ name?: string;
11
+ comment?: string;
12
+ themeable?: boolean;
13
+ attributes?: {
14
+ category?: string;
15
+ type?: string;
16
+ item?: string;
17
+ subitem?: string;
18
+ state?: string;
19
+ [key: string]: any;
20
+ };
21
+ [key: string]: any;
22
+ }
23
+
24
+ declare const tokens: {
25
+ "amsterdam": {
26
+ "typography": {
27
+ "text-level": {
28
+ "0": {
29
+ "font-size": DesignToken
30
+ },
31
+ "1": {
32
+ "font-size": DesignToken
33
+ },
34
+ "2": {
35
+ "font-size": DesignToken
36
+ },
37
+ "3": {
38
+ "font-size": DesignToken
39
+ },
40
+ "4": {
41
+ "font-size": DesignToken
42
+ },
43
+ "5": {
44
+ "font-size": DesignToken
45
+ },
46
+ "6": {
47
+ "font-size": DesignToken
48
+ }
49
+ }
50
+ },
51
+ "grid": {
52
+ "gap": DesignToken,
53
+ "padding-inline": DesignToken
54
+ }
55
+ }
56
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "amsterdam": {
3
+ "typography": {
4
+ "text-level": {
5
+ "0": {
6
+ "font-size": "clamp(1.891rem, calc(1.927vw + 1.506rem), 3.433rem)"
7
+ },
8
+ "1": {
9
+ "font-size": "clamp(1.621rem, calc(1.408vw + 1.34rem), 2.747rem)"
10
+ },
11
+ "2": {
12
+ "font-size": "clamp(1.389rem, calc(1.01vw + 1.187rem), 2.197rem)"
13
+ },
14
+ "3": {
15
+ "font-size": "clamp(1.191rem, calc(0.709vw + 1.049rem), 1.758rem)"
16
+ },
17
+ "4": {
18
+ "font-size": "clamp(1.021rem, calc(0.481vw + 0.925rem), 1.406rem)"
19
+ },
20
+ "5": {
21
+ "font-size": "clamp(0.875rem, calc(0.313vw + 0.813rem), 1.125rem)"
22
+ },
23
+ "6": {
24
+ "font-size": "clamp(0.75rem, calc(0.188vw + 0.713rem), 0.9rem)"
25
+ }
26
+ }
27
+ },
28
+ "grid": {
29
+ "gap": "clamp(1rem, calc(1.5625vw - 0.0625rem), 2.5rem)",
30
+ "padding-inline": "clamp(1rem, calc(1.5625vw - 0.0625rem), 2.5rem)"
31
+ }
32
+ }
33
+ }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Do not edit directly
3
+ * Generated on Tue, 13 Feb 2024 11:27:27 GMT
4
+ */
5
+
6
+ export const amsterdamTypographyTextLevel0FontSize = "clamp(1.891rem, calc(1.927vw + 1.506rem), 3.433rem)";
7
+ export const amsterdamTypographyTextLevel1FontSize = "clamp(1.621rem, calc(1.408vw + 1.34rem), 2.747rem)";
8
+ export const amsterdamTypographyTextLevel2FontSize = "clamp(1.389rem, calc(1.01vw + 1.187rem), 2.197rem)";
9
+ export const amsterdamTypographyTextLevel3FontSize = "clamp(1.191rem, calc(0.709vw + 1.049rem), 1.758rem)";
10
+ export const amsterdamTypographyTextLevel4FontSize = "clamp(1.021rem, calc(0.481vw + 0.925rem), 1.406rem)";
11
+ export const amsterdamTypographyTextLevel5FontSize = "clamp(0.875rem, calc(0.313vw + 0.813rem), 1.125rem)";
12
+ export const amsterdamTypographyTextLevel6FontSize = "clamp(0.75rem, calc(0.188vw + 0.713rem), 0.9rem)";
13
+ export const amsterdamGridGap = "clamp(1rem, calc(1.5625vw - 0.0625rem), 2.5rem)"; // Grows from 16px at 1088px wide to 40px at 2624px wide.
14
+ export const amsterdamGridPaddingInline = "clamp(1rem, calc(1.5625vw - 0.0625rem), 2.5rem)"; // Equals the gap.
@@ -0,0 +1,13 @@
1
+
2
+ // Do not edit directly
3
+ // Generated on Tue, 13 Feb 2024 11:27:27 GMT
4
+
5
+ $amsterdam-grid-padding-inline: clamp(1rem, calc(1.5625vw - 0.0625rem), 2.5rem); // Equals the gap.
6
+ $amsterdam-grid-gap: clamp(1rem, calc(1.5625vw - 0.0625rem), 2.5rem); // Grows from 16px at 1088px wide to 40px at 2624px wide.
7
+ $amsterdam-typography-text-level-6-font-size: clamp(0.75rem, calc(0.188vw + 0.713rem), 0.9rem);
8
+ $amsterdam-typography-text-level-5-font-size: clamp(0.875rem, calc(0.313vw + 0.813rem), 1.125rem);
9
+ $amsterdam-typography-text-level-4-font-size: clamp(1.021rem, calc(0.481vw + 0.925rem), 1.406rem);
10
+ $amsterdam-typography-text-level-3-font-size: clamp(1.191rem, calc(0.709vw + 1.049rem), 1.758rem);
11
+ $amsterdam-typography-text-level-2-font-size: clamp(1.389rem, calc(1.01vw + 1.187rem), 2.197rem);
12
+ $amsterdam-typography-text-level-1-font-size: clamp(1.621rem, calc(1.408vw + 1.34rem), 2.747rem);
13
+ $amsterdam-typography-text-level-0-font-size: clamp(1.891rem, calc(1.927vw + 1.506rem), 3.433rem);
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Do not edit directly
3
+ * Generated on Tue, 13 Feb 2024 11:27:27 GMT
4
+ */
5
+
6
+ .amsterdam-theme--compact {
7
+ --amsterdam-grid-padding-inline: clamp(1rem, calc(1.5625vw - 0.0625rem), 2.5rem); /* Equals the gap. */
8
+ --amsterdam-grid-gap: clamp(1rem, calc(1.5625vw - 0.0625rem), 2.5rem); /* Grows from 16px at 1088px wide to 40px at 2624px wide. */
9
+ --amsterdam-typography-text-level-6-font-size: clamp(0.75rem, calc(0.188vw + 0.713rem), 0.9rem);
10
+ --amsterdam-typography-text-level-5-font-size: clamp(0.875rem, calc(0.313vw + 0.813rem), 1.125rem);
11
+ --amsterdam-typography-text-level-4-font-size: clamp(1.021rem, calc(0.481vw + 0.925rem), 1.406rem);
12
+ --amsterdam-typography-text-level-3-font-size: clamp(1.191rem, calc(0.709vw + 1.049rem), 1.758rem);
13
+ --amsterdam-typography-text-level-2-font-size: clamp(1.389rem, calc(1.01vw + 1.187rem), 2.197rem);
14
+ --amsterdam-typography-text-level-1-font-size: clamp(1.621rem, calc(1.408vw + 1.34rem), 2.747rem);
15
+ --amsterdam-typography-text-level-0-font-size: clamp(1.891rem, calc(1.927vw + 1.506rem), 3.433rem);
16
+ }