@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,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A single emphasized phrase inside a landing headline — brand color, a swash, a
|
|
3
|
+
* marker band, a fading sheen, or a word set in a pill or a tinted chip — so the
|
|
4
|
+
* surrounding display heading stays one weight and size.
|
|
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 AccentText}.
|
|
12
|
+
*/
|
|
13
|
+
export declare namespace AccentText {
|
|
14
|
+
/**
|
|
15
|
+
* How the phrase is stressed: brand color, brand color over a hand-drawn swash, a
|
|
16
|
+
* marker band behind the glyphs, a `sheen` fading the ink toward the end, an
|
|
17
|
+
* outlined uppercase `pill` at half size, or a tinted `chip` led by a dot.
|
|
18
|
+
*/
|
|
19
|
+
type Variant = "color" | "swash" | "highlight" | "sheen" | "pill" | "chip";
|
|
20
|
+
/**
|
|
21
|
+
* Props accepted by {@link AccentText}.
|
|
22
|
+
*/
|
|
23
|
+
interface Props extends TagProps<"span"> {
|
|
24
|
+
/**
|
|
25
|
+
* Treatment for the phrase. `swash` keeps the phrase on one line so the
|
|
26
|
+
* stroke spans it. Defaults to {@link DEFAULT_VARIANT}.
|
|
27
|
+
*/
|
|
28
|
+
variant?: Variant;
|
|
29
|
+
/** The emphasized phrase. */
|
|
30
|
+
children: RemixNode;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Stresses one phrase of a display heading while the heading keeps one weight; the
|
|
35
|
+
* swash, marker and chip dot are decorative, and the sheen falls back to solid ink
|
|
36
|
+
* under forced colors.
|
|
37
|
+
*
|
|
38
|
+
* @param handle Runtime handle carrying the host `<span>`'s props.
|
|
39
|
+
* @returns The render function producing the accent span.
|
|
40
|
+
* @example
|
|
41
|
+
* <Heading size="display">Ship <AccentText>{t("hero.accent")}</AccentText> faster</Heading>
|
|
42
|
+
* @example
|
|
43
|
+
* <Heading size="display">Know <AccentText variant="swash">{t("hero.accent")}</AccentText></Heading>
|
|
44
|
+
* @example
|
|
45
|
+
* <Heading size="display">The <AccentText variant="pill">{t("hero.tag")}</AccentText> gateway</Heading>
|
|
46
|
+
*/
|
|
47
|
+
export declare function AccentText(handle: Handle<AccentText.Props>): () => import("remix/component").RemixElement;
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "remix/component/jsx-runtime";
|
|
2
|
+
import { raw, mergeMix } from "@sdxc/u/general";
|
|
3
|
+
import { forcedColors } from "@sdxc/u/responsive";
|
|
4
|
+
import { before } from "@sdxc/u/state";
|
|
5
|
+
/** Treatment {@link AccentText} applies when `variant` is omitted. */
|
|
6
|
+
const DEFAULT_VARIANT = "color";
|
|
7
|
+
/** Brush stroke drawn under a swash phrase; stretched to the phrase's width. */
|
|
8
|
+
const SWASH_PATH = "M3.2 17.4C46 8.6 98 5.2 152 5.6c50 .4 98 4 143.6 10.6 1.7.3 2.5 2.1 1.3 3.1-.9.7-2.3.8-3.5.6C246 13.6 198.8 10.9 151.6 10.8 97.4 10.6 49.6 13.6 5.8 21.6c-1.7.3-3.3-.6-3.6-2.1-.1-.8.4-1.6 1-2.1Z";
|
|
9
|
+
/** Ink of the stressed phrase; a page that accents in another hue sets `--ui-landing-accent-color`. */
|
|
10
|
+
const ACCENT = "var(--ui-landing-accent-color, var(--ui-brand-fg))";
|
|
11
|
+
/** Brand at 18%, the marker ink a highlight band lays behind the glyphs. */
|
|
12
|
+
const MARKER = "color-mix(in oklch, var(--ui-brand-bg-solid) 18%, transparent)";
|
|
13
|
+
/** Per-variant styles for the treatments that only restyle the span itself. */
|
|
14
|
+
const SPAN_VARIANTS = {
|
|
15
|
+
sheen: {
|
|
16
|
+
backgroundImage: "linear-gradient(to right bottom, currentColor 30%, color-mix(in oklch, currentColor 50%, transparent))",
|
|
17
|
+
backgroundClip: "text",
|
|
18
|
+
WebkitBackgroundClip: "text",
|
|
19
|
+
WebkitTextFillColor: "transparent",
|
|
20
|
+
boxDecorationBreak: "clone",
|
|
21
|
+
WebkitBoxDecorationBreak: "clone",
|
|
22
|
+
},
|
|
23
|
+
pill: {
|
|
24
|
+
display: "inline-block",
|
|
25
|
+
fontSize: "0.5em",
|
|
26
|
+
lineHeight: "1.2",
|
|
27
|
+
letterSpacing: "0.04em",
|
|
28
|
+
textTransform: "uppercase",
|
|
29
|
+
whiteSpace: "nowrap",
|
|
30
|
+
verticalAlign: "0.35em",
|
|
31
|
+
paddingBlock: "0.05em",
|
|
32
|
+
paddingInline: "0.35em",
|
|
33
|
+
border: "0.08em solid currentColor",
|
|
34
|
+
borderRadius: "9999px",
|
|
35
|
+
},
|
|
36
|
+
chip: {
|
|
37
|
+
display: "inline-flex",
|
|
38
|
+
alignItems: "center",
|
|
39
|
+
gap: "0.2em",
|
|
40
|
+
whiteSpace: "nowrap",
|
|
41
|
+
paddingInline: "0.25em",
|
|
42
|
+
borderRadius: "0.25em",
|
|
43
|
+
color: ACCENT,
|
|
44
|
+
backgroundColor: "color-mix(in oklch, var(--ui-brand-bg-solid) 12%, transparent)",
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Stresses one phrase of a display heading while the heading keeps one weight; the
|
|
49
|
+
* swash, marker and chip dot are decorative, and the sheen falls back to solid ink
|
|
50
|
+
* under forced colors.
|
|
51
|
+
*
|
|
52
|
+
* @param handle Runtime handle carrying the host `<span>`'s props.
|
|
53
|
+
* @returns The render function producing the accent span.
|
|
54
|
+
* @example
|
|
55
|
+
* <Heading size="display">Ship <AccentText>{t("hero.accent")}</AccentText> faster</Heading>
|
|
56
|
+
* @example
|
|
57
|
+
* <Heading size="display">Know <AccentText variant="swash">{t("hero.accent")}</AccentText></Heading>
|
|
58
|
+
* @example
|
|
59
|
+
* <Heading size="display">The <AccentText variant="pill">{t("hero.tag")}</AccentText> gateway</Heading>
|
|
60
|
+
*/
|
|
61
|
+
export function AccentText(handle) {
|
|
62
|
+
return () => {
|
|
63
|
+
let { children, mix, variant, ...rest } = handle.props;
|
|
64
|
+
let resolvedVariant = variant ?? DEFAULT_VARIANT;
|
|
65
|
+
if (resolvedVariant === "swash") {
|
|
66
|
+
return (_jsxs("span", { ...rest, "data-slot": "accent-text", "data-variant": "swash", mix: mergeMix(raw({ color: ACCENT, position: "relative", whiteSpace: "nowrap" }), mix), children: [_jsx("svg", { "aria-hidden": "true", viewBox: "0 0 300 24", preserveAspectRatio: "none", mix: [
|
|
67
|
+
raw({
|
|
68
|
+
position: "absolute",
|
|
69
|
+
insetInlineStart: "0",
|
|
70
|
+
insetBlockStart: "66%",
|
|
71
|
+
inlineSize: "100%",
|
|
72
|
+
blockSize: "0.58em",
|
|
73
|
+
fill: "color-mix(in oklch, var(--ui-brand-bg-solid) 45%, transparent)",
|
|
74
|
+
pointerEvents: "none",
|
|
75
|
+
}),
|
|
76
|
+
], children: _jsx("path", { d: SWASH_PATH }) }), _jsx("span", { mix: [raw({ position: "relative" })], children: children })] }));
|
|
77
|
+
}
|
|
78
|
+
let spanVariant = SPAN_VARIANTS[resolvedVariant];
|
|
79
|
+
if (spanVariant) {
|
|
80
|
+
return (_jsx("span", { ...rest, "data-slot": "accent-text", "data-variant": resolvedVariant, mix: mergeMix([
|
|
81
|
+
raw(spanVariant),
|
|
82
|
+
resolvedVariant === "chip"
|
|
83
|
+
? before(raw({
|
|
84
|
+
content: '""',
|
|
85
|
+
inlineSize: "0.3em",
|
|
86
|
+
blockSize: "0.3em",
|
|
87
|
+
flexShrink: "0",
|
|
88
|
+
borderRadius: "9999px",
|
|
89
|
+
backgroundColor: "currentColor",
|
|
90
|
+
}))
|
|
91
|
+
: [],
|
|
92
|
+
resolvedVariant === "sheen"
|
|
93
|
+
? forcedColors(raw({ backgroundImage: "none", WebkitTextFillColor: "currentColor" }))
|
|
94
|
+
: [],
|
|
95
|
+
], mix), children: children }));
|
|
96
|
+
}
|
|
97
|
+
if (resolvedVariant === "highlight") {
|
|
98
|
+
return (_jsx("span", { ...rest, "data-slot": "accent-text", "data-variant": "highlight", mix: mergeMix(raw({
|
|
99
|
+
backgroundImage: `linear-gradient(transparent 60%, ${MARKER} 60%)`,
|
|
100
|
+
paddingInline: "0.06em",
|
|
101
|
+
boxDecorationBreak: "clone",
|
|
102
|
+
WebkitBoxDecorationBreak: "clone",
|
|
103
|
+
}), mix), children: children }));
|
|
104
|
+
}
|
|
105
|
+
return (_jsx("span", { ...rest, "data-slot": "accent-text", "data-variant": "color", mix: mergeMix(raw({ color: ACCENT }), mix), children: children }));
|
|
106
|
+
};
|
|
107
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The page-load entrance for a landing hero: each part fades and rises 8px in turn, and
|
|
3
|
+
* the product media settles from 98% a beat later. It runs only when the visitor allows
|
|
4
|
+
* motion, so a reduced-motion visitor sees the finished hero on first paint.
|
|
5
|
+
*
|
|
6
|
+
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
7
|
+
* @copyright Sergio Xalambrí 2026
|
|
8
|
+
*/
|
|
9
|
+
import type { ElementProps, MixinDescriptor } from "remix/component";
|
|
10
|
+
import type { CSSStyles } from "../../utils/css-styles.js";
|
|
11
|
+
/**
|
|
12
|
+
* Options accepted by {@link entrance}.
|
|
13
|
+
*/
|
|
14
|
+
export declare namespace Entrance {
|
|
15
|
+
/**
|
|
16
|
+
* Which part of the hero enters: `copy` rises, `media` settles in scale.
|
|
17
|
+
*/
|
|
18
|
+
type Kind = "copy" | "media";
|
|
19
|
+
/**
|
|
20
|
+
* Options accepted by {@link entrance}.
|
|
21
|
+
*/
|
|
22
|
+
interface Options {
|
|
23
|
+
/** Position in the sequence, from 0; each step starts 70ms after the previous. */
|
|
24
|
+
order?: number;
|
|
25
|
+
/** What enters. Defaults to `"copy"`. */
|
|
26
|
+
kind?: Kind;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Plays the hero entrance on its host once, on load: 600ms on a decelerating curve,
|
|
31
|
+
* delayed by `order` steps. Hosts keep their final state, so nothing flashes afterwards.
|
|
32
|
+
*
|
|
33
|
+
* @param options The host's place in the sequence and what kind of part it is.
|
|
34
|
+
* @returns A `css()` mixin ready for a hero part's `mix` prop.
|
|
35
|
+
* @example
|
|
36
|
+
* <h1 mix={[entrance({ order: 1 })]}>{t("hero.title")}</h1>
|
|
37
|
+
* @example
|
|
38
|
+
* <ProductFrame mix={[entrance({ order: 4, kind: "media" })]}>{shot}</ProductFrame>
|
|
39
|
+
*/
|
|
40
|
+
export declare function entrance<Node extends Element = Element>(options?: Entrance.Options): MixinDescriptor<Node, [styles: CSSStyles], ElementProps>;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The page-load entrance for a landing hero: each part fades and rises 8px in turn, and
|
|
3
|
+
* the product media settles from 98% a beat later. It runs only when the visitor allows
|
|
4
|
+
* motion, so a reduced-motion visitor sees the finished hero on first paint.
|
|
5
|
+
*
|
|
6
|
+
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
7
|
+
* @copyright Sergio Xalambrí 2026
|
|
8
|
+
*/
|
|
9
|
+
import { keyframes } from "@sdxc/u/animation";
|
|
10
|
+
import { combine, raw } from "@sdxc/u/general";
|
|
11
|
+
import { motionSafe } from "@sdxc/u/responsive";
|
|
12
|
+
/** Keyframes for copy: eyebrow, title, lead and actions. */
|
|
13
|
+
const RISE_KEYFRAMES = "ui-entrance-rise";
|
|
14
|
+
/** Keyframes for media: a screenshot, a stage, a device. */
|
|
15
|
+
const SETTLE_KEYFRAMES = "ui-entrance-settle";
|
|
16
|
+
/** Milliseconds between one part's start and the next. */
|
|
17
|
+
const STAGGER_MS = 70;
|
|
18
|
+
/** Extra delay media waits, so it lands after the copy it illustrates. */
|
|
19
|
+
const MEDIA_DELAY_MS = 200;
|
|
20
|
+
/**
|
|
21
|
+
* Plays the hero entrance on its host once, on load: 600ms on a decelerating curve,
|
|
22
|
+
* delayed by `order` steps. Hosts keep their final state, so nothing flashes afterwards.
|
|
23
|
+
*
|
|
24
|
+
* @param options The host's place in the sequence and what kind of part it is.
|
|
25
|
+
* @returns A `css()` mixin ready for a hero part's `mix` prop.
|
|
26
|
+
* @example
|
|
27
|
+
* <h1 mix={[entrance({ order: 1 })]}>{t("hero.title")}</h1>
|
|
28
|
+
* @example
|
|
29
|
+
* <ProductFrame mix={[entrance({ order: 4, kind: "media" })]}>{shot}</ProductFrame>
|
|
30
|
+
*/
|
|
31
|
+
export function entrance(options = {}) {
|
|
32
|
+
let order = options.order ?? 0;
|
|
33
|
+
let isMedia = options.kind === "media";
|
|
34
|
+
let delay = order * STAGGER_MS + (isMedia ? MEDIA_DELAY_MS : 0);
|
|
35
|
+
return combine([
|
|
36
|
+
keyframes(RISE_KEYFRAMES, {
|
|
37
|
+
from: { opacity: "0", translate: "0 8px" },
|
|
38
|
+
to: { opacity: "1", translate: "0 0" },
|
|
39
|
+
}),
|
|
40
|
+
keyframes(SETTLE_KEYFRAMES, {
|
|
41
|
+
from: { opacity: "0", scale: "0.98" },
|
|
42
|
+
to: { opacity: "1", scale: "1" },
|
|
43
|
+
}),
|
|
44
|
+
motionSafe(raw({
|
|
45
|
+
animationName: isMedia ? SETTLE_KEYFRAMES : RISE_KEYFRAMES,
|
|
46
|
+
animationDuration: "600ms",
|
|
47
|
+
animationTimingFunction: "cubic-bezier(.2,.7,.2,1)",
|
|
48
|
+
animationDelay: `${delay}ms`,
|
|
49
|
+
animationFillMode: "both",
|
|
50
|
+
})),
|
|
51
|
+
]);
|
|
52
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A short announcement above a hero — "new release", "we raised" — drawn with the
|
|
3
|
+
* same eyebrow looks a band header uses, so a page's labels share one vocabulary.
|
|
4
|
+
* Given an `href` it becomes a link whose trailing arrow nudges on hover.
|
|
5
|
+
*
|
|
6
|
+
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
7
|
+
* @copyright Sergio Xalambrí 2026
|
|
8
|
+
*/
|
|
9
|
+
import type { Handle, Props as TagProps, RemixNode } from "remix/component";
|
|
10
|
+
import type { LandingEyebrowVariant } from "../styles/landing.js";
|
|
11
|
+
/**
|
|
12
|
+
* Prop types for {@link AnnouncementChip}.
|
|
13
|
+
*/
|
|
14
|
+
export declare namespace AnnouncementChip {
|
|
15
|
+
/**
|
|
16
|
+
* How the chip reads: one of the eyebrow looks (the hairline `quiet` pill by
|
|
17
|
+
* default), or `special`, a dual-tone brand edge for the loudest callout.
|
|
18
|
+
*/
|
|
19
|
+
type Variant = LandingEyebrowVariant | "special";
|
|
20
|
+
/**
|
|
21
|
+
* Props accepted by {@link AnnouncementChip}.
|
|
22
|
+
*/
|
|
23
|
+
interface Props {
|
|
24
|
+
/** Extra styling, applied after the chip look. */
|
|
25
|
+
mix?: TagProps<"span">["mix"];
|
|
26
|
+
/** Look. Defaults to {@link DEFAULT_VARIANT}. */
|
|
27
|
+
variant?: Variant;
|
|
28
|
+
/** Turns the chip into a link with a trailing arrow. */
|
|
29
|
+
href?: string;
|
|
30
|
+
/** Announcement label — always supplied by the page. */
|
|
31
|
+
children: RemixNode;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Renders the announcement as a `span`, or an `a` with a trailing arrow when `href` is
|
|
36
|
+
* set, styled by the shared eyebrow looks.
|
|
37
|
+
*
|
|
38
|
+
* @param handle Runtime handle carrying the host's props.
|
|
39
|
+
* @returns The render function producing the chip's markup.
|
|
40
|
+
* @example
|
|
41
|
+
* <AnnouncementChip href="/blog/v2">{t("hero.announcement")}</AnnouncementChip>
|
|
42
|
+
* @example
|
|
43
|
+
* <AnnouncementChip variant="special">{t("hero.launch")}</AnnouncementChip>
|
|
44
|
+
*/
|
|
45
|
+
export declare function AnnouncementChip(handle: Handle<AnnouncementChip.Props>): () => import("remix/component").RemixElement;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { jsx as _jsx } from "remix/component/jsx-runtime";
|
|
2
|
+
import { raw, mergeMix } from "@sdxc/u/general";
|
|
3
|
+
import { Eyebrow } from "../utils/eyebrow.js";
|
|
4
|
+
/** Look {@link AnnouncementChip} applies when `variant` is omitted. */
|
|
5
|
+
const DEFAULT_VARIANT = "quiet";
|
|
6
|
+
/** Dual-tone brand edge the `special` chip draws, louder than every eyebrow look. */
|
|
7
|
+
const SPECIAL_STYLES = {
|
|
8
|
+
border: "1px solid transparent",
|
|
9
|
+
color: "var(--ui-brand-fg)",
|
|
10
|
+
backgroundImage: "linear-gradient(var(--ui-brand-bg-tint), var(--ui-brand-bg-tint)), linear-gradient(120deg, var(--ui-brand-bg-solid), color-mix(in oklab, var(--ui-brand-bg-solid) 40%, Canvas))",
|
|
11
|
+
backgroundOrigin: "border-box",
|
|
12
|
+
backgroundClip: "padding-box, border-box",
|
|
13
|
+
borderRadius: "1rem",
|
|
14
|
+
paddingBlock: "0.375rem",
|
|
15
|
+
paddingInline: "0.875rem",
|
|
16
|
+
lineHeight: "1rem",
|
|
17
|
+
fontWeight: "600",
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Renders the announcement as a `span`, or an `a` with a trailing arrow when `href` is
|
|
21
|
+
* set, styled by the shared eyebrow looks.
|
|
22
|
+
*
|
|
23
|
+
* @param handle Runtime handle carrying the host's props.
|
|
24
|
+
* @returns The render function producing the chip's markup.
|
|
25
|
+
* @example
|
|
26
|
+
* <AnnouncementChip href="/blog/v2">{t("hero.announcement")}</AnnouncementChip>
|
|
27
|
+
* @example
|
|
28
|
+
* <AnnouncementChip variant="special">{t("hero.launch")}</AnnouncementChip>
|
|
29
|
+
*/
|
|
30
|
+
export function AnnouncementChip(handle) {
|
|
31
|
+
return () => {
|
|
32
|
+
let { children, href, mix, variant } = handle.props;
|
|
33
|
+
let resolvedVariant = variant ?? DEFAULT_VARIANT;
|
|
34
|
+
return (_jsx(Eyebrow, { href: href, slot: "announcement-chip", variant: resolvedVariant, mix: mergeMix(resolvedVariant === "special" ? raw(SPECIAL_STYLES) : [], mix), children: children }));
|
|
35
|
+
};
|
|
36
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The about-the-author band: a 3:4 portrait beside a chapter statement, bio, credentials,
|
|
3
|
+
* byline with signature and social links, and an optional intro-video card, so a visitor
|
|
4
|
+
* meets the real person behind a course, book or library before deciding to buy.
|
|
5
|
+
*
|
|
6
|
+
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
7
|
+
* @copyright Sergio Xalambrí 2026
|
|
8
|
+
*/
|
|
9
|
+
import type { Handle, RemixNode } from "remix/component";
|
|
10
|
+
import { LandingSection } from "./landing-section.js";
|
|
11
|
+
/**
|
|
12
|
+
* Prop types for {@link AuthorBand}.
|
|
13
|
+
*/
|
|
14
|
+
export declare namespace AuthorBand {
|
|
15
|
+
/** One social profile link in the byline. */
|
|
16
|
+
interface SocialLink {
|
|
17
|
+
/** The profile URL. */
|
|
18
|
+
href: string;
|
|
19
|
+
/** The network's name, such as "GitHub"; it is the link's accessible name. */
|
|
20
|
+
label: string;
|
|
21
|
+
/** The network's glyph, drawn in `currentColor` at 1.25rem. */
|
|
22
|
+
icon: RemixNode;
|
|
23
|
+
}
|
|
24
|
+
/** The intro video the band links to. */
|
|
25
|
+
interface Video {
|
|
26
|
+
/** A still from the video: an `<img>` or inline SVG, cropped to 16:9. */
|
|
27
|
+
thumbnail: RemixNode;
|
|
28
|
+
/** The video's title, overlaid on the still and repeated in the caption. */
|
|
29
|
+
title: string;
|
|
30
|
+
/** The runtime as a reader expects it, such as "2:13". */
|
|
31
|
+
duration: string;
|
|
32
|
+
/** Where the video plays. */
|
|
33
|
+
href: string;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Props accepted by {@link AuthorBand}.
|
|
37
|
+
*/
|
|
38
|
+
interface Props extends Omit<LandingSection.Props, "children" | "title" | "align"> {
|
|
39
|
+
/** The author's photo or illustration: an `<img>` or inline SVG, cropped to 3:4. */
|
|
40
|
+
portrait: RemixNode;
|
|
41
|
+
/** A short label above the title, such as "About the author". */
|
|
42
|
+
eyebrow?: RemixNode;
|
|
43
|
+
/** The band's statement, rendered at chapter display size through the ambient heading depth. */
|
|
44
|
+
title: RemixNode;
|
|
45
|
+
/** The bio; `<strong>` fragments draw in the heading ink. */
|
|
46
|
+
description?: RemixNode;
|
|
47
|
+
/** The author's name in the byline. */
|
|
48
|
+
name: RemixNode;
|
|
49
|
+
/** The author's role or credential line, such as "Type designer, Lisbon". */
|
|
50
|
+
jobTitle?: RemixNode;
|
|
51
|
+
/** Proof points under the bio, usually a `CheckList`. */
|
|
52
|
+
credentials?: RemixNode;
|
|
53
|
+
/** Profile links shown as icon buttons in the byline. */
|
|
54
|
+
social?: readonly SocialLink[];
|
|
55
|
+
/** A handwritten signature as inline SVG drawn in `currentColor`, set above the name. */
|
|
56
|
+
signature?: RemixNode;
|
|
57
|
+
/** An intro video card under the byline. */
|
|
58
|
+
video?: Video;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Renders the portrait and the copy column: one column on a phone with the portrait capped
|
|
63
|
+
* at 20rem, then a 5/7 split from the `lg` container with both columns starting at the
|
|
64
|
+
* same top edge.
|
|
65
|
+
*
|
|
66
|
+
* @param handle Runtime handle carrying the band's props.
|
|
67
|
+
* @returns The render function producing the band's markup.
|
|
68
|
+
* @example
|
|
69
|
+
* <AuthorBand
|
|
70
|
+
* portrait={<img src={portrait} alt="Odile Varga at her drafting table" />}
|
|
71
|
+
* eyebrow={t("author.eyebrow")}
|
|
72
|
+
* title={t("author.title")}
|
|
73
|
+
* description={t("author.bio")}
|
|
74
|
+
* name="Odile Varga"
|
|
75
|
+
* jobTitle={t("author.role")}
|
|
76
|
+
* />
|
|
77
|
+
*/
|
|
78
|
+
export declare function AuthorBand(handle: Handle<AuthorBand.Props>): () => import("remix/component").RemixElement;
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "remix/component/jsx-runtime";
|
|
2
|
+
import { PlayIcon } from "@sdxc/icons";
|
|
3
|
+
import { fg } from "@sdxc/u/color";
|
|
4
|
+
import { combine, raw } from "@sdxc/u/general";
|
|
5
|
+
import { container, vstack } from "@sdxc/u/layout";
|
|
6
|
+
import { at, motionSafe } from "@sdxc/u/responsive";
|
|
7
|
+
import { m } from "@sdxc/u/size";
|
|
8
|
+
import { when } from "@sdxc/u/state";
|
|
9
|
+
import { leading, text, weight } from "@sdxc/u/typography";
|
|
10
|
+
import { displayHeading } from "../styles/landing.js";
|
|
11
|
+
import { LandingHeader } from "./landing-header.js";
|
|
12
|
+
import { LandingSection } from "./landing-section.js";
|
|
13
|
+
/** Container the band's split and the portrait's phone cap query. */
|
|
14
|
+
const CONTAINER = "ui-landing-author-band";
|
|
15
|
+
/** The inset hairline that keeps a photo's edge visible on a matching background. */
|
|
16
|
+
const IMAGE_OUTLINE = "1px solid var(--ui-image-outline, rgb(0 0 0 / 0.1))";
|
|
17
|
+
/** Corner radius of the portrait and the video card. */
|
|
18
|
+
const RADIUS = "var(--ui-landing-radius-surface, 1rem)";
|
|
19
|
+
/**
|
|
20
|
+
* Renders the portrait and the copy column: one column on a phone with the portrait capped
|
|
21
|
+
* at 20rem, then a 5/7 split from the `lg` container with both columns starting at the
|
|
22
|
+
* same top edge.
|
|
23
|
+
*
|
|
24
|
+
* @param handle Runtime handle carrying the band's props.
|
|
25
|
+
* @returns The render function producing the band's markup.
|
|
26
|
+
* @example
|
|
27
|
+
* <AuthorBand
|
|
28
|
+
* portrait={<img src={portrait} alt="Odile Varga at her drafting table" />}
|
|
29
|
+
* eyebrow={t("author.eyebrow")}
|
|
30
|
+
* title={t("author.title")}
|
|
31
|
+
* description={t("author.bio")}
|
|
32
|
+
* name="Odile Varga"
|
|
33
|
+
* jobTitle={t("author.role")}
|
|
34
|
+
* />
|
|
35
|
+
*/
|
|
36
|
+
export function AuthorBand(handle) {
|
|
37
|
+
return () => {
|
|
38
|
+
let { credentials, description, eyebrow, mix, name, portrait, jobTitle, signature, social, title, video, ...rest } = handle.props;
|
|
39
|
+
return (_jsx(LandingSection, { ...rest, mix: mix, children: _jsx("div", { "data-slot": "author-band", mix: [container(CONTAINER), raw({ inlineSize: "100%" })], children: _jsxs("div", { "data-slot": "author-band-layout", mix: [layout()], children: [_jsx("figure", { "data-slot": "author-band-portrait", mix: [portraitFrame()], children: portrait }), _jsxs("div", { "data-slot": "author-band-copy", mix: [vstack({ gap: 8, align: "stretch" })], children: [_jsx(LandingHeader, { eyebrow: eyebrow, description: description, mix: [raw({ "--ui-landing-header-end": "0" })], children: title }), credentials ? _jsx("div", { "data-slot": "author-band-credentials", children: credentials }) : null, _jsxs("div", { "data-slot": "author-band-byline", mix: [vstack({ gap: 3, align: "start" })], children: [signature ? (_jsx("div", { "data-slot": "author-band-signature", mix: [signatureFrame()], children: signature })) : null, _jsxs("p", { mix: [m(0), vstack({ gap: 0.5, align: "start" })], children: [_jsx("span", { mix: [text("lg"), weight("semibold"), fg("neutral.emphasis")], children: name }), jobTitle ? (_jsx("span", { mix: [text("sm"), fg("neutral.muted")], children: jobTitle })) : null] }), social?.length ? (_jsx("ul", { "data-slot": "author-band-social", mix: [socialList()], children: social.map((link) => (_jsx("li", { children: _jsx("a", { href: link.href, "aria-label": link.label, title: link.label, children: link.icon }) }, link.href))) })) : null] }), video ? _jsx(VideoCard, { ...video }) : null] })] }) }) }));
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* The band's grid in one rule: a single column on a phone, then a 5/7 split from the
|
|
44
|
+
* `lg` container, both columns pinned to the top so the portrait and the eyebrow start
|
|
45
|
+
* on one line.
|
|
46
|
+
*/
|
|
47
|
+
function layout() {
|
|
48
|
+
return combine([
|
|
49
|
+
raw({
|
|
50
|
+
display: "grid",
|
|
51
|
+
gridTemplateColumns: "minmax(0, 1fr)",
|
|
52
|
+
alignItems: "start",
|
|
53
|
+
gap: "2.5rem",
|
|
54
|
+
}),
|
|
55
|
+
at("lg", CONTAINER, raw({ gridTemplateColumns: "minmax(0, 5fr) minmax(0, 7fr)", columnGap: "4rem" })),
|
|
56
|
+
]);
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* The portrait's frame: 3:4 at the surface radius with an inset hairline over the photo's
|
|
60
|
+
* edge, full width capped at 20rem on a phone and filling its column from `lg`.
|
|
61
|
+
*/
|
|
62
|
+
function portraitFrame() {
|
|
63
|
+
return combine([
|
|
64
|
+
raw({
|
|
65
|
+
margin: "0",
|
|
66
|
+
inlineSize: "100%",
|
|
67
|
+
maxInlineSize: "20rem",
|
|
68
|
+
aspectRatio: "3 / 4",
|
|
69
|
+
borderRadius: RADIUS,
|
|
70
|
+
overflow: "hidden",
|
|
71
|
+
backgroundColor: "var(--ui-neutral-bg-tint)",
|
|
72
|
+
outline: IMAGE_OUTLINE,
|
|
73
|
+
outlineOffset: "-1px",
|
|
74
|
+
}),
|
|
75
|
+
at("lg", CONTAINER, raw({ maxInlineSize: "none" })),
|
|
76
|
+
when("& > :is(img, svg, picture, video)", raw({ display: "block", inlineSize: "100%", blockSize: "100%", objectFit: "cover" })),
|
|
77
|
+
]);
|
|
78
|
+
}
|
|
79
|
+
/** The signature's frame: 8rem wide in the heading ink, scaling the SVG to fit. */
|
|
80
|
+
function signatureFrame() {
|
|
81
|
+
return combine([
|
|
82
|
+
raw({ inlineSize: "8rem", color: "var(--ui-neutral-fg-emphasis)" }),
|
|
83
|
+
when("& > svg", raw({ display: "block", inlineSize: "100%", blockSize: "auto" })),
|
|
84
|
+
]);
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* The social row: each link a 2.75rem square, so every icon has a 44px hit area, with the
|
|
88
|
+
* row pulled back by the icon's inset so the first glyph lines up with the name above.
|
|
89
|
+
*/
|
|
90
|
+
function socialList() {
|
|
91
|
+
return combine([
|
|
92
|
+
raw({
|
|
93
|
+
listStyle: "none",
|
|
94
|
+
margin: "0",
|
|
95
|
+
marginInlineStart: "-0.75rem",
|
|
96
|
+
padding: "0",
|
|
97
|
+
display: "flex",
|
|
98
|
+
flexWrap: "wrap",
|
|
99
|
+
}),
|
|
100
|
+
when("& a", raw({
|
|
101
|
+
display: "grid",
|
|
102
|
+
placeItems: "center",
|
|
103
|
+
inlineSize: "2.75rem",
|
|
104
|
+
blockSize: "2.75rem",
|
|
105
|
+
borderRadius: "0.5rem",
|
|
106
|
+
color: "var(--ui-neutral-fg-muted)",
|
|
107
|
+
})),
|
|
108
|
+
when("& a:is(:hover, :focus-visible)", raw({ color: "var(--ui-neutral-fg-emphasis)" })),
|
|
109
|
+
when("& a > svg", raw({ inlineSize: "1.25rem", blockSize: "1.25rem" })),
|
|
110
|
+
]);
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* The intro video as a 16:9 linked still: the title over a dark fade at the foot, a round
|
|
114
|
+
* play button in the centre, and a caption with the runtime under the card.
|
|
115
|
+
*
|
|
116
|
+
* @param handle Runtime handle carrying the video's details.
|
|
117
|
+
* @returns The render function producing the card and its caption.
|
|
118
|
+
*/
|
|
119
|
+
function VideoCard(handle) {
|
|
120
|
+
return () => {
|
|
121
|
+
let { duration, href, thumbnail, title } = handle.props;
|
|
122
|
+
return (_jsxs("figure", { "data-slot": "author-band-video", mix: [m(0), vstack({ gap: 2, align: "stretch" }), raw({ maxInlineSize: "24rem" })], children: [_jsxs("a", { href: href, mix: [videoLink()], children: [thumbnail, _jsx("span", { "data-slot": "author-band-video-play", "aria-hidden": "true", mix: [
|
|
123
|
+
raw({
|
|
124
|
+
position: "absolute",
|
|
125
|
+
insetBlockStart: "50%",
|
|
126
|
+
insetInlineStart: "50%",
|
|
127
|
+
translate: "-50% -50%",
|
|
128
|
+
zIndex: "1",
|
|
129
|
+
display: "grid",
|
|
130
|
+
placeItems: "center",
|
|
131
|
+
inlineSize: "3.5rem",
|
|
132
|
+
blockSize: "3.5rem",
|
|
133
|
+
borderRadius: "9999px",
|
|
134
|
+
backgroundColor: "rgb(255 255 255 / 0.92)",
|
|
135
|
+
color: "rgb(0 0 0 / 0.85)",
|
|
136
|
+
boxShadow: "0 4px 16px rgb(0 0 0 / 0.25)",
|
|
137
|
+
}),
|
|
138
|
+
when("& > svg", raw({
|
|
139
|
+
inlineSize: "1.5rem",
|
|
140
|
+
blockSize: "1.5rem",
|
|
141
|
+
marginInlineStart: "0.1875rem",
|
|
142
|
+
fill: "currentColor",
|
|
143
|
+
})),
|
|
144
|
+
], children: _jsx(PlayIcon, {}) }), _jsx("span", { "data-slot": "author-band-video-title", mix: [
|
|
145
|
+
raw({ "--ui-neutral-fg-emphasis": "#fff" }),
|
|
146
|
+
displayHeading(3),
|
|
147
|
+
raw({
|
|
148
|
+
position: "absolute",
|
|
149
|
+
insetInline: "1rem",
|
|
150
|
+
insetBlockEnd: "0.875rem",
|
|
151
|
+
zIndex: "1",
|
|
152
|
+
textShadow: "0 1px 2px rgb(0 0 0 / 0.4)",
|
|
153
|
+
}),
|
|
154
|
+
], children: title })] }), _jsxs("figcaption", { mix: [text("sm"), leading("snug"), fg("neutral.muted")], children: [title, " (", duration, ")"] })] }));
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* The video link's frame: a 16:9 still at the surface radius with the inset hairline, and a
|
|
159
|
+
* fade from transparent to 55% black over its lower part so the white title reads on any frame.
|
|
160
|
+
*/
|
|
161
|
+
function videoLink() {
|
|
162
|
+
return combine([
|
|
163
|
+
raw({
|
|
164
|
+
position: "relative",
|
|
165
|
+
display: "block",
|
|
166
|
+
aspectRatio: "16 / 9",
|
|
167
|
+
borderRadius: RADIUS,
|
|
168
|
+
overflow: "hidden",
|
|
169
|
+
backgroundColor: "var(--ui-neutral-bg-tint)",
|
|
170
|
+
textDecoration: "none",
|
|
171
|
+
outlineOffset: "2px",
|
|
172
|
+
}),
|
|
173
|
+
when("& > :is(img, svg, picture):first-child", raw({
|
|
174
|
+
display: "block",
|
|
175
|
+
inlineSize: "100%",
|
|
176
|
+
blockSize: "100%",
|
|
177
|
+
objectFit: "cover",
|
|
178
|
+
})),
|
|
179
|
+
when("&::after", raw({
|
|
180
|
+
content: '""',
|
|
181
|
+
position: "absolute",
|
|
182
|
+
inset: "0",
|
|
183
|
+
borderRadius: "inherit",
|
|
184
|
+
backgroundImage: "linear-gradient(transparent 40%, rgb(0 0 0 / 0.55))",
|
|
185
|
+
boxShadow: `inset 0 0 0 1px var(--ui-image-outline, rgb(0 0 0 / 0.1))`,
|
|
186
|
+
})),
|
|
187
|
+
when('& > [data-slot="author-band-video-play"]', motionSafe(raw({ transition: "scale 200ms" }))),
|
|
188
|
+
when('&:is(:hover, :focus-visible) > [data-slot="author-band-video-play"]', raw({ scale: "1.06" })),
|
|
189
|
+
]);
|
|
190
|
+
}
|