@repobit/dex-system-design 0.2.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 +11 -0
- package/README.md +15 -0
- package/package.json +57 -0
- package/src/assets/fonts/IBMPlexMono-Bold.woff2 +0 -0
- package/src/assets/fonts/IBMPlexMono-BoldItalic.woff2 +0 -0
- package/src/assets/fonts/IBMPlexMono-Italic.woff2 +0 -0
- package/src/assets/fonts/IBMPlexMono-Light.woff2 +0 -0
- package/src/assets/fonts/IBMPlexMono-LightItalic.woff2 +0 -0
- package/src/assets/fonts/IBMPlexMono-Medium.woff2 +0 -0
- package/src/assets/fonts/IBMPlexMono-MediumItalic.woff2 +0 -0
- package/src/assets/fonts/IBMPlexMono-Regular.woff2 +0 -0
- package/src/assets/fonts/IBMPlexMono-SemiBold.woff2 +0 -0
- package/src/assets/fonts/IBMPlexMono-SemiBoldItalic.woff2 +0 -0
- package/src/assets/fonts/IBMPlexSans-Bold.woff2 +0 -0
- package/src/assets/fonts/IBMPlexSans-BoldItalic.woff2 +0 -0
- package/src/assets/fonts/IBMPlexSans-Italic.woff2 +0 -0
- package/src/assets/fonts/IBMPlexSans-Light.woff2 +0 -0
- package/src/assets/fonts/IBMPlexSans-LightItalic.woff2 +0 -0
- package/src/assets/fonts/IBMPlexSans-Medium.woff2 +0 -0
- package/src/assets/fonts/IBMPlexSans-MediumItalic.woff2 +0 -0
- package/src/assets/fonts/IBMPlexSans-Regular.woff2 +0 -0
- package/src/assets/fonts/IBMPlexSans-SemiBold.woff2 +0 -0
- package/src/assets/fonts/IBMPlexSans-SemiBoldItalic.woff2 +0 -0
- package/src/assets/fonts/bd-ibm-plex-mono.zip +0 -0
- package/src/assets/fonts/bd-ibm-plex-sans.zip +0 -0
- package/src/assets/icons/badge-icon-individual.png +0 -0
- package/src/assets/icons/bd-icon-family-white.png +0 -0
- package/src/assets/icons/bd-icon-family.png +0 -0
- package/src/assets/icons/bd-icon-user.png +0 -0
- package/src/assets/icons/left_clicked.png +0 -0
- package/src/assets/icons/left_disabled.png +0 -0
- package/src/assets/icons/left_hover.png +0 -0
- package/src/assets/icons/left_normal.png +0 -0
- package/src/assets/icons/light-carousel-img1.png +0 -0
- package/src/assets/icons/light-carousel-img2.png +0 -0
- package/src/assets/icons/light-carousel-img3.png +0 -0
- package/src/assets/icons/more_hover.png +0 -0
- package/src/assets/icons/more_normal.png +0 -0
- package/src/assets/icons/more_pressed.png +0 -0
- package/src/assets/icons/pic1.png +0 -0
- package/src/assets/icons/pic2.png +0 -0
- package/src/assets/icons/pic3.png +0 -0
- package/src/assets/icons/right_clicked.png +0 -0
- package/src/assets/icons/right_disabled.png +0 -0
- package/src/assets/icons/right_hover.png +0 -0
- package/src/assets/icons/right_normal.png +0 -0
- package/src/assets/icons/tabs-img1.png +0 -0
- package/src/assets/icons/tabs-img2.png +0 -0
- package/src/assets/icons/tabs-img3.png +0 -0
- package/src/assets/icons/verified_arrow.png +0 -0
- package/src/components/Button/Button.js +120 -0
- package/src/components/Button/button.css.js +137 -0
- package/src/components/Button/button.stories.js +56 -0
- package/src/components/Button/icons.css +5 -0
- package/src/components/Button/icons.js +24 -0
- package/src/components/Button/index.js +0 -0
- package/src/components/FAQ/faq.css.js +107 -0
- package/src/components/FAQ/faq.js +176 -0
- package/src/components/FAQ/faq.stories.js +45 -0
- package/src/components/Input/Input.js +27 -0
- package/src/components/Input/index.js +0 -0
- package/src/components/Input/input.css.js +68 -0
- package/src/components/carousel/carousel.css.js +304 -0
- package/src/components/carousel/carousel.js +226 -0
- package/src/components/carousel/carousel.stories.js +73 -0
- package/src/components/light-carousel/light-carousel.css.js +149 -0
- package/src/components/light-carousel/light-carousel.js +108 -0
- package/src/components/light-carousel/light-carousel.stories.js +43 -0
- package/src/components/paragraph/paragraph.css.js +16 -0
- package/src/components/paragraph/paragraph.js +59 -0
- package/src/components/pricing-cards/pricing-card.css.js +409 -0
- package/src/components/pricing-cards/pricing-card.js +764 -0
- package/src/components/pricing-cards/pricing-card.stories.js +12 -0
- package/src/components/tabs/tabs.css.js +239 -0
- package/src/components/tabs/tabs.js +183 -0
- package/src/components/tabs/tabs.stories.js +18 -0
- package/src/components/termsOfUse/terms.css.js +38 -0
- package/src/components/termsOfUse/terms.js +226 -0
- package/src/components/termsOfUse/terms.stories.js +14 -0
- package/src/index.js +0 -0
- package/src/stories/Button.js +20 -0
- package/src/stories/Button.stories.js +46 -0
- package/src/stories/Configure.mdx +364 -0
- package/src/stories/Header.js +45 -0
- package/src/stories/Header.stories.js +24 -0
- package/src/stories/Page.js +62 -0
- package/src/stories/Page.stories.js +20 -0
- package/src/stories/assets/accessibility.png +0 -0
- package/src/stories/assets/accessibility.svg +1 -0
- package/src/stories/assets/addon-library.png +0 -0
- package/src/stories/assets/assets.png +0 -0
- package/src/stories/assets/avif-test-image.avif +0 -0
- package/src/stories/assets/context.png +0 -0
- package/src/stories/assets/discord.svg +1 -0
- package/src/stories/assets/docs.png +0 -0
- package/src/stories/assets/figma-plugin.png +0 -0
- package/src/stories/assets/github.svg +1 -0
- package/src/stories/assets/share.png +0 -0
- package/src/stories/assets/styling.png +0 -0
- package/src/stories/assets/testing.png +0 -0
- package/src/stories/assets/theming.png +0 -0
- package/src/stories/assets/tutorials.svg +1 -0
- package/src/stories/assets/youtube.svg +1 -0
- package/src/stories/button.css +30 -0
- package/src/stories/header.css +32 -0
- package/src/stories/page.css +68 -0
- package/src/tokens/colors.js +121 -0
- package/src/tokens/layout.css +46 -0
- package/src/tokens/tokens.css +297 -0
- package/src/tokens/typography.css.js +207 -0
- package/src/tokens/typography.js +0 -0
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
import { LitElement, html, css } from "lit";
|
|
2
|
+
import { unsafeHTML } from "lit-html/directives/unsafe-html.js";
|
|
3
|
+
|
|
4
|
+
import termsCSS from "../termsOfUse/terms.css.js";
|
|
5
|
+
|
|
6
|
+
class TermsSection extends LitElement {
|
|
7
|
+
static properties = {
|
|
8
|
+
faqs: { type: Array },
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
constructor() {
|
|
12
|
+
super();
|
|
13
|
+
this.faqs = [
|
|
14
|
+
{
|
|
15
|
+
question: "Auto renewal terms",
|
|
16
|
+
answer: `
|
|
17
|
+
<p>
|
|
18
|
+
<ul>
|
|
19
|
+
<li>Your subscription automatically begins at the purchase date;</li>
|
|
20
|
+
<li>By subscribing, you are purchasing a recurring subscription which will automatically renew;</li>
|
|
21
|
+
<li>The Bitdefender Auto Renewal Plan is designed to save you time, effort, and minimize your vulnerability risk by extending your subscription automatically before you run out of protection.</li>
|
|
22
|
+
</ul>
|
|
23
|
+
</p> `,
|
|
24
|
+
open: false,
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
question:
|
|
28
|
+
"Here is what the Bitdefender Auto Renewal Plan means for you",
|
|
29
|
+
answer: `
|
|
30
|
+
<p>
|
|
31
|
+
<ul>
|
|
32
|
+
<li>Continuous protection so that you never have to worry about your subscription running out before you renew manually;</li>
|
|
33
|
+
<li>Free upgrades whenever a new version of Bitdefender comes out;</li>
|
|
34
|
+
<li>Peace of mind that your devices are always protected;</li>
|
|
35
|
+
<li>Save time while we are taking care of the automatic renewal process;</li>
|
|
36
|
+
<li>Opt out at any time so that you are always in control of your renewal options;</li>
|
|
37
|
+
<li>24/7 security all-subscription long without interruption;</li>
|
|
38
|
+
<li>The price offered is valid for the first year of subscription. After that, your subscription will be billed at the applicable renewal price;</li>
|
|
39
|
+
<li>If a discount is presented, it describes the difference between the first term and renewal term subscription prices (e.g., first year price vs. each year thereafter). The prices are subject to change, but Bitdefender will send a prior notification by email, before the automatic renewal takes place. You will receive an email notification before you will be billed, along with information regarding pricing and the extension of your subscription duration.</li>
|
|
40
|
+
</ul>
|
|
41
|
+
</p> `,
|
|
42
|
+
open: false,
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
question: "Affirmative consent",
|
|
46
|
+
answer: `
|
|
47
|
+
<p>
|
|
48
|
+
<ul>
|
|
49
|
+
<li>Your subscription automatically begins at the purchase date;</li>
|
|
50
|
+
<li>By subscribing, you are purchasing a recurring subscription which will automatically renew.</li>
|
|
51
|
+
</ul>
|
|
52
|
+
</p> `,
|
|
53
|
+
open: false,
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
question: "How to cancel + email address cancelation support",
|
|
57
|
+
answer: `
|
|
58
|
+
<p>
|
|
59
|
+
<ul>
|
|
60
|
+
<li>You can cancel your automatically subscription from Bitdefender Central or by contacting Customer Support at: <a href="mailto:cancel@bitdefender.com" title="cancel@bitdefender.com">cancel@bitdefender.com</a></li>
|
|
61
|
+
<li>You can refund by contacting <a href="mailto:refunds@bitdefender.com" title="refunds@bitdefender.com">refunds@bitdefender.com</a> within 30 days of your initial purchase or of the automatic renewal date.</li>
|
|
62
|
+
</ul>
|
|
63
|
+
</p> `,
|
|
64
|
+
open: false,
|
|
65
|
+
},
|
|
66
|
+
];
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
toggleItem(index) {
|
|
70
|
+
this.faqs = this.faqs.map((faq, i) => {
|
|
71
|
+
if (i === index) {
|
|
72
|
+
return { ...faq, open: !faq.open };
|
|
73
|
+
}
|
|
74
|
+
return faq;
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
render() {
|
|
79
|
+
return html`
|
|
80
|
+
<div
|
|
81
|
+
class="bd-section bd-terms_section bd-terms-container"
|
|
82
|
+
data-section-status="loaded"
|
|
83
|
+
id="bd-tos"
|
|
84
|
+
style=""
|
|
85
|
+
>
|
|
86
|
+
<div class="bd-terms-wrapper">
|
|
87
|
+
<div
|
|
88
|
+
class="bd-terms bd-block"
|
|
89
|
+
data-block-name="bd-terms"
|
|
90
|
+
data-block-status="loaded"
|
|
91
|
+
>
|
|
92
|
+
<div>
|
|
93
|
+
<div>
|
|
94
|
+
<h5 id="bd-terms-of-use">Terms of use</h5>
|
|
95
|
+
</div>
|
|
96
|
+
</div>
|
|
97
|
+
<div>
|
|
98
|
+
<div>
|
|
99
|
+
<p class="bd-terms-text-p"><strong>Auto renewal terms</strong></p>
|
|
100
|
+
<p class="bd-terms-text-p">
|
|
101
|
+
Your subscription automatically begins at the purchase date;
|
|
102
|
+
</p>
|
|
103
|
+
<p class="bd-terms-text-p">
|
|
104
|
+
By subscribing, you are purchasing a recurring subscription
|
|
105
|
+
which will automatically renew;
|
|
106
|
+
</p>
|
|
107
|
+
<p class="bd-terms-text-p">
|
|
108
|
+
The Bitdefender Auto Renewal Plan is designed to save you
|
|
109
|
+
time, effort, and minimize your vulnerability risk by
|
|
110
|
+
extending your subscription automatically before you run out
|
|
111
|
+
of protection.
|
|
112
|
+
</p>
|
|
113
|
+
</div>
|
|
114
|
+
</div>
|
|
115
|
+
<div>
|
|
116
|
+
<div>
|
|
117
|
+
<p class="bd-terms-text-p">
|
|
118
|
+
<strong
|
|
119
|
+
>Here is what the Bitdefender Auto Renewal Plan means for
|
|
120
|
+
you</strong
|
|
121
|
+
>
|
|
122
|
+
</p>
|
|
123
|
+
<p class="bd-terms-text-p">
|
|
124
|
+
Continuous protection so that you never have to worry about
|
|
125
|
+
your subscription running out before you renew manually;
|
|
126
|
+
</p>
|
|
127
|
+
<p class="bd-terms-text-p">
|
|
128
|
+
Free upgrades whenever a new version of Bitdefender comes out;
|
|
129
|
+
</p>
|
|
130
|
+
<p class="bd-terms-text-p">Peace of mind that your devices are always protected;</p>
|
|
131
|
+
<p class="bd-terms-text-p">
|
|
132
|
+
Save time while we are taking care of the automatic renewal
|
|
133
|
+
process;
|
|
134
|
+
</p>
|
|
135
|
+
<p class="bd-terms-text-p">
|
|
136
|
+
Opt out at any time so that you are always in control of your
|
|
137
|
+
renewal options;
|
|
138
|
+
</p>
|
|
139
|
+
<p class="bd-terms-text-p">24/7 security all-subscription long without interruption;</p>
|
|
140
|
+
<p class="bd-terms-text-p">
|
|
141
|
+
The prices are subject to change, but Bitdefender will send a
|
|
142
|
+
prior notification by email, before the automatic renewal
|
|
143
|
+
takes place. You will receive an email notification before you
|
|
144
|
+
will be billed, along with information regarding pricing and
|
|
145
|
+
the extension of your subscription duration.
|
|
146
|
+
</p>
|
|
147
|
+
</div>
|
|
148
|
+
</div>
|
|
149
|
+
<div>
|
|
150
|
+
<div>
|
|
151
|
+
<p class="bd-terms-text-p"><strong>Affirmative consent</strong></p>
|
|
152
|
+
<p class="bd-terms-text-p">
|
|
153
|
+
Your subscription automatically begins at the purchase
|
|
154
|
+
date;<br />
|
|
155
|
+
By subscribing, you are purchasing a recurring subscription
|
|
156
|
+
which will automatically renew.
|
|
157
|
+
</p>
|
|
158
|
+
</div>
|
|
159
|
+
</div>
|
|
160
|
+
<div>
|
|
161
|
+
<div>
|
|
162
|
+
<p class="bd-terms-text-p">
|
|
163
|
+
<strong
|
|
164
|
+
>How to cancel + email address cancelation support</strong
|
|
165
|
+
>
|
|
166
|
+
</p>
|
|
167
|
+
<p class="bd-terms-text-p">
|
|
168
|
+
You can cancel your automatically subscription from
|
|
169
|
+
Bitdefender Central or by contacting Customer Support at:
|
|
170
|
+
<a class="bd-terms-text-a"
|
|
171
|
+
href="mailto:cancel@bitdefender.com"
|
|
172
|
+
title="cancel@bitdefender.com"
|
|
173
|
+
>cancel@bitdefender.com</a
|
|
174
|
+
><br />
|
|
175
|
+
You can refund by contacting
|
|
176
|
+
<a class="bd-terms-text-a"
|
|
177
|
+
href="mailto:refunds@bitdefender.com"
|
|
178
|
+
title="refunds@bitdefender.com"
|
|
179
|
+
>refunds@bitdefender.com</a
|
|
180
|
+
>
|
|
181
|
+
within 30 days of your initial purchase or of the automatic
|
|
182
|
+
renewal date.
|
|
183
|
+
</p>
|
|
184
|
+
</div>
|
|
185
|
+
</div>
|
|
186
|
+
<div>
|
|
187
|
+
<div class="bd-terms-text-p">
|
|
188
|
+
Your subscription may include product, service and/or protection
|
|
189
|
+
updates and features that may be added, modified or removed
|
|
190
|
+
subject to
|
|
191
|
+
<a class="bd-terms-text-a"
|
|
192
|
+
href="https://www.bitdefender.com/legal/?adobe_mc=MCMID%3D63411747395182077784244429321314993670%7CMCORGID%3D0E920C0F53DA9E9B0A490D45%2540AdobeOrg%7CTS%3D1739263766"
|
|
193
|
+
title="Bitdefender Subscription Agreement and Terms and Conditions for Home Users"
|
|
194
|
+
>Bitdefender Subscription Agreement and Terms and Conditions
|
|
195
|
+
for Home Users</a
|
|
196
|
+
>
|
|
197
|
+
and
|
|
198
|
+
<a class="bd-terms-text-a"
|
|
199
|
+
href="https://www.bitdefender.com/site/view/legal-privacy-policy-for-home-users-solutions.html?adobe_mc=MCMID%3D63411747395182077784244429321314993670%7CMCORGID%3D0E920C0F53DA9E9B0A490D45%2540AdobeOrg%7CTS%3D1739263766"
|
|
200
|
+
title="Privacy Notice"
|
|
201
|
+
>Privacy Notice</a
|
|
202
|
+
>.
|
|
203
|
+
</div>
|
|
204
|
+
</div>
|
|
205
|
+
<div>
|
|
206
|
+
<div class="bd-terms-text-p">
|
|
207
|
+
By using the subscription, You acknowledge and agree that your
|
|
208
|
+
use of the product which integrates with YouTube API Services is
|
|
209
|
+
subject to
|
|
210
|
+
<a class="bd-terms-text-a"
|
|
211
|
+
href="https://www.youtube.com/static?template=terms"
|
|
212
|
+
title="YouTube’s Terms of Service"
|
|
213
|
+
>YouTube’s Terms of Service</a
|
|
214
|
+
>.
|
|
215
|
+
</div>
|
|
216
|
+
</div>
|
|
217
|
+
</div>
|
|
218
|
+
</div>
|
|
219
|
+
</div>
|
|
220
|
+
`;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
TermsSection.styles = [termsCSS];
|
|
226
|
+
customElements.define("bd-terms-section", TermsSection);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { html } from 'lit';
|
|
2
|
+
import './terms.js';
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Components/TermsSection',
|
|
6
|
+
component: 'bd-terms-section',
|
|
7
|
+
tags: ['autodocs'],
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
const Template = () => html`
|
|
11
|
+
<bd-terms-section></bd-terms-section>
|
|
12
|
+
`;
|
|
13
|
+
|
|
14
|
+
export const Default = Template.bind({});
|
package/src/index.js
ADDED
|
File without changes
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { html } from 'lit';
|
|
2
|
+
import { styleMap } from 'lit/directives/style-map.js';
|
|
3
|
+
|
|
4
|
+
import './button.css';
|
|
5
|
+
|
|
6
|
+
/** Primary UI component for user interaction */
|
|
7
|
+
export const Button = ({ primary, backgroundColor = null, size, label, onClick }) => {
|
|
8
|
+
const mode = primary ? 'storybook-button--primary' : 'storybook-button--secondary';
|
|
9
|
+
|
|
10
|
+
return html`
|
|
11
|
+
<button
|
|
12
|
+
type="button"
|
|
13
|
+
class=${['storybook-button', `storybook-button--${size || 'medium'}`, mode].join(' ')}
|
|
14
|
+
style=${styleMap({ backgroundColor })}
|
|
15
|
+
@click=${onClick}
|
|
16
|
+
>
|
|
17
|
+
${label}
|
|
18
|
+
</button>
|
|
19
|
+
`;
|
|
20
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { fn } from '@storybook/test';
|
|
2
|
+
|
|
3
|
+
import { Button } from './Button';
|
|
4
|
+
|
|
5
|
+
// More on how to set up stories at: https://storybook.js.org/docs/writing-stories
|
|
6
|
+
export default {
|
|
7
|
+
title: 'Example/Button',
|
|
8
|
+
tags: ['autodocs'],
|
|
9
|
+
render: (args) => Button(args),
|
|
10
|
+
argTypes: {
|
|
11
|
+
backgroundColor: { control: 'color' },
|
|
12
|
+
size: {
|
|
13
|
+
control: { type: 'select' },
|
|
14
|
+
options: ['small', 'medium', 'large'],
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
args: { onClick: fn() },
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
// More on writing stories with args: https://storybook.js.org/docs/writing-stories/args
|
|
21
|
+
export const Primary = {
|
|
22
|
+
args: {
|
|
23
|
+
primary: true,
|
|
24
|
+
label: 'Button',
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export const Secondary = {
|
|
29
|
+
args: {
|
|
30
|
+
label: 'Button',
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export const Large = {
|
|
35
|
+
args: {
|
|
36
|
+
size: 'large',
|
|
37
|
+
label: 'Button',
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export const Small = {
|
|
42
|
+
args: {
|
|
43
|
+
size: 'small',
|
|
44
|
+
label: 'Button',
|
|
45
|
+
},
|
|
46
|
+
};
|
|
@@ -0,0 +1,364 @@
|
|
|
1
|
+
import { Meta } from "@storybook/blocks";
|
|
2
|
+
|
|
3
|
+
import Github from "./assets/github.svg";
|
|
4
|
+
import Discord from "./assets/discord.svg";
|
|
5
|
+
import Youtube from "./assets/youtube.svg";
|
|
6
|
+
import Tutorials from "./assets/tutorials.svg";
|
|
7
|
+
import Styling from "./assets/styling.png";
|
|
8
|
+
import Context from "./assets/context.png";
|
|
9
|
+
import Assets from "./assets/assets.png";
|
|
10
|
+
import Docs from "./assets/docs.png";
|
|
11
|
+
import Share from "./assets/share.png";
|
|
12
|
+
import FigmaPlugin from "./assets/figma-plugin.png";
|
|
13
|
+
import Testing from "./assets/testing.png";
|
|
14
|
+
import Accessibility from "./assets/accessibility.png";
|
|
15
|
+
import Theming from "./assets/theming.png";
|
|
16
|
+
import AddonLibrary from "./assets/addon-library.png";
|
|
17
|
+
|
|
18
|
+
export const RightArrow = () => <svg
|
|
19
|
+
viewBox="0 0 14 14"
|
|
20
|
+
width="8px"
|
|
21
|
+
height="14px"
|
|
22
|
+
style={{
|
|
23
|
+
marginLeft: '4px',
|
|
24
|
+
display: 'inline-block',
|
|
25
|
+
shapeRendering: 'inherit',
|
|
26
|
+
verticalAlign: 'middle',
|
|
27
|
+
fill: 'currentColor',
|
|
28
|
+
'path fill': 'currentColor'
|
|
29
|
+
}}
|
|
30
|
+
>
|
|
31
|
+
<path d="m11.1 7.35-5.5 5.5a.5.5 0 0 1-.7-.7L10.04 7 4.9 1.85a.5.5 0 1 1 .7-.7l5.5 5.5c.2.2.2.5 0 .7Z" />
|
|
32
|
+
</svg>
|
|
33
|
+
|
|
34
|
+
<Meta title="Configure your project" />
|
|
35
|
+
|
|
36
|
+
<div className="sb-container">
|
|
37
|
+
<div className='sb-section-title'>
|
|
38
|
+
# Configure your project
|
|
39
|
+
|
|
40
|
+
Because Storybook works separately from your app, you'll need to configure it for your specific stack and setup. Below, explore guides for configuring Storybook with popular frameworks and tools. If you get stuck, learn how you can ask for help from our community.
|
|
41
|
+
</div>
|
|
42
|
+
<div className="sb-section">
|
|
43
|
+
<div className="sb-section-item">
|
|
44
|
+
<img
|
|
45
|
+
src={Styling}
|
|
46
|
+
alt="A wall of logos representing different styling technologies"
|
|
47
|
+
/>
|
|
48
|
+
<h4 className="sb-section-item-heading">Add styling and CSS</h4>
|
|
49
|
+
<p className="sb-section-item-paragraph">Like with web applications, there are many ways to include CSS within Storybook. Learn more about setting up styling within Storybook.</p>
|
|
50
|
+
<a
|
|
51
|
+
href="https://storybook.js.org/docs/configure/styling-and-css/?renderer=web-components"
|
|
52
|
+
target="_blank"
|
|
53
|
+
>Learn more<RightArrow /></a>
|
|
54
|
+
</div>
|
|
55
|
+
<div className="sb-section-item">
|
|
56
|
+
<img
|
|
57
|
+
src={Context}
|
|
58
|
+
alt="An abstraction representing the composition of data for a component"
|
|
59
|
+
/>
|
|
60
|
+
<h4 className="sb-section-item-heading">Provide context and mocking</h4>
|
|
61
|
+
<p className="sb-section-item-paragraph">Often when a story doesn't render, it's because your component is expecting a specific environment or context (like a theme provider) to be available.</p>
|
|
62
|
+
<a
|
|
63
|
+
href="https://storybook.js.org/docs/writing-stories/decorators/?renderer=web-components#context-for-mocking"
|
|
64
|
+
target="_blank"
|
|
65
|
+
>Learn more<RightArrow /></a>
|
|
66
|
+
</div>
|
|
67
|
+
<div className="sb-section-item">
|
|
68
|
+
<img src={Assets} alt="A representation of typography and image assets" />
|
|
69
|
+
<div>
|
|
70
|
+
<h4 className="sb-section-item-heading">Load assets and resources</h4>
|
|
71
|
+
<p className="sb-section-item-paragraph">To link static files (like fonts) to your projects and stories, use the
|
|
72
|
+
`staticDirs` configuration option to specify folders to load when
|
|
73
|
+
starting Storybook.</p>
|
|
74
|
+
<a
|
|
75
|
+
href="https://storybook.js.org/docs/configure/images-and-assets/?renderer=web-components"
|
|
76
|
+
target="_blank"
|
|
77
|
+
>Learn more<RightArrow /></a>
|
|
78
|
+
</div>
|
|
79
|
+
</div>
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
82
|
+
<div className="sb-container">
|
|
83
|
+
<div className='sb-section-title'>
|
|
84
|
+
# Do more with Storybook
|
|
85
|
+
|
|
86
|
+
Now that you know the basics, let's explore other parts of Storybook that will improve your experience. This list is just to get you started. You can customise Storybook in many ways to fit your needs.
|
|
87
|
+
</div>
|
|
88
|
+
|
|
89
|
+
<div className="sb-section">
|
|
90
|
+
<div className="sb-features-grid">
|
|
91
|
+
<div className="sb-grid-item">
|
|
92
|
+
<img src={Docs} alt="A screenshot showing the autodocs tag being set, pointing a docs page being generated" />
|
|
93
|
+
<h4 className="sb-section-item-heading">Autodocs</h4>
|
|
94
|
+
<p className="sb-section-item-paragraph">Auto-generate living,
|
|
95
|
+
interactive reference documentation from your components and stories.</p>
|
|
96
|
+
<a
|
|
97
|
+
href="https://storybook.js.org/docs/writing-docs/autodocs/?renderer=web-components"
|
|
98
|
+
target="_blank"
|
|
99
|
+
>Learn more<RightArrow /></a>
|
|
100
|
+
</div>
|
|
101
|
+
<div className="sb-grid-item">
|
|
102
|
+
<img src={Share} alt="A browser window showing a Storybook being published to a chromatic.com URL" />
|
|
103
|
+
<h4 className="sb-section-item-heading">Publish to Chromatic</h4>
|
|
104
|
+
<p className="sb-section-item-paragraph">Publish your Storybook to review and collaborate with your entire team.</p>
|
|
105
|
+
<a
|
|
106
|
+
href="https://storybook.js.org/docs/sharing/publish-storybook/?renderer=web-components#publish-storybook-with-chromatic"
|
|
107
|
+
target="_blank"
|
|
108
|
+
>Learn more<RightArrow /></a>
|
|
109
|
+
</div>
|
|
110
|
+
<div className="sb-grid-item">
|
|
111
|
+
<img src={FigmaPlugin} alt="Windows showing the Storybook plugin in Figma" />
|
|
112
|
+
<h4 className="sb-section-item-heading">Figma Plugin</h4>
|
|
113
|
+
<p className="sb-section-item-paragraph">Embed your stories into Figma to cross-reference the design and live
|
|
114
|
+
implementation in one place.</p>
|
|
115
|
+
<a
|
|
116
|
+
href="https://storybook.js.org/docs/sharing/design-integrations/?renderer=web-components#embed-storybook-in-figma-with-the-plugin"
|
|
117
|
+
target="_blank"
|
|
118
|
+
>Learn more<RightArrow /></a>
|
|
119
|
+
</div>
|
|
120
|
+
<div className="sb-grid-item">
|
|
121
|
+
<img src={Testing} alt="Screenshot of tests passing and failing" />
|
|
122
|
+
<h4 className="sb-section-item-heading">Testing</h4>
|
|
123
|
+
<p className="sb-section-item-paragraph">Use stories to test a component in all its variations, no matter how
|
|
124
|
+
complex.</p>
|
|
125
|
+
<a
|
|
126
|
+
href="https://storybook.js.org/docs/writing-tests/?renderer=web-components"
|
|
127
|
+
target="_blank"
|
|
128
|
+
>Learn more<RightArrow /></a>
|
|
129
|
+
</div>
|
|
130
|
+
<div className="sb-grid-item">
|
|
131
|
+
<img src={Accessibility} alt="Screenshot of accessibility tests passing and failing" />
|
|
132
|
+
<h4 className="sb-section-item-heading">Accessibility</h4>
|
|
133
|
+
<p className="sb-section-item-paragraph">Automatically test your components for a11y issues as you develop.</p>
|
|
134
|
+
<a
|
|
135
|
+
href="https://storybook.js.org/docs/writing-tests/accessibility-testing/?renderer=web-components"
|
|
136
|
+
target="_blank"
|
|
137
|
+
>Learn more<RightArrow /></a>
|
|
138
|
+
</div>
|
|
139
|
+
<div className="sb-grid-item">
|
|
140
|
+
<img src={Theming} alt="Screenshot of Storybook in light and dark mode" />
|
|
141
|
+
<h4 className="sb-section-item-heading">Theming</h4>
|
|
142
|
+
<p className="sb-section-item-paragraph">Theme Storybook's UI to personalize it to your project.</p>
|
|
143
|
+
<a
|
|
144
|
+
href="https://storybook.js.org/docs/configure/theming/?renderer=web-components"
|
|
145
|
+
target="_blank"
|
|
146
|
+
>Learn more<RightArrow /></a>
|
|
147
|
+
</div>
|
|
148
|
+
</div>
|
|
149
|
+
</div>
|
|
150
|
+
</div>
|
|
151
|
+
<div className='sb-addon'>
|
|
152
|
+
<div className='sb-addon-text'>
|
|
153
|
+
<h4>Addons</h4>
|
|
154
|
+
<p className="sb-section-item-paragraph">Integrate your tools with Storybook to connect workflows.</p>
|
|
155
|
+
<a
|
|
156
|
+
href="https://storybook.js.org/addons/"
|
|
157
|
+
target="_blank"
|
|
158
|
+
>Discover all addons<RightArrow /></a>
|
|
159
|
+
</div>
|
|
160
|
+
<div className='sb-addon-img'>
|
|
161
|
+
<img src={AddonLibrary} alt="Integrate your tools with Storybook to connect workflows." />
|
|
162
|
+
</div>
|
|
163
|
+
</div>
|
|
164
|
+
|
|
165
|
+
<div className="sb-section sb-socials">
|
|
166
|
+
<div className="sb-section-item">
|
|
167
|
+
<img src={Github} alt="Github logo" className="sb-explore-image"/>
|
|
168
|
+
Join our contributors building the future of UI development.
|
|
169
|
+
|
|
170
|
+
<a
|
|
171
|
+
href="https://github.com/storybookjs/storybook"
|
|
172
|
+
target="_blank"
|
|
173
|
+
>Star on GitHub<RightArrow /></a>
|
|
174
|
+
</div>
|
|
175
|
+
<div className="sb-section-item">
|
|
176
|
+
<img src={Discord} alt="Discord logo" className="sb-explore-image"/>
|
|
177
|
+
<div>
|
|
178
|
+
Get support and chat with frontend developers.
|
|
179
|
+
|
|
180
|
+
<a
|
|
181
|
+
href="https://discord.gg/storybook"
|
|
182
|
+
target="_blank"
|
|
183
|
+
>Join Discord server<RightArrow /></a>
|
|
184
|
+
</div>
|
|
185
|
+
</div>
|
|
186
|
+
<div className="sb-section-item">
|
|
187
|
+
<img src={Youtube} alt="Youtube logo" className="sb-explore-image"/>
|
|
188
|
+
<div>
|
|
189
|
+
Watch tutorials, feature previews and interviews.
|
|
190
|
+
|
|
191
|
+
<a
|
|
192
|
+
href="https://www.youtube.com/@chromaticui"
|
|
193
|
+
target="_blank"
|
|
194
|
+
>Watch on YouTube<RightArrow /></a>
|
|
195
|
+
</div>
|
|
196
|
+
</div>
|
|
197
|
+
<div className="sb-section-item">
|
|
198
|
+
<img src={Tutorials} alt="A book" className="sb-explore-image"/>
|
|
199
|
+
<p>Follow guided walkthroughs on for key workflows.</p>
|
|
200
|
+
|
|
201
|
+
<a
|
|
202
|
+
href="https://storybook.js.org/tutorials/"
|
|
203
|
+
target="_blank"
|
|
204
|
+
>Discover tutorials<RightArrow /></a>
|
|
205
|
+
</div>
|
|
206
|
+
</div>
|
|
207
|
+
|
|
208
|
+
<style>
|
|
209
|
+
{`
|
|
210
|
+
.sb-container {
|
|
211
|
+
margin-bottom: 48px;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.sb-section {
|
|
215
|
+
width: 100%;
|
|
216
|
+
display: flex;
|
|
217
|
+
flex-direction: row;
|
|
218
|
+
gap: 20px;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
img {
|
|
222
|
+
object-fit: cover;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.sb-section-title {
|
|
226
|
+
margin-bottom: 32px;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.sb-section a:not(h1 a, h2 a, h3 a) {
|
|
230
|
+
font-size: 14px;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.sb-section-item, .sb-grid-item {
|
|
234
|
+
flex: 1;
|
|
235
|
+
display: flex;
|
|
236
|
+
flex-direction: column;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.sb-section-item-heading {
|
|
240
|
+
padding-top: 20px !important;
|
|
241
|
+
padding-bottom: 5px !important;
|
|
242
|
+
margin: 0 !important;
|
|
243
|
+
}
|
|
244
|
+
.sb-section-item-paragraph {
|
|
245
|
+
margin: 0;
|
|
246
|
+
padding-bottom: 10px;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
.sb-chevron {
|
|
250
|
+
margin-left: 5px;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.sb-features-grid {
|
|
254
|
+
display: grid;
|
|
255
|
+
grid-template-columns: repeat(2, 1fr);
|
|
256
|
+
grid-gap: 32px 20px;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
.sb-socials {
|
|
260
|
+
display: grid;
|
|
261
|
+
grid-template-columns: repeat(4, 1fr);
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.sb-socials p {
|
|
265
|
+
margin-bottom: 10px;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
.sb-explore-image {
|
|
269
|
+
max-height: 32px;
|
|
270
|
+
align-self: flex-start;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
.sb-addon {
|
|
274
|
+
width: 100%;
|
|
275
|
+
display: flex;
|
|
276
|
+
align-items: center;
|
|
277
|
+
position: relative;
|
|
278
|
+
background-color: #EEF3F8;
|
|
279
|
+
border-radius: 5px;
|
|
280
|
+
border: 1px solid rgba(0, 0, 0, 0.05);
|
|
281
|
+
background: #EEF3F8;
|
|
282
|
+
height: 180px;
|
|
283
|
+
margin-bottom: 48px;
|
|
284
|
+
overflow: hidden;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
.sb-addon-text {
|
|
288
|
+
padding-left: 48px;
|
|
289
|
+
max-width: 240px;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
.sb-addon-text h4 {
|
|
293
|
+
padding-top: 0px;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
.sb-addon-img {
|
|
297
|
+
position: absolute;
|
|
298
|
+
left: 345px;
|
|
299
|
+
top: 0;
|
|
300
|
+
height: 100%;
|
|
301
|
+
width: 200%;
|
|
302
|
+
overflow: hidden;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
.sb-addon-img img {
|
|
306
|
+
width: 650px;
|
|
307
|
+
transform: rotate(-15deg);
|
|
308
|
+
margin-left: 40px;
|
|
309
|
+
margin-top: -72px;
|
|
310
|
+
box-shadow: 0 0 1px rgba(255, 255, 255, 0);
|
|
311
|
+
backface-visibility: hidden;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
@media screen and (max-width: 800px) {
|
|
315
|
+
.sb-addon-img {
|
|
316
|
+
left: 300px;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
@media screen and (max-width: 600px) {
|
|
321
|
+
.sb-section {
|
|
322
|
+
flex-direction: column;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
.sb-features-grid {
|
|
326
|
+
grid-template-columns: repeat(1, 1fr);
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
.sb-socials {
|
|
330
|
+
grid-template-columns: repeat(2, 1fr);
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
.sb-addon {
|
|
334
|
+
height: 280px;
|
|
335
|
+
align-items: flex-start;
|
|
336
|
+
padding-top: 32px;
|
|
337
|
+
overflow: hidden;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
.sb-addon-text {
|
|
341
|
+
padding-left: 24px;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
.sb-addon-img {
|
|
345
|
+
right: 0;
|
|
346
|
+
left: 0;
|
|
347
|
+
top: 130px;
|
|
348
|
+
bottom: 0;
|
|
349
|
+
overflow: hidden;
|
|
350
|
+
height: auto;
|
|
351
|
+
width: 124%;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
.sb-addon-img img {
|
|
355
|
+
width: 1200px;
|
|
356
|
+
transform: rotate(-12deg);
|
|
357
|
+
margin-left: 0;
|
|
358
|
+
margin-top: 48px;
|
|
359
|
+
margin-bottom: -40px;
|
|
360
|
+
margin-left: -24px;
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
`}
|
|
364
|
+
</style>
|