@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.
- package/CHANGELOG.md +19 -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
|
@@ -6,38 +6,63 @@ import './link.js';
|
|
|
6
6
|
export default {
|
|
7
7
|
title : 'Atoms/Link',
|
|
8
8
|
component: 'bd-link',
|
|
9
|
+
tags : ['autodocs'],
|
|
9
10
|
argTypes : {
|
|
10
11
|
href: {
|
|
11
12
|
control : 'text',
|
|
12
|
-
description: 'URL destination'
|
|
13
|
+
description: 'URL destination for the link',
|
|
14
|
+
table : {
|
|
15
|
+
type : { summary: 'string' },
|
|
16
|
+
defaultValue: { summary: '#' }
|
|
17
|
+
}
|
|
13
18
|
},
|
|
14
19
|
target: {
|
|
15
20
|
control : { type: 'select' },
|
|
16
21
|
options : ['_self', '_blank', '_parent', '_top'],
|
|
17
|
-
description: 'Link target attribute'
|
|
22
|
+
description: 'Link target attribute for browser behavior',
|
|
23
|
+
table : {
|
|
24
|
+
type : { summary: 'string' },
|
|
25
|
+
defaultValue: { summary: '_self' }
|
|
26
|
+
}
|
|
18
27
|
},
|
|
19
28
|
kind: {
|
|
20
29
|
control : { type: 'select' },
|
|
21
30
|
options : ['primary', 'secondary', 'danger', 'subtle', 'bold'],
|
|
22
|
-
description: '
|
|
31
|
+
description: 'Visual style variant for the link',
|
|
32
|
+
table : {
|
|
33
|
+
type : { summary: 'string' },
|
|
34
|
+
defaultValue: { summary: 'primary' }
|
|
35
|
+
}
|
|
23
36
|
},
|
|
24
37
|
underline: {
|
|
25
38
|
control : 'boolean',
|
|
26
|
-
description: 'Always show underline'
|
|
39
|
+
description: 'Always show underline regardless of hover state',
|
|
40
|
+
table : {
|
|
41
|
+
type : { summary: 'boolean' },
|
|
42
|
+
defaultValue: { summary: 'false' }
|
|
43
|
+
}
|
|
27
44
|
},
|
|
28
45
|
disabled: {
|
|
29
46
|
control : 'boolean',
|
|
30
|
-
description: 'Disabled state'
|
|
47
|
+
description: 'Disabled state that prevents interaction',
|
|
48
|
+
table : {
|
|
49
|
+
type : { summary: 'boolean' },
|
|
50
|
+
defaultValue: { summary: 'false' }
|
|
51
|
+
}
|
|
31
52
|
},
|
|
32
53
|
content: {
|
|
33
54
|
control : 'text',
|
|
34
|
-
description: 'Link text content'
|
|
55
|
+
description: 'Link text content',
|
|
56
|
+
table : {
|
|
57
|
+
type : { summary: 'string' },
|
|
58
|
+
defaultValue: { summary: 'Link Text' }
|
|
59
|
+
}
|
|
35
60
|
}
|
|
36
61
|
},
|
|
37
62
|
parameters: {
|
|
38
63
|
docs: {
|
|
39
64
|
description: {
|
|
40
|
-
component: 'A customizable link component with multiple
|
|
65
|
+
component: 'A highly customizable link component with multiple visual variants, accessibility features, and interactive states. Supports both internal and external links with proper semantic HTML.'
|
|
41
66
|
}
|
|
42
67
|
}
|
|
43
68
|
}
|
|
@@ -55,37 +80,91 @@ const Template = ({ href, target, kind, underline, disabled, content }) => html`
|
|
|
55
80
|
</bd-link>
|
|
56
81
|
`;
|
|
57
82
|
|
|
83
|
+
// ============ STORIES ============
|
|
84
|
+
|
|
85
|
+
export const Default = Template.bind({});
|
|
86
|
+
Default.args = {
|
|
87
|
+
href : '#',
|
|
88
|
+
target : '_self',
|
|
89
|
+
kind : 'primary',
|
|
90
|
+
underline: false,
|
|
91
|
+
disabled : false,
|
|
92
|
+
content : 'Default Link'
|
|
93
|
+
};
|
|
94
|
+
Default.parameters = {
|
|
95
|
+
docs: {
|
|
96
|
+
description: {
|
|
97
|
+
story: 'Default link component with primary styling. This is the most commonly used link variant throughout the application.'
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
|
|
58
102
|
export const AllVariants = () => html`
|
|
59
|
-
<div style="display: flex; flex-direction: column; gap:
|
|
60
|
-
<
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
<div>
|
|
65
|
-
<bd-p kind="regular">This is a paragraph with a <bd-link href="#" kind="secondary">secondary link</bd-link> inside the text.</bd-p>
|
|
66
|
-
</div>
|
|
67
|
-
|
|
68
|
-
<div>
|
|
69
|
-
<bd-p kind="regular">This is a paragraph with a <bd-link href="#" kind="danger">danger link</bd-link> inside the text.</bd-p>
|
|
70
|
-
</div>
|
|
71
|
-
|
|
72
|
-
<div>
|
|
73
|
-
<bd-p kind="regular">This is a paragraph with a <bd-link href="#" kind="subtle">subtle link</bd-link> inside the text.</bd-p>
|
|
74
|
-
</div>
|
|
75
|
-
|
|
76
|
-
<div>
|
|
77
|
-
<bd-p kind="regular">This is a paragraph with a <bd-link href="#" kind="bold">bold link</bd-link> inside the text.</bd-p>
|
|
78
|
-
</div>
|
|
79
|
-
|
|
80
|
-
<div>
|
|
81
|
-
<bd-p kind="regular">This is a paragraph with a <bd-link href="#" kind="primary" underline>underlined link</bd-link> inside the text.</bd-p>
|
|
82
|
-
</div>
|
|
103
|
+
<div style="display: flex; flex-direction: column; gap: 2rem; max-width: 800px; margin: 0 auto; padding: 2rem;">
|
|
104
|
+
<bd-h as="h2" style="margin-bottom: 1rem;">All Link Variants</bd-h>
|
|
105
|
+
<bd-p kind="regular" style="margin-bottom: 2rem;">
|
|
106
|
+
Explore all available link variants and their recommended use cases. Each variant is designed for specific contexts and user interactions.
|
|
107
|
+
</bd-p>
|
|
83
108
|
|
|
84
|
-
<div>
|
|
85
|
-
<
|
|
109
|
+
<div style="display: flex; flex-direction: column; gap: 1.5rem;">
|
|
110
|
+
<div style="border: 2px solid #e2e8f0; padding: 1.5rem; border-radius: 8px;">
|
|
111
|
+
<bd-p kind="regular">This is a paragraph with a <bd-link href="#" kind="primary">primary link</bd-link> inside the text.</bd-p>
|
|
112
|
+
<bd-p kind="small" style="color: #64748b; margin-top: 0.5rem;">
|
|
113
|
+
<strong>Primary:</strong> Main calls-to-action, important navigation, key features
|
|
114
|
+
</bd-p>
|
|
115
|
+
</div>
|
|
116
|
+
|
|
117
|
+
<div style="border: 2px solid #e2e8f0; padding: 1.5rem; border-radius: 8px;">
|
|
118
|
+
<bd-p kind="regular">This is a paragraph with a <bd-link href="#" kind="secondary">secondary link</bd-link> inside the text.</bd-p>
|
|
119
|
+
<bd-p kind="small" style="color: #64748b; margin-top: 0.5rem;">
|
|
120
|
+
<strong>Secondary:</strong> Supporting links, less prominent actions, alternative navigation
|
|
121
|
+
</bd-p>
|
|
122
|
+
</div>
|
|
123
|
+
|
|
124
|
+
<div style="border: 2px solid #e2e8f0; padding: 1.5rem; border-radius: 8px;">
|
|
125
|
+
<bd-p kind="regular">This is a paragraph with a <bd-link href="#" kind="danger">danger link</bd-link> inside the text.</bd-p>
|
|
126
|
+
<bd-p kind="small" style="color: #64748b; margin-top: 0.5rem;">
|
|
127
|
+
<strong>Danger:</strong> Destructive actions, warnings, critical operations, error states
|
|
128
|
+
</bd-p>
|
|
129
|
+
</div>
|
|
130
|
+
|
|
131
|
+
<div style="border: 2px solid #e2e8f0; padding: 1.5rem; border-radius: 8px;">
|
|
132
|
+
<bd-p kind="regular">This is a paragraph with a <bd-link href="#" kind="subtle">subtle link</bd-link> inside the text.</bd-p>
|
|
133
|
+
<bd-p kind="small" style="color: #64748b; margin-top: 0.5rem;">
|
|
134
|
+
<strong>Subtle:</strong> Footer links, legal text, supplementary information, low emphasis
|
|
135
|
+
</bd-p>
|
|
136
|
+
</div>
|
|
137
|
+
|
|
138
|
+
<div style="border: 2px solid #e2e8f0; padding: 1.5rem; border-radius: 8px;">
|
|
139
|
+
<bd-p kind="regular">This is a paragraph with a <bd-link href="#" kind="bold">bold link</bd-link> inside the text.</bd-p>
|
|
140
|
+
<bd-p kind="small" style="color: #64748b; margin-top: 0.5rem;">
|
|
141
|
+
<strong>Bold:</strong> High emphasis, featured content, important references, key highlights
|
|
142
|
+
</bd-p>
|
|
143
|
+
</div>
|
|
144
|
+
|
|
145
|
+
<div style="border: 2px solid #e2e8f0; padding: 1.5rem; border-radius: 8px;">
|
|
146
|
+
<bd-p kind="regular">This is a paragraph with a <bd-link href="#" kind="primary" underline>underlined link</bd-link> inside the text.</bd-p>
|
|
147
|
+
<bd-p kind="small" style="color: #64748b; margin-top: 0.5rem;">
|
|
148
|
+
<strong>Underlined:</strong> Improved accessibility, formal content, academic references
|
|
149
|
+
</bd-p>
|
|
150
|
+
</div>
|
|
151
|
+
|
|
152
|
+
<div style="border: 2px solid #e2e8f0; padding: 1.5rem; border-radius: 8px;">
|
|
153
|
+
<bd-p kind="regular">This is a paragraph with a <bd-link href="#" kind="primary" disabled>disabled link</bd-link> inside the text.</bd-p>
|
|
154
|
+
<bd-p kind="small" style="color: #64748b; margin-top: 0.5rem;">
|
|
155
|
+
<strong>Disabled:</strong> Unavailable actions, conditional access, permission-based states
|
|
156
|
+
</bd-p>
|
|
157
|
+
</div>
|
|
86
158
|
</div>
|
|
87
159
|
</div>
|
|
88
160
|
`;
|
|
161
|
+
AllVariants.parameters = {
|
|
162
|
+
docs: {
|
|
163
|
+
description: {
|
|
164
|
+
story: 'Comprehensive overview of all link variants with detailed usage guidelines and context recommendations for each style option.'
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
};
|
|
89
168
|
|
|
90
169
|
export const Primary = Template.bind({});
|
|
91
170
|
Primary.args = {
|
|
@@ -96,6 +175,13 @@ Primary.args = {
|
|
|
96
175
|
disabled : false,
|
|
97
176
|
content : 'Primary Link'
|
|
98
177
|
};
|
|
178
|
+
Primary.parameters = {
|
|
179
|
+
docs: {
|
|
180
|
+
description: {
|
|
181
|
+
story: 'Primary link variant - Use for main calls-to-action, important navigation items, and key feature links. This is the default and most prominent link style.'
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
};
|
|
99
185
|
|
|
100
186
|
export const Secondary = Template.bind({});
|
|
101
187
|
Secondary.args = {
|
|
@@ -106,6 +192,13 @@ Secondary.args = {
|
|
|
106
192
|
disabled : false,
|
|
107
193
|
content : 'Secondary Link'
|
|
108
194
|
};
|
|
195
|
+
Secondary.parameters = {
|
|
196
|
+
docs: {
|
|
197
|
+
description: {
|
|
198
|
+
story: 'Secondary link variant - Ideal for supporting actions, less prominent navigation, and alternative pathways that don\'t require primary emphasis.'
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
};
|
|
109
202
|
|
|
110
203
|
export const Danger = Template.bind({});
|
|
111
204
|
Danger.args = {
|
|
@@ -116,6 +209,47 @@ Danger.args = {
|
|
|
116
209
|
disabled : false,
|
|
117
210
|
content : 'Danger Link'
|
|
118
211
|
};
|
|
212
|
+
Danger.parameters = {
|
|
213
|
+
docs: {
|
|
214
|
+
description: {
|
|
215
|
+
story: 'Danger link variant - Designed for destructive actions, warnings, critical operations, and error-related links. Use sparingly for high-attention scenarios.'
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
};
|
|
219
|
+
|
|
220
|
+
export const Subtle = Template.bind({});
|
|
221
|
+
Subtle.args = {
|
|
222
|
+
href : '#',
|
|
223
|
+
target : '_self',
|
|
224
|
+
kind : 'subtle',
|
|
225
|
+
underline: false,
|
|
226
|
+
disabled : false,
|
|
227
|
+
content : 'Subtle Link'
|
|
228
|
+
};
|
|
229
|
+
Subtle.parameters = {
|
|
230
|
+
docs: {
|
|
231
|
+
description: {
|
|
232
|
+
story: 'Subtle link variant - Perfect for low-emphasis contexts like footer links, legal text, supplementary information, and non-critical references.'
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
};
|
|
236
|
+
|
|
237
|
+
export const Bold = Template.bind({});
|
|
238
|
+
Bold.args = {
|
|
239
|
+
href : '#',
|
|
240
|
+
target : '_self',
|
|
241
|
+
kind : 'bold',
|
|
242
|
+
underline: false,
|
|
243
|
+
disabled : false,
|
|
244
|
+
content : 'Bold Link'
|
|
245
|
+
};
|
|
246
|
+
Bold.parameters = {
|
|
247
|
+
docs: {
|
|
248
|
+
description: {
|
|
249
|
+
story: 'Bold link variant - Use for high-emphasis scenarios, featured content, important references, and key highlights that need extra visual weight.'
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
};
|
|
119
253
|
|
|
120
254
|
export const WithUnderline = Template.bind({});
|
|
121
255
|
WithUnderline.args = {
|
|
@@ -126,6 +260,13 @@ WithUnderline.args = {
|
|
|
126
260
|
disabled : false,
|
|
127
261
|
content : 'Underlined Link'
|
|
128
262
|
};
|
|
263
|
+
WithUnderline.parameters = {
|
|
264
|
+
docs: {
|
|
265
|
+
description: {
|
|
266
|
+
story: 'Link with forced underline - Improves accessibility and clarity, especially useful in formal content, academic references, and dense text blocks.'
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
};
|
|
129
270
|
|
|
130
271
|
export const Disabled = Template.bind({});
|
|
131
272
|
Disabled.args = {
|
|
@@ -136,42 +277,231 @@ Disabled.args = {
|
|
|
136
277
|
disabled : true,
|
|
137
278
|
content : 'Disabled Link'
|
|
138
279
|
};
|
|
280
|
+
Disabled.parameters = {
|
|
281
|
+
docs: {
|
|
282
|
+
description: {
|
|
283
|
+
story: 'Disabled link state - Shows unavailable actions while maintaining visual context. Automatically prevents clicks and maintains semantic structure.'
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
};
|
|
287
|
+
|
|
288
|
+
export const TargetOptions = () => html`
|
|
289
|
+
<div style="display: flex; flex-direction: column; gap: 2rem; max-width: 800px; margin: 0 auto; padding: 2rem;">
|
|
290
|
+
<bd-h as="h2" style="margin-bottom: 1rem;">Link Target Options</bd-h>
|
|
291
|
+
<bd-p kind="regular" style="margin-bottom: 1rem;">
|
|
292
|
+
Different target attributes control how links open in the browser. Choose the appropriate option based on user experience needs.
|
|
293
|
+
</bd-p>
|
|
294
|
+
|
|
295
|
+
<div style="display: flex; flex-direction: column; gap: 1rem;">
|
|
296
|
+
<div>
|
|
297
|
+
<bd-link href="https://example.com" target="_self" kind="primary">
|
|
298
|
+
_self - Opens in same tab/window
|
|
299
|
+
</bd-link>
|
|
300
|
+
<bd-p kind="small" style="color: #64748b;">
|
|
301
|
+
Default behavior. Use for internal navigation and same-context links.
|
|
302
|
+
</bd-p>
|
|
303
|
+
</div>
|
|
304
|
+
|
|
305
|
+
<div>
|
|
306
|
+
<bd-link href="https://example.com" target="_blank" kind="secondary">
|
|
307
|
+
_blank - Opens in new tab
|
|
308
|
+
</bd-link>
|
|
309
|
+
<bd-p kind="small" style="color: #64748b;">
|
|
310
|
+
For external links, references, and resources that shouldn\'t interrupt user flow.
|
|
311
|
+
</bd-p>
|
|
312
|
+
</div>
|
|
313
|
+
|
|
314
|
+
<div>
|
|
315
|
+
<bd-link href="https://example.com" target="_parent" kind="subtle">
|
|
316
|
+
_parent - Opens in parent frame
|
|
317
|
+
</bd-link>
|
|
318
|
+
<bd-p kind="small" style="color: #64748b;">
|
|
319
|
+
Specific to frame-based layouts. Rarely used in modern web applications.
|
|
320
|
+
</bd-p>
|
|
321
|
+
</div>
|
|
322
|
+
|
|
323
|
+
<div>
|
|
324
|
+
<bd-link href="https://example.com" target="_top" kind="subtle">
|
|
325
|
+
_top - Opens in full window
|
|
326
|
+
</bd-link>
|
|
327
|
+
<bd-p kind="small" style="color: #64748b;">
|
|
328
|
+
Breaks out of frames to full browser window. Useful in embedded contexts.
|
|
329
|
+
</bd-p>
|
|
330
|
+
</div>
|
|
331
|
+
</div>
|
|
332
|
+
</div>
|
|
333
|
+
`;
|
|
334
|
+
TargetOptions.parameters = {
|
|
335
|
+
docs: {
|
|
336
|
+
description: {
|
|
337
|
+
story: 'Demonstration of different target attributes and their browser behaviors with recommendations for when to use each option based on user experience considerations.'
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
};
|
|
139
341
|
|
|
140
342
|
export const ExternalLinks = () => html`
|
|
141
|
-
<div style="display: flex; flex-direction
|
|
142
|
-
<bd-
|
|
143
|
-
|
|
144
|
-
|
|
343
|
+
<div style="display: flex; flex-direction; column; gap: 2rem; max-width: 800px; margin: 0 auto; padding: 2rem;">
|
|
344
|
+
<bd-h as="h2" style="margin-bottom: 1rem;">External Link Examples</bd-h>
|
|
345
|
+
<bd-p kind="regular" style="margin-bottom: 1rem;">
|
|
346
|
+
External links typically open in new tabs to prevent users from leaving your application. Here are common patterns for external references.
|
|
347
|
+
</bd-p>
|
|
145
348
|
|
|
146
|
-
<
|
|
147
|
-
|
|
148
|
-
|
|
349
|
+
<div style="display: flex; flex-direction: column; gap: 1.5rem;">
|
|
350
|
+
<div>
|
|
351
|
+
<bd-link href="https://example.com" target="_blank" kind="primary">
|
|
352
|
+
External Primary Link with Security
|
|
353
|
+
</bd-link>
|
|
354
|
+
<bd-p kind="small" style="color: #64748b;">
|
|
355
|
+
Opens in new tab with proper security attributes for external resources.
|
|
356
|
+
</bd-p>
|
|
357
|
+
</div>
|
|
358
|
+
|
|
359
|
+
<div>
|
|
360
|
+
<bd-link href="https://example.com" target="_blank" kind="secondary" underline>
|
|
361
|
+
External Underlined Reference
|
|
362
|
+
</bd-link>
|
|
363
|
+
<bd-p kind="small" style="color: #64748b;">
|
|
364
|
+
Clear visual indication for external academic or reference material.
|
|
365
|
+
</bd-p>
|
|
366
|
+
</div>
|
|
367
|
+
|
|
368
|
+
<div style="border: 2px solid #e2e8f0; padding: 1.5rem; border-radius: 8px;">
|
|
369
|
+
<bd-p kind="regular">
|
|
370
|
+
This is a paragraph with an <bd-link href="https://example.com" target="_blank" kind="primary">external link</bd-link> that opens in a new tab for better user experience and flow preservation.
|
|
371
|
+
</bd-p>
|
|
372
|
+
<bd-p kind="small" style="color: #64748b; margin-top: 0.5rem;">
|
|
373
|
+
Best practice: Use target="_blank" for all external links to keep users in your application context.
|
|
374
|
+
</bd-p>
|
|
375
|
+
</div>
|
|
376
|
+
</div>
|
|
377
|
+
</div>
|
|
378
|
+
`;
|
|
379
|
+
ExternalLinks.parameters = {
|
|
380
|
+
docs: {
|
|
381
|
+
description: {
|
|
382
|
+
story: 'Examples and best practices for external links, including security considerations, user experience patterns, and visual styling recommendations for outbound navigation.'
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
};
|
|
386
|
+
|
|
387
|
+
export const AccessibilityExamples = () => html`
|
|
388
|
+
<div style="display: flex; flex-direction: column; gap: 2rem; max-width: 800px; margin: 0 auto; padding: 2rem;">
|
|
389
|
+
<bd-h as="h2" style="margin-bottom: 1rem;">Accessibility Guidelines</bd-h>
|
|
149
390
|
|
|
150
|
-
<
|
|
151
|
-
|
|
152
|
-
|
|
391
|
+
<div style="border: 2px solid #10b981; padding: 2rem; border-radius: 12px; background: #f0fdf4;">
|
|
392
|
+
<bd-h as="h3" style="color: #059669; margin-bottom: 1rem;">✅ Accessible Link Practices</bd-h>
|
|
393
|
+
|
|
394
|
+
<div style="display: flex; flex-direction: column; gap: 1rem;">
|
|
395
|
+
<div>
|
|
396
|
+
<bd-p kind="regular"><strong>Descriptive Text:</strong> Always use meaningful link text that makes sense out of context.</bd-p>
|
|
397
|
+
<bd-p kind="small" style="color: #059669;">
|
|
398
|
+
✅ <bd-link href="#" kind="primary">Download security whitepaper</bd-link><br>
|
|
399
|
+
❌ <bd-link href="#" kind="danger">Click here</bd-link>
|
|
400
|
+
</bd-p>
|
|
401
|
+
</div>
|
|
402
|
+
|
|
403
|
+
<div>
|
|
404
|
+
<bd-p kind="regular"><strong>Underline for Clarity:</strong> Use underlined links in paragraphs for better visual identification.</bd-p>
|
|
405
|
+
<bd-p kind="small" style="color: #059669;">
|
|
406
|
+
This <bd-link href="#" kind="primary" underline>underlined link</bd-link> is easier to identify in text blocks.
|
|
407
|
+
</bd-p>
|
|
408
|
+
</div>
|
|
409
|
+
|
|
410
|
+
<div>
|
|
411
|
+
<bd-p kind="regular"><strong>Color Contrast:</strong> All link variants maintain WCAG AA contrast ratios.</bd-p>
|
|
412
|
+
<bd-p kind="small" style="color: #059669;">
|
|
413
|
+
Tested for accessibility: <bd-link href="#" kind="subtle">Subtle</bd-link>, <bd-link href="#" kind="primary">Primary</bd-link>, <bd-link href="#" kind="danger">Danger</bd-link>
|
|
414
|
+
</bd-p>
|
|
415
|
+
</div>
|
|
416
|
+
|
|
417
|
+
<div>
|
|
418
|
+
<bd-p kind="regular"><strong>Focus Indicators:</strong> Clear focus rings for keyboard navigation.</bd-p>
|
|
419
|
+
<bd-p kind="small" style="color: #059669;">
|
|
420
|
+
Try tabbing through these links to see the focus indicators.
|
|
421
|
+
</bd-p>
|
|
422
|
+
</div>
|
|
423
|
+
</div>
|
|
424
|
+
</div>
|
|
425
|
+
|
|
426
|
+
<div style="border: 2px solid #e2e8f0; padding: 2rem; border-radius: 12px;">
|
|
427
|
+
<bd-h as="h3" style="color: #3b82f6; margin-bottom: 1rem;">Screen Reader Considerations</bd-h>
|
|
428
|
+
<bd-p kind="regular" style="margin-bottom: 1rem;">
|
|
429
|
+
Links provide proper semantic information for assistive technologies:
|
|
430
|
+
</bd-p>
|
|
431
|
+
|
|
432
|
+
<ul style="color: #374151; margin-left: 1.5rem;">
|
|
433
|
+
<li style="margin-bottom: 0.5rem;">Disabled links become <code><span></code> elements to prevent interaction</li>
|
|
434
|
+
<li style="margin-bottom: 0.5rem;">External links should include visual or textual indicators</li>
|
|
435
|
+
<li style="margin-bottom: 0.5rem;">Link text should be unique and descriptive</li>
|
|
436
|
+
<li>Focus management works correctly with keyboard navigation</li>
|
|
437
|
+
</ul>
|
|
438
|
+
</div>
|
|
153
439
|
</div>
|
|
154
440
|
`;
|
|
441
|
+
AccessibilityExamples.parameters = {
|
|
442
|
+
docs: {
|
|
443
|
+
description: {
|
|
444
|
+
story: 'Comprehensive accessibility guidelines and best practices for link components, including screen reader compatibility, keyboard navigation, color contrast, and semantic HTML structure.'
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
};
|
|
155
448
|
|
|
156
449
|
export const InContext = () => html`
|
|
157
|
-
<div style="max-width:
|
|
158
|
-
<bd-h as="h2">Cybersecurity Features</bd-h>
|
|
450
|
+
<div style="max-width: 800px; margin: 0 auto; padding: 2rem;">
|
|
451
|
+
<bd-h as="h2">Cybersecurity Features Documentation</bd-h>
|
|
159
452
|
|
|
160
453
|
<bd-p kind="lead">
|
|
161
454
|
Protect your digital life with our comprehensive security solutions.
|
|
162
|
-
Learn more about <bd-link href="#" kind="primary">threat protection</bd-link>
|
|
163
|
-
and <bd-link href="#" kind="bold">
|
|
455
|
+
Learn more about <bd-link href="#" kind="primary">advanced threat protection</bd-link>
|
|
456
|
+
and <bd-link href="#" kind="bold">real-time monitoring features</bd-link>.
|
|
164
457
|
</bd-p>
|
|
165
458
|
|
|
166
459
|
<bd-p kind="regular">
|
|
167
|
-
Our <bd-link href="#" kind="danger">emergency response</bd-link>
|
|
460
|
+
Our <bd-link href="#" kind="danger">emergency response team</bd-link> is available 24/7
|
|
168
461
|
to handle security incidents. For less urgent matters, check our
|
|
169
|
-
<bd-link href="#" kind="subtle">knowledge base</bd-link
|
|
462
|
+
<bd-link href="#" kind="subtle">comprehensive knowledge base</bd-link> or
|
|
463
|
+
<bd-link href="#" kind="secondary">community support forums</bd-link>.
|
|
170
464
|
</bd-p>
|
|
171
465
|
|
|
172
|
-
<bd-
|
|
173
|
-
|
|
174
|
-
|
|
466
|
+
<bd-h as="h3" style="margin-top: 2rem;">Additional Resources</bd-h>
|
|
467
|
+
|
|
468
|
+
<bd-p kind="regular">
|
|
469
|
+
Download our <bd-link href="#" kind="primary" underline>security best practices guide</bd-link>
|
|
470
|
+
or explore <bd-link href="https://example.com" target="_blank" kind="secondary">external security resources</bd-link>
|
|
471
|
+
for more in-depth information.
|
|
175
472
|
</bd-p>
|
|
473
|
+
|
|
474
|
+
<div style="margin-top: 2rem; padding-top: 1rem; border-top: 1px solid #e2e8f0;">
|
|
475
|
+
<bd-p kind="small">
|
|
476
|
+
<bd-link href="#" kind="subtle" underline>Terms of service</bd-link> •
|
|
477
|
+
<bd-link href="#" kind="subtle" underline>Privacy policy</bd-link> •
|
|
478
|
+
<bd-link href="#" kind="subtle" underline>Cookie policy</bd-link> •
|
|
479
|
+
<bd-link href="#" kind="subtle" underline>Contact support</bd-link>
|
|
480
|
+
</bd-p>
|
|
481
|
+
</div>
|
|
176
482
|
</div>
|
|
177
|
-
`;
|
|
483
|
+
`;
|
|
484
|
+
InContext.parameters = {
|
|
485
|
+
docs: {
|
|
486
|
+
description: {
|
|
487
|
+
story: 'Real-world example showing links used in various contexts including content paragraphs, feature descriptions, resource references, and footer navigation with appropriate variant selection.'
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
};
|
|
491
|
+
|
|
492
|
+
export const InteractivePlayground = Template.bind({});
|
|
493
|
+
InteractivePlayground.args = {
|
|
494
|
+
href : '#',
|
|
495
|
+
target : '_self',
|
|
496
|
+
kind : 'primary',
|
|
497
|
+
underline: false,
|
|
498
|
+
disabled : false,
|
|
499
|
+
content : 'Customize This Link'
|
|
500
|
+
};
|
|
501
|
+
InteractivePlayground.parameters = {
|
|
502
|
+
docs: {
|
|
503
|
+
description: {
|
|
504
|
+
story: 'Interactive playground where you can test all link properties in real-time. Use the controls panel to modify the link variant, target, underline, disabled state, and content.'
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
};
|
|
@@ -9,7 +9,7 @@ export default css`
|
|
|
9
9
|
all: unset;
|
|
10
10
|
display: block;
|
|
11
11
|
font-family: var(--typography-body-regular-fontFamily, var(--typography-fontFamily-sans));
|
|
12
|
-
color: var(--color-neutral-900);
|
|
12
|
+
// color: var(--color-neutral-900);
|
|
13
13
|
margin-bottom: var(--spacing-md);
|
|
14
14
|
}
|
|
15
15
|
|