@repobit/dex-system-design 0.21.2 → 0.22.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/package.json +4 -2
- package/src/components/Button/Button.js +7 -2
- package/src/components/Button/button.css.js +30 -0
- package/src/components/accordion/accordion-bg.stories.js +341 -171
- package/src/components/accordion/accordion.stories.js +345 -0
- package/src/components/anchor/anchor.stories.js +134 -76
- package/src/components/back/back.css.js +1 -1
- package/src/components/back/back.stories.js +301 -63
- package/src/components/badge/badge.js +4 -7
- package/src/components/badge/badge.stories.js +89 -96
- package/src/components/breadcrumb/breadcrumb.stories.js +167 -3
- package/src/components/cards/card.stories.js +153 -3
- package/src/components/display/display.css.js +7 -10
- package/src/components/display/display.js +14 -2
- package/src/components/display/display.stories.js +213 -219
- package/src/components/divider/divider.stories.js +337 -30
- package/src/components/footer/footer-lp.stories.js +346 -3
- package/src/components/footer/footer.js +0 -3
- package/src/components/footer/footer.stories.js +267 -4
- package/src/components/header/header.css.js +1 -1
- package/src/components/header/header.js +77 -56
- package/src/components/header/header.stories.js +298 -22
- package/src/components/heading/heading.css.js +1 -1
- package/src/components/heading/heading.stories.js +355 -113
- package/src/components/image/image.css.js +146 -98
- package/src/components/image/image.js +13 -2
- package/src/components/image/image.stories.js +546 -160
- package/src/components/input/custom-form.stories.js +209 -12
- package/src/components/link/link.css.js +2 -2
- package/src/components/link/link.stories.js +383 -53
- package/src/components/paragraph/paragraph.css.js +1 -1
- package/src/components/paragraph/paragraph.stories.js +365 -157
- package/src/components/picture/picture.css.js +209 -0
- package/src/components/picture/picture.js +16 -2
- package/src/components/picture/picture.stories.js +525 -180
- package/src/components/pricing-cards/new-pricing-card.js +19 -4
- package/src/components/pricing-cards/new-pricing-card.stories.js +422 -0
- package/src/components/pricing-cards/new-pricing.css.js +8 -0
- package/src/components/pricing-cards/pricing-card-actions.js +49 -9
- package/src/components/pricing-cards/pricing-card-container.css.js +1 -1
- package/src/components/pricing-cards/pricing-card-header.css.js +73 -63
- package/src/components/pricing-cards/pricing-card-header.js +44 -10
- package/src/components/pricing-cards/pricing-card-pricing.js +63 -64
- package/src/components/pricing-cards/pricing-card.css.js +7 -15
- package/src/components/pricing-cards/pricing-card.js +353 -270
- package/src/components/pricing-cards/pricing-card.stories.js +3 -3
- package/src/tokens/fonts.stories.js +335 -8
- package/src/tokens/spacing.stories.js +701 -34
- package/src/tokens/tokens-grid.stories.js +897 -48
- package/src/tokens/typography.stories.js +980 -38
- package/src/components/accordion/accordion-light.stories.js +0 -241
|
@@ -1,17 +1,159 @@
|
|
|
1
1
|
import { html } from 'lit';
|
|
2
|
-
|
|
3
2
|
import '../dropdown/dropdown.js';
|
|
4
3
|
import './input-clipboard.js';
|
|
5
4
|
import './input.js';
|
|
6
5
|
|
|
7
|
-
|
|
8
6
|
export default {
|
|
9
|
-
title: 'Components/Form Inputs and Dropdown'
|
|
7
|
+
title: 'Components/Form Inputs and Dropdown',
|
|
8
|
+
tags : ['autodocs']
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
// ---------- INPUT COMPONENT ----------
|
|
12
|
+
const InputTemplate = (args) => {
|
|
13
|
+
return html`
|
|
14
|
+
<bd-custom-input
|
|
15
|
+
label="${args.label}"
|
|
16
|
+
type="${args.type}"
|
|
17
|
+
placeholder="${args.placeholder}"
|
|
18
|
+
kind="${args.kind}"
|
|
19
|
+
?required="${args.required}"
|
|
20
|
+
?focused="${args.focused}"
|
|
21
|
+
?invalid="${args.invalid}"
|
|
22
|
+
?validated="${args.validated}"
|
|
23
|
+
?disabled="${args.disabled}"
|
|
24
|
+
tooltip="${args.tooltip}"
|
|
25
|
+
></bd-custom-input>
|
|
26
|
+
`;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export const Input = InputTemplate.bind({});
|
|
30
|
+
Input.args = {
|
|
31
|
+
label : 'Nume complet',
|
|
32
|
+
type : 'text',
|
|
33
|
+
placeholder: 'Introdu numele tău',
|
|
34
|
+
kind : 'sm',
|
|
35
|
+
required : false,
|
|
36
|
+
focused : false,
|
|
37
|
+
invalid : false,
|
|
38
|
+
validated : false,
|
|
39
|
+
disabled : false,
|
|
40
|
+
tooltip : ''
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
Input.argTypes = {
|
|
44
|
+
label: { control: 'text' },
|
|
45
|
+
type : {
|
|
46
|
+
control: { type: 'select' },
|
|
47
|
+
options: ['text', 'email', 'password', 'number', 'tel']
|
|
48
|
+
},
|
|
49
|
+
placeholder: { control: 'text' },
|
|
50
|
+
kind : {
|
|
51
|
+
control: { type: 'select' },
|
|
52
|
+
options: ['sm', 'md', 'lg']
|
|
53
|
+
},
|
|
54
|
+
required : { control: 'boolean' },
|
|
55
|
+
focused : { control: 'boolean' },
|
|
56
|
+
invalid : { control: 'boolean' },
|
|
57
|
+
validated: { control: 'boolean' },
|
|
58
|
+
disabled : { control: 'boolean' },
|
|
59
|
+
tooltip : { control: 'text' }
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
Input.parameters = {
|
|
63
|
+
docs: {
|
|
64
|
+
description: {
|
|
65
|
+
component: 'Custom input component with various states and sizes.'
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
// ---------- DROPDOWN COMPONENT ----------
|
|
71
|
+
const DropdownTemplate = (args) => {
|
|
72
|
+
return html`
|
|
73
|
+
<bd-custom-dropdown
|
|
74
|
+
label="${args.label}"
|
|
75
|
+
kind="${args.kind}"
|
|
76
|
+
options='${JSON.stringify(args.options)}'
|
|
77
|
+
tooltip="${args.tooltip}"
|
|
78
|
+
></bd-custom-dropdown>
|
|
79
|
+
`;
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
export const Dropdown = DropdownTemplate.bind({});
|
|
83
|
+
Dropdown.args = {
|
|
84
|
+
label : 'Select size',
|
|
85
|
+
kind : 'md',
|
|
86
|
+
options: ['Small', 'Medium', 'Large'],
|
|
87
|
+
tooltip: 'Choose an option'
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
Dropdown.argTypes = {
|
|
91
|
+
label: { control: 'text' },
|
|
92
|
+
kind : {
|
|
93
|
+
control: { type: 'select' },
|
|
94
|
+
options: ['sm', 'md', 'lg']
|
|
95
|
+
},
|
|
96
|
+
options: { control: 'object' },
|
|
97
|
+
tooltip: { control: 'text' }
|
|
10
98
|
};
|
|
11
99
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
100
|
+
Dropdown.parameters = {
|
|
101
|
+
docs: {
|
|
102
|
+
description: {
|
|
103
|
+
component: 'Custom dropdown component with configurable options.'
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
// ---------- INPUT CLIPBOARD COMPONENT ----------
|
|
109
|
+
const InputClipboardTemplate = (args) => {
|
|
110
|
+
return html`
|
|
111
|
+
<bd-custom-input-clipboard
|
|
112
|
+
label="${args.label}"
|
|
113
|
+
kind="${args.kind}"
|
|
114
|
+
placeholder="${args.placeholder}"
|
|
115
|
+
value="${args.value}"
|
|
116
|
+
?disabled="${args.disabled}"
|
|
117
|
+
tooltip="${args.tooltip}"
|
|
118
|
+
></bd-custom-input-clipboard>
|
|
119
|
+
`;
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
export const InputClipboard = InputClipboardTemplate.bind({});
|
|
123
|
+
InputClipboard.args = {
|
|
124
|
+
label : 'Token',
|
|
125
|
+
kind : 'sm',
|
|
126
|
+
placeholder: 'Paste token here',
|
|
127
|
+
value : '',
|
|
128
|
+
disabled : false,
|
|
129
|
+
tooltip : ''
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
InputClipboard.argTypes = {
|
|
133
|
+
label: { control: 'text' },
|
|
134
|
+
kind : {
|
|
135
|
+
control: { type: 'select' },
|
|
136
|
+
options: ['sm', 'md', 'lg']
|
|
137
|
+
},
|
|
138
|
+
placeholder: { control: 'text' },
|
|
139
|
+
value : { control: 'text' },
|
|
140
|
+
disabled : { control: 'boolean' },
|
|
141
|
+
tooltip : { control: 'text' }
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
InputClipboard.parameters = {
|
|
145
|
+
docs: {
|
|
146
|
+
description: {
|
|
147
|
+
component: 'Input field with clipboard functionality for easy copy/paste.'
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
// ---------- SHOWCASE STORIES ----------
|
|
153
|
+
export const InputsShowcase = () => html`
|
|
154
|
+
<div style="display: grid; gap: 1rem; max-width: 400px; margin: 2rem auto;">
|
|
155
|
+
<h3>Input Variants</h3>
|
|
156
|
+
|
|
15
157
|
<bd-custom-input
|
|
16
158
|
label="Nume complet"
|
|
17
159
|
placeholder="Introdu numele tău"
|
|
@@ -57,9 +199,10 @@ export const Inputs = () => html`
|
|
|
57
199
|
</div>
|
|
58
200
|
`;
|
|
59
201
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
202
|
+
export const DropdownsShowcase = () => html`
|
|
203
|
+
<div style="display: grid; gap: 1rem; max-width: 400px; margin: 2rem auto;">
|
|
204
|
+
<h3>Dropdown Variants</h3>
|
|
205
|
+
|
|
63
206
|
<bd-custom-dropdown
|
|
64
207
|
label="Select size"
|
|
65
208
|
kind="md"
|
|
@@ -76,9 +219,10 @@ export const Dropdowns = () => html`
|
|
|
76
219
|
</div>
|
|
77
220
|
`;
|
|
78
221
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
222
|
+
export const InputClipboardShowcase = () => html`
|
|
223
|
+
<div style="display: grid; gap: 1rem; max-width: 400px; margin: 2rem auto;">
|
|
224
|
+
<h3>Input Clipboard</h3>
|
|
225
|
+
|
|
82
226
|
<bd-custom-input-clipboard
|
|
83
227
|
label="Token"
|
|
84
228
|
kind="sm"
|
|
@@ -86,3 +230,56 @@ export const InputClipboard = () => html`
|
|
|
86
230
|
</bd-custom-input-clipboard>
|
|
87
231
|
</div>
|
|
88
232
|
`;
|
|
233
|
+
|
|
234
|
+
// ---------- COMBINED FORM EXAMPLE ----------
|
|
235
|
+
export const FormExample = () => html`
|
|
236
|
+
<div style="max-width: 500px; margin: 2rem auto; padding: 2rem; border: 1px solid #e0e0e0; border-radius: 8px;">
|
|
237
|
+
<h3 style="margin-top: 0;">Complete Form Example</h3>
|
|
238
|
+
|
|
239
|
+
<div style="display: grid; gap: 1.5rem;">
|
|
240
|
+
<bd-custom-input
|
|
241
|
+
label="Full Name"
|
|
242
|
+
placeholder="John Doe"
|
|
243
|
+
kind="md"
|
|
244
|
+
required>
|
|
245
|
+
</bd-custom-input>
|
|
246
|
+
|
|
247
|
+
<bd-custom-input
|
|
248
|
+
label="Email Address"
|
|
249
|
+
type="email"
|
|
250
|
+
placeholder="john@example.com"
|
|
251
|
+
kind="md"
|
|
252
|
+
required>
|
|
253
|
+
</bd-custom-input>
|
|
254
|
+
|
|
255
|
+
<bd-custom-dropdown
|
|
256
|
+
label="Country"
|
|
257
|
+
kind="md"
|
|
258
|
+
options='["Select a country", "United States", "Canada", "United Kingdom", "Germany", "France"]'
|
|
259
|
+
required>
|
|
260
|
+
</bd-custom-dropdown>
|
|
261
|
+
|
|
262
|
+
<bd-custom-input-clipboard
|
|
263
|
+
label="API Token"
|
|
264
|
+
kind="md"
|
|
265
|
+
placeholder="Click to paste your token"
|
|
266
|
+
tooltip="Copy your API token from your account settings">
|
|
267
|
+
</bd-custom-input-clipboard>
|
|
268
|
+
|
|
269
|
+
<div style="display: flex; gap: 1rem; margin-top: 1rem;">
|
|
270
|
+
<bd-button
|
|
271
|
+
label="Submit"
|
|
272
|
+
size="md"
|
|
273
|
+
kind="primary"
|
|
274
|
+
strong>
|
|
275
|
+
</bd-button>
|
|
276
|
+
|
|
277
|
+
<bd-button
|
|
278
|
+
label="Cancel"
|
|
279
|
+
size="md"
|
|
280
|
+
kind="outline">
|
|
281
|
+
</bd-button>
|
|
282
|
+
</div>
|
|
283
|
+
</div>
|
|
284
|
+
</div>
|
|
285
|
+
`;
|