@repobit/dex-system-design 0.23.8 → 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.
- package/CHANGELOG.md +7 -0
- package/package.json +2 -2
- package/src/components/accordion/accordion-bg.css.js +119 -100
- package/src/components/accordion/accordion-bg.js +53 -41
- package/src/components/accordion/accordion-bg.stories.js +140 -269
- package/src/components/accordion/accordion.css.js +202 -31
- package/src/components/accordion/accordion.js +73 -31
- package/src/components/accordion/accordion.stories.js +182 -278
- package/src/components/awards/awards-icon.js +44 -32
- package/src/components/awards/awards.css.js +219 -216
- package/src/components/awards/awards.js +156 -132
- package/src/components/awards/awards.stories.js +229 -243
- package/src/components/carousel/carousel.stories.js +13 -13
- package/src/components/pricing-cards/new-pricing-card.stories.js +4 -0
- package/src/components/pricing-cards/pricing-card-pricing.js +3 -1
- package/src/tokens/tokens.css +8 -0
- package/src/tokens/tokens.js +9 -0
|
@@ -1,176 +1,177 @@
|
|
|
1
|
-
|
|
2
|
-
import { html } from 'lit';
|
|
1
|
+
import { html } from "lit";
|
|
3
2
|
import "../heading/heading.js";
|
|
4
3
|
import "../image/image.js";
|
|
5
4
|
import "../link/link.js";
|
|
6
5
|
import "../paragraph/paragraph.js";
|
|
7
|
-
import
|
|
6
|
+
import "./awards.js";
|
|
7
|
+
|
|
8
8
|
export default {
|
|
9
|
-
title :
|
|
10
|
-
component :
|
|
11
|
-
tags : [
|
|
9
|
+
title : "Components/Awards Section",
|
|
10
|
+
component : "bd-awards-section",
|
|
11
|
+
tags : ["autodocs"],
|
|
12
12
|
parameters: {
|
|
13
|
-
|
|
13
|
+
layout: "fullscreen",
|
|
14
|
+
docs : {
|
|
14
15
|
description: {
|
|
15
16
|
component: `
|
|
16
17
|
**AwardsSection** is a Lit web component that showcases Bitdefender's industry awards and trust signals.
|
|
17
18
|
|
|
18
19
|
It includes:
|
|
19
20
|
- A trust banner with tagline, headline, and subtext
|
|
20
|
-
- A responsive awards bar (7 badges
|
|
21
|
+
- A responsive awards bar (7 badges split into two rows)
|
|
21
22
|
- A "What's our secret" section
|
|
22
23
|
- Two feature cards (Machine Learning & Behavioral Analysis)
|
|
23
24
|
|
|
24
25
|
### Responsive Behavior
|
|
25
26
|
| Breakpoint | Behavior |
|
|
26
27
|
|---|---|
|
|
27
|
-
| \`≤ 599px\` |
|
|
28
|
-
|
|
|
29
|
-
| \`≥
|
|
30
|
-
|
|
31
|
-
###
|
|
32
|
-
|
|
|
33
|
-
|
|
34
|
-
|
|
|
35
|
-
|
|
|
36
|
-
|
|
|
37
|
-
|
|
|
38
|
-
|
|
|
39
|
-
|
|
|
40
|
-
|
|
|
28
|
+
| \`≤ 599px\` | Narrow layout: smaller typography, compact badges |
|
|
29
|
+
| \`≤ 767px\` | Feature cards use small typography |
|
|
30
|
+
| \`≥ 768px\` | Full desktop layout |
|
|
31
|
+
|
|
32
|
+
### Attributes
|
|
33
|
+
| Attribute | Type | Default | Description |
|
|
34
|
+
|----------------|--------|---------|------------------------------------------|
|
|
35
|
+
| \`tagline\` | String | — | Small text above the headline |
|
|
36
|
+
| \`headline\` | String | — | Main heading of the trust banner |
|
|
37
|
+
| \`subtext\` | String | — | Supporting paragraph below the headline |
|
|
38
|
+
| \`secretTitle\` | String | — | Heading of the "What's our secret" block |
|
|
39
|
+
| \`secretSubtext\`| String | — | Subtext of the "What's our secret" block |
|
|
40
|
+
| \`desktopAwards\`| Array | — | Award badge objects (see below) |
|
|
41
|
+
| \`features\` | Array | — | Feature card objects (see below) |
|
|
42
|
+
|
|
43
|
+
### Badge object shape
|
|
44
|
+
\`\`\`js
|
|
45
|
+
{ id: string, label: string, type: "red" | "dark", format: "svg", src: string }
|
|
46
|
+
\`\`\`
|
|
47
|
+
|
|
48
|
+
### Feature object shape
|
|
49
|
+
\`\`\`js
|
|
50
|
+
{ icon: "brain" | "chart", title: string, description: string }
|
|
51
|
+
\`\`\`
|
|
41
52
|
`
|
|
42
53
|
}
|
|
43
54
|
}
|
|
44
55
|
},
|
|
45
56
|
argTypes: {
|
|
46
57
|
tagline: {
|
|
47
|
-
control :
|
|
48
|
-
description:
|
|
49
|
-
table : {
|
|
50
|
-
type : { summary: 'string' },
|
|
51
|
-
defaultValue: { summary: "You're Making A Great Choice" },
|
|
52
|
-
category : 'Content'
|
|
53
|
-
}
|
|
58
|
+
control : "text",
|
|
59
|
+
description: "Small text displayed above the headline",
|
|
60
|
+
table : { type: { summary: "string" }, category: "Content" }
|
|
54
61
|
},
|
|
55
62
|
headline: {
|
|
56
|
-
control :
|
|
57
|
-
description:
|
|
58
|
-
table : {
|
|
59
|
-
type : { summary: 'string' },
|
|
60
|
-
defaultValue: { summary: 'World-class security software you can trust. Always.' },
|
|
61
|
-
category : 'Content'
|
|
62
|
-
}
|
|
63
|
+
control : "text",
|
|
64
|
+
description: "Main heading of the trust banner",
|
|
65
|
+
table : { type: { summary: "string" }, category: "Content" }
|
|
63
66
|
},
|
|
64
67
|
subtext: {
|
|
65
|
-
control :
|
|
66
|
-
description:
|
|
67
|
-
table : {
|
|
68
|
-
type : { summary: 'string' },
|
|
69
|
-
defaultValue: {
|
|
70
|
-
summary: "We've added 25 new accolades in the past two years..."
|
|
71
|
-
},
|
|
72
|
-
category: 'Content'
|
|
73
|
-
}
|
|
68
|
+
control : "text",
|
|
69
|
+
description: "Supporting paragraph below the headline",
|
|
70
|
+
table : { type: { summary: "string" }, category: "Content" }
|
|
74
71
|
},
|
|
75
72
|
secretTitle: {
|
|
76
|
-
control :
|
|
73
|
+
control : "text",
|
|
77
74
|
description: "Title of the 'What's our secret' section",
|
|
78
|
-
table : {
|
|
79
|
-
type : { summary: 'string' },
|
|
80
|
-
defaultValue: { summary: "What's our secret" },
|
|
81
|
-
category : 'Content'
|
|
82
|
-
}
|
|
75
|
+
table : { type: { summary: "string" }, category: "Content" }
|
|
83
76
|
},
|
|
84
77
|
secretSubtext: {
|
|
85
|
-
control :
|
|
78
|
+
control : "text",
|
|
86
79
|
description: "Subtext of the 'What's our secret' section",
|
|
87
|
-
table : {
|
|
88
|
-
type : { summary: 'string' },
|
|
89
|
-
defaultValue: {
|
|
90
|
-
summary: 'At the heart of Bitdefender lies a powerhouse of proprietary technology...'
|
|
91
|
-
},
|
|
92
|
-
category: 'Content'
|
|
93
|
-
}
|
|
80
|
+
table : { type: { summary: "string" }, category: "Content" }
|
|
94
81
|
},
|
|
95
82
|
desktopAwards: {
|
|
96
|
-
control :
|
|
97
|
-
description:
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
- \`type\` (string) — \`'red'\` or \`'dark'\`
|
|
102
|
-
- \`format\` (string) — \`'svg'\`
|
|
103
|
-
- \`src\` (string) — path to the SVG asset
|
|
104
|
-
`,
|
|
105
|
-
table: {
|
|
106
|
-
type : { summary: 'Array<{ id, label, type, format, src }>' },
|
|
107
|
-
category: 'Badges'
|
|
108
|
-
}
|
|
109
|
-
},
|
|
110
|
-
mobileAwards: {
|
|
111
|
-
control : 'object',
|
|
112
|
-
description: `
|
|
113
|
-
Array of award badge objects rendered on mobile. Defaults to a copy of \`desktopAwards\`.
|
|
114
|
-
Split into two rows: first 3 badges on top row, badges 4–7 on bottom row.
|
|
115
|
-
`,
|
|
116
|
-
table: {
|
|
117
|
-
type : { summary: 'Array<{ id, label, type, format, src }>' },
|
|
118
|
-
category: 'Badges'
|
|
83
|
+
control : "object",
|
|
84
|
+
description: "Array of award badge objects",
|
|
85
|
+
table : {
|
|
86
|
+
type : { summary: "Array<{ id, label, type, format, src }>" },
|
|
87
|
+
category: "Badges"
|
|
119
88
|
}
|
|
120
89
|
},
|
|
121
90
|
features: {
|
|
122
|
-
control :
|
|
123
|
-
description:
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
- \`description\` (string) — card body text
|
|
128
|
-
`,
|
|
129
|
-
table: {
|
|
130
|
-
type : { summary: 'Array<{ icon, title, description }>' },
|
|
131
|
-
category: 'Features'
|
|
91
|
+
control : "object",
|
|
92
|
+
description: "Array of feature card objects",
|
|
93
|
+
table : {
|
|
94
|
+
type : { summary: "Array<{ icon, title, description }>" },
|
|
95
|
+
category: "Features"
|
|
132
96
|
}
|
|
133
97
|
}
|
|
134
98
|
}
|
|
135
99
|
};
|
|
136
100
|
|
|
137
|
-
|
|
101
|
+
|
|
102
|
+
// ─── Shared defaults ─────────────────────────────────────────────────────────
|
|
138
103
|
|
|
139
104
|
const defaultArgs = {
|
|
140
|
-
tagline
|
|
141
|
-
headline:
|
|
142
|
-
subtext:
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
secretSubtext:
|
|
146
|
-
'At the heart of Bitdefender lies a powerhouse of proprietary technology, setting it miles apart from the competition.',
|
|
105
|
+
tagline : "You're Making A Great Choice",
|
|
106
|
+
headline : "World-class security software you can trust. Always.",
|
|
107
|
+
subtext : "We've added 25 new accolades in the past two years to the hundreds we have won since we started in 2001 - so you know you are in good hands.",
|
|
108
|
+
secretTitle : "What's our secret",
|
|
109
|
+
secretSubtext: "At the heart of Bitdefender lies a powerhouse of proprietary technology, setting it miles apart from the competition.",
|
|
147
110
|
desktopAwards: [
|
|
148
|
-
{
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
111
|
+
{
|
|
112
|
+
label : "PC MAG\nEDITORS' CHOICE",
|
|
113
|
+
type : "red",
|
|
114
|
+
format: "svg",
|
|
115
|
+
src : "/assets/pc-mag.svg",
|
|
116
|
+
id : "pc-mag"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
label : "AV\ncomparatives",
|
|
120
|
+
type : "dark",
|
|
121
|
+
format: "svg",
|
|
122
|
+
src : "/assets/av-comparatives.svg",
|
|
123
|
+
id : "av-comparatives"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
label : "Best\nBrands\n2024",
|
|
127
|
+
type : "dark",
|
|
128
|
+
format: "svg",
|
|
129
|
+
src : "/assets/best-brands.svg",
|
|
130
|
+
id : "best-brands"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
label : "PC\nChoice\n2024",
|
|
134
|
+
type : "red",
|
|
135
|
+
format: "svg",
|
|
136
|
+
src : "/assets/pc-mag-2024.svg",
|
|
137
|
+
id : "pc-mag-2024"
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
label : "PC MAG\nREADERS'\nCHOICE",
|
|
141
|
+
type : "red",
|
|
142
|
+
format: "svg",
|
|
143
|
+
src : "/assets/pc-mag-readers.svg",
|
|
144
|
+
id : "pc-mag-readers"
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
label : "PC\nBusiness\nChoice",
|
|
148
|
+
type : "red",
|
|
149
|
+
format: "svg",
|
|
150
|
+
src : "/assets/pc-mag-business.svg",
|
|
151
|
+
id : "pc-mag-business"
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
label : "AV\nTEST\nTOP\nPRODUCT",
|
|
155
|
+
type : "red",
|
|
156
|
+
format: "svg",
|
|
157
|
+
src : "/assets/top-product.svg",
|
|
158
|
+
id : "top-product"
|
|
159
|
+
}
|
|
155
160
|
],
|
|
156
161
|
features: [
|
|
157
162
|
{
|
|
158
|
-
icon
|
|
159
|
-
title:
|
|
160
|
-
description:
|
|
161
|
-
"Imagine Bitdefender as a super-smart detective, constantly learning and getting better at spotting bad guys. Just like how you learn from your experiences, Bitdefender learns from millions of cyber threats it encounters every day. It studies their patterns, figures out their tricks, and uses that knowledge to protect your devices from future attacks."
|
|
163
|
+
icon : "brain",
|
|
164
|
+
title : "Machine Learning",
|
|
165
|
+
description: "Imagine Bitdefender as a super-smart detective, constantly learning and getting better at spotting bad guys. Just like how you learn from your experiences, Bitdefender learns from millions of cyber threats it encounters every day. It studies their patterns, figures out their tricks, and uses that knowledge to protect your devices from future attacks."
|
|
162
166
|
},
|
|
163
167
|
{
|
|
164
|
-
icon
|
|
165
|
-
title:
|
|
166
|
-
description:
|
|
167
|
-
"Bitdefender keeps an eye on how you and your devices normally behave. So, when something unusual happens, like a strange file trying to sneak into your computer or a suspicious website trying to steal your info, Bitdefender sounds the alarm. It's like having a loyal sidekick that never sleeps, always on the lookout for trouble and ready to jump into action to keep you safe."
|
|
168
|
+
icon : "chart",
|
|
169
|
+
title : "Behavioral Analysis",
|
|
170
|
+
description: "Bitdefender keeps an eye on how you and your devices normally behave. So, when something unusual happens, like a strange file trying to sneak into your computer or a suspicious website trying to steal your info, Bitdefender sounds the alarm. It's like having a loyal sidekick that never sleeps, always on the lookout for trouble and ready to jump into action to keep you safe."
|
|
168
171
|
}
|
|
169
172
|
]
|
|
170
173
|
};
|
|
171
174
|
|
|
172
|
-
// ─── Helper to render the component with given args ────────────────────────
|
|
173
|
-
|
|
174
175
|
const render = (args) => html`
|
|
175
176
|
<bd-awards-section
|
|
176
177
|
.tagline=${args.tagline}
|
|
@@ -179,271 +180,256 @@ const render = (args) => html`
|
|
|
179
180
|
.secretTitle=${args.secretTitle}
|
|
180
181
|
.secretSubtext=${args.secretSubtext}
|
|
181
182
|
.desktopAwards=${args.desktopAwards}
|
|
182
|
-
.mobileAwards=${args.desktopAwards}
|
|
183
183
|
.features=${args.features}
|
|
184
184
|
></bd-awards-section>
|
|
185
185
|
`;
|
|
186
186
|
|
|
187
|
-
// ─── Stories ───────────────────────────────────────────────────────────────
|
|
188
187
|
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
* All 7 award badges are displayed in a single horizontal row.
|
|
192
|
-
*/
|
|
188
|
+
// ─── Default ─────────────────────────────────────────────────────────────────
|
|
189
|
+
|
|
193
190
|
export const Default = {
|
|
194
|
-
name :
|
|
191
|
+
name : "Default (Desktop)",
|
|
195
192
|
args : { ...defaultArgs },
|
|
196
193
|
render,
|
|
197
194
|
parameters: {
|
|
198
|
-
viewport: { defaultViewport:
|
|
195
|
+
viewport: { defaultViewport: "desktop" },
|
|
199
196
|
docs : {
|
|
200
197
|
description: {
|
|
201
|
-
story:
|
|
202
|
-
'Full desktop layout. All 7 badges are shown in a single horizontal row with `flex-wrap: nowrap`. Badge sizes match the desktop spec exactly.'
|
|
198
|
+
story: "Full desktop layout with all 7 award badges split across two rows (3 top + 4 bottom) and both feature cards."
|
|
203
199
|
}
|
|
204
200
|
}
|
|
205
201
|
}
|
|
206
202
|
};
|
|
207
203
|
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
* Row 2: PC Mag 2024, Readers' Choice, Business Choice, Top Product
|
|
212
|
-
*/
|
|
204
|
+
|
|
205
|
+
// ─── Mobile ───────────────────────────────────────────────────────────────────
|
|
206
|
+
|
|
213
207
|
export const Mobile = {
|
|
214
|
-
name :
|
|
208
|
+
name : "Mobile (375px)",
|
|
215
209
|
args : { ...defaultArgs },
|
|
216
210
|
render,
|
|
217
211
|
parameters: {
|
|
218
|
-
viewport: { defaultViewport:
|
|
212
|
+
viewport: { defaultViewport: "mobile1" },
|
|
219
213
|
docs : {
|
|
220
214
|
description: {
|
|
221
|
-
story:
|
|
222
|
-
'Mobile layout at 375px. The desktop badge row is hidden and replaced with two mobile rows. Badge sizes are halved compared to desktop. The bottom row uses flexbox for tight, gap-controlled centering.'
|
|
215
|
+
story: "Mobile layout at 375px. The `_narrow` state activates at ≤599px, switching to smaller typography variants (`bd-p kind='small'`, `bd-h as='h4'`) and compact badge sizes."
|
|
223
216
|
}
|
|
224
217
|
}
|
|
225
218
|
}
|
|
226
219
|
};
|
|
227
220
|
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
*/
|
|
221
|
+
|
|
222
|
+
// ─── Tablet ───────────────────────────────────────────────────────────────────
|
|
223
|
+
|
|
232
224
|
export const Tablet = {
|
|
233
|
-
name :
|
|
225
|
+
name : "Tablet (768px)",
|
|
234
226
|
args : { ...defaultArgs },
|
|
235
227
|
render,
|
|
236
228
|
parameters: {
|
|
237
|
-
viewport: { defaultViewport:
|
|
229
|
+
viewport: { defaultViewport: "tablet" },
|
|
238
230
|
docs : {
|
|
239
231
|
description: {
|
|
240
|
-
story:
|
|
241
|
-
'Tablet layout at 768px. Uses the desktop badge row. Padding and font sizes adjust at the 481px and 769px breakpoints.'
|
|
232
|
+
story: "Tablet layout at 768px. Desktop typography is used since the viewport exceeds 599px. Feature cards switch to small text at ≤767px."
|
|
242
233
|
}
|
|
243
234
|
}
|
|
244
235
|
}
|
|
245
236
|
};
|
|
246
237
|
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
238
|
+
|
|
239
|
+
// ─── Custom text content ──────────────────────────────────────────────────────
|
|
240
|
+
|
|
250
241
|
export const CustomContent = {
|
|
251
|
-
name:
|
|
242
|
+
name: "Custom Text Content",
|
|
252
243
|
args: {
|
|
253
244
|
...defaultArgs,
|
|
254
|
-
tagline
|
|
255
|
-
headline:
|
|
256
|
-
subtext:
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
secretSubtext:
|
|
260
|
-
'Our proprietary AI engine processes over 500 billion queries per day to stay ahead of the most sophisticated threats.'
|
|
245
|
+
tagline : "Trusted by Millions Worldwide",
|
|
246
|
+
headline : "Award-winning protection for every device.",
|
|
247
|
+
subtext : "From homes to enterprises, Bitdefender has been recognised by the world's top security testing labs year after year.",
|
|
248
|
+
secretTitle : "Why we win",
|
|
249
|
+
secretSubtext: "Our proprietary AI engine processes over 500 billion queries per day to stay ahead of the most sophisticated threats."
|
|
261
250
|
},
|
|
262
251
|
render,
|
|
263
252
|
parameters: {
|
|
264
253
|
docs: {
|
|
265
254
|
description: {
|
|
266
|
-
story:
|
|
267
|
-
'All text props replaced with custom values. Use the Controls panel to live-edit tagline, headline, subtext, secretTitle, and secretSubtext.'
|
|
255
|
+
story: "All text props replaced with custom values. Use the Controls panel to live-edit any string prop."
|
|
268
256
|
}
|
|
269
257
|
}
|
|
270
258
|
}
|
|
271
259
|
};
|
|
272
260
|
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
*/
|
|
261
|
+
|
|
262
|
+
// ─── Few badges ───────────────────────────────────────────────────────────────
|
|
263
|
+
|
|
277
264
|
export const FewBadges = {
|
|
278
|
-
name:
|
|
265
|
+
name: "Reduced Badge Set (3 badges)",
|
|
279
266
|
args: {
|
|
280
267
|
...defaultArgs,
|
|
281
268
|
desktopAwards: [
|
|
282
|
-
{
|
|
283
|
-
|
|
284
|
-
|
|
269
|
+
{
|
|
270
|
+
label : "PC MAG\nEDITORS' CHOICE",
|
|
271
|
+
type : "red",
|
|
272
|
+
format: "svg",
|
|
273
|
+
src : "/assets/pc-mag.svg",
|
|
274
|
+
id : "pc-mag"
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
label : "AV\ncomparatives",
|
|
278
|
+
type : "dark",
|
|
279
|
+
format: "svg",
|
|
280
|
+
src : "/assets/av-comparatives.svg",
|
|
281
|
+
id : "av-comparatives"
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
label : "AV\nTEST\nTOP\nPRODUCT",
|
|
285
|
+
type : "red",
|
|
286
|
+
format: "svg",
|
|
287
|
+
src : "/assets/top-product.svg",
|
|
288
|
+
id : "top-product"
|
|
289
|
+
}
|
|
285
290
|
]
|
|
286
291
|
},
|
|
287
292
|
render,
|
|
288
293
|
parameters: {
|
|
289
294
|
docs: {
|
|
290
295
|
description: {
|
|
291
|
-
story:
|
|
292
|
-
'Only 3 badges passed. Verifies the flex row still centers correctly and that mobile row splitting (slice 0–3 / 3–7) gracefully handles fewer items.'
|
|
296
|
+
story: "Only 3 badges passed. The first row (`slice(0, 3)`) is full, the second row (`slice(3)`) renders empty. Verifies no layout breakage with fewer items."
|
|
293
297
|
}
|
|
294
298
|
}
|
|
295
299
|
}
|
|
296
300
|
};
|
|
297
301
|
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
302
|
+
|
|
303
|
+
// ─── Single badge ─────────────────────────────────────────────────────────────
|
|
304
|
+
|
|
301
305
|
export const SingleBadge = {
|
|
302
|
-
name:
|
|
306
|
+
name: "Single Badge (edge case)",
|
|
303
307
|
args: {
|
|
304
308
|
...defaultArgs,
|
|
305
309
|
desktopAwards: [
|
|
306
|
-
{
|
|
310
|
+
{
|
|
311
|
+
label : "PC MAG\nEDITORS' CHOICE",
|
|
312
|
+
type : "red",
|
|
313
|
+
format: "svg",
|
|
314
|
+
src : "/assets/pc-mag.svg",
|
|
315
|
+
id : "pc-mag"
|
|
316
|
+
}
|
|
307
317
|
]
|
|
308
318
|
},
|
|
309
319
|
render,
|
|
310
320
|
parameters: {
|
|
311
321
|
docs: {
|
|
312
322
|
description: {
|
|
313
|
-
story:
|
|
314
|
-
'Minimum edge case: only 1 badge. Ensures no layout breakage and that the mobile bottom row renders empty without errors.'
|
|
323
|
+
story: "Minimum edge case: a single badge. Both row slices receive at most one item. Ensures no crash or layout breakage."
|
|
315
324
|
}
|
|
316
325
|
}
|
|
317
326
|
}
|
|
318
327
|
};
|
|
319
328
|
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
export const
|
|
324
|
-
name:
|
|
329
|
+
|
|
330
|
+
// ─── All dark badges ──────────────────────────────────────────────────────────
|
|
331
|
+
|
|
332
|
+
export const AllDarkBadges = {
|
|
333
|
+
name: "All Dark Badges",
|
|
325
334
|
args: {
|
|
326
335
|
...defaultArgs,
|
|
327
|
-
|
|
328
|
-
{
|
|
329
|
-
icon : 'brain',
|
|
330
|
-
title: 'AI-Powered Threat Detection',
|
|
331
|
-
description:
|
|
332
|
-
'Our next-generation AI engine analyzes over 500 billion security events per day, identifying and neutralizing threats before they can cause harm to your system.'
|
|
333
|
-
},
|
|
334
|
-
{
|
|
335
|
-
icon : 'chart',
|
|
336
|
-
title: 'Real-Time Protection',
|
|
337
|
-
description:
|
|
338
|
-
'Continuous monitoring of all active processes, network connections, and file system changes ensures that threats are caught the moment they appear — with zero performance impact.'
|
|
339
|
-
}
|
|
340
|
-
]
|
|
336
|
+
desktopAwards: defaultArgs.desktopAwards.map((a) => ({ ...a, type: "dark" }))
|
|
341
337
|
},
|
|
342
338
|
render,
|
|
343
339
|
parameters: {
|
|
344
340
|
docs: {
|
|
345
341
|
description: {
|
|
346
|
-
story:
|
|
347
|
-
'Custom feature card content. The `icon` field accepts `"brain"` or `"chart"` to switch between the machine-learning and analysis SVG assets.'
|
|
342
|
+
story: "All badges set to `type: 'dark'`. Verifies the `.bd-awards-badge--dark` CSS class is applied to every badge in `_renderBadge`."
|
|
348
343
|
}
|
|
349
344
|
}
|
|
350
345
|
}
|
|
351
346
|
};
|
|
352
347
|
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
export const
|
|
357
|
-
name:
|
|
348
|
+
|
|
349
|
+
// ─── All red badges ───────────────────────────────────────────────────────────
|
|
350
|
+
|
|
351
|
+
export const AllRedBadges = {
|
|
352
|
+
name: "All Red Badges",
|
|
358
353
|
args: {
|
|
359
354
|
...defaultArgs,
|
|
360
|
-
desktopAwards: defaultArgs.desktopAwards.map((a) => ({ ...a, type:
|
|
355
|
+
desktopAwards: defaultArgs.desktopAwards.map((a) => ({ ...a, type: "red" }))
|
|
361
356
|
},
|
|
362
357
|
render,
|
|
363
358
|
parameters: {
|
|
364
359
|
docs: {
|
|
365
360
|
description: {
|
|
366
|
-
story:
|
|
367
|
-
'All badges forced to `type: "dark"`. Verifies the `.bd-awards-badge--dark` CSS class is applied to every badge, which adds a `brightness(0.9)` filter.'
|
|
361
|
+
story: "All badges set to `type: 'red'`. The `.bd-awards-badge--dark` class is not applied to any badge."
|
|
368
362
|
}
|
|
369
363
|
}
|
|
370
364
|
}
|
|
371
365
|
};
|
|
372
366
|
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
export const
|
|
377
|
-
name:
|
|
367
|
+
|
|
368
|
+
// ─── Custom features ──────────────────────────────────────────────────────────
|
|
369
|
+
|
|
370
|
+
export const CustomFeatures = {
|
|
371
|
+
name: "Custom Feature Cards",
|
|
378
372
|
args: {
|
|
379
373
|
...defaultArgs,
|
|
380
|
-
|
|
374
|
+
features: [
|
|
375
|
+
{
|
|
376
|
+
icon : "brain",
|
|
377
|
+
title : "AI-Powered Threat Detection",
|
|
378
|
+
description: "Our next-generation AI engine analyses over 500 billion security events per day, identifying and neutralising threats before they can cause harm to your system."
|
|
379
|
+
},
|
|
380
|
+
{
|
|
381
|
+
icon : "chart",
|
|
382
|
+
title : "Real-Time Protection",
|
|
383
|
+
description: "Continuous monitoring of all active processes, network connections, and file system changes ensures that threats are caught the moment they appear — with zero performance impact."
|
|
384
|
+
}
|
|
385
|
+
]
|
|
381
386
|
},
|
|
382
387
|
render,
|
|
383
388
|
parameters: {
|
|
384
389
|
docs: {
|
|
385
390
|
description: {
|
|
386
|
-
story:
|
|
387
|
-
'All badges forced to `type: "red"`. No dark filter is applied to any badge.'
|
|
391
|
+
story: "Custom feature card content. The `icon` field accepts `'brain'` (maps to `/assets/machine-learning.svg`) or `'chart'` (maps to `/assets/analysis.svg`)."
|
|
388
392
|
}
|
|
389
393
|
}
|
|
390
394
|
}
|
|
391
395
|
};
|
|
392
396
|
|
|
393
|
-
/**
|
|
394
|
-
* Narrow desktop viewport (1024px).
|
|
395
|
-
*/
|
|
396
|
-
export const NarrowDesktop = {
|
|
397
|
-
name : 'Narrow Desktop (1024px)',
|
|
398
|
-
args : { ...defaultArgs },
|
|
399
|
-
render,
|
|
400
|
-
parameters: {
|
|
401
|
-
viewport : { defaultViewport: 'desktop' },
|
|
402
|
-
chromatic: { viewports: [1024] },
|
|
403
|
-
docs : {
|
|
404
|
-
description: {
|
|
405
|
-
story:
|
|
406
|
-
'Desktop layout at 1024px width. Useful for checking that `flex-wrap: nowrap` on the badge row does not cause overflow on narrower desktop screens.'
|
|
407
|
-
}
|
|
408
|
-
}
|
|
409
|
-
}
|
|
410
|
-
};
|
|
411
397
|
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
*/
|
|
398
|
+
// ─── Small mobile ─────────────────────────────────────────────────────────────
|
|
399
|
+
|
|
415
400
|
export const SmallMobile = {
|
|
416
|
-
name :
|
|
401
|
+
name : "Small Mobile (320px)",
|
|
417
402
|
args : { ...defaultArgs },
|
|
418
403
|
render,
|
|
419
404
|
parameters: {
|
|
420
405
|
viewport: {
|
|
421
406
|
viewports: {
|
|
422
|
-
smallMobile: {
|
|
407
|
+
smallMobile: {
|
|
408
|
+
name : "Small Mobile",
|
|
409
|
+
styles: { width: "320px", height: "812px" }
|
|
410
|
+
}
|
|
423
411
|
},
|
|
424
|
-
defaultViewport:
|
|
412
|
+
defaultViewport: "smallMobile"
|
|
425
413
|
},
|
|
426
414
|
docs: {
|
|
427
415
|
description: {
|
|
428
|
-
story:
|
|
429
|
-
'Smallest supported viewport at 320px. Verifies badge rows, text wrapping, and padding do not overflow or clip on very narrow screens.'
|
|
416
|
+
story: "Smallest supported viewport at 320px. Verifies badge rows, text wrapping, and the laurel SVG icon do not overflow or clip."
|
|
430
417
|
}
|
|
431
418
|
}
|
|
432
419
|
}
|
|
433
420
|
};
|
|
434
421
|
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
422
|
+
|
|
423
|
+
// ─── Playground ───────────────────────────────────────────────────────────────
|
|
424
|
+
|
|
438
425
|
export const Playground = {
|
|
439
|
-
name :
|
|
426
|
+
name : "Playground",
|
|
440
427
|
args : { ...defaultArgs },
|
|
441
428
|
render,
|
|
442
429
|
parameters: {
|
|
443
430
|
docs: {
|
|
444
431
|
description: {
|
|
445
|
-
story:
|
|
446
|
-
'Fully interactive story. Use the **Controls** panel below to modify every prop in real time: text content, badge arrays, and feature cards.'
|
|
432
|
+
story: "Fully interactive story. Use the Controls panel to modify every prop in real time: text content, badge arrays, and feature cards."
|
|
447
433
|
}
|
|
448
434
|
}
|
|
449
435
|
}
|