adata-ui 0.1.4 → 0.1.8

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.
@@ -1,211 +1,211 @@
1
- import { Meta } from '@storybook/addon-docs';
2
- import Code from './assets/code-brackets.svg';
3
- import Colors from './assets/colors.svg';
4
- import Comments from './assets/comments.svg';
5
- import Direction from './assets/direction.svg';
6
- import Flow from './assets/flow.svg';
7
- import Plugin from './assets/plugin.svg';
8
- import Repo from './assets/repo.svg';
9
- import StackAlt from './assets/stackalt.svg';
10
-
11
- <Meta title="Example/Introduction" />
12
-
13
- <style>{`
14
- .subheading {
15
- --mediumdark: '#999999';
16
- font-weight: 900;
17
- font-size: 13px;
18
- color: #999;
19
- letter-spacing: 6px;
20
- line-height: 24px;
21
- text-transform: uppercase;
22
- margin-bottom: 12px;
23
- margin-top: 40px;
24
- }
25
-
26
- .link-list {
27
- display: grid;
28
- grid-template-columns: 1fr;
29
- grid-template-rows: 1fr 1fr;
30
- row-gap: 10px;
31
- }
32
-
33
- @media (min-width: 620px) {
34
- .link-list {
35
- row-gap: 20px;
36
- column-gap: 20px;
37
- grid-template-columns: 1fr 1fr;
38
- }
39
- }
40
-
41
- @media all and (-ms-high-contrast:none) {
42
- .link-list {
43
- display: -ms-grid;
44
- -ms-grid-columns: 1fr 1fr;
45
- -ms-grid-rows: 1fr 1fr;
46
- }
47
- }
48
-
49
- .link-item {
50
- display: block;
51
- padding: 20px 30px 20px 15px;
52
- border: 1px solid #00000010;
53
- border-radius: 5px;
54
- transition: background 150ms ease-out, border 150ms ease-out, transform 150ms ease-out;
55
- color: #333333;
56
- display: flex;
57
- align-items: flex-start;
58
- }
59
-
60
- .link-item:hover {
61
- border-color: #1EA7FD50;
62
- transform: translate3d(0, -3px, 0);
63
- box-shadow: rgba(0, 0, 0, 0.08) 0 3px 10px 0;
64
- }
65
-
66
- .link-item:active {
67
- border-color: #1EA7FD;
68
- transform: translate3d(0, 0, 0);
69
- }
70
-
71
- .link-item strong {
72
- font-weight: 700;
73
- display: block;
74
- margin-bottom: 2px;
75
- }
76
-
77
- .link-item img {
78
- height: 40px;
79
- width: 40px;
80
- margin-right: 15px;
81
- flex: none;
82
- }
83
-
84
- .link-item span {
85
- font-size: 14px;
86
- line-height: 20px;
87
- }
88
-
89
- .tip {
90
- display: inline-block;
91
- border-radius: 1em;
92
- font-size: 11px;
93
- line-height: 12px;
94
- font-weight: 700;
95
- background: #E7FDD8;
96
- color: #66BF3C;
97
- padding: 4px 12px;
98
- margin-right: 10px;
99
- vertical-align: top;
100
- }
101
-
102
- .tip-wrapper {
103
- font-size: 13px;
104
- line-height: 20px;
105
- margin-top: 40px;
106
- margin-bottom: 40px;
107
- }
108
-
109
- .tip-wrapper code {
110
- font-size: 12px;
111
- display: inline-block;
112
- }
113
-
114
-
115
- `}</style>
116
-
117
- # Welcome to Storybook
118
-
119
- Storybook helps you build UI components in isolation from your app's business logic, data, and context.
120
- That makes it easy to develop hard-to-reach states. Save these UI states as **stories** to revisit during development, testing, or QA.
121
-
122
- Browse example stories now by navigating to them in the sidebar.
123
- View their code in the `src/stories` directory to learn how they work.
124
- We recommend building UIs with a [**component-driven**](https://componentdriven.org) process starting with atomic components and ending with pages.
125
-
126
- <div className="subheading">Configure</div>
127
-
128
- <div className="link-list">
129
- <a
130
- className="link-item"
131
- href="https://storybook.js.org/docs/react/addons/addon-types"
132
- target="_blank"
133
- >
134
- <img src={Plugin} alt="plugin" />
135
- <span>
136
- <strong>Presets for popular tools</strong>
137
- Easy setup for TypeScript, SCSS and more.
138
- </span>
139
- </a>
140
- <a
141
- className="link-item"
142
- href="https://storybook.js.org/docs/react/configure/webpack"
143
- target="_blank"
144
- >
145
- <img src={StackAlt} alt="Build" />
146
- <span>
147
- <strong>Build configuration</strong>
148
- How to customize webpack and Babel
149
- </span>
150
- </a>
151
- <a
152
- className="link-item"
153
- href="https://storybook.js.org/docs/react/configure/styling-and-css"
154
- target="_blank"
155
- >
156
- <img src={Colors} alt="colors" />
157
- <span>
158
- <strong>Styling</strong>
159
- How to load and configure CSS libraries
160
- </span>
161
- </a>
162
- <a
163
- className="link-item"
164
- href="https://storybook.js.org/docs/react/get-started/setup#configure-storybook-for-your-stack"
165
- target="_blank"
166
- >
167
- <img src={Flow} alt="flow" />
168
- <span>
169
- <strong>Data</strong>
170
- Providers and mocking for data libraries
171
- </span>
172
- </a>
173
- </div>
174
-
175
- <div className="subheading">Learn</div>
176
-
177
- <div className="link-list">
178
- <a className="link-item" href="https://storybook.js.org/docs" target="_blank">
179
- <img src={Repo} alt="repo" />
180
- <span>
181
- <strong>Storybook documentation</strong>
182
- Configure, customize, and extend
183
- </span>
184
- </a>
185
- <a className="link-item" href="https://storybook.js.org/tutorials/" target="_blank">
186
- <img src={Direction} alt="direction" />
187
- <span>
188
- <strong>In-depth guides</strong>
189
- Best practices from leading teams
190
- </span>
191
- </a>
192
- <a className="link-item" href="https://github.com/storybookjs/storybook" target="_blank">
193
- <img src={Code} alt="code" />
194
- <span>
195
- <strong>GitHub project</strong>
196
- View the source and add issues
197
- </span>
198
- </a>
199
- <a className="link-item" href="https://discord.gg/storybook" target="_blank">
200
- <img src={Comments} alt="comments" />
201
- <span>
202
- <strong>Discord chat</strong>
203
- Chat with maintainers and the community
204
- </span>
205
- </a>
206
- </div>
207
-
208
- <div className="tip-wrapper">
209
- <span className="tip">Tip</span>Edit the Markdown in{' '}
210
- <code>src/stories/Introduction.stories.mdx</code>
211
- </div>
1
+ import { Meta } from '@storybook/addon-docs';
2
+ import Code from './assets/code-brackets.svg';
3
+ import Colors from './assets/colors.svg';
4
+ import Comments from './assets/comments.svg';
5
+ import Direction from './assets/direction.svg';
6
+ import Flow from './assets/flow.svg';
7
+ import Plugin from './assets/plugin.svg';
8
+ import Repo from './assets/repo.svg';
9
+ import StackAlt from './assets/stackalt.svg';
10
+
11
+ <Meta title="Example/Introduction" />
12
+
13
+ <style>{`
14
+ .subheading {
15
+ --mediumdark: '#999999';
16
+ font-weight: 900;
17
+ font-size: 13px;
18
+ color: #999;
19
+ letter-spacing: 6px;
20
+ line-height: 24px;
21
+ text-transform: uppercase;
22
+ margin-bottom: 12px;
23
+ margin-top: 40px;
24
+ }
25
+
26
+ .link-list {
27
+ display: grid;
28
+ grid-template-columns: 1fr;
29
+ grid-template-rows: 1fr 1fr;
30
+ row-gap: 10px;
31
+ }
32
+
33
+ @media (min-width: 620px) {
34
+ .link-list {
35
+ row-gap: 20px;
36
+ column-gap: 20px;
37
+ grid-template-columns: 1fr 1fr;
38
+ }
39
+ }
40
+
41
+ @media all and (-ms-high-contrast:none) {
42
+ .link-list {
43
+ display: -ms-grid;
44
+ -ms-grid-columns: 1fr 1fr;
45
+ -ms-grid-rows: 1fr 1fr;
46
+ }
47
+ }
48
+
49
+ .link-item {
50
+ display: block;
51
+ padding: 20px 30px 20px 15px;
52
+ border: 1px solid #00000010;
53
+ border-radius: 5px;
54
+ transition: background 150ms ease-out, border 150ms ease-out, transform 150ms ease-out;
55
+ color: #333333;
56
+ display: flex;
57
+ align-items: flex-start;
58
+ }
59
+
60
+ .link-item:hover {
61
+ border-color: #1EA7FD50;
62
+ transform: translate3d(0, -3px, 0);
63
+ box-shadow: rgba(0, 0, 0, 0.08) 0 3px 10px 0;
64
+ }
65
+
66
+ .link-item:active {
67
+ border-color: #1EA7FD;
68
+ transform: translate3d(0, 0, 0);
69
+ }
70
+
71
+ .link-item strong {
72
+ font-weight: 700;
73
+ display: block;
74
+ margin-bottom: 2px;
75
+ }
76
+
77
+ .link-item img {
78
+ height: 40px;
79
+ width: 40px;
80
+ margin-right: 15px;
81
+ flex: none;
82
+ }
83
+
84
+ .link-item span {
85
+ font-size: 14px;
86
+ line-height: 20px;
87
+ }
88
+
89
+ .tip {
90
+ display: inline-block;
91
+ border-radius: 1em;
92
+ font-size: 11px;
93
+ line-height: 12px;
94
+ font-weight: 700;
95
+ background: #E7FDD8;
96
+ color: #66BF3C;
97
+ padding: 4px 12px;
98
+ margin-right: 10px;
99
+ vertical-align: top;
100
+ }
101
+
102
+ .tip-wrapper {
103
+ font-size: 13px;
104
+ line-height: 20px;
105
+ margin-top: 40px;
106
+ margin-bottom: 40px;
107
+ }
108
+
109
+ .tip-wrapper code {
110
+ font-size: 12px;
111
+ display: inline-block;
112
+ }
113
+
114
+
115
+ `}</style>
116
+
117
+ # Welcome to Storybook
118
+
119
+ Storybook helps you build UI components in isolation from your app's business logic, data, and context.
120
+ That makes it easy to develop hard-to-reach states. Save these UI states as **stories** to revisit during development, testing, or QA.
121
+
122
+ Browse example stories now by navigating to them in the sidebar.
123
+ View their code in the `src/stories` directory to learn how they work.
124
+ We recommend building UIs with a [**component-driven**](https://componentdriven.org) process starting with atomic components and ending with pages.
125
+
126
+ <div className="subheading">Configure</div>
127
+
128
+ <div className="link-list">
129
+ <a
130
+ className="link-item"
131
+ href="https://storybook.js.org/docs/react/addons/addon-types"
132
+ target="_blank"
133
+ >
134
+ <img src={Plugin} alt="plugin" />
135
+ <span>
136
+ <strong>Presets for popular tools</strong>
137
+ Easy setup for TypeScript, SCSS and more.
138
+ </span>
139
+ </a>
140
+ <a
141
+ className="link-item"
142
+ href="https://storybook.js.org/docs/react/configure/webpack"
143
+ target="_blank"
144
+ >
145
+ <img src={StackAlt} alt="Build" />
146
+ <span>
147
+ <strong>Build configuration</strong>
148
+ How to customize webpack and Babel
149
+ </span>
150
+ </a>
151
+ <a
152
+ className="link-item"
153
+ href="https://storybook.js.org/docs/react/configure/styling-and-css"
154
+ target="_blank"
155
+ >
156
+ <img src={Colors} alt="colors" />
157
+ <span>
158
+ <strong>Styling</strong>
159
+ How to load and configure CSS libraries
160
+ </span>
161
+ </a>
162
+ <a
163
+ className="link-item"
164
+ href="https://storybook.js.org/docs/react/get-started/setup#configure-storybook-for-your-stack"
165
+ target="_blank"
166
+ >
167
+ <img src={Flow} alt="flow" />
168
+ <span>
169
+ <strong>Data</strong>
170
+ Providers and mocking for data libraries
171
+ </span>
172
+ </a>
173
+ </div>
174
+
175
+ <div className="subheading">Learn</div>
176
+
177
+ <div className="link-list">
178
+ <a className="link-item" href="https://storybook.js.org/docs" target="_blank">
179
+ <img src={Repo} alt="repo" />
180
+ <span>
181
+ <strong>Storybook documentation</strong>
182
+ Configure, customize, and extend
183
+ </span>
184
+ </a>
185
+ <a className="link-item" href="https://storybook.js.org/tutorials/" target="_blank">
186
+ <img src={Direction} alt="direction" />
187
+ <span>
188
+ <strong>In-depth guides</strong>
189
+ Best practices from leading teams
190
+ </span>
191
+ </a>
192
+ <a className="link-item" href="https://github.com/storybookjs/storybook" target="_blank">
193
+ <img src={Code} alt="code" />
194
+ <span>
195
+ <strong>GitHub project</strong>
196
+ View the source and add issues
197
+ </span>
198
+ </a>
199
+ <a className="link-item" href="https://discord.gg/storybook" target="_blank">
200
+ <img src={Comments} alt="comments" />
201
+ <span>
202
+ <strong>Discord chat</strong>
203
+ Chat with maintainers and the community
204
+ </span>
205
+ </a>
206
+ </div>
207
+
208
+ <div className="tip-wrapper">
209
+ <span className="tip">Tip</span>Edit the Markdown in{' '}
210
+ <code>src/stories/Introduction.stories.mdx</code>
211
+ </div>
@@ -1,25 +1,25 @@
1
- import MyPage from './Page';
2
- import * as HeaderStories from './Header.stories';
3
-
4
- export default {
5
- title: 'Example/Page',
6
- component: MyPage,
7
- };
8
-
9
- const Template = (args, { argTypes }) => ({
10
- props: Object.keys(argTypes),
11
- components: { MyPage },
12
- template:
13
- '<my-page :user="user" @onLogin="onLogin" @onLogout="onLogout" @onCreateAccount="onCreateAccount" />',
14
- });
15
-
16
- export const LoggedIn = Template.bind({});
17
- LoggedIn.args = {
18
- // More on composing args: https://storybook.js.org/docs/vue/writing-stories/args#args-composition
19
- ...HeaderStories.LoggedIn.args,
20
- };
21
-
22
- export const LoggedOut = Template.bind({});
23
- LoggedOut.args = {
24
- ...HeaderStories.LoggedOut.args,
25
- };
1
+ import MyPage from './Page';
2
+ import * as HeaderStories from './Header.stories';
3
+
4
+ export default {
5
+ title: 'Example/Page',
6
+ component: MyPage,
7
+ };
8
+
9
+ const Template = (args, { argTypes }) => ({
10
+ props: Object.keys(argTypes),
11
+ components: { MyPage },
12
+ template:
13
+ '<my-page :user="user" @onLogin="onLogin" @onLogout="onLogout" @onCreateAccount="onCreateAccount" />',
14
+ });
15
+
16
+ export const LoggedIn = Template.bind({});
17
+ LoggedIn.args = {
18
+ // More on composing args: https://storybook.js.org/docs/vue/writing-stories/args#args-composition
19
+ ...HeaderStories.LoggedIn.args,
20
+ };
21
+
22
+ export const LoggedOut = Template.bind({});
23
+ LoggedOut.args = {
24
+ ...HeaderStories.LoggedOut.args,
25
+ };
@@ -1,88 +1,88 @@
1
- <template>
2
- <article>
3
- <my-header
4
- :user="user"
5
- @onLogin="onLogin"
6
- @onLogout="onLogout"
7
- @onCreateAccount="onCreateAccount"
8
- />
9
-
10
- <section>
11
- <h2>Pages in Storybook</h2>
12
- <p>
13
- We recommend building UIs with a
14
- <a href="https://componentdriven.org" target="_blank" rel="noopener noreferrer">
15
- <strong>component-driven</strong>
16
- </a>
17
- process starting with atomic components and ending with pages.
18
- </p>
19
- <p>
20
- Render pages with mock data. This makes it easy to build and review page states without
21
- needing to navigate to them in your app. Here are some handy patterns for managing page data
22
- in Storybook:
23
- </p>
24
- <ul>
25
- <li>
26
- Use a higher-level connected component. Storybook helps you compose such data from the
27
- "args" of child component stories
28
- </li>
29
- <li>
30
- Assemble data in the page component from your services. You can mock these services out
31
- using Storybook.
32
- </li>
33
- </ul>
34
- <p>
35
- Get a guided tutorial on component-driven development at
36
- <a href="https://storybook.js.org/tutorials/" target="_blank" rel="noopener noreferrer"
37
- >Storybook tutorials</a
38
- >
39
- . Read more in the
40
- <a href="https://storybook.js.org/docs" target="_blank" rel="noopener noreferrer">docs</a>
41
- .
42
- </p>
43
- <div class="tip-wrapper">
44
- <span class="tip">Tip</span>
45
- Adjust the width of the canvas with the
46
- <svg width="10" height="10" viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg">
47
- <g fill="none" fill-rule="evenodd">
48
- <path
49
- d="M1.5 5.2h4.8c.3 0 .5.2.5.4v5.1c-.1.2-.3.3-.4.3H1.4a.5.5 0 01-.5-.4V5.7c0-.3.2-.5.5-.5zm0-2.1h6.9c.3 0 .5.2.5.4v7a.5.5 0 01-1 0V4H1.5a.5.5 0 010-1zm0-2.1h9c.3 0 .5.2.5.4v9.1a.5.5 0 01-1 0V2H1.5a.5.5 0 010-1zm4.3 5.2H2V10h3.8V6.2z"
50
- id="a"
51
- fill="#999"
52
- />
53
- </g>
54
- </svg>
55
- Viewports addon in the toolbar
56
- </div>
57
- </section>
58
- </article>
59
- </template>
60
-
61
- <script>
62
- import './page.css';
63
- import MyHeader from './Header.vue';
64
-
65
- export default {
66
- name: 'my-page',
67
-
68
- components: { MyHeader },
69
-
70
- props: {
71
- user: {
72
- type: Object,
73
- },
74
- },
75
-
76
- methods: {
77
- onLogin() {
78
- this.$emit('onLogin');
79
- },
80
- onLogout() {
81
- this.$emit('onLogout');
82
- },
83
- onCreateAccount() {
84
- this.$emit('onCreateAccount');
85
- },
86
- },
87
- };
88
- </script>
1
+ <template>
2
+ <article>
3
+ <my-header
4
+ :user="user"
5
+ @onLogin="onLogin"
6
+ @onLogout="onLogout"
7
+ @onCreateAccount="onCreateAccount"
8
+ />
9
+
10
+ <section>
11
+ <h2>Pages in Storybook</h2>
12
+ <p>
13
+ We recommend building UIs with a
14
+ <a href="https://componentdriven.org" target="_blank" rel="noopener noreferrer">
15
+ <strong>component-driven</strong>
16
+ </a>
17
+ process starting with atomic components and ending with pages.
18
+ </p>
19
+ <p>
20
+ Render pages with mock data. This makes it easy to build and review page states without
21
+ needing to navigate to them in your app. Here are some handy patterns for managing page data
22
+ in Storybook:
23
+ </p>
24
+ <ul>
25
+ <li>
26
+ Use a higher-level connected component. Storybook helps you compose such data from the
27
+ "args" of child component stories
28
+ </li>
29
+ <li>
30
+ Assemble data in the page component from your services. You can mock these services out
31
+ using Storybook.
32
+ </li>
33
+ </ul>
34
+ <p>
35
+ Get a guided tutorial on component-driven development at
36
+ <a href="https://storybook.js.org/tutorials/" target="_blank" rel="noopener noreferrer"
37
+ >Storybook tutorials</a
38
+ >
39
+ . Read more in the
40
+ <a href="https://storybook.js.org/docs" target="_blank" rel="noopener noreferrer">docs</a>
41
+ .
42
+ </p>
43
+ <div class="tip-wrapper">
44
+ <span class="tip">Tip</span>
45
+ Adjust the width of the canvas with the
46
+ <svg width="10" height="10" viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg">
47
+ <g fill="none" fill-rule="evenodd">
48
+ <path
49
+ d="M1.5 5.2h4.8c.3 0 .5.2.5.4v5.1c-.1.2-.3.3-.4.3H1.4a.5.5 0 01-.5-.4V5.7c0-.3.2-.5.5-.5zm0-2.1h6.9c.3 0 .5.2.5.4v7a.5.5 0 01-1 0V4H1.5a.5.5 0 010-1zm0-2.1h9c.3 0 .5.2.5.4v9.1a.5.5 0 01-1 0V2H1.5a.5.5 0 010-1zm4.3 5.2H2V10h3.8V6.2z"
50
+ id="a"
51
+ fill="#999"
52
+ />
53
+ </g>
54
+ </svg>
55
+ Viewports addon in the toolbar
56
+ </div>
57
+ </section>
58
+ </article>
59
+ </template>
60
+
61
+ <script>
62
+ import './page.css';
63
+ import MyHeader from './Header.vue';
64
+
65
+ export default {
66
+ name: 'my-page',
67
+
68
+ components: { MyHeader },
69
+
70
+ props: {
71
+ user: {
72
+ type: Object,
73
+ },
74
+ },
75
+
76
+ methods: {
77
+ onLogin() {
78
+ this.$emit('onLogin');
79
+ },
80
+ onLogout() {
81
+ this.$emit('onLogout');
82
+ },
83
+ onCreateAccount() {
84
+ this.$emit('onCreateAccount');
85
+ },
86
+ },
87
+ };
88
+ </script>