@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,175 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "remix/component/jsx-runtime";
|
|
2
|
+
import { ChevronDownIcon } from "@sdxc/icons";
|
|
3
|
+
import { visuallyHidden } from "@sdxc/u/a11y";
|
|
4
|
+
import { bg, border, fg, outline } from "@sdxc/u/color";
|
|
5
|
+
import { rounded, transition } from "@sdxc/u/effects";
|
|
6
|
+
import { cursor, raw, mergeMix } from "@sdxc/u/general";
|
|
7
|
+
import { container, flex, gap, grid, items, justify, shrink, vstack } from "@sdxc/u/layout";
|
|
8
|
+
import { is, m, minBs, minIs, p, pb, pi } from "@sdxc/u/size";
|
|
9
|
+
import { focusVisible, hover } from "@sdxc/u/state";
|
|
10
|
+
import { leading, tabularNums, text, textAlign, weight } from "@sdxc/u/typography";
|
|
11
|
+
import { Popover } from "./popover.js";
|
|
12
|
+
/** Container the list names, so its rows stack against the list's own width. */
|
|
13
|
+
const PROPERTY_LIST_CONTAINER = "ui-property-list";
|
|
14
|
+
/** Layout a list takes when `variant` is left unset. */
|
|
15
|
+
const DEFAULT_VARIANT = "rows";
|
|
16
|
+
/** Shown for a value the caller leaves empty and names no empty text for. */
|
|
17
|
+
const DEFAULT_EMPTY = "—";
|
|
18
|
+
/**
|
|
19
|
+
* Whether `node` renders nothing a reader would see, which is when the row shows its
|
|
20
|
+
* named empty value instead.
|
|
21
|
+
*
|
|
22
|
+
* @param node The value a row was given.
|
|
23
|
+
* @returns `true` for `null`, `undefined`, `false`, `""` and a list of those.
|
|
24
|
+
*/
|
|
25
|
+
function isEmptyValue(node) {
|
|
26
|
+
if (node === null || node === undefined || node === false || node === "")
|
|
27
|
+
return true;
|
|
28
|
+
if (Array.isArray(node))
|
|
29
|
+
return node.every((child) => isEmptyValue(child));
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Renders the `<dl>`. Each item is a `<div>` grouping one `<dt>` and one `<dd>`, which
|
|
34
|
+
* keeps the label/value pairing in the accessibility tree; the list measures itself as a
|
|
35
|
+
* container, so rows stack in a narrow side pane at any viewport width.
|
|
36
|
+
*
|
|
37
|
+
* @param handle Runtime handle carrying the `<dl>`'s props and providing the variant.
|
|
38
|
+
* @returns The render function producing the list's markup.
|
|
39
|
+
* @example
|
|
40
|
+
* <PropertyList>
|
|
41
|
+
* <PropertyList.Item label="Status"><Badge color="success">Up</Badge></PropertyList.Item>
|
|
42
|
+
* <PropertyList.Item label="Reviewers" empty="No reviews" />
|
|
43
|
+
* </PropertyList>
|
|
44
|
+
* @example
|
|
45
|
+
* <PropertyList variant="tiles">
|
|
46
|
+
* <PropertyList.Item label="Uptime">99.98%</PropertyList.Item>
|
|
47
|
+
* </PropertyList>
|
|
48
|
+
*/
|
|
49
|
+
export function PropertyList(handle) {
|
|
50
|
+
return () => {
|
|
51
|
+
let { variant, mix, ...rest } = handle.props;
|
|
52
|
+
let resolved = variant ?? DEFAULT_VARIANT;
|
|
53
|
+
handle.context.set({ variant: resolved });
|
|
54
|
+
return (_jsx("dl", { "data-slot": "property-list", "data-variant": resolved, ...rest, mix: mergeMix([
|
|
55
|
+
m(0),
|
|
56
|
+
is("100%"),
|
|
57
|
+
container(PROPERTY_LIST_CONTAINER),
|
|
58
|
+
text("sm"),
|
|
59
|
+
resolved === "tiles"
|
|
60
|
+
? [
|
|
61
|
+
grid(),
|
|
62
|
+
gap(2),
|
|
63
|
+
/**
|
|
64
|
+
* Each tile claims at least half the row, so two fit side by side once
|
|
65
|
+
* both reach 9rem and a narrower list falls back to one column.
|
|
66
|
+
*/
|
|
67
|
+
raw({
|
|
68
|
+
gridTemplateColumns: "repeat(auto-fit, minmax(max(9rem, calc(50% - 0.25rem)), 1fr))",
|
|
69
|
+
}),
|
|
70
|
+
]
|
|
71
|
+
: vstack({ gap: 0 }),
|
|
72
|
+
], mix) }));
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Renders one property. In the rows variant the label column holds
|
|
77
|
+
* `--ui-property-list-label-width` (9rem) from a 22rem container up and stacks above the
|
|
78
|
+
* value below it; a value-less row names its emptiness in muted text.
|
|
79
|
+
*
|
|
80
|
+
* @param handle Runtime handle carrying the group `<div>`'s props.
|
|
81
|
+
* @returns The render function producing the row's markup.
|
|
82
|
+
* @example
|
|
83
|
+
* <PropertyList.Item label="Owner"><a href="/people/ana">Ana Souza</a></PropertyList.Item>
|
|
84
|
+
* @example
|
|
85
|
+
* <PropertyList.Item
|
|
86
|
+
* label="Assignee"
|
|
87
|
+
* empty="No one"
|
|
88
|
+
* edit={{ id: "edit-assignee", label: "Edit assignee", content: <AssigneeForm /> }}
|
|
89
|
+
* >
|
|
90
|
+
* {assignee?.name}
|
|
91
|
+
* </PropertyList.Item>
|
|
92
|
+
*/
|
|
93
|
+
PropertyList.Item = function PropertyListItem(handle) {
|
|
94
|
+
return () => {
|
|
95
|
+
let { label, empty, edit, children, mix, ...rest } = handle.props;
|
|
96
|
+
let { variant } = handle.context.get(PropertyList);
|
|
97
|
+
let tiles = variant === "tiles";
|
|
98
|
+
let isEmpty = isEmptyValue(children);
|
|
99
|
+
let value = isEmpty ? (_jsx("span", { "data-slot": "property-empty", mix: [fg("neutral.muted")], children: empty ?? DEFAULT_EMPTY })) : (children);
|
|
100
|
+
return (_jsxs("div", { "data-slot": "property", ...rest, mix: mergeMix(tiles
|
|
101
|
+
? [
|
|
102
|
+
vstack({ gap: 1 }),
|
|
103
|
+
p(3),
|
|
104
|
+
rounded("md"),
|
|
105
|
+
border({ color: "neutral.border", width: 1 }),
|
|
106
|
+
]
|
|
107
|
+
: [
|
|
108
|
+
grid(),
|
|
109
|
+
pb(1),
|
|
110
|
+
items("baseline"),
|
|
111
|
+
/**
|
|
112
|
+
* The stacked and side-by-side tracks live in one rule, so the label column
|
|
113
|
+
* holds at its width whatever order the stylesheet layers land in.
|
|
114
|
+
*/
|
|
115
|
+
raw({
|
|
116
|
+
gridTemplateColumns: "minmax(0, 1fr)",
|
|
117
|
+
rowGap: "0.125rem",
|
|
118
|
+
[`@container ${PROPERTY_LIST_CONTAINER} (min-width: 22rem)`]: {
|
|
119
|
+
gridTemplateColumns: "var(--ui-property-list-label-width, 9rem) minmax(0, 1fr)",
|
|
120
|
+
columnGap: "1rem",
|
|
121
|
+
},
|
|
122
|
+
}),
|
|
123
|
+
], mix), children: [_jsx("dt", { "data-slot": "property-label", mix: [
|
|
124
|
+
m(0),
|
|
125
|
+
minIs(0),
|
|
126
|
+
fg("neutral.muted"),
|
|
127
|
+
tiles ? text("xs") : text("sm"),
|
|
128
|
+
leading("1.25rem"),
|
|
129
|
+
pb(tiles ? 0 : 1.5),
|
|
130
|
+
], children: label }), _jsx("dd", { "data-slot": "property-value", mix: [
|
|
131
|
+
m(0),
|
|
132
|
+
minIs(0),
|
|
133
|
+
flex(),
|
|
134
|
+
items("center"),
|
|
135
|
+
gap(1.5),
|
|
136
|
+
raw({ flexWrap: "wrap" }),
|
|
137
|
+
minBs("2rem"),
|
|
138
|
+
tabularNums(),
|
|
139
|
+
tiles ? [text("lg"), weight("semibold")] : null,
|
|
140
|
+
], children: edit ? (_jsx(PropertyEdit, { edit: edit, empty: isEmpty, children: value })) : (value) })] }));
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
/**
|
|
144
|
+
* The editable value: a full-width button naming its action before the current value,
|
|
145
|
+
* and the popover it opens. The button is the popover's invoker, which makes it the
|
|
146
|
+
* popover's implicit anchor, so the form opens directly under its row.
|
|
147
|
+
*
|
|
148
|
+
* @param handle Runtime handle carrying the edit description and the rendered value.
|
|
149
|
+
* @returns The render function producing the button and its popover.
|
|
150
|
+
*/
|
|
151
|
+
function PropertyEdit(handle) {
|
|
152
|
+
return () => {
|
|
153
|
+
let { edit, children } = handle.props;
|
|
154
|
+
return (_jsxs(_Fragment, { children: [_jsxs("button", { type: "button", "data-slot": "property-edit", popovertarget: edit.id, "aria-haspopup": "dialog", mix: [
|
|
155
|
+
flex(),
|
|
156
|
+
items("center"),
|
|
157
|
+
justify("between"),
|
|
158
|
+
gap(1.5),
|
|
159
|
+
is("full"),
|
|
160
|
+
minBs("2rem"),
|
|
161
|
+
pi(2),
|
|
162
|
+
raw({ marginInline: "-0.5rem", inlineSize: "calc(100% + 1rem)" }),
|
|
163
|
+
rounded("md"),
|
|
164
|
+
border({ color: "transparent", width: 0 }),
|
|
165
|
+
bg("transparent"),
|
|
166
|
+
fg(),
|
|
167
|
+
text("sm"),
|
|
168
|
+
textAlign("start"),
|
|
169
|
+
cursor("pointer"),
|
|
170
|
+
transition("background-color"),
|
|
171
|
+
hover(bg("neutral.tint")),
|
|
172
|
+
focusVisible(outline({ color: "brand.ring", width: 2, offset: -2 })),
|
|
173
|
+
], children: [_jsxs("span", { mix: [flex(), items("center"), gap(1.5), raw({ flexWrap: "wrap" }), minIs(0)], children: [_jsx("span", { mix: [visuallyHidden()], children: `${edit.label}: ` }), children] }), _jsx(ChevronDownIcon, { size: 14, "aria-hidden": "true", mix: [shrink(0), fg("neutral.muted")] })] }), _jsx(Popover, { id: edit.id, placement: "bottom-start", role: "dialog", "aria-label": edit.label, "data-slot": "property-popover", mix: [p(3), is("min(20rem, calc(100vw - 2rem))"), text("sm")], children: edit.content })] }));
|
|
174
|
+
};
|
|
175
|
+
}
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "remix/component/jsx-runtime";
|
|
|
2
2
|
import { visuallyHidden } from "@sdxc/u/a11y";
|
|
3
3
|
import { bg, border, fg, outline } from "@sdxc/u/color";
|
|
4
4
|
import { opacity, rounded, transition } from "@sdxc/u/effects";
|
|
5
|
-
import { cursor, pseudoContent } from "@sdxc/u/general";
|
|
5
|
+
import { cursor, pseudoContent, mergeMix } from "@sdxc/u/general";
|
|
6
6
|
import { flex, flexCol, flexRow, gap, items, justify, relative, shrink } from "@sdxc/u/layout";
|
|
7
7
|
import { bs, is } from "@sdxc/u/size";
|
|
8
8
|
import { after, precededBy, when } from "@sdxc/u/state";
|
|
@@ -45,15 +45,14 @@ export function RadioGroup(handle) {
|
|
|
45
45
|
let resolvedName = name ?? handle.id;
|
|
46
46
|
let resolvedOrientation = orientation ?? DEFAULT_ORIENTATION;
|
|
47
47
|
handle.context.set({ name: resolvedName });
|
|
48
|
-
return (_jsx("div", { "data-orientation": resolvedOrientation, "aria-orientation": resolvedOrientation, ...rest, mix: [
|
|
48
|
+
return (_jsx("div", { "data-orientation": resolvedOrientation, "aria-orientation": resolvedOrientation, ...rest, mix: mergeMix([
|
|
49
49
|
attrs({ role: DEFAULT_ROLE }),
|
|
50
50
|
flex(),
|
|
51
51
|
flexCol(),
|
|
52
52
|
when('&[data-orientation="horizontal"]', flexRow()),
|
|
53
53
|
gap("0.5rem"),
|
|
54
54
|
when('&[data-orientation="horizontal"]', gap("1rem")),
|
|
55
|
-
|
|
56
|
-
] }));
|
|
55
|
+
], mix) }));
|
|
57
56
|
};
|
|
58
57
|
}
|
|
59
58
|
/**
|
|
@@ -75,7 +74,7 @@ RadioGroup.Radio = function RadioGroupRadio(handle) {
|
|
|
75
74
|
let { value, name, checked, defaultChecked, disabled, required, children, parts, mix, ...rest } = handle.props;
|
|
76
75
|
let context = handle.context.get(RadioGroup);
|
|
77
76
|
let resolvedName = name ?? context.name;
|
|
78
|
-
return (_jsxs("label", { ...rest, mix: [
|
|
77
|
+
return (_jsxs("label", { ...rest, mix: mergeMix([
|
|
79
78
|
flex(),
|
|
80
79
|
cursor("default"),
|
|
81
80
|
items("center"),
|
|
@@ -83,8 +82,7 @@ RadioGroup.Radio = function RadioGroupRadio(handle) {
|
|
|
83
82
|
when("&:has(input:disabled)", [cursor("not-allowed"), opacity(50)]),
|
|
84
83
|
gap("0.5rem"),
|
|
85
84
|
fg("neutral.emphasis"),
|
|
86
|
-
|
|
87
|
-
], children: [_jsx("input", { type: "radio", id: handle.id, value: value, name: resolvedName, checked: checked, defaultChecked: defaultChecked, disabled: disabled, required: required, mix: [visuallyHidden(), parts?.input] }), _jsx("span", { "data-slot": "indicator", mix: [
|
|
85
|
+
], mix), children: [_jsx("input", { type: "radio", id: handle.id, value: value, name: resolvedName, checked: checked, defaultChecked: defaultChecked, disabled: disabled, required: required, mix: [visuallyHidden(), parts?.input] }), _jsx("span", { "data-slot": "indicator", mix: [
|
|
88
86
|
relative(),
|
|
89
87
|
flex(),
|
|
90
88
|
shrink(),
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "remix/component/jsx-runtime";
|
|
2
2
|
import { bg, fg } from "@sdxc/u/color";
|
|
3
3
|
import { roundedCorner } from "@sdxc/u/effects";
|
|
4
|
+
import { mergeMix } from "@sdxc/u/general";
|
|
4
5
|
import { flex, gap, items } from "@sdxc/u/layout";
|
|
5
6
|
import { when } from "@sdxc/u/state";
|
|
6
7
|
import { attrs } from "remix/component";
|
|
@@ -189,7 +190,7 @@ RangeCalendar.GridBody = Calendar.GridBody;
|
|
|
189
190
|
RangeCalendar.Cell = function RangeCalendarCell(handle) {
|
|
190
191
|
return () => {
|
|
191
192
|
let { mix, ...rest } = handle.props;
|
|
192
|
-
return (_jsx(Calendar.Cell, { ...rest, mix: [
|
|
193
|
+
return (_jsx(Calendar.Cell, { ...rest, mix: mergeMix([
|
|
193
194
|
/**
|
|
194
195
|
* A day is the range's opening, its closing, both at once, or one of the days
|
|
195
196
|
* between. The four are written under selectors that match one apiece, so each
|
|
@@ -226,7 +227,6 @@ RangeCalendar.Cell = function RangeCalendarCell(handle) {
|
|
|
226
227
|
roundedCorner("end-start", "none"),
|
|
227
228
|
roundedCorner("end-end", "none"),
|
|
228
229
|
]),
|
|
229
|
-
|
|
230
|
-
] }));
|
|
230
|
+
], mix) }));
|
|
231
231
|
};
|
|
232
232
|
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A `<time>` that reads "2m ago" for the last week and a date after it, with the absolute local
|
|
3
|
+
* time and UTC in its title. The server renders it from an explicit `now` and zone, and an
|
|
4
|
+
* optional island rewrites it in the viewer's own zone, the one thing a server cannot know.
|
|
5
|
+
*
|
|
6
|
+
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
7
|
+
* @copyright Sergio Xalambrí 2026
|
|
8
|
+
*/
|
|
9
|
+
import type { EntryComponent, Handle, Props as TagProps } from "remix/component";
|
|
10
|
+
import type { RelativeTimeFormat } from "../utils/relative-time.js";
|
|
11
|
+
export { formatRelativeTime } from "../utils/relative-time.js";
|
|
12
|
+
/**
|
|
13
|
+
* Prop types for {@link RelativeTime} and its island.
|
|
14
|
+
*/
|
|
15
|
+
export declare namespace RelativeTime {
|
|
16
|
+
/** A moment as a `Date`, an ISO 8601 string or epoch milliseconds. */
|
|
17
|
+
type DateInput = RelativeTimeFormat.DateInput;
|
|
18
|
+
/**
|
|
19
|
+
* Every native `<time>` attribute but `dateTime`, which the component writes, plus the
|
|
20
|
+
* moment and how to format it.
|
|
21
|
+
*/
|
|
22
|
+
interface Props extends Omit<TagProps<"time">, "dateTime" | "children"> {
|
|
23
|
+
/** The moment to show. */
|
|
24
|
+
date: DateInput;
|
|
25
|
+
/** The reference moment; pass the request's time so server and tests render the same text. */
|
|
26
|
+
now?: DateInput;
|
|
27
|
+
/** BCP 47 locale for the text and the title. */
|
|
28
|
+
locale?: string;
|
|
29
|
+
/** IANA zone the server formats in. Defaults to UTC. */
|
|
30
|
+
timeZone?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Hydrates the {@link RelativeTimeLocal} island, which rewrites the date and title in the
|
|
33
|
+
* viewer's zone and locale, counting from `now` when given and their clock otherwise.
|
|
34
|
+
* Needs `@sdxc/ui/relative-time#RelativeTimeLocal` in the app's browser entry.
|
|
35
|
+
*/
|
|
36
|
+
local?: boolean;
|
|
37
|
+
}
|
|
38
|
+
/** Props {@link RelativeTimeLocal} serializes for hydration, so they stay plain JSON. */
|
|
39
|
+
type LocalProps = {
|
|
40
|
+
/** The moment, as an ISO 8601 string or epoch milliseconds. */
|
|
41
|
+
date: string | number;
|
|
42
|
+
/** The reference moment the text counts from; unset counts from the viewer's clock. */
|
|
43
|
+
now?: string | number;
|
|
44
|
+
/** BCP 47 locale for the text and the title. */
|
|
45
|
+
locale?: string;
|
|
46
|
+
/** IANA zone the server rendered in. */
|
|
47
|
+
timeZone?: string;
|
|
48
|
+
/** Accessible description, passed through to the `<time>`. */
|
|
49
|
+
"aria-label"?: string;
|
|
50
|
+
/** Element id, passed through to the `<time>`. */
|
|
51
|
+
id?: string;
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Renders the moment as `<time datetime>` with its text and absolute title. With `local` it
|
|
56
|
+
* hands the same props to {@link RelativeTimeLocal}, so the server HTML is identical and the
|
|
57
|
+
* viewer's zone replaces the server's once the island hydrates.
|
|
58
|
+
*
|
|
59
|
+
* @param handle Runtime handle carrying the `<time>`'s props.
|
|
60
|
+
* @returns The render function producing the element.
|
|
61
|
+
* @example <RelativeTime date={check.at} now={ctx.requestTime} locale={locale} />
|
|
62
|
+
* @example <RelativeTime date={deploy.createdAt} now={now} locale={locale} local />
|
|
63
|
+
*/
|
|
64
|
+
export declare function RelativeTime(handle: Handle<RelativeTime.Props>): () => import("remix/component").RemixElement;
|
|
65
|
+
/**
|
|
66
|
+
* Client island behind {@link RelativeTime}'s `local` prop: the same `<time>` the server renders,
|
|
67
|
+
* rewritten in the viewer's zone on hydration, still counting from `now` when one is given.
|
|
68
|
+
* Until the island loads the server's text stands, so the moment is always readable.
|
|
69
|
+
*
|
|
70
|
+
* @example <RelativeTimeLocal date="2026-10-30T14:00:00Z" locale="en" />
|
|
71
|
+
*/
|
|
72
|
+
export declare const RelativeTimeLocal: EntryComponent<RelativeTime.LocalProps>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { jsx as _jsx } from "remix/component/jsx-runtime";
|
|
2
|
+
import { mergeMix } from "@sdxc/u/general";
|
|
3
|
+
import { tabularNums } from "@sdxc/u/typography";
|
|
4
|
+
import { clientEntry } from "remix/component";
|
|
5
|
+
import { viewerTime } from "../mixins/viewer-time.js";
|
|
6
|
+
import { formatRelativeTime } from "../utils/relative-time.js";
|
|
7
|
+
export { formatRelativeTime } from "../utils/relative-time.js";
|
|
8
|
+
/**
|
|
9
|
+
* Renders the moment as `<time datetime>` with its text and absolute title. With `local` it
|
|
10
|
+
* hands the same props to {@link RelativeTimeLocal}, so the server HTML is identical and the
|
|
11
|
+
* viewer's zone replaces the server's once the island hydrates.
|
|
12
|
+
*
|
|
13
|
+
* @param handle Runtime handle carrying the `<time>`'s props.
|
|
14
|
+
* @returns The render function producing the element.
|
|
15
|
+
* @example <RelativeTime date={check.at} now={ctx.requestTime} locale={locale} />
|
|
16
|
+
* @example <RelativeTime date={deploy.createdAt} now={now} locale={locale} local />
|
|
17
|
+
*/
|
|
18
|
+
export function RelativeTime(handle) {
|
|
19
|
+
return () => {
|
|
20
|
+
let { date, now, locale, timeZone, local, mix, ...rest } = handle.props;
|
|
21
|
+
if (local) {
|
|
22
|
+
return (_jsx(RelativeTimeLocal, { date: serializable(date), now: now === undefined ? undefined : serializable(now), locale: locale, timeZone: timeZone, "aria-label": rest["aria-label"], id: rest.id }));
|
|
23
|
+
}
|
|
24
|
+
let formatted = formatRelativeTime(date, { now, locale, timeZone });
|
|
25
|
+
return (_jsx("time", { title: formatted.title || undefined, ...rest, dateTime: formatted.dateTime || undefined, "data-slot": "relative-time", mix: mergeMix(tabularNums(), mix), children: formatted.text }));
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
/** Turns a `Date` into its ISO string so an island prop survives serialization. */
|
|
29
|
+
function serializable(value) {
|
|
30
|
+
return value instanceof Date ? value.toISOString() : value;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Client island behind {@link RelativeTime}'s `local` prop: the same `<time>` the server renders,
|
|
34
|
+
* rewritten in the viewer's zone on hydration, still counting from `now` when one is given.
|
|
35
|
+
* Until the island loads the server's text stands, so the moment is always readable.
|
|
36
|
+
*
|
|
37
|
+
* @example <RelativeTimeLocal date="2026-10-30T14:00:00Z" locale="en" />
|
|
38
|
+
*/
|
|
39
|
+
export const RelativeTimeLocal = clientEntry("@sdxc/ui/relative-time#RelativeTimeLocal", function RelativeTimeLocal(handle) {
|
|
40
|
+
return () => {
|
|
41
|
+
let { date, now, locale, timeZone, ...rest } = handle.props;
|
|
42
|
+
let formatted = formatRelativeTime(date, { now, locale, timeZone });
|
|
43
|
+
return (_jsx("time", { ...rest, title: formatted.title || undefined, dateTime: formatted.dateTime || undefined, "data-slot": "relative-time", mix: [tabularNums(), viewerTime(locale, now)], children: formatted.text }));
|
|
44
|
+
};
|
|
45
|
+
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "remix/component/jsx-runtime";
|
|
2
2
|
import { bg, border, outline } from "@sdxc/u/color";
|
|
3
3
|
import { rounded } from "@sdxc/u/effects";
|
|
4
|
-
import { raw } from "@sdxc/u/general";
|
|
4
|
+
import { raw, mergeMix } from "@sdxc/u/general";
|
|
5
5
|
import { relative } from "@sdxc/u/layout";
|
|
6
6
|
import { overflow } from "@sdxc/u/overflow";
|
|
7
7
|
import { media } from "@sdxc/u/responsive";
|
|
@@ -37,7 +37,7 @@ const DEFAULT_ORIENTATION = "vertical";
|
|
|
37
37
|
export function ScrollArea(handle) {
|
|
38
38
|
return () => {
|
|
39
39
|
let { mix, ...rest } = handle.props;
|
|
40
|
-
return _jsx("div", { ...rest, "data-slot": "scroll-area", mix: [panelChrome(), relative(), mix
|
|
40
|
+
return (_jsx("div", { ...rest, "data-slot": "scroll-area", mix: mergeMix([panelChrome(), relative()], mix) }));
|
|
41
41
|
};
|
|
42
42
|
}
|
|
43
43
|
/**
|
|
@@ -60,7 +60,7 @@ ScrollArea.Viewport = function ScrollAreaViewport(handle) {
|
|
|
60
60
|
return () => {
|
|
61
61
|
let { orientation, mix, ...rest } = handle.props;
|
|
62
62
|
let resolvedOrientation = orientation ?? DEFAULT_ORIENTATION;
|
|
63
|
-
return (_jsx("div", { ...rest, "data-orientation": resolvedOrientation, "data-slot": "viewport", mix: [
|
|
63
|
+
return (_jsx("div", { ...rest, "data-orientation": resolvedOrientation, "data-slot": "viewport", mix: mergeMix([
|
|
64
64
|
attrs({ tabIndex: DEFAULT_TAB_INDEX }),
|
|
65
65
|
when("&:focus-visible", outline({ color: "brand.ring", offset: 2 })),
|
|
66
66
|
is("full"),
|
|
@@ -83,7 +83,6 @@ ScrollArea.Viewport = function ScrollAreaViewport(handle) {
|
|
|
83
83
|
hover(bg("neutral.strong")),
|
|
84
84
|
]),
|
|
85
85
|
media("(prefers-reduced-motion: reduce)", raw({ scrollBehavior: "auto" })),
|
|
86
|
-
|
|
87
|
-
] }));
|
|
86
|
+
], mix) }));
|
|
88
87
|
};
|
|
89
88
|
};
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "remix/component/jsx-runtime";
|
|
|
2
2
|
import { SearchIcon, XIcon } from "@sdxc/icons";
|
|
3
3
|
import { fg } from "@sdxc/u/color";
|
|
4
4
|
import { rounded } from "@sdxc/u/effects";
|
|
5
|
-
import { pointerEvents } from "@sdxc/u/general";
|
|
5
|
+
import { pointerEvents, mergeMix } from "@sdxc/u/general";
|
|
6
6
|
import { absolute, appearance, flex, grow, hidden, insBs, insIe, insIs, items, relative, } from "@sdxc/u/layout";
|
|
7
7
|
import { bs, is, p, pis } from "@sdxc/u/size";
|
|
8
8
|
import { when } from "@sdxc/u/state";
|
|
@@ -31,7 +31,7 @@ import { Input } from "./input.js";
|
|
|
31
31
|
export function SearchField(handle) {
|
|
32
32
|
return () => {
|
|
33
33
|
let { mix, ...rest } = handle.props;
|
|
34
|
-
return _jsx("search", { ...rest, "data-slot": "search-field", mix:
|
|
34
|
+
return _jsx("search", { ...rest, "data-slot": "search-field", mix: mergeMix(fieldStackLayout(), mix) });
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
37
|
/**
|
|
@@ -53,7 +53,7 @@ export function SearchField(handle) {
|
|
|
53
53
|
SearchField.Input = function SearchFieldInput(handle) {
|
|
54
54
|
return () => {
|
|
55
55
|
let { mix, ...rest } = handle.props;
|
|
56
|
-
return (_jsxs("div", { "data-slot": "input-wrapper", mix: [relative(), flex(), items("center")], children: [_jsx(SearchIcon, { size: 16, "data-slot": "icon", mix: [absolute(), insIs("0.75rem"), pointerEvents(), fg("neutral.muted")] }), _jsx(Input, { type: "search", ...rest, mix: [
|
|
56
|
+
return (_jsxs("div", { "data-slot": "input-wrapper", mix: [relative(), flex(), items("center")], children: [_jsx(SearchIcon, { size: 16, "data-slot": "icon", mix: [absolute(), insIs("0.75rem"), pointerEvents(), fg("neutral.muted")] }), _jsx(Input, { type: "search", ...rest, mix: mergeMix([
|
|
57
57
|
pis("2.25rem"),
|
|
58
58
|
/**
|
|
59
59
|
* {@link SearchField.Clear} draws the clear affordance, so the one the user agent draws
|
|
@@ -61,8 +61,7 @@ SearchField.Input = function SearchFieldInput(handle) {
|
|
|
61
61
|
*/
|
|
62
62
|
when("&::-webkit-search-cancel-button", [appearance("none"), hidden()]),
|
|
63
63
|
when("&::-webkit-search-decoration", [appearance("none"), hidden()]),
|
|
64
|
-
|
|
65
|
-
] })] }));
|
|
64
|
+
], mix) })] }));
|
|
66
65
|
};
|
|
67
66
|
};
|
|
68
67
|
/**
|
|
@@ -81,7 +80,7 @@ SearchField.Input = function SearchFieldInput(handle) {
|
|
|
81
80
|
SearchField.Control = function SearchFieldControl(handle) {
|
|
82
81
|
return () => {
|
|
83
82
|
let { mix, ...rest } = handle.props;
|
|
84
|
-
return (_jsx("div", { ...rest, "data-slot": "control", mix: [
|
|
83
|
+
return (_jsx("div", { ...rest, "data-slot": "control", mix: mergeMix([
|
|
85
84
|
relative(),
|
|
86
85
|
flex(),
|
|
87
86
|
items("center"),
|
|
@@ -89,8 +88,7 @@ SearchField.Control = function SearchFieldControl(handle) {
|
|
|
89
88
|
* The input spans the row, so the field keeps the width its container offers.
|
|
90
89
|
*/
|
|
91
90
|
when('& > [data-slot="input-wrapper"]', grow()),
|
|
92
|
-
|
|
93
|
-
] }));
|
|
91
|
+
], mix) }));
|
|
94
92
|
};
|
|
95
93
|
};
|
|
96
94
|
/**
|
|
@@ -108,7 +106,7 @@ SearchField.Control = function SearchFieldControl(handle) {
|
|
|
108
106
|
SearchField.Clear = function SearchFieldClear(handle) {
|
|
109
107
|
return () => {
|
|
110
108
|
let { children, mix, ...rest } = handle.props;
|
|
111
|
-
return (_jsx(Button, { type: "button", ...rest, hidden: true, variant: "ghost", size: "sm", command: SEARCH_FIELD_CLEAR_COMMAND, "data-slot": "clear", mix: [
|
|
109
|
+
return (_jsx(Button, { type: "button", ...rest, hidden: true, variant: "ghost", size: "sm", command: SEARCH_FIELD_CLEAR_COMMAND, "data-slot": "clear", mix: mergeMix([
|
|
112
110
|
clearField(),
|
|
113
111
|
/**
|
|
114
112
|
* A round, icon-sized target centred on the field, so its hover tint reads as a
|
|
@@ -123,7 +121,6 @@ SearchField.Clear = function SearchFieldClear(handle) {
|
|
|
123
121
|
insIe("0.375rem"),
|
|
124
122
|
insBs("50%"),
|
|
125
123
|
translateY("-50%"),
|
|
126
|
-
|
|
127
|
-
], children: children ?? _jsx(XIcon, { size: 16 }) }));
|
|
124
|
+
], mix), children: children ?? _jsx(XIcon, { size: 16 }) }));
|
|
128
125
|
};
|
|
129
126
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "remix/component/jsx-runtime";
|
|
2
|
+
import { mergeMix } from "@sdxc/u/general";
|
|
2
3
|
import { pb } from "@sdxc/u/size";
|
|
3
4
|
/**
|
|
4
5
|
* Renders its children inside a `<section>` element with small block-axis
|
|
@@ -17,6 +18,6 @@ import { pb } from "@sdxc/u/size";
|
|
|
17
18
|
export function Section(handle) {
|
|
18
19
|
return () => {
|
|
19
20
|
let { mix, ...rest } = handle.props;
|
|
20
|
-
return _jsx("section", { ...rest, mix:
|
|
21
|
+
return _jsx("section", { ...rest, mix: mergeMix(pb("0.25rem"), mix) });
|
|
21
22
|
};
|
|
22
23
|
}
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "remix/compone
|
|
|
2
2
|
import { ChevronDownIcon } from "@sdxc/icons";
|
|
3
3
|
import { bg, border, borderEdge, fg, outline, outlineStyle, outlineWidth } from "@sdxc/u/color";
|
|
4
4
|
import { opacity, rounded, transition, transitionBehavior, transitionDuration, } from "@sdxc/u/effects";
|
|
5
|
-
import { cursor, raw } from "@sdxc/u/general";
|
|
5
|
+
import { cursor, raw, mergeMix } from "@sdxc/u/general";
|
|
6
6
|
import { appearance, basis, flex, gap, grow, inlineFlex, inset, items, justify, shrink, } from "@sdxc/u/layout";
|
|
7
7
|
import { overflow } from "@sdxc/u/overflow";
|
|
8
8
|
import { media, startingStyle } from "@sdxc/u/responsive";
|
|
@@ -56,7 +56,7 @@ export function Select(handle) {
|
|
|
56
56
|
if (import.meta.env?.DEV && (multiple || (typeof size === "number" && size > 1))) {
|
|
57
57
|
console.warn("Select: `appearance: base-select` styling has no effect on a `multiple` select or one with a `size` greater than 1 — the browser keeps its plain list-box rendering there instead of the customized trigger, value, and option styling.");
|
|
58
58
|
}
|
|
59
|
-
let fieldMix = [
|
|
59
|
+
let fieldMix = mergeMix([
|
|
60
60
|
flex(),
|
|
61
61
|
items("center"),
|
|
62
62
|
justify("between"),
|
|
@@ -138,8 +138,7 @@ export function Select(handle) {
|
|
|
138
138
|
color: "var(--ui-neutral-fg-muted)",
|
|
139
139
|
},
|
|
140
140
|
}),
|
|
141
|
-
|
|
142
|
-
];
|
|
141
|
+
], mix);
|
|
143
142
|
return (_jsx("select", { multiple: multiple, size: size, "data-color": resolvedColor, ...rest, mix: fieldMix }));
|
|
144
143
|
};
|
|
145
144
|
}
|
|
@@ -160,7 +159,7 @@ export function Select(handle) {
|
|
|
160
159
|
Select.Trigger = function SelectTrigger(handle) {
|
|
161
160
|
return () => {
|
|
162
161
|
let { type, children, mix, ...rest } = handle.props;
|
|
163
|
-
return (_jsx("button", { type: type ?? DEFAULT_TRIGGER_TYPE, ...rest, mix: [
|
|
162
|
+
return (_jsx("button", { type: type ?? DEFAULT_TRIGGER_TYPE, ...rest, mix: mergeMix([
|
|
164
163
|
flex(),
|
|
165
164
|
items("center"),
|
|
166
165
|
justify("between"),
|
|
@@ -175,8 +174,7 @@ Select.Trigger = function SelectTrigger(handle) {
|
|
|
175
174
|
raw({ font: "inherit" }),
|
|
176
175
|
textAlign("start"),
|
|
177
176
|
cursor("inherit"),
|
|
178
|
-
|
|
179
|
-
], children: children ?? (_jsxs(_Fragment, { children: [_jsx(Select.Value, {}), _jsx("span", { "data-slot": "icon", mix: [
|
|
177
|
+
], mix), children: children ?? (_jsxs(_Fragment, { children: [_jsx(Select.Value, {}), _jsx("span", { "data-slot": "icon", mix: [
|
|
180
178
|
attrs({ "aria-hidden": DEFAULT_ICON_ARIA_HIDDEN }),
|
|
181
179
|
inlineFlex(),
|
|
182
180
|
shrink(),
|
|
@@ -202,15 +200,7 @@ Select.Trigger = function SelectTrigger(handle) {
|
|
|
202
200
|
Select.Value = function SelectValue(handle) {
|
|
203
201
|
return () => {
|
|
204
202
|
let { mix, ...rest } = handle.props;
|
|
205
|
-
return (_jsx("selectedcontent", { ...rest, mix: [
|
|
206
|
-
mirrorSelectedOption(),
|
|
207
|
-
grow(),
|
|
208
|
-
shrink(1),
|
|
209
|
-
basis("0%"),
|
|
210
|
-
truncate(),
|
|
211
|
-
textAlign("start"),
|
|
212
|
-
mix,
|
|
213
|
-
] }));
|
|
203
|
+
return (_jsx("selectedcontent", { ...rest, mix: mergeMix([mirrorSelectedOption(), grow(), shrink(1), basis("0%"), truncate(), textAlign("start")], mix) }));
|
|
214
204
|
};
|
|
215
205
|
};
|
|
216
206
|
/**
|
|
@@ -228,7 +218,7 @@ Select.Value = function SelectValue(handle) {
|
|
|
228
218
|
Select.Option = function SelectOption(handle) {
|
|
229
219
|
return () => {
|
|
230
220
|
let { mix, ...rest } = handle.props;
|
|
231
|
-
return (_jsx("option", { ...rest, mix: [
|
|
221
|
+
return (_jsx("option", { ...rest, mix: mergeMix([
|
|
232
222
|
cursor("default"),
|
|
233
223
|
pi("0.75rem"),
|
|
234
224
|
pb("0.5rem"),
|
|
@@ -243,8 +233,7 @@ Select.Option = function SelectOption(handle) {
|
|
|
243
233
|
when("&:active", bg("neutral.bg-tint-pressed")),
|
|
244
234
|
when("&:focus", bg("brand.tint")),
|
|
245
235
|
when("&:checked", [bg("brand.solid"), fg("brand.onSolid")]),
|
|
246
|
-
|
|
247
|
-
] }));
|
|
236
|
+
], mix) }));
|
|
248
237
|
};
|
|
249
238
|
};
|
|
250
239
|
/**
|
|
@@ -266,11 +255,10 @@ Select.Group = function SelectGroup(handle) {
|
|
|
266
255
|
if (import.meta.env?.DEV && !rest.label) {
|
|
267
256
|
console.warn("Select.Group: an `optgroup` with no `label` renders with no visible heading for its options — pass a `label` describing the group.");
|
|
268
257
|
}
|
|
269
|
-
return (_jsx("optgroup", { ...rest, mix: [
|
|
258
|
+
return (_jsx("optgroup", { ...rest, mix: mergeMix([
|
|
270
259
|
when("&:not(:first-child)", borderEdge("block-start", { width: 1 })),
|
|
271
260
|
pb("0.25rem"),
|
|
272
261
|
when("&:not(:first-child)", border("neutral")),
|
|
273
|
-
|
|
274
|
-
] }));
|
|
262
|
+
], mix) }));
|
|
275
263
|
};
|
|
276
264
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "remix/component/jsx-runtime";
|
|
2
2
|
import { fg } from "@sdxc/u/color";
|
|
3
3
|
import { visibility } from "@sdxc/u/effects";
|
|
4
|
+
import { mergeMix } from "@sdxc/u/general";
|
|
4
5
|
import { bs, is } from "@sdxc/u/size";
|
|
5
6
|
import { when } from "@sdxc/u/state";
|
|
6
7
|
import { attrs } from "remix/component";
|
|
@@ -36,7 +37,7 @@ const DEFAULT_ARIA_HIDDEN = "true";
|
|
|
36
37
|
export function SelectionIndicator(handle) {
|
|
37
38
|
return () => {
|
|
38
39
|
let { mix, ...rest } = handle.props;
|
|
39
|
-
return (_jsx("div", { ...rest, mix: [
|
|
40
|
+
return (_jsx("div", { ...rest, mix: mergeMix([
|
|
40
41
|
attrs({ "aria-hidden": DEFAULT_ARIA_HIDDEN }),
|
|
41
42
|
is("var(--ui-selection-indicator-size, 1rem)"),
|
|
42
43
|
bs("var(--ui-selection-indicator-size, 1rem)"),
|
|
@@ -44,7 +45,6 @@ export function SelectionIndicator(handle) {
|
|
|
44
45
|
visibility("hidden"),
|
|
45
46
|
when('&[aria-selected="true"]', visibility()),
|
|
46
47
|
when('&[aria-current]:not([aria-current="false"])', visibility()),
|
|
47
|
-
|
|
48
|
-
] }));
|
|
48
|
+
], mix) }));
|
|
49
49
|
};
|
|
50
50
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "remix/component/jsx-runtime";
|
|
2
2
|
import { fg } from "@sdxc/u/color";
|
|
3
|
+
import { mergeMix } from "@sdxc/u/general";
|
|
3
4
|
import { flex, items, justify } from "@sdxc/u/layout";
|
|
4
5
|
import { pb } from "@sdxc/u/size";
|
|
5
6
|
import { text } from "@sdxc/u/typography";
|
|
@@ -16,14 +17,13 @@ import { text } from "@sdxc/u/typography";
|
|
|
16
17
|
export function SentinelRow(handle) {
|
|
17
18
|
return () => {
|
|
18
19
|
let { mix, ...rest } = handle.props;
|
|
19
|
-
return (_jsx("div", { ...rest, mix: [
|
|
20
|
+
return (_jsx("div", { ...rest, mix: mergeMix([
|
|
20
21
|
flex(),
|
|
21
22
|
items("center"),
|
|
22
23
|
justify("center"),
|
|
23
24
|
text("sm"),
|
|
24
25
|
pb("0.5rem"),
|
|
25
26
|
fg("neutral.muted"),
|
|
26
|
-
|
|
27
|
-
] }));
|
|
27
|
+
], mix) }));
|
|
28
28
|
};
|
|
29
29
|
}
|