@abgov/design-tokens 1.0.5-dev.5 → 1.0.5-dev.7
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/data/global-ddi.json +1 -1
- package/{css → dist}/tokens.css +5 -5
- package/{scss → dist}/tokens.scss +5 -5
- package/index.spec.js +6 -13
- package/lib/design-tokens.js +4 -4
- package/package.json +1 -1
- package/css/index.css +0 -100
- package/scss/index.scss +0 -97
package/data/global-ddi.json
CHANGED
package/{css → dist}/tokens.css
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Do not edit directly
|
|
3
|
-
* Generated on
|
|
3
|
+
* Generated on Fri, 06 Jan 2023 17:37:13 GMT
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
:root {
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
--goa-color-info-background: #eff8ff;
|
|
20
20
|
--goa-color-info-light: #b2d4ed;
|
|
21
21
|
--goa-color-info-dark: #00347a;
|
|
22
|
-
--goa-color-
|
|
23
|
-
--goa-color-
|
|
24
|
-
--goa-color-
|
|
25
|
-
--goa-color-
|
|
22
|
+
--goa-color-warning-background: #fff6e5;
|
|
23
|
+
--goa-color-warning-default: #feba35;
|
|
24
|
+
--goa-color-warning-light: #fcefd0;
|
|
25
|
+
--goa-color-warning-dark: #c68a00;
|
|
26
26
|
--goa-color-emergency-background: #fff1f2;
|
|
27
27
|
--goa-color-emergency-default: #ec040b;
|
|
28
28
|
--goa-color-emergency-light: #ffcecf;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
// Do not edit directly
|
|
3
|
-
// Generated on
|
|
3
|
+
// Generated on Fri, 06 Jan 2023 17:37:13 GMT
|
|
4
4
|
|
|
5
5
|
$goa-color-brand-default: #0081a2;
|
|
6
6
|
$goa-color-brand-dark: #005072;
|
|
@@ -17,10 +17,10 @@ $goa-color-info-default: #005daa;
|
|
|
17
17
|
$goa-color-info-background: #eff8ff;
|
|
18
18
|
$goa-color-info-light: #b2d4ed;
|
|
19
19
|
$goa-color-info-dark: #00347a;
|
|
20
|
-
$goa-color-
|
|
21
|
-
$goa-color-
|
|
22
|
-
$goa-color-
|
|
23
|
-
$goa-color-
|
|
20
|
+
$goa-color-warning-background: #fff6e5;
|
|
21
|
+
$goa-color-warning-default: #feba35;
|
|
22
|
+
$goa-color-warning-light: #fcefd0;
|
|
23
|
+
$goa-color-warning-dark: #c68a00;
|
|
24
24
|
$goa-color-emergency-background: #fff1f2;
|
|
25
25
|
$goa-color-emergency-default: #ec040b;
|
|
26
26
|
$goa-color-emergency-light: #ffcecf;
|
package/index.spec.js
CHANGED
|
@@ -10,28 +10,21 @@ describe("GoA Design Tokens", () => {
|
|
|
10
10
|
|
|
11
11
|
it("should create css and scss files", async () => {
|
|
12
12
|
SC.generate("./tmp");
|
|
13
|
-
const dirs = fs.readdirSync("./tmp");
|
|
14
|
-
expect(dirs.length).toBe(2);
|
|
15
|
-
expect(dirs[0]).toContain("css");
|
|
16
|
-
expect(dirs[1]).toContain("scss");
|
|
17
13
|
|
|
18
|
-
const cssfiles = fs.readdirSync("./tmp/
|
|
19
|
-
expect(cssfiles.length).toBe(
|
|
20
|
-
expect(cssfiles[0]).toBe(`
|
|
21
|
-
|
|
22
|
-
const scssfiles = fs.readdirSync("./tmp/scss");
|
|
23
|
-
expect(scssfiles.length).toBe(1);
|
|
24
|
-
expect(scssfiles[0]).toBe(`index.scss`);
|
|
14
|
+
const cssfiles = fs.readdirSync("./tmp/dist");
|
|
15
|
+
expect(cssfiles.length).toBe(2);
|
|
16
|
+
expect(cssfiles[0]).toBe(`tokens.css`);
|
|
17
|
+
expect(cssfiles[1]).toBe(`tokens.scss`);
|
|
25
18
|
});
|
|
26
19
|
|
|
27
20
|
it("should create valid css output", async () => {
|
|
28
21
|
SC.generate("./tmp");
|
|
29
|
-
const raw = fs.readFileSync("./tmp/
|
|
22
|
+
const raw = fs.readFileSync("./tmp/dist/tokens.css", { encoding: "utf8" });
|
|
30
23
|
expect(raw).not.toContain("[object Object]");
|
|
31
24
|
});
|
|
32
25
|
it("should create valid scss output", async () => {
|
|
33
26
|
SC.generate("./tmp");
|
|
34
|
-
const raw = fs.readFileSync("./tmp/
|
|
27
|
+
const raw = fs.readFileSync("./tmp/dist/tokens.scss", { encoding: "utf8" });
|
|
35
28
|
expect(raw).not.toContain("[object Object]");
|
|
36
29
|
});
|
|
37
30
|
});
|
package/lib/design-tokens.js
CHANGED
|
@@ -42,10 +42,10 @@ function generate(outputPath) {
|
|
|
42
42
|
"typography/shorthand",
|
|
43
43
|
"box-shadow",
|
|
44
44
|
],
|
|
45
|
-
buildPath: `${outputPath}/
|
|
45
|
+
buildPath: `${outputPath}/dist/`,
|
|
46
46
|
files: [
|
|
47
47
|
{
|
|
48
|
-
destination: "
|
|
48
|
+
destination: "tokens.scss",
|
|
49
49
|
format: "scss/variables",
|
|
50
50
|
},
|
|
51
51
|
],
|
|
@@ -57,10 +57,10 @@ function generate(outputPath) {
|
|
|
57
57
|
"typography/shorthand",
|
|
58
58
|
"box-shadow",
|
|
59
59
|
],
|
|
60
|
-
buildPath: `${outputPath}/
|
|
60
|
+
buildPath: `${outputPath}/dist/`,
|
|
61
61
|
files: [
|
|
62
62
|
{
|
|
63
|
-
destination: "
|
|
63
|
+
destination: "tokens.css",
|
|
64
64
|
format: "css/variables",
|
|
65
65
|
},
|
|
66
66
|
],
|
package/package.json
CHANGED
package/css/index.css
DELETED
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Do not edit directly
|
|
3
|
-
* Generated on Thu, 05 Jan 2023 22:44:54 GMT
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
:root {
|
|
7
|
-
--goa-color-brand-default: #0081a2;
|
|
8
|
-
--goa-color-brand-dark: #005072;
|
|
9
|
-
--goa-color-brand-light: #c8eefa;
|
|
10
|
-
--goa-color-interactive-default: #0070c4;
|
|
11
|
-
--goa-color-interactive-disabled: #80b7e1;
|
|
12
|
-
--goa-color-interactive-hover: #004f84;
|
|
13
|
-
--goa-color-interactive-error: #ec040b;
|
|
14
|
-
--goa-color-interactive-focus: #feba35;
|
|
15
|
-
--goa-color-text-default: #333333;
|
|
16
|
-
--goa-color-text-secondary: #666666;
|
|
17
|
-
--goa-color-text-light: #ffffff;
|
|
18
|
-
--goa-color-info-default: #005daa;
|
|
19
|
-
--goa-color-info-background: #eff8ff;
|
|
20
|
-
--goa-color-info-light: #b2d4ed;
|
|
21
|
-
--goa-color-info-dark: #00347a;
|
|
22
|
-
--goa-color-caution-background: #fff6e5;
|
|
23
|
-
--goa-color-caution-default: #feba35;
|
|
24
|
-
--goa-color-caution-light: #fcefd0;
|
|
25
|
-
--goa-color-caution-dark: #c68a00;
|
|
26
|
-
--goa-color-emergency-background: #fff1f2;
|
|
27
|
-
--goa-color-emergency-default: #ec040b;
|
|
28
|
-
--goa-color-emergency-light: #ffcecf;
|
|
29
|
-
--goa-color-emergency-dark: #b00000;
|
|
30
|
-
--goa-color-success-background: #eef9f3;
|
|
31
|
-
--goa-color-success-default: #00853f;
|
|
32
|
-
--goa-color-success-light: #c6e0d0;
|
|
33
|
-
--goa-color-success-dark: #005715;
|
|
34
|
-
--goa-color-greyscale-100: #f1f1f1;
|
|
35
|
-
--goa-color-greyscale-200: #dcdcdc;
|
|
36
|
-
--goa-color-greyscale-400: #adadad;
|
|
37
|
-
--goa-color-greyscale-500: #949494;
|
|
38
|
-
--goa-color-greyscale-600: #858585;
|
|
39
|
-
--goa-color-greyscale-700: #666666;
|
|
40
|
-
--goa-color-greyscale-black: #333333;
|
|
41
|
-
--goa-color-greyscale-white: #ffffff;
|
|
42
|
-
--goa-font-weight-regular: 400;
|
|
43
|
-
--goa-font-weight-medium: 500;
|
|
44
|
-
--goa-font-weight-bold: 700;
|
|
45
|
-
--goa-font-size-1: 0.75rem;
|
|
46
|
-
--goa-font-size-2: 0.875rem;
|
|
47
|
-
--goa-font-size-3: 1rem;
|
|
48
|
-
--goa-font-size-4: 1.125rem;
|
|
49
|
-
--goa-font-size-5: 1.25rem;
|
|
50
|
-
--goa-font-size-6: 1.375rem;
|
|
51
|
-
--goa-font-size-7: 1.5rem;
|
|
52
|
-
--goa-font-size-8: 2rem;
|
|
53
|
-
--goa-font-size-9: 2.25rem;
|
|
54
|
-
--goa-font-size-10: 3rem;
|
|
55
|
-
--goa-spacing-none: 0rem;
|
|
56
|
-
--goa-spacing-3xs: 0.125rem;
|
|
57
|
-
--goa-spacing-2xs: 0.25rem;
|
|
58
|
-
--goa-spacing-xs: 0.5rem;
|
|
59
|
-
--goa-spacing-s: 0.75rem;
|
|
60
|
-
--goa-spacing-m: 1rem;
|
|
61
|
-
--goa-spacing-l: 1.5rem;
|
|
62
|
-
--goa-spacing-xl: 2rem;
|
|
63
|
-
--goa-spacing-2xl: 3rem;
|
|
64
|
-
--goa-spacing-3xl: 4rem;
|
|
65
|
-
--goa-spacing-4xl: 8rem;
|
|
66
|
-
--goa-border-radius-0: 0rem;
|
|
67
|
-
--goa-border-radius-4: 0.25rem;
|
|
68
|
-
--goa-border-radius-pill: 999px;
|
|
69
|
-
--goa-border-radius-circle: 50%;
|
|
70
|
-
--goa-opacity-3: 30%;
|
|
71
|
-
--goa-opacity-5: 50%;
|
|
72
|
-
--goa-opacity-8: 80%;
|
|
73
|
-
--goa-line-height-1: 1.25rem;
|
|
74
|
-
--goa-line-height-2: 1.5rem;
|
|
75
|
-
--goa-line-height-3: 1.75rem;
|
|
76
|
-
--goa-line-height-4: 2rem;
|
|
77
|
-
--goa-line-height-5: 2.5rem;
|
|
78
|
-
--goa-line-height-6: 2.75rem;
|
|
79
|
-
--goa-line-height-7: 3.5rem;
|
|
80
|
-
--goa-font-families-default: Acumin-pro-semi-condensed;
|
|
81
|
-
--goa-font-families-numbers: roboto-mono;
|
|
82
|
-
--goa-typography-heading-xl: 700 3rem/3.5rem Acumin-pro-semi-condensed;
|
|
83
|
-
--goa-typography-heading-l: 400 2.25rem/2.75rem Acumin-pro-semi-condensed;
|
|
84
|
-
--goa-typography-heading-m: 400 1.5rem/2rem Acumin-pro-semi-condensed;
|
|
85
|
-
--goa-typography-heading-s: 700 1.125rem/1.75rem Acumin-pro-semi-condensed;
|
|
86
|
-
--goa-typography-heading-xs: 700 1rem/1.5rem Acumin-pro-semi-condensed;
|
|
87
|
-
--goa-typography-body-l: 400 1.5rem/2rem Acumin-pro-semi-condensed;
|
|
88
|
-
--goa-typography-body-m: 400 1.125rem/1.75rem Acumin-pro-semi-condensed;
|
|
89
|
-
--goa-typography-body-s: 400 1rem/1.5rem Acumin-pro-semi-condensed;
|
|
90
|
-
--goa-typography-body-xs: 400 0.875rem/1.25rem Acumin-pro-semi-condensed;
|
|
91
|
-
--goa-typography-button-default: 400 1.125rem/1.25rem Acumin-pro-semi-condensed;
|
|
92
|
-
--goa-border-width-s: 1px;
|
|
93
|
-
--goa-border-width-m: 2px;
|
|
94
|
-
--goa-border-width-l: 3px;
|
|
95
|
-
--goa-letter-spacing-1: 0.0125rem;
|
|
96
|
-
--goa-icon-size-s: 1rem;
|
|
97
|
-
--goa-icon-size-m: 1.25rem;
|
|
98
|
-
--goa-icon-size-l: 1.5rem;
|
|
99
|
-
--goa-drop-shadow-modal: 6px 6px 6px 0px rgba(0,0,0,0.16);
|
|
100
|
-
}
|
package/scss/index.scss
DELETED
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
// Do not edit directly
|
|
3
|
-
// Generated on Thu, 05 Jan 2023 22:44:54 GMT
|
|
4
|
-
|
|
5
|
-
$goa-color-brand-default: #0081a2;
|
|
6
|
-
$goa-color-brand-dark: #005072;
|
|
7
|
-
$goa-color-brand-light: #c8eefa;
|
|
8
|
-
$goa-color-interactive-default: #0070c4;
|
|
9
|
-
$goa-color-interactive-disabled: #80b7e1;
|
|
10
|
-
$goa-color-interactive-hover: #004f84;
|
|
11
|
-
$goa-color-interactive-error: #ec040b;
|
|
12
|
-
$goa-color-interactive-focus: #feba35;
|
|
13
|
-
$goa-color-text-default: #333333;
|
|
14
|
-
$goa-color-text-secondary: #666666;
|
|
15
|
-
$goa-color-text-light: #ffffff;
|
|
16
|
-
$goa-color-info-default: #005daa;
|
|
17
|
-
$goa-color-info-background: #eff8ff;
|
|
18
|
-
$goa-color-info-light: #b2d4ed;
|
|
19
|
-
$goa-color-info-dark: #00347a;
|
|
20
|
-
$goa-color-caution-background: #fff6e5;
|
|
21
|
-
$goa-color-caution-default: #feba35;
|
|
22
|
-
$goa-color-caution-light: #fcefd0;
|
|
23
|
-
$goa-color-caution-dark: #c68a00;
|
|
24
|
-
$goa-color-emergency-background: #fff1f2;
|
|
25
|
-
$goa-color-emergency-default: #ec040b;
|
|
26
|
-
$goa-color-emergency-light: #ffcecf;
|
|
27
|
-
$goa-color-emergency-dark: #b00000;
|
|
28
|
-
$goa-color-success-background: #eef9f3;
|
|
29
|
-
$goa-color-success-default: #00853f;
|
|
30
|
-
$goa-color-success-light: #c6e0d0;
|
|
31
|
-
$goa-color-success-dark: #005715;
|
|
32
|
-
$goa-color-greyscale-100: #f1f1f1;
|
|
33
|
-
$goa-color-greyscale-200: #dcdcdc;
|
|
34
|
-
$goa-color-greyscale-400: #adadad;
|
|
35
|
-
$goa-color-greyscale-500: #949494;
|
|
36
|
-
$goa-color-greyscale-600: #858585;
|
|
37
|
-
$goa-color-greyscale-700: #666666;
|
|
38
|
-
$goa-color-greyscale-black: #333333;
|
|
39
|
-
$goa-color-greyscale-white: #ffffff;
|
|
40
|
-
$goa-font-weight-regular: 400;
|
|
41
|
-
$goa-font-weight-medium: 500;
|
|
42
|
-
$goa-font-weight-bold: 700;
|
|
43
|
-
$goa-font-size-1: 0.75rem;
|
|
44
|
-
$goa-font-size-2: 0.875rem;
|
|
45
|
-
$goa-font-size-3: 1rem;
|
|
46
|
-
$goa-font-size-4: 1.125rem;
|
|
47
|
-
$goa-font-size-5: 1.25rem;
|
|
48
|
-
$goa-font-size-6: 1.375rem;
|
|
49
|
-
$goa-font-size-7: 1.5rem;
|
|
50
|
-
$goa-font-size-8: 2rem;
|
|
51
|
-
$goa-font-size-9: 2.25rem;
|
|
52
|
-
$goa-font-size-10: 3rem;
|
|
53
|
-
$goa-spacing-none: 0rem;
|
|
54
|
-
$goa-spacing-3xs: 0.125rem;
|
|
55
|
-
$goa-spacing-2xs: 0.25rem;
|
|
56
|
-
$goa-spacing-xs: 0.5rem;
|
|
57
|
-
$goa-spacing-s: 0.75rem;
|
|
58
|
-
$goa-spacing-m: 1rem;
|
|
59
|
-
$goa-spacing-l: 1.5rem;
|
|
60
|
-
$goa-spacing-xl: 2rem;
|
|
61
|
-
$goa-spacing-2xl: 3rem;
|
|
62
|
-
$goa-spacing-3xl: 4rem;
|
|
63
|
-
$goa-spacing-4xl: 8rem;
|
|
64
|
-
$goa-border-radius-0: 0rem;
|
|
65
|
-
$goa-border-radius-4: 0.25rem;
|
|
66
|
-
$goa-border-radius-pill: 999px;
|
|
67
|
-
$goa-border-radius-circle: 50%;
|
|
68
|
-
$goa-opacity-3: 30%;
|
|
69
|
-
$goa-opacity-5: 50%;
|
|
70
|
-
$goa-opacity-8: 80%;
|
|
71
|
-
$goa-line-height-1: 1.25rem;
|
|
72
|
-
$goa-line-height-2: 1.5rem;
|
|
73
|
-
$goa-line-height-3: 1.75rem;
|
|
74
|
-
$goa-line-height-4: 2rem;
|
|
75
|
-
$goa-line-height-5: 2.5rem;
|
|
76
|
-
$goa-line-height-6: 2.75rem;
|
|
77
|
-
$goa-line-height-7: 3.5rem;
|
|
78
|
-
$goa-font-families-default: Acumin-pro-semi-condensed;
|
|
79
|
-
$goa-font-families-numbers: roboto-mono;
|
|
80
|
-
$goa-typography-heading-xl: 700 3rem/3.5rem Acumin-pro-semi-condensed;
|
|
81
|
-
$goa-typography-heading-l: 400 2.25rem/2.75rem Acumin-pro-semi-condensed;
|
|
82
|
-
$goa-typography-heading-m: 400 1.5rem/2rem Acumin-pro-semi-condensed;
|
|
83
|
-
$goa-typography-heading-s: 700 1.125rem/1.75rem Acumin-pro-semi-condensed;
|
|
84
|
-
$goa-typography-heading-xs: 700 1rem/1.5rem Acumin-pro-semi-condensed;
|
|
85
|
-
$goa-typography-body-l: 400 1.5rem/2rem Acumin-pro-semi-condensed;
|
|
86
|
-
$goa-typography-body-m: 400 1.125rem/1.75rem Acumin-pro-semi-condensed;
|
|
87
|
-
$goa-typography-body-s: 400 1rem/1.5rem Acumin-pro-semi-condensed;
|
|
88
|
-
$goa-typography-body-xs: 400 0.875rem/1.25rem Acumin-pro-semi-condensed;
|
|
89
|
-
$goa-typography-button-default: 400 1.125rem/1.25rem Acumin-pro-semi-condensed;
|
|
90
|
-
$goa-border-width-s: 1px;
|
|
91
|
-
$goa-border-width-m: 2px;
|
|
92
|
-
$goa-border-width-l: 3px;
|
|
93
|
-
$goa-letter-spacing-1: 0.0125rem;
|
|
94
|
-
$goa-icon-size-s: 1rem;
|
|
95
|
-
$goa-icon-size-m: 1.25rem;
|
|
96
|
-
$goa-icon-size-l: 1.5rem;
|
|
97
|
-
$goa-drop-shadow-modal: 6px 6px 6px 0px rgba(0,0,0,0.16);
|