@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
|
@@ -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 { container, flex, flexWrap, gap, grid, gridArea, gridTemplate, hstack, items, justify, relative, self, vstack, } from "@sdxc/u/layout";
|
|
4
5
|
import { at } from "@sdxc/u/responsive";
|
|
5
6
|
import { maxIs, minIs } from "@sdxc/u/size";
|
|
@@ -51,7 +52,7 @@ const CONTAINER_NAME = "ui-message";
|
|
|
51
52
|
export function Message(handle) {
|
|
52
53
|
return () => {
|
|
53
54
|
let { children, mix, ...rest } = handle.props;
|
|
54
|
-
return (_jsx("article", { ...rest, "data-slot": "message", mix: [
|
|
55
|
+
return (_jsx("article", { ...rest, "data-slot": "message", mix: mergeMix([
|
|
55
56
|
relative(),
|
|
56
57
|
grid(),
|
|
57
58
|
gap("var(--ui-message-row-gap, 0.25rem)", "var(--ui-message-gap, 0.75rem)"),
|
|
@@ -64,8 +65,7 @@ export function Message(handle) {
|
|
|
64
65
|
when('& > [data-slot="header"]', gridArea("header")),
|
|
65
66
|
when('& > [data-slot="content"]', gridArea("content")),
|
|
66
67
|
when('& > [data-slot="footer"]', gridArea("footer")),
|
|
67
|
-
|
|
68
|
-
], children: children }));
|
|
68
|
+
], mix), children: children }));
|
|
69
69
|
};
|
|
70
70
|
}
|
|
71
71
|
/**
|
|
@@ -86,7 +86,7 @@ export function Message(handle) {
|
|
|
86
86
|
Message.Avatar = function MessageAvatar(handle) {
|
|
87
87
|
return () => {
|
|
88
88
|
let { children, mix, ...rest } = handle.props;
|
|
89
|
-
return (_jsx("div", { ...rest, "data-slot": "avatar", mix:
|
|
89
|
+
return (_jsx("div", { ...rest, "data-slot": "avatar", mix: mergeMix(flex(), mix), children: children }));
|
|
90
90
|
};
|
|
91
91
|
};
|
|
92
92
|
/**
|
|
@@ -105,7 +105,7 @@ Message.Avatar = function MessageAvatar(handle) {
|
|
|
105
105
|
Message.Header = function MessageHeader(handle) {
|
|
106
106
|
return () => {
|
|
107
107
|
let { children, mix, ...rest } = handle.props;
|
|
108
|
-
return (_jsx("header", { ...rest, "data-slot": "header", mix: [
|
|
108
|
+
return (_jsx("header", { ...rest, "data-slot": "header", mix: mergeMix([
|
|
109
109
|
flex(),
|
|
110
110
|
flexWrap("wrap"),
|
|
111
111
|
items("baseline"),
|
|
@@ -113,8 +113,7 @@ Message.Header = function MessageHeader(handle) {
|
|
|
113
113
|
when("& > :first-child", [fontSize("sm"), weight("semibold"), fg("neutral.emphasis")]),
|
|
114
114
|
when("& > :not(:first-child)", [fontSize("xs"), fg("neutral.muted"), tabularNums()]),
|
|
115
115
|
at("26rem", CONTAINER_NAME, [flexWrap("nowrap"), justify("between")]),
|
|
116
|
-
|
|
117
|
-
], children: children }));
|
|
116
|
+
], mix), children: children }));
|
|
118
117
|
};
|
|
119
118
|
};
|
|
120
119
|
/**
|
|
@@ -132,12 +131,11 @@ Message.Header = function MessageHeader(handle) {
|
|
|
132
131
|
Message.Content = function MessageContent(handle) {
|
|
133
132
|
return () => {
|
|
134
133
|
let { children, mix, ...rest } = handle.props;
|
|
135
|
-
return (_jsx("div", { ...rest, "data-slot": "content", mix: [
|
|
134
|
+
return (_jsx("div", { ...rest, "data-slot": "content", mix: mergeMix([
|
|
136
135
|
vstack({ gap: "0.375rem" }),
|
|
137
136
|
minIs("0"),
|
|
138
137
|
maxIs("var(--ui-message-content-max-size, 36rem)"),
|
|
139
|
-
|
|
140
|
-
], children: children }));
|
|
138
|
+
], mix), children: children }));
|
|
141
139
|
};
|
|
142
140
|
};
|
|
143
141
|
/**
|
|
@@ -165,7 +163,7 @@ Message.Content = function MessageContent(handle) {
|
|
|
165
163
|
Message.Footer = function MessageFooter(handle) {
|
|
166
164
|
return () => {
|
|
167
165
|
let { children, mix, ...rest } = handle.props;
|
|
168
|
-
return (_jsx("footer", { ...rest, "data-slot": "footer", mix:
|
|
166
|
+
return (_jsx("footer", { ...rest, "data-slot": "footer", mix: mergeMix(hstack({ align: "center", gap: "0.25rem" }), mix), children: children }));
|
|
169
167
|
};
|
|
170
168
|
};
|
|
171
169
|
/**
|
|
@@ -195,6 +193,6 @@ Message.Footer = function MessageFooter(handle) {
|
|
|
195
193
|
Message.Group = function MessageGroup(handle) {
|
|
196
194
|
return () => {
|
|
197
195
|
let { children, mix, ...rest } = handle.props;
|
|
198
|
-
return (_jsx("div", { ...rest, "data-slot": "group", mix:
|
|
196
|
+
return (_jsx("div", { ...rest, "data-slot": "group", mix: mergeMix(vstack({ gap: "var(--ui-message-group-gap, 0.125rem)" }), mix), children: children }));
|
|
199
197
|
};
|
|
200
198
|
};
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
* @copyright Sergio Xalambrí 2026
|
|
13
13
|
*/
|
|
14
14
|
import { createElement, createMixin, on } from "remix/component";
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
15
|
+
import { whileLive } from "../../mixins/while-live.js";
|
|
16
|
+
import { prefersReducedMotion } from "../../utils/prefers-reduced-motion.js";
|
|
17
17
|
/**
|
|
18
18
|
* Attribute every conversational turn exposes itself on, its value the
|
|
19
19
|
* turn's stable id; `messageFollow()` reads it to find the anchor turn and
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "remix/component/jsx-runtime";
|
|
2
2
|
import { bg, border, linearGradient, outline, outlineStyle } from "@sdxc/u/color";
|
|
3
3
|
import { opacity, ringShadow, rounded, transition, transitionDuration } from "@sdxc/u/effects";
|
|
4
|
-
import { cursor, pointerEvents, raw } from "@sdxc/u/general";
|
|
4
|
+
import { cursor, pointerEvents, raw, mergeMix } from "@sdxc/u/general";
|
|
5
5
|
import { absolute, appearance, inlineBlock, inset, relative } from "@sdxc/u/layout";
|
|
6
6
|
import { overflow } from "@sdxc/u/overflow";
|
|
7
7
|
import { media } from "@sdxc/u/responsive";
|
|
@@ -66,7 +66,7 @@ export function ColorArea(handle) {
|
|
|
66
66
|
saturationThumbId: `${handle.id}-saturation`,
|
|
67
67
|
valueThumbId: `${handle.id}-value`,
|
|
68
68
|
});
|
|
69
|
-
return (_jsx("div", { "data-slot": "area", ...rest, style: resolvedStyle, mix: [
|
|
69
|
+
return (_jsx("div", { "data-slot": "area", ...rest, style: resolvedStyle, mix: mergeMix([
|
|
70
70
|
attrs({ role: DEFAULT_ROLE }),
|
|
71
71
|
relative(),
|
|
72
72
|
inlineBlock(),
|
|
@@ -79,8 +79,7 @@ export function ColorArea(handle) {
|
|
|
79
79
|
image: `${linearGradient("to top", "black", "transparent")}, ${linearGradient("to right", "white", "transparent")}`,
|
|
80
80
|
}),
|
|
81
81
|
bg("hsl(var(--ui-color-area-hue, 0) 100% 50%)"),
|
|
82
|
-
|
|
83
|
-
] }));
|
|
82
|
+
], mix) }));
|
|
84
83
|
};
|
|
85
84
|
}
|
|
86
85
|
/**
|
|
@@ -100,7 +99,7 @@ ColorArea.SaturationThumb = function ColorAreaSaturationThumb(handle) {
|
|
|
100
99
|
let resolvedStep = step ?? DEFAULT_STEP;
|
|
101
100
|
let resolvedValue = value ?? defaultValue ?? context.saturation;
|
|
102
101
|
warnIfNoAccessibleLabel(handle.props, "ColorArea.SaturationThumb: this thumb needs an `aria-label` describing the saturation axis — assistive technology has no accessible name for it otherwise.");
|
|
103
|
-
return (_jsx("input", { ...rest, type: "range", id: id ?? context.saturationThumbId, min: min ?? DEFAULT_MIN, max: max ?? DEFAULT_MAX, step: resolvedStep, defaultValue: resolvedValue, mix: [
|
|
102
|
+
return (_jsx("input", { ...rest, type: "range", id: id ?? context.saturationThumbId, min: min ?? DEFAULT_MIN, max: max ?? DEFAULT_MAX, step: resolvedStep, defaultValue: resolvedValue, mix: mergeMix([
|
|
104
103
|
absolute(),
|
|
105
104
|
z(10),
|
|
106
105
|
is("full"),
|
|
@@ -162,8 +161,7 @@ ColorArea.SaturationThumb = function ColorAreaSaturationThumb(handle) {
|
|
|
162
161
|
when("&::-webkit-slider-thumb", transitionDuration("0s")),
|
|
163
162
|
when("&::-moz-range-thumb", transitionDuration("0s")),
|
|
164
163
|
]),
|
|
165
|
-
|
|
166
|
-
] }));
|
|
164
|
+
], mix) }));
|
|
167
165
|
};
|
|
168
166
|
};
|
|
169
167
|
/**
|
|
@@ -183,7 +181,7 @@ ColorArea.ValueThumb = function ColorAreaValueThumb(handle) {
|
|
|
183
181
|
let resolvedStep = step ?? DEFAULT_STEP;
|
|
184
182
|
let resolvedValue = value ?? defaultValue ?? context.value;
|
|
185
183
|
warnIfNoAccessibleLabel(handle.props, "ColorArea.ValueThumb: this thumb needs an `aria-label` describing the brightness axis — assistive technology has no accessible name for it otherwise.");
|
|
186
|
-
return (_jsx("input", { ...rest, type: "range", id: id ?? context.valueThumbId, min: min ?? DEFAULT_MIN, max: max ?? DEFAULT_MAX, step: resolvedStep, defaultValue: resolvedValue, "aria-orientation": "vertical", mix: [
|
|
184
|
+
return (_jsx("input", { ...rest, type: "range", id: id ?? context.valueThumbId, min: min ?? DEFAULT_MIN, max: max ?? DEFAULT_MAX, step: resolvedStep, defaultValue: resolvedValue, "aria-orientation": "vertical", mix: mergeMix([
|
|
187
185
|
absolute(),
|
|
188
186
|
z(10),
|
|
189
187
|
is("full"),
|
|
@@ -245,7 +243,6 @@ ColorArea.ValueThumb = function ColorAreaValueThumb(handle) {
|
|
|
245
243
|
when("&::-webkit-slider-thumb", transitionDuration("0s")),
|
|
246
244
|
when("&::-moz-range-thumb", transitionDuration("0s")),
|
|
247
245
|
]),
|
|
248
|
-
|
|
249
|
-
] }));
|
|
246
|
+
], mix) }));
|
|
250
247
|
};
|
|
251
248
|
};
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "remix/component/jsx-runtime";
|
|
2
|
+
import { mergeMix } from "@sdxc/u/general";
|
|
2
3
|
import { spacer, hstack } from "@sdxc/u/layout";
|
|
3
4
|
import { minIs } from "@sdxc/u/size";
|
|
5
|
+
import { Description } from "../components/description.js";
|
|
6
|
+
import { FieldError } from "../components/field-error.js";
|
|
7
|
+
import { resolveFieldIssue } from "../components/form.js";
|
|
8
|
+
import { Input } from "../components/input.js";
|
|
9
|
+
import { Label } from "../components/label.js";
|
|
4
10
|
import { fieldStackLayout } from "../styles/field-stack-layout.js";
|
|
5
11
|
import { resolveFieldWiring } from "../utils/resolve-field-wiring.js";
|
|
6
12
|
import { ColorSwatch } from "./color-swatch.js";
|
|
7
|
-
import { Description } from "./description.js";
|
|
8
|
-
import { FieldError } from "./field-error.js";
|
|
9
|
-
import { resolveFieldIssue } from "./form.js";
|
|
10
|
-
import { Input } from "./input.js";
|
|
11
|
-
import { Label } from "./label.js";
|
|
12
13
|
/** Notation {@link ColorField} falls back to when `format` is omitted. */
|
|
13
14
|
const DEFAULT_FORMAT = "hex";
|
|
14
15
|
/**
|
|
@@ -66,7 +67,7 @@ export function ColorField(handle) {
|
|
|
66
67
|
});
|
|
67
68
|
let resolvedFormat = format ?? DEFAULT_FORMAT;
|
|
68
69
|
let resolvedSwatchValue = value ?? defaultValue ?? DEFAULT_SWATCH_VALUE;
|
|
69
|
-
return (_jsxs("div", { ...rest, "data-slot": "color-field", mix:
|
|
70
|
+
return (_jsxs("div", { ...rest, "data-slot": "color-field", mix: mergeMix(fieldStackLayout(), mix), children: [_jsx(Label, { htmlFor: handle.id, mix: parts?.label, children: label }), _jsxs("div", { "data-slot": "control", mix: [hstack({ gap: 2, align: "center" }), parts?.control], children: [_jsx(Input, { id: handle.id, type: "text", name: name, value: value, defaultValue: defaultValue, placeholder: placeholder, pattern: FORMAT_PATTERNS[resolvedFormat], required: required, disabled: disabled, readOnly: readOnly, autoComplete: autoComplete,
|
|
70
71
|
// 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.
|
|
71
72
|
autoFocus: resolvedAutoFocus, "aria-invalid": resolvedInvalid, "aria-describedby": describedBy, color: resolvedColor, mix: [spacer(), minIs(0), parts?.input] }), _jsx(ColorSwatch, { value: resolvedSwatchValue, size: "lg", mix: parts?.swatch })] }), description ? (_jsx(Description, { id: descriptionId, mix: parts?.description, children: description })) : null, errorMessage ? (_jsx(FieldError, { id: errorId, mix: parts?.error, children: errorMessage })) : null] }));
|
|
72
73
|
};
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
* @copyright Sergio Xalambrí 2026
|
|
8
8
|
*/
|
|
9
9
|
import type { Handle, Props as TagProps, RemixNode } from "remix/component";
|
|
10
|
+
import { Popover } from "../components/popover.js";
|
|
10
11
|
import { ColorField } from "./color-field.js";
|
|
11
12
|
import { ColorSwatch } from "./color-swatch.js";
|
|
12
|
-
import { Popover } from "./popover.js";
|
|
13
13
|
/**
|
|
14
14
|
* Prop types for {@link ColorPicker} and its compound parts.
|
|
15
15
|
*/
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { jsx as _jsx } from "remix/component/jsx-runtime";
|
|
2
2
|
import { outline } from "@sdxc/u/color";
|
|
3
3
|
import { opacity, rounded, transition } from "@sdxc/u/effects";
|
|
4
|
-
import { cursor, raw } from "@sdxc/u/general";
|
|
4
|
+
import { cursor, raw, mergeMix } from "@sdxc/u/general";
|
|
5
5
|
import { hstack, inlineFlex, items, justify, relative, shrink, vstack } from "@sdxc/u/layout";
|
|
6
6
|
import { media } from "@sdxc/u/responsive";
|
|
7
7
|
import { bs, is, p } from "@sdxc/u/size";
|
|
8
8
|
import { when } from "@sdxc/u/state";
|
|
9
9
|
import { attrs } from "remix/component";
|
|
10
|
+
import { Popover } from "../components/popover.js";
|
|
10
11
|
import { warnIfNoAccessibleLabel } from "../utils/warn-if-no-accessible-name.js";
|
|
11
12
|
import { ColorField } from "./color-field.js";
|
|
12
13
|
import { ColorSwatch } from "./color-swatch.js";
|
|
13
|
-
import { Popover } from "./popover.js";
|
|
14
14
|
/**
|
|
15
15
|
* Native `<button>` `type` {@link ColorPicker.Trigger} falls back to,
|
|
16
16
|
* keeping an omitted `type` from implicitly submitting an enclosing
|
|
@@ -70,7 +70,7 @@ export function ColorPicker(handle) {
|
|
|
70
70
|
if (!children) {
|
|
71
71
|
return (_jsx(ColorField, { ...rest, color: color, label: label, description: description, errorMessage: errorMessage, format: format, name: name, value: value, defaultValue: defaultValue, placeholder: placeholder, required: required, disabled: disabled, readOnly: readOnly, autoComplete: autoComplete, parts: parts, mix: mix }));
|
|
72
72
|
}
|
|
73
|
-
return (_jsx("div", { ...rest, "data-slot": "color-picker", mix:
|
|
73
|
+
return (_jsx("div", { ...rest, "data-slot": "color-picker", mix: mergeMix(vstack({ gap: 1 }), mix), children: children }));
|
|
74
74
|
};
|
|
75
75
|
}
|
|
76
76
|
/**
|
|
@@ -94,15 +94,14 @@ export function ColorPicker(handle) {
|
|
|
94
94
|
ColorPicker.Group = function ColorPickerGroup(handle) {
|
|
95
95
|
return () => {
|
|
96
96
|
let { mix, ...rest } = handle.props;
|
|
97
|
-
return (_jsx("div", { ...rest, "data-slot": "group", mix: [
|
|
97
|
+
return (_jsx("div", { ...rest, "data-slot": "group", mix: mergeMix([
|
|
98
98
|
/**
|
|
99
99
|
* Focus is shown by the control that holds it, the way `Group` shows it: a ring
|
|
100
100
|
* around the row says the group is focused without saying whether the field or
|
|
101
101
|
* the preview has it, and it stacks with the ring that control draws for itself.
|
|
102
102
|
*/
|
|
103
103
|
hstack({ gap: 2, align: "center" }),
|
|
104
|
-
|
|
105
|
-
] }));
|
|
104
|
+
], mix) }));
|
|
106
105
|
};
|
|
107
106
|
};
|
|
108
107
|
/**
|
|
@@ -126,7 +125,7 @@ ColorPicker.Trigger = function ColorPickerTrigger(handle) {
|
|
|
126
125
|
let resolvedType = type ?? DEFAULT_BUTTON_TYPE;
|
|
127
126
|
let resolvedShape = shape ?? DEFAULT_TRIGGER_SHAPE;
|
|
128
127
|
warnIfNoAccessibleLabel(handle.props, "ColorPicker.Trigger: this button needs an `aria-label` describing what it does — its content is a color preview with no accessible name of its own.");
|
|
129
|
-
return (_jsx("button", { type: resolvedType, ...rest, "data-slot": "trigger", "data-shape": resolvedShape, mix: [
|
|
128
|
+
return (_jsx("button", { type: resolvedType, ...rest, "data-slot": "trigger", "data-shape": resolvedShape, mix: mergeMix([
|
|
130
129
|
when("&:focus-visible", outline({ color: "brand.ring", offset: 2 })),
|
|
131
130
|
relative(),
|
|
132
131
|
inlineFlex(),
|
|
@@ -154,8 +153,7 @@ ColorPicker.Trigger = function ColorPickerTrigger(handle) {
|
|
|
154
153
|
*/
|
|
155
154
|
when("&:hover", raw({ boxShadow: "0 0 0 1px var(--ui-neutral-border-hover)" })),
|
|
156
155
|
media("(prefers-reduced-motion: reduce)", raw({ transitionDuration: "0s" })),
|
|
157
|
-
|
|
158
|
-
], children: _jsx(ColorSwatch, { value: value, shape: resolvedShape }) }));
|
|
156
|
+
], mix), children: _jsx(ColorSwatch, { value: value, shape: resolvedShape }) }));
|
|
159
157
|
};
|
|
160
158
|
};
|
|
161
159
|
/**
|
|
@@ -188,12 +186,11 @@ ColorPicker.Dialog = function ColorPickerDialog(handle) {
|
|
|
188
186
|
return () => {
|
|
189
187
|
let { placement, children, mix, ...rest } = handle.props;
|
|
190
188
|
let resolvedPlacement = placement ?? DEFAULT_DIALOG_PLACEMENT;
|
|
191
|
-
return (_jsx(Popover, { ...rest, placement: resolvedPlacement, mix: [
|
|
189
|
+
return (_jsx(Popover, { ...rest, placement: resolvedPlacement, mix: mergeMix([
|
|
192
190
|
attrs({ role: DEFAULT_DIALOG_ROLE }),
|
|
193
191
|
vstack({ gap: 4 }),
|
|
194
192
|
p(4),
|
|
195
193
|
raw({ outline: "none" }),
|
|
196
|
-
|
|
197
|
-
], children: children }));
|
|
194
|
+
], mix), children: children }));
|
|
198
195
|
};
|
|
199
196
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { jsx as _jsx } from "remix/component/jsx-runtime";
|
|
2
2
|
import { bg, border, outlineStyle } from "@sdxc/u/color";
|
|
3
3
|
import { rounded } from "@sdxc/u/effects";
|
|
4
|
-
import { cursor, pseudoContent } from "@sdxc/u/general";
|
|
4
|
+
import { cursor, pseudoContent, mergeMix } from "@sdxc/u/general";
|
|
5
5
|
import { absolute, appearance, insBe, insBs, inset, relative, vstack } from "@sdxc/u/layout";
|
|
6
6
|
import { bs, is, m, minIs } from "@sdxc/u/size";
|
|
7
7
|
import { z } from "@sdxc/u/stacking";
|
|
8
8
|
import { when } from "@sdxc/u/state";
|
|
9
9
|
import { outputCaptionText } from "../styles/output-caption-text.js";
|
|
10
10
|
import { rangeThumbAppearance } from "../styles/range-thumb-appearance.js";
|
|
11
|
-
import { rtlAwareGradientDirection } from "../styles/rtl-aware-gradient-direction.js";
|
|
12
|
-
import { HUE_GRADIENT_STOPS } from "../utils/hue-spectrum.js";
|
|
13
11
|
import { mergeStyle } from "../utils/merge-style.js";
|
|
12
|
+
import { rtlAwareGradientDirection } from "./styles/rtl-aware-gradient-direction.js";
|
|
13
|
+
import { HUE_GRADIENT_STOPS } from "./utils/hue-spectrum.js";
|
|
14
14
|
/**
|
|
15
15
|
* Custom property carrying a {@link ColorSlider.Track}'s gradient direction,
|
|
16
16
|
* mirrored under `:dir(rtl)` so one gradient string paints correctly in both
|
|
@@ -91,7 +91,7 @@ export function ColorSlider(handle) {
|
|
|
91
91
|
let resolvedMax = max ?? DEFAULT_MAX_BY_CHANNEL[channel];
|
|
92
92
|
let resolvedValue = value ?? defaultValue ?? resolvedMin;
|
|
93
93
|
handle.context.set({ channel, min: resolvedMin, max: resolvedMax, value: resolvedValue });
|
|
94
|
-
return (_jsx("div", { "data-channel": channel, ...rest, mix: [
|
|
94
|
+
return (_jsx("div", { "data-channel": channel, ...rest, mix: mergeMix([
|
|
95
95
|
vstack({ gap: 2 }),
|
|
96
96
|
is("full"),
|
|
97
97
|
/**
|
|
@@ -99,8 +99,7 @@ export function ColorSlider(handle) {
|
|
|
99
99
|
* instead of overflowing with the track running off the edge.
|
|
100
100
|
*/
|
|
101
101
|
minIs(0),
|
|
102
|
-
|
|
103
|
-
] }));
|
|
102
|
+
], mix) }));
|
|
104
103
|
};
|
|
105
104
|
}
|
|
106
105
|
/**
|
|
@@ -124,7 +123,7 @@ ColorSlider.Track = function ColorSliderTrack(handle) {
|
|
|
124
123
|
let { hue, mix, style, ...rest } = handle.props;
|
|
125
124
|
let resolvedHue = hue ?? DEFAULT_HUE;
|
|
126
125
|
let resolvedStyle = mergeStyle(style, { [TRACK_HUE_PROPERTY]: `${resolvedHue}` });
|
|
127
|
-
return (_jsx("div", { ...rest, style: resolvedStyle, mix: [
|
|
126
|
+
return (_jsx("div", { ...rest, style: resolvedStyle, mix: mergeMix([
|
|
128
127
|
rtlAwareGradientDirection(TRACK_DIRECTION_PROPERTY),
|
|
129
128
|
relative(),
|
|
130
129
|
is("full"),
|
|
@@ -145,8 +144,7 @@ ColorSlider.Track = function ColorSliderTrack(handle) {
|
|
|
145
144
|
when('[data-channel="saturation"] &::after', bg({ image: SATURATION_GRADIENT })),
|
|
146
145
|
when('[data-channel="lightness"] &::after', bg({ image: LIGHTNESS_GRADIENT })),
|
|
147
146
|
when('[data-channel="alpha"] &::after', bg({ image: ALPHA_GRADIENT })),
|
|
148
|
-
|
|
149
|
-
] }));
|
|
147
|
+
], mix) }));
|
|
150
148
|
};
|
|
151
149
|
};
|
|
152
150
|
/**
|
|
@@ -167,7 +165,7 @@ ColorSlider.Thumb = function ColorSliderThumb(handle) {
|
|
|
167
165
|
let context = handle.context.get(ColorSlider);
|
|
168
166
|
let resolvedStep = step ?? DEFAULT_STEP_BY_CHANNEL[context.channel];
|
|
169
167
|
let resolvedValue = value ?? defaultValue ?? context.value;
|
|
170
|
-
return (_jsx("input", { ...rest, type: "range", id: id ?? handle.id, min: min ?? context.min, max: max ?? context.max, step: resolvedStep, defaultValue: resolvedValue, mix: [
|
|
168
|
+
return (_jsx("input", { ...rest, type: "range", id: id ?? handle.id, min: min ?? context.min, max: max ?? context.max, step: resolvedStep, defaultValue: resolvedValue, mix: mergeMix([
|
|
171
169
|
rangeThumbAppearance("--ui-color-slider-thumb-size", "--ui-color-slider-thumb-border-width"),
|
|
172
170
|
absolute(),
|
|
173
171
|
z(10),
|
|
@@ -195,8 +193,7 @@ ColorSlider.Thumb = function ColorSliderThumb(handle) {
|
|
|
195
193
|
border({ style: "none" }),
|
|
196
194
|
appearance("none", { webkit: false, moz: false }),
|
|
197
195
|
]),
|
|
198
|
-
|
|
199
|
-
] }));
|
|
196
|
+
], mix) }));
|
|
200
197
|
};
|
|
201
198
|
};
|
|
202
199
|
/**
|
|
@@ -214,6 +211,6 @@ ColorSlider.Thumb = function ColorSliderThumb(handle) {
|
|
|
214
211
|
ColorSlider.Output = function ColorSliderOutput(handle) {
|
|
215
212
|
return () => {
|
|
216
213
|
let { mix, ...rest } = handle.props;
|
|
217
|
-
return _jsx("output", { ...rest, mix:
|
|
214
|
+
return _jsx("output", { ...rest, mix: mergeMix(outputCaptionText(), mix) });
|
|
218
215
|
};
|
|
219
216
|
};
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "remix/component/jsx-runtime";
|
|
|
2
2
|
import { visuallyHidden } from "@sdxc/u/a11y";
|
|
3
3
|
import { border, outline } from "@sdxc/u/color";
|
|
4
4
|
import { opacity, ringShadow, transition } from "@sdxc/u/effects";
|
|
5
|
-
import { cursor } from "@sdxc/u/general";
|
|
5
|
+
import { cursor, mergeMix } from "@sdxc/u/general";
|
|
6
6
|
import { flexWrap, hstack, inlineFlex, relative } from "@sdxc/u/layout";
|
|
7
7
|
import { precededBy, when } from "@sdxc/u/state";
|
|
8
8
|
import { attrs } from "remix/component";
|
|
@@ -38,7 +38,7 @@ export function ColorSwatchPicker(handle) {
|
|
|
38
38
|
let { name, mix, ...rest } = handle.props;
|
|
39
39
|
let resolvedName = name ?? handle.id;
|
|
40
40
|
handle.context.set({ name: resolvedName });
|
|
41
|
-
return (_jsx("div", { ...rest, mix: [attrs({ role: DEFAULT_ROLE }), hstack({ gap: 2 }), flexWrap(), mix
|
|
41
|
+
return (_jsx("div", { ...rest, mix: mergeMix([attrs({ role: DEFAULT_ROLE }), hstack({ gap: 2 }), flexWrap()], mix) }));
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
44
|
/**
|
|
@@ -60,14 +60,13 @@ ColorSwatchPicker.Swatch = function ColorSwatchPickerSwatch(handle) {
|
|
|
60
60
|
let { value, "aria-label": ariaLabel, name, shape, size, checked, defaultChecked, disabled, required, parts, mix, ...rest } = handle.props;
|
|
61
61
|
let context = handle.context.get(ColorSwatchPicker);
|
|
62
62
|
let resolvedName = name ?? context.name;
|
|
63
|
-
return (_jsxs("label", { ...rest, mix: [
|
|
63
|
+
return (_jsxs("label", { ...rest, mix: mergeMix([
|
|
64
64
|
relative(),
|
|
65
65
|
inlineFlex(),
|
|
66
66
|
hitArea(),
|
|
67
67
|
cursor("default"),
|
|
68
68
|
when("&:has(input:disabled)", [cursor("not-allowed"), opacity(50)]),
|
|
69
|
-
|
|
70
|
-
], children: [_jsx("input", { type: "radio", id: handle.id, value: value, name: resolvedName, checked: checked, defaultChecked: defaultChecked, disabled: disabled, required: required, "aria-label": ariaLabel, mix: [visuallyHidden(), parts?.input] }), _jsx(ColorSwatch, { value: value, shape: shape, size: size, mix: [
|
|
69
|
+
], mix), children: [_jsx("input", { type: "radio", id: handle.id, value: value, name: resolvedName, checked: checked, defaultChecked: defaultChecked, disabled: disabled, required: required, "aria-label": ariaLabel, mix: [visuallyHidden(), parts?.input] }), _jsx(ColorSwatch, { value: value, shape: shape, size: size, mix: [
|
|
71
70
|
transition("border-color, box-shadow"),
|
|
72
71
|
precededBy("input:checked", border("brand.solid")),
|
|
73
72
|
precededBy("input:focus-visible", outline({ color: "brand.ring", offset: 2 })),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "remix/component/jsx-runtime";
|
|
2
2
|
import { bg, border } from "@sdxc/u/color";
|
|
3
3
|
import { rounded } from "@sdxc/u/effects";
|
|
4
|
-
import { raw, userSelect } from "@sdxc/u/general";
|
|
4
|
+
import { raw, userSelect, mergeMix } from "@sdxc/u/general";
|
|
5
5
|
import { absolute, inlineFlex, inset, items, justify, relative, shrink } from "@sdxc/u/layout";
|
|
6
6
|
import { overflow } from "@sdxc/u/overflow";
|
|
7
7
|
import { bs, is } from "@sdxc/u/size";
|
|
@@ -37,7 +37,7 @@ export function ColorSwatch(handle) {
|
|
|
37
37
|
let resolvedShape = shape ?? DEFAULT_SHAPE;
|
|
38
38
|
let resolvedSize = size ?? DEFAULT_SIZE;
|
|
39
39
|
let resolvedStyle = mergeStyle(style, { "--ui-color-swatch-value": value });
|
|
40
|
-
return (_jsx("span", { ...rest, "data-slot": "swatch", "data-shape": resolvedShape, "data-size": resolvedSize, style: resolvedStyle, mix: [
|
|
40
|
+
return (_jsx("span", { ...rest, "data-slot": "swatch", "data-shape": resolvedShape, "data-size": resolvedSize, style: resolvedStyle, mix: mergeMix([
|
|
41
41
|
attrs({ "aria-hidden": DEFAULT_ARIA_HIDDEN }),
|
|
42
42
|
relative(),
|
|
43
43
|
inlineFlex(),
|
|
@@ -76,7 +76,6 @@ export function ColorSwatch(handle) {
|
|
|
76
76
|
bg("var(--ui-color-swatch-value, transparent)"),
|
|
77
77
|
raw({ content: '""' }),
|
|
78
78
|
]),
|
|
79
|
-
|
|
80
|
-
] }));
|
|
79
|
+
], mix) }));
|
|
81
80
|
};
|
|
82
81
|
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { jsx as _jsx } from "remix/component/jsx-runtime";
|
|
2
2
|
import { bg, border, outline, outlineStyle } from "@sdxc/u/color";
|
|
3
3
|
import { mask, opacity, rounded, shadow, transition, transitionDuration } from "@sdxc/u/effects";
|
|
4
|
-
import { cursor, pointerEvents, pseudoContent, raw } from "@sdxc/u/general";
|
|
4
|
+
import { cursor, pointerEvents, pseudoContent, raw, mergeMix } from "@sdxc/u/general";
|
|
5
5
|
import { absolute, appearance, block, inlineBlock, insBs, insIs, inset, relative, shrink, } from "@sdxc/u/layout";
|
|
6
6
|
import { media } from "@sdxc/u/responsive";
|
|
7
7
|
import { bs, is, m, mbs, minIs, mis } from "@sdxc/u/size";
|
|
8
8
|
import { when } from "@sdxc/u/state";
|
|
9
9
|
import { rangeThumbAppearance } from "../styles/range-thumb-appearance.js";
|
|
10
|
-
import { rtlAwareGradientDirection } from "../styles/rtl-aware-gradient-direction.js";
|
|
11
10
|
import { clampChannel, roundChannel } from "../utils/color-math.js";
|
|
12
|
-
import { HUE_GRADIENT_STOPS } from "../utils/hue-spectrum.js";
|
|
13
11
|
import { mergeStyle } from "../utils/merge-style.js";
|
|
14
12
|
import { warnIfNoAccessibleLabel } from "../utils/warn-if-no-accessible-name.js";
|
|
13
|
+
import { rtlAwareGradientDirection } from "./styles/rtl-aware-gradient-direction.js";
|
|
14
|
+
import { HUE_GRADIENT_STOPS } from "./utils/hue-spectrum.js";
|
|
15
15
|
/** Lower bound of {@link ColorWheel}'s fixed hue domain, in degrees — fixed, since the full domain is what makes this control a hue wheel. */
|
|
16
16
|
const DEFAULT_MIN = 0;
|
|
17
17
|
/** Upper bound of {@link ColorWheel}'s fixed hue domain, in degrees; reaching it wraps back to the same red {@link DEFAULT_MIN} starts from, since hue is continuous around the circle. */
|
|
@@ -67,7 +67,7 @@ export function ColorWheel(handle) {
|
|
|
67
67
|
"--ui-color-wheel-hue": `${resolvedHue}`,
|
|
68
68
|
});
|
|
69
69
|
warnIfNoAccessibleLabel(handle.props, "ColorWheel: a wheel with no `aria-label` or `aria-labelledby` needs one describing the hue it picks — assistive technology has no accessible name to announce otherwise.");
|
|
70
|
-
return (_jsx("div", { ...rest, "data-slot": "color-wheel", style: resolvedStyle, mix: [
|
|
70
|
+
return (_jsx("div", { ...rest, "data-slot": "color-wheel", style: resolvedStyle, mix: mergeMix([
|
|
71
71
|
relative(),
|
|
72
72
|
/**
|
|
73
73
|
* Each shape sizes itself under a selector excluding the other: a bare `is("full")`
|
|
@@ -119,8 +119,7 @@ export function ColorWheel(handle) {
|
|
|
119
119
|
when("& > input", [absolute(), inset("0"), is("full"), bs("full"), opacity(0)]),
|
|
120
120
|
media("(prefers-reduced-motion: reduce)", when("&::after", transitionDuration("0s"))),
|
|
121
121
|
]),
|
|
122
|
-
|
|
123
|
-
], children: _jsx("input", { type: "range", min: DEFAULT_MIN, max: DEFAULT_MAX, step: resolvedStep, defaultValue: resolvedValue, name: name, disabled: disabled, form: form, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, "aria-describedby": ariaDescribedby, "data-slot": "input", mix: [
|
|
122
|
+
], mix), children: _jsx("input", { type: "range", min: DEFAULT_MIN, max: DEFAULT_MAX, step: resolvedStep, defaultValue: resolvedValue, name: name, disabled: disabled, form: form, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, "aria-describedby": ariaDescribedby, "data-slot": "input", mix: [
|
|
124
123
|
rtlAwareGradientDirection(TRACK_DIRECTION_PROPERTY),
|
|
125
124
|
rangeThumbAppearance("--ui-color-wheel-thumb-size", "--ui-color-wheel-thumb-border-width"),
|
|
126
125
|
block(),
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Barrel for `@sdxc/ui/color`: the colour fields, pickers, sliders, swatches, area and
|
|
3
|
+
* wheel, with the helpers only they use. Each component also imports on its own as
|
|
4
|
+
* `@sdxc/ui/color/<module>`.
|
|
5
|
+
*
|
|
6
|
+
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
7
|
+
* @copyright Sergio Xalambrí 2026
|
|
8
|
+
*/
|
|
9
|
+
export * from "./color-area.js";
|
|
10
|
+
export * from "./color-field.js";
|
|
11
|
+
export * from "./color-picker.js";
|
|
12
|
+
export * from "./color-slider.js";
|
|
13
|
+
export * from "./color-swatch-picker.js";
|
|
14
|
+
export * from "./color-swatch.js";
|
|
15
|
+
export * from "./color-wheel.js";
|
|
16
|
+
export * from "./mixins/color-area-drag.js";
|
|
17
|
+
export * from "./mixins/color-channel-sync.js";
|
|
18
|
+
export * from "./mixins/color-preview.js";
|
|
19
|
+
export * from "./mixins/color-wheel-drag.js";
|
|
20
|
+
export * from "./styles/rtl-aware-gradient-direction.js";
|
|
21
|
+
export * from "./utils/hue-spectrum.js";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Barrel for `@sdxc/ui/color`: the colour fields, pickers, sliders, swatches, area and
|
|
3
|
+
* wheel, with the helpers only they use. Each component also imports on its own as
|
|
4
|
+
* `@sdxc/ui/color/<module>`.
|
|
5
|
+
*
|
|
6
|
+
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
7
|
+
* @copyright Sergio Xalambrí 2026
|
|
8
|
+
*/
|
|
9
|
+
export * from "./color-area.js";
|
|
10
|
+
export * from "./color-field.js";
|
|
11
|
+
export * from "./color-picker.js";
|
|
12
|
+
export * from "./color-slider.js";
|
|
13
|
+
export * from "./color-swatch-picker.js";
|
|
14
|
+
export * from "./color-swatch.js";
|
|
15
|
+
export * from "./color-wheel.js";
|
|
16
|
+
export * from "./mixins/color-area-drag.js";
|
|
17
|
+
export * from "./mixins/color-channel-sync.js";
|
|
18
|
+
export * from "./mixins/color-preview.js";
|
|
19
|
+
export * from "./mixins/color-wheel-drag.js";
|
|
20
|
+
export * from "./styles/rtl-aware-gradient-direction.js";
|
|
21
|
+
export * from "./utils/hue-spectrum.js";
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @copyright Sergio Xalambrí 2026
|
|
9
9
|
*/
|
|
10
10
|
import type { MixinFactory } from "remix/component";
|
|
11
|
-
import type { Point } from "
|
|
11
|
+
import type { Point } from "../../utils/color-math.js";
|
|
12
12
|
/**
|
|
13
13
|
* `data-*` attribute a ColorArea's paired axis inputs carry so
|
|
14
14
|
* {@link colorAreaDrag} can tell the horizontal-axis input from the
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
* @copyright Sergio Xalambrí 2026
|
|
9
9
|
*/
|
|
10
10
|
import { createElement, createMixin, on } from "remix/component";
|
|
11
|
-
import { normalizedPointerPosition } from "
|
|
12
|
-
import { findPairedRangeInputs } from "
|
|
11
|
+
import { normalizedPointerPosition } from "../../utils/color-math.js";
|
|
12
|
+
import { findPairedRangeInputs } from "../../utils/paired-range-inputs.js";
|
|
13
13
|
/**
|
|
14
14
|
* `data-*` attribute a ColorArea's paired axis inputs carry so
|
|
15
15
|
* {@link colorAreaDrag} can tell the horizontal-axis input from the
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @copyright Sergio Xalambrí 2026
|
|
9
9
|
*/
|
|
10
10
|
import { createElement, createMixin, on } from "remix/component";
|
|
11
|
-
import { formatRgb, parseColor } from "
|
|
11
|
+
import { formatRgb, parseColor } from "../../utils/color-math.js";
|
|
12
12
|
/**
|
|
13
13
|
* CSS custom property {@link colorPreview} writes a successfully parsed
|
|
14
14
|
* color onto. A swatch already paints its own fill from this same property,
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @copyright Sergio Xalambrí 2026
|
|
9
9
|
*/
|
|
10
10
|
import { createElement, createMixin, on } from "remix/component";
|
|
11
|
-
import { angleFromCenter, angleToHue, roundChannel } from "
|
|
11
|
+
import { angleFromCenter, angleToHue, roundChannel } from "../../utils/color-math.js";
|
|
12
12
|
/**
|
|
13
13
|
* `data-*` attribute {@link colorWheelDrag} sets to
|
|
14
14
|
* {@link COLOR_WHEEL_SHAPE_CIRCULAR} on its host the moment it attaches, so
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* @copyright Sergio Xalambrí 2026
|
|
10
10
|
*/
|
|
11
11
|
import type { ElementProps, MixinDescriptor } from "remix/component";
|
|
12
|
-
import type { CSSStyles } from "
|
|
12
|
+
import type { CSSStyles } from "../../utils/css-styles.js";
|
|
13
13
|
/**
|
|
14
14
|
* Composes the custom property pairing a gradient direction's `"right"`
|
|
15
15
|
* default with its `"left"` mirror under `&:dir(rtl)`, ready to compose
|
|
@@ -37,9 +37,9 @@ export declare namespace Accordion {
|
|
|
37
37
|
}
|
|
38
38
|
/**
|
|
39
39
|
* Renders the list's root host: a plain `<div>` that stacks
|
|
40
|
-
* {@link Accordion.Item} sections in normal block flow
|
|
41
|
-
* divider so the
|
|
42
|
-
* lays two of these in a container-query grid under a {@link
|
|
40
|
+
* {@link Accordion.Item} sections in normal block flow under one top rule, each
|
|
41
|
+
* drawing the divider below it, so the list reads as one group. A landing FAQ
|
|
42
|
+
* lays two of these in a container-query grid under a {@link LandingHeader},
|
|
43
43
|
* sharing one `name` across columns so only one item opens at a time.
|
|
44
44
|
*
|
|
45
45
|
* @param handle Runtime handle carrying the host `<div>`'s props.
|