@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,64 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "remix/component/jsx-runtime";
|
|
2
|
+
import { bg, border, fg } from "@sdxc/u/color";
|
|
3
|
+
import { opacity, rounded, shadow, transition } from "@sdxc/u/effects";
|
|
4
|
+
import { raw } from "@sdxc/u/general";
|
|
5
|
+
import { hidden, hstack, sticky } from "@sdxc/u/layout";
|
|
6
|
+
import { motionSafe, startingStyle } from "@sdxc/u/responsive";
|
|
7
|
+
import { minIs, p } from "@sdxc/u/size";
|
|
8
|
+
import { when } from "@sdxc/u/state";
|
|
9
|
+
import { translateProperty } from "@sdxc/u/transform";
|
|
10
|
+
import { text, weight } from "@sdxc/u/typography";
|
|
11
|
+
import { clientEntry } from "remix/component";
|
|
12
|
+
import { Button } from "../components/button.js";
|
|
13
|
+
import { Keyboard } from "../components/keyboard.js";
|
|
14
|
+
import { saveBarSync } from "./mixins/save-bar-sync.js";
|
|
15
|
+
import { saveShortcut } from "./mixins/save-shortcut.js";
|
|
16
|
+
/**
|
|
17
|
+
* Renders the bar, hidden until the watched form changes. Place it as the form's last
|
|
18
|
+
* child so it sticks to the bottom of the viewport while the form scrolls; the form keeps
|
|
19
|
+
* its own Save, which is what a browser without script uses.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* <form method="post" id="monitor-form">
|
|
23
|
+
* …fields…
|
|
24
|
+
* <SaveBar labels={{ message: "Unsaved changes", discard: "Discard", save: "Save", shortcut: "⌘S" }} />
|
|
25
|
+
* </form>
|
|
26
|
+
*/
|
|
27
|
+
export const SaveBar = clientEntry("@sdxc/ui/app/save-bar#SaveBar", function SaveBar(handle) {
|
|
28
|
+
return () => {
|
|
29
|
+
let { form, labels } = handle.props;
|
|
30
|
+
return (_jsxs("div", { "data-slot": "save-bar", hidden: true, mix: [
|
|
31
|
+
saveBarSync({ form, message: labels.message }),
|
|
32
|
+
sticky(),
|
|
33
|
+
hstack({ gap: 3, align: "center" }),
|
|
34
|
+
raw({ insetBlockEnd: "1rem", flexWrap: "wrap", zIndex: 10 }),
|
|
35
|
+
p(2, 2, 2, 4),
|
|
36
|
+
rounded("lg"),
|
|
37
|
+
border({ color: "neutral", width: 1 }),
|
|
38
|
+
bg(),
|
|
39
|
+
shadow("lg"),
|
|
40
|
+
text("sm"),
|
|
41
|
+
when("&[hidden]", hidden()),
|
|
42
|
+
motionSafe([
|
|
43
|
+
transition("opacity, translate"),
|
|
44
|
+
startingStyle([opacity(0), translateProperty("0 0.5rem")]),
|
|
45
|
+
]),
|
|
46
|
+
], children: [_jsx("p", { role: "status", mix: [
|
|
47
|
+
raw({ margin: 0, flex: "1 1 auto" }),
|
|
48
|
+
minIs(0),
|
|
49
|
+
weight("medium"),
|
|
50
|
+
fg("neutral.emphasis"),
|
|
51
|
+
] }), _jsx(Button, { type: "reset", form: form, variant: "ghost", color: "neutral", size: "sm", children: labels.discard }), _jsxs(Button, { type: "submit", form: form, size: "sm", children: [labels.save, labels.shortcut ? _jsx(Keyboard, { children: labels.shortcut }) : null] })] }));
|
|
52
|
+
};
|
|
53
|
+
});
|
|
54
|
+
/**
|
|
55
|
+
* Client island binding ⌘S/Ctrl+S to a form's primary save: the form holding focus submits, or
|
|
56
|
+
* the only bound form when focus is in none, and a `SaveBar` on the same form steps aside so
|
|
57
|
+
* one keystroke submits once. An explicit `SettingsSection` and `EditorLayout` render it.
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* <form method="post"><Input name="name" /><Button type="submit">Save</Button><SaveShortcut /></form>
|
|
61
|
+
*/
|
|
62
|
+
export const SaveShortcut = clientEntry("@sdxc/ui/app/save-bar#SaveShortcut", function SaveShortcut(handle) {
|
|
63
|
+
return () => (_jsx("span", { hidden: true, "data-slot": "save-shortcut", mix: [saveShortcut({ form: handle.props.form })] }));
|
|
64
|
+
});
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Client island: the quiet persistence signal an editor shows beside its publish button.
|
|
3
|
+
* "Saving…" holds at least a second, "Saved" shows for three, then the text decays to
|
|
4
|
+
* "Edited 2m ago" and later to a timestamp; a failure says so and offers Retry.
|
|
5
|
+
*
|
|
6
|
+
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
7
|
+
* @copyright Sergio Xalambrí 2026
|
|
8
|
+
*/
|
|
9
|
+
import type { EntryComponent } from "remix/component";
|
|
10
|
+
import type { SaveStatusSync } from "./mixins/save-status-sync.js";
|
|
11
|
+
/**
|
|
12
|
+
* Props {@link SaveStatus} serializes into the page for hydration, which is why they are a
|
|
13
|
+
* `type`: `SerializableProps` rejects an interface.
|
|
14
|
+
*/
|
|
15
|
+
export type SaveStatusProps = {
|
|
16
|
+
/** The element's `id`, which `setSaveStatus` targets. */
|
|
17
|
+
id: string;
|
|
18
|
+
/** The state the server rendered, such as `"saved"` after a save redirected back. */
|
|
19
|
+
state?: SaveStatusSync.State;
|
|
20
|
+
/** When the content was last edited, as an ISO string; feeds "Edited 2m ago". */
|
|
21
|
+
editedAt?: string;
|
|
22
|
+
/** The id of the form Retry submits; without one Retry only dispatches `ui:save-status-retry`. */
|
|
23
|
+
form?: string;
|
|
24
|
+
/** Locale for the relative and absolute edit times; defaults to the runtime's. */
|
|
25
|
+
locale?: string;
|
|
26
|
+
labels: {
|
|
27
|
+
saving: string;
|
|
28
|
+
saved: string;
|
|
29
|
+
failed: string;
|
|
30
|
+
retry: string;
|
|
31
|
+
/** The edit time line, with `{time}` where the time goes: "Edited {time}". */
|
|
32
|
+
edited: string;
|
|
33
|
+
};
|
|
34
|
+
/** @default 1000 */
|
|
35
|
+
holdMs?: number;
|
|
36
|
+
/** @default 3000 */
|
|
37
|
+
savedMs?: number;
|
|
38
|
+
/** @default 86400000 */
|
|
39
|
+
decayMs?: number;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Renders the status. Saving, Saved and Failed are announced through a polite live
|
|
43
|
+
* region; the ticking edit time sits outside it, so a screen reader hears each outcome
|
|
44
|
+
* once. Pair it with a publish button whose label carries publication's own state.
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* <SaveStatus id="post-status" editedAt={post.updatedAt} form="post-form"
|
|
48
|
+
* labels={{ saving: "Saving…", saved: "Saved", failed: "Failed", retry: "Retry", edited: "Edited {time}" }} />
|
|
49
|
+
*/
|
|
50
|
+
export declare const SaveStatus: EntryComponent<SaveStatusProps>;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "remix/component/jsx-runtime";
|
|
2
|
+
import { fg } from "@sdxc/u/color";
|
|
3
|
+
import { hidden, hstack } from "@sdxc/u/layout";
|
|
4
|
+
import { when } from "@sdxc/u/state";
|
|
5
|
+
import { nowrap, tabularNums, text } from "@sdxc/u/typography";
|
|
6
|
+
import { clientEntry } from "remix/component";
|
|
7
|
+
import { Button } from "../components/button.js";
|
|
8
|
+
import { saveStatusSync } from "./mixins/save-status-sync.js";
|
|
9
|
+
import { formatEditedTime } from "./utils/edited-time.js";
|
|
10
|
+
/** The state rendered when `state` is omitted: the last edit time, or nothing. */
|
|
11
|
+
const DEFAULT_STATE = "idle";
|
|
12
|
+
/** How long "Saving…" stays up at least, so a fast save never reads as a flicker. */
|
|
13
|
+
const DEFAULT_HOLD_MS = 1000;
|
|
14
|
+
/** How long "Saved" shows before decaying to the edit time. */
|
|
15
|
+
const DEFAULT_SAVED_MS = 3000;
|
|
16
|
+
/** Age after which the edit time reads as a timestamp rather than a relative time. */
|
|
17
|
+
const DEFAULT_DECAY_MS = 24 * 60 * 60 * 1000;
|
|
18
|
+
/**
|
|
19
|
+
* Renders the status. Saving, Saved and Failed are announced through a polite live
|
|
20
|
+
* region; the ticking edit time sits outside it, so a screen reader hears each outcome
|
|
21
|
+
* once. Pair it with a publish button whose label carries publication's own state.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* <SaveStatus id="post-status" editedAt={post.updatedAt} form="post-form"
|
|
25
|
+
* labels={{ saving: "Saving…", saved: "Saved", failed: "Failed", retry: "Retry", edited: "Edited {time}" }} />
|
|
26
|
+
*/
|
|
27
|
+
export const SaveStatus = clientEntry("@sdxc/ui/app/save-status#SaveStatus", function SaveStatus(handle) {
|
|
28
|
+
return () => {
|
|
29
|
+
let { id, form, labels, locale, editedAt } = handle.props;
|
|
30
|
+
let state = handle.props.state ?? DEFAULT_STATE;
|
|
31
|
+
let decayMs = handle.props.decayMs ?? DEFAULT_DECAY_MS;
|
|
32
|
+
let edited = editedAt ? new Date(editedAt) : null;
|
|
33
|
+
let showsEdited = state === "idle" && edited !== null;
|
|
34
|
+
return (_jsxs("span", { id: id, "data-slot": "save-status", "data-state": state, mix: [
|
|
35
|
+
saveStatusSync({
|
|
36
|
+
state,
|
|
37
|
+
editedAt,
|
|
38
|
+
labels,
|
|
39
|
+
locale,
|
|
40
|
+
holdMs: handle.props.holdMs ?? DEFAULT_HOLD_MS,
|
|
41
|
+
savedMs: handle.props.savedMs ?? DEFAULT_SAVED_MS,
|
|
42
|
+
decayMs,
|
|
43
|
+
}),
|
|
44
|
+
hstack({ gap: 2, align: "center" }),
|
|
45
|
+
text("sm"),
|
|
46
|
+
nowrap(),
|
|
47
|
+
tabularNums(),
|
|
48
|
+
fg("neutral.muted"),
|
|
49
|
+
when('&[data-state="failed"]', fg("danger")),
|
|
50
|
+
], children: [_jsx("span", { role: "status", "aria-live": "polite", "data-slot": "save-status-text", children: state === "idle" ? "" : labels[state] }), _jsx("time", { "data-slot": "save-status-edited", hidden: !showsEdited, dateTime: edited?.toISOString(), title: edited?.toLocaleString(locale), children: edited
|
|
51
|
+
? labels.edited.replace("{time}", formatEditedTime(edited, new Date(), decayMs, locale))
|
|
52
|
+
: null }), _jsxs("span", { "data-slot": "save-status-retry", hidden: state !== "failed", mix: [hstack({ gap: 2, align: "center" }), when("&[hidden]", hidden())], children: [_jsx("span", { "aria-hidden": "true", children: "\u00B7" }), _jsx(Button, { type: form ? "submit" : "button", form: form, variant: "ghost", color: "danger", size: "sm", children: labels.retry })] })] }));
|
|
53
|
+
};
|
|
54
|
+
});
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The floating bar at the foot of a list: it reads "Viewing 1–50 of 1,234" with previous and
|
|
3
|
+
* next links, and morphs into "✕ 3 selected · Pause P · Delete X" once rows are checked, each
|
|
4
|
+
* action a submit button that posts the checked ids and answers to its key.
|
|
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
|
+
/** Prop types for {@link SelectionBar} and {@link SelectionBarController}. */
|
|
11
|
+
export declare namespace SelectionBar {
|
|
12
|
+
/**
|
|
13
|
+
* A bulk action: a submit button for the form holding the rows' checkboxes, so it sends
|
|
14
|
+
* every checked id under the checkboxes' own name.
|
|
15
|
+
*/
|
|
16
|
+
interface Action {
|
|
17
|
+
label: string;
|
|
18
|
+
/** A single key that runs the action while rows are selected, printed as a key cap. */
|
|
19
|
+
key?: string;
|
|
20
|
+
/** A glyph before the label, decorative. */
|
|
21
|
+
icon?: RemixNode;
|
|
22
|
+
/** Where the action posts; defaults to the form's own `action`. */
|
|
23
|
+
formAction?: string;
|
|
24
|
+
/** @default "post" */
|
|
25
|
+
formMethod?: "get" | "post";
|
|
26
|
+
/** Submitted with `value`, so one endpoint can tell the actions apart (`intent=archive`). */
|
|
27
|
+
name?: string;
|
|
28
|
+
value?: string;
|
|
29
|
+
/** Draws the action in the danger tone; put it last. */
|
|
30
|
+
danger?: boolean;
|
|
31
|
+
}
|
|
32
|
+
/** What the bar shows while nothing is selected. */
|
|
33
|
+
interface Pagination {
|
|
34
|
+
/** The range text, such as "Viewing 1–50 of 1,234". */
|
|
35
|
+
summary: RemixNode;
|
|
36
|
+
/** The previous page's URL; omitted disables the link. */
|
|
37
|
+
previous?: string;
|
|
38
|
+
/** The next page's URL; omitted disables the link. */
|
|
39
|
+
next?: string;
|
|
40
|
+
}
|
|
41
|
+
/** Every string the bar shows or announces. */
|
|
42
|
+
interface Labels {
|
|
43
|
+
/** The toolbar's accessible name, such as "Monitor list". */
|
|
44
|
+
toolbar: string;
|
|
45
|
+
/** The clear button's accessible name, such as "Clear selection". */
|
|
46
|
+
clear: string;
|
|
47
|
+
/** The count with a `{count}` placeholder, such as "{count} selected". */
|
|
48
|
+
selected: string;
|
|
49
|
+
/** Announced once the selection empties, such as "Selection cleared". */
|
|
50
|
+
cleared: string;
|
|
51
|
+
previous: string;
|
|
52
|
+
next: string;
|
|
53
|
+
}
|
|
54
|
+
/** Props accepted by {@link SelectionBar}; the host is a `<div>`. */
|
|
55
|
+
interface Props extends Omit<TagProps<"div">, "children"> {
|
|
56
|
+
/** The `id` of the region holding the `[data-selection-item]` checkboxes. */
|
|
57
|
+
target: string;
|
|
58
|
+
/** The `id` of the form those checkboxes submit with. Defaults to `target`. */
|
|
59
|
+
form?: string;
|
|
60
|
+
/** Range and page links shown while nothing is selected; omitted hides the idle bar. */
|
|
61
|
+
pagination?: Pagination;
|
|
62
|
+
/** The bulk actions, in order; put a destructive one last. */
|
|
63
|
+
actions?: Action[];
|
|
64
|
+
/** Locale for the count. Defaults to the runtime's. */
|
|
65
|
+
locale?: string;
|
|
66
|
+
labels: Labels;
|
|
67
|
+
}
|
|
68
|
+
/** Props {@link SelectionBarController} serializes for hydration, which is why they are a `type`. */
|
|
69
|
+
type ControllerProps = {
|
|
70
|
+
target: string;
|
|
71
|
+
selected: string;
|
|
72
|
+
cleared: string;
|
|
73
|
+
locale?: string;
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Renders the bar as the list's footer row, summary at the start and page links at the end, and
|
|
78
|
+
* once rows are selected as a floating bar of actions stuck to the bottom of the scroll container.
|
|
79
|
+
* Both layers share one grid cell so the morph cross-fades in place. The layers' text and links work without
|
|
80
|
+
* script; the selection layer appears once the `@sdxc/ui/app/selection-bar` island loads.
|
|
81
|
+
*
|
|
82
|
+
* @param handle Runtime handle carrying the host `<div>`'s props.
|
|
83
|
+
* @returns The render function producing the bar.
|
|
84
|
+
* @example
|
|
85
|
+
* <form id="monitors" method="post" action="/monitors/bulk">{rows with <input type="checkbox" data-selection-item name="id" value={id} />}</form>
|
|
86
|
+
* <SelectionBar
|
|
87
|
+
* target="monitors"
|
|
88
|
+
* pagination={{ summary: "Viewing 1–50 of 1,234", next: "?page=2" }}
|
|
89
|
+
* actions={[{ label: "Pause", key: "p", name: "intent", value: "pause" }, { label: "Delete", key: "x", danger: true, name: "intent", value: "delete" }]}
|
|
90
|
+
* labels={{ toolbar: "Monitors", clear: "Clear selection", selected: "{count} selected", cleared: "Selection cleared", previous: "Previous page", next: "Next page" }}
|
|
91
|
+
* />
|
|
92
|
+
*/
|
|
93
|
+
export declare function SelectionBar(handle: Handle<SelectionBar.Props>): () => import("remix/component").RemixElement;
|
|
94
|
+
/**
|
|
95
|
+
* The island inside the bar: a visually hidden status region that announces the count, and
|
|
96
|
+
* the behavior that counts checked rows in `target`, morphs the bar, clears on Escape and
|
|
97
|
+
* runs an action on its key. Load `@sdxc/ui/app/selection-bar` in the browser entry.
|
|
98
|
+
*
|
|
99
|
+
* @example <SelectionBarController target="monitors" selected="{count} selected" cleared="Selection cleared" />
|
|
100
|
+
*/
|
|
101
|
+
export declare const SelectionBarController: EntryComponent<SelectionBar.ControllerProps>;
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "remix/component/jsx-runtime";
|
|
2
|
+
import { ChevronLeftIcon, ChevronRightIcon, XIcon } from "@sdxc/icons";
|
|
3
|
+
import { visuallyHidden } from "@sdxc/u/a11y";
|
|
4
|
+
import { bg, border, fg, outline } from "@sdxc/u/color";
|
|
5
|
+
import { opacity, rounded, visibility } from "@sdxc/u/effects";
|
|
6
|
+
import { mergeMix, pointerEvents, raw } from "@sdxc/u/general";
|
|
7
|
+
import { center, flex, flexWrap, gap, hidden, inlineFlex, insBe, items, justify, relative, shrink, sticky, zstack, } from "@sdxc/u/layout";
|
|
8
|
+
import { media } from "@sdxc/u/responsive";
|
|
9
|
+
import { bs, is, maxIs, mi, mis, pb, pi, pie } from "@sdxc/u/size";
|
|
10
|
+
import { z } from "@sdxc/u/stacking";
|
|
11
|
+
import { focusVisible, hover, when } from "@sdxc/u/state";
|
|
12
|
+
import { scale } from "@sdxc/u/transform";
|
|
13
|
+
import { nowrap, tabularNums, text, weight } from "@sdxc/u/typography";
|
|
14
|
+
import { clientEntry } from "remix/component";
|
|
15
|
+
import { durations, easings } from "../animations/tokens.js";
|
|
16
|
+
import { Button } from "../components/button.js";
|
|
17
|
+
import { Keyboard } from "../components/keyboard.js";
|
|
18
|
+
import { floatingSurface } from "../styles/floating-surface.js";
|
|
19
|
+
import { interactiveTransition } from "../styles/interactive-transition.js";
|
|
20
|
+
import { selectionBarSync } from "./mixins/selection-bar-sync.js";
|
|
21
|
+
/** The actions a bar shows when `actions` is unset: none, leaving the count and clear button. */
|
|
22
|
+
const DEFAULT_ACTIONS = [];
|
|
23
|
+
/** Distance the bar keeps from the bottom of its scroll container. */
|
|
24
|
+
const OFFSET = "var(--ui-selection-bar-offset, 1rem)";
|
|
25
|
+
/**
|
|
26
|
+
* Renders the bar as the list's footer row, summary at the start and page links at the end, and
|
|
27
|
+
* once rows are selected as a floating bar of actions stuck to the bottom of the scroll container.
|
|
28
|
+
* Both layers share one grid cell so the morph cross-fades in place. The layers' text and links work without
|
|
29
|
+
* script; the selection layer appears once the `@sdxc/ui/app/selection-bar` island loads.
|
|
30
|
+
*
|
|
31
|
+
* @param handle Runtime handle carrying the host `<div>`'s props.
|
|
32
|
+
* @returns The render function producing the bar.
|
|
33
|
+
* @example
|
|
34
|
+
* <form id="monitors" method="post" action="/monitors/bulk">{rows with <input type="checkbox" data-selection-item name="id" value={id} />}</form>
|
|
35
|
+
* <SelectionBar
|
|
36
|
+
* target="monitors"
|
|
37
|
+
* pagination={{ summary: "Viewing 1–50 of 1,234", next: "?page=2" }}
|
|
38
|
+
* actions={[{ label: "Pause", key: "p", name: "intent", value: "pause" }, { label: "Delete", key: "x", danger: true, name: "intent", value: "delete" }]}
|
|
39
|
+
* labels={{ toolbar: "Monitors", clear: "Clear selection", selected: "{count} selected", cleared: "Selection cleared", previous: "Previous page", next: "Next page" }}
|
|
40
|
+
* />
|
|
41
|
+
*/
|
|
42
|
+
export function SelectionBar(handle) {
|
|
43
|
+
return () => {
|
|
44
|
+
let { target, form, pagination, actions = DEFAULT_ACTIONS, locale, labels, mix, ...rest } = handle.props;
|
|
45
|
+
let formId = form ?? target;
|
|
46
|
+
let layer = [
|
|
47
|
+
flex(),
|
|
48
|
+
flexWrap(),
|
|
49
|
+
items("center"),
|
|
50
|
+
justify("center"),
|
|
51
|
+
gap(1),
|
|
52
|
+
morphTransition("opacity, transform, visibility"),
|
|
53
|
+
];
|
|
54
|
+
return (_jsxs("div", { ...rest, role: "toolbar", "aria-label": labels.toolbar, "data-slot": "selection-bar", "data-state": "idle", "data-paginated": pagination ? "" : undefined, mix: mergeMix([
|
|
55
|
+
relative(),
|
|
56
|
+
zstack(),
|
|
57
|
+
is("100%"),
|
|
58
|
+
pb(1),
|
|
59
|
+
text("sm"),
|
|
60
|
+
morphTransition("opacity"),
|
|
61
|
+
/**
|
|
62
|
+
* Idle, the bar is the list's quiet footer row; it sticks to the bottom of the
|
|
63
|
+
* scroll container only while rows are selected, when its actions float.
|
|
64
|
+
*/
|
|
65
|
+
when('&[data-state="selecting"]', [sticky(), insBe(OFFSET), z(10)]),
|
|
66
|
+
when('&[data-state="idle"]:not([data-paginated])', [opacity(0), pointerEvents()]),
|
|
67
|
+
], mix), children: [_jsx("div", { "data-slot": "selection-bar-pagination", mix: [
|
|
68
|
+
...layer,
|
|
69
|
+
justify("between"),
|
|
70
|
+
gap(2),
|
|
71
|
+
when('[data-state="selecting"] > &', [opacity(0), scale(0.98), hiddenLayer()]),
|
|
72
|
+
], children: pagination ? (_jsxs(_Fragment, { children: [_jsx("span", { "data-slot": "selection-bar-summary", mix: [fg("neutral"), tabularNums(), nowrap()], children: pagination.summary }), _jsxs("span", { mix: [flex(), gap(0.5)], children: [_jsx(PageLink, { href: pagination.previous, label: labels.previous, rel: "prev", children: _jsx(ChevronLeftIcon, { size: 16, "aria-hidden": "true" }) }), _jsx(PageLink, { href: pagination.next, label: labels.next, rel: "next", children: _jsx(ChevronRightIcon, { size: 16, "aria-hidden": "true" }) })] })] })) : null }), _jsxs("div", { "data-slot": "selection-bar-selection", inert: true, mix: [
|
|
73
|
+
...layer,
|
|
74
|
+
is("fit-content"),
|
|
75
|
+
maxIs("100%"),
|
|
76
|
+
mi("auto"),
|
|
77
|
+
floatingSurface(),
|
|
78
|
+
rounded("xl"),
|
|
79
|
+
pi(1.5),
|
|
80
|
+
pb(1),
|
|
81
|
+
when('[data-state="idle"] > &', [opacity(0), scale(0.98), hiddenLayer()]),
|
|
82
|
+
], children: [_jsxs("span", { mix: [flex(), items("center"), gap(1), shrink(0), pie(2)], children: [_jsx("button", { type: "button", "data-slot": "selection-clear", "aria-label": labels.clear, title: labels.clear, mix: [
|
|
83
|
+
interactiveTransition(),
|
|
84
|
+
center(),
|
|
85
|
+
is(7),
|
|
86
|
+
bs(7),
|
|
87
|
+
rounded("md"),
|
|
88
|
+
border({ width: 0 }),
|
|
89
|
+
bg("transparent"),
|
|
90
|
+
fg("neutral.muted"),
|
|
91
|
+
hover([bg("neutral.bg-tint-hover"), fg("neutral.emphasis")]),
|
|
92
|
+
focusVisible(outline({ color: "brand.ring", offset: 2 })),
|
|
93
|
+
], children: _jsx(XIcon, { size: 16, "aria-hidden": "true" }) }), _jsx("span", { "data-slot": "selection-count", mix: [fg("neutral.emphasis"), weight(500), tabularNums(), nowrap()] })] }), _jsx("span", { "aria-hidden": "true", mix: [is("1px"), bs(5), bg("neutral.border"), shrink(0)] }), actions.map((action) => (_jsxs(Button, { type: "submit", form: formId, formAction: action.formAction, formMethod: action.formMethod ?? "post", name: action.name, value: action.value, variant: "ghost", size: "sm", color: action.danger ? "danger" : "neutral", "data-selection-key": action.key, "aria-keyshortcuts": action.key?.toUpperCase(), mix: [gap(1.5), weight(400), when("& > svg", fg("neutral.muted"))], children: [action.icon, action.label, action.key ? (_jsx(Keyboard, { "aria-hidden": "true", mix: [mis(1), media("(hover: none)", hidden())], children: action.key.toUpperCase() })) : null] })))] }), _jsx(SelectionBarController, { target: target, selected: labels.selected, cleared: labels.cleared, locale: locale })] }));
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* The morph's fade: 200ms ease-out, and none under reduced motion. Both live in one rule so
|
|
98
|
+
* the reduced-motion override always outranks the fade, whatever order the page met them in.
|
|
99
|
+
*
|
|
100
|
+
* @param properties The properties that fade.
|
|
101
|
+
* @returns The mixin carrying the transition.
|
|
102
|
+
*/
|
|
103
|
+
function morphTransition(properties) {
|
|
104
|
+
return raw({
|
|
105
|
+
transitionProperty: properties,
|
|
106
|
+
transitionDuration: `${durations.normal}ms`,
|
|
107
|
+
transitionTimingFunction: easings.decelerate,
|
|
108
|
+
"@media (prefers-reduced-motion: reduce)": { transitionDuration: "0s" },
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Styles the layer that is not showing: invisible once its fade ends, so its controls leave
|
|
113
|
+
* the tab order and the accessibility tree even before the island marks it `inert`.
|
|
114
|
+
*
|
|
115
|
+
* @returns The mixins for a hidden layer.
|
|
116
|
+
*/
|
|
117
|
+
function hiddenLayer() {
|
|
118
|
+
return [pointerEvents(), visibility("hidden")];
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Renders a previous or next page link as a square icon target; without `href` it is a
|
|
122
|
+
* disabled placeholder that keeps the pair in place on the first and last pages.
|
|
123
|
+
*
|
|
124
|
+
* @param handle Runtime handle carrying the link's props.
|
|
125
|
+
* @returns The render function producing the link.
|
|
126
|
+
*/
|
|
127
|
+
function PageLink(handle) {
|
|
128
|
+
return () => {
|
|
129
|
+
let { href, label, rel, children } = handle.props;
|
|
130
|
+
return (_jsx("a", { href: href, rel: href ? rel : undefined, "aria-label": label, "aria-disabled": href ? undefined : "true", title: label, "data-slot": `selection-bar-${rel}`, mix: [
|
|
131
|
+
interactiveTransition(),
|
|
132
|
+
inlineFlex(),
|
|
133
|
+
items("center"),
|
|
134
|
+
justify("center"),
|
|
135
|
+
is(7),
|
|
136
|
+
bs(7),
|
|
137
|
+
rounded("md"),
|
|
138
|
+
fg("neutral"),
|
|
139
|
+
hover([bg("neutral.bg-tint-hover"), fg("neutral.emphasis")]),
|
|
140
|
+
focusVisible(outline({ color: "brand.ring", offset: 2 })),
|
|
141
|
+
when('&[aria-disabled="true"]', [opacity(40), pointerEvents()]),
|
|
142
|
+
], children: children }));
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* The island inside the bar: a visually hidden status region that announces the count, and
|
|
147
|
+
* the behavior that counts checked rows in `target`, morphs the bar, clears on Escape and
|
|
148
|
+
* runs an action on its key. Load `@sdxc/ui/app/selection-bar` in the browser entry.
|
|
149
|
+
*
|
|
150
|
+
* @example <SelectionBarController target="monitors" selected="{count} selected" cleared="Selection cleared" />
|
|
151
|
+
*/
|
|
152
|
+
export const SelectionBarController = clientEntry("@sdxc/ui/app/selection-bar#SelectionBarController", function SelectionBarController(handle) {
|
|
153
|
+
return () => {
|
|
154
|
+
let { target, selected, cleared, locale } = handle.props;
|
|
155
|
+
return (_jsx("span", { role: "status", "data-slot": "selection-bar-status", mix: [visuallyHidden(), selectionBarSync({ target, selected, cleared, locale })] }));
|
|
156
|
+
};
|
|
157
|
+
});
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The frame of a settings area: a section nav on the start side and a content column held to
|
|
3
|
+
* a reading measure, or the column alone where the app shell's swapped panel lists the sections.
|
|
4
|
+
* On a narrow container the nav is the parent page and a section route shows content and a back link.
|
|
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 SettingsLayout}.
|
|
12
|
+
*/
|
|
13
|
+
export declare namespace SettingsLayout {
|
|
14
|
+
/** One section of the settings area. */
|
|
15
|
+
interface Item {
|
|
16
|
+
href: string;
|
|
17
|
+
label: RemixNode;
|
|
18
|
+
/** Marks the section being shown, rendered as `aria-current="page"`. */
|
|
19
|
+
current?: boolean;
|
|
20
|
+
}
|
|
21
|
+
/** A run of sections under an optional heading, such as "Workspace" or "Account". */
|
|
22
|
+
interface Group {
|
|
23
|
+
label?: RemixNode;
|
|
24
|
+
items: ReadonlyArray<Item>;
|
|
25
|
+
}
|
|
26
|
+
/** Every string the layout shows or announces. */
|
|
27
|
+
interface Labels {
|
|
28
|
+
/** Name of the nav landmark, such as "Settings"; required with `sections`. */
|
|
29
|
+
nav?: string;
|
|
30
|
+
/** Text of the back link a narrow section page shows, such as "Settings". */
|
|
31
|
+
back: string;
|
|
32
|
+
}
|
|
33
|
+
/** Props accepted by {@link SettingsLayout}. */
|
|
34
|
+
interface Props extends TagProps<"div"> {
|
|
35
|
+
/**
|
|
36
|
+
* The nav's groups of sections. Omit them where the app shell's swapped panel already
|
|
37
|
+
* lists the sections: the layout is then the content column alone at every width.
|
|
38
|
+
*/
|
|
39
|
+
sections?: ReadonlyArray<Group>;
|
|
40
|
+
/**
|
|
41
|
+
* Which route renders the layout. `"index"` is the settings root, which a narrow
|
|
42
|
+
* container shows as the nav alone; `"section"` shows a section's content.
|
|
43
|
+
*
|
|
44
|
+
* @default "section"
|
|
45
|
+
*/
|
|
46
|
+
page?: "index" | "section";
|
|
47
|
+
/** Where the narrow back link returns to: the settings index route. */
|
|
48
|
+
backHref?: string;
|
|
49
|
+
labels: Labels;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Renders the nav and the content column. Both are in the markup on every route and the
|
|
54
|
+
* container decides which one a narrow screen shows, so the layout needs no script and
|
|
55
|
+
* follows a resized pane. Without `sections` the content shows on every route.
|
|
56
|
+
*
|
|
57
|
+
* @param handle Runtime handle carrying the layout's props.
|
|
58
|
+
* @returns The render function producing the layout's markup.
|
|
59
|
+
* @example
|
|
60
|
+
* <SettingsLayout
|
|
61
|
+
* sections={[{ items: [{ href: "/settings/general", label: "General", current: true }, { href: "/settings/billing", label: "Billing" }] }]}
|
|
62
|
+
* backHref="/settings"
|
|
63
|
+
* labels={{ nav: "Settings", back: "Settings" }}
|
|
64
|
+
* >
|
|
65
|
+
* <SettingsSection title="Monitor defaults" save="explicit" labels={{ save: "Save" }}>…</SettingsSection>
|
|
66
|
+
* </SettingsLayout>
|
|
67
|
+
* @example
|
|
68
|
+
* <SettingsLayout backHref="/settings" labels={{ back: "Settings" }}>…</SettingsLayout>
|
|
69
|
+
*/
|
|
70
|
+
export declare function SettingsLayout(handle: Handle<SettingsLayout.Props>): () => import("remix/component").RemixElement;
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "remix/component/jsx-runtime";
|
|
2
|
+
import { ChevronLeftIcon } from "@sdxc/icons";
|
|
3
|
+
import { bg, fg, outline } from "@sdxc/u/color";
|
|
4
|
+
import { rounded, transition } from "@sdxc/u/effects";
|
|
5
|
+
import { listStyle, mergeMix, raw } from "@sdxc/u/general";
|
|
6
|
+
import { container, hstack, vstack } from "@sdxc/u/layout";
|
|
7
|
+
import { is, m, minIs, p, pi } from "@sdxc/u/size";
|
|
8
|
+
import { hover, when } from "@sdxc/u/state";
|
|
9
|
+
import { text, textDecoration, truncate, weight } from "@sdxc/u/typography";
|
|
10
|
+
/** Container the layout measures its own width against. */
|
|
11
|
+
const LAYOUT_CONTAINER = "ui-settings-layout";
|
|
12
|
+
/** Width at which the nav and the content sit side by side. */
|
|
13
|
+
const WIDE = `@container ${LAYOUT_CONTAINER} (min-width: 48rem)`;
|
|
14
|
+
/** Which route the layout renders for when `page` is omitted. */
|
|
15
|
+
const DEFAULT_PAGE = "section";
|
|
16
|
+
/** Width below which only one of the two columns shows. */
|
|
17
|
+
const NARROW = `@container ${LAYOUT_CONTAINER} (max-width: 47.999rem)`;
|
|
18
|
+
/**
|
|
19
|
+
* Renders the nav and the content column. Both are in the markup on every route and the
|
|
20
|
+
* container decides which one a narrow screen shows, so the layout needs no script and
|
|
21
|
+
* follows a resized pane. Without `sections` the content shows on every route.
|
|
22
|
+
*
|
|
23
|
+
* @param handle Runtime handle carrying the layout's props.
|
|
24
|
+
* @returns The render function producing the layout's markup.
|
|
25
|
+
* @example
|
|
26
|
+
* <SettingsLayout
|
|
27
|
+
* sections={[{ items: [{ href: "/settings/general", label: "General", current: true }, { href: "/settings/billing", label: "Billing" }] }]}
|
|
28
|
+
* backHref="/settings"
|
|
29
|
+
* labels={{ nav: "Settings", back: "Settings" }}
|
|
30
|
+
* >
|
|
31
|
+
* <SettingsSection title="Monitor defaults" save="explicit" labels={{ save: "Save" }}>…</SettingsSection>
|
|
32
|
+
* </SettingsLayout>
|
|
33
|
+
* @example
|
|
34
|
+
* <SettingsLayout backHref="/settings" labels={{ back: "Settings" }}>…</SettingsLayout>
|
|
35
|
+
*/
|
|
36
|
+
export function SettingsLayout(handle) {
|
|
37
|
+
return () => {
|
|
38
|
+
let { sections, page: pageProp, backHref, labels, children, mix, ...rest } = handle.props;
|
|
39
|
+
let page = pageProp ?? DEFAULT_PAGE;
|
|
40
|
+
let hasNav = sections !== undefined;
|
|
41
|
+
let isIndex = page === "index";
|
|
42
|
+
/** The narrow index page is the nav itself, so its content waits for a section route. */
|
|
43
|
+
let hideNarrowContent = isIndex && hasNav;
|
|
44
|
+
return (_jsx("div", { ...rest, "data-slot": "settings-layout", "data-page": page, "data-nav": hasNav ? undefined : "none", mix: mergeMix([is("100%"), container(LAYOUT_CONTAINER)], mix), children: _jsxs("div", { mix: [
|
|
45
|
+
raw({
|
|
46
|
+
display: "grid",
|
|
47
|
+
gridTemplateColumns: "minmax(0, 1fr)",
|
|
48
|
+
gap: "1.5rem",
|
|
49
|
+
[WIDE]: {
|
|
50
|
+
gridTemplateColumns: hasNav
|
|
51
|
+
? "var(--ui-settings-nav-width, 13rem) minmax(0, var(--ui-settings-measure, 42rem))"
|
|
52
|
+
: "minmax(0, var(--ui-settings-measure, 42rem))",
|
|
53
|
+
gap: "2.5rem",
|
|
54
|
+
},
|
|
55
|
+
}),
|
|
56
|
+
], children: [sections ? (_jsx("nav", { "aria-label": labels.nav, "data-slot": "settings-nav", mix: [
|
|
57
|
+
vstack({ gap: 5, align: "stretch" }),
|
|
58
|
+
minIs(0),
|
|
59
|
+
raw({
|
|
60
|
+
[NARROW]: { display: isIndex ? "flex" : "none" },
|
|
61
|
+
[WIDE]: {
|
|
62
|
+
position: "sticky",
|
|
63
|
+
insetBlockStart: "calc(var(--ui-app-sticky-top, 0px) + 1rem)",
|
|
64
|
+
alignSelf: "start",
|
|
65
|
+
},
|
|
66
|
+
}),
|
|
67
|
+
], children: sections.map((group) => (_jsx(SettingsNavGroup, { group: group }))) })) : null, _jsxs("div", { "data-slot": "settings-content", mix: [
|
|
68
|
+
vstack({ gap: 8, align: "stretch" }),
|
|
69
|
+
minIs(0),
|
|
70
|
+
raw({ [NARROW]: { display: hideNarrowContent ? "none" : "flex" } }),
|
|
71
|
+
], children: [!isIndex && backHref ? (_jsxs("a", { href: backHref, "data-slot": "settings-back", mix: [
|
|
72
|
+
hstack({ gap: 1, align: "center" }),
|
|
73
|
+
raw({ alignSelf: "start", [WIDE]: { display: "none" } }),
|
|
74
|
+
text("sm"),
|
|
75
|
+
fg("neutral.muted"),
|
|
76
|
+
textDecoration("none"),
|
|
77
|
+
rounded("sm"),
|
|
78
|
+
hover(fg("neutral.emphasis")),
|
|
79
|
+
when("&:focus-visible", outline({ color: "brand.ring", offset: 2 })),
|
|
80
|
+
], children: [_jsx(ChevronLeftIcon, { size: 16, "aria-hidden": "true" }), labels.back] })) : null, children] })] }) }));
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* One group of section links. Rows are 32px on a wide container and grow to a 44px
|
|
85
|
+
* touch target where the nav is the whole page.
|
|
86
|
+
*/
|
|
87
|
+
function SettingsNavGroup(handle) {
|
|
88
|
+
return () => {
|
|
89
|
+
let { group } = handle.props;
|
|
90
|
+
let headingId = group.label ? `${handle.id}-label` : undefined;
|
|
91
|
+
return (_jsxs("div", { mix: [vstack({ gap: 1, align: "stretch" })], children: [group.label ? (_jsx("p", { id: headingId, mix: [pi(2.5), text("xs"), weight("medium"), fg("neutral.muted")], children: group.label })) : null, _jsx("ul", { "aria-labelledby": headingId, mix: [vstack({ gap: 0.5, align: "stretch" }), listStyle(), m(0), p(0)], children: group.items.map((item) => (_jsx("li", { children: _jsx("a", { href: item.href, "aria-current": item.current ? "page" : undefined, "data-slot": "settings-nav-item", mix: [
|
|
92
|
+
hstack({ gap: 2, align: "center" }),
|
|
93
|
+
pi(2.5),
|
|
94
|
+
rounded("md"),
|
|
95
|
+
text("sm"),
|
|
96
|
+
fg("neutral"),
|
|
97
|
+
textDecoration("none"),
|
|
98
|
+
transition("background-color, color"),
|
|
99
|
+
raw({
|
|
100
|
+
blockSize: "var(--ui-app-nav-row-size, 2rem)",
|
|
101
|
+
[NARROW]: { blockSize: "2.75rem" },
|
|
102
|
+
}),
|
|
103
|
+
hover([bg("neutral.bg-tint"), fg("neutral.emphasis")]),
|
|
104
|
+
when('&[aria-current="page"]', [
|
|
105
|
+
bg("neutral.bg-tint"),
|
|
106
|
+
fg("neutral.emphasis"),
|
|
107
|
+
weight("medium"),
|
|
108
|
+
]),
|
|
109
|
+
when("&:focus-visible", outline({ color: "brand.ring", offset: -2 })),
|
|
110
|
+
], children: _jsx("span", { mix: [truncate(), minIs(0)], children: item.label }) }) }))) })] }));
|
|
111
|
+
};
|
|
112
|
+
}
|