@khanacademy/wonder-blocks-tokens 4.0.0 → 4.2.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 +35 -19
- package/LICENSE +21 -0
- package/dist/es/index.js +9 -12
- package/dist/index.js +9 -14
- package/dist/tokens/semantic-color.d.ts +2 -0
- package/package.json +5 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,90 +1,106 @@
|
|
|
1
1
|
# @khanacademy/wonder-blocks-tokens
|
|
2
2
|
|
|
3
|
+
## 4.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- f03298f: Tooling:
|
|
8
|
+
|
|
9
|
+
- Switching to `pnpm`.
|
|
10
|
+
- Upgrading `rollup` to v4 and `@babel/runtime` to match the current webapp version.
|
|
11
|
+
|
|
12
|
+
## 4.1.0
|
|
13
|
+
|
|
14
|
+
### Minor Changes
|
|
15
|
+
|
|
16
|
+
- 8cfaeab0: Add `icon.disabled` token to semanticColor.
|
|
17
|
+
- c162abb4: Add `border.focus` semantic color token to use for the focus outline
|
|
18
|
+
|
|
3
19
|
## 4.0.0
|
|
4
20
|
|
|
5
21
|
### Major Changes
|
|
6
22
|
|
|
7
|
-
-
|
|
23
|
+
- 0de25cd8: - Reworked semanticColor actions to use a new structure. Every `action` now includes `default`, `hover` and `press` states, and each state includes `border`, `background` and `foreground` tokens.
|
|
8
24
|
|
|
9
|
-
-
|
|
25
|
+
- Renamed `primary` to `progressive`.
|
|
10
26
|
|
|
11
|
-
-
|
|
27
|
+
- Added more categories to actions: `filled` and `outline`.
|
|
12
28
|
|
|
13
29
|
## 3.0.1
|
|
14
30
|
|
|
15
31
|
### Patch Changes
|
|
16
32
|
|
|
17
|
-
-
|
|
33
|
+
- 11a0f5c6: No functional changes. Adding prepublishOnly script.
|
|
18
34
|
|
|
19
35
|
## 3.0.0
|
|
20
36
|
|
|
21
37
|
### Major Changes
|
|
22
38
|
|
|
23
|
-
-
|
|
39
|
+
- e6abdd17: Upgrade to React 18
|
|
24
40
|
|
|
25
41
|
## 2.1.0
|
|
26
42
|
|
|
27
43
|
### Minor Changes
|
|
28
44
|
|
|
29
|
-
-
|
|
45
|
+
- 6999fd39: Add mediaQuery tokens for viewport sizing
|
|
30
46
|
|
|
31
47
|
## 2.0.1
|
|
32
48
|
|
|
33
49
|
### Patch Changes
|
|
34
50
|
|
|
35
|
-
-
|
|
51
|
+
- 02a1b298: Make sure we don't package tsconfig and tsbuildinfo files
|
|
36
52
|
|
|
37
53
|
## 2.0.0
|
|
38
54
|
|
|
39
55
|
### Major Changes
|
|
40
56
|
|
|
41
|
-
-
|
|
42
|
-
-
|
|
57
|
+
- f17dc1ee: Remove pink and lightBlue from brand colors
|
|
58
|
+
- 991eb43f: Add semanticColor tokens, remove deprecated Brand color primitives
|
|
43
59
|
|
|
44
60
|
## 1.3.1
|
|
45
61
|
|
|
46
62
|
### Patch Changes
|
|
47
63
|
|
|
48
|
-
-
|
|
64
|
+
- 559e82d5: Update to build tooling, generating smaller output
|
|
49
65
|
|
|
50
66
|
## 1.3.0
|
|
51
67
|
|
|
52
68
|
### Minor Changes
|
|
53
69
|
|
|
54
|
-
-
|
|
70
|
+
- 9bfeead9: Add faded versions of offBlack
|
|
55
71
|
|
|
56
72
|
## 1.2.0
|
|
57
73
|
|
|
58
74
|
### Minor Changes
|
|
59
75
|
|
|
60
|
-
-
|
|
76
|
+
- 874081aa: Add fade and mix functions
|
|
61
77
|
|
|
62
78
|
### Patch Changes
|
|
63
79
|
|
|
64
|
-
-
|
|
65
|
-
-
|
|
80
|
+
- 874081aa: Remove wonder-blocks-color dependency in favor of wonder-blocks-tokens
|
|
81
|
+
- a9bf603a: Move spacing tokens to wb-tokens
|
|
66
82
|
|
|
67
83
|
## 1.1.0
|
|
68
84
|
|
|
69
85
|
### Minor Changes
|
|
70
86
|
|
|
71
|
-
-
|
|
87
|
+
- 4cfb4977: Add new shades of existing colors (24%).
|
|
72
88
|
|
|
73
89
|
## 1.0.0
|
|
74
90
|
|
|
75
91
|
### Major Changes
|
|
76
92
|
|
|
77
|
-
-
|
|
93
|
+
- e83f8991: Mark wb-tokens as public (first official release)
|
|
78
94
|
|
|
79
95
|
## 0.2.0
|
|
80
96
|
|
|
81
97
|
### Minor Changes
|
|
82
98
|
|
|
83
|
-
-
|
|
84
|
-
-
|
|
99
|
+
- 7cd7f6cc: Move tokens from wb-theming to wb-tokens and split token categories into separate objects/files
|
|
100
|
+
- 7c51f377: Add fadedBlue24 color token
|
|
85
101
|
|
|
86
102
|
## 0.1.0
|
|
87
103
|
|
|
88
104
|
### Minor Changes
|
|
89
105
|
|
|
90
|
-
-
|
|
106
|
+
- a95d1323: Add skeleton for tokens package
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2018 Khan Academy
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/es/index.js
CHANGED
|
@@ -16,18 +16,13 @@ const border$1 = {
|
|
|
16
16
|
};
|
|
17
17
|
|
|
18
18
|
function _extends() {
|
|
19
|
-
_extends = Object.assign ? Object.assign.bind() : function (
|
|
20
|
-
for (var
|
|
21
|
-
var
|
|
22
|
-
for (var
|
|
23
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
24
|
-
target[key] = source[key];
|
|
25
|
-
}
|
|
26
|
-
}
|
|
19
|
+
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
20
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
21
|
+
var t = arguments[e];
|
|
22
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
27
23
|
}
|
|
28
|
-
return
|
|
29
|
-
};
|
|
30
|
-
return _extends.apply(this, arguments);
|
|
24
|
+
return n;
|
|
25
|
+
}, _extends.apply(null, arguments);
|
|
31
26
|
}
|
|
32
27
|
|
|
33
28
|
const color6Regexp = /^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i;
|
|
@@ -228,6 +223,7 @@ const border = {
|
|
|
228
223
|
primary: color.fadedOffBlack16,
|
|
229
224
|
subtle: color.fadedOffBlack8,
|
|
230
225
|
strong: color.fadedOffBlack50,
|
|
226
|
+
focus: color.blue,
|
|
231
227
|
inverse: color.white
|
|
232
228
|
};
|
|
233
229
|
const semanticColor = {
|
|
@@ -350,7 +346,8 @@ const semanticColor = {
|
|
|
350
346
|
secondary: color.offBlack,
|
|
351
347
|
inverse: color.white,
|
|
352
348
|
action: color.blue,
|
|
353
|
-
destructive: color.red
|
|
349
|
+
destructive: color.red,
|
|
350
|
+
disabled: color.fadedOffBlack32
|
|
354
351
|
},
|
|
355
352
|
khanmigo: {
|
|
356
353
|
primary: color.eggplant,
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
const border$1 = {
|
|
6
4
|
radius: {
|
|
7
5
|
xSmall_2: 2,
|
|
@@ -20,18 +18,13 @@ const border$1 = {
|
|
|
20
18
|
};
|
|
21
19
|
|
|
22
20
|
function _extends() {
|
|
23
|
-
_extends = Object.assign ? Object.assign.bind() : function (
|
|
24
|
-
for (var
|
|
25
|
-
var
|
|
26
|
-
for (var
|
|
27
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
28
|
-
target[key] = source[key];
|
|
29
|
-
}
|
|
30
|
-
}
|
|
21
|
+
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
22
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
23
|
+
var t = arguments[e];
|
|
24
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
31
25
|
}
|
|
32
|
-
return
|
|
33
|
-
};
|
|
34
|
-
return _extends.apply(this, arguments);
|
|
26
|
+
return n;
|
|
27
|
+
}, _extends.apply(null, arguments);
|
|
35
28
|
}
|
|
36
29
|
|
|
37
30
|
const color6Regexp = /^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i;
|
|
@@ -232,6 +225,7 @@ const border = {
|
|
|
232
225
|
primary: color.fadedOffBlack16,
|
|
233
226
|
subtle: color.fadedOffBlack8,
|
|
234
227
|
strong: color.fadedOffBlack50,
|
|
228
|
+
focus: color.blue,
|
|
235
229
|
inverse: color.white
|
|
236
230
|
};
|
|
237
231
|
const semanticColor = {
|
|
@@ -354,7 +348,8 @@ const semanticColor = {
|
|
|
354
348
|
secondary: color.offBlack,
|
|
355
349
|
inverse: color.white,
|
|
356
350
|
action: color.blue,
|
|
357
|
-
destructive: color.red
|
|
351
|
+
destructive: color.red,
|
|
352
|
+
disabled: color.fadedOffBlack32
|
|
358
353
|
},
|
|
359
354
|
khanmigo: {
|
|
360
355
|
primary: color.eggplant,
|
|
@@ -137,6 +137,7 @@ export declare const semanticColor: {
|
|
|
137
137
|
primary: string;
|
|
138
138
|
subtle: string;
|
|
139
139
|
strong: string;
|
|
140
|
+
focus: string;
|
|
140
141
|
inverse: string;
|
|
141
142
|
};
|
|
142
143
|
/**
|
|
@@ -148,6 +149,7 @@ export declare const semanticColor: {
|
|
|
148
149
|
inverse: string;
|
|
149
150
|
action: string;
|
|
150
151
|
destructive: string;
|
|
152
|
+
disabled: string;
|
|
151
153
|
};
|
|
152
154
|
/**
|
|
153
155
|
* Colors to be used exclusively for Khanmigo or to communicate a
|
package/package.json
CHANGED
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@khanacademy/wonder-blocks-tokens",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.2.0",
|
|
4
4
|
"description": "Core primitive design tokens for Web Wonder Blocks",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/es/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
|
-
"scripts": {
|
|
9
|
-
"test": "echo \"Error: no test specified\" && exit 1",
|
|
10
|
-
"prepublishOnly": "../../utils/publish/package-pre-publish-check.sh"
|
|
11
|
-
},
|
|
12
8
|
"author": "",
|
|
13
9
|
"license": "MIT",
|
|
14
10
|
"publishConfig": {
|
|
@@ -16,6 +12,9 @@
|
|
|
16
12
|
},
|
|
17
13
|
"dependencies": {},
|
|
18
14
|
"devDependencies": {
|
|
19
|
-
"@khanacademy/wb-dev-build-settings": "
|
|
15
|
+
"@khanacademy/wb-dev-build-settings": "2.1.0"
|
|
16
|
+
},
|
|
17
|
+
"scripts": {
|
|
18
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
20
19
|
}
|
|
21
20
|
}
|