@repobit/dex-system-design 2.1.0 → 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 +29 -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-bg.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 +7 -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/features.css.js +5 -1
- 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 +24 -34
- 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.css.js +12 -1
- 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 +124 -43
- package/src/tokens/tokens.js +133 -44
package/src/tokens/tokens.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
|
+
import { DEFAULT_THEME, THEMES } from './themes/index.js';
|
|
3
|
+
import { THEME_CONTRACT } from './themes/contract.js';
|
|
4
|
+
import { themeLayer } from './brand-layer.js';
|
|
2
5
|
|
|
3
6
|
/**
|
|
4
7
|
* Design tokens.
|
|
@@ -194,6 +197,42 @@ const declarations = `
|
|
|
194
197
|
--color-neutral-950: #0c0d0e;
|
|
195
198
|
--color-neutral-1000: #000000;
|
|
196
199
|
|
|
200
|
+
/* =====================
|
|
201
|
+
BRAND
|
|
202
|
+
====================== */
|
|
203
|
+
/* The brand is a ramp, not a colour. Components reach the brand hue at
|
|
204
|
+
ten different steps -- 50 for a tinted wash, 200 for a tinted edge, 400
|
|
205
|
+
and 950 for gradient stops and glows, 500 for the action, 600 and 700
|
|
206
|
+
for brand text -- so a brand that only named its primary would leave
|
|
207
|
+
every one of those behind. These eleven aliases are the whole of what a
|
|
208
|
+
brand has to restate.
|
|
209
|
+
|
|
210
|
+
Today they are the Bitdefender blue, step for step, so nothing renders
|
|
211
|
+
differently for their being here. They are the colour half of the
|
|
212
|
+
theme contract (src/tokens/themes/contract.js): a partner theme
|
|
213
|
+
restates them, and build-tokens re-declares every token that depends
|
|
214
|
+
on them inside that brand's [data-brand] scope. See Foundations/Brands.
|
|
215
|
+
|
|
216
|
+
What deliberately does NOT read this ramp: the info status tone
|
|
217
|
+
(--status-info-*, --color-surface-info). Info is a feedback colour,
|
|
218
|
+
not the brand, and it has to stay recognisable under every brand --
|
|
219
|
+
a business line whose brand were red would otherwise paint its info
|
|
220
|
+
alerts the colour of an error. Those keep --color-blue-* directly.
|
|
221
|
+
|
|
222
|
+
Components never name --color-blue-* for brand work; the lint rule
|
|
223
|
+
brand-hue-primitive holds that line. */
|
|
224
|
+
--color-brand-50: var(--color-blue-50);
|
|
225
|
+
--color-brand-100: var(--color-blue-100);
|
|
226
|
+
--color-brand-200: var(--color-blue-200);
|
|
227
|
+
--color-brand-300: var(--color-blue-300);
|
|
228
|
+
--color-brand-400: var(--color-blue-400);
|
|
229
|
+
--color-brand-500: var(--color-blue-500);
|
|
230
|
+
--color-brand-600: var(--color-blue-600);
|
|
231
|
+
--color-brand-700: var(--color-blue-700);
|
|
232
|
+
--color-brand-800: var(--color-blue-800);
|
|
233
|
+
--color-brand-900: var(--color-blue-900);
|
|
234
|
+
--color-brand-950: var(--color-blue-950);
|
|
235
|
+
|
|
197
236
|
/* ================================
|
|
198
237
|
CORE BORDER TOKENS
|
|
199
238
|
================================ */
|
|
@@ -213,6 +252,31 @@ const declarations = `
|
|
|
213
252
|
--radius-3xl: 1.5rem; /* 24px */
|
|
214
253
|
--radius-full: 9999px;
|
|
215
254
|
|
|
255
|
+
/* =====================
|
|
256
|
+
SHAPE
|
|
257
|
+
====================== */
|
|
258
|
+
/* The corner steps a theme restates -- the shape half of the theme
|
|
259
|
+
contract, as --color-brand-* is the colour half. A partner whose brand
|
|
260
|
+
is square sets these to 0, one whose brand is soft raises them, and
|
|
261
|
+
every card, button, field, panel and chip that reads a step follows.
|
|
262
|
+
Today they are the radius scale, step for step, so nothing renders
|
|
263
|
+
differently for their being here.
|
|
264
|
+
|
|
265
|
+
Two steps are deliberately left out, because a brand must not move
|
|
266
|
+
them: --radius-full is a circle (a dot, a pill, a switch, an avatar),
|
|
267
|
+
and --radius-none is a corner someone decided should be square. The
|
|
268
|
+
focus ring keeps --focus-outline-radius on the scale too: focus
|
|
269
|
+
geometry is the host's, not a partner's.
|
|
270
|
+
|
|
271
|
+
Components never read --radius-sm..3xl directly; the lint rule
|
|
272
|
+
shape-primitive holds that line. */
|
|
273
|
+
--shape-radius-sm: var(--radius-sm);
|
|
274
|
+
--shape-radius-md: var(--radius-md);
|
|
275
|
+
--shape-radius-lg: var(--radius-lg);
|
|
276
|
+
--shape-radius-xl: var(--radius-xl);
|
|
277
|
+
--shape-radius-2xl: var(--radius-2xl);
|
|
278
|
+
--shape-radius-3xl: var(--radius-3xl);
|
|
279
|
+
|
|
216
280
|
/* ================================
|
|
217
281
|
CORE DIMENSION TOKENS
|
|
218
282
|
================================ */
|
|
@@ -266,16 +330,16 @@ const declarations = `
|
|
|
266
330
|
/* The ladder stops at xl. --shadow-2xl and the inset --shadow-inner
|
|
267
331
|
stood beside it until 2026-10-15, and nothing read either. */
|
|
268
332
|
|
|
269
|
-
/* The focus glow: --color-
|
|
333
|
+
/* The focus glow: the brand at 15% (--color-brand-500), mixed from the palette. It
|
|
270
334
|
was rgba(6, 109, 255, 0.15) -- a blue one unit off blue-500 -- with a
|
|
271
335
|
red and a green beside it that were Tailwind's red-500 and green-500,
|
|
272
336
|
in no palette here. Nothing read the red or the green, so they went;
|
|
273
337
|
--form-input-focus-boxShadow reads this one. */
|
|
274
|
-
--shadow-focus-outline-blue: 0 0 0 3px color-mix(in srgb, var(--color-
|
|
338
|
+
--shadow-focus-outline-blue: 0 0 0 3px color-mix(in srgb, var(--color-brand-500) 15%, transparent);
|
|
275
339
|
|
|
276
340
|
/* Focus Outlines - Two-Color System for Universal Visibility */
|
|
277
341
|
--focus-outline-primary: 0 0 0 2px var(--color-neutral-0),
|
|
278
|
-
0 0 0 4px var(--color-
|
|
342
|
+
0 0 0 4px var(--color-brand-500);
|
|
279
343
|
|
|
280
344
|
/* Secondary, error and success rings stood here until 2026-10-15.
|
|
281
345
|
Nothing read them -- every component rings with primary -- and the
|
|
@@ -317,8 +381,14 @@ const declarations = `
|
|
|
317
381
|
|
|
318
382
|
An outline also survives forced-colors mode, where a box-shadow ring
|
|
319
383
|
is not drawn at all. bd-button reads these; see its FOCUS block. */
|
|
320
|
-
--focus-outline-traditional: 2px solid var(--color-
|
|
384
|
+
--focus-outline-traditional: 2px solid var(--color-brand-500);
|
|
321
385
|
--focus-outline-traditional-inverse: 2px solid var(--color-neutral-0);
|
|
386
|
+
/* On a brand band (surface="brand"): the brand's own ink, which a
|
|
387
|
+
theme must clear 4.5:1 on its fill, so the ring clears the 3:1 a
|
|
388
|
+
focus indicator needs under every theme -- white on Bitdefender,
|
|
389
|
+
where it is the inverse ring, and dark ink on a light partner, where
|
|
390
|
+
a white one would vanish. */
|
|
391
|
+
--focus-outline-traditional-on-brand: 2px solid var(--color-brand-on-fill);
|
|
322
392
|
--focus-outline-offset: 2px;
|
|
323
393
|
|
|
324
394
|
/* The ring is a box-shadow, so it already follows the radius of the
|
|
@@ -352,7 +422,7 @@ const declarations = `
|
|
|
352
422
|
3px height and a width transition describe a rule sliding under a
|
|
353
423
|
tab, and a dot scales instead. A fourth consumer needing dot
|
|
354
424
|
geometry should name it for the dot, not borrow these. */
|
|
355
|
-
--indicator-color: var(--color-
|
|
425
|
+
--indicator-color: var(--color-brand-500);
|
|
356
426
|
--indicator-underline-height: var(--border-width-3);
|
|
357
427
|
--indicator-underline-duration: var(--transition-duration-slow);
|
|
358
428
|
--indicator-underline-easing: var(--transition-easing-smooth);
|
|
@@ -387,7 +457,7 @@ const declarations = `
|
|
|
387
457
|
scripts/card-shapes.json lists the eleven and lint:tokens checks it
|
|
388
458
|
both ways, so a card that stops using the role and a registry entry
|
|
389
459
|
that stops matching are both findings. */
|
|
390
|
-
--card-radius: var(--radius-2xl);
|
|
460
|
+
--card-radius: var(--shape-radius-2xl);
|
|
391
461
|
--card-padding: var(--spacing-32);
|
|
392
462
|
|
|
393
463
|
/* The inset a card takes when the viewport is too narrow to afford the
|
|
@@ -498,7 +568,7 @@ const declarations = `
|
|
|
498
568
|
a video play icon at 3.13:1, a terminal's quieter lines at 1.91. */
|
|
499
569
|
--color-text-on-media: var(--color-neutral-0);
|
|
500
570
|
--color-text-on-media-muted: var(--color-neutral-300);
|
|
501
|
-
--color-text-brand: var(--color-
|
|
571
|
+
--color-text-brand: var(--color-brand-600);
|
|
502
572
|
/* Brand text, hovered: a link or a citation reference under the
|
|
503
573
|
pointer. Before this role existed, the hover read
|
|
504
574
|
--color-action-primary-active -- a pressed button fill used as ink.
|
|
@@ -507,7 +577,7 @@ const declarations = `
|
|
|
507
577
|
questions, and a dark theme has to answer them differently. Measured
|
|
508
578
|
in the Figma Dark mode study: the fill stays put on a dark page and
|
|
509
579
|
the link it borrowed falls to 2.27:1. */
|
|
510
|
-
--color-text-brand-hover: var(--color-
|
|
580
|
+
--color-text-brand-hover: var(--color-brand-700);
|
|
511
581
|
--color-text-success: var(--color-green-800);
|
|
512
582
|
/* Warning text sits on the page, a card, surface-subtle (5.16) or its
|
|
513
583
|
own tint (--color-surface-warning, 5.59) -- not on surface-muted,
|
|
@@ -555,7 +625,7 @@ const declarations = `
|
|
|
555
625
|
and the terminal's own palette (blue-400, the traffic-light green)
|
|
556
626
|
is only legible on a dark ground. Dark mode decision 15. */
|
|
557
627
|
--color-surface-media: var(--color-neutral-900);
|
|
558
|
-
--color-surface-brand: var(--color-
|
|
628
|
+
--color-surface-brand: var(--color-brand-500);
|
|
559
629
|
--color-surface-disabled: var(--color-neutral-100);
|
|
560
630
|
/* The ground of a control while it is held down, one step below
|
|
561
631
|
-muted (its hover). bd-back read neutral-200 for this and said in a
|
|
@@ -591,7 +661,7 @@ const declarations = `
|
|
|
591
661
|
--color-border-subtle: var(--color-neutral-200);
|
|
592
662
|
--color-border-default: var(--color-neutral-400);
|
|
593
663
|
--color-border-strong: var(--color-neutral-900);
|
|
594
|
-
--color-border-brand: var(--color-
|
|
664
|
+
--color-border-brand: var(--color-brand-500);
|
|
595
665
|
--color-border-disabled: var(--color-neutral-300);
|
|
596
666
|
|
|
597
667
|
/* The boundary of a self-contained object -- a card, a panel, a
|
|
@@ -629,9 +699,9 @@ const declarations = `
|
|
|
629
699
|
/* Action. The interactive ramp, one step down the palette per state.
|
|
630
700
|
accent is this system's conversion colour — Buy now and the like —
|
|
631
701
|
and is not a danger signal; see the bd-button story notes. */
|
|
632
|
-
--color-action-primary: var(--color-
|
|
633
|
-
--color-action-primary-hover: var(--color-
|
|
634
|
-
--color-action-primary-active: var(--color-
|
|
702
|
+
--color-action-primary: var(--color-brand-500);
|
|
703
|
+
--color-action-primary-hover: var(--color-brand-600);
|
|
704
|
+
--color-action-primary-active: var(--color-brand-700);
|
|
635
705
|
--color-action-accent: var(--color-red-600);
|
|
636
706
|
--color-action-accent-hover: var(--color-red-700);
|
|
637
707
|
--color-action-accent-active: var(--color-red-800);
|
|
@@ -655,6 +725,16 @@ const declarations = `
|
|
|
655
725
|
near-black secondary ones. Measured in the Figma Dark mode study,
|
|
656
726
|
and re-measured on the live tokens 2026-10-15. */
|
|
657
727
|
--color-action-on-fill: var(--color-neutral-0);
|
|
728
|
+
/* Ink on a BRAND fill: a label, a checkmark, a dot or a thumb sitting on
|
|
729
|
+
a colour from the brand ramp. White today, the same pixel
|
|
730
|
+
--color-action-on-fill gives, so nothing moves. It exists because the
|
|
731
|
+
two stop agreeing the moment a partner's brand is light: white on a
|
|
732
|
+
typical brand orange is about 2.6:1, black about 8:1. A partner theme
|
|
733
|
+
sets this to whichever clears its fill, and --color-action-on-fill
|
|
734
|
+
stays white for the fills that are not the brand's -- the red accent
|
|
735
|
+
and the near-black secondary, where black would fail. Part of the
|
|
736
|
+
theme contract (src/tokens/themes/contract.js). */
|
|
737
|
+
--color-brand-on-fill: var(--color-neutral-0);
|
|
658
738
|
|
|
659
739
|
/* ================================
|
|
660
740
|
SEMANTIC ROLES - STACKING
|
|
@@ -730,12 +810,12 @@ const declarations = `
|
|
|
730
810
|
--status-neutral-fill: var(--color-neutral-900);
|
|
731
811
|
--status-neutral-on-fill: var(--color-neutral-0);
|
|
732
812
|
|
|
733
|
-
--status-brand-text: var(--color-
|
|
734
|
-
--status-brand-surface: var(--color-
|
|
735
|
-
--status-brand-border: var(--color-
|
|
736
|
-
--status-brand-accent: var(--color-
|
|
737
|
-
--status-brand-fill: var(--color-
|
|
738
|
-
--status-brand-on-fill: var(--color-
|
|
813
|
+
--status-brand-text: var(--color-brand-600);
|
|
814
|
+
--status-brand-surface: var(--color-brand-50);
|
|
815
|
+
--status-brand-border: var(--color-brand-200);
|
|
816
|
+
--status-brand-accent: var(--color-brand-600);
|
|
817
|
+
--status-brand-fill: var(--color-brand-500);
|
|
818
|
+
--status-brand-on-fill: var(--color-brand-on-fill);
|
|
739
819
|
|
|
740
820
|
--status-info-text: var(--color-blue-600);
|
|
741
821
|
--status-info-surface: var(--color-blue-50);
|
|
@@ -1258,21 +1338,21 @@ const declarations = `
|
|
|
1258
1338
|
);
|
|
1259
1339
|
--form-input-small-fontSize: var(--typography-fontSize-sm);
|
|
1260
1340
|
--form-input-small-padding: var(--spacing-8) var(--spacing-12);
|
|
1261
|
-
--form-input-small-borderRadius: var(--radius-sm);
|
|
1341
|
+
--form-input-small-borderRadius: var(--shape-radius-sm);
|
|
1262
1342
|
|
|
1263
1343
|
--form-input-medium-height: calc(
|
|
1264
1344
|
var(--spacing-12) * 2 + var(--typography-fontSize-base) * var(--typography-lineHeight-tight)
|
|
1265
1345
|
);
|
|
1266
1346
|
--form-input-medium-fontSize: var(--typography-fontSize-base);
|
|
1267
1347
|
--form-input-medium-padding: var(--spacing-12) var(--spacing-16);
|
|
1268
|
-
--form-input-medium-borderRadius: var(--radius-md);
|
|
1348
|
+
--form-input-medium-borderRadius: var(--shape-radius-md);
|
|
1269
1349
|
|
|
1270
1350
|
--form-input-large-height: calc(
|
|
1271
1351
|
var(--spacing-16) * 2 + var(--typography-fontSize-lg) * var(--typography-lineHeight-tight)
|
|
1272
1352
|
);
|
|
1273
1353
|
--form-input-large-fontSize: var(--typography-fontSize-lg);
|
|
1274
1354
|
--form-input-large-padding: var(--spacing-16) var(--spacing-20);
|
|
1275
|
-
--form-input-large-borderRadius: var(--radius-lg);
|
|
1355
|
+
--form-input-large-borderRadius: var(--shape-radius-lg);
|
|
1276
1356
|
|
|
1277
1357
|
--form-input-default-backgroundColor: var(--color-surface-default);
|
|
1278
1358
|
--form-input-default-borderColor: var(--color-border-default);
|
|
@@ -1360,17 +1440,17 @@ const declarations = `
|
|
|
1360
1440
|
--button-small-fontSize: var(--typography-fontSize-sm);
|
|
1361
1441
|
--button-small-padding: var(--spacing-8) var(--spacing-16);
|
|
1362
1442
|
--button-small-gap: var(--spacing-4);
|
|
1363
|
-
--button-small-borderRadius: var(--radius-sm);
|
|
1443
|
+
--button-small-borderRadius: var(--shape-radius-sm);
|
|
1364
1444
|
|
|
1365
1445
|
--button-medium-fontSize: var(--typography-fontSize-base);
|
|
1366
1446
|
--button-medium-padding: var(--spacing-12) var(--spacing-24);
|
|
1367
1447
|
--button-medium-gap: var(--spacing-8);
|
|
1368
|
-
--button-medium-borderRadius: var(--radius-md);
|
|
1448
|
+
--button-medium-borderRadius: var(--shape-radius-md);
|
|
1369
1449
|
|
|
1370
1450
|
--button-large-fontSize: var(--typography-fontSize-lg);
|
|
1371
1451
|
--button-large-padding: var(--spacing-16) var(--spacing-32);
|
|
1372
1452
|
--button-large-gap: var(--spacing-8);
|
|
1373
|
-
--button-large-borderRadius: var(--radius-lg);
|
|
1453
|
+
--button-large-borderRadius: var(--shape-radius-lg);
|
|
1374
1454
|
|
|
1375
1455
|
/* Removed 2026-10-15, because nothing read them: the seven
|
|
1376
1456
|
--button-default-* (a state no variant draws), and
|
|
@@ -1423,7 +1503,7 @@ const declarations = `
|
|
|
1423
1503
|
--button-primary-background-default: var(--color-action-primary);
|
|
1424
1504
|
--button-primary-background-hover: var(--color-action-primary-hover);
|
|
1425
1505
|
--button-primary-background-active: var(--color-action-primary-active);
|
|
1426
|
-
--button-primary-text-default: var(--color-
|
|
1506
|
+
--button-primary-text-default: var(--color-brand-on-fill);
|
|
1427
1507
|
|
|
1428
1508
|
/* secondary: near-black fill */
|
|
1429
1509
|
--button-secondary-background-default: var(--color-action-secondary);
|
|
@@ -1452,7 +1532,7 @@ const declarations = `
|
|
|
1452
1532
|
--button-tertiary-text-hover: var(--color-text-brand);
|
|
1453
1533
|
--button-tertiary-border-hover: var(--color-action-primary-hover);
|
|
1454
1534
|
--button-tertiary-background-active: var(--color-action-primary);
|
|
1455
|
-
--button-tertiary-text-active: var(--color-
|
|
1535
|
+
--button-tertiary-text-active: var(--color-brand-on-fill);
|
|
1456
1536
|
|
|
1457
1537
|
/* ghost: dark outline */
|
|
1458
1538
|
--button-ghost-text-default: var(--color-text-primary);
|
|
@@ -1483,16 +1563,21 @@ const declarations = `
|
|
|
1483
1563
|
literals, which no theme could reach. color-mix keeps the alpha and
|
|
1484
1564
|
puts the colour back on the palette. */
|
|
1485
1565
|
--button-white-background-default: var(--color-neutral-0);
|
|
1486
|
-
--button-white-background-hover: var(--color-
|
|
1487
|
-
--button-white-background-active: var(--color-
|
|
1488
|
-
/*
|
|
1489
|
-
a white fill on a brand band, in any theme -- so
|
|
1490
|
-
fixed too. Reading the role mixed a fill that never
|
|
1491
|
-
label that does: text-brand goes light in a dark
|
|
1492
|
-
2.36:1 on the white fill (dark mode finding 8).
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1566
|
+
--button-white-background-hover: var(--color-brand-50);
|
|
1567
|
+
--button-white-background-active: var(--color-brand-100);
|
|
1568
|
+
/* A ramp step by name (--color-brand-600), not --color-text-brand. The
|
|
1569
|
+
preset is fixed -- a white fill on a brand band, in any theme -- so
|
|
1570
|
+
its ink must be fixed too. Reading the role mixed a fill that never
|
|
1571
|
+
switches with a label that does: text-brand goes light in a dark
|
|
1572
|
+
theme and measured 2.36:1 on the white fill (dark mode finding 8).
|
|
1573
|
+
|
|
1574
|
+
The ramp keeps that property and still follows the business line: a
|
|
1575
|
+
step never flips with light or dark, but it is the brand's step, so
|
|
1576
|
+
the label matches the band it sits on under every brand. It was
|
|
1577
|
+
--color-blue-600 when blue was the only brand. */
|
|
1578
|
+
--button-white-text-default: var(--color-brand-600);
|
|
1579
|
+
|
|
1580
|
+
--button-outline-white-text-default: var(--color-brand-on-fill);
|
|
1496
1581
|
/* 71% rather than 55%. This edge is the only thing bounding an
|
|
1497
1582
|
outline-white button, so it carries the 3:1 of WCAG 1.4.11 on its
|
|
1498
1583
|
own. Measured over the grounds the preset is actually used on, 55%
|
|
@@ -1500,7 +1585,7 @@ const declarations = `
|
|
|
1500
1585
|
blue-700 at 3.65. 71% is the lowest value that clears all three
|
|
1501
1586
|
with one number, so the token stops depending on which blue is
|
|
1502
1587
|
behind it. */
|
|
1503
|
-
--button-outline-white-border-default: color-mix(in srgb, var(--color-
|
|
1588
|
+
--button-outline-white-border-default: color-mix(in srgb, var(--color-brand-on-fill) 71%, transparent);
|
|
1504
1589
|
/* Hover and press DARKEN the band, they do not wash it white. A white
|
|
1505
1590
|
wash lightened the blue under a white label: 3.91:1 on hover and
|
|
1506
1591
|
3.38 pressed over blue-500, and 4.22 pressed over blue-600 -- under
|
|
@@ -1718,7 +1803,7 @@ const declarations = `
|
|
|
1718
1803
|
A weight is a weight whichever face it is set in. */
|
|
1719
1804
|
|
|
1720
1805
|
/* Awards section — Orbit Frame 14 (node 1882:9342) */
|
|
1721
|
-
--layout-awards-section-background: var(--color-
|
|
1806
|
+
--layout-awards-section-background: var(--color-brand-50);
|
|
1722
1807
|
--layout-awards-cluster-max-width: 49.5625rem; /* 793px — trust banner column */
|
|
1723
1808
|
--layout-awards-intro-max-width: 39.4375rem; /* 631px — headline stack */
|
|
1724
1809
|
/* The page column has no width token of its own. --content-width-max,
|
|
@@ -1728,10 +1813,9 @@ const declarations = `
|
|
|
1728
1813
|
above (--grid-container-max-* with --grid-padding-*), which is what
|
|
1729
1814
|
Foundations/Grid System documented and nothing had built. A width token
|
|
1730
1815
|
here is how six ensembles came to hold one literal each and seven other
|
|
1731
|
-
modules a different one.
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
--layout-ensemble-inline-padding: var(--spacing-24);
|
|
1816
|
+
modules a different one. --layout-ensemble-inline-padding went the
|
|
1817
|
+
same way once bd-features, its last reader, stopped padding its host;
|
|
1818
|
+
the blog declares its own copy. */
|
|
1735
1819
|
|
|
1736
1820
|
`;
|
|
1737
1821
|
|
|
@@ -1741,7 +1825,12 @@ const INSTALLED = '__bdDesignTokens';
|
|
|
1741
1825
|
function install() {
|
|
1742
1826
|
if (typeof document === 'undefined') return;
|
|
1743
1827
|
|
|
1744
|
-
|
|
1828
|
+
/* The brand blocks sit in the same layer, after :root, so a consuming
|
|
1829
|
+
page's unlayered CSS still beats them and a [data-brand] on <html> beats
|
|
1830
|
+
:root by order. Empty while only the Bitdefender theme is registered -- see
|
|
1831
|
+
src/tokens/brand-layer.js. build-tokens writes the same text into
|
|
1832
|
+
tokens.css from the same function, so the two cannot disagree. */
|
|
1833
|
+
const rule = `@layer ${LAYER} { :root {${declarations}} ${themeLayer(declarations, THEMES, THEME_CONTRACT, DEFAULT_THEME)} }`;
|
|
1745
1834
|
|
|
1746
1835
|
if ('adoptedStyleSheets' in document && typeof CSSStyleSheet === 'function') {
|
|
1747
1836
|
if (document.adoptedStyleSheets.some(sheet => sheet[INSTALLED])) return;
|