@deriv-com/dds-marketing 0.2.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.llm/components/accordion.md +9 -1
- package/.llm/components/accordionitem.md +9 -1
- package/.llm/components/aspectratio.md +9 -1
- package/.llm/components/badge.md +9 -1
- package/.llm/components/bottomsheet.md +9 -1
- package/.llm/components/breadcrumb.md +9 -1
- package/.llm/components/breadcrumbitem.md +9 -1
- package/.llm/components/button.md +55 -27
- package/.llm/components/buttonicon.md +16 -8
- package/.llm/components/card.md +16 -2
- package/.llm/components/cardbody.md +29 -3
- package/.llm/components/cardbutton.md +16 -2
- package/.llm/components/checkbox.md +9 -1
- package/.llm/components/ctabanner.md +186 -0
- package/.llm/components/ctabannerslider.md +204 -0
- package/.llm/components/divider.md +9 -1
- package/.llm/components/dropdownmenu.md +15 -7
- 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 +9 -1
- package/.llm/components/footer.md +9 -1
- package/.llm/components/footergroup.md +9 -1
- package/.llm/components/grid.md +9 -1
- package/.llm/components/icon.md +21 -3
- package/.llm/components/landinghero.md +254 -0
- package/.llm/components/link.md +13 -5
- package/.llm/components/logocolumns.md +235 -0
- package/.llm/components/logorows.md +212 -0
- package/.llm/components/menuitem.md +9 -1
- package/.llm/components/navbar.md +80 -16
- package/.llm/components/navbaritem.md +10 -2
- package/.llm/components/navbarmenu.md +9 -1
- package/.llm/components/navbarmenugroup.md +9 -1
- package/.llm/components/navbarpanel.md +10 -2
- package/.llm/components/navbarswitcher.md +10 -2
- package/.llm/components/navbarswitcheroption.md +9 -1
- package/.llm/components/option.md +9 -1
- package/.llm/components/pageheader.md +231 -0
- package/.llm/components/pagination.md +27 -90
- package/.llm/components/paginationdots.md +215 -0
- package/.llm/components/producthero.md +248 -0
- package/.llm/components/removablechip.md +9 -1
- package/.llm/components/row.md +9 -1
- package/.llm/components/scroller.md +9 -1
- package/.llm/components/searchinput.md +9 -1
- package/.llm/components/segmentedcontrol.md +9 -1
- package/.llm/components/segmentedcontrolitem.md +9 -1
- package/.llm/components/select.md +9 -1
- package/.llm/components/selectchip.md +57 -16
- package/.llm/components/spinner.md +9 -1
- package/.llm/components/stack.md +9 -1
- package/.llm/components/statusdot.md +9 -1
- package/.llm/components/subdomainnavbar.md +9 -1
- package/.llm/components/tab.md +11 -3
- package/.llm/components/table.md +9 -1
- package/.llm/components/tablebody.md +9 -1
- package/.llm/components/tablecell.md +9 -1
- package/.llm/components/tablehead.md +9 -1
- package/.llm/components/tableheadercell.md +9 -1
- package/.llm/components/tablerow.md +9 -1
- package/.llm/components/tablist.md +9 -1
- package/.llm/components/testimonialrow.md +235 -0
- package/.llm/components/testimonialslider.md +254 -0
- package/.llm/components/textarea.md +9 -1
- package/.llm/components/textinput.md +9 -1
- package/.llm/components/tooltip.md +9 -1
- package/.llm/components/typography.md +9 -1
- 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 +43 -9
- package/.llm/tokens.md +56 -12
- package/AGENTS.md +32 -8
- 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/link/Link.js +5 -5
- 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/Tab.types.d.ts +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
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useId } from 'react';
|
|
4
|
+
import './FeatureSplit.css';
|
|
5
|
+
import './feature-split-impl.css';
|
|
6
|
+
import '../block-reveal.css';
|
|
7
|
+
import { arriving, useReveal } from '../use-reveal.js';
|
|
8
|
+
import { given } from '../../given.js';
|
|
9
|
+
import { featureSplitDefaults, featureSplitParts, } from './FeatureSplit.types.js';
|
|
10
|
+
/**
|
|
11
|
+
* A section putting one claim, a line explaining it and a way onward beside a single picture.
|
|
12
|
+
*
|
|
13
|
+
* The plainest block this package has, and that is what it is for: a page that has said what
|
|
14
|
+
* something is needs somewhere to say one more thing about it without opening a list, a grid or a
|
|
15
|
+
* set of cards.
|
|
16
|
+
*
|
|
17
|
+
* A split rather than a stack, because the picture is the other half of the argument — the same
|
|
18
|
+
* words over a full-width photograph read as a caption, and beside it they read as a claim with
|
|
19
|
+
* evidence.
|
|
20
|
+
*
|
|
21
|
+
* The steps inside the column are carried by each part's own `margin-block-end` rather than by a
|
|
22
|
+
* gap on the column, because title-to-description and description-to-what-follows are two
|
|
23
|
+
* different roles that a single gap could only ever be one of. `content` binds `space.gap.none`
|
|
24
|
+
* to say the absence is deliberate rather than forgotten.
|
|
25
|
+
*
|
|
26
|
+
* The source template carried `showDescription` and `showLink` beside the values themselves. Both
|
|
27
|
+
* are gone: absence is the switch, which is the rule Footer set and `given` exists for. A flag
|
|
28
|
+
* saying whether to draw a value the caller already decided not to pass is two ways to say one
|
|
29
|
+
* thing, and they disagree the first time somebody sets only one of them.
|
|
30
|
+
*
|
|
31
|
+
* The title carries the section's accessible name through `aria-labelledby`. A `<section>` is only
|
|
32
|
+
* a region landmark once it has a name.
|
|
33
|
+
*/
|
|
34
|
+
export function FeatureSplit({ ground = featureSplitDefaults.ground, mediaPosition = featureSplitDefaults.mediaPosition, title, description, link, media, }) {
|
|
35
|
+
const titleId = useId();
|
|
36
|
+
const [band, revealed] = useReveal();
|
|
37
|
+
return (_jsx("section", { className: featureSplitParts.root, "data-ground": ground, "data-media-position": mediaPosition, "aria-labelledby": titleId, children: _jsx("div", { className: featureSplitParts.inner, ref: band, "data-revealed": revealed, children: _jsxs("div", { className: featureSplitParts.split, children: [_jsxs("div", { className: featureSplitParts.content, children: [_jsx("h2", { className: featureSplitParts.title, ...arriving(0), id: titleId, children: title }), given(description) ? (_jsx("p", { className: featureSplitParts.description, ...arriving(1), children: description })) : null, link ? (_jsx("div", { className: featureSplitParts.link, ...arriving(2), children: link })) : null] }), _jsx("div", { className: featureSplitParts.media, ...arriving(3), "aria-hidden": "true", children: media })] }) }) }));
|
|
38
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export interface FeatureSplitOwnProps {
|
|
3
|
+
/**
|
|
4
|
+
* `page` — The default, and the page's own white. A section that has nothing to separate itself from what is above it — most of them — and the ground a reader is already on
|
|
5
|
+
* `subtle` — A quiet step off the page, for a band that wants to read as its own section without changing the page's voice. The one to reach for first when two sections need telling apart. Painted as the band's tint laid over the page's own ground, so it is the same grey whatever is behind the section — in dark mode the tint alone took on whatever it was set against, and on a light surface it was light ink on white.
|
|
6
|
+
* `strong` — `color.bg.brand-strong`, the dark band. It stops the page rather than dividing it, so it is for a section a reader should arrive at — and one per page is usually one more than enough
|
|
7
|
+
*/
|
|
8
|
+
ground?: 'page' | 'subtle' | 'strong';
|
|
9
|
+
/**
|
|
10
|
+
* `end` — The default. The claim is read first, which is the order the section argues in
|
|
11
|
+
* `start` — The second of two on a page, so the two do not read as one column with a picture stuck to one side
|
|
12
|
+
*/
|
|
13
|
+
mediaPosition?: 'end' | 'start';
|
|
14
|
+
/** Always. The one claim the section makes, in the fewest words that say it */
|
|
15
|
+
title: string;
|
|
16
|
+
/** The lines under the title that say what the claim above means, for a reader not convinced by the claim alone. Two sentences is the normal length here and what the section is sized around — one is usually the title restated, and the column is wide enough to carry more than that. */
|
|
17
|
+
description?: string;
|
|
18
|
+
/** The section has somewhere to send a reader who wants more than it says — the page this one is a summary of. "Learn more" is this site's wording for it, and using the same three words everywhere is what lets a reader stop reading them: a link that renames itself per section is a link somebody has to read before they know it is the way onward. */
|
|
19
|
+
link?: ReactNode;
|
|
20
|
+
/** Always. The picture that sits beside the claim — a screenshot, a photograph, an illustration. The section is a split and the picture is one half of it: without one the claim runs to a measure it was never sized for. */
|
|
21
|
+
media: ReactNode;
|
|
22
|
+
}
|
|
23
|
+
export type FeatureSplitProps = FeatureSplitOwnProps;
|
|
24
|
+
/** The class each part carries. Apply these — do not retype them. */
|
|
25
|
+
export declare const featureSplitParts: {
|
|
26
|
+
readonly root: "dds-featuresplit";
|
|
27
|
+
readonly inner: "dds-featuresplit__inner";
|
|
28
|
+
readonly split: "dds-featuresplit__split";
|
|
29
|
+
readonly content: "dds-featuresplit__content";
|
|
30
|
+
readonly title: "dds-featuresplit__title";
|
|
31
|
+
readonly description: "dds-featuresplit__description";
|
|
32
|
+
readonly link: "dds-featuresplit__link";
|
|
33
|
+
readonly media: "dds-featuresplit__media";
|
|
34
|
+
};
|
|
35
|
+
/** Generated so defaults cannot drift from the contract. */
|
|
36
|
+
export declare const featureSplitDefaults: {
|
|
37
|
+
readonly ground: "page";
|
|
38
|
+
readonly mediaPosition: "end";
|
|
39
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// GENERATED from feature-split.contract.json. Do not edit.
|
|
2
|
+
/** The class each part carries. Apply these — do not retype them. */
|
|
3
|
+
export const featureSplitParts = {
|
|
4
|
+
root: 'dds-featuresplit',
|
|
5
|
+
inner: 'dds-featuresplit__inner',
|
|
6
|
+
split: 'dds-featuresplit__split',
|
|
7
|
+
content: 'dds-featuresplit__content',
|
|
8
|
+
title: 'dds-featuresplit__title',
|
|
9
|
+
description: 'dds-featuresplit__description',
|
|
10
|
+
link: 'dds-featuresplit__link',
|
|
11
|
+
media: 'dds-featuresplit__media',
|
|
12
|
+
};
|
|
13
|
+
/** Generated so defaults cannot drift from the contract. */
|
|
14
|
+
export const featureSplitDefaults = { ground: 'page', mediaPosition: 'end' };
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Scoped to this package, like the generated sheet beside it.
|
|
3
|
+
*
|
|
4
|
+
* `:where([data-dds-context="marketing"])` confines these rules without contributing specificity,
|
|
5
|
+
* so each is decided against the generated rule on its own terms.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/*
|
|
9
|
+
* A title with nothing under it carries no step under it.
|
|
10
|
+
*
|
|
11
|
+
* The steps inside the column sit on each part's own `margin-block-end`, because title-to-
|
|
12
|
+
* description and description-to-what-follows are two different roles. The cost is a trailing
|
|
13
|
+
* margin: with both the description and the link absent, the title is the last child and its step
|
|
14
|
+
* is measured against nothing.
|
|
15
|
+
*
|
|
16
|
+
* `:last-child` is the condition itself rather than a prop standing in for it — two parts can
|
|
17
|
+
* follow the title, and asking the DOM which is last is the question with one answer.
|
|
18
|
+
*/
|
|
19
|
+
:where([data-dds-context="marketing"]) .dds-featuresplit .dds-featuresplit__title:last-child,
|
|
20
|
+
:where([data-dds-context="marketing"]) .dds-featuresplit .dds-featuresplit__description:last-child {
|
|
21
|
+
margin-block-end: 0;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/*
|
|
25
|
+
* One column below the fold, and the claim leads it.
|
|
26
|
+
*
|
|
27
|
+
* The row direction is the contract's to say — it varies by a styling axis, which is what
|
|
28
|
+
* `structure[]` is for, and the generated sheet carries both values. What is left here is the
|
|
29
|
+
* fold, which a binding cannot express: `structure` has no width to attach a rule to.
|
|
30
|
+
*
|
|
31
|
+
* Written a class deeper than it looks so it wins. The generated rule is
|
|
32
|
+
* `.dds-featuresplit[data-media-position="end"] .dds-featuresplit__split` — a class, an attribute
|
|
33
|
+
* and a class — and a plainer selector here would lose to it however late it is loaded. That is
|
|
34
|
+
* the fault FeatureBullets shipped with for an afternoon: the split stayed a column at every
|
|
35
|
+
* width, and a picture given `flex: 1 1 0` on the block axis collapsed to nothing.
|
|
36
|
+
*
|
|
37
|
+
* `48rem` longhand because `var()` is not permitted in a container query condition, and it is the
|
|
38
|
+
* width the rest of this package folds at.
|
|
39
|
+
*/
|
|
40
|
+
@container (max-width: 47.9375rem) {
|
|
41
|
+
:where([data-dds-context="marketing"])
|
|
42
|
+
.dds-featuresplit[data-media-position]
|
|
43
|
+
.dds-featuresplit__split {
|
|
44
|
+
flex-direction: column;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/*
|
|
49
|
+
* At full width the claim takes a measure and the picture takes the rest.
|
|
50
|
+
*
|
|
51
|
+
* The reference design writes 540px against its 1280, which is a number only right at one width.
|
|
52
|
+
* A share holds everywhere, and the picture growing into whatever is left is what keeps the square
|
|
53
|
+
* square without either half naming a height.
|
|
54
|
+
*/
|
|
55
|
+
@container (min-width: 48rem) {
|
|
56
|
+
:where([data-dds-context="marketing"]) .dds-featuresplit .dds-featuresplit__split {
|
|
57
|
+
align-items: center;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
:where([data-dds-context="marketing"]) .dds-featuresplit .dds-featuresplit__content {
|
|
61
|
+
flex: 0 0 45%;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
:where([data-dds-context="marketing"]) .dds-featuresplit .dds-featuresplit__media {
|
|
65
|
+
flex: 1 1 0;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/*
|
|
70
|
+
* Whatever the page put in the picture fills the square.
|
|
71
|
+
*
|
|
72
|
+
* The slot takes a node rather than a source, so what arrives is the page's element and this
|
|
73
|
+
* cannot know whether it carries dimensions. `cover` rather than `contain`, because the slot is a
|
|
74
|
+
* square the section decided on and a picture letterboxed inside it would show the ground through
|
|
75
|
+
* a corner the section rounded.
|
|
76
|
+
*/
|
|
77
|
+
:where([data-dds-context="marketing"]) .dds-featuresplit .dds-featuresplit__media > *,
|
|
78
|
+
:where([data-dds-context="marketing"]) .dds-featuresplit .dds-featuresplit__media img {
|
|
79
|
+
block-size: 100%;
|
|
80
|
+
display: block;
|
|
81
|
+
inline-size: 100%;
|
|
82
|
+
object-fit: cover;
|
|
83
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/* GENERATED from landinghero.contract.json. Do not edit. */
|
|
2
|
+
|
|
3
|
+
:where([data-dds-context="marketing"]) .dds-landinghero {
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
container-type: inline-size;
|
|
6
|
+
display: flex;
|
|
7
|
+
inline-size: 100%;
|
|
8
|
+
justify-content: center;
|
|
9
|
+
overflow: hidden;
|
|
10
|
+
position: relative;
|
|
11
|
+
background-color: var(--color-bg-brand-strong);
|
|
12
|
+
color: var(--color-fg-on-brand-strong);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
:where([data-dds-context="marketing"]) .dds-landinghero .dds-landinghero__inner {
|
|
16
|
+
box-sizing: border-box;
|
|
17
|
+
display: flex;
|
|
18
|
+
inline-size: 100%;
|
|
19
|
+
min-inline-size: 0;
|
|
20
|
+
position: relative;
|
|
21
|
+
max-inline-size: var(--size-content-max);
|
|
22
|
+
padding-block: var(--space-section-default);
|
|
23
|
+
padding-inline: var(--space-inset-page);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
:where([data-dds-context="marketing"]) .dds-landinghero .dds-landinghero__content {
|
|
27
|
+
display: flex;
|
|
28
|
+
flex-direction: column;
|
|
29
|
+
inline-size: 100%;
|
|
30
|
+
min-inline-size: 0;
|
|
31
|
+
row-gap: var(--space-heading-description-actions);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
:where([data-dds-context="marketing"]) .dds-landinghero .dds-landinghero__text {
|
|
35
|
+
display: flex;
|
|
36
|
+
flex-direction: column;
|
|
37
|
+
min-inline-size: 0;
|
|
38
|
+
row-gap: var(--space-gap-none);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
:where([data-dds-context="marketing"]) .dds-landinghero .dds-landinghero__eyebrow {
|
|
42
|
+
margin-block: 0;
|
|
43
|
+
font-family: var(--font-eyebrow-lg-family);
|
|
44
|
+
font-size: var(--font-eyebrow-lg-size);
|
|
45
|
+
font-weight: var(--font-eyebrow-lg-weight);
|
|
46
|
+
letter-spacing: var(--font-eyebrow-lg-letter-spacing);
|
|
47
|
+
line-height: var(--font-eyebrow-lg-line-height);
|
|
48
|
+
margin-block-end: var(--space-heading-eyebrow-title);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
:where([data-dds-context="marketing"]) .dds-landinghero .dds-landinghero__title {
|
|
52
|
+
margin-block: 0;
|
|
53
|
+
text-wrap: balance;
|
|
54
|
+
font-family: var(--font-h1-family);
|
|
55
|
+
font-size: var(--font-h1-size);
|
|
56
|
+
font-weight: var(--font-h1-weight);
|
|
57
|
+
letter-spacing: var(--font-h1-letter-spacing);
|
|
58
|
+
line-height: var(--font-h1-line-height);
|
|
59
|
+
margin-block-end: var(--space-heading-title-description);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
:where([data-dds-context="marketing"]) .dds-landinghero .dds-landinghero__description {
|
|
63
|
+
margin-block: 0;
|
|
64
|
+
font-family: var(--font-body-md-family);
|
|
65
|
+
font-size: var(--font-body-md-size);
|
|
66
|
+
font-weight: var(--font-body-md-weight);
|
|
67
|
+
letter-spacing: var(--font-body-md-letter-spacing);
|
|
68
|
+
line-height: var(--font-body-md-line-height);
|
|
69
|
+
max-inline-size: var(--size-measure-hero-description);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
:where([data-dds-context="marketing"]) .dds-landinghero .dds-landinghero__actions {
|
|
73
|
+
display: flex;
|
|
74
|
+
flex-wrap: wrap;
|
|
75
|
+
column-gap: var(--space-actions-gap);
|
|
76
|
+
row-gap: var(--space-actions-gap);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
:where([data-dds-context="marketing"]) .dds-landinghero .dds-landinghero__media {
|
|
80
|
+
min-inline-size: 0;
|
|
81
|
+
position: relative;
|
|
82
|
+
aspect-ratio: var(--aspect-portrait);
|
|
83
|
+
border-radius: var(--radius-none);
|
|
84
|
+
}
|
|
85
|
+
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import './LandingHero.css';
|
|
2
|
+
import './landing-hero-impl.css';
|
|
3
|
+
import '../block-reveal.css';
|
|
4
|
+
import { type LandingHeroProps } from './LandingHero.types.js';
|
|
5
|
+
export type { LandingHeroProps };
|
|
6
|
+
/**
|
|
7
|
+
* The band that opens a marketing page.
|
|
8
|
+
*
|
|
9
|
+
* The landing tier's band, and one of three. Which band a page opens with follows from where the
|
|
10
|
+
* page sits rather than from a prop: a product page takes ProductHero and a legal page PageHeader.
|
|
11
|
+
* Separate components rather than one with a switch, so a page cannot be given a tier it is not.
|
|
12
|
+
*
|
|
13
|
+
* One column, read down: what the page is about, then what a reader can do about it. The eyebrow,
|
|
14
|
+
* the title and the description are strings the page passes; the calls to action and both visuals
|
|
15
|
+
* are nodes it composes. Nothing here writes copy or decides a destination — the same stance
|
|
16
|
+
* Footer takes at the other end of the page.
|
|
17
|
+
*
|
|
18
|
+
* `root` spans the full width and `inner` holds the measure, which is the arrangement Footer uses
|
|
19
|
+
* and for the same reason: a ground stopping at the measure would read as a wide card at the top of
|
|
20
|
+
* the page rather than as the page beginning. The ground is dark and the ink is set once on the
|
|
21
|
+
* root, inherited by the eyebrow, the title and the description alike — this package's rule about a
|
|
22
|
+
* section that paints a ground, and the reason none of the three names a colour of its own.
|
|
23
|
+
*
|
|
24
|
+
* The steps inside the text block are carried by each part's own `margin-block-end` rather than by
|
|
25
|
+
* a gap on the block. Eyebrow-to-title and title-to-description are two different roles that happen
|
|
26
|
+
* to agree at full width and part company on a phone — twelve against sixteen — so a single gap
|
|
27
|
+
* could only ever have been one of them. `text` binds `space.gap.none` to say the absence is
|
|
28
|
+
* deliberate rather than forgotten.
|
|
29
|
+
*
|
|
30
|
+
* `media` is a child of the band rather than of the column. The visual is
|
|
31
|
+
* placed against the band's own edge, which an element nested inside the measure could not reach.
|
|
32
|
+
* The title carries the band's accessible name through `aria-labelledby`. A `<section>` is only a
|
|
33
|
+
* region landmark once it has a name, and a hero that announced itself as an unnamed section is one
|
|
34
|
+
* more thing a screen reader user walks through rather than a place they can skip to. The id is
|
|
35
|
+
* `useId` rather than a prop, because a page should not have to invent one to get a landmark.
|
|
36
|
+
*
|
|
37
|
+
* Both visual slots are hidden from assistive technology. What the band says is the
|
|
38
|
+
* title and the description; a photograph that carried meaning they do not would be a hero that
|
|
39
|
+
* reads as empty to anyone who cannot see it, and the contract says so.
|
|
40
|
+
*/
|
|
41
|
+
export declare function LandingHero({ eyebrow, title, headingLevel, description, actions, media, backgroundImage, }: LandingHeroProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useId } from 'react';
|
|
4
|
+
import './LandingHero.css';
|
|
5
|
+
import './landing-hero-impl.css';
|
|
6
|
+
import '../block-reveal.css';
|
|
7
|
+
import { arriving, useReveal } from '../use-reveal.js';
|
|
8
|
+
import { given } from '../../given.js';
|
|
9
|
+
import { landingHeroDefaults, landingHeroParts, } from './LandingHero.types.js';
|
|
10
|
+
/**
|
|
11
|
+
* The band that opens a marketing page.
|
|
12
|
+
*
|
|
13
|
+
* The landing tier's band, and one of three. Which band a page opens with follows from where the
|
|
14
|
+
* page sits rather than from a prop: a product page takes ProductHero and a legal page PageHeader.
|
|
15
|
+
* Separate components rather than one with a switch, so a page cannot be given a tier it is not.
|
|
16
|
+
*
|
|
17
|
+
* One column, read down: what the page is about, then what a reader can do about it. The eyebrow,
|
|
18
|
+
* the title and the description are strings the page passes; the calls to action and both visuals
|
|
19
|
+
* are nodes it composes. Nothing here writes copy or decides a destination — the same stance
|
|
20
|
+
* Footer takes at the other end of the page.
|
|
21
|
+
*
|
|
22
|
+
* `root` spans the full width and `inner` holds the measure, which is the arrangement Footer uses
|
|
23
|
+
* and for the same reason: a ground stopping at the measure would read as a wide card at the top of
|
|
24
|
+
* the page rather than as the page beginning. The ground is dark and the ink is set once on the
|
|
25
|
+
* root, inherited by the eyebrow, the title and the description alike — this package's rule about a
|
|
26
|
+
* section that paints a ground, and the reason none of the three names a colour of its own.
|
|
27
|
+
*
|
|
28
|
+
* The steps inside the text block are carried by each part's own `margin-block-end` rather than by
|
|
29
|
+
* a gap on the block. Eyebrow-to-title and title-to-description are two different roles that happen
|
|
30
|
+
* to agree at full width and part company on a phone — twelve against sixteen — so a single gap
|
|
31
|
+
* could only ever have been one of them. `text` binds `space.gap.none` to say the absence is
|
|
32
|
+
* deliberate rather than forgotten.
|
|
33
|
+
*
|
|
34
|
+
* `media` is a child of the band rather than of the column. The visual is
|
|
35
|
+
* placed against the band's own edge, which an element nested inside the measure could not reach.
|
|
36
|
+
* The title carries the band's accessible name through `aria-labelledby`. A `<section>` is only a
|
|
37
|
+
* region landmark once it has a name, and a hero that announced itself as an unnamed section is one
|
|
38
|
+
* more thing a screen reader user walks through rather than a place they can skip to. The id is
|
|
39
|
+
* `useId` rather than a prop, because a page should not have to invent one to get a landmark.
|
|
40
|
+
*
|
|
41
|
+
* Both visual slots are hidden from assistive technology. What the band says is the
|
|
42
|
+
* title and the description; a photograph that carried meaning they do not would be a hero that
|
|
43
|
+
* reads as empty to anyone who cannot see it, and the contract says so.
|
|
44
|
+
*/
|
|
45
|
+
export function LandingHero({ eyebrow, title, headingLevel = landingHeroDefaults.headingLevel, description, actions, media, backgroundImage, }) {
|
|
46
|
+
const titleId = useId();
|
|
47
|
+
const [band, revealed] = useReveal();
|
|
48
|
+
const Title = headingLevel === 'h2' ? 'h2' : 'h1';
|
|
49
|
+
return (_jsxs("section", { className: landingHeroParts.root, "aria-labelledby": titleId,
|
|
50
|
+
/* The one inline style here, and it is a value rather than a decision: which photograph,
|
|
51
|
+
supplied by the page. Everything about how it is drawn — the cover fit and the position — is in the stylesheet, where it can be reasoned about. A background shorthand
|
|
52
|
+
would have reset those four properties every time the page passed an image. */
|
|
53
|
+
style: given(backgroundImage) ? { backgroundImage: `url(${backgroundImage})` } : undefined, children: [media ? (_jsx("div", { className: landingHeroParts.media, "aria-hidden": "true", children: media })) : null, _jsx("div", { className: landingHeroParts.inner, ref: band, "data-revealed": revealed, children: _jsxs("div", { className: landingHeroParts.content, children: [_jsxs("div", { className: landingHeroParts.text, children: [given(eyebrow) ? (_jsx("p", { className: landingHeroParts.eyebrow, ...arriving(0), children: eyebrow })) : null, _jsx(Title, { className: landingHeroParts.title, ...arriving(1), id: titleId, children: title }), given(description) ? (_jsx("p", { className: landingHeroParts.description, ...arriving(2), children: description })) : null] }), actions ? (_jsx("div", { className: landingHeroParts.actions, ...arriving(3), children: actions })) : null] }) })] }));
|
|
54
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export interface LandingHeroOwnProps {
|
|
3
|
+
/** A word or two placing the page before its title names it — a product family, a market, a campaign */
|
|
4
|
+
eyebrow?: string;
|
|
5
|
+
/** Always. The one thing the page is about, in the fewest words that still say it. It is the page's leading heading and the band's accessible name */
|
|
6
|
+
title: string;
|
|
7
|
+
/**
|
|
8
|
+
* `h1` — The default, and correct whenever the hero opens the page — which is what a hero is for
|
|
9
|
+
* `h2` — The rare page that already carries its `h1` elsewhere, and would otherwise have two
|
|
10
|
+
*/
|
|
11
|
+
headingLevel?: 'h1' | 'h2';
|
|
12
|
+
/** The sentence under the title that says what the claim above it means, for the reader who is not yet convinced by the claim alone */
|
|
13
|
+
description?: string;
|
|
14
|
+
/** The one or two things the page wants a reader to do. Composed by the page rather than described to this component, so a call to action is the same Button here as anywhere else on the site */
|
|
15
|
+
actions?: ReactNode;
|
|
16
|
+
/** The band's visual — the subject standing beside the claim, cropped by the band's own inline edge rather than floating clear of it */
|
|
17
|
+
media?: ReactNode;
|
|
18
|
+
/** A photograph filling the whole band. It is shown as it is — nothing is painted over it, so choose one already dark enough that the title reads on it */
|
|
19
|
+
backgroundImage?: string;
|
|
20
|
+
}
|
|
21
|
+
export type LandingHeroProps = LandingHeroOwnProps;
|
|
22
|
+
/** The class each part carries. Apply these — do not retype them. */
|
|
23
|
+
export declare const landingHeroParts: {
|
|
24
|
+
readonly root: "dds-landinghero";
|
|
25
|
+
readonly inner: "dds-landinghero__inner";
|
|
26
|
+
readonly content: "dds-landinghero__content";
|
|
27
|
+
readonly text: "dds-landinghero__text";
|
|
28
|
+
readonly eyebrow: "dds-landinghero__eyebrow";
|
|
29
|
+
readonly title: "dds-landinghero__title";
|
|
30
|
+
readonly description: "dds-landinghero__description";
|
|
31
|
+
readonly actions: "dds-landinghero__actions";
|
|
32
|
+
readonly media: "dds-landinghero__media";
|
|
33
|
+
};
|
|
34
|
+
/** Generated so defaults cannot drift from the contract. */
|
|
35
|
+
export declare const landingHeroDefaults: {
|
|
36
|
+
readonly headingLevel: "h1";
|
|
37
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// GENERATED from landing-hero.contract.json. Do not edit.
|
|
2
|
+
/** The class each part carries. Apply these — do not retype them. */
|
|
3
|
+
export const landingHeroParts = {
|
|
4
|
+
root: 'dds-landinghero',
|
|
5
|
+
inner: 'dds-landinghero__inner',
|
|
6
|
+
content: 'dds-landinghero__content',
|
|
7
|
+
text: 'dds-landinghero__text',
|
|
8
|
+
eyebrow: 'dds-landinghero__eyebrow',
|
|
9
|
+
title: 'dds-landinghero__title',
|
|
10
|
+
description: 'dds-landinghero__description',
|
|
11
|
+
actions: 'dds-landinghero__actions',
|
|
12
|
+
media: 'dds-landinghero__media',
|
|
13
|
+
};
|
|
14
|
+
/** Generated so defaults cannot drift from the contract. */
|
|
15
|
+
export const landingHeroDefaults = { headingLevel: 'h1' };
|