@sdxc/ui 2026.11.26 → 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/lightbox.js +12 -6
- 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,29 +1,23 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The "who is using this?" screen of an account several people share
|
|
3
|
-
*
|
|
4
|
-
* form, so each pick is a plain post that works without script.
|
|
2
|
+
* The "who is using this?" screen of an account several people share, as pieces a caller
|
|
3
|
+
* arranges: a question, a grid of large avatars that each pick a profile, and a closing line.
|
|
4
|
+
* It renders inside the page's own form, so each pick is a plain post that works without script.
|
|
5
5
|
*
|
|
6
6
|
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
7
7
|
* @copyright Sergio Xalambrí 2026
|
|
8
8
|
*/
|
|
9
|
-
import type { Handle, Props as TagProps
|
|
10
|
-
/** Prop types for {@link ProfilePicker} and
|
|
9
|
+
import type { Handle, Props as TagProps } from "remix/component";
|
|
10
|
+
/** Prop types for {@link ProfilePicker} and its parts. */
|
|
11
11
|
export declare namespace ProfilePicker {
|
|
12
|
-
/** Every native `<section>` attribute
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
|
|
18
|
-
/** {@link ProfilePicker.Profile} elements. */
|
|
19
|
-
children: RemixNode;
|
|
12
|
+
/** Every native `<section>` attribute; name it with a {@link ProfilePicker.Title}. */
|
|
13
|
+
type Props = TagProps<"section">;
|
|
14
|
+
/** What the picker shares with its heading. */
|
|
15
|
+
interface Context {
|
|
16
|
+
/** The heading's id, which names the section. */
|
|
17
|
+
titleId: string;
|
|
20
18
|
}
|
|
21
|
-
/** Every native `<button>` attribute
|
|
22
|
-
interface ProfileProps extends
|
|
23
|
-
/** The profile's name, the button's text. */
|
|
24
|
-
name: string;
|
|
25
|
-
/** The profile's picture, drawn square at the button's width. */
|
|
26
|
-
avatar: RemixNode;
|
|
19
|
+
/** Every native `<button>` attribute, plus whether the profile is the one in use. */
|
|
20
|
+
interface ProfileProps extends TagProps<"button"> {
|
|
27
21
|
/** Where the pick posts, for a form holding every profile; see `formaction`. */
|
|
28
22
|
formAction?: string;
|
|
29
23
|
/** Marks the profile in use with `aria-current`. */
|
|
@@ -31,17 +25,30 @@ export declare namespace ProfilePicker {
|
|
|
31
25
|
}
|
|
32
26
|
}
|
|
33
27
|
/**
|
|
34
|
-
* Renders the picker centred on the page
|
|
35
|
-
*
|
|
28
|
+
* Renders the picker centred on the page, stacking its {@link ProfilePicker.Title},
|
|
29
|
+
* {@link ProfilePicker.Profiles} and {@link ProfilePicker.Footer} in the order given.
|
|
36
30
|
*
|
|
31
|
+
* @param handle Runtime handle carrying the section's props.
|
|
32
|
+
* @returns The render function producing the picker.
|
|
37
33
|
* @example
|
|
38
34
|
* <form method="post">
|
|
39
|
-
* <ProfilePicker
|
|
40
|
-
* <ProfilePicker.
|
|
35
|
+
* <ProfilePicker>
|
|
36
|
+
* <ProfilePicker.Title>Who's watching?</ProfilePicker.Title>
|
|
37
|
+
* <ProfilePicker.Profiles>
|
|
38
|
+
* <ProfilePicker.Profile formAction="/profiles/noa">
|
|
39
|
+
* <ProfilePicker.Avatar><Avatar /></ProfilePicker.Avatar>
|
|
40
|
+
* <ProfilePicker.Name>Noa</ProfilePicker.Name>
|
|
41
|
+
* </ProfilePicker.Profile>
|
|
42
|
+
* </ProfilePicker.Profiles>
|
|
41
43
|
* </ProfilePicker>
|
|
42
44
|
* </form>
|
|
43
45
|
*/
|
|
44
|
-
export declare function ProfilePicker(handle: Handle<ProfilePicker.Props>): () => import("remix/component").RemixElement;
|
|
46
|
+
export declare function ProfilePicker(handle: Handle<ProfilePicker.Props, ProfilePicker.Context>): () => import("remix/component").RemixElement;
|
|
45
47
|
export declare namespace ProfilePicker {
|
|
48
|
+
var Title: (handle: Handle<TagProps<"h1">>) => () => import("remix/component").RemixElement;
|
|
49
|
+
var Profiles: (handle: Handle<TagProps<"ul">>) => () => import("remix/component").RemixElement;
|
|
46
50
|
var Profile: (handle: Handle<ProfilePicker.ProfileProps>) => () => import("remix/component").RemixElement;
|
|
51
|
+
var Avatar: (handle: Handle<TagProps<"span">>) => () => import("remix/component").RemixElement;
|
|
52
|
+
var Name: (handle: Handle<TagProps<"span">>) => () => import("remix/component").RemixElement;
|
|
53
|
+
var Footer: (handle: Handle<TagProps<"p">>) => () => import("remix/component").RemixElement;
|
|
47
54
|
}
|
|
@@ -1,24 +1,34 @@
|
|
|
1
|
-
import { jsx as _jsx
|
|
1
|
+
import { jsx as _jsx } from "remix/component/jsx-runtime";
|
|
2
2
|
import { mergeMix, raw } from "@sdxc/u/general";
|
|
3
3
|
import { motionSafe } from "@sdxc/u/responsive";
|
|
4
4
|
import { when } from "@sdxc/u/state";
|
|
5
5
|
/** Container the picker declares, which its grid sets its columns from. */
|
|
6
6
|
const CONTAINER = "ui-profile-picker";
|
|
7
7
|
/**
|
|
8
|
-
* Renders the picker centred on the page
|
|
9
|
-
*
|
|
8
|
+
* Renders the picker centred on the page, stacking its {@link ProfilePicker.Title},
|
|
9
|
+
* {@link ProfilePicker.Profiles} and {@link ProfilePicker.Footer} in the order given.
|
|
10
10
|
*
|
|
11
|
+
* @param handle Runtime handle carrying the section's props.
|
|
12
|
+
* @returns The render function producing the picker.
|
|
11
13
|
* @example
|
|
12
14
|
* <form method="post">
|
|
13
|
-
* <ProfilePicker
|
|
14
|
-
* <ProfilePicker.
|
|
15
|
+
* <ProfilePicker>
|
|
16
|
+
* <ProfilePicker.Title>Who's watching?</ProfilePicker.Title>
|
|
17
|
+
* <ProfilePicker.Profiles>
|
|
18
|
+
* <ProfilePicker.Profile formAction="/profiles/noa">
|
|
19
|
+
* <ProfilePicker.Avatar><Avatar /></ProfilePicker.Avatar>
|
|
20
|
+
* <ProfilePicker.Name>Noa</ProfilePicker.Name>
|
|
21
|
+
* </ProfilePicker.Profile>
|
|
22
|
+
* </ProfilePicker.Profiles>
|
|
15
23
|
* </ProfilePicker>
|
|
16
24
|
* </form>
|
|
17
25
|
*/
|
|
18
26
|
export function ProfilePicker(handle) {
|
|
19
27
|
return () => {
|
|
20
|
-
let { children,
|
|
21
|
-
|
|
28
|
+
let { children, mix, ...rest } = handle.props;
|
|
29
|
+
let titleId = `${handle.id}-title`;
|
|
30
|
+
handle.context.set({ titleId });
|
|
31
|
+
return (_jsx("section", { "aria-labelledby": rest["aria-label"] === undefined ? titleId : undefined, "data-slot": "profile-picker", ...rest, mix: mergeMix([
|
|
22
32
|
raw({
|
|
23
33
|
containerName: CONTAINER,
|
|
24
34
|
containerType: "inline-size",
|
|
@@ -28,46 +38,73 @@ export function ProfilePicker(handle) {
|
|
|
28
38
|
paddingInline: "1rem",
|
|
29
39
|
textAlign: "center",
|
|
30
40
|
}),
|
|
31
|
-
], mix), children:
|
|
32
|
-
raw({
|
|
33
|
-
margin: "0",
|
|
34
|
-
fontSize: "clamp(1.75rem, 6cqi, 3rem)",
|
|
35
|
-
fontWeight: "600",
|
|
36
|
-
letterSpacing: "-0.02em",
|
|
37
|
-
color: "var(--ui-neutral-fg-emphasis)",
|
|
38
|
-
}),
|
|
39
|
-
], children: title }), _jsx("ul", { mix: [
|
|
40
|
-
raw({
|
|
41
|
-
display: "grid",
|
|
42
|
-
gridTemplateColumns: "repeat(2, minmax(0, 8.5rem))",
|
|
43
|
-
gap: "1.75rem clamp(1rem, 4cqi, 2.5rem)",
|
|
44
|
-
margin: "0",
|
|
45
|
-
padding: "0",
|
|
46
|
-
listStyle: "none",
|
|
47
|
-
[`@container ${CONTAINER} (min-width: 40rem)`]: {
|
|
48
|
-
gridTemplateColumns: "repeat(auto-fit, minmax(0, 9.5rem))",
|
|
49
|
-
justifyContent: "center",
|
|
50
|
-
inlineSize: "100%",
|
|
51
|
-
maxInlineSize: "60rem",
|
|
52
|
-
},
|
|
53
|
-
}),
|
|
54
|
-
], children: children }), footer === undefined ? null : (_jsx("p", { mix: [
|
|
55
|
-
raw({
|
|
56
|
-
margin: "0",
|
|
57
|
-
fontSize: "0.875rem",
|
|
58
|
-
color: "var(--ui-neutral-fg-muted)",
|
|
59
|
-
}),
|
|
60
|
-
], children: footer }))] }));
|
|
41
|
+
], mix), children: children }));
|
|
61
42
|
};
|
|
62
43
|
}
|
|
63
44
|
/**
|
|
64
|
-
*
|
|
65
|
-
*
|
|
45
|
+
* The question, such as "Who's watching?", as the page's heading, which names the picker.
|
|
46
|
+
*
|
|
47
|
+
* @param handle Runtime handle carrying the heading's props.
|
|
48
|
+
* @returns The render function producing the heading.
|
|
49
|
+
* @example <ProfilePicker.Title>Who's watching?</ProfilePicker.Title>
|
|
50
|
+
*/
|
|
51
|
+
ProfilePicker.Title = function ProfilePickerTitle(handle) {
|
|
52
|
+
return () => {
|
|
53
|
+
let { children, mix, ...rest } = handle.props;
|
|
54
|
+
let context = handle.context.get(ProfilePicker);
|
|
55
|
+
return (_jsx("h1", { id: context?.titleId, "data-slot": "profile-picker-title", ...rest, mix: mergeMix([
|
|
56
|
+
raw({
|
|
57
|
+
margin: "0",
|
|
58
|
+
fontSize: "clamp(1.75rem, 6cqi, 3rem)",
|
|
59
|
+
fontWeight: "600",
|
|
60
|
+
letterSpacing: "-0.02em",
|
|
61
|
+
color: "var(--ui-neutral-fg-emphasis)",
|
|
62
|
+
}),
|
|
63
|
+
], mix), children: children }));
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* The grid of {@link ProfilePicker.Profile}s: two to a row on a phone and up to five on a
|
|
68
|
+
* wider screen.
|
|
69
|
+
*
|
|
70
|
+
* @param handle Runtime handle carrying the list's props.
|
|
71
|
+
* @returns The render function producing the list.
|
|
72
|
+
* @example <ProfilePicker.Profiles>{profiles}</ProfilePicker.Profiles>
|
|
73
|
+
*/
|
|
74
|
+
ProfilePicker.Profiles = function ProfilePickerProfiles(handle) {
|
|
75
|
+
return () => {
|
|
76
|
+
let { children, mix, ...rest } = handle.props;
|
|
77
|
+
return (_jsx("ul", { "data-slot": "profile-picker-profiles", ...rest, mix: mergeMix([
|
|
78
|
+
raw({
|
|
79
|
+
display: "grid",
|
|
80
|
+
gridTemplateColumns: "repeat(2, minmax(0, 8.5rem))",
|
|
81
|
+
gap: "1.75rem clamp(1rem, 4cqi, 2.5rem)",
|
|
82
|
+
margin: "0",
|
|
83
|
+
padding: "0",
|
|
84
|
+
listStyle: "none",
|
|
85
|
+
[`@container ${CONTAINER} (min-width: 40rem)`]: {
|
|
86
|
+
gridTemplateColumns: "repeat(auto-fit, minmax(0, 9.5rem))",
|
|
87
|
+
justifyContent: "center",
|
|
88
|
+
inlineSize: "100%",
|
|
89
|
+
maxInlineSize: "60rem",
|
|
90
|
+
},
|
|
91
|
+
}),
|
|
92
|
+
], mix), children: children }));
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
/**
|
|
96
|
+
* One profile as a list item holding a submit button of its {@link ProfilePicker.Avatar} and
|
|
97
|
+
* {@link ProfilePicker.Name}. It rises a little and rings under the pointer, held still under
|
|
98
|
+
* reduced motion; the profile in use carries a ring at rest.
|
|
99
|
+
*
|
|
100
|
+
* @param handle Runtime handle carrying the button's props.
|
|
101
|
+
* @returns The render function producing the item.
|
|
102
|
+
* @example <ProfilePicker.Profile formAction="/profiles/noa" current>…</ProfilePicker.Profile>
|
|
66
103
|
*/
|
|
67
104
|
ProfilePicker.Profile = function ProfilePickerProfile(handle) {
|
|
68
105
|
return () => {
|
|
69
|
-
let {
|
|
70
|
-
return (_jsx("li", { children:
|
|
106
|
+
let { children, current = false, formAction, mix, ...rest } = handle.props;
|
|
107
|
+
return (_jsx("li", { children: _jsx("button", { type: "submit", ...rest, formaction: formAction, "aria-current": current ? "true" : undefined, "data-slot": "profile-picker-profile", mix: mergeMix([
|
|
71
108
|
raw({
|
|
72
109
|
display: "grid",
|
|
73
110
|
justifyItems: "center",
|
|
@@ -83,22 +120,61 @@ ProfilePicker.Profile = function ProfilePickerProfile(handle) {
|
|
|
83
120
|
}),
|
|
84
121
|
when("&:hover", raw({ color: "var(--ui-neutral-fg-emphasis)" })),
|
|
85
122
|
when("&:focus-visible", raw({ outline: "none" })),
|
|
86
|
-
], mix), children:
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
123
|
+
], mix), children: children }) }));
|
|
124
|
+
};
|
|
125
|
+
};
|
|
126
|
+
/**
|
|
127
|
+
* The profile's picture, drawn square at the button's width with the profile's ring.
|
|
128
|
+
*
|
|
129
|
+
* @param handle Runtime handle carrying the frame's props.
|
|
130
|
+
* @returns The render function producing the frame.
|
|
131
|
+
* @example <ProfilePicker.Avatar><img src={photo} alt="" /></ProfilePicker.Avatar>
|
|
132
|
+
*/
|
|
133
|
+
ProfilePicker.Avatar = function ProfilePickerAvatar(handle) {
|
|
134
|
+
return () => {
|
|
135
|
+
let { children, mix, ...rest } = handle.props;
|
|
136
|
+
return (_jsx("span", { "data-slot": "profile-picker-avatar", ...rest, mix: mergeMix([
|
|
137
|
+
raw({
|
|
138
|
+
display: "grid",
|
|
139
|
+
inlineSize: "100%",
|
|
140
|
+
aspectRatio: "1",
|
|
141
|
+
overflow: "clip",
|
|
142
|
+
borderRadius: "var(--ui-profile-picker-radius, 1rem)",
|
|
143
|
+
transition: "box-shadow 160ms ease, translate 160ms ease",
|
|
144
|
+
"& > *": { inlineSize: "100%", blockSize: "100%" },
|
|
145
|
+
"[aria-current] > &": {
|
|
146
|
+
boxShadow: "0 0 0 3px var(--ui-brand-bg-solid)",
|
|
147
|
+
},
|
|
148
|
+
":hover > &": { boxShadow: "0 0 0 3px var(--ui-neutral-fg-emphasis)" },
|
|
149
|
+
":focus-visible > &": { boxShadow: "0 0 0 3px var(--ui-brand-ring)" },
|
|
150
|
+
}),
|
|
151
|
+
motionSafe(raw({ ":hover > &": { translate: "0 -3px" } })),
|
|
152
|
+
], mix), children: children }));
|
|
153
|
+
};
|
|
154
|
+
};
|
|
155
|
+
/**
|
|
156
|
+
* The profile's name, the button's text.
|
|
157
|
+
*
|
|
158
|
+
* @param handle Runtime handle carrying the span's props.
|
|
159
|
+
* @returns The render function producing the name.
|
|
160
|
+
* @example <ProfilePicker.Name>Noa</ProfilePicker.Name>
|
|
161
|
+
*/
|
|
162
|
+
ProfilePicker.Name = function ProfilePickerName(handle) {
|
|
163
|
+
return () => {
|
|
164
|
+
let { children, ...rest } = handle.props;
|
|
165
|
+
return (_jsx("span", { "data-slot": "profile-picker-name", ...rest, children: children }));
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
/**
|
|
169
|
+
* A muted line under the grid, such as what a profile keeps apart.
|
|
170
|
+
*
|
|
171
|
+
* @param handle Runtime handle carrying the paragraph's props.
|
|
172
|
+
* @returns The render function producing the line.
|
|
173
|
+
* @example <ProfilePicker.Footer>Each profile keeps its own list.</ProfilePicker.Footer>
|
|
174
|
+
*/
|
|
175
|
+
ProfilePicker.Footer = function ProfilePickerFooter(handle) {
|
|
176
|
+
return () => {
|
|
177
|
+
let { children, mix, ...rest } = handle.props;
|
|
178
|
+
return (_jsx("p", { "data-slot": "profile-picker-footer", ...rest, mix: mergeMix([raw({ margin: "0", fontSize: "0.875rem", color: "var(--ui-neutral-fg-muted)" })], mix), children: children }));
|
|
103
179
|
};
|
|
104
180
|
};
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The time range for a dashboard, kept in the URL
|
|
2
|
+
* The time range for a dashboard, kept in the URL, built from preset and custom-range parts:
|
|
3
|
+
* preset ranges as a segmented control of
|
|
3
4
|
* GET-form buttons with letter-key hints, a Custom entry that opens a date range in a
|
|
4
5
|
* popover, and a native select in its place when the container is narrow.
|
|
5
6
|
*
|
|
6
7
|
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
7
8
|
* @copyright Sergio Xalambrí 2026
|
|
8
9
|
*/
|
|
9
|
-
import type { Handle, Props as TagProps } from "remix/component";
|
|
10
|
+
import type { Handle, Props as TagProps, RemixNode } from "remix/component";
|
|
10
11
|
/** Value the custom range submits under `name`, beside its start and end dates. */
|
|
11
12
|
export declare const RANGE_PICKER_CUSTOM_VALUE = "custom";
|
|
12
13
|
/** Attribute naming the letter key that picks a preset, read by `rangePickerKeys()`. */
|
|
@@ -14,22 +15,52 @@ export declare const RANGE_PICKER_KEY_ATTRIBUTE = "data-range-key";
|
|
|
14
15
|
/** Attribute `rangePickerKeys()` sets on the picker once it submits the select on change. */
|
|
15
16
|
export declare const RANGE_PICKER_ENHANCED_ATTRIBUTE = "data-range-picker-enhanced";
|
|
16
17
|
/**
|
|
17
|
-
* Prop types for {@link RangePicker}.
|
|
18
|
+
* Prop types for {@link RangePicker} and its parts.
|
|
18
19
|
*/
|
|
19
20
|
export declare namespace RangePicker {
|
|
20
|
-
/**
|
|
21
|
-
interface
|
|
21
|
+
/** Every native `<div>` attribute, plus the range in effect and where it submits. */
|
|
22
|
+
interface Props extends TagProps<"div"> {
|
|
23
|
+
/** The range in effect: a preset's `value`, or {@link RANGE_PICKER_CUSTOM_VALUE}. */
|
|
24
|
+
value?: string;
|
|
25
|
+
/** @default {@link DEFAULT_NAME} */
|
|
26
|
+
name?: string;
|
|
27
|
+
/** Where the forms submit; the current URL when omitted. */
|
|
28
|
+
action?: string;
|
|
29
|
+
/** Other query parameters to keep, submitted as hidden fields (filters, the open tab). */
|
|
30
|
+
params?: Readonly<Record<string, string>>;
|
|
31
|
+
/** Accessible name of the preset group and the select ("Time range"). */
|
|
32
|
+
"aria-label": string;
|
|
33
|
+
/** Submits the select without script and the custom range ("Apply"). */
|
|
34
|
+
applyLabel: string;
|
|
35
|
+
/**
|
|
36
|
+
* Shows each preset's key as a hint inside its segment.
|
|
37
|
+
*
|
|
38
|
+
* @default true
|
|
39
|
+
*/
|
|
40
|
+
keyHints?: boolean;
|
|
41
|
+
}
|
|
42
|
+
/** What the picker resolves once and shares with its parts. */
|
|
43
|
+
interface Context {
|
|
44
|
+
value?: string;
|
|
45
|
+
name: string;
|
|
46
|
+
action?: string;
|
|
47
|
+
params?: Readonly<Record<string, string>>;
|
|
48
|
+
popoverId: string;
|
|
49
|
+
applyLabel: string;
|
|
50
|
+
keyHints: boolean;
|
|
51
|
+
}
|
|
52
|
+
/** One preset range, its segment's short text as children ("7d"). */
|
|
53
|
+
interface PresetProps {
|
|
22
54
|
/** What the picker submits under `name` ("7d"). */
|
|
23
55
|
value: string;
|
|
24
|
-
/** The segment's short text ("7d"). */
|
|
25
|
-
label: string;
|
|
26
56
|
/** The full name, for the select option and the segment's accessible name ("Last 7 days"). */
|
|
27
57
|
description?: string;
|
|
28
58
|
/** A single letter that picks the preset once `rangePickerKeys()` is attached ("w"). */
|
|
29
|
-
|
|
59
|
+
shortcut?: string;
|
|
60
|
+
children?: RemixNode;
|
|
30
61
|
}
|
|
31
|
-
/** The custom range's fields
|
|
32
|
-
interface
|
|
62
|
+
/** The custom range's fields, its entry's text ("Custom") as children. */
|
|
63
|
+
interface CustomProps {
|
|
33
64
|
/** Query parameter of the range's first day. */
|
|
34
65
|
startName: string;
|
|
35
66
|
/** Query parameter of the range's last day. */
|
|
@@ -42,61 +73,33 @@ export declare namespace RangePicker {
|
|
|
42
73
|
min?: string;
|
|
43
74
|
/** Latest selectable day, `YYYY-MM-DD`. */
|
|
44
75
|
max?: string;
|
|
76
|
+
/** The first-day field's label ("From"). */
|
|
77
|
+
startLabel?: string;
|
|
78
|
+
/** The last-day field's label ("To"). */
|
|
79
|
+
endLabel?: string;
|
|
45
80
|
/** Letter that opens the custom range once `rangePickerKeys()` is attached. */
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
interface Labels {
|
|
50
|
-
/** Accessible name of the preset group and the select ("Time range"). */
|
|
51
|
-
group: string;
|
|
52
|
-
/** Submits the select without script and the custom range ("Apply"). */
|
|
53
|
-
apply: string;
|
|
54
|
-
/** The Custom entry's text; required with `custom`. */
|
|
55
|
-
custom?: string;
|
|
56
|
-
/** The custom range's first-day field ("From"). */
|
|
57
|
-
start?: string;
|
|
58
|
-
/** The custom range's last-day field ("To"). */
|
|
59
|
-
end?: string;
|
|
60
|
-
}
|
|
61
|
-
/** Props accepted by {@link RangePicker}. */
|
|
62
|
-
interface Props extends Omit<TagProps<"div">, "children"> {
|
|
63
|
-
presets: readonly Preset[];
|
|
64
|
-
/** The range in effect: a preset's `value`, or {@link RANGE_PICKER_CUSTOM_VALUE}. */
|
|
65
|
-
value?: string;
|
|
66
|
-
/** @default {@link DEFAULT_NAME} */
|
|
67
|
-
name?: string;
|
|
68
|
-
/** Where the forms submit; the current URL when omitted. */
|
|
69
|
-
action?: string;
|
|
70
|
-
/** Other query parameters to keep, submitted as hidden fields (filters, the open tab). */
|
|
71
|
-
params?: Readonly<Record<string, string>>;
|
|
72
|
-
custom?: Custom;
|
|
73
|
-
labels: Labels;
|
|
74
|
-
/**
|
|
75
|
-
* Shows each preset's key as a hint inside its segment.
|
|
76
|
-
*
|
|
77
|
-
* @default true
|
|
78
|
-
*/
|
|
79
|
-
keyHints?: boolean;
|
|
81
|
+
shortcut?: string;
|
|
82
|
+
/** The entry's text, also the narrow calendar button's accessible name; a plain string. */
|
|
83
|
+
children: string;
|
|
80
84
|
}
|
|
81
85
|
}
|
|
82
86
|
/**
|
|
83
|
-
* Renders the picker
|
|
84
|
-
*
|
|
85
|
-
*
|
|
87
|
+
* Renders the picker from its {@link RangePicker.Preset}s and {@link RangePicker.Custom}. Each
|
|
88
|
+
* preset is a submit button of a GET form, pressed when it is the range in effect; under a 24rem
|
|
89
|
+
* container the segments give way to a select with an Apply button. Attach `rangePickerKeys()`
|
|
90
|
+
* for letter keys and to submit the select on change.
|
|
86
91
|
*
|
|
87
92
|
* @param handle Runtime handle carrying the picker's props.
|
|
88
93
|
* @returns The render function producing the picker's markup.
|
|
89
94
|
* @example
|
|
90
|
-
* <RangePicker
|
|
91
|
-
* value=
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
* { value: "7d", label: "7d", description: t("range.week"), key: "w" },
|
|
96
|
-
* ]}
|
|
97
|
-
* custom={{ startName: "from", endName: "to", start: from, end: to, key: "c" }}
|
|
98
|
-
* labels={{ group: t("range.label"), apply: t("range.apply"), custom: t("range.custom"), start: t("range.from"), end: t("range.to") }}
|
|
99
|
-
* mix={rangePickerKeys()}
|
|
100
|
-
* />
|
|
95
|
+
* <RangePicker value={range} params={{ monitor: monitorId }} aria-label="Time range" applyLabel="Apply" mix={rangePickerKeys()}>
|
|
96
|
+
* <RangePicker.Preset value="24h" description="Last 24 hours" shortcut="d">24h</RangePicker.Preset>
|
|
97
|
+
* <RangePicker.Preset value="7d" description="Last 7 days" shortcut="w">7d</RangePicker.Preset>
|
|
98
|
+
* <RangePicker.Custom startName="from" endName="to" start={from} end={to} shortcut="c">Custom</RangePicker.Custom>
|
|
99
|
+
* </RangePicker>
|
|
101
100
|
*/
|
|
102
|
-
export declare function RangePicker(handle: Handle<RangePicker.Props>): () => import("remix/component").RemixElement;
|
|
101
|
+
export declare function RangePicker(handle: Handle<RangePicker.Props, RangePicker.Context>): () => import("remix/component").RemixElement;
|
|
102
|
+
export declare namespace RangePicker {
|
|
103
|
+
var Preset: (handle: Handle<RangePicker.PresetProps>) => () => import("remix/component").RemixElement | null;
|
|
104
|
+
var Custom: (handle: Handle<RangePicker.CustomProps>) => () => import("remix/component").RemixElement | null;
|
|
105
|
+
}
|