@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.
- package/CHANGELOG.md +14 -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 +232 -243
- package/src/components/carousel/carousel.stories.js +13 -13
- package/src/components/compare/compare.js +0 -3
- package/src/components/compare/compare.stories.js +5 -1
- 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,173 +1,177 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { html } from "lit";
|
|
2
|
+
import "../heading/heading.js";
|
|
3
|
+
import "../image/image.js";
|
|
4
|
+
import "../link/link.js";
|
|
5
|
+
import "../paragraph/paragraph.js";
|
|
6
|
+
import "./awards.js";
|
|
4
7
|
|
|
5
8
|
export default {
|
|
6
|
-
title :
|
|
7
|
-
component :
|
|
8
|
-
tags : [
|
|
9
|
+
title : "Components/Awards Section",
|
|
10
|
+
component : "bd-awards-section",
|
|
11
|
+
tags : ["autodocs"],
|
|
9
12
|
parameters: {
|
|
10
|
-
|
|
13
|
+
layout: "fullscreen",
|
|
14
|
+
docs : {
|
|
11
15
|
description: {
|
|
12
16
|
component: `
|
|
13
17
|
**AwardsSection** is a Lit web component that showcases Bitdefender's industry awards and trust signals.
|
|
14
18
|
|
|
15
19
|
It includes:
|
|
16
20
|
- A trust banner with tagline, headline, and subtext
|
|
17
|
-
- A responsive awards bar (7 badges
|
|
21
|
+
- A responsive awards bar (7 badges split into two rows)
|
|
18
22
|
- A "What's our secret" section
|
|
19
23
|
- Two feature cards (Machine Learning & Behavioral Analysis)
|
|
20
24
|
|
|
21
25
|
### Responsive Behavior
|
|
22
26
|
| Breakpoint | Behavior |
|
|
23
27
|
|---|---|
|
|
24
|
-
| \`≤ 599px\` |
|
|
25
|
-
|
|
|
26
|
-
| \`≥
|
|
27
|
-
|
|
28
|
-
###
|
|
29
|
-
|
|
|
30
|
-
|
|
31
|
-
|
|
|
32
|
-
|
|
|
33
|
-
|
|
|
34
|
-
|
|
|
35
|
-
|
|
|
36
|
-
|
|
|
37
|
-
|
|
|
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
|
+
\`\`\`
|
|
38
52
|
`
|
|
39
53
|
}
|
|
40
54
|
}
|
|
41
55
|
},
|
|
42
56
|
argTypes: {
|
|
43
57
|
tagline: {
|
|
44
|
-
control :
|
|
45
|
-
description:
|
|
46
|
-
table : {
|
|
47
|
-
type : { summary: 'string' },
|
|
48
|
-
defaultValue: { summary: "You're Making A Great Choice" },
|
|
49
|
-
category : 'Content'
|
|
50
|
-
}
|
|
58
|
+
control : "text",
|
|
59
|
+
description: "Small text displayed above the headline",
|
|
60
|
+
table : { type: { summary: "string" }, category: "Content" }
|
|
51
61
|
},
|
|
52
62
|
headline: {
|
|
53
|
-
control :
|
|
54
|
-
description:
|
|
55
|
-
table : {
|
|
56
|
-
type : { summary: 'string' },
|
|
57
|
-
defaultValue: { summary: 'World-class security software you can trust. Always.' },
|
|
58
|
-
category : 'Content'
|
|
59
|
-
}
|
|
63
|
+
control : "text",
|
|
64
|
+
description: "Main heading of the trust banner",
|
|
65
|
+
table : { type: { summary: "string" }, category: "Content" }
|
|
60
66
|
},
|
|
61
67
|
subtext: {
|
|
62
|
-
control :
|
|
63
|
-
description:
|
|
64
|
-
table : {
|
|
65
|
-
type : { summary: 'string' },
|
|
66
|
-
defaultValue: {
|
|
67
|
-
summary: "We've added 25 new accolades in the past two years..."
|
|
68
|
-
},
|
|
69
|
-
category: 'Content'
|
|
70
|
-
}
|
|
68
|
+
control : "text",
|
|
69
|
+
description: "Supporting paragraph below the headline",
|
|
70
|
+
table : { type: { summary: "string" }, category: "Content" }
|
|
71
71
|
},
|
|
72
72
|
secretTitle: {
|
|
73
|
-
control :
|
|
73
|
+
control : "text",
|
|
74
74
|
description: "Title of the 'What's our secret' section",
|
|
75
|
-
table : {
|
|
76
|
-
type : { summary: 'string' },
|
|
77
|
-
defaultValue: { summary: "What's our secret" },
|
|
78
|
-
category : 'Content'
|
|
79
|
-
}
|
|
75
|
+
table : { type: { summary: "string" }, category: "Content" }
|
|
80
76
|
},
|
|
81
77
|
secretSubtext: {
|
|
82
|
-
control :
|
|
78
|
+
control : "text",
|
|
83
79
|
description: "Subtext of the 'What's our secret' section",
|
|
84
|
-
table : {
|
|
85
|
-
type : { summary: 'string' },
|
|
86
|
-
defaultValue: {
|
|
87
|
-
summary: 'At the heart of Bitdefender lies a powerhouse of proprietary technology...'
|
|
88
|
-
},
|
|
89
|
-
category: 'Content'
|
|
90
|
-
}
|
|
80
|
+
table : { type: { summary: "string" }, category: "Content" }
|
|
91
81
|
},
|
|
92
82
|
desktopAwards: {
|
|
93
|
-
control :
|
|
94
|
-
description:
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
- \`type\` (string) — \`'red'\` or \`'dark'\`
|
|
99
|
-
- \`format\` (string) — \`'svg'\`
|
|
100
|
-
- \`src\` (string) — path to the SVG asset
|
|
101
|
-
`,
|
|
102
|
-
table: {
|
|
103
|
-
type : { summary: 'Array<{ id, label, type, format, src }>' },
|
|
104
|
-
category: 'Badges'
|
|
105
|
-
}
|
|
106
|
-
},
|
|
107
|
-
mobileAwards: {
|
|
108
|
-
control : 'object',
|
|
109
|
-
description: `
|
|
110
|
-
Array of award badge objects rendered on mobile. Defaults to a copy of \`desktopAwards\`.
|
|
111
|
-
Split into two rows: first 3 badges on top row, badges 4–7 on bottom row.
|
|
112
|
-
`,
|
|
113
|
-
table: {
|
|
114
|
-
type : { summary: 'Array<{ id, label, type, format, src }>' },
|
|
115
|
-
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"
|
|
116
88
|
}
|
|
117
89
|
},
|
|
118
90
|
features: {
|
|
119
|
-
control :
|
|
120
|
-
description:
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
- \`description\` (string) — card body text
|
|
125
|
-
`,
|
|
126
|
-
table: {
|
|
127
|
-
type : { summary: 'Array<{ icon, title, description }>' },
|
|
128
|
-
category: 'Features'
|
|
91
|
+
control : "object",
|
|
92
|
+
description: "Array of feature card objects",
|
|
93
|
+
table : {
|
|
94
|
+
type : { summary: "Array<{ icon, title, description }>" },
|
|
95
|
+
category: "Features"
|
|
129
96
|
}
|
|
130
97
|
}
|
|
131
98
|
}
|
|
132
99
|
};
|
|
133
100
|
|
|
134
|
-
|
|
101
|
+
|
|
102
|
+
// ─── Shared defaults ─────────────────────────────────────────────────────────
|
|
135
103
|
|
|
136
104
|
const defaultArgs = {
|
|
137
|
-
tagline
|
|
138
|
-
headline:
|
|
139
|
-
subtext:
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
secretSubtext:
|
|
143
|
-
'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.",
|
|
144
110
|
desktopAwards: [
|
|
145
|
-
{
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
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
|
+
}
|
|
152
160
|
],
|
|
153
161
|
features: [
|
|
154
162
|
{
|
|
155
|
-
icon
|
|
156
|
-
title:
|
|
157
|
-
description:
|
|
158
|
-
"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."
|
|
159
166
|
},
|
|
160
167
|
{
|
|
161
|
-
icon
|
|
162
|
-
title:
|
|
163
|
-
description:
|
|
164
|
-
"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."
|
|
165
171
|
}
|
|
166
172
|
]
|
|
167
173
|
};
|
|
168
174
|
|
|
169
|
-
// ─── Helper to render the component with given args ────────────────────────
|
|
170
|
-
|
|
171
175
|
const render = (args) => html`
|
|
172
176
|
<bd-awards-section
|
|
173
177
|
.tagline=${args.tagline}
|
|
@@ -176,271 +180,256 @@ const render = (args) => html`
|
|
|
176
180
|
.secretTitle=${args.secretTitle}
|
|
177
181
|
.secretSubtext=${args.secretSubtext}
|
|
178
182
|
.desktopAwards=${args.desktopAwards}
|
|
179
|
-
.mobileAwards=${args.desktopAwards}
|
|
180
183
|
.features=${args.features}
|
|
181
184
|
></bd-awards-section>
|
|
182
185
|
`;
|
|
183
186
|
|
|
184
|
-
// ─── Stories ───────────────────────────────────────────────────────────────
|
|
185
187
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
* All 7 award badges are displayed in a single horizontal row.
|
|
189
|
-
*/
|
|
188
|
+
// ─── Default ─────────────────────────────────────────────────────────────────
|
|
189
|
+
|
|
190
190
|
export const Default = {
|
|
191
|
-
name :
|
|
191
|
+
name : "Default (Desktop)",
|
|
192
192
|
args : { ...defaultArgs },
|
|
193
193
|
render,
|
|
194
194
|
parameters: {
|
|
195
|
-
viewport: { defaultViewport:
|
|
195
|
+
viewport: { defaultViewport: "desktop" },
|
|
196
196
|
docs : {
|
|
197
197
|
description: {
|
|
198
|
-
story:
|
|
199
|
-
'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."
|
|
200
199
|
}
|
|
201
200
|
}
|
|
202
201
|
}
|
|
203
202
|
};
|
|
204
203
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
* Row 2: PC Mag 2024, Readers' Choice, Business Choice, Top Product
|
|
209
|
-
*/
|
|
204
|
+
|
|
205
|
+
// ─── Mobile ───────────────────────────────────────────────────────────────────
|
|
206
|
+
|
|
210
207
|
export const Mobile = {
|
|
211
|
-
name :
|
|
208
|
+
name : "Mobile (375px)",
|
|
212
209
|
args : { ...defaultArgs },
|
|
213
210
|
render,
|
|
214
211
|
parameters: {
|
|
215
|
-
viewport: { defaultViewport:
|
|
212
|
+
viewport: { defaultViewport: "mobile1" },
|
|
216
213
|
docs : {
|
|
217
214
|
description: {
|
|
218
|
-
story:
|
|
219
|
-
'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."
|
|
220
216
|
}
|
|
221
217
|
}
|
|
222
218
|
}
|
|
223
219
|
};
|
|
224
220
|
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
*/
|
|
221
|
+
|
|
222
|
+
// ─── Tablet ───────────────────────────────────────────────────────────────────
|
|
223
|
+
|
|
229
224
|
export const Tablet = {
|
|
230
|
-
name :
|
|
225
|
+
name : "Tablet (768px)",
|
|
231
226
|
args : { ...defaultArgs },
|
|
232
227
|
render,
|
|
233
228
|
parameters: {
|
|
234
|
-
viewport: { defaultViewport:
|
|
229
|
+
viewport: { defaultViewport: "tablet" },
|
|
235
230
|
docs : {
|
|
236
231
|
description: {
|
|
237
|
-
story:
|
|
238
|
-
'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."
|
|
239
233
|
}
|
|
240
234
|
}
|
|
241
235
|
}
|
|
242
236
|
};
|
|
243
237
|
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
238
|
+
|
|
239
|
+
// ─── Custom text content ──────────────────────────────────────────────────────
|
|
240
|
+
|
|
247
241
|
export const CustomContent = {
|
|
248
|
-
name:
|
|
242
|
+
name: "Custom Text Content",
|
|
249
243
|
args: {
|
|
250
244
|
...defaultArgs,
|
|
251
|
-
tagline
|
|
252
|
-
headline:
|
|
253
|
-
subtext:
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
secretSubtext:
|
|
257
|
-
'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."
|
|
258
250
|
},
|
|
259
251
|
render,
|
|
260
252
|
parameters: {
|
|
261
253
|
docs: {
|
|
262
254
|
description: {
|
|
263
|
-
story:
|
|
264
|
-
'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."
|
|
265
256
|
}
|
|
266
257
|
}
|
|
267
258
|
}
|
|
268
259
|
};
|
|
269
260
|
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
*/
|
|
261
|
+
|
|
262
|
+
// ─── Few badges ───────────────────────────────────────────────────────────────
|
|
263
|
+
|
|
274
264
|
export const FewBadges = {
|
|
275
|
-
name:
|
|
265
|
+
name: "Reduced Badge Set (3 badges)",
|
|
276
266
|
args: {
|
|
277
267
|
...defaultArgs,
|
|
278
268
|
desktopAwards: [
|
|
279
|
-
{
|
|
280
|
-
|
|
281
|
-
|
|
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
|
+
}
|
|
282
290
|
]
|
|
283
291
|
},
|
|
284
292
|
render,
|
|
285
293
|
parameters: {
|
|
286
294
|
docs: {
|
|
287
295
|
description: {
|
|
288
|
-
story:
|
|
289
|
-
'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."
|
|
290
297
|
}
|
|
291
298
|
}
|
|
292
299
|
}
|
|
293
300
|
};
|
|
294
301
|
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
302
|
+
|
|
303
|
+
// ─── Single badge ─────────────────────────────────────────────────────────────
|
|
304
|
+
|
|
298
305
|
export const SingleBadge = {
|
|
299
|
-
name:
|
|
306
|
+
name: "Single Badge (edge case)",
|
|
300
307
|
args: {
|
|
301
308
|
...defaultArgs,
|
|
302
309
|
desktopAwards: [
|
|
303
|
-
{
|
|
310
|
+
{
|
|
311
|
+
label : "PC MAG\nEDITORS' CHOICE",
|
|
312
|
+
type : "red",
|
|
313
|
+
format: "svg",
|
|
314
|
+
src : "/assets/pc-mag.svg",
|
|
315
|
+
id : "pc-mag"
|
|
316
|
+
}
|
|
304
317
|
]
|
|
305
318
|
},
|
|
306
319
|
render,
|
|
307
320
|
parameters: {
|
|
308
321
|
docs: {
|
|
309
322
|
description: {
|
|
310
|
-
story:
|
|
311
|
-
'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."
|
|
312
324
|
}
|
|
313
325
|
}
|
|
314
326
|
}
|
|
315
327
|
};
|
|
316
328
|
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
export const
|
|
321
|
-
name:
|
|
329
|
+
|
|
330
|
+
// ─── All dark badges ──────────────────────────────────────────────────────────
|
|
331
|
+
|
|
332
|
+
export const AllDarkBadges = {
|
|
333
|
+
name: "All Dark Badges",
|
|
322
334
|
args: {
|
|
323
335
|
...defaultArgs,
|
|
324
|
-
|
|
325
|
-
{
|
|
326
|
-
icon : 'brain',
|
|
327
|
-
title: 'AI-Powered Threat Detection',
|
|
328
|
-
description:
|
|
329
|
-
'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.'
|
|
330
|
-
},
|
|
331
|
-
{
|
|
332
|
-
icon : 'chart',
|
|
333
|
-
title: 'Real-Time Protection',
|
|
334
|
-
description:
|
|
335
|
-
'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.'
|
|
336
|
-
}
|
|
337
|
-
]
|
|
336
|
+
desktopAwards: defaultArgs.desktopAwards.map((a) => ({ ...a, type: "dark" }))
|
|
338
337
|
},
|
|
339
338
|
render,
|
|
340
339
|
parameters: {
|
|
341
340
|
docs: {
|
|
342
341
|
description: {
|
|
343
|
-
story:
|
|
344
|
-
'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`."
|
|
345
343
|
}
|
|
346
344
|
}
|
|
347
345
|
}
|
|
348
346
|
};
|
|
349
347
|
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
export const
|
|
354
|
-
name:
|
|
348
|
+
|
|
349
|
+
// ─── All red badges ───────────────────────────────────────────────────────────
|
|
350
|
+
|
|
351
|
+
export const AllRedBadges = {
|
|
352
|
+
name: "All Red Badges",
|
|
355
353
|
args: {
|
|
356
354
|
...defaultArgs,
|
|
357
|
-
desktopAwards: defaultArgs.desktopAwards.map((a) => ({ ...a, type:
|
|
355
|
+
desktopAwards: defaultArgs.desktopAwards.map((a) => ({ ...a, type: "red" }))
|
|
358
356
|
},
|
|
359
357
|
render,
|
|
360
358
|
parameters: {
|
|
361
359
|
docs: {
|
|
362
360
|
description: {
|
|
363
|
-
story:
|
|
364
|
-
'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."
|
|
365
362
|
}
|
|
366
363
|
}
|
|
367
364
|
}
|
|
368
365
|
};
|
|
369
366
|
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
export const
|
|
374
|
-
name:
|
|
367
|
+
|
|
368
|
+
// ─── Custom features ──────────────────────────────────────────────────────────
|
|
369
|
+
|
|
370
|
+
export const CustomFeatures = {
|
|
371
|
+
name: "Custom Feature Cards",
|
|
375
372
|
args: {
|
|
376
373
|
...defaultArgs,
|
|
377
|
-
|
|
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
|
+
]
|
|
378
386
|
},
|
|
379
387
|
render,
|
|
380
388
|
parameters: {
|
|
381
389
|
docs: {
|
|
382
390
|
description: {
|
|
383
|
-
story:
|
|
384
|
-
'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`)."
|
|
385
392
|
}
|
|
386
393
|
}
|
|
387
394
|
}
|
|
388
395
|
};
|
|
389
396
|
|
|
390
|
-
/**
|
|
391
|
-
* Narrow desktop viewport (1024px).
|
|
392
|
-
*/
|
|
393
|
-
export const NarrowDesktop = {
|
|
394
|
-
name : 'Narrow Desktop (1024px)',
|
|
395
|
-
args : { ...defaultArgs },
|
|
396
|
-
render,
|
|
397
|
-
parameters: {
|
|
398
|
-
viewport : { defaultViewport: 'desktop' },
|
|
399
|
-
chromatic: { viewports: [1024] },
|
|
400
|
-
docs : {
|
|
401
|
-
description: {
|
|
402
|
-
story:
|
|
403
|
-
'Desktop layout at 1024px width. Useful for checking that `flex-wrap: nowrap` on the badge row does not cause overflow on narrower desktop screens.'
|
|
404
|
-
}
|
|
405
|
-
}
|
|
406
|
-
}
|
|
407
|
-
};
|
|
408
397
|
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
*/
|
|
398
|
+
// ─── Small mobile ─────────────────────────────────────────────────────────────
|
|
399
|
+
|
|
412
400
|
export const SmallMobile = {
|
|
413
|
-
name :
|
|
401
|
+
name : "Small Mobile (320px)",
|
|
414
402
|
args : { ...defaultArgs },
|
|
415
403
|
render,
|
|
416
404
|
parameters: {
|
|
417
405
|
viewport: {
|
|
418
406
|
viewports: {
|
|
419
|
-
smallMobile: {
|
|
407
|
+
smallMobile: {
|
|
408
|
+
name : "Small Mobile",
|
|
409
|
+
styles: { width: "320px", height: "812px" }
|
|
410
|
+
}
|
|
420
411
|
},
|
|
421
|
-
defaultViewport:
|
|
412
|
+
defaultViewport: "smallMobile"
|
|
422
413
|
},
|
|
423
414
|
docs: {
|
|
424
415
|
description: {
|
|
425
|
-
story:
|
|
426
|
-
'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."
|
|
427
417
|
}
|
|
428
418
|
}
|
|
429
419
|
}
|
|
430
420
|
};
|
|
431
421
|
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
422
|
+
|
|
423
|
+
// ─── Playground ───────────────────────────────────────────────────────────────
|
|
424
|
+
|
|
435
425
|
export const Playground = {
|
|
436
|
-
name :
|
|
426
|
+
name : "Playground",
|
|
437
427
|
args : { ...defaultArgs },
|
|
438
428
|
render,
|
|
439
429
|
parameters: {
|
|
440
430
|
docs: {
|
|
441
431
|
description: {
|
|
442
|
-
story:
|
|
443
|
-
'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."
|
|
444
433
|
}
|
|
445
434
|
}
|
|
446
435
|
}
|