@repobit/dex-system-design 0.22.11 → 0.23.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 (39) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/package.json +4 -3
  3. package/src/components/Button/button.stories.js +292 -120
  4. package/src/components/accordion/accordion-bg.css.js +7 -2
  5. package/src/components/accordion/accordion-bg.stories.js +268 -449
  6. package/src/components/accordion/accordion.stories.js +259 -265
  7. package/src/components/anchor/anchor.stories.js +160 -159
  8. package/src/components/awards/awards-icon.js +44 -0
  9. package/src/components/awards/awards.css.js +328 -0
  10. package/src/components/awards/awards.js +224 -0
  11. package/src/components/awards/awards.stories.js +447 -0
  12. package/src/components/back/back.stories.js +100 -375
  13. package/src/components/badge/badge.stories.js +241 -129
  14. package/src/components/breadcrumb/breadcrumb.stories.js +218 -219
  15. package/src/components/cards/card.stories.js +174 -622
  16. package/src/components/carousel/carousel.stories.js +196 -225
  17. package/src/components/checkbox/checkbox.stories.js +136 -51
  18. package/src/components/compare/compare.css.js +237 -0
  19. package/src/components/compare/compare.js +253 -0
  20. package/src/components/compare/compare.stories.js +372 -0
  21. package/src/components/display/display.stories.js +91 -297
  22. package/src/components/divider/divider.stories.js +160 -342
  23. package/src/components/footer/footer.stories.js +177 -402
  24. package/src/components/header/header.stories.js +130 -338
  25. package/src/components/heading/heading.js +8 -5
  26. package/src/components/heading/heading.stories.js +162 -471
  27. package/src/components/highlight/highlight.stories.js +153 -38
  28. package/src/components/image/image.stories.js +135 -563
  29. package/src/components/input/custom-form.stories.js +761 -224
  30. package/src/components/link/link.js +29 -12
  31. package/src/components/link/link.stories.js +130 -468
  32. package/src/components/modal/modal.stories.js +174 -28
  33. package/src/components/paragraph/paragraph.css.js +10 -1
  34. package/src/components/paragraph/paragraph.stories.js +85 -410
  35. package/src/components/picture/picture.stories.js +147 -561
  36. package/src/components/radio/radio.stories.js +230 -81
  37. package/src/components/tabs/tabs.stories.js +126 -10
  38. package/src/components/termsOfUse/terms.stories.js +223 -8
  39. package/src/tokens/tokens.js +1 -0
@@ -1,422 +1,147 @@
1
1
  import { html } from 'lit';
2
- import '../heading/heading.js';
3
- import '../paragraph/paragraph.js';
4
2
  import './back.js';
5
3
 
6
4
  export default {
7
- title : 'Components/Back',
8
- component: 'bd-back',
9
- tags : ['autodocs'],
10
- argTypes : {
5
+ title : 'Components/Back',
6
+ tags : ['autodocs'],
7
+ parameters: {
8
+ docs: {
9
+ description: {
10
+ component: `
11
+ **BdBack** is a Lit web component that renders a back navigation button with an arrow icon.
12
+
13
+ ### Usage
14
+ \`\`\`html
15
+ <!-- Uses window.history.back() -->
16
+ <bd-back label="Back"></bd-back>
17
+
18
+ <!-- Navigates to a specific URL -->
19
+ <bd-back label="Go to Home" href="/"></bd-back>
20
+ \`\`\`
21
+
22
+ ### Behavior
23
+ - If \`href\` is provided, clicking navigates to that URL via \`window.location.href\`
24
+ - If \`href\` is empty, clicking calls \`window.history.back()\`
25
+ - Always renders a left-pointing arrow SVG icon alongside the label
26
+ `
27
+ }
28
+ }
29
+ },
30
+ argTypes: {
11
31
  label: {
12
32
  control : 'text',
13
- description: 'Text label displayed on the back button',
33
+ description: 'Text label displayed next to the back arrow icon',
14
34
  table : {
15
35
  type : { summary: 'string' },
16
- defaultValue: { summary: 'Back' }
36
+ defaultValue: { summary: 'Back' },
37
+ category : 'Content'
17
38
  }
18
39
  },
19
40
  href: {
20
41
  control : 'text',
21
- description: 'Optional URL for specific navigation target',
22
- table : {
23
- type : { summary: 'string' },
24
- defaultValue: { summary: '' }
25
- }
26
- },
27
- color: {
28
- control : 'color',
29
- description: 'Custom text color for the back button',
42
+ description: 'Optional URL to navigate to. If empty, `window.history.back()` is called instead.',
30
43
  table : {
31
44
  type : { summary: 'string' },
32
- defaultValue: { summary: 'var(--color-neutral-1000)' }
33
- }
34
- }
35
- },
36
- parameters: {
37
- docs: {
38
- description: {
39
- component: 'A mobile-inspired back button component with bold black styling designed for intuitive navigation. Provides both browser history navigation and specific URL targeting with consistent visual hierarchy.'
45
+ defaultValue: { summary: '' },
46
+ category : 'Behavior'
40
47
  }
41
48
  }
42
49
  }
43
50
  };
44
51
 
45
- const Template = ({ label, href, color }) => html`
46
- <bd-back
47
- label="${label}"
48
- href="${href}"
49
- style="${color ? `color: ${color};` : ''}"
50
- ></bd-back>
51
- `;
52
+ // ─── Stories ───────────────────────────────────────────────────────────────
52
53
 
53
- // ============ STORIES ============
54
-
55
- export const Default = Template.bind({});
56
- Default.args = {
57
- label: 'Back',
58
- href : '',
59
- color: ''
60
- };
61
- Default.parameters = {
62
- docs: {
63
- description: {
64
- story: 'Default back button with bold black styling. When clicked without an href, it uses the browser\'s history back() method to return to the previous page.'
65
- }
66
- }
67
- };
68
-
69
- export const CustomLabel = Template.bind({});
70
- CustomLabel.args = {
71
- label: 'Înapoi',
72
- href : '',
73
- color: ''
74
- };
75
- CustomLabel.parameters = {
76
- docs: {
77
- description: {
78
- story: 'Back button with localized or custom label text. Perfect for internationalization or specific application contexts where "Back" may not be appropriate.'
79
- }
80
- }
81
- };
82
-
83
- export const WithHref = Template.bind({});
84
- WithHref.args = {
85
- label: 'Back to Home',
86
- href : '/home',
87
- color: ''
88
- };
89
- WithHref.parameters = {
90
- docs: {
91
- description: {
92
- story: 'Back button that navigates to a specific URL when provided with an href attribute. Useful for when you need to direct users to a specific page rather than using browser history.'
93
- }
94
- }
95
- };
96
-
97
- export const ComponentShowcase = () => html`
98
- <div style="display: flex; flex-direction: column; gap: 3rem; max-width: 1000px; margin: 0 auto; padding: 2rem;">
99
- <bd-h as="h2" style="margin-bottom: 1rem;">Back Button Component Features</bd-h>
100
- <bd-p kind="regular" style="margin-bottom: 2rem;">
101
- Explore the versatile applications and design characteristics of the bold black back button component.
102
- </bd-p>
103
-
104
- <div style="border: 2px solid #e2e8f0; padding: 2rem; border-radius: 12px;">
105
- <bd-h as="h3" style="color: #3b82f6; margin-bottom: 1rem;">Standard Usage Patterns</bd-h>
106
- <div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem;">
107
- <div>
108
- <bd-h as="h4" style="margin-bottom: 0.5rem;">Browser History</bd-h>
109
- <bd-back label="Back"></bd-back>
110
- <bd-p kind="small" style="color: #64748b; margin-top: 0.5rem;">
111
- Uses <code>window.history.back()</code><br>
112
- No href attribute needed
113
- </bd-p>
114
- </div>
115
-
116
- <div>
117
- <bd-h as="h4" style="margin-bottom: 0.5rem;">Specific Navigation</bd-h>
118
- <bd-back label="Products" href="/products"></bd-back>
119
- <bd-p kind="small" style="color: #64748b; margin-top: 0.5rem;">
120
- Directs to specific URL<br>
121
- Uses anchor tag behavior
122
- </bd-p>
123
- </div>
124
-
125
- <div>
126
- <bd-h as="h4" style="margin-bottom: 0.5rem;">Localized</bd-h>
127
- <bd-back label="Retour"></bd-back>
128
- <bd-p kind="small" style="color: #64748b; margin-top: 0.5rem;">
129
- French localization example<br>
130
- Adapts to user language
131
- </bd-p>
132
- </div>
133
- </div>
134
- </div>
135
-
136
- <div style="border: 2px solid #e2e8f0; padding: 2rem; border-radius: 12px;">
137
- <bd-h as="h3" style="color: #3b82f6; margin-bottom: 1rem;">Design Characteristics</bd-h>
138
- <div style="display: grid; grid-template-columns: 1fr 1fr; gap: 2rem;">
139
- <div>
140
- <bd-h as="h4" style="margin-bottom: 1rem;">Visual Properties</bd-h>
141
- <bd-list type="unordered" spacing="sm" variant="default" orientation="vertical">
142
- <bd-li kind="bullet" size="md"><strong>Color:</strong> Bold black (#000 or --color-neutral-1000)</bd-li>
143
- <bd-li kind="bullet" size="md"><strong>Font Weight:</strong> Bold (600-700)</bd-li>
144
- <bd-li kind="bullet" size="md"><strong>Typography:</strong> Clean, readable font stack</bd-li>
145
- <bd-li kind="bullet" size="md"><strong>Spacing:</strong> Generous padding for touch targets</bd-li>
146
- <bd-li kind="bullet" size="md"><strong>Hover:</strong> Subtle opacity changes</bd-li>
147
- </bd-list>
148
- </div>
149
-
150
- <div>
151
- <bd-h as="h4" style="margin-bottom: 1rem;">Interaction Patterns</bd-h>
152
- <bd-list type="unordered" spacing="sm" variant="default" orientation="vertical">
153
- <bd-li kind="bullet" size="md"><strong>Click:</strong> Navigates back or to href</bd-li>
154
- <bd-li kind="bullet" size="md"><strong>Keyboard:</strong> Tab-accessible, Enter/Space activation</bd-li>
155
- <bd-li kind="bullet" size="md"><strong>Focus:</strong> Clear visual focus indicator</bd-li>
156
- <bd-li kind="bullet" size="md"><strong>Mobile:</strong> Large touch target (min 44px)</bd-li>
157
- <bd-li kind="bullet" size="md"><strong>States:</strong> Normal, hover, active, focus</bd-li>
158
- </bd-list>
159
- </div>
160
- </div>
161
- </div>
162
- </div>
163
- `;
164
- ComponentShowcase.parameters = {
165
- docs: {
166
- description: {
167
- story: 'Comprehensive showcase of back button features including standard usage patterns, design characteristics, and interaction behaviors with detailed technical specifications.'
54
+ export const Default = {
55
+ name : 'Default',
56
+ render : () => html`<bd-back label="Back"></bd-back>`,
57
+ parameters: {
58
+ docs: {
59
+ description: {
60
+ story: 'Default state with label "Back" and no `href`. Clicking calls `window.history.back()`.'
61
+ }
168
62
  }
169
63
  }
170
64
  };
171
65
 
172
- export const MobileContext = () => html`
173
- <div style="max-width: 400px; margin: 0 auto; padding: 1rem; background: #f8fafc; min-height: 100vh; border: 2px solid #e2e8f0; border-radius: 12px;">
174
- <div style="margin-bottom: 2rem;">
175
- <bd-back label="Back"></bd-back>
176
- </div>
177
-
178
- <div style="background: white; padding: 2rem; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.1);">
179
- <bd-h as="h2" style="margin-bottom: 1rem;">Product Details</bd-h>
180
- <bd-p kind="regular" style="margin-bottom: 1rem;">
181
- This mobile-style layout demonstrates the back button in its natural context. The bold black styling
182
- provides clear visual hierarchy and follows established mobile navigation patterns.
183
- </bd-p>
184
-
185
- <div style="background: #f0f9ff; padding: 1rem; border-radius: 8px; margin-top: 1.5rem;">
186
- <bd-h as="h4" style="color: #0369a1; margin-bottom: 0.5rem;">Mobile Design Principles</bd-h>
187
- <bd-list type="unordered" spacing="sm" variant="default" orientation="vertical">
188
- <bd-li kind="bullet" size="md">Top-left positioning for thumb reachability</bd-li>
189
- <bd-li kind="bullet" size="md">Bold color for immediate recognition</bd-li>
190
- <bd-li kind="bullet" size="md">Clear label for intuitive interaction</bd-li>
191
- <bd-li kind="bullet" size="md">Consistent with iOS/Android patterns</bd-li>
192
- </bd-list>
193
- </div>
194
- </div>
195
- </div>
196
- `;
197
- MobileContext.parameters = {
198
- docs: {
199
- description: {
200
- story: 'Mobile-optimized context showing the back button in a typical mobile application layout with design principles and best practices for mobile navigation.'
66
+ export const WithHref = {
67
+ name : 'With href',
68
+ render : () => html`<bd-back label="Go to Home" href="/"></bd-back>`,
69
+ parameters: {
70
+ docs: {
71
+ description: {
72
+ story: '`href` is set to `/`. Clicking navigates to the home page via `window.location.href`.'
73
+ }
201
74
  }
202
75
  }
203
76
  };
204
77
 
205
- export const MultipleVariants = () => html`
206
- <div style="display: flex; flex-direction: column; gap: 2rem; max-width: 600px; margin: 0 auto; padding: 2rem;">
207
- <bd-h as="h2" style="margin-bottom: 1rem;">Back Button Variants</bd-h>
208
-
209
- <div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem;">
210
- <div style="border: 1px solid #e2e8f0; padding: 1.5rem; border-radius: 8px;">
211
- <bd-h as="h4" style="margin-bottom: 1rem;">Standard</bd-h>
212
- <bd-back label="Back"></bd-back>
213
- <bd-p kind="small" style="color: #64748b; margin-top: 0.5rem;">
214
- Default browser history navigation
215
- </bd-p>
216
- </div>
217
-
218
- <div style="border: 1px solid #e2e8f0; padding: 1.5rem; border-radius: 8px;">
219
- <bd-h as="h4" style="margin-bottom: 1rem;">Localized</bd-h>
220
- <bd-back label="Înapoi"></bd-back>
221
- <bd-p kind="small" style="color: #64748b; margin-top: 0.5rem;">
222
- Romanian localization example
223
- </bd-p>
224
- </div>
225
-
226
- <div style="border: 1px solid #e2e8f0; padding: 1.5rem; border-radius: 8px;">
227
- <bd-h as="h4" style="margin-bottom: 1rem;">Specific Target</bd-h>
228
- <bd-back label="Back to Home" href="#home"></bd-back>
229
- <bd-p kind="small" style="color: #64748b; margin-top: 0.5rem;">
230
- Direct navigation to home page
231
- </bd-p>
232
- </div>
233
-
234
- <div style="border: 1px solid #e2e8f0; padding: 1.5rem; border-radius: 8px;">
235
- <bd-h as="h4" style="margin-bottom: 1rem;">With Icon</bd-h>
236
- <bd-back label="← Back" style="font-size: 0.9rem;"></bd-back>
237
- <bd-p kind="small" style="color: #64748b; margin-top: 0.5rem;">
238
- Optional arrow icon prefix
239
- </bd-p>
240
- </div>
241
- </div>
242
- </div>
243
- `;
244
- MultipleVariants.parameters = {
245
- docs: {
246
- description: {
247
- story: 'Collection of different back button variants demonstrating various use cases including localization, specific navigation targets, and optional icon integration.'
78
+ export const CustomLabel = {
79
+ name : 'Custom Label',
80
+ render : () => html`<bd-back label="Return to Dashboard" href="/dashboard"></bd-back>`,
81
+ parameters: {
82
+ docs: {
83
+ description: {
84
+ story: 'Custom label text "Return to Dashboard" with a specific href target.'
85
+ }
248
86
  }
249
87
  }
250
88
  };
251
89
 
252
- export const BackgroundContexts = () => html`
253
- <div style="display: flex; flex-direction: column; gap: 2rem; max-width: 800px; margin: 0 auto; padding: 2rem;">
254
- <bd-h as="h2" style="margin-bottom: 1rem;">Background Context Examples</bd-h>
255
-
256
- <div style="background: white; padding: 2rem; border-radius: 12px; border: 2px solid #e2e8f0;">
257
- <bd-h as="h3" style="margin-bottom: 1rem;">Light Background</bd-h>
258
- <bd-back label="Back"></bd-back>
259
- <bd-p kind="small" style="color: #64748b; margin-top: 1rem;">
260
- The bold black color provides maximum contrast and visibility on light backgrounds,
261
- ensuring the back button is immediately noticeable and accessible.
262
- </bd-p>
263
- </div>
264
-
265
- <div style="background: #1e293b; padding: 2rem; border-radius: 12px; border: 2px solid #334155;">
266
- <bd-h as="h3" style="color: white; margin-bottom: 1rem;">Dark Background</bd-h>
267
- <bd-back label="Back"></bd-back>
268
- <bd-p kind="small" style="color: #cbd5e1; margin-top: 1rem;">
269
- On dark backgrounds, the bold black styling maintains its strong visual presence
270
- while providing sufficient contrast for readability and accessibility.
271
- </bd-p>
272
- </div>
273
-
274
- <div style="background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); padding: 2rem; border-radius: 12px;">
275
- <bd-h as="h3" style="color: white; margin-bottom: 1rem;">Gradient Background</bd-h>
276
- <bd-back label="Back"></bd-back>
277
- <bd-p kind="small" style="color: rgba(255,255,255,0.8); margin-top: 1rem;">
278
- Even on complex gradient backgrounds, the bold black back button remains clearly
279
- visible and maintains its functional purpose as a navigation element.
280
- </bd-p>
281
- </div>
282
- </div>
283
- `;
284
- BackgroundContexts.parameters = {
285
- docs: {
286
- description: {
287
- story: 'Back button displayed across different background contexts demonstrating its versatility and consistent visibility on light, dark, and gradient backgrounds.'
90
+ export const LongLabel = {
91
+ name : 'Long Label',
92
+ render : () => html`<bd-back label="Go back to the previous page" href="/previous"></bd-back>`,
93
+ parameters: {
94
+ docs: {
95
+ description: {
96
+ story: 'Tests rendering with a long label string to verify text and icon alignment remain intact.'
97
+ }
288
98
  }
289
99
  }
290
100
  };
291
101
 
292
- export const AccessibilityFeatures = () => html`
293
- <div style="max-width: 800px; margin: 0 auto; padding: 2rem;">
294
- <bd-h as="h2" style="margin-bottom: 1rem;">Accessibility Implementation</bd-h>
295
- <bd-p kind="regular" style="margin-bottom: 2rem;">
296
- The back button component is built with accessibility as a core principle, ensuring
297
- all users can effectively navigate regardless of their abilities or assistive technologies.
298
- </bd-p>
299
-
300
- <div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem;">
301
- <div style="border: 2px solid #10b981; padding: 1.5rem; border-radius: 8px; background: #f0fdf4;">
302
- <bd-h as="h3" style="color: #059669; margin-bottom: 1rem;">✅ Keyboard Navigation</bd-h>
303
- <bd-list type="unordered" spacing="sm" variant="default" orientation="vertical">
304
- <bd-li kind="bullet" size="md"><strong>Tab:</strong> Focusable in natural tab order</bd-li>
305
- <bd-li kind="bullet" size="md"><strong>Enter/Space:</strong> Activates the button</bd-li>
306
- <bd-li kind="bullet" size="md"><strong>Focus Indicator:</strong> Clear visual focus ring</bd-li>
307
- <bd-li kind="bullet" size="md"><strong>Skip Links:</strong> Compatible with skip navigation</bd-li>
308
- </bd-list>
309
- </div>
310
-
311
- <div style="border: 2px solid #3b82f6; padding: 1.5rem; border-radius: 8px; background: #eff6ff;">
312
- <bd-h as="h3" style="color: #1d4ed8; margin-bottom: 1rem;">✅ Screen Reader Support</bd-h>
313
- <bd-list type="unordered" spacing="sm" variant="default" orientation="vertical">
314
- <bd-li kind="bullet" size="md"><strong>Semantic HTML:</strong> Proper button or anchor element</bd-li>
315
- <bd-li kind="bullet" size="md"><strong>ARIA Labels:</strong> Descriptive accessible name</bd-li>
316
- <bd-li kind="bullet" size="md"><strong>State Announcement:</strong> Clear action description</bd-li>
317
- <bd-li kind="bullet" size="md"><strong>Role:</strong> Appropriate button or link role</bd-li>
318
- </bd-list>
319
- </div>
320
-
321
- <div style="border: 2px solid #8b5cf6; padding: 1.5rem; border-radius: 8px; background: #faf5ff;">
322
- <bd-h as="h3" style="color: #7c3aed; margin-bottom: 1rem;">✅ Visual Accessibility</bd-h>
323
- <bd-list type="unordered" spacing="sm" variant="default" orientation="vertical">
324
- <bd-li kind="bullet" size="md"><strong>Contrast Ratio:</strong> WCAG AA compliant (4.5:1+)</bd-li>
325
- <bd-li kind="bullet" size="md"><strong>Text Size:</strong> Responsive and scalable</bd-li>
326
- <bd-li kind="bullet" size="md"><strong>Touch Target:</strong> Minimum 44px for mobile</bd-li>
327
- <bd-li kind="bullet" size="md"><strong>Color Independence:</strong> Not reliant on color alone</bd-li>
328
- </bd-list>
329
- </div>
330
- </div>
331
-
332
- <div style="margin-top: 2rem; padding: 1.5rem; background: #f8fafc; border-radius: 8px;">
333
- <bd-h as="h3" style="margin-bottom: 1rem;">Testing Instructions</bd-h>
334
- <bd-p kind="small" style="color: #64748b;">
335
- <strong>Keyboard Test:</strong> Try tabbing to the back button and activating it with Enter/Space<br>
336
- <strong>Screen Reader Test:</strong> Listen to how the button is announced with NVDA, JAWS, or VoiceOver<br>
337
- <strong>Zoom Test:</strong> Increase browser zoom to 200% to verify text remains readable<br>
338
- <strong>Color Test:</strong> Use grayscale mode to ensure the button remains distinguishable
339
- </bd-p>
340
- </div>
341
- </div>
342
- `;
343
- AccessibilityFeatures.parameters = {
344
- docs: {
345
- description: {
346
- story: 'Comprehensive accessibility documentation covering keyboard navigation, screen reader support, visual accessibility features, and testing procedures for the back button component.'
102
+ export const NoLabel = {
103
+ name : 'No Label (empty string)',
104
+ render : () => html`<bd-back label=""></bd-back>`,
105
+ parameters: {
106
+ docs: {
107
+ description: {
108
+ story: 'Edge case: `label` set to an empty string. Only the arrow icon is visible.'
109
+ }
347
110
  }
348
111
  }
349
112
  };
350
113
 
351
- export const InteractiveDemo = () => {
352
- return html`
353
- <div style="max-width: 800px; margin: 0 auto; padding: 2rem;">
354
- <bd-h as="h2" style="margin-bottom: 2rem;">Interactive Back Button Demo</bd-h>
355
-
356
- <div style="display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; margin-bottom: 3rem;">
357
- <div>
358
- <bd-h as="h3" style="margin-bottom: 1rem;">Navigation Behavior</bd-h>
359
- <div style="display: flex; flex-direction: column; gap: 1rem;">
360
- <bd-back label="Back (History)"></bd-back>
361
- <bd-p kind="small" style="color: #64748b;">
362
- Uses: <code>window.history.back()</code><br>
363
- Returns to previous page in browser history
364
- </bd-p>
365
-
366
- <bd-back label="Go Home" href="#home-demo"></bd-back>
367
- <bd-p kind="small" style="color: #64748b;">
368
- Uses: Anchor tag with href<br>
369
- Navigates to specific URL location
370
- </bd-p>
371
- </div>
372
- </div>
373
-
374
- <div>
375
- <bd-h as="h3" style="margin-bottom: 1rem;">Design Specifications</bd-h>
376
- <div style="background: #f8fafc; padding: 1.5rem; border-radius: 8px;">
377
- <bd-list type="unordered" spacing="sm" variant="default" orientation="vertical">
378
- <bd-li kind="bullet" size="md"><strong>Color:</strong> var(--color-neutral-1000)</bd-li>
379
- <bd-li kind="bullet" size="md"><strong>Font Weight:</strong> var(--typography-fontWeight-bold)</bd-li>
380
- <bd-li kind="bullet" size="md"><strong>Font Size:</strong> var(--typography-fontSize-base)</bd-li>
381
- <bd-li kind="bullet" size="md"><strong>Padding:</strong> var(--spacing-12) var(--spacing-16)</bd-li>
382
- <bd-li kind="bullet" size="md"><strong>Border Radius:</strong> var(--radius-sm)</bd-li>
383
- <bd-li kind="bullet" size="md"><strong>Transition:</strong> opacity 0.2s ease</bd-li>
384
- </bd-list>
385
- </div>
386
- </div>
387
- </div>
388
-
389
- <div style="background: #f0f9ff; padding: 1.5rem; border-radius: 8px;">
390
- <bd-h as="h3" style="color: #0369a1; margin-bottom: 1rem;">Mobile-First Design Principles</bd-h>
391
- <bd-list type="unordered" spacing="sm" variant="default" orientation="vertical">
392
- <bd-li kind="bullet" size="md"><strong>Thumb-Friendly:</strong> Positioned in top-left for easy reach</bd-li>
393
- <bd-li kind="bullet" size="md"><strong>Clear Hierarchy:</strong> Bold styling for immediate recognition</bd-li>
394
- <bd-li kind="bullet" size="md"><strong>Consistent Patterns:</strong> Follows iOS/Android navigation standards</bd-li>
395
- <bd-li kind="bullet" size="md"><strong>Touch Optimized:</strong> Minimum 44px touch target size</bd-li>
396
- <bd-li kind="bullet" size="md"><strong>Performance:</strong> Fast, responsive interaction</bd-li>
397
- </bd-list>
398
- </div>
399
- </div>
400
- `;
401
- };
402
- InteractiveDemo.parameters = {
403
- docs: {
404
- description: {
405
- story: 'Interactive demonstration showcasing back button navigation behaviors, design specifications, and mobile-first design principles with detailed technical implementation.'
114
+ export const NoHref = {
115
+ name : 'No href (history.back)',
116
+ render: () => html`
117
+ <p style="font-size: 14px; margin-bottom: 12px;">
118
+ No <code>href</code> provided — clicking calls <code>window.history.back()</code>.
119
+ </p>
120
+ <bd-back label="Back"></bd-back>
121
+ `,
122
+ parameters: {
123
+ docs: {
124
+ description: {
125
+ story: 'No `href` attribute set. Demonstrates the fallback behavior to `window.history.back()`.'
126
+ }
406
127
  }
407
128
  }
408
129
  };
409
130
 
410
- export const InteractivePlayground = Template.bind({});
411
- InteractivePlayground.args = {
412
- label: 'Back',
413
- href : '',
414
- color: ''
415
- };
416
- InteractivePlayground.parameters = {
417
- docs: {
418
- description: {
419
- story: 'Interactive playground where you can test all back button properties in real-time. Use the controls panel to modify the label, href, and color properties.'
131
+ export const Playground = {
132
+ name: '🛝 Playground',
133
+ args: {
134
+ label: 'Back',
135
+ href : ''
136
+ },
137
+ render: (args) => html`
138
+ <bd-back label="${args.label}" href="${args.href}"></bd-back>
139
+ `,
140
+ parameters: {
141
+ docs: {
142
+ description: {
143
+ story: 'Fully interactive. Use Controls to change the label and href in real time.'
144
+ }
420
145
  }
421
146
  }
422
147
  };