@repobit/dex-system-design 0.4.0 → 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 +18 -0
- package/package.json +4 -3
- package/src/assets/images/bd-header-img.jpg +0 -0
- package/src/assets/images/bd-header-us.jpg +0 -0
- package/src/components/Button/Button.js +115 -3
- package/src/components/Button/button.css.js +48 -10
- package/src/components/Button/button.stories.js +83 -7
- package/src/components/FAQ/faq.css.js +27 -16
- package/src/components/FAQ/faq.js +23 -114
- package/src/components/FAQ/faq.stories.js +41 -20
- package/src/components/Input/Input.js +2 -2
- package/src/components/Input/input.css.js +1 -1
- package/src/components/anchor/anchor-nav.css.js +92 -0
- package/src/components/anchor/anchor-nav.js +121 -0
- package/src/components/anchor/anchor.stories.js +134 -0
- package/src/components/badge/badge.css.js +27 -0
- package/src/components/badge/badge.js +30 -0
- package/src/components/badge/badge.stories.js +36 -0
- package/src/components/carousel/carousel.css.js +36 -19
- package/src/components/carousel/carousel.js +149 -99
- package/src/components/carousel/carousel.stories.js +202 -46
- package/src/components/checkbox/checkbox.css.js +132 -0
- package/src/components/checkbox/checkbox.js +130 -0
- package/src/components/checkbox/checkbox.stories.js +63 -0
- package/src/components/divider/divider-horizontal.js +29 -0
- package/src/components/divider/divider-vertical.js +32 -0
- package/src/components/divider/divider.css.js +0 -0
- package/src/components/divider/divider.stories.js +77 -0
- package/src/components/header/header.css.js +248 -0
- package/src/components/header/header.js +87 -0
- package/src/components/header/header.stories.js +57 -0
- package/src/components/highlight/highlight-s.css.js +88 -0
- package/src/components/highlight/highlight-s.js +35 -0
- package/src/components/highlight/highlight-s.stories.js +22 -0
- package/src/components/highlight/highlight.css.js +119 -0
- package/src/components/highlight/highlight.js +60 -0
- package/src/components/highlight/highlight.stories.js +53 -0
- package/src/components/light-carousel/light-carousel.css.js +18 -10
- package/src/components/light-carousel/light-carousel.js +29 -16
- package/src/components/light-carousel/light-carousel.stories.js +9 -7
- package/src/components/paragraph/paragraph.css.js +1 -1
- package/src/components/pricing-cards/pricing-card.css.js +138 -3
- package/src/components/pricing-cards/pricing-card.js +63 -82
- package/src/components/pricing-cards/pricing-card.stories.js +1 -0
- package/src/components/radio/radio.css.js +168 -0
- package/src/components/radio/radio.js +222 -0
- package/src/components/radio/radio.stories.js +103 -0
- package/src/components/tabs/tabs.css.js +26 -8
- package/src/components/tabs/tabs.js +19 -12
- package/src/components/termsOfUse/terms.css.js +7 -1
- package/src/tokens/fonts.stories.js +73 -0
- package/src/tokens/spacing.stories.js +56 -0
- package/src/tokens/tokens-grid.stories.js +83 -0
- package/src/tokens/tokens.css +116 -1
- package/src/tokens/tokens.stories.js +67 -0
- package/src/tokens/typography.stories.js +69 -0
- /package/src/assets/{icons → images}/tabs-img1.png +0 -0
- /package/src/assets/{icons → images}/tabs-img2.png +0 -0
- /package/src/assets/{icons → images}/tabs-img3.png +0 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { html } from 'lit';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Design Tokens/Colors',
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
const colorGroups = {
|
|
8
|
+
blue: ['50', '100', '200', '300', '400', '500', '600', '700', '800', '900', '950'],
|
|
9
|
+
red: ['50', '100', '200', '300', '400', '500', '600', '700', '800', '900', '950'],
|
|
10
|
+
green: ['50', '100', '200', '300', '400', '500', '600', '700', '800', '900', '950'],
|
|
11
|
+
yellow: ['50', '100', '200', '300', '400', '500', '600', '700', '800', '900', '950'],
|
|
12
|
+
neutral: ['0', '25', '50', '100', '200', '300', '400', '500', '600', '700', '800', '900', '950', '1000'],
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export const Colors = () => html`
|
|
16
|
+
<style>
|
|
17
|
+
.color-group {
|
|
18
|
+
margin-bottom: 32px;
|
|
19
|
+
}
|
|
20
|
+
.color-group-title {
|
|
21
|
+
font-family: var(--font-family-sans);
|
|
22
|
+
font-weight: 600;
|
|
23
|
+
font-size: var(--heading-medium);
|
|
24
|
+
margin-bottom: 16px;
|
|
25
|
+
text-transform: capitalize;
|
|
26
|
+
}
|
|
27
|
+
.color-swatch {
|
|
28
|
+
display: inline-flex;
|
|
29
|
+
flex-direction: column;
|
|
30
|
+
align-items: center;
|
|
31
|
+
justify-content: center;
|
|
32
|
+
width: 80px;
|
|
33
|
+
height: 80px;
|
|
34
|
+
margin: 6px;
|
|
35
|
+
border-radius: 8px;
|
|
36
|
+
box-shadow: 0 0 4px rgba(0,0,0,0.1);
|
|
37
|
+
color: white;
|
|
38
|
+
font-family: var(--font-family-mono);
|
|
39
|
+
font-size: 12px;
|
|
40
|
+
text-align: center;
|
|
41
|
+
user-select: none;
|
|
42
|
+
}
|
|
43
|
+
.color-label {
|
|
44
|
+
margin-top: 6px;
|
|
45
|
+
color: var(--color-neutral-900);
|
|
46
|
+
font-weight: 600;
|
|
47
|
+
font-family: var(--font-family-sans);
|
|
48
|
+
font-size: 10px;
|
|
49
|
+
white-space: nowrap;
|
|
50
|
+
}
|
|
51
|
+
</style>
|
|
52
|
+
|
|
53
|
+
${Object.entries(colorGroups).map(([group, shades]) => html`
|
|
54
|
+
<section class="color-group">
|
|
55
|
+
<h3 class="color-group-title">${group}</h3>
|
|
56
|
+
${shades.map(shade => {
|
|
57
|
+
const varName = `--color-${group}-${shade}`;
|
|
58
|
+
return html`
|
|
59
|
+
<div class="color-swatch" style="background-color: var(${varName})">
|
|
60
|
+
<div>${shade}</div>
|
|
61
|
+
<div class="color-label">${varName}</div>
|
|
62
|
+
</div>
|
|
63
|
+
`;
|
|
64
|
+
})}
|
|
65
|
+
</section>
|
|
66
|
+
`)}
|
|
67
|
+
`;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { html } from 'lit';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Design Tokens/Typography',
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
const typographyTokens = {
|
|
8
|
+
families: {
|
|
9
|
+
'Sans': 'var(--font-family-sans, "IBM Plex Sans", Arial, sans-serif)',
|
|
10
|
+
'Mono': 'var(--font-family-mono, "IBM Plex Mono", monospace)',
|
|
11
|
+
},
|
|
12
|
+
sizes: {
|
|
13
|
+
xs: 'var(--font-size-xs, 0.75rem)',
|
|
14
|
+
sm: 'var(--font-size-sm, 0.875rem)',
|
|
15
|
+
md: 'var(--font-size-md, 1rem)',
|
|
16
|
+
lg: 'var(--font-size-lg, 1.25rem)',
|
|
17
|
+
xl: 'var(--font-size-xl, 1.5rem)',
|
|
18
|
+
},
|
|
19
|
+
weights: {
|
|
20
|
+
regular: 'var(--font-weight-regular, 400)',
|
|
21
|
+
semibold: 'var(--font-weight-semibold, 600)',
|
|
22
|
+
bold: 'var(--font-weight-bold, 700)',
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export const Typography = () => html`
|
|
27
|
+
<style>
|
|
28
|
+
h3 {
|
|
29
|
+
font-family: var(--font-family-sans);
|
|
30
|
+
font-weight: 600;
|
|
31
|
+
font-size: var(--heading-medium);
|
|
32
|
+
margin-bottom: 16px;
|
|
33
|
+
text-transform: capitalize;
|
|
34
|
+
}
|
|
35
|
+
.typo-family-sample {
|
|
36
|
+
margin-bottom: 12px;
|
|
37
|
+
font-size: 1rem;
|
|
38
|
+
}
|
|
39
|
+
.typo-size-sample {
|
|
40
|
+
margin-bottom: 8px;
|
|
41
|
+
}
|
|
42
|
+
.typo-weight-sample {
|
|
43
|
+
margin-bottom: 8px;
|
|
44
|
+
}
|
|
45
|
+
</style>
|
|
46
|
+
|
|
47
|
+
<section>
|
|
48
|
+
<h3>Font Families</h3>
|
|
49
|
+
${Object.entries(typographyTokens.families).map(([name, family]) => html`
|
|
50
|
+
<div class="typo-family-sample" style="font-family: ${family}">
|
|
51
|
+
This text uses <strong>${name}</strong> font family.
|
|
52
|
+
</div>
|
|
53
|
+
`)}
|
|
54
|
+
|
|
55
|
+
<h3>Font Sizes</h3>
|
|
56
|
+
${Object.entries(typographyTokens.sizes).map(([sizeName, sizeValue]) => html`
|
|
57
|
+
<div class="typo-size-sample" style="font-size: ${sizeValue}">
|
|
58
|
+
Font size <strong>${sizeName}</strong> (${sizeValue})
|
|
59
|
+
</div>
|
|
60
|
+
`)}
|
|
61
|
+
|
|
62
|
+
<h3>Font Weights</h3>
|
|
63
|
+
${Object.entries(typographyTokens.weights).map(([weightName, weightValue]) => html`
|
|
64
|
+
<div class="typo-weight-sample" style="font-weight: ${weightValue}">
|
|
65
|
+
Font weight <strong>${weightName}</strong> (${weightValue})
|
|
66
|
+
</div>
|
|
67
|
+
`)}
|
|
68
|
+
</section>
|
|
69
|
+
`;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|