@atlaskit/storybook-addon-design-system 0.3.3 → 0.3.5
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 +12 -0
- package/dist/cjs/tokens/decorator.js +7 -8
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/tokens/decorator.js +7 -8
- package/dist/es2019/version.json +1 -1
- package/dist/esm/tokens/decorator.js +7 -8
- package/dist/esm/version.json +1 -1
- package/package.json +5 -3
- package/report.api.md +9 -4
- package/dist/types-ts4.0/index.d.ts +0 -1
- package/dist/types-ts4.0/tokens/components/index.d.ts +0 -1
- package/dist/types-ts4.0/tokens/components/tool.d.ts +0 -8
- package/dist/types-ts4.0/tokens/constants.d.ts +0 -5
- package/dist/types-ts4.0/tokens/decorator.d.ts +0 -4
- package/dist/types-ts4.0/tokens/index.d.ts +0 -1
- package/dist/types-ts4.0/tokens/register.d.ts +0 -1
- package/dist/types-ts4.0/tokens/types.d.ts +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/storybook-addon-design-system
|
|
2
2
|
|
|
3
|
+
## 0.3.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 0.3.4
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`43464a5fb17`](https://bitbucket.org/atlassian/atlassian-frontend/commits/43464a5fb17) - Update split and stack theme settings to use tilde selectors
|
|
14
|
+
|
|
3
15
|
## 0.3.3
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -56,8 +56,12 @@ var stackColumnStyles = {
|
|
|
56
56
|
* .ads-theme-override, for split and stack views.
|
|
57
57
|
*/
|
|
58
58
|
|
|
59
|
-
var hackThemeOverrideOnStyleElement = function hackThemeOverrideOnStyleElement(style
|
|
60
|
-
|
|
59
|
+
var hackThemeOverrideOnStyleElement = function hackThemeOverrideOnStyleElement(style) {
|
|
60
|
+
var regex = /html\[(data-theme.?=)"(light|dark)"\](\s{)/i;
|
|
61
|
+
|
|
62
|
+
if (regex.test(style.innerText)) {
|
|
63
|
+
style.innerText = style.textContent.replace(regex, "html[$1\"$2\"], .ads-theme-override[$1\"$2\"]$3");
|
|
64
|
+
}
|
|
61
65
|
};
|
|
62
66
|
|
|
63
67
|
var withDesignTokens = (0, _addons.makeDecorator)({
|
|
@@ -67,13 +71,8 @@ var withDesignTokens = (0, _addons.makeDecorator)({
|
|
|
67
71
|
var theme = context.globals.adsTheme; // eslint-disable-next-line react-hooks/rules-of-hooks
|
|
68
72
|
|
|
69
73
|
(0, _addons.useEffect)(function () {
|
|
70
|
-
var adsThemes = ['light', 'dark'];
|
|
71
74
|
document.querySelectorAll('style').forEach(function (el) {
|
|
72
|
-
|
|
73
|
-
if (el.innerText.includes("html[data-theme=\"".concat(adsTheme, "\"] {"))) {
|
|
74
|
-
hackThemeOverrideOnStyleElement(el, adsTheme);
|
|
75
|
-
}
|
|
76
|
-
});
|
|
75
|
+
hackThemeOverrideOnStyleElement(el);
|
|
77
76
|
});
|
|
78
77
|
}, [context.id]); // eslint-disable-next-line react-hooks/rules-of-hooks
|
|
79
78
|
|
package/dist/cjs/version.json
CHANGED
|
@@ -29,8 +29,12 @@ const stackColumnStyles = {
|
|
|
29
29
|
* .ads-theme-override, for split and stack views.
|
|
30
30
|
*/
|
|
31
31
|
|
|
32
|
-
const hackThemeOverrideOnStyleElement =
|
|
33
|
-
|
|
32
|
+
const hackThemeOverrideOnStyleElement = style => {
|
|
33
|
+
const regex = /html\[(data-theme.?=)"(light|dark)"\](\s{)/i;
|
|
34
|
+
|
|
35
|
+
if (regex.test(style.innerText)) {
|
|
36
|
+
style.innerText = style.textContent.replace(regex, `html[$1"$2"], .ads-theme-override[$1"$2"]$3`);
|
|
37
|
+
}
|
|
34
38
|
};
|
|
35
39
|
|
|
36
40
|
const withDesignTokens = makeDecorator({
|
|
@@ -40,13 +44,8 @@ const withDesignTokens = makeDecorator({
|
|
|
40
44
|
const theme = context.globals.adsTheme; // eslint-disable-next-line react-hooks/rules-of-hooks
|
|
41
45
|
|
|
42
46
|
useEffect(() => {
|
|
43
|
-
const adsThemes = ['light', 'dark'];
|
|
44
47
|
document.querySelectorAll('style').forEach(el => {
|
|
45
|
-
|
|
46
|
-
if (el.innerText.includes(`html[data-theme="${adsTheme}"] {`)) {
|
|
47
|
-
hackThemeOverrideOnStyleElement(el, adsTheme);
|
|
48
|
-
}
|
|
49
|
-
});
|
|
48
|
+
hackThemeOverrideOnStyleElement(el);
|
|
50
49
|
});
|
|
51
50
|
}, [context.id]); // eslint-disable-next-line react-hooks/rules-of-hooks
|
|
52
51
|
|
package/dist/es2019/version.json
CHANGED
|
@@ -35,8 +35,12 @@ var stackColumnStyles = {
|
|
|
35
35
|
* .ads-theme-override, for split and stack views.
|
|
36
36
|
*/
|
|
37
37
|
|
|
38
|
-
var hackThemeOverrideOnStyleElement = function hackThemeOverrideOnStyleElement(style
|
|
39
|
-
|
|
38
|
+
var hackThemeOverrideOnStyleElement = function hackThemeOverrideOnStyleElement(style) {
|
|
39
|
+
var regex = /html\[(data-theme.?=)"(light|dark)"\](\s{)/i;
|
|
40
|
+
|
|
41
|
+
if (regex.test(style.innerText)) {
|
|
42
|
+
style.innerText = style.textContent.replace(regex, "html[$1\"$2\"], .ads-theme-override[$1\"$2\"]$3");
|
|
43
|
+
}
|
|
40
44
|
};
|
|
41
45
|
|
|
42
46
|
var withDesignTokens = makeDecorator({
|
|
@@ -46,13 +50,8 @@ var withDesignTokens = makeDecorator({
|
|
|
46
50
|
var theme = context.globals.adsTheme; // eslint-disable-next-line react-hooks/rules-of-hooks
|
|
47
51
|
|
|
48
52
|
useEffect(function () {
|
|
49
|
-
var adsThemes = ['light', 'dark'];
|
|
50
53
|
document.querySelectorAll('style').forEach(function (el) {
|
|
51
|
-
|
|
52
|
-
if (el.innerText.includes("html[data-theme=\"".concat(adsTheme, "\"] {"))) {
|
|
53
|
-
hackThemeOverrideOnStyleElement(el, adsTheme);
|
|
54
|
-
}
|
|
55
|
-
});
|
|
54
|
+
hackThemeOverrideOnStyleElement(el);
|
|
56
55
|
});
|
|
57
56
|
}, [context.id]); // eslint-disable-next-line react-hooks/rules-of-hooks
|
|
58
57
|
|
package/dist/esm/version.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/storybook-addon-design-system",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.5",
|
|
4
4
|
"description": "Design token storybook addon",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"publishConfig": {
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
".": "./src/index.tsx"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@atlaskit/tokens": "^0.
|
|
38
|
+
"@atlaskit/tokens": "^0.11.0",
|
|
39
39
|
"@babel/runtime": "^7.0.0",
|
|
40
40
|
"@storybook/addons": "^6.4.0",
|
|
41
41
|
"@storybook/api": "^6.4.0",
|
|
@@ -55,7 +55,9 @@
|
|
|
55
55
|
"dom-events": "use-bind-event-listener",
|
|
56
56
|
"design-system": "v1",
|
|
57
57
|
"deprecation": "no-deprecated-imports",
|
|
58
|
-
"styling":
|
|
58
|
+
"styling": [
|
|
59
|
+
"emotion"
|
|
60
|
+
]
|
|
59
61
|
}
|
|
60
62
|
},
|
|
61
63
|
"homepage": "https://atlassian.design/components/storybook-addon-design-system",
|
package/report.api.md
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
|
-
## API Report File for "@atlaskit/storybook-addon-design-system"
|
|
1
|
+
## API Report File for "@atlaskit/storybook-addon-design-system"
|
|
2
2
|
|
|
3
|
-
> Do not edit this file.
|
|
3
|
+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
<!--
|
|
6
|
+
Generated API Report version: 2.0
|
|
7
|
+
-->
|
|
4
8
|
|
|
5
9
|
[Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
|
|
6
10
|
|
|
7
11
|
```ts
|
|
8
|
-
|
|
12
|
+
// @public (undocumented)
|
|
13
|
+
export const withDesignTokens: (...args: any) => any;
|
|
9
14
|
|
|
10
|
-
|
|
15
|
+
// (No @packageDocumentation comment for this package)
|
|
11
16
|
```
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { withDesignTokens } from './tokens';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Tool } from './tool';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as withDesignTokens } from './decorator';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare type Themes = 'light' | 'dark' | 'none' | 'split' | 'stack';
|