@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
|
@@ -6,11 +6,21 @@ import { useRender } from "@base-ui/react/use-render";
|
|
|
6
6
|
* The `Button` class recipe, exported so other surfaces (a link that must look
|
|
7
7
|
* like a button, a third-party trigger) can borrow the exact same classes.
|
|
8
8
|
*
|
|
9
|
+
* **It returns the recipe unmerged**, and its `className` option only appends.
|
|
10
|
+
* A class concatenated onto it — by a template string, `clsx`, or that option —
|
|
11
|
+
* does not replace the recipe's own; the two compete by the order Tailwind
|
|
12
|
+
* emits them in, which is not a contract. The inline padding in particular is
|
|
13
|
+
* a `px-[calc(…)]` reader of the style set's `style-control-pad`, and Tailwind
|
|
14
|
+
* emits it after every numeric `px-*`, so a concatenated `px-2` no longer wins
|
|
15
|
+
* the way it did over the `px-(--cue-space-*)` rung it replaced. To override a
|
|
16
|
+
* class of the recipe, pass `className` to `Button` itself, which merges, or
|
|
17
|
+
* merge the result with `tailwind-merge`.
|
|
18
|
+
*
|
|
9
19
|
* @example
|
|
10
20
|
* <a className={buttonVariants({ variant: "primary", size: "sm" })} href="/go">Go</a>
|
|
11
21
|
*/
|
|
12
22
|
declare const buttonVariants: (props?: ({
|
|
13
|
-
variant?: "
|
|
23
|
+
variant?: "danger-outline" | "ghost" | "primary" | "secondary" | "outline" | "danger" | null | undefined;
|
|
14
24
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
15
25
|
} & ClassProp) | undefined) => string;
|
|
16
26
|
interface ButtonProps extends React.ComponentPropsWithoutRef<"button">, VariantProps<typeof buttonVariants> {
|
|
@@ -47,6 +57,11 @@ interface ButtonProps extends React.ComponentPropsWithoutRef<"button">, VariantP
|
|
|
47
57
|
* The focus ring is an `outline`, never a `box-shadow`, so it survives inside
|
|
48
58
|
* `overflow: hidden` panels.
|
|
49
59
|
*
|
|
60
|
+
* `className` is merged with `tailwind-merge`, so a caller's `px-2`,
|
|
61
|
+
* `font-semibold` or `shadow-none` replaces the class the recipe set for the
|
|
62
|
+
* same property. Only here: `buttonVariants()` concatenates, and says what that
|
|
63
|
+
* costs.
|
|
64
|
+
*
|
|
50
65
|
* @example
|
|
51
66
|
* <Button variant="primary" size="sm" icon={Play}>Run cue</Button>
|
|
52
67
|
* @example
|
|
@@ -1,13 +1,24 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "../lib/cn.js";
|
|
3
|
+
import { FOCUS_RING_PAINT } from "../system/_focus-ring.js";
|
|
4
|
+
import { CONTROL_FACE } from "../system/_style-control-face.js";
|
|
5
|
+
import { REST_SHADE_CLASS } from "../system/_paint-rest-shade.js";
|
|
6
|
+
import { DISABLED_OPACITY, DISABLED_TONES } from "../system/_style-disabled.js";
|
|
3
7
|
import { cva } from "../lib/cva.js";
|
|
4
|
-
import {
|
|
8
|
+
import { CONTROL_STEP_SIZE_LG } from "../system/_style-control-step.js";
|
|
9
|
+
import { GLOW_CLASSES, GLOW_DANGER_CLASSES } from "../system/_paint-glow.js";
|
|
10
|
+
import { CONTROL_CASE, CONTROL_PAD_LG, CONTROL_PAD_MD, CONTROL_PAD_SM, CONTROL_TRACKING, CONTROL_TRIM, CONTROL_WEIGHT, GHOST_INK, OUTLINE_EDGE, OUTLINE_INK, SECONDARY_EDGE, SECONDARY_GROUND, SECONDARY_INK } from "../system/_style-control.js";
|
|
11
|
+
import { CONTROL_GAP } from "../system/_style-control-gap.js";
|
|
12
|
+
import { OUTLINE_HOVER_EDGE, OUTLINE_HOVER_GROUND } from "../system/_style-outline-hover.js";
|
|
5
13
|
import * as React from "react";
|
|
6
14
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
15
|
import { useRender } from "@base-ui/react/use-render";
|
|
8
16
|
//#region src/primitives/button.tsx
|
|
9
17
|
/**
|
|
10
|
-
* The chassis every control-shaped primitive shares: layout,
|
|
18
|
+
* The chassis every control-shaped primitive shares: layout, the control face
|
|
19
|
+
* (mono, unless a style set names another — `CONTROL_FACE` says why), the
|
|
20
|
+
* control's weight, tracking, label trim and case (500, `normal`, `normal` and
|
|
21
|
+
* `none` unless a style set names others — `_style-control.ts` says why), the
|
|
11
22
|
* density radius, the transition and the focus ring. Deliberately carries no
|
|
12
23
|
* size and no colour so `Button` (height + horizontal padding) and `IconButton`
|
|
13
24
|
* (one square token) can each add their own without fighting `tailwind-merge`.
|
|
@@ -19,9 +30,15 @@ import { useRender } from "@base-ui/react/use-render";
|
|
|
19
30
|
* Restoring the style at ring time is what makes the focus indicator exist
|
|
20
31
|
* (WCAG 2.4.7). `test/focus-ring.test.ts` guards every occurrence.
|
|
21
32
|
*
|
|
33
|
+
* The ring's width and colour are {@link FOCUS_RING_PAINT} — `_focus-ring.ts`
|
|
34
|
+
* says why every site but this one reads a fixed offset from there too. This
|
|
35
|
+
* one reads `--cue-style-focus-offset` instead, because the offset here is a
|
|
36
|
+
* style-set knob (kiln pulls it to -1px) rather than one of that module's three
|
|
37
|
+
* fixed shapes; `1px` is the offset this chassis drew before either existed.
|
|
38
|
+
*
|
|
22
39
|
* @internal Not part of the public API; imported by `icon-button.tsx`.
|
|
23
40
|
*/
|
|
24
|
-
const buttonChassis =
|
|
41
|
+
const buttonChassis = `inline-flex select-none items-center justify-center ${CONTROL_GAP} whitespace-nowrap rounded-control ${CONTROL_FACE} ${CONTROL_WEIGHT} ${CONTROL_TRACKING} ${CONTROL_TRIM} ${CONTROL_CASE} transition-colors duration-150 outline-none ${FOCUS_RING_PAINT} focus-visible:outline-offset-[var(--cue-style-focus-offset,1px)] disabled:pointer-events-none ${DISABLED_OPACITY}`;
|
|
25
42
|
/**
|
|
26
43
|
* The shared colour vocabulary. `accent` is theme-controlled, so `primary`
|
|
27
44
|
* reads as white-on-black in `cue` and cyan-on-near-black in `terminal` with no
|
|
@@ -40,17 +57,27 @@ const buttonChassis = "inline-flex select-none items-center justify-center gap-[
|
|
|
40
57
|
* @internal Not part of the public API; imported by `icon-button.tsx`.
|
|
41
58
|
*/
|
|
42
59
|
const buttonTones = {
|
|
43
|
-
primary: `bg-accent text-accent-fg hover:bg-accent-hover border border-transparent ${GLOW_CLASSES}`,
|
|
44
|
-
secondary:
|
|
45
|
-
ghost:
|
|
46
|
-
outline:
|
|
47
|
-
danger:
|
|
48
|
-
"danger-outline":
|
|
60
|
+
primary: `bg-accent-fill text-accent-fill-fg hover:bg-accent-fill-hover border border-transparent ${GLOW_CLASSES} ${DISABLED_TONES.primary}`,
|
|
61
|
+
secondary: `border ${SECONDARY_EDGE} ${SECONDARY_INK} hover:text-[color:var(--cue-style-secondary-hover-ink,var(--cue-fg))] hover:border-[color:var(--cue-style-secondary-hover-edge,var(--cue-border-strong))] ${SECONDARY_GROUND} hover:bg-[color:var(--cue-style-secondary-hover-ground,var(--cue-style-secondary-ground,var(--cue-surface-2)))] ${DISABLED_TONES.secondary}`,
|
|
62
|
+
ghost: `${GHOST_INK} hover:text-fg hover:bg-surface-2 border border-transparent ${DISABLED_TONES.ghost}`,
|
|
63
|
+
outline: `border ${OUTLINE_EDGE} ${OUTLINE_INK} ${OUTLINE_HOVER_EDGE} hover:text-accent bg-transparent ${OUTLINE_HOVER_GROUND} ${REST_SHADE_CLASS} ${DISABLED_TONES.outline}`,
|
|
64
|
+
danger: `bg-danger text-danger-fg hover:opacity-90 border border-transparent ${GLOW_DANGER_CLASSES} ${DISABLED_TONES.danger}`,
|
|
65
|
+
"danger-outline": `border text-danger bg-transparent hover:bg-danger/10 border-danger/40 ${DISABLED_TONES["danger-outline"]}`
|
|
49
66
|
};
|
|
50
67
|
/**
|
|
51
68
|
* The `Button` class recipe, exported so other surfaces (a link that must look
|
|
52
69
|
* like a button, a third-party trigger) can borrow the exact same classes.
|
|
53
70
|
*
|
|
71
|
+
* **It returns the recipe unmerged**, and its `className` option only appends.
|
|
72
|
+
* A class concatenated onto it — by a template string, `clsx`, or that option —
|
|
73
|
+
* does not replace the recipe's own; the two compete by the order Tailwind
|
|
74
|
+
* emits them in, which is not a contract. The inline padding in particular is
|
|
75
|
+
* a `px-[calc(…)]` reader of the style set's `style-control-pad`, and Tailwind
|
|
76
|
+
* emits it after every numeric `px-*`, so a concatenated `px-2` no longer wins
|
|
77
|
+
* the way it did over the `px-(--cue-space-*)` rung it replaced. To override a
|
|
78
|
+
* class of the recipe, pass `className` to `Button` itself, which merges, or
|
|
79
|
+
* merge the result with `tailwind-merge`.
|
|
80
|
+
*
|
|
54
81
|
* @example
|
|
55
82
|
* <a className={buttonVariants({ variant: "primary", size: "sm" })} href="/go">Go</a>
|
|
56
83
|
*/
|
|
@@ -58,9 +85,9 @@ const buttonVariants = cva(buttonChassis, {
|
|
|
58
85
|
variants: {
|
|
59
86
|
variant: buttonTones,
|
|
60
87
|
size: {
|
|
61
|
-
sm:
|
|
62
|
-
md:
|
|
63
|
-
lg:
|
|
88
|
+
sm: `h-control-sm ${CONTROL_PAD_SM} text-(length:--cue-text-ui)`,
|
|
89
|
+
md: `h-control-md ${CONTROL_PAD_MD} text-(length:--cue-text-ui)`,
|
|
90
|
+
lg: `h-control-lg ${CONTROL_PAD_LG} ${CONTROL_STEP_SIZE_LG}`
|
|
64
91
|
}
|
|
65
92
|
},
|
|
66
93
|
defaultVariants: {
|
|
@@ -76,6 +103,11 @@ const buttonVariants = cva(buttonChassis, {
|
|
|
76
103
|
* The focus ring is an `outline`, never a `box-shadow`, so it survives inside
|
|
77
104
|
* `overflow: hidden` panels.
|
|
78
105
|
*
|
|
106
|
+
* `className` is merged with `tailwind-merge`, so a caller's `px-2`,
|
|
107
|
+
* `font-semibold` or `shadow-none` replaces the class the recipe set for the
|
|
108
|
+
* same property. Only here: `buttonVariants()` concatenates, and says what that
|
|
109
|
+
* costs.
|
|
110
|
+
*
|
|
79
111
|
* @example
|
|
80
112
|
* <Button variant="primary" size="sm" icon={Play}>Run cue</Button>
|
|
81
113
|
* @example
|
|
@@ -1,34 +1,6 @@
|
|
|
1
1
|
import { ClassProp, VariantProps } from "../lib/cva.js";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
//#region src/primitives/chip.d.ts
|
|
4
|
-
/**
|
|
5
|
-
* The tinted-chip recipe: `bg-<tone>/10 border-<tone>/35 text-<tone>`, and the
|
|
6
|
-
* two quieter readings of it — `outline`, which drops the fill, and `tag`,
|
|
7
|
-
* which drops the fill and the voice with it.
|
|
8
|
-
*
|
|
9
|
-
* Every property that varies is emitted from exactly one place: one rim, one
|
|
10
|
-
* ink, one fill, one gutter, one type size, always. Emitting `bg-<tone>/10`
|
|
11
|
-
* from the tone map and then cancelling it with `bg-transparent` would leave
|
|
12
|
-
* two competing utilities in the class string, and `chipVariants` is exported —
|
|
13
|
-
* a caller who uses it without `cn` gets a raw string where the winner is
|
|
14
|
-
* decided by stylesheet order rather than by which utility was written last.
|
|
15
|
-
* `h-chip h-4` proves the point at the other end: `tailwind-merge` cannot even
|
|
16
|
-
* see that as a conflict, because `chip` is a token name and not a scale step.
|
|
17
|
-
* So nothing here cancels anything. What varies moves into `variants` or
|
|
18
|
-
* `compoundVariants` until only one of it is ever emitted.
|
|
19
|
-
*
|
|
20
|
-
* That is why `neutral` carries no rim of its own. The other six tones rim
|
|
21
|
-
* themselves at `/35` in all three variants, but the neutral line has two
|
|
22
|
-
* weights in this system: `--cue-border` is a box edge, and a chip is a box;
|
|
23
|
-
* `--cue-hair-strong` is the rule between things, and a tag is a mark on the
|
|
24
|
-
* page rather than a container. The rim is therefore a compound of tone and
|
|
25
|
-
* variant, exactly as the fill is.
|
|
26
|
-
*
|
|
27
|
-
* @example
|
|
28
|
-
* <span className={chipVariants({ tone: "danger", variant: "outline" })}>fault</span>
|
|
29
|
-
* @example
|
|
30
|
-
* <span className={chipVariants({ variant: "tag" })}>mcp</span>
|
|
31
|
-
*/
|
|
32
4
|
declare const chipVariants: (props?: ({
|
|
33
5
|
tone?: "danger" | "info" | "warn" | "accent" | "ok" | "busy" | "neutral" | null | undefined;
|
|
34
6
|
variant?: "outline" | "tinted" | "tag" | null | undefined;
|
|
@@ -46,7 +18,17 @@ interface ChipProps extends React.HTMLAttributes<HTMLElement>, VariantProps<type
|
|
|
46
18
|
children?: React.ReactNode;
|
|
47
19
|
}
|
|
48
20
|
/**
|
|
49
|
-
* A compact status/label pill: mono, uppercase, wide-tracked, one line tall
|
|
21
|
+
* A compact status/label pill: mono, uppercase, wide-tracked, one line tall —
|
|
22
|
+
* by default, the style set's choice inside one.
|
|
23
|
+
*
|
|
24
|
+
* A chip speaks in the label voice: it reads the label face
|
|
25
|
+
* (`--cue-style-label-face`) and its own case (`--cue-style-chip-case`, which
|
|
26
|
+
* falls back to the label case), so under a sans, sentence-case Look its text
|
|
27
|
+
* is sans and sentence case like the captions around it. This reverses the
|
|
28
|
+
* earlier ruling that a tag's text is the value being shown and stays mono
|
|
29
|
+
* (spec 2026-09-26-looks-fidelity F-15): under a sans Look a mono uppercase
|
|
30
|
+
* chip was the most visible console voice left on the page. A consumer that
|
|
31
|
+
* wants a chip mono under every set passes `className="font-mono uppercase"`.
|
|
50
32
|
*
|
|
51
33
|
* `tone` uses the shared status vocabulary (`ok | busy | warn | danger | info`)
|
|
52
34
|
* plus `neutral` and `accent`, so a chip, a `StatusDot` and a `Meter` always
|
package/dist/primitives/chip.js
CHANGED
|
@@ -1,52 +1,27 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "../lib/cn.js";
|
|
3
|
+
import { FOCUS_RING } from "../system/_focus-ring.js";
|
|
3
4
|
import { cva } from "../lib/cva.js";
|
|
5
|
+
import { CHIP_CASE, CHIP_EDGE, CHIP_FILL, CHIP_GAP, CHIP_HEIGHT, CHIP_INK_NEUTRAL, CHIP_LEADING, CHIP_LEADING_INHERIT, CHIP_PAD, CHIP_RADIUS, CHIP_SIZE, CHIP_SIZE_MICRO, CHIP_TRACKING, CHIP_TRACKING_TAG, TAG_EDGE, TAG_PAD } from "../system/_style-chip.js";
|
|
6
|
+
import { LABEL_FACE } from "../system/_style-label-face.js";
|
|
7
|
+
import { LABEL_WEIGHT } from "../system/_style-label-weight.js";
|
|
4
8
|
import * as React from "react";
|
|
5
9
|
import { jsx } from "react/jsx-runtime";
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* The tinted-chip recipe: `bg-<tone>/10 border-<tone>/35 text-<tone>`, and the
|
|
9
|
-
* two quieter readings of it — `outline`, which drops the fill, and `tag`,
|
|
10
|
-
* which drops the fill and the voice with it.
|
|
11
|
-
*
|
|
12
|
-
* Every property that varies is emitted from exactly one place: one rim, one
|
|
13
|
-
* ink, one fill, one gutter, one type size, always. Emitting `bg-<tone>/10`
|
|
14
|
-
* from the tone map and then cancelling it with `bg-transparent` would leave
|
|
15
|
-
* two competing utilities in the class string, and `chipVariants` is exported —
|
|
16
|
-
* a caller who uses it without `cn` gets a raw string where the winner is
|
|
17
|
-
* decided by stylesheet order rather than by which utility was written last.
|
|
18
|
-
* `h-chip h-4` proves the point at the other end: `tailwind-merge` cannot even
|
|
19
|
-
* see that as a conflict, because `chip` is a token name and not a scale step.
|
|
20
|
-
* So nothing here cancels anything. What varies moves into `variants` or
|
|
21
|
-
* `compoundVariants` until only one of it is ever emitted.
|
|
22
|
-
*
|
|
23
|
-
* That is why `neutral` carries no rim of its own. The other six tones rim
|
|
24
|
-
* themselves at `/35` in all three variants, but the neutral line has two
|
|
25
|
-
* weights in this system: `--cue-border` is a box edge, and a chip is a box;
|
|
26
|
-
* `--cue-hair-strong` is the rule between things, and a tag is a mark on the
|
|
27
|
-
* page rather than a container. The rim is therefore a compound of tone and
|
|
28
|
-
* variant, exactly as the fill is.
|
|
29
|
-
*
|
|
30
|
-
* @example
|
|
31
|
-
* <span className={chipVariants({ tone: "danger", variant: "outline" })}>fault</span>
|
|
32
|
-
* @example
|
|
33
|
-
* <span className={chipVariants({ variant: "tag" })}>mcp</span>
|
|
34
|
-
*/
|
|
35
|
-
const chipVariants = cva("inline-flex h-chip select-none items-center justify-center gap-(--cue-space-2) whitespace-nowrap rounded-(--radius-control) border font-mono leading-none uppercase outline-none focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-offset-1 focus-visible:outline-accent", {
|
|
10
|
+
const chipVariants = cva(`inline-flex ${CHIP_HEIGHT} select-none items-center justify-center ${CHIP_GAP} whitespace-nowrap ${CHIP_RADIUS} border ${LABEL_FACE} ${LABEL_WEIGHT} ${CHIP_CASE} outline-none ${FOCUS_RING}`, {
|
|
36
11
|
variants: {
|
|
37
12
|
tone: {
|
|
38
|
-
neutral:
|
|
39
|
-
accent:
|
|
40
|
-
ok:
|
|
41
|
-
busy:
|
|
42
|
-
warn:
|
|
43
|
-
danger:
|
|
44
|
-
info:
|
|
13
|
+
neutral: CHIP_INK_NEUTRAL,
|
|
14
|
+
accent: `${CHIP_EDGE.accent} text-accent`,
|
|
15
|
+
ok: `${CHIP_EDGE.ok} text-ok`,
|
|
16
|
+
busy: `${CHIP_EDGE.busy} text-busy`,
|
|
17
|
+
warn: `${CHIP_EDGE.warn} text-warn`,
|
|
18
|
+
danger: `${CHIP_EDGE.danger} text-danger`,
|
|
19
|
+
info: `${CHIP_EDGE.info} text-info`
|
|
45
20
|
},
|
|
46
21
|
variant: {
|
|
47
|
-
tinted:
|
|
48
|
-
outline:
|
|
49
|
-
tag:
|
|
22
|
+
tinted: `${CHIP_PAD} ${CHIP_SIZE} ${CHIP_LEADING} ${CHIP_TRACKING}`,
|
|
23
|
+
outline: `bg-transparent ${CHIP_PAD} ${CHIP_SIZE} ${CHIP_LEADING} ${CHIP_TRACKING}`,
|
|
24
|
+
tag: `bg-transparent ${TAG_PAD} ${CHIP_SIZE_MICRO} ${CHIP_LEADING} ${CHIP_TRACKING_TAG}`
|
|
50
25
|
},
|
|
51
26
|
interactive: {
|
|
52
27
|
true: "cursor-pointer disabled:pointer-events-none disabled:opacity-40",
|
|
@@ -56,13 +31,18 @@ const chipVariants = cva("inline-flex h-chip select-none items-center justify-ce
|
|
|
56
31
|
compoundVariants: [
|
|
57
32
|
{
|
|
58
33
|
tone: "neutral",
|
|
59
|
-
variant:
|
|
34
|
+
variant: "tinted",
|
|
60
35
|
class: "border-border"
|
|
61
36
|
},
|
|
37
|
+
{
|
|
38
|
+
tone: "neutral",
|
|
39
|
+
variant: "outline",
|
|
40
|
+
class: "border-[color:var(--cue-style-outline-edge,var(--cue-border))]"
|
|
41
|
+
},
|
|
62
42
|
{
|
|
63
43
|
tone: "neutral",
|
|
64
44
|
variant: "tag",
|
|
65
|
-
class:
|
|
45
|
+
class: TAG_EDGE
|
|
66
46
|
},
|
|
67
47
|
{
|
|
68
48
|
tone: "neutral",
|
|
@@ -72,32 +52,32 @@ const chipVariants = cva("inline-flex h-chip select-none items-center justify-ce
|
|
|
72
52
|
{
|
|
73
53
|
tone: "accent",
|
|
74
54
|
variant: "tinted",
|
|
75
|
-
class:
|
|
55
|
+
class: CHIP_FILL.accent
|
|
76
56
|
},
|
|
77
57
|
{
|
|
78
58
|
tone: "ok",
|
|
79
59
|
variant: "tinted",
|
|
80
|
-
class:
|
|
60
|
+
class: CHIP_FILL.ok
|
|
81
61
|
},
|
|
82
62
|
{
|
|
83
63
|
tone: "busy",
|
|
84
64
|
variant: "tinted",
|
|
85
|
-
class:
|
|
65
|
+
class: CHIP_FILL.busy
|
|
86
66
|
},
|
|
87
67
|
{
|
|
88
68
|
tone: "warn",
|
|
89
69
|
variant: "tinted",
|
|
90
|
-
class:
|
|
70
|
+
class: CHIP_FILL.warn
|
|
91
71
|
},
|
|
92
72
|
{
|
|
93
73
|
tone: "danger",
|
|
94
74
|
variant: "tinted",
|
|
95
|
-
class:
|
|
75
|
+
class: CHIP_FILL.danger
|
|
96
76
|
},
|
|
97
77
|
{
|
|
98
78
|
tone: "info",
|
|
99
79
|
variant: "tinted",
|
|
100
|
-
class:
|
|
80
|
+
class: CHIP_FILL.info
|
|
101
81
|
},
|
|
102
82
|
{
|
|
103
83
|
tone: "neutral",
|
|
@@ -191,7 +171,17 @@ const chipVariants = cva("inline-flex h-chip select-none items-center justify-ce
|
|
|
191
171
|
}
|
|
192
172
|
});
|
|
193
173
|
/**
|
|
194
|
-
* A compact status/label pill: mono, uppercase, wide-tracked, one line tall
|
|
174
|
+
* A compact status/label pill: mono, uppercase, wide-tracked, one line tall —
|
|
175
|
+
* by default, the style set's choice inside one.
|
|
176
|
+
*
|
|
177
|
+
* A chip speaks in the label voice: it reads the label face
|
|
178
|
+
* (`--cue-style-label-face`) and its own case (`--cue-style-chip-case`, which
|
|
179
|
+
* falls back to the label case), so under a sans, sentence-case Look its text
|
|
180
|
+
* is sans and sentence case like the captions around it. This reverses the
|
|
181
|
+
* earlier ruling that a tag's text is the value being shown and stays mono
|
|
182
|
+
* (spec 2026-09-26-looks-fidelity F-15): under a sans Look a mono uppercase
|
|
183
|
+
* chip was the most visible console voice left on the page. A consumer that
|
|
184
|
+
* wants a chip mono under every set passes `className="font-mono uppercase"`.
|
|
195
185
|
*
|
|
196
186
|
* `tone` uses the shared status vocabulary (`ok | busy | warn | danger | info`)
|
|
197
187
|
* plus `neutral` and `accent`, so a chip, a `StatusDot` and a `Meter` always
|
|
@@ -218,7 +208,7 @@ const Chip = React.forwardRef(function Chip({ className, tone, variant, interact
|
|
|
218
208
|
tone,
|
|
219
209
|
variant,
|
|
220
210
|
interactive
|
|
221
|
-
}), className);
|
|
211
|
+
}), CHIP_LEADING_INHERIT, className);
|
|
222
212
|
if (interactive) return /* @__PURE__ */ jsx("button", {
|
|
223
213
|
ref,
|
|
224
214
|
type: "button",
|
|
@@ -8,7 +8,7 @@ import { useRender } from "@base-ui/react/use-render";
|
|
|
8
8
|
* every density.
|
|
9
9
|
*/
|
|
10
10
|
declare const iconButtonVariants: (props?: ({
|
|
11
|
-
variant?: "
|
|
11
|
+
variant?: "danger-outline" | "ghost" | "primary" | "secondary" | "outline" | "danger" | null | undefined;
|
|
12
12
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
13
13
|
} & ClassProp) | undefined) => string;
|
|
14
14
|
interface IconButtonProps extends Omit<React.ComponentPropsWithoutRef<"button">, "children">, VariantProps<typeof iconButtonVariants> {
|
package/dist/primitives/kbd.d.ts
CHANGED
|
@@ -9,6 +9,12 @@ type KbdProps = React.ComponentPropsWithoutRef<"kbd">;
|
|
|
9
9
|
* chip height so a `Kbd` and a `Chip` line up on the same row, and set in the
|
|
10
10
|
* micro type step because shortcut hints are reference material, not content.
|
|
11
11
|
*
|
|
12
|
+
* A key label is a control's voice, so it wears the control face
|
|
13
|
+
* (`--cue-style-control-face`, mono by default) rather than a fixed mono
|
|
14
|
+
* (spec 2026-09-26-looks-fidelity F-16), and a style set can move its rim
|
|
15
|
+
* (`--cue-style-kbd-edge`), its size (`--cue-style-chip-size`, shared with the
|
|
16
|
+
* chip it sits beside) and its weight (`--cue-style-label-weight`).
|
|
17
|
+
*
|
|
12
18
|
* @example
|
|
13
19
|
* <span>Press <Kbd>⌘</Kbd><Kbd>K</Kbd> to search</span>
|
|
14
20
|
*/
|
package/dist/primitives/kbd.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { cn } from "../lib/cn.js";
|
|
2
|
+
import { CONTROL_FACE } from "../system/_style-control-face.js";
|
|
3
|
+
import { LABEL_WEIGHT } from "../system/_style-label-weight.js";
|
|
4
|
+
import { KBD_BOX, KBD_EDGE, KBD_FILL, KBD_LEADING, KBD_SIZE } from "../system/_style-kbd.js";
|
|
2
5
|
import * as React from "react";
|
|
3
6
|
import { jsx } from "react/jsx-runtime";
|
|
4
7
|
//#region src/primitives/kbd.tsx
|
|
@@ -9,13 +12,19 @@ import { jsx } from "react/jsx-runtime";
|
|
|
9
12
|
* chip height so a `Kbd` and a `Chip` line up on the same row, and set in the
|
|
10
13
|
* micro type step because shortcut hints are reference material, not content.
|
|
11
14
|
*
|
|
15
|
+
* A key label is a control's voice, so it wears the control face
|
|
16
|
+
* (`--cue-style-control-face`, mono by default) rather than a fixed mono
|
|
17
|
+
* (spec 2026-09-26-looks-fidelity F-16), and a style set can move its rim
|
|
18
|
+
* (`--cue-style-kbd-edge`), its size (`--cue-style-chip-size`, shared with the
|
|
19
|
+
* chip it sits beside) and its weight (`--cue-style-label-weight`).
|
|
20
|
+
*
|
|
12
21
|
* @example
|
|
13
22
|
* <span>Press <Kbd>⌘</Kbd><Kbd>K</Kbd> to search</span>
|
|
14
23
|
*/
|
|
15
24
|
const Kbd = React.forwardRef(function Kbd({ className, children, ...elementProps }, ref) {
|
|
16
25
|
return /* @__PURE__ */ jsx("kbd", {
|
|
17
26
|
ref,
|
|
18
|
-
className: cn(
|
|
27
|
+
className: cn(`inline-flex ${KBD_BOX} select-none items-center justify-center border ${KBD_FILL} text-fg-muted`, KBD_EDGE, CONTROL_FACE, KBD_SIZE, KBD_LEADING, LABEL_WEIGHT, className),
|
|
19
28
|
...elementProps,
|
|
20
29
|
children
|
|
21
30
|
});
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { cn } from "../lib/cn.js";
|
|
2
|
+
import { SKELETON_RADIUS } from "../system/_style-skeleton.js";
|
|
2
3
|
import * as React from "react";
|
|
3
4
|
import { jsx } from "react/jsx-runtime";
|
|
4
5
|
//#region src/primitives/skeleton.tsx
|
|
@@ -19,7 +20,7 @@ const Skeleton = React.forwardRef(function Skeleton({ className, ...elementProps
|
|
|
19
20
|
return /* @__PURE__ */ jsx("div", {
|
|
20
21
|
ref,
|
|
21
22
|
"aria-hidden": "true",
|
|
22
|
-
className: cn(
|
|
23
|
+
className: cn(`animate-pulse ${SKELETON_RADIUS} bg-surface-2 motion-reduce:animate-none`, className),
|
|
23
24
|
...elementProps
|
|
24
25
|
});
|
|
25
26
|
});
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
//#region src/system/_focus-ring-field.ts
|
|
2
|
+
/**
|
|
3
|
+
* `FOCUS_RING_INSET` (`_focus-ring.ts`) with its offset read from the style set: the
|
|
4
|
+
* recessed field chassis's ring (`forms/_chassis.ts`), and nothing else.
|
|
5
|
+
*
|
|
6
|
+
* Plan V.2, T25: Tender's field ring sits flush on the rim (`0px`) where every
|
|
7
|
+
* other site of the inset shape keeps its `-1px`, so the offset is a name of
|
|
8
|
+
* its own — `style-field-focus-offset`, falling back to the `-1px`
|
|
9
|
+
* `FOCUS_RING_INSET` draws — and not `style-focus-offset`, which is the
|
|
10
|
+
* button chassis's (kiln pulls that to `-1px`, and a field that followed it
|
|
11
|
+
* would move with the buttons). `FOCUS_RING_INSET` keeps its fixed offset
|
|
12
|
+
* for its ten other consumers.
|
|
13
|
+
*
|
|
14
|
+
* Its own module, not a constant in `_focus-ring.ts`: docgen attributes a
|
|
15
|
+
* token to a component by the file its class string lives in, and every
|
|
16
|
+
* focusable component imports that module.
|
|
17
|
+
*
|
|
18
|
+
* @internal Not part of the public API.
|
|
19
|
+
*/
|
|
20
|
+
const FOCUS_RING_FIELD = "focus-visible:outline-solid focus-visible:outline-[length:var(--cue-style-focus-width,var(--cue-focus-ring))] focus-visible:outline-(--cue-focus) focus-visible:outline-offset-[var(--cue-style-field-focus-offset,-1px)]";
|
|
21
|
+
/**
|
|
22
|
+
* `FOCUS_RING_GROUP_INSET` with {@link FOCUS_RING_FIELD}'s offset: the
|
|
23
|
+
* grouped field's ring reads `style-field-focus-offset` as the field it wraps
|
|
24
|
+
* does (plan V.2, T25), so a grouped field and a plain one keep one focus
|
|
25
|
+
* geometry under every Look.
|
|
26
|
+
*/
|
|
27
|
+
const FOCUS_RING_GROUP_FIELD = "has-focus-visible:outline-solid has-focus-visible:outline-[length:var(--cue-style-focus-width,var(--cue-focus-ring))] has-focus-visible:outline-(--cue-focus) has-focus-visible:outline-offset-[var(--cue-style-field-focus-offset,-1px)]";
|
|
28
|
+
//#endregion
|
|
29
|
+
export { FOCUS_RING_FIELD, FOCUS_RING_GROUP_FIELD };
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
//#region src/system/_focus-ring.ts
|
|
2
|
+
/**
|
|
3
|
+
* The one focus ring this library draws, in one place.
|
|
4
|
+
*
|
|
5
|
+
* Spec 2026-09-26-looks-fidelity §3.12 (F-9). Before this module existed, 80
|
|
6
|
+
* files each spelt out `focus-visible:outline-2 focus-visible:outline-solid
|
|
7
|
+
* focus-visible:outline-offset-<n> focus-visible:outline-accent` by hand — a
|
|
8
|
+
* fixed 2px ring in the theme's **brand** colour. That is the wrong role:
|
|
9
|
+
* `--cue-accent` is not contrast-gated as an indicator, `--cue-focus` is (WCAG
|
|
10
|
+
* 1.4.11, advisory 3:1 on five grounds — `forms/_chassis.ts` carries the long
|
|
11
|
+
* form), and three shipped presets (hivehub.light, luma.light, venu.light)
|
|
12
|
+
* already had to split the two apart because the accent alone reads under
|
|
13
|
+
* 3:1 there. Every site but `forms/_chassis.ts` kept pointing at the
|
|
14
|
+
* un-gated role anyway, which is the defect this module closes.
|
|
15
|
+
*
|
|
16
|
+
* **This is a deliberate, library-wide colour change**, not a no-op: the
|
|
17
|
+
* ring's colour moves wherever a theme's `focus` differs from its `accent` —
|
|
18
|
+
* graphite and kiln and porcelain in both modes, tender dark, and hivehub,
|
|
19
|
+
* luma and venu in light (ten of the thirty theme blocks this system ships).
|
|
20
|
+
* `tests/browser/form-focus.spec.ts` and `form-focus-theme-blocks.spec.ts`
|
|
21
|
+
* measure the ring's resolved colour against `--cue-focus` in every one of
|
|
22
|
+
* the thirty.
|
|
23
|
+
*
|
|
24
|
+
* **Width is a style-set knob, colour is not.** `--cue-style-focus-width`
|
|
25
|
+
* lets a Look draw a heavier ring (tender: 3px) without a second module; no
|
|
26
|
+
* style name touches the ink, because the ink's job is the contrast floor,
|
|
27
|
+
* not the Look's voice. The fallback is `--cue-focus-ring`, the frozen 2px
|
|
28
|
+
* this system drew before any style set existed.
|
|
29
|
+
*
|
|
30
|
+
* **Offset is not one of the constants below.** Every site but the button
|
|
31
|
+
* chassis keeps the exact offset it already painted — `FOCUS_RING` (1px,
|
|
32
|
+
* floating clear of the edge), `FOCUS_RING_INSET` (-1px, flush with it),
|
|
33
|
+
* `FOCUS_RING_INSET_2` (-2px, flush one rung further in) and
|
|
34
|
+
* `FOCUS_RING_OFFSET_2` (2px, floating two clear) between them cover every
|
|
35
|
+
* offset this library drew before this file existed but one: `buttonChassis`
|
|
36
|
+
* reads `--cue-style-focus-offset` directly (kiln pulls it to -1px), so
|
|
37
|
+
* `FOCUS_RING_PAINT` — the width-and-colour half with no offset of its own —
|
|
38
|
+
* is exported for that one call site to finish.
|
|
39
|
+
*
|
|
40
|
+
* **Every export is a complete, literal string, not built from parts at
|
|
41
|
+
* runtime.** A first draft of this file built each one from a shared
|
|
42
|
+
* `ring(modifier, offset)` helper — the exact same characters, byte for byte,
|
|
43
|
+
* as what is written out below. It compiled, every jsdom suite that reads
|
|
44
|
+
* class strings off a render stayed green, and every rendered `className`
|
|
45
|
+
* carried the right text — and in a real browser the ring's `outline-offset`
|
|
46
|
+
* computed `0px` on all eighty sites regardless of which constant they used.
|
|
47
|
+
* `@tailwindcss/oxide` finds a utility by scanning source *text* for a
|
|
48
|
+
* complete candidate, and never evaluates the template literal that would
|
|
49
|
+
* assemble `"focus-visible" + ":" + "-outline-offset-1"` at runtime — so a
|
|
50
|
+
* class no file spells out in one contiguous string is a class the compiler
|
|
51
|
+
* never generates, however many test suites confirm the DOM carries its
|
|
52
|
+
* name. `tests/browser/form-focus.spec.ts` is what caught it, on a full
|
|
53
|
+
* `pnpm test:browser` run rather than on any file run alone, which is the
|
|
54
|
+
* argument for never letting this module drift back to the helper.
|
|
55
|
+
*
|
|
56
|
+
* **Its own module**, for the reason `_paint-glow.ts` gives at length:
|
|
57
|
+
* `@repo/docgen` attributes a token to a component by the file its class
|
|
58
|
+
* string lives in, following only `_`-prefixed imports. One ring, spent from
|
|
59
|
+
* one file, so a component that draws it is credited with reading
|
|
60
|
+
* `--cue-focus` and not with reading nothing.
|
|
61
|
+
*
|
|
62
|
+
* `outline-solid` is load-bearing in every export below, not decoration: in
|
|
63
|
+
* Tailwind v4 an outline's *style* is a separate custom property from its
|
|
64
|
+
* width, `outline-none` (the resting state every one of these sites also
|
|
65
|
+
* carries) sets that property to `none`, and only `<modifier>:outline-solid`
|
|
66
|
+
* restores it at ring time. `buttonChassis`'s own note says why at more
|
|
67
|
+
* length; `test/focus-ring.test.ts` is what keeps it paired here.
|
|
68
|
+
*
|
|
69
|
+
* @internal Not part of the public API.
|
|
70
|
+
*/
|
|
71
|
+
/**
|
|
72
|
+
* The ring's width and colour, with no offset of its own.
|
|
73
|
+
*
|
|
74
|
+
* Exported only for `primitives/button.tsx`, whose offset is itself a
|
|
75
|
+
* style-set knob (`--cue-style-focus-offset`) rather than one of the four
|
|
76
|
+
* fixed shapes below. Every other site imports one of those instead.
|
|
77
|
+
*/
|
|
78
|
+
const FOCUS_RING_PAINT = "focus-visible:outline-solid focus-visible:outline-[length:var(--cue-style-focus-width,var(--cue-focus-ring))] focus-visible:outline-(--cue-focus)";
|
|
79
|
+
/**
|
|
80
|
+
* A ring floating one pixel clear of the control's own edge
|
|
81
|
+
* (`outline-offset-1`).
|
|
82
|
+
*
|
|
83
|
+
* The shape most of this system's non-recessed controls drew already —
|
|
84
|
+
* `Button`'s siblings that do not ride `buttonChassis` itself, `Chip`,
|
|
85
|
+
* `Tabs`' own trigger, `AppBar.Link` and the rest of the plain chrome.
|
|
86
|
+
*/
|
|
87
|
+
const FOCUS_RING = "focus-visible:outline-solid focus-visible:outline-[length:var(--cue-style-focus-width,var(--cue-focus-ring))] focus-visible:outline-(--cue-focus) focus-visible:outline-offset-1";
|
|
88
|
+
/**
|
|
89
|
+
* A ring pulled back flush with the control's own edge, one pixel in
|
|
90
|
+
* (`-outline-offset-1`).
|
|
91
|
+
*
|
|
92
|
+
* The recessed-chassis shape: an outline at this offset spans from one pixel
|
|
93
|
+
* inside the border box to one pixel outside it, so it covers the rim it is
|
|
94
|
+
* drawn over instead of floating clear of it — `forms/_chassis.ts`'s long
|
|
95
|
+
* comment is the argument in full, and that file's own ring is exactly this
|
|
96
|
+
* constant.
|
|
97
|
+
*/
|
|
98
|
+
const FOCUS_RING_INSET = "focus-visible:outline-solid focus-visible:outline-[length:var(--cue-style-focus-width,var(--cue-focus-ring))] focus-visible:outline-(--cue-focus) focus-visible:-outline-offset-1";
|
|
99
|
+
/**
|
|
100
|
+
* A ring pulled back two pixels (`-outline-offset-2`) — for a control whose
|
|
101
|
+
* own rim sits one ring further in than {@link FOCUS_RING_INSET}'s, such as
|
|
102
|
+
* `SegmentedControl`'s pressed item inside its track.
|
|
103
|
+
*/
|
|
104
|
+
const FOCUS_RING_INSET_2 = "focus-visible:outline-solid focus-visible:outline-[length:var(--cue-style-focus-width,var(--cue-focus-ring))] focus-visible:outline-(--cue-focus) focus-visible:-outline-offset-2";
|
|
105
|
+
/**
|
|
106
|
+
* A ring floating two pixels clear (`outline-offset-2`) — the wider-gap
|
|
107
|
+
* counterpart to {@link FOCUS_RING} for a control with more room around it,
|
|
108
|
+
* such as a `Tabs` list item or a card-level link.
|
|
109
|
+
*/
|
|
110
|
+
const FOCUS_RING_OFFSET_2 = "focus-visible:outline-solid focus-visible:outline-[length:var(--cue-style-focus-width,var(--cue-focus-ring))] focus-visible:outline-(--cue-focus) focus-visible:outline-offset-2";
|
|
111
|
+
/**
|
|
112
|
+
* The one ring in this module drawn from a `data-*` attribute instead of a
|
|
113
|
+
* pseudo-class, floating two pixels clear (`outline-offset-2`).
|
|
114
|
+
*
|
|
115
|
+
* `color/_thumb.ts`'s draggable colour puck sits on Base UI's `ColorArea` and
|
|
116
|
+
* `ColorSlider`, which stamp `data-focus-visible` on the thumb rather than
|
|
117
|
+
* leaving `:focus-visible` to match it directly — so the thumb reads it as
|
|
118
|
+
* `data-[focus-visible]:`, the one modifier spelling this module exists to
|
|
119
|
+
* unify away from and cannot: `test/focus-ring.test.ts`'s WCAG guard has to
|
|
120
|
+
* see this exact string too, which is why it is spelled out here rather than
|
|
121
|
+
* composed at the call site.
|
|
122
|
+
*/
|
|
123
|
+
const FOCUS_RING_DATA_OFFSET_2 = "data-[focus-visible]:outline-solid data-[focus-visible]:outline-[length:var(--cue-style-focus-width,var(--cue-focus-ring))] data-[focus-visible]:outline-(--cue-focus) data-[focus-visible]:outline-offset-2";
|
|
124
|
+
//#endregion
|
|
125
|
+
export { FOCUS_RING, FOCUS_RING_DATA_OFFSET_2, FOCUS_RING_INSET, FOCUS_RING_INSET_2, FOCUS_RING_OFFSET_2, FOCUS_RING_PAINT };
|
|
@@ -22,11 +22,30 @@
|
|
|
22
22
|
* the elevation rungs and the stroke recipe carry theirs.
|
|
23
23
|
*
|
|
24
24
|
* **Nothing wearing this may also carry a `shadow-` literal**: `twMerge` keeps
|
|
25
|
-
* one of two `shadow-` utilities on the same element.
|
|
26
|
-
*
|
|
25
|
+
* one of two `shadow-` utilities on the same element. The two tones that wear a
|
|
26
|
+
* halo, `primary` and `danger`, carry no other, which is what makes the
|
|
27
|
+
* adoption additive. The `outline` tone does carry one — `REST_SHADE_CLASS`,
|
|
28
|
+
* the resting shade (fidelity plan R3) — so it must not also take
|
|
29
|
+
* `GLOW_CLASSES`: one of the two would be dropped in silence. A halo there
|
|
30
|
+
* would compose both into one `shadow-[…]` list instead.
|
|
27
31
|
*
|
|
28
32
|
* @internal Not part of the public API.
|
|
29
33
|
*/
|
|
30
34
|
const GLOW_CLASSES = "shadow-[0_0_var(--cue-paint-glow-blur)_var(--cue-paint-glow-ink,transparent),0_0_var(--cue-paint-glow-blur-far)_var(--cue-paint-glow-ink,transparent)] hover:shadow-[0_0_var(--cue-paint-glow-blur)_var(--cue-paint-glow-ink-hover,transparent),0_0_var(--cue-paint-glow-blur-far)_var(--cue-paint-glow-ink-hover,transparent)]";
|
|
35
|
+
/**
|
|
36
|
+
* The danger variant of {@link GLOW_CLASSES} (spec §3.10, P0.6): the same two
|
|
37
|
+
* offsetless stops, at the same two blur radii, tinted by the danger tone's
|
|
38
|
+
* own ink — `paint-danger-glow-ink` — rather than by the halo's. One ink, not
|
|
39
|
+
* a rest/hover pair: no pack authors a danger-glow HOVER ink, so `buttonTones`'
|
|
40
|
+
* `danger` reads one value at both states, exactly as it reads `bg-danger`
|
|
41
|
+
* without a separate hover fill.
|
|
42
|
+
*
|
|
43
|
+
* `transparent` by default, on every shipped pack but glaze, which is what
|
|
44
|
+
* keeps this additive: `buttonTones.danger` carries no `shadow-` literal
|
|
45
|
+
* today, so adopting this changes nothing until a pack tints the ink.
|
|
46
|
+
*
|
|
47
|
+
* @internal Not part of the public API.
|
|
48
|
+
*/
|
|
49
|
+
const GLOW_DANGER_CLASSES = "shadow-[0_0_var(--cue-paint-glow-blur)_var(--cue-paint-danger-glow-ink,transparent),0_0_var(--cue-paint-glow-blur-far)_var(--cue-paint-danger-glow-ink,transparent)]";
|
|
31
50
|
//#endregion
|
|
32
|
-
export { GLOW_CLASSES };
|
|
51
|
+
export { GLOW_CLASSES, GLOW_DANGER_CLASSES };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
//#region src/system/_paint-rest-shade.ts
|
|
2
|
+
/**
|
|
3
|
+
* {@link REST_SHADE} as a utility of its own, for a site that has no shadow
|
|
4
|
+
* list to compose it into: the recessed input chassis (`forms/_chassis.ts`,
|
|
5
|
+
* whose stroke recipe paints a border and a ground and no shadow), the
|
|
6
|
+
* outline button tone and the checkbox box (fidelity plan R3).
|
|
7
|
+
*
|
|
8
|
+
* **Spelt out, character for character**, rather than built from
|
|
9
|
+
* `REST_SHADE` with its spaces turned to underscores: `@tailwindcss/oxide`
|
|
10
|
+
* finds a utility by scanning source text for a complete candidate and never
|
|
11
|
+
* evaluates a template literal, so a class assembled at runtime is a class no
|
|
12
|
+
* stylesheet contains (`_focus-ring.ts` records the time that shipped).
|
|
13
|
+
* `test/system/style-controls.test.tsx` holds the two spellings together.
|
|
14
|
+
*
|
|
15
|
+
* **Labelled `shadow:`**, which Tailwind compiles exactly as it compiles the
|
|
16
|
+
* unlabelled value. The label is for `twMerge`, which knows a shadow only by
|
|
17
|
+
* two plain lengths after the `[` — this value's second is a `calc()` — and
|
|
18
|
+
* without the label files the class as a shadow COLOUR: a caller's
|
|
19
|
+
* `className="shadow-lg"` would then survive beside it rather than replace
|
|
20
|
+
* it, and a caller's `shadow-red-500` would delete it. Labelled, a caller's
|
|
21
|
+
* shadow replaces it and a caller's shadow colour tints it, as with any
|
|
22
|
+
* Tailwind shadow.
|
|
23
|
+
*
|
|
24
|
+
* **A site that already carries a `shadow-` utility must not take this**:
|
|
25
|
+
* `twMerge` keeps one of two `shadow-` utilities on the same element. It
|
|
26
|
+
* composes `REST_SHADE` into its own list instead.
|
|
27
|
+
*
|
|
28
|
+
* @internal Not part of the public API.
|
|
29
|
+
*/
|
|
30
|
+
const REST_SHADE_CLASS = "shadow-[shadow:0_calc(2px*var(--cue-paint-shadow-scale))_calc(4px*var(--cue-paint-shadow-scale))_var(--cue-paint-rest-shade,transparent)]";
|
|
31
|
+
//#endregion
|
|
32
|
+
export { REST_SHADE_CLASS };
|