@atlaskit/storybook-addon-design-system 0.5.2 → 0.6.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 +23 -16
- package/constellation/images/storybook-addon.png +0 -0
- package/constellation/index/props.mdx +55 -0
- package/constellation/index/usage.mdx +10 -2
- package/dist/cjs/tokens/components/tool.js +1 -2
- package/dist/cjs/tokens/constants.js +5 -10
- package/dist/cjs/tokens/decorator.js +9 -6
- package/dist/es2019/tokens/decorator.js +6 -2
- package/dist/esm/tokens/decorator.js +8 -4
- package/package.json +4 -7
- package/constellation/index/examples.mdx +0 -5
- package/dist/cjs/version.json +0 -5
- package/dist/es2019/version.json +0 -5
- package/dist/esm/version.json +0 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,32 +1,39 @@
|
|
|
1
1
|
# @atlaskit/storybook-addon-design-system
|
|
2
2
|
|
|
3
|
+
## 0.6.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#77691](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/77691) [`14d18ea34852`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/14d18ea34852) - - Enables new `typography` and `shape` themes
|
|
8
|
+
- Sets the color theme to `auto` by default
|
|
9
|
+
|
|
3
10
|
## 0.5.2
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
|
6
13
|
|
|
7
|
-
- [`b1bdec7cce2`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b1bdec7cce2) - Internal change to enforce token usage for spacing properties. There is no expected visual or behaviour change.
|
|
14
|
+
- [#32935](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/32935) [`b1bdec7cce2`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b1bdec7cce2) - Internal change to enforce token usage for spacing properties. There is no expected visual or behaviour change.
|
|
8
15
|
|
|
9
16
|
## 0.5.1
|
|
10
17
|
|
|
11
18
|
### Patch Changes
|
|
12
19
|
|
|
13
|
-
- [`9d00501a414`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9d00501a414) - Ensure legacy types are published for TS 4.5-4.8
|
|
20
|
+
- [#33793](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33793) [`9d00501a414`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9d00501a414) - Ensure legacy types are published for TS 4.5-4.8
|
|
14
21
|
|
|
15
22
|
## 0.5.0
|
|
16
23
|
|
|
17
24
|
### Minor Changes
|
|
18
25
|
|
|
19
|
-
- [`389ab86b2a3`](https://bitbucket.org/atlassian/atlassian-frontend/commits/389ab86b2a3) - Adding spacing tokens to storybook addon so that users spacing tokens appear in storybook
|
|
26
|
+
- [#33632](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33632) [`389ab86b2a3`](https://bitbucket.org/atlassian/atlassian-frontend/commits/389ab86b2a3) - Adding spacing tokens to storybook addon so that users spacing tokens appear in storybook
|
|
20
27
|
|
|
21
28
|
### Patch Changes
|
|
22
29
|
|
|
23
|
-
- [`41fae2c6f68`](https://bitbucket.org/atlassian/atlassian-frontend/commits/41fae2c6f68) - Upgrade Typescript from `4.5.5` to `4.9.5`
|
|
30
|
+
- [#33649](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33649) [`41fae2c6f68`](https://bitbucket.org/atlassian/atlassian-frontend/commits/41fae2c6f68) - Upgrade Typescript from `4.5.5` to `4.9.5`
|
|
24
31
|
|
|
25
32
|
## 0.4.0
|
|
26
33
|
|
|
27
34
|
### Minor Changes
|
|
28
35
|
|
|
29
|
-
- [`56507598609`](https://bitbucket.org/atlassian/atlassian-frontend/commits/56507598609) - Skip minor dependency bump
|
|
36
|
+
- [#33258](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33258) [`56507598609`](https://bitbucket.org/atlassian/atlassian-frontend/commits/56507598609) - Skip minor dependency bump
|
|
30
37
|
|
|
31
38
|
### Patch Changes
|
|
32
39
|
|
|
@@ -36,7 +43,7 @@
|
|
|
36
43
|
|
|
37
44
|
### Patch Changes
|
|
38
45
|
|
|
39
|
-
- [`718d5ad3044`](https://bitbucket.org/atlassian/atlassian-frontend/commits/718d5ad3044) - Updates to support the new `@atlaskit/tokens` theming API.
|
|
46
|
+
- [#27634](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/27634) [`718d5ad3044`](https://bitbucket.org/atlassian/atlassian-frontend/commits/718d5ad3044) - Updates to support the new `@atlaskit/tokens` theming API.
|
|
40
47
|
- Updated dependencies
|
|
41
48
|
|
|
42
49
|
## 0.3.8
|
|
@@ -55,7 +62,7 @@
|
|
|
55
62
|
|
|
56
63
|
### Patch Changes
|
|
57
64
|
|
|
58
|
-
- [`f824dcfff6e`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f824dcfff6e) - Internal changes to satisfy various lint warnings & errors
|
|
65
|
+
- [#27629](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/27629) [`f824dcfff6e`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f824dcfff6e) - Internal changes to satisfy various lint warnings & errors
|
|
59
66
|
|
|
60
67
|
## 0.3.5
|
|
61
68
|
|
|
@@ -67,31 +74,31 @@
|
|
|
67
74
|
|
|
68
75
|
### Patch Changes
|
|
69
76
|
|
|
70
|
-
- [`43464a5fb17`](https://bitbucket.org/atlassian/atlassian-frontend/commits/43464a5fb17) - Update split and stack theme settings to use tilde selectors
|
|
77
|
+
- [#26467](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/26467) [`43464a5fb17`](https://bitbucket.org/atlassian/atlassian-frontend/commits/43464a5fb17) - Update split and stack theme settings to use tilde selectors
|
|
71
78
|
|
|
72
79
|
## 0.3.3
|
|
73
80
|
|
|
74
81
|
### Patch Changes
|
|
75
82
|
|
|
76
|
-
- [`9827dcb82b8`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9827dcb82b8) - No-op change to introduce spacing tokens to design system components.
|
|
83
|
+
- [#26303](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/26303) [`9827dcb82b8`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9827dcb82b8) - No-op change to introduce spacing tokens to design system components.
|
|
77
84
|
|
|
78
85
|
## 0.3.2
|
|
79
86
|
|
|
80
87
|
### Patch Changes
|
|
81
88
|
|
|
82
|
-
- [`d4be43fdc44`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d4be43fdc44) - Set the innerText in our hack correctly - oops!
|
|
89
|
+
- [#24660](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/24660) [`d4be43fdc44`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d4be43fdc44) - Set the innerText in our hack correctly - oops!
|
|
83
90
|
|
|
84
91
|
## 0.3.1
|
|
85
92
|
|
|
86
93
|
### Patch Changes
|
|
87
94
|
|
|
88
|
-
- [`6dd7050ad7a`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6dd7050ad7a) - Reimplement the style tag hack required for enabling split & stack view in the Storybook addon
|
|
95
|
+
- [#24626](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/24626) [`6dd7050ad7a`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6dd7050ad7a) - Reimplement the style tag hack required for enabling split & stack view in the Storybook addon
|
|
89
96
|
|
|
90
97
|
## 0.3.0
|
|
91
98
|
|
|
92
99
|
### Minor Changes
|
|
93
100
|
|
|
94
|
-
- [`6c65a3147c1`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6c65a3147c1) - Removes root selector hack from lightmode, this is no longer necessary since the default theme no longer enables tokens by default
|
|
101
|
+
- [#21484](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/21484) [`6c65a3147c1`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6c65a3147c1) - Removes root selector hack from lightmode, this is no longer necessary since the default theme no longer enables tokens by default
|
|
95
102
|
|
|
96
103
|
### Patch Changes
|
|
97
104
|
|
|
@@ -101,7 +108,7 @@
|
|
|
101
108
|
|
|
102
109
|
### Patch Changes
|
|
103
110
|
|
|
104
|
-
- [`4942487a9f6`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4942487a9f6) - Fixes internal representation of CSS entrypoints for themes. This is an internal change only and does not effect public APIs.
|
|
111
|
+
- [#21487](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/21487) [`4942487a9f6`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4942487a9f6) - Fixes internal representation of CSS entrypoints for themes. This is an internal change only and does not effect public APIs.
|
|
105
112
|
|
|
106
113
|
## 0.2.5
|
|
107
114
|
|
|
@@ -137,16 +144,16 @@
|
|
|
137
144
|
|
|
138
145
|
### Minor Changes
|
|
139
146
|
|
|
140
|
-
- [`068c9a0b770`](https://bitbucket.org/atlassian/atlassian-frontend/commits/068c9a0b770) - Refactors the storybook addon into a "tool addon"
|
|
147
|
+
- [#18080](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/18080) [`068c9a0b770`](https://bitbucket.org/atlassian/atlassian-frontend/commits/068c9a0b770) - Refactors the storybook addon into a "tool addon"
|
|
141
148
|
|
|
142
149
|
## 0.1.1
|
|
143
150
|
|
|
144
151
|
### Patch Changes
|
|
145
152
|
|
|
146
|
-
- [`32f8832d6c5`](https://bitbucket.org/atlassian/atlassian-frontend/commits/32f8832d6c5) - Temporarily disable css imports to side-step recent changes to the monorepo which trigged a bug
|
|
153
|
+
- [#18020](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/18020) [`32f8832d6c5`](https://bitbucket.org/atlassian/atlassian-frontend/commits/32f8832d6c5) - Temporarily disable css imports to side-step recent changes to the monorepo which trigged a bug
|
|
147
154
|
|
|
148
155
|
## 0.1.0
|
|
149
156
|
|
|
150
157
|
### Minor Changes
|
|
151
158
|
|
|
152
|
-
- [`ddbec37a16c`](https://bitbucket.org/atlassian/atlassian-frontend/commits/ddbec37a16c) - Initial release of the design system storybook addon package. Intended to be a generic package for all storybook releated DS tooling
|
|
159
|
+
- [#17460](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/17460) [`ddbec37a16c`](https://bitbucket.org/atlassian/atlassian-frontend/commits/ddbec37a16c) - Initial release of the design system storybook addon package. Intended to be a generic package for all storybook releated DS tooling
|
|
Binary file
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
After installing the package, register the addon with your Storybook configuration in the `.storybook/main.js` file.
|
|
2
|
+
|
|
3
|
+
```diff
|
|
4
|
+
module.exports = {
|
|
5
|
+
addons: [
|
|
6
|
+
+ '@atlaskit/storybook-addon-design-system'
|
|
7
|
+
]
|
|
8
|
+
};
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Storybook v6 and below
|
|
12
|
+
|
|
13
|
+
Add the decorator to `.storybook/preview.js`, which is responsible for applying the logic which has the ability to modify the DOM of your stories.
|
|
14
|
+
|
|
15
|
+
```diff
|
|
16
|
+
+ import { withDesignTokens } from '@atlaskit/storybook-addon-design-system';
|
|
17
|
+
|
|
18
|
+
const { addDecorator } = require('@storybook/react');
|
|
19
|
+
|
|
20
|
+
+ addDecorator(withDesignTokens);
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Storybook v7 and above
|
|
24
|
+
|
|
25
|
+
For Storybook version 7, the following changes are necessary:
|
|
26
|
+
|
|
27
|
+
1. Initialising the `globalTypes.adsTheme` property in the global context
|
|
28
|
+
2. Disable the [built in `backgrounds` add on](https://storybook.js.org/docs/essentials/backgrounds#disable-backgrounds), as it conflicts with the ADS theming
|
|
29
|
+
|
|
30
|
+
Both of these can be done in [the `preview` file](https://storybook.js.org/docs/configure#configure-story-rendering):
|
|
31
|
+
|
|
32
|
+
```diff
|
|
33
|
+
+ import { withDesignTokens } from '@atlaskit/storybook-addon-design-system';
|
|
34
|
+
|
|
35
|
+
const preview = {
|
|
36
|
+
globalTypes: {
|
|
37
|
+
+ adsTheme: {
|
|
38
|
+
+ description: 'Atlassian Design System theming options',
|
|
39
|
+
+ defaultValue: 'light',
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
decorators: [
|
|
43
|
+
+ withDesignTokens
|
|
44
|
+
],
|
|
45
|
+
parameters: {
|
|
46
|
+
+ /**
|
|
47
|
+
+ * Disabling the builtin backgrounds addon so it doesn't override the ADS theming
|
|
48
|
+
+ * See: https://storybook.js.org/docs/essentials/backgrounds#disable-backgrounds
|
|
49
|
+
+ */
|
|
50
|
+
+ backgrounds: { disable: true },
|
|
51
|
+
},
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export default preview;
|
|
55
|
+
```
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
---
|
|
2
|
-
order:
|
|
2
|
+
order: 0
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
The Design System Storybook Addon allows you to test your UI components in various themes, directly in Storybook.
|
|
6
|
+
It allows you to visualize and compare component appearances across different themes, ensuring correct and consistent design token application.
|
|
7
|
+
|
|
8
|
+

|
|
9
|
+
|
|
10
|
+
## Features
|
|
11
|
+
|
|
12
|
+
- **Theme Testing:** Test UI components in multiple themes to ensure they look good across various styles and branding choices.
|
|
13
|
+
- **Split View:** The split view functionality allows you compare components side-by-side in different themes.
|
|
@@ -101,5 +101,4 @@ var Tool = function Tool() {
|
|
|
101
101
|
})) === null || _themeOptions$find === void 0 ? void 0 : _themeOptions$find.icon) || 'circlehollow'
|
|
102
102
|
}), '\xa0ADS Theme'));
|
|
103
103
|
};
|
|
104
|
-
var _default = Tool;
|
|
105
|
-
exports.default = _default;
|
|
104
|
+
var _default = exports.default = Tool;
|
|
@@ -4,13 +4,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.TOOL_ID = exports.TITLE = exports.DECORATOR_PARAM = exports.DECORATOR_ID = exports.ADDON_ID = void 0;
|
|
7
|
-
var ADDON_ID = 'ads-tokens';
|
|
8
|
-
exports.
|
|
9
|
-
var
|
|
10
|
-
exports.
|
|
11
|
-
var
|
|
12
|
-
exports.TITLE = TITLE;
|
|
13
|
-
var DECORATOR_ID = 'withDesignTokens';
|
|
14
|
-
exports.DECORATOR_ID = DECORATOR_ID;
|
|
15
|
-
var DECORATOR_PARAM = 'DesignTokens';
|
|
16
|
-
exports.DECORATOR_PARAM = DECORATOR_PARAM;
|
|
7
|
+
var ADDON_ID = exports.ADDON_ID = 'ads-tokens';
|
|
8
|
+
var TOOL_ID = exports.TOOL_ID = "".concat(ADDON_ID, "/tool");
|
|
9
|
+
var TITLE = exports.TITLE = 'Design Tokens';
|
|
10
|
+
var DECORATOR_ID = exports.DECORATOR_ID = 'withDesignTokens';
|
|
11
|
+
var DECORATOR_PARAM = exports.DECORATOR_PARAM = 'DesignTokens';
|
|
@@ -15,8 +15,8 @@ var _tokens = require("@atlaskit/tokens");
|
|
|
15
15
|
var _constants = require("./constants");
|
|
16
16
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
17
17
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
18
|
-
function ownKeys(
|
|
19
|
-
function _objectSpread(
|
|
18
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
19
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
20
20
|
var splitColumnStyles = {
|
|
21
21
|
position: 'absolute',
|
|
22
22
|
boxSizing: 'border-box',
|
|
@@ -56,7 +56,9 @@ var withDesignTokens = (0, _addons.makeDecorator)({
|
|
|
56
56
|
_context.next = 5;
|
|
57
57
|
return (0, _tokens.setGlobalTheme)({
|
|
58
58
|
colorMode: theme,
|
|
59
|
-
spacing: 'spacing'
|
|
59
|
+
spacing: 'spacing',
|
|
60
|
+
shape: 'shape',
|
|
61
|
+
typography: 'typography-minor3'
|
|
60
62
|
});
|
|
61
63
|
case 5:
|
|
62
64
|
return _context.abrupt("break", 15);
|
|
@@ -64,7 +66,9 @@ var withDesignTokens = (0, _addons.makeDecorator)({
|
|
|
64
66
|
_context.next = 8;
|
|
65
67
|
return (0, _tokens.setGlobalTheme)({
|
|
66
68
|
colorMode: 'light',
|
|
67
|
-
spacing: 'spacing'
|
|
69
|
+
spacing: 'spacing',
|
|
70
|
+
shape: 'shape',
|
|
71
|
+
typography: 'typography-minor3'
|
|
68
72
|
});
|
|
69
73
|
case 8:
|
|
70
74
|
document.documentElement.querySelectorAll('style[data-theme]').forEach(function (el) {
|
|
@@ -117,5 +121,4 @@ var withDesignTokens = (0, _addons.makeDecorator)({
|
|
|
117
121
|
return renderStory();
|
|
118
122
|
}
|
|
119
123
|
});
|
|
120
|
-
var _default = withDesignTokens;
|
|
121
|
-
exports.default = _default;
|
|
124
|
+
var _default = exports.default = withDesignTokens;
|
|
@@ -37,14 +37,18 @@ const withDesignTokens = makeDecorator({
|
|
|
37
37
|
case 'auto':
|
|
38
38
|
await setGlobalTheme({
|
|
39
39
|
colorMode: theme,
|
|
40
|
-
spacing: 'spacing'
|
|
40
|
+
spacing: 'spacing',
|
|
41
|
+
shape: 'shape',
|
|
42
|
+
typography: 'typography-minor3'
|
|
41
43
|
});
|
|
42
44
|
break;
|
|
43
45
|
case 'split':
|
|
44
46
|
case 'stack':
|
|
45
47
|
await setGlobalTheme({
|
|
46
48
|
colorMode: 'light',
|
|
47
|
-
spacing: 'spacing'
|
|
49
|
+
spacing: 'spacing',
|
|
50
|
+
shape: 'shape',
|
|
51
|
+
typography: 'typography-minor3'
|
|
48
52
|
});
|
|
49
53
|
document.documentElement.querySelectorAll('style[data-theme]').forEach(el => {
|
|
50
54
|
const clone = el.cloneNode(true);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
|
-
function ownKeys(
|
|
4
|
-
function _objectSpread(
|
|
3
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
5
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
6
6
|
import React, { Fragment } from 'react';
|
|
7
7
|
import { makeDecorator, useEffect } from '@storybook/addons';
|
|
@@ -46,7 +46,9 @@ var withDesignTokens = makeDecorator({
|
|
|
46
46
|
_context.next = 5;
|
|
47
47
|
return setGlobalTheme({
|
|
48
48
|
colorMode: theme,
|
|
49
|
-
spacing: 'spacing'
|
|
49
|
+
spacing: 'spacing',
|
|
50
|
+
shape: 'shape',
|
|
51
|
+
typography: 'typography-minor3'
|
|
50
52
|
});
|
|
51
53
|
case 5:
|
|
52
54
|
return _context.abrupt("break", 15);
|
|
@@ -54,7 +56,9 @@ var withDesignTokens = makeDecorator({
|
|
|
54
56
|
_context.next = 8;
|
|
55
57
|
return setGlobalTheme({
|
|
56
58
|
colorMode: 'light',
|
|
57
|
-
spacing: 'spacing'
|
|
59
|
+
spacing: 'spacing',
|
|
60
|
+
shape: 'shape',
|
|
61
|
+
typography: 'typography-minor3'
|
|
58
62
|
});
|
|
59
63
|
case 8:
|
|
60
64
|
document.documentElement.querySelectorAll('style[data-theme]').forEach(function (el) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/storybook-addon-design-system",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Design token storybook addon",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"publishConfig": {
|
|
@@ -8,13 +8,10 @@
|
|
|
8
8
|
},
|
|
9
9
|
"atlassian": {
|
|
10
10
|
"team": "Design System Team",
|
|
11
|
-
"releaseModel": "
|
|
11
|
+
"releaseModel": "continuous",
|
|
12
12
|
"website": {
|
|
13
13
|
"name": "Storybook addon",
|
|
14
|
-
"category": "Tooling"
|
|
15
|
-
"status": {
|
|
16
|
-
"type": "alpha"
|
|
17
|
-
}
|
|
14
|
+
"category": "Tooling"
|
|
18
15
|
}
|
|
19
16
|
},
|
|
20
17
|
"repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
|
|
@@ -36,7 +33,7 @@
|
|
|
36
33
|
".": "./src/index.tsx"
|
|
37
34
|
},
|
|
38
35
|
"dependencies": {
|
|
39
|
-
"@atlaskit/tokens": "^1.
|
|
36
|
+
"@atlaskit/tokens": "^1.38.0",
|
|
40
37
|
"@babel/runtime": "^7.0.0",
|
|
41
38
|
"@storybook/addons": "^6.4.0",
|
|
42
39
|
"@storybook/api": "^6.4.0",
|
package/dist/cjs/version.json
DELETED
package/dist/es2019/version.json
DELETED