@sdxc/ui 2026.10.30 → 2026.11.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/README.md +187 -113
- package/dist/{behaviors → app/behaviors}/drag-session.js +1 -1
- package/dist/{behaviors → app/behaviors}/toaster.js +1 -1
- package/dist/{components → app}/chart.d.ts +1 -1
- package/dist/{components → app}/chart.js +18 -34
- package/dist/{components → app}/context-menu.d.ts +2 -2
- package/dist/{components → app}/context-menu.js +8 -7
- package/dist/{components → app}/drop-indicator.js +3 -3
- package/dist/{components → app}/drop-zone.js +3 -3
- package/dist/{components → app}/empty.d.ts +1 -1
- package/dist/{components → app}/empty.js +11 -21
- package/dist/{components → app}/file-trigger.js +2 -2
- package/dist/{components → app}/grid-list.d.ts +1 -1
- package/dist/{components → app}/grid-list.js +16 -18
- package/dist/app/index.d.ts +41 -0
- package/dist/app/index.js +41 -0
- package/dist/{components → app}/menubar.js +5 -7
- package/dist/{mixins → app/mixins}/drag-reorder.js +1 -1
- package/dist/{mixins → app/mixins}/drop-zone.js +1 -1
- package/dist/{mixins → app/mixins}/grid-list-keys.js +2 -2
- package/dist/{mixins → app/mixins}/menubar-keys.js +2 -2
- package/dist/{mixins → app/mixins}/resize-handle.js +3 -3
- package/dist/{mixins/treeKeys.js → app/mixins/tree-keys.js} +2 -2
- package/dist/{components → app}/resizable.js +7 -10
- package/dist/{components → app}/shortcut-list.js +4 -3
- package/dist/{components → app}/skeleton.js +3 -3
- package/dist/{styles → app/styles}/chart-palette.d.ts +1 -1
- package/dist/{styles → app/styles}/graphic-host.d.ts +1 -1
- package/dist/{styles → app/styles}/legend-toggle.d.ts +1 -1
- package/dist/{components → app}/table.js +12 -15
- package/dist/{components → app}/toast.js +18 -24
- package/dist/{components → app}/toolbar.js +3 -3
- package/dist/{components → app}/tree.d.ts +1 -1
- package/dist/{components → app}/tree.js +10 -14
- package/dist/{utils → app/utils}/chart-path.d.ts +1 -1
- package/dist/{utils → app/utils}/chart-path.js +2 -2
- package/dist/{utils → app/utils}/chart-scale.js +1 -1
- package/dist/behaviors/index.d.ts +0 -5
- package/dist/behaviors/index.js +0 -5
- package/dist/{components → chat}/attachment.d.ts +1 -1
- package/dist/{components → chat}/attachment.js +17 -23
- package/dist/{behaviors → chat/behaviors}/scroll-follow-model.js +1 -1
- package/dist/{components → chat}/bubble.js +14 -14
- package/dist/chat/index.d.ts +16 -0
- package/dist/chat/index.js +16 -0
- package/dist/{components → chat}/marker.js +6 -8
- package/dist/{components → chat}/message-scroller.d.ts +1 -1
- package/dist/{components → chat}/message-scroller.js +12 -18
- package/dist/{components → chat}/message.js +10 -12
- package/dist/{mixins → chat/mixins}/message-follow.js +2 -2
- package/dist/{components → color}/color-area.js +7 -10
- package/dist/{components → color}/color-field.js +7 -6
- package/dist/{components → color}/color-picker.d.ts +1 -1
- package/dist/{components → color}/color-picker.js +9 -12
- package/dist/{components → color}/color-slider.js +10 -13
- package/dist/{components → color}/color-swatch-picker.js +4 -5
- package/dist/{components → color}/color-swatch.js +3 -4
- package/dist/{components → color}/color-wheel.js +5 -6
- package/dist/color/index.d.ts +21 -0
- package/dist/color/index.js +21 -0
- package/dist/{mixins → color/mixins}/color-area-drag.d.ts +1 -1
- package/dist/{mixins → color/mixins}/color-area-drag.js +2 -2
- package/dist/{mixins → color/mixins}/color-preview.js +1 -1
- package/dist/{mixins → color/mixins}/color-wheel-drag.js +1 -1
- package/dist/{styles → color/styles}/rtl-aware-gradient-direction.d.ts +1 -1
- package/dist/components/accordion.d.ts +3 -3
- package/dist/components/accordion.js +19 -15
- package/dist/components/alert-dialog.js +5 -4
- package/dist/components/alert.js +10 -20
- package/dist/components/aspect-ratio.js +3 -4
- package/dist/components/avatar.d.ts +6 -6
- package/dist/components/avatar.js +56 -8
- package/dist/components/badge.js +11 -9
- package/dist/components/breadcrumbs.js +7 -9
- package/dist/components/button.d.ts +8 -6
- package/dist/components/button.js +22 -14
- package/dist/components/calendar.js +13 -24
- package/dist/components/card.js +9 -11
- package/dist/components/carousel.d.ts +1 -1
- package/dist/components/carousel.js +12 -20
- package/dist/components/checkbox-group.js +3 -3
- package/dist/components/checkbox.js +2 -2
- package/dist/components/combobox.js +6 -6
- package/dist/components/command.js +10 -14
- package/dist/components/cta-group.d.ts +30 -14
- package/dist/components/cta-group.js +29 -10
- package/dist/components/date-field.js +2 -1
- package/dist/components/date-picker.js +4 -5
- package/dist/components/date-range-picker.js +3 -2
- package/dist/components/description.js +2 -1
- package/dist/components/dialog-dismiss.d.ts +18 -0
- package/dist/components/dialog-dismiss.js +15 -0
- package/dist/components/dialog.js +11 -15
- package/dist/components/disclosure.js +10 -14
- package/dist/components/drawer.js +3 -4
- package/dist/components/field-error.js +3 -3
- package/dist/components/form.js +2 -1
- package/dist/components/group.js +3 -3
- package/dist/components/header.js +3 -3
- package/dist/components/heading-scope.js +2 -1
- package/dist/components/heading.d.ts +4 -4
- package/dist/components/heading.js +7 -7
- package/dist/components/highlight.js +17 -12
- package/dist/components/hover-card.js +6 -8
- package/dist/components/image-placeholder.js +13 -19
- package/dist/components/index.d.ts +6 -38
- package/dist/components/index.js +6 -38
- package/dist/components/input.js +3 -4
- package/dist/components/item.js +10 -19
- package/dist/components/keyboard.js +3 -3
- package/dist/components/label.js +2 -1
- package/dist/components/link-button.d.ts +7 -5
- package/dist/components/link-button.js +16 -11
- package/dist/components/link.js +3 -4
- package/dist/components/listbox.js +6 -11
- package/dist/components/menu.js +5 -6
- package/dist/components/meter.js +5 -6
- package/dist/components/modal.js +9 -11
- package/dist/components/nav-link.d.ts +1 -1
- package/dist/components/nav-link.js +3 -4
- package/dist/components/navigation-menu.js +17 -23
- package/dist/components/number-field.js +8 -10
- package/dist/components/otp-field.js +2 -1
- package/dist/components/overlay-arrow.js +3 -4
- package/dist/components/pagination.js +8 -10
- package/dist/components/popover.js +3 -4
- package/dist/components/progress-bar.js +5 -5
- package/dist/components/radio-group.js +5 -7
- package/dist/components/range-calendar.js +3 -3
- package/dist/components/scroll-area.js +4 -5
- package/dist/components/search-field.js +8 -11
- package/dist/components/section.js +2 -1
- package/dist/components/select.js +10 -22
- package/dist/components/selection-indicator.js +3 -3
- package/dist/components/sentinel-row.js +3 -3
- package/dist/components/separator.js +3 -3
- package/dist/components/shared-element.js +2 -1
- package/dist/components/sheet.js +6 -7
- package/dist/components/sidebar.js +48 -76
- package/dist/components/slider.js +8 -10
- package/dist/components/spinner.js +3 -3
- package/dist/components/switch.js +3 -3
- package/dist/components/tabs.js +9 -12
- package/dist/components/tag-group.js +7 -9
- package/dist/components/text-field.js +2 -1
- package/dist/components/text.js +2 -1
- package/dist/components/textarea.js +3 -4
- package/dist/components/time-field.js +2 -1
- package/dist/components/toggle-button.js +5 -7
- package/dist/components/tooltip.js +3 -3
- package/dist/components/typeset.js +128 -123
- package/dist/components/youtube-embed.js +2 -1
- package/dist/docs/anchor-heading.d.ts +41 -0
- package/dist/docs/anchor-heading.js +62 -0
- package/dist/docs/callout.d.ts +46 -0
- package/dist/docs/callout.js +61 -0
- package/dist/docs/code-block.d.ts +74 -0
- package/dist/docs/code-block.js +322 -0
- package/dist/docs/code-tabs-sync.d.ts +26 -0
- package/dist/docs/code-tabs-sync.js +12 -0
- package/dist/docs/code-tabs.d.ts +53 -0
- package/dist/docs/code-tabs.js +102 -0
- package/dist/docs/copy-button.d.ts +31 -0
- package/dist/docs/copy-button.js +49 -0
- package/dist/docs/docs-feedback.d.ts +55 -0
- package/dist/docs/docs-feedback.js +72 -0
- package/dist/docs/docs-footer.d.ts +40 -0
- package/dist/docs/docs-footer.js +45 -0
- package/dist/docs/docs-hub.d.ts +93 -0
- package/dist/docs/docs-hub.js +142 -0
- package/dist/docs/docs-layout.d.ts +90 -0
- package/dist/docs/docs-layout.js +166 -0
- package/dist/docs/docs-nav-tools.d.ts +25 -0
- package/dist/docs/docs-nav-tools.js +14 -0
- package/dist/docs/docs-nav.d.ts +53 -0
- package/dist/docs/docs-nav.js +76 -0
- package/dist/docs/docs-not-found.d.ts +68 -0
- package/dist/docs/docs-not-found.js +100 -0
- package/dist/docs/docs-page-header.d.ts +55 -0
- package/dist/docs/docs-page-header.js +54 -0
- package/dist/docs/docs-pager.d.ts +46 -0
- package/dist/docs/docs-pager.js +74 -0
- package/dist/docs/file-tree.d.ts +57 -0
- package/dist/docs/file-tree.js +142 -0
- package/dist/docs/index.d.ts +38 -0
- package/dist/docs/index.js +38 -0
- package/dist/docs/install-command.d.ts +54 -0
- package/dist/docs/install-command.js +33 -0
- package/dist/docs/mixins/code-tabs-sync.d.ts +47 -0
- package/dist/docs/mixins/code-tabs-sync.js +137 -0
- package/dist/docs/mixins/copy-feedback.d.ts +25 -0
- package/dist/docs/mixins/copy-feedback.js +49 -0
- package/dist/docs/mixins/copy-from-url.d.ts +27 -0
- package/dist/docs/mixins/copy-from-url.js +95 -0
- package/dist/docs/mixins/docs-nav-tools.d.ts +27 -0
- package/dist/docs/mixins/docs-nav-tools.js +97 -0
- package/dist/docs/mixins/toc-spy.d.ts +30 -0
- package/dist/docs/mixins/toc-spy.js +165 -0
- package/dist/docs/next-steps.d.ts +45 -0
- package/dist/docs/next-steps.js +79 -0
- package/dist/docs/page-actions.d.ts +77 -0
- package/dist/docs/page-actions.js +78 -0
- package/dist/docs/plan-notice.d.ts +28 -0
- package/dist/docs/plan-notice.js +33 -0
- package/dist/docs/props-table.d.ts +64 -0
- package/dist/docs/props-table.js +147 -0
- package/dist/docs/steps.d.ts +51 -0
- package/dist/docs/steps.js +112 -0
- package/dist/docs/table-of-contents.d.ts +49 -0
- package/dist/docs/table-of-contents.js +139 -0
- package/dist/docs/ui-label.d.ts +51 -0
- package/dist/docs/ui-label.js +64 -0
- package/dist/docs/utils/docs-tree.d.ts +81 -0
- package/dist/docs/utils/docs-tree.js +57 -0
- package/dist/docs/utils/reveal-in-scroller.d.ts +19 -0
- package/dist/docs/utils/reveal-in-scroller.js +43 -0
- package/dist/landing/accent-text.d.ts +47 -0
- package/dist/landing/accent-text.js +107 -0
- package/dist/landing/animations/entrance.d.ts +40 -0
- package/dist/landing/animations/entrance.js +52 -0
- package/dist/landing/announcement-chip.d.ts +45 -0
- package/dist/landing/announcement-chip.js +36 -0
- package/dist/landing/author-band.d.ts +78 -0
- package/dist/landing/author-band.js +190 -0
- package/dist/landing/bento.d.ts +99 -0
- package/dist/landing/bento.js +138 -0
- package/dist/landing/changelog-strip.d.ts +74 -0
- package/dist/landing/changelog-strip.js +201 -0
- package/dist/{patterns → landing}/check-row.js +5 -7
- package/dist/{patterns → landing}/closing-cta.d.ts +4 -4
- package/dist/{patterns → landing}/closing-cta.js +8 -8
- package/dist/landing/code-stage.d.ts +93 -0
- package/dist/landing/code-stage.js +434 -0
- package/dist/landing/crosshair.d.ts +44 -0
- package/dist/landing/crosshair.js +48 -0
- package/dist/landing/curriculum.d.ts +79 -0
- package/dist/landing/curriculum.js +194 -0
- package/dist/landing/drawn-chart.d.ts +74 -0
- package/dist/landing/drawn-chart.js +377 -0
- package/dist/landing/event-ticker.d.ts +71 -0
- package/dist/landing/event-ticker.js +331 -0
- package/dist/landing/fan-out-diagram.d.ts +70 -0
- package/dist/landing/fan-out-diagram.js +481 -0
- package/dist/{patterns → landing}/faq-band.d.ts +5 -5
- package/dist/{patterns → landing}/faq-band.js +13 -14
- package/dist/landing/feature-band.d.ts +108 -0
- package/dist/landing/feature-band.js +67 -0
- package/dist/landing/feature.d.ts +148 -0
- package/dist/landing/feature.js +219 -0
- package/dist/landing/flow-diagram.d.ts +62 -0
- package/dist/landing/flow-diagram.js +240 -0
- package/dist/{patterns → landing}/icon-well.d.ts +17 -7
- package/dist/landing/icon-well.js +31 -0
- package/dist/landing/index.d.ts +52 -0
- package/dist/landing/index.js +52 -0
- package/dist/{patterns → landing}/install-tabs.js +4 -5
- package/dist/landing/landing-header.d.ts +103 -0
- package/dist/landing/landing-header.js +110 -0
- package/dist/landing/landing-hero.d.ts +119 -0
- package/dist/landing/landing-hero.js +172 -0
- package/dist/{components/marketing-section.d.ts → landing/landing-section.d.ts} +38 -15
- package/dist/landing/landing-section.js +183 -0
- package/dist/landing/logo-cloud.d.ts +56 -0
- package/dist/landing/logo-cloud.js +160 -0
- package/dist/landing/logo-sentence.d.ts +38 -0
- package/dist/landing/logo-sentence.js +51 -0
- package/dist/landing/marquee.d.ts +44 -0
- package/dist/landing/marquee.js +97 -0
- package/dist/landing/motion-loop.d.ts +43 -0
- package/dist/landing/motion-loop.js +42 -0
- package/dist/landing/pricing-band.d.ts +94 -0
- package/dist/landing/pricing-band.js +151 -0
- package/dist/landing/product-frame.d.ts +108 -0
- package/dist/landing/product-frame.js +202 -0
- package/dist/{patterns → landing}/proof-strip.d.ts +4 -4
- package/dist/{patterns → landing}/proof-strip.js +3 -3
- package/dist/landing/rails.d.ts +45 -0
- package/dist/landing/rails.js +69 -0
- package/dist/landing/rotating-text.d.ts +44 -0
- package/dist/landing/rotating-text.js +67 -0
- package/dist/landing/segmented-stage.d.ts +75 -0
- package/dist/landing/segmented-stage.js +141 -0
- package/dist/landing/sequence-diagram.d.ts +65 -0
- package/dist/landing/sequence-diagram.js +348 -0
- package/dist/landing/site-footer.d.ts +100 -0
- package/dist/landing/site-footer.js +274 -0
- package/dist/landing/site-header.d.ts +126 -0
- package/dist/landing/site-header.js +595 -0
- package/dist/{components → landing}/split.d.ts +12 -5
- package/dist/{components → landing}/split.js +26 -18
- package/dist/landing/sponsor-wall.d.ts +81 -0
- package/dist/landing/sponsor-wall.js +241 -0
- package/dist/{components → landing}/stat-strip.d.ts +31 -7
- package/dist/landing/stat-strip.js +105 -0
- package/dist/landing/step-list.d.ts +73 -0
- package/dist/landing/step-list.js +182 -0
- package/dist/landing/styles/card-grid.d.ts +115 -0
- package/dist/landing/styles/card-grid.js +295 -0
- package/dist/{patterns → landing}/tabbed-stage.d.ts +26 -8
- package/dist/landing/tabbed-stage.js +233 -0
- package/dist/landing/testimonial-band.d.ts +110 -0
- package/dist/landing/testimonial-band.js +164 -0
- package/dist/landing/typed-terminal.d.ts +62 -0
- package/dist/landing/typed-terminal.js +233 -0
- package/dist/landing/utils/pause-toggle.d.ts +37 -0
- package/dist/landing/utils/pause-toggle.js +71 -0
- package/dist/mixins/copy-to-clipboard.d.ts +6 -0
- package/dist/mixins/copy-to-clipboard.js +17 -1
- package/dist/mixins/dialog-dismiss.d.ts +21 -0
- package/dist/mixins/dialog-dismiss.js +62 -0
- package/dist/mixins/index.d.ts +2 -15
- package/dist/mixins/index.js +2 -15
- package/dist/styles/index.d.ts +2 -5
- package/dist/styles/index.js +2 -5
- package/dist/styles/landing.d.ts +200 -0
- package/dist/styles/landing.js +516 -0
- package/dist/styles/surface-control.d.ts +18 -0
- package/dist/styles/surface-control.js +31 -0
- package/dist/utils/eyebrow.d.ts +39 -0
- package/dist/utils/eyebrow.js +21 -0
- package/dist/utils/index.d.ts +1 -5
- package/dist/utils/index.js +1 -5
- package/package.json +14 -4
- package/src/theme.css +87 -22
- package/dist/components/feature.d.ts +0 -102
- package/dist/components/feature.js +0 -150
- package/dist/components/logo-cloud.d.ts +0 -42
- package/dist/components/logo-cloud.js +0 -41
- package/dist/components/marketing-header.d.ts +0 -71
- package/dist/components/marketing-header.js +0 -81
- package/dist/components/marketing-section.js +0 -117
- package/dist/components/stat-strip.js +0 -65
- package/dist/patterns/accent-text.d.ts +0 -30
- package/dist/patterns/accent-text.js +0 -17
- package/dist/patterns/announcement-chip.d.ts +0 -41
- package/dist/patterns/announcement-chip.js +0 -49
- package/dist/patterns/bento.d.ts +0 -68
- package/dist/patterns/bento.js +0 -94
- package/dist/patterns/code-stage.d.ts +0 -63
- package/dist/patterns/code-stage.js +0 -82
- package/dist/patterns/feature-band.d.ts +0 -85
- package/dist/patterns/feature-band.js +0 -50
- package/dist/patterns/icon-well.js +0 -38
- package/dist/patterns/index.d.ts +0 -23
- package/dist/patterns/index.js +0 -23
- package/dist/patterns/landing-hero.d.ts +0 -93
- package/dist/patterns/landing-hero.js +0 -126
- package/dist/patterns/product-frame.d.ts +0 -60
- package/dist/patterns/product-frame.js +0 -70
- package/dist/patterns/step-list.d.ts +0 -47
- package/dist/patterns/step-list.js +0 -85
- package/dist/patterns/tabbed-stage.js +0 -77
- package/dist/styles/marketing.d.ts +0 -120
- package/dist/styles/marketing.js +0 -225
- package/dist/utils/semantic-color-panel.d.ts +0 -35
- package/dist/utils/semantic-color-panel.js +0 -28
- /package/dist/{behaviors → app/behaviors}/drag-session.d.ts +0 -0
- /package/dist/{behaviors → app/behaviors}/resize-session.d.ts +0 -0
- /package/dist/{behaviors → app/behaviors}/resize-session.js +0 -0
- /package/dist/{behaviors → app/behaviors}/selection-model.d.ts +0 -0
- /package/dist/{behaviors → app/behaviors}/selection-model.js +0 -0
- /package/dist/{behaviors → app/behaviors}/toaster.d.ts +0 -0
- /package/dist/{components → app}/drop-indicator.d.ts +0 -0
- /package/dist/{components → app}/drop-zone.d.ts +0 -0
- /package/dist/{components → app}/file-trigger.d.ts +0 -0
- /package/dist/{components → app}/menubar.d.ts +0 -0
- /package/dist/{mixins → app/mixins}/chart-tooltip.d.ts +0 -0
- /package/dist/{mixins → app/mixins}/chart-tooltip.js +0 -0
- /package/dist/{mixins → app/mixins}/context-menu.d.ts +0 -0
- /package/dist/{mixins → app/mixins}/context-menu.js +0 -0
- /package/dist/{mixins → app/mixins}/drag-reorder.d.ts +0 -0
- /package/dist/{mixins → app/mixins}/drop-zone.d.ts +0 -0
- /package/dist/{mixins → app/mixins}/grid-list-keys.d.ts +0 -0
- /package/dist/{mixins → app/mixins}/menubar-keys.d.ts +0 -0
- /package/dist/{mixins → app/mixins}/resize-handle.d.ts +0 -0
- /package/dist/{mixins/treeKeys.d.ts → app/mixins/tree-keys.d.ts} +0 -0
- /package/dist/{components → app}/resizable.d.ts +0 -0
- /package/dist/{components → app}/shortcut-list.d.ts +0 -0
- /package/dist/{components → app}/skeleton.d.ts +0 -0
- /package/dist/{styles → app/styles}/chart-palette.js +0 -0
- /package/dist/{styles → app/styles}/graphic-host.js +0 -0
- /package/dist/{styles → app/styles}/legend-toggle.js +0 -0
- /package/dist/{components → app}/table.d.ts +0 -0
- /package/dist/{components → app}/toast.d.ts +0 -0
- /package/dist/{components → app}/toolbar.d.ts +0 -0
- /package/dist/{utils → app/utils}/chart-marker-indices.d.ts +0 -0
- /package/dist/{utils → app/utils}/chart-marker-indices.js +0 -0
- /package/dist/{utils → app/utils}/chart-scale.d.ts +0 -0
- /package/dist/{behaviors → chat/behaviors}/scroll-follow-model.d.ts +0 -0
- /package/dist/{components → chat}/bubble.d.ts +0 -0
- /package/dist/{components → chat}/marker.d.ts +0 -0
- /package/dist/{components → chat}/message.d.ts +0 -0
- /package/dist/{mixins → chat/mixins}/attachment-trigger.d.ts +0 -0
- /package/dist/{mixins → chat/mixins}/attachment-trigger.js +0 -0
- /package/dist/{mixins → chat/mixins}/message-follow.d.ts +0 -0
- /package/dist/{components → color}/color-area.d.ts +0 -0
- /package/dist/{components → color}/color-field.d.ts +0 -0
- /package/dist/{components → color}/color-slider.d.ts +0 -0
- /package/dist/{components → color}/color-swatch-picker.d.ts +0 -0
- /package/dist/{components → color}/color-swatch.d.ts +0 -0
- /package/dist/{components → color}/color-wheel.d.ts +0 -0
- /package/dist/{mixins → color/mixins}/color-channel-sync.d.ts +0 -0
- /package/dist/{mixins → color/mixins}/color-channel-sync.js +0 -0
- /package/dist/{mixins → color/mixins}/color-preview.d.ts +0 -0
- /package/dist/{mixins → color/mixins}/color-wheel-drag.d.ts +0 -0
- /package/dist/{styles → color/styles}/rtl-aware-gradient-direction.js +0 -0
- /package/dist/{utils → color/utils}/hue-spectrum.d.ts +0 -0
- /package/dist/{utils → color/utils}/hue-spectrum.js +0 -0
- /package/dist/{patterns → landing}/check-row.d.ts +0 -0
- /package/dist/{patterns → landing}/install-tabs.d.ts +0 -0
|
@@ -0,0 +1,516 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Style-mixin factories for landing / landing bands: content measure and
|
|
3
|
+
* gutters, fluid section spacing, band tones, display type, lead copy,
|
|
4
|
+
* hairlines, raised surfaces, eyebrows, CTA chrome and logo-cloud marks.
|
|
5
|
+
*
|
|
6
|
+
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
7
|
+
* @copyright Sergio Xalambrí 2026
|
|
8
|
+
*/
|
|
9
|
+
import { keyframes } from "@sdxc/u/animation";
|
|
10
|
+
import { bg, fg } from "@sdxc/u/color";
|
|
11
|
+
import { combine, raw, var as varUtility } from "@sdxc/u/general";
|
|
12
|
+
import { inlineFlex, items, relative } from "@sdxc/u/layout";
|
|
13
|
+
import { at, dark, motionSafe } from "@sdxc/u/responsive";
|
|
14
|
+
import { bs, is, maxIs, mi, pb, pi } from "@sdxc/u/size";
|
|
15
|
+
import { before, when } from "@sdxc/u/state";
|
|
16
|
+
import { balance, font, pretty, text, weight } from "@sdxc/u/typography";
|
|
17
|
+
/** Max content width a landing column settles at. */
|
|
18
|
+
const MEASURE = varUtility("ui-landing-measure", "72rem");
|
|
19
|
+
/** Inline padding at the narrowest container step. */
|
|
20
|
+
const GUTTER = varUtility("ui-landing-gutter", "1rem");
|
|
21
|
+
/** Block padding for a normal band: 5rem on a phone, 7.5rem from a ~1200px band up. */
|
|
22
|
+
const SECTION_SPACE = varUtility("ui-landing-section-space", "clamp(5rem, 3.86rem + 4.85cqi, 7.5rem)");
|
|
23
|
+
/** Block padding for a compact band: 3rem on a phone, 4.5rem wide. */
|
|
24
|
+
const SECTION_SPACE_COMPACT = varUtility("ui-landing-section-space-compact", "clamp(3rem, 2.32rem + 2.91cqi, 4.5rem)");
|
|
25
|
+
/** Block padding for a hero band, measured from the header: 3.5rem on a phone, 8rem wide. */
|
|
26
|
+
const SECTION_SPACE_HERO = varUtility("ui-landing-section-space-hero", "clamp(3.5rem, 1.45rem + 8.73cqi, 8rem)");
|
|
27
|
+
/** Block padding for a closing call-to-action band: 5rem on a phone, 7rem wide. */
|
|
28
|
+
const SECTION_SPACE_CTA = varUtility("ui-landing-section-space-cta", "clamp(5rem, 4.09rem + 3.88cqi, 7rem)");
|
|
29
|
+
/** Letter-spacing for the page headline. */
|
|
30
|
+
const DISPLAY_TRACKING = varUtility("ui-landing-display-tracking", "-0.035em");
|
|
31
|
+
/** Font weight for display and chapter headlines. */
|
|
32
|
+
const DISPLAY_WEIGHT = varUtility("ui-landing-display-weight", "500");
|
|
33
|
+
/**
|
|
34
|
+
* Page headline size: 42px on a phone, rising with the band to 72px, or to
|
|
35
|
+
* `--ui-landing-display-max` (up to 8rem) where a page opts into a larger top step.
|
|
36
|
+
*/
|
|
37
|
+
const DISPLAY_SIZE = varUtility("ui-landing-display-size", "clamp(2.625rem, 1.77rem + 3.64cqi, var(--ui-landing-display-max, 4.5rem))");
|
|
38
|
+
/**
|
|
39
|
+
* Page headline leading tied to its size: 1.1 at 40px, 1.0 at 72px and 0.9 from 96px up,
|
|
40
|
+
* so a two-line display never collides and a short one never floats apart.
|
|
41
|
+
*/
|
|
42
|
+
const DISPLAY_LEADING = varUtility("ui-landing-display-leading", "min(calc(0.875em + 0.5625rem), calc(0.6em + 1.8rem))");
|
|
43
|
+
/** Chapter (band H2) size: 28px on a phone, 48px wide, two thirds of the headline. */
|
|
44
|
+
const CHAPTER_SIZE = varUtility("ui-landing-chapter-size", "clamp(1.75rem, 1.18rem + 2.42cqi, 3rem)");
|
|
45
|
+
/** Chapter leading. */
|
|
46
|
+
const CHAPTER_LEADING = varUtility("ui-landing-chapter-leading", "1.1");
|
|
47
|
+
/** Chapter letter-spacing. */
|
|
48
|
+
const CHAPTER_TRACKING = varUtility("ui-landing-chapter-tracking", "-0.025em");
|
|
49
|
+
/** Max width of supporting lead copy under a headline. */
|
|
50
|
+
const LEAD_MEASURE = varUtility("ui-landing-lead-measure", "40rem");
|
|
51
|
+
/** Font size of supporting lead copy. */
|
|
52
|
+
const LEAD_SIZE = varUtility("ui-landing-lead-size", "1.125rem");
|
|
53
|
+
/** Font size of the hero's lead: 17px on a phone, 20px wide, as the reference landings set it. */
|
|
54
|
+
const HERO_LEAD_SIZE = varUtility("ui-landing-hero-lead-size", "clamp(1.0625rem, 0.98rem + 0.4cqi, 1.25rem)");
|
|
55
|
+
/** Line height of the hero's lead, proportional so it tracks the fluid size: 26px to 31px. */
|
|
56
|
+
const HERO_LEAD_LEADING = varUtility("ui-landing-hero-lead-leading", "1.55");
|
|
57
|
+
/** Line height of lead copy, held at 2rem as every reference template does. */
|
|
58
|
+
const LEAD_LEADING = varUtility("ui-landing-lead-leading", "2rem");
|
|
59
|
+
/** Font weight of lead copy; a display-led brand sets 500. */
|
|
60
|
+
const LEAD_WEIGHT = varUtility("ui-landing-lead-weight", "400");
|
|
61
|
+
/** Height of a logo-cloud mark at the narrowest step. */
|
|
62
|
+
const LOGO_HEIGHT = varUtility("ui-landing-logo-height", "1.75rem");
|
|
63
|
+
/** Height of a logo-cloud mark from the `lg` container up. */
|
|
64
|
+
const LOGO_HEIGHT_LG = varUtility("ui-landing-logo-height-lg", "2.25rem");
|
|
65
|
+
/** Translucent line every landing edge, rule and grid draws with. */
|
|
66
|
+
const HAIRLINE = varUtility("ui-landing-hairline", "color-mix(in oklch, CanvasText 8%, transparent)");
|
|
67
|
+
/** Fill of a surface that sits above the band: frames, cards, code. */
|
|
68
|
+
const SURFACE_RAISED = varUtility("ui-surface-raised", "Canvas");
|
|
69
|
+
/** Corner radius of a staged surface. */
|
|
70
|
+
const RADIUS_SURFACE = varUtility("ui-landing-radius-surface", "1rem");
|
|
71
|
+
/** Edge a raised surface draws: a ring plus a small drop, or a top-lit hairline in dark. */
|
|
72
|
+
const SHADOW_SURFACE = varUtility("ui-shadow-surface", "0 0 0 1px rgb(0 0 0 / 0.06)");
|
|
73
|
+
/** Default spacing step {@link landingSectionSpace} applies. */
|
|
74
|
+
const DEFAULT_SECTION_SPACING = "normal";
|
|
75
|
+
/** Default band fill {@link landingBandTone} applies. */
|
|
76
|
+
const DEFAULT_BAND_TONE = "plain";
|
|
77
|
+
/** Default outline depth {@link displayHeading} draws at. */
|
|
78
|
+
const DEFAULT_DISPLAY_LEVEL = 1;
|
|
79
|
+
/** Default step {@link landingLead} sizes for. */
|
|
80
|
+
const DEFAULT_LEAD_STEP = "band";
|
|
81
|
+
/** Default look {@link eyebrow} draws. */
|
|
82
|
+
const DEFAULT_EYEBROW_VARIANT = "mono";
|
|
83
|
+
/** Name of the keyframes {@link landingSlowSpin} turns through. */
|
|
84
|
+
const SLOW_SPIN_KEYFRAMES = "ui-landing-slow-spin";
|
|
85
|
+
/**
|
|
86
|
+
* Centers a landing content column at `--ui-landing-measure` and pads
|
|
87
|
+
* its inline edges from `--ui-landing-gutter`, stepping 1rem → 1.5rem → 2rem
|
|
88
|
+
* as the nearest container grows past `md` and `lg`.
|
|
89
|
+
*
|
|
90
|
+
* @returns A `css()` mixin ready for a content wrapper's `mix` prop.
|
|
91
|
+
* @example
|
|
92
|
+
* <div mix={[landingContainer()]}>{children}</div>;
|
|
93
|
+
*/
|
|
94
|
+
export function landingContainer() {
|
|
95
|
+
return combine([
|
|
96
|
+
maxIs(MEASURE),
|
|
97
|
+
mi("auto"),
|
|
98
|
+
pi(GUTTER),
|
|
99
|
+
at("md", pi("1.5rem")),
|
|
100
|
+
at("lg", pi("2rem")),
|
|
101
|
+
]);
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Re-declares the surface tokens that derive from the neutral palette on the element that
|
|
105
|
+
* scopes its own `--ui-color-neutral-*` scale, so raised cards, frames and hairlines inside
|
|
106
|
+
* take that palette's hue in light and dark instead of the page root's.
|
|
107
|
+
*
|
|
108
|
+
* @returns A `css()` mixin for the element that overrides a palette scale.
|
|
109
|
+
* @example
|
|
110
|
+
* <div style="--ui-color-neutral-950: oklch(0.165 0.006 55)" mix={[themeScope()]}>{page}</div>;
|
|
111
|
+
*/
|
|
112
|
+
export function themeScope() {
|
|
113
|
+
return combine([
|
|
114
|
+
raw({
|
|
115
|
+
"--ui-landing-hairline": "color-mix(in oklch, var(--ui-neutral-fg-emphasis) 6%, transparent)",
|
|
116
|
+
}),
|
|
117
|
+
dark(raw({
|
|
118
|
+
"--ui-surface-raised": "color-mix(in oklch, var(--ui-color-neutral-950), var(--ui-color-neutral-900))",
|
|
119
|
+
"--ui-landing-hairline": "color-mix(in oklch, white 10%, transparent)",
|
|
120
|
+
})),
|
|
121
|
+
]);
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Applies the band's block padding from the landing section-space tokens. Each
|
|
125
|
+
* step is fluid in the width of the container around the band, so a phone gets
|
|
126
|
+
* the tighter end and a desktop band the generous one without a breakpoint jump.
|
|
127
|
+
* The step rounds to whole pixels, so band hairlines and edges stay crisp.
|
|
128
|
+
*
|
|
129
|
+
* @param spacing Which step to apply. Defaults to `"normal"`.
|
|
130
|
+
* @returns A `css()` mixin ready for a band host's `mix` prop.
|
|
131
|
+
* @example
|
|
132
|
+
* <section mix={[landingSectionSpace("hero")]}>{children}</section>;
|
|
133
|
+
*/
|
|
134
|
+
export function landingSectionSpace(spacing = DEFAULT_SECTION_SPACING) {
|
|
135
|
+
let padding = SECTION_SPACE;
|
|
136
|
+
if (spacing === "hero")
|
|
137
|
+
padding = SECTION_SPACE_HERO;
|
|
138
|
+
if (spacing === "compact")
|
|
139
|
+
padding = SECTION_SPACE_COMPACT;
|
|
140
|
+
if (spacing === "cta")
|
|
141
|
+
padding = SECTION_SPACE_CTA;
|
|
142
|
+
return raw({ paddingBlock: `round(${padding}, 1px)` });
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* The neutral text, line, surface and focus tokens re-pointed at a solid fill's
|
|
146
|
+
* foreground, so headings, leads, hairlines, raised controls and focus rings inside an
|
|
147
|
+
* inverse or brand band stay legible on it: leads and labels keep at least 4.5:1 on the
|
|
148
|
+
* band's fill.
|
|
149
|
+
*/
|
|
150
|
+
function onSolidTokens(onSolid) {
|
|
151
|
+
return {
|
|
152
|
+
"--ui-neutral-fg-emphasis": onSolid,
|
|
153
|
+
"--ui-neutral-fg": `color-mix(in oklch, ${onSolid} 92%, transparent)`,
|
|
154
|
+
"--ui-neutral-fg-muted": `color-mix(in oklch, ${onSolid} 78%, transparent)`,
|
|
155
|
+
"--ui-landing-eyebrow-color": `color-mix(in oklch, ${onSolid} 78%, transparent)`,
|
|
156
|
+
"--ui-neutral-border": `color-mix(in oklch, ${onSolid} 18%, transparent)`,
|
|
157
|
+
"--ui-neutral-bg-tint": `color-mix(in oklch, ${onSolid} 6%, transparent)`,
|
|
158
|
+
"--ui-landing-hairline": `color-mix(in oklch, ${onSolid} 12%, transparent)`,
|
|
159
|
+
"--ui-surface-raised": `color-mix(in oklch, ${onSolid} 12%, transparent)`,
|
|
160
|
+
"--ui-shadow-surface": `inset 0 0 0 1px color-mix(in oklch, ${onSolid} 14%, transparent)`,
|
|
161
|
+
"--ui-shadow-control": `inset 0 0 0 1px color-mix(in oklch, ${onSolid} 16%, transparent)`,
|
|
162
|
+
"--ui-brand-ring": onSolid,
|
|
163
|
+
"--ui-neutral-ring": onSolid,
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Marks every declaration `!important`. A dark theme re-declares the text tokens on each
|
|
168
|
+
* element, so a brand band asserts its own over its whole subtree to keep them in dark.
|
|
169
|
+
*/
|
|
170
|
+
function important(styles) {
|
|
171
|
+
return Object.fromEntries(Object.entries(styles).map(([property, value]) => [
|
|
172
|
+
property,
|
|
173
|
+
typeof value === "string" ? `${value} !important` : value,
|
|
174
|
+
]));
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* The tokens a dark page's inverse band restores: rather than painting a near-white slab
|
|
178
|
+
* at the foot of a dark page, the band becomes a raised surface carrying the page's own
|
|
179
|
+
* text and line tokens.
|
|
180
|
+
*/
|
|
181
|
+
const DARK_INVERSE_TOKENS = {
|
|
182
|
+
"--ui-neutral-fg-emphasis": "inherit",
|
|
183
|
+
"--ui-neutral-fg": "inherit",
|
|
184
|
+
"--ui-neutral-fg-muted": "inherit",
|
|
185
|
+
"--ui-landing-eyebrow-color": "inherit",
|
|
186
|
+
"--ui-neutral-border": "inherit",
|
|
187
|
+
"--ui-neutral-bg-tint": "inherit",
|
|
188
|
+
"--ui-landing-hairline": "inherit",
|
|
189
|
+
"--ui-surface-raised": "inherit",
|
|
190
|
+
"--ui-shadow-surface": "inherit",
|
|
191
|
+
"--ui-shadow-control": "inherit",
|
|
192
|
+
"--ui-brand-ring": "inherit",
|
|
193
|
+
"--ui-neutral-ring": "inherit",
|
|
194
|
+
};
|
|
195
|
+
/**
|
|
196
|
+
* The brand band's fill: the 700 step, one deeper than a brand button, so white leads and
|
|
197
|
+
* labels on it clear 4.5:1 for any 600 step a palette picks. Override with
|
|
198
|
+
* `--ui-landing-brand-band`.
|
|
199
|
+
*/
|
|
200
|
+
const BRAND_BAND_FILL = "var(--ui-landing-brand-band, var(--ui-color-brand-700))";
|
|
201
|
+
/** The quiet brand glow a tinted or dark-inverse band carries in its top corner. */
|
|
202
|
+
const BRAND_GLOW = "radial-gradient(60% 70% at 85% 0%, color-mix(in oklch, var(--ui-brand-bg-solid) 14%, transparent), transparent 70%)";
|
|
203
|
+
/**
|
|
204
|
+
* Paints a landing band's background: a quiet neutral tint (`--ui-landing-band-tint`,
|
|
205
|
+
* `-tint-dark`, and `--ui-landing-band-glow`, `none` to drop it), a hairline grid, an
|
|
206
|
+
* inverted solid, the brand solid, a page-supplied gradient, or nothing for `"plain"`.
|
|
207
|
+
* Inverse and brand bands re-point the neutral tokens at the fill's foreground; on a
|
|
208
|
+
* dark page an inverse band renders as a raised surface with hairlines and the glow.
|
|
209
|
+
*
|
|
210
|
+
* @param tone Which fill to apply. Defaults to `"plain"`.
|
|
211
|
+
* @returns A `css()` mixin ready for a band host's `mix` prop.
|
|
212
|
+
* @example
|
|
213
|
+
* <section mix={[landingBandTone("tinted"), landingSectionSpace()]}>{children}</section>;
|
|
214
|
+
* @example
|
|
215
|
+
* <section mix={[landingBandTone("brand")]} style="--ui-landing-band-gradient: …">…</section>;
|
|
216
|
+
*/
|
|
217
|
+
export function landingBandTone(tone = DEFAULT_BAND_TONE) {
|
|
218
|
+
switch (tone) {
|
|
219
|
+
case "tinted":
|
|
220
|
+
return combine([
|
|
221
|
+
raw({
|
|
222
|
+
backgroundColor: "var(--ui-landing-band-tint, var(--ui-color-neutral-100))",
|
|
223
|
+
backgroundImage: `var(--ui-landing-band-glow, ${BRAND_GLOW})`,
|
|
224
|
+
}),
|
|
225
|
+
dark(raw({
|
|
226
|
+
backgroundColor: "var(--ui-landing-band-tint-dark, var(--ui-neutral-bg-tint))",
|
|
227
|
+
})),
|
|
228
|
+
]);
|
|
229
|
+
case "grid":
|
|
230
|
+
return combine([
|
|
231
|
+
relative(),
|
|
232
|
+
before(raw({
|
|
233
|
+
content: '""',
|
|
234
|
+
position: "absolute",
|
|
235
|
+
inset: "0",
|
|
236
|
+
zIndex: "-1",
|
|
237
|
+
backgroundImage: `linear-gradient(to right, ${HAIRLINE} 1px, transparent 1px), linear-gradient(to bottom, ${HAIRLINE} 1px, transparent 1px)`,
|
|
238
|
+
backgroundSize: "3rem 3rem",
|
|
239
|
+
maskImage: "radial-gradient(70% 80% at 70% 40%, black, transparent 75%)",
|
|
240
|
+
WebkitMaskImage: "radial-gradient(70% 80% at 70% 40%, black, transparent 75%)",
|
|
241
|
+
})),
|
|
242
|
+
]);
|
|
243
|
+
case "inverse":
|
|
244
|
+
return combine([
|
|
245
|
+
bg("neutral.solid"),
|
|
246
|
+
fg("neutral.onSolid"),
|
|
247
|
+
raw(onSolidTokens("var(--ui-neutral-fg-on-solid)")),
|
|
248
|
+
dark(raw({
|
|
249
|
+
...DARK_INVERSE_TOKENS,
|
|
250
|
+
backgroundColor: SURFACE_RAISED,
|
|
251
|
+
backgroundImage: BRAND_GLOW,
|
|
252
|
+
color: "var(--ui-neutral-fg-emphasis)",
|
|
253
|
+
boxShadow: `inset 0 1px 0 ${HAIRLINE}, inset 0 -1px 0 ${HAIRLINE}`,
|
|
254
|
+
})),
|
|
255
|
+
]);
|
|
256
|
+
case "brand":
|
|
257
|
+
return combine([
|
|
258
|
+
raw({ backgroundColor: BRAND_BAND_FILL }),
|
|
259
|
+
fg("brand.onSolid"),
|
|
260
|
+
raw(onSolidTokens("var(--ui-brand-fg-on-solid)")),
|
|
261
|
+
dark(when("&, & *", raw(important(onSolidTokens("var(--ui-brand-fg-on-solid)"))))),
|
|
262
|
+
]);
|
|
263
|
+
case "gradient":
|
|
264
|
+
return raw({
|
|
265
|
+
backgroundImage: "var(--ui-landing-band-gradient, none)",
|
|
266
|
+
backgroundColor: "var(--ui-landing-band-gradient-base, transparent)",
|
|
267
|
+
});
|
|
268
|
+
default:
|
|
269
|
+
return raw({});
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
/**
|
|
273
|
+
* Sets display typography for a landing headline. Level 1 is the page H1, sized
|
|
274
|
+
* fluidly from 42px to 72px (or `--ui-landing-display-max`) with leading that tightens
|
|
275
|
+
* as it grows; level 2 is the band chapter at two thirds of that, so the H1:H2 ratio
|
|
276
|
+
* holds at 1.5:1 at every width. Sizes read `cqi`, so a headline in a narrow column steps
|
|
277
|
+
* down on its own.
|
|
278
|
+
*
|
|
279
|
+
* @param level Outline depth. Defaults to `1` (page H1).
|
|
280
|
+
* @returns A `css()` mixin ready for a heading's `mix` prop.
|
|
281
|
+
* @example
|
|
282
|
+
* <h1 mix={[displayHeading()]}>{title}</h1>;
|
|
283
|
+
* @example
|
|
284
|
+
* <h2 mix={[displayHeading(2)]}>{chapter}</h2>;
|
|
285
|
+
*/
|
|
286
|
+
export function displayHeading(level = DEFAULT_DISPLAY_LEVEL) {
|
|
287
|
+
let size = varUtility("ui-text-xl", "1.25rem");
|
|
288
|
+
let leading = CHAPTER_LEADING;
|
|
289
|
+
let tracking = CHAPTER_TRACKING;
|
|
290
|
+
if (level === 1) {
|
|
291
|
+
size = DISPLAY_SIZE;
|
|
292
|
+
leading = DISPLAY_LEADING;
|
|
293
|
+
tracking = DISPLAY_TRACKING;
|
|
294
|
+
}
|
|
295
|
+
if (level === 2)
|
|
296
|
+
size = CHAPTER_SIZE;
|
|
297
|
+
return combine([
|
|
298
|
+
font("display"),
|
|
299
|
+
fg("neutral.emphasis"),
|
|
300
|
+
balance(),
|
|
301
|
+
raw({
|
|
302
|
+
fontWeight: DISPLAY_WEIGHT,
|
|
303
|
+
letterSpacing: tracking,
|
|
304
|
+
lineHeight: leading,
|
|
305
|
+
fontSize: size,
|
|
306
|
+
}),
|
|
307
|
+
]);
|
|
308
|
+
}
|
|
309
|
+
/**
|
|
310
|
+
* Draws `strong`, `b` and `[data-emphasis]` inside supporting copy in the emphasis ink at
|
|
311
|
+
* the copy's own weight, so a key phrase gives the scanning eye a second level without
|
|
312
|
+
* turning bold.
|
|
313
|
+
*
|
|
314
|
+
* @returns A `css()` mixin ready for a lead, description or body's `mix` prop.
|
|
315
|
+
* @example
|
|
316
|
+
* <p mix={[landingEmphasis()]}>Ship <strong>one worker</strong> per app.</p>;
|
|
317
|
+
*/
|
|
318
|
+
export function landingEmphasis() {
|
|
319
|
+
return when("& :is(strong, b, [data-emphasis])", raw({ color: "var(--ui-neutral-fg-emphasis)", fontWeight: "inherit" }));
|
|
320
|
+
}
|
|
321
|
+
/**
|
|
322
|
+
* Supporting copy under a landing headline, in the body ink so it reads at 4.5:1 or
|
|
323
|
+
* better on the band, on a 2rem line, with emphasis fragments in the heading ink.
|
|
324
|
+
*
|
|
325
|
+
* @param step `"hero"` for the larger first-viewport lead. Defaults to `"band"`.
|
|
326
|
+
* @returns A `css()` mixin ready for a lead paragraph's `mix` prop.
|
|
327
|
+
* @example
|
|
328
|
+
* <p mix={[landingLead()]}>{description}</p>;
|
|
329
|
+
* @example
|
|
330
|
+
* <p mix={[landingLead("hero")]}>{description}</p>;
|
|
331
|
+
*/
|
|
332
|
+
export function landingLead(step = DEFAULT_LEAD_STEP) {
|
|
333
|
+
return combine([
|
|
334
|
+
fg("neutral"),
|
|
335
|
+
pretty(),
|
|
336
|
+
raw({
|
|
337
|
+
fontSize: step === "hero" ? HERO_LEAD_SIZE : LEAD_SIZE,
|
|
338
|
+
fontWeight: LEAD_WEIGHT,
|
|
339
|
+
maxInlineSize: LEAD_MEASURE,
|
|
340
|
+
lineHeight: step === "hero" ? HERO_LEAD_LEADING : LEAD_LEADING,
|
|
341
|
+
}),
|
|
342
|
+
landingEmphasis(),
|
|
343
|
+
]);
|
|
344
|
+
}
|
|
345
|
+
/**
|
|
346
|
+
* A translucent 1px rule along the block-start edge — the hairline a sticky header,
|
|
347
|
+
* footer, or band uses to separate itself from what sits above. It takes the tone of
|
|
348
|
+
* whatever is behind it, and high contrast promotes it to the strong border.
|
|
349
|
+
*
|
|
350
|
+
* @returns A `css()` mixin ready for a host element's `mix` prop.
|
|
351
|
+
* @example
|
|
352
|
+
* <header mix={[landingHairline()]}>{nav}</header>;
|
|
353
|
+
*/
|
|
354
|
+
export function landingHairline() {
|
|
355
|
+
return raw({
|
|
356
|
+
borderBlockStartWidth: "1px",
|
|
357
|
+
borderBlockStartStyle: "solid",
|
|
358
|
+
borderBlockStartColor: HAIRLINE,
|
|
359
|
+
});
|
|
360
|
+
}
|
|
361
|
+
/**
|
|
362
|
+
* A surface raised above the band — a frame, card or code sheet: the raised fill, the
|
|
363
|
+
* surface radius and the surface edge, which is a ring and a small drop in light and a
|
|
364
|
+
* top-lit hairline in dark. Drawn as a shadow, so the edge never changes the box size.
|
|
365
|
+
*
|
|
366
|
+
* @returns A `css()` mixin ready for a surface's `mix` prop.
|
|
367
|
+
* @example
|
|
368
|
+
* <div mix={[landingSurface()]}>{card}</div>;
|
|
369
|
+
*/
|
|
370
|
+
export function landingSurface() {
|
|
371
|
+
return combine([
|
|
372
|
+
raw({
|
|
373
|
+
backgroundColor: SURFACE_RAISED,
|
|
374
|
+
borderRadius: RADIUS_SURFACE,
|
|
375
|
+
boxShadow: SHADOW_SURFACE,
|
|
376
|
+
}),
|
|
377
|
+
]);
|
|
378
|
+
}
|
|
379
|
+
/**
|
|
380
|
+
* Sizes a logo-cloud mark at `--ui-landing-logo-height` (1.75rem, 2.25rem from the
|
|
381
|
+
* `lg` container) in full ink, so adopter marks read at the size a visitor recognizes
|
|
382
|
+
* them. Dimming belongs to the cloud, never to the mark.
|
|
383
|
+
*
|
|
384
|
+
* @returns A `css()` mixin ready for an `img` or inline SVG's `mix` prop.
|
|
385
|
+
* @example
|
|
386
|
+
* <img src={logo} alt="" mix={[logoCloudMark()]} />;
|
|
387
|
+
*/
|
|
388
|
+
export function logoCloudMark() {
|
|
389
|
+
return combine([
|
|
390
|
+
bs(LOGO_HEIGHT),
|
|
391
|
+
is("auto"),
|
|
392
|
+
raw({ objectFit: "contain", color: "currentColor" }),
|
|
393
|
+
at("lg", bs(LOGO_HEIGHT_LG)),
|
|
394
|
+
]);
|
|
395
|
+
}
|
|
396
|
+
/**
|
|
397
|
+
* Corner radius, weight and tactile edge for a landing CTA. Compose onto a
|
|
398
|
+
* {@link Button} or {@link LinkButton}; it sets `--ui-button-radius` and
|
|
399
|
+
* `--ui-button-weight`, which the control reads, so `--ui-landing-cta-radius` (pill,
|
|
400
|
+
* 8px, 6px) applies whatever order the stylesheets load in; `--ui-landing-cta-height`
|
|
401
|
+
* raises every CTA to one height. Only colour and shadow
|
|
402
|
+
* animate, so a hover never eases the control's size or radius.
|
|
403
|
+
*
|
|
404
|
+
* @returns A `css()` mixin ready for a CTA control's `mix` prop.
|
|
405
|
+
* @example
|
|
406
|
+
* <Button color="brand" mix={[landingCtaChrome()]}>{label}</Button>;
|
|
407
|
+
*/
|
|
408
|
+
export function landingCtaChrome() {
|
|
409
|
+
return raw({
|
|
410
|
+
"--ui-button-radius": "var(--ui-landing-cta-radius, 0.5rem)",
|
|
411
|
+
"--ui-button-weight": "var(--ui-landing-cta-weight, 600)",
|
|
412
|
+
boxShadow: "var(--ui-shadow-control, 0 1px 2px rgb(0 0 0 / 0.05))",
|
|
413
|
+
blockSize: "var(--ui-landing-cta-height, auto)",
|
|
414
|
+
transitionProperty: "background-color, box-shadow, color",
|
|
415
|
+
});
|
|
416
|
+
}
|
|
417
|
+
/**
|
|
418
|
+
* The label above a headline, in one of five looks. `mono` and `soft` stay neutral,
|
|
419
|
+
* `quiet` is a hairline pill for hero announcements, `pill` and `numbered` carry the
|
|
420
|
+
* brand. Pills round at 1rem, so a label that wraps on a phone reads as a soft card. The
|
|
421
|
+
* mono label's face, weight, case and tracking read `--ui-landing-eyebrow-*` tokens. Variants live in `data-variant`; a brand tints the mono label through
|
|
422
|
+
* `--ui-landing-eyebrow-color`, and a linked eyebrow nudges its arrow on hover.
|
|
423
|
+
*
|
|
424
|
+
* @returns A `css()` mixin ready for an eyebrow `span` or `a`'s `mix` prop; set
|
|
425
|
+
* `data-variant` on the host.
|
|
426
|
+
* @example
|
|
427
|
+
* <span data-variant="mono" mix={[eyebrow()]}>{t("features.eyebrow")}</span>;
|
|
428
|
+
* @example
|
|
429
|
+
* <a href={post} data-variant="quiet" mix={[eyebrow()]}>{t("hero.news")}</a>;
|
|
430
|
+
*/
|
|
431
|
+
export function eyebrow() {
|
|
432
|
+
return combine([
|
|
433
|
+
inlineFlex(),
|
|
434
|
+
items("center"),
|
|
435
|
+
raw({ gap: "0.375rem", textDecoration: "none", maxInlineSize: "100%" }),
|
|
436
|
+
text("xs"),
|
|
437
|
+
when(`&:not([data-variant]), &[data-variant="${DEFAULT_EYEBROW_VARIANT}"]`, [
|
|
438
|
+
raw({
|
|
439
|
+
fontFamily: "var(--ui-landing-eyebrow-font, var(--ui-font-mono, monospace))",
|
|
440
|
+
fontWeight: "var(--ui-landing-eyebrow-weight, 600)",
|
|
441
|
+
textTransform: "var(--ui-landing-eyebrow-transform, uppercase)",
|
|
442
|
+
color: "var(--ui-landing-eyebrow-color, var(--ui-neutral-fg-muted))",
|
|
443
|
+
letterSpacing: "var(--ui-landing-eyebrow-tracking, 0.1em)",
|
|
444
|
+
lineHeight: "1.25rem",
|
|
445
|
+
}),
|
|
446
|
+
]),
|
|
447
|
+
when('&:is([data-variant="quiet"], [data-variant="soft"], [data-variant="pill"])', [
|
|
448
|
+
pb(1.5),
|
|
449
|
+
pi(3.5),
|
|
450
|
+
raw({ lineHeight: "1rem", borderRadius: "1rem", textWrap: "balance" }),
|
|
451
|
+
]),
|
|
452
|
+
when('&[data-variant="quiet"]', [
|
|
453
|
+
weight("normal"),
|
|
454
|
+
fg("neutral"),
|
|
455
|
+
raw({ boxShadow: `inset 0 0 0 1px ${HAIRLINE}`, backgroundColor: "transparent" }),
|
|
456
|
+
]),
|
|
457
|
+
when('&[data-variant="soft"]', [
|
|
458
|
+
weight("medium"),
|
|
459
|
+
fg("neutral.emphasis"),
|
|
460
|
+
bg("neutral.bg-tint-hover"),
|
|
461
|
+
]),
|
|
462
|
+
when('&[data-variant="pill"]', [
|
|
463
|
+
weight("semibold"),
|
|
464
|
+
fg("brand"),
|
|
465
|
+
bg("brand.tint"),
|
|
466
|
+
raw({ boxShadow: "inset 0 0 0 1px var(--ui-brand-border)" }),
|
|
467
|
+
]),
|
|
468
|
+
when('&[data-variant="numbered"]', [
|
|
469
|
+
pb(1),
|
|
470
|
+
pi(4),
|
|
471
|
+
raw({ borderRadius: "1rem" }),
|
|
472
|
+
text("sm"),
|
|
473
|
+
weight("medium"),
|
|
474
|
+
fg("brand"),
|
|
475
|
+
raw({
|
|
476
|
+
boxShadow: "inset 0 0 0 1px var(--ui-brand-border-strong)",
|
|
477
|
+
fontVariantNumeric: "tabular-nums",
|
|
478
|
+
}),
|
|
479
|
+
]),
|
|
480
|
+
when("& > [data-slot='eyebrow-index']", [
|
|
481
|
+
raw({
|
|
482
|
+
paddingInlineEnd: "0.5rem",
|
|
483
|
+
marginInlineEnd: "0.125rem",
|
|
484
|
+
borderInlineEnd: "1px solid color-mix(in oklch, currentColor 40%, transparent)",
|
|
485
|
+
}),
|
|
486
|
+
]),
|
|
487
|
+
when("&:is(a)", [
|
|
488
|
+
raw({ transition: "color 150ms, background-color 150ms, box-shadow 150ms" }),
|
|
489
|
+
]),
|
|
490
|
+
when("&:is(a):hover", fg("neutral.emphasis")),
|
|
491
|
+
when("& > [data-slot='eyebrow-arrow']", [
|
|
492
|
+
raw({ inlineSize: "0.875rem", blockSize: "0.875rem", transition: "translate 150ms" }),
|
|
493
|
+
]),
|
|
494
|
+
when("&:is(a):hover > [data-slot='eyebrow-arrow']", motionSafe(raw({ translate: "2px 0" }))),
|
|
495
|
+
]);
|
|
496
|
+
}
|
|
497
|
+
/**
|
|
498
|
+
* A slow, endless turn for decoration behind hero media — concentric rings or a glow —
|
|
499
|
+
* that only runs when the visitor has not asked for reduced motion.
|
|
500
|
+
*
|
|
501
|
+
* @param direction `"reverse"` turns counter-clockwise, so two layers can counter-rotate.
|
|
502
|
+
* @returns A `css()` mixin ready for a backdrop layer's `mix` prop.
|
|
503
|
+
* @example
|
|
504
|
+
* <svg mix={[landingSlowSpin()]}>…</svg>;
|
|
505
|
+
*/
|
|
506
|
+
export function landingSlowSpin(direction = "normal") {
|
|
507
|
+
return combine([
|
|
508
|
+
keyframes(SLOW_SPIN_KEYFRAMES, {
|
|
509
|
+
from: { rotate: "0deg" },
|
|
510
|
+
to: { rotate: "360deg" },
|
|
511
|
+
}),
|
|
512
|
+
motionSafe(raw({
|
|
513
|
+
animation: `${SLOW_SPIN_KEYFRAMES} ${direction === "reverse" ? "80s" : "60s"} linear infinite ${direction}`,
|
|
514
|
+
})),
|
|
515
|
+
]);
|
|
516
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The raised fill a `surface` button or link draws: the surface token, the emphasis ink
|
|
3
|
+
* and the tactile control edge. Inside an inverse or brand band those tokens are
|
|
4
|
+
* re-pointed at the fill's foreground, so the same control turns translucent there.
|
|
5
|
+
*
|
|
6
|
+
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
7
|
+
* @copyright Sergio Xalambrí 2026
|
|
8
|
+
*/
|
|
9
|
+
import type { UtilityMixin } from "@sdxc/u";
|
|
10
|
+
/**
|
|
11
|
+
* Paints a control as a raised surface with a transparent border, so it keeps the
|
|
12
|
+
* footprint of its solid and outline siblings, and darkens the fill a step on hover.
|
|
13
|
+
*
|
|
14
|
+
* @returns A `css()` mixin ready for a control's `mix` prop.
|
|
15
|
+
* @example
|
|
16
|
+
* <button mix={[when('&[data-variant="surface"]', surfaceControl())]}>{label}</button>;
|
|
17
|
+
*/
|
|
18
|
+
export declare function surfaceControl<Node extends Element = Element>(): UtilityMixin<Node>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The raised fill a `surface` button or link draws: the surface token, the emphasis ink
|
|
3
|
+
* and the tactile control edge. Inside an inverse or brand band those tokens are
|
|
4
|
+
* re-pointed at the fill's foreground, so the same control turns translucent there.
|
|
5
|
+
*
|
|
6
|
+
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
7
|
+
* @copyright Sergio Xalambrí 2026
|
|
8
|
+
*/
|
|
9
|
+
import { combine, raw } from "@sdxc/u/general";
|
|
10
|
+
import { when } from "@sdxc/u/state";
|
|
11
|
+
/**
|
|
12
|
+
* Paints a control as a raised surface with a transparent border, so it keeps the
|
|
13
|
+
* footprint of its solid and outline siblings, and darkens the fill a step on hover.
|
|
14
|
+
*
|
|
15
|
+
* @returns A `css()` mixin ready for a control's `mix` prop.
|
|
16
|
+
* @example
|
|
17
|
+
* <button mix={[when('&[data-variant="surface"]', surfaceControl())]}>{label}</button>;
|
|
18
|
+
*/
|
|
19
|
+
export function surfaceControl() {
|
|
20
|
+
return combine([
|
|
21
|
+
raw({
|
|
22
|
+
backgroundColor: "var(--ui-surface-raised, Canvas)",
|
|
23
|
+
borderColor: "transparent",
|
|
24
|
+
color: "var(--ui-neutral-fg-emphasis)",
|
|
25
|
+
boxShadow: "var(--ui-shadow-control, 0 0 0 1px rgb(0 0 0 / 0.08))",
|
|
26
|
+
}),
|
|
27
|
+
when("&:hover", raw({
|
|
28
|
+
backgroundColor: "color-mix(in oklch, var(--ui-surface-raised, Canvas), var(--ui-neutral-fg-emphasis) 6%)",
|
|
29
|
+
})),
|
|
30
|
+
]);
|
|
31
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The label above a landing headline, shared by band headers, the hero and the
|
|
3
|
+
* announcement chip so every label on a page draws from one set of looks. Given an
|
|
4
|
+
* `href` it renders a link with a trailing arrow that nudges on hover.
|
|
5
|
+
*
|
|
6
|
+
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
7
|
+
* @copyright Sergio Xalambrí 2026
|
|
8
|
+
*/
|
|
9
|
+
import type { Handle, Props as TagProps, RemixNode } from "remix/component";
|
|
10
|
+
import type { LandingEyebrowVariant } from "../styles/landing.js";
|
|
11
|
+
/**
|
|
12
|
+
* Prop types for {@link Eyebrow}.
|
|
13
|
+
*/
|
|
14
|
+
export declare namespace Eyebrow {
|
|
15
|
+
/**
|
|
16
|
+
* Props accepted by {@link Eyebrow}.
|
|
17
|
+
*/
|
|
18
|
+
interface Props {
|
|
19
|
+
/** Which look the label draws. */
|
|
20
|
+
variant: LandingEyebrowVariant | "special";
|
|
21
|
+
/** Turns the label into a link with a trailing arrow. */
|
|
22
|
+
href?: string;
|
|
23
|
+
/** Index a `numbered` label leads with, such as `"01"`. */
|
|
24
|
+
index?: RemixNode;
|
|
25
|
+
/** The `data-slot` the label carries, for hosts that name it after themselves. */
|
|
26
|
+
slot?: string;
|
|
27
|
+
/** Extra styling, applied after the eyebrow look. */
|
|
28
|
+
mix?: TagProps<"span">["mix"];
|
|
29
|
+
/** The label. */
|
|
30
|
+
children: RemixNode;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Renders the label as a `span`, or as an `a` ending in an arrow when `href` is set.
|
|
35
|
+
*
|
|
36
|
+
* @param handle Runtime handle carrying the label's props.
|
|
37
|
+
* @returns The render function producing the label.
|
|
38
|
+
*/
|
|
39
|
+
export declare function Eyebrow(handle: Handle<Eyebrow.Props>): () => import("remix/component").RemixElement;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "remix/component/jsx-runtime";
|
|
2
|
+
import { ArrowRightIcon } from "@sdxc/icons";
|
|
3
|
+
import { mergeMix } from "@sdxc/u/general";
|
|
4
|
+
import { eyebrow } from "../styles/landing.js";
|
|
5
|
+
/**
|
|
6
|
+
* Renders the label as a `span`, or as an `a` ending in an arrow when `href` is set.
|
|
7
|
+
*
|
|
8
|
+
* @param handle Runtime handle carrying the label's props.
|
|
9
|
+
* @returns The render function producing the label.
|
|
10
|
+
*/
|
|
11
|
+
export function Eyebrow(handle) {
|
|
12
|
+
return () => {
|
|
13
|
+
let { children, href, index, mix, slot, variant } = handle.props;
|
|
14
|
+
let resolvedSlot = slot ?? "eyebrow";
|
|
15
|
+
let content = (_jsxs(_Fragment, { children: [index !== undefined ? _jsx("span", { "data-slot": "eyebrow-index", children: index }) : null, children, href ? _jsx(ArrowRightIcon, { "aria-hidden": "true", "data-slot": "eyebrow-arrow" }) : null] }));
|
|
16
|
+
if (href) {
|
|
17
|
+
return (_jsx("a", { href: href, "data-slot": resolvedSlot, "data-variant": variant, mix: mergeMix(eyebrow(), mix), children: content }));
|
|
18
|
+
}
|
|
19
|
+
return (_jsx("span", { "data-slot": resolvedSlot, "data-variant": variant, mix: mergeMix(eyebrow(), mix), children: content }));
|
|
20
|
+
};
|
|
21
|
+
}
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -6,21 +6,18 @@
|
|
|
6
6
|
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
7
7
|
* @copyright Sergio Xalambrí 2026
|
|
8
8
|
*/
|
|
9
|
-
export * from "./chart-marker-indices.js";
|
|
10
|
-
export * from "./chart-path.js";
|
|
11
|
-
export * from "./chart-scale.js";
|
|
12
9
|
export * from "./color-math.js";
|
|
13
10
|
export * from "./command-event.js";
|
|
14
11
|
export * from "./css-styles.js";
|
|
15
12
|
export * from "./decorative-icon.js";
|
|
16
13
|
export * from "./disabled-selector.js";
|
|
17
14
|
export * from "./dispatch-change.js";
|
|
15
|
+
export * from "./eyebrow.js";
|
|
18
16
|
export * from "./field-parts.js";
|
|
19
17
|
export * from "./full-turn-radians.js";
|
|
20
18
|
export * from "./geometry.js";
|
|
21
19
|
export * from "./glyph-edges.js";
|
|
22
20
|
export * from "./has-accessible-text.js";
|
|
23
|
-
export * from "./hue-spectrum.js";
|
|
24
21
|
export * from "./is-new-primary-press.js";
|
|
25
22
|
export * from "./key-combo.js";
|
|
26
23
|
export * from "./keyboard-nav.js";
|
|
@@ -33,6 +30,5 @@ export * from "./resolve-field-wiring.js";
|
|
|
33
30
|
export * from "./resolve-fill-percent.js";
|
|
34
31
|
export * from "./round-precision.js";
|
|
35
32
|
export * from "./semantic-color.js";
|
|
36
|
-
export * from "./semantic-color-panel.js";
|
|
37
33
|
export * from "./warn-if-no-accessible-name.js";
|
|
38
34
|
export * from "./write-cookie.js";
|