@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,76 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Scoped to this package, like the generated sheet beside it.
|
|
3
|
+
*
|
|
4
|
+
* `motion="resolve"`: the ring spins open, closes, and the tick draws in, once. `data-arrival` is
|
|
5
|
+
* the mark's own answer from useArrival (arrival.ts): `waiting` holds the first frame — an open arc,
|
|
6
|
+
* no tick — `playing` runs it, and no attribute — a server, a reader who asked for less movement —
|
|
7
|
+
* is the finished mark. Both strokes measure one (`pathLength`), so these fractions hold at any size.
|
|
8
|
+
*
|
|
9
|
+
* two turns of motion.duration.spinner on its linear easing — the Spinner's own turn — as a short
|
|
10
|
+
* arc, the way a Spinner reads;
|
|
11
|
+
* the arc closes round over motion.duration.shift;
|
|
12
|
+
* the tick draws in over motion.duration.slow.
|
|
13
|
+
*
|
|
14
|
+
* The svg turns rather than the ring, so the arc and its closing are one stroke that stops turning
|
|
15
|
+
* at the top. A vector stroke scales with the drawing; this one keeps border.width.strong.
|
|
16
|
+
*/
|
|
17
|
+
:where([data-dds-context="marketing"]) .dds-illustrationcheck svg {
|
|
18
|
+
display: block;
|
|
19
|
+
overflow: visible;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
:where([data-dds-context="marketing"]) .dds-illustrationcheck :is(.dds-illustrationcheck__ring, .dds-illustrationcheck__tick) {
|
|
23
|
+
vector-effect: non-scaling-stroke;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@keyframes dds-illustrationcheck-spin {
|
|
27
|
+
to {
|
|
28
|
+
rotate: 1turn;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@keyframes dds-illustrationcheck-close {
|
|
33
|
+
from {
|
|
34
|
+
stroke-dasharray: 0.28 1;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
to {
|
|
38
|
+
stroke-dasharray: 1 0;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@keyframes dds-illustrationcheck-draw {
|
|
43
|
+
from {
|
|
44
|
+
stroke-dasharray: 1;
|
|
45
|
+
stroke-dashoffset: 1;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
to {
|
|
49
|
+
stroke-dasharray: 1;
|
|
50
|
+
stroke-dashoffset: 0;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
:where([data-dds-context="marketing"]) .dds-illustrationcheck[data-motion='resolve'][data-arrival] svg {
|
|
55
|
+
animation: dds-illustrationcheck-spin var(--motion-duration-spinner) var(--motion-easing-spinner) 2;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
:where([data-dds-context="marketing"]) .dds-illustrationcheck[data-motion='resolve'][data-arrival] .dds-illustrationcheck__ring {
|
|
59
|
+
animation: dds-illustrationcheck-close var(--motion-duration-shift) var(--motion-easing-reveal)
|
|
60
|
+
calc(2 * var(--motion-duration-spinner)) both;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
:where([data-dds-context="marketing"]) .dds-illustrationcheck[data-motion='resolve'][data-arrival] .dds-illustrationcheck__tick {
|
|
64
|
+
animation: dds-illustrationcheck-draw var(--motion-duration-slow) var(--motion-easing-reveal)
|
|
65
|
+
calc(2 * var(--motion-duration-spinner) + var(--motion-duration-shift)) both;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
:where([data-dds-context="marketing"]) .dds-illustrationcheck[data-motion='resolve'][data-arrival='waiting'] :is(svg, .dds-illustrationcheck__ring, .dds-illustrationcheck__tick) {
|
|
69
|
+
animation-play-state: paused !important;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
@media (prefers-reduced-motion: reduce) {
|
|
73
|
+
:where([data-dds-context="marketing"]) .dds-illustrationcheck[data-motion='resolve'][data-arrival] :is(svg, .dds-illustrationcheck__ring, .dds-illustrationcheck__tick) {
|
|
74
|
+
animation: none;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/* GENERATED from illustrationchoice.contract.json. Do not edit. */
|
|
2
|
+
|
|
3
|
+
:where([data-dds-context="marketing"]) .dds-illustrationchoice {
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
display: grid;
|
|
6
|
+
inline-size: 100%;
|
|
7
|
+
position: relative;
|
|
8
|
+
row-gap: var(--space-gap-sm);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
:where([data-dds-context="marketing"]) .dds-illustrationchoice .dds-illustrationchoice__option {
|
|
12
|
+
align-items: center;
|
|
13
|
+
display: grid;
|
|
14
|
+
background-color: var(--color-bg-subtle);
|
|
15
|
+
border-radius: var(--radius-control-md);
|
|
16
|
+
color: var(--color-fg-default);
|
|
17
|
+
column-gap: var(--space-gap-sm);
|
|
18
|
+
padding-block: var(--space-inset-sm);
|
|
19
|
+
padding-inline: var(--space-inset-md);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
:where([data-dds-context="marketing"]) .dds-illustrationchoice .dds-illustrationchoice__radio {
|
|
23
|
+
border-style: solid;
|
|
24
|
+
display: grid;
|
|
25
|
+
flex-shrink: 0;
|
|
26
|
+
place-items: center;
|
|
27
|
+
border-radius: var(--radius-pill);
|
|
28
|
+
border-width: var(--border-width-emphasis);
|
|
29
|
+
height: var(--icon-size-sm);
|
|
30
|
+
width: var(--icon-size-sm);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
:where([data-dds-context="marketing"]) .dds-illustrationchoice .dds-illustrationchoice__dot {
|
|
34
|
+
display: block;
|
|
35
|
+
border-radius: var(--radius-pill);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
:where([data-dds-context="marketing"]) .dds-illustrationchoice .dds-illustrationchoice__outline {
|
|
39
|
+
border-style: solid;
|
|
40
|
+
pointer-events: none;
|
|
41
|
+
border-color: var(--color-border-info);
|
|
42
|
+
border-radius: var(--radius-control-md);
|
|
43
|
+
border-width: var(--border-width-emphasis);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
:where([data-dds-context="marketing"]) .dds-illustrationchoice .dds-illustrationchoice__description {
|
|
47
|
+
color: var(--color-fg-muted);
|
|
48
|
+
font-family: var(--font-body-sm-family);
|
|
49
|
+
font-size: var(--font-body-sm-size);
|
|
50
|
+
font-weight: var(--font-body-sm-weight);
|
|
51
|
+
letter-spacing: var(--font-body-sm-letter-spacing);
|
|
52
|
+
line-height: var(--font-body-sm-line-height);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
:where([data-dds-context="marketing"]) .dds-illustrationchoice .dds-illustrationchoice__label {
|
|
56
|
+
font-family: var(--font-label-md-family);
|
|
57
|
+
font-size: var(--font-label-md-size);
|
|
58
|
+
font-weight: var(--font-label-md-weight);
|
|
59
|
+
letter-spacing: var(--font-label-md-letter-spacing);
|
|
60
|
+
line-height: var(--font-label-md-line-height);
|
|
61
|
+
}
|
|
62
|
+
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import './IllustrationChoice.css';
|
|
2
|
+
import './illustration-choice-impl.css';
|
|
3
|
+
import { type IllustrationChoiceProps } from './IllustrationChoice.types.js';
|
|
4
|
+
export type { IllustrationChoiceProps };
|
|
5
|
+
/**
|
|
6
|
+
* A drawn set of options with one picked — a picture of the product making a choice, never a
|
|
7
|
+
* control.
|
|
8
|
+
*
|
|
9
|
+
* The outline is a grid item laid in the picked option's row, so the stylesheet places it without
|
|
10
|
+
* measuring anything. Picking on arrival, it starts a row away — the option after the picked one,
|
|
11
|
+
* or the one before where the picked one is last — and slides; which way is handed to the
|
|
12
|
+
* stylesheet as a sign, with the row it starts on marked so its circle can empty as it leaves.
|
|
13
|
+
*
|
|
14
|
+
* No script of its own: a choice that picks on arrival is wrapped to take one (arrives.tsx).
|
|
15
|
+
*/
|
|
16
|
+
export declare function IllustrationChoice({ options, value, motion, label, ...rest }: IllustrationChoiceProps): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import './IllustrationChoice.css';
|
|
3
|
+
import './illustration-choice-impl.css';
|
|
4
|
+
import { Arrives } from '../../arrives.js';
|
|
5
|
+
import { given } from '../../given.js';
|
|
6
|
+
import { illustrationChoiceParts, } from './IllustrationChoice.types.js';
|
|
7
|
+
/**
|
|
8
|
+
* A drawn set of options with one picked — a picture of the product making a choice, never a
|
|
9
|
+
* control.
|
|
10
|
+
*
|
|
11
|
+
* The outline is a grid item laid in the picked option's row, so the stylesheet places it without
|
|
12
|
+
* measuring anything. Picking on arrival, it starts a row away — the option after the picked one,
|
|
13
|
+
* or the one before where the picked one is last — and slides; which way is handed to the
|
|
14
|
+
* stylesheet as a sign, with the row it starts on marked so its circle can empty as it leaves.
|
|
15
|
+
*
|
|
16
|
+
* No script of its own: a choice that picks on arrival is wrapped to take one (arrives.tsx).
|
|
17
|
+
*/
|
|
18
|
+
export function IllustrationChoice({ options, value, motion, label, ...rest }) {
|
|
19
|
+
// A record from a feed or an editor is not typed: a missing list draws nothing rather than
|
|
20
|
+
// taking the page down.
|
|
21
|
+
if (!Array.isArray(options) || options.length === 0)
|
|
22
|
+
return null;
|
|
23
|
+
const picked = Math.max(0, options.findIndex((option) => option.value === value));
|
|
24
|
+
// Where the outline starts when it picks: the next option, or the one before if the pick is last.
|
|
25
|
+
const start = picked < options.length - 1 ? picked + 1 : picked - 1;
|
|
26
|
+
// A lone option has no other to start from, so it is drawn picked and still.
|
|
27
|
+
const moves = motion !== undefined && options.length > 1;
|
|
28
|
+
const named = given(label);
|
|
29
|
+
const choice = (_jsxs("div", { ...rest, className: illustrationChoiceParts.root, "data-motion": moves ? motion : undefined, role: named ? 'img' : undefined, "aria-label": named ? label : undefined, style: { '--dds-illustrationchoice-from': start - picked }, children: [options.map((option, at) => (_jsxs("div", { className: illustrationChoiceParts.option, "data-picked": at === picked ? '' : undefined, "data-start": moves && at === start ? '' : undefined, style: { gridRow: at + 1 }, children: [_jsx("span", { className: illustrationChoiceParts.radio, style: { gridRow: given(option.description) ? 'span 2' : undefined }, children: _jsx("span", { className: illustrationChoiceParts.dot }) }), _jsx("span", { className: illustrationChoiceParts.label, children: option.label }), given(option.description) ? (_jsx("span", { className: illustrationChoiceParts.description, children: option.description })) : null] }, option.value))), _jsx("span", { className: illustrationChoiceParts.outline, "aria-hidden": "true", style: { gridRow: picked + 1 } })] }));
|
|
30
|
+
return moves ? _jsx(Arrives, { children: choice }) : choice;
|
|
31
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'react';
|
|
2
|
+
import type { IllustrationChoiceOption } from '../../illustration-data.js';
|
|
3
|
+
export interface IllustrationChoiceOwnProps {
|
|
4
|
+
/** Always. Two to four options, each a name in a few words and a line under it where it needs one */
|
|
5
|
+
options: IllustrationChoiceOption[];
|
|
6
|
+
/** Always. The `value` of the option shown picked */
|
|
7
|
+
value: string;
|
|
8
|
+
/**
|
|
9
|
+
* `pick` — The outline starts on a neighbouring option and slides to the picked one, whose circle then fills — the product making the choice
|
|
10
|
+
*/
|
|
11
|
+
motion?: 'pick';
|
|
12
|
+
/** Where the picture stands on its own and its options say less than a sentence would — "Choosing an account: the demo account". It names the whole as one image */
|
|
13
|
+
label?: string;
|
|
14
|
+
}
|
|
15
|
+
export type IllustrationChoiceProps = IllustrationChoiceOwnProps & Omit<HTMLAttributes<HTMLDivElement>, 'className' | 'options' | 'value' | 'motion' | 'label'>;
|
|
16
|
+
/** The class each part carries. Apply these — do not retype them. */
|
|
17
|
+
export declare const illustrationChoiceParts: {
|
|
18
|
+
readonly root: "dds-illustrationchoice";
|
|
19
|
+
readonly option: "dds-illustrationchoice__option";
|
|
20
|
+
readonly radio: "dds-illustrationchoice__radio";
|
|
21
|
+
readonly dot: "dds-illustrationchoice__dot";
|
|
22
|
+
readonly label: "dds-illustrationchoice__label";
|
|
23
|
+
readonly description: "dds-illustrationchoice__description";
|
|
24
|
+
readonly outline: "dds-illustrationchoice__outline";
|
|
25
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// GENERATED from illustration-choice.contract.json. Do not edit.
|
|
2
|
+
/** The class each part carries. Apply these — do not retype them. */
|
|
3
|
+
export const illustrationChoiceParts = {
|
|
4
|
+
root: 'dds-illustrationchoice',
|
|
5
|
+
option: 'dds-illustrationchoice__option',
|
|
6
|
+
radio: 'dds-illustrationchoice__radio',
|
|
7
|
+
dot: 'dds-illustrationchoice__dot',
|
|
8
|
+
label: 'dds-illustrationchoice__label',
|
|
9
|
+
description: 'dds-illustrationchoice__description',
|
|
10
|
+
outline: 'dds-illustrationchoice__outline',
|
|
11
|
+
};
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Scoped to this package, like the generated sheet beside it.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/* Grid structure the contract's static CSS cannot hold: one column of options, and each option's circle beside its words. */
|
|
6
|
+
:where([data-dds-context="marketing"]) .dds-illustrationchoice {
|
|
7
|
+
grid-template-columns: minmax(0, 1fr);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
:where([data-dds-context="marketing"]) .dds-illustrationchoice .dds-illustrationchoice__option {
|
|
11
|
+
grid-template-columns: auto minmax(0, 1fr);
|
|
12
|
+
grid-column: 1;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
:where([data-dds-context="marketing"]) .dds-illustrationchoice .dds-illustrationchoice__label {
|
|
16
|
+
grid-column: 2;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
:where([data-dds-context="marketing"]) .dds-illustrationchoice .dds-illustrationchoice__description {
|
|
20
|
+
grid-column: 2;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
:where([data-dds-context="marketing"]) .dds-illustrationchoice .dds-illustrationchoice__outline {
|
|
24
|
+
grid-column: 1;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/*
|
|
28
|
+
* The dot fills its circle with a margin of a quarter of it, and only on the picked option.
|
|
29
|
+
*/
|
|
30
|
+
:where([data-dds-context="marketing"]) .dds-illustrationchoice .dds-illustrationchoice__dot {
|
|
31
|
+
background-color: currentColor;
|
|
32
|
+
block-size: 50%;
|
|
33
|
+
inline-size: 50%;
|
|
34
|
+
scale: 0;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
:where([data-dds-context="marketing"]) .dds-illustrationchoice .dds-illustrationchoice__option[data-picked] .dds-illustrationchoice__dot {
|
|
38
|
+
scale: 1;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/* The outline covers its row exactly, over the option it marks. */
|
|
42
|
+
:where([data-dds-context="marketing"]) .dds-illustrationchoice .dds-illustrationchoice__outline {
|
|
43
|
+
align-self: stretch;
|
|
44
|
+
justify-self: stretch;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/*
|
|
48
|
+
* `motion="pick"`: the outline starts a row away — `--dds-illustrationchoice-from` rows, a sign —
|
|
49
|
+
* holds for motion.duration.hold with that row's circle still filled, then slides to the picked
|
|
50
|
+
* option over motion.duration.shift as the circle it left empties; the picked circle pops full over
|
|
51
|
+
* motion.duration.slow once it has arrived. `data-arrival` is the choice's own answer from
|
|
52
|
+
* useArrival (arrival.ts): `waiting` holds the first frame, `playing` runs it, and no attribute —
|
|
53
|
+
* a server, a reader who asked for less movement — is the choice as made. A row's height plus the
|
|
54
|
+
* gap is how far one row away is.
|
|
55
|
+
*/
|
|
56
|
+
@keyframes dds-illustrationchoice-slide {
|
|
57
|
+
from {
|
|
58
|
+
translate: 0 calc(var(--dds-illustrationchoice-from) * (100% + var(--space-gap-sm)));
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
@keyframes dds-illustrationchoice-leave {
|
|
63
|
+
from {
|
|
64
|
+
scale: 1;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
to {
|
|
68
|
+
scale: 0;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
@keyframes dds-illustrationchoice-fill {
|
|
73
|
+
0% {
|
|
74
|
+
scale: 0;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
70% {
|
|
78
|
+
scale: 1.2;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
:where([data-dds-context="marketing"]) .dds-illustrationchoice[data-motion='pick'][data-arrival] .dds-illustrationchoice__outline {
|
|
83
|
+
animation: dds-illustrationchoice-slide var(--motion-duration-shift) var(--motion-easing-shift) var(--motion-duration-hold) both;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
:where([data-dds-context="marketing"]) .dds-illustrationchoice[data-motion='pick'][data-arrival] .dds-illustrationchoice__option[data-start] .dds-illustrationchoice__dot {
|
|
87
|
+
animation: dds-illustrationchoice-leave var(--motion-duration-hold) steps(1, end) both;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
:where([data-dds-context="marketing"]) .dds-illustrationchoice[data-motion='pick'][data-arrival] .dds-illustrationchoice__option[data-picked] .dds-illustrationchoice__dot {
|
|
91
|
+
animation: dds-illustrationchoice-fill var(--motion-duration-slow) var(--motion-easing-reveal)
|
|
92
|
+
calc(var(--motion-duration-hold) + var(--motion-duration-shift)) both;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
:where([data-dds-context="marketing"]) .dds-illustrationchoice[data-motion='pick'][data-arrival='waiting'] :is(.dds-illustrationchoice__outline, .dds-illustrationchoice__dot) {
|
|
96
|
+
animation-play-state: paused !important;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
@media (prefers-reduced-motion: reduce) {
|
|
100
|
+
:where([data-dds-context="marketing"]) .dds-illustrationchoice[data-motion='pick'][data-arrival] :is(.dds-illustrationchoice__outline, .dds-illustrationchoice__dot) {
|
|
101
|
+
animation: none;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/* GENERATED from illustrationcode.contract.json. Do not edit. */
|
|
2
|
+
|
|
3
|
+
:where([data-dds-context="marketing"]) .dds-illustrationcode {
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
display: grid;
|
|
6
|
+
inline-size: 100%;
|
|
7
|
+
column-gap: var(--space-gap-sm);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
:where([data-dds-context="marketing"]) .dds-illustrationcode .dds-illustrationcode__box {
|
|
11
|
+
border-style: solid;
|
|
12
|
+
box-sizing: border-box;
|
|
13
|
+
display: grid;
|
|
14
|
+
place-items: center;
|
|
15
|
+
border-color: var(--color-border-strong);
|
|
16
|
+
border-radius: var(--radius-control-sm);
|
|
17
|
+
border-width: var(--border-width-emphasis);
|
|
18
|
+
font-family: var(--font-label-md-family);
|
|
19
|
+
font-size: var(--font-label-md-size);
|
|
20
|
+
font-weight: var(--font-label-md-weight);
|
|
21
|
+
letter-spacing: var(--font-label-md-letter-spacing);
|
|
22
|
+
line-height: var(--font-label-md-line-height);
|
|
23
|
+
padding-block: var(--space-inset-xs);
|
|
24
|
+
}
|
|
25
|
+
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import './IllustrationCode.css';
|
|
2
|
+
import './illustration-code-impl.css';
|
|
3
|
+
import { type IllustrationCodeProps } from './IllustrationCode.types.js';
|
|
4
|
+
export type { IllustrationCodeProps };
|
|
5
|
+
/**
|
|
6
|
+
* A drawn row of code boxes — a picture of the product asking for a code, never a field.
|
|
7
|
+
*
|
|
8
|
+
* A filled box holds a dot rather than a digit: a picture should never show a code. Each box carries
|
|
9
|
+
* its place in the row for the stylesheet, so the boxes can fill one after another on arrival. No
|
|
10
|
+
* script of its own: a row that fills on arrival is wrapped to take one (arrives.tsx).
|
|
11
|
+
*/
|
|
12
|
+
export declare function IllustrationCode({ length, filled, motion, label, ...rest }: IllustrationCodeProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import './IllustrationCode.css';
|
|
3
|
+
import './illustration-code-impl.css';
|
|
4
|
+
import { Arrives } from '../../arrives.js';
|
|
5
|
+
import { given } from '../../given.js';
|
|
6
|
+
import { illustrationCodeDefaults, illustrationCodeParts, } from './IllustrationCode.types.js';
|
|
7
|
+
/**
|
|
8
|
+
* A drawn row of code boxes — a picture of the product asking for a code, never a field.
|
|
9
|
+
*
|
|
10
|
+
* A filled box holds a dot rather than a digit: a picture should never show a code. Each box carries
|
|
11
|
+
* its place in the row for the stylesheet, so the boxes can fill one after another on arrival. No
|
|
12
|
+
* script of its own: a row that fills on arrival is wrapped to take one (arrives.tsx).
|
|
13
|
+
*/
|
|
14
|
+
export function IllustrationCode({ length = illustrationCodeDefaults.length, filled, motion, label, ...rest }) {
|
|
15
|
+
const count = Math.max(1, Math.min(8, Math.round(length)));
|
|
16
|
+
const full = Math.max(0, Math.min(count, filled === undefined ? count : Math.round(filled)));
|
|
17
|
+
const named = given(label);
|
|
18
|
+
const row = (_jsx("div", { ...rest, className: illustrationCodeParts.root, "data-motion": motion, role: named ? 'img' : undefined, "aria-label": named ? label : undefined, "aria-hidden": named ? undefined : true, style: { gridTemplateColumns: `repeat(${count}, minmax(0, 1fr))` }, children: Array.from({ length: count }, (_, at) => (_jsx("span", { className: illustrationCodeParts.box, "data-filled": at < full ? '' : undefined, style: { '--dds-illustrationcode-step': at + 1 }, children: at < full ? '•' : null }, at))) }));
|
|
19
|
+
return motion === undefined ? row : _jsx(Arrives, { children: row });
|
|
20
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'react';
|
|
2
|
+
export interface IllustrationCodeOwnProps {
|
|
3
|
+
/** How many boxes: six, the default, for the usual verification code; four for a short one */
|
|
4
|
+
length?: number;
|
|
5
|
+
/** How many boxes are filled, from the start. Left out, all of them — a code entered */
|
|
6
|
+
filled?: number;
|
|
7
|
+
/**
|
|
8
|
+
* `fill` — The boxes fill one after another, a step of motion.duration.stagger apart
|
|
9
|
+
*/
|
|
10
|
+
motion?: 'fill';
|
|
11
|
+
/** Where the picture stands on its own — "A verification code, entered". It names the row as one image */
|
|
12
|
+
label?: string;
|
|
13
|
+
}
|
|
14
|
+
export type IllustrationCodeProps = IllustrationCodeOwnProps & Omit<HTMLAttributes<HTMLDivElement>, 'className' | 'length' | 'filled' | 'motion' | 'label'>;
|
|
15
|
+
/** The class each part carries. Apply these — do not retype them. */
|
|
16
|
+
export declare const illustrationCodeParts: {
|
|
17
|
+
readonly root: "dds-illustrationcode";
|
|
18
|
+
readonly box: "dds-illustrationcode__box";
|
|
19
|
+
};
|
|
20
|
+
/** Generated so defaults cannot drift from the contract. */
|
|
21
|
+
export declare const illustrationCodeDefaults: {
|
|
22
|
+
readonly length: 6;
|
|
23
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// GENERATED from illustration-code.contract.json. Do not edit.
|
|
2
|
+
/** The class each part carries. Apply these — do not retype them. */
|
|
3
|
+
export const illustrationCodeParts = {
|
|
4
|
+
root: 'dds-illustrationcode',
|
|
5
|
+
box: 'dds-illustrationcode__box',
|
|
6
|
+
};
|
|
7
|
+
/** Generated so defaults cannot drift from the contract. */
|
|
8
|
+
export const illustrationCodeDefaults = { length: 6 };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Scoped to this package, like the generated sheet beside it.
|
|
3
|
+
*
|
|
4
|
+
* A box is a little taller than it is wide, as the product's are; a filled one is outlined in the
|
|
5
|
+
* text's own ink rather than the empty box's quieter edge.
|
|
6
|
+
*/
|
|
7
|
+
:where([data-dds-context="marketing"]) .dds-illustrationcode .dds-illustrationcode__box {
|
|
8
|
+
aspect-ratio: var(--aspect-upright);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
:where([data-dds-context="marketing"]) .dds-illustrationcode .dds-illustrationcode__box[data-filled] {
|
|
12
|
+
border-color: currentColor;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/*
|
|
16
|
+
* `motion="fill"`: each filled box takes its ink and its dot a step of motion.duration.stagger after
|
|
17
|
+
* the one before, settling from a little small over motion.duration.normal. `data-arrival` is the
|
|
18
|
+
* row's own answer from useArrival (arrival.ts): `waiting` holds every box empty, `playing` fills
|
|
19
|
+
* them, and no attribute — a server, a reader who asked for less movement — is the row as filled.
|
|
20
|
+
*/
|
|
21
|
+
@keyframes dds-illustrationcode-fill {
|
|
22
|
+
from {
|
|
23
|
+
border-color: var(--color-border-strong);
|
|
24
|
+
color: transparent;
|
|
25
|
+
scale: 0.85;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
:where([data-dds-context="marketing"]) .dds-illustrationcode[data-motion='fill'][data-arrival] .dds-illustrationcode__box[data-filled] {
|
|
30
|
+
animation: dds-illustrationcode-fill var(--motion-duration-normal) var(--motion-easing-reveal) both;
|
|
31
|
+
animation-delay: calc(var(--dds-illustrationcode-step, 1) * var(--motion-duration-stagger));
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
:where([data-dds-context="marketing"]) .dds-illustrationcode[data-motion='fill'][data-arrival='waiting'] .dds-illustrationcode__box {
|
|
35
|
+
animation-play-state: paused !important;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
@media (prefers-reduced-motion: reduce) {
|
|
39
|
+
:where([data-dds-context="marketing"]) .dds-illustrationcode[data-motion='fill'][data-arrival] .dds-illustrationcode__box {
|
|
40
|
+
animation: none;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/* GENERATED from illustrationlist.contract.json. Do not edit. */
|
|
2
|
+
|
|
3
|
+
:where([data-dds-context="marketing"]) .dds-illustrationlist {
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
inline-size: 100%;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
:where([data-dds-context="marketing"]) .dds-illustrationlist .dds-illustrationlist__row {
|
|
11
|
+
align-items: center;
|
|
12
|
+
border-style: none;
|
|
13
|
+
display: flex;
|
|
14
|
+
border-block-start-width: var(--border-width-hairline);
|
|
15
|
+
border-color: var(--color-border-subtle);
|
|
16
|
+
column-gap: var(--space-gap-sm);
|
|
17
|
+
padding-block: var(--space-inset-xs);
|
|
18
|
+
}
|
|
19
|
+
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import './IllustrationList.css';
|
|
3
|
+
import './illustration-list-impl.css';
|
|
4
|
+
import { type IllustrationListProps } from './IllustrationList.types.js';
|
|
5
|
+
export type { IllustrationListProps };
|
|
6
|
+
/**
|
|
7
|
+
* A drawn list — each child one row, ruled from the row above — for a picture of the product
|
|
8
|
+
* listing things.
|
|
9
|
+
*
|
|
10
|
+
* Each row carries its place in the list for the stylesheet, so the rows can arrive one after
|
|
11
|
+
* another and a glyph in each can pop as its row lands. No script of its own: a list that arrives
|
|
12
|
+
* is wrapped to take one (arrives.tsx).
|
|
13
|
+
*/
|
|
14
|
+
export declare function IllustrationList({ motion, children, ...rest }: IllustrationListProps & {
|
|
15
|
+
children?: ReactNode;
|
|
16
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Children } from 'react';
|
|
3
|
+
import './IllustrationList.css';
|
|
4
|
+
import './illustration-list-impl.css';
|
|
5
|
+
import { Arrives } from '../../arrives.js';
|
|
6
|
+
import { illustrationListParts } from './IllustrationList.types.js';
|
|
7
|
+
/**
|
|
8
|
+
* A drawn list — each child one row, ruled from the row above — for a picture of the product
|
|
9
|
+
* listing things.
|
|
10
|
+
*
|
|
11
|
+
* Each row carries its place in the list for the stylesheet, so the rows can arrive one after
|
|
12
|
+
* another and a glyph in each can pop as its row lands. No script of its own: a list that arrives
|
|
13
|
+
* is wrapped to take one (arrives.tsx).
|
|
14
|
+
*/
|
|
15
|
+
export function IllustrationList({ motion, children, ...rest }) {
|
|
16
|
+
const list = (_jsx("div", { ...rest, className: illustrationListParts.root, "data-motion": motion, children: Children.toArray(children).map((child, at) => (_jsx("div", { className: illustrationListParts.row, style: { '--dds-illustrationlist-step': at }, children: child }, at))) }));
|
|
17
|
+
return motion === undefined ? list : _jsx(Arrives, { children: list });
|
|
18
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export interface IllustrationListOwnProps {
|
|
3
|
+
/**
|
|
4
|
+
* `arrive` — The rows come in one after another, and each glyph pops in as its row lands
|
|
5
|
+
*/
|
|
6
|
+
motion?: 'arrive';
|
|
7
|
+
/** Allowed: any content */
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export type IllustrationListProps = IllustrationListOwnProps & Omit<HTMLAttributes<HTMLDivElement>, 'className' | 'motion'>;
|
|
11
|
+
/** The class each part carries. Apply these — do not retype them. */
|
|
12
|
+
export declare const illustrationListParts: {
|
|
13
|
+
readonly root: "dds-illustrationlist";
|
|
14
|
+
readonly row: "dds-illustrationlist__row";
|
|
15
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Scoped to this package, like the generated sheet beside it.
|
|
3
|
+
*
|
|
4
|
+
* Rows ruled from the row above; the first has nothing above it.
|
|
5
|
+
*/
|
|
6
|
+
:where([data-dds-context="marketing"]) .dds-illustrationlist .dds-illustrationlist__row + .dds-illustrationlist__row {
|
|
7
|
+
border-block-start-style: solid;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/*
|
|
11
|
+
* `motion="arrive"`: each row comes up into place over motion.duration.reveal, a step of
|
|
12
|
+
* motion.duration.stagger behind the row before it, and any glyph in it — an Icon — pops in over
|
|
13
|
+
* motion.duration.shift a step of motion.duration.fast after its row starts. `data-arrival` is the
|
|
14
|
+
* list's own answer from useArrival (arrival.ts): `waiting` holds the first frame, `playing` runs
|
|
15
|
+
* it, and no attribute — a server, a reader who asked for less movement — is the list at rest.
|
|
16
|
+
*/
|
|
17
|
+
@keyframes dds-illustrationlist-arrive {
|
|
18
|
+
from {
|
|
19
|
+
opacity: var(--opacity-hidden);
|
|
20
|
+
translate: 0 var(--space-gap-sm);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@keyframes dds-illustrationlist-pop {
|
|
25
|
+
0% {
|
|
26
|
+
scale: 0.4;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
70% {
|
|
30
|
+
scale: 1.12;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
:where([data-dds-context="marketing"]) .dds-illustrationlist[data-motion='arrive'][data-arrival] .dds-illustrationlist__row {
|
|
35
|
+
animation: dds-illustrationlist-arrive var(--motion-duration-reveal) var(--motion-easing-reveal) both;
|
|
36
|
+
animation-delay: calc(var(--dds-illustrationlist-step, 0) * var(--motion-duration-stagger));
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
:where([data-dds-context="marketing"]) .dds-illustrationlist[data-motion='arrive'][data-arrival] .dds-illustrationlist__row .dds-icon {
|
|
40
|
+
animation: dds-illustrationlist-pop var(--motion-duration-shift) var(--motion-easing-reveal) both;
|
|
41
|
+
animation-delay: calc(var(--dds-illustrationlist-step, 0) * var(--motion-duration-stagger) + var(--motion-duration-fast));
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
:where([data-dds-context="marketing"]) .dds-illustrationlist[data-motion='arrive'][data-arrival='waiting'] :is(.dds-illustrationlist__row, .dds-icon) {
|
|
45
|
+
animation-play-state: paused !important;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@media (prefers-reduced-motion: reduce) {
|
|
49
|
+
:where([data-dds-context="marketing"]) .dds-illustrationlist[data-motion='arrive'][data-arrival] :is(.dds-illustrationlist__row, .dds-icon) {
|
|
50
|
+
animation: none;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -18,6 +18,12 @@
|
|
|
18
18
|
background-color: var(--color-bg-surface);
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
+
:where([data-dds-context="marketing"]) .dds-illustrationscene .dds-illustrationscene__shade {
|
|
22
|
+
align-self: stretch;
|
|
23
|
+
justify-self: stretch;
|
|
24
|
+
pointer-events: none;
|
|
25
|
+
}
|
|
26
|
+
|
|
21
27
|
:where([data-dds-context="marketing"]) .dds-illustrationscene[data-placement="bottom"] {
|
|
22
28
|
align-items: end;
|
|
23
29
|
justify-items: center;
|
|
@@ -9,6 +9,7 @@ export type { IllustrationSceneProps };
|
|
|
9
9
|
* every picture of the product in use is composed the same way across a site. The photograph is
|
|
10
10
|
* decoration unless `alt` says otherwise; the card's own label describes the whole picture.
|
|
11
11
|
*
|
|
12
|
-
* No state and no script, so it renders on a server as it is.
|
|
12
|
+
* No state and no script, so it renders on a server as it is. The card's two-beat arrival inside a
|
|
13
|
+
* block's reveal is the stylesheet's, read from the step the block gave whatever holds the scene.
|
|
13
14
|
*/
|
|
14
|
-
export declare function IllustrationScene({ ratio, placement, src, alt, children, ...rest }: IllustrationSceneProps): import("react").JSX.Element;
|
|
15
|
+
export declare function IllustrationScene({ ratio, placement, src, alt, shade, children, ...rest }: IllustrationSceneProps): import("react").JSX.Element;
|
|
@@ -9,8 +9,9 @@ import { illustrationSceneDefaults, illustrationSceneParts, } from './Illustrati
|
|
|
9
9
|
* every picture of the product in use is composed the same way across a site. The photograph is
|
|
10
10
|
* decoration unless `alt` says otherwise; the card's own label describes the whole picture.
|
|
11
11
|
*
|
|
12
|
-
* No state and no script, so it renders on a server as it is.
|
|
12
|
+
* No state and no script, so it renders on a server as it is. The card's two-beat arrival inside a
|
|
13
|
+
* block's reveal is the stylesheet's, read from the step the block gave whatever holds the scene.
|
|
13
14
|
*/
|
|
14
|
-
export function IllustrationScene({ ratio = illustrationSceneDefaults.ratio, placement = illustrationSceneDefaults.placement, src, alt = illustrationSceneDefaults.alt, children, ...rest }) {
|
|
15
|
-
return (_jsxs("div", { ...rest, className: illustrationSceneParts.root, "data-ratio": ratio, "data-placement": placement, children: [_jsx("img", { className: illustrationSceneParts.image, src: src, alt: alt }), children] }));
|
|
15
|
+
export function IllustrationScene({ ratio = illustrationSceneDefaults.ratio, placement = illustrationSceneDefaults.placement, src, alt = illustrationSceneDefaults.alt, shade = illustrationSceneDefaults.shade, children, ...rest }) {
|
|
16
|
+
return (_jsxs("div", { ...rest, className: illustrationSceneParts.root, "data-ratio": ratio, "data-placement": placement, children: [_jsx("img", { className: illustrationSceneParts.image, src: src, alt: alt }), shade ? _jsx("div", { className: illustrationSceneParts.shade }) : null, children] }));
|
|
16
17
|
}
|