@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
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A course or book curriculum: parts with their totals, each a list of numbered lessons a
|
|
3
|
+
* visitor can open to see the subtopics or a preview link, under an optional totals row,
|
|
4
|
+
* so "what's inside" reads at a glance and in depth without leaving the page.
|
|
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 Curriculum} and its compound parts.
|
|
12
|
+
*/
|
|
13
|
+
export declare namespace Curriculum {
|
|
14
|
+
/**
|
|
15
|
+
* How parts sit: side by side from the `lg` container (`columns`), or one under the
|
|
16
|
+
* other at every width (`stack`) for a course with many or long parts.
|
|
17
|
+
*/
|
|
18
|
+
type Layout = "columns" | "stack";
|
|
19
|
+
/**
|
|
20
|
+
* Props accepted by {@link Curriculum}.
|
|
21
|
+
*/
|
|
22
|
+
interface Props extends TagProps<"div"> {
|
|
23
|
+
/** Arrangement. Defaults to {@link DEFAULT_LAYOUT}. */
|
|
24
|
+
layout?: Layout;
|
|
25
|
+
/** Totals above the parts, such as a `StatStrip` of chapters, pages and hours. */
|
|
26
|
+
summary?: RemixNode;
|
|
27
|
+
/** {@link Curriculum.Part} children. */
|
|
28
|
+
children: RemixNode;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Props accepted by {@link Curriculum.Part}.
|
|
32
|
+
*/
|
|
33
|
+
interface PartProps extends Omit<TagProps<"section">, "title"> {
|
|
34
|
+
/** The part's title, rendered as a heading at the ambient depth. */
|
|
35
|
+
title: RemixNode;
|
|
36
|
+
/** The part's totals, such as "5 chapters · 112 pages". */
|
|
37
|
+
meta?: RemixNode;
|
|
38
|
+
/** {@link Curriculum.Lesson} children. */
|
|
39
|
+
children: RemixNode;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Props accepted by {@link Curriculum.Lesson}.
|
|
43
|
+
*/
|
|
44
|
+
interface LessonProps extends Omit<TagProps<"li">, "title"> {
|
|
45
|
+
/** The lesson's number as shown, such as "01". */
|
|
46
|
+
number: RemixNode;
|
|
47
|
+
/** The lesson's title. */
|
|
48
|
+
title: RemixNode;
|
|
49
|
+
/** Length at the row's inline end, such as "18 pages" or "12 min". */
|
|
50
|
+
meta?: RemixNode;
|
|
51
|
+
/** A short flag after the title, such as "Free" or "Preview", drawn as a {@link Badge}. */
|
|
52
|
+
badge?: RemixNode;
|
|
53
|
+
/** Starts the lesson expanded. */
|
|
54
|
+
open?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* What opens under the row: subtopics, usually a `CheckList`, and a preview link.
|
|
57
|
+
* Without children the row is static and draws no chevron.
|
|
58
|
+
*/
|
|
59
|
+
children?: RemixNode;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Lays the optional summary over the parts, and opens a heading scope so part titles sit
|
|
64
|
+
* one level under the band's title.
|
|
65
|
+
*
|
|
66
|
+
* @param handle Runtime handle carrying the host `<div>`'s props.
|
|
67
|
+
* @returns The render function producing the curriculum's markup.
|
|
68
|
+
* @example
|
|
69
|
+
* <Curriculum summary={<StatStrip>{totals}</StatStrip>}>
|
|
70
|
+
* <Curriculum.Part title={t("part.one")} meta="5 chapters · 112 pages">
|
|
71
|
+
* <Curriculum.Lesson number="01" title={t("ch.one")} meta="18 pages" badge="Free" />
|
|
72
|
+
* </Curriculum.Part>
|
|
73
|
+
* </Curriculum>
|
|
74
|
+
*/
|
|
75
|
+
export declare function Curriculum(handle: Handle<Curriculum.Props>): () => import("remix/component").RemixElement;
|
|
76
|
+
export declare namespace Curriculum {
|
|
77
|
+
var Part: (handle: Handle<Curriculum.PartProps>) => () => import("remix/component").RemixElement;
|
|
78
|
+
var Lesson: (handle: Handle<Curriculum.LessonProps>) => () => import("remix/component").RemixElement;
|
|
79
|
+
}
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "remix/component/jsx-runtime";
|
|
2
|
+
import { ChevronRightIcon } from "@sdxc/icons";
|
|
3
|
+
import { combine, raw, mergeMix } from "@sdxc/u/general";
|
|
4
|
+
import { container, vstack } from "@sdxc/u/layout";
|
|
5
|
+
import { at, motionSafe } from "@sdxc/u/responsive";
|
|
6
|
+
import { when } from "@sdxc/u/state";
|
|
7
|
+
import { Badge } from "../components/badge.js";
|
|
8
|
+
import { HeadingScope, resolveHeadingLevel, TAG_BY_LEVEL } from "../components/heading-scope.js";
|
|
9
|
+
/** Container the parts' column step queries. */
|
|
10
|
+
const CONTAINER = "ui-landing-curriculum";
|
|
11
|
+
/** Translucent line between lessons. */
|
|
12
|
+
const HAIRLINE = "var(--ui-landing-hairline, color-mix(in oklch, CanvasText 8%, transparent))";
|
|
13
|
+
/** Arrangement {@link Curriculum} applies when `layout` is omitted. */
|
|
14
|
+
const DEFAULT_LAYOUT = "columns";
|
|
15
|
+
/** Width of the chevron track at a lesson row's inline start. */
|
|
16
|
+
const CHEVRON_TRACK = "1rem";
|
|
17
|
+
/** Width of the lesson-number track, wide enough for three mono digits. */
|
|
18
|
+
const NUMBER_TRACK = "2rem";
|
|
19
|
+
/** Gap between a lesson row's tracks. */
|
|
20
|
+
const TRACK_GAP = "0.75rem";
|
|
21
|
+
/** How far a lesson's body is indented, so it starts under the title. */
|
|
22
|
+
const BODY_INDENT = `calc(${CHEVRON_TRACK} + ${NUMBER_TRACK} + 2 * ${TRACK_GAP})`;
|
|
23
|
+
/**
|
|
24
|
+
* Lays the optional summary over the parts, and opens a heading scope so part titles sit
|
|
25
|
+
* one level under the band's title.
|
|
26
|
+
*
|
|
27
|
+
* @param handle Runtime handle carrying the host `<div>`'s props.
|
|
28
|
+
* @returns The render function producing the curriculum's markup.
|
|
29
|
+
* @example
|
|
30
|
+
* <Curriculum summary={<StatStrip>{totals}</StatStrip>}>
|
|
31
|
+
* <Curriculum.Part title={t("part.one")} meta="5 chapters · 112 pages">
|
|
32
|
+
* <Curriculum.Lesson number="01" title={t("ch.one")} meta="18 pages" badge="Free" />
|
|
33
|
+
* </Curriculum.Part>
|
|
34
|
+
* </Curriculum>
|
|
35
|
+
*/
|
|
36
|
+
export function Curriculum(handle) {
|
|
37
|
+
return () => {
|
|
38
|
+
let { children, layout, mix, summary, ...rest } = handle.props;
|
|
39
|
+
let resolvedLayout = layout ?? DEFAULT_LAYOUT;
|
|
40
|
+
return (_jsxs("div", { ...rest, "data-slot": "curriculum", "data-layout": resolvedLayout, mix: mergeMix([
|
|
41
|
+
container(CONTAINER),
|
|
42
|
+
vstack({ gap: 10, align: "stretch" }),
|
|
43
|
+
raw({ inlineSize: "100%" }),
|
|
44
|
+
], mix), children: [summary ? _jsx("div", { "data-slot": "curriculum-summary", children: summary }) : null, _jsx(HeadingScope, { children: _jsx("div", { "data-slot": "curriculum-parts", mix: [parts(resolvedLayout)], children: children }) })] }));
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* The parts' grid in one rule: one column, then, for `columns`, every part in one row of
|
|
49
|
+
* equal tracks from the `lg` container whatever their count.
|
|
50
|
+
*/
|
|
51
|
+
function parts(layout) {
|
|
52
|
+
return combine([
|
|
53
|
+
raw({
|
|
54
|
+
display: "grid",
|
|
55
|
+
gridTemplateColumns: "minmax(0, 1fr)",
|
|
56
|
+
alignItems: "start",
|
|
57
|
+
rowGap: "3rem",
|
|
58
|
+
columnGap: "2.5rem",
|
|
59
|
+
}),
|
|
60
|
+
layout === "columns"
|
|
61
|
+
? at("lg", CONTAINER, raw({
|
|
62
|
+
gridTemplateColumns: "none",
|
|
63
|
+
gridAutoFlow: "column",
|
|
64
|
+
gridAutoColumns: "minmax(0, 1fr)",
|
|
65
|
+
}))
|
|
66
|
+
: [],
|
|
67
|
+
]);
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* One part: its title and totals over a ruled list of lessons.
|
|
71
|
+
*
|
|
72
|
+
* @param handle Runtime handle carrying the host `<section>`'s props.
|
|
73
|
+
* @returns The render function producing the part's markup.
|
|
74
|
+
* @example
|
|
75
|
+
* <Curriculum.Part title="Foundations" meta="4 chapters · 86 pages">{lessons}</Curriculum.Part>
|
|
76
|
+
*/
|
|
77
|
+
Curriculum.Part = function CurriculumPart(handle) {
|
|
78
|
+
return () => {
|
|
79
|
+
let { children, meta, mix, title, ...rest } = handle.props;
|
|
80
|
+
let Tag = TAG_BY_LEVEL[resolveHeadingLevel(handle)];
|
|
81
|
+
return (_jsxs("section", { ...rest, "data-slot": "curriculum-part", mix: mergeMix([vstack({ gap: 4, align: "stretch" }), raw({ minInlineSize: "0" })], mix), children: [_jsxs("header", { mix: [vstack({ gap: 1, align: "start" })], children: [_jsx(Tag, { "data-slot": "curriculum-part-title", mix: [
|
|
82
|
+
raw({
|
|
83
|
+
margin: "0",
|
|
84
|
+
fontSize: "var(--ui-text-xl, 1.25rem)",
|
|
85
|
+
lineHeight: "1.75rem",
|
|
86
|
+
fontWeight: "600",
|
|
87
|
+
letterSpacing: "-0.01em",
|
|
88
|
+
color: "var(--ui-neutral-fg-emphasis)",
|
|
89
|
+
textWrap: "balance",
|
|
90
|
+
}),
|
|
91
|
+
], children: title }), meta ? (_jsx("p", { "data-slot": "curriculum-part-meta", mix: [monoMeta(), raw({ margin: "0" })], children: meta })) : null] }), _jsx("ol", { "data-slot": "curriculum-lessons", mix: [lessonList()], children: children })] }));
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
/** Mono, muted, tabular small print shared by part totals, lesson numbers and lesson meta. */
|
|
95
|
+
function monoMeta() {
|
|
96
|
+
return raw({
|
|
97
|
+
fontFamily: "var(--ui-font-mono, ui-monospace, monospace)",
|
|
98
|
+
fontSize: "var(--ui-text-sm, 0.875rem)",
|
|
99
|
+
lineHeight: "1.5rem",
|
|
100
|
+
fontVariantNumeric: "tabular-nums",
|
|
101
|
+
color: "var(--ui-neutral-fg-muted)",
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
/** The lesson list: unstyled, with a hairline above every row and under the last. */
|
|
105
|
+
function lessonList() {
|
|
106
|
+
return combine([
|
|
107
|
+
raw({ listStyle: "none", margin: "0", padding: "0" }),
|
|
108
|
+
when("& > li", raw({ borderBlockStart: `1px solid ${HAIRLINE}` })),
|
|
109
|
+
when("& > li:last-child", raw({ borderBlockEnd: `1px solid ${HAIRLINE}` })),
|
|
110
|
+
]);
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* The summary row in one rule: chevron, number, title (with its badge) and meta tracks on a
|
|
114
|
+
* shared first baseline, at least 44px tall, so the meta stays at the inline end however
|
|
115
|
+
* far the title wraps. Only an expandable row takes the pointer cursor and hover underline.
|
|
116
|
+
*/
|
|
117
|
+
function lessonSummary(expandable) {
|
|
118
|
+
return combine([
|
|
119
|
+
raw({
|
|
120
|
+
display: "grid",
|
|
121
|
+
gridTemplateColumns: `${CHEVRON_TRACK} ${NUMBER_TRACK} minmax(0, 1fr) auto`,
|
|
122
|
+
columnGap: TRACK_GAP,
|
|
123
|
+
alignItems: "baseline",
|
|
124
|
+
minBlockSize: "2.75rem",
|
|
125
|
+
boxSizing: "border-box",
|
|
126
|
+
paddingBlock: "0.625rem",
|
|
127
|
+
cursor: expandable ? "pointer" : "default",
|
|
128
|
+
listStyle: "none",
|
|
129
|
+
outlineOffset: "2px",
|
|
130
|
+
}),
|
|
131
|
+
when("&::-webkit-details-marker", raw({ display: "none" })),
|
|
132
|
+
when("&::marker", raw({ content: '""' })),
|
|
133
|
+
when('& > [data-slot="curriculum-lesson-chevron"]', raw({
|
|
134
|
+
alignSelf: "start",
|
|
135
|
+
display: "grid",
|
|
136
|
+
placeItems: "center",
|
|
137
|
+
blockSize: "1.5rem",
|
|
138
|
+
color: "var(--ui-neutral-fg-muted)",
|
|
139
|
+
})),
|
|
140
|
+
when('& > [data-slot="curriculum-lesson-chevron"] > svg', raw({ inlineSize: "1rem", blockSize: "1rem" })),
|
|
141
|
+
when('& > [data-slot="curriculum-lesson-chevron"] > svg', motionSafe(raw({ transition: "rotate 200ms" }))),
|
|
142
|
+
expandable
|
|
143
|
+
? when('&:hover > [data-slot="curriculum-lesson-title"]', raw({
|
|
144
|
+
textDecoration: "underline",
|
|
145
|
+
textUnderlineOffset: "0.2em",
|
|
146
|
+
textDecorationThickness: "1px",
|
|
147
|
+
}))
|
|
148
|
+
: [],
|
|
149
|
+
]);
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* One lesson as a native disclosure row: the summary shows the chevron, number, title,
|
|
153
|
+
* badge and meta; the children open under the title and the chevron turns while open.
|
|
154
|
+
*
|
|
155
|
+
* @param handle Runtime handle carrying the host `<li>`'s props.
|
|
156
|
+
* @returns The render function producing the lesson's list item.
|
|
157
|
+
* @example
|
|
158
|
+
* <Curriculum.Lesson number="03" title={t("ch.measure")} meta="22 pages" badge="Preview">
|
|
159
|
+
* <CheckList>{subtopics}</CheckList>
|
|
160
|
+
* </Curriculum.Lesson>
|
|
161
|
+
*/
|
|
162
|
+
Curriculum.Lesson = function CurriculumLesson(handle) {
|
|
163
|
+
return () => {
|
|
164
|
+
let { badge, children, meta, mix, number, open, title, ...rest } = handle.props;
|
|
165
|
+
let row = (_jsxs(_Fragment, { children: [_jsx("span", { "data-slot": "curriculum-lesson-chevron", "aria-hidden": "true", children: children ? _jsx(ChevronRightIcon, {}) : null }), _jsx("span", { "data-slot": "curriculum-lesson-number", mix: [monoMeta()], children: number }), _jsxs("span", { "data-slot": "curriculum-lesson-title", mix: [
|
|
166
|
+
raw({
|
|
167
|
+
fontSize: "var(--ui-text-base, 1rem)",
|
|
168
|
+
lineHeight: "1.5rem",
|
|
169
|
+
fontWeight: "500",
|
|
170
|
+
color: "var(--ui-neutral-fg-emphasis)",
|
|
171
|
+
textWrap: "pretty",
|
|
172
|
+
overflowWrap: "anywhere",
|
|
173
|
+
}),
|
|
174
|
+
], children: [title, badge ? (_jsx(Badge, { variant: "secondary", color: "brand", "data-slot": "curriculum-lesson-badge", mix: [raw({ marginInlineStart: "0.5rem", verticalAlign: "0.0625rem" })], children: badge })) : null] }), _jsx("span", { "data-slot": "curriculum-lesson-meta", mix: [monoMeta(), raw({ textAlign: "end", whiteSpace: "nowrap" })], children: meta })] }));
|
|
175
|
+
if (!children) {
|
|
176
|
+
return (_jsx("li", { ...rest, "data-slot": "curriculum-lesson", mix: mix, children: _jsx("div", { "data-slot": "curriculum-lesson-row", mix: [lessonSummary(false)], children: row }) }));
|
|
177
|
+
}
|
|
178
|
+
return (_jsx("li", { ...rest, "data-slot": "curriculum-lesson", mix: mix, children: _jsxs("details", { open: open, mix: [
|
|
179
|
+
when('&[open] > summary > [data-slot="curriculum-lesson-chevron"] > svg', raw({ rotate: "90deg" })),
|
|
180
|
+
], children: [_jsx("summary", { "data-slot": "curriculum-lesson-row", mix: [lessonSummary(true)], children: row }), _jsx("div", { "data-slot": "curriculum-lesson-body", mix: [
|
|
181
|
+
raw({
|
|
182
|
+
display: "flex",
|
|
183
|
+
flexDirection: "column",
|
|
184
|
+
alignItems: "stretch",
|
|
185
|
+
gap: "0.75rem",
|
|
186
|
+
paddingInlineStart: BODY_INDENT,
|
|
187
|
+
paddingBlockEnd: "1rem",
|
|
188
|
+
fontSize: "var(--ui-text-sm, 0.875rem)",
|
|
189
|
+
lineHeight: "1.5rem",
|
|
190
|
+
color: "var(--ui-neutral-fg)",
|
|
191
|
+
}),
|
|
192
|
+
], children: children })] }) }));
|
|
193
|
+
};
|
|
194
|
+
};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An animated figure for a measured claim: a headline number counts up from zero and a
|
|
3
|
+
* bar or line chart draws in beside it, holds, then loops. It shows the measurement itself,
|
|
4
|
+
* such as how often feeds are really checked or a month of response times.
|
|
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 DrawnChart}.
|
|
12
|
+
*/
|
|
13
|
+
export declare namespace DrawnChart {
|
|
14
|
+
/** How the chart draws its series. */
|
|
15
|
+
type Variant = "bars" | "line";
|
|
16
|
+
/** The headline number above the chart. */
|
|
17
|
+
interface Metric {
|
|
18
|
+
/** The measured value; an integer counts up from zero, any other number shows as is. */
|
|
19
|
+
value: number;
|
|
20
|
+
/** Number formatting, such as `{ maximumFractionDigits: 1 }`; also applied to every counted frame. */
|
|
21
|
+
format?: Intl.NumberFormatOptions;
|
|
22
|
+
/** Locale the number formats in. Defaults to `"en-US"`. */
|
|
23
|
+
locale?: string;
|
|
24
|
+
/** What the number measures, set under it. */
|
|
25
|
+
label: RemixNode;
|
|
26
|
+
/** Text drawn before the number, such as `"$"`. */
|
|
27
|
+
prefix?: string;
|
|
28
|
+
/** Text drawn after the number, such as `"%"` or `" ms"`. */
|
|
29
|
+
suffix?: string;
|
|
30
|
+
}
|
|
31
|
+
/** One measured point of the series. */
|
|
32
|
+
interface Datum {
|
|
33
|
+
/** A bar's label, or a point's label under the line; keep it short for the line. */
|
|
34
|
+
label: RemixNode;
|
|
35
|
+
value: number;
|
|
36
|
+
/** The value as shown, such as `"14 min"`; defaults to the bare number. */
|
|
37
|
+
display?: RemixNode;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Props accepted by {@link DrawnChart}.
|
|
41
|
+
*/
|
|
42
|
+
interface Props extends Omit<TagProps<"div">, "children"> {
|
|
43
|
+
/** Accessible name of the chart: the bars' list, or the line's image. Required. */
|
|
44
|
+
"aria-label": string;
|
|
45
|
+
/** Accessible name of the pause toggle. */
|
|
46
|
+
pauseLabel?: string;
|
|
47
|
+
metric?: Metric;
|
|
48
|
+
/** Defaults to `"bars"`, drawn horizontally so labels read on a phone. */
|
|
49
|
+
variant?: Variant;
|
|
50
|
+
series: readonly Datum[];
|
|
51
|
+
/** Value a full bar, or the top of the plot, stands for. Defaults to the series' largest value. */
|
|
52
|
+
max?: number;
|
|
53
|
+
/** Index of the one datum drawn in the brand colour. */
|
|
54
|
+
highlight?: number;
|
|
55
|
+
/** A note under the chart, such as the period or the source of the numbers. */
|
|
56
|
+
footnote?: RemixNode;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Renders the figure on a raised surface inside a {@link MotionLoop}. The markup is the
|
|
61
|
+
* finished figure: full bars or line and the real formatted number, which is what reduced
|
|
62
|
+
* motion and assistive technology get. Charts with the same series length share keyframes.
|
|
63
|
+
*
|
|
64
|
+
* @param handle Runtime handle carrying the host `<div>`'s props.
|
|
65
|
+
* @returns The render function producing the figure's markup.
|
|
66
|
+
* @example
|
|
67
|
+
* <DrawnChart
|
|
68
|
+
* aria-label="Median time between checks, by how often a feed posts"
|
|
69
|
+
* metric={{ value: 15, suffix: " min", label: "Between checks of an hourly feed" }}
|
|
70
|
+
* series={[{ label: "Hourly", value: 15, display: "15 min" }, { label: "Daily", value: 240, display: "4 h" }]}
|
|
71
|
+
* highlight={0}
|
|
72
|
+
* />
|
|
73
|
+
*/
|
|
74
|
+
export declare function DrawnChart(handle: Handle<DrawnChart.Props>): () => import("remix/component").RemixElement;
|