@wonderflow/themes 1.0.2
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/.turbo/turbo-build.log +29 -0
- package/CHANGELOG.md +17 -0
- package/dist/themes/dark.css +41 -0
- package/dist/themes/dark.json +36 -0
- package/dist/themes/light.css +41 -0
- package/dist/themes/light.json +36 -0
- package/dist/themes.css +143 -0
- package/package.json +48 -0
- package/src/combine.js +49 -0
- package/src/dark.json +112 -0
- package/src/index.js +7 -0
- package/src/light.json +112 -0
- package/src/themes.config.js +30 -0
- package/tests/themes.js +33 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
@wonderflow/themes:build: cache hit, replaying output d18f35291ba48c22
|
|
2
|
+
@wonderflow/themes:build:
|
|
3
|
+
@wonderflow/themes:build: > @wonderflow/themes@1.0.2 build
|
|
4
|
+
@wonderflow/themes:build: > run-s build:prepare && run-s build:light build:dark && run-s build:combine
|
|
5
|
+
@wonderflow/themes:build:
|
|
6
|
+
@wonderflow/themes:build:
|
|
7
|
+
@wonderflow/themes:build: > @wonderflow/themes@1.0.2 build:prepare
|
|
8
|
+
@wonderflow/themes:build: > rimraf dist
|
|
9
|
+
@wonderflow/themes:build:
|
|
10
|
+
@wonderflow/themes:build:
|
|
11
|
+
@wonderflow/themes:build: > @wonderflow/themes@1.0.2 build:light
|
|
12
|
+
@wonderflow/themes:build: > node src/index.js --name light
|
|
13
|
+
@wonderflow/themes:build:
|
|
14
|
+
@wonderflow/themes:build:
|
|
15
|
+
@wonderflow/themes:build: web
|
|
16
|
+
@wonderflow/themes:build: ✔︎ dist/themes/light.css
|
|
17
|
+
@wonderflow/themes:build: ✔︎ dist/themes/light.json
|
|
18
|
+
@wonderflow/themes:build:
|
|
19
|
+
@wonderflow/themes:build: > @wonderflow/themes@1.0.2 build:dark
|
|
20
|
+
@wonderflow/themes:build: > node src/index.js --name dark
|
|
21
|
+
@wonderflow/themes:build:
|
|
22
|
+
@wonderflow/themes:build:
|
|
23
|
+
@wonderflow/themes:build: web
|
|
24
|
+
@wonderflow/themes:build: ✔︎ dist/themes/dark.css
|
|
25
|
+
@wonderflow/themes:build: ✔︎ dist/themes/dark.json
|
|
26
|
+
@wonderflow/themes:build:
|
|
27
|
+
@wonderflow/themes:build: > @wonderflow/themes@1.0.2 build:combine
|
|
28
|
+
@wonderflow/themes:build: > node src/combine.js
|
|
29
|
+
@wonderflow/themes:build:
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# @wonderflow/themes
|
|
2
|
+
|
|
3
|
+
## 1.0.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#21](https://github.com/wonderflow-bv/wanda/pull/21) [`5d6fda0`](https://github.com/wonderflow-bv/wanda/commit/5d6fda0a920f5915741a6b4f0c6bd9ac5903388d) Thanks [@equinusocio](https://github.com/equinusocio)! - init
|
|
8
|
+
|
|
9
|
+
* [`23dcabe`](https://github.com/wonderflow-bv/wanda/commit/23dcabe148c3420b286d78e06abc82e627dfe083) Thanks [@equinusocio](https://github.com/equinusocio)! - init
|
|
10
|
+
|
|
11
|
+
- [#22](https://github.com/wonderflow-bv/wanda/pull/22) [`4a4464b`](https://github.com/wonderflow-bv/wanda/commit/4a4464b034dbf18fc75ed355454ba7bbdd4b67b4) Thanks [@equinusocio](https://github.com/equinusocio)! - Init
|
|
12
|
+
|
|
13
|
+
## 1.0.1
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- aa91e4d: Init new packages
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Do not edit directly
|
|
3
|
+
* Generated on Thu, 20 Jan 2022 08:07:04 GMT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
:root {
|
|
7
|
+
--global-foreground: hsl(220 19% 91%);
|
|
8
|
+
--global-background: hsl(0 0% 0%);
|
|
9
|
+
--global-interactive-text: hsl(206 72% 67%);
|
|
10
|
+
--global-interactive-text-hover: hsl(200 100% 83%);
|
|
11
|
+
--global-vibrancy-foreground: hsl(0 0% 100%);
|
|
12
|
+
--global-vibrancy-background: hsl(218 11% 14% / 80%);
|
|
13
|
+
--global-vibrancy-background-hover: hsl(221 10% 30% / 60%);
|
|
14
|
+
--global-disabled-background: hsl(221 9% 49% / 35%);
|
|
15
|
+
--global-disabled-foreground: hsl(0 0% 100% / 20%);
|
|
16
|
+
--cta-default: hsl(0 100% 47%);
|
|
17
|
+
--cta-dark: hsl(0 100% 41%);
|
|
18
|
+
--cta-foreground: hsl(0 0% 100%);
|
|
19
|
+
--dimmed-0: hsl(225 11% 7%);
|
|
20
|
+
--dimmed-1: hsl(218 11% 14%);
|
|
21
|
+
--dimmed-2: hsl(219 13% 22%);
|
|
22
|
+
--dimmed-3: hsl(221 10% 30%);
|
|
23
|
+
--dimmed-4: hsl(221 10% 39%);
|
|
24
|
+
--dimmed-5: hsl(221 9% 49%);
|
|
25
|
+
--dimmed-6: hsl(220 12% 66%);
|
|
26
|
+
--dimmed-7: hsl(220 19% 91%);
|
|
27
|
+
--highlight-gray-background: hsl(218 11% 14%);
|
|
28
|
+
--highlight-gray-foreground: hsl(220 12% 66%);
|
|
29
|
+
--highlight-yellow-background: hsl(22 100% 19%);
|
|
30
|
+
--highlight-yellow-foreground: hsl(38 100% 77%);
|
|
31
|
+
--highlight-green-background: hsl(166 100% 13%);
|
|
32
|
+
--highlight-green-foreground: hsl(145 76% 75%);
|
|
33
|
+
--highlight-blue-background: hsl(222 100% 17%);
|
|
34
|
+
--highlight-blue-foreground: hsl(200 100% 83%);
|
|
35
|
+
--highlight-red-background: hsl(350 100% 15%);
|
|
36
|
+
--highlight-red-foreground: hsl(351 100% 81%);
|
|
37
|
+
--highlight-cyan-background: hsl(187 66% 16%);
|
|
38
|
+
--highlight-cyan-foreground: hsl(187 57% 58%);
|
|
39
|
+
--highlight-purple-background: hsl(298 41% 25%);
|
|
40
|
+
--highlight-purple-foreground: hsl(298 47% 75%);
|
|
41
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"global-foreground": "hsl(220 19% 91%)",
|
|
3
|
+
"global-background": "hsl(0 0% 0%)",
|
|
4
|
+
"global-interactive-text": "hsl(206 72% 67%)",
|
|
5
|
+
"global-interactive-text-hover": "hsl(200 100% 83%)",
|
|
6
|
+
"global-vibrancy-foreground": "hsl(0 0% 100%)",
|
|
7
|
+
"global-vibrancy-background": "hsl(218 11% 14% / 80%)",
|
|
8
|
+
"global-vibrancy-background-hover": "hsl(221 10% 30% / 60%)",
|
|
9
|
+
"global-disabled-background": "hsl(221 9% 49% / 35%)",
|
|
10
|
+
"global-disabled-foreground": "hsl(0 0% 100% / 20%)",
|
|
11
|
+
"cta-default": "hsl(0 100% 47%)",
|
|
12
|
+
"cta-dark": "hsl(0 100% 41%)",
|
|
13
|
+
"cta-foreground": "hsl(0 0% 100%)",
|
|
14
|
+
"dimmed-0": "hsl(225 11% 7%)",
|
|
15
|
+
"dimmed-1": "hsl(218 11% 14%)",
|
|
16
|
+
"dimmed-2": "hsl(219 13% 22%)",
|
|
17
|
+
"dimmed-3": "hsl(221 10% 30%)",
|
|
18
|
+
"dimmed-4": "hsl(221 10% 39%)",
|
|
19
|
+
"dimmed-5": "hsl(221 9% 49%)",
|
|
20
|
+
"dimmed-6": "hsl(220 12% 66%)",
|
|
21
|
+
"dimmed-7": "hsl(220 19% 91%)",
|
|
22
|
+
"highlight-gray-background": "hsl(218 11% 14%)",
|
|
23
|
+
"highlight-gray-foreground": "hsl(220 12% 66%)",
|
|
24
|
+
"highlight-yellow-background": "hsl(22 100% 19%)",
|
|
25
|
+
"highlight-yellow-foreground": "hsl(38 100% 77%)",
|
|
26
|
+
"highlight-green-background": "hsl(166 100% 13%)",
|
|
27
|
+
"highlight-green-foreground": "hsl(145 76% 75%)",
|
|
28
|
+
"highlight-blue-background": "hsl(222 100% 17%)",
|
|
29
|
+
"highlight-blue-foreground": "hsl(200 100% 83%)",
|
|
30
|
+
"highlight-red-background": "hsl(350 100% 15%)",
|
|
31
|
+
"highlight-red-foreground": "hsl(351 100% 81%)",
|
|
32
|
+
"highlight-cyan-background": "hsl(187 66% 16%)",
|
|
33
|
+
"highlight-cyan-foreground": "hsl(187 57% 58%)",
|
|
34
|
+
"highlight-purple-background": "hsl(298 41% 25%)",
|
|
35
|
+
"highlight-purple-foreground": "hsl(298 47% 75%)"
|
|
36
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Do not edit directly
|
|
3
|
+
* Generated on Thu, 20 Jan 2022 08:07:03 GMT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
:root {
|
|
7
|
+
--global-foreground: hsl(221 10% 30%);
|
|
8
|
+
--global-background: hsl(0 0% 100%);
|
|
9
|
+
--global-interactive-text: hsl(214 66% 44%);
|
|
10
|
+
--global-interactive-text-hover: hsl(219 93% 27%);
|
|
11
|
+
--global-vibrancy-foreground: hsl(0 0% 0%);
|
|
12
|
+
--global-vibrancy-background: hsl(220 16% 85% / 40%);
|
|
13
|
+
--global-vibrancy-background-hover: hsl(221 9% 49% / 30%);
|
|
14
|
+
--global-disabled-background: hsl(225 11% 7% / 6%);
|
|
15
|
+
--global-disabled-foreground: hsl(0 0% 0% / 20%);
|
|
16
|
+
--cta-default: hsl(0 100% 47%);
|
|
17
|
+
--cta-dark: hsl(0 100% 41%);
|
|
18
|
+
--cta-foreground: hsl(0 0% 100%);
|
|
19
|
+
--dimmed-0: hsl(210 20% 98%);
|
|
20
|
+
--dimmed-1: hsl(220 19% 91%);
|
|
21
|
+
--dimmed-2: hsl(220 16% 85%);
|
|
22
|
+
--dimmed-3: hsl(219 14% 75%);
|
|
23
|
+
--dimmed-4: hsl(220 12% 66%);
|
|
24
|
+
--dimmed-5: hsl(221 9% 49%);
|
|
25
|
+
--dimmed-6: hsl(221 10% 39%);
|
|
26
|
+
--dimmed-7: hsl(221 10% 30%);
|
|
27
|
+
--highlight-gray-background: hsl(220 19% 91%);
|
|
28
|
+
--highlight-gray-foreground: hsl(221 10% 39%);
|
|
29
|
+
--highlight-yellow-background: hsl(60 100% 89%);
|
|
30
|
+
--highlight-yellow-foreground: hsl(25 100% 34%);
|
|
31
|
+
--highlight-green-background: hsl(149 100% 91%);
|
|
32
|
+
--highlight-green-foreground: hsl(156 100% 23%);
|
|
33
|
+
--highlight-blue-background: hsl(187 100% 89%);
|
|
34
|
+
--highlight-blue-foreground: hsl(214 66% 44%);
|
|
35
|
+
--highlight-red-background: hsl(343 100% 96%);
|
|
36
|
+
--highlight-red-foreground: hsl(351 92% 37%);
|
|
37
|
+
--highlight-cyan-background: hsl(186 100% 96%);
|
|
38
|
+
--highlight-cyan-foreground: hsl(187 64% 33%);
|
|
39
|
+
--highlight-purple-background: hsl(300 100% 98%);
|
|
40
|
+
--highlight-purple-foreground: hsl(298 32% 46%);
|
|
41
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"global-foreground": "hsl(221 10% 30%)",
|
|
3
|
+
"global-background": "hsl(0 0% 100%)",
|
|
4
|
+
"global-interactive-text": "hsl(214 66% 44%)",
|
|
5
|
+
"global-interactive-text-hover": "hsl(219 93% 27%)",
|
|
6
|
+
"global-vibrancy-foreground": "hsl(0 0% 0%)",
|
|
7
|
+
"global-vibrancy-background": "hsl(220 16% 85% / 40%)",
|
|
8
|
+
"global-vibrancy-background-hover": "hsl(221 9% 49% / 30%)",
|
|
9
|
+
"global-disabled-background": "hsl(225 11% 7% / 6%)",
|
|
10
|
+
"global-disabled-foreground": "hsl(0 0% 0% / 20%)",
|
|
11
|
+
"cta-default": "hsl(0 100% 47%)",
|
|
12
|
+
"cta-dark": "hsl(0 100% 41%)",
|
|
13
|
+
"cta-foreground": "hsl(0 0% 100%)",
|
|
14
|
+
"dimmed-0": "hsl(210 20% 98%)",
|
|
15
|
+
"dimmed-1": "hsl(220 19% 91%)",
|
|
16
|
+
"dimmed-2": "hsl(220 16% 85%)",
|
|
17
|
+
"dimmed-3": "hsl(219 14% 75%)",
|
|
18
|
+
"dimmed-4": "hsl(220 12% 66%)",
|
|
19
|
+
"dimmed-5": "hsl(221 9% 49%)",
|
|
20
|
+
"dimmed-6": "hsl(221 10% 39%)",
|
|
21
|
+
"dimmed-7": "hsl(221 10% 30%)",
|
|
22
|
+
"highlight-gray-background": "hsl(220 19% 91%)",
|
|
23
|
+
"highlight-gray-foreground": "hsl(221 10% 39%)",
|
|
24
|
+
"highlight-yellow-background": "hsl(60 100% 89%)",
|
|
25
|
+
"highlight-yellow-foreground": "hsl(25 100% 34%)",
|
|
26
|
+
"highlight-green-background": "hsl(149 100% 91%)",
|
|
27
|
+
"highlight-green-foreground": "hsl(156 100% 23%)",
|
|
28
|
+
"highlight-blue-background": "hsl(187 100% 89%)",
|
|
29
|
+
"highlight-blue-foreground": "hsl(214 66% 44%)",
|
|
30
|
+
"highlight-red-background": "hsl(343 100% 96%)",
|
|
31
|
+
"highlight-red-foreground": "hsl(351 92% 37%)",
|
|
32
|
+
"highlight-cyan-background": "hsl(186 100% 96%)",
|
|
33
|
+
"highlight-cyan-foreground": "hsl(187 64% 33%)",
|
|
34
|
+
"highlight-purple-background": "hsl(300 100% 98%)",
|
|
35
|
+
"highlight-purple-foreground": "hsl(298 32% 46%)"
|
|
36
|
+
}
|
package/dist/themes.css
ADDED
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
|
|
2
|
+
:root,
|
|
3
|
+
[data-theme='light'] {
|
|
4
|
+
color: var(--global-foreground);
|
|
5
|
+
/**
|
|
6
|
+
* Do not edit directly
|
|
7
|
+
* Generated on Thu, 20 Jan 2022 08:07:03 GMT
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
--global-foreground: hsl(221 10% 30%);
|
|
12
|
+
--global-background: hsl(0 0% 100%);
|
|
13
|
+
--global-interactive-text: hsl(214 66% 44%);
|
|
14
|
+
--global-interactive-text-hover: hsl(219 93% 27%);
|
|
15
|
+
--global-vibrancy-foreground: hsl(0 0% 0%);
|
|
16
|
+
--global-vibrancy-background: hsl(220 16% 85% / 40%);
|
|
17
|
+
--global-vibrancy-background-hover: hsl(221 9% 49% / 30%);
|
|
18
|
+
--global-disabled-background: hsl(225 11% 7% / 6%);
|
|
19
|
+
--global-disabled-foreground: hsl(0 0% 0% / 20%);
|
|
20
|
+
--cta-default: hsl(0 100% 47%);
|
|
21
|
+
--cta-dark: hsl(0 100% 41%);
|
|
22
|
+
--cta-foreground: hsl(0 0% 100%);
|
|
23
|
+
--dimmed-0: hsl(210 20% 98%);
|
|
24
|
+
--dimmed-1: hsl(220 19% 91%);
|
|
25
|
+
--dimmed-2: hsl(220 16% 85%);
|
|
26
|
+
--dimmed-3: hsl(219 14% 75%);
|
|
27
|
+
--dimmed-4: hsl(220 12% 66%);
|
|
28
|
+
--dimmed-5: hsl(221 9% 49%);
|
|
29
|
+
--dimmed-6: hsl(221 10% 39%);
|
|
30
|
+
--dimmed-7: hsl(221 10% 30%);
|
|
31
|
+
--highlight-gray-background: hsl(220 19% 91%);
|
|
32
|
+
--highlight-gray-foreground: hsl(221 10% 39%);
|
|
33
|
+
--highlight-yellow-background: hsl(60 100% 89%);
|
|
34
|
+
--highlight-yellow-foreground: hsl(25 100% 34%);
|
|
35
|
+
--highlight-green-background: hsl(149 100% 91%);
|
|
36
|
+
--highlight-green-foreground: hsl(156 100% 23%);
|
|
37
|
+
--highlight-blue-background: hsl(187 100% 89%);
|
|
38
|
+
--highlight-blue-foreground: hsl(214 66% 44%);
|
|
39
|
+
--highlight-red-background: hsl(343 100% 96%);
|
|
40
|
+
--highlight-red-foreground: hsl(351 92% 37%);
|
|
41
|
+
--highlight-cyan-background: hsl(186 100% 96%);
|
|
42
|
+
--highlight-cyan-foreground: hsl(187 64% 33%);
|
|
43
|
+
--highlight-purple-background: hsl(300 100% 98%);
|
|
44
|
+
--highlight-purple-foreground: hsl(298 32% 46%);
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
@media (prefers-color-scheme: dark) {
|
|
50
|
+
:root:not([data-theme='light']) {
|
|
51
|
+
color: var(--global-foreground);
|
|
52
|
+
/**
|
|
53
|
+
* Do not edit directly
|
|
54
|
+
* Generated on Thu, 20 Jan 2022 08:07:04 GMT
|
|
55
|
+
*/
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
--global-foreground: hsl(220 19% 91%);
|
|
59
|
+
--global-background: hsl(0 0% 0%);
|
|
60
|
+
--global-interactive-text: hsl(206 72% 67%);
|
|
61
|
+
--global-interactive-text-hover: hsl(200 100% 83%);
|
|
62
|
+
--global-vibrancy-foreground: hsl(0 0% 100%);
|
|
63
|
+
--global-vibrancy-background: hsl(218 11% 14% / 80%);
|
|
64
|
+
--global-vibrancy-background-hover: hsl(221 10% 30% / 60%);
|
|
65
|
+
--global-disabled-background: hsl(221 9% 49% / 35%);
|
|
66
|
+
--global-disabled-foreground: hsl(0 0% 100% / 20%);
|
|
67
|
+
--cta-default: hsl(0 100% 47%);
|
|
68
|
+
--cta-dark: hsl(0 100% 41%);
|
|
69
|
+
--cta-foreground: hsl(0 0% 100%);
|
|
70
|
+
--dimmed-0: hsl(225 11% 7%);
|
|
71
|
+
--dimmed-1: hsl(218 11% 14%);
|
|
72
|
+
--dimmed-2: hsl(219 13% 22%);
|
|
73
|
+
--dimmed-3: hsl(221 10% 30%);
|
|
74
|
+
--dimmed-4: hsl(221 10% 39%);
|
|
75
|
+
--dimmed-5: hsl(221 9% 49%);
|
|
76
|
+
--dimmed-6: hsl(220 12% 66%);
|
|
77
|
+
--dimmed-7: hsl(220 19% 91%);
|
|
78
|
+
--highlight-gray-background: hsl(218 11% 14%);
|
|
79
|
+
--highlight-gray-foreground: hsl(220 12% 66%);
|
|
80
|
+
--highlight-yellow-background: hsl(22 100% 19%);
|
|
81
|
+
--highlight-yellow-foreground: hsl(38 100% 77%);
|
|
82
|
+
--highlight-green-background: hsl(166 100% 13%);
|
|
83
|
+
--highlight-green-foreground: hsl(145 76% 75%);
|
|
84
|
+
--highlight-blue-background: hsl(222 100% 17%);
|
|
85
|
+
--highlight-blue-foreground: hsl(200 100% 83%);
|
|
86
|
+
--highlight-red-background: hsl(350 100% 15%);
|
|
87
|
+
--highlight-red-foreground: hsl(351 100% 81%);
|
|
88
|
+
--highlight-cyan-background: hsl(187 66% 16%);
|
|
89
|
+
--highlight-cyan-foreground: hsl(187 57% 58%);
|
|
90
|
+
--highlight-purple-background: hsl(298 41% 25%);
|
|
91
|
+
--highlight-purple-foreground: hsl(298 47% 75%);
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
[data-theme='dark'],
|
|
98
|
+
:root[data-theme='dark'] {
|
|
99
|
+
color: var(--global-foreground);
|
|
100
|
+
/**
|
|
101
|
+
* Do not edit directly
|
|
102
|
+
* Generated on Thu, 20 Jan 2022 08:07:04 GMT
|
|
103
|
+
*/
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
--global-foreground: hsl(220 19% 91%);
|
|
107
|
+
--global-background: hsl(0 0% 0%);
|
|
108
|
+
--global-interactive-text: hsl(206 72% 67%);
|
|
109
|
+
--global-interactive-text-hover: hsl(200 100% 83%);
|
|
110
|
+
--global-vibrancy-foreground: hsl(0 0% 100%);
|
|
111
|
+
--global-vibrancy-background: hsl(218 11% 14% / 80%);
|
|
112
|
+
--global-vibrancy-background-hover: hsl(221 10% 30% / 60%);
|
|
113
|
+
--global-disabled-background: hsl(221 9% 49% / 35%);
|
|
114
|
+
--global-disabled-foreground: hsl(0 0% 100% / 20%);
|
|
115
|
+
--cta-default: hsl(0 100% 47%);
|
|
116
|
+
--cta-dark: hsl(0 100% 41%);
|
|
117
|
+
--cta-foreground: hsl(0 0% 100%);
|
|
118
|
+
--dimmed-0: hsl(225 11% 7%);
|
|
119
|
+
--dimmed-1: hsl(218 11% 14%);
|
|
120
|
+
--dimmed-2: hsl(219 13% 22%);
|
|
121
|
+
--dimmed-3: hsl(221 10% 30%);
|
|
122
|
+
--dimmed-4: hsl(221 10% 39%);
|
|
123
|
+
--dimmed-5: hsl(221 9% 49%);
|
|
124
|
+
--dimmed-6: hsl(220 12% 66%);
|
|
125
|
+
--dimmed-7: hsl(220 19% 91%);
|
|
126
|
+
--highlight-gray-background: hsl(218 11% 14%);
|
|
127
|
+
--highlight-gray-foreground: hsl(220 12% 66%);
|
|
128
|
+
--highlight-yellow-background: hsl(22 100% 19%);
|
|
129
|
+
--highlight-yellow-foreground: hsl(38 100% 77%);
|
|
130
|
+
--highlight-green-background: hsl(166 100% 13%);
|
|
131
|
+
--highlight-green-foreground: hsl(145 76% 75%);
|
|
132
|
+
--highlight-blue-background: hsl(222 100% 17%);
|
|
133
|
+
--highlight-blue-foreground: hsl(200 100% 83%);
|
|
134
|
+
--highlight-red-background: hsl(350 100% 15%);
|
|
135
|
+
--highlight-red-foreground: hsl(351 100% 81%);
|
|
136
|
+
--highlight-cyan-background: hsl(187 66% 16%);
|
|
137
|
+
--highlight-cyan-foreground: hsl(187 57% 58%);
|
|
138
|
+
--highlight-purple-background: hsl(298 41% 25%);
|
|
139
|
+
--highlight-purple-foreground: hsl(298 47% 75%);
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
}
|
|
143
|
+
|
package/package.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@wonderflow/themes",
|
|
3
|
+
"description": "Wanda design system themes",
|
|
4
|
+
"version": "1.0.2",
|
|
5
|
+
"author": "Wonderflow",
|
|
6
|
+
"main": "dist/themes.css",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": "./dist/themes.css",
|
|
9
|
+
"./dark.css": "./dist/themes/dark.css",
|
|
10
|
+
"./light.css": "./dist/themes/light.css",
|
|
11
|
+
"./dark.json": "./dist/themes/dark.json",
|
|
12
|
+
"./light.json": "./dist/themes/light.json"
|
|
13
|
+
},
|
|
14
|
+
"publishConfig": {
|
|
15
|
+
"access": "public"
|
|
16
|
+
},
|
|
17
|
+
"devDependencies": {
|
|
18
|
+
"@wonderflow/tokens": "*",
|
|
19
|
+
"fs-extra": "10.0.0",
|
|
20
|
+
"npm-run-all": "4.1.5",
|
|
21
|
+
"rimraf": "3.0.2",
|
|
22
|
+
"style-dictionary": "3.1.1",
|
|
23
|
+
"yargs": "17.3.1"
|
|
24
|
+
},
|
|
25
|
+
"scripts": {
|
|
26
|
+
"build": "run-s build:prepare && run-s build:light build:dark && run-s build:combine",
|
|
27
|
+
"build:prepare": "rimraf dist",
|
|
28
|
+
"build:combine": "node src/combine.js",
|
|
29
|
+
"build:light": "node src/index.js --name light",
|
|
30
|
+
"build:dark": "node src/index.js --name dark",
|
|
31
|
+
"test": "uvu tests --bail"
|
|
32
|
+
},
|
|
33
|
+
"repository": {
|
|
34
|
+
"type": "git",
|
|
35
|
+
"url": "git+https://github.com/wonderflow-bv/wanda.git"
|
|
36
|
+
},
|
|
37
|
+
"homepage": "https://github.com/wonderflow-bv/wanda",
|
|
38
|
+
"license": "MIT",
|
|
39
|
+
"keywords": [
|
|
40
|
+
"design-system",
|
|
41
|
+
"wonderflow",
|
|
42
|
+
"components",
|
|
43
|
+
"configurations"
|
|
44
|
+
],
|
|
45
|
+
"bugs": {
|
|
46
|
+
"url": "https://github.com/wonderflow-bv/wanda/issues"
|
|
47
|
+
}
|
|
48
|
+
}
|
package/src/combine.js
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
const fs = require('fs-extra')
|
|
2
|
+
const path = require('path')
|
|
3
|
+
|
|
4
|
+
const formatTheme = (path, name) => {
|
|
5
|
+
const theme = fs.readFileSync(path, 'utf8', (err, data) => {
|
|
6
|
+
if (err) {
|
|
7
|
+
return err
|
|
8
|
+
}
|
|
9
|
+
})
|
|
10
|
+
return theme.replace(':root {', '').replace('}', '')
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const run = () => {
|
|
14
|
+
const lightTheme = formatTheme(path.join('dist', 'themes', 'light.css'), 'light')
|
|
15
|
+
const darkTheme = formatTheme(path.join('dist', 'themes', 'dark.css'), 'dark')
|
|
16
|
+
|
|
17
|
+
const template = `
|
|
18
|
+
:root,
|
|
19
|
+
[data-theme='light'] {
|
|
20
|
+
color: var(--global-foreground);
|
|
21
|
+
${lightTheme}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@media (prefers-color-scheme: dark) {
|
|
25
|
+
:root:not([data-theme='light']) {
|
|
26
|
+
color: var(--global-foreground);
|
|
27
|
+
${darkTheme}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
[data-theme='dark'],
|
|
32
|
+
:root[data-theme='dark'] {
|
|
33
|
+
color: var(--global-foreground);
|
|
34
|
+
${darkTheme}
|
|
35
|
+
}
|
|
36
|
+
`
|
|
37
|
+
|
|
38
|
+
fs.writeFileSync(path.join('dist', 'themes.css'), template)
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
try {
|
|
42
|
+
run()
|
|
43
|
+
process.exit(0)
|
|
44
|
+
} catch (error) {
|
|
45
|
+
console.log('————————————————————————————————————————————————————————————————————————————————————— \n')
|
|
46
|
+
console.error('⚠️ Something went wrong:', error)
|
|
47
|
+
console.log('\n————————————————————————————————————————————————————————————————————————————————————— \n\n')
|
|
48
|
+
process.exit(1)
|
|
49
|
+
}
|
package/src/dark.json
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
{
|
|
2
|
+
"global": {
|
|
3
|
+
"foreground": {
|
|
4
|
+
"value": "hsl({color.primary.5})"
|
|
5
|
+
},
|
|
6
|
+
"background": {
|
|
7
|
+
"value": "hsl({color.support.black})"
|
|
8
|
+
},
|
|
9
|
+
"interactive-text": {
|
|
10
|
+
"value": "hsl({color.blue.20})"
|
|
11
|
+
},
|
|
12
|
+
"interactive-text-hover": {
|
|
13
|
+
"value": "hsl({color.blue.10})"
|
|
14
|
+
},
|
|
15
|
+
"vibrancy-foreground": {
|
|
16
|
+
"value": "hsl({color.support.white})"
|
|
17
|
+
},
|
|
18
|
+
"vibrancy-background": {
|
|
19
|
+
"value": "hsl({color.primary.90} / 80%)"
|
|
20
|
+
},
|
|
21
|
+
"vibrancy-background-hover": {
|
|
22
|
+
"value": "hsl({color.primary.70} / 60%)"
|
|
23
|
+
},
|
|
24
|
+
"disabled-background": {
|
|
25
|
+
"value": "hsl({color.primary.50} / 35%)"
|
|
26
|
+
},
|
|
27
|
+
"disabled-foreground": {
|
|
28
|
+
"value": "hsl({color.support.white} / 20%)"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"cta": {
|
|
32
|
+
"default": {
|
|
33
|
+
"value": "hsl({color.support.brand})"
|
|
34
|
+
},
|
|
35
|
+
"dark": {
|
|
36
|
+
"value": "hsl(0 100% 41%)"
|
|
37
|
+
},
|
|
38
|
+
"foreground": {
|
|
39
|
+
"value": "hsl({color.support.white})"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"dimmed": {
|
|
43
|
+
"0": {
|
|
44
|
+
"value": "hsl({color.primary.100})"
|
|
45
|
+
},
|
|
46
|
+
"1": {
|
|
47
|
+
"value": "hsl({color.primary.90})"
|
|
48
|
+
},
|
|
49
|
+
"2": {
|
|
50
|
+
"value": "hsl({color.primary.80})"
|
|
51
|
+
},
|
|
52
|
+
"3": {
|
|
53
|
+
"value": "hsl({color.primary.70})"
|
|
54
|
+
},
|
|
55
|
+
"4": {
|
|
56
|
+
"value": "hsl({color.primary.60})"
|
|
57
|
+
},
|
|
58
|
+
"5": {
|
|
59
|
+
"value": "hsl({color.primary.50})"
|
|
60
|
+
},
|
|
61
|
+
"6": {
|
|
62
|
+
"value": "hsl({color.primary.30})"
|
|
63
|
+
},
|
|
64
|
+
"7": {
|
|
65
|
+
"value": "hsl({color.primary.5})"
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"highlight": {
|
|
69
|
+
"gray-background": {
|
|
70
|
+
"value": "hsl({color.primary.90})"
|
|
71
|
+
},
|
|
72
|
+
"gray-foreground": {
|
|
73
|
+
"value": "hsl({color.primary.30})"
|
|
74
|
+
},
|
|
75
|
+
"yellow-background": {
|
|
76
|
+
"value": "hsl({color.yellow.80})"
|
|
77
|
+
},
|
|
78
|
+
"yellow-foreground": {
|
|
79
|
+
"value": "hsl({color.yellow.10})"
|
|
80
|
+
},
|
|
81
|
+
"green-background": {
|
|
82
|
+
"value": "hsl({color.green.80})"
|
|
83
|
+
},
|
|
84
|
+
"green-foreground": {
|
|
85
|
+
"value": "hsl({color.green.10})"
|
|
86
|
+
},
|
|
87
|
+
"blue-background": {
|
|
88
|
+
"value": "hsl({color.blue.80})"
|
|
89
|
+
},
|
|
90
|
+
"blue-foreground": {
|
|
91
|
+
"value": "hsl({color.blue.10})"
|
|
92
|
+
},
|
|
93
|
+
"red-background": {
|
|
94
|
+
"value": "hsl({color.red.80})"
|
|
95
|
+
},
|
|
96
|
+
"red-foreground": {
|
|
97
|
+
"value": "hsl({color.red.10})"
|
|
98
|
+
},
|
|
99
|
+
"cyan-background": {
|
|
100
|
+
"value": "hsl({color.cyan.80})"
|
|
101
|
+
},
|
|
102
|
+
"cyan-foreground": {
|
|
103
|
+
"value": "hsl({color.cyan.20})"
|
|
104
|
+
},
|
|
105
|
+
"purple-background": {
|
|
106
|
+
"value": "hsl({color.purple.80})"
|
|
107
|
+
},
|
|
108
|
+
"purple-foreground": {
|
|
109
|
+
"value": "hsl({color.purple.20})"
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
package/src/index.js
ADDED
package/src/light.json
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
{
|
|
2
|
+
"global": {
|
|
3
|
+
"foreground": {
|
|
4
|
+
"value": "hsl({color.primary.70})"
|
|
5
|
+
},
|
|
6
|
+
"background": {
|
|
7
|
+
"value": "hsl({color.support.white})"
|
|
8
|
+
},
|
|
9
|
+
"interactive-text": {
|
|
10
|
+
"value": "hsl({color.blue.40})"
|
|
11
|
+
},
|
|
12
|
+
"interactive-text-hover": {
|
|
13
|
+
"value": "hsl({color.blue.60})"
|
|
14
|
+
},
|
|
15
|
+
"vibrancy-foreground": {
|
|
16
|
+
"value": "hsl({color.support.black})"
|
|
17
|
+
},
|
|
18
|
+
"vibrancy-background": {
|
|
19
|
+
"value": "hsl({color.primary.10} / 40%)"
|
|
20
|
+
},
|
|
21
|
+
"vibrancy-background-hover": {
|
|
22
|
+
"value": "hsl({color.primary.50} / 30%)"
|
|
23
|
+
},
|
|
24
|
+
"disabled-background": {
|
|
25
|
+
"value": "hsl({color.primary.100} / 6%)"
|
|
26
|
+
},
|
|
27
|
+
"disabled-foreground": {
|
|
28
|
+
"value": "hsl({color.support.black} / 20%)"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"cta": {
|
|
32
|
+
"default": {
|
|
33
|
+
"value": "hsl({color.support.brand})"
|
|
34
|
+
},
|
|
35
|
+
"dark": {
|
|
36
|
+
"value": "hsl(0 100% 41%)"
|
|
37
|
+
},
|
|
38
|
+
"foreground": {
|
|
39
|
+
"value": "hsl({color.support.white})"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"dimmed": {
|
|
43
|
+
"0": {
|
|
44
|
+
"value": "hsl({color.primary.0})"
|
|
45
|
+
},
|
|
46
|
+
"1": {
|
|
47
|
+
"value": "hsl({color.primary.5})"
|
|
48
|
+
},
|
|
49
|
+
"2": {
|
|
50
|
+
"value": "hsl({color.primary.10})"
|
|
51
|
+
},
|
|
52
|
+
"3": {
|
|
53
|
+
"value": "hsl({color.primary.20})"
|
|
54
|
+
},
|
|
55
|
+
"4": {
|
|
56
|
+
"value": "hsl({color.primary.30})"
|
|
57
|
+
},
|
|
58
|
+
"5": {
|
|
59
|
+
"value": "hsl({color.primary.50})"
|
|
60
|
+
},
|
|
61
|
+
"6": {
|
|
62
|
+
"value": "hsl({color.primary.60})"
|
|
63
|
+
},
|
|
64
|
+
"7": {
|
|
65
|
+
"value": "hsl({color.primary.70})"
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"highlight": {
|
|
69
|
+
"gray-background": {
|
|
70
|
+
"value": "hsl({color.primary.5})"
|
|
71
|
+
},
|
|
72
|
+
"gray-foreground": {
|
|
73
|
+
"value": "hsl({color.primary.60})"
|
|
74
|
+
},
|
|
75
|
+
"yellow-background": {
|
|
76
|
+
"value": "hsl({color.yellow.0})"
|
|
77
|
+
},
|
|
78
|
+
"yellow-foreground": {
|
|
79
|
+
"value": "hsl({color.yellow.50})"
|
|
80
|
+
},
|
|
81
|
+
"green-background": {
|
|
82
|
+
"value": "hsl({color.green.0})"
|
|
83
|
+
},
|
|
84
|
+
"green-foreground": {
|
|
85
|
+
"value": "hsl({color.green.60})"
|
|
86
|
+
},
|
|
87
|
+
"blue-background": {
|
|
88
|
+
"value": "hsl({color.blue.5})"
|
|
89
|
+
},
|
|
90
|
+
"blue-foreground": {
|
|
91
|
+
"value": "hsl({color.blue.40})"
|
|
92
|
+
},
|
|
93
|
+
"red-background": {
|
|
94
|
+
"value": "hsl({color.red.0})"
|
|
95
|
+
},
|
|
96
|
+
"red-foreground": {
|
|
97
|
+
"value": "hsl({color.red.40})"
|
|
98
|
+
},
|
|
99
|
+
"cyan-background": {
|
|
100
|
+
"value": "hsl({color.cyan.0})"
|
|
101
|
+
},
|
|
102
|
+
"cyan-foreground": {
|
|
103
|
+
"value": "hsl({color.cyan.50})"
|
|
104
|
+
},
|
|
105
|
+
"purple-background": {
|
|
106
|
+
"value": "hsl({color.purple.0})"
|
|
107
|
+
},
|
|
108
|
+
"purple-foreground": {
|
|
109
|
+
"value": "hsl({color.purple.50})"
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
const yargs = require('yargs/yargs')
|
|
2
|
+
const { hideBin } = require('yargs/helpers')
|
|
3
|
+
const argv = yargs(hideBin(process.argv)).argv
|
|
4
|
+
const tksn = require('@wonderflow/tokens/platforms/web/tokens.json')
|
|
5
|
+
|
|
6
|
+
module.exports = {
|
|
7
|
+
source: [`./src/${argv.name}.json`],
|
|
8
|
+
tokens: {
|
|
9
|
+
...tksn
|
|
10
|
+
},
|
|
11
|
+
platforms: {
|
|
12
|
+
web: {
|
|
13
|
+
buildPath: 'dist/themes/',
|
|
14
|
+
transformGroup: 'css',
|
|
15
|
+
files: [
|
|
16
|
+
{
|
|
17
|
+
format: 'css/variables',
|
|
18
|
+
destination: `${argv.name}.css`
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
format: 'json/flat',
|
|
22
|
+
destination: `${argv.name}.json`
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
options: {
|
|
26
|
+
showFileHeader: true
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
package/tests/themes.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
const assert = require('uvu/assert')
|
|
2
|
+
const { suite } = require('uvu')
|
|
3
|
+
const Theme = require('../dist/themes/light.json')
|
|
4
|
+
|
|
5
|
+
const THEME_TOT_KEYS = 34
|
|
6
|
+
|
|
7
|
+
const Themes = suite('Themes')
|
|
8
|
+
Themes('Light should include all keys', () => {
|
|
9
|
+
assert.is(Object.keys(Theme).length, THEME_TOT_KEYS)
|
|
10
|
+
})
|
|
11
|
+
|
|
12
|
+
Themes('Theme should includes globals', () => {
|
|
13
|
+
assert.ok(Object.keys(Theme).includes('global-foreground'))
|
|
14
|
+
})
|
|
15
|
+
|
|
16
|
+
Themes('Theme should includes cta', () => {
|
|
17
|
+
assert.ok(Object.keys(Theme).includes('cta-default'))
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
Themes('Theme should includes dimmed', () => {
|
|
21
|
+
assert.ok(Object.keys(Theme).includes('dimmed-0'))
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
Themes('Theme should includes dimmed', () => {
|
|
25
|
+
assert.ok(Object.keys(Theme).includes('highlight-gray-background'))
|
|
26
|
+
})
|
|
27
|
+
|
|
28
|
+
Themes('Theme should matches original', () => {
|
|
29
|
+
const output = JSON.stringify(Theme)
|
|
30
|
+
assert.equal(JSON.parse(output), Theme, 'matches original')
|
|
31
|
+
})
|
|
32
|
+
|
|
33
|
+
Themes.run()
|