@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
|
@@ -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
|
|
|
@@ -84,6 +84,6 @@
|
|
|
84
84
|
|
|
85
85
|
@media (prefers-reduced-motion: reduce) {
|
|
86
86
|
:where([data-dds-context="marketing"]) .dds-link,
|
|
87
|
-
:where([data-dds-context="marketing"]) .dds-link * { transition: none; }
|
|
87
|
+
:where([data-dds-context="marketing"]) .dds-link * { transition: none !important; }
|
|
88
88
|
}
|
|
89
89
|
|
|
@@ -55,14 +55,14 @@ export function Link({ variant = linkDefaults.variant, tone = linkDefaults.tone,
|
|
|
55
55
|
|
|
56
56
|
A standalone link sets its label at font.label.md — semibold — and beside
|
|
57
57
|
that the regular cut's strokes read as a smudge rather than a direction, so
|
|
58
|
-
the arrow is solid. That is
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
58
|
+
the arrow is solid. That is no exception to `icon-weight-within-a-set`,
|
|
59
|
+
which reserves the weight for the current one of a set: the arrow sits in
|
|
60
|
+
no set, and what earns it is legibility at sixteen pixels against a heavier
|
|
61
|
+
neighbour.
|
|
62
62
|
|
|
63
63
|
An inline link has no label of its own — it takes the paragraph's type, which
|
|
64
64
|
is body copy at the regular weight. A solid arrow there is heavier than every
|
|
65
|
-
word around it, so
|
|
65
|
+
word around it, so legibility does not ask for solid and the regular cut is right.
|
|
66
66
|
The mark matches its neighbours either way; only the neighbours change.
|
|
67
67
|
*/
|
|
68
68
|
const inline = variant === 'inline';
|
|
@@ -65,6 +65,6 @@
|
|
|
65
65
|
|
|
66
66
|
@media (prefers-reduced-motion: reduce) {
|
|
67
67
|
:where([data-dds-context="marketing"]) .dds-menuitem,
|
|
68
|
-
:where([data-dds-context="marketing"]) .dds-menuitem * { transition: none; }
|
|
68
|
+
:where([data-dds-context="marketing"]) .dds-menuitem * { transition: none !important; }
|
|
69
69
|
}
|
|
70
70
|
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
:where([data-dds-context="marketing"]) .dds-navbar .dds-navbar__ground {
|
|
30
30
|
inset: 0;
|
|
31
31
|
position: absolute;
|
|
32
|
-
background-color: var(--color-bg-
|
|
32
|
+
background-color: var(--color-bg-surface-translucent);
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
:where([data-dds-context="marketing"]) .dds-navbar .dds-navbar__brand {
|
|
@@ -45,7 +45,6 @@
|
|
|
45
45
|
:where([data-dds-context="marketing"]) .dds-navbar .dds-navbar__nav {
|
|
46
46
|
align-items: center;
|
|
47
47
|
display: flex;
|
|
48
|
-
position: relative;
|
|
49
48
|
gap: var(--space-gap-none);
|
|
50
49
|
}
|
|
51
50
|
|
|
@@ -99,11 +98,11 @@
|
|
|
99
98
|
align-items: center;
|
|
100
99
|
display: flex;
|
|
101
100
|
position: relative;
|
|
102
|
-
background-color: var(--color-bg-surface-
|
|
101
|
+
background-color: var(--color-bg-surface-translucent);
|
|
103
102
|
border-radius: var(--radius-pill);
|
|
104
103
|
box-shadow: var(--elevation-surface-floating);
|
|
105
104
|
gap: var(--space-gap-md);
|
|
106
|
-
min-block-size: var(--size-control-
|
|
105
|
+
min-block-size: var(--size-control-md);
|
|
107
106
|
padding-block: var(--space-inset-2xs);
|
|
108
107
|
padding-inline: var(--space-inset-2xs);
|
|
109
108
|
}
|
|
@@ -118,18 +117,18 @@
|
|
|
118
117
|
}
|
|
119
118
|
|
|
120
119
|
:where([data-dds-context="marketing"]) .dds-navbar[data-tone="inverse"] {
|
|
121
|
-
color: var(--color-fg-on-strong);
|
|
120
|
+
color: var(--color-fg-on-brand-strong);
|
|
122
121
|
}
|
|
123
122
|
|
|
124
123
|
:where([data-dds-context="marketing"]) .dds-navbar[data-tone="inverse"] .dds-navbar__cluster {
|
|
125
|
-
background-color: var(--color-bg-surface-
|
|
124
|
+
background-color: var(--color-bg-surface-translucent-on-brand-strong);
|
|
126
125
|
}
|
|
127
126
|
|
|
128
127
|
:where([data-dds-context="marketing"]) .dds-navbar[data-tone="inverse"] .dds-navbar__ground {
|
|
129
|
-
background-color: var(--color-bg-strong);
|
|
128
|
+
background-color: var(--color-bg-surface-translucent-on-brand-strong);
|
|
130
129
|
}
|
|
131
130
|
|
|
132
131
|
:where([data-dds-context="marketing"]) .dds-navbar[data-tone="inverse"] .dds-navbar__trigger:focus-visible {
|
|
133
|
-
outline-color: var(--color-border-focus-
|
|
132
|
+
outline-color: var(--color-border-focus-on-brand-strong);
|
|
134
133
|
}
|
|
135
134
|
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
1
2
|
import './Navbar.css';
|
|
2
3
|
import './navbar-impl.css';
|
|
4
|
+
import './navbar-material.css';
|
|
3
5
|
import { type NavbarProps } from './Navbar.types.js';
|
|
4
6
|
export type { NavbarProps };
|
|
5
7
|
/**
|
|
@@ -11,6 +13,20 @@ export type { NavbarProps };
|
|
|
11
13
|
* and which way round — is exactly the part that was wrong before and would be wrong again quietly.
|
|
12
14
|
*/
|
|
13
15
|
export declare function gathered(was: boolean, offset: number): boolean;
|
|
16
|
+
/**
|
|
17
|
+
* A slot's contents as one flat list, with every fragment opened.
|
|
18
|
+
*
|
|
19
|
+
* A page hands a pair of actions over as `<>…</>` and a list of switchers the same way, and
|
|
20
|
+
* `Children.map` does not look inside a fragment — so a fragment reached anything that matched on
|
|
21
|
+
* type, NavbarPanel's switcher-to-row swap included, as one opaque element. Opened here, once,
|
|
22
|
+
* each control is a child of its own wherever the slot is drawn.
|
|
23
|
+
*
|
|
24
|
+
* Every element comes out with a key unique across the whole list. `Children.toArray` keys each
|
|
25
|
+
* level from `.0` again, so the children of two fragments side by side would share keys and React
|
|
26
|
+
* could hand one control's state — an open switcher, say — to another. Each key is prefixed with
|
|
27
|
+
* the path of fragments it came through, the way React keys nested arrays itself.
|
|
28
|
+
*/
|
|
29
|
+
export declare function flattened(node: ReactNode, path?: string): ReactNode[];
|
|
14
30
|
/**
|
|
15
31
|
* The bar across the top of a marketing page: the mark, the places the site has,
|
|
16
32
|
* and the things a reader reaches for rather than navigates to.
|
|
@@ -33,4 +49,4 @@ export declare function gathered(was: boolean, offset: number): boolean;
|
|
|
33
49
|
* landmark, and writing it as well says so a second time in a way that goes stale
|
|
34
50
|
* if the element is ever nested.
|
|
35
51
|
*/
|
|
36
|
-
export declare function Navbar({ tone, label, menuLabel, closeLabel, brand, utilities, compactAction, preferences, menuOpen, onMenuOpenChange, children, ...rest }: NavbarProps): import("react").JSX.Element;
|
|
52
|
+
export declare function Navbar({ tone, label, menuLabel, closeLabel, brand, utilities, compactAction, preferences, showThemeToggle, theme, onThemeChange, themeToggleLabel, menuOpen, onMenuOpenChange, children, ...rest }: NavbarProps): import("react").JSX.Element;
|