@atlaskit/storybook-addon-design-system 0.3.2 → 0.3.4
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/dist/types-ts4.0/index.d.ts +1 -0
- package/dist/types-ts4.0/tokens/components/index.d.ts +1 -0
- package/dist/types-ts4.0/tokens/components/tool.d.ts +8 -0
- package/dist/types-ts4.0/tokens/constants.d.ts +5 -0
- package/dist/types-ts4.0/tokens/decorator.d.ts +4 -0
- package/dist/types-ts4.0/tokens/index.d.ts +1 -0
- package/dist/types-ts4.0/tokens/register.d.ts +1 -0
- package/dist/types-ts4.0/tokens/types.d.ts +1 -0
- package/package.json +10 -1
- package/report.api.md +4 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/storybook-addon-design-system
|
|
2
2
|
|
|
3
|
+
## 0.3.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`43464a5fb17`](https://bitbucket.org/atlassian/atlassian-frontend/commits/43464a5fb17) - Update split and stack theme settings to use tilde selectors
|
|
8
|
+
|
|
9
|
+
## 0.3.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`9827dcb82b8`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9827dcb82b8) - No-op change to introduce spacing tokens to design system components.
|
|
14
|
+
|
|
3
15
|
## 0.3.2
|
|
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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { withDesignTokens } from './tokens';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Tool } from './tool';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as withDesignTokens } from './decorator';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare type Themes = 'light' | 'dark' | 'none' | 'split' | 'stack';
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/storybook-addon-design-system",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.4",
|
|
4
4
|
"description": "Design token storybook addon",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"registry": "https://registry.npmjs.org/"
|
|
8
8
|
},
|
|
9
9
|
"atlassian": {
|
|
10
|
+
"disableProductCI": true,
|
|
10
11
|
"team": "Design System Team",
|
|
11
12
|
"releaseModel": "scheduled",
|
|
12
13
|
"website": {
|
|
@@ -20,6 +21,14 @@
|
|
|
20
21
|
"module": "dist/esm/index.js",
|
|
21
22
|
"module:es2019": "dist/es2019/index.js",
|
|
22
23
|
"types": "dist/types/index.d.ts",
|
|
24
|
+
"typesVersions": {
|
|
25
|
+
">=4.0 <4.5": {
|
|
26
|
+
"*": [
|
|
27
|
+
"dist/types-ts4.0/*",
|
|
28
|
+
"dist/types-ts4.0/index.d.ts"
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
},
|
|
23
32
|
"sideEffects": false,
|
|
24
33
|
"atlaskit:src": "src/index.tsx",
|
|
25
34
|
"af:exports": {
|
package/report.api.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
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. This report is auto-generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
[Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
|
|
4
6
|
|
|
5
7
|
```ts
|
|
6
8
|
export declare const withDesignTokens: (...args: any) => any;
|