@repobit/dex-system-design 0.22.12 → 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.
- package/CHANGELOG.md +32 -0
- package/package.json +3 -2
- package/src/components/Button/button.stories.js +292 -120
- package/src/components/accordion/accordion-bg.css.js +7 -2
- package/src/components/accordion/accordion-bg.stories.js +268 -449
- package/src/components/accordion/accordion.stories.js +259 -265
- package/src/components/anchor/anchor.stories.js +160 -159
- package/src/components/awards/awards-icon.js +44 -0
- package/src/components/awards/awards.css.js +328 -0
- package/src/components/awards/awards.js +224 -0
- package/src/components/awards/awards.stories.js +447 -0
- package/src/components/back/back.stories.js +100 -375
- package/src/components/badge/badge.stories.js +241 -129
- package/src/components/breadcrumb/breadcrumb.stories.js +218 -219
- package/src/components/cards/card.stories.js +174 -622
- package/src/components/carousel/carousel.stories.js +196 -225
- package/src/components/checkbox/checkbox.stories.js +136 -51
- package/src/components/compare/compare.css.js +237 -0
- package/src/components/compare/compare.js +253 -0
- package/src/components/compare/compare.stories.js +372 -0
- package/src/components/display/display.stories.js +91 -297
- package/src/components/divider/divider.stories.js +160 -342
- package/src/components/footer/footer.stories.js +177 -402
- package/src/components/header/header.stories.js +130 -338
- package/src/components/heading/heading.js +8 -5
- package/src/components/heading/heading.stories.js +162 -471
- package/src/components/highlight/highlight.stories.js +153 -38
- package/src/components/image/image.stories.js +135 -563
- package/src/components/input/custom-form.stories.js +761 -224
- package/src/components/link/link.js +29 -12
- package/src/components/link/link.stories.js +130 -468
- package/src/components/modal/modal.stories.js +174 -28
- package/src/components/paragraph/paragraph.css.js +10 -1
- package/src/components/paragraph/paragraph.stories.js +85 -410
- package/src/components/picture/picture.stories.js +147 -561
- package/src/components/radio/radio.stories.js +230 -81
- package/src/components/tabs/tabs.stories.js +126 -10
- package/src/components/termsOfUse/terms.stories.js +223 -8
- package/src/tokens/tokens.js +1 -0
|
@@ -1,662 +1,214 @@
|
|
|
1
1
|
import { html } from 'lit';
|
|
2
|
-
import '../heading/heading.js';
|
|
3
2
|
import './card.js';
|
|
4
3
|
|
|
5
4
|
export default {
|
|
6
|
-
title
|
|
7
|
-
|
|
8
|
-
subcomponents: { 'bd-card-item': 'bd-card-item' },
|
|
9
|
-
tags : ['autodocs'],
|
|
10
|
-
argTypes : {
|
|
11
|
-
title: {
|
|
12
|
-
control : 'text',
|
|
13
|
-
description: 'Section title (optional)',
|
|
14
|
-
table : {
|
|
15
|
-
type : { summary: 'string' },
|
|
16
|
-
defaultValue: { summary: '' }
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
align: {
|
|
20
|
-
control : { type: 'select' },
|
|
21
|
-
options : ['start', 'center'],
|
|
22
|
-
description: 'Content alignment for card items',
|
|
23
|
-
table : {
|
|
24
|
-
type : { summary: 'string' },
|
|
25
|
-
defaultValue: { summary: 'start' }
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
},
|
|
5
|
+
title : 'Components/Card',
|
|
6
|
+
tags : ['autodocs'],
|
|
29
7
|
parameters: {
|
|
30
8
|
docs: {
|
|
31
9
|
description: {
|
|
32
|
-
component:
|
|
10
|
+
component: `
|
|
11
|
+
**Card** and **CardItem** are Lit components for a static card grid layout.
|
|
12
|
+
|
|
13
|
+
- \`<bd-card-section>\` — a section wrapper with an optional title and a flex/grid track
|
|
14
|
+
- \`<bd-card-item>\` — individual card with optional icon, title, alignment, and slotted content
|
|
15
|
+
|
|
16
|
+
### Usage
|
|
17
|
+
\`\`\`html
|
|
18
|
+
<bd-card-section title="Why Bitdefender">
|
|
19
|
+
<bd-card-item title="AI Protection" icon="/assets/brain.svg" align="center">
|
|
20
|
+
<p>Powered by machine learning.</p>
|
|
21
|
+
</bd-card-item>
|
|
22
|
+
</bd-card-section>
|
|
23
|
+
\`\`\`
|
|
24
|
+
|
|
25
|
+
### CardItem Behavior
|
|
26
|
+
- If \`align="center"\` — applies \`bd-light-box-center\` and \`bd-light-box-header-center\` classes
|
|
27
|
+
- If no slotted content — applies \`bd-light-box-no-content\` and \`bd-light-title-no-content\` classes
|
|
28
|
+
- Icon is conditionally rendered only when \`icon\` prop is set
|
|
29
|
+
- Title uses \`<bd-h as="h4">\` with 10px vertical padding
|
|
30
|
+
`
|
|
33
31
|
}
|
|
34
32
|
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
Specialized AI chatbot that helps you identify suspicious online
|
|
58
|
-
interactions so you don't become a victim.
|
|
59
|
-
</bd-p>
|
|
60
|
-
</bd-card-item>
|
|
61
|
-
|
|
62
|
-
<bd-card-item
|
|
63
|
-
title="Scam Wave Alerts"
|
|
64
|
-
icon="/assets/identity_protection.png"
|
|
65
|
-
align="${args.align}"
|
|
66
|
-
>
|
|
67
|
-
<bd-p kind="small">
|
|
68
|
-
Stay informed with real-time alerts about ongoing scam outbreaks
|
|
69
|
-
detected in your area automatically.
|
|
70
|
-
</bd-p>
|
|
71
|
-
</bd-card-item>
|
|
72
|
-
|
|
73
|
-
<bd-card-item
|
|
74
|
-
title="Online Scam Protection"
|
|
75
|
-
icon="/assets/financial_insurance.png"
|
|
76
|
-
align="${args.align}"
|
|
77
|
-
>
|
|
78
|
-
<bd-p kind="small">
|
|
79
|
-
Focused on browsing activities, it specializes in detecting the newest
|
|
80
|
-
scam patterns and tactics.
|
|
81
|
-
</bd-p>
|
|
82
|
-
</bd-card-item>
|
|
83
|
-
</bd-card-section>
|
|
84
|
-
`;
|
|
85
|
-
|
|
86
|
-
export const Default = Template.bind({});
|
|
87
|
-
Default.args = {
|
|
88
|
-
title: 'Security Features',
|
|
89
|
-
align: 'start'
|
|
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
|
-
};
|
|
98
|
-
|
|
99
|
-
export const CenterAligned = Template.bind({});
|
|
100
|
-
CenterAligned.args = {
|
|
101
|
-
title: 'Security Features - Centered',
|
|
102
|
-
align: 'center'
|
|
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
|
-
};
|
|
111
|
-
|
|
112
|
-
export const IconTitleOnly = () => html`
|
|
113
|
-
<bd-card-section title="Icon + Title Only Cards">
|
|
114
|
-
<bd-card-item
|
|
115
|
-
title="Device Protection"
|
|
116
|
-
icon="/assets/device_protection.png"
|
|
117
|
-
align="start"
|
|
118
|
-
></bd-card-item>
|
|
119
|
-
|
|
120
|
-
<bd-card-item
|
|
121
|
-
title="Privacy Shield"
|
|
122
|
-
icon="/assets/privacy_protection.png"
|
|
123
|
-
align="start"
|
|
124
|
-
></bd-card-item>
|
|
125
|
-
|
|
126
|
-
<bd-card-item
|
|
127
|
-
title="Identity Guard"
|
|
128
|
-
icon="/assets/identity_protection.png"
|
|
129
|
-
align="start"
|
|
130
|
-
></bd-card-item>
|
|
131
|
-
|
|
132
|
-
<bd-card-item
|
|
133
|
-
title="Financial Safety"
|
|
134
|
-
icon="/assets/financial_insurance.png"
|
|
135
|
-
align="start"
|
|
136
|
-
></bd-card-item>
|
|
137
|
-
</bd-card-section>
|
|
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
|
-
};
|
|
146
|
-
|
|
147
|
-
export const IconTitleOnlyCentered = () => html`
|
|
148
|
-
<bd-card-section title="Icon + Title Only - Centered">
|
|
149
|
-
<bd-card-item
|
|
150
|
-
title="Device Protection"
|
|
151
|
-
icon="/assets/device_protection.png"
|
|
152
|
-
align="center"
|
|
153
|
-
></bd-card-item>
|
|
154
|
-
|
|
155
|
-
<bd-card-item
|
|
156
|
-
title="Privacy Shield"
|
|
157
|
-
icon="/assets/privacy_protection.png"
|
|
158
|
-
align="center"
|
|
159
|
-
></bd-card-item>
|
|
160
|
-
|
|
161
|
-
<bd-card-item
|
|
162
|
-
title="Identity Guard"
|
|
163
|
-
icon="/assets/identity_protection.png"
|
|
164
|
-
align="center"
|
|
165
|
-
></bd-card-item>
|
|
166
|
-
|
|
167
|
-
<bd-card-item
|
|
168
|
-
title="Financial Safety"
|
|
169
|
-
icon="/assets/financial_insurance.png"
|
|
170
|
-
align="center"
|
|
171
|
-
></bd-card-item>
|
|
172
|
-
</bd-card-section>
|
|
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
|
-
};
|
|
181
|
-
|
|
182
|
-
export const MixedContentTypes = () => html`
|
|
183
|
-
<bd-card-section title="Mixed Content Types">
|
|
184
|
-
<bd-card-item
|
|
185
|
-
title="With Description"
|
|
186
|
-
icon="/assets/device_protection.png"
|
|
187
|
-
align="start"
|
|
188
|
-
>
|
|
189
|
-
<bd-p kind="small">This card has both icon, title and description text below.</bd-p>
|
|
190
|
-
</bd-card-item>
|
|
191
|
-
|
|
192
|
-
<bd-card-item
|
|
193
|
-
title="Icon + Title Only"
|
|
194
|
-
icon="/assets/privacy_protection.png"
|
|
195
|
-
align="start"
|
|
196
|
-
></bd-card-item>
|
|
197
|
-
|
|
198
|
-
<bd-card-item
|
|
199
|
-
title="Another With Description"
|
|
200
|
-
icon="/assets/identity_protection.png"
|
|
201
|
-
align="start"
|
|
202
|
-
>
|
|
203
|
-
<bd-p kind="small">This card includes detailed description about the feature.</bd-p>
|
|
204
|
-
</bd-card-item>
|
|
205
|
-
|
|
206
|
-
<bd-card-item
|
|
207
|
-
title="Another Icon Only"
|
|
208
|
-
icon="/assets/financial_insurance.png"
|
|
209
|
-
align="start"
|
|
210
|
-
></bd-card-item>
|
|
211
|
-
</bd-card-section>
|
|
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
|
-
};
|
|
220
|
-
|
|
221
|
-
export const MixedContentTypesCentered = () => html`
|
|
222
|
-
<bd-card-section title="Mixed Content Types - Centered">
|
|
223
|
-
<bd-card-item
|
|
224
|
-
title="With Description"
|
|
225
|
-
icon="/assets/device_protection.png"
|
|
226
|
-
align="center"
|
|
227
|
-
>
|
|
228
|
-
<bd-p kind="small">This card has both icon, title and description text below.</bd-p>
|
|
229
|
-
</bd-card-item>
|
|
230
|
-
|
|
231
|
-
<bd-card-item
|
|
232
|
-
title="Icon + Title Only"
|
|
233
|
-
icon="/assets/privacy_protection.png"
|
|
234
|
-
align="center"
|
|
235
|
-
></bd-card-item>
|
|
236
|
-
|
|
237
|
-
<bd-card-item
|
|
238
|
-
title="Another With Description"
|
|
239
|
-
icon="/assets/identity_protection.png"
|
|
240
|
-
align="center"
|
|
241
|
-
>
|
|
242
|
-
<bd-p kind="small">This card includes detailed description about the feature.</bd-p>
|
|
243
|
-
</bd-card-item>
|
|
244
|
-
|
|
245
|
-
<bd-card-item
|
|
246
|
-
title="Another Icon Only"
|
|
247
|
-
icon="/assets/financial_insurance.png"
|
|
248
|
-
align="center"
|
|
249
|
-
></bd-card-item>
|
|
250
|
-
</bd-card-section>
|
|
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
|
-
};
|
|
259
|
-
|
|
260
|
-
export const WithoutTitle = Template.bind({});
|
|
261
|
-
WithoutTitle.args = {
|
|
262
|
-
title: '',
|
|
263
|
-
align: 'start'
|
|
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.'
|
|
33
|
+
},
|
|
34
|
+
argTypes: {
|
|
35
|
+
sectionTitle: {
|
|
36
|
+
control : 'text',
|
|
37
|
+
description: 'Optional title for the card section, rendered as `<h1>`',
|
|
38
|
+
table : { type: { summary: 'string' }, defaultValue: { summary: '' }, category: 'CardSection' }
|
|
39
|
+
},
|
|
40
|
+
itemTitle: {
|
|
41
|
+
control : 'text',
|
|
42
|
+
description: 'Title of the card item, rendered using `<bd-h as="h4">`',
|
|
43
|
+
table : { type: { summary: 'string' }, defaultValue: { summary: '' }, category: 'CardItem' }
|
|
44
|
+
},
|
|
45
|
+
icon: {
|
|
46
|
+
control : 'text',
|
|
47
|
+
description: 'Path to the icon image shown at the top of the card',
|
|
48
|
+
table : { type: { summary: 'string' }, defaultValue: { summary: '' }, category: 'CardItem' }
|
|
49
|
+
},
|
|
50
|
+
align: {
|
|
51
|
+
control : { type: 'select' },
|
|
52
|
+
options : ['start', 'center'],
|
|
53
|
+
description: 'Alignment of card content. `"center"` applies centering CSS classes.',
|
|
54
|
+
table : { type: { summary: "'start' | 'center'" }, defaultValue: { summary: 'start' }, category: 'CardItem' }
|
|
269
55
|
}
|
|
270
56
|
}
|
|
271
57
|
};
|
|
272
58
|
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
title: '',
|
|
276
|
-
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
docs: {
|
|
280
|
-
description: {
|
|
281
|
-
story: 'Title-less card section with center alignment. Creates a clean, minimalist appearance.'
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
};
|
|
59
|
+
const sampleItems = [
|
|
60
|
+
{ title: 'AI Protection', icon: '/assets/brain.svg', content: 'Powered by machine learning and behavioral analysis.' },
|
|
61
|
+
{ title: 'Multi-layer Security', icon: '/assets/shield.svg', content: 'Multiple independent protection layers stop any attack.' },
|
|
62
|
+
{ title: 'VPN Included', icon: '/assets/vpn.svg', content: 'Unlimited encrypted VPN traffic for all your devices.' },
|
|
63
|
+
{ title: 'Parental Controls', icon: '/assets/parental.svg', content: 'Advanced controls to protect your children online.' }
|
|
64
|
+
];
|
|
285
65
|
|
|
286
|
-
|
|
287
|
-
<bd-card-section title="${args.title}">
|
|
288
|
-
<bd-card-item
|
|
289
|
-
title="${args.cardTitle}"
|
|
290
|
-
icon="${args.icon}"
|
|
291
|
-
align="${args.align}"
|
|
292
|
-
>
|
|
293
|
-
<bd-p kind="small">${args.content}</bd-p>
|
|
294
|
-
</bd-card-item>
|
|
295
|
-
</bd-card-section>
|
|
296
|
-
`;
|
|
297
|
-
SingleCard.args = {
|
|
298
|
-
title : 'Single Feature',
|
|
299
|
-
cardTitle: 'Scam Copilot Chatbot',
|
|
300
|
-
icon : '/assets/device_protection.png',
|
|
301
|
-
content : 'Specialized AI chatbot that helps you identify suspicious online interactions.',
|
|
302
|
-
align : 'start'
|
|
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
|
-
};
|
|
66
|
+
// ─── Stories ───────────────────────────────────────────────────────────────
|
|
311
67
|
|
|
312
|
-
export const
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
}
|
|
68
|
+
export const Default = {
|
|
69
|
+
name : 'Default (4 items)',
|
|
70
|
+
render: () => html`
|
|
71
|
+
<bd-card-section title="Why Bitdefender">
|
|
72
|
+
${sampleItems.map(item => html`
|
|
73
|
+
<bd-card-item title="${item.title}" icon="${item.icon}">
|
|
74
|
+
<p>${item.content}</p>
|
|
75
|
+
</bd-card-item>
|
|
76
|
+
`)}
|
|
77
|
+
</bd-card-section>
|
|
78
|
+
`,
|
|
79
|
+
parameters: { docs: { description: { story: 'Four card items with icons, titles, and slotted content inside a section with a title.' } } }
|
|
324
80
|
};
|
|
325
81
|
|
|
326
|
-
export const
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
icon : '/assets/device_protection.png',
|
|
339
|
-
align : 'start'
|
|
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
|
-
}
|
|
82
|
+
export const NoSectionTitle = {
|
|
83
|
+
name : 'No Section Title',
|
|
84
|
+
render: () => html`
|
|
85
|
+
<bd-card-section>
|
|
86
|
+
${sampleItems.map(item => html`
|
|
87
|
+
<bd-card-item title="${item.title}" icon="${item.icon}">
|
|
88
|
+
<p>${item.content}</p>
|
|
89
|
+
</bd-card-item>
|
|
90
|
+
`)}
|
|
91
|
+
</bd-card-section>
|
|
92
|
+
`,
|
|
93
|
+
parameters: { docs: { description: { story: 'Section without `title` prop — the header div is conditionally omitted.' } } }
|
|
347
94
|
};
|
|
348
95
|
|
|
349
|
-
export const
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
}
|
|
96
|
+
export const CenteredAlignment = {
|
|
97
|
+
name : 'Centered Alignment',
|
|
98
|
+
render: () => html`
|
|
99
|
+
<bd-card-section title="Features">
|
|
100
|
+
${sampleItems.map(item => html`
|
|
101
|
+
<bd-card-item title="${item.title}" icon="${item.icon}" align="center">
|
|
102
|
+
<p>${item.content}</p>
|
|
103
|
+
</bd-card-item>
|
|
104
|
+
`)}
|
|
105
|
+
</bd-card-section>
|
|
106
|
+
`,
|
|
107
|
+
parameters: { docs: { description: { story: '`align="center"` applied to all items — centers icon, title, and content.' } } }
|
|
361
108
|
};
|
|
362
109
|
|
|
363
|
-
export const
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
align="${args.align}"
|
|
370
|
-
>
|
|
371
|
-
<bd-p kind="small">${args.content} This is card number ${i + 1}.</bd-p>
|
|
110
|
+
export const MixedAlignment = {
|
|
111
|
+
name : 'Mixed Alignment',
|
|
112
|
+
render: () => html`
|
|
113
|
+
<bd-card-section title="Mixed Layout">
|
|
114
|
+
<bd-card-item title="Left Aligned" icon="/assets/brain.svg" align="start">
|
|
115
|
+
<p>Default left-aligned content.</p>
|
|
372
116
|
</bd-card-item>
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
icon : '/assets/device_protection.png',
|
|
380
|
-
content : 'Description for this security feature.',
|
|
381
|
-
cardCount: 6,
|
|
382
|
-
align : 'start'
|
|
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
|
-
}
|
|
117
|
+
<bd-card-item title="Center Aligned" icon="/assets/shield.svg" align="center">
|
|
118
|
+
<p>Centered content.</p>
|
|
119
|
+
</bd-card-item>
|
|
120
|
+
</bd-card-section>
|
|
121
|
+
`,
|
|
122
|
+
parameters: { docs: { description: { story: 'Two items side by side with different alignment values.' } } }
|
|
390
123
|
};
|
|
391
124
|
|
|
392
|
-
export const
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
}
|
|
125
|
+
export const NoIcon = {
|
|
126
|
+
name : 'No Icons',
|
|
127
|
+
render: () => html`
|
|
128
|
+
<bd-card-section title="Features">
|
|
129
|
+
${sampleItems.map(item => html`
|
|
130
|
+
<bd-card-item title="${item.title}">
|
|
131
|
+
<p>${item.content}</p>
|
|
132
|
+
</bd-card-item>
|
|
133
|
+
`)}
|
|
134
|
+
</bd-card-section>
|
|
135
|
+
`,
|
|
136
|
+
parameters: { docs: { description: { story: 'Items without `icon` prop — the `<img>` is conditionally omitted.' } } }
|
|
404
137
|
};
|
|
405
138
|
|
|
406
|
-
export const
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
<bd-card-section title="
|
|
410
|
-
|
|
411
|
-
title="
|
|
412
|
-
|
|
413
|
-
align="start"
|
|
414
|
-
>
|
|
415
|
-
<bd-p kind="small">This card has both an icon and a title with description.</bd-p>
|
|
416
|
-
</bd-card-item>
|
|
417
|
-
|
|
418
|
-
<bd-card-item
|
|
419
|
-
title="Icon + Title Only"
|
|
420
|
-
icon="/assets/device_protection.png"
|
|
421
|
-
align="start"
|
|
422
|
-
></bd-card-item>
|
|
423
|
-
|
|
424
|
-
<bd-card-item
|
|
425
|
-
title="Title Only"
|
|
426
|
-
align="start"
|
|
427
|
-
>
|
|
428
|
-
<bd-p kind="small">This card has only a title without an icon, aligned to start.</bd-p>
|
|
429
|
-
</bd-card-item>
|
|
430
|
-
|
|
431
|
-
<bd-card-item
|
|
432
|
-
icon="/assets/privacy_protection.png"
|
|
433
|
-
align="start"
|
|
434
|
-
>
|
|
435
|
-
<bd-p kind="small">This card has only an icon without a title, aligned to start.</bd-p>
|
|
436
|
-
</bd-card-item>
|
|
437
|
-
|
|
438
|
-
<bd-card-item align="start">
|
|
439
|
-
<bd-p kind="small">This card has neither icon nor title - just content, aligned to start.</bd-p>
|
|
440
|
-
</bd-card-item>
|
|
139
|
+
export const NoSlottedContent = {
|
|
140
|
+
name : 'No Slotted Content',
|
|
141
|
+
render: () => html`
|
|
142
|
+
<bd-card-section title="Features">
|
|
143
|
+
${sampleItems.map(item => html`
|
|
144
|
+
<bd-card-item title="${item.title}" icon="${item.icon}"></bd-card-item>
|
|
145
|
+
`)}
|
|
441
146
|
</bd-card-section>
|
|
147
|
+
`,
|
|
148
|
+
parameters: { docs: { description: { story: 'Items with no slotted content — applies `bd-light-box-no-content` and `bd-light-title-no-content` CSS classes.' } } }
|
|
149
|
+
};
|
|
442
150
|
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
>
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
<bd-card-item
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
<bd-card-item
|
|
467
|
-
icon="/assets/privacy_protection.png"
|
|
468
|
-
align="center"
|
|
469
|
-
>
|
|
470
|
-
<bd-p kind="small">This card has only an icon without a title, centered alignment.</bd-p>
|
|
151
|
+
export const TitleOnly = {
|
|
152
|
+
name : 'Title Only (no icon, no content)',
|
|
153
|
+
render: () => html`
|
|
154
|
+
<bd-card-section title="Features">
|
|
155
|
+
<bd-card-item title="AI Protection"></bd-card-item>
|
|
156
|
+
<bd-card-item title="VPN Included"></bd-card-item>
|
|
157
|
+
<bd-card-item title="Parental Controls"></bd-card-item>
|
|
158
|
+
</bd-card-section>
|
|
159
|
+
`,
|
|
160
|
+
parameters: { docs: { description: { story: 'Minimal cards with only a title — no icon, no slotted content.' } } }
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
export const RichContent = {
|
|
164
|
+
name : 'Rich Slotted Content',
|
|
165
|
+
render: () => html`
|
|
166
|
+
<bd-card-section title="Plan Details">
|
|
167
|
+
<bd-card-item title="What's included" icon="/assets/shield.svg">
|
|
168
|
+
<ul>
|
|
169
|
+
<li>Antivirus & Anti-malware</li>
|
|
170
|
+
<li>VPN (200+ servers)</li>
|
|
171
|
+
<li>Password Manager</li>
|
|
172
|
+
</ul>
|
|
471
173
|
</bd-card-item>
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
<
|
|
174
|
+
<bd-card-item title="Supported Platforms" icon="/assets/devices.svg">
|
|
175
|
+
<p>Windows, macOS, Android, iOS</p>
|
|
176
|
+
<a href="#">View all platforms</a>
|
|
475
177
|
</bd-card-item>
|
|
476
178
|
</bd-card-section>
|
|
477
|
-
|
|
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
|
-
}
|
|
179
|
+
`,
|
|
180
|
+
parameters: { docs: { description: { story: 'Rich slotted content including lists, paragraphs, and links.' } } }
|
|
485
181
|
};
|
|
486
182
|
|
|
487
|
-
export const
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
<bd-card-section title="
|
|
491
|
-
<bd-card-item
|
|
492
|
-
|
|
493
|
-
icon="/assets/identity_protection.png"
|
|
494
|
-
align="start"
|
|
495
|
-
>
|
|
496
|
-
<bd-p kind="small">
|
|
497
|
-
This is a much longer description that might wrap across multiple lines.
|
|
498
|
-
It provides comprehensive details about the feature, its benefits,
|
|
499
|
-
and how it helps protect users from various types of online threats
|
|
500
|
-
and scams in today's digital landscape.
|
|
501
|
-
</bd-p>
|
|
502
|
-
<bd-p kind="small">
|
|
503
|
-
Additional paragraph to demonstrate how multiple paragraphs of content
|
|
504
|
-
would appear within the card component.
|
|
505
|
-
</bd-p>
|
|
506
|
-
</bd-card-item>
|
|
507
|
-
|
|
508
|
-
<bd-card-item
|
|
509
|
-
title="Very Long Title That Might Wrap to Multiple Lines"
|
|
510
|
-
icon="/assets/financial_insurance.png"
|
|
511
|
-
align="start"
|
|
512
|
-
>
|
|
513
|
-
<bd-p kind="small">Regular content with an exceptionally long title, aligned to start.</bd-p>
|
|
183
|
+
export const SingleItem = {
|
|
184
|
+
name : 'Single Item (edge case)',
|
|
185
|
+
render: () => html`
|
|
186
|
+
<bd-card-section title="Feature">
|
|
187
|
+
<bd-card-item title="AI Protection" icon="/assets/brain.svg">
|
|
188
|
+
<p>Machine learning-powered protection.</p>
|
|
514
189
|
</bd-card-item>
|
|
515
190
|
</bd-card-section>
|
|
191
|
+
`,
|
|
192
|
+
parameters: { docs: { description: { story: 'Edge case: only one card item inside the section.' } } }
|
|
193
|
+
};
|
|
516
194
|
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
</bd-p>
|
|
530
|
-
<bd-p kind="small">
|
|
531
|
-
Additional paragraph to demonstrate how multiple paragraphs of content
|
|
532
|
-
would appear within the card component.
|
|
533
|
-
</bd-p>
|
|
195
|
+
export const Playground = {
|
|
196
|
+
name: '🛝 Playground',
|
|
197
|
+
args: {
|
|
198
|
+
sectionTitle: 'Why Bitdefender',
|
|
199
|
+
itemTitle : 'AI Protection',
|
|
200
|
+
icon : '/assets/brain.svg',
|
|
201
|
+
align : 'start'
|
|
202
|
+
},
|
|
203
|
+
render: (args) => html`
|
|
204
|
+
<bd-card-section title="${args.sectionTitle}">
|
|
205
|
+
<bd-card-item title="${args.itemTitle}" icon="${args.icon}" align="${args.align}">
|
|
206
|
+
<p>Powered by machine learning and behavioral analysis.</p>
|
|
534
207
|
</bd-card-item>
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
title="Very Long Title That Might Wrap to Multiple Lines"
|
|
538
|
-
icon="/assets/financial_insurance.png"
|
|
539
|
-
align="center"
|
|
540
|
-
>
|
|
541
|
-
<bd-p kind="small">Regular content with an exceptionally long title, centered alignment.</bd-p>
|
|
208
|
+
<bd-card-item title="VPN Included" icon="/assets/vpn.svg" align="${args.align}">
|
|
209
|
+
<p>Unlimited encrypted VPN traffic.</p>
|
|
542
210
|
</bd-card-item>
|
|
543
211
|
</bd-card-section>
|
|
544
|
-
|
|
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
|
-
};
|
|
553
|
-
|
|
554
|
-
export const MixedAlignment = () => html`
|
|
555
|
-
<bd-card-section title="Mixed Alignment Cards">
|
|
556
|
-
<bd-card-item
|
|
557
|
-
title="Start Aligned Card"
|
|
558
|
-
icon="/assets/device_protection.png"
|
|
559
|
-
align="start"
|
|
560
|
-
>
|
|
561
|
-
<bd-p kind="small">This card is left aligned with content starting from the left side.</bd-p>
|
|
562
|
-
<bd-p kind="small">Perfect for longer text content that reads better when left aligned.</bd-p>
|
|
563
|
-
</bd-card-item>
|
|
564
|
-
|
|
565
|
-
<bd-card-item
|
|
566
|
-
title="Center Aligned Card"
|
|
567
|
-
icon="/assets/privacy_protection.png"
|
|
568
|
-
align="center"
|
|
569
|
-
>
|
|
570
|
-
<bd-p kind="small">This card is center aligned with everything centered.</bd-p>
|
|
571
|
-
<bd-p kind="small">Great for highlight features or call-to-action cards.</bd-p>
|
|
572
|
-
</bd-card-item>
|
|
573
|
-
|
|
574
|
-
<bd-card-item
|
|
575
|
-
title="Another Start Aligned"
|
|
576
|
-
icon="/assets/identity_protection.png"
|
|
577
|
-
align="start"
|
|
578
|
-
>
|
|
579
|
-
<bd-p kind="small">Another left aligned card with detailed description.</bd-p>
|
|
580
|
-
</bd-card-item>
|
|
581
|
-
|
|
582
|
-
<bd-card-item
|
|
583
|
-
title="Another Center Aligned"
|
|
584
|
-
icon="/assets/financial_insurance.png"
|
|
585
|
-
align="center"
|
|
586
|
-
>
|
|
587
|
-
<bd-p kind="small">Another center aligned card for balanced presentation.</bd-p>
|
|
588
|
-
</bd-card-item>
|
|
589
|
-
</bd-card-section>
|
|
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
|
-
};
|
|
598
|
-
|
|
599
|
-
export const AlignmentComparison = () => html`
|
|
600
|
-
<bd-card-section title="Alignment Comparison">
|
|
601
|
-
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-bottom: 2rem;">
|
|
602
|
-
<div>
|
|
603
|
-
<bd-h as="h4" style="text-align: center; color: #333; padding: 10px 0;">Start Aligned</bd-h>
|
|
604
|
-
<bd-card-item
|
|
605
|
-
title="Start Aligned Example"
|
|
606
|
-
icon="/assets/device_protection.png"
|
|
607
|
-
align="start"
|
|
608
|
-
>
|
|
609
|
-
<bd-p kind="small">This card shows start alignment where content begins from the left.</bd-p>
|
|
610
|
-
<bd-p kind="small">Ideal for readability and longer text content.</bd-p>
|
|
611
|
-
</bd-card-item>
|
|
612
|
-
</div>
|
|
613
|
-
<div>
|
|
614
|
-
<bd-h as="h4" style="text-align: center; color: #333; padding: 10px 0;">Center Aligned</bd-h>
|
|
615
|
-
<bd-card-item
|
|
616
|
-
title="Center Aligned Example"
|
|
617
|
-
icon="/assets/device_protection.png"
|
|
618
|
-
align="center"
|
|
619
|
-
>
|
|
620
|
-
<bd-p kind="small">This card shows center alignment with balanced presentation.</bd-p>
|
|
621
|
-
<bd-p kind="small">Perfect for feature highlights and visual balance.</bd-p>
|
|
622
|
-
</bd-card-item>
|
|
623
|
-
</div>
|
|
624
|
-
</div>
|
|
625
|
-
</bd-card-section>
|
|
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
|
-
};
|
|
634
|
-
|
|
635
|
-
export const ResponsiveAlignment = () => html`
|
|
636
|
-
<bd-card-section title="Responsive Alignment Examples">
|
|
637
|
-
<bd-card-item
|
|
638
|
-
title="Responsive Start Aligned"
|
|
639
|
-
icon="/assets/device_protection.png"
|
|
640
|
-
align="start"
|
|
641
|
-
>
|
|
642
|
-
<bd-p kind="small">This card maintains start alignment across all screen sizes.</bd-p>
|
|
643
|
-
<bd-p kind="small">On mobile devices, the content will still be aligned to the start.</bd-p>
|
|
644
|
-
</bd-card-item>
|
|
645
|
-
|
|
646
|
-
<bd-card-item
|
|
647
|
-
title="Responsive Center Aligned"
|
|
648
|
-
icon="/assets/privacy_protection.png"
|
|
649
|
-
align="center"
|
|
650
|
-
>
|
|
651
|
-
<bd-p kind="small">This card maintains center alignment across all screen sizes.</bd-p>
|
|
652
|
-
<bd-p kind="small">On mobile devices, the content will remain centered for consistency.</bd-p>
|
|
653
|
-
</bd-card-item>
|
|
654
|
-
</bd-card-section>
|
|
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
|
-
}
|
|
212
|
+
`,
|
|
213
|
+
parameters: { docs: { description: { story: 'Interactive playground. Adjust section title, item title, icon, and alignment via Controls.' } } }
|
|
662
214
|
};
|