@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.
- package/CHANGELOG.md +40 -0
- package/package.json +4 -3
- 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,513 +1,332 @@
|
|
|
1
1
|
import { html } from 'lit';
|
|
2
|
-
import '../heading/heading.js';
|
|
3
|
-
import '../paragraph/paragraph.js';
|
|
4
2
|
import './accordion-bg.js';
|
|
5
3
|
|
|
6
4
|
export default {
|
|
7
|
-
title
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
title : 'Components/AccordionBg',
|
|
6
|
+
tags : ['autodocs'],
|
|
7
|
+
parameters: {
|
|
8
|
+
docs: {
|
|
9
|
+
description: {
|
|
10
|
+
component: `
|
|
11
|
+
**BdAccordionBg** is a Lit web component that renders a styled accordion container with a title and slotted accordion items.
|
|
12
|
+
|
|
13
|
+
It consists of two elements:
|
|
14
|
+
- \`<bd-accordion-bg>\` — the wrapper/container with an optional title and background
|
|
15
|
+
- \`<bd-accordion-bg-item>\` — individual collapsible items with toggle behavior
|
|
16
|
+
|
|
17
|
+
### Usage
|
|
18
|
+
\`\`\`html
|
|
19
|
+
<bd-accordion-bg title="FAQ Section">
|
|
20
|
+
<bd-accordion-bg-item title="What is Bitdefender?">
|
|
21
|
+
<p>Bitdefender is a cybersecurity company...</p>
|
|
22
|
+
</bd-accordion-bg-item>
|
|
23
|
+
<bd-accordion-bg-item title="How does it work?">
|
|
24
|
+
<p>It uses AI-powered threat detection...</p>
|
|
25
|
+
</bd-accordion-bg-item>
|
|
26
|
+
</bd-accordion-bg>
|
|
27
|
+
\`\`\`
|
|
28
|
+
|
|
29
|
+
### Accessibility
|
|
30
|
+
- Each item has \`role="button"\`, \`aria-expanded\`, and \`aria-controls\`
|
|
31
|
+
- Keyboard navigation supported via \`Enter\` and \`Space\`
|
|
32
|
+
- IDs are auto-generated for \`aria-controls\` / \`aria-labelledby\` pairing
|
|
33
|
+
`
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
argTypes: {
|
|
11
38
|
title: {
|
|
12
39
|
control : 'text',
|
|
13
|
-
description: '
|
|
40
|
+
description: 'Title displayed in the accordion container header',
|
|
14
41
|
table : {
|
|
15
42
|
type : { summary: 'string' },
|
|
16
|
-
defaultValue: { summary: '' }
|
|
43
|
+
defaultValue: { summary: '' },
|
|
44
|
+
category : 'BdAccordionBg'
|
|
17
45
|
}
|
|
18
46
|
},
|
|
19
47
|
noBg: {
|
|
20
48
|
control : 'boolean',
|
|
21
|
-
description: '
|
|
49
|
+
description: 'When true, removes the background styling from the container',
|
|
22
50
|
table : {
|
|
23
51
|
type : { summary: 'boolean' },
|
|
24
|
-
defaultValue: { summary: 'false' }
|
|
52
|
+
defaultValue: { summary: 'false' },
|
|
53
|
+
category : 'BdAccordionBg'
|
|
25
54
|
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
55
|
+
},
|
|
56
|
+
itemTitle: {
|
|
57
|
+
control : 'text',
|
|
58
|
+
description: 'Title for an individual accordion item',
|
|
59
|
+
table : {
|
|
60
|
+
type : { summary: 'string' },
|
|
61
|
+
defaultValue: { summary: '' },
|
|
62
|
+
category : 'BdAccordionBgItem'
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
itemOpen: {
|
|
66
|
+
control : 'boolean',
|
|
67
|
+
description: 'Controls whether an accordion item is open by default',
|
|
68
|
+
table : {
|
|
69
|
+
type : { summary: 'boolean' },
|
|
70
|
+
defaultValue: { summary: 'false' },
|
|
71
|
+
category : 'BdAccordionBgItem'
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
itemNoBg: {
|
|
75
|
+
control : 'boolean',
|
|
76
|
+
description: 'Removes background from individual accordion items',
|
|
77
|
+
table : {
|
|
78
|
+
type : { summary: 'boolean' },
|
|
79
|
+
defaultValue: { summary: 'false' },
|
|
80
|
+
category : 'BdAccordionBgItem'
|
|
32
81
|
}
|
|
33
82
|
}
|
|
34
83
|
}
|
|
35
84
|
};
|
|
36
85
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
</bd-p>
|
|
63
|
-
</bd-accordion-bg-item>
|
|
64
|
-
</bd-accordion-bg>
|
|
65
|
-
`;
|
|
66
|
-
|
|
67
|
-
// Template for individual accordion items
|
|
68
|
-
const AccordionItemTemplate = ({ title, open, noBg, content }) => html`
|
|
69
|
-
<bd-accordion-bg-item
|
|
70
|
-
title="${title}"
|
|
71
|
-
?open="${open}"
|
|
72
|
-
?no-bg="${noBg}"
|
|
73
|
-
>
|
|
74
|
-
<bd-p kind="regular">${content}</bd-p>
|
|
75
|
-
</bd-accordion-bg-item>
|
|
76
|
-
`;
|
|
77
|
-
|
|
78
|
-
// ============ STORIES ============
|
|
79
|
-
|
|
80
|
-
export const Default = AccordionTemplate.bind({});
|
|
81
|
-
Default.args = {
|
|
82
|
-
title: 'Frequently Asked Questions',
|
|
83
|
-
noBg : false
|
|
84
|
-
};
|
|
85
|
-
Default.parameters = {
|
|
86
|
-
docs: {
|
|
87
|
-
description: {
|
|
88
|
-
story: 'Default accordion with background styling and a main title. Perfect for FAQ sections and content organization.'
|
|
86
|
+
const defaultItems = [
|
|
87
|
+
{ title: 'What is Bitdefender?', content: 'Bitdefender is a global cybersecurity leader offering award-winning protection.' },
|
|
88
|
+
{ title: 'How does it protect me?', content: 'It uses AI-powered behavioral detection and real-time threat intelligence.' },
|
|
89
|
+
{ title: 'Is it available on mobile?', content: 'Yes, Bitdefender is available on Android and iOS devices.' },
|
|
90
|
+
{ title: 'What is the refund policy?', content: 'Bitdefender offers a 30-day money-back guarantee on all plans.' }
|
|
91
|
+
];
|
|
92
|
+
|
|
93
|
+
// ─── Stories ───────────────────────────────────────────────────────────────
|
|
94
|
+
|
|
95
|
+
export const Default = {
|
|
96
|
+
name : 'Default',
|
|
97
|
+
render: () => html`
|
|
98
|
+
<bd-accordion-bg title="Frequently Asked Questions">
|
|
99
|
+
${defaultItems.map(item => html`
|
|
100
|
+
<bd-accordion-bg-item title="${item.title}">
|
|
101
|
+
<p>${item.content}</p>
|
|
102
|
+
</bd-accordion-bg-item>
|
|
103
|
+
`)}
|
|
104
|
+
</bd-accordion-bg>
|
|
105
|
+
`,
|
|
106
|
+
parameters: {
|
|
107
|
+
docs: {
|
|
108
|
+
description: {
|
|
109
|
+
story: 'Default accordion with a title and four items, all collapsed by default.'
|
|
110
|
+
}
|
|
89
111
|
}
|
|
90
112
|
}
|
|
91
113
|
};
|
|
92
114
|
|
|
93
|
-
export const
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
115
|
+
export const WithFirstItemOpen = {
|
|
116
|
+
name : 'First Item Open',
|
|
117
|
+
render: () => html`
|
|
118
|
+
<bd-accordion-bg title="Frequently Asked Questions">
|
|
119
|
+
${defaultItems.map((item, i) => html`
|
|
120
|
+
<bd-accordion-bg-item title="${item.title}" ?open="${i === 0}">
|
|
121
|
+
<p>${item.content}</p>
|
|
122
|
+
</bd-accordion-bg-item>
|
|
123
|
+
`)}
|
|
124
|
+
</bd-accordion-bg>
|
|
125
|
+
`,
|
|
126
|
+
parameters: {
|
|
127
|
+
docs: {
|
|
128
|
+
description: {
|
|
129
|
+
story: 'The first accordion item is open by default using the `open` boolean attribute.'
|
|
130
|
+
}
|
|
102
131
|
}
|
|
103
132
|
}
|
|
104
133
|
};
|
|
105
134
|
|
|
106
|
-
export const
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
135
|
+
export const AllItemsOpen = {
|
|
136
|
+
name : 'All Items Open',
|
|
137
|
+
render: () => html`
|
|
138
|
+
<bd-accordion-bg title="All Expanded">
|
|
139
|
+
${defaultItems.map(item => html`
|
|
140
|
+
<bd-accordion-bg-item title="${item.title}" open>
|
|
141
|
+
<p>${item.content}</p>
|
|
142
|
+
</bd-accordion-bg-item>
|
|
143
|
+
`)}
|
|
144
|
+
</bd-accordion-bg>
|
|
145
|
+
`,
|
|
146
|
+
parameters: {
|
|
147
|
+
docs: {
|
|
148
|
+
description: {
|
|
149
|
+
story: 'All accordion items rendered with `open` attribute set, showing all content simultaneously.'
|
|
150
|
+
}
|
|
117
151
|
}
|
|
118
152
|
}
|
|
119
153
|
};
|
|
120
154
|
|
|
121
|
-
export const
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
155
|
+
export const NoBgContainer = {
|
|
156
|
+
name : 'No Background (Container)',
|
|
157
|
+
render: () => html`
|
|
158
|
+
<bd-accordion-bg title="No Background Container" no-bg>
|
|
159
|
+
${defaultItems.map(item => html`
|
|
160
|
+
<bd-accordion-bg-item title="${item.title}">
|
|
161
|
+
<p>${item.content}</p>
|
|
162
|
+
</bd-accordion-bg-item>
|
|
163
|
+
`)}
|
|
164
|
+
</bd-accordion-bg>
|
|
165
|
+
`,
|
|
166
|
+
parameters: {
|
|
167
|
+
docs: {
|
|
168
|
+
description: {
|
|
169
|
+
story: 'The `no-bg` attribute is applied to the container, removing its background styling.'
|
|
170
|
+
}
|
|
131
171
|
}
|
|
132
172
|
}
|
|
133
173
|
};
|
|
134
174
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
const handleAddItem = () => {
|
|
153
|
-
const container = document.getElementById('dynamic-accordion-container');
|
|
154
|
-
if (container) {
|
|
155
|
-
const newItem = createDynamicItem();
|
|
156
|
-
container.appendChild(newItem);
|
|
157
|
-
}
|
|
158
|
-
};
|
|
159
|
-
|
|
160
|
-
return html`
|
|
161
|
-
<div style="max-width: 800px; margin: 0 auto;">
|
|
162
|
-
<bd-h as="h2">Dynamic Accordion Creation Test</bd-h>
|
|
163
|
-
<bd-p kind="regular" style="margin-bottom: 1rem;">
|
|
164
|
-
This example demonstrates creating accordion items dynamically using <code>document.createElement()</code>.
|
|
165
|
-
The issue with setting attributes in the constructor should now be resolved.
|
|
166
|
-
</bd-p>
|
|
167
|
-
|
|
168
|
-
<div style="margin-bottom: 2rem;">
|
|
169
|
-
<button
|
|
170
|
-
@click=${handleAddItem}
|
|
171
|
-
style="padding: 0.5rem 1rem; background: #3b82f6; color: white; border: none; border-radius: 4px; cursor: pointer;"
|
|
172
|
-
>
|
|
173
|
-
Add Dynamic Accordion Item
|
|
174
|
-
</button>
|
|
175
|
-
</div>
|
|
176
|
-
|
|
177
|
-
<bd-accordion-bg title="Dynamically Created Items" no-bg>
|
|
178
|
-
<div id="dynamic-accordion-container">
|
|
179
|
-
<!-- Items will be added here dynamically -->
|
|
180
|
-
</div>
|
|
181
|
-
</bd-accordion-bg>
|
|
182
|
-
|
|
183
|
-
<bd-p kind="small" style="color: #64748b; margin-top: 1rem;">
|
|
184
|
-
Try clicking the button above to add accordion items dynamically. Each should have a unique ID and work correctly.
|
|
185
|
-
</bd-p>
|
|
186
|
-
</div>
|
|
187
|
-
`;
|
|
188
|
-
};
|
|
189
|
-
DynamicCreation.parameters = {
|
|
190
|
-
docs: {
|
|
191
|
-
description: {
|
|
192
|
-
story: 'Test case for dynamic creation of accordion items using document.createElement(). Demonstrates that the ID generation issue has been resolved.'
|
|
175
|
+
export const NoBgItems = {
|
|
176
|
+
name : 'No Background (Items)',
|
|
177
|
+
render: () => html`
|
|
178
|
+
<bd-accordion-bg title="No Background Items">
|
|
179
|
+
${defaultItems.map(item => html`
|
|
180
|
+
<bd-accordion-bg-item title="${item.title}" no-bg>
|
|
181
|
+
<p>${item.content}</p>
|
|
182
|
+
</bd-accordion-bg-item>
|
|
183
|
+
`)}
|
|
184
|
+
</bd-accordion-bg>
|
|
185
|
+
`,
|
|
186
|
+
parameters: {
|
|
187
|
+
docs: {
|
|
188
|
+
description: {
|
|
189
|
+
story: 'The `no-bg` attribute is applied to each individual item, removing their background styling.'
|
|
190
|
+
}
|
|
193
191
|
}
|
|
194
192
|
}
|
|
195
193
|
};
|
|
196
194
|
|
|
197
|
-
export const
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
<bd-accordion-bg-item title="What is the difference between antivirus and internet security?">
|
|
214
|
-
<bd-p kind="regular">
|
|
215
|
-
While both provide essential protection, they serve different purposes:
|
|
216
|
-
</bd-p>
|
|
217
|
-
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 1rem;">
|
|
218
|
-
<div>
|
|
219
|
-
<bd-h as="h4" style="color: #3b82f6;">Antivirus</bd-h>
|
|
220
|
-
<bd-p kind="small">
|
|
221
|
-
• Basic malware protection<br>
|
|
222
|
-
• Real-time scanning<br>
|
|
223
|
-
• Virus removal<br>
|
|
224
|
-
• Essential web protection
|
|
225
|
-
</bd-p>
|
|
226
|
-
</div>
|
|
227
|
-
<div>
|
|
228
|
-
<bd-h as="h4" style="color: #3b82f6;">Internet Security</bd-h>
|
|
229
|
-
<bd-p kind="small">
|
|
230
|
-
• All antivirus features<br>
|
|
231
|
-
• Firewall protection<br>
|
|
232
|
-
• Parental controls<br>
|
|
233
|
-
• Advanced privacy tools<br>
|
|
234
|
-
• Multi-layer ransomware protection
|
|
235
|
-
</bd-p>
|
|
236
|
-
</div>
|
|
237
|
-
</div>
|
|
238
|
-
</bd-accordion-bg-item>
|
|
239
|
-
|
|
240
|
-
<bd-accordion-bg-item title="How often are virus definitions updated?">
|
|
241
|
-
<bd-p kind="regular">
|
|
242
|
-
Bitdefender updates its virus definitions multiple times per day to ensure protection against the latest threats.
|
|
243
|
-
Our cloud-based security network processes over 500 million queries daily, providing real-time protection
|
|
244
|
-
against emerging malware and zero-day attacks.
|
|
245
|
-
</bd-p>
|
|
246
|
-
<bd-p kind="small" style="color: #64748b; margin-top: 1rem;">
|
|
247
|
-
Last update: 2 hours ago | Next scheduled update: 15 minutes
|
|
248
|
-
</bd-p>
|
|
249
|
-
</bd-accordion-bg-item>
|
|
250
|
-
|
|
251
|
-
<bd-accordion-bg-item title="Does Bitdefender impact system performance?">
|
|
252
|
-
<bd-p kind="regular">
|
|
253
|
-
Bitdefender is designed for minimal system impact. Our products typically use:
|
|
254
|
-
</bd-p>
|
|
255
|
-
<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; margin-top: 1rem;">
|
|
256
|
-
<div style="text-align: center; padding: 1rem; background: #f8fafc; border-radius: 8px;">
|
|
257
|
-
<bd-h as="h4" style="color: #059669;">CPU Usage</bd-h>
|
|
258
|
-
<bd-p kind="large" style="color: #059669; margin: 0.5rem 0;"><2%</bd-p>
|
|
259
|
-
<bd-p kind="small" style="color: #64748b;">Average during scans</bd-p>
|
|
260
|
-
</div>
|
|
261
|
-
<div style="text-align: center; padding: 1rem; background: #f8fafc; border-radius: 8px;">
|
|
262
|
-
<bd-h as="h4" style="color: #3b82f6;">Memory</bd-h>
|
|
263
|
-
<bd-p kind="large" style="color: #3b82f6; margin: 0.5rem 0;">~150MB</bd-p>
|
|
264
|
-
<bd-p kind="small" style="color: #64748b;">Typical RAM usage</bd-p>
|
|
265
|
-
</div>
|
|
266
|
-
<div style="text-align: center; padding: 1rem; background: #f8fafc; border-radius: 8px;">
|
|
267
|
-
<bd-h as="h4" style="color: #8b5cf6;">Boot Time</bd-h>
|
|
268
|
-
<bd-p kind="large" style="color: #8b5cf6; margin: 0.5rem 0;">+0.3s</bd-p>
|
|
269
|
-
<bd-p kind="small" style="color: #64748b;">Average impact</bd-p>
|
|
270
|
-
</div>
|
|
271
|
-
</div>
|
|
272
|
-
</bd-accordion-bg-item>
|
|
273
|
-
</bd-accordion-bg>
|
|
274
|
-
`;
|
|
275
|
-
SecurityFAQ.parameters = {
|
|
276
|
-
docs: {
|
|
277
|
-
description: {
|
|
278
|
-
story: 'Comprehensive FAQ example for security products with rich content including lists, comparisons, and performance metrics.'
|
|
195
|
+
export const NoBgAll = {
|
|
196
|
+
name : 'No Background (All)',
|
|
197
|
+
render: () => html`
|
|
198
|
+
<bd-accordion-bg title="No Background Everywhere" no-bg>
|
|
199
|
+
${defaultItems.map(item => html`
|
|
200
|
+
<bd-accordion-bg-item title="${item.title}" no-bg>
|
|
201
|
+
<p>${item.content}</p>
|
|
202
|
+
</bd-accordion-bg-item>
|
|
203
|
+
`)}
|
|
204
|
+
</bd-accordion-bg>
|
|
205
|
+
`,
|
|
206
|
+
parameters: {
|
|
207
|
+
docs: {
|
|
208
|
+
description: {
|
|
209
|
+
story: '`no-bg` applied to both the container and all items — fully transparent layout.'
|
|
210
|
+
}
|
|
279
211
|
}
|
|
280
212
|
}
|
|
281
213
|
};
|
|
282
214
|
|
|
283
|
-
export const
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
</bd-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
Cloud Scanning
|
|
300
|
-
</span>
|
|
301
|
-
</div>
|
|
302
|
-
</div>
|
|
303
|
-
</bd-accordion-bg-item>
|
|
304
|
-
|
|
305
|
-
<bd-accordion-bg-item title="Privacy Protection Tools">
|
|
306
|
-
<bd-p kind="regular">
|
|
307
|
-
Complete privacy suite including VPN, password manager, and webcam protection to keep your
|
|
308
|
-
personal information secure from online threats and unauthorized access.
|
|
309
|
-
</bd-p>
|
|
310
|
-
<bd-p kind="small" style="color: #64748b; margin-top: 1rem;">
|
|
311
|
-
Features: Unlimited VPN traffic • Encrypted password storage • Webcam access monitoring
|
|
312
|
-
</bd-p>
|
|
313
|
-
</bd-accordion-bg-item>
|
|
314
|
-
|
|
315
|
-
<bd-accordion-bg-item title="Parental Controls">
|
|
316
|
-
<bd-p kind="regular">
|
|
317
|
-
Keep your family safe online with comprehensive parental controls that allow you to monitor
|
|
318
|
-
and manage your children's internet usage across all devices.
|
|
319
|
-
</bd-p>
|
|
320
|
-
<div style="margin-top: 1rem;">
|
|
321
|
-
<bd-p kind="small" style="color: #64748b;">
|
|
322
|
-
• Content filtering and blocking<br>
|
|
323
|
-
• Screen time management<br>
|
|
324
|
-
• Location tracking<br>
|
|
325
|
-
• Social media monitoring
|
|
326
|
-
</bd-p>
|
|
327
|
-
</div>
|
|
328
|
-
</bd-accordion-bg-item>
|
|
329
|
-
|
|
330
|
-
<bd-accordion-bg-item title="Performance Optimization">
|
|
331
|
-
<bd-p kind="regular">
|
|
332
|
-
Lightweight design ensures maximum protection with minimal impact on system performance.
|
|
333
|
-
Automatic optimization features keep your devices running smoothly.
|
|
334
|
-
</bd-p>
|
|
335
|
-
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1rem;">
|
|
336
|
-
<div>
|
|
337
|
-
<bd-h as="h5" style="margin-bottom: 0.5rem;">OneClick Optimizer</bd-h>
|
|
338
|
-
<bd-p kind="small" style="color: #64748b;">
|
|
339
|
-
Clean up junk files and optimize system performance with a single click.
|
|
340
|
-
</bd-p>
|
|
341
|
-
</div>
|
|
342
|
-
<div>
|
|
343
|
-
<bd-h as="h5" style="margin-bottom: 0.5rem;">Game Mode</bd-h>
|
|
344
|
-
<bd-p kind="small" style="color: #64748b;">
|
|
345
|
-
Automatically pauses notifications and updates during gaming sessions.
|
|
346
|
-
</bd-p>
|
|
347
|
-
</div>
|
|
348
|
-
</div>
|
|
349
|
-
</bd-accordion-bg-item>
|
|
350
|
-
</bd-accordion-bg>
|
|
351
|
-
`;
|
|
352
|
-
ProductFeatures.parameters = {
|
|
353
|
-
docs: {
|
|
354
|
-
description: {
|
|
355
|
-
story: 'Product features showcase using the no-background variant with pre-opened sections and rich content including tags, feature lists, and detailed descriptions.'
|
|
215
|
+
export const NoTitle = {
|
|
216
|
+
name : 'No Container Title',
|
|
217
|
+
render: () => html`
|
|
218
|
+
<bd-accordion-bg>
|
|
219
|
+
${defaultItems.map(item => html`
|
|
220
|
+
<bd-accordion-bg-item title="${item.title}">
|
|
221
|
+
<p>${item.content}</p>
|
|
222
|
+
</bd-accordion-bg-item>
|
|
223
|
+
`)}
|
|
224
|
+
</bd-accordion-bg>
|
|
225
|
+
`,
|
|
226
|
+
parameters: {
|
|
227
|
+
docs: {
|
|
228
|
+
description: {
|
|
229
|
+
story: 'Container rendered without the `title` prop. The header area is empty.'
|
|
230
|
+
}
|
|
356
231
|
}
|
|
357
232
|
}
|
|
358
233
|
};
|
|
359
234
|
|
|
360
|
-
export const
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
<bd-h as="h4" style="color: #3b82f6; margin-bottom: 0.5rem;">macOS</bd-h>
|
|
375
|
-
<bd-p kind="small" style="color: #64748b;">
|
|
376
|
-
• macOS 10.14+<br>
|
|
377
|
-
• 2GB RAM minimum<br>
|
|
378
|
-
• 2GB free space<br>
|
|
379
|
-
• Internet connection
|
|
380
|
-
</bd-p>
|
|
381
|
-
</div>
|
|
382
|
-
<div>
|
|
383
|
-
<bd-h as="h4" style="color: #3b82f6; margin-bottom: 0.5rem;">Mobile</bd-h>
|
|
384
|
-
<bd-p kind="small" style="color: #64748b;">
|
|
385
|
-
• Android 6.0+<br>
|
|
386
|
-
• iOS 13.0+<br>
|
|
387
|
-
• 500MB free space
|
|
388
|
-
</bd-p>
|
|
389
|
-
</div>
|
|
390
|
-
</div>
|
|
391
|
-
</bd-accordion-bg-item>
|
|
392
|
-
|
|
393
|
-
<bd-accordion-bg-item title="Download & Installation">
|
|
394
|
-
<div style="display: flex; flex-direction: column; gap: 1.5rem;">
|
|
395
|
-
<div style="display: flex; gap: 1rem; align-items: start;">
|
|
396
|
-
<div style="background: #3b82f6; color: white; border-radius: 50%; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; flex-shrink: 0;">1</div>
|
|
397
|
-
<div>
|
|
398
|
-
<bd-h as="h5" style="margin-bottom: 0.25rem;">Download Installer</bd-h>
|
|
399
|
-
<bd-p kind="small" style="color: #64748b;">
|
|
400
|
-
Visit our website and download the appropriate installer for your operating system.
|
|
401
|
-
</bd-p>
|
|
402
|
-
</div>
|
|
403
|
-
</div>
|
|
404
|
-
|
|
405
|
-
<div style="display: flex; gap: 1rem; align-items: start;">
|
|
406
|
-
<div style="background: #3b82f6; color: white; border-radius: 50%; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; flex-shrink: 0;">2</div>
|
|
407
|
-
<div>
|
|
408
|
-
<bd-h as="h5" style="margin-bottom: 0.25rem;">Run Installation</bd-h>
|
|
409
|
-
<bd-p kind="small" style="color: #64748b;">
|
|
410
|
-
Double-click the downloaded file and follow the on-screen instructions.
|
|
411
|
-
</bd-p>
|
|
412
|
-
</div>
|
|
413
|
-
</div>
|
|
414
|
-
|
|
415
|
-
<div style="display: flex; gap: 1rem; align-items: start;">
|
|
416
|
-
<div style="background: #3b82f6; color: white; border-radius: 50%; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; flex-shrink: 0;">3</div>
|
|
417
|
-
<div>
|
|
418
|
-
<bd-h as="h5" style="margin-bottom: 0.25rem;">Activate Product</bd-h>
|
|
419
|
-
<bd-p kind="small" style="color: #64748b;">
|
|
420
|
-
Enter your activation code or sign in to your Bitdefender account.
|
|
421
|
-
</bd-p>
|
|
422
|
-
</div>
|
|
423
|
-
</div>
|
|
424
|
-
</div>
|
|
425
|
-
</bd-accordion-bg-item>
|
|
426
|
-
|
|
427
|
-
<bd-accordion-bg-item title="Initial Setup">
|
|
428
|
-
<bd-p kind="regular">
|
|
429
|
-
After installation, we recommend running the initial setup wizard to configure your protection
|
|
430
|
-
settings and schedule your first system scan.
|
|
431
|
-
</bd-p>
|
|
432
|
-
<bd-p kind="small" style="color: #64748b; margin-top: 1rem;">
|
|
433
|
-
The setup process typically takes 5-10 minutes and includes security optimization recommendations.
|
|
434
|
-
</bd-p>
|
|
435
|
-
</bd-accordion-bg-item>
|
|
436
|
-
</bd-accordion-bg>
|
|
437
|
-
`;
|
|
438
|
-
InstallationGuide.parameters = {
|
|
439
|
-
docs: {
|
|
440
|
-
description: {
|
|
441
|
-
story: 'Step-by-step installation guide using accordion sections with numbered steps, system requirements, and setup instructions in an organized, easy-to-follow format.'
|
|
235
|
+
export const SingleItem = {
|
|
236
|
+
name : 'Single Item',
|
|
237
|
+
render: () => html`
|
|
238
|
+
<bd-accordion-bg title="Single Item">
|
|
239
|
+
<bd-accordion-bg-item title="What is Bitdefender?">
|
|
240
|
+
<p>Bitdefender is a global cybersecurity leader offering award-winning protection.</p>
|
|
241
|
+
</bd-accordion-bg-item>
|
|
242
|
+
</bd-accordion-bg>
|
|
243
|
+
`,
|
|
244
|
+
parameters: {
|
|
245
|
+
docs: {
|
|
246
|
+
description: {
|
|
247
|
+
story: 'Edge case: only one accordion item inside the container.'
|
|
248
|
+
}
|
|
442
249
|
}
|
|
443
250
|
}
|
|
444
251
|
};
|
|
445
252
|
|
|
446
|
-
export const
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
<bd-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
<bd-accordion-bg-item title="Keyboard Navigation">
|
|
456
|
-
<bd-p kind="regular">
|
|
457
|
-
All accordion items can be navigated using keyboard controls:
|
|
458
|
-
</bd-p>
|
|
459
|
-
<ul style="margin: 1rem 0; padding-left: 1.5rem; color: #374151;">
|
|
460
|
-
<li><strong>Tab:</strong> Navigate between accordion items</li>
|
|
461
|
-
<li><strong>Enter/Space:</strong> Open or close the selected item</li>
|
|
462
|
-
<li><strong>Arrow keys:</strong> Navigate between items (when implemented in container)</li>
|
|
253
|
+
export const RichContent = {
|
|
254
|
+
name : 'Rich Slotted Content',
|
|
255
|
+
render: () => html`
|
|
256
|
+
<bd-accordion-bg title="Rich Content Example">
|
|
257
|
+
<bd-accordion-bg-item title="What plans are available?" open>
|
|
258
|
+
<ul>
|
|
259
|
+
<li>Antivirus Plus — 1 device</li>
|
|
260
|
+
<li>Total Security — up to 5 devices</li>
|
|
261
|
+
<li>Premium Security — unlimited devices</li>
|
|
463
262
|
</ul>
|
|
464
263
|
</bd-accordion-bg-item>
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
<
|
|
468
|
-
Proper ARIA attributes ensure screen readers can accurately convey the accordion state:
|
|
469
|
-
</bd-p>
|
|
470
|
-
<div style="background: #f8fafc; padding: 1rem; border-radius: 8px; margin-top: 1rem;">
|
|
471
|
-
<bd-p kind="small" style="color: #64748b; margin: 0;">
|
|
472
|
-
<code>aria-expanded</code> - indicates open/closed state<br>
|
|
473
|
-
<code>aria-controls</code> - associates button with content<br>
|
|
474
|
-
<code>role="region"</code> - identifies content area<br>
|
|
475
|
-
<code>aria-labelledby</code> - labels content with button
|
|
476
|
-
</bd-p>
|
|
477
|
-
</div>
|
|
478
|
-
</bd-accordion-bg-item>
|
|
479
|
-
|
|
480
|
-
<bd-accordion-bg-item title="Focus Management">
|
|
481
|
-
<bd-p kind="regular">
|
|
482
|
-
Clear focus indicators and proper focus management ensure users can easily navigate
|
|
483
|
-
and understand their current position within the accordion.
|
|
484
|
-
</bd-p>
|
|
485
|
-
<bd-p kind="small" style="color: #64748b; margin-top: 1rem;">
|
|
486
|
-
Try tabbing through this accordion to see the focus indicators in action.
|
|
487
|
-
</bd-p>
|
|
264
|
+
<bd-accordion-bg-item title="Supported platforms?">
|
|
265
|
+
<p>Windows, macOS, iOS, and Android are all supported.</p>
|
|
266
|
+
<a href="#">Learn more</a>
|
|
488
267
|
</bd-accordion-bg-item>
|
|
489
268
|
</bd-accordion-bg>
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
269
|
+
`,
|
|
270
|
+
parameters: {
|
|
271
|
+
docs: {
|
|
272
|
+
description: {
|
|
273
|
+
story: 'Accordion items with rich slotted content including lists, paragraphs, and links.'
|
|
274
|
+
}
|
|
496
275
|
}
|
|
497
276
|
}
|
|
498
277
|
};
|
|
499
278
|
|
|
500
|
-
export const
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
279
|
+
export const KeyboardNavigation = {
|
|
280
|
+
name : 'Keyboard Navigation',
|
|
281
|
+
render: () => html`
|
|
282
|
+
<p style="margin-bottom: 12px; font-size: 14px;">
|
|
283
|
+
Tab to focus an item, then press <strong>Enter</strong> or <strong>Space</strong> to toggle.
|
|
284
|
+
</p>
|
|
285
|
+
<bd-accordion-bg title="Keyboard Accessible Accordion">
|
|
286
|
+
${defaultItems.map(item => html`
|
|
287
|
+
<bd-accordion-bg-item title="${item.title}">
|
|
288
|
+
<p>${item.content}</p>
|
|
289
|
+
</bd-accordion-bg-item>
|
|
290
|
+
`)}
|
|
291
|
+
</bd-accordion-bg>
|
|
292
|
+
`,
|
|
293
|
+
parameters: {
|
|
294
|
+
docs: {
|
|
295
|
+
description: {
|
|
296
|
+
story: 'Demonstrates keyboard accessibility. Each item has `tabindex="0"` and responds to `Enter` and `Space` key events.'
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
}
|
|
506
300
|
};
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
301
|
+
|
|
302
|
+
export const Playground = {
|
|
303
|
+
name: '🛝 Playground',
|
|
304
|
+
args: {
|
|
305
|
+
title : 'Accordion Title',
|
|
306
|
+
noBg : false,
|
|
307
|
+
itemTitle: 'Accordion Item Title',
|
|
308
|
+
itemOpen : false,
|
|
309
|
+
itemNoBg : false
|
|
310
|
+
},
|
|
311
|
+
render: (args) => html`
|
|
312
|
+
<bd-accordion-bg title="${args.title}" ?no-bg="${args.noBg}">
|
|
313
|
+
<bd-accordion-bg-item
|
|
314
|
+
title="${args.itemTitle}"
|
|
315
|
+
?open="${args.itemOpen}"
|
|
316
|
+
?no-bg="${args.itemNoBg}"
|
|
317
|
+
>
|
|
318
|
+
<p>This is the slotted content inside the accordion item.</p>
|
|
319
|
+
</bd-accordion-bg-item>
|
|
320
|
+
<bd-accordion-bg-item title="Second item (static)">
|
|
321
|
+
<p>Static content for the second item.</p>
|
|
322
|
+
</bd-accordion-bg-item>
|
|
323
|
+
</bd-accordion-bg>
|
|
324
|
+
`,
|
|
325
|
+
parameters: {
|
|
326
|
+
docs: {
|
|
327
|
+
description: {
|
|
328
|
+
story: 'Interactive playground. Use the Controls panel to modify the container title, no-bg flags, and the first item\'s state.'
|
|
329
|
+
}
|
|
511
330
|
}
|
|
512
331
|
}
|
|
513
332
|
};
|