@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
|
@@ -3,7 +3,7 @@ import { PanelLeftIcon } from "@sdxc/icons";
|
|
|
3
3
|
import { visuallyHidden } from "@sdxc/u/a11y";
|
|
4
4
|
import { bg, border, borderEdge, colorMix, fg, outline, outlineStyle } from "@sdxc/u/color";
|
|
5
5
|
import { backdropBlur, backdropSaturate, opacity, rounded, shadow, transition, transitionBehavior, transitionDuration, transitionProperty, } from "@sdxc/u/effects";
|
|
6
|
-
import { cursor, pseudoContent, userSelect, willChange } from "@sdxc/u/general";
|
|
6
|
+
import { cursor, pseudoContent, userSelect, willChange, mergeMix } from "@sdxc/u/general";
|
|
7
7
|
import { var as varUtility } from "@sdxc/u/general/var";
|
|
8
8
|
import { absolute, container, fixed, flex, flexCol, gap, grow, hidden, inlineFlex, insBe, insBs, insIe, insIs, insLeft, insRight, items, justify, relative, shrink, vstack, } from "@sdxc/u/layout";
|
|
9
9
|
import { overflow } from "@sdxc/u/overflow";
|
|
@@ -94,7 +94,7 @@ export function Sidebar(handle) {
|
|
|
94
94
|
let resolvedVariant = variant ?? DEFAULT_VARIANT;
|
|
95
95
|
let resolvedCollapsible = collapsible ?? DEFAULT_COLLAPSIBLE;
|
|
96
96
|
let resolvedSide = side ?? DEFAULT_SIDE;
|
|
97
|
-
return (_jsx("aside", { ...rest, "data-slot": "sidebar", "data-variant": resolvedVariant, "data-collapsible": resolvedCollapsible, "data-side": resolvedSide, mix: [
|
|
97
|
+
return (_jsx("aside", { ...rest, "data-slot": "sidebar", "data-variant": resolvedVariant, "data-collapsible": resolvedCollapsible, "data-side": resolvedSide, mix: mergeMix([
|
|
98
98
|
relative(),
|
|
99
99
|
flex(),
|
|
100
100
|
flexCol(),
|
|
@@ -156,8 +156,7 @@ export function Sidebar(handle) {
|
|
|
156
156
|
border({ width: "0", noStyleDefault: true }),
|
|
157
157
|
]),
|
|
158
158
|
]),
|
|
159
|
-
|
|
160
|
-
] }));
|
|
159
|
+
], mix) }));
|
|
161
160
|
};
|
|
162
161
|
}
|
|
163
162
|
/**
|
|
@@ -191,14 +190,13 @@ export function Sidebar(handle) {
|
|
|
191
190
|
Sidebar.Provider = function SidebarProvider(handle) {
|
|
192
191
|
return () => {
|
|
193
192
|
let { mix, ...rest } = handle.props;
|
|
194
|
-
return (_jsx("div", { ...rest, "data-slot": "provider", mix: [
|
|
193
|
+
return (_jsx("div", { ...rest, "data-slot": "provider", mix: mergeMix([
|
|
195
194
|
flex(),
|
|
196
195
|
items("stretch"),
|
|
197
196
|
minBs("100dvh"),
|
|
198
197
|
is("full"),
|
|
199
198
|
container(PROVIDER_CONTAINER_NAME),
|
|
200
|
-
|
|
201
|
-
] }));
|
|
199
|
+
], mix) }));
|
|
202
200
|
};
|
|
203
201
|
};
|
|
204
202
|
/**
|
|
@@ -222,7 +220,7 @@ Sidebar.MobileNav = function SidebarMobileNav(handle) {
|
|
|
222
220
|
return () => {
|
|
223
221
|
let { side, mix, ...rest } = handle.props;
|
|
224
222
|
let resolvedSide = side ?? DEFAULT_SIDE;
|
|
225
|
-
return (_jsx(Dialog, { ...rest, "data-slot": "mobile-nav", "data-side": resolvedSide, mix: [
|
|
223
|
+
return (_jsx(Dialog, { ...rest, "data-slot": "mobile-nav", "data-side": resolvedSide, mix: mergeMix([
|
|
226
224
|
/**
|
|
227
225
|
* A press outside closes the drawer, the way a drawer is dismissed on a phone: a modal
|
|
228
226
|
* dialog otherwise closes only on Escape, which a touch device lacks. A consumer
|
|
@@ -260,8 +258,7 @@ Sidebar.MobileNav = function SidebarMobileNav(handle) {
|
|
|
260
258
|
duration: durations.slow,
|
|
261
259
|
easing: easings.decelerate,
|
|
262
260
|
}),
|
|
263
|
-
|
|
264
|
-
] }));
|
|
261
|
+
], mix) }));
|
|
265
262
|
};
|
|
266
263
|
};
|
|
267
264
|
/**
|
|
@@ -279,7 +276,7 @@ Sidebar.MobileNav = function SidebarMobileNav(handle) {
|
|
|
279
276
|
Sidebar.Header = function SidebarHeader(handle) {
|
|
280
277
|
return () => {
|
|
281
278
|
let { mix, ...rest } = handle.props;
|
|
282
|
-
return (_jsx("header", { ...rest, "data-slot": "header", mix: [
|
|
279
|
+
return (_jsx("header", { ...rest, "data-slot": "header", mix: mergeMix([
|
|
283
280
|
/**
|
|
284
281
|
* The slot paints the rail's background, so content scrolling behind a row held
|
|
285
282
|
* against the viewport stays hidden; inheriting it matches whichever surface hosts
|
|
@@ -299,8 +296,7 @@ Sidebar.Header = function SidebarHeader(handle) {
|
|
|
299
296
|
pi("1rem"),
|
|
300
297
|
pbs("calc(0.5rem + env(safe-area-inset-top, 0px))"),
|
|
301
298
|
pbe("0.5rem"),
|
|
302
|
-
|
|
303
|
-
] }));
|
|
299
|
+
], mix) }));
|
|
304
300
|
};
|
|
305
301
|
};
|
|
306
302
|
/**
|
|
@@ -321,7 +317,7 @@ Sidebar.Header = function SidebarHeader(handle) {
|
|
|
321
317
|
Sidebar.Content = function SidebarContent(handle) {
|
|
322
318
|
return () => {
|
|
323
319
|
let { mix, ...rest } = handle.props;
|
|
324
|
-
return (_jsx(ScrollArea.Viewport, { ...rest, "data-slot": "content", mix: [
|
|
320
|
+
return (_jsx(ScrollArea.Viewport, { ...rest, "data-slot": "content", mix: mergeMix([
|
|
325
321
|
flex(),
|
|
326
322
|
flexCol(),
|
|
327
323
|
grow(),
|
|
@@ -330,8 +326,7 @@ Sidebar.Content = function SidebarContent(handle) {
|
|
|
330
326
|
gap("1rem"),
|
|
331
327
|
pi("0.5rem"),
|
|
332
328
|
pb("1rem"),
|
|
333
|
-
|
|
334
|
-
] }));
|
|
329
|
+
], mix) }));
|
|
335
330
|
};
|
|
336
331
|
};
|
|
337
332
|
/**
|
|
@@ -349,7 +344,7 @@ Sidebar.Content = function SidebarContent(handle) {
|
|
|
349
344
|
Sidebar.Footer = function SidebarFooter(handle) {
|
|
350
345
|
return () => {
|
|
351
346
|
let { mix, ...rest } = handle.props;
|
|
352
|
-
return (_jsx("footer", { ...rest, "data-slot": "footer", mix: [
|
|
347
|
+
return (_jsx("footer", { ...rest, "data-slot": "footer", mix: mergeMix([
|
|
353
348
|
bg("inherit"),
|
|
354
349
|
flex(),
|
|
355
350
|
shrink(),
|
|
@@ -363,8 +358,7 @@ Sidebar.Footer = function SidebarFooter(handle) {
|
|
|
363
358
|
pi("0.5rem"),
|
|
364
359
|
pbs("1rem"),
|
|
365
360
|
pbe("calc(1rem + env(safe-area-inset-bottom, 0px))"),
|
|
366
|
-
|
|
367
|
-
] }));
|
|
361
|
+
], mix) }));
|
|
368
362
|
};
|
|
369
363
|
};
|
|
370
364
|
/**
|
|
@@ -383,7 +377,7 @@ Sidebar.Footer = function SidebarFooter(handle) {
|
|
|
383
377
|
Sidebar.Nav = function SidebarNav(handle) {
|
|
384
378
|
return () => {
|
|
385
379
|
let { mix, ...rest } = handle.props;
|
|
386
|
-
return _jsx("nav", { ...rest, "data-slot": "nav", mix:
|
|
380
|
+
return _jsx("nav", { ...rest, "data-slot": "nav", mix: mergeMix(vstack({ gap: "0.25rem" }), mix) });
|
|
387
381
|
};
|
|
388
382
|
};
|
|
389
383
|
/**
|
|
@@ -409,7 +403,7 @@ Sidebar.Item = function SidebarItem(handle) {
|
|
|
409
403
|
let { color, current, "aria-current": ariaCurrent, mix, ...rest } = handle.props;
|
|
410
404
|
let resolvedColor = color ?? DEFAULT_ITEM_COLOR;
|
|
411
405
|
let resolvedAriaCurrent = resolveAriaCurrent(current, ariaCurrent);
|
|
412
|
-
return (_jsx("a", { ...rest, "aria-current": resolvedAriaCurrent, "data-slot": "item", "data-color": resolvedColor, mix: [
|
|
406
|
+
return (_jsx("a", { ...rest, "aria-current": resolvedAriaCurrent, "data-slot": "item", "data-color": resolvedColor, mix: mergeMix([
|
|
413
407
|
when("&:focus-visible", [
|
|
414
408
|
outline({ color: "brand.ring", offset: 2 }),
|
|
415
409
|
data("color", "neutral", outline("neutral.ring")),
|
|
@@ -460,8 +454,7 @@ Sidebar.Item = function SidebarItem(handle) {
|
|
|
460
454
|
when("& > svg, & > [data-slot='icon']", fg("danger")),
|
|
461
455
|
])),
|
|
462
456
|
when("&:active", bg("neutral.bg-tint-pressed")),
|
|
463
|
-
|
|
464
|
-
] }));
|
|
457
|
+
], mix) }));
|
|
465
458
|
};
|
|
466
459
|
};
|
|
467
460
|
/**
|
|
@@ -482,7 +475,7 @@ Sidebar.Item = function SidebarItem(handle) {
|
|
|
482
475
|
Sidebar.Group = function SidebarGroup(handle) {
|
|
483
476
|
return () => {
|
|
484
477
|
let { mix, ...rest } = handle.props;
|
|
485
|
-
return (_jsx("section", { ...rest, "data-slot": "group", mix: [
|
|
478
|
+
return (_jsx("section", { ...rest, "data-slot": "group", mix: mergeMix([
|
|
486
479
|
flex(),
|
|
487
480
|
flexCol(),
|
|
488
481
|
when("& + &", [
|
|
@@ -495,8 +488,7 @@ Sidebar.Group = function SidebarGroup(handle) {
|
|
|
495
488
|
]),
|
|
496
489
|
gap("0.25rem"),
|
|
497
490
|
when("& + &", pbs("1rem")),
|
|
498
|
-
|
|
499
|
-
] }));
|
|
491
|
+
], mix) }));
|
|
500
492
|
};
|
|
501
493
|
};
|
|
502
494
|
/**
|
|
@@ -512,7 +504,7 @@ Sidebar.Group = function SidebarGroup(handle) {
|
|
|
512
504
|
Sidebar.GroupLabel = function SidebarGroupLabel(handle) {
|
|
513
505
|
return () => {
|
|
514
506
|
let { mix, ...rest } = handle.props;
|
|
515
|
-
return (_jsx("div", { ...rest, "data-slot": "group-label", mix: [
|
|
507
|
+
return (_jsx("div", { ...rest, "data-slot": "group-label", mix: mergeMix([
|
|
516
508
|
flex(),
|
|
517
509
|
items("center"),
|
|
518
510
|
justify("between"),
|
|
@@ -525,8 +517,7 @@ Sidebar.GroupLabel = function SidebarGroupLabel(handle) {
|
|
|
525
517
|
pi("0.5rem"),
|
|
526
518
|
pb("0.375rem"),
|
|
527
519
|
fg("neutral.muted"),
|
|
528
|
-
|
|
529
|
-
] }));
|
|
520
|
+
], mix) }));
|
|
530
521
|
};
|
|
531
522
|
};
|
|
532
523
|
/**
|
|
@@ -548,7 +539,7 @@ Sidebar.GroupAction = function SidebarGroupAction(handle) {
|
|
|
548
539
|
return () => {
|
|
549
540
|
let { children, mix, ...rest } = handle.props;
|
|
550
541
|
warnIfNoAccessibleName(handle.props, children, "Sidebar.GroupAction: an icon-only action needs an `aria-label` describing what it does — assistive technology has no accessible text to announce otherwise.");
|
|
551
|
-
return (_jsx("button", { type: "button", ...rest, "data-slot": "group-action", mix: [
|
|
542
|
+
return (_jsx("button", { type: "button", ...rest, "data-slot": "group-action", mix: mergeMix([
|
|
552
543
|
when("&:focus-visible", outline({ color: "brand.ring", offset: 2 })),
|
|
553
544
|
relative(),
|
|
554
545
|
inlineFlex(),
|
|
@@ -562,8 +553,7 @@ Sidebar.GroupAction = function SidebarGroupAction(handle) {
|
|
|
562
553
|
fg("neutral.muted"),
|
|
563
554
|
transition("color, background-color, border-color, outline-color, text-decoration-color, fill, stroke"),
|
|
564
555
|
hover([bg("neutral.bg-tint-hover"), fg("neutral")]),
|
|
565
|
-
|
|
566
|
-
], children: children }));
|
|
556
|
+
], mix), children: children }));
|
|
567
557
|
};
|
|
568
558
|
};
|
|
569
559
|
/**
|
|
@@ -580,7 +570,7 @@ Sidebar.GroupAction = function SidebarGroupAction(handle) {
|
|
|
580
570
|
Sidebar.GroupContent = function SidebarGroupContent(handle) {
|
|
581
571
|
return () => {
|
|
582
572
|
let { mix, ...rest } = handle.props;
|
|
583
|
-
return _jsx("div", { ...rest, "data-slot": "group-content", mix:
|
|
573
|
+
return (_jsx("div", { ...rest, "data-slot": "group-content", mix: mergeMix(vstack({ gap: "0.125rem" }), mix) }));
|
|
584
574
|
};
|
|
585
575
|
};
|
|
586
576
|
/**
|
|
@@ -599,7 +589,7 @@ Sidebar.GroupContent = function SidebarGroupContent(handle) {
|
|
|
599
589
|
Sidebar.Menu = function SidebarMenu(handle) {
|
|
600
590
|
return () => {
|
|
601
591
|
let { mix, ...rest } = handle.props;
|
|
602
|
-
return (_jsx("ul", { ...rest, "data-slot": "menu", mix: [is("full"), minIs("0"), vstack({ gap: "0.125rem" }), mix
|
|
592
|
+
return (_jsx("ul", { ...rest, "data-slot": "menu", mix: mergeMix([is("full"), minIs("0"), vstack({ gap: "0.125rem" })], mix) }));
|
|
603
593
|
};
|
|
604
594
|
};
|
|
605
595
|
/**
|
|
@@ -620,7 +610,7 @@ Sidebar.Menu = function SidebarMenu(handle) {
|
|
|
620
610
|
Sidebar.MenuItem = function SidebarMenuItem(handle) {
|
|
621
611
|
return () => {
|
|
622
612
|
let { mix, ...rest } = handle.props;
|
|
623
|
-
return (_jsx("li", { ...rest, "data-slot": "menu-item", mix: [
|
|
613
|
+
return (_jsx("li", { ...rest, "data-slot": "menu-item", mix: mergeMix([
|
|
624
614
|
relative(),
|
|
625
615
|
flex(),
|
|
626
616
|
/**
|
|
@@ -631,8 +621,7 @@ Sidebar.MenuItem = function SidebarMenuItem(handle) {
|
|
|
631
621
|
when('&:not(:has([data-slot="menu-sub"]))', items("center")),
|
|
632
622
|
when('&:has([data-slot="menu-sub"])', [flexCol(), items("stretch")]),
|
|
633
623
|
when("&:hover [data-slot='menu-action'], &:focus-within [data-slot='menu-action']", opacity(100)),
|
|
634
|
-
|
|
635
|
-
] }));
|
|
624
|
+
], mix) }));
|
|
636
625
|
};
|
|
637
626
|
};
|
|
638
627
|
/**
|
|
@@ -652,11 +641,10 @@ Sidebar.MenuButton = function SidebarMenuButton(handle) {
|
|
|
652
641
|
return () => {
|
|
653
642
|
let { size, active, mix, ...rest } = handle.props;
|
|
654
643
|
let resolvedSize = size ?? DEFAULT_MENU_BUTTON_SIZE;
|
|
655
|
-
return (_jsx("button", { type: "button", ...rest, "data-slot": "menu-button", "data-size": resolvedSize, "data-active": active || undefined, mix: [
|
|
644
|
+
return (_jsx("button", { type: "button", ...rest, "data-slot": "menu-button", "data-size": resolvedSize, "data-active": active || undefined, mix: mergeMix([
|
|
656
645
|
when("&:focus-visible", outline({ color: "brand.ring", offset: 2 })),
|
|
657
646
|
...menuRowMixins(),
|
|
658
|
-
|
|
659
|
-
] }));
|
|
647
|
+
], mix) }));
|
|
660
648
|
};
|
|
661
649
|
};
|
|
662
650
|
/**
|
|
@@ -680,11 +668,10 @@ Sidebar.MenuLink = function SidebarMenuLink(handle) {
|
|
|
680
668
|
let resolvedSize = size ?? DEFAULT_MENU_BUTTON_SIZE;
|
|
681
669
|
let resolvedAriaCurrent = resolveAriaCurrent(active, ariaCurrent);
|
|
682
670
|
let resolvedPrefetch = prefetch ?? DEFAULT_PREFETCH;
|
|
683
|
-
let anchor = (_jsx("a", { "data-rmx-prefetch": prefetchAttribute(resolvedPrefetch), ...rest, "aria-current": resolvedAriaCurrent, "data-slot": "menu-link", "data-size": resolvedSize, "data-active": active || undefined, mix: [
|
|
671
|
+
let anchor = (_jsx("a", { "data-rmx-prefetch": prefetchAttribute(resolvedPrefetch), ...rest, "aria-current": resolvedAriaCurrent, "data-slot": "menu-link", "data-size": resolvedSize, "data-active": active || undefined, mix: mergeMix([
|
|
684
672
|
when("&:focus-visible", outline({ color: "brand.ring", offset: 2 })),
|
|
685
673
|
...menuRowMixins(),
|
|
686
|
-
|
|
687
|
-
] }));
|
|
674
|
+
], mix) }));
|
|
688
675
|
if (!rendersPrefetchHint(resolvedPrefetch, rest.href))
|
|
689
676
|
return anchor;
|
|
690
677
|
return (_jsxs(_Fragment, { children: [anchor, _jsx("link", { rel: "prefetch", href: rest.href })] }));
|
|
@@ -772,7 +759,7 @@ Sidebar.MenuAction = function SidebarMenuAction(handle) {
|
|
|
772
759
|
let { showOnHover, children, mix, ...rest } = handle.props;
|
|
773
760
|
let resolvedShowOnHover = showOnHover ?? DEFAULT_SHOW_ON_HOVER;
|
|
774
761
|
warnIfNoAccessibleName(handle.props, children, "Sidebar.MenuAction: an icon-only action needs an `aria-label` describing what it does — assistive technology has no accessible text to announce otherwise.");
|
|
775
|
-
return (_jsx("button", { type: "button", ...rest, "data-slot": "menu-action", "data-show-on-hover": resolvedShowOnHover ? undefined : "false", mix: [
|
|
762
|
+
return (_jsx("button", { type: "button", ...rest, "data-slot": "menu-action", "data-show-on-hover": resolvedShowOnHover ? undefined : "false", mix: mergeMix([
|
|
776
763
|
when("&:focus-visible", outline({ color: "brand.ring", offset: 2 })),
|
|
777
764
|
absolute(),
|
|
778
765
|
insIe("0.375rem"),
|
|
@@ -792,8 +779,7 @@ Sidebar.MenuAction = function SidebarMenuAction(handle) {
|
|
|
792
779
|
fg("neutral.muted"),
|
|
793
780
|
transition("color, background-color, border-color, outline-color, text-decoration-color, fill, stroke"),
|
|
794
781
|
hover([bg("neutral.bg-tint-pressed"), fg("neutral")]),
|
|
795
|
-
|
|
796
|
-
], children: children }));
|
|
782
|
+
], mix), children: children }));
|
|
797
783
|
};
|
|
798
784
|
};
|
|
799
785
|
/**
|
|
@@ -812,7 +798,7 @@ Sidebar.MenuAction = function SidebarMenuAction(handle) {
|
|
|
812
798
|
Sidebar.MenuBadge = function SidebarMenuBadge(handle) {
|
|
813
799
|
return () => {
|
|
814
800
|
let { mix, ...rest } = handle.props;
|
|
815
|
-
return (_jsx("span", { ...rest, "data-slot": "menu-badge", mix: [
|
|
801
|
+
return (_jsx("span", { ...rest, "data-slot": "menu-badge", mix: mergeMix([
|
|
816
802
|
mis("auto"),
|
|
817
803
|
shrink(),
|
|
818
804
|
fontSize("xs"),
|
|
@@ -823,8 +809,7 @@ Sidebar.MenuBadge = function SidebarMenuBadge(handle) {
|
|
|
823
809
|
pb("0.125rem"),
|
|
824
810
|
bg("neutral.bg-tint-hover"),
|
|
825
811
|
fg("neutral"),
|
|
826
|
-
|
|
827
|
-
] }));
|
|
812
|
+
], mix) }));
|
|
828
813
|
};
|
|
829
814
|
};
|
|
830
815
|
/**
|
|
@@ -843,15 +828,7 @@ Sidebar.MenuSkeleton = function SidebarMenuSkeleton(handle) {
|
|
|
843
828
|
return () => {
|
|
844
829
|
let { showIcon, mix, ...rest } = handle.props;
|
|
845
830
|
let resolvedShowIcon = showIcon ?? DEFAULT_SHOW_ICON;
|
|
846
|
-
return (_jsxs("div", { ...rest, "data-slot": "menu-skeleton", mix: [
|
|
847
|
-
flex(),
|
|
848
|
-
items("center"),
|
|
849
|
-
bs("2.25rem"),
|
|
850
|
-
gap("0.75rem"),
|
|
851
|
-
pi("0.5rem"),
|
|
852
|
-
rounded("lg"),
|
|
853
|
-
mix,
|
|
854
|
-
], children: [resolvedShowIcon && (_jsx("span", { "aria-hidden": "true", "data-slot": "menu-skeleton-icon", mix: [is("1rem"), bs("1rem"), shrink(), rounded("sm"), bg("neutral.border")] })), _jsx("span", { "aria-hidden": "true", "data-slot": "menu-skeleton-text", mix: [bs("1rem"), grow(), is("60%"), rounded("md"), bg("neutral.border")] })] }));
|
|
831
|
+
return (_jsxs("div", { ...rest, "data-slot": "menu-skeleton", mix: mergeMix([flex(), items("center"), bs("2.25rem"), gap("0.75rem"), pi("0.5rem"), rounded("lg")], mix), children: [resolvedShowIcon && (_jsx("span", { "aria-hidden": "true", "data-slot": "menu-skeleton-icon", mix: [is("1rem"), bs("1rem"), shrink(), rounded("sm"), bg("neutral.border")] })), _jsx("span", { "aria-hidden": "true", "data-slot": "menu-skeleton-text", mix: [bs("1rem"), grow(), is("60%"), rounded("md"), bg("neutral.border")] })] }));
|
|
855
832
|
};
|
|
856
833
|
};
|
|
857
834
|
/**
|
|
@@ -871,7 +848,7 @@ Sidebar.MenuSkeleton = function SidebarMenuSkeleton(handle) {
|
|
|
871
848
|
Sidebar.MenuSub = function SidebarMenuSub(handle) {
|
|
872
849
|
return () => {
|
|
873
850
|
let { mix, ...rest } = handle.props;
|
|
874
|
-
return (_jsx("ul", { ...rest, "data-slot": "menu-sub", mix: [
|
|
851
|
+
return (_jsx("ul", { ...rest, "data-slot": "menu-sub", mix: mergeMix([
|
|
875
852
|
relative(),
|
|
876
853
|
mis("1rem"),
|
|
877
854
|
flex(),
|
|
@@ -880,8 +857,7 @@ Sidebar.MenuSub = function SidebarMenuSub(handle) {
|
|
|
880
857
|
pis("0.625rem"),
|
|
881
858
|
gap("0.125rem"),
|
|
882
859
|
border("neutral"),
|
|
883
|
-
|
|
884
|
-
] }));
|
|
860
|
+
], mix) }));
|
|
885
861
|
};
|
|
886
862
|
};
|
|
887
863
|
/**
|
|
@@ -897,7 +873,7 @@ Sidebar.MenuSub = function SidebarMenuSub(handle) {
|
|
|
897
873
|
Sidebar.MenuSubItem = function SidebarMenuSubItem(handle) {
|
|
898
874
|
return () => {
|
|
899
875
|
let { mix, ...rest } = handle.props;
|
|
900
|
-
return _jsx("li", { ...rest, "data-slot": "menu-sub-item", mix: [flex(), items("center"), mix
|
|
876
|
+
return (_jsx("li", { ...rest, "data-slot": "menu-sub-item", mix: mergeMix([flex(), items("center")], mix) }));
|
|
901
877
|
};
|
|
902
878
|
};
|
|
903
879
|
/**
|
|
@@ -913,11 +889,10 @@ Sidebar.MenuSubItem = function SidebarMenuSubItem(handle) {
|
|
|
913
889
|
Sidebar.MenuSubButton = function SidebarMenuSubButton(handle) {
|
|
914
890
|
return () => {
|
|
915
891
|
let { active, mix, ...rest } = handle.props;
|
|
916
|
-
return (_jsx("button", { type: "button", ...rest, "data-slot": "menu-sub-button", "data-active": active || undefined, mix: [
|
|
892
|
+
return (_jsx("button", { type: "button", ...rest, "data-slot": "menu-sub-button", "data-active": active || undefined, mix: mergeMix([
|
|
917
893
|
when("&:focus-visible", outline({ color: "brand.ring", offset: 2 })),
|
|
918
894
|
...menuSubRowMixins(),
|
|
919
|
-
|
|
920
|
-
] }));
|
|
895
|
+
], mix) }));
|
|
921
896
|
};
|
|
922
897
|
};
|
|
923
898
|
/**
|
|
@@ -935,11 +910,10 @@ Sidebar.MenuSubLink = function SidebarMenuSubLink(handle) {
|
|
|
935
910
|
let { active, prefetch, "aria-current": ariaCurrent, mix, ...rest } = handle.props;
|
|
936
911
|
let resolvedAriaCurrent = resolveAriaCurrent(active, ariaCurrent);
|
|
937
912
|
let resolvedPrefetch = prefetch ?? DEFAULT_PREFETCH;
|
|
938
|
-
let anchor = (_jsx("a", { "data-rmx-prefetch": prefetchAttribute(resolvedPrefetch), ...rest, "aria-current": resolvedAriaCurrent, "data-slot": "menu-sub-link", "data-active": active || undefined, mix: [
|
|
913
|
+
let anchor = (_jsx("a", { "data-rmx-prefetch": prefetchAttribute(resolvedPrefetch), ...rest, "aria-current": resolvedAriaCurrent, "data-slot": "menu-sub-link", "data-active": active || undefined, mix: mergeMix([
|
|
939
914
|
when("&:focus-visible", outline({ color: "brand.ring", offset: 2 })),
|
|
940
915
|
...menuSubRowMixins(),
|
|
941
|
-
|
|
942
|
-
] }));
|
|
916
|
+
], mix) }));
|
|
943
917
|
if (!rendersPrefetchHint(resolvedPrefetch, rest.href))
|
|
944
918
|
return anchor;
|
|
945
919
|
return (_jsxs(_Fragment, { children: [anchor, _jsx("link", { rel: "prefetch", href: rest.href })] }));
|
|
@@ -992,7 +966,7 @@ function menuSubRowMixins() {
|
|
|
992
966
|
Sidebar.Rail = function SidebarRail(handle) {
|
|
993
967
|
return () => {
|
|
994
968
|
let { mix, ...rest } = handle.props;
|
|
995
|
-
return (_jsx("label", { ...rest, "data-slot": "rail", mix: [
|
|
969
|
+
return (_jsx("label", { ...rest, "data-slot": "rail", mix: mergeMix([
|
|
996
970
|
attrs({ "aria-hidden": "true" }),
|
|
997
971
|
absolute(),
|
|
998
972
|
insBs("0"),
|
|
@@ -1018,8 +992,7 @@ Sidebar.Rail = function SidebarRail(handle) {
|
|
|
1018
992
|
when(WIDE_SHELL_QUERY, [flex(), items("center"), justify("center")]),
|
|
1019
993
|
hover(after(bg("neutral.border"))),
|
|
1020
994
|
when("&:active", after(bg("brand.ring"))),
|
|
1021
|
-
|
|
1022
|
-
] }));
|
|
995
|
+
], mix) }));
|
|
1023
996
|
};
|
|
1024
997
|
};
|
|
1025
998
|
/**
|
|
@@ -1053,7 +1026,7 @@ Sidebar.Trigger = function SidebarTrigger(handle) {
|
|
|
1053
1026
|
fg("neutral.muted"),
|
|
1054
1027
|
transition("color, background-color, border-color, outline-color, text-decoration-color, fill, stroke"),
|
|
1055
1028
|
hover([bg("neutral.bg-tint-hover"), fg("neutral.emphasis")]),
|
|
1056
|
-
], children: [_jsx(PanelLeftIcon, {}), _jsx("input", { type: "checkbox", ...rest, "data-slot": "toggle", mix:
|
|
1029
|
+
], children: [_jsx(PanelLeftIcon, {}), _jsx("input", { type: "checkbox", ...rest, "data-slot": "toggle", mix: mergeMix(visuallyHidden(), mix) })] }));
|
|
1057
1030
|
};
|
|
1058
1031
|
};
|
|
1059
1032
|
/**
|
|
@@ -1072,7 +1045,7 @@ Sidebar.Trigger = function SidebarTrigger(handle) {
|
|
|
1072
1045
|
Sidebar.Inset = function SidebarInset(handle) {
|
|
1073
1046
|
return () => {
|
|
1074
1047
|
let { mix, ...rest } = handle.props;
|
|
1075
|
-
return (_jsx(ScrollArea.Viewport, { ...rest, "data-slot": "inset", mix: [
|
|
1048
|
+
return (_jsx(ScrollArea.Viewport, { ...rest, "data-slot": "inset", mix: mergeMix([
|
|
1076
1049
|
flex(),
|
|
1077
1050
|
flexCol(),
|
|
1078
1051
|
grow(),
|
|
@@ -1081,8 +1054,7 @@ Sidebar.Inset = function SidebarInset(handle) {
|
|
|
1081
1054
|
bs("auto"),
|
|
1082
1055
|
container(INSET_CONTAINER_NAME),
|
|
1083
1056
|
bg("neutral.tint"),
|
|
1084
|
-
|
|
1085
|
-
] }));
|
|
1057
|
+
], mix) }));
|
|
1086
1058
|
};
|
|
1087
1059
|
};
|
|
1088
1060
|
/**
|
|
@@ -1100,6 +1072,6 @@ Sidebar.Inset = function SidebarInset(handle) {
|
|
|
1100
1072
|
Sidebar.Separator = function SidebarSeparator(handle) {
|
|
1101
1073
|
return () => {
|
|
1102
1074
|
let { mix, ...rest } = handle.props;
|
|
1103
|
-
return _jsx(Separator, { ...rest, "data-slot": "separator", mix:
|
|
1075
|
+
return _jsx(Separator, { ...rest, "data-slot": "separator", mix: mergeMix(m("0.5rem"), mix) });
|
|
1104
1076
|
};
|
|
1105
1077
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "remix/component/jsx-runtime";
|
|
2
2
|
import { absolute, after, appearance, basis, before, bg, border, bs, cursor, grow, insBe, insBs, insIe, insIs, inset, is, items, m, minBs, minIs, outlineStyle, pseudoContent, raw, relative, rounded, shrink, tabularNums, translateX, translateY, vstack, when, z, } from "@sdxc/u";
|
|
3
|
+
import { mergeMix } from "@sdxc/u/general";
|
|
3
4
|
import { outputCaptionText } from "../styles/output-caption-text.js";
|
|
4
5
|
import { rangeThumbAppearance } from "../styles/range-thumb-appearance.js";
|
|
5
6
|
import { mergeStyle } from "../utils/merge-style.js";
|
|
@@ -53,12 +54,11 @@ export function Slider(handle) {
|
|
|
53
54
|
orientation: resolvedOrientation,
|
|
54
55
|
thumbId: handle.id,
|
|
55
56
|
});
|
|
56
|
-
return (_jsx("div", { "data-slot": "slider", "data-orientation": resolvedOrientation, ...rest, mix: [
|
|
57
|
+
return (_jsx("div", { "data-slot": "slider", "data-orientation": resolvedOrientation, ...rest, mix: mergeMix([
|
|
57
58
|
vstack({ gap: "0.5rem" }),
|
|
58
59
|
when('&[data-orientation="horizontal"]', [is("100%"), minIs("10rem")]),
|
|
59
60
|
when('&[data-orientation="vertical"]', [bs("10rem"), items("center")]),
|
|
60
|
-
|
|
61
|
-
] }));
|
|
61
|
+
], mix) }));
|
|
62
62
|
};
|
|
63
63
|
}
|
|
64
64
|
/**
|
|
@@ -79,7 +79,7 @@ Slider.Track = function SliderTrack(handle) {
|
|
|
79
79
|
let context = handle.context.get(Slider);
|
|
80
80
|
let fillPercent = resolveFillPercent(context.min, context.max, context.value);
|
|
81
81
|
let resolvedStyle = mergeStyle(style, { "--ui-slider-fill": `${fillPercent}%` });
|
|
82
|
-
return (_jsx("div", { ...rest, style: resolvedStyle, mix: [
|
|
82
|
+
return (_jsx("div", { ...rest, style: resolvedStyle, mix: mergeMix([
|
|
83
83
|
relative(),
|
|
84
84
|
when('[data-orientation="horizontal"] &', [
|
|
85
85
|
is("100%"),
|
|
@@ -124,8 +124,7 @@ Slider.Track = function SliderTrack(handle) {
|
|
|
124
124
|
insIs("50%"),
|
|
125
125
|
translateX("-50%"),
|
|
126
126
|
]),
|
|
127
|
-
|
|
128
|
-
] }));
|
|
127
|
+
], mix) }));
|
|
129
128
|
};
|
|
130
129
|
};
|
|
131
130
|
/**
|
|
@@ -146,7 +145,7 @@ Slider.Thumb = function SliderThumb(handle) {
|
|
|
146
145
|
let context = handle.context.get(Slider);
|
|
147
146
|
let resolvedStep = step ?? DEFAULT_STEP;
|
|
148
147
|
let resolvedValue = value ?? defaultValue ?? context.value;
|
|
149
|
-
return (_jsx("input", { ...rest, type: "range", id: id ?? context.thumbId, min: min ?? context.min, max: max ?? context.max, step: resolvedStep, defaultValue: resolvedValue, "aria-orientation": context.orientation === "vertical" ? "vertical" : undefined, mix: [
|
|
148
|
+
return (_jsx("input", { ...rest, type: "range", id: id ?? context.thumbId, min: min ?? context.min, max: max ?? context.max, step: resolvedStep, defaultValue: resolvedValue, "aria-orientation": context.orientation === "vertical" ? "vertical" : undefined, mix: mergeMix([
|
|
150
149
|
rangeThumbAppearance("--ui-slider-thumb-size", "--ui-slider-thumb-border-width"),
|
|
151
150
|
absolute(),
|
|
152
151
|
inset("0"),
|
|
@@ -172,8 +171,7 @@ Slider.Thumb = function SliderThumb(handle) {
|
|
|
172
171
|
border({ style: "none" }),
|
|
173
172
|
]),
|
|
174
173
|
when('[data-slot="slider"][data-orientation="vertical"] &', raw({ writingMode: "vertical-lr", direction: "rtl" })),
|
|
175
|
-
|
|
176
|
-
] }));
|
|
174
|
+
], mix) }));
|
|
177
175
|
};
|
|
178
176
|
};
|
|
179
177
|
/**
|
|
@@ -190,6 +188,6 @@ Slider.Output = function SliderOutput(handle) {
|
|
|
190
188
|
return () => {
|
|
191
189
|
let { htmlFor, mix, ...rest } = handle.props;
|
|
192
190
|
let context = handle.context.get(Slider);
|
|
193
|
-
return (_jsx("output", { ...rest, htmlFor: htmlFor ?? context.thumbId, mix: [outputCaptionText(), tabularNums(), mix
|
|
191
|
+
return (_jsx("output", { ...rest, htmlFor: htmlFor ?? context.thumbId, mix: mergeMix([outputCaptionText(), tabularNums()], mix) }));
|
|
194
192
|
};
|
|
195
193
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "remix/component/jsx-runtime";
|
|
2
2
|
import { LoaderCircleIcon } from "@sdxc/icons";
|
|
3
3
|
import { bs, fg, inlineFlex, is, items, justify, when } from "@sdxc/u";
|
|
4
|
+
import { mergeMix } from "@sdxc/u/general";
|
|
4
5
|
/** Semantic color role {@link Spinner} falls back to when `color` is omitted. */
|
|
5
6
|
const DEFAULT_COLOR = "neutral";
|
|
6
7
|
/** Size variant {@link Spinner} falls back to when `size` is omitted. */
|
|
@@ -24,7 +25,7 @@ export function Spinner(handle) {
|
|
|
24
25
|
let { mix, color, size, "aria-label": ariaLabel, ...rest } = handle.props;
|
|
25
26
|
let resolvedColor = color ?? DEFAULT_COLOR;
|
|
26
27
|
let resolvedSize = size ?? DEFAULT_SIZE;
|
|
27
|
-
return (_jsx("div", { role: "progressbar", "aria-label": ariaLabel, "data-color": resolvedColor, "data-size": resolvedSize, ...rest, mix: [
|
|
28
|
+
return (_jsx("div", { role: "progressbar", "aria-label": ariaLabel, "data-color": resolvedColor, "data-size": resolvedSize, ...rest, mix: mergeMix([
|
|
28
29
|
inlineFlex(),
|
|
29
30
|
items("center"),
|
|
30
31
|
justify("center"),
|
|
@@ -45,7 +46,6 @@ export function Spinner(handle) {
|
|
|
45
46
|
is("var(--ui-spinner-icon-size-lg, 1.75rem)"),
|
|
46
47
|
bs("var(--ui-spinner-icon-size-lg, 1.75rem)"),
|
|
47
48
|
]),
|
|
48
|
-
|
|
49
|
-
], children: _jsx(LoaderCircleIcon, {}) }));
|
|
49
|
+
], mix), children: _jsx(LoaderCircleIcon, {}) }));
|
|
50
50
|
};
|
|
51
51
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "remix/component/jsx-runtime";
|
|
2
2
|
import { absolute, appearance, before, bg, bs, cursor, focusVisible, hstack, inlineBlock, insBs, insIs, is, m, media, opacity, outline, pseudoContent, verticalAlign, relative, rounded, scaleProperty, shadow, shrink, transition, transitionDuration, when, } from "@sdxc/u";
|
|
3
|
+
import { mergeMix } from "@sdxc/u/general";
|
|
3
4
|
import { attrs } from "remix/component";
|
|
4
5
|
import { durations, easings } from "../animations/tokens.js";
|
|
5
6
|
/**
|
|
@@ -32,7 +33,7 @@ export function Switch(handle) {
|
|
|
32
33
|
let { mix, children, ...rest } = handle.props;
|
|
33
34
|
let track = (_jsx("input", { ...rest, type: "checkbox",
|
|
34
35
|
// oxlint-disable-next-line jsx-a11y/role-has-required-aria-props -- The host is a native checkbox, so its own checkedness supplies the switch's checked state; see the note above for why authoring one would be worse than omitting it.
|
|
35
|
-
role: "switch", mix: [
|
|
36
|
+
role: "switch", mix: mergeMix([
|
|
36
37
|
attrs({ switch: DEFAULT_SWITCH_ATTRIBUTE }),
|
|
37
38
|
appearance(),
|
|
38
39
|
relative(),
|
|
@@ -69,8 +70,7 @@ export function Switch(handle) {
|
|
|
69
70
|
when("&:checked", before(insIs("calc(var(--ui-switch-track-inline-size, 2.75rem) - var(--ui-switch-thumb-size, 1.25rem) - var(--ui-switch-thumb-inset, 0.125rem))"))),
|
|
70
71
|
when("&:active", before(scaleProperty("0.95"))),
|
|
71
72
|
media("(prefers-reduced-motion: reduce)", before(transitionDuration("0s"))),
|
|
72
|
-
|
|
73
|
-
] }));
|
|
73
|
+
], mix) }));
|
|
74
74
|
if (children === undefined)
|
|
75
75
|
return track;
|
|
76
76
|
return (_jsxs("label", { mix: [
|
package/dist/components/tabs.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "remix/component/jsx-runtime";
|
|
2
2
|
import { bg, borderEdge, fg, outline, outlineStyle } from "@sdxc/u/color";
|
|
3
3
|
import { opacity, 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 { absolute, basis, flexCol, flexRow, grow, hstack, insBe, insIs, inset, relative, shrink, vstack, } from "@sdxc/u/layout";
|
|
6
6
|
import { bs, is, mbe, mie, pb, pi } from "@sdxc/u/size";
|
|
7
7
|
import { after, data, when } from "@sdxc/u/state";
|
|
@@ -62,7 +62,7 @@ export function Tabs(handle) {
|
|
|
62
62
|
let { orientation, mix, ...rest } = handle.props;
|
|
63
63
|
let resolvedOrientation = orientation ?? DEFAULT_ORIENTATION;
|
|
64
64
|
handle.context.set({ orientation: resolvedOrientation });
|
|
65
|
-
return (_jsx("div", { "data-orientation": resolvedOrientation, ...rest, mix: [vstack(), data("orientation", "vertical", flexRow()), mix
|
|
65
|
+
return (_jsx("div", { "data-orientation": resolvedOrientation, ...rest, mix: mergeMix([vstack(), data("orientation", "vertical", flexRow())], mix) }));
|
|
66
66
|
};
|
|
67
67
|
}
|
|
68
68
|
/**
|
|
@@ -123,7 +123,7 @@ Tabs.List = function TabsList(handle) {
|
|
|
123
123
|
let indicatorMix = activeIndex !== undefined && tabSize !== undefined
|
|
124
124
|
? tabIndicatorMix(context.orientation, activeIndex, tabSize)
|
|
125
125
|
: undefined;
|
|
126
|
-
return (_jsx("div", { "data-orientation": context.orientation, "aria-orientation": context.orientation, ...rest, mix: [
|
|
126
|
+
return (_jsx("div", { "data-orientation": context.orientation, "aria-orientation": context.orientation, ...rest, mix: mergeMix([
|
|
127
127
|
attrs({ role: DEFAULT_LIST_ROLE }),
|
|
128
128
|
relative(),
|
|
129
129
|
hstack({ gap: LIST_GAP }),
|
|
@@ -155,8 +155,7 @@ Tabs.List = function TabsList(handle) {
|
|
|
155
155
|
]),
|
|
156
156
|
]),
|
|
157
157
|
indicatorMix,
|
|
158
|
-
|
|
159
|
-
] }));
|
|
158
|
+
], mix) }));
|
|
160
159
|
};
|
|
161
160
|
};
|
|
162
161
|
/**
|
|
@@ -177,7 +176,7 @@ Tabs.Tab = function TabsTab(handle) {
|
|
|
177
176
|
return () => {
|
|
178
177
|
let { mix, ...rest } = handle.props;
|
|
179
178
|
let context = handle.context.get(Tabs);
|
|
180
|
-
return (_jsx("a", { "data-orientation": context.orientation, ...rest, mix: [
|
|
179
|
+
return (_jsx("a", { "data-orientation": context.orientation, ...rest, mix: mergeMix([
|
|
181
180
|
interactiveTransition(),
|
|
182
181
|
attrs({ role: DEFAULT_TAB_ROLE }),
|
|
183
182
|
when("&:focus-visible", outline({ color: "brand.ring", offset: 2 })),
|
|
@@ -199,8 +198,7 @@ Tabs.Tab = function TabsTab(handle) {
|
|
|
199
198
|
borderEdge("block-end", { width: "0" }),
|
|
200
199
|
borderEdge("inline-end", { color: "transparent", width: 2 }),
|
|
201
200
|
]),
|
|
202
|
-
|
|
203
|
-
] }));
|
|
201
|
+
], mix) }));
|
|
204
202
|
};
|
|
205
203
|
};
|
|
206
204
|
/**
|
|
@@ -218,7 +216,7 @@ Tabs.Tab = function TabsTab(handle) {
|
|
|
218
216
|
Tabs.Panels = function TabsPanels(handle) {
|
|
219
217
|
return () => {
|
|
220
218
|
let { mix, ...rest } = handle.props;
|
|
221
|
-
return _jsx("div", { ...rest, mix: [grow(), shrink(1), basis("0%"), mix
|
|
219
|
+
return _jsx("div", { ...rest, mix: mergeMix([grow(), shrink(1), basis("0%")], mix) });
|
|
222
220
|
};
|
|
223
221
|
};
|
|
224
222
|
/**
|
|
@@ -234,13 +232,12 @@ Tabs.Panels = function TabsPanels(handle) {
|
|
|
234
232
|
Tabs.Panel = function TabsPanel(handle) {
|
|
235
233
|
return () => {
|
|
236
234
|
let { mix, ...rest } = handle.props;
|
|
237
|
-
return (_jsx("div", { ...rest, mix: [
|
|
235
|
+
return (_jsx("div", { ...rest, mix: mergeMix([
|
|
238
236
|
attrs({ role: DEFAULT_PANEL_ROLE, tabIndex: DEFAULT_PANEL_TAB_INDEX }),
|
|
239
237
|
when("&:focus-visible", outline({ color: "brand.ring", offset: 2 })),
|
|
240
238
|
pb(4),
|
|
241
239
|
pi(4),
|
|
242
240
|
outlineStyle("none"),
|
|
243
|
-
|
|
244
|
-
] }));
|
|
241
|
+
], mix) }));
|
|
245
242
|
};
|
|
246
243
|
};
|