@cueplusplus/ui 0.16.0 → 0.18.0
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/CHANGELOG.md +901 -0
- package/README.md +1 -1
- package/dist/agent-runtime/tool-call-card.js +7 -3
- package/dist/brand/_chassis.d.ts +1 -1
- package/dist/brand/cue-mark.d.ts +1 -1
- package/dist/brand/cue-mark.js +1 -1
- package/dist/charts/ramps.js +1 -1
- package/dist/chat/agent-pile.js +2 -1
- package/dist/chat/ask-box.js +4 -3
- package/dist/chat/delegation-card.js +3 -2
- package/dist/chat/message-list.js +3 -2
- package/dist/chat/message.js +17 -7
- package/dist/chrome/_edge-scroller.js +2 -1
- package/dist/chrome/_status-bar.js +9 -3
- package/dist/chrome/_tabs-scroll.d.ts +1 -1
- package/dist/chrome/_tabs-scroll.js +1 -1
- package/dist/chrome/app-bar.js +9 -3
- package/dist/chrome/app-shell.js +2 -1
- package/dist/chrome/band.d.ts +18 -12
- package/dist/chrome/band.js +18 -32
- package/dist/chrome/empty-state.js +8 -4
- package/dist/chrome/eyebrow.d.ts +13 -5
- package/dist/chrome/eyebrow.js +18 -7
- package/dist/chrome/footer.d.ts +5 -0
- package/dist/chrome/footer.js +14 -3
- package/dist/chrome/navigation-menu.js +6 -3
- package/dist/chrome/page-shell.js +8 -5
- package/dist/chrome/panel.d.ts +5 -2
- package/dist/chrome/panel.js +10 -5
- package/dist/chrome/row.js +9 -5
- package/dist/chrome/scroll-area.js +6 -4
- package/dist/chrome/section-header.js +13 -4
- package/dist/chrome/segmented-control.js +14 -4
- package/dist/chrome/status-bar.js +2 -1
- package/dist/chrome/tabs.js +14 -3
- package/dist/chrome/toolbar.js +6 -3
- package/dist/chrome/tree.js +3 -2
- package/dist/color/_thumb.js +9 -3
- package/dist/color/color-area.js +1 -1
- package/dist/color/color-swatch.js +1 -1
- package/dist/configurator/_overrides.js +13 -4
- package/dist/configurator/configurator.js +4 -1
- package/dist/configurator/export-dialog.js +5 -2
- package/dist/configurator/panel-sections.js +6 -2
- package/dist/configurator/token-editor.js +4 -1
- package/dist/date/_trigger.js +4 -1
- package/dist/date/calendar.js +22 -12
- package/dist/dmx/channel-matrix.js +3 -2
- package/dist/dmx/dmx-bar.js +1 -1
- package/dist/dmx/dmx-strip.js +1 -1
- package/dist/dmx/universe-grid.js +3 -2
- package/dist/elements/activity-graph.js +3 -3
- package/dist/elements/agent-card.js +3 -3
- package/dist/elements/approval-card.js +3 -3
- package/dist/elements/artifact-card.js +2 -2
- package/dist/elements/background-inbox.js +2 -2
- package/dist/elements/canvas-split.js +2 -2
- package/dist/elements/chart.js +1 -1
- package/dist/elements/chat-panel.js +2 -2
- package/dist/elements/checkpoint-history.js +2 -2
- package/dist/elements/clamp.js +2 -1
- package/dist/elements/code-diff.js +1 -1
- package/dist/elements/code-runner.js +1 -1
- package/dist/elements/command-palette.js +6 -5
- package/dist/elements/comparison-card.js +2 -2
- package/dist/elements/composer.js +9 -8
- package/dist/elements/computer-use.js +1 -1
- package/dist/elements/confidence-marker.js +2 -1
- package/dist/elements/connection-state.js +1 -1
- package/dist/elements/context-breakdown.js +1 -1
- package/dist/elements/context-usage.js +1 -1
- package/dist/elements/conversation-search.js +4 -3
- package/dist/elements/cost-meter.js +1 -1
- package/dist/elements/data-table.js +2 -2
- package/dist/elements/day-separator.js +1 -1
- package/dist/elements/diagram.js +1 -1
- package/dist/elements/document-reference.js +3 -3
- package/dist/elements/draft-restore.js +1 -1
- package/dist/elements/edit-message.js +4 -3
- package/dist/elements/elements.css +26 -5
- package/dist/elements/elicitation-form.js +3 -3
- package/dist/elements/empty-state.js +2 -1
- package/dist/elements/error-state.js +1 -1
- package/dist/elements/feedback-dialog.js +4 -3
- package/dist/elements/file-tree.js +2 -2
- package/dist/elements/flow-graph.js +2 -2
- package/dist/elements/guardrail-notice.js +3 -3
- package/dist/elements/image-generation.js +1 -1
- package/dist/elements/inline-citation.js +3 -3
- package/dist/elements/job-progress.js +3 -3
- package/dist/elements/launcher-bubble.js +2 -2
- package/dist/elements/loading-state.js +1 -1
- package/dist/elements/map-answer.js +3 -2
- package/dist/elements/markdown.js +5 -4
- package/dist/elements/math-block.js +1 -1
- package/dist/elements/mcp-server-panel.js +3 -3
- package/dist/elements/message-attachment.js +4 -4
- package/dist/elements/message-pair.js +1 -1
- package/dist/elements/message-queue.js +2 -2
- package/dist/elements/mobile-composer.js +4 -3
- package/dist/elements/model-picker.js +3 -3
- package/dist/elements/onboarding.js +2 -2
- package/dist/elements/permission-grant.js +2 -2
- package/dist/elements/permission-scopes.js +5 -4
- package/dist/elements/prompt-library.js +7 -6
- package/dist/elements/queue-dock.js +4 -3
- package/dist/elements/quota-banner.js +1 -1
- package/dist/elements/quote-reply.js +1 -1
- package/dist/elements/read-aloud.js +2 -2
- package/dist/elements/reasoning-panel.js +2 -1
- package/dist/elements/recommendation-card.d.ts +1 -1
- package/dist/elements/recommendation-card.js +2 -2
- package/dist/elements/regenerate-menu.js +2 -2
- package/dist/elements/research-report.js +1 -1
- package/dist/elements/retrieval-chunks.js +1 -1
- package/dist/elements/revert-dock.js +5 -4
- package/dist/elements/reviewable-diff.js +1 -1
- package/dist/elements/schedule-card.js +3 -3
- package/dist/elements/score-breakdown.js +1 -1
- package/dist/elements/scroll-anchor.js +2 -2
- package/dist/elements/settings-panel.js +3 -2
- package/dist/elements/shared-conversation.js +2 -2
- package/dist/elements/sources.js +4 -3
- package/dist/elements/speaker-identity.js +1 -1
- package/dist/elements/spec-sheet.js +1 -1
- package/dist/elements/streaming-text.js +1 -1
- package/dist/elements/subagent-list.js +2 -2
- package/dist/elements/suggestions.js +1 -1
- package/dist/elements/surfaces.d.ts +1 -1
- package/dist/elements/surfaces.js +2 -1
- package/dist/elements/tail-status.js +1 -1
- package/dist/elements/terminal-block.js +1 -1
- package/dist/elements/thread-list.js +1 -1
- package/dist/elements/thread-search.js +5 -4
- package/dist/elements/timeline.js +1 -1
- package/dist/elements/todo-list.js +2 -2
- package/dist/elements/tool-call.js +4 -3
- package/dist/elements/tool-error.js +2 -2
- package/dist/elements/tool-group.js +1 -1
- package/dist/elements/tool-timeline.js +4 -3
- package/dist/elements/trace-waterfall.js +1 -1
- package/dist/elements/verdict-row.js +2 -2
- package/dist/elements/voice-conversation.js +3 -2
- package/dist/elements/web-preview.js +1 -1
- package/dist/elements/web-search.js +2 -2
- package/dist/elements/work-collapse.js +2 -1
- package/dist/flow/node-card.js +3 -2
- package/dist/flow/use-flow-theme.js +2 -1
- package/dist/forms/_chassis.d.ts +34 -6
- package/dist/forms/_chassis.js +44 -9
- package/dist/forms/_listbox.js +22 -14
- package/dist/forms/checkbox.js +13 -4
- package/dist/forms/env-var-input.js +3 -2
- package/dist/forms/field.d.ts +2 -1
- package/dist/forms/field.js +16 -5
- package/dist/forms/file-upload.js +3 -2
- package/dist/forms/input-group.js +11 -2
- package/dist/forms/multi-select.js +4 -3
- package/dist/forms/number-field.js +7 -3
- package/dist/forms/otp-field.js +15 -6
- package/dist/forms/password-input.js +4 -2
- package/dist/forms/radio-group.js +10 -4
- package/dist/forms/rating.js +2 -1
- package/dist/forms/scrub-input.js +2 -1
- package/dist/forms/search-input.js +2 -1
- package/dist/forms/select.js +10 -4
- package/dist/forms/slider.js +9 -3
- package/dist/forms/switch.js +9 -3
- package/dist/forms/tags-input.js +4 -3
- package/dist/forms/textarea.js +3 -1
- package/dist/forms/toggle-group.js +2 -1
- package/dist/forms/toggle.js +5 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/instruments/_data-row.js +2 -1
- package/dist/instruments/app-window-frame.js +1 -1
- package/dist/instruments/code-block.js +8 -2
- package/dist/instruments/group-bar.js +1 -1
- package/dist/instruments/ledger.js +6 -2
- package/dist/instruments/log-viewer.js +4 -3
- package/dist/instruments/meter.js +2 -1
- package/dist/instruments/progress.js +9 -3
- package/dist/instruments/seam-grid.js +5 -3
- package/dist/instruments/stat.js +13 -4
- package/dist/instruments/table.js +29 -10
- package/dist/instruments/terminal-frame.js +4 -2
- package/dist/instruments/usage-chart.js +1 -1
- package/dist/layout/_collapse.js +26 -5
- package/dist/layout/accordion.js +2 -1
- package/dist/layout/bento.js +7 -4
- package/dist/layout/breadcrumb.js +10 -5
- package/dist/layout/card.js +14 -7
- package/dist/layout/carousel.js +3 -2
- package/dist/layout/collapsible.js +6 -1
- package/dist/layout/container.js +2 -1
- package/dist/layout/description-list.js +4 -1
- package/dist/layout/frames.js +11 -5
- package/dist/layout/item.js +3 -2
- package/dist/layout/link.d.ts +30 -0
- package/dist/layout/link.js +22 -3
- package/dist/layout/pagination.js +8 -8
- package/dist/layout/preview.d.ts +32 -12
- package/dist/layout/preview.js +149 -40
- package/dist/layout/resizable.js +2 -1
- package/dist/layout/sidebar.js +11 -3
- package/dist/layout/stepper.js +6 -2
- package/dist/lib/cn.js +29 -2
- package/dist/midi/piano-keyboard.js +3 -2
- package/dist/midi/spectrum-visualizer.js +1 -1
- package/dist/midi/threshold-rail.js +2 -1
- package/dist/midi/timeline-ruler.js +1 -1
- package/dist/overlays/_surface.d.ts +74 -14
- package/dist/overlays/_surface.js +87 -14
- package/dist/overlays/alert-dialog.js +1 -1
- package/dist/overlays/command-palette.js +28 -9
- package/dist/overlays/dialog.d.ts +5 -0
- package/dist/overlays/dialog.js +6 -1
- package/dist/overlays/drawer.js +8 -1
- package/dist/overlays/hover-card.js +3 -1
- package/dist/overlays/info-tip.js +2 -1
- package/dist/overlays/menubar.js +3 -1
- package/dist/overlays/popover.js +3 -1
- package/dist/overlays/toast.js +14 -6
- package/dist/overlays/tooltip.js +3 -1
- package/dist/primitives/avatar.js +6 -2
- package/dist/primitives/button.d.ts +16 -1
- package/dist/primitives/button.js +44 -12
- package/dist/primitives/chip.d.ts +11 -29
- package/dist/primitives/chip.js +40 -50
- package/dist/primitives/icon-button.d.ts +1 -1
- package/dist/primitives/kbd.d.ts +6 -0
- package/dist/primitives/kbd.js +10 -1
- package/dist/primitives/skeleton.js +2 -1
- package/dist/system/_focus-ring-field.js +29 -0
- package/dist/system/_focus-ring.js +125 -0
- package/dist/system/_paint-glow.js +22 -3
- package/dist/system/_paint-rest-shade.js +32 -0
- package/dist/system/_paint-rim.js +22 -4
- package/dist/system/_paint-stroke-surface-1.js +1 -1
- package/dist/system/_paint-stroke-surface-2.js +14 -1
- package/dist/system/_paint-texture.js +5 -2
- package/dist/system/_style-accordion-rule.js +32 -0
- package/dist/system/_style-app-bar.js +65 -0
- package/dist/system/_style-avatar.js +20 -0
- package/dist/system/_style-band.js +57 -0
- package/dist/system/_style-body-leading.js +19 -0
- package/dist/system/_style-body-size.js +30 -0
- package/dist/system/_style-body-weight.js +24 -0
- package/dist/system/_style-body.js +32 -0
- package/dist/system/_style-caption-ink.js +17 -0
- package/dist/system/_style-caption-size.js +19 -0
- package/dist/system/_style-caption-weight.js +18 -0
- package/dist/system/_style-caption.js +19 -0
- package/dist/system/_style-card-gap.js +14 -0
- package/dist/system/_style-card-pad.js +43 -0
- package/dist/system/_style-cell.js +18 -0
- package/dist/system/_style-check-glyph.js +14 -0
- package/dist/system/_style-check.js +40 -0
- package/dist/system/_style-chip.js +143 -0
- package/dist/system/_style-choice-gap.js +15 -0
- package/dist/system/_style-code.js +13 -0
- package/dist/system/_style-collapse.js +94 -0
- package/dist/system/_style-control-face.js +29 -0
- package/dist/system/_style-control-gap.js +14 -0
- package/dist/system/_style-control-label.js +29 -0
- package/dist/system/_style-control-step.js +22 -0
- package/dist/system/_style-control.js +76 -0
- package/dist/system/_style-crumb.js +44 -0
- package/dist/system/_style-data-face.js +28 -0
- package/dist/system/_style-day.js +25 -0
- package/dist/system/_style-description.js +23 -0
- package/dist/system/_style-disabled.js +70 -0
- package/dist/system/_style-disclosure.js +21 -0
- package/dist/system/_style-empty-state.js +42 -0
- package/dist/system/_style-eyebrow.js +43 -0
- package/dist/system/_style-field-chassis.js +38 -0
- package/dist/system/_style-field-gap.js +12 -0
- package/dist/system/_style-footer-rule.js +47 -0
- package/dist/system/_style-glyph-ink.js +20 -0
- package/dist/system/_style-glyph-opacity.js +20 -0
- package/dist/system/_style-glyph-size.js +21 -0
- package/dist/system/_style-group-gap.js +15 -0
- package/dist/system/_style-group-label-pad.js +14 -0
- package/dist/system/_style-group-label.js +24 -0
- package/dist/system/_style-gutter.js +17 -0
- package/dist/system/_style-help-ink.js +14 -0
- package/dist/system/_style-help.js +38 -0
- package/dist/system/_style-hover-card-width.js +15 -0
- package/dist/system/_style-input-face.js +34 -0
- package/dist/system/_style-kbd.js +58 -0
- package/dist/system/_style-label-case.js +36 -0
- package/dist/system/_style-label-face.js +32 -0
- package/dist/system/_style-label-ink.js +29 -0
- package/dist/system/_style-label-leading.js +14 -0
- package/dist/system/_style-label-size.js +36 -0
- package/dist/system/_style-label-tracking.js +45 -0
- package/dist/system/_style-label-weight.js +40 -0
- package/dist/system/_style-lede.js +49 -0
- package/dist/system/_style-link.js +58 -0
- package/dist/system/_style-menu.js +43 -0
- package/dist/system/_style-meter.js +15 -0
- package/dist/system/_style-nav-item.js +41 -0
- package/dist/system/_style-nav-menu.js +48 -0
- package/dist/system/_style-nav-voice.js +43 -0
- package/dist/system/_style-option.js +99 -0
- package/dist/system/_style-otp.js +15 -0
- package/dist/system/_style-outline-hover.js +18 -0
- package/dist/system/_style-overlay-title.js +35 -0
- package/dist/system/_style-page-title.js +48 -0
- package/dist/system/_style-page.js +17 -0
- package/dist/system/_style-palette.js +18 -0
- package/dist/system/_style-panel.js +21 -0
- package/dist/system/_style-popover-pad.js +13 -0
- package/dist/system/_style-popover-width.js +15 -0
- package/dist/system/_style-quiet-ink.js +13 -0
- package/dist/system/_style-radio.js +19 -0
- package/dist/system/_style-row-disabled.js +17 -0
- package/dist/system/_style-row-pad.js +13 -0
- package/dist/system/_style-row.js +30 -0
- package/dist/system/_style-scrollbar.js +19 -0
- package/dist/system/_style-seam.js +43 -0
- package/dist/system/_style-section-rule.js +26 -0
- package/dist/system/_style-segment-pad.js +15 -0
- package/dist/system/_style-segment.js +30 -0
- package/dist/system/_style-segmented-control.js +86 -0
- package/dist/system/_style-selected.js +36 -0
- package/dist/system/_style-skeleton.js +15 -0
- package/dist/system/_style-slider.js +26 -0
- package/dist/system/_style-stage-marks.js +26 -0
- package/dist/system/_style-stat.js +31 -0
- package/dist/system/_style-stepper.js +16 -0
- package/dist/system/_style-switch.js +26 -0
- package/dist/system/_style-tab-hover.js +15 -0
- package/dist/system/_style-tab.js +71 -0
- package/dist/system/_style-text-focus.js +26 -0
- package/dist/system/_style-textarea.js +21 -0
- package/dist/system/_style-title.js +37 -0
- package/dist/system/_style-toast.js +22 -0
- package/dist/system/_style-toggle.js +50 -0
- package/dist/system/_style-toolbar.js +23 -0
- package/dist/system/_style-tooltip.js +46 -0
- package/dist/system/density.d.ts +15 -5
- package/dist/system/density.js +188 -25
- package/dist/system/index.d.ts +2 -2
- package/dist/system/index.js +2 -2
- package/dist/system/overrides.d.ts +1 -0
- package/dist/system/overrides.js +151 -3
- package/dist/system/portal.d.ts +3 -2
- package/dist/system/portal.js +22 -10
- package/dist/system/prepaint.d.ts +21 -5
- package/dist/system/prepaint.js +3 -1
- package/dist/system/published.d.ts +1 -0
- package/dist/system/published.js +131 -0
- package/dist/system/theme-provider.d.ts +118 -21
- package/dist/system/theme-provider.js +362 -73
- package/dist/system/theme-registry.d.ts +2 -1
- package/dist/system/theme-registry.js +27 -10
- package/dist/system/use-density.js +4 -3
- package/dist/system/use-theme.d.ts +5 -2
- package/dist/system/use-theme.js +7 -4
- package/dist/system/vocabulary.js +2 -2
- package/dist/theming/create-theme.js +12 -6
- package/dist/theming/serialize.d.ts +34 -2
- package/dist/theming/serialize.js +86 -4
- package/manifest/components/accordion.json +29 -2
- package/manifest/components/agent-pile.json +3 -0
- package/manifest/components/alert-dialog.json +36 -3
- package/manifest/components/app-bar.json +61 -2
- package/manifest/components/app-shell.json +5 -0
- package/manifest/components/ask-box.json +3 -1
- package/manifest/components/autocomplete.json +85 -1
- package/manifest/components/avatar-group.json +7 -0
- package/manifest/components/avatar.json +7 -0
- package/manifest/components/band.json +7 -3
- package/manifest/components/bento.json +12 -1
- package/manifest/components/breadcrumb.json +12 -0
- package/manifest/components/button.json +43 -4
- package/manifest/components/calendar.json +13 -0
- package/manifest/components/card.json +23 -1
- package/manifest/components/carousel.json +4 -1
- package/manifest/components/channel-matrix.json +37 -3
- package/manifest/components/chart-tooltip-content.json +35 -3
- package/manifest/components/chat-empty-state.json +3 -1
- package/manifest/components/checkbox-group.json +36 -1
- package/manifest/components/checkbox.json +36 -1
- package/manifest/components/chip.json +22 -1
- package/manifest/components/clamp.json +3 -1
- package/manifest/components/code-block.json +10 -1
- package/manifest/components/collapsible.json +35 -2
- package/manifest/components/color-area.json +4 -2
- package/manifest/components/color-field.json +29 -0
- package/manifest/components/color-picker.json +29 -0
- package/manifest/components/color-slider.json +3 -1
- package/manifest/components/colors-section.json +9 -1
- package/manifest/components/combobox.json +85 -1
- package/manifest/components/command-palette.json +39 -3
- package/manifest/components/composer-actions.json +3 -0
- package/manifest/components/composer-attach-button.json +3 -0
- package/manifest/components/composer-attachment-chip.json +3 -0
- package/manifest/components/composer-attachments.json +3 -0
- package/manifest/components/composer-bar.json +3 -0
- package/manifest/components/composer-command-item.json +3 -0
- package/manifest/components/composer-context.json +3 -0
- package/manifest/components/composer-input.json +3 -0
- package/manifest/components/composer-menu-item.json +3 -0
- package/manifest/components/composer-menu.json +3 -0
- package/manifest/components/composer-model-item.json +3 -0
- package/manifest/components/composer-model-trigger.json +3 -0
- package/manifest/components/composer-person-item.json +3 -0
- package/manifest/components/composer-send.json +3 -0
- package/manifest/components/composer-toolbar.json +3 -0
- package/manifest/components/composer-voice-button.json +3 -0
- package/manifest/components/composer-voice.json +3 -0
- package/manifest/components/composer.json +29 -0
- package/manifest/components/confidence-marker.json +3 -1
- package/manifest/components/container.json +2 -1
- package/manifest/components/context-menu.json +35 -3
- package/manifest/components/conversation-search.json +3 -1
- package/manifest/components/cue-mark.json +2 -2
- package/manifest/components/cue-portal-frame.json +1 -1
- package/manifest/components/data-row.json +3 -1
- package/manifest/components/data-tree.json +3 -1
- package/manifest/components/date-field.json +28 -0
- package/manifest/components/date-picker.json +32 -0
- package/manifest/components/date-range-picker.json +32 -0
- package/manifest/components/delegation-card.json +3 -1
- package/manifest/components/density.json +15 -7
- package/manifest/components/description-list.json +6 -1
- package/manifest/components/dialog.json +37 -3
- package/manifest/components/disclosure.json +35 -2
- package/manifest/components/dmx-bar.json +34 -3
- package/manifest/components/dmx-strip.json +34 -3
- package/manifest/components/drawer.json +36 -3
- package/manifest/components/dropdown-menu.json +35 -3
- package/manifest/components/edit-message.json +3 -1
- package/manifest/components/elements-command-palette.json +3 -1
- package/manifest/components/elements-composer.json +3 -0
- package/manifest/components/empty-state-composer.json +3 -1
- package/manifest/components/empty-state-greeting.json +3 -1
- package/manifest/components/empty-state-suggestion.json +3 -1
- package/manifest/components/empty-state-suggestions.json +3 -1
- package/manifest/components/empty-state.json +13 -0
- package/manifest/components/env-var-input.json +28 -0
- package/manifest/components/export-dialog.json +6 -1
- package/manifest/components/eyebrow.json +13 -2
- package/manifest/components/feedback-dialog.json +3 -0
- package/manifest/components/field-description.json +15 -0
- package/manifest/components/field-error.json +15 -0
- package/manifest/components/field-label.json +16 -1
- package/manifest/components/field.json +15 -0
- package/manifest/components/file-upload.json +3 -0
- package/manifest/components/footer.json +14 -1
- package/manifest/components/frames.json +14 -1
- package/manifest/components/hover-card.json +37 -3
- package/manifest/components/info-tip.json +3 -0
- package/manifest/components/input-group.json +31 -0
- package/manifest/components/input.json +29 -0
- package/manifest/components/item.json +3 -1
- package/manifest/components/kbd.json +12 -1
- package/manifest/components/ledger.json +9 -2
- package/manifest/components/link.json +33 -0
- package/manifest/components/log-viewer.json +3 -0
- package/manifest/components/map-answer.json +3 -1
- package/manifest/components/markdown-text.json +3 -0
- package/manifest/components/menubar.json +38 -4
- package/manifest/components/message-list.json +3 -0
- package/manifest/components/message.json +6 -1
- package/manifest/components/meter.json +1 -0
- package/manifest/components/mobile-composer.json +3 -1
- package/manifest/components/multi-select.json +86 -1
- package/manifest/components/musical-time-input.json +29 -0
- package/manifest/components/navigation-menu.json +48 -3
- package/manifest/components/node-card.json +3 -0
- package/manifest/components/number-field.json +30 -0
- package/manifest/components/otp-field.json +29 -0
- package/manifest/components/page-shell.json +14 -0
- package/manifest/components/pagination.json +22 -0
- package/manifest/components/panel-header.json +13 -0
- package/manifest/components/panel.json +14 -1
- package/manifest/components/password-input.json +28 -0
- package/manifest/components/permission-scopes.json +3 -1
- package/manifest/components/piano-keyboard.json +3 -0
- package/manifest/components/popover.json +37 -3
- package/manifest/components/preset-section.json +9 -1
- package/manifest/components/preview.json +24 -10
- package/manifest/components/progress.json +10 -1
- package/manifest/components/prompt-library.json +3 -1
- package/manifest/components/queue-dock.json +3 -1
- package/manifest/components/radio-group.json +14 -0
- package/manifest/components/radio.json +14 -0
- package/manifest/components/rating.json +4 -1
- package/manifest/components/reasoning-panel.json +3 -1
- package/manifest/components/recommendation-card.json +1 -1
- package/manifest/components/resizable.json +4 -1
- package/manifest/components/revert-dock.json +3 -1
- package/manifest/components/row.json +8 -1
- package/manifest/components/scroll-area.json +6 -2
- package/manifest/components/scrollable-tabs-list.json +21 -0
- package/manifest/components/scrub-input.json +28 -0
- package/manifest/components/seam-cell.json +1 -0
- package/manifest/components/seam-grid.json +1 -0
- package/manifest/components/seam-list.json +8 -1
- package/manifest/components/search-input.json +28 -0
- package/manifest/components/section-header.json +15 -2
- package/manifest/components/segmented-control.json +17 -0
- package/manifest/components/select.json +42 -0
- package/manifest/components/settings-panel.json +3 -0
- package/manifest/components/shape-section.json +9 -1
- package/manifest/components/sheet.json +35 -3
- package/manifest/components/shimmer-label.json +3 -0
- package/manifest/components/sidebar.json +19 -2
- package/manifest/components/skeleton.json +2 -0
- package/manifest/components/slider.json +16 -0
- package/manifest/components/sources.json +3 -1
- package/manifest/components/stat.json +17 -0
- package/manifest/components/status-bar.json +4 -0
- package/manifest/components/stepper.json +8 -0
- package/manifest/components/swap-label.json +3 -0
- package/manifest/components/switch.json +30 -0
- package/manifest/components/table-scroll-region.json +22 -2
- package/manifest/components/table.json +22 -2
- package/manifest/components/tabs.json +22 -1
- package/manifest/components/tags-input.json +86 -1
- package/manifest/components/terminal-frame.json +3 -0
- package/manifest/components/textarea.json +31 -0
- package/manifest/components/theme-configurator.json +35 -3
- package/manifest/components/theme-provider.json +31 -19
- package/manifest/components/thread-search.json +3 -1
- package/manifest/components/threshold-rail.json +3 -0
- package/manifest/components/time-field.json +28 -0
- package/manifest/components/toast.json +39 -2
- package/manifest/components/toggle-group.json +2 -1
- package/manifest/components/toggle.json +32 -0
- package/manifest/components/token-editor.json +6 -1
- package/manifest/components/tool-call-card.json +9 -2
- package/manifest/components/tool-call.json +3 -1
- package/manifest/components/tool-timeline.json +3 -1
- package/manifest/components/toolbar.json +22 -1
- package/manifest/components/tooltip.json +42 -3
- package/manifest/components/tree-visibility-toggle.json +3 -0
- package/manifest/components/tree.json +3 -0
- package/manifest/components/universe-grid.json +3 -0
- package/manifest/components/voice-conversation.json +3 -0
- package/manifest/components/work-collapse.json +3 -1
- package/manifest/fixtures.json +15 -0
- package/manifest/manifest.json +210 -190
- package/manifest/tokens.json +395 -4
- package/package.json +6 -6
|
@@ -1,4 +1,17 @@
|
|
|
1
1
|
import { cn } from "../lib/cn.js";
|
|
2
|
+
import { FOCUS_RING_INSET_2 } from "../system/_focus-ring.js";
|
|
3
|
+
import { LABEL_INK_SUBTLE } from "../system/_style-label-ink.js";
|
|
4
|
+
import { LABEL_FACE } from "../system/_style-label-face.js";
|
|
5
|
+
import { LABEL_WEIGHT_NORMAL } from "../system/_style-label-weight.js";
|
|
6
|
+
import { LABEL_CASE } from "../system/_style-label-case.js";
|
|
7
|
+
import { LABEL_TRACKING } from "../system/_style-label-tracking.js";
|
|
8
|
+
import { LABEL_SIZE } from "../system/_style-label-size.js";
|
|
9
|
+
import { BODY_SIZE, BODY_SIZE_LABEL } from "../system/_style-body-size.js";
|
|
10
|
+
import { DATA_FACE } from "../system/_style-data-face.js";
|
|
11
|
+
import { CELL_LEADING, CELL_PAD } from "../system/_style-cell.js";
|
|
12
|
+
import { SELECTED_ROW } from "../system/_style-selected.js";
|
|
13
|
+
import { HELP_INK } from "../system/_style-help-ink.js";
|
|
14
|
+
import { ROW_PAD_Y } from "../system/_style-row-pad.js";
|
|
2
15
|
import * as React from "react";
|
|
3
16
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
17
|
//#region src/instruments/table.tsx
|
|
@@ -16,7 +29,7 @@ const TableScrollRegion = React.forwardRef(function TableScrollRegion({ classNam
|
|
|
16
29
|
role: "region",
|
|
17
30
|
tabIndex: 0,
|
|
18
31
|
"data-slot": "table-scroll-region",
|
|
19
|
-
className: cn(
|
|
32
|
+
className: cn(`overflow-x-auto outline-none ${FOCUS_RING_INSET_2}`, className)
|
|
20
33
|
});
|
|
21
34
|
});
|
|
22
35
|
/**
|
|
@@ -32,7 +45,7 @@ const TableRoot = React.forwardRef(function TableRoot({ className, ...elementPro
|
|
|
32
45
|
return /* @__PURE__ */ jsx("table", {
|
|
33
46
|
ref,
|
|
34
47
|
"data-slot": "table",
|
|
35
|
-
className: cn(
|
|
48
|
+
className: cn(`w-full border-collapse ${DATA_FACE} ${BODY_SIZE} text-fg`, "[&_[data-numeric]]:text-right [&_[data-numeric]]:tabular-nums", className),
|
|
36
49
|
...elementProps
|
|
37
50
|
});
|
|
38
51
|
});
|
|
@@ -93,7 +106,7 @@ const TableRow = React.forwardRef(function TableRow({ className, interactive = f
|
|
|
93
106
|
ref,
|
|
94
107
|
"data-slot": "table-row",
|
|
95
108
|
"data-selected": selected ? "" : void 0,
|
|
96
|
-
className: cn(
|
|
109
|
+
className: cn(`group/data-row border-b border-border last:border-b-0 ${SELECTED_ROW}`, interactive ? `cursor-pointer outline-none hover:bg-(--cue-row-hover) ${FOCUS_RING_INSET_2}` : null, className),
|
|
97
110
|
...elementProps
|
|
98
111
|
});
|
|
99
112
|
});
|
|
@@ -122,7 +135,7 @@ const TableHead = React.forwardRef(function TableHead({ className, numeric = fal
|
|
|
122
135
|
scope,
|
|
123
136
|
"data-slot": "table-head",
|
|
124
137
|
"data-numeric": numeric ? "" : void 0,
|
|
125
|
-
className: cn(
|
|
138
|
+
className: cn(`border-b border-border bg-surface-1 ${CELL_PAD} ${ROW_PAD_Y} text-left whitespace-nowrap`, LABEL_SIZE, LABEL_INK_SUBTLE, LABEL_WEIGHT_NORMAL, LABEL_FACE, LABEL_TRACKING, LABEL_CASE, sticky ? "sticky top-0 z-3 border-b-0 shadow-[inset_0_-1px_0_var(--cue-hair-strong)]" : null, className),
|
|
126
139
|
...elementProps
|
|
127
140
|
});
|
|
128
141
|
});
|
|
@@ -140,8 +153,14 @@ const headingTag = (level) => `h${level}`;
|
|
|
140
153
|
* - `text-[length:inherit]` — `<h2>` is `1.5em` and `<h6>` is `0.67em`, so
|
|
141
154
|
* without this the divider's type would change with the level it was given,
|
|
142
155
|
* which is a heading level leaking into the visual design.
|
|
143
|
-
* - `font-
|
|
144
|
-
* reads as a second kind of emphasis (the same ruling as
|
|
156
|
+
* - `font-[number:inherit]` — headings come bold, and a bold micro-label in a
|
|
157
|
+
* dense list reads as a second kind of emphasis (the same ruling as
|
|
158
|
+
* `Ledger`'s heading). The weight is *inherited*, not set: the `<th>` reads
|
|
159
|
+
* `--cue-style-label-weight` (falling back to `400`), and a label that
|
|
160
|
+
* declared its own `font-normal` held the group's name at 400 while the cell
|
|
161
|
+
* and the count beside it moved to a style set's weight — two weights in one
|
|
162
|
+
* row. Inheriting also lets a caller's `className="font-medium"`, which lands
|
|
163
|
+
* on the cell, reach the name.
|
|
145
164
|
* - `m-0` — headings carry a block margin that would thicken the divider row.
|
|
146
165
|
*
|
|
147
166
|
* Preflight already does the middle two for consumers who import it, but the
|
|
@@ -150,7 +169,7 @@ const headingTag = (level) => `h${level}`;
|
|
|
150
169
|
* touches them, so they inherit from the `<th>` that owns the recipe, and a
|
|
151
170
|
* second copy of a treatment is exactly how two surfaces drift apart.
|
|
152
171
|
*/
|
|
153
|
-
const TABLE_GROUP_LABEL = "m-0 inline text-[length:inherit] font-
|
|
172
|
+
const TABLE_GROUP_LABEL = "m-0 inline text-[length:inherit] font-[number:inherit]";
|
|
154
173
|
/**
|
|
155
174
|
* The canonical console table: hairlines, mono figures, no zebra striping.
|
|
156
175
|
*
|
|
@@ -201,7 +220,7 @@ const Table = {
|
|
|
201
220
|
colSpan: span,
|
|
202
221
|
scope: "rowgroup",
|
|
203
222
|
"data-slot": "table-group-cell",
|
|
204
|
-
className: cn(
|
|
223
|
+
className: cn(`bg-bg px-(--cue-pad-row-x) ${ROW_PAD_Y} text-left whitespace-nowrap`, LABEL_SIZE, LABEL_INK_SUBTLE, LABEL_WEIGHT_NORMAL, LABEL_FACE, LABEL_TRACKING, LABEL_CASE, sticky ? "sticky z-2 [top:var(--cue-table-group-top,0px)]" : null, className),
|
|
205
224
|
children: [/* @__PURE__ */ jsx(Label, {
|
|
206
225
|
"data-slot": "table-group-label",
|
|
207
226
|
className: TABLE_GROUP_LABEL,
|
|
@@ -220,7 +239,7 @@ const Table = {
|
|
|
220
239
|
ref,
|
|
221
240
|
"data-slot": "table-cell",
|
|
222
241
|
"data-numeric": numeric ? "" : void 0,
|
|
223
|
-
className: cn(
|
|
242
|
+
className: cn(`${CELL_PAD} ${ROW_PAD_Y} ${CELL_LEADING} align-middle`, className),
|
|
224
243
|
...elementProps
|
|
225
244
|
});
|
|
226
245
|
}),
|
|
@@ -228,7 +247,7 @@ const Table = {
|
|
|
228
247
|
return /* @__PURE__ */ jsx("caption", {
|
|
229
248
|
ref,
|
|
230
249
|
"data-slot": "table-caption",
|
|
231
|
-
className: cn(
|
|
250
|
+
className: cn(`caption-bottom pt-(--cue-space-3) text-left ${BODY_SIZE_LABEL} ${HELP_INK}`, LABEL_FACE, className),
|
|
232
251
|
...elementProps
|
|
233
252
|
});
|
|
234
253
|
})
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "../lib/cn.js";
|
|
3
|
+
import { LABEL_INK_SUBTLE } from "../system/_style-label-ink.js";
|
|
4
|
+
import { LABEL_SIZE } from "../system/_style-label-size.js";
|
|
3
5
|
import { CopyButton } from "./copy-button.js";
|
|
4
6
|
import { toRem } from "./_rem.js";
|
|
5
7
|
import { mulberry32, usePrefersReducedMotion } from "./_motion.js";
|
|
@@ -184,14 +186,14 @@ const TerminalFrame = React.forwardRef(function TerminalFrame({ className, title
|
|
|
184
186
|
ref,
|
|
185
187
|
"data-slot": "terminal-frame",
|
|
186
188
|
"data-simulating": simulate === void 0 ? void 0 : String(simulating),
|
|
187
|
-
className: cn("flex min-w-0 flex-col overflow-hidden rounded-
|
|
189
|
+
className: cn("flex min-w-0 flex-col overflow-hidden rounded-surface border border-border bg-sunken font-mono text-(length:--cue-text-ui) text-fg-muted", className),
|
|
188
190
|
...elementProps,
|
|
189
191
|
children: [title === void 0 && !copy ? null : /* @__PURE__ */ jsxs("div", {
|
|
190
192
|
"data-slot": "terminal-frame-bar",
|
|
191
193
|
className: "flex h-control-md shrink-0 items-center justify-between gap-(--cue-space-3) border-b border-border px-(--cue-pad-row-x)",
|
|
192
194
|
children: [/* @__PURE__ */ jsx("span", {
|
|
193
195
|
"data-slot": "terminal-frame-title",
|
|
194
|
-
className:
|
|
196
|
+
className: `min-w-0 truncate ${LABEL_SIZE} tracking-(--cue-tracking-caps) ${LABEL_INK_SUBTLE} uppercase`,
|
|
195
197
|
children: title
|
|
196
198
|
}), copy ? /* @__PURE__ */ jsx("span", {
|
|
197
199
|
"data-slot": "terminal-frame-copy",
|
|
@@ -220,7 +220,7 @@ const UsageChart = React.forwardRef(function UsageChart({ className, points, ton
|
|
|
220
220
|
]
|
|
221
221
|
}), hover === null ? null : /* @__PURE__ */ jsx("div", {
|
|
222
222
|
"data-slot": "usage-chart-tooltip",
|
|
223
|
-
className: "pointer-events-none absolute top-0 -translate-x-1/2 rounded-
|
|
223
|
+
className: "pointer-events-none absolute top-0 -translate-x-1/2 rounded-control border border-border-overlay bg-surface-2 px-(--cue-space-3) py-(--cue-space-1) font-mono text-(length:--cue-text-label) tabular-nums text-fg",
|
|
224
224
|
style: { left: `${Math.min(88, Math.max(2, hover.x / VIEW_WIDTH * 100))}%` },
|
|
225
225
|
children: `${formatValue(hover.point.v)} · ${formatTimestamp === void 0 ? new Date(hover.point.t).toLocaleString(void 0, {
|
|
226
226
|
month: "short",
|
package/dist/layout/_collapse.js
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import { CONTROL_FACE } from "../system/_style-control-face.js";
|
|
2
|
+
import { COLLAPSE_FOCUS_RING } from "../system/_style-text-focus.js";
|
|
3
|
+
import { COLLAPSE_BODY_FACE, COLLAPSE_BODY_INK, COLLAPSE_BODY_LEADING, COLLAPSE_BODY_PAD, COLLAPSE_BODY_SIZE, COLLAPSE_BODY_TRACKING, COLLAPSE_CARET_INK, COLLAPSE_CARET_OPACITY, COLLAPSE_CARET_SIZE, COLLAPSE_GAP, COLLAPSE_HEIGHT, COLLAPSE_HOVER_GROUND, COLLAPSE_HOVER_INK, COLLAPSE_LEADING, COLLAPSE_OPEN_INK, COLLAPSE_PAD, COLLAPSE_RADIUS, COLLAPSE_SIZE, COLLAPSE_WEIGHT } from "../system/_style-collapse.js";
|
|
4
|
+
import { QUIET_INK } from "../system/_style-quiet-ink.js";
|
|
1
5
|
//#region src/layout/_collapse.ts
|
|
2
6
|
/**
|
|
3
7
|
* The one disclosure recipe, shared by `Accordion` and `Collapsible`.
|
|
@@ -17,16 +21,25 @@
|
|
|
17
21
|
* `focus-visible:outline-solid` re-declares the outline style the sibling
|
|
18
22
|
* `outline-none` switched off — see the note on `buttonChassis`. The ring is
|
|
19
23
|
* inset (`-outline-offset-2`) because sections live inside `overflow-hidden`
|
|
20
|
-
* panels, where an outset ring on the first row would be clipped by the rim
|
|
24
|
+
* panels, where an outset ring on the first row would be clipped by the rim;
|
|
25
|
+
* a style set may move it (`style-text-focus-offset`, `_style-text-focus.ts`).
|
|
26
|
+
*
|
|
27
|
+
* Round 6 (spec §11, lane R6.T) reads the gutter, the gap, the hover and open
|
|
28
|
+
* inks and the ring's offset from the style set, each falling back to the
|
|
29
|
+
* class it replaced (`_style-collapse.ts`); lane R6.K adds the question's
|
|
30
|
+
* size and leading and the hover ground, and lane R6.Z its weight (falling back
|
|
31
|
+
* through the label weight to the `400` it drew), the same way.
|
|
21
32
|
*/
|
|
22
|
-
const collapseTriggerClasses =
|
|
33
|
+
const collapseTriggerClasses = `group/collapse flex ${COLLAPSE_HEIGHT} w-full cursor-pointer items-center ${COLLAPSE_GAP} ${COLLAPSE_PAD} ${COLLAPSE_RADIUS} text-left ${CONTROL_FACE} ${COLLAPSE_SIZE} ${COLLAPSE_LEADING} ${QUIET_INK} ${COLLAPSE_WEIGHT} transition-colors duration-150 outline-none select-none ${COLLAPSE_HOVER_INK} ${COLLAPSE_HOVER_GROUND} ${COLLAPSE_FOCUS_RING} ${COLLAPSE_OPEN_INK} data-[disabled]:pointer-events-none data-[disabled]:opacity-40`;
|
|
23
34
|
/** The label between the summary row's gutters — truncates, never wraps. */
|
|
24
35
|
const collapseLabelClasses = "min-w-0 flex-1 truncate";
|
|
25
36
|
/**
|
|
26
37
|
* The caret at the end of a summary row. Rotation is driven off the trigger's
|
|
27
38
|
* own `data-panel-open`, so nothing in React has to know the section is open.
|
|
39
|
+
* Its size and ink read the style set (round 6, lane R6.Z), falling back to
|
|
40
|
+
* the `icon-sm` and `fg-subtle` it drew.
|
|
28
41
|
*/
|
|
29
|
-
const collapseCaretClasses =
|
|
42
|
+
const collapseCaretClasses = `${COLLAPSE_CARET_SIZE} shrink-0 ${COLLAPSE_CARET_INK} ${COLLAPSE_CARET_OPACITY} transition-transform duration-150 ease-out group-data-[panel-open]/collapse:rotate-90 motion-reduce:transition-none`;
|
|
30
43
|
/**
|
|
31
44
|
* Enter/exit for a panel, animated from the height Base UI measures for us.
|
|
32
45
|
*
|
|
@@ -40,7 +53,15 @@ const PANEL_MOTION = "overflow-hidden transition-[height] duration-150 ease-out
|
|
|
40
53
|
const accordionPanelClasses = `${PANEL_MOTION} h-(--accordion-panel-height)`;
|
|
41
54
|
/** {@link PANEL_MOTION} against the collapsible's measured height. */
|
|
42
55
|
const collapsiblePanelClasses = `${PANEL_MOTION} h-(--collapsible-panel-height)`;
|
|
43
|
-
/**
|
|
44
|
-
|
|
56
|
+
/**
|
|
57
|
+
* The padded body inside a panel: aligned to the summary row's gutters, which
|
|
58
|
+
* a style set may move with the trigger's (`style-collapse-pad`), and padded
|
|
59
|
+
* top and bottom by `style-collapse-body-pad` (round 6, spec §11). Its voice
|
|
60
|
+
* reads the set (lanes R6.K and R6.Z): its face (the body face), size, leading
|
|
61
|
+
* and tracking, and its ink
|
|
62
|
+
* (`style-collapse-body-ink`), each falling back to the mono `text-ui` line in
|
|
63
|
+
* `fg-muted` it drew.
|
|
64
|
+
*/
|
|
65
|
+
const collapsePanelBodyClasses = `${COLLAPSE_PAD} ${COLLAPSE_BODY_PAD} ${COLLAPSE_BODY_FACE} ${COLLAPSE_BODY_SIZE} ${COLLAPSE_BODY_LEADING} ${COLLAPSE_BODY_TRACKING} ${COLLAPSE_BODY_INK}`;
|
|
45
66
|
//#endregion
|
|
46
67
|
export { accordionPanelClasses, collapseCaretClasses, collapseLabelClasses, collapsePanelBodyClasses, collapseTriggerClasses, collapsiblePanelClasses };
|
package/dist/layout/accordion.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "../lib/cn.js";
|
|
3
|
+
import { ACCORDION_RULE_INK, ACCORDION_RULE_STYLE } from "../system/_style-accordion-rule.js";
|
|
3
4
|
import { accordionPanelClasses, collapseCaretClasses, collapseLabelClasses, collapsePanelBodyClasses, collapseTriggerClasses } from "./_collapse.js";
|
|
4
5
|
import { ChevronRightGlyph } from "./_glyphs.js";
|
|
5
6
|
import * as React from "react";
|
|
@@ -36,7 +37,7 @@ const Accordion$1 = {
|
|
|
36
37
|
return /* @__PURE__ */ jsx(Accordion.Item, {
|
|
37
38
|
ref,
|
|
38
39
|
"data-slot": "accordion-item",
|
|
39
|
-
className: cn("border-t
|
|
40
|
+
className: cn("border-t first:border-t-0", ACCORDION_RULE_INK, ACCORDION_RULE_STYLE, className),
|
|
40
41
|
...elementProps
|
|
41
42
|
});
|
|
42
43
|
}),
|
package/dist/layout/bento.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { cn } from "../lib/cn.js";
|
|
2
|
+
import { FOCUS_RING_OFFSET_2 } from "../system/_focus-ring.js";
|
|
3
|
+
import { DATA_FACE } from "../system/_style-data-face.js";
|
|
4
|
+
import { TITLE_VOICE } from "../system/_style-title.js";
|
|
2
5
|
import { GAP_CLASSES } from "./stack.js";
|
|
3
6
|
import * as React from "react";
|
|
4
7
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -53,9 +56,9 @@ const MIN_HEIGHT_CLASSES = {
|
|
|
53
56
|
hero: "min-h-[calc(var(--cue-space-8)*8)]"
|
|
54
57
|
};
|
|
55
58
|
/** The tile surface, shared by both variants so a link tile is not a second look. */
|
|
56
|
-
const TILE_CLASS = "flex flex-col gap-(--cue-space-3) overflow-hidden rounded-
|
|
59
|
+
const TILE_CLASS = "flex flex-col gap-(--cue-space-3) overflow-hidden rounded-surface border border-border bg-surface-1 p-(--cue-space-5)";
|
|
57
60
|
/** What a link tile adds: the hover tint and the focus ring the whole surface takes. */
|
|
58
|
-
const LINK_TILE_CLASS =
|
|
61
|
+
const LINK_TILE_CLASS = `no-underline transition-colors duration-150 outline-none hover:bg-surface-2 ${FOCUS_RING_OFFSET_2}`;
|
|
59
62
|
/** The host elements a link tile may not contain, plus anything carrying `tabIndex`. */
|
|
60
63
|
const INTERACTIVE_TAGS = /* @__PURE__ */ new Set([
|
|
61
64
|
"a",
|
|
@@ -169,11 +172,11 @@ const BentoTile = React.forwardRef(function BentoTile(props, ref) {
|
|
|
169
172
|
className: "flex min-w-0 flex-col gap-(--cue-space-1)",
|
|
170
173
|
children: [eyebrow === void 0 ? null : /* @__PURE__ */ jsx("span", {
|
|
171
174
|
"data-slot": "bento-tile-eyebrow",
|
|
172
|
-
className:
|
|
175
|
+
className: `min-w-0 truncate ${DATA_FACE} text-(length:--cue-text-micro) text-fg-muted`,
|
|
173
176
|
children: eyebrow
|
|
174
177
|
}), title === void 0 ? null : /* @__PURE__ */ jsx("span", {
|
|
175
178
|
"data-slot": "bento-tile-title",
|
|
176
|
-
className:
|
|
179
|
+
className: TITLE_VOICE,
|
|
177
180
|
children: title
|
|
178
181
|
})]
|
|
179
182
|
}) : null, tail ? /* @__PURE__ */ jsxs("div", {
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import { cn } from "../lib/cn.js";
|
|
2
|
+
import { FOCUS_RING_OFFSET_2 } from "../system/_focus-ring.js";
|
|
3
|
+
import { HELP_INK } from "../system/_style-help-ink.js";
|
|
4
|
+
import { CRUMB_CURRENT_INK, CRUMB_FACE, CRUMB_GAP, CRUMB_HOVER_INK, CRUMB_INK, CRUMB_SEPARATOR_OPACITY, CRUMB_SIZE } from "../system/_style-crumb.js";
|
|
2
5
|
import * as React from "react";
|
|
3
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
7
|
//#region src/layout/breadcrumb.tsx
|
|
5
8
|
/**
|
|
6
9
|
* A crumb that goes somewhere. Muted until hovered, never underlined — the
|
|
7
|
-
* trail is navigation furniture and should not read as body-copy links.
|
|
10
|
+
* trail is navigation furniture and should not read as body-copy links. Its
|
|
11
|
+
* face, hover ink and the trail's gap read the style set (round 6, spec §11,
|
|
12
|
+
* lane R6.Z: `_style-crumb.ts`), each falling back to what it drew.
|
|
8
13
|
*/
|
|
9
|
-
const CRUMB_LINK_CLASSES =
|
|
14
|
+
const CRUMB_LINK_CLASSES = `cursor-pointer rounded-control border-0 bg-transparent p-0 ${CRUMB_FACE} ${CRUMB_SIZE} ${CRUMB_INK} no-underline transition-colors duration-150 outline-none ${CRUMB_HOVER_INK} ${FOCUS_RING_OFFSET_2}`;
|
|
10
15
|
/**
|
|
11
16
|
* Where you are, and how to get back.
|
|
12
17
|
*
|
|
@@ -28,13 +33,13 @@ const Breadcrumb = React.forwardRef(function Breadcrumb({ className, items, sepa
|
|
|
28
33
|
className: cn("min-w-0", className),
|
|
29
34
|
...elementProps,
|
|
30
35
|
children: /* @__PURE__ */ jsx("ol", {
|
|
31
|
-
className:
|
|
36
|
+
className: cn(`m-0 flex list-none flex-wrap items-center ${CRUMB_GAP} p-0 ${CRUMB_SIZE} ${CRUMB_INK}`, CRUMB_FACE),
|
|
32
37
|
children: items.map((item, index) => {
|
|
33
38
|
const last = index === items.length - 1;
|
|
34
39
|
return /* @__PURE__ */ jsxs(React.Fragment, { children: [index === 0 ? null : /* @__PURE__ */ jsx("li", {
|
|
35
40
|
"data-slot": "breadcrumb-separator",
|
|
36
41
|
"aria-hidden": "true",
|
|
37
|
-
className:
|
|
42
|
+
className: `${HELP_INK} ${CRUMB_SEPARATOR_OPACITY} select-none`,
|
|
38
43
|
children: separator
|
|
39
44
|
}), /* @__PURE__ */ jsx("li", {
|
|
40
45
|
"data-slot": "breadcrumb-item",
|
|
@@ -42,7 +47,7 @@ const Breadcrumb = React.forwardRef(function Breadcrumb({ className, items, sepa
|
|
|
42
47
|
children: last ? /* @__PURE__ */ jsx("span", {
|
|
43
48
|
"data-slot": "breadcrumb-current",
|
|
44
49
|
"aria-current": "page",
|
|
45
|
-
className:
|
|
50
|
+
className: `truncate ${CRUMB_CURRENT_INK}`,
|
|
46
51
|
children: item.label
|
|
47
52
|
}) : item.href !== void 0 ? /* @__PURE__ */ jsx("a", {
|
|
48
53
|
href: item.href,
|
package/dist/layout/card.js
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import { cn } from "../lib/cn.js";
|
|
2
|
+
import { BODY_VOICE } from "../system/_style-body.js";
|
|
3
|
+
import { BODY_SIZE } from "../system/_style-body-size.js";
|
|
2
4
|
import { RIM_INSET } from "../system/_paint-rim.js";
|
|
5
|
+
import { TITLE_VOICE } from "../system/_style-title.js";
|
|
6
|
+
import { SEAM_INK, SEAM_RIM } from "../system/_style-seam.js";
|
|
3
7
|
import { STROKE_SURFACE_1 } from "../system/_paint-stroke-surface-1.js";
|
|
8
|
+
import { CARD_GAP } from "../system/_style-card-gap.js";
|
|
9
|
+
import { CARD_PAD, CARD_PAD_BOTTOM, CARD_PAD_SEAM_BOTTOM, CARD_PAD_SEAM_TOP, CARD_PAD_TOP, CARD_PAD_X } from "../system/_style-card-pad.js";
|
|
10
|
+
import { DESCRIPTION_LEADING, DESCRIPTION_TRACKING } from "../system/_style-description.js";
|
|
4
11
|
import * as React from "react";
|
|
5
12
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
13
|
/**
|
|
@@ -21,7 +28,7 @@ const Card = {
|
|
|
21
28
|
ref,
|
|
22
29
|
"data-slot": "card",
|
|
23
30
|
"data-seam": seam ? "" : void 0,
|
|
24
|
-
className: cn("group/card flex flex-col overflow-hidden rounded-
|
|
31
|
+
className: cn("group/card flex flex-col overflow-hidden rounded-surface", seam ? `border ${SEAM_RIM} gap-px ${SEAM_INK}` : `${STROKE_SURFACE_1} ${RIM_INSET}`, className),
|
|
25
32
|
...elementProps
|
|
26
33
|
});
|
|
27
34
|
}),
|
|
@@ -29,10 +36,10 @@ const Card = {
|
|
|
29
36
|
return /* @__PURE__ */ jsxs("div", {
|
|
30
37
|
ref,
|
|
31
38
|
"data-slot": "card-header",
|
|
32
|
-
className: cn(
|
|
39
|
+
className: cn(`flex items-start justify-between gap-(--cue-space-4) bg-surface-1 ${CARD_PAD_X} ${CARD_PAD_TOP} pb-0 ${CARD_PAD_SEAM_BOTTOM}`, className),
|
|
33
40
|
...elementProps,
|
|
34
41
|
children: [/* @__PURE__ */ jsx("div", {
|
|
35
|
-
className:
|
|
42
|
+
className: `flex min-w-0 flex-col ${CARD_GAP}`,
|
|
36
43
|
children
|
|
37
44
|
}), actions === void 0 ? null : /* @__PURE__ */ jsx("div", {
|
|
38
45
|
"data-slot": "card-header-actions",
|
|
@@ -45,7 +52,7 @@ const Card = {
|
|
|
45
52
|
return /* @__PURE__ */ jsx("h3", {
|
|
46
53
|
ref,
|
|
47
54
|
"data-slot": "card-title",
|
|
48
|
-
className: cn(
|
|
55
|
+
className: cn(TITLE_VOICE, className),
|
|
49
56
|
...elementProps
|
|
50
57
|
});
|
|
51
58
|
}),
|
|
@@ -53,7 +60,7 @@ const Card = {
|
|
|
53
60
|
return /* @__PURE__ */ jsx("p", {
|
|
54
61
|
ref,
|
|
55
62
|
"data-slot": "card-description",
|
|
56
|
-
className: cn(
|
|
63
|
+
className: cn(`${BODY_VOICE} ${BODY_SIZE} ${DESCRIPTION_LEADING} ${DESCRIPTION_TRACKING} text-fg-muted`, className),
|
|
57
64
|
...elementProps
|
|
58
65
|
});
|
|
59
66
|
}),
|
|
@@ -61,7 +68,7 @@ const Card = {
|
|
|
61
68
|
return /* @__PURE__ */ jsx("div", {
|
|
62
69
|
ref,
|
|
63
70
|
"data-slot": "card-content",
|
|
64
|
-
className: cn(
|
|
71
|
+
className: cn(`bg-surface-1 ${CARD_PAD}`, className),
|
|
65
72
|
...elementProps
|
|
66
73
|
});
|
|
67
74
|
}),
|
|
@@ -69,7 +76,7 @@ const Card = {
|
|
|
69
76
|
return /* @__PURE__ */ jsx("div", {
|
|
70
77
|
ref,
|
|
71
78
|
"data-slot": "card-footer",
|
|
72
|
-
className: cn(
|
|
79
|
+
className: cn(`flex items-center justify-end gap-(--cue-space-3) bg-surface-1 ${CARD_PAD_X} pt-0 ${CARD_PAD_BOTTOM} ${CARD_PAD_SEAM_TOP}`, className),
|
|
73
80
|
...elementProps
|
|
74
81
|
});
|
|
75
82
|
})
|
package/dist/layout/carousel.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "../lib/cn.js";
|
|
3
|
+
import { FOCUS_RING_OFFSET_2 } from "../system/_focus-ring.js";
|
|
3
4
|
import { IconButton } from "../primitives/icon-button.js";
|
|
4
5
|
import { ChevronLeftGlyph, ChevronRightGlyph } from "./_glyphs.js";
|
|
5
6
|
import * as React from "react";
|
|
@@ -118,7 +119,7 @@ const Carousel = {
|
|
|
118
119
|
scrollNext();
|
|
119
120
|
}
|
|
120
121
|
},
|
|
121
|
-
className: cn(
|
|
122
|
+
className: cn(`relative outline-none ${FOCUS_RING_OFFSET_2}`, className),
|
|
122
123
|
...elementProps,
|
|
123
124
|
children
|
|
124
125
|
})
|
|
@@ -202,7 +203,7 @@ const Carousel = {
|
|
|
202
203
|
"aria-label": dotLabel(index),
|
|
203
204
|
"aria-current": index === selectedIndex ? "true" : void 0,
|
|
204
205
|
onClick: () => scrollTo(index),
|
|
205
|
-
className: cn(
|
|
206
|
+
className: cn(`size-[0.25rem] cursor-pointer rounded-full border-0 p-0 transition-colors duration-150 outline-none ${FOCUS_RING_OFFSET_2} motion-reduce:transition-none`, index === selectedIndex ? "bg-accent" : "bg-border-strong")
|
|
206
207
|
}, index))
|
|
207
208
|
});
|
|
208
209
|
})
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "../lib/cn.js";
|
|
3
|
+
import { FOCUS_RING_OFFSET_2 } from "../system/_focus-ring.js";
|
|
4
|
+
import { LABEL_FACE } from "../system/_style-label-face.js";
|
|
5
|
+
import { LABEL_CASE } from "../system/_style-label-case.js";
|
|
6
|
+
import { LABEL_TRACKING } from "../system/_style-label-tracking.js";
|
|
3
7
|
import { collapseCaretClasses, collapseLabelClasses, collapsePanelBodyClasses, collapseTriggerClasses, collapsiblePanelClasses } from "./_collapse.js";
|
|
4
8
|
import { ChevronRightGlyph } from "./_glyphs.js";
|
|
9
|
+
import { DISCLOSURE_HOVER_INK, DISCLOSURE_INK, DISCLOSURE_WEIGHT } from "../system/_style-disclosure.js";
|
|
5
10
|
import * as React from "react";
|
|
6
11
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
12
|
import { Collapsible } from "@base-ui/react/collapsible";
|
|
@@ -94,7 +99,7 @@ const Disclosure = React.forwardRef(function Disclosure({ className, label = "ad
|
|
|
94
99
|
children: [/* @__PURE__ */ jsxs(Collapsible.Trigger, {
|
|
95
100
|
ref,
|
|
96
101
|
"data-slot": "disclosure-trigger",
|
|
97
|
-
className: cn(
|
|
102
|
+
className: cn(`group/disclosure inline-flex cursor-pointer items-center gap-(--cue-space-2) self-start border-0 bg-transparent p-0 py-(--cue-space-2) text-(length:--cue-text-label) ${DISCLOSURE_INK} ${DISCLOSURE_WEIGHT} transition-colors duration-150 outline-none select-none ${DISCLOSURE_HOVER_INK} ${FOCUS_RING_OFFSET_2}`, LABEL_FACE, LABEL_TRACKING, LABEL_CASE, className),
|
|
98
103
|
...elementProps,
|
|
99
104
|
children: [
|
|
100
105
|
/* @__PURE__ */ jsx("span", {
|
package/dist/layout/container.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { cn } from "../lib/cn.js";
|
|
2
|
+
import { GUTTER } from "../system/_style-gutter.js";
|
|
2
3
|
import * as React from "react";
|
|
3
4
|
import { jsx } from "react/jsx-runtime";
|
|
4
5
|
//#region src/layout/container.tsx
|
|
@@ -35,7 +36,7 @@ const Container = React.forwardRef(function Container({ className, width = "narr
|
|
|
35
36
|
return /* @__PURE__ */ jsx("div", {
|
|
36
37
|
ref,
|
|
37
38
|
"data-slot": "container",
|
|
38
|
-
className: cn("mx-auto w-full", WIDTHS[width], padded ?
|
|
39
|
+
className: cn("mx-auto w-full", WIDTHS[width], padded ? GUTTER : null, className),
|
|
39
40
|
...elementProps
|
|
40
41
|
});
|
|
41
42
|
});
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { cn } from "../lib/cn.js";
|
|
2
|
+
import { LABEL_FACE } from "../system/_style-label-face.js";
|
|
3
|
+
import { LABEL_CASE } from "../system/_style-label-case.js";
|
|
4
|
+
import { LABEL_TRACKING } from "../system/_style-label-tracking.js";
|
|
2
5
|
import * as React from "react";
|
|
3
6
|
import { jsx } from "react/jsx-runtime";
|
|
4
7
|
//#region src/layout/description-list.tsx
|
|
@@ -20,7 +23,7 @@ const DescriptionList = {
|
|
|
20
23
|
return /* @__PURE__ */ jsx("dt", {
|
|
21
24
|
ref,
|
|
22
25
|
"data-slot": "description-list-term",
|
|
23
|
-
className: cn("
|
|
26
|
+
className: cn("text-(length:--cue-text-label) text-fg-subtle", LABEL_FACE, LABEL_TRACKING, LABEL_CASE, className),
|
|
24
27
|
...elementProps
|
|
25
28
|
});
|
|
26
29
|
}),
|
package/dist/layout/frames.js
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "../lib/cn.js";
|
|
3
|
+
import { FOCUS_RING_INSET_2 } from "../system/_focus-ring.js";
|
|
4
|
+
import { LABEL_INK_SUBTLE } from "../system/_style-label-ink.js";
|
|
5
|
+
import { LABEL_FACE } from "../system/_style-label-face.js";
|
|
6
|
+
import { LABEL_TRACKING_INHERIT } from "../system/_style-label-tracking.js";
|
|
7
|
+
import { LABEL_SIZE_MICRO } from "../system/_style-label-size.js";
|
|
3
8
|
import { GROUND_CLASSES } from "./_ground.js";
|
|
9
|
+
import { CAPTION_CASE } from "../system/_style-caption.js";
|
|
4
10
|
import * as React from "react";
|
|
5
11
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
12
|
//#region src/layout/frames.tsx
|
|
@@ -105,7 +111,7 @@ const HEIGHT_CLASSES = {
|
|
|
105
111
|
* scroller fills stays where a reader left it. The ground is on the box for the
|
|
106
112
|
* same reason — a board's grid does not move with its art.
|
|
107
113
|
*/
|
|
108
|
-
const ROOT_CLASS = "relative min-w-0 overflow-hidden rounded-
|
|
114
|
+
const ROOT_CLASS = "relative min-w-0 overflow-hidden rounded-surface border border-border";
|
|
109
115
|
/**
|
|
110
116
|
* The scroller: a row of frames, sideways only, with a rung of the space
|
|
111
117
|
* ladder's top between them.
|
|
@@ -117,7 +123,7 @@ const ROOT_CLASS = "relative min-w-0 overflow-hidden rounded-(--radius-surface)
|
|
|
117
123
|
* there is no frame loop here for `reduced-motion.test.ts` to find, and there
|
|
118
124
|
* must not be.
|
|
119
125
|
*/
|
|
120
|
-
const CANVAS_CLASS =
|
|
126
|
+
const CANVAS_CLASS = `flex h-full min-w-0 items-start gap-(--cue-space-8) overflow-x-auto overflow-y-hidden scroll-smooth p-(--cue-space-6) outline-none motion-reduce:scroll-auto ${FOCUS_RING_INSET_2}`;
|
|
121
127
|
/**
|
|
122
128
|
* The column: the same frames, stacked, sized by what they hold.
|
|
123
129
|
*
|
|
@@ -127,7 +133,7 @@ const CANVAS_CLASS = "flex h-full min-w-0 items-start gap-(--cue-space-8) overfl
|
|
|
127
133
|
* It keeps the focus ring and the keyboard handler: the region is still
|
|
128
134
|
* focusable, and arrow keys still scroll it, they just scroll the page.
|
|
129
135
|
*/
|
|
130
|
-
const COLUMN_CLASS =
|
|
136
|
+
const COLUMN_CLASS = `flex min-w-0 flex-col gap-(--cue-space-6) p-(--cue-space-6) outline-none ${FOCUS_RING_INSET_2}`;
|
|
131
137
|
/** A column is sized by its contents, so the box must not hold a height. */
|
|
132
138
|
const COLUMN_ROOT_CLASS = "h-auto";
|
|
133
139
|
/** The affordance, and only where there is something to afford. */
|
|
@@ -237,7 +243,7 @@ const FramesRoot = React.forwardRef(function FramesRoot({ children, label, heigh
|
|
|
237
243
|
});
|
|
238
244
|
});
|
|
239
245
|
/** One cell: the specimen, and the line under it. */
|
|
240
|
-
const ITEM_CLASS = "flex min-w-0 shrink-0 flex-col items-center gap-(--cue-space-2) rounded-
|
|
246
|
+
const ITEM_CLASS = "flex min-w-0 shrink-0 flex-col items-center gap-(--cue-space-2) rounded-control p-(--cue-space-2)";
|
|
241
247
|
/** The one a reader is inspecting. An outline and not a border: a border would move the cell. */
|
|
242
248
|
const ITEM_SELECTED_CLASS = "outline-2 outline-solid -outline-offset-1 outline-accent";
|
|
243
249
|
const ITEM_BODY_CLASS = "flex min-w-0 items-center justify-center";
|
|
@@ -262,7 +268,7 @@ const ITEM_BODY_CLASS = "flex min-w-0 items-center justify-center";
|
|
|
262
268
|
* behaves like any other line, rather than inheriting the empty string and
|
|
263
269
|
* vanishing.
|
|
264
270
|
*/
|
|
265
|
-
const ITEM_CAPTION_CLASS =
|
|
271
|
+
const ITEM_CAPTION_CLASS = `min-w-0 truncate text-center ${LABEL_FACE} ${CAPTION_CASE} ${LABEL_TRACKING_INHERIT} ${LABEL_SIZE_MICRO} ${LABEL_INK_SUBTLE} [opacity:var(--preview-captions,1)] [pointer-events:var(--preview-captions-pe,auto)]`;
|
|
266
272
|
/**
|
|
267
273
|
* A design canvas: frames side by side, each holding one axis of one component.
|
|
268
274
|
*
|
package/dist/layout/item.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { cn } from "../lib/cn.js";
|
|
2
|
+
import { FOCUS_RING } from "../system/_focus-ring.js";
|
|
2
3
|
import { cva } from "../lib/cva.js";
|
|
3
4
|
import * as React from "react";
|
|
4
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -15,7 +16,7 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
|
15
16
|
* @example
|
|
16
17
|
* <div className={itemVariants({ variant: "outline" })} />
|
|
17
18
|
*/
|
|
18
|
-
const itemVariants = cva("flex w-full items-center gap-(--cue-space-4) rounded-
|
|
19
|
+
const itemVariants = cva("flex w-full items-center gap-(--cue-space-4) rounded-control px-(--cue-pad-row-x) py-(--cue-pad-row-y) text-left font-mono text-(length:--cue-text-ui) text-fg", {
|
|
19
20
|
variants: {
|
|
20
21
|
variant: {
|
|
21
22
|
plain: "",
|
|
@@ -23,7 +24,7 @@ const itemVariants = cva("flex w-full items-center gap-(--cue-space-4) rounded-(
|
|
|
23
24
|
soft: "bg-surface-2"
|
|
24
25
|
},
|
|
25
26
|
interactive: {
|
|
26
|
-
true:
|
|
27
|
+
true: `cursor-pointer transition-colors duration-150 outline-none hover:bg-surface-2 ${FOCUS_RING} disabled:pointer-events-none disabled:opacity-40`,
|
|
27
28
|
false: ""
|
|
28
29
|
}
|
|
29
30
|
},
|
package/dist/layout/link.d.ts
CHANGED
|
@@ -13,6 +13,22 @@ import { useRender } from "@base-ui/react/use-render";
|
|
|
13
13
|
* alone would fail WCAG 1.4.1 — and it offsets the rule by 4px so descenders
|
|
14
14
|
* are not struck through.
|
|
15
15
|
*
|
|
16
|
+
* The ink, the rule's colour and offset, the weight and the hover ink are the
|
|
17
|
+
* style set's to change (spec §3.7): each reads a `style-link-*` name, or
|
|
18
|
+
* `style-hover-ink`, with what this recipe drew before as its fallback —
|
|
19
|
+
* `_style-link.ts` lists them. The `underline` variant's ink falls back
|
|
20
|
+
* through every link's, so a set that inks all links inks prose links too.
|
|
21
|
+
*
|
|
22
|
+
* **Each variant carries its own ink, and the base carries none.** The two
|
|
23
|
+
* inks are two `text-[color:…]` utilities, and `linkVariants()` is exported to
|
|
24
|
+
* be spread onto an anchor without `cn()`: were the plain ink in the base and
|
|
25
|
+
* the prose ink in the variant, an underlined link would carry both, and which
|
|
26
|
+
* one painted would be decided by the order Tailwind happened to emit them in.
|
|
27
|
+
* The same holds for a class a caller concatenates onto it: it does not replace
|
|
28
|
+
* the recipe's own, and the offset reader is emitted after every numeric
|
|
29
|
+
* `underline-offset-*`. Merge with `tailwind-merge`, or pass `className` to
|
|
30
|
+
* `Link`, which merges, to override one.
|
|
31
|
+
*
|
|
16
32
|
* @example
|
|
17
33
|
* <a className={linkVariants({ variant: "underline" })} href="/docs">Docs</a>
|
|
18
34
|
*/
|
|
@@ -32,6 +48,20 @@ interface LinkProps extends React.ComponentPropsWithoutRef<"a">, VariantProps<ty
|
|
|
32
48
|
* how the design system composes with a router without depending on one.
|
|
33
49
|
*/
|
|
34
50
|
render?: useRender.RenderProp;
|
|
51
|
+
/**
|
|
52
|
+
* Where the link goes. Restated from the anchor's own attributes, as
|
|
53
|
+
* `children` is below: docgen documents a prop only where the library
|
|
54
|
+
* declares it, and an anchor without an `href` is not a link to the
|
|
55
|
+
* keyboard or to a screen reader.
|
|
56
|
+
*/
|
|
57
|
+
href?: string;
|
|
58
|
+
/**
|
|
59
|
+
* The link's text. Restated for the same reason: without it the props table
|
|
60
|
+
* omitted it and no propSet could name it, so the docs' Link tile drew an
|
|
61
|
+
* empty anchor (round 6 of the Looks' fidelity plan found it, measuring
|
|
62
|
+
* Kiln's plain link, K161).
|
|
63
|
+
*/
|
|
64
|
+
children?: React.ReactNode;
|
|
35
65
|
}
|
|
36
66
|
/**
|
|
37
67
|
* A text link: accent on hover, no rule unless you ask for one.
|
package/dist/layout/link.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "../lib/cn.js";
|
|
3
|
+
import { CONTROL_FACE } from "../system/_style-control-face.js";
|
|
3
4
|
import { cva } from "../lib/cva.js";
|
|
5
|
+
import { HOVER_INK, HOVER_RULE, INLINE_LINK_INK, LINK_INK, LINK_OFFSET, LINK_RULE, LINK_WEIGHT } from "../system/_style-link.js";
|
|
6
|
+
import { LINK_FOCUS_RING } from "../system/_style-text-focus.js";
|
|
4
7
|
import * as React from "react";
|
|
5
8
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
9
|
import { useRender } from "@base-ui/react/use-render";
|
|
@@ -16,13 +19,29 @@ import { useRender } from "@base-ui/react/use-render";
|
|
|
16
19
|
* alone would fail WCAG 1.4.1 — and it offsets the rule by 4px so descenders
|
|
17
20
|
* are not struck through.
|
|
18
21
|
*
|
|
22
|
+
* The ink, the rule's colour and offset, the weight and the hover ink are the
|
|
23
|
+
* style set's to change (spec §3.7): each reads a `style-link-*` name, or
|
|
24
|
+
* `style-hover-ink`, with what this recipe drew before as its fallback —
|
|
25
|
+
* `_style-link.ts` lists them. The `underline` variant's ink falls back
|
|
26
|
+
* through every link's, so a set that inks all links inks prose links too.
|
|
27
|
+
*
|
|
28
|
+
* **Each variant carries its own ink, and the base carries none.** The two
|
|
29
|
+
* inks are two `text-[color:…]` utilities, and `linkVariants()` is exported to
|
|
30
|
+
* be spread onto an anchor without `cn()`: were the plain ink in the base and
|
|
31
|
+
* the prose ink in the variant, an underlined link would carry both, and which
|
|
32
|
+
* one painted would be decided by the order Tailwind happened to emit them in.
|
|
33
|
+
* The same holds for a class a caller concatenates onto it: it does not replace
|
|
34
|
+
* the recipe's own, and the offset reader is emitted after every numeric
|
|
35
|
+
* `underline-offset-*`. Merge with `tailwind-merge`, or pass `className` to
|
|
36
|
+
* `Link`, which merges, to override one.
|
|
37
|
+
*
|
|
19
38
|
* @example
|
|
20
39
|
* <a className={linkVariants({ variant: "underline" })} href="/docs">Docs</a>
|
|
21
40
|
*/
|
|
22
|
-
const linkVariants = cva(
|
|
41
|
+
const linkVariants = cva(`cursor-pointer rounded-control ${CONTROL_FACE} ${LINK_WEIGHT} transition-colors duration-150 outline-none ${HOVER_INK} ${LINK_FOCUS_RING}`, {
|
|
23
42
|
variants: { variant: {
|
|
24
|
-
plain:
|
|
25
|
-
underline:
|
|
43
|
+
plain: `no-underline ${LINK_INK}`,
|
|
44
|
+
underline: `underline ${INLINE_LINK_INK} ${LINK_RULE} ${LINK_OFFSET} ${HOVER_RULE}`
|
|
26
45
|
} },
|
|
27
46
|
defaultVariants: { variant: "plain" }
|
|
28
47
|
});
|