@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,6 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "remix/component/jsx-runtime";
|
|
2
2
|
import { bg, borderEdge, fg } from "@sdxc/u/color";
|
|
3
3
|
import { opacity, rounded, transition, transitionDuration } from "@sdxc/u/effects";
|
|
4
|
+
import { raw, mergeMix } from "@sdxc/u/general";
|
|
4
5
|
import { justify, shrink } from "@sdxc/u/layout";
|
|
5
6
|
import { media } from "@sdxc/u/responsive";
|
|
6
7
|
import { bs, is, pb, pbe, pi } from "@sdxc/u/size";
|
|
@@ -10,9 +11,9 @@ import { pretty, text, textDecoration } from "@sdxc/u/typography";
|
|
|
10
11
|
import { Disclosure } from "./disclosure.js";
|
|
11
12
|
/**
|
|
12
13
|
* Renders the list's root host: a plain `<div>` that stacks
|
|
13
|
-
* {@link Accordion.Item} sections in normal block flow
|
|
14
|
-
* divider so the
|
|
15
|
-
* lays two of these in a container-query grid under a {@link
|
|
14
|
+
* {@link Accordion.Item} sections in normal block flow under one top rule, each
|
|
15
|
+
* drawing the divider below it, so the list reads as one group. A landing FAQ
|
|
16
|
+
* lays two of these in a container-query grid under a {@link LandingHeader},
|
|
16
17
|
* sharing one `name` across columns so only one item opens at a time.
|
|
17
18
|
*
|
|
18
19
|
* @param handle Runtime handle carrying the host `<div>`'s props.
|
|
@@ -63,13 +64,14 @@ import { Disclosure } from "./disclosure.js";
|
|
|
63
64
|
export function Accordion(handle) {
|
|
64
65
|
return () => {
|
|
65
66
|
let { children, mix, ...rest } = handle.props;
|
|
66
|
-
return (_jsx("div", { ...rest, mix: [is("full"),
|
|
67
|
+
return (_jsx("div", { ...rest, mix: mergeMix([is("full"), borderEdge("block-start", { color: "neutral", width: 1, style: "solid" })], mix), children: children }));
|
|
67
68
|
};
|
|
68
69
|
}
|
|
69
70
|
/**
|
|
70
71
|
* Renders one section as {@link Disclosure} restyled into a flush list row:
|
|
71
|
-
* only a
|
|
72
|
-
* section. A trigger marked `aria-disabled="true"`
|
|
72
|
+
* only a block-end divider survives, and {@link Accordion} draws the top rule, so
|
|
73
|
+
* every closed section is the same height. A trigger marked `aria-disabled="true"`
|
|
74
|
+
* dims the whole section.
|
|
73
75
|
*
|
|
74
76
|
* @param handle Runtime handle carrying the host `<details>`'s props.
|
|
75
77
|
* @returns The render function producing the section's markup.
|
|
@@ -97,16 +99,14 @@ export function Accordion(handle) {
|
|
|
97
99
|
Accordion.Item = function AccordionItem(handle) {
|
|
98
100
|
return () => {
|
|
99
101
|
let { mix, ...rest } = handle.props;
|
|
100
|
-
return (_jsx(Disclosure, { ...rest, mix: [
|
|
102
|
+
return (_jsx(Disclosure, { ...rest, mix: mergeMix([
|
|
101
103
|
rounded("none"),
|
|
102
104
|
borderEdge("inline-start", { width: "0", noStyleDefault: true }),
|
|
103
105
|
borderEdge("inline-end", { width: "0", noStyleDefault: true }),
|
|
104
106
|
borderEdge("block-start", { width: "0", noStyleDefault: true }),
|
|
105
107
|
open(when('& summary [data-slot="icon"]', rotate(180))),
|
|
106
|
-
when("&:first-child", borderEdge("block-start", { width: 1 })),
|
|
107
108
|
when('&:has(> summary[aria-disabled="true"])', opacity(50)),
|
|
108
|
-
|
|
109
|
-
] }));
|
|
109
|
+
], mix) }));
|
|
110
110
|
};
|
|
111
111
|
};
|
|
112
112
|
/**
|
|
@@ -130,11 +130,16 @@ Accordion.Item = function AccordionItem(handle) {
|
|
|
130
130
|
Accordion.Trigger = function AccordionTrigger(handle) {
|
|
131
131
|
return () => {
|
|
132
132
|
let { mix, ...rest } = handle.props;
|
|
133
|
-
return (_jsx(Disclosure.Trigger, { ...rest, mix: [
|
|
133
|
+
return (_jsx(Disclosure.Trigger, { ...rest, mix: mergeMix([
|
|
134
134
|
justify("between"),
|
|
135
135
|
pb(4),
|
|
136
136
|
pi(0),
|
|
137
|
-
rounded("
|
|
137
|
+
rounded("sm"),
|
|
138
|
+
/**
|
|
139
|
+
* The row runs flush to the column edge, so the focus ring is drawn inside it
|
|
140
|
+
* where an outer offset would be clipped by the band.
|
|
141
|
+
*/
|
|
142
|
+
when("&:focus-visible", raw({ outlineOffset: "-2px" })),
|
|
138
143
|
hover([bg("transparent"), textDecoration("underline")]),
|
|
139
144
|
when('& [data-slot="icon"]', [
|
|
140
145
|
is(4),
|
|
@@ -143,8 +148,7 @@ Accordion.Trigger = function AccordionTrigger(handle) {
|
|
|
143
148
|
transition("transform", { duration: "200ms" }),
|
|
144
149
|
]),
|
|
145
150
|
media("(prefers-reduced-motion: reduce)", when('& [data-slot="icon"]', transitionDuration("0s"))),
|
|
146
|
-
|
|
147
|
-
] }));
|
|
151
|
+
], mix) }));
|
|
148
152
|
};
|
|
149
153
|
};
|
|
150
154
|
/**
|
|
@@ -162,6 +166,6 @@ Accordion.Trigger = function AccordionTrigger(handle) {
|
|
|
162
166
|
Accordion.Content = function AccordionContent(handle) {
|
|
163
167
|
return () => {
|
|
164
168
|
let { mix, ...rest } = handle.props;
|
|
165
|
-
return (_jsx(Disclosure.Panel, { ...rest, mix: [pi(0), pbe(4), fg("neutral"), text("sm"), pretty(), mix
|
|
169
|
+
return (_jsx(Disclosure.Panel, { ...rest, mix: mergeMix([pi(0), pbe(4), fg("neutral"), text("sm"), pretty()], mix) }));
|
|
166
170
|
};
|
|
167
171
|
};
|
|
@@ -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 { flex, gap, justify, vstack } from "@sdxc/u/layout";
|
|
4
5
|
import { mbs } from "@sdxc/u/size";
|
|
5
6
|
import { balance, pretty, text, weight } from "@sdxc/u/typography";
|
|
@@ -66,7 +67,7 @@ export function AlertDialog(handle) {
|
|
|
66
67
|
AlertDialog.Header = function AlertDialogHeader(handle) {
|
|
67
68
|
return () => {
|
|
68
69
|
let { mix, ...rest } = handle.props;
|
|
69
|
-
return _jsx("div", { ...rest, "data-slot": "header", mix:
|
|
70
|
+
return _jsx("div", { ...rest, "data-slot": "header", mix: mergeMix(vstack({ gap: 2 }), mix) });
|
|
70
71
|
};
|
|
71
72
|
};
|
|
72
73
|
/**
|
|
@@ -84,7 +85,7 @@ AlertDialog.Title = function AlertDialogTitle(handle) {
|
|
|
84
85
|
let { mix, ...rest } = handle.props;
|
|
85
86
|
let resolved = resolveHeadingLevel(handle);
|
|
86
87
|
let Tag = TAG_BY_LEVEL[resolved];
|
|
87
|
-
return (_jsx(Tag, { ...rest, "data-slot": "title", mix: [fg("neutral.emphasis"), weight("semibold"), text("lg"), balance(), mix
|
|
88
|
+
return (_jsx(Tag, { ...rest, "data-slot": "title", mix: mergeMix([fg("neutral.emphasis"), weight("semibold"), text("lg"), balance()], mix), children: rest.children }));
|
|
88
89
|
};
|
|
89
90
|
};
|
|
90
91
|
/**
|
|
@@ -100,7 +101,7 @@ AlertDialog.Title = function AlertDialogTitle(handle) {
|
|
|
100
101
|
AlertDialog.Description = function AlertDialogDescription(handle) {
|
|
101
102
|
return () => {
|
|
102
103
|
let { mix, ...rest } = handle.props;
|
|
103
|
-
return (_jsx("p", { ...rest, "data-slot": "description", mix: [fg("neutral.muted"), text("sm"), pretty(), mix
|
|
104
|
+
return (_jsx("p", { ...rest, "data-slot": "description", mix: mergeMix([fg("neutral.muted"), text("sm"), pretty()], mix), children: rest.children }));
|
|
104
105
|
};
|
|
105
106
|
};
|
|
106
107
|
/**
|
|
@@ -119,7 +120,7 @@ AlertDialog.Description = function AlertDialogDescription(handle) {
|
|
|
119
120
|
AlertDialog.Footer = function AlertDialogFooter(handle) {
|
|
120
121
|
return () => {
|
|
121
122
|
let { mix, ...rest } = handle.props;
|
|
122
|
-
return _jsx("div", { ...rest, "data-slot": "footer", mix: [gap(2), mbs(6), flex(), justify("end"), mix
|
|
123
|
+
return (_jsx("div", { ...rest, "data-slot": "footer", mix: mergeMix([gap(2), mbs(6), flex(), justify("end")], mix) }));
|
|
123
124
|
};
|
|
124
125
|
};
|
|
125
126
|
/**
|
package/dist/components/alert.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "remix/component/jsx-runtime";
|
|
2
2
|
import { border, colorMix, fg } from "@sdxc/u/color";
|
|
3
3
|
import { rounded } from "@sdxc/u/effects";
|
|
4
|
+
import { mergeMix } from "@sdxc/u/general";
|
|
4
5
|
import { absolute, basis, gap, grow, inset, relative, self, shrink, vstack } from "@sdxc/u/layout";
|
|
5
6
|
import { bs, is, mbe, minIs, p, pis } from "@sdxc/u/size";
|
|
6
7
|
import { when } from "@sdxc/u/state";
|
|
@@ -58,7 +59,7 @@ export function Alert(handle) {
|
|
|
58
59
|
return () => {
|
|
59
60
|
let { color = DEFAULT_COLOR, live = DEFAULT_LIVE, "aria-live": ariaLiveProp, children, mix, ...rest } = handle.props;
|
|
60
61
|
let ariaLive = ariaLiveProp ?? (live === "off" ? undefined : live);
|
|
61
|
-
return (_jsx("div", { ...rest, "aria-live": ariaLive, "data-color": color, "data-slot": "alert", mix: [
|
|
62
|
+
return (_jsx("div", { ...rest, "aria-live": ariaLive, "data-color": color, "data-slot": "alert", mix: mergeMix([
|
|
62
63
|
attrs({ role: DEFAULT_ROLE, "aria-atomic": DEFAULT_ARIA_ATOMIC }),
|
|
63
64
|
semanticColorPanel(),
|
|
64
65
|
relative(),
|
|
@@ -69,8 +70,7 @@ export function Alert(handle) {
|
|
|
69
70
|
border({ width: 1 }),
|
|
70
71
|
p(4),
|
|
71
72
|
when('&:has(> [data-slot="icon"])', pis(10)),
|
|
72
|
-
|
|
73
|
-
], children: children }));
|
|
73
|
+
], mix), children: children }));
|
|
74
74
|
};
|
|
75
75
|
}
|
|
76
76
|
/**
|
|
@@ -84,14 +84,13 @@ export function Alert(handle) {
|
|
|
84
84
|
Alert.Icon = function AlertIcon(handle) {
|
|
85
85
|
return () => {
|
|
86
86
|
let { children, mix, ...rest } = handle.props;
|
|
87
|
-
return (_jsx("div", { ...rest, "data-slot": "icon", mix: [
|
|
87
|
+
return (_jsx("div", { ...rest, "data-slot": "icon", mix: mergeMix([
|
|
88
88
|
attrs({ "aria-hidden": DEFAULT_ICON_ARIA_HIDDEN }),
|
|
89
89
|
absolute(),
|
|
90
90
|
inset(4, "auto", "auto", 4),
|
|
91
91
|
when("& > svg", [is(4), bs(4)]),
|
|
92
92
|
fg("currentcolor"),
|
|
93
|
-
|
|
94
|
-
], children: children }));
|
|
93
|
+
], mix), children: children }));
|
|
95
94
|
};
|
|
96
95
|
};
|
|
97
96
|
/**
|
|
@@ -105,7 +104,7 @@ Alert.Icon = function AlertIcon(handle) {
|
|
|
105
104
|
Alert.Content = function AlertContent(handle) {
|
|
106
105
|
return () => {
|
|
107
106
|
let { children, mix, ...rest } = handle.props;
|
|
108
|
-
return (_jsx("div", { ...rest, "data-slot": "content", mix: [vstack({ gap: 1 }), minIs(0), grow(), shrink(1), basis("0%"), mix
|
|
107
|
+
return (_jsx("div", { ...rest, "data-slot": "content", mix: mergeMix([vstack({ gap: 1 }), minIs(0), grow(), shrink(1), basis("0%")], mix), children: children }));
|
|
109
108
|
};
|
|
110
109
|
};
|
|
111
110
|
/**
|
|
@@ -121,15 +120,7 @@ Alert.Title = function AlertTitle(handle) {
|
|
|
121
120
|
let { children, mix, ...rest } = handle.props;
|
|
122
121
|
let resolved = resolveHeadingLevel(handle);
|
|
123
122
|
let Tag = TAG_BY_LEVEL[resolved];
|
|
124
|
-
return (_jsx(Tag, { ...rest, "data-heading-level": resolved, "data-slot": "title", mix: [
|
|
125
|
-
mbe(1),
|
|
126
|
-
weight("medium"),
|
|
127
|
-
leading(1),
|
|
128
|
-
tracking("tight"),
|
|
129
|
-
fontSize("sm"),
|
|
130
|
-
balance(),
|
|
131
|
-
mix,
|
|
132
|
-
], children: children }));
|
|
123
|
+
return (_jsx(Tag, { ...rest, "data-heading-level": resolved, "data-slot": "title", mix: mergeMix([mbe(1), weight("medium"), leading(1), tracking("tight"), fontSize("sm"), balance()], mix), children: children }));
|
|
133
124
|
};
|
|
134
125
|
};
|
|
135
126
|
/**
|
|
@@ -143,14 +134,13 @@ Alert.Title = function AlertTitle(handle) {
|
|
|
143
134
|
Alert.Description = function AlertDescription(handle) {
|
|
144
135
|
return () => {
|
|
145
136
|
let { children, mix, ...rest } = handle.props;
|
|
146
|
-
return (_jsx("p", { ...rest, "data-slot": "description", mix: [
|
|
137
|
+
return (_jsx("p", { ...rest, "data-slot": "description", mix: mergeMix([
|
|
147
138
|
leading("relaxed"),
|
|
148
139
|
when("& p", leading("relaxed")),
|
|
149
140
|
pretty(),
|
|
150
141
|
fontSize("sm"),
|
|
151
142
|
fg(colorMix("oklab", { color: "currentcolor", weight: 70 }, "transparent")),
|
|
152
|
-
|
|
153
|
-
], children: children }));
|
|
143
|
+
], mix), children: children }));
|
|
154
144
|
};
|
|
155
145
|
};
|
|
156
146
|
/**
|
|
@@ -164,6 +154,6 @@ Alert.Description = function AlertDescription(handle) {
|
|
|
164
154
|
Alert.Action = function AlertAction(handle) {
|
|
165
155
|
return () => {
|
|
166
156
|
let { children, mix, ...rest } = handle.props;
|
|
167
|
-
return (_jsx("div", { ...rest, "data-slot": "action", mix: [shrink(), self("start"), mix
|
|
157
|
+
return (_jsx("div", { ...rest, "data-slot": "action", mix: mergeMix([shrink(), self("start")], mix), children: children }));
|
|
168
158
|
};
|
|
169
159
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "remix/component/jsx-runtime";
|
|
2
|
-
import { var as varUtility, raw } from "@sdxc/u/general";
|
|
2
|
+
import { var as varUtility, raw, mergeMix } from "@sdxc/u/general";
|
|
3
3
|
import { block } from "@sdxc/u/layout";
|
|
4
4
|
import { overflow } from "@sdxc/u/overflow";
|
|
5
5
|
import { is } from "@sdxc/u/size";
|
|
@@ -24,12 +24,11 @@ export function AspectRatio(handle) {
|
|
|
24
24
|
let { ratio, mix, style, ...rest } = handle.props;
|
|
25
25
|
let resolvedRatio = ratio ?? DEFAULT_RATIO;
|
|
26
26
|
let resolvedStyle = mergeStyle(style, { "--ui-aspect-ratio": resolvedRatio });
|
|
27
|
-
return (_jsx("div", { ...rest, style: resolvedStyle, mix: [
|
|
27
|
+
return (_jsx("div", { ...rest, style: resolvedStyle, mix: mergeMix([
|
|
28
28
|
block(),
|
|
29
29
|
is("full"),
|
|
30
30
|
overflow(),
|
|
31
31
|
raw({ aspectRatio: varUtility("ui-aspect-ratio", "1") }),
|
|
32
|
-
|
|
33
|
-
] }));
|
|
32
|
+
], mix) }));
|
|
34
33
|
};
|
|
35
34
|
}
|
|
@@ -87,9 +87,9 @@ export declare namespace Avatar {
|
|
|
87
87
|
var Group: typeof AvatarGroup;
|
|
88
88
|
}
|
|
89
89
|
/**
|
|
90
|
-
* Renders {@link Avatar.GroupProps.children} as a row of overlapping
|
|
91
|
-
*
|
|
92
|
-
*
|
|
90
|
+
* Renders {@link Avatar.GroupProps.children} as a row of overlapping avatars, each
|
|
91
|
+
* pulled over about a fifth of its predecessor, so two-letter initials stay readable, and
|
|
92
|
+
* ringed in the page surface (`--ui-avatar-group-ring` to match another fill).
|
|
93
93
|
*
|
|
94
94
|
* @param handle Runtime handle carrying the host `<div>`'s props.
|
|
95
95
|
* @returns The render function producing the group's markup.
|
|
@@ -105,9 +105,9 @@ declare namespace AvatarGroup {
|
|
|
105
105
|
var Count: typeof AvatarGroupCount;
|
|
106
106
|
}
|
|
107
107
|
/**
|
|
108
|
-
* Renders the "+N" overflow indicator that trails {@link Avatar.Group}: a
|
|
109
|
-
*
|
|
110
|
-
*
|
|
108
|
+
* Renders the "+N" overflow indicator that trails {@link Avatar.Group}: a fixed
|
|
109
|
+
* medium-size circle matching {@link Avatar}'s default dimensions, its tabular digits
|
|
110
|
+
* keeping a changing count one width; the group rings it like an avatar.
|
|
111
111
|
*
|
|
112
112
|
* @param handle Runtime handle carrying the host `<span>`'s props.
|
|
113
113
|
* @returns The render function producing the overflow indicator's markup.
|
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
import { jsx as _jsx } from "remix/component/jsx-runtime";
|
|
2
|
+
import { bg, fg } from "@sdxc/u/color";
|
|
3
|
+
import { rounded } from "@sdxc/u/effects";
|
|
4
|
+
import { combine, raw, userSelect, mergeMix } from "@sdxc/u/general";
|
|
5
|
+
import { flex, inlineFlex, items, justify, relative, shrink } from "@sdxc/u/layout";
|
|
6
|
+
import { overflow } from "@sdxc/u/overflow";
|
|
7
|
+
import { bs, is } from "@sdxc/u/size";
|
|
8
|
+
import { when } from "@sdxc/u/state";
|
|
9
|
+
import { tabularNums, text, weight } from "@sdxc/u/typography";
|
|
2
10
|
import { ImagePlaceholder } from "./image-placeholder.js";
|
|
11
|
+
/**
|
|
12
|
+
* Ring that cuts each grouped avatar out of its predecessor, in the page surface behind
|
|
13
|
+
* the group, so it reads as a gap in light and dark alike.
|
|
14
|
+
*/
|
|
15
|
+
const GROUP_RING = "0 0 0 2px var(--ui-avatar-group-ring, var(--ui-bg, Canvas))";
|
|
3
16
|
/**
|
|
4
17
|
* Renders a fixed-size, fully circular picture host sized through the
|
|
5
18
|
* `data-size` attribute contract (`"sm"`, `"md"`, or `"lg"`), stacking
|
|
@@ -56,9 +69,9 @@ Avatar.Fallback = ImagePlaceholder.Fallback;
|
|
|
56
69
|
*/
|
|
57
70
|
Avatar.Badge = ImagePlaceholder.Badge;
|
|
58
71
|
/**
|
|
59
|
-
* Renders {@link Avatar.GroupProps.children} as a row of overlapping
|
|
60
|
-
*
|
|
61
|
-
*
|
|
72
|
+
* Renders {@link Avatar.GroupProps.children} as a row of overlapping avatars, each
|
|
73
|
+
* pulled over about a fifth of its predecessor, so two-letter initials stay readable, and
|
|
74
|
+
* ringed in the page surface (`--ui-avatar-group-ring` to match another fill).
|
|
62
75
|
*
|
|
63
76
|
* @param handle Runtime handle carrying the host `<div>`'s props.
|
|
64
77
|
* @returns The render function producing the group's markup.
|
|
@@ -70,12 +83,28 @@ Avatar.Badge = ImagePlaceholder.Badge;
|
|
|
70
83
|
* </Avatar.Group>
|
|
71
84
|
*/
|
|
72
85
|
function AvatarGroup(handle) {
|
|
73
|
-
return () =>
|
|
86
|
+
return () => {
|
|
87
|
+
let { children, mix, ...rest } = handle.props;
|
|
88
|
+
return (_jsx("div", { ...rest, "data-slot": "group", mix: mergeMix([flex(), groupStack()], mix), children: children }));
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Overlap and ring for every grouped child in one rule: each child after the first
|
|
93
|
+
* moves back about a fifth of the avatar before it (2, 2.5 or 3rem), leaving room for
|
|
94
|
+
* two letters of initials beside the 2px ring.
|
|
95
|
+
*/
|
|
96
|
+
function groupStack() {
|
|
97
|
+
return combine([
|
|
98
|
+
when("& > *", raw({ boxShadow: GROUP_RING })),
|
|
99
|
+
when("& > * + *", raw({ marginInlineStart: "-0.5rem" })),
|
|
100
|
+
when('& > [data-size="sm"] + *', raw({ marginInlineStart: "-0.375rem" })),
|
|
101
|
+
when('& > [data-size="lg"] + *', raw({ marginInlineStart: "-0.625rem" })),
|
|
102
|
+
]);
|
|
74
103
|
}
|
|
75
104
|
/**
|
|
76
|
-
* Renders the "+N" overflow indicator that trails {@link Avatar.Group}: a
|
|
77
|
-
*
|
|
78
|
-
*
|
|
105
|
+
* Renders the "+N" overflow indicator that trails {@link Avatar.Group}: a fixed
|
|
106
|
+
* medium-size circle matching {@link Avatar}'s default dimensions, its tabular digits
|
|
107
|
+
* keeping a changing count one width; the group rings it like an avatar.
|
|
79
108
|
*
|
|
80
109
|
* @param handle Runtime handle carrying the host `<span>`'s props.
|
|
81
110
|
* @returns The render function producing the overflow indicator's markup.
|
|
@@ -83,7 +112,26 @@ function AvatarGroup(handle) {
|
|
|
83
112
|
* <Avatar.Group.Count>+3</Avatar.Group.Count>
|
|
84
113
|
*/
|
|
85
114
|
function AvatarGroupCount(handle) {
|
|
86
|
-
return () =>
|
|
115
|
+
return () => {
|
|
116
|
+
let { children, mix, ...rest } = handle.props;
|
|
117
|
+
return (_jsx("span", { ...rest, "data-slot": "group-count", "data-shape": "circle", mix: mergeMix([
|
|
118
|
+
relative(),
|
|
119
|
+
inlineFlex(),
|
|
120
|
+
items("center"),
|
|
121
|
+
justify("center"),
|
|
122
|
+
overflow("hidden"),
|
|
123
|
+
weight("medium"),
|
|
124
|
+
bg("neutral.bg-tint-hover"),
|
|
125
|
+
fg("neutral"),
|
|
126
|
+
rounded("full"),
|
|
127
|
+
shrink(),
|
|
128
|
+
userSelect(),
|
|
129
|
+
is("var(--ui-image-placeholder-size-md, 2.5rem)"),
|
|
130
|
+
bs("var(--ui-image-placeholder-size-md, 2.5rem)"),
|
|
131
|
+
text("sm"),
|
|
132
|
+
tabularNums(),
|
|
133
|
+
], mix), children: children }));
|
|
134
|
+
};
|
|
87
135
|
}
|
|
88
136
|
AvatarGroup.Count = AvatarGroupCount;
|
|
89
137
|
Avatar.Group = AvatarGroup;
|
package/dist/components/badge.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "remix/component/jsx-runtime";
|
|
2
2
|
import { bg, border, fg } from "@sdxc/u/color";
|
|
3
3
|
import { rounded, transition } from "@sdxc/u/effects";
|
|
4
|
-
import { userSelect } from "@sdxc/u/general";
|
|
4
|
+
import { userSelect, mergeMix } from "@sdxc/u/general";
|
|
5
5
|
import { gap, inlineFlex, items, shrink } from "@sdxc/u/layout";
|
|
6
6
|
import { bs, is, pb, pi } from "@sdxc/u/size";
|
|
7
7
|
import { data, when } from "@sdxc/u/state";
|
|
@@ -34,7 +34,7 @@ export function Badge(handle) {
|
|
|
34
34
|
let { color, variant, mix, ...rest } = handle.props;
|
|
35
35
|
let resolvedColor = color ?? DEFAULT_COLOR;
|
|
36
36
|
let resolvedVariant = variant ?? DEFAULT_VARIANT;
|
|
37
|
-
return (_jsx("span", { "data-color": resolvedColor, "data-variant": resolvedVariant, ...rest, mix: [
|
|
37
|
+
return (_jsx("span", { "data-color": resolvedColor, "data-variant": resolvedVariant, ...rest, mix: mergeMix([
|
|
38
38
|
inlineFlex(),
|
|
39
39
|
items("center"),
|
|
40
40
|
gap(1),
|
|
@@ -50,7 +50,11 @@ export function Badge(handle) {
|
|
|
50
50
|
fontSize("xs"),
|
|
51
51
|
userSelect(),
|
|
52
52
|
data("variant", "default", [
|
|
53
|
-
data("color", "brand", [
|
|
53
|
+
data("color", "brand", [
|
|
54
|
+
bg("brand.solid"),
|
|
55
|
+
fg("brand.onSolid"),
|
|
56
|
+
border("brand.solid"),
|
|
57
|
+
]),
|
|
54
58
|
data("color", "neutral", [
|
|
55
59
|
bg("neutral.solid"),
|
|
56
60
|
fg("neutral.onSolid"),
|
|
@@ -87,8 +91,7 @@ export function Badge(handle) {
|
|
|
87
91
|
data("color", "warning", [border("warning.strong"), fg("warning")]),
|
|
88
92
|
data("color", "danger", [border("danger.strong"), fg("danger")]),
|
|
89
93
|
]),
|
|
90
|
-
|
|
91
|
-
] }));
|
|
94
|
+
], mix) }));
|
|
92
95
|
};
|
|
93
96
|
}
|
|
94
97
|
/**
|
|
@@ -104,13 +107,12 @@ export function Badge(handle) {
|
|
|
104
107
|
Badge.Icon = function BadgeIcon(handle) {
|
|
105
108
|
return () => {
|
|
106
109
|
let { mix, ...rest } = handle.props;
|
|
107
|
-
return (_jsx("span", { ...rest, mix: [
|
|
110
|
+
return (_jsx("span", { ...rest, mix: mergeMix([
|
|
108
111
|
attrs({ "aria-hidden": DEFAULT_ICON_ARIA_HIDDEN }),
|
|
109
112
|
inlineFlex(),
|
|
110
113
|
shrink(0),
|
|
111
114
|
when("& > svg", [is(3), bs(3), shrink(0), fg("currentColor")]),
|
|
112
|
-
|
|
113
|
-
] }));
|
|
115
|
+
], mix) }));
|
|
114
116
|
};
|
|
115
117
|
};
|
|
116
118
|
/**
|
|
@@ -125,6 +127,6 @@ Badge.Icon = function BadgeIcon(handle) {
|
|
|
125
127
|
Badge.Text = function BadgeText(handle) {
|
|
126
128
|
return () => {
|
|
127
129
|
let { mix, ...rest } = handle.props;
|
|
128
|
-
return _jsx("span", { ...rest, mix:
|
|
130
|
+
return _jsx("span", { ...rest, mix: mergeMix(leading(1), mix) });
|
|
129
131
|
};
|
|
130
132
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "remix/component/jsx-runtime";
|
|
2
2
|
import { fg } from "@sdxc/u/color";
|
|
3
|
-
import { listStyle, pseudoContent } from "@sdxc/u/general";
|
|
3
|
+
import { listStyle, pseudoContent, mergeMix } from "@sdxc/u/general";
|
|
4
4
|
import { flex, items } from "@sdxc/u/layout";
|
|
5
5
|
import { m, mb, mis, p, pb, pi } from "@sdxc/u/size";
|
|
6
6
|
import { data, hover, when } from "@sdxc/u/state";
|
|
@@ -36,7 +36,7 @@ export function Breadcrumbs(handle) {
|
|
|
36
36
|
return () => {
|
|
37
37
|
let { mix, ...rest } = handle.props;
|
|
38
38
|
warnIfNoAccessibleLabel(handle.props, 'Breadcrumbs: needs an "aria-label" or "aria-labelledby" identifying this navigation landmark for assistive technology.');
|
|
39
|
-
return _jsx("nav", { ...rest, "data-slot": "breadcrumbs", mix: [flex(), items("center"), mix
|
|
39
|
+
return _jsx("nav", { ...rest, "data-slot": "breadcrumbs", mix: mergeMix([flex(), items("center")], mix) });
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
42
|
/**
|
|
@@ -56,7 +56,7 @@ export function Breadcrumbs(handle) {
|
|
|
56
56
|
Breadcrumbs.List = function BreadcrumbsList(handle) {
|
|
57
57
|
return () => {
|
|
58
58
|
let { mix, ...rest } = handle.props;
|
|
59
|
-
return (_jsx("ol", { ...rest, "data-slot": "list", mix: [flex(), items("center"), m(0), p(0), listStyle(), mix
|
|
59
|
+
return (_jsx("ol", { ...rest, "data-slot": "list", mix: mergeMix([flex(), items("center"), m(0), p(0), listStyle()], mix) }));
|
|
60
60
|
};
|
|
61
61
|
};
|
|
62
62
|
/**
|
|
@@ -74,7 +74,7 @@ Breadcrumbs.List = function BreadcrumbsList(handle) {
|
|
|
74
74
|
Breadcrumbs.Item = function BreadcrumbsItem(handle) {
|
|
75
75
|
return () => {
|
|
76
76
|
let { mix, ...rest } = handle.props;
|
|
77
|
-
return (_jsx("li", { ...rest, "data-slot": "item", mix: [
|
|
77
|
+
return (_jsx("li", { ...rest, "data-slot": "item", mix: mergeMix([
|
|
78
78
|
flex(),
|
|
79
79
|
items("center"),
|
|
80
80
|
when("&:not(:last-child)::after", [
|
|
@@ -82,8 +82,7 @@ Breadcrumbs.Item = function BreadcrumbsItem(handle) {
|
|
|
82
82
|
fontSize("sm"),
|
|
83
83
|
pseudoContent('"›"'),
|
|
84
84
|
]),
|
|
85
|
-
|
|
86
|
-
] }));
|
|
85
|
+
], mix) }));
|
|
87
86
|
};
|
|
88
87
|
};
|
|
89
88
|
/**
|
|
@@ -106,7 +105,7 @@ Breadcrumbs.Link = function BreadcrumbsLink(handle) {
|
|
|
106
105
|
return () => {
|
|
107
106
|
let { color, prefetch, mix, ...rest } = handle.props;
|
|
108
107
|
let resolvedColor = color ?? DEFAULT_COLOR;
|
|
109
|
-
return (_jsx(Link, { color: resolvedColor, prefetch: prefetch ?? DEFAULT_PREFETCH, ...rest, "data-slot": "link", mix: [
|
|
108
|
+
return (_jsx(Link, { color: resolvedColor, prefetch: prefetch ?? DEFAULT_PREFETCH, ...rest, "data-slot": "link", mix: mergeMix([
|
|
110
109
|
fontSize("sm"),
|
|
111
110
|
/**
|
|
112
111
|
* The space around each separator lives in the link's own padding, so the
|
|
@@ -125,7 +124,6 @@ Breadcrumbs.Link = function BreadcrumbsLink(handle) {
|
|
|
125
124
|
weight("medium"),
|
|
126
125
|
fg("neutral.emphasis"),
|
|
127
126
|
]),
|
|
128
|
-
|
|
129
|
-
] }));
|
|
127
|
+
], mix) }));
|
|
130
128
|
};
|
|
131
129
|
};
|
|
@@ -19,14 +19,16 @@ export declare namespace Button {
|
|
|
19
19
|
type Color = SemanticColor;
|
|
20
20
|
/**
|
|
21
21
|
* Visual weight the button renders with: a solid fill with an on-solid
|
|
22
|
-
* foreground, a transparent fill with a strong colored border,
|
|
23
|
-
* transparent fill with just a colored label
|
|
22
|
+
* foreground, a transparent fill with a strong colored border, a fully
|
|
23
|
+
* transparent fill with just a colored label, or a raised `surface` fill with
|
|
24
|
+
* the emphasis ink and a tactile edge — a secondary that reads as a control
|
|
25
|
+
* beside a solid primary, and turns translucent inside inverse and brand bands.
|
|
24
26
|
*/
|
|
25
|
-
type Variant = "solid" | "outline" | "ghost";
|
|
27
|
+
type Variant = "solid" | "outline" | "ghost" | "surface";
|
|
26
28
|
/**
|
|
27
29
|
* Size variant controlling the button's padding and font size.
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
+
* Inside a {@link CtaGroup} an omitted size takes the group's, so a hero row
|
|
31
|
+
* sizes every action at once; `"md"` is the 40px landing CTA.
|
|
30
32
|
*/
|
|
31
33
|
type Size = "sm" | "md" | "lg";
|
|
32
34
|
/**
|
|
@@ -77,6 +79,6 @@ export declare namespace Button {
|
|
|
77
79
|
* @example
|
|
78
80
|
* <Button type="submit" isPending={isSubmitting}>{t("actions.save")}</Button>
|
|
79
81
|
* @example
|
|
80
|
-
* <Button size="lg" color="brand" mix={[
|
|
82
|
+
* <Button size="lg" color="brand" mix={[landingCtaChrome()]}>{t("hero.cta")}</Button>
|
|
81
83
|
*/
|
|
82
84
|
export declare function Button(handle: Handle<Button.Props>): () => import("remix/component").RemixElement;
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "remix/component/jsx-runtime";
|
|
2
2
|
import { LoaderCircleIcon } from "@sdxc/icons";
|
|
3
3
|
import { bg, border, fg, outline } from "@sdxc/u/color";
|
|
4
|
-
import { opacity,
|
|
5
|
-
import { cursor, userSelect } from "@sdxc/u/general";
|
|
4
|
+
import { opacity, visibility } from "@sdxc/u/effects";
|
|
5
|
+
import { cursor, raw, userSelect, mergeMix } from "@sdxc/u/general";
|
|
6
6
|
import { absolute, flex, gap, inlineFlex, inset, items, justify, relative, shrink, } from "@sdxc/u/layout";
|
|
7
7
|
import { bs, is, minBs, p, pb, pi, pie, pis } from "@sdxc/u/size";
|
|
8
8
|
import { when } from "@sdxc/u/state";
|
|
9
|
-
import { text
|
|
9
|
+
import { text } from "@sdxc/u/typography";
|
|
10
10
|
import { hitArea } from "../styles/hit-area.js";
|
|
11
11
|
import { interactiveTransition } from "../styles/interactive-transition.js";
|
|
12
|
+
import { surfaceControl } from "../styles/surface-control.js";
|
|
12
13
|
import { glyphEdges } from "../utils/glyph-edges.js";
|
|
13
14
|
import { warnIfNoAccessibleName } from "../utils/warn-if-no-accessible-name.js";
|
|
15
|
+
import { CtaGroup } from "./cta-group.js";
|
|
14
16
|
const DEFAULT_COLOR = "neutral";
|
|
15
17
|
const DEFAULT_VARIANT = "solid";
|
|
16
18
|
const DEFAULT_SIZE = "md";
|
|
@@ -51,7 +53,7 @@ function holdsOnlyAGlyph(children) {
|
|
|
51
53
|
* @example
|
|
52
54
|
* <Button type="submit" isPending={isSubmitting}>{t("actions.save")}</Button>
|
|
53
55
|
* @example
|
|
54
|
-
* <Button size="lg" color="brand" mix={[
|
|
56
|
+
* <Button size="lg" color="brand" mix={[landingCtaChrome()]}>{t("hero.cta")}</Button>
|
|
55
57
|
*/
|
|
56
58
|
export function Button(handle) {
|
|
57
59
|
return () => {
|
|
@@ -60,12 +62,13 @@ export function Button(handle) {
|
|
|
60
62
|
let resolvedType = type ?? (isInvoker ? INVOKER_TYPE : undefined);
|
|
61
63
|
let resolvedColor = color ?? DEFAULT_COLOR;
|
|
62
64
|
let resolvedVariant = variant ?? DEFAULT_VARIANT;
|
|
63
|
-
let
|
|
65
|
+
let group = handle.context.get(CtaGroup);
|
|
66
|
+
let resolvedSize = size ?? group?.size ?? DEFAULT_SIZE;
|
|
64
67
|
let resolvedDisabled = disabled || isPending;
|
|
65
68
|
let iconOnly = holdsOnlyAGlyph(children);
|
|
66
69
|
let edges = glyphEdges(children);
|
|
67
70
|
warnIfNoAccessibleName(handle.props, children, "Button: an icon-only button needs an `aria-label` describing what it does — assistive technology has no accessible text to announce otherwise.");
|
|
68
|
-
return (_jsx("button", { type: resolvedType, ...rest, "data-color": resolvedColor, "data-variant": resolvedVariant, "data-size": resolvedSize, "data-pending": isPending || undefined, "data-icon-only": iconOnly || undefined, "data-glyph-start": edges.start || undefined, "data-glyph-end": edges.end || undefined, disabled: resolvedDisabled, mix: [
|
|
71
|
+
return (_jsx("button", { type: resolvedType, ...rest, "data-color": resolvedColor, "data-variant": resolvedVariant, "data-size": resolvedSize, "data-pending": isPending || undefined, "data-icon-only": iconOnly || undefined, "data-glyph-start": edges.start || undefined, "data-glyph-end": edges.end || undefined, disabled: resolvedDisabled, mix: mergeMix([
|
|
69
72
|
when("&:focus-visible", [
|
|
70
73
|
outline({ color: "brand.ring", offset: 2 }),
|
|
71
74
|
when('&[data-color="neutral"]', outline("neutral.ring")),
|
|
@@ -86,8 +89,10 @@ export function Button(handle) {
|
|
|
86
89
|
* icon reads as a rendering fault.
|
|
87
90
|
*/
|
|
88
91
|
when("& > svg", [shrink(), is(4), bs(4)]),
|
|
89
|
-
|
|
90
|
-
|
|
92
|
+
raw({
|
|
93
|
+
borderRadius: "var(--ui-button-radius, var(--ui-radius-md, 0.375rem))",
|
|
94
|
+
fontWeight: "var(--ui-button-weight, 500)",
|
|
95
|
+
}),
|
|
91
96
|
cursor("default"),
|
|
92
97
|
/** A small control reaches `--ui-target-size` however a consumer positions it. */
|
|
93
98
|
hitArea({ anchor: "flex-center" }),
|
|
@@ -148,7 +153,7 @@ export function Button(handle) {
|
|
|
148
153
|
bs(ICON_ONLY_SIZE_MD),
|
|
149
154
|
minBs(ICON_ONLY_SIZE_MD),
|
|
150
155
|
shrink(),
|
|
151
|
-
|
|
156
|
+
raw({ "--ui-button-radius": "9999px" }),
|
|
152
157
|
]),
|
|
153
158
|
when('&[data-size="sm"][data-icon-only]', [
|
|
154
159
|
is(ICON_ONLY_SIZE_SM),
|
|
@@ -203,7 +208,10 @@ export function Button(handle) {
|
|
|
203
208
|
border("danger.solid"),
|
|
204
209
|
fg("danger.onSolid"),
|
|
205
210
|
when("&:hover", [bg("danger.bg-solid-hover"), border("danger.bg-solid-hover")]),
|
|
206
|
-
when("&:active", [
|
|
211
|
+
when("&:active", [
|
|
212
|
+
bg("danger.bg-solid-pressed"),
|
|
213
|
+
border("danger.bg-solid-pressed"),
|
|
214
|
+
]),
|
|
207
215
|
]),
|
|
208
216
|
]),
|
|
209
217
|
when('&[data-variant="outline"]', [
|
|
@@ -216,7 +224,7 @@ export function Button(handle) {
|
|
|
216
224
|
]),
|
|
217
225
|
when('&[data-color="neutral"]', [
|
|
218
226
|
border("neutral"),
|
|
219
|
-
fg("neutral"),
|
|
227
|
+
fg("neutral.emphasis"),
|
|
220
228
|
when("&:hover", [bg("neutral.tint"), border("neutral.border-hover")]),
|
|
221
229
|
when("&:active", bg("neutral.bg-tint-hover")),
|
|
222
230
|
]),
|
|
@@ -248,7 +256,7 @@ export function Button(handle) {
|
|
|
248
256
|
when("&:active", bg("brand.bg-tint-hover")),
|
|
249
257
|
]),
|
|
250
258
|
when('&[data-color="neutral"]', [
|
|
251
|
-
fg("neutral"),
|
|
259
|
+
fg("neutral.emphasis"),
|
|
252
260
|
when("&:hover", bg("neutral.bg-tint-hover")),
|
|
253
261
|
when("&:active", bg("neutral.bg-tint-pressed")),
|
|
254
262
|
]),
|
|
@@ -268,10 +276,10 @@ export function Button(handle) {
|
|
|
268
276
|
when("&:active", bg("danger.bg-tint-hover")),
|
|
269
277
|
]),
|
|
270
278
|
]),
|
|
279
|
+
when('&[data-variant="surface"]', [surfaceControl()]),
|
|
271
280
|
when("&:disabled:not([data-pending])", [cursor("not-allowed"), opacity(50)]),
|
|
272
281
|
when("&[data-pending]", [relative(), cursor("wait")]),
|
|
273
|
-
|
|
274
|
-
], children: isPending ? (_jsxs(_Fragment, { children: [_jsx("span", { "aria-hidden": "true", "data-slot": "spinner", mix: [
|
|
282
|
+
], mix), children: isPending ? (_jsxs(_Fragment, { children: [_jsx("span", { "aria-hidden": "true", "data-slot": "spinner", mix: [
|
|
275
283
|
absolute(),
|
|
276
284
|
inset(0),
|
|
277
285
|
flex(),
|