@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
|
@@ -1,30 +1,25 @@
|
|
|
1
1
|
import type { AnchorHTMLAttributes, ReactNode } from 'react';
|
|
2
2
|
export interface ButtonOwnProps {
|
|
3
|
-
/**
|
|
4
|
-
* `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.
|
|
5
|
-
* `secondary` — A real destination that is not the one being pushed — compare plans, read the docs, talk to sales. An outline rather than a quiet fill: this package has color.bg.hover for the wash but no hover partner for color.bg.subtle, so a filled secondary would get lighter on hover instead of darker. The outline keeps the shape, the inset and the target size, and gives up only the fill.
|
|
6
|
-
* `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.
|
|
7
|
-
*/
|
|
8
|
-
variant?: 'primary' | 'secondary' | 'inverse';
|
|
9
3
|
/**
|
|
10
4
|
* `sm` — A dense band where the button is one control among several — a filter row, a utility bar, an action beside body copy. size.control.sm tall against space.control.sm on the sides, half of it as at every step. The label holds at font.label.sm, md's own 14px: the label ramp has no step below it, so what separates these two is the box. Desktop only — at thirty-two it is below what a finger reliably hits.
|
|
11
5
|
* `md` — The default, and everything that is not a hero — navigation bars, pricing rows, feature sections, footer bands. size.control.md tall against space.control.md on the sides, which is half of it, and font.label.sm — the 14px step, so the label matches product's default button rather than running a size above it.
|
|
12
6
|
* `lg` — A hero, or a full-width conversion band that is the only control in view. size.control.lg tall against space.control.lg on the sides, again half the height, so the label starts where the pill's curve stops. font.label.md at 16px, product's own large-button measure. One per page, usually: a page of lg CTAs has no hero.
|
|
13
7
|
*/
|
|
14
8
|
size?: 'sm' | 'md' | 'lg';
|
|
15
|
-
/**
|
|
16
|
-
|
|
17
|
-
* `inherit` — A section that painted its own ground and set its own ink: a dark hero, a brand band, a photo. The button stops naming a colour and takes the one around it, so the edge and the label are whatever the band decided was legible on itself
|
|
18
|
-
*/
|
|
19
|
-
tone?: 'default' | 'inherit';
|
|
20
|
-
/** Always. The destination is the component — an anchor without an href is not a link, is not reachable by keyboard, and is announced as plain text, so there is no default that could stand in for one. It takes no default and is not optional for exactly that reason. */
|
|
21
|
-
href: string;
|
|
9
|
+
/** 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. */
|
|
10
|
+
href?: string;
|
|
22
11
|
/** Where the destination continues a sequence rather than being simply somewhere else to go — the hero CTA that starts a signup, the button at the foot of a step. Named for the part it renders rather than for the mark inside it: which glyph that is belongs to the component, the way showClose and showTitle name their parts elsewhere. Today it is a forward arrow, and it slides on hover. */
|
|
23
12
|
showIcon?: boolean;
|
|
24
13
|
/** Allowed: text */
|
|
25
14
|
children: ReactNode;
|
|
26
15
|
}
|
|
27
|
-
export type ButtonProps = ButtonOwnProps & Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'className' | 'variant' | 'size' | 'tone' | 'href' | 'showIcon'
|
|
16
|
+
export type ButtonProps = ButtonOwnProps & Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'className' | 'variant' | 'size' | 'tone' | 'href' | 'showIcon'> & ({
|
|
17
|
+
variant?: 'primary' | 'secondary' | 'inverse';
|
|
18
|
+
tone?: Exclude<'default' | 'inverse' | 'brand', 'brand'>;
|
|
19
|
+
} | {
|
|
20
|
+
variant: Exclude<'primary' | 'secondary' | 'inverse', 'primary'>;
|
|
21
|
+
tone?: 'default' | 'inverse' | 'brand';
|
|
22
|
+
});
|
|
28
23
|
/** The class each part carries. Apply these — do not retype them. */
|
|
29
24
|
export declare const buttonParts: {
|
|
30
25
|
readonly root: "dds-button";
|
|
@@ -44,3 +44,28 @@
|
|
|
44
44
|
translate: 0;
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* The label travels with the fill.
|
|
50
|
+
*
|
|
51
|
+
* The generated list names what the button's own states move — the fills and the focus ring — and
|
|
52
|
+
* the label's colour is not one of them: no state changes it. The tone does. A navigation bar
|
|
53
|
+
* re-tones its buttons when it gathers on scroll, and the fill eased to the new ground while the
|
|
54
|
+
* label jumped to the new ink on the first frame, so a secondary on a dark hero spent the whole
|
|
55
|
+
* change as dark words on a still-dark fill. Naming `color` and `border-color` here carries both
|
|
56
|
+
* across the same step as the fill.
|
|
57
|
+
*
|
|
58
|
+
* Written out in full rather than appended to, because a property list cannot be added to — this
|
|
59
|
+
* replaces the generated one, and has to keep everything that one names.
|
|
60
|
+
*/
|
|
61
|
+
:where([data-dds-context="marketing"]) .dds-button {
|
|
62
|
+
transition-property: background-color, background-image, border-color, color, outline-color, outline-width;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/* And none of it for a reader who asked for less motion — restated, because the rule above comes
|
|
66
|
+
after the generated sheet's own reduced-motion guard and would otherwise be the one that wins. */
|
|
67
|
+
@media (prefers-reduced-motion: reduce) {
|
|
68
|
+
:where([data-dds-context="marketing"]) .dds-button {
|
|
69
|
+
transition-property: none;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -72,11 +72,10 @@
|
|
|
72
72
|
|
|
73
73
|
:where([data-dds-context="marketing"]) .dds-buttonicon[data-variant="primary"] {
|
|
74
74
|
background-color: var(--color-bg-brand);
|
|
75
|
-
color: var(--color-fg-on-
|
|
75
|
+
color: var(--color-fg-on-brand);
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
:where([data-dds-context="marketing"]) .dds-buttonicon[data-variant="secondary"] {
|
|
79
|
-
border-color: var(--color-border-strong);
|
|
80
79
|
color: var(--color-fg-default);
|
|
81
80
|
}
|
|
82
81
|
|
|
@@ -92,10 +91,6 @@
|
|
|
92
91
|
background-color: var(--color-bg-brand-hover);
|
|
93
92
|
}
|
|
94
93
|
|
|
95
|
-
:where([data-dds-context="marketing"]) .dds-buttonicon[data-variant="secondary"]:hover:where(:not(:disabled)) {
|
|
96
|
-
background-color: var(--color-bg-hover);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
94
|
:where([data-dds-context="marketing"]) .dds-buttonicon[data-variant="inverse"]:active {
|
|
100
95
|
background-image: linear-gradient(var(--color-bg-active-inverse), var(--color-bg-active-inverse));
|
|
101
96
|
}
|
|
@@ -108,28 +103,49 @@
|
|
|
108
103
|
background-color: var(--color-bg-brand-active);
|
|
109
104
|
}
|
|
110
105
|
|
|
111
|
-
:where([data-dds-context="marketing"]) .dds-buttonicon[data-variant="secondary"]:active {
|
|
112
|
-
background-color: var(--color-bg-active);
|
|
113
|
-
}
|
|
114
|
-
|
|
115
106
|
:where([data-dds-context="marketing"]) .dds-buttonicon[data-tone="inverse"]:focus-visible {
|
|
116
|
-
outline-color: var(--color-border-focus-
|
|
107
|
+
outline-color: var(--color-border-focus-on-brand-strong);
|
|
117
108
|
}
|
|
118
109
|
|
|
119
110
|
:where([data-dds-context="marketing"]) .dds-buttonicon[data-variant="plain"][data-tone="inverse"] {
|
|
120
|
-
color: var(--color-fg-on-strong);
|
|
111
|
+
color: var(--color-fg-on-brand-strong);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
:where([data-dds-context="marketing"]) .dds-buttonicon[data-variant="secondary"][data-tone="default"] {
|
|
115
|
+
background-color: var(--color-bg-subtle);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
:where([data-dds-context="marketing"]) .dds-buttonicon[data-variant="secondary"][data-tone="inverse"] {
|
|
119
|
+
background-color: var(--color-bg-subtle-on-brand-strong);
|
|
120
|
+
color: var(--color-fg-on-brand-strong);
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
:where([data-dds-context="marketing"]) .dds-buttonicon[data-variant="plain"][data-tone="inverse"]:hover:where(:not(:disabled)) {
|
|
124
|
-
background-color: var(--color-bg-hover-
|
|
124
|
+
background-color: var(--color-bg-hover-on-brand-strong);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
:where([data-dds-context="marketing"]) .dds-buttonicon[data-variant="secondary"][data-tone="default"]:hover:where(:not(:disabled)) {
|
|
128
|
+
background-image: linear-gradient(var(--color-bg-hover), var(--color-bg-hover));
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
:where([data-dds-context="marketing"]) .dds-buttonicon[data-variant="secondary"][data-tone="inverse"]:hover:where(:not(:disabled)) {
|
|
132
|
+
background-image: linear-gradient(var(--color-bg-hover-on-brand-strong), var(--color-bg-hover-on-brand-strong));
|
|
125
133
|
}
|
|
126
134
|
|
|
127
135
|
:where([data-dds-context="marketing"]) .dds-buttonicon[data-variant="plain"][data-tone="inverse"]:active {
|
|
128
|
-
background-color: var(--color-bg-active-
|
|
136
|
+
background-color: var(--color-bg-active-on-brand-strong);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
:where([data-dds-context="marketing"]) .dds-buttonicon[data-variant="secondary"][data-tone="default"]:active {
|
|
140
|
+
background-image: linear-gradient(var(--color-bg-active), var(--color-bg-active));
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
:where([data-dds-context="marketing"]) .dds-buttonicon[data-variant="secondary"][data-tone="inverse"]:active {
|
|
144
|
+
background-image: linear-gradient(var(--color-bg-active-on-brand-strong), var(--color-bg-active-on-brand-strong));
|
|
129
145
|
}
|
|
130
146
|
|
|
131
147
|
@media (prefers-reduced-motion: reduce) {
|
|
132
148
|
:where([data-dds-context="marketing"]) .dds-buttonicon,
|
|
133
|
-
:where([data-dds-context="marketing"]) .dds-buttonicon * { transition: none; }
|
|
149
|
+
:where([data-dds-context="marketing"]) .dds-buttonicon * { transition: none !important; }
|
|
134
150
|
}
|
|
135
151
|
|
|
@@ -5,8 +5,8 @@ export type { ButtonIconProps };
|
|
|
5
5
|
* One press carried by a glyph alone.
|
|
6
6
|
*
|
|
7
7
|
* Which element it renders is decided by `href` and nothing else, which is CardButton's
|
|
8
|
-
* shape rather than Button's. Button
|
|
9
|
-
* visitor along a funnel, so it
|
|
8
|
+
* shape rather than Button's. Button has since taken the same shape; when this was written its job was
|
|
9
|
+
* defined as moving a visitor along a funnel, so it was an anchor always. A glyph-alone control has no such
|
|
10
10
|
* single job — a footer's social row goes somewhere and a promotional bar's dismiss does
|
|
11
11
|
* not, and both are one press with one mark. An `<a>` gives cmd-click, a destination in
|
|
12
12
|
* the status bar and a copyable link; a `<button>` answers Space and does what the page
|
|
@@ -6,8 +6,8 @@ import { buttonIconDefaults, buttonIconParts } from './ButtonIcon.types.js';
|
|
|
6
6
|
* One press carried by a glyph alone.
|
|
7
7
|
*
|
|
8
8
|
* Which element it renders is decided by `href` and nothing else, which is CardButton's
|
|
9
|
-
* shape rather than Button's. Button
|
|
10
|
-
* visitor along a funnel, so it
|
|
9
|
+
* shape rather than Button's. Button has since taken the same shape; when this was written its job was
|
|
10
|
+
* defined as moving a visitor along a funnel, so it was an anchor always. A glyph-alone control has no such
|
|
11
11
|
* single job — a footer's social row goes somewhere and a promotional bar's dismiss does
|
|
12
12
|
* not, and both are one press with one mark. An `<a>` gives cmd-click, a destination in
|
|
13
13
|
* the status bar and a copyable link; a `<button>` answers Space and does what the page
|
|
@@ -2,9 +2,9 @@ import type { AnchorHTMLAttributes, ReactNode } from 'react';
|
|
|
2
2
|
export interface ButtonIconOwnProps {
|
|
3
3
|
/**
|
|
4
4
|
* `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.
|
|
5
|
-
* `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.
|
|
6
|
-
* `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
|
|
7
|
-
* `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
|
|
5
|
+
* `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.
|
|
6
|
+
* `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.
|
|
7
|
+
* `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.
|
|
8
8
|
*/
|
|
9
9
|
variant?: 'primary' | 'secondary' | 'inverse' | 'plain';
|
|
10
10
|
/**
|
|
@@ -15,7 +15,7 @@ export interface ButtonIconOwnProps {
|
|
|
15
15
|
size?: 'sm' | 'md' | 'lg';
|
|
16
16
|
/**
|
|
17
17
|
* `default` — The control is on a light ground, which is every surface this package paints by default
|
|
18
|
-
* `inverse` — The control
|
|
18
|
+
* `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
|
|
19
19
|
*/
|
|
20
20
|
tone?: 'default' | 'inverse';
|
|
21
21
|
/** Always — the glyph is the whole control, so it is required rather than a slot that may be empty. Pass the glyph itself, from the icon package, rather than one already sized: the size a mark takes in this circle is this component's decision, at icon.control.md on md and icon.control.lg on lg, and the width and height the glyph shipped with are overridden by the class this component clones onto it. */
|
|
@@ -9,13 +9,13 @@
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
:where([data-dds-context="marketing"]) .dds-card[data-variant="accent-strong"] {
|
|
12
|
-
background-color: var(--color-bg-
|
|
12
|
+
background-color: var(--color-bg-surface-card-strong);
|
|
13
13
|
color: var(--color-fg-on-brand-strong);
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
:where([data-dds-context="marketing"]) .dds-card[data-variant="accent"] {
|
|
17
17
|
background-color: var(--color-bg-brand);
|
|
18
|
-
color: var(--color-fg-on-
|
|
18
|
+
color: var(--color-fg-on-brand);
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
:where([data-dds-context="marketing"]) .dds-card[data-variant="plain"] {
|
|
@@ -23,8 +23,13 @@
|
|
|
23
23
|
color: var(--color-fg-default);
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
+
:where([data-dds-context="marketing"]) .dds-card[data-variant="surface-light"] {
|
|
27
|
+
background-color: var(--color-bg-surface-card-light);
|
|
28
|
+
color: var(--color-fg-on-surface-card-light);
|
|
29
|
+
}
|
|
30
|
+
|
|
26
31
|
:where([data-dds-context="marketing"]) .dds-card[data-variant="surface-raised"] {
|
|
27
|
-
background-color: var(--color-bg-surface-raised);
|
|
32
|
+
background-color: var(--color-bg-surface-card-raised);
|
|
28
33
|
color: var(--color-fg-default);
|
|
29
34
|
}
|
|
30
35
|
|
|
@@ -45,12 +50,16 @@
|
|
|
45
50
|
color: var(--color-fg-on-brand-strong);
|
|
46
51
|
}
|
|
47
52
|
|
|
53
|
+
:where([data-dds-context="marketing"]) .dds-card[data-variant="surface-light"][data-compact="true"] {
|
|
54
|
+
border-radius: var(--radius-surface-compact);
|
|
55
|
+
}
|
|
56
|
+
|
|
48
57
|
:where([data-dds-context="marketing"]) .dds-card[data-variant="surface-raised"][data-compact="true"] {
|
|
49
58
|
border-radius: var(--radius-surface-compact);
|
|
50
59
|
}
|
|
51
60
|
|
|
52
61
|
:where([data-dds-context="marketing"]) .dds-card[data-variant="surface-raised"][data-tone="inverse"] {
|
|
53
|
-
background-color: var(--color-bg-surface-raised-
|
|
62
|
+
background-color: var(--color-bg-surface-raised-on-brand-strong);
|
|
54
63
|
color: var(--color-fg-on-brand-strong);
|
|
55
64
|
}
|
|
56
65
|
|
|
@@ -2,12 +2,13 @@ import type { HTMLAttributes, ReactNode } from 'react';
|
|
|
2
2
|
export interface CardOwnProps {
|
|
3
3
|
/**
|
|
4
4
|
* `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
|
|
5
|
+
* `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.
|
|
5
6
|
* `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
|
|
6
7
|
* `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.
|
|
7
8
|
* `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
|
|
8
9
|
* `accent-strong` — A card carrying more weight than its neighbours, where the coral would be too loud and the page ground too quiet. The darkest of the four, and the one that takes white at 20.55:1 — the most legible ground a marketing card has
|
|
9
10
|
*/
|
|
10
|
-
variant?: 'surface' | 'surface-raised' | 'plain' | 'accent' | 'accent-strong';
|
|
11
|
+
variant?: 'surface' | 'surface-light' | 'surface-raised' | 'plain' | 'accent' | 'accent-strong';
|
|
11
12
|
/**
|
|
12
13
|
* `default` — The page is light, which is nearly every page. The fills are opaque and the ink is dark
|
|
13
14
|
* `inverse` — The card sits on a band that paints its own dark ground. The neutral fills become a veil of white over that ground rather than a sheet of paper on top of it, which is what keeps a card on a dark band from reading as a hole cut in it. The two neutral variants stay two steps apart: `surface` is the quiet one a panel wants, `surface-raised` the stronger lift that suits something the size of a control.
|
|
@@ -37,11 +37,11 @@
|
|
|
37
37
|
transition-property: color;
|
|
38
38
|
margin: 0;
|
|
39
39
|
text-transform: uppercase;
|
|
40
|
-
font-family: var(--font-eyebrow-family);
|
|
41
|
-
font-size: var(--font-eyebrow-size);
|
|
42
|
-
font-weight: var(--font-eyebrow-weight);
|
|
43
|
-
letter-spacing: var(--font-eyebrow-letter-spacing);
|
|
44
|
-
line-height: var(--font-eyebrow-line-height);
|
|
40
|
+
font-family: var(--font-eyebrow-sm-family);
|
|
41
|
+
font-size: var(--font-eyebrow-sm-size);
|
|
42
|
+
font-weight: var(--font-eyebrow-sm-weight);
|
|
43
|
+
letter-spacing: var(--font-eyebrow-sm-letter-spacing);
|
|
44
|
+
line-height: var(--font-eyebrow-sm-line-height);
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
:where([data-dds-context="marketing"]) .dds-cardbody .dds-cardbody__title {
|
|
@@ -64,6 +64,11 @@
|
|
|
64
64
|
line-height: var(--font-body-md-line-height);
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
+
:where([data-dds-context="marketing"]) .dds-cardbody .dds-cardbody__link {
|
|
68
|
+
display: flex;
|
|
69
|
+
margin-block-start: var(--space-heading-description-actions);
|
|
70
|
+
}
|
|
71
|
+
|
|
67
72
|
:where([data-dds-context="marketing"]) .dds-cardbody .dds-cardbody__media-frame {
|
|
68
73
|
display: block;
|
|
69
74
|
flex: auto;
|
|
@@ -134,6 +139,6 @@
|
|
|
134
139
|
|
|
135
140
|
@media (prefers-reduced-motion: reduce) {
|
|
136
141
|
:where([data-dds-context="marketing"]) .dds-cardbody,
|
|
137
|
-
:where([data-dds-context="marketing"]) .dds-cardbody * { transition: none; }
|
|
142
|
+
:where([data-dds-context="marketing"]) .dds-cardbody * { transition: none !important; }
|
|
138
143
|
}
|
|
139
144
|
|
|
@@ -59,4 +59,4 @@ export type { CardBodyProps };
|
|
|
59
59
|
* inherits, so the same title is `fg.on-solid` on the brand fill and
|
|
60
60
|
* `fg.default` on the page without this component knowing which card it is in.
|
|
61
61
|
*/
|
|
62
|
-
export declare function CardBody({ eyebrow, title, description, mark, src, alt, aspect, mediaPosition, overMedia, flush, compact, tone, zoomOnHover, children: _children, ...rest }: CardBodyProps): import("react").JSX.Element;
|
|
62
|
+
export declare function CardBody({ eyebrow, title, description, link, mark, src, alt, aspect, mediaPosition, overMedia, flush, compact, tone, zoomOnHover, children: _children, ...rest }: CardBodyProps): import("react").JSX.Element;
|
|
@@ -61,7 +61,7 @@ import { cardBodyDefaults, cardBodyParts } from './CardBody.types.js';
|
|
|
61
61
|
* inherits, so the same title is `fg.on-solid` on the brand fill and
|
|
62
62
|
* `fg.default` on the page without this component knowing which card it is in.
|
|
63
63
|
*/
|
|
64
|
-
export function CardBody({ eyebrow, title, description, mark, src, alt, aspect, mediaPosition = cardBodyDefaults.mediaPosition, overMedia = cardBodyDefaults.overMedia, flush = cardBodyDefaults.flush, compact = cardBodyDefaults.compact, tone = cardBodyDefaults.tone, zoomOnHover = cardBodyDefaults.zoomOnHover, children: _children, ...rest }) {
|
|
64
|
+
export function CardBody({ eyebrow, title, description, link, mark, src, alt, aspect, mediaPosition = cardBodyDefaults.mediaPosition, overMedia = cardBodyDefaults.overMedia, flush = cardBodyDefaults.flush, compact = cardBodyDefaults.compact, tone = cardBodyDefaults.tone, zoomOnHover = cardBodyDefaults.zoomOnHover, children: _children, ...rest }) {
|
|
65
65
|
// Pulled out of `rest` and deliberately unused. `HTMLAttributes` carries a
|
|
66
66
|
// `children` the contract does not declare, and the generator only omits props
|
|
67
67
|
// it knows about — so the type accepts children this component has no slot for,
|
|
@@ -85,7 +85,7 @@ export function CardBody({ eyebrow, title, description, mark, src, alt, aspect,
|
|
|
85
85
|
// frame arrived: the ratio is a fact about the box, and the picture inside it
|
|
86
86
|
// fills that box at 100% and covers.
|
|
87
87
|
style: aspect === undefined ? undefined : { flex: 'none', aspectRatio: aspect }, children: _jsx("img", { className: cardBodyParts.media, src: src, alt: alt }) })) : null;
|
|
88
|
-
const content = (_jsxs("div", { className: cardBodyParts.content, children: [mark !== undefined ? (_jsx("div", { className: cardBodyParts.mark, children: _jsx(Icon, { size: "lg", children: mark }) })) : null, given(eyebrow) ? _jsx("p", { className: cardBodyParts.eyebrow, children: eyebrow }) : null, given(title) ? _jsx("h3", { className: cardBodyParts.title, children: title }) : null, given(description) ? (_jsx("p", { className: cardBodyParts.description, children: description })) : null] }));
|
|
88
|
+
const content = (_jsxs("div", { className: cardBodyParts.content, children: [mark !== undefined ? (_jsx("div", { className: cardBodyParts.mark, children: _jsx(Icon, { size: "lg", children: mark }) })) : null, given(eyebrow) ? _jsx("p", { className: cardBodyParts.eyebrow, children: eyebrow }) : null, given(title) ? _jsx("h3", { className: cardBodyParts.title, children: title }) : null, given(description) ? (_jsx("p", { className: cardBodyParts.description, children: description })) : null, link ? _jsx("div", { className: cardBodyParts.link, children: link }) : null] }));
|
|
89
89
|
if (overMedia) {
|
|
90
90
|
return (
|
|
91
91
|
// Both values, never just the set one. The stylesheet selects on
|
|
@@ -23,6 +23,8 @@ export interface CardBodyOwnProps {
|
|
|
23
23
|
title?: string;
|
|
24
24
|
/** 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. */
|
|
25
25
|
description?: string;
|
|
26
|
+
/** 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. */
|
|
27
|
+
link?: ReactNode;
|
|
26
28
|
/** The card leads with a glyph — a badge, a shield, a small piece of art that makes the feature recognisable before the title is read. Set it on every card in a set or on none of them: one card in a row carrying a mark reads as the important one, which is a claim the mark was not meant to make. Pass the glyph; the body draws it at its own step, and an Icon passed already sized is unwrapped rather than obeyed */
|
|
27
29
|
mark?: ReactNode;
|
|
28
30
|
/** The card shows a picture — a photograph, a product render, a screenshot of the thing being described. Absent is the ordinary case: most cards are words */
|
|
@@ -37,7 +39,7 @@ export interface CardBodyOwnProps {
|
|
|
37
39
|
*/
|
|
38
40
|
mediaPosition?: 'below' | 'above';
|
|
39
41
|
}
|
|
40
|
-
export type CardBodyProps = CardBodyOwnProps & Omit<HTMLAttributes<HTMLDivElement>, 'className' | 'overMedia' | 'flush' | 'zoomOnHover' | 'compact' | 'tone' | 'eyebrow' | 'title' | 'description' | 'mark' | 'src' | 'alt' | 'aspect' | 'mediaPosition'>;
|
|
42
|
+
export type CardBodyProps = CardBodyOwnProps & Omit<HTMLAttributes<HTMLDivElement>, 'className' | 'overMedia' | 'flush' | 'zoomOnHover' | 'compact' | 'tone' | 'eyebrow' | 'title' | 'description' | 'link' | 'mark' | 'src' | 'alt' | 'aspect' | 'mediaPosition'>;
|
|
41
43
|
/** The class each part carries. Apply these — do not retype them. */
|
|
42
44
|
export declare const cardBodyParts: {
|
|
43
45
|
readonly root: "dds-cardbody";
|
|
@@ -47,6 +49,7 @@ export declare const cardBodyParts: {
|
|
|
47
49
|
readonly eyebrow: "dds-cardbody__eyebrow";
|
|
48
50
|
readonly title: "dds-cardbody__title";
|
|
49
51
|
readonly description: "dds-cardbody__description";
|
|
52
|
+
readonly link: "dds-cardbody__link";
|
|
50
53
|
readonly 'media-frame': "dds-cardbody__media-frame";
|
|
51
54
|
readonly media: "dds-cardbody__media";
|
|
52
55
|
};
|
|
@@ -27,13 +27,13 @@
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
:where([data-dds-context="marketing"]) .dds-cardbutton[data-variant="accent-strong"] {
|
|
30
|
-
background-color: var(--color-bg-
|
|
30
|
+
background-color: var(--color-bg-surface-card-strong);
|
|
31
31
|
color: var(--color-fg-on-brand-strong);
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
:where([data-dds-context="marketing"]) .dds-cardbutton[data-variant="accent"] {
|
|
35
35
|
background-color: var(--color-bg-brand);
|
|
36
|
-
color: var(--color-fg-on-
|
|
36
|
+
color: var(--color-fg-on-brand);
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
:where([data-dds-context="marketing"]) .dds-cardbutton[data-variant="plain"] {
|
|
@@ -41,8 +41,13 @@
|
|
|
41
41
|
color: var(--color-fg-default);
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
+
:where([data-dds-context="marketing"]) .dds-cardbutton[data-variant="surface-light"] {
|
|
45
|
+
background-color: var(--color-bg-surface-card-light);
|
|
46
|
+
color: var(--color-fg-on-surface-card-light);
|
|
47
|
+
}
|
|
48
|
+
|
|
44
49
|
:where([data-dds-context="marketing"]) .dds-cardbutton[data-variant="surface-raised"] {
|
|
45
|
-
background-color: var(--color-bg-surface-raised);
|
|
50
|
+
background-color: var(--color-bg-surface-card-raised);
|
|
46
51
|
color: var(--color-fg-default);
|
|
47
52
|
}
|
|
48
53
|
|
|
@@ -59,6 +64,10 @@
|
|
|
59
64
|
translate: var(--motion-translate-hover);
|
|
60
65
|
}
|
|
61
66
|
|
|
67
|
+
:where([data-dds-context="marketing"]) .dds-cardbutton[data-variant="surface-light"]:hover:where(:not(:disabled)) {
|
|
68
|
+
translate: var(--motion-translate-hover);
|
|
69
|
+
}
|
|
70
|
+
|
|
62
71
|
:where([data-dds-context="marketing"]) .dds-cardbutton[data-variant="surface-raised"]:hover:where(:not(:disabled)) {
|
|
63
72
|
translate: var(--motion-translate-hover);
|
|
64
73
|
}
|
|
@@ -68,6 +77,6 @@
|
|
|
68
77
|
}
|
|
69
78
|
|
|
70
79
|
@media (prefers-reduced-motion: reduce) {
|
|
71
|
-
:where([data-dds-context="marketing"]) .dds-cardbutton { transition: none; }
|
|
80
|
+
:where([data-dds-context="marketing"]) .dds-cardbutton { transition: none !important; }
|
|
72
81
|
}
|
|
73
82
|
|
|
@@ -2,12 +2,13 @@ import type { ButtonHTMLAttributes, ReactNode } from 'react';
|
|
|
2
2
|
export interface CardButtonOwnProps {
|
|
3
3
|
/**
|
|
4
4
|
* `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
|
|
5
|
+
* `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.
|
|
5
6
|
* `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
|
|
6
7
|
* `accent` — One card in a set is the promotional one and the page has already earned the colour
|
|
7
8
|
* `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
|
|
8
9
|
* `plain` — An editorial card that goes somewhere — an article, a post, a release note. No fill, no corner and no lift: what marks it out is its picture and the gap to the next one, the way a column of articles is told apart on a page rather than the way a row of tiles is. The same ground Card's own plain variant takes, so a pressable article card and a static one sit in one column without a seam
|
|
9
10
|
*/
|
|
10
|
-
variant?: 'surface' | 'surface-raised' | 'accent' | 'accent-strong' | 'plain';
|
|
11
|
+
variant?: 'surface' | 'surface-light' | 'surface-raised' | 'accent' | 'accent-strong' | 'plain';
|
|
11
12
|
/** The press goes somewhere with a URL of its own. It makes this an anchor rather than a button, which is what gives a reader cmd-click, a visible destination and a copyable link — none of which mean anything for a press that opens a dialog. This is the ordinary case on a marketing page, where most cards point at a page */
|
|
12
13
|
href?: string;
|
|
13
14
|
/** Allowed: any content */
|
|
@@ -48,7 +48,6 @@
|
|
|
48
48
|
justify-content: center;
|
|
49
49
|
pointer-events: none;
|
|
50
50
|
block-size: var(--icon-size-2xs);
|
|
51
|
-
color: var(--color-fg-on-solid);
|
|
52
51
|
inline-size: var(--icon-size-2xs);
|
|
53
52
|
}
|
|
54
53
|
|
|
@@ -111,6 +110,14 @@
|
|
|
111
110
|
color: var(--color-fg-warning);
|
|
112
111
|
}
|
|
113
112
|
|
|
113
|
+
:where([data-dds-context="marketing"]) .dds-checkbox[data-tone="accent"] .dds-checkbox__indicator {
|
|
114
|
+
color: var(--color-fg-on-brand);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
:where([data-dds-context="marketing"]) .dds-checkbox[data-tone="standard"] .dds-checkbox__indicator {
|
|
118
|
+
color: var(--color-fg-on-strong);
|
|
119
|
+
}
|
|
120
|
+
|
|
114
121
|
:where([data-dds-context="marketing"]) .dds-checkbox[data-checked="unchecked"][data-status="error"] .dds-checkbox__box {
|
|
115
122
|
border-color: var(--color-border-danger);
|
|
116
123
|
}
|
|
@@ -30,6 +30,15 @@
|
|
|
30
30
|
transition-timing-function: var(--motion-easing-standard);
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
+
:where([data-dds-context="marketing"]) .dds-dropdownmenu .dds-dropdownmenu__chevron {
|
|
34
|
+
transition-property: rotate;
|
|
35
|
+
block-size: var(--icon-control-lg);
|
|
36
|
+
color: var(--color-fg-muted);
|
|
37
|
+
inline-size: var(--icon-control-lg);
|
|
38
|
+
transition-duration: var(--motion-duration-fast);
|
|
39
|
+
transition-timing-function: var(--motion-easing-standard);
|
|
40
|
+
}
|
|
41
|
+
|
|
33
42
|
:where([data-dds-context="marketing"]) .dds-dropdownmenu .dds-dropdownmenu__surface {
|
|
34
43
|
border-style: solid;
|
|
35
44
|
box-sizing: border-box;
|
|
@@ -66,14 +75,6 @@
|
|
|
66
75
|
inset-inline-start: 0;
|
|
67
76
|
}
|
|
68
77
|
|
|
69
|
-
:where([data-dds-context="marketing"]) .dds-dropdownmenu .dds-dropdownmenu__chevron {
|
|
70
|
-
block-size: var(--icon-control-lg);
|
|
71
|
-
color: var(--color-fg-muted);
|
|
72
|
-
inline-size: var(--icon-control-lg);
|
|
73
|
-
transition-duration: var(--motion-duration-fast);
|
|
74
|
-
transition-timing-function: var(--motion-easing-standard);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
78
|
:where([data-dds-context="marketing"]) .dds-dropdownmenu .dds-dropdownmenu__icon {
|
|
78
79
|
block-size: var(--icon-control-lg);
|
|
79
80
|
inline-size: var(--icon-control-lg);
|
|
@@ -124,15 +125,15 @@
|
|
|
124
125
|
}
|
|
125
126
|
|
|
126
127
|
:where([data-dds-context="marketing"]) .dds-dropdownmenu[data-tone="inverse"] .dds-dropdownmenu__trigger:hover:where(:not(:disabled)) {
|
|
127
|
-
background-color: var(--color-bg-hover-
|
|
128
|
+
background-color: var(--color-bg-hover-on-brand-strong);
|
|
128
129
|
}
|
|
129
130
|
|
|
130
131
|
:where([data-dds-context="marketing"]) .dds-dropdownmenu[data-tone="inverse"] .dds-dropdownmenu__trigger:active {
|
|
131
|
-
background-color: var(--color-bg-active-
|
|
132
|
+
background-color: var(--color-bg-active-on-brand-strong);
|
|
132
133
|
}
|
|
133
134
|
|
|
134
135
|
:where([data-dds-context="marketing"]) .dds-dropdownmenu[data-tone="inverse"] .dds-dropdownmenu__trigger:focus-visible {
|
|
135
|
-
outline-color: var(--color-border-focus-
|
|
136
|
+
outline-color: var(--color-border-focus-on-brand-strong);
|
|
136
137
|
}
|
|
137
138
|
|
|
138
139
|
:where([data-dds-context="marketing"]) .dds-dropdownmenu[data-variant="plain"][data-size="sm"] .dds-dropdownmenu__trigger {
|
|
@@ -141,6 +142,6 @@
|
|
|
141
142
|
|
|
142
143
|
@media (prefers-reduced-motion: reduce) {
|
|
143
144
|
:where([data-dds-context="marketing"]) .dds-dropdownmenu,
|
|
144
|
-
:where([data-dds-context="marketing"]) .dds-dropdownmenu * { transition: none; }
|
|
145
|
+
:where([data-dds-context="marketing"]) .dds-dropdownmenu * { transition: none !important; }
|
|
145
146
|
}
|
|
146
147
|
|
|
@@ -11,10 +11,12 @@ export type { DropdownMenuProps };
|
|
|
11
11
|
* them back on the button they pressed.
|
|
12
12
|
*
|
|
13
13
|
* The trigger is drawn here rather than passed in, which is where this parts company with product's
|
|
14
|
-
* menu of the same name. That
|
|
15
|
-
* a required `href`, so it
|
|
14
|
+
* menu of the same name. That was forced rather than chosen: when this was built, this package's
|
|
15
|
+
* Button was an anchor with a required `href`, so it was a link and a link that opens a menu does not
|
|
16
|
+
* navigate; ButtonIcon is a
|
|
16
17
|
* real button and takes no words. A set of destinations is chosen by reading it, so the trigger
|
|
17
|
-
* needs words, and nothing here
|
|
18
|
+
* needs words, and nothing here drew a button with words. Button now renders a `<button>` when it
|
|
19
|
+
* has no href, so whether it should become the trigger is an open question rather than a settled one.
|
|
18
20
|
*
|
|
19
21
|
* Focus moves to the rows themselves rather than being described from the trigger. A menu's rows are
|
|
20
22
|
* things to take, and a visitor pressing Enter should be pressing the thing they are on.
|
|
@@ -16,10 +16,12 @@ import { dropdownMenuDefaults, dropdownMenuParts } from './DropdownMenu.types.js
|
|
|
16
16
|
* them back on the button they pressed.
|
|
17
17
|
*
|
|
18
18
|
* The trigger is drawn here rather than passed in, which is where this parts company with product's
|
|
19
|
-
* menu of the same name. That
|
|
20
|
-
* a required `href`, so it
|
|
19
|
+
* menu of the same name. That was forced rather than chosen: when this was built, this package's
|
|
20
|
+
* Button was an anchor with a required `href`, so it was a link and a link that opens a menu does not
|
|
21
|
+
* navigate; ButtonIcon is a
|
|
21
22
|
* real button and takes no words. A set of destinations is chosen by reading it, so the trigger
|
|
22
|
-
* needs words, and nothing here
|
|
23
|
+
* needs words, and nothing here drew a button with words. Button now renders a `<button>` when it
|
|
24
|
+
* has no href, so whether it should become the trigger is an open question rather than a settled one.
|
|
23
25
|
*
|
|
24
26
|
* Focus moves to the rows themselves rather than being described from the trigger. A menu's rows are
|
|
25
27
|
* things to take, and a visitor pressing Enter should be pressing the thing they are on.
|
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
align-items: center;
|
|
38
38
|
display: flex;
|
|
39
39
|
flex: none;
|
|
40
|
+
transition-property: rotate;
|
|
40
41
|
transition-duration: var(--motion-duration-fast);
|
|
41
42
|
transition-timing-function: var(--motion-easing-standard);
|
|
42
43
|
}
|
|
@@ -144,6 +145,6 @@
|
|
|
144
145
|
|
|
145
146
|
@media (prefers-reduced-motion: reduce) {
|
|
146
147
|
:where([data-dds-context="marketing"]) .dds-filterchip,
|
|
147
|
-
:where([data-dds-context="marketing"]) .dds-filterchip * { transition: none; }
|
|
148
|
+
:where([data-dds-context="marketing"]) .dds-filterchip * { transition: none !important; }
|
|
148
149
|
}
|
|
149
150
|
|
|
@@ -214,5 +214,5 @@
|
|
|
214
214
|
* been put on, and Footer cannot bind a property of a component it does not declare.
|
|
215
215
|
*/
|
|
216
216
|
:where([data-dds-context="marketing"]) .dds-footer .dds-link:focus-visible {
|
|
217
|
-
outline-color: var(--color-border-focus-
|
|
217
|
+
outline-color: var(--color-border-focus-on-brand-strong);
|
|
218
218
|
}
|
|
@@ -38,6 +38,12 @@
|
|
|
38
38
|
padding-block: var(--space-gap-sm);
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
+
:where([data-dds-context="marketing"]) .dds-footergroup .dds-footergroup__marker {
|
|
42
|
+
transition-property: rotate;
|
|
43
|
+
block-size: var(--icon-size-xs);
|
|
44
|
+
inline-size: var(--icon-size-xs);
|
|
45
|
+
}
|
|
46
|
+
|
|
41
47
|
:where([data-dds-context="marketing"]) .dds-footergroup .dds-footergroup__list {
|
|
42
48
|
display: flex;
|
|
43
49
|
flex-direction: column;
|
|
@@ -63,13 +69,8 @@
|
|
|
63
69
|
line-height: var(--font-label-md-line-height);
|
|
64
70
|
}
|
|
65
71
|
|
|
66
|
-
:where([data-dds-context="marketing"]) .dds-footergroup .dds-footergroup__marker {
|
|
67
|
-
block-size: var(--icon-size-xs);
|
|
68
|
-
inline-size: var(--icon-size-xs);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
72
|
:where([data-dds-context="marketing"]) .dds-footergroup .dds-footergroup__trigger:focus-visible {
|
|
72
|
-
outline-color: var(--color-border-focus-
|
|
73
|
+
outline-color: var(--color-border-focus-on-brand-strong);
|
|
73
74
|
outline-width: var(--border-width-focus);
|
|
74
75
|
}
|
|
75
76
|
|
|
@@ -85,6 +86,6 @@
|
|
|
85
86
|
|
|
86
87
|
@media (prefers-reduced-motion: reduce) {
|
|
87
88
|
:where([data-dds-context="marketing"]) .dds-footergroup,
|
|
88
|
-
:where([data-dds-context="marketing"]) .dds-footergroup * { transition: none; }
|
|
89
|
+
:where([data-dds-context="marketing"]) .dds-footergroup * { transition: none !important; }
|
|
89
90
|
}
|
|
90
91
|
|