@sdxc/ui 2026.10.29 → 2026.11.1
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/{behaviors → app/behaviors}/drag-session.js +1 -1
- package/dist/{behaviors → app/behaviors}/toaster.js +1 -1
- package/dist/{components → app}/chart.d.ts +1 -1
- package/dist/{components → app}/chart.js +18 -34
- package/dist/{components → app}/context-menu.d.ts +2 -2
- package/dist/{components → app}/context-menu.js +8 -7
- package/dist/{components → app}/drop-indicator.js +3 -3
- package/dist/{components → app}/drop-zone.js +3 -3
- package/dist/{components → app}/empty.d.ts +1 -1
- package/dist/{components → app}/empty.js +11 -21
- package/dist/{components → app}/file-trigger.js +2 -2
- 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 +41 -0
- package/dist/app/index.js +41 -0
- package/dist/{components → app}/menubar.js +5 -7
- package/dist/{mixins → app/mixins}/drag-reorder.js +1 -1
- package/dist/{mixins → app/mixins}/drop-zone.js +1 -1
- package/dist/{mixins → app/mixins}/grid-list-keys.js +2 -2
- package/dist/{mixins → app/mixins}/menubar-keys.js +2 -2
- package/dist/{mixins → app/mixins}/resize-handle.js +3 -3
- package/dist/{mixins/treeKeys.js → app/mixins/tree-keys.js} +2 -2
- package/dist/{components → app}/resizable.js +7 -10
- package/dist/{components → app}/shortcut-list.js +4 -3
- package/dist/{components → app}/skeleton.js +3 -3
- 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/{components → app}/table.js +12 -15
- package/dist/{components → app}/toast.js +18 -24
- 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/{utils → app/utils}/chart-path.d.ts +1 -1
- package/dist/{utils → app/utils}/chart-path.js +2 -2
- package/dist/{utils → app/utils}/chart-scale.js +1 -1
- 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/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/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.js +3 -3
- 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 +6 -38
- package/dist/components/index.js +6 -38
- package/dist/components/input.js +3 -4
- 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 +16 -11
- 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/radio-group.js +5 -7
- package/dist/components/range-calendar.js +3 -3
- 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/switch.js +3 -3
- package/dist/components/tabs.js +9 -12
- package/dist/components/tag-group.js +7 -9
- package/dist/components/text-field.js +2 -1
- 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/toggle-button.js +5 -7
- package/dist/components/tooltip.js +3 -3
- package/dist/components/typeset.js +128 -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 +55 -0
- package/dist/docs/docs-feedback.js +72 -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 +53 -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 +46 -0
- package/dist/docs/docs-pager.js +74 -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 +97 -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 +79 -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 +7 -5
- package/dist/{patterns → landing}/faq-band.js +11 -12
- 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/landing/landing-section.d.ts +110 -0
- 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 +14 -4
- package/dist/{components → landing}/split.js +30 -21
- 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 -4
- 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/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 +2 -15
- package/dist/mixins/index.js +2 -15
- package/dist/styles/index.d.ts +2 -5
- package/dist/styles/index.js +2 -5
- package/dist/styles/landing.d.ts +200 -0
- package/dist/styles/landing.js +516 -0
- package/dist/styles/surface-control.d.ts +18 -0
- package/dist/styles/surface-control.js +31 -0
- package/dist/utils/eyebrow.d.ts +39 -0
- package/dist/utils/eyebrow.js +21 -0
- package/dist/utils/index.d.ts +1 -5
- package/dist/utils/index.js +1 -5
- package/package.json +14 -4
- package/src/theme.css +87 -22
- package/dist/components/feature.d.ts +0 -102
- package/dist/components/feature.js +0 -151
- 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.d.ts +0 -81
- package/dist/components/marketing-section.js +0 -103
- package/dist/components/stat-strip.js +0 -64
- 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 -67
- package/dist/patterns/bento.js +0 -95
- 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 -45
- package/dist/patterns/step-list.js +0 -84
- 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/{behaviors → app/behaviors}/toaster.d.ts +0 -0
- /package/dist/{components → app}/drop-indicator.d.ts +0 -0
- /package/dist/{components → app}/drop-zone.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/{components → app}/skeleton.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}/table.d.ts +0 -0
- /package/dist/{components → app}/toast.d.ts +0 -0
- /package/dist/{components → app}/toolbar.d.ts +0 -0
- /package/dist/{utils → app/utils}/chart-marker-indices.d.ts +0 -0
- /package/dist/{utils → app/utils}/chart-marker-indices.js +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
|
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "remix/component/jsx-runtime";
|
|
|
2
2
|
import { XIcon } from "@sdxc/icons";
|
|
3
3
|
import { bg, fg, outline, outlineColor } from "@sdxc/u/color";
|
|
4
4
|
import { opacity, rounded } from "@sdxc/u/effects";
|
|
5
|
-
import { cursor, listStyle, vars } from "@sdxc/u/general";
|
|
5
|
+
import { cursor, listStyle, vars, mergeMix } from "@sdxc/u/general";
|
|
6
6
|
import { flex, flexWrap, gap, inlineFlex, items, vstack } from "@sdxc/u/layout";
|
|
7
7
|
import { bs, is, m, mie, p, pb, pi } from "@sdxc/u/size";
|
|
8
8
|
import { active, data, hover, when } from "@sdxc/u/state";
|
|
@@ -38,7 +38,7 @@ export function TagGroup(handle) {
|
|
|
38
38
|
return () => {
|
|
39
39
|
let { mix, ...rest } = handle.props;
|
|
40
40
|
warnIfNoAccessibleLabel(handle.props, 'TagGroup: a group with no "aria-label" or "aria-labelledby" needs one describing the set of tags — assistive technology has no accessible name to announce otherwise.');
|
|
41
|
-
return (_jsx("div", { ...rest, "data-slot": "tag-group", mix: [attrs({ role: DEFAULT_ROLE }), vstack({ gap: 1 }), mix
|
|
41
|
+
return (_jsx("div", { ...rest, "data-slot": "tag-group", mix: mergeMix([attrs({ role: DEFAULT_ROLE }), vstack({ gap: 1 })], mix) }));
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
44
|
/**
|
|
@@ -57,7 +57,7 @@ export function TagGroup(handle) {
|
|
|
57
57
|
TagGroup.List = function TagGroupList(handle) {
|
|
58
58
|
return () => {
|
|
59
59
|
let { mix, ...rest } = handle.props;
|
|
60
|
-
return (_jsx("ul", { ...rest, "data-slot": "list", mix: [flex(), flexWrap("wrap"), gap(2), m(0), p(0), listStyle(), mix
|
|
60
|
+
return (_jsx("ul", { ...rest, "data-slot": "list", mix: mergeMix([flex(), flexWrap("wrap"), gap(2), m(0), p(0), listStyle()], mix) }));
|
|
61
61
|
};
|
|
62
62
|
};
|
|
63
63
|
/**
|
|
@@ -79,7 +79,7 @@ TagGroup.Tag = function TagGroupTag(handle) {
|
|
|
79
79
|
let { color, size, mix, ...rest } = handle.props;
|
|
80
80
|
let resolvedColor = color ?? DEFAULT_COLOR;
|
|
81
81
|
let resolvedSize = size ?? DEFAULT_SIZE;
|
|
82
|
-
return (_jsx("li", { ...rest, "data-color": resolvedColor, "data-size": resolvedSize, "data-slot": "tag", mix: [
|
|
82
|
+
return (_jsx("li", { ...rest, "data-color": resolvedColor, "data-size": resolvedSize, "data-slot": "tag", mix: mergeMix([
|
|
83
83
|
when("&:focus-visible", [
|
|
84
84
|
outline({ color: "brand.ring", offset: 2 }),
|
|
85
85
|
data("color", "neutral", outline("neutral.ring")),
|
|
@@ -105,8 +105,7 @@ TagGroup.Tag = function TagGroupTag(handle) {
|
|
|
105
105
|
text("sm"),
|
|
106
106
|
data("size", "sm", text("xs")),
|
|
107
107
|
data("color", "neutral", [bg("neutral.bg-tint-hover"), fg("neutral")]),
|
|
108
|
-
|
|
109
|
-
] }));
|
|
108
|
+
], mix) }));
|
|
110
109
|
};
|
|
111
110
|
};
|
|
112
111
|
/**
|
|
@@ -131,7 +130,7 @@ TagGroup.Tag = function TagGroupTag(handle) {
|
|
|
131
130
|
TagGroup.Remove = function TagGroupRemove(handle) {
|
|
132
131
|
return () => {
|
|
133
132
|
let { mix, ...rest } = handle.props;
|
|
134
|
-
return (_jsx(Button, { ...rest, type: "submit", variant: "ghost", "data-slot": "remove", mix: [
|
|
133
|
+
return (_jsx(Button, { ...rest, type: "submit", variant: "ghost", "data-slot": "remove", mix: mergeMix([
|
|
135
134
|
/**
|
|
136
135
|
* The control shrinks through Button's own icon-only measure, so it sits inside
|
|
137
136
|
* the pill's line instead of stretching the tag to a full button row, while
|
|
@@ -156,7 +155,6 @@ TagGroup.Remove = function TagGroupRemove(handle) {
|
|
|
156
155
|
when('[data-color="success"] &:focus-visible', outlineColor("success")),
|
|
157
156
|
when('[data-color="danger"] &:focus-visible', outlineColor("danger")),
|
|
158
157
|
when('[data-color="warning"] &:focus-visible', outlineColor("warning")),
|
|
159
|
-
|
|
160
|
-
], children: _jsx(XIcon, { size: 12 }) }));
|
|
158
|
+
], mix), children: _jsx(XIcon, { size: 12 }) }));
|
|
161
159
|
};
|
|
162
160
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "remix/component/jsx-runtime";
|
|
2
|
+
import { mergeMix } from "@sdxc/u/general";
|
|
2
3
|
import { fieldStackLayout } from "../styles/field-stack-layout.js";
|
|
3
4
|
import { resolveFieldWiring } from "../utils/resolve-field-wiring.js";
|
|
4
5
|
import { Description } from "./description.js";
|
|
@@ -44,7 +45,7 @@ export function TextField(handle) {
|
|
|
44
45
|
description,
|
|
45
46
|
ariaInvalid: ariaInvalidProp,
|
|
46
47
|
});
|
|
47
|
-
return (_jsxs("div", { ...rest, "data-slot": "text-field", mix:
|
|
48
|
+
return (_jsxs("div", { ...rest, "data-slot": "text-field", mix: mergeMix(fieldStackLayout(), mix), children: [_jsx(Label, { htmlFor: handle.id, mix: parts?.label, children: label }), _jsx(Input, { id: handle.id, type: resolvedType, name: name, value: value, defaultValue: defaultValue, placeholder: placeholder, required: required, disabled: disabled, readOnly: readOnly, autoComplete: autoComplete, pattern: pattern, minLength: minLength, maxLength: maxLength,
|
|
48
49
|
// oxlint-disable-next-line jsx-a11y/no-autofocus -- Not a focus grab on page load: this only ever resolves true for the first field an enclosing Form reports as invalid, so a failed submit lands the user on the problem instead of leaving them to hunt for it.
|
|
49
50
|
autoFocus: resolvedAutoFocus, "aria-invalid": resolvedInvalid, "aria-describedby": describedBy, color: resolvedColor, mix: parts?.input }), description ? (_jsx(Description, { id: descriptionId, mix: parts?.description, children: description })) : null, errorMessage ? (_jsx(FieldError, { id: errorId, mix: parts?.error, children: errorMessage })) : null] }));
|
|
50
51
|
};
|
package/dist/components/text.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "remix/component/jsx-runtime";
|
|
2
2
|
import { fg } from "@sdxc/u/color";
|
|
3
|
+
import { mergeMix } from "@sdxc/u/general";
|
|
3
4
|
import { pretty, text } from "@sdxc/u/typography";
|
|
4
5
|
/**
|
|
5
6
|
* Renders its children inside a `<span>` sized and colored as a small run of
|
|
@@ -14,6 +15,6 @@ import { pretty, text } from "@sdxc/u/typography";
|
|
|
14
15
|
export function Text(handle) {
|
|
15
16
|
return () => {
|
|
16
17
|
let { mix, ...rest } = handle.props;
|
|
17
|
-
return _jsx("span", { ...rest, mix: [fg("neutral"), text("sm"), pretty(), mix
|
|
18
|
+
return _jsx("span", { ...rest, mix: mergeMix([fg("neutral"), text("sm"), pretty()], mix) });
|
|
18
19
|
};
|
|
19
20
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "remix/component/jsx-runtime";
|
|
2
2
|
import { border, bg, fg, outline } from "@sdxc/u/color";
|
|
3
3
|
import { rounded, opacity } from "@sdxc/u/effects";
|
|
4
|
-
import { cursor, raw } from "@sdxc/u/general";
|
|
4
|
+
import { cursor, raw, mergeMix } from "@sdxc/u/general";
|
|
5
5
|
import { block } from "@sdxc/u/layout";
|
|
6
6
|
import { is, bs, minBs, pi, pb } from "@sdxc/u/size";
|
|
7
7
|
import { when, hover, invalid } from "@sdxc/u/state";
|
|
@@ -33,7 +33,7 @@ export function TextArea(handle) {
|
|
|
33
33
|
return () => {
|
|
34
34
|
let { color, mix, ...rest } = handle.props;
|
|
35
35
|
let resolvedColor = color ?? DEFAULT_COLOR;
|
|
36
|
-
return (_jsx("textarea", { ...rest, "data-color": resolvedColor, mix: [
|
|
36
|
+
return (_jsx("textarea", { ...rest, "data-color": resolvedColor, mix: mergeMix([
|
|
37
37
|
interactiveTransition(),
|
|
38
38
|
block(),
|
|
39
39
|
is("full"),
|
|
@@ -76,7 +76,6 @@ export function TextArea(handle) {
|
|
|
76
76
|
fieldSizing: "content",
|
|
77
77
|
}),
|
|
78
78
|
when("&:focus", outline("none")),
|
|
79
|
-
|
|
80
|
-
] }));
|
|
79
|
+
], mix) }));
|
|
81
80
|
};
|
|
82
81
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "remix/component/jsx-runtime";
|
|
2
|
+
import { mergeMix } from "@sdxc/u/general";
|
|
2
3
|
import { tabularNums } from "@sdxc/u/typography";
|
|
3
4
|
import { fieldStackLayout } from "../styles/field-stack-layout.js";
|
|
4
5
|
import { resolveFieldWiring } from "../utils/resolve-field-wiring.js";
|
|
@@ -42,7 +43,7 @@ export function TimeField(handle) {
|
|
|
42
43
|
description,
|
|
43
44
|
ariaInvalid: ariaInvalidProp,
|
|
44
45
|
});
|
|
45
|
-
return (_jsxs("div", { ...rest, "data-slot": "time-field", mix:
|
|
46
|
+
return (_jsxs("div", { ...rest, "data-slot": "time-field", mix: mergeMix(fieldStackLayout(), mix), children: [_jsx(Label, { htmlFor: handle.id, mix: parts?.label, children: label }), _jsx(Input, { id: handle.id, type: "time", name: name, value: value, defaultValue: defaultValue, min: min, max: max, step: step, required: required, disabled: disabled, readOnly: readOnly, autoComplete: autoComplete,
|
|
46
47
|
// oxlint-disable-next-line jsx-a11y/no-autofocus -- Not a focus grab on page load: this only ever resolves true for the first field an enclosing Form reports as invalid, so a failed submit lands the user on the problem instead of leaving them to hunt for it.
|
|
47
48
|
autoFocus: resolvedAutoFocus, "aria-invalid": resolvedInvalid, "aria-describedby": describedBy, color: resolvedColor, mix: [tabularNums(), parts?.input] }), description ? (_jsx(Description, { id: descriptionId, mix: parts?.description, children: description })) : null, errorMessage ? (_jsx(FieldError, { id: errorId, mix: parts?.error, children: errorMessage })) : null] }));
|
|
48
49
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "remix/component/jsx-runtime";
|
|
2
2
|
import { bg, border, fg, outline } from "@sdxc/u/color";
|
|
3
3
|
import { rounded, opacity } from "@sdxc/u/effects";
|
|
4
|
-
import { cursor, userSelect } from "@sdxc/u/general";
|
|
4
|
+
import { cursor, userSelect, mergeMix } from "@sdxc/u/general";
|
|
5
5
|
import { flex, flexCol, inlineFlex, items, justify, gap, shrink } from "@sdxc/u/layout";
|
|
6
6
|
import { bs, is, minBs, pi, pb, pie, pis } from "@sdxc/u/size";
|
|
7
7
|
import { when, hover, active, data } from "@sdxc/u/state";
|
|
@@ -65,7 +65,7 @@ export function ToggleButton(handle) {
|
|
|
65
65
|
let resolvedPressed = resolveAriaPressed(pressed);
|
|
66
66
|
let edges = glyphEdges(children);
|
|
67
67
|
warnIfNoAccessibleName(handle.props, children, "ToggleButton: an icon-only toggle needs an `aria-label` describing what it does — assistive technology has no accessible name to announce otherwise.");
|
|
68
|
-
return (_jsx("button", { ...rest, "aria-pressed": resolvedPressed, "data-color": resolvedColor, "data-variant": resolvedVariant, "data-size": resolvedSize, "data-glyph-start": edges.start || undefined, "data-glyph-end": edges.end || undefined, mix: [
|
|
68
|
+
return (_jsx("button", { ...rest, "aria-pressed": resolvedPressed, "data-color": resolvedColor, "data-variant": resolvedVariant, "data-size": resolvedSize, "data-glyph-start": edges.start || undefined, "data-glyph-end": edges.end || undefined, mix: mergeMix([
|
|
69
69
|
when("&:focus-visible", [
|
|
70
70
|
outline({ color: "brand.ring", offset: 2 }),
|
|
71
71
|
when('&[data-color="neutral"]', outline("neutral.ring")),
|
|
@@ -231,8 +231,7 @@ export function ToggleButton(handle) {
|
|
|
231
231
|
]),
|
|
232
232
|
when("&:disabled", opacity(50)),
|
|
233
233
|
when("&:disabled", cursor("not-allowed")),
|
|
234
|
-
|
|
235
|
-
], children: children }));
|
|
234
|
+
], mix), children: children }));
|
|
236
235
|
};
|
|
237
236
|
}
|
|
238
237
|
/**
|
|
@@ -265,13 +264,12 @@ export function ToggleButtonGroup(handle) {
|
|
|
265
264
|
return () => {
|
|
266
265
|
let { orientation, mix, ...rest } = handle.props;
|
|
267
266
|
let resolvedOrientation = orientation ?? DEFAULT_GROUP_ORIENTATION;
|
|
268
|
-
return (_jsx("div", { "data-orientation": resolvedOrientation, ...rest, mix: [
|
|
267
|
+
return (_jsx("div", { "data-orientation": resolvedOrientation, ...rest, mix: mergeMix([
|
|
269
268
|
attrs({ role: DEFAULT_GROUP_ROLE }),
|
|
270
269
|
flex(),
|
|
271
270
|
items("center"),
|
|
272
271
|
gap("0.25rem"),
|
|
273
272
|
when('&[data-orientation="vertical"]', [flexCol(), items("start")]),
|
|
274
|
-
|
|
275
|
-
] }));
|
|
273
|
+
], mix) }));
|
|
276
274
|
};
|
|
277
275
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "remix/component/jsx-runtime";
|
|
2
2
|
import { bg, fg, fill } from "@sdxc/u/color";
|
|
3
3
|
import { opacity, rounded, shadow, transition, transitionBehavior } from "@sdxc/u/effects";
|
|
4
|
+
import { mergeMix } from "@sdxc/u/general";
|
|
4
5
|
import { block } from "@sdxc/u/layout";
|
|
5
6
|
import { media, startingStyle } from "@sdxc/u/responsive";
|
|
6
7
|
import { pb, pi } from "@sdxc/u/size";
|
|
@@ -58,7 +59,7 @@ export function Tooltip(handle) {
|
|
|
58
59
|
let { placement, showArrow, children, mix, ...rest } = handle.props;
|
|
59
60
|
let resolvedPlacement = placement ?? DEFAULT_PLACEMENT;
|
|
60
61
|
let resolvedShowArrow = showArrow ?? DEFAULT_SHOW_ARROW;
|
|
61
|
-
return (_jsxs(Popover, { ...rest, popover: "hint", role: "tooltip", placement: resolvedPlacement, mix: [
|
|
62
|
+
return (_jsxs(Popover, { ...rest, popover: "hint", role: "tooltip", placement: resolvedPlacement, mix: mergeMix([
|
|
62
63
|
rounded("md"),
|
|
63
64
|
pi(2),
|
|
64
65
|
pb(1),
|
|
@@ -86,7 +87,6 @@ export function Tooltip(handle) {
|
|
|
86
87
|
}),
|
|
87
88
|
scaleProperty("none"),
|
|
88
89
|
]),
|
|
89
|
-
|
|
90
|
-
], children: [children, resolvedShowArrow && (_jsx(OverlayArrow, { placement: resolvedPlacement, mix: fill("neutral.solid"), children: _jsx("svg", { width: 8, height: 8, viewBox: "0 0 8 8", children: _jsx("path", { d: "M0 0 L4 4 L8 0" }) }) }))] }));
|
|
90
|
+
], mix), children: [children, resolvedShowArrow && (_jsx(OverlayArrow, { placement: resolvedPlacement, mix: fill("neutral.solid"), children: _jsx("svg", { width: 8, height: 8, viewBox: "0 0 8 8", children: _jsx("path", { d: "M0 0 L4 4 L8 0" }) }) }))] }));
|
|
91
91
|
};
|
|
92
92
|
}
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "remix/component/jsx-runtime";
|
|
|
2
2
|
import { keyframes } from "@sdxc/u/animation";
|
|
3
3
|
import { bg, border, borderEdge, fg, outline } from "@sdxc/u/color";
|
|
4
4
|
import { rounded } from "@sdxc/u/effects";
|
|
5
|
-
import { raw } from "@sdxc/u/general";
|
|
5
|
+
import { raw, mergeMix } from "@sdxc/u/general";
|
|
6
6
|
import { block, container } from "@sdxc/u/layout";
|
|
7
7
|
import { overflow, overflowBlock, overflowInline } from "@sdxc/u/overflow";
|
|
8
8
|
import { at } from "@sdxc/u/responsive";
|
|
@@ -17,6 +17,8 @@ import { easings } from "../animations/tokens.js";
|
|
|
17
17
|
* space, instead of reading the viewport.
|
|
18
18
|
*/
|
|
19
19
|
const CONTAINER_NAME = "ui-typeset";
|
|
20
|
+
/** Matches an element that is neither a `data-not-typeset` subtree's root nor inside one. */
|
|
21
|
+
const OUTSIDE_OPT_OUT = ":not(:where([data-not-typeset], [data-not-typeset] *))";
|
|
20
22
|
/** Rhythm context {@link Typeset} falls back to when `preset` is omitted. */
|
|
21
23
|
const DEFAULT_PRESET = "docs";
|
|
22
24
|
/**
|
|
@@ -72,6 +74,17 @@ const TABLE_FADE_KEYFRAMES = {
|
|
|
72
74
|
},
|
|
73
75
|
"100%": { maskImage: tableFadeMask(TABLE_FADE_SIZE, "100%") },
|
|
74
76
|
};
|
|
77
|
+
/**
|
|
78
|
+
* Narrows a descendant rule to elements outside every `data-not-typeset` subtree. Each rule
|
|
79
|
+
* the layer writes lands in a cascade layer of its own, so an opt-out has to be part of the
|
|
80
|
+
* rule's selector; the exclusion adds no specificity, and it sits ahead of a pseudo-element.
|
|
81
|
+
*/
|
|
82
|
+
function prose(selector) {
|
|
83
|
+
let pseudoElement = selector.indexOf("::");
|
|
84
|
+
if (pseudoElement === -1)
|
|
85
|
+
return `${selector}${OUTSIDE_OPT_OUT}`;
|
|
86
|
+
return `&${selector.slice(1, pseudoElement)}${OUTSIDE_OPT_OUT}${selector.slice(pseudoElement)}`;
|
|
87
|
+
}
|
|
75
88
|
/**
|
|
76
89
|
* Renders a `<div>` that sizes and colors already-rendered markdown or HTML
|
|
77
90
|
* content through `--ui-typeset-size`, `--ui-typeset-leading`, and
|
|
@@ -97,7 +110,7 @@ export function Typeset(handle) {
|
|
|
97
110
|
return () => {
|
|
98
111
|
let { preset, mix, ...rest } = handle.props;
|
|
99
112
|
let resolvedPreset = preset ?? DEFAULT_PRESET;
|
|
100
|
-
return (_jsx("div", { ...rest, "data-preset": resolvedPreset, "data-slot": "typeset", mix: [
|
|
113
|
+
return (_jsx("div", { ...rest, "data-preset": resolvedPreset, "data-slot": "typeset", mix: mergeMix([
|
|
101
114
|
fg("neutral.emphasis"),
|
|
102
115
|
container(CONTAINER_NAME),
|
|
103
116
|
keyframes(TABLE_FADE_KEYFRAMES_NAME, TABLE_FADE_KEYFRAMES),
|
|
@@ -119,147 +132,140 @@ export function Typeset(handle) {
|
|
|
119
132
|
"--ui-typeset-leading": "1.8",
|
|
120
133
|
"--ui-typeset-flow": "1.5em",
|
|
121
134
|
},
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
135
|
+
}),
|
|
136
|
+
when(prose("& > * + *"), raw({
|
|
137
|
+
marginBlockStart: "var(--ui-typeset-flow, 1.25em)",
|
|
138
|
+
})),
|
|
139
|
+
when(prose("& :where(blockquote, li) > * + *"), raw({
|
|
140
|
+
marginBlockStart: "var(--ui-typeset-flow, 1.25em)",
|
|
141
|
+
})),
|
|
142
|
+
when(prose("& :where(h1)"), raw({
|
|
143
|
+
fontSize: `calc(${TYPESET_SIZE} * 2)`,
|
|
144
|
+
})),
|
|
145
|
+
when(prose("& :where(h2)"), raw({
|
|
146
|
+
fontSize: `calc(${TYPESET_SIZE} * 1.5)`,
|
|
147
|
+
})),
|
|
148
|
+
when(prose("& :where(h3)"), raw({
|
|
149
|
+
fontSize: `calc(${TYPESET_SIZE} * 1.25)`,
|
|
150
|
+
})),
|
|
151
|
+
when(prose("& :where(h4)"), raw({
|
|
152
|
+
fontSize: `calc(${TYPESET_SIZE} * 1.125)`,
|
|
153
|
+
})),
|
|
154
|
+
when(prose("& :where(h5)"), raw({
|
|
155
|
+
fontSize: TYPESET_SIZE,
|
|
156
|
+
})),
|
|
157
|
+
when(prose("& :where(h6)"), raw({
|
|
158
|
+
fontSize: `calc(${TYPESET_SIZE} * 0.875)`,
|
|
159
|
+
})),
|
|
160
|
+
when(prose("& :where(ul)"), raw({
|
|
161
|
+
listStyleType: "disc",
|
|
162
|
+
})),
|
|
163
|
+
when(prose("& :where(ol)"), raw({
|
|
164
|
+
listStyleType: "decimal",
|
|
165
|
+
})),
|
|
166
|
+
when(prose("& :where(ul, ol) :where(ul)"), raw({
|
|
167
|
+
listStyleType: "circle",
|
|
168
|
+
})),
|
|
169
|
+
when(prose("& :where(blockquote)"), raw({
|
|
170
|
+
fontStyle: "italic",
|
|
171
|
+
})),
|
|
172
|
+
when(prose("& :where(a)"), raw({
|
|
173
|
+
textUnderlineOffset: "0.15em",
|
|
174
|
+
})),
|
|
175
|
+
when(prose("& :where(a):hover"), raw({
|
|
176
|
+
textDecorationThickness: "2px",
|
|
177
|
+
})),
|
|
178
|
+
when(prose("& :where(em, i)"), raw({
|
|
179
|
+
fontStyle: "italic",
|
|
180
|
+
})),
|
|
181
|
+
when(prose("& :where(code)"), raw({
|
|
182
|
+
fontSize: "0.875em",
|
|
183
|
+
})),
|
|
184
|
+
when(prose("& :where(pre)"), raw({
|
|
185
|
+
fontSize: "0.875em",
|
|
186
|
+
})),
|
|
187
|
+
when(prose("& :where(pre code)"), raw({
|
|
188
|
+
padding: "0",
|
|
189
|
+
fontSize: "1em",
|
|
190
|
+
})),
|
|
191
|
+
when(prose("& :where(table)"), raw({
|
|
192
|
+
borderCollapse: "collapse",
|
|
193
|
+
fontSize: "0.875em",
|
|
194
|
+
scrollbarWidth: "thin",
|
|
195
|
+
scrollbarGutter: "stable",
|
|
196
|
+
[TABLE_FADE_DIRECTION_PROPERTY]: "right",
|
|
197
|
+
maskImage: "none",
|
|
198
|
+
"-webkit-mask-image": "none",
|
|
199
|
+
"&:dir(rtl)": {
|
|
200
|
+
[TABLE_FADE_DIRECTION_PROPERTY]: "left",
|
|
163
201
|
},
|
|
164
|
-
"
|
|
165
|
-
|
|
202
|
+
"&::-webkit-scrollbar": {
|
|
203
|
+
width: "0.75rem",
|
|
204
|
+
height: "0.75rem",
|
|
166
205
|
},
|
|
167
|
-
"
|
|
168
|
-
|
|
206
|
+
"&::-webkit-scrollbar-track": {
|
|
207
|
+
backgroundColor: "transparent",
|
|
169
208
|
},
|
|
170
|
-
"
|
|
171
|
-
|
|
209
|
+
"&::-webkit-scrollbar-thumb": {
|
|
210
|
+
borderRadius: "var(--ui-radius-full, 9999px)",
|
|
211
|
+
backgroundColor: "var(--ui-neutral-border)",
|
|
212
|
+
borderWidth: "3px",
|
|
213
|
+
borderStyle: "solid",
|
|
214
|
+
borderColor: "transparent",
|
|
215
|
+
backgroundClip: "content-box",
|
|
172
216
|
},
|
|
173
|
-
"
|
|
174
|
-
|
|
175
|
-
fontSize: "1em",
|
|
217
|
+
"&::-webkit-scrollbar-thumb:hover": {
|
|
218
|
+
backgroundColor: "var(--ui-neutral-border-strong)",
|
|
176
219
|
},
|
|
177
|
-
"
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
},
|
|
188
|
-
"&::-webkit-scrollbar": {
|
|
189
|
-
width: "0.75rem",
|
|
190
|
-
height: "0.75rem",
|
|
191
|
-
},
|
|
192
|
-
"&::-webkit-scrollbar-track": {
|
|
193
|
-
backgroundColor: "transparent",
|
|
194
|
-
},
|
|
195
|
-
"&::-webkit-scrollbar-thumb": {
|
|
196
|
-
borderRadius: "var(--ui-radius-full, 9999px)",
|
|
197
|
-
backgroundColor: "var(--ui-neutral-border)",
|
|
198
|
-
borderWidth: "3px",
|
|
199
|
-
borderStyle: "solid",
|
|
200
|
-
borderColor: "transparent",
|
|
201
|
-
backgroundClip: "content-box",
|
|
202
|
-
},
|
|
203
|
-
"&::-webkit-scrollbar-thumb:hover": {
|
|
204
|
-
backgroundColor: "var(--ui-neutral-border-strong)",
|
|
205
|
-
},
|
|
206
|
-
"@supports (animation-timeline: scroll())": {
|
|
207
|
-
animationName: TABLE_FADE_KEYFRAMES_NAME,
|
|
208
|
-
animationDuration: "auto",
|
|
209
|
-
animationTimingFunction: easings.linear,
|
|
210
|
-
animationFillMode: "both",
|
|
211
|
-
animationTimeline: "scroll(self inline)",
|
|
212
|
-
"@media (prefers-reduced-motion: reduce)": {
|
|
213
|
-
animationName: "none",
|
|
214
|
-
maskImage: TABLE_FADE_SETTLED_MASK,
|
|
215
|
-
"-webkit-mask-image": TABLE_FADE_SETTLED_MASK,
|
|
216
|
-
},
|
|
220
|
+
"@supports (animation-timeline: scroll())": {
|
|
221
|
+
animationName: TABLE_FADE_KEYFRAMES_NAME,
|
|
222
|
+
animationDuration: "auto",
|
|
223
|
+
animationTimingFunction: easings.linear,
|
|
224
|
+
animationFillMode: "both",
|
|
225
|
+
animationTimeline: "scroll(self inline)",
|
|
226
|
+
"@media (prefers-reduced-motion: reduce)": {
|
|
227
|
+
animationName: "none",
|
|
228
|
+
maskImage: TABLE_FADE_SETTLED_MASK,
|
|
229
|
+
"-webkit-mask-image": TABLE_FADE_SETTLED_MASK,
|
|
217
230
|
},
|
|
218
231
|
},
|
|
219
|
-
"& :where([data-not-typeset], [data-not-typeset] *)": {
|
|
220
|
-
all: "revert-layer",
|
|
221
|
-
},
|
|
222
|
-
}),
|
|
223
|
-
at("30rem", CONTAINER_NAME, raw({
|
|
224
|
-
"& :where(th, td)": {
|
|
225
|
-
paddingInline: "1em",
|
|
226
|
-
},
|
|
227
|
-
"& :where(pre)": {
|
|
228
|
-
paddingInline: "1.25em",
|
|
229
|
-
},
|
|
230
232
|
})),
|
|
231
|
-
|
|
232
|
-
|
|
233
|
+
at("30rem", CONTAINER_NAME, [
|
|
234
|
+
when(prose("& :where(th, td)"), raw({ paddingInline: "1em" })),
|
|
235
|
+
when(prose("& :where(pre)"), raw({ paddingInline: "1.25em" })),
|
|
236
|
+
]),
|
|
237
|
+
when(prose("& :where(pre)"), leading(1.6)),
|
|
238
|
+
when(prose("& :where(h1, h2, h3, h4, h5, h6)"), [
|
|
233
239
|
weight("semibold"),
|
|
234
240
|
leading(1.25),
|
|
235
241
|
tracking("tight"),
|
|
236
242
|
fg("neutral.emphasis"),
|
|
237
243
|
balance(),
|
|
238
244
|
]),
|
|
239
|
-
when("& :where(h6)", fg("neutral")),
|
|
240
|
-
when("& :where(p, li, blockquote, dd)", pretty()),
|
|
241
|
-
when("& :where(ul, ol)", pis("1.5em")),
|
|
242
|
-
when("& :where(li)::marker", fg("neutral.muted")),
|
|
243
|
-
when("& :where(blockquote)", [
|
|
245
|
+
when(prose("& :where(h6)"), fg("neutral")),
|
|
246
|
+
when(prose("& :where(p, li, blockquote, dd)"), pretty()),
|
|
247
|
+
when(prose("& :where(ul, ol)"), pis("1.5em")),
|
|
248
|
+
when(prose("& :where(li)::marker"), fg("neutral.muted")),
|
|
249
|
+
when(prose("& :where(blockquote)"), [
|
|
244
250
|
pis("1em"),
|
|
245
251
|
fg("neutral"),
|
|
246
252
|
borderEdge("inline-start", { color: "neutral", width: "0.25em" }),
|
|
247
253
|
]),
|
|
248
|
-
when("& :where(hr)", borderEdge("block-start", { color: "neutral", width: "1px" })),
|
|
249
|
-
when("& :where(a)", [fg("brand"), textDecoration("underline")]),
|
|
250
|
-
when("& :where(a):focus-visible", [
|
|
254
|
+
when(prose("& :where(hr)"), borderEdge("block-start", { color: "neutral", width: "1px" })),
|
|
255
|
+
when(prose("& :where(a)"), [fg("brand"), textDecoration("underline")]),
|
|
256
|
+
when(prose("& :where(a):focus-visible"), [
|
|
251
257
|
outline({ color: "brand.ring", offset: 2 }),
|
|
252
258
|
rounded("xs"),
|
|
253
259
|
]),
|
|
254
|
-
when("& :where(strong, b)", [weight("semibold"), fg("neutral.emphasis")]),
|
|
255
|
-
when("& :where(code)", [
|
|
260
|
+
when(prose("& :where(strong, b)"), [weight("semibold"), fg("neutral.emphasis")]),
|
|
261
|
+
when(prose("& :where(code)"), [
|
|
256
262
|
rounded("sm"),
|
|
257
263
|
bg("neutral.tint"),
|
|
258
264
|
fg("neutral.emphasis"),
|
|
259
265
|
pi("0.3em"),
|
|
260
266
|
pb("0.15em"),
|
|
261
267
|
]),
|
|
262
|
-
when("& :where(pre)", [
|
|
268
|
+
when(prose("& :where(pre)"), [
|
|
263
269
|
rounded("md"),
|
|
264
270
|
border({ color: "neutral.border", width: 1 }),
|
|
265
271
|
bg("neutral.tint"),
|
|
@@ -278,28 +284,27 @@ export function Typeset(handle) {
|
|
|
278
284
|
* apply at the start of the box alone and indent the block's first line
|
|
279
285
|
* past every line under it. The block's own padding is the `pre`'s.
|
|
280
286
|
*/
|
|
281
|
-
when("& :where(pre code)", [
|
|
287
|
+
when(prose("& :where(pre code)"), [
|
|
282
288
|
bg("transparent"),
|
|
283
289
|
fg("inherit"),
|
|
284
290
|
rounded("none"),
|
|
285
291
|
pi(0),
|
|
286
292
|
pb(0),
|
|
287
293
|
]),
|
|
288
|
-
when("& :where(table)", [
|
|
294
|
+
when(prose("& :where(table)"), [
|
|
289
295
|
block(),
|
|
290
296
|
is("max(100%, max-content)"),
|
|
291
297
|
maxIs("full"),
|
|
292
298
|
overflow("auto"),
|
|
293
299
|
]),
|
|
294
|
-
when("& :where(th, td):not([align])", textAlign("start")),
|
|
295
|
-
when("& :where(th)", [weight("semibold"), fg("neutral.emphasis")]),
|
|
296
|
-
when("& :where(th, td)", [
|
|
300
|
+
when(prose("& :where(th, td):not([align])"), textAlign("start")),
|
|
301
|
+
when(prose("& :where(th)"), [weight("semibold"), fg("neutral.emphasis")]),
|
|
302
|
+
when(prose("& :where(th, td)"), [
|
|
297
303
|
tabularNums(),
|
|
298
304
|
pi("0.75em"),
|
|
299
305
|
pb("0.5em"),
|
|
300
306
|
borderEdge("block-end", { color: "neutral", width: "1px" }),
|
|
301
307
|
]),
|
|
302
|
-
|
|
303
|
-
] }));
|
|
308
|
+
], mix) }));
|
|
304
309
|
};
|
|
305
310
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "remix/component/jsx-runtime";
|
|
2
2
|
import { border } from "@sdxc/u/color";
|
|
3
3
|
import { rounded } from "@sdxc/u/effects";
|
|
4
|
+
import { mergeMix } from "@sdxc/u/general";
|
|
4
5
|
import { block } from "@sdxc/u/layout";
|
|
5
6
|
import { aspect, is } from "@sdxc/u/size";
|
|
6
7
|
/** The host every player loads from; a page's `frame-src` has to allow it. */
|
|
@@ -24,6 +25,6 @@ export function YouTubeEmbed(handle) {
|
|
|
24
25
|
let src = new URL(`/embed/${encodeURIComponent(videoId)}`, EMBED_ORIGIN);
|
|
25
26
|
if (start !== undefined && start >= 1)
|
|
26
27
|
src.searchParams.set("start", String(Math.floor(start)));
|
|
27
|
-
return (_jsx("iframe", { ...rest, "data-slot": "youtube-embed", src: src.href, title: title, loading: loading ?? DEFAULT_LOADING, referrerpolicy: "strict-origin-when-cross-origin", allow: ALLOWED_FEATURES, allowFullScreen: true, mix: [block(), is("full"), aspect("video"), border("none"), rounded("lg"), mix
|
|
28
|
+
return (_jsx("iframe", { ...rest, "data-slot": "youtube-embed", src: src.href, title: title, loading: loading ?? DEFAULT_LOADING, referrerpolicy: "strict-origin-when-cross-origin", allow: ALLOWED_FEATURES, allowFullScreen: true, mix: mergeMix([block(), is("full"), aspect("video"), border("none"), rounded("lg")], mix) }));
|
|
28
29
|
};
|
|
29
30
|
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A docs section heading a reader can link to: it carries an `id`, a `#` link that shows
|
|
3
|
+
* on hover and focus, room above it for a sticky header, and a short highlight when a jump
|
|
4
|
+
* lands on it. Its typography comes from the surrounding prose, such as `Typeset`.
|
|
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 { HeadingLevel } from "../components/heading-scope.js";
|
|
11
|
+
/**
|
|
12
|
+
* Custom property setting the space a jump leaves above the heading; set it on any
|
|
13
|
+
* ancestor to the sticky header's height plus breathing room.
|
|
14
|
+
*/
|
|
15
|
+
export declare const ANCHOR_HEADING_SCROLL_MARGIN = "--ui-docs-scroll-margin";
|
|
16
|
+
/**
|
|
17
|
+
* Prop types for {@link AnchorHeading}.
|
|
18
|
+
*/
|
|
19
|
+
export declare namespace AnchorHeading {
|
|
20
|
+
/** Props accepted by {@link AnchorHeading}. */
|
|
21
|
+
interface Props extends Omit<TagProps<"h2">, "id"> {
|
|
22
|
+
/** Fragment the heading answers to, and the `#` link's target. */
|
|
23
|
+
id: string;
|
|
24
|
+
/** Defaults to the ambient `HeadingScope` level, else {@link DEFAULT_LEVEL}. */
|
|
25
|
+
level?: HeadingLevel;
|
|
26
|
+
/** Accessible name of the `#` link, such as "Link to Install". */
|
|
27
|
+
linkLabel: string;
|
|
28
|
+
children: RemixNode;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Renders the heading with its `#` link after the text. The link stays in the tab order
|
|
33
|
+
* at all times, shows on hover of the heading or on its own focus, and shows always on
|
|
34
|
+
* devices without hover. Jumps clear `--ui-docs-scroll-margin` (default `5rem`).
|
|
35
|
+
*
|
|
36
|
+
* @param handle Runtime handle carrying the heading's props.
|
|
37
|
+
* @returns The render function producing the heading's markup.
|
|
38
|
+
* @example
|
|
39
|
+
* <AnchorHeading id="install" linkLabel="Link to Install">Install</AnchorHeading>
|
|
40
|
+
*/
|
|
41
|
+
export declare function AnchorHeading(handle: Handle<AnchorHeading.Props>): () => import("remix/component").RemixElement;
|