@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,10 +1,10 @@
1
1
  import { html } from 'lit';
2
- import './pricing-card.js';
2
+ import './pricing-card.js';
3
3
 
4
4
  export default {
5
- title: 'Components/Pricing Cards',
5
+ title : 'Components/Pricing Cards',
6
6
  component: 'bd-pricing-container',
7
- tags: ["autodocs"],
7
+ tags : ["autodocs"]
8
8
  };
9
9
 
10
10
  const Template = () => html`<bd-pricing-container></bd-pricing-container>`;
@@ -2,22 +2,218 @@ import { html } from 'lit';
2
2
 
3
3
  export default {
4
4
  title: 'Design Tokens/Fonts',
5
+ tags : ['autodocs'],
6
+
7
+ argTypes: {
8
+ sampleText: {
9
+ control : 'text',
10
+ description: 'Text sample to display',
11
+ table : {
12
+ type : { summary: 'string' },
13
+ defaultValue: { summary: 'The quick brown fox jumps over the lazy dog.' }
14
+ }
15
+ },
16
+ fontSize: {
17
+ control : { type: 'select' },
18
+ options : ['small', 'medium', 'large', 'xlarge'],
19
+ description: 'Font size demonstration',
20
+ table : {
21
+ type : { summary: 'string' },
22
+ defaultValue: { summary: 'medium' }
23
+ }
24
+ }
25
+ },
26
+
27
+ parameters: {
28
+ docs: {
29
+ description: {
30
+ component: `
31
+ # Font Tokens & Typography System
32
+
33
+ Design tokens and typography system using IBM Plex font family.
34
+
35
+ ## Overview
36
+
37
+ This system uses IBM Plex as the primary font family with CSS custom properties for consistent typography across the application.
38
+
39
+ ## Font Families
40
+
41
+ ### IBM Plex Sans
42
+ Primary font for UI text, headings, and body content.
43
+
44
+ **CSS Custom Property:** \`--font-family-sans\`
45
+
46
+ ### IBM Plex Mono
47
+ Monospaced font for code, technical content, and data display.
48
+
49
+ **CSS Custom Property:** \`--font-family-mono\`
50
+
51
+ ## Usage
52
+
53
+ ### In CSS
54
+ \`\`\`css
55
+ /* Using CSS custom properties */
56
+ .element {
57
+ font-family: var(--font-family-sans);
58
+ font-weight: 600;
59
+ }
60
+
61
+ .code-block {
62
+ font-family: var(--font-family-mono);
63
+ font-size: 0.875rem;
64
+ }
65
+ \`\`\`
66
+
67
+ ### In HTML with Classes
68
+ \`\`\`html
69
+ <div class="sans-normal">Regular text</div>
70
+ <div class="sans-semibold">Semi-bold text</div>
71
+ <div class="mono-regular">Code example</div>
72
+ \`\`\`
73
+
74
+ ## Available Weights & Styles
75
+
76
+ ### IBM Plex Sans
77
+ | Class | Weight | Style | Use Case |
78
+ |-------|--------|-------|----------|
79
+ | \`.sans-normal\` | 400 | Normal | Body text, paragraphs |
80
+ | \`.sans-semibold\` | 600 | Normal | Subheadings, emphasis |
81
+ | \`.sans-bold\` | 700 | Normal | Headings, titles |
82
+ | \`.sans-italic\` | 400 | Italic | Quotes, highlights |
83
+
84
+ ### IBM Plex Mono
85
+ | Class | Weight | Style | Use Case |
86
+ |-------|--------|-------|----------|
87
+ | \`.mono-regular\` | 400 | Normal | Code snippets, technical text |
88
+ | \`.mono-bold\` | 700 | Normal | Important code, errors |
89
+ | \`.mono-italic\` | 400 | Italic | Comments, annotations |
90
+
91
+ ## CSS Custom Properties
92
+
93
+ \`\`\`css
94
+ :root {
95
+ /* Font families */
96
+ --font-family-sans: 'IBM Plex Sans', Arial, sans-serif;
97
+ --font-family-mono: 'IBM Plex Mono', monospace;
98
+
99
+ /* Font sizes */
100
+ --font-size-xs: 0.75rem; /* 12px */
101
+ --font-size-sm: 0.875rem; /* 14px */
102
+ --font-size-md: 1rem; /* 16px */
103
+ --font-size-lg: 1.125rem; /* 18px */
104
+ --font-size-xl: 1.25rem; /* 20px */
105
+ --font-size-2xl: 1.5rem; /* 24px */
106
+ --font-size-3xl: 1.875rem; /* 30px */
107
+ --font-size-4xl: 2.25rem; /* 36px */
108
+
109
+ /* Line heights */
110
+ --line-height-tight: 1.25;
111
+ --line-height-normal: 1.5;
112
+ --line-height-relaxed: 1.75;
113
+ }
114
+ \`\`\`
115
+
116
+ ## Best Practices
117
+
118
+ 1. **Use semantic HTML**: Always use proper heading tags (h1-h6) for structure
119
+ 2. **Respect hierarchy**: Maintain consistent font size hierarchy
120
+ 3. **Contrast ratio**: Ensure minimum 4.5:1 contrast for normal text
121
+ 4. **Line length**: Keep line length between 50-75 characters for readability
122
+ 5. **Responsive**: Use relative units (rem, em) for font sizes
123
+
124
+ ## Browser Support
125
+
126
+ IBM Plex is supported in all modern browsers:
127
+ - Chrome 60+
128
+ - Firefox 55+
129
+ - Safari 11+
130
+ - Edge 79+
131
+
132
+ ## Loading Fonts
133
+
134
+ Fonts are loaded via \`@font-face\` declarations in the global styles:
135
+
136
+ \`\`\`css
137
+ @font-face {
138
+ font-family: 'IBM Plex Sans';
139
+ font-style: normal;
140
+ font-weight: 400;
141
+ src: url('/fonts/ibm-plex-sans-regular.woff2') format('woff2');
142
+ }
143
+
144
+ @font-face {
145
+ font-family: 'IBM Plex Sans';
146
+ font-style: italic;
147
+ font-weight: 400;
148
+ src: url('/fonts/ibm-plex-sans-italic.woff2') format('woff2');
149
+ }
150
+
151
+ @font-face {
152
+ font-family: 'IBM Plex Sans';
153
+ font-style: normal;
154
+ font-weight: 600;
155
+ src: url('/fonts/ibm-plex-sans-semibold.woff2') format('woff2');
156
+ }
157
+
158
+ @font-face {
159
+ font-family: 'IBM Plex Sans';
160
+ font-style: normal;
161
+ font-weight: 700;
162
+ src: url('/fonts/ibm-plex-sans-bold.woff2') format('woff2');
163
+ }
164
+
165
+ @font-face {
166
+ font-family: 'IBM Plex Mono';
167
+ font-style: normal;
168
+ font-weight: 400;
169
+ src: url('/fonts/ibm-plex-mono-regular.woff2') format('woff2');
170
+ }
171
+
172
+ @font-face {
173
+ font-family: 'IBM Plex Mono';
174
+ font-style: italic;
175
+ font-weight: 400;
176
+ src: url('/fonts/ibm-plex-mono-italic.woff2') format('woff2');
177
+ }
178
+
179
+ @font-face {
180
+ font-family: 'IBM Plex Mono';
181
+ font-style: normal;
182
+ font-weight: 700;
183
+ src: url('/fonts/ibm-plex-mono-bold.woff2') format('woff2');
184
+ }
185
+ \`\`\`
186
+ `
187
+ }
188
+ }
189
+ }
5
190
  };
6
191
 
7
- export const FontFace = () => html`
192
+ const Template = (args) => html`
8
193
  <style>
9
194
  section {
10
195
  margin-bottom: 24px;
196
+ padding: 16px;
197
+ background: white;
198
+ border-radius: 8px;
199
+ box-shadow: 0 2px 4px rgba(0,0,0,0.1);
11
200
  }
12
201
  h3 {
13
202
  font-family: var(--font-family-sans, 'IBM Plex Sans', Arial, sans-serif);
14
203
  font-weight: 600;
15
204
  font-size: 1.2rem;
16
205
  margin-bottom: 12px;
206
+ color: #333;
207
+ border-bottom: 2px solid #f0f0f0;
208
+ padding-bottom: 8px;
17
209
  }
18
210
  .sample {
19
211
  margin-bottom: 12px;
20
212
  font-size: 1.1rem;
213
+ line-height: 1.5;
214
+ padding: 8px;
215
+ background: #fafafa;
216
+ border-radius: 4px;
21
217
  }
22
218
  .sans-normal {
23
219
  font-family: var(--font-family-sans, 'IBM Plex Sans', Arial, sans-serif);
@@ -43,31 +239,162 @@ export const FontFace = () => html`
43
239
  font-family: var(--font-family-mono, 'IBM Plex Mono', monospace);
44
240
  font-weight: 400;
45
241
  font-style: normal;
242
+ background: #f5f5f5;
243
+ border-left: 3px solid #ddd;
46
244
  }
47
245
  .mono-bold {
48
246
  font-family: var(--font-family-mono, 'IBM Plex Mono', monospace);
49
247
  font-weight: 700;
50
248
  font-style: normal;
249
+ background: #f5f5f5;
250
+ border-left: 3px solid #ddd;
51
251
  }
52
252
  .mono-italic {
53
253
  font-family: var(--font-family-mono, 'IBM Plex Mono', monospace);
54
254
  font-weight: 400;
55
255
  font-style: italic;
256
+ background: #f5f5f5;
257
+ border-left: 3px solid #ddd;
258
+ }
259
+ .font-info {
260
+ font-family: var(--font-family-mono, 'IBM Plex Mono', monospace);
261
+ font-size: 0.85rem;
262
+ color: #666;
263
+ margin-top: 4px;
264
+ padding-left: 12px;
265
+ }
266
+ .token-display {
267
+ background: #2d2d2d;
268
+ color: #fff;
269
+ padding: 12px;
270
+ border-radius: 4px;
271
+ font-family: var(--font-family-mono, 'IBM Plex Mono', monospace);
272
+ font-size: 0.9rem;
273
+ margin-top: 16px;
274
+ }
275
+ .token-property {
276
+ color: #9cdcfe;
277
+ }
278
+ .token-value {
279
+ color: #ce9178;
56
280
  }
57
281
  </style>
58
282
 
59
283
  <section>
60
284
  <h3>IBM Plex Sans - Weights & Styles</h3>
61
- <div class="sample sans-normal">Regular 400 - The quick brown fox jumps over the lazy dog.</div>
62
- <div class="sample sans-semibold">SemiBold 600 - The quick brown fox jumps over the lazy dog.</div>
63
- <div class="sample sans-bold">Bold 700 - The quick brown fox jumps over the lazy dog.</div>
64
- <div class="sample sans-italic">Italic 400 - The quick brown fox jumps over the lazy dog.</div>
285
+ <div class="sample sans-normal">
286
+ ${args.sampleText}
287
+ <div class="font-info">font-family: var(--font-family-sans); font-weight: 400;</div>
288
+ </div>
289
+ <div class="sample sans-semibold">
290
+ ${args.sampleText}
291
+ <div class="font-info">font-family: var(--font-family-sans); font-weight: 600;</div>
292
+ </div>
293
+ <div class="sample sans-bold">
294
+ ${args.sampleText}
295
+ <div class="font-info">font-family: var(--font-family-sans); font-weight: 700;</div>
296
+ </div>
297
+ <div class="sample sans-italic">
298
+ ${args.sampleText}
299
+ <div class="font-info">font-family: var(--font-family-sans); font-weight: 400; font-style: italic;</div>
300
+ </div>
65
301
  </section>
66
302
 
67
303
  <section>
68
304
  <h3>IBM Plex Mono - Weights & Styles</h3>
69
- <div class="sample mono-regular">Regular 400 - The quick brown fox jumps over the lazy dog.</div>
70
- <div class="sample mono-bold">Bold 700 - The quick brown fox jumps over the lazy dog.</div>
71
- <div class="sample mono-italic">Italic 400 - The quick brown fox jumps over the lazy dog.</div>
305
+ <div class="sample mono-regular">
306
+ ${args.sampleText}
307
+ <div class="font-info">font-family: var(--font-family-mono); font-weight: 400;</div>
308
+ </div>
309
+ <div class="sample mono-bold">
310
+ ${args.sampleText}
311
+ <div class="font-info">font-family: var(--font-family-mono); font-weight: 700;</div>
312
+ </div>
313
+ <div class="sample mono-italic">
314
+ ${args.sampleText}
315
+ <div class="font-info">font-family: var(--font-family-mono); font-weight: 400; font-style: italic;</div>
316
+ </div>
317
+ </section>
318
+
319
+ <section>
320
+ <h3>CSS Custom Properties</h3>
321
+ <div class="token-display">
322
+ <span class="token-property">--font-family-sans</span>: <span class="token-value">'IBM Plex Sans', Arial, sans-serif</span>;<br>
323
+ <span class="token-property">--font-family-mono</span>: <span class="token-value">'IBM Plex Mono', monospace</span>;<br><br>
324
+ <span class="token-property">.sans-normal</span> {<br>
325
+ &nbsp;&nbsp;<span class="token-property">font-family</span>: <span class="token-value">var(--font-family-sans)</span>;<br>
326
+ &nbsp;&nbsp;<span class="token-property">font-weight</span>: <span class="token-value">400</span>;<br>
327
+ }<br><br>
328
+ <span class="token-property">.mono-regular</span> {<br>
329
+ &nbsp;&nbsp;<span class="token-property">font-family</span>: <span class="token-value">var(--font-family-mono)</span>;<br>
330
+ &nbsp;&nbsp;<span class="token-property">font-weight</span>: <span class="token-value">400</span>;<br>
331
+ }
332
+ </div>
72
333
  </section>
73
334
  `;
335
+
336
+ export const Default = Template.bind({});
337
+ Default.args = {
338
+ sampleText: 'The quick brown fox jumps over the lazy dog.',
339
+ fontSize : 'medium'
340
+ };
341
+
342
+ export const CustomText = Template.bind({});
343
+ CustomText.args = {
344
+ sampleText: 'Typography is the craft of arranging type to make language visible.',
345
+ fontSize : 'medium'
346
+ };
347
+
348
+ export const TechnicalExample = () => html`
349
+ <style>
350
+ .code-example {
351
+ background: #1e1e1e;
352
+ color: #d4d4d4;
353
+ padding: 20px;
354
+ border-radius: 8px;
355
+ font-family: var(--font-family-mono, 'IBM Plex Mono', monospace);
356
+ font-size: 0.9rem;
357
+ line-height: 1.6;
358
+ margin: 16px 0;
359
+ }
360
+ .code-comment { color: #6a9955; }
361
+ .code-keyword { color: #569cd6; }
362
+ .code-string { color: #ce9178; }
363
+ .code-function { color: #dcdcaa; }
364
+ .code-number { color: #b5cea8; }
365
+ </style>
366
+
367
+ <section style="background: white; padding: 20px; border-radius: 8px;">
368
+ <h3 class="sans-semibold">Real-world Usage Example</h3>
369
+
370
+ <div class="sans-normal" style="margin-bottom: 16px;">
371
+ This is regular body text using IBM Plex Sans. It's used for most UI text and content.
372
+ </div>
373
+
374
+ <div class="sans-bold" style="margin-bottom: 16px;">
375
+ This is a bold heading using IBM Plex Sans. Perfect for section titles.
376
+ </div>
377
+
378
+ <h4 class="sans-semibold" style="margin: 16px 0 8px 0;">Code Example:</h4>
379
+ <div class="code-example">
380
+ <span class="code-comment">// JavaScript function example</span><br>
381
+ <span class="code-keyword">function</span> <span class="code-function">calculateTotal</span>(<span class="code-keyword">items</span>) {<br>
382
+ &nbsp;&nbsp;<span class="code-keyword">let</span> total = <span class="code-number">0</span>;<br>
383
+ &nbsp;&nbsp;<span class="code-keyword">for</span> (<span class="code-keyword">let</span> item <span class="code-keyword">of</span> items) {<br>
384
+ &nbsp;&nbsp;&nbsp;&nbsp;total += item.price * item.quantity;<br>
385
+ &nbsp;&nbsp;}<br>
386
+ &nbsp;&nbsp;<span class="code-keyword">return</span> total.<span class="code-function">toFixed</span>(<span class="code-number">2</span>);<br>
387
+ }<br><br>
388
+ <span class="code-comment">// Configuration object</span><br>
389
+ <span class="code-keyword">const</span> config = {<br>
390
+ &nbsp;&nbsp;apiUrl: <span class="code-string">'https://api.example.com/v1'</span>,<br>
391
+ &nbsp;&nbsp;timeout: <span class="code-number">5000</span>,<br>
392
+ &nbsp;&nbsp;retries: <span class="code-number">3</span><br>
393
+ };
394
+ </div>
395
+
396
+ <div class="sans-italic" style="margin-top: 16px; color: #666;">
397
+ Note: Code blocks use IBM Plex Mono for better readability of technical content.
398
+ </div>
399
+ </section>
400
+ `;