@atlaskit/tokens 0.2.1 → 0.3.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 +6 -0
- package/css/atlassian-dark.css +88 -88
- package/css/atlassian-light.css +88 -88
- package/dist/cjs/tokens/token-names.js +88 -88
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/tokens/token-names.js +88 -88
- package/dist/es2019/version.json +1 -1
- package/dist/esm/tokens/token-names.js +88 -88
- package/dist/esm/version.json +1 -1
- package/dist/types/tokens/token-names.d.ts +176 -176
- package/package.json +1 -1
- package/tokens-browser-extension/README.md +28 -0
- package/tokens-browser-extension/atlassian-theme.css +375 -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
|
@@ -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
|