@repobit/dex-system-design 0.25.12 → 1.0.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 +204 -0
- package/README.md +131 -8
- package/package.json +96 -13
- package/schemas/component-manifest.json +3294 -405
- package/schemas/manifest-omissions.json +173 -0
- package/src/blog/src/breakpoints.js +6 -6
- package/src/blog/src/content/blog-atoms-showcase.js +1 -1
- package/src/blog/src/content/blog-page-layout.js +2 -2
- package/src/blog/src/lib/article-toc.js +7 -7
- package/src/blog/src/shell/blog-shell.js +1 -1
- package/src/blog/src/tokens/blog.js +2 -2
- package/src/blog/src/tokens/core.js +34 -35
- package/src/blog/src/tokens/legacy.js +0 -9
- package/src/blog/tokens/blog.js +2 -2
- package/src/blog/tokens/core.js +34 -35
- package/src/blog/tokens/legacy.js +0 -9
- package/src/blog/tokens.css +36 -46
- package/src/components/accordion/accordion-bg.css.js +83 -59
- package/src/components/accordion/accordion-bg.js +29 -10
- package/src/components/accordion/accordion-bg.stories.js +67 -67
- package/src/components/accordion/accordion-keyboard.js +80 -0
- package/src/components/accordion/accordion.css.js +142 -80
- package/src/components/accordion/accordion.js +37 -10
- package/src/components/accordion/accordion.stories.js +7 -7
- package/src/components/agent-endpoints/agent-endpoints.css.js +36 -39
- package/src/components/agent-endpoints/agent-endpoints.js +30 -20
- package/src/components/agent-endpoints/agent-endpoints.stories.js +1 -1
- package/src/components/ai-guardian-demo.stories.js +91 -91
- package/src/components/alert/alert.css.js +198 -0
- package/src/components/alert/alert.js +103 -0
- package/src/components/alert/alert.stories.js +206 -0
- package/src/components/anchor/anchor-nav.css.js +213 -101
- package/src/components/anchor/anchor-nav.js +26 -40
- package/src/components/anchor/anchor.stories.js +22 -12
- package/src/components/annotation/annotation.css.js +58 -0
- package/src/components/annotation/annotation.js +67 -0
- package/src/components/annotation/annotation.stories.js +63 -0
- package/src/components/architecture.stories.js +285 -0
- package/src/components/atoms.stories.js +342 -0
- package/src/components/avatar/avatar.css.js +67 -0
- package/src/components/avatar/avatar.js +42 -0
- package/src/components/avatar/avatar.stories.js +95 -0
- package/src/components/awards/awards-flex.css.js +209 -23
- package/src/components/awards/awards-flex.js +66 -7
- package/src/components/awards/awards-flex.stories.js +1 -1
- package/src/components/awards/{awards-light.stories.js → awards-summary.stories.js} +54 -64
- package/src/components/awards/awards.css.js +116 -58
- package/src/components/awards/awards.js +102 -28
- package/src/components/awards/awards.stories.js +1 -1
- package/src/components/back/back.css.js +51 -22
- package/src/components/back/back.js +28 -7
- package/src/components/back/back.stories.js +9 -3
- package/src/components/badge/badge.css.js +158 -46
- package/src/components/badge/badge.js +62 -74
- package/src/components/badge/badge.stories.js +176 -248
- package/src/components/bento-grid/bento-grid.css.js +21 -16
- package/src/components/bento-grid/bento-grid.js +16 -4
- package/src/components/bento-grid/bento-grid.stories.js +19 -18
- package/src/components/bento-grid/bento-item.css.js +52 -28
- package/src/components/bento-grid/bento-item.js +2 -2
- package/src/components/blockquote/blockquote.css.js +47 -0
- package/src/components/blockquote/blockquote.js +29 -0
- package/src/components/blockquote/blockquote.stories.js +62 -0
- package/src/components/breadcrumb/breadcrumb.css.js +92 -22
- package/src/components/breadcrumb/breadcrumb.js +56 -11
- package/src/components/button/button.css.js +531 -161
- package/src/components/button/button.js +206 -214
- package/src/components/button/button.stories.js +322 -174
- package/src/components/caption/caption.css.js +21 -0
- package/src/components/caption/caption.js +31 -0
- package/src/components/caption/caption.stories.js +62 -0
- package/src/components/card-features/card-features.css.js +14 -22
- package/src/components/card-features/card-features.js +68 -9
- package/src/components/card-features/card-features.stories.js +11 -11
- package/src/components/cards/card.css.js +60 -81
- package/src/components/cards/card.js +56 -25
- package/src/components/cards/card.stories.js +39 -39
- package/src/components/carousel/carousel.css.js +93 -99
- package/src/components/carousel/carousel.js +32 -4
- package/src/components/checkbox/checkbox.css.js +111 -93
- package/src/components/checkbox/checkbox.js +64 -90
- package/src/components/checkbox/checkbox.stories.js +96 -29
- package/src/components/code/code.css.js +70 -0
- package/src/components/code/code.js +40 -0
- package/src/components/code/code.stories.js +73 -0
- package/src/components/compare/compare.css.js +179 -43
- package/src/components/compare/compare.js +52 -25
- package/src/components/compare/compare.stories.js +61 -4
- package/src/components/comparison-panel/comparison-panel.css.js +38 -51
- package/src/components/comparison-panel/comparison-panel.js +5 -4
- package/src/components/comparison-panel/comparison-panel.stories.js +1 -1
- package/src/components/compatibility-table/compatibility-table.css.js +180 -80
- package/src/components/compatibility-table/compatibility-table.js +37 -9
- package/src/components/control-alignment.stories.js +393 -0
- package/src/components/cta-banner/cta-banner.css.js +41 -13
- package/src/components/cta-banner/cta-banner.js +6 -5
- package/src/components/cta-banner/cta-banner.stories.js +43 -98
- package/src/components/display/display.css.js +25 -1
- package/src/components/display/display.js +46 -13
- package/src/components/display/display.stories.js +270 -40
- package/src/components/divider/divider-horizontal.js +21 -5
- package/src/components/divider/divider-vertical.js +15 -7
- package/src/components/divider/divider.css.js +2 -2
- package/src/components/divider/divider.stories.js +38 -34
- package/src/components/dropdown/dropdown.css.js +93 -126
- package/src/components/dropdown/dropdown.js +114 -34
- package/src/components/dropdown/dropdown.stories.js +56 -24
- package/src/components/features/features.css.js +24 -11
- package/src/components/features/features.js +7 -3
- package/src/components/features/features.stories.js +37 -37
- package/src/components/features-tab/features-tab.css.js +19 -8
- package/src/components/features-tab/features-tab.js +6 -5
- package/src/components/features-tab/features-tab.stories.js +23 -23
- package/src/components/fieldset/fieldset.css.js +30 -0
- package/src/components/fieldset/fieldset.js +28 -0
- package/src/components/fieldset/fieldset.stories.js +84 -0
- package/src/components/footer/footer-links-group.css.js +10 -14
- package/src/components/footer/footer-links-group.js +4 -3
- package/src/components/footer/footer-lp.css.js +59 -30
- package/src/components/footer/footer-lp.js +17 -12
- package/src/components/footer/footer-lp.stories.js +63 -75
- package/src/components/footer/footer-nav-menu.css.js +26 -4
- package/src/components/footer/footer-nav-menu.js +3 -2
- package/src/components/footer/footer.css.js +146 -264
- package/src/components/footer/footer.js +176 -106
- package/src/components/footer/footer.stories.js +9 -9
- package/src/components/footer/localeMap.js +1 -1
- package/src/components/grid/grid.css.js +1 -1
- package/src/components/grid/grid.js +49 -7
- package/src/components/grid/grid.stories.js +111 -0
- package/src/components/header/header-code.css.js +61 -51
- package/src/components/header/header-code.js +28 -14
- package/src/components/header/header-code.stories.js +5 -5
- package/src/components/header/header.css.js +655 -176
- package/src/components/header/header.js +269 -36
- package/src/components/header/header.stories.js +841 -18
- package/src/components/heading/heading.css.js +14 -17
- package/src/components/heading/heading.js +48 -33
- package/src/components/heading/heading.stories.js +27 -25
- package/src/components/help-text/help-text.css.js +21 -0
- package/src/components/help-text/help-text.js +25 -0
- package/src/components/help-text/help-text.stories.js +66 -0
- package/src/components/highlight/highlight.css.js +86 -64
- package/src/components/highlight/highlight.js +18 -27
- package/src/components/highlight/highlight.stories.js +14 -3
- package/src/components/icons/analysis-icon.js +6 -16
- package/src/components/icons/arrow-down-icon.js +6 -19
- package/src/components/icons/arrow-icon.js +44 -0
- package/src/components/icons/arrow-right-icon.js +30 -23
- package/src/components/icons/arrow-up-icon.js +19 -18
- package/src/components/icons/bd-ai-icon.js +1 -1
- package/src/components/icons/brand-marks.stories.js +279 -0
- package/src/components/icons/brand-signature-icon.js +42 -0
- package/src/components/icons/check-icon.js +27 -0
- package/src/components/icons/circle-info-icon.js +33 -0
- package/src/components/icons/close-icon.js +6 -18
- package/src/components/icons/family-icon.js +8 -20
- package/src/components/icons/globe-icon.js +6 -18
- package/src/components/icons/guide-icon.js +6 -18
- package/src/components/icons/icon-element.js +99 -0
- package/src/components/icons/icons.js +36 -0
- package/src/components/icons/icons.stories.js +184 -52
- package/src/components/icons/individual-icon.js +6 -18
- package/src/components/icons/laurel-icon.js +9 -19
- package/src/components/icons/machine-learning-icon.js +6 -17
- package/src/components/icons/marks.js +41 -0
- package/src/components/icons/minus-icon.js +7 -21
- package/src/components/icons/missing-icon.js +52 -0
- package/src/components/icons/plus-icon.js +7 -21
- package/src/components/icons/quote-icon.js +19 -19
- package/src/components/image/image.css.js +72 -25
- package/src/components/image/image.js +11 -6
- package/src/components/image/image.stories.js +2 -2
- package/src/components/input/custom-form.stories.js +214 -62
- package/src/components/input/input-clipboard.css.js +51 -144
- package/src/components/input/input-clipboard.js +31 -15
- package/src/components/input/input.css.js +8 -146
- package/src/components/input/input.js +93 -38
- package/src/components/install-options/install-options.css.js +84 -77
- package/src/components/install-options/install-options.js +33 -30
- package/src/components/install-options/install-options.stories.js +3 -3
- package/src/components/label/label.css.js +35 -0
- package/src/components/label/label.js +38 -0
- package/src/components/label/label.stories.js +82 -0
- package/src/components/light-carousel/light-carousel.css.js +111 -63
- package/src/components/light-carousel/light-carousel.js +85 -11
- package/src/components/light-carousel/light-carousel.stories.js +126 -82
- package/src/components/link/link.css.js +150 -99
- package/src/components/link/link.js +86 -11
- package/src/components/link/link.stories.js +124 -30
- package/src/components/list/list-item/list-item.css.js +74 -22
- package/src/components/list/list-item/list-item.js +32 -10
- package/src/components/list/list-item/list-item.stories.js +23 -23
- package/src/components/list/list.css.js +8 -2
- package/src/components/list/list.js +3 -2
- package/src/components/list/list.stories.js +222 -0
- package/src/components/modal/modal.css.js +114 -24
- package/src/components/modal/modal.js +83 -7
- package/src/components/modal/modal.stories.js +9 -9
- package/src/components/overview/overview.css.js +19 -14
- package/src/components/overview/overview.js +6 -5
- package/src/components/overview/overview.stories.js +10 -10
- package/src/components/page-switcher/page-switcher.css.js +97 -40
- package/src/components/page-switcher/page-switcher.js +28 -5
- package/src/components/page-switcher/page-switcher.stories.js +95 -0
- package/src/components/paragraph/paragraph.css.js +15 -10
- package/src/components/paragraph/paragraph.js +41 -44
- package/src/components/paragraph/paragraph.stories.js +56 -21
- package/src/components/picture/picture.css.js +103 -44
- package/src/components/picture/picture.js +100 -30
- package/src/components/picture/picture.stories.js +1 -1
- package/src/components/pricing-cards/new-pricing-card.js +3 -3
- package/src/components/pricing-cards/new-pricing.css.js +24 -15
- package/src/components/pricing-cards/pricing-card-actions.css.js +1 -1
- package/src/components/pricing-cards/pricing-card-actions.js +3 -4
- package/src/components/pricing-cards/pricing-card-container.css.js +3 -3
- package/src/components/pricing-cards/pricing-card-container.js +3 -2
- package/src/components/pricing-cards/pricing-card-header.css.js +10 -8
- package/src/components/pricing-cards/pricing-card-header.js +6 -7
- package/src/components/pricing-cards/pricing-card-pricing.css.js +16 -9
- package/src/components/pricing-cards/pricing-card-pricing.js +8 -6
- package/src/components/pricing-cards/pricing-card-show-more.css.js +11 -3
- package/src/components/pricing-cards/pricing-card-show-more.js +8 -3
- package/src/components/pricing-cards/pricing-card.css.js +244 -190
- package/src/components/pricing-cards/pricing-card.js +54 -70
- package/src/components/pricing-cards/pricing-feature-item.css.js +25 -8
- package/src/components/pricing-cards/pricing-feature-item.js +8 -3
- package/src/components/process-steps/process-steps.css.js +26 -14
- package/src/components/process-steps/process-steps.js +23 -6
- package/src/components/process-steps/process-steps.stories.js +1 -1
- package/src/components/progress/progress.css.js +80 -0
- package/src/components/progress/progress.js +42 -0
- package/src/components/progress/progress.stories.js +79 -0
- package/src/components/quick-answer/quick-answer.css.js +75 -13
- package/src/components/quick-answer/quick-answer.js +8 -3
- package/src/components/radio/radio.css.js +92 -128
- package/src/components/radio/radio.js +106 -127
- package/src/components/radio/radio.stories.js +54 -19
- package/src/components/review/review-grid.css.js +5 -6
- package/src/components/review/review-grid.js +14 -11
- package/src/components/review/review.css.js +11 -6
- package/src/components/review/review.js +3 -8
- package/src/components/shared/ensemble.css.js +93 -0
- package/src/components/shared/form-field.css.js +206 -0
- package/src/components/shared/prop-vocabulary.js +48 -0
- package/src/components/shared/token-scales.js +306 -0
- package/src/components/skeleton/skeleton.css.js +34 -0
- package/src/components/skeleton/skeleton.js +32 -0
- package/src/components/skeleton/skeleton.stories.js +70 -0
- package/src/components/spinner/spinner.css.js +62 -0
- package/src/components/spinner/spinner.js +38 -0
- package/src/components/spinner/spinner.stories.js +92 -0
- package/src/components/spotlight-section/spotlight-section.css.js +14 -13
- package/src/components/spotlight-section/spotlight-section.js +42 -39
- package/src/components/switch/switch.css.js +103 -0
- package/src/components/switch/switch.js +44 -0
- package/src/components/switch/switch.stories.js +86 -0
- package/src/components/tab-list/content-switcher.stories.js +189 -0
- package/src/components/tab-list/tab-list.css.js +250 -0
- package/src/components/tab-list/tab-list.js +184 -0
- package/src/components/tab-list/tab-list.stories.js +221 -0
- package/src/components/tabs/tabs.css.js +14 -123
- package/src/components/tabs/tabs.js +16 -19
- package/src/components/tabs/tabs.stories.js +95 -95
- package/src/components/tag/tag.css.js +54 -0
- package/src/components/tag/tag.js +32 -0
- package/src/components/tag/tag.stories.js +126 -0
- package/src/components/terminal/terminal-message.css.js +164 -60
- package/src/components/terminal/terminal-message.js +5 -5
- package/src/components/terminal/terminal-message.stories.js +70 -1
- package/src/components/termsOfUse/terms.css.js +25 -20
- package/src/components/termsOfUse/terms.js +13 -9
- package/src/components/termsOfUse/terms.stories.js +1 -1
- package/src/components/textarea/textarea.css.js +51 -0
- package/src/components/textarea/textarea.js +136 -0
- package/src/components/textarea/textarea.stories.js +191 -0
- package/src/components/tooltip/tooltip.css.js +75 -0
- package/src/components/tooltip/tooltip.js +156 -0
- package/src/components/tooltip/tooltip.stories.js +161 -0
- package/src/components/trust-panel/trust-panel.css.js +85 -33
- package/src/components/trust-panel/trust-panel.js +18 -10
- package/src/components/trust-panel/trust-panel.stories.js +1 -1
- package/src/components/ultimate-security-demo.stories.js +431 -0
- package/src/components/video/video.css.js +17 -0
- package/src/components/video/video.js +40 -0
- package/src/components/video/video.stories.js +106 -0
- package/src/components/video-player/video-player.css.js +67 -11
- package/src/components/video-player/video-player.js +35 -4
- package/src/components/video-player/video-player.stories.js +1 -1
- package/src/components/visual-alignment.stories.js +411 -0
- package/src/components/visually-hidden/visually-hidden.css.js +24 -0
- package/src/components/visually-hidden/visually-hidden.js +16 -0
- package/src/components/visually-hidden/visually-hidden.stories.js +56 -0
- package/src/stories/Button.stories.js +17 -17
- package/src/stories/Header.stories.js +10 -10
- package/src/stories/Page.js +1 -1
- package/src/stories/Page.stories.js +6 -6
- package/src/tokens/borders.stories.js +339 -0
- package/src/tokens/color-responsibilities.stories.js +227 -0
- package/src/tokens/dark-derivation.js +309 -0
- package/src/tokens/dark-findings.js +197 -0
- package/src/tokens/dark-mode.stories.js +207 -0
- package/src/tokens/dimension.stories.js +251 -0
- package/src/tokens/elevation.stories.js +143 -0
- package/src/tokens/focus.stories.js +276 -0
- package/src/tokens/fonts.css +20 -20
- package/src/tokens/fonts.stories.js +354 -374
- package/src/tokens/layout.css +25 -11
- package/src/tokens/motion.stories.js +231 -0
- package/src/tokens/shape.stories.js +272 -0
- package/src/tokens/spacing-rhythm.stories.js +359 -0
- package/src/tokens/spacing.stories.js +208 -703
- package/src/tokens/story-chrome.js +503 -0
- package/src/tokens/surfaces.stories.js +224 -0
- package/src/tokens/text-on-surface.stories.js +164 -0
- package/src/tokens/token-map.js +220 -0
- package/src/tokens/token-map.stories.js +257 -0
- package/src/tokens/token-purposes.js +266 -0
- package/src/tokens/tokens-grid.stories.js +388 -900
- package/src/tokens/tokens.css +1633 -1045
- package/src/tokens/tokens.js +1130 -492
- package/src/tokens/tokens.stories.js +137 -47
- package/src/tokens/type-ceiling-words.js +299 -0
- package/src/tokens/typography.stories.js +1003 -965
- package/src/tokens/vertical-rhythm.stories.js +224 -0
- package/src/components/awards/awards-icon.js +0 -56
- package/src/components/awards/awards-light.js +0 -240
- package/src/components/banner/banner.js +0 -60
- package/src/components/banner/banner.stories.js +0 -51
- package/src/components/button/icons.js +0 -24
- package/src/components/input/index.js +0 -0
- package/src/components/light-carousel/light-carousel-simple.css.js +0 -183
- package/src/components/light-carousel/light-carousel-simple.js +0 -74
- package/src/tokens/colors.js +0 -121
- package/src/tokens/typography.css.js +0 -207
- package/src/tokens/typography.js +0 -0
|
@@ -1,15 +1,47 @@
|
|
|
1
|
-
import { css } from "lit";
|
|
1
|
+
import { css, unsafeCSS } from "lit";
|
|
2
|
+
import { below } from "../shared/token-scales.js";
|
|
2
3
|
|
|
3
4
|
export default css`
|
|
5
|
+
/* One stylesheet for both public variants.
|
|
6
|
+
|
|
7
|
+
The two implementations were copies of each other: twenty-three rule
|
|
8
|
+
blocks each, the same selectors under the same media conditions, seventeen
|
|
9
|
+
of them byte-identical and every responsive block identical. The simple
|
|
10
|
+
copy differed only in the six values below, and carried them by suffixing
|
|
11
|
+
every class name with -s.
|
|
12
|
+
|
|
13
|
+
So the variant is a set of values, not a set of rules. It used to be
|
|
14
|
+
selected by tag name, which is why there were two public element pairs at
|
|
15
|
+
all; P6E.1 folded those into one pair and the set is now selected by
|
|
16
|
+
the variant attribute. Everything after that is shared, which is what keeps the 480,
|
|
17
|
+
600 and 1024 queries in one place instead of two. */
|
|
4
18
|
:host {
|
|
5
19
|
display: block;
|
|
6
|
-
|
|
7
|
-
--
|
|
20
|
+
|
|
21
|
+
--bd-lc-columns: 3;
|
|
22
|
+
--bd-lc-gap: 30px;
|
|
23
|
+
--bd-lc-icon-size: var(--spacing-32);
|
|
24
|
+
--bd-lc-header-direction: row;
|
|
25
|
+
--bd-lc-header-align: center;
|
|
26
|
+
--bd-lc-title-align: start;
|
|
27
|
+
--bd-lc-section-padding-block: var(--spacing-0);
|
|
28
|
+
--bd-lc-carousel-padding-top: var(--spacing-32);
|
|
8
29
|
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
30
|
+
|
|
31
|
+
:host([variant="simple"]) {
|
|
32
|
+
--bd-lc-columns: 4;
|
|
33
|
+
--bd-lc-gap: var(--spacing-24);
|
|
34
|
+
--bd-lc-icon-size: var(--spacing-44);
|
|
35
|
+
--bd-lc-header-direction: column;
|
|
36
|
+
--bd-lc-header-align: flex-start;
|
|
37
|
+
--bd-lc-title-align: center;
|
|
38
|
+
--bd-lc-section-padding-block: var(--spacing-32);
|
|
39
|
+
--bd-lc-carousel-padding-top: var(--spacing-0);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
:host(bd-light-carousel-section[variant="simple"]) {
|
|
43
|
+
padding-top: var(--bd-lc-section-padding-block);
|
|
44
|
+
padding-bottom: var(--bd-lc-section-padding-block);
|
|
13
45
|
}
|
|
14
46
|
.bd-header-light-carousel {
|
|
15
47
|
margin-bottom: 50px;
|
|
@@ -21,42 +53,34 @@ export default css`
|
|
|
21
53
|
align-items: center;
|
|
22
54
|
justify-content: center;
|
|
23
55
|
position: relative;
|
|
56
|
+
/* The section is the page column (bd-ensemble), so its cards land on the
|
|
57
|
+
same content edge as every other module's. It used to be 1400 wide with a
|
|
58
|
+
14px gutter of its own; the track below carried a second 20px one, which
|
|
59
|
+
put these cards 20px inside the column everything else aligned to. The
|
|
60
|
+
column owns the gutter now, the track none. */
|
|
61
|
+
box-sizing: border-box;
|
|
24
62
|
width: 100%;
|
|
25
63
|
margin: var(--spacing-0) auto;
|
|
26
64
|
overflow: hidden;
|
|
27
65
|
flex-direction: column;
|
|
28
|
-
padding-
|
|
29
|
-
padding-right: var(--spacing-14);
|
|
30
|
-
max-width: 1400px;
|
|
31
|
-
margin: 0 auto;
|
|
32
|
-
padding-top: var(--spacing-32);
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
.bd-light-carousel-title {
|
|
36
|
-
font-size: 28px;
|
|
37
|
-
font-weight: 700;
|
|
38
|
-
text-align: center;
|
|
39
|
-
color: #e4002b; /* roșu Bitdefender */
|
|
40
|
-
margin-bottom: 32px;
|
|
41
|
-
text-transform: uppercase;
|
|
42
|
-
letter-spacing: 0.5px;
|
|
66
|
+
padding-top: var(--bd-lc-carousel-padding-top);
|
|
43
67
|
}
|
|
44
68
|
.bd-light-carousel-track {
|
|
45
69
|
scroll-behavior: smooth;
|
|
46
70
|
flex: 1;
|
|
47
71
|
position: relative;
|
|
48
|
-
padding: var(--spacing-0)
|
|
72
|
+
padding: var(--spacing-0);
|
|
49
73
|
overflow-x: auto;
|
|
50
74
|
overflow-y: hidden;
|
|
51
75
|
scrollbar-width: none;
|
|
52
76
|
-ms-overflow-style: none;
|
|
53
|
-
z-index:
|
|
77
|
+
z-index: var(--z-base);
|
|
54
78
|
scroll-snap-type: x mandatory;
|
|
55
79
|
}
|
|
56
80
|
.bd-light-carousel-track {
|
|
57
81
|
display: grid;
|
|
58
|
-
gap:
|
|
59
|
-
grid-template-columns: repeat(
|
|
82
|
+
gap: var(--bd-lc-gap);
|
|
83
|
+
grid-template-columns: repeat(var(--bd-lc-columns), 1fr);
|
|
60
84
|
}
|
|
61
85
|
.bd-light-carousel-track::-webkit-scrollbar {
|
|
62
86
|
display: none;
|
|
@@ -64,67 +88,84 @@ export default css`
|
|
|
64
88
|
|
|
65
89
|
.bd-light-box {
|
|
66
90
|
flex: var(--spacing-0) var(--spacing-0) auto;
|
|
67
|
-
background: var(--
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
91
|
+
background: var(--color-surface-container);
|
|
92
|
+
/* 2xl is the card radius: the card box, the card-features card, the trust
|
|
93
|
+
panel card, the bento item and the awards root all use it. This was the
|
|
94
|
+
only one of them at 3xl, and nothing about a carousel item asks for a
|
|
95
|
+
softer corner than the same card sitting in a grid. */
|
|
96
|
+
border-radius: var(--card-radius);
|
|
97
|
+
padding: var(--card-padding);
|
|
71
98
|
flex-direction: column;
|
|
72
99
|
align-items: start;
|
|
73
100
|
justify-content: center;
|
|
74
101
|
text-align: start;
|
|
75
|
-
transition: transform
|
|
102
|
+
transition: transform var(--transition-duration-normal) var(--transition-easing-smooth);
|
|
76
103
|
min-height: 135px;
|
|
104
|
+
/* The inset sits inside the declared width, exactly as it already does on
|
|
105
|
+
bd-card and bd-bento-item. Without this the box is content-box: the two
|
|
106
|
+
width rules below mean content width, the 32px inset is added outside
|
|
107
|
+
them, and at 480 the card rendered 311 + 64 = 375px inside a 343px
|
|
108
|
+
section -- 64px past its own parent, clipping its text off the right of
|
|
109
|
+
a 375px phone. cards/card.css.js carries the same note for the same
|
|
110
|
+
reason. The em paddings that used to be in those media queries were
|
|
111
|
+
compensating for this rather than expressing an inset. */
|
|
112
|
+
box-sizing: border-box;
|
|
77
113
|
position: relative;
|
|
78
|
-
z-index:
|
|
114
|
+
z-index: var(--z-raised);
|
|
79
115
|
scroll-snap-align: start;
|
|
80
116
|
font-family: var(--typography-fontFamily-sans);
|
|
81
117
|
}
|
|
82
118
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
.bd-light-box p {
|
|
91
|
-
font-size: var(--spacing-16);
|
|
92
|
-
margin: var(--spacing-0) var(--spacing-0) 1em var(--spacing-0);
|
|
93
|
-
font-family: var(--typography-fontFamily-sans);
|
|
94
|
-
}
|
|
119
|
+
/* Two rules stood here, matching a bare h3 and a bare p inside the box.
|
|
120
|
+
Neither can match: the item renders its title through bd-h and its copy
|
|
121
|
+
through bd-p, so both elements live in their own shadow roots, and a
|
|
122
|
+
descendant selector from this stylesheet does not cross that boundary.
|
|
123
|
+
Measured 0 matches for each across 105 .bd-light-box instances. P5E.1
|
|
124
|
+
removed the responsive half of this pair; the base half kept declaring
|
|
125
|
+
spacing that nothing has ever been able to read. */
|
|
95
126
|
|
|
96
127
|
.bd-light-icon {
|
|
97
128
|
position: relative;
|
|
98
129
|
bottom: var(--spacing-6);
|
|
99
130
|
max-width: 100%;
|
|
100
|
-
height: var(--
|
|
101
|
-
width: var(--
|
|
131
|
+
height: var(--bd-lc-icon-size);
|
|
132
|
+
width: var(--bd-lc-icon-size);
|
|
102
133
|
}
|
|
103
134
|
.bd-light-box-header {
|
|
104
135
|
display: flex;
|
|
105
|
-
|
|
136
|
+
flex-direction: var(--bd-lc-header-direction);
|
|
137
|
+
align-items: var(--bd-lc-header-align);
|
|
106
138
|
gap: var(--spacing-8);
|
|
107
139
|
}
|
|
108
140
|
.bd-light-title-badge-wrapper {
|
|
109
141
|
display: flex;
|
|
110
142
|
align-items: center;
|
|
111
|
-
gap: var(--spacing-4
|
|
143
|
+
gap: var(--spacing-4);
|
|
112
144
|
}
|
|
113
145
|
|
|
146
|
+
/* No inset change at 1024. This box used to drop to 1.5em here and 1em at
|
|
147
|
+
480, and it was an outlier twice over: it started shrinking 256px of
|
|
148
|
+
viewport before any sibling did, and it kept going to 16px where the rest
|
|
149
|
+
stop at 24. It takes the compact inset with the family at md instead --
|
|
150
|
+
see the below('md') block further down.
|
|
151
|
+
|
|
152
|
+
The literals were also ems, so the inset scaled with whatever font-size the
|
|
153
|
+
box inherited while every sibling card's stayed put.
|
|
154
|
+
|
|
155
|
+
The width line is unrelated and stays. With box-sizing: border-box above,
|
|
156
|
+
the 380 is the card's whole width rather than its content width, so the
|
|
157
|
+
card measures 380 here instead of the 444 it used to render -- 64px
|
|
158
|
+
narrower, two still to a row, each one exactly filling its grid item. The
|
|
159
|
+
declared width was chosen over the rendered one on purpose: a rule that
|
|
160
|
+
says 380 and paints 444 is the kind of thing this file is being cleaned
|
|
161
|
+
of. */
|
|
114
162
|
@media (max-width: 1024px) {
|
|
115
163
|
.bd-light-box {
|
|
116
164
|
width: 380px;
|
|
117
|
-
padding: 1.5em;
|
|
118
|
-
}
|
|
119
|
-
.bd-light-box h3 {
|
|
120
|
-
font-size: 1.1em;
|
|
121
|
-
}
|
|
122
|
-
.bd-light-box p {
|
|
123
|
-
font-size: 0.95em;
|
|
124
165
|
}
|
|
125
166
|
}
|
|
126
167
|
|
|
127
|
-
@media (
|
|
168
|
+
@media ${unsafeCSS(below('md'))} {
|
|
128
169
|
.bd-light-carousel-track {
|
|
129
170
|
display: flex;
|
|
130
171
|
flex-direction: column;
|
|
@@ -138,6 +179,11 @@ export default css`
|
|
|
138
179
|
width: 100%;
|
|
139
180
|
max-width: 400px;
|
|
140
181
|
margin: var(--spacing-0) auto;
|
|
182
|
+
/* The compact inset, at the breakpoint the family takes it. Bento, the
|
|
183
|
+
Comparison Panel and the Trust Panel all step down here; this box used
|
|
184
|
+
to step down at 1024 and again at 480, which is why it read as the odd
|
|
185
|
+
one out when it was really just early and twice. */
|
|
186
|
+
padding: var(--card-padding-compact);
|
|
141
187
|
}
|
|
142
188
|
|
|
143
189
|
.bd-arrow {
|
|
@@ -148,15 +194,8 @@ export default css`
|
|
|
148
194
|
@media (max-width: 480px) {
|
|
149
195
|
.bd-light-box {
|
|
150
196
|
width: 100%;
|
|
151
|
-
padding: 1em;
|
|
152
197
|
min-height: 300px;
|
|
153
198
|
}
|
|
154
|
-
.bd-light-box h3 {
|
|
155
|
-
font-size: 1em;
|
|
156
|
-
}
|
|
157
|
-
.bd-light-box p {
|
|
158
|
-
font-size: 0.9em;
|
|
159
|
-
}
|
|
160
199
|
.bd-light-icon {
|
|
161
200
|
bottom: var(--spacing-10);
|
|
162
201
|
}
|
|
@@ -173,4 +212,13 @@ export default css`
|
|
|
173
212
|
grid-template-columns: 1fr;
|
|
174
213
|
}
|
|
175
214
|
}
|
|
215
|
+
|
|
216
|
+
/* A reader who asked for less motion was still getting the item lift. Twenty-three
|
|
217
|
+
of the thirty animated directories in this package honour the query; this
|
|
218
|
+
one did not. */
|
|
219
|
+
@media (prefers-reduced-motion: reduce) {
|
|
220
|
+
.bd-light-box {
|
|
221
|
+
transition: none;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
176
224
|
`;
|
|
@@ -1,25 +1,66 @@
|
|
|
1
1
|
import { LitElement, html } from "lit";
|
|
2
|
-
|
|
2
|
+
// Installs the design tokens into document scope; see src/tokens/tokens.js
|
|
3
|
+
import "../../tokens/tokens.js";
|
|
4
|
+
import "../badge/badge.js";
|
|
3
5
|
import "../heading/heading.js";
|
|
4
6
|
import carouselCSS from "../light-carousel/light-carousel.css.js";
|
|
7
|
+
import { ensembleCSS } from "../shared/ensemble.css.js";
|
|
5
8
|
|
|
6
9
|
class CustomLightCarousel extends LitElement {
|
|
7
10
|
static properties = {
|
|
8
|
-
title: { type: String }
|
|
11
|
+
title : { type: String },
|
|
12
|
+
headingLevel: { type: Number, attribute: "heading-level" },
|
|
13
|
+
/**
|
|
14
|
+
* Which value set the stylesheet uses: "standard" or "simple". Reflected,
|
|
15
|
+
* because light-carousel.css.js selects the set with an attribute selector.
|
|
16
|
+
*
|
|
17
|
+
* These were two public element pairs until P6E.1 --
|
|
18
|
+
* bd-light-carousel-simple-section and -item. They were never a different
|
|
19
|
+
* component: one stylesheet already served both and differed on eight
|
|
20
|
+
* custom properties. The names are the ones this component's own stories
|
|
21
|
+
* and docs table have always used, Standard and Simple, rather than new
|
|
22
|
+
* ones invented at consolidation time.
|
|
23
|
+
*/
|
|
24
|
+
variant : { type: String, reflect: true }
|
|
9
25
|
};
|
|
10
26
|
|
|
11
27
|
constructor() {
|
|
12
28
|
super();
|
|
13
29
|
this.title = "";
|
|
30
|
+
this.headingLevel = 2;
|
|
31
|
+
this.variant = "standard";
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* The heading element this section renders. Level is the document-outline
|
|
37
|
+
* question and belongs to whoever composes the page; the type scale is this
|
|
38
|
+
* component's own and does not move with it. Defaults to h2, because a
|
|
39
|
+
* reusable section cannot know it is the only thing on the page, and two of
|
|
40
|
+
* these used to put two h1s on one.
|
|
41
|
+
*/
|
|
42
|
+
get _headingTag() {
|
|
43
|
+
const n = Number(this.headingLevel);
|
|
44
|
+
return Number.isInteger(n) && n >= 1 && n <= 6 ? `h${n}` : "h2";
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/* bd-h already builds the dynamic tag, and it keeps the two questions apart
|
|
48
|
+
the way this component needs: as= is the outline level the page composes,
|
|
49
|
+
visual-level= is the type role, which is ours. Building the element here
|
|
50
|
+
meant re-implementing bd-h and then hand-writing the type on top of it. */
|
|
51
|
+
_renderTitle(className) {
|
|
52
|
+
return html`<bd-h as=${this._headingTag} visual-level="h3" class=${className}
|
|
53
|
+
>${this.title}</bd-h
|
|
54
|
+
>`;
|
|
14
55
|
}
|
|
15
56
|
|
|
16
57
|
render() {
|
|
17
58
|
return html`
|
|
18
|
-
<section class="bd-light-carousel">
|
|
59
|
+
<section class="bd-ensemble bd-light-carousel">
|
|
19
60
|
${this.title
|
|
20
61
|
? html`
|
|
21
62
|
<div class="bd-header-light-carousel">
|
|
22
|
-
|
|
63
|
+
${this._renderTitle("bd-section-title")}
|
|
23
64
|
</div>
|
|
24
65
|
`
|
|
25
66
|
: null}
|
|
@@ -32,9 +73,12 @@ class CustomLightCarousel extends LitElement {
|
|
|
32
73
|
}
|
|
33
74
|
class LightCarouselItem extends LitElement {
|
|
34
75
|
static properties = {
|
|
35
|
-
title: { type: String },
|
|
36
|
-
badge: { type: String },
|
|
37
|
-
icon
|
|
76
|
+
title : { type: String },
|
|
77
|
+
badge : { type: String },
|
|
78
|
+
icon : { type: String },
|
|
79
|
+
headingLevel: { type: Number, attribute: "heading-level" },
|
|
80
|
+
/** See the note on the section. Reflected for the same reason. */
|
|
81
|
+
variant : { type: String, reflect: true }
|
|
38
82
|
};
|
|
39
83
|
|
|
40
84
|
constructor() {
|
|
@@ -42,6 +86,36 @@ class LightCarouselItem extends LitElement {
|
|
|
42
86
|
this.title = "";
|
|
43
87
|
this.badge = "";
|
|
44
88
|
this.icon = "";
|
|
89
|
+
this.headingLevel = 3;
|
|
90
|
+
this.variant = "standard";
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* One level below the section default, so a section and the items inside it
|
|
96
|
+
* read as a hierarchy rather than a jump. The two variants render the same
|
|
97
|
+
* role at different sizes, which is a type decision and stays on
|
|
98
|
+
* visual-level; before this they said h6 and h4, which was a document-outline
|
|
99
|
+
* difference nobody chose.
|
|
100
|
+
*/
|
|
101
|
+
get _headingTag() {
|
|
102
|
+
const n = Number(this.headingLevel);
|
|
103
|
+
return Number.isInteger(n) && n >= 1 && n <= 6 ? `h${n}` : "h3";
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* The title, at whichever type the variant renders it.
|
|
108
|
+
*
|
|
109
|
+
* Standard draws it at h5, bold, with 10px of vertical padding; simple draws
|
|
110
|
+
* it at h4 with neither. That is a real difference, and it is the reason
|
|
111
|
+
* omitting `badge` could not have reproduced the simple item on its own --
|
|
112
|
+
* the two treatments disagree about the type of the title as well as about
|
|
113
|
+
* the eight layout values in the stylesheet.
|
|
114
|
+
*/
|
|
115
|
+
_renderItemTitle() {
|
|
116
|
+
return this.variant === "simple"
|
|
117
|
+
? html`<bd-h as="${this._headingTag}" visual-level="h4">${this.title}</bd-h>`
|
|
118
|
+
: html`<bd-h as="${this._headingTag}" visual-level="h5" padding="10 0" fontWeight="bold">${this.title}</bd-h>`;
|
|
45
119
|
}
|
|
46
120
|
|
|
47
121
|
render() {
|
|
@@ -55,9 +129,9 @@ class LightCarouselItem extends LitElement {
|
|
|
55
129
|
${this.title || this.badge
|
|
56
130
|
? html`
|
|
57
131
|
<div class="bd-light-title-badge-wrapper">
|
|
58
|
-
${this.title ?
|
|
132
|
+
${this.title ? this._renderItemTitle() : ""}
|
|
59
133
|
${this.badge
|
|
60
|
-
? html`<bd-badge
|
|
134
|
+
? html`<bd-badge tone="primary" variant="fill">${this.badge}</bd-badge>`
|
|
61
135
|
: ""}
|
|
62
136
|
</div>
|
|
63
137
|
`
|
|
@@ -68,8 +142,8 @@ class LightCarouselItem extends LitElement {
|
|
|
68
142
|
`;
|
|
69
143
|
}
|
|
70
144
|
}
|
|
71
|
-
CustomLightCarousel.styles = [
|
|
72
|
-
LightCarouselItem.styles = [
|
|
145
|
+
CustomLightCarousel.styles = [ensembleCSS, carouselCSS];
|
|
146
|
+
LightCarouselItem.styles = [carouselCSS];
|
|
73
147
|
|
|
74
148
|
customElements.define("bd-light-carousel-item", LightCarouselItem);
|
|
75
149
|
customElements.define("bd-light-carousel-section", CustomLightCarousel);
|