@deriv-com/dds-marketing 1.0.2 → 1.1.1
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/awards.md +209 -0
- package/.llm/components/background.md +89 -40
- package/.llm/components/bottomsheet.md +5 -0
- package/.llm/components/comparisoncards.md +257 -0
- package/.llm/components/comparisontable.md +231 -0
- package/.llm/components/ctabanner.md +9 -12
- package/.llm/components/ctabannerslider.md +15 -2
- package/.llm/components/datatable.md +273 -0
- package/.llm/components/downloadbanner.md +283 -0
- package/.llm/components/featurecards.md +41 -3
- package/.llm/components/featurecardscarousel.md +311 -0
- package/.llm/components/featuresplit.md +5 -0
- package/.llm/components/featurestack.md +227 -0
- package/.llm/components/illustrationcard.md +2 -2
- package/.llm/components/illustrationscene.md +6 -10
- package/.llm/components/imagebanner.md +278 -0
- package/.llm/components/navbar.md +1 -1
- package/.llm/components/navbaritem.md +4 -0
- package/.llm/components/pageheader.md +4 -3
- package/.llm/components/paginationdots.md +6 -1
- package/.llm/components/producthero.md +35 -11
- package/.llm/components/resourcebanner.md +247 -0
- package/.llm/components/scenescroll.md +222 -0
- package/.llm/components/select.md +17 -0
- package/.llm/components/stats.md +219 -0
- package/.llm/components/steps.md +286 -0
- package/.llm/components/stickycards.md +251 -0
- package/.llm/components/tableheadercell.md +19 -0
- package/.llm/components/teamgrid.md +243 -0
- package/.llm/components/testimonialrow.md +5 -0
- package/.llm/components/testimonialslider.md +14 -1
- package/.llm/components/textarea.md +13 -0
- package/.llm/components/textinput.md +13 -0
- package/.llm/components/textscroll.md +187 -0
- package/.llm/components/tiers.md +227 -0
- package/.llm/digest/awards.md +45 -0
- package/.llm/digest/background.md +11 -10
- package/.llm/digest/bottomsheet.md +2 -0
- package/.llm/digest/comparisoncards.md +51 -0
- package/.llm/digest/comparisontable.md +53 -0
- package/.llm/digest/ctabanner.md +4 -4
- package/.llm/digest/ctabannerslider.md +4 -0
- package/.llm/digest/datatable.md +65 -0
- package/.llm/digest/downloadbanner.md +65 -0
- package/.llm/digest/featurecards.md +1 -1
- package/.llm/digest/featurecardscarousel.md +54 -0
- package/.llm/digest/featuresplit.md +1 -0
- package/.llm/digest/featurestack.md +48 -0
- package/.llm/digest/illustrationscene.md +2 -3
- package/.llm/digest/imagebanner.md +64 -0
- package/.llm/digest/navbaritem.md +1 -0
- package/.llm/digest/pageheader.md +2 -1
- package/.llm/digest/paginationdots.md +3 -1
- package/.llm/digest/producthero.md +4 -2
- package/.llm/digest/resourcebanner.md +53 -0
- package/.llm/digest/scenescroll.md +49 -0
- package/.llm/digest/select.md +5 -0
- package/.llm/digest/stats.md +46 -0
- package/.llm/digest/steps.md +55 -0
- package/.llm/digest/stickycards.md +52 -0
- package/.llm/digest/tableheadercell.md +4 -0
- package/.llm/digest/teamgrid.md +53 -0
- package/.llm/digest/testimonialrow.md +2 -0
- package/.llm/digest/testimonialslider.md +4 -0
- package/.llm/digest/textarea.md +4 -0
- package/.llm/digest/textinput.md +4 -0
- package/.llm/digest/textscroll.md +43 -0
- package/.llm/digest/tiers.md +50 -0
- package/.llm/index.md +19 -3
- package/.llm/tokens.md +26 -1
- package/AGENTS.md +17 -1
- package/dist/components/awards-data.d.ts +24 -0
- package/dist/components/awards-data.js +11 -0
- package/dist/components/block-image-data.d.ts +24 -0
- package/dist/components/block-image-data.js +9 -0
- package/dist/components/blocks/awards/Awards.css +134 -0
- package/dist/components/blocks/awards/Awards.d.ts +24 -0
- package/dist/components/blocks/awards/Awards.js +114 -0
- package/dist/components/blocks/awards/Awards.types.d.ts +31 -0
- package/dist/components/blocks/awards/Awards.types.js +16 -0
- package/dist/components/blocks/awards/awards-impl.css +222 -0
- package/dist/components/blocks/cards-of.d.ts +16 -0
- package/dist/components/blocks/cards-of.js +23 -0
- package/dist/components/blocks/comparison-cards/ComparisonCards.css +195 -0
- package/dist/components/blocks/comparison-cards/ComparisonCards.d.ts +24 -0
- package/dist/components/blocks/comparison-cards/ComparisonCards.js +75 -0
- package/dist/components/blocks/comparison-cards/ComparisonCards.types.d.ts +49 -0
- package/dist/components/blocks/comparison-cards/ComparisonCards.types.js +26 -0
- package/dist/components/blocks/comparison-cards/comparison-cards-impl.css +262 -0
- package/dist/components/blocks/comparison-table/ComparisonTable.css +111 -0
- package/dist/components/blocks/comparison-table/ComparisonTable.d.ts +25 -0
- package/dist/components/blocks/comparison-table/ComparisonTable.js +100 -0
- package/dist/components/blocks/comparison-table/ComparisonTable.types.d.ts +36 -0
- package/dist/components/blocks/comparison-table/ComparisonTable.types.js +15 -0
- package/dist/components/blocks/comparison-table/comparison-table-impl.css +143 -0
- package/dist/components/blocks/cta-banner/CtaBanner.css +1 -0
- package/dist/components/blocks/cta-banner/CtaBanner.js +2 -2
- package/dist/components/blocks/cta-banner/CtaBanner.types.d.ts +4 -3
- package/dist/components/blocks/cta-banner/CtaBanner.types.js +1 -1
- package/dist/components/blocks/cta-banner-slider/CtaBannerSlider.css +1 -0
- package/dist/components/blocks/cta-banner-slider/CtaBannerSlider.d.ts +1 -1
- package/dist/components/blocks/cta-banner-slider/CtaBannerSlider.js +6 -2
- package/dist/components/blocks/cta-banner-slider/CtaBannerSlider.types.d.ts +8 -0
- package/dist/components/blocks/cta-banner-slider/CtaBannerSlider.types.js +1 -1
- package/dist/components/blocks/data-table/DataTable.css +170 -0
- package/dist/components/blocks/data-table/DataTable.d.ts +29 -0
- package/dist/components/blocks/data-table/DataTable.js +84 -0
- package/dist/components/blocks/data-table/DataTable.types.d.ts +69 -0
- package/dist/components/blocks/data-table/DataTable.types.js +19 -0
- package/dist/components/blocks/data-table/data-table-impl.css +155 -0
- package/dist/components/blocks/download-banner/DownloadBanner.css +228 -0
- package/dist/components/blocks/download-banner/DownloadBanner.d.ts +28 -0
- package/dist/components/blocks/download-banner/DownloadBanner.js +75 -0
- package/dist/components/blocks/download-banner/DownloadBanner.types.d.ts +56 -0
- package/dist/components/blocks/download-banner/DownloadBanner.types.js +23 -0
- package/dist/components/blocks/download-banner/download-banner-impl.css +216 -0
- package/dist/components/blocks/faq-accordion/FaqAccordion.css +1 -0
- package/dist/components/blocks/faq-accordion/faq-accordion-impl.css +3 -7
- package/dist/components/blocks/feature-bullets/FeatureBullets.css +1 -0
- package/dist/components/blocks/feature-bullets/feature-bullets-impl.css +14 -1
- package/dist/components/blocks/feature-cards/FeatureCards.css +1 -0
- package/dist/components/blocks/feature-cards/FeatureCards.d.ts +2 -1
- package/dist/components/blocks/feature-cards/FeatureCards.js +4 -21
- package/dist/components/blocks/feature-cards/feature-cards-impl.css +10 -9
- package/dist/components/blocks/feature-cards-carousel/FeatureCardsCarousel.css +115 -0
- package/dist/components/blocks/feature-cards-carousel/FeatureCardsCarousel.d.ts +30 -0
- package/dist/components/blocks/feature-cards-carousel/FeatureCardsCarousel.js +160 -0
- package/dist/components/blocks/feature-cards-carousel/FeatureCardsCarousel.types.d.ts +52 -0
- package/dist/components/blocks/feature-cards-carousel/FeatureCardsCarousel.types.js +17 -0
- package/dist/components/blocks/feature-cards-carousel/feature-cards-carousel-impl.css +207 -0
- package/dist/components/blocks/feature-scroll/FeatureScroll.css +1 -0
- package/dist/components/blocks/feature-split/FeatureSplit.css +1 -0
- package/dist/components/blocks/feature-split/feature-split-impl.css +14 -1
- package/dist/components/blocks/feature-stack/FeatureStack.css +86 -0
- package/dist/components/blocks/feature-stack/FeatureStack.d.ts +19 -0
- package/dist/components/blocks/feature-stack/FeatureStack.js +27 -0
- package/dist/components/blocks/feature-stack/FeatureStack.types.d.ts +34 -0
- package/dist/components/blocks/feature-stack/FeatureStack.types.js +14 -0
- package/dist/components/blocks/feature-stack/feature-stack-impl.css +87 -0
- package/dist/components/blocks/image-banner/ImageBanner.css +133 -0
- package/dist/components/blocks/image-banner/ImageBanner.d.ts +32 -0
- package/dist/components/blocks/image-banner/ImageBanner.js +41 -0
- package/dist/components/blocks/image-banner/ImageBanner.types.d.ts +54 -0
- package/dist/components/blocks/image-banner/ImageBanner.types.js +14 -0
- package/dist/components/blocks/image-banner/image-banner-impl.css +281 -0
- package/dist/components/blocks/landing-hero/LandingHero.css +1 -0
- package/dist/components/blocks/logo-columns/LogoColumns.css +1 -0
- package/dist/components/blocks/logo-rows/LogoRows.css +1 -0
- package/dist/components/blocks/page-header/PageHeader.css +1 -0
- package/dist/components/blocks/page-header/PageHeader.js +2 -2
- package/dist/components/blocks/page-header/PageHeader.types.d.ts +4 -2
- package/dist/components/blocks/page-header/PageHeader.types.js +1 -1
- package/dist/components/blocks/page-header/page-header-impl.css +5 -3
- package/dist/components/blocks/product-hero/ProductHero.css +8 -3
- package/dist/components/blocks/product-hero/ProductHero.d.ts +1 -1
- package/dist/components/blocks/product-hero/ProductHero.js +5 -2
- package/dist/components/blocks/product-hero/ProductHero.types.d.ts +5 -1
- package/dist/components/blocks/product-hero/ProductHero.types.js +1 -0
- package/dist/components/blocks/product-hero/product-hero-impl.css +43 -12
- package/dist/components/blocks/resource-banner/ResourceBanner.css +106 -0
- package/dist/components/blocks/resource-banner/ResourceBanner.d.ts +32 -0
- package/dist/components/blocks/resource-banner/ResourceBanner.js +51 -0
- package/dist/components/blocks/resource-banner/ResourceBanner.types.d.ts +44 -0
- package/dist/components/blocks/resource-banner/ResourceBanner.types.js +14 -0
- package/dist/components/blocks/resource-banner/resource-banner-impl.css +69 -0
- package/dist/components/blocks/scene-scroll/SceneScroll.css +93 -0
- package/dist/components/blocks/scene-scroll/SceneScroll.d.ts +36 -0
- package/dist/components/blocks/scene-scroll/SceneScroll.js +54 -0
- package/dist/components/blocks/scene-scroll/SceneScroll.types.d.ts +32 -0
- package/dist/components/blocks/scene-scroll/SceneScroll.types.js +15 -0
- package/dist/components/blocks/scene-scroll/scene-scroll-impl.css +275 -0
- package/dist/components/blocks/stats/Stats.css +139 -0
- package/dist/components/blocks/stats/Stats.d.ts +24 -0
- package/dist/components/blocks/stats/Stats.js +120 -0
- package/dist/components/blocks/stats/Stats.types.d.ts +36 -0
- package/dist/components/blocks/stats/Stats.types.js +19 -0
- package/dist/components/blocks/stats/stats-count.d.ts +34 -0
- package/dist/components/blocks/stats/stats-count.js +61 -0
- package/dist/components/blocks/stats/stats-impl.css +284 -0
- package/dist/components/blocks/stats/use-wheel.d.ts +37 -0
- package/dist/components/blocks/stats/use-wheel.js +126 -0
- package/dist/components/blocks/steps/Steps.css +202 -0
- package/dist/components/blocks/steps/Steps.d.ts +32 -0
- package/dist/components/blocks/steps/Steps.js +65 -0
- package/dist/components/blocks/steps/Steps.types.d.ts +48 -0
- package/dist/components/blocks/steps/Steps.types.js +21 -0
- package/dist/components/blocks/steps/steps-impl.css +216 -0
- package/dist/components/blocks/steps/use-turn.d.ts +33 -0
- package/dist/components/blocks/steps/use-turn.js +75 -0
- package/dist/components/blocks/sticky-cards/StickyCards.css +154 -0
- package/dist/components/blocks/sticky-cards/StickyCards.d.ts +35 -0
- package/dist/components/blocks/sticky-cards/StickyCards.js +153 -0
- package/dist/components/blocks/sticky-cards/StickyCards.types.d.ts +43 -0
- package/dist/components/blocks/sticky-cards/StickyCards.types.js +18 -0
- package/dist/components/blocks/sticky-cards/sticky-cards-impl.css +393 -0
- package/dist/components/blocks/team-grid/TeamGrid.css +159 -0
- package/dist/components/blocks/team-grid/TeamGrid.d.ts +28 -0
- package/dist/components/blocks/team-grid/TeamGrid.js +74 -0
- package/dist/components/blocks/team-grid/TeamGrid.types.d.ts +51 -0
- package/dist/components/blocks/team-grid/TeamGrid.types.js +20 -0
- package/dist/components/blocks/team-grid/team-grid-impl.css +129 -0
- package/dist/components/blocks/testimonial-row/TestimonialRow.css +1 -0
- package/dist/components/blocks/testimonial-row/TestimonialRow.d.ts +1 -1
- package/dist/components/blocks/testimonial-row/TestimonialRow.js +4 -3
- package/dist/components/blocks/testimonial-row/TestimonialRow.types.d.ts +3 -0
- package/dist/components/blocks/testimonial-row/TestimonialRow.types.js +1 -1
- package/dist/components/blocks/testimonial-row/testimonial-row-impl.css +8 -0
- package/dist/components/blocks/testimonial-slider/TestimonialSlider.css +1 -0
- package/dist/components/blocks/testimonial-slider/TestimonialSlider.d.ts +1 -1
- package/dist/components/blocks/testimonial-slider/TestimonialSlider.js +2 -2
- package/dist/components/blocks/testimonial-slider/TestimonialSlider.types.d.ts +8 -0
- package/dist/components/blocks/testimonial-slider/TestimonialSlider.types.js +1 -1
- package/dist/components/blocks/text-scroll/TextScroll.css +53 -0
- package/dist/components/blocks/text-scroll/TextScroll.d.ts +5 -0
- package/dist/components/blocks/text-scroll/TextScroll.js +71 -0
- package/dist/components/blocks/text-scroll/TextScroll.types.d.ts +22 -0
- package/dist/components/blocks/text-scroll/TextScroll.types.js +10 -0
- package/dist/components/blocks/text-scroll/text-scroll-impl.css +115 -0
- package/dist/components/blocks/tiers/Tiers.css +233 -0
- package/dist/components/blocks/tiers/Tiers.d.ts +32 -0
- package/dist/components/blocks/tiers/Tiers.js +68 -0
- package/dist/components/blocks/tiers/Tiers.types.d.ts +45 -0
- package/dist/components/blocks/tiers/Tiers.types.js +25 -0
- package/dist/components/blocks/tiers/tiers-impl.css +185 -0
- package/dist/components/blocks/use-rotation.d.ts +12 -2
- package/dist/components/blocks/use-rotation.js +6 -28
- package/dist/components/comparison-cards-data.d.ts +59 -0
- package/dist/components/comparison-cards-data.js +12 -0
- package/dist/components/comparison-table-data.d.ts +39 -0
- package/dist/components/comparison-table-data.js +11 -0
- package/dist/components/core/accordion-item/AccordionItem.css +1 -5
- package/dist/components/core/background/Background.css +23 -0
- package/dist/components/core/background/Background.d.ts +10 -4
- package/dist/components/core/background/Background.js +16 -7
- package/dist/components/core/background/Background.types.d.ts +11 -8
- package/dist/components/core/background/Background.types.js +3 -1
- package/dist/components/core/background/background-impl.css +334 -1
- package/dist/components/core/background/halftone.d.ts +11 -0
- package/dist/components/core/background/halftone.js +43 -3
- package/dist/components/core/background/patterns.d.ts +66 -0
- package/dist/components/core/background/patterns.js +244 -0
- package/dist/components/core/background/shader.d.ts +44 -0
- package/dist/components/core/background/shader.js +307 -0
- package/dist/components/core/background/use-shader.d.ts +11 -0
- package/dist/components/core/background/use-shader.js +25 -0
- package/dist/components/core/background/use-spotlight.d.ts +2 -1
- package/dist/components/core/background/use-spotlight.js +9 -1
- package/dist/components/core/bottom-sheet/BottomSheet.js +2 -2
- package/dist/components/core/bottom-sheet/BottomSheet.types.d.ts +3 -1
- package/dist/components/core/breadcrumb/Breadcrumb.d.ts +1 -0
- package/dist/components/core/breadcrumb/Breadcrumb.js +1 -0
- package/dist/components/core/breadcrumb/breadcrumb-impl.css +11 -0
- package/dist/components/core/button/button-impl.css +14 -1
- package/dist/components/core/illustration-card/IllustrationCard.js +1 -1
- package/dist/components/core/illustration-card/illustration-card-impl.css +20 -0
- package/dist/components/core/illustration-scene/IllustrationScene.css +4 -7
- package/dist/components/core/illustration-scene/IllustrationScene.types.d.ts +2 -3
- package/dist/components/core/illustration-scene/illustration-scene-impl.css +22 -1
- package/dist/components/core/link/Link.js +7 -3
- package/dist/components/core/link/link-impl.css +29 -2
- package/dist/components/core/navbar/Navbar.css +2 -2
- package/dist/components/core/navbar/Navbar.types.d.ts +1 -1
- package/dist/components/core/navbar-item/NavbarItem.d.ts +2 -1
- package/dist/components/core/navbar-item/NavbarItem.js +3 -10
- package/dist/components/core/navbar-item/NavbarItem.types.d.ts +4 -1
- package/dist/components/core/navbar-item/NavbarItem.types.js +1 -1
- package/dist/components/core/navbar-item/navbar-item-impl.css +10 -0
- package/dist/components/core/navbar-menu/navbar-menu-impl.css +9 -0
- package/dist/components/core/navbar-switcher/navbar-switcher-impl.css +19 -0
- package/dist/components/core/pagination/Pagination.js +1 -1
- package/dist/components/core/pagination/pagination-impl.css +9 -0
- package/dist/components/core/pagination-dots/PaginationDots.d.ts +1 -1
- package/dist/components/core/pagination-dots/PaginationDots.js +3 -3
- package/dist/components/core/pagination-dots/PaginationDots.types.d.ts +3 -1
- package/dist/components/core/segmented-control/SegmentedControl.css +4 -3
- package/dist/components/core/segmented-control/SegmentedControl.js +17 -3
- package/dist/components/core/segmented-control-item/SegmentedControlItem.css +2 -1
- package/dist/components/core/select/Select.js +3 -3
- package/dist/components/core/select/Select.types.d.ts +11 -1
- package/dist/components/core/select/Select.types.js +1 -1
- package/dist/components/core/tab-list/TabList.js +9 -1
- package/dist/components/core/table-header-cell/TableHeaderCell.d.ts +1 -1
- package/dist/components/core/table-header-cell/TableHeaderCell.js +5 -2
- package/dist/components/core/table-header-cell/TableHeaderCell.types.d.ts +7 -1
- package/dist/components/core/table-header-cell/TableHeaderCell.types.js +1 -1
- package/dist/components/core/text-area/TextArea.d.ts +1 -1
- package/dist/components/core/text-area/TextArea.js +2 -2
- package/dist/components/core/text-area/TextArea.types.d.ts +9 -1
- package/dist/components/core/text-area/TextArea.types.js +1 -1
- package/dist/components/core/text-input/TextInput.d.ts +1 -1
- package/dist/components/core/text-input/TextInput.js +2 -2
- package/dist/components/core/text-input/TextInput.types.d.ts +9 -1
- package/dist/components/core/text-input/TextInput.types.js +1 -1
- package/dist/components/data-table-data.d.ts +33 -0
- package/dist/components/data-table-data.js +12 -0
- package/dist/components/download-banner-data.d.ts +52 -0
- package/dist/components/download-banner-data.js +11 -0
- package/dist/components/index.d.ts +45 -0
- package/dist/components/index.js +32 -0
- package/dist/components/resource-banner-data.d.ts +34 -0
- package/dist/components/resource-banner-data.js +13 -0
- package/dist/components/scene-scroll-data.d.ts +24 -0
- package/dist/components/scene-scroll-data.js +9 -0
- package/dist/components/stats-data.d.ts +28 -0
- package/dist/components/stats-data.js +11 -0
- package/dist/components/steps-data.d.ts +38 -0
- package/dist/components/steps-data.js +13 -0
- package/dist/components/sticky-cards-data.d.ts +43 -0
- package/dist/components/sticky-cards-data.js +12 -0
- package/dist/components/team-grid-data.d.ts +38 -0
- package/dist/components/team-grid-data.js +11 -0
- package/dist/components/tiers-data.d.ts +47 -0
- package/dist/components/tiers-data.js +13 -0
- package/dist/marketing.css +77 -28
- package/package.json +1 -1
|
@@ -24,7 +24,7 @@ CtaBannerSlider renders 9 elements. A token binding names the part it applies to
|
|
|
24
24
|
- `root` — `<section>`, class `dds-ctabannerslider`. The band. It paints color.bg.brand and sets color.fg.on-brand for everything on it, the same in light and dark — CtaBanner's ground. A named region announced as a carousel, so a reader can jump to it and past it and knows it moves.
|
|
25
25
|
- `inner` — `<div>`, class `dds-ctabannerslider__inner`. The measure and the gutter, the same column every band holds its content in: size.content.max, space.inset.page, space.section.default.
|
|
26
26
|
- `track` — `<div>`, class `dds-ctabannerslider__track`. The slides, stacked in one place. Every slide sits in the same grid cell, so the band is as tall as its tallest message and nothing below it moves when one changes for another. Only the slide in view is drawn: the rest are at opacity.hidden, inert and hidden from assistive technology. A change is the new slide fading in where the old one stood — no travel, the old one's words gone at once — on motion.duration.slow and motion.easing.shift, the timing the dots move on, so the mark and the message change in the same beat. The words then arrive the way every block's do — the headline, the line and the actions rising into place a step apart, from block-reveal.css — each time a slide comes into view, and when the band first scrolls in. The slide leaving drops its words at once rather than sending them anywhere.
|
|
27
|
-
- `slide` — `<div>`, class `dds-ctabannerslider__slide`. One message, and one stop in the track: its group role, its "2
|
|
27
|
+
- `slide` — `<div>`, class `dds-ctabannerslider__slide`. One message, and one stop in the track: its group role, its "2 of 3" name and its inert state are set here. As wide as the banner's measure, never narrower — every slide sits in the same cell, so the band is as tall as the tallest.
|
|
28
28
|
- `text` — `<div>`, class `dds-ctabannerslider__text`. The headline and the line under it, held to the heading measure so a headline at font.h1 breaks into a few words a line rather than running the width of the band.
|
|
29
29
|
- `title` — `<h2>`, class `dds-ctabannerslider__title`. One slide's headline. h2 by default because a banner is a section of a page; `headingLevel` moves the level and never the size. `text-wrap: balance` so a two-line headline breaks evenly.
|
|
30
30
|
- `description` — `<p>`, class `dds-ctabannerslider__description`. The line under one slide's headline, at the description measure — drawn only for a slide that gives one.
|
|
@@ -78,6 +78,19 @@ Use when: The word each dot is announced by, before its number — 'Slide 2'. Tr
|
|
|
78
78
|
Use when: The band is the page's one standout promotion and wants more than a flat fill. Leave it out and the band is its flat coral, as it always was
|
|
79
79
|
Never for: More than one patterned band on a page. The pattern is what makes a band the one a reader remembers, and two of them make neither
|
|
80
80
|
|
|
81
|
+
### roleDescription — `string` (default `carousel`)
|
|
82
|
+
|
|
83
|
+
Use when: What a screen reader calls the set while it rotates — announced in place of a region, as the word for this kind of thing. Translate it with the page: it is read out as given, so an untranslated one announces an English word on every page in every language.
|
|
84
|
+
|
|
85
|
+
### slideRoleDescription — `string` (default `slide`)
|
|
86
|
+
|
|
87
|
+
Use when: What a screen reader calls each item while the set rotates, for the reason roleDescription exists. Translate it with the page.
|
|
88
|
+
|
|
89
|
+
### positionLabel — `callback`
|
|
90
|
+
|
|
91
|
+
Use when: The accessible name of each item while the set rotates, given its place in the set counting from one — so a reader hears where they are. Without it each is named "2 of 5"; pass it to translate that with the page, in that language's own order and digits.
|
|
92
|
+
Never for: Visible text. It names the item to assistive technology and is never drawn.
|
|
93
|
+
|
|
81
94
|
## Accessibility
|
|
82
95
|
|
|
83
96
|
Guaranteed by the component. Write none of it by hand: the ids these attributes point at are generated per instance, so an attribute set from outside either says the same thing twice or points at nothing.
|
|
@@ -87,7 +100,7 @@ Guaranteed by the component. Write none of it by hand: the ids these attributes
|
|
|
87
100
|
- `Enter` — On a dot, moves to that slide
|
|
88
101
|
- The headline of the slide in view is a real heading, so a reader moving by heading finds the message as well as the banner around it. Slides out of view are inert, so they are not in the heading list until they are in view.
|
|
89
102
|
- accessible name from label, so the banner is a named region a reader can jump to and skip
|
|
90
|
-
- Every slide out of view is inert and hidden from assistive technology, and the one in view is named by its position — '2
|
|
103
|
+
- Every slide out of view is inert and hidden from assistive technology, and the one in view is named by its position — '2 of 3' — so a reader knows where they are without seeing the dots
|
|
91
104
|
- No rotation for a reader who asked for less motion: autoplay is off under prefers-reduced-motion, and a slide changes without travelling
|
|
92
105
|
- Under autoplay, a hold while the pointer is over the banner or focus is inside it, no movement for a reader who asked for less motion, and a stop for good once the reader presses anything in it or swipes it. No pause control is drawn, so the way to stop it is a press, which nothing on screen announces
|
|
93
106
|
|
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
<!-- GENERATED from data-table.contract.json. Do not edit. -->
|
|
2
|
+
|
|
3
|
+
# DataTable
|
|
4
|
+
|
|
5
|
+
A full-width data-table section for instrument and market-style listings. It renders a search bar, a native table with a sticky first column inside a horizontally scrollable wrapper, client-side pagination, and an optional footnote below the table.
|
|
6
|
+
|
|
7
|
+
A heading over a framed table a reader can search and page through: the search and the count of what it found across the top, the table under them with each row's name pinned to the start edge while the values scroll sideways, the pages under that when there is more than one, and a line of small print below the frame. The columns and the rows are data — any feed or spreadsheet of instruments can be dropped in — and every value is searched, as the reader types.
|
|
8
|
+
|
|
9
|
+
The reference design's Table template, renamed because this package already has a Table: that is the grid this section is drawn around. The search is SearchInput, the pages are Pagination, and the grid is Table with its first column pinned; this draws the heading, the frame and the line of small print, and holds the query and the page.
|
|
10
|
+
|
|
11
|
+
## Use when
|
|
12
|
+
|
|
13
|
+
- Trading instruments and their specifications — contract size, minimum size, volume limits — on a market page
|
|
14
|
+
- Trading conditions a reader looks up rather than reads through: spreads, leverage, margin, swaps
|
|
15
|
+
- An MT5 or Deriv X specification page, where the set runs to dozens of rows and a reader is hunting for the one they trade
|
|
16
|
+
|
|
17
|
+
## Do not use
|
|
18
|
+
|
|
19
|
+
- Three or four plans or accounts compared feature by feature, where every row is read rather than searched → `ComparisonTable`
|
|
20
|
+
- A handful of rows with no need to search or page — a fee schedule of four lines → `Table`
|
|
21
|
+
- Prices that move while the page is open. The values are written once and searched as written; a live quote here is a stale one the moment it is drawn
|
|
22
|
+
- Sorting or filtering that needs the server. The search runs over the rows the page handed in and nothing else, so a set too large to send whole is a set this cannot search
|
|
23
|
+
- A single record's fields. A row header and one value beside it is a description list wearing a table's markup
|
|
24
|
+
|
|
25
|
+
## Anatomy
|
|
26
|
+
|
|
27
|
+
DataTable renders 13 elements. A token binding names the part it applies to.
|
|
28
|
+
|
|
29
|
+
- `root` — `<section>`, class `dds-datatable`. The section. It paints the ground and the ink to go with it — see `ground` — and asks its own width, so the heading centres and the toolbar folds on the section's measure rather than the window's. A region named by its heading.
|
|
30
|
+
- `inner` — `<div>`, class `dds-datatable__inner`. The measure and the gutter, the same column every band holds its content in, and the step from the heading to the table: space.heading.content.
|
|
31
|
+
- `header` — `<div>`, class `dds-datatable__header`. The heading and the line under it, Stats' header and its arrangement: ranged to the start on a phone and centred from the fold, over a table that runs the column's width. It sets no gap: the heading's own margin is the step, so a heading with no line under it closes up.
|
|
32
|
+
- `title` — `<h2>`, class `dds-datatable__title`. What the rows are. `h2` because a section sits under the page's own heading, and the table takes its name from it: Table is given the same words as its caption, which is clipped rather than drawn twice.
|
|
33
|
+
- `description` — `<p>`, class `dds-datatable__description`. The line under the heading, at the description measure. Rendered only when `description` is set.
|
|
34
|
+
- `content` — `<div>`, class `dds-datatable__content`. The frame and the small print under it, a step apart at space.gap.lg — closer than the heading is to them, so the note reads as belonging to the table rather than as a section of its own.
|
|
35
|
+
- `frame` — `<div>`, class `dds-datatable__frame`. The surface the table is read on: the toolbar, the table and the pages, inside one rule with a corner. The same light card on every ground and its own ink with it, so the search, the rules and the pages are drawn on the surface they were made for. Its fill is the stack the table's pinned column paints — the page, the band and a raised card over them — so the pinned cells are the frame's own colour on every ground and in both themes. Clipped rather than hidden, so it keeps its corner without becoming a scroll container: the table's own scroller is the one the pinned column sticks inside. Positioned, so the table's clipped caption is held inside it.
|
|
36
|
+
- `toolbar` — `<div>`, class `dds-datatable__toolbar`. The search and the count across the top of the frame, with a rule under them. The count wraps under the search when the two do not fit on one line.
|
|
37
|
+
- `search` — `<div>`, class `dds-datatable__search`. Holds the SearchInput, which fills it. Asks for the toolbar's whole width and is held to size.data-table.search, so on a phone narrower than that it takes the row and the count wraps under it, and beside the count it stops at the cap.
|
|
38
|
+
- `status` — `<p>`, class `dds-datatable__status`. How many rows matched and which of them are on screen — "Showing 1–10 of 24" — in the muted ink, on as many lines as it takes, since a translated count runs longer than a phone is wide, at the small body step. A polite live region, rendered from the first paint so a screen reader is already listening when it changes: the reader is told the count as the query or the page changes, without being interrupted mid-word.
|
|
39
|
+
- `empty` — `<p>`, class `dds-datatable__empty`. The line drawn in place of the table when the search matches nothing — `emptyText`, in the muted ink. In place of the table rather than as a row inside it, TableBody's own rule: a row spanning every column is a sentence announced against headers that do not describe it. Always in the markup and `hidden` while there are rows to show.
|
|
40
|
+
- `pager` — `<div>`, class `dds-datatable__pager`. The Pagination under the table, with a rule over it — centred on a phone, at the end edge from the fold. Always in the markup and `hidden` while every row fits one page: a control offering to move through one page is one Pagination itself says never to draw.
|
|
41
|
+
- `footnote` — `<p>`, class `dds-datatable__footnote`. The small print under the frame, in the band's quieter ink. Words alone, with no glyph beside them. At the start edge on a phone, with the heading, and centred under the table from the fold. Rendered only when `footnote` is set.
|
|
42
|
+
|
|
43
|
+
Apply these classes from the generated `dataTableParts` constant rather than writing the strings by hand.
|
|
44
|
+
|
|
45
|
+
## Composition
|
|
46
|
+
|
|
47
|
+
- Takes no children. Everything it renders comes from props
|
|
48
|
+
- Never contains: `DataTable`, `LandingHero`, `ProductHero`, `PageHeader`, `Footer`, `Navbar` — in children or in any prop that takes a node
|
|
49
|
+
|
|
50
|
+
## Props
|
|
51
|
+
|
|
52
|
+
### ground — `page` | `subtle` | `strong` (default `page`)
|
|
53
|
+
|
|
54
|
+
- `page` — The default, and the page's own white. The frame's rule is what sets the table off
|
|
55
|
+
- `subtle` — The grey band — the reference design's slate section. The frame lifts off it as a raised card. Painted as the band's tint laid over the page's own ground, so it is the same grey whatever is behind the section
|
|
56
|
+
- `strong` — `color.bg.brand-strong`, the dark band, for a listing a reader should arrive at. The heading and the small print turn white and muted-white; the frame stays the light surface it is everywhere else
|
|
57
|
+
|
|
58
|
+
Use when: Which of the page's three grounds this section paints, FaqAccordion's axis and its reason: a band that wants to be seen as a band takes one of the other two, and the page decides the rhythm. The heading and the small print take the band's ink; the frame holding the table does not change with it — it is the same light surface on every ground, carrying its own ink, because a table is read value by value and its search, its rules and its pages are drawn for that surface.
|
|
59
|
+
Never for: Marking importance. Every section on a page painted a ground is a page with no emphasis left.
|
|
60
|
+
|
|
61
|
+
### title — `string` **Required.**
|
|
62
|
+
|
|
63
|
+
Use when: Always. What the rows are, in the fewest words — "Forex trading conditions", "Synthetic indices". It names the section and the table both.
|
|
64
|
+
Never for: A sentence about the data. The line under it is the description's; what a column means is the column's name.
|
|
65
|
+
|
|
66
|
+
### description — `string`
|
|
67
|
+
|
|
68
|
+
Use when: A line under the heading where the heading alone does not say which account or platform the conditions are for — "Conditions on Deriv MT5 Financial accounts."
|
|
69
|
+
Never for: The small print. A note on how current the figures are belongs under the table, in `footnote`, where it is read after the numbers it qualifies.
|
|
70
|
+
|
|
71
|
+
### columns — `data` `DataTableColumn[]` **Required.**
|
|
72
|
+
|
|
73
|
+
Use when: Always. The columns in reading order, each a `key` the rows hold its value under and the `label` drawn over it. The first is the rows' names — the instrument — and is pinned to the start edge while the rest scroll sideways; give a column of numbers `align: 'end'` so its figures line up.
|
|
74
|
+
Never for: A column only some rows have a value for. Every row answers every column, which is the promise a table makes.
|
|
75
|
+
|
|
76
|
+
### rows — `data` `DataTableRow[]` **Required.**
|
|
77
|
+
|
|
78
|
+
Use when: Always. The records, in the order they are listed — each a value per column key, as the page would print it. Every value is searched as written. An empty list draws the empty line in place of the table.
|
|
79
|
+
Never for: Values the source does not show today. Spreads and swaps are claims in the company's name; keep them in step with where they come from, and say how current they are in `footnote`.
|
|
80
|
+
|
|
81
|
+
### pageSize — `number` (default `10`)
|
|
82
|
+
|
|
83
|
+
Use when: How many rows a page holds. Ten, the reference's, unless the rows are few enough that a second page would hold two or three of them — then raise it so the set is one page and the pages are not drawn at all.
|
|
84
|
+
Never for: Showing everything. A page of a hundred rows is a page a reader scrolls past the search to get through; the search is how a long set is meant to be read.
|
|
85
|
+
|
|
86
|
+
### footnote — `string`
|
|
87
|
+
|
|
88
|
+
Use when: A line of small print under the table — how current the figures are, what they are subject to. "Information is based on the most recent available trading data and may not represent today's conditions."
|
|
89
|
+
Never for: A risk warning the page is obliged to show. Small print under a table is read by the few who reach it; a required warning belongs where every reader meets it.
|
|
90
|
+
|
|
91
|
+
### searchLabel — `string` (default `Search the table`)
|
|
92
|
+
|
|
93
|
+
Use when: The search's name — SearchInput's `label`, never drawn and always announced. Say what is searched where the default is vague for the page: "Search instruments". Translate it with the page.
|
|
94
|
+
Never for: An example query. That is the placeholder's.
|
|
95
|
+
|
|
96
|
+
### searchPlaceholder — `string` (default `Search`)
|
|
97
|
+
|
|
98
|
+
Use when: What the empty field shows, the reference's "Search" — or an example of a query, "EUR/USD". It disappears as the reader types and is never the field's name. Translate it with the page.
|
|
99
|
+
|
|
100
|
+
### clearLabel — `string` (default `Clear search`)
|
|
101
|
+
|
|
102
|
+
Use when: The name of the button that empties the search, which is a cross and says nothing on its own. Translate it with the page.
|
|
103
|
+
|
|
104
|
+
### emptyText — `string` (default `No results match your search.`)
|
|
105
|
+
|
|
106
|
+
Use when: The line drawn in place of the table when nothing matches the query. Translate it with the page; say what to try where the page can — "No markets match. Try a symbol, like EURUSD."
|
|
107
|
+
Never for: Explaining an empty set the page sent. A listing with no rows is a page that should not have drawn the section.
|
|
108
|
+
|
|
109
|
+
### resultCount — `callback`
|
|
110
|
+
|
|
111
|
+
Use when: The count across from the search, given the first and last row on this page and how many matched — counting from one, and all three 0 when nothing matched. It is also what a screen reader is told, politely, as the query or the page changes. Without it the count reads "Showing 1–10 of 24", and "No results" when nothing matched; pass it to translate that with the page.
|
|
112
|
+
Never for: Anything but the count. It is announced every time the reader types, so a sentence here is a sentence heard on every keystroke.
|
|
113
|
+
|
|
114
|
+
### paginationLabel — `string` (default `Table pages`)
|
|
115
|
+
|
|
116
|
+
Use when: The name of the pages' navigation landmark, Pagination's `label`. Its own name rather than Pagination's default, so a reader listing landmarks can tell this table's pages from anything else on the page that is paginated. Translate it with the page.
|
|
117
|
+
|
|
118
|
+
### previousLabel — `string` (default `Previous page`)
|
|
119
|
+
|
|
120
|
+
Use when: The name of the step back through the pages, which is a glyph. Translate it with the page, and keep it parallel to nextLabel.
|
|
121
|
+
|
|
122
|
+
### nextLabel — `string` (default `Next page`)
|
|
123
|
+
|
|
124
|
+
Use when: The name of the step on through the pages, for the reason previousLabel exists.
|
|
125
|
+
|
|
126
|
+
### morePagesLabel — `string` (default `More pages`)
|
|
127
|
+
|
|
128
|
+
Use when: The name of the break between two runs of page numbers, which opens a menu of the pages it stands for. Only drawn when the pages run long. Translate it with the page.
|
|
129
|
+
|
|
130
|
+
## Accessibility
|
|
131
|
+
|
|
132
|
+
Guaranteed by the component. Write none of it by hand: the ids these attributes point at are generated per instance, so an attribute set from outside either says the same thing twice or points at nothing.
|
|
133
|
+
|
|
134
|
+
- Announced as: `region`
|
|
135
|
+
- `Tab` — Moves to the search, then its clear button while there is a query, then the table's scroller, then the pages that have somewhere to go.
|
|
136
|
+
- `ArrowLeft` — On the focused table: scrolls it sideways the way the key points — the browser's own scrolling, made reachable by the scroller's tab stop.
|
|
137
|
+
- `ArrowRight` — On the focused table: scrolls it the way the key points, the mirror of ArrowLeft.
|
|
138
|
+
- `Enter` — On a page number or a step, moves to that page; the count says where the reader now is.
|
|
139
|
+
- accessible name from title, so the section is a named region a reader can jump to and skip
|
|
140
|
+
- Each row's name is a row header — `<th scope="row">` — so a screen reader announces the instrument before every value in its row, the way it announces each column's name.
|
|
141
|
+
- The count is a polite live region present from the first render, so a change in what matched is announced without interrupting, and a search that matches nothing is told so in words.
|
|
142
|
+
- The pinned first column is a visual arrangement only — the reading order, the row headers and the column headers are the table's whether or not anything scrolls.
|
|
143
|
+
|
|
144
|
+
## Rules
|
|
145
|
+
|
|
146
|
+
- **On a phone a section's actions stack and each fills the width, including when there is only one** — On a phone a page's actions stack, and each one fills the width. Not most of it, and not the width its label happens to need — the whole column.
|
|
147
|
+
|
|
148
|
+
Two side by side is what this replaces. On the narrowest screen each gets half a column minus the gap, which is rarely enough for a real label: the words wrap inside the pills, the two buttons come out different heights, and the pair reads as a broken row rather than as a choice. Stacked, each has the whole width and neither has to shorten its words to fit.
|
|
149
|
+
|
|
150
|
+
A single action fills too, and that is the part worth saying, because it is the one that looks unnecessary. A lone button has the room to sit at its natural width and still should not: a full-width control is the phone's convention for the thing the screen is asking you to do, and a pill hugging its label reads as one option among others that are not there. It also makes the target predictable — the whole width, wherever the thumb lands — which a centred pill does not.
|
|
151
|
+
|
|
152
|
+
Filling is the row's job rather than the button's. A button has no width of its own and is not given one; the row it sits in becomes a column and stretches its children, so nothing about the control changes and the same button is full width here and its own size on a desktop.
|
|
153
|
+
|
|
154
|
+
This is the phone's breakpoint, size.breakpoint.md, and not the wider one that decides whether a heading is centred. Those are different questions and they break at different widths: a heading stops being centred when the measure is the screen, while a button stops being full width much sooner than that — stretched across a tablet it is a long way from its own label, and a label centred in a metre of pill is harder to hit than one in a pill the size of the words.
|
|
155
|
+
|
|
156
|
+
What this is not about is every row of controls. A set of filter chips, a pagination strip, a toolbar, a link sitting after a sentence — none of these is the page asking for something, and stacking them to full width would turn a strip the eye skims into a list it has to read. The test is whether the row is the call to action the section was written for.
|
|
157
|
+
Guidance only — cannot be checked automatically.
|
|
158
|
+
- **Never nest one interactive element inside another** — Nested interactive elements produce ambiguous hit targets and an unreachable inner control for keyboard and screen-reader users. This is why the rule cannot live on any single component — it constrains Button, Link, CardButton and TextInput simultaneously.
|
|
159
|
+
Guidance only — cannot be checked automatically.
|
|
160
|
+
- **A section that paints a ground sets the ink to go with it** — A page sits on color.bg.page, and a section that separates itself from it takes one of three grounds. color.bg.subtle is the light one and needs nothing further — the page's own ink still reads on it. The other two are dark and do not: color.bg.brand-strong takes color.fg.on-brand-strong, and color.bg.brand takes color.fg.on-solid. Both are white, and both are written as the role rather than the white they resolve to. Set one of those backgrounds without its ink and the text inherits whatever the page was already using, which is near-black on a dark band — legible to nobody, and invisible to every check here, because each pair passes contrast on its own and nothing can tell whether a section used both.
|
|
161
|
+
|
|
162
|
+
color.bg.brand carries a second limit that is not about forgetting. Its ink measures 3.39:1, which clears the 3:1 a heading needs and misses the 4.5:1 running copy needs. A coral band may carry a headline and a call to action; a paragraph on one is text the reader has to work through at a ratio the waiver on that role does not cover — the waiver says so itself. A section with copy in it takes color.bg.brand-strong, which is near-black and carries white at full contrast.
|
|
163
|
+
|
|
164
|
+
color.bg.strong is not a section ground. It is the inverted fill for an action that has to outrank what surrounds it, and the components that paint it — Button and ButtonIcon in their inverse form — already set both halves in one rule, which is the pattern a hand-painted section has to copy.
|
|
165
|
+
Guidance only — cannot be checked automatically.
|
|
166
|
+
- **Every gap inside a section names the relationship it expresses, and the same relationship keeps its measure when it turns on its side** — A section's spacing is named by the relationship it expresses, not chosen by size. Every gap in a section has a role token, and reaching for a step off the generic scale because it happens to be the right number is how two sections written by two people stop lining up: the numbers agree today and drift the first time one of them is tuned.
|
|
167
|
+
|
|
168
|
+
The heading group is three steps, not one gap. An eyebrow sits nearer its title than the title sits to its description, and the actions sit further from the description than either — space.heading.eyebrow-title, space.heading.title-description, space.heading.description-actions, in that order. A single `gap` on the group cannot say this; it sets all three the same and the block reads as evenly spaced lines rather than as a mark, a name and a paragraph. The eyebrow has to identify itself for this to work, because a group that opens with a title must not give its description the eyebrow's tighter step.
|
|
169
|
+
|
|
170
|
+
The step between a title and its description follows the size of the title, which is why there are two of it. What a reader sees is not the gap but the gap plus the leading above it, and leading scales with the type: under a display title the leading is most of the space, under a card's title it is half as deep. One value for both makes a card look loose at the size that made a section look right. So space.heading.title-description is the display step and space.heading.title-description-compact is the step at a card's size, and the choice is made by how big the title is rather than by what kind of block it sits in.
|
|
171
|
+
|
|
172
|
+
Every one of those steps is smaller than the gap below the group, and that ordering is what holds the group together as one thing. space.heading.content is the step between a heading group and the content it introduces, and it is the widest measure inside a section: the one gap the eye reads as a change of subject rather than as a continuation.
|
|
173
|
+
|
|
174
|
+
That step is the same whether the content is under the heading or beside it. A split is the same relationship turned on its side — a heading group and the content it introduces — so the space between the two halves is space.heading.content, not a gutter. When the split collapses to one column on a phone the gap becomes vertical again, which is where it started, and nothing has to change for that to be right.
|
|
175
|
+
|
|
176
|
+
space.grid.gutter is between two things of the same kind. Two cards in a row are the same kind; the two halves of a split are not, which is why the gutter is the wrong measure there even when the number would have looked acceptable. The gutter runs on both axes, so a grid reads as an even field rather than as rows with a seam down them.
|
|
177
|
+
|
|
178
|
+
space.inset.card is the card's, not the page's. A row of cards padded differently is a row of different cards, and the fill is the only edge they have. A page composing a row does not get to choose it.
|
|
179
|
+
|
|
180
|
+
Column count is not a breakpoint decision. A row holds as many columns as fit before a column would be narrower than size.grid.column-min, and drops one when they would not. Written as a fixed count that collapses at a breakpoint, a four-up row keeps four columns at every width above the phone and sets its copy two or three words to a line through the whole of the tablet range — and on a narrow desktop, which no breakpoint sits on at all. The threshold is a property of the row rather than of a card: a card fills whatever cell it is given.
|
|
181
|
+
|
|
182
|
+
What this does not cover is the space above and below a section, which is space.section.default and space.section.compact, and the page's own side margin, which is space.inset.page. Those are the section's outside; everything here is its inside.
|
|
183
|
+
Guidance only — cannot be checked automatically.
|
|
184
|
+
- **A section's title is centred over stacked content, starts beside content in columns, and starts on a phone** — Two arrangements, and the title's alignment is decided by which one it is introducing rather than chosen per section.
|
|
185
|
+
|
|
186
|
+
Content stacked under the title — a row of cards, an accordion, a set of steps — takes a centred title. The heading group and the block below it share one axis, so a centred title is symmetric with the thing it names, and the eye drops from the middle of the words to the middle of the set. A title starting at the left over a centred or full-width block reads as belonging to the first column rather than to all of them.
|
|
187
|
+
|
|
188
|
+
Content beside the title — a split, a picture in the other half, anything laid out in columns — takes a title that starts where its content starts. The two share a left edge, and that edge is what says they are one thing read across rather than two stacked. Centring the title there breaks the only alignment the reader has to hold the halves together, and it drifts further from its content the wider the page gets.
|
|
189
|
+
|
|
190
|
+
The heading group is what carries this, not the heading alone. An eyebrow, a title and a description are read as one block and align together; aligning the title without them leaves a centred heading over start-aligned copy, which reads as a mistake rather than as a choice.
|
|
191
|
+
|
|
192
|
+
Centred means all of it, not just the words. A badge, a row of actions, a picture — these are flex children, and a flex child is placed by align-items rather than by text-align, so a block that only sets the text leaves everything that is not text at the start. A hero is the case that shows it: its title and copy centred while its badge and its buttons did not.
|
|
193
|
+
|
|
194
|
+
A capped block centres itself as well as its words. A heading group takes size.heading-group.max, and a cap that is not centred leaves the measure at the start of the column with the words centred inside it — composed, and a long way left of the middle it appears to be in.
|
|
195
|
+
|
|
196
|
+
Both arrangements go to the start on a phone. A centred block reverts below the breakpoint, and the reason is the measure: on a phone the measure is the screen, so a centred title wraps to three or four ragged lines and the eye loses the left edge it was tracking — the same symmetry that reads as composure on a desktop is what makes it hard to scan on a phone. Centring there has to be asked for twice, and a section title is not one of the things that asks: it is centred because there is room for it, and on a phone there is not. Going back to the start means all of it too, and a capped block is the one that hides a leftover: its words go to the start while its measure stays in the middle of the column, which reads as a title still centred over a badge and buttons that are not — the box in the middle and the line inside it at the edge.
|
|
197
|
+
|
|
198
|
+
A hero is a section like any other: its badge, title, copy and actions are one stacked block, so it is centred on a desktop and starts on a phone with everything else.
|
|
199
|
+
|
|
200
|
+
What this is not about is a page whose body is a form or a document. A title over a sign-up form or a guide is not introducing a set of content — it is the first line of the thing itself, and it keeps the alignment the body has, which for running text is the start. The distinction is whether the block below is content the title names or content the title is part of.
|
|
201
|
+
Guidance only — cannot be checked automatically.
|
|
202
|
+
- **Anything a pointer has to hit is at least 24px in both directions** — A control sized by its contents is as big as its contents, and a glyph is chosen for how it reads rather than for how easily it is hit. An icon-only button with no padding is a 16px target — smaller than the pad of a finger, and smaller than the tremor of a hand using a mouse.
|
|
203
|
+
|
|
204
|
+
WCAG 2.2 asks for 24 by 24 CSS pixels at AA. The exceptions are narrower than they look: inline targets inside a sentence are exempt, and so is a small target with 24px of clear space around it — but a clear button sits against the field it empties, and a field is itself a target, so the spacing exemption does not apply to the case that keeps arising.
|
|
205
|
+
|
|
206
|
+
The target and the mark are separate decisions, and conflating them is what produces both faults. Growing the glyph to 24px makes it shout; leaving the button at 16px makes it hard to hit. So the glyph keeps the size that reads correctly beside its text, and the box around it declares a minimum of its own — which is what size.target.min is for.
|
|
207
|
+
|
|
208
|
+
Declared rather than emergent. Padding plus contents does clear 24px in several components today, and it is the weaker statement: it is a size nobody wrote down, so it moves when the type scale or the glyph does, and nothing says it was meant to be a target at all.
|
|
209
|
+
Guidance only — cannot be checked automatically.
|
|
210
|
+
- **A component is written along the reading axis, not along the page's left and right** — Every measure, inset and placement in this package names an axis rather than a side: inline-size and block-size, padding-inline and padding-block, inset-inline-start and inset-block-end, margin-inline: auto, text-align: start. Written that way a component follows whichever direction the page is read in, and a band whose claim ranges to the leading edge with its subject on the trailing one is the same composition in Arabic as in English, mirrored, with nothing restated. Written as left and right it is the same pixels in both, which is a layout nobody designed for the second language.
|
|
211
|
+
|
|
212
|
+
The enum values follow the same rule and for the same reason. A prop that names where a picture sits takes start and end, never left and right — FeatureSplit, FeatureBullets and FeatureScroll all declare mediaPosition that way, and the flex directions they generate flip on their own because row already means the reading order. A value called left would have to be re-read as right by every author working in a mirrored page, which is a translation this system should be doing rather than asking for.
|
|
213
|
+
|
|
214
|
+
The guidance a contract carries is part of the component, so it follows too. Describing a claim as ranging left is describing one of the two languages, and it was written that way here for a while: three of the opening bands said so in their own intent. A reader in a mirrored page meets that sentence and has to decide whether the component is wrong or the sentence is, and neither answer is one documentation should force.
|
|
215
|
+
|
|
216
|
+
Two things genuinely have no logical form and are not covered by this. A CSS gradient takes a physical direction — there is no to inline-end — so a pattern that must mirror has to be stated twice under a direction query, and one that is periodic and centred, like PageHeader's rule grid, does not need to. A glyph that points the way onward is the other: an arrow is a picture of a direction, and mirroring it belongs to the icon set rather than to the component holding it.
|
|
217
|
+
Guidance only — cannot be checked automatically.
|
|
218
|
+
|
|
219
|
+
## Anti-examples
|
|
220
|
+
|
|
221
|
+
❌ DataTable for: Three or four plans or accounts compared feature by feature, where every row is read rather than searched
|
|
222
|
+
A comparison is short and read whole; a search and pages over a dozen rows are controls for a set the reader cannot take in at once
|
|
223
|
+
→ use `ComparisonTable` instead.
|
|
224
|
+
|
|
225
|
+
❌ DataTable for: A handful of rows with no need to search or page — a fee schedule of four lines
|
|
226
|
+
A search over six rows asks a reader to type for what they can already see; the bare grid, inside whatever section holds it, is the whole of what that needs
|
|
227
|
+
→ use `Table` instead.
|
|
228
|
+
|
|
229
|
+
## Example
|
|
230
|
+
|
|
231
|
+
```tsx
|
|
232
|
+
import { DataTable } from '@deriv-com/dds-marketing'
|
|
233
|
+
|
|
234
|
+
<DataTable title="Forex trading conditions" description="Spreads, leverage and swaps on Deriv MT5 Financial accounts." columns={[{"key":"instrument","label":"Instrument"},{"key":"spread","label":"Min spread","align":"end"},{"key":"leverage","label":"Max leverage","align":"end"},{"key":"swapLong","label":"Swap long (pts)","align":"end"},{"key":"swapShort","label":"Swap short (pts)","align":"end"},{"key":"hours","label":"Trading hours (GMT)"}]} rows={[{"instrument":"AUD/CAD","spread":"1.8","leverage":"1:1000","swapLong":"-3.12","swapShort":"-4.85","hours":"Sun 21:05 – Fri 20:55"},{"instrument":"AUD/JPY","spread":"1.4","leverage":"1:1000","swapLong":"2.21","swapShort":"-9.60","hours":"Sun 21:05 – Fri 20:55"},{"instrument":"AUD/NZD","spread":"2.2","leverage":"1:1000","swapLong":"-4.40","swapShort":"-2.95","hours":"Sun 21:05 – Fri 20:55"},{"instrument":"AUD/USD","spread":"0.6","leverage":"1:1000","swapLong":"-2.75","swapShort":"-1.32","hours":"Sun 21:05 – Fri 20:55"},{"instrument":"EUR/AUD","spread":"1.9","leverage":"1:1000","swapLong":"-9.84","swapShort":"2.10","hours":"Sun 21:05 – Fri 20:55"},{"instrument":"EUR/CAD","spread":"1.7","leverage":"1:1000","swapLong":"-7.02","swapShort":"1.18","hours":"Sun 21:05 – Fri 20:55"},{"instrument":"EUR/CHF","spread":"1.5","leverage":"1:1000","swapLong":"-0.92","swapShort":"-5.36","hours":"Sun 21:05 – Fri 20:55"},{"instrument":"EUR/GBP","spread":"0.9","leverage":"1:1000","swapLong":"-4.61","swapShort":"-0.70","hours":"Sun 21:05 – Fri 20:55"},{"instrument":"EUR/JPY","spread":"1.2","leverage":"1:1000","swapLong":"1.85","swapShort":"-11.40","hours":"Sun 21:05 – Fri 20:55"},{"instrument":"EUR/USD","spread":"0.5","leverage":"1:1000","swapLong":"-7.35","swapShort":"2.44","hours":"Sun 21:05 – Fri 20:55"},{"instrument":"GBP/AUD","spread":"2.4","leverage":"1:1000","swapLong":"-6.10","swapShort":"-3.95","hours":"Sun 21:05 – Fri 20:55"},{"instrument":"GBP/CHF","spread":"2.1","leverage":"1:1000","swapLong":"1.02","swapShort":"-9.88","hours":"Sun 21:05 – Fri 20:55"},{"instrument":"GBP/JPY","spread":"1.8","leverage":"1:1000","swapLong":"4.96","swapShort":"-16.20","hours":"Sun 21:05 – Fri 20:55"},{"instrument":"GBP/USD","spread":"0.8","leverage":"1:1000","swapLong":"-3.50","swapShort":"-0.48","hours":"Sun 21:05 – Fri 20:55"},{"instrument":"NZD/USD","spread":"1.1","leverage":"1:1000","swapLong":"-2.20","swapShort":"-1.65","hours":"Sun 21:05 – Fri 20:55"},{"instrument":"USD/CAD","spread":"1.0","leverage":"1:1000","swapLong":"-0.85","swapShort":"-4.80","hours":"Sun 21:05 – Fri 20:55"},{"instrument":"USD/CHF","spread":"0.9","leverage":"1:1000","swapLong":"2.64","swapShort":"-8.15","hours":"Sun 21:05 – Fri 20:55"},{"instrument":"USD/JPY","spread":"0.7","leverage":"1:1000","swapLong":"8.12","swapShort":"-20.50","hours":"Sun 21:05 – Fri 20:55"},{"instrument":"USD/MXN","spread":"28.0","leverage":"1:100","swapLong":"-152.00","swapShort":"48.60","hours":"Sun 21:05 – Fri 20:55"},{"instrument":"USD/ZAR","spread":"45.0","leverage":"1:100","swapLong":"-118.40","swapShort":"32.75","hours":"Sun 21:05 – Fri 20:55"}]} footnote="Conditions are based on the most recent available trading data and may not represent today's trading conditions." searchLabel="Search currency pairs" />
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
## In use
|
|
238
|
+
|
|
239
|
+
### Searching and paging a long set
|
|
240
|
+
|
|
241
|
+
Twenty currency pairs, ten to a page. Type a pair or a number and the rows thin out, the count says how many are left, and the pages follow.
|
|
242
|
+
|
|
243
|
+
```tsx
|
|
244
|
+
import { DataTable } from '@deriv-com/dds-marketing'
|
|
245
|
+
|
|
246
|
+
// Twenty rows, ten to a page
|
|
247
|
+
<DataTable title="Forex trading conditions" description="Spreads, leverage and swaps on Deriv MT5 Financial accounts." columns={[{"key":"instrument","label":"Instrument"},{"key":"spread","label":"Min spread","align":"end"},{"key":"leverage","label":"Max leverage","align":"end"},{"key":"swapLong","label":"Swap long (pts)","align":"end"},{"key":"swapShort","label":"Swap short (pts)","align":"end"},{"key":"hours","label":"Trading hours (GMT)"}]} rows={[{"instrument":"AUD/CAD","spread":"1.8","leverage":"1:1000","swapLong":"-3.12","swapShort":"-4.85","hours":"Sun 21:05 – Fri 20:55"},{"instrument":"AUD/JPY","spread":"1.4","leverage":"1:1000","swapLong":"2.21","swapShort":"-9.60","hours":"Sun 21:05 – Fri 20:55"},{"instrument":"AUD/NZD","spread":"2.2","leverage":"1:1000","swapLong":"-4.40","swapShort":"-2.95","hours":"Sun 21:05 – Fri 20:55"},{"instrument":"AUD/USD","spread":"0.6","leverage":"1:1000","swapLong":"-2.75","swapShort":"-1.32","hours":"Sun 21:05 – Fri 20:55"},{"instrument":"EUR/AUD","spread":"1.9","leverage":"1:1000","swapLong":"-9.84","swapShort":"2.10","hours":"Sun 21:05 – Fri 20:55"},{"instrument":"EUR/CAD","spread":"1.7","leverage":"1:1000","swapLong":"-7.02","swapShort":"1.18","hours":"Sun 21:05 – Fri 20:55"},{"instrument":"EUR/CHF","spread":"1.5","leverage":"1:1000","swapLong":"-0.92","swapShort":"-5.36","hours":"Sun 21:05 – Fri 20:55"},{"instrument":"EUR/GBP","spread":"0.9","leverage":"1:1000","swapLong":"-4.61","swapShort":"-0.70","hours":"Sun 21:05 – Fri 20:55"},{"instrument":"EUR/JPY","spread":"1.2","leverage":"1:1000","swapLong":"1.85","swapShort":"-11.40","hours":"Sun 21:05 – Fri 20:55"},{"instrument":"EUR/USD","spread":"0.5","leverage":"1:1000","swapLong":"-7.35","swapShort":"2.44","hours":"Sun 21:05 – Fri 20:55"},{"instrument":"GBP/AUD","spread":"2.4","leverage":"1:1000","swapLong":"-6.10","swapShort":"-3.95","hours":"Sun 21:05 – Fri 20:55"},{"instrument":"GBP/CHF","spread":"2.1","leverage":"1:1000","swapLong":"1.02","swapShort":"-9.88","hours":"Sun 21:05 – Fri 20:55"},{"instrument":"GBP/JPY","spread":"1.8","leverage":"1:1000","swapLong":"4.96","swapShort":"-16.20","hours":"Sun 21:05 – Fri 20:55"},{"instrument":"GBP/USD","spread":"0.8","leverage":"1:1000","swapLong":"-3.50","swapShort":"-0.48","hours":"Sun 21:05 – Fri 20:55"},{"instrument":"NZD/USD","spread":"1.1","leverage":"1:1000","swapLong":"-2.20","swapShort":"-1.65","hours":"Sun 21:05 – Fri 20:55"},{"instrument":"USD/CAD","spread":"1.0","leverage":"1:1000","swapLong":"-0.85","swapShort":"-4.80","hours":"Sun 21:05 – Fri 20:55"},{"instrument":"USD/CHF","spread":"0.9","leverage":"1:1000","swapLong":"2.64","swapShort":"-8.15","hours":"Sun 21:05 – Fri 20:55"},{"instrument":"USD/JPY","spread":"0.7","leverage":"1:1000","swapLong":"8.12","swapShort":"-20.50","hours":"Sun 21:05 – Fri 20:55"},{"instrument":"USD/MXN","spread":"28.0","leverage":"1:100","swapLong":"-152.00","swapShort":"48.60","hours":"Sun 21:05 – Fri 20:55"},{"instrument":"USD/ZAR","spread":"45.0","leverage":"1:100","swapLong":"-118.40","swapShort":"32.75","hours":"Sun 21:05 – Fri 20:55"}]} footnote="Conditions are based on the most recent available trading data and may not represent today's trading conditions." searchLabel="Search currency pairs" />
|
|
248
|
+
|
|
249
|
+
// Fifteen to a page, on the grey band
|
|
250
|
+
<DataTable title="Forex trading conditions" description="Spreads, leverage and swaps on Deriv MT5 Financial accounts." columns={[{"key":"instrument","label":"Instrument"},{"key":"spread","label":"Min spread","align":"end"},{"key":"leverage","label":"Max leverage","align":"end"},{"key":"swapLong","label":"Swap long (pts)","align":"end"},{"key":"swapShort","label":"Swap short (pts)","align":"end"},{"key":"hours","label":"Trading hours (GMT)"}]} rows={[{"instrument":"AUD/CAD","spread":"1.8","leverage":"1:1000","swapLong":"-3.12","swapShort":"-4.85","hours":"Sun 21:05 – Fri 20:55"},{"instrument":"AUD/JPY","spread":"1.4","leverage":"1:1000","swapLong":"2.21","swapShort":"-9.60","hours":"Sun 21:05 – Fri 20:55"},{"instrument":"AUD/NZD","spread":"2.2","leverage":"1:1000","swapLong":"-4.40","swapShort":"-2.95","hours":"Sun 21:05 – Fri 20:55"},{"instrument":"AUD/USD","spread":"0.6","leverage":"1:1000","swapLong":"-2.75","swapShort":"-1.32","hours":"Sun 21:05 – Fri 20:55"},{"instrument":"EUR/AUD","spread":"1.9","leverage":"1:1000","swapLong":"-9.84","swapShort":"2.10","hours":"Sun 21:05 – Fri 20:55"},{"instrument":"EUR/CAD","spread":"1.7","leverage":"1:1000","swapLong":"-7.02","swapShort":"1.18","hours":"Sun 21:05 – Fri 20:55"},{"instrument":"EUR/CHF","spread":"1.5","leverage":"1:1000","swapLong":"-0.92","swapShort":"-5.36","hours":"Sun 21:05 – Fri 20:55"},{"instrument":"EUR/GBP","spread":"0.9","leverage":"1:1000","swapLong":"-4.61","swapShort":"-0.70","hours":"Sun 21:05 – Fri 20:55"},{"instrument":"EUR/JPY","spread":"1.2","leverage":"1:1000","swapLong":"1.85","swapShort":"-11.40","hours":"Sun 21:05 – Fri 20:55"},{"instrument":"EUR/USD","spread":"0.5","leverage":"1:1000","swapLong":"-7.35","swapShort":"2.44","hours":"Sun 21:05 – Fri 20:55"},{"instrument":"GBP/AUD","spread":"2.4","leverage":"1:1000","swapLong":"-6.10","swapShort":"-3.95","hours":"Sun 21:05 – Fri 20:55"},{"instrument":"GBP/CHF","spread":"2.1","leverage":"1:1000","swapLong":"1.02","swapShort":"-9.88","hours":"Sun 21:05 – Fri 20:55"},{"instrument":"GBP/JPY","spread":"1.8","leverage":"1:1000","swapLong":"4.96","swapShort":"-16.20","hours":"Sun 21:05 – Fri 20:55"},{"instrument":"GBP/USD","spread":"0.8","leverage":"1:1000","swapLong":"-3.50","swapShort":"-0.48","hours":"Sun 21:05 – Fri 20:55"},{"instrument":"NZD/USD","spread":"1.1","leverage":"1:1000","swapLong":"-2.20","swapShort":"-1.65","hours":"Sun 21:05 – Fri 20:55"},{"instrument":"USD/CAD","spread":"1.0","leverage":"1:1000","swapLong":"-0.85","swapShort":"-4.80","hours":"Sun 21:05 – Fri 20:55"},{"instrument":"USD/CHF","spread":"0.9","leverage":"1:1000","swapLong":"2.64","swapShort":"-8.15","hours":"Sun 21:05 – Fri 20:55"},{"instrument":"USD/JPY","spread":"0.7","leverage":"1:1000","swapLong":"8.12","swapShort":"-20.50","hours":"Sun 21:05 – Fri 20:55"},{"instrument":"USD/MXN","spread":"28.0","leverage":"1:100","swapLong":"-152.00","swapShort":"48.60","hours":"Sun 21:05 – Fri 20:55"},{"instrument":"USD/ZAR","spread":"45.0","leverage":"1:100","swapLong":"-118.40","swapShort":"32.75","hours":"Sun 21:05 – Fri 20:55"}]} footnote="Conditions are based on the most recent available trading data and may not represent today's trading conditions." searchLabel="Search currency pairs" ground="subtle" pageSize={15} />
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
### A short set on one page
|
|
254
|
+
|
|
255
|
+
Six commodities fit one page, so no pages are drawn — the search and the count stay, the heading carries no line under it.
|
|
256
|
+
|
|
257
|
+
```tsx
|
|
258
|
+
import { DataTable } from '@deriv-com/dds-marketing'
|
|
259
|
+
|
|
260
|
+
// Six rows, no pages
|
|
261
|
+
<DataTable title="Commodities" columns={[{"key":"instrument","label":"Instrument"},{"key":"contract","label":"Contract size","align":"end"},{"key":"minSize","label":"Min size","align":"end"},{"key":"spread","label":"Min spread","align":"end"},{"key":"margin","label":"Margin required","align":"end"},{"key":"hours","label":"Trading hours (GMT)"}]} rows={[{"instrument":"Gold / US Dollar","contract":"100 oz","minSize":"0.01","spread":"0.20","margin":"0.50%","hours":"Sun 23:05 – Fri 21:55"},{"instrument":"Silver / US Dollar","contract":"5,000 oz","minSize":"0.01","spread":"0.025","margin":"1.00%","hours":"Sun 23:05 – Fri 21:55"},{"instrument":"Platinum / US Dollar","contract":"100 oz","minSize":"0.01","spread":"2.10","margin":"2.00%","hours":"Sun 23:05 – Fri 21:55"},{"instrument":"Palladium / US Dollar","contract":"100 oz","minSize":"0.01","spread":"6.50","margin":"2.00%","hours":"Sun 23:05 – Fri 21:55"},{"instrument":"US Oil","contract":"1,000 bbl","minSize":"0.01","spread":"0.03","margin":"1.00%","hours":"Mon 01:05 – Fri 21:55"},{"instrument":"UK Brent Oil","contract":"1,000 bbl","minSize":"0.01","spread":"0.03","margin":"1.00%","hours":"Mon 01:05 – Fri 21:55"}]} searchLabel="Search commodities" footnote="Conditions are based on the most recent available trading data and may not represent today's trading conditions." />
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
### On the dark band
|
|
265
|
+
|
|
266
|
+
The heading and the small print turn white; the frame stays the light surface it is on every ground, with its own ink.
|
|
267
|
+
|
|
268
|
+
```tsx
|
|
269
|
+
import { DataTable } from '@deriv-com/dds-marketing'
|
|
270
|
+
|
|
271
|
+
// ground="strong"
|
|
272
|
+
<DataTable ground="strong" title="Synthetic indices" description="Markets that run around the clock, with volatility set by a published algorithm." columns={[{"key":"instrument","label":"Instrument"},{"key":"minSize","label":"Min size","align":"end"},{"key":"volLimit","label":"Vol limit","align":"end"},{"key":"spread","label":"Min spread","align":"end"},{"key":"leverage","label":"Max leverage","align":"end"},{"key":"hours","label":"Trading hours (GMT)"}]} rows={[{"instrument":"Volatility 10 Index","minSize":"0.5","volLimit":"100","spread":"0.004","leverage":"1:1000","hours":"Open 24/7"},{"instrument":"Volatility 25 Index","minSize":"0.5","volLimit":"100","spread":"0.096","leverage":"1:1000","hours":"Open 24/7"},{"instrument":"Volatility 50 Index","minSize":"4.0","volLimit":"100","spread":"0.026","leverage":"1:1000","hours":"Open 24/7"},{"instrument":"Volatility 75 Index","minSize":"0.001","volLimit":"50","spread":"57.37","leverage":"1:1000","hours":"Open 24/7"},{"instrument":"Volatility 100 Index","minSize":"0.5","volLimit":"100","spread":"0.081","leverage":"1:1000","hours":"Open 24/7"},{"instrument":"Boom 500 Index","minSize":"0.2","volLimit":"150","spread":"0.270","leverage":"1:600","hours":"Open 24/7"},{"instrument":"Boom 1000 Index","minSize":"0.2","volLimit":"250","spread":"1.572","leverage":"1:600","hours":"Open 24/7"},{"instrument":"Crash 500 Index","minSize":"0.2","volLimit":"150","spread":"0.260","leverage":"1:600","hours":"Open 24/7"},{"instrument":"Crash 1000 Index","minSize":"0.2","volLimit":"250","spread":"1.040","leverage":"1:600","hours":"Open 24/7"},{"instrument":"Jump 10 Index","minSize":"0.01","volLimit":"100","spread":"0.220","leverage":"1:1000","hours":"Open 24/7"},{"instrument":"Jump 25 Index","minSize":"0.01","volLimit":"100","spread":"0.560","leverage":"1:1000","hours":"Open 24/7"},{"instrument":"Jump 50 Index","minSize":"0.01","volLimit":"100","spread":"1.110","leverage":"1:1000","hours":"Open 24/7"},{"instrument":"Step Index","minSize":"0.1","volLimit":"300","spread":"0.100","leverage":"1:1000","hours":"Open 24/7"},{"instrument":"Range Break 100 Index","minSize":"0.01","volLimit":"20","spread":"0.800","leverage":"1:100","hours":"Open 24/7"}]} searchLabel="Search synthetic indices" footnote="Conditions are based on the most recent available trading data and may not represent today's trading conditions." />
|
|
273
|
+
```
|