@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,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The raised fill a `surface` button or link draws: the surface token, the emphasis ink
|
|
3
|
+
* and the tactile control edge. Inside an inverse or brand band those tokens are
|
|
4
|
+
* re-pointed at the fill's foreground, so the same control turns translucent there.
|
|
5
|
+
*
|
|
6
|
+
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
7
|
+
* @copyright Sergio Xalambrí 2026
|
|
8
|
+
*/
|
|
9
|
+
import { combine, raw } from "@sdxc/u/general";
|
|
10
|
+
import { when } from "@sdxc/u/state";
|
|
11
|
+
/**
|
|
12
|
+
* Paints a control as a raised surface with a transparent border, so it keeps the
|
|
13
|
+
* footprint of its solid and outline siblings, and darkens the fill a step on hover.
|
|
14
|
+
*
|
|
15
|
+
* @returns A `css()` mixin ready for a control's `mix` prop.
|
|
16
|
+
* @example
|
|
17
|
+
* <button mix={[when('&[data-variant="surface"]', surfaceControl())]}>{label}</button>;
|
|
18
|
+
*/
|
|
19
|
+
export function surfaceControl() {
|
|
20
|
+
return combine([
|
|
21
|
+
raw({
|
|
22
|
+
backgroundColor: "var(--ui-surface-raised, Canvas)",
|
|
23
|
+
borderColor: "transparent",
|
|
24
|
+
color: "var(--ui-neutral-fg-emphasis)",
|
|
25
|
+
boxShadow: "var(--ui-shadow-control, 0 0 0 1px rgb(0 0 0 / 0.08))",
|
|
26
|
+
}),
|
|
27
|
+
when("&:hover", raw({
|
|
28
|
+
backgroundColor: "color-mix(in oklch, var(--ui-surface-raised, Canvas), var(--ui-neutral-fg-emphasis) 6%)",
|
|
29
|
+
})),
|
|
30
|
+
]);
|
|
31
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tables the table's browser tests mount, on a hovering pointer and on touch: monitors, long
|
|
3
|
+
* posts and articles with row actions, and the measurements those tests share, so both test
|
|
4
|
+
* files assert against the same rows.
|
|
5
|
+
*
|
|
6
|
+
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
7
|
+
* @copyright Sergio Xalambrí 2026
|
|
8
|
+
*/
|
|
9
|
+
import { Table } from "../app/table.js";
|
|
10
|
+
/** One monitor row, enough columns to overflow a phone. */
|
|
11
|
+
export interface Monitor {
|
|
12
|
+
id: string;
|
|
13
|
+
name: string;
|
|
14
|
+
region: string;
|
|
15
|
+
ms: number;
|
|
16
|
+
}
|
|
17
|
+
/** Twelve monitors, enough rows to scroll a container and overflow a phone. */
|
|
18
|
+
export declare const MONITORS: Monitor[];
|
|
19
|
+
/** Mounts `node` in a host `width` pixels wide and returns the host. */
|
|
20
|
+
export declare function mount(node: JSX.Element, width?: number): HTMLElement;
|
|
21
|
+
/** A monitors table with selection, a row link and actions, in a container `height` tall. */
|
|
22
|
+
export declare function monitors(props?: Partial<Table.Props>, height?: number): JSX.Element;
|
|
23
|
+
/** A post with a title long enough to squeeze every other column. */
|
|
24
|
+
export interface Post {
|
|
25
|
+
id: string;
|
|
26
|
+
title: string;
|
|
27
|
+
excerpt: string;
|
|
28
|
+
}
|
|
29
|
+
/** Four posts whose long titles and excerpts squeeze the actions column. */
|
|
30
|
+
export declare const POSTS: Post[];
|
|
31
|
+
/** Labels of the three row actions every post carries. */
|
|
32
|
+
export declare const ACTIONS: string[];
|
|
33
|
+
/**
|
|
34
|
+
* A comfortable posts table whose title and excerpt compete with the actions for width. With
|
|
35
|
+
* `links`, the actions are plain ghost link buttons; otherwise they are `Table.Action`s that
|
|
36
|
+
* fold into a menu named "More actions".
|
|
37
|
+
*/
|
|
38
|
+
export declare function posts(options?: {
|
|
39
|
+
links?: boolean;
|
|
40
|
+
actions?: string[];
|
|
41
|
+
noActions?: boolean;
|
|
42
|
+
date?: boolean;
|
|
43
|
+
}): JSX.Element;
|
|
44
|
+
/** Number of line boxes the text of `element` lays out in. */
|
|
45
|
+
export declare function lineBoxes(element: Element): number;
|
|
46
|
+
/** Asserts every action label in `host` sits on one line and its cell hugs the actions. */
|
|
47
|
+
export declare function expectOneLineActions(host: HTMLElement, labels?: string[]): void;
|
|
48
|
+
/** Four row actions, enough to crowd the visible columns if their cell reserved their width. */
|
|
49
|
+
export declare const MANY_ACTIONS: string[];
|
|
50
|
+
/** Labels of the overlay's three actions: two ghost links and a danger `Table.Action`. */
|
|
51
|
+
export declare const OVERLAY_ACTIONS: string[];
|
|
52
|
+
/**
|
|
53
|
+
* A four-column articles table whose last data cell is a "Published" status, with the three
|
|
54
|
+
* actions an articles list carries: ghost link buttons and a danger `Table.Action`, or with
|
|
55
|
+
* `actions`, three `Table.Action`s under an `overflowLabel`.
|
|
56
|
+
*/
|
|
57
|
+
export declare function articles(options?: {
|
|
58
|
+
actions?: boolean;
|
|
59
|
+
}): JSX.Element;
|
|
60
|
+
/** The controls inside `root` that lay out a box. */
|
|
61
|
+
export declare function shown(root: Element): HTMLElement[];
|
|
62
|
+
/** Accessible name `control` takes from `aria-label`, else from the elements `aria-labelledby` names. */
|
|
63
|
+
export declare function accessibleName(control: HTMLElement): string;
|
|
64
|
+
/** Whether two boxes share any area. */
|
|
65
|
+
export declare function intersects(a: DOMRect, b: DOMRect): boolean;
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "remix/component/jsx-runtime";
|
|
2
|
+
import { render } from "remix/component/test";
|
|
3
|
+
import { expect } from "vitest";
|
|
4
|
+
import { Table } from "../app/table.js";
|
|
5
|
+
import { LinkButton } from "../components/link-button.js";
|
|
6
|
+
/** Twelve monitors, enough rows to scroll a container and overflow a phone. */
|
|
7
|
+
export const MONITORS = Array.from({ length: 12 }, (_, index) => ({
|
|
8
|
+
id: `mon_${index}`,
|
|
9
|
+
name: `api-${index}.example.com`,
|
|
10
|
+
region: "Frankfurt, Germany",
|
|
11
|
+
ms: 100 + index * 7,
|
|
12
|
+
}));
|
|
13
|
+
/** Mounts `node` in a host `width` pixels wide and returns the host. */
|
|
14
|
+
export function mount(node, width = 720) {
|
|
15
|
+
let host = document.createElement("div");
|
|
16
|
+
host.style.width = `${width}px`;
|
|
17
|
+
document.body.appendChild(host);
|
|
18
|
+
render(node, { container: host });
|
|
19
|
+
return host;
|
|
20
|
+
}
|
|
21
|
+
/** A monitors table with selection, a row link and actions, in a container `height` tall. */
|
|
22
|
+
export function monitors(props = {}, height) {
|
|
23
|
+
return (_jsx(Table.Container, { mix: [], style: height ? { maxHeight: `${height}px` } : undefined, children: _jsxs(Table, { "aria-label": "Monitors", ...props, children: [_jsx(Table.Header, { children: _jsxs(Table.Row, { children: [_jsx(Table.SelectAll, { label: "Select all monitors" }), _jsx(Table.Column, { children: "Name" }), _jsx(Table.Column, { children: "Region" }), _jsx(Table.Column, { numeric: true, children: "Response" }), _jsx(Table.ActionsColumn, { label: "Actions" })] }) }), _jsx(Table.Body, { children: MONITORS.map((monitor) => (_jsxs(Table.Row, { children: [_jsx(Table.Select, { name: "monitor", value: monitor.id, label: `Select ${monitor.name}` }), _jsx(Table.Cell, { children: _jsx(Table.RowLink, { href: `#${monitor.id}`, children: monitor.name }) }), _jsx(Table.Cell, { children: monitor.region }), _jsx(Table.NumberCell, { value: monitor.ms, locale: "en", format: { style: "unit", unit: "millisecond" } }), _jsxs(Table.Actions, { children: [_jsx("button", { type: "button", children: "Pause" }), _jsx("button", { type: "button", children: "Delete" })] })] }, monitor.id))) })] }) }));
|
|
24
|
+
}
|
|
25
|
+
/** Four posts whose long titles and excerpts squeeze the actions column. */
|
|
26
|
+
export const POSTS = Array.from({ length: 4 }, (_, index) => ({
|
|
27
|
+
id: `post_${index}`,
|
|
28
|
+
title: `Designing a publishing workflow that survives a newsroom deadline, part ${index + 1}`,
|
|
29
|
+
excerpt: "How a small editorial team drafts, reviews, schedules and corrects stories without stepping on each other.",
|
|
30
|
+
}));
|
|
31
|
+
/** Labels of the three row actions every post carries. */
|
|
32
|
+
export const ACTIONS = ["Edit", "Quick edit", "View"];
|
|
33
|
+
/**
|
|
34
|
+
* One post's actions cell: plain ghost link buttons with `links`, else `Table.Action`s that fold
|
|
35
|
+
* into a menu named "More actions".
|
|
36
|
+
*/
|
|
37
|
+
function PostActions(handle) {
|
|
38
|
+
return () => {
|
|
39
|
+
let { id, labels, links } = handle.props;
|
|
40
|
+
if (links) {
|
|
41
|
+
return (_jsx(Table.Actions, { children: labels.map((label) => (_jsx(LinkButton, { href: `#${id}/${label}`, variant: "ghost", color: "neutral", size: "sm", children: label }, label))) }));
|
|
42
|
+
}
|
|
43
|
+
return (_jsx(Table.Actions, { overflowLabel: "More actions", children: labels.map((label) => (_jsx(Table.Action, { href: `#${id}/${label}`, children: label }, label))) }));
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* A comfortable posts table whose title and excerpt compete with the actions for width. With
|
|
48
|
+
* `links`, the actions are plain ghost link buttons; otherwise they are `Table.Action`s that
|
|
49
|
+
* fold into a menu named "More actions".
|
|
50
|
+
*/
|
|
51
|
+
export function posts(options = {}) {
|
|
52
|
+
let actions = options.actions ?? ACTIONS;
|
|
53
|
+
return (_jsx(Table.Container, { children: _jsxs(Table, { "aria-label": "Posts", density: "comfortable", children: [_jsx(Table.Header, { children: _jsxs(Table.Row, { children: [_jsx(Table.SelectAll, { label: "Select all posts" }), _jsx(Table.Column, { children: "Title" }), _jsx(Table.Column, { children: "Excerpt" }), _jsx(Table.Column, { children: "Status" }), options.date ? _jsx(Table.Column, { children: "Published" }) : null, options.noActions ? null : _jsx(Table.ActionsColumn, { label: "Actions" })] }) }), _jsx(Table.Body, { children: POSTS.map((post) => (_jsxs(Table.Row, { children: [_jsx(Table.Select, { name: "post", value: post.id, label: `Select ${post.title}` }), _jsx(Table.Cell, { children: _jsx(Table.RowLink, { href: `#${post.id}`, children: post.title }) }), _jsx(Table.Cell, { children: post.excerpt }), _jsx(Table.StatusCell, { color: "success", children: "Published" }), options.date ? (_jsx(Table.DateCell, { date: "2026-12-01T12:00:00Z", now: "2026-12-20T12:00:00Z", locale: "en-US", local: true })) : null, options.noActions ? null : (_jsx(PostActions, { id: post.id, labels: actions, links: options.links }))] }, post.id))) })] }) }));
|
|
54
|
+
}
|
|
55
|
+
/** Number of line boxes the text of `element` lays out in. */
|
|
56
|
+
export function lineBoxes(element) {
|
|
57
|
+
let range = document.createRange();
|
|
58
|
+
range.selectNodeContents(element);
|
|
59
|
+
let tops = new Set([...range.getClientRects()].map((rect) => Math.round(rect.top)));
|
|
60
|
+
return tops.size;
|
|
61
|
+
}
|
|
62
|
+
/** Asserts every action label in `host` sits on one line and its cell hugs the actions. */
|
|
63
|
+
export function expectOneLineActions(host, labels = ACTIONS) {
|
|
64
|
+
let cells = [...host.querySelectorAll('tbody [data-slot="row-actions"]')];
|
|
65
|
+
expect(cells).toHaveLength(POSTS.length);
|
|
66
|
+
for (let cell of cells) {
|
|
67
|
+
let actions = [...cell.querySelectorAll("a")].filter((action) => action.getClientRects().length > 0);
|
|
68
|
+
expect(actions.map((action) => action.textContent)).toEqual(labels);
|
|
69
|
+
for (let action of actions)
|
|
70
|
+
expect(lineBoxes(action)).toBe(1);
|
|
71
|
+
let first = actions[0].getBoundingClientRect();
|
|
72
|
+
let last = actions.at(-1).getBoundingClientRect();
|
|
73
|
+
let style = getComputedStyle(cell);
|
|
74
|
+
let padding = parseFloat(style.paddingInlineStart) + parseFloat(style.paddingInlineEnd);
|
|
75
|
+
expect(cell.getBoundingClientRect().width).toBeLessThanOrEqual(last.right - first.left + padding + 1);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
/** Four row actions, enough to crowd the visible columns if their cell reserved their width. */
|
|
79
|
+
export const MANY_ACTIONS = ["Edit", "Quick edit", "View", "Duplicate"];
|
|
80
|
+
/** Labels of the overlay's three actions: two ghost links and a danger `Table.Action`. */
|
|
81
|
+
export const OVERLAY_ACTIONS = ["View", "Post on X", "Delete"];
|
|
82
|
+
/**
|
|
83
|
+
* A four-column articles table whose last data cell is a "Published" status, with the three
|
|
84
|
+
* actions an articles list carries: ghost link buttons and a danger `Table.Action`, or with
|
|
85
|
+
* `actions`, three `Table.Action`s under an `overflowLabel`.
|
|
86
|
+
*/
|
|
87
|
+
export function articles(options = {}) {
|
|
88
|
+
return (_jsx(Table.Container, { children: _jsxs(Table, { "aria-label": "Articles", density: "comfortable", children: [_jsx(Table.Header, { children: _jsxs(Table.Row, { children: [_jsx(Table.Column, { children: "Title" }), _jsx(Table.Column, { children: "Author" }), _jsx(Table.Column, { children: "Status" }), _jsx(Table.ActionsColumn, { label: "Actions" })] }) }), _jsx(Table.Body, { children: POSTS.map((post) => (_jsxs(Table.Row, { children: [_jsx(Table.Cell, { children: _jsx(Table.RowLink, { href: `#${post.id}`, children: post.title }) }), _jsx(Table.Cell, { children: "Sergio" }), _jsx(Table.StatusCell, { color: "success", children: "Published" }), options.actions ? (_jsxs(Table.Actions, { overflowLabel: `More actions for ${post.title}`, children: [_jsx(Table.Action, { href: `#${post.id}/view`, children: OVERLAY_ACTIONS[0] }), _jsx(Table.Action, { href: `#${post.id}/share`, children: OVERLAY_ACTIONS[1] }), _jsx(Table.Action, { danger: true, children: OVERLAY_ACTIONS[2] })] })) : (_jsxs(Table.Actions, { children: [_jsx(LinkButton, { href: `#${post.id}/view`, variant: "ghost", color: "neutral", size: "sm", children: OVERLAY_ACTIONS[0] }), _jsx(LinkButton, { href: `#${post.id}/share`, variant: "ghost", color: "neutral", size: "sm", children: OVERLAY_ACTIONS[1] }), _jsx(Table.Action, { danger: true, children: OVERLAY_ACTIONS[2] })] }))] }, post.id))) })] }) }));
|
|
89
|
+
}
|
|
90
|
+
/** The controls inside `root` that lay out a box. */
|
|
91
|
+
export function shown(root) {
|
|
92
|
+
return [...root.querySelectorAll("a, button")].filter((control) => control.getClientRects().length > 0);
|
|
93
|
+
}
|
|
94
|
+
/** Accessible name `control` takes from `aria-label`, else from the elements `aria-labelledby` names. */
|
|
95
|
+
export function accessibleName(control) {
|
|
96
|
+
let label = control.getAttribute("aria-label");
|
|
97
|
+
if (label)
|
|
98
|
+
return label;
|
|
99
|
+
let ids = control.getAttribute("aria-labelledby")?.split(/\s+/) ?? [];
|
|
100
|
+
return ids
|
|
101
|
+
.map((id) => document.getElementById(id)?.textContent ?? "")
|
|
102
|
+
.join(" ")
|
|
103
|
+
.trim();
|
|
104
|
+
}
|
|
105
|
+
/** Whether two boxes share any area. */
|
|
106
|
+
export function intersects(a, b) {
|
|
107
|
+
return a.left < b.right && b.left < a.right && a.top < b.bottom && b.top < a.bottom;
|
|
108
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The label above a landing headline, shared by band headers, the hero and the
|
|
3
|
+
* announcement chip so every label on a page draws from one set of looks. Given an
|
|
4
|
+
* `href` it renders a link with a trailing arrow that nudges on hover.
|
|
5
|
+
*
|
|
6
|
+
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
7
|
+
* @copyright Sergio Xalambrí 2026
|
|
8
|
+
*/
|
|
9
|
+
import type { Handle, Props as TagProps, RemixNode } from "remix/component";
|
|
10
|
+
import type { LandingEyebrowVariant } from "../styles/landing.js";
|
|
11
|
+
/**
|
|
12
|
+
* Prop types for {@link Eyebrow}.
|
|
13
|
+
*/
|
|
14
|
+
export declare namespace Eyebrow {
|
|
15
|
+
/**
|
|
16
|
+
* Props accepted by {@link Eyebrow}.
|
|
17
|
+
*/
|
|
18
|
+
interface Props {
|
|
19
|
+
/** Which look the label draws. */
|
|
20
|
+
variant: LandingEyebrowVariant | "special";
|
|
21
|
+
/** Turns the label into a link with a trailing arrow. */
|
|
22
|
+
href?: string;
|
|
23
|
+
/** Index a `numbered` label leads with, such as `"01"`. */
|
|
24
|
+
index?: RemixNode;
|
|
25
|
+
/** The `data-slot` the label carries, for hosts that name it after themselves. */
|
|
26
|
+
slot?: string;
|
|
27
|
+
/** Extra styling, applied after the eyebrow look. */
|
|
28
|
+
mix?: TagProps<"span">["mix"];
|
|
29
|
+
/** The label. */
|
|
30
|
+
children: RemixNode;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Renders the label as a `span`, or as an `a` ending in an arrow when `href` is set.
|
|
35
|
+
*
|
|
36
|
+
* @param handle Runtime handle carrying the label's props.
|
|
37
|
+
* @returns The render function producing the label.
|
|
38
|
+
*/
|
|
39
|
+
export declare function Eyebrow(handle: Handle<Eyebrow.Props>): () => import("remix/component").RemixElement;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "remix/component/jsx-runtime";
|
|
2
|
+
import { ArrowRightIcon } from "@sdxc/icons";
|
|
3
|
+
import { mergeMix } from "@sdxc/u/general";
|
|
4
|
+
import { eyebrow } from "../styles/landing.js";
|
|
5
|
+
/**
|
|
6
|
+
* Renders the label as a `span`, or as an `a` ending in an arrow when `href` is set.
|
|
7
|
+
*
|
|
8
|
+
* @param handle Runtime handle carrying the label's props.
|
|
9
|
+
* @returns The render function producing the label.
|
|
10
|
+
*/
|
|
11
|
+
export function Eyebrow(handle) {
|
|
12
|
+
return () => {
|
|
13
|
+
let { children, href, index, mix, slot, variant } = handle.props;
|
|
14
|
+
let resolvedSlot = slot ?? "eyebrow";
|
|
15
|
+
let content = (_jsxs(_Fragment, { children: [index !== undefined ? _jsx("span", { "data-slot": "eyebrow-index", children: index }) : null, children, href ? _jsx(ArrowRightIcon, { "aria-hidden": "true", "data-slot": "eyebrow-arrow" }) : null] }));
|
|
16
|
+
if (href) {
|
|
17
|
+
return (_jsx("a", { href: href, "data-slot": resolvedSlot, "data-variant": variant, mix: mergeMix(eyebrow(), mix), children: content }));
|
|
18
|
+
}
|
|
19
|
+
return (_jsx("span", { "data-slot": resolvedSlot, "data-variant": variant, mix: mergeMix(eyebrow(), mix), children: content }));
|
|
20
|
+
};
|
|
21
|
+
}
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -6,21 +6,18 @@
|
|
|
6
6
|
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
7
7
|
* @copyright Sergio Xalambrí 2026
|
|
8
8
|
*/
|
|
9
|
-
export * from "./chart-marker-indices.js";
|
|
10
|
-
export * from "./chart-path.js";
|
|
11
|
-
export * from "./chart-scale.js";
|
|
12
9
|
export * from "./color-math.js";
|
|
13
10
|
export * from "./command-event.js";
|
|
14
11
|
export * from "./css-styles.js";
|
|
15
12
|
export * from "./decorative-icon.js";
|
|
16
13
|
export * from "./disabled-selector.js";
|
|
17
14
|
export * from "./dispatch-change.js";
|
|
15
|
+
export * from "./eyebrow.js";
|
|
18
16
|
export * from "./field-parts.js";
|
|
19
17
|
export * from "./full-turn-radians.js";
|
|
20
18
|
export * from "./geometry.js";
|
|
21
19
|
export * from "./glyph-edges.js";
|
|
22
20
|
export * from "./has-accessible-text.js";
|
|
23
|
-
export * from "./hue-spectrum.js";
|
|
24
21
|
export * from "./is-new-primary-press.js";
|
|
25
22
|
export * from "./key-combo.js";
|
|
26
23
|
export * from "./keyboard-nav.js";
|
|
@@ -33,6 +30,6 @@ export * from "./resolve-field-wiring.js";
|
|
|
33
30
|
export * from "./resolve-fill-percent.js";
|
|
34
31
|
export * from "./round-precision.js";
|
|
35
32
|
export * from "./semantic-color.js";
|
|
36
|
-
export * from "./semantic-color-panel.js";
|
|
37
33
|
export * from "./warn-if-no-accessible-name.js";
|
|
38
34
|
export * from "./write-cookie.js";
|
|
35
|
+
export * from "./relative-time.js";
|
package/dist/utils/index.js
CHANGED
|
@@ -6,21 +6,18 @@
|
|
|
6
6
|
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
7
7
|
* @copyright Sergio Xalambrí 2026
|
|
8
8
|
*/
|
|
9
|
-
export * from "./chart-marker-indices.js";
|
|
10
|
-
export * from "./chart-path.js";
|
|
11
|
-
export * from "./chart-scale.js";
|
|
12
9
|
export * from "./color-math.js";
|
|
13
10
|
export * from "./command-event.js";
|
|
14
11
|
export * from "./css-styles.js";
|
|
15
12
|
export * from "./decorative-icon.js";
|
|
16
13
|
export * from "./disabled-selector.js";
|
|
17
14
|
export * from "./dispatch-change.js";
|
|
15
|
+
export * from "./eyebrow.js";
|
|
18
16
|
export * from "./field-parts.js";
|
|
19
17
|
export * from "./full-turn-radians.js";
|
|
20
18
|
export * from "./geometry.js";
|
|
21
19
|
export * from "./glyph-edges.js";
|
|
22
20
|
export * from "./has-accessible-text.js";
|
|
23
|
-
export * from "./hue-spectrum.js";
|
|
24
21
|
export * from "./is-new-primary-press.js";
|
|
25
22
|
export * from "./key-combo.js";
|
|
26
23
|
export * from "./keyboard-nav.js";
|
|
@@ -33,6 +30,6 @@ export * from "./resolve-field-wiring.js";
|
|
|
33
30
|
export * from "./resolve-fill-percent.js";
|
|
34
31
|
export * from "./round-precision.js";
|
|
35
32
|
export * from "./semantic-color.js";
|
|
36
|
-
export * from "./semantic-color-panel.js";
|
|
37
33
|
export * from "./warn-if-no-accessible-name.js";
|
|
38
34
|
export * from "./write-cookie.js";
|
|
35
|
+
export * from "./relative-time.js";
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Formats a moment as the relative text, machine instant and absolute title a relative time
|
|
3
|
+
* shows, through `Intl` alone. Kept framework-free so the server component and the browser
|
|
4
|
+
* mixin that rewrites it in the viewer's zone produce the same strings from the same input.
|
|
5
|
+
*
|
|
6
|
+
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
7
|
+
* @copyright Sergio Xalambrí 2026
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Types for {@link formatRelativeTime}.
|
|
11
|
+
*/
|
|
12
|
+
export declare namespace RelativeTimeFormat {
|
|
13
|
+
/** A moment as a `Date`, an ISO 8601 string or epoch milliseconds. */
|
|
14
|
+
type DateInput = Date | string | number;
|
|
15
|
+
/** What a moment renders as, given a reference time, locale and zone. */
|
|
16
|
+
interface Formatted {
|
|
17
|
+
/** The machine-readable instant for `<time datetime>`, empty when the input does not parse. */
|
|
18
|
+
dateTime: string;
|
|
19
|
+
/** The visible text: relative within a week, a medium date after it. */
|
|
20
|
+
text: string;
|
|
21
|
+
/** The absolute time in the formatting zone, then in UTC when the two differ, one per line. */
|
|
22
|
+
title: string;
|
|
23
|
+
}
|
|
24
|
+
/** Options for {@link formatRelativeTime}. */
|
|
25
|
+
interface Options {
|
|
26
|
+
/** The reference moment "ago" counts from. Defaults to the current time. */
|
|
27
|
+
now?: DateInput;
|
|
28
|
+
/** BCP 47 locale for every string. Defaults to the runtime's locale. */
|
|
29
|
+
locale?: string;
|
|
30
|
+
/** IANA zone for the date and the title's first line. Defaults to {@link DEFAULT_TIME_ZONE}. */
|
|
31
|
+
timeZone?: string;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Formats `date` as a relative time shows it, for any part that needs the text without the
|
|
36
|
+
* `<time>` element. Under a minute reads in seconds and "now" at zero, and future moments read "in 5m";
|
|
37
|
+
* anything a week or more away reads as a medium date in `timeZone`.
|
|
38
|
+
*
|
|
39
|
+
* @param date The moment to format.
|
|
40
|
+
* @param options Reference time, locale and zone.
|
|
41
|
+
* @returns The `datetime` value, the visible text and the title.
|
|
42
|
+
* @example formatRelativeTime("2026-11-01T08:00:00Z", { now: "2026-11-01T08:02:00Z", locale: "en" }).text // "2m ago"
|
|
43
|
+
*/
|
|
44
|
+
export declare function formatRelativeTime(date: RelativeTimeFormat.DateInput, options?: RelativeTimeFormat.Options): RelativeTimeFormat.Formatted;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Formats a moment as the relative text, machine instant and absolute title a relative time
|
|
3
|
+
* shows, through `Intl` alone. Kept framework-free so the server component and the browser
|
|
4
|
+
* mixin that rewrites it in the viewer's zone produce the same strings from the same input.
|
|
5
|
+
*
|
|
6
|
+
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
7
|
+
* @copyright Sergio Xalambrí 2026
|
|
8
|
+
*/
|
|
9
|
+
/** How long a time stays relative before it reads as a date: seven days, in milliseconds. */
|
|
10
|
+
const RELATIVE_LIMIT_MS = 7 * 24 * 60 * 60 * 1000;
|
|
11
|
+
/** Zone the server formats in when none is given, so every server renders the same text. */
|
|
12
|
+
const DEFAULT_TIME_ZONE = "UTC";
|
|
13
|
+
/** Text shown for a date that does not parse. */
|
|
14
|
+
const INVALID_TEXT = "—";
|
|
15
|
+
/** Units a relative time steps through, largest last, each with its length in milliseconds. */
|
|
16
|
+
const UNITS = [
|
|
17
|
+
["second", 1000],
|
|
18
|
+
["minute", 60 * 1000],
|
|
19
|
+
["hour", 60 * 60 * 1000],
|
|
20
|
+
["day", 24 * 60 * 60 * 1000],
|
|
21
|
+
];
|
|
22
|
+
/**
|
|
23
|
+
* Formats `date` as a relative time shows it, for any part that needs the text without the
|
|
24
|
+
* `<time>` element. Under a minute reads in seconds and "now" at zero, and future moments read "in 5m";
|
|
25
|
+
* anything a week or more away reads as a medium date in `timeZone`.
|
|
26
|
+
*
|
|
27
|
+
* @param date The moment to format.
|
|
28
|
+
* @param options Reference time, locale and zone.
|
|
29
|
+
* @returns The `datetime` value, the visible text and the title.
|
|
30
|
+
* @example formatRelativeTime("2026-11-01T08:00:00Z", { now: "2026-11-01T08:02:00Z", locale: "en" }).text // "2m ago"
|
|
31
|
+
*/
|
|
32
|
+
export function formatRelativeTime(date, options = {}) {
|
|
33
|
+
let moment = new Date(date);
|
|
34
|
+
if (Number.isNaN(moment.getTime()))
|
|
35
|
+
return { dateTime: "", text: INVALID_TEXT, title: "" };
|
|
36
|
+
let now = options.now === undefined ? new Date() : new Date(options.now);
|
|
37
|
+
let timeZone = options.timeZone ?? DEFAULT_TIME_ZONE;
|
|
38
|
+
let delta = moment.getTime() - now.getTime();
|
|
39
|
+
return {
|
|
40
|
+
dateTime: moment.toISOString(),
|
|
41
|
+
text: Math.abs(delta) < RELATIVE_LIMIT_MS
|
|
42
|
+
? relativeText(delta, options.locale)
|
|
43
|
+
: new Intl.DateTimeFormat(options.locale, { dateStyle: "medium", timeZone }).format(moment),
|
|
44
|
+
title: absoluteTitle(moment, options.locale, timeZone),
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Picks the largest unit the distance fills at least once and truncates toward zero, so 59
|
|
49
|
+
* minutes reads "59m" until the hour has actually passed.
|
|
50
|
+
*/
|
|
51
|
+
function relativeText(delta, locale) {
|
|
52
|
+
let format = new Intl.RelativeTimeFormat(locale, { style: "narrow", numeric: "auto" });
|
|
53
|
+
let [unit, size] = UNITS[0];
|
|
54
|
+
for (let [candidate, length] of UNITS) {
|
|
55
|
+
if (Math.abs(delta) >= length)
|
|
56
|
+
[unit, size] = [candidate, length];
|
|
57
|
+
}
|
|
58
|
+
return format.format(Math.trunc(delta / size) || 0, unit);
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* The absolute time in `timeZone` with its zone named, then in UTC on a second line, which a
|
|
62
|
+
* title shows as a two-line tooltip. A UTC zone gives the one line.
|
|
63
|
+
*/
|
|
64
|
+
function absoluteTitle(moment, locale, timeZone) {
|
|
65
|
+
let options = { dateStyle: "medium", timeStyle: "long" };
|
|
66
|
+
let zoned = new Intl.DateTimeFormat(locale, { ...options, timeZone }).format(moment);
|
|
67
|
+
let utc = new Intl.DateTimeFormat(locale, { ...options, timeZone: "UTC" }).format(moment);
|
|
68
|
+
return zoned === utc ? utc : `${zoned}\n${utc}`;
|
|
69
|
+
}
|
package/package.json
CHANGED
|
@@ -1,16 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sdxc/ui",
|
|
3
|
-
"version": "2026.
|
|
3
|
+
"version": "2026.11.3",
|
|
4
4
|
"description": "Styled, accessible remix/component components rendered as server HTML",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"sideEffects": false,
|
|
8
8
|
"exports": {
|
|
9
9
|
".": "./dist/index.js",
|
|
10
|
+
"./landing": "./dist/landing/index.js",
|
|
11
|
+
"./landing/*": "./dist/landing/*.js",
|
|
12
|
+
"./docs": "./dist/docs/index.js",
|
|
13
|
+
"./docs/*": "./dist/docs/*.js",
|
|
14
|
+
"./chat": "./dist/chat/index.js",
|
|
15
|
+
"./chat/*": "./dist/chat/*.js",
|
|
16
|
+
"./color": "./dist/color/index.js",
|
|
17
|
+
"./color/*": "./dist/color/*.js",
|
|
18
|
+
"./app": "./dist/app/index.js",
|
|
19
|
+
"./app/*": "./dist/app/*.js",
|
|
10
20
|
"./animations": "./dist/animations/index.js",
|
|
11
21
|
"./behaviors": "./dist/behaviors/index.js",
|
|
12
22
|
"./mixins": "./dist/mixins/index.js",
|
|
13
|
-
"./patterns": "./dist/patterns/index.js",
|
|
14
23
|
"./styles": "./dist/styles/index.js",
|
|
15
24
|
"./utils": "./dist/utils/index.js",
|
|
16
25
|
"./reset.css": "./src/reset.css",
|
|
@@ -19,15 +28,16 @@
|
|
|
19
28
|
},
|
|
20
29
|
"dependencies": {
|
|
21
30
|
"@remix-run/ui": "0.12.1",
|
|
22
|
-
"@sdxc/
|
|
31
|
+
"@sdxc/highlight": "2026.11.3",
|
|
32
|
+
"@sdxc/icons": "2026.11.3",
|
|
23
33
|
"@sdxc/iife": "2026.10.23",
|
|
24
|
-
"@sdxc/u": "2026.
|
|
25
|
-
"@sdxc/uuid": "2026.
|
|
34
|
+
"@sdxc/u": "2026.11.3",
|
|
35
|
+
"@sdxc/uuid": "2026.11.3"
|
|
26
36
|
},
|
|
27
37
|
"peerDependencies": {
|
|
28
38
|
"remix": "3.1.0"
|
|
29
39
|
},
|
|
30
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "d1dd4030f8df68b8a170940a3f790ea8654d3676",
|
|
31
41
|
"publishConfig": {
|
|
32
42
|
"access": "public"
|
|
33
43
|
},
|
package/src/theme.css
CHANGED
|
@@ -28,11 +28,13 @@
|
|
|
28
28
|
* tone of whatever sits behind it; high contrast turns it into a solid line.
|
|
29
29
|
* - `--ui-image-outline`, the inset hairline that keeps an image's edge
|
|
30
30
|
* visible against a background of the same tone.
|
|
31
|
-
* - `--ui-
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
31
|
+
* - `--ui-surface-raised` and the `--ui-shadow-surface` / `-stage` / `-control`
|
|
32
|
+
* edges a frame, card or CTA sits on, lifted a step above the page in dark.
|
|
33
|
+
* - `--ui-landing-*` layout and display tokens (measure, gutter, fluid
|
|
34
|
+
* section space steps, display and chapter type, lead, logo height, header
|
|
35
|
+
* space, CTA radius and weight, surface radius, hairline) plus
|
|
36
|
+
* `--ui-font-display` for landing bands. Apps override per brand; brand
|
|
37
|
+
* colors stay on the existing `--ui-color-*` / `--ui-*-*` scales.
|
|
36
38
|
*
|
|
37
39
|
* Dark Mode:
|
|
38
40
|
* - Add .dark class to <html> for forced dark mode
|
|
@@ -99,25 +101,46 @@
|
|
|
99
101
|
/* Images: an inset hairline that holds the edge against a same-tone background */
|
|
100
102
|
--ui-image-outline: rgb(0 0 0 / 0.1);
|
|
101
103
|
|
|
104
|
+
/* Raised surfaces: frames, cards and code that sit above a band, and their edges */
|
|
105
|
+
--ui-surface-raised: white;
|
|
106
|
+
--ui-shadow-surface: 0 0 0 1px rgb(0 0 0 / 0.06), 0 1px 2px rgb(0 0 0 / 0.05);
|
|
107
|
+
--ui-shadow-stage: 0 0 0 1px rgb(0 0 0 / 0.06), 0 12px 32px -12px rgb(0 0 0 / 0.18);
|
|
108
|
+
--ui-shadow-control:
|
|
109
|
+
0 1px 3px rgb(0 0 0 / 0.04), inset 0 1px 0 rgb(255 255 255 / 0.12),
|
|
110
|
+
inset 0 0 0 1px rgb(0 0 0 / 0.06);
|
|
111
|
+
|
|
102
112
|
/*
|
|
103
|
-
*
|
|
104
|
-
* landing bands.
|
|
105
|
-
*
|
|
113
|
+
* Landing layout: measure, gutters, band spacing, and display type for
|
|
114
|
+
* landing bands. Sizes and spacing are fluid in the band's container width
|
|
115
|
+
* (`cqi`), so a phone gets the tight end and a desktop band the generous one.
|
|
116
|
+
* Apps override per brand; 72rem matches a 1152px content column.
|
|
106
117
|
*/
|
|
107
|
-
--ui-
|
|
108
|
-
--ui-
|
|
109
|
-
--ui-
|
|
110
|
-
--ui-
|
|
111
|
-
--ui-
|
|
112
|
-
--ui-
|
|
113
|
-
--ui-
|
|
114
|
-
--ui-
|
|
115
|
-
--ui-
|
|
116
|
-
--ui-
|
|
117
|
-
--ui-
|
|
118
|
-
--ui-
|
|
119
|
-
--ui-
|
|
120
|
-
--ui-
|
|
118
|
+
--ui-landing-measure: 72rem;
|
|
119
|
+
--ui-landing-gutter: 1rem;
|
|
120
|
+
--ui-landing-section-space: clamp(5rem, 3.86rem + 4.85cqi, 7.5rem);
|
|
121
|
+
--ui-landing-section-space-compact: clamp(3rem, 2.32rem + 2.91cqi, 4.5rem);
|
|
122
|
+
--ui-landing-section-space-hero: clamp(3.5rem, 1.45rem + 8.73cqi, 8rem);
|
|
123
|
+
--ui-landing-section-space-cta: clamp(5rem, 4.09rem + 3.88cqi, 7rem);
|
|
124
|
+
--ui-landing-header-space: clamp(2.5rem, 1.82rem + 2.91cqi, 4rem);
|
|
125
|
+
--ui-landing-display-tracking: -0.035em;
|
|
126
|
+
--ui-landing-display-weight: 500;
|
|
127
|
+
--ui-landing-display-max: 4.5rem;
|
|
128
|
+
--ui-landing-chapter-size: clamp(1.75rem, 1.18rem + 2.42cqi, 3rem);
|
|
129
|
+
--ui-landing-chapter-leading: 1.1;
|
|
130
|
+
--ui-landing-chapter-tracking: -0.025em;
|
|
131
|
+
--ui-landing-lead-measure: 40rem;
|
|
132
|
+
--ui-landing-lead-size: 1.125rem;
|
|
133
|
+
--ui-landing-lead-leading: 2rem;
|
|
134
|
+
--ui-landing-lead-weight: 400;
|
|
135
|
+
--ui-landing-hero-lead-size: clamp(1.0625rem, 0.98rem + 0.4cqi, 1.25rem);
|
|
136
|
+
--ui-landing-hero-lead-leading: 1.55;
|
|
137
|
+
--ui-landing-logo-height: 1.75rem;
|
|
138
|
+
--ui-landing-logo-height-lg: 2.25rem;
|
|
139
|
+
--ui-landing-header-height: 4rem;
|
|
140
|
+
--ui-landing-cta-radius: 0.5rem;
|
|
141
|
+
--ui-landing-cta-weight: 600;
|
|
142
|
+
--ui-landing-radius-surface: 1rem;
|
|
143
|
+
--ui-landing-hairline: color-mix(in oklch, var(--ui-neutral-fg-emphasis) 6%, transparent);
|
|
121
144
|
--ui-font-display: var(--ui-font-sans);
|
|
122
145
|
}
|
|
123
146
|
|
|
@@ -228,6 +251,46 @@
|
|
|
228
251
|
}
|
|
229
252
|
}
|
|
230
253
|
|
|
254
|
+
/*
|
|
255
|
+
* Dark surfaces and landing lines, declared on the root alone: they inherit, so an
|
|
256
|
+
* inverse or brand band that re-points them on its own element reaches its children.
|
|
257
|
+
*/
|
|
258
|
+
.dark {
|
|
259
|
+
/* Raised surfaces: one step above the page, edged by a top-lit hairline */
|
|
260
|
+
--ui-surface-raised: color-mix(
|
|
261
|
+
in oklch,
|
|
262
|
+
var(--ui-color-neutral-950),
|
|
263
|
+
var(--ui-color-neutral-900)
|
|
264
|
+
);
|
|
265
|
+
--ui-shadow-surface: inset 0 1px 0 rgb(255 255 255 / 0.06), 0 0 0 1px rgb(255 255 255 / 0.08);
|
|
266
|
+
--ui-shadow-stage:
|
|
267
|
+
inset 0 1px 0 rgb(255 255 255 / 0.06), 0 0 0 1px rgb(255 255 255 / 0.08),
|
|
268
|
+
0 16px 40px -12px rgb(0 0 0 / 0.6);
|
|
269
|
+
--ui-shadow-control:
|
|
270
|
+
0 1px 3px rgb(0 0 0 / 0.2), inset 0 1px 0 rgb(255 255 255 / 0.04),
|
|
271
|
+
inset 0 0 0 1px rgb(255 255 255 / 0.08);
|
|
272
|
+
--ui-landing-hairline: color-mix(in oklch, white 10%, transparent);
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
@media (prefers-color-scheme: dark) {
|
|
276
|
+
.system {
|
|
277
|
+
/* Raised surfaces: one step above the page, edged by a top-lit hairline */
|
|
278
|
+
--ui-surface-raised: color-mix(
|
|
279
|
+
in oklch,
|
|
280
|
+
var(--ui-color-neutral-950),
|
|
281
|
+
var(--ui-color-neutral-900)
|
|
282
|
+
);
|
|
283
|
+
--ui-shadow-surface: inset 0 1px 0 rgb(255 255 255 / 0.06), 0 0 0 1px rgb(255 255 255 / 0.08);
|
|
284
|
+
--ui-shadow-stage:
|
|
285
|
+
inset 0 1px 0 rgb(255 255 255 / 0.06), 0 0 0 1px rgb(255 255 255 / 0.08),
|
|
286
|
+
0 16px 40px -12px rgb(0 0 0 / 0.6);
|
|
287
|
+
--ui-shadow-control:
|
|
288
|
+
0 1px 3px rgb(0 0 0 / 0.2), inset 0 1px 0 rgb(255 255 255 / 0.04),
|
|
289
|
+
inset 0 0 0 1px rgb(255 255 255 / 0.08);
|
|
290
|
+
--ui-landing-hairline: color-mix(in oklch, white 10%, transparent);
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
|
|
231
294
|
/*
|
|
232
295
|
* High contrast: the resting border is already promoted, so its hover step follows it,
|
|
233
296
|
* and an elevated surface's ring becomes a solid line in that promoted border color.
|
|
@@ -245,5 +308,7 @@
|
|
|
245
308
|
|
|
246
309
|
--ui-shadow-ring: 0 0 0 1px var(--ui-neutral-border-strong);
|
|
247
310
|
--ui-shadow-ring-hover: 0 0 0 1px var(--ui-neutral-border-strong);
|
|
311
|
+
--ui-shadow-surface: 0 0 0 1px var(--ui-neutral-border-strong);
|
|
312
|
+
--ui-landing-hairline: var(--ui-neutral-border-strong);
|
|
248
313
|
}
|
|
249
314
|
}
|