@repobit/dex-system-design 0.23.7 → 0.23.9

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.
@@ -1,332 +1,203 @@
1
- import { html } from 'lit';
2
- import './accordion-bg.js';
1
+ import { html } from "lit";
2
+ import "./accordion-bg.js";
3
3
 
4
4
  export default {
5
- title : 'Components/AccordionBg',
6
- tags : ['autodocs'],
5
+ title : "Components/AccordionBg",
6
+ tags : ["autodocs"],
7
7
  parameters: {
8
- docs: {
8
+ layout: "padded",
9
+ docs : {
9
10
  description: {
10
11
  component: `
11
- **BdAccordionBg** is a Lit web component that renders a styled accordion container with a title and slotted accordion items.
12
+ Two Lit web components for building FAQ-style accordion sections with an optional card background.
12
13
 
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
14
  \`\`\`html
19
- <bd-accordion-bg title="FAQ Section">
15
+ <bd-accordion-bg title="Frequently Asked Questions">
20
16
  <bd-accordion-bg-item title="What is Bitdefender?">
21
- <p>Bitdefender is a cybersecurity company...</p>
17
+ <p>Bitdefender is a global cybersecurity leader...</p>
22
18
  </bd-accordion-bg-item>
23
- <bd-accordion-bg-item title="How does it work?">
24
- <p>It uses AI-powered threat detection...</p>
19
+ <bd-accordion-bg-item title="How do I renew my subscription?">
20
+ <p>Log in to Bitdefender Central and go to My Subscriptions...</p>
25
21
  </bd-accordion-bg-item>
26
22
  </bd-accordion-bg>
27
23
  \`\`\`
28
24
 
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
25
+ ### Attributes
26
+
27
+ #### \`bd-accordion-bg\`
28
+ | Attribute | Type | Default | Description |
29
+ |-----------|---------|---------|-----------------------------------------------------------|
30
+ | \`title\` | String | — | Heading rendered inside the container header |
31
+ | \`no-bg\` | Boolean | \`false\`| Removes the card background from the container |
32
+
33
+ #### \`bd-accordion-bg-item\`
34
+ | Attribute | Type | Default | Description |
35
+ |-----------|---------|----------|----------------------------------------------------------|
36
+ | \`title\` | String | — | Question / trigger label |
37
+ | \`open\` | Boolean | \`false\` | Whether the answer panel is expanded |
38
+ | \`no-bg\` | Boolean | \`false\` | Removes the card background from this individual item |
33
39
  `
34
40
  }
35
41
  }
36
- },
37
- argTypes: {
38
- title: {
39
- control : 'text',
40
- description: 'Title displayed in the accordion container header',
41
- table : {
42
- type : { summary: 'string' },
43
- defaultValue: { summary: '' },
44
- category : 'BdAccordionBg'
45
- }
46
- },
47
- noBg: {
48
- control : 'boolean',
49
- description: 'When true, removes the background styling from the container',
50
- table : {
51
- type : { summary: 'boolean' },
52
- defaultValue: { summary: 'false' },
53
- category : 'BdAccordionBg'
54
- }
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'
81
- }
82
- }
83
42
  }
84
43
  };
85
44
 
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
45
 
93
- // ─── Stories ───────────────────────────────────────────────────────────────
46
+ // ─── Default ─────────────────────────────────────────────────────────────────
94
47
 
95
48
  export const Default = {
96
- name : 'Default',
49
+ name : "Default",
97
50
  render: () => html`
98
51
  <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
- `)}
52
+ <bd-accordion-bg-item title="What is Bitdefender Total Security?">
53
+ <p>Bitdefender Total Security offers award-winning protection against viruses, malware, ransomware, and zero-day exploits across all your devices.</p>
54
+ </bd-accordion-bg-item>
55
+ <bd-accordion-bg-item title="How many devices does my plan cover?">
56
+ <p>Depending on your subscription, you can protect between 1 and 10 devices. Multi-device plans cover any combination of Windows, macOS, Android, and iOS.</p>
57
+ </bd-accordion-bg-item>
58
+ <bd-accordion-bg-item title="Does Bitdefender affect system performance?">
59
+ <p>Bitdefender is consistently rated best-in-class for performance impact by independent labs such as AV-TEST and AV-Comparatives.</p>
60
+ </bd-accordion-bg-item>
104
61
  </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
- }
111
- }
112
- }
62
+ `
113
63
  };
114
64
 
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
- }
131
- }
132
- }
133
- };
134
65
 
135
- export const AllItemsOpen = {
136
- name : 'All Items Open',
66
+ // ─── One item open by default ─────────────────────────────────────────────────
67
+
68
+ export const OpenByDefault = {
69
+ name : "Item open by default",
137
70
  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
- `)}
71
+ <bd-accordion-bg title="Getting Started">
72
+ <bd-accordion-bg-item title="How do I install Bitdefender?" open>
73
+ <p>Download the installer from your Bitdefender Central account, run it, and follow the on-screen steps. Installation typically completes in under two minutes.</p>
74
+ </bd-accordion-bg-item>
75
+ <bd-accordion-bg-item title="Do I need to remove my old antivirus first?">
76
+ <p>Yes. Bitdefender will detect any existing security software and guide you through removing it before completing the installation.</p>
77
+ </bd-accordion-bg-item>
78
+ <bd-accordion-bg-item title="Where do I enter my activation code?">
79
+ <p>Log in to Bitdefender Central at central.bitdefender.com, click My Subscriptions, then Add code and enter your activation key.</p>
80
+ </bd-accordion-bg-item>
144
81
  </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
- }
151
- }
152
- }
82
+ `
153
83
  };
154
84
 
85
+
86
+ // ─── No background on container ───────────────────────────────────────────────
87
+
155
88
  export const NoBgContainer = {
156
- name : 'No Background (Container)',
89
+ name : "No background — container",
157
90
  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
- `)}
91
+ <bd-accordion-bg title="Frequently Asked Questions" no-bg>
92
+ <bd-accordion-bg-item title="What payment methods are accepted?">
93
+ <p>We accept Visa, Mastercard, American Express, PayPal, and bank transfers. Available methods may vary by country.</p>
94
+ </bd-accordion-bg-item>
95
+ <bd-accordion-bg-item title="Can I get a refund?">
96
+ <p>Bitdefender offers a 30-day money-back guarantee on all new subscriptions. Renewals are not eligible for refunds after the grace period.</p>
97
+ </bd-accordion-bg-item>
98
+ <bd-accordion-bg-item title="Is auto-renewal enabled by default?">
99
+ <p>Yes. You can disable auto-renewal at any time from the My Subscriptions section of Bitdefender Central.</p>
100
+ </bd-accordion-bg-item>
164
101
  </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
- }
171
- }
172
- }
102
+ `
173
103
  };
174
104
 
105
+
106
+ // ─── No background on items ───────────────────────────────────────────────────
107
+
175
108
  export const NoBgItems = {
176
- name : 'No Background (Items)',
109
+ name : "No background — items",
177
110
  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
- `)}
111
+ <bd-accordion-bg title="Product Features">
112
+ <bd-accordion-bg-item title="What is Bitdefender VPN?" no-bg>
113
+ <p>Bitdefender VPN encrypts your internet connection and masks your IP address, giving you privacy on public Wi-Fi and preventing online tracking.</p>
114
+ </bd-accordion-bg-item>
115
+ <bd-accordion-bg-item title="What is Anti-Tracker?" no-bg>
116
+ <p>Anti-Tracker blocks advertising trackers, analytics scripts, and social media pixels that follow you across the web without your consent.</p>
117
+ </bd-accordion-bg-item>
118
+ <bd-accordion-bg-item title="What is Bitdefender Photon™?" no-bg>
119
+ <p>Photon is Bitdefender's adaptive scanning technology that learns your hardware and software configuration to optimize performance over time.</p>
120
+ </bd-accordion-bg-item>
184
121
  </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
- }
191
- }
192
- }
122
+ `
193
123
  };
194
124
 
195
- export const NoBgAll = {
196
- name : 'No Background (All)',
125
+
126
+ // ─── No background on both ────────────────────────────────────────────────────
127
+
128
+ export const NoBgBoth = {
129
+ name : "No background — container + items",
197
130
  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
- `)}
131
+ <bd-accordion-bg title="Compatibility" no-bg>
132
+ <bd-accordion-bg-item title="Is Bitdefender compatible with Windows 11?" no-bg>
133
+ <p>Yes. Bitdefender fully supports Windows 11, including features such as Secure Boot and TPM 2.0.</p>
134
+ </bd-accordion-bg-item>
135
+ <bd-accordion-bg-item title="Does it work on Apple Silicon Macs?" no-bg>
136
+ <p>Yes. Bitdefender for Mac runs natively on Apple Silicon (M1, M2, M3) as well as Intel-based Macs.</p>
137
+ </bd-accordion-bg-item>
138
+ <bd-accordion-bg-item title="Can I use it on Chromebooks?" no-bg>
139
+ <p>Bitdefender for Android can be installed via Google Play on Chromebooks that support Android apps.</p>
140
+ </bd-accordion-bg-item>
204
141
  </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
- }
211
- }
212
- }
142
+ `
213
143
  };
214
144
 
145
+
146
+ // ─── No container title ───────────────────────────────────────────────────────
147
+
215
148
  export const NoTitle = {
216
- name : 'No Container Title',
149
+ name : "No container title",
217
150
  render: () => html`
218
151
  <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
- `)}
152
+ <bd-accordion-bg-item title="What is Safe Online Banking?">
153
+ <p>Safe Online Banking launches a dedicated hardened browser for financial transactions, protecting against screen capture, keyloggers, and browser-based attacks.</p>
154
+ </bd-accordion-bg-item>
155
+ <bd-accordion-bg-item title="What is ransomware remediation?">
156
+ <p>If ransomware encrypts any files before Bitdefender can block it, the Ransomware Remediation feature automatically restores those files from secured backups.</p>
157
+ </bd-accordion-bg-item>
224
158
  </bd-accordion-bg>
225
- `,
226
- parameters: {
227
- docs: {
228
- description: {
229
- story: 'Container rendered without the `title` prop. The header area is empty.'
230
- }
231
- }
232
- }
159
+ `
233
160
  };
234
161
 
235
- export const SingleItem = {
236
- name : 'Single Item',
162
+
163
+ // ─── bd-accordion-bg-item isolated ───────────────────────────────────────────
164
+
165
+ export const ItemIsolated = {
166
+ name : "bd-accordion-bg-item (isolated)",
237
167
  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>
168
+ <div style="max-width: 680px; padding: 1rem;">
169
+ <bd-accordion-bg-item title="What is two-factor authentication?">
170
+ <p>Two-factor authentication adds a second verification step such as a one-time code sent to your phone — when logging into your Bitdefender account.</p>
241
171
  </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
- }
249
- }
250
- }
172
+ </div>
173
+ `
251
174
  };
252
175
 
253
- export const RichContent = {
254
- name : 'Rich Slotted Content',
176
+
177
+ // ─── Many items ───────────────────────────────────────────────────────────────
178
+
179
+ export const ManyItems = {
180
+ name : "Many items",
255
181
  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>
262
- </ul>
182
+ <bd-accordion-bg title="Everything You Need to Know">
183
+ <bd-accordion-bg-item title="What is real-time protection?">
184
+ <p>Real-time protection continuously monitors all file activity on your device and blocks threats the moment they are detected, before they can cause damage.</p>
263
185
  </bd-accordion-bg-item>
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>
186
+ <bd-accordion-bg-item title="What is web protection?">
187
+ <p>Web protection scans URLs in real time and blocks access to phishing sites, malicious downloads, and fraudulent pages before they load in your browser.</p>
267
188
  </bd-accordion-bg-item>
268
- </bd-accordion-bg>
269
- `,
270
- parameters: {
271
- docs: {
272
- description: {
273
- story: 'Accordion items with rich slotted content including lists, paragraphs, and links.'
274
- }
275
- }
276
- }
277
- };
278
-
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
- }
300
- };
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>
189
+ <bd-accordion-bg-item title="What is vulnerability scanning?">
190
+ <p>The vulnerability scanner checks your installed applications and Windows for missing patches and outdated software that could be exploited by attackers.</p>
191
+ </bd-accordion-bg-item>
192
+ <bd-accordion-bg-item title="What is Bitdefender Central?">
193
+ <p>Bitdefender Central is the unified dashboard for managing all your protected devices, viewing security reports, and controlling your subscription.</p>
319
194
  </bd-accordion-bg-item>
320
- <bd-accordion-bg-item title="Second item (static)">
321
- <p>Static content for the second item.</p>
195
+ <bd-accordion-bg-item title="Can I try Bitdefender for free?">
196
+ <p>Yes. Bitdefender offers a 30-day free trial for most consumer products. No credit card is required to start the trial.</p>
197
+ </bd-accordion-bg-item>
198
+ <bd-accordion-bg-item title="What happens after my trial ends?">
199
+ <p>Once the trial period ends, protection stops unless you purchase a subscription. Your settings and scan history are preserved if you upgrade.</p>
322
200
  </bd-accordion-bg-item>
323
201
  </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
- }
330
- }
331
- }
202
+ `
332
203
  };