@sdxc/ui 2026.10.30 → 2026.11.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +187 -113
- package/dist/app/app-shell-toggle.d.ts +31 -0
- package/dist/app/app-shell-toggle.js +43 -0
- package/dist/app/app-shell.d.ts +131 -0
- package/dist/app/app-shell.js +542 -0
- package/dist/app/auto-refresh.d.ts +104 -0
- package/dist/app/auto-refresh.js +126 -0
- package/dist/{behaviors → app/behaviors}/drag-session.js +1 -1
- package/dist/app/behaviors/refresh-schedule.d.ts +53 -0
- package/dist/app/behaviors/refresh-schedule.js +95 -0
- package/dist/app/behaviors/shortcuts.d.ts +175 -0
- package/dist/app/behaviors/shortcuts.js +401 -0
- package/dist/{behaviors → app/behaviors}/toaster.d.ts +31 -2
- package/dist/{behaviors → app/behaviors}/toaster.js +63 -6
- package/dist/{components → app}/chart.d.ts +63 -9
- package/dist/{components → app}/chart.js +222 -40
- package/dist/app/command-palette.d.ts +132 -0
- package/dist/app/command-palette.js +181 -0
- package/dist/{components → app}/context-menu.d.ts +2 -2
- package/dist/{components → app}/context-menu.js +8 -7
- package/dist/app/danger-zone.d.ts +66 -0
- package/dist/app/danger-zone.js +66 -0
- package/dist/app/detail-sheet.d.ts +119 -0
- package/dist/app/detail-sheet.js +173 -0
- package/dist/{components → app}/drop-indicator.js +3 -3
- package/dist/{components → app}/drop-zone.d.ts +2 -1
- package/dist/{components → app}/drop-zone.js +7 -4
- package/dist/app/editor-layout.d.ts +69 -0
- package/dist/app/editor-layout.js +143 -0
- package/dist/app/empty.d.ts +128 -0
- package/dist/app/empty.js +248 -0
- package/dist/{components → app}/file-trigger.js +2 -2
- package/dist/app/filter-bar.d.ts +169 -0
- package/dist/app/filter-bar.js +346 -0
- package/dist/{components → app}/grid-list.d.ts +1 -1
- package/dist/{components → app}/grid-list.js +16 -18
- package/dist/app/index.d.ts +92 -0
- package/dist/app/index.js +92 -0
- package/dist/app/keyboard-help.d.ts +66 -0
- package/dist/app/keyboard-help.js +56 -0
- package/dist/{components → app}/menubar.js +5 -7
- package/dist/app/mixins/app-shell-controls.d.ts +46 -0
- package/dist/app/mixins/app-shell-controls.js +131 -0
- package/dist/app/mixins/auto-refresh.d.ts +29 -0
- package/dist/app/mixins/auto-refresh.js +66 -0
- package/dist/app/mixins/command-palette.d.ts +56 -0
- package/dist/app/mixins/command-palette.js +297 -0
- package/dist/app/mixins/copy-permalink.d.ts +26 -0
- package/dist/app/mixins/copy-permalink.js +54 -0
- package/dist/app/mixins/detail-sheet-keys.d.ts +28 -0
- package/dist/app/mixins/detail-sheet-keys.js +88 -0
- package/dist/{mixins → app/mixins}/drag-reorder.js +1 -1
- package/dist/{mixins → app/mixins}/drop-zone.js +1 -1
- package/dist/app/mixins/escape-link.d.ts +17 -0
- package/dist/app/mixins/escape-link.js +35 -0
- package/dist/{mixins → app/mixins}/grid-list-keys.js +2 -2
- package/dist/app/mixins/keyboard-help.d.ts +38 -0
- package/dist/app/mixins/keyboard-help.js +51 -0
- package/dist/{mixins → app/mixins}/menubar-keys.js +2 -2
- package/dist/app/mixins/optimistic-toggle-sync.d.ts +80 -0
- package/dist/app/mixins/optimistic-toggle-sync.js +153 -0
- package/dist/app/mixins/range-picker-keys.d.ts +18 -0
- package/dist/app/mixins/range-picker-keys.js +94 -0
- package/dist/{mixins → app/mixins}/resize-handle.js +3 -3
- package/dist/app/mixins/row-navigation.d.ts +85 -0
- package/dist/app/mixins/row-navigation.js +208 -0
- package/dist/app/mixins/save-bar-sync.d.ts +27 -0
- package/dist/app/mixins/save-bar-sync.js +106 -0
- package/dist/app/mixins/save-shortcut.d.ts +47 -0
- package/dist/app/mixins/save-shortcut.js +101 -0
- package/dist/app/mixins/save-status-sync.d.ts +77 -0
- package/dist/app/mixins/save-status-sync.js +159 -0
- package/dist/app/mixins/selection-bar-sync.d.ts +32 -0
- package/dist/app/mixins/selection-bar-sync.js +151 -0
- package/dist/app/mixins/split-view.d.ts +66 -0
- package/dist/app/mixins/split-view.js +319 -0
- package/dist/app/mixins/status-strip-keys.d.ts +17 -0
- package/dist/app/mixins/status-strip-keys.js +79 -0
- package/dist/app/mixins/submit-on-change.d.ts +16 -0
- package/dist/app/mixins/submit-on-change.js +28 -0
- package/dist/app/mixins/table-selection.d.ts +39 -0
- package/dist/app/mixins/table-selection.js +272 -0
- package/dist/app/mixins/toast-queue.d.ts +36 -0
- package/dist/app/mixins/toast-queue.js +77 -0
- package/dist/app/mixins/toast-stack.d.ts +20 -0
- package/dist/app/mixins/toast-stack.js +55 -0
- package/dist/{mixins/treeKeys.js → app/mixins/tree-keys.js} +2 -2
- package/dist/app/optimistic-toggle.d.ts +48 -0
- package/dist/app/optimistic-toggle.js +38 -0
- package/dist/app/page-header.d.ts +71 -0
- package/dist/app/page-header.js +249 -0
- package/dist/app/range-picker.d.ts +102 -0
- package/dist/app/range-picker.js +118 -0
- package/dist/{components → app}/resizable.js +7 -10
- package/dist/app/save-bar.d.ts +54 -0
- package/dist/app/save-bar.js +64 -0
- package/dist/app/save-status.d.ts +50 -0
- package/dist/app/save-status.js +54 -0
- package/dist/app/selection-bar.d.ts +101 -0
- package/dist/app/selection-bar.js +157 -0
- package/dist/app/settings-layout.d.ts +70 -0
- package/dist/app/settings-layout.js +112 -0
- package/dist/app/settings-section.d.ts +140 -0
- package/dist/app/settings-section.js +182 -0
- package/dist/{components → app}/shortcut-list.js +4 -3
- package/dist/app/skeleton.d.ts +79 -0
- package/dist/app/skeleton.js +185 -0
- package/dist/app/sparkline.d.ts +61 -0
- package/dist/app/sparkline.js +145 -0
- package/dist/app/split-view.d.ts +154 -0
- package/dist/app/split-view.js +272 -0
- package/dist/app/stat-card.d.ts +109 -0
- package/dist/app/stat-card.js +379 -0
- package/dist/app/status-strip.d.ts +70 -0
- package/dist/app/status-strip.js +155 -0
- package/dist/app/styles/action-row.d.ts +41 -0
- package/dist/app/styles/action-row.js +59 -0
- package/dist/{styles → app/styles}/chart-palette.d.ts +1 -1
- package/dist/{styles → app/styles}/graphic-host.d.ts +1 -1
- package/dist/{styles → app/styles}/legend-toggle.d.ts +1 -1
- package/dist/app/styles/stat-delta.d.ts +29 -0
- package/dist/app/styles/stat-delta.js +36 -0
- package/dist/app/styles/toast-stack.d.ts +21 -0
- package/dist/app/styles/toast-stack.js +54 -0
- package/dist/app/table.d.ts +327 -0
- package/dist/app/table.js +839 -0
- package/dist/{components → app}/toast.d.ts +105 -5
- package/dist/{components → app}/toast.js +101 -35
- package/dist/app/toasts.d.ts +49 -0
- package/dist/app/toasts.js +103 -0
- package/dist/{components → app}/toolbar.js +3 -3
- package/dist/{components → app}/tree.d.ts +1 -1
- package/dist/{components → app}/tree.js +10 -14
- package/dist/app/utils/app-shell-cookie.d.ts +21 -0
- package/dist/app/utils/app-shell-cookie.js +33 -0
- package/dist/{utils → app/utils}/chart-marker-indices.d.ts +9 -5
- package/dist/{utils → app/utils}/chart-marker-indices.js +9 -8
- package/dist/{utils → app/utils}/chart-path.d.ts +15 -11
- package/dist/{utils → app/utils}/chart-path.js +48 -20
- package/dist/{utils → app/utils}/chart-scale.js +1 -1
- package/dist/app/utils/edited-time.d.ts +19 -0
- package/dist/app/utils/edited-time.js +35 -0
- package/dist/app/utils/key-target.d.ts +23 -0
- package/dist/app/utils/key-target.js +48 -0
- package/dist/app/utils/search-params.d.ts +69 -0
- package/dist/app/utils/search-params.js +132 -0
- package/dist/app/utils/shortcut-groups.d.ts +21 -0
- package/dist/app/utils/shortcut-groups.js +53 -0
- package/dist/app/utils/split-view-layout.d.ts +48 -0
- package/dist/app/utils/split-view-layout.js +71 -0
- package/dist/app/view-options.d.ts +99 -0
- package/dist/app/view-options.js +182 -0
- package/dist/behaviors/index.d.ts +0 -5
- package/dist/behaviors/index.js +0 -5
- package/dist/{components → chat}/attachment.d.ts +1 -1
- package/dist/{components → chat}/attachment.js +17 -23
- package/dist/{behaviors → chat/behaviors}/scroll-follow-model.js +1 -1
- package/dist/{components → chat}/bubble.js +14 -14
- package/dist/chat/index.d.ts +16 -0
- package/dist/chat/index.js +16 -0
- package/dist/{components → chat}/marker.js +6 -8
- package/dist/{components → chat}/message-scroller.d.ts +1 -1
- package/dist/{components → chat}/message-scroller.js +12 -18
- package/dist/{components → chat}/message.js +10 -12
- package/dist/{mixins → chat/mixins}/message-follow.js +2 -2
- package/dist/{components → color}/color-area.js +7 -10
- package/dist/{components → color}/color-field.js +7 -6
- package/dist/{components → color}/color-picker.d.ts +1 -1
- package/dist/{components → color}/color-picker.js +9 -12
- package/dist/{components → color}/color-slider.js +10 -13
- package/dist/{components → color}/color-swatch-picker.js +4 -5
- package/dist/{components → color}/color-swatch.js +3 -4
- package/dist/{components → color}/color-wheel.js +5 -6
- package/dist/color/index.d.ts +21 -0
- package/dist/color/index.js +21 -0
- package/dist/{mixins → color/mixins}/color-area-drag.d.ts +1 -1
- package/dist/{mixins → color/mixins}/color-area-drag.js +2 -2
- package/dist/{mixins → color/mixins}/color-preview.js +1 -1
- package/dist/{mixins → color/mixins}/color-wheel-drag.js +1 -1
- package/dist/{styles → color/styles}/rtl-aware-gradient-direction.d.ts +1 -1
- package/dist/components/accordion.d.ts +3 -3
- package/dist/components/accordion.js +19 -15
- package/dist/components/alert-dialog.js +5 -4
- package/dist/components/alert.js +10 -20
- package/dist/components/aspect-ratio.js +3 -4
- package/dist/components/avatar.d.ts +6 -6
- package/dist/components/avatar.js +56 -8
- package/dist/components/badge.js +11 -9
- package/dist/components/banner.d.ts +61 -0
- package/dist/components/banner.js +101 -0
- package/dist/components/breadcrumbs.js +7 -9
- package/dist/components/button.d.ts +8 -6
- package/dist/components/button.js +22 -14
- package/dist/components/calendar.js +13 -24
- package/dist/components/card.js +9 -11
- package/dist/components/carousel.d.ts +1 -1
- package/dist/components/carousel.js +12 -20
- package/dist/components/checkbox-group.js +3 -3
- package/dist/components/checkbox.js +2 -2
- package/dist/components/combobox.js +6 -6
- package/dist/components/command.js +10 -14
- package/dist/components/confirm.d.ts +54 -5
- package/dist/components/confirm.js +44 -5
- package/dist/components/cta-group.d.ts +30 -14
- package/dist/components/cta-group.js +29 -10
- package/dist/components/date-field.js +2 -1
- package/dist/components/date-picker.js +4 -5
- package/dist/components/date-range-picker.js +3 -2
- package/dist/components/description.js +2 -1
- package/dist/components/dialog-dismiss.d.ts +18 -0
- package/dist/components/dialog-dismiss.js +15 -0
- package/dist/components/dialog.js +11 -15
- package/dist/components/disclosure.js +10 -14
- package/dist/components/drawer.js +3 -4
- package/dist/components/field-error.js +3 -3
- package/dist/components/form.js +2 -1
- package/dist/components/group.d.ts +14 -0
- package/dist/components/group.js +68 -13
- package/dist/components/header.js +3 -3
- package/dist/components/heading-scope.js +2 -1
- package/dist/components/heading.d.ts +4 -4
- package/dist/components/heading.js +7 -7
- package/dist/components/highlight.js +17 -12
- package/dist/components/hover-card.js +6 -8
- package/dist/components/image-placeholder.js +13 -19
- package/dist/components/index.d.ts +11 -38
- package/dist/components/index.js +11 -38
- package/dist/components/input.js +12 -7
- package/dist/components/item.js +10 -19
- package/dist/components/keyboard.js +3 -3
- package/dist/components/label.js +2 -1
- package/dist/components/link-button.d.ts +7 -5
- package/dist/components/link-button.js +24 -13
- package/dist/components/link.js +3 -4
- package/dist/components/listbox.js +6 -11
- package/dist/components/menu.js +5 -6
- package/dist/components/meter.js +5 -6
- package/dist/components/modal.js +9 -11
- package/dist/components/nav-link.d.ts +1 -1
- package/dist/components/nav-link.js +3 -4
- package/dist/components/navigation-menu.js +17 -23
- package/dist/components/number-field.js +8 -10
- package/dist/components/otp-field.js +2 -1
- package/dist/components/overlay-arrow.js +3 -4
- package/dist/components/pagination.js +8 -10
- package/dist/components/popover.js +3 -4
- package/dist/components/progress-bar.js +5 -5
- package/dist/components/property-list.d.ts +76 -0
- package/dist/components/property-list.js +175 -0
- package/dist/components/radio-group.js +5 -7
- package/dist/components/range-calendar.js +3 -3
- package/dist/components/relative-time.d.ts +72 -0
- package/dist/components/relative-time.js +45 -0
- package/dist/components/scroll-area.js +4 -5
- package/dist/components/search-field.js +8 -11
- package/dist/components/section.js +2 -1
- package/dist/components/select.js +10 -22
- package/dist/components/selection-indicator.js +3 -3
- package/dist/components/sentinel-row.js +3 -3
- package/dist/components/separator.js +3 -3
- package/dist/components/shared-element.js +2 -1
- package/dist/components/sheet.js +6 -7
- package/dist/components/sidebar.js +48 -76
- package/dist/components/slider.js +8 -10
- package/dist/components/spinner.js +3 -3
- package/dist/components/status-dot.d.ts +62 -0
- package/dist/components/status-dot.js +99 -0
- package/dist/components/switch.js +3 -3
- package/dist/components/tabs.js +9 -12
- package/dist/components/tag-group.js +7 -9
- package/dist/components/text-field.d.ts +17 -2
- package/dist/components/text-field.js +14 -4
- package/dist/components/text.js +2 -1
- package/dist/components/textarea.js +3 -4
- package/dist/components/time-field.js +2 -1
- package/dist/components/timeline.d.ts +67 -0
- package/dist/components/timeline.js +159 -0
- package/dist/components/toggle-button.js +5 -7
- package/dist/components/tooltip.js +3 -3
- package/dist/components/typeset.d.ts +2 -1
- package/dist/components/typeset.js +131 -123
- package/dist/components/youtube-embed.js +2 -1
- package/dist/docs/anchor-heading.d.ts +41 -0
- package/dist/docs/anchor-heading.js +62 -0
- package/dist/docs/callout.d.ts +46 -0
- package/dist/docs/callout.js +61 -0
- package/dist/docs/code-block.d.ts +74 -0
- package/dist/docs/code-block.js +322 -0
- package/dist/docs/code-tabs-sync.d.ts +26 -0
- package/dist/docs/code-tabs-sync.js +12 -0
- package/dist/docs/code-tabs.d.ts +53 -0
- package/dist/docs/code-tabs.js +102 -0
- package/dist/docs/copy-button.d.ts +31 -0
- package/dist/docs/copy-button.js +49 -0
- package/dist/docs/docs-feedback.d.ts +67 -0
- package/dist/docs/docs-feedback.js +74 -0
- package/dist/docs/docs-footer.d.ts +40 -0
- package/dist/docs/docs-footer.js +45 -0
- package/dist/docs/docs-hub.d.ts +93 -0
- package/dist/docs/docs-hub.js +142 -0
- package/dist/docs/docs-layout.d.ts +90 -0
- package/dist/docs/docs-layout.js +166 -0
- package/dist/docs/docs-nav-tools.d.ts +25 -0
- package/dist/docs/docs-nav-tools.js +14 -0
- package/dist/docs/docs-nav.d.ts +57 -0
- package/dist/docs/docs-nav.js +76 -0
- package/dist/docs/docs-not-found.d.ts +68 -0
- package/dist/docs/docs-not-found.js +100 -0
- package/dist/docs/docs-page-header.d.ts +55 -0
- package/dist/docs/docs-page-header.js +54 -0
- package/dist/docs/docs-pager.d.ts +50 -0
- package/dist/docs/docs-pager.js +75 -0
- package/dist/docs/file-tree.d.ts +57 -0
- package/dist/docs/file-tree.js +142 -0
- package/dist/docs/index.d.ts +38 -0
- package/dist/docs/index.js +38 -0
- package/dist/docs/install-command.d.ts +54 -0
- package/dist/docs/install-command.js +33 -0
- package/dist/docs/mixins/code-tabs-sync.d.ts +47 -0
- package/dist/docs/mixins/code-tabs-sync.js +137 -0
- package/dist/docs/mixins/copy-feedback.d.ts +25 -0
- package/dist/docs/mixins/copy-feedback.js +49 -0
- package/dist/docs/mixins/copy-from-url.d.ts +27 -0
- package/dist/docs/mixins/copy-from-url.js +95 -0
- package/dist/docs/mixins/docs-nav-tools.d.ts +27 -0
- package/dist/docs/mixins/docs-nav-tools.js +124 -0
- package/dist/docs/mixins/toc-spy.d.ts +30 -0
- package/dist/docs/mixins/toc-spy.js +165 -0
- package/dist/docs/next-steps.d.ts +45 -0
- package/dist/docs/next-steps.js +80 -0
- package/dist/docs/page-actions.d.ts +77 -0
- package/dist/docs/page-actions.js +78 -0
- package/dist/docs/plan-notice.d.ts +28 -0
- package/dist/docs/plan-notice.js +33 -0
- package/dist/docs/props-table.d.ts +64 -0
- package/dist/docs/props-table.js +147 -0
- package/dist/docs/steps.d.ts +51 -0
- package/dist/docs/steps.js +112 -0
- package/dist/docs/table-of-contents.d.ts +49 -0
- package/dist/docs/table-of-contents.js +139 -0
- package/dist/docs/ui-label.d.ts +51 -0
- package/dist/docs/ui-label.js +64 -0
- package/dist/docs/utils/docs-tree.d.ts +81 -0
- package/dist/docs/utils/docs-tree.js +57 -0
- package/dist/docs/utils/reveal-in-scroller.d.ts +19 -0
- package/dist/docs/utils/reveal-in-scroller.js +43 -0
- package/dist/landing/accent-text.d.ts +47 -0
- package/dist/landing/accent-text.js +107 -0
- package/dist/landing/animations/entrance.d.ts +40 -0
- package/dist/landing/animations/entrance.js +52 -0
- package/dist/landing/announcement-chip.d.ts +45 -0
- package/dist/landing/announcement-chip.js +36 -0
- package/dist/landing/author-band.d.ts +78 -0
- package/dist/landing/author-band.js +190 -0
- package/dist/landing/bento.d.ts +99 -0
- package/dist/landing/bento.js +138 -0
- package/dist/landing/changelog-strip.d.ts +74 -0
- package/dist/landing/changelog-strip.js +201 -0
- package/dist/{patterns → landing}/check-row.js +5 -7
- package/dist/{patterns → landing}/closing-cta.d.ts +4 -4
- package/dist/{patterns → landing}/closing-cta.js +8 -8
- package/dist/landing/code-stage.d.ts +93 -0
- package/dist/landing/code-stage.js +434 -0
- package/dist/landing/crosshair.d.ts +44 -0
- package/dist/landing/crosshair.js +48 -0
- package/dist/landing/curriculum.d.ts +79 -0
- package/dist/landing/curriculum.js +194 -0
- package/dist/landing/drawn-chart.d.ts +74 -0
- package/dist/landing/drawn-chart.js +377 -0
- package/dist/landing/event-ticker.d.ts +71 -0
- package/dist/landing/event-ticker.js +331 -0
- package/dist/landing/fan-out-diagram.d.ts +70 -0
- package/dist/landing/fan-out-diagram.js +481 -0
- package/dist/{patterns → landing}/faq-band.d.ts +5 -5
- package/dist/{patterns → landing}/faq-band.js +13 -14
- package/dist/landing/feature-band.d.ts +108 -0
- package/dist/landing/feature-band.js +67 -0
- package/dist/landing/feature.d.ts +148 -0
- package/dist/landing/feature.js +219 -0
- package/dist/landing/flow-diagram.d.ts +62 -0
- package/dist/landing/flow-diagram.js +240 -0
- package/dist/{patterns → landing}/icon-well.d.ts +17 -7
- package/dist/landing/icon-well.js +31 -0
- package/dist/landing/index.d.ts +52 -0
- package/dist/landing/index.js +52 -0
- package/dist/{patterns → landing}/install-tabs.js +4 -5
- package/dist/landing/landing-header.d.ts +103 -0
- package/dist/landing/landing-header.js +110 -0
- package/dist/landing/landing-hero.d.ts +119 -0
- package/dist/landing/landing-hero.js +172 -0
- package/dist/{components/marketing-section.d.ts → landing/landing-section.d.ts} +38 -15
- package/dist/landing/landing-section.js +183 -0
- package/dist/landing/logo-cloud.d.ts +56 -0
- package/dist/landing/logo-cloud.js +160 -0
- package/dist/landing/logo-sentence.d.ts +38 -0
- package/dist/landing/logo-sentence.js +51 -0
- package/dist/landing/marquee.d.ts +44 -0
- package/dist/landing/marquee.js +97 -0
- package/dist/landing/motion-loop.d.ts +43 -0
- package/dist/landing/motion-loop.js +42 -0
- package/dist/landing/pricing-band.d.ts +94 -0
- package/dist/landing/pricing-band.js +151 -0
- package/dist/landing/product-frame.d.ts +108 -0
- package/dist/landing/product-frame.js +202 -0
- package/dist/{patterns → landing}/proof-strip.d.ts +4 -4
- package/dist/{patterns → landing}/proof-strip.js +3 -3
- package/dist/landing/rails.d.ts +45 -0
- package/dist/landing/rails.js +69 -0
- package/dist/landing/rotating-text.d.ts +44 -0
- package/dist/landing/rotating-text.js +67 -0
- package/dist/landing/segmented-stage.d.ts +75 -0
- package/dist/landing/segmented-stage.js +141 -0
- package/dist/landing/sequence-diagram.d.ts +65 -0
- package/dist/landing/sequence-diagram.js +348 -0
- package/dist/landing/site-footer.d.ts +100 -0
- package/dist/landing/site-footer.js +274 -0
- package/dist/landing/site-header.d.ts +126 -0
- package/dist/landing/site-header.js +595 -0
- package/dist/{components → landing}/split.d.ts +12 -5
- package/dist/{components → landing}/split.js +26 -18
- package/dist/landing/sponsor-wall.d.ts +81 -0
- package/dist/landing/sponsor-wall.js +241 -0
- package/dist/{components → landing}/stat-strip.d.ts +31 -7
- package/dist/landing/stat-strip.js +105 -0
- package/dist/landing/step-list.d.ts +73 -0
- package/dist/landing/step-list.js +182 -0
- package/dist/landing/styles/card-grid.d.ts +115 -0
- package/dist/landing/styles/card-grid.js +295 -0
- package/dist/{patterns → landing}/tabbed-stage.d.ts +26 -8
- package/dist/landing/tabbed-stage.js +233 -0
- package/dist/landing/testimonial-band.d.ts +110 -0
- package/dist/landing/testimonial-band.js +164 -0
- package/dist/landing/typed-terminal.d.ts +62 -0
- package/dist/landing/typed-terminal.js +233 -0
- package/dist/landing/utils/pause-toggle.d.ts +37 -0
- package/dist/landing/utils/pause-toggle.js +71 -0
- package/dist/mixins/confirm-phrase.d.ts +19 -0
- package/dist/mixins/confirm-phrase.js +56 -0
- package/dist/mixins/copy-to-clipboard.d.ts +6 -0
- package/dist/mixins/copy-to-clipboard.js +17 -1
- package/dist/mixins/dialog-dismiss.d.ts +21 -0
- package/dist/mixins/dialog-dismiss.js +62 -0
- package/dist/mixins/index.d.ts +4 -15
- package/dist/mixins/index.js +4 -15
- package/dist/mixins/viewer-time.d.ts +20 -0
- package/dist/mixins/viewer-time.js +40 -0
- package/dist/styles/index.d.ts +3 -5
- package/dist/styles/index.js +3 -5
- package/dist/styles/landing.d.ts +200 -0
- package/dist/styles/landing.js +516 -0
- package/dist/styles/segmented-control.d.ts +49 -0
- package/dist/styles/segmented-control.js +71 -0
- package/dist/styles/surface-control.d.ts +18 -0
- package/dist/styles/surface-control.js +31 -0
- package/dist/test/table.d.ts +65 -0
- package/dist/test/table.js +108 -0
- package/dist/utils/eyebrow.d.ts +39 -0
- package/dist/utils/eyebrow.js +21 -0
- package/dist/utils/index.d.ts +2 -5
- package/dist/utils/index.js +2 -5
- package/dist/utils/relative-time.d.ts +44 -0
- package/dist/utils/relative-time.js +69 -0
- package/package.json +16 -6
- package/src/theme.css +87 -22
- package/dist/components/empty.d.ts +0 -91
- package/dist/components/empty.js +0 -151
- package/dist/components/feature.d.ts +0 -102
- package/dist/components/feature.js +0 -150
- package/dist/components/logo-cloud.d.ts +0 -42
- package/dist/components/logo-cloud.js +0 -41
- package/dist/components/marketing-header.d.ts +0 -71
- package/dist/components/marketing-header.js +0 -81
- package/dist/components/marketing-section.js +0 -117
- package/dist/components/skeleton.d.ts +0 -36
- package/dist/components/skeleton.js +0 -38
- package/dist/components/stat-strip.js +0 -65
- package/dist/components/table.d.ts +0 -152
- package/dist/components/table.js +0 -238
- package/dist/patterns/accent-text.d.ts +0 -30
- package/dist/patterns/accent-text.js +0 -17
- package/dist/patterns/announcement-chip.d.ts +0 -41
- package/dist/patterns/announcement-chip.js +0 -49
- package/dist/patterns/bento.d.ts +0 -68
- package/dist/patterns/bento.js +0 -94
- package/dist/patterns/code-stage.d.ts +0 -63
- package/dist/patterns/code-stage.js +0 -82
- package/dist/patterns/feature-band.d.ts +0 -85
- package/dist/patterns/feature-band.js +0 -50
- package/dist/patterns/icon-well.js +0 -38
- package/dist/patterns/index.d.ts +0 -23
- package/dist/patterns/index.js +0 -23
- package/dist/patterns/landing-hero.d.ts +0 -93
- package/dist/patterns/landing-hero.js +0 -126
- package/dist/patterns/product-frame.d.ts +0 -60
- package/dist/patterns/product-frame.js +0 -70
- package/dist/patterns/step-list.d.ts +0 -47
- package/dist/patterns/step-list.js +0 -85
- package/dist/patterns/tabbed-stage.js +0 -77
- package/dist/styles/marketing.d.ts +0 -120
- package/dist/styles/marketing.js +0 -225
- package/dist/utils/semantic-color-panel.d.ts +0 -35
- package/dist/utils/semantic-color-panel.js +0 -28
- /package/dist/{behaviors → app/behaviors}/drag-session.d.ts +0 -0
- /package/dist/{behaviors → app/behaviors}/resize-session.d.ts +0 -0
- /package/dist/{behaviors → app/behaviors}/resize-session.js +0 -0
- /package/dist/{behaviors → app/behaviors}/selection-model.d.ts +0 -0
- /package/dist/{behaviors → app/behaviors}/selection-model.js +0 -0
- /package/dist/{components → app}/drop-indicator.d.ts +0 -0
- /package/dist/{components → app}/file-trigger.d.ts +0 -0
- /package/dist/{components → app}/menubar.d.ts +0 -0
- /package/dist/{mixins → app/mixins}/chart-tooltip.d.ts +0 -0
- /package/dist/{mixins → app/mixins}/chart-tooltip.js +0 -0
- /package/dist/{mixins → app/mixins}/context-menu.d.ts +0 -0
- /package/dist/{mixins → app/mixins}/context-menu.js +0 -0
- /package/dist/{mixins → app/mixins}/drag-reorder.d.ts +0 -0
- /package/dist/{mixins → app/mixins}/drop-zone.d.ts +0 -0
- /package/dist/{mixins → app/mixins}/grid-list-keys.d.ts +0 -0
- /package/dist/{mixins → app/mixins}/menubar-keys.d.ts +0 -0
- /package/dist/{mixins → app/mixins}/resize-handle.d.ts +0 -0
- /package/dist/{mixins/treeKeys.d.ts → app/mixins/tree-keys.d.ts} +0 -0
- /package/dist/{components → app}/resizable.d.ts +0 -0
- /package/dist/{components → app}/shortcut-list.d.ts +0 -0
- /package/dist/{styles → app/styles}/chart-palette.js +0 -0
- /package/dist/{styles → app/styles}/graphic-host.js +0 -0
- /package/dist/{styles → app/styles}/legend-toggle.js +0 -0
- /package/dist/{components → app}/toolbar.d.ts +0 -0
- /package/dist/{utils → app/utils}/chart-scale.d.ts +0 -0
- /package/dist/{behaviors → chat/behaviors}/scroll-follow-model.d.ts +0 -0
- /package/dist/{components → chat}/bubble.d.ts +0 -0
- /package/dist/{components → chat}/marker.d.ts +0 -0
- /package/dist/{components → chat}/message.d.ts +0 -0
- /package/dist/{mixins → chat/mixins}/attachment-trigger.d.ts +0 -0
- /package/dist/{mixins → chat/mixins}/attachment-trigger.js +0 -0
- /package/dist/{mixins → chat/mixins}/message-follow.d.ts +0 -0
- /package/dist/{components → color}/color-area.d.ts +0 -0
- /package/dist/{components → color}/color-field.d.ts +0 -0
- /package/dist/{components → color}/color-slider.d.ts +0 -0
- /package/dist/{components → color}/color-swatch-picker.d.ts +0 -0
- /package/dist/{components → color}/color-swatch.d.ts +0 -0
- /package/dist/{components → color}/color-wheel.d.ts +0 -0
- /package/dist/{mixins → color/mixins}/color-channel-sync.d.ts +0 -0
- /package/dist/{mixins → color/mixins}/color-channel-sync.js +0 -0
- /package/dist/{mixins → color/mixins}/color-preview.d.ts +0 -0
- /package/dist/{mixins → color/mixins}/color-wheel-drag.d.ts +0 -0
- /package/dist/{styles → color/styles}/rtl-aware-gradient-direction.js +0 -0
- /package/dist/{utils → color/utils}/hue-spectrum.d.ts +0 -0
- /package/dist/{utils → color/utils}/hue-spectrum.js +0 -0
- /package/dist/{patterns → landing}/check-row.d.ts +0 -0
- /package/dist/{patterns → landing}/install-tabs.d.ts +0 -0
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Stat cards for a dashboard: a muted label, the value in tabular figures, a delta pill toned
|
|
3
|
+
* by meaning with its comparison, an optional trend and a sentence explaining the number,
|
|
4
|
+
* laid out by a group as cards, ruled columns, or link tabs that switch the chart below.
|
|
5
|
+
*
|
|
6
|
+
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
7
|
+
* @copyright Sergio Xalambrí 2026
|
|
8
|
+
*/
|
|
9
|
+
import type { Handle, Props as TagProps, RemixNode } from "remix/component";
|
|
10
|
+
/**
|
|
11
|
+
* Prop types for {@link StatCard} and its parts.
|
|
12
|
+
*/
|
|
13
|
+
export declare namespace StatCard {
|
|
14
|
+
/**
|
|
15
|
+
* How a group sets its stats: `cards` boxes each one, `ruled` sets columns under a 1px rule,
|
|
16
|
+
* and `tabs` joins link cards into one divided strip whose current card underlines.
|
|
17
|
+
*/
|
|
18
|
+
type Variant = "cards" | "ruled" | "tabs";
|
|
19
|
+
/** Direction the number moved since the comparison period. */
|
|
20
|
+
type Trend = "up" | "down" | "flat";
|
|
21
|
+
/** Props accepted by {@link StatCard}. */
|
|
22
|
+
interface Props extends Omit<TagProps<"div">, "children"> {
|
|
23
|
+
/** Makes the whole card a link, such as the metric's chart tab or its detail page. */
|
|
24
|
+
href?: string;
|
|
25
|
+
/** Marks a link card as the metric the page shows, through `aria-current="true"`. */
|
|
26
|
+
current?: boolean;
|
|
27
|
+
children: RemixNode;
|
|
28
|
+
}
|
|
29
|
+
/** Props accepted by {@link StatCard.Group}. */
|
|
30
|
+
interface GroupProps extends TagProps<"div"> {
|
|
31
|
+
/** @default {@link DEFAULT_VARIANT} */
|
|
32
|
+
variant?: Variant;
|
|
33
|
+
/** Columns at full width; a narrower container shows at most two, compact, then one. */
|
|
34
|
+
columns?: number;
|
|
35
|
+
}
|
|
36
|
+
/** Props accepted by {@link StatCard.Delta}. */
|
|
37
|
+
interface DeltaProps extends TagProps<"span"> {
|
|
38
|
+
trend: Trend;
|
|
39
|
+
/** Tones a fall as good and a rise as bad, for numbers such as latency or error rate. */
|
|
40
|
+
invert?: boolean;
|
|
41
|
+
/** Spoken before the change, since the arrow is decorative ("Increased by"). */
|
|
42
|
+
trendLabel?: string;
|
|
43
|
+
/** The period it compares with, set after the pill ("vs last week"). */
|
|
44
|
+
comparison?: RemixNode;
|
|
45
|
+
}
|
|
46
|
+
/** Props accepted by {@link StatCard.Skeleton}. */
|
|
47
|
+
interface SkeletonProps extends Omit<TagProps<"div">, "children"> {
|
|
48
|
+
/**
|
|
49
|
+
* Reserves a delta pill.
|
|
50
|
+
*
|
|
51
|
+
* @default true
|
|
52
|
+
*/
|
|
53
|
+
delta?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Reserves the comparison set after the delta pill, which wraps under the pill in a
|
|
56
|
+
* narrow card just as the real comparison does.
|
|
57
|
+
*
|
|
58
|
+
* @default true
|
|
59
|
+
*/
|
|
60
|
+
comparison?: boolean;
|
|
61
|
+
/** Reserves the trend slot. */
|
|
62
|
+
chart?: boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Reserves a sentence-long footer, which wraps to a second line in a narrow card. Given the
|
|
65
|
+
* real footer text, draws it invisibly so it wraps to the card's lines at every width; text
|
|
66
|
+
* wins over `footerLines`.
|
|
67
|
+
*
|
|
68
|
+
* @default true
|
|
69
|
+
*/
|
|
70
|
+
footer?: boolean | string;
|
|
71
|
+
/**
|
|
72
|
+
* Reserves exactly this many footer lines at every width (ignored when `footer` is text), for footers whose real sentences
|
|
73
|
+
* wrap even in a wide card. Unset, the footer wraps where a 40-character sentence does.
|
|
74
|
+
*/
|
|
75
|
+
footerLines?: 1 | 2;
|
|
76
|
+
/**
|
|
77
|
+
* The real card's label, drawn as invisible text on a placeholder bar, so the skeleton's
|
|
78
|
+
* label wraps to the same lines as the card's at every width.
|
|
79
|
+
*/
|
|
80
|
+
label?: string;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Renders one stat: a grid that sets the label and delta on one line, the value under them,
|
|
85
|
+
* then the trend and the footer, in that order whatever order the parts are written in. With
|
|
86
|
+
* `href` the whole card is one link, and `current` marks it as the metric being shown.
|
|
87
|
+
*
|
|
88
|
+
* @param handle Runtime handle carrying the card's props.
|
|
89
|
+
* @returns The render function producing the card's markup.
|
|
90
|
+
* @example
|
|
91
|
+
* <StatCard>
|
|
92
|
+
* <StatCard.Label>{t("stats.uptime")}</StatCard.Label>
|
|
93
|
+
* <StatCard.Value>99.98%</StatCard.Value>
|
|
94
|
+
* <StatCard.Delta trend="up" comparison={t("stats.vsLastWeek")}>+0.02%</StatCard.Delta>
|
|
95
|
+
* <StatCard.Footer>{t("stats.uptimeFooter")}</StatCard.Footer>
|
|
96
|
+
* </StatCard>
|
|
97
|
+
* @example
|
|
98
|
+
* <StatCard href="?metric=latency" current={metric === "latency"}>…</StatCard>
|
|
99
|
+
*/
|
|
100
|
+
export declare function StatCard(handle: Handle<StatCard.Props>): () => import("remix/component").RemixElement;
|
|
101
|
+
export declare namespace StatCard {
|
|
102
|
+
var Group: (handle: Handle<StatCard.GroupProps>) => () => import("remix/component").RemixElement;
|
|
103
|
+
var Label: (handle: Handle<TagProps<"div">>) => () => import("remix/component").RemixElement;
|
|
104
|
+
var Value: (handle: Handle<TagProps<"div">>) => () => import("remix/component").RemixElement;
|
|
105
|
+
var Delta: (handle: Handle<StatCard.DeltaProps>) => () => import("remix/component").RemixElement;
|
|
106
|
+
var Chart: (handle: Handle<TagProps<"div">>) => () => import("remix/component").RemixElement;
|
|
107
|
+
var Footer: (handle: Handle<TagProps<"div">>) => () => import("remix/component").RemixElement;
|
|
108
|
+
var Skeleton: (handle: Handle<StatCard.SkeletonProps>) => () => import("remix/component").RemixElement;
|
|
109
|
+
}
|
|
@@ -0,0 +1,379 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "remix/component/jsx-runtime";
|
|
2
|
+
import { MinusIcon, TrendingDownIcon, TrendingUpIcon } from "@sdxc/icons";
|
|
3
|
+
import { visuallyHidden } from "@sdxc/u/a11y";
|
|
4
|
+
import { bg, border, fg } from "@sdxc/u/color";
|
|
5
|
+
import { rounded } from "@sdxc/u/effects";
|
|
6
|
+
import { mergeMix, raw } from "@sdxc/u/general";
|
|
7
|
+
import { block, container, grid, hstack, inlineBlock, inlineFlex, items } from "@sdxc/u/layout";
|
|
8
|
+
import { bs, is, minIs, pi } from "@sdxc/u/size";
|
|
9
|
+
import { data } from "@sdxc/u/state";
|
|
10
|
+
import { nowrap, tabularNums, text, verticalAlign, weight } from "@sdxc/u/typography";
|
|
11
|
+
import { STAT_COMPACT, STAT_GROUP_CONTAINER, statDeltaPlacement } from "./styles/stat-delta.js";
|
|
12
|
+
/** Column count a group lays out at full width when `columns` is omitted. */
|
|
13
|
+
const DEFAULT_COLUMNS = 4;
|
|
14
|
+
/** Layout a group uses when `variant` is omitted. */
|
|
15
|
+
const DEFAULT_VARIANT = "cards";
|
|
16
|
+
/** Whether a skeleton reserves a delta when `delta` is omitted. */
|
|
17
|
+
const DEFAULT_SKELETON_DELTA = true;
|
|
18
|
+
/** Whether a skeleton's delta reserves a comparison when `comparison` is omitted. */
|
|
19
|
+
const DEFAULT_SKELETON_COMPARISON = true;
|
|
20
|
+
/** Widths of the bars a skeleton draws per footer line when `footerLines` is set. */
|
|
21
|
+
const FOOTER_LINE_WIDTHS = ["90%", "60%"];
|
|
22
|
+
/** Whether a skeleton reserves a footer when `footer` is omitted. */
|
|
23
|
+
const DEFAULT_SKELETON_FOOTER = true;
|
|
24
|
+
/** Width of a comparison's placeholder: about "vs previous 24 hours" in the comparison's text. */
|
|
25
|
+
const COMPARISON_BAR = "10em";
|
|
26
|
+
/** Decorative arrow drawn in the delta pill for each trend. */
|
|
27
|
+
const TREND_ICONS = { up: TrendingUpIcon, down: TrendingDownIcon, flat: MinusIcon };
|
|
28
|
+
/** Fallback for the neutral border colour, matching the theme's own default. */
|
|
29
|
+
const BORDER = "var(--ui-neutral-border, color-mix(in oklab, CanvasText 16%, transparent))";
|
|
30
|
+
/**
|
|
31
|
+
* Picks the delta's tone from its meaning: a rise is good unless `invert` says a fall is.
|
|
32
|
+
*
|
|
33
|
+
* @param trend Direction the number moved.
|
|
34
|
+
* @param invert Whether a fall is the good direction.
|
|
35
|
+
* @returns The semantic role the pill is drawn in.
|
|
36
|
+
*/
|
|
37
|
+
function deltaTone(trend, invert) {
|
|
38
|
+
if (trend === "flat")
|
|
39
|
+
return "neutral";
|
|
40
|
+
return (trend === "up") !== invert ? "success" : "danger";
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Renders one stat: a grid that sets the label and delta on one line, the value under them,
|
|
44
|
+
* then the trend and the footer, in that order whatever order the parts are written in. With
|
|
45
|
+
* `href` the whole card is one link, and `current` marks it as the metric being shown.
|
|
46
|
+
*
|
|
47
|
+
* @param handle Runtime handle carrying the card's props.
|
|
48
|
+
* @returns The render function producing the card's markup.
|
|
49
|
+
* @example
|
|
50
|
+
* <StatCard>
|
|
51
|
+
* <StatCard.Label>{t("stats.uptime")}</StatCard.Label>
|
|
52
|
+
* <StatCard.Value>99.98%</StatCard.Value>
|
|
53
|
+
* <StatCard.Delta trend="up" comparison={t("stats.vsLastWeek")}>+0.02%</StatCard.Delta>
|
|
54
|
+
* <StatCard.Footer>{t("stats.uptimeFooter")}</StatCard.Footer>
|
|
55
|
+
* </StatCard>
|
|
56
|
+
* @example
|
|
57
|
+
* <StatCard href="?metric=latency" current={metric === "latency"}>…</StatCard>
|
|
58
|
+
*/
|
|
59
|
+
export function StatCard(handle) {
|
|
60
|
+
return () => {
|
|
61
|
+
let { href, current, children, mix, ...rest } = handle.props;
|
|
62
|
+
let frame = [
|
|
63
|
+
/**
|
|
64
|
+
* Every variant's frame lives in one rule keyed off the group, so the variant always
|
|
65
|
+
* wins over the default card frame whatever order the stylesheet layers land in.
|
|
66
|
+
*/
|
|
67
|
+
raw({
|
|
68
|
+
display: "grid",
|
|
69
|
+
gridTemplateColumns: "minmax(0, 1fr) auto",
|
|
70
|
+
alignItems: "center",
|
|
71
|
+
alignContent: "start",
|
|
72
|
+
columnGap: "0.75rem",
|
|
73
|
+
rowGap: "0.375rem",
|
|
74
|
+
minInlineSize: "0",
|
|
75
|
+
padding: "var(--ui-stat-card-padding, 1.25rem)",
|
|
76
|
+
border: `1px solid ${BORDER}`,
|
|
77
|
+
borderRadius: "var(--ui-radius-lg, 0.75rem)",
|
|
78
|
+
backgroundColor: "var(--ui-bg, Canvas)",
|
|
79
|
+
color: "inherit",
|
|
80
|
+
textDecoration: "none",
|
|
81
|
+
outlineOffset: "-2px",
|
|
82
|
+
transition: "background-color 150ms ease-out",
|
|
83
|
+
'[data-stat-group="ruled"] > &': {
|
|
84
|
+
paddingInline: "0",
|
|
85
|
+
paddingBlockEnd: "0",
|
|
86
|
+
border: "none",
|
|
87
|
+
borderBlockStart: `1px solid ${BORDER}`,
|
|
88
|
+
borderRadius: "0",
|
|
89
|
+
backgroundColor: "transparent",
|
|
90
|
+
},
|
|
91
|
+
'[data-stat-group="tabs"] > &': {
|
|
92
|
+
border: "none",
|
|
93
|
+
borderInlineEnd: `1px solid ${BORDER}`,
|
|
94
|
+
borderBlockEnd: `1px solid ${BORDER}`,
|
|
95
|
+
borderRadius: "0",
|
|
96
|
+
backgroundColor: "transparent",
|
|
97
|
+
},
|
|
98
|
+
"&:is(a):hover": { backgroundColor: "var(--ui-neutral-bg-tint, transparent)" },
|
|
99
|
+
'&[aria-current="true"]': {
|
|
100
|
+
boxShadow: "inset 0 -2px 0 0 var(--ui-brand-fg, currentColor)",
|
|
101
|
+
},
|
|
102
|
+
"&:focus-visible": { outline: "2px solid var(--ui-brand-ring, Highlight)" },
|
|
103
|
+
"@media (prefers-reduced-motion: reduce)": { transition: "none" },
|
|
104
|
+
[STAT_COMPACT]: {
|
|
105
|
+
'[data-stat-split]:not([data-stat-group="ruled"]) > &': {
|
|
106
|
+
padding: "var(--ui-stat-card-padding, 0.875rem)",
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
}),
|
|
110
|
+
];
|
|
111
|
+
if (href !== undefined) {
|
|
112
|
+
return (_jsx("a", { href: href, "aria-current": current ? "true" : undefined, "data-slot": "stat-card", ...rest, mix: mergeMix(frame, mix), children: children }));
|
|
113
|
+
}
|
|
114
|
+
return (_jsx("div", { "data-slot": "stat-card", ...rest, mix: mergeMix(frame, mix), children: children }));
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Lays stats out by the width of their container: one column, two compact ones from 18rem,
|
|
119
|
+
* two full-size from 28rem, and `columns` from 52rem. `cards` boxes each stat, `ruled` sets them as columns under a 1px rule, and
|
|
120
|
+
* `tabs` joins link cards into one divided strip, the current one underlined.
|
|
121
|
+
*
|
|
122
|
+
* @param handle Runtime handle carrying the group's props.
|
|
123
|
+
* @returns The render function producing the group's markup.
|
|
124
|
+
* @example
|
|
125
|
+
* <StatCard.Group variant="ruled" aria-label={t("stats.overview")}>{cards}</StatCard.Group>
|
|
126
|
+
* @example
|
|
127
|
+
* <StatCard.Group variant="tabs" columns={3} aria-label={t("stats.metrics")}>{tabs}</StatCard.Group>
|
|
128
|
+
*/
|
|
129
|
+
StatCard.Group = function StatCardGroup(handle) {
|
|
130
|
+
return () => {
|
|
131
|
+
let { variant, columns, children, mix, ...rest } = handle.props;
|
|
132
|
+
let resolvedVariant = variant ?? DEFAULT_VARIANT;
|
|
133
|
+
let wide = Math.max(1, Math.round(columns ?? DEFAULT_COLUMNS));
|
|
134
|
+
let middle = Math.min(2, wide);
|
|
135
|
+
let tabs = resolvedVariant === "tabs";
|
|
136
|
+
return (_jsx("div", { role: "group", "data-slot": "stat-group", "data-variant": resolvedVariant, ...rest, mix: mergeMix([
|
|
137
|
+
block(),
|
|
138
|
+
is("full"),
|
|
139
|
+
minIs(0),
|
|
140
|
+
container(STAT_GROUP_CONTAINER),
|
|
141
|
+
tabs
|
|
142
|
+
? raw({
|
|
143
|
+
border: `1px solid ${BORDER}`,
|
|
144
|
+
borderRadius: "var(--ui-radius-lg, 0.75rem)",
|
|
145
|
+
overflow: "clip",
|
|
146
|
+
})
|
|
147
|
+
: undefined,
|
|
148
|
+
], mix), children: _jsx("div", { "data-stat-group": resolvedVariant, "data-stat-split": middle > 1 ? "" : undefined, mix: [
|
|
149
|
+
grid(),
|
|
150
|
+
/**
|
|
151
|
+
* Every column count lives in one rule, so the widest layout that fits always wins
|
|
152
|
+
* whatever order the stylesheet layers land in.
|
|
153
|
+
*/
|
|
154
|
+
raw({
|
|
155
|
+
gridTemplateColumns: "minmax(0, 1fr)",
|
|
156
|
+
gap: tabs ? "0" : "1rem",
|
|
157
|
+
columnGap: resolvedVariant === "ruled" ? "2rem" : undefined,
|
|
158
|
+
rowGap: resolvedVariant === "ruled" ? "1.5rem" : undefined,
|
|
159
|
+
marginInlineEnd: tabs ? "-1px" : undefined,
|
|
160
|
+
marginBlockEnd: tabs ? "-1px" : undefined,
|
|
161
|
+
[`@container ${STAT_GROUP_CONTAINER} (min-width: 18rem)`]: {
|
|
162
|
+
gridTemplateColumns: `repeat(${middle}, minmax(0, 1fr))`,
|
|
163
|
+
},
|
|
164
|
+
[`@container ${STAT_GROUP_CONTAINER} (min-width: 52rem)`]: {
|
|
165
|
+
gridTemplateColumns: `repeat(${wide}, minmax(0, 1fr))`,
|
|
166
|
+
},
|
|
167
|
+
}),
|
|
168
|
+
], children: children }) }));
|
|
169
|
+
};
|
|
170
|
+
};
|
|
171
|
+
/**
|
|
172
|
+
* Renders the stat's name in muted 14px text at the start of the first line.
|
|
173
|
+
*
|
|
174
|
+
* @param handle Runtime handle carrying the label's props.
|
|
175
|
+
* @returns The render function producing the label's markup.
|
|
176
|
+
* @example
|
|
177
|
+
* <StatCard.Label>{t("stats.p95")}</StatCard.Label>
|
|
178
|
+
*/
|
|
179
|
+
StatCard.Label = function StatCardLabel(handle) {
|
|
180
|
+
return () => {
|
|
181
|
+
let { mix, ...rest } = handle.props;
|
|
182
|
+
return (_jsx("div", { "data-slot": "stat-card-label", ...rest, mix: mergeMix([
|
|
183
|
+
raw({ order: 0, minInlineSize: "0" }),
|
|
184
|
+
text("sm"),
|
|
185
|
+
weight("medium"),
|
|
186
|
+
fg("neutral.muted"),
|
|
187
|
+
], mix) }));
|
|
188
|
+
};
|
|
189
|
+
};
|
|
190
|
+
/**
|
|
191
|
+
* Renders the number at `--ui-stat-value-size` (30px in a card, 24px in ruled columns, 22px in
|
|
192
|
+
* a compact group), semibold in tabular figures, so values in a row line up and a live update
|
|
193
|
+
* never shifts its width. Pass `—` for an unknown value.
|
|
194
|
+
*
|
|
195
|
+
* @param handle Runtime handle carrying the value's props.
|
|
196
|
+
* @returns The render function producing the value's markup.
|
|
197
|
+
* @example
|
|
198
|
+
* <StatCard.Value>182 ms</StatCard.Value>
|
|
199
|
+
*/
|
|
200
|
+
StatCard.Value = function StatCardValue(handle) {
|
|
201
|
+
return () => {
|
|
202
|
+
let { mix, ...rest } = handle.props;
|
|
203
|
+
return (_jsx("div", { "data-slot": "stat-card-value", ...rest, mix: mergeMix([
|
|
204
|
+
tabularNums(),
|
|
205
|
+
raw({
|
|
206
|
+
order: 2,
|
|
207
|
+
gridColumn: "1 / -1",
|
|
208
|
+
minInlineSize: "0",
|
|
209
|
+
fontSize: "var(--ui-stat-value-size, 1.875rem)",
|
|
210
|
+
lineHeight: "1.2",
|
|
211
|
+
fontWeight: "600",
|
|
212
|
+
letterSpacing: "-0.01em",
|
|
213
|
+
'[data-stat-group="ruled"] > * > &': {
|
|
214
|
+
fontSize: "var(--ui-stat-value-size, 1.5rem)",
|
|
215
|
+
},
|
|
216
|
+
[STAT_COMPACT]: {
|
|
217
|
+
"[data-stat-split] > * > &": { fontSize: "var(--ui-stat-value-size, 1.375rem)" },
|
|
218
|
+
},
|
|
219
|
+
}),
|
|
220
|
+
], mix) }));
|
|
221
|
+
};
|
|
222
|
+
};
|
|
223
|
+
/**
|
|
224
|
+
* Renders the change as a pill toned by meaning (success when it moved the good way, danger
|
|
225
|
+
* when the bad way, neutral when flat) with a decorative arrow, then the comparison in muted
|
|
226
|
+
* text. It sits at the end of the label's line in a card, and under the value elsewhere.
|
|
227
|
+
*
|
|
228
|
+
* @param handle Runtime handle carrying the delta's props.
|
|
229
|
+
* @returns The render function producing the delta's markup.
|
|
230
|
+
* @example
|
|
231
|
+
* <StatCard.Delta trend="up" invert trendLabel={t("stats.increased")} comparison={t("stats.vsLastWeek")}>+12 ms</StatCard.Delta>
|
|
232
|
+
*/
|
|
233
|
+
StatCard.Delta = function StatCardDelta(handle) {
|
|
234
|
+
return () => {
|
|
235
|
+
let { trend, invert, trendLabel, comparison, children, mix, ...rest } = handle.props;
|
|
236
|
+
let tone = deltaTone(trend, invert ?? false);
|
|
237
|
+
let Icon = TREND_ICONS[trend];
|
|
238
|
+
return (_jsxs("span", { "data-slot": "stat-card-delta", "data-trend": trend, "data-tone": tone, ...rest, mix: mergeMix([hstack({ gap: 1.5, align: "center" }), nowrap(), statDeltaPlacement()], mix), children: [_jsxs("span", { "data-slot": "stat-card-delta-pill", mix: [
|
|
239
|
+
inlineFlex(),
|
|
240
|
+
items("center"),
|
|
241
|
+
raw({ gap: "0.25rem" }),
|
|
242
|
+
bs("var(--ui-stat-delta-block-size, 1.375rem)"),
|
|
243
|
+
pi(2),
|
|
244
|
+
rounded("full"),
|
|
245
|
+
border({ width: 1, style: "solid" }),
|
|
246
|
+
text("xs"),
|
|
247
|
+
weight("medium"),
|
|
248
|
+
tabularNums(),
|
|
249
|
+
data("tone", "success", [bg("success.tint"), fg("success"), border("success")]),
|
|
250
|
+
data("tone", "danger", [bg("danger.tint"), fg("danger"), border("danger")]),
|
|
251
|
+
data("tone", "neutral", [bg("neutral.tint"), fg("neutral"), border("neutral")]),
|
|
252
|
+
], "data-tone": tone, children: [_jsx(Icon, { size: 12, "aria-hidden": "true" }), trendLabel ? _jsx("span", { mix: [visuallyHidden()], children: trendLabel }) : null, children] }), comparison === undefined ? null : (_jsx("span", { "data-slot": "stat-card-comparison", mix: [text("xs"), fg("neutral.muted")], children: comparison }))] }));
|
|
253
|
+
};
|
|
254
|
+
};
|
|
255
|
+
/**
|
|
256
|
+
* Holds a trend under the value, such as a {@link Sparkline}, at `--ui-stat-chart-block-size`
|
|
257
|
+
* across the card's full width.
|
|
258
|
+
*
|
|
259
|
+
* @param handle Runtime handle carrying the slot's props.
|
|
260
|
+
* @returns The render function producing the slot's markup.
|
|
261
|
+
* @example
|
|
262
|
+
* <StatCard.Chart><Sparkline values={latency} label={t("stats.latencyTrend")} area /></StatCard.Chart>
|
|
263
|
+
*/
|
|
264
|
+
StatCard.Chart = function StatCardChart(handle) {
|
|
265
|
+
return () => {
|
|
266
|
+
let { mix, ...rest } = handle.props;
|
|
267
|
+
return (_jsx("div", { "data-slot": "stat-card-chart", ...rest, mix: mergeMix([
|
|
268
|
+
raw({
|
|
269
|
+
order: 4,
|
|
270
|
+
gridColumn: "1 / -1",
|
|
271
|
+
display: "flex",
|
|
272
|
+
alignItems: "stretch",
|
|
273
|
+
minInlineSize: "0",
|
|
274
|
+
blockSize: "var(--ui-stat-chart-block-size, 2.5rem)",
|
|
275
|
+
"--ui-sparkline-block-size": "100%",
|
|
276
|
+
}),
|
|
277
|
+
], mix) }));
|
|
278
|
+
};
|
|
279
|
+
};
|
|
280
|
+
/**
|
|
281
|
+
* Renders the sentence that explains the number ("2 monitors down since 09:14"), muted, under
|
|
282
|
+
* everything else.
|
|
283
|
+
*
|
|
284
|
+
* @param handle Runtime handle carrying the footer's props.
|
|
285
|
+
* @returns The render function producing the footer's markup.
|
|
286
|
+
* @example
|
|
287
|
+
* <StatCard.Footer>{t("stats.incidentsFooter", { count: 2 })}</StatCard.Footer>
|
|
288
|
+
*/
|
|
289
|
+
StatCard.Footer = function StatCardFooter(handle) {
|
|
290
|
+
return () => {
|
|
291
|
+
let { mix, ...rest } = handle.props;
|
|
292
|
+
return (_jsx("div", { "data-slot": "stat-card-footer", ...rest, mix: mergeMix([
|
|
293
|
+
raw({
|
|
294
|
+
order: 5,
|
|
295
|
+
gridColumn: "1 / -1",
|
|
296
|
+
minInlineSize: "0",
|
|
297
|
+
marginBlockStart: "0.25rem",
|
|
298
|
+
}),
|
|
299
|
+
text("sm"),
|
|
300
|
+
fg("neutral.muted"),
|
|
301
|
+
], mix) }));
|
|
302
|
+
};
|
|
303
|
+
};
|
|
304
|
+
/**
|
|
305
|
+
* Stands in for a stat while it loads: the same parts placed by the same container queries,
|
|
306
|
+
* with bars that wrap where a comparison and a 40-character footer sentence wrap, so the card
|
|
307
|
+
* keeps its height when the real one streams in.
|
|
308
|
+
*
|
|
309
|
+
* @param handle Runtime handle carrying the skeleton's props.
|
|
310
|
+
* @returns The render function producing the placeholder's markup.
|
|
311
|
+
* @example
|
|
312
|
+
* <StatCard.Skeleton chart />
|
|
313
|
+
* @example
|
|
314
|
+
* <StatCard.Skeleton comparison={false} footer={false} />
|
|
315
|
+
* @example
|
|
316
|
+
* <StatCard.Skeleton footerLines={2} />
|
|
317
|
+
* @example
|
|
318
|
+
* <StatCard.Skeleton label="Monthly Pings Usage" footer="Out of 43,200 estimated" delta={false} />
|
|
319
|
+
*/
|
|
320
|
+
StatCard.Skeleton = function StatCardSkeleton(handle) {
|
|
321
|
+
return () => {
|
|
322
|
+
let { delta, comparison, chart, footer, footerLines, label, mix, ...rest } = handle.props;
|
|
323
|
+
return (_jsxs(StatCard, { "aria-hidden": "true", "data-skeleton": "", ...rest, mix: mix, children: [_jsx(StatCard.Label, { children: label ? (_jsx(StatCardGhostText, { slot: "stat-card-skeleton-label", children: label })) : (_jsx(StatCardBar, { width: "40%" })) }), _jsx(StatCard.Value, { children: _jsx(StatCardBar, { width: "5ch" }) }), (delta ?? DEFAULT_SKELETON_DELTA) ? (_jsxs("span", { "data-slot": "stat-card-delta", mix: [hstack({ gap: 1.5, align: "center" }), nowrap(), statDeltaPlacement()], children: [_jsx("span", { mix: [
|
|
324
|
+
block(),
|
|
325
|
+
is("3.5rem"),
|
|
326
|
+
bs("var(--ui-stat-delta-block-size, 1.375rem)"),
|
|
327
|
+
rounded("full"),
|
|
328
|
+
raw({ backgroundColor: BORDER }),
|
|
329
|
+
] }), (comparison ?? DEFAULT_SKELETON_COMPARISON) ? (_jsx("span", { "data-slot": "stat-card-comparison", mix: [text("xs")], children: _jsx(StatCardBar, { width: COMPARISON_BAR }) })) : null] })) : null, chart ? (_jsx(StatCard.Chart, { children: _jsx(StatCardBar, { width: "100%", block: true }) })) : null, (footer ?? DEFAULT_SKELETON_FOOTER) ? (_jsx(StatCard.Footer, { children: _jsx(StatCardSkeletonFooter, { footer: footer, lines: footerLines }) })) : null] }));
|
|
330
|
+
};
|
|
331
|
+
};
|
|
332
|
+
/**
|
|
333
|
+
* A skeleton's footer lines: the real text when given, else a fixed number of lines, else bars
|
|
334
|
+
* that wrap where a 40-character sentence does.
|
|
335
|
+
*/
|
|
336
|
+
function StatCardSkeletonFooter(handle) {
|
|
337
|
+
return () => {
|
|
338
|
+
let { footer, lines } = handle.props;
|
|
339
|
+
if (typeof footer === "string") {
|
|
340
|
+
return _jsx(StatCardGhostText, { slot: "stat-card-skeleton-footer", children: footer });
|
|
341
|
+
}
|
|
342
|
+
if (lines) {
|
|
343
|
+
return FOOTER_LINE_WIDTHS.slice(0, lines).map((width) => (_jsx("span", { mix: [block()], children: _jsx(StatCardBar, { width: width }) })));
|
|
344
|
+
}
|
|
345
|
+
return (_jsxs(_Fragment, { children: [_jsx(StatCardBar, { width: "6em" }), " ", _jsx(StatCardBar, { width: "4em" }), " ", _jsx(StatCardBar, { width: "5em" })] }));
|
|
346
|
+
};
|
|
347
|
+
}
|
|
348
|
+
/**
|
|
349
|
+
* Real copy drawn as invisible text on a placeholder bar, one bar per wrapped line, so a
|
|
350
|
+
* skeleton's part wraps to exactly the lines the card's text takes at every width.
|
|
351
|
+
*/
|
|
352
|
+
function StatCardGhostText(handle) {
|
|
353
|
+
return () => (_jsx("span", { "data-slot": handle.props.slot, mix: [
|
|
354
|
+
rounded("md"),
|
|
355
|
+
raw({
|
|
356
|
+
color: "transparent",
|
|
357
|
+
backgroundColor: BORDER,
|
|
358
|
+
boxDecorationBreak: "clone",
|
|
359
|
+
WebkitBoxDecorationBreak: "clone",
|
|
360
|
+
}),
|
|
361
|
+
], children: handle.props.children }));
|
|
362
|
+
}
|
|
363
|
+
/**
|
|
364
|
+
* One placeholder bar: an inline block shorter than its line, so the part around it keeps
|
|
365
|
+
* the line height the real text gives it, or a block filling a slot of fixed height.
|
|
366
|
+
*/
|
|
367
|
+
function StatCardBar(handle) {
|
|
368
|
+
return () => {
|
|
369
|
+
let { width, block: fills } = handle.props;
|
|
370
|
+
return (_jsx("span", { "data-slot": "stat-card-skeleton-bar", mix: [
|
|
371
|
+
fills ? block() : inlineBlock(),
|
|
372
|
+
is(width),
|
|
373
|
+
bs(fills ? "100%" : "0.75em"),
|
|
374
|
+
verticalAlign("middle"),
|
|
375
|
+
rounded("md"),
|
|
376
|
+
raw({ backgroundColor: BORDER }),
|
|
377
|
+
] }));
|
|
378
|
+
};
|
|
379
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A row of per-period bars, such as 90 days of uptime: each bar is tinted by its status,
|
|
3
|
+
* hatched where nothing was recorded, and shows its date and value on hover or focus, with a
|
|
4
|
+
* caption naming the window and the summary figure. Bars thin out to fit any container, and
|
|
5
|
+
* form one Tab stop that ←/→, Home and End move through once its island hydrates.
|
|
6
|
+
*
|
|
7
|
+
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
8
|
+
* @copyright Sergio Xalambrí 2026
|
|
9
|
+
*/
|
|
10
|
+
import type { EntryComponent, Handle, Props as TagProps, RemixNode } from "remix/component";
|
|
11
|
+
/**
|
|
12
|
+
* Prop types for {@link StatusStrip}.
|
|
13
|
+
*/
|
|
14
|
+
export declare namespace StatusStrip {
|
|
15
|
+
/**
|
|
16
|
+
* What one period recorded: `up` is success, `degraded` warning, `down` danger, `paused`
|
|
17
|
+
* neutral, and `no-data` a hatched bar that reads as unknown rather than as zero.
|
|
18
|
+
*/
|
|
19
|
+
type Status = "up" | "degraded" | "down" | "paused" | "no-data";
|
|
20
|
+
/** One period, oldest first in {@link Props.periods}. */
|
|
21
|
+
interface Period {
|
|
22
|
+
status: Status;
|
|
23
|
+
/** The period's date or name, shown first in its tooltip ("Oct 3"). */
|
|
24
|
+
label: string;
|
|
25
|
+
/** The period's figure, shown after the label ("99.2% · 1,438 of 1,440 checks"). */
|
|
26
|
+
value?: string;
|
|
27
|
+
}
|
|
28
|
+
/** Per-part styling for the parts a strip composes. */
|
|
29
|
+
interface PartsProps {
|
|
30
|
+
caption?: TagProps<"div">["mix"];
|
|
31
|
+
bars?: TagProps<"div">["mix"];
|
|
32
|
+
bar?: TagProps<"button">["mix"];
|
|
33
|
+
}
|
|
34
|
+
/** Props accepted by {@link StatusStrip}. */
|
|
35
|
+
interface Props extends Omit<TagProps<"div">, "children"> {
|
|
36
|
+
periods: readonly Period[];
|
|
37
|
+
/** Accessible name of the bars' toolbar ("Uptime, last 90 days"). */
|
|
38
|
+
label: string;
|
|
39
|
+
/** The summary figure set in the middle of the caption ("99.95% uptime"). */
|
|
40
|
+
summary?: RemixNode;
|
|
41
|
+
/** Caption under the oldest end ("90 days ago"). */
|
|
42
|
+
start?: RemixNode;
|
|
43
|
+
/** Caption under the newest end ("Today"). */
|
|
44
|
+
end?: RemixNode;
|
|
45
|
+
parts?: PartsProps;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Renders one bar per period as a button named by its label and value, inside a toolbar named by
|
|
50
|
+
* `label`, then the caption. The newest bar is the strip's one Tab stop, and {@link StatusStripKeys}
|
|
51
|
+
* moves it with the arrows; a bar's tooltip shows its name on hover and keyboard focus with no script.
|
|
52
|
+
*
|
|
53
|
+
* @param handle Runtime handle carrying the host `<div>`'s props.
|
|
54
|
+
* @returns The render function producing the strip's markup.
|
|
55
|
+
* @example
|
|
56
|
+
* <StatusStrip
|
|
57
|
+
* label={t("monitor.uptimeWindow")}
|
|
58
|
+
* summary={t("monitor.uptime", { percent: "99.95" })}
|
|
59
|
+
* start={t("time.daysAgo", { count: 90 })}
|
|
60
|
+
* end={t("time.today")}
|
|
61
|
+
* periods={days.map((day) => ({ status: day.status, label: formatDay(day.date), value: formatUptime(day) }))}
|
|
62
|
+
* />
|
|
63
|
+
*/
|
|
64
|
+
export declare function StatusStrip(handle: Handle<StatusStrip.Props>): () => import("remix/component").RemixElement;
|
|
65
|
+
/**
|
|
66
|
+
* Client island behind {@link StatusStrip}'s keyboard navigation: a hidden marker whose
|
|
67
|
+
* `statusStripKeys()` walks the strip it sits in. Loads from `@sdxc/ui/app/status-strip#StatusStripKeys`
|
|
68
|
+
* once the app's browser entry maps it; until then the newest bar stays the strip's one Tab stop.
|
|
69
|
+
*/
|
|
70
|
+
export declare const StatusStripKeys: EntryComponent<Record<never, never>>;
|