@atlaskit/tokens 0.2.1 → 0.4.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/CHANGELOG.md +38 -0
- package/README.md +28 -0
- package/babel-plugin/package.json +7 -0
- package/css/atlassian-dark.css +89 -88
- package/css/atlassian-light.css +89 -88
- package/dist/cjs/artifacts/rename-mapping.js +23 -0
- package/dist/cjs/{tokens → artifacts}/token-default-values.js +22 -21
- package/dist/cjs/artifacts/token-names.js +101 -0
- package/dist/cjs/artifacts/tokens-raw/atlassian-dark.js +1786 -0
- package/dist/cjs/artifacts/tokens-raw/atlassian-light.js +1766 -0
- package/dist/cjs/artifacts/types.js +5 -0
- package/dist/cjs/{entry-points/token-default-values.js → babel-plugin/index.js} +2 -2
- package/dist/cjs/babel-plugin/plugin.js +176 -0
- package/dist/cjs/entry-points/rename-mapping.js +1 -1
- package/dist/cjs/entry-points/token-names.js +1 -1
- package/dist/cjs/figma/synchronize-figma-tokens.js +41 -39
- package/dist/cjs/get-token.js +1 -1
- package/dist/cjs/index.js +4 -4
- package/dist/cjs/tokens/atlassian-dark/utility/utility.js +3 -0
- package/dist/cjs/tokens/atlassian-light/utility/utility.js +3 -0
- package/dist/cjs/tokens/default/color/accent.js +13 -0
- package/dist/cjs/tokens/default/color/background.js +49 -0
- package/dist/cjs/tokens/default/color/border.js +2 -0
- package/dist/cjs/tokens/default/color/icon-border.js +5 -0
- package/dist/cjs/tokens/default/color/overlay.js +2 -0
- package/dist/cjs/tokens/default/color/text.js +14 -0
- package/dist/cjs/tokens/default/shadow/shadow.js +2 -0
- package/dist/cjs/tokens/default/utility/utility.js +10 -2
- package/dist/cjs/tokens/palette.js +145 -260
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/artifacts/rename-mapping.js +16 -0
- package/dist/es2019/{tokens → artifacts}/token-default-values.js +22 -21
- package/dist/es2019/artifacts/token-names.js +94 -0
- package/dist/es2019/artifacts/tokens-raw/atlassian-dark.js +1779 -0
- package/dist/es2019/artifacts/tokens-raw/atlassian-light.js +1759 -0
- package/dist/es2019/artifacts/types.js +1 -0
- package/dist/es2019/babel-plugin/index.js +1 -0
- package/dist/es2019/babel-plugin/plugin.js +151 -0
- package/dist/es2019/entry-points/rename-mapping.js +1 -1
- package/dist/es2019/entry-points/token-names.js +1 -1
- package/dist/es2019/figma/synchronize-figma-tokens.js +41 -39
- package/dist/es2019/get-token.js +1 -1
- package/dist/es2019/tokens/atlassian-dark/utility/utility.js +3 -0
- package/dist/es2019/tokens/atlassian-light/utility/utility.js +3 -0
- package/dist/es2019/tokens/default/color/accent.js +13 -0
- package/dist/es2019/tokens/default/color/background.js +49 -0
- package/dist/es2019/tokens/default/color/border.js +2 -0
- package/dist/es2019/tokens/default/color/icon-border.js +5 -0
- package/dist/es2019/tokens/default/color/overlay.js +2 -0
- package/dist/es2019/tokens/default/color/text.js +14 -0
- package/dist/es2019/tokens/default/shadow/shadow.js +2 -0
- package/dist/es2019/tokens/default/utility/utility.js +10 -2
- package/dist/es2019/tokens/palette.js +145 -260
- package/dist/es2019/version.json +1 -1
- package/dist/esm/artifacts/rename-mapping.js +16 -0
- package/dist/esm/{tokens → artifacts}/token-default-values.js +22 -21
- package/dist/esm/artifacts/token-names.js +94 -0
- package/dist/esm/artifacts/tokens-raw/atlassian-dark.js +1779 -0
- package/dist/esm/artifacts/tokens-raw/atlassian-light.js +1759 -0
- package/dist/esm/artifacts/types.js +1 -0
- package/dist/esm/babel-plugin/index.js +1 -0
- package/dist/esm/babel-plugin/plugin.js +158 -0
- package/dist/esm/entry-points/rename-mapping.js +1 -1
- package/dist/esm/entry-points/token-names.js +1 -1
- package/dist/esm/figma/synchronize-figma-tokens.js +41 -39
- package/dist/esm/get-token.js +1 -1
- package/dist/esm/tokens/atlassian-dark/utility/utility.js +3 -0
- package/dist/esm/tokens/atlassian-light/utility/utility.js +3 -0
- package/dist/esm/tokens/default/color/accent.js +13 -0
- package/dist/esm/tokens/default/color/background.js +49 -0
- package/dist/esm/tokens/default/color/border.js +2 -0
- package/dist/esm/tokens/default/color/icon-border.js +5 -0
- package/dist/esm/tokens/default/color/overlay.js +2 -0
- package/dist/esm/tokens/default/color/text.js +14 -0
- package/dist/esm/tokens/default/shadow/shadow.js +2 -0
- package/dist/esm/tokens/default/utility/utility.js +10 -2
- package/dist/esm/tokens/palette.js +145 -260
- package/dist/esm/version.json +1 -1
- package/dist/types/artifacts/rename-mapping.d.ts +17 -0
- package/dist/types/{tokens → artifacts}/token-default-values.d.ts +21 -20
- package/dist/types/artifacts/token-names.d.ts +184 -0
- package/dist/types/artifacts/tokens-raw/atlassian-dark.d.ts +80 -0
- package/dist/types/artifacts/tokens-raw/atlassian-light.d.ts +56 -0
- package/dist/types/artifacts/types.d.ts +4 -0
- package/dist/types/babel-plugin/index.d.ts +1 -0
- package/dist/types/babel-plugin/plugin.d.ts +14 -0
- package/dist/types/entry-points/babel-plugin.d.ts +1 -0
- package/dist/types/entry-points/rename-mapping.d.ts +1 -1
- package/dist/types/entry-points/token-names.d.ts +2 -2
- package/dist/types/get-token.d.ts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/tokens/atlassian-dark/utility/utility.d.ts +10 -2
- package/dist/types/tokens/atlassian-light/utility/utility.d.ts +10 -2
- package/dist/types/tokens/default/utility/utility.d.ts +138 -2
- package/dist/types/types.d.ts +49 -14
- package/package.json +18 -6
- package/tokens-browser-extension/README.md +28 -0
- package/tokens-browser-extension/atlassian-theme.css +449 -0
- package/tokens-browser-extension/background.js +75 -0
- package/tokens-browser-extension/content-script.js +75 -0
- package/tokens-browser-extension/devtools.html +1 -0
- package/tokens-browser-extension/devtools.js +14 -0
- package/tokens-browser-extension/manifest.json +36 -0
- package/tokens-browser-extension/messageback-script.js +10 -0
- package/tokens-browser-extension/messaging.js +36 -0
- package/tokens-browser-extension/panel.html +25 -0
- package/tokens-browser-extension/panel.js +46 -0
- package/tokens-browser-extension/toast.png +0 -0
- package/dist/cjs/tokens/rename-mapping.js +0 -29
- package/dist/cjs/tokens/token-names.js +0 -100
- package/dist/es2019/entry-points/token-default-values.js +0 -1
- package/dist/es2019/tokens/rename-mapping.js +0 -21
- package/dist/es2019/tokens/token-names.js +0 -93
- package/dist/esm/entry-points/token-default-values.js +0 -1
- package/dist/esm/tokens/rename-mapping.js +0 -21
- package/dist/esm/tokens/token-names.js +0 -93
- package/dist/types/entry-points/token-default-values.d.ts +0 -1
- package/dist/types/tokens/rename-mapping.d.ts +0 -24
- package/dist/types/tokens/token-names.d.ts +0 -182
- package/token-default-values/package.json +0 -7
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/* eslint-disable func-names */
|
|
2
|
+
/* eslint-disable no-console */
|
|
3
|
+
/* eslint-disable no-undef */
|
|
4
|
+
/* eslint-disable no-unused-vars */
|
|
5
|
+
|
|
6
|
+
// Chrome automatically creates a background.html page for this to execute.
|
|
7
|
+
// This can access the inspected page via executeScript
|
|
8
|
+
//
|
|
9
|
+
// Can use:
|
|
10
|
+
// chrome.tabs.*
|
|
11
|
+
// chrome.extension.*
|
|
12
|
+
|
|
13
|
+
// sync options settings
|
|
14
|
+
function setOptions(data = {}) {
|
|
15
|
+
chrome.storage.sync.set(data, function () {
|
|
16
|
+
console.log('Settings saved');
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function getOptions(keys, callback) {
|
|
21
|
+
chrome.storage.sync.get(keys, function (data) {
|
|
22
|
+
console.log('Settings retrieved', data);
|
|
23
|
+
callback(data);
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function queryTheme() {
|
|
28
|
+
const theme = window.localStorage && window.localStorage.theme;
|
|
29
|
+
console.log('theme', theme);
|
|
30
|
+
chrome.runtime.sendMessage({ theme });
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// when the extension is loaded when opening devtools
|
|
34
|
+
chrome.runtime.onConnect.addListener(function (port) {
|
|
35
|
+
// check for the theme in the running tab
|
|
36
|
+
chrome.tabs.query({ active: true, currentWindow: true }, function (tabs) {
|
|
37
|
+
chrome.tabs.executeScript(tabs[0].id, {
|
|
38
|
+
code: `(${queryTheme})()`,
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
const extensionListener = function (message, sender, sendResponse) {
|
|
42
|
+
if (message.tabId && message.action) {
|
|
43
|
+
// handle changing theme from extension into inspected page
|
|
44
|
+
// these messages come from panel.js
|
|
45
|
+
|
|
46
|
+
console.log('background', message);
|
|
47
|
+
switch (message.action) {
|
|
48
|
+
case 'removeTheme':
|
|
49
|
+
chrome.tabs.sendMessage(message.tabId, 'none');
|
|
50
|
+
break;
|
|
51
|
+
case 'setTheme-light':
|
|
52
|
+
chrome.tabs.sendMessage(message.tabId, 'light');
|
|
53
|
+
break;
|
|
54
|
+
case 'setTheme-dark':
|
|
55
|
+
chrome.tabs.sendMessage(message.tabId, 'dark');
|
|
56
|
+
break;
|
|
57
|
+
default:
|
|
58
|
+
break;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// This accepts messages from the inspected page and
|
|
62
|
+
// sends them to the panel
|
|
63
|
+
} else {
|
|
64
|
+
port.postMessage(message);
|
|
65
|
+
}
|
|
66
|
+
sendResponse(message);
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
// Listens to messages sent from the panel
|
|
70
|
+
chrome.runtime.onMessage.addListener(extensionListener);
|
|
71
|
+
|
|
72
|
+
port.onDisconnect.addListener(function () {
|
|
73
|
+
chrome.runtime.onMessage.removeListener(extensionListener);
|
|
74
|
+
});
|
|
75
|
+
});
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/* eslint-disable func-names */
|
|
2
|
+
/* eslint-disable no-console */
|
|
3
|
+
/* eslint-disable no-undef */
|
|
4
|
+
/* eslint-disable no-unused-vars */
|
|
5
|
+
|
|
6
|
+
// This is included and executed in the inspected page
|
|
7
|
+
|
|
8
|
+
// local storage helpers
|
|
9
|
+
// we store the theme name here for when users refresh the page
|
|
10
|
+
// we can quickly check and add the theme tokens back into the page
|
|
11
|
+
function getLocalStorage(key) {
|
|
12
|
+
if (typeof window === 'undefined') {
|
|
13
|
+
return undefined;
|
|
14
|
+
}
|
|
15
|
+
return window.localStorage && window.localStorage[key];
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function setLocalStorage(key, value) {
|
|
19
|
+
if (window && window.localStorage) {
|
|
20
|
+
window.localStorage[key] = value;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// these functions are almost identical to the ones in background.js
|
|
25
|
+
// we need them here because the extension is isolated from the inspected page
|
|
26
|
+
// and has no idea if someone were to delete local storage or change the theme value
|
|
27
|
+
// in local storage
|
|
28
|
+
// This file is also run on document_start - https://developer.chrome.com/docs/extensions/mv3/content_scripts/#run_time
|
|
29
|
+
// which allows the theme CSS to seemingly persist across page refreshes
|
|
30
|
+
function removeTheme() {
|
|
31
|
+
const html = document.querySelector('html');
|
|
32
|
+
if (html) {
|
|
33
|
+
html.removeAttribute('data-theme');
|
|
34
|
+
setLocalStorage('theme', 'none');
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function setTheme(themeName = 'light') {
|
|
39
|
+
const html = document.querySelector('html');
|
|
40
|
+
html.setAttribute('data-theme', themeName);
|
|
41
|
+
setLocalStorage('theme', themeName);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function handleTheme(theme) {
|
|
45
|
+
if (!theme || theme === 'none') {
|
|
46
|
+
removeTheme();
|
|
47
|
+
} else if (theme === 'light') {
|
|
48
|
+
setTheme(theme);
|
|
49
|
+
} else if (theme === 'dark') {
|
|
50
|
+
setTheme(theme);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function init() {
|
|
55
|
+
console.log('tokens extension script attached');
|
|
56
|
+
const theme = getLocalStorage('theme');
|
|
57
|
+
handleTheme(theme);
|
|
58
|
+
|
|
59
|
+
const port = chrome.runtime.connect({
|
|
60
|
+
name: 'Theming Communication',
|
|
61
|
+
});
|
|
62
|
+
// tell extension what the theme value was from local storage
|
|
63
|
+
port.postMessage({ theme });
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function main() {
|
|
67
|
+
init();
|
|
68
|
+
|
|
69
|
+
chrome.runtime.onMessage.addListener(function (message) {
|
|
70
|
+
// the theme value from panel.html
|
|
71
|
+
const theme = message || 'none';
|
|
72
|
+
handleTheme(theme);
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
main();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<script src="devtools.js"></script>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* eslint-disable func-names */
|
|
2
|
+
/* eslint-disable no-undef */
|
|
3
|
+
|
|
4
|
+
// Can use
|
|
5
|
+
// chrome.devtools.*
|
|
6
|
+
// chrome.extension.*
|
|
7
|
+
|
|
8
|
+
// Create a tab in the devtools area
|
|
9
|
+
chrome.devtools.panels.create(
|
|
10
|
+
'Tokens theming controls',
|
|
11
|
+
'toast.png',
|
|
12
|
+
'panel.html',
|
|
13
|
+
function () {},
|
|
14
|
+
);
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Tokens Test Theming Extension",
|
|
3
|
+
"version": "0.2",
|
|
4
|
+
"description": "An extension to test theming implementations with @atlaskit/tokens",
|
|
5
|
+
"devtools_page": "devtools.html",
|
|
6
|
+
"background": {
|
|
7
|
+
"scripts": [
|
|
8
|
+
"background.js"
|
|
9
|
+
]
|
|
10
|
+
},
|
|
11
|
+
"permissions": [
|
|
12
|
+
"tabs",
|
|
13
|
+
"activeTab",
|
|
14
|
+
"http://*/*",
|
|
15
|
+
"https://*/*",
|
|
16
|
+
"storage",
|
|
17
|
+
"webNavigation"
|
|
18
|
+
],
|
|
19
|
+
"key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAs88BPdeATfZMpEmyioaG2gS8OXpcEYKTnfriDiOPrHApjiMOrbiMU2cFZsbxqKpBMktKrmOa6PRq328H6N4QN42p2c9eGdY1Mgun9UAQFV1EQWsUelAWzKeZRMRPWVBTnMHVRIHe7p9cXoHCTRB0kIbqR+P7zhxaf2bCaaiQ/UUMeX7LFLDoXNCmuFOnjLLupkNgJJdPIDCHpEypwQCpNNUH4UsOxJ0yTfAplYdw7cc7ZwSh/BJqAWRplywkXwRrL5FeFfXknIi/tMZzxYv4ZM89CY5ogPr1JZMVA5sw0xW0oh81wLHa6Y47mmPXgMtzyNKZ/QJRP6b66uNuot+FXQIDAQAB",
|
|
20
|
+
"content_scripts": [
|
|
21
|
+
{
|
|
22
|
+
"matches": [
|
|
23
|
+
"http://*/*",
|
|
24
|
+
"https://*/*"
|
|
25
|
+
],
|
|
26
|
+
"js": [
|
|
27
|
+
"content-script.js"
|
|
28
|
+
],
|
|
29
|
+
"css": [
|
|
30
|
+
"atlassian-theme.css"
|
|
31
|
+
],
|
|
32
|
+
"run_at": "document_start"
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
"manifest_version": 2
|
|
36
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/* eslint-disable func-names */
|
|
2
|
+
/* eslint-disable no-undef */
|
|
3
|
+
|
|
4
|
+
document.querySelector('button').addEventListener('click', function () {
|
|
5
|
+
sendObjectToDevTools({ content: 'Changed by page' });
|
|
6
|
+
});
|
|
7
|
+
function sendObjectToDevTools(message) {
|
|
8
|
+
// The callback here can be used to execute something on receipt
|
|
9
|
+
chrome.extension.sendMessage(message, function () {});
|
|
10
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/* eslint-disable no-param-reassign */
|
|
2
|
+
/* eslint-disable func-names */
|
|
3
|
+
/* eslint-disable no-undef */
|
|
4
|
+
/* eslint-disable no-unused-vars */
|
|
5
|
+
|
|
6
|
+
// This creates and maintains the communication channel between
|
|
7
|
+
// the inspectedPage and the dev tools panel.
|
|
8
|
+
//
|
|
9
|
+
// In this example, messages are JSON objects
|
|
10
|
+
// {
|
|
11
|
+
// action: ['code'|'script'|'message'], // What action to perform on the inspected page
|
|
12
|
+
// content: [String|Path to script|Object], // data to be passed through
|
|
13
|
+
// tabId: [Automatically added]
|
|
14
|
+
// }
|
|
15
|
+
|
|
16
|
+
(function createChannel() {
|
|
17
|
+
// Create a port with background page for continous message communication
|
|
18
|
+
const port = chrome.runtime.connect({
|
|
19
|
+
name: 'Theming Communication',
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
// Listen to messages from the background page
|
|
23
|
+
port.onMessage.addListener(function (message) {
|
|
24
|
+
// the theme value from local storage in the inspected page
|
|
25
|
+
const theme = message.theme || 'none';
|
|
26
|
+
// update the extension panel.html with the theme value
|
|
27
|
+
document.querySelector('#selected-theme').innerHTML = theme;
|
|
28
|
+
});
|
|
29
|
+
})();
|
|
30
|
+
|
|
31
|
+
// This sends an object to the background page
|
|
32
|
+
// where it can be relayed to the inspected page
|
|
33
|
+
function sendObjectToInspectedPage(message) {
|
|
34
|
+
message.tabId = chrome.devtools.inspectedWindow.tabId;
|
|
35
|
+
chrome.runtime.sendMessage(message);
|
|
36
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html style="background: white">
|
|
3
|
+
<head>
|
|
4
|
+
<style>
|
|
5
|
+
button {
|
|
6
|
+
margin: 1rem 0;
|
|
7
|
+
padding: 0.5rem 1rem;
|
|
8
|
+
}
|
|
9
|
+
p {
|
|
10
|
+
font-size: 1rem;
|
|
11
|
+
}
|
|
12
|
+
</style>
|
|
13
|
+
</head>
|
|
14
|
+
<body>
|
|
15
|
+
<div style="display: flex; flex-direction: column">
|
|
16
|
+
<h1>Settings</h1>
|
|
17
|
+
<p>Theme: <span id="selected-theme">none</span></p>
|
|
18
|
+
<button id="disable-theme">Disable theme</button>
|
|
19
|
+
<button id="enable-light-theme">Enable Atlassian light theme</button>
|
|
20
|
+
<button id="enable-dark-theme">Enable Atlassian dark theme</button>
|
|
21
|
+
</div>
|
|
22
|
+
<script src="messaging.js"></script>
|
|
23
|
+
<script src="panel.js"></script>
|
|
24
|
+
</body>
|
|
25
|
+
</html>
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/* eslint-disable func-names */
|
|
2
|
+
/* eslint-disable no-console */
|
|
3
|
+
/* eslint-disable no-undef */
|
|
4
|
+
/* eslint-disable no-unused-vars */
|
|
5
|
+
|
|
6
|
+
// This one acts in the context of the panel in the Dev Tools
|
|
7
|
+
//
|
|
8
|
+
// Can use
|
|
9
|
+
// chrome.devtools.*
|
|
10
|
+
// chrome.extension.*
|
|
11
|
+
|
|
12
|
+
// handle interactivity for panel.html
|
|
13
|
+
const themeValue = document.querySelector('#selected-theme');
|
|
14
|
+
|
|
15
|
+
document.querySelector('#disable-theme').addEventListener(
|
|
16
|
+
'click',
|
|
17
|
+
function () {
|
|
18
|
+
sendObjectToInspectedPage({
|
|
19
|
+
action: 'removeTheme',
|
|
20
|
+
});
|
|
21
|
+
themeValue.innerText = 'none';
|
|
22
|
+
},
|
|
23
|
+
false,
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
document.querySelector('#enable-light-theme').addEventListener(
|
|
27
|
+
'click',
|
|
28
|
+
function () {
|
|
29
|
+
sendObjectToInspectedPage({
|
|
30
|
+
action: 'setTheme-light',
|
|
31
|
+
});
|
|
32
|
+
themeValue.innerText = 'light';
|
|
33
|
+
},
|
|
34
|
+
false,
|
|
35
|
+
);
|
|
36
|
+
|
|
37
|
+
document.querySelector('#enable-dark-theme').addEventListener(
|
|
38
|
+
'click',
|
|
39
|
+
function () {
|
|
40
|
+
sendObjectToInspectedPage({
|
|
41
|
+
action: 'setTheme-dark',
|
|
42
|
+
});
|
|
43
|
+
themeValue.innerText = 'dark';
|
|
44
|
+
},
|
|
45
|
+
false,
|
|
46
|
+
);
|
|
Binary file
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* This file is intended to help create automation on top of renaming of tokens.
|
|
10
|
-
*
|
|
11
|
-
* When renaming tokens, you must first update the token at its source of truth.
|
|
12
|
-
* For example: packages/design-system/tokens/src/tokens/atlassian-dark/color/accent.tsx
|
|
13
|
-
*
|
|
14
|
-
* That token might go from `color.accentBlueSubtle` to `color.accentBluePrimary`
|
|
15
|
-
* which is totally acceptable on its own but for some platform targets, such as Figma,
|
|
16
|
-
* we need to provide additional metadata to tell figma that this is a rename and not a removal/addition.
|
|
17
|
-
*
|
|
18
|
-
* To create a rename mapping:
|
|
19
|
-
*
|
|
20
|
-
* 1. Get the fully object path, separated by a '.', i.e. color.background.primary
|
|
21
|
-
* 2. Create a key value pair to the renameMapping below, with key representing the old token and value representing the new token.
|
|
22
|
-
* 3. Update the token at its source of truth
|
|
23
|
-
* 4. run `yarn build tokens`
|
|
24
|
-
* 5. The artifact containing the automation should now be available in the `/dist` folder. i.e. packages/design-system/tokens/dist/figma/atlassian-light/sync-figma-tokens.js
|
|
25
|
-
* 6. After building make sure to remove the mapping from this file before checking it in
|
|
26
|
-
*/
|
|
27
|
-
var renameMapping = {};
|
|
28
|
-
var _default = renameMapping;
|
|
29
|
-
exports.default = _default;
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
// THIS IS AN AUTO-GENERATED FILE DO NOT MODIFY DIRECTLY
|
|
8
|
-
// Re-generate by running `yarn build tokens`.
|
|
9
|
-
var tokens = {
|
|
10
|
-
'color.accent.boldBlue': '--accent-boldBlue',
|
|
11
|
-
'color.accent.boldGreen': '--accent-boldGreen',
|
|
12
|
-
'color.accent.boldOrange': '--accent-boldOrange',
|
|
13
|
-
'color.accent.boldPurple': '--accent-boldPurple',
|
|
14
|
-
'color.accent.boldRed': '--accent-boldRed',
|
|
15
|
-
'color.accent.boldTeal': '--accent-boldTeal',
|
|
16
|
-
'color.accent.subtleBlue': '--accent-subtleBlue',
|
|
17
|
-
'color.accent.subtleGreen': '--accent-subtleGreen',
|
|
18
|
-
'color.accent.subtleMagenta': '--accent-subtleMagenta',
|
|
19
|
-
'color.accent.subtleOrange': '--accent-subtleOrange',
|
|
20
|
-
'color.accent.subtlePurple': '--accent-subtlePurple',
|
|
21
|
-
'color.accent.subtleRed': '--accent-subtleRed',
|
|
22
|
-
'color.accent.subtleTeal': '--accent-subtleTeal',
|
|
23
|
-
'color.background.sunken': '--background-sunken',
|
|
24
|
-
'color.background.default': '--background-default',
|
|
25
|
-
'color.background.card': '--background-card',
|
|
26
|
-
'color.background.overlay': '--background-overlay',
|
|
27
|
-
'color.background.selected.resting': '--background-selected-resting',
|
|
28
|
-
'color.background.selected.hover': '--background-selected-hover',
|
|
29
|
-
'color.background.selected.pressed': '--background-selected-pressed',
|
|
30
|
-
'color.background.blanket': '--background-blanket',
|
|
31
|
-
'color.background.disabled': '--background-disabled',
|
|
32
|
-
'color.background.boldBrand.resting': '--background-boldBrand-resting',
|
|
33
|
-
'color.background.boldBrand.hover': '--background-boldBrand-hover',
|
|
34
|
-
'color.background.boldBrand.pressed': '--background-boldBrand-pressed',
|
|
35
|
-
'color.background.subtleBrand.resting': '--background-subtleBrand-resting',
|
|
36
|
-
'color.background.subtleBrand.hover': '--background-subtleBrand-hover',
|
|
37
|
-
'color.background.subtleBrand.pressed': '--background-subtleBrand-pressed',
|
|
38
|
-
'color.background.boldDanger.resting': '--background-boldDanger-resting',
|
|
39
|
-
'color.background.boldDanger.hover': '--background-boldDanger-hover',
|
|
40
|
-
'color.background.boldDanger.pressed': '--background-boldDanger-pressed',
|
|
41
|
-
'color.background.subtleDanger.resting': '--background-subtleDanger-resting',
|
|
42
|
-
'color.background.subtleDanger.hover': '--background-subtleDanger-hover',
|
|
43
|
-
'color.background.subtleDanger.pressed': '--background-subtleDanger-pressed',
|
|
44
|
-
'color.background.boldWarning.resting': '--background-boldWarning-resting',
|
|
45
|
-
'color.background.boldWarning.hover': '--background-boldWarning-hover',
|
|
46
|
-
'color.background.boldWarning.pressed': '--background-boldWarning-pressed',
|
|
47
|
-
'color.background.subtleWarning.resting': '--background-subtleWarning-resting',
|
|
48
|
-
'color.background.subtleWarning.hover': '--background-subtleWarning-hover',
|
|
49
|
-
'color.background.subtleWarning.pressed': '--background-subtleWarning-pressed',
|
|
50
|
-
'color.background.boldSuccess.resting': '--background-boldSuccess-resting',
|
|
51
|
-
'color.background.boldSuccess.hover': '--background-boldSuccess-hover',
|
|
52
|
-
'color.background.boldSuccess.pressed': '--background-boldSuccess-pressed',
|
|
53
|
-
'color.background.subtleSuccess.resting': '--background-subtleSuccess-resting',
|
|
54
|
-
'color.background.subtleSuccess.hover': '--background-subtleSuccess-hover',
|
|
55
|
-
'color.background.subtleSuccess.pressed': '--background-subtleSuccess-pressed',
|
|
56
|
-
'color.background.boldDiscovery.resting': '--background-boldDiscovery-resting',
|
|
57
|
-
'color.background.boldDiscovery.hover': '--background-boldDiscovery-hover',
|
|
58
|
-
'color.background.boldDiscovery.pressed': '--background-boldDiscovery-pressed',
|
|
59
|
-
'color.background.subtleDiscovery.resting': '--background-subtleDiscovery-resting',
|
|
60
|
-
'color.background.subtleDiscovery.hover': '--background-subtleDiscovery-hover',
|
|
61
|
-
'color.background.subtleDiscovery.pressed': '--background-subtleDiscovery-pressed',
|
|
62
|
-
'color.background.boldNeutral.resting': '--background-boldNeutral-resting',
|
|
63
|
-
'color.background.boldNeutral.hover': '--background-boldNeutral-hover',
|
|
64
|
-
'color.background.boldNeutral.pressed': '--background-boldNeutral-pressed',
|
|
65
|
-
'color.background.transparentNeutral.hover': '--background-transparentNeutral-hover',
|
|
66
|
-
'color.background.transparentNeutral.pressed': '--background-transparentNeutral-pressed',
|
|
67
|
-
'color.background.subtleNeutral.resting': '--background-subtleNeutral-resting',
|
|
68
|
-
'color.background.subtleNeutral.hover': '--background-subtleNeutral-hover',
|
|
69
|
-
'color.background.subtleNeutral.pressed': '--background-subtleNeutral-pressed',
|
|
70
|
-
'color.background.subtleBorderedNeutral.resting': '--background-subtleBorderedNeutral-resting',
|
|
71
|
-
'color.background.subtleBorderedNeutral.pressed': '--background-subtleBorderedNeutral-pressed',
|
|
72
|
-
'color.border.focus': '--border-focus',
|
|
73
|
-
'color.border.neutral': '--border-neutral',
|
|
74
|
-
'color.iconBorder.brand': '--iconBorder-brand',
|
|
75
|
-
'color.iconBorder.danger': '--iconBorder-danger',
|
|
76
|
-
'color.iconBorder.warning': '--iconBorder-warning',
|
|
77
|
-
'color.iconBorder.success': '--iconBorder-success',
|
|
78
|
-
'color.iconBorder.discovery': '--iconBorder-discovery',
|
|
79
|
-
'color.overlay.hover': '--overlay-hover',
|
|
80
|
-
'color.overlay.pressed': '--overlay-pressed',
|
|
81
|
-
'color.text.selected': '--text-selected',
|
|
82
|
-
'color.text.highEmphasis': '--text-highEmphasis',
|
|
83
|
-
'color.text.mediumEmphasis': '--text-mediumEmphasis',
|
|
84
|
-
'color.text.lowEmphasis': '--text-lowEmphasis',
|
|
85
|
-
'color.text.onBold': '--text-onBold',
|
|
86
|
-
'color.text.onBoldWarning': '--text-onBoldWarning',
|
|
87
|
-
'color.text.link.resting': '--text-link-resting',
|
|
88
|
-
'color.text.link.pressed': '--text-link-pressed',
|
|
89
|
-
'color.text.brand': '--text-brand',
|
|
90
|
-
'color.text.warning': '--text-warning',
|
|
91
|
-
'color.text.danger': '--text-danger',
|
|
92
|
-
'color.text.success': '--text-success',
|
|
93
|
-
'color.text.discovery': '--text-discovery',
|
|
94
|
-
'color.text.disabled': '--text-disabled',
|
|
95
|
-
'shadow.card': '--card',
|
|
96
|
-
'shadow.overlay': '--overlay',
|
|
97
|
-
'utility.UNSAFE_util.transparent': '--UNSAFE_util-transparent'
|
|
98
|
-
};
|
|
99
|
-
var _default = tokens;
|
|
100
|
-
exports.default = _default;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from '../tokens/token-default-values';
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is intended to help create automation on top of renaming of tokens.
|
|
3
|
-
*
|
|
4
|
-
* When renaming tokens, you must first update the token at its source of truth.
|
|
5
|
-
* For example: packages/design-system/tokens/src/tokens/atlassian-dark/color/accent.tsx
|
|
6
|
-
*
|
|
7
|
-
* That token might go from `color.accentBlueSubtle` to `color.accentBluePrimary`
|
|
8
|
-
* which is totally acceptable on its own but for some platform targets, such as Figma,
|
|
9
|
-
* we need to provide additional metadata to tell figma that this is a rename and not a removal/addition.
|
|
10
|
-
*
|
|
11
|
-
* To create a rename mapping:
|
|
12
|
-
*
|
|
13
|
-
* 1. Get the fully object path, separated by a '.', i.e. color.background.primary
|
|
14
|
-
* 2. Create a key value pair to the renameMapping below, with key representing the old token and value representing the new token.
|
|
15
|
-
* 3. Update the token at its source of truth
|
|
16
|
-
* 4. run `yarn build tokens`
|
|
17
|
-
* 5. The artifact containing the automation should now be available in the `/dist` folder. i.e. packages/design-system/tokens/dist/figma/atlassian-light/sync-figma-tokens.js
|
|
18
|
-
* 6. After building make sure to remove the mapping from this file before checking it in
|
|
19
|
-
*/
|
|
20
|
-
const renameMapping = {};
|
|
21
|
-
export default renameMapping;
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
// THIS IS AN AUTO-GENERATED FILE DO NOT MODIFY DIRECTLY
|
|
2
|
-
// Re-generate by running `yarn build tokens`.
|
|
3
|
-
const tokens = {
|
|
4
|
-
'color.accent.boldBlue': '--accent-boldBlue',
|
|
5
|
-
'color.accent.boldGreen': '--accent-boldGreen',
|
|
6
|
-
'color.accent.boldOrange': '--accent-boldOrange',
|
|
7
|
-
'color.accent.boldPurple': '--accent-boldPurple',
|
|
8
|
-
'color.accent.boldRed': '--accent-boldRed',
|
|
9
|
-
'color.accent.boldTeal': '--accent-boldTeal',
|
|
10
|
-
'color.accent.subtleBlue': '--accent-subtleBlue',
|
|
11
|
-
'color.accent.subtleGreen': '--accent-subtleGreen',
|
|
12
|
-
'color.accent.subtleMagenta': '--accent-subtleMagenta',
|
|
13
|
-
'color.accent.subtleOrange': '--accent-subtleOrange',
|
|
14
|
-
'color.accent.subtlePurple': '--accent-subtlePurple',
|
|
15
|
-
'color.accent.subtleRed': '--accent-subtleRed',
|
|
16
|
-
'color.accent.subtleTeal': '--accent-subtleTeal',
|
|
17
|
-
'color.background.sunken': '--background-sunken',
|
|
18
|
-
'color.background.default': '--background-default',
|
|
19
|
-
'color.background.card': '--background-card',
|
|
20
|
-
'color.background.overlay': '--background-overlay',
|
|
21
|
-
'color.background.selected.resting': '--background-selected-resting',
|
|
22
|
-
'color.background.selected.hover': '--background-selected-hover',
|
|
23
|
-
'color.background.selected.pressed': '--background-selected-pressed',
|
|
24
|
-
'color.background.blanket': '--background-blanket',
|
|
25
|
-
'color.background.disabled': '--background-disabled',
|
|
26
|
-
'color.background.boldBrand.resting': '--background-boldBrand-resting',
|
|
27
|
-
'color.background.boldBrand.hover': '--background-boldBrand-hover',
|
|
28
|
-
'color.background.boldBrand.pressed': '--background-boldBrand-pressed',
|
|
29
|
-
'color.background.subtleBrand.resting': '--background-subtleBrand-resting',
|
|
30
|
-
'color.background.subtleBrand.hover': '--background-subtleBrand-hover',
|
|
31
|
-
'color.background.subtleBrand.pressed': '--background-subtleBrand-pressed',
|
|
32
|
-
'color.background.boldDanger.resting': '--background-boldDanger-resting',
|
|
33
|
-
'color.background.boldDanger.hover': '--background-boldDanger-hover',
|
|
34
|
-
'color.background.boldDanger.pressed': '--background-boldDanger-pressed',
|
|
35
|
-
'color.background.subtleDanger.resting': '--background-subtleDanger-resting',
|
|
36
|
-
'color.background.subtleDanger.hover': '--background-subtleDanger-hover',
|
|
37
|
-
'color.background.subtleDanger.pressed': '--background-subtleDanger-pressed',
|
|
38
|
-
'color.background.boldWarning.resting': '--background-boldWarning-resting',
|
|
39
|
-
'color.background.boldWarning.hover': '--background-boldWarning-hover',
|
|
40
|
-
'color.background.boldWarning.pressed': '--background-boldWarning-pressed',
|
|
41
|
-
'color.background.subtleWarning.resting': '--background-subtleWarning-resting',
|
|
42
|
-
'color.background.subtleWarning.hover': '--background-subtleWarning-hover',
|
|
43
|
-
'color.background.subtleWarning.pressed': '--background-subtleWarning-pressed',
|
|
44
|
-
'color.background.boldSuccess.resting': '--background-boldSuccess-resting',
|
|
45
|
-
'color.background.boldSuccess.hover': '--background-boldSuccess-hover',
|
|
46
|
-
'color.background.boldSuccess.pressed': '--background-boldSuccess-pressed',
|
|
47
|
-
'color.background.subtleSuccess.resting': '--background-subtleSuccess-resting',
|
|
48
|
-
'color.background.subtleSuccess.hover': '--background-subtleSuccess-hover',
|
|
49
|
-
'color.background.subtleSuccess.pressed': '--background-subtleSuccess-pressed',
|
|
50
|
-
'color.background.boldDiscovery.resting': '--background-boldDiscovery-resting',
|
|
51
|
-
'color.background.boldDiscovery.hover': '--background-boldDiscovery-hover',
|
|
52
|
-
'color.background.boldDiscovery.pressed': '--background-boldDiscovery-pressed',
|
|
53
|
-
'color.background.subtleDiscovery.resting': '--background-subtleDiscovery-resting',
|
|
54
|
-
'color.background.subtleDiscovery.hover': '--background-subtleDiscovery-hover',
|
|
55
|
-
'color.background.subtleDiscovery.pressed': '--background-subtleDiscovery-pressed',
|
|
56
|
-
'color.background.boldNeutral.resting': '--background-boldNeutral-resting',
|
|
57
|
-
'color.background.boldNeutral.hover': '--background-boldNeutral-hover',
|
|
58
|
-
'color.background.boldNeutral.pressed': '--background-boldNeutral-pressed',
|
|
59
|
-
'color.background.transparentNeutral.hover': '--background-transparentNeutral-hover',
|
|
60
|
-
'color.background.transparentNeutral.pressed': '--background-transparentNeutral-pressed',
|
|
61
|
-
'color.background.subtleNeutral.resting': '--background-subtleNeutral-resting',
|
|
62
|
-
'color.background.subtleNeutral.hover': '--background-subtleNeutral-hover',
|
|
63
|
-
'color.background.subtleNeutral.pressed': '--background-subtleNeutral-pressed',
|
|
64
|
-
'color.background.subtleBorderedNeutral.resting': '--background-subtleBorderedNeutral-resting',
|
|
65
|
-
'color.background.subtleBorderedNeutral.pressed': '--background-subtleBorderedNeutral-pressed',
|
|
66
|
-
'color.border.focus': '--border-focus',
|
|
67
|
-
'color.border.neutral': '--border-neutral',
|
|
68
|
-
'color.iconBorder.brand': '--iconBorder-brand',
|
|
69
|
-
'color.iconBorder.danger': '--iconBorder-danger',
|
|
70
|
-
'color.iconBorder.warning': '--iconBorder-warning',
|
|
71
|
-
'color.iconBorder.success': '--iconBorder-success',
|
|
72
|
-
'color.iconBorder.discovery': '--iconBorder-discovery',
|
|
73
|
-
'color.overlay.hover': '--overlay-hover',
|
|
74
|
-
'color.overlay.pressed': '--overlay-pressed',
|
|
75
|
-
'color.text.selected': '--text-selected',
|
|
76
|
-
'color.text.highEmphasis': '--text-highEmphasis',
|
|
77
|
-
'color.text.mediumEmphasis': '--text-mediumEmphasis',
|
|
78
|
-
'color.text.lowEmphasis': '--text-lowEmphasis',
|
|
79
|
-
'color.text.onBold': '--text-onBold',
|
|
80
|
-
'color.text.onBoldWarning': '--text-onBoldWarning',
|
|
81
|
-
'color.text.link.resting': '--text-link-resting',
|
|
82
|
-
'color.text.link.pressed': '--text-link-pressed',
|
|
83
|
-
'color.text.brand': '--text-brand',
|
|
84
|
-
'color.text.warning': '--text-warning',
|
|
85
|
-
'color.text.danger': '--text-danger',
|
|
86
|
-
'color.text.success': '--text-success',
|
|
87
|
-
'color.text.discovery': '--text-discovery',
|
|
88
|
-
'color.text.disabled': '--text-disabled',
|
|
89
|
-
'shadow.card': '--card',
|
|
90
|
-
'shadow.overlay': '--overlay',
|
|
91
|
-
'utility.UNSAFE_util.transparent': '--UNSAFE_util-transparent'
|
|
92
|
-
};
|
|
93
|
-
export default tokens;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from '../tokens/token-default-values';
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is intended to help create automation on top of renaming of tokens.
|
|
3
|
-
*
|
|
4
|
-
* When renaming tokens, you must first update the token at its source of truth.
|
|
5
|
-
* For example: packages/design-system/tokens/src/tokens/atlassian-dark/color/accent.tsx
|
|
6
|
-
*
|
|
7
|
-
* That token might go from `color.accentBlueSubtle` to `color.accentBluePrimary`
|
|
8
|
-
* which is totally acceptable on its own but for some platform targets, such as Figma,
|
|
9
|
-
* we need to provide additional metadata to tell figma that this is a rename and not a removal/addition.
|
|
10
|
-
*
|
|
11
|
-
* To create a rename mapping:
|
|
12
|
-
*
|
|
13
|
-
* 1. Get the fully object path, separated by a '.', i.e. color.background.primary
|
|
14
|
-
* 2. Create a key value pair to the renameMapping below, with key representing the old token and value representing the new token.
|
|
15
|
-
* 3. Update the token at its source of truth
|
|
16
|
-
* 4. run `yarn build tokens`
|
|
17
|
-
* 5. The artifact containing the automation should now be available in the `/dist` folder. i.e. packages/design-system/tokens/dist/figma/atlassian-light/sync-figma-tokens.js
|
|
18
|
-
* 6. After building make sure to remove the mapping from this file before checking it in
|
|
19
|
-
*/
|
|
20
|
-
var renameMapping = {};
|
|
21
|
-
export default renameMapping;
|