@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,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A frame for any looping illustration that runs longer than five seconds: an animated
|
|
3
|
+
* diagram, a drifting backdrop, an endless rotating word. It adds a pause toggle in a
|
|
4
|
+
* corner that freezes every animation inside, which WCAG 2.2.2 asks of such motion.
|
|
5
|
+
*
|
|
6
|
+
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
7
|
+
* @copyright Sergio Xalambrí 2026
|
|
8
|
+
*/
|
|
9
|
+
import type { Handle, Props as TagProps, RemixNode } from "remix/component";
|
|
10
|
+
/**
|
|
11
|
+
* Prop types for {@link MotionLoop}.
|
|
12
|
+
*/
|
|
13
|
+
export declare namespace MotionLoop {
|
|
14
|
+
/**
|
|
15
|
+
* Corner the toggle sits in, as block then inline edge, so right-to-left pages mirror.
|
|
16
|
+
* `inline` puts it after the content on the same line, for a loop inside a sentence.
|
|
17
|
+
*/
|
|
18
|
+
type Placement = "start-start" | "start-end" | "end-start" | "end-end" | "inline";
|
|
19
|
+
/**
|
|
20
|
+
* Props accepted by {@link MotionLoop}.
|
|
21
|
+
*/
|
|
22
|
+
interface Props extends TagProps<"div"> {
|
|
23
|
+
/** Accessible name of the toggle. Defaults to "Pause the animation". */
|
|
24
|
+
pauseLabel?: string;
|
|
25
|
+
/** Toggle corner. Defaults to {@link DEFAULT_PLACEMENT}. */
|
|
26
|
+
placement?: Placement;
|
|
27
|
+
/** The looping content. */
|
|
28
|
+
children: RemixNode;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Wraps looping content and pauses all of it, pseudo-elements included, while its toggle
|
|
33
|
+
* is checked or the pointer rests on it. Under reduced motion the toggle hides, since the
|
|
34
|
+
* content is expected to hold still.
|
|
35
|
+
*
|
|
36
|
+
* @param handle Runtime handle carrying the host `<div>`'s props.
|
|
37
|
+
* @returns The render function producing the frame's markup.
|
|
38
|
+
* @example
|
|
39
|
+
* <MotionLoop pauseLabel={t("hero.pause")}>
|
|
40
|
+
* <PipelineDiagram />
|
|
41
|
+
* </MotionLoop>
|
|
42
|
+
*/
|
|
43
|
+
export declare function MotionLoop(handle: Handle<MotionLoop.Props>): () => import("remix/component").RemixElement;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "remix/component/jsx-runtime";
|
|
2
|
+
import { raw, mergeMix } from "@sdxc/u/general";
|
|
3
|
+
import { PauseToggle, pausedWhenChecked } from "./utils/pause-toggle.js";
|
|
4
|
+
/** Corner {@link MotionLoop} puts its toggle in when `placement` is omitted. */
|
|
5
|
+
const DEFAULT_PLACEMENT = "end-end";
|
|
6
|
+
/** How far the toggle sits from the frame's edges. */
|
|
7
|
+
const INSET = "0.75rem";
|
|
8
|
+
/**
|
|
9
|
+
* Wraps looping content and pauses all of it, pseudo-elements included, while its toggle
|
|
10
|
+
* is checked or the pointer rests on it. Under reduced motion the toggle hides, since the
|
|
11
|
+
* content is expected to hold still.
|
|
12
|
+
*
|
|
13
|
+
* @param handle Runtime handle carrying the host `<div>`'s props.
|
|
14
|
+
* @returns The render function producing the frame's markup.
|
|
15
|
+
* @example
|
|
16
|
+
* <MotionLoop pauseLabel={t("hero.pause")}>
|
|
17
|
+
* <PipelineDiagram />
|
|
18
|
+
* </MotionLoop>
|
|
19
|
+
*/
|
|
20
|
+
export function MotionLoop(handle) {
|
|
21
|
+
return () => {
|
|
22
|
+
let { children, mix, pauseLabel, placement, ...rest } = handle.props;
|
|
23
|
+
let resolvedPlacement = placement ?? DEFAULT_PLACEMENT;
|
|
24
|
+
let isInline = resolvedPlacement === "inline";
|
|
25
|
+
return (_jsxs("div", { ...rest, "data-slot": "motion-loop", "data-placement": resolvedPlacement, mix: mergeMix([
|
|
26
|
+
isInline
|
|
27
|
+
? raw({ display: "inline-flex", alignItems: "center", gap: "0.75rem" })
|
|
28
|
+
: raw({ position: "relative" }),
|
|
29
|
+
pausedWhenChecked('[data-slot="motion-loop-content"]'),
|
|
30
|
+
], mix), children: [_jsx("div", { "data-slot": "motion-loop-content", children: children }), _jsx(PauseToggle, { label: pauseLabel ?? "Pause the animation", mix: [resolvedPlacement === "inline" ? [] : corner(resolvedPlacement)] })] }));
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
/** Pins the toggle to its corner with logical insets. */
|
|
34
|
+
function corner(placement) {
|
|
35
|
+
let [block, inline] = placement.split("-");
|
|
36
|
+
return raw({
|
|
37
|
+
position: "absolute",
|
|
38
|
+
zIndex: "1",
|
|
39
|
+
[block === "start" ? "insetBlockStart" : "insetBlockEnd"]: INSET,
|
|
40
|
+
[inline === "start" ? "insetInlineStart" : "insetInlineEnd"]: INSET,
|
|
41
|
+
});
|
|
42
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pricing band: a {@link LandingHeader} over a grid of plan cards, each with
|
|
3
|
+
* a price, a checked feature list and an action. A featured plan inverts its
|
|
4
|
+
* card and moves first on a phone, so the recommended plan is the first read.
|
|
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 { LandingSection } from "./landing-section.js";
|
|
11
|
+
/**
|
|
12
|
+
* Prop types for {@link PricingBand} and {@link PricingBand.Plan}.
|
|
13
|
+
*/
|
|
14
|
+
export declare namespace PricingBand {
|
|
15
|
+
/**
|
|
16
|
+
* How many plans share one row from the `lg` container; a phone stacks them and the
|
|
17
|
+
* `md` container pairs an even count.
|
|
18
|
+
*/
|
|
19
|
+
type Columns = 2 | 3;
|
|
20
|
+
/**
|
|
21
|
+
* Band fill forwarded to {@link LandingSection}.
|
|
22
|
+
*/
|
|
23
|
+
type Tone = LandingSection.Tone;
|
|
24
|
+
/**
|
|
25
|
+
* Per-part styling for slots the band composes.
|
|
26
|
+
*/
|
|
27
|
+
interface PartsProps {
|
|
28
|
+
/** Styling for the header title. */
|
|
29
|
+
title?: TagProps<"h1">["mix"];
|
|
30
|
+
/** Styling for the header lead. */
|
|
31
|
+
description?: TagProps<"p">["mix"];
|
|
32
|
+
/** Styling for the plan grid. */
|
|
33
|
+
plans?: TagProps<"div">["mix"];
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Props accepted by {@link PricingBand}.
|
|
37
|
+
*/
|
|
38
|
+
interface Props extends Omit<LandingSection.Props, "children" | "tone" | "title" | "parts"> {
|
|
39
|
+
/** Plans per row from the `lg` container. Defaults to {@link DEFAULT_COLUMNS}. */
|
|
40
|
+
columns?: Columns;
|
|
41
|
+
/** Band fill. Defaults to {@link DEFAULT_TONE}. */
|
|
42
|
+
tone?: Tone;
|
|
43
|
+
/** Optional eyebrow above the title. */
|
|
44
|
+
eyebrow?: RemixNode;
|
|
45
|
+
/** Section title — required, always supplied by the page. */
|
|
46
|
+
title: RemixNode;
|
|
47
|
+
/** Supporting lead under the title. */
|
|
48
|
+
description?: RemixNode;
|
|
49
|
+
/** One {@link PricingBand.Plan} per plan, in reading order for wide layouts. */
|
|
50
|
+
children: RemixNode;
|
|
51
|
+
/** Per-part styling for title, lead, and plan grid. */
|
|
52
|
+
parts?: PartsProps;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Props accepted by {@link PricingBand.Plan}.
|
|
56
|
+
*/
|
|
57
|
+
interface PlanProps extends Omit<TagProps<"div">, "children"> {
|
|
58
|
+
/** Plan name, rendered as the card's heading one level below the band title. */
|
|
59
|
+
name: RemixNode;
|
|
60
|
+
/** The amount, drawn large in tabular figures (`"$29"`, `"Free"`). */
|
|
61
|
+
price: RemixNode;
|
|
62
|
+
/** Billing period beside the amount, drawn muted (`"/month"`). */
|
|
63
|
+
period?: RemixNode;
|
|
64
|
+
/** One line on who the plan is for. */
|
|
65
|
+
description?: RemixNode;
|
|
66
|
+
/** {@link CheckRow} items; the card lays them in a {@link CheckList}. */
|
|
67
|
+
features?: RemixNode;
|
|
68
|
+
/**
|
|
69
|
+
* The plan's call to action, stretched across the card's foot. Its button or link
|
|
70
|
+
* takes the landing CTA radius, weight and edge; leave `size` at the 40px default.
|
|
71
|
+
*/
|
|
72
|
+
action: RemixNode;
|
|
73
|
+
/** Inverts the card, lifts it, and moves it first while plans stack. */
|
|
74
|
+
featured?: boolean;
|
|
75
|
+
/** A short label beside the name, such as "Most popular". */
|
|
76
|
+
badge?: RemixNode;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Renders a pricing band with a chapter header and a plan grid of one column on a phone, an
|
|
81
|
+
* even count paired from the `md` container, and `columns` from `lg`, evened per plan count
|
|
82
|
+
* with a short last row centred. Each card pushes its action to the foot, so actions in one row line up.
|
|
83
|
+
*
|
|
84
|
+
* @param handle Runtime handle carrying the band's props.
|
|
85
|
+
* @returns The render function producing the band's markup.
|
|
86
|
+
* @example
|
|
87
|
+
* <PricingBand title={t("pricing.title")}>
|
|
88
|
+
* <PricingBand.Plan name="Team" price="$29" period="/month" featured action={cta} />
|
|
89
|
+
* </PricingBand>
|
|
90
|
+
*/
|
|
91
|
+
export declare function PricingBand(handle: Handle<PricingBand.Props>): () => import("remix/component").RemixElement;
|
|
92
|
+
export declare namespace PricingBand {
|
|
93
|
+
var Plan: (handle: Handle<PricingBand.PlanProps>) => () => import("remix/component").RemixElement;
|
|
94
|
+
}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "remix/component/jsx-runtime";
|
|
2
|
+
import { fg } from "@sdxc/u/color";
|
|
3
|
+
import { combine, raw, mergeMix } from "@sdxc/u/general";
|
|
4
|
+
import { container, flexWrap, gap, grid, hstack, items, vstack } from "@sdxc/u/layout";
|
|
5
|
+
import { at, dark } from "@sdxc/u/responsive";
|
|
6
|
+
import { when } from "@sdxc/u/state";
|
|
7
|
+
import { balance, leading, tabularNums, text, weight } from "@sdxc/u/typography";
|
|
8
|
+
import { HeadingScope, resolveHeadingLevel, TAG_BY_LEVEL } from "../components/heading-scope.js";
|
|
9
|
+
import { landingBandTone, landingCtaChrome, landingEmphasis, landingSurface, } from "../styles/landing.js";
|
|
10
|
+
import { CheckList } from "./check-row.js";
|
|
11
|
+
import { LandingHeader } from "./landing-header.js";
|
|
12
|
+
import { LandingSection } from "./landing-section.js";
|
|
13
|
+
import { balancedGrid } from "./styles/card-grid.js";
|
|
14
|
+
/** How many plans share one row from the `lg` container when `columns` is omitted. */
|
|
15
|
+
const DEFAULT_COLUMNS = 3;
|
|
16
|
+
/** Band fill {@link PricingBand} applies when `tone` is omitted. */
|
|
17
|
+
const DEFAULT_TONE = "plain";
|
|
18
|
+
/** Container the plan grid and every plan card query. */
|
|
19
|
+
const CONTAINER_NAME = "ui-landing-pricing";
|
|
20
|
+
/**
|
|
21
|
+
* Corner radius of a plan card, a step rounder than a staged surface by default; a page
|
|
22
|
+
* sets `--ui-landing-plan-radius` to square or soften every plan at once.
|
|
23
|
+
*/
|
|
24
|
+
const PLAN_RADIUS = "var(--ui-landing-plan-radius, 1.5rem)";
|
|
25
|
+
/**
|
|
26
|
+
* The lift a featured plan floats on in light mode. A page sets `--ui-landing-plan-lift`
|
|
27
|
+
* to a shadow of its own, or to `0 0 #0000` for a plan that sits flat on the band.
|
|
28
|
+
*/
|
|
29
|
+
const FEATURED_LIFT = "var(--ui-landing-plan-lift, 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1))";
|
|
30
|
+
/**
|
|
31
|
+
* The featured plan's edge on a dark page, where the inverse tone renders as a raised
|
|
32
|
+
* surface: a strong brand ring over a deeper lift keeps it distinct from its neighbours.
|
|
33
|
+
* The ring stays when a page flattens the lift through `--ui-landing-plan-lift`.
|
|
34
|
+
*/
|
|
35
|
+
const FEATURED_DARK_EDGE = "inset 0 0 0 1px var(--ui-brand-border-strong), var(--ui-landing-plan-lift, 0 20px 25px -5px rgb(0 0 0 / 0.5))";
|
|
36
|
+
/**
|
|
37
|
+
* Renders a pricing band with a chapter header and a plan grid of one column on a phone, an
|
|
38
|
+
* even count paired from the `md` container, and `columns` from `lg`, evened per plan count
|
|
39
|
+
* with a short last row centred. Each card pushes its action to the foot, so actions in one row line up.
|
|
40
|
+
*
|
|
41
|
+
* @param handle Runtime handle carrying the band's props.
|
|
42
|
+
* @returns The render function producing the band's markup.
|
|
43
|
+
* @example
|
|
44
|
+
* <PricingBand title={t("pricing.title")}>
|
|
45
|
+
* <PricingBand.Plan name="Team" price="$29" period="/month" featured action={cta} />
|
|
46
|
+
* </PricingBand>
|
|
47
|
+
*/
|
|
48
|
+
export function PricingBand(handle) {
|
|
49
|
+
return () => {
|
|
50
|
+
let { children, columns, description, eyebrow, mix, parts, spacing, title, tone, ...rest } = handle.props;
|
|
51
|
+
let resolvedColumns = columns ?? DEFAULT_COLUMNS;
|
|
52
|
+
let resolvedTone = tone ?? DEFAULT_TONE;
|
|
53
|
+
let resolvedSpacing = spacing ?? "normal";
|
|
54
|
+
return (_jsx(LandingSection, { ...rest, tone: resolvedTone, spacing: resolvedSpacing, mix: mix, children: _jsxs("div", { mix: [vstack({ gap: 0, align: "stretch" })], children: [_jsx(LandingHeader, { eyebrow: eyebrow, description: description, parts: { title: parts?.title, description: parts?.description }, children: title }), _jsx("div", { "data-columns": String(resolvedColumns), mix: [container(CONTAINER_NAME)], children: _jsx(HeadingScope, { children: _jsx("div", { "data-slot": "pricing-plans", mix: [
|
|
55
|
+
grid(),
|
|
56
|
+
gap(8),
|
|
57
|
+
balancedGrid(CONTAINER_NAME, [
|
|
58
|
+
{ query: "(width < 36rem)", columns: 1 },
|
|
59
|
+
{ query: "(36rem <= width < 48rem)", columns: 2, columnsFor: pairedColumns },
|
|
60
|
+
{ query: "(width >= 48rem)", columns: resolvedColumns },
|
|
61
|
+
]),
|
|
62
|
+
parts?.plans,
|
|
63
|
+
], children: children }) }) })] }) }));
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Plans per row where the grid pairs them: an even run pairs up, and an odd run stays
|
|
68
|
+
* one plan a row until the full row step, so no plan ever stands alone under a pair.
|
|
69
|
+
*/
|
|
70
|
+
function pairedColumns(count) {
|
|
71
|
+
return count % 2 === 0 ? 2 : 1;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Card fill and edge for a plan. A plain plan is a raised surface whose radius comes
|
|
75
|
+
* through the surface radius token; a featured one takes the inverse band tone, sits first
|
|
76
|
+
* while the grid is one column, and draws its lift on an overlay so the tone's own edge stays.
|
|
77
|
+
*/
|
|
78
|
+
function planSurface(featured) {
|
|
79
|
+
let shape = combine([
|
|
80
|
+
raw({ "--ui-landing-radius-surface": PLAN_RADIUS, padding: "1.5rem" }),
|
|
81
|
+
at("md", CONTAINER_NAME, raw({ padding: "2rem" })),
|
|
82
|
+
]);
|
|
83
|
+
if (!featured)
|
|
84
|
+
return [landingSurface(), shape];
|
|
85
|
+
return [
|
|
86
|
+
landingBandTone("inverse"),
|
|
87
|
+
shape,
|
|
88
|
+
combine([
|
|
89
|
+
raw({ position: "relative", borderRadius: PLAN_RADIUS, order: "-1" }),
|
|
90
|
+
at("md", CONTAINER_NAME, raw({ order: "0" })),
|
|
91
|
+
when("&::after", raw({
|
|
92
|
+
content: '""',
|
|
93
|
+
position: "absolute",
|
|
94
|
+
inset: "0",
|
|
95
|
+
borderRadius: "inherit",
|
|
96
|
+
pointerEvents: "none",
|
|
97
|
+
boxShadow: FEATURED_LIFT,
|
|
98
|
+
})),
|
|
99
|
+
dark(when("&::after", raw({ boxShadow: FEATURED_DARK_EDGE }))),
|
|
100
|
+
]),
|
|
101
|
+
];
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* The landing CTA chrome for the control in a plan's action, wrapped or not, so it
|
|
105
|
+
* shares the hero CTA's radius, weight and tactile edge. `landingCtaChrome()` builds
|
|
106
|
+
* a `@sdxc/u` utility, which nests under the slot's descendant selector.
|
|
107
|
+
*/
|
|
108
|
+
function actionChrome() {
|
|
109
|
+
return landingCtaChrome();
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* One plan card: name and badge, price with its period, a one-line pitch, the checked
|
|
113
|
+
* features, and the action at the foot.
|
|
114
|
+
*
|
|
115
|
+
* @param handle Runtime handle carrying the card's props.
|
|
116
|
+
* @returns The render function producing the card's markup.
|
|
117
|
+
* @example
|
|
118
|
+
* <PricingBand.Plan
|
|
119
|
+
* name="Team" price="$29" period="/month" featured badge="Most popular"
|
|
120
|
+
* features={<><CheckRow>50 monitors</CheckRow><CheckRow>30-second checks</CheckRow></>}
|
|
121
|
+
* action={<LinkButton href="/signup" color="brand">Start trial</LinkButton>}
|
|
122
|
+
* />
|
|
123
|
+
*/
|
|
124
|
+
PricingBand.Plan = function PricingBandPlan(handle) {
|
|
125
|
+
return () => {
|
|
126
|
+
let { action, badge, description, featured, features, mix, name, period, price, ...rest } = handle.props;
|
|
127
|
+
let isFeatured = featured === true;
|
|
128
|
+
let Tag = TAG_BY_LEVEL[resolveHeadingLevel(handle)];
|
|
129
|
+
return (_jsxs("div", { ...rest, "data-slot": "pricing-plan", "data-featured": isFeatured ? "true" : undefined, mix: mergeMix([vstack({ gap: 6, align: "stretch" }), planSurface(isFeatured)], mix), children: [_jsxs("div", { mix: [vstack({ gap: 4, align: "stretch" })], children: [_jsxs("div", { mix: [hstack({ gap: 3, justify: "between" }), items("center"), flexWrap()], children: [_jsx(Tag, { "data-slot": "pricing-plan-name", mix: [
|
|
130
|
+
text("lg"),
|
|
131
|
+
leading("snug"),
|
|
132
|
+
balance(),
|
|
133
|
+
weight("semibold"),
|
|
134
|
+
fg("neutral.emphasis"),
|
|
135
|
+
], children: name }), badge] }), _jsxs("p", { "data-slot": "pricing-plan-price", mix: [hstack({ gap: 1 }), items("baseline"), raw({ margin: "0" })], children: [_jsx("span", { mix: [
|
|
136
|
+
tabularNums(),
|
|
137
|
+
weight("semibold"),
|
|
138
|
+
fg("neutral.emphasis"),
|
|
139
|
+
raw({ fontSize: "2.5rem", lineHeight: "1", letterSpacing: "-0.025em" }),
|
|
140
|
+
], children: price }), period ? (_jsx("span", { mix: [fg("neutral.muted"), raw({ fontSize: "1rem", lineHeight: "1.5rem" })], children: period })) : null] }), description ? (_jsx("p", { "data-slot": "pricing-plan-description", mix: [
|
|
141
|
+
fg("neutral"),
|
|
142
|
+
text("sm"),
|
|
143
|
+
raw({ margin: "0", lineHeight: "1.5rem" }),
|
|
144
|
+
landingEmphasis(),
|
|
145
|
+
], children: description })) : null] }), features ? _jsx(CheckList, { children: features }) : null, _jsx("div", { "data-slot": "pricing-plan-action", mix: [
|
|
146
|
+
grid(),
|
|
147
|
+
raw({ marginBlockStart: "auto" }),
|
|
148
|
+
when("& :is(button, a)", actionChrome()),
|
|
149
|
+
], children: action })] }));
|
|
150
|
+
};
|
|
151
|
+
};
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Window or device chrome around a product screenshot or staged UI, optionally
|
|
3
|
+
* set on a tinted stage. Traffic lights, title, URL bar and footer stay
|
|
4
|
+
* decorative; the page supplies every string and the framed children.
|
|
5
|
+
*
|
|
6
|
+
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
7
|
+
* @copyright Sergio Xalambrí 2026
|
|
8
|
+
*/
|
|
9
|
+
import type { Handle, Props as TagProps, RemixNode } from "remix/component";
|
|
10
|
+
/**
|
|
11
|
+
* Prop types for {@link ProductFrame} and its compound parts.
|
|
12
|
+
*/
|
|
13
|
+
export declare namespace ProductFrame {
|
|
14
|
+
/**
|
|
15
|
+
* Outer chrome: a desktop window with a title bar, or a phone-proportioned
|
|
16
|
+
* device rim.
|
|
17
|
+
*/
|
|
18
|
+
type Variant = "window" | "device";
|
|
19
|
+
/**
|
|
20
|
+
* What the frame sits on: the band itself, a tinted panel, or a panel with a
|
|
21
|
+
* backdrop image or brand glow behind the frame.
|
|
22
|
+
*/
|
|
23
|
+
type Stage = "none" | "panel" | "backdrop";
|
|
24
|
+
/**
|
|
25
|
+
* Lift under the frame: the neutral stage shadow, or a brand-tinted two-layer
|
|
26
|
+
* lift that suits brand and inverse bands.
|
|
27
|
+
*/
|
|
28
|
+
type Shadow = "stage" | "tinted";
|
|
29
|
+
/**
|
|
30
|
+
* How a body narrower than `designWidth` shows its content: cropped at the end edge
|
|
31
|
+
* under a fade, or scaled down whole.
|
|
32
|
+
*/
|
|
33
|
+
type Fit = "crop" | "scale";
|
|
34
|
+
/**
|
|
35
|
+
* Per-part styling for chrome the frame renders besides its host.
|
|
36
|
+
*/
|
|
37
|
+
interface PartsProps {
|
|
38
|
+
/** Styling for the frame itself when a stage wraps it. */
|
|
39
|
+
frame?: TagProps<"div">["mix"];
|
|
40
|
+
/** Styling for the title-bar row. */
|
|
41
|
+
chrome?: TagProps<"div">["mix"];
|
|
42
|
+
/** Styling for the framed body that holds children. */
|
|
43
|
+
body?: TagProps<"div">["mix"];
|
|
44
|
+
/** Styling for the footer strip. */
|
|
45
|
+
footer?: TagProps<"div">["mix"];
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Props accepted by {@link ProductFrame}.
|
|
49
|
+
*/
|
|
50
|
+
interface Props extends Omit<TagProps<"div">, "title"> {
|
|
51
|
+
/** Outer chrome. Defaults to {@link DEFAULT_VARIANT}. */
|
|
52
|
+
variant?: Variant;
|
|
53
|
+
/**
|
|
54
|
+
* Panel the frame is staged on, centred at 86% of its width, and at full width
|
|
55
|
+
* under a thin pad below the `md` container. Host props and `mix` land on the stage.
|
|
56
|
+
* Defaults to {@link DEFAULT_STAGE}.
|
|
57
|
+
*/
|
|
58
|
+
stage?: Stage;
|
|
59
|
+
/**
|
|
60
|
+
* Image or gradient painted behind the frame on `stage="backdrop"`; a
|
|
61
|
+
* radial brand glow fills the stage when omitted. Always `aria-hidden`.
|
|
62
|
+
*/
|
|
63
|
+
backdrop?: RemixNode;
|
|
64
|
+
/**
|
|
65
|
+
* Lift under the frame. Defaults to `"stage"`, and to a deep drop shadow
|
|
66
|
+
* on the device variant.
|
|
67
|
+
*/
|
|
68
|
+
shadow?: Shadow;
|
|
69
|
+
/**
|
|
70
|
+
* Draws three decorative `aria-hidden` dots in the title bar: neutral ink
|
|
71
|
+
* with `true`, the red/amber/green set with `"color"`.
|
|
72
|
+
*/
|
|
73
|
+
lights?: boolean | "color";
|
|
74
|
+
/** Optional window title shown in the chrome bar. */
|
|
75
|
+
title?: RemixNode;
|
|
76
|
+
/** Optional URL or path shown as a quiet mono field in the chrome bar. */
|
|
77
|
+
url?: RemixNode;
|
|
78
|
+
/** Optional caption row under the body, set as a 12px muted strip. */
|
|
79
|
+
footer?: RemixNode;
|
|
80
|
+
/**
|
|
81
|
+
* Narrowest width the framed UI lays out at, such as `"56rem"`. A narrower body keeps
|
|
82
|
+
* the desktop composition and shows it through `fit`, so nothing inside reflows or
|
|
83
|
+
* truncates on a phone.
|
|
84
|
+
*/
|
|
85
|
+
designWidth?: string;
|
|
86
|
+
/** How a body narrower than `designWidth` shows it. Defaults to `"crop"`. */
|
|
87
|
+
fit?: Fit;
|
|
88
|
+
/** Per-part styling for frame, chrome, body and footer. */
|
|
89
|
+
parts?: PartsProps;
|
|
90
|
+
/** Product UI, screenshot, or staged sample inside the frame. */
|
|
91
|
+
children: RemixNode;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Wraps children in soft window or device chrome so a landing media slot reads
|
|
96
|
+
* as a product surface rather than a bare image; `stage` sets it on a tinted
|
|
97
|
+
* panel with room around it.
|
|
98
|
+
*
|
|
99
|
+
* @param handle Runtime handle carrying the host `<div>`'s props.
|
|
100
|
+
* @returns The render function producing the frame's markup.
|
|
101
|
+
* @example
|
|
102
|
+
* <ProductFrame lights title={t("frame.app")} url="app.example.com">
|
|
103
|
+
* <img src={shot} alt={t("frame.alt")} />
|
|
104
|
+
* </ProductFrame>
|
|
105
|
+
* @example
|
|
106
|
+
* <ProductFrame stage="panel" shadow="tinted" footer={t("frame.caption")}>{ui}</ProductFrame>
|
|
107
|
+
*/
|
|
108
|
+
export declare function ProductFrame(handle: Handle<ProductFrame.Props>): () => import("remix/component").RemixElement;
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "remix/component/jsx-runtime";
|
|
2
|
+
import { bg, fg } from "@sdxc/u/color";
|
|
3
|
+
import { rounded } from "@sdxc/u/effects";
|
|
4
|
+
import { raw, mergeMix } from "@sdxc/u/general";
|
|
5
|
+
import { container, gap, hstack, inlineFlex, items, vstack } from "@sdxc/u/layout";
|
|
6
|
+
import { overflow } from "@sdxc/u/overflow";
|
|
7
|
+
import { atMax } from "@sdxc/u/responsive";
|
|
8
|
+
import { bs, is, m, p, pi } from "@sdxc/u/size";
|
|
9
|
+
import { when } from "@sdxc/u/state";
|
|
10
|
+
import { font, text, truncate, weight } from "@sdxc/u/typography";
|
|
11
|
+
/** Corner radius of a framed window or panel; a page sets `--ui-landing-radius-frame` once. */
|
|
12
|
+
const FRAME_RADIUS = "var(--ui-landing-radius-frame, 0.75rem)";
|
|
13
|
+
/** Chrome density {@link ProductFrame} applies when `variant` is omitted. */
|
|
14
|
+
const DEFAULT_VARIANT = "window";
|
|
15
|
+
/** Stage {@link ProductFrame} applies when `stage` is omitted. */
|
|
16
|
+
const DEFAULT_STAGE = "none";
|
|
17
|
+
/** Translucent line the frame's ring, chrome edge and footer edge draw with. */
|
|
18
|
+
const HAIRLINE = "var(--ui-landing-hairline, color-mix(in oklch, CanvasText 8%, transparent))";
|
|
19
|
+
/** Fill of the frame and its body, one step above the band behind it. */
|
|
20
|
+
const SURFACE = "var(--ui-surface-raised, Canvas)";
|
|
21
|
+
/** Chrome bar and footer fill: a hair darker than the body in both schemes. */
|
|
22
|
+
const CHROME_FILL = `color-mix(in oklch, ${SURFACE} 96%, black)`;
|
|
23
|
+
/** Brand 20% the tinted lift casts. */
|
|
24
|
+
const TINT = "color-mix(in oklch, var(--ui-brand-bg-solid) 20%, transparent)";
|
|
25
|
+
/** Edge each shadow treatment draws; every one carries a ring so the frame reads on any band. */
|
|
26
|
+
const SHADOWS = {
|
|
27
|
+
stage: "var(--ui-shadow-stage)",
|
|
28
|
+
tinted: `0 0 0 1px ${HAIRLINE}, 0 20px 25px -5px ${TINT}, 0 8px 10px -6px ${TINT}`,
|
|
29
|
+
device: `0 0 0 1px ${HAIRLINE}, 0 25px 50px -12px rgb(0 0 0 / 0.25)`,
|
|
30
|
+
};
|
|
31
|
+
/** Fill of a neutral traffic-light dot: ink at 15%, quiet enough to leave the shot the focus. */
|
|
32
|
+
const NEUTRAL_LIGHT = "color-mix(in oklch, var(--ui-neutral-fg-emphasis) 15%, transparent)";
|
|
33
|
+
/** Container the framed body declares so a design-width canvas can measure its crop. */
|
|
34
|
+
const BODY_CONTAINER = "ui-product-frame-body";
|
|
35
|
+
/** Width of the fade a cropped canvas draws at its clipped edge. */
|
|
36
|
+
const CROP_FADE = "2rem";
|
|
37
|
+
/**
|
|
38
|
+
* Container width under which a stage drops to a thin pad and lets the frame take its full
|
|
39
|
+
* width, so a phone spends its few pixels on the product rather than on the panel.
|
|
40
|
+
*/
|
|
41
|
+
const STAGE_COMPACT_BELOW = "md";
|
|
42
|
+
/** Glow a `backdrop` stage paints when the page passes no backdrop of its own. */
|
|
43
|
+
const BACKDROP_GLOW = "radial-gradient(ellipse 80% 70% at 50% 0%, color-mix(in oklch, var(--ui-brand-bg-solid) 12%, transparent), transparent 70%)";
|
|
44
|
+
/**
|
|
45
|
+
* Wraps children in soft window or device chrome so a landing media slot reads
|
|
46
|
+
* as a product surface rather than a bare image; `stage` sets it on a tinted
|
|
47
|
+
* panel with room around it.
|
|
48
|
+
*
|
|
49
|
+
* @param handle Runtime handle carrying the host `<div>`'s props.
|
|
50
|
+
* @returns The render function producing the frame's markup.
|
|
51
|
+
* @example
|
|
52
|
+
* <ProductFrame lights title={t("frame.app")} url="app.example.com">
|
|
53
|
+
* <img src={shot} alt={t("frame.alt")} />
|
|
54
|
+
* </ProductFrame>
|
|
55
|
+
* @example
|
|
56
|
+
* <ProductFrame stage="panel" shadow="tinted" footer={t("frame.caption")}>{ui}</ProductFrame>
|
|
57
|
+
*/
|
|
58
|
+
export function ProductFrame(handle) {
|
|
59
|
+
return () => {
|
|
60
|
+
let { backdrop, children, designWidth, fit, footer, lights, mix, parts, shadow, stage, title, url, variant, ...rest } = handle.props;
|
|
61
|
+
let resolvedVariant = variant ?? DEFAULT_VARIANT;
|
|
62
|
+
let resolvedStage = stage ?? DEFAULT_STAGE;
|
|
63
|
+
let isStaged = resolvedStage !== "none";
|
|
64
|
+
let isDevice = resolvedVariant === "device";
|
|
65
|
+
let showChrome = Boolean(lights || title || url);
|
|
66
|
+
let edge = SHADOWS[shadow ?? (isDevice ? "device" : "stage")];
|
|
67
|
+
let frame = (_jsxs("div", { ...(isStaged ? {} : rest), "data-slot": "product-frame", "data-variant": resolvedVariant, "data-shadow": shadow, mix: mergeMix([
|
|
68
|
+
vstack({ gap: 0, align: "stretch" }),
|
|
69
|
+
overflow("hidden"),
|
|
70
|
+
raw({
|
|
71
|
+
backgroundColor: SURFACE,
|
|
72
|
+
borderRadius: isDevice ? "16% / 8%" : FRAME_RADIUS,
|
|
73
|
+
boxShadow: edge,
|
|
74
|
+
}),
|
|
75
|
+
], isStaged
|
|
76
|
+
? [
|
|
77
|
+
raw({
|
|
78
|
+
position: "relative",
|
|
79
|
+
marginInline: "auto",
|
|
80
|
+
maxInlineSize: "86%",
|
|
81
|
+
}),
|
|
82
|
+
atMax(STAGE_COMPACT_BELOW, raw({ maxInlineSize: "100%" })),
|
|
83
|
+
parts?.frame,
|
|
84
|
+
]
|
|
85
|
+
: mix), children: [showChrome ? (_jsxs("div", { "data-slot": "product-frame-chrome", mix: [
|
|
86
|
+
hstack({ gap: 3, align: "center", justify: "between" }),
|
|
87
|
+
p(2, 3),
|
|
88
|
+
raw({
|
|
89
|
+
backgroundColor: CHROME_FILL,
|
|
90
|
+
borderBlockEnd: `1px solid ${HAIRLINE}`,
|
|
91
|
+
}),
|
|
92
|
+
parts?.chrome,
|
|
93
|
+
], children: [_jsxs("span", { mix: [
|
|
94
|
+
hstack({ gap: 3, align: "center" }),
|
|
95
|
+
raw({ flex: "1 1 0", minInlineSize: "0" }),
|
|
96
|
+
overflow("hidden"),
|
|
97
|
+
], children: [lights ? _jsx(FrameLights, { color: lights === "color" }) : null, title ? (_jsx("span", { mix: [text("xs"), weight("medium"), fg("neutral"), truncate(), m(0)], children: title })) : null] }), url ? (_jsx("span", { mix: [
|
|
98
|
+
font("mono"),
|
|
99
|
+
text("xs"),
|
|
100
|
+
fg("neutral.muted"),
|
|
101
|
+
truncate(),
|
|
102
|
+
pi(2),
|
|
103
|
+
raw({ flexShrink: "0", maxInlineSize: "50%" }),
|
|
104
|
+
], children: url })) : null] })) : null, _jsx("div", { "data-slot": "product-frame-body", mix: [
|
|
105
|
+
overflow("hidden"),
|
|
106
|
+
raw({ backgroundColor: SURFACE }),
|
|
107
|
+
when("& > img, & > video", [
|
|
108
|
+
is("100%"),
|
|
109
|
+
bs("auto"),
|
|
110
|
+
raw({ display: "block", verticalAlign: "middle" }),
|
|
111
|
+
]),
|
|
112
|
+
designWidth ? container(BODY_CONTAINER) : [],
|
|
113
|
+
parts?.body,
|
|
114
|
+
], children: designWidth ? (_jsx(DesignCanvas, { width: designWidth, fit: fit ?? "crop", children: children })) : (children) }), footer ? (_jsx("div", { "data-slot": "product-frame-footer", mix: [
|
|
115
|
+
p(2, 3),
|
|
116
|
+
text("xs"),
|
|
117
|
+
fg("neutral.muted"),
|
|
118
|
+
raw({
|
|
119
|
+
backgroundColor: CHROME_FILL,
|
|
120
|
+
borderBlockStart: `1px solid ${HAIRLINE}`,
|
|
121
|
+
}),
|
|
122
|
+
parts?.footer,
|
|
123
|
+
], children: footer })) : null] }));
|
|
124
|
+
if (!isStaged)
|
|
125
|
+
return frame;
|
|
126
|
+
let isBackdrop = resolvedStage === "backdrop";
|
|
127
|
+
return (_jsxs("div", { ...rest, "data-slot": "product-frame-stage", "data-stage": resolvedStage, mix: mergeMix([
|
|
128
|
+
raw({
|
|
129
|
+
/**
|
|
130
|
+
* Ink at 4% sits one step off whatever band holds the stage, light or dark,
|
|
131
|
+
* where the tint token matches a light page exactly.
|
|
132
|
+
*/
|
|
133
|
+
backgroundColor: "color-mix(in oklch, var(--ui-neutral-fg-emphasis) 4%, transparent)",
|
|
134
|
+
boxShadow: "inset 0 0 0 1px var(--ui-landing-hairline)",
|
|
135
|
+
position: "relative",
|
|
136
|
+
isolation: "isolate",
|
|
137
|
+
overflow: "hidden",
|
|
138
|
+
borderRadius: "var(--ui-landing-radius-surface, 1rem)",
|
|
139
|
+
paddingInline: "clamp(1rem, 4cqi, 4rem)",
|
|
140
|
+
paddingBlock: "clamp(1rem, 3cqi, 3rem)",
|
|
141
|
+
backgroundImage: isBackdrop && !backdrop ? BACKDROP_GLOW : "none",
|
|
142
|
+
}),
|
|
143
|
+
atMax(STAGE_COMPACT_BELOW, raw({ padding: "0.75rem" })),
|
|
144
|
+
], mix), children: [isBackdrop && backdrop ? (_jsx("div", { "aria-hidden": "true", "data-slot": "product-frame-backdrop", mix: [
|
|
145
|
+
raw({ position: "absolute", inset: "0", zIndex: "-1" }),
|
|
146
|
+
when("& > img, & > video, & > svg", [
|
|
147
|
+
raw({
|
|
148
|
+
display: "block",
|
|
149
|
+
inlineSize: "100%",
|
|
150
|
+
blockSize: "100%",
|
|
151
|
+
objectFit: "cover",
|
|
152
|
+
}),
|
|
153
|
+
]),
|
|
154
|
+
], children: backdrop })) : null, frame] }));
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Lays the framed UI out at least `width` wide inside the body. A body that narrow or wider
|
|
159
|
+
* shows it at full size; a narrower one crops its end edge under a fade, or with `scale`
|
|
160
|
+
* zooms the whole composition down to the body's width.
|
|
161
|
+
*
|
|
162
|
+
* @param handle Runtime handle carrying the design width and fit.
|
|
163
|
+
* @returns The render function producing the canvas.
|
|
164
|
+
*/
|
|
165
|
+
function DesignCanvas(handle) {
|
|
166
|
+
return () => {
|
|
167
|
+
let { children, fit, width } = handle.props;
|
|
168
|
+
let narrow = fit === "scale"
|
|
169
|
+
? raw({
|
|
170
|
+
inlineSize: width,
|
|
171
|
+
zoom: `tan(atan2(100cqi, ${width}))`,
|
|
172
|
+
})
|
|
173
|
+
: [
|
|
174
|
+
raw({
|
|
175
|
+
maskImage: `linear-gradient(to right, #000 calc(100cqi - ${CROP_FADE}), transparent 100cqi)`,
|
|
176
|
+
}),
|
|
177
|
+
when("&:dir(rtl)", raw({
|
|
178
|
+
maskImage: `linear-gradient(to left, #000 calc(100cqi - ${CROP_FADE}), transparent 100cqi)`,
|
|
179
|
+
})),
|
|
180
|
+
];
|
|
181
|
+
return (_jsx("div", { "data-slot": "product-frame-canvas", "data-fit": fit, mix: [
|
|
182
|
+
raw({ inlineSize: "100%", minInlineSize: fit === "scale" ? "0" : width }),
|
|
183
|
+
atMax(width, BODY_CONTAINER, narrow),
|
|
184
|
+
], children: children }));
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* The three decorative title-bar dots. Neutral by default so the chrome never
|
|
189
|
+
* pulls the eye ahead of the product inside the frame.
|
|
190
|
+
*
|
|
191
|
+
* @param handle Runtime handle carrying whether the dots take status colors.
|
|
192
|
+
* @returns The render function producing the dots.
|
|
193
|
+
*/
|
|
194
|
+
function FrameLights(handle) {
|
|
195
|
+
return () => {
|
|
196
|
+
let neutral = raw({ backgroundColor: NEUTRAL_LIGHT });
|
|
197
|
+
let fills = handle.props.color
|
|
198
|
+
? [bg("danger.solid"), bg("warning.solid"), bg("success.solid")]
|
|
199
|
+
: [neutral, neutral, neutral];
|
|
200
|
+
return (_jsx("span", { "aria-hidden": "true", "data-slot": "product-frame-lights", "data-color": handle.props.color ? "true" : undefined, mix: [inlineFlex(), items("center"), gap(1.5), raw({ flexShrink: "0" })], children: fills.map((fill) => (_jsx("span", { mix: [is(2.5), bs(2.5), rounded("full"), fill] }))) }));
|
|
201
|
+
};
|
|
202
|
+
}
|