@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,183 @@
|
|
|
1
|
+
import { jsx as _jsx } from "remix/component/jsx-runtime";
|
|
2
|
+
import { borderEdge } from "@sdxc/u/color";
|
|
3
|
+
import { raw, mergeMix } from "@sdxc/u/general";
|
|
4
|
+
import { container, relative, vstack } from "@sdxc/u/layout";
|
|
5
|
+
import { at } from "@sdxc/u/responsive";
|
|
6
|
+
import { is, maxIs, mi, pi } from "@sdxc/u/size";
|
|
7
|
+
import { after, before } from "@sdxc/u/state";
|
|
8
|
+
import { textAlign } from "@sdxc/u/typography";
|
|
9
|
+
import { HeadingScope, readAmbientLevel } from "../components/heading-scope.js";
|
|
10
|
+
import { landingBandTone, landingContainer, landingHairline, landingSectionSpace, } from "../styles/landing.js";
|
|
11
|
+
/**
|
|
12
|
+
* Width of an inset panel: the page less its 0.5rem margins, capped at the content measure
|
|
13
|
+
* plus 4rem a side, so the panel frames the column every other band aligns to.
|
|
14
|
+
*/
|
|
15
|
+
const INSET_INLINE_SIZE = "min(100% - 1rem, var(--ui-landing-measure, 72rem) + 8rem)";
|
|
16
|
+
/** Band fill {@link LandingSection} applies when `tone` is omitted. */
|
|
17
|
+
const DEFAULT_TONE = "plain";
|
|
18
|
+
/** Block padding {@link LandingSection} applies when `spacing` is omitted. */
|
|
19
|
+
const DEFAULT_SPACING = "normal";
|
|
20
|
+
/** Content alignment {@link LandingSection} applies when `align` is omitted. */
|
|
21
|
+
const DEFAULT_ALIGN = "start";
|
|
22
|
+
/** Chrome {@link LandingSection} applies when `variant` is omitted. */
|
|
23
|
+
const DEFAULT_VARIANT = "default";
|
|
24
|
+
/**
|
|
25
|
+
* Renders a landing band: tone on the `<section>`, a named container for
|
|
26
|
+
* descendant queries, and a measured inner column. When `variant="frame"`,
|
|
27
|
+
* block padding lives on that column with the dashed rails so the rails run
|
|
28
|
+
* the full band height instead of stopping at the content box.
|
|
29
|
+
*
|
|
30
|
+
* @param handle Runtime handle carrying the host `<section>`'s props.
|
|
31
|
+
* @returns The render function producing the band's markup.
|
|
32
|
+
* @example
|
|
33
|
+
* <LandingSection tone="tinted" spacing="normal" ruled>
|
|
34
|
+
* {children}
|
|
35
|
+
* </LandingSection>
|
|
36
|
+
* @example
|
|
37
|
+
* <LandingSection tone="grid" spacing="hero" align="center" variant="frame">
|
|
38
|
+
* {children}
|
|
39
|
+
* </LandingSection>
|
|
40
|
+
*/
|
|
41
|
+
export function LandingSection(handle) {
|
|
42
|
+
return () => {
|
|
43
|
+
let { align, children, flush, inset, level, mix, parts, ruled, spacing, tone, variant, ...rest } = handle.props;
|
|
44
|
+
let resolvedLevel = level ?? resolveBandLevel(handle);
|
|
45
|
+
let resolvedTone = tone ?? DEFAULT_TONE;
|
|
46
|
+
let resolvedSpacing = spacing ?? DEFAULT_SPACING;
|
|
47
|
+
let resolvedAlign = align ?? DEFAULT_ALIGN;
|
|
48
|
+
let resolvedVariant = variant ?? DEFAULT_VARIANT;
|
|
49
|
+
let isCenter = resolvedAlign === "center";
|
|
50
|
+
let isFrame = resolvedVariant === "frame";
|
|
51
|
+
let isFlushFrame = isFrame && Boolean(flush);
|
|
52
|
+
handle.context.set({ level: resolvedLevel });
|
|
53
|
+
return (_jsx("section", { ...rest, "data-tone": resolvedTone, "data-spacing": resolvedSpacing, "data-align": resolvedAlign, "data-variant": resolvedVariant, "data-flush": isFlushFrame ? "true" : undefined, "data-inset": inset ? String(inset) : undefined, mix: mergeMix([
|
|
54
|
+
container("ui-landing-section"),
|
|
55
|
+
relative(),
|
|
56
|
+
vstack({ align: "center" }),
|
|
57
|
+
is(inset ? INSET_INLINE_SIZE : "100%"),
|
|
58
|
+
raw({ isolation: "isolate", overflowX: "clip" }),
|
|
59
|
+
landingBandTone(resolvedTone),
|
|
60
|
+
inset ? insetPanel(inset) : [],
|
|
61
|
+
/**
|
|
62
|
+
* Framed bands keep block padding on the measured column so the
|
|
63
|
+
* dashed rails share that box and run the full band height.
|
|
64
|
+
*/
|
|
65
|
+
isFrame ? [] : landingSectionSpace(resolvedSpacing),
|
|
66
|
+
ruled ? landingHairline() : [],
|
|
67
|
+
], mix), children: _jsx(HeadingScope, { level: resolvedLevel, children: _jsx("div", { mix: [
|
|
68
|
+
isFrame
|
|
69
|
+
? [
|
|
70
|
+
maxIs("var(--ui-landing-measure, 72rem)"),
|
|
71
|
+
mi("auto"),
|
|
72
|
+
is("100%"),
|
|
73
|
+
/**
|
|
74
|
+
* Match the pre-migration framed band: quiet gutters that
|
|
75
|
+
* open to 3rem above `lg`, so copy clears the rails.
|
|
76
|
+
*/
|
|
77
|
+
pi(5),
|
|
78
|
+
isFlushFrame ? [] : landingSectionSpace(resolvedSpacing),
|
|
79
|
+
at("lg", "ui-landing-section", [
|
|
80
|
+
pi(12),
|
|
81
|
+
borderEdge("inline-start", {
|
|
82
|
+
color: "neutral",
|
|
83
|
+
width: 1,
|
|
84
|
+
style: "dashed",
|
|
85
|
+
}),
|
|
86
|
+
borderEdge("inline-end", {
|
|
87
|
+
color: "neutral",
|
|
88
|
+
width: 1,
|
|
89
|
+
style: "dashed",
|
|
90
|
+
}),
|
|
91
|
+
ruled
|
|
92
|
+
? [
|
|
93
|
+
before(frameMarker({ insetInlineStart: "-4px" })),
|
|
94
|
+
after(frameMarker({ insetInlineEnd: "-4px" })),
|
|
95
|
+
]
|
|
96
|
+
: [],
|
|
97
|
+
]),
|
|
98
|
+
]
|
|
99
|
+
: measuredColumn(Boolean(inset)),
|
|
100
|
+
vstack({
|
|
101
|
+
align: isCenter ? "center" : "stretch",
|
|
102
|
+
gap: 0,
|
|
103
|
+
}),
|
|
104
|
+
relative(),
|
|
105
|
+
is("100%"),
|
|
106
|
+
isCenter ? textAlign("center") : [],
|
|
107
|
+
parts?.container,
|
|
108
|
+
], children: children }) }) }));
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* One level below the enclosing band, else one below the ambient scope, else `2`: the
|
|
113
|
+
* page's `<h1>` belongs to its hero, so a band composed on a bare page is a chapter of it.
|
|
114
|
+
*/
|
|
115
|
+
function resolveBandLevel(handle) {
|
|
116
|
+
let enclosing = readEnclosingBand(handle);
|
|
117
|
+
let parent = enclosing ?? readAmbientLevel(handle) ?? 1;
|
|
118
|
+
return Math.min(parent + 1, 6);
|
|
119
|
+
}
|
|
120
|
+
/** Level of the nearest enclosing band's title, or `undefined` outside any band. */
|
|
121
|
+
function readEnclosingBand(handle) {
|
|
122
|
+
try {
|
|
123
|
+
return handle.context.get(LandingSection)?.level;
|
|
124
|
+
}
|
|
125
|
+
catch {
|
|
126
|
+
return undefined;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
/** The measured column of a band that is not framed: inset panels pull in their gutter. */
|
|
130
|
+
function measuredColumn(inset) {
|
|
131
|
+
return inset ? insetContainer() : landingContainer();
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* The measured column inside an inset panel: each gutter step, its breakpoint and the
|
|
135
|
+
* measure less the panel's 0.5rem margin a side, so the band's text shares the edges of
|
|
136
|
+
* the bands around it at every width.
|
|
137
|
+
*/
|
|
138
|
+
function insetContainer() {
|
|
139
|
+
return raw({
|
|
140
|
+
maxInlineSize: "calc(var(--ui-landing-measure, 72rem) - 1rem)",
|
|
141
|
+
marginInline: "auto",
|
|
142
|
+
paddingInline: "calc(var(--ui-landing-gutter, 1rem) - 0.5rem)",
|
|
143
|
+
"@container (min-width: 35rem)": { paddingInline: "1rem" },
|
|
144
|
+
"@container (min-width: 47rem)": { paddingInline: "1.5rem" },
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* The "+" drawn where a framed band's top rule crosses a rail, so the rails read as a
|
|
149
|
+
* frame the rule is fixed to; two 1px gradients in the hairline ink keep it quiet.
|
|
150
|
+
*/
|
|
151
|
+
function frameMarker(edge) {
|
|
152
|
+
return raw({
|
|
153
|
+
content: '""',
|
|
154
|
+
position: "absolute",
|
|
155
|
+
insetBlockStart: "-4px",
|
|
156
|
+
...edge,
|
|
157
|
+
inlineSize: "9px",
|
|
158
|
+
blockSize: "9px",
|
|
159
|
+
backgroundImage: "linear-gradient(var(--ui-neutral-fg-muted), var(--ui-neutral-fg-muted)), linear-gradient(var(--ui-neutral-fg-muted), var(--ui-neutral-fg-muted))",
|
|
160
|
+
backgroundSize: "1px 100%, 100% 1px",
|
|
161
|
+
backgroundPosition: "center",
|
|
162
|
+
backgroundRepeat: "no-repeat",
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* The rounded panel an inset band paints: centred inside the page's 0.5rem margins, the
|
|
167
|
+
* band radius on the ends it rounds, and an inset hairline that keeps a light tone's
|
|
168
|
+
* edge visible against the page.
|
|
169
|
+
*/
|
|
170
|
+
function insetPanel(inset) {
|
|
171
|
+
let radius = "var(--ui-landing-band-radius, 2rem)";
|
|
172
|
+
let top = inset === "bottom" ? "0" : radius;
|
|
173
|
+
let bottom = inset === "top" ? "0" : radius;
|
|
174
|
+
return raw({
|
|
175
|
+
marginInline: "auto",
|
|
176
|
+
marginBlockStart: inset === "bottom" ? "0" : "0.5rem",
|
|
177
|
+
borderStartStartRadius: top,
|
|
178
|
+
borderStartEndRadius: top,
|
|
179
|
+
borderEndStartRadius: bottom,
|
|
180
|
+
borderEndEndRadius: bottom,
|
|
181
|
+
boxShadow: "inset 0 0 0 1px var(--ui-landing-hairline)",
|
|
182
|
+
});
|
|
183
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Adopter marks for landing proof strips: a centered row, a row spread across the
|
|
3
|
+
* measure, or a ruled grid of cells. Each mark is sized to the landing logo height
|
|
4
|
+
* in full ink, so a visitor recognizes it; dimming is one mechanism on the cloud.
|
|
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
|
+
/**
|
|
11
|
+
* Prop types for {@link LogoCloud}.
|
|
12
|
+
*/
|
|
13
|
+
export declare namespace LogoCloud {
|
|
14
|
+
/**
|
|
15
|
+
* How the marks sit: a centered wrapping `row`; a `spread` row edge to edge across
|
|
16
|
+
* the measure from the `lg` container (centered wrap below); a `grid` of 4rem cells
|
|
17
|
+
* ruled between them; `ruled`, the same grid closed by an outer frame; `tiles`, each
|
|
18
|
+
* mark on its own tinted 3:2 tile; or a `marquee` that scrolls them past.
|
|
19
|
+
*/
|
|
20
|
+
type Layout = "row" | "spread" | "grid" | "ruled" | "tiles" | "marquee";
|
|
21
|
+
/**
|
|
22
|
+
* Props accepted by {@link LogoCloud}.
|
|
23
|
+
*/
|
|
24
|
+
interface Props extends TagProps<"div"> {
|
|
25
|
+
/** Arrangement. Defaults to {@link DEFAULT_LAYOUT}. */
|
|
26
|
+
layout?: Layout;
|
|
27
|
+
/** A line above the marks, such as "Trusted by teams at". */
|
|
28
|
+
label?: RemixNode;
|
|
29
|
+
/**
|
|
30
|
+
* Draws inline-SVG marks in the body ink and turns image marks grayscale, so a
|
|
31
|
+
* row of brand colors reads as one band; marks never lose opacity.
|
|
32
|
+
*/
|
|
33
|
+
muted?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Consumer-supplied marks — `<img>` or inline SVG children. The cloud sizes each
|
|
36
|
+
* direct child; an SVG draws with `currentColor`, and a `--logo-scale` style on a
|
|
37
|
+
* mark (default 1) lets a square glyph stand taller than a wordmark.
|
|
38
|
+
*/
|
|
39
|
+
children: RemixNode;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Lays logo children out by `layout`, sizes each direct child to the logo height, and
|
|
44
|
+
* draws an optional label above them.
|
|
45
|
+
*
|
|
46
|
+
* @param handle Runtime handle carrying the host `<div>`'s props.
|
|
47
|
+
* @returns The render function producing the cloud's markup.
|
|
48
|
+
* @example
|
|
49
|
+
* <LogoCloud layout="spread" label={t("proof.label")}>
|
|
50
|
+
* <img src={acme} alt="Acme" />
|
|
51
|
+
* <img src={globex} alt="Globex" />
|
|
52
|
+
* </LogoCloud>
|
|
53
|
+
* @example
|
|
54
|
+
* <LogoCloud layout="grid" muted>{marks}</LogoCloud>
|
|
55
|
+
*/
|
|
56
|
+
export declare function LogoCloud(handle: Handle<LogoCloud.Props>): () => import("remix/component").RemixElement;
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "remix/component/jsx-runtime";
|
|
2
|
+
import { fg } from "@sdxc/u/color";
|
|
3
|
+
import { combine, raw, var as varUtility, mergeMix } from "@sdxc/u/general";
|
|
4
|
+
import { container, vstack } from "@sdxc/u/layout";
|
|
5
|
+
import { at } from "@sdxc/u/responsive";
|
|
6
|
+
import { when } from "@sdxc/u/state";
|
|
7
|
+
import { text, weight } from "@sdxc/u/typography";
|
|
8
|
+
import { Marquee } from "./marquee.js";
|
|
9
|
+
import { balancedGrid } from "./styles/card-grid.js";
|
|
10
|
+
/** Height of each mark below the `lg` container. */
|
|
11
|
+
const LOGO_HEIGHT = varUtility("ui-landing-logo-height", "1.75rem");
|
|
12
|
+
/** Height of each mark from the `lg` container up. */
|
|
13
|
+
const LOGO_HEIGHT_LG = varUtility("ui-landing-logo-height-lg", "2.25rem");
|
|
14
|
+
/** Container name the cloud's layout steps query. */
|
|
15
|
+
const CONTAINER = "ui-landing-logo-cloud";
|
|
16
|
+
/** Fill behind each mark in the `tiles` layout: the heading ink at 3% over the page. */
|
|
17
|
+
const TILE = "var(--ui-landing-logo-tile, color-mix(in oklch, var(--ui-neutral-fg-emphasis) 4%, var(--ui-bg)))";
|
|
18
|
+
/** Hairline that rules the grid layout's cells. */
|
|
19
|
+
const HAIRLINE = "var(--ui-landing-hairline)";
|
|
20
|
+
/** Each grid cell's own rules on its inline-end and block-end edges; the grid clips them at its outer edge. */
|
|
21
|
+
const CELL_RULES = `1px 0 0 ${HAIRLINE}, 0 1px 0 ${HAIRLINE}`;
|
|
22
|
+
/**
|
|
23
|
+
* The most cells a grid row holds at each width of the cloud, so each cell keeps
|
|
24
|
+
* at least 10rem; the grid then evens the rows for the mark count.
|
|
25
|
+
*/
|
|
26
|
+
const GRID_STEPS = [
|
|
27
|
+
{ query: "(width < 30rem)", columns: 2 },
|
|
28
|
+
{ query: "(30rem <= width < 40rem)", columns: 3 },
|
|
29
|
+
{ query: "(40rem <= width < 60rem)", columns: 4 },
|
|
30
|
+
{ query: "(width >= 60rem)", columns: 6 },
|
|
31
|
+
];
|
|
32
|
+
/** Layouts that set the marks in grid cells rather than a flowing row. */
|
|
33
|
+
const GRID_LAYOUTS = new Set(["grid", "ruled", "tiles"]);
|
|
34
|
+
/** A mark's height scaled by its own `--logo-scale`, so one mark can stand taller than its neighbours. */
|
|
35
|
+
function scaled(height) {
|
|
36
|
+
return `calc(${height} * var(--logo-scale, 1))`;
|
|
37
|
+
}
|
|
38
|
+
/** Arrangement {@link LogoCloud} applies when `layout` is omitted. */
|
|
39
|
+
const DEFAULT_LAYOUT = "row";
|
|
40
|
+
/**
|
|
41
|
+
* Lays logo children out by `layout`, sizes each direct child to the logo height, and
|
|
42
|
+
* draws an optional label above them.
|
|
43
|
+
*
|
|
44
|
+
* @param handle Runtime handle carrying the host `<div>`'s props.
|
|
45
|
+
* @returns The render function producing the cloud's markup.
|
|
46
|
+
* @example
|
|
47
|
+
* <LogoCloud layout="spread" label={t("proof.label")}>
|
|
48
|
+
* <img src={acme} alt="Acme" />
|
|
49
|
+
* <img src={globex} alt="Globex" />
|
|
50
|
+
* </LogoCloud>
|
|
51
|
+
* @example
|
|
52
|
+
* <LogoCloud layout="grid" muted>{marks}</LogoCloud>
|
|
53
|
+
*/
|
|
54
|
+
export function LogoCloud(handle) {
|
|
55
|
+
return () => {
|
|
56
|
+
let { children, label, layout, mix, muted, ...rest } = handle.props;
|
|
57
|
+
let resolvedLayout = layout ?? DEFAULT_LAYOUT;
|
|
58
|
+
let isGrid = GRID_LAYOUTS.has(resolvedLayout);
|
|
59
|
+
return (_jsxs("div", { ...rest, "data-layout": resolvedLayout, "data-muted": muted ? "true" : undefined, "data-slot": "logo-cloud", mix: mergeMix([
|
|
60
|
+
container(CONTAINER),
|
|
61
|
+
vstack({ gap: 0, align: isGrid ? "stretch" : "center" }),
|
|
62
|
+
raw({ inlineSize: "100%" }),
|
|
63
|
+
], mix), children: [label ? (_jsx("p", { "data-slot": "logo-cloud-label", mix: [
|
|
64
|
+
text("base"),
|
|
65
|
+
weight("medium"),
|
|
66
|
+
fg("neutral.emphasis"),
|
|
67
|
+
raw({ marginBlockEnd: isGrid ? "1.5rem" : "2.5rem", textAlign: "center" }),
|
|
68
|
+
], children: label })) : null, resolvedLayout === "marquee" ? (_jsx(Marquee, { "data-slot": "logo-cloud-marks", mix: [
|
|
69
|
+
raw({ color: ink(Boolean(muted)) }),
|
|
70
|
+
markSize(Boolean(muted), '& [data-slot="marquee-group"] > *'),
|
|
71
|
+
], children: children })) : (_jsx("div", { "data-slot": "logo-cloud-marks", mix: [marks(resolvedLayout, Boolean(muted))], children: children }))] }));
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* The marks row in one rule, so a layout's sizing, ruling and dimming never compete with
|
|
76
|
+
* another class over the same property: a wrapping flex row whose leftovers centre, or a
|
|
77
|
+
* grid whose children become 4rem cells ruled by 1px shadows clipped at its outer edge.
|
|
78
|
+
*/
|
|
79
|
+
function marks(layout, muted) {
|
|
80
|
+
if (layout === "tiles") {
|
|
81
|
+
return combine([
|
|
82
|
+
raw({ display: "grid", gap: "0.5rem", color: ink(muted) }),
|
|
83
|
+
when("& > *", raw({
|
|
84
|
+
boxSizing: "border-box",
|
|
85
|
+
justifySelf: "stretch",
|
|
86
|
+
aspectRatio: "3 / 2",
|
|
87
|
+
inlineSize: "100%",
|
|
88
|
+
blockSize: "auto",
|
|
89
|
+
minInlineSize: "0",
|
|
90
|
+
paddingBlock: `calc((100% * 2 / 3 - ${scaled(LOGO_HEIGHT)}) / 2)`,
|
|
91
|
+
paddingInline: "1rem",
|
|
92
|
+
objectFit: "contain",
|
|
93
|
+
color: "currentColor",
|
|
94
|
+
borderRadius: "var(--ui-landing-tile-radius, 0.5rem)",
|
|
95
|
+
backgroundColor: TILE,
|
|
96
|
+
filter: muted ? "grayscale(1)" : "none",
|
|
97
|
+
})),
|
|
98
|
+
balancedGrid(CONTAINER, GRID_STEPS),
|
|
99
|
+
]);
|
|
100
|
+
}
|
|
101
|
+
if (layout === "grid" || layout === "ruled") {
|
|
102
|
+
return combine([
|
|
103
|
+
raw({
|
|
104
|
+
display: "grid",
|
|
105
|
+
clipPath: "inset(0)",
|
|
106
|
+
color: ink(muted),
|
|
107
|
+
boxShadow: layout === "ruled" ? `inset 0 0 0 1px ${HAIRLINE}` : "none",
|
|
108
|
+
}),
|
|
109
|
+
when("& > *", raw({
|
|
110
|
+
boxSizing: "border-box",
|
|
111
|
+
justifySelf: "stretch",
|
|
112
|
+
blockSize: `calc(${scaled(LOGO_HEIGHT)} + 2.25rem)`,
|
|
113
|
+
inlineSize: "100%",
|
|
114
|
+
minInlineSize: "0",
|
|
115
|
+
padding: "1.125rem 1rem",
|
|
116
|
+
objectFit: "contain",
|
|
117
|
+
color: "currentColor",
|
|
118
|
+
boxShadow: CELL_RULES,
|
|
119
|
+
filter: muted ? "grayscale(1)" : "none",
|
|
120
|
+
})),
|
|
121
|
+
balancedGrid(CONTAINER, GRID_STEPS, raw({ boxShadow: `${CELL_RULES}, -1px 0 0 ${HAIRLINE}` })),
|
|
122
|
+
]);
|
|
123
|
+
}
|
|
124
|
+
return combine([
|
|
125
|
+
raw({
|
|
126
|
+
display: "flex",
|
|
127
|
+
flexWrap: "wrap",
|
|
128
|
+
alignItems: "center",
|
|
129
|
+
justifyContent: "center",
|
|
130
|
+
columnGap: "2.5rem",
|
|
131
|
+
rowGap: "1.5rem",
|
|
132
|
+
inlineSize: "100%",
|
|
133
|
+
color: ink(muted),
|
|
134
|
+
}),
|
|
135
|
+
markSize(muted, "& > *"),
|
|
136
|
+
layout === "spread"
|
|
137
|
+
? at("lg", CONTAINER, [
|
|
138
|
+
raw({ justifyContent: "space-between", columnGap: "2rem", flexWrap: "nowrap" }),
|
|
139
|
+
when("& > *", raw({ minInlineSize: "0" })),
|
|
140
|
+
])
|
|
141
|
+
: [],
|
|
142
|
+
]);
|
|
143
|
+
}
|
|
144
|
+
/** The ink marks draw in: the body ink when muted, the heading ink otherwise. */
|
|
145
|
+
function ink(muted) {
|
|
146
|
+
return muted ? "var(--ui-neutral-fg)" : "var(--ui-neutral-fg-emphasis)";
|
|
147
|
+
}
|
|
148
|
+
/** Sizes the marks `selector` names to the logo height, a step taller from the `lg` container. */
|
|
149
|
+
function markSize(muted, selector) {
|
|
150
|
+
return combine([
|
|
151
|
+
when(selector, raw({
|
|
152
|
+
blockSize: scaled(LOGO_HEIGHT),
|
|
153
|
+
inlineSize: "auto",
|
|
154
|
+
objectFit: "contain",
|
|
155
|
+
color: "currentColor",
|
|
156
|
+
filter: muted ? "grayscale(1)" : "none",
|
|
157
|
+
})),
|
|
158
|
+
at("lg", CONTAINER, when(selector, raw({ blockSize: scaled(LOGO_HEIGHT_LG) }))),
|
|
159
|
+
]);
|
|
160
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Social proof as a sentence: customer marks set inline in a large, muted line of prose,
|
|
3
|
+
* such as "Trusted by [Acme], [Globex] and 2,000 teams". A short logo list reads as a
|
|
4
|
+
* claim this way, and takes one or two lines on a phone instead of a grid of rows.
|
|
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
|
+
/**
|
|
11
|
+
* Prop types for {@link LogoSentence}.
|
|
12
|
+
*/
|
|
13
|
+
export declare namespace LogoSentence {
|
|
14
|
+
/**
|
|
15
|
+
* Props accepted by {@link LogoSentence}.
|
|
16
|
+
*/
|
|
17
|
+
interface Props extends TagProps<"p"> {
|
|
18
|
+
/**
|
|
19
|
+
* Text with `<img>` or inline-SVG marks between the words. Each mark sits on the
|
|
20
|
+
* text's baseline at 0.8em (times its `--logo-scale`) in the heading ink. Keep a
|
|
21
|
+
* mark and its trailing comma in one `nowrap` span so a line never opens on it.
|
|
22
|
+
*/
|
|
23
|
+
children: RemixNode;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Sets its children as one centered, balanced line of prose: 1.25rem on a phone and
|
|
28
|
+
* 1.75rem from the `lg` container, weight 500 in the muted ink, with each mark scaled
|
|
29
|
+
* to the type so the line keeps an even rhythm.
|
|
30
|
+
*
|
|
31
|
+
* @param handle Runtime handle carrying the host `<p>`'s props.
|
|
32
|
+
* @returns The render function producing the sentence's markup.
|
|
33
|
+
* @example
|
|
34
|
+
* <LogoSentence>
|
|
35
|
+
* Trusted by <img src={acme} alt="Acme" />, <img src={globex} alt="Globex" /> and 2,000 teams.
|
|
36
|
+
* </LogoSentence>
|
|
37
|
+
*/
|
|
38
|
+
export declare function LogoSentence(handle: Handle<LogoSentence.Props>): () => import("remix/component").RemixElement;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { jsx as _jsx } from "remix/component/jsx-runtime";
|
|
2
|
+
import { combine, raw, mergeMix } from "@sdxc/u/general";
|
|
3
|
+
import { container } from "@sdxc/u/layout";
|
|
4
|
+
import { at } from "@sdxc/u/responsive";
|
|
5
|
+
import { when } from "@sdxc/u/state";
|
|
6
|
+
/** Container the sentence's type step reads. */
|
|
7
|
+
const CONTAINER = "ui-logo-sentence";
|
|
8
|
+
/**
|
|
9
|
+
* Sets its children as one centered, balanced line of prose: 1.25rem on a phone and
|
|
10
|
+
* 1.75rem from the `lg` container, weight 500 in the muted ink, with each mark scaled
|
|
11
|
+
* to the type so the line keeps an even rhythm.
|
|
12
|
+
*
|
|
13
|
+
* @param handle Runtime handle carrying the host `<p>`'s props.
|
|
14
|
+
* @returns The render function producing the sentence's markup.
|
|
15
|
+
* @example
|
|
16
|
+
* <LogoSentence>
|
|
17
|
+
* Trusted by <img src={acme} alt="Acme" />, <img src={globex} alt="Globex" /> and 2,000 teams.
|
|
18
|
+
* </LogoSentence>
|
|
19
|
+
*/
|
|
20
|
+
export function LogoSentence(handle) {
|
|
21
|
+
return () => {
|
|
22
|
+
let { children, mix, ...rest } = handle.props;
|
|
23
|
+
return (_jsx("div", { mix: [container(CONTAINER), raw({ inlineSize: "100%" })], children: _jsx("p", { ...rest, "data-slot": "logo-sentence", mix: mergeMix(sentence(), mix), children: children }) }));
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
/** The sentence's type and the inline sizing of its marks. */
|
|
27
|
+
function sentence() {
|
|
28
|
+
return combine([
|
|
29
|
+
raw({
|
|
30
|
+
maxInlineSize: "44rem",
|
|
31
|
+
marginInline: "auto",
|
|
32
|
+
marginBlock: "0",
|
|
33
|
+
fontSize: "1.25rem",
|
|
34
|
+
lineHeight: "1.6",
|
|
35
|
+
fontWeight: "500",
|
|
36
|
+
letterSpacing: "-0.01em",
|
|
37
|
+
textAlign: "center",
|
|
38
|
+
textWrap: "balance",
|
|
39
|
+
color: "var(--ui-neutral-fg-muted)",
|
|
40
|
+
}),
|
|
41
|
+
at("lg", CONTAINER, raw({ fontSize: "1.75rem" })),
|
|
42
|
+
when("& :is(img, svg)", raw({
|
|
43
|
+
display: "inline",
|
|
44
|
+
blockSize: "calc(0.8em * var(--logo-scale, 1))",
|
|
45
|
+
inlineSize: "auto",
|
|
46
|
+
verticalAlign: "-0.1em",
|
|
47
|
+
marginInline: "0.1em",
|
|
48
|
+
color: "var(--ui-neutral-fg-emphasis)",
|
|
49
|
+
})),
|
|
50
|
+
]);
|
|
51
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An endless horizontal ticker for logo walls and short proof lines: the items scroll
|
|
3
|
+
* past under edge-fade masks, stop on hover, focus or a pause toggle, and sit still in a
|
|
4
|
+
* centered wrapping row for visitors who ask for reduced motion.
|
|
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
|
+
/**
|
|
11
|
+
* Prop types for {@link Marquee}.
|
|
12
|
+
*/
|
|
13
|
+
export declare namespace Marquee {
|
|
14
|
+
/**
|
|
15
|
+
* Props accepted by {@link Marquee}.
|
|
16
|
+
*/
|
|
17
|
+
interface Props extends TagProps<"div"> {
|
|
18
|
+
/** Seconds one pass of the items takes. Defaults to {@link DEFAULT_DURATION}. */
|
|
19
|
+
duration?: number;
|
|
20
|
+
/** Space between items, any CSS length. Defaults to {@link DEFAULT_GAP}. */
|
|
21
|
+
gap?: string;
|
|
22
|
+
/** Accessible name of the pause toggle. Defaults to "Pause the scrolling logos". */
|
|
23
|
+
pauseLabel?: string;
|
|
24
|
+
/**
|
|
25
|
+
* The items, each a direct child: logos, short quotes, badges. Image and SVG items
|
|
26
|
+
* take the landing logo height. They render twice; the copy is `aria-hidden` and `inert`.
|
|
27
|
+
*/
|
|
28
|
+
children: RemixNode;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Renders the items twice on one track and scrolls it by exactly one copy, so the loop
|
|
33
|
+
* has no visible seam. Reduced motion drops the copy, the masks and the toggle, leaving a
|
|
34
|
+
* centered row that wraps.
|
|
35
|
+
*
|
|
36
|
+
* @param handle Runtime handle carrying the host `<div>`'s props.
|
|
37
|
+
* @returns The render function producing the marquee's markup.
|
|
38
|
+
* @example
|
|
39
|
+
* <Marquee aria-label={t("proof.label")}>
|
|
40
|
+
* <img src={acme} alt="Acme" />
|
|
41
|
+
* <img src={globex} alt="Globex" />
|
|
42
|
+
* </Marquee>
|
|
43
|
+
*/
|
|
44
|
+
export declare function Marquee(handle: Handle<Marquee.Props>): () => import("remix/component").RemixElement;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "remix/component/jsx-runtime";
|
|
2
|
+
import { keyframes } from "@sdxc/u/animation";
|
|
3
|
+
import { combine, raw, mergeMix } from "@sdxc/u/general";
|
|
4
|
+
import { motionSafe } from "@sdxc/u/responsive";
|
|
5
|
+
import { when } from "@sdxc/u/state";
|
|
6
|
+
import { PauseToggle, pausedWhenChecked } from "./utils/pause-toggle.js";
|
|
7
|
+
/** Seconds one full pass takes when `duration` is omitted; slow enough to read a mark. */
|
|
8
|
+
const DEFAULT_DURATION = 40;
|
|
9
|
+
/** Space between items, and after the last one so the seam matches. */
|
|
10
|
+
const DEFAULT_GAP = "3rem";
|
|
11
|
+
/** Keyframes moving the track one copy of the items to the inline start. */
|
|
12
|
+
const SCROLL_KEYFRAMES = "ui-marquee-scroll";
|
|
13
|
+
/** Keyframes for right-to-left pages, moving the track the other way. */
|
|
14
|
+
const SCROLL_RTL_KEYFRAMES = "ui-marquee-scroll-rtl";
|
|
15
|
+
/** Width of each edge fade. */
|
|
16
|
+
const FADE = "5rem";
|
|
17
|
+
/**
|
|
18
|
+
* Renders the items twice on one track and scrolls it by exactly one copy, so the loop
|
|
19
|
+
* has no visible seam. Reduced motion drops the copy, the masks and the toggle, leaving a
|
|
20
|
+
* centered row that wraps.
|
|
21
|
+
*
|
|
22
|
+
* @param handle Runtime handle carrying the host `<div>`'s props.
|
|
23
|
+
* @returns The render function producing the marquee's markup.
|
|
24
|
+
* @example
|
|
25
|
+
* <Marquee aria-label={t("proof.label")}>
|
|
26
|
+
* <img src={acme} alt="Acme" />
|
|
27
|
+
* <img src={globex} alt="Globex" />
|
|
28
|
+
* </Marquee>
|
|
29
|
+
*/
|
|
30
|
+
export function Marquee(handle) {
|
|
31
|
+
return () => {
|
|
32
|
+
let { children, duration, gap, mix, pauseLabel, ...rest } = handle.props;
|
|
33
|
+
let seconds = duration ?? DEFAULT_DURATION;
|
|
34
|
+
let space = gap ?? DEFAULT_GAP;
|
|
35
|
+
return (_jsxs("div", { ...rest, "data-slot": "marquee", mix: mergeMix([
|
|
36
|
+
raw({ display: "flex", alignItems: "center", gap: "1rem", inlineSize: "100%" }),
|
|
37
|
+
pausedWhenChecked('[data-slot="marquee-viewport"]'),
|
|
38
|
+
], mix), children: [_jsx("div", { "data-slot": "marquee-viewport", mix: [viewport()], children: _jsxs("div", { "data-slot": "marquee-track", mix: [track(seconds)], children: [_jsx("div", { "data-slot": "marquee-group", mix: [group(space)], children: children }), _jsx("div", { "data-slot": "marquee-group", "aria-hidden": "true", inert: true, mix: [group(space), copy()], children: children })] }) }), _jsx(PauseToggle, { label: pauseLabel ?? "Pause the scrolling logos" })] }));
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
/** The clipping window, faded at both inline edges while the track moves. */
|
|
42
|
+
function viewport() {
|
|
43
|
+
let mask = `linear-gradient(to right, transparent, #000 ${FADE}, #000 calc(100% - ${FADE}), transparent)`;
|
|
44
|
+
return combine([
|
|
45
|
+
raw({ flex: "1 1 auto", minInlineSize: "0", overflow: "hidden" }),
|
|
46
|
+
motionSafe(raw({ maskImage: mask, WebkitMaskImage: mask })),
|
|
47
|
+
]);
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* The moving track: two copies side by side, translated by half its width per pass. On a
|
|
51
|
+
* right-to-left page the copies lay out mirrored, so the track moves the other way.
|
|
52
|
+
*/
|
|
53
|
+
function track(seconds) {
|
|
54
|
+
let motion = (name) => raw({
|
|
55
|
+
flexWrap: "nowrap",
|
|
56
|
+
justifyContent: "flex-start",
|
|
57
|
+
inlineSize: "max-content",
|
|
58
|
+
animationName: name,
|
|
59
|
+
animationDuration: `${seconds}s`,
|
|
60
|
+
animationTimingFunction: "linear",
|
|
61
|
+
animationIterationCount: "infinite",
|
|
62
|
+
});
|
|
63
|
+
return combine([
|
|
64
|
+
keyframes(SCROLL_KEYFRAMES, { from: { translate: "0 0" }, to: { translate: "-50% 0" } }),
|
|
65
|
+
keyframes(SCROLL_RTL_KEYFRAMES, { from: { translate: "0 0" }, to: { translate: "50% 0" } }),
|
|
66
|
+
raw({ display: "flex", flexWrap: "wrap", justifyContent: "center" }),
|
|
67
|
+
motionSafe(motion(SCROLL_KEYFRAMES)),
|
|
68
|
+
when("&:dir(rtl)", motionSafe(raw({ animationName: SCROLL_RTL_KEYFRAMES }))),
|
|
69
|
+
]);
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* One copy of the items. Its trailing padding equals the gap, so half the track is exactly
|
|
73
|
+
* one copy plus one gap and the seam spaces like every other pair.
|
|
74
|
+
*/
|
|
75
|
+
function group(space) {
|
|
76
|
+
return combine([
|
|
77
|
+
raw({
|
|
78
|
+
display: "flex",
|
|
79
|
+
flexWrap: "wrap",
|
|
80
|
+
alignItems: "center",
|
|
81
|
+
justifyContent: "center",
|
|
82
|
+
columnGap: space,
|
|
83
|
+
rowGap: "1.5rem",
|
|
84
|
+
}),
|
|
85
|
+
when("& > *", raw({ flexShrink: "0" })),
|
|
86
|
+
when("& > :is(img, svg)", raw({
|
|
87
|
+
blockSize: "var(--ui-landing-logo-height, 1.75rem)",
|
|
88
|
+
inlineSize: "auto",
|
|
89
|
+
objectFit: "contain",
|
|
90
|
+
})),
|
|
91
|
+
motionSafe(raw({ flexWrap: "nowrap", paddingInlineEnd: space })),
|
|
92
|
+
]);
|
|
93
|
+
}
|
|
94
|
+
/** The seam copy, shown only while the track moves. */
|
|
95
|
+
function copy() {
|
|
96
|
+
return combine([raw({ display: "none" }), motionSafe(raw({ display: "flex" }))]);
|
|
97
|
+
}
|