@atlaskit/tokens 0.6.0 → 0.6.3
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 +45 -0
- package/css/atlassian-dark.css +15 -8
- package/css/atlassian-light.css +14 -7
- package/dist/cjs/artifacts/rename-mapping.js +24 -20
- package/dist/cjs/artifacts/token-default-values.js +14 -7
- package/dist/cjs/artifacts/token-names.js +14 -7
- package/dist/cjs/artifacts/tokens-raw/atlassian-dark.js +254 -119
- package/dist/cjs/artifacts/tokens-raw/atlassian-light.js +252 -117
- package/dist/cjs/get-token.js +1 -1
- package/dist/cjs/tokens/atlassian-dark/color/background.js +16 -3
- package/dist/cjs/tokens/atlassian-dark/color/border.js +3 -0
- package/dist/cjs/tokens/atlassian-dark/color/icon.js +3 -0
- package/dist/cjs/tokens/atlassian-dark/color/text.js +3 -0
- package/dist/cjs/tokens/atlassian-dark/deprecated/deprecated.js +13 -6
- package/dist/cjs/tokens/atlassian-dark/elevation/surface.js +1 -1
- package/dist/cjs/tokens/atlassian-light/color/background.js +13 -0
- package/dist/cjs/tokens/atlassian-light/color/border.js +3 -0
- package/dist/cjs/tokens/atlassian-light/color/icon.js +3 -0
- package/dist/cjs/tokens/atlassian-light/color/text.js +3 -0
- package/dist/cjs/tokens/atlassian-light/deprecated/deprecated.js +13 -6
- package/dist/cjs/tokens/default/color/background.js +30 -5
- package/dist/cjs/tokens/default/color/border.js +7 -0
- package/dist/cjs/tokens/default/color/icon.js +7 -0
- package/dist/cjs/tokens/default/color/text.js +7 -0
- package/dist/cjs/tokens/default/deprecated/deprecated.js +33 -21
- package/dist/cjs/tokens/palette.js +6 -0
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/artifacts/rename-mapping.js +24 -20
- package/dist/es2019/artifacts/token-default-values.js +14 -7
- package/dist/es2019/artifacts/token-names.js +14 -7
- package/dist/es2019/artifacts/tokens-raw/atlassian-dark.js +254 -119
- package/dist/es2019/artifacts/tokens-raw/atlassian-light.js +252 -117
- package/dist/es2019/get-token.js +1 -1
- package/dist/es2019/tokens/atlassian-dark/color/background.js +16 -3
- package/dist/es2019/tokens/atlassian-dark/color/border.js +3 -0
- package/dist/es2019/tokens/atlassian-dark/color/icon.js +3 -0
- package/dist/es2019/tokens/atlassian-dark/color/text.js +3 -0
- package/dist/es2019/tokens/atlassian-dark/deprecated/deprecated.js +13 -6
- package/dist/es2019/tokens/atlassian-dark/elevation/surface.js +1 -1
- package/dist/es2019/tokens/atlassian-light/color/background.js +13 -0
- package/dist/es2019/tokens/atlassian-light/color/border.js +3 -0
- package/dist/es2019/tokens/atlassian-light/color/icon.js +3 -0
- package/dist/es2019/tokens/atlassian-light/color/text.js +3 -0
- package/dist/es2019/tokens/atlassian-light/deprecated/deprecated.js +13 -6
- package/dist/es2019/tokens/default/color/background.js +30 -5
- package/dist/es2019/tokens/default/color/border.js +7 -0
- package/dist/es2019/tokens/default/color/icon.js +7 -0
- package/dist/es2019/tokens/default/color/text.js +7 -0
- package/dist/es2019/tokens/default/deprecated/deprecated.js +33 -21
- package/dist/es2019/tokens/palette.js +6 -0
- package/dist/es2019/version.json +1 -1
- package/dist/esm/artifacts/rename-mapping.js +24 -20
- package/dist/esm/artifacts/token-default-values.js +14 -7
- package/dist/esm/artifacts/token-names.js +14 -7
- package/dist/esm/artifacts/tokens-raw/atlassian-dark.js +254 -119
- package/dist/esm/artifacts/tokens-raw/atlassian-light.js +252 -117
- package/dist/esm/get-token.js +1 -1
- package/dist/esm/tokens/atlassian-dark/color/background.js +16 -3
- package/dist/esm/tokens/atlassian-dark/color/border.js +3 -0
- package/dist/esm/tokens/atlassian-dark/color/icon.js +3 -0
- package/dist/esm/tokens/atlassian-dark/color/text.js +3 -0
- package/dist/esm/tokens/atlassian-dark/deprecated/deprecated.js +13 -6
- package/dist/esm/tokens/atlassian-dark/elevation/surface.js +1 -1
- package/dist/esm/tokens/atlassian-light/color/background.js +13 -0
- package/dist/esm/tokens/atlassian-light/color/border.js +3 -0
- package/dist/esm/tokens/atlassian-light/color/icon.js +3 -0
- package/dist/esm/tokens/atlassian-light/color/text.js +3 -0
- package/dist/esm/tokens/atlassian-light/deprecated/deprecated.js +13 -6
- package/dist/esm/tokens/default/color/background.js +30 -5
- package/dist/esm/tokens/default/color/border.js +7 -0
- package/dist/esm/tokens/default/color/icon.js +7 -0
- package/dist/esm/tokens/default/color/text.js +7 -0
- package/dist/esm/tokens/default/deprecated/deprecated.js +33 -21
- package/dist/esm/tokens/palette.js +6 -0
- package/dist/esm/version.json +1 -1
- package/dist/types/artifacts/rename-mapping.d.ts +1 -1
- package/dist/types/artifacts/token-default-values.d.ts +14 -7
- package/dist/types/artifacts/token-names.d.ts +28 -14
- package/dist/types/artifacts/types-internal.d.ts +1 -1
- package/dist/types/artifacts/types.d.ts +1 -1
- package/dist/types/tokens/default/utility/utility.d.ts +10 -10
- package/dist/types/types.d.ts +18 -2
- package/package.json +17 -11
- package/tokens-browser-extension/README.md +0 -28
- package/tokens-browser-extension/atlassian-theme.css +0 -449
- package/tokens-browser-extension/background.js +0 -75
- package/tokens-browser-extension/content-script.js +0 -75
- package/tokens-browser-extension/devtools.html +0 -1
- package/tokens-browser-extension/devtools.js +0 -14
- package/tokens-browser-extension/manifest.json +0 -35
- package/tokens-browser-extension/messageback-script.js +0 -10
- package/tokens-browser-extension/messaging.js +0 -36
- package/tokens-browser-extension/panel.html +0 -25
- package/tokens-browser-extension/panel.js +0 -46
- package/tokens-browser-extension/toast.png +0 -0
|
@@ -1,36 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
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>
|
|
@@ -1,46 +0,0 @@
|
|
|
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
|