@repobit/dex-system-design 2.1.1 → 2.2.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 +20 -0
- package/package.json +6 -3
- package/schemas/component-manifest.json +16 -7
- package/src/assets/images/awards/av-comparatives-2025.png +0 -0
- package/src/assets/images/awards/av-test-top-product.png +0 -0
- package/src/assets/images/awards/gartner-peer-insights.png +0 -0
- package/src/assets/images/awards/idc.png +0 -0
- package/src/assets/images/awards/pcmag-best-of-2026.png +0 -0
- package/src/components/accordion/accordion-bg.css.js +1 -1
- package/src/components/accordion/accordion.css.js +2 -2
- package/src/components/alert/alert.css.js +1 -1
- package/src/components/anchor/anchor-nav.css.js +7 -7
- package/src/components/awards/awards-flex.css.js +3 -3
- package/src/components/awards/awards-spotlight.css.js +132 -0
- package/src/components/awards/awards-spotlight.js +130 -0
- package/src/components/awards/awards-spotlight.stories.js +205 -0
- package/src/components/awards/awards.css.js +1 -1
- package/src/components/back/back.css.js +1 -1
- package/src/components/bento-grid/bento-grid.css.js +1 -1
- package/src/components/bento-grid/bento-item.css.js +1 -1
- package/src/components/breadcrumb/breadcrumb.css.js +1 -1
- package/src/components/button/button.css.js +72 -1
- package/src/components/button/button.js +3 -2
- package/src/components/button/button.stories.js +18 -2
- package/src/components/cards/card.css.js +1 -1
- package/src/components/checkbox/checkbox.css.js +5 -3
- package/src/components/code/code.css.js +2 -2
- package/src/components/compare/compare.css.js +2 -2
- package/src/components/compatibility-table/compatibility-table.css.js +3 -3
- package/src/components/cta-banner/cta-banner.css.js +3 -3
- package/src/components/cta-banner/cta-banner.js +1 -1
- package/src/components/display/display.stories.js +1 -1
- package/src/components/divider/divider.stories.js +2 -2
- package/src/components/features-tab/features-tab.css.js +1 -1
- package/src/components/fieldset/fieldset.css.js +1 -1
- package/src/components/footer/footer-lp.css.js +1 -1
- package/src/components/footer/footer-lp.js +8 -0
- package/src/components/footer/footer.css.js +2 -2
- package/src/components/footer/footer.js +8 -0
- package/src/components/header/header-code.css.js +4 -4
- package/src/components/header/header.css.js +6 -6
- package/src/components/heading/heading.stories.js +1 -1
- package/src/components/highlight/highlight.css.js +2 -2
- package/src/components/image/image.css.js +6 -6
- package/src/components/install-options/install-options.css.js +7 -7
- package/src/components/link/link.css.js +23 -0
- package/src/components/link/link.stories.js +16 -1
- package/src/components/modal/modal.css.js +3 -3
- package/src/components/paragraph/paragraph.stories.js +4 -4
- package/src/components/picture/picture.css.js +6 -6
- package/src/components/pricing-cards/new-pricing.css.js +1 -1
- package/src/components/pricing-cards/pricing-card-header.css.js +1 -1
- package/src/components/pricing-cards/pricing-card.css.js +3 -3
- package/src/components/radio/radio.css.js +2 -2
- package/src/components/review/review.css.js +1 -1
- package/src/components/review/review.js +3 -2
- package/src/components/shared/token-scales.js +19 -9
- package/src/components/skeleton/skeleton.css.js +1 -1
- package/src/components/spinner/spinner.css.js +1 -1
- package/src/components/spotlight-section/spotlight-section.css.js +7 -7
- package/src/components/spotlight-section/spotlight-section.js +3 -3
- package/src/components/switch/switch.css.js +3 -0
- package/src/components/tab-list/tab-list.css.js +2 -2
- package/src/components/tabs/tabs.css.js +1 -1
- package/src/components/terminal/terminal-cursor.js +1 -1
- package/src/components/terminal/terminal-message.css.js +4 -4
- package/src/components/tooltip/tooltip.css.js +1 -1
- package/src/components/video/video.css.js +1 -1
- package/src/components/video-player/video-player.css.js +3 -3
- package/src/components/video-player/video-player.js +1 -1
- package/src/tokens/brand-layer.js +185 -0
- package/src/tokens/brands.stories.js +235 -0
- package/src/tokens/dark-derivation.js +10 -1
- package/src/tokens/dark-findings.js +14 -7
- package/src/tokens/shape.stories.js +5 -0
- package/src/tokens/themes/bitdefender.js +30 -0
- package/src/tokens/themes/contract.js +27 -0
- package/src/tokens/themes/index.js +41 -0
- package/src/tokens/tokens.css +121 -39
- package/src/tokens/tokens.js +130 -40
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
import { html } from "lit";
|
|
2
|
+
import "./awards-spotlight.js";
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title : "Modules/Awards Spotlight",
|
|
6
|
+
component : "bd-awards-spotlight",
|
|
7
|
+
tags : ["autodocs"],
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: "fullscreen",
|
|
10
|
+
docs : {
|
|
11
|
+
description: {
|
|
12
|
+
component: `
|
|
13
|
+
**AwardsSpotlight** is the homepage awards carousel: one award a slide, on a
|
|
14
|
+
surface/info card, with the dots inside the card under the slides. Each slide
|
|
15
|
+
is the award's mark, an h3 title in text-brand and a paragraph saying what the
|
|
16
|
+
award is for. Drawn in the foundation Figma file as **Awards spotlight**
|
|
17
|
+
(breakpoint=desktop | tablet | mobile) and **Award logo**.
|
|
18
|
+
|
|
19
|
+
It is not \`bd-awards-flex\`, which pages small quote cards three a slide
|
|
20
|
+
under a laurel and a headline of its own. This one leaves the section heading
|
|
21
|
+
to the page around it.
|
|
22
|
+
|
|
23
|
+
\`\`\`html
|
|
24
|
+
<bd-awards-spotlight autoplay .awards=\${awards}></bd-awards-spotlight>
|
|
25
|
+
\`\`\`
|
|
26
|
+
|
|
27
|
+
| Width | Layout |
|
|
28
|
+
|---|---|
|
|
29
|
+
| below \`sm\` | mark above the copy, 24 inside the card |
|
|
30
|
+
| \`sm\` and up | the same, 32 inside |
|
|
31
|
+
| \`lg\` and up | mark beside the copy, 64 inside |
|
|
32
|
+
|
|
33
|
+
Every slide stretches to the tallest, so the dots stay in one place as the
|
|
34
|
+
slides change. The title follows the fluid h3, as every h3 in the package does.
|
|
35
|
+
|
|
36
|
+
### Properties
|
|
37
|
+
|
|
38
|
+
| Property | Type | Default | Description |
|
|
39
|
+
|---|---|---|---|
|
|
40
|
+
| \`awards\` | Array | \`[]\` | One object a slide (below) |
|
|
41
|
+
| \`label\` | String | \`"Awards and recognition"\` | Names the carousel and its dots, in the page's language |
|
|
42
|
+
| \`as\` | String | \`"h3"\` | Heading level of each title; it still looks like an h3 |
|
|
43
|
+
| \`autoplay\` | Boolean | \`false\` | Advance on its own, the current pill filling as it goes |
|
|
44
|
+
| \`autoplay-delay\` | Number | \`6000\` | Milliseconds a slide shows under autoplay |
|
|
45
|
+
|
|
46
|
+
\`\`\`js
|
|
47
|
+
{
|
|
48
|
+
logo: "/images/awards/idc.png", // the award mark
|
|
49
|
+
logoAlt: "IDC", // the award is named in the title, so this can be short
|
|
50
|
+
logoWidth: 132, // the mark's drawn size, which reserves its space
|
|
51
|
+
logoHeight: 80,
|
|
52
|
+
title: "A Major Player in MDR",
|
|
53
|
+
body: "In the IDC MarketScape: ..."
|
|
54
|
+
}
|
|
55
|
+
\`\`\`
|
|
56
|
+
|
|
57
|
+
### Accessibility
|
|
58
|
+
|
|
59
|
+
A carousel region holding one group a slide (\`aria-roledescription\`), the
|
|
60
|
+
slides that are not showing kept out of the tab order and the reading order
|
|
61
|
+
with \`inert\`. Autoplay belongs to \`bd-pagination-dots\`: the pointer or focus
|
|
62
|
+
on the slides holds it, picking a dot stops it for good (WCAG 2.2.2), and it
|
|
63
|
+
never starts under \`prefers-reduced-motion\`. The slides are a polite live
|
|
64
|
+
region while they are still and silent while they move on their own.
|
|
65
|
+
`
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
argTypes: {
|
|
70
|
+
autoplay : { control: "boolean" },
|
|
71
|
+
autoplayDelay: { control: { type: "number", min: 1000, step: 500 } },
|
|
72
|
+
label : { control: "text" },
|
|
73
|
+
as : { control: "select", options: ["h2", "h3", "h4"] },
|
|
74
|
+
awards : { control: "object" }
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
// The five awards on the homepage, in its order.
|
|
79
|
+
const homepageAwards = [
|
|
80
|
+
{
|
|
81
|
+
logo : "/images/awards/gartner-peer-insights.png",
|
|
82
|
+
logoAlt : "Gartner Peer Insights Customers' Choice 2026",
|
|
83
|
+
logoWidth : 160,
|
|
84
|
+
logoHeight: 134,
|
|
85
|
+
title : "A Visionary",
|
|
86
|
+
body : "Bitdefender received a dual recognition from Gartner®: A Visionary in the 2026 Gartner Magic Quadrant™ for Endpoint Protection Platforms and a Customers' Choice in Gartner Peer Insights™ Voice of the Customer for EPPs."
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
logo : "/images/awards/pcmag-best-of-2026.png",
|
|
90
|
+
logoAlt : "PCMag Best of 2026",
|
|
91
|
+
logoWidth : 160,
|
|
92
|
+
logoHeight: 79,
|
|
93
|
+
title : "Among PCMag’s 25 Best Tech Brands for 2026",
|
|
94
|
+
body : "Technology authority PCMag ranked Bitdefender among its top technology brands for 2026, and first among cybersecurity companies, based on an index that combines customer satisfaction scores with the magazine’s product review evaluations."
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
logo : "/images/awards/idc.png",
|
|
98
|
+
logoAlt : "IDC",
|
|
99
|
+
logoWidth : 132,
|
|
100
|
+
logoHeight: 80,
|
|
101
|
+
title : "A Major Player in MDR",
|
|
102
|
+
body : "In the IDC MarketScape: Worldwide Managed Detection and Response Services for Midmarket 2026 Vendor Assessment, IDC recommends Bitdefender for organizations seeking a platform-native MDR service with integrated risk-based threat hunting, data sovereignty options and intelligence-led capabilities."
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
logo : "/images/awards/av-test-top-product.png",
|
|
106
|
+
logoAlt : "AV-TEST Top Product",
|
|
107
|
+
logoWidth : 160,
|
|
108
|
+
logoHeight: 79,
|
|
109
|
+
title : "Leadership in Best Protection & Performance",
|
|
110
|
+
body : "AV-TEST tests security products every month, on protection, performance and usability. Bitdefender has earned wide recognition across all three, outperforming competitors over the last two decades. In 2025 it took top results in each category again."
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
logo : "/images/awards/av-comparatives-2025.png",
|
|
114
|
+
logoAlt : "AV-Comparatives Top Rated 2025",
|
|
115
|
+
logoWidth : 160,
|
|
116
|
+
logoHeight: 82,
|
|
117
|
+
title : "An industry record for cybersecurity Product of the Year",
|
|
118
|
+
body : "Bitdefender has won five “Product of the Year” awards between 2013 and 2024, a record unmatched by any other vendor. In 2025 it received a Top-Rated Product Award from AV-Comparatives for consistent results across independent protection and performance tests."
|
|
119
|
+
}
|
|
120
|
+
];
|
|
121
|
+
|
|
122
|
+
const defaultArgs = {
|
|
123
|
+
awards : homepageAwards,
|
|
124
|
+
label : "Awards and recognition",
|
|
125
|
+
as : "h3",
|
|
126
|
+
autoplay : false,
|
|
127
|
+
autoplayDelay: 6000
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
const render = (args) => html`
|
|
131
|
+
<bd-awards-spotlight
|
|
132
|
+
.awards=${args.awards}
|
|
133
|
+
label=${args.label}
|
|
134
|
+
as=${args.as}
|
|
135
|
+
?autoplay=${args.autoplay}
|
|
136
|
+
autoplay-delay=${args.autoplayDelay}
|
|
137
|
+
></bd-awards-spotlight>
|
|
138
|
+
`;
|
|
139
|
+
|
|
140
|
+
export const Default = {
|
|
141
|
+
name : "Homepage — five awards",
|
|
142
|
+
args : { ...defaultArgs },
|
|
143
|
+
render,
|
|
144
|
+
parameters: {
|
|
145
|
+
docs: {
|
|
146
|
+
description: {
|
|
147
|
+
story: "The homepage set. Click a dot to move; on a wide screen the mark sits beside the copy."
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
export const Autoplay = {
|
|
154
|
+
name : "Autoplay",
|
|
155
|
+
args : { ...defaultArgs, autoplay: true },
|
|
156
|
+
render,
|
|
157
|
+
parameters: {
|
|
158
|
+
docs: {
|
|
159
|
+
description: {
|
|
160
|
+
story: "Advances every six seconds and the current pill fills as it goes. Hover or focus the slides to hold it; pick a dot to stop it."
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
export const Tablet = {
|
|
167
|
+
name : "Tablet (768px)",
|
|
168
|
+
args : { ...defaultArgs },
|
|
169
|
+
render,
|
|
170
|
+
parameters: {
|
|
171
|
+
viewport: { defaultViewport: "tablet" },
|
|
172
|
+
docs : {
|
|
173
|
+
description: {
|
|
174
|
+
story: "Between sm and lg the mark sits above the copy, 32 inside the card."
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
export const Mobile = {
|
|
181
|
+
name : "Mobile (375px)",
|
|
182
|
+
args : { ...defaultArgs },
|
|
183
|
+
render,
|
|
184
|
+
parameters: {
|
|
185
|
+
viewport: { defaultViewport: "mobile1" },
|
|
186
|
+
docs : {
|
|
187
|
+
description: {
|
|
188
|
+
story: "Below sm: stacked, 24 inside the card."
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
export const SingleAward = {
|
|
195
|
+
name : "Edge Case — One Award",
|
|
196
|
+
args : { ...defaultArgs, awards: homepageAwards.slice(0, 1), autoplay: true },
|
|
197
|
+
render,
|
|
198
|
+
parameters: {
|
|
199
|
+
docs: {
|
|
200
|
+
description: {
|
|
201
|
+
story: "One award: no dots, and autoplay has nothing to move to."
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
};
|
|
@@ -124,7 +124,7 @@ export const awardsCSS = css`
|
|
|
124
124
|
a decorative graphic has no minimum at all, so the wreath was safe before
|
|
125
125
|
the band and is safe after it -- which is why this choice did not have to
|
|
126
126
|
wait on that decision. */
|
|
127
|
-
color: var(--color-
|
|
127
|
+
color: var(--color-brand-500);
|
|
128
128
|
display: flex;
|
|
129
129
|
align-items: center;
|
|
130
130
|
justify-content: center;
|
|
@@ -20,7 +20,7 @@ export default css`
|
|
|
20
20
|
font-weight: var(--typography-fontWeight-bold);
|
|
21
21
|
color: var(--color-text-primary);
|
|
22
22
|
cursor: pointer;
|
|
23
|
-
border-radius: var(--radius-lg);
|
|
23
|
+
border-radius: var(--shape-radius-lg);
|
|
24
24
|
/* the properties that change, not all */
|
|
25
25
|
transition: background-color var(--transition-duration-normal) var(--transition-easing-smooth),
|
|
26
26
|
color var(--transition-duration-normal) var(--transition-easing-smooth);
|
|
@@ -12,7 +12,7 @@ export default css`
|
|
|
12
12
|
section uses. === */
|
|
13
13
|
:host([background="tint"]) .bd-ensemble {
|
|
14
14
|
background-color: var(--status-brand-surface);
|
|
15
|
-
border-radius: var(--radius-2xl);
|
|
15
|
+
border-radius: var(--shape-radius-2xl);
|
|
16
16
|
padding-block: var(--spacing-40);
|
|
17
17
|
}
|
|
18
18
|
|
|
@@ -107,7 +107,7 @@ box-shadow: 0px 14px 40px #00000012;
|
|
|
107
107
|
the brand's darkest blue.
|
|
108
108
|
no role: blue-950 is a gradient's far stop, decoration rather than a
|
|
109
109
|
ground any text is measured against -- the same stop bd-cta-banner ends on. */
|
|
110
|
-
background: linear-gradient(160deg, var(--color-surface-inverse) 0%, var(--color-
|
|
110
|
+
background: linear-gradient(160deg, var(--color-surface-inverse) 0%, var(--color-brand-950) 130%);
|
|
111
111
|
}
|
|
112
112
|
|
|
113
113
|
:host([tone="dark"]) .bd-bentoitem-title-wrap bd-h {
|
|
@@ -119,7 +119,7 @@ export default css`
|
|
|
119
119
|
them; only the padding moves to where the target is. */
|
|
120
120
|
:host([orientation="vertical"]) .bd-breadcrumb__item {
|
|
121
121
|
background: var(--color-surface-subtle);
|
|
122
|
-
border-radius: var(--radius-sm);
|
|
122
|
+
border-radius: var(--shape-radius-sm);
|
|
123
123
|
width: 100%;
|
|
124
124
|
}
|
|
125
125
|
|
|
@@ -297,7 +297,7 @@ export default css`
|
|
|
297
297
|
/* shape="rounded". After the size rules on purpose: same specificity, so
|
|
298
298
|
source order is what lets the shape replace the size band's corner. */
|
|
299
299
|
.button--rounded {
|
|
300
|
-
border-radius: var(--radius-3xl);
|
|
300
|
+
border-radius: var(--shape-radius-3xl);
|
|
301
301
|
}
|
|
302
302
|
|
|
303
303
|
/* ============================================
|
|
@@ -586,6 +586,77 @@ export default css`
|
|
|
586
586
|
|
|
587
587
|
}
|
|
588
588
|
|
|
589
|
+
/* ============================================
|
|
590
|
+
SURFACE — brand
|
|
591
|
+
|
|
592
|
+
For a band filled with the brand itself, --color-surface-brand. On
|
|
593
|
+
Bitdefender that band is blue and surface="dark" already reads; on a
|
|
594
|
+
partner whose brand is light, dark's white fills and white rings are
|
|
595
|
+
exactly what cannot be seen.
|
|
596
|
+
|
|
597
|
+
So this surface is built from one pair only: the brand's ink,
|
|
598
|
+
--color-brand-on-fill, and the brand fill, --color-action-primary. A theme
|
|
599
|
+
must clear 4.5:1 between those two (verify-brands' ink floor), so every
|
|
600
|
+
label and every boundary below inherits that floor whichever way the
|
|
601
|
+
brand runs -- white ink on a dark brand, dark ink on a light one. Nothing
|
|
602
|
+
here may mix the two into a third colour: a tint moves toward one of them
|
|
603
|
+
and loses contrast against it, and which one depends on the brand.
|
|
604
|
+
|
|
605
|
+
That is also why the states swap the pair rather than tint it. primary
|
|
606
|
+
is the ink fill with the brand as its label, and on hover and press it
|
|
607
|
+
becomes the ink outline; tertiary is the ink outline and inverts to the
|
|
608
|
+
ink fill. ghost has no ring and inverts the same way. secondary and
|
|
609
|
+
accent keep their own fills, whose labels are not the brand's to move,
|
|
610
|
+
and gain a ring in the ink so their edge against the band is the same
|
|
611
|
+
floor. Disabled is exempt from contrast (WCAG 1.4.3) and is the ink at
|
|
612
|
+
reduced strength.
|
|
613
|
+
|
|
614
|
+
On Bitdefender this differs from surface="dark" on purpose in two places:
|
|
615
|
+
primary's label is the band's blue-500 (4.53:1 on white) rather than
|
|
616
|
+
brand text, and its hover is the outline rather than a neutral-50 fill.
|
|
617
|
+
Both are what a theme-independent surface can promise; dark's choices
|
|
618
|
+
only hold while the brand is dark.
|
|
619
|
+
============================================ */
|
|
620
|
+
:host([surface='brand']) {
|
|
621
|
+
--bd-button-primary-bg: var(--color-brand-on-fill);
|
|
622
|
+
--bd-button-primary-text: var(--color-action-primary);
|
|
623
|
+
|
|
624
|
+
--bd-button-tertiary-text: var(--color-brand-on-fill);
|
|
625
|
+
--bd-button-tertiary-border: var(--color-brand-on-fill);
|
|
626
|
+
--bd-button-tertiary-bg-hover: var(--color-brand-on-fill);
|
|
627
|
+
--bd-button-tertiary-text-hover: var(--color-action-primary);
|
|
628
|
+
--bd-button-tertiary-border-hover: var(--color-brand-on-fill);
|
|
629
|
+
--bd-button-tertiary-bg-active: var(--color-brand-on-fill);
|
|
630
|
+
--bd-button-tertiary-text-active: var(--color-action-primary);
|
|
631
|
+
|
|
632
|
+
--bd-button-ghost-text: var(--color-brand-on-fill);
|
|
633
|
+
--bd-button-ghost-border: transparent;
|
|
634
|
+
--bd-button-ghost-bg-hover: var(--color-brand-on-fill);
|
|
635
|
+
--bd-button-ghost-text-hover: var(--color-action-primary);
|
|
636
|
+
--bd-button-ghost-bg-active: var(--color-brand-on-fill);
|
|
637
|
+
--bd-button-ghost-text-active: var(--color-action-primary);
|
|
638
|
+
|
|
639
|
+
--bd-button-accent-ring: var(--color-brand-on-fill);
|
|
640
|
+
|
|
641
|
+
--bd-button-focus-ring: var(--focus-outline-traditional-on-brand);
|
|
642
|
+
|
|
643
|
+
--bd-button-disabled-bg: color-mix(in srgb, var(--color-brand-on-fill) 20%, transparent);
|
|
644
|
+
--bd-button-disabled-text: color-mix(in srgb, var(--color-brand-on-fill) 55%, transparent);
|
|
645
|
+
--bd-button-disabled-border: color-mix(in srgb, var(--color-brand-on-fill) 40%, transparent);
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
:host([surface='brand']) .button--primary:hover,
|
|
649
|
+
:host([surface='brand']) .button--primary:active {
|
|
650
|
+
background-color: transparent;
|
|
651
|
+
--bd-button-edge: inset 0 0 0 var(--bd-button-border-width) var(--color-brand-on-fill);
|
|
652
|
+
color: var(--color-brand-on-fill);
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
/* not when disabled: the state rule clears the edge, and this is heavier */
|
|
656
|
+
:host([surface='brand']) .button--secondary:not(:disabled, [aria-disabled="true"]) {
|
|
657
|
+
--bd-button-edge: inset 0 0 0 var(--bd-button-border-width) var(--color-brand-on-fill);
|
|
658
|
+
}
|
|
659
|
+
|
|
589
660
|
/* ============================================
|
|
590
661
|
STATE — disabled
|
|
591
662
|
Filled variants go grey; outlined ones keep a transparent fill and take
|
|
@@ -26,7 +26,7 @@ const LEGACY_KINDS = {
|
|
|
26
26
|
};
|
|
27
27
|
|
|
28
28
|
const SIZE_CLASS = { sm: "button--small", md: "button--medium", lg: "button--large" };
|
|
29
|
-
const SURFACES = ["light", "dark"];
|
|
29
|
+
const SURFACES = ["light", "dark", "brand"];
|
|
30
30
|
const SHAPES = ["default", "rounded"];
|
|
31
31
|
|
|
32
32
|
/* custom-click bubbles and is composed, like every sibling event in the
|
|
@@ -99,7 +99,8 @@ class BdButtonBase extends LitElement {
|
|
|
99
99
|
this.fontWeight = "";
|
|
100
100
|
this.align = "left";
|
|
101
101
|
// "dark" retunes every variant for a hero or panel with a full background
|
|
102
|
-
// colour
|
|
102
|
+
// colour, "brand" for a band filled with the brand itself, in that brand's
|
|
103
|
+
// ink; see the SURFACE blocks in button.css.js
|
|
103
104
|
this.surface = "light";
|
|
104
105
|
this.shape = "default";
|
|
105
106
|
this.noArrow = false;
|
|
@@ -129,8 +129,8 @@ variant, so every \`variant\`, \`size\`, \`surface\` and state applies unchanged
|
|
|
129
129
|
},
|
|
130
130
|
surface: {
|
|
131
131
|
control : { type: 'inline-radio' },
|
|
132
|
-
options : ['light', 'dark'],
|
|
133
|
-
description: 'The surface the button sits on. `dark` retunes every variant for a hero with a full background colour.',
|
|
132
|
+
options : ['light', 'dark', 'brand'],
|
|
133
|
+
description: 'The surface the button sits on. `dark` retunes every variant for a hero with a full background colour; `brand` draws every variant in the brand\'s ink, for a band filled with the brand itself.',
|
|
134
134
|
table : { type: { summary: 'string' }, defaultValue: { summary: 'light' }, category: 'Appearance' }
|
|
135
135
|
},
|
|
136
136
|
size: {
|
|
@@ -355,6 +355,22 @@ export const ButtonOnDark = {
|
|
|
355
355
|
'For a hero or panel with a full background colour. The design specifies no on-dark set, so these values are derived from our palette and measured against every plausible hero colour — they need a designer\'s sign-off. ghost drops its ring so it stays distinct from tertiary; accent keeps its red and gains a white boundary.' } } }
|
|
356
356
|
};
|
|
357
357
|
|
|
358
|
+
export const ButtonOnBrand = {
|
|
359
|
+
name : 'Button — On a brand band',
|
|
360
|
+
render: () => html`
|
|
361
|
+
<div style="background:var(--color-surface-brand);padding:var(--spacing-24);border-radius:var(--radius-md);display:flex;gap:var(--spacing-12);flex-wrap:wrap;align-items:center;">
|
|
362
|
+
${VARIANTS.map(variant => html`
|
|
363
|
+
<bd-button variant="${variant}" surface="brand">${variant}</bd-button>
|
|
364
|
+
`)}
|
|
365
|
+
<bd-button variant="primary" surface="brand" disabled>disabled</bd-button>
|
|
366
|
+
<bd-button variant="tertiary" surface="brand" disabled>disabled</bd-button>
|
|
367
|
+
<bd-button variant="accent" surface="brand" loading>loading</bd-button>
|
|
368
|
+
</div>
|
|
369
|
+
`,
|
|
370
|
+
parameters: { docs: { description: { story:
|
|
371
|
+
'For a band filled with the brand, `--color-surface-brand`, on a co-branded page. Every variant is drawn from two colours: the brand\'s ink (`--color-brand-on-fill`) and the brand fill, which a theme must hold 4.5:1 apart — so this holds whether the partner\'s brand is dark, with white ink, or light, with dark ink. The states swap that pair rather than tint it: primary becomes the ink outline on hover, tertiary and ghost become the ink fill. Foundations/Brands shows it under a light example theme.' } } }
|
|
372
|
+
};
|
|
373
|
+
|
|
358
374
|
export const ButtonFullWidth = {
|
|
359
375
|
name : 'Button — Full Width',
|
|
360
376
|
render: () => html`
|
|
@@ -94,7 +94,7 @@ export default css`
|
|
|
94
94
|
.bd-light-box-outline {
|
|
95
95
|
background-color: var(--color-surface-container);
|
|
96
96
|
border: var(--border-width-2) solid var(--color-border-brand);
|
|
97
|
-
border-radius: var(--radius-2xl);
|
|
97
|
+
border-radius: var(--shape-radius-2xl);
|
|
98
98
|
padding: var(--spacing-40);
|
|
99
99
|
align-items: center !important;
|
|
100
100
|
justify-content: center !important;
|
|
@@ -57,15 +57,17 @@ export default css`
|
|
|
57
57
|
height: var(--dimension-20);
|
|
58
58
|
box-sizing: border-box;
|
|
59
59
|
border: var(--border-width-2) solid var(--color-action-primary);
|
|
60
|
-
border-radius: var(--radius-sm);
|
|
60
|
+
border-radius: var(--shape-radius-sm);
|
|
61
61
|
background: var(--color-surface-default);
|
|
62
62
|
display: inline-flex;
|
|
63
63
|
align-items: center;
|
|
64
64
|
justify-content: center;
|
|
65
65
|
/* the mark is drawn in currentColor, so one declaration moves both. It is
|
|
66
66
|
ink on an action fill, not "the page colour" -- the two are both white
|
|
67
|
-
here, and only one of them stays white in a dark theme
|
|
68
|
-
|
|
67
|
+
here, and only one of them stays white in a dark theme. The fill is the
|
|
68
|
+
brand's, so the ink is the brand's: a light partner brand takes dark
|
|
69
|
+
ink here, which white on its fill could not carry */
|
|
70
|
+
color: var(--color-brand-on-fill);
|
|
69
71
|
transition: background-color var(--transition-duration-normal) var(--transition-easing-smooth),
|
|
70
72
|
border-color var(--transition-duration-normal) var(--transition-easing-smooth);
|
|
71
73
|
}
|
|
@@ -18,7 +18,7 @@ export const codeCSS = css`
|
|
|
18
18
|
color: var(--color-text-primary);
|
|
19
19
|
background: var(--color-surface-subtle);
|
|
20
20
|
padding: 0 var(--spacing-4);
|
|
21
|
-
border-radius: var(--radius-sm);
|
|
21
|
+
border-radius: var(--shape-radius-sm);
|
|
22
22
|
/* a token name is one long unbreakable word, so let it break rather than
|
|
23
23
|
overflow a narrow column */
|
|
24
24
|
overflow-wrap: break-word;
|
|
@@ -43,7 +43,7 @@ export const codeCSS = css`
|
|
|
43
43
|
whose ring was a 24px rounded rectangle where every other one is 4-8px.
|
|
44
44
|
12px still reads softer than a control, which is the point of the
|
|
45
45
|
difference, without being the outlier. */
|
|
46
|
-
border-radius: var(--radius-xl);
|
|
46
|
+
border-radius: var(--shape-radius-xl);
|
|
47
47
|
overflow-x: auto;
|
|
48
48
|
}
|
|
49
49
|
|
|
@@ -231,7 +231,7 @@ slot[name="header"] { display: contents; }
|
|
|
231
231
|
.bar-track {
|
|
232
232
|
position: relative;
|
|
233
233
|
height: var(--cs-bar-height, var(--dimension-48));
|
|
234
|
-
border-radius: var(--radius-xl);
|
|
234
|
+
border-radius: var(--shape-radius-xl);
|
|
235
235
|
overflow: hidden;
|
|
236
236
|
background: var(--cs-bar-track-bg, transparent);
|
|
237
237
|
border: var(--border-width-1) solid var(--cs-bar-track-border, var(--color-border-subtle));
|
|
@@ -411,7 +411,7 @@ slot[name="header"] { display: contents; }
|
|
|
411
411
|
point of the D1 decision above -- blue-400 is deliberately the brighter
|
|
412
412
|
step so the fill still reads on a dark ground -- so the absence is the
|
|
413
413
|
theme working, not a gap to close. */
|
|
414
|
-
--cs-bar-primary-bg: var(--color-
|
|
414
|
+
--cs-bar-primary-bg: var(--color-brand-400);
|
|
415
415
|
--cs-bar-primary-fg: var(--color-text-primary);
|
|
416
416
|
--cs-section-text: var(--color-text-inverse);
|
|
417
417
|
}
|
|
@@ -16,7 +16,7 @@ export default css`
|
|
|
16
16
|
:host([variant="light"][background="bordered"]) {
|
|
17
17
|
display: block;
|
|
18
18
|
border: var(--border-width-1) solid var(--color-border-container);
|
|
19
|
-
border-radius: var(--radius-xl);
|
|
19
|
+
border-radius: var(--shape-radius-xl);
|
|
20
20
|
padding: var(--spacing-24);
|
|
21
21
|
box-sizing: border-box;
|
|
22
22
|
transition:
|
|
@@ -63,7 +63,7 @@ export default css`
|
|
|
63
63
|
width: 100%;
|
|
64
64
|
background: var(--color-surface-default);
|
|
65
65
|
border: var(--border-width-1) solid var(--color-border-container);
|
|
66
|
-
border-radius: var(--radius-xl);
|
|
66
|
+
border-radius: var(--shape-radius-xl);
|
|
67
67
|
overflow: hidden;
|
|
68
68
|
box-sizing: border-box;
|
|
69
69
|
}
|
|
@@ -235,7 +235,7 @@ export default css`
|
|
|
235
235
|
plans/reports/phase-2-size-dependent-ink-check.md. Note separately that this cell
|
|
236
236
|
is role="cell" with no href and renders as blue running prose, so it reads as a
|
|
237
237
|
link without being one -- a UX question, not a token one. */
|
|
238
|
-
color: var(--color-
|
|
238
|
+
color: var(--color-brand-700);
|
|
239
239
|
}
|
|
240
240
|
|
|
241
241
|
/* === LIGHT VARIANT === */
|
|
@@ -6,7 +6,7 @@ export default css`
|
|
|
6
6
|
display: block;
|
|
7
7
|
font-family: var(--typography-fontFamily-sans);
|
|
8
8
|
/* the band runs full-bleed on the host; the column inside it is bd-ensemble */
|
|
9
|
-
background: radial-gradient(1200px 600px at 78% -10%, var(--color-
|
|
9
|
+
background: radial-gradient(1200px 600px at 78% -10%, var(--color-brand-400) 0%, transparent 55%), linear-gradient(160deg, var(--color-brand-500) 0%, var(--color-brand-700) 48%, var(--color-brand-950) 100%);
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
.bd-ctabanner-container {
|
|
@@ -52,7 +52,7 @@ export default css`
|
|
|
52
52
|
Mixed over the palette rather than written as a raw rgba, so it follows
|
|
53
53
|
--color-neutral-0 instead of nothing. Pixel-identical to the rgba it
|
|
54
54
|
replaces. */
|
|
55
|
-
color: color-mix(in srgb, var(--color-
|
|
55
|
+
color: color-mix(in srgb, var(--color-brand-on-fill) 85%, transparent);
|
|
56
56
|
max-width: 640px;
|
|
57
57
|
}
|
|
58
58
|
|
|
@@ -79,7 +79,7 @@ export default css`
|
|
|
79
79
|
lightest stop and is NOT where this text sits.
|
|
80
80
|
.
|
|
81
81
|
Mixed over the palette; pixel-identical to the rgba it replaces. */
|
|
82
|
-
color: color-mix(in srgb, var(--color-
|
|
82
|
+
color: color-mix(in srgb, var(--color-brand-on-fill) 60%, transparent);
|
|
83
83
|
font-family: var(--typography-fontFamily-mono);
|
|
84
84
|
/* No font-size: this class is on a <bd-p variant="small"> host, and bd-p
|
|
85
85
|
sets font-size on its own inner element, so a host declaration never
|
|
@@ -26,7 +26,7 @@ class CtaBanner extends LitElement {
|
|
|
26
26
|
<div class="bd-ensemble bd-ctabanner-container">
|
|
27
27
|
${this.title
|
|
28
28
|
? html`
|
|
29
|
-
<bd-h as="h2" color="
|
|
29
|
+
<bd-h as="h2" color="on-brand" class="bd-ctabanner-title">
|
|
30
30
|
<slot name="title">${this.title}</slot>
|
|
31
31
|
</bd-h>
|
|
32
32
|
`
|
|
@@ -65,7 +65,7 @@ contained word is still split across four lines. Step down.
|
|
|
65
65
|
},
|
|
66
66
|
color: {
|
|
67
67
|
control : { type: 'select' },
|
|
68
|
-
options : ['', 'primary', 'strong', 'muted', 'subtle', 'inverse', 'success', 'warning', 'error'],
|
|
68
|
+
options : ['', 'primary', 'strong', 'muted', 'subtle', 'inverse', 'on-brand', 'success', 'warning', 'error'],
|
|
69
69
|
description: 'A semantic colour role, not a CSS colour. Resolves to a palette token; anything else is dropped.',
|
|
70
70
|
table : { type: { summary: 'string' }, defaultValue: { summary: "''" }, category: 'Appearance' }
|
|
71
71
|
},
|
|
@@ -31,7 +31,7 @@ Two divider components are available:
|
|
|
31
31
|
},
|
|
32
32
|
hColor: {
|
|
33
33
|
control : { type: 'select' },
|
|
34
|
-
options : ['primary', 'strong', 'muted', 'subtle', 'inverse', 'success', 'warning', 'error'],
|
|
34
|
+
options : ['primary', 'strong', 'muted', 'subtle', 'inverse', 'on-brand', 'success', 'warning', 'error'],
|
|
35
35
|
description: '(Horizontal) A semantic colour role, not a CSS colour.',
|
|
36
36
|
table : { type: { summary: 'string' }, defaultValue: { summary: "'' (--color-border-container)" }, category: 'Horizontal' }
|
|
37
37
|
},
|
|
@@ -54,7 +54,7 @@ Two divider components are available:
|
|
|
54
54
|
},
|
|
55
55
|
vColor: {
|
|
56
56
|
control : { type: 'select' },
|
|
57
|
-
options : ['primary', 'strong', 'muted', 'subtle', 'inverse', 'success', 'warning', 'error'],
|
|
57
|
+
options : ['primary', 'strong', 'muted', 'subtle', 'inverse', 'on-brand', 'success', 'warning', 'error'],
|
|
58
58
|
description: '(Vertical) A semantic colour role, not a CSS colour.',
|
|
59
59
|
table : { type: { summary: 'string' }, defaultValue: { summary: 'subtle' }, category: 'Vertical' }
|
|
60
60
|
},
|
|
@@ -21,7 +21,7 @@ export default css`
|
|
|
21
21
|
Two consumers, both footers, against the twelve that justified
|
|
22
22
|
--color-surface-container. See plans/reports/phase-2-vocab-e-has-role-pass.md
|
|
23
23
|
question E2. */
|
|
24
|
-
background-color: var(--color-
|
|
24
|
+
background-color: var(--color-brand-600);
|
|
25
25
|
color: var(--color-text-inverse);
|
|
26
26
|
font-family: var(--typography-fontFamily-sans);
|
|
27
27
|
font-size: var(--typography-body-small-fontSize);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { LitElement, html } from 'lit';
|
|
2
2
|
// Installs the design tokens into document scope; see src/tokens/tokens.js
|
|
3
3
|
import "../../tokens/tokens.js";
|
|
4
|
+
import { DEFAULT_THEME } from '../../tokens/themes/index.js';
|
|
4
5
|
/* The md boundary comes from the shared breakpoint source so the CSS and the
|
|
5
6
|
JS cannot drift apart again: bd-footer switched at 767 while bd-footer-lp,
|
|
6
7
|
sharing footer-nav-menu.css.js, switched at 768 — so at exactly 768px the
|
|
@@ -29,6 +30,13 @@ export class BdFooterLP extends LitElement {
|
|
|
29
30
|
|
|
30
31
|
connectedCallback() {
|
|
31
32
|
super.connectedCallback();
|
|
33
|
+
/* The footer is Bitdefender's on every page, a co-branded one included,
|
|
34
|
+
wherever the page puts a partner's data-brand. Pinning it to the
|
|
35
|
+
default theme reuses that theme's generated block, which restates every
|
|
36
|
+
themable token, so nothing a partner changed reaches in here. The host's
|
|
37
|
+
attributes are normally the page's; this one is the exception, because
|
|
38
|
+
the requirement is absolute, not a default the page may override. */
|
|
39
|
+
this.setAttribute('data-brand', DEFAULT_THEME);
|
|
32
40
|
this._initLocaleFromUrl();
|
|
33
41
|
window.addEventListener('resize', this._handleResize.bind(this));
|
|
34
42
|
}
|
|
@@ -21,7 +21,7 @@ export default css`
|
|
|
21
21
|
Two consumers, both footers, against the twelve that justified
|
|
22
22
|
--color-surface-container. See plans/reports/phase-2-vocab-e-has-role-pass.md
|
|
23
23
|
question E2. */
|
|
24
|
-
background-color: var(--color-
|
|
24
|
+
background-color: var(--color-brand-600);
|
|
25
25
|
color: var(--color-text-inverse);
|
|
26
26
|
font-family: var(--typography-fontFamily-sans);
|
|
27
27
|
font-size: var(--typography-body-small-fontSize);
|
|
@@ -377,7 +377,7 @@ padding-bottom: var(--spacing-12);
|
|
|
377
377
|
.footer-countries-container {
|
|
378
378
|
margin-top: var(--spacing-16);
|
|
379
379
|
padding: var(--spacing-24);
|
|
380
|
-
border-radius: var(--radius-lg);
|
|
380
|
+
border-radius: var(--shape-radius-lg);
|
|
381
381
|
transition: all var(--transition-duration-slow) var(--transition-easing-ease);
|
|
382
382
|
width: 90%;
|
|
383
383
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { LitElement, html } from 'lit';
|
|
2
2
|
// Installs the design tokens into document scope; see src/tokens/tokens.js
|
|
3
3
|
import "../../tokens/tokens.js";
|
|
4
|
+
import { DEFAULT_THEME } from '../../tokens/themes/index.js';
|
|
4
5
|
/* The md boundary comes from the shared breakpoint source so the CSS and the
|
|
5
6
|
JS cannot drift apart again: bd-footer switched at 767 while bd-footer-lp,
|
|
6
7
|
sharing footer-nav-menu.css.js, switched at 768 — so at exactly 768px the
|
|
@@ -65,6 +66,13 @@ export class BdFooter extends LitElement {
|
|
|
65
66
|
|
|
66
67
|
connectedCallback() {
|
|
67
68
|
super.connectedCallback();
|
|
69
|
+
/* The footer is Bitdefender's on every page, a co-branded one included,
|
|
70
|
+
wherever the page puts a partner's data-brand. Pinning it to the
|
|
71
|
+
default theme reuses that theme's generated block, which restates every
|
|
72
|
+
themable token, so nothing a partner changed reaches in here. The host's
|
|
73
|
+
attributes are normally the page's; this one is the exception, because
|
|
74
|
+
the requirement is absolute, not a default the page may override. */
|
|
75
|
+
this.setAttribute('data-brand', DEFAULT_THEME);
|
|
68
76
|
/* Whether the consuming page asked for a locale, captured before inference
|
|
69
77
|
runs. An attribute in the markup counts, and so does a property assigned
|
|
70
78
|
before the element connects -- both are the page stating its intent. A
|