@deriv-com/dds-marketing 1.1.1 → 1.1.3
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 +4 -0
- package/.llm/components/accordionitem.md +4 -0
- package/.llm/components/aspectratio.md +4 -0
- package/.llm/components/awards.md +4 -0
- package/.llm/components/background.md +4 -0
- package/.llm/components/badge.md +7 -3
- package/.llm/components/bottomsheet.md +7 -3
- package/.llm/components/breadcrumb.md +4 -0
- package/.llm/components/breadcrumbitem.md +4 -0
- package/.llm/components/button.md +4 -0
- package/.llm/components/buttonicon.md +10 -6
- package/.llm/components/card.md +5 -1
- package/.llm/components/cardbody.md +5 -1
- package/.llm/components/cardbutton.md +4 -0
- package/.llm/components/checkbox.md +1 -1
- package/.llm/components/comparisoncards.md +4 -0
- package/.llm/components/comparisontable.md +4 -0
- package/.llm/components/ctabanner.md +4 -0
- package/.llm/components/ctabannerslider.md +4 -0
- package/.llm/components/datatable.md +4 -0
- package/.llm/components/divider.md +4 -0
- package/.llm/components/downloadbanner.md +4 -0
- package/.llm/components/dropdownmenu.md +9 -5
- package/.llm/components/estimator.md +336 -0
- package/.llm/components/faqaccordion.md +4 -0
- package/.llm/components/featurebullets.md +4 -0
- package/.llm/components/featurecards.md +5 -1
- package/.llm/components/featurecardscarousel.md +4 -0
- package/.llm/components/featurescroll.md +5 -1
- package/.llm/components/featuresplit.md +4 -0
- package/.llm/components/featurestack.md +4 -0
- package/.llm/components/filterchip.md +5 -1
- package/.llm/components/footer.md +4 -0
- package/.llm/components/footergroup.md +4 -0
- package/.llm/components/grid.md +4 -0
- package/.llm/components/icon.md +9 -5
- package/.llm/components/illustrationcard.md +4 -0
- package/.llm/components/illustrationscene.md +4 -0
- package/.llm/components/imagebanner.md +6 -2
- package/.llm/components/landinghero.md +4 -0
- package/.llm/components/link.md +5 -1
- package/.llm/components/logocolumns.md +4 -0
- package/.llm/components/logorows.md +4 -0
- package/.llm/components/menuitem.md +6 -2
- package/.llm/components/navbar.md +5 -1
- package/.llm/components/navbaritem.md +4 -0
- package/.llm/components/navbarmenu.md +4 -0
- package/.llm/components/navbarmenugroup.md +4 -0
- package/.llm/components/navbarpanel.md +4 -0
- package/.llm/components/navbarswitcher.md +10 -6
- package/.llm/components/navbarswitcheroption.md +4 -0
- package/.llm/components/option.md +5 -1
- package/.llm/components/pageheader.md +4 -0
- package/.llm/components/pagination.md +4 -0
- package/.llm/components/paginationdots.md +4 -0
- package/.llm/components/producthero.md +4 -0
- package/.llm/components/removablechip.md +5 -1
- package/.llm/components/resourcebanner.md +4 -0
- package/.llm/components/row.md +4 -0
- package/.llm/components/scenescroll.md +4 -0
- package/.llm/components/scroller.md +4 -0
- package/.llm/components/searchinput.md +4 -0
- package/.llm/components/segmentedcontrol.md +5 -1
- package/.llm/components/segmentedcontrolitem.md +6 -2
- package/.llm/components/select.md +4 -0
- package/.llm/components/selectchip.md +4 -0
- package/.llm/components/spinner.md +4 -0
- package/.llm/components/stack.md +4 -0
- package/.llm/components/stats.md +4 -0
- package/.llm/components/statusdot.md +4 -0
- package/.llm/components/steps.md +18 -6
- package/.llm/components/stickycards.md +4 -0
- package/.llm/components/subdomainnavbar.md +5 -1
- package/.llm/components/tab.md +6 -2
- package/.llm/components/table.md +4 -0
- package/.llm/components/tablebody.md +4 -0
- package/.llm/components/tablecell.md +4 -0
- package/.llm/components/tablehead.md +4 -0
- package/.llm/components/tableheadercell.md +4 -0
- package/.llm/components/tablerow.md +4 -0
- package/.llm/components/tablist.md +4 -0
- package/.llm/components/teamgrid.md +4 -0
- package/.llm/components/testimonialrow.md +4 -0
- package/.llm/components/testimonialslider.md +4 -0
- package/.llm/components/textarea.md +4 -0
- package/.llm/components/textinput.md +5 -1
- package/.llm/components/textscroll.md +4 -0
- package/.llm/components/tiers.md +4 -0
- package/.llm/components/typography.md +4 -0
- package/.llm/digest/accordion.md +1 -1
- package/.llm/digest/accordionitem.md +1 -1
- package/.llm/digest/aspectratio.md +1 -1
- package/.llm/digest/awards.md +1 -1
- package/.llm/digest/background.md +1 -1
- package/.llm/digest/badge.md +1 -1
- package/.llm/digest/bottomsheet.md +1 -1
- package/.llm/digest/breadcrumb.md +1 -1
- package/.llm/digest/breadcrumbitem.md +1 -1
- package/.llm/digest/button.md +1 -1
- package/.llm/digest/buttonicon.md +1 -1
- package/.llm/digest/card.md +1 -1
- package/.llm/digest/cardbody.md +1 -1
- package/.llm/digest/cardbutton.md +1 -1
- package/.llm/digest/checkbox.md +1 -1
- package/.llm/digest/comparisoncards.md +1 -1
- package/.llm/digest/comparisontable.md +1 -1
- package/.llm/digest/ctabanner.md +1 -1
- package/.llm/digest/ctabannerslider.md +1 -1
- package/.llm/digest/datatable.md +1 -1
- package/.llm/digest/divider.md +1 -1
- package/.llm/digest/downloadbanner.md +1 -1
- package/.llm/digest/dropdownmenu.md +1 -1
- package/.llm/digest/estimator.md +66 -0
- package/.llm/digest/faqaccordion.md +1 -1
- package/.llm/digest/featurebullets.md +1 -1
- package/.llm/digest/featurecards.md +1 -1
- package/.llm/digest/featurecardscarousel.md +1 -1
- package/.llm/digest/featurescroll.md +1 -1
- package/.llm/digest/featuresplit.md +1 -1
- package/.llm/digest/featurestack.md +1 -1
- package/.llm/digest/filterchip.md +1 -1
- package/.llm/digest/footer.md +1 -1
- package/.llm/digest/footergroup.md +1 -1
- package/.llm/digest/grid.md +1 -1
- package/.llm/digest/icon.md +1 -1
- package/.llm/digest/illustrationcard.md +1 -1
- package/.llm/digest/illustrationscene.md +1 -1
- package/.llm/digest/imagebanner.md +2 -2
- package/.llm/digest/landinghero.md +1 -1
- package/.llm/digest/link.md +1 -1
- package/.llm/digest/logocolumns.md +1 -1
- package/.llm/digest/logorows.md +1 -1
- package/.llm/digest/menuitem.md +1 -1
- package/.llm/digest/navbar.md +1 -1
- package/.llm/digest/navbaritem.md +1 -1
- package/.llm/digest/navbarmenu.md +1 -1
- package/.llm/digest/navbarmenugroup.md +1 -1
- package/.llm/digest/navbarpanel.md +1 -1
- package/.llm/digest/navbarswitcher.md +1 -1
- package/.llm/digest/navbarswitcheroption.md +1 -1
- package/.llm/digest/option.md +1 -1
- package/.llm/digest/pageheader.md +1 -1
- package/.llm/digest/pagination.md +1 -1
- package/.llm/digest/paginationdots.md +1 -1
- package/.llm/digest/producthero.md +1 -1
- package/.llm/digest/removablechip.md +1 -1
- package/.llm/digest/resourcebanner.md +1 -1
- package/.llm/digest/row.md +1 -1
- package/.llm/digest/scenescroll.md +1 -1
- package/.llm/digest/scroller.md +1 -1
- package/.llm/digest/searchinput.md +1 -1
- package/.llm/digest/segmentedcontrol.md +1 -1
- package/.llm/digest/segmentedcontrolitem.md +2 -2
- package/.llm/digest/select.md +1 -1
- package/.llm/digest/selectchip.md +1 -1
- package/.llm/digest/spinner.md +1 -1
- package/.llm/digest/stack.md +1 -1
- package/.llm/digest/stats.md +1 -1
- package/.llm/digest/statusdot.md +1 -1
- package/.llm/digest/steps.md +3 -3
- package/.llm/digest/stickycards.md +1 -1
- package/.llm/digest/subdomainnavbar.md +1 -1
- package/.llm/digest/tab.md +1 -1
- package/.llm/digest/table.md +1 -1
- package/.llm/digest/tablebody.md +1 -1
- package/.llm/digest/tablecell.md +1 -1
- package/.llm/digest/tablehead.md +1 -1
- package/.llm/digest/tableheadercell.md +1 -1
- package/.llm/digest/tablerow.md +1 -1
- package/.llm/digest/tablist.md +1 -1
- package/.llm/digest/teamgrid.md +1 -1
- package/.llm/digest/testimonialrow.md +1 -1
- package/.llm/digest/testimonialslider.md +1 -1
- package/.llm/digest/textarea.md +1 -1
- package/.llm/digest/textinput.md +1 -1
- package/.llm/digest/textscroll.md +1 -1
- package/.llm/digest/tiers.md +1 -1
- package/.llm/digest/typography.md +1 -1
- package/.llm/index.md +2 -1
- package/.llm/tokens.md +5 -0
- package/AGENTS.md +1 -0
- package/README.md +28 -3
- package/dist/components/blocks/block-parallax.css +62 -0
- package/dist/components/blocks/comparison-cards/comparison-cards-impl.css +0 -12
- package/dist/components/blocks/download-banner/DownloadBanner.d.ts +1 -0
- package/dist/components/blocks/download-banner/DownloadBanner.js +2 -1
- package/dist/components/blocks/estimator/Estimator.css +206 -0
- package/dist/components/blocks/estimator/Estimator.d.ts +27 -0
- package/dist/components/blocks/estimator/Estimator.js +61 -0
- package/dist/components/blocks/estimator/Estimator.types.d.ts +63 -0
- package/dist/components/blocks/estimator/Estimator.types.js +25 -0
- package/dist/components/blocks/estimator/estimator-impl.css +159 -0
- package/dist/components/blocks/feature-bullets/FeatureBullets.d.ts +1 -0
- package/dist/components/blocks/feature-bullets/FeatureBullets.js +2 -1
- package/dist/components/blocks/feature-cards/FeatureCards.d.ts +1 -0
- package/dist/components/blocks/feature-cards/FeatureCards.js +1 -0
- package/dist/components/blocks/feature-scroll/FeatureScroll.js +9 -3
- package/dist/components/blocks/feature-scroll/feature-scroll-impl.css +63 -40
- package/dist/components/blocks/feature-split/FeatureSplit.d.ts +1 -0
- package/dist/components/blocks/feature-split/FeatureSplit.js +2 -1
- package/dist/components/blocks/feature-stack/FeatureStack.d.ts +1 -0
- package/dist/components/blocks/feature-stack/FeatureStack.js +2 -1
- package/dist/components/blocks/image-banner/ImageBanner.d.ts +1 -0
- package/dist/components/blocks/image-banner/ImageBanner.js +2 -1
- package/dist/components/blocks/image-banner/ImageBanner.types.d.ts +2 -2
- package/dist/components/blocks/image-banner/ImageBanner.types.js +1 -1
- package/dist/components/blocks/image-banner/image-banner-impl.css +7 -51
- package/dist/components/blocks/landing-hero/LandingHero.css +1 -1
- package/dist/components/blocks/landing-hero/LandingHero.d.ts +1 -0
- package/dist/components/blocks/landing-hero/LandingHero.js +2 -1
- package/dist/components/blocks/product-hero/ProductHero.css +1 -1
- package/dist/components/blocks/product-hero/ProductHero.d.ts +1 -0
- package/dist/components/blocks/product-hero/ProductHero.js +2 -1
- package/dist/components/blocks/steps/Steps.css +2 -2
- package/dist/components/blocks/steps/Steps.d.ts +1 -0
- package/dist/components/blocks/steps/Steps.js +3 -2
- package/dist/components/blocks/steps/Steps.types.d.ts +1 -1
- package/dist/components/blocks/steps/steps-impl.css +76 -4
- package/dist/components/blocks/steps/use-turn.d.ts +8 -8
- package/dist/components/blocks/steps/use-turn.js +19 -16
- package/dist/components/blocks/team-grid/TeamGrid.d.ts +1 -0
- package/dist/components/blocks/team-grid/TeamGrid.js +2 -1
- package/dist/components/core/card/Card.css +1 -1
- package/dist/components/core/segmented-control-item/SegmentedControlItem.types.d.ts +1 -1
- package/dist/components/core/select/Select.css +2 -0
- package/dist/components/core/select/select-impl.css +58 -0
- package/dist/components/core/text-area/TextArea.css +2 -0
- package/dist/components/core/text-area/text-area-impl.css +54 -0
- package/dist/components/core/text-input/TextInput.css +2 -0
- package/dist/components/core/text-input/text-input-impl.css +63 -0
- package/dist/components/estimator-data.d.ts +29 -0
- package/dist/components/estimator-data.js +12 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/components/index.js +2 -0
- package/dist/icons/accounts.d.ts +1 -0
- package/dist/icons/accounts.js +1 -0
- package/dist/icons/app-stores.d.ts +1 -0
- package/dist/icons/app-stores.js +1 -0
- package/dist/icons/currency.d.ts +1 -0
- package/dist/icons/currency.js +1 -0
- package/dist/icons/flag.d.ts +1 -0
- package/dist/icons/flag.js +1 -0
- package/dist/icons/illustrative.d.ts +1 -0
- package/dist/icons/illustrative.js +1 -0
- package/dist/icons/index.d.ts +1 -0
- package/dist/icons/index.js +4 -0
- package/dist/icons/markets.d.ts +1 -0
- package/dist/icons/markets.js +1 -0
- package/dist/icons/social.d.ts +1 -0
- package/dist/icons/social.js +1 -0
- package/dist/icons/system.d.ts +1 -0
- package/dist/icons/system.js +1 -0
- package/dist/icons/trade.d.ts +1 -0
- package/dist/icons/trade.js +1 -0
- package/dist/marketing.css +10 -0
- package/package.json +44 -2
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
# LandingHero
|
|
4
4
|
|
|
5
|
+
Opens a main landing page with its headline over a dark background.
|
|
6
|
+
|
|
7
|
+
## Why it is built this way
|
|
8
|
+
|
|
5
9
|
The band that opens a main landing page: the one thing the page is about, said once, at the top, over a ground dark enough that nothing above it competes.
|
|
6
10
|
|
|
7
11
|
One of three opening bands, and the widest. Which one a page takes follows from where the page sits rather than from a prop — this is the landing tier, the front page and the campaign pages under it.
|
package/.llm/components/link.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
# Link
|
|
4
4
|
|
|
5
|
+
Takes the visitor to another page, inline or on its own.
|
|
6
|
+
|
|
7
|
+
## Why it is built this way
|
|
8
|
+
|
|
5
9
|
A destination named inside a sentence, or standing on its own under one. Inside a sentence it takes everything from the copy around it — the size, the face, the ink — and is told apart by an underline alone. On its own line it takes the brand ink and a mark instead, because there is no sentence to belong to.
|
|
6
10
|
|
|
7
11
|
Button is the other half of this, and the two are the same act — go somewhere — at different volumes. A Button is a pill a reader aims at; a Link is words a reader is already reading. The test is whether taking it out would leave a hole in the sentence: if it would, it is a link, and if the sentence would read fine without it, the page wanted a Button.
|
|
@@ -349,7 +353,7 @@ Standalone only, and solid like the arrow — every glyph on a standalone link t
|
|
|
349
353
|
|
|
350
354
|
```tsx
|
|
351
355
|
import { Link } from '@deriv-com/dds-marketing'
|
|
352
|
-
import { FileShieldSolidIcon, WalletSolidIcon } from '@deriv-com/
|
|
356
|
+
import { FileShieldSolidIcon, WalletSolidIcon } from '@deriv-com/dds-marketing/icons'
|
|
353
357
|
|
|
354
358
|
// A destination with a mark of its own
|
|
355
359
|
<Link href="/licence" iconLeading={<FileShieldSolidIcon />}>Read the licence</Link>
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
# LogoColumns
|
|
4
4
|
|
|
5
|
+
Backs a claim with two columns of logos that scroll in opposite directions.
|
|
6
|
+
|
|
7
|
+
## Why it is built this way
|
|
8
|
+
|
|
5
9
|
A section that backs one claim with the names behind it: a heading, a line, an optional disclaimer and a way onward, beside a wall of logo tiles in two columns that run in opposite directions as the reader scrolls past — one rising, one falling — fading out at the wall's top and bottom edge so the set reads as longer than the space it is shown in.
|
|
6
10
|
|
|
7
11
|
The reference design's LogoMarquee, renamed for what it is: FeatureSplit's arrangement with a logo wall where the picture goes, rather than a marquee, which is a strip that runs sideways on its own. The movement is the scroll's — it never moves while the page is still, and never for a reader who asked for less motion.
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
# LogoRows
|
|
4
4
|
|
|
5
|
+
Backs a claim with two rows of logos that slide in opposite directions.
|
|
6
|
+
|
|
7
|
+
## Why it is built this way
|
|
8
|
+
|
|
5
9
|
A section that backs one claim with the names behind it, stacked: a heading, a line and a way onward, centred, over two rows of logo tiles across the band's full width that slide sideways in opposite directions as the reader scrolls past — fading out at both of their ends, so the set reads as longer than the band.
|
|
6
10
|
|
|
7
11
|
LogoColumns' horizontal form, for a page where the claim leads and the logos sign it off: the words over the rows rather than beside a wall. The movement is the scroll's — it never moves while the page is still, and never for a reader who asked for less motion.
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
# MenuItem
|
|
4
4
|
|
|
5
|
+
One item in a DropdownMenu.
|
|
6
|
+
|
|
7
|
+
## Why it is built this way
|
|
8
|
+
|
|
5
9
|
One command in a menu. Pressing it does something and the menu shuts — it holds no value and carries no mark, so there is nothing about it to find on reopening.
|
|
6
10
|
|
|
7
11
|
It ships ahead of its host, and that is worth saying plainly: its role is menuitem, which means nothing to a screen reader outside an element whose role is menu. On its own it is a row that looks right and announces wrong. DropdownMenu is what makes it a component rather than a fragment, and until that lands this is a contract and a stylesheet waiting for one.
|
|
@@ -175,7 +179,7 @@ Two things genuinely have no logical form and are not covered by this. A CSS gra
|
|
|
175
179
|
|
|
176
180
|
```tsx
|
|
177
181
|
import { MenuItem } from '@deriv-com/dds-marketing'
|
|
178
|
-
import { GlobeRegularIcon } from '@deriv-com/
|
|
182
|
+
import { GlobeRegularIcon } from '@deriv-com/dds-marketing/icons'
|
|
179
183
|
|
|
180
184
|
<MenuItem onSelect={() => { /* your handler */ }} icon={<GlobeRegularIcon />}>English</MenuItem>
|
|
181
185
|
```
|
|
@@ -188,7 +192,7 @@ The rows a marketing menu holds: short labels a reader chooses between, not oper
|
|
|
188
192
|
|
|
189
193
|
```tsx
|
|
190
194
|
import { MenuItem } from '@deriv-com/dds-marketing'
|
|
191
|
-
import { GlobeRegularIcon } from '@deriv-com/
|
|
195
|
+
import { GlobeRegularIcon } from '@deriv-com/dds-marketing/icons'
|
|
192
196
|
|
|
193
197
|
// With a mark, for a set read by shape
|
|
194
198
|
<MenuItem onSelect={() => { /* your handler */ }} icon={<GlobeRegularIcon />}>English</MenuItem>
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
# Navbar
|
|
4
4
|
|
|
5
|
+
The bar across the top of a marketing page: logo, links and actions.
|
|
6
|
+
|
|
7
|
+
## Why it is built this way
|
|
8
|
+
|
|
5
9
|
The bar across the top of a marketing page, and three regions: the mark that says whose site this is, the places the site has, and the things a reader reaches for rather than navigates to — the language, the theme, and what the site wants them to do.
|
|
6
10
|
|
|
7
11
|
It holds no destinations of its own. What goes in it is the NavbarItems and NavbarMenus a page composes, because a marketing site's navigation is written by the site rather than enumerated by this system, and a component that took an array of routes would be a second router nobody asked for. What this owns is the bar: where it sits, what it is made of, and what happens when it runs out of room.
|
|
@@ -509,7 +513,7 @@ The language is a NavbarSwitcher in preferences. The theme is a toggle the bar d
|
|
|
509
513
|
```tsx
|
|
510
514
|
import { Button, Navbar, NavbarSwitcher, NavbarSwitcherOption } from '@deriv-com/dds-marketing'
|
|
511
515
|
import { DerivCoralWordmark } from '@deriv-com/quill-logos-web'
|
|
512
|
-
import { GlobeRegularIcon } from '@deriv-com/
|
|
516
|
+
import { GlobeRegularIcon } from '@deriv-com/dds-marketing/icons'
|
|
513
517
|
|
|
514
518
|
// Language only
|
|
515
519
|
<Navbar label="Main" menuLabel="Menu" closeLabel="Close" brand={<DerivCoralWordmark />} utilities={<Button size="md" href="/signup">Open account</Button>} preferences={<NavbarSwitcher label="EN" menuLabel="Language" backLabel="Back to the menu" icon={<GlobeRegularIcon />} />}>{navbaritems}</Navbar>
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
# NavbarItem
|
|
4
4
|
|
|
5
|
+
One link in the Navbar.
|
|
6
|
+
|
|
7
|
+
## Why it is built this way
|
|
8
|
+
|
|
5
9
|
One place the site has, in the bar across the top of it. An anchor with a target around it, a mark for the section the reader is currently in, and nothing else.
|
|
6
10
|
|
|
7
11
|
It exists rather than a Link being reused because a destination in a navigation bar carries something a Link cannot: which one the reader is on. That is `aria-current`, a target big enough to hit, and a resting shape the current one fills in — none of which belongs on the component a page also uses in the middle of a sentence. A Link is prose that leads somewhere; this is furniture.
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
# NavbarMenu
|
|
4
4
|
|
|
5
|
+
A Navbar item that opens a wide panel of links.
|
|
6
|
+
|
|
7
|
+
## Why it is built this way
|
|
8
|
+
|
|
5
9
|
A destination in the bar that opens rather than goes: a named trigger, and a wide panel beneath it holding the section's own destinations in columns, usually with something promotional beside them.
|
|
6
10
|
|
|
7
11
|
It is a button and not a link, which is the whole of why it is a component rather than a NavbarItem with extra parts. Pressing it reveals something on the page the reader is already on — no navigation, no history entry, and the back button has nothing to undo. An item that opened a panel while claiming to be a link would be wrong to the browser, to the back button and to every assistive technology at once.
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
# NavbarMenuGroup
|
|
4
4
|
|
|
5
|
+
A titled list of links inside a NavbarMenu panel.
|
|
6
|
+
|
|
7
|
+
## Why it is built this way
|
|
8
|
+
|
|
5
9
|
A named handful of destinations inside a section's panel: a word over a short list, so a reader scanning a panel of twenty links is reading four sets of five rather than twenty of anything.
|
|
6
10
|
|
|
7
11
|
The word is the whole point and it is not a heading. A panel opens inside a navigation landmark on a page that already has its own outline, and a heading element here would insert a level into that outline for something the reader never sees in the document — so what this draws is a label, and what it gives assistive technology is a named group. The two say the same thing by different means, which is the arrangement a panel like this has to reach for.
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
# NavbarPanel
|
|
4
4
|
|
|
5
|
+
The full site navigation for screens too narrow for the Navbar.
|
|
6
|
+
|
|
7
|
+
## Why it is built this way
|
|
8
|
+
|
|
5
9
|
The whole of a site's navigation at a width the bar cannot hold it: the mark and a way out across the top, the destinations down the middle, whatever the site wants across the foot.
|
|
6
10
|
|
|
7
11
|
It is a surface that covers the page, and three things follow from that which nothing about its appearance suggests — focus is held inside it, Escape closes it, and the document beneath holds still. Those are why it is a component rather than a stretch of markup a page writes, and they live in a hook beside it that a site building its own covering surface can reach for.
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
# NavbarSwitcher
|
|
4
4
|
|
|
5
|
+
Sets a site preference from the Navbar, such as language or theme.
|
|
6
|
+
|
|
7
|
+
## Why it is built this way
|
|
8
|
+
|
|
5
9
|
Something a reader sets rather than somewhere they go: the language the page is read in, the region its prices are in, the theme it is drawn in. It sits in a navigation bar beside the destinations and takes two quite different forms depending on where it is drawn.
|
|
6
10
|
|
|
7
11
|
In the bar it is a trigger and a menu hanging off it. In the collapsed panel it is a row that opens a page of its own, with a way back — because a menu inside a surface that already covers the screen is a surface inside a surface, and because a phone has room to show sixteen languages properly only if it stops showing everything else.
|
|
@@ -223,7 +227,7 @@ Two things genuinely have no logical form and are not covered by this. A CSS gra
|
|
|
223
227
|
|
|
224
228
|
```tsx
|
|
225
229
|
import { NavbarSwitcher, NavbarSwitcherOption, Icon } from '@deriv-com/dds-marketing'
|
|
226
|
-
import { GlobeRegularIcon } from '@deriv-com/
|
|
230
|
+
import { GlobeRegularIcon } from '@deriv-com/dds-marketing/icons'
|
|
227
231
|
|
|
228
232
|
<NavbarSwitcher label="EN" menuLabel="Language" backLabel="Back to the menu" icon={<Icon size="xs"><GlobeRegularIcon /></Icon>}>
|
|
229
233
|
<NavbarSwitcherOption current onSelect={() => { /* your handler */ }}>English</NavbarSwitcherOption>
|
|
@@ -244,7 +248,7 @@ import { GlobeRegularIcon } from '@deriv-com/quill-icons-web'
|
|
|
244
248
|
```tsx
|
|
245
249
|
import { useState } from 'react'
|
|
246
250
|
import { NavbarSwitcher, NavbarSwitcherOption, Icon } from '@deriv-com/dds-marketing'
|
|
247
|
-
import { GlobeRegularIcon } from '@deriv-com/
|
|
251
|
+
import { GlobeRegularIcon } from '@deriv-com/dds-marketing/icons'
|
|
248
252
|
|
|
249
253
|
// NavbarSwitcher holds nothing: open is the consumer's, and it does not move until
|
|
250
254
|
// the value handed back by onOpenChange is written to it.
|
|
@@ -296,7 +300,7 @@ The container decides, not the page. In a bar the choices hang off the trigger;
|
|
|
296
300
|
|
|
297
301
|
```tsx
|
|
298
302
|
import { Icon, NavbarSwitcher } from '@deriv-com/dds-marketing'
|
|
299
|
-
import { GlobeRegularIcon } from '@deriv-com/
|
|
303
|
+
import { GlobeRegularIcon } from '@deriv-com/dds-marketing/icons'
|
|
300
304
|
|
|
301
305
|
// floating — in the bar
|
|
302
306
|
<NavbarSwitcher label="EN" menuLabel="Language" backLabel="Back to the menu" icon={<Icon size="xs"><GlobeRegularIcon /></Icon>} open>{navbarswitcheroptions}</NavbarSwitcher>
|
|
@@ -311,7 +315,7 @@ The trigger shows the choice in force rather than the name of the question — a
|
|
|
311
315
|
|
|
312
316
|
```tsx
|
|
313
317
|
import { Icon, NavbarSwitcher } from '@deriv-com/dds-marketing'
|
|
314
|
-
import { GlobeRegularIcon } from '@deriv-com/
|
|
318
|
+
import { GlobeRegularIcon } from '@deriv-com/dds-marketing/icons'
|
|
315
319
|
|
|
316
320
|
// At rest — a mark and the current choice
|
|
317
321
|
<NavbarSwitcher label="EN" menuLabel="Language" backLabel="Back to the menu" icon={<Icon size="xs"><GlobeRegularIcon /></Icon>}>{navbarswitcheroptions}</NavbarSwitcher>
|
|
@@ -326,7 +330,7 @@ Only the tints move. The words take the ink around them either way, which is how
|
|
|
326
330
|
|
|
327
331
|
```tsx
|
|
328
332
|
import { Icon, NavbarSwitcher } from '@deriv-com/dds-marketing'
|
|
329
|
-
import { GlobeRegularIcon } from '@deriv-com/
|
|
333
|
+
import { GlobeRegularIcon } from '@deriv-com/dds-marketing/icons'
|
|
330
334
|
|
|
331
335
|
// default — a light bar
|
|
332
336
|
<NavbarSwitcher label="EN" menuLabel="Language" backLabel="Back to the menu" icon={<Icon size="xs"><GlobeRegularIcon /></Icon>}>{navbarswitcheroptions}</NavbarSwitcher>
|
|
@@ -341,7 +345,7 @@ Off by default, because a switcher usually stands among destinations that each c
|
|
|
341
345
|
|
|
342
346
|
```tsx
|
|
343
347
|
import { Icon, NavbarSwitcher } from '@deriv-com/dds-marketing'
|
|
344
|
-
import { GlobeRegularIcon } from '@deriv-com/
|
|
348
|
+
import { GlobeRegularIcon } from '@deriv-com/dds-marketing/icons'
|
|
345
349
|
|
|
346
350
|
// Without — among sections that have their own
|
|
347
351
|
<NavbarSwitcher label="EN" menuLabel="Language" backLabel="Back to the menu" icon={<Icon size="xs"><GlobeRegularIcon /></Icon>}>{navbarswitcheroptions}</NavbarSwitcher>
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
# NavbarSwitcherOption
|
|
4
4
|
|
|
5
|
+
One choice in a NavbarSwitcher, such as a language or theme.
|
|
6
|
+
|
|
7
|
+
## Why it is built this way
|
|
8
|
+
|
|
5
9
|
One choice inside a NavbarSwitcher: a language, a region, a theme. A button rather than a link — choosing one changes how the page is drawn or worded, which is not navigation and must not carry an href, a history entry or anything for the back button to undo.
|
|
6
10
|
|
|
7
11
|
It says which one is current. That is the whole reason this is a component rather than a MenuItem: a set of choices where the one in force is not marked is a set a reader has to remember the answer to, and the mark has to be readable as well as coloured — `aria-current` carries it for a reader who cannot see the ink.
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
# Option
|
|
4
4
|
|
|
5
|
+
One choice in a list that opens from a control.
|
|
6
|
+
|
|
7
|
+
## Why it is built this way
|
|
8
|
+
|
|
5
9
|
One answer on offer inside a control that opens a list. It knows what it is worth and what to call itself, and nothing about where it sits — whether it is the answer, whether the arrow keys are on it, and how tall to be are all passed down, because only the control can see the set. One row for every such control rather than one per control: what differs between one chip and the next is the trigger, never the row.
|
|
6
10
|
|
|
7
11
|
## Use when
|
|
@@ -230,7 +234,7 @@ For a set the reader knows by sight, where recognising beats reading. It takes t
|
|
|
230
234
|
|
|
231
235
|
```tsx
|
|
232
236
|
import { Option } from '@deriv-com/dds-marketing'
|
|
233
|
-
import { ChartCandlestickRegularIcon, CoinsRegularIcon } from '@deriv-com/
|
|
237
|
+
import { ChartCandlestickRegularIcon, CoinsRegularIcon } from '@deriv-com/dds-marketing/icons'
|
|
234
238
|
|
|
235
239
|
// A glyph the answer is known by
|
|
236
240
|
<Option value="forex" leadingIcon={<ChartCandlestickRegularIcon />}>Forex</Option>
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
# PageHeader
|
|
4
4
|
|
|
5
|
+
Opens a company or legal page with its title and one line of context.
|
|
6
|
+
|
|
7
|
+
## Why it is built this way
|
|
8
|
+
|
|
5
9
|
The band that opens a company or a legal page: the page's name, a line saying what it is, and nothing else.
|
|
6
10
|
|
|
7
11
|
The third of three opening bands and the only one that is not a hero. It is capped rather than a screen tall, which is the whole difference — a reader arrives at Contact or Terms for the content, and a full-height band would be a wall in front of the first sentence.
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
# Pagination
|
|
4
4
|
|
|
5
|
+
Moves the reader through a set too large to show at once.
|
|
6
|
+
|
|
7
|
+
## Why it is built this way
|
|
8
|
+
|
|
5
9
|
The control that moves a reader through a set too large to show at once. It sits beneath the index, archive or card set it governs, reports where in the sequence the reader stands, and offers the ways out of it — a step either side, a numbered target under one variant, a row of marks under another.
|
|
6
10
|
|
|
7
11
|
What separates this from product's is what a press is. A page of an index has an address of its own: page two of a blog is a place, and one a search engine has to be able to reach, so the numbered variant draws links and is given the URL of each page. A slide in a carousel is not a place and has no address, so its marks are buttons and the page handles the press. That is not a setting to choose — it is which variant you reached for, and the two cases arrive at different ends of this component.
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
# PaginationDots
|
|
4
4
|
|
|
5
|
+
Shows which item of a short sequence is in view.
|
|
6
|
+
|
|
7
|
+
## Why it is built this way
|
|
8
|
+
|
|
5
9
|
A row of marks, one per position in a short sequence — the slides of a slider, the steps of a walkthrough — with the one the reader is on drawn as a longer, solid pill and the rest as small translucent dots. Every mark is a button that moves there. It draws in the ink of whatever it stands on, so the same row reads white on a coral band and near-black on the page. Under autoplay it also moves on its own.
|
|
6
10
|
|
|
7
11
|
## Use when
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
# ProductHero
|
|
4
4
|
|
|
5
|
+
Opens a product or market page with a centred headline over a dark background.
|
|
6
|
+
|
|
7
|
+
## Why it is built this way
|
|
8
|
+
|
|
5
9
|
The band that opens a product or a market page: the one thing the page is about, centred, over a ground dark enough that nothing above it competes.
|
|
6
10
|
|
|
7
11
|
The second of three opening bands. Which one a page takes follows from where the page sits rather than from a prop — this is the product tier, one thing a reader can trade or one market to trade it in.
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
# RemovableChip
|
|
4
4
|
|
|
5
|
+
Shows one applied item, such as a filter or tag, that can be removed.
|
|
6
|
+
|
|
7
|
+
## Why it is built this way
|
|
8
|
+
|
|
5
9
|
A token standing for one thing that is already in play — a topic the reader has filtered by, a tag on an article, a market they have picked out — which they can take back out. It shows a set as it stands, and the only thing it does is go. Reach for one where a marketing page keeps a visible record of what the reader has narrowed to, and each piece of it has to be droppable on its own.
|
|
6
10
|
|
|
7
11
|
## Use when
|
|
@@ -203,7 +207,7 @@ A painted brand ground where a FilterChip at rest carries an outline — which s
|
|
|
203
207
|
|
|
204
208
|
```tsx
|
|
205
209
|
import { RemovableChip } from '@deriv-com/dds-marketing'
|
|
206
|
-
import { ChartCandlestickRegularIcon } from '@deriv-com/
|
|
210
|
+
import { ChartCandlestickRegularIcon } from '@deriv-com/dds-marketing/icons'
|
|
207
211
|
|
|
208
212
|
// One narrowing, droppable on its own
|
|
209
213
|
<RemovableChip onRemove={() => { /* your handler */ }} label="Market news" />
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
# ResourceBanner
|
|
4
4
|
|
|
5
|
+
A dark panel that points readers to related guides and reference pages.
|
|
6
|
+
|
|
7
|
+
## Why it is built this way
|
|
8
|
+
|
|
5
9
|
A dark panel at the end of an informational section that points readers at related guides, policies or reference pages — the "here's where to read more" block. A heading and a line on one side, a stacked list of links on the other.
|
|
6
10
|
|
|
7
11
|
The reference site's ResourceBanner, named the same. The links are a list at every width, so one link and four read the same way: a reader counts them and picks one, and none of them is a call to action.
|
package/.llm/components/row.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
# Row
|
|
4
4
|
|
|
5
|
+
Lays items out in a line with consistent spacing.
|
|
6
|
+
|
|
7
|
+
## Why it is built this way
|
|
8
|
+
|
|
5
9
|
A line, and one measure between the things on it. It draws nothing — no ground, no edge, no padding — and owns one decision: how far apart the things beside one another sit. Everything else about them stays theirs.
|
|
6
10
|
|
|
7
11
|
It is Stack's twin and not Stack with a direction, because a line and a column are asked different questions. Two of the props here mean nothing down a column: a line can run out of room and break, which a column cannot, and a line can sit its items on one another's first line of text, which a column has no use for. Put both on one component with a direction and half its surface is inert at any moment — a prop that does nothing is a prop a reader has to test to learn about.
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
# SceneScroll
|
|
4
4
|
|
|
5
|
+
Two full-screen photo scenes that cross-fade as the reader scrolls.
|
|
6
|
+
|
|
7
|
+
## Why it is built this way
|
|
8
|
+
|
|
5
9
|
A full-screen section of two scenes — each a photograph filling the band with a heading and a line over it — that change over as the reader scrolls: the screen holds still while the second photograph dissolves in over the first and the first scene's words give way to the second's. Two states of one thing told by the scroll — day and night, before and after, the market open and the market that never closes.
|
|
6
10
|
|
|
7
11
|
The reference design's DayNightTransition, made generic: nothing in it is about the time of day. The change-over is scrubbed by the scroll itself and run by the stylesheet alone — the section is a tall track whose view timeline drives the dissolve while a screen-tall stage stays pinned inside it — so it runs forward as the reader scrolls down, back as they scroll up, and stands still while the page does. Without a scroll timeline, for a reader who asked for less motion, and before any script, the two scenes are simply drawn one after the other, each a screen tall, with both sets of words readable.
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
# Scroller
|
|
4
4
|
|
|
5
|
+
Lays items out in a horizontally scrolling rail.
|
|
6
|
+
|
|
7
|
+
## Why it is built this way
|
|
8
|
+
|
|
5
9
|
A rail, and one measure between the things on it. It draws nothing — no ground, no edge, no padding — and owns one decision: that a set too long for the space stays on one line and the reader moves along it.
|
|
6
10
|
|
|
7
11
|
It is the third answer to a line that has run out of room, and the only one that keeps the order intact. A Row squashes its items or lets them fall onto a second line where nothing aligns; a Grid puts them in tracks and gives up the sequence; this keeps them where they were put and hands the reader the overflow. Where the order is the content — a timeline, a set of steps, a run of testimonials, a rail of logos — that is the difference between a component that shows the set and one that rearranges it.
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
# SearchInput
|
|
4
4
|
|
|
5
|
+
A field for searching a help centre, blog or directory.
|
|
6
|
+
|
|
7
|
+
## Why it is built this way
|
|
8
|
+
|
|
5
9
|
A query a visitor types to find something the page did not put in front of them — a help centre, a blog or docs index, a directory of markets. It reports the query and nothing else: what gets searched, how, and what an empty result says all belong to the page, because a field that decided any of that would be wrong for the next list.
|
|
6
10
|
|
|
7
11
|
It is its own component rather than a TextInput with a magnifier in it, and the two things that make it one are the gesture and the escape. A search commits — on Enter, or as each keystroke filters — where a field in a form waits for a submit button that belongs to the form. And Escape clears it, which no other field here does, because a query is a thing a reader abandons rather than corrects.
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
# SegmentedControl
|
|
4
4
|
|
|
5
|
+
Picks exactly one option from a short set of joined segments.
|
|
6
|
+
|
|
7
|
+
## Why it is built this way
|
|
8
|
+
|
|
5
9
|
A row of joined segments from which exactly one is chosen, drawn from a short set of alternatives that exclude each other. What the reader picks sets a value the page beside it consumes — a billing period, a currency, a platform — rather than moving them anywhere.
|
|
6
10
|
|
|
7
11
|
It holds which segment is chosen, how tall they all are, and whether the choice can be made at all. Those three belong to the row because no segment can answer them: only one may be current and a segment cannot see its siblings, a row at mixed heights is not a row, and closing one option is a different statement from closing the question.
|
|
@@ -356,7 +360,7 @@ Two payment methods a reader tells apart faster by the mark than by the noun. A
|
|
|
356
360
|
|
|
357
361
|
```tsx
|
|
358
362
|
import { SegmentedControl, SegmentedControlItem } from '@deriv-com/dds-marketing'
|
|
359
|
-
import { ChartCandlestickRegularIcon, GlobeRegularIcon } from '@deriv-com/
|
|
363
|
+
import { ChartCandlestickRegularIcon, GlobeRegularIcon } from '@deriv-com/dds-marketing/icons'
|
|
360
364
|
|
|
361
365
|
// Marks beside the words
|
|
362
366
|
<SegmentedControl label="Payment method">
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
# SegmentedControlItem
|
|
4
4
|
|
|
5
|
+
One option in a SegmentedControl.
|
|
6
|
+
|
|
7
|
+
## Why it is built this way
|
|
8
|
+
|
|
5
9
|
One option in a segmented control, and nothing on its own — a segment says it is the chosen one of a set, and a set of one has nothing to be chosen from. It draws as a pill with a word in it and is announced as a radio, which is what tells a reader these exclude each other before they press anything.
|
|
6
10
|
|
|
7
11
|
Which segment is current belongs to the group rather than to the segment: exactly one may be, and a segment cannot see its siblings. So `selected` arrives from SegmentedControl, as `size` does — a row at mixed heights is not a row. `disabled` is the consumer's, and it bars this one option while the rest still answer.
|
|
@@ -91,7 +95,7 @@ Never for: A sentence, or a value with its unit spelled out. 'Yearly' rather tha
|
|
|
91
95
|
|
|
92
96
|
### icon — `node`
|
|
93
97
|
|
|
94
|
-
Use when: The glyph tells the modes apart faster than the words do — a card and a bank beside two payment methods. Import it from @deriv-com/
|
|
98
|
+
Use when: The glyph tells the modes apart faster than the words do — a card and a bank beside two payment methods. Import it from @deriv-com/dds-marketing/icons and pass the element
|
|
95
99
|
Never for: Decoration. A row of segments is scanned, and a mark that says nothing the label does not is one more thing to look past on every one of them
|
|
96
100
|
|
|
97
101
|
### onSelect — `callback`
|
|
@@ -270,7 +274,7 @@ Its colour steps with the selection exactly as the label's does — a mark left
|
|
|
270
274
|
|
|
271
275
|
```tsx
|
|
272
276
|
import { SegmentedControlItem } from '@deriv-com/dds-marketing'
|
|
273
|
-
import { ChartCandlestickRegularIcon, GlobeRegularIcon } from '@deriv-com/
|
|
277
|
+
import { ChartCandlestickRegularIcon, GlobeRegularIcon } from '@deriv-com/dds-marketing/icons'
|
|
274
278
|
|
|
275
279
|
// Chosen, with a mark
|
|
276
280
|
<SegmentedControlItem value="card" label="Card" selected icon={<GlobeRegularIcon />} />
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
# Select
|
|
4
4
|
|
|
5
|
+
Chooses one option from a list.
|
|
6
|
+
|
|
7
|
+
## Why it is built this way
|
|
8
|
+
|
|
5
9
|
A control for choosing one answer from a set the reader scans. It is shut until they open it, and what it shows when shut is the answer they gave — so a form of these reads as a list of decisions rather than a list of empty fields.
|
|
6
10
|
|
|
7
11
|
On a marketing page it does two jobs, and the contract says both rather than pretending it is only one. It collects an answer a form submits — a country, a language, the kind of enquiry somebody is making. And it narrows what is already on the page — the sort on an index of articles, the market a pricing table is showing. The two differ in what happens after the answer: one is carried to a server when the visitor presses send, the other reshapes the page the moment it is taken. Nothing in the control changes between them, which is why they are one component and not two.
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
# SelectChip
|
|
4
4
|
|
|
5
|
+
A chip that opens a list and shows the option chosen.
|
|
6
|
+
|
|
7
|
+
## Why it is built this way
|
|
8
|
+
|
|
5
9
|
A chip that opens a list of answers and keeps the one chosen, so a filter row shows the current narrowing rather than the name of a filter. On a marketing site that is the control above an index whose set is too long to spell out as a row of toggles — a language, a region, a sort order, a market.
|
|
6
10
|
|
|
7
11
|
## Use when
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
# Spinner
|
|
4
4
|
|
|
5
|
+
Shows that something is loading.
|
|
6
|
+
|
|
7
|
+
## Why it is built this way
|
|
8
|
+
|
|
5
9
|
A turning ring that says a wait is real and the page has not stalled. A marketing page has very little to wait for — it is copy and pictures, and they arrive with the page — so a spinner here is the exception rather than the furniture: a form that has just been submitted, an embed or a demo still loading, a band of live figures being fetched.
|
|
6
10
|
|
|
7
11
|
That rarity is the brief. In an app a spinner is ordinary and a reader waits because they have an account and a reason to; on a landing page it is shown to someone with no stake in the outcome and nothing keeping them there. So it appears where a wait has already started — after the reader did something, or where a section has visibly held space for something that has not come — and nowhere else.
|
package/.llm/components/stack.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
# Stack
|
|
4
4
|
|
|
5
|
+
Lays items out in a column with consistent spacing.
|
|
6
|
+
|
|
7
|
+
## Why it is built this way
|
|
8
|
+
|
|
5
9
|
A column, and one measure between its rows. It draws nothing — no ground, no edge, no padding — and owns one decision: how far apart the things stacked in it sit. Everything else about them stays theirs.
|
|
6
10
|
|
|
7
11
|
It exists because the measure is what pages get wrong, and get wrong quietly. A gap typed as a number agreed with the system on the day it was written and never again. A gap written as a margin on the row belongs to the row, and travels with it into the next layout, where it is wrong and where nobody thinks to look — the last row of every group carrying a measure into whatever follows it. The column is the one thing that can see both sides of the space, so the column is what should own it.
|
package/.llm/components/stats.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
# Stats
|
|
4
4
|
|
|
5
|
+
A heading over a few key figures, each with a short label.
|
|
6
|
+
|
|
7
|
+
## Why it is built this way
|
|
8
|
+
|
|
5
9
|
A trust and credibility section of key numbers: a heading, a line under it where the heading needs one, and the figures — each a number and the few words that say what it counts. From the fold they are a row read all at once; on a phone they turn one at a time in a wheel, the one in place large with its neighbours smaller above and below, a dot for each down the start edge — the reference site's mobile stats. The wheel holds while the reader hovers on it or focuses it, and stops for good once they press it; a reader who asked for less motion gets the figures two to a row instead. Each figure counts up from nought, once, as the section arrives on screen, and lands on the value exactly as the page wrote it — on a phone that is the figure in place when the section arrives; the ones that turn in later are already final.
|
|
6
10
|
|
|
7
11
|
The reference design's StatsSimple. The figure is written in the page's first HTML and is what assistive technology reads, so the count is decoration over a fact that is already there: a reader with no script, a search engine and a reader who asked for less movement all get the final number and nothing else.
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
# StatusDot
|
|
4
4
|
|
|
5
|
+
A small dot marking an item as notable or in a different state.
|
|
6
|
+
|
|
7
|
+
## Why it is built this way
|
|
8
|
+
|
|
5
9
|
A small coloured circle that marks one thing in a list of otherwise equal things — either because it is worth noticing, or because it is in a state the others are not. The accent one draws attention and says nothing about a condition; the four beside it each name one. It never carries the meaning on its own: the words next to it do, because a colour is not readable to everyone who has to read it.
|
|
6
10
|
|
|
7
11
|
## Use when
|
package/.llm/components/steps.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
# Steps
|
|
4
4
|
|
|
5
|
+
A numbered list of steps beside a supporting picture.
|
|
6
|
+
|
|
7
|
+
## Why it is built this way
|
|
8
|
+
|
|
5
9
|
A two-column how-it-works section pairing a supporting picture with a numbered, ordered list of steps, each a title and a line describing it.
|
|
6
10
|
|
|
7
11
|
It walks a reader through a sequence they are about to follow — opening an account, funding it, placing a first trade — and the numbers are the argument: they say the order matters and how far there is to go. The list is a real ordered list, so the count and the order reach a screen reader too, and the numbers drawn beside each step are the section's own rather than the page's.
|
|
@@ -33,7 +37,7 @@ Steps renders 15 elements. A token binding names the part it applies to.
|
|
|
33
37
|
It paints one of the page's three grounds and the ink that goes with it, in one decision — see `ground`. The ink is set here and inherited by everything inside.
|
|
34
38
|
- `inner` — `<div>`, class `dds-steps__inner`. The measure and the gutter, holding the section's content in the same column as every other section on the page.
|
|
35
39
|
- `split` — `<div>`, class `dds-steps__split`. The two halves. A row at full width with the picture on whichever side `mediaPosition` names, and one column below the fold with the picture first — the order the reference design takes and the one a sequence reads in.
|
|
36
|
-
- `media` — `<div>`, class `dds-steps__media`. The picture, and one of the section's two halves rather than an addition to it. Held to a square and cropped to fill it, so the section is the same shape whatever the page passes. With pictures on the steps it holds all of them in one cell, and the current step's is the one shown: the first while the list is still, each in turn under `autoplay`,
|
|
40
|
+
- `media` — `<div>`, class `dds-steps__media`. The picture, and one of the section's two halves rather than an addition to it. Held to a square and cropped to fill it, so the section is the same shape whatever the page passes. With pictures on the steps it holds all of them in one cell, and the current step's is the one shown: the first while the list is still, each in turn under `autoplay`, uncovered over one another in motion.duration.turn.
|
|
37
41
|
- `image` — `<img>`, class `dds-steps__image`. One step's picture, from its `image`, stacked in the media cell with the others and shown while its step is current. Decoration, as the media cell is: what the step says is its title and its line.
|
|
38
42
|
- `content` — `<div>`, class `dds-steps__content`. The title and the steps under it.
|
|
39
43
|
|
|
@@ -56,7 +60,7 @@ Steps renders 15 elements. A token binding names the part it applies to.
|
|
|
56
60
|
- `step-title` — `<h3>`, class `dds-steps__step-title`. What the reader does at this step. `h3` under the section's `h2`, so a reader moving by heading walks the steps one at a time.
|
|
57
61
|
- `trigger` — `<button>`, class `dds-steps__trigger`. Under `autoplay`, the step's title as a button: pressing it makes the step current and stops the turn for good. Inside the heading, so a reader moving by heading still walks the steps; `aria-current="step"` on the current one says which step is shown. Rendered only when `autoplay` is set.
|
|
58
62
|
- `step-description` — `<p>`, class `dds-steps__step-description`. What the step involves, in a sentence.
|
|
59
|
-
- `progress` — `<span>`, class `dds-steps__progress`. Under `autoplay`, the current step's rule filling from the start edge over motion.duration.
|
|
63
|
+
- `progress` — `<span>`, class `dds-steps__progress`. Under `autoplay`, the current step's rule filling from the start edge over motion.duration.step — how long until the next step — in the brand's coral. Held where the turn holds, full and still once it stops or for a reader who asked for less motion. Hidden from assistive technology: the current step is said by `aria-current`.
|
|
60
64
|
|
|
61
65
|
Apply these classes from the generated `stepsParts` constant rather than writing the strings by hand.
|
|
62
66
|
|
|
@@ -90,8 +94,8 @@ Never for: Moving the picture on a phone. There is one column there and the pict
|
|
|
90
94
|
|
|
91
95
|
### autoplay — `boolean` (default `false`)
|
|
92
96
|
|
|
93
|
-
Use when: Whether the steps take their turn on their own: one step is current, its rule fills over motion.duration.
|
|
94
|
-
Never for: Steps whose descriptions take longer to read than motion.duration.
|
|
97
|
+
Use when: Whether the steps take their turn on their own: one step is current, its rule fills over motion.duration.step, then the next takes over, and back to the first after the last. The current step's number is drawn at full strength and the rest recede; with an `image` on each step the picture changes to the current one's. Each step's title becomes a button that makes it current. Off by default, so a list nobody configured stays still. On, it holds while focus is inside the section — not under the pointer, so it keeps turning while a reader watches it — waits until the section is on screen, never moves for a reader who asked for less motion, and stops for good once the reader presses a step — the WAI carousel rule CtaBannerSlider follows: a reader who has chosen a step is reading it. That gives a reader a way to stop it, which WCAG 2.2.2 asks for, but not a visible one, so a page that needs 2.2.2 met plainly should leave it off.
|
|
98
|
+
Never for: Steps whose descriptions take longer to read than motion.duration.step — leave it off rather than cut the copy to the timer. And a list with no picture per step, where the only thing that moves is a rule: the turn is worth it when the picture changes with it.
|
|
95
99
|
|
|
96
100
|
### title — `string` **Required.**
|
|
97
101
|
|
|
@@ -122,7 +126,7 @@ Guaranteed by the component. Write none of it by hand: the ids these attributes
|
|
|
122
126
|
- The number drawn beside each step is decoration and is hidden from assistive technology. The ordered list already announces each step's place, and reading the drawn number as well says it twice
|
|
123
127
|
- Each step's title is a heading one level under the section's, so a reader moving by heading walks the steps one at a time
|
|
124
128
|
- The picture is decoration and is hidden from assistive technology — the one picture and every step's alike. What the section says is the title and the steps; a picture carrying something they do not is a section that reads as half empty to anyone who cannot see it
|
|
125
|
-
- Under autoplay, a hold while
|
|
129
|
+
- Under autoplay, a hold while focus is inside the section, no turn until the section is on screen, no movement for a reader who asked for less motion, and a stop for good once a step is pressed — the way to stop a list that would otherwise turn for as long as it is shown, which WCAG 2.2.2 asks for. The current step's title carries aria-current="step", so the step a reader is shown is the step a screen reader names
|
|
126
130
|
|
|
127
131
|
## Rules
|
|
128
132
|
|
|
@@ -270,7 +274,7 @@ import { AspectRatio, Steps } from '@deriv-com/dds-marketing'
|
|
|
270
274
|
|
|
271
275
|
### Taking turns
|
|
272
276
|
|
|
273
|
-
With `autoplay` each step takes its turn: its rule fills, its picture shows, then the next.
|
|
277
|
+
With `autoplay` each step takes its turn: its rule fills, its picture shows, then the next. Focus holds it, hovering does not; pressing a step stops it.
|
|
274
278
|
|
|
275
279
|
```tsx
|
|
276
280
|
import { Steps } from '@deriv-com/dds-marketing'
|
|
@@ -280,6 +284,14 @@ import { Steps } from '@deriv-com/dds-marketing'
|
|
|
280
284
|
|
|
281
285
|
// autoplay on the dark band
|
|
282
286
|
<Steps title="Get started in three steps" steps={[{"title":"Open an account","description":"Sign up in minutes with your email and a few details.","image":{"src":"/sample-stop-brand.svg","alt":"","width":800,"height":600}},{"title":"Fund it","description":"Deposit with the local payment method you already use.","image":{"src":"/sample-stop-teal.svg","alt":"","width":800,"height":600}},{"title":"Start trading","description":"Pick a market and place your first trade.","image":{"src":"/sample-stop-amber.svg","alt":"","width":800,"height":600}}]} autoplay ground="strong" mediaPosition="end" />
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
### A picture on each step
|
|
290
|
+
|
|
291
|
+
Pictures on the steps without autoplay: the list stays still, the first step's picture is shown, and each title is a button that shows its own.
|
|
292
|
+
|
|
293
|
+
```tsx
|
|
294
|
+
import { Steps } from '@deriv-com/dds-marketing'
|
|
283
295
|
|
|
284
296
|
// still, a picture on each step — the first is shown
|
|
285
297
|
<Steps title="Get started in three steps" steps={[{"title":"Open an account","description":"Sign up in minutes with your email and a few details.","image":{"src":"/sample-stop-brand.svg","alt":"","width":800,"height":600}},{"title":"Fund it","description":"Deposit with the local payment method you already use.","image":{"src":"/sample-stop-teal.svg","alt":"","width":800,"height":600}},{"title":"Start trading","description":"Pick a market and place your first trade.","image":{"src":"/sample-stop-amber.svg","alt":"","width":800,"height":600}}]} />
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
# StickyCards
|
|
4
4
|
|
|
5
|
+
A heading over cards that stack on top of each other as the page scrolls.
|
|
6
|
+
|
|
7
|
+
## Why it is built this way
|
|
8
|
+
|
|
5
9
|
A section whose cards pile up as the page scrolls: a heading, and under it a set of cards that each stop near the top of the window while the next one slides up over them, so the cards are read one at a time and the edges of the ones already read stay showing above the one being read. A covered card draws back a little and darkens as the next one crosses it, which is what makes the pile read as depth.
|
|
6
10
|
|
|
7
11
|
Two layouts. `compact` is the reference design's StickyMarketCards: text-first cards in a column held to the heading's measure, any number of them, a picture or an animation beside the words where a card has one, and at most four edges showing however long the set is. `feature` is its StickyStackedCards: a few large cards the width of the page, each its words beside a picture filling its half from the fold.
|