@amsterdam/design-system-tokens 0.3.0 → 0.5.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 +37 -0
- package/build.js +99 -0
- package/dist/compact.css +16 -0
- package/dist/compact.d.ts +56 -0
- package/dist/compact.json +33 -0
- package/dist/compact.mjs +14 -0
- package/dist/compact.scss +13 -0
- package/dist/compact.theme.css +16 -0
- package/dist/index.css +169 -196
- package/dist/index.d.ts +1103 -508
- package/dist/index.json +1082 -495
- package/dist/{index.js → index.mjs} +189 -216
- package/dist/{_variables.scss → index.scss} +168 -195
- package/dist/{root.css → index.theme.css} +169 -196
- package/package.json +8 -11
- package/src/brand/amsterdam/color.tokens.json +5 -6
- package/src/brand/amsterdam/typography.compact.tokens.json +29 -0
- package/src/brand/amsterdam/typography.tokens.json +28 -62
- package/src/common/amsterdam/hyphenation.tokens.json +9 -0
- package/src/components/amsterdam/accordion.tokens.json +4 -10
- package/src/components/amsterdam/alert.tokens.json +8 -18
- package/src/components/amsterdam/badge.tokens.json +43 -0
- package/src/components/amsterdam/blockquote.tokens.json +3 -9
- package/src/components/amsterdam/breadcrumb.tokens.json +2 -8
- package/src/components/amsterdam/button.tokens.json +2 -8
- package/src/components/amsterdam/checkbox.tokens.json +5 -11
- package/src/components/amsterdam/dialog.tokens.json +2 -15
- package/src/components/amsterdam/form-label.tokens.json +2 -8
- package/src/components/amsterdam/grid.compact.tokens.json +14 -0
- package/src/components/amsterdam/grid.tokens.json +6 -18
- package/src/components/amsterdam/header.tokens.json +1 -1
- package/src/components/amsterdam/heading.tokens.json +22 -50
- package/src/components/amsterdam/icon-button.tokens.json +37 -0
- package/src/components/amsterdam/icon.tokens.json +14 -34
- package/src/components/amsterdam/link-list.tokens.json +45 -0
- package/src/components/amsterdam/link.tokens.json +2 -25
- package/src/components/amsterdam/mega-menu.tokens.json +12 -0
- package/src/components/amsterdam/ordered-list.tokens.json +2 -8
- package/src/components/amsterdam/page-heading.tokens.json +2 -8
- package/src/components/amsterdam/page-menu.tokens.json +2 -8
- package/src/components/amsterdam/pagination.tokens.json +2 -8
- package/src/components/amsterdam/paragraph.tokens.json +10 -26
- package/src/components/amsterdam/search-field.tokens.json +4 -10
- package/src/components/amsterdam/skip-link.tokens.json +2 -6
- package/src/components/amsterdam/spotlight.tokens.json +3 -3
- package/src/components/amsterdam/table.tokens.json +20 -0
- package/src/components/amsterdam/text-input.tokens.json +2 -8
- package/src/components/amsterdam/top-task-link.tokens.json +4 -16
- package/src/components/amsterdam/unordered-list.tokens.json +2 -8
- package/dist/index.tokens.json +0 -1187
- package/dist/tokens.d.ts +0 -1210
- package/dist/tokens.js +0 -11291
- package/dist/variables.less +0 -499
- package/style-dictionary.config.json +0 -101
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,43 @@
|
|
|
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.0](https://github.com/Amsterdam/design-system/compare/@amsterdam/design-system-tokens@0.4.0...design-system-tokens-v0.5.0) (2024-02-09)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### ⚠ BREAKING CHANGES
|
|
10
|
+
|
|
11
|
+
* Add theme setup and compact theme ([#1067](https://github.com/Amsterdam/design-system/issues/1067))
|
|
12
|
+
* Remove deprecated ‘in list’ variant of Link ([#1064](https://github.com/Amsterdam/design-system/issues/1064))
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* Add theme setup and compact theme ([#1067](https://github.com/Amsterdam/design-system/issues/1067)) ([e773434](https://github.com/Amsterdam/design-system/commit/e7734347a9e7205d510a16a543294bde69b9c6f0))
|
|
17
|
+
* 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))
|
|
18
|
+
* Remove deprecated ‘in list’ variant of Link ([#1064](https://github.com/Amsterdam/design-system/issues/1064)) ([b30784b](https://github.com/Amsterdam/design-system/commit/b30784b352b4a057069ceb397951b79a6e2547f2))
|
|
19
|
+
|
|
20
|
+
## [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)
|
|
21
|
+
|
|
22
|
+
### ⚠ BREAKING CHANGES
|
|
23
|
+
|
|
24
|
+
* Change blue color names of Spotlight to match Badge API (#1061)
|
|
25
|
+
* Remove unused grey-4 color token (#1059)
|
|
26
|
+
* Add icon button (#1021)
|
|
27
|
+
* Update alert appearance, make ‘warning’ the default and icon non-optional (#993)
|
|
28
|
+
|
|
29
|
+
### Features
|
|
30
|
+
|
|
31
|
+
* Add Badge component ([#1045](https://github.com/Amsterdam/design-system/issues/1045)) ([d346cdf](https://github.com/Amsterdam/design-system/commit/d346cdfd2b3c7fab08e6bae10314420f1fde8a5f))
|
|
32
|
+
* Add icon button ([#1021](https://github.com/Amsterdam/design-system/issues/1021)) ([b6e1c26](https://github.com/Amsterdam/design-system/commit/b6e1c260878c09340c9fc89f8740ae033e206855))
|
|
33
|
+
* Add MegaMenu component ([#992](https://github.com/Amsterdam/design-system/issues/992)) ([de9fcc6](https://github.com/Amsterdam/design-system/commit/de9fcc65cced79a07cf201613b8616193f86b810))
|
|
34
|
+
* Add Table ([#1043](https://github.com/Amsterdam/design-system/issues/1043)) ([2175b22](https://github.com/Amsterdam/design-system/commit/2175b22dbab369fb5d7f817a09c7f0560d8d8195))
|
|
35
|
+
* Change blue color names of Spotlight to match Badge API ([#1061](https://github.com/Amsterdam/design-system/issues/1061)) ([0e663bd](https://github.com/Amsterdam/design-system/commit/0e663bd1bcbc8c848d16962749d6113cd3aaaf20))
|
|
36
|
+
* Introduce separate Link List component ([#1051](https://github.com/Amsterdam/design-system/issues/1051)) ([7ccf23d](https://github.com/Amsterdam/design-system/commit/7ccf23d1128a6cade34ec6846d0fee23335af525))
|
|
37
|
+
|
|
38
|
+
### Bug Fixes
|
|
39
|
+
|
|
40
|
+
* Remove unused grey-4 color token ([#1059](https://github.com/Amsterdam/design-system/issues/1059)) ([379560e](https://github.com/Amsterdam/design-system/commit/379560eafc48d3301439c4e40268b65beae59a56))
|
|
41
|
+
* Update alert appearance, make ‘warning’ the default and icon non-optional ([#993](https://github.com/Amsterdam/design-system/issues/993)) ([df15253](https://github.com/Amsterdam/design-system/commit/df152538278a73c4aceb094fece70025ff35dc5f))
|
|
42
|
+
|
|
6
43
|
## [0.3.0](https://github.com/Amsterdam/design-system/compare/@amsterdam/design-system-tokens@0.2.0...@amsterdam/design-system-tokens@0.3.0) (2023-12-22)
|
|
7
44
|
|
|
8
45
|
### ⚠ 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 ? `${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',
|
|
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
|
+
})
|
package/dist/compact.css
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Do not edit directly
|
|
3
|
+
* Generated on Fri, 09 Feb 2024 16:26:11 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 Fri, 09 Feb 2024 16:26:11 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
|
+
}
|
package/dist/compact.mjs
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Do not edit directly
|
|
3
|
+
* Generated on Fri, 09 Feb 2024 16:26:11 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 Fri, 09 Feb 2024 16:26:11 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 Fri, 09 Feb 2024 16:26:11 GMT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
.amsterdam-theme {
|
|
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
|
+
}
|