@repobit/dex-system-design 0.21.2 → 0.22.1

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.
Files changed (52) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/package.json +4 -2
  3. package/src/components/Button/Button.js +7 -2
  4. package/src/components/Button/button.css.js +30 -0
  5. package/src/components/accordion/accordion-bg.stories.js +341 -171
  6. package/src/components/accordion/accordion.stories.js +345 -0
  7. package/src/components/anchor/anchor.stories.js +134 -76
  8. package/src/components/back/back.css.js +1 -1
  9. package/src/components/back/back.stories.js +301 -63
  10. package/src/components/badge/badge.js +4 -7
  11. package/src/components/badge/badge.stories.js +89 -96
  12. package/src/components/breadcrumb/breadcrumb.stories.js +167 -3
  13. package/src/components/cards/card.stories.js +153 -3
  14. package/src/components/display/display.css.js +7 -10
  15. package/src/components/display/display.js +14 -2
  16. package/src/components/display/display.stories.js +213 -219
  17. package/src/components/divider/divider.stories.js +337 -30
  18. package/src/components/footer/footer-lp.stories.js +346 -3
  19. package/src/components/footer/footer.js +0 -3
  20. package/src/components/footer/footer.stories.js +267 -4
  21. package/src/components/header/header.css.js +1 -1
  22. package/src/components/header/header.js +77 -56
  23. package/src/components/header/header.stories.js +298 -22
  24. package/src/components/heading/heading.css.js +1 -1
  25. package/src/components/heading/heading.stories.js +355 -113
  26. package/src/components/image/image.css.js +146 -98
  27. package/src/components/image/image.js +13 -2
  28. package/src/components/image/image.stories.js +546 -160
  29. package/src/components/input/custom-form.stories.js +209 -12
  30. package/src/components/link/link.css.js +2 -2
  31. package/src/components/link/link.stories.js +383 -53
  32. package/src/components/paragraph/paragraph.css.js +1 -1
  33. package/src/components/paragraph/paragraph.stories.js +365 -157
  34. package/src/components/picture/picture.css.js +209 -0
  35. package/src/components/picture/picture.js +16 -2
  36. package/src/components/picture/picture.stories.js +525 -180
  37. package/src/components/pricing-cards/new-pricing-card.js +19 -4
  38. package/src/components/pricing-cards/new-pricing-card.stories.js +422 -0
  39. package/src/components/pricing-cards/new-pricing.css.js +8 -0
  40. package/src/components/pricing-cards/pricing-card-actions.js +49 -9
  41. package/src/components/pricing-cards/pricing-card-container.css.js +1 -1
  42. package/src/components/pricing-cards/pricing-card-header.css.js +73 -63
  43. package/src/components/pricing-cards/pricing-card-header.js +44 -10
  44. package/src/components/pricing-cards/pricing-card-pricing.js +63 -64
  45. package/src/components/pricing-cards/pricing-card.css.js +7 -15
  46. package/src/components/pricing-cards/pricing-card.js +353 -270
  47. package/src/components/pricing-cards/pricing-card.stories.js +3 -3
  48. package/src/tokens/fonts.stories.js +335 -8
  49. package/src/tokens/spacing.stories.js +701 -34
  50. package/src/tokens/tokens-grid.stories.js +897 -48
  51. package/src/tokens/typography.stories.js +980 -38
  52. package/src/components/accordion/accordion-light.stories.js +0 -241
@@ -1,19 +1,36 @@
1
1
  import { html } from 'lit';
2
2
  import '../heading/heading.js';
3
3
  import './card.js';
4
+
4
5
  export default {
5
6
  title : 'Components/Card',
6
7
  component : 'bd-card-section',
7
8
  subcomponents: { 'bd-card-item': 'bd-card-item' },
9
+ tags : ['autodocs'],
8
10
  argTypes : {
9
11
  title: {
10
12
  control : 'text',
11
- description: 'Section title (optional)'
13
+ description: 'Section title (optional)',
14
+ table : {
15
+ type : { summary: 'string' },
16
+ defaultValue: { summary: '' }
17
+ }
12
18
  },
13
19
  align: {
14
20
  control : { type: 'select' },
15
21
  options : ['start', 'center'],
16
- description: 'Content alignment for card items'
22
+ description: 'Content alignment for card items',
23
+ table : {
24
+ type : { summary: 'string' },
25
+ defaultValue: { summary: 'start' }
26
+ }
27
+ }
28
+ },
29
+ parameters: {
30
+ docs: {
31
+ description: {
32
+ component: 'A flexible card component system for displaying features, services, or content in an organized grid layout. Supports icons, titles, descriptions, and multiple alignment options.'
33
+ }
17
34
  }
18
35
  }
19
36
  };
@@ -71,12 +88,26 @@ Default.args = {
71
88
  title: 'Security Features',
72
89
  align: 'start'
73
90
  };
91
+ Default.parameters = {
92
+ docs: {
93
+ description: {
94
+ story: 'Default card section with security features. Each card includes an icon, title, and descriptive text with start alignment for optimal readability.'
95
+ }
96
+ }
97
+ };
74
98
 
75
99
  export const CenterAligned = Template.bind({});
76
100
  CenterAligned.args = {
77
101
  title: 'Security Features - Centered',
78
102
  align: 'center'
79
103
  };
104
+ CenterAligned.parameters = {
105
+ docs: {
106
+ description: {
107
+ story: 'Card section with center-aligned content. Perfect for feature highlights and creating visual balance in the layout.'
108
+ }
109
+ }
110
+ };
80
111
 
81
112
  export const IconTitleOnly = () => html`
82
113
  <bd-card-section title="Icon + Title Only Cards">
@@ -105,6 +136,13 @@ export const IconTitleOnly = () => html`
105
136
  ></bd-card-item>
106
137
  </bd-card-section>
107
138
  `;
139
+ IconTitleOnly.parameters = {
140
+ docs: {
141
+ description: {
142
+ story: 'Minimal card layout with only icons and titles. Ideal for quick visual scanning and when space is limited.'
143
+ }
144
+ }
145
+ };
108
146
 
109
147
  export const IconTitleOnlyCentered = () => html`
110
148
  <bd-card-section title="Icon + Title Only - Centered">
@@ -133,6 +171,13 @@ export const IconTitleOnlyCentered = () => html`
133
171
  ></bd-card-item>
134
172
  </bd-card-section>
135
173
  `;
174
+ IconTitleOnlyCentered.parameters = {
175
+ docs: {
176
+ description: {
177
+ story: 'Center-aligned icon and title cards. Creates a balanced, symmetrical appearance perfect for feature showcases.'
178
+ }
179
+ }
180
+ };
136
181
 
137
182
  export const MixedContentTypes = () => html`
138
183
  <bd-card-section title="Mixed Content Types">
@@ -165,6 +210,13 @@ export const MixedContentTypes = () => html`
165
210
  ></bd-card-item>
166
211
  </bd-card-section>
167
212
  `;
213
+ MixedContentTypes.parameters = {
214
+ docs: {
215
+ description: {
216
+ story: 'Mixed card content types within the same section. Demonstrates flexibility by combining cards with and without descriptions.'
217
+ }
218
+ }
219
+ };
168
220
 
169
221
  export const MixedContentTypesCentered = () => html`
170
222
  <bd-card-section title="Mixed Content Types - Centered">
@@ -197,18 +249,39 @@ export const MixedContentTypesCentered = () => html`
197
249
  ></bd-card-item>
198
250
  </bd-card-section>
199
251
  `;
252
+ MixedContentTypesCentered.parameters = {
253
+ docs: {
254
+ description: {
255
+ story: 'Center-aligned mixed content cards. Maintains visual consistency while accommodating different content types.'
256
+ }
257
+ }
258
+ };
200
259
 
201
260
  export const WithoutTitle = Template.bind({});
202
261
  WithoutTitle.args = {
203
262
  title: '',
204
263
  align: 'start'
205
264
  };
265
+ WithoutTitle.parameters = {
266
+ docs: {
267
+ description: {
268
+ story: 'Card section without a title. Useful when the section context is clear from the surrounding content or layout.'
269
+ }
270
+ }
271
+ };
206
272
 
207
273
  export const WithoutTitleCentered = Template.bind({});
208
274
  WithoutTitleCentered.args = {
209
275
  title: '',
210
276
  align: 'center'
211
277
  };
278
+ WithoutTitleCentered.parameters = {
279
+ docs: {
280
+ description: {
281
+ story: 'Title-less card section with center alignment. Creates a clean, minimalist appearance.'
282
+ }
283
+ }
284
+ };
212
285
 
213
286
  export const SingleCard = (args) => html`
214
287
  <bd-card-section title="${args.title}">
@@ -228,6 +301,13 @@ SingleCard.args = {
228
301
  content : 'Specialized AI chatbot that helps you identify suspicious online interactions.',
229
302
  align : 'start'
230
303
  };
304
+ SingleCard.parameters = {
305
+ docs: {
306
+ description: {
307
+ story: 'Single card demonstration. Perfect for highlighting one key feature or piece of content prominently.'
308
+ }
309
+ }
310
+ };
231
311
 
232
312
  export const SingleCardCentered = SingleCard.bind({});
233
313
  SingleCardCentered.args = {
@@ -235,6 +315,13 @@ SingleCardCentered.args = {
235
315
  title: 'Single Feature - Centered',
236
316
  align: 'center'
237
317
  };
318
+ SingleCardCentered.parameters = {
319
+ docs: {
320
+ description: {
321
+ story: 'Single center-aligned card. Ideal for call-to-action sections or main feature highlights.'
322
+ }
323
+ }
324
+ };
238
325
 
239
326
  export const SingleCardNoContent = (args) => html`
240
327
  <bd-card-section title="${args.title}">
@@ -251,6 +338,13 @@ SingleCardNoContent.args = {
251
338
  icon : '/assets/device_protection.png',
252
339
  align : 'start'
253
340
  };
341
+ SingleCardNoContent.parameters = {
342
+ docs: {
343
+ description: {
344
+ story: 'Single card with only icon and title. Minimalist approach for simple feature representation.'
345
+ }
346
+ }
347
+ };
254
348
 
255
349
  export const SingleCardNoContentCentered = SingleCardNoContent.bind({});
256
350
  SingleCardNoContentCentered.args = {
@@ -258,6 +352,13 @@ SingleCardNoContentCentered.args = {
258
352
  title: 'Single Feature - Icon + Title Only - Centered',
259
353
  align: 'center'
260
354
  };
355
+ SingleCardNoContentCentered.parameters = {
356
+ docs: {
357
+ description: {
358
+ story: 'Single center-aligned icon and title card. Creates focused visual attention on one key element.'
359
+ }
360
+ }
361
+ };
261
362
 
262
363
  export const MultipleCardsGrid = (args) => html`
263
364
  <bd-card-section title="${args.title}">
@@ -280,6 +381,13 @@ MultipleCardsGrid.args = {
280
381
  cardCount: 6,
281
382
  align : 'start'
282
383
  };
384
+ MultipleCardsGrid.parameters = {
385
+ docs: {
386
+ description: {
387
+ story: 'Grid layout with multiple cards. Demonstrates how the component automatically handles larger numbers of cards with responsive grid behavior.'
388
+ }
389
+ }
390
+ };
283
391
 
284
392
  export const MultipleCardsGridCentered = MultipleCardsGrid.bind({});
285
393
  MultipleCardsGridCentered.args = {
@@ -287,6 +395,13 @@ MultipleCardsGridCentered.args = {
287
395
  title: 'Multiple Security Features - Centered',
288
396
  align: 'center'
289
397
  };
398
+ MultipleCardsGridCentered.parameters = {
399
+ docs: {
400
+ description: {
401
+ story: 'Multiple center-aligned cards in grid layout. Maintains visual balance across larger card collections.'
402
+ }
403
+ }
404
+ };
290
405
 
291
406
  export const CardItemVariations = () => html`
292
407
  <div style="display: flex; flex-direction: column; gap: 3rem;">
@@ -361,6 +476,13 @@ export const CardItemVariations = () => html`
361
476
  </bd-card-section>
362
477
  </div>
363
478
  `;
479
+ CardItemVariations.parameters = {
480
+ docs: {
481
+ description: {
482
+ story: 'Comprehensive demonstration of all possible card item variations with both start and center alignment options. Shows flexibility in content composition.'
483
+ }
484
+ }
485
+ };
364
486
 
365
487
  export const LongContent = () => html`
366
488
  <div style="display: flex; flex-direction: column; gap: 3rem;">
@@ -421,6 +543,13 @@ export const LongContent = () => html`
421
543
  </bd-card-section>
422
544
  </div>
423
545
  `;
546
+ LongContent.parameters = {
547
+ docs: {
548
+ description: {
549
+ story: 'Cards with extensive content including multiple paragraphs and long titles. Demonstrates how the component handles text-heavy scenarios while maintaining readability.'
550
+ }
551
+ }
552
+ };
424
553
 
425
554
  export const MixedAlignment = () => html`
426
555
  <bd-card-section title="Mixed Alignment Cards">
@@ -459,6 +588,13 @@ export const MixedAlignment = () => html`
459
588
  </bd-card-item>
460
589
  </bd-card-section>
461
590
  `;
591
+ MixedAlignment.parameters = {
592
+ docs: {
593
+ description: {
594
+ story: 'Mixed alignment within the same card section. Shows how different alignment choices can be used strategically for varied content types and emphasis.'
595
+ }
596
+ }
597
+ };
462
598
 
463
599
  export const AlignmentComparison = () => html`
464
600
  <bd-card-section title="Alignment Comparison">
@@ -488,6 +624,13 @@ export const AlignmentComparison = () => html`
488
624
  </div>
489
625
  </bd-card-section>
490
626
  `;
627
+ AlignmentComparison.parameters = {
628
+ docs: {
629
+ description: {
630
+ story: 'Side-by-side comparison of start vs center alignment. Helps understand the visual and functional differences between alignment options for informed design decisions.'
631
+ }
632
+ }
633
+ };
491
634
 
492
635
  export const ResponsiveAlignment = () => html`
493
636
  <bd-card-section title="Responsive Alignment Examples">
@@ -509,4 +652,11 @@ export const ResponsiveAlignment = () => html`
509
652
  <bd-p kind="small">On mobile devices, the content will remain centered for consistency.</bd-p>
510
653
  </bd-card-item>
511
654
  </bd-card-section>
512
- `;
655
+ `;
656
+ ResponsiveAlignment.parameters = {
657
+ docs: {
658
+ description: {
659
+ story: 'Demonstration of responsive alignment behavior. Shows how alignment choices are maintained across different screen sizes and devices.'
660
+ }
661
+ }
662
+ };
@@ -9,26 +9,23 @@ export default css`
9
9
  color: var(--color-neutral-900);
10
10
  }
11
11
 
12
- /* 3xl - Largest display */
13
- .bd-display['3xl'],
14
- .bd-display.k3xl {
15
- font-size: var(--typography-display-3xl-fontSize);
12
+
13
+ /* xxxl */
14
+ .bd-display.xxxl {
15
+ font-size: var(--typography-display-3xl-fontSize);
16
16
  font-weight: var(--typography-display-3xl-fontWeight);
17
17
  line-height: var(--typography-display-3xl-lineHeight);
18
18
  letter-spacing: var(--typography-display-3xl-letterSpacing);
19
19
  font-family: var(--typography-display-3xl-fontFamily);
20
20
  }
21
-
22
- /* 2xl */
23
- .bd-display['2xl'],
24
- .bd-display.k2xl {
25
- font-size: var(--typography-display-2xl-fontSize);
21
+ /* xxl */
22
+ .bd-display.xxl {
23
+ font-size: var(--typography-display-2xl-fontSize);
26
24
  font-weight: var(--typography-display-2xl-fontWeight);
27
25
  line-height: var(--typography-display-2xl-lineHeight);
28
26
  letter-spacing: var(--typography-display-2xl-letterSpacing);
29
27
  font-family: var(--typography-display-2xl-fontFamily);
30
28
  }
31
-
32
29
  /* xl */
33
30
  .bd-display.xl {
34
31
  font-size: var(--typography-display-xl-fontSize);
@@ -4,17 +4,29 @@ import displayCSS from "./display.css.js";
4
4
 
5
5
  export class BdDisplay extends LitElement {
6
6
  static properties = {
7
- kind: { type: String, reflect: true } // "3xl", "2xl", "xl", "lg", "md", "sm"
7
+ kind : { type: String, reflect: true }, // "xxxl", "xxl", "xl", "lg", "md", "sm"
8
+ color: { type: String, reflect: true }, // Custom text color
9
+ align: { type: String, reflect: true } // "left", "center", "right"
8
10
  };
9
11
 
10
12
  constructor() {
11
13
  super();
12
14
  this.kind = "lg"; // Default medium display
15
+ this.color = "";
16
+ this.align = "left"; // Default left alignment
13
17
  }
14
18
 
15
19
  render() {
20
+ const styles = [];
21
+ if (this.color) {
22
+ styles.push(`color: ${this.color}`);
23
+ }
24
+ if (this.align) {
25
+ styles.push(`text-align: ${this.align}`);
26
+ }
27
+
16
28
  return html`
17
- <div class="bd-display ${this.kind}">
29
+ <div class="bd-display ${this.kind}" style="${styles.join('; ')}">
18
30
  <slot></slot>
19
31
  </div>
20
32
  `;