@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,102 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "remix/component/jsx-runtime";
|
|
2
|
+
import { visuallyHidden } from "@sdxc/u/a11y";
|
|
3
|
+
import { mergeMix, raw } from "@sdxc/u/general";
|
|
4
|
+
import { grid, gap } from "@sdxc/u/layout";
|
|
5
|
+
import { minIs } from "@sdxc/u/size";
|
|
6
|
+
import { text, weight } from "@sdxc/u/typography";
|
|
7
|
+
import { CodeTabsSync } from "./code-tabs-sync.js";
|
|
8
|
+
import { CODE_TABS_ATTRIBUTE } from "./mixins/code-tabs-sync.js";
|
|
9
|
+
/**
|
|
10
|
+
* Radio name every set uses. Each set is its own `<form>`, which scopes the name to it, so
|
|
11
|
+
* two sets on a page never share a group however alike their tabs are.
|
|
12
|
+
*/
|
|
13
|
+
const RADIO_NAME = "code-tab";
|
|
14
|
+
/**
|
|
15
|
+
* Renders the strip of tabs over a stack of panels that share one grid cell, so the set
|
|
16
|
+
* is as tall as its tallest panel and switching never moves the page. The selected tab's
|
|
17
|
+
* underline grows in over 150ms, and holds still under reduced motion.
|
|
18
|
+
*
|
|
19
|
+
* @param handle Runtime handle carrying the set's props.
|
|
20
|
+
* @returns The render function producing the set.
|
|
21
|
+
* @example
|
|
22
|
+
* <CodeTabs syncKey="framework" aria-label={t("framework")} tabs={[
|
|
23
|
+
* { label: "Remix", value: "remix", children: <CodeBlock title="app/root.tsx" … /> },
|
|
24
|
+
* { label: "Hono", value: "hono", children: <CodeBlock title="src/index.ts" … /> },
|
|
25
|
+
* ]} />
|
|
26
|
+
*/
|
|
27
|
+
export function CodeTabs(handle) {
|
|
28
|
+
return () => {
|
|
29
|
+
let { "aria-label": label, mix, persist = "local", selected, syncKey, tabs, ...rest } = handle.props;
|
|
30
|
+
let checked = tabs.some((tab) => tab.value === selected) ? selected : tabs[0]?.value;
|
|
31
|
+
return (_jsxs("form", { ...rest, "data-slot": "code-tabs", [CODE_TABS_ATTRIBUTE]: syncKey ?? "", mix: mergeMix([grid(), gap(2), minIs(0)], mix), children: [_jsx("div", { role: "radiogroup", "aria-label": label, "data-slot": "code-tabs-list", mix: [
|
|
32
|
+
raw({
|
|
33
|
+
display: "flex",
|
|
34
|
+
minInlineSize: 0,
|
|
35
|
+
overflowX: "auto",
|
|
36
|
+
scrollbarWidth: "thin",
|
|
37
|
+
borderBlockEnd: "1px solid var(--ui-neutral-border)",
|
|
38
|
+
}),
|
|
39
|
+
], children: tabs.map((tab) => (_jsxs("label", { mix: [text("sm"), weight("medium"), tabRules()], children: [_jsx("input", { type: "radio", name: RADIO_NAME, value: tab.value, defaultChecked: tab.value === checked, mix: [visuallyHidden()] }), tab.label] }, tab.value))) }), _jsx("div", { "data-slot": "code-tabs-panels", mix: [grid(), minIs(0)], children: tabs.map((tab, index) => (_jsx("div", { "data-slot": "code-tabs-panel", mix: [panelRules(index)], children: tab.children }, tab.value))) }), syncKey ? _jsx(CodeTabsSync, { syncKey: syncKey, persist: persist }) : null] }));
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* A tab label's rules in one block, so its checked, focused and reduced-motion states
|
|
44
|
+
* resolve by specificity: muted until checked, with an underline that grows from the
|
|
45
|
+
* centre when its radio is checked.
|
|
46
|
+
*/
|
|
47
|
+
function tabRules() {
|
|
48
|
+
return raw({
|
|
49
|
+
position: "relative",
|
|
50
|
+
flexShrink: 0,
|
|
51
|
+
paddingBlock: "0.5rem",
|
|
52
|
+
paddingInline: "0.75rem",
|
|
53
|
+
whiteSpace: "nowrap",
|
|
54
|
+
cursor: "pointer",
|
|
55
|
+
color: "var(--ui-neutral-fg)",
|
|
56
|
+
transition: "color 150ms ease-out",
|
|
57
|
+
"&::after": {
|
|
58
|
+
content: '""',
|
|
59
|
+
position: "absolute",
|
|
60
|
+
insetInline: "0.5rem",
|
|
61
|
+
insetBlockEnd: 0,
|
|
62
|
+
blockSize: "2px",
|
|
63
|
+
borderRadius: "1px",
|
|
64
|
+
backgroundColor: "var(--ui-brand-fg)",
|
|
65
|
+
transform: "scaleX(0)",
|
|
66
|
+
transition: "transform 150ms ease-out",
|
|
67
|
+
},
|
|
68
|
+
"&:hover": { color: "var(--ui-neutral-fg-emphasis)" },
|
|
69
|
+
"&:has(input:checked)": { color: "var(--ui-neutral-fg-emphasis)" },
|
|
70
|
+
"&:has(input:checked)::after": { transform: "scaleX(1)" },
|
|
71
|
+
"&:has(input:focus-visible)": {
|
|
72
|
+
outline: "2px solid var(--ui-brand-ring)",
|
|
73
|
+
outlineOffset: "-2px",
|
|
74
|
+
borderRadius: "0.375rem",
|
|
75
|
+
},
|
|
76
|
+
"@media (prefers-reduced-motion: reduce)": {
|
|
77
|
+
transition: "none",
|
|
78
|
+
"&::after": { transition: "none" },
|
|
79
|
+
},
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* A panel's rules: every panel fills the one shared cell and stays laid out while hidden,
|
|
84
|
+
* which sizes the stack to the tallest; `visibility` keeps a hidden panel out of the
|
|
85
|
+
* accessibility tree and the tab order, and the panel shows while the tab at its index is
|
|
86
|
+
* checked. Its last child stretches so every panel's frame ends on one edge.
|
|
87
|
+
*
|
|
88
|
+
* @param index The panel's position, which pairs it with the tab at the same position.
|
|
89
|
+
*/
|
|
90
|
+
function panelRules(index) {
|
|
91
|
+
let shown = `&:is([${CODE_TABS_ATTRIBUTE}]:has(> [data-slot="code-tabs-list"] > label:nth-child(${index + 1}) > input:checked) > [data-slot="code-tabs-panels"] > *)`;
|
|
92
|
+
let rules = {
|
|
93
|
+
gridArea: "1 / 1",
|
|
94
|
+
display: "flex",
|
|
95
|
+
flexDirection: "column",
|
|
96
|
+
minInlineSize: 0,
|
|
97
|
+
visibility: "hidden",
|
|
98
|
+
"& > :last-child": { flexGrow: 1 },
|
|
99
|
+
};
|
|
100
|
+
rules[shown] = { visibility: "visible" };
|
|
101
|
+
return raw(rules);
|
|
102
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Client island: the copy button a code block carries. It copies the text of the element
|
|
3
|
+
* it names, swaps its glyph for a check and announces the copy, so the block it sits in
|
|
4
|
+
* stays server HTML and only this button hydrates.
|
|
5
|
+
*
|
|
6
|
+
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
7
|
+
* @copyright Sergio Xalambrí 2026
|
|
8
|
+
*/
|
|
9
|
+
import type { EntryComponent } from "remix/component";
|
|
10
|
+
/**
|
|
11
|
+
* Props {@link CopyButton} serializes into the page for hydration, which is why they are
|
|
12
|
+
* a `type`: `SerializableProps` rejects an interface.
|
|
13
|
+
*/
|
|
14
|
+
export type CopyButtonProps = {
|
|
15
|
+
/** The `id` of the element whose text is copied. */
|
|
16
|
+
target: string;
|
|
17
|
+
/** The button's accessible name and tooltip, such as "Copy code". */
|
|
18
|
+
label: string;
|
|
19
|
+
/** What a screen reader announces once the text is on the clipboard, such as "Copied". */
|
|
20
|
+
copiedLabel: string;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Renders the button. The island loads from the bare `@sdxc/ui/docs/copy-button` specifier,
|
|
24
|
+
* which the app's browser entry maps to a dynamic import; until then the button is inert
|
|
25
|
+
* and the code beside it stays selectable.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* <pre><code id="install">npm add @sdxc/ui</code></pre>
|
|
29
|
+
* <CopyButton target="install" label={t("code.copy")} copiedLabel={t("code.copied")} />
|
|
30
|
+
*/
|
|
31
|
+
export declare const CopyButton: EntryComponent<CopyButtonProps>;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "remix/component/jsx-runtime";
|
|
2
|
+
import { CheckIcon, CopyIcon } from "@sdxc/icons";
|
|
3
|
+
import { visuallyHidden } from "@sdxc/u/a11y";
|
|
4
|
+
import { bg, fg, outline } from "@sdxc/u/color";
|
|
5
|
+
import { rounded, transition } from "@sdxc/u/effects";
|
|
6
|
+
import { cursor, raw } from "@sdxc/u/general";
|
|
7
|
+
import { inlineFlex, items, justify, shrink } from "@sdxc/u/layout";
|
|
8
|
+
import { p } from "@sdxc/u/size";
|
|
9
|
+
import { hover, when } from "@sdxc/u/state";
|
|
10
|
+
import { clientEntry } from "remix/component";
|
|
11
|
+
import { COPY_COMMAND, copyToClipboard } from "../mixins/copy-to-clipboard.js";
|
|
12
|
+
import { copyFeedback } from "./mixins/copy-feedback.js";
|
|
13
|
+
/**
|
|
14
|
+
* Renders the button. The island loads from the bare `@sdxc/ui/docs/copy-button` specifier,
|
|
15
|
+
* which the app's browser entry maps to a dynamic import; until then the button is inert
|
|
16
|
+
* and the code beside it stays selectable.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* <pre><code id="install">npm add @sdxc/ui</code></pre>
|
|
20
|
+
* <CopyButton target="install" label={t("code.copy")} copiedLabel={t("code.copied")} />
|
|
21
|
+
*/
|
|
22
|
+
export const CopyButton = clientEntry("@sdxc/ui/docs/copy-button#CopyButton", function CopyButton(handle) {
|
|
23
|
+
return () => {
|
|
24
|
+
let { copiedLabel, label, target } = handle.props;
|
|
25
|
+
return (_jsxs("button", { type: "button", "data-slot": "copy-button", "aria-label": label, title: label, commandfor: target, command: COPY_COMMAND, mix: [
|
|
26
|
+
inlineFlex(),
|
|
27
|
+
items("center"),
|
|
28
|
+
justify("center"),
|
|
29
|
+
shrink(0),
|
|
30
|
+
p(1.5),
|
|
31
|
+
rounded("md"),
|
|
32
|
+
bg("transparent"),
|
|
33
|
+
fg("neutral"),
|
|
34
|
+
cursor("pointer"),
|
|
35
|
+
transition("color, background-color"),
|
|
36
|
+
hover([fg("neutral.emphasis"), bg("neutral.bg-tint-hover")]),
|
|
37
|
+
when("&:focus-visible", outline({ color: "brand.ring", offset: 2 })),
|
|
38
|
+
raw({
|
|
39
|
+
border: 0,
|
|
40
|
+
"& > [data-icon]": { display: "inline-flex" },
|
|
41
|
+
'& > [data-icon="check"]': { display: "none" },
|
|
42
|
+
'&[data-copied] > [data-icon="copy"]': { display: "none" },
|
|
43
|
+
'&[data-copied] > [data-icon="check"]': { display: "inline-flex" },
|
|
44
|
+
}),
|
|
45
|
+
copyToClipboard(),
|
|
46
|
+
copyFeedback(copiedLabel),
|
|
47
|
+
], children: [_jsx("span", { "data-icon": "copy", children: _jsx(CopyIcon, { size: 16, "aria-hidden": "true" }) }), _jsx("span", { "data-icon": "check", mix: [fg("success")], children: _jsx(CheckIcon, { size: 16, "aria-hidden": "true" }) }), _jsx("span", { role: "status", mix: [visuallyHidden()] })] }));
|
|
48
|
+
};
|
|
49
|
+
});
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The quiet "Was this helpful?" closing a docs page, as a plain form that posts without
|
|
3
|
+
* JavaScript: picking Yes or No reveals an optional note and the send button through CSS
|
|
4
|
+
* alone, and the server answers by rendering the same component in its `sent` state.
|
|
5
|
+
*
|
|
6
|
+
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
7
|
+
* @copyright Sergio Xalambrí 2026
|
|
8
|
+
*/
|
|
9
|
+
import type { Handle, Props as TagProps } from "remix/component";
|
|
10
|
+
/** Field carrying the vote, posted as `"yes"` or `"no"`. */
|
|
11
|
+
export declare const DOCS_FEEDBACK_VOTE_FIELD = "helpful";
|
|
12
|
+
/** Field carrying the optional note. */
|
|
13
|
+
export declare const DOCS_FEEDBACK_NOTE_FIELD = "note";
|
|
14
|
+
/** Field carrying the page the vote is about. */
|
|
15
|
+
export declare const DOCS_FEEDBACK_PAGE_FIELD = "page";
|
|
16
|
+
/**
|
|
17
|
+
* Prop types for {@link DocsFeedback}.
|
|
18
|
+
*/
|
|
19
|
+
export declare namespace DocsFeedback {
|
|
20
|
+
/** `idle` asks the question; `sent` thanks the reader in place of the form. */
|
|
21
|
+
type State = "idle" | "sent";
|
|
22
|
+
/** Every string the block shows. */
|
|
23
|
+
interface Labels {
|
|
24
|
+
/** The question, such as "Was this page helpful?". */
|
|
25
|
+
question: string;
|
|
26
|
+
yes: string;
|
|
27
|
+
no: string;
|
|
28
|
+
/** Label of the optional note, such as "Anything we could add? (optional)". */
|
|
29
|
+
note: string;
|
|
30
|
+
send: string;
|
|
31
|
+
/** Shown in the `sent` state, such as "Thanks for the feedback". */
|
|
32
|
+
thanks: string;
|
|
33
|
+
}
|
|
34
|
+
/** Props accepted by {@link DocsFeedback}. */
|
|
35
|
+
interface Props extends Omit<TagProps<"div">, "children"> {
|
|
36
|
+
/** URL the form posts to. */
|
|
37
|
+
action: string;
|
|
38
|
+
/** Identifier of the page, posted in the `page` field; usually its path. */
|
|
39
|
+
page: string;
|
|
40
|
+
labels: Labels;
|
|
41
|
+
/** @default "idle" */
|
|
42
|
+
state?: State;
|
|
43
|
+
/**
|
|
44
|
+
* The named frame the vote reloads (`data-rmx-target`), so a page that renders this
|
|
45
|
+
* block inside `<Frame name>` swaps in the thank-you without reloading the page.
|
|
46
|
+
*/
|
|
47
|
+
frame?: string;
|
|
48
|
+
/**
|
|
49
|
+
* `"manual"` keeps the reader where they are when the vote's response renders, instead
|
|
50
|
+
* of the scroll reset a navigation does by default (`data-rmx-reset-scroll`).
|
|
51
|
+
*/
|
|
52
|
+
resetScroll?: "manual" | "after-transition";
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Renders the vote form, or the thank-you once `state` is `sent`. The form posts
|
|
57
|
+
* `helpful=yes|no`, `page` and an optional `note` to `action`; the thank-you is a live
|
|
58
|
+
* status so a reader on a screen reader hears it after an enhanced submit.
|
|
59
|
+
*
|
|
60
|
+
* @param handle Runtime handle carrying the block's props.
|
|
61
|
+
* @returns The render function producing the block's markup.
|
|
62
|
+
* @example
|
|
63
|
+
* <DocsFeedback action="/docs/feedback" page="/docs/alerts" state={sent ? "sent" : "idle"} labels={labels} />
|
|
64
|
+
* @example
|
|
65
|
+
* <DocsFeedback frame="feedback" resetScroll="manual" action="/docs/feedback" page="/docs/alerts" labels={labels} />
|
|
66
|
+
*/
|
|
67
|
+
export declare function DocsFeedback(handle: Handle<DocsFeedback.Props>): () => import("remix/component").RemixElement;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "remix/component/jsx-runtime";
|
|
2
|
+
import { ThumbsDownIcon, ThumbsUpIcon } from "@sdxc/icons";
|
|
3
|
+
import { visuallyHidden } from "@sdxc/u/a11y";
|
|
4
|
+
import { bg, border, fg, outline } from "@sdxc/u/color";
|
|
5
|
+
import { opacity, rounded, transition } from "@sdxc/u/effects";
|
|
6
|
+
import { cursor, mergeMix, raw } from "@sdxc/u/general";
|
|
7
|
+
import { flex, gap, hstack, inlineFlex, items, vstack } from "@sdxc/u/layout";
|
|
8
|
+
import { motionSafe, startingStyle } from "@sdxc/u/responsive";
|
|
9
|
+
import { is, m, maxIs, minIs, pb, pi } from "@sdxc/u/size";
|
|
10
|
+
import { has, hover } from "@sdxc/u/state";
|
|
11
|
+
import { text, weight } from "@sdxc/u/typography";
|
|
12
|
+
import { Button } from "../components/button.js";
|
|
13
|
+
import { TextArea } from "../components/textarea.js";
|
|
14
|
+
/** Field carrying the vote, posted as `"yes"` or `"no"`. */
|
|
15
|
+
export const DOCS_FEEDBACK_VOTE_FIELD = "helpful";
|
|
16
|
+
/** Field carrying the optional note. */
|
|
17
|
+
export const DOCS_FEEDBACK_NOTE_FIELD = "note";
|
|
18
|
+
/** Field carrying the page the vote is about. */
|
|
19
|
+
export const DOCS_FEEDBACK_PAGE_FIELD = "page";
|
|
20
|
+
/** Selector matching a picked vote; a form holding one shows its note. */
|
|
21
|
+
const VOTED = `input[name="${DOCS_FEEDBACK_VOTE_FIELD}"]:checked`;
|
|
22
|
+
/**
|
|
23
|
+
* Renders the vote form, or the thank-you once `state` is `sent`. The form posts
|
|
24
|
+
* `helpful=yes|no`, `page` and an optional `note` to `action`; the thank-you is a live
|
|
25
|
+
* status so a reader on a screen reader hears it after an enhanced submit.
|
|
26
|
+
*
|
|
27
|
+
* @param handle Runtime handle carrying the block's props.
|
|
28
|
+
* @returns The render function producing the block's markup.
|
|
29
|
+
* @example
|
|
30
|
+
* <DocsFeedback action="/docs/feedback" page="/docs/alerts" state={sent ? "sent" : "idle"} labels={labels} />
|
|
31
|
+
* @example
|
|
32
|
+
* <DocsFeedback frame="feedback" resetScroll="manual" action="/docs/feedback" page="/docs/alerts" labels={labels} />
|
|
33
|
+
*/
|
|
34
|
+
export function DocsFeedback(handle) {
|
|
35
|
+
return () => {
|
|
36
|
+
let { action, page, labels, state, frame, resetScroll, mix, ...rest } = handle.props;
|
|
37
|
+
let isSent = state === "sent";
|
|
38
|
+
let questionId = `${handle.id}-question`;
|
|
39
|
+
return (_jsxs("div", { ...rest, "data-slot": "docs-feedback", "data-state": isSent ? "sent" : "idle", mix: mergeMix([minIs(0), text("sm"), fg("neutral")], mix), children: [_jsx("p", { role: "status", "data-slot": "docs-feedback-thanks", mix: [m(0), isSent ? [] : visuallyHidden()], children: isSent ? labels.thanks : "" }), isSent ? null : (_jsxs("form", { method: "post", action: action, "data-rmx-target": frame, "data-rmx-reset-scroll": resetScroll, "data-slot": "docs-feedback-form", mix: [vstack({ gap: 3, align: "stretch" })], children: [_jsx("input", { type: "hidden", name: DOCS_FEEDBACK_PAGE_FIELD, value: page }), _jsxs("div", { role: "radiogroup", "aria-labelledby": questionId, "data-slot": "docs-feedback-vote", mix: [flex(), items("center"), gap(4, 3), raw({ flexWrap: "wrap" }), minIs(0)], children: [_jsx("span", { id: questionId, "data-slot": "docs-feedback-question", mix: [weight("medium"), fg("neutral.emphasis")], children: labels.question }), _jsxs("span", { mix: [hstack({ gap: 2, align: "center" })], children: [_jsx(DocsFeedbackChoice, { value: "yes", label: labels.yes }), _jsx(DocsFeedbackChoice, { value: "no", label: labels.no })] })] }), _jsxs("div", { "data-slot": "docs-feedback-note", mix: [
|
|
40
|
+
/**
|
|
41
|
+
* One rule holds both displays, so the revealed state always outranks the
|
|
42
|
+
* hidden one whatever order the stylesheet layers land in.
|
|
43
|
+
*/
|
|
44
|
+
raw({ display: "none", [`&:where(form:has(${VOTED}) *)`]: { display: "grid" } }),
|
|
45
|
+
gap(2),
|
|
46
|
+
maxIs("32rem"),
|
|
47
|
+
motionSafe([transition("opacity", { duration: 150 }), startingStyle(opacity(0))]),
|
|
48
|
+
], children: [_jsxs("label", { mix: [vstack({ gap: 1.5, align: "stretch" })], children: [_jsx("span", { children: labels.note }), _jsx(TextArea, { name: DOCS_FEEDBACK_NOTE_FIELD, rows: 3 })] }), _jsx("span", { children: _jsx(Button, { type: "submit", size: "sm", variant: "outline", color: "neutral", children: labels.send }) })] })] }))] }));
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* One vote as a radio inside a pill-shaped label, so the choice is a native, keyboardable
|
|
53
|
+
* radio group; the picked pill fills, and keyboard focus rings the pill.
|
|
54
|
+
*/
|
|
55
|
+
function DocsFeedbackChoice(handle) {
|
|
56
|
+
return () => {
|
|
57
|
+
let { label, value } = handle.props;
|
|
58
|
+
let Icon = value === "yes" ? ThumbsUpIcon : ThumbsDownIcon;
|
|
59
|
+
return (_jsxs("label", { "data-slot": "docs-feedback-choice", mix: [
|
|
60
|
+
inlineFlex(),
|
|
61
|
+
items("center"),
|
|
62
|
+
gap(1.5),
|
|
63
|
+
pi(3),
|
|
64
|
+
pb(1),
|
|
65
|
+
rounded("full"),
|
|
66
|
+
border({ color: "neutral.border", width: 1, style: "solid" }),
|
|
67
|
+
cursor("pointer"),
|
|
68
|
+
transition("background-color, border-color, color", { duration: 150 }),
|
|
69
|
+
hover(bg("neutral.bg-tint")),
|
|
70
|
+
has(":checked", [bg("brand.tint"), border("brand.border"), fg("brand")]),
|
|
71
|
+
has(":focus-visible", outline({ color: "brand.ring", offset: 2 })),
|
|
72
|
+
], children: [_jsx("input", { type: "radio", name: DOCS_FEEDBACK_VOTE_FIELD, value: value, required: true, mix: [visuallyHidden()] }), _jsx(Icon, { size: 16, "aria-hidden": "true", mix: [is("1rem")] }), label] }));
|
|
73
|
+
};
|
|
74
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The compact footer closing a docs page inside the content and rail columns: the page's own
|
|
3
|
+
* closing pieces (a byline, feedback, an edit link) over one row of legal and site links, so
|
|
4
|
+
* the docked sidebar keeps running to the viewport's foot beside it.
|
|
5
|
+
*
|
|
6
|
+
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
7
|
+
* @copyright Sergio Xalambrí 2026
|
|
8
|
+
*/
|
|
9
|
+
import type { Handle, RemixNode, Props as TagProps } from "remix/component";
|
|
10
|
+
/**
|
|
11
|
+
* Prop types for {@link DocsFooter}.
|
|
12
|
+
*/
|
|
13
|
+
export declare namespace DocsFooter {
|
|
14
|
+
/** One destination in the footer's link row; a `SiteFooter.Link` fits as is. */
|
|
15
|
+
interface Link {
|
|
16
|
+
label: RemixNode;
|
|
17
|
+
href: string;
|
|
18
|
+
}
|
|
19
|
+
/** Props accepted by {@link DocsFooter}. */
|
|
20
|
+
interface Props extends Omit<TagProps<"footer">, "children"> {
|
|
21
|
+
/** The page's closing pieces, stacked above the link row: a byline, feedback, an edit link. */
|
|
22
|
+
children?: RemixNode;
|
|
23
|
+
/** The copyright or legal line opening the link row, such as "© 2026 Acme". */
|
|
24
|
+
legal?: RemixNode;
|
|
25
|
+
/** Legal and site links, in the order they read. */
|
|
26
|
+
links?: Link[];
|
|
27
|
+
/** Accessible name of the links' navigation landmark, such as "Site". */
|
|
28
|
+
linksLabel?: string;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Renders the closing pieces, then the legal line and the links on one row that wraps on a
|
|
33
|
+
* narrow screen. Pass it as `DocsLayout`'s `footer`, which confines it to the article and rail.
|
|
34
|
+
*
|
|
35
|
+
* @param handle Runtime handle carrying the footer's props.
|
|
36
|
+
* @returns The render function producing the footer's markup.
|
|
37
|
+
* @example
|
|
38
|
+
* <DocsFooter legal="© 2026 Acme" links={[{ label: "Privacy", href: "/privacy" }]} linksLabel="Site"><AuthorNote /></DocsFooter>
|
|
39
|
+
*/
|
|
40
|
+
export declare function DocsFooter(handle: Handle<DocsFooter.Props>): () => import("remix/component").RemixElement;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "remix/component/jsx-runtime";
|
|
2
|
+
import { borderEdge, fg } from "@sdxc/u/color";
|
|
3
|
+
import { mergeMix, raw } from "@sdxc/u/general";
|
|
4
|
+
import { flex, flexWrap, gap, items, justify, vstack } from "@sdxc/u/layout";
|
|
5
|
+
import { m, minIs, p, pbe, pbs } from "@sdxc/u/size";
|
|
6
|
+
import { hover, when } from "@sdxc/u/state";
|
|
7
|
+
import { text } from "@sdxc/u/typography";
|
|
8
|
+
/**
|
|
9
|
+
* Renders the closing pieces, then the legal line and the links on one row that wraps on a
|
|
10
|
+
* narrow screen. Pass it as `DocsLayout`'s `footer`, which confines it to the article and rail.
|
|
11
|
+
*
|
|
12
|
+
* @param handle Runtime handle carrying the footer's props.
|
|
13
|
+
* @returns The render function producing the footer's markup.
|
|
14
|
+
* @example
|
|
15
|
+
* <DocsFooter legal="© 2026 Acme" links={[{ label: "Privacy", href: "/privacy" }]} linksLabel="Site"><AuthorNote /></DocsFooter>
|
|
16
|
+
*/
|
|
17
|
+
export function DocsFooter(handle) {
|
|
18
|
+
return () => {
|
|
19
|
+
let { children, legal, links = [], linksLabel, mix, ...rest } = handle.props;
|
|
20
|
+
let hasMeta = legal !== undefined || links.length > 0;
|
|
21
|
+
return (_jsxs("footer", { ...rest, "data-slot": "docs-footer", mix: mergeMix([
|
|
22
|
+
vstack({ gap: 6, align: "stretch" }),
|
|
23
|
+
minIs(0),
|
|
24
|
+
pbs("2rem"),
|
|
25
|
+
pbe("2.5rem"),
|
|
26
|
+
borderEdge("block-start", { color: "neutral.border", width: 1, style: "solid" }),
|
|
27
|
+
text("sm"),
|
|
28
|
+
fg("neutral.muted"),
|
|
29
|
+
], mix), children: [children ? (_jsx("div", { "data-slot": "docs-footer-content", mix: [vstack({ gap: 4, align: "stretch" })], children: children })) : null, hasMeta ? (_jsxs("div", { "data-slot": "docs-footer-meta", mix: [
|
|
30
|
+
flex(),
|
|
31
|
+
flexWrap("wrap"),
|
|
32
|
+
items("center"),
|
|
33
|
+
justify("between"),
|
|
34
|
+
gap(2, 6),
|
|
35
|
+
when("& p", m(0)),
|
|
36
|
+
], children: [legal === undefined ? null : _jsx("p", { children: legal }), links.length > 0 ? (_jsx("nav", { "aria-label": linksLabel, children: _jsx("ul", { mix: [
|
|
37
|
+
flex(),
|
|
38
|
+
flexWrap("wrap"),
|
|
39
|
+
gap(2, 5),
|
|
40
|
+
m(0),
|
|
41
|
+
p(0),
|
|
42
|
+
raw({ listStyle: "none" }),
|
|
43
|
+
], children: links.map((link) => (_jsx("li", { children: _jsx("a", { href: link.href, mix: [fg("neutral.muted"), hover(fg("neutral.emphasis"))], children: link.label }) }, link.href))) }) })) : null] })) : null] }));
|
|
44
|
+
};
|
|
45
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The docs home: a title, an optional search and topic chips, a larger "Start here" path,
|
|
3
|
+
* the sections as cards with page counts, and popular articles. It routes a newcomer and a
|
|
4
|
+
* returning reader by task, and its grids fill whatever width the docs shell gives them.
|
|
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 DocsHub}.
|
|
12
|
+
*/
|
|
13
|
+
export declare namespace DocsHub {
|
|
14
|
+
/** A "Start here" destination, drawn larger than a section so it reads first. */
|
|
15
|
+
interface StartItem {
|
|
16
|
+
title: string;
|
|
17
|
+
href: string;
|
|
18
|
+
description: string;
|
|
19
|
+
/** Small line above the title naming the page's section or kind ("Quickstart"). */
|
|
20
|
+
eyebrow?: string;
|
|
21
|
+
/** Call closing the card ("Read the guide"), drawn with an arrow on its bottom edge. */
|
|
22
|
+
cta?: string;
|
|
23
|
+
}
|
|
24
|
+
/** A topic chip: a short task or area the reader can jump to before choosing a section. */
|
|
25
|
+
interface Topic {
|
|
26
|
+
title: string;
|
|
27
|
+
href: string;
|
|
28
|
+
}
|
|
29
|
+
/** A section of the docs, entered at its first page. */
|
|
30
|
+
interface Section {
|
|
31
|
+
title: string;
|
|
32
|
+
href: string;
|
|
33
|
+
description: string;
|
|
34
|
+
/** How many pages the section holds, worded by `countLabel` or {@link Props.formatCount}. */
|
|
35
|
+
count?: number;
|
|
36
|
+
/** The count's wording for this section ("12 guides"); wins over {@link Props.formatCount}. */
|
|
37
|
+
countLabel?: string;
|
|
38
|
+
}
|
|
39
|
+
/** A popular article, optionally with a cropped picture of the UI it covers. */
|
|
40
|
+
interface Popular {
|
|
41
|
+
title: string;
|
|
42
|
+
href: string;
|
|
43
|
+
image?: RemixNode;
|
|
44
|
+
}
|
|
45
|
+
/** The words of every block heading, so each app supplies them in the reader's language. */
|
|
46
|
+
interface Labels {
|
|
47
|
+
/** Heading over the start cards ("Start here"). */
|
|
48
|
+
start: string;
|
|
49
|
+
/** Heading over the section cards ("Browse by topic"). */
|
|
50
|
+
sections: string;
|
|
51
|
+
/** Accessible name of the topic chips' navigation ("Popular topics"). */
|
|
52
|
+
topics?: string;
|
|
53
|
+
/** Heading over the popular articles ("Popular articles"). */
|
|
54
|
+
popular?: string;
|
|
55
|
+
}
|
|
56
|
+
/** Props accepted by {@link DocsHub}. */
|
|
57
|
+
interface Props extends Omit<TagProps<"div">, "title"> {
|
|
58
|
+
/** The page title, rendered at the ambient heading level (`<h1>` with no scope around it). */
|
|
59
|
+
title: RemixNode;
|
|
60
|
+
/** Small line above the title ("Documentation"). */
|
|
61
|
+
eyebrow?: string;
|
|
62
|
+
/** One or two sentences under the title saying what the docs cover. */
|
|
63
|
+
lead?: RemixNode;
|
|
64
|
+
/** The app's search field ("How can we help?"), drawn under the lead. */
|
|
65
|
+
search?: RemixNode;
|
|
66
|
+
/** The path a newcomer takes, most important first. */
|
|
67
|
+
start: StartItem[];
|
|
68
|
+
/** Chips under the search for the most asked-about tasks. */
|
|
69
|
+
topics?: Topic[];
|
|
70
|
+
sections: Section[];
|
|
71
|
+
popular?: Popular[];
|
|
72
|
+
labels: Labels;
|
|
73
|
+
/** Words a section's `count` ("12 pages"); a section's own `countLabel` wins over it. */
|
|
74
|
+
formatCount?: (count: number) => string;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Routes a reader into the docs by task. Every card is one link, start cards are larger
|
|
79
|
+
* than section cards, and block headings sit one level under the title, so the outline
|
|
80
|
+
* reads h1 → h2 → h3 with no scope around it and follows any `HeadingScope` that wraps it.
|
|
81
|
+
*
|
|
82
|
+
* @param handle Runtime handle carrying the host `<div>`'s props.
|
|
83
|
+
* @returns The render function producing the hub's markup.
|
|
84
|
+
* @example
|
|
85
|
+
* <DocsHub
|
|
86
|
+
* title="Documentation"
|
|
87
|
+
* labels={{ start: "Start here", sections: "Browse by topic" }}
|
|
88
|
+
* start={[{ title: "Quickstart", href: "/docs/quickstart", description: "Add your first monitor." }]}
|
|
89
|
+
* sections={[{ title: "Alerts", href: "/docs/alerts", description: "Who gets paged.", count: 6 }]}
|
|
90
|
+
* formatCount={(count) => `${count} pages`}
|
|
91
|
+
* />
|
|
92
|
+
*/
|
|
93
|
+
export declare function DocsHub(handle: Handle<DocsHub.Props>): () => import("remix/component").RemixElement;
|