@deriv-com/dds-marketing 0.2.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.llm/components/accordion.md +8 -0
- package/.llm/components/accordionitem.md +8 -0
- package/.llm/components/aspectratio.md +8 -0
- package/.llm/components/badge.md +8 -0
- package/.llm/components/bottomsheet.md +8 -0
- package/.llm/components/breadcrumb.md +8 -0
- package/.llm/components/breadcrumbitem.md +8 -0
- package/.llm/components/button.md +46 -22
- package/.llm/components/buttonicon.md +14 -6
- package/.llm/components/card.md +15 -1
- package/.llm/components/cardbody.md +28 -2
- package/.llm/components/cardbutton.md +15 -1
- package/.llm/components/checkbox.md +8 -0
- package/.llm/components/ctabanner.md +186 -0
- package/.llm/components/ctabannerslider.md +204 -0
- package/.llm/components/divider.md +8 -0
- package/.llm/components/dropdownmenu.md +13 -5
- package/.llm/components/faqaccordion.md +217 -0
- package/.llm/components/featurebullets.md +254 -0
- package/.llm/components/featurecards.md +313 -0
- package/.llm/components/featurescroll.md +284 -0
- package/.llm/components/featuresplit.md +249 -0
- package/.llm/components/filterchip.md +8 -0
- package/.llm/components/footer.md +8 -0
- package/.llm/components/footergroup.md +8 -0
- package/.llm/components/grid.md +8 -0
- package/.llm/components/icon.md +8 -0
- package/.llm/components/landinghero.md +254 -0
- package/.llm/components/link.md +9 -1
- package/.llm/components/logocolumns.md +235 -0
- package/.llm/components/logorows.md +212 -0
- package/.llm/components/menuitem.md +8 -0
- package/.llm/components/navbar.md +79 -15
- package/.llm/components/navbaritem.md +9 -1
- package/.llm/components/navbarmenu.md +8 -0
- package/.llm/components/navbarmenugroup.md +8 -0
- package/.llm/components/navbarpanel.md +9 -1
- package/.llm/components/navbarswitcher.md +9 -1
- package/.llm/components/navbarswitcheroption.md +8 -0
- package/.llm/components/option.md +8 -0
- package/.llm/components/pageheader.md +231 -0
- package/.llm/components/pagination.md +26 -89
- package/.llm/components/paginationdots.md +215 -0
- package/.llm/components/producthero.md +248 -0
- package/.llm/components/removablechip.md +8 -0
- package/.llm/components/row.md +8 -0
- package/.llm/components/scroller.md +8 -0
- package/.llm/components/searchinput.md +8 -0
- package/.llm/components/segmentedcontrol.md +8 -0
- package/.llm/components/segmentedcontrolitem.md +8 -0
- package/.llm/components/select.md +8 -0
- package/.llm/components/selectchip.md +56 -15
- package/.llm/components/spinner.md +8 -0
- package/.llm/components/stack.md +8 -0
- package/.llm/components/statusdot.md +8 -0
- package/.llm/components/subdomainnavbar.md +8 -0
- package/.llm/components/tab.md +8 -0
- package/.llm/components/table.md +8 -0
- package/.llm/components/tablebody.md +8 -0
- package/.llm/components/tablecell.md +8 -0
- package/.llm/components/tablehead.md +8 -0
- package/.llm/components/tableheadercell.md +8 -0
- package/.llm/components/tablerow.md +8 -0
- package/.llm/components/tablist.md +8 -0
- package/.llm/components/testimonialrow.md +235 -0
- package/.llm/components/testimonialslider.md +254 -0
- package/.llm/components/textarea.md +8 -0
- package/.llm/components/textinput.md +8 -0
- package/.llm/components/tooltip.md +8 -0
- package/.llm/components/typography.md +8 -0
- package/.llm/digest/button.md +11 -6
- package/.llm/digest/buttonicon.md +2 -2
- package/.llm/digest/card.md +1 -0
- package/.llm/digest/cardbody.md +3 -1
- package/.llm/digest/cardbutton.md +1 -0
- package/.llm/digest/ctabanner.md +44 -0
- package/.llm/digest/ctabannerslider.md +45 -0
- package/.llm/digest/dropdownmenu.md +1 -1
- package/.llm/digest/faqaccordion.md +43 -0
- package/.llm/digest/featurebullets.md +52 -0
- package/.llm/digest/featurecards.md +49 -0
- package/.llm/digest/featurescroll.md +52 -0
- package/.llm/digest/featuresplit.md +54 -0
- package/.llm/digest/landinghero.md +53 -0
- package/.llm/digest/logocolumns.md +55 -0
- package/.llm/digest/logorows.md +48 -0
- package/.llm/digest/navbar.md +18 -3
- package/.llm/digest/pageheader.md +49 -0
- package/.llm/digest/pagination.md +6 -17
- package/.llm/digest/paginationdots.md +43 -0
- package/.llm/digest/producthero.md +53 -0
- package/.llm/digest/selectchip.md +6 -1
- package/.llm/digest/testimonialrow.md +51 -0
- package/.llm/digest/testimonialslider.md +51 -0
- package/.llm/index.md +24 -3
- package/.llm/rules.md +24 -0
- package/.llm/tokens.md +56 -12
- package/AGENTS.md +28 -3
- package/README.md +41 -21
- package/dist/components/banner-data.d.ts +38 -0
- package/dist/components/banner-data.js +15 -0
- package/dist/components/blocks/block-reveal.css +90 -0
- package/dist/components/blocks/cta-banner/CtaBanner.css +66 -0
- package/dist/components/blocks/cta-banner/CtaBanner.d.ts +22 -0
- package/dist/components/blocks/cta-banner/CtaBanner.js +31 -0
- package/dist/components/blocks/cta-banner/CtaBanner.types.d.ts +29 -0
- package/dist/components/blocks/cta-banner/CtaBanner.types.js +13 -0
- package/dist/components/blocks/cta-banner/cta-banner-impl.css +29 -0
- package/dist/components/blocks/cta-banner-slider/CtaBannerSlider.css +90 -0
- package/dist/components/blocks/cta-banner-slider/CtaBannerSlider.d.ts +39 -0
- package/dist/components/blocks/cta-banner-slider/CtaBannerSlider.js +60 -0
- package/dist/components/blocks/cta-banner-slider/CtaBannerSlider.types.d.ts +41 -0
- package/dist/components/blocks/cta-banner-slider/CtaBannerSlider.types.js +15 -0
- package/dist/components/blocks/cta-banner-slider/cta-banner-slider-impl.css +73 -0
- package/dist/components/blocks/faq-accordion/FaqAccordion.css +54 -0
- package/dist/components/blocks/faq-accordion/FaqAccordion.d.ts +20 -0
- package/dist/components/blocks/faq-accordion/FaqAccordion.js +28 -0
- package/dist/components/blocks/faq-accordion/FaqAccordion.types.d.ts +25 -0
- package/dist/components/blocks/faq-accordion/FaqAccordion.types.js +10 -0
- package/dist/components/blocks/faq-accordion/faq-accordion-impl.css +54 -0
- package/dist/components/blocks/feature-bullets/FeatureBullets.css +139 -0
- package/dist/components/blocks/feature-bullets/FeatureBullets.d.ts +31 -0
- package/dist/components/blocks/feature-bullets/FeatureBullets.js +55 -0
- package/dist/components/blocks/feature-bullets/FeatureBullets.types.d.ts +39 -0
- package/dist/components/blocks/feature-bullets/FeatureBullets.types.js +16 -0
- package/dist/components/blocks/feature-bullets/feature-bullets-impl.css +104 -0
- package/dist/components/blocks/feature-cards/FeatureCards.css +84 -0
- package/dist/components/blocks/feature-cards/FeatureCards.d.ts +24 -0
- package/dist/components/blocks/feature-cards/FeatureCards.js +66 -0
- package/dist/components/blocks/feature-cards/FeatureCards.types.d.ts +33 -0
- package/dist/components/blocks/feature-cards/FeatureCards.types.js +14 -0
- package/dist/components/blocks/feature-cards/feature-cards-impl.css +245 -0
- package/dist/components/blocks/feature-scroll/FeatureScroll.css +137 -0
- package/dist/components/blocks/feature-scroll/FeatureScroll.d.ts +39 -0
- package/dist/components/blocks/feature-scroll/FeatureScroll.js +167 -0
- package/dist/components/blocks/feature-scroll/FeatureScroll.types.d.ts +40 -0
- package/dist/components/blocks/feature-scroll/FeatureScroll.types.js +17 -0
- package/dist/components/blocks/feature-scroll/feature-scroll-impl.css +292 -0
- package/dist/components/blocks/feature-split/FeatureSplit.css +95 -0
- package/dist/components/blocks/feature-split/FeatureSplit.d.ts +30 -0
- package/dist/components/blocks/feature-split/FeatureSplit.js +38 -0
- package/dist/components/blocks/feature-split/FeatureSplit.types.d.ts +39 -0
- package/dist/components/blocks/feature-split/FeatureSplit.types.js +14 -0
- package/dist/components/blocks/feature-split/feature-split-impl.css +83 -0
- package/dist/components/blocks/landing-hero/LandingHero.css +85 -0
- package/dist/components/blocks/landing-hero/LandingHero.d.ts +41 -0
- package/dist/components/blocks/landing-hero/LandingHero.js +54 -0
- package/dist/components/blocks/landing-hero/LandingHero.types.d.ts +37 -0
- package/dist/components/blocks/landing-hero/LandingHero.types.js +15 -0
- package/dist/components/blocks/landing-hero/landing-hero-impl.css +355 -0
- package/dist/components/blocks/logo-columns/LogoColumns.css +161 -0
- package/dist/components/blocks/logo-columns/LogoColumns.d.ts +23 -0
- package/dist/components/blocks/logo-columns/LogoColumns.js +46 -0
- package/dist/components/blocks/logo-columns/LogoColumns.types.d.ts +46 -0
- package/dist/components/blocks/logo-columns/LogoColumns.types.js +18 -0
- package/dist/components/blocks/logo-columns/logo-columns-impl.css +188 -0
- package/dist/components/blocks/logo-rows/LogoRows.css +122 -0
- package/dist/components/blocks/logo-rows/LogoRows.d.ts +20 -0
- package/dist/components/blocks/logo-rows/LogoRows.js +43 -0
- package/dist/components/blocks/logo-rows/LogoRows.types.d.ts +36 -0
- package/dist/components/blocks/logo-rows/LogoRows.types.js +16 -0
- package/dist/components/blocks/logo-rows/logo-rows-impl.css +179 -0
- package/dist/components/blocks/page-header/PageHeader.css +79 -0
- package/dist/components/blocks/page-header/PageHeader.d.ts +34 -0
- package/dist/components/blocks/page-header/PageHeader.js +43 -0
- package/dist/components/blocks/page-header/PageHeader.types.d.ts +32 -0
- package/dist/components/blocks/page-header/PageHeader.types.js +14 -0
- package/dist/components/blocks/page-header/page-header-impl.css +176 -0
- package/dist/components/blocks/product-hero/ProductHero.css +86 -0
- package/dist/components/blocks/product-hero/ProductHero.d.ts +35 -0
- package/dist/components/blocks/product-hero/ProductHero.js +48 -0
- package/dist/components/blocks/product-hero/ProductHero.types.d.ts +37 -0
- package/dist/components/blocks/product-hero/ProductHero.types.js +15 -0
- package/dist/components/blocks/product-hero/product-hero-impl.css +354 -0
- package/dist/components/blocks/testimonial-row/TestimonialRow.css +245 -0
- package/dist/components/blocks/testimonial-row/TestimonialRow.d.ts +20 -0
- package/dist/components/blocks/testimonial-row/TestimonialRow.js +128 -0
- package/dist/components/blocks/testimonial-row/TestimonialRow.types.d.ts +54 -0
- package/dist/components/blocks/testimonial-row/TestimonialRow.types.js +26 -0
- package/dist/components/blocks/testimonial-row/testimonial-row-impl.css +195 -0
- package/dist/components/blocks/testimonial-slider/TestimonialSlider.css +181 -0
- package/dist/components/blocks/testimonial-slider/TestimonialSlider.d.ts +22 -0
- package/dist/components/blocks/testimonial-slider/TestimonialSlider.js +36 -0
- package/dist/components/blocks/testimonial-slider/TestimonialSlider.types.d.ts +49 -0
- package/dist/components/blocks/testimonial-slider/TestimonialSlider.types.js +21 -0
- package/dist/components/blocks/testimonial-slider/testimonial-slider-impl.css +202 -0
- package/dist/components/blocks/use-reveal.d.ts +46 -0
- package/dist/components/blocks/use-reveal.js +120 -0
- package/dist/components/blocks/use-rotation.d.ts +62 -0
- package/dist/components/blocks/use-rotation.js +176 -0
- package/dist/components/core/accordion-item/AccordionItem.css +6 -5
- package/dist/components/core/bottom-sheet/BottomSheet.css +1 -1
- package/dist/components/core/button/Button.css +63 -16
- package/dist/components/core/button/Button.d.ts +14 -12
- package/dist/components/core/button/Button.js +43 -14
- package/dist/components/core/button/Button.types.d.ts +9 -14
- package/dist/components/core/button/button-impl.css +25 -0
- package/dist/components/core/button-icon/ButtonIcon.css +31 -15
- package/dist/components/core/button-icon/ButtonIcon.d.ts +2 -2
- package/dist/components/core/button-icon/ButtonIcon.js +2 -2
- package/dist/components/core/button-icon/ButtonIcon.types.d.ts +4 -4
- package/dist/components/core/card/Card.css +13 -4
- package/dist/components/core/card/Card.types.d.ts +2 -1
- package/dist/components/core/card-body/CardBody.css +11 -6
- package/dist/components/core/card-body/CardBody.d.ts +1 -1
- package/dist/components/core/card-body/CardBody.js +2 -2
- package/dist/components/core/card-body/CardBody.types.d.ts +4 -1
- package/dist/components/core/card-body/CardBody.types.js +1 -0
- package/dist/components/core/card-button/CardButton.css +13 -4
- package/dist/components/core/card-button/CardButton.types.d.ts +2 -1
- package/dist/components/core/checkbox/Checkbox.css +8 -1
- package/dist/components/core/dropdown-menu/DropdownMenu.css +13 -12
- package/dist/components/core/dropdown-menu/DropdownMenu.d.ts +5 -3
- package/dist/components/core/dropdown-menu/DropdownMenu.js +5 -3
- package/dist/components/core/filter-chip/FilterChip.css +2 -1
- package/dist/components/core/footer/footer-impl.css +1 -1
- package/dist/components/core/footer-group/FooterGroup.css +8 -7
- package/dist/components/core/icon/Icon.css +1 -1
- package/dist/components/core/link/Link.css +1 -1
- package/dist/components/core/menu-item/MenuItem.css +1 -1
- package/dist/components/core/navbar/Navbar.css +7 -8
- package/dist/components/core/navbar/Navbar.d.ts +17 -1
- package/dist/components/core/navbar/Navbar.js +139 -12
- package/dist/components/core/navbar/Navbar.types.d.ts +23 -4
- package/dist/components/core/navbar/Navbar.types.js +1 -1
- package/dist/components/core/navbar/navbar-impl.css +10 -3
- package/dist/components/core/navbar/navbar-material.css +96 -0
- package/dist/components/core/navbar-item/NavbarItem.css +4 -4
- package/dist/components/core/navbar-menu/NavbarMenu.css +7 -5
- package/dist/components/core/navbar-menu/NavbarMenu.d.ts +1 -0
- package/dist/components/core/navbar-menu/NavbarMenu.js +1 -0
- package/dist/components/core/navbar-menu/navbar-menu-impl.css +7 -7
- package/dist/components/core/navbar-switcher/NavbarSwitcher.css +6 -5
- package/dist/components/core/navbar-switcher/NavbarSwitcher.d.ts +1 -0
- package/dist/components/core/navbar-switcher/NavbarSwitcher.js +2 -1
- package/dist/components/core/option/Option.css +1 -1
- package/dist/components/core/pagination/Pagination.css +1 -75
- package/dist/components/core/pagination/Pagination.d.ts +4 -4
- package/dist/components/core/pagination/Pagination.js +11 -51
- package/dist/components/core/pagination/Pagination.types.d.ts +5 -17
- package/dist/components/core/pagination/Pagination.types.js +1 -3
- package/dist/components/core/pagination-dots/PaginationDots.css +60 -0
- package/dist/components/core/pagination-dots/PaginationDots.d.ts +25 -0
- package/dist/components/core/pagination-dots/PaginationDots.js +104 -0
- package/dist/components/core/pagination-dots/PaginationDots.types.d.ts +38 -0
- package/dist/components/core/pagination-dots/PaginationDots.types.js +9 -0
- package/dist/components/core/removable-chip/RemovableChip.css +3 -3
- package/dist/components/core/search-input/SearchInput.css +1 -1
- package/dist/components/core/segmented-control/SegmentedControl.css +1 -1
- package/dist/components/core/segmented-control-item/SegmentedControlItem.css +1 -1
- package/dist/components/core/select/Select.css +2 -1
- package/dist/components/core/select-chip/SelectChip.css +14 -7
- package/dist/components/core/select-chip/SelectChip.d.ts +1 -1
- package/dist/components/core/select-chip/SelectChip.js +7 -4
- package/dist/components/core/select-chip/SelectChip.types.d.ts +7 -1
- package/dist/components/core/select-chip/SelectChip.types.js +1 -1
- package/dist/components/core/select-chip/select-chip-impl.css +14 -3
- package/dist/components/core/status-dot/StatusDot.css +1 -1
- package/dist/components/core/subdomain-navbar/SubdomainNavbar.css +3 -3
- package/dist/components/core/tab/Tab.css +1 -1
- package/dist/components/core/tab-list/TabList.css +1 -1
- package/dist/components/core/table/table-impl.css +36 -14
- package/dist/components/core/table-header-cell/TableHeaderCell.css +5 -5
- package/dist/components/core/text-area/TextArea.css +1 -1
- package/dist/components/core/text-input/TextInput.css +1 -1
- package/dist/components/core/tooltip/Tooltip.css +1 -1
- package/dist/components/core/typography/Typography.css +5 -5
- package/dist/components/index.d.ts +35 -0
- package/dist/components/index.js +30 -0
- package/dist/components/logo-data.d.ts +24 -0
- package/dist/components/logo-data.js +11 -0
- package/dist/components/scroll-data.d.ts +64 -0
- package/dist/components/scroll-data.js +17 -0
- package/dist/components/testimonial-row-data.d.ts +51 -0
- package/dist/components/testimonial-row-data.js +11 -0
- package/dist/components/testimonial-slider-data.d.ts +26 -0
- package/dist/components/testimonial-slider-data.js +10 -0
- package/dist/marketing.css +385 -14
- package/package.json +1 -6
|
@@ -126,6 +126,14 @@ The target and the mark are separate decisions, and conflating them is what prod
|
|
|
126
126
|
|
|
127
127
|
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.
|
|
128
128
|
Guidance only — cannot be checked automatically.
|
|
129
|
+
- **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.
|
|
130
|
+
|
|
131
|
+
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.
|
|
132
|
+
|
|
133
|
+
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.
|
|
134
|
+
|
|
135
|
+
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.
|
|
136
|
+
Guidance only — cannot be checked automatically.
|
|
129
137
|
|
|
130
138
|
## Anti-examples
|
|
131
139
|
|
|
@@ -190,6 +190,14 @@ The target and the mark are separate decisions, and conflating them is what prod
|
|
|
190
190
|
|
|
191
191
|
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.
|
|
192
192
|
Guidance only — cannot be checked automatically.
|
|
193
|
+
- **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.
|
|
194
|
+
|
|
195
|
+
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.
|
|
196
|
+
|
|
197
|
+
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.
|
|
198
|
+
|
|
199
|
+
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.
|
|
200
|
+
Guidance only — cannot be checked automatically.
|
|
193
201
|
|
|
194
202
|
## Anti-examples
|
|
195
203
|
|
|
@@ -146,6 +146,14 @@ The target and the mark are separate decisions, and conflating them is what prod
|
|
|
146
146
|
|
|
147
147
|
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.
|
|
148
148
|
Guidance only — cannot be checked automatically.
|
|
149
|
+
- **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.
|
|
150
|
+
|
|
151
|
+
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.
|
|
152
|
+
|
|
153
|
+
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.
|
|
154
|
+
|
|
155
|
+
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.
|
|
156
|
+
Guidance only — cannot be checked automatically.
|
|
149
157
|
|
|
150
158
|
## Anti-examples
|
|
151
159
|
|
package/.llm/components/badge.md
CHANGED
|
@@ -161,6 +161,14 @@ The target and the mark are separate decisions, and conflating them is what prod
|
|
|
161
161
|
|
|
162
162
|
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.
|
|
163
163
|
Guidance only — cannot be checked automatically.
|
|
164
|
+
- **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.
|
|
165
|
+
|
|
166
|
+
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.
|
|
167
|
+
|
|
168
|
+
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.
|
|
169
|
+
|
|
170
|
+
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.
|
|
171
|
+
Guidance only — cannot be checked automatically.
|
|
164
172
|
|
|
165
173
|
## Anti-examples
|
|
166
174
|
|
|
@@ -255,6 +255,14 @@ The target and the mark are separate decisions, and conflating them is what prod
|
|
|
255
255
|
|
|
256
256
|
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.
|
|
257
257
|
Guidance only — cannot be checked automatically.
|
|
258
|
+
- **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.
|
|
259
|
+
|
|
260
|
+
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.
|
|
261
|
+
|
|
262
|
+
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.
|
|
263
|
+
|
|
264
|
+
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.
|
|
265
|
+
Guidance only — cannot be checked automatically.
|
|
258
266
|
|
|
259
267
|
## Anti-examples
|
|
260
268
|
|
|
@@ -118,6 +118,14 @@ The target and the mark are separate decisions, and conflating them is what prod
|
|
|
118
118
|
|
|
119
119
|
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.
|
|
120
120
|
Guidance only — cannot be checked automatically.
|
|
121
|
+
- **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.
|
|
122
|
+
|
|
123
|
+
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.
|
|
124
|
+
|
|
125
|
+
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.
|
|
126
|
+
|
|
127
|
+
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.
|
|
128
|
+
Guidance only — cannot be checked automatically.
|
|
121
129
|
|
|
122
130
|
## Anti-examples
|
|
123
131
|
|
|
@@ -132,6 +132,14 @@ The target and the mark are separate decisions, and conflating them is what prod
|
|
|
132
132
|
|
|
133
133
|
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.
|
|
134
134
|
Guidance only — cannot be checked automatically.
|
|
135
|
+
- **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.
|
|
136
|
+
|
|
137
|
+
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.
|
|
138
|
+
|
|
139
|
+
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.
|
|
140
|
+
|
|
141
|
+
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.
|
|
142
|
+
Guidance only — cannot be checked automatically.
|
|
135
143
|
|
|
136
144
|
## Anti-examples
|
|
137
145
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Button
|
|
4
4
|
|
|
5
|
-
Drives a visitor toward a conversion goal
|
|
5
|
+
Drives a visitor toward a conversion goal — a signup page, a pricing page, a demo booking — or performs the one action a section asks for, such as sending a newsletter form or opening a video. An `<a>` when given an href and a `<button>` when not, so a CTA that goes somewhere gets the browser's navigation and one that acts in place answers Space and does what the page says.
|
|
6
6
|
|
|
7
7
|
## Use when
|
|
8
8
|
|
|
@@ -12,16 +12,16 @@ Drives a visitor toward a conversion goal by navigating them to the next step in
|
|
|
12
12
|
|
|
13
13
|
## Do not use
|
|
14
14
|
|
|
15
|
-
- The action
|
|
16
|
-
- The words belong inside a sentence or a paragraph of body copy →
|
|
15
|
+
- The action belongs to an application surface — a trade form, a settings panel, a confirmation that removes something → nothing here does this
|
|
16
|
+
- The words belong inside a sentence or a paragraph of body copy → `Link`
|
|
17
17
|
- The control is a glyph alone, with no words → `ButtonIcon`
|
|
18
18
|
|
|
19
19
|
## Anatomy
|
|
20
20
|
|
|
21
21
|
Button renders 3 elements. A token binding names the part it applies to.
|
|
22
22
|
|
|
23
|
-
- `root` — `<
|
|
24
|
-
- `label` — `<span>`, class `dds-button__label`. The words, and the accessible name of the
|
|
23
|
+
- `root` — `<button>`, class `dds-button`. The control. An `<a>` when given an href and a `<button>` when not, the shape CardButton and ButtonIcon already take: an anchor keeps cmd-click and middle-click, shows its destination and gets its pending state from the browser chrome, and a button answers Space and does what the page says. Two components for that would be two names for one press. It carries the variant and the size, so the fill, the padding and the type step all follow one decision. It is inline-flex rather than flex — a CTA is as wide as its words plus its inset, and a block-level control in a hero would stretch to the section it sits in. It resets the font and the block padding a `<button>` brings from the user agent, so the two elements render one pill. Its own structural keywords are the contract's top-level staticCss, which is where the root's belong.
|
|
24
|
+
- `label` — `<span>`, class `dds-button__label`. The words, and the accessible name of the control. Always rendered — a CTA whose label is optional is a CTA that ships unnamed, and here the words are also the only thing that says where the visitor is going. A box of its own so the type step binds to the words rather than to the root, which would inherit it down onto the glyph beside them.
|
|
25
25
|
- `icon` — `<svg>`, class `dds-button__icon`. The box the mark sits in, and the mark is a Quill glyph rather than a shape this component draws. A part of its own because the size tokens have to land on the element that renders — the same reason Breadcrumb's separator-icon is a part. Its weight is the icon system's: Quill ships every glyph light, regular and solid, chosen at the import site. Takes the label's colour through currentColor, so one mark is correct on a brand fill and on an inverse one alike. It never shrinks: a CTA short of room would drop the mark before its words. On hover it slides one gap step forward. Rendered only when `showIcon` is set.
|
|
26
26
|
|
|
27
27
|
Apply these classes from the generated `buttonParts` constant rather than writing the strings by hand.
|
|
@@ -36,7 +36,7 @@ Apply these classes from the generated `buttonParts` constant rather than writin
|
|
|
36
36
|
### variant — `primary` | `secondary` | `inverse` (default `primary`)
|
|
37
37
|
|
|
38
38
|
- `primary` — The step the page was built to produce. Carries the brand fill, which is what makes it findable at a glance and what makes it meaningless once there are two — a section offering two brand fills has said nothing about either.
|
|
39
|
-
- `secondary` — A real destination that is not the one being pushed — compare plans, read the docs, talk to sales.
|
|
39
|
+
- `secondary` — A real destination that is not the one being pushed — compare plans, read the docs, talk to sales. The lightest tint the ramp offers, color.bg.subtle, the same fill product's secondary carries, so a CTA and its alternative read as one family across both packages. Hover and press are layered over the fill as a background-image rather than replacing it, which is how product darkens a tint that has no hover partner of its own. On the dark band, tone="inverse" keeps the fill and turns it white.
|
|
40
40
|
- `inverse` — A section that paints its own ground — a brand-coloured hero, a photo band, a dark takeover. There the brand fill is invisible against the fill behind it and a neutral edge is the wrong ink, so the only thing that reads is a solid at the far end of the neutral ramp: pure black in light, pure white in dark. It outranks everything near it, which is what makes it right there and wrong anywhere else.
|
|
41
41
|
|
|
42
42
|
Use when: Deciding how much of the section a destination claims. Primary is the default and the one to spend deliberately.
|
|
@@ -50,15 +50,16 @@ Never for: Ranking every link on a page against every other. Three tiers is the
|
|
|
50
50
|
|
|
51
51
|
Use when: Matching the control to the density of the band it sits in, which on a marketing page is set by the section rather than by the button.
|
|
52
52
|
|
|
53
|
-
### tone — `default` | `
|
|
53
|
+
### tone — `default` | `inverse` | `brand` (default `default`)
|
|
54
54
|
|
|
55
55
|
- `default` — The page's own ground, which sets the ink this component was drawn against — every button on a white page
|
|
56
|
-
- `
|
|
56
|
+
- `inverse` — The control stands on the dark band, color.bg.brand-strong — a hero, a navigation bar at the top of one, a footer — which is the same near-black in light and dark. The secondary keeps its filled shape: a six-percent white tint with hover and press layered over it, and the label in color.fg.on-brand-strong. Every value is fixed, because the band is.
|
|
57
|
+
- `brand` — The control stands on the coral band, color.bg.brand — CtaBanner and CtaBannerSlider — which is the same coral in light and dark, so nothing on it switches either. variant="inverse" is a near-black pill with a white label in both themes, rather than turning white in dark beside a white secondary; the secondary is the same six-percent white tint it is on the dark band. Hover, press and the focus ring are the dark band's fixed values.
|
|
57
58
|
|
|
58
|
-
### href — `string`
|
|
59
|
+
### href — `string`
|
|
59
60
|
|
|
60
|
-
Use when:
|
|
61
|
-
Never for: A placeholder while the destination is undecided — a # or an empty string is a control that looks live, takes focus and goes nowhere. Nor javascript: or a handler dressed as a URL:
|
|
61
|
+
Use when: The press goes somewhere with a URL of its own — the ordinary case for a call to action on a marketing page. It makes this an anchor rather than a button, which is what gives a visitor cmd-click, a visible destination and a copyable link. `target` and `rel` are not props: the component is typed against AnchorHTMLAttributes, so they are already in reach and land on the anchor.
|
|
62
|
+
Never for: A placeholder while the destination is undecided — a # or an empty string is a control that looks live, takes focus and goes nowhere. Nor javascript: or a handler dressed as a URL: leave href out and pass onClick, and this renders a button that does the work in place.
|
|
62
63
|
|
|
63
64
|
### showIcon — `boolean` (default `false`)
|
|
64
65
|
|
|
@@ -87,12 +88,13 @@ its props — do not re-derive them from the variant descriptions above.
|
|
|
87
88
|
|
|
88
89
|
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.
|
|
89
90
|
|
|
90
|
-
- Announced as: `
|
|
91
|
-
- `Enter` —
|
|
91
|
+
- Announced as: `button`
|
|
92
|
+
- `Enter` — press it. A button and an anchor both answer Enter, so this reads the same either way
|
|
93
|
+
- `Space` — press it, where it is a button. An anchor does not answer Space, and that difference belongs to the element rather than to this component — a visitor who knows the difference is told which by how it was announced
|
|
92
94
|
- accessible name
|
|
93
95
|
- focus-visible ring
|
|
94
|
-
- an href that resolves — an anchor without
|
|
95
|
-
- a label that names the destination rather than the gesture, because a page of
|
|
96
|
+
- an href that resolves, wherever one is given — an anchor without a real destination is announced as a link and goes nowhere
|
|
97
|
+
- a label that names the destination or the action rather than the gesture, because a page of controls read out of context as "click here" names nothing
|
|
96
98
|
|
|
97
99
|
## Rules
|
|
98
100
|
|
|
@@ -110,6 +112,14 @@ What this is not about is every row of controls. A set of filter chips, a pagina
|
|
|
110
112
|
Guidance only — cannot be checked automatically.
|
|
111
113
|
- **Destructive actions require a confirmation step** *(applies to a variant not built yet)* — An irreversible action taken by mis-click has no recovery path. The confirmation must name what will be lost, not merely ask whether the user is sure.
|
|
112
114
|
Guidance only — cannot be checked automatically.
|
|
115
|
+
- **A navigation bar holds at most two buttons: one primary, and one secondary beside it** — The bar's actions are the conversion and the way back in for a reader who already has an account — sign up and log in. That is two things, and they rank: the one the site wants is primary and the other is secondary. A third button is a third thing the bar is asking for, and a row of three pills beside a mark and a set of destinations stops reading as a pair of actions and starts reading as a second navigation.
|
|
116
|
+
|
|
117
|
+
A single button is the primary. Alone, there is nothing for a secondary to be quieter than, and a bar whose only action is the quiet one has hidden the thing it exists to offer. Two buttons are one primary and one secondary, never two of either: two primaries are two demands, and two secondaries leave the reader to guess which one the site meant.
|
|
118
|
+
|
|
119
|
+
A switcher is not a button here — a DropdownMenu or a ButtonIcon for the language or the theme — and does not count against the two.
|
|
120
|
+
|
|
121
|
+
Guidance rather than a count. The bar is drawn with a second copy of an action in compactAction for narrow widths, and a count of Buttons under Navbar cannot tell that slot from utilities or a ranked pair from two primaries. Navbar checks the pair itself, on what utilities is handed, and says so in the console.
|
|
122
|
+
Guidance only — cannot be checked automatically.
|
|
113
123
|
- **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, Input and Switch simultaneously.
|
|
114
124
|
Guidance only — cannot be checked automatically.
|
|
115
125
|
- **At most one primary button per view** — Two primary actions compete for attention; the user cannot tell which one the system wants them to take.
|
|
@@ -164,21 +174,32 @@ The target and the mark are separate decisions, and conflating them is what prod
|
|
|
164
174
|
|
|
165
175
|
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.
|
|
166
176
|
Guidance only — cannot be checked automatically.
|
|
177
|
+
- **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.
|
|
178
|
+
|
|
179
|
+
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.
|
|
180
|
+
|
|
181
|
+
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.
|
|
182
|
+
|
|
183
|
+
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.
|
|
184
|
+
Guidance only — cannot be checked automatically.
|
|
167
185
|
|
|
168
186
|
## Anti-examples
|
|
169
187
|
|
|
170
|
-
❌ Button for: The action
|
|
171
|
-
That is @deriv-com/dds-product's Button, which
|
|
188
|
+
❌ Button for: The action belongs to an application surface — a trade form, a settings panel, a confirmation that removes something
|
|
189
|
+
That is @deriv-com/dds-product's Button, which carries the loading state, the destructive tier and the density an application needs. This one stops at the three tiers a marketing page ranks its calls to action by.
|
|
172
190
|
→ nothing in this system does this. Not a gap waiting to be filled — the case belongs outside it.
|
|
173
191
|
|
|
174
192
|
❌ Button for: The words belong inside a sentence or a paragraph of body copy
|
|
175
|
-
A control shaped like a button interrupts prose, and a pill in the middle of a line breaks the line's rhythm.
|
|
176
|
-
→
|
|
193
|
+
A control shaped like a button interrupts prose, and a pill in the middle of a line breaks the line's rhythm. An inline destination is a Link, which takes its size and ink from the copy around it rather than this component shrunk down until it stops looking like a button.
|
|
194
|
+
→ use `Link` instead.
|
|
177
195
|
|
|
178
196
|
❌ Button for: The control is a glyph alone, with no words
|
|
179
197
|
This component's words are its accessible name, and there is nowhere else to put one — a glyph with no label beside it ships unnamed. ButtonIcon is that case, split out the way product split it out of its own Button: it carries a `label` prop that is never drawn, so the control is named for a screen reader without any words being set on the page. It takes the same three tiers and the same two steps as this component, so a glyph-alone control and a labelled CTA in one band rank against each other in one vocabulary.
|
|
180
198
|
→ use `ButtonIcon` instead.
|
|
181
199
|
|
|
200
|
+
❌ variant=primary + tone=brand
|
|
201
|
+
The primary is the coral fill, and tone="brand" says the button stands on the coral band: coral on coral is a button nobody can see. On the band the primary action is variant="inverse".
|
|
202
|
+
|
|
182
203
|
## Example
|
|
183
204
|
|
|
184
205
|
```tsx
|
|
@@ -258,7 +279,7 @@ import { Button } from '@deriv-com/dds-marketing'
|
|
|
258
279
|
|
|
259
280
|
### On a ground the section painted
|
|
260
281
|
|
|
261
|
-
|
|
282
|
+
tone="inverse" keeps the fill on a ground that runs against the mode. On the coral band, tone="brand" holds the near-black primary and the tinted secondary still in both themes.
|
|
262
283
|
|
|
263
284
|
```tsx
|
|
264
285
|
import { Button } from '@deriv-com/dds-marketing'
|
|
@@ -266,6 +287,9 @@ import { Button } from '@deriv-com/dds-marketing'
|
|
|
266
287
|
// secondary — on the page's ground
|
|
267
288
|
<Button href="/signup" variant="secondary">Create free demo account</Button>
|
|
268
289
|
|
|
269
|
-
// secondary, tone="
|
|
270
|
-
<Button href="/signup" variant="secondary" tone="
|
|
290
|
+
// secondary, tone="inverse" — a ground against the mode
|
|
291
|
+
<Button href="/signup" variant="secondary" tone="inverse">Create free demo account</Button>
|
|
292
|
+
|
|
293
|
+
// inverse, tone="brand" — on the coral band
|
|
294
|
+
<Button href="/signup" variant="inverse" tone="brand">Open account</Button>
|
|
271
295
|
```
|
|
@@ -60,12 +60,12 @@ Apply these classes from the generated `buttonIconParts` constant rather than wr
|
|
|
60
60
|
### variant — `primary` | `secondary` | `inverse` | `plain` (default `primary`)
|
|
61
61
|
|
|
62
62
|
- `primary` — The one glyph-alone press a section is built around — a play control over a hero, the single action a band exists for. Carries the brand fill, which is what makes it findable at a glance and what makes it meaningless once there are two.
|
|
63
|
-
- `secondary` — The ordinary case for these, because they usually arrive several at a time — a footer's social row, a carousel's two directions, a bar's dismiss.
|
|
64
|
-
- `inverse` — A section that paints its own ground — a brand-coloured band, a photo, a dark takeover. There the brand fill is invisible against the fill behind it and a neutral
|
|
65
|
-
- `plain` — The control sits on a surface that has already said what it is — the exit on a sheet, a step in a set of marks — and a
|
|
63
|
+
- `secondary` — The ordinary case for these, because they usually arrive several at a time — a footer's social row, a carousel's two directions, a bar's dismiss. Button's secondary, drawn as a circle: the lightest tint the ramp offers, color.bg.subtle, with hover and press layered over the fill as a background-image rather than replacing it, so a glyph-alone control and a labelled one beside it read as one family. On the dark band, tone="inverse" keeps the fill and turns it white.
|
|
64
|
+
- `inverse` — A section that paints its own ground — a brand-coloured band, a photo, a dark takeover. There the brand fill is invisible against the fill behind it and a neutral tint is lost over a photograph, so the only thing that reads is a solid at the far end of the neutral ramp: pure black in light, pure white in dark. It outranks everything near it, which is what makes it right there and wrong anywhere else.
|
|
65
|
+
- `plain` — The control sits on a surface that has already said what it is — the exit on a sheet, a step in a set of marks — and a tint behind it would be the loudest thing there. It keeps the target and the states and gives up only the fill, so what a reader presses is unchanged and what they see is the glyph.
|
|
66
66
|
|
|
67
67
|
Use when: Deciding how much of the section one press claims. The three tiers are Button's three, deliberately — a glyph-alone control and a labelled CTA in the same band have to rank against each other, and they cannot do that in two vocabularies.
|
|
68
|
-
Never for: Ranking a row of these against each other. A footer's five social links are peers; one of them drawn heavier says the other four are lesser, which is not a thing anybody meant to say. And never inverse on the ordinary page ground: against it the fill carries roughly six times the contrast of the brand, so the primary beside it stops reading as the primary and one-primary-per-view is broken with no second primary anywhere in sight. And never for a control that has to be found rather than recognised: with no fill
|
|
68
|
+
Never for: Ranking a row of these against each other. A footer's five social links are peers; one of them drawn heavier says the other four are lesser, which is not a thing anybody meant to say. And never inverse on the ordinary page ground: against it the fill carries roughly six times the contrast of the brand, so the primary beside it stops reading as the primary and one-primary-per-view is broken with no second primary anywhere in sight. And never for a control that has to be found rather than recognised: with no fill, a plain one is a glyph until it is hovered, so it belongs where the reader already knows something is — a corner, a row of marks, the end of a header — and not adrift on a page.
|
|
69
69
|
|
|
70
70
|
### size — `sm` | `md` | `lg` (default `md`)
|
|
71
71
|
|
|
@@ -79,7 +79,7 @@ Never for: Making one of a set stand out. Two of these side by side at different
|
|
|
79
79
|
### tone — `default` | `inverse` (default `default`)
|
|
80
80
|
|
|
81
81
|
- `default` — The control is on a light ground, which is every surface this package paints by default
|
|
82
|
-
- `inverse` — The control
|
|
82
|
+
- `inverse` — The control stands on the dark band, color.bg.brand-strong — a mark in a navigation bar on a hero, a social mark in a footer — which is the same near-black in light and dark. The ink and the tints move to the band's fixed roles; nothing else does
|
|
83
83
|
|
|
84
84
|
### icon — `node` **Required.**
|
|
85
85
|
|
|
@@ -111,7 +111,7 @@ its props — do not re-derive them from the variant descriptions above.
|
|
|
111
111
|
- **Dismissing a promotional bar or a cookie band** — `variant="secondary"` `size="md"`
|
|
112
112
|
It is a button rather than an anchor — leave href off — because the page handles the press itself and nothing about it is a place a visitor could bookmark. Secondary rather than primary: the bar's own call to action is the primary, and a dismiss that outranks it is a band arguing with itself.
|
|
113
113
|
- **Playing a video in a hero, or over a photograph** — `variant="inverse"` `size="lg"`, not `variant="primary"`
|
|
114
|
-
A brand fill is invisible against a brand ground and a neutral
|
|
114
|
+
A brand fill is invisible against a brand ground and a neutral tint is lost over a photograph, so the only thing that reads there is a solid at the far end of the neutral ramp. lg because it is the one control in view and it is read at a distance, which is the case size.control.lg was cut for.
|
|
115
115
|
- **The previous and next controls of a carousel** — `variant="secondary"` `size="md"`, not `size="lg"`
|
|
116
116
|
A pair of peers, sized by the band they sit in rather than by themselves. lg stands a step taller than md, which puts it above the copy beside it in most bands — the one place a hero measure is wrong. Both take the same variant, because one of two directions drawn heavier says the other is unavailable.
|
|
117
117
|
|
|
@@ -195,6 +195,14 @@ The target and the mark are separate decisions, and conflating them is what prod
|
|
|
195
195
|
|
|
196
196
|
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.
|
|
197
197
|
Guidance only — cannot be checked automatically.
|
|
198
|
+
- **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.
|
|
199
|
+
|
|
200
|
+
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.
|
|
201
|
+
|
|
202
|
+
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.
|
|
203
|
+
|
|
204
|
+
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.
|
|
205
|
+
Guidance only — cannot be checked automatically.
|
|
198
206
|
|
|
199
207
|
## Anti-examples
|
|
200
208
|
|
package/.llm/components/card.md
CHANGED
|
@@ -50,9 +50,10 @@ Apply these classes from the generated `cardParts` constant rather than writing
|
|
|
50
50
|
|
|
51
51
|
## Props
|
|
52
52
|
|
|
53
|
-
### variant — `surface` | `surface-raised` | `plain` | `accent` | `accent-strong` (default `surface`)
|
|
53
|
+
### variant — `surface` | `surface-light` | `surface-raised` | `plain` | `accent` | `accent-strong` (default `surface`)
|
|
54
54
|
|
|
55
55
|
- `surface` — The default, and right for a card on the page. The marketing page is white and this is a step off it, so the card is told apart by being recessed — no shadow and no border, because the fill is already the edge
|
|
56
|
+
- `surface-light` — A light card among dark ones that has to stay light in both themes — a row mixing a dark, a coral and a grey card, where the grey one flipping to dark in dark mode would make two dark cards and break the set. gray.50 with gray.950 text, fixed. For an ordinary card that follows the theme, surface.
|
|
56
57
|
- `surface-raised` — The card sits on a color.bg.subtle band rather than on the page. There the recessed fill is only 1.09:1 against its ground and all but disappears; this one is 1.23:1 the other way, lifting off the band instead of sinking into it
|
|
57
58
|
- `plain` — An editorial card — an article, a post, a story — where the picture and the headline are what separate one card from the next. It paints no background, so it shows whatever is under it: the page, a subtle band, or a section that has taken a colour. The corner and the clip are still the card's, so a picture at the top of it meets a rounded edge rather than squaring one off It takes no corner either: radius.surface is the shape of a fill, and with no fill there is nothing to round — a rounded picture sitting on the page reads as a floating tile rather than as the art leading an article.
|
|
58
59
|
- `accent` — One card in a set is the promotional one and the page has already earned the colour. The coral is the loudest ground here, so a row of them is a row of nothing louder than the rest
|
|
@@ -143,6 +144,14 @@ The target and the mark are separate decisions, and conflating them is what prod
|
|
|
143
144
|
|
|
144
145
|
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.
|
|
145
146
|
Guidance only — cannot be checked automatically.
|
|
147
|
+
- **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.
|
|
148
|
+
|
|
149
|
+
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.
|
|
150
|
+
|
|
151
|
+
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.
|
|
152
|
+
|
|
153
|
+
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.
|
|
154
|
+
Guidance only — cannot be checked automatically.
|
|
146
155
|
|
|
147
156
|
## Anti-examples
|
|
148
157
|
|
|
@@ -174,6 +183,11 @@ import { Card, CardBody } from '@deriv-com/dds-marketing'
|
|
|
174
183
|
<CardBody title="Tight spreads" description="Competitive pricing on every market, with no hidden markup." />
|
|
175
184
|
</Card>
|
|
176
185
|
|
|
186
|
+
// surface-light — light in both themes
|
|
187
|
+
<Card variant="surface-light">
|
|
188
|
+
<CardBody title="Controlled risk" description="Set your limits with take profit and stop loss." />
|
|
189
|
+
</Card>
|
|
190
|
+
|
|
177
191
|
// surface-raised — on a subtle band
|
|
178
192
|
<Card variant="surface-raised">
|
|
179
193
|
<CardBody title="Fast execution" description="Orders filled in milliseconds, even when the market moves." />
|
|
@@ -23,7 +23,7 @@ Everything a card holds: the words inset from its edges and the picture that rea
|
|
|
23
23
|
|
|
24
24
|
## Anatomy
|
|
25
25
|
|
|
26
|
-
CardBody renders
|
|
26
|
+
CardBody renders 10 elements. A token binding names the part it applies to.
|
|
27
27
|
|
|
28
28
|
- `root` — `<div>`, class `dds-cardbody`. The whole of the card's content, and no padding of its own. That is the entire trick: the inset sits on `content` one level in, so the picture beside it can reach the card's edges without anything being cancelled back off. A body that padded itself and then pulled the picture out again with a negative margin would be two decisions undoing each other, and neither would be findable from the other.
|
|
29
29
|
|
|
@@ -78,7 +78,7 @@ CardBody renders 9 elements. A token binding names the part it applies to.
|
|
|
78
78
|
|
|
79
79
|
It takes font.h5, the smallest step the heading scale has and the one this package's cards already used. The level and the size are separate decisions and this part makes both, which is the trade for a consumer not having to know either.
|
|
80
80
|
|
|
81
|
-
It binds no colour. The Card sets one per variant on its root and colour inherits, so a title on the brand fill takes fg.on-
|
|
81
|
+
It binds no colour. The Card sets one per variant on its root and colour inherits, so a title on the brand fill takes fg.on-brand and the same title on the page takes fg.default without this part knowing which card it is in. Binding a role here would override that and put near-black text on the brand-strong fill.
|
|
82
82
|
|
|
83
83
|
It has two steps. `font.h5` is the default and is a heading over a group of cards; `compact` takes `font.label.md`, sixteen at semibold.
|
|
84
84
|
|
|
@@ -88,6 +88,7 @@ CardBody renders 9 elements. A token binding names the part it applies to.
|
|
|
88
88
|
A <p>. It binds no colour, for the reason the title does not.
|
|
89
89
|
|
|
90
90
|
It moves with the title. `font.body.md` by default and `font.body.sm` when the card is compact, which keeps the two a step apart — a sixteen-pixel title above sixteen-pixel copy is a card with no heading in it. Rendered only when `description` is set.
|
|
91
|
+
- `link` — `<div>`, class `dds-cardbody__link`. The card's way on, under the line and held off it by the step a description takes before its actions. A row so the Link hugs its words rather than stretching the width of the card, which would make the whole line a target. Rendered only when `link` is set.
|
|
91
92
|
- `media-frame` — `<div>`, class `dds-cardbody__media-frame`. The picture's own box, and the reason a zoom looks like a zoom. An <img> cannot clip itself — `overflow` does not apply to replaced content — so a picture that scales has to be scaled inside something. Without this the nearest clip is the Card's, one level up and around the copy as well, and a picture growing by a per cent pushes its bottom edge down over the eyebrow and the headline. In a body with no card around it at all, nothing clips it and it simply paints over whatever is below.
|
|
92
93
|
|
|
93
94
|
So the frame holds the shape and the picture moves inside it: the box keeps its place in the column while the art grows past its edges and is cut off at them, which is the whole effect.
|
|
@@ -177,6 +178,12 @@ Never for: The sentence explaining the card. That is description, which sits und
|
|
|
177
178
|
Use when: What the title means, usually a sentence or two. It takes the default body step, because a card's copy is copy rather than a caption. A string rather than a node, for the reason the title is one — a node prop cannot be given text in an examples row, and a card nobody can show is worse than a sentence that cannot hold a link.
|
|
178
179
|
Never for: A control. This body holds two regions and neither is a place to act from — a card with a call to action puts it in the Card beneath this, where it is not wearing the body's copy styling
|
|
179
180
|
|
|
181
|
+
### link — `node`
|
|
182
|
+
|
|
183
|
+
Accepts: Link
|
|
184
|
+
Use when: The card's own way on — "Learn more" — under the line, for a card in a Card rather than a CardButton: the card is read and the link is what is pressed. A standalone Link. On a card that paints its own ground, accent or accent-strong, give it tone="inherit" so it takes the card's white; on a light card it keeps its coral.
|
|
185
|
+
Never for: A card inside a CardButton. The whole card is already the link there, and a link inside a link is two destinations under one press — invalid HTML, and a screen reader announces both. Nor a Button: a card's way on is a destination, not an action.
|
|
186
|
+
|
|
180
187
|
### mark — `node`
|
|
181
188
|
|
|
182
189
|
Accepts: Icon
|
|
@@ -280,6 +287,14 @@ The target and the mark are separate decisions, and conflating them is what prod
|
|
|
280
287
|
|
|
281
288
|
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.
|
|
282
289
|
Guidance only — cannot be checked automatically.
|
|
290
|
+
- **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.
|
|
291
|
+
|
|
292
|
+
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.
|
|
293
|
+
|
|
294
|
+
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.
|
|
295
|
+
|
|
296
|
+
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.
|
|
297
|
+
Guidance only — cannot be checked automatically.
|
|
283
298
|
|
|
284
299
|
## Anti-examples
|
|
285
300
|
|
|
@@ -407,3 +422,14 @@ import { CardBody } from '@deriv-com/dds-marketing'
|
|
|
407
422
|
// inverse — it follows the dark ground
|
|
408
423
|
<CardBody tone="inverse" eyebrow="New" title="Deriv App" description="Manage accounts and access markets anytime." />
|
|
409
424
|
```
|
|
425
|
+
|
|
426
|
+
### With a way on
|
|
427
|
+
|
|
428
|
+
A way on under the line, for a card that is read rather than pressed. On a card that paints its own ground the Link takes tone="inherit" — FeatureCards shows it on dark and coral.
|
|
429
|
+
|
|
430
|
+
```tsx
|
|
431
|
+
import { CardBody, Link } from '@deriv-com/dds-marketing'
|
|
432
|
+
|
|
433
|
+
// A "Learn more" under the line
|
|
434
|
+
<CardBody title="Tight spreads" description="Competitive pricing on every market." link={<Link href="/pricing">Learn more</Link>} />
|
|
435
|
+
```
|
|
@@ -59,9 +59,10 @@ Apply these classes from the generated `cardButtonParts` constant rather than wr
|
|
|
59
59
|
|
|
60
60
|
## Props
|
|
61
61
|
|
|
62
|
-
### variant — `surface` | `surface-raised` | `accent` | `accent-strong` | `plain` (default `surface`)
|
|
62
|
+
### variant — `surface` | `surface-light` | `surface-raised` | `accent` | `accent-strong` | `plain` (default `surface`)
|
|
63
63
|
|
|
64
64
|
- `surface` — The default, and right for a pressable card on the page. The same recessed step off the white page that Card takes, so a row mixing pressable and plain cards reads as one row
|
|
65
|
+
- `surface-light` — A light card among dark ones that has to stay light in both themes — a row mixing a dark, a coral and a grey card, where the grey one flipping to dark in dark mode would make two dark cards. gray.50 with gray.950 text, fixed. For an ordinary card that follows the theme, surface.
|
|
65
66
|
- `surface-raised` — The card sits on a color.bg.subtle band rather than on the page, where the recessed fill all but disappears and this one lifts off the band instead
|
|
66
67
|
- `accent` — One card in a set is the promotional one and the page has already earned the colour
|
|
67
68
|
- `accent-strong` — A card carrying more weight than its neighbours. The darkest of the four, and the one that takes white at 20.55:1 — the most legible ground a marketing card has
|
|
@@ -151,6 +152,14 @@ The target and the mark are separate decisions, and conflating them is what prod
|
|
|
151
152
|
|
|
152
153
|
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.
|
|
153
154
|
Guidance only — cannot be checked automatically.
|
|
155
|
+
- **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.
|
|
156
|
+
|
|
157
|
+
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.
|
|
158
|
+
|
|
159
|
+
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.
|
|
160
|
+
|
|
161
|
+
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.
|
|
162
|
+
Guidance only — cannot be checked automatically.
|
|
154
163
|
|
|
155
164
|
## Anti-examples
|
|
156
165
|
|
|
@@ -211,6 +220,11 @@ import { CardBody, CardButton } from '@deriv-com/dds-marketing'
|
|
|
211
220
|
<CardBody title="Tight spreads" description="Competitive pricing on every market." />
|
|
212
221
|
</CardButton>
|
|
213
222
|
|
|
223
|
+
// surface-light — light in both themes
|
|
224
|
+
<CardButton variant="surface-light" href="/stocks/risk">
|
|
225
|
+
<CardBody title="Controlled risk" description="Set your limits with take profit and stop loss." />
|
|
226
|
+
</CardButton>
|
|
227
|
+
|
|
214
228
|
// surface-raised — on a subtle band
|
|
215
229
|
<CardButton variant="surface-raised" href="/markets/indices">
|
|
216
230
|
<CardBody title="Indices" description="Track the world’s major markets in one place." />
|
|
@@ -170,6 +170,14 @@ The target and the mark are separate decisions, and conflating them is what prod
|
|
|
170
170
|
|
|
171
171
|
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.
|
|
172
172
|
Guidance only — cannot be checked automatically.
|
|
173
|
+
- **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.
|
|
174
|
+
|
|
175
|
+
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.
|
|
176
|
+
|
|
177
|
+
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.
|
|
178
|
+
|
|
179
|
+
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.
|
|
180
|
+
Guidance only — cannot be checked automatically.
|
|
173
181
|
|
|
174
182
|
## Anti-examples
|
|
175
183
|
|