@deriv-com/dds-marketing 1.1.3 → 1.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/.llm/components/accordion.md +6 -0
- package/.llm/components/accordionitem.md +6 -0
- package/.llm/components/aspectratio.md +6 -0
- package/.llm/components/awards.md +6 -0
- package/.llm/components/background.md +49 -10
- package/.llm/components/badge.md +6 -0
- package/.llm/components/bottomsheet.md +6 -0
- package/.llm/components/breadcrumb.md +6 -0
- package/.llm/components/breadcrumbitem.md +6 -0
- package/.llm/components/button.md +9 -3
- package/.llm/components/buttonicon.md +7 -1
- package/.llm/components/card.md +6 -0
- package/.llm/components/cardbody.md +7 -1
- package/.llm/components/cardbutton.md +6 -0
- package/.llm/components/checkbox.md +6 -0
- package/.llm/components/comparisoncards.md +9 -3
- package/.llm/components/comparisontable.md +6 -0
- package/.llm/components/ctabanner.md +6 -0
- package/.llm/components/ctabannerslider.md +6 -0
- package/.llm/components/datatable.md +6 -0
- package/.llm/components/divider.md +6 -0
- package/.llm/components/documentlink.md +237 -0
- package/.llm/components/documents.md +268 -0
- package/.llm/components/downloadbanner.md +7 -1
- package/.llm/components/dropdownmenu.md +6 -0
- package/.llm/components/estimator.md +6 -0
- package/.llm/components/faqaccordion.md +6 -0
- package/.llm/components/featurebullets.md +6 -0
- package/.llm/components/featurecards.md +42 -2
- package/.llm/components/featurecardscarousel.md +7 -1
- package/.llm/components/featurescroll.md +6 -0
- package/.llm/components/featuresplit.md +6 -0
- package/.llm/components/featurestack.md +6 -0
- package/.llm/components/featuretabs.md +369 -0
- package/.llm/components/filterchip.md +6 -0
- package/.llm/components/footer.md +6 -0
- package/.llm/components/footergroup.md +6 -0
- package/.llm/components/grid.md +30 -1
- package/.llm/components/icon.md +6 -0
- package/.llm/components/illustrationcard.md +52 -2
- package/.llm/components/illustrationcheck.md +193 -0
- package/.llm/components/illustrationchoice.md +187 -0
- package/.llm/components/illustrationcode.md +192 -0
- package/.llm/components/illustrationlist.md +175 -0
- package/.llm/components/illustrationscene.md +29 -3
- package/.llm/components/imagebanner.md +30 -5
- package/.llm/components/landinghero.md +6 -0
- package/.llm/components/link.md +7 -1
- package/.llm/components/logocolumns.md +7 -1
- package/.llm/components/logorows.md +42 -2
- package/.llm/components/menuitem.md +6 -0
- package/.llm/components/navbar.md +6 -0
- package/.llm/components/navbaritem.md +6 -0
- package/.llm/components/navbarmenu.md +6 -0
- package/.llm/components/navbarmenugroup.md +6 -0
- package/.llm/components/navbarpanel.md +6 -0
- package/.llm/components/navbarswitcher.md +6 -0
- package/.llm/components/navbarswitcheroption.md +6 -0
- package/.llm/components/option.md +6 -0
- package/.llm/components/pageheader.md +6 -0
- package/.llm/components/pagination.md +6 -0
- package/.llm/components/paginationdots.md +6 -0
- package/.llm/components/producthero.md +29 -4
- package/.llm/components/progressbar.md +305 -0
- package/.llm/components/removablechip.md +6 -0
- package/.llm/components/resourcebanner.md +6 -0
- package/.llm/components/row.md +6 -0
- package/.llm/components/scenescroll.md +38 -24
- package/.llm/components/scenescrollword.md +267 -0
- package/.llm/components/scroller.md +6 -0
- package/.llm/components/searchinput.md +6 -0
- package/.llm/components/segmentedcontrol.md +28 -1
- package/.llm/components/segmentedcontrolitem.md +6 -0
- package/.llm/components/select.md +6 -0
- package/.llm/components/selectchip.md +6 -0
- package/.llm/components/spinner.md +6 -0
- package/.llm/components/stack.md +6 -0
- package/.llm/components/stats.md +46 -1
- package/.llm/components/statscarousel.md +227 -0
- package/.llm/components/statusdot.md +41 -1
- package/.llm/components/steps.md +6 -0
- package/.llm/components/stickycards.md +6 -0
- package/.llm/components/subdomainnavbar.md +6 -0
- package/.llm/components/tab.md +6 -0
- package/.llm/components/table.md +6 -0
- package/.llm/components/tablebody.md +6 -0
- package/.llm/components/tablecell.md +6 -0
- package/.llm/components/tablehead.md +6 -0
- package/.llm/components/tableheadercell.md +6 -0
- package/.llm/components/tablerow.md +6 -0
- package/.llm/components/tablist.md +6 -0
- package/.llm/components/teamgrid.md +6 -0
- package/.llm/components/testimonialrow.md +43 -3
- package/.llm/components/testimonialslider.md +8 -2
- package/.llm/components/textarea.md +6 -0
- package/.llm/components/textinput.md +6 -0
- package/.llm/components/textscroll.md +6 -0
- package/.llm/components/tiers.md +13 -7
- package/.llm/components/tooltip.md +6 -0
- package/.llm/components/typography.md +63 -1
- package/.llm/digest/background.md +14 -6
- package/.llm/digest/button.md +1 -1
- package/.llm/digest/buttonicon.md +1 -1
- package/.llm/digest/documentlink.md +52 -0
- package/.llm/digest/documents.md +51 -0
- package/.llm/digest/downloadbanner.md +1 -1
- package/.llm/digest/featurecards.md +7 -0
- package/.llm/digest/featuretabs.md +50 -0
- package/.llm/digest/grid.md +1 -0
- package/.llm/digest/illustrationcard.md +6 -1
- package/.llm/digest/illustrationcheck.md +42 -0
- package/.llm/digest/illustrationchoice.md +43 -0
- package/.llm/digest/illustrationcode.md +41 -0
- package/.llm/digest/illustrationlist.md +38 -0
- package/.llm/digest/illustrationscene.md +4 -2
- package/.llm/digest/imagebanner.md +9 -3
- package/.llm/digest/logocolumns.md +1 -1
- package/.llm/digest/logorows.md +8 -1
- package/.llm/digest/producthero.md +8 -2
- package/.llm/digest/progressbar.md +56 -0
- package/.llm/digest/scenescroll.md +6 -5
- package/.llm/digest/scenescrollword.md +56 -0
- package/.llm/digest/segmentedcontrol.md +3 -0
- package/.llm/digest/stats.md +8 -0
- package/.llm/digest/statscarousel.md +48 -0
- package/.llm/digest/statusdot.md +7 -0
- package/.llm/digest/testimonialrow.md +8 -1
- package/.llm/digest/testimonialslider.md +1 -1
- package/.llm/digest/typography.md +18 -0
- package/.llm/index.md +14 -4
- package/.llm/rules.md +10 -0
- package/.llm/tokens.md +12 -3
- package/AGENTS.md +13 -2
- package/dist/components/arrival.d.ts +32 -0
- package/dist/components/arrival.js +140 -0
- package/dist/components/arrives.d.ts +17 -0
- package/dist/components/arrives.js +14 -0
- package/dist/components/blocks/awards/Awards.js +2 -27
- package/dist/components/blocks/block-pattern.css +23 -0
- package/dist/components/blocks/comparison-cards/comparison-cards-impl.css +29 -0
- package/dist/components/blocks/documents/Documents.css +90 -0
- package/dist/components/blocks/documents/Documents.d.ts +22 -0
- package/dist/components/blocks/documents/Documents.js +30 -0
- package/dist/components/blocks/documents/Documents.types.d.ts +37 -0
- package/dist/components/blocks/documents/Documents.types.js +14 -0
- package/dist/components/blocks/documents/documents-impl.css +103 -0
- package/dist/components/blocks/download-banner/DownloadBanner.css +1 -1
- package/dist/components/blocks/download-banner/DownloadBanner.types.d.ts +1 -1
- package/dist/components/blocks/feature-cards/FeatureCards.d.ts +2 -1
- package/dist/components/blocks/feature-cards/FeatureCards.js +10 -7
- package/dist/components/blocks/feature-cards/FeatureCards.types.d.ts +9 -1
- package/dist/components/blocks/feature-cards/feature-cards-impl.css +15 -3
- package/dist/components/blocks/feature-cards-carousel/FeatureCardsCarousel.types.d.ts +1 -1
- package/dist/components/blocks/feature-cards-carousel/feature-cards-carousel-impl.css +12 -0
- package/dist/components/blocks/feature-tabs/FeatureTabs.css +100 -0
- package/dist/components/blocks/feature-tabs/FeatureTabs.d.ts +23 -0
- package/dist/components/blocks/feature-tabs/FeatureTabs.js +38 -0
- package/dist/components/blocks/feature-tabs/FeatureTabs.types.d.ts +35 -0
- package/dist/components/blocks/feature-tabs/FeatureTabs.types.js +14 -0
- package/dist/components/blocks/feature-tabs/feature-tabs-impl.css +53 -0
- package/dist/components/blocks/image-banner/ImageBanner.css +1 -1
- package/dist/components/blocks/image-banner/ImageBanner.d.ts +1 -1
- package/dist/components/blocks/image-banner/ImageBanner.js +2 -2
- package/dist/components/blocks/image-banner/ImageBanner.types.d.ts +9 -7
- package/dist/components/blocks/image-banner/ImageBanner.types.js +1 -1
- package/dist/components/blocks/image-banner/image-banner-impl.css +77 -26
- package/dist/components/blocks/laurel.d.ts +16 -0
- package/dist/components/blocks/laurel.js +28 -0
- package/dist/components/blocks/logo-columns/LogoColumns.css +1 -1
- package/dist/components/blocks/logo-columns/LogoColumns.types.d.ts +1 -1
- package/dist/components/blocks/logo-rows/LogoRows.css +1 -1
- package/dist/components/blocks/logo-rows/LogoRows.d.ts +2 -1
- package/dist/components/blocks/logo-rows/LogoRows.js +7 -4
- package/dist/components/blocks/logo-rows/LogoRows.types.d.ts +9 -1
- package/dist/components/blocks/pattern-tone.d.ts +11 -0
- package/dist/components/blocks/pattern-tone.js +7 -0
- package/dist/components/blocks/product-hero/ProductHero.d.ts +1 -1
- package/dist/components/blocks/product-hero/ProductHero.js +2 -2
- package/dist/components/blocks/product-hero/ProductHero.types.d.ts +8 -3
- package/dist/components/blocks/product-hero/ProductHero.types.js +1 -1
- package/dist/components/blocks/product-hero/product-hero-impl.css +54 -0
- package/dist/components/blocks/resource-banner/ResourceBanner.css +1 -1
- package/dist/components/blocks/scene-scroll/SceneScroll.css +1 -1
- package/dist/components/blocks/scene-scroll/SceneScroll.d.ts +6 -5
- package/dist/components/blocks/scene-scroll/SceneScroll.js +8 -7
- package/dist/components/blocks/scene-scroll/SceneScroll.types.d.ts +5 -5
- package/dist/components/blocks/scene-scroll/SceneScroll.types.js +1 -1
- package/dist/components/blocks/scene-scroll/scene-scroll-impl.css +61 -44
- package/dist/components/blocks/scene-scroll-word/SceneScrollWord.css +105 -0
- package/dist/components/blocks/scene-scroll-word/SceneScrollWord.d.ts +31 -0
- package/dist/components/blocks/scene-scroll-word/SceneScrollWord.js +67 -0
- package/dist/components/blocks/scene-scroll-word/SceneScrollWord.types.d.ts +39 -0
- package/dist/components/blocks/scene-scroll-word/SceneScrollWord.types.js +18 -0
- package/dist/components/blocks/scene-scroll-word/scene-scroll-word-impl.css +370 -0
- package/dist/components/blocks/stats/Stats.d.ts +2 -1
- package/dist/components/blocks/stats/Stats.js +17 -14
- package/dist/components/blocks/stats/Stats.types.d.ts +8 -0
- package/dist/components/blocks/stats/stats-impl.css +4 -1
- package/dist/components/blocks/stats/use-wheel.d.ts +1 -1
- package/dist/components/blocks/stats/use-wheel.js +8 -4
- package/dist/components/blocks/stats-carousel/StatsCarousel.css +209 -0
- package/dist/components/blocks/stats-carousel/StatsCarousel.d.ts +20 -0
- package/dist/components/blocks/stats-carousel/StatsCarousel.js +48 -0
- package/dist/components/blocks/stats-carousel/StatsCarousel.types.d.ts +43 -0
- package/dist/components/blocks/stats-carousel/StatsCarousel.types.js +23 -0
- package/dist/components/blocks/stats-carousel/stats-carousel-impl.css +233 -0
- package/dist/components/blocks/sticky-cards/sticky-cards-impl.css +8 -0
- package/dist/components/blocks/testimonial-row/TestimonialRow.css +1 -1
- package/dist/components/blocks/testimonial-row/TestimonialRow.d.ts +2 -1
- package/dist/components/blocks/testimonial-row/TestimonialRow.js +16 -13
- package/dist/components/blocks/testimonial-row/TestimonialRow.types.d.ts +9 -1
- package/dist/components/blocks/testimonial-slider/TestimonialSlider.css +1 -1
- package/dist/components/blocks/testimonial-slider/TestimonialSlider.types.d.ts +1 -1
- package/dist/components/blocks/tiers/Tiers.types.d.ts +1 -1
- package/dist/components/core/background/Background.css +19 -0
- package/dist/components/core/background/Background.types.d.ts +2 -1
- package/dist/components/core/background/background-impl.css +47 -15
- package/dist/components/core/background/halftone.js +1 -1
- package/dist/components/core/button/Button.css +5 -5
- package/dist/components/core/button-icon/ButtonIcon.types.d.ts +1 -1
- package/dist/components/core/card-body/CardBody.css +5 -0
- package/dist/components/core/card-body/CardBody.types.d.ts +1 -1
- package/dist/components/core/document-link/DocumentLink.css +59 -0
- package/dist/components/core/document-link/DocumentLink.d.ts +19 -0
- package/dist/components/core/document-link/DocumentLink.js +21 -0
- package/dist/components/core/document-link/DocumentLink.types.d.ts +41 -0
- package/dist/components/core/document-link/DocumentLink.types.js +11 -0
- package/dist/components/core/document-link/document-link-impl.css +23 -0
- package/dist/components/core/illustration-card/IllustrationCard.css +7 -0
- package/dist/components/core/illustration-card/IllustrationCard.d.ts +5 -1
- package/dist/components/core/illustration-card/IllustrationCard.js +34 -8
- package/dist/components/core/illustration-card/IllustrationCard.types.d.ts +8 -1
- package/dist/components/core/illustration-card/IllustrationCard.types.js +1 -0
- package/dist/components/core/illustration-card/illustration-card-impl.css +113 -0
- package/dist/components/core/illustration-check/IllustrationCheck.css +25 -0
- package/dist/components/core/illustration-check/IllustrationCheck.d.ts +16 -0
- package/dist/components/core/illustration-check/IllustrationCheck.js +22 -0
- package/dist/components/core/illustration-check/IllustrationCheck.types.d.ts +25 -0
- package/dist/components/core/illustration-check/IllustrationCheck.types.js +9 -0
- package/dist/components/core/illustration-check/illustration-check-impl.css +76 -0
- package/dist/components/core/illustration-choice/IllustrationChoice.css +62 -0
- package/dist/components/core/illustration-choice/IllustrationChoice.d.ts +16 -0
- package/dist/components/core/illustration-choice/IllustrationChoice.js +31 -0
- package/dist/components/core/illustration-choice/IllustrationChoice.types.d.ts +25 -0
- package/dist/components/core/illustration-choice/IllustrationChoice.types.js +11 -0
- package/dist/components/core/illustration-choice/illustration-choice-impl.css +103 -0
- package/dist/components/core/illustration-code/IllustrationCode.css +25 -0
- package/dist/components/core/illustration-code/IllustrationCode.d.ts +12 -0
- package/dist/components/core/illustration-code/IllustrationCode.js +20 -0
- package/dist/components/core/illustration-code/IllustrationCode.types.d.ts +23 -0
- package/dist/components/core/illustration-code/IllustrationCode.types.js +8 -0
- package/dist/components/core/illustration-code/illustration-code-impl.css +42 -0
- package/dist/components/core/illustration-list/IllustrationList.css +19 -0
- package/dist/components/core/illustration-list/IllustrationList.d.ts +16 -0
- package/dist/components/core/illustration-list/IllustrationList.js +18 -0
- package/dist/components/core/illustration-list/IllustrationList.types.d.ts +15 -0
- package/dist/components/core/illustration-list/IllustrationList.types.js +6 -0
- package/dist/components/core/illustration-list/illustration-list-impl.css +52 -0
- package/dist/components/core/illustration-scene/IllustrationScene.css +6 -0
- package/dist/components/core/illustration-scene/IllustrationScene.d.ts +3 -2
- package/dist/components/core/illustration-scene/IllustrationScene.js +4 -3
- package/dist/components/core/illustration-scene/IllustrationScene.types.d.ts +5 -1
- package/dist/components/core/illustration-scene/IllustrationScene.types.js +2 -1
- package/dist/components/core/illustration-scene/illustration-scene-impl.css +65 -0
- package/dist/components/core/link/link-impl.css +5 -19
- package/dist/components/core/progress-bar/ProgressBar.css +101 -0
- package/dist/components/core/progress-bar/ProgressBar.d.ts +5 -0
- package/dist/components/core/progress-bar/ProgressBar.js +34 -0
- package/dist/components/core/progress-bar/ProgressBar.types.d.ts +52 -0
- package/dist/components/core/progress-bar/ProgressBar.types.js +12 -0
- package/dist/components/core/progress-bar/progress-bar-impl.css +45 -0
- package/dist/components/core/segmented-control/SegmentedControl.d.ts +1 -1
- package/dist/components/core/segmented-control/SegmentedControl.js +13 -5
- package/dist/components/core/segmented-control/SegmentedControl.types.d.ts +5 -1
- package/dist/components/core/segmented-control/segmented-control-impl.css +35 -0
- package/dist/components/core/status-dot/StatusDot.d.ts +1 -1
- package/dist/components/core/status-dot/StatusDot.js +7 -4
- package/dist/components/core/status-dot/StatusDot.types.d.ts +9 -1
- package/dist/components/core/status-dot/status-dot-impl.css +101 -0
- package/dist/components/core/typography/Typography.d.ts +3 -283
- package/dist/components/core/typography/Typography.js +9 -1
- package/dist/components/core/typography/Typography.types.d.ts +9 -15
- package/dist/components/core/typography/TypographyMotion.d.ts +28 -0
- package/dist/components/core/typography/TypographyMotion.js +43 -0
- package/dist/components/core/typography/typography-impl.css +106 -0
- package/dist/components/illustration-data.d.ts +15 -0
- package/dist/components/illustration-data.js +7 -0
- package/dist/components/index.d.ts +22 -1
- package/dist/components/index.js +20 -0
- package/dist/components/layout/grid/Grid.css +5 -0
- package/dist/components/layout/grid/Grid.types.d.ts +2 -1
- package/dist/components/scene-scroll-data.d.ts +35 -0
- package/dist/components/tiers-data.d.ts +3 -2
- package/dist/marketing.css +24 -6
- package/package.json +1 -1
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/* GENERATED from scenescrollword.contract.json. Do not edit. */
|
|
2
|
+
|
|
3
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword {
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
container-type: inline-size;
|
|
6
|
+
display: block;
|
|
7
|
+
inline-size: 100%;
|
|
8
|
+
overflow-wrap: anywhere;
|
|
9
|
+
background-color: var(--color-bg-brand-strong);
|
|
10
|
+
color: var(--color-fg-on-brand-strong);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword .dds-scenescrollword__stage {
|
|
14
|
+
box-sizing: border-box;
|
|
15
|
+
display: grid;
|
|
16
|
+
inline-size: 100%;
|
|
17
|
+
min-inline-size: 0;
|
|
18
|
+
row-gap: var(--space-gap-none);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword .dds-scenescrollword__scene {
|
|
22
|
+
box-sizing: border-box;
|
|
23
|
+
display: flex;
|
|
24
|
+
flex-direction: column;
|
|
25
|
+
isolation: isolate;
|
|
26
|
+
justify-content: center;
|
|
27
|
+
min-inline-size: 0;
|
|
28
|
+
position: relative;
|
|
29
|
+
padding-block: var(--space-section-default);
|
|
30
|
+
padding-inline: var(--space-inset-page);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword .dds-scenescrollword__media {
|
|
34
|
+
overflow: clip;
|
|
35
|
+
position: absolute;
|
|
36
|
+
border-radius: var(--radius-none);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword .dds-scenescrollword__image {
|
|
40
|
+
display: block;
|
|
41
|
+
object-fit: cover;
|
|
42
|
+
border-radius: var(--radius-none);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword .dds-scenescrollword__content {
|
|
46
|
+
box-sizing: border-box;
|
|
47
|
+
display: flex;
|
|
48
|
+
flex-direction: column;
|
|
49
|
+
min-inline-size: 0;
|
|
50
|
+
position: relative;
|
|
51
|
+
max-inline-size: var(--size-heading-group-max);
|
|
52
|
+
row-gap: var(--space-gap-none);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword .dds-scenescrollword__title {
|
|
56
|
+
margin-block: 0;
|
|
57
|
+
text-wrap: balance;
|
|
58
|
+
margin-block-end: var(--space-heading-title-description);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword .dds-scenescrollword__before {
|
|
62
|
+
display: inline;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword .dds-scenescrollword__word {
|
|
66
|
+
display: inline-grid;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword .dds-scenescrollword__after {
|
|
70
|
+
display: inline;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword .dds-scenescrollword__description {
|
|
74
|
+
margin-block: 0;
|
|
75
|
+
font-family: var(--font-body-lg-family);
|
|
76
|
+
font-size: var(--font-body-lg-size);
|
|
77
|
+
font-weight: var(--font-body-lg-weight);
|
|
78
|
+
letter-spacing: var(--font-body-lg-letter-spacing);
|
|
79
|
+
line-height: var(--font-body-lg-line-height);
|
|
80
|
+
max-inline-size: var(--size-measure-description);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword .dds-scenescrollword__action {
|
|
84
|
+
display: flex;
|
|
85
|
+
position: relative;
|
|
86
|
+
padding-block-end: var(--space-section-default);
|
|
87
|
+
padding-inline: var(--space-inset-page);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword[data-heading-level="h1"] .dds-scenescrollword__title {
|
|
91
|
+
font-family: var(--font-h1-family);
|
|
92
|
+
font-size: var(--font-h1-size);
|
|
93
|
+
font-weight: var(--font-h1-weight);
|
|
94
|
+
letter-spacing: var(--font-h1-letter-spacing);
|
|
95
|
+
line-height: var(--font-h1-line-height);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword[data-heading-level="h2"] .dds-scenescrollword__title {
|
|
99
|
+
font-family: var(--font-h2-family);
|
|
100
|
+
font-size: var(--font-h2-size);
|
|
101
|
+
font-weight: var(--font-h2-weight);
|
|
102
|
+
letter-spacing: var(--font-h2-letter-spacing);
|
|
103
|
+
line-height: var(--font-h2-line-height);
|
|
104
|
+
}
|
|
105
|
+
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import './SceneScrollWord.css';
|
|
2
|
+
import './scene-scroll-word-impl.css';
|
|
3
|
+
import { type SceneScrollWordProps } from './SceneScrollWord.types.js';
|
|
4
|
+
export type { SceneScrollWordProps };
|
|
5
|
+
/**
|
|
6
|
+
* SceneScroll's change-over told as one claim with one word changed — "Trade all day", then
|
|
7
|
+
* "Trade all night": the reference design's inline day-and-night headline, made generic.
|
|
8
|
+
*
|
|
9
|
+
* The same track, pin and view timeline as SceneScroll, and nothing here runs a script. Each scene
|
|
10
|
+
* draws its whole heading — the shared words and its own word — so the outline, a screen reader and
|
|
11
|
+
* the stacked fallback all read "Trade all day" then "Trade all night". The stylesheet lays the
|
|
12
|
+
* second heading exactly over the first, keeps the second's shared words undrawn, and changes the
|
|
13
|
+
* words over alone.
|
|
14
|
+
*
|
|
15
|
+
* The changing word falls where the language puts it, so the shared words come as what is before it
|
|
16
|
+
* and what is after it, either or both, and nothing here adds a space: Japanese has none to add, and
|
|
17
|
+
* a language that has them writes them into the strings.
|
|
18
|
+
*
|
|
19
|
+
* Each word sits in a slot holding the other scene's word too, undrawn: the slot is as wide as the
|
|
20
|
+
* wider of the two, so both titles wrap alike and the second's word lands exactly where the first's
|
|
21
|
+
* was. That duplicate is the one thing kept from assistive technology, since the heading it belongs
|
|
22
|
+
* to is read in full.
|
|
23
|
+
*
|
|
24
|
+
* The words sit straight on the photographs in the ink each scene names, as SceneScroll's do. Where
|
|
25
|
+
* the two inks differ the shared words cross over with the word, so the claim changes colour as one
|
|
26
|
+
* piece; the section says so as `data-ink-change`.
|
|
27
|
+
*
|
|
28
|
+
* `'use client'` for `useId`, which names the region by its heading. There is no arrival, for
|
|
29
|
+
* SceneScroll's reason: the change-over is this block's entrance.
|
|
30
|
+
*/
|
|
31
|
+
export declare function SceneScrollWord({ titleBefore, titleAfter, first, second, action, headingLevel, }: SceneScrollWordProps): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { useId } from 'react';
|
|
4
|
+
import './SceneScrollWord.css';
|
|
5
|
+
import './scene-scroll-word-impl.css';
|
|
6
|
+
import { given } from '../../given.js';
|
|
7
|
+
import { sceneScrollWordDefaults, sceneScrollWordParts, } from './SceneScrollWord.types.js';
|
|
8
|
+
/**
|
|
9
|
+
* The spaces an author wrote at either edge of the shared words, set apart from them.
|
|
10
|
+
*
|
|
11
|
+
* Written into the strings rather than added here, because a language without spaces between words
|
|
12
|
+
* has none to add — but drawn between the parts rather than inside them. An accessible name is put
|
|
13
|
+
* together from each element's text with its edges trimmed, so "Trade all " in a span beside "day"
|
|
14
|
+
* was announced "Trade allday"; as text between the two it is the space it was written as.
|
|
15
|
+
*/
|
|
16
|
+
function edge(text) {
|
|
17
|
+
const start = /^\s*/.exec(text)[0];
|
|
18
|
+
const end = /\s*$/.exec(text)[0];
|
|
19
|
+
return { start, end, words: text.slice(start.length, text.length - end.length) };
|
|
20
|
+
}
|
|
21
|
+
/** The level under the first scene's, for the second scene's title. */
|
|
22
|
+
const under = { h1: 'h2', h2: 'h3' };
|
|
23
|
+
/**
|
|
24
|
+
* SceneScroll's change-over told as one claim with one word changed — "Trade all day", then
|
|
25
|
+
* "Trade all night": the reference design's inline day-and-night headline, made generic.
|
|
26
|
+
*
|
|
27
|
+
* The same track, pin and view timeline as SceneScroll, and nothing here runs a script. Each scene
|
|
28
|
+
* draws its whole heading — the shared words and its own word — so the outline, a screen reader and
|
|
29
|
+
* the stacked fallback all read "Trade all day" then "Trade all night". The stylesheet lays the
|
|
30
|
+
* second heading exactly over the first, keeps the second's shared words undrawn, and changes the
|
|
31
|
+
* words over alone.
|
|
32
|
+
*
|
|
33
|
+
* The changing word falls where the language puts it, so the shared words come as what is before it
|
|
34
|
+
* and what is after it, either or both, and nothing here adds a space: Japanese has none to add, and
|
|
35
|
+
* a language that has them writes them into the strings.
|
|
36
|
+
*
|
|
37
|
+
* Each word sits in a slot holding the other scene's word too, undrawn: the slot is as wide as the
|
|
38
|
+
* wider of the two, so both titles wrap alike and the second's word lands exactly where the first's
|
|
39
|
+
* was. That duplicate is the one thing kept from assistive technology, since the heading it belongs
|
|
40
|
+
* to is read in full.
|
|
41
|
+
*
|
|
42
|
+
* The words sit straight on the photographs in the ink each scene names, as SceneScroll's do. Where
|
|
43
|
+
* the two inks differ the shared words cross over with the word, so the claim changes colour as one
|
|
44
|
+
* piece; the section says so as `data-ink-change`.
|
|
45
|
+
*
|
|
46
|
+
* `'use client'` for `useId`, which names the region by its heading. There is no arrival, for
|
|
47
|
+
* SceneScroll's reason: the change-over is this block's entrance.
|
|
48
|
+
*/
|
|
49
|
+
export function SceneScrollWord({ titleBefore, titleAfter, first, second, action, headingLevel = sceneScrollWordDefaults.headingLevel, }) {
|
|
50
|
+
const titleId = useId();
|
|
51
|
+
// Both scenes are required, but a record from a feed or an editor is not typed: one that never
|
|
52
|
+
// arrived draws nothing rather than taking the page down, and a change-over missing a scene is not
|
|
53
|
+
// the section. Shared words missing on both sides still leave each scene a heading — its word —
|
|
54
|
+
// so that is drawn rather than the section vanishing over copy still being written.
|
|
55
|
+
if (!first || !second)
|
|
56
|
+
return null;
|
|
57
|
+
const before = given(titleBefore) ? titleBefore : undefined;
|
|
58
|
+
const after = given(titleAfter) ? titleAfter : undefined;
|
|
59
|
+
return (_jsx("section", { className: sceneScrollWordParts.root, "data-heading-level": headingLevel, "data-ink-change": (first.ink ?? 'light') === (second.ink ?? 'light') ? undefined : '', "aria-labelledby": titleId, children: _jsxs("div", { className: sceneScrollWordParts.stage, children: [_jsx(Scene, { which: "first", scene: first, other: second.word, before: before, after: after, level: headingLevel, titleId: titleId, eager: headingLevel === 'h1' }), _jsx(Scene, { which: "second", scene: second, other: first.word, before: before, after: after, level: under[headingLevel] }), action ? _jsx("div", { className: sceneScrollWordParts.action, children: action }) : null] }) }));
|
|
60
|
+
}
|
|
61
|
+
function Scene({ which, scene, other, before, after, level, titleId, eager = false }) {
|
|
62
|
+
const Title = level;
|
|
63
|
+
const { image } = scene;
|
|
64
|
+
const lead = before !== undefined ? edge(before) : undefined;
|
|
65
|
+
const tail = after !== undefined ? edge(after) : undefined;
|
|
66
|
+
return (_jsxs("div", { className: sceneScrollWordParts.scene, "data-scene": which, "data-ink": scene.ink ?? 'light', children: [_jsx("div", { className: sceneScrollWordParts.media, children: image ? (_jsx("img", { className: sceneScrollWordParts.image, src: image.src, alt: image.alt ?? '', width: image.width, height: image.height, loading: eager ? 'eager' : 'lazy', decoding: "async" })) : null }), _jsxs("div", { className: sceneScrollWordParts.content, children: [_jsxs(Title, { className: sceneScrollWordParts.title, id: titleId, children: [lead !== undefined ? (_jsxs(_Fragment, { children: [_jsx("span", { className: sceneScrollWordParts.before, children: lead.words }), lead.end] })) : null, _jsxs("span", { className: sceneScrollWordParts.word, children: [_jsx("span", { "data-word": "own", children: scene.word }), _jsx("span", { "data-word": "other", "aria-hidden": "true", children: other })] }), tail !== undefined ? (_jsxs(_Fragment, { children: [tail.start, _jsx("span", { className: sceneScrollWordParts.after, children: tail.words })] })) : null] }), given(scene.description) ? _jsx("p", { className: sceneScrollWordParts.description, children: scene.description }) : null] })] }));
|
|
67
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { SceneScrollWordScene } from '../../scene-scroll-data.js';
|
|
3
|
+
export interface SceneScrollWordOwnProps {
|
|
4
|
+
/**
|
|
5
|
+
* `h2` — The default: the section sits under the page's own h1, and the scenes' titles are drawn at font.h2
|
|
6
|
+
* `h1` — The section opens a campaign page and the first scene's title is the page's heading — the reference design's hero use. Drawn at font.h1, the opening band's size
|
|
7
|
+
*/
|
|
8
|
+
headingLevel?: 'h2' | 'h1';
|
|
9
|
+
/** The words of the title that come before the changing word, the same in both scenes — "Trade all ", for "Trade all day" and "Trade all night". With the space that separates them from the word written in, where the language uses one: the block adds none. Give this, `titleAfter`, or both; a title with neither is SceneScroll's. */
|
|
10
|
+
titleBefore?: string;
|
|
11
|
+
/** The words of the title that come after the changing word, the same in both scenes — " handeln", for German "Den ganzen Tag handeln" and "Die ganze Nacht handeln"; "取引" for Japanese "一日中取引" and "夜通し取引", with no space. With the space written in where the language uses one: the block adds none. */
|
|
12
|
+
titleAfter?: string;
|
|
13
|
+
/** Always. The scene the section opens on: the word that completes the title, a line under it where the title needs one, and the photograph filling the band behind them. With the shared words around it, it names the section. Give its `ink` — `dark` over a light photograph, `light` over a dark one — and the photograph's width and height; `alt` empty unless it shows something the words do not. */
|
|
14
|
+
first: SceneScrollWordScene;
|
|
15
|
+
/** Always. The scene the section changes over to, in the same shape as the first. A word of about the same length as the first, so the words after it do not move as one replaces the other, and a photograph of the same composition where there is one, so the dissolve reads as one place changing rather than a cut. Its `ink` is its own, so a daylight first scene in dark words can change over to a night one in white. */
|
|
16
|
+
second: SceneScrollWordScene;
|
|
17
|
+
/** One thing for the reader to do or a way on — "Trade now", "See trading hours" — under the words. It belongs to the section rather than to either scene, so it holds still through the change-over and never fades while the reader is reaching for it. A primary Button, or a standalone Link at its brand tone: either reads over both photographs, where a Link taking the ink around it would take the band's white over a light photograph. */
|
|
18
|
+
action?: ReactNode;
|
|
19
|
+
}
|
|
20
|
+
export type SceneScrollWordProps = SceneScrollWordOwnProps;
|
|
21
|
+
/** The class each part carries. Apply these — do not retype them. */
|
|
22
|
+
export declare const sceneScrollWordParts: {
|
|
23
|
+
readonly root: "dds-scenescrollword";
|
|
24
|
+
readonly stage: "dds-scenescrollword__stage";
|
|
25
|
+
readonly scene: "dds-scenescrollword__scene";
|
|
26
|
+
readonly media: "dds-scenescrollword__media";
|
|
27
|
+
readonly image: "dds-scenescrollword__image";
|
|
28
|
+
readonly content: "dds-scenescrollword__content";
|
|
29
|
+
readonly title: "dds-scenescrollword__title";
|
|
30
|
+
readonly before: "dds-scenescrollword__before";
|
|
31
|
+
readonly word: "dds-scenescrollword__word";
|
|
32
|
+
readonly after: "dds-scenescrollword__after";
|
|
33
|
+
readonly description: "dds-scenescrollword__description";
|
|
34
|
+
readonly action: "dds-scenescrollword__action";
|
|
35
|
+
};
|
|
36
|
+
/** Generated so defaults cannot drift from the contract. */
|
|
37
|
+
export declare const sceneScrollWordDefaults: {
|
|
38
|
+
readonly headingLevel: "h2";
|
|
39
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// GENERATED from scene-scroll-word.contract.json. Do not edit.
|
|
2
|
+
/** The class each part carries. Apply these — do not retype them. */
|
|
3
|
+
export const sceneScrollWordParts = {
|
|
4
|
+
root: 'dds-scenescrollword',
|
|
5
|
+
stage: 'dds-scenescrollword__stage',
|
|
6
|
+
scene: 'dds-scenescrollword__scene',
|
|
7
|
+
media: 'dds-scenescrollword__media',
|
|
8
|
+
image: 'dds-scenescrollword__image',
|
|
9
|
+
content: 'dds-scenescrollword__content',
|
|
10
|
+
title: 'dds-scenescrollword__title',
|
|
11
|
+
before: 'dds-scenescrollword__before',
|
|
12
|
+
word: 'dds-scenescrollword__word',
|
|
13
|
+
after: 'dds-scenescrollword__after',
|
|
14
|
+
description: 'dds-scenescrollword__description',
|
|
15
|
+
action: 'dds-scenescrollword__action',
|
|
16
|
+
};
|
|
17
|
+
/** Generated so defaults cannot drift from the contract. */
|
|
18
|
+
export const sceneScrollWordDefaults = { headingLevel: 'h2' };
|
|
@@ -0,0 +1,370 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Scoped to this package, like the generated sheet beside it.
|
|
3
|
+
*
|
|
4
|
+
* `:where([data-dds-context="marketing"])` confines these rules without contributing specificity,
|
|
5
|
+
* so each is decided against the generated rule on its own terms.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/*
|
|
9
|
+
* Each scene is a screen tall, the photograph behind and the words over it.
|
|
10
|
+
*
|
|
11
|
+
* This is the whole of the layout wherever the scroll does not drive the change-over — a browser
|
|
12
|
+
* with no scroll timeline, a reader who asked for less motion, the page before any script: two
|
|
13
|
+
* scenes one after the other, each its own screen, every word at full strength and nothing pinned.
|
|
14
|
+
* The rules further down only add the track, the pin and the dissolve on top of it.
|
|
15
|
+
*
|
|
16
|
+
* `100cqh` rather than `100svh`, LandingHero's reason: with no ancestor declaring size containment
|
|
17
|
+
* a container query length falls back to the small viewport, so on a real page the two are the same
|
|
18
|
+
* number — the small viewport, measured with the browser's chrome showing, so a phone's address bar
|
|
19
|
+
* coming and going never resizes the scene mid-scroll as `vh` would. What the container unit adds
|
|
20
|
+
* is a frame standing in for a window: the preview's frame declares `container-type: size`, and the
|
|
21
|
+
* scene measures against that rather than escaping it. The section's own `container-type` is
|
|
22
|
+
* `inline-size`, which answers no question about height, so the unit passes straight through it.
|
|
23
|
+
* A screen is a length no token holds, which is why it is written here.
|
|
24
|
+
*
|
|
25
|
+
* `min-block-size`, so a scene whose words run long grows rather than clipping them.
|
|
26
|
+
*/
|
|
27
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword .dds-scenescrollword__scene {
|
|
28
|
+
min-block-size: 100cqh;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/*
|
|
32
|
+
* The photograph fills its scene, edge to edge, cropped to fill — the scene is a shape the screen
|
|
33
|
+
* decided, and a photograph letterboxed in it would show the band through the gaps.
|
|
34
|
+
*
|
|
35
|
+
* Stacking order inside the scene, which `isolation` on the scene keeps to itself: the photograph
|
|
36
|
+
* at the back, the words over it. An integer with no unit, which is why it is here.
|
|
37
|
+
*/
|
|
38
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword .dds-scenescrollword__media {
|
|
39
|
+
inset: 0;
|
|
40
|
+
z-index: 0;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword .dds-scenescrollword__image {
|
|
44
|
+
block-size: 100%;
|
|
45
|
+
inline-size: 100%;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword .dds-scenescrollword__content {
|
|
49
|
+
z-index: 1;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/*
|
|
53
|
+
* The words sit straight on the photograph, in the ink the scene names.
|
|
54
|
+
*
|
|
55
|
+
* No scrim: the photograph is shown as it was taken, and the words are drawn in whichever ink it
|
|
56
|
+
* leaves room for — color.fg.on-media-light, near-black in both modes, over a light photograph such
|
|
57
|
+
* as a daylight sky, and the section's own color.fg.on-brand-strong, white, over a dark one. The
|
|
58
|
+
* photograph does not change with the theme, so neither ink does. The block cannot see the
|
|
59
|
+
* photograph, so the scene says which, and the author answers for the contrast.
|
|
60
|
+
*
|
|
61
|
+
* On the scene, so its title and its line take it together, and inherited through the scene even
|
|
62
|
+
* where the scroll lays the scenes out as `display: contents`.
|
|
63
|
+
*/
|
|
64
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword .dds-scenescrollword__scene[data-ink="dark"] {
|
|
65
|
+
color: var(--color-fg-on-media-light);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/*
|
|
69
|
+
* A title with nothing under it carries no step under it.
|
|
70
|
+
*/
|
|
71
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword .dds-scenescrollword__title:last-child {
|
|
72
|
+
margin-block-end: 0;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/*
|
|
76
|
+
* Where the words sit, the reference design's arrangement.
|
|
77
|
+
*
|
|
78
|
+
* Below 62rem — the reference's 992px, the same bound FeatureCards takes from it — the words are at
|
|
79
|
+
* the top of the stage and start at the edge, under the room a navigation bar takes: size.bar-height
|
|
80
|
+
* and the section's own step over it, about the reference's 112. From 62rem they are centred down
|
|
81
|
+
* the stage and still start at the edge, in a column capped at the heading group's measure: the
|
|
82
|
+
* reference design's later arrangement, which leaves the far side of the photograph to its subject
|
|
83
|
+
* rather than writing over the middle of it. On either side of the bound the words start, so the
|
|
84
|
+
* eye finds the same edge on every line and a photograph composed for one width holds at the other.
|
|
85
|
+
*
|
|
86
|
+
* Longhand because `var()` is not permitted in a container query condition; `61.9375rem` is the last
|
|
87
|
+
* width below that bound. The section declares the container, and these are rules on what is inside
|
|
88
|
+
* it, which is the only thing a container query can style.
|
|
89
|
+
*/
|
|
90
|
+
@container (max-width: 61.9375rem) {
|
|
91
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword .dds-scenescrollword__scene {
|
|
92
|
+
justify-content: flex-start;
|
|
93
|
+
padding-block-start: calc(var(--size-bar-height) + var(--space-section-default));
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/*
|
|
98
|
+
* The words keep to the page's content column.
|
|
99
|
+
*
|
|
100
|
+
* They start, from 62rem as below it, so on a wide window they would otherwise sit at the page's
|
|
101
|
+
* gutter while every section around them starts at the edge of size.content.max. The photograph
|
|
102
|
+
* still fills the band edge to edge; only the words and the action are inset, by the page's gutter or
|
|
103
|
+
* by however much the window is wider than the content column on each side, whichever is more —
|
|
104
|
+
* where the column starts in ImageBanner, FeatureCards and the rest.
|
|
105
|
+
*
|
|
106
|
+
* Named once on the section, because three boxes take it: each scene and the action in the plain
|
|
107
|
+
* fallback, and the stage, which carries the insets while the scroll drives the change-over.
|
|
108
|
+
*/
|
|
109
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword {
|
|
110
|
+
--dds-scenescrollword-column-inset: max(var(--space-inset-page), calc((100% - var(--size-content-max)) / 2));
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword .dds-scenescrollword__scene,
|
|
114
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword .dds-scenescrollword__action {
|
|
115
|
+
padding-inline: var(--dds-scenescrollword-column-inset);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/*
|
|
119
|
+
* The photographs are anchored at their foot, as the reference's are, so a crop takes from the sky
|
|
120
|
+
* rather than from the ground the scene stands on.
|
|
121
|
+
*/
|
|
122
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword .dds-scenescrollword__image {
|
|
123
|
+
object-position: bottom;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/*
|
|
127
|
+
* The change-over, scrubbed by the scroll.
|
|
128
|
+
*
|
|
129
|
+
* The section becomes the track: two and a half screens tall, `250cqh` (the small viewport on a
|
|
130
|
+
* real page, for the reason above). The stage pins to the top of the window for the length of it,
|
|
131
|
+
* a screen tall, with both scenes stacked in its one cell, the second over the first. That leaves a
|
|
132
|
+
* screen and a half of scrolling while the stage holds still, which is the reference design's
|
|
133
|
+
* 250vh track and its 150vh of travel, without `vh`.
|
|
134
|
+
*
|
|
135
|
+
* The section names a view timeline, and the second photograph dissolves in down it from 20% to
|
|
136
|
+
* 80% of `contain` — the stretch in which the track covers the whole window, which
|
|
137
|
+
* is exactly the stretch the stage is pinned for. The words run down the same timeline, and how is
|
|
138
|
+
* set out with them at the end of this file.
|
|
139
|
+
*
|
|
140
|
+
* The photograph takes the whole stretch, so the place changes under the words while they do. A fifth of the stretch is held still at each end, so a reader arriving sees
|
|
141
|
+
* the first scene settled and one leaving sees the second. The reference ran the change over the
|
|
142
|
+
* middle third of the section's whole pass; this is the same middle, measured on the pin.
|
|
143
|
+
*
|
|
144
|
+
* Linear, because the scroll is the easing. Only one end of each fade is written — the other is
|
|
145
|
+
* the element's own resting opacity — so nothing here restates full strength as a number, and
|
|
146
|
+
* opacity.hidden is the role for what a reveal fades from.
|
|
147
|
+
*
|
|
148
|
+
* Only for a reader who has not asked for less motion, and only where a scroll timeline exists —
|
|
149
|
+
* asked around the rules rather than undone after them, because an undoing reset that loses to a
|
|
150
|
+
* more specific rule leaves the movement running for exactly the reader who asked it not to. Both
|
|
151
|
+
* conditions false is the layout at the top of this file: two scenes, one after the other.
|
|
152
|
+
*
|
|
153
|
+
* The timeline and the pin both measure against the nearest scroll container, which is why nothing
|
|
154
|
+
* between the section and the page may clip with `overflow: hidden`: `hidden` makes a box a scroll
|
|
155
|
+
* container even when it never scrolls, which freezes the dissolve and unpins the stage. The stage
|
|
156
|
+
* clips with `overflow: clip`, which does neither.
|
|
157
|
+
*/
|
|
158
|
+
@keyframes dds-scenescrollword-arrive {
|
|
159
|
+
from {
|
|
160
|
+
opacity: var(--opacity-hidden);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
@keyframes dds-scenescrollword-leave {
|
|
165
|
+
to {
|
|
166
|
+
opacity: var(--opacity-hidden);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
@supports (animation-timeline: view()) {
|
|
171
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
172
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword {
|
|
173
|
+
block-size: 250cqh;
|
|
174
|
+
view-timeline: --dds-scenescrollword-track block;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword .dds-scenescrollword__stage {
|
|
178
|
+
inset-block-start: 0;
|
|
179
|
+
min-block-size: 100cqh;
|
|
180
|
+
overflow: clip;
|
|
181
|
+
position: sticky;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword .dds-scenescrollword__scene[data-scene="second"] .dds-scenescrollword__media {
|
|
185
|
+
animation: dds-scenescrollword-arrive linear both;
|
|
186
|
+
animation-range: contain 20% contain 80%;
|
|
187
|
+
animation-timeline: --dds-scenescrollword-track;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/*
|
|
193
|
+
* The action sits right under the words, whichever scene's words are showing.
|
|
194
|
+
*
|
|
195
|
+
* It belongs to the section rather than to a scene, so it does not fade with either. While the
|
|
196
|
+
* scenes change over, both scenes' words are laid into one grid area of the stage — the scenes
|
|
197
|
+
* themselves step out of the way (`display: contents`), so their photographs and their words become
|
|
198
|
+
* the stage's own items — and that area is as tall as the taller of the two. The action is the row
|
|
199
|
+
* under it, at space.heading.description-actions, the step from words to what a reader can do: under
|
|
200
|
+
* the text on every screen, and still while the text changes over it.
|
|
201
|
+
*
|
|
202
|
+
* Below 62rem the words and the action sit at the top of the stage, under the room a navigation bar
|
|
203
|
+
* takes; from 62rem they are centred down the stage, the empty rows above and below sharing what is
|
|
204
|
+
* left, and start at the edge with the words on both sides of the bound. The stage carries the section's insets here, since the scenes that held them are contents.
|
|
205
|
+
*
|
|
206
|
+
* In the plain fallback, where the scenes stack, the action is the stage's last row, under the second
|
|
207
|
+
* scene, on the band's own ground, with its own insets.
|
|
208
|
+
*/
|
|
209
|
+
@supports (animation-timeline: view()) {
|
|
210
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
211
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword .dds-scenescrollword__stage {
|
|
212
|
+
grid-template-areas:
|
|
213
|
+
'words'
|
|
214
|
+
'action'
|
|
215
|
+
'.';
|
|
216
|
+
grid-template-columns: minmax(0, 1fr);
|
|
217
|
+
grid-template-rows: auto auto 1fr;
|
|
218
|
+
padding-block: calc(var(--size-bar-height) + var(--space-section-default)) var(--space-section-default);
|
|
219
|
+
padding-inline: var(--dds-scenescrollword-column-inset);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword .dds-scenescrollword__scene {
|
|
223
|
+
display: contents;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword .dds-scenescrollword__media {
|
|
227
|
+
inset: 0;
|
|
228
|
+
z-index: 0;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword .dds-scenescrollword__content {
|
|
232
|
+
grid-area: words;
|
|
233
|
+
z-index: 1;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword .dds-scenescrollword__action {
|
|
237
|
+
grid-area: action;
|
|
238
|
+
margin-block-start: var(--space-heading-description-actions);
|
|
239
|
+
padding: 0;
|
|
240
|
+
z-index: 1;
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
@container (min-width: 62rem) {
|
|
246
|
+
@supports (animation-timeline: view()) {
|
|
247
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
248
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword .dds-scenescrollword__stage {
|
|
249
|
+
grid-template-areas:
|
|
250
|
+
'.'
|
|
251
|
+
'words'
|
|
252
|
+
'action'
|
|
253
|
+
'.';
|
|
254
|
+
grid-template-rows: 1fr auto auto 1fr;
|
|
255
|
+
padding-block: var(--space-section-default);
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
/*
|
|
262
|
+
* One claim, one word changed.
|
|
263
|
+
*
|
|
264
|
+
* The word's slot stacks the scene's own word and the other scene's in one cell, so the slot is as
|
|
265
|
+
* wide as the wider of the two and both titles lay out alike — the shared words before and after
|
|
266
|
+
* it in the same places, the words starting at the same point, at every width and in either
|
|
267
|
+
* direction. `start` is the reading side, so in a right-to-left page the words share their right
|
|
268
|
+
* edge. The other scene's word holds its room and is never drawn; it is kept from assistive
|
|
269
|
+
* technology in the markup, since the heading it belongs to is read in full.
|
|
270
|
+
*
|
|
271
|
+
* Wherever the scroll does not drive the change-over this is all there is: two scenes one after
|
|
272
|
+
* the other, each with its whole heading, "Trade all day" and then "Trade all night".
|
|
273
|
+
*/
|
|
274
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword .dds-scenescrollword__word > * {
|
|
275
|
+
grid-area: 1 / 1;
|
|
276
|
+
justify-self: start;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword .dds-scenescrollword__word > [data-word="other"] {
|
|
280
|
+
visibility: hidden;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
/*
|
|
284
|
+
* Under the scroll, the scenes' words do not fade as wholes, as SceneScroll's do. Both headings lie
|
|
285
|
+
* in the one area of the stage, the second exactly over the first, and:
|
|
286
|
+
*
|
|
287
|
+
* the first scene's line fades out from 20% to 45%, as its words did;
|
|
288
|
+
* the first scene's word fades out as the second's fades in, from 45% to 55% — the stretch in
|
|
289
|
+
* which neither line is showing, so nothing but the word is moving;
|
|
290
|
+
* the second scene's line fades in from 55% to 80%.
|
|
291
|
+
*
|
|
292
|
+
* The second heading's shared words, before the word and after it, are never drawn here: the
|
|
293
|
+
* first's hold still over the whole pass, and two copies of the same words crossing would dip at
|
|
294
|
+
* the middle. They keep their opacity rather than their visibility so they stay in the
|
|
295
|
+
* accessibility tree, and the second heading is read whole.
|
|
296
|
+
*
|
|
297
|
+
* The words cross rather than one waiting for the other, because they share a place: a gap where
|
|
298
|
+
* the claim is missing its word reads as a fault, the reference's reason for crossing them in
|
|
299
|
+
* a few hundredths of the pass. A tenth here, slow enough to be seen to change.
|
|
300
|
+
*/
|
|
301
|
+
@supports (animation-timeline: view()) {
|
|
302
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
303
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword .dds-scenescrollword__scene[data-scene="second"] .dds-scenescrollword__before,
|
|
304
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword .dds-scenescrollword__scene[data-scene="second"] .dds-scenescrollword__after {
|
|
305
|
+
opacity: var(--opacity-hidden);
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
/*
|
|
309
|
+
* Where the scenes name different inks the shared words cannot hold still in the first scene's:
|
|
310
|
+
* near-black words would be left on a night photograph. So they cross with the word instead,
|
|
311
|
+
* the first scene's out as the second's come in, over the same tenth of the pass — the same
|
|
312
|
+
* words in the same place, so what is seen is the claim changing colour as one piece.
|
|
313
|
+
*
|
|
314
|
+
* The second scene's are given back their resting strength first: the rule above leaves them
|
|
315
|
+
* undrawn, and an arrival comes up to whatever the element rests at.
|
|
316
|
+
*/
|
|
317
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword[data-ink-change] .dds-scenescrollword__scene[data-scene="first"] :is(.dds-scenescrollword__before, .dds-scenescrollword__after) {
|
|
318
|
+
animation: dds-scenescrollword-leave linear both;
|
|
319
|
+
animation-range: contain 45% contain 55%;
|
|
320
|
+
animation-timeline: --dds-scenescrollword-track;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword[data-ink-change] .dds-scenescrollword__scene[data-scene="second"] :is(.dds-scenescrollword__before, .dds-scenescrollword__after) {
|
|
324
|
+
animation: dds-scenescrollword-arrive linear both;
|
|
325
|
+
animation-range: contain 45% contain 55%;
|
|
326
|
+
animation-timeline: --dds-scenescrollword-track;
|
|
327
|
+
opacity: initial;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword .dds-scenescrollword__scene[data-scene="first"] .dds-scenescrollword__description {
|
|
331
|
+
animation: dds-scenescrollword-leave linear both;
|
|
332
|
+
animation-range: contain 20% contain 45%;
|
|
333
|
+
animation-timeline: --dds-scenescrollword-track;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword .dds-scenescrollword__scene[data-scene="first"] .dds-scenescrollword__word {
|
|
337
|
+
animation: dds-scenescrollword-leave linear both;
|
|
338
|
+
animation-range: contain 45% contain 55%;
|
|
339
|
+
animation-timeline: --dds-scenescrollword-track;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword .dds-scenescrollword__scene[data-scene="second"] .dds-scenescrollword__word {
|
|
343
|
+
animation: dds-scenescrollword-arrive linear both;
|
|
344
|
+
animation-range: contain 45% contain 55%;
|
|
345
|
+
animation-timeline: --dds-scenescrollword-track;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword .dds-scenescrollword__scene[data-scene="second"] .dds-scenescrollword__description {
|
|
349
|
+
animation: dds-scenescrollword-arrive linear both;
|
|
350
|
+
animation-range: contain 55% contain 80%;
|
|
351
|
+
animation-timeline: --dds-scenescrollword-track;
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
/*
|
|
357
|
+
* From 62rem the words keep to half the stage.
|
|
358
|
+
*
|
|
359
|
+
* The words start at the edge and the photograph's subject is on the far side, but the heading
|
|
360
|
+
* group's measure alone is most of a laptop's width: a title in a few words ran three quarters of
|
|
361
|
+
* the way across and over the face it was meant to sit beside. Held to half the stage, or the
|
|
362
|
+
* heading group's measure where that is narrower, the title wraps in the words' own half and the
|
|
363
|
+
* other half is the subject's — the reference design's left column. Below 62rem the words run the
|
|
364
|
+
* width, at the top of a photograph whose subject is below them.
|
|
365
|
+
*/
|
|
366
|
+
@container (min-width: 62rem) {
|
|
367
|
+
:where([data-dds-context="marketing"]) .dds-scenescrollword .dds-scenescrollword__content {
|
|
368
|
+
max-inline-size: min(var(--size-heading-group-max), 50%);
|
|
369
|
+
}
|
|
370
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import './Stats.css';
|
|
2
2
|
import './stats-impl.css';
|
|
3
3
|
import '../block-reveal.css';
|
|
4
|
+
import '../block-pattern.css';
|
|
4
5
|
import { type StatsProps } from './Stats.types.js';
|
|
5
6
|
export type { StatsProps };
|
|
6
7
|
/**
|
|
@@ -21,4 +22,4 @@ export type { StatsProps };
|
|
|
21
22
|
*
|
|
22
23
|
* `'use client'` for the count, the arrival, and `useId`, which names the region by its heading.
|
|
23
24
|
*/
|
|
24
|
-
export declare function Stats({ ground, title, description, stats }: StatsProps): import("react").JSX.Element | null;
|
|
25
|
+
export declare function Stats({ ground, background, title, description, stats, }: StatsProps): import("react").JSX.Element | null;
|