@repobit/dex-system-design 2.2.1 → 2.3.0
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 +15 -0
- package/package.json +12 -2
- package/schemas/component-manifest.json +816 -1
- package/src/assets/images/ai/bento-consumer-art.jpg +0 -0
- package/src/assets/images/ai/bento-enterprise-art.jpg +0 -0
- package/src/assets/images/ai/bento-labs-art.jpg +0 -0
- package/src/assets/images/award-marks/av-comparatives-top-rated.png +0 -0
- package/src/assets/images/award-marks/av-test-top-product.png +0 -0
- package/src/assets/images/award-marks/crn-partner-guide.png +0 -0
- package/src/assets/images/award-marks/forrester.png +0 -0
- package/src/assets/images/award-marks/gartner.png +0 -0
- package/src/assets/images/award-marks/idc.png +0 -0
- package/src/assets/images/award-marks/mitre-engenuity.png +0 -0
- package/src/assets/images/award-marks/omdia.png +0 -0
- package/src/assets/images/award-marks/pcmag-best-of-2026.png +0 -0
- package/src/assets/images/award-marks/pcmag-editors-choice.png +0 -0
- package/src/assets/images/award-marks/pcmag-readers-choice.png +0 -0
- package/src/assets/images/hero/ai-sphere-poster.jpg +0 -0
- package/src/assets/images/insights/post-1.jpg +0 -0
- package/src/assets/images/insights/post-2.jpg +0 -0
- package/src/assets/images/insights/post-3.jpg +0 -0
- package/src/assets/images/partner/ferrari-lockup.png +0 -0
- package/src/assets/images/partner/ferrari-photo.jpg +0 -0
- package/src/assets/images/partners/ferrari.svg +6 -0
- package/src/assets/images/partners/konica-minolta.svg +12 -0
- package/src/assets/images/partners/logmein.svg +6 -0
- package/src/assets/images/partners/netgear.svg +10 -0
- package/src/assets/images/partners/sharp.svg +5 -0
- package/src/assets/images/partners/spurs.svg +33 -0
- package/src/components/accordion/accordion.css.js +1 -5
- package/src/components/audience-card/audience-card.css.js +87 -0
- package/src/components/audience-card/audience-card.js +80 -0
- package/src/components/audience-card/audience-card.stories.js +125 -0
- package/src/components/bento-grid/bento-grid.stories.js +77 -1
- package/src/components/bento-grid/bento-item.css.js +142 -2
- package/src/components/bento-grid/bento-item.js +65 -1
- package/src/components/hero/hero.css.js +260 -0
- package/src/components/hero/hero.js +168 -0
- package/src/components/hero/hero.stories.js +145 -0
- package/src/components/icons/enterprise-icon.js +19 -0
- package/src/components/icons/home-icon.js +19 -0
- package/src/components/icons/icons.js +5 -0
- package/src/components/icons/icons.stories.js +28 -2
- package/src/components/icons/pause-icon.js +20 -0
- package/src/components/icons/play-icon.js +19 -0
- package/src/components/icons/small-business-icon.js +19 -0
- package/src/components/logo-marquee/logo-marquee.css.js +88 -0
- package/src/components/logo-marquee/logo-marquee.js +135 -0
- package/src/components/logo-marquee/logo-marquee.stories.js +125 -0
- package/src/components/motion-art/motion-art.js +42 -0
- package/src/components/motion-art/motion-art.stories.js +98 -0
- package/src/components/partner-banner/partner-banner.css.js +162 -0
- package/src/components/partner-banner/partner-banner.js +68 -0
- package/src/components/partner-banner/partner-banner.stories.js +86 -0
- package/src/components/post-card/post-card.css.js +121 -0
- package/src/components/post-card/post-card.js +80 -0
- package/src/components/post-card/post-card.stories.js +79 -0
- package/src/components/section-header/section-header.css.js +89 -0
- package/src/components/section-header/section-header.js +79 -0
- package/src/components/section-header/section-header.stories.js +129 -0
- package/src/components/stat/stat-highlight.js +75 -0
- package/src/components/stat/stat-tile.js +43 -0
- package/src/components/stat/stat.css.js +111 -0
- package/src/components/stat/stat.js +2 -0
- package/src/components/stat/stat.stories.js +92 -0
- package/src/vendor/motion-art/README.md +27 -0
- package/src/vendor/motion-art/motion-art-element.js +116 -0
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { html } from "lit";
|
|
2
|
+
import "../audience-card/audience-card.js";
|
|
3
|
+
import "../grid/grid.js";
|
|
4
|
+
import "../icons/home-icon.js";
|
|
5
|
+
import "../icons/small-business-icon.js";
|
|
6
|
+
import "../icons/enterprise-icon.js";
|
|
7
|
+
import "../motion-art/motion-art.js";
|
|
8
|
+
import "./hero.js";
|
|
9
|
+
|
|
10
|
+
export default {
|
|
11
|
+
title : "Modules/Hero",
|
|
12
|
+
component : "bd-hero",
|
|
13
|
+
tags : ["autodocs"],
|
|
14
|
+
parameters: {
|
|
15
|
+
layout: "fullscreen",
|
|
16
|
+
docs : {
|
|
17
|
+
description: {
|
|
18
|
+
component: `
|
|
19
|
+
**Hero** is the homepage hero: a brand band with a full-bleed looping video
|
|
20
|
+
fading into the brand at the bottom, an eyebrow, the page's one h1 and a lead.
|
|
21
|
+
Drawn in the foundation Figma file as **Hero**. It sells nothing and carries no
|
|
22
|
+
CTA, which is what separates it from \`bd-header\`, the product hero.
|
|
23
|
+
|
|
24
|
+
\`\`\`html
|
|
25
|
+
<bd-hero eyebrow="25 Years. Trusted. Always." heading="Cybersecurity for the AI Era."
|
|
26
|
+
lead="Bitdefender protects consumers, …">
|
|
27
|
+
<bd-motion-art slot="media" object="brand-surface"></bd-motion-art>
|
|
28
|
+
<bd-grid slot="cards" cols="1" cols-lg="3" gap="md">
|
|
29
|
+
<bd-audience-card …></bd-audience-card>
|
|
30
|
+
</bd-grid>
|
|
31
|
+
</bd-hero>
|
|
32
|
+
\`\`\`
|
|
33
|
+
|
|
34
|
+
| Width | Layout |
|
|
35
|
+
|---|---|
|
|
36
|
+
| below \`md\` | video on top (360), copy centred under it, rising into the fade |
|
|
37
|
+
| \`md\` to \`lg\` | the same, the eyebrow at h3 and the h1 at display-md |
|
|
38
|
+
| \`lg\` and up | the video fills the band, the copy sits left on a 588 measure, the h1 at display-xl, and the \`cards\` slot rises 128 into the band's lower edge |
|
|
39
|
+
|
|
40
|
+
### Slots
|
|
41
|
+
|
|
42
|
+
| Slot | Description |
|
|
43
|
+
|---|---|
|
|
44
|
+
| \`media\` | Animated art in the video's place: \`<bd-motion-art object="brand-surface">\`. It replaces \`video-src\` and \`poster\`, and sits square and centred: 112% of the 360 stage's height on a phone and 120% from \`md\`, so the sphere fills the stage as the Figma phone and tablet frames draw it; from \`lg\` as tall as the band, centred on 74% of it (\`--bd-hero-art-position-lg\` moves it) |
|
|
45
|
+
| \`cards\` | The audience cards |
|
|
46
|
+
|
|
47
|
+
### Properties
|
|
48
|
+
|
|
49
|
+
| Property | Type | Default | Description |
|
|
50
|
+
|---|---|---|---|
|
|
51
|
+
| \`eyebrow\` | String | \`""\` | The line above the h1. A heading role, not a heading |
|
|
52
|
+
| \`heading\` | String | \`""\` | The page's h1 |
|
|
53
|
+
| \`lead\` | String | \`""\` | The paragraph under it |
|
|
54
|
+
| \`video-src\` | String | \`""\` | A muted looping background video |
|
|
55
|
+
| \`poster\` | String | \`""\` | Its still. With no \`video-src\` it is the background on its own |
|
|
56
|
+
| \`paused\` | Boolean | \`false\` | Stopped; the pause button sets it |
|
|
57
|
+
| \`pause-label\` / \`play-label\` | String | English | The button's accessible name in each state |
|
|
58
|
+
|
|
59
|
+
### Motion
|
|
60
|
+
|
|
61
|
+
The video loops on its own, so there is a pause button in its top corner
|
|
62
|
+
(WCAG 2.2.2). Under \`prefers-reduced-motion\` it never plays and the poster
|
|
63
|
+
stands still; the button goes. Slotted art draws no button: it holds a still
|
|
64
|
+
frame under \`prefers-reduced-motion\`, and stops with \`paused\`.
|
|
65
|
+
`
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
argTypes: {
|
|
70
|
+
eyebrow : { control: "text" },
|
|
71
|
+
heading : { control: "text" },
|
|
72
|
+
lead : { control: "text" },
|
|
73
|
+
videoSrc: { control: "text" },
|
|
74
|
+
poster : { control: "text" },
|
|
75
|
+
paused : { control: "boolean" },
|
|
76
|
+
art : { control: "boolean", description: "Story only: slot bd-motion-art in `media`" }
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
const cards = html`
|
|
81
|
+
<bd-grid slot="cards" cols="1" cols-sm="1" cols-md="1" cols-lg="3" gap="md">
|
|
82
|
+
<bd-audience-card eyebrow="For home" heading="Protect Your Digital Life" href="#home"
|
|
83
|
+
description="AI-powered protection against scams, deepfake fraud, identity theft, and online threats across all your devices.">
|
|
84
|
+
<bd-home-icon slot="icon"></bd-home-icon>
|
|
85
|
+
</bd-audience-card>
|
|
86
|
+
<bd-audience-card eyebrow="For small business" heading="Protect What You’ve Built" href="#small-business"
|
|
87
|
+
description="Easy-to-manage cybersecurity and ransomware protection for businesses without a dedicated IT team.">
|
|
88
|
+
<bd-small-business-icon slot="icon"></bd-small-business-icon>
|
|
89
|
+
</bd-audience-card>
|
|
90
|
+
<bd-audience-card eyebrow="For enterprise" heading="Defend Your Organization" href="#enterprise"
|
|
91
|
+
description="Enterprise cybersecurity that reduces risk and complexity across endpoints, cloud, and hybrid infrastructure.">
|
|
92
|
+
<bd-enterprise-icon slot="icon"></bd-enterprise-icon>
|
|
93
|
+
</bd-audience-card>
|
|
94
|
+
</bd-grid>
|
|
95
|
+
`;
|
|
96
|
+
|
|
97
|
+
const defaults = {
|
|
98
|
+
eyebrow : "25 Years. Trusted. Always.",
|
|
99
|
+
heading : "Cybersecurity for the AI Era.",
|
|
100
|
+
lead : "Bitdefender protects consumers, small businesses, and enterprises with cybersecurity powered by world-class threat intelligence and more than two decades of security innovation. Its technology is independently tested and proven.",
|
|
101
|
+
videoSrc: "",
|
|
102
|
+
poster : "/images/hero/ai-sphere-poster.jpg",
|
|
103
|
+
paused : false,
|
|
104
|
+
art : true
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
const render = ({ eyebrow, heading, lead, videoSrc, poster, paused, art }, { withCards = true } = {}) => html`
|
|
108
|
+
<bd-hero eyebrow="${eyebrow}" heading="${heading}" lead="${lead}"
|
|
109
|
+
video-src="${videoSrc}" poster="${poster}" ?paused=${paused}>
|
|
110
|
+
${art ? html`<bd-motion-art slot="media" object="brand-surface"></bd-motion-art>` : ""}
|
|
111
|
+
${withCards ? cards : ""}
|
|
112
|
+
</bd-hero>
|
|
113
|
+
`;
|
|
114
|
+
|
|
115
|
+
export const Homepage = {
|
|
116
|
+
name: "Homepage (with audience cards)",
|
|
117
|
+
args: { ...defaults },
|
|
118
|
+
render
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
export const WithoutCards = {
|
|
122
|
+
name : "Without cards",
|
|
123
|
+
args : { ...defaults },
|
|
124
|
+
render: args => render(args, { withCards: false })
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
export const PosterOnly = {
|
|
128
|
+
name: "Poster only (no art)",
|
|
129
|
+
args: { ...defaults, art: false },
|
|
130
|
+
render
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
export const Tablet = {
|
|
134
|
+
name : "Tablet (768px)",
|
|
135
|
+
args : { ...defaults },
|
|
136
|
+
render,
|
|
137
|
+
parameters: { viewport: { defaultViewport: "tablet" } }
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
export const Mobile = {
|
|
141
|
+
name : "Mobile (375px)",
|
|
142
|
+
args : { ...defaults },
|
|
143
|
+
render,
|
|
144
|
+
parameters: { viewport: { defaultViewport: "mobile1" } }
|
|
145
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// icons/enterprise-icon.js
|
|
2
|
+
import { html } from "lit";
|
|
3
|
+
import { BdIconElement } from "./icon-element.js";
|
|
4
|
+
|
|
5
|
+
/* The enterprise audience icon from the homepage audience cards (Figma: Icon/enterprise, 2026_splitter).
|
|
6
|
+
Drawn filled on a 24 grid, so it sits at lg. */
|
|
7
|
+
class EnterpriseIcon extends BdIconElement {
|
|
8
|
+
static defaultSize = "lg";
|
|
9
|
+
|
|
10
|
+
render() {
|
|
11
|
+
return html`
|
|
12
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" aria-hidden="true">
|
|
13
|
+
<path d="M1.5 8.1V20.475C1.5 21.6 2.4 22.575 3.6 22.575H9V21.075H3.6C3.3 21.075 3 20.85 3 20.475V8.1C3 7.8 3.225 7.5 3.6 7.5H9V6H3.6C2.475 6 1.5 6.9 1.5 8.1ZM20.625 1.5H12.375C11.325 1.5 10.5 2.325 10.5 3.375V20.7C10.5 21.75 11.325 22.575 12.375 22.575H20.625C21.675 22.575 22.5 21.75 22.5 20.7V3.375C22.5 2.325 21.675 1.5 20.625 1.5ZM21 20.7C21 20.925 20.85 21.075 20.625 21.075H12.375C12.15 21.075 12 20.925 12 20.7V3.375C12 3.15 12.15 3 12.375 3H20.625C20.85 3 21 3.15 21 3.375V20.7ZM6 18H9V16.5H6V18ZM9 12H6V13.5H9V12ZM15 18H18V16.5H15V18ZM15 13.5H18V12H15V13.5ZM15 9H18V7.5H15V9Z" fill="currentColor"/>
|
|
14
|
+
</svg>
|
|
15
|
+
`;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
customElements.define("bd-enterprise-icon", EnterpriseIcon);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// icons/home-icon.js
|
|
2
|
+
import { html } from "lit";
|
|
3
|
+
import { BdIconElement } from "./icon-element.js";
|
|
4
|
+
|
|
5
|
+
/* The home audience icon from the homepage audience cards (Figma: Icon/home, 2026_splitter).
|
|
6
|
+
Drawn filled on a 24 grid, so it sits at lg. */
|
|
7
|
+
class HomeIcon extends BdIconElement {
|
|
8
|
+
static defaultSize = "lg";
|
|
9
|
+
|
|
10
|
+
render() {
|
|
11
|
+
return html`
|
|
12
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" aria-hidden="true">
|
|
13
|
+
<path d="M6 18H18V16.5H6V18ZM21.225 5.7L12.975 1.725C12.375 1.425 11.625 1.425 11.025 1.725L2.775 5.7C2.025 6.075 1.5 6.9 1.5 7.725V20.25C1.5 21.525 2.475 22.5 3.75 22.5H20.25C21.525 22.5 22.5 21.525 22.5 20.25V7.725C22.5 6.825 21.975 6.075 21.225 5.7ZM21 20.25C21 20.7 20.7 21 20.25 21H3.75C3.3 21 3 20.7 3 20.25V7.725C3 7.425 3.15 7.2 3.45 7.05L11.7 3.075C11.925 3 12.15 3 12.375 3.075L20.625 7.05C20.85 7.2 21.075 7.425 21.075 7.725V20.25H21Z" fill-rule="evenodd" clip-rule="evenodd" fill="currentColor"/>
|
|
14
|
+
</svg>
|
|
15
|
+
`;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
customElements.define("bd-home-icon", HomeIcon);
|
|
@@ -25,12 +25,17 @@ import './arrow-right-icon.js';
|
|
|
25
25
|
import './arrow-up-icon.js';
|
|
26
26
|
import './circle-info-icon.js';
|
|
27
27
|
import './close-icon.js';
|
|
28
|
+
import './enterprise-icon.js';
|
|
28
29
|
import './family-icon.js';
|
|
29
30
|
import './globe-icon.js';
|
|
30
31
|
import './guide-icon.js';
|
|
32
|
+
import './home-icon.js';
|
|
31
33
|
import './individual-icon.js';
|
|
32
34
|
import './laurel-icon.js';
|
|
33
35
|
import './machine-learning-icon.js';
|
|
34
36
|
import './minus-icon.js';
|
|
37
|
+
import './pause-icon.js';
|
|
38
|
+
import './play-icon.js';
|
|
35
39
|
import './missing-icon.js';
|
|
36
40
|
import './plus-icon.js';
|
|
41
|
+
import './small-business-icon.js';
|
|
@@ -8,14 +8,19 @@ import "./arrow-up-icon.js";
|
|
|
8
8
|
import "./check-icon.js";
|
|
9
9
|
import "./circle-info-icon.js";
|
|
10
10
|
import "./close-icon.js";
|
|
11
|
+
import "./enterprise-icon.js";
|
|
11
12
|
import "./family-icon.js";
|
|
12
13
|
import "./globe-icon.js";
|
|
13
14
|
import "./guide-icon.js";
|
|
15
|
+
import "./home-icon.js";
|
|
14
16
|
import "./individual-icon.js";
|
|
15
17
|
import "./laurel-icon.js";
|
|
16
18
|
import "./machine-learning-icon.js";
|
|
17
19
|
import "./minus-icon.js";
|
|
20
|
+
import "./pause-icon.js";
|
|
21
|
+
import "./play-icon.js";
|
|
18
22
|
import "./plus-icon.js";
|
|
23
|
+
import "./small-business-icon.js";
|
|
19
24
|
|
|
20
25
|
export default {
|
|
21
26
|
title : 'Atoms/Icon',
|
|
@@ -24,7 +29,7 @@ export default {
|
|
|
24
29
|
docs: {
|
|
25
30
|
description: {
|
|
26
31
|
component: `
|
|
27
|
-
|
|
32
|
+
Twenty-one tintable interface icons, each its own custom element.
|
|
28
33
|
|
|
29
34
|
They take a \`size\` step from the icon scale and are drawn in \`currentColor\`, so
|
|
30
35
|
an icon follows the text it sits beside and most uses need no colour at all.
|
|
@@ -34,7 +39,8 @@ an icon follows the text it sits beside and most uses need no colour at all.
|
|
|
34
39
|
\`bd-close-icon\`, \`bd-family-icon\`, \`bd-globe-icon\`,
|
|
35
40
|
\`bd-individual-icon\`, \`bd-minus-icon\`, \`bd-plus-icon\`,
|
|
36
41
|
\`bd-analysis-icon\`, \`bd-guide-icon\`, \`bd-machine-learning-icon\`,
|
|
37
|
-
\`bd-laurel-icon\`
|
|
42
|
+
\`bd-laurel-icon\`, \`bd-home-icon\`, \`bd-small-business-icon\`,
|
|
43
|
+
\`bd-enterprise-icon\`, \`bd-pause-icon\`, \`bd-play-icon\`
|
|
38
44
|
|
|
39
45
|
### The brand and award marks live in Atoms/Brand mark
|
|
40
46
|
Eight wordmarks and award badges used to sit here — \`bd-pc-mag-icon\` and the
|
|
@@ -312,6 +318,26 @@ export const AllIcons = {
|
|
|
312
318
|
<bd-family-icon width="32" height="32" color="var(--color-blue-500)"></bd-family-icon>
|
|
313
319
|
<span>bd-family-icon</span>
|
|
314
320
|
</div>
|
|
321
|
+
<div class="icon-item">
|
|
322
|
+
<bd-home-icon size="lg" color="var(--color-blue-500)"></bd-home-icon>
|
|
323
|
+
<span>bd-home-icon</span>
|
|
324
|
+
</div>
|
|
325
|
+
<div class="icon-item">
|
|
326
|
+
<bd-small-business-icon size="lg" color="var(--color-blue-500)"></bd-small-business-icon>
|
|
327
|
+
<span>bd-small-business-icon</span>
|
|
328
|
+
</div>
|
|
329
|
+
<div class="icon-item">
|
|
330
|
+
<bd-enterprise-icon size="lg" color="var(--color-blue-500)"></bd-enterprise-icon>
|
|
331
|
+
<span>bd-enterprise-icon</span>
|
|
332
|
+
</div>
|
|
333
|
+
<div class="icon-item">
|
|
334
|
+
<bd-pause-icon size="md" color="var(--color-blue-500)"></bd-pause-icon>
|
|
335
|
+
<span>bd-pause-icon</span>
|
|
336
|
+
</div>
|
|
337
|
+
<div class="icon-item">
|
|
338
|
+
<bd-play-icon size="md" color="var(--color-blue-500)"></bd-play-icon>
|
|
339
|
+
<span>bd-play-icon</span>
|
|
340
|
+
</div>
|
|
315
341
|
<div class="icon-item">
|
|
316
342
|
<bd-globe-icon width="20" height="20" color="var(--color-blue-500)"></bd-globe-icon>
|
|
317
343
|
<span>bd-globe-icon</span>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// icons/pause-icon.js
|
|
2
|
+
import { html } from "lit";
|
|
3
|
+
import { BdIconElement } from "./icon-element.js";
|
|
4
|
+
|
|
5
|
+
/* Two bars: the control that stops something that moves on its own -- a
|
|
6
|
+
marquee, a looping video. Drawn on a 16 grid, so it sits at sm. */
|
|
7
|
+
class PauseIcon extends BdIconElement {
|
|
8
|
+
static defaultSize = "sm";
|
|
9
|
+
|
|
10
|
+
render() {
|
|
11
|
+
return html`
|
|
12
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" aria-hidden="true">
|
|
13
|
+
<rect x="4" y="3" width="3" height="10" rx="1" fill="currentColor"/>
|
|
14
|
+
<rect x="9" y="3" width="3" height="10" rx="1" fill="currentColor"/>
|
|
15
|
+
</svg>
|
|
16
|
+
`;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
customElements.define("bd-pause-icon", PauseIcon);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// icons/play-icon.js
|
|
2
|
+
import { html } from "lit";
|
|
3
|
+
import { BdIconElement } from "./icon-element.js";
|
|
4
|
+
|
|
5
|
+
/* A right-pointing triangle: the control that sets a paused marquee or video
|
|
6
|
+
moving again. Drawn on a 16 grid, so it sits at sm. */
|
|
7
|
+
class PlayIcon extends BdIconElement {
|
|
8
|
+
static defaultSize = "sm";
|
|
9
|
+
|
|
10
|
+
render() {
|
|
11
|
+
return html`
|
|
12
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" aria-hidden="true">
|
|
13
|
+
<path d="M5 3.2v9.6a.75.75 0 0 0 1.14.64l7.6-4.8a.75.75 0 0 0 0-1.28l-7.6-4.8A.75.75 0 0 0 5 3.2Z" fill="currentColor"/>
|
|
14
|
+
</svg>
|
|
15
|
+
`;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
customElements.define("bd-play-icon", PlayIcon);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// icons/small-business-icon.js
|
|
2
|
+
import { html } from "lit";
|
|
3
|
+
import { BdIconElement } from "./icon-element.js";
|
|
4
|
+
|
|
5
|
+
/* The small-business audience icon from the homepage audience cards (Figma: Icon/small-business, 2026_splitter).
|
|
6
|
+
Drawn filled on a 24 grid, so it sits at lg. */
|
|
7
|
+
class SmallBusinessIcon extends BdIconElement {
|
|
8
|
+
static defaultSize = "lg";
|
|
9
|
+
|
|
10
|
+
render() {
|
|
11
|
+
return html`
|
|
12
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" aria-hidden="true">
|
|
13
|
+
<path d="M22.725 5.1L20.925 2.25C20.625 1.8 20.1 1.5 19.575 1.5H4.425C3.9 1.5 3.375 1.8 3.075 2.25L1.275 5.1C0.675 6.075 0.6 7.2 1.05 8.25C1.5 9.225 2.325 9.825 3.375 9.975C4.275 10.05 5.175 9.825 5.85 9.375C6.225 9.6 6.6 9.825 6.975 9.9C7.125 9.9 7.2 9.9 7.35 9.975H7.425H7.5C8.4 9.975 9.225 9.825 9.825 9.375C9.825 9.375 9.975 9.45 10.05 9.525C10.2 9.6 10.35 9.675 10.5 9.75C10.65 9.75 10.8 9.9 11.025 9.9C11.625 10.05 12.15 10.05 12.825 9.9C12.825 9.9 12.9 9.9 12.975 9.9C13.275 9.825 13.575 9.6 13.875 9.45C14.475 9.9 15.15 10.125 15.975 10.125C16.8 10.125 16.2 10.125 16.35 10.125H16.5C16.575 10.125 16.725 10.125 16.725 10.05C16.8 10.05 16.95 10.05 17.025 9.975C17.4 9.825 17.7 9.675 17.925 9.525C18.525 9.975 19.2 10.2 19.95 10.2C20.7 10.2 20.25 10.2 20.4 10.2C21.45 10.05 22.275 9.375 22.725 8.475C23.175 7.425 23.1 6.3 22.5 5.325L22.725 5.1ZM21.6 7.575C21.375 8.1 20.925 8.4 20.4 8.475C19.875 8.475 19.35 8.475 18.9 8.1C18.825 8.025 18.675 7.95 18.6 7.8H17.475C17.4 7.875 17.325 8.025 17.175 8.1C17.025 8.25 16.875 8.325 16.65 8.4C16.65 8.4 16.65 8.4 16.5 8.4C16.5 8.4 16.425 8.4 16.35 8.4H16.275C16.275 8.4 16.125 8.4 16.05 8.4C15.6 8.4 15.225 8.25 14.85 8.025C14.85 8.025 14.775 7.95 14.7 7.875C14.7 7.875 14.625 7.8 14.55 7.725H13.425C13.425 7.725 13.35 7.8 13.275 7.875C13.275 7.875 13.125 7.95 13.125 8.025C12.975 8.175 12.825 8.25 12.675 8.325C12.675 8.325 12.6 8.325 12.525 8.325C12.15 8.4 11.775 8.4 11.475 8.325C11.4 8.325 11.25 8.325 11.175 8.25C11.1 8.25 10.95 8.175 10.875 8.1C10.875 8.1 10.8 8.1 10.725 8.025C10.725 8.025 10.65 8.025 10.65 7.95C10.65 7.875 10.65 7.875 10.575 7.8H9.45C9.375 7.875 9.225 7.95 9.15 8.025C8.85 8.25 8.4 8.4 7.95 8.4C7.5 8.4 7.8 8.4 7.725 8.4H7.5C7.275 8.325 7.05 8.175 6.825 8.025C6.75 7.95 6.6 7.875 6.525 7.8H5.4C5.25 7.875 5.175 8.025 5.1 8.1C4.8 8.325 4.35 8.475 3.9 8.475C3.45 8.475 3.675 8.475 3.6 8.475C3.075 8.475 2.625 8.1 2.4 7.575C2.175 7.05 2.175 6.375 2.475 5.925L4.275 3.075C4.275 3.075 4.275 3.075 4.425 3.075H19.575H19.65L21.45 5.925C21.75 6.45 21.825 7.05 21.525 7.575H21.6ZM21 20.25C21 20.7 20.7 21 20.25 21H3.75C3.3 21 3 20.7 3 20.25V11.25H1.5V20.25C1.5 21.525 2.475 22.5 3.75 22.5H20.25C21.525 22.5 22.5 21.525 22.5 20.25V11.25H21V20.25ZM6 16.5V18H18V16.5H6Z" fill="currentColor"/>
|
|
14
|
+
</svg>
|
|
15
|
+
`;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
customElements.define("bd-small-business-icon", SmallBusinessIcon);
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { css } from "lit";
|
|
2
|
+
|
|
3
|
+
/* The track holds the slotted set and its copies side by side and moves left
|
|
4
|
+
by exactly one of them -- 100% of the track divided by how many there are --
|
|
5
|
+
then starts again. Each set carries the gap after its last logo as padding,
|
|
6
|
+
so the space across the seam is the same as the space inside a set. */
|
|
7
|
+
export const logoMarqueeCSS = css`
|
|
8
|
+
:host {
|
|
9
|
+
display: block;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.root {
|
|
13
|
+
display: flex;
|
|
14
|
+
align-items: center;
|
|
15
|
+
gap: var(--spacing-16);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.viewport {
|
|
19
|
+
flex: 1 1 auto;
|
|
20
|
+
min-width: 0;
|
|
21
|
+
overflow: hidden;
|
|
22
|
+
/* no token: a mask is read for its alpha only, so the colour is a
|
|
23
|
+
placeholder for "opaque" and carries no ink. Solid from 12% to 88%, the
|
|
24
|
+
fade the Figma Logo marquee draws. */
|
|
25
|
+
mask-image: linear-gradient(to right, transparent, black 12%, black 88%, transparent);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.track {
|
|
29
|
+
display: flex;
|
|
30
|
+
width: max-content;
|
|
31
|
+
animation: bd-logo-marquee var(--bd-logo-marquee-duration) var(--transition-easing-linear) infinite;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
@keyframes bd-logo-marquee {
|
|
35
|
+
to {
|
|
36
|
+
transform: translateX(calc(-100% / var(--bd-logo-marquee-copies)));
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/* Held while the pointer or focus is on the row, and stopped by the button. */
|
|
41
|
+
.viewport:hover .track,
|
|
42
|
+
.viewport:focus-within .track,
|
|
43
|
+
:host([paused]) .track {
|
|
44
|
+
animation-play-state: paused;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.group {
|
|
48
|
+
display: flex;
|
|
49
|
+
flex: none;
|
|
50
|
+
align-items: center;
|
|
51
|
+
gap: var(--bd-logo-marquee-gap);
|
|
52
|
+
padding-inline-end: var(--bd-logo-marquee-gap);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
::slotted(*),
|
|
56
|
+
.copy > * {
|
|
57
|
+
flex: none;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.toggle {
|
|
61
|
+
flex: none;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/* Still, and nothing hidden: the set wraps in place, the copies and the
|
|
65
|
+
fade go, and there is nothing to pause. */
|
|
66
|
+
@media (prefers-reduced-motion: reduce) {
|
|
67
|
+
.viewport {
|
|
68
|
+
mask-image: none;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.track {
|
|
72
|
+
width: 100%;
|
|
73
|
+
animation: none;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.group {
|
|
77
|
+
flex: 1 1 auto;
|
|
78
|
+
flex-wrap: wrap;
|
|
79
|
+
justify-content: center;
|
|
80
|
+
padding-inline-end: 0;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.copy,
|
|
84
|
+
.toggle {
|
|
85
|
+
display: none;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
`;
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { LitElement, html } from "lit";
|
|
2
|
+
import { tokens } from "../../tokens/tokens.js";
|
|
3
|
+
import "../button/button.js";
|
|
4
|
+
import "../icons/pause-icon.js";
|
|
5
|
+
import "../icons/play-icon.js";
|
|
6
|
+
import { spacing } from "../shared/token-scales.js";
|
|
7
|
+
import { ensembleCSS } from "../shared/ensemble.css.js";
|
|
8
|
+
import { logoMarqueeCSS } from "./logo-marquee.css.js";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* A row of logos sliding sideways behind an edge fade: the homepage's trusted
|
|
12
|
+
* line ("#1 most awarded" and the partner marks) and the award strip under
|
|
13
|
+
* Proven. Drawn in the foundation Figma file as Logo marquee.
|
|
14
|
+
*
|
|
15
|
+
* The logos are the page's: slot them as they are (an <img> with its width
|
|
16
|
+
* and height, an icon, a label). To loop without a seam the row has to be
|
|
17
|
+
* longer than the window, so this element clones the slotted set into its
|
|
18
|
+
* own shadow root as many times as the width needs and moves the whole track
|
|
19
|
+
* by one copy -- the jump back is then exactly one repeat, and invisible. The
|
|
20
|
+
* copies are aria-hidden and inert: a screen reader reads the set once.
|
|
21
|
+
*
|
|
22
|
+
* It moves on its own for longer than five seconds, so WCAG 2.2.2 asks for a
|
|
23
|
+
* way to stop it: a pause button at the end of the row, and the pointer or
|
|
24
|
+
* focus on the row holds it. Under prefers-reduced-motion it never moves --
|
|
25
|
+
* the set wraps in place instead, so nothing is hidden behind the fade.
|
|
26
|
+
*/
|
|
27
|
+
export class LogoMarquee extends LitElement {
|
|
28
|
+
static properties = {
|
|
29
|
+
label : { type: String },
|
|
30
|
+
duration : { type: Number },
|
|
31
|
+
gap : { type: String },
|
|
32
|
+
paused : { type: Boolean, reflect: true },
|
|
33
|
+
pauseLabel: { type: String, attribute: "pause-label" },
|
|
34
|
+
playLabel : { type: String, attribute: "play-label" },
|
|
35
|
+
_copies : { state: true }
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
static styles = [tokens, ensembleCSS, logoMarqueeCSS];
|
|
39
|
+
|
|
40
|
+
constructor() {
|
|
41
|
+
super();
|
|
42
|
+
this.label = "";
|
|
43
|
+
// seconds for one copy to pass: 18 for the partners, 10 for the awards
|
|
44
|
+
this.duration = 18;
|
|
45
|
+
// a step on the spacing scale, between two logos
|
|
46
|
+
this.gap = "48";
|
|
47
|
+
this.paused = false;
|
|
48
|
+
this.pauseLabel = "Pause the logos";
|
|
49
|
+
this.playLabel = "Play the logos";
|
|
50
|
+
// copies of the set after the original; at least one, or there is no loop
|
|
51
|
+
this._copies = 1;
|
|
52
|
+
this._resize = new ResizeObserver(() => this._measure());
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
connectedCallback() {
|
|
56
|
+
super.connectedCallback();
|
|
57
|
+
if (this.hasUpdated) this._observe();
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
disconnectedCallback() {
|
|
61
|
+
super.disconnectedCallback();
|
|
62
|
+
this._resize.disconnect();
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
firstUpdated() {
|
|
66
|
+
this._observe();
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
_observe() {
|
|
70
|
+
this._resize.observe(this.renderRoot.querySelector(".viewport"));
|
|
71
|
+
this._resize.observe(this.renderRoot.querySelector(".group"));
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/* One copy must cover the window on its own while the original slides out,
|
|
75
|
+
so a set narrower than the window takes more than one. */
|
|
76
|
+
_measure() {
|
|
77
|
+
const viewport = this.renderRoot.querySelector(".viewport");
|
|
78
|
+
const group = this.renderRoot.querySelector(".group");
|
|
79
|
+
if (!viewport || !group || !group.offsetWidth) return;
|
|
80
|
+
const copies = Math.max(1, Math.ceil(viewport.offsetWidth / group.offsetWidth));
|
|
81
|
+
if (copies !== this._copies) this._copies = copies;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
_onSlotChange() {
|
|
85
|
+
this._fillCopies();
|
|
86
|
+
this._measure();
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
_fillCopies() {
|
|
90
|
+
const slot = this.renderRoot.querySelector("slot");
|
|
91
|
+
if (!slot) return;
|
|
92
|
+
const items = slot.assignedElements({ flatten: true });
|
|
93
|
+
for (const copy of this.renderRoot.querySelectorAll(".copy")) {
|
|
94
|
+
copy.replaceChildren(...items.map(item => item.cloneNode(true)));
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
updated(changed) {
|
|
99
|
+
if (changed.has("_copies")) this._fillCopies();
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
_toggle() {
|
|
103
|
+
this.paused = !this.paused;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
render() {
|
|
107
|
+
const copies = Array.from({ length: this._copies });
|
|
108
|
+
return html`
|
|
109
|
+
<section
|
|
110
|
+
class="bd-ensemble root"
|
|
111
|
+
aria-label="${this.label}"
|
|
112
|
+
style="--bd-logo-marquee-gap: ${spacing(this.gap) || "var(--spacing-48)"}; --bd-logo-marquee-duration: ${this.duration}s; --bd-logo-marquee-copies: ${this._copies + 1};"
|
|
113
|
+
>
|
|
114
|
+
<div class="viewport">
|
|
115
|
+
<div class="track">
|
|
116
|
+
<div class="group"><slot @slotchange=${this._onSlotChange}></slot></div>
|
|
117
|
+
${copies.map(() => html`<div class="group copy" aria-hidden="true" inert></div>`)}
|
|
118
|
+
</div>
|
|
119
|
+
</div>
|
|
120
|
+
<bd-button
|
|
121
|
+
class="toggle"
|
|
122
|
+
variant="ghost"
|
|
123
|
+
size="md"
|
|
124
|
+
icon-only
|
|
125
|
+
label="${this.paused ? this.playLabel : this.pauseLabel}"
|
|
126
|
+
@click=${this._toggle}
|
|
127
|
+
>${this.paused
|
|
128
|
+
? html`<bd-play-icon size="md"></bd-play-icon>`
|
|
129
|
+
: html`<bd-pause-icon size="md"></bd-pause-icon>`}</bd-button>
|
|
130
|
+
</section>
|
|
131
|
+
`;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
customElements.define("bd-logo-marquee", LogoMarquee);
|