@sdxc/ui 2026.10.30 → 2026.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +187 -113
- package/dist/{behaviors → app/behaviors}/drag-session.js +1 -1
- package/dist/{behaviors → app/behaviors}/toaster.js +1 -1
- package/dist/{components → app}/chart.d.ts +1 -1
- package/dist/{components → app}/chart.js +18 -34
- package/dist/{components → app}/context-menu.d.ts +2 -2
- package/dist/{components → app}/context-menu.js +8 -7
- package/dist/{components → app}/drop-indicator.js +3 -3
- package/dist/{components → app}/drop-zone.js +3 -3
- package/dist/{components → app}/empty.d.ts +1 -1
- package/dist/{components → app}/empty.js +11 -21
- package/dist/{components → app}/file-trigger.js +2 -2
- package/dist/{components → app}/grid-list.d.ts +1 -1
- package/dist/{components → app}/grid-list.js +16 -18
- package/dist/app/index.d.ts +41 -0
- package/dist/app/index.js +41 -0
- package/dist/{components → app}/menubar.js +5 -7
- package/dist/{mixins → app/mixins}/drag-reorder.js +1 -1
- package/dist/{mixins → app/mixins}/drop-zone.js +1 -1
- package/dist/{mixins → app/mixins}/grid-list-keys.js +2 -2
- package/dist/{mixins → app/mixins}/menubar-keys.js +2 -2
- package/dist/{mixins → app/mixins}/resize-handle.js +3 -3
- package/dist/{mixins/treeKeys.js → app/mixins/tree-keys.js} +2 -2
- package/dist/{components → app}/resizable.js +7 -10
- package/dist/{components → app}/shortcut-list.js +4 -3
- package/dist/{components → app}/skeleton.js +3 -3
- package/dist/{styles → app/styles}/chart-palette.d.ts +1 -1
- package/dist/{styles → app/styles}/graphic-host.d.ts +1 -1
- package/dist/{styles → app/styles}/legend-toggle.d.ts +1 -1
- package/dist/{components → app}/table.js +12 -15
- package/dist/{components → app}/toast.js +18 -24
- package/dist/{components → app}/toolbar.js +3 -3
- package/dist/{components → app}/tree.d.ts +1 -1
- package/dist/{components → app}/tree.js +10 -14
- package/dist/{utils → app/utils}/chart-path.d.ts +1 -1
- package/dist/{utils → app/utils}/chart-path.js +2 -2
- package/dist/{utils → app/utils}/chart-scale.js +1 -1
- package/dist/behaviors/index.d.ts +0 -5
- package/dist/behaviors/index.js +0 -5
- package/dist/{components → chat}/attachment.d.ts +1 -1
- package/dist/{components → chat}/attachment.js +17 -23
- package/dist/{behaviors → chat/behaviors}/scroll-follow-model.js +1 -1
- package/dist/{components → chat}/bubble.js +14 -14
- package/dist/chat/index.d.ts +16 -0
- package/dist/chat/index.js +16 -0
- package/dist/{components → chat}/marker.js +6 -8
- package/dist/{components → chat}/message-scroller.d.ts +1 -1
- package/dist/{components → chat}/message-scroller.js +12 -18
- package/dist/{components → chat}/message.js +10 -12
- package/dist/{mixins → chat/mixins}/message-follow.js +2 -2
- package/dist/{components → color}/color-area.js +7 -10
- package/dist/{components → color}/color-field.js +7 -6
- package/dist/{components → color}/color-picker.d.ts +1 -1
- package/dist/{components → color}/color-picker.js +9 -12
- package/dist/{components → color}/color-slider.js +10 -13
- package/dist/{components → color}/color-swatch-picker.js +4 -5
- package/dist/{components → color}/color-swatch.js +3 -4
- package/dist/{components → color}/color-wheel.js +5 -6
- package/dist/color/index.d.ts +21 -0
- package/dist/color/index.js +21 -0
- package/dist/{mixins → color/mixins}/color-area-drag.d.ts +1 -1
- package/dist/{mixins → color/mixins}/color-area-drag.js +2 -2
- package/dist/{mixins → color/mixins}/color-preview.js +1 -1
- package/dist/{mixins → color/mixins}/color-wheel-drag.js +1 -1
- package/dist/{styles → color/styles}/rtl-aware-gradient-direction.d.ts +1 -1
- package/dist/components/accordion.d.ts +3 -3
- package/dist/components/accordion.js +19 -15
- package/dist/components/alert-dialog.js +5 -4
- package/dist/components/alert.js +10 -20
- package/dist/components/aspect-ratio.js +3 -4
- package/dist/components/avatar.d.ts +6 -6
- package/dist/components/avatar.js +56 -8
- package/dist/components/badge.js +11 -9
- package/dist/components/breadcrumbs.js +7 -9
- package/dist/components/button.d.ts +8 -6
- package/dist/components/button.js +22 -14
- package/dist/components/calendar.js +13 -24
- package/dist/components/card.js +9 -11
- package/dist/components/carousel.d.ts +1 -1
- package/dist/components/carousel.js +12 -20
- package/dist/components/checkbox-group.js +3 -3
- package/dist/components/checkbox.js +2 -2
- package/dist/components/combobox.js +6 -6
- package/dist/components/command.js +10 -14
- package/dist/components/cta-group.d.ts +30 -14
- package/dist/components/cta-group.js +29 -10
- package/dist/components/date-field.js +2 -1
- package/dist/components/date-picker.js +4 -5
- package/dist/components/date-range-picker.js +3 -2
- package/dist/components/description.js +2 -1
- package/dist/components/dialog-dismiss.d.ts +18 -0
- package/dist/components/dialog-dismiss.js +15 -0
- package/dist/components/dialog.js +11 -15
- package/dist/components/disclosure.js +10 -14
- package/dist/components/drawer.js +3 -4
- package/dist/components/field-error.js +3 -3
- package/dist/components/form.js +2 -1
- package/dist/components/group.js +3 -3
- package/dist/components/header.js +3 -3
- package/dist/components/heading-scope.js +2 -1
- package/dist/components/heading.d.ts +4 -4
- package/dist/components/heading.js +7 -7
- package/dist/components/highlight.js +17 -12
- package/dist/components/hover-card.js +6 -8
- package/dist/components/image-placeholder.js +13 -19
- package/dist/components/index.d.ts +6 -38
- package/dist/components/index.js +6 -38
- package/dist/components/input.js +3 -4
- package/dist/components/item.js +10 -19
- package/dist/components/keyboard.js +3 -3
- package/dist/components/label.js +2 -1
- package/dist/components/link-button.d.ts +7 -5
- package/dist/components/link-button.js +16 -11
- package/dist/components/link.js +3 -4
- package/dist/components/listbox.js +6 -11
- package/dist/components/menu.js +5 -6
- package/dist/components/meter.js +5 -6
- package/dist/components/modal.js +9 -11
- package/dist/components/nav-link.d.ts +1 -1
- package/dist/components/nav-link.js +3 -4
- package/dist/components/navigation-menu.js +17 -23
- package/dist/components/number-field.js +8 -10
- package/dist/components/otp-field.js +2 -1
- package/dist/components/overlay-arrow.js +3 -4
- package/dist/components/pagination.js +8 -10
- package/dist/components/popover.js +3 -4
- package/dist/components/progress-bar.js +5 -5
- package/dist/components/radio-group.js +5 -7
- package/dist/components/range-calendar.js +3 -3
- package/dist/components/scroll-area.js +4 -5
- package/dist/components/search-field.js +8 -11
- package/dist/components/section.js +2 -1
- package/dist/components/select.js +10 -22
- package/dist/components/selection-indicator.js +3 -3
- package/dist/components/sentinel-row.js +3 -3
- package/dist/components/separator.js +3 -3
- package/dist/components/shared-element.js +2 -1
- package/dist/components/sheet.js +6 -7
- package/dist/components/sidebar.js +48 -76
- package/dist/components/slider.js +8 -10
- package/dist/components/spinner.js +3 -3
- package/dist/components/switch.js +3 -3
- package/dist/components/tabs.js +9 -12
- package/dist/components/tag-group.js +7 -9
- package/dist/components/text-field.js +2 -1
- package/dist/components/text.js +2 -1
- package/dist/components/textarea.js +3 -4
- package/dist/components/time-field.js +2 -1
- package/dist/components/toggle-button.js +5 -7
- package/dist/components/tooltip.js +3 -3
- package/dist/components/typeset.js +128 -123
- package/dist/components/youtube-embed.js +2 -1
- package/dist/docs/anchor-heading.d.ts +41 -0
- package/dist/docs/anchor-heading.js +62 -0
- package/dist/docs/callout.d.ts +46 -0
- package/dist/docs/callout.js +61 -0
- package/dist/docs/code-block.d.ts +74 -0
- package/dist/docs/code-block.js +322 -0
- package/dist/docs/code-tabs-sync.d.ts +26 -0
- package/dist/docs/code-tabs-sync.js +12 -0
- package/dist/docs/code-tabs.d.ts +53 -0
- package/dist/docs/code-tabs.js +102 -0
- package/dist/docs/copy-button.d.ts +31 -0
- package/dist/docs/copy-button.js +49 -0
- package/dist/docs/docs-feedback.d.ts +55 -0
- package/dist/docs/docs-feedback.js +72 -0
- package/dist/docs/docs-footer.d.ts +40 -0
- package/dist/docs/docs-footer.js +45 -0
- package/dist/docs/docs-hub.d.ts +93 -0
- package/dist/docs/docs-hub.js +142 -0
- package/dist/docs/docs-layout.d.ts +90 -0
- package/dist/docs/docs-layout.js +166 -0
- package/dist/docs/docs-nav-tools.d.ts +25 -0
- package/dist/docs/docs-nav-tools.js +14 -0
- package/dist/docs/docs-nav.d.ts +53 -0
- package/dist/docs/docs-nav.js +76 -0
- package/dist/docs/docs-not-found.d.ts +68 -0
- package/dist/docs/docs-not-found.js +100 -0
- package/dist/docs/docs-page-header.d.ts +55 -0
- package/dist/docs/docs-page-header.js +54 -0
- package/dist/docs/docs-pager.d.ts +46 -0
- package/dist/docs/docs-pager.js +74 -0
- package/dist/docs/file-tree.d.ts +57 -0
- package/dist/docs/file-tree.js +142 -0
- package/dist/docs/index.d.ts +38 -0
- package/dist/docs/index.js +38 -0
- package/dist/docs/install-command.d.ts +54 -0
- package/dist/docs/install-command.js +33 -0
- package/dist/docs/mixins/code-tabs-sync.d.ts +47 -0
- package/dist/docs/mixins/code-tabs-sync.js +137 -0
- package/dist/docs/mixins/copy-feedback.d.ts +25 -0
- package/dist/docs/mixins/copy-feedback.js +49 -0
- package/dist/docs/mixins/copy-from-url.d.ts +27 -0
- package/dist/docs/mixins/copy-from-url.js +95 -0
- package/dist/docs/mixins/docs-nav-tools.d.ts +27 -0
- package/dist/docs/mixins/docs-nav-tools.js +97 -0
- package/dist/docs/mixins/toc-spy.d.ts +30 -0
- package/dist/docs/mixins/toc-spy.js +165 -0
- package/dist/docs/next-steps.d.ts +45 -0
- package/dist/docs/next-steps.js +79 -0
- package/dist/docs/page-actions.d.ts +77 -0
- package/dist/docs/page-actions.js +78 -0
- package/dist/docs/plan-notice.d.ts +28 -0
- package/dist/docs/plan-notice.js +33 -0
- package/dist/docs/props-table.d.ts +64 -0
- package/dist/docs/props-table.js +147 -0
- package/dist/docs/steps.d.ts +51 -0
- package/dist/docs/steps.js +112 -0
- package/dist/docs/table-of-contents.d.ts +49 -0
- package/dist/docs/table-of-contents.js +139 -0
- package/dist/docs/ui-label.d.ts +51 -0
- package/dist/docs/ui-label.js +64 -0
- package/dist/docs/utils/docs-tree.d.ts +81 -0
- package/dist/docs/utils/docs-tree.js +57 -0
- package/dist/docs/utils/reveal-in-scroller.d.ts +19 -0
- package/dist/docs/utils/reveal-in-scroller.js +43 -0
- package/dist/landing/accent-text.d.ts +47 -0
- package/dist/landing/accent-text.js +107 -0
- package/dist/landing/animations/entrance.d.ts +40 -0
- package/dist/landing/animations/entrance.js +52 -0
- package/dist/landing/announcement-chip.d.ts +45 -0
- package/dist/landing/announcement-chip.js +36 -0
- package/dist/landing/author-band.d.ts +78 -0
- package/dist/landing/author-band.js +190 -0
- package/dist/landing/bento.d.ts +99 -0
- package/dist/landing/bento.js +138 -0
- package/dist/landing/changelog-strip.d.ts +74 -0
- package/dist/landing/changelog-strip.js +201 -0
- package/dist/{patterns → landing}/check-row.js +5 -7
- package/dist/{patterns → landing}/closing-cta.d.ts +4 -4
- package/dist/{patterns → landing}/closing-cta.js +8 -8
- package/dist/landing/code-stage.d.ts +93 -0
- package/dist/landing/code-stage.js +434 -0
- package/dist/landing/crosshair.d.ts +44 -0
- package/dist/landing/crosshair.js +48 -0
- package/dist/landing/curriculum.d.ts +79 -0
- package/dist/landing/curriculum.js +194 -0
- package/dist/landing/drawn-chart.d.ts +74 -0
- package/dist/landing/drawn-chart.js +377 -0
- package/dist/landing/event-ticker.d.ts +71 -0
- package/dist/landing/event-ticker.js +331 -0
- package/dist/landing/fan-out-diagram.d.ts +70 -0
- package/dist/landing/fan-out-diagram.js +481 -0
- package/dist/{patterns → landing}/faq-band.d.ts +5 -5
- package/dist/{patterns → landing}/faq-band.js +13 -14
- package/dist/landing/feature-band.d.ts +108 -0
- package/dist/landing/feature-band.js +67 -0
- package/dist/landing/feature.d.ts +148 -0
- package/dist/landing/feature.js +219 -0
- package/dist/landing/flow-diagram.d.ts +62 -0
- package/dist/landing/flow-diagram.js +240 -0
- package/dist/{patterns → landing}/icon-well.d.ts +17 -7
- package/dist/landing/icon-well.js +31 -0
- package/dist/landing/index.d.ts +52 -0
- package/dist/landing/index.js +52 -0
- package/dist/{patterns → landing}/install-tabs.js +4 -5
- package/dist/landing/landing-header.d.ts +103 -0
- package/dist/landing/landing-header.js +110 -0
- package/dist/landing/landing-hero.d.ts +119 -0
- package/dist/landing/landing-hero.js +172 -0
- package/dist/{components/marketing-section.d.ts → landing/landing-section.d.ts} +38 -15
- package/dist/landing/landing-section.js +183 -0
- package/dist/landing/logo-cloud.d.ts +56 -0
- package/dist/landing/logo-cloud.js +160 -0
- package/dist/landing/logo-sentence.d.ts +38 -0
- package/dist/landing/logo-sentence.js +51 -0
- package/dist/landing/marquee.d.ts +44 -0
- package/dist/landing/marquee.js +97 -0
- package/dist/landing/motion-loop.d.ts +43 -0
- package/dist/landing/motion-loop.js +42 -0
- package/dist/landing/pricing-band.d.ts +94 -0
- package/dist/landing/pricing-band.js +151 -0
- package/dist/landing/product-frame.d.ts +108 -0
- package/dist/landing/product-frame.js +202 -0
- package/dist/{patterns → landing}/proof-strip.d.ts +4 -4
- package/dist/{patterns → landing}/proof-strip.js +3 -3
- package/dist/landing/rails.d.ts +45 -0
- package/dist/landing/rails.js +69 -0
- package/dist/landing/rotating-text.d.ts +44 -0
- package/dist/landing/rotating-text.js +67 -0
- package/dist/landing/segmented-stage.d.ts +75 -0
- package/dist/landing/segmented-stage.js +141 -0
- package/dist/landing/sequence-diagram.d.ts +65 -0
- package/dist/landing/sequence-diagram.js +348 -0
- package/dist/landing/site-footer.d.ts +100 -0
- package/dist/landing/site-footer.js +274 -0
- package/dist/landing/site-header.d.ts +126 -0
- package/dist/landing/site-header.js +595 -0
- package/dist/{components → landing}/split.d.ts +12 -5
- package/dist/{components → landing}/split.js +26 -18
- package/dist/landing/sponsor-wall.d.ts +81 -0
- package/dist/landing/sponsor-wall.js +241 -0
- package/dist/{components → landing}/stat-strip.d.ts +31 -7
- package/dist/landing/stat-strip.js +105 -0
- package/dist/landing/step-list.d.ts +73 -0
- package/dist/landing/step-list.js +182 -0
- package/dist/landing/styles/card-grid.d.ts +115 -0
- package/dist/landing/styles/card-grid.js +295 -0
- package/dist/{patterns → landing}/tabbed-stage.d.ts +26 -8
- package/dist/landing/tabbed-stage.js +233 -0
- package/dist/landing/testimonial-band.d.ts +110 -0
- package/dist/landing/testimonial-band.js +164 -0
- package/dist/landing/typed-terminal.d.ts +62 -0
- package/dist/landing/typed-terminal.js +233 -0
- package/dist/landing/utils/pause-toggle.d.ts +37 -0
- package/dist/landing/utils/pause-toggle.js +71 -0
- package/dist/mixins/copy-to-clipboard.d.ts +6 -0
- package/dist/mixins/copy-to-clipboard.js +17 -1
- package/dist/mixins/dialog-dismiss.d.ts +21 -0
- package/dist/mixins/dialog-dismiss.js +62 -0
- package/dist/mixins/index.d.ts +2 -15
- package/dist/mixins/index.js +2 -15
- package/dist/styles/index.d.ts +2 -5
- package/dist/styles/index.js +2 -5
- package/dist/styles/landing.d.ts +200 -0
- package/dist/styles/landing.js +516 -0
- package/dist/styles/surface-control.d.ts +18 -0
- package/dist/styles/surface-control.js +31 -0
- package/dist/utils/eyebrow.d.ts +39 -0
- package/dist/utils/eyebrow.js +21 -0
- package/dist/utils/index.d.ts +1 -5
- package/dist/utils/index.js +1 -5
- package/package.json +14 -4
- package/src/theme.css +87 -22
- package/dist/components/feature.d.ts +0 -102
- package/dist/components/feature.js +0 -150
- package/dist/components/logo-cloud.d.ts +0 -42
- package/dist/components/logo-cloud.js +0 -41
- package/dist/components/marketing-header.d.ts +0 -71
- package/dist/components/marketing-header.js +0 -81
- package/dist/components/marketing-section.js +0 -117
- package/dist/components/stat-strip.js +0 -65
- package/dist/patterns/accent-text.d.ts +0 -30
- package/dist/patterns/accent-text.js +0 -17
- package/dist/patterns/announcement-chip.d.ts +0 -41
- package/dist/patterns/announcement-chip.js +0 -49
- package/dist/patterns/bento.d.ts +0 -68
- package/dist/patterns/bento.js +0 -94
- package/dist/patterns/code-stage.d.ts +0 -63
- package/dist/patterns/code-stage.js +0 -82
- package/dist/patterns/feature-band.d.ts +0 -85
- package/dist/patterns/feature-band.js +0 -50
- package/dist/patterns/icon-well.js +0 -38
- package/dist/patterns/index.d.ts +0 -23
- package/dist/patterns/index.js +0 -23
- package/dist/patterns/landing-hero.d.ts +0 -93
- package/dist/patterns/landing-hero.js +0 -126
- package/dist/patterns/product-frame.d.ts +0 -60
- package/dist/patterns/product-frame.js +0 -70
- package/dist/patterns/step-list.d.ts +0 -47
- package/dist/patterns/step-list.js +0 -85
- package/dist/patterns/tabbed-stage.js +0 -77
- package/dist/styles/marketing.d.ts +0 -120
- package/dist/styles/marketing.js +0 -225
- package/dist/utils/semantic-color-panel.d.ts +0 -35
- package/dist/utils/semantic-color-panel.js +0 -28
- /package/dist/{behaviors → app/behaviors}/drag-session.d.ts +0 -0
- /package/dist/{behaviors → app/behaviors}/resize-session.d.ts +0 -0
- /package/dist/{behaviors → app/behaviors}/resize-session.js +0 -0
- /package/dist/{behaviors → app/behaviors}/selection-model.d.ts +0 -0
- /package/dist/{behaviors → app/behaviors}/selection-model.js +0 -0
- /package/dist/{behaviors → app/behaviors}/toaster.d.ts +0 -0
- /package/dist/{components → app}/drop-indicator.d.ts +0 -0
- /package/dist/{components → app}/drop-zone.d.ts +0 -0
- /package/dist/{components → app}/file-trigger.d.ts +0 -0
- /package/dist/{components → app}/menubar.d.ts +0 -0
- /package/dist/{mixins → app/mixins}/chart-tooltip.d.ts +0 -0
- /package/dist/{mixins → app/mixins}/chart-tooltip.js +0 -0
- /package/dist/{mixins → app/mixins}/context-menu.d.ts +0 -0
- /package/dist/{mixins → app/mixins}/context-menu.js +0 -0
- /package/dist/{mixins → app/mixins}/drag-reorder.d.ts +0 -0
- /package/dist/{mixins → app/mixins}/drop-zone.d.ts +0 -0
- /package/dist/{mixins → app/mixins}/grid-list-keys.d.ts +0 -0
- /package/dist/{mixins → app/mixins}/menubar-keys.d.ts +0 -0
- /package/dist/{mixins → app/mixins}/resize-handle.d.ts +0 -0
- /package/dist/{mixins/treeKeys.d.ts → app/mixins/tree-keys.d.ts} +0 -0
- /package/dist/{components → app}/resizable.d.ts +0 -0
- /package/dist/{components → app}/shortcut-list.d.ts +0 -0
- /package/dist/{components → app}/skeleton.d.ts +0 -0
- /package/dist/{styles → app/styles}/chart-palette.js +0 -0
- /package/dist/{styles → app/styles}/graphic-host.js +0 -0
- /package/dist/{styles → app/styles}/legend-toggle.js +0 -0
- /package/dist/{components → app}/table.d.ts +0 -0
- /package/dist/{components → app}/toast.d.ts +0 -0
- /package/dist/{components → app}/toolbar.d.ts +0 -0
- /package/dist/{utils → app/utils}/chart-marker-indices.d.ts +0 -0
- /package/dist/{utils → app/utils}/chart-marker-indices.js +0 -0
- /package/dist/{utils → app/utils}/chart-scale.d.ts +0 -0
- /package/dist/{behaviors → chat/behaviors}/scroll-follow-model.d.ts +0 -0
- /package/dist/{components → chat}/bubble.d.ts +0 -0
- /package/dist/{components → chat}/marker.d.ts +0 -0
- /package/dist/{components → chat}/message.d.ts +0 -0
- /package/dist/{mixins → chat/mixins}/attachment-trigger.d.ts +0 -0
- /package/dist/{mixins → chat/mixins}/attachment-trigger.js +0 -0
- /package/dist/{mixins → chat/mixins}/message-follow.d.ts +0 -0
- /package/dist/{components → color}/color-area.d.ts +0 -0
- /package/dist/{components → color}/color-field.d.ts +0 -0
- /package/dist/{components → color}/color-slider.d.ts +0 -0
- /package/dist/{components → color}/color-swatch-picker.d.ts +0 -0
- /package/dist/{components → color}/color-swatch.d.ts +0 -0
- /package/dist/{components → color}/color-wheel.d.ts +0 -0
- /package/dist/{mixins → color/mixins}/color-channel-sync.d.ts +0 -0
- /package/dist/{mixins → color/mixins}/color-channel-sync.js +0 -0
- /package/dist/{mixins → color/mixins}/color-preview.d.ts +0 -0
- /package/dist/{mixins → color/mixins}/color-wheel-drag.d.ts +0 -0
- /package/dist/{styles → color/styles}/rtl-aware-gradient-direction.js +0 -0
- /package/dist/{utils → color/utils}/hue-spectrum.d.ts +0 -0
- /package/dist/{utils → color/utils}/hue-spectrum.js +0 -0
- /package/dist/{patterns → landing}/check-row.d.ts +0 -0
- /package/dist/{patterns → landing}/install-tabs.d.ts +0 -0
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "remix/component/jsx-runtime";
|
|
2
|
+
import { visuallyHidden } from "@sdxc/u/a11y";
|
|
3
|
+
import { bg, fg, outline } from "@sdxc/u/color";
|
|
4
|
+
import { rounded, transition } from "@sdxc/u/effects";
|
|
5
|
+
import { combine, cursor, pseudoContent, raw, mergeMix } from "@sdxc/u/general";
|
|
6
|
+
import { absolute, center, container, flex, flexWrap, gap, inlineFlex, items, justify, relative, } from "@sdxc/u/layout";
|
|
7
|
+
import { at } from "@sdxc/u/responsive";
|
|
8
|
+
import { p } from "@sdxc/u/size";
|
|
9
|
+
import { before, precededBy, when } from "@sdxc/u/state";
|
|
10
|
+
import { text, weight } from "@sdxc/u/typography";
|
|
11
|
+
import { landingEmphasis } from "../styles/landing.js";
|
|
12
|
+
/** Layout {@link TabbedStage} applies when `orientation` is omitted. */
|
|
13
|
+
const DEFAULT_ORIENTATION = "horizontal";
|
|
14
|
+
/** Container a vertical stage queries to move its panels beside the rail. */
|
|
15
|
+
const STAGE_CONTAINER = "ui-tabbed-stage";
|
|
16
|
+
/** Translucent line the vertical rail draws. */
|
|
17
|
+
const HAIRLINE = "var(--ui-landing-hairline, color-mix(in oklch, CanvasText 8%, transparent))";
|
|
18
|
+
/** Fill of the selected pill and of an idle rail marker. */
|
|
19
|
+
const SURFACE_RAISED = "var(--ui-surface-raised, Canvas)";
|
|
20
|
+
/** Space between neighbouring pills; panels pull back by it to share one flex line. */
|
|
21
|
+
const PILL_GAP = "calc(var(--ui-spacing, 0.25rem) * 6)";
|
|
22
|
+
/** Space between the pill row and the stage. */
|
|
23
|
+
const PILL_ROW_GAP = "calc(var(--ui-spacing, 0.25rem) * 2)";
|
|
24
|
+
/** Space between the rail and an item's copy. */
|
|
25
|
+
const RAIL_INSET = "1.5rem";
|
|
26
|
+
/** Block padding around each rail item. */
|
|
27
|
+
const RAIL_ITEM_PADDING = "0.75rem";
|
|
28
|
+
/**
|
|
29
|
+
* Distance from the label's top edge to its 6px marker, centring the marker on the
|
|
30
|
+
* title's 28px first line.
|
|
31
|
+
*/
|
|
32
|
+
const RAIL_MARKER_OFFSET = `calc(${RAIL_ITEM_PADDING} + 0.875rem - 3px)`;
|
|
33
|
+
/**
|
|
34
|
+
* Counts the elements among a stage's children, flattening mapped arrays, so a vertical
|
|
35
|
+
* stage gives each rail item its own grid row. Text, booleans and nullish slots draw no item.
|
|
36
|
+
*
|
|
37
|
+
* @param children The stage's `children` value.
|
|
38
|
+
* @returns How many items the stage holds.
|
|
39
|
+
*/
|
|
40
|
+
function countItems(children) {
|
|
41
|
+
if (Array.isArray(children)) {
|
|
42
|
+
return children.reduce((total, child) => total + countItems(child), 0);
|
|
43
|
+
}
|
|
44
|
+
return typeof children === "object" && children !== null ? 1 : 0;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Host for tabs and their panels. Nest {@link TabbedStage.Item} children; each item
|
|
48
|
+
* pairs a tab with the media it reveals. A vertical stage wraps itself in a named
|
|
49
|
+
* container so the rail and stage sit side by side where there is room, and stack below.
|
|
50
|
+
*
|
|
51
|
+
* @param handle Runtime handle carrying the host `<div>`'s props and providing
|
|
52
|
+
* {@link TabbedStage.Context}.
|
|
53
|
+
* @returns The render function producing the stage's markup.
|
|
54
|
+
* @example
|
|
55
|
+
* <TabbedStage name="demo" aria-label={t("stage.label")}>
|
|
56
|
+
* <TabbedStage.Item value="inbox" label={t("stage.inbox")} icon={inboxIcon} defaultChecked>
|
|
57
|
+
* {inboxShot}
|
|
58
|
+
* </TabbedStage.Item>
|
|
59
|
+
* </TabbedStage>
|
|
60
|
+
* @example
|
|
61
|
+
* <TabbedStage name="how" orientation="vertical" aria-label={t("how.label")}>
|
|
62
|
+
* <TabbedStage.Item value="detect" label={t("how.detect")} description={t("how.detect.body")} defaultChecked>
|
|
63
|
+
* {detectShot}
|
|
64
|
+
* </TabbedStage.Item>
|
|
65
|
+
* </TabbedStage>
|
|
66
|
+
*/
|
|
67
|
+
export function TabbedStage(handle) {
|
|
68
|
+
return () => {
|
|
69
|
+
let { children, mix, name, orientation, ...rest } = handle.props;
|
|
70
|
+
let resolvedOrientation = orientation ?? DEFAULT_ORIENTATION;
|
|
71
|
+
handle.context.set({ name, orientation: resolvedOrientation });
|
|
72
|
+
if (resolvedOrientation === "horizontal") {
|
|
73
|
+
return (_jsx("div", { role: "group", ...rest, "data-slot": "tabbed-stage", "data-name": name, "data-orientation": resolvedOrientation, mix: mergeMix([
|
|
74
|
+
flex(),
|
|
75
|
+
flexWrap("wrap"),
|
|
76
|
+
justify("center"),
|
|
77
|
+
raw({ rowGap: PILL_ROW_GAP, columnGap: PILL_GAP }),
|
|
78
|
+
], mix), children: children }));
|
|
79
|
+
}
|
|
80
|
+
let rows = Math.max(countItems(children), 1);
|
|
81
|
+
return (_jsx("div", { mix: [container(STAGE_CONTAINER)], children: _jsx("div", { role: "group", ...rest, "data-slot": "tabbed-stage", "data-name": name, "data-orientation": resolvedOrientation, mix: mergeMix(combine([
|
|
82
|
+
raw({
|
|
83
|
+
display: "grid",
|
|
84
|
+
gridTemplateColumns: "minmax(0, 1fr)",
|
|
85
|
+
gridTemplateRows: `repeat(${rows}, min-content) auto`,
|
|
86
|
+
}),
|
|
87
|
+
at("lg", STAGE_CONTAINER, raw({
|
|
88
|
+
display: "grid",
|
|
89
|
+
gridTemplateColumns: "minmax(0, 5fr) minmax(0, 7fr)",
|
|
90
|
+
gridTemplateRows: `repeat(${rows}, min-content) 1fr`,
|
|
91
|
+
columnGap: "clamp(2rem, 6cqi, 4rem)",
|
|
92
|
+
alignItems: "start",
|
|
93
|
+
})),
|
|
94
|
+
]), mix), children: children }) }));
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Pill tab for a horizontal stage: quiet ink on a transparent fill, lifted onto the
|
|
99
|
+
* raised surface with the control edge while selected. One class carries every state,
|
|
100
|
+
* so the selected fill always outranks the hover fill.
|
|
101
|
+
*/
|
|
102
|
+
function pillTab() {
|
|
103
|
+
return combine([
|
|
104
|
+
raw({ order: -1 }),
|
|
105
|
+
inlineFlex(),
|
|
106
|
+
items("center"),
|
|
107
|
+
justify("center"),
|
|
108
|
+
gap(2),
|
|
109
|
+
p(2, 3.5),
|
|
110
|
+
rounded("full"),
|
|
111
|
+
text("sm"),
|
|
112
|
+
weight("medium"),
|
|
113
|
+
fg("neutral"),
|
|
114
|
+
raw({ backgroundColor: "transparent", border: "1px solid transparent" }),
|
|
115
|
+
cursor("pointer"),
|
|
116
|
+
transition("color, background-color, box-shadow"),
|
|
117
|
+
when("&:hover", bg("neutral.bg-tint-hover")),
|
|
118
|
+
precededBy("input:checked", raw({
|
|
119
|
+
backgroundColor: SURFACE_RAISED,
|
|
120
|
+
boxShadow: "var(--ui-shadow-control, 0 0 0 1px rgb(0 0 0 / 0.08))",
|
|
121
|
+
color: "var(--ui-neutral-fg-emphasis)",
|
|
122
|
+
})),
|
|
123
|
+
precededBy("input:focus-visible", outline({ color: "brand.ring", offset: 2 })),
|
|
124
|
+
]);
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Rail item for a vertical stage: a hairline along the inline-start edge with a 6px square
|
|
128
|
+
* marker that fills with the brand while selected. The focus ring sits inside the item so
|
|
129
|
+
* the rail beside it stays visible.
|
|
130
|
+
*/
|
|
131
|
+
function railTab() {
|
|
132
|
+
return combine([
|
|
133
|
+
relative(),
|
|
134
|
+
raw({
|
|
135
|
+
display: "block",
|
|
136
|
+
gridColumn: "1",
|
|
137
|
+
paddingBlock: RAIL_ITEM_PADDING,
|
|
138
|
+
paddingInlineStart: RAIL_INSET,
|
|
139
|
+
paddingInlineEnd: "0.75rem",
|
|
140
|
+
borderInlineStart: `1px solid ${HAIRLINE}`,
|
|
141
|
+
}),
|
|
142
|
+
fg("neutral"),
|
|
143
|
+
cursor("pointer"),
|
|
144
|
+
transition("color"),
|
|
145
|
+
when("&:hover", fg("neutral.emphasis")),
|
|
146
|
+
before([
|
|
147
|
+
pseudoContent('""'),
|
|
148
|
+
absolute(),
|
|
149
|
+
raw({
|
|
150
|
+
insetInlineStart: "-3.5px",
|
|
151
|
+
insetBlockStart: RAIL_MARKER_OFFSET,
|
|
152
|
+
inlineSize: "6px",
|
|
153
|
+
blockSize: "6px",
|
|
154
|
+
backgroundColor: SURFACE_RAISED,
|
|
155
|
+
boxShadow: "0 0 0 1px var(--ui-neutral-border)",
|
|
156
|
+
}),
|
|
157
|
+
]),
|
|
158
|
+
precededBy("input:checked", [
|
|
159
|
+
fg("neutral.emphasis"),
|
|
160
|
+
before(raw({ backgroundColor: "var(--ui-brand-bg-solid)", boxShadow: "none" })),
|
|
161
|
+
]),
|
|
162
|
+
precededBy("input:focus-visible", outline({ color: "brand.ring", offset: -2 })),
|
|
163
|
+
]);
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Panel for a horizontal stage. Each panel after the first pulls back over the first by its
|
|
167
|
+
* width plus the pill gap, so every panel shares the line under the pills and the stage takes
|
|
168
|
+
* the tallest one's height; unselected panels stay hidden from sight, focus and the a11y tree.
|
|
169
|
+
*/
|
|
170
|
+
function pillPanel() {
|
|
171
|
+
return combine([
|
|
172
|
+
raw({
|
|
173
|
+
flex: "0 0 100%",
|
|
174
|
+
overflow: "hidden",
|
|
175
|
+
visibility: "hidden",
|
|
176
|
+
borderRadius: "var(--ui-landing-radius-frame, 0.75rem)",
|
|
177
|
+
}),
|
|
178
|
+
when('[data-slot="tabbed-stage-item"] ~ [data-slot="tabbed-stage-item"] > &', raw({ marginInlineStart: `calc(-100% - ${PILL_GAP})` })),
|
|
179
|
+
precededBy("input:checked", raw({ visibility: "visible" })),
|
|
180
|
+
]);
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Panel for a vertical stage. Every panel shares one grid cell sized to the tallest: under the
|
|
184
|
+
* rail below `lg`, and from `lg` up in the stage column, sticky under the landing header.
|
|
185
|
+
* Unselected panels stay hidden from sight, focus and assistive technology.
|
|
186
|
+
*/
|
|
187
|
+
function railPanel() {
|
|
188
|
+
return combine([
|
|
189
|
+
raw({
|
|
190
|
+
gridColumn: "1",
|
|
191
|
+
gridRow: "-2 / -1",
|
|
192
|
+
visibility: "hidden",
|
|
193
|
+
paddingBlockStart: "1.5rem",
|
|
194
|
+
}),
|
|
195
|
+
precededBy("input:checked", raw({ visibility: "visible" })),
|
|
196
|
+
at("lg", STAGE_CONTAINER, raw({
|
|
197
|
+
gridColumn: "2",
|
|
198
|
+
gridRow: "1 / -1",
|
|
199
|
+
alignSelf: "start",
|
|
200
|
+
position: "sticky",
|
|
201
|
+
insetBlockStart: "calc(var(--ui-landing-header-height, 4rem) + 2rem)",
|
|
202
|
+
paddingBlockStart: "0",
|
|
203
|
+
})),
|
|
204
|
+
]);
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* One tab + panel pair. In a horizontal stage the pill sits in the tab row and the panel
|
|
208
|
+
* spans the stage; in a vertical stage the item joins the rail and its panel takes the
|
|
209
|
+
* stage column. The panel reveals while the item's radio is checked.
|
|
210
|
+
*
|
|
211
|
+
* @param handle Runtime handle carrying the item's props.
|
|
212
|
+
* @returns The render function producing the item's markup.
|
|
213
|
+
*/
|
|
214
|
+
TabbedStage.Item = function TabbedStageItem(handle) {
|
|
215
|
+
return () => {
|
|
216
|
+
let { children, defaultChecked, description, icon, label, mix, value, ...rest } = handle.props;
|
|
217
|
+
let context = handle.context.get(TabbedStage);
|
|
218
|
+
let groupName = context?.name ?? "tabbed-stage";
|
|
219
|
+
let isVertical = context?.orientation === "vertical";
|
|
220
|
+
let inputId = `${groupName}-tab-${value}`;
|
|
221
|
+
let glyph = icon ? _jsx("span", { mix: [inlineFlex(), center()], children: icon }) : null;
|
|
222
|
+
return (_jsxs("div", { ...rest, "data-slot": "tabbed-stage-item", "data-value": value, mix: mergeMix(raw({ display: "contents" }), mix), children: [_jsx("input", { type: "radio", name: groupName, id: inputId, value: value, defaultChecked: defaultChecked, mix: [visuallyHidden()] }), isVertical ? (_jsxs("label", { htmlFor: inputId, "data-slot": "tabbed-stage-tab", mix: [railTab()], children: [_jsxs("span", { mix: [inlineFlex(), items("center"), gap(2), text("lg"), weight("medium")], children: [glyph, label] }), description ? (_jsx("span", { "data-slot": "tabbed-stage-description", mix: [
|
|
223
|
+
combine([
|
|
224
|
+
raw({ display: "none", marginBlockStart: "0.25rem" }),
|
|
225
|
+
text("sm"),
|
|
226
|
+
raw({ lineHeight: "1.625" }),
|
|
227
|
+
fg("neutral"),
|
|
228
|
+
when(":is(input:checked) ~ label &", raw({ display: "block" })),
|
|
229
|
+
]),
|
|
230
|
+
landingEmphasis(),
|
|
231
|
+
], children: description })) : null] })) : (_jsxs("label", { htmlFor: inputId, "data-slot": "tabbed-stage-tab", mix: [pillTab()], children: [glyph, label] })), _jsx("div", { "data-slot": "tabbed-stage-panel", mix: [isVertical ? railPanel() : pillPanel()], children: children })] }));
|
|
232
|
+
};
|
|
233
|
+
};
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Testimonial band: a {@link LandingHeader} over an optional featured quote and a grid
|
|
3
|
+
* or snapping carousel of quote cards whose rows share one height. Each card is a
|
|
4
|
+
* `<figure>` pairing the quote with who said it.
|
|
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 { LandingSection } from "./landing-section.js";
|
|
11
|
+
/**
|
|
12
|
+
* Prop types for {@link TestimonialBand} and {@link TestimonialBand.Quote}.
|
|
13
|
+
*/
|
|
14
|
+
export declare namespace TestimonialBand {
|
|
15
|
+
/**
|
|
16
|
+
* How many quotes share a row from the `lg` container; a phone reads one
|
|
17
|
+
* column and the `md` container two.
|
|
18
|
+
*/
|
|
19
|
+
type Columns = 2 | 3;
|
|
20
|
+
/**
|
|
21
|
+
* Band fill forwarded to {@link LandingSection}.
|
|
22
|
+
*/
|
|
23
|
+
type Tone = LandingSection.Tone;
|
|
24
|
+
/**
|
|
25
|
+
* `grid` sets every quote in even rows; `carousel` sets them in one row that scrolls
|
|
26
|
+
* and snaps sideways, showing the next card's edge.
|
|
27
|
+
*/
|
|
28
|
+
type Layout = "grid" | "carousel";
|
|
29
|
+
/**
|
|
30
|
+
* `card` is the regular quote; `featured` inverts the card, sets the quote large
|
|
31
|
+
* and leads with an optional `logo`.
|
|
32
|
+
*/
|
|
33
|
+
type QuoteVariant = "card" | "featured";
|
|
34
|
+
/**
|
|
35
|
+
* Per-part styling for slots the band composes.
|
|
36
|
+
*/
|
|
37
|
+
interface PartsProps {
|
|
38
|
+
/** Styling for the header title. */
|
|
39
|
+
title?: TagProps<"h1">["mix"];
|
|
40
|
+
/** Styling for the header lead. */
|
|
41
|
+
description?: TagProps<"p">["mix"];
|
|
42
|
+
/** Styling for the quote grid. */
|
|
43
|
+
quotes?: TagProps<"div">["mix"];
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Props accepted by {@link TestimonialBand}.
|
|
47
|
+
*/
|
|
48
|
+
interface Props extends Omit<LandingSection.Props, "children" | "tone" | "title" | "parts"> {
|
|
49
|
+
/** Columns from the `lg` container. Defaults to {@link DEFAULT_COLUMNS}. */
|
|
50
|
+
columns?: Columns;
|
|
51
|
+
/** Band fill. Defaults to {@link DEFAULT_TONE}. */
|
|
52
|
+
tone?: Tone;
|
|
53
|
+
/** Optional eyebrow above the title. */
|
|
54
|
+
eyebrow?: RemixNode;
|
|
55
|
+
/** Section title — required, always supplied by the page. */
|
|
56
|
+
title: RemixNode;
|
|
57
|
+
/** Supporting lead under the title. */
|
|
58
|
+
description?: RemixNode;
|
|
59
|
+
/** Arrangement of `children`. Defaults to `"grid"`. */
|
|
60
|
+
layout?: Layout;
|
|
61
|
+
/** Accessible name of the carousel's scroll region. Defaults to "Testimonials". */
|
|
62
|
+
carouselLabel?: string;
|
|
63
|
+
/**
|
|
64
|
+
* One quote set full width above the rest, usually a
|
|
65
|
+
* `<TestimonialBand.Quote variant="featured">` with a hard number in it.
|
|
66
|
+
*/
|
|
67
|
+
featured?: RemixNode;
|
|
68
|
+
/** One {@link TestimonialBand.Quote} per testimonial. */
|
|
69
|
+
children: RemixNode;
|
|
70
|
+
/** Per-part styling for title, lead, and quote grid. */
|
|
71
|
+
parts?: PartsProps;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Props accepted by {@link TestimonialBand.Quote}.
|
|
75
|
+
*/
|
|
76
|
+
interface QuoteProps extends Omit<TagProps<"figure">, "children"> {
|
|
77
|
+
/** The quote; `strong` fragments render in the emphasis ink at the copy's weight. */
|
|
78
|
+
children: RemixNode;
|
|
79
|
+
/** Who said it. */
|
|
80
|
+
name: RemixNode;
|
|
81
|
+
/** Their job title and company, drawn muted under the name. */
|
|
82
|
+
jobTitle?: RemixNode;
|
|
83
|
+
/** An `<img>` or initials, cropped to a round 2.5rem frame. */
|
|
84
|
+
avatar?: RemixNode;
|
|
85
|
+
/** Card look. Defaults to `"card"`. */
|
|
86
|
+
variant?: QuoteVariant;
|
|
87
|
+
/** The customer's mark, above the quote; a featured card draws it in its own ink. */
|
|
88
|
+
logo?: RemixNode;
|
|
89
|
+
/** Links the customer story with a trailing line under the caption. */
|
|
90
|
+
href?: string;
|
|
91
|
+
/** Text of the story link. Defaults to "Read the story". */
|
|
92
|
+
linkLabel?: RemixNode;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Renders a testimonial band with a chapter header and a quote grid of one column on a
|
|
97
|
+
* phone, two from the `md` container and `columns` from `lg`, evened per quote count with a
|
|
98
|
+
* short last row centred. Cards in a row stretch to one height, captions on one line.
|
|
99
|
+
*
|
|
100
|
+
* @param handle Runtime handle carrying the band's props.
|
|
101
|
+
* @returns The render function producing the band's markup.
|
|
102
|
+
* @example
|
|
103
|
+
* <TestimonialBand title={t("quotes.title")}>
|
|
104
|
+
* <TestimonialBand.Quote name="Ana Ruiz" jobTitle="SRE, Lumen" avatar="AR">{t("quotes.ana")}</TestimonialBand.Quote>
|
|
105
|
+
* </TestimonialBand>
|
|
106
|
+
*/
|
|
107
|
+
export declare function TestimonialBand(handle: Handle<TestimonialBand.Props>): () => import("remix/component").RemixElement;
|
|
108
|
+
export declare namespace TestimonialBand {
|
|
109
|
+
var Quote: (handle: Handle<TestimonialBand.QuoteProps>) => () => import("remix/component").RemixElement;
|
|
110
|
+
}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "remix/component/jsx-runtime";
|
|
2
|
+
import { fg } from "@sdxc/u/color";
|
|
3
|
+
import { raw, mergeMix } from "@sdxc/u/general";
|
|
4
|
+
import { container, grid, hstack, items, vstack } from "@sdxc/u/layout";
|
|
5
|
+
import { when } from "@sdxc/u/state";
|
|
6
|
+
import { text, weight } from "@sdxc/u/typography";
|
|
7
|
+
import { landingBandTone, landingEmphasis, landingSurface } from "../styles/landing.js";
|
|
8
|
+
import { LandingHeader } from "./landing-header.js";
|
|
9
|
+
import { LandingSection } from "./landing-section.js";
|
|
10
|
+
import { balancedGrid } from "./styles/card-grid.js";
|
|
11
|
+
/** How many quotes share a row from the `lg` container when `columns` is omitted. */
|
|
12
|
+
const DEFAULT_COLUMNS = 3;
|
|
13
|
+
/** Band fill {@link TestimonialBand} applies when `tone` is omitted. */
|
|
14
|
+
const DEFAULT_TONE = "plain";
|
|
15
|
+
/** Container the quote grid queries. */
|
|
16
|
+
const CONTAINER_NAME = "ui-landing-testimonials";
|
|
17
|
+
/** Space between quote cards, across a row and between rows. */
|
|
18
|
+
const CARD_GAP = "1.5rem";
|
|
19
|
+
/**
|
|
20
|
+
* Renders a testimonial band with a chapter header and a quote grid of one column on a
|
|
21
|
+
* phone, two from the `md` container and `columns` from `lg`, evened per quote count with a
|
|
22
|
+
* short last row centred. Cards in a row stretch to one height, captions on one line.
|
|
23
|
+
*
|
|
24
|
+
* @param handle Runtime handle carrying the band's props.
|
|
25
|
+
* @returns The render function producing the band's markup.
|
|
26
|
+
* @example
|
|
27
|
+
* <TestimonialBand title={t("quotes.title")}>
|
|
28
|
+
* <TestimonialBand.Quote name="Ana Ruiz" jobTitle="SRE, Lumen" avatar="AR">{t("quotes.ana")}</TestimonialBand.Quote>
|
|
29
|
+
* </TestimonialBand>
|
|
30
|
+
*/
|
|
31
|
+
export function TestimonialBand(handle) {
|
|
32
|
+
return () => {
|
|
33
|
+
let { carouselLabel, children, columns, description, eyebrow, featured, layout, mix, parts, spacing, title, tone, ...rest } = handle.props;
|
|
34
|
+
let isCarousel = layout === "carousel";
|
|
35
|
+
let resolvedColumns = columns ?? DEFAULT_COLUMNS;
|
|
36
|
+
let resolvedTone = tone ?? DEFAULT_TONE;
|
|
37
|
+
let resolvedSpacing = spacing ?? "normal";
|
|
38
|
+
return (_jsx(LandingSection, { ...rest, tone: resolvedTone, spacing: resolvedSpacing, mix: mix, children: _jsxs("div", { mix: [vstack({ gap: 0, align: "stretch" })], children: [_jsx(LandingHeader, { eyebrow: eyebrow, description: description, parts: { title: parts?.title, description: parts?.description }, children: title }), featured ? (_jsx("div", { "data-slot": "testimonial-featured", mix: [raw({ marginBlockEnd: CARD_GAP })], children: featured })) : null, _jsx("div", { "data-columns": String(resolvedColumns), mix: [container(CONTAINER_NAME)], children: _jsx("div", { "data-slot": "testimonial-quotes", "data-layout": isCarousel ? "carousel" : "grid", role: isCarousel ? "region" : undefined, "aria-label": isCarousel ? (carouselLabel ?? "Testimonials") : undefined, tabIndex: isCarousel ? 0 : undefined, mix: [
|
|
39
|
+
isCarousel
|
|
40
|
+
? carouselTrack()
|
|
41
|
+
: [
|
|
42
|
+
grid(),
|
|
43
|
+
raw({ gap: CARD_GAP }),
|
|
44
|
+
balancedGrid(CONTAINER_NAME, [
|
|
45
|
+
{ query: "(width < 36rem)", columns: 1 },
|
|
46
|
+
{ query: "(36rem <= width < 48rem)", columns: 2 },
|
|
47
|
+
{ query: "(width >= 48rem)", columns: resolvedColumns },
|
|
48
|
+
]),
|
|
49
|
+
],
|
|
50
|
+
parts?.quotes,
|
|
51
|
+
], children: children }) })] }) }));
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* One testimonial card: the quote in a `<blockquote>` that grows to the row's height and
|
|
56
|
+
* the speaker in a `<figcaption>` at its foot, with an optional round avatar.
|
|
57
|
+
*
|
|
58
|
+
* @param handle Runtime handle carrying the card's props.
|
|
59
|
+
* @returns The render function producing the card's markup.
|
|
60
|
+
* @example
|
|
61
|
+
* <TestimonialBand.Quote name="Ana Ruiz" jobTitle="SRE, Lumen" avatar="AR">
|
|
62
|
+
* We caught the outage <strong>before our customers did</strong>.
|
|
63
|
+
* </TestimonialBand.Quote>
|
|
64
|
+
*/
|
|
65
|
+
TestimonialBand.Quote = function TestimonialBandQuote(handle) {
|
|
66
|
+
return () => {
|
|
67
|
+
let { avatar, children, href, jobTitle, linkLabel, logo, mix, name, variant, ...rest } = handle.props;
|
|
68
|
+
let isFeatured = variant === "featured";
|
|
69
|
+
return (_jsxs("figure", { ...rest, "data-slot": "testimonial-quote", "data-variant": isFeatured ? "featured" : "card", mix: mergeMix([
|
|
70
|
+
vstack({ gap: 6, align: "stretch" }),
|
|
71
|
+
isFeatured
|
|
72
|
+
? [
|
|
73
|
+
landingBandTone("inverse"),
|
|
74
|
+
raw({
|
|
75
|
+
margin: "0",
|
|
76
|
+
padding: "clamp(1.5rem, 1rem + 2cqi, 3rem)",
|
|
77
|
+
borderRadius: "var(--ui-landing-radius-surface, 1rem)",
|
|
78
|
+
}),
|
|
79
|
+
]
|
|
80
|
+
: [landingSurface(), raw({ margin: "0", padding: "1.5rem" })],
|
|
81
|
+
], mix), children: [logo ? (_jsx("div", { "data-slot": "testimonial-logo", mix: [
|
|
82
|
+
fg("neutral.emphasis"),
|
|
83
|
+
when("& > :is(img, svg)", raw({ blockSize: "1.75rem", inlineSize: "auto" })),
|
|
84
|
+
], children: logo })) : null, _jsx("blockquote", { mix: [
|
|
85
|
+
fg("neutral.emphasis"),
|
|
86
|
+
raw(isFeatured
|
|
87
|
+
? {
|
|
88
|
+
margin: "0",
|
|
89
|
+
flexGrow: "1",
|
|
90
|
+
fontSize: "clamp(1.375rem, 1rem + 1.4cqi, 2rem)",
|
|
91
|
+
lineHeight: "1.3",
|
|
92
|
+
fontWeight: "500",
|
|
93
|
+
letterSpacing: "-0.015em",
|
|
94
|
+
textWrap: "pretty",
|
|
95
|
+
}
|
|
96
|
+
: { margin: "0", flexGrow: "1", fontSize: "1rem", lineHeight: "1.75rem" }),
|
|
97
|
+
landingEmphasis(),
|
|
98
|
+
], children: children }), _jsxs("figcaption", { mix: [hstack({ gap: 3 }), items("center")], children: [avatar ? (_jsx("span", { "data-slot": "testimonial-avatar", "aria-hidden": "true", mix: [
|
|
99
|
+
fg("neutral"),
|
|
100
|
+
text("sm"),
|
|
101
|
+
weight("medium"),
|
|
102
|
+
raw({
|
|
103
|
+
display: "inline-grid",
|
|
104
|
+
placeItems: "center",
|
|
105
|
+
flexShrink: "0",
|
|
106
|
+
inlineSize: "2.5rem",
|
|
107
|
+
blockSize: "2.5rem",
|
|
108
|
+
borderRadius: "9999px",
|
|
109
|
+
overflow: "hidden",
|
|
110
|
+
backgroundColor: "var(--ui-neutral-bg-tint)",
|
|
111
|
+
outline: "1px solid var(--ui-image-outline, rgb(0 0 0 / 0.1))",
|
|
112
|
+
outlineOffset: "-1px",
|
|
113
|
+
textTransform: "uppercase",
|
|
114
|
+
}),
|
|
115
|
+
when("& > img", raw({ inlineSize: "100%", blockSize: "100%", objectFit: "cover" })),
|
|
116
|
+
], children: avatar })) : null, _jsxs("span", { mix: [vstack({ gap: 0, align: "start" }), text("sm")], children: [_jsx("span", { mix: [weight("semibold"), fg("neutral.emphasis")], children: name }), jobTitle ? _jsx("span", { mix: [fg("neutral.muted")], children: jobTitle }) : null] })] }), href ? (_jsxs("a", { href: href, "data-slot": "testimonial-link", mix: [storyLink()], children: [linkLabel ?? "Read the story", _jsx("span", { "aria-hidden": "true", children: "\u2192" })] })) : null] }));
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
/**
|
|
120
|
+
* The carousel track: one row of cards at `min(22rem, 85%)`, so a phone shows the next
|
|
121
|
+
* card's edge, scrolling and snapping sideways inside the band with the inline end faded.
|
|
122
|
+
*/
|
|
123
|
+
function carouselTrack() {
|
|
124
|
+
let mask = "linear-gradient(to right, #000 calc(100% - 3rem), transparent)";
|
|
125
|
+
return [
|
|
126
|
+
raw({
|
|
127
|
+
display: "grid",
|
|
128
|
+
gridAutoFlow: "column",
|
|
129
|
+
gridAutoColumns: "min(22rem, 85%)",
|
|
130
|
+
gap: CARD_GAP,
|
|
131
|
+
overflowX: "auto",
|
|
132
|
+
overscrollBehaviorX: "contain",
|
|
133
|
+
scrollSnapType: "x mandatory",
|
|
134
|
+
scrollbarWidth: "none",
|
|
135
|
+
paddingBlock: "2px",
|
|
136
|
+
paddingInlineEnd: "3rem",
|
|
137
|
+
maskImage: mask,
|
|
138
|
+
WebkitMaskImage: mask,
|
|
139
|
+
}),
|
|
140
|
+
when("& > *", raw({ scrollSnapAlign: "start" })),
|
|
141
|
+
when("&::-webkit-scrollbar", raw({ display: "none" })),
|
|
142
|
+
when("&:focus-visible", raw({
|
|
143
|
+
outline: "2px solid var(--ui-focus-ring, var(--ui-brand-border-strong))",
|
|
144
|
+
outlineOffset: "4px",
|
|
145
|
+
})),
|
|
146
|
+
];
|
|
147
|
+
}
|
|
148
|
+
/** The story link: eyebrow-sized, in the brand ink, its arrow nudging on hover. */
|
|
149
|
+
function storyLink() {
|
|
150
|
+
return [
|
|
151
|
+
raw({
|
|
152
|
+
display: "inline-flex",
|
|
153
|
+
alignItems: "center",
|
|
154
|
+
gap: "0.375rem",
|
|
155
|
+
alignSelf: "start",
|
|
156
|
+
fontSize: "0.875rem",
|
|
157
|
+
fontWeight: "500",
|
|
158
|
+
color: "var(--ui-brand-fg)",
|
|
159
|
+
textDecoration: "none",
|
|
160
|
+
}),
|
|
161
|
+
when("&:hover", raw({ textDecoration: "underline", textUnderlineOffset: "4px" })),
|
|
162
|
+
when('[data-variant="featured"] > &', raw({ color: "var(--ui-neutral-fg-emphasis)" })),
|
|
163
|
+
];
|
|
164
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An animated terminal that proves "you write this, it does that": a short spec or command
|
|
3
|
+
* types itself out line by line, then its output prints, holds, and the loop restarts.
|
|
4
|
+
* It wears the terminal panel's chrome, and its static markup is the finished session.
|
|
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 TypedTerminal}.
|
|
12
|
+
*/
|
|
13
|
+
export declare namespace TypedTerminal {
|
|
14
|
+
/** Ink an output line prints in: a pass, a failure, or a quiet aside. */
|
|
15
|
+
type Status = "ok" | "fail" | "muted";
|
|
16
|
+
/** One line of the session. */
|
|
17
|
+
interface Line {
|
|
18
|
+
/** An `input` line types itself out; an `output` line fades in once typed lines finish. */
|
|
19
|
+
kind: "input" | "output";
|
|
20
|
+
/**
|
|
21
|
+
* The line's text, kept on one line and scrolled sideways when it outgrows the panel.
|
|
22
|
+
* An input line types one mono column per UTF-16 unit, so keep it to single-width text.
|
|
23
|
+
*/
|
|
24
|
+
text: string;
|
|
25
|
+
/** Ink of an output line; input lines ignore it. */
|
|
26
|
+
status?: Status;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Props accepted by {@link TypedTerminal}.
|
|
30
|
+
*/
|
|
31
|
+
interface Props extends Omit<TagProps<"div">, "children" | "title"> {
|
|
32
|
+
/** Accessible name of the session's figure. Required — the library ships no copy. */
|
|
33
|
+
"aria-label": string;
|
|
34
|
+
/** Accessible name of the pause toggle. */
|
|
35
|
+
pauseLabel?: string;
|
|
36
|
+
/** Window title, such as a file name or a shell. */
|
|
37
|
+
title?: RemixNode;
|
|
38
|
+
/** Glyph before every input line, such as `$`; omit it for editor-style lines. */
|
|
39
|
+
prompt?: string;
|
|
40
|
+
/** The session, in the order it plays. */
|
|
41
|
+
lines: readonly Line[];
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Renders the session as one `<pre>` in the terminal panel, with its pause toggle in the
|
|
46
|
+
* panel's title bar, centred against the title.
|
|
47
|
+
* Every line's full text is in the markup from the start, clipped only visually while it
|
|
48
|
+
* types, so screen readers and copy read the whole session and reduced motion shows it done.
|
|
49
|
+
*
|
|
50
|
+
* @param handle Runtime handle carrying the host `<div>`'s props.
|
|
51
|
+
* @returns The render function producing the terminal's markup.
|
|
52
|
+
* @example
|
|
53
|
+
* <TypedTerminal
|
|
54
|
+
* aria-label="A sign-in spec and its run"
|
|
55
|
+
* title="sign-in.spec"
|
|
56
|
+
* lines={[
|
|
57
|
+
* { kind: "input", text: 'visit "/login"' },
|
|
58
|
+
* { kind: "output", text: "✓ 1 step · 0.4s", status: "ok" },
|
|
59
|
+
* ]}
|
|
60
|
+
* />
|
|
61
|
+
*/
|
|
62
|
+
export declare function TypedTerminal(handle: Handle<TypedTerminal.Props>): () => import("remix/component").RemixElement;
|