@sdxc/ui 2026.10.29 → 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 +7 -5
- package/dist/{patterns → landing}/faq-band.js +11 -12
- 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/landing/landing-section.d.ts +110 -0
- 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 +14 -4
- package/dist/{components → landing}/split.js +30 -21
- 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 -4
- 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 -151
- 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.d.ts +0 -81
- package/dist/components/marketing-section.js +0 -103
- package/dist/components/stat-strip.js +0 -64
- 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 -67
- package/dist/patterns/bento.js +0 -95
- 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 -45
- package/dist/patterns/step-list.js +0 -84
- 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,110 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "remix/component/jsx-runtime";
|
|
2
|
+
import { raw, mergeMix } from "@sdxc/u/general";
|
|
3
|
+
import { container, self, vstack } from "@sdxc/u/layout";
|
|
4
|
+
import { at } from "@sdxc/u/responsive";
|
|
5
|
+
import { m, mi } from "@sdxc/u/size";
|
|
6
|
+
import { when } from "@sdxc/u/state";
|
|
7
|
+
import { textAlign } from "@sdxc/u/typography";
|
|
8
|
+
import { Heading } from "../components/heading.js";
|
|
9
|
+
import { landingLead } from "../styles/landing.js";
|
|
10
|
+
import { Eyebrow } from "../utils/eyebrow.js";
|
|
11
|
+
/** Content alignment {@link LandingHeader} applies when `align` is omitted. */
|
|
12
|
+
const DEFAULT_ALIGN = "start";
|
|
13
|
+
/** Eyebrow look {@link LandingHeader} applies when `eyebrowVariant` is omitted. */
|
|
14
|
+
const DEFAULT_EYEBROW_VARIANT = "mono";
|
|
15
|
+
/**
|
|
16
|
+
* Space below the header, before the band's body: 2.5rem on a phone, 4rem wide. A host
|
|
17
|
+
* that lays out its own gap sets `--ui-landing-header-end` on the header instead.
|
|
18
|
+
*/
|
|
19
|
+
const HEADER_SPACE = "var(--ui-landing-header-end, var(--ui-landing-header-space, clamp(2.5rem, 1.82rem + 2.91cqi, 4rem)))";
|
|
20
|
+
/** Container a split header's columns read; the header spans its band's measure. */
|
|
21
|
+
const CONTAINER = "ui-landing-header";
|
|
22
|
+
/** The muted title ink: the heading ink at 62%, which keeps 4.5:1 at display size. */
|
|
23
|
+
const MUTED_TITLE = "color-mix(in oklch, var(--ui-neutral-fg-emphasis) 62%, transparent)";
|
|
24
|
+
/**
|
|
25
|
+
* Renders an optional eyebrow, a chapter-sized {@link Heading} from `children`,
|
|
26
|
+
* and an optional lead paragraph. A mono eyebrow sits 0.5rem above the title and a
|
|
27
|
+
* pill 1.5rem; the lead follows 1rem below; the band's body starts
|
|
28
|
+
* `--ui-landing-header-space` after. The title renders at the enclosing band's
|
|
29
|
+
* heading level: `<h2>` in a band on a bare page.
|
|
30
|
+
*
|
|
31
|
+
* @param handle Runtime handle carrying the host `<header>`'s props.
|
|
32
|
+
* @returns The render function producing the header's markup.
|
|
33
|
+
* @example
|
|
34
|
+
* <LandingHeader eyebrow={t("badge")} description={t("lead")} align="center">
|
|
35
|
+
* {t("title")}
|
|
36
|
+
* </LandingHeader>
|
|
37
|
+
* @example
|
|
38
|
+
* <LandingHeader eyebrow={t("chapter")} eyebrowVariant="numbered" eyebrowIndex="02">
|
|
39
|
+
* {t("title")}
|
|
40
|
+
* </LandingHeader>
|
|
41
|
+
*/
|
|
42
|
+
export function LandingHeader(handle) {
|
|
43
|
+
return () => {
|
|
44
|
+
let { align, children, description, eyebrow, eyebrowHref, eyebrowIndex, eyebrowVariant, action, layout, mix, parts, subtitle, tone, ...rest } = handle.props;
|
|
45
|
+
let isSplit = layout === "split";
|
|
46
|
+
let resolvedAlign = isSplit || action ? "start" : (align ?? DEFAULT_ALIGN);
|
|
47
|
+
let resolvedEyebrowVariant = eyebrowVariant ?? DEFAULT_EYEBROW_VARIANT;
|
|
48
|
+
let isCenter = resolvedAlign === "center";
|
|
49
|
+
let content = (_jsxs("div", { "data-slot": "landing-header-content", mix: [
|
|
50
|
+
vstack({ align: isCenter ? "center" : "stretch", gap: 0 }),
|
|
51
|
+
isSplit ? splitGrid() : [],
|
|
52
|
+
action ? raw({ flex: "1 1 20rem", minInlineSize: "0" }) : [],
|
|
53
|
+
], children: [eyebrow ? (_jsx(Eyebrow, { href: eyebrowHref, variant: resolvedEyebrowVariant, index: resolvedEyebrowVariant === "numbered" ? eyebrowIndex : undefined, mix: [
|
|
54
|
+
self(isCenter ? "center" : "start"),
|
|
55
|
+
raw({ marginBlockEnd: resolvedEyebrowVariant === "mono" ? "0.5rem" : "1.5rem" }),
|
|
56
|
+
isSplit ? raw({ gridArea: "eyebrow" }) : [],
|
|
57
|
+
parts?.eyebrow,
|
|
58
|
+
], children: eyebrow })) : null, _jsxs(Heading, { size: "chapter", mix: [m(0), isSplit ? raw({ gridArea: "title" }) : [], parts?.title], children: [tone === "statement" ? (_jsx("span", { "data-slot": "landing-header-statement", mix: [statement()], children: children })) : (children), subtitle ? (_jsx("span", { "data-slot": "landing-header-subtitle", mix: [raw({ display: "block", color: MUTED_TITLE })], children: subtitle })) : null] }), description ? (_jsx("p", { mix: [
|
|
59
|
+
landingLead(),
|
|
60
|
+
raw({ marginBlockStart: "1rem" }),
|
|
61
|
+
isCenter ? mi("auto") : [],
|
|
62
|
+
isSplit ? splitLead() : [],
|
|
63
|
+
parts?.description,
|
|
64
|
+
], children: description })) : null] }));
|
|
65
|
+
return (_jsxs("header", { ...rest, "data-align": resolvedAlign, "data-layout": isSplit ? "split" : "stack", mix: mergeMix([
|
|
66
|
+
isSplit ? [container(CONTAINER), raw({ inlineSize: "100%" })] : [],
|
|
67
|
+
action
|
|
68
|
+
? raw({
|
|
69
|
+
display: "flex",
|
|
70
|
+
flexWrap: "wrap",
|
|
71
|
+
alignItems: "flex-end",
|
|
72
|
+
justifyContent: "space-between",
|
|
73
|
+
columnGap: "2rem",
|
|
74
|
+
rowGap: "1.5rem",
|
|
75
|
+
})
|
|
76
|
+
: vstack({ align: isCenter ? "center" : "stretch", gap: 0 }),
|
|
77
|
+
isCenter ? [textAlign("center"), mi("auto")] : [],
|
|
78
|
+
raw({ marginBlockEnd: HEADER_SPACE }),
|
|
79
|
+
], mix), children: [content, action ? (_jsx("div", { "data-slot": "landing-header-action", mix: [raw({ flex: "none" })], children: action })) : null] }));
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* The split grid: eyebrow over title in the wider first column and the lead in the second,
|
|
84
|
+
* from the header's `lg` width. Narrower headers keep the stack.
|
|
85
|
+
*/
|
|
86
|
+
function splitGrid() {
|
|
87
|
+
return at("lg", CONTAINER, raw({
|
|
88
|
+
display: "grid",
|
|
89
|
+
gridTemplateColumns: "minmax(0, 1.1fr) minmax(0, 1fr)",
|
|
90
|
+
gridTemplateAreas: '"eyebrow ." "title lead"',
|
|
91
|
+
columnGap: "4rem",
|
|
92
|
+
alignItems: "end",
|
|
93
|
+
}));
|
|
94
|
+
}
|
|
95
|
+
/** The split lead: in the second column, on the title's last line, at most 28rem wide. */
|
|
96
|
+
function splitLead() {
|
|
97
|
+
return at("lg", CONTAINER, raw({
|
|
98
|
+
gridArea: "lead",
|
|
99
|
+
marginBlockStart: "0",
|
|
100
|
+
marginBlockEnd: "0.35em",
|
|
101
|
+
maxInlineSize: "28rem",
|
|
102
|
+
}));
|
|
103
|
+
}
|
|
104
|
+
/** A statement title: muted ink, with its `<strong>` phrase back in the heading ink. */
|
|
105
|
+
function statement() {
|
|
106
|
+
return [
|
|
107
|
+
raw({ color: MUTED_TITLE }),
|
|
108
|
+
when("& :is(strong, b, [data-emphasis])", raw({ color: "var(--ui-neutral-fg-emphasis)", fontWeight: "inherit" })),
|
|
109
|
+
];
|
|
110
|
+
}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Above-the-fold landing band: optional eyebrow, display title, lead, CTA
|
|
3
|
+
* cluster, a note and proof row under the actions, and a media slot. Encodes
|
|
4
|
+
* the hero rhythm so pages supply copy and media without re-deriving spacing.
|
|
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 { HeadingLevel } from "../components/heading-scope.js";
|
|
11
|
+
import type { LandingEyebrowVariant } from "../styles/landing.js";
|
|
12
|
+
import { LandingSection } from "./landing-section.js";
|
|
13
|
+
/**
|
|
14
|
+
* Prop types for {@link LandingHero}.
|
|
15
|
+
*/
|
|
16
|
+
export declare namespace LandingHero {
|
|
17
|
+
/** Whether the copy stack sits at the start edge or centers as one statement. */
|
|
18
|
+
type Align = LandingSection.Align;
|
|
19
|
+
/**
|
|
20
|
+
* Where the media slot sits: under the copy at the full measure (text-led), beside
|
|
21
|
+
* it (product-led, where the media is taller than the copy), or as a faded
|
|
22
|
+
* background behind the statement.
|
|
23
|
+
*/
|
|
24
|
+
type MediaPlacement = "end" | "below" | "background";
|
|
25
|
+
/** Band fill behind the hero. */
|
|
26
|
+
type Tone = LandingSection.Tone;
|
|
27
|
+
/** Eyebrow look; the hero default is the hairline `quiet` pill. */
|
|
28
|
+
type EyebrowVariant = LandingEyebrowVariant;
|
|
29
|
+
/**
|
|
30
|
+
* Per-part styling for the elements the hero renders besides its band.
|
|
31
|
+
*/
|
|
32
|
+
interface PartsProps {
|
|
33
|
+
/** Styling for the optional eyebrow. */
|
|
34
|
+
eyebrow?: TagProps<"span">["mix"];
|
|
35
|
+
/** Styling for the display {@link Heading}. */
|
|
36
|
+
title?: TagProps<"h1">["mix"];
|
|
37
|
+
/** Styling for the lead paragraph. */
|
|
38
|
+
description?: TagProps<"p">["mix"];
|
|
39
|
+
/** Styling for the {@link CtaGroup}. */
|
|
40
|
+
actions?: TagProps<"div">["mix"];
|
|
41
|
+
/** Styling for the media slot host. */
|
|
42
|
+
media?: TagProps<"div">["mix"];
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Props accepted by {@link LandingHero}.
|
|
46
|
+
*/
|
|
47
|
+
interface Props extends Omit<LandingSection.Props, "children" | "align" | "tone" | "title" | "parts" | "level"> {
|
|
48
|
+
/**
|
|
49
|
+
* Heading level of the display title. Defaults to the ambient `HeadingScope`'s
|
|
50
|
+
* level, or `1` on a bare page, so the hero owns the page's only `<h1>`.
|
|
51
|
+
*/
|
|
52
|
+
level?: HeadingLevel;
|
|
53
|
+
/** Copy alignment. Defaults to {@link DEFAULT_ALIGN}. */
|
|
54
|
+
align?: Align;
|
|
55
|
+
/** Band fill. Defaults to {@link DEFAULT_TONE}. */
|
|
56
|
+
tone?: Tone;
|
|
57
|
+
/** Media placement. Defaults to {@link DEFAULT_MEDIA_PLACEMENT}. */
|
|
58
|
+
mediaPlacement?: MediaPlacement;
|
|
59
|
+
/** Short announcement above the title. */
|
|
60
|
+
eyebrow?: RemixNode;
|
|
61
|
+
/** Eyebrow look. Defaults to {@link DEFAULT_EYEBROW_VARIANT}. */
|
|
62
|
+
eyebrowVariant?: EyebrowVariant;
|
|
63
|
+
/** Turns the eyebrow into a link with a trailing arrow that nudges on hover. */
|
|
64
|
+
eyebrowHref?: string;
|
|
65
|
+
/** Display headline; wrap a phrase in `AccentText` to mark it. */
|
|
66
|
+
title: RemixNode;
|
|
67
|
+
/** Lead under the headline; `<strong>` fragments draw in the heading ink. */
|
|
68
|
+
description?: RemixNode;
|
|
69
|
+
/** CTA controls, laid out in a {@link CtaGroup} that stacks on phones. */
|
|
70
|
+
actions?: RemixNode;
|
|
71
|
+
/**
|
|
72
|
+
* A release pin under the actions, such as "v8.1 — released Oct 28", set as mono
|
|
73
|
+
* text on a brand-tinted chip; pass a link to make the pin clickable.
|
|
74
|
+
*/
|
|
75
|
+
release?: RemixNode;
|
|
76
|
+
/**
|
|
77
|
+
* Plays the load entrance: eyebrow, title, lead, actions and the rest rise in turn,
|
|
78
|
+
* and the media settles last. Visitors who ask for reduced motion see the hero at rest.
|
|
79
|
+
*/
|
|
80
|
+
entrance?: boolean;
|
|
81
|
+
/** One line of microcopy 12px under the actions ("No card required"). */
|
|
82
|
+
note?: RemixNode;
|
|
83
|
+
/** Social proof under the actions and note, such as a row of marks. */
|
|
84
|
+
proof?: RemixNode;
|
|
85
|
+
/** Product media: a framed screenshot, a rendered component, a device. */
|
|
86
|
+
media?: RemixNode;
|
|
87
|
+
/**
|
|
88
|
+
* Decoration behind the media — rings or a glow — laid under it and hidden from
|
|
89
|
+
* assistive technology; pair it with `landingSlowSpin()` for motion that stops
|
|
90
|
+
* under reduced motion.
|
|
91
|
+
*/
|
|
92
|
+
backdrop?: RemixNode;
|
|
93
|
+
/** Optional below-fold hook rendered under the main hero stack. */
|
|
94
|
+
below?: RemixNode;
|
|
95
|
+
/** Per-part styling for eyebrow, title, lead, actions, and media. */
|
|
96
|
+
parts?: PartsProps;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Renders the eyebrow, display title, lead, actions, note and proof in the hero
|
|
101
|
+
* rhythm — 24px, 20px, 32px and 12px between them — and places the media below,
|
|
102
|
+
* beside, or behind that copy. The title starts the outline at `level`, and
|
|
103
|
+
* headings in `below` sit one level under it.
|
|
104
|
+
*
|
|
105
|
+
* @param handle Runtime handle carrying the hero band's props.
|
|
106
|
+
* @returns The render function producing the hero's markup.
|
|
107
|
+
* @example
|
|
108
|
+
* <LandingHero
|
|
109
|
+
* eyebrow={t("hero.news")}
|
|
110
|
+
* title={t("hero.title")}
|
|
111
|
+
* description={t("hero.lead")}
|
|
112
|
+
* actions={<Button color="brand">{t("hero.cta")}</Button>}
|
|
113
|
+
* note={t("hero.note")}
|
|
114
|
+
* media={<ProductFrame stage="panel">{shot}</ProductFrame>}
|
|
115
|
+
* />
|
|
116
|
+
* @example
|
|
117
|
+
* <LandingHero mediaPlacement="end" title={t("hero.title")} media={<Device />} />
|
|
118
|
+
*/
|
|
119
|
+
export declare function LandingHero(handle: Handle<LandingHero.Props>): () => import("remix/component").RemixElement;
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "remix/component/jsx-runtime";
|
|
2
|
+
import { fg } from "@sdxc/u/color";
|
|
3
|
+
import { opacity } from "@sdxc/u/effects";
|
|
4
|
+
import { raw, mergeMix } from "@sdxc/u/general";
|
|
5
|
+
import { absolute, inset, relative, self, vstack } from "@sdxc/u/layout";
|
|
6
|
+
import { overflow } from "@sdxc/u/overflow";
|
|
7
|
+
import { when } from "@sdxc/u/state";
|
|
8
|
+
import { pretty, text, textAlign } from "@sdxc/u/typography";
|
|
9
|
+
import { CtaGroup } from "../components/cta-group.js";
|
|
10
|
+
import { HeadingScope, readAmbientLevel } from "../components/heading-scope.js";
|
|
11
|
+
import { Heading } from "../components/heading.js";
|
|
12
|
+
import { landingLead } from "../styles/landing.js";
|
|
13
|
+
import { Eyebrow } from "../utils/eyebrow.js";
|
|
14
|
+
import { entrance } from "./animations/entrance.js";
|
|
15
|
+
import { LandingSection } from "./landing-section.js";
|
|
16
|
+
import { Split } from "./split.js";
|
|
17
|
+
/** Content alignment {@link LandingHero} applies when `align` is omitted. */
|
|
18
|
+
const DEFAULT_ALIGN = "start";
|
|
19
|
+
/** Where media sits relative to the copy when `mediaPlacement` is omitted. */
|
|
20
|
+
const DEFAULT_MEDIA_PLACEMENT = "below";
|
|
21
|
+
/** Band fill {@link LandingHero} applies when `tone` is omitted. */
|
|
22
|
+
const DEFAULT_TONE = "grid";
|
|
23
|
+
/** Eyebrow look {@link LandingHero} applies when `eyebrowVariant` is omitted. */
|
|
24
|
+
const DEFAULT_EYEBROW_VARIANT = "quiet";
|
|
25
|
+
/**
|
|
26
|
+
* Headline size beside media: one step below the full display, since the copy shares
|
|
27
|
+
* the row, from 36px on a phone to 60px wide.
|
|
28
|
+
*/
|
|
29
|
+
const SPLIT_DISPLAY_SIZE = "clamp(2.25rem, 1.5rem + 3cqi, 3.75rem)";
|
|
30
|
+
/** Space between the copy and media placed below it: 3rem on a phone, 4rem wide. */
|
|
31
|
+
const MEDIA_GAP = "clamp(3rem, 2.55rem + 1.94cqi, 4rem)";
|
|
32
|
+
/**
|
|
33
|
+
* Renders the eyebrow, display title, lead, actions, note and proof in the hero
|
|
34
|
+
* rhythm — 24px, 20px, 32px and 12px between them — and places the media below,
|
|
35
|
+
* beside, or behind that copy. The title starts the outline at `level`, and
|
|
36
|
+
* headings in `below` sit one level under it.
|
|
37
|
+
*
|
|
38
|
+
* @param handle Runtime handle carrying the hero band's props.
|
|
39
|
+
* @returns The render function producing the hero's markup.
|
|
40
|
+
* @example
|
|
41
|
+
* <LandingHero
|
|
42
|
+
* eyebrow={t("hero.news")}
|
|
43
|
+
* title={t("hero.title")}
|
|
44
|
+
* description={t("hero.lead")}
|
|
45
|
+
* actions={<Button color="brand">{t("hero.cta")}</Button>}
|
|
46
|
+
* note={t("hero.note")}
|
|
47
|
+
* media={<ProductFrame stage="panel">{shot}</ProductFrame>}
|
|
48
|
+
* />
|
|
49
|
+
* @example
|
|
50
|
+
* <LandingHero mediaPlacement="end" title={t("hero.title")} media={<Device />} />
|
|
51
|
+
*/
|
|
52
|
+
export function LandingHero(handle) {
|
|
53
|
+
return () => {
|
|
54
|
+
let { actions, align, backdrop, below, description, entrance: hasEntrance, eyebrow, eyebrowHref, eyebrowVariant, level, media, mediaPlacement, mix, note, parts, proof, release, spacing, title, tone, ...rest } = handle.props;
|
|
55
|
+
let resolvedAlign = align ?? DEFAULT_ALIGN;
|
|
56
|
+
let resolvedTone = tone ?? DEFAULT_TONE;
|
|
57
|
+
let resolvedPlacement = mediaPlacement ?? DEFAULT_MEDIA_PLACEMENT;
|
|
58
|
+
let resolvedSpacing = spacing ?? "hero";
|
|
59
|
+
let resolvedEyebrowVariant = eyebrowVariant ?? DEFAULT_EYEBROW_VARIANT;
|
|
60
|
+
let resolvedLevel = level ?? readAmbientLevel(handle) ?? 1;
|
|
61
|
+
let belowSlot = below ? _jsx(HeadingScope, { children: below }) : null;
|
|
62
|
+
let hasMedia = media !== undefined;
|
|
63
|
+
let isBackground = resolvedPlacement === "background" && hasMedia;
|
|
64
|
+
let isSplit = resolvedPlacement === "end" && hasMedia;
|
|
65
|
+
let isBelow = resolvedPlacement === "below" && hasMedia;
|
|
66
|
+
let isCenter = resolvedAlign === "center" && !isSplit;
|
|
67
|
+
let enter = (order, kind = "copy") => hasEntrance ? entrance({ order, kind }) : [];
|
|
68
|
+
let copy = (_jsxs("div", { "data-slot": "landing-hero-copy", mix: [
|
|
69
|
+
vstack({ align: isCenter ? "center" : "stretch", gap: 0 }),
|
|
70
|
+
isCenter ? textAlign("center") : [],
|
|
71
|
+
isSplit
|
|
72
|
+
? raw({ "--ui-landing-display-size": SPLIT_DISPLAY_SIZE })
|
|
73
|
+
: raw({ inlineSize: "100%", minInlineSize: "0" }),
|
|
74
|
+
], children: [eyebrow ? (_jsx(Eyebrow, { href: eyebrowHref, variant: resolvedEyebrowVariant, mix: [
|
|
75
|
+
self(isCenter ? "center" : "start"),
|
|
76
|
+
raw({ marginBlockEnd: "1.5rem" }),
|
|
77
|
+
enter(0),
|
|
78
|
+
parts?.eyebrow,
|
|
79
|
+
], children: eyebrow })) : null, _jsx(Heading, { size: "display", mix: [enter(1), parts?.title], children: title }), description ? (_jsx("p", { mix: [
|
|
80
|
+
landingLead("hero"),
|
|
81
|
+
raw({
|
|
82
|
+
marginBlockStart: "1.25rem",
|
|
83
|
+
marginInline: isCenter ? "auto" : "0",
|
|
84
|
+
}),
|
|
85
|
+
enter(2),
|
|
86
|
+
parts?.description,
|
|
87
|
+
], children: description })) : null, actions ? (_jsx(CtaGroup, { stack: "phone", mix: [
|
|
88
|
+
raw({ marginBlockStart: "2rem" }),
|
|
89
|
+
isCenter ? self("center") : [],
|
|
90
|
+
enter(3),
|
|
91
|
+
parts?.actions,
|
|
92
|
+
], children: actions })) : null, release ? (_jsx("p", { "data-slot": "landing-hero-release", mix: [releasePin(), isCenter ? self("center") : self("start"), enter(4)], children: release })) : null, note ? (_jsx("p", { "data-slot": "landing-hero-note", mix: [
|
|
93
|
+
raw({ marginBlockStart: "0.75rem" }),
|
|
94
|
+
text("xs"),
|
|
95
|
+
fg("neutral.muted"),
|
|
96
|
+
pretty(),
|
|
97
|
+
enter(4),
|
|
98
|
+
], children: note })) : null, proof ? (_jsx("div", { "data-slot": "landing-hero-proof", mix: [raw({ marginBlockStart: "2rem" }), isCenter ? self("center") : [], enter(5)], children: proof })) : null] }));
|
|
99
|
+
let backdropSlot = backdrop ? (_jsx("div", { "aria-hidden": "true", "data-slot": "landing-hero-backdrop", mix: [
|
|
100
|
+
absolute(),
|
|
101
|
+
raw({
|
|
102
|
+
inset: "-25%",
|
|
103
|
+
zIndex: "-1",
|
|
104
|
+
pointerEvents: "none",
|
|
105
|
+
display: "grid",
|
|
106
|
+
placeItems: "center",
|
|
107
|
+
}),
|
|
108
|
+
], children: backdrop })) : null;
|
|
109
|
+
let mediaSlot = hasMedia ? (_jsxs("div", { "data-slot": "landing-hero-media", mix: [
|
|
110
|
+
isBackground
|
|
111
|
+
? [
|
|
112
|
+
absolute(),
|
|
113
|
+
inset(0),
|
|
114
|
+
overflow("hidden"),
|
|
115
|
+
opacity(30),
|
|
116
|
+
raw({ pointerEvents: "none", zIndex: "0" }),
|
|
117
|
+
when("& img, & video", [
|
|
118
|
+
raw({
|
|
119
|
+
inlineSize: "100%",
|
|
120
|
+
blockSize: "100%",
|
|
121
|
+
objectFit: "cover",
|
|
122
|
+
}),
|
|
123
|
+
]),
|
|
124
|
+
]
|
|
125
|
+
: [relative(), raw({ isolation: "isolate" })],
|
|
126
|
+
isBelow
|
|
127
|
+
? [
|
|
128
|
+
self("stretch"),
|
|
129
|
+
raw({ inlineSize: "100%", minInlineSize: "0", marginBlockStart: MEDIA_GAP }),
|
|
130
|
+
]
|
|
131
|
+
: [],
|
|
132
|
+
isBackground ? [] : enter(4, "media"),
|
|
133
|
+
parts?.media,
|
|
134
|
+
], children: [isBackground ? null : backdropSlot, media] })) : null;
|
|
135
|
+
let body = (_jsxs("div", { mix: [
|
|
136
|
+
vstack({ align: isCenter ? "center" : "stretch", gap: 0 }),
|
|
137
|
+
raw({ inlineSize: "100%", minInlineSize: "0" }),
|
|
138
|
+
], children: [copy, isBelow ? mediaSlot : null, belowSlot] }));
|
|
139
|
+
if (isBackground) {
|
|
140
|
+
body = (_jsxs("div", { mix: [relative(), vstack({ gap: 8, align: "stretch" })], children: [mediaSlot, _jsx("div", { mix: [relative(), raw({ zIndex: "1" })], children: copy }), belowSlot] }));
|
|
141
|
+
}
|
|
142
|
+
else if (isSplit) {
|
|
143
|
+
body = (_jsxs("div", { mix: [vstack({ gap: 8, align: "stretch" })], children: [_jsxs(Split, { lean: "copy", children: [_jsx(Split.Copy, { children: copy }), _jsx(Split.Media, { children: mediaSlot })] }), belowSlot] }));
|
|
144
|
+
}
|
|
145
|
+
return (_jsx(LandingSection, { ...rest, tone: resolvedTone, spacing: resolvedSpacing, align: isCenter ? "center" : "start", level: resolvedLevel, mix: mergeMix(isBackground ? relative() : [], mix), children: body }));
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* The release pin: mono text on a brand-tinted chip, set apart from the actions above it
|
|
150
|
+
* so a dated version reads as news rather than a third button.
|
|
151
|
+
*/
|
|
152
|
+
function releasePin() {
|
|
153
|
+
return [
|
|
154
|
+
raw({
|
|
155
|
+
display: "inline-flex",
|
|
156
|
+
alignItems: "center",
|
|
157
|
+
gap: "0.5rem",
|
|
158
|
+
marginBlockStart: "1.25rem",
|
|
159
|
+
paddingBlock: "0.3125rem",
|
|
160
|
+
paddingInline: "0.75rem",
|
|
161
|
+
borderRadius: "9999px",
|
|
162
|
+
fontFamily: "var(--ui-font-mono, ui-monospace, monospace)",
|
|
163
|
+
fontSize: "0.75rem",
|
|
164
|
+
lineHeight: "1rem",
|
|
165
|
+
color: "var(--ui-brand-fg)",
|
|
166
|
+
backgroundColor: "var(--ui-brand-bg-tint)",
|
|
167
|
+
boxShadow: "inset 0 0 0 1px var(--ui-brand-border)",
|
|
168
|
+
}),
|
|
169
|
+
when("& a", raw({ color: "inherit", textDecoration: "none" })),
|
|
170
|
+
when("& a:hover", raw({ textDecoration: "underline", textUnderlineOffset: "3px" })),
|
|
171
|
+
];
|
|
172
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A landing-page band: a `<section>` host that applies landing tone, spacing,
|
|
3
|
+
* and content measure so pages share one rhythm. Distinct from the listbox
|
|
4
|
+
* {@link Section}, which groups menu items.
|
|
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 { HeadingLevel } from "../components/heading-scope.js";
|
|
11
|
+
import type { LandingBandTone, LandingSectionSpacing } from "../styles/landing.js";
|
|
12
|
+
/**
|
|
13
|
+
* Prop types for {@link LandingSection}.
|
|
14
|
+
*/
|
|
15
|
+
export declare namespace LandingSection {
|
|
16
|
+
/**
|
|
17
|
+
* What sits behind the band: nothing, a quiet tint, a hairline grid, an
|
|
18
|
+
* inverted solid, the brand solid, or a page-supplied gradient.
|
|
19
|
+
*/
|
|
20
|
+
type Tone = LandingBandTone;
|
|
21
|
+
/**
|
|
22
|
+
* Whether the band floats as a rounded panel inside the page: `true` rounds every
|
|
23
|
+
* corner, `"top"` / `"bottom"` round only that end so two inset bands join.
|
|
24
|
+
*/
|
|
25
|
+
type Inset = boolean | "top" | "bottom";
|
|
26
|
+
/**
|
|
27
|
+
* How much block padding the band leaves around its content.
|
|
28
|
+
*/
|
|
29
|
+
type Spacing = LandingSectionSpacing;
|
|
30
|
+
/**
|
|
31
|
+
* Whether the inner column stretches start-aligned or centers as one
|
|
32
|
+
* statement.
|
|
33
|
+
*/
|
|
34
|
+
type Align = "start" | "center";
|
|
35
|
+
/**
|
|
36
|
+
* Outer chrome: a plain band, or a framed column with dashed rails and
|
|
37
|
+
* corner markers where a top rule meets them.
|
|
38
|
+
*/
|
|
39
|
+
type Variant = "default" | "frame";
|
|
40
|
+
/** Value {@link LandingSection} provides to bands nested inside it. */
|
|
41
|
+
interface Context {
|
|
42
|
+
/** Heading level the enclosing band's title renders at. */
|
|
43
|
+
level: HeadingLevel;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Per-part styling for the elements the band renders besides its host.
|
|
47
|
+
*/
|
|
48
|
+
interface PartsProps {
|
|
49
|
+
/** Styling for the measured content column inside the band. */
|
|
50
|
+
container?: TagProps<"div">["mix"];
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Props accepted by {@link LandingSection}.
|
|
54
|
+
*/
|
|
55
|
+
interface Props extends TagProps<"section"> {
|
|
56
|
+
/** Band fill. Defaults to {@link DEFAULT_TONE}. */
|
|
57
|
+
tone?: Tone;
|
|
58
|
+
/** Block padding step. Defaults to {@link DEFAULT_SPACING}. */
|
|
59
|
+
spacing?: Spacing;
|
|
60
|
+
/** Content alignment. Defaults to {@link DEFAULT_ALIGN}. */
|
|
61
|
+
align?: Align;
|
|
62
|
+
/**
|
|
63
|
+
* Draws a low-contrast 1px rule along the block-start edge so stacked
|
|
64
|
+
* bands separate cleanly.
|
|
65
|
+
*/
|
|
66
|
+
ruled?: boolean;
|
|
67
|
+
/** Outer chrome. Defaults to {@link DEFAULT_VARIANT}. */
|
|
68
|
+
variant?: Variant;
|
|
69
|
+
/**
|
|
70
|
+
* Paints the band as a panel 0.5rem in from the page edges with
|
|
71
|
+
* `--ui-landing-band-radius` (2rem) corners and an inset hairline, so a tone
|
|
72
|
+
* reads as an object on the page rather than a full-bleed stripe.
|
|
73
|
+
*/
|
|
74
|
+
inset?: Inset;
|
|
75
|
+
/**
|
|
76
|
+
* Zeroes block padding on a framed column so a flush strip (stats) keeps
|
|
77
|
+
* full-height rails without the section gap. Ignored when `variant` is
|
|
78
|
+
* not `"frame"`.
|
|
79
|
+
*/
|
|
80
|
+
flush?: boolean;
|
|
81
|
+
/**
|
|
82
|
+
* Heading level of the band's title, and of every heading placed directly in it.
|
|
83
|
+
* Defaults to one below the enclosing band, else one below the ambient
|
|
84
|
+
* `HeadingScope`, so bands on a bare page render `<h2>` under the hero's `<h1>`.
|
|
85
|
+
*/
|
|
86
|
+
level?: HeadingLevel;
|
|
87
|
+
/** Per-part styling for the measured inner column. */
|
|
88
|
+
parts?: PartsProps;
|
|
89
|
+
/** Band content — headers, splits, feature grids, and so on. */
|
|
90
|
+
children: RemixNode;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Renders a landing band: tone on the `<section>`, a named container for
|
|
95
|
+
* descendant queries, and a measured inner column. When `variant="frame"`,
|
|
96
|
+
* block padding lives on that column with the dashed rails so the rails run
|
|
97
|
+
* the full band height instead of stopping at the content box.
|
|
98
|
+
*
|
|
99
|
+
* @param handle Runtime handle carrying the host `<section>`'s props.
|
|
100
|
+
* @returns The render function producing the band's markup.
|
|
101
|
+
* @example
|
|
102
|
+
* <LandingSection tone="tinted" spacing="normal" ruled>
|
|
103
|
+
* {children}
|
|
104
|
+
* </LandingSection>
|
|
105
|
+
* @example
|
|
106
|
+
* <LandingSection tone="grid" spacing="hero" align="center" variant="frame">
|
|
107
|
+
* {children}
|
|
108
|
+
* </LandingSection>
|
|
109
|
+
*/
|
|
110
|
+
export declare function LandingSection(handle: Handle<LandingSection.Props, LandingSection.Context>): () => import("remix/component").RemixElement;
|