@sdxc/ui 2026.11.27 → 2026.11.29
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 +265 -162
- package/dist/app/app-shell.d.ts +85 -50
- package/dist/app/app-shell.js +419 -222
- package/dist/app/auto-refresh.d.ts +68 -51
- package/dist/app/auto-refresh.js +193 -61
- package/dist/app/board.d.ts +40 -17
- package/dist/app/board.js +173 -88
- package/dist/app/chart.d.ts +10 -63
- package/dist/app/chart.js +22 -29
- package/dist/app/code-view.d.ts +12 -11
- package/dist/app/code-view.js +83 -19
- package/dist/app/command-palette.d.ts +61 -33
- package/dist/app/command-palette.js +178 -32
- package/dist/app/contribution-graph.d.ts +30 -14
- package/dist/app/contribution-graph.js +87 -26
- package/dist/app/danger-zone.d.ts +40 -35
- package/dist/app/danger-zone.js +177 -34
- package/dist/app/detail-sheet.d.ts +42 -51
- package/dist/app/detail-sheet.js +156 -37
- package/dist/app/diff.d.ts +6 -5
- package/dist/app/diff.js +9 -6
- package/dist/app/drop-zone.d.ts +3 -13
- package/dist/app/drop-zone.js +2 -2
- package/dist/app/editor-layout.d.ts +69 -47
- package/dist/app/editor-layout.js +256 -115
- package/dist/app/empty.d.ts +16 -12
- package/dist/app/empty.js +45 -19
- package/dist/app/file-trigger.d.ts +5 -13
- package/dist/app/file-trigger.js +3 -4
- package/dist/app/filter-bar.d.ts +182 -120
- package/dist/app/filter-bar.js +509 -161
- package/dist/app/filter-menu.d.ts +51 -33
- package/dist/app/filter-menu.js +105 -40
- package/dist/app/gantt.d.ts +67 -27
- package/dist/app/gantt.js +320 -163
- package/dist/app/grid-list.d.ts +2 -15
- package/dist/app/grid-list.js +3 -3
- package/dist/app/merge-box.d.ts +58 -52
- package/dist/app/merge-box.js +107 -46
- package/dist/app/mixins/optimistic-toggle-sync.d.ts +2 -2
- package/dist/app/mixins/optimistic-toggle-sync.js +3 -2
- package/dist/app/mixins/range-picker-keys.d.ts +1 -1
- package/dist/app/mixins/range-picker-keys.js +1 -1
- package/dist/app/mixins/save-bar-sync.d.ts +1 -1
- package/dist/app/mixins/save-bar-sync.js +3 -2
- package/dist/app/mixins/split-view.d.ts +3 -1
- package/dist/app/mixins/split-view.js +16 -8
- package/dist/app/optimistic-toggle.d.ts +65 -37
- package/dist/app/optimistic-toggle.js +38 -15
- package/dist/app/page-header.d.ts +80 -58
- package/dist/app/page-header.js +329 -154
- package/dist/app/profile-picker.d.ts +31 -24
- package/dist/app/profile-picker.js +134 -58
- package/dist/app/range-picker.d.ts +62 -59
- package/dist/app/range-picker.js +124 -37
- package/dist/app/review-thread.d.ts +69 -66
- package/dist/app/review-thread.js +203 -53
- package/dist/app/save-bar.d.ts +56 -27
- package/dist/app/save-bar.js +66 -14
- package/dist/app/selection-bar.d.ts +64 -66
- package/dist/app/selection-bar.js +157 -56
- package/dist/app/settings-layout.d.ts +65 -52
- package/dist/app/settings-layout.js +198 -71
- package/dist/app/settings-section.d.ts +86 -93
- package/dist/app/settings-section.js +297 -120
- package/dist/app/shortcut-list.d.ts +19 -8
- package/dist/app/shortcut-list.js +50 -9
- package/dist/app/sparkline.d.ts +14 -16
- package/dist/app/sparkline.js +20 -7
- package/dist/app/split-view.d.ts +66 -42
- package/dist/app/split-view.js +235 -128
- package/dist/app/stat-card.d.ts +16 -4
- package/dist/app/stat-card.js +57 -21
- package/dist/app/status-strip.d.ts +24 -25
- package/dist/app/status-strip.js +82 -25
- package/dist/app/tab-bar.d.ts +15 -7
- package/dist/app/tab-bar.js +74 -37
- package/dist/app/table.d.ts +37 -38
- package/dist/app/table.js +101 -45
- package/dist/app/view-options.d.ts +100 -76
- package/dist/app/view-options.js +263 -129
- package/dist/audio/media-tile.d.ts +33 -21
- package/dist/audio/media-tile.js +139 -79
- package/dist/audio/player-bar.d.ts +24 -43
- package/dist/audio/player-bar.js +183 -118
- package/dist/audio/queue-list.d.ts +40 -36
- package/dist/audio/queue-list.js +172 -73
- package/dist/audio/track-list.d.ts +53 -54
- package/dist/audio/track-list.js +127 -35
- package/dist/blog/archive-list.d.ts +158 -0
- package/dist/blog/archive-list.js +353 -0
- package/dist/blog/article-layout.d.ts +81 -0
- package/dist/blog/article-layout.js +211 -0
- package/dist/blog/author-card.d.ts +99 -0
- package/dist/blog/author-card.js +184 -0
- package/dist/blog/blog-masthead.d.ts +55 -0
- package/dist/blog/blog-masthead.js +143 -0
- package/dist/blog/index.d.ts +21 -0
- package/dist/blog/index.js +21 -0
- package/dist/blog/link-host.d.ts +47 -0
- package/dist/blog/link-host.js +61 -0
- package/dist/blog/newsletter-form.d.ts +66 -0
- package/dist/blog/newsletter-form.js +100 -0
- package/dist/blog/post-byline.d.ts +96 -0
- package/dist/blog/post-byline.js +180 -0
- package/dist/blog/post-entry.d.ts +153 -0
- package/dist/blog/post-entry.js +402 -0
- package/dist/blog/post-stream.d.ts +92 -0
- package/dist/blog/post-stream.js +163 -0
- package/dist/blog/series-nav.d.ts +144 -0
- package/dist/blog/series-nav.js +275 -0
- package/dist/blog/tag-cloud.d.ts +103 -0
- package/dist/blog/tag-cloud.js +138 -0
- package/dist/blog/tag-list.d.ts +91 -0
- package/dist/blog/tag-list.js +92 -0
- package/dist/blog/widget.d.ts +68 -0
- package/dist/blog/widget.js +61 -0
- package/dist/chat/activity.d.ts +47 -15
- package/dist/chat/activity.js +124 -46
- package/dist/chat/mention-menu.d.ts +6 -7
- package/dist/chat/mention-menu.js +4 -4
- package/dist/chat/message-group.d.ts +17 -4
- package/dist/chat/message-group.js +29 -6
- package/dist/color/color-field.d.ts +41 -68
- package/dist/color/color-field.js +21 -38
- package/dist/color/color-picker.d.ts +10 -61
- package/dist/color/color-picker.js +7 -15
- package/dist/color/color-swatch-picker.d.ts +0 -11
- package/dist/color/color-swatch-picker.js +2 -3
- package/dist/color/color-wheel.d.ts +3 -13
- package/dist/color/color-wheel.js +1 -2
- package/dist/commerce/cart-drawer.d.ts +41 -24
- package/dist/commerce/cart-drawer.js +129 -58
- package/dist/commerce/cart-line.d.ts +34 -19
- package/dist/commerce/cart-line.js +94 -28
- package/dist/commerce/checkout-layout.d.ts +23 -19
- package/dist/commerce/checkout-layout.js +53 -24
- package/dist/commerce/facet-filters.d.ts +57 -59
- package/dist/commerce/facet-filters.js +219 -129
- package/dist/commerce/item-options-dialog.d.ts +69 -40
- package/dist/commerce/item-options-dialog.js +231 -104
- package/dist/commerce/menu-item-card.d.ts +36 -20
- package/dist/commerce/menu-item-card.js +114 -61
- package/dist/commerce/option-group.d.ts +46 -27
- package/dist/commerce/option-group.js +123 -52
- package/dist/commerce/order-summary.d.ts +41 -26
- package/dist/commerce/order-summary.js +103 -49
- package/dist/commerce/order-tracker.d.ts +32 -16
- package/dist/commerce/order-tracker.js +91 -66
- package/dist/commerce/price.d.ts +41 -25
- package/dist/commerce/price.js +131 -68
- package/dist/commerce/product-card.d.ts +66 -36
- package/dist/commerce/product-card.js +215 -100
- package/dist/commerce/product-gallery.d.ts +72 -38
- package/dist/commerce/product-gallery.js +187 -82
- package/dist/commerce/promo-code.d.ts +73 -37
- package/dist/commerce/promo-code.js +172 -77
- package/dist/commerce/question-list.d.ts +43 -35
- package/dist/commerce/question-list.js +146 -72
- package/dist/commerce/shipping-estimate.d.ts +68 -33
- package/dist/commerce/shipping-estimate.js +149 -25
- package/dist/commerce/sort-select.d.ts +33 -22
- package/dist/commerce/sort-select.js +55 -26
- package/dist/commerce/variant-picker.d.ts +25 -23
- package/dist/commerce/variant-picker.js +103 -29
- package/dist/{docs → components}/anchor-heading.d.ts +1 -1
- package/dist/{docs → components}/anchor-heading.js +1 -1
- package/dist/components/autocomplete.d.ts +19 -21
- package/dist/components/autocomplete.js +57 -21
- package/dist/components/banner.d.ts +48 -37
- package/dist/components/banner.js +69 -27
- package/dist/components/button.d.ts +2 -18
- package/dist/components/button.js +4 -3
- package/dist/components/callout.d.ts +52 -0
- package/dist/components/callout.js +77 -0
- package/dist/components/checkbox.d.ts +3 -12
- package/dist/components/checkbox.js +1 -2
- package/dist/components/code-block.d.ts +110 -0
- package/dist/{docs → components}/code-block.js +92 -23
- package/dist/components/confirm.d.ts +63 -130
- package/dist/components/confirm.js +133 -52
- package/dist/{docs → components}/copy-button.d.ts +1 -1
- package/dist/{docs → components}/copy-button.js +3 -3
- package/dist/components/date-field.d.ts +40 -60
- package/dist/components/date-field.js +23 -36
- package/dist/components/date-picker.d.ts +11 -67
- package/dist/components/date-picker.js +4 -15
- package/dist/components/date-range-picker.d.ts +20 -91
- package/dist/components/date-range-picker.js +13 -27
- package/dist/components/dialog-dismiss.d.ts +1 -1
- package/dist/components/dialog-dismiss.js +1 -1
- package/dist/components/field-parts.d.ts +158 -0
- package/dist/components/field-parts.js +237 -0
- package/dist/components/filter-links.d.ts +107 -0
- package/dist/components/filter-links.js +120 -0
- package/dist/components/form.d.ts +3 -1
- package/dist/components/form.js +3 -1
- package/dist/components/index.d.ts +14 -7
- package/dist/components/index.js +14 -7
- package/dist/components/listbox.d.ts +0 -9
- package/dist/components/listbox.js +2 -2
- package/dist/components/media-grid.d.ts +15 -16
- package/dist/components/media-grid.js +75 -34
- package/dist/components/pager.d.ts +103 -0
- package/dist/components/pager.js +187 -0
- package/dist/components/property-list.d.ts +38 -39
- package/dist/components/property-list.js +149 -96
- package/dist/components/radio-group.d.ts +0 -11
- package/dist/components/radio-group.js +5 -6
- package/dist/components/range-calendar.d.ts +2 -14
- package/dist/components/range-calendar.js +2 -2
- package/dist/components/range-months.d.ts +12 -2
- package/dist/components/range-months.js +32 -16
- package/dist/components/rating-input.d.ts +14 -6
- package/dist/components/rating-input.js +26 -12
- package/dist/components/rating.d.ts +13 -8
- package/dist/components/rating.js +19 -5
- package/dist/components/review-card.d.ts +51 -26
- package/dist/components/review-card.js +173 -40
- package/dist/components/search-field.js +18 -8
- package/dist/components/section-bar.d.ts +23 -15
- package/dist/components/section-bar.js +59 -37
- package/dist/components/sidebar.d.ts +27 -0
- package/dist/components/sidebar.js +49 -20
- package/dist/{docs → components}/table-of-contents.d.ts +1 -1
- package/dist/{docs → components}/table-of-contents.js +3 -3
- package/dist/components/text-field.d.ts +54 -81
- package/dist/components/text-field.js +30 -44
- package/dist/components/time-field.d.ts +45 -65
- package/dist/components/time-field.js +23 -35
- package/dist/components/timeline.d.ts +80 -86
- package/dist/components/timeline.js +383 -170
- package/dist/components/typeset.d.ts +5 -0
- package/dist/components/typeset.js +17 -2
- package/dist/docs/code-tabs.d.ts +50 -24
- package/dist/docs/code-tabs.js +91 -25
- package/dist/docs/docs-feedback.d.ts +70 -27
- package/dist/docs/docs-feedback.js +156 -27
- package/dist/docs/docs-footer.d.ts +36 -22
- package/dist/docs/docs-footer.js +76 -23
- package/dist/docs/docs-hub.d.ts +103 -73
- package/dist/docs/docs-hub.js +333 -83
- package/dist/docs/docs-layout.d.ts +111 -42
- package/dist/docs/docs-layout.js +371 -97
- package/dist/docs/docs-nav-tools.d.ts +11 -7
- package/dist/docs/docs-nav-tools.js +4 -3
- package/dist/docs/docs-nav.d.ts +53 -17
- package/dist/docs/docs-nav.js +125 -14
- package/dist/docs/docs-not-found.d.ts +61 -35
- package/dist/docs/docs-not-found.js +198 -52
- package/dist/docs/docs-page-header.d.ts +47 -30
- package/dist/docs/docs-page-header.js +114 -31
- package/dist/docs/docs-pager.d.ts +43 -27
- package/dist/docs/docs-pager.js +73 -23
- package/dist/docs/file-tree.d.ts +16 -6
- package/dist/docs/file-tree.js +19 -4
- package/dist/docs/index.d.ts +0 -7
- package/dist/docs/index.js +0 -7
- package/dist/docs/install-command.d.ts +7 -6
- package/dist/docs/install-command.js +8 -10
- package/dist/docs/mixins/docs-nav-tools.js +1 -1
- package/dist/docs/next-steps.d.ts +56 -23
- package/dist/docs/next-steps.js +121 -35
- package/dist/docs/page-actions.d.ts +68 -46
- package/dist/docs/page-actions.js +129 -21
- package/dist/docs/steps.d.ts +14 -11
- package/dist/docs/steps.js +36 -18
- package/dist/docs/ui-label.d.ts +7 -6
- package/dist/docs/ui-label.js +21 -8
- package/dist/finance/ledger.d.ts +33 -29
- package/dist/finance/ledger.js +190 -43
- package/dist/finance/payment-card.d.ts +43 -31
- package/dist/finance/payment-card.js +170 -67
- package/dist/landing/author-band.d.ts +57 -54
- package/dist/landing/author-band.js +218 -64
- package/dist/landing/case-study.d.ts +57 -57
- package/dist/landing/case-study.js +148 -17
- package/dist/landing/changelog-strip.d.ts +56 -36
- package/dist/landing/changelog-strip.js +176 -68
- package/dist/landing/closing-cta.d.ts +21 -41
- package/dist/landing/closing-cta.js +13 -19
- package/dist/landing/code-stage.d.ts +55 -47
- package/dist/landing/code-stage.js +198 -67
- package/dist/landing/contributor-wall.d.ts +4 -4
- package/dist/landing/contributor-wall.js +4 -4
- package/dist/landing/curriculum.d.ts +74 -45
- package/dist/landing/curriculum.js +220 -62
- package/dist/landing/drawn-chart.d.ts +18 -10
- package/dist/landing/drawn-chart.js +57 -26
- package/dist/landing/episode-player.d.ts +69 -43
- package/dist/landing/episode-player.js +213 -48
- package/dist/landing/event-ticker.d.ts +13 -7
- package/dist/landing/event-ticker.js +67 -32
- package/dist/landing/fan-out-diagram.d.ts +19 -8
- package/dist/landing/fan-out-diagram.js +60 -19
- package/dist/landing/faq-band.d.ts +30 -48
- package/dist/landing/faq-band.js +37 -30
- package/dist/landing/feature-band.d.ts +48 -76
- package/dist/landing/feature-band.js +71 -49
- package/dist/landing/flow-diagram.d.ts +16 -8
- package/dist/landing/flow-diagram.js +50 -18
- package/dist/landing/install-tabs.d.ts +16 -14
- package/dist/landing/install-tabs.js +87 -39
- package/dist/landing/landing-header.d.ts +75 -66
- package/dist/landing/landing-header.js +284 -57
- package/dist/landing/landing-hero.d.ts +59 -87
- package/dist/landing/landing-hero.js +157 -128
- package/dist/landing/landing-section.d.ts +0 -9
- package/dist/landing/landing-section.js +1 -2
- package/dist/landing/logo-cloud.d.ts +26 -9
- package/dist/landing/logo-cloud.js +62 -18
- package/dist/landing/phone-fan.d.ts +15 -7
- package/dist/landing/phone-fan.js +60 -17
- package/dist/landing/price-list.d.ts +29 -22
- package/dist/landing/price-list.js +175 -77
- package/dist/landing/pricing-band.d.ts +46 -53
- package/dist/landing/pricing-band.js +167 -51
- package/dist/landing/product-frame.d.ts +44 -42
- package/dist/landing/product-frame.js +182 -85
- package/dist/landing/proof-strip.d.ts +7 -2
- package/dist/landing/proof-strip.js +7 -2
- package/dist/landing/rails.d.ts +1 -1
- package/dist/landing/rails.js +1 -1
- package/dist/landing/segmented-stage.d.ts +19 -8
- package/dist/landing/segmented-stage.js +60 -16
- package/dist/landing/sequence-diagram.d.ts +18 -8
- package/dist/landing/sequence-diagram.js +49 -18
- package/dist/landing/site-footer.d.ts +89 -68
- package/dist/landing/site-footer.js +344 -111
- package/dist/landing/site-header.d.ts +118 -80
- package/dist/landing/site-header.js +482 -67
- package/dist/landing/sponsor-wall.d.ts +34 -15
- package/dist/landing/sponsor-wall.js +111 -34
- package/dist/landing/stat-strip.d.ts +7 -9
- package/dist/landing/stat-strip.js +57 -22
- package/dist/landing/step-list.d.ts +18 -21
- package/dist/landing/step-list.js +132 -38
- package/dist/landing/tabbed-stage.d.ts +23 -15
- package/dist/landing/tabbed-stage.js +103 -21
- package/dist/landing/testimonial-band.d.ts +58 -61
- package/dist/landing/testimonial-band.js +209 -71
- package/dist/landing/typed-terminal.d.ts +9 -6
- package/dist/landing/typed-terminal.js +16 -5
- package/dist/landing/usage-estimate.d.ts +83 -74
- package/dist/landing/usage-estimate.js +254 -113
- package/dist/landing/utils/has-parts.d.ts +17 -0
- package/dist/landing/utils/has-parts.js +24 -0
- package/dist/map/map-canvas.d.ts +15 -16
- package/dist/map/map-canvas.js +40 -24
- package/dist/map/map.d.ts +42 -33
- package/dist/map/map.js +149 -38
- package/dist/mixins/aria-checked.d.ts +1 -4
- package/dist/mixins/aria-checked.js +1 -4
- package/dist/mixins/clear-field.d.ts +2 -4
- package/dist/mixins/clear-field.js +2 -4
- package/dist/mixins/index.d.ts +2 -0
- package/dist/mixins/index.js +2 -0
- package/dist/schedule/agenda.d.ts +69 -41
- package/dist/schedule/agenda.js +273 -134
- package/dist/schedule/day-strip.d.ts +38 -26
- package/dist/schedule/day-strip.js +119 -88
- package/dist/test/map.d.ts +1 -1
- package/dist/test/map.js +1 -6
- package/dist/test/reels.js +1 -1
- package/dist/test/stories.js +2 -2
- package/dist/travel/boarding-pass.d.ts +94 -70
- package/dist/travel/boarding-pass.js +341 -144
- package/dist/travel/car-offer.d.ts +109 -49
- package/dist/travel/car-offer.js +424 -64
- package/dist/travel/fare-options.d.ts +58 -34
- package/dist/travel/fare-options.js +210 -69
- package/dist/travel/flight-itinerary.d.ts +62 -55
- package/dist/travel/flight-itinerary.js +230 -55
- package/dist/travel/flight-option.d.ts +65 -33
- package/dist/travel/flight-option.js +250 -69
- package/dist/travel/flight-segment.d.ts +121 -70
- package/dist/travel/flight-segment.js +358 -96
- package/dist/travel/package-savings.d.ts +79 -39
- package/dist/travel/package-savings.js +309 -65
- package/dist/travel/price-breakdown.d.ts +30 -22
- package/dist/travel/price-breakdown.js +72 -17
- package/dist/travel/rating-breakdown.d.ts +25 -18
- package/dist/travel/rating-breakdown.js +60 -23
- package/dist/travel/seat-map.d.ts +29 -22
- package/dist/travel/seat-map.js +140 -78
- package/dist/travel/trip-timeline.d.ts +77 -39
- package/dist/travel/trip-timeline.js +316 -107
- package/dist/utils/eyebrow.d.ts +2 -2
- package/dist/utils/eyebrow.js +3 -3
- package/dist/utils/index.d.ts +0 -1
- package/dist/utils/index.js +0 -1
- package/dist/video/episode-list.d.ts +22 -14
- package/dist/video/episode-list.js +89 -53
- package/dist/video/reel-feed.d.ts +21 -15
- package/dist/video/reel-feed.js +59 -24
- package/dist/video/story-viewer.d.ts +6 -5
- package/dist/video/story-viewer.js +84 -53
- package/dist/video/title-hero.d.ts +8 -8
- package/dist/video/title-hero.js +48 -34
- package/dist/video/video-card.d.ts +34 -20
- package/dist/video/video-card.js +119 -76
- package/dist/video/video-player.d.ts +17 -14
- package/dist/video/video-player.js +68 -30
- package/dist/video/video-shelf.d.ts +26 -14
- package/dist/video/video-shelf.js +88 -50
- package/package.json +4 -2
- package/dist/docs/callout.d.ts +0 -46
- package/dist/docs/callout.js +0 -61
- package/dist/docs/code-block.d.ts +0 -74
- package/dist/utils/field-parts.d.ts +0 -26
- package/dist/utils/field-parts.js +0 -12
- /package/dist/{docs/mixins → mixins}/copy-feedback.d.ts +0 -0
- /package/dist/{docs/mixins → mixins}/copy-feedback.js +0 -0
- /package/dist/{docs/mixins → mixins}/toc-spy.d.ts +0 -0
- /package/dist/{docs/mixins → mixins}/toc-spy.js +0 -0
- /package/dist/{docs/utils → utils}/reveal-in-scroller.d.ts +0 -0
- /package/dist/{docs/utils → utils}/reveal-in-scroller.js +0 -0
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "remix/component/jsx-runtime";
|
|
2
2
|
import { keyframes } from "@sdxc/u/animation";
|
|
3
|
-
import { raw } from "@sdxc/u/general";
|
|
3
|
+
import { mergeMix, raw } from "@sdxc/u/general";
|
|
4
4
|
import { motionSafe } from "@sdxc/u/responsive";
|
|
5
|
+
import { when } from "@sdxc/u/state";
|
|
5
6
|
import { landingSurface } from "../styles/landing.js";
|
|
6
7
|
import { MotionLoop } from "./motion-loop.js";
|
|
7
8
|
/** Length of one loop: the rows land, the feed holds, then it empties for the next loop. */
|
|
@@ -34,6 +35,8 @@ const STATUS_TONES = {
|
|
|
34
35
|
fail: "danger",
|
|
35
36
|
pending: "neutral",
|
|
36
37
|
};
|
|
38
|
+
/** Selects a ticker's title among the surface's children. */
|
|
39
|
+
const TITLE = "[data-event-ticker-part='title']";
|
|
37
40
|
/**
|
|
38
41
|
* Renders the feed as an ordered list on a raised surface inside a {@link MotionLoop}.
|
|
39
42
|
* Each row opens in its turn at the top and pushes the older ones down; a hidden copy of
|
|
@@ -45,14 +48,15 @@ const STATUS_TONES = {
|
|
|
45
48
|
* @example
|
|
46
49
|
* <EventTicker
|
|
47
50
|
* aria-label="Recent checks"
|
|
48
|
-
* title="Checkout flow"
|
|
49
51
|
* rows={[{ time: "09:40", label: "Run passed", status: "ok" }]}
|
|
50
52
|
* statusLabels={{ ok: "Passed", warn: "Slow", fail: "Failed", pending: "Running" }}
|
|
51
|
-
*
|
|
53
|
+
* >
|
|
54
|
+
* <EventTicker.Title>Checkout flow</EventTicker.Title>
|
|
55
|
+
* </EventTicker>
|
|
52
56
|
*/
|
|
53
57
|
export function EventTicker(handle) {
|
|
54
58
|
return () => {
|
|
55
|
-
let { "aria-label": label,
|
|
59
|
+
let { "aria-label": label, children, mix, pauseLabel, rows, statusLabels, ...rest } = handle.props;
|
|
56
60
|
let timing = timingFor(rows.length);
|
|
57
61
|
let newestFirst = rows.map((row, index) => ({ row, index })).reverse();
|
|
58
62
|
return (_jsx(MotionLoop, { ...rest, pauseLabel: pauseLabel, placement: "start-end", mix: mix, children: _jsxs("div", { "data-slot": "event-ticker", mix: [
|
|
@@ -61,40 +65,71 @@ export function EventTicker(handle) {
|
|
|
61
65
|
display: "grid",
|
|
62
66
|
gap: "0.75rem",
|
|
63
67
|
padding: "clamp(1.25rem, 4cqi, 2rem)",
|
|
68
|
+
paddingBlockStart: "3.25rem",
|
|
64
69
|
}),
|
|
65
|
-
|
|
66
|
-
], children: [
|
|
67
|
-
raw({
|
|
68
|
-
display: "flex",
|
|
69
|
-
alignItems: "center",
|
|
70
|
-
gap: "0.5rem",
|
|
71
|
-
minBlockSize: "2rem",
|
|
72
|
-
paddingInlineEnd: PAUSE_CLEARANCE,
|
|
73
|
-
}),
|
|
74
|
-
], children: [_jsx("span", { "aria-hidden": "true", mix: [liveDot()] }), _jsx("span", { mix: [
|
|
75
|
-
raw({
|
|
76
|
-
fontSize: "0.9375rem",
|
|
77
|
-
lineHeight: "1.5rem",
|
|
78
|
-
fontWeight: "600",
|
|
79
|
-
color: "var(--ui-neutral-fg-emphasis)",
|
|
80
|
-
minInlineSize: "0",
|
|
81
|
-
}),
|
|
82
|
-
], children: title })] })), _jsxs("div", { mix: [raw({ display: "grid", alignItems: "start" })], children: [_jsx("ol", { "aria-label": label, mix: [list()], children: newestFirst.map(({ row, index }) => (_jsx(RowItem, { row: row, index: index, timing: timing, statusLabels: statusLabels }, index))) }), _jsx("ol", { "aria-hidden": "true", inert: true, "data-slot": "event-ticker-sizer", mix: [
|
|
70
|
+
when(`&:has(> ${TITLE})`, raw({ paddingBlockStart: "clamp(1.25rem, 4cqi, 2rem)" })),
|
|
71
|
+
], children: [children, _jsxs("div", { mix: [raw({ display: "grid", alignItems: "start" })], children: [_jsx("ol", { "aria-label": label, mix: [list()], children: newestFirst.map(({ row, index }) => (_jsx(RowItem, { row: row, index: index, timing: timing, statusLabels: statusLabels }, index))) }), _jsx("ol", { "aria-hidden": "true", inert: true, "data-slot": "event-ticker-sizer", mix: [
|
|
83
72
|
list(),
|
|
84
73
|
raw({ display: "none", visibility: "hidden" }),
|
|
85
74
|
motionSafe(raw({ display: "grid" })),
|
|
86
|
-
], children: newestFirst.map(({ row, index }) => (_jsx(RowItem, { row: row, index: index, statusLabels: statusLabels }, index))) })] })
|
|
87
|
-
quiet(),
|
|
88
|
-
raw({
|
|
89
|
-
display: "flex",
|
|
90
|
-
flexWrap: "wrap",
|
|
91
|
-
alignItems: "center",
|
|
92
|
-
gap: "0.375rem",
|
|
93
|
-
paddingBlockStart: "0.25rem",
|
|
94
|
-
}),
|
|
95
|
-
], children: footnote }))] }) }));
|
|
75
|
+
], children: newestFirst.map(({ row, index }) => (_jsx(RowItem, { row: row, index: index, statusLabels: statusLabels }, index))) })] })] }) }));
|
|
96
76
|
};
|
|
97
77
|
}
|
|
78
|
+
/**
|
|
79
|
+
* The header line over the feed, drawn beside a pulsing live dot and kept clear of the pause
|
|
80
|
+
* toggle in the surface's corner. It sits over the feed wherever it is written.
|
|
81
|
+
*
|
|
82
|
+
* @param handle Runtime handle carrying the host `<div>`'s props.
|
|
83
|
+
* @returns The render function producing the header.
|
|
84
|
+
* @example <EventTicker.Title>Checkout flow</EventTicker.Title>
|
|
85
|
+
*/
|
|
86
|
+
EventTicker.Title = function EventTickerTitle(handle) {
|
|
87
|
+
return () => {
|
|
88
|
+
let { children, mix, ...rest } = handle.props;
|
|
89
|
+
return (_jsxs("div", { ...rest, "data-slot": "event-ticker-title", "data-event-ticker-part": "title", mix: mergeMix([
|
|
90
|
+
raw({
|
|
91
|
+
order: "-1",
|
|
92
|
+
display: "flex",
|
|
93
|
+
alignItems: "center",
|
|
94
|
+
gap: "0.5rem",
|
|
95
|
+
minBlockSize: "2rem",
|
|
96
|
+
paddingInlineEnd: PAUSE_CLEARANCE,
|
|
97
|
+
}),
|
|
98
|
+
], mix), children: [_jsx("span", { "aria-hidden": "true", mix: [liveDot()] }), _jsx("span", { mix: [
|
|
99
|
+
raw({
|
|
100
|
+
fontSize: "0.9375rem",
|
|
101
|
+
lineHeight: "1.5rem",
|
|
102
|
+
fontWeight: "600",
|
|
103
|
+
color: "var(--ui-neutral-fg-emphasis)",
|
|
104
|
+
minInlineSize: "0",
|
|
105
|
+
}),
|
|
106
|
+
], children: children })] }));
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
/**
|
|
110
|
+
* A quiet note under the feed, such as how often the checks run; an icon written before its
|
|
111
|
+
* text sits centred beside it. It sits under the feed wherever it is written.
|
|
112
|
+
*
|
|
113
|
+
* @param handle Runtime handle carrying the host `<div>`'s props.
|
|
114
|
+
* @returns The render function producing the note.
|
|
115
|
+
* @example <EventTicker.Footnote>Checks run every minute</EventTicker.Footnote>
|
|
116
|
+
*/
|
|
117
|
+
EventTicker.Footnote = function EventTickerFootnote(handle) {
|
|
118
|
+
return () => {
|
|
119
|
+
let { mix, ...rest } = handle.props;
|
|
120
|
+
return (_jsx("div", { ...rest, "data-slot": "event-ticker-footnote", "data-event-ticker-part": "footnote", mix: mergeMix([
|
|
121
|
+
quiet(),
|
|
122
|
+
raw({
|
|
123
|
+
order: "1",
|
|
124
|
+
display: "flex",
|
|
125
|
+
flexWrap: "wrap",
|
|
126
|
+
alignItems: "center",
|
|
127
|
+
gap: "0.375rem",
|
|
128
|
+
paddingBlockStart: "0.25rem",
|
|
129
|
+
}),
|
|
130
|
+
], mix) }));
|
|
131
|
+
};
|
|
132
|
+
};
|
|
98
133
|
/** Spreads `count` rows over {@link ROWS_SPAN}, never further apart than {@link MAX_ROW_GAP}. */
|
|
99
134
|
function timingFor(count) {
|
|
100
135
|
return { count, gap: count > 0 ? Math.min(MAX_ROW_GAP, ROWS_SPAN / count) : MAX_ROW_GAP };
|
|
@@ -32,7 +32,7 @@ export declare namespace FanOutDiagram {
|
|
|
32
32
|
/**
|
|
33
33
|
* Props accepted by {@link FanOutDiagram}.
|
|
34
34
|
*/
|
|
35
|
-
interface Props extends
|
|
35
|
+
interface Props extends TagProps<"div"> {
|
|
36
36
|
/** Accessible name of the diagram's figure. Required — the library ships no copy. */
|
|
37
37
|
"aria-label": string;
|
|
38
38
|
/** Accessible name of the pause toggle. */
|
|
@@ -46,10 +46,16 @@ export declare namespace FanOutDiagram {
|
|
|
46
46
|
* @default "out"
|
|
47
47
|
*/
|
|
48
48
|
direction?: Direction;
|
|
49
|
-
/**
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
49
|
+
/**
|
|
50
|
+
* {@link FanOutDiagram.Outcome} and {@link FanOutDiagram.Footnote}, set on a ruled line
|
|
51
|
+
* under the figure; the line is left out when neither is given.
|
|
52
|
+
*/
|
|
53
|
+
children?: RemixNode;
|
|
54
|
+
}
|
|
55
|
+
/** What {@link FanOutDiagram} resolves for its parts: the shape that sets their timing. */
|
|
56
|
+
interface Context {
|
|
57
|
+
direction: Direction;
|
|
58
|
+
count: number;
|
|
53
59
|
}
|
|
54
60
|
}
|
|
55
61
|
/**
|
|
@@ -64,7 +70,12 @@ export declare namespace FanOutDiagram {
|
|
|
64
70
|
* aria-label="One fetch, every reader"
|
|
65
71
|
* source={{ icon: <RssIcon size={14} />, title: "Feed fetched", detail: "GET /feed.xml" }}
|
|
66
72
|
* targets={[{ title: "Ana", detail: "+3 posts" }, { title: "Ben", detail: "+3 posts" }]}
|
|
67
|
-
*
|
|
68
|
-
*
|
|
73
|
+
* >
|
|
74
|
+
* <FanOutDiagram.Outcome>Delivered to 2 readers</FanOutDiagram.Outcome>
|
|
75
|
+
* </FanOutDiagram>
|
|
69
76
|
*/
|
|
70
|
-
export declare function FanOutDiagram(handle: Handle<FanOutDiagram.Props>): () => import("remix/component").RemixElement;
|
|
77
|
+
export declare function FanOutDiagram(handle: Handle<FanOutDiagram.Props, FanOutDiagram.Context>): () => import("remix/component").RemixElement;
|
|
78
|
+
export declare namespace FanOutDiagram {
|
|
79
|
+
var Outcome: (handle: Handle<TagProps<"span">>) => () => import("remix/component").RemixElement;
|
|
80
|
+
var Footnote: (handle: Handle<TagProps<"span">>) => () => import("remix/component").RemixElement;
|
|
81
|
+
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "remix/component/jsx-runtime";
|
|
2
2
|
import { CheckIcon } from "@sdxc/icons";
|
|
3
3
|
import { keyframes } from "@sdxc/u/animation";
|
|
4
|
-
import { raw } from "@sdxc/u/general";
|
|
4
|
+
import { mergeMix, raw } from "@sdxc/u/general";
|
|
5
5
|
import { container } from "@sdxc/u/layout";
|
|
6
6
|
import { at, motionSafe } from "@sdxc/u/responsive";
|
|
7
7
|
import { landingSurface } from "../styles/landing.js";
|
|
8
8
|
import { MotionLoop } from "./motion-loop.js";
|
|
9
|
+
import { hasParts } from "./utils/has-parts.js";
|
|
9
10
|
/** Length of one loop: the pulse travels, every target lights, the outcome holds, then resets. */
|
|
10
11
|
const CYCLE_SECONDS = 10;
|
|
11
12
|
/** Percent of the cycle at which every lit element goes dark again for the next loop. */
|
|
@@ -49,13 +50,15 @@ const PULSE = "0.5rem";
|
|
|
49
50
|
* aria-label="One fetch, every reader"
|
|
50
51
|
* source={{ icon: <RssIcon size={14} />, title: "Feed fetched", detail: "GET /feed.xml" }}
|
|
51
52
|
* targets={[{ title: "Ana", detail: "+3 posts" }, { title: "Ben", detail: "+3 posts" }]}
|
|
52
|
-
*
|
|
53
|
-
*
|
|
53
|
+
* >
|
|
54
|
+
* <FanOutDiagram.Outcome>Delivered to 2 readers</FanOutDiagram.Outcome>
|
|
55
|
+
* </FanOutDiagram>
|
|
54
56
|
*/
|
|
55
57
|
export function FanOutDiagram(handle) {
|
|
56
58
|
return () => {
|
|
57
|
-
let { "aria-label": label, direction = "out",
|
|
59
|
+
let { "aria-label": label, children, direction = "out", mix, pauseLabel, source, targets, ...rest } = handle.props;
|
|
58
60
|
let timing = timingFor(direction, targets.length);
|
|
61
|
+
handle.context.set({ direction, count: targets.length });
|
|
59
62
|
let narrow = layoutFor(direction, targets.length, Math.min(targets.length, 2));
|
|
60
63
|
let wide = layoutFor(direction, targets.length, Math.min(targets.length, 3));
|
|
61
64
|
let sourceNode = _jsx(SourceRow, { source: source, timing: timing });
|
|
@@ -87,22 +90,60 @@ export function FanOutDiagram(handle) {
|
|
|
87
90
|
gridTemplateColumns: "var(--ui-fan-cols-n)",
|
|
88
91
|
paddingInlineStart: "var(--ui-fan-gutter-n)",
|
|
89
92
|
}),
|
|
90
|
-
], children: targets.map((target, index) => (_jsx(TargetCell, { target: target, index: index, timing: timing, narrow: narrow.cells[index], wide: wide.cells[index], narrowWraps: narrow.rows > 1, wideWraps: wide.rows > 1 }, index))) }), direction === "in" ? trunk : null, direction === "in" ? sourceNode : null] }),
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
93
|
+
], children: targets.map((target, index) => (_jsx(TargetCell, { target: target, index: index, timing: timing, narrow: narrow.cells[index], wide: wide.cells[index], narrowWraps: narrow.rows > 1, wideWraps: wide.rows > 1 }, index))) }), direction === "in" ? trunk : null, direction === "in" ? sourceNode : null] }), hasParts(children) ? (_jsx("div", { "data-slot": "fan-out-diagram-footer", mix: [footerRow()], children: children })) : null] }) }));
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* The result badge that fades in once every target lit, such as "Delivered to 4", with a
|
|
98
|
+
* check mark before its text. Without motion it shows from the start.
|
|
99
|
+
*
|
|
100
|
+
* @param handle Runtime handle carrying the host `<span>`'s props.
|
|
101
|
+
* @returns The render function producing the badge.
|
|
102
|
+
* @example <FanOutDiagram.Outcome>Delivered to 4 readers</FanOutDiagram.Outcome>
|
|
103
|
+
*/
|
|
104
|
+
FanOutDiagram.Outcome = function FanOutDiagramOutcome(handle) {
|
|
105
|
+
return () => {
|
|
106
|
+
let { children, mix, ...rest } = handle.props;
|
|
107
|
+
return (_jsxs("span", { ...rest, "data-slot": "fan-out-diagram-outcome", mix: mergeMix([outcomeBadge(partTiming(handle))], mix), children: [_jsx(CheckIcon, { size: 14, strokeWidth: 2.5, "aria-hidden": "true" }), children] }));
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
/**
|
|
111
|
+
* A quiet note across the ruled line from the outcome, appearing with it; an icon written
|
|
112
|
+
* before its text sits centred beside it.
|
|
113
|
+
*
|
|
114
|
+
* @param handle Runtime handle carrying the host `<span>`'s props.
|
|
115
|
+
* @returns The render function producing the note.
|
|
116
|
+
* @example <FanOutDiagram.Footnote>One request per feed</FanOutDiagram.Footnote>
|
|
117
|
+
*/
|
|
118
|
+
FanOutDiagram.Footnote = function FanOutDiagramFootnote(handle) {
|
|
119
|
+
return () => {
|
|
120
|
+
let { mix, ...rest } = handle.props;
|
|
121
|
+
return (_jsx("span", { ...rest, "data-slot": "fan-out-diagram-footnote", mix: mergeMix([
|
|
122
|
+
detail(),
|
|
123
|
+
raw({ display: "inline-flex", alignItems: "center", gap: "0.375rem" }),
|
|
124
|
+
appearsWithOutcome(partTiming(handle)),
|
|
125
|
+
], mix) }));
|
|
105
126
|
};
|
|
127
|
+
};
|
|
128
|
+
/**
|
|
129
|
+
* The timing of the diagram a part sits in, read from its context; a part rendered alone
|
|
130
|
+
* times itself as an outward diagram with no targets.
|
|
131
|
+
*/
|
|
132
|
+
function partTiming(handle) {
|
|
133
|
+
let context = handle.context.get(FanOutDiagram);
|
|
134
|
+
return timingFor(context?.direction ?? "out", context?.count ?? 0);
|
|
135
|
+
}
|
|
136
|
+
/** The ruled line under the figure that spreads the outcome and footnote to either end. */
|
|
137
|
+
function footerRow() {
|
|
138
|
+
return raw({
|
|
139
|
+
display: "flex",
|
|
140
|
+
flexWrap: "wrap",
|
|
141
|
+
alignItems: "center",
|
|
142
|
+
justifyContent: "space-between",
|
|
143
|
+
gap: "0.75rem",
|
|
144
|
+
paddingBlockStart: "1.25rem",
|
|
145
|
+
borderBlockStart: "1px solid var(--ui-landing-hairline, var(--ui-neutral-border))",
|
|
146
|
+
});
|
|
106
147
|
}
|
|
107
148
|
/**
|
|
108
149
|
* Applies `narrowStyles`, whose values read `-n` custom properties, and the same
|
|
@@ -1,70 +1,52 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* FAQ band: a {@link LandingHeader} over one or two
|
|
3
|
-
* columns. The page supplies every question and answer as accordion children.
|
|
2
|
+
* FAQ band, as pieces a caller arranges: a {@link LandingHeader} over one or two
|
|
3
|
+
* {@link Accordion} columns. The page supplies every question and answer as accordion children.
|
|
4
4
|
*
|
|
5
5
|
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
6
6
|
* @copyright Sergio Xalambrí 2026
|
|
7
7
|
*/
|
|
8
8
|
import type { Handle, Props as TagProps, RemixNode } from "remix/component";
|
|
9
9
|
import { LandingSection } from "./landing-section.js";
|
|
10
|
-
/**
|
|
11
|
-
* Prop types for {@link FaqBand}.
|
|
12
|
-
*/
|
|
10
|
+
/** Prop types for {@link FaqBand} and its parts. */
|
|
13
11
|
export declare namespace FaqBand {
|
|
14
|
-
/**
|
|
15
|
-
* How many accordion columns to lay out above the stack breakpoint.
|
|
16
|
-
*/
|
|
12
|
+
/** How many accordion columns to lay out above the stack breakpoint. */
|
|
17
13
|
type Columns = 1 | 2;
|
|
18
|
-
/**
|
|
19
|
-
* Band fill forwarded to {@link LandingSection}.
|
|
20
|
-
*/
|
|
14
|
+
/** Band fill forwarded to {@link LandingSection}. */
|
|
21
15
|
type Tone = LandingSection.Tone;
|
|
22
|
-
/**
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
interface PartsProps {
|
|
26
|
-
/** Styling for the header title. */
|
|
27
|
-
title?: TagProps<"h1">["mix"];
|
|
28
|
-
/** Styling for the header lead. */
|
|
29
|
-
description?: TagProps<"p">["mix"];
|
|
30
|
-
/** Styling for the accordion column grid. */
|
|
31
|
-
columns?: TagProps<"div">["mix"];
|
|
16
|
+
/** What the band resolves once for its questions. */
|
|
17
|
+
interface Context {
|
|
18
|
+
columns: Columns;
|
|
32
19
|
}
|
|
33
|
-
/**
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
interface Props extends Omit<LandingSection.Props, "children" | "tone" | "title" | "parts"> {
|
|
37
|
-
/** Column count. Defaults to {@link DEFAULT_COLUMNS}. */
|
|
20
|
+
/** Every {@link LandingSection} prop, plus the band's column count. */
|
|
21
|
+
interface Props extends Omit<LandingSection.Props, "children" | "parts" | "tone"> {
|
|
22
|
+
/** @default 1 */
|
|
38
23
|
columns?: Columns;
|
|
39
|
-
/**
|
|
24
|
+
/** @default "plain" */
|
|
40
25
|
tone?: Tone;
|
|
41
|
-
/**
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* Accordion column(s). Pass one {@link Accordion} for a single column,
|
|
49
|
-
* or two for a split FAQ — the band lays them in a responsive grid.
|
|
50
|
-
*/
|
|
26
|
+
/** A {@link LandingHeader} and the band's `.Questions`. */
|
|
27
|
+
children: RemixNode;
|
|
28
|
+
}
|
|
29
|
+
/** Every native `<div>` attribute. */
|
|
30
|
+
interface QuestionsProps extends TagProps<"div"> {
|
|
31
|
+
/** One {@link Accordion} per column. */
|
|
51
32
|
children: RemixNode;
|
|
52
|
-
/** Per-part styling for title, lead, and columns. */
|
|
53
|
-
parts?: PartsProps;
|
|
54
33
|
}
|
|
55
34
|
}
|
|
56
35
|
/**
|
|
57
|
-
* Renders a FAQ band
|
|
58
|
-
* Stacked columns sit `--ui-landing-faq-gap` apart (0 by default, so hairline
|
|
59
|
-
* rows read as one list); a page whose questions are cards sets it to the gap
|
|
60
|
-
* between its cards, so the seam between columns matches every other gap.
|
|
36
|
+
* Renders a FAQ band that stacks its {@link LandingHeader} over its `.Questions`.
|
|
61
37
|
*
|
|
62
38
|
* @param handle Runtime handle carrying the band's props.
|
|
63
|
-
* @returns The render function producing the band
|
|
39
|
+
* @returns The render function producing the band.
|
|
64
40
|
* @example
|
|
65
|
-
* <FaqBand
|
|
66
|
-
* <
|
|
67
|
-
* <
|
|
41
|
+
* <FaqBand columns={2}>
|
|
42
|
+
* <LandingHeader><LandingHeader.Title>{t("faq.title")}</LandingHeader.Title></LandingHeader>
|
|
43
|
+
* <FaqBand.Questions>
|
|
44
|
+
* <Accordion>{leftItems}</Accordion>
|
|
45
|
+
* <Accordion>{rightItems}</Accordion>
|
|
46
|
+
* </FaqBand.Questions>
|
|
68
47
|
* </FaqBand>
|
|
69
48
|
*/
|
|
70
|
-
export declare function FaqBand(handle: Handle<FaqBand.Props>): () => import("remix/component").RemixElement;
|
|
49
|
+
export declare function FaqBand(handle: Handle<FaqBand.Props, FaqBand.Context>): () => import("remix/component").RemixElement;
|
|
50
|
+
export declare namespace FaqBand {
|
|
51
|
+
var Questions: (handle: Handle<FaqBand.QuestionsProps>) => () => import("remix/component").RemixElement;
|
|
52
|
+
}
|
package/dist/landing/faq-band.js
CHANGED
|
@@ -1,43 +1,50 @@
|
|
|
1
|
-
import { jsx as _jsx
|
|
1
|
+
import { jsx as _jsx } from "remix/component/jsx-runtime";
|
|
2
|
+
import { mergeMix } from "@sdxc/u/general";
|
|
2
3
|
import { container, gap, grid, gridTemplate, vstack } from "@sdxc/u/layout";
|
|
3
4
|
import { at } from "@sdxc/u/responsive";
|
|
4
|
-
import { LandingHeader } from "./landing-header.js";
|
|
5
5
|
import { LandingSection } from "./landing-section.js";
|
|
6
|
-
/** How many accordion columns {@link FaqBand} uses when `columns` is omitted. */
|
|
7
|
-
const DEFAULT_COLUMNS = 1;
|
|
8
|
-
/** Band fill {@link FaqBand} applies when `tone` is omitted. */
|
|
9
|
-
const DEFAULT_TONE = "plain";
|
|
10
6
|
/**
|
|
11
|
-
* Renders a FAQ band
|
|
12
|
-
* Stacked columns sit `--ui-landing-faq-gap` apart (0 by default, so hairline
|
|
13
|
-
* rows read as one list); a page whose questions are cards sets it to the gap
|
|
14
|
-
* between its cards, so the seam between columns matches every other gap.
|
|
7
|
+
* Renders a FAQ band that stacks its {@link LandingHeader} over its `.Questions`.
|
|
15
8
|
*
|
|
16
9
|
* @param handle Runtime handle carrying the band's props.
|
|
17
|
-
* @returns The render function producing the band
|
|
10
|
+
* @returns The render function producing the band.
|
|
18
11
|
* @example
|
|
19
|
-
* <FaqBand
|
|
20
|
-
* <
|
|
21
|
-
* <
|
|
12
|
+
* <FaqBand columns={2}>
|
|
13
|
+
* <LandingHeader><LandingHeader.Title>{t("faq.title")}</LandingHeader.Title></LandingHeader>
|
|
14
|
+
* <FaqBand.Questions>
|
|
15
|
+
* <Accordion>{leftItems}</Accordion>
|
|
16
|
+
* <Accordion>{rightItems}</Accordion>
|
|
17
|
+
* </FaqBand.Questions>
|
|
22
18
|
* </FaqBand>
|
|
23
19
|
*/
|
|
24
20
|
export function FaqBand(handle) {
|
|
25
21
|
return () => {
|
|
26
|
-
let { children, columns
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
let resolvedSpacing = spacing ?? "normal";
|
|
30
|
-
let isTwo = resolvedColumns === 2;
|
|
31
|
-
return (_jsx(LandingSection, { ...rest, tone: resolvedTone, spacing: resolvedSpacing, ruled: ruled, mix: mix, children: _jsxs("div", { mix: [vstack({ gap: 0, align: "stretch" })], children: [_jsx(LandingHeader, { eyebrow: eyebrow, description: description, parts: {
|
|
32
|
-
title: parts?.title,
|
|
33
|
-
description: parts?.description,
|
|
34
|
-
}, children: title }), _jsx("div", { "data-columns": String(resolvedColumns), mix: [container("ui-landing-faq"), parts?.columns], children: _jsx("div", { mix: [
|
|
35
|
-
grid(),
|
|
36
|
-
gap("var(--ui-landing-faq-gap, 0px)", 8),
|
|
37
|
-
gridTemplate({ columns: "minmax(0, 1fr)" }),
|
|
38
|
-
isTwo
|
|
39
|
-
? at("xl", "ui-landing-faq", gridTemplate({ columns: "minmax(0, 1fr) minmax(0, 1fr)" }))
|
|
40
|
-
: [],
|
|
41
|
-
], children: children }) })] }) }));
|
|
22
|
+
let { children, columns = 1, spacing = "normal", tone = "plain", ...rest } = handle.props;
|
|
23
|
+
handle.context.set({ columns });
|
|
24
|
+
return (_jsx(LandingSection, { "data-slot": "faq-band", ...rest, tone: tone, spacing: spacing, children: _jsx("div", { mix: [vstack({ gap: 0, align: "stretch" })], children: children }) }));
|
|
42
25
|
};
|
|
43
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* The questions: one or two accordion columns in a responsive grid, two side by side from
|
|
29
|
+
* the band's `xl` width when the band has `columns={2}`. Stacked columns sit
|
|
30
|
+
* `--ui-landing-faq-gap` apart (0 by default, so hairline rows read as one list); a page
|
|
31
|
+
* whose questions are cards sets it to the gap between its cards.
|
|
32
|
+
*
|
|
33
|
+
* @param handle Runtime handle carrying the grid's props.
|
|
34
|
+
* @returns The render function producing the questions.
|
|
35
|
+
*/
|
|
36
|
+
FaqBand.Questions = function FaqBandQuestions(handle) {
|
|
37
|
+
return () => {
|
|
38
|
+
let { children, mix, ...rest } = handle.props;
|
|
39
|
+
let context = handle.context.get(FaqBand);
|
|
40
|
+
let columns = context?.columns ?? 1;
|
|
41
|
+
return (_jsx("div", { "data-slot": "faq-band-questions", ...rest, "data-columns": String(columns), mix: mergeMix([container("ui-landing-faq")], mix), children: _jsx("div", { mix: [
|
|
42
|
+
grid(),
|
|
43
|
+
gap("var(--ui-landing-faq-gap, 0px)", 8),
|
|
44
|
+
gridTemplate({ columns: "minmax(0, 1fr)" }),
|
|
45
|
+
columns === 2
|
|
46
|
+
? at("xl", "ui-landing-faq", gridTemplate({ columns: "minmax(0, 1fr) minmax(0, 1fr)" }))
|
|
47
|
+
: [],
|
|
48
|
+
], children: children }) }));
|
|
49
|
+
};
|
|
50
|
+
};
|
|
@@ -1,70 +1,40 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Mid-page feature band: a {@link LandingHeader}
|
|
3
|
-
* {@link Feature.Grid}, a numbered or timeline {@link StepList}
|
|
4
|
-
* {@link TabbedStage},
|
|
2
|
+
* Mid-page feature band, as pieces a caller arranges: a {@link LandingHeader} over a body
|
|
3
|
+
* laid out as a {@link Feature.Grid}, a numbered or timeline {@link StepList} or a vertical
|
|
4
|
+
* {@link TabbedStage}, or a copy column beside media in a {@link Split}.
|
|
5
5
|
*
|
|
6
6
|
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
7
7
|
* @copyright Sergio Xalambrí 2026
|
|
8
8
|
*/
|
|
9
9
|
import type { Handle, Props as TagProps, RemixNode } from "remix/component";
|
|
10
10
|
import { Feature } from "./feature.js";
|
|
11
|
-
import { LandingHeader } from "./landing-header.js";
|
|
12
11
|
import { LandingSection } from "./landing-section.js";
|
|
13
12
|
import { Split } from "./split.js";
|
|
14
|
-
/**
|
|
15
|
-
* Prop types for {@link FeatureBand}.
|
|
16
|
-
*/
|
|
13
|
+
/** Prop types for {@link FeatureBand} and its parts. */
|
|
17
14
|
export declare namespace FeatureBand {
|
|
18
15
|
/**
|
|
19
|
-
* How the band
|
|
16
|
+
* How the band lays out its parts: `split` sets a `.Copy` and a `.Media` side by side
|
|
17
|
+
* in the order written; every other layout stacks the header over a `.Body` drawn as
|
|
18
|
+
* a feature grid, numbered steps, a vertical stage or a timeline.
|
|
20
19
|
*/
|
|
21
20
|
type Layout = "split" | "grid" | "steps" | "stage" | "timeline";
|
|
22
|
-
/**
|
|
23
|
-
* Band fill forwarded to {@link LandingSection}.
|
|
24
|
-
*/
|
|
21
|
+
/** Band fill forwarded to {@link LandingSection}. */
|
|
25
22
|
type Tone = LandingSection.Tone;
|
|
26
|
-
/**
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
description?: TagProps<"p">["mix"];
|
|
34
|
-
/** Styling for the media column when `layout="split"`. */
|
|
35
|
-
media?: TagProps<"div">["mix"];
|
|
23
|
+
/** What the band resolves once for its body. */
|
|
24
|
+
interface Context {
|
|
25
|
+
layout: Layout;
|
|
26
|
+
columns?: Feature.Columns;
|
|
27
|
+
gridVariant?: Feature.GridVariant;
|
|
28
|
+
stageName: string;
|
|
29
|
+
stageLabel: string;
|
|
36
30
|
}
|
|
37
|
-
/**
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
interface Props extends Omit<LandingSection.Props, "children" | "tone" | "title" | "parts"> {
|
|
41
|
-
/** Body layout. Defaults to {@link DEFAULT_LAYOUT}. */
|
|
31
|
+
/** Every {@link LandingSection} prop, plus the band's layout and its body's options. */
|
|
32
|
+
interface Props extends Omit<LandingSection.Props, "children" | "parts" | "tone"> {
|
|
33
|
+
/** @default "split" */
|
|
42
34
|
layout?: Layout;
|
|
43
|
-
/**
|
|
35
|
+
/** @default "plain" */
|
|
44
36
|
tone?: Tone;
|
|
45
|
-
/**
|
|
46
|
-
eyebrow?: RemixNode;
|
|
47
|
-
/** Eyebrow chrome forwarded to {@link LandingHeader}. */
|
|
48
|
-
eyebrowVariant?: LandingHeader.EyebrowVariant;
|
|
49
|
-
/** Turns the eyebrow into a link to this URL, forwarded to {@link LandingHeader}. */
|
|
50
|
-
eyebrowHref?: string;
|
|
51
|
-
/** Index a `numbered` eyebrow leads with, such as `"02"`. */
|
|
52
|
-
eyebrowIndex?: RemixNode;
|
|
53
|
-
/** Section title — required, always supplied by the page. */
|
|
54
|
-
title: RemixNode;
|
|
55
|
-
/** Supporting lead under the title. */
|
|
56
|
-
description?: RemixNode;
|
|
57
|
-
/**
|
|
58
|
-
* Media for `layout="split"`. Every other layout carries its media in its items.
|
|
59
|
-
*/
|
|
60
|
-
media?: RemixNode;
|
|
61
|
-
/**
|
|
62
|
-
* Which side the media column sits on when `layout="split"`. Defaults to `"end"`
|
|
63
|
-
* (copy then media). `"start"` puts media first and leans the wide track that way
|
|
64
|
-
* unless `lean` is set.
|
|
65
|
-
*/
|
|
66
|
-
mediaSide?: "start" | "end";
|
|
67
|
-
/** Which column is wider when `layout="split"`. */
|
|
37
|
+
/** Which column is wider when `layout="split"`. @default "media" */
|
|
68
38
|
lean?: Split.Lean;
|
|
69
39
|
/** Grid column count when `layout="grid"`. */
|
|
70
40
|
columns?: Feature.Columns;
|
|
@@ -76,41 +46,43 @@ export declare namespace FeatureBand {
|
|
|
76
46
|
* its own `id` or `stageName` so their selections stay independent.
|
|
77
47
|
*/
|
|
78
48
|
stageName?: string;
|
|
79
|
-
/**
|
|
80
|
-
* Accessible name for the stage when `layout="stage"`. Defaults to the title when
|
|
81
|
-
* the title is a string; pass it whenever the title is markup.
|
|
82
|
-
*/
|
|
49
|
+
/** Accessible name for the stage when `layout="stage"`, usually the band's title. */
|
|
83
50
|
stageLabel?: string;
|
|
84
|
-
/**
|
|
85
|
-
* Body content: claim list / copy for `"split"`, {@link Feature} cells
|
|
86
|
-
* for `"grid"`, {@link StepList.Item} children for `"steps"` and `"timeline"`,
|
|
87
|
-
* or {@link TabbedStage.Item} children for `"stage"`.
|
|
88
|
-
*/
|
|
89
51
|
children?: RemixNode;
|
|
90
|
-
|
|
91
|
-
|
|
52
|
+
}
|
|
53
|
+
/** Every native `<div>` attribute, plus whether its lists read as checked claims. */
|
|
54
|
+
interface CopyProps extends TagProps<"div"> {
|
|
55
|
+
/** @default true */
|
|
56
|
+
checks?: boolean;
|
|
57
|
+
}
|
|
58
|
+
/** Every native `<div>` attribute. */
|
|
59
|
+
interface BoxProps extends TagProps<"div"> {
|
|
92
60
|
}
|
|
93
61
|
}
|
|
94
62
|
/**
|
|
95
|
-
* Renders
|
|
96
|
-
*
|
|
97
|
-
*
|
|
63
|
+
* Renders the band and lays out its parts. In a `split` the `.Copy` and `.Media` columns
|
|
64
|
+
* share one grid, the first written on the start side; in any other layout the header
|
|
65
|
+
* stacks over the `.Body`, whose cell and step titles sit one heading level under the band title.
|
|
98
66
|
*
|
|
99
67
|
* @param handle Runtime handle carrying the band's props.
|
|
100
|
-
* @returns The render function producing the band
|
|
101
|
-
* @example
|
|
102
|
-
* <FeatureBand layout="split" title={t("f1.title")} description={t("f1.lead")} media={shot}>
|
|
103
|
-
* <ul><li>{t("f1.claim")}</li></ul>
|
|
104
|
-
* </FeatureBand>
|
|
68
|
+
* @returns The render function producing the band.
|
|
105
69
|
* @example
|
|
106
|
-
* <FeatureBand
|
|
107
|
-
*
|
|
108
|
-
*
|
|
109
|
-
*
|
|
70
|
+
* <FeatureBand>
|
|
71
|
+
* <FeatureBand.Copy>
|
|
72
|
+
* <LandingHeader><LandingHeader.Title>{t("f1.title")}</LandingHeader.Title></LandingHeader>
|
|
73
|
+
* <ul><li>{t("f1.claim")}</li></ul>
|
|
74
|
+
* </FeatureBand.Copy>
|
|
75
|
+
* <FeatureBand.Media>{shot}</FeatureBand.Media>
|
|
110
76
|
* </FeatureBand>
|
|
111
77
|
* @example
|
|
112
|
-
* <FeatureBand layout="
|
|
113
|
-
* <
|
|
78
|
+
* <FeatureBand layout="grid" columns={3}>
|
|
79
|
+
* <LandingHeader><LandingHeader.Title>{t("grid.title")}</LandingHeader.Title></LandingHeader>
|
|
80
|
+
* <FeatureBand.Body>{cells}</FeatureBand.Body>
|
|
114
81
|
* </FeatureBand>
|
|
115
82
|
*/
|
|
116
|
-
export declare function FeatureBand(handle: Handle<FeatureBand.Props>): () => import("remix/component").RemixElement;
|
|
83
|
+
export declare function FeatureBand(handle: Handle<FeatureBand.Props, FeatureBand.Context>): () => import("remix/component").RemixElement;
|
|
84
|
+
export declare namespace FeatureBand {
|
|
85
|
+
var Copy: (handle: Handle<FeatureBand.CopyProps>) => () => import("remix/component").RemixElement;
|
|
86
|
+
var Media: (handle: Handle<FeatureBand.BoxProps>) => () => import("remix/component").RemixElement;
|
|
87
|
+
var Body: (handle: Handle<FeatureBand.BoxProps>) => () => import("remix/component").RemixElement;
|
|
88
|
+
}
|