@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,181 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "remix/component/jsx-runtime";
|
|
2
|
+
import { ChevronLeftIcon, ChevronRightIcon, SearchIcon } from "@sdxc/icons";
|
|
3
|
+
import { visuallyHidden } from "@sdxc/u/a11y";
|
|
4
|
+
import { bg, borderEdge, fg, outlineStyle } from "@sdxc/u/color";
|
|
5
|
+
import { rounded } from "@sdxc/u/effects";
|
|
6
|
+
import { cursor, mergeMix, raw } from "@sdxc/u/general";
|
|
7
|
+
import { grow, hstack, shrink } from "@sdxc/u/layout";
|
|
8
|
+
import { overflow } from "@sdxc/u/overflow";
|
|
9
|
+
import { bs, is, m, maxBs, maxIs, mbs, mis, p, pbe, pbs, pi } from "@sdxc/u/size";
|
|
10
|
+
import { when } from "@sdxc/u/state";
|
|
11
|
+
import { text, textAlign, textDecoration, truncate, weight } from "@sdxc/u/typography";
|
|
12
|
+
import { generateUUID } from "@sdxc/uuid/v4";
|
|
13
|
+
import { clientEntry } from "remix/component";
|
|
14
|
+
import { Button } from "../components/button.js";
|
|
15
|
+
import { Command } from "../components/command.js";
|
|
16
|
+
import { Keyboard } from "../components/keyboard.js";
|
|
17
|
+
import { Modal } from "../components/modal.js";
|
|
18
|
+
import { shortcutGlyphs } from "./behaviors/shortcuts.js";
|
|
19
|
+
import { PALETTE_CONTROL_ATTRIBUTE, PALETTE_GOTO_ATTRIBUTE, PALETTE_HINT_ATTRIBUTE, PALETTE_ITEM_ATTRIBUTE, PALETTE_PAGE_ATTRIBUTE, paletteController, } from "./mixins/command-palette.js";
|
|
20
|
+
/** The combo that opens the palette when none is given. */
|
|
21
|
+
const DEFAULT_SHORTCUT = "mod+k";
|
|
22
|
+
/**
|
|
23
|
+
* Renders a shortcut's caps, marked with its combo so the island reprints them for a keyboard
|
|
24
|
+
* without the Apple glyphs.
|
|
25
|
+
*/
|
|
26
|
+
function Hint(handle) {
|
|
27
|
+
return () => (_jsx("span", { "aria-hidden": "true", [PALETTE_HINT_ATTRIBUTE]: handle.props.keys, mix: [hstack({ gap: 1, align: "center" }), mis("auto"), shrink()], children: shortcutGlyphs(handle.props.keys, true).map((glyph, index) => (_jsx(Keyboard, { mix: [m(0)], children: glyph }, `${index}-${glyph}`))) }));
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Renders the palette: a modal dialog 640px wide, 15% from the top, full width less a gutter on
|
|
31
|
+
* a phone. Without JavaScript a trigger still opens it and every command stays a working link
|
|
32
|
+
* or button; the island adds filtering, arrow keys, pages and the ⌘K binding.
|
|
33
|
+
*
|
|
34
|
+
* @param handle Runtime handle carrying the palette's props.
|
|
35
|
+
* @returns The render function producing the palette.
|
|
36
|
+
* @example
|
|
37
|
+
* <CommandPalette id="palette" labels={labels} recent={["go-monitors"]}>
|
|
38
|
+
* <CommandPalette.Group heading="Navigation">
|
|
39
|
+
* <CommandPalette.Item id="go-monitors" title="Go to Monitors" href="/monitors" shortcut="g m" />
|
|
40
|
+
* </CommandPalette.Group>
|
|
41
|
+
* </CommandPalette>
|
|
42
|
+
*/
|
|
43
|
+
export function CommandPalette(handle) {
|
|
44
|
+
return () => {
|
|
45
|
+
let { id, labels, shortcut, recent, remember, children, mix, ...rest } = handle.props;
|
|
46
|
+
let listId = `${id}-list`;
|
|
47
|
+
return (_jsxs(Modal, { ...rest, id: id, "aria-label": labels.title, closedby: "any", "data-slot": "command-palette", mix: mergeMix([
|
|
48
|
+
is("min(var(--ui-app-palette-width, 40rem), 100% - 1rem)"),
|
|
49
|
+
maxIs("none"),
|
|
50
|
+
maxBs("min(32rem, 80vh)"),
|
|
51
|
+
p(0),
|
|
52
|
+
raw({ gap: "0", marginBlock: "var(--ui-app-palette-top, 15vh) auto" }),
|
|
53
|
+
overflow("hidden"),
|
|
54
|
+
], mix), children: [_jsxs("div", { mix: [
|
|
55
|
+
hstack({ gap: 2, align: "center" }),
|
|
56
|
+
pi(3),
|
|
57
|
+
shrink(),
|
|
58
|
+
borderEdge("block-end", { color: "neutral", width: 1 }),
|
|
59
|
+
], children: [_jsx("button", { type: "button", hidden: true, "data-palette-back": true, "aria-label": labels.back, mix: [shrink(), p(0), bg("transparent"), cursor("pointer")], children: _jsxs("span", { mix: [
|
|
60
|
+
hstack({ gap: 1, align: "center" }),
|
|
61
|
+
pi(2),
|
|
62
|
+
bs("1.5rem"),
|
|
63
|
+
rounded("md"),
|
|
64
|
+
bg("neutral.bg-tint"),
|
|
65
|
+
fg("neutral"),
|
|
66
|
+
text("xs"),
|
|
67
|
+
weight("medium"),
|
|
68
|
+
], children: [_jsx(ChevronLeftIcon, { size: 12, "aria-hidden": "true" }), _jsx("span", { "data-palette-crumb": true })] }) }), _jsx(SearchIcon, { size: 16, "aria-hidden": "true", mix: [fg("neutral.muted"), shrink()] }), _jsx("input", { type: "text", role: "combobox", "aria-expanded": "true", "aria-controls": listId, "aria-autocomplete": "list", "aria-label": labels.title, autocomplete: "off", spellcheck: false, autofocus: true, placeholder: labels.placeholder, "data-command-input": true, mix: [
|
|
69
|
+
grow(),
|
|
70
|
+
is("full"),
|
|
71
|
+
bs("3.25rem"),
|
|
72
|
+
bg("transparent"),
|
|
73
|
+
fg("neutral.emphasis"),
|
|
74
|
+
text("base"),
|
|
75
|
+
outlineStyle("none"),
|
|
76
|
+
when("&::placeholder", fg("neutral.muted")),
|
|
77
|
+
] }), _jsx("button", { type: "button", commandfor: id, command: "close", "aria-label": labels.close, mix: [shrink(), bg("transparent"), cursor("pointer")], children: _jsx(Keyboard, { mix: [m(0)], children: "Esc" }) })] }), _jsxs(Command.List, { id: listId, "aria-label": labels.title, mix: [grow(), maxBs("none"), pbs(2)], children: [_jsxs("div", { role: "group", hidden: true, "data-palette-recent": true, "aria-label": labels.recent, children: [_jsx(GroupHeading, { children: labels.recent }), _jsx("div", { "data-palette-recent-items": true })] }), children] }), _jsxs(Command.Empty, { hidden: true, children: [_jsxs("p", { mix: [m(0), fg("neutral.emphasis")], children: [labels.noResults, " \u201C", _jsx("span", { "data-palette-query": true }), "\u201D"] }), labels.noResultsHint ? _jsx("p", { mix: [m(0), mbs(1)], children: labels.noResultsHint }) : null] }), _jsx("div", { role: "status", "data-palette-status": true, mix: [visuallyHidden()] }), _jsx(CommandPaletteController, { shortcut: shortcut ?? DEFAULT_SHORTCUT, open: labels.open, results: labels.results, recent: recent ?? [], remember: remember })] }));
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
/** Renders a group's muted Title Case heading. */
|
|
81
|
+
function GroupHeading(handle) {
|
|
82
|
+
return () => (_jsx("div", { id: handle.props.id, "aria-hidden": handle.props.id === undefined ? "true" : undefined, mix: [pi(2), pbs(2), pbe(1), text("xs"), weight("medium"), fg("neutral.muted")], children: handle.props.children }));
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Renders a titled group of commands, hidden by the island while none of its commands match.
|
|
86
|
+
*
|
|
87
|
+
* @param handle Runtime handle carrying the group's props.
|
|
88
|
+
* @returns The render function producing the group.
|
|
89
|
+
* @example <CommandPalette.Group heading="Monitors">…</CommandPalette.Group>
|
|
90
|
+
*/
|
|
91
|
+
CommandPalette.Group = function CommandPaletteGroup(handle) {
|
|
92
|
+
let headingId = `palette-group-${generateUUID()}`;
|
|
93
|
+
return () => {
|
|
94
|
+
let { heading, children, ...rest } = handle.props;
|
|
95
|
+
return (_jsxs("div", { ...rest, role: "group", "aria-labelledby": headingId, "data-palette-group": true, children: [_jsx(GroupHeading, { id: headingId, children: heading }), children] }));
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
/**
|
|
99
|
+
* Renders one 36px command row whose control is a link, a form submitter, an Invoker Command
|
|
100
|
+
* button, or a button opening a page. The control stays out of the Tab order: focus remains in
|
|
101
|
+
* the search field and the row is reached as its active descendant.
|
|
102
|
+
*
|
|
103
|
+
* @param handle Runtime handle carrying the item's props.
|
|
104
|
+
* @returns The render function producing the row.
|
|
105
|
+
* @example <CommandPalette.Item id="create" title="Create Monitor" href="/monitors/new" shortcut="c" />
|
|
106
|
+
* @example <CommandPalette.Item id="pause" title="Pause All Monitors" form="pause-all" />
|
|
107
|
+
*/
|
|
108
|
+
CommandPalette.Item = function CommandPaletteItem(handle) {
|
|
109
|
+
return () => {
|
|
110
|
+
let props = handle.props;
|
|
111
|
+
let controlMix = [
|
|
112
|
+
hstack({ gap: 2, align: "center" }),
|
|
113
|
+
is("full"),
|
|
114
|
+
bs("full"),
|
|
115
|
+
pi(2),
|
|
116
|
+
m(0),
|
|
117
|
+
bg("transparent"),
|
|
118
|
+
fg("inherit"),
|
|
119
|
+
textAlign("start"),
|
|
120
|
+
textDecoration("none"),
|
|
121
|
+
text("sm"),
|
|
122
|
+
cursor("default"),
|
|
123
|
+
outlineStyle("none"),
|
|
124
|
+
];
|
|
125
|
+
let content = (_jsxs(_Fragment, { children: [props.icon ? (_jsx("span", { "aria-hidden": "true", mix: [hstack({ align: "center" }), fg("neutral.muted")], children: props.icon })) : null, _jsx("span", { mix: [truncate(), shrink()], children: props.title }), props.description ? (_jsx("span", { mix: [truncate(), fg("neutral.muted"), grow()], children: props.description })) : null, props.shortcut ? _jsx(Hint, { keys: props.shortcut }) : null, props.page ? (_jsx(ChevronRightIcon, { size: 14, "aria-hidden": "true", mix: [props.shortcut ? mis(0) : mis("auto"), fg("neutral.muted")] })) : null] }));
|
|
126
|
+
return (_jsx(Command.Item, { id: props.id, value: props.title, "data-keywords": props.keywords?.join(" "), "data-palette-shortcut": props.shortcut, [PALETTE_ITEM_ATTRIBUTE]: props.id, mix: mergeMix([bs("2.25rem"), p(0), pi(0)], props.mix), children: _jsx(ItemControl, { item: props, mix: controlMix, children: content }) }));
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
/**
|
|
130
|
+
* Renders the control an item presses: a link, a page opener, or a button carrying the form
|
|
131
|
+
* and Invoker Command the item names.
|
|
132
|
+
*/
|
|
133
|
+
function ItemControl(handle) {
|
|
134
|
+
return () => {
|
|
135
|
+
let { item, mix, children } = handle.props;
|
|
136
|
+
let marker = { [PALETTE_CONTROL_ATTRIBUTE]: "" };
|
|
137
|
+
if (item.href !== undefined) {
|
|
138
|
+
return (_jsx("a", { ...marker, href: item.href, tabindex: -1, mix: mix, children: children }));
|
|
139
|
+
}
|
|
140
|
+
if (item.page !== undefined) {
|
|
141
|
+
return (_jsx("button", { ...marker, [PALETTE_GOTO_ATTRIBUTE]: item.page, type: "button", tabindex: -1, mix: mix, children: children }));
|
|
142
|
+
}
|
|
143
|
+
return (_jsx("button", { ...marker, type: item.form === undefined ? "button" : "submit", form: item.form, formaction: item.formaction, formmethod: item.formmethod, name: item.name, value: item.value, command: item.command, commandfor: item.commandfor, tabindex: -1, mix: mix, children: children }));
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Renders a nested page of commands, shown in place of the root list when an item opens it.
|
|
148
|
+
* Backspace in an empty search field, or the back control, returns to the page before it with
|
|
149
|
+
* that page's query restored.
|
|
150
|
+
*
|
|
151
|
+
* @param handle Runtime handle carrying the page's props.
|
|
152
|
+
* @returns The render function producing the page.
|
|
153
|
+
* @example <CommandPalette.Page id="teams" title="Switch Team">…</CommandPalette.Page>
|
|
154
|
+
*/
|
|
155
|
+
CommandPalette.Page = function CommandPalettePage(handle) {
|
|
156
|
+
return () => {
|
|
157
|
+
let { id, title, placeholder, children } = handle.props;
|
|
158
|
+
return (_jsx("div", { role: "group", "aria-label": title, hidden: true, "data-palette-title": title, "data-palette-placeholder": placeholder, [PALETTE_PAGE_ATTRIBUTE]: id, children: children }));
|
|
159
|
+
};
|
|
160
|
+
};
|
|
161
|
+
/**
|
|
162
|
+
* Renders the button that opens the palette, styled as a quiet search field with the key that
|
|
163
|
+
* opens it: one route for the pointer, and the place a reader learns the key.
|
|
164
|
+
*
|
|
165
|
+
* @param handle Runtime handle carrying the trigger's props.
|
|
166
|
+
* @returns The render function producing the trigger.
|
|
167
|
+
* @example <CommandPalette.Trigger for="palette">Search…</CommandPalette.Trigger>
|
|
168
|
+
*/
|
|
169
|
+
CommandPalette.Trigger = function CommandPaletteTrigger(handle) {
|
|
170
|
+
return () => {
|
|
171
|
+
let { for: target, shortcut, children, mix, ...rest } = handle.props;
|
|
172
|
+
return (_jsxs(Button, { type: "button", variant: "outline", color: "neutral", size: "sm", ...rest, commandfor: target, command: "show-modal", mix: mergeMix([is("full"), maxIs("16rem"), fg("neutral.muted")], mix), children: [_jsx(SearchIcon, { size: 14, "aria-hidden": "true" }), _jsx("span", { mix: [truncate()], children: children }), _jsx(Hint, { keys: shortcut ?? DEFAULT_SHORTCUT })] }));
|
|
173
|
+
};
|
|
174
|
+
};
|
|
175
|
+
/**
|
|
176
|
+
* The palette's island: renders nothing visible, and wires the dialog it sits in once loaded.
|
|
177
|
+
* `CommandPalette` places it; load `@sdxc/ui/app/command-palette` in the browser entry.
|
|
178
|
+
*/
|
|
179
|
+
export const CommandPaletteController = clientEntry("@sdxc/ui/app/command-palette#CommandPaletteController", function CommandPaletteController(handle) {
|
|
180
|
+
return () => _jsx("div", { hidden: true, mix: [paletteController(handle.props)] });
|
|
181
|
+
});
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
* @copyright Sergio Xalambrí 2026
|
|
12
12
|
*/
|
|
13
13
|
import type { Handle, Props as TagProps, RemixNode } from "remix/component";
|
|
14
|
-
import { Menu } from "
|
|
15
|
-
import { Section } from "
|
|
14
|
+
import { Menu } from "../components/menu.js";
|
|
15
|
+
import { Section } from "../components/section.js";
|
|
16
16
|
/**
|
|
17
17
|
* Prop types for {@link ContextMenu} and its compound parts.
|
|
18
18
|
*/
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx } from "remix/component/jsx-runtime";
|
|
2
2
|
import { borderEdge, fg, outline } from "@sdxc/u/color";
|
|
3
|
+
import { mergeMix } from "@sdxc/u/general";
|
|
3
4
|
import { mis, pb, pi, pie } from "@sdxc/u/size";
|
|
4
5
|
import { not } from "@sdxc/u/state";
|
|
5
6
|
import { tabularNums, text, weight } from "@sdxc/u/typography";
|
|
6
|
-
import { Menu } from "
|
|
7
|
-
import { Section } from "
|
|
7
|
+
import { Menu } from "../components/menu.js";
|
|
8
|
+
import { Section } from "../components/section.js";
|
|
8
9
|
/**
|
|
9
10
|
* Side {@link ContextMenu.SubContent} renders against relative to its
|
|
10
11
|
* {@link ContextMenu.SubTrigger} row when a consumer leaves `placement`
|
|
@@ -47,7 +48,7 @@ export function ContextMenu(handle) {
|
|
|
47
48
|
ContextMenu.Trigger = function ContextMenuTrigger(handle) {
|
|
48
49
|
return () => {
|
|
49
50
|
let { children, mix, ...rest } = handle.props;
|
|
50
|
-
return (_jsx("div", { ...rest, mix:
|
|
51
|
+
return (_jsx("div", { ...rest, mix: mergeMix(outline("none"), mix), children: children }));
|
|
51
52
|
};
|
|
52
53
|
};
|
|
53
54
|
/**
|
|
@@ -78,7 +79,7 @@ ContextMenu.Item = Menu.Item;
|
|
|
78
79
|
ContextMenu.Group = function ContextMenuGroup(handle) {
|
|
79
80
|
return () => {
|
|
80
81
|
let { mix, ...rest } = handle.props;
|
|
81
|
-
return (_jsx(Section, { ...rest, mix:
|
|
82
|
+
return (_jsx(Section, { ...rest, mix: mergeMix(not(":first-child", borderEdge("block-start", { color: "neutral", width: 1 })), mix) }));
|
|
82
83
|
};
|
|
83
84
|
};
|
|
84
85
|
/**
|
|
@@ -94,7 +95,7 @@ ContextMenu.Group = function ContextMenuGroup(handle) {
|
|
|
94
95
|
ContextMenu.Label = function ContextMenuLabel(handle) {
|
|
95
96
|
return () => {
|
|
96
97
|
let { children, mix, ...rest } = handle.props;
|
|
97
|
-
return (_jsx("header", { ...rest, mix: [pi(2), pb(1), weight("semibold"), fg("neutral.muted"), text("xs"), mix
|
|
98
|
+
return (_jsx("header", { ...rest, mix: mergeMix([pi(2), pb(1), weight("semibold"), fg("neutral.muted"), text("xs")], mix), children: children }));
|
|
98
99
|
};
|
|
99
100
|
};
|
|
100
101
|
/**
|
|
@@ -127,7 +128,7 @@ ContextMenu.Separator = Menu.Separator;
|
|
|
127
128
|
ContextMenu.SubTrigger = function ContextMenuSubTrigger(handle) {
|
|
128
129
|
return () => {
|
|
129
130
|
let { mix, ...rest } = handle.props;
|
|
130
|
-
return _jsx(Menu.Item, { ...rest, mix: [pie(8), mix] });
|
|
131
|
+
return _jsx(Menu.Item, { ...rest, mix: [pie(8), ...(mix ?? [])] });
|
|
131
132
|
};
|
|
132
133
|
};
|
|
133
134
|
/**
|
|
@@ -195,6 +196,6 @@ ContextMenu.RadioGroup = ContextMenu.Group;
|
|
|
195
196
|
ContextMenu.Shortcut = function ContextMenuShortcut(handle) {
|
|
196
197
|
return () => {
|
|
197
198
|
let { children, mix, ...rest } = handle.props;
|
|
198
|
-
return (_jsx("span", { ...rest, mix: [mis("auto"), fg("neutral.muted"), text("xs"), tabularNums(), mix
|
|
199
|
+
return (_jsx("span", { ...rest, mix: mergeMix([mis("auto"), fg("neutral.muted"), text("xs"), tabularNums()], mix), children: children }));
|
|
199
200
|
};
|
|
200
201
|
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The last section of a settings page, holding the actions that cannot be undone. Each
|
|
3
|
+
* action is a row that names its consequences and opens a `Confirm`, so the decision is
|
|
4
|
+
* read twice before anything is deleted, and a danger border sets the section apart.
|
|
5
|
+
*
|
|
6
|
+
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
7
|
+
* @copyright Sergio Xalambrí 2026
|
|
8
|
+
*/
|
|
9
|
+
import type { Handle, Props as TagProps, RemixNode } from "remix/component";
|
|
10
|
+
import { Confirm } from "../components/confirm.js";
|
|
11
|
+
import type { ActionPlacement as ActionPlacementType } from "./styles/action-row.js";
|
|
12
|
+
/**
|
|
13
|
+
* Prop types for {@link DangerZone} and {@link DangerZone.Action}.
|
|
14
|
+
*/
|
|
15
|
+
export declare namespace DangerZone {
|
|
16
|
+
/** Props accepted by {@link DangerZone}. */
|
|
17
|
+
interface Props extends Omit<TagProps<"section">, "title"> {
|
|
18
|
+
/** The section's heading, such as "Danger zone". */
|
|
19
|
+
title: RemixNode;
|
|
20
|
+
description?: RemixNode;
|
|
21
|
+
}
|
|
22
|
+
/** Where an action's button sits: at the row's end on its title's line, or below its text. */
|
|
23
|
+
type ActionPlacement = ActionPlacementType;
|
|
24
|
+
/** Props accepted by {@link DangerZone.Action}. */
|
|
25
|
+
interface ActionProps extends Omit<TagProps<"div">, "title"> {
|
|
26
|
+
/** The confirm dialog's `id`, which the row's button opens. */
|
|
27
|
+
id: string;
|
|
28
|
+
/** What the action does, such as "Delete team". */
|
|
29
|
+
title: RemixNode;
|
|
30
|
+
description?: RemixNode;
|
|
31
|
+
/** What is lost, one item each: "14 monitors stop checking", "Invoices stay in Billing". */
|
|
32
|
+
consequences?: ReadonlyArray<RemixNode>;
|
|
33
|
+
/**
|
|
34
|
+
* Where the button sits on a wide card: under the text, for a row that lists its
|
|
35
|
+
* consequences, or at the row's end on the title's line, for a short one. A narrow
|
|
36
|
+
* card always puts it under the text.
|
|
37
|
+
*
|
|
38
|
+
* @default "below"
|
|
39
|
+
*/
|
|
40
|
+
actionPlacement?: ActionPlacement;
|
|
41
|
+
/** The row's button text; name the action, such as "Delete team". */
|
|
42
|
+
buttonLabel: RemixNode;
|
|
43
|
+
/**
|
|
44
|
+
* The confirmation the button opens. Name the item in the title and description and
|
|
45
|
+
* the action on the confirm button; add `typeToConfirm` for the biggest deletions.
|
|
46
|
+
*/
|
|
47
|
+
confirm: Omit<Confirm.Props, "id">;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Renders the section: a heading over a card with a danger border whose rows are
|
|
52
|
+
* {@link DangerZone.Action}s.
|
|
53
|
+
*
|
|
54
|
+
* @param handle Runtime handle carrying the section's props.
|
|
55
|
+
* @returns The render function producing the section's markup.
|
|
56
|
+
* @example
|
|
57
|
+
* <DangerZone title="Danger zone">
|
|
58
|
+
* <DangerZone.Action id="delete-team" title="Delete team" buttonLabel="Delete team"
|
|
59
|
+
* consequences={["14 monitors stop checking", "Status pages go offline"]}
|
|
60
|
+
* confirm={{ title: "Delete team?", confirmLabel: "Delete team", cancelLabel: "Cancel", form: { action: "/team/delete" } }} />
|
|
61
|
+
* </DangerZone>
|
|
62
|
+
*/
|
|
63
|
+
export declare function DangerZone(handle: Handle<DangerZone.Props>): () => import("remix/component").RemixElement;
|
|
64
|
+
export declare namespace DangerZone {
|
|
65
|
+
var Action: (handle: Handle<DangerZone.ActionProps>) => () => import("remix/component").RemixElement;
|
|
66
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "remix/component/jsx-runtime";
|
|
2
|
+
import { bg, border, fg } from "@sdxc/u/color";
|
|
3
|
+
import { rounded } from "@sdxc/u/effects";
|
|
4
|
+
import { listStyle, mergeMix } from "@sdxc/u/general";
|
|
5
|
+
import { container, vstack } from "@sdxc/u/layout";
|
|
6
|
+
import { divide, overflow } from "@sdxc/u/overflow";
|
|
7
|
+
import { m, minIs, p, pis } from "@sdxc/u/size";
|
|
8
|
+
import { balance, pretty, text, weight } from "@sdxc/u/typography";
|
|
9
|
+
import { Button } from "../components/button.js";
|
|
10
|
+
import { Confirm } from "../components/confirm.js";
|
|
11
|
+
import { actionRowGrid, onTitleLine } from "./styles/action-row.js";
|
|
12
|
+
/** Container an action row measures, stacking its button under the text when narrow. */
|
|
13
|
+
const ROW_CONTAINER = "ui-danger-zone";
|
|
14
|
+
/** Where an action's button sits when `actionPlacement` is omitted. */
|
|
15
|
+
const DEFAULT_ACTION_PLACEMENT = "below";
|
|
16
|
+
/**
|
|
17
|
+
* Renders the section: a heading over a card with a danger border whose rows are
|
|
18
|
+
* {@link DangerZone.Action}s.
|
|
19
|
+
*
|
|
20
|
+
* @param handle Runtime handle carrying the section's props.
|
|
21
|
+
* @returns The render function producing the section's markup.
|
|
22
|
+
* @example
|
|
23
|
+
* <DangerZone title="Danger zone">
|
|
24
|
+
* <DangerZone.Action id="delete-team" title="Delete team" buttonLabel="Delete team"
|
|
25
|
+
* consequences={["14 monitors stop checking", "Status pages go offline"]}
|
|
26
|
+
* confirm={{ title: "Delete team?", confirmLabel: "Delete team", cancelLabel: "Cancel", form: { action: "/team/delete" } }} />
|
|
27
|
+
* </DangerZone>
|
|
28
|
+
*/
|
|
29
|
+
export function DangerZone(handle) {
|
|
30
|
+
return () => {
|
|
31
|
+
let { title, description, children, mix, ...rest } = handle.props;
|
|
32
|
+
let titleId = `${handle.id}-title`;
|
|
33
|
+
return (_jsxs("section", { ...rest, "aria-labelledby": titleId, "data-slot": "danger-zone", mix: mergeMix([vstack({ gap: 3, align: "stretch" })], mix), children: [_jsxs("header", { mix: [vstack({ gap: 1, align: "stretch" })], children: [_jsx("h2", { id: titleId, mix: [m(0), text("base"), weight("semibold"), fg("neutral.emphasis"), balance()], children: title }), description ? (_jsx("p", { mix: [m(0), text("sm"), fg("neutral.muted"), pretty()], children: description })) : null] }), _jsx("div", { "data-slot": "danger-zone-card", mix: [
|
|
34
|
+
vstack({ gap: 0, align: "stretch" }),
|
|
35
|
+
rounded("lg"),
|
|
36
|
+
border({ color: "danger", width: 1 }),
|
|
37
|
+
bg(),
|
|
38
|
+
overflow("hidden"),
|
|
39
|
+
divide("block", "danger"),
|
|
40
|
+
], children: children })] }));
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Renders one irreversible action: its title, description and consequence list, then a
|
|
45
|
+
* danger button that opens its {@link Confirm}, under the text or at the row's end as
|
|
46
|
+
* `actionPlacement` says.
|
|
47
|
+
*
|
|
48
|
+
* @param handle Runtime handle carrying the action's props.
|
|
49
|
+
* @returns The render function producing the row's markup.
|
|
50
|
+
* @example
|
|
51
|
+
* <DangerZone.Action id="transfer" title="Transfer ownership" buttonLabel="Transfer…" actionPlacement="end" confirm={…} />
|
|
52
|
+
*/
|
|
53
|
+
DangerZone.Action = function DangerZoneAction(handle) {
|
|
54
|
+
return () => {
|
|
55
|
+
let { id, title, description, consequences, actionPlacement: actionPlacementProp, buttonLabel, confirm, mix, ...rest } = handle.props;
|
|
56
|
+
let actionPlacement = actionPlacementProp ?? DEFAULT_ACTION_PLACEMENT;
|
|
57
|
+
return (_jsxs("div", { ...rest, "data-slot": "danger-zone-action", "data-action-placement": actionPlacement, mix: mergeMix([container(ROW_CONTAINER)], mix), children: [_jsxs("div", { mix: [p(4), actionRowGrid(ROW_CONTAINER, actionPlacement, "0.75rem 1.5rem")], children: [_jsxs("div", { "data-slot": "danger-zone-text", mix: [vstack({ gap: 1, align: "stretch" }), minIs(0)], children: [_jsx("p", { mix: [m(0), text("sm"), weight("medium"), fg("neutral.emphasis")], children: title }), description ? (_jsx("p", { mix: [m(0), text("sm"), fg("neutral.muted"), pretty()], children: description })) : null, consequences && consequences.length > 0 ? (_jsx("ul", { "data-slot": "danger-zone-consequences", mix: [
|
|
58
|
+
vstack({ gap: 0.5, align: "stretch" }),
|
|
59
|
+
m(0),
|
|
60
|
+
pis(5),
|
|
61
|
+
listStyle("disc"),
|
|
62
|
+
text("sm"),
|
|
63
|
+
fg("neutral.muted"),
|
|
64
|
+
], children: consequences.map((consequence) => (_jsx("li", { children: consequence }))) })) : null] }), _jsx("div", { "data-slot": "danger-zone-control", mix: [minIs(0), actionPlacement === "end" ? onTitleLine(ROW_CONTAINER) : undefined], children: _jsx(Button, { commandfor: id, command: "show-modal", color: "danger", variant: "outline", size: "sm", children: buttonLabel }) })] }), _jsx(Confirm, { ...confirm, id: id })] }));
|
|
65
|
+
};
|
|
66
|
+
};
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A non-modal side sheet showing one record whose open state lives in the URL: the server
|
|
3
|
+
* renders it when the page's query names a record, Close is a link back to the list, and
|
|
4
|
+
* the list behind stays interactive. A small island adds Esc, ↑/↓ (k/j) and copy link.
|
|
5
|
+
*
|
|
6
|
+
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
7
|
+
* @copyright Sergio Xalambrí 2026
|
|
8
|
+
*/
|
|
9
|
+
import type { EntryComponent, Handle, Props as TagProps, RemixNode } from "remix/component";
|
|
10
|
+
import type { DetailSheetKeyScope } from "./mixins/detail-sheet-keys.js";
|
|
11
|
+
/**
|
|
12
|
+
* Prop types for {@link DetailSheet} and {@link DetailSheetControls}.
|
|
13
|
+
*/
|
|
14
|
+
export declare namespace DetailSheet {
|
|
15
|
+
/** Every string the sheet shows or announces. */
|
|
16
|
+
interface Labels {
|
|
17
|
+
/** Close link's name, such as "Close". */
|
|
18
|
+
close: string;
|
|
19
|
+
/** Copy button's name, such as "Copy link". */
|
|
20
|
+
copyLink: string;
|
|
21
|
+
/** Announced once the link is on the clipboard, such as "Link copied". */
|
|
22
|
+
linkCopied: string;
|
|
23
|
+
/** Previous link's name, such as "Previous monitor". */
|
|
24
|
+
previous: string;
|
|
25
|
+
/** Next link's name, such as "Next monitor". */
|
|
26
|
+
next: string;
|
|
27
|
+
/** Read before the `n / N` counter, such as "Monitor". */
|
|
28
|
+
position: string;
|
|
29
|
+
}
|
|
30
|
+
/** Where the open record sits in the list behind, and the links to its neighbours. */
|
|
31
|
+
interface Position {
|
|
32
|
+
/** The open record's 1-based place in the list. */
|
|
33
|
+
index: number;
|
|
34
|
+
total: number;
|
|
35
|
+
/** The list URL with the previous record open; `null` at the first. */
|
|
36
|
+
previousHref?: string | null;
|
|
37
|
+
/** The list URL with the next record open; `null` at the last. */
|
|
38
|
+
nextHref?: string | null;
|
|
39
|
+
}
|
|
40
|
+
/** Every native `<aside>` attribute, plus the sheet's content and links. */
|
|
41
|
+
interface Props extends Omit<TagProps<"aside">, "id" | "title"> {
|
|
42
|
+
/** The sheet's id; its heading takes `${id}-title`. */
|
|
43
|
+
id: string;
|
|
44
|
+
/** The record's name, in the sheet's heading. */
|
|
45
|
+
title: RemixNode;
|
|
46
|
+
/** A line under the title: an id, a status, a host. */
|
|
47
|
+
description?: RemixNode;
|
|
48
|
+
/** The list URL without the record open. Close and Esc follow it. */
|
|
49
|
+
closeHref: string;
|
|
50
|
+
/** The URL a teammate can open this record at; shows the copy button. */
|
|
51
|
+
permalink?: string;
|
|
52
|
+
/** Shows `n / N` with previous/next links and their keys. */
|
|
53
|
+
position?: Position;
|
|
54
|
+
/** Extra header controls, placed before the navigation. */
|
|
55
|
+
actions?: RemixNode;
|
|
56
|
+
/** Pinned under the body: the record's own actions. */
|
|
57
|
+
footer?: RemixNode;
|
|
58
|
+
/**
|
|
59
|
+
* Where Esc, k/j and ↑/↓ answer: `"page"` document-wide with focus moved into the
|
|
60
|
+
* sheet on open, `"sheet"` only while focus is inside it.
|
|
61
|
+
*
|
|
62
|
+
* @default "page"
|
|
63
|
+
*/
|
|
64
|
+
keys?: DetailSheetKeyScope;
|
|
65
|
+
/** Floats the sheet off the viewport edges as a rounded card. */
|
|
66
|
+
inset?: boolean;
|
|
67
|
+
labels: Labels;
|
|
68
|
+
/** The record's detail: a `PropertyList`, a `Timeline`, notes. */
|
|
69
|
+
children?: RemixNode;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Props {@link DetailSheetControls} serializes into the page for hydration, which is why
|
|
74
|
+
* they are a `type`: `SerializableProps` rejects an interface.
|
|
75
|
+
*/
|
|
76
|
+
export type DetailSheetControlsProps = {
|
|
77
|
+
/** The sheet's id, which names the permalink field. */
|
|
78
|
+
sheetId: string;
|
|
79
|
+
closeHref: string;
|
|
80
|
+
permalink?: string;
|
|
81
|
+
index?: number;
|
|
82
|
+
total?: number;
|
|
83
|
+
previousHref?: string | null;
|
|
84
|
+
nextHref?: string | null;
|
|
85
|
+
labels: DetailSheet.Labels;
|
|
86
|
+
/** Where Esc, k/j and ↑/↓ answer. */
|
|
87
|
+
keys?: DetailSheetKeyScope;
|
|
88
|
+
};
|
|
89
|
+
/**
|
|
90
|
+
* The sheet's header controls as an island: `n / N` with previous/next links, copy link
|
|
91
|
+
* and Close. Server HTML renders every link; once hydrated, Esc, k/j and ↑/↓ follow them
|
|
92
|
+
* and focus moves into the sheet. Loads from `@sdxc/ui/app/detail-sheet#DetailSheetControls`.
|
|
93
|
+
*
|
|
94
|
+
* @example
|
|
95
|
+
* <DetailSheetControls sheetId="monitor" closeHref="/monitors" labels={labels} />
|
|
96
|
+
*/
|
|
97
|
+
export declare const DetailSheetControls: EntryComponent<DetailSheetControlsProps>;
|
|
98
|
+
/**
|
|
99
|
+
* Renders an `<aside>` named by its heading over the viewport, passing the pointer through
|
|
100
|
+
* to the page, with the panel docked to its inline end at `--ui-app-detail-sheet-width`, or
|
|
101
|
+
* a bottom sheet below 40rem. Never a modal; destructive actions confirm in the app's flow.
|
|
102
|
+
*
|
|
103
|
+
* @param handle Runtime handle carrying the `<aside>`'s props.
|
|
104
|
+
* @returns The render function producing the sheet's markup.
|
|
105
|
+
* @example
|
|
106
|
+
* {selected ? (
|
|
107
|
+
* <DetailSheet
|
|
108
|
+
* id="monitor"
|
|
109
|
+
* title={selected.name}
|
|
110
|
+
* closeHref="/monitors#monitor-42"
|
|
111
|
+
* permalink={`/monitors/${selected.id}`}
|
|
112
|
+
* position={{ index: 3, total: 84, previousHref: "/monitors?pane=41", nextHref: "/monitors?pane=43" }}
|
|
113
|
+
* labels={labels}
|
|
114
|
+
* >
|
|
115
|
+
* <PropertyList>…</PropertyList>
|
|
116
|
+
* </DetailSheet>
|
|
117
|
+
* ) : null}
|
|
118
|
+
*/
|
|
119
|
+
export declare function DetailSheet(handle: Handle<DetailSheet.Props>): () => import("remix/component").RemixElement;
|